From 1aaac172b09854564c3dcd7a056414c204243255 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 18 Feb 2019 02:15:26 -0500 Subject: [PATCH 1/3] backend/s3: Switch from github.com/terraform-providers/terraform-provider-aws to github.com/hashicorp/aws-sdk-go-base Output from acceptance testing (no new failures): ``` --- PASS: TestBackend_impl (0.00s) --- PASS: TestBackendConfig (0.37s) --- PASS: TestBackendConfig_invalidKey (0.00s) --- PASS: TestBackend (3.26s) --- PASS: TestBackendLocked (6.80s) --- FAIL: TestBackendExtraPaths (2.32s) --- PASS: TestBackendPrefixInWorkspace (2.06s) --- PASS: TestKeyEnv (8.20s) --- PASS: TestRemoteClient_impl (0.00s) --- PASS: TestRemoteClient (2.42s) --- PASS: TestRemoteClientLocks (6.33s) --- PASS: TestForceUnlock (13.31s) --- PASS: TestRemoteClient_clientMD5 (11.75s) --- PASS: TestRemoteClient_stateChecksum (10.07s) ``` --- backend/remote-state/s3/backend.go | 56 +- go.mod | 20 +- go.sum | 65 +- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 120 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../private/protocol/ec2query/build.go | 35 - .../private/protocol/ec2query/unmarshal.go | 71 - .../private/protocol/restjson/restjson.go | 92 - .../aws/aws-sdk-go/private/signer/v2/v2.go | 180 - .../aws/aws-sdk-go/service/acm/api.go | 3418 - .../aws/aws-sdk-go/service/acm/doc.go | 32 - .../aws/aws-sdk-go/service/acm/errors.go | 64 - .../aws/aws-sdk-go/service/acm/service.go | 97 - .../aws/aws-sdk-go/service/acm/waiters.go | 71 - .../aws/aws-sdk-go/service/acmpca/api.go | 4145 - .../aws/aws-sdk-go/service/acmpca/doc.go | 59 - .../aws/aws-sdk-go/service/acmpca/errors.go | 110 - .../aws/aws-sdk-go/service/acmpca/service.go | 97 - .../aws/aws-sdk-go/service/acmpca/waiters.go | 163 - .../aws/aws-sdk-go/service/apigateway/api.go | 24950 ----- .../service/apigateway/customization.go | 14 - .../aws/aws-sdk-go/service/apigateway/doc.go | 30 - .../aws-sdk-go/service/apigateway/errors.go | 52 - .../aws-sdk-go/service/apigateway/service.go | 95 - .../aws-sdk-go/service/apigatewayv2/api.go | 14048 --- .../aws-sdk-go/service/apigatewayv2/doc.go | 28 - .../aws-sdk-go/service/apigatewayv2/errors.go | 34 - .../service/apigatewayv2/service.go | 99 - .../service/applicationautoscaling/api.go | 4568 - .../service/applicationautoscaling/doc.go | 78 - .../service/applicationautoscaling/errors.go | 60 - .../service/applicationautoscaling/service.go | 100 - .../aws/aws-sdk-go/service/appmesh/api.go | 5286 - .../aws/aws-sdk-go/service/appmesh/doc.go | 44 - .../aws/aws-sdk-go/service/appmesh/errors.go | 69 - .../aws/aws-sdk-go/service/appmesh/service.go | 99 - .../aws/aws-sdk-go/service/appsync/api.go | 7698 -- .../aws/aws-sdk-go/service/appsync/doc.go | 29 - .../aws/aws-sdk-go/service/appsync/errors.go | 70 - .../aws/aws-sdk-go/service/appsync/service.go | 99 - .../aws/aws-sdk-go/service/athena/api.go | 2713 - .../aws/aws-sdk-go/service/athena/doc.go | 44 - .../aws/aws-sdk-go/service/athena/errors.go | 27 - .../aws/aws-sdk-go/service/athena/service.go | 97 - .../aws/aws-sdk-go/service/autoscaling/api.go | 13475 --- .../aws/aws-sdk-go/service/autoscaling/doc.go | 33 - .../aws-sdk-go/service/autoscaling/errors.go | 53 - .../aws-sdk-go/service/autoscaling/service.go | 95 - .../aws-sdk-go/service/autoscaling/waiters.go | 163 - .../aws/aws-sdk-go/service/backup/api.go | 10729 -- .../aws/aws-sdk-go/service/backup/doc.go | 30 - .../aws/aws-sdk-go/service/backup/errors.go | 58 - .../aws/aws-sdk-go/service/backup/service.go | 96 - .../aws/aws-sdk-go/service/batch/api.go | 5614 - .../aws/aws-sdk-go/service/batch/doc.go | 44 - .../aws/aws-sdk-go/service/batch/errors.go | 20 - .../aws/aws-sdk-go/service/batch/service.go | 96 - .../aws/aws-sdk-go/service/budgets/api.go | 3697 - .../aws/aws-sdk-go/service/budgets/doc.go | 67 - .../aws/aws-sdk-go/service/budgets/errors.go | 50 - .../aws/aws-sdk-go/service/budgets/service.go | 97 - .../aws/aws-sdk-go/service/cloud9/api.go | 2148 - .../aws/aws-sdk-go/service/cloud9/doc.go | 58 - .../aws/aws-sdk-go/service/cloud9/errors.go | 48 - .../aws/aws-sdk-go/service/cloud9/service.go | 97 - .../aws-sdk-go/service/cloudformation/api.go | 13731 --- .../aws-sdk-go/service/cloudformation/doc.go | 46 - .../service/cloudformation/errors.go | 112 - .../service/cloudformation/service.go | 95 - .../service/cloudformation/waiters.go | 335 - .../aws/aws-sdk-go/service/cloudfront/api.go | 15445 --- .../aws/aws-sdk-go/service/cloudfront/doc.go | 31 - .../aws-sdk-go/service/cloudfront/errors.go | 474 - .../aws-sdk-go/service/cloudfront/service.go | 95 - .../aws-sdk-go/service/cloudfront/waiters.go | 148 - .../aws/aws-sdk-go/service/cloudhsmv2/api.go | 3073 - .../aws/aws-sdk-go/service/cloudhsmv2/doc.go | 29 - .../aws-sdk-go/service/cloudhsmv2/errors.go | 38 - .../aws-sdk-go/service/cloudhsmv2/service.go | 100 - .../aws/aws-sdk-go/service/cloudsearch/api.go | 6406 -- .../aws/aws-sdk-go/service/cloudsearch/doc.go | 33 - .../aws-sdk-go/service/cloudsearch/errors.go | 44 - .../aws-sdk-go/service/cloudsearch/service.go | 95 - .../aws/aws-sdk-go/service/cloudtrail/api.go | 4378 - .../aws/aws-sdk-go/service/cloudtrail/doc.go | 48 - .../aws-sdk-go/service/cloudtrail/errors.go | 298 - .../aws-sdk-go/service/cloudtrail/service.go | 97 - .../aws/aws-sdk-go/service/cloudwatch/api.go | 5189 - .../aws/aws-sdk-go/service/cloudwatch/doc.go | 42 - .../aws-sdk-go/service/cloudwatch/errors.go | 66 - .../aws-sdk-go/service/cloudwatch/service.go | 95 - .../aws-sdk-go/service/cloudwatch/waiters.go | 56 - .../service/cloudwatchevents/api.go | 4026 - .../service/cloudwatchevents/doc.go | 46 - .../service/cloudwatchevents/errors.go | 52 - .../service/cloudwatchevents/service.go | 97 - .../aws-sdk-go/service/cloudwatchlogs/api.go | 8809 -- .../aws-sdk-go/service/cloudwatchlogs/doc.go | 57 - .../service/cloudwatchlogs/errors.go | 76 - .../service/cloudwatchlogs/service.go | 97 - .../aws/aws-sdk-go/service/codebuild/api.go | 6313 -- .../aws/aws-sdk-go/service/codebuild/doc.go | 95 - .../aws-sdk-go/service/codebuild/errors.go | 37 - .../aws-sdk-go/service/codebuild/service.go | 97 - .../aws/aws-sdk-go/service/codecommit/api.go | 10845 -- .../aws/aws-sdk-go/service/codecommit/doc.go | 153 - .../aws-sdk-go/service/codecommit/errors.go | 793 - .../aws-sdk-go/service/codecommit/service.go | 97 - .../aws/aws-sdk-go/service/codedeploy/api.go | 11902 --- .../aws/aws-sdk-go/service/codedeploy/doc.go | 96 - .../aws-sdk-go/service/codedeploy/errors.go | 683 - .../aws-sdk-go/service/codedeploy/service.go | 97 - .../aws-sdk-go/service/codedeploy/waiters.go | 66 - .../aws-sdk-go/service/codepipeline/api.go | 8983 -- .../aws-sdk-go/service/codepipeline/doc.go | 153 - .../aws-sdk-go/service/codepipeline/errors.go | 170 - .../service/codepipeline/service.go | 97 - .../aws-sdk-go/service/cognitoidentity/api.go | 4050 - .../service/cognitoidentity/customizations.go | 12 - .../aws-sdk-go/service/cognitoidentity/doc.go | 59 - .../service/cognitoidentity/errors.go | 77 - .../service/cognitoidentity/service.go | 97 - .../service/cognitoidentityprovider/api.go | 24839 ----- .../service/cognitoidentityprovider/doc.go | 35 - .../service/cognitoidentityprovider/errors.go | 253 - .../cognitoidentityprovider/service.go | 97 - .../aws-sdk-go/service/configservice/api.go | 11699 --- .../aws-sdk-go/service/configservice/doc.go | 47 - .../service/configservice/errors.go | 239 - .../service/configservice/service.go | 97 - .../service/costandusagereportservice/api.go | 728 - .../service/costandusagereportservice/doc.go | 28 - .../costandusagereportservice/errors.go | 34 - .../costandusagereportservice/service.go | 100 - .../service/databasemigrationservice/api.go | 11803 --- .../service/databasemigrationservice/doc.go | 38 - .../databasemigrationservice/errors.go | 98 - .../databasemigrationservice/service.go | 97 - .../databasemigrationservice/waiters.go | 563 - .../aws-sdk-go/service/datapipeline/api.go | 4663 - .../aws-sdk-go/service/datapipeline/doc.go | 49 - .../aws-sdk-go/service/datapipeline/errors.go | 39 - .../service/datapipeline/service.go | 97 - .../aws/aws-sdk-go/service/datasync/api.go | 5506 - .../aws/aws-sdk-go/service/datasync/doc.go | 33 - .../aws/aws-sdk-go/service/datasync/errors.go | 12 - .../aws-sdk-go/service/datasync/service.go | 100 - .../aws/aws-sdk-go/service/dax/api.go | 4774 - .../aws/aws-sdk-go/service/dax/doc.go | 33 - .../aws/aws-sdk-go/service/dax/errors.go | 164 - .../aws/aws-sdk-go/service/dax/service.go | 97 - .../aws/aws-sdk-go/service/devicefarm/api.go | 17066 --- .../aws/aws-sdk-go/service/devicefarm/doc.go | 30 - .../aws-sdk-go/service/devicefarm/errors.go | 50 - .../aws-sdk-go/service/devicefarm/service.go | 97 - .../aws-sdk-go/service/directconnect/api.go | 9245 -- .../aws-sdk-go/service/directconnect/doc.go | 36 - .../service/directconnect/errors.go | 30 - .../service/directconnect/service.go | 97 - .../service/directoryservice/api.go | 11080 -- .../service/directoryservice/doc.go | 40 - .../service/directoryservice/errors.go | 152 - .../service/directoryservice/service.go | 97 - .../aws/aws-sdk-go/service/dlm/api.go | 1369 - .../aws/aws-sdk-go/service/dlm/doc.go | 35 - .../aws/aws-sdk-go/service/dlm/errors.go | 30 - .../aws/aws-sdk-go/service/dlm/service.go | 99 - .../aws/aws-sdk-go/service/docdb/api.go | 10980 -- .../aws/aws-sdk-go/service/docdb/doc.go | 28 - .../aws/aws-sdk-go/service/docdb/errors.go | 290 - .../aws/aws-sdk-go/service/docdb/service.go | 98 - .../aws/aws-sdk-go/service/docdb/waiters.go | 152 - .../aws/aws-sdk-go/service/ec2/api.go | 86622 ---------------- .../aws-sdk-go/service/ec2/customizations.go | 120 - .../aws/aws-sdk-go/service/ec2/doc.go | 43 - .../aws/aws-sdk-go/service/ec2/errors.go | 3 - .../aws/aws-sdk-go/service/ec2/service.go | 95 - .../aws/aws-sdk-go/service/ec2/waiters.go | 1626 - .../aws/aws-sdk-go/service/ecr/api.go | 5834 -- .../aws/aws-sdk-go/service/ecr/doc.go | 33 - .../aws/aws-sdk-go/service/ecr/errors.go | 155 - .../aws/aws-sdk-go/service/ecr/service.go | 100 - .../aws/aws-sdk-go/service/ecs/api.go | 13807 --- .../aws/aws-sdk-go/service/ecs/doc.go | 45 - .../aws/aws-sdk-go/service/ecs/errors.go | 151 - .../aws/aws-sdk-go/service/ecs/service.go | 97 - .../aws/aws-sdk-go/service/ecs/waiters.go | 224 - .../aws/aws-sdk-go/service/efs/api.go | 2952 - .../aws/aws-sdk-go/service/efs/doc.go | 32 - .../aws/aws-sdk-go/service/efs/errors.go | 152 - .../aws/aws-sdk-go/service/efs/service.go | 95 - .../aws/aws-sdk-go/service/eks/api.go | 1819 - .../aws/aws-sdk-go/service/eks/doc.go | 40 - .../aws/aws-sdk-go/service/eks/errors.go | 68 - .../aws/aws-sdk-go/service/eks/service.go | 99 - .../aws/aws-sdk-go/service/eks/waiters.go | 122 - .../aws/aws-sdk-go/service/elasticache/api.go | 13299 --- .../aws/aws-sdk-go/service/elasticache/doc.go | 38 - .../aws-sdk-go/service/elasticache/errors.go | 326 - .../aws-sdk-go/service/elasticache/service.go | 95 - .../aws-sdk-go/service/elasticache/waiters.go | 264 - .../service/elasticbeanstalk/api.go | 11767 --- .../service/elasticbeanstalk/doc.go | 44 - .../service/elasticbeanstalk/errors.go | 138 - .../service/elasticbeanstalk/service.go | 95 - .../service/elasticsearchservice/api.go | 6673 -- .../service/elasticsearchservice/doc.go | 31 - .../service/elasticsearchservice/errors.go | 62 - .../service/elasticsearchservice/service.go | 95 - .../service/elastictranscoder/api.go | 8062 -- .../service/elastictranscoder/doc.go | 26 - .../service/elastictranscoder/errors.go | 51 - .../service/elastictranscoder/service.go | 95 - .../service/elastictranscoder/waiters.go | 66 - .../aws/aws-sdk-go/service/elb/api.go | 6496 -- .../aws/aws-sdk-go/service/elb/doc.go | 50 - .../aws/aws-sdk-go/service/elb/errors.go | 145 - .../aws/aws-sdk-go/service/elb/service.go | 95 - .../aws/aws-sdk-go/service/elb/waiters.go | 158 - .../aws/aws-sdk-go/service/elbv2/api.go | 8704 -- .../aws/aws-sdk-go/service/elbv2/doc.go | 76 - .../aws/aws-sdk-go/service/elbv2/errors.go | 219 - .../aws/aws-sdk-go/service/elbv2/service.go | 95 - .../aws/aws-sdk-go/service/elbv2/waiters.go | 270 - .../aws/aws-sdk-go/service/emr/api.go | 10761 -- .../aws/aws-sdk-go/service/emr/doc.go | 31 - .../aws/aws-sdk-go/service/emr/errors.go | 25 - .../aws/aws-sdk-go/service/emr/service.go | 97 - .../aws/aws-sdk-go/service/emr/waiters.go | 183 - .../aws/aws-sdk-go/service/firehose/api.go | 6619 -- .../aws/aws-sdk-go/service/firehose/doc.go | 30 - .../aws/aws-sdk-go/service/firehose/errors.go | 46 - .../aws-sdk-go/service/firehose/service.go | 97 - .../aws/aws-sdk-go/service/fms/api.go | 2754 - .../aws/aws-sdk-go/service/fms/doc.go | 31 - .../aws/aws-sdk-go/service/fms/errors.go | 48 - .../aws/aws-sdk-go/service/fms/service.go | 97 - .../aws/aws-sdk-go/service/fsx/api.go | 3646 - .../aws/aws-sdk-go/service/fsx/doc.go | 29 - .../aws/aws-sdk-go/service/fsx/errors.go | 106 - .../aws/aws-sdk-go/service/fsx/service.go | 97 - .../aws/aws-sdk-go/service/gamelift/api.go | 19732 ---- .../aws/aws-sdk-go/service/gamelift/doc.go | 312 - .../aws/aws-sdk-go/service/gamelift/errors.go | 102 - .../aws-sdk-go/service/gamelift/service.go | 97 - .../aws/aws-sdk-go/service/glacier/api.go | 8572 -- .../service/glacier/customizations.go | 54 - .../aws/aws-sdk-go/service/glacier/doc.go | 55 - .../aws/aws-sdk-go/service/glacier/errors.go | 59 - .../aws/aws-sdk-go/service/glacier/service.go | 95 - .../aws-sdk-go/service/glacier/treehash.go | 79 - .../aws/aws-sdk-go/service/glacier/waiters.go | 112 - .../service/globalaccelerator/api.go | 3617 - .../service/globalaccelerator/doc.go | 94 - .../service/globalaccelerator/errors.go | 84 - .../service/globalaccelerator/service.go | 100 - .../aws/aws-sdk-go/service/glue/api.go | 22216 ---- .../aws/aws-sdk-go/service/glue/doc.go | 28 - .../aws/aws-sdk-go/service/glue/errors.go | 132 - .../aws/aws-sdk-go/service/glue/service.go | 97 - .../aws/aws-sdk-go/service/guardduty/api.go | 9437 -- .../aws/aws-sdk-go/service/guardduty/doc.go | 29 - .../aws-sdk-go/service/guardduty/errors.go | 18 - .../aws-sdk-go/service/guardduty/service.go | 99 - .../aws/aws-sdk-go/service/inspector/api.go | 10010 -- .../aws/aws-sdk-go/service/inspector/doc.go | 30 - .../aws-sdk-go/service/inspector/errors.go | 83 - .../aws-sdk-go/service/inspector/service.go | 97 - .../aws/aws-sdk-go/service/iot/api.go | 37268 ------- .../aws/aws-sdk-go/service/iot/doc.go | 36 - .../aws/aws-sdk-go/service/iot/errors.go | 176 - .../aws/aws-sdk-go/service/iot/service.go | 98 - .../aws/aws-sdk-go/service/kafka/api.go | 1736 - .../aws/aws-sdk-go/service/kafka/doc.go | 28 - .../aws/aws-sdk-go/service/kafka/errors.go | 54 - .../aws/aws-sdk-go/service/kafka/service.go | 99 - .../aws/aws-sdk-go/service/kinesis/api.go | 6849 -- .../service/kinesis/customizations.go | 22 - .../aws/aws-sdk-go/service/kinesis/doc.go | 29 - .../aws/aws-sdk-go/service/kinesis/errors.go | 101 - .../aws/aws-sdk-go/service/kinesis/service.go | 97 - .../aws/aws-sdk-go/service/kinesis/waiters.go | 102 - .../service/kinesisanalytics/api.go | 6751 -- .../service/kinesisanalytics/doc.go | 26 - .../service/kinesisanalytics/errors.go | 77 - .../service/kinesisanalytics/service.go | 97 - .../aws/aws-sdk-go/service/kms/api.go | 10216 -- .../aws/aws-sdk-go/service/kms/doc.go | 98 - .../aws/aws-sdk-go/service/kms/errors.go | 280 - .../aws/aws-sdk-go/service/kms/service.go | 97 - .../aws/aws-sdk-go/service/lambda/api.go | 9076 -- .../aws/aws-sdk-go/service/lambda/doc.go | 34 - .../aws/aws-sdk-go/service/lambda/errors.go | 174 - .../aws/aws-sdk-go/service/lambda/service.go | 95 - .../service/lexmodelbuildingservice/api.go | 10790 -- .../service/lexmodelbuildingservice/doc.go | 30 - .../service/lexmodelbuildingservice/errors.go | 61 - .../lexmodelbuildingservice/service.go | 99 - .../aws-sdk-go/service/licensemanager/api.go | 3443 - .../aws-sdk-go/service/licensemanager/doc.go | 35 - .../service/licensemanager/errors.go | 70 - .../service/licensemanager/service.go | 97 - .../aws/aws-sdk-go/service/lightsail/api.go | 24024 ----- .../aws/aws-sdk-go/service/lightsail/doc.go | 40 - .../aws-sdk-go/service/lightsail/errors.go | 55 - .../aws-sdk-go/service/lightsail/service.go | 97 - .../aws/aws-sdk-go/service/macie/api.go | 1609 - .../aws/aws-sdk-go/service/macie/doc.go | 33 - .../aws/aws-sdk-go/service/macie/errors.go | 32 - .../aws/aws-sdk-go/service/macie/service.go | 97 - .../aws-sdk-go/service/mediaconnect/api.go | 4571 - .../aws-sdk-go/service/mediaconnect/doc.go | 28 - .../aws-sdk-go/service/mediaconnect/errors.go | 78 - .../service/mediaconnect/service.go | 99 - .../aws-sdk-go/service/mediaconvert/api.go | 19194 ---- .../aws-sdk-go/service/mediaconvert/doc.go | 28 - .../aws-sdk-go/service/mediaconvert/errors.go | 30 - .../service/mediaconvert/service.go | 99 - .../aws/aws-sdk-go/service/medialive/api.go | 17266 --- .../aws/aws-sdk-go/service/medialive/doc.go | 28 - .../aws-sdk-go/service/medialive/errors.go | 42 - .../aws-sdk-go/service/medialive/service.go | 99 - .../aws-sdk-go/service/mediapackage/api.go | 3954 - .../aws-sdk-go/service/mediapackage/doc.go | 28 - .../aws-sdk-go/service/mediapackage/errors.go | 30 - .../service/mediapackage/service.go | 99 - .../aws/aws-sdk-go/service/mediastore/api.go | 2275 - .../aws/aws-sdk-go/service/mediastore/doc.go | 29 - .../aws-sdk-go/service/mediastore/errors.go | 43 - .../aws-sdk-go/service/mediastore/service.go | 100 - .../aws-sdk-go/service/mediastoredata/api.go | 1112 - .../aws-sdk-go/service/mediastoredata/doc.go | 30 - .../service/mediastoredata/errors.go | 30 - .../service/mediastoredata/service.go | 98 - .../aws/aws-sdk-go/service/mq/api.go | 4556 - .../aws/aws-sdk-go/service/mq/doc.go | 31 - .../aws/aws-sdk-go/service/mq/errors.go | 42 - .../aws/aws-sdk-go/service/mq/service.go | 99 - .../aws/aws-sdk-go/service/neptune/api.go | 16692 --- .../aws/aws-sdk-go/service/neptune/doc.go | 48 - .../aws/aws-sdk-go/service/neptune/errors.go | 361 - .../aws/aws-sdk-go/service/neptune/service.go | 98 - .../aws/aws-sdk-go/service/neptune/waiters.go | 152 - .../aws/aws-sdk-go/service/opsworks/api.go | 18032 ---- .../aws/aws-sdk-go/service/opsworks/doc.go | 102 - .../aws/aws-sdk-go/service/opsworks/errors.go | 18 - .../aws-sdk-go/service/opsworks/service.go | 97 - .../aws-sdk-go/service/opsworks/waiters.go | 456 - .../aws-sdk-go/service/organizations/api.go | 14338 --- .../aws-sdk-go/service/organizations/doc.go | 137 - .../service/organizations/errors.go | 470 - .../service/organizations/service.go | 97 - .../aws/aws-sdk-go/service/pinpoint/api.go | 21039 ---- .../aws/aws-sdk-go/service/pinpoint/doc.go | 26 - .../aws/aws-sdk-go/service/pinpoint/errors.go | 42 - .../aws-sdk-go/service/pinpoint/service.go | 99 - .../aws/aws-sdk-go/service/pricing/api.go | 955 - .../aws/aws-sdk-go/service/pricing/doc.go | 51 - .../aws/aws-sdk-go/service/pricing/errors.go | 37 - .../aws/aws-sdk-go/service/pricing/service.go | 100 - .../aws/aws-sdk-go/service/ram/api.go | 4029 - .../aws/aws-sdk-go/service/ram/doc.go | 44 - .../aws/aws-sdk-go/service/ram/errors.go | 128 - .../aws/aws-sdk-go/service/ram/service.go | 96 - .../aws/aws-sdk-go/service/rds/api.go | 34232 ------ .../aws-sdk-go/service/rds/customizations.go | 125 - .../aws/aws-sdk-go/service/rds/doc.go | 69 - .../aws/aws-sdk-go/service/rds/doc_custom.go | 25 - .../aws/aws-sdk-go/service/rds/errors.go | 595 - .../aws/aws-sdk-go/service/rds/service.go | 95 - .../aws/aws-sdk-go/service/rds/waiters.go | 294 - .../aws/aws-sdk-go/service/redshift/api.go | 21531 ---- .../aws/aws-sdk-go/service/redshift/doc.go | 51 - .../aws/aws-sdk-go/service/redshift/errors.go | 668 - .../aws-sdk-go/service/redshift/service.go | 95 - .../aws-sdk-go/service/redshift/waiters.go | 229 - .../aws-sdk-go/service/resourcegroups/api.go | 2839 - .../aws-sdk-go/service/resourcegroups/doc.go | 60 - .../service/resourcegroups/errors.go | 50 - .../service/resourcegroups/service.go | 98 - .../aws/aws-sdk-go/service/route53/api.go | 15242 --- .../service/route53/customizations.go | 42 - .../aws/aws-sdk-go/service/route53/doc.go | 26 - .../aws/aws-sdk-go/service/route53/errors.go | 435 - .../aws/aws-sdk-go/service/route53/service.go | 95 - .../service/route53/unmarshal_error.go | 77 - .../aws/aws-sdk-go/service/route53/waiters.go | 56 - .../aws-sdk-go/service/route53resolver/api.go | 5202 - .../aws-sdk-go/service/route53resolver/doc.go | 62 - .../service/route53resolver/errors.go | 84 - .../service/route53resolver/service.go | 97 - .../aws/aws-sdk-go/service/s3control/api.go | 569 - .../service/s3control/customizations.go | 14 - .../aws/aws-sdk-go/service/s3control/doc.go | 28 - .../aws-sdk-go/service/s3control/errors.go | 13 - .../aws-sdk-go/service/s3control/service.go | 100 - .../aws/aws-sdk-go/service/sagemaker/api.go | 26320 ----- .../aws/aws-sdk-go/service/sagemaker/doc.go | 28 - .../aws-sdk-go/service/sagemaker/errors.go | 25 - .../aws-sdk-go/service/sagemaker/service.go | 100 - .../aws-sdk-go/service/sagemaker/waiters.go | 392 - .../aws-sdk-go/service/secretsmanager/api.go | 5409 - .../aws-sdk-go/service/secretsmanager/doc.go | 87 - .../service/secretsmanager/errors.go | 87 - .../service/secretsmanager/service.go | 100 - .../aws/aws-sdk-go/service/securityhub/api.go | 7805 -- .../aws/aws-sdk-go/service/securityhub/doc.go | 33 - .../aws-sdk-go/service/securityhub/errors.go | 32 - .../aws-sdk-go/service/securityhub/service.go | 99 - .../serverlessapplicationrepository/api.go | 3900 - .../serverlessapplicationrepository/doc.go | 58 - .../serverlessapplicationrepository/errors.go | 45 - .../service.go | 99 - .../aws-sdk-go/service/servicecatalog/api.go | 18963 ---- .../aws-sdk-go/service/servicecatalog/doc.go | 31 - .../service/servicecatalog/errors.go | 61 - .../service/servicecatalog/service.go | 97 - .../service/servicediscovery/api.go | 6166 -- .../service/servicediscovery/doc.go | 34 - .../service/servicediscovery/errors.go | 79 - .../service/servicediscovery/service.go | 97 - .../aws/aws-sdk-go/service/ses/api.go | 15146 --- .../aws/aws-sdk-go/service/ses/doc.go | 35 - .../aws/aws-sdk-go/service/ses/errors.go | 244 - .../aws/aws-sdk-go/service/ses/service.go | 98 - .../aws/aws-sdk-go/service/ses/waiters.go | 56 - .../aws/aws-sdk-go/service/sfn/api.go | 6034 -- .../aws/aws-sdk-go/service/sfn/doc.go | 45 - .../aws/aws-sdk-go/service/sfn/errors.go | 139 - .../aws/aws-sdk-go/service/sfn/service.go | 97 - .../aws/aws-sdk-go/service/simpledb/api.go | 2316 - .../service/simpledb/customizations.go | 11 - .../aws/aws-sdk-go/service/simpledb/doc.go | 40 - .../aws/aws-sdk-go/service/simpledb/errors.go | 109 - .../aws-sdk-go/service/simpledb/service.go | 97 - .../service/simpledb/unmarshall_error.go | 53 - .../aws/aws-sdk-go/service/sns/api.go | 5897 -- .../aws/aws-sdk-go/service/sns/doc.go | 40 - .../aws/aws-sdk-go/service/sns/errors.go | 126 - .../aws/aws-sdk-go/service/sns/service.go | 95 - .../aws/aws-sdk-go/service/sqs/api.go | 4914 - .../aws/aws-sdk-go/service/sqs/checksums.go | 114 - .../aws-sdk-go/service/sqs/customizations.go | 9 - .../aws/aws-sdk-go/service/sqs/doc.go | 67 - .../aws/aws-sdk-go/service/sqs/errors.go | 110 - .../aws/aws-sdk-go/service/sqs/service.go | 95 - .../aws/aws-sdk-go/service/ssm/api.go | 35047 ------- .../aws/aws-sdk-go/service/ssm/doc.go | 45 - .../aws/aws-sdk-go/service/ssm/errors.go | 685 - .../aws/aws-sdk-go/service/ssm/service.go | 97 - .../aws-sdk-go/service/storagegateway/api.go | 16244 --- .../aws-sdk-go/service/storagegateway/doc.go | 79 - .../service/storagegateway/errors.go | 27 - .../service/storagegateway/service.go | 97 - .../aws/aws-sdk-go/service/swf/api.go | 15433 --- .../aws/aws-sdk-go/service/swf/doc.go | 38 - .../aws/aws-sdk-go/service/swf/errors.go | 80 - .../aws/aws-sdk-go/service/swf/service.go | 97 - .../aws/aws-sdk-go/service/transfer/api.go | 3888 - .../aws/aws-sdk-go/service/transfer/doc.go | 26 - .../aws/aws-sdk-go/service/transfer/errors.go | 44 - .../aws-sdk-go/service/transfer/service.go | 100 - .../aws/aws-sdk-go/service/waf/api.go | 20353 ---- .../aws/aws-sdk-go/service/waf/doc.go | 34 - .../aws/aws-sdk-go/service/waf/errors.go | 200 - .../aws/aws-sdk-go/service/waf/service.go | 97 - .../aws/aws-sdk-go/service/wafregional/api.go | 10685 -- .../aws/aws-sdk-go/service/wafregional/doc.go | 36 - .../aws-sdk-go/service/wafregional/errors.go | 207 - .../aws-sdk-go/service/wafregional/service.go | 97 - .../aws/aws-sdk-go/service/worklink/api.go | 3904 - .../aws/aws-sdk-go/service/worklink/doc.go | 35 - .../aws/aws-sdk-go/service/worklink/errors.go | 42 - .../aws-sdk-go/service/worklink/service.go | 99 - .../aws/aws-sdk-go/service/workspaces/api.go | 6938 -- .../aws/aws-sdk-go/service/workspaces/doc.go | 29 - .../aws-sdk-go/service/workspaces/errors.go | 80 - .../aws-sdk-go/service/workspaces/service.go | 97 - vendor/github.com/beevik/etree/.travis.yml | 19 - vendor/github.com/beevik/etree/CONTRIBUTORS | 9 - vendor/github.com/beevik/etree/LICENSE | 24 - vendor/github.com/beevik/etree/README.md | 203 - .../github.com/beevik/etree/RELEASE_NOTES.md | 27 - vendor/github.com/beevik/etree/etree.go | 1034 - vendor/github.com/beevik/etree/helpers.go | 188 - vendor/github.com/beevik/etree/path.go | 533 - .../gogo/protobuf/sortkeys/sortkeys.go | 101 - vendor/github.com/google/gofuzz/.travis.yml | 13 - .../github.com/google/gofuzz/CONTRIBUTING.md | 67 - vendor/github.com/google/gofuzz/LICENSE | 202 - vendor/github.com/google/gofuzz/README.md | 71 - vendor/github.com/google/gofuzz/doc.go | 18 - vendor/github.com/google/gofuzz/fuzz.go | 487 - .../hashicorp/aws-sdk-go-base/.golangci.yml | 19 + .../hashicorp/aws-sdk-go-base/.travis.yml | 21 + .../hashicorp/aws-sdk-go-base/CHANGELOG.md | 3 + .../hashicorp/aws-sdk-go-base/GNUmakefile | 13 + .../aws-sdk-go-base}/LICENSE | 0 .../hashicorp/aws-sdk-go-base/README.md | 27 + .../aws-sdk-go-base/awsauth.go} | 40 +- .../hashicorp/aws-sdk-go-base/awserr.go | 37 + .../hashicorp/aws-sdk-go-base/config.go | 29 + .../hashicorp/aws-sdk-go-base/go.mod | 10 + .../hashicorp/aws-sdk-go-base/go.sum | 21 + .../hashicorp/aws-sdk-go-base/logger.go | 18 + .../hashicorp/aws-sdk-go-base/mock.go | 76 + .../hashicorp/aws-sdk-go-base/session.go | 203 + .../jen20/awspolicyequivalence/.gitignore | 3 - .../jen20/awspolicyequivalence/.travis.yml | 10 - .../jen20/awspolicyequivalence/README.md | 7 - .../aws_policy_equivalence.go | 465 - .../jen20/awspolicyequivalence/go.mod | 3 - .../jen20/awspolicyequivalence/go.sum | 2 - .../aws-iam-authenticator/LICENSE | 201 - .../aws-iam-authenticator/pkg/arn/arn.go | 69 - .../aws-iam-authenticator/pkg/token/token.go | 432 - .../terraform-provider-aws/LICENSE | 373 - .../aws/autoscaling_tags.go | 288 - .../terraform-provider-aws/aws/awserr.go | 73 - ...nt_distribution_configuration_structure.go | 1290 - .../terraform-provider-aws/aws/config.go | 834 - .../aws/data_source_aws_acm_certificate.go | 168 - ...source_aws_acmpca_certificate_authority.go | 176 - .../aws/data_source_aws_ami.go | 442 - .../aws/data_source_aws_ami_ids.go | 150 - .../data_source_aws_api_gateway_api_key.go | 45 - .../data_source_aws_api_gateway_resource.go | 67 - .../data_source_aws_api_gateway_rest_api.go | 73 - .../data_source_aws_api_gateway_vpc_link.go | 62 - .../aws/data_source_aws_arn.go | 59 - .../aws/data_source_aws_autoscaling_group.go | 181 - .../aws/data_source_aws_autoscaling_groups.go | 133 - .../aws/data_source_aws_availability_zone.go | 97 - .../aws/data_source_aws_availability_zones.go | 86 - ...ta_source_aws_batch_compute_environment.go | 93 - .../aws/data_source_aws_batch_job_queue.go | 110 - ...data_source_aws_billing_service_account.go | 35 - .../aws/data_source_aws_caller_identity.go | 53 - .../aws/data_source_aws_canonical_user_id.go | 43 - .../data_source_aws_cloudformation_export.go | 58 - .../data_source_aws_cloudformation_stack.go | 123 - .../aws/data_source_aws_cloudhsm2_cluster.go | 131 - ...a_source_aws_cloudtrail_service_account.go | 73 - .../data_source_aws_cloudwatch_log_group.go | 47 - .../data_source_aws_codecommit_repository.go | 79 - .../aws/data_source_aws_cognito_user_pools.go | 96 - .../aws/data_source_aws_common_schema.go | 45 - .../data_source_aws_db_cluster_snapshot.go | 203 - .../data_source_aws_db_event_categories.go | 66 - .../aws/data_source_aws_db_instance.go | 311 - .../aws/data_source_aws_db_snapshot.go | 229 - .../aws/data_source_aws_dx_gateway.go | 66 - .../aws/data_source_aws_dynamodb_table.go | 226 - .../aws/data_source_aws_ebs_snapshot.go | 155 - .../aws/data_source_aws_ebs_snapshot_ids.go | 83 - .../aws/data_source_aws_ebs_volume.go | 149 - .../data_source_aws_ec2_transit_gateway.go | 130 - ...rce_aws_ec2_transit_gateway_route_table.go | 86 - ..._aws_ec2_transit_gateway_vpc_attachment.go | 109 - .../aws/data_source_aws_ecr_repository.go | 71 - .../aws/data_source_aws_ecs_cluster.go | 81 - ...ata_source_aws_ecs_container_definition.go | 110 - .../aws/data_source_aws_ecs_service.go | 89 - .../data_source_aws_ecs_task_definition.go | 74 - .../aws/data_source_aws_efs_file_system.go | 146 - .../aws/data_source_aws_efs_mount_target.go | 109 - .../aws/data_source_aws_eip.go | 121 - .../aws/data_source_aws_eks_cluster.go | 126 - .../aws/data_source_aws_eks_cluster_auth.go | 48 - ...ource_aws_elastic_beanstalk_application.go | 87 - ...ource_aws_elastic_beanstalk_hosted_zone.go | 56 - ...ce_aws_elastic_beanstalk_solution_stack.go | 96 - .../data_source_aws_elasticache_cluster.go | 241 - ...ource_aws_elasticache_replication_group.go | 122 - .../aws/data_source_aws_elb.go | 212 - .../aws/data_source_aws_elb_hosted_zone_id.go | 57 - .../data_source_aws_elb_service_account.go | 72 - .../aws/data_source_aws_glue_script.go | 184 - .../aws/data_source_aws_iam_account_alias.go | 48 - .../aws/data_source_aws_iam_group.go | 63 - .../data_source_aws_iam_instance_profile.go | 82 - .../aws/data_source_aws_iam_policy.go | 40 - .../data_source_aws_iam_policy_document.go | 310 - .../aws/data_source_aws_iam_role.go | 127 - .../data_source_aws_iam_server_certificate.go | 161 - .../aws/data_source_aws_iam_user.go | 65 - ...ata_source_aws_inspector_rules_packages.go | 56 - .../aws/data_source_aws_instance.go | 441 - .../aws/data_source_aws_instances.go | 129 - .../aws/data_source_aws_internet_gateway.go | 102 - .../aws/data_source_aws_iot_endpoint.go | 52 - .../aws/data_source_aws_ip_ranges.go | 181 - .../aws/data_source_aws_kinesis_stream.go | 95 - .../aws/data_source_aws_kms_alias.go | 89 - .../aws/data_source_aws_kms_ciphertext.go | 65 - .../aws/data_source_aws_kms_key.go | 111 - .../aws/data_source_aws_kms_secret.go | 100 - .../aws/data_source_aws_kms_secrets.go | 108 - .../aws/data_source_aws_lambda_function.go | 162 - .../aws/data_source_aws_lambda_invocation.go | 95 - .../data_source_aws_launch_configuration.go | 246 - .../aws/data_source_aws_launch_template.go | 461 - .../aws/data_source_aws_lb.go | 150 - .../aws/data_source_aws_lb_listener.go | 252 - .../aws/data_source_aws_lb_target_group.go | 159 - .../aws/data_source_aws_mq_broker.go | 209 - .../aws/data_source_aws_nat_gateway.go | 138 - .../aws/data_source_aws_network_acls.go | 92 - .../aws/data_source_aws_network_interface.go | 185 - .../aws/data_source_aws_network_interfaces.go | 79 - .../aws/data_source_aws_partition.go | 33 - .../aws/data_source_aws_prefix_list.go | 70 - .../aws/data_source_aws_pricing_product.go | 92 - .../aws/data_source_aws_rds_cluster.go | 267 - .../aws/data_source_aws_redshift_cluster.go | 278 - ...ata_source_aws_redshift_service_account.go | 67 - .../aws/data_source_aws_region.go | 118 - .../aws/data_source_aws_route.go | 192 - .../data_source_aws_route53_delegation_set.go | 58 - .../aws/data_source_aws_route53_zone.go | 212 - .../aws/data_source_aws_route_table.go | 246 - .../aws/data_source_aws_route_tables.go | 80 - .../aws/data_source_aws_s3_bucket.go | 120 - .../aws/data_source_aws_s3_bucket_object.go | 239 - .../data_source_aws_secretsmanager_secret.go | 139 - ...ource_aws_secretsmanager_secret_version.go | 98 - .../aws/data_source_aws_security_group.go | 105 - .../aws/data_source_aws_security_groups.go | 90 - .../aws/data_source_aws_sns.go | 72 - .../aws/data_source_aws_sqs_queue.go | 57 - .../aws/data_source_aws_ssm_document.go | 90 - .../aws/data_source_aws_ssm_parameter.go | 77 - ...ta_source_aws_storagegateway_local_disk.go | 85 - .../aws/data_source_aws_subnet.go | 180 - .../aws/data_source_aws_subnet_ids.go | 83 - .../aws/data_source_aws_vpc.go | 228 - .../aws/data_source_aws_vpc_dhcp_options.go | 131 - .../aws/data_source_aws_vpc_endpoint.go | 139 - .../data_source_aws_vpc_endpoint_service.go | 126 - .../data_source_aws_vpc_peering_connection.go | 155 - .../aws/data_source_aws_vpcs.go | 77 - .../aws/data_source_aws_vpn_gateway.go | 118 - .../aws/data_source_aws_workspaces_bundle.go | 126 - .../terraform-provider-aws/aws/datasync.go | 144 - .../aws/datasync_tags.go | 63 - .../aws/diff_suppress_funcs.go | 104 - .../terraform-provider-aws/aws/dx_vif.go | 132 - .../terraform-provider-aws/aws/ec2_filters.go | 163 - .../aws/ec2_transit_gateway.go | 592 - .../aws/ecs_task_definition_equivalency.go | 105 - .../aws/hosted_zones.go | 37 - .../aws/iam_policy_model.go | 207 - .../aws/import_aws_cloudfront_distribution.go | 32 - .../aws/import_aws_db_event_subscription.go | 17 - .../aws/import_aws_dx_gateway.go | 48 - .../aws/import_aws_network_acl.go | 95 - .../aws/import_aws_route_table.go | 107 - .../aws/import_aws_s3_bucket.go | 40 - .../aws/import_aws_security_group.go | 185 - .../aws/network_acl_entry.go | 249 - .../aws/opsworks_layers.go | 645 - .../terraform-provider-aws/aws/provider.go | 1222 - .../aws/resource_aws_acm_certificate.go | 360 - ...resource_aws_acm_certificate_validation.go | 164 - ...source_aws_acmpca_certificate_authority.go | 713 - .../aws/resource_aws_ami.go | 536 - .../aws/resource_aws_ami_copy.go | 228 - .../aws/resource_aws_ami_from_instance.go | 210 - .../aws/resource_aws_ami_launch_permission.go | 114 - .../aws/resource_aws_api_gateway_account.go | 126 - .../aws/resource_aws_api_gateway_api_key.go | 205 - .../resource_aws_api_gateway_authorizer.go | 288 - ...ource_aws_api_gateway_base_path_mapping.go | 166 - ...urce_aws_api_gateway_client_certificate.go | 125 - .../resource_aws_api_gateway_deployment.go | 222 - ...urce_aws_api_gateway_documentation_part.go | 226 - ...e_aws_api_gateway_documentation_version.go | 137 - .../resource_aws_api_gateway_domain_name.go | 312 - ...source_aws_api_gateway_gateway_response.go | 160 - .../resource_aws_api_gateway_integration.go | 533 - ...ce_aws_api_gateway_integration_response.go | 224 - .../aws/resource_aws_api_gateway_method.go | 370 - ...esource_aws_api_gateway_method_response.go | 251 - ...esource_aws_api_gateway_method_settings.go | 248 - .../aws/resource_aws_api_gateway_model.go | 197 - ...ource_aws_api_gateway_request_validator.go | 170 - .../aws/resource_aws_api_gateway_resource.go | 164 - .../aws/resource_aws_api_gateway_rest_api.go | 417 - .../aws/resource_aws_api_gateway_stage.go | 485 - .../resource_aws_api_gateway_usage_plan.go | 505 - ...resource_aws_api_gateway_usage_plan_key.go | 115 - .../aws/resource_aws_api_gateway_vpc_link.go | 205 - ...source_aws_app_cookie_stickiness_policy.go | 221 - .../aws/resource_aws_appautoscaling_policy.go | 764 - ...rce_aws_appautoscaling_scheduled_action.go | 193 - .../aws/resource_aws_appautoscaling_target.go | 192 - .../aws/resource_aws_appmesh_mesh.go | 111 - .../aws/resource_aws_appmesh_route.go | 235 - .../aws/resource_aws_appmesh_virtual_node.go | 237 - .../resource_aws_appmesh_virtual_router.go | 160 - .../aws/resource_aws_appsync_api_key.go | 184 - .../aws/resource_aws_appsync_datasource.go | 438 - .../aws/resource_aws_appsync_graphql_api.go | 362 - .../aws/resource_aws_athena_database.go | 265 - .../aws/resource_aws_athena_named_query.go | 99 - .../resource_aws_autoscaling_attachment.go | 156 - .../aws/resource_aws_autoscaling_group.go | 1447 - .../resource_aws_autoscaling_group_waiting.go | 167 - ...resource_aws_autoscaling_lifecycle_hook.go | 194 - .../resource_aws_autoscaling_notification.go | 208 - .../aws/resource_aws_autoscaling_policy.go | 531 - .../aws/resource_aws_autoscaling_schedule.go | 219 - .../aws/resource_aws_backup_vault.go | 121 - .../resource_aws_batch_compute_environment.go | 442 - .../aws/resource_aws_batch_job_definition.go | 267 - .../aws/resource_aws_batch_job_queue.go | 250 - .../aws/resource_aws_budgets_budget.go | 402 - .../resource_aws_cloud9_environment_ec2.go | 228 - .../aws/resource_aws_cloudformation_stack.go | 650 - .../resource_aws_cloudfront_distribution.go | 908 - ...e_aws_cloudfront_origin_access_identity.go | 140 - .../aws/resource_aws_cloudfront_public_key.go | 170 - .../aws/resource_aws_cloudhsm2_cluster.go | 363 - .../aws/resource_aws_cloudhsm2_hsm.go | 261 - .../aws/resource_aws_cloudtrail.go | 538 - .../aws/resource_aws_cloudwatch_dashboard.go | 120 - ...esource_aws_cloudwatch_event_permission.go | 320 - .../aws/resource_aws_cloudwatch_event_rule.go | 303 - .../resource_aws_cloudwatch_event_target.go | 653 - ...resource_aws_cloudwatch_log_destination.go | 150 - ...e_aws_cloudwatch_log_destination_policy.go | 87 - .../aws/resource_aws_cloudwatch_log_group.go | 266 - ...source_aws_cloudwatch_log_metric_filter.go | 191 - ...urce_aws_cloudwatch_log_resource_policy.go | 118 - .../aws/resource_aws_cloudwatch_log_stream.go | 139 - ..._aws_cloudwatch_log_subscription_filter.go | 196 - .../resource_aws_cloudwatch_metric_alarm.go | 359 - ...rce_aws_cloudwatch_metric_alarm_migrate.go | 33 - .../aws/resource_aws_codebuild_project.go | 1199 - .../aws/resource_aws_codebuild_webhook.go | 134 - .../aws/resource_aws_codecommit_repository.go | 195 - .../aws/resource_aws_codecommit_trigger.go | 159 - .../aws/resource_aws_codedeploy_app.go | 175 - ...source_aws_codedeploy_deployment_config.go | 323 - ...esource_aws_codedeploy_deployment_group.go | 1466 - .../aws/resource_aws_codepipeline.go | 479 - .../aws/resource_aws_codepipeline_webhook.go | 285 - .../aws/resource_aws_cognito_identity_pool.go | 244 - ..._cognito_identity_pool_roles_attachment.go | 262 - .../resource_aws_cognito_identity_provider.go | 209 - .../resource_aws_cognito_resource_server.go | 213 - .../aws/resource_aws_cognito_user_group.go | 175 - .../aws/resource_aws_cognito_user_pool.go | 886 - .../resource_aws_cognito_user_pool_client.go | 356 - .../resource_aws_cognito_user_pool_domain.go | 194 - ...urce_aws_config_aggregate_authorization.go | 141 - .../aws/resource_aws_config_config_rule.go | 310 - ...rce_aws_config_configuration_aggregator.go | 192 - ...ource_aws_config_configuration_recorder.go | 149 - ...ws_config_configuration_recorder_status.go | 121 - .../resource_aws_config_delivery_channel.go | 183 - .../aws/resource_aws_customer_gateway.go | 278 - .../aws/resource_aws_datasync_agent.go | 270 - .../aws/resource_aws_datasync_location_efs.go | 215 - .../aws/resource_aws_datasync_location_nfs.go | 208 - .../aws/resource_aws_datasync_location_s3.go | 208 - .../aws/resource_aws_datasync_task.go | 339 - .../aws/resource_aws_dax_cluster.go | 587 - .../aws/resource_aws_dax_parameter_group.go | 160 - .../aws/resource_aws_dax_subnet_group.go | 132 - .../aws/resource_aws_db_cluster_snapshot.go | 214 - .../aws/resource_aws_db_event_subscription.go | 398 - .../aws/resource_aws_db_instance.go | 1661 - .../aws/resource_aws_db_option_group.go | 363 - .../aws/resource_aws_db_parameter_group.go | 340 - .../aws/resource_aws_db_security_group.go | 413 - .../aws/resource_aws_db_snapshot.go | 261 - .../aws/resource_aws_db_subnet_group.go | 243 - .../aws/resource_aws_default_network_acl.go | 299 - .../aws/resource_aws_default_route_table.go | 245 - .../resource_aws_default_security_group.go | 147 - .../aws/resource_aws_default_subnet.go | 85 - .../aws/resource_aws_default_vpc.go | 65 - .../resource_aws_default_vpc_dhcp_options.go | 85 - .../aws/resource_aws_devicefarm_project.go | 112 - ...directory_service_conditional_forwarder.go | 164 - ...esource_aws_directory_service_directory.go | 524 - .../aws/resource_aws_dlm_lifecycle_policy.go | 367 - .../aws/resource_aws_dms_certificate.go | 134 - .../aws/resource_aws_dms_endpoint.go | 610 - .../resource_aws_dms_replication_instance.go | 416 - ...source_aws_dms_replication_subnet_group.go | 183 - .../aws/resource_aws_dms_replication_task.go | 327 - .../aws/resource_aws_docdb_cluster.go | 799 - ...ource_aws_docdb_cluster_parameter_group.go | 282 - .../resource_aws_docdb_cluster_snapshot.go | 206 - .../aws/resource_aws_docdb_subnet_group.go | 219 - .../aws/resource_aws_dx_bgp_peer.go | 210 - .../aws/resource_aws_dx_connection.go | 189 - .../resource_aws_dx_connection_association.go | 94 - .../aws/resource_aws_dx_gateway.go | 160 - .../resource_aws_dx_gateway_association.go | 164 - ...aws_dx_hosted_private_virtual_interface.go | 209 - ...sted_private_virtual_interface_accepter.go | 166 - ..._aws_dx_hosted_public_virtual_interface.go | 215 - ...osted_public_virtual_interface_accepter.go | 141 - .../aws/resource_aws_dx_lag.go | 255 - ...source_aws_dx_private_virtual_interface.go | 237 - ...esource_aws_dx_public_virtual_interface.go | 221 - .../aws/resource_aws_dynamodb_global_table.go | 313 - .../aws/resource_aws_dynamodb_table.go | 950 - .../aws/resource_aws_dynamodb_table_item.go | 295 - .../resource_aws_dynamodb_table_migrate.go | 70 - .../aws/resource_aws_ebs_snapshot.go | 182 - .../aws/resource_aws_ebs_snapshot_copy.go | 176 - .../aws/resource_aws_ebs_volume.go | 318 - .../resource_aws_ec2_capacity_reservation.go | 260 - .../resource_aws_ec2_client_vpn_endpoint.go | 337 - ..._aws_ec2_client_vpn_network_association.go | 175 - .../aws/resource_aws_ec2_fleet.go | 834 - .../aws/resource_aws_ec2_transit_gateway.go | 249 - .../resource_aws_ec2_transit_gateway_route.go | 161 - ...rce_aws_ec2_transit_gateway_route_table.go | 142 - ...transit_gateway_route_table_association.go | 141 - ...transit_gateway_route_table_propagation.go | 127 - ..._aws_ec2_transit_gateway_vpc_attachment.go | 294 - .../aws/resource_aws_ecr_lifecycle_policy.go | 104 - .../aws/resource_aws_ecr_repository.go | 172 - .../aws/resource_aws_ecr_repository_policy.go | 167 - .../aws/resource_aws_ecs_cluster.go | 250 - .../aws/resource_aws_ecs_service.go | 1089 - .../aws/resource_aws_ecs_task_definition.go | 479 - ...esource_aws_ecs_task_definition_migrate.go | 44 - .../aws/resource_aws_efs_file_system.go | 394 - .../aws/resource_aws_efs_mount_target.go | 312 - ...source_aws_egress_only_internet_gateway.go | 100 - .../aws/resource_aws_eip.go | 419 - .../aws/resource_aws_eip_association.go | 238 - .../aws/resource_aws_eks_cluster.go | 416 - ...ource_aws_elastic_beanstalk_application.go | 280 - ...s_elastic_beanstalk_application_version.go | 200 - ...lastic_beanstalk_configuration_template.go | 244 - ...ource_aws_elastic_beanstalk_environment.go | 1013 - ...s_elastic_beanstalk_environment_migrate.go | 35 - ...esource_aws_elastic_transcoder_pipeline.go | 491 - .../resource_aws_elastic_transcoder_preset.go | 643 - .../aws/resource_aws_elasticache_cluster.go | 828 - ...esource_aws_elasticache_parameter_group.go | 347 - ...ource_aws_elasticache_replication_group.go | 929 - ...resource_aws_elasticache_security_group.go | 153 - .../resource_aws_elasticache_subnet_group.go | 176 - .../aws/resource_aws_elasticsearch_domain.go | 901 - ...esource_aws_elasticsearch_domain_policy.go | 122 - .../aws/resource_aws_elb.go | 1091 - .../aws/resource_aws_elb_attachment.go | 121 - .../aws/resource_aws_emr_cluster.go | 1720 - .../aws/resource_aws_emr_instance_group.go | 311 - ...resource_aws_emr_security_configuration.go | 117 - .../aws/resource_aws_flow_log.go | 210 - .../aws/resource_aws_gamelift_alias.go | 177 - .../aws/resource_aws_gamelift_build.go | 186 - .../aws/resource_aws_gamelift_fleet.go | 589 - ...esource_aws_gamelift_game_session_queue.go | 218 - .../aws/resource_aws_glacier_vault.go | 417 - .../aws/resource_aws_glacier_vault_lock.go | 188 - ...ource_aws_globalaccelerator_accelerator.go | 362 - .../aws/resource_aws_glue_catalog_database.go | 215 - .../aws/resource_aws_glue_catalog_table.go | 667 - .../aws/resource_aws_glue_classifier.go | 348 - .../aws/resource_aws_glue_connection.go | 283 - .../aws/resource_aws_glue_crawler.go | 531 - .../aws/resource_aws_glue_job.go | 349 - ...esource_aws_glue_security_configuration.go | 342 - .../aws/resource_aws_glue_trigger.go | 461 - .../aws/resource_aws_guardduty_detector.go | 114 - .../aws/resource_aws_guardduty_ipset.go | 218 - .../aws/resource_aws_guardduty_member.go | 274 - .../resource_aws_guardduty_threatintelset.go | 219 - .../aws/resource_aws_iam_access_key.go | 183 - .../aws/resource_aws_iam_account_alias.go | 92 - ...esource_aws_iam_account_password_policy.go | 167 - .../aws/resource_aws_iam_group.go | 141 - .../aws/resource_aws_iam_group_membership.go | 166 - .../aws/resource_aws_iam_group_policy.go | 139 - ...esource_aws_iam_group_policy_attachment.go | 135 - .../aws/resource_aws_iam_instance_profile.go | 347 - ...esource_aws_iam_openid_connect_provider.go | 141 - .../aws/resource_aws_iam_policy.go | 329 - .../aws/resource_aws_iam_policy_attachment.go | 368 - .../aws/resource_aws_iam_role.go | 471 - .../aws/resource_aws_iam_role_policy.go | 157 - ...resource_aws_iam_role_policy_attachment.go | 140 - .../aws/resource_aws_iam_saml_provider.go | 130 - .../resource_aws_iam_server_certificate.go | 243 - .../resource_aws_iam_service_linked_role.go | 262 - .../aws/resource_aws_iam_user.go | 412 - .../resource_aws_iam_user_group_membership.go | 164 - .../resource_aws_iam_user_login_profile.go | 172 - .../aws/resource_aws_iam_user_policy.go | 161 - ...resource_aws_iam_user_policy_attachment.go | 137 - .../aws/resource_aws_iam_user_ssh_key.go | 191 - ...esource_aws_inspector_assessment_target.go | 150 - ...ource_aws_inspector_assessment_template.go | 121 - .../resource_aws_inspector_resource_group.go | 73 - .../aws/resource_aws_instance.go | 2016 - .../aws/resource_aws_instance_migrate.go | 111 - .../aws/resource_aws_internet_gateway.go | 390 - .../aws/resource_aws_iot_certificate.go | 119 - .../aws/resource_aws_iot_policy.go | 131 - .../aws/resource_aws_iot_policy_attachment.go | 137 - .../aws/resource_aws_iot_thing.go | 162 - ...urce_aws_iot_thing_principal_attachment.go | 109 - .../aws/resource_aws_iot_thing_type.go | 202 - .../aws/resource_aws_iot_topic_rule.go | 612 - .../aws/resource_aws_key_pair.go | 127 - .../aws/resource_aws_key_pair_migrate.go | 36 - ...ource_aws_kinesis_analytics_application.go | 1575 - ...ce_aws_kinesis_firehose_delivery_stream.go | 2337 - ...inesis_firehose_delivery_stream_migrate.go | 59 - .../aws/resource_aws_kinesis_stream.go | 530 - .../aws/resource_aws_kms_alias.go | 236 - .../aws/resource_aws_kms_grant.go | 550 - .../aws/resource_aws_kms_key.go | 477 - .../aws/resource_aws_lambda_alias.go | 188 - ...esource_aws_lambda_event_source_mapping.go | 293 - .../aws/resource_aws_lambda_function.go | 919 - .../aws/resource_aws_lambda_layer_version.go | 261 - .../aws/resource_aws_lambda_permission.go | 416 - .../aws/resource_aws_launch_configuration.go | 686 - .../aws/resource_aws_launch_template.go | 1420 - .../aws/resource_aws_lb.go | 789 - ...esource_aws_lb_cookie_stickiness_policy.go | 176 - .../aws/resource_aws_lb_listener.go | 820 - .../resource_aws_lb_listener_certificate.go | 156 - .../aws/resource_aws_lb_listener_rule.go | 922 - .../resource_aws_lb_ssl_negotiation_policy.go | 189 - .../aws/resource_aws_lb_target_group.go | 710 - ...resource_aws_lb_target_group_attachment.go | 150 - ...resource_aws_licensemanager_association.go | 146 - ...ws_licensemanager_license_configuration.go | 187 - .../aws/resource_aws_lightsail_domain.go | 76 - .../aws/resource_aws_lightsail_instance.go | 263 - .../aws/resource_aws_lightsail_key_pair.go | 225 - .../aws/resource_aws_lightsail_static_ip.go | 98 - ...urce_aws_lightsail_static_ip_attachment.go | 96 - ...aws_load_balancer_backend_server_policy.go | 135 - ...ource_aws_load_balancer_listener_policy.go | 135 - .../aws/resource_aws_load_balancer_policy.go | 364 - ...ce_aws_macie_member_account_association.go | 96 - ...esource_aws_macie_s3_bucket_association.go | 206 - ...source_aws_main_route_table_association.go | 169 - .../aws/resource_aws_media_package_channel.go | 182 - .../aws/resource_aws_media_store_container.go | 132 - ...source_aws_media_store_container_policy.go | 103 - .../aws/resource_aws_mq_broker.go | 605 - .../aws/resource_aws_mq_configuration.go | 187 - .../aws/resource_aws_nat_gateway.go | 213 - .../aws/resource_aws_neptune_cluster.go | 736 - .../resource_aws_neptune_cluster_instance.go | 526 - ...rce_aws_neptune_cluster_parameter_group.go | 260 - .../resource_aws_neptune_cluster_snapshot.go | 218 - ...resource_aws_neptune_event_subscription.go | 391 - .../resource_aws_neptune_parameter_group.go | 291 - .../aws/resource_aws_neptune_subnet_group.go | 218 - .../aws/resource_aws_network_acl.go | 672 - .../aws/resource_aws_network_acl_rule.go | 315 - .../aws/resource_aws_network_interface.go | 435 - ...source_aws_network_interface_attachment.go | 166 - ...rce_aws_network_interface_sg_attachment.go | 182 - .../aws/resource_aws_opsworks_application.go | 620 - .../aws/resource_aws_opsworks_custom_layer.go | 17 - .../resource_aws_opsworks_ganglia_layer.go | 33 - .../resource_aws_opsworks_haproxy_layer.go | 48 - .../aws/resource_aws_opsworks_instance.go | 1011 - .../resource_aws_opsworks_java_app_layer.go | 42 - .../resource_aws_opsworks_memcached_layer.go | 22 - .../aws/resource_aws_opsworks_mysql_layer.go | 27 - .../resource_aws_opsworks_nodejs_app_layer.go | 22 - .../aws/resource_aws_opsworks_permission.go | 143 - .../resource_aws_opsworks_php_app_layer.go | 16 - .../resource_aws_opsworks_rails_app_layer.go | 47 - .../resource_aws_opsworks_rds_db_instance.go | 193 - .../aws/resource_aws_opsworks_stack.go | 605 - .../resource_aws_opsworks_static_web_layer.go | 16 - .../aws/resource_aws_opsworks_user_profile.go | 132 - .../aws/resource_aws_organizations_account.go | 243 - ...resource_aws_organizations_organization.go | 189 - .../aws/resource_aws_organizations_policy.go | 174 - ...rce_aws_organizations_policy_attachment.go | 154 - .../aws/resource_aws_pinpoint_adm_channel.go | 114 - .../aws/resource_aws_pinpoint_apns_channel.go | 159 - ...ource_aws_pinpoint_apns_sandbox_channel.go | 159 - ...resource_aws_pinpoint_apns_voip_channel.go | 159 - ..._aws_pinpoint_apns_voip_sandbox_channel.go | 159 - .../aws/resource_aws_pinpoint_app.go | 376 - .../resource_aws_pinpoint_baidu_channel.go | 114 - .../resource_aws_pinpoint_email_channel.go | 123 - .../aws/resource_aws_pinpoint_event_stream.go | 106 - .../aws/resource_aws_pinpoint_gcm_channel.go | 108 - .../aws/resource_aws_pinpoint_sms_channel.go | 128 - .../aws/resource_aws_placement_group.go | 148 - .../aws/resource_aws_proxy_protocol_policy.go | 266 - .../aws/resource_aws_ram_resource_share.go | 241 - .../aws/resource_aws_rds_cluster.go | 1335 - .../aws/resource_aws_rds_cluster_endpoint.go | 267 - .../aws/resource_aws_rds_cluster_instance.go | 578 - ...esource_aws_rds_cluster_parameter_group.go | 278 - .../aws/resource_aws_rds_global_cluster.go | 349 - .../aws/resource_aws_redshift_cluster.go | 1085 - ...esource_aws_redshift_event_subscription.go | 211 - .../resource_aws_redshift_parameter_group.go | 213 - .../resource_aws_redshift_security_group.go | 400 - ...source_aws_redshift_snapshot_copy_grant.go | 251 - .../aws/resource_aws_redshift_subnet_group.go | 185 - .../aws/resource_aws_resourcegroups_group.go | 178 - .../aws/resource_aws_route.go | 564 - .../resource_aws_route53_delegation_set.go | 111 - .../aws/resource_aws_route53_health_check.go | 390 - .../aws/resource_aws_route53_query_log.go | 91 - .../aws/resource_aws_route53_record.go | 990 - .../resource_aws_route53_record_migrate.go | 62 - .../aws/resource_aws_route53_zone.go | 618 - .../resource_aws_route53_zone_association.go | 145 - .../aws/resource_aws_route_table.go | 553 - .../resource_aws_route_table_association.go | 155 - ...urce_aws_s3_account_public_access_block.go | 182 - .../aws/resource_aws_s3_bucket.go | 2554 - .../aws/resource_aws_s3_bucket_inventory.go | 467 - .../aws/resource_aws_s3_bucket_metric.go | 215 - .../resource_aws_s3_bucket_notification.go | 468 - .../aws/resource_aws_s3_bucket_object.go | 438 - .../aws/resource_aws_s3_bucket_policy.go | 117 - ...ource_aws_s3_bucket_public_access_block.go | 195 - .../aws/resource_aws_sagemaker_model.go | 391 - ...esource_aws_sagemaker_notebook_instance.go | 386 - .../aws/resource_aws_secretsmanager_secret.go | 429 - ...ource_aws_secretsmanager_secret_version.go | 239 - .../aws/resource_aws_security_group.go | 1517 - .../resource_aws_security_group_migrate.go | 34 - .../aws/resource_aws_security_group_rule.go | 1003 - ...esource_aws_security_group_rule_migrate.go | 105 - .../aws/resource_aws_securityhub_account.go | 68 - ...ce_aws_securityhub_product_subscription.go | 134 - ..._aws_securityhub_standards_subscription.go | 93 - ...ce_aws_service_discovery_http_namespace.go | 130 - ...service_discovery_private_dns_namespace.go | 134 - ..._service_discovery_public_dns_namespace.go | 158 - .../resource_aws_service_discovery_service.go | 372 - .../resource_aws_servicecatalog_portfolio.go | 225 - ...esource_aws_ses_active_receipt_rule_set.go | 80 - .../aws/resource_aws_ses_configuration_set.go | 106 - .../aws/resource_aws_ses_domain_dkim.go | 87 - .../aws/resource_aws_ses_domain_identity.go | 116 - ...ce_aws_ses_domain_identity_verification.go | 124 - .../aws/resource_aws_ses_domain_mail_from.go | 110 - .../aws/resource_aws_ses_event_destination.go | 219 - ...rce_aws_ses_identity_notification_topic.go | 145 - .../aws/resource_aws_ses_receipt_filter.go | 109 - .../aws/resource_aws_ses_receipt_rule.go | 789 - .../aws/resource_aws_ses_receipt_rule_set.go | 104 - .../aws/resource_aws_ses_template.go | 154 - .../aws/resource_aws_sfn_activity.go | 167 - .../aws/resource_aws_sfn_state_machine.go | 225 - .../aws/resource_aws_simpledb_domain.go | 83 - ...e_aws_snapshot_create_volume_permission.go | 152 - .../resource_aws_sns_platform_application.go | 288 - .../aws/resource_aws_sns_sms_preferences.go | 166 - .../aws/resource_aws_sns_topic.go | 270 - .../aws/resource_aws_sns_topic_policy.go | 166 - .../resource_aws_sns_topic_subscription.go | 426 - ...resource_aws_spot_datafeed_subscription.go | 93 - .../aws/resource_aws_spot_fleet_request.go | 1248 - ...resource_aws_spot_fleet_request_migrate.go | 33 - .../aws/resource_aws_spot_instance_request.go | 436 - .../aws/resource_aws_sqs_queue.go | 398 - .../aws/resource_aws_sqs_queue_policy.go | 145 - .../resource_aws_sqs_queue_policy_migrate.go | 38 - .../aws/resource_aws_ssm_activation.go | 175 - .../aws/resource_aws_ssm_association.go | 298 - .../resource_aws_ssm_association_migrate.go | 38 - .../aws/resource_aws_ssm_document.go | 591 - .../resource_aws_ssm_maintenance_window.go | 204 - ...ource_aws_ssm_maintenance_window_target.go | 165 - ...esource_aws_ssm_maintenance_window_task.go | 307 - .../aws/resource_aws_ssm_parameter.go | 214 - .../aws/resource_aws_ssm_patch_baseline.go | 380 - .../aws/resource_aws_ssm_patch_group.go | 96 - .../resource_aws_ssm_resource_data_sync.go | 174 - .../aws/resource_aws_storagegateway_cache.go | 159 - ..._aws_storagegateway_cached_iscsi_volume.go | 236 - .../resource_aws_storagegateway_gateway.go | 443 - ...ource_aws_storagegateway_nfs_file_share.go | 392 - ...ource_aws_storagegateway_smb_file_share.go | 330 - ...source_aws_storagegateway_upload_buffer.go | 131 - ...urce_aws_storagegateway_working_storage.go | 131 - .../aws/resource_aws_subnet.go | 423 - .../aws/resource_aws_subnet_migrate.go | 33 - .../aws/resource_aws_swf_domain.go | 140 - .../aws/resource_aws_transfer_server.go | 287 - .../aws/resource_aws_transfer_ssh_key.go | 150 - .../aws/resource_aws_transfer_user.go | 247 - .../aws/resource_aws_volume_attachment.go | 262 - .../aws/resource_aws_vpc.go | 755 - .../aws/resource_aws_vpc_dhcp_options.go | 298 - ...source_aws_vpc_dhcp_options_association.go | 96 - .../aws/resource_aws_vpc_endpoint.go | 460 - ...ws_vpc_endpoint_connection_notification.go | 155 - ...ws_vpc_endpoint_route_table_association.go | 143 - .../aws/resource_aws_vpc_endpoint_service.go | 279 - ..._vpc_endpoint_service_allowed_principal.go | 123 - ...rce_aws_vpc_endpoint_subnet_association.go | 156 - ...rce_aws_vpc_ipv4_cidr_block_association.go | 173 - .../aws/resource_aws_vpc_migrate.go | 33 - .../resource_aws_vpc_peering_connection.go | 396 - ...rce_aws_vpc_peering_connection_accepter.go | 73 - ...urce_aws_vpc_peering_connection_options.go | 84 - .../aws/resource_aws_vpn_connection.go | 625 - .../aws/resource_aws_vpn_connection_route.go | 169 - .../aws/resource_aws_vpn_gateway.go | 340 - .../resource_aws_vpn_gateway_attachment.go | 203 - ...ource_aws_vpn_gateway_route_propagation.go | 101 - .../aws/resource_aws_waf_byte_match_set.go | 230 - .../aws/resource_aws_waf_geo_match_set.go | 156 - .../aws/resource_aws_waf_ipset.go | 228 - .../aws/resource_aws_waf_rate_based_rule.go | 193 - .../aws/resource_aws_waf_regex_match_set.go | 175 - .../aws/resource_aws_waf_regex_pattern_set.go | 144 - .../aws/resource_aws_waf_rule.go | 179 - .../aws/resource_aws_waf_rule_group.go | 187 - .../resource_aws_waf_size_constraint_set.go | 133 - ...esource_aws_waf_sql_injection_match_set.go | 214 - .../aws/resource_aws_waf_web_acl.go | 221 - .../aws/resource_aws_waf_xss_match_set.go | 213 - ...resource_aws_wafregional_byte_match_set.go | 309 - .../resource_aws_wafregional_geo_match_set.go | 160 - .../aws/resource_aws_wafregional_ipset.go | 185 - ...esource_aws_wafregional_rate_based_rule.go | 195 - ...esource_aws_wafregional_regex_match_set.go | 179 - ...ource_aws_wafregional_regex_pattern_set.go | 147 - .../aws/resource_aws_wafregional_rule.go | 180 - .../resource_aws_wafregional_rule_group.go | 191 - ...rce_aws_wafregional_size_constraint_set.go | 135 - ...aws_wafregional_sql_injection_match_set.go | 233 - .../aws/resource_aws_wafregional_web_acl.go | 220 - ...rce_aws_wafregional_web_acl_association.go | 124 - .../resource_aws_wafregional_xss_match_set.go | 175 - .../aws/resource_aws_worklink_fleet.go | 426 - .../terraform-provider-aws/aws/s3_tags.go | 189 - .../terraform-provider-aws/aws/structure.go | 5075 - .../terraform-provider-aws/aws/tags.go | 478 - .../terraform-provider-aws/aws/tagsACM.go | 88 - .../terraform-provider-aws/aws/tagsACMPCA.go | 50 - .../aws/tagsBeanstalk.go | 74 - .../aws/tagsCloudFront.go | 98 - .../aws/tagsCloudtrail.go | 113 - .../aws/tagsCodeBuild.go | 27 - .../terraform-provider-aws/aws/tagsDAX.go | 116 - .../terraform-provider-aws/aws/tagsDS.go | 116 - .../terraform-provider-aws/aws/tagsDX.go | 138 - .../terraform-provider-aws/aws/tagsDocDB.go | 137 - .../terraform-provider-aws/aws/tagsEC.go | 116 - .../terraform-provider-aws/aws/tagsECR.go | 135 - .../terraform-provider-aws/aws/tagsECS.go | 78 - .../terraform-provider-aws/aws/tagsEFS.go | 115 - .../terraform-provider-aws/aws/tagsELB.go | 115 - .../terraform-provider-aws/aws/tagsGeneric.go | 70 - .../terraform-provider-aws/aws/tagsIAM.go | 86 - .../aws/tagsInspector.go | 40 - .../terraform-provider-aws/aws/tagsKMS.go | 116 - .../aws/tagsKinesisFirehose.go | 149 - .../terraform-provider-aws/aws/tagsLambda.go | 50 - .../aws/tagsLicenseManager.go | 115 - .../terraform-provider-aws/aws/tagsMQ.go | 67 - .../terraform-provider-aws/aws/tagsNeptune.go | 134 - .../aws/tagsOpsworks.go | 50 - .../terraform-provider-aws/aws/tagsRAM.go | 85 - .../terraform-provider-aws/aws/tagsRDS.go | 134 - .../aws/tagsRedshift.go | 109 - .../terraform-provider-aws/aws/tagsSSM.go | 118 - .../aws/tagsSecretsManager.go | 75 - .../terraform-provider-aws/aws/tagsSfn.go | 78 - .../aws/tagsTransfer.go | 118 - .../aws/tags_apigateway.go | 44 - .../terraform-provider-aws/aws/tags_dms.go | 91 - .../aws/tags_elasticsearchservice.go | 115 - .../aws/tags_kinesis.go | 146 - .../aws/tags_route53.go | 112 - .../aws/tags_sagemaker.go | 120 - .../terraform-provider-aws/aws/utils.go | 54 - .../terraform-provider-aws/aws/validators.go | 2383 - .../terraform-provider-aws/aws/waf_helpers.go | 364 - .../aws/waf_token_handlers.go | 48 - .../aws/wafregionl_token_handlers.go | 50 - vendor/golang.org/x/net/html/node.go | 2 +- vendor/golang.org/x/net/html/parse.go | 31 +- vendor/golang.org/x/net/http2/hpack/hpack.go | 10 +- vendor/golang.org/x/net/http2/server.go | 6 - vendor/golang.org/x/net/http2/transport.go | 25 +- vendor/golang.org/x/net/trace/trace.go | 14 +- vendor/gopkg.in/inf.v0/LICENSE | 28 - vendor/gopkg.in/inf.v0/dec.go | 615 - vendor/gopkg.in/inf.v0/rounder.go | 145 - vendor/k8s.io/apimachinery/LICENSE | 202 - .../apimachinery/pkg/api/resource/OWNERS | 16 - .../apimachinery/pkg/api/resource/amount.go | 299 - .../pkg/api/resource/generated.pb.go | 75 - .../pkg/api/resource/generated.proto | 88 - .../apimachinery/pkg/api/resource/math.go | 314 - .../apimachinery/pkg/api/resource/quantity.go | 738 - .../pkg/api/resource/quantity_proto.go | 284 - .../pkg/api/resource/scale_int.go | 95 - .../apimachinery/pkg/api/resource/suffix.go | 198 - .../pkg/api/resource/zz_generated.deepcopy.go | 27 - .../apimachinery/pkg/apis/meta/v1/OWNERS | 31 - .../pkg/apis/meta/v1/controller_ref.go | 54 - .../pkg/apis/meta/v1/conversion.go | 319 - .../apimachinery/pkg/apis/meta/v1/doc.go | 23 - .../apimachinery/pkg/apis/meta/v1/duration.go | 60 - .../pkg/apis/meta/v1/generated.pb.go | 8256 -- .../pkg/apis/meta/v1/generated.proto | 879 - .../pkg/apis/meta/v1/group_version.go | 148 - .../apimachinery/pkg/apis/meta/v1/helpers.go | 246 - .../apimachinery/pkg/apis/meta/v1/labels.go | 55 - .../apimachinery/pkg/apis/meta/v1/meta.go | 170 - .../pkg/apis/meta/v1/micro_time.go | 183 - .../pkg/apis/meta/v1/micro_time_proto.go | 72 - .../apimachinery/pkg/apis/meta/v1/register.go | 97 - .../apimachinery/pkg/apis/meta/v1/time.go | 185 - .../pkg/apis/meta/v1/time_proto.go | 92 - .../apimachinery/pkg/apis/meta/v1/types.go | 1011 - .../meta/v1/types_swagger_doc_generated.go | 348 - .../apimachinery/pkg/apis/meta/v1/watch.go | 89 - .../pkg/apis/meta/v1/zz_generated.deepcopy.go | 961 - .../pkg/apis/meta/v1/zz_generated.defaults.go | 32 - .../apimachinery/pkg/conversion/converter.go | 898 - .../apimachinery/pkg/conversion/deep_equal.go | 36 - .../k8s.io/apimachinery/pkg/conversion/doc.go | 24 - .../apimachinery/pkg/conversion/helper.go | 39 - .../pkg/conversion/queryparams/convert.go | 198 - .../pkg/conversion/queryparams/doc.go | 19 - vendor/k8s.io/apimachinery/pkg/fields/doc.go | 19 - .../k8s.io/apimachinery/pkg/fields/fields.go | 62 - .../apimachinery/pkg/fields/requirements.go | 30 - .../apimachinery/pkg/fields/selector.go | 476 - vendor/k8s.io/apimachinery/pkg/labels/doc.go | 19 - .../k8s.io/apimachinery/pkg/labels/labels.go | 181 - .../apimachinery/pkg/labels/selector.go | 891 - .../pkg/labels/zz_generated.deepcopy.go | 42 - .../k8s.io/apimachinery/pkg/runtime/codec.go | 332 - .../apimachinery/pkg/runtime/codec_check.go | 48 - .../apimachinery/pkg/runtime/conversion.go | 113 - .../apimachinery/pkg/runtime/converter.go | 805 - vendor/k8s.io/apimachinery/pkg/runtime/doc.go | 51 - .../apimachinery/pkg/runtime/embedded.go | 142 - .../k8s.io/apimachinery/pkg/runtime/error.go | 122 - .../apimachinery/pkg/runtime/extension.go | 51 - .../apimachinery/pkg/runtime/generated.pb.go | 753 - .../apimachinery/pkg/runtime/generated.proto | 127 - .../k8s.io/apimachinery/pkg/runtime/helper.go | 212 - .../apimachinery/pkg/runtime/interfaces.go | 252 - .../apimachinery/pkg/runtime/register.go | 61 - .../pkg/runtime/schema/generated.pb.go | 63 - .../pkg/runtime/schema/generated.proto | 26 - .../pkg/runtime/schema/group_version.go | 300 - .../pkg/runtime/schema/interfaces.go | 40 - .../k8s.io/apimachinery/pkg/runtime/scheme.go | 754 - .../pkg/runtime/scheme_builder.go | 48 - .../pkg/runtime/swagger_doc_generator.go | 262 - .../k8s.io/apimachinery/pkg/runtime/types.go | 137 - .../apimachinery/pkg/runtime/types_proto.go | 69 - .../pkg/runtime/zz_generated.deepcopy.go | 108 - .../apimachinery/pkg/selection/operator.go | 33 - vendor/k8s.io/apimachinery/pkg/types/doc.go | 18 - .../apimachinery/pkg/types/namespacedname.go | 43 - .../k8s.io/apimachinery/pkg/types/nodename.go | 43 - vendor/k8s.io/apimachinery/pkg/types/patch.go | 28 - vendor/k8s.io/apimachinery/pkg/types/uid.go | 22 - .../apimachinery/pkg/util/errors/doc.go | 18 - .../apimachinery/pkg/util/errors/errors.go | 201 - .../pkg/util/intstr/generated.pb.go | 362 - .../pkg/util/intstr/generated.proto | 43 - .../apimachinery/pkg/util/intstr/intstr.go | 184 - .../k8s.io/apimachinery/pkg/util/json/json.go | 119 - .../pkg/util/naming/from_stack.go | 93 - .../k8s.io/apimachinery/pkg/util/net/http.go | 445 - .../apimachinery/pkg/util/net/interface.go | 416 - .../apimachinery/pkg/util/net/port_range.go | 149 - .../apimachinery/pkg/util/net/port_split.go | 77 - .../k8s.io/apimachinery/pkg/util/net/util.go | 56 - .../apimachinery/pkg/util/runtime/runtime.go | 173 - .../k8s.io/apimachinery/pkg/util/sets/byte.go | 203 - .../k8s.io/apimachinery/pkg/util/sets/doc.go | 20 - .../apimachinery/pkg/util/sets/empty.go | 23 - .../k8s.io/apimachinery/pkg/util/sets/int.go | 203 - .../apimachinery/pkg/util/sets/int64.go | 203 - .../apimachinery/pkg/util/sets/string.go | 203 - .../pkg/util/validation/field/errors.go | 259 - .../pkg/util/validation/field/path.go | 91 - .../pkg/util/validation/validation.go | 416 - vendor/k8s.io/apimachinery/pkg/watch/doc.go | 19 - .../k8s.io/apimachinery/pkg/watch/filter.go | 105 - vendor/k8s.io/apimachinery/pkg/watch/mux.go | 260 - .../apimachinery/pkg/watch/streamwatcher.go | 119 - vendor/k8s.io/apimachinery/pkg/watch/watch.go | 317 - .../pkg/watch/zz_generated.deepcopy.go | 40 - .../forked/golang/reflect/deep_equal.go | 388 - vendor/k8s.io/client-go/LICENSE | 202 - .../pkg/apis/clientauthentication/OWNERS | 7 - .../pkg/apis/clientauthentication/doc.go | 20 - .../pkg/apis/clientauthentication/register.go | 50 - .../pkg/apis/clientauthentication/types.go | 77 - .../apis/clientauthentication/v1alpha1/doc.go | 24 - .../clientauthentication/v1alpha1/register.go | 55 - .../clientauthentication/v1alpha1/types.go | 78 - .../v1alpha1/zz_generated.conversion.go | 176 - .../v1alpha1/zz_generated.deepcopy.go | 128 - .../v1alpha1/zz_generated.defaults.go | 32 - .../zz_generated.deepcopy.go | 128 - vendor/k8s.io/klog/.travis.yml | 14 - vendor/k8s.io/klog/CONTRIBUTING.md | 31 - vendor/k8s.io/klog/LICENSE | 191 - vendor/k8s.io/klog/OWNERS | 11 - vendor/k8s.io/klog/README.md | 51 - vendor/k8s.io/klog/RELEASE.md | 9 - vendor/k8s.io/klog/SECURITY_CONTACTS | 20 - vendor/k8s.io/klog/klog.go | 1239 - vendor/k8s.io/klog/klog_file.go | 126 - vendor/modules.txt | 159 +- website/docs/backends/types/s3.html.md | 6 +- 1329 files changed, 735 insertions(+), 1374459 deletions(-) delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/signer/v2/v2.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/acm/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/acm/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/acm/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/acm/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/acm/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigateway/customization.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigateway/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigateway/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigateway/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/appmesh/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/appmesh/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/appsync/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/appsync/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/appsync/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/athena/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/athena/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/athena/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/athena/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/autoscaling/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/autoscaling/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/autoscaling/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/backup/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/backup/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/backup/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/backup/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/batch/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/batch/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/batch/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/batch/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/budgets/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/budgets/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/budgets/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloud9/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloud9/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloud9/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudformation/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudformation/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudformation/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudfront/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudsearch/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudsearch/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudsearch/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudtrail/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatch/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatch/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatch/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatch/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codebuild/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codebuild/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codecommit/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codedeploy/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codedeploy/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/customizations.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/configservice/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/configservice/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/configservice/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/datapipeline/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/datapipeline/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/datapipeline/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/datasync/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/datasync/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/datasync/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/datasync/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/dax/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/dax/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/dax/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/dax/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/devicefarm/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/directoryservice/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/directoryservice/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/dlm/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/dlm/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/dlm/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/dlm/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/docdb/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/docdb/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/docdb/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/docdb/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/docdb/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ec2/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ec2/customizations.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ec2/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ecr/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ecr/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ecs/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ecs/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ecs/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ecs/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ecs/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/efs/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/efs/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/efs/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/efs/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/eks/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/eks/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/eks/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/eks/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/eks/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticache/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticache/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticache/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elb/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elb/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elb/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elb/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elb/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/elbv2/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/emr/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/emr/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/emr/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/emr/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/emr/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/firehose/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/firehose/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/firehose/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/fms/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/fms/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/fms/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/fms/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/fsx/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/fsx/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/fsx/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/fsx/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/gamelift/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/gamelift/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/glacier/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/glacier/customizations.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/glacier/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/glacier/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/glacier/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/glacier/treehash.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/glacier/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/glue/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/glue/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/glue/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/glue/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/guardduty/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/guardduty/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/inspector/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/inspector/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/inspector/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iot/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iot/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iot/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iot/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kafka/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kafka/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kafka/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kafka/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesis/customizations.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesis/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesis/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesis/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kms/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kms/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kms/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/kms/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/lambda/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/lambda/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/lambda/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/licensemanager/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/licensemanager/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/licensemanager/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/licensemanager/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/lightsail/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/lightsail/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/lightsail/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/macie/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/macie/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/macie/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/macie/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconnect/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconnect/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconnect/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconnect/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconvert/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconvert/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/medialive/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/medialive/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/medialive/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/medialive/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediapackage/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediapackage/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastore/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastore/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastoredata/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastoredata/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mq/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mq/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mq/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/mq/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/neptune/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/neptune/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/neptune/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/neptune/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/neptune/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/opsworks/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/opsworks/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/opsworks/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/opsworks/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/organizations/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/organizations/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/organizations/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/pinpoint/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/pinpoint/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/pricing/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/pricing/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/pricing/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/pricing/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ram/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ram/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ram/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ram/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/rds/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/rds/customizations.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/rds/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/rds/doc_custom.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/rds/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/rds/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/rds/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/redshift/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/redshift/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/redshift/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/redshift/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/resourcegroups/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/resourcegroups/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/resourcegroups/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/resourcegroups/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53/customizations.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53/unmarshal_error.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53resolver/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53resolver/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53resolver/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53resolver/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3control/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3control/customizations.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3control/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3control/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3control/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/securityhub/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/securityhub/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/securityhub/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/securityhub/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/servicecatalog/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/servicecatalog/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/servicediscovery/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/servicediscovery/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ses/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ses/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ses/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ses/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ses/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sfn/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sfn/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sfn/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/simpledb/customizations.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/simpledb/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/simpledb/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/simpledb/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/simpledb/unmarshall_error.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sns/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sns/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sns/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sns/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sqs/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sqs/checksums.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sqs/customizations.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sqs/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/sqs/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ssm/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/ssm/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/storagegateway/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/storagegateway/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/swf/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/swf/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/swf/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/swf/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/transfer/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/transfer/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/transfer/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/transfer/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/waf/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/waf/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/waf/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/waf/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/wafregional/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/wafregional/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/worklink/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/worklink/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/worklink/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/worklink/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/workspaces/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/workspaces/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/workspaces/service.go delete mode 100644 vendor/github.com/beevik/etree/.travis.yml delete mode 100644 vendor/github.com/beevik/etree/CONTRIBUTORS delete mode 100644 vendor/github.com/beevik/etree/LICENSE delete mode 100644 vendor/github.com/beevik/etree/README.md delete mode 100644 vendor/github.com/beevik/etree/RELEASE_NOTES.md delete mode 100644 vendor/github.com/beevik/etree/etree.go delete mode 100644 vendor/github.com/beevik/etree/helpers.go delete mode 100644 vendor/github.com/beevik/etree/path.go delete mode 100644 vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go delete mode 100644 vendor/github.com/google/gofuzz/.travis.yml delete mode 100644 vendor/github.com/google/gofuzz/CONTRIBUTING.md delete mode 100644 vendor/github.com/google/gofuzz/LICENSE delete mode 100644 vendor/github.com/google/gofuzz/README.md delete mode 100644 vendor/github.com/google/gofuzz/doc.go delete mode 100644 vendor/github.com/google/gofuzz/fuzz.go create mode 100644 vendor/github.com/hashicorp/aws-sdk-go-base/.golangci.yml create mode 100644 vendor/github.com/hashicorp/aws-sdk-go-base/.travis.yml create mode 100644 vendor/github.com/hashicorp/aws-sdk-go-base/CHANGELOG.md create mode 100644 vendor/github.com/hashicorp/aws-sdk-go-base/GNUmakefile rename vendor/github.com/{jen20/awspolicyequivalence => hashicorp/aws-sdk-go-base}/LICENSE (100%) create mode 100644 vendor/github.com/hashicorp/aws-sdk-go-base/README.md rename vendor/github.com/{terraform-providers/terraform-provider-aws/aws/auth_helpers.go => hashicorp/aws-sdk-go-base/awsauth.go} (93%) create mode 100644 vendor/github.com/hashicorp/aws-sdk-go-base/awserr.go create mode 100644 vendor/github.com/hashicorp/aws-sdk-go-base/config.go create mode 100644 vendor/github.com/hashicorp/aws-sdk-go-base/go.mod create mode 100644 vendor/github.com/hashicorp/aws-sdk-go-base/go.sum create mode 100644 vendor/github.com/hashicorp/aws-sdk-go-base/logger.go create mode 100644 vendor/github.com/hashicorp/aws-sdk-go-base/mock.go create mode 100644 vendor/github.com/hashicorp/aws-sdk-go-base/session.go delete mode 100644 vendor/github.com/jen20/awspolicyequivalence/.gitignore delete mode 100644 vendor/github.com/jen20/awspolicyequivalence/.travis.yml delete mode 100644 vendor/github.com/jen20/awspolicyequivalence/README.md delete mode 100644 vendor/github.com/jen20/awspolicyequivalence/aws_policy_equivalence.go delete mode 100644 vendor/github.com/jen20/awspolicyequivalence/go.mod delete mode 100644 vendor/github.com/jen20/awspolicyequivalence/go.sum delete mode 100644 vendor/github.com/kubernetes-sigs/aws-iam-authenticator/LICENSE delete mode 100644 vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/arn/arn.go delete mode 100644 vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token/token.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/LICENSE delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/autoscaling_tags.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_acm_certificate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_acmpca_certificate_authority.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_api_key.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_resource.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_rest_api.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_vpc_link.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_arn.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zone.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zones.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_batch_compute_environment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_batch_job_queue.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_billing_service_account.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_caller_identity.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_canonical_user_id.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_export.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_stack.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudhsm2_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudwatch_log_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_codecommit_repository.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cognito_user_pools.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_common_schema.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_cluster_snapshot.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_event_categories.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_instance.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_snapshot.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_dx_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_dynamodb_table.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_volume.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_route_table.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_vpc_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecr_repository.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_container_definition.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_service.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_task_definition.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_mount_target.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eip.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster_auth.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_application.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_hosted_zone.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_solution_stack.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_replication_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_hosted_zone_id.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_service_account.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_glue_script.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_account_alias.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_instance_profile.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_policy_document.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_role.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_user.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_inspector_rules_packages.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instances.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_internet_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iot_endpoint.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ip_ranges.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kinesis_stream.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_alias.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_ciphertext.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_key.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secret.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secrets.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_function.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_invocation.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_configuration.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_template.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_target_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_nat_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_acls.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interface.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interfaces.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_partition.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_prefix_list.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_pricing_product.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_rds_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_service_account.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_region.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_delegation_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_zone.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route_table.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route_tables.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket_object.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret_version.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_groups.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sns.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sqs_queue.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_document.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_storagegateway_local_disk.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet_ids.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_dhcp_options.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint_service.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_peering_connection.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpcs.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpn_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_workspaces_bundle.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/datasync.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/datasync_tags.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/diff_suppress_funcs.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/dx_vif.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/ec2_filters.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/ec2_transit_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/hosted_zones.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/iam_policy_model.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_cloudfront_distribution.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_db_event_subscription.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_dx_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_network_acl.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_route_table.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_s3_bucket.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_security_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/network_acl_entry.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/opsworks_layers.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_copy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_from_instance.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_launch_permission.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_account.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_api_key.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_authorizer.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_base_path_mapping.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_client_certificate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_deployment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_documentation_part.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_documentation_version.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_domain_name.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_gateway_response.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration_response.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_response.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_settings.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_model.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_request_validator.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_resource.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan_key.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_app_cookie_stickiness_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_scheduled_action.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_target.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_mesh.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_route.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_node.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_router.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_api_key.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_datasource.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_graphql_api.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_named_query.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group_waiting.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_lifecycle_hook.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_notification.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_schedule.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_backup_vault.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_compute_environment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_definition.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_budgets_budget.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloud9_environment_ec2.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudformation_stack.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_origin_access_identity.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_public_key.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudhsm2_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudhsm2_hsm.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_dashboard.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_permission.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_resource_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_stream.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_subscription_filter.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_webhook.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_repository.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_trigger.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_app.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline_webhook.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool_roles_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_provider.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_resource_server.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_domain.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_aggregate_authorization.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_config_rule.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_aggregator.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder_status.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_delivery_channel.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_agent.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_efs.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_nfs.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_s3.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_task.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_parameter_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_subnet_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_cluster_snapshot.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_event_subscription.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_option_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_parameter_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_security_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_snapshot.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_subnet_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_route_table.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_security_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_subnet.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc_dhcp_options.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_devicefarm_project.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_conditional_forwarder.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dlm_lifecycle_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_certificate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_endpoint.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_instance.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_subnet_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_parameter_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_snapshot.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_subnet_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_bgp_peer.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_global_table.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table_item.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot_copy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_volume.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_capacity_reservation.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_endpoint.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_network_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_fleet.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_propagation.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_vpc_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_mount_target.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_egress_only_internet_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eks_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application_version.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_configuration_template.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_pipeline.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_preset.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_security_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_subnet_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_security_configuration.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_flow_log.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_alias.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_build.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_game_session_queue.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault_lock.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_globalaccelerator_accelerator.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_database.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_table.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_classifier.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_connection.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_job.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_security_configuration.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_trigger.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_detector.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_ipset.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_member.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_threatintelset.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_alias.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_password_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_membership.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_openid_connect_provider.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_saml_provider.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_service_linked_role.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_login_profile.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_ssh_key.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_assessment_target.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_assessment_template.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_resource_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_internet_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_certificate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_policy_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_principal_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_type.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_topic_rule.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_analytics_application.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_alias.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_alias.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_event_source_mapping.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_layer_version.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_configuration.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_cookie_stickiness_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_certificate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_ssl_negotiation_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_license_configuration.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_domain.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_instance.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_key_pair.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_static_ip.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_static_ip_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_backend_server_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_listener_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_macie_member_account_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_macie_s3_bucket_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_main_route_table_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_package_channel.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_configuration.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_nat_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_instance.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_parameter_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_snapshot.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_event_subscription.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_parameter_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_subnet_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_sg_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_custom_layer.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_ganglia_layer.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_haproxy_layer.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_java_app_layer.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_memcached_layer.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_mysql_layer.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_nodejs_app_layer.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_permission.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_php_app_layer.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rails_app_layer.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_stack.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_static_web_layer.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_user_profile.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_account.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_organization.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_adm_channel.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_channel.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_sandbox_channel.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_channel.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_sandbox_channel.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_app.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_baidu_channel.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_email_channel.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_event_stream.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_gcm_channel.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_sms_channel.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_placement_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_proxy_protocol_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ram_resource_share.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_endpoint.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_global_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_event_subscription.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_parameter_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_security_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_snapshot_copy_grant.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_subnet_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_resourcegroups_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_delegation_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_health_check.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_query_log.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_account_public_access_block.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_metric.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_notification.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_public_access_block.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_model.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_notebook_instance.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret_version.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_account.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_product_subscription.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_standards_subscription.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_http_namespace.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_private_dns_namespace.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_public_dns_namespace.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_servicecatalog_portfolio.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_active_receipt_rule_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_configuration_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_dkim.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_identity.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_identity_verification.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_mail_from.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_identity_notification_topic.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_filter.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_template.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_activity.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_state_machine.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_simpledb_domain.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_snapshot_create_volume_permission.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_platform_application.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_sms_preferences.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_subscription.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_datafeed_subscription.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue_policy.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue_policy_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_activation.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_target.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_resource_data_sync.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_cache.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_cached_iscsi_volume.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_nfs_file_share.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_smb_file_share.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_upload_buffer.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_working_storage.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_subnet.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_subnet_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_swf_domain.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_server.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_ssh_key.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_user.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_connection_notification.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_route_table_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_service.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_service_allowed_principal.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_subnet_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_ipv4_cidr_block_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_migrate.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_accepter.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_options.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_attachment.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_route_propagation.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_byte_match_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_geo_match_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_ipset.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rate_based_rule.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_match_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_pattern_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_size_constraint_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_sql_injection_match_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_xss_match_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_byte_match_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_geo_match_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_ipset.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rate_based_rule.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_regex_match_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_regex_pattern_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule_group.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_size_constraint_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_sql_injection_match_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl_association.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_xss_match_set.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_worklink_fleet.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACM.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACMPCA.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsBeanstalk.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCloudFront.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCloudtrail.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCodeBuild.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDAX.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDS.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDX.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDocDB.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEC.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECR.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECS.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEFS.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsELB.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsGeneric.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsIAM.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsInspector.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKMS.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKinesisFirehose.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsLambda.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsLicenseManager.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsMQ.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsOpsworks.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRAM.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRDS.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRedshift.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSSM.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSecretsManager.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSfn.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsTransfer.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_apigateway.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_dms.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_elasticsearchservice.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_kinesis.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_route53.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_sagemaker.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/utils.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_helpers.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_token_handlers.go delete mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/wafregionl_token_handlers.go delete mode 100644 vendor/gopkg.in/inf.v0/LICENSE delete mode 100644 vendor/gopkg.in/inf.v0/dec.go delete mode 100644 vendor/gopkg.in/inf.v0/rounder.go delete mode 100644 vendor/k8s.io/apimachinery/LICENSE delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/amount.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/math.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/scale_int.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/suffix.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/converter.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/deep_equal.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/helper.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/fields/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/fields/fields.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/fields/requirements.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/fields/selector.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/labels/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/labels/labels.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/labels/selector.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/codec.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/conversion.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/converter.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/embedded.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/error.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/extension.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/helper.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/register.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/interfaces.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/scheme.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/scheme_builder.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/types.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/types_proto.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/selection/operator.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/types/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/types/namespacedname.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/types/nodename.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/types/patch.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/types/uid.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/errors/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/errors/errors.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/json/json.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/naming/from_stack.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/http.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/interface.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/port_range.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/port_split.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/util.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/byte.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/empty.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/int.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/int64.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/string.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/validation.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/filter.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/mux.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/watch.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go delete mode 100644 vendor/k8s.io/client-go/LICENSE delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/OWNERS delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/doc.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/register.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/types.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/doc.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/register.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/types.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/klog/.travis.yml delete mode 100644 vendor/k8s.io/klog/CONTRIBUTING.md delete mode 100644 vendor/k8s.io/klog/LICENSE delete mode 100644 vendor/k8s.io/klog/OWNERS delete mode 100644 vendor/k8s.io/klog/README.md delete mode 100644 vendor/k8s.io/klog/RELEASE.md delete mode 100644 vendor/k8s.io/klog/SECURITY_CONTACTS delete mode 100644 vendor/k8s.io/klog/klog.go delete mode 100644 vendor/k8s.io/klog/klog_file.go diff --git a/backend/remote-state/s3/backend.go b/backend/remote-state/s3/backend.go index 6e5ecdeba..c795d3271 100644 --- a/backend/remote-state/s3/backend.go +++ b/backend/remote-state/s3/backend.go @@ -5,12 +5,12 @@ import ( "fmt" "strings" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/s3" + awsbase "github.com/hashicorp/aws-sdk-go-base" "github.com/hashicorp/terraform/backend" "github.com/hashicorp/terraform/helper/schema" - - terraformAWS "github.com/terraform-providers/terraform-provider-aws/aws" ) // New creates a new backend for S3 remote state. @@ -155,6 +155,7 @@ func New() backend.Backend { Optional: true, Description: "Skip getting the supported EC2 platforms.", Default: false, + Deprecated: "This attribute is no longer used.", }, "skip_region_validation": { @@ -162,6 +163,7 @@ func New() backend.Backend { Optional: true, Description: "Skip static validation of region name.", Default: false, + Deprecated: "This attribute is no longer used.", }, "skip_requesting_account_id": { @@ -169,6 +171,7 @@ func New() backend.Backend { Optional: true, Description: "Skip requesting the account ID.", Default: false, + Deprecated: "This attribute is no longer used.", }, "skip_metadata_api_check": { @@ -271,37 +274,36 @@ func (b *Backend) configure(ctx context.Context) error { b.ddbTable = data.Get("lock_table").(string) } - cfg := &terraformAWS.Config{ - AccessKey: data.Get("access_key").(string), - AssumeRoleARN: data.Get("role_arn").(string), - AssumeRoleExternalID: data.Get("external_id").(string), - AssumeRolePolicy: data.Get("assume_role_policy").(string), - AssumeRoleSessionName: data.Get("session_name").(string), - CredsFilename: data.Get("shared_credentials_file").(string), - Profile: data.Get("profile").(string), - Region: data.Get("region").(string), - DynamoDBEndpoint: data.Get("dynamodb_endpoint").(string), - IamEndpoint: data.Get("iam_endpoint").(string), - S3Endpoint: data.Get("endpoint").(string), - StsEndpoint: data.Get("sts_endpoint").(string), - SecretKey: data.Get("secret_key").(string), - Token: data.Get("token").(string), - SkipCredsValidation: data.Get("skip_credentials_validation").(bool), - SkipGetEC2Platforms: data.Get("skip_get_ec2_platforms").(bool), - SkipRegionValidation: data.Get("skip_region_validation").(bool), - SkipRequestingAccountId: data.Get("skip_requesting_account_id").(bool), - SkipMetadataApiCheck: data.Get("skip_metadata_api_check").(bool), - S3ForcePathStyle: data.Get("force_path_style").(bool), - MaxRetries: data.Get("max_retries").(int), + cfg := &awsbase.Config{ + AccessKey: data.Get("access_key").(string), + AssumeRoleARN: data.Get("role_arn").(string), + AssumeRoleExternalID: data.Get("external_id").(string), + AssumeRolePolicy: data.Get("assume_role_policy").(string), + AssumeRoleSessionName: data.Get("session_name").(string), + CredsFilename: data.Get("shared_credentials_file").(string), + IamEndpoint: data.Get("iam_endpoint").(string), + MaxRetries: data.Get("max_retries").(int), + Profile: data.Get("profile").(string), + Region: data.Get("region").(string), + SecretKey: data.Get("secret_key").(string), + SkipCredsValidation: data.Get("skip_credentials_validation").(bool), + SkipMetadataApiCheck: data.Get("skip_metadata_api_check").(bool), + StsEndpoint: data.Get("sts_endpoint").(string), + Token: data.Get("token").(string), } - client, err := cfg.Client() + sess, err := awsbase.GetSession(cfg) if err != nil { return err } - b.s3Client = client.(*terraformAWS.AWSClient).S3() - b.dynClient = client.(*terraformAWS.AWSClient).DynamoDB() + b.dynClient = dynamodb.New(sess.Copy(&aws.Config{ + Endpoint: aws.String(data.Get("dynamodb_endpoint").(string)), + })) + b.s3Client = s3.New(sess.Copy(&aws.Config{ + Endpoint: aws.String(data.Get("endpoint").(string)), + S3ForcePathStyle: aws.Bool(data.Get("force_path_style").(bool)), + })) return nil } diff --git a/go.mod b/go.mod index bb39d2e19..9c0eb7d87 100644 --- a/go.mod +++ b/go.mod @@ -9,16 +9,19 @@ require ( github.com/Unknwon/com v0.0.0-20151008135407-28b053d5a292 // indirect github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af // indirect github.com/agext/levenshtein v1.2.1 + github.com/agl/ed25519 v0.0.0-20150830182803-278e1ec8e8a6 // indirect github.com/antchfx/xpath v0.0.0-20170728053731-b5c552e1acbd // indirect github.com/antchfx/xquery v0.0.0-20170730121040-eb8c3c172607 // indirect github.com/apparentlymart/go-cidr v1.0.0 github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect - github.com/aws/aws-sdk-go v1.16.26 + github.com/armon/go-radix v1.0.0 // indirect + github.com/aws/aws-sdk-go v1.16.36 + github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect + github.com/bgentry/speakeasy v0.1.0 // indirect github.com/blang/semver v3.5.1+incompatible github.com/boltdb/bolt v1.3.1 // indirect - github.com/boombuler/barcode v1.0.0 // indirect github.com/chzyer/logex v1.1.10 // indirect github.com/chzyer/readline v0.0.0-20161106042343-c914be64f07d github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 // indirect @@ -33,9 +36,11 @@ require ( github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08 github.com/ghodss/yaml v1.0.0 // indirect github.com/go-test/deep v1.0.1 + github.com/gogo/protobuf v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7 // indirect github.com/golang/mock v1.2.0 github.com/golang/protobuf v1.2.0 + github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c // indirect github.com/google/go-cmp v0.2.0 github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e // indirect @@ -46,6 +51,7 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.5.1 // indirect + github.com/hashicorp/aws-sdk-go-base v0.1.0 github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089 github.com/hashicorp/errwrap v1.0.0 github.com/hashicorp/go-azure-helpers v0.0.0-20190129193224-166dfd221bb2 @@ -59,6 +65,7 @@ require ( github.com/hashicorp/go-plugin v0.0.0-20190212232519-b838ffee39ce github.com/hashicorp/go-retryablehttp v0.5.1 github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 + github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 // indirect github.com/hashicorp/go-tfe v0.3.8 github.com/hashicorp/go-uuid v1.0.0 @@ -76,12 +83,14 @@ require ( github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926 github.com/jtolds/gls v4.2.1+incompatible // indirect github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 + github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba // indirect github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82 github.com/marstr/guid v1.1.0 // indirect github.com/masterzen/azure-sdk-for-go v0.0.0-20161014135628-ee4f0065d00c // indirect github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9 // indirect github.com/masterzen/winrm v0.0.0-20180224160350-7e40f93ae939 github.com/mattn/go-colorable v0.0.0-20160220075935-9cbef7c35391 + github.com/mattn/go-isatty v0.0.4 // indirect github.com/mattn/go-shellwords v1.0.1 github.com/miekg/dns v1.0.8 // indirect github.com/mitchellh/cli v0.0.0-20171129193617-33edc47170b5 @@ -100,7 +109,6 @@ require ( github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c // indirect github.com/pkg/errors v0.0.0-20170505043639-c605e284fe17 // indirect github.com/posener/complete v0.0.0-20171219111128-6bee943216c8 - github.com/pquerna/otp v1.0.0 // indirect github.com/satori/go.uuid v0.0.0-20160927100844-b061729afc07 // indirect github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect github.com/sirupsen/logrus v1.1.1 // indirect @@ -108,12 +116,10 @@ require ( github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect github.com/soheilhy/cmux v0.1.4 // indirect github.com/spf13/afero v1.0.2 - github.com/terraform-providers/terraform-provider-aws v1.58.0 github.com/terraform-providers/terraform-provider-openstack v1.15.0 - github.com/terraform-providers/terraform-provider-template v1.0.0 // indirect - github.com/terraform-providers/terraform-provider-tls v1.2.0 // indirect github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 // indirect github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5 // indirect + github.com/ulikunitz/xz v0.5.4 // indirect github.com/vmihailenco/msgpack v4.0.1+incompatible // indirect github.com/xanzy/ssh-agent v0.2.0 github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 // indirect @@ -124,7 +130,7 @@ require ( go.uber.org/multierr v1.1.0 // indirect go.uber.org/zap v1.9.1 // indirect golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85 - golang.org/x/net v0.0.0-20181129055619-fae4c4e3ad76 + golang.org/x/net v0.0.0-20190213061140-3a22650c66bd golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced google.golang.org/api v0.0.0-20181015145326-625cd1887957 google.golang.org/appengine v1.3.0 // indirect diff --git a/go.sum b/go.sum index 98a102078..4b9801b79 100644 --- a/go.sum +++ b/go.sum @@ -33,10 +33,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.16.26 h1:GWkl3rkRO/JGRTWoLLIqwf7AWC4/W/1hMOUZqmX0js4= -github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/beevik/etree v1.0.1 h1:lWzdj5v/Pj1X360EV7bUudox5SRipy4qZLjY0rhb0ck= -github.com/beevik/etree v1.0.1/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= +github.com/aws/aws-sdk-go v1.16.36 h1:POeH34ZME++pr7GBGh+ZO6Y5kOwSMQpqp5BGUgooJ6k= +github.com/aws/aws-sdk-go v1.16.36/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= @@ -47,9 +45,6 @@ github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdn github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/boombuler/barcode v0.0.0-20180809052337-34fff276c74e/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/boombuler/barcode v1.0.0 h1:s1TvRnXwL2xJRaccrdcBQMZxq6X7DvsMogtmJeHDdrc= -github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e/go.mod h1:N+BjUcTjSxc2mtRGSCPsat1kze3CUtvJN3/jTXlp29k= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -93,7 +88,6 @@ github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7 h1:u4bArs140e9+A github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -105,8 +99,6 @@ github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf h1:+RRA9JqSOZFfKrOeqr2z77+8R2RKyh8PG66dcu1V0ck= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e h1:CYRpN206UTHUinz3VJoLaBdy1gEGeJNsqT0mvswDcMw= github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/gophercloud/gophercloud v0.0.0-20190208042652-bc37892e1968 h1:Pu+HW4kcQozw0QyrTTgLE+3RXNqFhQNNzhbnoLFL83c= @@ -123,6 +115,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.5.1 h1:3scN4iuXkNOyP98jF55Lv8a9j1o/IwvnDIZ0LHJK1nk= github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/hashicorp/aws-sdk-go-base v0.1.0 h1:f3eUqzUWiAVavKns7ot/IbrRz4uXdSTeU5diOTlNxAk= +github.com/hashicorp/aws-sdk-go-base v0.1.0/go.mod h1:ZIWACGGi0N7a4DZbf15yuE1JQORmWLtBcVM6F5SXNFU= github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089 h1:1eDpXAxTh0iPv+1kc9/gfSI2pxRERDsTk/lNGolwHn8= github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089/go.mod h1:mFrjN1mfidgJfYP1xrJCF+AfRhr6Eaqhb2+sfyn/OOI= github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -136,7 +130,6 @@ github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6K github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-getter v0.0.0-20180327010114-90bb99a48d86 h1:hLYM35twiyKH44g36g+GFYODcrZQetEAY4+zrJtGea0= github.com/hashicorp/go-getter v0.0.0-20180327010114-90bb99a48d86/go.mod h1:6rdJFnhkXnzGOJbvkrdv4t9nLwKcVA+tmbQeUlkIzrU= -github.com/hashicorp/go-hclog v0.0.0-20171005151751-ca137eb4b438/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f h1:Yv9YzBlAETjy6AOX9eLBZ3nshNVRREgerT/3nvxlGho= github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= @@ -147,7 +140,6 @@ github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c/go.mod h1:ahL github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v0.0.0-20170816151819-a5174f84d7f8/go.mod h1:JSqWYsict+jzcj0+xElxyrBQRPNoiWQuddnxArJ7XHQ= github.com/hashicorp/go-plugin v0.0.0-20190212232519-b838ffee39ce h1:I3KJUf8jyMubLFeHit2ibr9YeVxJX2CXMXVM6xlB+Qk= github.com/hashicorp/go-plugin v0.0.0-20190212232519-b838ffee39ce/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.1 h1:Vsx5XKPqPs3M6sM4U4GWyUqFS8aBiL9U5gkgvpkg4SE= @@ -170,11 +162,9 @@ github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCO github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f h1:UdxlrJz4JOnY8W+DbLISwf2B8WXEolNRA8BGCwI9jws= github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= -github.com/hashicorp/hcl2 v0.0.0-20171003232734-44bad6dbf549/go.mod h1:xp1eMAxqhQKBxz+yQUTsig9bBMRRWRWw+rK3FJmHf/A= github.com/hashicorp/hcl2 v0.0.0-20181208003705-670926858200/go.mod h1:ShfpTh661oAaxo7VcNxg0zcZW6jvMa7Moy2oFx7e5dE= github.com/hashicorp/hcl2 v0.0.0-20190214011454-504b92060753 h1:8wCARxVLkMdcvxSaI2F/zL31FLQuAJkzIkayl5br8TY= github.com/hashicorp/hcl2 v0.0.0-20190214011454-504b92060753/go.mod h1:HtEzazM5AZ9fviNEof8QZB4T1Vz9UhHrGhnMPzl//Ek= -github.com/hashicorp/hil v0.0.0-20170512213305-fac2259da677/go.mod h1:KHvg/R2/dPtaePb16oW4qIyzkMxXOL38xjRN64adsts= github.com/hashicorp/hil v0.0.0-20190212112733-ab17b08d6590 h1:2yzhWGdgQUWZUCNK+AoO35V+HTsgEmcM4J9IkArh7PI= github.com/hashicorp/hil v0.0.0-20190212112733-ab17b08d6590/go.mod h1:n2TSygSNwsLJ76m8qFXTSc7beTb+auJxYdqrnoqwZWE= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= @@ -183,17 +173,13 @@ github.com/hashicorp/memberlist v0.1.0 h1:qSsCiC0WYD39lbSitKNt40e30uorm2Ss/d4JGU github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE= github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb h1:ZbgmOQt8DOg796figP87/EFCVx2v2h9yRvwHF/zceX4= github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE= -github.com/hashicorp/terraform v0.11.9-beta1/go.mod h1:uN1KUiT7Wdg61fPwsGXQwK3c8PmpIVZrt5Vcb1VrSoM= github.com/hashicorp/terraform-config-inspect v0.0.0-20190208230122-b0707673339c h1:nCnsfi66NloVlmquh5dLox5yBwQk5CV5s2roWvbstnE= github.com/hashicorp/terraform-config-inspect v0.0.0-20190208230122-b0707673339c/go.mod h1:ItvqtvbC3K23FFET62ZwnkwtpbKZm8t8eMcWjmVVjD8= github.com/hashicorp/vault v0.10.4 h1:4x0lHxui/ZRp/B3E0Auv1QNBJpzETqHR2kQD3mHSBJU= github.com/hashicorp/vault v0.10.4/go.mod h1:KfSyffbKxoVyspOdlaGVjIuwLobi07qD1bAbosPMpP0= -github.com/hashicorp/yamux v0.0.0-20160720233140-d1caa6c97c9f/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/jen20/awspolicyequivalence v1.0.0 h1:jLRh4GRf0IfIpMm9/m+krLnjAda4NpI9+2o5Kb/Q+G4= -github.com/jen20/awspolicyequivalence v1.0.0/go.mod h1:PV1fS2xyHhCLp83vbgSMFr2drM4GzG61wkz+k4pOG3E= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -201,8 +187,6 @@ github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0 github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926 h1:kie3qOosvRKqwij2HGzXWffwpXvcqfPPXRUw8I4F/mg= github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926/go.mod h1:U+RSyWxWd04xTqnuOQxnai7XGS2PrPY2cfGoDKtMHjA= -github.com/json-iterator/go v1.1.5 h1:gL2yXlmiIo4+t+y32d4WGwOjKGYcGOuyrg46vadswDE= -github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 h1:PJPDf8OUfOK1bb/NeTKd4f1QXZItOX389VN3B6qC8ro= @@ -216,8 +200,6 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kubernetes-sigs/aws-iam-authenticator v0.3.1-0.20181019024009-82544ec86140 h1:AtXWrgewhHlLux0IAfHINCbkxkf47euklyallWlximw= -github.com/kubernetes-sigs/aws-iam-authenticator v0.3.1-0.20181019024009-82544ec86140/go.mod h1:ItxiN33Ho7Di8wiC4S4XqbH1NLF0DNdDWOd/5MI9gJU= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82 h1:wnfcqULT+N2seWf6y4yHzmi7GD2kNx4Ute0qArktD48= @@ -240,7 +222,6 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.8 h1:Zi8HNpze3NeRWH1PQV6O71YcvJRQ6j0lORO6DAEmAAI= github.com/miekg/dns v1.0.8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v0.0.0-20170803042910-8a539dbef410/go.mod h1:oGumspjLm2kTyiT1QMGpFqRlmxnKHfCvhZEVnx+5UeE= github.com/mitchellh/cli v0.0.0-20171129193617-33edc47170b5 h1:OYr3N2fY3e3kP/x/d81CJXlcZrIV2hH8gPnuRLpiME4= github.com/mitchellh/cli v0.0.0-20171129193617-33edc47170b5/go.mod h1:oGumspjLm2kTyiT1QMGpFqRlmxnKHfCvhZEVnx+5UeE= github.com/mitchellh/colorstring v0.0.0-20150917214807-8631ce90f286 h1:KHyL+3mQOF9sPfs26lsefckcFNDcIZtiACQiECzIUkw= @@ -258,7 +239,6 @@ github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9 github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= -github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/panicwrap v0.0.0-20161208170302-ba9e1a65e0f7 h1:+PBI9A4rLQJlch3eQI/RkTY2HzX+bl2lPUf3goenBxs= @@ -267,10 +247,6 @@ github.com/mitchellh/prefixedio v0.0.0-20151214002211-6e6954073784 h1:+DAetXqxv/ github.com/mitchellh/prefixedio v0.0.0-20151214002211-6e6954073784/go.mod h1:kB1naBgV9ORnkiTVeyJOI1DavaJkG4oNIq0Af6ZVKUo= github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= @@ -287,12 +263,8 @@ github.com/pkg/errors v0.0.0-20170505043639-c605e284fe17 h1:chPfVn+gpAM5CTpTyVU9 github.com/pkg/errors v0.0.0-20170505043639-c605e284fe17/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v0.0.0-20170730193024-f4461a52b632/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v0.0.0-20171219111128-6bee943216c8 h1:lcb1zvdlaZyEbl2OXifN3uOYYyIvllofUbmp9bwbL+0= github.com/posener/complete v0.0.0-20171219111128-6bee943216c8/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/pquerna/otp v0.0.0-20180813144649-be78767b3e39/go.mod h1:Zad1CMQfSQZI5KLpahDiSUX4tMMREnXw98IvL1nhgMk= -github.com/pquerna/otp v1.0.0 h1:TBZrpfnzVbgmpYhiYBK+bJ4Ig0+ye+GGNMe2pTrvxCo= -github.com/pquerna/otp v1.0.0/go.mod h1:Zad1CMQfSQZI5KLpahDiSUX4tMMREnXw98IvL1nhgMk= github.com/prometheus/client_golang v0.8.0 h1:1921Yw9Gc3iSc4VQh3PIoOqgPCZS7G/4xQNVUp8Mda8= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8= @@ -319,24 +291,14 @@ github.com/spf13/afero v1.0.2 h1:5bRmqmInNmNFkI9NG9O0Xc/Lgl9wOWWUUA/O8XZqTCo= github.com/spf13/afero v1.0.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/pflag v1.0.2 h1:Fy0orTDgHdbnzHcsOgfCN4LtHf0ec3wwtiwJqwvf3Gc= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d h1:Z4EH+5EffvBEhh37F0C0DnpklTMh00JOkjW5zK3ofBI= github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw= -github.com/terraform-providers/terraform-provider-aws v1.58.0 h1:EiDfGqjIZ+VYL3WXOXzWQjU6dIt7peEc6XS1gpRTEL8= -github.com/terraform-providers/terraform-provider-aws v1.58.0/go.mod h1:18ma8mS6sWjWq3Ca+ARGxNRpohH6QaDhot5WQmFtIao= github.com/terraform-providers/terraform-provider-openstack v1.15.0 h1:adpjqej+F8BAX9dHmuPF47sUIkgifeqBu6p7iCsyj0Y= github.com/terraform-providers/terraform-provider-openstack v1.15.0/go.mod h1:2aQ6n/BtChAl1y2S60vebhyJyZXBsuAI5G4+lHrT1Ew= -github.com/terraform-providers/terraform-provider-template v0.1.1/go.mod h1:/J+B8me5DCMa0rEBH5ic2aKPjhtpWNeScmxFJWxB1EU= -github.com/terraform-providers/terraform-provider-template v1.0.0 h1:g2pyFaAJu369iAb7qGWmVwtQ15/35lRAfW91Je8wLjE= -github.com/terraform-providers/terraform-provider-template v1.0.0/go.mod h1:/J+B8me5DCMa0rEBH5ic2aKPjhtpWNeScmxFJWxB1EU= -github.com/terraform-providers/terraform-provider-tls v0.1.0/go.mod h1:Mxe/v5u31LDW4m32O1z6Ursdh95dpc9Puq6otkYg7tU= -github.com/terraform-providers/terraform-provider-tls v1.2.0 h1:wcD0InKzNh8fanUYQwim62WCd4toeD9WJnPw/RjBI4o= -github.com/terraform-providers/terraform-provider-tls v1.2.0/go.mod h1:Mxe/v5u31LDW4m32O1z6Ursdh95dpc9Puq6otkYg7tU= github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 h1:lYIiVDtZnyTWlNwiAxLj0bbpTcx1BWCFhXjfsvmPdNc= github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5 h1:cMjKdf4PxEBN9K5HaD9UMW8gkTbM0kMzkTa9SJe0WNQ= @@ -352,7 +314,6 @@ github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 h1:MPPkRncZLN9Kh4M github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557 h1:Jpn2j6wHkC9wJv5iMfJhKqrZJx3TahFx+7sbZ7zQdxs= github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/zclconf/go-cty v0.0.0-20180106055834-709e4033eeb0/go.mod h1:LnDKxj8gN4aatfXUqmUNooaDjvmDcLPbAN3hYBIVoJE= github.com/zclconf/go-cty v0.0.0-20181129180422-88fbe721e0f8/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v0.0.0-20190124225737-a385d646c1e9 h1:hHCAGde+QfwbqXSAqOmBd4NlOrJ6nmjWp+Nu408ezD4= github.com/zclconf/go-cty v0.0.0-20190124225737-a385d646c1e9/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= @@ -366,31 +327,29 @@ go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180110145155-b3c9a1d25cfb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180816225734-aabede6cba87/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85 h1:et7+NAX3lLIk5qUCTA9QelBjGE/NkhzYw/mhnr0s7nI= golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/net v0.0.0-20171024115130-4b14673ba32b/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181129055619-fae4c4e3ad76 h1:xx5MUFyRQRbPk6VjWjIE1epE/K5AoDD8QUN116NCy8k= golang.org/x/net v0.0.0-20181129055619-fae4c4e3ad76/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd h1:HuTn7WObtcDo9uEEU7rEqL0jYthdXAmZ6PP+meazmaU= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced h1:4oqSq7eft7MdPKBGQK11X9WYUxmj6ZLgGTqYIbY1kyw= golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170803140359-d8f5ea21b929/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc h1:WiYx1rIFmx8c0mXAFtv5D/mHyKe1+jmuP7PViuwqwuQ= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.0.0-20171024115504-6eab0e8f74e8/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg= @@ -401,19 +360,15 @@ google.golang.org/api v0.0.0-20181015145326-625cd1887957/go.mod h1:4mhQ8q/RsB7i+ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.3.0 h1:FBSsiFRMz3LBeXIomRnVzrQwSDj4ibvcRexLG0LZGQk= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20171002232614-f676e0f3ac63/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b h1:lohp5blsw53GBXtLyLNaTXPXS9pJ1tiTw61ZHUoE9Qw= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/grpc v0.0.0-20171025225919-b5eab4ccac6d/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0 h1:ArxJuB1NWfPY6r9Gp9gqwplT0Ge7nqv9msgu03lHLmo= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/vmihailenco/msgpack.v2 v2.9.1 h1:kb0VV7NuIojvRfzwslQeP3yArBqJHW9tOl4t38VS1jM= gopkg.in/vmihailenco/msgpack.v2 v2.9.1/go.mod h1:/3Dn1Npt9+MYyLpYYXjInO/5jvMLamn+AEGwNEOatn8= @@ -421,15 +376,7 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -k8s.io/apimachinery v0.0.0-20190204010555-a98ff070d70e h1:7HZ9Pkl78EapVMHYAVjF1128N/w6ke+aPyo64M9I2Ds= -k8s.io/apimachinery v0.0.0-20190204010555-a98ff070d70e/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= -k8s.io/client-go v10.0.0+incompatible h1:F1IqCqw7oMBzDkqlcBymRq1450wD0eNqLE9jzUrIi34= -k8s.io/client-go v10.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= -k8s.io/klog v0.1.0 h1:I5HMfc/DtuVaGR1KPwUrTc476K8NCqNBldC7H4dYEzk= -k8s.io/klog v0.1.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= labix.org/v2/mgo v0.0.0-20140701140051-000000000287 h1:L0cnkNl4TfAXzvdrqsYEmxOHOCv2p5I3taaReO8BWFs= labix.org/v2/mgo v0.0.0-20140701140051-000000000287/go.mod h1:Lg7AYkt1uXJoR9oeSZ3W/8IXLdvOfIITgZnommstyz4= launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= -sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= 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 97486c32b..96ddf8fca 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 @@ -321,9 +321,33 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "api-fips.sagemaker.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "api-fips.sagemaker.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "api-fips.sagemaker.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "api-fips.sagemaker.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "apigateway": service{ @@ -383,6 +407,7 @@ var awsPartition = partition{ }, Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, @@ -479,6 +504,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -873,7 +899,9 @@ var awsPartition = partition{ Protocols: []string{"https"}, }, Endpoints: endpoints{ + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, @@ -991,6 +1019,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -1191,6 +1220,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -1293,11 +1323,17 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips": endpoint{ + Hostname: "es-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "events": service{ @@ -1586,6 +1622,12 @@ var awsPartition = partition{ "kms": service{ Endpoints: endpoints{ + "ProdFips": endpoint{ + Hostname: "kms-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -1625,6 +1667,22 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "license-manager": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "lightsail": service{ Endpoints: endpoints{ @@ -1840,6 +1898,12 @@ var awsPartition = partition{ "neptune": service{ Endpoints: endpoints{ + "ap-northeast-1": endpoint{ + Hostname: "rds.ap-northeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-1", + }, + }, "ap-southeast-1": endpoint{ Hostname: "rds.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ @@ -2018,6 +2082,8 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, @@ -2469,6 +2535,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -2851,6 +2918,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, @@ -3206,6 +3274,12 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "gamelift": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + }, + }, "glacier": service{ Defaults: endpoint{ Protocols: []string{"http", "https"}, @@ -3486,6 +3560,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "athena": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "autoscaling": service{ Endpoints: endpoints{ @@ -3663,6 +3743,12 @@ var awsusgovPartition = partition{ "es": service{ Endpoints: endpoints{ + "fips": endpoint{ + Hostname: "es-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -3689,6 +3775,12 @@ var awsusgovPartition = partition{ }, }, }, + "glue": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "guardduty": service{ IsRegionalized: boxedTrue, Defaults: endpoint{ @@ -3738,6 +3830,12 @@ var awsusgovPartition = partition{ "kms": service{ Endpoints: endpoints{ + "ProdFips": endpoint{ + Hostname: "kms-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -3973,5 +4071,11 @@ var awsusgovPartition = partition{ }, }, }, + "workspaces": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, }, } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 000c839b7..ab6cee169 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.16.26" +const SDKVersion = "1.16.36" diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build.go deleted file mode 100644 index 3104e6ce4..000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build.go +++ /dev/null @@ -1,35 +0,0 @@ -// Package ec2query provides serialization of AWS EC2 requests and responses. -package ec2query - -//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/input/ec2.json build_test.go - -import ( - "net/url" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol/query/queryutil" -) - -// BuildHandler is a named request handler for building ec2query protocol requests -var BuildHandler = request.NamedHandler{Name: "awssdk.ec2query.Build", Fn: Build} - -// Build builds a request for the EC2 protocol. -func Build(r *request.Request) { - body := url.Values{ - "Action": {r.Operation.Name}, - "Version": {r.ClientInfo.APIVersion}, - } - if err := queryutil.Parse(body, r.Params, true); err != nil { - r.Error = awserr.New("SerializationError", "failed encoding EC2 Query request", err) - } - - if !r.IsPresigned() { - r.HTTPRequest.Method = "POST" - r.HTTPRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8") - r.SetBufferBody([]byte(body.Encode())) - } else { // This is a pre-signed request - r.HTTPRequest.Method = "GET" - r.HTTPRequest.URL.RawQuery = body.Encode() - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go deleted file mode 100644 index 5793c0473..000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go +++ /dev/null @@ -1,71 +0,0 @@ -package ec2query - -//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/output/ec2.json unmarshal_test.go - -import ( - "encoding/xml" - "io" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" -) - -// UnmarshalHandler is a named request handler for unmarshaling ec2query protocol requests -var UnmarshalHandler = request.NamedHandler{Name: "awssdk.ec2query.Unmarshal", Fn: Unmarshal} - -// UnmarshalMetaHandler is a named request handler for unmarshaling ec2query protocol request metadata -var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.ec2query.UnmarshalMeta", Fn: UnmarshalMeta} - -// UnmarshalErrorHandler is a named request handler for unmarshaling ec2query protocol request errors -var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.ec2query.UnmarshalError", Fn: UnmarshalError} - -// Unmarshal unmarshals a response body for the EC2 protocol. -func Unmarshal(r *request.Request) { - defer r.HTTPResponse.Body.Close() - if r.DataFilled() { - decoder := xml.NewDecoder(r.HTTPResponse.Body) - err := xmlutil.UnmarshalXML(r.Data, decoder, "") - if err != nil { - r.Error = awserr.NewRequestFailure( - awserr.New("SerializationError", "failed decoding EC2 Query response", err), - r.HTTPResponse.StatusCode, - r.RequestID, - ) - return - } - } -} - -// UnmarshalMeta unmarshals response headers for the EC2 protocol. -func UnmarshalMeta(r *request.Request) { - // TODO implement unmarshaling of request IDs -} - -type xmlErrorResponse struct { - XMLName xml.Name `xml:"Response"` - Code string `xml:"Errors>Error>Code"` - Message string `xml:"Errors>Error>Message"` - RequestID string `xml:"RequestID"` -} - -// UnmarshalError unmarshals a response error for the EC2 protocol. -func UnmarshalError(r *request.Request) { - defer r.HTTPResponse.Body.Close() - - resp := &xmlErrorResponse{} - err := xml.NewDecoder(r.HTTPResponse.Body).Decode(resp) - if err != nil && err != io.EOF { - r.Error = awserr.NewRequestFailure( - awserr.New("SerializationError", "failed decoding EC2 Query error response", err), - r.HTTPResponse.StatusCode, - r.RequestID, - ) - } else { - r.Error = awserr.NewRequestFailure( - awserr.New(resp.Code, resp.Message, nil), - r.HTTPResponse.StatusCode, - resp.RequestID, - ) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go deleted file mode 100644 index de8adce63..000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go +++ /dev/null @@ -1,92 +0,0 @@ -// Package restjson provides RESTful JSON serialization of AWS -// requests and responses. -package restjson - -//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/input/rest-json.json build_test.go -//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/output/rest-json.json unmarshal_test.go - -import ( - "encoding/json" - "io" - "strings" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" - "github.com/aws/aws-sdk-go/private/protocol/rest" -) - -// BuildHandler is a named request handler for building restjson protocol requests -var BuildHandler = request.NamedHandler{Name: "awssdk.restjson.Build", Fn: Build} - -// UnmarshalHandler is a named request handler for unmarshaling restjson protocol requests -var UnmarshalHandler = request.NamedHandler{Name: "awssdk.restjson.Unmarshal", Fn: Unmarshal} - -// UnmarshalMetaHandler is a named request handler for unmarshaling restjson protocol request metadata -var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.restjson.UnmarshalMeta", Fn: UnmarshalMeta} - -// UnmarshalErrorHandler is a named request handler for unmarshaling restjson protocol request errors -var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.restjson.UnmarshalError", Fn: UnmarshalError} - -// Build builds a request for the REST JSON protocol. -func Build(r *request.Request) { - rest.Build(r) - - if t := rest.PayloadType(r.Params); t == "structure" || t == "" { - jsonrpc.Build(r) - } -} - -// Unmarshal unmarshals a response body for the REST JSON protocol. -func Unmarshal(r *request.Request) { - if t := rest.PayloadType(r.Data); t == "structure" || t == "" { - jsonrpc.Unmarshal(r) - } else { - rest.Unmarshal(r) - } -} - -// UnmarshalMeta unmarshals response headers for the REST JSON protocol. -func UnmarshalMeta(r *request.Request) { - rest.UnmarshalMeta(r) -} - -// UnmarshalError unmarshals a response error for the REST JSON protocol. -func UnmarshalError(r *request.Request) { - defer r.HTTPResponse.Body.Close() - - var jsonErr jsonErrorResponse - err := json.NewDecoder(r.HTTPResponse.Body).Decode(&jsonErr) - if err == io.EOF { - r.Error = awserr.NewRequestFailure( - awserr.New("SerializationError", r.HTTPResponse.Status, nil), - r.HTTPResponse.StatusCode, - r.RequestID, - ) - return - } else if err != nil { - r.Error = awserr.NewRequestFailure( - awserr.New("SerializationError", "failed decoding REST JSON error response", err), - r.HTTPResponse.StatusCode, - r.RequestID, - ) - return - } - - code := r.HTTPResponse.Header.Get("X-Amzn-Errortype") - if code == "" { - code = jsonErr.Code - } - - code = strings.SplitN(code, ":", 2)[0] - r.Error = awserr.NewRequestFailure( - awserr.New(code, jsonErr.Message, nil), - r.HTTPResponse.StatusCode, - r.RequestID, - ) -} - -type jsonErrorResponse struct { - Code string `json:"code"` - Message string `json:"message"` -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/signer/v2/v2.go b/vendor/github.com/aws/aws-sdk-go/private/signer/v2/v2.go deleted file mode 100644 index 88c3a2f61..000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/signer/v2/v2.go +++ /dev/null @@ -1,180 +0,0 @@ -package v2 - -import ( - "crypto/hmac" - "crypto/sha256" - "encoding/base64" - "errors" - "fmt" - "net/http" - "net/url" - "sort" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/aws/request" -) - -var ( - errInvalidMethod = errors.New("v2 signer only handles HTTP POST") -) - -const ( - signatureVersion = "2" - signatureMethod = "HmacSHA256" - timeFormat = "2006-01-02T15:04:05Z" -) - -type signer struct { - // Values that must be populated from the request - Request *http.Request - Time time.Time - Credentials *credentials.Credentials - Debug aws.LogLevelType - Logger aws.Logger - - Query url.Values - stringToSign string - signature string -} - -// SignRequestHandler is a named request handler the SDK will use to sign -// service client request with using the V4 signature. -var SignRequestHandler = request.NamedHandler{ - Name: "v2.SignRequestHandler", Fn: SignSDKRequest, -} - -// SignSDKRequest requests with signature version 2. -// -// Will sign the requests with the service config's Credentials object -// Signing is skipped if the credentials is the credentials.AnonymousCredentials -// object. -func SignSDKRequest(req *request.Request) { - // If the request does not need to be signed ignore the signing of the - // request if the AnonymousCredentials object is used. - if req.Config.Credentials == credentials.AnonymousCredentials { - return - } - - if req.HTTPRequest.Method != "POST" && req.HTTPRequest.Method != "GET" { - // The V2 signer only supports GET and POST - req.Error = errInvalidMethod - return - } - - v2 := signer{ - Request: req.HTTPRequest, - Time: req.Time, - Credentials: req.Config.Credentials, - Debug: req.Config.LogLevel.Value(), - Logger: req.Config.Logger, - } - - req.Error = v2.Sign() - - if req.Error != nil { - return - } - - if req.HTTPRequest.Method == "POST" { - // Set the body of the request based on the modified query parameters - req.SetStringBody(v2.Query.Encode()) - - // Now that the body has changed, remove any Content-Length header, - // because it will be incorrect - req.HTTPRequest.ContentLength = 0 - req.HTTPRequest.Header.Del("Content-Length") - } else { - req.HTTPRequest.URL.RawQuery = v2.Query.Encode() - } -} - -func (v2 *signer) Sign() error { - credValue, err := v2.Credentials.Get() - if err != nil { - return err - } - - if v2.Request.Method == "POST" { - // Parse the HTTP request to obtain the query parameters that will - // be used to build the string to sign. Note that because the HTTP - // request will need to be modified, the PostForm and Form properties - // are reset to nil after parsing. - v2.Request.ParseForm() - v2.Query = v2.Request.PostForm - v2.Request.PostForm = nil - v2.Request.Form = nil - } else { - v2.Query = v2.Request.URL.Query() - } - - // Set new query parameters - v2.Query.Set("AWSAccessKeyId", credValue.AccessKeyID) - v2.Query.Set("SignatureVersion", signatureVersion) - v2.Query.Set("SignatureMethod", signatureMethod) - v2.Query.Set("Timestamp", v2.Time.UTC().Format(timeFormat)) - if credValue.SessionToken != "" { - v2.Query.Set("SecurityToken", credValue.SessionToken) - } - - // in case this is a retry, ensure no signature present - v2.Query.Del("Signature") - - method := v2.Request.Method - host := v2.Request.URL.Host - path := v2.Request.URL.Path - if path == "" { - path = "/" - } - - // obtain all of the query keys and sort them - queryKeys := make([]string, 0, len(v2.Query)) - for key := range v2.Query { - queryKeys = append(queryKeys, key) - } - sort.Strings(queryKeys) - - // build URL-encoded query keys and values - queryKeysAndValues := make([]string, len(queryKeys)) - for i, key := range queryKeys { - k := strings.Replace(url.QueryEscape(key), "+", "%20", -1) - v := strings.Replace(url.QueryEscape(v2.Query.Get(key)), "+", "%20", -1) - queryKeysAndValues[i] = k + "=" + v - } - - // join into one query string - query := strings.Join(queryKeysAndValues, "&") - - // build the canonical string for the V2 signature - v2.stringToSign = strings.Join([]string{ - method, - host, - path, - query, - }, "\n") - - hash := hmac.New(sha256.New, []byte(credValue.SecretAccessKey)) - hash.Write([]byte(v2.stringToSign)) - v2.signature = base64.StdEncoding.EncodeToString(hash.Sum(nil)) - v2.Query.Set("Signature", v2.signature) - - if v2.Debug.Matches(aws.LogDebugWithSigning) { - v2.logSigningInfo() - } - - return nil -} - -const logSignInfoMsg = `DEBUG: Request Signature: ----[ STRING TO SIGN ]-------------------------------- -%s ----[ SIGNATURE ]------------------------------------- -%s ------------------------------------------------------` - -func (v2 *signer) logSigningInfo() { - msg := fmt.Sprintf(logSignInfoMsg, v2.stringToSign, v2.Query.Get("Signature")) - v2.Logger.Log(msg) -} 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 deleted file mode 100644 index e9c70c771..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go +++ /dev/null @@ -1,3418 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package acm - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAddTagsToCertificate = "AddTagsToCertificate" - -// AddTagsToCertificateRequest generates a "aws/request.Request" representing the -// client's request for the AddTagsToCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTagsToCertificate for more information on using the AddTagsToCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsToCertificateRequest method. -// req, resp := client.AddTagsToCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/AddTagsToCertificate -func (c *ACM) AddTagsToCertificateRequest(input *AddTagsToCertificateInput) (req *request.Request, output *AddTagsToCertificateOutput) { - op := &request.Operation{ - Name: opAddTagsToCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsToCertificateInput{} - } - - output = &AddTagsToCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTagsToCertificate API operation for AWS Certificate Manager. -// -// Adds one or more tags to an ACM certificate. Tags are labels that you can -// use to identify and organize your AWS resources. Each tag consists of a key -// and an optional value. You specify the certificate on input by its Amazon -// Resource Name (ARN). You specify the tag by using a key-value pair. -// -// You can apply a tag to just one certificate if you want to identify a specific -// characteristic of that certificate, or you can apply the same tag to multiple -// certificates if you want to filter for a common relationship among those -// certificates. Similarly, you can apply the same tag to multiple resources -// if you want to specify a relationship among those resources. For example, -// you can add the same tag to an ACM certificate and an Elastic Load Balancing -// load balancer to indicate that they are both used by the same website. For -// more information, see Tagging ACM certificates (http://docs.aws.amazon.com/acm/latest/userguide/tags.html). -// -// To remove one or more tags, use the RemoveTagsFromCertificate action. To -// view all of the tags that have been applied to the certificate, use the ListTagsForCertificate -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager's -// API operation AddTagsToCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified certificate cannot be found in the caller's account or the -// caller's account cannot be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeInvalidTagException "InvalidTagException" -// One or both of the values that make up the key-value pair is not valid. For -// example, you cannot specify a tag value that begins with aws:. -// -// * ErrCodeTooManyTagsException "TooManyTagsException" -// The request contains too many tags. Try the request again with fewer tags. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/AddTagsToCertificate -func (c *ACM) AddTagsToCertificate(input *AddTagsToCertificateInput) (*AddTagsToCertificateOutput, error) { - req, out := c.AddTagsToCertificateRequest(input) - return out, req.Send() -} - -// AddTagsToCertificateWithContext is the same as AddTagsToCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See AddTagsToCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACM) AddTagsToCertificateWithContext(ctx aws.Context, input *AddTagsToCertificateInput, opts ...request.Option) (*AddTagsToCertificateOutput, error) { - req, out := c.AddTagsToCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCertificate = "DeleteCertificate" - -// DeleteCertificateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCertificate for more information on using the DeleteCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCertificateRequest method. -// req, resp := client.DeleteCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/DeleteCertificate -func (c *ACM) DeleteCertificateRequest(input *DeleteCertificateInput) (req *request.Request, output *DeleteCertificateOutput) { - op := &request.Operation{ - Name: opDeleteCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCertificateInput{} - } - - output = &DeleteCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCertificate API operation for AWS Certificate Manager. -// -// Deletes a certificate and its associated private key. If this action succeeds, -// the certificate no longer appears in the list that can be displayed by calling -// the ListCertificates action or be retrieved by calling the GetCertificate -// action. The certificate will not be available for use by AWS services integrated -// with ACM. -// -// You cannot delete an ACM certificate that is being used by another AWS service. -// To delete a certificate that is in use, the certificate association must -// first be removed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager's -// API operation DeleteCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified certificate cannot be found in the caller's account or the -// caller's account cannot be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The certificate is in use by another AWS service in the caller's account. -// Remove the association and try again. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/DeleteCertificate -func (c *ACM) DeleteCertificate(input *DeleteCertificateInput) (*DeleteCertificateOutput, error) { - req, out := c.DeleteCertificateRequest(input) - return out, req.Send() -} - -// DeleteCertificateWithContext is the same as DeleteCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACM) DeleteCertificateWithContext(ctx aws.Context, input *DeleteCertificateInput, opts ...request.Option) (*DeleteCertificateOutput, error) { - req, out := c.DeleteCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCertificate = "DescribeCertificate" - -// DescribeCertificateRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCertificate for more information on using the DescribeCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCertificateRequest method. -// req, resp := client.DescribeCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/DescribeCertificate -func (c *ACM) DescribeCertificateRequest(input *DescribeCertificateInput) (req *request.Request, output *DescribeCertificateOutput) { - op := &request.Operation{ - Name: opDescribeCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCertificateInput{} - } - - output = &DescribeCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCertificate API operation for AWS Certificate Manager. -// -// Returns detailed metadata about the specified ACM certificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager's -// API operation DescribeCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified certificate cannot be found in the caller's account or the -// caller's account cannot be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/DescribeCertificate -func (c *ACM) DescribeCertificate(input *DescribeCertificateInput) (*DescribeCertificateOutput, error) { - req, out := c.DescribeCertificateRequest(input) - return out, req.Send() -} - -// DescribeCertificateWithContext is the same as DescribeCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACM) DescribeCertificateWithContext(ctx aws.Context, input *DescribeCertificateInput, opts ...request.Option) (*DescribeCertificateOutput, error) { - req, out := c.DescribeCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opExportCertificate = "ExportCertificate" - -// ExportCertificateRequest generates a "aws/request.Request" representing the -// client's request for the ExportCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ExportCertificate for more information on using the ExportCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ExportCertificateRequest method. -// req, resp := client.ExportCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/ExportCertificate -func (c *ACM) ExportCertificateRequest(input *ExportCertificateInput) (req *request.Request, output *ExportCertificateOutput) { - op := &request.Operation{ - Name: opExportCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ExportCertificateInput{} - } - - output = &ExportCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// ExportCertificate API operation for AWS Certificate Manager. -// -// Exports a private certificate issued by a private certificate authority (CA) -// for use anywhere. You can export the certificate, the certificate chain, -// and the encrypted private key associated with the public key embedded in -// the certificate. You must store the private key securely. The private key -// is a 2048 bit RSA key. You must provide a passphrase for the private key -// when exporting it. You can use the following OpenSSL command to decrypt it -// later. Provide the passphrase when prompted. -// -// openssl rsa -in encrypted_key.pem -out decrypted_key.pem -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager's -// API operation ExportCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified certificate cannot be found in the caller's account or the -// caller's account cannot be found. -// -// * ErrCodeRequestInProgressException "RequestInProgressException" -// The certificate request is in process and the certificate in your account -// has not yet been issued. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/ExportCertificate -func (c *ACM) ExportCertificate(input *ExportCertificateInput) (*ExportCertificateOutput, error) { - req, out := c.ExportCertificateRequest(input) - return out, req.Send() -} - -// ExportCertificateWithContext is the same as ExportCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See ExportCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACM) ExportCertificateWithContext(ctx aws.Context, input *ExportCertificateInput, opts ...request.Option) (*ExportCertificateOutput, error) { - req, out := c.ExportCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCertificate = "GetCertificate" - -// GetCertificateRequest generates a "aws/request.Request" representing the -// client's request for the GetCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCertificate for more information on using the GetCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCertificateRequest method. -// req, resp := client.GetCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/GetCertificate -func (c *ACM) GetCertificateRequest(input *GetCertificateInput) (req *request.Request, output *GetCertificateOutput) { - op := &request.Operation{ - Name: opGetCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCertificateInput{} - } - - output = &GetCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCertificate API operation for AWS Certificate Manager. -// -// Retrieves a certificate specified by an ARN and its certificate chain . The -// chain is an ordered list of certificates that contains the end entity certificate, -// intermediate certificates of subordinate CAs, and the root certificate in -// that order. The certificate and certificate chain are base64 encoded. If -// you want to decode the certificate to see the individual fields, you can -// use OpenSSL. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager's -// API operation GetCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified certificate cannot be found in the caller's account or the -// caller's account cannot be found. -// -// * ErrCodeRequestInProgressException "RequestInProgressException" -// The certificate request is in process and the certificate in your account -// has not yet been issued. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/GetCertificate -func (c *ACM) GetCertificate(input *GetCertificateInput) (*GetCertificateOutput, error) { - req, out := c.GetCertificateRequest(input) - return out, req.Send() -} - -// GetCertificateWithContext is the same as GetCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See GetCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACM) GetCertificateWithContext(ctx aws.Context, input *GetCertificateInput, opts ...request.Option) (*GetCertificateOutput, error) { - req, out := c.GetCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportCertificate = "ImportCertificate" - -// ImportCertificateRequest generates a "aws/request.Request" representing the -// client's request for the ImportCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportCertificate for more information on using the ImportCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportCertificateRequest method. -// req, resp := client.ImportCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/ImportCertificate -func (c *ACM) ImportCertificateRequest(input *ImportCertificateInput) (req *request.Request, output *ImportCertificateOutput) { - op := &request.Operation{ - Name: opImportCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportCertificateInput{} - } - - output = &ImportCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// ImportCertificate API operation for AWS Certificate Manager. -// -// Imports a certificate into AWS Certificate Manager (ACM) to use with services -// that are integrated with ACM. Note that integrated services (http://docs.aws.amazon.com/acm/latest/userguide/acm-services.html) -// allow only certificate types and keys they support to be associated with -// their resources. Further, their support differs depending on whether the -// certificate is imported into IAM or into ACM. For more information, see the -// documentation for each service. For more information about importing certificates -// into ACM, see Importing Certificates (http://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) -// in the AWS Certificate Manager User Guide. -// -// ACM does not provide managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) -// for certificates that you import. -// -// Note the following guidelines when importing third party certificates: -// -// * You must enter the private key that matches the certificate you are -// importing. -// -// * The private key must be unencrypted. You cannot import a private key -// that is protected by a password or a passphrase. -// -// * If the certificate you are importing is not self-signed, you must enter -// its certificate chain. -// -// * If a certificate chain is included, the issuer must be the subject of -// one of the certificates in the chain. -// -// * The certificate, private key, and certificate chain must be PEM-encoded. -// -// * The current time must be between the Not Before and Not After certificate -// fields. -// -// * The Issuer field must not be empty. -// -// * The OCSP authority URL, if present, must not exceed 1000 characters. -// -// * To import a new certificate, omit the CertificateArn argument. Include -// this argument only when you want to replace a previously imported certificate. -// -// * When you import a certificate by using the CLI, you must specify the -// certificate, the certificate chain, and the private key by their file -// names preceded by file://. For example, you can specify a certificate -// saved in the C:\temp folder as file://C:\temp\certificate_to_import.pem. -// If you are making an HTTP or HTTPS Query request, include these arguments -// as BLOBs. -// -// * When you import a certificate by using an SDK, you must specify the -// certificate, the certificate chain, and the private key files in the manner -// required by the programming language you're using. -// -// This operation returns the Amazon Resource Name (ARN) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) -// of the imported certificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager's -// API operation ImportCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified certificate cannot be found in the caller's account or the -// caller's account cannot be found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// An ACM limit has been exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/ImportCertificate -func (c *ACM) ImportCertificate(input *ImportCertificateInput) (*ImportCertificateOutput, error) { - req, out := c.ImportCertificateRequest(input) - return out, req.Send() -} - -// ImportCertificateWithContext is the same as ImportCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See ImportCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACM) ImportCertificateWithContext(ctx aws.Context, input *ImportCertificateInput, opts ...request.Option) (*ImportCertificateOutput, error) { - req, out := c.ImportCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListCertificates = "ListCertificates" - -// ListCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the ListCertificates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListCertificates for more information on using the ListCertificates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListCertificatesRequest method. -// req, resp := client.ListCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/ListCertificates -func (c *ACM) ListCertificatesRequest(input *ListCertificatesInput) (req *request.Request, output *ListCertificatesOutput) { - op := &request.Operation{ - Name: opListCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxItems", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListCertificatesInput{} - } - - output = &ListCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCertificates API operation for AWS Certificate Manager. -// -// Retrieves a list of certificate ARNs and domain names. You can request that -// only certificates that match a specific status be listed. You can also filter -// by specific attributes of the certificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager's -// API operation ListCertificates for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/ListCertificates -func (c *ACM) ListCertificates(input *ListCertificatesInput) (*ListCertificatesOutput, error) { - req, out := c.ListCertificatesRequest(input) - return out, req.Send() -} - -// ListCertificatesWithContext is the same as ListCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See ListCertificates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACM) ListCertificatesWithContext(ctx aws.Context, input *ListCertificatesInput, opts ...request.Option) (*ListCertificatesOutput, error) { - req, out := c.ListCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListCertificatesPages iterates over the pages of a ListCertificates operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListCertificates 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 ListCertificates operation. -// pageNum := 0 -// err := client.ListCertificatesPages(params, -// func(page *ListCertificatesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ACM) ListCertificatesPages(input *ListCertificatesInput, fn func(*ListCertificatesOutput, bool) bool) error { - return c.ListCertificatesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListCertificatesPagesWithContext same as ListCertificatesPages 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 *ACM) ListCertificatesPagesWithContext(ctx aws.Context, input *ListCertificatesInput, fn func(*ListCertificatesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListCertificatesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListCertificatesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCertificatesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTagsForCertificate = "ListTagsForCertificate" - -// ListTagsForCertificateRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTagsForCertificate for more information on using the ListTagsForCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsForCertificateRequest method. -// req, resp := client.ListTagsForCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/ListTagsForCertificate -func (c *ACM) ListTagsForCertificateRequest(input *ListTagsForCertificateInput) (req *request.Request, output *ListTagsForCertificateOutput) { - op := &request.Operation{ - Name: opListTagsForCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForCertificateInput{} - } - - output = &ListTagsForCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForCertificate API operation for AWS Certificate Manager. -// -// Lists the tags that have been applied to the ACM certificate. Use the certificate's -// Amazon Resource Name (ARN) to specify the certificate. To add a tag to an -// ACM certificate, use the AddTagsToCertificate action. To delete a tag, use -// the RemoveTagsFromCertificate action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager's -// API operation ListTagsForCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified certificate cannot be found in the caller's account or the -// caller's account cannot be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/ListTagsForCertificate -func (c *ACM) ListTagsForCertificate(input *ListTagsForCertificateInput) (*ListTagsForCertificateOutput, error) { - req, out := c.ListTagsForCertificateRequest(input) - return out, req.Send() -} - -// ListTagsForCertificateWithContext is the same as ListTagsForCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See ListTagsForCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACM) ListTagsForCertificateWithContext(ctx aws.Context, input *ListTagsForCertificateInput, opts ...request.Option) (*ListTagsForCertificateOutput, error) { - req, out := c.ListTagsForCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTagsFromCertificate = "RemoveTagsFromCertificate" - -// RemoveTagsFromCertificateRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTagsFromCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTagsFromCertificate for more information on using the RemoveTagsFromCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsFromCertificateRequest method. -// req, resp := client.RemoveTagsFromCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/RemoveTagsFromCertificate -func (c *ACM) RemoveTagsFromCertificateRequest(input *RemoveTagsFromCertificateInput) (req *request.Request, output *RemoveTagsFromCertificateOutput) { - op := &request.Operation{ - Name: opRemoveTagsFromCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsFromCertificateInput{} - } - - output = &RemoveTagsFromCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTagsFromCertificate API operation for AWS Certificate Manager. -// -// Remove one or more tags from an ACM certificate. A tag consists of a key-value -// pair. If you do not specify the value portion of the tag when calling this -// function, the tag will be removed regardless of value. If you specify a value, -// the tag is removed only if it is associated with the specified value. -// -// To add tags to a certificate, use the AddTagsToCertificate action. To view -// all of the tags that have been applied to a specific ACM certificate, use -// the ListTagsForCertificate action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager's -// API operation RemoveTagsFromCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified certificate cannot be found in the caller's account or the -// caller's account cannot be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeInvalidTagException "InvalidTagException" -// One or both of the values that make up the key-value pair is not valid. For -// example, you cannot specify a tag value that begins with aws:. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/RemoveTagsFromCertificate -func (c *ACM) RemoveTagsFromCertificate(input *RemoveTagsFromCertificateInput) (*RemoveTagsFromCertificateOutput, error) { - req, out := c.RemoveTagsFromCertificateRequest(input) - return out, req.Send() -} - -// RemoveTagsFromCertificateWithContext is the same as RemoveTagsFromCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTagsFromCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACM) RemoveTagsFromCertificateWithContext(ctx aws.Context, input *RemoveTagsFromCertificateInput, opts ...request.Option) (*RemoveTagsFromCertificateOutput, error) { - req, out := c.RemoveTagsFromCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRequestCertificate = "RequestCertificate" - -// RequestCertificateRequest generates a "aws/request.Request" representing the -// client's request for the RequestCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RequestCertificate for more information on using the RequestCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RequestCertificateRequest method. -// req, resp := client.RequestCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/RequestCertificate -func (c *ACM) RequestCertificateRequest(input *RequestCertificateInput) (req *request.Request, output *RequestCertificateOutput) { - op := &request.Operation{ - Name: opRequestCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RequestCertificateInput{} - } - - output = &RequestCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// RequestCertificate API operation for AWS Certificate Manager. -// -// Requests an ACM certificate for use with other AWS services. To request an -// ACM certificate, you must specify a fully qualified domain name (FQDN) in -// the DomainName parameter. You can also specify additional FQDNs in the SubjectAlternativeNames -// parameter. -// -// If you are requesting a private certificate, domain validation is not required. -// If you are requesting a public certificate, each domain name that you specify -// must be validated to verify that you own or control the domain. You can use -// DNS validation (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html) -// or email validation (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html). -// We recommend that you use DNS validation. ACM issues public certificates -// after receiving approval from the domain owner. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager's -// API operation RequestCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// An ACM limit has been exceeded. -// -// * ErrCodeInvalidDomainValidationOptionsException "InvalidDomainValidationOptionsException" -// One or more values in the DomainValidationOption structure is incorrect. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/RequestCertificate -func (c *ACM) RequestCertificate(input *RequestCertificateInput) (*RequestCertificateOutput, error) { - req, out := c.RequestCertificateRequest(input) - return out, req.Send() -} - -// RequestCertificateWithContext is the same as RequestCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See RequestCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACM) RequestCertificateWithContext(ctx aws.Context, input *RequestCertificateInput, opts ...request.Option) (*RequestCertificateOutput, error) { - req, out := c.RequestCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResendValidationEmail = "ResendValidationEmail" - -// ResendValidationEmailRequest generates a "aws/request.Request" representing the -// client's request for the ResendValidationEmail operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResendValidationEmail for more information on using the ResendValidationEmail -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResendValidationEmailRequest method. -// req, resp := client.ResendValidationEmailRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/ResendValidationEmail -func (c *ACM) ResendValidationEmailRequest(input *ResendValidationEmailInput) (req *request.Request, output *ResendValidationEmailOutput) { - op := &request.Operation{ - Name: opResendValidationEmail, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResendValidationEmailInput{} - } - - output = &ResendValidationEmailOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ResendValidationEmail API operation for AWS Certificate Manager. -// -// Resends the email that requests domain ownership validation. The domain owner -// or an authorized representative must approve the ACM certificate before it -// can be issued. The certificate can be approved by clicking a link in the -// mail to navigate to the Amazon certificate approval website and then clicking -// I Approve. However, the validation email can be blocked by spam filters. -// Therefore, if you do not receive the original mail, you can request that -// the mail be resent within 72 hours of requesting the ACM certificate. If -// more than 72 hours have elapsed since your original request or since your -// last attempt to resend validation mail, you must request a new certificate. -// For more information about setting up your contact email addresses, see Configure -// Email for your Domain (http://docs.aws.amazon.com/acm/latest/userguide/setup-email.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager's -// API operation ResendValidationEmail for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified certificate cannot be found in the caller's account or the -// caller's account cannot be found. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// Processing has reached an invalid state. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeInvalidDomainValidationOptionsException "InvalidDomainValidationOptionsException" -// One or more values in the DomainValidationOption structure is incorrect. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/ResendValidationEmail -func (c *ACM) ResendValidationEmail(input *ResendValidationEmailInput) (*ResendValidationEmailOutput, error) { - req, out := c.ResendValidationEmailRequest(input) - return out, req.Send() -} - -// ResendValidationEmailWithContext is the same as ResendValidationEmail with the addition of -// the ability to pass a context and additional request options. -// -// See ResendValidationEmail for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACM) ResendValidationEmailWithContext(ctx aws.Context, input *ResendValidationEmailInput, opts ...request.Option) (*ResendValidationEmailOutput, error) { - req, out := c.ResendValidationEmailRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateCertificateOptions = "UpdateCertificateOptions" - -// UpdateCertificateOptionsRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCertificateOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateCertificateOptions for more information on using the UpdateCertificateOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateCertificateOptionsRequest method. -// req, resp := client.UpdateCertificateOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/UpdateCertificateOptions -func (c *ACM) UpdateCertificateOptionsRequest(input *UpdateCertificateOptionsInput) (req *request.Request, output *UpdateCertificateOptionsOutput) { - op := &request.Operation{ - Name: opUpdateCertificateOptions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateCertificateOptionsInput{} - } - - output = &UpdateCertificateOptionsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateCertificateOptions API operation for AWS Certificate Manager. -// -// Updates a certificate. Currently, you can use this function to specify whether -// to opt in to or out of recording your certificate in a certificate transparency -// log. For more information, see Opting Out of Certificate Transparency Logging -// (http://docs.aws.amazon.com/acm/latest/userguide/acm-bestpractices.html#best-practices-transparency). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager's -// API operation UpdateCertificateOptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified certificate cannot be found in the caller's account or the -// caller's account cannot be found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// An ACM limit has been exceeded. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// Processing has reached an invalid state. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/UpdateCertificateOptions -func (c *ACM) UpdateCertificateOptions(input *UpdateCertificateOptionsInput) (*UpdateCertificateOptionsOutput, error) { - req, out := c.UpdateCertificateOptionsRequest(input) - return out, req.Send() -} - -// UpdateCertificateOptionsWithContext is the same as UpdateCertificateOptions with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCertificateOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACM) UpdateCertificateOptionsWithContext(ctx aws.Context, input *UpdateCertificateOptionsInput, opts ...request.Option) (*UpdateCertificateOptionsOutput, error) { - req, out := c.UpdateCertificateOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AddTagsToCertificateInput struct { - _ struct{} `type:"structure"` - - // String that contains the ARN of the ACM certificate to which the tag is to - // be applied. This must be of the form: - // - // arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012 - // - // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS - // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // CertificateArn is a required field - CertificateArn *string `min:"20" type:"string" required:"true"` - - // The key-value pair that defines the tag. The tag value is optional. - // - // Tags is a required field - Tags []*Tag `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsToCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsToCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsToCertificateInput"} - if s.CertificateArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateArn")) - } - if s.CertificateArn != nil && len(*s.CertificateArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *AddTagsToCertificateInput) SetCertificateArn(v string) *AddTagsToCertificateInput { - s.CertificateArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsToCertificateInput) SetTags(v []*Tag) *AddTagsToCertificateInput { - s.Tags = v - return s -} - -type AddTagsToCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsToCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToCertificateOutput) GoString() string { - return s.String() -} - -// Contains metadata about an ACM certificate. This structure is returned in -// the response to a DescribeCertificate request. -type CertificateDetail struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the certificate. For more information about - // ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the AWS General Reference. - CertificateArn *string `min:"20" type:"string"` - - // The Amazon Resource Name (ARN) of the ACM PCA private certificate authority - // (CA) that issued the certificate. This has the following format: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 - CertificateAuthorityArn *string `min:"20" type:"string"` - - // The time at which the certificate was requested. This value exists only when - // the certificate type is AMAZON_ISSUED. - CreatedAt *time.Time `type:"timestamp"` - - // The fully qualified domain name for the certificate, such as www.example.com - // or example.com. - DomainName *string `min:"1" type:"string"` - - // Contains information about the initial validation of each domain name that - // occurs as a result of the RequestCertificate request. This field exists only - // when the certificate type is AMAZON_ISSUED. - DomainValidationOptions []*DomainValidation `min:"1" type:"list"` - - // Contains a list of Extended Key Usage X.509 v3 extension objects. Each object - // specifies a purpose for which the certificate public key can be used and - // consists of a name and an object identifier (OID). - ExtendedKeyUsages []*ExtendedKeyUsage `type:"list"` - - // The reason the certificate request failed. This value exists only when the - // certificate status is FAILED. For more information, see Certificate Request - // Failed (http://docs.aws.amazon.com/acm/latest/userguide/troubleshooting.html#troubleshooting-failed) - // in the AWS Certificate Manager User Guide. - FailureReason *string `type:"string" enum:"FailureReason"` - - // The date and time at which the certificate was imported. This value exists - // only when the certificate type is IMPORTED. - ImportedAt *time.Time `type:"timestamp"` - - // A list of ARNs for the AWS resources that are using the certificate. A certificate - // can be used by multiple AWS resources. - InUseBy []*string `type:"list"` - - // The time at which the certificate was issued. This value exists only when - // the certificate type is AMAZON_ISSUED. - IssuedAt *time.Time `type:"timestamp"` - - // The name of the certificate authority that issued and signed the certificate. - Issuer *string `type:"string"` - - // The algorithm that was used to generate the public-private key pair. - KeyAlgorithm *string `type:"string" enum:"KeyAlgorithm"` - - // A list of Key Usage X.509 v3 extension objects. Each object is a string value - // that identifies the purpose of the public key contained in the certificate. - // Possible extension values include DIGITAL_SIGNATURE, KEY_ENCHIPHERMENT, NON_REPUDIATION, - // and more. - KeyUsages []*KeyUsage `type:"list"` - - // The time after which the certificate is not valid. - NotAfter *time.Time `type:"timestamp"` - - // The time before which the certificate is not valid. - NotBefore *time.Time `type:"timestamp"` - - // Value that specifies whether to add the certificate to a transparency log. - // Certificate transparency makes it possible to detect SSL certificates that - // have been mistakenly or maliciously issued. A browser might respond to certificate - // that has not been logged by showing an error message. The logs are cryptographically - // secure. - Options *CertificateOptions `type:"structure"` - - // Specifies whether the certificate is eligible for renewal. - RenewalEligibility *string `type:"string" enum:"RenewalEligibility"` - - // Contains information about the status of ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) - // for the certificate. This field exists only when the certificate type is - // AMAZON_ISSUED. - RenewalSummary *RenewalSummary `type:"structure"` - - // The reason the certificate was revoked. This value exists only when the certificate - // status is REVOKED. - RevocationReason *string `type:"string" enum:"RevocationReason"` - - // The time at which the certificate was revoked. This value exists only when - // the certificate status is REVOKED. - RevokedAt *time.Time `type:"timestamp"` - - // The serial number of the certificate. - Serial *string `type:"string"` - - // The algorithm that was used to sign the certificate. - SignatureAlgorithm *string `type:"string"` - - // The status of the certificate. - Status *string `type:"string" enum:"CertificateStatus"` - - // The name of the entity that is associated with the public key contained in - // the certificate. - Subject *string `type:"string"` - - // One or more domain names (subject alternative names) included in the certificate. - // This list contains the domain names that are bound to the public key that - // is contained in the certificate. The subject alternative names include the - // canonical domain name (CN) of the certificate and additional domain names - // that can be used to connect to the website. - SubjectAlternativeNames []*string `min:"1" type:"list"` - - // The source of the certificate. For certificates provided by ACM, this value - // is AMAZON_ISSUED. For certificates that you imported with ImportCertificate, - // this value is IMPORTED. ACM does not provide managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) - // for imported certificates. For more information about the differences between - // certificates that you import and those that ACM provides, see Importing Certificates - // (http://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) - // in the AWS Certificate Manager User Guide. - Type *string `type:"string" enum:"CertificateType"` -} - -// String returns the string representation -func (s CertificateDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CertificateDetail) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *CertificateDetail) SetCertificateArn(v string) *CertificateDetail { - s.CertificateArn = &v - return s -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *CertificateDetail) SetCertificateAuthorityArn(v string) *CertificateDetail { - s.CertificateAuthorityArn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *CertificateDetail) SetCreatedAt(v time.Time) *CertificateDetail { - s.CreatedAt = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *CertificateDetail) SetDomainName(v string) *CertificateDetail { - s.DomainName = &v - return s -} - -// SetDomainValidationOptions sets the DomainValidationOptions field's value. -func (s *CertificateDetail) SetDomainValidationOptions(v []*DomainValidation) *CertificateDetail { - s.DomainValidationOptions = v - return s -} - -// SetExtendedKeyUsages sets the ExtendedKeyUsages field's value. -func (s *CertificateDetail) SetExtendedKeyUsages(v []*ExtendedKeyUsage) *CertificateDetail { - s.ExtendedKeyUsages = v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *CertificateDetail) SetFailureReason(v string) *CertificateDetail { - s.FailureReason = &v - return s -} - -// SetImportedAt sets the ImportedAt field's value. -func (s *CertificateDetail) SetImportedAt(v time.Time) *CertificateDetail { - s.ImportedAt = &v - return s -} - -// SetInUseBy sets the InUseBy field's value. -func (s *CertificateDetail) SetInUseBy(v []*string) *CertificateDetail { - s.InUseBy = v - return s -} - -// SetIssuedAt sets the IssuedAt field's value. -func (s *CertificateDetail) SetIssuedAt(v time.Time) *CertificateDetail { - s.IssuedAt = &v - return s -} - -// SetIssuer sets the Issuer field's value. -func (s *CertificateDetail) SetIssuer(v string) *CertificateDetail { - s.Issuer = &v - return s -} - -// SetKeyAlgorithm sets the KeyAlgorithm field's value. -func (s *CertificateDetail) SetKeyAlgorithm(v string) *CertificateDetail { - s.KeyAlgorithm = &v - return s -} - -// SetKeyUsages sets the KeyUsages field's value. -func (s *CertificateDetail) SetKeyUsages(v []*KeyUsage) *CertificateDetail { - s.KeyUsages = v - return s -} - -// SetNotAfter sets the NotAfter field's value. -func (s *CertificateDetail) SetNotAfter(v time.Time) *CertificateDetail { - s.NotAfter = &v - return s -} - -// SetNotBefore sets the NotBefore field's value. -func (s *CertificateDetail) SetNotBefore(v time.Time) *CertificateDetail { - s.NotBefore = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *CertificateDetail) SetOptions(v *CertificateOptions) *CertificateDetail { - s.Options = v - return s -} - -// SetRenewalEligibility sets the RenewalEligibility field's value. -func (s *CertificateDetail) SetRenewalEligibility(v string) *CertificateDetail { - s.RenewalEligibility = &v - return s -} - -// SetRenewalSummary sets the RenewalSummary field's value. -func (s *CertificateDetail) SetRenewalSummary(v *RenewalSummary) *CertificateDetail { - s.RenewalSummary = v - return s -} - -// SetRevocationReason sets the RevocationReason field's value. -func (s *CertificateDetail) SetRevocationReason(v string) *CertificateDetail { - s.RevocationReason = &v - return s -} - -// SetRevokedAt sets the RevokedAt field's value. -func (s *CertificateDetail) SetRevokedAt(v time.Time) *CertificateDetail { - s.RevokedAt = &v - return s -} - -// SetSerial sets the Serial field's value. -func (s *CertificateDetail) SetSerial(v string) *CertificateDetail { - s.Serial = &v - return s -} - -// SetSignatureAlgorithm sets the SignatureAlgorithm field's value. -func (s *CertificateDetail) SetSignatureAlgorithm(v string) *CertificateDetail { - s.SignatureAlgorithm = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CertificateDetail) SetStatus(v string) *CertificateDetail { - s.Status = &v - return s -} - -// SetSubject sets the Subject field's value. -func (s *CertificateDetail) SetSubject(v string) *CertificateDetail { - s.Subject = &v - return s -} - -// SetSubjectAlternativeNames sets the SubjectAlternativeNames field's value. -func (s *CertificateDetail) SetSubjectAlternativeNames(v []*string) *CertificateDetail { - s.SubjectAlternativeNames = v - return s -} - -// SetType sets the Type field's value. -func (s *CertificateDetail) SetType(v string) *CertificateDetail { - s.Type = &v - return s -} - -// Structure that contains options for your certificate. Currently, you can -// use this only to specify whether to opt in to or out of certificate transparency -// logging. Some browsers require that public certificates issued for your domain -// be recorded in a log. Certificates that are not logged typically generate -// a browser error. Transparency makes it possible for you to detect SSL/TLS -// certificates that have been mistakenly or maliciously issued for your domain. -// For general information, see Certificate Transparency Logging (http://docs.aws.amazon.com/acm/latest/userguide/acm-concepts.html#concept-transparency). -type CertificateOptions struct { - _ struct{} `type:"structure"` - - // You can opt out of certificate transparency logging by specifying the DISABLED - // option. Opt in by specifying ENABLED. - CertificateTransparencyLoggingPreference *string `type:"string" enum:"CertificateTransparencyLoggingPreference"` -} - -// String returns the string representation -func (s CertificateOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CertificateOptions) GoString() string { - return s.String() -} - -// SetCertificateTransparencyLoggingPreference sets the CertificateTransparencyLoggingPreference field's value. -func (s *CertificateOptions) SetCertificateTransparencyLoggingPreference(v string) *CertificateOptions { - s.CertificateTransparencyLoggingPreference = &v - return s -} - -// This structure is returned in the response object of ListCertificates action. -type CertificateSummary struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the certificate. This is of the form: - // - // arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012 - // - // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS - // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - CertificateArn *string `min:"20" type:"string"` - - // Fully qualified domain name (FQDN), such as www.example.com or example.com, - // for the certificate. - DomainName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CertificateSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CertificateSummary) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *CertificateSummary) SetCertificateArn(v string) *CertificateSummary { - s.CertificateArn = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *CertificateSummary) SetDomainName(v string) *CertificateSummary { - s.DomainName = &v - return s -} - -type DeleteCertificateInput struct { - _ struct{} `type:"structure"` - - // String that contains the ARN of the ACM certificate to be deleted. This must - // be of the form: - // - // arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012 - // - // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS - // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // CertificateArn is a required field - CertificateArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCertificateInput"} - if s.CertificateArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateArn")) - } - if s.CertificateArn != nil && len(*s.CertificateArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *DeleteCertificateInput) SetCertificateArn(v string) *DeleteCertificateInput { - s.CertificateArn = &v - return s -} - -type DeleteCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCertificateOutput) GoString() string { - return s.String() -} - -type DescribeCertificateInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the ACM certificate. The ARN must have - // the following form: - // - // arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012 - // - // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS - // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // CertificateArn is a required field - CertificateArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCertificateInput"} - if s.CertificateArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateArn")) - } - if s.CertificateArn != nil && len(*s.CertificateArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *DescribeCertificateInput) SetCertificateArn(v string) *DescribeCertificateInput { - s.CertificateArn = &v - return s -} - -type DescribeCertificateOutput struct { - _ struct{} `type:"structure"` - - // Metadata about an ACM certificate. - Certificate *CertificateDetail `type:"structure"` -} - -// String returns the string representation -func (s DescribeCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificate sets the Certificate field's value. -func (s *DescribeCertificateOutput) SetCertificate(v *CertificateDetail) *DescribeCertificateOutput { - s.Certificate = v - return s -} - -// Contains information about the validation of each domain name in the certificate. -type DomainValidation struct { - _ struct{} `type:"structure"` - - // A fully qualified domain name (FQDN) in the certificate. For example, www.example.com - // or example.com. - // - // DomainName is a required field - DomainName *string `min:"1" type:"string" required:"true"` - - // Contains the CNAME record that you add to your DNS database for domain validation. - // For more information, see Use DNS to Validate Domain Ownership (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html). - ResourceRecord *ResourceRecord `type:"structure"` - - // The domain name that ACM used to send domain validation emails. - ValidationDomain *string `min:"1" type:"string"` - - // A list of email addresses that ACM used to send domain validation emails. - ValidationEmails []*string `type:"list"` - - // Specifies the domain validation method. - ValidationMethod *string `type:"string" enum:"ValidationMethod"` - - // The validation status of the domain name. This can be one of the following - // values: - // - // * PENDING_VALIDATION - // - // * SUCCESS - // - // * FAILED - ValidationStatus *string `type:"string" enum:"DomainStatus"` -} - -// String returns the string representation -func (s DomainValidation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainValidation) GoString() string { - return s.String() -} - -// SetDomainName sets the DomainName field's value. -func (s *DomainValidation) SetDomainName(v string) *DomainValidation { - s.DomainName = &v - return s -} - -// SetResourceRecord sets the ResourceRecord field's value. -func (s *DomainValidation) SetResourceRecord(v *ResourceRecord) *DomainValidation { - s.ResourceRecord = v - return s -} - -// SetValidationDomain sets the ValidationDomain field's value. -func (s *DomainValidation) SetValidationDomain(v string) *DomainValidation { - s.ValidationDomain = &v - return s -} - -// SetValidationEmails sets the ValidationEmails field's value. -func (s *DomainValidation) SetValidationEmails(v []*string) *DomainValidation { - s.ValidationEmails = v - return s -} - -// SetValidationMethod sets the ValidationMethod field's value. -func (s *DomainValidation) SetValidationMethod(v string) *DomainValidation { - s.ValidationMethod = &v - return s -} - -// SetValidationStatus sets the ValidationStatus field's value. -func (s *DomainValidation) SetValidationStatus(v string) *DomainValidation { - s.ValidationStatus = &v - return s -} - -// Contains information about the domain names that you want ACM to use to send -// you emails that enable you to validate domain ownership. -type DomainValidationOption struct { - _ struct{} `type:"structure"` - - // A fully qualified domain name (FQDN) in the certificate request. - // - // DomainName is a required field - DomainName *string `min:"1" type:"string" required:"true"` - - // The domain name that you want ACM to use to send you validation emails. This - // domain name is the suffix of the email addresses that you want ACM to use. - // This must be the same as the DomainName value or a superdomain of the DomainName - // value. For example, if you request a certificate for testing.example.com, - // you can specify example.com for this value. In that case, ACM sends domain - // validation emails to the following five addresses: - // - // * admin@example.com - // - // * administrator@example.com - // - // * hostmaster@example.com - // - // * postmaster@example.com - // - // * webmaster@example.com - // - // ValidationDomain is a required field - ValidationDomain *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DomainValidationOption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainValidationOption) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DomainValidationOption) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DomainValidationOption"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - if s.ValidationDomain == nil { - invalidParams.Add(request.NewErrParamRequired("ValidationDomain")) - } - if s.ValidationDomain != nil && len(*s.ValidationDomain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ValidationDomain", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DomainValidationOption) SetDomainName(v string) *DomainValidationOption { - s.DomainName = &v - return s -} - -// SetValidationDomain sets the ValidationDomain field's value. -func (s *DomainValidationOption) SetValidationDomain(v string) *DomainValidationOption { - s.ValidationDomain = &v - return s -} - -type ExportCertificateInput struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) of the issued certificate. This must be of - // the form: - // - // arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012 - // - // CertificateArn is a required field - CertificateArn *string `min:"20" type:"string" required:"true"` - - // Passphrase to associate with the encrypted exported private key. If you want - // to later decrypt the private key, you must have the passphrase. You can use - // the following OpenSSL command to decrypt a private key: - // - // openssl rsa -in encrypted_key.pem -out decrypted_key.pem - // - // Passphrase is automatically base64 encoded/decoded by the SDK. - // - // Passphrase is a required field - Passphrase []byte `min:"4" type:"blob" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s ExportCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExportCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExportCertificateInput"} - if s.CertificateArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateArn")) - } - if s.CertificateArn != nil && len(*s.CertificateArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20)) - } - if s.Passphrase == nil { - invalidParams.Add(request.NewErrParamRequired("Passphrase")) - } - if s.Passphrase != nil && len(s.Passphrase) < 4 { - invalidParams.Add(request.NewErrParamMinLen("Passphrase", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *ExportCertificateInput) SetCertificateArn(v string) *ExportCertificateInput { - s.CertificateArn = &v - return s -} - -// SetPassphrase sets the Passphrase field's value. -func (s *ExportCertificateInput) SetPassphrase(v []byte) *ExportCertificateInput { - s.Passphrase = v - return s -} - -type ExportCertificateOutput struct { - _ struct{} `type:"structure"` - - // The base64 PEM-encoded certificate. - Certificate *string `min:"1" type:"string"` - - // The base64 PEM-encoded certificate chain. This does not include the certificate - // that you are exporting. - CertificateChain *string `min:"1" type:"string"` - - // The PEM-encoded private key associated with the public key in the certificate. - PrivateKey *string `min:"1" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s ExportCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificate sets the Certificate field's value. -func (s *ExportCertificateOutput) SetCertificate(v string) *ExportCertificateOutput { - s.Certificate = &v - return s -} - -// SetCertificateChain sets the CertificateChain field's value. -func (s *ExportCertificateOutput) SetCertificateChain(v string) *ExportCertificateOutput { - s.CertificateChain = &v - return s -} - -// SetPrivateKey sets the PrivateKey field's value. -func (s *ExportCertificateOutput) SetPrivateKey(v string) *ExportCertificateOutput { - s.PrivateKey = &v - return s -} - -// The Extended Key Usage X.509 v3 extension defines one or more purposes for -// which the public key can be used. This is in addition to or in place of the -// basic purposes specified by the Key Usage extension. -type ExtendedKeyUsage struct { - _ struct{} `type:"structure"` - - // The name of an Extended Key Usage value. - Name *string `type:"string" enum:"ExtendedKeyUsageName"` - - // An object identifier (OID) for the extension value. OIDs are strings of numbers - // separated by periods. The following OIDs are defined in RFC 3280 and RFC - // 5280. - // - // * 1.3.6.1.5.5.7.3.1 (TLS_WEB_SERVER_AUTHENTICATION) - // - // * 1.3.6.1.5.5.7.3.2 (TLS_WEB_CLIENT_AUTHENTICATION) - // - // * 1.3.6.1.5.5.7.3.3 (CODE_SIGNING) - // - // * 1.3.6.1.5.5.7.3.4 (EMAIL_PROTECTION) - // - // * 1.3.6.1.5.5.7.3.8 (TIME_STAMPING) - // - // * 1.3.6.1.5.5.7.3.9 (OCSP_SIGNING) - // - // * 1.3.6.1.5.5.7.3.5 (IPSEC_END_SYSTEM) - // - // * 1.3.6.1.5.5.7.3.6 (IPSEC_TUNNEL) - // - // * 1.3.6.1.5.5.7.3.7 (IPSEC_USER) - OID *string `type:"string"` -} - -// String returns the string representation -func (s ExtendedKeyUsage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExtendedKeyUsage) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *ExtendedKeyUsage) SetName(v string) *ExtendedKeyUsage { - s.Name = &v - return s -} - -// SetOID sets the OID field's value. -func (s *ExtendedKeyUsage) SetOID(v string) *ExtendedKeyUsage { - s.OID = &v - return s -} - -// This structure can be used in the ListCertificates action to filter the output -// of the certificate list. -type Filters struct { - _ struct{} `type:"structure"` - - // Specify one or more ExtendedKeyUsage extension values. - ExtendedKeyUsage []*string `locationName:"extendedKeyUsage" type:"list"` - - // Specify one or more algorithms that can be used to generate key pairs. - KeyTypes []*string `locationName:"keyTypes" type:"list"` - - // Specify one or more KeyUsage extension values. - KeyUsage []*string `locationName:"keyUsage" type:"list"` -} - -// String returns the string representation -func (s Filters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Filters) GoString() string { - return s.String() -} - -// SetExtendedKeyUsage sets the ExtendedKeyUsage field's value. -func (s *Filters) SetExtendedKeyUsage(v []*string) *Filters { - s.ExtendedKeyUsage = v - return s -} - -// SetKeyTypes sets the KeyTypes field's value. -func (s *Filters) SetKeyTypes(v []*string) *Filters { - s.KeyTypes = v - return s -} - -// SetKeyUsage sets the KeyUsage field's value. -func (s *Filters) SetKeyUsage(v []*string) *Filters { - s.KeyUsage = v - return s -} - -type GetCertificateInput struct { - _ struct{} `type:"structure"` - - // String that contains a certificate ARN in the following format: - // - // arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012 - // - // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS - // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // CertificateArn is a required field - CertificateArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCertificateInput"} - if s.CertificateArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateArn")) - } - if s.CertificateArn != nil && len(*s.CertificateArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *GetCertificateInput) SetCertificateArn(v string) *GetCertificateInput { - s.CertificateArn = &v - return s -} - -type GetCertificateOutput struct { - _ struct{} `type:"structure"` - - // String that contains the ACM certificate represented by the ARN specified - // at input. - Certificate *string `min:"1" type:"string"` - - // The certificate chain that contains the root certificate issued by the certificate - // authority (CA). - CertificateChain *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificate sets the Certificate field's value. -func (s *GetCertificateOutput) SetCertificate(v string) *GetCertificateOutput { - s.Certificate = &v - return s -} - -// SetCertificateChain sets the CertificateChain field's value. -func (s *GetCertificateOutput) SetCertificateChain(v string) *GetCertificateOutput { - s.CertificateChain = &v - return s -} - -type ImportCertificateInput struct { - _ struct{} `type:"structure"` - - // The certificate to import. - // - // Certificate is automatically base64 encoded/decoded by the SDK. - // - // Certificate is a required field - Certificate []byte `min:"1" type:"blob" required:"true"` - - // The Amazon Resource Name (ARN) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // of an imported certificate to replace. To import a new certificate, omit - // this field. - CertificateArn *string `min:"20" type:"string"` - - // The PEM encoded certificate chain. - // - // CertificateChain is automatically base64 encoded/decoded by the SDK. - CertificateChain []byte `min:"1" type:"blob"` - - // The private key that matches the public key in the certificate. - // - // PrivateKey is automatically base64 encoded/decoded by the SDK. - // - // PrivateKey is a required field - PrivateKey []byte `min:"1" type:"blob" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s ImportCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportCertificateInput"} - if s.Certificate == nil { - invalidParams.Add(request.NewErrParamRequired("Certificate")) - } - if s.Certificate != nil && len(s.Certificate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Certificate", 1)) - } - if s.CertificateArn != nil && len(*s.CertificateArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20)) - } - if s.CertificateChain != nil && len(s.CertificateChain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CertificateChain", 1)) - } - if s.PrivateKey == nil { - invalidParams.Add(request.NewErrParamRequired("PrivateKey")) - } - if s.PrivateKey != nil && len(s.PrivateKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PrivateKey", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificate sets the Certificate field's value. -func (s *ImportCertificateInput) SetCertificate(v []byte) *ImportCertificateInput { - s.Certificate = v - return s -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *ImportCertificateInput) SetCertificateArn(v string) *ImportCertificateInput { - s.CertificateArn = &v - return s -} - -// SetCertificateChain sets the CertificateChain field's value. -func (s *ImportCertificateInput) SetCertificateChain(v []byte) *ImportCertificateInput { - s.CertificateChain = v - return s -} - -// SetPrivateKey sets the PrivateKey field's value. -func (s *ImportCertificateInput) SetPrivateKey(v []byte) *ImportCertificateInput { - s.PrivateKey = v - return s -} - -type ImportCertificateOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // of the imported certificate. - CertificateArn *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s ImportCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *ImportCertificateOutput) SetCertificateArn(v string) *ImportCertificateOutput { - s.CertificateArn = &v - return s -} - -// The Key Usage X.509 v3 extension defines the purpose of the public key contained -// in the certificate. -type KeyUsage struct { - _ struct{} `type:"structure"` - - // A string value that contains a Key Usage extension name. - Name *string `type:"string" enum:"KeyUsageName"` -} - -// String returns the string representation -func (s KeyUsage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KeyUsage) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *KeyUsage) SetName(v string) *KeyUsage { - s.Name = &v - return s -} - -type ListCertificatesInput struct { - _ struct{} `type:"structure"` - - // Filter the certificate list by status value. - CertificateStatuses []*string `type:"list"` - - // Filter the certificate list. For more information, see the Filters structure. - Includes *Filters `type:"structure"` - - // Use this parameter when paginating results to specify the maximum number - // of items to return in the response. If additional items exist beyond the - // number you specify, the NextToken element is sent in the response. Use this - // NextToken value in a subsequent request to retrieve additional items. - MaxItems *int64 `min:"1" type:"integer"` - - // Use this parameter only when paginating results and only in a subsequent - // request after you receive a response with truncated results. Set it to the - // value of NextToken from the response you just received. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListCertificatesInput"} - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateStatuses sets the CertificateStatuses field's value. -func (s *ListCertificatesInput) SetCertificateStatuses(v []*string) *ListCertificatesInput { - s.CertificateStatuses = v - return s -} - -// SetIncludes sets the Includes field's value. -func (s *ListCertificatesInput) SetIncludes(v *Filters) *ListCertificatesInput { - s.Includes = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListCertificatesInput) SetMaxItems(v int64) *ListCertificatesInput { - s.MaxItems = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCertificatesInput) SetNextToken(v string) *ListCertificatesInput { - s.NextToken = &v - return s -} - -type ListCertificatesOutput struct { - _ struct{} `type:"structure"` - - // A list of ACM certificates. - CertificateSummaryList []*CertificateSummary `type:"list"` - - // When the list is truncated, this value is present and contains the value - // to use for the NextToken parameter in a subsequent pagination request. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCertificatesOutput) GoString() string { - return s.String() -} - -// SetCertificateSummaryList sets the CertificateSummaryList field's value. -func (s *ListCertificatesOutput) SetCertificateSummaryList(v []*CertificateSummary) *ListCertificatesOutput { - s.CertificateSummaryList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCertificatesOutput) SetNextToken(v string) *ListCertificatesOutput { - s.NextToken = &v - return s -} - -type ListTagsForCertificateInput struct { - _ struct{} `type:"structure"` - - // String that contains the ARN of the ACM certificate for which you want to - // list the tags. This must have the following form: - // - // arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012 - // - // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS - // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // CertificateArn is a required field - CertificateArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsForCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForCertificateInput"} - if s.CertificateArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateArn")) - } - if s.CertificateArn != nil && len(*s.CertificateArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *ListTagsForCertificateInput) SetCertificateArn(v string) *ListTagsForCertificateInput { - s.CertificateArn = &v - return s -} - -type ListTagsForCertificateOutput struct { - _ struct{} `type:"structure"` - - // The key-value pairs that define the applied tags. - Tags []*Tag `min:"1" type:"list"` -} - -// String returns the string representation -func (s ListTagsForCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForCertificateOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForCertificateOutput) SetTags(v []*Tag) *ListTagsForCertificateOutput { - s.Tags = v - return s -} - -type RemoveTagsFromCertificateInput struct { - _ struct{} `type:"structure"` - - // String that contains the ARN of the ACM Certificate with one or more tags - // that you want to remove. This must be of the form: - // - // arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012 - // - // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS - // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // CertificateArn is a required field - CertificateArn *string `min:"20" type:"string" required:"true"` - - // The key-value pair that defines the tag to remove. - // - // Tags is a required field - Tags []*Tag `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsFromCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsFromCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromCertificateInput"} - if s.CertificateArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateArn")) - } - if s.CertificateArn != nil && len(*s.CertificateArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *RemoveTagsFromCertificateInput) SetCertificateArn(v string) *RemoveTagsFromCertificateInput { - s.CertificateArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RemoveTagsFromCertificateInput) SetTags(v []*Tag) *RemoveTagsFromCertificateInput { - s.Tags = v - return s -} - -type RemoveTagsFromCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsFromCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromCertificateOutput) GoString() string { - return s.String() -} - -// Contains information about the status of ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) -// for the certificate. This structure exists only when the certificate type -// is AMAZON_ISSUED. -type RenewalSummary struct { - _ struct{} `type:"structure"` - - // Contains information about the validation of each domain name in the certificate, - // as it pertains to ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html). - // This is different from the initial validation that occurs as a result of - // the RequestCertificate request. This field exists only when the certificate - // type is AMAZON_ISSUED. - // - // DomainValidationOptions is a required field - DomainValidationOptions []*DomainValidation `min:"1" type:"list" required:"true"` - - // The status of ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) - // of the certificate. - // - // RenewalStatus is a required field - RenewalStatus *string `type:"string" required:"true" enum:"RenewalStatus"` -} - -// String returns the string representation -func (s RenewalSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RenewalSummary) GoString() string { - return s.String() -} - -// SetDomainValidationOptions sets the DomainValidationOptions field's value. -func (s *RenewalSummary) SetDomainValidationOptions(v []*DomainValidation) *RenewalSummary { - s.DomainValidationOptions = v - return s -} - -// SetRenewalStatus sets the RenewalStatus field's value. -func (s *RenewalSummary) SetRenewalStatus(v string) *RenewalSummary { - s.RenewalStatus = &v - return s -} - -type RequestCertificateInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the private certificate authority (CA) - // that will be used to issue the certificate. If you do not provide an ARN - // and you are trying to request a private certificate, ACM will attempt to - // issue a public certificate. For more information about private CAs, see the - // AWS Certificate Manager Private Certificate Authority (PCA) (http://docs.aws.amazon.com/acm-pca/latest/userguide/PcaWelcome.html) - // user guide. The ARN must have the following form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 - CertificateAuthorityArn *string `min:"20" type:"string"` - - // Fully qualified domain name (FQDN), such as www.example.com, that you want - // to secure with an ACM certificate. Use an asterisk (*) to create a wildcard - // certificate that protects several sites in the same domain. For example, - // *.example.com protects www.example.com, site.example.com, and images.example.com. - // - // The first domain name you enter cannot exceed 63 octets, including periods. - // Each subsequent Subject Alternative Name (SAN), however, can be up to 253 - // octets in length. - // - // DomainName is a required field - DomainName *string `min:"1" type:"string" required:"true"` - - // The domain name that you want ACM to use to send you emails so that you can - // validate domain ownership. - DomainValidationOptions []*DomainValidationOption `min:"1" type:"list"` - - // Customer chosen string that can be used to distinguish between calls to RequestCertificate. - // Idempotency tokens time out after one hour. Therefore, if you call RequestCertificate - // multiple times with the same idempotency token within one hour, ACM recognizes - // that you are requesting only one certificate and will issue only one. If - // you change the idempotency token for each call, ACM recognizes that you are - // requesting multiple certificates. - IdempotencyToken *string `min:"1" type:"string"` - - // Currently, you can use this parameter to specify whether to add the certificate - // to a certificate transparency log. Certificate transparency makes it possible - // to detect SSL/TLS certificates that have been mistakenly or maliciously issued. - // Certificates that have not been logged typically produce an error message - // in a browser. For more information, see Opting Out of Certificate Transparency - // Logging (http://docs.aws.amazon.com/acm/latest/userguide/acm-bestpractices.html#best-practices-transparency). - Options *CertificateOptions `type:"structure"` - - // Additional FQDNs to be included in the Subject Alternative Name extension - // of the ACM certificate. For example, add the name www.example.net to a certificate - // for which the DomainName field is www.example.com if users can reach your - // site by using either name. The maximum number of domain names that you can - // add to an ACM certificate is 100. However, the initial limit is 10 domain - // names. If you need more than 10 names, you must request a limit increase. - // For more information, see Limits (http://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html). - // - // The maximum length of a SAN DNS name is 253 octets. The name is made up of - // multiple labels separated by periods. No label can be longer than 63 octets. - // Consider the following examples: - // - // * (63 octets).(63 octets).(63 octets).(61 octets) is legal because the - // total length is 253 octets (63+1+63+1+63+1+61) and no label exceeds 63 - // octets. - // - // * (64 octets).(63 octets).(63 octets).(61 octets) is not legal because - // the total length exceeds 253 octets (64+1+63+1+63+1+61) and the first - // label exceeds 63 octets. - // - // * (63 octets).(63 octets).(63 octets).(62 octets) is not legal because - // the total length of the DNS name (63+1+63+1+63+1+62) exceeds 253 octets. - SubjectAlternativeNames []*string `min:"1" type:"list"` - - // The method you want to use if you are requesting a public certificate to - // validate that you own or control domain. You can validate with DNS (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html) - // or validate with email (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html). - // We recommend that you use DNS validation. - ValidationMethod *string `type:"string" enum:"ValidationMethod"` -} - -// String returns the string representation -func (s RequestCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestCertificateInput"} - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 20)) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - if s.DomainValidationOptions != nil && len(s.DomainValidationOptions) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainValidationOptions", 1)) - } - if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) - } - if s.SubjectAlternativeNames != nil && len(s.SubjectAlternativeNames) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SubjectAlternativeNames", 1)) - } - if s.DomainValidationOptions != nil { - for i, v := range s.DomainValidationOptions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DomainValidationOptions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *RequestCertificateInput) SetCertificateAuthorityArn(v string) *RequestCertificateInput { - s.CertificateAuthorityArn = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *RequestCertificateInput) SetDomainName(v string) *RequestCertificateInput { - s.DomainName = &v - return s -} - -// SetDomainValidationOptions sets the DomainValidationOptions field's value. -func (s *RequestCertificateInput) SetDomainValidationOptions(v []*DomainValidationOption) *RequestCertificateInput { - s.DomainValidationOptions = v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *RequestCertificateInput) SetIdempotencyToken(v string) *RequestCertificateInput { - s.IdempotencyToken = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *RequestCertificateInput) SetOptions(v *CertificateOptions) *RequestCertificateInput { - s.Options = v - return s -} - -// SetSubjectAlternativeNames sets the SubjectAlternativeNames field's value. -func (s *RequestCertificateInput) SetSubjectAlternativeNames(v []*string) *RequestCertificateInput { - s.SubjectAlternativeNames = v - return s -} - -// SetValidationMethod sets the ValidationMethod field's value. -func (s *RequestCertificateInput) SetValidationMethod(v string) *RequestCertificateInput { - s.ValidationMethod = &v - return s -} - -type RequestCertificateOutput struct { - _ struct{} `type:"structure"` - - // String that contains the ARN of the issued certificate. This must be of the - // form: - // - // arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012 - CertificateArn *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s RequestCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *RequestCertificateOutput) SetCertificateArn(v string) *RequestCertificateOutput { - s.CertificateArn = &v - return s -} - -type ResendValidationEmailInput struct { - _ struct{} `type:"structure"` - - // String that contains the ARN of the requested certificate. The certificate - // ARN is generated and returned by the RequestCertificate action as soon as - // the request is made. By default, using this parameter causes email to be - // sent to all top-level domains you specified in the certificate request. The - // ARN must be of the form: - // - // arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012 - // - // CertificateArn is a required field - CertificateArn *string `min:"20" type:"string" required:"true"` - - // The fully qualified domain name (FQDN) of the certificate that needs to be - // validated. - // - // Domain is a required field - Domain *string `min:"1" type:"string" required:"true"` - - // The base validation domain that will act as the suffix of the email addresses - // that are used to send the emails. This must be the same as the Domain value - // or a superdomain of the Domain value. For example, if you requested a certificate - // for site.subdomain.example.com and specify a ValidationDomain of subdomain.example.com, - // ACM sends email to the domain registrant, technical contact, and administrative - // contact in WHOIS and the following five addresses: - // - // * admin@subdomain.example.com - // - // * administrator@subdomain.example.com - // - // * hostmaster@subdomain.example.com - // - // * postmaster@subdomain.example.com - // - // * webmaster@subdomain.example.com - // - // ValidationDomain is a required field - ValidationDomain *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ResendValidationEmailInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResendValidationEmailInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResendValidationEmailInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResendValidationEmailInput"} - if s.CertificateArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateArn")) - } - if s.CertificateArn != nil && len(*s.CertificateArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20)) - } - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.ValidationDomain == nil { - invalidParams.Add(request.NewErrParamRequired("ValidationDomain")) - } - if s.ValidationDomain != nil && len(*s.ValidationDomain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ValidationDomain", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *ResendValidationEmailInput) SetCertificateArn(v string) *ResendValidationEmailInput { - s.CertificateArn = &v - return s -} - -// SetDomain sets the Domain field's value. -func (s *ResendValidationEmailInput) SetDomain(v string) *ResendValidationEmailInput { - s.Domain = &v - return s -} - -// SetValidationDomain sets the ValidationDomain field's value. -func (s *ResendValidationEmailInput) SetValidationDomain(v string) *ResendValidationEmailInput { - s.ValidationDomain = &v - return s -} - -type ResendValidationEmailOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ResendValidationEmailOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResendValidationEmailOutput) GoString() string { - return s.String() -} - -// Contains a DNS record value that you can use to can use to validate ownership -// or control of a domain. This is used by the DescribeCertificate action. -type ResourceRecord struct { - _ struct{} `type:"structure"` - - // The name of the DNS record to create in your domain. This is supplied by - // ACM. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The type of DNS record. Currently this can be CNAME. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"RecordType"` - - // The value of the CNAME record to add to your DNS database. This is supplied - // by ACM. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ResourceRecord) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceRecord) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *ResourceRecord) SetName(v string) *ResourceRecord { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *ResourceRecord) SetType(v string) *ResourceRecord { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ResourceRecord) SetValue(v string) *ResourceRecord { - s.Value = &v - return s -} - -// A key-value pair that identifies or specifies metadata about an ACM resource. -type Tag struct { - _ struct{} `type:"structure"` - - // The key of the tag. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The value of the tag. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type UpdateCertificateOptionsInput struct { - _ struct{} `type:"structure"` - - // ARN of the requested certificate to update. This must be of the form: - // - // arn:aws:acm:us-east-1:account:certificate/12345678-1234-1234-1234-123456789012 - // - // CertificateArn is a required field - CertificateArn *string `min:"20" type:"string" required:"true"` - - // Use to update the options for your certificate. Currently, you can specify - // whether to add your certificate to a transparency log. Certificate transparency - // makes it possible to detect SSL/TLS certificates that have been mistakenly - // or maliciously issued. Certificates that have not been logged typically produce - // an error message in a browser. - // - // Options is a required field - Options *CertificateOptions `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateCertificateOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCertificateOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCertificateOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCertificateOptionsInput"} - if s.CertificateArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateArn")) - } - if s.CertificateArn != nil && len(*s.CertificateArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20)) - } - if s.Options == nil { - invalidParams.Add(request.NewErrParamRequired("Options")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *UpdateCertificateOptionsInput) SetCertificateArn(v string) *UpdateCertificateOptionsInput { - s.CertificateArn = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *UpdateCertificateOptionsInput) SetOptions(v *CertificateOptions) *UpdateCertificateOptionsInput { - s.Options = v - return s -} - -type UpdateCertificateOptionsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateCertificateOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCertificateOptionsOutput) GoString() string { - return s.String() -} - -const ( - // CertificateStatusPendingValidation is a CertificateStatus enum value - CertificateStatusPendingValidation = "PENDING_VALIDATION" - - // CertificateStatusIssued is a CertificateStatus enum value - CertificateStatusIssued = "ISSUED" - - // CertificateStatusInactive is a CertificateStatus enum value - CertificateStatusInactive = "INACTIVE" - - // CertificateStatusExpired is a CertificateStatus enum value - CertificateStatusExpired = "EXPIRED" - - // CertificateStatusValidationTimedOut is a CertificateStatus enum value - CertificateStatusValidationTimedOut = "VALIDATION_TIMED_OUT" - - // CertificateStatusRevoked is a CertificateStatus enum value - CertificateStatusRevoked = "REVOKED" - - // CertificateStatusFailed is a CertificateStatus enum value - CertificateStatusFailed = "FAILED" -) - -const ( - // CertificateTransparencyLoggingPreferenceEnabled is a CertificateTransparencyLoggingPreference enum value - CertificateTransparencyLoggingPreferenceEnabled = "ENABLED" - - // CertificateTransparencyLoggingPreferenceDisabled is a CertificateTransparencyLoggingPreference enum value - CertificateTransparencyLoggingPreferenceDisabled = "DISABLED" -) - -const ( - // CertificateTypeImported is a CertificateType enum value - CertificateTypeImported = "IMPORTED" - - // CertificateTypeAmazonIssued is a CertificateType enum value - CertificateTypeAmazonIssued = "AMAZON_ISSUED" - - // CertificateTypePrivate is a CertificateType enum value - CertificateTypePrivate = "PRIVATE" -) - -const ( - // DomainStatusPendingValidation is a DomainStatus enum value - DomainStatusPendingValidation = "PENDING_VALIDATION" - - // DomainStatusSuccess is a DomainStatus enum value - DomainStatusSuccess = "SUCCESS" - - // DomainStatusFailed is a DomainStatus enum value - DomainStatusFailed = "FAILED" -) - -const ( - // ExtendedKeyUsageNameTlsWebServerAuthentication is a ExtendedKeyUsageName enum value - ExtendedKeyUsageNameTlsWebServerAuthentication = "TLS_WEB_SERVER_AUTHENTICATION" - - // ExtendedKeyUsageNameTlsWebClientAuthentication is a ExtendedKeyUsageName enum value - ExtendedKeyUsageNameTlsWebClientAuthentication = "TLS_WEB_CLIENT_AUTHENTICATION" - - // ExtendedKeyUsageNameCodeSigning is a ExtendedKeyUsageName enum value - ExtendedKeyUsageNameCodeSigning = "CODE_SIGNING" - - // ExtendedKeyUsageNameEmailProtection is a ExtendedKeyUsageName enum value - ExtendedKeyUsageNameEmailProtection = "EMAIL_PROTECTION" - - // ExtendedKeyUsageNameTimeStamping is a ExtendedKeyUsageName enum value - ExtendedKeyUsageNameTimeStamping = "TIME_STAMPING" - - // ExtendedKeyUsageNameOcspSigning is a ExtendedKeyUsageName enum value - ExtendedKeyUsageNameOcspSigning = "OCSP_SIGNING" - - // ExtendedKeyUsageNameIpsecEndSystem is a ExtendedKeyUsageName enum value - ExtendedKeyUsageNameIpsecEndSystem = "IPSEC_END_SYSTEM" - - // ExtendedKeyUsageNameIpsecTunnel is a ExtendedKeyUsageName enum value - ExtendedKeyUsageNameIpsecTunnel = "IPSEC_TUNNEL" - - // ExtendedKeyUsageNameIpsecUser is a ExtendedKeyUsageName enum value - ExtendedKeyUsageNameIpsecUser = "IPSEC_USER" - - // ExtendedKeyUsageNameAny is a ExtendedKeyUsageName enum value - ExtendedKeyUsageNameAny = "ANY" - - // ExtendedKeyUsageNameNone is a ExtendedKeyUsageName enum value - ExtendedKeyUsageNameNone = "NONE" - - // ExtendedKeyUsageNameCustom is a ExtendedKeyUsageName enum value - ExtendedKeyUsageNameCustom = "CUSTOM" -) - -const ( - // FailureReasonNoAvailableContacts is a FailureReason enum value - FailureReasonNoAvailableContacts = "NO_AVAILABLE_CONTACTS" - - // FailureReasonAdditionalVerificationRequired is a FailureReason enum value - FailureReasonAdditionalVerificationRequired = "ADDITIONAL_VERIFICATION_REQUIRED" - - // FailureReasonDomainNotAllowed is a FailureReason enum value - FailureReasonDomainNotAllowed = "DOMAIN_NOT_ALLOWED" - - // FailureReasonInvalidPublicDomain is a FailureReason enum value - FailureReasonInvalidPublicDomain = "INVALID_PUBLIC_DOMAIN" - - // FailureReasonCaaError is a FailureReason enum value - FailureReasonCaaError = "CAA_ERROR" - - // FailureReasonPcaLimitExceeded is a FailureReason enum value - FailureReasonPcaLimitExceeded = "PCA_LIMIT_EXCEEDED" - - // FailureReasonPcaInvalidArn is a FailureReason enum value - FailureReasonPcaInvalidArn = "PCA_INVALID_ARN" - - // FailureReasonPcaInvalidState is a FailureReason enum value - FailureReasonPcaInvalidState = "PCA_INVALID_STATE" - - // FailureReasonPcaRequestFailed is a FailureReason enum value - FailureReasonPcaRequestFailed = "PCA_REQUEST_FAILED" - - // FailureReasonPcaResourceNotFound is a FailureReason enum value - FailureReasonPcaResourceNotFound = "PCA_RESOURCE_NOT_FOUND" - - // FailureReasonPcaInvalidArgs is a FailureReason enum value - FailureReasonPcaInvalidArgs = "PCA_INVALID_ARGS" - - // FailureReasonOther is a FailureReason enum value - FailureReasonOther = "OTHER" -) - -const ( - // KeyAlgorithmRsa2048 is a KeyAlgorithm enum value - KeyAlgorithmRsa2048 = "RSA_2048" - - // KeyAlgorithmRsa1024 is a KeyAlgorithm enum value - KeyAlgorithmRsa1024 = "RSA_1024" - - // KeyAlgorithmRsa4096 is a KeyAlgorithm enum value - KeyAlgorithmRsa4096 = "RSA_4096" - - // KeyAlgorithmEcPrime256v1 is a KeyAlgorithm enum value - KeyAlgorithmEcPrime256v1 = "EC_prime256v1" - - // KeyAlgorithmEcSecp384r1 is a KeyAlgorithm enum value - KeyAlgorithmEcSecp384r1 = "EC_secp384r1" - - // KeyAlgorithmEcSecp521r1 is a KeyAlgorithm enum value - KeyAlgorithmEcSecp521r1 = "EC_secp521r1" -) - -const ( - // KeyUsageNameDigitalSignature is a KeyUsageName enum value - KeyUsageNameDigitalSignature = "DIGITAL_SIGNATURE" - - // KeyUsageNameNonRepudiation is a KeyUsageName enum value - KeyUsageNameNonRepudiation = "NON_REPUDIATION" - - // KeyUsageNameKeyEncipherment is a KeyUsageName enum value - KeyUsageNameKeyEncipherment = "KEY_ENCIPHERMENT" - - // KeyUsageNameDataEncipherment is a KeyUsageName enum value - KeyUsageNameDataEncipherment = "DATA_ENCIPHERMENT" - - // KeyUsageNameKeyAgreement is a KeyUsageName enum value - KeyUsageNameKeyAgreement = "KEY_AGREEMENT" - - // KeyUsageNameCertificateSigning is a KeyUsageName enum value - KeyUsageNameCertificateSigning = "CERTIFICATE_SIGNING" - - // KeyUsageNameCrlSigning is a KeyUsageName enum value - KeyUsageNameCrlSigning = "CRL_SIGNING" - - // KeyUsageNameEncipherOnly is a KeyUsageName enum value - KeyUsageNameEncipherOnly = "ENCIPHER_ONLY" - - // KeyUsageNameDecipherOnly is a KeyUsageName enum value - KeyUsageNameDecipherOnly = "DECIPHER_ONLY" - - // KeyUsageNameAny is a KeyUsageName enum value - KeyUsageNameAny = "ANY" - - // KeyUsageNameCustom is a KeyUsageName enum value - KeyUsageNameCustom = "CUSTOM" -) - -const ( - // RecordTypeCname is a RecordType enum value - RecordTypeCname = "CNAME" -) - -const ( - // RenewalEligibilityEligible is a RenewalEligibility enum value - RenewalEligibilityEligible = "ELIGIBLE" - - // RenewalEligibilityIneligible is a RenewalEligibility enum value - RenewalEligibilityIneligible = "INELIGIBLE" -) - -const ( - // RenewalStatusPendingAutoRenewal is a RenewalStatus enum value - RenewalStatusPendingAutoRenewal = "PENDING_AUTO_RENEWAL" - - // RenewalStatusPendingValidation is a RenewalStatus enum value - RenewalStatusPendingValidation = "PENDING_VALIDATION" - - // RenewalStatusSuccess is a RenewalStatus enum value - RenewalStatusSuccess = "SUCCESS" - - // RenewalStatusFailed is a RenewalStatus enum value - RenewalStatusFailed = "FAILED" -) - -const ( - // RevocationReasonUnspecified is a RevocationReason enum value - RevocationReasonUnspecified = "UNSPECIFIED" - - // RevocationReasonKeyCompromise is a RevocationReason enum value - RevocationReasonKeyCompromise = "KEY_COMPROMISE" - - // RevocationReasonCaCompromise is a RevocationReason enum value - RevocationReasonCaCompromise = "CA_COMPROMISE" - - // RevocationReasonAffiliationChanged is a RevocationReason enum value - RevocationReasonAffiliationChanged = "AFFILIATION_CHANGED" - - // RevocationReasonSuperceded is a RevocationReason enum value - RevocationReasonSuperceded = "SUPERCEDED" - - // RevocationReasonCessationOfOperation is a RevocationReason enum value - RevocationReasonCessationOfOperation = "CESSATION_OF_OPERATION" - - // RevocationReasonCertificateHold is a RevocationReason enum value - RevocationReasonCertificateHold = "CERTIFICATE_HOLD" - - // RevocationReasonRemoveFromCrl is a RevocationReason enum value - RevocationReasonRemoveFromCrl = "REMOVE_FROM_CRL" - - // RevocationReasonPrivilegeWithdrawn is a RevocationReason enum value - RevocationReasonPrivilegeWithdrawn = "PRIVILEGE_WITHDRAWN" - - // RevocationReasonAACompromise is a RevocationReason enum value - RevocationReasonAACompromise = "A_A_COMPROMISE" -) - -const ( - // ValidationMethodEmail is a ValidationMethod enum value - ValidationMethodEmail = "EMAIL" - - // ValidationMethodDns is a ValidationMethod enum value - ValidationMethodDns = "DNS" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go deleted file mode 100644 index 8a183a969..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package acm provides the client and types for making API -// requests to AWS Certificate Manager. -// -// Welcome to the AWS Certificate Manager (ACM) API documentation. -// -// You can use ACM to manage SSL/TLS certificates for your AWS-based websites -// and applications. For general information about using ACM, see the AWS Certificate -// Manager User Guide (http://docs.aws.amazon.com/acm/latest/userguide/). -// -// See https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08 for more information on this service. -// -// See acm package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/acm/ -// -// Using the Client -// -// To contact AWS Certificate Manager with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS Certificate Manager client ACM for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/acm/#New -package acm diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/acm/errors.go deleted file mode 100644 index 421b0d1b6..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/errors.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package acm - -const ( - - // ErrCodeInvalidArnException for service response error code - // "InvalidArnException". - // - // The requested Amazon Resource Name (ARN) does not refer to an existing resource. - ErrCodeInvalidArnException = "InvalidArnException" - - // ErrCodeInvalidDomainValidationOptionsException for service response error code - // "InvalidDomainValidationOptionsException". - // - // One or more values in the DomainValidationOption structure is incorrect. - ErrCodeInvalidDomainValidationOptionsException = "InvalidDomainValidationOptionsException" - - // ErrCodeInvalidStateException for service response error code - // "InvalidStateException". - // - // Processing has reached an invalid state. - ErrCodeInvalidStateException = "InvalidStateException" - - // ErrCodeInvalidTagException for service response error code - // "InvalidTagException". - // - // One or both of the values that make up the key-value pair is not valid. For - // example, you cannot specify a tag value that begins with aws:. - ErrCodeInvalidTagException = "InvalidTagException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // An ACM limit has been exceeded. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeRequestInProgressException for service response error code - // "RequestInProgressException". - // - // The certificate request is in process and the certificate in your account - // has not yet been issued. - ErrCodeRequestInProgressException = "RequestInProgressException" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUseException". - // - // The certificate is in use by another AWS service in the caller's account. - // Remove the association and try again. - ErrCodeResourceInUseException = "ResourceInUseException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The specified certificate cannot be found in the caller's account or the - // caller's account cannot be found. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeTooManyTagsException for service response error code - // "TooManyTagsException". - // - // The request contains too many tags. Try the request again with fewer tags. - ErrCodeTooManyTagsException = "TooManyTagsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/service.go b/vendor/github.com/aws/aws-sdk-go/service/acm/service.go deleted file mode 100644 index 9817d0c0a..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package acm - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// ACM provides the API operation methods for making requests to -// AWS Certificate Manager. See this package's package overview docs -// for details on the service. -// -// ACM methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ACM struct { - *client.Client -} - -// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) - -// Service information constants -const ( - ServiceName = "acm" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "ACM" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ACM client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a ACM client from just a session. -// svc := acm.New(mySession) -// -// // Create a ACM client with additional configuration -// svc := acm.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ACM { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ACM { - svc := &ACM{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-12-08", - JSONVersion: "1.1", - TargetPrefix: "CertificateManager", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ACM operation and runs any -// custom request initialization. -func (c *ACM) 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/acm/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/acm/waiters.go deleted file mode 100644 index 6d63b88bc..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/waiters.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package acm - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilCertificateValidated uses the ACM API operation -// DescribeCertificate to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ACM) WaitUntilCertificateValidated(input *DescribeCertificateInput) error { - return c.WaitUntilCertificateValidatedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilCertificateValidatedWithContext is an extended version of WaitUntilCertificateValidated. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACM) WaitUntilCertificateValidatedWithContext(ctx aws.Context, input *DescribeCertificateInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilCertificateValidated", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(60 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Certificate.DomainValidationOptions[].ValidationStatus", - Expected: "SUCCESS", - }, - { - State: request.RetryWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Certificate.DomainValidationOptions[].ValidationStatus", - Expected: "PENDING_VALIDATION", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Certificate.Status", - Expected: "FAILED", - }, - { - State: request.FailureWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ResourceNotFoundException", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeCertificateInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeCertificateRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go deleted file mode 100644 index 64b00304b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go +++ /dev/null @@ -1,4145 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package acmpca - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateCertificateAuthority = "CreateCertificateAuthority" - -// CreateCertificateAuthorityRequest generates a "aws/request.Request" representing the -// client's request for the CreateCertificateAuthority operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCertificateAuthority for more information on using the CreateCertificateAuthority -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCertificateAuthorityRequest method. -// req, resp := client.CreateCertificateAuthorityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthority -func (c *ACMPCA) CreateCertificateAuthorityRequest(input *CreateCertificateAuthorityInput) (req *request.Request, output *CreateCertificateAuthorityOutput) { - op := &request.Operation{ - Name: opCreateCertificateAuthority, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCertificateAuthorityInput{} - } - - output = &CreateCertificateAuthorityOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. -// -// Creates a private subordinate certificate authority (CA). You must specify -// the CA configuration, the revocation configuration, the CA type, and an optional -// idempotency token. The CA configuration specifies the name of the algorithm -// and key size to be used to create the CA private key, the type of signing -// algorithm that the CA uses to sign, and X.500 subject information. The CRL -// (certificate revocation list) configuration specifies the CRL expiration -// period in days (the validity period of the CRL), the Amazon S3 bucket that -// will contain the CRL, and a CNAME alias for the S3 bucket that is included -// in certificates issued by the CA. If successful, this operation returns the -// Amazon Resource Name (ARN) of the CA. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation CreateCertificateAuthority for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgsException "InvalidArgsException" -// One or more of the specified arguments was not valid. -// -// * ErrCodeInvalidPolicyException "InvalidPolicyException" -// The S3 bucket policy is not valid. The policy must give ACM PCA rights to -// read from and write to the bucket and find the bucket location. -// -// * ErrCodeInvalidTagException "InvalidTagException" -// The tag associated with the CA is not valid. The invalid argument is contained -// in the message field. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// An ACM PCA limit has been exceeded. See the exception message returned to -// determine the limit that was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthority -func (c *ACMPCA) CreateCertificateAuthority(input *CreateCertificateAuthorityInput) (*CreateCertificateAuthorityOutput, error) { - req, out := c.CreateCertificateAuthorityRequest(input) - return out, req.Send() -} - -// CreateCertificateAuthorityWithContext is the same as CreateCertificateAuthority with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCertificateAuthority for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) CreateCertificateAuthorityWithContext(ctx aws.Context, input *CreateCertificateAuthorityInput, opts ...request.Option) (*CreateCertificateAuthorityOutput, error) { - req, out := c.CreateCertificateAuthorityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCertificateAuthorityAuditReport = "CreateCertificateAuthorityAuditReport" - -// CreateCertificateAuthorityAuditReportRequest generates a "aws/request.Request" representing the -// client's request for the CreateCertificateAuthorityAuditReport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCertificateAuthorityAuditReport for more information on using the CreateCertificateAuthorityAuditReport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCertificateAuthorityAuditReportRequest method. -// req, resp := client.CreateCertificateAuthorityAuditReportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthorityAuditReport -func (c *ACMPCA) CreateCertificateAuthorityAuditReportRequest(input *CreateCertificateAuthorityAuditReportInput) (req *request.Request, output *CreateCertificateAuthorityAuditReportOutput) { - op := &request.Operation{ - Name: opCreateCertificateAuthorityAuditReport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCertificateAuthorityAuditReportInput{} - } - - output = &CreateCertificateAuthorityAuditReportOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCertificateAuthorityAuditReport API operation for AWS Certificate Manager Private Certificate Authority. -// -// Creates an audit report that lists every time that the your CA private key -// is used. The report is saved in the Amazon S3 bucket that you specify on -// input. The IssueCertificate and RevokeCertificate operations use the private -// key. You can generate a new report every 30 minutes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation CreateCertificateAuthorityAuditReport for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRequestInProgressException "RequestInProgressException" -// Your request is already in progress. -// -// * ErrCodeRequestFailedException "RequestFailedException" -// The request has failed for an unspecified reason. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeInvalidArgsException "InvalidArgsException" -// One or more of the specified arguments was not valid. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report or certificate cannot -// be generated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthorityAuditReport -func (c *ACMPCA) CreateCertificateAuthorityAuditReport(input *CreateCertificateAuthorityAuditReportInput) (*CreateCertificateAuthorityAuditReportOutput, error) { - req, out := c.CreateCertificateAuthorityAuditReportRequest(input) - return out, req.Send() -} - -// CreateCertificateAuthorityAuditReportWithContext is the same as CreateCertificateAuthorityAuditReport with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCertificateAuthorityAuditReport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) CreateCertificateAuthorityAuditReportWithContext(ctx aws.Context, input *CreateCertificateAuthorityAuditReportInput, opts ...request.Option) (*CreateCertificateAuthorityAuditReportOutput, error) { - req, out := c.CreateCertificateAuthorityAuditReportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCertificateAuthority = "DeleteCertificateAuthority" - -// DeleteCertificateAuthorityRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCertificateAuthority operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCertificateAuthority for more information on using the DeleteCertificateAuthority -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCertificateAuthorityRequest method. -// req, resp := client.DeleteCertificateAuthorityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DeleteCertificateAuthority -func (c *ACMPCA) DeleteCertificateAuthorityRequest(input *DeleteCertificateAuthorityInput) (req *request.Request, output *DeleteCertificateAuthorityOutput) { - op := &request.Operation{ - Name: opDeleteCertificateAuthority, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCertificateAuthorityInput{} - } - - output = &DeleteCertificateAuthorityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. -// -// Deletes a private certificate authority (CA). You must provide the ARN (Amazon -// Resource Name) of the private CA that you want to delete. You can find the -// ARN by calling the ListCertificateAuthorities operation. Before you can delete -// a CA, you must disable it. Call the UpdateCertificateAuthority operation -// and set the CertificateAuthorityStatus parameter to DISABLED. -// -// Additionally, you can delete a CA if you are waiting for it to be created -// (the Status field of the CertificateAuthority is CREATING). You can also -// delete it if the CA has been created but you haven't yet imported the signed -// certificate (the Status is PENDING_CERTIFICATE) into ACM PCA. -// -// If the CA is in one of the aforementioned states and you call DeleteCertificateAuthority, -// the CA's status changes to DELETED. However, the CA won't be permentantly -// deleted until the restoration period has passed. By default, if you do not -// set the PermanentDeletionTimeInDays parameter, the CA remains restorable -// for 30 days. You can set the parameter from 7 to 30 days. The DescribeCertificateAuthority -// operation returns the time remaining in the restoration window of a Private -// CA in the DELETED state. To restore an eligable CA, call the RestoreCertificateAuthority -// operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation DeleteCertificateAuthority for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// A previous update to your private CA is still ongoing. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report or certificate cannot -// be generated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DeleteCertificateAuthority -func (c *ACMPCA) DeleteCertificateAuthority(input *DeleteCertificateAuthorityInput) (*DeleteCertificateAuthorityOutput, error) { - req, out := c.DeleteCertificateAuthorityRequest(input) - return out, req.Send() -} - -// DeleteCertificateAuthorityWithContext is the same as DeleteCertificateAuthority with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCertificateAuthority for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) DeleteCertificateAuthorityWithContext(ctx aws.Context, input *DeleteCertificateAuthorityInput, opts ...request.Option) (*DeleteCertificateAuthorityOutput, error) { - req, out := c.DeleteCertificateAuthorityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCertificateAuthority = "DescribeCertificateAuthority" - -// DescribeCertificateAuthorityRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCertificateAuthority operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCertificateAuthority for more information on using the DescribeCertificateAuthority -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCertificateAuthorityRequest method. -// req, resp := client.DescribeCertificateAuthorityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthority -func (c *ACMPCA) DescribeCertificateAuthorityRequest(input *DescribeCertificateAuthorityInput) (req *request.Request, output *DescribeCertificateAuthorityOutput) { - op := &request.Operation{ - Name: opDescribeCertificateAuthority, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCertificateAuthorityInput{} - } - - output = &DescribeCertificateAuthorityOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. -// -// Lists information about your private certificate authority (CA). You specify -// the private CA on input by its ARN (Amazon Resource Name). The output contains -// the status of your CA. This can be any of the following: -// -// * CREATING - ACM PCA is creating your private certificate authority. -// -// * PENDING_CERTIFICATE - The certificate is pending. You must use your -// on-premises root or subordinate CA to sign your private CA CSR and then -// import it into PCA. -// -// * ACTIVE - Your private CA is active. -// -// * DISABLED - Your private CA has been disabled. -// -// * EXPIRED - Your private CA certificate has expired. -// -// * FAILED - Your private CA has failed. Your CA can fail because of problems -// such a network outage or backend AWS failure or other errors. A failed -// CA can never return to the pending state. You must create a new CA. -// -// * DELETED - Your private CA is within the restoration period, after which -// it is permanently deleted. The length of time remaining in the CA's restoration -// period is also included in this operation's output. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation DescribeCertificateAuthority for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthority -func (c *ACMPCA) DescribeCertificateAuthority(input *DescribeCertificateAuthorityInput) (*DescribeCertificateAuthorityOutput, error) { - req, out := c.DescribeCertificateAuthorityRequest(input) - return out, req.Send() -} - -// DescribeCertificateAuthorityWithContext is the same as DescribeCertificateAuthority with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCertificateAuthority for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) DescribeCertificateAuthorityWithContext(ctx aws.Context, input *DescribeCertificateAuthorityInput, opts ...request.Option) (*DescribeCertificateAuthorityOutput, error) { - req, out := c.DescribeCertificateAuthorityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCertificateAuthorityAuditReport = "DescribeCertificateAuthorityAuditReport" - -// DescribeCertificateAuthorityAuditReportRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCertificateAuthorityAuditReport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCertificateAuthorityAuditReport for more information on using the DescribeCertificateAuthorityAuditReport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCertificateAuthorityAuditReportRequest method. -// req, resp := client.DescribeCertificateAuthorityAuditReportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthorityAuditReport -func (c *ACMPCA) DescribeCertificateAuthorityAuditReportRequest(input *DescribeCertificateAuthorityAuditReportInput) (req *request.Request, output *DescribeCertificateAuthorityAuditReportOutput) { - op := &request.Operation{ - Name: opDescribeCertificateAuthorityAuditReport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCertificateAuthorityAuditReportInput{} - } - - output = &DescribeCertificateAuthorityAuditReportOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCertificateAuthorityAuditReport API operation for AWS Certificate Manager Private Certificate Authority. -// -// Lists information about a specific audit report created by calling the CreateCertificateAuthorityAuditReport -// operation. Audit information is created every time the certificate authority -// (CA) private key is used. The private key is used when you call the IssueCertificate -// operation or the RevokeCertificate operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation DescribeCertificateAuthorityAuditReport for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeInvalidArgsException "InvalidArgsException" -// One or more of the specified arguments was not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthorityAuditReport -func (c *ACMPCA) DescribeCertificateAuthorityAuditReport(input *DescribeCertificateAuthorityAuditReportInput) (*DescribeCertificateAuthorityAuditReportOutput, error) { - req, out := c.DescribeCertificateAuthorityAuditReportRequest(input) - return out, req.Send() -} - -// DescribeCertificateAuthorityAuditReportWithContext is the same as DescribeCertificateAuthorityAuditReport with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCertificateAuthorityAuditReport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) DescribeCertificateAuthorityAuditReportWithContext(ctx aws.Context, input *DescribeCertificateAuthorityAuditReportInput, opts ...request.Option) (*DescribeCertificateAuthorityAuditReportOutput, error) { - req, out := c.DescribeCertificateAuthorityAuditReportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCertificate = "GetCertificate" - -// GetCertificateRequest generates a "aws/request.Request" representing the -// client's request for the GetCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCertificate for more information on using the GetCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCertificateRequest method. -// req, resp := client.GetCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificate -func (c *ACMPCA) GetCertificateRequest(input *GetCertificateInput) (req *request.Request, output *GetCertificateOutput) { - op := &request.Operation{ - Name: opGetCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCertificateInput{} - } - - output = &GetCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCertificate API operation for AWS Certificate Manager Private Certificate Authority. -// -// Retrieves a certificate from your private CA. The ARN of the certificate -// is returned when you call the IssueCertificate operation. You must specify -// both the ARN of your private CA and the ARN of the issued certificate when -// calling the GetCertificate operation. You can retrieve the certificate if -// it is in the ISSUED state. You can call the CreateCertificateAuthorityAuditReport -// operation to create a report that contains information about all of the certificates -// issued and revoked by your private CA. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation GetCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRequestInProgressException "RequestInProgressException" -// Your request is already in progress. -// -// * ErrCodeRequestFailedException "RequestFailedException" -// The request has failed for an unspecified reason. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report or certificate cannot -// be generated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificate -func (c *ACMPCA) GetCertificate(input *GetCertificateInput) (*GetCertificateOutput, error) { - req, out := c.GetCertificateRequest(input) - return out, req.Send() -} - -// GetCertificateWithContext is the same as GetCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See GetCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) GetCertificateWithContext(ctx aws.Context, input *GetCertificateInput, opts ...request.Option) (*GetCertificateOutput, error) { - req, out := c.GetCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCertificateAuthorityCertificate = "GetCertificateAuthorityCertificate" - -// GetCertificateAuthorityCertificateRequest generates a "aws/request.Request" representing the -// client's request for the GetCertificateAuthorityCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCertificateAuthorityCertificate for more information on using the GetCertificateAuthorityCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCertificateAuthorityCertificateRequest method. -// req, resp := client.GetCertificateAuthorityCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCertificate -func (c *ACMPCA) GetCertificateAuthorityCertificateRequest(input *GetCertificateAuthorityCertificateInput) (req *request.Request, output *GetCertificateAuthorityCertificateOutput) { - op := &request.Operation{ - Name: opGetCertificateAuthorityCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCertificateAuthorityCertificateInput{} - } - - output = &GetCertificateAuthorityCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCertificateAuthorityCertificate API operation for AWS Certificate Manager Private Certificate Authority. -// -// Retrieves the certificate and certificate chain for your private certificate -// authority (CA). Both the certificate and the chain are base64 PEM-encoded. -// The chain does not include the CA certificate. Each certificate in the chain -// signs the one before it. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation GetCertificateAuthorityCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report or certificate cannot -// be generated. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCertificate -func (c *ACMPCA) GetCertificateAuthorityCertificate(input *GetCertificateAuthorityCertificateInput) (*GetCertificateAuthorityCertificateOutput, error) { - req, out := c.GetCertificateAuthorityCertificateRequest(input) - return out, req.Send() -} - -// GetCertificateAuthorityCertificateWithContext is the same as GetCertificateAuthorityCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See GetCertificateAuthorityCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) GetCertificateAuthorityCertificateWithContext(ctx aws.Context, input *GetCertificateAuthorityCertificateInput, opts ...request.Option) (*GetCertificateAuthorityCertificateOutput, error) { - req, out := c.GetCertificateAuthorityCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCertificateAuthorityCsr = "GetCertificateAuthorityCsr" - -// GetCertificateAuthorityCsrRequest generates a "aws/request.Request" representing the -// client's request for the GetCertificateAuthorityCsr operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCertificateAuthorityCsr for more information on using the GetCertificateAuthorityCsr -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCertificateAuthorityCsrRequest method. -// req, resp := client.GetCertificateAuthorityCsrRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCsr -func (c *ACMPCA) GetCertificateAuthorityCsrRequest(input *GetCertificateAuthorityCsrInput) (req *request.Request, output *GetCertificateAuthorityCsrOutput) { - op := &request.Operation{ - Name: opGetCertificateAuthorityCsr, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCertificateAuthorityCsrInput{} - } - - output = &GetCertificateAuthorityCsrOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCertificateAuthorityCsr API operation for AWS Certificate Manager Private Certificate Authority. -// -// Retrieves the certificate signing request (CSR) for your private certificate -// authority (CA). The CSR is created when you call the CreateCertificateAuthority -// operation. Take the CSR to your on-premises X.509 infrastructure and sign -// it by using your root or a subordinate CA. Then import the signed certificate -// back into ACM PCA by calling the ImportCertificateAuthorityCertificate operation. -// The CSR is returned as a base64 PEM-encoded string. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation GetCertificateAuthorityCsr for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRequestInProgressException "RequestInProgressException" -// Your request is already in progress. -// -// * ErrCodeRequestFailedException "RequestFailedException" -// The request has failed for an unspecified reason. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report or certificate cannot -// be generated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCsr -func (c *ACMPCA) GetCertificateAuthorityCsr(input *GetCertificateAuthorityCsrInput) (*GetCertificateAuthorityCsrOutput, error) { - req, out := c.GetCertificateAuthorityCsrRequest(input) - return out, req.Send() -} - -// GetCertificateAuthorityCsrWithContext is the same as GetCertificateAuthorityCsr with the addition of -// the ability to pass a context and additional request options. -// -// See GetCertificateAuthorityCsr for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) GetCertificateAuthorityCsrWithContext(ctx aws.Context, input *GetCertificateAuthorityCsrInput, opts ...request.Option) (*GetCertificateAuthorityCsrOutput, error) { - req, out := c.GetCertificateAuthorityCsrRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportCertificateAuthorityCertificate = "ImportCertificateAuthorityCertificate" - -// ImportCertificateAuthorityCertificateRequest generates a "aws/request.Request" representing the -// client's request for the ImportCertificateAuthorityCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportCertificateAuthorityCertificate for more information on using the ImportCertificateAuthorityCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportCertificateAuthorityCertificateRequest method. -// req, resp := client.ImportCertificateAuthorityCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ImportCertificateAuthorityCertificate -func (c *ACMPCA) ImportCertificateAuthorityCertificateRequest(input *ImportCertificateAuthorityCertificateInput) (req *request.Request, output *ImportCertificateAuthorityCertificateOutput) { - op := &request.Operation{ - Name: opImportCertificateAuthorityCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportCertificateAuthorityCertificateInput{} - } - - output = &ImportCertificateAuthorityCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ImportCertificateAuthorityCertificate API operation for AWS Certificate Manager Private Certificate Authority. -// -// Imports your signed private CA certificate into ACM PCA. Before you can call -// this operation, you must create the private certificate authority by calling -// the CreateCertificateAuthority operation. You must then generate a certificate -// signing request (CSR) by calling the GetCertificateAuthorityCsr operation. -// Take the CSR to your on-premises CA and use the root certificate or a subordinate -// certificate to sign it. Create a certificate chain and copy the signed certificate -// and the certificate chain to your working directory. -// -// Your certificate chain must not include the private CA certificate that you -// are importing. -// -// Your on-premises CA certificate must be the last certificate in your chain. -// The subordinate certificate, if any, that your root CA signed must be next -// to last. The subordinate certificate signed by the preceding subordinate -// CA must come next, and so on until your chain is built. -// -// The chain must be PEM-encoded. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation ImportCertificateAuthorityCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// A previous update to your private CA is still ongoing. -// -// * ErrCodeRequestInProgressException "RequestInProgressException" -// Your request is already in progress. -// -// * ErrCodeRequestFailedException "RequestFailedException" -// The request has failed for an unspecified reason. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report or certificate cannot -// be generated. -// -// * ErrCodeMalformedCertificateException "MalformedCertificateException" -// One or more fields in the certificate are invalid. -// -// * ErrCodeCertificateMismatchException "CertificateMismatchException" -// The certificate authority certificate you are importing does not comply with -// conditions specified in the certificate that signed it. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ImportCertificateAuthorityCertificate -func (c *ACMPCA) ImportCertificateAuthorityCertificate(input *ImportCertificateAuthorityCertificateInput) (*ImportCertificateAuthorityCertificateOutput, error) { - req, out := c.ImportCertificateAuthorityCertificateRequest(input) - return out, req.Send() -} - -// ImportCertificateAuthorityCertificateWithContext is the same as ImportCertificateAuthorityCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See ImportCertificateAuthorityCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) ImportCertificateAuthorityCertificateWithContext(ctx aws.Context, input *ImportCertificateAuthorityCertificateInput, opts ...request.Option) (*ImportCertificateAuthorityCertificateOutput, error) { - req, out := c.ImportCertificateAuthorityCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opIssueCertificate = "IssueCertificate" - -// IssueCertificateRequest generates a "aws/request.Request" representing the -// client's request for the IssueCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See IssueCertificate for more information on using the IssueCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the IssueCertificateRequest method. -// req, resp := client.IssueCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/IssueCertificate -func (c *ACMPCA) IssueCertificateRequest(input *IssueCertificateInput) (req *request.Request, output *IssueCertificateOutput) { - op := &request.Operation{ - Name: opIssueCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &IssueCertificateInput{} - } - - output = &IssueCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// IssueCertificate API operation for AWS Certificate Manager Private Certificate Authority. -// -// Uses your private certificate authority (CA) to issue a client certificate. -// This operation returns the Amazon Resource Name (ARN) of the certificate. -// You can retrieve the certificate by calling the GetCertificate operation -// and specifying the ARN. -// -// You cannot use the ACM ListCertificateAuthorities operation to retrieve the -// ARNs of the certificates that you issue by using ACM PCA. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation IssueCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// An ACM PCA limit has been exceeded. See the exception message returned to -// determine the limit that was exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report or certificate cannot -// be generated. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeInvalidArgsException "InvalidArgsException" -// One or more of the specified arguments was not valid. -// -// * ErrCodeMalformedCSRException "MalformedCSRException" -// The certificate signing request is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/IssueCertificate -func (c *ACMPCA) IssueCertificate(input *IssueCertificateInput) (*IssueCertificateOutput, error) { - req, out := c.IssueCertificateRequest(input) - return out, req.Send() -} - -// IssueCertificateWithContext is the same as IssueCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See IssueCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) IssueCertificateWithContext(ctx aws.Context, input *IssueCertificateInput, opts ...request.Option) (*IssueCertificateOutput, error) { - req, out := c.IssueCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListCertificateAuthorities = "ListCertificateAuthorities" - -// ListCertificateAuthoritiesRequest generates a "aws/request.Request" representing the -// client's request for the ListCertificateAuthorities operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListCertificateAuthorities for more information on using the ListCertificateAuthorities -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListCertificateAuthoritiesRequest method. -// req, resp := client.ListCertificateAuthoritiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListCertificateAuthorities -func (c *ACMPCA) ListCertificateAuthoritiesRequest(input *ListCertificateAuthoritiesInput) (req *request.Request, output *ListCertificateAuthoritiesOutput) { - op := &request.Operation{ - Name: opListCertificateAuthorities, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListCertificateAuthoritiesInput{} - } - - output = &ListCertificateAuthoritiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCertificateAuthorities API operation for AWS Certificate Manager Private Certificate Authority. -// -// Lists the private certificate authorities that you created by using the CreateCertificateAuthority -// operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation ListCertificateAuthorities for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The token specified in the NextToken argument is not valid. Use the token -// returned from your previous call to ListCertificateAuthorities. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListCertificateAuthorities -func (c *ACMPCA) ListCertificateAuthorities(input *ListCertificateAuthoritiesInput) (*ListCertificateAuthoritiesOutput, error) { - req, out := c.ListCertificateAuthoritiesRequest(input) - return out, req.Send() -} - -// ListCertificateAuthoritiesWithContext is the same as ListCertificateAuthorities with the addition of -// the ability to pass a context and additional request options. -// -// See ListCertificateAuthorities for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) ListCertificateAuthoritiesWithContext(ctx aws.Context, input *ListCertificateAuthoritiesInput, opts ...request.Option) (*ListCertificateAuthoritiesOutput, error) { - req, out := c.ListCertificateAuthoritiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListCertificateAuthoritiesPages iterates over the pages of a ListCertificateAuthorities operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListCertificateAuthorities 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 ListCertificateAuthorities operation. -// pageNum := 0 -// err := client.ListCertificateAuthoritiesPages(params, -// func(page *ListCertificateAuthoritiesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ACMPCA) ListCertificateAuthoritiesPages(input *ListCertificateAuthoritiesInput, fn func(*ListCertificateAuthoritiesOutput, bool) bool) error { - return c.ListCertificateAuthoritiesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListCertificateAuthoritiesPagesWithContext same as ListCertificateAuthoritiesPages 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 *ACMPCA) ListCertificateAuthoritiesPagesWithContext(ctx aws.Context, input *ListCertificateAuthoritiesInput, fn func(*ListCertificateAuthoritiesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListCertificateAuthoritiesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListCertificateAuthoritiesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCertificateAuthoritiesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTags = "ListTags" - -// ListTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTags for more information on using the ListTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsRequest method. -// req, resp := client.ListTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListTags -func (c *ACMPCA) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { - op := &request.Operation{ - Name: opListTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsInput{} - } - - output = &ListTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTags API operation for AWS Certificate Manager Private Certificate Authority. -// -// Lists the tags, if any, that are associated with your private CA. Tags are -// labels that you can use to identify and organize your CAs. Each tag consists -// of a key and an optional value. Call the TagCertificateAuthority operation -// to add one or more tags to your CA. Call the UntagCertificateAuthority operation -// to remove tags. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation ListTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListTags -func (c *ACMPCA) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - return out, req.Send() -} - -// ListTagsWithContext is the same as ListTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreCertificateAuthority = "RestoreCertificateAuthority" - -// RestoreCertificateAuthorityRequest generates a "aws/request.Request" representing the -// client's request for the RestoreCertificateAuthority operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreCertificateAuthority for more information on using the RestoreCertificateAuthority -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreCertificateAuthorityRequest method. -// req, resp := client.RestoreCertificateAuthorityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RestoreCertificateAuthority -func (c *ACMPCA) RestoreCertificateAuthorityRequest(input *RestoreCertificateAuthorityInput) (req *request.Request, output *RestoreCertificateAuthorityOutput) { - op := &request.Operation{ - Name: opRestoreCertificateAuthority, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreCertificateAuthorityInput{} - } - - output = &RestoreCertificateAuthorityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RestoreCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. -// -// Restores a certificate authority (CA) that is in the DELETED state. You can -// restore a CA during the period that you defined in the PermanentDeletionTimeInDays -// parameter of the DeleteCertificateAuthority operation. Currently, you can -// specify 7 to 30 days. If you did not specify a PermanentDeletionTimeInDays -// value, by default you can restore the CA at any time in a 30 day period. -// You can check the time remaining in the restoration period of a private CA -// in the DELETED state by calling the DescribeCertificateAuthority or ListCertificateAuthorities -// operations. The status of a restored CA is set to its pre-deletion status -// when the RestoreCertificateAuthority operation returns. To change its status -// to ACTIVE, call the UpdateCertificateAuthority operation. If the private -// CA was in the PENDING_CERTIFICATE state at deletion, you must use the ImportCertificateAuthorityCertificate -// operation to import a certificate authority into the private CA before it -// can be activated. You cannot restore a CA after the restoration period has -// ended. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation RestoreCertificateAuthority for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report or certificate cannot -// be generated. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RestoreCertificateAuthority -func (c *ACMPCA) RestoreCertificateAuthority(input *RestoreCertificateAuthorityInput) (*RestoreCertificateAuthorityOutput, error) { - req, out := c.RestoreCertificateAuthorityRequest(input) - return out, req.Send() -} - -// RestoreCertificateAuthorityWithContext is the same as RestoreCertificateAuthority with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreCertificateAuthority for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) RestoreCertificateAuthorityWithContext(ctx aws.Context, input *RestoreCertificateAuthorityInput, opts ...request.Option) (*RestoreCertificateAuthorityOutput, error) { - req, out := c.RestoreCertificateAuthorityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRevokeCertificate = "RevokeCertificate" - -// RevokeCertificateRequest generates a "aws/request.Request" representing the -// client's request for the RevokeCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RevokeCertificate for more information on using the RevokeCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RevokeCertificateRequest method. -// req, resp := client.RevokeCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RevokeCertificate -func (c *ACMPCA) RevokeCertificateRequest(input *RevokeCertificateInput) (req *request.Request, output *RevokeCertificateOutput) { - op := &request.Operation{ - Name: opRevokeCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RevokeCertificateInput{} - } - - output = &RevokeCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RevokeCertificate API operation for AWS Certificate Manager Private Certificate Authority. -// -// Revokes a certificate that you issued by calling the IssueCertificate operation. -// If you enable a certificate revocation list (CRL) when you create or update -// your private CA, information about the revoked certificates will be included -// in the CRL. ACM PCA writes the CRL to an S3 bucket that you specify. For -// more information about revocation, see the CrlConfiguration structure. ACM -// PCA also writes revocation information to the audit report. For more information, -// see CreateCertificateAuthorityAuditReport. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation RevokeCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// A previous update to your private CA is still ongoing. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report or certificate cannot -// be generated. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// An ACM PCA limit has been exceeded. See the exception message returned to -// determine the limit that was exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeRequestAlreadyProcessedException "RequestAlreadyProcessedException" -// Your request has already been completed. -// -// * ErrCodeRequestInProgressException "RequestInProgressException" -// Your request is already in progress. -// -// * ErrCodeRequestFailedException "RequestFailedException" -// The request has failed for an unspecified reason. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RevokeCertificate -func (c *ACMPCA) RevokeCertificate(input *RevokeCertificateInput) (*RevokeCertificateOutput, error) { - req, out := c.RevokeCertificateRequest(input) - return out, req.Send() -} - -// RevokeCertificateWithContext is the same as RevokeCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See RevokeCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) RevokeCertificateWithContext(ctx aws.Context, input *RevokeCertificateInput, opts ...request.Option) (*RevokeCertificateOutput, error) { - req, out := c.RevokeCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagCertificateAuthority = "TagCertificateAuthority" - -// TagCertificateAuthorityRequest generates a "aws/request.Request" representing the -// client's request for the TagCertificateAuthority operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagCertificateAuthority for more information on using the TagCertificateAuthority -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TagCertificateAuthorityRequest method. -// req, resp := client.TagCertificateAuthorityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/TagCertificateAuthority -func (c *ACMPCA) TagCertificateAuthorityRequest(input *TagCertificateAuthorityInput) (req *request.Request, output *TagCertificateAuthorityOutput) { - op := &request.Operation{ - Name: opTagCertificateAuthority, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagCertificateAuthorityInput{} - } - - output = &TagCertificateAuthorityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. -// -// Adds one or more tags to your private CA. Tags are labels that you can use -// to identify and organize your AWS resources. Each tag consists of a key and -// an optional value. You specify the private CA on input by its Amazon Resource -// Name (ARN). You specify the tag by using a key-value pair. You can apply -// a tag to just one private CA if you want to identify a specific characteristic -// of that CA, or you can apply the same tag to multiple private CAs if you -// want to filter for a common relationship among those CAs. To remove one or -// more tags, use the UntagCertificateAuthority operation. Call the ListTags -// operation to see what tags are associated with your CA. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation TagCertificateAuthority for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report or certificate cannot -// be generated. -// -// * ErrCodeInvalidTagException "InvalidTagException" -// The tag associated with the CA is not valid. The invalid argument is contained -// in the message field. -// -// * ErrCodeTooManyTagsException "TooManyTagsException" -// You can associate up to 50 tags with a private CA. Exception information -// is contained in the exception message field. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/TagCertificateAuthority -func (c *ACMPCA) TagCertificateAuthority(input *TagCertificateAuthorityInput) (*TagCertificateAuthorityOutput, error) { - req, out := c.TagCertificateAuthorityRequest(input) - return out, req.Send() -} - -// TagCertificateAuthorityWithContext is the same as TagCertificateAuthority with the addition of -// the ability to pass a context and additional request options. -// -// See TagCertificateAuthority for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) TagCertificateAuthorityWithContext(ctx aws.Context, input *TagCertificateAuthorityInput, opts ...request.Option) (*TagCertificateAuthorityOutput, error) { - req, out := c.TagCertificateAuthorityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagCertificateAuthority = "UntagCertificateAuthority" - -// UntagCertificateAuthorityRequest generates a "aws/request.Request" representing the -// client's request for the UntagCertificateAuthority operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagCertificateAuthority for more information on using the UntagCertificateAuthority -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UntagCertificateAuthorityRequest method. -// req, resp := client.UntagCertificateAuthorityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UntagCertificateAuthority -func (c *ACMPCA) UntagCertificateAuthorityRequest(input *UntagCertificateAuthorityInput) (req *request.Request, output *UntagCertificateAuthorityOutput) { - op := &request.Operation{ - Name: opUntagCertificateAuthority, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagCertificateAuthorityInput{} - } - - output = &UntagCertificateAuthorityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. -// -// Remove one or more tags from your private CA. A tag consists of a key-value -// pair. If you do not specify the value portion of the tag when calling this -// operation, the tag will be removed regardless of value. If you specify a -// value, the tag is removed only if it is associated with the specified value. -// To add tags to a private CA, use the TagCertificateAuthority. Call the ListTags -// operation to see what tags are associated with your CA. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation UntagCertificateAuthority for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report or certificate cannot -// be generated. -// -// * ErrCodeInvalidTagException "InvalidTagException" -// The tag associated with the CA is not valid. The invalid argument is contained -// in the message field. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UntagCertificateAuthority -func (c *ACMPCA) UntagCertificateAuthority(input *UntagCertificateAuthorityInput) (*UntagCertificateAuthorityOutput, error) { - req, out := c.UntagCertificateAuthorityRequest(input) - return out, req.Send() -} - -// UntagCertificateAuthorityWithContext is the same as UntagCertificateAuthority with the addition of -// the ability to pass a context and additional request options. -// -// See UntagCertificateAuthority for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) UntagCertificateAuthorityWithContext(ctx aws.Context, input *UntagCertificateAuthorityInput, opts ...request.Option) (*UntagCertificateAuthorityOutput, error) { - req, out := c.UntagCertificateAuthorityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateCertificateAuthority = "UpdateCertificateAuthority" - -// UpdateCertificateAuthorityRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCertificateAuthority operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateCertificateAuthority for more information on using the UpdateCertificateAuthority -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateCertificateAuthorityRequest method. -// req, resp := client.UpdateCertificateAuthorityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UpdateCertificateAuthority -func (c *ACMPCA) UpdateCertificateAuthorityRequest(input *UpdateCertificateAuthorityInput) (req *request.Request, output *UpdateCertificateAuthorityOutput) { - op := &request.Operation{ - Name: opUpdateCertificateAuthority, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateCertificateAuthorityInput{} - } - - output = &UpdateCertificateAuthorityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. -// -// Updates the status or configuration of a private certificate authority (CA). -// Your private CA must be in the ACTIVE or DISABLED state before you can update -// it. You can disable a private CA that is in the ACTIVE state or make a CA -// that is in the DISABLED state active again. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's -// API operation UpdateCertificateAuthority for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// A previous update to your private CA is still ongoing. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource such as a private CA, S3 bucket, certificate, or audit report -// cannot be found. -// -// * ErrCodeInvalidArgsException "InvalidArgsException" -// One or more of the specified arguments was not valid. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report or certificate cannot -// be generated. -// -// * ErrCodeInvalidPolicyException "InvalidPolicyException" -// The S3 bucket policy is not valid. The policy must give ACM PCA rights to -// read from and write to the bucket and find the bucket location. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UpdateCertificateAuthority -func (c *ACMPCA) UpdateCertificateAuthority(input *UpdateCertificateAuthorityInput) (*UpdateCertificateAuthorityOutput, error) { - req, out := c.UpdateCertificateAuthorityRequest(input) - return out, req.Send() -} - -// UpdateCertificateAuthorityWithContext is the same as UpdateCertificateAuthority with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCertificateAuthority for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) UpdateCertificateAuthorityWithContext(ctx aws.Context, input *UpdateCertificateAuthorityInput, opts ...request.Option) (*UpdateCertificateAuthorityOutput, error) { - req, out := c.UpdateCertificateAuthorityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Contains information about the certificate subject. The certificate can be -// one issued by your private certificate authority (CA) or it can be your private -// CA certificate. The Subject field in the certificate identifies the entity -// that owns or controls the public key in the certificate. The entity can be -// a user, computer, device, or service. The Subject must contain an X.500 distinguished -// name (DN). A DN is a sequence of relative distinguished names (RDNs). The -// RDNs are separated by commas in the certificate. The DN must be unique for -// each entity, but your private CA can issue more than one certificate with -// the same DN to the same entity. -type ASN1Subject struct { - _ struct{} `type:"structure"` - - // Fully qualified domain name (FQDN) associated with the certificate subject. - CommonName *string `type:"string"` - - // Two-digit code that specifies the country in which the certificate subject - // located. - Country *string `type:"string"` - - // Disambiguating information for the certificate subject. - DistinguishedNameQualifier *string `type:"string"` - - // Typically a qualifier appended to the name of an individual. Examples include - // Jr. for junior, Sr. for senior, and III for third. - GenerationQualifier *string `type:"string"` - - // First name. - GivenName *string `type:"string"` - - // Concatenation that typically contains the first letter of the GivenName, - // the first letter of the middle name if one exists, and the first letter of - // the SurName. - Initials *string `type:"string"` - - // The locality (such as a city or town) in which the certificate subject is - // located. - Locality *string `type:"string"` - - // Legal name of the organization with which the certificate subject is affiliated. - Organization *string `type:"string"` - - // A subdivision or unit of the organization (such as sales or finance) with - // which the certificate subject is affiliated. - OrganizationalUnit *string `type:"string"` - - // Typically a shortened version of a longer GivenName. For example, Jonathan - // is often shortened to John. Elizabeth is often shortened to Beth, Liz, or - // Eliza. - Pseudonym *string `type:"string"` - - // The certificate serial number. - SerialNumber *string `type:"string"` - - // State in which the subject of the certificate is located. - State *string `type:"string"` - - // Family name. In the US and the UK, for example, the surname of an individual - // is ordered last. In Asian cultures the surname is typically ordered first. - Surname *string `type:"string"` - - // A title such as Mr. or Ms., which is pre-pended to the name to refer formally - // to the certificate subject. - Title *string `type:"string"` -} - -// String returns the string representation -func (s ASN1Subject) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ASN1Subject) GoString() string { - return s.String() -} - -// SetCommonName sets the CommonName field's value. -func (s *ASN1Subject) SetCommonName(v string) *ASN1Subject { - s.CommonName = &v - return s -} - -// SetCountry sets the Country field's value. -func (s *ASN1Subject) SetCountry(v string) *ASN1Subject { - s.Country = &v - return s -} - -// SetDistinguishedNameQualifier sets the DistinguishedNameQualifier field's value. -func (s *ASN1Subject) SetDistinguishedNameQualifier(v string) *ASN1Subject { - s.DistinguishedNameQualifier = &v - return s -} - -// SetGenerationQualifier sets the GenerationQualifier field's value. -func (s *ASN1Subject) SetGenerationQualifier(v string) *ASN1Subject { - s.GenerationQualifier = &v - return s -} - -// SetGivenName sets the GivenName field's value. -func (s *ASN1Subject) SetGivenName(v string) *ASN1Subject { - s.GivenName = &v - return s -} - -// SetInitials sets the Initials field's value. -func (s *ASN1Subject) SetInitials(v string) *ASN1Subject { - s.Initials = &v - return s -} - -// SetLocality sets the Locality field's value. -func (s *ASN1Subject) SetLocality(v string) *ASN1Subject { - s.Locality = &v - return s -} - -// SetOrganization sets the Organization field's value. -func (s *ASN1Subject) SetOrganization(v string) *ASN1Subject { - s.Organization = &v - return s -} - -// SetOrganizationalUnit sets the OrganizationalUnit field's value. -func (s *ASN1Subject) SetOrganizationalUnit(v string) *ASN1Subject { - s.OrganizationalUnit = &v - return s -} - -// SetPseudonym sets the Pseudonym field's value. -func (s *ASN1Subject) SetPseudonym(v string) *ASN1Subject { - s.Pseudonym = &v - return s -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *ASN1Subject) SetSerialNumber(v string) *ASN1Subject { - s.SerialNumber = &v - return s -} - -// SetState sets the State field's value. -func (s *ASN1Subject) SetState(v string) *ASN1Subject { - s.State = &v - return s -} - -// SetSurname sets the Surname field's value. -func (s *ASN1Subject) SetSurname(v string) *ASN1Subject { - s.Surname = &v - return s -} - -// SetTitle sets the Title field's value. -func (s *ASN1Subject) SetTitle(v string) *ASN1Subject { - s.Title = &v - return s -} - -// Contains information about your private certificate authority (CA). Your -// private CA can issue and revoke X.509 digital certificates. Digital certificates -// verify that the entity named in the certificate Subject field owns or controls -// the public key contained in the Subject Public Key Info field. Call the CreateCertificateAuthority -// operation to create your private CA. You must then call the GetCertificateAuthorityCertificate -// operation to retrieve a private CA certificate signing request (CSR). Take -// the CSR to your on-premises CA and sign it with the root CA certificate or -// a subordinate certificate. Call the ImportCertificateAuthorityCertificate -// operation to import the signed certificate into AWS Certificate Manager (ACM). -type CertificateAuthority struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) for your private certificate authority (CA). The - // format is 12345678-1234-1234-1234-123456789012. - Arn *string `min:"5" type:"string"` - - // Your private CA configuration. - CertificateAuthorityConfiguration *CertificateAuthorityConfiguration `type:"structure"` - - // Date and time at which your private CA was created. - CreatedAt *time.Time `type:"timestamp"` - - // Reason the request to create your private CA failed. - FailureReason *string `type:"string" enum:"FailureReason"` - - // Date and time at which your private CA was last updated. - LastStateChangeAt *time.Time `type:"timestamp"` - - // Date and time after which your private CA certificate is not valid. - NotAfter *time.Time `type:"timestamp"` - - // Date and time before which your private CA certificate is not valid. - NotBefore *time.Time `type:"timestamp"` - - // The period during which a deleted CA can be restored. For more information, - // see the PermanentDeletionTimeInDays parameter of the DeleteCertificateAuthorityRequest - // operation. - RestorableUntil *time.Time `type:"timestamp"` - - // Information about the certificate revocation list (CRL) created and maintained - // by your private CA. - RevocationConfiguration *RevocationConfiguration `type:"structure"` - - // Serial number of your private CA. - Serial *string `type:"string"` - - // Status of your private CA. - Status *string `type:"string" enum:"CertificateAuthorityStatus"` - - // Type of your private CA. - Type *string `type:"string" enum:"CertificateAuthorityType"` -} - -// String returns the string representation -func (s CertificateAuthority) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CertificateAuthority) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *CertificateAuthority) SetArn(v string) *CertificateAuthority { - s.Arn = &v - return s -} - -// SetCertificateAuthorityConfiguration sets the CertificateAuthorityConfiguration field's value. -func (s *CertificateAuthority) SetCertificateAuthorityConfiguration(v *CertificateAuthorityConfiguration) *CertificateAuthority { - s.CertificateAuthorityConfiguration = v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *CertificateAuthority) SetCreatedAt(v time.Time) *CertificateAuthority { - s.CreatedAt = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *CertificateAuthority) SetFailureReason(v string) *CertificateAuthority { - s.FailureReason = &v - return s -} - -// SetLastStateChangeAt sets the LastStateChangeAt field's value. -func (s *CertificateAuthority) SetLastStateChangeAt(v time.Time) *CertificateAuthority { - s.LastStateChangeAt = &v - return s -} - -// SetNotAfter sets the NotAfter field's value. -func (s *CertificateAuthority) SetNotAfter(v time.Time) *CertificateAuthority { - s.NotAfter = &v - return s -} - -// SetNotBefore sets the NotBefore field's value. -func (s *CertificateAuthority) SetNotBefore(v time.Time) *CertificateAuthority { - s.NotBefore = &v - return s -} - -// SetRestorableUntil sets the RestorableUntil field's value. -func (s *CertificateAuthority) SetRestorableUntil(v time.Time) *CertificateAuthority { - s.RestorableUntil = &v - return s -} - -// SetRevocationConfiguration sets the RevocationConfiguration field's value. -func (s *CertificateAuthority) SetRevocationConfiguration(v *RevocationConfiguration) *CertificateAuthority { - s.RevocationConfiguration = v - return s -} - -// SetSerial sets the Serial field's value. -func (s *CertificateAuthority) SetSerial(v string) *CertificateAuthority { - s.Serial = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CertificateAuthority) SetStatus(v string) *CertificateAuthority { - s.Status = &v - return s -} - -// SetType sets the Type field's value. -func (s *CertificateAuthority) SetType(v string) *CertificateAuthority { - s.Type = &v - return s -} - -// Contains configuration information for your private certificate authority -// (CA). This includes information about the class of public key algorithm and -// the key pair that your private CA creates when it issues a certificate, the -// signature algorithm it uses used when issuing certificates, and its X.500 -// distinguished name. You must specify this information when you call the CreateCertificateAuthority -// operation. -type CertificateAuthorityConfiguration struct { - _ struct{} `type:"structure"` - - // Type of the public key algorithm and size, in bits, of the key pair that - // your key pair creates when it issues a certificate. - // - // KeyAlgorithm is a required field - KeyAlgorithm *string `type:"string" required:"true" enum:"KeyAlgorithm"` - - // Name of the algorithm your private CA uses to sign certificate requests. - // - // SigningAlgorithm is a required field - SigningAlgorithm *string `type:"string" required:"true" enum:"SigningAlgorithm"` - - // Structure that contains X.500 distinguished name information for your private - // CA. - // - // Subject is a required field - Subject *ASN1Subject `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CertificateAuthorityConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CertificateAuthorityConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CertificateAuthorityConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CertificateAuthorityConfiguration"} - if s.KeyAlgorithm == nil { - invalidParams.Add(request.NewErrParamRequired("KeyAlgorithm")) - } - if s.SigningAlgorithm == nil { - invalidParams.Add(request.NewErrParamRequired("SigningAlgorithm")) - } - if s.Subject == nil { - invalidParams.Add(request.NewErrParamRequired("Subject")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyAlgorithm sets the KeyAlgorithm field's value. -func (s *CertificateAuthorityConfiguration) SetKeyAlgorithm(v string) *CertificateAuthorityConfiguration { - s.KeyAlgorithm = &v - return s -} - -// SetSigningAlgorithm sets the SigningAlgorithm field's value. -func (s *CertificateAuthorityConfiguration) SetSigningAlgorithm(v string) *CertificateAuthorityConfiguration { - s.SigningAlgorithm = &v - return s -} - -// SetSubject sets the Subject field's value. -func (s *CertificateAuthorityConfiguration) SetSubject(v *ASN1Subject) *CertificateAuthorityConfiguration { - s.Subject = v - return s -} - -type CreateCertificateAuthorityAuditReportInput struct { - _ struct{} `type:"structure"` - - // Format in which to create the report. This can be either JSON or CSV. - // - // AuditReportResponseFormat is a required field - AuditReportResponseFormat *string `type:"string" required:"true" enum:"AuditReportResponseFormat"` - - // Amazon Resource Name (ARN) of the CA to be audited. This is of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` - - // Name of the S3 bucket that will contain the audit report. - // - // S3BucketName is a required field - S3BucketName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateCertificateAuthorityAuditReportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCertificateAuthorityAuditReportInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCertificateAuthorityAuditReportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCertificateAuthorityAuditReportInput"} - if s.AuditReportResponseFormat == nil { - invalidParams.Add(request.NewErrParamRequired("AuditReportResponseFormat")) - } - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - if s.S3BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("S3BucketName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuditReportResponseFormat sets the AuditReportResponseFormat field's value. -func (s *CreateCertificateAuthorityAuditReportInput) SetAuditReportResponseFormat(v string) *CreateCertificateAuthorityAuditReportInput { - s.AuditReportResponseFormat = &v - return s -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *CreateCertificateAuthorityAuditReportInput) SetCertificateAuthorityArn(v string) *CreateCertificateAuthorityAuditReportInput { - s.CertificateAuthorityArn = &v - return s -} - -// SetS3BucketName sets the S3BucketName field's value. -func (s *CreateCertificateAuthorityAuditReportInput) SetS3BucketName(v string) *CreateCertificateAuthorityAuditReportInput { - s.S3BucketName = &v - return s -} - -type CreateCertificateAuthorityAuditReportOutput struct { - _ struct{} `type:"structure"` - - // An alphanumeric string that contains a report identifier. - AuditReportId *string `min:"36" type:"string"` - - // The key that uniquely identifies the report file in your S3 bucket. - S3Key *string `type:"string"` -} - -// String returns the string representation -func (s CreateCertificateAuthorityAuditReportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCertificateAuthorityAuditReportOutput) GoString() string { - return s.String() -} - -// SetAuditReportId sets the AuditReportId field's value. -func (s *CreateCertificateAuthorityAuditReportOutput) SetAuditReportId(v string) *CreateCertificateAuthorityAuditReportOutput { - s.AuditReportId = &v - return s -} - -// SetS3Key sets the S3Key field's value. -func (s *CreateCertificateAuthorityAuditReportOutput) SetS3Key(v string) *CreateCertificateAuthorityAuditReportOutput { - s.S3Key = &v - return s -} - -type CreateCertificateAuthorityInput struct { - _ struct{} `type:"structure"` - - // Name and bit size of the private key algorithm, the name of the signing algorithm, - // and X.500 certificate subject information. - // - // CertificateAuthorityConfiguration is a required field - CertificateAuthorityConfiguration *CertificateAuthorityConfiguration `type:"structure" required:"true"` - - // The type of the certificate authority. Currently, this must be SUBORDINATE. - // - // CertificateAuthorityType is a required field - CertificateAuthorityType *string `type:"string" required:"true" enum:"CertificateAuthorityType"` - - // Alphanumeric string that can be used to distinguish between calls to CreateCertificateAuthority. - // Idempotency tokens time out after five minutes. Therefore, if you call CreateCertificateAuthority - // multiple times with the same idempotency token within a five minute period, - // ACM PCA recognizes that you are requesting only one certificate. As a result, - // ACM PCA issues only one. If you change the idempotency token for each call, - // however, ACM PCA recognizes that you are requesting multiple certificates. - IdempotencyToken *string `min:"1" type:"string"` - - // Contains a Boolean value that you can use to enable a certification revocation - // list (CRL) for the CA, the name of the S3 bucket to which ACM PCA will write - // the CRL, and an optional CNAME alias that you can use to hide the name of - // your bucket in the CRL Distribution Points extension of your CA certificate. - // For more information, see the CrlConfiguration structure. - RevocationConfiguration *RevocationConfiguration `type:"structure"` - - // Key-value pairs that will be attached to the new private CA. You can associate - // up to 50 tags with a private CA. - Tags []*Tag `min:"1" type:"list"` -} - -// String returns the string representation -func (s CreateCertificateAuthorityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCertificateAuthorityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCertificateAuthorityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCertificateAuthorityInput"} - if s.CertificateAuthorityConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityConfiguration")) - } - if s.CertificateAuthorityType == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityType")) - } - if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.CertificateAuthorityConfiguration != nil { - if err := s.CertificateAuthorityConfiguration.Validate(); err != nil { - invalidParams.AddNested("CertificateAuthorityConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.RevocationConfiguration != nil { - if err := s.RevocationConfiguration.Validate(); err != nil { - invalidParams.AddNested("RevocationConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAuthorityConfiguration sets the CertificateAuthorityConfiguration field's value. -func (s *CreateCertificateAuthorityInput) SetCertificateAuthorityConfiguration(v *CertificateAuthorityConfiguration) *CreateCertificateAuthorityInput { - s.CertificateAuthorityConfiguration = v - return s -} - -// SetCertificateAuthorityType sets the CertificateAuthorityType field's value. -func (s *CreateCertificateAuthorityInput) SetCertificateAuthorityType(v string) *CreateCertificateAuthorityInput { - s.CertificateAuthorityType = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *CreateCertificateAuthorityInput) SetIdempotencyToken(v string) *CreateCertificateAuthorityInput { - s.IdempotencyToken = &v - return s -} - -// SetRevocationConfiguration sets the RevocationConfiguration field's value. -func (s *CreateCertificateAuthorityInput) SetRevocationConfiguration(v *RevocationConfiguration) *CreateCertificateAuthorityInput { - s.RevocationConfiguration = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateCertificateAuthorityInput) SetTags(v []*Tag) *CreateCertificateAuthorityInput { - s.Tags = v - return s -} - -type CreateCertificateAuthorityOutput struct { - _ struct{} `type:"structure"` - - // If successful, the Amazon Resource Name (ARN) of the certificate authority - // (CA). This is of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. - CertificateAuthorityArn *string `min:"5" type:"string"` -} - -// String returns the string representation -func (s CreateCertificateAuthorityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCertificateAuthorityOutput) GoString() string { - return s.String() -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *CreateCertificateAuthorityOutput) SetCertificateAuthorityArn(v string) *CreateCertificateAuthorityOutput { - s.CertificateAuthorityArn = &v - return s -} - -// Contains configuration information for a certificate revocation list (CRL). -// Your private certificate authority (CA) creates base CRLs. Delta CRLs are -// not supported. You can enable CRLs for your new or an existing private CA -// by setting the Enabled parameter to true. Your private CA writes CRLs to -// an S3 bucket that you specify in the S3BucketName parameter. You can hide -// the name of your bucket by specifying a value for the CustomCname parameter. -// Your private CA copies the CNAME or the S3 bucket name to the CRL Distribution -// Points extension of each certificate it issues. Your S3 bucket policy must -// give write permission to ACM PCA. -// -// Your private CA uses the value in the ExpirationInDays parameter to calculate -// the nextUpdate field in the CRL. The CRL is refreshed at 1/2 the age of next -// update or when a certificate is revoked. When a certificate is revoked, it -// is recorded in the next CRL that is generated and in the next audit report. -// Only time valid certificates are listed in the CRL. Expired certificates -// are not included. -// -// CRLs contain the following fields: -// -// * Version: The current version number defined in RFC 5280 is V2. The integer -// value is 0x1. -// -// * Signature Algorithm: The name of the algorithm used to sign the CRL. -// -// * Issuer: The X.500 distinguished name of your private CA that issued -// the CRL. -// -// * Last Update: The issue date and time of this CRL. -// -// * Next Update: The day and time by which the next CRL will be issued. -// -// * Revoked Certificates: List of revoked certificates. Each list item contains -// the following information. -// -// Serial Number: The serial number, in hexadecimal format, of the revoked certificate. -// -// Revocation Date: Date and time the certificate was revoked. -// -// CRL Entry Extensions: Optional extensions for the CRL entry. -// -// X509v3 CRL Reason Code: Reason the certificate was revoked. -// -// * CRL Extensions: Optional extensions for the CRL. -// -// X509v3 Authority Key Identifier: Identifies the public key associated with -// the private key used to sign the certificate. -// -// X509v3 CRL Number:: Decimal sequence number for the CRL. -// -// * Signature Algorithm: Algorithm used by your private CA to sign the CRL. -// -// * Signature Value: Signature computed over the CRL. -// -// Certificate revocation lists created by ACM PCA are DER-encoded. You can -// use the following OpenSSL command to list a CRL. -// -// openssl crl -inform DER -text -in crl_path -noout -type CrlConfiguration struct { - _ struct{} `type:"structure"` - - // Name inserted into the certificate CRL Distribution Points extension that - // enables the use of an alias for the CRL distribution point. Use this value - // if you don't want the name of your S3 bucket to be public. - CustomCname *string `type:"string"` - - // Boolean value that specifies whether certificate revocation lists (CRLs) - // are enabled. You can use this value to enable certificate revocation for - // a new CA when you call the CreateCertificateAuthority operation or for an - // existing CA when you call the UpdateCertificateAuthority operation. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // Number of days until a certificate expires. - ExpirationInDays *int64 `min:"1" type:"integer"` - - // Name of the S3 bucket that contains the CRL. If you do not provide a value - // for the CustomCname argument, the name of your S3 bucket is placed into the - // CRL Distribution Points extension of the issued certificate. You can change - // the name of your bucket by calling the UpdateCertificateAuthority operation. - // You must specify a bucket policy that allows ACM PCA to write the CRL to - // your bucket. - S3BucketName *string `min:"3" type:"string"` -} - -// String returns the string representation -func (s CrlConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CrlConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CrlConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CrlConfiguration"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.ExpirationInDays != nil && *s.ExpirationInDays < 1 { - invalidParams.Add(request.NewErrParamMinValue("ExpirationInDays", 1)) - } - if s.S3BucketName != nil && len(*s.S3BucketName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("S3BucketName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomCname sets the CustomCname field's value. -func (s *CrlConfiguration) SetCustomCname(v string) *CrlConfiguration { - s.CustomCname = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *CrlConfiguration) SetEnabled(v bool) *CrlConfiguration { - s.Enabled = &v - return s -} - -// SetExpirationInDays sets the ExpirationInDays field's value. -func (s *CrlConfiguration) SetExpirationInDays(v int64) *CrlConfiguration { - s.ExpirationInDays = &v - return s -} - -// SetS3BucketName sets the S3BucketName field's value. -func (s *CrlConfiguration) SetS3BucketName(v string) *CrlConfiguration { - s.S3BucketName = &v - return s -} - -type DeleteCertificateAuthorityInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. - // This must have the following form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` - - // The number of days to make a CA restorable after it has been deleted. This - // can be anywhere from 7 to 30 days, with 30 being the default. - PermanentDeletionTimeInDays *int64 `min:"7" type:"integer"` -} - -// String returns the string representation -func (s DeleteCertificateAuthorityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCertificateAuthorityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCertificateAuthorityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCertificateAuthorityInput"} - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - if s.PermanentDeletionTimeInDays != nil && *s.PermanentDeletionTimeInDays < 7 { - invalidParams.Add(request.NewErrParamMinValue("PermanentDeletionTimeInDays", 7)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *DeleteCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *DeleteCertificateAuthorityInput { - s.CertificateAuthorityArn = &v - return s -} - -// SetPermanentDeletionTimeInDays sets the PermanentDeletionTimeInDays field's value. -func (s *DeleteCertificateAuthorityInput) SetPermanentDeletionTimeInDays(v int64) *DeleteCertificateAuthorityInput { - s.PermanentDeletionTimeInDays = &v - return s -} - -type DeleteCertificateAuthorityOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCertificateAuthorityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCertificateAuthorityOutput) GoString() string { - return s.String() -} - -type DescribeCertificateAuthorityAuditReportInput struct { - _ struct{} `type:"structure"` - - // The report ID returned by calling the CreateCertificateAuthorityAuditReport - // operation. - // - // AuditReportId is a required field - AuditReportId *string `min:"36" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the private CA. This must be of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeCertificateAuthorityAuditReportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCertificateAuthorityAuditReportInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCertificateAuthorityAuditReportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCertificateAuthorityAuditReportInput"} - if s.AuditReportId == nil { - invalidParams.Add(request.NewErrParamRequired("AuditReportId")) - } - if s.AuditReportId != nil && len(*s.AuditReportId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("AuditReportId", 36)) - } - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuditReportId sets the AuditReportId field's value. -func (s *DescribeCertificateAuthorityAuditReportInput) SetAuditReportId(v string) *DescribeCertificateAuthorityAuditReportInput { - s.AuditReportId = &v - return s -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *DescribeCertificateAuthorityAuditReportInput) SetCertificateAuthorityArn(v string) *DescribeCertificateAuthorityAuditReportInput { - s.CertificateAuthorityArn = &v - return s -} - -type DescribeCertificateAuthorityAuditReportOutput struct { - _ struct{} `type:"structure"` - - // Specifies whether report creation is in progress, has succeeded, or has failed. - AuditReportStatus *string `type:"string" enum:"AuditReportStatus"` - - // The date and time at which the report was created. - CreatedAt *time.Time `type:"timestamp"` - - // Name of the S3 bucket that contains the report. - S3BucketName *string `type:"string"` - - // S3 key that uniquely identifies the report file in your S3 bucket. - S3Key *string `type:"string"` -} - -// String returns the string representation -func (s DescribeCertificateAuthorityAuditReportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCertificateAuthorityAuditReportOutput) GoString() string { - return s.String() -} - -// SetAuditReportStatus sets the AuditReportStatus field's value. -func (s *DescribeCertificateAuthorityAuditReportOutput) SetAuditReportStatus(v string) *DescribeCertificateAuthorityAuditReportOutput { - s.AuditReportStatus = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *DescribeCertificateAuthorityAuditReportOutput) SetCreatedAt(v time.Time) *DescribeCertificateAuthorityAuditReportOutput { - s.CreatedAt = &v - return s -} - -// SetS3BucketName sets the S3BucketName field's value. -func (s *DescribeCertificateAuthorityAuditReportOutput) SetS3BucketName(v string) *DescribeCertificateAuthorityAuditReportOutput { - s.S3BucketName = &v - return s -} - -// SetS3Key sets the S3Key field's value. -func (s *DescribeCertificateAuthorityAuditReportOutput) SetS3Key(v string) *DescribeCertificateAuthorityAuditReportOutput { - s.S3Key = &v - return s -} - -type DescribeCertificateAuthorityInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. - // This must be of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeCertificateAuthorityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCertificateAuthorityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCertificateAuthorityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCertificateAuthorityInput"} - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *DescribeCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *DescribeCertificateAuthorityInput { - s.CertificateAuthorityArn = &v - return s -} - -type DescribeCertificateAuthorityOutput struct { - _ struct{} `type:"structure"` - - // A CertificateAuthority structure that contains information about your private - // CA. - CertificateAuthority *CertificateAuthority `type:"structure"` -} - -// String returns the string representation -func (s DescribeCertificateAuthorityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCertificateAuthorityOutput) GoString() string { - return s.String() -} - -// SetCertificateAuthority sets the CertificateAuthority field's value. -func (s *DescribeCertificateAuthorityOutput) SetCertificateAuthority(v *CertificateAuthority) *DescribeCertificateAuthorityOutput { - s.CertificateAuthority = v - return s -} - -type GetCertificateAuthorityCertificateInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of your private CA. This is of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCertificateAuthorityCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCertificateAuthorityCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCertificateAuthorityCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCertificateAuthorityCertificateInput"} - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *GetCertificateAuthorityCertificateInput) SetCertificateAuthorityArn(v string) *GetCertificateAuthorityCertificateInput { - s.CertificateAuthorityArn = &v - return s -} - -type GetCertificateAuthorityCertificateOutput struct { - _ struct{} `type:"structure"` - - // Base64-encoded certificate authority (CA) certificate. - Certificate *string `type:"string"` - - // Base64-encoded certificate chain that includes any intermediate certificates - // and chains up to root on-premises certificate that you used to sign your - // private CA certificate. The chain does not include your private CA certificate. - CertificateChain *string `type:"string"` -} - -// String returns the string representation -func (s GetCertificateAuthorityCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCertificateAuthorityCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificate sets the Certificate field's value. -func (s *GetCertificateAuthorityCertificateOutput) SetCertificate(v string) *GetCertificateAuthorityCertificateOutput { - s.Certificate = &v - return s -} - -// SetCertificateChain sets the CertificateChain field's value. -func (s *GetCertificateAuthorityCertificateOutput) SetCertificateChain(v string) *GetCertificateAuthorityCertificateOutput { - s.CertificateChain = &v - return s -} - -type GetCertificateAuthorityCsrInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority - // operation. This must be of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCertificateAuthorityCsrInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCertificateAuthorityCsrInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCertificateAuthorityCsrInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCertificateAuthorityCsrInput"} - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *GetCertificateAuthorityCsrInput) SetCertificateAuthorityArn(v string) *GetCertificateAuthorityCsrInput { - s.CertificateAuthorityArn = &v - return s -} - -type GetCertificateAuthorityCsrOutput struct { - _ struct{} `type:"structure"` - - // The base64 PEM-encoded certificate signing request (CSR) for your private - // CA certificate. - Csr *string `type:"string"` -} - -// String returns the string representation -func (s GetCertificateAuthorityCsrOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCertificateAuthorityCsrOutput) GoString() string { - return s.String() -} - -// SetCsr sets the Csr field's value. -func (s *GetCertificateAuthorityCsrOutput) SetCsr(v string) *GetCertificateAuthorityCsrOutput { - s.Csr = &v - return s -} - -type GetCertificateInput struct { - _ struct{} `type:"structure"` - - // The ARN of the issued certificate. The ARN contains the certificate serial - // number and must be in the following form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245 - // - // CertificateArn is a required field - CertificateArn *string `min:"5" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. - // This must be of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCertificateInput"} - if s.CertificateArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateArn")) - } - if s.CertificateArn != nil && len(*s.CertificateArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 5)) - } - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *GetCertificateInput) SetCertificateArn(v string) *GetCertificateInput { - s.CertificateArn = &v - return s -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *GetCertificateInput) SetCertificateAuthorityArn(v string) *GetCertificateInput { - s.CertificateAuthorityArn = &v - return s -} - -type GetCertificateOutput struct { - _ struct{} `type:"structure"` - - // The base64 PEM-encoded certificate specified by the CertificateArn parameter. - Certificate *string `type:"string"` - - // The base64 PEM-encoded certificate chain that chains up to the on-premises - // root CA certificate that you used to sign your private CA certificate. - CertificateChain *string `type:"string"` -} - -// String returns the string representation -func (s GetCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificate sets the Certificate field's value. -func (s *GetCertificateOutput) SetCertificate(v string) *GetCertificateOutput { - s.Certificate = &v - return s -} - -// SetCertificateChain sets the CertificateChain field's value. -func (s *GetCertificateOutput) SetCertificateChain(v string) *GetCertificateOutput { - s.CertificateChain = &v - return s -} - -type ImportCertificateAuthorityCertificateInput struct { - _ struct{} `type:"structure"` - - // The PEM-encoded certificate for your private CA. This must be signed by using - // your on-premises CA. - // - // Certificate is automatically base64 encoded/decoded by the SDK. - // - // Certificate is a required field - Certificate []byte `min:"1" type:"blob" required:"true"` - - // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. - // This must be of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` - - // A PEM-encoded file that contains all of your certificates, other than the - // certificate you're importing, chaining up to your root CA. Your on-premises - // root certificate is the last in the chain, and each certificate in the chain - // signs the one preceding. - // - // CertificateChain is automatically base64 encoded/decoded by the SDK. - // - // CertificateChain is a required field - CertificateChain []byte `type:"blob" required:"true"` -} - -// String returns the string representation -func (s ImportCertificateAuthorityCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportCertificateAuthorityCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportCertificateAuthorityCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportCertificateAuthorityCertificateInput"} - if s.Certificate == nil { - invalidParams.Add(request.NewErrParamRequired("Certificate")) - } - if s.Certificate != nil && len(s.Certificate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Certificate", 1)) - } - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - if s.CertificateChain == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateChain")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificate sets the Certificate field's value. -func (s *ImportCertificateAuthorityCertificateInput) SetCertificate(v []byte) *ImportCertificateAuthorityCertificateInput { - s.Certificate = v - return s -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *ImportCertificateAuthorityCertificateInput) SetCertificateAuthorityArn(v string) *ImportCertificateAuthorityCertificateInput { - s.CertificateAuthorityArn = &v - return s -} - -// SetCertificateChain sets the CertificateChain field's value. -func (s *ImportCertificateAuthorityCertificateInput) SetCertificateChain(v []byte) *ImportCertificateAuthorityCertificateInput { - s.CertificateChain = v - return s -} - -type ImportCertificateAuthorityCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ImportCertificateAuthorityCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportCertificateAuthorityCertificateOutput) GoString() string { - return s.String() -} - -type IssueCertificateInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. - // This must be of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` - - // The certificate signing request (CSR) for the certificate you want to issue. - // You can use the following OpenSSL command to create the CSR and a 2048 bit - // RSA private key. - // - // openssl req -new -newkey rsa:2048 -days 365 -keyout private/test_cert_priv_key.pem - // -out csr/test_cert_.csr - // - // If you have a configuration file, you can use the following OpenSSL command. - // The usr_cert block in the configuration file contains your X509 version 3 - // extensions. - // - // openssl req -new -config openssl_rsa.cnf -extensions usr_cert -newkey rsa:2048 - // -days -365 -keyout private/test_cert_priv_key.pem -out csr/test_cert_.csr - // - // Csr is automatically base64 encoded/decoded by the SDK. - // - // Csr is a required field - Csr []byte `min:"1" type:"blob" required:"true"` - - // Custom string that can be used to distinguish between calls to the IssueCertificate - // operation. Idempotency tokens time out after one hour. Therefore, if you - // call IssueCertificate multiple times with the same idempotency token within - // 5 minutes, ACM PCA recognizes that you are requesting only one certificate - // and will issue only one. If you change the idempotency token for each call, - // PCA recognizes that you are requesting multiple certificates. - IdempotencyToken *string `min:"1" type:"string"` - - // The name of the algorithm that will be used to sign the certificate to be - // issued. - // - // SigningAlgorithm is a required field - SigningAlgorithm *string `type:"string" required:"true" enum:"SigningAlgorithm"` - - // The type of the validity period. - // - // Validity is a required field - Validity *Validity `type:"structure" required:"true"` -} - -// String returns the string representation -func (s IssueCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IssueCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IssueCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IssueCertificateInput"} - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - if s.Csr == nil { - invalidParams.Add(request.NewErrParamRequired("Csr")) - } - if s.Csr != nil && len(s.Csr) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Csr", 1)) - } - if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) - } - if s.SigningAlgorithm == nil { - invalidParams.Add(request.NewErrParamRequired("SigningAlgorithm")) - } - if s.Validity == nil { - invalidParams.Add(request.NewErrParamRequired("Validity")) - } - if s.Validity != nil { - if err := s.Validity.Validate(); err != nil { - invalidParams.AddNested("Validity", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *IssueCertificateInput) SetCertificateAuthorityArn(v string) *IssueCertificateInput { - s.CertificateAuthorityArn = &v - return s -} - -// SetCsr sets the Csr field's value. -func (s *IssueCertificateInput) SetCsr(v []byte) *IssueCertificateInput { - s.Csr = v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *IssueCertificateInput) SetIdempotencyToken(v string) *IssueCertificateInput { - s.IdempotencyToken = &v - return s -} - -// SetSigningAlgorithm sets the SigningAlgorithm field's value. -func (s *IssueCertificateInput) SetSigningAlgorithm(v string) *IssueCertificateInput { - s.SigningAlgorithm = &v - return s -} - -// SetValidity sets the Validity field's value. -func (s *IssueCertificateInput) SetValidity(v *Validity) *IssueCertificateInput { - s.Validity = v - return s -} - -type IssueCertificateOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the issued certificate and the certificate - // serial number. This is of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245 - CertificateArn *string `min:"5" type:"string"` -} - -// String returns the string representation -func (s IssueCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IssueCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *IssueCertificateOutput) SetCertificateArn(v string) *IssueCertificateOutput { - s.CertificateArn = &v - return s -} - -type ListCertificateAuthoritiesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter when paginating results to specify the maximum number - // of items to return in the response on each page. If additional items exist - // beyond the number you specify, the NextToken element is sent in the response. - // Use this NextToken value in a subsequent request to retrieve additional items. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter when paginating results in a subsequent request after - // you receive a response with truncated results. Set it to the value of the - // NextToken parameter from the response you just received. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListCertificateAuthoritiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCertificateAuthoritiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListCertificateAuthoritiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListCertificateAuthoritiesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListCertificateAuthoritiesInput) SetMaxResults(v int64) *ListCertificateAuthoritiesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCertificateAuthoritiesInput) SetNextToken(v string) *ListCertificateAuthoritiesInput { - s.NextToken = &v - return s -} - -type ListCertificateAuthoritiesOutput struct { - _ struct{} `type:"structure"` - - // Summary information about each certificate authority you have created. - CertificateAuthorities []*CertificateAuthority `type:"list"` - - // When the list is truncated, this value is present and should be used for - // the NextToken parameter in a subsequent pagination request. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListCertificateAuthoritiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCertificateAuthoritiesOutput) GoString() string { - return s.String() -} - -// SetCertificateAuthorities sets the CertificateAuthorities field's value. -func (s *ListCertificateAuthoritiesOutput) SetCertificateAuthorities(v []*CertificateAuthority) *ListCertificateAuthoritiesOutput { - s.CertificateAuthorities = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCertificateAuthoritiesOutput) SetNextToken(v string) *ListCertificateAuthoritiesOutput { - s.NextToken = &v - return s -} - -type ListTagsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority - // operation. This must be of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` - - // Use this parameter when paginating results to specify the maximum number - // of items to return in the response. If additional items exist beyond the - // number you specify, the NextToken element is sent in the response. Use this - // NextToken value in a subsequent request to retrieve additional items. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter when paginating results in a subsequent request after - // you receive a response with truncated results. Set it to the value of NextToken - // from the response you just received. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *ListTagsInput) SetCertificateAuthorityArn(v string) *ListTagsInput { - s.CertificateAuthorityArn = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput { - s.NextToken = &v - return s -} - -type ListTagsOutput struct { - _ struct{} `type:"structure"` - - // When the list is truncated, this value is present and should be used for - // the NextToken parameter in a subsequent pagination request. - NextToken *string `min:"1" type:"string"` - - // The tags associated with your private CA. - Tags []*Tag `min:"1" type:"list"` -} - -// String returns the string representation -func (s ListTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput { - s.NextToken = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsOutput) SetTags(v []*Tag) *ListTagsOutput { - s.Tags = v - return s -} - -type RestoreCertificateAuthorityInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority - // operation. This must be of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` -} - -// String returns the string representation -func (s RestoreCertificateAuthorityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreCertificateAuthorityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreCertificateAuthorityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreCertificateAuthorityInput"} - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *RestoreCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *RestoreCertificateAuthorityInput { - s.CertificateAuthorityArn = &v - return s -} - -type RestoreCertificateAuthorityOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RestoreCertificateAuthorityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreCertificateAuthorityOutput) GoString() string { - return s.String() -} - -// Certificate revocation information used by the CreateCertificateAuthority -// and UpdateCertificateAuthority operations. Your private certificate authority -// (CA) can create and maintain a certificate revocation list (CRL). A CRL contains -// information about certificates revoked by your CA. For more information, -// see RevokeCertificate. -type RevocationConfiguration struct { - _ struct{} `type:"structure"` - - // Configuration of the certificate revocation list (CRL), if any, maintained - // by your private CA. - CrlConfiguration *CrlConfiguration `type:"structure"` -} - -// String returns the string representation -func (s RevocationConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevocationConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RevocationConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RevocationConfiguration"} - if s.CrlConfiguration != nil { - if err := s.CrlConfiguration.Validate(); err != nil { - invalidParams.AddNested("CrlConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCrlConfiguration sets the CrlConfiguration field's value. -func (s *RevocationConfiguration) SetCrlConfiguration(v *CrlConfiguration) *RevocationConfiguration { - s.CrlConfiguration = v - return s -} - -type RevokeCertificateInput struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the private CA that issued the certificate - // to be revoked. This must be of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` - - // Serial number of the certificate to be revoked. This must be in hexadecimal - // format. You can retrieve the serial number by calling GetCertificate with - // the Amazon Resource Name (ARN) of the certificate you want and the ARN of - // your private CA. The GetCertificate operation retrieves the certificate in - // the PEM format. You can use the following OpenSSL command to list the certificate - // in text format and copy the hexadecimal serial number. - // - // openssl x509 -in file_path -text -noout - // - // You can also copy the serial number from the console or use the DescribeCertificate - // (https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeCertificate.html) - // operation in the AWS Certificate Manager API Reference. - // - // CertificateSerial is a required field - CertificateSerial *string `type:"string" required:"true"` - - // Specifies why you revoked the certificate. - // - // RevocationReason is a required field - RevocationReason *string `type:"string" required:"true" enum:"RevocationReason"` -} - -// String returns the string representation -func (s RevokeCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RevokeCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RevokeCertificateInput"} - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - if s.CertificateSerial == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateSerial")) - } - if s.RevocationReason == nil { - invalidParams.Add(request.NewErrParamRequired("RevocationReason")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *RevokeCertificateInput) SetCertificateAuthorityArn(v string) *RevokeCertificateInput { - s.CertificateAuthorityArn = &v - return s -} - -// SetCertificateSerial sets the CertificateSerial field's value. -func (s *RevokeCertificateInput) SetCertificateSerial(v string) *RevokeCertificateInput { - s.CertificateSerial = &v - return s -} - -// SetRevocationReason sets the RevocationReason field's value. -func (s *RevokeCertificateInput) SetRevocationReason(v string) *RevokeCertificateInput { - s.RevocationReason = &v - return s -} - -type RevokeCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RevokeCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeCertificateOutput) GoString() string { - return s.String() -} - -// Tags are labels that you can use to identify and organize your private CAs. -// Each tag consists of a key and an optional value. You can associate up to -// 50 tags with a private CA. To add one or more tags to a private CA, call -// the TagCertificateAuthority operation. To remove a tag, call the UntagCertificateAuthority -// operation. -type Tag struct { - _ struct{} `type:"structure"` - - // Key (name) of the tag. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // Value of the tag. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagCertificateAuthorityInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. - // This must be of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` - - // List of tags to be associated with the CA. - // - // Tags is a required field - Tags []*Tag `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s TagCertificateAuthorityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagCertificateAuthorityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagCertificateAuthorityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagCertificateAuthorityInput"} - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *TagCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *TagCertificateAuthorityInput { - s.CertificateAuthorityArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagCertificateAuthorityInput) SetTags(v []*Tag) *TagCertificateAuthorityInput { - s.Tags = v - return s -} - -type TagCertificateAuthorityOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagCertificateAuthorityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagCertificateAuthorityOutput) GoString() string { - return s.String() -} - -type UntagCertificateAuthorityInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. - // This must be of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` - - // List of tags to be removed from the CA. - // - // Tags is a required field - Tags []*Tag `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s UntagCertificateAuthorityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagCertificateAuthorityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagCertificateAuthorityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagCertificateAuthorityInput"} - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *UntagCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *UntagCertificateAuthorityInput { - s.CertificateAuthorityArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *UntagCertificateAuthorityInput) SetTags(v []*Tag) *UntagCertificateAuthorityInput { - s.Tags = v - return s -} - -type UntagCertificateAuthorityOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagCertificateAuthorityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagCertificateAuthorityOutput) GoString() string { - return s.String() -} - -type UpdateCertificateAuthorityInput struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the private CA that issued the certificate - // to be revoked. This must be of the form: - // - // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 - // - // CertificateAuthorityArn is a required field - CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` - - // Revocation information for your private CA. - RevocationConfiguration *RevocationConfiguration `type:"structure"` - - // Status of your private CA. - Status *string `type:"string" enum:"CertificateAuthorityStatus"` -} - -// String returns the string representation -func (s UpdateCertificateAuthorityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCertificateAuthorityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCertificateAuthorityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCertificateAuthorityInput"} - if s.CertificateAuthorityArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) - } - if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { - invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) - } - if s.RevocationConfiguration != nil { - if err := s.RevocationConfiguration.Validate(); err != nil { - invalidParams.AddNested("RevocationConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. -func (s *UpdateCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *UpdateCertificateAuthorityInput { - s.CertificateAuthorityArn = &v - return s -} - -// SetRevocationConfiguration sets the RevocationConfiguration field's value. -func (s *UpdateCertificateAuthorityInput) SetRevocationConfiguration(v *RevocationConfiguration) *UpdateCertificateAuthorityInput { - s.RevocationConfiguration = v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateCertificateAuthorityInput) SetStatus(v string) *UpdateCertificateAuthorityInput { - s.Status = &v - return s -} - -type UpdateCertificateAuthorityOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateCertificateAuthorityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCertificateAuthorityOutput) GoString() string { - return s.String() -} - -// Length of time for which the certificate issued by your private certificate -// authority (CA), or by the private CA itself, is valid in days, months, or -// years. You can issue a certificate by calling the IssueCertificate operation. -type Validity struct { - _ struct{} `type:"structure"` - - // Specifies whether the Value parameter represents days, months, or years. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"ValidityPeriodType"` - - // Time period. - // - // Value is a required field - Value *int64 `min:"1" type:"long" required:"true"` -} - -// String returns the string representation -func (s Validity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Validity) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Validity) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Validity"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && *s.Value < 1 { - invalidParams.Add(request.NewErrParamMinValue("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetType sets the Type field's value. -func (s *Validity) SetType(v string) *Validity { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Validity) SetValue(v int64) *Validity { - s.Value = &v - return s -} - -const ( - // AuditReportResponseFormatJson is a AuditReportResponseFormat enum value - AuditReportResponseFormatJson = "JSON" - - // AuditReportResponseFormatCsv is a AuditReportResponseFormat enum value - AuditReportResponseFormatCsv = "CSV" -) - -const ( - // AuditReportStatusCreating is a AuditReportStatus enum value - AuditReportStatusCreating = "CREATING" - - // AuditReportStatusSuccess is a AuditReportStatus enum value - AuditReportStatusSuccess = "SUCCESS" - - // AuditReportStatusFailed is a AuditReportStatus enum value - AuditReportStatusFailed = "FAILED" -) - -const ( - // CertificateAuthorityStatusCreating is a CertificateAuthorityStatus enum value - CertificateAuthorityStatusCreating = "CREATING" - - // CertificateAuthorityStatusPendingCertificate is a CertificateAuthorityStatus enum value - CertificateAuthorityStatusPendingCertificate = "PENDING_CERTIFICATE" - - // CertificateAuthorityStatusActive is a CertificateAuthorityStatus enum value - CertificateAuthorityStatusActive = "ACTIVE" - - // CertificateAuthorityStatusDeleted is a CertificateAuthorityStatus enum value - CertificateAuthorityStatusDeleted = "DELETED" - - // CertificateAuthorityStatusDisabled is a CertificateAuthorityStatus enum value - CertificateAuthorityStatusDisabled = "DISABLED" - - // CertificateAuthorityStatusExpired is a CertificateAuthorityStatus enum value - CertificateAuthorityStatusExpired = "EXPIRED" - - // CertificateAuthorityStatusFailed is a CertificateAuthorityStatus enum value - CertificateAuthorityStatusFailed = "FAILED" -) - -const ( - // CertificateAuthorityTypeSubordinate is a CertificateAuthorityType enum value - CertificateAuthorityTypeSubordinate = "SUBORDINATE" -) - -const ( - // FailureReasonRequestTimedOut is a FailureReason enum value - FailureReasonRequestTimedOut = "REQUEST_TIMED_OUT" - - // FailureReasonUnsupportedAlgorithm is a FailureReason enum value - FailureReasonUnsupportedAlgorithm = "UNSUPPORTED_ALGORITHM" - - // FailureReasonOther is a FailureReason enum value - FailureReasonOther = "OTHER" -) - -const ( - // KeyAlgorithmRsa2048 is a KeyAlgorithm enum value - KeyAlgorithmRsa2048 = "RSA_2048" - - // KeyAlgorithmRsa4096 is a KeyAlgorithm enum value - KeyAlgorithmRsa4096 = "RSA_4096" - - // KeyAlgorithmEcPrime256v1 is a KeyAlgorithm enum value - KeyAlgorithmEcPrime256v1 = "EC_prime256v1" - - // KeyAlgorithmEcSecp384r1 is a KeyAlgorithm enum value - KeyAlgorithmEcSecp384r1 = "EC_secp384r1" -) - -const ( - // RevocationReasonUnspecified is a RevocationReason enum value - RevocationReasonUnspecified = "UNSPECIFIED" - - // RevocationReasonKeyCompromise is a RevocationReason enum value - RevocationReasonKeyCompromise = "KEY_COMPROMISE" - - // RevocationReasonCertificateAuthorityCompromise is a RevocationReason enum value - RevocationReasonCertificateAuthorityCompromise = "CERTIFICATE_AUTHORITY_COMPROMISE" - - // RevocationReasonAffiliationChanged is a RevocationReason enum value - RevocationReasonAffiliationChanged = "AFFILIATION_CHANGED" - - // RevocationReasonSuperseded is a RevocationReason enum value - RevocationReasonSuperseded = "SUPERSEDED" - - // RevocationReasonCessationOfOperation is a RevocationReason enum value - RevocationReasonCessationOfOperation = "CESSATION_OF_OPERATION" - - // RevocationReasonPrivilegeWithdrawn is a RevocationReason enum value - RevocationReasonPrivilegeWithdrawn = "PRIVILEGE_WITHDRAWN" - - // RevocationReasonAACompromise is a RevocationReason enum value - RevocationReasonAACompromise = "A_A_COMPROMISE" -) - -const ( - // SigningAlgorithmSha256withecdsa is a SigningAlgorithm enum value - SigningAlgorithmSha256withecdsa = "SHA256WITHECDSA" - - // SigningAlgorithmSha384withecdsa is a SigningAlgorithm enum value - SigningAlgorithmSha384withecdsa = "SHA384WITHECDSA" - - // SigningAlgorithmSha512withecdsa is a SigningAlgorithm enum value - SigningAlgorithmSha512withecdsa = "SHA512WITHECDSA" - - // SigningAlgorithmSha256withrsa is a SigningAlgorithm enum value - SigningAlgorithmSha256withrsa = "SHA256WITHRSA" - - // SigningAlgorithmSha384withrsa is a SigningAlgorithm enum value - SigningAlgorithmSha384withrsa = "SHA384WITHRSA" - - // SigningAlgorithmSha512withrsa is a SigningAlgorithm enum value - SigningAlgorithmSha512withrsa = "SHA512WITHRSA" -) - -const ( - // ValidityPeriodTypeEndDate is a ValidityPeriodType enum value - ValidityPeriodTypeEndDate = "END_DATE" - - // ValidityPeriodTypeAbsolute is a ValidityPeriodType enum value - ValidityPeriodTypeAbsolute = "ABSOLUTE" - - // ValidityPeriodTypeDays is a ValidityPeriodType enum value - ValidityPeriodTypeDays = "DAYS" - - // ValidityPeriodTypeMonths is a ValidityPeriodType enum value - ValidityPeriodTypeMonths = "MONTHS" - - // ValidityPeriodTypeYears is a ValidityPeriodType enum value - ValidityPeriodTypeYears = "YEARS" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go deleted file mode 100644 index 2ad5d0668..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package acmpca provides the client and types for making API -// requests to AWS Certificate Manager Private Certificate Authority. -// -// You can use the ACM PCA API to create a private certificate authority (CA). -// You must first call the CreateCertificateAuthority operation. If successful, -// the operation returns an Amazon Resource Name (ARN) for your private CA. -// Use this ARN as input to the GetCertificateAuthorityCsr operation to retrieve -// the certificate signing request (CSR) for your private CA certificate. Sign -// the CSR using the root or an intermediate CA in your on-premises PKI hierarchy, -// and call the ImportCertificateAuthorityCertificate to import your signed -// private CA certificate into ACM PCA. -// -// Use your private CA to issue and revoke certificates. These are private certificates -// that identify and secure client computers, servers, applications, services, -// devices, and users over SSLS/TLS connections within your organization. Call -// the IssueCertificate operation to issue a certificate. Call the RevokeCertificate -// operation to revoke a certificate. -// -// Certificates issued by your private CA can be trusted only within your organization, -// not publicly. -// -// Your private CA can optionally create a certificate revocation list (CRL) -// to track the certificates you revoke. To create a CRL, you must specify a -// RevocationConfiguration object when you call the CreateCertificateAuthority -// operation. ACM PCA writes the CRL to an S3 bucket that you specify. You must -// specify a bucket policy that grants ACM PCA write permission. -// -// You can also call the CreateCertificateAuthorityAuditReport to create an -// optional audit report, which enumerates all of the issued, valid, expired, -// and revoked certificates from the CA. -// -// Each ACM PCA API operation has a throttling limit which determines the number -// of times the operation can be called per second. For more information, see -// API Rate Limits in ACM PCA (acm-pca/latest/userguide/PcaLimits.html#PcaLimits-api) -// in the ACM PCA user guide. -// -// See https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22 for more information on this service. -// -// See acmpca package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/acmpca/ -// -// Using the Client -// -// To contact AWS Certificate Manager Private Certificate Authority with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS Certificate Manager Private Certificate Authority client ACMPCA for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/acmpca/#New -package acmpca diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go deleted file mode 100644 index 5ce2781c2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package acmpca - -const ( - - // ErrCodeCertificateMismatchException for service response error code - // "CertificateMismatchException". - // - // The certificate authority certificate you are importing does not comply with - // conditions specified in the certificate that signed it. - ErrCodeCertificateMismatchException = "CertificateMismatchException" - - // ErrCodeConcurrentModificationException for service response error code - // "ConcurrentModificationException". - // - // A previous update to your private CA is still ongoing. - ErrCodeConcurrentModificationException = "ConcurrentModificationException" - - // ErrCodeInvalidArgsException for service response error code - // "InvalidArgsException". - // - // One or more of the specified arguments was not valid. - ErrCodeInvalidArgsException = "InvalidArgsException" - - // ErrCodeInvalidArnException for service response error code - // "InvalidArnException". - // - // The requested Amazon Resource Name (ARN) does not refer to an existing resource. - ErrCodeInvalidArnException = "InvalidArnException" - - // ErrCodeInvalidNextTokenException for service response error code - // "InvalidNextTokenException". - // - // The token specified in the NextToken argument is not valid. Use the token - // returned from your previous call to ListCertificateAuthorities. - ErrCodeInvalidNextTokenException = "InvalidNextTokenException" - - // ErrCodeInvalidPolicyException for service response error code - // "InvalidPolicyException". - // - // The S3 bucket policy is not valid. The policy must give ACM PCA rights to - // read from and write to the bucket and find the bucket location. - ErrCodeInvalidPolicyException = "InvalidPolicyException" - - // ErrCodeInvalidStateException for service response error code - // "InvalidStateException". - // - // The private CA is in a state during which a report or certificate cannot - // be generated. - ErrCodeInvalidStateException = "InvalidStateException" - - // ErrCodeInvalidTagException for service response error code - // "InvalidTagException". - // - // The tag associated with the CA is not valid. The invalid argument is contained - // in the message field. - ErrCodeInvalidTagException = "InvalidTagException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // An ACM PCA limit has been exceeded. See the exception message returned to - // determine the limit that was exceeded. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeMalformedCSRException for service response error code - // "MalformedCSRException". - // - // The certificate signing request is invalid. - ErrCodeMalformedCSRException = "MalformedCSRException" - - // ErrCodeMalformedCertificateException for service response error code - // "MalformedCertificateException". - // - // One or more fields in the certificate are invalid. - ErrCodeMalformedCertificateException = "MalformedCertificateException" - - // ErrCodeRequestAlreadyProcessedException for service response error code - // "RequestAlreadyProcessedException". - // - // Your request has already been completed. - ErrCodeRequestAlreadyProcessedException = "RequestAlreadyProcessedException" - - // ErrCodeRequestFailedException for service response error code - // "RequestFailedException". - // - // The request has failed for an unspecified reason. - ErrCodeRequestFailedException = "RequestFailedException" - - // ErrCodeRequestInProgressException for service response error code - // "RequestInProgressException". - // - // Your request is already in progress. - ErrCodeRequestInProgressException = "RequestInProgressException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // A resource such as a private CA, S3 bucket, certificate, or audit report - // cannot be found. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeTooManyTagsException for service response error code - // "TooManyTagsException". - // - // You can associate up to 50 tags with a private CA. Exception information - // is contained in the exception message field. - ErrCodeTooManyTagsException = "TooManyTagsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go deleted file mode 100644 index 6c231c1d7..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package acmpca - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// ACMPCA provides the API operation methods for making requests to -// AWS Certificate Manager Private Certificate Authority. See this package's package overview docs -// for details on the service. -// -// ACMPCA methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ACMPCA struct { - *client.Client -} - -// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) - -// Service information constants -const ( - ServiceName = "acm-pca" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "ACM PCA" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ACMPCA client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a ACMPCA client from just a session. -// svc := acmpca.New(mySession) -// -// // Create a ACMPCA client with additional configuration -// svc := acmpca.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ACMPCA { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ACMPCA { - svc := &ACMPCA{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-08-22", - JSONVersion: "1.1", - TargetPrefix: "ACMPrivateCA", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ACMPCA operation and runs any -// custom request initialization. -func (c *ACMPCA) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/waiters.go deleted file mode 100644 index 3c4a76336..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/waiters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package acmpca - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilAuditReportCreated uses the ACM-PCA API operation -// DescribeCertificateAuthorityAuditReport to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ACMPCA) WaitUntilAuditReportCreated(input *DescribeCertificateAuthorityAuditReportInput) error { - return c.WaitUntilAuditReportCreatedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilAuditReportCreatedWithContext is an extended version of WaitUntilAuditReportCreated. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) WaitUntilAuditReportCreatedWithContext(ctx aws.Context, input *DescribeCertificateAuthorityAuditReportInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilAuditReportCreated", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(3 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "AuditReportStatus", - Expected: "SUCCESS", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "AuditReportStatus", - Expected: "FAILED", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeCertificateAuthorityAuditReportInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeCertificateAuthorityAuditReportRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilCertificateAuthorityCSRCreated uses the ACM-PCA API operation -// GetCertificateAuthorityCsr to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ACMPCA) WaitUntilCertificateAuthorityCSRCreated(input *GetCertificateAuthorityCsrInput) error { - return c.WaitUntilCertificateAuthorityCSRCreatedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilCertificateAuthorityCSRCreatedWithContext is an extended version of WaitUntilCertificateAuthorityCSRCreated. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) WaitUntilCertificateAuthorityCSRCreatedWithContext(ctx aws.Context, input *GetCertificateAuthorityCsrInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilCertificateAuthorityCSRCreated", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(3 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "RequestInProgressException", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetCertificateAuthorityCsrInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetCertificateAuthorityCsrRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilCertificateIssued uses the ACM-PCA API operation -// GetCertificate to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ACMPCA) WaitUntilCertificateIssued(input *GetCertificateInput) error { - return c.WaitUntilCertificateIssuedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilCertificateIssuedWithContext is an extended version of WaitUntilCertificateIssued. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ACMPCA) WaitUntilCertificateIssuedWithContext(ctx aws.Context, input *GetCertificateInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilCertificateIssued", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(3 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "RequestInProgressException", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetCertificateInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetCertificateRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go deleted file mode 100644 index e2bb14128..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go +++ /dev/null @@ -1,24950 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package apigateway - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opCreateApiKey = "CreateApiKey" - -// CreateApiKeyRequest generates a "aws/request.Request" representing the -// client's request for the CreateApiKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateApiKey for more information on using the CreateApiKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateApiKeyRequest method. -// req, resp := client.CreateApiKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request.Request, output *ApiKey) { - op := &request.Operation{ - Name: opCreateApiKey, - HTTPMethod: "POST", - HTTPPath: "/apikeys", - } - - if input == nil { - input = &CreateApiKeyInput{} - } - - output = &ApiKey{} - req = c.newRequest(op, input, output) - return -} - -// CreateApiKey API operation for Amazon API Gateway. -// -// Create an ApiKey resource. -// -// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/create-api-key.html) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation CreateApiKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) CreateApiKey(input *CreateApiKeyInput) (*ApiKey, error) { - req, out := c.CreateApiKeyRequest(input) - return out, req.Send() -} - -// CreateApiKeyWithContext is the same as CreateApiKey with the addition of -// the ability to pass a context and additional request options. -// -// See CreateApiKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) CreateApiKeyWithContext(ctx aws.Context, input *CreateApiKeyInput, opts ...request.Option) (*ApiKey, error) { - req, out := c.CreateApiKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAuthorizer = "CreateAuthorizer" - -// CreateAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the CreateAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAuthorizer for more information on using the CreateAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAuthorizerRequest method. -// req, resp := client.CreateAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) CreateAuthorizerRequest(input *CreateAuthorizerInput) (req *request.Request, output *Authorizer) { - op := &request.Operation{ - Name: opCreateAuthorizer, - HTTPMethod: "POST", - HTTPPath: "/restapis/{restapi_id}/authorizers", - } - - if input == nil { - input = &CreateAuthorizerInput{} - } - - output = &Authorizer{} - req = c.newRequest(op, input, output) - return -} - -// CreateAuthorizer API operation for Amazon API Gateway. -// -// Adds a new Authorizer resource to an existing RestApi resource. -// -// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/create-authorizer.html) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation CreateAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) CreateAuthorizer(input *CreateAuthorizerInput) (*Authorizer, error) { - req, out := c.CreateAuthorizerRequest(input) - return out, req.Send() -} - -// CreateAuthorizerWithContext is the same as CreateAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) CreateAuthorizerWithContext(ctx aws.Context, input *CreateAuthorizerInput, opts ...request.Option) (*Authorizer, error) { - req, out := c.CreateAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateBasePathMapping = "CreateBasePathMapping" - -// CreateBasePathMappingRequest generates a "aws/request.Request" representing the -// client's request for the CreateBasePathMapping operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateBasePathMapping for more information on using the CreateBasePathMapping -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateBasePathMappingRequest method. -// req, resp := client.CreateBasePathMappingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) CreateBasePathMappingRequest(input *CreateBasePathMappingInput) (req *request.Request, output *BasePathMapping) { - op := &request.Operation{ - Name: opCreateBasePathMapping, - HTTPMethod: "POST", - HTTPPath: "/domainnames/{domain_name}/basepathmappings", - } - - if input == nil { - input = &CreateBasePathMappingInput{} - } - - output = &BasePathMapping{} - req = c.newRequest(op, input, output) - return -} - -// CreateBasePathMapping API operation for Amazon API Gateway. -// -// Creates a new BasePathMapping resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation CreateBasePathMapping for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) CreateBasePathMapping(input *CreateBasePathMappingInput) (*BasePathMapping, error) { - req, out := c.CreateBasePathMappingRequest(input) - return out, req.Send() -} - -// CreateBasePathMappingWithContext is the same as CreateBasePathMapping with the addition of -// the ability to pass a context and additional request options. -// -// See CreateBasePathMapping for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) CreateBasePathMappingWithContext(ctx aws.Context, input *CreateBasePathMappingInput, opts ...request.Option) (*BasePathMapping, error) { - req, out := c.CreateBasePathMappingRequest(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) -// } -func (c *APIGateway) CreateDeploymentRequest(input *CreateDeploymentInput) (req *request.Request, output *Deployment) { - op := &request.Operation{ - Name: opCreateDeployment, - HTTPMethod: "POST", - HTTPPath: "/restapis/{restapi_id}/deployments", - } - - if input == nil { - input = &CreateDeploymentInput{} - } - - output = &Deployment{} - req = c.newRequest(op, input, output) - return -} - -// CreateDeployment API operation for Amazon API Gateway. -// -// Creates a Deployment resource, which makes a specified RestApi callable over -// the internet. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation CreateDeployment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The requested service is not available. For details see the accompanying -// error message. Retry after the specified time period. -// -func (c *APIGateway) CreateDeployment(input *CreateDeploymentInput) (*Deployment, 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 *APIGateway) CreateDeploymentWithContext(ctx aws.Context, input *CreateDeploymentInput, opts ...request.Option) (*Deployment, error) { - req, out := c.CreateDeploymentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDocumentationPart = "CreateDocumentationPart" - -// CreateDocumentationPartRequest generates a "aws/request.Request" representing the -// client's request for the CreateDocumentationPart operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDocumentationPart for more information on using the CreateDocumentationPart -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDocumentationPartRequest method. -// req, resp := client.CreateDocumentationPartRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) CreateDocumentationPartRequest(input *CreateDocumentationPartInput) (req *request.Request, output *DocumentationPart) { - op := &request.Operation{ - Name: opCreateDocumentationPart, - HTTPMethod: "POST", - HTTPPath: "/restapis/{restapi_id}/documentation/parts", - } - - if input == nil { - input = &CreateDocumentationPartInput{} - } - - output = &DocumentationPart{} - req = c.newRequest(op, input, output) - return -} - -// CreateDocumentationPart API operation for Amazon API Gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation CreateDocumentationPart for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) CreateDocumentationPart(input *CreateDocumentationPartInput) (*DocumentationPart, error) { - req, out := c.CreateDocumentationPartRequest(input) - return out, req.Send() -} - -// CreateDocumentationPartWithContext is the same as CreateDocumentationPart with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDocumentationPart for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) CreateDocumentationPartWithContext(ctx aws.Context, input *CreateDocumentationPartInput, opts ...request.Option) (*DocumentationPart, error) { - req, out := c.CreateDocumentationPartRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDocumentationVersion = "CreateDocumentationVersion" - -// CreateDocumentationVersionRequest generates a "aws/request.Request" representing the -// client's request for the CreateDocumentationVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDocumentationVersion for more information on using the CreateDocumentationVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDocumentationVersionRequest method. -// req, resp := client.CreateDocumentationVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) CreateDocumentationVersionRequest(input *CreateDocumentationVersionInput) (req *request.Request, output *DocumentationVersion) { - op := &request.Operation{ - Name: opCreateDocumentationVersion, - HTTPMethod: "POST", - HTTPPath: "/restapis/{restapi_id}/documentation/versions", - } - - if input == nil { - input = &CreateDocumentationVersionInput{} - } - - output = &DocumentationVersion{} - req = c.newRequest(op, input, output) - return -} - -// CreateDocumentationVersion API operation for Amazon API Gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation CreateDocumentationVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) CreateDocumentationVersion(input *CreateDocumentationVersionInput) (*DocumentationVersion, error) { - req, out := c.CreateDocumentationVersionRequest(input) - return out, req.Send() -} - -// CreateDocumentationVersionWithContext is the same as CreateDocumentationVersion with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDocumentationVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) CreateDocumentationVersionWithContext(ctx aws.Context, input *CreateDocumentationVersionInput, opts ...request.Option) (*DocumentationVersion, error) { - req, out := c.CreateDocumentationVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDomainName = "CreateDomainName" - -// CreateDomainNameRequest generates a "aws/request.Request" representing the -// client's request for the CreateDomainName operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDomainName for more information on using the CreateDomainName -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDomainNameRequest method. -// req, resp := client.CreateDomainNameRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) CreateDomainNameRequest(input *CreateDomainNameInput) (req *request.Request, output *DomainName) { - op := &request.Operation{ - Name: opCreateDomainName, - HTTPMethod: "POST", - HTTPPath: "/domainnames", - } - - if input == nil { - input = &CreateDomainNameInput{} - } - - output = &DomainName{} - req = c.newRequest(op, input, output) - return -} - -// CreateDomainName API operation for Amazon API Gateway. -// -// Creates a new domain name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation CreateDomainName for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) CreateDomainName(input *CreateDomainNameInput) (*DomainName, error) { - req, out := c.CreateDomainNameRequest(input) - return out, req.Send() -} - -// CreateDomainNameWithContext is the same as CreateDomainName with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDomainName for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) CreateDomainNameWithContext(ctx aws.Context, input *CreateDomainNameInput, opts ...request.Option) (*DomainName, error) { - req, out := c.CreateDomainNameRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateModel = "CreateModel" - -// CreateModelRequest generates a "aws/request.Request" representing the -// client's request for the CreateModel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateModel for more information on using the CreateModel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateModelRequest method. -// req, resp := client.CreateModelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) CreateModelRequest(input *CreateModelInput) (req *request.Request, output *Model) { - op := &request.Operation{ - Name: opCreateModel, - HTTPMethod: "POST", - HTTPPath: "/restapis/{restapi_id}/models", - } - - if input == nil { - input = &CreateModelInput{} - } - - output = &Model{} - req = c.newRequest(op, input, output) - return -} - -// CreateModel API operation for Amazon API Gateway. -// -// Adds a new Model resource to an existing RestApi resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation CreateModel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) CreateModel(input *CreateModelInput) (*Model, error) { - req, out := c.CreateModelRequest(input) - return out, req.Send() -} - -// CreateModelWithContext is the same as CreateModel with the addition of -// the ability to pass a context and additional request options. -// -// See CreateModel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) CreateModelWithContext(ctx aws.Context, input *CreateModelInput, opts ...request.Option) (*Model, error) { - req, out := c.CreateModelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRequestValidator = "CreateRequestValidator" - -// CreateRequestValidatorRequest generates a "aws/request.Request" representing the -// client's request for the CreateRequestValidator operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRequestValidator for more information on using the CreateRequestValidator -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRequestValidatorRequest method. -// req, resp := client.CreateRequestValidatorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) CreateRequestValidatorRequest(input *CreateRequestValidatorInput) (req *request.Request, output *UpdateRequestValidatorOutput) { - op := &request.Operation{ - Name: opCreateRequestValidator, - HTTPMethod: "POST", - HTTPPath: "/restapis/{restapi_id}/requestvalidators", - } - - if input == nil { - input = &CreateRequestValidatorInput{} - } - - output = &UpdateRequestValidatorOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRequestValidator API operation for Amazon API Gateway. -// -// Creates a ReqeustValidator of a given RestApi. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation CreateRequestValidator for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) CreateRequestValidator(input *CreateRequestValidatorInput) (*UpdateRequestValidatorOutput, error) { - req, out := c.CreateRequestValidatorRequest(input) - return out, req.Send() -} - -// CreateRequestValidatorWithContext is the same as CreateRequestValidator with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRequestValidator for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) CreateRequestValidatorWithContext(ctx aws.Context, input *CreateRequestValidatorInput, opts ...request.Option) (*UpdateRequestValidatorOutput, error) { - req, out := c.CreateRequestValidatorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateResource = "CreateResource" - -// CreateResourceRequest generates a "aws/request.Request" representing the -// client's request for the CreateResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateResource for more information on using the CreateResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateResourceRequest method. -// req, resp := client.CreateResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) CreateResourceRequest(input *CreateResourceInput) (req *request.Request, output *Resource) { - op := &request.Operation{ - Name: opCreateResource, - HTTPMethod: "POST", - HTTPPath: "/restapis/{restapi_id}/resources/{parent_id}", - } - - if input == nil { - input = &CreateResourceInput{} - } - - output = &Resource{} - req = c.newRequest(op, input, output) - return -} - -// CreateResource API operation for Amazon API Gateway. -// -// Creates a Resource resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation CreateResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) CreateResource(input *CreateResourceInput) (*Resource, error) { - req, out := c.CreateResourceRequest(input) - return out, req.Send() -} - -// CreateResourceWithContext is the same as CreateResource with the addition of -// the ability to pass a context and additional request options. -// -// See CreateResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) CreateResourceWithContext(ctx aws.Context, input *CreateResourceInput, opts ...request.Option) (*Resource, error) { - req, out := c.CreateResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRestApi = "CreateRestApi" - -// CreateRestApiRequest generates a "aws/request.Request" representing the -// client's request for the CreateRestApi operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRestApi for more information on using the CreateRestApi -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRestApiRequest method. -// req, resp := client.CreateRestApiRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) CreateRestApiRequest(input *CreateRestApiInput) (req *request.Request, output *RestApi) { - op := &request.Operation{ - Name: opCreateRestApi, - HTTPMethod: "POST", - HTTPPath: "/restapis", - } - - if input == nil { - input = &CreateRestApiInput{} - } - - output = &RestApi{} - req = c.newRequest(op, input, output) - return -} - -// CreateRestApi API operation for Amazon API Gateway. -// -// Creates a new RestApi resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation CreateRestApi for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) CreateRestApi(input *CreateRestApiInput) (*RestApi, error) { - req, out := c.CreateRestApiRequest(input) - return out, req.Send() -} - -// CreateRestApiWithContext is the same as CreateRestApi with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRestApi for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) CreateRestApiWithContext(ctx aws.Context, input *CreateRestApiInput, opts ...request.Option) (*RestApi, error) { - req, out := c.CreateRestApiRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStage = "CreateStage" - -// CreateStageRequest generates a "aws/request.Request" representing the -// client's request for the CreateStage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateStage for more information on using the CreateStage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateStageRequest method. -// req, resp := client.CreateStageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) CreateStageRequest(input *CreateStageInput) (req *request.Request, output *Stage) { - op := &request.Operation{ - Name: opCreateStage, - HTTPMethod: "POST", - HTTPPath: "/restapis/{restapi_id}/stages", - } - - if input == nil { - input = &CreateStageInput{} - } - - output = &Stage{} - req = c.newRequest(op, input, output) - return -} - -// CreateStage API operation for Amazon API Gateway. -// -// Creates a new Stage resource that references a pre-existing Deployment for -// the API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation CreateStage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) CreateStage(input *CreateStageInput) (*Stage, error) { - req, out := c.CreateStageRequest(input) - return out, req.Send() -} - -// CreateStageWithContext is the same as CreateStage with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) CreateStageWithContext(ctx aws.Context, input *CreateStageInput, opts ...request.Option) (*Stage, error) { - req, out := c.CreateStageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateUsagePlan = "CreateUsagePlan" - -// CreateUsagePlanRequest generates a "aws/request.Request" representing the -// client's request for the CreateUsagePlan operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateUsagePlan for more information on using the CreateUsagePlan -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateUsagePlanRequest method. -// req, resp := client.CreateUsagePlanRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) CreateUsagePlanRequest(input *CreateUsagePlanInput) (req *request.Request, output *UsagePlan) { - op := &request.Operation{ - Name: opCreateUsagePlan, - HTTPMethod: "POST", - HTTPPath: "/usageplans", - } - - if input == nil { - input = &CreateUsagePlanInput{} - } - - output = &UsagePlan{} - req = c.newRequest(op, input, output) - return -} - -// CreateUsagePlan API operation for Amazon API Gateway. -// -// Creates a usage plan with the throttle and quota limits, as well as the associated -// API stages, specified in the payload. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation CreateUsagePlan for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -func (c *APIGateway) CreateUsagePlan(input *CreateUsagePlanInput) (*UsagePlan, error) { - req, out := c.CreateUsagePlanRequest(input) - return out, req.Send() -} - -// CreateUsagePlanWithContext is the same as CreateUsagePlan with the addition of -// the ability to pass a context and additional request options. -// -// See CreateUsagePlan for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) CreateUsagePlanWithContext(ctx aws.Context, input *CreateUsagePlanInput, opts ...request.Option) (*UsagePlan, error) { - req, out := c.CreateUsagePlanRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateUsagePlanKey = "CreateUsagePlanKey" - -// CreateUsagePlanKeyRequest generates a "aws/request.Request" representing the -// client's request for the CreateUsagePlanKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateUsagePlanKey for more information on using the CreateUsagePlanKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateUsagePlanKeyRequest method. -// req, resp := client.CreateUsagePlanKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) CreateUsagePlanKeyRequest(input *CreateUsagePlanKeyInput) (req *request.Request, output *UsagePlanKey) { - op := &request.Operation{ - Name: opCreateUsagePlanKey, - HTTPMethod: "POST", - HTTPPath: "/usageplans/{usageplanId}/keys", - } - - if input == nil { - input = &CreateUsagePlanKeyInput{} - } - - output = &UsagePlanKey{} - req = c.newRequest(op, input, output) - return -} - -// CreateUsagePlanKey API operation for Amazon API Gateway. -// -// Creates a usage plan key for adding an existing API key to a usage plan. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation CreateUsagePlanKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) CreateUsagePlanKey(input *CreateUsagePlanKeyInput) (*UsagePlanKey, error) { - req, out := c.CreateUsagePlanKeyRequest(input) - return out, req.Send() -} - -// CreateUsagePlanKeyWithContext is the same as CreateUsagePlanKey with the addition of -// the ability to pass a context and additional request options. -// -// See CreateUsagePlanKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) CreateUsagePlanKeyWithContext(ctx aws.Context, input *CreateUsagePlanKeyInput, opts ...request.Option) (*UsagePlanKey, error) { - req, out := c.CreateUsagePlanKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVpcLink = "CreateVpcLink" - -// CreateVpcLinkRequest generates a "aws/request.Request" representing the -// client's request for the CreateVpcLink operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVpcLink for more information on using the CreateVpcLink -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVpcLinkRequest method. -// req, resp := client.CreateVpcLinkRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) CreateVpcLinkRequest(input *CreateVpcLinkInput) (req *request.Request, output *UpdateVpcLinkOutput) { - op := &request.Operation{ - Name: opCreateVpcLink, - HTTPMethod: "POST", - HTTPPath: "/vpclinks", - } - - if input == nil { - input = &CreateVpcLinkInput{} - } - - output = &UpdateVpcLinkOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVpcLink API operation for Amazon API Gateway. -// -// Creates a VPC link, under the caller's account in a selected region, in an -// asynchronous operation that typically takes 2-4 minutes to complete and become -// operational. The caller must have permissions to create and update VPC Endpoint -// 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 Amazon API Gateway's -// API operation CreateVpcLink for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) CreateVpcLink(input *CreateVpcLinkInput) (*UpdateVpcLinkOutput, error) { - req, out := c.CreateVpcLinkRequest(input) - return out, req.Send() -} - -// CreateVpcLinkWithContext is the same as CreateVpcLink with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVpcLink for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) CreateVpcLinkWithContext(ctx aws.Context, input *CreateVpcLinkInput, opts ...request.Option) (*UpdateVpcLinkOutput, error) { - req, out := c.CreateVpcLinkRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApiKey = "DeleteApiKey" - -// DeleteApiKeyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApiKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApiKey for more information on using the DeleteApiKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApiKeyRequest method. -// req, resp := client.DeleteApiKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteApiKeyRequest(input *DeleteApiKeyInput) (req *request.Request, output *DeleteApiKeyOutput) { - op := &request.Operation{ - Name: opDeleteApiKey, - HTTPMethod: "DELETE", - HTTPPath: "/apikeys/{api_Key}", - } - - if input == nil { - input = &DeleteApiKeyInput{} - } - - output = &DeleteApiKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteApiKey API operation for Amazon API Gateway. -// -// Deletes the ApiKey resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteApiKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) DeleteApiKey(input *DeleteApiKeyInput) (*DeleteApiKeyOutput, error) { - req, out := c.DeleteApiKeyRequest(input) - return out, req.Send() -} - -// DeleteApiKeyWithContext is the same as DeleteApiKey with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApiKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteApiKeyWithContext(ctx aws.Context, input *DeleteApiKeyInput, opts ...request.Option) (*DeleteApiKeyOutput, error) { - req, out := c.DeleteApiKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAuthorizer = "DeleteAuthorizer" - -// DeleteAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAuthorizer for more information on using the DeleteAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAuthorizerRequest method. -// req, resp := client.DeleteAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteAuthorizerRequest(input *DeleteAuthorizerInput) (req *request.Request, output *DeleteAuthorizerOutput) { - op := &request.Operation{ - Name: opDeleteAuthorizer, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}", - } - - if input == nil { - input = &DeleteAuthorizerInput{} - } - - output = &DeleteAuthorizerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAuthorizer API operation for Amazon API Gateway. -// -// Deletes an existing Authorizer resource. -// -// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/delete-authorizer.html) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) DeleteAuthorizer(input *DeleteAuthorizerInput) (*DeleteAuthorizerOutput, error) { - req, out := c.DeleteAuthorizerRequest(input) - return out, req.Send() -} - -// DeleteAuthorizerWithContext is the same as DeleteAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteAuthorizerWithContext(ctx aws.Context, input *DeleteAuthorizerInput, opts ...request.Option) (*DeleteAuthorizerOutput, error) { - req, out := c.DeleteAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBasePathMapping = "DeleteBasePathMapping" - -// DeleteBasePathMappingRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBasePathMapping operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBasePathMapping for more information on using the DeleteBasePathMapping -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBasePathMappingRequest method. -// req, resp := client.DeleteBasePathMappingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteBasePathMappingRequest(input *DeleteBasePathMappingInput) (req *request.Request, output *DeleteBasePathMappingOutput) { - op := &request.Operation{ - Name: opDeleteBasePathMapping, - HTTPMethod: "DELETE", - HTTPPath: "/domainnames/{domain_name}/basepathmappings/{base_path}", - } - - if input == nil { - input = &DeleteBasePathMappingInput{} - } - - output = &DeleteBasePathMappingOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBasePathMapping API operation for Amazon API Gateway. -// -// Deletes the BasePathMapping resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteBasePathMapping for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) DeleteBasePathMapping(input *DeleteBasePathMappingInput) (*DeleteBasePathMappingOutput, error) { - req, out := c.DeleteBasePathMappingRequest(input) - return out, req.Send() -} - -// DeleteBasePathMappingWithContext is the same as DeleteBasePathMapping with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBasePathMapping for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteBasePathMappingWithContext(ctx aws.Context, input *DeleteBasePathMappingInput, opts ...request.Option) (*DeleteBasePathMappingOutput, error) { - req, out := c.DeleteBasePathMappingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteClientCertificate = "DeleteClientCertificate" - -// DeleteClientCertificateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteClientCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteClientCertificate for more information on using the DeleteClientCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteClientCertificateRequest method. -// req, resp := client.DeleteClientCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteClientCertificateRequest(input *DeleteClientCertificateInput) (req *request.Request, output *DeleteClientCertificateOutput) { - op := &request.Operation{ - Name: opDeleteClientCertificate, - HTTPMethod: "DELETE", - HTTPPath: "/clientcertificates/{clientcertificate_id}", - } - - if input == nil { - input = &DeleteClientCertificateInput{} - } - - output = &DeleteClientCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteClientCertificate API operation for Amazon API Gateway. -// -// Deletes the ClientCertificate resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteClientCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -func (c *APIGateway) DeleteClientCertificate(input *DeleteClientCertificateInput) (*DeleteClientCertificateOutput, error) { - req, out := c.DeleteClientCertificateRequest(input) - return out, req.Send() -} - -// DeleteClientCertificateWithContext is the same as DeleteClientCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteClientCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteClientCertificateWithContext(ctx aws.Context, input *DeleteClientCertificateInput, opts ...request.Option) (*DeleteClientCertificateOutput, error) { - req, out := c.DeleteClientCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDeployment = "DeleteDeployment" - -// DeleteDeploymentRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDeployment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDeployment for more information on using the DeleteDeployment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDeploymentRequest method. -// req, resp := client.DeleteDeploymentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteDeploymentRequest(input *DeleteDeploymentInput) (req *request.Request, output *DeleteDeploymentOutput) { - op := &request.Operation{ - Name: opDeleteDeployment, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/deployments/{deployment_id}", - } - - if input == nil { - input = &DeleteDeploymentInput{} - } - - output = &DeleteDeploymentOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDeployment API operation for Amazon API Gateway. -// -// Deletes a Deployment resource. Deleting a deployment will only succeed if -// there are no Stage resources associated with it. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteDeployment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) DeleteDeployment(input *DeleteDeploymentInput) (*DeleteDeploymentOutput, error) { - req, out := c.DeleteDeploymentRequest(input) - return out, req.Send() -} - -// DeleteDeploymentWithContext is the same as DeleteDeployment with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDeployment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteDeploymentWithContext(ctx aws.Context, input *DeleteDeploymentInput, opts ...request.Option) (*DeleteDeploymentOutput, error) { - req, out := c.DeleteDeploymentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDocumentationPart = "DeleteDocumentationPart" - -// DeleteDocumentationPartRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDocumentationPart operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDocumentationPart for more information on using the DeleteDocumentationPart -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDocumentationPartRequest method. -// req, resp := client.DeleteDocumentationPartRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteDocumentationPartRequest(input *DeleteDocumentationPartInput) (req *request.Request, output *DeleteDocumentationPartOutput) { - op := &request.Operation{ - Name: opDeleteDocumentationPart, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/documentation/parts/{part_id}", - } - - if input == nil { - input = &DeleteDocumentationPartInput{} - } - - output = &DeleteDocumentationPartOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDocumentationPart API operation for Amazon API Gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteDocumentationPart for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -func (c *APIGateway) DeleteDocumentationPart(input *DeleteDocumentationPartInput) (*DeleteDocumentationPartOutput, error) { - req, out := c.DeleteDocumentationPartRequest(input) - return out, req.Send() -} - -// DeleteDocumentationPartWithContext is the same as DeleteDocumentationPart with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDocumentationPart for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteDocumentationPartWithContext(ctx aws.Context, input *DeleteDocumentationPartInput, opts ...request.Option) (*DeleteDocumentationPartOutput, error) { - req, out := c.DeleteDocumentationPartRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDocumentationVersion = "DeleteDocumentationVersion" - -// DeleteDocumentationVersionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDocumentationVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDocumentationVersion for more information on using the DeleteDocumentationVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDocumentationVersionRequest method. -// req, resp := client.DeleteDocumentationVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteDocumentationVersionRequest(input *DeleteDocumentationVersionInput) (req *request.Request, output *DeleteDocumentationVersionOutput) { - op := &request.Operation{ - Name: opDeleteDocumentationVersion, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/documentation/versions/{doc_version}", - } - - if input == nil { - input = &DeleteDocumentationVersionInput{} - } - - output = &DeleteDocumentationVersionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDocumentationVersion API operation for Amazon API Gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteDocumentationVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) DeleteDocumentationVersion(input *DeleteDocumentationVersionInput) (*DeleteDocumentationVersionOutput, error) { - req, out := c.DeleteDocumentationVersionRequest(input) - return out, req.Send() -} - -// DeleteDocumentationVersionWithContext is the same as DeleteDocumentationVersion with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDocumentationVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteDocumentationVersionWithContext(ctx aws.Context, input *DeleteDocumentationVersionInput, opts ...request.Option) (*DeleteDocumentationVersionOutput, error) { - req, out := c.DeleteDocumentationVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDomainName = "DeleteDomainName" - -// DeleteDomainNameRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDomainName operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDomainName for more information on using the DeleteDomainName -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDomainNameRequest method. -// req, resp := client.DeleteDomainNameRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteDomainNameRequest(input *DeleteDomainNameInput) (req *request.Request, output *DeleteDomainNameOutput) { - op := &request.Operation{ - Name: opDeleteDomainName, - HTTPMethod: "DELETE", - HTTPPath: "/domainnames/{domain_name}", - } - - if input == nil { - input = &DeleteDomainNameInput{} - } - - output = &DeleteDomainNameOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDomainName API operation for Amazon API Gateway. -// -// Deletes the DomainName resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteDomainName for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) DeleteDomainName(input *DeleteDomainNameInput) (*DeleteDomainNameOutput, error) { - req, out := c.DeleteDomainNameRequest(input) - return out, req.Send() -} - -// DeleteDomainNameWithContext is the same as DeleteDomainName with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDomainName for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteDomainNameWithContext(ctx aws.Context, input *DeleteDomainNameInput, opts ...request.Option) (*DeleteDomainNameOutput, error) { - req, out := c.DeleteDomainNameRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteGatewayResponse = "DeleteGatewayResponse" - -// DeleteGatewayResponseRequest generates a "aws/request.Request" representing the -// client's request for the DeleteGatewayResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteGatewayResponse for more information on using the DeleteGatewayResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteGatewayResponseRequest method. -// req, resp := client.DeleteGatewayResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteGatewayResponseRequest(input *DeleteGatewayResponseInput) (req *request.Request, output *DeleteGatewayResponseOutput) { - op := &request.Operation{ - Name: opDeleteGatewayResponse, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/gatewayresponses/{response_type}", - } - - if input == nil { - input = &DeleteGatewayResponseInput{} - } - - output = &DeleteGatewayResponseOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteGatewayResponse API operation for Amazon API Gateway. -// -// Clears any customization of a GatewayResponse of a specified response type -// on the given RestApi and resets it with the default settings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteGatewayResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) DeleteGatewayResponse(input *DeleteGatewayResponseInput) (*DeleteGatewayResponseOutput, error) { - req, out := c.DeleteGatewayResponseRequest(input) - return out, req.Send() -} - -// DeleteGatewayResponseWithContext is the same as DeleteGatewayResponse with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteGatewayResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteGatewayResponseWithContext(ctx aws.Context, input *DeleteGatewayResponseInput, opts ...request.Option) (*DeleteGatewayResponseOutput, error) { - req, out := c.DeleteGatewayResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIntegration = "DeleteIntegration" - -// DeleteIntegrationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIntegration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIntegration for more information on using the DeleteIntegration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIntegrationRequest method. -// req, resp := client.DeleteIntegrationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteIntegrationRequest(input *DeleteIntegrationInput) (req *request.Request, output *DeleteIntegrationOutput) { - op := &request.Operation{ - Name: opDeleteIntegration, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration", - } - - if input == nil { - input = &DeleteIntegrationInput{} - } - - output = &DeleteIntegrationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteIntegration API operation for Amazon API Gateway. -// -// Represents a delete integration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteIntegration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) DeleteIntegration(input *DeleteIntegrationInput) (*DeleteIntegrationOutput, error) { - req, out := c.DeleteIntegrationRequest(input) - return out, req.Send() -} - -// DeleteIntegrationWithContext is the same as DeleteIntegration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIntegration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteIntegrationWithContext(ctx aws.Context, input *DeleteIntegrationInput, opts ...request.Option) (*DeleteIntegrationOutput, error) { - req, out := c.DeleteIntegrationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIntegrationResponse = "DeleteIntegrationResponse" - -// DeleteIntegrationResponseRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIntegrationResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIntegrationResponse for more information on using the DeleteIntegrationResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIntegrationResponseRequest method. -// req, resp := client.DeleteIntegrationResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteIntegrationResponseRequest(input *DeleteIntegrationResponseInput) (req *request.Request, output *DeleteIntegrationResponseOutput) { - op := &request.Operation{ - Name: opDeleteIntegrationResponse, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}", - } - - if input == nil { - input = &DeleteIntegrationResponseInput{} - } - - output = &DeleteIntegrationResponseOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteIntegrationResponse API operation for Amazon API Gateway. -// -// Represents a delete integration response. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteIntegrationResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) DeleteIntegrationResponse(input *DeleteIntegrationResponseInput) (*DeleteIntegrationResponseOutput, error) { - req, out := c.DeleteIntegrationResponseRequest(input) - return out, req.Send() -} - -// DeleteIntegrationResponseWithContext is the same as DeleteIntegrationResponse with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIntegrationResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteIntegrationResponseWithContext(ctx aws.Context, input *DeleteIntegrationResponseInput, opts ...request.Option) (*DeleteIntegrationResponseOutput, error) { - req, out := c.DeleteIntegrationResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteMethod = "DeleteMethod" - -// DeleteMethodRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMethod operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteMethod for more information on using the DeleteMethod -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteMethodRequest method. -// req, resp := client.DeleteMethodRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteMethodRequest(input *DeleteMethodInput) (req *request.Request, output *DeleteMethodOutput) { - op := &request.Operation{ - Name: opDeleteMethod, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}", - } - - if input == nil { - input = &DeleteMethodInput{} - } - - output = &DeleteMethodOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteMethod API operation for Amazon API Gateway. -// -// Deletes an existing Method resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteMethod for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) DeleteMethod(input *DeleteMethodInput) (*DeleteMethodOutput, error) { - req, out := c.DeleteMethodRequest(input) - return out, req.Send() -} - -// DeleteMethodWithContext is the same as DeleteMethod with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteMethod for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteMethodWithContext(ctx aws.Context, input *DeleteMethodInput, opts ...request.Option) (*DeleteMethodOutput, error) { - req, out := c.DeleteMethodRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteMethodResponse = "DeleteMethodResponse" - -// DeleteMethodResponseRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMethodResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteMethodResponse for more information on using the DeleteMethodResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteMethodResponseRequest method. -// req, resp := client.DeleteMethodResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteMethodResponseRequest(input *DeleteMethodResponseInput) (req *request.Request, output *DeleteMethodResponseOutput) { - op := &request.Operation{ - Name: opDeleteMethodResponse, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}", - } - - if input == nil { - input = &DeleteMethodResponseInput{} - } - - output = &DeleteMethodResponseOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteMethodResponse API operation for Amazon API Gateway. -// -// Deletes an existing MethodResponse resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteMethodResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) DeleteMethodResponse(input *DeleteMethodResponseInput) (*DeleteMethodResponseOutput, error) { - req, out := c.DeleteMethodResponseRequest(input) - return out, req.Send() -} - -// DeleteMethodResponseWithContext is the same as DeleteMethodResponse with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteMethodResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteMethodResponseWithContext(ctx aws.Context, input *DeleteMethodResponseInput, opts ...request.Option) (*DeleteMethodResponseOutput, error) { - req, out := c.DeleteMethodResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteModel = "DeleteModel" - -// DeleteModelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteModel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteModel for more information on using the DeleteModel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteModelRequest method. -// req, resp := client.DeleteModelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteModelRequest(input *DeleteModelInput) (req *request.Request, output *DeleteModelOutput) { - op := &request.Operation{ - Name: opDeleteModel, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/models/{model_name}", - } - - if input == nil { - input = &DeleteModelInput{} - } - - output = &DeleteModelOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteModel API operation for Amazon API Gateway. -// -// Deletes a model. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteModel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) DeleteModel(input *DeleteModelInput) (*DeleteModelOutput, error) { - req, out := c.DeleteModelRequest(input) - return out, req.Send() -} - -// DeleteModelWithContext is the same as DeleteModel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteModel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteModelWithContext(ctx aws.Context, input *DeleteModelInput, opts ...request.Option) (*DeleteModelOutput, error) { - req, out := c.DeleteModelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRequestValidator = "DeleteRequestValidator" - -// DeleteRequestValidatorRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRequestValidator operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRequestValidator for more information on using the DeleteRequestValidator -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRequestValidatorRequest method. -// req, resp := client.DeleteRequestValidatorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteRequestValidatorRequest(input *DeleteRequestValidatorInput) (req *request.Request, output *DeleteRequestValidatorOutput) { - op := &request.Operation{ - Name: opDeleteRequestValidator, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/requestvalidators/{requestvalidator_id}", - } - - if input == nil { - input = &DeleteRequestValidatorInput{} - } - - output = &DeleteRequestValidatorOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRequestValidator API operation for Amazon API Gateway. -// -// Deletes a RequestValidator of a given RestApi. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteRequestValidator for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) DeleteRequestValidator(input *DeleteRequestValidatorInput) (*DeleteRequestValidatorOutput, error) { - req, out := c.DeleteRequestValidatorRequest(input) - return out, req.Send() -} - -// DeleteRequestValidatorWithContext is the same as DeleteRequestValidator with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRequestValidator for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteRequestValidatorWithContext(ctx aws.Context, input *DeleteRequestValidatorInput, opts ...request.Option) (*DeleteRequestValidatorOutput, error) { - req, out := c.DeleteRequestValidatorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteResource = "DeleteResource" - -// DeleteResourceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteResource for more information on using the DeleteResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteResourceRequest method. -// req, resp := client.DeleteResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteResourceRequest(input *DeleteResourceInput) (req *request.Request, output *DeleteResourceOutput) { - op := &request.Operation{ - Name: opDeleteResource, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}", - } - - if input == nil { - input = &DeleteResourceInput{} - } - - output = &DeleteResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteResource API operation for Amazon API Gateway. -// -// Deletes a Resource resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) DeleteResource(input *DeleteResourceInput) (*DeleteResourceOutput, error) { - req, out := c.DeleteResourceRequest(input) - return out, req.Send() -} - -// DeleteResourceWithContext is the same as DeleteResource with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteResourceWithContext(ctx aws.Context, input *DeleteResourceInput, opts ...request.Option) (*DeleteResourceOutput, error) { - req, out := c.DeleteResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRestApi = "DeleteRestApi" - -// DeleteRestApiRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRestApi operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRestApi for more information on using the DeleteRestApi -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRestApiRequest method. -// req, resp := client.DeleteRestApiRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteRestApiRequest(input *DeleteRestApiInput) (req *request.Request, output *DeleteRestApiOutput) { - op := &request.Operation{ - Name: opDeleteRestApi, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}", - } - - if input == nil { - input = &DeleteRestApiInput{} - } - - output = &DeleteRestApiOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRestApi API operation for Amazon API Gateway. -// -// Deletes the specified API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteRestApi for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -func (c *APIGateway) DeleteRestApi(input *DeleteRestApiInput) (*DeleteRestApiOutput, error) { - req, out := c.DeleteRestApiRequest(input) - return out, req.Send() -} - -// DeleteRestApiWithContext is the same as DeleteRestApi with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRestApi for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteRestApiWithContext(ctx aws.Context, input *DeleteRestApiInput, opts ...request.Option) (*DeleteRestApiOutput, error) { - req, out := c.DeleteRestApiRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteStage = "DeleteStage" - -// DeleteStageRequest generates a "aws/request.Request" representing the -// client's request for the DeleteStage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteStage for more information on using the DeleteStage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteStageRequest method. -// req, resp := client.DeleteStageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteStageRequest(input *DeleteStageInput) (req *request.Request, output *DeleteStageOutput) { - op := &request.Operation{ - Name: opDeleteStage, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}", - } - - if input == nil { - input = &DeleteStageInput{} - } - - output = &DeleteStageOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteStage API operation for Amazon API Gateway. -// -// Deletes a Stage resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteStage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -func (c *APIGateway) DeleteStage(input *DeleteStageInput) (*DeleteStageOutput, error) { - req, out := c.DeleteStageRequest(input) - return out, req.Send() -} - -// DeleteStageWithContext is the same as DeleteStage with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteStage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteStageWithContext(ctx aws.Context, input *DeleteStageInput, opts ...request.Option) (*DeleteStageOutput, error) { - req, out := c.DeleteStageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUsagePlan = "DeleteUsagePlan" - -// DeleteUsagePlanRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUsagePlan operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUsagePlan for more information on using the DeleteUsagePlan -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteUsagePlanRequest method. -// req, resp := client.DeleteUsagePlanRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteUsagePlanRequest(input *DeleteUsagePlanInput) (req *request.Request, output *DeleteUsagePlanOutput) { - op := &request.Operation{ - Name: opDeleteUsagePlan, - HTTPMethod: "DELETE", - HTTPPath: "/usageplans/{usageplanId}", - } - - if input == nil { - input = &DeleteUsagePlanInput{} - } - - output = &DeleteUsagePlanOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUsagePlan API operation for Amazon API Gateway. -// -// Deletes a usage plan of a given plan Id. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteUsagePlan for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -func (c *APIGateway) DeleteUsagePlan(input *DeleteUsagePlanInput) (*DeleteUsagePlanOutput, error) { - req, out := c.DeleteUsagePlanRequest(input) - return out, req.Send() -} - -// DeleteUsagePlanWithContext is the same as DeleteUsagePlan with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUsagePlan for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteUsagePlanWithContext(ctx aws.Context, input *DeleteUsagePlanInput, opts ...request.Option) (*DeleteUsagePlanOutput, error) { - req, out := c.DeleteUsagePlanRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUsagePlanKey = "DeleteUsagePlanKey" - -// DeleteUsagePlanKeyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUsagePlanKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUsagePlanKey for more information on using the DeleteUsagePlanKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteUsagePlanKeyRequest method. -// req, resp := client.DeleteUsagePlanKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteUsagePlanKeyRequest(input *DeleteUsagePlanKeyInput) (req *request.Request, output *DeleteUsagePlanKeyOutput) { - op := &request.Operation{ - Name: opDeleteUsagePlanKey, - HTTPMethod: "DELETE", - HTTPPath: "/usageplans/{usageplanId}/keys/{keyId}", - } - - if input == nil { - input = &DeleteUsagePlanKeyInput{} - } - - output = &DeleteUsagePlanKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUsagePlanKey API operation for Amazon API Gateway. -// -// Deletes a usage plan key and remove the underlying API key from the associated -// usage plan. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteUsagePlanKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) DeleteUsagePlanKey(input *DeleteUsagePlanKeyInput) (*DeleteUsagePlanKeyOutput, error) { - req, out := c.DeleteUsagePlanKeyRequest(input) - return out, req.Send() -} - -// DeleteUsagePlanKeyWithContext is the same as DeleteUsagePlanKey with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUsagePlanKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteUsagePlanKeyWithContext(ctx aws.Context, input *DeleteUsagePlanKeyInput, opts ...request.Option) (*DeleteUsagePlanKeyOutput, error) { - req, out := c.DeleteUsagePlanKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVpcLink = "DeleteVpcLink" - -// DeleteVpcLinkRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVpcLink operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVpcLink for more information on using the DeleteVpcLink -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVpcLinkRequest method. -// req, resp := client.DeleteVpcLinkRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) DeleteVpcLinkRequest(input *DeleteVpcLinkInput) (req *request.Request, output *DeleteVpcLinkOutput) { - op := &request.Operation{ - Name: opDeleteVpcLink, - HTTPMethod: "DELETE", - HTTPPath: "/vpclinks/{vpclink_id}", - } - - if input == nil { - input = &DeleteVpcLinkInput{} - } - - output = &DeleteVpcLinkOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVpcLink API operation for Amazon API Gateway. -// -// Deletes an existing VpcLink of a specified identifier. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation DeleteVpcLink for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -func (c *APIGateway) DeleteVpcLink(input *DeleteVpcLinkInput) (*DeleteVpcLinkOutput, error) { - req, out := c.DeleteVpcLinkRequest(input) - return out, req.Send() -} - -// DeleteVpcLinkWithContext is the same as DeleteVpcLink with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVpcLink for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) DeleteVpcLinkWithContext(ctx aws.Context, input *DeleteVpcLinkInput, opts ...request.Option) (*DeleteVpcLinkOutput, error) { - req, out := c.DeleteVpcLinkRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opFlushStageAuthorizersCache = "FlushStageAuthorizersCache" - -// FlushStageAuthorizersCacheRequest generates a "aws/request.Request" representing the -// client's request for the FlushStageAuthorizersCache operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See FlushStageAuthorizersCache for more information on using the FlushStageAuthorizersCache -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the FlushStageAuthorizersCacheRequest method. -// req, resp := client.FlushStageAuthorizersCacheRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) FlushStageAuthorizersCacheRequest(input *FlushStageAuthorizersCacheInput) (req *request.Request, output *FlushStageAuthorizersCacheOutput) { - op := &request.Operation{ - Name: opFlushStageAuthorizersCache, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}/cache/authorizers", - } - - if input == nil { - input = &FlushStageAuthorizersCacheInput{} - } - - output = &FlushStageAuthorizersCacheOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// FlushStageAuthorizersCache API operation for Amazon API Gateway. -// -// Flushes all authorizer cache entries on a stage. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation FlushStageAuthorizersCache for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) FlushStageAuthorizersCache(input *FlushStageAuthorizersCacheInput) (*FlushStageAuthorizersCacheOutput, error) { - req, out := c.FlushStageAuthorizersCacheRequest(input) - return out, req.Send() -} - -// FlushStageAuthorizersCacheWithContext is the same as FlushStageAuthorizersCache with the addition of -// the ability to pass a context and additional request options. -// -// See FlushStageAuthorizersCache for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) FlushStageAuthorizersCacheWithContext(ctx aws.Context, input *FlushStageAuthorizersCacheInput, opts ...request.Option) (*FlushStageAuthorizersCacheOutput, error) { - req, out := c.FlushStageAuthorizersCacheRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opFlushStageCache = "FlushStageCache" - -// FlushStageCacheRequest generates a "aws/request.Request" representing the -// client's request for the FlushStageCache operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See FlushStageCache for more information on using the FlushStageCache -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the FlushStageCacheRequest method. -// req, resp := client.FlushStageCacheRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) FlushStageCacheRequest(input *FlushStageCacheInput) (req *request.Request, output *FlushStageCacheOutput) { - op := &request.Operation{ - Name: opFlushStageCache, - HTTPMethod: "DELETE", - HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}/cache/data", - } - - if input == nil { - input = &FlushStageCacheInput{} - } - - output = &FlushStageCacheOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// FlushStageCache API operation for Amazon API Gateway. -// -// Flushes a stage's cache. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation FlushStageCache for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) FlushStageCache(input *FlushStageCacheInput) (*FlushStageCacheOutput, error) { - req, out := c.FlushStageCacheRequest(input) - return out, req.Send() -} - -// FlushStageCacheWithContext is the same as FlushStageCache with the addition of -// the ability to pass a context and additional request options. -// -// See FlushStageCache for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) FlushStageCacheWithContext(ctx aws.Context, input *FlushStageCacheInput, opts ...request.Option) (*FlushStageCacheOutput, error) { - req, out := c.FlushStageCacheRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGenerateClientCertificate = "GenerateClientCertificate" - -// GenerateClientCertificateRequest generates a "aws/request.Request" representing the -// client's request for the GenerateClientCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GenerateClientCertificate for more information on using the GenerateClientCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GenerateClientCertificateRequest method. -// req, resp := client.GenerateClientCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GenerateClientCertificateRequest(input *GenerateClientCertificateInput) (req *request.Request, output *ClientCertificate) { - op := &request.Operation{ - Name: opGenerateClientCertificate, - HTTPMethod: "POST", - HTTPPath: "/clientcertificates", - } - - if input == nil { - input = &GenerateClientCertificateInput{} - } - - output = &ClientCertificate{} - req = c.newRequest(op, input, output) - return -} - -// GenerateClientCertificate API operation for Amazon API Gateway. -// -// Generates a ClientCertificate resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GenerateClientCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -func (c *APIGateway) GenerateClientCertificate(input *GenerateClientCertificateInput) (*ClientCertificate, error) { - req, out := c.GenerateClientCertificateRequest(input) - return out, req.Send() -} - -// GenerateClientCertificateWithContext is the same as GenerateClientCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See GenerateClientCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GenerateClientCertificateWithContext(ctx aws.Context, input *GenerateClientCertificateInput, opts ...request.Option) (*ClientCertificate, error) { - req, out := c.GenerateClientCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAccount = "GetAccount" - -// GetAccountRequest generates a "aws/request.Request" representing the -// client's request for the GetAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAccount for more information on using the GetAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAccountRequest method. -// req, resp := client.GetAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetAccountRequest(input *GetAccountInput) (req *request.Request, output *Account) { - op := &request.Operation{ - Name: opGetAccount, - HTTPMethod: "GET", - HTTPPath: "/account", - } - - if input == nil { - input = &GetAccountInput{} - } - - output = &Account{} - req = c.newRequest(op, input, output) - return -} - -// GetAccount API operation for Amazon API Gateway. -// -// Gets information about the current Account resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetAccount(input *GetAccountInput) (*Account, error) { - req, out := c.GetAccountRequest(input) - return out, req.Send() -} - -// GetAccountWithContext is the same as GetAccount with the addition of -// the ability to pass a context and additional request options. -// -// See GetAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetAccountWithContext(ctx aws.Context, input *GetAccountInput, opts ...request.Option) (*Account, error) { - req, out := c.GetAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApiKey = "GetApiKey" - -// GetApiKeyRequest generates a "aws/request.Request" representing the -// client's request for the GetApiKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApiKey for more information on using the GetApiKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApiKeyRequest method. -// req, resp := client.GetApiKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetApiKeyRequest(input *GetApiKeyInput) (req *request.Request, output *ApiKey) { - op := &request.Operation{ - Name: opGetApiKey, - HTTPMethod: "GET", - HTTPPath: "/apikeys/{api_Key}", - } - - if input == nil { - input = &GetApiKeyInput{} - } - - output = &ApiKey{} - req = c.newRequest(op, input, output) - return -} - -// GetApiKey API operation for Amazon API Gateway. -// -// Gets information about the current ApiKey resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetApiKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetApiKey(input *GetApiKeyInput) (*ApiKey, error) { - req, out := c.GetApiKeyRequest(input) - return out, req.Send() -} - -// GetApiKeyWithContext is the same as GetApiKey with the addition of -// the ability to pass a context and additional request options. -// -// See GetApiKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetApiKeyWithContext(ctx aws.Context, input *GetApiKeyInput, opts ...request.Option) (*ApiKey, error) { - req, out := c.GetApiKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApiKeys = "GetApiKeys" - -// GetApiKeysRequest generates a "aws/request.Request" representing the -// client's request for the GetApiKeys operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApiKeys for more information on using the GetApiKeys -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApiKeysRequest method. -// req, resp := client.GetApiKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetApiKeysRequest(input *GetApiKeysInput) (req *request.Request, output *GetApiKeysOutput) { - op := &request.Operation{ - Name: opGetApiKeys, - HTTPMethod: "GET", - HTTPPath: "/apikeys", - Paginator: &request.Paginator{ - InputTokens: []string{"position"}, - OutputTokens: []string{"position"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetApiKeysInput{} - } - - output = &GetApiKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApiKeys API operation for Amazon API Gateway. -// -// Gets information about the current ApiKeys resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetApiKeys for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetApiKeys(input *GetApiKeysInput) (*GetApiKeysOutput, error) { - req, out := c.GetApiKeysRequest(input) - return out, req.Send() -} - -// GetApiKeysWithContext is the same as GetApiKeys with the addition of -// the ability to pass a context and additional request options. -// -// See GetApiKeys for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetApiKeysWithContext(ctx aws.Context, input *GetApiKeysInput, opts ...request.Option) (*GetApiKeysOutput, error) { - req, out := c.GetApiKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetApiKeysPages iterates over the pages of a GetApiKeys operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetApiKeys 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 GetApiKeys operation. -// pageNum := 0 -// err := client.GetApiKeysPages(params, -// func(page *GetApiKeysOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *APIGateway) GetApiKeysPages(input *GetApiKeysInput, fn func(*GetApiKeysOutput, bool) bool) error { - return c.GetApiKeysPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetApiKeysPagesWithContext same as GetApiKeysPages 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 *APIGateway) GetApiKeysPagesWithContext(ctx aws.Context, input *GetApiKeysInput, fn func(*GetApiKeysOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetApiKeysInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetApiKeysRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetApiKeysOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetAuthorizer = "GetAuthorizer" - -// GetAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the GetAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAuthorizer for more information on using the GetAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAuthorizerRequest method. -// req, resp := client.GetAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetAuthorizerRequest(input *GetAuthorizerInput) (req *request.Request, output *Authorizer) { - op := &request.Operation{ - Name: opGetAuthorizer, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}", - } - - if input == nil { - input = &GetAuthorizerInput{} - } - - output = &Authorizer{} - req = c.newRequest(op, input, output) - return -} - -// GetAuthorizer API operation for Amazon API Gateway. -// -// Describe an existing Authorizer resource. -// -// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-authorizer.html) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetAuthorizer(input *GetAuthorizerInput) (*Authorizer, error) { - req, out := c.GetAuthorizerRequest(input) - return out, req.Send() -} - -// GetAuthorizerWithContext is the same as GetAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See GetAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetAuthorizerWithContext(ctx aws.Context, input *GetAuthorizerInput, opts ...request.Option) (*Authorizer, error) { - req, out := c.GetAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAuthorizers = "GetAuthorizers" - -// GetAuthorizersRequest generates a "aws/request.Request" representing the -// client's request for the GetAuthorizers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAuthorizers for more information on using the GetAuthorizers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAuthorizersRequest method. -// req, resp := client.GetAuthorizersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetAuthorizersRequest(input *GetAuthorizersInput) (req *request.Request, output *GetAuthorizersOutput) { - op := &request.Operation{ - Name: opGetAuthorizers, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/authorizers", - } - - if input == nil { - input = &GetAuthorizersInput{} - } - - output = &GetAuthorizersOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAuthorizers API operation for Amazon API Gateway. -// -// Describe an existing Authorizers resource. -// -// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-authorizers.html) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetAuthorizers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetAuthorizers(input *GetAuthorizersInput) (*GetAuthorizersOutput, error) { - req, out := c.GetAuthorizersRequest(input) - return out, req.Send() -} - -// GetAuthorizersWithContext is the same as GetAuthorizers with the addition of -// the ability to pass a context and additional request options. -// -// See GetAuthorizers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetAuthorizersWithContext(ctx aws.Context, input *GetAuthorizersInput, opts ...request.Option) (*GetAuthorizersOutput, error) { - req, out := c.GetAuthorizersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBasePathMapping = "GetBasePathMapping" - -// GetBasePathMappingRequest generates a "aws/request.Request" representing the -// client's request for the GetBasePathMapping operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBasePathMapping for more information on using the GetBasePathMapping -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBasePathMappingRequest method. -// req, resp := client.GetBasePathMappingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetBasePathMappingRequest(input *GetBasePathMappingInput) (req *request.Request, output *BasePathMapping) { - op := &request.Operation{ - Name: opGetBasePathMapping, - HTTPMethod: "GET", - HTTPPath: "/domainnames/{domain_name}/basepathmappings/{base_path}", - } - - if input == nil { - input = &GetBasePathMappingInput{} - } - - output = &BasePathMapping{} - req = c.newRequest(op, input, output) - return -} - -// GetBasePathMapping API operation for Amazon API Gateway. -// -// Describe a BasePathMapping resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetBasePathMapping for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetBasePathMapping(input *GetBasePathMappingInput) (*BasePathMapping, error) { - req, out := c.GetBasePathMappingRequest(input) - return out, req.Send() -} - -// GetBasePathMappingWithContext is the same as GetBasePathMapping with the addition of -// the ability to pass a context and additional request options. -// -// See GetBasePathMapping for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetBasePathMappingWithContext(ctx aws.Context, input *GetBasePathMappingInput, opts ...request.Option) (*BasePathMapping, error) { - req, out := c.GetBasePathMappingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBasePathMappings = "GetBasePathMappings" - -// GetBasePathMappingsRequest generates a "aws/request.Request" representing the -// client's request for the GetBasePathMappings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBasePathMappings for more information on using the GetBasePathMappings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBasePathMappingsRequest method. -// req, resp := client.GetBasePathMappingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetBasePathMappingsRequest(input *GetBasePathMappingsInput) (req *request.Request, output *GetBasePathMappingsOutput) { - op := &request.Operation{ - Name: opGetBasePathMappings, - HTTPMethod: "GET", - HTTPPath: "/domainnames/{domain_name}/basepathmappings", - Paginator: &request.Paginator{ - InputTokens: []string{"position"}, - OutputTokens: []string{"position"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetBasePathMappingsInput{} - } - - output = &GetBasePathMappingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBasePathMappings API operation for Amazon API Gateway. -// -// Represents a collection of BasePathMapping resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetBasePathMappings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetBasePathMappings(input *GetBasePathMappingsInput) (*GetBasePathMappingsOutput, error) { - req, out := c.GetBasePathMappingsRequest(input) - return out, req.Send() -} - -// GetBasePathMappingsWithContext is the same as GetBasePathMappings with the addition of -// the ability to pass a context and additional request options. -// -// See GetBasePathMappings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetBasePathMappingsWithContext(ctx aws.Context, input *GetBasePathMappingsInput, opts ...request.Option) (*GetBasePathMappingsOutput, error) { - req, out := c.GetBasePathMappingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetBasePathMappingsPages iterates over the pages of a GetBasePathMappings operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetBasePathMappings 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 GetBasePathMappings operation. -// pageNum := 0 -// err := client.GetBasePathMappingsPages(params, -// func(page *GetBasePathMappingsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *APIGateway) GetBasePathMappingsPages(input *GetBasePathMappingsInput, fn func(*GetBasePathMappingsOutput, bool) bool) error { - return c.GetBasePathMappingsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetBasePathMappingsPagesWithContext same as GetBasePathMappingsPages 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 *APIGateway) GetBasePathMappingsPagesWithContext(ctx aws.Context, input *GetBasePathMappingsInput, fn func(*GetBasePathMappingsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetBasePathMappingsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetBasePathMappingsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetBasePathMappingsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetClientCertificate = "GetClientCertificate" - -// GetClientCertificateRequest generates a "aws/request.Request" representing the -// client's request for the GetClientCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetClientCertificate for more information on using the GetClientCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetClientCertificateRequest method. -// req, resp := client.GetClientCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetClientCertificateRequest(input *GetClientCertificateInput) (req *request.Request, output *ClientCertificate) { - op := &request.Operation{ - Name: opGetClientCertificate, - HTTPMethod: "GET", - HTTPPath: "/clientcertificates/{clientcertificate_id}", - } - - if input == nil { - input = &GetClientCertificateInput{} - } - - output = &ClientCertificate{} - req = c.newRequest(op, input, output) - return -} - -// GetClientCertificate API operation for Amazon API Gateway. -// -// Gets information about the current ClientCertificate resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetClientCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetClientCertificate(input *GetClientCertificateInput) (*ClientCertificate, error) { - req, out := c.GetClientCertificateRequest(input) - return out, req.Send() -} - -// GetClientCertificateWithContext is the same as GetClientCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See GetClientCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetClientCertificateWithContext(ctx aws.Context, input *GetClientCertificateInput, opts ...request.Option) (*ClientCertificate, error) { - req, out := c.GetClientCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetClientCertificates = "GetClientCertificates" - -// GetClientCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the GetClientCertificates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetClientCertificates for more information on using the GetClientCertificates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetClientCertificatesRequest method. -// req, resp := client.GetClientCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetClientCertificatesRequest(input *GetClientCertificatesInput) (req *request.Request, output *GetClientCertificatesOutput) { - op := &request.Operation{ - Name: opGetClientCertificates, - HTTPMethod: "GET", - HTTPPath: "/clientcertificates", - Paginator: &request.Paginator{ - InputTokens: []string{"position"}, - OutputTokens: []string{"position"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetClientCertificatesInput{} - } - - output = &GetClientCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetClientCertificates API operation for Amazon API Gateway. -// -// Gets a collection of ClientCertificate resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetClientCertificates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetClientCertificates(input *GetClientCertificatesInput) (*GetClientCertificatesOutput, error) { - req, out := c.GetClientCertificatesRequest(input) - return out, req.Send() -} - -// GetClientCertificatesWithContext is the same as GetClientCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See GetClientCertificates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetClientCertificatesWithContext(ctx aws.Context, input *GetClientCertificatesInput, opts ...request.Option) (*GetClientCertificatesOutput, error) { - req, out := c.GetClientCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetClientCertificatesPages iterates over the pages of a GetClientCertificates operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetClientCertificates 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 GetClientCertificates operation. -// pageNum := 0 -// err := client.GetClientCertificatesPages(params, -// func(page *GetClientCertificatesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *APIGateway) GetClientCertificatesPages(input *GetClientCertificatesInput, fn func(*GetClientCertificatesOutput, bool) bool) error { - return c.GetClientCertificatesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetClientCertificatesPagesWithContext same as GetClientCertificatesPages 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 *APIGateway) GetClientCertificatesPagesWithContext(ctx aws.Context, input *GetClientCertificatesInput, fn func(*GetClientCertificatesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetClientCertificatesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetClientCertificatesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetClientCertificatesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetDeployment = "GetDeployment" - -// GetDeploymentRequest generates a "aws/request.Request" representing the -// client's request for the GetDeployment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDeployment for more information on using the GetDeployment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDeploymentRequest method. -// req, resp := client.GetDeploymentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetDeploymentRequest(input *GetDeploymentInput) (req *request.Request, output *Deployment) { - op := &request.Operation{ - Name: opGetDeployment, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/deployments/{deployment_id}", - } - - if input == nil { - input = &GetDeploymentInput{} - } - - output = &Deployment{} - req = c.newRequest(op, input, output) - return -} - -// GetDeployment API operation for Amazon API Gateway. -// -// Gets information about a Deployment resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetDeployment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The requested service is not available. For details see the accompanying -// error message. Retry after the specified time period. -// -func (c *APIGateway) GetDeployment(input *GetDeploymentInput) (*Deployment, error) { - req, out := c.GetDeploymentRequest(input) - return out, req.Send() -} - -// GetDeploymentWithContext is the same as GetDeployment with the addition of -// the ability to pass a context and additional request options. -// -// See GetDeployment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetDeploymentWithContext(ctx aws.Context, input *GetDeploymentInput, opts ...request.Option) (*Deployment, error) { - req, out := c.GetDeploymentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDeployments = "GetDeployments" - -// GetDeploymentsRequest generates a "aws/request.Request" representing the -// client's request for the GetDeployments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDeployments for more information on using the GetDeployments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDeploymentsRequest method. -// req, resp := client.GetDeploymentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetDeploymentsRequest(input *GetDeploymentsInput) (req *request.Request, output *GetDeploymentsOutput) { - op := &request.Operation{ - Name: opGetDeployments, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/deployments", - Paginator: &request.Paginator{ - InputTokens: []string{"position"}, - OutputTokens: []string{"position"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetDeploymentsInput{} - } - - output = &GetDeploymentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDeployments API operation for Amazon API Gateway. -// -// Gets information about a Deployments collection. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetDeployments for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The requested service is not available. For details see the accompanying -// error message. Retry after the specified time period. -// -func (c *APIGateway) GetDeployments(input *GetDeploymentsInput) (*GetDeploymentsOutput, error) { - req, out := c.GetDeploymentsRequest(input) - return out, req.Send() -} - -// GetDeploymentsWithContext is the same as GetDeployments with the addition of -// the ability to pass a context and additional request options. -// -// See GetDeployments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetDeploymentsWithContext(ctx aws.Context, input *GetDeploymentsInput, opts ...request.Option) (*GetDeploymentsOutput, error) { - req, out := c.GetDeploymentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetDeploymentsPages iterates over the pages of a GetDeployments operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetDeployments 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 GetDeployments operation. -// pageNum := 0 -// err := client.GetDeploymentsPages(params, -// func(page *GetDeploymentsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *APIGateway) GetDeploymentsPages(input *GetDeploymentsInput, fn func(*GetDeploymentsOutput, bool) bool) error { - return c.GetDeploymentsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetDeploymentsPagesWithContext same as GetDeploymentsPages 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 *APIGateway) GetDeploymentsPagesWithContext(ctx aws.Context, input *GetDeploymentsInput, fn func(*GetDeploymentsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetDeploymentsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetDeploymentsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetDeploymentsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetDocumentationPart = "GetDocumentationPart" - -// GetDocumentationPartRequest generates a "aws/request.Request" representing the -// client's request for the GetDocumentationPart operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDocumentationPart for more information on using the GetDocumentationPart -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDocumentationPartRequest method. -// req, resp := client.GetDocumentationPartRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetDocumentationPartRequest(input *GetDocumentationPartInput) (req *request.Request, output *DocumentationPart) { - op := &request.Operation{ - Name: opGetDocumentationPart, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/documentation/parts/{part_id}", - } - - if input == nil { - input = &GetDocumentationPartInput{} - } - - output = &DocumentationPart{} - req = c.newRequest(op, input, output) - return -} - -// GetDocumentationPart API operation for Amazon API Gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetDocumentationPart for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetDocumentationPart(input *GetDocumentationPartInput) (*DocumentationPart, error) { - req, out := c.GetDocumentationPartRequest(input) - return out, req.Send() -} - -// GetDocumentationPartWithContext is the same as GetDocumentationPart with the addition of -// the ability to pass a context and additional request options. -// -// See GetDocumentationPart for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetDocumentationPartWithContext(ctx aws.Context, input *GetDocumentationPartInput, opts ...request.Option) (*DocumentationPart, error) { - req, out := c.GetDocumentationPartRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDocumentationParts = "GetDocumentationParts" - -// GetDocumentationPartsRequest generates a "aws/request.Request" representing the -// client's request for the GetDocumentationParts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDocumentationParts for more information on using the GetDocumentationParts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDocumentationPartsRequest method. -// req, resp := client.GetDocumentationPartsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetDocumentationPartsRequest(input *GetDocumentationPartsInput) (req *request.Request, output *GetDocumentationPartsOutput) { - op := &request.Operation{ - Name: opGetDocumentationParts, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/documentation/parts", - } - - if input == nil { - input = &GetDocumentationPartsInput{} - } - - output = &GetDocumentationPartsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDocumentationParts API operation for Amazon API Gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetDocumentationParts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetDocumentationParts(input *GetDocumentationPartsInput) (*GetDocumentationPartsOutput, error) { - req, out := c.GetDocumentationPartsRequest(input) - return out, req.Send() -} - -// GetDocumentationPartsWithContext is the same as GetDocumentationParts with the addition of -// the ability to pass a context and additional request options. -// -// See GetDocumentationParts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetDocumentationPartsWithContext(ctx aws.Context, input *GetDocumentationPartsInput, opts ...request.Option) (*GetDocumentationPartsOutput, error) { - req, out := c.GetDocumentationPartsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDocumentationVersion = "GetDocumentationVersion" - -// GetDocumentationVersionRequest generates a "aws/request.Request" representing the -// client's request for the GetDocumentationVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDocumentationVersion for more information on using the GetDocumentationVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDocumentationVersionRequest method. -// req, resp := client.GetDocumentationVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetDocumentationVersionRequest(input *GetDocumentationVersionInput) (req *request.Request, output *DocumentationVersion) { - op := &request.Operation{ - Name: opGetDocumentationVersion, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/documentation/versions/{doc_version}", - } - - if input == nil { - input = &GetDocumentationVersionInput{} - } - - output = &DocumentationVersion{} - req = c.newRequest(op, input, output) - return -} - -// GetDocumentationVersion API operation for Amazon API Gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetDocumentationVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetDocumentationVersion(input *GetDocumentationVersionInput) (*DocumentationVersion, error) { - req, out := c.GetDocumentationVersionRequest(input) - return out, req.Send() -} - -// GetDocumentationVersionWithContext is the same as GetDocumentationVersion with the addition of -// the ability to pass a context and additional request options. -// -// See GetDocumentationVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetDocumentationVersionWithContext(ctx aws.Context, input *GetDocumentationVersionInput, opts ...request.Option) (*DocumentationVersion, error) { - req, out := c.GetDocumentationVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDocumentationVersions = "GetDocumentationVersions" - -// GetDocumentationVersionsRequest generates a "aws/request.Request" representing the -// client's request for the GetDocumentationVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDocumentationVersions for more information on using the GetDocumentationVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDocumentationVersionsRequest method. -// req, resp := client.GetDocumentationVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetDocumentationVersionsRequest(input *GetDocumentationVersionsInput) (req *request.Request, output *GetDocumentationVersionsOutput) { - op := &request.Operation{ - Name: opGetDocumentationVersions, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/documentation/versions", - } - - if input == nil { - input = &GetDocumentationVersionsInput{} - } - - output = &GetDocumentationVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDocumentationVersions API operation for Amazon API Gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetDocumentationVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetDocumentationVersions(input *GetDocumentationVersionsInput) (*GetDocumentationVersionsOutput, error) { - req, out := c.GetDocumentationVersionsRequest(input) - return out, req.Send() -} - -// GetDocumentationVersionsWithContext is the same as GetDocumentationVersions with the addition of -// the ability to pass a context and additional request options. -// -// See GetDocumentationVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetDocumentationVersionsWithContext(ctx aws.Context, input *GetDocumentationVersionsInput, opts ...request.Option) (*GetDocumentationVersionsOutput, error) { - req, out := c.GetDocumentationVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDomainName = "GetDomainName" - -// GetDomainNameRequest generates a "aws/request.Request" representing the -// client's request for the GetDomainName operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDomainName for more information on using the GetDomainName -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDomainNameRequest method. -// req, resp := client.GetDomainNameRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetDomainNameRequest(input *GetDomainNameInput) (req *request.Request, output *DomainName) { - op := &request.Operation{ - Name: opGetDomainName, - HTTPMethod: "GET", - HTTPPath: "/domainnames/{domain_name}", - } - - if input == nil { - input = &GetDomainNameInput{} - } - - output = &DomainName{} - req = c.newRequest(op, input, output) - return -} - -// GetDomainName API operation for Amazon API Gateway. -// -// Represents a domain name that is contained in a simpler, more intuitive URL -// that can be called. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetDomainName for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The requested service is not available. For details see the accompanying -// error message. Retry after the specified time period. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetDomainName(input *GetDomainNameInput) (*DomainName, error) { - req, out := c.GetDomainNameRequest(input) - return out, req.Send() -} - -// GetDomainNameWithContext is the same as GetDomainName with the addition of -// the ability to pass a context and additional request options. -// -// See GetDomainName for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetDomainNameWithContext(ctx aws.Context, input *GetDomainNameInput, opts ...request.Option) (*DomainName, error) { - req, out := c.GetDomainNameRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDomainNames = "GetDomainNames" - -// GetDomainNamesRequest generates a "aws/request.Request" representing the -// client's request for the GetDomainNames operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDomainNames for more information on using the GetDomainNames -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDomainNamesRequest method. -// req, resp := client.GetDomainNamesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetDomainNamesRequest(input *GetDomainNamesInput) (req *request.Request, output *GetDomainNamesOutput) { - op := &request.Operation{ - Name: opGetDomainNames, - HTTPMethod: "GET", - HTTPPath: "/domainnames", - Paginator: &request.Paginator{ - InputTokens: []string{"position"}, - OutputTokens: []string{"position"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetDomainNamesInput{} - } - - output = &GetDomainNamesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDomainNames API operation for Amazon API Gateway. -// -// Represents a collection of DomainName resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetDomainNames for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetDomainNames(input *GetDomainNamesInput) (*GetDomainNamesOutput, error) { - req, out := c.GetDomainNamesRequest(input) - return out, req.Send() -} - -// GetDomainNamesWithContext is the same as GetDomainNames with the addition of -// the ability to pass a context and additional request options. -// -// See GetDomainNames for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetDomainNamesWithContext(ctx aws.Context, input *GetDomainNamesInput, opts ...request.Option) (*GetDomainNamesOutput, error) { - req, out := c.GetDomainNamesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetDomainNamesPages iterates over the pages of a GetDomainNames operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetDomainNames 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 GetDomainNames operation. -// pageNum := 0 -// err := client.GetDomainNamesPages(params, -// func(page *GetDomainNamesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *APIGateway) GetDomainNamesPages(input *GetDomainNamesInput, fn func(*GetDomainNamesOutput, bool) bool) error { - return c.GetDomainNamesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetDomainNamesPagesWithContext same as GetDomainNamesPages 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 *APIGateway) GetDomainNamesPagesWithContext(ctx aws.Context, input *GetDomainNamesInput, fn func(*GetDomainNamesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetDomainNamesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetDomainNamesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetDomainNamesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetExport = "GetExport" - -// GetExportRequest generates a "aws/request.Request" representing the -// client's request for the GetExport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetExport for more information on using the GetExport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetExportRequest method. -// req, resp := client.GetExportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetExportRequest(input *GetExportInput) (req *request.Request, output *GetExportOutput) { - op := &request.Operation{ - Name: opGetExport, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}/exports/{export_type}", - } - - if input == nil { - input = &GetExportInput{} - } - - output = &GetExportOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetExport API operation for Amazon API Gateway. -// -// Exports a deployed version of a RestApi in a specified format. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetExport for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetExport(input *GetExportInput) (*GetExportOutput, error) { - req, out := c.GetExportRequest(input) - return out, req.Send() -} - -// GetExportWithContext is the same as GetExport with the addition of -// the ability to pass a context and additional request options. -// -// See GetExport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetExportWithContext(ctx aws.Context, input *GetExportInput, opts ...request.Option) (*GetExportOutput, error) { - req, out := c.GetExportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetGatewayResponse = "GetGatewayResponse" - -// GetGatewayResponseRequest generates a "aws/request.Request" representing the -// client's request for the GetGatewayResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetGatewayResponse for more information on using the GetGatewayResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetGatewayResponseRequest method. -// req, resp := client.GetGatewayResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetGatewayResponseRequest(input *GetGatewayResponseInput) (req *request.Request, output *UpdateGatewayResponseOutput) { - op := &request.Operation{ - Name: opGetGatewayResponse, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/gatewayresponses/{response_type}", - } - - if input == nil { - input = &GetGatewayResponseInput{} - } - - output = &UpdateGatewayResponseOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGatewayResponse API operation for Amazon API Gateway. -// -// Gets a GatewayResponse of a specified response type on the given RestApi. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetGatewayResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetGatewayResponse(input *GetGatewayResponseInput) (*UpdateGatewayResponseOutput, error) { - req, out := c.GetGatewayResponseRequest(input) - return out, req.Send() -} - -// GetGatewayResponseWithContext is the same as GetGatewayResponse with the addition of -// the ability to pass a context and additional request options. -// -// See GetGatewayResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetGatewayResponseWithContext(ctx aws.Context, input *GetGatewayResponseInput, opts ...request.Option) (*UpdateGatewayResponseOutput, error) { - req, out := c.GetGatewayResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetGatewayResponses = "GetGatewayResponses" - -// GetGatewayResponsesRequest generates a "aws/request.Request" representing the -// client's request for the GetGatewayResponses operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetGatewayResponses for more information on using the GetGatewayResponses -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetGatewayResponsesRequest method. -// req, resp := client.GetGatewayResponsesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetGatewayResponsesRequest(input *GetGatewayResponsesInput) (req *request.Request, output *GetGatewayResponsesOutput) { - op := &request.Operation{ - Name: opGetGatewayResponses, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/gatewayresponses", - } - - if input == nil { - input = &GetGatewayResponsesInput{} - } - - output = &GetGatewayResponsesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGatewayResponses API operation for Amazon API Gateway. -// -// Gets the GatewayResponses collection on the given RestApi. If an API developer -// has not added any definitions for gateway responses, the result will be the -// API Gateway-generated default GatewayResponses collection for the supported -// response types. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetGatewayResponses for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetGatewayResponses(input *GetGatewayResponsesInput) (*GetGatewayResponsesOutput, error) { - req, out := c.GetGatewayResponsesRequest(input) - return out, req.Send() -} - -// GetGatewayResponsesWithContext is the same as GetGatewayResponses with the addition of -// the ability to pass a context and additional request options. -// -// See GetGatewayResponses for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetGatewayResponsesWithContext(ctx aws.Context, input *GetGatewayResponsesInput, opts ...request.Option) (*GetGatewayResponsesOutput, error) { - req, out := c.GetGatewayResponsesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIntegration = "GetIntegration" - -// GetIntegrationRequest generates a "aws/request.Request" representing the -// client's request for the GetIntegration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIntegration for more information on using the GetIntegration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIntegrationRequest method. -// req, resp := client.GetIntegrationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetIntegrationRequest(input *GetIntegrationInput) (req *request.Request, output *Integration) { - op := &request.Operation{ - Name: opGetIntegration, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration", - } - - if input == nil { - input = &GetIntegrationInput{} - } - - output = &Integration{} - req = c.newRequest(op, input, output) - return -} - -// GetIntegration API operation for Amazon API Gateway. -// -// Get the integration settings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetIntegration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetIntegration(input *GetIntegrationInput) (*Integration, error) { - req, out := c.GetIntegrationRequest(input) - return out, req.Send() -} - -// GetIntegrationWithContext is the same as GetIntegration with the addition of -// the ability to pass a context and additional request options. -// -// See GetIntegration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetIntegrationWithContext(ctx aws.Context, input *GetIntegrationInput, opts ...request.Option) (*Integration, error) { - req, out := c.GetIntegrationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIntegrationResponse = "GetIntegrationResponse" - -// GetIntegrationResponseRequest generates a "aws/request.Request" representing the -// client's request for the GetIntegrationResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIntegrationResponse for more information on using the GetIntegrationResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIntegrationResponseRequest method. -// req, resp := client.GetIntegrationResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetIntegrationResponseRequest(input *GetIntegrationResponseInput) (req *request.Request, output *IntegrationResponse) { - op := &request.Operation{ - Name: opGetIntegrationResponse, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}", - } - - if input == nil { - input = &GetIntegrationResponseInput{} - } - - output = &IntegrationResponse{} - req = c.newRequest(op, input, output) - return -} - -// GetIntegrationResponse API operation for Amazon API Gateway. -// -// Represents a get integration response. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetIntegrationResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetIntegrationResponse(input *GetIntegrationResponseInput) (*IntegrationResponse, error) { - req, out := c.GetIntegrationResponseRequest(input) - return out, req.Send() -} - -// GetIntegrationResponseWithContext is the same as GetIntegrationResponse with the addition of -// the ability to pass a context and additional request options. -// -// See GetIntegrationResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetIntegrationResponseWithContext(ctx aws.Context, input *GetIntegrationResponseInput, opts ...request.Option) (*IntegrationResponse, error) { - req, out := c.GetIntegrationResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMethod = "GetMethod" - -// GetMethodRequest generates a "aws/request.Request" representing the -// client's request for the GetMethod operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMethod for more information on using the GetMethod -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMethodRequest method. -// req, resp := client.GetMethodRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetMethodRequest(input *GetMethodInput) (req *request.Request, output *Method) { - op := &request.Operation{ - Name: opGetMethod, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}", - } - - if input == nil { - input = &GetMethodInput{} - } - - output = &Method{} - req = c.newRequest(op, input, output) - return -} - -// GetMethod API operation for Amazon API Gateway. -// -// Describe an existing Method resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetMethod for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetMethod(input *GetMethodInput) (*Method, error) { - req, out := c.GetMethodRequest(input) - return out, req.Send() -} - -// GetMethodWithContext is the same as GetMethod with the addition of -// the ability to pass a context and additional request options. -// -// See GetMethod for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetMethodWithContext(ctx aws.Context, input *GetMethodInput, opts ...request.Option) (*Method, error) { - req, out := c.GetMethodRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMethodResponse = "GetMethodResponse" - -// GetMethodResponseRequest generates a "aws/request.Request" representing the -// client's request for the GetMethodResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMethodResponse for more information on using the GetMethodResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMethodResponseRequest method. -// req, resp := client.GetMethodResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetMethodResponseRequest(input *GetMethodResponseInput) (req *request.Request, output *MethodResponse) { - op := &request.Operation{ - Name: opGetMethodResponse, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}", - } - - if input == nil { - input = &GetMethodResponseInput{} - } - - output = &MethodResponse{} - req = c.newRequest(op, input, output) - return -} - -// GetMethodResponse API operation for Amazon API Gateway. -// -// Describes a MethodResponse resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetMethodResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetMethodResponse(input *GetMethodResponseInput) (*MethodResponse, error) { - req, out := c.GetMethodResponseRequest(input) - return out, req.Send() -} - -// GetMethodResponseWithContext is the same as GetMethodResponse with the addition of -// the ability to pass a context and additional request options. -// -// See GetMethodResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetMethodResponseWithContext(ctx aws.Context, input *GetMethodResponseInput, opts ...request.Option) (*MethodResponse, error) { - req, out := c.GetMethodResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetModel = "GetModel" - -// GetModelRequest generates a "aws/request.Request" representing the -// client's request for the GetModel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetModel for more information on using the GetModel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetModelRequest method. -// req, resp := client.GetModelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetModelRequest(input *GetModelInput) (req *request.Request, output *Model) { - op := &request.Operation{ - Name: opGetModel, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/models/{model_name}", - } - - if input == nil { - input = &GetModelInput{} - } - - output = &Model{} - req = c.newRequest(op, input, output) - return -} - -// GetModel API operation for Amazon API Gateway. -// -// Describes an existing model defined for a RestApi resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetModel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetModel(input *GetModelInput) (*Model, error) { - req, out := c.GetModelRequest(input) - return out, req.Send() -} - -// GetModelWithContext is the same as GetModel with the addition of -// the ability to pass a context and additional request options. -// -// See GetModel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetModelWithContext(ctx aws.Context, input *GetModelInput, opts ...request.Option) (*Model, error) { - req, out := c.GetModelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetModelTemplate = "GetModelTemplate" - -// GetModelTemplateRequest generates a "aws/request.Request" representing the -// client's request for the GetModelTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetModelTemplate for more information on using the GetModelTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetModelTemplateRequest method. -// req, resp := client.GetModelTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetModelTemplateRequest(input *GetModelTemplateInput) (req *request.Request, output *GetModelTemplateOutput) { - op := &request.Operation{ - Name: opGetModelTemplate, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/models/{model_name}/default_template", - } - - if input == nil { - input = &GetModelTemplateInput{} - } - - output = &GetModelTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetModelTemplate API operation for Amazon API Gateway. -// -// Generates a sample mapping template that can be used to transform a payload -// into the structure of a model. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetModelTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetModelTemplate(input *GetModelTemplateInput) (*GetModelTemplateOutput, error) { - req, out := c.GetModelTemplateRequest(input) - return out, req.Send() -} - -// GetModelTemplateWithContext is the same as GetModelTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See GetModelTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetModelTemplateWithContext(ctx aws.Context, input *GetModelTemplateInput, opts ...request.Option) (*GetModelTemplateOutput, error) { - req, out := c.GetModelTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetModels = "GetModels" - -// GetModelsRequest generates a "aws/request.Request" representing the -// client's request for the GetModels operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetModels for more information on using the GetModels -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetModelsRequest method. -// req, resp := client.GetModelsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetModelsRequest(input *GetModelsInput) (req *request.Request, output *GetModelsOutput) { - op := &request.Operation{ - Name: opGetModels, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/models", - Paginator: &request.Paginator{ - InputTokens: []string{"position"}, - OutputTokens: []string{"position"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetModelsInput{} - } - - output = &GetModelsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetModels API operation for Amazon API Gateway. -// -// Describes existing Models defined for a RestApi resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetModels for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetModels(input *GetModelsInput) (*GetModelsOutput, error) { - req, out := c.GetModelsRequest(input) - return out, req.Send() -} - -// GetModelsWithContext is the same as GetModels with the addition of -// the ability to pass a context and additional request options. -// -// See GetModels for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetModelsWithContext(ctx aws.Context, input *GetModelsInput, opts ...request.Option) (*GetModelsOutput, error) { - req, out := c.GetModelsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetModelsPages iterates over the pages of a GetModels operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetModels 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 GetModels operation. -// pageNum := 0 -// err := client.GetModelsPages(params, -// func(page *GetModelsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *APIGateway) GetModelsPages(input *GetModelsInput, fn func(*GetModelsOutput, bool) bool) error { - return c.GetModelsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetModelsPagesWithContext same as GetModelsPages 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 *APIGateway) GetModelsPagesWithContext(ctx aws.Context, input *GetModelsInput, fn func(*GetModelsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetModelsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetModelsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetModelsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetRequestValidator = "GetRequestValidator" - -// GetRequestValidatorRequest generates a "aws/request.Request" representing the -// client's request for the GetRequestValidator operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRequestValidator for more information on using the GetRequestValidator -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRequestValidatorRequest method. -// req, resp := client.GetRequestValidatorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetRequestValidatorRequest(input *GetRequestValidatorInput) (req *request.Request, output *UpdateRequestValidatorOutput) { - op := &request.Operation{ - Name: opGetRequestValidator, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/requestvalidators/{requestvalidator_id}", - } - - if input == nil { - input = &GetRequestValidatorInput{} - } - - output = &UpdateRequestValidatorOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRequestValidator API operation for Amazon API Gateway. -// -// Gets a RequestValidator of a given RestApi. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetRequestValidator for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetRequestValidator(input *GetRequestValidatorInput) (*UpdateRequestValidatorOutput, error) { - req, out := c.GetRequestValidatorRequest(input) - return out, req.Send() -} - -// GetRequestValidatorWithContext is the same as GetRequestValidator with the addition of -// the ability to pass a context and additional request options. -// -// See GetRequestValidator for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetRequestValidatorWithContext(ctx aws.Context, input *GetRequestValidatorInput, opts ...request.Option) (*UpdateRequestValidatorOutput, error) { - req, out := c.GetRequestValidatorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRequestValidators = "GetRequestValidators" - -// GetRequestValidatorsRequest generates a "aws/request.Request" representing the -// client's request for the GetRequestValidators operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRequestValidators for more information on using the GetRequestValidators -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRequestValidatorsRequest method. -// req, resp := client.GetRequestValidatorsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetRequestValidatorsRequest(input *GetRequestValidatorsInput) (req *request.Request, output *GetRequestValidatorsOutput) { - op := &request.Operation{ - Name: opGetRequestValidators, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/requestvalidators", - } - - if input == nil { - input = &GetRequestValidatorsInput{} - } - - output = &GetRequestValidatorsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRequestValidators API operation for Amazon API Gateway. -// -// Gets the RequestValidators collection of a given RestApi. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetRequestValidators for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetRequestValidators(input *GetRequestValidatorsInput) (*GetRequestValidatorsOutput, error) { - req, out := c.GetRequestValidatorsRequest(input) - return out, req.Send() -} - -// GetRequestValidatorsWithContext is the same as GetRequestValidators with the addition of -// the ability to pass a context and additional request options. -// -// See GetRequestValidators for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetRequestValidatorsWithContext(ctx aws.Context, input *GetRequestValidatorsInput, opts ...request.Option) (*GetRequestValidatorsOutput, error) { - req, out := c.GetRequestValidatorsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetResource = "GetResource" - -// GetResourceRequest generates a "aws/request.Request" representing the -// client's request for the GetResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResource for more information on using the GetResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetResourceRequest method. -// req, resp := client.GetResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetResourceRequest(input *GetResourceInput) (req *request.Request, output *Resource) { - op := &request.Operation{ - Name: opGetResource, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}", - } - - if input == nil { - input = &GetResourceInput{} - } - - output = &Resource{} - req = c.newRequest(op, input, output) - return -} - -// GetResource API operation for Amazon API Gateway. -// -// Lists information about a resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetResource(input *GetResourceInput) (*Resource, error) { - req, out := c.GetResourceRequest(input) - return out, req.Send() -} - -// GetResourceWithContext is the same as GetResource with the addition of -// the ability to pass a context and additional request options. -// -// See GetResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetResourceWithContext(ctx aws.Context, input *GetResourceInput, opts ...request.Option) (*Resource, error) { - req, out := c.GetResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetResources = "GetResources" - -// GetResourcesRequest generates a "aws/request.Request" representing the -// client's request for the GetResources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResources for more information on using the GetResources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetResourcesRequest method. -// req, resp := client.GetResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetResourcesRequest(input *GetResourcesInput) (req *request.Request, output *GetResourcesOutput) { - op := &request.Operation{ - Name: opGetResources, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/resources", - Paginator: &request.Paginator{ - InputTokens: []string{"position"}, - OutputTokens: []string{"position"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetResourcesInput{} - } - - output = &GetResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResources API operation for Amazon API Gateway. -// -// Lists information about a collection of Resource resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetResources for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetResources(input *GetResourcesInput) (*GetResourcesOutput, error) { - req, out := c.GetResourcesRequest(input) - return out, req.Send() -} - -// GetResourcesWithContext is the same as GetResources with the addition of -// the ability to pass a context and additional request options. -// -// See GetResources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetResourcesWithContext(ctx aws.Context, input *GetResourcesInput, opts ...request.Option) (*GetResourcesOutput, error) { - req, out := c.GetResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetResourcesPages iterates over the pages of a GetResources operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetResources 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 GetResources operation. -// pageNum := 0 -// err := client.GetResourcesPages(params, -// func(page *GetResourcesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *APIGateway) GetResourcesPages(input *GetResourcesInput, fn func(*GetResourcesOutput, bool) bool) error { - return c.GetResourcesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetResourcesPagesWithContext same as GetResourcesPages 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 *APIGateway) GetResourcesPagesWithContext(ctx aws.Context, input *GetResourcesInput, fn func(*GetResourcesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetResourcesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetResourcesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetResourcesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetRestApi = "GetRestApi" - -// GetRestApiRequest generates a "aws/request.Request" representing the -// client's request for the GetRestApi operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRestApi for more information on using the GetRestApi -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRestApiRequest method. -// req, resp := client.GetRestApiRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetRestApiRequest(input *GetRestApiInput) (req *request.Request, output *RestApi) { - op := &request.Operation{ - Name: opGetRestApi, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}", - } - - if input == nil { - input = &GetRestApiInput{} - } - - output = &RestApi{} - req = c.newRequest(op, input, output) - return -} - -// GetRestApi API operation for Amazon API Gateway. -// -// Lists the RestApi resource in the collection. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetRestApi for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetRestApi(input *GetRestApiInput) (*RestApi, error) { - req, out := c.GetRestApiRequest(input) - return out, req.Send() -} - -// GetRestApiWithContext is the same as GetRestApi with the addition of -// the ability to pass a context and additional request options. -// -// See GetRestApi for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetRestApiWithContext(ctx aws.Context, input *GetRestApiInput, opts ...request.Option) (*RestApi, error) { - req, out := c.GetRestApiRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRestApis = "GetRestApis" - -// GetRestApisRequest generates a "aws/request.Request" representing the -// client's request for the GetRestApis operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRestApis for more information on using the GetRestApis -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRestApisRequest method. -// req, resp := client.GetRestApisRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetRestApisRequest(input *GetRestApisInput) (req *request.Request, output *GetRestApisOutput) { - op := &request.Operation{ - Name: opGetRestApis, - HTTPMethod: "GET", - HTTPPath: "/restapis", - Paginator: &request.Paginator{ - InputTokens: []string{"position"}, - OutputTokens: []string{"position"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetRestApisInput{} - } - - output = &GetRestApisOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRestApis API operation for Amazon API Gateway. -// -// Lists the RestApis resources for your collection. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetRestApis for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetRestApis(input *GetRestApisInput) (*GetRestApisOutput, error) { - req, out := c.GetRestApisRequest(input) - return out, req.Send() -} - -// GetRestApisWithContext is the same as GetRestApis with the addition of -// the ability to pass a context and additional request options. -// -// See GetRestApis for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetRestApisWithContext(ctx aws.Context, input *GetRestApisInput, opts ...request.Option) (*GetRestApisOutput, error) { - req, out := c.GetRestApisRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetRestApisPages iterates over the pages of a GetRestApis operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetRestApis 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 GetRestApis operation. -// pageNum := 0 -// err := client.GetRestApisPages(params, -// func(page *GetRestApisOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *APIGateway) GetRestApisPages(input *GetRestApisInput, fn func(*GetRestApisOutput, bool) bool) error { - return c.GetRestApisPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetRestApisPagesWithContext same as GetRestApisPages 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 *APIGateway) GetRestApisPagesWithContext(ctx aws.Context, input *GetRestApisInput, fn func(*GetRestApisOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetRestApisInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetRestApisRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetRestApisOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetSdk = "GetSdk" - -// GetSdkRequest generates a "aws/request.Request" representing the -// client's request for the GetSdk operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSdk for more information on using the GetSdk -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSdkRequest method. -// req, resp := client.GetSdkRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetSdkRequest(input *GetSdkInput) (req *request.Request, output *GetSdkOutput) { - op := &request.Operation{ - Name: opGetSdk, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}/sdks/{sdk_type}", - } - - if input == nil { - input = &GetSdkInput{} - } - - output = &GetSdkOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSdk API operation for Amazon API Gateway. -// -// Generates a client SDK for a RestApi and Stage. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetSdk for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetSdk(input *GetSdkInput) (*GetSdkOutput, error) { - req, out := c.GetSdkRequest(input) - return out, req.Send() -} - -// GetSdkWithContext is the same as GetSdk with the addition of -// the ability to pass a context and additional request options. -// -// See GetSdk for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetSdkWithContext(ctx aws.Context, input *GetSdkInput, opts ...request.Option) (*GetSdkOutput, error) { - req, out := c.GetSdkRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSdkType = "GetSdkType" - -// GetSdkTypeRequest generates a "aws/request.Request" representing the -// client's request for the GetSdkType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSdkType for more information on using the GetSdkType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSdkTypeRequest method. -// req, resp := client.GetSdkTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetSdkTypeRequest(input *GetSdkTypeInput) (req *request.Request, output *SdkType) { - op := &request.Operation{ - Name: opGetSdkType, - HTTPMethod: "GET", - HTTPPath: "/sdktypes/{sdktype_id}", - } - - if input == nil { - input = &GetSdkTypeInput{} - } - - output = &SdkType{} - req = c.newRequest(op, input, output) - return -} - -// GetSdkType API operation for Amazon API Gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetSdkType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetSdkType(input *GetSdkTypeInput) (*SdkType, error) { - req, out := c.GetSdkTypeRequest(input) - return out, req.Send() -} - -// GetSdkTypeWithContext is the same as GetSdkType with the addition of -// the ability to pass a context and additional request options. -// -// See GetSdkType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetSdkTypeWithContext(ctx aws.Context, input *GetSdkTypeInput, opts ...request.Option) (*SdkType, error) { - req, out := c.GetSdkTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSdkTypes = "GetSdkTypes" - -// GetSdkTypesRequest generates a "aws/request.Request" representing the -// client's request for the GetSdkTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSdkTypes for more information on using the GetSdkTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSdkTypesRequest method. -// req, resp := client.GetSdkTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetSdkTypesRequest(input *GetSdkTypesInput) (req *request.Request, output *GetSdkTypesOutput) { - op := &request.Operation{ - Name: opGetSdkTypes, - HTTPMethod: "GET", - HTTPPath: "/sdktypes", - } - - if input == nil { - input = &GetSdkTypesInput{} - } - - output = &GetSdkTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSdkTypes API operation for Amazon API Gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetSdkTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetSdkTypes(input *GetSdkTypesInput) (*GetSdkTypesOutput, error) { - req, out := c.GetSdkTypesRequest(input) - return out, req.Send() -} - -// GetSdkTypesWithContext is the same as GetSdkTypes with the addition of -// the ability to pass a context and additional request options. -// -// See GetSdkTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetSdkTypesWithContext(ctx aws.Context, input *GetSdkTypesInput, opts ...request.Option) (*GetSdkTypesOutput, error) { - req, out := c.GetSdkTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetStage = "GetStage" - -// GetStageRequest generates a "aws/request.Request" representing the -// client's request for the GetStage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetStage for more information on using the GetStage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetStageRequest method. -// req, resp := client.GetStageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetStageRequest(input *GetStageInput) (req *request.Request, output *Stage) { - op := &request.Operation{ - Name: opGetStage, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}", - } - - if input == nil { - input = &GetStageInput{} - } - - output = &Stage{} - req = c.newRequest(op, input, output) - return -} - -// GetStage API operation for Amazon API Gateway. -// -// Gets information about a Stage resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetStage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetStage(input *GetStageInput) (*Stage, error) { - req, out := c.GetStageRequest(input) - return out, req.Send() -} - -// GetStageWithContext is the same as GetStage with the addition of -// the ability to pass a context and additional request options. -// -// See GetStage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetStageWithContext(ctx aws.Context, input *GetStageInput, opts ...request.Option) (*Stage, error) { - req, out := c.GetStageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetStages = "GetStages" - -// GetStagesRequest generates a "aws/request.Request" representing the -// client's request for the GetStages operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetStages for more information on using the GetStages -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetStagesRequest method. -// req, resp := client.GetStagesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetStagesRequest(input *GetStagesInput) (req *request.Request, output *GetStagesOutput) { - op := &request.Operation{ - Name: opGetStages, - HTTPMethod: "GET", - HTTPPath: "/restapis/{restapi_id}/stages", - } - - if input == nil { - input = &GetStagesInput{} - } - - output = &GetStagesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetStages API operation for Amazon API Gateway. -// -// Gets information about one or more Stage resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetStages for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetStages(input *GetStagesInput) (*GetStagesOutput, error) { - req, out := c.GetStagesRequest(input) - return out, req.Send() -} - -// GetStagesWithContext is the same as GetStages with the addition of -// the ability to pass a context and additional request options. -// -// See GetStages for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetStagesWithContext(ctx aws.Context, input *GetStagesInput, opts ...request.Option) (*GetStagesOutput, error) { - req, out := c.GetStagesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTags = "GetTags" - -// GetTagsRequest generates a "aws/request.Request" representing the -// client's request for the GetTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTags for more information on using the GetTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTagsRequest method. -// req, resp := client.GetTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetTagsRequest(input *GetTagsInput) (req *request.Request, output *GetTagsOutput) { - op := &request.Operation{ - Name: opGetTags, - HTTPMethod: "GET", - HTTPPath: "/tags/{resource_arn}", - } - - if input == nil { - input = &GetTagsInput{} - } - - output = &GetTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTags API operation for Amazon API Gateway. -// -// Gets the Tags collection for a given resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -func (c *APIGateway) GetTags(input *GetTagsInput) (*GetTagsOutput, error) { - req, out := c.GetTagsRequest(input) - return out, req.Send() -} - -// GetTagsWithContext is the same as GetTags with the addition of -// the ability to pass a context and additional request options. -// -// See GetTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetTagsWithContext(ctx aws.Context, input *GetTagsInput, opts ...request.Option) (*GetTagsOutput, error) { - req, out := c.GetTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUsage = "GetUsage" - -// GetUsageRequest generates a "aws/request.Request" representing the -// client's request for the GetUsage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUsage for more information on using the GetUsage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUsageRequest method. -// req, resp := client.GetUsageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetUsageRequest(input *GetUsageInput) (req *request.Request, output *Usage) { - op := &request.Operation{ - Name: opGetUsage, - HTTPMethod: "GET", - HTTPPath: "/usageplans/{usageplanId}/usage", - Paginator: &request.Paginator{ - InputTokens: []string{"position"}, - OutputTokens: []string{"position"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetUsageInput{} - } - - output = &Usage{} - req = c.newRequest(op, input, output) - return -} - -// GetUsage API operation for Amazon API Gateway. -// -// Gets the usage data of a usage plan in a specified time interval. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetUsage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetUsage(input *GetUsageInput) (*Usage, error) { - req, out := c.GetUsageRequest(input) - return out, req.Send() -} - -// GetUsageWithContext is the same as GetUsage with the addition of -// the ability to pass a context and additional request options. -// -// See GetUsage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetUsageWithContext(ctx aws.Context, input *GetUsageInput, opts ...request.Option) (*Usage, error) { - req, out := c.GetUsageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetUsagePages iterates over the pages of a GetUsage operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetUsage 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 GetUsage operation. -// pageNum := 0 -// err := client.GetUsagePages(params, -// func(page *Usage, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *APIGateway) GetUsagePages(input *GetUsageInput, fn func(*Usage, bool) bool) error { - return c.GetUsagePagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetUsagePagesWithContext same as GetUsagePages 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 *APIGateway) GetUsagePagesWithContext(ctx aws.Context, input *GetUsageInput, fn func(*Usage, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetUsageInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetUsageRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*Usage), !p.HasNextPage()) - } - return p.Err() -} - -const opGetUsagePlan = "GetUsagePlan" - -// GetUsagePlanRequest generates a "aws/request.Request" representing the -// client's request for the GetUsagePlan operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUsagePlan for more information on using the GetUsagePlan -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUsagePlanRequest method. -// req, resp := client.GetUsagePlanRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetUsagePlanRequest(input *GetUsagePlanInput) (req *request.Request, output *UsagePlan) { - op := &request.Operation{ - Name: opGetUsagePlan, - HTTPMethod: "GET", - HTTPPath: "/usageplans/{usageplanId}", - } - - if input == nil { - input = &GetUsagePlanInput{} - } - - output = &UsagePlan{} - req = c.newRequest(op, input, output) - return -} - -// GetUsagePlan API operation for Amazon API Gateway. -// -// Gets a usage plan of a given plan identifier. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetUsagePlan for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetUsagePlan(input *GetUsagePlanInput) (*UsagePlan, error) { - req, out := c.GetUsagePlanRequest(input) - return out, req.Send() -} - -// GetUsagePlanWithContext is the same as GetUsagePlan with the addition of -// the ability to pass a context and additional request options. -// -// See GetUsagePlan for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetUsagePlanWithContext(ctx aws.Context, input *GetUsagePlanInput, opts ...request.Option) (*UsagePlan, error) { - req, out := c.GetUsagePlanRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUsagePlanKey = "GetUsagePlanKey" - -// GetUsagePlanKeyRequest generates a "aws/request.Request" representing the -// client's request for the GetUsagePlanKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUsagePlanKey for more information on using the GetUsagePlanKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUsagePlanKeyRequest method. -// req, resp := client.GetUsagePlanKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetUsagePlanKeyRequest(input *GetUsagePlanKeyInput) (req *request.Request, output *UsagePlanKey) { - op := &request.Operation{ - Name: opGetUsagePlanKey, - HTTPMethod: "GET", - HTTPPath: "/usageplans/{usageplanId}/keys/{keyId}", - } - - if input == nil { - input = &GetUsagePlanKeyInput{} - } - - output = &UsagePlanKey{} - req = c.newRequest(op, input, output) - return -} - -// GetUsagePlanKey API operation for Amazon API Gateway. -// -// Gets a usage plan key of a given key identifier. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetUsagePlanKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetUsagePlanKey(input *GetUsagePlanKeyInput) (*UsagePlanKey, error) { - req, out := c.GetUsagePlanKeyRequest(input) - return out, req.Send() -} - -// GetUsagePlanKeyWithContext is the same as GetUsagePlanKey with the addition of -// the ability to pass a context and additional request options. -// -// See GetUsagePlanKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetUsagePlanKeyWithContext(ctx aws.Context, input *GetUsagePlanKeyInput, opts ...request.Option) (*UsagePlanKey, error) { - req, out := c.GetUsagePlanKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUsagePlanKeys = "GetUsagePlanKeys" - -// GetUsagePlanKeysRequest generates a "aws/request.Request" representing the -// client's request for the GetUsagePlanKeys operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUsagePlanKeys for more information on using the GetUsagePlanKeys -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUsagePlanKeysRequest method. -// req, resp := client.GetUsagePlanKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetUsagePlanKeysRequest(input *GetUsagePlanKeysInput) (req *request.Request, output *GetUsagePlanKeysOutput) { - op := &request.Operation{ - Name: opGetUsagePlanKeys, - HTTPMethod: "GET", - HTTPPath: "/usageplans/{usageplanId}/keys", - Paginator: &request.Paginator{ - InputTokens: []string{"position"}, - OutputTokens: []string{"position"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetUsagePlanKeysInput{} - } - - output = &GetUsagePlanKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUsagePlanKeys API operation for Amazon API Gateway. -// -// Gets all the usage plan keys representing the API keys added to a specified -// usage plan. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetUsagePlanKeys for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetUsagePlanKeys(input *GetUsagePlanKeysInput) (*GetUsagePlanKeysOutput, error) { - req, out := c.GetUsagePlanKeysRequest(input) - return out, req.Send() -} - -// GetUsagePlanKeysWithContext is the same as GetUsagePlanKeys with the addition of -// the ability to pass a context and additional request options. -// -// See GetUsagePlanKeys for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetUsagePlanKeysWithContext(ctx aws.Context, input *GetUsagePlanKeysInput, opts ...request.Option) (*GetUsagePlanKeysOutput, error) { - req, out := c.GetUsagePlanKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetUsagePlanKeysPages iterates over the pages of a GetUsagePlanKeys operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetUsagePlanKeys 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 GetUsagePlanKeys operation. -// pageNum := 0 -// err := client.GetUsagePlanKeysPages(params, -// func(page *GetUsagePlanKeysOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *APIGateway) GetUsagePlanKeysPages(input *GetUsagePlanKeysInput, fn func(*GetUsagePlanKeysOutput, bool) bool) error { - return c.GetUsagePlanKeysPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetUsagePlanKeysPagesWithContext same as GetUsagePlanKeysPages 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 *APIGateway) GetUsagePlanKeysPagesWithContext(ctx aws.Context, input *GetUsagePlanKeysInput, fn func(*GetUsagePlanKeysOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetUsagePlanKeysInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetUsagePlanKeysRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetUsagePlanKeysOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetUsagePlans = "GetUsagePlans" - -// GetUsagePlansRequest generates a "aws/request.Request" representing the -// client's request for the GetUsagePlans operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUsagePlans for more information on using the GetUsagePlans -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUsagePlansRequest method. -// req, resp := client.GetUsagePlansRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetUsagePlansRequest(input *GetUsagePlansInput) (req *request.Request, output *GetUsagePlansOutput) { - op := &request.Operation{ - Name: opGetUsagePlans, - HTTPMethod: "GET", - HTTPPath: "/usageplans", - Paginator: &request.Paginator{ - InputTokens: []string{"position"}, - OutputTokens: []string{"position"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetUsagePlansInput{} - } - - output = &GetUsagePlansOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUsagePlans API operation for Amazon API Gateway. -// -// Gets all the usage plans of the caller's account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetUsagePlans for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -func (c *APIGateway) GetUsagePlans(input *GetUsagePlansInput) (*GetUsagePlansOutput, error) { - req, out := c.GetUsagePlansRequest(input) - return out, req.Send() -} - -// GetUsagePlansWithContext is the same as GetUsagePlans with the addition of -// the ability to pass a context and additional request options. -// -// See GetUsagePlans for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetUsagePlansWithContext(ctx aws.Context, input *GetUsagePlansInput, opts ...request.Option) (*GetUsagePlansOutput, error) { - req, out := c.GetUsagePlansRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetUsagePlansPages iterates over the pages of a GetUsagePlans operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetUsagePlans 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 GetUsagePlans operation. -// pageNum := 0 -// err := client.GetUsagePlansPages(params, -// func(page *GetUsagePlansOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *APIGateway) GetUsagePlansPages(input *GetUsagePlansInput, fn func(*GetUsagePlansOutput, bool) bool) error { - return c.GetUsagePlansPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetUsagePlansPagesWithContext same as GetUsagePlansPages 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 *APIGateway) GetUsagePlansPagesWithContext(ctx aws.Context, input *GetUsagePlansInput, fn func(*GetUsagePlansOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetUsagePlansInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetUsagePlansRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetUsagePlansOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetVpcLink = "GetVpcLink" - -// GetVpcLinkRequest generates a "aws/request.Request" representing the -// client's request for the GetVpcLink operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetVpcLink for more information on using the GetVpcLink -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetVpcLinkRequest method. -// req, resp := client.GetVpcLinkRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetVpcLinkRequest(input *GetVpcLinkInput) (req *request.Request, output *UpdateVpcLinkOutput) { - op := &request.Operation{ - Name: opGetVpcLink, - HTTPMethod: "GET", - HTTPPath: "/vpclinks/{vpclink_id}", - } - - if input == nil { - input = &GetVpcLinkInput{} - } - - output = &UpdateVpcLinkOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetVpcLink API operation for Amazon API Gateway. -// -// Gets a specified VPC link under the caller's account in a region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetVpcLink for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetVpcLink(input *GetVpcLinkInput) (*UpdateVpcLinkOutput, error) { - req, out := c.GetVpcLinkRequest(input) - return out, req.Send() -} - -// GetVpcLinkWithContext is the same as GetVpcLink with the addition of -// the ability to pass a context and additional request options. -// -// See GetVpcLink for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetVpcLinkWithContext(ctx aws.Context, input *GetVpcLinkInput, opts ...request.Option) (*UpdateVpcLinkOutput, error) { - req, out := c.GetVpcLinkRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetVpcLinks = "GetVpcLinks" - -// GetVpcLinksRequest generates a "aws/request.Request" representing the -// client's request for the GetVpcLinks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetVpcLinks for more information on using the GetVpcLinks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetVpcLinksRequest method. -// req, resp := client.GetVpcLinksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) GetVpcLinksRequest(input *GetVpcLinksInput) (req *request.Request, output *GetVpcLinksOutput) { - op := &request.Operation{ - Name: opGetVpcLinks, - HTTPMethod: "GET", - HTTPPath: "/vpclinks", - Paginator: &request.Paginator{ - InputTokens: []string{"position"}, - OutputTokens: []string{"position"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetVpcLinksInput{} - } - - output = &GetVpcLinksOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetVpcLinks API operation for Amazon API Gateway. -// -// Gets the VpcLinks collection under the caller's account in a selected region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation GetVpcLinks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) GetVpcLinks(input *GetVpcLinksInput) (*GetVpcLinksOutput, error) { - req, out := c.GetVpcLinksRequest(input) - return out, req.Send() -} - -// GetVpcLinksWithContext is the same as GetVpcLinks with the addition of -// the ability to pass a context and additional request options. -// -// See GetVpcLinks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) GetVpcLinksWithContext(ctx aws.Context, input *GetVpcLinksInput, opts ...request.Option) (*GetVpcLinksOutput, error) { - req, out := c.GetVpcLinksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetVpcLinksPages iterates over the pages of a GetVpcLinks operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetVpcLinks 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 GetVpcLinks operation. -// pageNum := 0 -// err := client.GetVpcLinksPages(params, -// func(page *GetVpcLinksOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *APIGateway) GetVpcLinksPages(input *GetVpcLinksInput, fn func(*GetVpcLinksOutput, bool) bool) error { - return c.GetVpcLinksPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetVpcLinksPagesWithContext same as GetVpcLinksPages 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 *APIGateway) GetVpcLinksPagesWithContext(ctx aws.Context, input *GetVpcLinksInput, fn func(*GetVpcLinksOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetVpcLinksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetVpcLinksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetVpcLinksOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opImportApiKeys = "ImportApiKeys" - -// ImportApiKeysRequest generates a "aws/request.Request" representing the -// client's request for the ImportApiKeys operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportApiKeys for more information on using the ImportApiKeys -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportApiKeysRequest method. -// req, resp := client.ImportApiKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) ImportApiKeysRequest(input *ImportApiKeysInput) (req *request.Request, output *ImportApiKeysOutput) { - op := &request.Operation{ - Name: opImportApiKeys, - HTTPMethod: "POST", - HTTPPath: "/apikeys?mode=import", - } - - if input == nil { - input = &ImportApiKeysInput{} - } - - output = &ImportApiKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// ImportApiKeys API operation for Amazon API Gateway. -// -// Import API keys from an external source, such as a CSV-formatted file. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation ImportApiKeys for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) ImportApiKeys(input *ImportApiKeysInput) (*ImportApiKeysOutput, error) { - req, out := c.ImportApiKeysRequest(input) - return out, req.Send() -} - -// ImportApiKeysWithContext is the same as ImportApiKeys with the addition of -// the ability to pass a context and additional request options. -// -// See ImportApiKeys for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) ImportApiKeysWithContext(ctx aws.Context, input *ImportApiKeysInput, opts ...request.Option) (*ImportApiKeysOutput, error) { - req, out := c.ImportApiKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportDocumentationParts = "ImportDocumentationParts" - -// ImportDocumentationPartsRequest generates a "aws/request.Request" representing the -// client's request for the ImportDocumentationParts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportDocumentationParts for more information on using the ImportDocumentationParts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportDocumentationPartsRequest method. -// req, resp := client.ImportDocumentationPartsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) ImportDocumentationPartsRequest(input *ImportDocumentationPartsInput) (req *request.Request, output *ImportDocumentationPartsOutput) { - op := &request.Operation{ - Name: opImportDocumentationParts, - HTTPMethod: "PUT", - HTTPPath: "/restapis/{restapi_id}/documentation/parts", - } - - if input == nil { - input = &ImportDocumentationPartsInput{} - } - - output = &ImportDocumentationPartsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ImportDocumentationParts API operation for Amazon API Gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation ImportDocumentationParts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) ImportDocumentationParts(input *ImportDocumentationPartsInput) (*ImportDocumentationPartsOutput, error) { - req, out := c.ImportDocumentationPartsRequest(input) - return out, req.Send() -} - -// ImportDocumentationPartsWithContext is the same as ImportDocumentationParts with the addition of -// the ability to pass a context and additional request options. -// -// See ImportDocumentationParts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) ImportDocumentationPartsWithContext(ctx aws.Context, input *ImportDocumentationPartsInput, opts ...request.Option) (*ImportDocumentationPartsOutput, error) { - req, out := c.ImportDocumentationPartsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportRestApi = "ImportRestApi" - -// ImportRestApiRequest generates a "aws/request.Request" representing the -// client's request for the ImportRestApi operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportRestApi for more information on using the ImportRestApi -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportRestApiRequest method. -// req, resp := client.ImportRestApiRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) ImportRestApiRequest(input *ImportRestApiInput) (req *request.Request, output *RestApi) { - op := &request.Operation{ - Name: opImportRestApi, - HTTPMethod: "POST", - HTTPPath: "/restapis?mode=import", - } - - if input == nil { - input = &ImportRestApiInput{} - } - - output = &RestApi{} - req = c.newRequest(op, input, output) - return -} - -// ImportRestApi API operation for Amazon API Gateway. -// -// A feature of the API Gateway control service for creating a new API from -// an external API definition file. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation ImportRestApi for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) ImportRestApi(input *ImportRestApiInput) (*RestApi, error) { - req, out := c.ImportRestApiRequest(input) - return out, req.Send() -} - -// ImportRestApiWithContext is the same as ImportRestApi with the addition of -// the ability to pass a context and additional request options. -// -// See ImportRestApi for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) ImportRestApiWithContext(ctx aws.Context, input *ImportRestApiInput, opts ...request.Option) (*RestApi, error) { - req, out := c.ImportRestApiRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutGatewayResponse = "PutGatewayResponse" - -// PutGatewayResponseRequest generates a "aws/request.Request" representing the -// client's request for the PutGatewayResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutGatewayResponse for more information on using the PutGatewayResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutGatewayResponseRequest method. -// req, resp := client.PutGatewayResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) PutGatewayResponseRequest(input *PutGatewayResponseInput) (req *request.Request, output *UpdateGatewayResponseOutput) { - op := &request.Operation{ - Name: opPutGatewayResponse, - HTTPMethod: "PUT", - HTTPPath: "/restapis/{restapi_id}/gatewayresponses/{response_type}", - } - - if input == nil { - input = &PutGatewayResponseInput{} - } - - output = &UpdateGatewayResponseOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutGatewayResponse API operation for Amazon API Gateway. -// -// Creates a customization of a GatewayResponse of a specified response type -// and status code on the given RestApi. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation PutGatewayResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) PutGatewayResponse(input *PutGatewayResponseInput) (*UpdateGatewayResponseOutput, error) { - req, out := c.PutGatewayResponseRequest(input) - return out, req.Send() -} - -// PutGatewayResponseWithContext is the same as PutGatewayResponse with the addition of -// the ability to pass a context and additional request options. -// -// See PutGatewayResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) PutGatewayResponseWithContext(ctx aws.Context, input *PutGatewayResponseInput, opts ...request.Option) (*UpdateGatewayResponseOutput, error) { - req, out := c.PutGatewayResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutIntegration = "PutIntegration" - -// PutIntegrationRequest generates a "aws/request.Request" representing the -// client's request for the PutIntegration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutIntegration for more information on using the PutIntegration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutIntegrationRequest method. -// req, resp := client.PutIntegrationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) PutIntegrationRequest(input *PutIntegrationInput) (req *request.Request, output *Integration) { - op := &request.Operation{ - Name: opPutIntegration, - HTTPMethod: "PUT", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration", - } - - if input == nil { - input = &PutIntegrationInput{} - } - - output = &Integration{} - req = c.newRequest(op, input, output) - return -} - -// PutIntegration API operation for Amazon API Gateway. -// -// Sets up a method's integration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation PutIntegration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) PutIntegration(input *PutIntegrationInput) (*Integration, error) { - req, out := c.PutIntegrationRequest(input) - return out, req.Send() -} - -// PutIntegrationWithContext is the same as PutIntegration with the addition of -// the ability to pass a context and additional request options. -// -// See PutIntegration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) PutIntegrationWithContext(ctx aws.Context, input *PutIntegrationInput, opts ...request.Option) (*Integration, error) { - req, out := c.PutIntegrationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutIntegrationResponse = "PutIntegrationResponse" - -// PutIntegrationResponseRequest generates a "aws/request.Request" representing the -// client's request for the PutIntegrationResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutIntegrationResponse for more information on using the PutIntegrationResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutIntegrationResponseRequest method. -// req, resp := client.PutIntegrationResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) PutIntegrationResponseRequest(input *PutIntegrationResponseInput) (req *request.Request, output *IntegrationResponse) { - op := &request.Operation{ - Name: opPutIntegrationResponse, - HTTPMethod: "PUT", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}", - } - - if input == nil { - input = &PutIntegrationResponseInput{} - } - - output = &IntegrationResponse{} - req = c.newRequest(op, input, output) - return -} - -// PutIntegrationResponse API operation for Amazon API Gateway. -// -// Represents a put integration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation PutIntegrationResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) PutIntegrationResponse(input *PutIntegrationResponseInput) (*IntegrationResponse, error) { - req, out := c.PutIntegrationResponseRequest(input) - return out, req.Send() -} - -// PutIntegrationResponseWithContext is the same as PutIntegrationResponse with the addition of -// the ability to pass a context and additional request options. -// -// See PutIntegrationResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) PutIntegrationResponseWithContext(ctx aws.Context, input *PutIntegrationResponseInput, opts ...request.Option) (*IntegrationResponse, error) { - req, out := c.PutIntegrationResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutMethod = "PutMethod" - -// PutMethodRequest generates a "aws/request.Request" representing the -// client's request for the PutMethod operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutMethod for more information on using the PutMethod -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutMethodRequest method. -// req, resp := client.PutMethodRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) PutMethodRequest(input *PutMethodInput) (req *request.Request, output *Method) { - op := &request.Operation{ - Name: opPutMethod, - HTTPMethod: "PUT", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}", - } - - if input == nil { - input = &PutMethodInput{} - } - - output = &Method{} - req = c.newRequest(op, input, output) - return -} - -// PutMethod API operation for Amazon API Gateway. -// -// Add a method to an existing Resource resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation PutMethod for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) PutMethod(input *PutMethodInput) (*Method, error) { - req, out := c.PutMethodRequest(input) - return out, req.Send() -} - -// PutMethodWithContext is the same as PutMethod with the addition of -// the ability to pass a context and additional request options. -// -// See PutMethod for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) PutMethodWithContext(ctx aws.Context, input *PutMethodInput, opts ...request.Option) (*Method, error) { - req, out := c.PutMethodRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutMethodResponse = "PutMethodResponse" - -// PutMethodResponseRequest generates a "aws/request.Request" representing the -// client's request for the PutMethodResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutMethodResponse for more information on using the PutMethodResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutMethodResponseRequest method. -// req, resp := client.PutMethodResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) PutMethodResponseRequest(input *PutMethodResponseInput) (req *request.Request, output *MethodResponse) { - op := &request.Operation{ - Name: opPutMethodResponse, - HTTPMethod: "PUT", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}", - } - - if input == nil { - input = &PutMethodResponseInput{} - } - - output = &MethodResponse{} - req = c.newRequest(op, input, output) - return -} - -// PutMethodResponse API operation for Amazon API Gateway. -// -// Adds a MethodResponse to an existing Method resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation PutMethodResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) PutMethodResponse(input *PutMethodResponseInput) (*MethodResponse, error) { - req, out := c.PutMethodResponseRequest(input) - return out, req.Send() -} - -// PutMethodResponseWithContext is the same as PutMethodResponse with the addition of -// the ability to pass a context and additional request options. -// -// See PutMethodResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) PutMethodResponseWithContext(ctx aws.Context, input *PutMethodResponseInput, opts ...request.Option) (*MethodResponse, error) { - req, out := c.PutMethodResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutRestApi = "PutRestApi" - -// PutRestApiRequest generates a "aws/request.Request" representing the -// client's request for the PutRestApi operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutRestApi for more information on using the PutRestApi -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutRestApiRequest method. -// req, resp := client.PutRestApiRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) PutRestApiRequest(input *PutRestApiInput) (req *request.Request, output *RestApi) { - op := &request.Operation{ - Name: opPutRestApi, - HTTPMethod: "PUT", - HTTPPath: "/restapis/{restapi_id}", - } - - if input == nil { - input = &PutRestApiInput{} - } - - output = &RestApi{} - req = c.newRequest(op, input, output) - return -} - -// PutRestApi API operation for Amazon API Gateway. -// -// A feature of the API Gateway control service for updating an existing API -// with an input of external API definitions. The update can take the form of -// merging the supplied definition into the existing API or overwriting the -// existing API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation PutRestApi for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) PutRestApi(input *PutRestApiInput) (*RestApi, error) { - req, out := c.PutRestApiRequest(input) - return out, req.Send() -} - -// PutRestApiWithContext is the same as PutRestApi with the addition of -// the ability to pass a context and additional request options. -// -// See PutRestApi for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) PutRestApiWithContext(ctx aws.Context, input *PutRestApiInput, opts ...request.Option) (*RestApi, error) { - req, out := c.PutRestApiRequest(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) -// } -func (c *APIGateway) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "PUT", - 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 Amazon API Gateway. -// -// Adds or updates a tag on a given resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) 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 *APIGateway) 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 opTestInvokeAuthorizer = "TestInvokeAuthorizer" - -// TestInvokeAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the TestInvokeAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TestInvokeAuthorizer for more information on using the TestInvokeAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TestInvokeAuthorizerRequest method. -// req, resp := client.TestInvokeAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) TestInvokeAuthorizerRequest(input *TestInvokeAuthorizerInput) (req *request.Request, output *TestInvokeAuthorizerOutput) { - op := &request.Operation{ - Name: opTestInvokeAuthorizer, - HTTPMethod: "POST", - HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}", - } - - if input == nil { - input = &TestInvokeAuthorizerInput{} - } - - output = &TestInvokeAuthorizerOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestInvokeAuthorizer API operation for Amazon API Gateway. -// -// Simulate the execution of an Authorizer in your RestApi with headers, parameters, -// and an incoming request body. -// -// Enable custom authorizers (https://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation TestInvokeAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) TestInvokeAuthorizer(input *TestInvokeAuthorizerInput) (*TestInvokeAuthorizerOutput, error) { - req, out := c.TestInvokeAuthorizerRequest(input) - return out, req.Send() -} - -// TestInvokeAuthorizerWithContext is the same as TestInvokeAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See TestInvokeAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) TestInvokeAuthorizerWithContext(ctx aws.Context, input *TestInvokeAuthorizerInput, opts ...request.Option) (*TestInvokeAuthorizerOutput, error) { - req, out := c.TestInvokeAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTestInvokeMethod = "TestInvokeMethod" - -// TestInvokeMethodRequest generates a "aws/request.Request" representing the -// client's request for the TestInvokeMethod operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TestInvokeMethod for more information on using the TestInvokeMethod -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TestInvokeMethodRequest method. -// req, resp := client.TestInvokeMethodRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) TestInvokeMethodRequest(input *TestInvokeMethodInput) (req *request.Request, output *TestInvokeMethodOutput) { - op := &request.Operation{ - Name: opTestInvokeMethod, - HTTPMethod: "POST", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}", - } - - if input == nil { - input = &TestInvokeMethodInput{} - } - - output = &TestInvokeMethodOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestInvokeMethod API operation for Amazon API Gateway. -// -// Simulate the execution of a Method in your RestApi with headers, parameters, -// and an incoming request body. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation TestInvokeMethod for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) TestInvokeMethod(input *TestInvokeMethodInput) (*TestInvokeMethodOutput, error) { - req, out := c.TestInvokeMethodRequest(input) - return out, req.Send() -} - -// TestInvokeMethodWithContext is the same as TestInvokeMethod with the addition of -// the ability to pass a context and additional request options. -// -// See TestInvokeMethod for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) TestInvokeMethodWithContext(ctx aws.Context, input *TestInvokeMethodInput, opts ...request.Option) (*TestInvokeMethodOutput, error) { - req, out := c.TestInvokeMethodRequest(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) -// } -func (c *APIGateway) 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 Amazon API Gateway. -// -// Removes a tag from a given resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) 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 *APIGateway) 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 opUpdateAccount = "UpdateAccount" - -// UpdateAccountRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAccount for more information on using the UpdateAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAccountRequest method. -// req, resp := client.UpdateAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateAccountRequest(input *UpdateAccountInput) (req *request.Request, output *Account) { - op := &request.Operation{ - Name: opUpdateAccount, - HTTPMethod: "PATCH", - HTTPPath: "/account", - } - - if input == nil { - input = &UpdateAccountInput{} - } - - output = &Account{} - req = c.newRequest(op, input, output) - return -} - -// UpdateAccount API operation for Amazon API Gateway. -// -// Changes information about the current Account resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateAccount(input *UpdateAccountInput) (*Account, error) { - req, out := c.UpdateAccountRequest(input) - return out, req.Send() -} - -// UpdateAccountWithContext is the same as UpdateAccount with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateAccountWithContext(ctx aws.Context, input *UpdateAccountInput, opts ...request.Option) (*Account, error) { - req, out := c.UpdateAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApiKey = "UpdateApiKey" - -// UpdateApiKeyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApiKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApiKey for more information on using the UpdateApiKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApiKeyRequest method. -// req, resp := client.UpdateApiKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateApiKeyRequest(input *UpdateApiKeyInput) (req *request.Request, output *ApiKey) { - op := &request.Operation{ - Name: opUpdateApiKey, - HTTPMethod: "PATCH", - HTTPPath: "/apikeys/{api_Key}", - } - - if input == nil { - input = &UpdateApiKeyInput{} - } - - output = &ApiKey{} - req = c.newRequest(op, input, output) - return -} - -// UpdateApiKey API operation for Amazon API Gateway. -// -// Changes information about an ApiKey resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateApiKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) UpdateApiKey(input *UpdateApiKeyInput) (*ApiKey, error) { - req, out := c.UpdateApiKeyRequest(input) - return out, req.Send() -} - -// UpdateApiKeyWithContext is the same as UpdateApiKey with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApiKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateApiKeyWithContext(ctx aws.Context, input *UpdateApiKeyInput, opts ...request.Option) (*ApiKey, error) { - req, out := c.UpdateApiKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAuthorizer = "UpdateAuthorizer" - -// UpdateAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAuthorizer for more information on using the UpdateAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAuthorizerRequest method. -// req, resp := client.UpdateAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateAuthorizerRequest(input *UpdateAuthorizerInput) (req *request.Request, output *Authorizer) { - op := &request.Operation{ - Name: opUpdateAuthorizer, - HTTPMethod: "PATCH", - HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}", - } - - if input == nil { - input = &UpdateAuthorizerInput{} - } - - output = &Authorizer{} - req = c.newRequest(op, input, output) - return -} - -// UpdateAuthorizer API operation for Amazon API Gateway. -// -// Updates an existing Authorizer resource. -// -// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/update-authorizer.html) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateAuthorizer(input *UpdateAuthorizerInput) (*Authorizer, error) { - req, out := c.UpdateAuthorizerRequest(input) - return out, req.Send() -} - -// UpdateAuthorizerWithContext is the same as UpdateAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateAuthorizerWithContext(ctx aws.Context, input *UpdateAuthorizerInput, opts ...request.Option) (*Authorizer, error) { - req, out := c.UpdateAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateBasePathMapping = "UpdateBasePathMapping" - -// UpdateBasePathMappingRequest generates a "aws/request.Request" representing the -// client's request for the UpdateBasePathMapping operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateBasePathMapping for more information on using the UpdateBasePathMapping -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateBasePathMappingRequest method. -// req, resp := client.UpdateBasePathMappingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateBasePathMappingRequest(input *UpdateBasePathMappingInput) (req *request.Request, output *BasePathMapping) { - op := &request.Operation{ - Name: opUpdateBasePathMapping, - HTTPMethod: "PATCH", - HTTPPath: "/domainnames/{domain_name}/basepathmappings/{base_path}", - } - - if input == nil { - input = &UpdateBasePathMappingInput{} - } - - output = &BasePathMapping{} - req = c.newRequest(op, input, output) - return -} - -// UpdateBasePathMapping API operation for Amazon API Gateway. -// -// Changes information about the BasePathMapping resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateBasePathMapping for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateBasePathMapping(input *UpdateBasePathMappingInput) (*BasePathMapping, error) { - req, out := c.UpdateBasePathMappingRequest(input) - return out, req.Send() -} - -// UpdateBasePathMappingWithContext is the same as UpdateBasePathMapping with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateBasePathMapping for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateBasePathMappingWithContext(ctx aws.Context, input *UpdateBasePathMappingInput, opts ...request.Option) (*BasePathMapping, error) { - req, out := c.UpdateBasePathMappingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateClientCertificate = "UpdateClientCertificate" - -// UpdateClientCertificateRequest generates a "aws/request.Request" representing the -// client's request for the UpdateClientCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateClientCertificate for more information on using the UpdateClientCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateClientCertificateRequest method. -// req, resp := client.UpdateClientCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateClientCertificateRequest(input *UpdateClientCertificateInput) (req *request.Request, output *ClientCertificate) { - op := &request.Operation{ - Name: opUpdateClientCertificate, - HTTPMethod: "PATCH", - HTTPPath: "/clientcertificates/{clientcertificate_id}", - } - - if input == nil { - input = &UpdateClientCertificateInput{} - } - - output = &ClientCertificate{} - req = c.newRequest(op, input, output) - return -} - -// UpdateClientCertificate API operation for Amazon API Gateway. -// -// Changes information about an ClientCertificate resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateClientCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -func (c *APIGateway) UpdateClientCertificate(input *UpdateClientCertificateInput) (*ClientCertificate, error) { - req, out := c.UpdateClientCertificateRequest(input) - return out, req.Send() -} - -// UpdateClientCertificateWithContext is the same as UpdateClientCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateClientCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateClientCertificateWithContext(ctx aws.Context, input *UpdateClientCertificateInput, opts ...request.Option) (*ClientCertificate, error) { - req, out := c.UpdateClientCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDeployment = "UpdateDeployment" - -// UpdateDeploymentRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDeployment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDeployment for more information on using the UpdateDeployment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDeploymentRequest method. -// req, resp := client.UpdateDeploymentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateDeploymentRequest(input *UpdateDeploymentInput) (req *request.Request, output *Deployment) { - op := &request.Operation{ - Name: opUpdateDeployment, - HTTPMethod: "PATCH", - HTTPPath: "/restapis/{restapi_id}/deployments/{deployment_id}", - } - - if input == nil { - input = &UpdateDeploymentInput{} - } - - output = &Deployment{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDeployment API operation for Amazon API Gateway. -// -// Changes information about a Deployment resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateDeployment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The requested service is not available. For details see the accompanying -// error message. Retry after the specified time period. -// -func (c *APIGateway) UpdateDeployment(input *UpdateDeploymentInput) (*Deployment, error) { - req, out := c.UpdateDeploymentRequest(input) - return out, req.Send() -} - -// UpdateDeploymentWithContext is the same as UpdateDeployment with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDeployment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateDeploymentWithContext(ctx aws.Context, input *UpdateDeploymentInput, opts ...request.Option) (*Deployment, error) { - req, out := c.UpdateDeploymentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDocumentationPart = "UpdateDocumentationPart" - -// UpdateDocumentationPartRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDocumentationPart operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDocumentationPart for more information on using the UpdateDocumentationPart -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDocumentationPartRequest method. -// req, resp := client.UpdateDocumentationPartRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateDocumentationPartRequest(input *UpdateDocumentationPartInput) (req *request.Request, output *DocumentationPart) { - op := &request.Operation{ - Name: opUpdateDocumentationPart, - HTTPMethod: "PATCH", - HTTPPath: "/restapis/{restapi_id}/documentation/parts/{part_id}", - } - - if input == nil { - input = &UpdateDocumentationPartInput{} - } - - output = &DocumentationPart{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDocumentationPart API operation for Amazon API Gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateDocumentationPart for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateDocumentationPart(input *UpdateDocumentationPartInput) (*DocumentationPart, error) { - req, out := c.UpdateDocumentationPartRequest(input) - return out, req.Send() -} - -// UpdateDocumentationPartWithContext is the same as UpdateDocumentationPart with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDocumentationPart for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateDocumentationPartWithContext(ctx aws.Context, input *UpdateDocumentationPartInput, opts ...request.Option) (*DocumentationPart, error) { - req, out := c.UpdateDocumentationPartRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDocumentationVersion = "UpdateDocumentationVersion" - -// UpdateDocumentationVersionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDocumentationVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDocumentationVersion for more information on using the UpdateDocumentationVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDocumentationVersionRequest method. -// req, resp := client.UpdateDocumentationVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateDocumentationVersionRequest(input *UpdateDocumentationVersionInput) (req *request.Request, output *DocumentationVersion) { - op := &request.Operation{ - Name: opUpdateDocumentationVersion, - HTTPMethod: "PATCH", - HTTPPath: "/restapis/{restapi_id}/documentation/versions/{doc_version}", - } - - if input == nil { - input = &UpdateDocumentationVersionInput{} - } - - output = &DocumentationVersion{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDocumentationVersion API operation for Amazon API Gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateDocumentationVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateDocumentationVersion(input *UpdateDocumentationVersionInput) (*DocumentationVersion, error) { - req, out := c.UpdateDocumentationVersionRequest(input) - return out, req.Send() -} - -// UpdateDocumentationVersionWithContext is the same as UpdateDocumentationVersion with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDocumentationVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateDocumentationVersionWithContext(ctx aws.Context, input *UpdateDocumentationVersionInput, opts ...request.Option) (*DocumentationVersion, error) { - req, out := c.UpdateDocumentationVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDomainName = "UpdateDomainName" - -// UpdateDomainNameRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDomainName operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDomainName for more information on using the UpdateDomainName -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDomainNameRequest method. -// req, resp := client.UpdateDomainNameRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateDomainNameRequest(input *UpdateDomainNameInput) (req *request.Request, output *DomainName) { - op := &request.Operation{ - Name: opUpdateDomainName, - HTTPMethod: "PATCH", - HTTPPath: "/domainnames/{domain_name}", - } - - if input == nil { - input = &UpdateDomainNameInput{} - } - - output = &DomainName{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDomainName API operation for Amazon API Gateway. -// -// Changes information about the DomainName resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateDomainName for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateDomainName(input *UpdateDomainNameInput) (*DomainName, error) { - req, out := c.UpdateDomainNameRequest(input) - return out, req.Send() -} - -// UpdateDomainNameWithContext is the same as UpdateDomainName with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDomainName for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateDomainNameWithContext(ctx aws.Context, input *UpdateDomainNameInput, opts ...request.Option) (*DomainName, error) { - req, out := c.UpdateDomainNameRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateGatewayResponse = "UpdateGatewayResponse" - -// UpdateGatewayResponseRequest generates a "aws/request.Request" representing the -// client's request for the UpdateGatewayResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateGatewayResponse for more information on using the UpdateGatewayResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateGatewayResponseRequest method. -// req, resp := client.UpdateGatewayResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateGatewayResponseRequest(input *UpdateGatewayResponseInput) (req *request.Request, output *UpdateGatewayResponseOutput) { - op := &request.Operation{ - Name: opUpdateGatewayResponse, - HTTPMethod: "PATCH", - HTTPPath: "/restapis/{restapi_id}/gatewayresponses/{response_type}", - } - - if input == nil { - input = &UpdateGatewayResponseInput{} - } - - output = &UpdateGatewayResponseOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateGatewayResponse API operation for Amazon API Gateway. -// -// Updates a GatewayResponse of a specified response type on the given RestApi. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateGatewayResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateGatewayResponse(input *UpdateGatewayResponseInput) (*UpdateGatewayResponseOutput, error) { - req, out := c.UpdateGatewayResponseRequest(input) - return out, req.Send() -} - -// UpdateGatewayResponseWithContext is the same as UpdateGatewayResponse with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateGatewayResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateGatewayResponseWithContext(ctx aws.Context, input *UpdateGatewayResponseInput, opts ...request.Option) (*UpdateGatewayResponseOutput, error) { - req, out := c.UpdateGatewayResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateIntegration = "UpdateIntegration" - -// UpdateIntegrationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateIntegration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateIntegration for more information on using the UpdateIntegration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateIntegrationRequest method. -// req, resp := client.UpdateIntegrationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateIntegrationRequest(input *UpdateIntegrationInput) (req *request.Request, output *Integration) { - op := &request.Operation{ - Name: opUpdateIntegration, - HTTPMethod: "PATCH", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration", - } - - if input == nil { - input = &UpdateIntegrationInput{} - } - - output = &Integration{} - req = c.newRequest(op, input, output) - return -} - -// UpdateIntegration API operation for Amazon API Gateway. -// -// Represents an update integration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateIntegration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) UpdateIntegration(input *UpdateIntegrationInput) (*Integration, error) { - req, out := c.UpdateIntegrationRequest(input) - return out, req.Send() -} - -// UpdateIntegrationWithContext is the same as UpdateIntegration with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateIntegration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateIntegrationWithContext(ctx aws.Context, input *UpdateIntegrationInput, opts ...request.Option) (*Integration, error) { - req, out := c.UpdateIntegrationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateIntegrationResponse = "UpdateIntegrationResponse" - -// UpdateIntegrationResponseRequest generates a "aws/request.Request" representing the -// client's request for the UpdateIntegrationResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateIntegrationResponse for more information on using the UpdateIntegrationResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateIntegrationResponseRequest method. -// req, resp := client.UpdateIntegrationResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateIntegrationResponseRequest(input *UpdateIntegrationResponseInput) (req *request.Request, output *IntegrationResponse) { - op := &request.Operation{ - Name: opUpdateIntegrationResponse, - HTTPMethod: "PATCH", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}", - } - - if input == nil { - input = &UpdateIntegrationResponseInput{} - } - - output = &IntegrationResponse{} - req = c.newRequest(op, input, output) - return -} - -// UpdateIntegrationResponse API operation for Amazon API Gateway. -// -// Represents an update integration response. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateIntegrationResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateIntegrationResponse(input *UpdateIntegrationResponseInput) (*IntegrationResponse, error) { - req, out := c.UpdateIntegrationResponseRequest(input) - return out, req.Send() -} - -// UpdateIntegrationResponseWithContext is the same as UpdateIntegrationResponse with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateIntegrationResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateIntegrationResponseWithContext(ctx aws.Context, input *UpdateIntegrationResponseInput, opts ...request.Option) (*IntegrationResponse, error) { - req, out := c.UpdateIntegrationResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateMethod = "UpdateMethod" - -// UpdateMethodRequest generates a "aws/request.Request" representing the -// client's request for the UpdateMethod operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateMethod for more information on using the UpdateMethod -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateMethodRequest method. -// req, resp := client.UpdateMethodRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateMethodRequest(input *UpdateMethodInput) (req *request.Request, output *Method) { - op := &request.Operation{ - Name: opUpdateMethod, - HTTPMethod: "PATCH", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}", - } - - if input == nil { - input = &UpdateMethodInput{} - } - - output = &Method{} - req = c.newRequest(op, input, output) - return -} - -// UpdateMethod API operation for Amazon API Gateway. -// -// Updates an existing Method resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateMethod for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateMethod(input *UpdateMethodInput) (*Method, error) { - req, out := c.UpdateMethodRequest(input) - return out, req.Send() -} - -// UpdateMethodWithContext is the same as UpdateMethod with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateMethod for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateMethodWithContext(ctx aws.Context, input *UpdateMethodInput, opts ...request.Option) (*Method, error) { - req, out := c.UpdateMethodRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateMethodResponse = "UpdateMethodResponse" - -// UpdateMethodResponseRequest generates a "aws/request.Request" representing the -// client's request for the UpdateMethodResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateMethodResponse for more information on using the UpdateMethodResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateMethodResponseRequest method. -// req, resp := client.UpdateMethodResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateMethodResponseRequest(input *UpdateMethodResponseInput) (req *request.Request, output *MethodResponse) { - op := &request.Operation{ - Name: opUpdateMethodResponse, - HTTPMethod: "PATCH", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}", - } - - if input == nil { - input = &UpdateMethodResponseInput{} - } - - output = &MethodResponse{} - req = c.newRequest(op, input, output) - return -} - -// UpdateMethodResponse API operation for Amazon API Gateway. -// -// Updates an existing MethodResponse resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateMethodResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded the rate limit. Retry after the specified time period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateMethodResponse(input *UpdateMethodResponseInput) (*MethodResponse, error) { - req, out := c.UpdateMethodResponseRequest(input) - return out, req.Send() -} - -// UpdateMethodResponseWithContext is the same as UpdateMethodResponse with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateMethodResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateMethodResponseWithContext(ctx aws.Context, input *UpdateMethodResponseInput, opts ...request.Option) (*MethodResponse, error) { - req, out := c.UpdateMethodResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateModel = "UpdateModel" - -// UpdateModelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateModel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateModel for more information on using the UpdateModel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateModelRequest method. -// req, resp := client.UpdateModelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateModelRequest(input *UpdateModelInput) (req *request.Request, output *Model) { - op := &request.Operation{ - Name: opUpdateModel, - HTTPMethod: "PATCH", - HTTPPath: "/restapis/{restapi_id}/models/{model_name}", - } - - if input == nil { - input = &UpdateModelInput{} - } - - output = &Model{} - req = c.newRequest(op, input, output) - return -} - -// UpdateModel API operation for Amazon API Gateway. -// -// Changes information about a model. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateModel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateModel(input *UpdateModelInput) (*Model, error) { - req, out := c.UpdateModelRequest(input) - return out, req.Send() -} - -// UpdateModelWithContext is the same as UpdateModel with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateModel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateModelWithContext(ctx aws.Context, input *UpdateModelInput, opts ...request.Option) (*Model, error) { - req, out := c.UpdateModelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRequestValidator = "UpdateRequestValidator" - -// UpdateRequestValidatorRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRequestValidator operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRequestValidator for more information on using the UpdateRequestValidator -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRequestValidatorRequest method. -// req, resp := client.UpdateRequestValidatorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateRequestValidatorRequest(input *UpdateRequestValidatorInput) (req *request.Request, output *UpdateRequestValidatorOutput) { - op := &request.Operation{ - Name: opUpdateRequestValidator, - HTTPMethod: "PATCH", - HTTPPath: "/restapis/{restapi_id}/requestvalidators/{requestvalidator_id}", - } - - if input == nil { - input = &UpdateRequestValidatorInput{} - } - - output = &UpdateRequestValidatorOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRequestValidator API operation for Amazon API Gateway. -// -// Updates a RequestValidator of a given RestApi. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateRequestValidator for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateRequestValidator(input *UpdateRequestValidatorInput) (*UpdateRequestValidatorOutput, error) { - req, out := c.UpdateRequestValidatorRequest(input) - return out, req.Send() -} - -// UpdateRequestValidatorWithContext is the same as UpdateRequestValidator with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRequestValidator for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateRequestValidatorWithContext(ctx aws.Context, input *UpdateRequestValidatorInput, opts ...request.Option) (*UpdateRequestValidatorOutput, error) { - req, out := c.UpdateRequestValidatorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateResource = "UpdateResource" - -// UpdateResourceRequest generates a "aws/request.Request" representing the -// client's request for the UpdateResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateResource for more information on using the UpdateResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateResourceRequest method. -// req, resp := client.UpdateResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateResourceRequest(input *UpdateResourceInput) (req *request.Request, output *Resource) { - op := &request.Operation{ - Name: opUpdateResource, - HTTPMethod: "PATCH", - HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}", - } - - if input == nil { - input = &UpdateResourceInput{} - } - - output = &Resource{} - req = c.newRequest(op, input, output) - return -} - -// UpdateResource API operation for Amazon API Gateway. -// -// Changes information about a Resource resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateResource(input *UpdateResourceInput) (*Resource, error) { - req, out := c.UpdateResourceRequest(input) - return out, req.Send() -} - -// UpdateResourceWithContext is the same as UpdateResource with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateResourceWithContext(ctx aws.Context, input *UpdateResourceInput, opts ...request.Option) (*Resource, error) { - req, out := c.UpdateResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRestApi = "UpdateRestApi" - -// UpdateRestApiRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRestApi operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRestApi for more information on using the UpdateRestApi -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRestApiRequest method. -// req, resp := client.UpdateRestApiRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateRestApiRequest(input *UpdateRestApiInput) (req *request.Request, output *RestApi) { - op := &request.Operation{ - Name: opUpdateRestApi, - HTTPMethod: "PATCH", - HTTPPath: "/restapis/{restapi_id}", - } - - if input == nil { - input = &UpdateRestApiInput{} - } - - output = &RestApi{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRestApi API operation for Amazon API Gateway. -// -// Changes information about the specified API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateRestApi for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateRestApi(input *UpdateRestApiInput) (*RestApi, error) { - req, out := c.UpdateRestApiRequest(input) - return out, req.Send() -} - -// UpdateRestApiWithContext is the same as UpdateRestApi with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRestApi for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateRestApiWithContext(ctx aws.Context, input *UpdateRestApiInput, opts ...request.Option) (*RestApi, error) { - req, out := c.UpdateRestApiRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateStage = "UpdateStage" - -// UpdateStageRequest generates a "aws/request.Request" representing the -// client's request for the UpdateStage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateStage for more information on using the UpdateStage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateStageRequest method. -// req, resp := client.UpdateStageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateStageRequest(input *UpdateStageInput) (req *request.Request, output *Stage) { - op := &request.Operation{ - Name: opUpdateStage, - HTTPMethod: "PATCH", - HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}", - } - - if input == nil { - input = &UpdateStageInput{} - } - - output = &Stage{} - req = c.newRequest(op, input, output) - return -} - -// UpdateStage API operation for Amazon API Gateway. -// -// Changes information about a Stage resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateStage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateStage(input *UpdateStageInput) (*Stage, error) { - req, out := c.UpdateStageRequest(input) - return out, req.Send() -} - -// UpdateStageWithContext is the same as UpdateStage with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateStage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateStageWithContext(ctx aws.Context, input *UpdateStageInput, opts ...request.Option) (*Stage, error) { - req, out := c.UpdateStageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateUsage = "UpdateUsage" - -// UpdateUsageRequest generates a "aws/request.Request" representing the -// client's request for the UpdateUsage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateUsage for more information on using the UpdateUsage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateUsageRequest method. -// req, resp := client.UpdateUsageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateUsageRequest(input *UpdateUsageInput) (req *request.Request, output *Usage) { - op := &request.Operation{ - Name: opUpdateUsage, - HTTPMethod: "PATCH", - HTTPPath: "/usageplans/{usageplanId}/keys/{keyId}/usage", - } - - if input == nil { - input = &UpdateUsageInput{} - } - - output = &Usage{} - req = c.newRequest(op, input, output) - return -} - -// UpdateUsage API operation for Amazon API Gateway. -// -// Grants a temporary extension to the remaining quota of a usage plan associated -// with a specified API key. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateUsage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -func (c *APIGateway) UpdateUsage(input *UpdateUsageInput) (*Usage, error) { - req, out := c.UpdateUsageRequest(input) - return out, req.Send() -} - -// UpdateUsageWithContext is the same as UpdateUsage with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateUsage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateUsageWithContext(ctx aws.Context, input *UpdateUsageInput, opts ...request.Option) (*Usage, error) { - req, out := c.UpdateUsageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateUsagePlan = "UpdateUsagePlan" - -// UpdateUsagePlanRequest generates a "aws/request.Request" representing the -// client's request for the UpdateUsagePlan operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateUsagePlan for more information on using the UpdateUsagePlan -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateUsagePlanRequest method. -// req, resp := client.UpdateUsagePlanRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateUsagePlanRequest(input *UpdateUsagePlanInput) (req *request.Request, output *UsagePlan) { - op := &request.Operation{ - Name: opUpdateUsagePlan, - HTTPMethod: "PATCH", - HTTPPath: "/usageplans/{usageplanId}", - } - - if input == nil { - input = &UpdateUsagePlanInput{} - } - - output = &UsagePlan{} - req = c.newRequest(op, input, output) - return -} - -// UpdateUsagePlan API operation for Amazon API Gateway. -// -// Updates a usage plan of a given plan Id. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateUsagePlan for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -func (c *APIGateway) UpdateUsagePlan(input *UpdateUsagePlanInput) (*UsagePlan, error) { - req, out := c.UpdateUsagePlanRequest(input) - return out, req.Send() -} - -// UpdateUsagePlanWithContext is the same as UpdateUsagePlan with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateUsagePlan for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateUsagePlanWithContext(ctx aws.Context, input *UpdateUsagePlanInput, opts ...request.Option) (*UsagePlan, error) { - req, out := c.UpdateUsagePlanRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateVpcLink = "UpdateVpcLink" - -// UpdateVpcLinkRequest generates a "aws/request.Request" representing the -// client's request for the UpdateVpcLink operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateVpcLink for more information on using the UpdateVpcLink -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateVpcLinkRequest method. -// req, resp := client.UpdateVpcLinkRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *APIGateway) UpdateVpcLinkRequest(input *UpdateVpcLinkInput) (req *request.Request, output *UpdateVpcLinkOutput) { - op := &request.Operation{ - Name: opUpdateVpcLink, - HTTPMethod: "PATCH", - HTTPPath: "/vpclinks/{vpclink_id}", - } - - if input == nil { - input = &UpdateVpcLinkInput{} - } - - output = &UpdateVpcLinkOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateVpcLink API operation for Amazon API Gateway. -// -// Updates an existing VpcLink of a specified identifier. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon API Gateway's -// API operation UpdateVpcLink for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request is denied because the caller has insufficient permissions. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource is not found. Make sure that the request URI is correct. -// -// * ErrCodeBadRequestException "BadRequestException" -// The submitted request is not valid, for example, the input is incomplete -// or incorrect. See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The request configuration has conflicts. For details, see the accompanying -// error message. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The request has reached its throttling limit. Retry after the specified time -// period. -// -func (c *APIGateway) UpdateVpcLink(input *UpdateVpcLinkInput) (*UpdateVpcLinkOutput, error) { - req, out := c.UpdateVpcLinkRequest(input) - return out, req.Send() -} - -// UpdateVpcLinkWithContext is the same as UpdateVpcLink with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateVpcLink for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *APIGateway) UpdateVpcLinkWithContext(ctx aws.Context, input *UpdateVpcLinkInput, opts ...request.Option) (*UpdateVpcLinkOutput, error) { - req, out := c.UpdateVpcLinkRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Access log settings, including the access log format and access log destination -// ARN. -type AccessLogSettings struct { - _ struct{} `type:"structure"` - - // The ARN of the CloudWatch Logs log group to receive access logs. - DestinationArn *string `locationName:"destinationArn" type:"string"` - - // A single line format of the access logs of data, as specified by selected - // $context variables (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference). - // The format must include at least $context.requestId. - Format *string `locationName:"format" type:"string"` -} - -// String returns the string representation -func (s AccessLogSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccessLogSettings) GoString() string { - return s.String() -} - -// SetDestinationArn sets the DestinationArn field's value. -func (s *AccessLogSettings) SetDestinationArn(v string) *AccessLogSettings { - s.DestinationArn = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *AccessLogSettings) SetFormat(v string) *AccessLogSettings { - s.Format = &v - return s -} - -// Represents an AWS account that is associated with API Gateway. -// -// To view the account info, call GET on this resource. -// -// Error Codes -// -// The following exception may be thrown when the request fails. -// -// UnauthorizedException -// NotFoundException -// TooManyRequestsException -// For detailed error code information, including the corresponding HTTP Status -// Codes, see API Gateway Error Codes (https://docs.aws.amazon.com/apigateway/api-reference/handling-errors/#api-error-codes) -// -// Example: Get the information about an account. -// -// Request -// -// GET /account HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com -// X-Amz-Date: 20160531T184618Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/us-east-1/apigateway/aws4_request, -// SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} -// Response -// -// The successful response returns a 200 OK status code and a payload similar -// to the following: -// -// { "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/account-apigateway-{rel}.html", -// "name": "account", "templated": true }, "self": { "href": "/account" }, "account:update": -// { "href": "/account" } }, "cloudwatchRoleArn": "arn:aws:iam::123456789012:role/apigAwsProxyRole", -// "throttleSettings": { "rateLimit": 500, "burstLimit": 1000 } } -// In addition to making the REST API call directly, you can use the AWS CLI -// and an AWS SDK to access this resource. -// -// API Gateway Limits (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-limits.html)Developer -// Guide (https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html), -// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-account.html) -type Account struct { - _ struct{} `type:"structure"` - - // The version of the API keys used for the account. - ApiKeyVersion *string `locationName:"apiKeyVersion" type:"string"` - - // The ARN of an Amazon CloudWatch role for the current Account. - CloudwatchRoleArn *string `locationName:"cloudwatchRoleArn" type:"string"` - - // A list of features supported for the account. When usage plans are enabled, - // the features list will include an entry of "UsagePlans". - Features []*string `locationName:"features" type:"list"` - - // Specifies the API request limits configured for the current Account. - ThrottleSettings *ThrottleSettings `locationName:"throttleSettings" type:"structure"` -} - -// String returns the string representation -func (s Account) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Account) GoString() string { - return s.String() -} - -// SetApiKeyVersion sets the ApiKeyVersion field's value. -func (s *Account) SetApiKeyVersion(v string) *Account { - s.ApiKeyVersion = &v - return s -} - -// SetCloudwatchRoleArn sets the CloudwatchRoleArn field's value. -func (s *Account) SetCloudwatchRoleArn(v string) *Account { - s.CloudwatchRoleArn = &v - return s -} - -// SetFeatures sets the Features field's value. -func (s *Account) SetFeatures(v []*string) *Account { - s.Features = v - return s -} - -// SetThrottleSettings sets the ThrottleSettings field's value. -func (s *Account) SetThrottleSettings(v *ThrottleSettings) *Account { - s.ThrottleSettings = v - return s -} - -// A resource that can be distributed to callers for executing Method resources -// that require an API key. API keys can be mapped to any Stage on any RestApi, -// which indicates that the callers with the API key can make requests to that -// stage. -// -// Use API Keys (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-api-keys.html) -type ApiKey struct { - _ struct{} `type:"structure"` - - // The timestamp when the API Key was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // An AWS Marketplace customer identifier , when integrating with the AWS SaaS - // Marketplace. - CustomerId *string `locationName:"customerId" type:"string"` - - // The description of the API Key. - Description *string `locationName:"description" type:"string"` - - // Specifies whether the API Key can be used by callers. - Enabled *bool `locationName:"enabled" type:"boolean"` - - // The identifier of the API Key. - Id *string `locationName:"id" type:"string"` - - // The timestamp when the API Key was last updated. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The name of the API Key. - Name *string `locationName:"name" type:"string"` - - // A list of Stage resources that are associated with the ApiKey resource. - StageKeys []*string `locationName:"stageKeys" type:"list"` - - // The value of the API Key. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s ApiKey) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApiKey) GoString() string { - return s.String() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *ApiKey) SetCreatedDate(v time.Time) *ApiKey { - s.CreatedDate = &v - return s -} - -// SetCustomerId sets the CustomerId field's value. -func (s *ApiKey) SetCustomerId(v string) *ApiKey { - s.CustomerId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ApiKey) SetDescription(v string) *ApiKey { - s.Description = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *ApiKey) SetEnabled(v bool) *ApiKey { - s.Enabled = &v - return s -} - -// SetId sets the Id field's value. -func (s *ApiKey) SetId(v string) *ApiKey { - s.Id = &v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *ApiKey) SetLastUpdatedDate(v time.Time) *ApiKey { - s.LastUpdatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *ApiKey) SetName(v string) *ApiKey { - s.Name = &v - return s -} - -// SetStageKeys sets the StageKeys field's value. -func (s *ApiKey) SetStageKeys(v []*string) *ApiKey { - s.StageKeys = v - return s -} - -// SetValue sets the Value field's value. -func (s *ApiKey) SetValue(v string) *ApiKey { - s.Value = &v - return s -} - -// API stage name of the associated API stage in a usage plan. -type ApiStage struct { - _ struct{} `type:"structure"` - - // API Id of the associated API stage in a usage plan. - ApiId *string `locationName:"apiId" type:"string"` - - // API stage name of the associated API stage in a usage plan. - Stage *string `locationName:"stage" type:"string"` - - // Map containing method level throttling information for API stage in a usage - // plan. - Throttle map[string]*ThrottleSettings `locationName:"throttle" type:"map"` -} - -// String returns the string representation -func (s ApiStage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApiStage) GoString() string { - return s.String() -} - -// SetApiId sets the ApiId field's value. -func (s *ApiStage) SetApiId(v string) *ApiStage { - s.ApiId = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *ApiStage) SetStage(v string) *ApiStage { - s.Stage = &v - return s -} - -// SetThrottle sets the Throttle field's value. -func (s *ApiStage) SetThrottle(v map[string]*ThrottleSettings) *ApiStage { - s.Throttle = v - return s -} - -// Represents an authorization layer for methods. If enabled on a method, API -// Gateway will activate the authorizer when a client calls the method. -// -// Enable custom authorization (https://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) -type Authorizer struct { - _ struct{} `type:"structure"` - - // Optional customer-defined field, used in OpenAPI imports and exports without - // functional impact. - AuthType *string `locationName:"authType" type:"string"` - - // Specifies the required credentials as an IAM role for API Gateway to invoke - // the authorizer. To specify an IAM role for API Gateway to assume, use the - // role's Amazon Resource Name (ARN). To use resource-based permissions on the - // Lambda function, specify null. - AuthorizerCredentials *string `locationName:"authorizerCredentials" type:"string"` - - // The TTL in seconds of cached authorizer results. If it equals 0, authorization - // caching is disabled. If it is greater than 0, API Gateway will cache authorizer - // responses. If this field is not set, the default value is 300. The maximum - // value is 3600, or 1 hour. - AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` - - // Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN or - // REQUEST authorizers, this must be a well-formed Lambda function URI, for - // example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. - // In general, the URI has this form arn:aws:apigateway:{region}:lambda:path/{service_api}, - // where {region} is the same as the region hosting the Lambda function, path - // indicates that the remaining substring in the URI should be treated as the - // path to the resource, including the initial /. For Lambda functions, this - // is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. - AuthorizerUri *string `locationName:"authorizerUri" type:"string"` - - // The identifier for the authorizer resource. - Id *string `locationName:"id" type:"string"` - - // The identity source for which authorization is requested. For a TOKEN or - // COGNITO_USER_POOLS authorizer, this is required and specifies the request - // header mapping expression for the custom header holding the authorization - // token submitted by the client. For example, if the token header name is Auth, - // the header mapping expression is method.request.header.Auth. - // For the REQUEST authorizer, this is required when authorization caching is - // enabled. The value is a comma-separated string of one or more mapping expressions - // of the specified request parameters. For example, if an Auth header, a Name - // query string parameter are defined as identity sources, this value is method.request.header.Auth, - // method.request.querystring.Name. These parameters will be used to derive - // the authorization caching key and to perform runtime validation of the REQUEST - // authorizer by verifying all of the identity-related request parameters are - // present, not null and non-empty. Only when this is true does the authorizer - // invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized - // response without calling the Lambda function. The valid value is a string - // of comma-separated mapping expressions of the specified request parameters. - // When the authorization caching is not enabled, this property is optional. - IdentitySource *string `locationName:"identitySource" type:"string"` - - // A validation expression for the incoming identity token. For TOKEN authorizers, - // this value is a regular expression. API Gateway will match the aud field - // of the incoming token from the client against the specified regular expression. - // It will invoke the authorizer's Lambda function when there is a match. Otherwise, - // it will return a 401 Unauthorized response without calling the Lambda function. - // The validation expression does not apply to the REQUEST authorizer. - IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` - - // [Required] The name of the authorizer. - Name *string `locationName:"name" type:"string"` - - // A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. - // Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. - // For a TOKEN or REQUEST authorizer, this is not defined. - ProviderARNs []*string `locationName:"providerARNs" type:"list"` - - // The authorizer type. Valid values are TOKEN for a Lambda function using a - // single authorization token submitted in a custom header, REQUEST for a Lambda - // function using incoming request parameters, and COGNITO_USER_POOLS for using - // an Amazon Cognito user pool. - Type *string `locationName:"type" type:"string" enum:"AuthorizerType"` -} - -// String returns the string representation -func (s Authorizer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Authorizer) GoString() string { - return s.String() -} - -// SetAuthType sets the AuthType field's value. -func (s *Authorizer) SetAuthType(v string) *Authorizer { - s.AuthType = &v - return s -} - -// SetAuthorizerCredentials sets the AuthorizerCredentials field's value. -func (s *Authorizer) SetAuthorizerCredentials(v string) *Authorizer { - s.AuthorizerCredentials = &v - return s -} - -// SetAuthorizerResultTtlInSeconds sets the AuthorizerResultTtlInSeconds field's value. -func (s *Authorizer) SetAuthorizerResultTtlInSeconds(v int64) *Authorizer { - s.AuthorizerResultTtlInSeconds = &v - return s -} - -// SetAuthorizerUri sets the AuthorizerUri field's value. -func (s *Authorizer) SetAuthorizerUri(v string) *Authorizer { - s.AuthorizerUri = &v - return s -} - -// SetId sets the Id field's value. -func (s *Authorizer) SetId(v string) *Authorizer { - s.Id = &v - return s -} - -// SetIdentitySource sets the IdentitySource field's value. -func (s *Authorizer) SetIdentitySource(v string) *Authorizer { - s.IdentitySource = &v - return s -} - -// SetIdentityValidationExpression sets the IdentityValidationExpression field's value. -func (s *Authorizer) SetIdentityValidationExpression(v string) *Authorizer { - s.IdentityValidationExpression = &v - return s -} - -// SetName sets the Name field's value. -func (s *Authorizer) SetName(v string) *Authorizer { - s.Name = &v - return s -} - -// SetProviderARNs sets the ProviderARNs field's value. -func (s *Authorizer) SetProviderARNs(v []*string) *Authorizer { - s.ProviderARNs = v - return s -} - -// SetType sets the Type field's value. -func (s *Authorizer) SetType(v string) *Authorizer { - s.Type = &v - return s -} - -// Represents the base path that callers of the API must provide as part of -// the URL after the domain name. -// -// A custom domain name plus a BasePathMapping specification identifies a deployed -// RestApi in a given stage of the owner Account. -// Use Custom Domain Names (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) -type BasePathMapping struct { - _ struct{} `type:"structure"` - - // The base path name that callers of the API must provide as part of the URL - // after the domain name. - BasePath *string `locationName:"basePath" type:"string"` - - // The string identifier of the associated RestApi. - RestApiId *string `locationName:"restApiId" type:"string"` - - // The name of the associated stage. - Stage *string `locationName:"stage" type:"string"` -} - -// String returns the string representation -func (s BasePathMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BasePathMapping) GoString() string { - return s.String() -} - -// SetBasePath sets the BasePath field's value. -func (s *BasePathMapping) SetBasePath(v string) *BasePathMapping { - s.BasePath = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *BasePathMapping) SetRestApiId(v string) *BasePathMapping { - s.RestApiId = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *BasePathMapping) SetStage(v string) *BasePathMapping { - s.Stage = &v - return s -} - -// Configuration settings of a canary deployment. -type CanarySettings struct { - _ struct{} `type:"structure"` - - // The ID of the canary deployment. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // The percent (0-100) of traffic diverted to a canary deployment. - PercentTraffic *float64 `locationName:"percentTraffic" type:"double"` - - // Stage variables overridden for a canary release deployment, including new - // stage variables introduced in the canary. These stage variables are represented - // as a string-to-string map between stage variable names and their values. - StageVariableOverrides map[string]*string `locationName:"stageVariableOverrides" type:"map"` - - // A Boolean flag to indicate whether the canary deployment uses the stage cache - // or not. - UseStageCache *bool `locationName:"useStageCache" type:"boolean"` -} - -// String returns the string representation -func (s CanarySettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CanarySettings) GoString() string { - return s.String() -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *CanarySettings) SetDeploymentId(v string) *CanarySettings { - s.DeploymentId = &v - return s -} - -// SetPercentTraffic sets the PercentTraffic field's value. -func (s *CanarySettings) SetPercentTraffic(v float64) *CanarySettings { - s.PercentTraffic = &v - return s -} - -// SetStageVariableOverrides sets the StageVariableOverrides field's value. -func (s *CanarySettings) SetStageVariableOverrides(v map[string]*string) *CanarySettings { - s.StageVariableOverrides = v - return s -} - -// SetUseStageCache sets the UseStageCache field's value. -func (s *CanarySettings) SetUseStageCache(v bool) *CanarySettings { - s.UseStageCache = &v - return s -} - -// Represents a client certificate used to configure client-side SSL authentication -// while sending requests to the integration endpoint. -// -// Client certificates are used to authenticate an API by the backend server. -// To authenticate an API client (or user), use IAM roles and policies, a custom -// Authorizer or an Amazon Cognito user pool. -// Use Client-Side Certificate (https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) -type ClientCertificate struct { - _ struct{} `type:"structure"` - - // The identifier of the client certificate. - ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` - - // The timestamp when the client certificate was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // The description of the client certificate. - Description *string `locationName:"description" type:"string"` - - // The timestamp when the client certificate will expire. - ExpirationDate *time.Time `locationName:"expirationDate" type:"timestamp"` - - // The PEM-encoded public key of the client certificate, which can be used to - // configure certificate authentication in the integration endpoint . - PemEncodedCertificate *string `locationName:"pemEncodedCertificate" type:"string"` -} - -// String returns the string representation -func (s ClientCertificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClientCertificate) GoString() string { - return s.String() -} - -// SetClientCertificateId sets the ClientCertificateId field's value. -func (s *ClientCertificate) SetClientCertificateId(v string) *ClientCertificate { - s.ClientCertificateId = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *ClientCertificate) SetCreatedDate(v time.Time) *ClientCertificate { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ClientCertificate) SetDescription(v string) *ClientCertificate { - s.Description = &v - return s -} - -// SetExpirationDate sets the ExpirationDate field's value. -func (s *ClientCertificate) SetExpirationDate(v time.Time) *ClientCertificate { - s.ExpirationDate = &v - return s -} - -// SetPemEncodedCertificate sets the PemEncodedCertificate field's value. -func (s *ClientCertificate) SetPemEncodedCertificate(v string) *ClientCertificate { - s.PemEncodedCertificate = &v - return s -} - -// Request to create an ApiKey resource. -type CreateApiKeyInput struct { - _ struct{} `type:"structure"` - - // An AWS Marketplace customer identifier , when integrating with the AWS SaaS - // Marketplace. - CustomerId *string `locationName:"customerId" type:"string"` - - // The description of the ApiKey. - Description *string `locationName:"description" type:"string"` - - // Specifies whether the ApiKey can be used by callers. - Enabled *bool `locationName:"enabled" type:"boolean"` - - // Specifies whether (true) or not (false) the key identifier is distinct from - // the created API key value. - GenerateDistinctId *bool `locationName:"generateDistinctId" type:"boolean"` - - // The name of the ApiKey. - Name *string `locationName:"name" type:"string"` - - // DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key. - StageKeys []*StageKey `locationName:"stageKeys" type:"list"` - - // Specifies a value of the API key. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s CreateApiKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApiKeyInput) GoString() string { - return s.String() -} - -// SetCustomerId sets the CustomerId field's value. -func (s *CreateApiKeyInput) SetCustomerId(v string) *CreateApiKeyInput { - s.CustomerId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateApiKeyInput) SetDescription(v string) *CreateApiKeyInput { - s.Description = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *CreateApiKeyInput) SetEnabled(v bool) *CreateApiKeyInput { - s.Enabled = &v - return s -} - -// SetGenerateDistinctId sets the GenerateDistinctId field's value. -func (s *CreateApiKeyInput) SetGenerateDistinctId(v bool) *CreateApiKeyInput { - s.GenerateDistinctId = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateApiKeyInput) SetName(v string) *CreateApiKeyInput { - s.Name = &v - return s -} - -// SetStageKeys sets the StageKeys field's value. -func (s *CreateApiKeyInput) SetStageKeys(v []*StageKey) *CreateApiKeyInput { - s.StageKeys = v - return s -} - -// SetValue sets the Value field's value. -func (s *CreateApiKeyInput) SetValue(v string) *CreateApiKeyInput { - s.Value = &v - return s -} - -// Request to add a new Authorizer to an existing RestApi resource. -type CreateAuthorizerInput struct { - _ struct{} `type:"structure"` - - // Optional customer-defined field, used in OpenAPI imports and exports without - // functional impact. - AuthType *string `locationName:"authType" type:"string"` - - // Specifies the required credentials as an IAM role for API Gateway to invoke - // the authorizer. To specify an IAM role for API Gateway to assume, use the - // role's Amazon Resource Name (ARN). To use resource-based permissions on the - // Lambda function, specify null. - AuthorizerCredentials *string `locationName:"authorizerCredentials" type:"string"` - - // The TTL in seconds of cached authorizer results. If it equals 0, authorization - // caching is disabled. If it is greater than 0, API Gateway will cache authorizer - // responses. If this field is not set, the default value is 300. The maximum - // value is 3600, or 1 hour. - AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` - - // Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN or - // REQUEST authorizers, this must be a well-formed Lambda function URI, for - // example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. - // In general, the URI has this form arn:aws:apigateway:{region}:lambda:path/{service_api}, - // where {region} is the same as the region hosting the Lambda function, path - // indicates that the remaining substring in the URI should be treated as the - // path to the resource, including the initial /. For Lambda functions, this - // is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. - AuthorizerUri *string `locationName:"authorizerUri" type:"string"` - - // The identity source for which authorization is requested. For a TOKEN or - // COGNITO_USER_POOLS authorizer, this is required and specifies the request - // header mapping expression for the custom header holding the authorization - // token submitted by the client. For example, if the token header name is Auth, - // the header mapping expression is method.request.header.Auth. - // For the REQUEST authorizer, this is required when authorization caching is - // enabled. The value is a comma-separated string of one or more mapping expressions - // of the specified request parameters. For example, if an Auth header, a Name - // query string parameter are defined as identity sources, this value is method.request.header.Auth, - // method.request.querystring.Name. These parameters will be used to derive - // the authorization caching key and to perform runtime validation of the REQUEST - // authorizer by verifying all of the identity-related request parameters are - // present, not null and non-empty. Only when this is true does the authorizer - // invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized - // response without calling the Lambda function. The valid value is a string - // of comma-separated mapping expressions of the specified request parameters. - // When the authorization caching is not enabled, this property is optional. - IdentitySource *string `locationName:"identitySource" type:"string"` - - // A validation expression for the incoming identity token. For TOKEN authorizers, - // this value is a regular expression. API Gateway will match the aud field - // of the incoming token from the client against the specified regular expression. - // It will invoke the authorizer's Lambda function when there is a match. Otherwise, - // it will return a 401 Unauthorized response without calling the Lambda function. - // The validation expression does not apply to the REQUEST authorizer. - IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` - - // [Required] The name of the authorizer. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. - // Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. - // For a TOKEN or REQUEST authorizer, this is not defined. - ProviderARNs []*string `locationName:"providerARNs" type:"list"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] The authorizer type. Valid values are TOKEN for a Lambda function - // using a single authorization token submitted in a custom header, REQUEST - // for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS - // for using an Amazon Cognito user pool. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"AuthorizerType"` -} - -// String returns the string representation -func (s CreateAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAuthorizerInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthType sets the AuthType field's value. -func (s *CreateAuthorizerInput) SetAuthType(v string) *CreateAuthorizerInput { - s.AuthType = &v - return s -} - -// SetAuthorizerCredentials sets the AuthorizerCredentials field's value. -func (s *CreateAuthorizerInput) SetAuthorizerCredentials(v string) *CreateAuthorizerInput { - s.AuthorizerCredentials = &v - return s -} - -// SetAuthorizerResultTtlInSeconds sets the AuthorizerResultTtlInSeconds field's value. -func (s *CreateAuthorizerInput) SetAuthorizerResultTtlInSeconds(v int64) *CreateAuthorizerInput { - s.AuthorizerResultTtlInSeconds = &v - return s -} - -// SetAuthorizerUri sets the AuthorizerUri field's value. -func (s *CreateAuthorizerInput) SetAuthorizerUri(v string) *CreateAuthorizerInput { - s.AuthorizerUri = &v - return s -} - -// SetIdentitySource sets the IdentitySource field's value. -func (s *CreateAuthorizerInput) SetIdentitySource(v string) *CreateAuthorizerInput { - s.IdentitySource = &v - return s -} - -// SetIdentityValidationExpression sets the IdentityValidationExpression field's value. -func (s *CreateAuthorizerInput) SetIdentityValidationExpression(v string) *CreateAuthorizerInput { - s.IdentityValidationExpression = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateAuthorizerInput) SetName(v string) *CreateAuthorizerInput { - s.Name = &v - return s -} - -// SetProviderARNs sets the ProviderARNs field's value. -func (s *CreateAuthorizerInput) SetProviderARNs(v []*string) *CreateAuthorizerInput { - s.ProviderARNs = v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *CreateAuthorizerInput) SetRestApiId(v string) *CreateAuthorizerInput { - s.RestApiId = &v - return s -} - -// SetType sets the Type field's value. -func (s *CreateAuthorizerInput) SetType(v string) *CreateAuthorizerInput { - s.Type = &v - return s -} - -// Requests API Gateway to create a new BasePathMapping resource. -type CreateBasePathMappingInput struct { - _ struct{} `type:"structure"` - - // The base path name that callers of the API must provide as part of the URL - // after the domain name. This value must be unique for all of the mappings - // across a single API. Leave this blank if you do not want callers to specify - // a base path name after the domain name. - BasePath *string `locationName:"basePath" type:"string"` - - // [Required] The domain name of the BasePathMapping resource to create. - // - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `locationName:"restApiId" type:"string" required:"true"` - - // The name of the API's stage that you want to use for this mapping. Leave - // this blank if you do not want callers to explicitly specify the stage name - // after any base path name. - Stage *string `locationName:"stage" type:"string"` -} - -// String returns the string representation -func (s CreateBasePathMappingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBasePathMappingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateBasePathMappingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateBasePathMappingInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBasePath sets the BasePath field's value. -func (s *CreateBasePathMappingInput) SetBasePath(v string) *CreateBasePathMappingInput { - s.BasePath = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *CreateBasePathMappingInput) SetDomainName(v string) *CreateBasePathMappingInput { - s.DomainName = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *CreateBasePathMappingInput) SetRestApiId(v string) *CreateBasePathMappingInput { - s.RestApiId = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *CreateBasePathMappingInput) SetStage(v string) *CreateBasePathMappingInput { - s.Stage = &v - return s -} - -// Requests API Gateway to create a Deployment resource. -type CreateDeploymentInput struct { - _ struct{} `type:"structure"` - - // Enables a cache cluster for the Stage resource specified in the input. - CacheClusterEnabled *bool `locationName:"cacheClusterEnabled" type:"boolean"` - - // Specifies the cache cluster size for the Stage resource specified in the - // input, if a cache cluster is enabled. - CacheClusterSize *string `locationName:"cacheClusterSize" type:"string" enum:"CacheClusterSize"` - - // The input configuration for the canary deployment when the deployment is - // a canary release deployment. - CanarySettings *DeploymentCanarySettings `locationName:"canarySettings" type:"structure"` - - // The description for the Deployment resource to create. - Description *string `locationName:"description" type:"string"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // The description of the Stage resource for the Deployment resource to create. - StageDescription *string `locationName:"stageDescription" type:"string"` - - // The name of the Stage resource for the Deployment resource to create. - StageName *string `locationName:"stageName" type:"string"` - - // Specifies whether active tracing with X-ray is enabled for the Stage. - TracingEnabled *bool `locationName:"tracingEnabled" type:"boolean"` - - // A map that defines the stage variables for the Stage resource that is associated - // with the new deployment. Variable names can have alphanumeric and underscore - // characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. - Variables map[string]*string `locationName:"variables" type:"map"` -} - -// 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.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheClusterEnabled sets the CacheClusterEnabled field's value. -func (s *CreateDeploymentInput) SetCacheClusterEnabled(v bool) *CreateDeploymentInput { - s.CacheClusterEnabled = &v - return s -} - -// SetCacheClusterSize sets the CacheClusterSize field's value. -func (s *CreateDeploymentInput) SetCacheClusterSize(v string) *CreateDeploymentInput { - s.CacheClusterSize = &v - return s -} - -// SetCanarySettings sets the CanarySettings field's value. -func (s *CreateDeploymentInput) SetCanarySettings(v *DeploymentCanarySettings) *CreateDeploymentInput { - s.CanarySettings = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateDeploymentInput) SetDescription(v string) *CreateDeploymentInput { - s.Description = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *CreateDeploymentInput) SetRestApiId(v string) *CreateDeploymentInput { - s.RestApiId = &v - return s -} - -// SetStageDescription sets the StageDescription field's value. -func (s *CreateDeploymentInput) SetStageDescription(v string) *CreateDeploymentInput { - s.StageDescription = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *CreateDeploymentInput) SetStageName(v string) *CreateDeploymentInput { - s.StageName = &v - return s -} - -// SetTracingEnabled sets the TracingEnabled field's value. -func (s *CreateDeploymentInput) SetTracingEnabled(v bool) *CreateDeploymentInput { - s.TracingEnabled = &v - return s -} - -// SetVariables sets the Variables field's value. -func (s *CreateDeploymentInput) SetVariables(v map[string]*string) *CreateDeploymentInput { - s.Variables = v - return s -} - -// Creates a new documentation part of a given API. -type CreateDocumentationPartInput struct { - _ struct{} `type:"structure"` - - // [Required] The location of the targeted API entity of the to-be-created documentation - // part. - // - // Location is a required field - Location *DocumentationPartLocation `locationName:"location" type:"structure" required:"true"` - - // [Required] The new documentation content map of the targeted API entity. - // Enclosed key-value pairs are API-specific, but only OpenAPI-compliant key-value - // pairs can be exported and, hence, published. - // - // Properties is a required field - Properties *string `locationName:"properties" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateDocumentationPartInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDocumentationPartInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDocumentationPartInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDocumentationPartInput"} - if s.Location == nil { - invalidParams.Add(request.NewErrParamRequired("Location")) - } - if s.Properties == nil { - invalidParams.Add(request.NewErrParamRequired("Properties")) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.Location != nil { - if err := s.Location.Validate(); err != nil { - invalidParams.AddNested("Location", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLocation sets the Location field's value. -func (s *CreateDocumentationPartInput) SetLocation(v *DocumentationPartLocation) *CreateDocumentationPartInput { - s.Location = v - return s -} - -// SetProperties sets the Properties field's value. -func (s *CreateDocumentationPartInput) SetProperties(v string) *CreateDocumentationPartInput { - s.Properties = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *CreateDocumentationPartInput) SetRestApiId(v string) *CreateDocumentationPartInput { - s.RestApiId = &v - return s -} - -// Creates a new documentation version of a given API. -type CreateDocumentationVersionInput struct { - _ struct{} `type:"structure"` - - // A description about the new documentation snapshot. - Description *string `locationName:"description" type:"string"` - - // [Required] The version identifier of the new snapshot. - // - // DocumentationVersion is a required field - DocumentationVersion *string `locationName:"documentationVersion" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // The stage name to be associated with the new documentation snapshot. - StageName *string `locationName:"stageName" type:"string"` -} - -// String returns the string representation -func (s CreateDocumentationVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDocumentationVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDocumentationVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDocumentationVersionInput"} - if s.DocumentationVersion == nil { - invalidParams.Add(request.NewErrParamRequired("DocumentationVersion")) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateDocumentationVersionInput) SetDescription(v string) *CreateDocumentationVersionInput { - s.Description = &v - return s -} - -// SetDocumentationVersion sets the DocumentationVersion field's value. -func (s *CreateDocumentationVersionInput) SetDocumentationVersion(v string) *CreateDocumentationVersionInput { - s.DocumentationVersion = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *CreateDocumentationVersionInput) SetRestApiId(v string) *CreateDocumentationVersionInput { - s.RestApiId = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *CreateDocumentationVersionInput) SetStageName(v string) *CreateDocumentationVersionInput { - s.StageName = &v - return s -} - -// A request to create a new domain name. -type CreateDomainNameInput struct { - _ struct{} `type:"structure"` - - // The reference to an AWS-managed certificate that will be used by edge-optimized - // endpoint for this domain name. AWS Certificate Manager is the only supported - // source. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // [Deprecated] The body of the server certificate that will be used by edge-optimized - // endpoint for this domain name provided by your certificate authority. - CertificateBody *string `locationName:"certificateBody" type:"string"` - - // [Deprecated] The intermediate certificates and optionally the root certificate, - // one after the other without any blank lines, used by an edge-optimized endpoint - // for this domain name. If you include the root certificate, your certificate - // chain must start with intermediate certificates and end with the root certificate. - // Use the intermediate certificates that were provided by your certificate - // authority. Do not include any intermediaries that are not in the chain of - // trust path. - CertificateChain *string `locationName:"certificateChain" type:"string"` - - // The user-friendly name of the certificate that will be used by edge-optimized - // endpoint for this domain name. - CertificateName *string `locationName:"certificateName" type:"string"` - - // [Deprecated] Your edge-optimized endpoint's domain name certificate's private - // key. - CertificatePrivateKey *string `locationName:"certificatePrivateKey" type:"string"` - - // [Required] The name of the DomainName resource. - // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` - - // The endpoint configuration of this DomainName showing the endpoint types - // of the domain name. - EndpointConfiguration *EndpointConfiguration `locationName:"endpointConfiguration" type:"structure"` - - // The reference to an AWS-managed certificate that will be used by regional - // endpoint for this domain name. AWS Certificate Manager is the only supported - // source. - RegionalCertificateArn *string `locationName:"regionalCertificateArn" type:"string"` - - // The user-friendly name of the certificate that will be used by regional endpoint - // for this domain name. - RegionalCertificateName *string `locationName:"regionalCertificateName" type:"string"` -} - -// String returns the string representation -func (s CreateDomainNameInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDomainNameInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDomainNameInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDomainNameInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *CreateDomainNameInput) SetCertificateArn(v string) *CreateDomainNameInput { - s.CertificateArn = &v - return s -} - -// SetCertificateBody sets the CertificateBody field's value. -func (s *CreateDomainNameInput) SetCertificateBody(v string) *CreateDomainNameInput { - s.CertificateBody = &v - return s -} - -// SetCertificateChain sets the CertificateChain field's value. -func (s *CreateDomainNameInput) SetCertificateChain(v string) *CreateDomainNameInput { - s.CertificateChain = &v - return s -} - -// SetCertificateName sets the CertificateName field's value. -func (s *CreateDomainNameInput) SetCertificateName(v string) *CreateDomainNameInput { - s.CertificateName = &v - return s -} - -// SetCertificatePrivateKey sets the CertificatePrivateKey field's value. -func (s *CreateDomainNameInput) SetCertificatePrivateKey(v string) *CreateDomainNameInput { - s.CertificatePrivateKey = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *CreateDomainNameInput) SetDomainName(v string) *CreateDomainNameInput { - s.DomainName = &v - return s -} - -// SetEndpointConfiguration sets the EndpointConfiguration field's value. -func (s *CreateDomainNameInput) SetEndpointConfiguration(v *EndpointConfiguration) *CreateDomainNameInput { - s.EndpointConfiguration = v - return s -} - -// SetRegionalCertificateArn sets the RegionalCertificateArn field's value. -func (s *CreateDomainNameInput) SetRegionalCertificateArn(v string) *CreateDomainNameInput { - s.RegionalCertificateArn = &v - return s -} - -// SetRegionalCertificateName sets the RegionalCertificateName field's value. -func (s *CreateDomainNameInput) SetRegionalCertificateName(v string) *CreateDomainNameInput { - s.RegionalCertificateName = &v - return s -} - -// Request to add a new Model to an existing RestApi resource. -type CreateModelInput struct { - _ struct{} `type:"structure"` - - // [Required] The content-type for the model. - // - // ContentType is a required field - ContentType *string `locationName:"contentType" type:"string" required:"true"` - - // The description of the model. - Description *string `locationName:"description" type:"string"` - - // [Required] The name of the model. Must be alphanumeric. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // [Required] The RestApi identifier under which the Model will be created. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // The schema for the model. For application/json models, this should be JSON - // schema draft 4 (https://tools.ietf.org/html/draft-zyp-json-schema-04) model. - Schema *string `locationName:"schema" type:"string"` -} - -// String returns the string representation -func (s CreateModelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateModelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateModelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateModelInput"} - if s.ContentType == nil { - invalidParams.Add(request.NewErrParamRequired("ContentType")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContentType sets the ContentType field's value. -func (s *CreateModelInput) SetContentType(v string) *CreateModelInput { - s.ContentType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateModelInput) SetDescription(v string) *CreateModelInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateModelInput) SetName(v string) *CreateModelInput { - s.Name = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *CreateModelInput) SetRestApiId(v string) *CreateModelInput { - s.RestApiId = &v - return s -} - -// SetSchema sets the Schema field's value. -func (s *CreateModelInput) SetSchema(v string) *CreateModelInput { - s.Schema = &v - return s -} - -// Creates a RequestValidator of a given RestApi. -type CreateRequestValidatorInput struct { - _ struct{} `type:"structure"` - - // The name of the to-be-created RequestValidator. - Name *string `locationName:"name" type:"string"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // A Boolean flag to indicate whether to validate request body according to - // the configured model schema for the method (true) or not (false). - ValidateRequestBody *bool `locationName:"validateRequestBody" type:"boolean"` - - // A Boolean flag to indicate whether to validate request parameters, true, - // or not false. - ValidateRequestParameters *bool `locationName:"validateRequestParameters" type:"boolean"` -} - -// String returns the string representation -func (s CreateRequestValidatorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRequestValidatorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRequestValidatorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRequestValidatorInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *CreateRequestValidatorInput) SetName(v string) *CreateRequestValidatorInput { - s.Name = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *CreateRequestValidatorInput) SetRestApiId(v string) *CreateRequestValidatorInput { - s.RestApiId = &v - return s -} - -// SetValidateRequestBody sets the ValidateRequestBody field's value. -func (s *CreateRequestValidatorInput) SetValidateRequestBody(v bool) *CreateRequestValidatorInput { - s.ValidateRequestBody = &v - return s -} - -// SetValidateRequestParameters sets the ValidateRequestParameters field's value. -func (s *CreateRequestValidatorInput) SetValidateRequestParameters(v bool) *CreateRequestValidatorInput { - s.ValidateRequestParameters = &v - return s -} - -// Requests API Gateway to create a Resource resource. -type CreateResourceInput struct { - _ struct{} `type:"structure"` - - // [Required] The parent resource's identifier. - // - // ParentId is a required field - ParentId *string `location:"uri" locationName:"parent_id" type:"string" required:"true"` - - // The last path segment for this resource. - // - // PathPart is a required field - PathPart *string `locationName:"pathPart" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateResourceInput"} - if s.ParentId == nil { - invalidParams.Add(request.NewErrParamRequired("ParentId")) - } - if s.ParentId != nil && len(*s.ParentId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ParentId", 1)) - } - if s.PathPart == nil { - invalidParams.Add(request.NewErrParamRequired("PathPart")) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParentId sets the ParentId field's value. -func (s *CreateResourceInput) SetParentId(v string) *CreateResourceInput { - s.ParentId = &v - return s -} - -// SetPathPart sets the PathPart field's value. -func (s *CreateResourceInput) SetPathPart(v string) *CreateResourceInput { - s.PathPart = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *CreateResourceInput) SetRestApiId(v string) *CreateResourceInput { - s.RestApiId = &v - return s -} - -// The POST Request to add a new RestApi resource to your collection. -type CreateRestApiInput struct { - _ struct{} `type:"structure"` - - // The source of the API key for metering requests according to a usage plan. - // Valid values are: HEADER to read the API key from the X-API-Key header of - // a request. - // AUTHORIZER to read the API key from the UsageIdentifierKey from a custom - // authorizer. - ApiKeySource *string `locationName:"apiKeySource" type:"string" enum:"ApiKeySourceType"` - - // The list of binary media types supported by the RestApi. By default, the - // RestApi supports only UTF-8-encoded text payloads. - BinaryMediaTypes []*string `locationName:"binaryMediaTypes" type:"list"` - - // The ID of the RestApi that you want to clone from. - CloneFrom *string `locationName:"cloneFrom" type:"string"` - - // The description of the RestApi. - Description *string `locationName:"description" type:"string"` - - // The endpoint configuration of this RestApi showing the endpoint types of - // the API. - EndpointConfiguration *EndpointConfiguration `locationName:"endpointConfiguration" type:"structure"` - - // A nullable integer that is used to enable compression (with non-negative - // between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with - // a null value) on an API. When compression is enabled, compression or decompression - // is not applied on the payload if the payload size is smaller than this value. - // Setting it to zero allows compression for any payload size. - MinimumCompressionSize *int64 `locationName:"minimumCompressionSize" type:"integer"` - - // [Required] The name of the RestApi. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // A stringified JSON policy document that applies to this RestApi regardless - // of the caller and Method - Policy *string `locationName:"policy" type:"string"` - - // A version identifier for the API. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s CreateRestApiInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRestApiInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRestApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRestApiInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiKeySource sets the ApiKeySource field's value. -func (s *CreateRestApiInput) SetApiKeySource(v string) *CreateRestApiInput { - s.ApiKeySource = &v - return s -} - -// SetBinaryMediaTypes sets the BinaryMediaTypes field's value. -func (s *CreateRestApiInput) SetBinaryMediaTypes(v []*string) *CreateRestApiInput { - s.BinaryMediaTypes = v - return s -} - -// SetCloneFrom sets the CloneFrom field's value. -func (s *CreateRestApiInput) SetCloneFrom(v string) *CreateRestApiInput { - s.CloneFrom = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateRestApiInput) SetDescription(v string) *CreateRestApiInput { - s.Description = &v - return s -} - -// SetEndpointConfiguration sets the EndpointConfiguration field's value. -func (s *CreateRestApiInput) SetEndpointConfiguration(v *EndpointConfiguration) *CreateRestApiInput { - s.EndpointConfiguration = v - return s -} - -// SetMinimumCompressionSize sets the MinimumCompressionSize field's value. -func (s *CreateRestApiInput) SetMinimumCompressionSize(v int64) *CreateRestApiInput { - s.MinimumCompressionSize = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateRestApiInput) SetName(v string) *CreateRestApiInput { - s.Name = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *CreateRestApiInput) SetPolicy(v string) *CreateRestApiInput { - s.Policy = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *CreateRestApiInput) SetVersion(v string) *CreateRestApiInput { - s.Version = &v - return s -} - -// Requests API Gateway to create a Stage resource. -type CreateStageInput struct { - _ struct{} `type:"structure"` - - // Whether cache clustering is enabled for the stage. - CacheClusterEnabled *bool `locationName:"cacheClusterEnabled" type:"boolean"` - - // The stage's cache cluster size. - CacheClusterSize *string `locationName:"cacheClusterSize" type:"string" enum:"CacheClusterSize"` - - // The canary deployment settings of this stage. - CanarySettings *CanarySettings `locationName:"canarySettings" type:"structure"` - - // [Required] The identifier of the Deployment resource for the Stage resource. - // - // DeploymentId is a required field - DeploymentId *string `locationName:"deploymentId" type:"string" required:"true"` - - // The description of the Stage resource. - Description *string `locationName:"description" type:"string"` - - // The version of the associated API documentation. - DocumentationVersion *string `locationName:"documentationVersion" type:"string"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] The name for the Stage resource. - // - // StageName is a required field - StageName *string `locationName:"stageName" type:"string" required:"true"` - - // The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. - // The tag key can be up to 128 characters and must not start with aws:. The - // tag value can be up to 256 characters. - Tags map[string]*string `locationName:"tags" type:"map"` - - // Specifies whether active tracing with X-ray is enabled for the Stage. - TracingEnabled *bool `locationName:"tracingEnabled" type:"boolean"` - - // A map that defines the stage variables for the new Stage resource. Variable - // names can have alphanumeric and underscore characters, and the values must - // match [A-Za-z0-9-._~:/?#&=,]+. - Variables map[string]*string `locationName:"variables" type:"map"` -} - -// String returns the string representation -func (s CreateStageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStageInput"} - if s.DeploymentId == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentId")) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheClusterEnabled sets the CacheClusterEnabled field's value. -func (s *CreateStageInput) SetCacheClusterEnabled(v bool) *CreateStageInput { - s.CacheClusterEnabled = &v - return s -} - -// SetCacheClusterSize sets the CacheClusterSize field's value. -func (s *CreateStageInput) SetCacheClusterSize(v string) *CreateStageInput { - s.CacheClusterSize = &v - return s -} - -// SetCanarySettings sets the CanarySettings field's value. -func (s *CreateStageInput) SetCanarySettings(v *CanarySettings) *CreateStageInput { - s.CanarySettings = v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *CreateStageInput) SetDeploymentId(v string) *CreateStageInput { - s.DeploymentId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateStageInput) SetDescription(v string) *CreateStageInput { - s.Description = &v - return s -} - -// SetDocumentationVersion sets the DocumentationVersion field's value. -func (s *CreateStageInput) SetDocumentationVersion(v string) *CreateStageInput { - s.DocumentationVersion = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *CreateStageInput) SetRestApiId(v string) *CreateStageInput { - s.RestApiId = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *CreateStageInput) SetStageName(v string) *CreateStageInput { - s.StageName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateStageInput) SetTags(v map[string]*string) *CreateStageInput { - s.Tags = v - return s -} - -// SetTracingEnabled sets the TracingEnabled field's value. -func (s *CreateStageInput) SetTracingEnabled(v bool) *CreateStageInput { - s.TracingEnabled = &v - return s -} - -// SetVariables sets the Variables field's value. -func (s *CreateStageInput) SetVariables(v map[string]*string) *CreateStageInput { - s.Variables = v - return s -} - -// The POST request to create a usage plan with the name, description, throttle -// limits and quota limits, as well as the associated API stages, specified -// in the payload. -type CreateUsagePlanInput struct { - _ struct{} `type:"structure"` - - // The associated API stages of the usage plan. - ApiStages []*ApiStage `locationName:"apiStages" type:"list"` - - // The description of the usage plan. - Description *string `locationName:"description" type:"string"` - - // [Required] The name of the usage plan. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The quota of the usage plan. - Quota *QuotaSettings `locationName:"quota" type:"structure"` - - // The throttling limits of the usage plan. - Throttle *ThrottleSettings `locationName:"throttle" type:"structure"` -} - -// String returns the string representation -func (s CreateUsagePlanInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUsagePlanInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateUsagePlanInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateUsagePlanInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiStages sets the ApiStages field's value. -func (s *CreateUsagePlanInput) SetApiStages(v []*ApiStage) *CreateUsagePlanInput { - s.ApiStages = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateUsagePlanInput) SetDescription(v string) *CreateUsagePlanInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateUsagePlanInput) SetName(v string) *CreateUsagePlanInput { - s.Name = &v - return s -} - -// SetQuota sets the Quota field's value. -func (s *CreateUsagePlanInput) SetQuota(v *QuotaSettings) *CreateUsagePlanInput { - s.Quota = v - return s -} - -// SetThrottle sets the Throttle field's value. -func (s *CreateUsagePlanInput) SetThrottle(v *ThrottleSettings) *CreateUsagePlanInput { - s.Throttle = v - return s -} - -// The POST request to create a usage plan key for adding an existing API key -// to a usage plan. -type CreateUsagePlanKeyInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of a UsagePlanKey resource for a plan customer. - // - // KeyId is a required field - KeyId *string `locationName:"keyId" type:"string" required:"true"` - - // [Required] The type of a UsagePlanKey resource for a plan customer. - // - // KeyType is a required field - KeyType *string `locationName:"keyType" type:"string" required:"true"` - - // [Required] The Id of the UsagePlan resource representing the usage plan containing - // the to-be-created UsagePlanKey resource representing a plan customer. - // - // UsagePlanId is a required field - UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateUsagePlanKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUsagePlanKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateUsagePlanKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateUsagePlanKeyInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyType == nil { - invalidParams.Add(request.NewErrParamRequired("KeyType")) - } - if s.UsagePlanId == nil { - invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) - } - if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *CreateUsagePlanKeyInput) SetKeyId(v string) *CreateUsagePlanKeyInput { - s.KeyId = &v - return s -} - -// SetKeyType sets the KeyType field's value. -func (s *CreateUsagePlanKeyInput) SetKeyType(v string) *CreateUsagePlanKeyInput { - s.KeyType = &v - return s -} - -// SetUsagePlanId sets the UsagePlanId field's value. -func (s *CreateUsagePlanKeyInput) SetUsagePlanId(v string) *CreateUsagePlanKeyInput { - s.UsagePlanId = &v - return s -} - -// Creates a VPC link, under the caller's account in a selected region, in an -// asynchronous operation that typically takes 2-4 minutes to complete and become -// operational. The caller must have permissions to create and update VPC Endpoint -// services. -type CreateVpcLinkInput struct { - _ struct{} `type:"structure"` - - // The description of the VPC link. - Description *string `locationName:"description" type:"string"` - - // [Required] The name used to label and identify the VPC link. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // [Required] The ARNs of network load balancers of the VPC targeted by the - // VPC link. The network load balancers must be owned by the same AWS account - // of the API owner. - // - // TargetArns is a required field - TargetArns []*string `locationName:"targetArns" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateVpcLinkInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcLinkInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpcLinkInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpcLinkInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.TargetArns == nil { - invalidParams.Add(request.NewErrParamRequired("TargetArns")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateVpcLinkInput) SetDescription(v string) *CreateVpcLinkInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateVpcLinkInput) SetName(v string) *CreateVpcLinkInput { - s.Name = &v - return s -} - -// SetTargetArns sets the TargetArns field's value. -func (s *CreateVpcLinkInput) SetTargetArns(v []*string) *CreateVpcLinkInput { - s.TargetArns = v - return s -} - -// A request to delete the ApiKey resource. -type DeleteApiKeyInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the ApiKey resource to be deleted. - // - // ApiKey is a required field - ApiKey *string `location:"uri" locationName:"api_Key" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteApiKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApiKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApiKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApiKeyInput"} - if s.ApiKey == nil { - invalidParams.Add(request.NewErrParamRequired("ApiKey")) - } - if s.ApiKey != nil && len(*s.ApiKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiKey", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiKey sets the ApiKey field's value. -func (s *DeleteApiKeyInput) SetApiKey(v string) *DeleteApiKeyInput { - s.ApiKey = &v - return s -} - -type DeleteApiKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteApiKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApiKeyOutput) GoString() string { - return s.String() -} - -// Request to delete an existing Authorizer resource. -type DeleteAuthorizerInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the Authorizer resource. - // - // AuthorizerId is a required field - AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAuthorizerInput"} - if s.AuthorizerId == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) - } - if s.AuthorizerId != nil && len(*s.AuthorizerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizerId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *DeleteAuthorizerInput) SetAuthorizerId(v string) *DeleteAuthorizerInput { - s.AuthorizerId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *DeleteAuthorizerInput) SetRestApiId(v string) *DeleteAuthorizerInput { - s.RestApiId = &v - return s -} - -type DeleteAuthorizerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAuthorizerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAuthorizerOutput) GoString() string { - return s.String() -} - -// A request to delete the BasePathMapping resource. -type DeleteBasePathMappingInput struct { - _ struct{} `type:"structure"` - - // [Required] The base path name of the BasePathMapping resource to delete. - // - // BasePath is a required field - BasePath *string `location:"uri" locationName:"base_path" type:"string" required:"true"` - - // [Required] The domain name of the BasePathMapping resource to delete. - // - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBasePathMappingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBasePathMappingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBasePathMappingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBasePathMappingInput"} - if s.BasePath == nil { - invalidParams.Add(request.NewErrParamRequired("BasePath")) - } - if s.BasePath != nil && len(*s.BasePath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BasePath", 1)) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBasePath sets the BasePath field's value. -func (s *DeleteBasePathMappingInput) SetBasePath(v string) *DeleteBasePathMappingInput { - s.BasePath = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteBasePathMappingInput) SetDomainName(v string) *DeleteBasePathMappingInput { - s.DomainName = &v - return s -} - -type DeleteBasePathMappingOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteBasePathMappingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBasePathMappingOutput) GoString() string { - return s.String() -} - -// A request to delete the ClientCertificate resource. -type DeleteClientCertificateInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the ClientCertificate resource to be deleted. - // - // ClientCertificateId is a required field - ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteClientCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClientCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClientCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClientCertificateInput"} - if s.ClientCertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientCertificateId")) - } - if s.ClientCertificateId != nil && len(*s.ClientCertificateId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientCertificateId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientCertificateId sets the ClientCertificateId field's value. -func (s *DeleteClientCertificateInput) SetClientCertificateId(v string) *DeleteClientCertificateInput { - s.ClientCertificateId = &v - return s -} - -type DeleteClientCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteClientCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClientCertificateOutput) GoString() string { - return s.String() -} - -// Requests API Gateway to delete a Deployment resource. -type DeleteDeploymentInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the Deployment resource to delete. - // - // DeploymentId is a required field - DeploymentId *string `location:"uri" locationName:"deployment_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDeploymentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDeploymentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDeploymentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDeploymentInput"} - 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.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *DeleteDeploymentInput) SetDeploymentId(v string) *DeleteDeploymentInput { - s.DeploymentId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *DeleteDeploymentInput) SetRestApiId(v string) *DeleteDeploymentInput { - s.RestApiId = &v - return s -} - -type DeleteDeploymentOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDeploymentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDeploymentOutput) GoString() string { - return s.String() -} - -// Deletes an existing documentation part of an API. -type DeleteDocumentationPartInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the to-be-deleted documentation part. - // - // DocumentationPartId is a required field - DocumentationPartId *string `location:"uri" locationName:"part_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDocumentationPartInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDocumentationPartInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDocumentationPartInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDocumentationPartInput"} - if s.DocumentationPartId == nil { - invalidParams.Add(request.NewErrParamRequired("DocumentationPartId")) - } - if s.DocumentationPartId != nil && len(*s.DocumentationPartId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DocumentationPartId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDocumentationPartId sets the DocumentationPartId field's value. -func (s *DeleteDocumentationPartInput) SetDocumentationPartId(v string) *DeleteDocumentationPartInput { - s.DocumentationPartId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *DeleteDocumentationPartInput) SetRestApiId(v string) *DeleteDocumentationPartInput { - s.RestApiId = &v - return s -} - -type DeleteDocumentationPartOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDocumentationPartOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDocumentationPartOutput) GoString() string { - return s.String() -} - -// Deletes an existing documentation version of an API. -type DeleteDocumentationVersionInput struct { - _ struct{} `type:"structure"` - - // [Required] The version identifier of a to-be-deleted documentation snapshot. - // - // DocumentationVersion is a required field - DocumentationVersion *string `location:"uri" locationName:"doc_version" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDocumentationVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDocumentationVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDocumentationVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDocumentationVersionInput"} - if s.DocumentationVersion == nil { - invalidParams.Add(request.NewErrParamRequired("DocumentationVersion")) - } - if s.DocumentationVersion != nil && len(*s.DocumentationVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DocumentationVersion", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDocumentationVersion sets the DocumentationVersion field's value. -func (s *DeleteDocumentationVersionInput) SetDocumentationVersion(v string) *DeleteDocumentationVersionInput { - s.DocumentationVersion = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *DeleteDocumentationVersionInput) SetRestApiId(v string) *DeleteDocumentationVersionInput { - s.RestApiId = &v - return s -} - -type DeleteDocumentationVersionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDocumentationVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDocumentationVersionOutput) GoString() string { - return s.String() -} - -// A request to delete the DomainName resource. -type DeleteDomainNameInput struct { - _ struct{} `type:"structure"` - - // [Required] The name of the DomainName resource to be deleted. - // - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDomainNameInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDomainNameInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDomainNameInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDomainNameInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteDomainNameInput) SetDomainName(v string) *DeleteDomainNameInput { - s.DomainName = &v - return s -} - -type DeleteDomainNameOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDomainNameOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDomainNameOutput) GoString() string { - return s.String() -} - -// Clears any customization of a GatewayResponse of a specified response type -// on the given RestApi and resets it with the default settings. -type DeleteGatewayResponseInput struct { - _ struct{} `type:"structure"` - - // [Required] The response type of the associated GatewayResponse. Valid values - // are ACCESS_DENIED - // API_CONFIGURATION_ERROR - // AUTHORIZER_FAILURE - // AUTHORIZER_CONFIGURATION_ERROR - // BAD_REQUEST_PARAMETERS - // BAD_REQUEST_BODY - // DEFAULT_4XX - // DEFAULT_5XX - // EXPIRED_TOKEN - // INVALID_SIGNATURE - // INTEGRATION_FAILURE - // INTEGRATION_TIMEOUT - // INVALID_API_KEY - // MISSING_AUTHENTICATION_TOKEN - // QUOTA_EXCEEDED - // REQUEST_TOO_LARGE - // RESOURCE_NOT_FOUND - // THROTTLED - // UNAUTHORIZED - // UNSUPPORTED_MEDIA_TYPE - // - // ResponseType is a required field - ResponseType *string `location:"uri" locationName:"response_type" type:"string" required:"true" enum:"GatewayResponseType"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteGatewayResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGatewayResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteGatewayResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteGatewayResponseInput"} - if s.ResponseType == nil { - invalidParams.Add(request.NewErrParamRequired("ResponseType")) - } - if s.ResponseType != nil && len(*s.ResponseType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResponseType", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResponseType sets the ResponseType field's value. -func (s *DeleteGatewayResponseInput) SetResponseType(v string) *DeleteGatewayResponseInput { - s.ResponseType = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *DeleteGatewayResponseInput) SetRestApiId(v string) *DeleteGatewayResponseInput { - s.RestApiId = &v - return s -} - -type DeleteGatewayResponseOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteGatewayResponseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGatewayResponseOutput) GoString() string { - return s.String() -} - -// Represents a delete integration request. -type DeleteIntegrationInput struct { - _ struct{} `type:"structure"` - - // [Required] Specifies a delete integration request's HTTP method. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // [Required] Specifies a delete integration request's resource identifier. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteIntegrationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIntegrationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIntegrationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIntegrationInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *DeleteIntegrationInput) SetHttpMethod(v string) *DeleteIntegrationInput { - s.HttpMethod = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *DeleteIntegrationInput) SetResourceId(v string) *DeleteIntegrationInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *DeleteIntegrationInput) SetRestApiId(v string) *DeleteIntegrationInput { - s.RestApiId = &v - return s -} - -type DeleteIntegrationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteIntegrationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIntegrationOutput) GoString() string { - return s.String() -} - -// Represents a delete integration response request. -type DeleteIntegrationResponseInput struct { - _ struct{} `type:"structure"` - - // [Required] Specifies a delete integration response request's HTTP method. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // [Required] Specifies a delete integration response request's resource identifier. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] Specifies a delete integration response request's status code. - // - // StatusCode is a required field - StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteIntegrationResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIntegrationResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIntegrationResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIntegrationResponseInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StatusCode == nil { - invalidParams.Add(request.NewErrParamRequired("StatusCode")) - } - if s.StatusCode != nil && len(*s.StatusCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *DeleteIntegrationResponseInput) SetHttpMethod(v string) *DeleteIntegrationResponseInput { - s.HttpMethod = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *DeleteIntegrationResponseInput) SetResourceId(v string) *DeleteIntegrationResponseInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *DeleteIntegrationResponseInput) SetRestApiId(v string) *DeleteIntegrationResponseInput { - s.RestApiId = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *DeleteIntegrationResponseInput) SetStatusCode(v string) *DeleteIntegrationResponseInput { - s.StatusCode = &v - return s -} - -type DeleteIntegrationResponseOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteIntegrationResponseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIntegrationResponseOutput) GoString() string { - return s.String() -} - -// Request to delete an existing Method resource. -type DeleteMethodInput struct { - _ struct{} `type:"structure"` - - // [Required] The HTTP verb of the Method resource. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // [Required] The Resource identifier for the Method resource. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteMethodInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMethodInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMethodInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMethodInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *DeleteMethodInput) SetHttpMethod(v string) *DeleteMethodInput { - s.HttpMethod = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *DeleteMethodInput) SetResourceId(v string) *DeleteMethodInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *DeleteMethodInput) SetRestApiId(v string) *DeleteMethodInput { - s.RestApiId = &v - return s -} - -type DeleteMethodOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteMethodOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMethodOutput) GoString() string { - return s.String() -} - -// A request to delete an existing MethodResponse resource. -type DeleteMethodResponseInput struct { - _ struct{} `type:"structure"` - - // [Required] The HTTP verb of the Method resource. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // [Required] The Resource identifier for the MethodResponse resource. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] The status code identifier for the MethodResponse resource. - // - // StatusCode is a required field - StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteMethodResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMethodResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMethodResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMethodResponseInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StatusCode == nil { - invalidParams.Add(request.NewErrParamRequired("StatusCode")) - } - if s.StatusCode != nil && len(*s.StatusCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *DeleteMethodResponseInput) SetHttpMethod(v string) *DeleteMethodResponseInput { - s.HttpMethod = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *DeleteMethodResponseInput) SetResourceId(v string) *DeleteMethodResponseInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *DeleteMethodResponseInput) SetRestApiId(v string) *DeleteMethodResponseInput { - s.RestApiId = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *DeleteMethodResponseInput) SetStatusCode(v string) *DeleteMethodResponseInput { - s.StatusCode = &v - return s -} - -type DeleteMethodResponseOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteMethodResponseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMethodResponseOutput) GoString() string { - return s.String() -} - -// Request to delete an existing model in an existing RestApi resource. -type DeleteModelInput struct { - _ struct{} `type:"structure"` - - // [Required] The name of the model to delete. - // - // ModelName is a required field - ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteModelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteModelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteModelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteModelInput"} - if s.ModelName == nil { - invalidParams.Add(request.NewErrParamRequired("ModelName")) - } - if s.ModelName != nil && len(*s.ModelName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ModelName", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetModelName sets the ModelName field's value. -func (s *DeleteModelInput) SetModelName(v string) *DeleteModelInput { - s.ModelName = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *DeleteModelInput) SetRestApiId(v string) *DeleteModelInput { - s.RestApiId = &v - return s -} - -type DeleteModelOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteModelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteModelOutput) GoString() string { - return s.String() -} - -// Deletes a specified RequestValidator of a given RestApi. -type DeleteRequestValidatorInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the RequestValidator to be deleted. - // - // RequestValidatorId is a required field - RequestValidatorId *string `location:"uri" locationName:"requestvalidator_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRequestValidatorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRequestValidatorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRequestValidatorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRequestValidatorInput"} - if s.RequestValidatorId == nil { - invalidParams.Add(request.NewErrParamRequired("RequestValidatorId")) - } - if s.RequestValidatorId != nil && len(*s.RequestValidatorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RequestValidatorId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRequestValidatorId sets the RequestValidatorId field's value. -func (s *DeleteRequestValidatorInput) SetRequestValidatorId(v string) *DeleteRequestValidatorInput { - s.RequestValidatorId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *DeleteRequestValidatorInput) SetRestApiId(v string) *DeleteRequestValidatorInput { - s.RestApiId = &v - return s -} - -type DeleteRequestValidatorOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRequestValidatorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRequestValidatorOutput) GoString() string { - return s.String() -} - -// Request to delete a Resource. -type DeleteResourceInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the Resource resource. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *DeleteResourceInput) SetResourceId(v string) *DeleteResourceInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *DeleteResourceInput) SetRestApiId(v string) *DeleteResourceInput { - s.RestApiId = &v - return s -} - -type DeleteResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResourceOutput) GoString() string { - return s.String() -} - -// Request to delete the specified API from your collection. -type DeleteRestApiInput struct { - _ struct{} `type:"structure"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRestApiInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRestApiInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRestApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRestApiInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRestApiId sets the RestApiId field's value. -func (s *DeleteRestApiInput) SetRestApiId(v string) *DeleteRestApiInput { - s.RestApiId = &v - return s -} - -type DeleteRestApiOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRestApiOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRestApiOutput) GoString() string { - return s.String() -} - -// Requests API Gateway to delete a Stage resource. -type DeleteStageInput struct { - _ struct{} `type:"structure"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] The name of the Stage resource to delete. - // - // StageName is a required field - StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteStageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteStageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteStageInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRestApiId sets the RestApiId field's value. -func (s *DeleteStageInput) SetRestApiId(v string) *DeleteStageInput { - s.RestApiId = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *DeleteStageInput) SetStageName(v string) *DeleteStageInput { - s.StageName = &v - return s -} - -type DeleteStageOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteStageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStageOutput) GoString() string { - return s.String() -} - -// The DELETE request to delete a usage plan of a given plan Id. -type DeleteUsagePlanInput struct { - _ struct{} `type:"structure"` - - // [Required] The Id of the to-be-deleted usage plan. - // - // UsagePlanId is a required field - UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteUsagePlanInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUsagePlanInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUsagePlanInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUsagePlanInput"} - if s.UsagePlanId == nil { - invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) - } - if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUsagePlanId sets the UsagePlanId field's value. -func (s *DeleteUsagePlanInput) SetUsagePlanId(v string) *DeleteUsagePlanInput { - s.UsagePlanId = &v - return s -} - -// The DELETE request to delete a usage plan key and remove the underlying API -// key from the associated usage plan. -type DeleteUsagePlanKeyInput struct { - _ struct{} `type:"structure"` - - // [Required] The Id of the UsagePlanKey resource to be deleted. - // - // KeyId is a required field - KeyId *string `location:"uri" locationName:"keyId" type:"string" required:"true"` - - // [Required] The Id of the UsagePlan resource representing the usage plan containing - // the to-be-deleted UsagePlanKey resource representing a plan customer. - // - // UsagePlanId is a required field - UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteUsagePlanKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUsagePlanKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUsagePlanKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUsagePlanKeyInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.UsagePlanId == nil { - invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) - } - if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *DeleteUsagePlanKeyInput) SetKeyId(v string) *DeleteUsagePlanKeyInput { - s.KeyId = &v - return s -} - -// SetUsagePlanId sets the UsagePlanId field's value. -func (s *DeleteUsagePlanKeyInput) SetUsagePlanId(v string) *DeleteUsagePlanKeyInput { - s.UsagePlanId = &v - return s -} - -type DeleteUsagePlanKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteUsagePlanKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUsagePlanKeyOutput) GoString() string { - return s.String() -} - -type DeleteUsagePlanOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteUsagePlanOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUsagePlanOutput) GoString() string { - return s.String() -} - -// Deletes an existing VpcLink of a specified identifier. -type DeleteVpcLinkInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the VpcLink. It is used in an Integration to - // reference this VpcLink. - // - // VpcLinkId is a required field - VpcLinkId *string `location:"uri" locationName:"vpclink_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVpcLinkInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcLinkInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpcLinkInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpcLinkInput"} - if s.VpcLinkId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcLinkId")) - } - if s.VpcLinkId != nil && len(*s.VpcLinkId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VpcLinkId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVpcLinkId sets the VpcLinkId field's value. -func (s *DeleteVpcLinkInput) SetVpcLinkId(v string) *DeleteVpcLinkInput { - s.VpcLinkId = &v - return s -} - -type DeleteVpcLinkOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteVpcLinkOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcLinkOutput) GoString() string { - return s.String() -} - -// An immutable representation of a RestApi resource that can be called by users -// using Stages. A deployment must be associated with a Stage for it to be callable -// over the Internet. -// -// To create a deployment, call POST on the Deployments resource of a RestApi. -// To view, update, or delete a deployment, call GET, PATCH, or DELETE on the -// specified deployment resource (/restapis/{restapi_id}/deployments/{deployment_id}). -// -// RestApi, Deployments, Stage, AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-deployment.html), -// AWS SDKs (https://aws.amazon.com/tools/) -type Deployment struct { - _ struct{} `type:"structure"` - - // A summary of the RestApi at the date and time that the deployment resource - // was created. - ApiSummary map[string]map[string]*MethodSnapshot `locationName:"apiSummary" type:"map"` - - // The date and time that the deployment resource was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // The description for the deployment resource. - Description *string `locationName:"description" type:"string"` - - // The identifier for the deployment resource. - Id *string `locationName:"id" 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() -} - -// SetApiSummary sets the ApiSummary field's value. -func (s *Deployment) SetApiSummary(v map[string]map[string]*MethodSnapshot) *Deployment { - s.ApiSummary = v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *Deployment) SetCreatedDate(v time.Time) *Deployment { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Deployment) SetDescription(v string) *Deployment { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *Deployment) SetId(v string) *Deployment { - s.Id = &v - return s -} - -// The input configuration for a canary deployment. -type DeploymentCanarySettings struct { - _ struct{} `type:"structure"` - - // The percentage (0.0-100.0) of traffic routed to the canary deployment. - PercentTraffic *float64 `locationName:"percentTraffic" type:"double"` - - // A stage variable overrides used for the canary release deployment. They can - // override existing stage variables or add new stage variables for the canary - // release deployment. These stage variables are represented as a string-to-string - // map between stage variable names and their values. - StageVariableOverrides map[string]*string `locationName:"stageVariableOverrides" type:"map"` - - // A Boolean flag to indicate whether the canary release deployment uses the - // stage cache or not. - UseStageCache *bool `locationName:"useStageCache" type:"boolean"` -} - -// String returns the string representation -func (s DeploymentCanarySettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeploymentCanarySettings) GoString() string { - return s.String() -} - -// SetPercentTraffic sets the PercentTraffic field's value. -func (s *DeploymentCanarySettings) SetPercentTraffic(v float64) *DeploymentCanarySettings { - s.PercentTraffic = &v - return s -} - -// SetStageVariableOverrides sets the StageVariableOverrides field's value. -func (s *DeploymentCanarySettings) SetStageVariableOverrides(v map[string]*string) *DeploymentCanarySettings { - s.StageVariableOverrides = v - return s -} - -// SetUseStageCache sets the UseStageCache field's value. -func (s *DeploymentCanarySettings) SetUseStageCache(v bool) *DeploymentCanarySettings { - s.UseStageCache = &v - return s -} - -// A documentation part for a targeted API entity. -// -// A documentation part consists of a content map (properties) and a target -// (location). The target specifies an API entity to which the documentation -// content applies. The supported API entity types are API, AUTHORIZER, MODEL, -// RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, -// RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Valid location fields depend -// on the API entity type. All valid fields are not required. -// -// The content map is a JSON string of API-specific key-value pairs. Although -// an API can use any shape for the content map, only the OpenAPI-compliant -// documentation fields will be injected into the associated API entity definition -// in the exported OpenAPI definition file. -// -// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), -// DocumentationParts -type DocumentationPart struct { - _ struct{} `type:"structure"` - - // The DocumentationPart identifier, generated by API Gateway when the DocumentationPart - // is created. - Id *string `locationName:"id" type:"string"` - - // The location of the API entity to which the documentation applies. Valid - // fields depend on the targeted API entity type. All the valid location fields - // are not required. If not explicitly specified, a valid location field is - // treated as a wildcard and associated documentation content may be inherited - // by matching entities, unless overridden. - Location *DocumentationPartLocation `locationName:"location" type:"structure"` - - // A content map of API-specific key-value pairs describing the targeted API - // entity. The map must be encoded as a JSON string, e.g., "{ \"description\": - // \"The API does ...\" }". Only OpenAPI-compliant documentation-related fields - // from the properties map are exported and, hence, published as part of the - // API entity definitions, while the original documentation parts are exported - // in a OpenAPI extension of x-amazon-apigateway-documentation. - Properties *string `locationName:"properties" type:"string"` -} - -// String returns the string representation -func (s DocumentationPart) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DocumentationPart) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *DocumentationPart) SetId(v string) *DocumentationPart { - s.Id = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *DocumentationPart) SetLocation(v *DocumentationPartLocation) *DocumentationPart { - s.Location = v - return s -} - -// SetProperties sets the Properties field's value. -func (s *DocumentationPart) SetProperties(v string) *DocumentationPart { - s.Properties = &v - return s -} - -// Specifies the target API entity to which the documentation applies. -type DocumentationPartLocation struct { - _ struct{} `type:"structure"` - - // The HTTP verb of a method. It is a valid field for the API entity types of - // METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, - // RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. - // When an applicable child entity inherits the content of an entity of the - // same type with more general specifications of the other location attributes, - // the child entity's method attribute must match that of the parent entity - // exactly. - Method *string `locationName:"method" type:"string"` - - // The name of the targeted API entity. It is a valid and required field for - // the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, - // REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field - // for any other entity type. - Name *string `locationName:"name" type:"string"` - - // The URL path of the target. It is a valid field for the API entity types - // of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, - // RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for - // the root resource. When an applicable child entity inherits the content of - // another entity of the same type with more general specifications of the other - // location attributes, the child entity's path attribute must match that of - // the parent entity as a prefix. - Path *string `locationName:"path" type:"string"` - - // The HTTP status code of a response. It is a valid field for the API entity - // types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value - // is * for any status code. When an applicable child entity inherits the content - // of an entity of the same type with more general specifications of the other - // location attributes, the child entity's statusCode attribute must match that - // of the parent entity exactly. - StatusCode *string `locationName:"statusCode" type:"string"` - - // [Required] The type of API entity to which the documentation content applies. - // Valid values are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, - // QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, - // and RESPONSE_BODY. Content inheritance does not apply to any entity of the - // API, AUTHORIZER, METHOD, MODEL, REQUEST_BODY, or RESOURCE type. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"DocumentationPartType"` -} - -// String returns the string representation -func (s DocumentationPartLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DocumentationPartLocation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DocumentationPartLocation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DocumentationPartLocation"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMethod sets the Method field's value. -func (s *DocumentationPartLocation) SetMethod(v string) *DocumentationPartLocation { - s.Method = &v - return s -} - -// SetName sets the Name field's value. -func (s *DocumentationPartLocation) SetName(v string) *DocumentationPartLocation { - s.Name = &v - return s -} - -// SetPath sets the Path field's value. -func (s *DocumentationPartLocation) SetPath(v string) *DocumentationPartLocation { - s.Path = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *DocumentationPartLocation) SetStatusCode(v string) *DocumentationPartLocation { - s.StatusCode = &v - return s -} - -// SetType sets the Type field's value. -func (s *DocumentationPartLocation) SetType(v string) *DocumentationPartLocation { - s.Type = &v - return s -} - -// A snapshot of the documentation of an API. -// -// Publishing API documentation involves creating a documentation version associated -// with an API stage and exporting the versioned documentation to an external -// (e.g., OpenAPI) file. -// -// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), -// DocumentationPart, DocumentationVersions -type DocumentationVersion struct { - _ struct{} `type:"structure"` - - // The date when the API documentation snapshot is created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // The description of the API documentation snapshot. - Description *string `locationName:"description" type:"string"` - - // The version identifier of the API documentation snapshot. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s DocumentationVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DocumentationVersion) GoString() string { - return s.String() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *DocumentationVersion) SetCreatedDate(v time.Time) *DocumentationVersion { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DocumentationVersion) SetDescription(v string) *DocumentationVersion { - s.Description = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *DocumentationVersion) SetVersion(v string) *DocumentationVersion { - s.Version = &v - return s -} - -// Represents a custom domain name as a user-friendly host name of an API (RestApi). -// -// When you deploy an API, API Gateway creates a default host name for the API. -// This default API host name is of the {restapi-id}.execute-api.{region}.amazonaws.com -// format. With the default host name, you can access the API's root resource -// with the URL of https://{restapi-id}.execute-api.{region}.amazonaws.com/{stage}/. -// When you set up a custom domain name of apis.example.com for this API, you -// can then access the same resource using the URL of the https://apis.examples.com/myApi, -// where myApi is the base path mapping (BasePathMapping) of your API under -// the custom domain name. -// -// Set a Custom Host Name for an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) -type DomainName struct { - _ struct{} `type:"structure"` - - // The reference to an AWS-managed certificate that will be used by edge-optimized - // endpoint for this domain name. AWS Certificate Manager is the only supported - // source. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // The name of the certificate that will be used by edge-optimized endpoint - // for this domain name. - CertificateName *string `locationName:"certificateName" type:"string"` - - // The timestamp when the certificate that was used by edge-optimized endpoint - // for this domain name was uploaded. - CertificateUploadDate *time.Time `locationName:"certificateUploadDate" type:"timestamp"` - - // The domain name of the Amazon CloudFront distribution associated with this - // custom domain name for an edge-optimized endpoint. You set up this association - // when adding a DNS record pointing the custom domain name to this distribution - // name. For more information about CloudFront distributions, see the Amazon - // CloudFront documentation (https://aws.amazon.com/documentation/cloudfront/). - DistributionDomainName *string `locationName:"distributionDomainName" type:"string"` - - // The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized - // endpoint. The valid value is Z2FDTNDATAQYW2 for all the regions. For more - // information, see Set up a Regional Custom Domain Name (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) - // and AWS Regions and Endpoints for API Gateway (https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region). - DistributionHostedZoneId *string `locationName:"distributionHostedZoneId" type:"string"` - - // The custom domain name as an API host name, for example, my-api.example.com. - DomainName *string `locationName:"domainName" type:"string"` - - // The endpoint configuration of this DomainName showing the endpoint types - // of the domain name. - EndpointConfiguration *EndpointConfiguration `locationName:"endpointConfiguration" type:"structure"` - - // The reference to an AWS-managed certificate that will be used for validating - // the regional domain name. AWS Certificate Manager is the only supported source. - RegionalCertificateArn *string `locationName:"regionalCertificateArn" type:"string"` - - // The name of the certificate that will be used for validating the regional - // domain name. - RegionalCertificateName *string `locationName:"regionalCertificateName" type:"string"` - - // The domain name associated with the regional endpoint for this custom domain - // name. You set up this association by adding a DNS record that points the - // custom domain name to this regional domain name. The regional domain name - // is returned by API Gateway when you create a regional endpoint. - RegionalDomainName *string `locationName:"regionalDomainName" type:"string"` - - // The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. - // For more information, see Set up a Regional Custom Domain Name (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) - // and AWS Regions and Endpoints for API Gateway (https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region). - RegionalHostedZoneId *string `locationName:"regionalHostedZoneId" type:"string"` -} - -// String returns the string representation -func (s DomainName) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainName) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *DomainName) SetCertificateArn(v string) *DomainName { - s.CertificateArn = &v - return s -} - -// SetCertificateName sets the CertificateName field's value. -func (s *DomainName) SetCertificateName(v string) *DomainName { - s.CertificateName = &v - return s -} - -// SetCertificateUploadDate sets the CertificateUploadDate field's value. -func (s *DomainName) SetCertificateUploadDate(v time.Time) *DomainName { - s.CertificateUploadDate = &v - return s -} - -// SetDistributionDomainName sets the DistributionDomainName field's value. -func (s *DomainName) SetDistributionDomainName(v string) *DomainName { - s.DistributionDomainName = &v - return s -} - -// SetDistributionHostedZoneId sets the DistributionHostedZoneId field's value. -func (s *DomainName) SetDistributionHostedZoneId(v string) *DomainName { - s.DistributionHostedZoneId = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DomainName) SetDomainName(v string) *DomainName { - s.DomainName = &v - return s -} - -// SetEndpointConfiguration sets the EndpointConfiguration field's value. -func (s *DomainName) SetEndpointConfiguration(v *EndpointConfiguration) *DomainName { - s.EndpointConfiguration = v - return s -} - -// SetRegionalCertificateArn sets the RegionalCertificateArn field's value. -func (s *DomainName) SetRegionalCertificateArn(v string) *DomainName { - s.RegionalCertificateArn = &v - return s -} - -// SetRegionalCertificateName sets the RegionalCertificateName field's value. -func (s *DomainName) SetRegionalCertificateName(v string) *DomainName { - s.RegionalCertificateName = &v - return s -} - -// SetRegionalDomainName sets the RegionalDomainName field's value. -func (s *DomainName) SetRegionalDomainName(v string) *DomainName { - s.RegionalDomainName = &v - return s -} - -// SetRegionalHostedZoneId sets the RegionalHostedZoneId field's value. -func (s *DomainName) SetRegionalHostedZoneId(v string) *DomainName { - s.RegionalHostedZoneId = &v - return s -} - -// The endpoint configuration to indicate the types of endpoints an API (RestApi) -// or its custom domain name (DomainName) has. -type EndpointConfiguration struct { - _ struct{} `type:"structure"` - - // A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). - // For an edge-optimized API and its custom domain name, the endpoint type is - // "EDGE". For a regional API and its custom domain name, the endpoint type - // is REGIONAL. For a private API, the endpoint type is PRIVATE. - Types []*string `locationName:"types" type:"list"` -} - -// String returns the string representation -func (s EndpointConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointConfiguration) GoString() string { - return s.String() -} - -// SetTypes sets the Types field's value. -func (s *EndpointConfiguration) SetTypes(v []*string) *EndpointConfiguration { - s.Types = v - return s -} - -// Request to flush authorizer cache entries on a specified stage. -type FlushStageAuthorizersCacheInput struct { - _ struct{} `type:"structure"` - - // The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // The name of the stage to flush. - // - // StageName is a required field - StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` -} - -// String returns the string representation -func (s FlushStageAuthorizersCacheInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FlushStageAuthorizersCacheInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FlushStageAuthorizersCacheInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FlushStageAuthorizersCacheInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRestApiId sets the RestApiId field's value. -func (s *FlushStageAuthorizersCacheInput) SetRestApiId(v string) *FlushStageAuthorizersCacheInput { - s.RestApiId = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *FlushStageAuthorizersCacheInput) SetStageName(v string) *FlushStageAuthorizersCacheInput { - s.StageName = &v - return s -} - -type FlushStageAuthorizersCacheOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s FlushStageAuthorizersCacheOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FlushStageAuthorizersCacheOutput) GoString() string { - return s.String() -} - -// Requests API Gateway to flush a stage's cache. -type FlushStageCacheInput struct { - _ struct{} `type:"structure"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] The name of the stage to flush its cache. - // - // StageName is a required field - StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` -} - -// String returns the string representation -func (s FlushStageCacheInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FlushStageCacheInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FlushStageCacheInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FlushStageCacheInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRestApiId sets the RestApiId field's value. -func (s *FlushStageCacheInput) SetRestApiId(v string) *FlushStageCacheInput { - s.RestApiId = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *FlushStageCacheInput) SetStageName(v string) *FlushStageCacheInput { - s.StageName = &v - return s -} - -type FlushStageCacheOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s FlushStageCacheOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FlushStageCacheOutput) GoString() string { - return s.String() -} - -// A request to generate a ClientCertificate resource. -type GenerateClientCertificateInput struct { - _ struct{} `type:"structure"` - - // The description of the ClientCertificate. - Description *string `locationName:"description" type:"string"` -} - -// String returns the string representation -func (s GenerateClientCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GenerateClientCertificateInput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *GenerateClientCertificateInput) SetDescription(v string) *GenerateClientCertificateInput { - s.Description = &v - return s -} - -// Requests API Gateway to get information about the current Account resource. -type GetAccountInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAccountInput) GoString() string { - return s.String() -} - -// A request to get information about the current ApiKey resource. -type GetApiKeyInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the ApiKey resource. - // - // ApiKey is a required field - ApiKey *string `location:"uri" locationName:"api_Key" type:"string" required:"true"` - - // A boolean flag to specify whether (true) or not (false) the result contains - // the key value. - IncludeValue *bool `location:"querystring" locationName:"includeValue" type:"boolean"` -} - -// String returns the string representation -func (s GetApiKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApiKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetApiKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetApiKeyInput"} - if s.ApiKey == nil { - invalidParams.Add(request.NewErrParamRequired("ApiKey")) - } - if s.ApiKey != nil && len(*s.ApiKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiKey", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiKey sets the ApiKey field's value. -func (s *GetApiKeyInput) SetApiKey(v string) *GetApiKeyInput { - s.ApiKey = &v - return s -} - -// SetIncludeValue sets the IncludeValue field's value. -func (s *GetApiKeyInput) SetIncludeValue(v bool) *GetApiKeyInput { - s.IncludeValue = &v - return s -} - -// A request to get information about the current ApiKeys resource. -type GetApiKeysInput struct { - _ struct{} `type:"structure"` - - // The identifier of a customer in AWS Marketplace or an external system, such - // as a developer portal. - CustomerId *string `location:"querystring" locationName:"customerId" type:"string"` - - // A boolean flag to specify whether (true) or not (false) the result contains - // key values. - IncludeValues *bool `location:"querystring" locationName:"includeValues" type:"boolean"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The name of queried API keys. - NameQuery *string `location:"querystring" locationName:"name" type:"string"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetApiKeysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApiKeysInput) GoString() string { - return s.String() -} - -// SetCustomerId sets the CustomerId field's value. -func (s *GetApiKeysInput) SetCustomerId(v string) *GetApiKeysInput { - s.CustomerId = &v - return s -} - -// SetIncludeValues sets the IncludeValues field's value. -func (s *GetApiKeysInput) SetIncludeValues(v bool) *GetApiKeysInput { - s.IncludeValues = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *GetApiKeysInput) SetLimit(v int64) *GetApiKeysInput { - s.Limit = &v - return s -} - -// SetNameQuery sets the NameQuery field's value. -func (s *GetApiKeysInput) SetNameQuery(v string) *GetApiKeysInput { - s.NameQuery = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetApiKeysInput) SetPosition(v string) *GetApiKeysInput { - s.Position = &v - return s -} - -// Represents a collection of API keys as represented by an ApiKeys resource. -// -// Use API Keys (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-api-keys.html) -type GetApiKeysOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*ApiKey `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` - - // A list of warning messages logged during the import of API keys when the - // failOnWarnings option is set to true. - Warnings []*string `locationName:"warnings" type:"list"` -} - -// String returns the string representation -func (s GetApiKeysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApiKeysOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetApiKeysOutput) SetItems(v []*ApiKey) *GetApiKeysOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetApiKeysOutput) SetPosition(v string) *GetApiKeysOutput { - s.Position = &v - return s -} - -// SetWarnings sets the Warnings field's value. -func (s *GetApiKeysOutput) SetWarnings(v []*string) *GetApiKeysOutput { - s.Warnings = v - return s -} - -// Request to describe an existing Authorizer resource. -type GetAuthorizerInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the Authorizer resource. - // - // AuthorizerId is a required field - AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAuthorizerInput"} - if s.AuthorizerId == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) - } - if s.AuthorizerId != nil && len(*s.AuthorizerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizerId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *GetAuthorizerInput) SetAuthorizerId(v string) *GetAuthorizerInput { - s.AuthorizerId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetAuthorizerInput) SetRestApiId(v string) *GetAuthorizerInput { - s.RestApiId = &v - return s -} - -// Request to describe an existing Authorizers resource. -type GetAuthorizersInput struct { - _ struct{} `type:"structure"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetAuthorizersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAuthorizersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAuthorizersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAuthorizersInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *GetAuthorizersInput) SetLimit(v int64) *GetAuthorizersInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetAuthorizersInput) SetPosition(v string) *GetAuthorizersInput { - s.Position = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetAuthorizersInput) SetRestApiId(v string) *GetAuthorizersInput { - s.RestApiId = &v - return s -} - -// Represents a collection of Authorizer resources. -// -// Enable custom authorization (https://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) -type GetAuthorizersOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*Authorizer `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetAuthorizersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAuthorizersOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetAuthorizersOutput) SetItems(v []*Authorizer) *GetAuthorizersOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetAuthorizersOutput) SetPosition(v string) *GetAuthorizersOutput { - s.Position = &v - return s -} - -// Request to describe a BasePathMapping resource. -type GetBasePathMappingInput struct { - _ struct{} `type:"structure"` - - // [Required] The base path name that callers of the API must provide as part - // of the URL after the domain name. This value must be unique for all of the - // mappings across a single API. Leave this blank if you do not want callers - // to specify any base path name after the domain name. - // - // BasePath is a required field - BasePath *string `location:"uri" locationName:"base_path" type:"string" required:"true"` - - // [Required] The domain name of the BasePathMapping resource to be described. - // - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetBasePathMappingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBasePathMappingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBasePathMappingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBasePathMappingInput"} - if s.BasePath == nil { - invalidParams.Add(request.NewErrParamRequired("BasePath")) - } - if s.BasePath != nil && len(*s.BasePath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BasePath", 1)) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBasePath sets the BasePath field's value. -func (s *GetBasePathMappingInput) SetBasePath(v string) *GetBasePathMappingInput { - s.BasePath = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *GetBasePathMappingInput) SetDomainName(v string) *GetBasePathMappingInput { - s.DomainName = &v - return s -} - -// A request to get information about a collection of BasePathMapping resources. -type GetBasePathMappingsInput struct { - _ struct{} `type:"structure"` - - // [Required] The domain name of a BasePathMapping resource. - // - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetBasePathMappingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBasePathMappingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBasePathMappingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBasePathMappingsInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *GetBasePathMappingsInput) SetDomainName(v string) *GetBasePathMappingsInput { - s.DomainName = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *GetBasePathMappingsInput) SetLimit(v int64) *GetBasePathMappingsInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetBasePathMappingsInput) SetPosition(v string) *GetBasePathMappingsInput { - s.Position = &v - return s -} - -// Represents a collection of BasePathMapping resources. -// -// Use Custom Domain Names (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) -type GetBasePathMappingsOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*BasePathMapping `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetBasePathMappingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBasePathMappingsOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetBasePathMappingsOutput) SetItems(v []*BasePathMapping) *GetBasePathMappingsOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetBasePathMappingsOutput) SetPosition(v string) *GetBasePathMappingsOutput { - s.Position = &v - return s -} - -// A request to get information about the current ClientCertificate resource. -type GetClientCertificateInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the ClientCertificate resource to be described. - // - // ClientCertificateId is a required field - ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetClientCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetClientCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetClientCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetClientCertificateInput"} - if s.ClientCertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientCertificateId")) - } - if s.ClientCertificateId != nil && len(*s.ClientCertificateId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientCertificateId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientCertificateId sets the ClientCertificateId field's value. -func (s *GetClientCertificateInput) SetClientCertificateId(v string) *GetClientCertificateInput { - s.ClientCertificateId = &v - return s -} - -// A request to get information about a collection of ClientCertificate resources. -type GetClientCertificatesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetClientCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetClientCertificatesInput) GoString() string { - return s.String() -} - -// SetLimit sets the Limit field's value. -func (s *GetClientCertificatesInput) SetLimit(v int64) *GetClientCertificatesInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetClientCertificatesInput) SetPosition(v string) *GetClientCertificatesInput { - s.Position = &v - return s -} - -// Represents a collection of ClientCertificate resources. -// -// Use Client-Side Certificate (https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) -type GetClientCertificatesOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*ClientCertificate `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetClientCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetClientCertificatesOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetClientCertificatesOutput) SetItems(v []*ClientCertificate) *GetClientCertificatesOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetClientCertificatesOutput) SetPosition(v string) *GetClientCertificatesOutput { - s.Position = &v - return s -} - -// Requests API Gateway to get information about a Deployment resource. -type GetDeploymentInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the Deployment resource to get information about. - // - // DeploymentId is a required field - DeploymentId *string `location:"uri" locationName:"deployment_id" type:"string" required:"true"` - - // A query parameter to retrieve the specified embedded resources of the returned - // Deployment resource in the response. In a REST API call, this embed parameter - // value is a list of comma-separated strings, as in GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2. - // The SDK and other platform-dependent libraries might use a different format - // for the list. Currently, this request supports only retrieval of the embedded - // API summary this way. Hence, the parameter value must be a single-valued - // list containing only the "apisummary" string. For example, GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary. - Embed []*string `location:"querystring" locationName:"embed" type:"list"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDeploymentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeploymentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeploymentInput"} - 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.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *GetDeploymentInput) SetDeploymentId(v string) *GetDeploymentInput { - s.DeploymentId = &v - return s -} - -// SetEmbed sets the Embed field's value. -func (s *GetDeploymentInput) SetEmbed(v []*string) *GetDeploymentInput { - s.Embed = v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetDeploymentInput) SetRestApiId(v string) *GetDeploymentInput { - s.RestApiId = &v - return s -} - -// Requests API Gateway to get information about a Deployments collection. -type GetDeploymentsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDeploymentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeploymentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeploymentsInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *GetDeploymentsInput) SetLimit(v int64) *GetDeploymentsInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetDeploymentsInput) SetPosition(v string) *GetDeploymentsInput { - s.Position = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetDeploymentsInput) SetRestApiId(v string) *GetDeploymentsInput { - s.RestApiId = &v - return s -} - -// Represents a collection resource that contains zero or more references to -// your existing deployments, and links that guide you on how to interact with -// your collection. The collection offers a paginated view of the contained -// deployments. -// -// To create a new deployment of a RestApi, make a POST request against this -// resource. To view, update, or delete an existing deployment, make a GET, -// PATCH, or DELETE request, respectively, on a specified Deployment resource. -// -// Deploying an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html), -// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-deployment.html), -// AWS SDKs (https://aws.amazon.com/tools/) -type GetDeploymentsOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*Deployment `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetDeploymentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentsOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetDeploymentsOutput) SetItems(v []*Deployment) *GetDeploymentsOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetDeploymentsOutput) SetPosition(v string) *GetDeploymentsOutput { - s.Position = &v - return s -} - -// Gets a specified documentation part of a given API. -type GetDocumentationPartInput struct { - _ struct{} `type:"structure"` - - // [Required] The string identifier of the associated RestApi. - // - // DocumentationPartId is a required field - DocumentationPartId *string `location:"uri" locationName:"part_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDocumentationPartInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDocumentationPartInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDocumentationPartInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDocumentationPartInput"} - if s.DocumentationPartId == nil { - invalidParams.Add(request.NewErrParamRequired("DocumentationPartId")) - } - if s.DocumentationPartId != nil && len(*s.DocumentationPartId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DocumentationPartId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDocumentationPartId sets the DocumentationPartId field's value. -func (s *GetDocumentationPartInput) SetDocumentationPartId(v string) *GetDocumentationPartInput { - s.DocumentationPartId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetDocumentationPartInput) SetRestApiId(v string) *GetDocumentationPartInput { - s.RestApiId = &v - return s -} - -// Gets the documentation parts of an API. The result may be filtered by the -// type, name, or path of API entities (targets). -type GetDocumentationPartsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The status of the API documentation parts to retrieve. Valid values are DOCUMENTED - // for retrieving DocumentationPart resources with content and UNDOCUMENTED - // for DocumentationPart resources without content. - LocationStatus *string `location:"querystring" locationName:"locationStatus" type:"string" enum:"LocationStatusType"` - - // The name of API entities of the to-be-retrieved documentation parts. - NameQuery *string `location:"querystring" locationName:"name" type:"string"` - - // The path of API entities of the to-be-retrieved documentation parts. - Path *string `location:"querystring" locationName:"path" type:"string"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // The type of API entities of the to-be-retrieved documentation parts. - Type *string `location:"querystring" locationName:"type" type:"string" enum:"DocumentationPartType"` -} - -// String returns the string representation -func (s GetDocumentationPartsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDocumentationPartsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDocumentationPartsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDocumentationPartsInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *GetDocumentationPartsInput) SetLimit(v int64) *GetDocumentationPartsInput { - s.Limit = &v - return s -} - -// SetLocationStatus sets the LocationStatus field's value. -func (s *GetDocumentationPartsInput) SetLocationStatus(v string) *GetDocumentationPartsInput { - s.LocationStatus = &v - return s -} - -// SetNameQuery sets the NameQuery field's value. -func (s *GetDocumentationPartsInput) SetNameQuery(v string) *GetDocumentationPartsInput { - s.NameQuery = &v - return s -} - -// SetPath sets the Path field's value. -func (s *GetDocumentationPartsInput) SetPath(v string) *GetDocumentationPartsInput { - s.Path = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetDocumentationPartsInput) SetPosition(v string) *GetDocumentationPartsInput { - s.Position = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetDocumentationPartsInput) SetRestApiId(v string) *GetDocumentationPartsInput { - s.RestApiId = &v - return s -} - -// SetType sets the Type field's value. -func (s *GetDocumentationPartsInput) SetType(v string) *GetDocumentationPartsInput { - s.Type = &v - return s -} - -// The collection of documentation parts of an API. -// -// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), DocumentationPart -type GetDocumentationPartsOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*DocumentationPart `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetDocumentationPartsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDocumentationPartsOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetDocumentationPartsOutput) SetItems(v []*DocumentationPart) *GetDocumentationPartsOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetDocumentationPartsOutput) SetPosition(v string) *GetDocumentationPartsOutput { - s.Position = &v - return s -} - -// Gets a documentation snapshot of an API. -type GetDocumentationVersionInput struct { - _ struct{} `type:"structure"` - - // [Required] The version identifier of the to-be-retrieved documentation snapshot. - // - // DocumentationVersion is a required field - DocumentationVersion *string `location:"uri" locationName:"doc_version" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDocumentationVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDocumentationVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDocumentationVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDocumentationVersionInput"} - if s.DocumentationVersion == nil { - invalidParams.Add(request.NewErrParamRequired("DocumentationVersion")) - } - if s.DocumentationVersion != nil && len(*s.DocumentationVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DocumentationVersion", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDocumentationVersion sets the DocumentationVersion field's value. -func (s *GetDocumentationVersionInput) SetDocumentationVersion(v string) *GetDocumentationVersionInput { - s.DocumentationVersion = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetDocumentationVersionInput) SetRestApiId(v string) *GetDocumentationVersionInput { - s.RestApiId = &v - return s -} - -// Gets the documentation versions of an API. -type GetDocumentationVersionsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDocumentationVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDocumentationVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDocumentationVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDocumentationVersionsInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *GetDocumentationVersionsInput) SetLimit(v int64) *GetDocumentationVersionsInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetDocumentationVersionsInput) SetPosition(v string) *GetDocumentationVersionsInput { - s.Position = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetDocumentationVersionsInput) SetRestApiId(v string) *GetDocumentationVersionsInput { - s.RestApiId = &v - return s -} - -// The collection of documentation snapshots of an API. -// -// Use the DocumentationVersions to manage documentation snapshots associated -// with various API stages. -// -// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), -// DocumentationPart, DocumentationVersion -type GetDocumentationVersionsOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*DocumentationVersion `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetDocumentationVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDocumentationVersionsOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetDocumentationVersionsOutput) SetItems(v []*DocumentationVersion) *GetDocumentationVersionsOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetDocumentationVersionsOutput) SetPosition(v string) *GetDocumentationVersionsOutput { - s.Position = &v - return s -} - -// Request to get the name of a DomainName resource. -type GetDomainNameInput struct { - _ struct{} `type:"structure"` - - // [Required] The name of the DomainName resource. - // - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDomainNameInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDomainNameInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDomainNameInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDomainNameInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *GetDomainNameInput) SetDomainName(v string) *GetDomainNameInput { - s.DomainName = &v - return s -} - -// Request to describe a collection of DomainName resources. -type GetDomainNamesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetDomainNamesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDomainNamesInput) GoString() string { - return s.String() -} - -// SetLimit sets the Limit field's value. -func (s *GetDomainNamesInput) SetLimit(v int64) *GetDomainNamesInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetDomainNamesInput) SetPosition(v string) *GetDomainNamesInput { - s.Position = &v - return s -} - -// Represents a collection of DomainName resources. -// -// Use Client-Side Certificate (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) -type GetDomainNamesOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*DomainName `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetDomainNamesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDomainNamesOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetDomainNamesOutput) SetItems(v []*DomainName) *GetDomainNamesOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetDomainNamesOutput) SetPosition(v string) *GetDomainNamesOutput { - s.Position = &v - return s -} - -// Request a new export of a RestApi for a particular Stage. -type GetExportInput struct { - _ struct{} `type:"structure"` - - // The content-type of the export, for example application/json. Currently application/json - // and application/yaml are supported for exportType ofoas30 and swagger. This - // should be specified in the Accept header for direct API requests. - Accepts *string `location:"header" locationName:"Accept" type:"string"` - - // [Required] The type of export. Acceptable values are 'oas30' for OpenAPI - // 3.0.x and 'swagger' for Swagger/OpenAPI 2.0. - // - // ExportType is a required field - ExportType *string `location:"uri" locationName:"export_type" type:"string" required:"true"` - - // A key-value map of query string parameters that specify properties of the - // export, depending on the requested exportType. For exportTypeoas30 and swagger, - // any combination of the following parameters are supported: extensions='integrations' - // or extensions='apigateway' will export the API with x-amazon-apigateway-integration - // extensions. extensions='authorizers' will export the API with x-amazon-apigateway-authorizer - // extensions. postman will export the API with Postman extensions, allowing - // for import to the Postman tool - Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] The name of the Stage that will be exported. - // - // StageName is a required field - StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetExportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetExportInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetExportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetExportInput"} - if s.ExportType == nil { - invalidParams.Add(request.NewErrParamRequired("ExportType")) - } - if s.ExportType != nil && len(*s.ExportType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExportType", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccepts sets the Accepts field's value. -func (s *GetExportInput) SetAccepts(v string) *GetExportInput { - s.Accepts = &v - return s -} - -// SetExportType sets the ExportType field's value. -func (s *GetExportInput) SetExportType(v string) *GetExportInput { - s.ExportType = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *GetExportInput) SetParameters(v map[string]*string) *GetExportInput { - s.Parameters = v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetExportInput) SetRestApiId(v string) *GetExportInput { - s.RestApiId = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *GetExportInput) SetStageName(v string) *GetExportInput { - s.StageName = &v - return s -} - -// The binary blob response to GetExport, which contains the generated SDK. -type GetExportOutput struct { - _ struct{} `type:"structure" payload:"Body"` - - // The binary blob response to GetExport, which contains the export. - Body []byte `locationName:"body" type:"blob"` - - // The content-disposition header value in the HTTP response. - ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` - - // The content-type header value in the HTTP response. This will correspond - // to a valid 'accept' type in the request. - ContentType *string `location:"header" locationName:"Content-Type" type:"string"` -} - -// String returns the string representation -func (s GetExportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetExportOutput) GoString() string { - return s.String() -} - -// SetBody sets the Body field's value. -func (s *GetExportOutput) SetBody(v []byte) *GetExportOutput { - s.Body = v - return s -} - -// SetContentDisposition sets the ContentDisposition field's value. -func (s *GetExportOutput) SetContentDisposition(v string) *GetExportOutput { - s.ContentDisposition = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *GetExportOutput) SetContentType(v string) *GetExportOutput { - s.ContentType = &v - return s -} - -// Gets a GatewayResponse of a specified response type on the given RestApi. -type GetGatewayResponseInput struct { - _ struct{} `type:"structure"` - - // [Required] The response type of the associated GatewayResponse. Valid values - // are ACCESS_DENIED - // API_CONFIGURATION_ERROR - // AUTHORIZER_FAILURE - // AUTHORIZER_CONFIGURATION_ERROR - // BAD_REQUEST_PARAMETERS - // BAD_REQUEST_BODY - // DEFAULT_4XX - // DEFAULT_5XX - // EXPIRED_TOKEN - // INVALID_SIGNATURE - // INTEGRATION_FAILURE - // INTEGRATION_TIMEOUT - // INVALID_API_KEY - // MISSING_AUTHENTICATION_TOKEN - // QUOTA_EXCEEDED - // REQUEST_TOO_LARGE - // RESOURCE_NOT_FOUND - // THROTTLED - // UNAUTHORIZED - // UNSUPPORTED_MEDIA_TYPE - // - // ResponseType is a required field - ResponseType *string `location:"uri" locationName:"response_type" type:"string" required:"true" enum:"GatewayResponseType"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetGatewayResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGatewayResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetGatewayResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetGatewayResponseInput"} - if s.ResponseType == nil { - invalidParams.Add(request.NewErrParamRequired("ResponseType")) - } - if s.ResponseType != nil && len(*s.ResponseType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResponseType", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResponseType sets the ResponseType field's value. -func (s *GetGatewayResponseInput) SetResponseType(v string) *GetGatewayResponseInput { - s.ResponseType = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetGatewayResponseInput) SetRestApiId(v string) *GetGatewayResponseInput { - s.RestApiId = &v - return s -} - -// Gets the GatewayResponses collection on the given RestApi. If an API developer -// has not added any definitions for gateway responses, the result will be the -// API Gateway-generated default GatewayResponses collection for the supported -// response types. -type GetGatewayResponsesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. The GatewayResponses collection does not support - // pagination and the limit does not apply here. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. The GatewayResponse - // collection does not support pagination and the position does not apply here. - Position *string `location:"querystring" locationName:"position" type:"string"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetGatewayResponsesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGatewayResponsesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetGatewayResponsesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetGatewayResponsesInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *GetGatewayResponsesInput) SetLimit(v int64) *GetGatewayResponsesInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetGatewayResponsesInput) SetPosition(v string) *GetGatewayResponsesInput { - s.Position = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetGatewayResponsesInput) SetRestApiId(v string) *GetGatewayResponsesInput { - s.RestApiId = &v - return s -} - -// The collection of the GatewayResponse instances of a RestApi as a responseType-to-GatewayResponse -// object map of key-value pairs. As such, pagination is not supported for querying -// this collection. -// -// For more information about valid gateway response types, see Gateway Response -// Types Supported by API Gateway (https://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html)Example: -// Get the collection of gateway responses of an API -// -// Request -// -// This example request shows how to retrieve the GatewayResponses collection -// from an API. -// -// GET /restapis/o81lxisefl/gatewayresponses HTTP/1.1 Host: beta-apigateway.us-east-1.amazonaws.com -// Content-Type: application/json X-Amz-Date: 20170503T220604Z Authorization: -// AWS4-HMAC-SHA256 Credential={access-key-id}/20170503/us-east-1/apigateway/aws4_request, -// SignedHeaders=content-type;host;x-amz-date, Signature=59b42fe54a76a5de8adf2c67baa6d39206f8e9ad49a1d77ccc6a5da3103a398a -// Cache-Control: no-cache Postman-Token: 5637af27-dc29-fc5c-9dfe-0645d52cb515 -// -// Response -// -// The successful operation returns the 200 OK status code and a payload similar -// to the following: -// -// { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-gatewayresponse-{rel}.html", -// "name": "gatewayresponse", "templated": true }, "self": { "href": "/restapis/o81lxisefl/gatewayresponses" -// }, "first": { "href": "/restapis/o81lxisefl/gatewayresponses" }, "gatewayresponse:by-type": -// { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", "templated": -// true }, "item": [ { "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATION_FAILURE" -// }, { "href": "/restapis/o81lxisefl/gatewayresponses/RESOURCE_NOT_FOUND" }, -// { "href": "/restapis/o81lxisefl/gatewayresponses/REQUEST_TOO_LARGE" }, { -// "href": "/restapis/o81lxisefl/gatewayresponses/THROTTLED" }, { "href": "/restapis/o81lxisefl/gatewayresponses/UNSUPPORTED_MEDIA_TYPE" -// }, { "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_CONFIGURATION_ERROR" -// }, { "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT_5XX" }, { "href": -// "/restapis/o81lxisefl/gatewayresponses/DEFAULT_4XX" }, { "href": "/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_PARAMETERS" -// }, { "href": "/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_BODY" }, -// { "href": "/restapis/o81lxisefl/gatewayresponses/EXPIRED_TOKEN" }, { "href": -// "/restapis/o81lxisefl/gatewayresponses/ACCESS_DENIED" }, { "href": "/restapis/o81lxisefl/gatewayresponses/INVALID_API_KEY" -// }, { "href": "/restapis/o81lxisefl/gatewayresponses/UNAUTHORIZED" }, { "href": -// "/restapis/o81lxisefl/gatewayresponses/API_CONFIGURATION_ERROR" }, { "href": -// "/restapis/o81lxisefl/gatewayresponses/QUOTA_EXCEEDED" }, { "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATION_TIMEOUT" -// }, { "href": "/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN" -// }, { "href": "/restapis/o81lxisefl/gatewayresponses/INVALID_SIGNATURE" }, -// { "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_FAILURE" } ] -// }, "_embedded": { "item": [ { "_links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATION_FAILURE" -// }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", -// "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATION_FAILURE" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "INTEGRATION_FAILURE", "statusCode": "504" }, { "_links": { "self": { "href": -// "/restapis/o81lxisefl/gatewayresponses/RESOURCE_NOT_FOUND" }, "gatewayresponse:put": -// { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", "templated": -// true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/RESOURCE_NOT_FOUND" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "RESOURCE_NOT_FOUND", "statusCode": "404" }, { "_links": { "self": { "href": -// "/restapis/o81lxisefl/gatewayresponses/REQUEST_TOO_LARGE" }, "gatewayresponse:put": -// { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", "templated": -// true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/REQUEST_TOO_LARGE" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "REQUEST_TOO_LARGE", "statusCode": "413" }, { "_links": { "self": { "href": -// "/restapis/o81lxisefl/gatewayresponses/THROTTLED" }, "gatewayresponse:put": -// { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", "templated": -// true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/THROTTLED" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "THROTTLED", "statusCode": "429" }, { "_links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/UNSUPPORTED_MEDIA_TYPE" -// }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", -// "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/UNSUPPORTED_MEDIA_TYPE" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "UNSUPPORTED_MEDIA_TYPE", "statusCode": "415" }, { "_links": { "self": { -// "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_CONFIGURATION_ERROR" -// }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", -// "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_CONFIGURATION_ERROR" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "AUTHORIZER_CONFIGURATION_ERROR", "statusCode": "500" }, { "_links": { "self": -// { "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT_5XX" }, "gatewayresponse:put": -// { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", "templated": -// true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT_5XX" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "DEFAULT_5XX" }, { "_links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT_4XX" -// }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", -// "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT_4XX" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "DEFAULT_4XX" }, { "_links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_PARAMETERS" -// }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", -// "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_PARAMETERS" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "BAD_REQUEST_PARAMETERS", "statusCode": "400" }, { "_links": { "self": { -// "href": "/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_BODY" }, "gatewayresponse:put": -// { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", "templated": -// true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_BODY" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "BAD_REQUEST_BODY", "statusCode": "400" }, { "_links": { "self": { "href": -// "/restapis/o81lxisefl/gatewayresponses/EXPIRED_TOKEN" }, "gatewayresponse:put": -// { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", "templated": -// true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/EXPIRED_TOKEN" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "EXPIRED_TOKEN", "statusCode": "403" }, { "_links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/ACCESS_DENIED" -// }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", -// "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/ACCESS_DENIED" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "ACCESS_DENIED", "statusCode": "403" }, { "_links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/INVALID_API_KEY" -// }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", -// "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/INVALID_API_KEY" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "INVALID_API_KEY", "statusCode": "403" }, { "_links": { "self": { "href": -// "/restapis/o81lxisefl/gatewayresponses/UNAUTHORIZED" }, "gatewayresponse:put": -// { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", "templated": -// true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/UNAUTHORIZED" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "UNAUTHORIZED", "statusCode": "401" }, { "_links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/API_CONFIGURATION_ERROR" -// }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", -// "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/API_CONFIGURATION_ERROR" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "API_CONFIGURATION_ERROR", "statusCode": "500" }, { "_links": { "self": { -// "href": "/restapis/o81lxisefl/gatewayresponses/QUOTA_EXCEEDED" }, "gatewayresponse:put": -// { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", "templated": -// true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/QUOTA_EXCEEDED" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "QUOTA_EXCEEDED", "statusCode": "429" }, { "_links": { "self": { "href": -// "/restapis/o81lxisefl/gatewayresponses/INTEGRATION_TIMEOUT" }, "gatewayresponse:put": -// { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", "templated": -// true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATION_TIMEOUT" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "INTEGRATION_TIMEOUT", "statusCode": "504" }, { "_links": { "self": { "href": -// "/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN" }, "gatewayresponse:put": -// { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", "templated": -// true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "MISSING_AUTHENTICATION_TOKEN", "statusCode": "403" }, { "_links": { "self": -// { "href": "/restapis/o81lxisefl/gatewayresponses/INVALID_SIGNATURE" }, "gatewayresponse:put": -// { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", "templated": -// true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/INVALID_SIGNATURE" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "INVALID_SIGNATURE", "statusCode": "403" }, { "_links": { "self": { "href": -// "/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_FAILURE" }, "gatewayresponse:put": -// { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", "templated": -// true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_FAILURE" -// } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": -// { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": -// "AUTHORIZER_FAILURE", "statusCode": "500" } ] } } -// -// Customize Gateway Responses (https://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html) -type GetGatewayResponsesOutput struct { - _ struct{} `type:"structure"` - - // Returns the entire collection, because of no pagination support. - Items []*UpdateGatewayResponseOutput `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetGatewayResponsesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGatewayResponsesOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetGatewayResponsesOutput) SetItems(v []*UpdateGatewayResponseOutput) *GetGatewayResponsesOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetGatewayResponsesOutput) SetPosition(v string) *GetGatewayResponsesOutput { - s.Position = &v - return s -} - -// Represents a request to get the integration configuration. -type GetIntegrationInput struct { - _ struct{} `type:"structure"` - - // [Required] Specifies a get integration request's HTTP method. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // [Required] Specifies a get integration request's resource identifier - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetIntegrationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntegrationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIntegrationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIntegrationInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *GetIntegrationInput) SetHttpMethod(v string) *GetIntegrationInput { - s.HttpMethod = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *GetIntegrationInput) SetResourceId(v string) *GetIntegrationInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetIntegrationInput) SetRestApiId(v string) *GetIntegrationInput { - s.RestApiId = &v - return s -} - -// Represents a get integration response request. -type GetIntegrationResponseInput struct { - _ struct{} `type:"structure"` - - // [Required] Specifies a get integration response request's HTTP method. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // [Required] Specifies a get integration response request's resource identifier. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] Specifies a get integration response request's status code. - // - // StatusCode is a required field - StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetIntegrationResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntegrationResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIntegrationResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIntegrationResponseInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StatusCode == nil { - invalidParams.Add(request.NewErrParamRequired("StatusCode")) - } - if s.StatusCode != nil && len(*s.StatusCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *GetIntegrationResponseInput) SetHttpMethod(v string) *GetIntegrationResponseInput { - s.HttpMethod = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *GetIntegrationResponseInput) SetResourceId(v string) *GetIntegrationResponseInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetIntegrationResponseInput) SetRestApiId(v string) *GetIntegrationResponseInput { - s.RestApiId = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *GetIntegrationResponseInput) SetStatusCode(v string) *GetIntegrationResponseInput { - s.StatusCode = &v - return s -} - -// Request to describe an existing Method resource. -type GetMethodInput struct { - _ struct{} `type:"structure"` - - // [Required] Specifies the method request's HTTP method type. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // [Required] The Resource identifier for the Method resource. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetMethodInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMethodInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMethodInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMethodInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *GetMethodInput) SetHttpMethod(v string) *GetMethodInput { - s.HttpMethod = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *GetMethodInput) SetResourceId(v string) *GetMethodInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetMethodInput) SetRestApiId(v string) *GetMethodInput { - s.RestApiId = &v - return s -} - -// Request to describe a MethodResponse resource. -type GetMethodResponseInput struct { - _ struct{} `type:"structure"` - - // [Required] The HTTP verb of the Method resource. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // [Required] The Resource identifier for the MethodResponse resource. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] The status code for the MethodResponse resource. - // - // StatusCode is a required field - StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetMethodResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMethodResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMethodResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMethodResponseInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StatusCode == nil { - invalidParams.Add(request.NewErrParamRequired("StatusCode")) - } - if s.StatusCode != nil && len(*s.StatusCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *GetMethodResponseInput) SetHttpMethod(v string) *GetMethodResponseInput { - s.HttpMethod = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *GetMethodResponseInput) SetResourceId(v string) *GetMethodResponseInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetMethodResponseInput) SetRestApiId(v string) *GetMethodResponseInput { - s.RestApiId = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *GetMethodResponseInput) SetStatusCode(v string) *GetMethodResponseInput { - s.StatusCode = &v - return s -} - -// Request to list information about a model in an existing RestApi resource. -type GetModelInput struct { - _ struct{} `type:"structure"` - - // A query parameter of a Boolean value to resolve (true) all external model - // references and returns a flattened model schema or not (false) The default - // is false. - Flatten *bool `location:"querystring" locationName:"flatten" type:"boolean"` - - // [Required] The name of the model as an identifier. - // - // ModelName is a required field - ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"` - - // [Required] The RestApi identifier under which the Model exists. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetModelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetModelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetModelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetModelInput"} - if s.ModelName == nil { - invalidParams.Add(request.NewErrParamRequired("ModelName")) - } - if s.ModelName != nil && len(*s.ModelName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ModelName", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFlatten sets the Flatten field's value. -func (s *GetModelInput) SetFlatten(v bool) *GetModelInput { - s.Flatten = &v - return s -} - -// SetModelName sets the ModelName field's value. -func (s *GetModelInput) SetModelName(v string) *GetModelInput { - s.ModelName = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetModelInput) SetRestApiId(v string) *GetModelInput { - s.RestApiId = &v - return s -} - -// Request to generate a sample mapping template used to transform the payload. -type GetModelTemplateInput struct { - _ struct{} `type:"structure"` - - // [Required] The name of the model for which to generate a template. - // - // ModelName is a required field - ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetModelTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetModelTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetModelTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetModelTemplateInput"} - if s.ModelName == nil { - invalidParams.Add(request.NewErrParamRequired("ModelName")) - } - if s.ModelName != nil && len(*s.ModelName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ModelName", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetModelName sets the ModelName field's value. -func (s *GetModelTemplateInput) SetModelName(v string) *GetModelTemplateInput { - s.ModelName = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetModelTemplateInput) SetRestApiId(v string) *GetModelTemplateInput { - s.RestApiId = &v - return s -} - -// Represents a mapping template used to transform a payload. -// -// Mapping Templates (https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html#models-mappings-mappings) -type GetModelTemplateOutput struct { - _ struct{} `type:"structure"` - - // The Apache Velocity Template Language (VTL) (https://velocity.apache.org/engine/devel/vtl-reference-guide.html) - // template content used for the template resource. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s GetModelTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetModelTemplateOutput) GoString() string { - return s.String() -} - -// SetValue sets the Value field's value. -func (s *GetModelTemplateOutput) SetValue(v string) *GetModelTemplateOutput { - s.Value = &v - return s -} - -// Request to list existing Models defined for a RestApi resource. -type GetModelsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetModelsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetModelsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetModelsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetModelsInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *GetModelsInput) SetLimit(v int64) *GetModelsInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetModelsInput) SetPosition(v string) *GetModelsInput { - s.Position = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetModelsInput) SetRestApiId(v string) *GetModelsInput { - s.RestApiId = &v - return s -} - -// Represents a collection of Model resources. -// -// Method, MethodResponse, Models and Mappings (https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html) -type GetModelsOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*Model `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetModelsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetModelsOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetModelsOutput) SetItems(v []*Model) *GetModelsOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetModelsOutput) SetPosition(v string) *GetModelsOutput { - s.Position = &v - return s -} - -// Gets a RequestValidator of a given RestApi. -type GetRequestValidatorInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the RequestValidator to be retrieved. - // - // RequestValidatorId is a required field - RequestValidatorId *string `location:"uri" locationName:"requestvalidator_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRequestValidatorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRequestValidatorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRequestValidatorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRequestValidatorInput"} - if s.RequestValidatorId == nil { - invalidParams.Add(request.NewErrParamRequired("RequestValidatorId")) - } - if s.RequestValidatorId != nil && len(*s.RequestValidatorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RequestValidatorId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRequestValidatorId sets the RequestValidatorId field's value. -func (s *GetRequestValidatorInput) SetRequestValidatorId(v string) *GetRequestValidatorInput { - s.RequestValidatorId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetRequestValidatorInput) SetRestApiId(v string) *GetRequestValidatorInput { - s.RestApiId = &v - return s -} - -// Gets the RequestValidators collection of a given RestApi. -type GetRequestValidatorsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRequestValidatorsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRequestValidatorsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRequestValidatorsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRequestValidatorsInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *GetRequestValidatorsInput) SetLimit(v int64) *GetRequestValidatorsInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetRequestValidatorsInput) SetPosition(v string) *GetRequestValidatorsInput { - s.Position = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetRequestValidatorsInput) SetRestApiId(v string) *GetRequestValidatorsInput { - s.RestApiId = &v - return s -} - -// A collection of RequestValidator resources of a given RestApi. -// -// In OpenAPI, the RequestValidators of an API is defined by the x-amazon-apigateway-request-validators -// (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validators.html) -// extension. -// -// Enable Basic Request Validation in API Gateway (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) -type GetRequestValidatorsOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*UpdateRequestValidatorOutput `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetRequestValidatorsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRequestValidatorsOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetRequestValidatorsOutput) SetItems(v []*UpdateRequestValidatorOutput) *GetRequestValidatorsOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetRequestValidatorsOutput) SetPosition(v string) *GetRequestValidatorsOutput { - s.Position = &v - return s -} - -// Request to list information about a resource. -type GetResourceInput struct { - _ struct{} `type:"structure"` - - // A query parameter to retrieve the specified resources embedded in the returned - // Resource representation in the response. This embed parameter value is a - // list of comma-separated strings. Currently, the request supports only retrieval - // of the embedded Method resources this way. The query parameter value must - // be a single-valued list and contain the "methods" string. For example, GET - // /restapis/{restapi_id}/resources/{resource_id}?embed=methods. - Embed []*string `location:"querystring" locationName:"embed" type:"list"` - - // [Required] The identifier for the Resource resource. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEmbed sets the Embed field's value. -func (s *GetResourceInput) SetEmbed(v []*string) *GetResourceInput { - s.Embed = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *GetResourceInput) SetResourceId(v string) *GetResourceInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetResourceInput) SetRestApiId(v string) *GetResourceInput { - s.RestApiId = &v - return s -} - -// Request to list information about a collection of resources. -type GetResourcesInput struct { - _ struct{} `type:"structure"` - - // A query parameter used to retrieve the specified resources embedded in the - // returned Resources resource in the response. This embed parameter value is - // a list of comma-separated strings. Currently, the request supports only retrieval - // of the embedded Method resources this way. The query parameter value must - // be a single-valued list and contain the "methods" string. For example, GET - // /restapis/{restapi_id}/resources?embed=methods. - Embed []*string `location:"querystring" locationName:"embed" type:"list"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResourcesInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEmbed sets the Embed field's value. -func (s *GetResourcesInput) SetEmbed(v []*string) *GetResourcesInput { - s.Embed = v - return s -} - -// SetLimit sets the Limit field's value. -func (s *GetResourcesInput) SetLimit(v int64) *GetResourcesInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetResourcesInput) SetPosition(v string) *GetResourcesInput { - s.Position = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetResourcesInput) SetRestApiId(v string) *GetResourcesInput { - s.RestApiId = &v - return s -} - -// Represents a collection of Resource resources. -// -// Create an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) -type GetResourcesOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*Resource `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourcesOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetResourcesOutput) SetItems(v []*Resource) *GetResourcesOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetResourcesOutput) SetPosition(v string) *GetResourcesOutput { - s.Position = &v - return s -} - -// The GET request to list an existing RestApi defined for your collection. -type GetRestApiInput struct { - _ struct{} `type:"structure"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRestApiInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRestApiInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRestApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRestApiInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetRestApiInput) SetRestApiId(v string) *GetRestApiInput { - s.RestApiId = &v - return s -} - -// The GET request to list existing RestApis defined for your collection. -type GetRestApisInput struct { - _ struct{} `type:"structure"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetRestApisInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRestApisInput) GoString() string { - return s.String() -} - -// SetLimit sets the Limit field's value. -func (s *GetRestApisInput) SetLimit(v int64) *GetRestApisInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetRestApisInput) SetPosition(v string) *GetRestApisInput { - s.Position = &v - return s -} - -// Contains references to your APIs and links that guide you in how to interact -// with your collection. A collection offers a paginated view of your APIs. -// -// Create an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) -type GetRestApisOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*RestApi `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetRestApisOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRestApisOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetRestApisOutput) SetItems(v []*RestApi) *GetRestApisOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetRestApisOutput) SetPosition(v string) *GetRestApisOutput { - s.Position = &v - return s -} - -// Request a new generated client SDK for a RestApi and Stage. -type GetSdkInput struct { - _ struct{} `type:"structure"` - - // A string-to-string key-value map of query parameters sdkType-dependent properties - // of the SDK. For sdkType of objectivec or swift, a parameter named classPrefix - // is required. For sdkType of android, parameters named groupId, artifactId, - // artifactVersion, and invokerPackage are required. For sdkType of java, parameters - // named serviceName and javaPackageName are required. - Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] The language for the generated SDK. Currently java, javascript, - // android, objectivec (for iOS), swift (for iOS), and ruby are supported. - // - // SdkType is a required field - SdkType *string `location:"uri" locationName:"sdk_type" type:"string" required:"true"` - - // [Required] The name of the Stage that the SDK will use. - // - // StageName is a required field - StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSdkInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSdkInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSdkInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSdkInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.SdkType == nil { - invalidParams.Add(request.NewErrParamRequired("SdkType")) - } - if s.SdkType != nil && len(*s.SdkType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SdkType", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParameters sets the Parameters field's value. -func (s *GetSdkInput) SetParameters(v map[string]*string) *GetSdkInput { - s.Parameters = v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetSdkInput) SetRestApiId(v string) *GetSdkInput { - s.RestApiId = &v - return s -} - -// SetSdkType sets the SdkType field's value. -func (s *GetSdkInput) SetSdkType(v string) *GetSdkInput { - s.SdkType = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *GetSdkInput) SetStageName(v string) *GetSdkInput { - s.StageName = &v - return s -} - -// The binary blob response to GetSdk, which contains the generated SDK. -type GetSdkOutput struct { - _ struct{} `type:"structure" payload:"Body"` - - // The binary blob response to GetSdk, which contains the generated SDK. - Body []byte `locationName:"body" type:"blob"` - - // The content-disposition header value in the HTTP response. - ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` - - // The content-type header value in the HTTP response. - ContentType *string `location:"header" locationName:"Content-Type" type:"string"` -} - -// String returns the string representation -func (s GetSdkOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSdkOutput) GoString() string { - return s.String() -} - -// SetBody sets the Body field's value. -func (s *GetSdkOutput) SetBody(v []byte) *GetSdkOutput { - s.Body = v - return s -} - -// SetContentDisposition sets the ContentDisposition field's value. -func (s *GetSdkOutput) SetContentDisposition(v string) *GetSdkOutput { - s.ContentDisposition = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *GetSdkOutput) SetContentType(v string) *GetSdkOutput { - s.ContentType = &v - return s -} - -// Get an SdkType instance. -type GetSdkTypeInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the queried SdkType instance. - // - // Id is a required field - Id *string `location:"uri" locationName:"sdktype_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSdkTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSdkTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSdkTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSdkTypeInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetSdkTypeInput) SetId(v string) *GetSdkTypeInput { - s.Id = &v - return s -} - -// Get the SdkTypes collection. -type GetSdkTypesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetSdkTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSdkTypesInput) GoString() string { - return s.String() -} - -// SetLimit sets the Limit field's value. -func (s *GetSdkTypesInput) SetLimit(v int64) *GetSdkTypesInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetSdkTypesInput) SetPosition(v string) *GetSdkTypesInput { - s.Position = &v - return s -} - -// The collection of SdkType instances. -type GetSdkTypesOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*SdkType `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetSdkTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSdkTypesOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetSdkTypesOutput) SetItems(v []*SdkType) *GetSdkTypesOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetSdkTypesOutput) SetPosition(v string) *GetSdkTypesOutput { - s.Position = &v - return s -} - -// Requests API Gateway to get information about a Stage resource. -type GetStageInput struct { - _ struct{} `type:"structure"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] The name of the Stage resource to get information about. - // - // StageName is a required field - StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetStageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetStageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetStageInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetStageInput) SetRestApiId(v string) *GetStageInput { - s.RestApiId = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *GetStageInput) SetStageName(v string) *GetStageInput { - s.StageName = &v - return s -} - -// Requests API Gateway to get information about one or more Stage resources. -type GetStagesInput struct { - _ struct{} `type:"structure"` - - // The stages' deployment identifiers. - DeploymentId *string `location:"querystring" locationName:"deploymentId" type:"string"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetStagesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStagesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetStagesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetStagesInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *GetStagesInput) SetDeploymentId(v string) *GetStagesInput { - s.DeploymentId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *GetStagesInput) SetRestApiId(v string) *GetStagesInput { - s.RestApiId = &v - return s -} - -// A list of Stage resources that are associated with the ApiKey resource. -// -// Deploying API in Stages (https://docs.aws.amazon.com/apigateway/latest/developerguide/stages.html) -type GetStagesOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Item []*Stage `locationName:"item" type:"list"` -} - -// String returns the string representation -func (s GetStagesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStagesOutput) GoString() string { - return s.String() -} - -// SetItem sets the Item field's value. -func (s *GetStagesOutput) SetItem(v []*Stage) *GetStagesOutput { - s.Item = v - return s -} - -// Gets the Tags collection for a given resource. -type GetTagsInput struct { - _ struct{} `type:"structure"` - - // (Not currently supported) The maximum number of returned results per page. - // The default value is 25 and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // (Not currently supported) The current pagination position in the paged result - // set. - Position *string `location:"querystring" locationName:"position" type:"string"` - - // [Required] The ARN of a resource that can be tagged. The resource ARN must - // be URL-encoded. At present, Stage is the only taggable resource. - // - // ResourceArn is a required field - ResourceArn *string `location:"uri" locationName:"resource_arn" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTagsInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *GetTagsInput) SetLimit(v int64) *GetTagsInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetTagsInput) SetPosition(v string) *GetTagsInput { - s.Position = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *GetTagsInput) SetResourceArn(v string) *GetTagsInput { - s.ResourceArn = &v - return s -} - -// The collection of tags. Each tag element is associated with a given resource. -type GetTagsOutput struct { - _ struct{} `type:"structure"` - - // The collection of tags. Each tag element is associated with a given resource. - Tags map[string]*string `locationName:"tags" type:"map"` -} - -// String returns the string representation -func (s GetTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTagsOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *GetTagsOutput) SetTags(v map[string]*string) *GetTagsOutput { - s.Tags = v - return s -} - -// The GET request to get the usage data of a usage plan in a specified time -// interval. -type GetUsageInput struct { - _ struct{} `type:"structure"` - - // [Required] The ending date (e.g., 2016-12-31) of the usage data. - // - // EndDate is a required field - EndDate *string `location:"querystring" locationName:"endDate" type:"string" required:"true"` - - // The Id of the API key associated with the resultant usage data. - KeyId *string `location:"querystring" locationName:"keyId" type:"string"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` - - // [Required] The starting date (e.g., 2016-01-01) of the usage data. - // - // StartDate is a required field - StartDate *string `location:"querystring" locationName:"startDate" type:"string" required:"true"` - - // [Required] The Id of the usage plan associated with the usage data. - // - // UsagePlanId is a required field - UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetUsageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUsageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUsageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUsageInput"} - if s.EndDate == nil { - invalidParams.Add(request.NewErrParamRequired("EndDate")) - } - if s.StartDate == nil { - invalidParams.Add(request.NewErrParamRequired("StartDate")) - } - if s.UsagePlanId == nil { - invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) - } - if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndDate sets the EndDate field's value. -func (s *GetUsageInput) SetEndDate(v string) *GetUsageInput { - s.EndDate = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *GetUsageInput) SetKeyId(v string) *GetUsageInput { - s.KeyId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *GetUsageInput) SetLimit(v int64) *GetUsageInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetUsageInput) SetPosition(v string) *GetUsageInput { - s.Position = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *GetUsageInput) SetStartDate(v string) *GetUsageInput { - s.StartDate = &v - return s -} - -// SetUsagePlanId sets the UsagePlanId field's value. -func (s *GetUsageInput) SetUsagePlanId(v string) *GetUsageInput { - s.UsagePlanId = &v - return s -} - -// The GET request to get a usage plan of a given plan identifier. -type GetUsagePlanInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the UsagePlan resource to be retrieved. - // - // UsagePlanId is a required field - UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetUsagePlanInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUsagePlanInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUsagePlanInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUsagePlanInput"} - if s.UsagePlanId == nil { - invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) - } - if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUsagePlanId sets the UsagePlanId field's value. -func (s *GetUsagePlanInput) SetUsagePlanId(v string) *GetUsagePlanInput { - s.UsagePlanId = &v - return s -} - -// The GET request to get a usage plan key of a given key identifier. -type GetUsagePlanKeyInput struct { - _ struct{} `type:"structure"` - - // [Required] The key Id of the to-be-retrieved UsagePlanKey resource representing - // a plan customer. - // - // KeyId is a required field - KeyId *string `location:"uri" locationName:"keyId" type:"string" required:"true"` - - // [Required] The Id of the UsagePlan resource representing the usage plan containing - // the to-be-retrieved UsagePlanKey resource representing a plan customer. - // - // UsagePlanId is a required field - UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetUsagePlanKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUsagePlanKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUsagePlanKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUsagePlanKeyInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.UsagePlanId == nil { - invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) - } - if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *GetUsagePlanKeyInput) SetKeyId(v string) *GetUsagePlanKeyInput { - s.KeyId = &v - return s -} - -// SetUsagePlanId sets the UsagePlanId field's value. -func (s *GetUsagePlanKeyInput) SetUsagePlanId(v string) *GetUsagePlanKeyInput { - s.UsagePlanId = &v - return s -} - -// The GET request to get all the usage plan keys representing the API keys -// added to a specified usage plan. -type GetUsagePlanKeysInput struct { - _ struct{} `type:"structure"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // A query parameter specifying the name of the to-be-returned usage plan keys. - NameQuery *string `location:"querystring" locationName:"name" type:"string"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` - - // [Required] The Id of the UsagePlan resource representing the usage plan containing - // the to-be-retrieved UsagePlanKey resource representing a plan customer. - // - // UsagePlanId is a required field - UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetUsagePlanKeysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUsagePlanKeysInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUsagePlanKeysInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUsagePlanKeysInput"} - if s.UsagePlanId == nil { - invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) - } - if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *GetUsagePlanKeysInput) SetLimit(v int64) *GetUsagePlanKeysInput { - s.Limit = &v - return s -} - -// SetNameQuery sets the NameQuery field's value. -func (s *GetUsagePlanKeysInput) SetNameQuery(v string) *GetUsagePlanKeysInput { - s.NameQuery = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetUsagePlanKeysInput) SetPosition(v string) *GetUsagePlanKeysInput { - s.Position = &v - return s -} - -// SetUsagePlanId sets the UsagePlanId field's value. -func (s *GetUsagePlanKeysInput) SetUsagePlanId(v string) *GetUsagePlanKeysInput { - s.UsagePlanId = &v - return s -} - -// Represents the collection of usage plan keys added to usage plans for the -// associated API keys and, possibly, other types of keys. -// -// Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) -type GetUsagePlanKeysOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*UsagePlanKey `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetUsagePlanKeysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUsagePlanKeysOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetUsagePlanKeysOutput) SetItems(v []*UsagePlanKey) *GetUsagePlanKeysOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetUsagePlanKeysOutput) SetPosition(v string) *GetUsagePlanKeysOutput { - s.Position = &v - return s -} - -// The GET request to get all the usage plans of the caller's account. -type GetUsagePlansInput struct { - _ struct{} `type:"structure"` - - // The identifier of the API key associated with the usage plans. - KeyId *string `location:"querystring" locationName:"keyId" type:"string"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetUsagePlansInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUsagePlansInput) GoString() string { - return s.String() -} - -// SetKeyId sets the KeyId field's value. -func (s *GetUsagePlansInput) SetKeyId(v string) *GetUsagePlansInput { - s.KeyId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *GetUsagePlansInput) SetLimit(v int64) *GetUsagePlansInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetUsagePlansInput) SetPosition(v string) *GetUsagePlansInput { - s.Position = &v - return s -} - -// Represents a collection of usage plans for an AWS account. -// -// Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) -type GetUsagePlansOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*UsagePlan `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetUsagePlansOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUsagePlansOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetUsagePlansOutput) SetItems(v []*UsagePlan) *GetUsagePlansOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetUsagePlansOutput) SetPosition(v string) *GetUsagePlansOutput { - s.Position = &v - return s -} - -// Gets a specified VPC link under the caller's account in a region. -type GetVpcLinkInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the VpcLink. It is used in an Integration to - // reference this VpcLink. - // - // VpcLinkId is a required field - VpcLinkId *string `location:"uri" locationName:"vpclink_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetVpcLinkInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetVpcLinkInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetVpcLinkInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetVpcLinkInput"} - if s.VpcLinkId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcLinkId")) - } - if s.VpcLinkId != nil && len(*s.VpcLinkId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VpcLinkId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVpcLinkId sets the VpcLinkId field's value. -func (s *GetVpcLinkInput) SetVpcLinkId(v string) *GetVpcLinkInput { - s.VpcLinkId = &v - return s -} - -// Gets the VpcLinks collection under the caller's account in a selected region. -type GetVpcLinksInput struct { - _ struct{} `type:"structure"` - - // The maximum number of returned results per page. The default value is 25 - // and the maximum value is 500. - Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` - - // The current pagination position in the paged result set. - Position *string `location:"querystring" locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetVpcLinksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetVpcLinksInput) GoString() string { - return s.String() -} - -// SetLimit sets the Limit field's value. -func (s *GetVpcLinksInput) SetLimit(v int64) *GetVpcLinksInput { - s.Limit = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetVpcLinksInput) SetPosition(v string) *GetVpcLinksInput { - s.Position = &v - return s -} - -// The collection of VPC links under the caller's account in a region. -// -// Getting Started with Private Integrations (https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-with-private-integration.html), -// Set up Private Integrations (https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-private-integration.html) -type GetVpcLinksOutput struct { - _ struct{} `type:"structure"` - - // The current page of elements from this collection. - Items []*UpdateVpcLinkOutput `locationName:"item" type:"list"` - - Position *string `locationName:"position" type:"string"` -} - -// String returns the string representation -func (s GetVpcLinksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetVpcLinksOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetVpcLinksOutput) SetItems(v []*UpdateVpcLinkOutput) *GetVpcLinksOutput { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *GetVpcLinksOutput) SetPosition(v string) *GetVpcLinksOutput { - s.Position = &v - return s -} - -// The POST request to import API keys from an external source, such as a CSV-formatted -// file. -type ImportApiKeysInput struct { - _ struct{} `type:"structure" payload:"Body"` - - // The payload of the POST request to import API keys. For the payload format, - // see API Key File Format (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-key-file-format.html). - // - // Body is a required field - Body []byte `locationName:"body" type:"blob" required:"true"` - - // A query parameter to indicate whether to rollback ApiKey importation (true) - // or not (false) when error is encountered. - FailOnWarnings *bool `location:"querystring" locationName:"failonwarnings" type:"boolean"` - - // A query parameter to specify the input format to imported API keys. Currently, - // only the csv format is supported. - // - // Format is a required field - Format *string `location:"querystring" locationName:"format" type:"string" required:"true" enum:"ApiKeysFormat"` -} - -// String returns the string representation -func (s ImportApiKeysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportApiKeysInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportApiKeysInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportApiKeysInput"} - if s.Body == nil { - invalidParams.Add(request.NewErrParamRequired("Body")) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBody sets the Body field's value. -func (s *ImportApiKeysInput) SetBody(v []byte) *ImportApiKeysInput { - s.Body = v - return s -} - -// SetFailOnWarnings sets the FailOnWarnings field's value. -func (s *ImportApiKeysInput) SetFailOnWarnings(v bool) *ImportApiKeysInput { - s.FailOnWarnings = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *ImportApiKeysInput) SetFormat(v string) *ImportApiKeysInput { - s.Format = &v - return s -} - -// The identifier of an ApiKey used in a UsagePlan. -type ImportApiKeysOutput struct { - _ struct{} `type:"structure"` - - // A list of all the ApiKey identifiers. - Ids []*string `locationName:"ids" type:"list"` - - // A list of warning messages. - Warnings []*string `locationName:"warnings" type:"list"` -} - -// String returns the string representation -func (s ImportApiKeysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportApiKeysOutput) GoString() string { - return s.String() -} - -// SetIds sets the Ids field's value. -func (s *ImportApiKeysOutput) SetIds(v []*string) *ImportApiKeysOutput { - s.Ids = v - return s -} - -// SetWarnings sets the Warnings field's value. -func (s *ImportApiKeysOutput) SetWarnings(v []*string) *ImportApiKeysOutput { - s.Warnings = v - return s -} - -// Import documentation parts from an external (e.g., OpenAPI) definition file. -type ImportDocumentationPartsInput struct { - _ struct{} `type:"structure" payload:"Body"` - - // [Required] Raw byte array representing the to-be-imported documentation parts. - // To import from an OpenAPI file, this is a JSON object. - // - // Body is a required field - Body []byte `locationName:"body" type:"blob" required:"true"` - - // A query parameter to specify whether to rollback the documentation importation - // (true) or not (false) when a warning is encountered. The default value is - // false. - FailOnWarnings *bool `location:"querystring" locationName:"failonwarnings" type:"boolean"` - - // A query parameter to indicate whether to overwrite (OVERWRITE) any existing - // DocumentationParts definition or to merge (MERGE) the new definition into - // the existing one. The default value is MERGE. - Mode *string `location:"querystring" locationName:"mode" type:"string" enum:"PutMode"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s ImportDocumentationPartsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportDocumentationPartsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportDocumentationPartsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportDocumentationPartsInput"} - if s.Body == nil { - invalidParams.Add(request.NewErrParamRequired("Body")) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBody sets the Body field's value. -func (s *ImportDocumentationPartsInput) SetBody(v []byte) *ImportDocumentationPartsInput { - s.Body = v - return s -} - -// SetFailOnWarnings sets the FailOnWarnings field's value. -func (s *ImportDocumentationPartsInput) SetFailOnWarnings(v bool) *ImportDocumentationPartsInput { - s.FailOnWarnings = &v - return s -} - -// SetMode sets the Mode field's value. -func (s *ImportDocumentationPartsInput) SetMode(v string) *ImportDocumentationPartsInput { - s.Mode = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *ImportDocumentationPartsInput) SetRestApiId(v string) *ImportDocumentationPartsInput { - s.RestApiId = &v - return s -} - -// A collection of the imported DocumentationPart identifiers. -// -// This is used to return the result when documentation parts in an external -// (e.g., OpenAPI) file are imported into API Gateway -// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), -// documentationpart:import (https://docs.aws.amazon.com/apigateway/api-reference/link-relation/documentationpart-import/), -// DocumentationPart -type ImportDocumentationPartsOutput struct { - _ struct{} `type:"structure"` - - // A list of the returned documentation part identifiers. - Ids []*string `locationName:"ids" type:"list"` - - // A list of warning messages reported during import of documentation parts. - Warnings []*string `locationName:"warnings" type:"list"` -} - -// String returns the string representation -func (s ImportDocumentationPartsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportDocumentationPartsOutput) GoString() string { - return s.String() -} - -// SetIds sets the Ids field's value. -func (s *ImportDocumentationPartsOutput) SetIds(v []*string) *ImportDocumentationPartsOutput { - s.Ids = v - return s -} - -// SetWarnings sets the Warnings field's value. -func (s *ImportDocumentationPartsOutput) SetWarnings(v []*string) *ImportDocumentationPartsOutput { - s.Warnings = v - return s -} - -// A POST request to import an API to API Gateway using an input of an API definition -// file. -type ImportRestApiInput struct { - _ struct{} `type:"structure" payload:"Body"` - - // [Required] The POST request body containing external API definitions. Currently, - // only OpenAPI definition JSON/YAML files are supported. The maximum size of - // the API definition file is 2MB. - // - // Body is a required field - Body []byte `locationName:"body" type:"blob" required:"true"` - - // A query parameter to indicate whether to rollback the API creation (true) - // or not (false) when a warning is encountered. The default value is false. - FailOnWarnings *bool `location:"querystring" locationName:"failonwarnings" type:"boolean"` - - // A key-value map of context-specific query string parameters specifying the - // behavior of different API importing operations. The following shows operation-specific - // parameters and their supported values. - // - // To exclude DocumentationParts from the import, set parameters as ignore=documentation. - // - // To configure the endpoint type, set parameters as endpointConfigurationTypes=EDGE, - // endpointConfigurationTypes=REGIONAL, or endpointConfigurationTypes=PRIVATE. - // The default endpoint type is EDGE. - // - // To handle imported basePath, set parameters as basePath=ignore, basePath=prepend - // or basePath=split. - // - // For example, the AWS CLI command to exclude documentation from the imported - // API is: - // - // aws apigateway import-rest-api --parameters ignore=documentation --body - // 'file:///path/to/imported-api-body.json' - // The AWS CLI command to set the regional endpoint on the imported API is: - // - // aws apigateway import-rest-api --parameters endpointConfigurationTypes=REGIONAL - // --body 'file:///path/to/imported-api-body.json' - Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` -} - -// String returns the string representation -func (s ImportRestApiInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportRestApiInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportRestApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportRestApiInput"} - if s.Body == nil { - invalidParams.Add(request.NewErrParamRequired("Body")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBody sets the Body field's value. -func (s *ImportRestApiInput) SetBody(v []byte) *ImportRestApiInput { - s.Body = v - return s -} - -// SetFailOnWarnings sets the FailOnWarnings field's value. -func (s *ImportRestApiInput) SetFailOnWarnings(v bool) *ImportRestApiInput { - s.FailOnWarnings = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ImportRestApiInput) SetParameters(v map[string]*string) *ImportRestApiInput { - s.Parameters = v - return s -} - -// Represents an HTTP, HTTP_PROXY, AWS, AWS_PROXY, or Mock integration. -// -// In the API Gateway console, the built-in Lambda integration is an AWS integration. -// -// Creating an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) -type Integration struct { - _ struct{} `type:"structure"` - - // Specifies the integration's cache key parameters. - CacheKeyParameters []*string `locationName:"cacheKeyParameters" type:"list"` - - // Specifies the integration's cache namespace. - CacheNamespace *string `locationName:"cacheNamespace" type:"string"` - - // The (id (https://docs.aws.amazon.com/apigateway/api-reference/resource/vpc-link/#id)) - // of the VpcLink used for the integration when connectionType=VPC_LINK and - // undefined, otherwise. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // The type of the network connection to the integration endpoint. The valid - // value is INTERNET for connections through the public routable internet or - // VPC_LINK for private connections between API Gateway and a network load balancer - // in a VPC. The default value is INTERNET. - ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` - - // Specifies how to handle request payload content type conversions. Supported - // values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: - // - // * CONVERT_TO_BINARY: Converts a request payload from a Base64-encoded - // string to the corresponding binary blob. - // - // * CONVERT_TO_TEXT: Converts a request payload from a binary blob to a - // Base64-encoded string. - // - // If this property is not defined, the request payload will be passed through - // from the method request to integration request without modification, provided - // that the passthroughBehaviors is configured to support payload pass-through. - ContentHandling *string `locationName:"contentHandling" type:"string" enum:"ContentHandlingStrategy"` - - // Specifies the credentials required for the integration, if any. For AWS integrations, - // three options are available. To specify an IAM Role for API Gateway to assume, - // use the role's Amazon Resource Name (ARN). To require that the caller's identity - // be passed through from the request, specify the string arn:aws:iam::\*:user/\*. - // To use resource-based permissions on supported AWS services, specify null. - Credentials *string `locationName:"credentials" type:"string"` - - // Specifies the integration's HTTP method type. - HttpMethod *string `locationName:"httpMethod" type:"string"` - - // Specifies the integration's responses. - // - // Example: Get integration responses of a method - // - // Request - // - // GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 - // HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com - // X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, - // SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} - // Response - // - // The successful response returns 200 OKstatus and a payload as follows: - // - // { "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", - // "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", - // "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" - // }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" - // } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" - // }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream - // in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" - // }, "statusCode": "200" } - IntegrationResponses map[string]*IntegrationResponse `locationName:"integrationResponses" type:"map"` - - // Specifies how the method request body of an unmapped content type will be - // passed through the integration request to the back end without transformation. - // A content type is unmapped if no mapping template is defined in the integration - // or the content type does not match any of the mapped content types, as specified - // in requestTemplates. The valid value is one of the following: - // - // WHEN_NO_MATCH: passes the method request body through the integration request - // to the back end without transformation when the method request content type - // does not match any content type associated with the mapping templates defined - // in the integration request. - // WHEN_NO_TEMPLATES: passes the method request body through the integration - // request to the back end without transformation when no mapping template is - // defined in the integration request. If a template is defined when this option - // is selected, the method request of an unmapped content-type will be rejected - // with an HTTP 415 Unsupported Media Type response. - // NEVER: rejects the method request with an HTTP 415 Unsupported Media Type - // response when either the method request content type does not match any content - // type associated with the mapping templates defined in the integration request - // or no mapping template is defined in the integration request. - PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string"` - - // A key-value map specifying request parameters that are passed from the method - // request to the back end. The key is an integration request parameter name - // and the associated value is a method request parameter value or static value - // that must be enclosed within single quotes and pre-encoded as required by - // the back end. The method request parameter value must match the pattern of - // method.request.{location}.{name}, where location is querystring, path, or - // header and name must be a valid and unique method request parameter name. - RequestParameters map[string]*string `locationName:"requestParameters" type:"map"` - - // Represents a map of Velocity templates that are applied on the request payload - // based on the value of the Content-Type header sent by the client. The content - // type value is the key in this map, and the template (as a String) is the - // value. - RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` - - // Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 - // milliseconds or 29 seconds. - TimeoutInMillis *int64 `locationName:"timeoutInMillis" type:"integer"` - - // Specifies an API method integration type. The valid value is one of the following: - // - // * AWS: for integrating the API method request with an AWS service action, - // including the Lambda function-invoking action. With the Lambda function-invoking - // action, this is referred to as the Lambda custom integration. With any - // other AWS service action, this is known as AWS integration. - // * AWS_PROXY: for integrating the API method request with the Lambda function-invoking - // action with the client request passed through as-is. This integration - // is also referred to as the Lambda proxy integration. - // * HTTP: for integrating the API method request with an HTTP endpoint, - // including a private HTTP endpoint within a VPC. This integration is also - // referred to as the HTTP custom integration. - // * HTTP_PROXY: for integrating the API method request with an HTTP endpoint, - // including a private HTTP endpoint within a VPC, with the client request - // passed through as-is. This is also referred to as the HTTP proxy integration. - // - // * MOCK: for integrating the API method request with API Gateway as a "loop-back" - // endpoint without invoking any backend. - // For the HTTP and HTTP proxy integrations, each integration can specify a - // protocol (http/https), port and path. Standard 80 and 443 ports are supported - // as well as custom ports above 1024. An HTTP or HTTP proxy integration with - // a connectionType of VPC_LINK is referred to as a private integration and - // uses a VpcLink to connect API Gateway to a network load balancer of a VPC. - Type *string `locationName:"type" type:"string" enum:"IntegrationType"` - - // Specifies Uniform Resource Identifier (URI) of the integration endpoint. - // - // * For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, - // encoded HTTP(S) URL according to the RFC-3986 specification (_blank), - // for either standard integration, where connectionType is not VPC_LINK, - // or private integration, where connectionType is VPC_LINK. For a private - // HTTP integration, the URI is not used for routing. - // - // * For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. - // Here, {Region} is the API Gateway region (e.g., us-east-1); {service} - // is the name of the integrated AWS service (e.g., s3); and {subdomain} - // is a designated subdomain supported by certain AWS service for fast host-name - // lookup. action can be used for an AWS service action-based API, using - // an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} - // refers to a supported action {name} plus any required input parameters. - // Alternatively, path can be used for an AWS service path-based API. The - // ensuing service_api refers to the path to an AWS service resource, including - // the region of the integrated AWS service, if applicable. For example, - // for integration with the S3 API of GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html), - // the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} - // or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} - Uri *string `locationName:"uri" type:"string"` -} - -// String returns the string representation -func (s Integration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Integration) GoString() string { - return s.String() -} - -// SetCacheKeyParameters sets the CacheKeyParameters field's value. -func (s *Integration) SetCacheKeyParameters(v []*string) *Integration { - s.CacheKeyParameters = v - return s -} - -// SetCacheNamespace sets the CacheNamespace field's value. -func (s *Integration) SetCacheNamespace(v string) *Integration { - s.CacheNamespace = &v - return s -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *Integration) SetConnectionId(v string) *Integration { - s.ConnectionId = &v - return s -} - -// SetConnectionType sets the ConnectionType field's value. -func (s *Integration) SetConnectionType(v string) *Integration { - s.ConnectionType = &v - return s -} - -// SetContentHandling sets the ContentHandling field's value. -func (s *Integration) SetContentHandling(v string) *Integration { - s.ContentHandling = &v - return s -} - -// SetCredentials sets the Credentials field's value. -func (s *Integration) SetCredentials(v string) *Integration { - s.Credentials = &v - return s -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *Integration) SetHttpMethod(v string) *Integration { - s.HttpMethod = &v - return s -} - -// SetIntegrationResponses sets the IntegrationResponses field's value. -func (s *Integration) SetIntegrationResponses(v map[string]*IntegrationResponse) *Integration { - s.IntegrationResponses = v - return s -} - -// SetPassthroughBehavior sets the PassthroughBehavior field's value. -func (s *Integration) SetPassthroughBehavior(v string) *Integration { - s.PassthroughBehavior = &v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *Integration) SetRequestParameters(v map[string]*string) *Integration { - s.RequestParameters = v - return s -} - -// SetRequestTemplates sets the RequestTemplates field's value. -func (s *Integration) SetRequestTemplates(v map[string]*string) *Integration { - s.RequestTemplates = v - return s -} - -// SetTimeoutInMillis sets the TimeoutInMillis field's value. -func (s *Integration) SetTimeoutInMillis(v int64) *Integration { - s.TimeoutInMillis = &v - return s -} - -// SetType sets the Type field's value. -func (s *Integration) SetType(v string) *Integration { - s.Type = &v - return s -} - -// SetUri sets the Uri field's value. -func (s *Integration) SetUri(v string) *Integration { - s.Uri = &v - return s -} - -// Represents an integration response. The status code must map to an existing -// MethodResponse, and parameters and templates can be used to transform the -// back-end response. -// -// Creating an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) -type IntegrationResponse struct { - _ struct{} `type:"structure"` - - // Specifies how to handle response payload content type conversions. Supported - // values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: - // - // * CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded - // string to the corresponding binary blob. - // - // * CONVERT_TO_TEXT: Converts a response payload from a binary blob to a - // Base64-encoded string. - // - // If this property is not defined, the response payload will be passed through - // from the integration response to the method response without modification. - ContentHandling *string `locationName:"contentHandling" type:"string" enum:"ContentHandlingStrategy"` - - // A key-value map specifying response parameters that are passed to the method - // response from the back end. The key is a method response header parameter - // name and the mapped value is an integration response header value, a static - // value enclosed within a pair of single quotes, or a JSON expression from - // the integration response body. The mapping key must match the pattern of - // method.response.header.{name}, where name is a valid and unique header name. - // The mapped non-static value must match the pattern of integration.response.header.{name} - // or integration.response.body.{JSON-expression}, where name is a valid and - // unique response header name and JSON-expression is a valid JSON expression - // without the $ prefix. - ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` - - // Specifies the templates used to transform the integration response body. - // Response templates are represented as a key/value map, with a content-type - // as the key and a template as the value. - ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` - - // Specifies the regular expression (regex) pattern used to choose an integration - // response based on the response from the back end. For example, if the success - // response returns nothing and the error response returns some string, you - // could use the .+ regex to match error response. However, make sure that the - // error response does not contain any newline (\n) character in such cases. - // If the back end is an AWS Lambda function, the AWS Lambda function error - // header is matched. For all other HTTP and AWS back ends, the HTTP status - // code is matched. - SelectionPattern *string `locationName:"selectionPattern" type:"string"` - - // Specifies the status code that is used to map the integration response to - // an existing MethodResponse. - StatusCode *string `locationName:"statusCode" type:"string"` -} - -// String returns the string representation -func (s IntegrationResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IntegrationResponse) GoString() string { - return s.String() -} - -// SetContentHandling sets the ContentHandling field's value. -func (s *IntegrationResponse) SetContentHandling(v string) *IntegrationResponse { - s.ContentHandling = &v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *IntegrationResponse) SetResponseParameters(v map[string]*string) *IntegrationResponse { - s.ResponseParameters = v - return s -} - -// SetResponseTemplates sets the ResponseTemplates field's value. -func (s *IntegrationResponse) SetResponseTemplates(v map[string]*string) *IntegrationResponse { - s.ResponseTemplates = v - return s -} - -// SetSelectionPattern sets the SelectionPattern field's value. -func (s *IntegrationResponse) SetSelectionPattern(v string) *IntegrationResponse { - s.SelectionPattern = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *IntegrationResponse) SetStatusCode(v string) *IntegrationResponse { - s.StatusCode = &v - return s -} - -// Represents a client-facing interface by which the client calls the API to -// access back-end resources. A Method resource is integrated with an Integration -// resource. Both consist of a request and one or more responses. The method -// request takes the client input that is passed to the back end through the -// integration request. A method response returns the output from the back end -// to the client through an integration response. A method request is embodied -// in a Method resource, whereas an integration request is embodied in an Integration -// resource. On the other hand, a method response is represented by a MethodResponse -// resource, whereas an integration response is represented by an IntegrationResponse -// resource. -// -// Example: Retrive the GET method on a specified resource -// -// Request -// -// The following example request retrieves the information about the GET method -// on an API resource (3kzxbg5sa2) of an API (fugvjdxtri). -// -// GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1 Content-Type: -// application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: -// 20160603T210259Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160603/us-east-1/apigateway/aws4_request, -// SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} -// Response -// -// The successful response returns a 200 OK status code and a payload similar -// to the following: -// -// { "_links": { "curies": [ { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", -// "name": "integration", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", -// "name": "integrationresponse", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", -// "name": "method", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", -// "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET", -// "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" -// }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" -// }, "method:integration": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" -// }, "method:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", -// "name": "200", "title": "200" }, "method:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" -// }, "methodresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/{status_code}", -// "templated": true } }, "apiKeyRequired": true, "authorizationType": "NONE", -// "httpMethod": "GET", "_embedded": { "method:integration": { "_links": -// { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" -// }, "integration:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" -// }, "integration:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", -// "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" -// }, "integrationresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/{status_code}", -// "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2", -// "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": -// "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestParameters": { -// "integration.request.header.Content-Type": "'application/x-amz-json-1.1'" -// }, "requestTemplates": { "application/json": "{\n}" }, "type": "AWS", -// "uri": "arn:aws:apigateway:us-east-1:kinesis:action/ListStreams", "_embedded": -// { "integration:responses": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", -// "name": "200", "title": "200" }, "integrationresponse:delete": { "href": -// "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" -// }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" -// } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" -// }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E\")" -// }, "statusCode": "200" } } }, "method:responses": { "_links": { "self": -// { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", -// "name": "200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" -// }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" -// } }, "responseModels": { "application/json": "Empty" }, "responseParameters": -// { "method.response.header.Content-Type": false }, "statusCode": "200" -// } } } -// In the example above, the response template for the 200 OK response maps -// the JSON output from the ListStreams action in the back end to an XML output. -// The mapping template is URL-encoded as %3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E -// and the output is decoded using the $util.urlDecode() (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#util-templat-reference) -// helper function. -// -// MethodResponse, Integration, IntegrationResponse, Resource, Set up an API's method (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-method-settings.html) -type Method struct { - _ struct{} `type:"structure"` - - // A boolean flag specifying whether a valid ApiKey is required to invoke this - // method. - ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` - - // A list of authorization scopes configured on the method. The scopes are used - // with a COGNITO_USER_POOLS authorizer to authorize the method invocation. - // The authorization works by matching the method scopes against the scopes - // parsed from the access token in the incoming request. The method invocation - // is authorized if any method scopes matches a claimed scope in the access - // token. Otherwise, the invocation is not authorized. When the method scope - // is configured, the client must provide an access token instead of an identity - // token for authorization purposes. - AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` - - // The method's authorization type. Valid values are NONE for open access, AWS_IAM - // for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS - // for using a Cognito user pool. - AuthorizationType *string `locationName:"authorizationType" type:"string"` - - // The identifier of an Authorizer to use on this method. The authorizationType - // must be CUSTOM. - AuthorizerId *string `locationName:"authorizerId" type:"string"` - - // The method's HTTP verb. - HttpMethod *string `locationName:"httpMethod" type:"string"` - - // Gets the method's integration responsible for passing the client-submitted - // request to the back end and performing necessary transformations to make - // the request compliant with the back end. - // - // Example: - // - // Request - // - // GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1 - // Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: - // 117 X-Amz-Date: 20160613T213210Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, - // SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} - // Response - // - // The successful response returns a 200 OKstatus code and a payload similar to the following: - // - // { "_links": { "curies": [ { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", - // "name": "integration", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", - // "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" - // }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" - // }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", - // "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" - // }, "integrationresponse:put": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}", - // "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "0cjtch", - // "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": - // "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestTemplates": { "application/json": - // "{\n \"a\": \"$input.params('operand1')\",\n \"b\": \"$input.params('operand2')\", - // \n \"op\": \"$input.params('operator')\" \n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations", - // "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", - // "name": "200", "title": "200" }, "integrationresponse:delete": { "href": - // "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" - // }, "integrationresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" - // } }, "responseParameters": { "method.response.header.operator": "integration.response.body.op", - // "method.response.header.operand_2": "integration.response.body.b", "method.response.header.operand_1": - // "integration.response.body.a" }, "responseTemplates": { "application/json": - // "#set($res = $input.path('$'))\n{\n \"result\": \"$res.a, $res.b, $res.op - // => $res.c\",\n \"a\" : \"$res.a\",\n \"b\" : \"$res.b\",\n \"op\" : \"$res.op\",\n - // \"c\" : \"$res.c\"\n}" }, "selectionPattern": "", "statusCode": "200" } } - // } - MethodIntegration *Integration `locationName:"methodIntegration" type:"structure"` - - // Gets a method response associated with a given HTTP status code. - // - // The collection of method responses are encapsulated in a key-value map, where - // the key is a response's HTTP status code and the value is a MethodResponse - // resource that specifies the response returned to the caller from the back - // end through the integration response. - // - // Example: Get a 200 OK response of a GET method - // - // Request - // - // GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1 - // Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com - // Content-Length: 117 X-Amz-Date: 20160613T215008Z Authorization: AWS4-HMAC-SHA256 - // Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, - // SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} - // Response - // - // The successful response returns a 200 OK status code and a payload similar - // to the following: - // - // { "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", - // "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", - // "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" - // }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" - // } }, "responseModels": { "application/json": "Empty" }, "responseParameters": - // { "method.response.header.operator": false, "method.response.header.operand_2": - // false, "method.response.header.operand_1": false }, "statusCode": "200" - // } - MethodResponses map[string]*MethodResponse `locationName:"methodResponses" type:"map"` - - // A human-friendly operation identifier for the method. For example, you can - // assign the operationName of ListPets for the GET /pets method in PetStore - // (https://petstore-demo-endpoint.execute-api.com/petstore/pets) example. - OperationName *string `locationName:"operationName" type:"string"` - - // A key-value map specifying data schemas, represented by Model resources, - // (as the mapped value) of the request payloads of given content types (as - // the mapping key). - RequestModels map[string]*string `locationName:"requestModels" type:"map"` - - // A key-value map defining required or optional method request parameters that - // can be accepted by API Gateway. A key is a method request parameter name - // matching the pattern of method.request.{location}.{name}, where location - // is querystring, path, or header and name is a valid and unique parameter - // name. The value associated with the key is a Boolean flag indicating whether - // the parameter is required (true) or optional (false). The method request - // parameter names defined here are available in Integration to be mapped to - // integration request parameters or templates. - RequestParameters map[string]*bool `locationName:"requestParameters" type:"map"` - - // The identifier of a RequestValidator for request validation. - RequestValidatorId *string `locationName:"requestValidatorId" type:"string"` -} - -// String returns the string representation -func (s Method) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Method) GoString() string { - return s.String() -} - -// SetApiKeyRequired sets the ApiKeyRequired field's value. -func (s *Method) SetApiKeyRequired(v bool) *Method { - s.ApiKeyRequired = &v - return s -} - -// SetAuthorizationScopes sets the AuthorizationScopes field's value. -func (s *Method) SetAuthorizationScopes(v []*string) *Method { - s.AuthorizationScopes = v - return s -} - -// SetAuthorizationType sets the AuthorizationType field's value. -func (s *Method) SetAuthorizationType(v string) *Method { - s.AuthorizationType = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *Method) SetAuthorizerId(v string) *Method { - s.AuthorizerId = &v - return s -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *Method) SetHttpMethod(v string) *Method { - s.HttpMethod = &v - return s -} - -// SetMethodIntegration sets the MethodIntegration field's value. -func (s *Method) SetMethodIntegration(v *Integration) *Method { - s.MethodIntegration = v - return s -} - -// SetMethodResponses sets the MethodResponses field's value. -func (s *Method) SetMethodResponses(v map[string]*MethodResponse) *Method { - s.MethodResponses = v - return s -} - -// SetOperationName sets the OperationName field's value. -func (s *Method) SetOperationName(v string) *Method { - s.OperationName = &v - return s -} - -// SetRequestModels sets the RequestModels field's value. -func (s *Method) SetRequestModels(v map[string]*string) *Method { - s.RequestModels = v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *Method) SetRequestParameters(v map[string]*bool) *Method { - s.RequestParameters = v - return s -} - -// SetRequestValidatorId sets the RequestValidatorId field's value. -func (s *Method) SetRequestValidatorId(v string) *Method { - s.RequestValidatorId = &v - return s -} - -// Represents a method response of a given HTTP status code returned to the -// client. The method response is passed from the back end through the associated -// integration response that can be transformed using a mapping template. -// -// Example: A MethodResponse instance of an API -// -// Request -// -// The example request retrieves a MethodResponse of the 200 status code. -// -// GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200 -// HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com -// X-Amz-Date: 20160603T222952Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160603/us-east-1/apigateway/aws4_request, -// SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} -// Response -// -// The successful response returns 200 OK status and a payload as follows: -// -// { "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", -// "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", -// "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" -// }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" -// } }, "responseModels": { "application/json": "Empty" }, "responseParameters": -// { "method.response.header.Content-Type": false }, "statusCode": "200" -// } -type MethodResponse struct { - _ struct{} `type:"structure"` - - // Specifies the Model resources used for the response's content-type. Response - // models are represented as a key/value map, with a content-type as the key - // and a Model name as the value. - ResponseModels map[string]*string `locationName:"responseModels" type:"map"` - - // A key-value map specifying required or optional response parameters that - // API Gateway can send back to the caller. A key defines a method response - // header and the value specifies whether the associated method response header - // is required or not. The expression of the key must match the pattern method.response.header.{name}, - // where name is a valid and unique header name. API Gateway passes certain - // integration response data to the method response headers specified here according - // to the mapping you prescribe in the API's IntegrationResponse. The integration - // response data that can be mapped include an integration response header expressed - // in integration.response.header.{name}, a static value enclosed within a pair - // of single quotes (e.g., 'application/json'), or a JSON expression from the - // back-end response payload in the form of integration.response.body.{JSON-expression}, - // where JSON-expression is a valid JSON expression without the $ prefix.) - ResponseParameters map[string]*bool `locationName:"responseParameters" type:"map"` - - // The method response's status code. - StatusCode *string `locationName:"statusCode" type:"string"` -} - -// String returns the string representation -func (s MethodResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MethodResponse) GoString() string { - return s.String() -} - -// SetResponseModels sets the ResponseModels field's value. -func (s *MethodResponse) SetResponseModels(v map[string]*string) *MethodResponse { - s.ResponseModels = v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *MethodResponse) SetResponseParameters(v map[string]*bool) *MethodResponse { - s.ResponseParameters = v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *MethodResponse) SetStatusCode(v string) *MethodResponse { - s.StatusCode = &v - return s -} - -// Specifies the method setting properties. -type MethodSetting struct { - _ struct{} `type:"structure"` - - // Specifies whether the cached responses are encrypted. The PATCH path for - // this setting is /{method_setting_key}/caching/dataEncrypted, and the value - // is a Boolean. - CacheDataEncrypted *bool `locationName:"cacheDataEncrypted" type:"boolean"` - - // Specifies the time to live (TTL), in seconds, for cached responses. The higher - // the TTL, the longer the response will be cached. The PATCH path for this - // setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an - // integer. - CacheTtlInSeconds *int64 `locationName:"cacheTtlInSeconds" type:"integer"` - - // Specifies whether responses should be cached and returned for requests. A - // cache cluster must be enabled on the stage for responses to be cached. The - // PATCH path for this setting is /{method_setting_key}/caching/enabled, and - // the value is a Boolean. - CachingEnabled *bool `locationName:"cachingEnabled" type:"boolean"` - - // Specifies whether data trace logging is enabled for this method, which affects - // the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this - // setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean. - DataTraceEnabled *bool `locationName:"dataTraceEnabled" type:"boolean"` - - // Specifies the logging level for this method, which affects the log entries - // pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, - // and the available levels are OFF, ERROR, and INFO. - LoggingLevel *string `locationName:"loggingLevel" type:"string"` - - // Specifies whether Amazon CloudWatch metrics are enabled for this method. - // The PATCH path for this setting is /{method_setting_key}/metrics/enabled, - // and the value is a Boolean. - MetricsEnabled *bool `locationName:"metricsEnabled" type:"boolean"` - - // Specifies whether authorization is required for a cache invalidation request. - // The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl, - // and the value is a Boolean. - RequireAuthorizationForCacheControl *bool `locationName:"requireAuthorizationForCacheControl" type:"boolean"` - - // Specifies the throttling burst limit. The PATCH path for this setting is - // /{method_setting_key}/throttling/burstLimit, and the value is an integer. - ThrottlingBurstLimit *int64 `locationName:"throttlingBurstLimit" type:"integer"` - - // Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit, - // and the value is a double. - ThrottlingRateLimit *float64 `locationName:"throttlingRateLimit" type:"double"` - - // Specifies how to handle unauthorized requests for cache invalidation. The - // PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, - // and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, - // SUCCEED_WITHOUT_RESPONSE_HEADER. - UnauthorizedCacheControlHeaderStrategy *string `locationName:"unauthorizedCacheControlHeaderStrategy" type:"string" enum:"UnauthorizedCacheControlHeaderStrategy"` -} - -// String returns the string representation -func (s MethodSetting) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MethodSetting) GoString() string { - return s.String() -} - -// SetCacheDataEncrypted sets the CacheDataEncrypted field's value. -func (s *MethodSetting) SetCacheDataEncrypted(v bool) *MethodSetting { - s.CacheDataEncrypted = &v - return s -} - -// SetCacheTtlInSeconds sets the CacheTtlInSeconds field's value. -func (s *MethodSetting) SetCacheTtlInSeconds(v int64) *MethodSetting { - s.CacheTtlInSeconds = &v - return s -} - -// SetCachingEnabled sets the CachingEnabled field's value. -func (s *MethodSetting) SetCachingEnabled(v bool) *MethodSetting { - s.CachingEnabled = &v - return s -} - -// SetDataTraceEnabled sets the DataTraceEnabled field's value. -func (s *MethodSetting) SetDataTraceEnabled(v bool) *MethodSetting { - s.DataTraceEnabled = &v - return s -} - -// SetLoggingLevel sets the LoggingLevel field's value. -func (s *MethodSetting) SetLoggingLevel(v string) *MethodSetting { - s.LoggingLevel = &v - return s -} - -// SetMetricsEnabled sets the MetricsEnabled field's value. -func (s *MethodSetting) SetMetricsEnabled(v bool) *MethodSetting { - s.MetricsEnabled = &v - return s -} - -// SetRequireAuthorizationForCacheControl sets the RequireAuthorizationForCacheControl field's value. -func (s *MethodSetting) SetRequireAuthorizationForCacheControl(v bool) *MethodSetting { - s.RequireAuthorizationForCacheControl = &v - return s -} - -// SetThrottlingBurstLimit sets the ThrottlingBurstLimit field's value. -func (s *MethodSetting) SetThrottlingBurstLimit(v int64) *MethodSetting { - s.ThrottlingBurstLimit = &v - return s -} - -// SetThrottlingRateLimit sets the ThrottlingRateLimit field's value. -func (s *MethodSetting) SetThrottlingRateLimit(v float64) *MethodSetting { - s.ThrottlingRateLimit = &v - return s -} - -// SetUnauthorizedCacheControlHeaderStrategy sets the UnauthorizedCacheControlHeaderStrategy field's value. -func (s *MethodSetting) SetUnauthorizedCacheControlHeaderStrategy(v string) *MethodSetting { - s.UnauthorizedCacheControlHeaderStrategy = &v - return s -} - -// Represents a summary of a Method resource, given a particular date and time. -type MethodSnapshot struct { - _ struct{} `type:"structure"` - - // Specifies whether the method requires a valid ApiKey. - ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` - - // The method's authorization type. Valid values are NONE for open access, AWS_IAM - // for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS - // for using a Cognito user pool. - AuthorizationType *string `locationName:"authorizationType" type:"string"` -} - -// String returns the string representation -func (s MethodSnapshot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MethodSnapshot) GoString() string { - return s.String() -} - -// SetApiKeyRequired sets the ApiKeyRequired field's value. -func (s *MethodSnapshot) SetApiKeyRequired(v bool) *MethodSnapshot { - s.ApiKeyRequired = &v - return s -} - -// SetAuthorizationType sets the AuthorizationType field's value. -func (s *MethodSnapshot) SetAuthorizationType(v string) *MethodSnapshot { - s.AuthorizationType = &v - return s -} - -// Represents the data structure of a method's request or response payload. -// -// A request model defines the data structure of the client-supplied request -// payload. A response model defines the data structure of the response payload -// returned by the back end. Although not required, models are useful for mapping -// payloads between the front end and back end. -// -// A model is used for generating an API's SDK, validating the input request -// body, and creating a skeletal mapping template. -// -// Method, MethodResponse, Models and Mappings (https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html) -type Model struct { - _ struct{} `type:"structure"` - - // The content-type for the model. - ContentType *string `locationName:"contentType" type:"string"` - - // The description of the model. - Description *string `locationName:"description" type:"string"` - - // The identifier for the model resource. - Id *string `locationName:"id" type:"string"` - - // The name of the model. Must be an alphanumeric string. - Name *string `locationName:"name" type:"string"` - - // The schema for the model. For application/json models, this should be JSON - // schema draft 4 (https://tools.ietf.org/html/draft-zyp-json-schema-04) model. - // Do not include "\*/" characters in the description of any properties because - // such "\*/" characters may be interpreted as the closing marker for comments - // in some languages, such as Java or JavaScript, causing the installation of - // your API's SDK generated by API Gateway to fail. - Schema *string `locationName:"schema" type:"string"` -} - -// String returns the string representation -func (s Model) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Model) GoString() string { - return s.String() -} - -// SetContentType sets the ContentType field's value. -func (s *Model) SetContentType(v string) *Model { - s.ContentType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Model) SetDescription(v string) *Model { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *Model) SetId(v string) *Model { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *Model) SetName(v string) *Model { - s.Name = &v - return s -} - -// SetSchema sets the Schema field's value. -func (s *Model) SetSchema(v string) *Model { - s.Schema = &v - return s -} - -// A single patch operation to apply to the specified resource. Please refer -// to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how -// each operation is used. -type PatchOperation struct { - _ struct{} `type:"structure"` - - // The copy update operation's source as identified by a JSON-Pointer value - // referencing the location within the targeted resource to copy the value from. - // For example, to promote a canary deployment, you copy the canary deployment - // ID to the affiliated deployment ID by calling a PATCH request on a Stage - // resource with "op":"copy", "from":"/canarySettings/deploymentId" and "path":"/deploymentId". - From *string `locationName:"from" type:"string"` - - // An update operation to be performed with this PATCH request. The valid value - // can be add, remove, replace or copy. Not all valid operations are supported - // for a given resource. Support of the operations depends on specific operational - // contexts. Attempts to apply an unsupported operation on a resource will return - // an error message. - Op *string `locationName:"op" type:"string" enum:"Op"` - - // The op operation's target, as identified by a JSON Pointer (https://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08) - // value that references a location within the targeted resource. For example, - // if the target resource has an updateable property of {"name":"value"}, the - // path for this property is /name. If the name property value is a JSON object - // (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name - // property will be /name/child~1name. Any slash ("/") character appearing in - // path names must be escaped with "~1", as shown in the example above. Each - // op operation can have only one path associated with it. - Path *string `locationName:"path" type:"string"` - - // The new target value of the update operation. It is applicable for the add - // or replace operation. When using AWS CLI to update a property of a JSON value, - // enclose the JSON object with a pair of single quotes in a Linux shell, e.g., - // '{"a": ...}'. In a Windows shell, see Using JSON for Parameters (https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json). - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s PatchOperation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PatchOperation) GoString() string { - return s.String() -} - -// SetFrom sets the From field's value. -func (s *PatchOperation) SetFrom(v string) *PatchOperation { - s.From = &v - return s -} - -// SetOp sets the Op field's value. -func (s *PatchOperation) SetOp(v string) *PatchOperation { - s.Op = &v - return s -} - -// SetPath sets the Path field's value. -func (s *PatchOperation) SetPath(v string) *PatchOperation { - s.Path = &v - return s -} - -// SetValue sets the Value field's value. -func (s *PatchOperation) SetValue(v string) *PatchOperation { - s.Value = &v - return s -} - -// Creates a customization of a GatewayResponse of a specified response type -// and status code on the given RestApi. -type PutGatewayResponseInput struct { - _ struct{} `type:"structure"` - - // Response parameters (paths, query strings and headers) of the GatewayResponse - // as a string-to-string map of key-value pairs. - ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` - - // Response templates of the GatewayResponse as a string-to-string map of key-value - // pairs. - ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` - - // [Required] The response type of the associated GatewayResponse. Valid values - // are ACCESS_DENIED - // API_CONFIGURATION_ERROR - // AUTHORIZER_FAILURE - // AUTHORIZER_CONFIGURATION_ERROR - // BAD_REQUEST_PARAMETERS - // BAD_REQUEST_BODY - // DEFAULT_4XX - // DEFAULT_5XX - // EXPIRED_TOKEN - // INVALID_SIGNATURE - // INTEGRATION_FAILURE - // INTEGRATION_TIMEOUT - // INVALID_API_KEY - // MISSING_AUTHENTICATION_TOKEN - // QUOTA_EXCEEDED - // REQUEST_TOO_LARGE - // RESOURCE_NOT_FOUND - // THROTTLED - // UNAUTHORIZED - // UNSUPPORTED_MEDIA_TYPE - // - // ResponseType is a required field - ResponseType *string `location:"uri" locationName:"response_type" type:"string" required:"true" enum:"GatewayResponseType"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // The HTTP status code of the GatewayResponse - StatusCode *string `locationName:"statusCode" type:"string"` -} - -// String returns the string representation -func (s PutGatewayResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutGatewayResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutGatewayResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutGatewayResponseInput"} - if s.ResponseType == nil { - invalidParams.Add(request.NewErrParamRequired("ResponseType")) - } - if s.ResponseType != nil && len(*s.ResponseType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResponseType", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *PutGatewayResponseInput) SetResponseParameters(v map[string]*string) *PutGatewayResponseInput { - s.ResponseParameters = v - return s -} - -// SetResponseTemplates sets the ResponseTemplates field's value. -func (s *PutGatewayResponseInput) SetResponseTemplates(v map[string]*string) *PutGatewayResponseInput { - s.ResponseTemplates = v - return s -} - -// SetResponseType sets the ResponseType field's value. -func (s *PutGatewayResponseInput) SetResponseType(v string) *PutGatewayResponseInput { - s.ResponseType = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *PutGatewayResponseInput) SetRestApiId(v string) *PutGatewayResponseInput { - s.RestApiId = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *PutGatewayResponseInput) SetStatusCode(v string) *PutGatewayResponseInput { - s.StatusCode = &v - return s -} - -// Sets up a method's integration. -type PutIntegrationInput struct { - _ struct{} `type:"structure"` - - // Specifies a put integration input's cache key parameters. - CacheKeyParameters []*string `locationName:"cacheKeyParameters" type:"list"` - - // Specifies a put integration input's cache namespace. - CacheNamespace *string `locationName:"cacheNamespace" type:"string"` - - // The (id (https://docs.aws.amazon.com/apigateway/api-reference/resource/vpc-link/#id)) - // of the VpcLink used for the integration when connectionType=VPC_LINK and - // undefined, otherwise. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // The type of the network connection to the integration endpoint. The valid - // value is INTERNET for connections through the public routable internet or - // VPC_LINK for private connections between API Gateway and a network load balancer - // in a VPC. The default value is INTERNET. - ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` - - // Specifies how to handle request payload content type conversions. Supported - // values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: - // - // * CONVERT_TO_BINARY: Converts a request payload from a Base64-encoded - // string to the corresponding binary blob. - // - // * CONVERT_TO_TEXT: Converts a request payload from a binary blob to a - // Base64-encoded string. - // - // If this property is not defined, the request payload will be passed through - // from the method request to integration request without modification, provided - // that the passthroughBehaviors is configured to support payload pass-through. - ContentHandling *string `locationName:"contentHandling" type:"string" enum:"ContentHandlingStrategy"` - - // Specifies whether credentials are required for a put integration. - Credentials *string `locationName:"credentials" type:"string"` - - // [Required] Specifies a put integration request's HTTP method. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // Specifies a put integration HTTP method. When the integration type is HTTP - // or AWS, this field is required. - IntegrationHttpMethod *string `locationName:"httpMethod" type:"string"` - - // Specifies the pass-through behavior for incoming requests based on the Content-Type - // header in the request, and the available mapping templates specified as the - // requestTemplates property on the Integration resource. There are three valid - // values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. - // - // * WHEN_NO_MATCH passes the request body for unmapped content types through - // to the integration back end without transformation. - // - // * NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media - // Type' response. - // - // * WHEN_NO_TEMPLATES allows pass-through when the integration has NO content - // types mapped to templates. However if there is at least one content type - // defined, unmapped content types will be rejected with the same 415 response. - PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string"` - - // A key-value map specifying request parameters that are passed from the method - // request to the back end. The key is an integration request parameter name - // and the associated value is a method request parameter value or static value - // that must be enclosed within single quotes and pre-encoded as required by - // the back end. The method request parameter value must match the pattern of - // method.request.{location}.{name}, where location is querystring, path, or - // header and name must be a valid and unique method request parameter name. - RequestParameters map[string]*string `locationName:"requestParameters" type:"map"` - - // Represents a map of Velocity templates that are applied on the request payload - // based on the value of the Content-Type header sent by the client. The content - // type value is the key in this map, and the template (as a String) is the - // value. - RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` - - // [Required] Specifies a put integration request's resource ID. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 - // milliseconds or 29 seconds. - TimeoutInMillis *int64 `locationName:"timeoutInMillis" type:"integer"` - - // [Required] Specifies a put integration input's type. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"IntegrationType"` - - // Specifies Uniform Resource Identifier (URI) of the integration endpoint. - // - // * For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, - // encoded HTTP(S) URL according to the RFC-3986 specification (_blank), - // for either standard integration, where connectionType is not VPC_LINK, - // or private integration, where connectionType is VPC_LINK. For a private - // HTTP integration, the URI is not used for routing. - // - // * For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. - // Here, {Region} is the API Gateway region (e.g., us-east-1); {service} - // is the name of the integrated AWS service (e.g., s3); and {subdomain} - // is a designated subdomain supported by certain AWS service for fast host-name - // lookup. action can be used for an AWS service action-based API, using - // an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} - // refers to a supported action {name} plus any required input parameters. - // Alternatively, path can be used for an AWS service path-based API. The - // ensuing service_api refers to the path to an AWS service resource, including - // the region of the integrated AWS service, if applicable. For example, - // for integration with the S3 API of GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html), - // the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} - // or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} - Uri *string `locationName:"uri" type:"string"` -} - -// String returns the string representation -func (s PutIntegrationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutIntegrationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutIntegrationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutIntegrationInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheKeyParameters sets the CacheKeyParameters field's value. -func (s *PutIntegrationInput) SetCacheKeyParameters(v []*string) *PutIntegrationInput { - s.CacheKeyParameters = v - return s -} - -// SetCacheNamespace sets the CacheNamespace field's value. -func (s *PutIntegrationInput) SetCacheNamespace(v string) *PutIntegrationInput { - s.CacheNamespace = &v - return s -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *PutIntegrationInput) SetConnectionId(v string) *PutIntegrationInput { - s.ConnectionId = &v - return s -} - -// SetConnectionType sets the ConnectionType field's value. -func (s *PutIntegrationInput) SetConnectionType(v string) *PutIntegrationInput { - s.ConnectionType = &v - return s -} - -// SetContentHandling sets the ContentHandling field's value. -func (s *PutIntegrationInput) SetContentHandling(v string) *PutIntegrationInput { - s.ContentHandling = &v - return s -} - -// SetCredentials sets the Credentials field's value. -func (s *PutIntegrationInput) SetCredentials(v string) *PutIntegrationInput { - s.Credentials = &v - return s -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *PutIntegrationInput) SetHttpMethod(v string) *PutIntegrationInput { - s.HttpMethod = &v - return s -} - -// SetIntegrationHttpMethod sets the IntegrationHttpMethod field's value. -func (s *PutIntegrationInput) SetIntegrationHttpMethod(v string) *PutIntegrationInput { - s.IntegrationHttpMethod = &v - return s -} - -// SetPassthroughBehavior sets the PassthroughBehavior field's value. -func (s *PutIntegrationInput) SetPassthroughBehavior(v string) *PutIntegrationInput { - s.PassthroughBehavior = &v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *PutIntegrationInput) SetRequestParameters(v map[string]*string) *PutIntegrationInput { - s.RequestParameters = v - return s -} - -// SetRequestTemplates sets the RequestTemplates field's value. -func (s *PutIntegrationInput) SetRequestTemplates(v map[string]*string) *PutIntegrationInput { - s.RequestTemplates = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *PutIntegrationInput) SetResourceId(v string) *PutIntegrationInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *PutIntegrationInput) SetRestApiId(v string) *PutIntegrationInput { - s.RestApiId = &v - return s -} - -// SetTimeoutInMillis sets the TimeoutInMillis field's value. -func (s *PutIntegrationInput) SetTimeoutInMillis(v int64) *PutIntegrationInput { - s.TimeoutInMillis = &v - return s -} - -// SetType sets the Type field's value. -func (s *PutIntegrationInput) SetType(v string) *PutIntegrationInput { - s.Type = &v - return s -} - -// SetUri sets the Uri field's value. -func (s *PutIntegrationInput) SetUri(v string) *PutIntegrationInput { - s.Uri = &v - return s -} - -// Represents a put integration response request. -type PutIntegrationResponseInput struct { - _ struct{} `type:"structure"` - - // Specifies how to handle response payload content type conversions. Supported - // values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: - // - // * CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded - // string to the corresponding binary blob. - // - // * CONVERT_TO_TEXT: Converts a response payload from a binary blob to a - // Base64-encoded string. - // - // If this property is not defined, the response payload will be passed through - // from the integration response to the method response without modification. - ContentHandling *string `locationName:"contentHandling" type:"string" enum:"ContentHandlingStrategy"` - - // [Required] Specifies a put integration response request's HTTP method. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // [Required] Specifies a put integration response request's resource identifier. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // A key-value map specifying response parameters that are passed to the method - // response from the back end. The key is a method response header parameter - // name and the mapped value is an integration response header value, a static - // value enclosed within a pair of single quotes, or a JSON expression from - // the integration response body. The mapping key must match the pattern of - // method.response.header.{name}, where name is a valid and unique header name. - // The mapped non-static value must match the pattern of integration.response.header.{name} - // or integration.response.body.{JSON-expression}, where name must be a valid - // and unique response header name and JSON-expression a valid JSON expression - // without the $ prefix. - ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` - - // Specifies a put integration response's templates. - ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // Specifies the selection pattern of a put integration response. - SelectionPattern *string `locationName:"selectionPattern" type:"string"` - - // [Required] Specifies the status code that is used to map the integration - // response to an existing MethodResponse. - // - // StatusCode is a required field - StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutIntegrationResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutIntegrationResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutIntegrationResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutIntegrationResponseInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StatusCode == nil { - invalidParams.Add(request.NewErrParamRequired("StatusCode")) - } - if s.StatusCode != nil && len(*s.StatusCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContentHandling sets the ContentHandling field's value. -func (s *PutIntegrationResponseInput) SetContentHandling(v string) *PutIntegrationResponseInput { - s.ContentHandling = &v - return s -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *PutIntegrationResponseInput) SetHttpMethod(v string) *PutIntegrationResponseInput { - s.HttpMethod = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *PutIntegrationResponseInput) SetResourceId(v string) *PutIntegrationResponseInput { - s.ResourceId = &v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *PutIntegrationResponseInput) SetResponseParameters(v map[string]*string) *PutIntegrationResponseInput { - s.ResponseParameters = v - return s -} - -// SetResponseTemplates sets the ResponseTemplates field's value. -func (s *PutIntegrationResponseInput) SetResponseTemplates(v map[string]*string) *PutIntegrationResponseInput { - s.ResponseTemplates = v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *PutIntegrationResponseInput) SetRestApiId(v string) *PutIntegrationResponseInput { - s.RestApiId = &v - return s -} - -// SetSelectionPattern sets the SelectionPattern field's value. -func (s *PutIntegrationResponseInput) SetSelectionPattern(v string) *PutIntegrationResponseInput { - s.SelectionPattern = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *PutIntegrationResponseInput) SetStatusCode(v string) *PutIntegrationResponseInput { - s.StatusCode = &v - return s -} - -// Request to add a method to an existing Resource resource. -type PutMethodInput struct { - _ struct{} `type:"structure"` - - // Specifies whether the method required a valid ApiKey. - ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` - - // A list of authorization scopes configured on the method. The scopes are used - // with a COGNITO_USER_POOLS authorizer to authorize the method invocation. - // The authorization works by matching the method scopes against the scopes - // parsed from the access token in the incoming request. The method invocation - // is authorized if any method scopes matches a claimed scope in the access - // token. Otherwise, the invocation is not authorized. When the method scope - // is configured, the client must provide an access token instead of an identity - // token for authorization purposes. - AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` - - // [Required] The method's authorization type. Valid values are NONE for open - // access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom - // authorizer, or COGNITO_USER_POOLS for using a Cognito user pool. - // - // AuthorizationType is a required field - AuthorizationType *string `locationName:"authorizationType" type:"string" required:"true"` - - // Specifies the identifier of an Authorizer to use on this Method, if the type - // is CUSTOM or COGNITO_USER_POOLS. The authorizer identifier is generated by - // API Gateway when you created the authorizer. - AuthorizerId *string `locationName:"authorizerId" type:"string"` - - // [Required] Specifies the method request's HTTP method type. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // A human-friendly operation identifier for the method. For example, you can - // assign the operationName of ListPets for the GET /pets method in PetStore - // (https://petstore-demo-endpoint.execute-api.com/petstore/pets) example. - OperationName *string `locationName:"operationName" type:"string"` - - // Specifies the Model resources used for the request's content type. Request - // models are represented as a key/value map, with a content type as the key - // and a Model name as the value. - RequestModels map[string]*string `locationName:"requestModels" type:"map"` - - // A key-value map defining required or optional method request parameters that - // can be accepted by API Gateway. A key defines a method request parameter - // name matching the pattern of method.request.{location}.{name}, where location - // is querystring, path, or header and name is a valid and unique parameter - // name. The value associated with the key is a Boolean flag indicating whether - // the parameter is required (true) or optional (false). The method request - // parameter names defined here are available in Integration to be mapped to - // integration request parameters or body-mapping templates. - RequestParameters map[string]*bool `locationName:"requestParameters" type:"map"` - - // The identifier of a RequestValidator for validating the method request. - RequestValidatorId *string `locationName:"requestValidatorId" type:"string"` - - // [Required] The Resource identifier for the new Method resource. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutMethodInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutMethodInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutMethodInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutMethodInput"} - if s.AuthorizationType == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizationType")) - } - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiKeyRequired sets the ApiKeyRequired field's value. -func (s *PutMethodInput) SetApiKeyRequired(v bool) *PutMethodInput { - s.ApiKeyRequired = &v - return s -} - -// SetAuthorizationScopes sets the AuthorizationScopes field's value. -func (s *PutMethodInput) SetAuthorizationScopes(v []*string) *PutMethodInput { - s.AuthorizationScopes = v - return s -} - -// SetAuthorizationType sets the AuthorizationType field's value. -func (s *PutMethodInput) SetAuthorizationType(v string) *PutMethodInput { - s.AuthorizationType = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *PutMethodInput) SetAuthorizerId(v string) *PutMethodInput { - s.AuthorizerId = &v - return s -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *PutMethodInput) SetHttpMethod(v string) *PutMethodInput { - s.HttpMethod = &v - return s -} - -// SetOperationName sets the OperationName field's value. -func (s *PutMethodInput) SetOperationName(v string) *PutMethodInput { - s.OperationName = &v - return s -} - -// SetRequestModels sets the RequestModels field's value. -func (s *PutMethodInput) SetRequestModels(v map[string]*string) *PutMethodInput { - s.RequestModels = v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *PutMethodInput) SetRequestParameters(v map[string]*bool) *PutMethodInput { - s.RequestParameters = v - return s -} - -// SetRequestValidatorId sets the RequestValidatorId field's value. -func (s *PutMethodInput) SetRequestValidatorId(v string) *PutMethodInput { - s.RequestValidatorId = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *PutMethodInput) SetResourceId(v string) *PutMethodInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *PutMethodInput) SetRestApiId(v string) *PutMethodInput { - s.RestApiId = &v - return s -} - -// Request to add a MethodResponse to an existing Method resource. -type PutMethodResponseInput struct { - _ struct{} `type:"structure"` - - // [Required] The HTTP verb of the Method resource. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // [Required] The Resource identifier for the Method resource. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // Specifies the Model resources used for the response's content type. Response - // models are represented as a key/value map, with a content type as the key - // and a Model name as the value. - ResponseModels map[string]*string `locationName:"responseModels" type:"map"` - - // A key-value map specifying required or optional response parameters that - // API Gateway can send back to the caller. A key defines a method response - // header name and the associated value is a Boolean flag indicating whether - // the method response parameter is required or not. The method response header - // names must match the pattern of method.response.header.{name}, where name - // is a valid and unique header name. The response parameter names defined here - // are available in the integration response to be mapped from an integration - // response header expressed in integration.response.header.{name}, a static - // value enclosed within a pair of single quotes (e.g., 'application/json'), - // or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, - // where JSON-expression is a valid JSON expression without the $ prefix.) - ResponseParameters map[string]*bool `locationName:"responseParameters" type:"map"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] The method response's status code. - // - // StatusCode is a required field - StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutMethodResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutMethodResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutMethodResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutMethodResponseInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StatusCode == nil { - invalidParams.Add(request.NewErrParamRequired("StatusCode")) - } - if s.StatusCode != nil && len(*s.StatusCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *PutMethodResponseInput) SetHttpMethod(v string) *PutMethodResponseInput { - s.HttpMethod = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *PutMethodResponseInput) SetResourceId(v string) *PutMethodResponseInput { - s.ResourceId = &v - return s -} - -// SetResponseModels sets the ResponseModels field's value. -func (s *PutMethodResponseInput) SetResponseModels(v map[string]*string) *PutMethodResponseInput { - s.ResponseModels = v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *PutMethodResponseInput) SetResponseParameters(v map[string]*bool) *PutMethodResponseInput { - s.ResponseParameters = v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *PutMethodResponseInput) SetRestApiId(v string) *PutMethodResponseInput { - s.RestApiId = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *PutMethodResponseInput) SetStatusCode(v string) *PutMethodResponseInput { - s.StatusCode = &v - return s -} - -// A PUT request to update an existing API, with external API definitions specified -// as the request body. -type PutRestApiInput struct { - _ struct{} `type:"structure" payload:"Body"` - - // [Required] The PUT request body containing external API definitions. Currently, - // only OpenAPI definition JSON/YAML files are supported. The maximum size of - // the API definition file is 2MB. - // - // Body is a required field - Body []byte `locationName:"body" type:"blob" required:"true"` - - // A query parameter to indicate whether to rollback the API update (true) or - // not (false) when a warning is encountered. The default value is false. - FailOnWarnings *bool `location:"querystring" locationName:"failonwarnings" type:"boolean"` - - // The mode query parameter to specify the update mode. Valid values are "merge" - // and "overwrite". By default, the update mode is "merge". - Mode *string `location:"querystring" locationName:"mode" type:"string" enum:"PutMode"` - - // Custom header parameters as part of the request. For example, to exclude - // DocumentationParts from an imported API, set ignore=documentation as a parameters - // value, as in the AWS CLI command of aws apigateway import-rest-api --parameters - // ignore=documentation --body 'file:///path/to/imported-api-body.json'. - Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutRestApiInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRestApiInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutRestApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutRestApiInput"} - if s.Body == nil { - invalidParams.Add(request.NewErrParamRequired("Body")) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBody sets the Body field's value. -func (s *PutRestApiInput) SetBody(v []byte) *PutRestApiInput { - s.Body = v - return s -} - -// SetFailOnWarnings sets the FailOnWarnings field's value. -func (s *PutRestApiInput) SetFailOnWarnings(v bool) *PutRestApiInput { - s.FailOnWarnings = &v - return s -} - -// SetMode sets the Mode field's value. -func (s *PutRestApiInput) SetMode(v string) *PutRestApiInput { - s.Mode = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *PutRestApiInput) SetParameters(v map[string]*string) *PutRestApiInput { - s.Parameters = v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *PutRestApiInput) SetRestApiId(v string) *PutRestApiInput { - s.RestApiId = &v - return s -} - -// Quotas configured for a usage plan. -type QuotaSettings struct { - _ struct{} `type:"structure"` - - // The maximum number of requests that can be made in a given time period. - Limit *int64 `locationName:"limit" type:"integer"` - - // The number of requests subtracted from the given limit in the initial time - // period. - Offset *int64 `locationName:"offset" type:"integer"` - - // The time period in which the limit applies. Valid values are "DAY", "WEEK" - // or "MONTH". - Period *string `locationName:"period" type:"string" enum:"QuotaPeriodType"` -} - -// String returns the string representation -func (s QuotaSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QuotaSettings) GoString() string { - return s.String() -} - -// SetLimit sets the Limit field's value. -func (s *QuotaSettings) SetLimit(v int64) *QuotaSettings { - s.Limit = &v - return s -} - -// SetOffset sets the Offset field's value. -func (s *QuotaSettings) SetOffset(v int64) *QuotaSettings { - s.Offset = &v - return s -} - -// SetPeriod sets the Period field's value. -func (s *QuotaSettings) SetPeriod(v string) *QuotaSettings { - s.Period = &v - return s -} - -// Represents an API resource. -// -// Create an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) -type Resource struct { - _ struct{} `type:"structure"` - - // The resource's identifier. - Id *string `locationName:"id" type:"string"` - - // The parent resource's identifier. - ParentId *string `locationName:"parentId" type:"string"` - - // The full path for this resource. - Path *string `locationName:"path" type:"string"` - - // The last path segment for this resource. - PathPart *string `locationName:"pathPart" type:"string"` - - // Gets an API resource's method of a given HTTP verb. - // - // The resource methods are a map of methods indexed by methods' HTTP verbs - // enabled on the resource. This method map is included in the 200 OK response - // of the GET /restapis/{restapi_id}/resources/{resource_id} or GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods - // request. - // - // Example: Get the GET method of an API resource - // - // Request - // - // GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1 Content-Type: - // application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20170223T031827Z - // Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20170223/us-east-1/apigateway/aws4_request, - // SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} - // Response - // - // { "_links": { "curies": [ { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", - // "name": "integration", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", - // "name": "integrationresponse", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", - // "name": "method", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", - // "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET", - // "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" - // }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" - // }, "method:integration": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" - // }, "method:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", - // "name": "200", "title": "200" }, "method:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" - // }, "methodresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/{status_code}", - // "templated": true } }, "apiKeyRequired": false, "authorizationType": "NONE", - // "httpMethod": "GET", "_embedded": { "method:integration": { "_links": { "self": - // { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" - // }, "integration:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" - // }, "integration:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", - // "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" - // }, "integrationresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/{status_code}", - // "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2", - // "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": - // "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestParameters": { "integration.request.header.Content-Type": - // "'application/x-amz-json-1.1'" }, "requestTemplates": { "application/json": - // "{\n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-east-1:kinesis:action/ListStreams", - // "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", - // "name": "200", "title": "200" }, "integrationresponse:delete": { "href": - // "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" - // }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" - // } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" - // }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream - // in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" - // }, "statusCode": "200" } } }, "method:responses": { "_links": { "self": { - // "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", - // "name": "200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" - // }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" - // } }, "responseModels": { "application/json": "Empty" }, "responseParameters": - // { "method.response.header.Content-Type": false }, "statusCode": "200" } } - // } - // If the OPTIONS is enabled on the resource, you can follow the example here - // to get that method. Just replace the GET of the last path segment in the - // request URL with OPTIONS. - ResourceMethods map[string]*Method `locationName:"resourceMethods" type:"map"` -} - -// 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() -} - -// SetId sets the Id field's value. -func (s *Resource) SetId(v string) *Resource { - s.Id = &v - return s -} - -// SetParentId sets the ParentId field's value. -func (s *Resource) SetParentId(v string) *Resource { - s.ParentId = &v - return s -} - -// SetPath sets the Path field's value. -func (s *Resource) SetPath(v string) *Resource { - s.Path = &v - return s -} - -// SetPathPart sets the PathPart field's value. -func (s *Resource) SetPathPart(v string) *Resource { - s.PathPart = &v - return s -} - -// SetResourceMethods sets the ResourceMethods field's value. -func (s *Resource) SetResourceMethods(v map[string]*Method) *Resource { - s.ResourceMethods = v - return s -} - -// Represents a REST API. -// -// Create an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) -type RestApi struct { - _ struct{} `type:"structure"` - - // The source of the API key for metering requests according to a usage plan. - // Valid values are: HEADER to read the API key from the X-API-Key header of - // a request. - // AUTHORIZER to read the API key from the UsageIdentifierKey from a custom - // authorizer. - ApiKeySource *string `locationName:"apiKeySource" type:"string" enum:"ApiKeySourceType"` - - // The list of binary media types supported by the RestApi. By default, the - // RestApi supports only UTF-8-encoded text payloads. - BinaryMediaTypes []*string `locationName:"binaryMediaTypes" type:"list"` - - // The timestamp when the API was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // The API's description. - Description *string `locationName:"description" type:"string"` - - // The endpoint configuration of this RestApi showing the endpoint types of - // the API. - EndpointConfiguration *EndpointConfiguration `locationName:"endpointConfiguration" type:"structure"` - - // The API's identifier. This identifier is unique across all of your APIs in - // API Gateway. - Id *string `locationName:"id" type:"string"` - - // A nullable integer that is used to enable compression (with non-negative - // between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with - // a null value) on an API. When compression is enabled, compression or decompression - // is not applied on the payload if the payload size is smaller than this value. - // Setting it to zero allows compression for any payload size. - MinimumCompressionSize *int64 `locationName:"minimumCompressionSize" type:"integer"` - - // The API's name. - Name *string `locationName:"name" type:"string"` - - // A stringified JSON policy document that applies to this RestApi regardless - // of the caller and Method - Policy *string `locationName:"policy" type:"string"` - - // A version identifier for the API. - Version *string `locationName:"version" type:"string"` - - // The warning messages reported when failonwarnings is turned on during API - // import. - Warnings []*string `locationName:"warnings" type:"list"` -} - -// String returns the string representation -func (s RestApi) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestApi) GoString() string { - return s.String() -} - -// SetApiKeySource sets the ApiKeySource field's value. -func (s *RestApi) SetApiKeySource(v string) *RestApi { - s.ApiKeySource = &v - return s -} - -// SetBinaryMediaTypes sets the BinaryMediaTypes field's value. -func (s *RestApi) SetBinaryMediaTypes(v []*string) *RestApi { - s.BinaryMediaTypes = v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *RestApi) SetCreatedDate(v time.Time) *RestApi { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *RestApi) SetDescription(v string) *RestApi { - s.Description = &v - return s -} - -// SetEndpointConfiguration sets the EndpointConfiguration field's value. -func (s *RestApi) SetEndpointConfiguration(v *EndpointConfiguration) *RestApi { - s.EndpointConfiguration = v - return s -} - -// SetId sets the Id field's value. -func (s *RestApi) SetId(v string) *RestApi { - s.Id = &v - return s -} - -// SetMinimumCompressionSize sets the MinimumCompressionSize field's value. -func (s *RestApi) SetMinimumCompressionSize(v int64) *RestApi { - s.MinimumCompressionSize = &v - return s -} - -// SetName sets the Name field's value. -func (s *RestApi) SetName(v string) *RestApi { - s.Name = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *RestApi) SetPolicy(v string) *RestApi { - s.Policy = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *RestApi) SetVersion(v string) *RestApi { - s.Version = &v - return s -} - -// SetWarnings sets the Warnings field's value. -func (s *RestApi) SetWarnings(v []*string) *RestApi { - s.Warnings = v - return s -} - -// A configuration property of an SDK type. -type SdkConfigurationProperty struct { - _ struct{} `type:"structure"` - - // The default value of an SdkType configuration property. - DefaultValue *string `locationName:"defaultValue" type:"string"` - - // The description of an SdkType configuration property. - Description *string `locationName:"description" type:"string"` - - // The user-friendly name of an SdkType configuration property. - FriendlyName *string `locationName:"friendlyName" type:"string"` - - // The name of a an SdkType configuration property. - Name *string `locationName:"name" type:"string"` - - // A boolean flag of an SdkType configuration property to indicate if the associated - // SDK configuration property is required (true) or not (false). - Required *bool `locationName:"required" type:"boolean"` -} - -// String returns the string representation -func (s SdkConfigurationProperty) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SdkConfigurationProperty) GoString() string { - return s.String() -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *SdkConfigurationProperty) SetDefaultValue(v string) *SdkConfigurationProperty { - s.DefaultValue = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *SdkConfigurationProperty) SetDescription(v string) *SdkConfigurationProperty { - s.Description = &v - return s -} - -// SetFriendlyName sets the FriendlyName field's value. -func (s *SdkConfigurationProperty) SetFriendlyName(v string) *SdkConfigurationProperty { - s.FriendlyName = &v - return s -} - -// SetName sets the Name field's value. -func (s *SdkConfigurationProperty) SetName(v string) *SdkConfigurationProperty { - s.Name = &v - return s -} - -// SetRequired sets the Required field's value. -func (s *SdkConfigurationProperty) SetRequired(v bool) *SdkConfigurationProperty { - s.Required = &v - return s -} - -// A type of SDK that API Gateway can generate. -type SdkType struct { - _ struct{} `type:"structure"` - - // A list of configuration properties of an SdkType. - ConfigurationProperties []*SdkConfigurationProperty `locationName:"configurationProperties" type:"list"` - - // The description of an SdkType. - Description *string `locationName:"description" type:"string"` - - // The user-friendly name of an SdkType instance. - FriendlyName *string `locationName:"friendlyName" type:"string"` - - // The identifier of an SdkType instance. - Id *string `locationName:"id" type:"string"` -} - -// String returns the string representation -func (s SdkType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SdkType) GoString() string { - return s.String() -} - -// SetConfigurationProperties sets the ConfigurationProperties field's value. -func (s *SdkType) SetConfigurationProperties(v []*SdkConfigurationProperty) *SdkType { - s.ConfigurationProperties = v - return s -} - -// SetDescription sets the Description field's value. -func (s *SdkType) SetDescription(v string) *SdkType { - s.Description = &v - return s -} - -// SetFriendlyName sets the FriendlyName field's value. -func (s *SdkType) SetFriendlyName(v string) *SdkType { - s.FriendlyName = &v - return s -} - -// SetId sets the Id field's value. -func (s *SdkType) SetId(v string) *SdkType { - s.Id = &v - return s -} - -// Represents a unique identifier for a version of a deployed RestApi that is -// callable by users. -// -// Deploy an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html) -type Stage struct { - _ struct{} `type:"structure"` - - // Settings for logging access in this stage. - AccessLogSettings *AccessLogSettings `locationName:"accessLogSettings" type:"structure"` - - // Specifies whether a cache cluster is enabled for the stage. - CacheClusterEnabled *bool `locationName:"cacheClusterEnabled" type:"boolean"` - - // The size of the cache cluster for the stage, if enabled. - CacheClusterSize *string `locationName:"cacheClusterSize" type:"string" enum:"CacheClusterSize"` - - // The status of the cache cluster for the stage, if enabled. - CacheClusterStatus *string `locationName:"cacheClusterStatus" type:"string" enum:"CacheClusterStatus"` - - // Settings for the canary deployment in this stage. - CanarySettings *CanarySettings `locationName:"canarySettings" type:"structure"` - - // The identifier of a client certificate for an API stage. - ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` - - // The timestamp when the stage was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // The identifier of the Deployment that the stage points to. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // The stage's description. - Description *string `locationName:"description" type:"string"` - - // The version of the associated API documentation. - DocumentationVersion *string `locationName:"documentationVersion" type:"string"` - - // The timestamp when the stage last updated. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // A map that defines the method settings for a Stage resource. Keys (designated - // as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} - // for an individual method override, or /\*/\* for overriding all methods in - // the stage. - MethodSettings map[string]*MethodSetting `locationName:"methodSettings" type:"map"` - - // The name of the stage is the first path segment in the Uniform Resource Identifier - // (URI) of a call to API Gateway. - StageName *string `locationName:"stageName" type:"string"` - - // The collection of tags. Each tag element is associated with a given resource. - Tags map[string]*string `locationName:"tags" type:"map"` - - // Specifies whether active tracing with X-ray is enabled for the Stage. - TracingEnabled *bool `locationName:"tracingEnabled" type:"boolean"` - - // A map that defines the stage variables for a Stage resource. Variable names - // can have alphanumeric and underscore characters, and the values must match - // [A-Za-z0-9-._~:/?#&=,]+. - Variables map[string]*string `locationName:"variables" type:"map"` - - // The ARN of the WebAcl associated with the Stage. - WebAclArn *string `locationName:"webAclArn" type:"string"` -} - -// String returns the string representation -func (s Stage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Stage) GoString() string { - return s.String() -} - -// SetAccessLogSettings sets the AccessLogSettings field's value. -func (s *Stage) SetAccessLogSettings(v *AccessLogSettings) *Stage { - s.AccessLogSettings = v - return s -} - -// SetCacheClusterEnabled sets the CacheClusterEnabled field's value. -func (s *Stage) SetCacheClusterEnabled(v bool) *Stage { - s.CacheClusterEnabled = &v - return s -} - -// SetCacheClusterSize sets the CacheClusterSize field's value. -func (s *Stage) SetCacheClusterSize(v string) *Stage { - s.CacheClusterSize = &v - return s -} - -// SetCacheClusterStatus sets the CacheClusterStatus field's value. -func (s *Stage) SetCacheClusterStatus(v string) *Stage { - s.CacheClusterStatus = &v - return s -} - -// SetCanarySettings sets the CanarySettings field's value. -func (s *Stage) SetCanarySettings(v *CanarySettings) *Stage { - s.CanarySettings = v - return s -} - -// SetClientCertificateId sets the ClientCertificateId field's value. -func (s *Stage) SetClientCertificateId(v string) *Stage { - s.ClientCertificateId = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *Stage) SetCreatedDate(v time.Time) *Stage { - s.CreatedDate = &v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *Stage) SetDeploymentId(v string) *Stage { - s.DeploymentId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Stage) SetDescription(v string) *Stage { - s.Description = &v - return s -} - -// SetDocumentationVersion sets the DocumentationVersion field's value. -func (s *Stage) SetDocumentationVersion(v string) *Stage { - s.DocumentationVersion = &v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *Stage) SetLastUpdatedDate(v time.Time) *Stage { - s.LastUpdatedDate = &v - return s -} - -// SetMethodSettings sets the MethodSettings field's value. -func (s *Stage) SetMethodSettings(v map[string]*MethodSetting) *Stage { - s.MethodSettings = v - return s -} - -// SetStageName sets the StageName field's value. -func (s *Stage) SetStageName(v string) *Stage { - s.StageName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Stage) SetTags(v map[string]*string) *Stage { - s.Tags = v - return s -} - -// SetTracingEnabled sets the TracingEnabled field's value. -func (s *Stage) SetTracingEnabled(v bool) *Stage { - s.TracingEnabled = &v - return s -} - -// SetVariables sets the Variables field's value. -func (s *Stage) SetVariables(v map[string]*string) *Stage { - s.Variables = v - return s -} - -// SetWebAclArn sets the WebAclArn field's value. -func (s *Stage) SetWebAclArn(v string) *Stage { - s.WebAclArn = &v - return s -} - -// A reference to a unique stage identified in the format {restApiId}/{stage}. -type StageKey struct { - _ struct{} `type:"structure"` - - // The string identifier of the associated RestApi. - RestApiId *string `locationName:"restApiId" type:"string"` - - // The stage name associated with the stage key. - StageName *string `locationName:"stageName" type:"string"` -} - -// String returns the string representation -func (s StageKey) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StageKey) GoString() string { - return s.String() -} - -// SetRestApiId sets the RestApiId field's value. -func (s *StageKey) SetRestApiId(v string) *StageKey { - s.RestApiId = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *StageKey) SetStageName(v string) *StageKey { - s.StageName = &v - return s -} - -// Adds or updates a tag on a given resource. -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // [Required] The ARN of a resource that can be tagged. The resource ARN must - // be URL-encoded. At present, Stage is the only taggable resource. - // - // ResourceArn is a required field - ResourceArn *string `location:"uri" locationName:"resource_arn" type:"string" required:"true"` - - // [Required] The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. - // The tag key can be up to 128 characters and must not start with aws:. The - // tag value can be up to 256 characters. - // - // Tags is a required field - Tags map[string]*string `locationName:"tags" type:"map" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v 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() -} - -// Make a request to simulate the execution of an Authorizer. -type TestInvokeAuthorizerInput struct { - _ struct{} `type:"structure"` - - // [Optional] A key-value map of additional context variables. - AdditionalContext map[string]*string `locationName:"additionalContext" type:"map"` - - // [Required] Specifies a test invoke authorizer request's Authorizer ID. - // - // AuthorizerId is a required field - AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"` - - // [Optional] The simulated request body of an incoming invocation request. - Body *string `locationName:"body" type:"string"` - - // [Required] A key-value map of headers to simulate an incoming invocation - // request. This is where the incoming authorization token, or identity source, - // should be specified. - Headers map[string]*string `locationName:"headers" type:"map"` - - // [Optional] The headers as a map from string to list of values to simulate - // an incoming invocation request. This is where the incoming authorization - // token, or identity source, may be specified. - MultiValueHeaders map[string][]*string `locationName:"multiValueHeaders" type:"map"` - - // [Optional] The URI path, including query string, of the simulated invocation - // request. Use this to specify path parameters and query string parameters. - PathWithQueryString *string `locationName:"pathWithQueryString" type:"string"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // A key-value map of stage variables to simulate an invocation on a deployed - // Stage. - StageVariables map[string]*string `locationName:"stageVariables" type:"map"` -} - -// String returns the string representation -func (s TestInvokeAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestInvokeAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TestInvokeAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TestInvokeAuthorizerInput"} - if s.AuthorizerId == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) - } - if s.AuthorizerId != nil && len(*s.AuthorizerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizerId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdditionalContext sets the AdditionalContext field's value. -func (s *TestInvokeAuthorizerInput) SetAdditionalContext(v map[string]*string) *TestInvokeAuthorizerInput { - s.AdditionalContext = v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *TestInvokeAuthorizerInput) SetAuthorizerId(v string) *TestInvokeAuthorizerInput { - s.AuthorizerId = &v - return s -} - -// SetBody sets the Body field's value. -func (s *TestInvokeAuthorizerInput) SetBody(v string) *TestInvokeAuthorizerInput { - s.Body = &v - return s -} - -// SetHeaders sets the Headers field's value. -func (s *TestInvokeAuthorizerInput) SetHeaders(v map[string]*string) *TestInvokeAuthorizerInput { - s.Headers = v - return s -} - -// SetMultiValueHeaders sets the MultiValueHeaders field's value. -func (s *TestInvokeAuthorizerInput) SetMultiValueHeaders(v map[string][]*string) *TestInvokeAuthorizerInput { - s.MultiValueHeaders = v - return s -} - -// SetPathWithQueryString sets the PathWithQueryString field's value. -func (s *TestInvokeAuthorizerInput) SetPathWithQueryString(v string) *TestInvokeAuthorizerInput { - s.PathWithQueryString = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *TestInvokeAuthorizerInput) SetRestApiId(v string) *TestInvokeAuthorizerInput { - s.RestApiId = &v - return s -} - -// SetStageVariables sets the StageVariables field's value. -func (s *TestInvokeAuthorizerInput) SetStageVariables(v map[string]*string) *TestInvokeAuthorizerInput { - s.StageVariables = v - return s -} - -// Represents the response of the test invoke request for a custom Authorizer -type TestInvokeAuthorizerOutput struct { - _ struct{} `type:"structure"` - - Authorization map[string][]*string `locationName:"authorization" type:"map"` - - // The open identity claims (https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims), - // with any supported custom attributes, returned from the Cognito Your User - // Pool configured for the API. - Claims map[string]*string `locationName:"claims" type:"map"` - - // The HTTP status code that the client would have received. Value is 0 if the - // authorizer succeeded. - ClientStatus *int64 `locationName:"clientStatus" type:"integer"` - - // The execution latency of the test authorizer request. - Latency *int64 `locationName:"latency" type:"long"` - - // The API Gateway execution log for the test authorizer request. - Log *string `locationName:"log" type:"string"` - - // The JSON policy document returned by the Authorizer - Policy *string `locationName:"policy" type:"string"` - - // The principal identity returned by the Authorizer - PrincipalId *string `locationName:"principalId" type:"string"` -} - -// String returns the string representation -func (s TestInvokeAuthorizerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestInvokeAuthorizerOutput) GoString() string { - return s.String() -} - -// SetAuthorization sets the Authorization field's value. -func (s *TestInvokeAuthorizerOutput) SetAuthorization(v map[string][]*string) *TestInvokeAuthorizerOutput { - s.Authorization = v - return s -} - -// SetClaims sets the Claims field's value. -func (s *TestInvokeAuthorizerOutput) SetClaims(v map[string]*string) *TestInvokeAuthorizerOutput { - s.Claims = v - return s -} - -// SetClientStatus sets the ClientStatus field's value. -func (s *TestInvokeAuthorizerOutput) SetClientStatus(v int64) *TestInvokeAuthorizerOutput { - s.ClientStatus = &v - return s -} - -// SetLatency sets the Latency field's value. -func (s *TestInvokeAuthorizerOutput) SetLatency(v int64) *TestInvokeAuthorizerOutput { - s.Latency = &v - return s -} - -// SetLog sets the Log field's value. -func (s *TestInvokeAuthorizerOutput) SetLog(v string) *TestInvokeAuthorizerOutput { - s.Log = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *TestInvokeAuthorizerOutput) SetPolicy(v string) *TestInvokeAuthorizerOutput { - s.Policy = &v - return s -} - -// SetPrincipalId sets the PrincipalId field's value. -func (s *TestInvokeAuthorizerOutput) SetPrincipalId(v string) *TestInvokeAuthorizerOutput { - s.PrincipalId = &v - return s -} - -// Make a request to simulate the execution of a Method. -type TestInvokeMethodInput struct { - _ struct{} `type:"structure"` - - // The simulated request body of an incoming invocation request. - Body *string `locationName:"body" type:"string"` - - // A ClientCertificate identifier to use in the test invocation. API Gateway - // will use the certificate when making the HTTPS request to the defined back-end - // endpoint. - ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` - - // A key-value map of headers to simulate an incoming invocation request. - Headers map[string]*string `locationName:"headers" type:"map"` - - // [Required] Specifies a test invoke method request's HTTP method. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // The headers as a map from string to list of values to simulate an incoming - // invocation request. - MultiValueHeaders map[string][]*string `locationName:"multiValueHeaders" type:"map"` - - // The URI path, including query string, of the simulated invocation request. - // Use this to specify path parameters and query string parameters. - PathWithQueryString *string `locationName:"pathWithQueryString" type:"string"` - - // [Required] Specifies a test invoke method request's resource ID. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // A key-value map of stage variables to simulate an invocation on a deployed - // Stage. - StageVariables map[string]*string `locationName:"stageVariables" type:"map"` -} - -// String returns the string representation -func (s TestInvokeMethodInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestInvokeMethodInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TestInvokeMethodInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TestInvokeMethodInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBody sets the Body field's value. -func (s *TestInvokeMethodInput) SetBody(v string) *TestInvokeMethodInput { - s.Body = &v - return s -} - -// SetClientCertificateId sets the ClientCertificateId field's value. -func (s *TestInvokeMethodInput) SetClientCertificateId(v string) *TestInvokeMethodInput { - s.ClientCertificateId = &v - return s -} - -// SetHeaders sets the Headers field's value. -func (s *TestInvokeMethodInput) SetHeaders(v map[string]*string) *TestInvokeMethodInput { - s.Headers = v - return s -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *TestInvokeMethodInput) SetHttpMethod(v string) *TestInvokeMethodInput { - s.HttpMethod = &v - return s -} - -// SetMultiValueHeaders sets the MultiValueHeaders field's value. -func (s *TestInvokeMethodInput) SetMultiValueHeaders(v map[string][]*string) *TestInvokeMethodInput { - s.MultiValueHeaders = v - return s -} - -// SetPathWithQueryString sets the PathWithQueryString field's value. -func (s *TestInvokeMethodInput) SetPathWithQueryString(v string) *TestInvokeMethodInput { - s.PathWithQueryString = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *TestInvokeMethodInput) SetResourceId(v string) *TestInvokeMethodInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *TestInvokeMethodInput) SetRestApiId(v string) *TestInvokeMethodInput { - s.RestApiId = &v - return s -} - -// SetStageVariables sets the StageVariables field's value. -func (s *TestInvokeMethodInput) SetStageVariables(v map[string]*string) *TestInvokeMethodInput { - s.StageVariables = v - return s -} - -// Represents the response of the test invoke request in the HTTP method. -// -// Test API using the API Gateway console (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-test-method.html#how-to-test-method-console) -type TestInvokeMethodOutput struct { - _ struct{} `type:"structure"` - - // The body of the HTTP response. - Body *string `locationName:"body" type:"string"` - - // The headers of the HTTP response. - Headers map[string]*string `locationName:"headers" type:"map"` - - // The execution latency of the test invoke request. - Latency *int64 `locationName:"latency" type:"long"` - - // The API Gateway execution log for the test invoke request. - Log *string `locationName:"log" type:"string"` - - // The headers of the HTTP response as a map from string to list of values. - MultiValueHeaders map[string][]*string `locationName:"multiValueHeaders" type:"map"` - - // The HTTP status code. - Status *int64 `locationName:"status" type:"integer"` -} - -// String returns the string representation -func (s TestInvokeMethodOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestInvokeMethodOutput) GoString() string { - return s.String() -} - -// SetBody sets the Body field's value. -func (s *TestInvokeMethodOutput) SetBody(v string) *TestInvokeMethodOutput { - s.Body = &v - return s -} - -// SetHeaders sets the Headers field's value. -func (s *TestInvokeMethodOutput) SetHeaders(v map[string]*string) *TestInvokeMethodOutput { - s.Headers = v - return s -} - -// SetLatency sets the Latency field's value. -func (s *TestInvokeMethodOutput) SetLatency(v int64) *TestInvokeMethodOutput { - s.Latency = &v - return s -} - -// SetLog sets the Log field's value. -func (s *TestInvokeMethodOutput) SetLog(v string) *TestInvokeMethodOutput { - s.Log = &v - return s -} - -// SetMultiValueHeaders sets the MultiValueHeaders field's value. -func (s *TestInvokeMethodOutput) SetMultiValueHeaders(v map[string][]*string) *TestInvokeMethodOutput { - s.MultiValueHeaders = v - return s -} - -// SetStatus sets the Status field's value. -func (s *TestInvokeMethodOutput) SetStatus(v int64) *TestInvokeMethodOutput { - s.Status = &v - return s -} - -// The API request rate limits. -type ThrottleSettings struct { - _ struct{} `type:"structure"` - - // The API request burst limit, the maximum rate limit over a time ranging from - // one to a few seconds, depending upon whether the underlying token bucket - // is at its full capacity. - BurstLimit *int64 `locationName:"burstLimit" type:"integer"` - - // The API request steady-state rate limit. - RateLimit *float64 `locationName:"rateLimit" type:"double"` -} - -// String returns the string representation -func (s ThrottleSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThrottleSettings) GoString() string { - return s.String() -} - -// SetBurstLimit sets the BurstLimit field's value. -func (s *ThrottleSettings) SetBurstLimit(v int64) *ThrottleSettings { - s.BurstLimit = &v - return s -} - -// SetRateLimit sets the RateLimit field's value. -func (s *ThrottleSettings) SetRateLimit(v float64) *ThrottleSettings { - s.RateLimit = &v - return s -} - -// Removes a tag from a given resource. -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // [Required] The ARN of a resource that can be tagged. The resource ARN must - // be URL-encoded. At present, Stage is the only taggable resource. - // - // ResourceArn is a required field - ResourceArn *string `location:"uri" locationName:"resource_arn" type:"string" required:"true"` - - // [Required] The Tag keys to delete. - // - // 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() -} - -// Requests API Gateway to change information about the current Account resource. -type UpdateAccountInput struct { - _ struct{} `type:"structure"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` -} - -// String returns the string representation -func (s UpdateAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAccountInput) GoString() string { - return s.String() -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateAccountInput) SetPatchOperations(v []*PatchOperation) *UpdateAccountInput { - s.PatchOperations = v - return s -} - -// A request to change information about an ApiKey resource. -type UpdateApiKeyInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the ApiKey resource to be updated. - // - // ApiKey is a required field - ApiKey *string `location:"uri" locationName:"api_Key" type:"string" required:"true"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` -} - -// String returns the string representation -func (s UpdateApiKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApiKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApiKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApiKeyInput"} - if s.ApiKey == nil { - invalidParams.Add(request.NewErrParamRequired("ApiKey")) - } - if s.ApiKey != nil && len(*s.ApiKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiKey", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiKey sets the ApiKey field's value. -func (s *UpdateApiKeyInput) SetApiKey(v string) *UpdateApiKeyInput { - s.ApiKey = &v - return s -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateApiKeyInput) SetPatchOperations(v []*PatchOperation) *UpdateApiKeyInput { - s.PatchOperations = v - return s -} - -// Request to update an existing Authorizer resource. -type UpdateAuthorizerInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the Authorizer resource. - // - // AuthorizerId is a required field - AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAuthorizerInput"} - if s.AuthorizerId == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) - } - if s.AuthorizerId != nil && len(*s.AuthorizerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizerId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *UpdateAuthorizerInput) SetAuthorizerId(v string) *UpdateAuthorizerInput { - s.AuthorizerId = &v - return s -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateAuthorizerInput) SetPatchOperations(v []*PatchOperation) *UpdateAuthorizerInput { - s.PatchOperations = v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *UpdateAuthorizerInput) SetRestApiId(v string) *UpdateAuthorizerInput { - s.RestApiId = &v - return s -} - -// A request to change information about the BasePathMapping resource. -type UpdateBasePathMappingInput struct { - _ struct{} `type:"structure"` - - // [Required] The base path of the BasePathMapping resource to change. - // - // BasePath is a required field - BasePath *string `location:"uri" locationName:"base_path" type:"string" required:"true"` - - // [Required] The domain name of the BasePathMapping resource to change. - // - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` -} - -// String returns the string representation -func (s UpdateBasePathMappingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBasePathMappingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateBasePathMappingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateBasePathMappingInput"} - if s.BasePath == nil { - invalidParams.Add(request.NewErrParamRequired("BasePath")) - } - if s.BasePath != nil && len(*s.BasePath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BasePath", 1)) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBasePath sets the BasePath field's value. -func (s *UpdateBasePathMappingInput) SetBasePath(v string) *UpdateBasePathMappingInput { - s.BasePath = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *UpdateBasePathMappingInput) SetDomainName(v string) *UpdateBasePathMappingInput { - s.DomainName = &v - return s -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateBasePathMappingInput) SetPatchOperations(v []*PatchOperation) *UpdateBasePathMappingInput { - s.PatchOperations = v - return s -} - -// A request to change information about an ClientCertificate resource. -type UpdateClientCertificateInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the ClientCertificate resource to be updated. - // - // ClientCertificateId is a required field - ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` -} - -// String returns the string representation -func (s UpdateClientCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateClientCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateClientCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateClientCertificateInput"} - if s.ClientCertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientCertificateId")) - } - if s.ClientCertificateId != nil && len(*s.ClientCertificateId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientCertificateId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientCertificateId sets the ClientCertificateId field's value. -func (s *UpdateClientCertificateInput) SetClientCertificateId(v string) *UpdateClientCertificateInput { - s.ClientCertificateId = &v - return s -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateClientCertificateInput) SetPatchOperations(v []*PatchOperation) *UpdateClientCertificateInput { - s.PatchOperations = v - return s -} - -// Requests API Gateway to change information about a Deployment resource. -type UpdateDeploymentInput struct { - _ struct{} `type:"structure"` - - // The replacement identifier for the Deployment resource to change information - // about. - // - // DeploymentId is a required field - DeploymentId *string `location:"uri" locationName:"deployment_id" type:"string" required:"true"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateDeploymentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDeploymentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDeploymentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDeploymentInput"} - 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.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *UpdateDeploymentInput) SetDeploymentId(v string) *UpdateDeploymentInput { - s.DeploymentId = &v - return s -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateDeploymentInput) SetPatchOperations(v []*PatchOperation) *UpdateDeploymentInput { - s.PatchOperations = v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *UpdateDeploymentInput) SetRestApiId(v string) *UpdateDeploymentInput { - s.RestApiId = &v - return s -} - -// Updates an existing documentation part of a given API. -type UpdateDocumentationPartInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the to-be-updated documentation part. - // - // DocumentationPartId is a required field - DocumentationPartId *string `location:"uri" locationName:"part_id" type:"string" required:"true"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateDocumentationPartInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDocumentationPartInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDocumentationPartInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDocumentationPartInput"} - if s.DocumentationPartId == nil { - invalidParams.Add(request.NewErrParamRequired("DocumentationPartId")) - } - if s.DocumentationPartId != nil && len(*s.DocumentationPartId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DocumentationPartId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDocumentationPartId sets the DocumentationPartId field's value. -func (s *UpdateDocumentationPartInput) SetDocumentationPartId(v string) *UpdateDocumentationPartInput { - s.DocumentationPartId = &v - return s -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateDocumentationPartInput) SetPatchOperations(v []*PatchOperation) *UpdateDocumentationPartInput { - s.PatchOperations = v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *UpdateDocumentationPartInput) SetRestApiId(v string) *UpdateDocumentationPartInput { - s.RestApiId = &v - return s -} - -// Updates an existing documentation version of an API. -type UpdateDocumentationVersionInput struct { - _ struct{} `type:"structure"` - - // [Required] The version identifier of the to-be-updated documentation version. - // - // DocumentationVersion is a required field - DocumentationVersion *string `location:"uri" locationName:"doc_version" type:"string" required:"true"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The string identifier of the associated RestApi.. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateDocumentationVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDocumentationVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDocumentationVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDocumentationVersionInput"} - if s.DocumentationVersion == nil { - invalidParams.Add(request.NewErrParamRequired("DocumentationVersion")) - } - if s.DocumentationVersion != nil && len(*s.DocumentationVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DocumentationVersion", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDocumentationVersion sets the DocumentationVersion field's value. -func (s *UpdateDocumentationVersionInput) SetDocumentationVersion(v string) *UpdateDocumentationVersionInput { - s.DocumentationVersion = &v - return s -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateDocumentationVersionInput) SetPatchOperations(v []*PatchOperation) *UpdateDocumentationVersionInput { - s.PatchOperations = v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *UpdateDocumentationVersionInput) SetRestApiId(v string) *UpdateDocumentationVersionInput { - s.RestApiId = &v - return s -} - -// A request to change information about the DomainName resource. -type UpdateDomainNameInput struct { - _ struct{} `type:"structure"` - - // [Required] The name of the DomainName resource to be changed. - // - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` -} - -// String returns the string representation -func (s UpdateDomainNameInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDomainNameInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDomainNameInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDomainNameInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *UpdateDomainNameInput) SetDomainName(v string) *UpdateDomainNameInput { - s.DomainName = &v - return s -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateDomainNameInput) SetPatchOperations(v []*PatchOperation) *UpdateDomainNameInput { - s.PatchOperations = v - return s -} - -// Updates a GatewayResponse of a specified response type on the given RestApi. -type UpdateGatewayResponseInput struct { - _ struct{} `type:"structure"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The response type of the associated GatewayResponse. Valid values - // are ACCESS_DENIED - // API_CONFIGURATION_ERROR - // AUTHORIZER_FAILURE - // AUTHORIZER_CONFIGURATION_ERROR - // BAD_REQUEST_PARAMETERS - // BAD_REQUEST_BODY - // DEFAULT_4XX - // DEFAULT_5XX - // EXPIRED_TOKEN - // INVALID_SIGNATURE - // INTEGRATION_FAILURE - // INTEGRATION_TIMEOUT - // INVALID_API_KEY - // MISSING_AUTHENTICATION_TOKEN - // QUOTA_EXCEEDED - // REQUEST_TOO_LARGE - // RESOURCE_NOT_FOUND - // THROTTLED - // UNAUTHORIZED - // UNSUPPORTED_MEDIA_TYPE - // - // ResponseType is a required field - ResponseType *string `location:"uri" locationName:"response_type" type:"string" required:"true" enum:"GatewayResponseType"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateGatewayResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGatewayResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateGatewayResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateGatewayResponseInput"} - if s.ResponseType == nil { - invalidParams.Add(request.NewErrParamRequired("ResponseType")) - } - if s.ResponseType != nil && len(*s.ResponseType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResponseType", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateGatewayResponseInput) SetPatchOperations(v []*PatchOperation) *UpdateGatewayResponseInput { - s.PatchOperations = v - return s -} - -// SetResponseType sets the ResponseType field's value. -func (s *UpdateGatewayResponseInput) SetResponseType(v string) *UpdateGatewayResponseInput { - s.ResponseType = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *UpdateGatewayResponseInput) SetRestApiId(v string) *UpdateGatewayResponseInput { - s.RestApiId = &v - return s -} - -// A gateway response of a given response type and status code, with optional -// response parameters and mapping templates. -// -// For more information about valid gateway response types, see Gateway Response -// Types Supported by API Gateway (https://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html)Example: -// Get a Gateway Response of a given response type -// -// Request -// -// This example shows how to get a gateway response of the MISSING_AUTHENTICATION_TOKEN -// type. -// -// GET /restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN HTTP/1.1 -// Host: beta-apigateway.us-east-1.amazonaws.com Content-Type: application/json -// X-Amz-Date: 20170503T202516Z Authorization: AWS4-HMAC-SHA256 Credential={access-key-id}/20170503/us-east-1/apigateway/aws4_request, -// SignedHeaders=content-type;host;x-amz-date, Signature=1b52460e3159c1a26cff29093855d50ea141c1c5b937528fecaf60f51129697a -// Cache-Control: no-cache Postman-Token: 3b2a1ce9-c848-2e26-2e2f-9c2caefbed45 -// -// The response type is specified as a URL path. -// -// Response -// -// The successful operation returns the 200 OK status code and a payload similar -// to the following: -// -// { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-gatewayresponse-{rel}.html", -// "name": "gatewayresponse", "templated": true }, "self": { "href": "/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN" -// }, "gatewayresponse:delete": { "href": "/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN" -// }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{response_type}", -// "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN" -// } }, "defaultResponse": false, "responseParameters": { "gatewayresponse.header.x-request-path": -// "method.request.path.petId", "gatewayresponse.header.Access-Control-Allow-Origin": -// "'a.b.c'", "gatewayresponse.header.x-request-query": "method.request.querystring.q", -// "gatewayresponse.header.x-request-header": "method.request.header.Accept" -// }, "responseTemplates": { "application/json": "{\n \"message\": $context.error.messageString,\n -// \"type\": \"$context.error.responseType\",\n \"stage\": \"$context.stage\",\n -// \"resourcePath\": \"$context.resourcePath\",\n \"stageVariables.a\": \"$stageVariables.a\",\n -// \"statusCode\": \"'404'\"\n}" }, "responseType": "MISSING_AUTHENTICATION_TOKEN", -// "statusCode": "404" } -// -// Customize Gateway Responses (https://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html) -type UpdateGatewayResponseOutput struct { - _ struct{} `type:"structure"` - - // A Boolean flag to indicate whether this GatewayResponse is the default gateway - // response (true) or not (false). A default gateway response is one generated - // by API Gateway without any customization by an API developer. - DefaultResponse *bool `locationName:"defaultResponse" type:"boolean"` - - // Response parameters (paths, query strings and headers) of the GatewayResponse - // as a string-to-string map of key-value pairs. - ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` - - // Response templates of the GatewayResponse as a string-to-string map of key-value - // pairs. - ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` - - // The response type of the associated GatewayResponse. Valid values are ACCESS_DENIED - // - // API_CONFIGURATION_ERROR - // AUTHORIZER_FAILURE - // AUTHORIZER_CONFIGURATION_ERROR - // BAD_REQUEST_PARAMETERS - // BAD_REQUEST_BODY - // DEFAULT_4XX - // DEFAULT_5XX - // EXPIRED_TOKEN - // INVALID_SIGNATURE - // INTEGRATION_FAILURE - // INTEGRATION_TIMEOUT - // INVALID_API_KEY - // MISSING_AUTHENTICATION_TOKEN - // QUOTA_EXCEEDED - // REQUEST_TOO_LARGE - // RESOURCE_NOT_FOUND - // THROTTLED - // UNAUTHORIZED - // UNSUPPORTED_MEDIA_TYPE - ResponseType *string `locationName:"responseType" type:"string" enum:"GatewayResponseType"` - - // The HTTP status code for this GatewayResponse. - StatusCode *string `locationName:"statusCode" type:"string"` -} - -// String returns the string representation -func (s UpdateGatewayResponseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGatewayResponseOutput) GoString() string { - return s.String() -} - -// SetDefaultResponse sets the DefaultResponse field's value. -func (s *UpdateGatewayResponseOutput) SetDefaultResponse(v bool) *UpdateGatewayResponseOutput { - s.DefaultResponse = &v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *UpdateGatewayResponseOutput) SetResponseParameters(v map[string]*string) *UpdateGatewayResponseOutput { - s.ResponseParameters = v - return s -} - -// SetResponseTemplates sets the ResponseTemplates field's value. -func (s *UpdateGatewayResponseOutput) SetResponseTemplates(v map[string]*string) *UpdateGatewayResponseOutput { - s.ResponseTemplates = v - return s -} - -// SetResponseType sets the ResponseType field's value. -func (s *UpdateGatewayResponseOutput) SetResponseType(v string) *UpdateGatewayResponseOutput { - s.ResponseType = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *UpdateGatewayResponseOutput) SetStatusCode(v string) *UpdateGatewayResponseOutput { - s.StatusCode = &v - return s -} - -// Represents an update integration request. -type UpdateIntegrationInput struct { - _ struct{} `type:"structure"` - - // [Required] Represents an update integration request's HTTP method. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] Represents an update integration request's resource identifier. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateIntegrationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIntegrationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateIntegrationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateIntegrationInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *UpdateIntegrationInput) SetHttpMethod(v string) *UpdateIntegrationInput { - s.HttpMethod = &v - return s -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateIntegrationInput) SetPatchOperations(v []*PatchOperation) *UpdateIntegrationInput { - s.PatchOperations = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *UpdateIntegrationInput) SetResourceId(v string) *UpdateIntegrationInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *UpdateIntegrationInput) SetRestApiId(v string) *UpdateIntegrationInput { - s.RestApiId = &v - return s -} - -// Represents an update integration response request. -type UpdateIntegrationResponseInput struct { - _ struct{} `type:"structure"` - - // [Required] Specifies an update integration response request's HTTP method. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] Specifies an update integration response request's resource identifier. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] Specifies an update integration response request's status code. - // - // StatusCode is a required field - StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateIntegrationResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIntegrationResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateIntegrationResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateIntegrationResponseInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StatusCode == nil { - invalidParams.Add(request.NewErrParamRequired("StatusCode")) - } - if s.StatusCode != nil && len(*s.StatusCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *UpdateIntegrationResponseInput) SetHttpMethod(v string) *UpdateIntegrationResponseInput { - s.HttpMethod = &v - return s -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateIntegrationResponseInput) SetPatchOperations(v []*PatchOperation) *UpdateIntegrationResponseInput { - s.PatchOperations = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *UpdateIntegrationResponseInput) SetResourceId(v string) *UpdateIntegrationResponseInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *UpdateIntegrationResponseInput) SetRestApiId(v string) *UpdateIntegrationResponseInput { - s.RestApiId = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *UpdateIntegrationResponseInput) SetStatusCode(v string) *UpdateIntegrationResponseInput { - s.StatusCode = &v - return s -} - -// Request to update an existing Method resource. -type UpdateMethodInput struct { - _ struct{} `type:"structure"` - - // [Required] The HTTP verb of the Method resource. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The Resource identifier for the Method resource. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateMethodInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateMethodInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateMethodInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateMethodInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *UpdateMethodInput) SetHttpMethod(v string) *UpdateMethodInput { - s.HttpMethod = &v - return s -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateMethodInput) SetPatchOperations(v []*PatchOperation) *UpdateMethodInput { - s.PatchOperations = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *UpdateMethodInput) SetResourceId(v string) *UpdateMethodInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *UpdateMethodInput) SetRestApiId(v string) *UpdateMethodInput { - s.RestApiId = &v - return s -} - -// A request to update an existing MethodResponse resource. -type UpdateMethodResponseInput struct { - _ struct{} `type:"structure"` - - // [Required] The HTTP verb of the Method resource. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The Resource identifier for the MethodResponse resource. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] The status code for the MethodResponse resource. - // - // StatusCode is a required field - StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateMethodResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateMethodResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateMethodResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateMethodResponseInput"} - if s.HttpMethod == nil { - invalidParams.Add(request.NewErrParamRequired("HttpMethod")) - } - if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StatusCode == nil { - invalidParams.Add(request.NewErrParamRequired("StatusCode")) - } - if s.StatusCode != nil && len(*s.StatusCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpMethod sets the HttpMethod field's value. -func (s *UpdateMethodResponseInput) SetHttpMethod(v string) *UpdateMethodResponseInput { - s.HttpMethod = &v - return s -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateMethodResponseInput) SetPatchOperations(v []*PatchOperation) *UpdateMethodResponseInput { - s.PatchOperations = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *UpdateMethodResponseInput) SetResourceId(v string) *UpdateMethodResponseInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *UpdateMethodResponseInput) SetRestApiId(v string) *UpdateMethodResponseInput { - s.RestApiId = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *UpdateMethodResponseInput) SetStatusCode(v string) *UpdateMethodResponseInput { - s.StatusCode = &v - return s -} - -// Request to update an existing model in an existing RestApi resource. -type UpdateModelInput struct { - _ struct{} `type:"structure"` - - // [Required] The name of the model to update. - // - // ModelName is a required field - ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateModelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateModelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateModelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateModelInput"} - if s.ModelName == nil { - invalidParams.Add(request.NewErrParamRequired("ModelName")) - } - if s.ModelName != nil && len(*s.ModelName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ModelName", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetModelName sets the ModelName field's value. -func (s *UpdateModelInput) SetModelName(v string) *UpdateModelInput { - s.ModelName = &v - return s -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateModelInput) SetPatchOperations(v []*PatchOperation) *UpdateModelInput { - s.PatchOperations = v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *UpdateModelInput) SetRestApiId(v string) *UpdateModelInput { - s.RestApiId = &v - return s -} - -// Updates a RequestValidator of a given RestApi. -type UpdateRequestValidatorInput struct { - _ struct{} `type:"structure"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The identifier of RequestValidator to be updated. - // - // RequestValidatorId is a required field - RequestValidatorId *string `location:"uri" locationName:"requestvalidator_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateRequestValidatorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRequestValidatorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRequestValidatorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRequestValidatorInput"} - if s.RequestValidatorId == nil { - invalidParams.Add(request.NewErrParamRequired("RequestValidatorId")) - } - if s.RequestValidatorId != nil && len(*s.RequestValidatorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RequestValidatorId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateRequestValidatorInput) SetPatchOperations(v []*PatchOperation) *UpdateRequestValidatorInput { - s.PatchOperations = v - return s -} - -// SetRequestValidatorId sets the RequestValidatorId field's value. -func (s *UpdateRequestValidatorInput) SetRequestValidatorId(v string) *UpdateRequestValidatorInput { - s.RequestValidatorId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *UpdateRequestValidatorInput) SetRestApiId(v string) *UpdateRequestValidatorInput { - s.RestApiId = &v - return s -} - -// A set of validation rules for incoming Method requests. -// -// In OpenAPI, a RequestValidator of an API is defined by the x-amazon-apigateway-request-validators.requestValidator -// (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validators.requestValidator.html) -// object. It the referenced using the x-amazon-apigateway-request-validator -// (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validator) -// property. -// -// Enable Basic Request Validation in API Gateway (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) -type UpdateRequestValidatorOutput struct { - _ struct{} `type:"structure"` - - // The identifier of this RequestValidator. - Id *string `locationName:"id" type:"string"` - - // The name of this RequestValidator - Name *string `locationName:"name" type:"string"` - - // A Boolean flag to indicate whether to validate a request body according to - // the configured Model schema. - ValidateRequestBody *bool `locationName:"validateRequestBody" type:"boolean"` - - // A Boolean flag to indicate whether to validate request parameters (true) - // or not (false). - ValidateRequestParameters *bool `locationName:"validateRequestParameters" type:"boolean"` -} - -// String returns the string representation -func (s UpdateRequestValidatorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRequestValidatorOutput) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *UpdateRequestValidatorOutput) SetId(v string) *UpdateRequestValidatorOutput { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateRequestValidatorOutput) SetName(v string) *UpdateRequestValidatorOutput { - s.Name = &v - return s -} - -// SetValidateRequestBody sets the ValidateRequestBody field's value. -func (s *UpdateRequestValidatorOutput) SetValidateRequestBody(v bool) *UpdateRequestValidatorOutput { - s.ValidateRequestBody = &v - return s -} - -// SetValidateRequestParameters sets the ValidateRequestParameters field's value. -func (s *UpdateRequestValidatorOutput) SetValidateRequestParameters(v bool) *UpdateRequestValidatorOutput { - s.ValidateRequestParameters = &v - return s -} - -// Request to change information about a Resource resource. -type UpdateResourceInput struct { - _ struct{} `type:"structure"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The identifier of the Resource resource. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateResourceInput) SetPatchOperations(v []*PatchOperation) *UpdateResourceInput { - s.PatchOperations = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *UpdateResourceInput) SetResourceId(v string) *UpdateResourceInput { - s.ResourceId = &v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *UpdateResourceInput) SetRestApiId(v string) *UpdateResourceInput { - s.RestApiId = &v - return s -} - -// Request to update an existing RestApi resource in your collection. -type UpdateRestApiInput struct { - _ struct{} `type:"structure"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateRestApiInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRestApiInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRestApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRestApiInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateRestApiInput) SetPatchOperations(v []*PatchOperation) *UpdateRestApiInput { - s.PatchOperations = v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *UpdateRestApiInput) SetRestApiId(v string) *UpdateRestApiInput { - s.RestApiId = &v - return s -} - -// Requests API Gateway to change information about a Stage resource. -type UpdateStageInput struct { - _ struct{} `type:"structure"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The string identifier of the associated RestApi. - // - // RestApiId is a required field - RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - - // [Required] The name of the Stage resource to change information about. - // - // StageName is a required field - StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateStageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateStageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateStageInput"} - if s.RestApiId == nil { - invalidParams.Add(request.NewErrParamRequired("RestApiId")) - } - if s.RestApiId != nil && len(*s.RestApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateStageInput) SetPatchOperations(v []*PatchOperation) *UpdateStageInput { - s.PatchOperations = v - return s -} - -// SetRestApiId sets the RestApiId field's value. -func (s *UpdateStageInput) SetRestApiId(v string) *UpdateStageInput { - s.RestApiId = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *UpdateStageInput) SetStageName(v string) *UpdateStageInput { - s.StageName = &v - return s -} - -// The PATCH request to grant a temporary extension to the remaining quota of -// a usage plan associated with a specified API key. -type UpdateUsageInput struct { - _ struct{} `type:"structure"` - - // [Required] The identifier of the API key associated with the usage plan in - // which a temporary extension is granted to the remaining quota. - // - // KeyId is a required field - KeyId *string `location:"uri" locationName:"keyId" type:"string" required:"true"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The Id of the usage plan associated with the usage data. - // - // UsagePlanId is a required field - UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateUsageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUsageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateUsageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateUsageInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.UsagePlanId == nil { - invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) - } - if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *UpdateUsageInput) SetKeyId(v string) *UpdateUsageInput { - s.KeyId = &v - return s -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateUsageInput) SetPatchOperations(v []*PatchOperation) *UpdateUsageInput { - s.PatchOperations = v - return s -} - -// SetUsagePlanId sets the UsagePlanId field's value. -func (s *UpdateUsageInput) SetUsagePlanId(v string) *UpdateUsageInput { - s.UsagePlanId = &v - return s -} - -// The PATCH request to update a usage plan of a given plan Id. -type UpdateUsagePlanInput struct { - _ struct{} `type:"structure"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The Id of the to-be-updated usage plan. - // - // UsagePlanId is a required field - UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateUsagePlanInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUsagePlanInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateUsagePlanInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateUsagePlanInput"} - if s.UsagePlanId == nil { - invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) - } - if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateUsagePlanInput) SetPatchOperations(v []*PatchOperation) *UpdateUsagePlanInput { - s.PatchOperations = v - return s -} - -// SetUsagePlanId sets the UsagePlanId field's value. -func (s *UpdateUsagePlanInput) SetUsagePlanId(v string) *UpdateUsagePlanInput { - s.UsagePlanId = &v - return s -} - -// Updates an existing VpcLink of a specified identifier. -type UpdateVpcLinkInput struct { - _ struct{} `type:"structure"` - - // A list of update operations to be applied to the specified resource and in - // the order specified in this list. - PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - - // [Required] The identifier of the VpcLink. It is used in an Integration to - // reference this VpcLink. - // - // VpcLinkId is a required field - VpcLinkId *string `location:"uri" locationName:"vpclink_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateVpcLinkInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVpcLinkInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateVpcLinkInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateVpcLinkInput"} - if s.VpcLinkId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcLinkId")) - } - if s.VpcLinkId != nil && len(*s.VpcLinkId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VpcLinkId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPatchOperations sets the PatchOperations field's value. -func (s *UpdateVpcLinkInput) SetPatchOperations(v []*PatchOperation) *UpdateVpcLinkInput { - s.PatchOperations = v - return s -} - -// SetVpcLinkId sets the VpcLinkId field's value. -func (s *UpdateVpcLinkInput) SetVpcLinkId(v string) *UpdateVpcLinkInput { - s.VpcLinkId = &v - return s -} - -// A API Gateway VPC link for a RestApi to access resources in an Amazon Virtual -// Private Cloud (VPC). -// -// To enable access to a resource in an Amazon Virtual Private Cloud through -// Amazon API Gateway, you, as an API developer, create a VpcLink resource targeted -// for one or more network load balancers of the VPC and then integrate an API -// method with a private integration that uses the VpcLink. The private integration -// has an integration type of HTTP or HTTP_PROXY and has a connection type of -// VPC_LINK. The integration uses the connectionId property to identify the -// VpcLink used. -type UpdateVpcLinkOutput struct { - _ struct{} `type:"structure"` - - // The description of the VPC link. - Description *string `locationName:"description" type:"string"` - - // The identifier of the VpcLink. It is used in an Integration to reference - // this VpcLink. - Id *string `locationName:"id" type:"string"` - - // The name used to label and identify the VPC link. - Name *string `locationName:"name" type:"string"` - - // The status of the VPC link. The valid values are AVAILABLE, PENDING, DELETING, - // or FAILED. Deploying an API will wait if the status is PENDING and will fail - // if the status is DELETING. - Status *string `locationName:"status" type:"string" enum:"VpcLinkStatus"` - - // A description about the VPC link status. - StatusMessage *string `locationName:"statusMessage" type:"string"` - - // The ARNs of network load balancers of the VPC targeted by the VPC link. The - // network load balancers must be owned by the same AWS account of the API owner. - TargetArns []*string `locationName:"targetArns" type:"list"` -} - -// String returns the string representation -func (s UpdateVpcLinkOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVpcLinkOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *UpdateVpcLinkOutput) SetDescription(v string) *UpdateVpcLinkOutput { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateVpcLinkOutput) SetId(v string) *UpdateVpcLinkOutput { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateVpcLinkOutput) SetName(v string) *UpdateVpcLinkOutput { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateVpcLinkOutput) SetStatus(v string) *UpdateVpcLinkOutput { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *UpdateVpcLinkOutput) SetStatusMessage(v string) *UpdateVpcLinkOutput { - s.StatusMessage = &v - return s -} - -// SetTargetArns sets the TargetArns field's value. -func (s *UpdateVpcLinkOutput) SetTargetArns(v []*string) *UpdateVpcLinkOutput { - s.TargetArns = v - return s -} - -// Represents the usage data of a usage plan. -// -// Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html), Manage Usage in a Usage Plan (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-usage-plans-with-console.html#api-gateway-usage-plan-manage-usage) -type Usage struct { - _ struct{} `type:"structure"` - - // The ending date of the usage data. - EndDate *string `locationName:"endDate" type:"string"` - - // The usage data, as daily logs of used and remaining quotas, over the specified - // time interval indexed over the API keys in a usage plan. For example, {..., - // "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]}, where {api_key} - // stands for an API key value and the daily log entry is of the format [used - // quota, remaining quota]. - Items map[string][][]*int64 `locationName:"values" type:"map"` - - Position *string `locationName:"position" type:"string"` - - // The starting date of the usage data. - StartDate *string `locationName:"startDate" type:"string"` - - // The plan Id associated with this usage data. - UsagePlanId *string `locationName:"usagePlanId" type:"string"` -} - -// String returns the string representation -func (s Usage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Usage) GoString() string { - return s.String() -} - -// SetEndDate sets the EndDate field's value. -func (s *Usage) SetEndDate(v string) *Usage { - s.EndDate = &v - return s -} - -// SetItems sets the Items field's value. -func (s *Usage) SetItems(v map[string][][]*int64) *Usage { - s.Items = v - return s -} - -// SetPosition sets the Position field's value. -func (s *Usage) SetPosition(v string) *Usage { - s.Position = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *Usage) SetStartDate(v string) *Usage { - s.StartDate = &v - return s -} - -// SetUsagePlanId sets the UsagePlanId field's value. -func (s *Usage) SetUsagePlanId(v string) *Usage { - s.UsagePlanId = &v - return s -} - -// Represents a usage plan than can specify who can assess associated API stages -// with specified request limits and quotas. -// -// In a usage plan, you associate an API by specifying the API's Id and a stage -// name of the specified API. You add plan customers by adding API keys to the -// plan. -// -// Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) -type UsagePlan struct { - _ struct{} `type:"structure"` - - // The associated API stages of a usage plan. - ApiStages []*ApiStage `locationName:"apiStages" type:"list"` - - // The description of a usage plan. - Description *string `locationName:"description" type:"string"` - - // The identifier of a UsagePlan resource. - Id *string `locationName:"id" type:"string"` - - // The name of a usage plan. - Name *string `locationName:"name" type:"string"` - - // The AWS Markeplace product identifier to associate with the usage plan as - // a SaaS product on AWS Marketplace. - ProductCode *string `locationName:"productCode" type:"string"` - - // The maximum number of permitted requests per a given unit time interval. - Quota *QuotaSettings `locationName:"quota" type:"structure"` - - // The request throttle limits of a usage plan. - Throttle *ThrottleSettings `locationName:"throttle" type:"structure"` -} - -// String returns the string representation -func (s UsagePlan) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UsagePlan) GoString() string { - return s.String() -} - -// SetApiStages sets the ApiStages field's value. -func (s *UsagePlan) SetApiStages(v []*ApiStage) *UsagePlan { - s.ApiStages = v - return s -} - -// SetDescription sets the Description field's value. -func (s *UsagePlan) SetDescription(v string) *UsagePlan { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *UsagePlan) SetId(v string) *UsagePlan { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *UsagePlan) SetName(v string) *UsagePlan { - s.Name = &v - return s -} - -// SetProductCode sets the ProductCode field's value. -func (s *UsagePlan) SetProductCode(v string) *UsagePlan { - s.ProductCode = &v - return s -} - -// SetQuota sets the Quota field's value. -func (s *UsagePlan) SetQuota(v *QuotaSettings) *UsagePlan { - s.Quota = v - return s -} - -// SetThrottle sets the Throttle field's value. -func (s *UsagePlan) SetThrottle(v *ThrottleSettings) *UsagePlan { - s.Throttle = v - return s -} - -// Represents a usage plan key to identify a plan customer. -// -// To associate an API stage with a selected API key in a usage plan, you must -// create a UsagePlanKey resource to represent the selected ApiKey. -// -// " Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) -type UsagePlanKey struct { - _ struct{} `type:"structure"` - - // The Id of a usage plan key. - Id *string `locationName:"id" type:"string"` - - // The name of a usage plan key. - Name *string `locationName:"name" type:"string"` - - // The type of a usage plan key. Currently, the valid key type is API_KEY. - Type *string `locationName:"type" type:"string"` - - // The value of a usage plan key. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s UsagePlanKey) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UsagePlanKey) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *UsagePlanKey) SetId(v string) *UsagePlanKey { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *UsagePlanKey) SetName(v string) *UsagePlanKey { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *UsagePlanKey) SetType(v string) *UsagePlanKey { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *UsagePlanKey) SetValue(v string) *UsagePlanKey { - s.Value = &v - return s -} - -const ( - // ApiKeySourceTypeHeader is a ApiKeySourceType enum value - ApiKeySourceTypeHeader = "HEADER" - - // ApiKeySourceTypeAuthorizer is a ApiKeySourceType enum value - ApiKeySourceTypeAuthorizer = "AUTHORIZER" -) - -const ( - // ApiKeysFormatCsv is a ApiKeysFormat enum value - ApiKeysFormatCsv = "csv" -) - -// The authorizer type. Valid values are TOKEN for a Lambda function using a -// single authorization token submitted in a custom header, REQUEST for a Lambda -// function using incoming request parameters, and COGNITO_USER_POOLS for using -// an Amazon Cognito user pool. -const ( - // AuthorizerTypeToken is a AuthorizerType enum value - AuthorizerTypeToken = "TOKEN" - - // AuthorizerTypeRequest is a AuthorizerType enum value - AuthorizerTypeRequest = "REQUEST" - - // AuthorizerTypeCognitoUserPools is a AuthorizerType enum value - AuthorizerTypeCognitoUserPools = "COGNITO_USER_POOLS" -) - -// Returns the size of the CacheCluster. -const ( - // CacheClusterSize05 is a CacheClusterSize enum value - CacheClusterSize05 = "0.5" - - // CacheClusterSize16 is a CacheClusterSize enum value - CacheClusterSize16 = "1.6" - - // CacheClusterSize61 is a CacheClusterSize enum value - CacheClusterSize61 = "6.1" - - // CacheClusterSize135 is a CacheClusterSize enum value - CacheClusterSize135 = "13.5" - - // CacheClusterSize284 is a CacheClusterSize enum value - CacheClusterSize284 = "28.4" - - // CacheClusterSize582 is a CacheClusterSize enum value - CacheClusterSize582 = "58.2" - - // CacheClusterSize118 is a CacheClusterSize enum value - CacheClusterSize118 = "118" - - // CacheClusterSize237 is a CacheClusterSize enum value - CacheClusterSize237 = "237" -) - -// Returns the status of the CacheCluster. -const ( - // CacheClusterStatusCreateInProgress is a CacheClusterStatus enum value - CacheClusterStatusCreateInProgress = "CREATE_IN_PROGRESS" - - // CacheClusterStatusAvailable is a CacheClusterStatus enum value - CacheClusterStatusAvailable = "AVAILABLE" - - // CacheClusterStatusDeleteInProgress is a CacheClusterStatus enum value - CacheClusterStatusDeleteInProgress = "DELETE_IN_PROGRESS" - - // CacheClusterStatusNotAvailable is a CacheClusterStatus enum value - CacheClusterStatusNotAvailable = "NOT_AVAILABLE" - - // CacheClusterStatusFlushInProgress is a CacheClusterStatus enum value - CacheClusterStatusFlushInProgress = "FLUSH_IN_PROGRESS" -) - -const ( - // ConnectionTypeInternet is a ConnectionType enum value - ConnectionTypeInternet = "INTERNET" - - // ConnectionTypeVpcLink is a ConnectionType enum value - ConnectionTypeVpcLink = "VPC_LINK" -) - -const ( - // ContentHandlingStrategyConvertToBinary is a ContentHandlingStrategy enum value - ContentHandlingStrategyConvertToBinary = "CONVERT_TO_BINARY" - - // ContentHandlingStrategyConvertToText is a ContentHandlingStrategy enum value - ContentHandlingStrategyConvertToText = "CONVERT_TO_TEXT" -) - -const ( - // DocumentationPartTypeApi is a DocumentationPartType enum value - DocumentationPartTypeApi = "API" - - // DocumentationPartTypeAuthorizer is a DocumentationPartType enum value - DocumentationPartTypeAuthorizer = "AUTHORIZER" - - // DocumentationPartTypeModel is a DocumentationPartType enum value - DocumentationPartTypeModel = "MODEL" - - // DocumentationPartTypeResource is a DocumentationPartType enum value - DocumentationPartTypeResource = "RESOURCE" - - // DocumentationPartTypeMethod is a DocumentationPartType enum value - DocumentationPartTypeMethod = "METHOD" - - // DocumentationPartTypePathParameter is a DocumentationPartType enum value - DocumentationPartTypePathParameter = "PATH_PARAMETER" - - // DocumentationPartTypeQueryParameter is a DocumentationPartType enum value - DocumentationPartTypeQueryParameter = "QUERY_PARAMETER" - - // DocumentationPartTypeRequestHeader is a DocumentationPartType enum value - DocumentationPartTypeRequestHeader = "REQUEST_HEADER" - - // DocumentationPartTypeRequestBody is a DocumentationPartType enum value - DocumentationPartTypeRequestBody = "REQUEST_BODY" - - // DocumentationPartTypeResponse is a DocumentationPartType enum value - DocumentationPartTypeResponse = "RESPONSE" - - // DocumentationPartTypeResponseHeader is a DocumentationPartType enum value - DocumentationPartTypeResponseHeader = "RESPONSE_HEADER" - - // DocumentationPartTypeResponseBody is a DocumentationPartType enum value - DocumentationPartTypeResponseBody = "RESPONSE_BODY" -) - -// The endpoint type. The valid values are EDGE for edge-optimized API setup, -// most suitable for mobile applications; REGIONAL for regional API endpoint -// setup, most suitable for calling from AWS Region; and PRIVATE for private -// APIs. -const ( - // EndpointTypeRegional is a EndpointType enum value - EndpointTypeRegional = "REGIONAL" - - // EndpointTypeEdge is a EndpointType enum value - EndpointTypeEdge = "EDGE" - - // EndpointTypePrivate is a EndpointType enum value - EndpointTypePrivate = "PRIVATE" -) - -const ( - // GatewayResponseTypeDefault4xx is a GatewayResponseType enum value - GatewayResponseTypeDefault4xx = "DEFAULT_4XX" - - // GatewayResponseTypeDefault5xx is a GatewayResponseType enum value - GatewayResponseTypeDefault5xx = "DEFAULT_5XX" - - // GatewayResponseTypeResourceNotFound is a GatewayResponseType enum value - GatewayResponseTypeResourceNotFound = "RESOURCE_NOT_FOUND" - - // GatewayResponseTypeUnauthorized is a GatewayResponseType enum value - GatewayResponseTypeUnauthorized = "UNAUTHORIZED" - - // GatewayResponseTypeInvalidApiKey is a GatewayResponseType enum value - GatewayResponseTypeInvalidApiKey = "INVALID_API_KEY" - - // GatewayResponseTypeAccessDenied is a GatewayResponseType enum value - GatewayResponseTypeAccessDenied = "ACCESS_DENIED" - - // GatewayResponseTypeAuthorizerFailure is a GatewayResponseType enum value - GatewayResponseTypeAuthorizerFailure = "AUTHORIZER_FAILURE" - - // GatewayResponseTypeAuthorizerConfigurationError is a GatewayResponseType enum value - GatewayResponseTypeAuthorizerConfigurationError = "AUTHORIZER_CONFIGURATION_ERROR" - - // GatewayResponseTypeInvalidSignature is a GatewayResponseType enum value - GatewayResponseTypeInvalidSignature = "INVALID_SIGNATURE" - - // GatewayResponseTypeExpiredToken is a GatewayResponseType enum value - GatewayResponseTypeExpiredToken = "EXPIRED_TOKEN" - - // GatewayResponseTypeMissingAuthenticationToken is a GatewayResponseType enum value - GatewayResponseTypeMissingAuthenticationToken = "MISSING_AUTHENTICATION_TOKEN" - - // GatewayResponseTypeIntegrationFailure is a GatewayResponseType enum value - GatewayResponseTypeIntegrationFailure = "INTEGRATION_FAILURE" - - // GatewayResponseTypeIntegrationTimeout is a GatewayResponseType enum value - GatewayResponseTypeIntegrationTimeout = "INTEGRATION_TIMEOUT" - - // GatewayResponseTypeApiConfigurationError is a GatewayResponseType enum value - GatewayResponseTypeApiConfigurationError = "API_CONFIGURATION_ERROR" - - // GatewayResponseTypeUnsupportedMediaType is a GatewayResponseType enum value - GatewayResponseTypeUnsupportedMediaType = "UNSUPPORTED_MEDIA_TYPE" - - // GatewayResponseTypeBadRequestParameters is a GatewayResponseType enum value - GatewayResponseTypeBadRequestParameters = "BAD_REQUEST_PARAMETERS" - - // GatewayResponseTypeBadRequestBody is a GatewayResponseType enum value - GatewayResponseTypeBadRequestBody = "BAD_REQUEST_BODY" - - // GatewayResponseTypeRequestTooLarge is a GatewayResponseType enum value - GatewayResponseTypeRequestTooLarge = "REQUEST_TOO_LARGE" - - // GatewayResponseTypeThrottled is a GatewayResponseType enum value - GatewayResponseTypeThrottled = "THROTTLED" - - // GatewayResponseTypeQuotaExceeded is a GatewayResponseType enum value - GatewayResponseTypeQuotaExceeded = "QUOTA_EXCEEDED" -) - -// The integration type. The valid value is HTTP for integrating an API method -// with an HTTP backend; AWS with any AWS service endpoints; MOCK for testing -// without actually invoking the backend; HTTP_PROXY for integrating with the -// HTTP proxy integration; AWS_PROXY for integrating with the Lambda proxy integration. -const ( - // IntegrationTypeHttp is a IntegrationType enum value - IntegrationTypeHttp = "HTTP" - - // IntegrationTypeAws is a IntegrationType enum value - IntegrationTypeAws = "AWS" - - // IntegrationTypeMock is a IntegrationType enum value - IntegrationTypeMock = "MOCK" - - // IntegrationTypeHttpProxy is a IntegrationType enum value - IntegrationTypeHttpProxy = "HTTP_PROXY" - - // IntegrationTypeAwsProxy is a IntegrationType enum value - IntegrationTypeAwsProxy = "AWS_PROXY" -) - -const ( - // LocationStatusTypeDocumented is a LocationStatusType enum value - LocationStatusTypeDocumented = "DOCUMENTED" - - // LocationStatusTypeUndocumented is a LocationStatusType enum value - LocationStatusTypeUndocumented = "UNDOCUMENTED" -) - -const ( - // OpAdd is a Op enum value - OpAdd = "add" - - // OpRemove is a Op enum value - OpRemove = "remove" - - // OpReplace is a Op enum value - OpReplace = "replace" - - // OpMove is a Op enum value - OpMove = "move" - - // OpCopy is a Op enum value - OpCopy = "copy" - - // OpTest is a Op enum value - OpTest = "test" -) - -const ( - // PutModeMerge is a PutMode enum value - PutModeMerge = "merge" - - // PutModeOverwrite is a PutMode enum value - PutModeOverwrite = "overwrite" -) - -const ( - // QuotaPeriodTypeDay is a QuotaPeriodType enum value - QuotaPeriodTypeDay = "DAY" - - // QuotaPeriodTypeWeek is a QuotaPeriodType enum value - QuotaPeriodTypeWeek = "WEEK" - - // QuotaPeriodTypeMonth is a QuotaPeriodType enum value - QuotaPeriodTypeMonth = "MONTH" -) - -const ( - // UnauthorizedCacheControlHeaderStrategyFailWith403 is a UnauthorizedCacheControlHeaderStrategy enum value - UnauthorizedCacheControlHeaderStrategyFailWith403 = "FAIL_WITH_403" - - // UnauthorizedCacheControlHeaderStrategySucceedWithResponseHeader is a UnauthorizedCacheControlHeaderStrategy enum value - UnauthorizedCacheControlHeaderStrategySucceedWithResponseHeader = "SUCCEED_WITH_RESPONSE_HEADER" - - // UnauthorizedCacheControlHeaderStrategySucceedWithoutResponseHeader is a UnauthorizedCacheControlHeaderStrategy enum value - UnauthorizedCacheControlHeaderStrategySucceedWithoutResponseHeader = "SUCCEED_WITHOUT_RESPONSE_HEADER" -) - -const ( - // VpcLinkStatusAvailable is a VpcLinkStatus enum value - VpcLinkStatusAvailable = "AVAILABLE" - - // VpcLinkStatusPending is a VpcLinkStatus enum value - VpcLinkStatusPending = "PENDING" - - // VpcLinkStatusDeleting is a VpcLinkStatus enum value - VpcLinkStatusDeleting = "DELETING" - - // VpcLinkStatusFailed is a VpcLinkStatus enum value - VpcLinkStatusFailed = "FAILED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/customization.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/customization.go deleted file mode 100644 index 2dc4a7c44..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/customization.go +++ /dev/null @@ -1,14 +0,0 @@ -package apigateway - -import ( - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/request" -) - -func init() { - initClient = func(c *client.Client) { - c.Handlers.Build.PushBack(func(r *request.Request) { - r.HTTPRequest.Header.Add("Accept", "application/json") - }) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/doc.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/doc.go deleted file mode 100644 index 7a343e30a..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/doc.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package apigateway provides the client and types for making API -// requests to Amazon API Gateway. -// -// Amazon API Gateway helps developers deliver robust, secure, and scalable -// mobile and web application back ends. API Gateway allows developers to securely -// connect mobile and web applications to APIs that run on AWS Lambda, Amazon -// EC2, or other publicly addressable web services that are hosted outside of -// AWS. -// -// See apigateway package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/apigateway/ -// -// Using the Client -// -// To contact Amazon API Gateway with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon API Gateway client APIGateway for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/apigateway/#New -package apigateway diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/errors.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/errors.go deleted file mode 100644 index 99208e845..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/errors.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package apigateway - -const ( - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - // - // The submitted request is not valid, for example, the input is incomplete - // or incorrect. See the accompanying error message for details. - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeConflictException for service response error code - // "ConflictException". - // - // The request configuration has conflicts. For details, see the accompanying - // error message. - ErrCodeConflictException = "ConflictException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The request exceeded the rate limit. Retry after the specified time period. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // The requested resource is not found. Make sure that the request URI is correct. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeServiceUnavailableException for service response error code - // "ServiceUnavailableException". - // - // The requested service is not available. For details see the accompanying - // error message. Retry after the specified time period. - ErrCodeServiceUnavailableException = "ServiceUnavailableException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // The request has reached its throttling limit. Retry after the specified time - // period. - ErrCodeTooManyRequestsException = "TooManyRequestsException" - - // ErrCodeUnauthorizedException for service response error code - // "UnauthorizedException". - // - // The request is denied because the caller has insufficient permissions. - ErrCodeUnauthorizedException = "UnauthorizedException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/service.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/service.go deleted file mode 100644 index 8064d24fc..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package apigateway - -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" -) - -// APIGateway provides the API operation methods for making requests to -// Amazon API Gateway. See this package's package overview docs -// for details on the service. -// -// APIGateway methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type APIGateway 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 = "apigateway" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "API Gateway" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the APIGateway client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a APIGateway client from just a session. -// svc := apigateway.New(mySession) -// -// // Create a APIGateway client with additional configuration -// svc := apigateway.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *APIGateway { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *APIGateway { - svc := &APIGateway{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-07-09", - }, - 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 APIGateway operation and runs any -// custom request initialization. -func (c *APIGateway) 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/apigatewayv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/api.go deleted file mode 100644 index 801a7ee1f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/api.go +++ /dev/null @@ -1,14048 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package apigatewayv2 - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opCreateApi = "CreateApi" - -// CreateApiRequest generates a "aws/request.Request" representing the -// client's request for the CreateApi operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateApi for more information on using the CreateApi -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateApiRequest method. -// req, resp := client.CreateApiRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateApi -func (c *ApiGatewayV2) CreateApiRequest(input *CreateApiInput) (req *request.Request, output *CreateApiOutput) { - op := &request.Operation{ - Name: opCreateApi, - HTTPMethod: "POST", - HTTPPath: "/v2/apis", - } - - if input == nil { - input = &CreateApiInput{} - } - - output = &CreateApiOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateApi API operation for AmazonApiGatewayV2. -// -// Creates an Api resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation CreateApi for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateApi -func (c *ApiGatewayV2) CreateApi(input *CreateApiInput) (*CreateApiOutput, error) { - req, out := c.CreateApiRequest(input) - return out, req.Send() -} - -// CreateApiWithContext is the same as CreateApi with the addition of -// the ability to pass a context and additional request options. -// -// See CreateApi for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) CreateApiWithContext(ctx aws.Context, input *CreateApiInput, opts ...request.Option) (*CreateApiOutput, error) { - req, out := c.CreateApiRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateApiMapping = "CreateApiMapping" - -// CreateApiMappingRequest generates a "aws/request.Request" representing the -// client's request for the CreateApiMapping operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateApiMapping for more information on using the CreateApiMapping -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateApiMappingRequest method. -// req, resp := client.CreateApiMappingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateApiMapping -func (c *ApiGatewayV2) CreateApiMappingRequest(input *CreateApiMappingInput) (req *request.Request, output *CreateApiMappingOutput) { - op := &request.Operation{ - Name: opCreateApiMapping, - HTTPMethod: "POST", - HTTPPath: "/v2/domainnames/{domainName}/apimappings", - } - - if input == nil { - input = &CreateApiMappingInput{} - } - - output = &CreateApiMappingOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateApiMapping API operation for AmazonApiGatewayV2. -// -// Creates an API mapping. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation CreateApiMapping for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateApiMapping -func (c *ApiGatewayV2) CreateApiMapping(input *CreateApiMappingInput) (*CreateApiMappingOutput, error) { - req, out := c.CreateApiMappingRequest(input) - return out, req.Send() -} - -// CreateApiMappingWithContext is the same as CreateApiMapping with the addition of -// the ability to pass a context and additional request options. -// -// See CreateApiMapping for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) CreateApiMappingWithContext(ctx aws.Context, input *CreateApiMappingInput, opts ...request.Option) (*CreateApiMappingOutput, error) { - req, out := c.CreateApiMappingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAuthorizer = "CreateAuthorizer" - -// CreateAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the CreateAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAuthorizer for more information on using the CreateAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAuthorizerRequest method. -// req, resp := client.CreateAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateAuthorizer -func (c *ApiGatewayV2) CreateAuthorizerRequest(input *CreateAuthorizerInput) (req *request.Request, output *CreateAuthorizerOutput) { - op := &request.Operation{ - Name: opCreateAuthorizer, - HTTPMethod: "POST", - HTTPPath: "/v2/apis/{apiId}/authorizers", - } - - if input == nil { - input = &CreateAuthorizerInput{} - } - - output = &CreateAuthorizerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAuthorizer API operation for AmazonApiGatewayV2. -// -// Creates an Authorizer for an API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation CreateAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateAuthorizer -func (c *ApiGatewayV2) CreateAuthorizer(input *CreateAuthorizerInput) (*CreateAuthorizerOutput, error) { - req, out := c.CreateAuthorizerRequest(input) - return out, req.Send() -} - -// CreateAuthorizerWithContext is the same as CreateAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) CreateAuthorizerWithContext(ctx aws.Context, input *CreateAuthorizerInput, opts ...request.Option) (*CreateAuthorizerOutput, error) { - req, out := c.CreateAuthorizerRequest(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/apigatewayv2-2018-11-29/CreateDeployment -func (c *ApiGatewayV2) CreateDeploymentRequest(input *CreateDeploymentInput) (req *request.Request, output *CreateDeploymentOutput) { - op := &request.Operation{ - Name: opCreateDeployment, - HTTPMethod: "POST", - HTTPPath: "/v2/apis/{apiId}/deployments", - } - - if input == nil { - input = &CreateDeploymentInput{} - } - - output = &CreateDeploymentOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDeployment API operation for AmazonApiGatewayV2. -// -// Creates a Deployment for an API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation CreateDeployment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateDeployment -func (c *ApiGatewayV2) 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 *ApiGatewayV2) 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 opCreateDomainName = "CreateDomainName" - -// CreateDomainNameRequest generates a "aws/request.Request" representing the -// client's request for the CreateDomainName operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDomainName for more information on using the CreateDomainName -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDomainNameRequest method. -// req, resp := client.CreateDomainNameRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateDomainName -func (c *ApiGatewayV2) CreateDomainNameRequest(input *CreateDomainNameInput) (req *request.Request, output *CreateDomainNameOutput) { - op := &request.Operation{ - Name: opCreateDomainName, - HTTPMethod: "POST", - HTTPPath: "/v2/domainnames", - } - - if input == nil { - input = &CreateDomainNameInput{} - } - - output = &CreateDomainNameOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDomainName API operation for AmazonApiGatewayV2. -// -// Creates a domain name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation CreateDomainName for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateDomainName -func (c *ApiGatewayV2) CreateDomainName(input *CreateDomainNameInput) (*CreateDomainNameOutput, error) { - req, out := c.CreateDomainNameRequest(input) - return out, req.Send() -} - -// CreateDomainNameWithContext is the same as CreateDomainName with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDomainName for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) CreateDomainNameWithContext(ctx aws.Context, input *CreateDomainNameInput, opts ...request.Option) (*CreateDomainNameOutput, error) { - req, out := c.CreateDomainNameRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateIntegration = "CreateIntegration" - -// CreateIntegrationRequest generates a "aws/request.Request" representing the -// client's request for the CreateIntegration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateIntegration for more information on using the CreateIntegration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateIntegrationRequest method. -// req, resp := client.CreateIntegrationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateIntegration -func (c *ApiGatewayV2) CreateIntegrationRequest(input *CreateIntegrationInput) (req *request.Request, output *CreateIntegrationOutput) { - op := &request.Operation{ - Name: opCreateIntegration, - HTTPMethod: "POST", - HTTPPath: "/v2/apis/{apiId}/integrations", - } - - if input == nil { - input = &CreateIntegrationInput{} - } - - output = &CreateIntegrationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateIntegration API operation for AmazonApiGatewayV2. -// -// Creates an Integration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation CreateIntegration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateIntegration -func (c *ApiGatewayV2) CreateIntegration(input *CreateIntegrationInput) (*CreateIntegrationOutput, error) { - req, out := c.CreateIntegrationRequest(input) - return out, req.Send() -} - -// CreateIntegrationWithContext is the same as CreateIntegration with the addition of -// the ability to pass a context and additional request options. -// -// See CreateIntegration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) CreateIntegrationWithContext(ctx aws.Context, input *CreateIntegrationInput, opts ...request.Option) (*CreateIntegrationOutput, error) { - req, out := c.CreateIntegrationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateIntegrationResponse = "CreateIntegrationResponse" - -// CreateIntegrationResponseRequest generates a "aws/request.Request" representing the -// client's request for the CreateIntegrationResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateIntegrationResponse for more information on using the CreateIntegrationResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateIntegrationResponseRequest method. -// req, resp := client.CreateIntegrationResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateIntegrationResponse -func (c *ApiGatewayV2) CreateIntegrationResponseRequest(input *CreateIntegrationResponseInput) (req *request.Request, output *CreateIntegrationResponseOutput) { - op := &request.Operation{ - Name: opCreateIntegrationResponse, - HTTPMethod: "POST", - HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses", - } - - if input == nil { - input = &CreateIntegrationResponseInput{} - } - - output = &CreateIntegrationResponseOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateIntegrationResponse API operation for AmazonApiGatewayV2. -// -// Creates an IntegrationResponses. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation CreateIntegrationResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateIntegrationResponse -func (c *ApiGatewayV2) CreateIntegrationResponse(input *CreateIntegrationResponseInput) (*CreateIntegrationResponseOutput, error) { - req, out := c.CreateIntegrationResponseRequest(input) - return out, req.Send() -} - -// CreateIntegrationResponseWithContext is the same as CreateIntegrationResponse with the addition of -// the ability to pass a context and additional request options. -// -// See CreateIntegrationResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) CreateIntegrationResponseWithContext(ctx aws.Context, input *CreateIntegrationResponseInput, opts ...request.Option) (*CreateIntegrationResponseOutput, error) { - req, out := c.CreateIntegrationResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateModel = "CreateModel" - -// CreateModelRequest generates a "aws/request.Request" representing the -// client's request for the CreateModel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateModel for more information on using the CreateModel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateModelRequest method. -// req, resp := client.CreateModelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateModel -func (c *ApiGatewayV2) CreateModelRequest(input *CreateModelInput) (req *request.Request, output *CreateModelOutput) { - op := &request.Operation{ - Name: opCreateModel, - HTTPMethod: "POST", - HTTPPath: "/v2/apis/{apiId}/models", - } - - if input == nil { - input = &CreateModelInput{} - } - - output = &CreateModelOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateModel API operation for AmazonApiGatewayV2. -// -// Creates a Model for an API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation CreateModel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateModel -func (c *ApiGatewayV2) CreateModel(input *CreateModelInput) (*CreateModelOutput, error) { - req, out := c.CreateModelRequest(input) - return out, req.Send() -} - -// CreateModelWithContext is the same as CreateModel with the addition of -// the ability to pass a context and additional request options. -// -// See CreateModel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) CreateModelWithContext(ctx aws.Context, input *CreateModelInput, opts ...request.Option) (*CreateModelOutput, error) { - req, out := c.CreateModelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRoute = "CreateRoute" - -// CreateRouteRequest generates a "aws/request.Request" representing the -// client's request for the CreateRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRoute for more information on using the CreateRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRouteRequest method. -// req, resp := client.CreateRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateRoute -func (c *ApiGatewayV2) CreateRouteRequest(input *CreateRouteInput) (req *request.Request, output *CreateRouteOutput) { - op := &request.Operation{ - Name: opCreateRoute, - HTTPMethod: "POST", - HTTPPath: "/v2/apis/{apiId}/routes", - } - - if input == nil { - input = &CreateRouteInput{} - } - - output = &CreateRouteOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRoute API operation for AmazonApiGatewayV2. -// -// Creates a Route for an API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation CreateRoute for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateRoute -func (c *ApiGatewayV2) CreateRoute(input *CreateRouteInput) (*CreateRouteOutput, error) { - req, out := c.CreateRouteRequest(input) - return out, req.Send() -} - -// CreateRouteWithContext is the same as CreateRoute with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) CreateRouteWithContext(ctx aws.Context, input *CreateRouteInput, opts ...request.Option) (*CreateRouteOutput, error) { - req, out := c.CreateRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRouteResponse = "CreateRouteResponse" - -// CreateRouteResponseRequest generates a "aws/request.Request" representing the -// client's request for the CreateRouteResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRouteResponse for more information on using the CreateRouteResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRouteResponseRequest method. -// req, resp := client.CreateRouteResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateRouteResponse -func (c *ApiGatewayV2) CreateRouteResponseRequest(input *CreateRouteResponseInput) (req *request.Request, output *CreateRouteResponseOutput) { - op := &request.Operation{ - Name: opCreateRouteResponse, - HTTPMethod: "POST", - HTTPPath: "/v2/apis/{apiId}/routes/{routeId}/routeresponses", - } - - if input == nil { - input = &CreateRouteResponseInput{} - } - - output = &CreateRouteResponseOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRouteResponse API operation for AmazonApiGatewayV2. -// -// Creates a RouteResponse for a Route. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation CreateRouteResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateRouteResponse -func (c *ApiGatewayV2) CreateRouteResponse(input *CreateRouteResponseInput) (*CreateRouteResponseOutput, error) { - req, out := c.CreateRouteResponseRequest(input) - return out, req.Send() -} - -// CreateRouteResponseWithContext is the same as CreateRouteResponse with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRouteResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) CreateRouteResponseWithContext(ctx aws.Context, input *CreateRouteResponseInput, opts ...request.Option) (*CreateRouteResponseOutput, error) { - req, out := c.CreateRouteResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStage = "CreateStage" - -// CreateStageRequest generates a "aws/request.Request" representing the -// client's request for the CreateStage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateStage for more information on using the CreateStage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateStageRequest method. -// req, resp := client.CreateStageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateStage -func (c *ApiGatewayV2) CreateStageRequest(input *CreateStageInput) (req *request.Request, output *CreateStageOutput) { - op := &request.Operation{ - Name: opCreateStage, - HTTPMethod: "POST", - HTTPPath: "/v2/apis/{apiId}/stages", - } - - if input == nil { - input = &CreateStageInput{} - } - - output = &CreateStageOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateStage API operation for AmazonApiGatewayV2. -// -// Creates a Stage for an API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation CreateStage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateStage -func (c *ApiGatewayV2) CreateStage(input *CreateStageInput) (*CreateStageOutput, error) { - req, out := c.CreateStageRequest(input) - return out, req.Send() -} - -// CreateStageWithContext is the same as CreateStage with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) CreateStageWithContext(ctx aws.Context, input *CreateStageInput, opts ...request.Option) (*CreateStageOutput, error) { - req, out := c.CreateStageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApi = "DeleteApi" - -// DeleteApiRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApi operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApi for more information on using the DeleteApi -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApiRequest method. -// req, resp := client.DeleteApiRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteApi -func (c *ApiGatewayV2) DeleteApiRequest(input *DeleteApiInput) (req *request.Request, output *DeleteApiOutput) { - op := &request.Operation{ - Name: opDeleteApi, - HTTPMethod: "DELETE", - HTTPPath: "/v2/apis/{apiId}", - } - - if input == nil { - input = &DeleteApiInput{} - } - - output = &DeleteApiOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteApi API operation for AmazonApiGatewayV2. -// -// Deletes an Api resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation DeleteApi for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteApi -func (c *ApiGatewayV2) DeleteApi(input *DeleteApiInput) (*DeleteApiOutput, error) { - req, out := c.DeleteApiRequest(input) - return out, req.Send() -} - -// DeleteApiWithContext is the same as DeleteApi with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApi for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) DeleteApiWithContext(ctx aws.Context, input *DeleteApiInput, opts ...request.Option) (*DeleteApiOutput, error) { - req, out := c.DeleteApiRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApiMapping = "DeleteApiMapping" - -// DeleteApiMappingRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApiMapping operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApiMapping for more information on using the DeleteApiMapping -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApiMappingRequest method. -// req, resp := client.DeleteApiMappingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteApiMapping -func (c *ApiGatewayV2) DeleteApiMappingRequest(input *DeleteApiMappingInput) (req *request.Request, output *DeleteApiMappingOutput) { - op := &request.Operation{ - Name: opDeleteApiMapping, - HTTPMethod: "DELETE", - HTTPPath: "/v2/domainnames/{domainName}/apimappings/{apiMappingId}", - } - - if input == nil { - input = &DeleteApiMappingInput{} - } - - output = &DeleteApiMappingOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteApiMapping API operation for AmazonApiGatewayV2. -// -// Deletes an API mapping. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation DeleteApiMapping for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteApiMapping -func (c *ApiGatewayV2) DeleteApiMapping(input *DeleteApiMappingInput) (*DeleteApiMappingOutput, error) { - req, out := c.DeleteApiMappingRequest(input) - return out, req.Send() -} - -// DeleteApiMappingWithContext is the same as DeleteApiMapping with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApiMapping for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) DeleteApiMappingWithContext(ctx aws.Context, input *DeleteApiMappingInput, opts ...request.Option) (*DeleteApiMappingOutput, error) { - req, out := c.DeleteApiMappingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAuthorizer = "DeleteAuthorizer" - -// DeleteAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAuthorizer for more information on using the DeleteAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAuthorizerRequest method. -// req, resp := client.DeleteAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteAuthorizer -func (c *ApiGatewayV2) DeleteAuthorizerRequest(input *DeleteAuthorizerInput) (req *request.Request, output *DeleteAuthorizerOutput) { - op := &request.Operation{ - Name: opDeleteAuthorizer, - HTTPMethod: "DELETE", - HTTPPath: "/v2/apis/{apiId}/authorizers/{authorizerId}", - } - - if input == nil { - input = &DeleteAuthorizerInput{} - } - - output = &DeleteAuthorizerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAuthorizer API operation for AmazonApiGatewayV2. -// -// Deletes an Authorizer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation DeleteAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteAuthorizer -func (c *ApiGatewayV2) DeleteAuthorizer(input *DeleteAuthorizerInput) (*DeleteAuthorizerOutput, error) { - req, out := c.DeleteAuthorizerRequest(input) - return out, req.Send() -} - -// DeleteAuthorizerWithContext is the same as DeleteAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) DeleteAuthorizerWithContext(ctx aws.Context, input *DeleteAuthorizerInput, opts ...request.Option) (*DeleteAuthorizerOutput, error) { - req, out := c.DeleteAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDeployment = "DeleteDeployment" - -// DeleteDeploymentRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDeployment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDeployment for more information on using the DeleteDeployment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDeploymentRequest method. -// req, resp := client.DeleteDeploymentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteDeployment -func (c *ApiGatewayV2) DeleteDeploymentRequest(input *DeleteDeploymentInput) (req *request.Request, output *DeleteDeploymentOutput) { - op := &request.Operation{ - Name: opDeleteDeployment, - HTTPMethod: "DELETE", - HTTPPath: "/v2/apis/{apiId}/deployments/{deploymentId}", - } - - if input == nil { - input = &DeleteDeploymentInput{} - } - - output = &DeleteDeploymentOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDeployment API operation for AmazonApiGatewayV2. -// -// Deletes 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 AmazonApiGatewayV2's -// API operation DeleteDeployment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteDeployment -func (c *ApiGatewayV2) DeleteDeployment(input *DeleteDeploymentInput) (*DeleteDeploymentOutput, error) { - req, out := c.DeleteDeploymentRequest(input) - return out, req.Send() -} - -// DeleteDeploymentWithContext is the same as DeleteDeployment with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDeployment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) DeleteDeploymentWithContext(ctx aws.Context, input *DeleteDeploymentInput, opts ...request.Option) (*DeleteDeploymentOutput, error) { - req, out := c.DeleteDeploymentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDomainName = "DeleteDomainName" - -// DeleteDomainNameRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDomainName operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDomainName for more information on using the DeleteDomainName -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDomainNameRequest method. -// req, resp := client.DeleteDomainNameRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteDomainName -func (c *ApiGatewayV2) DeleteDomainNameRequest(input *DeleteDomainNameInput) (req *request.Request, output *DeleteDomainNameOutput) { - op := &request.Operation{ - Name: opDeleteDomainName, - HTTPMethod: "DELETE", - HTTPPath: "/v2/domainnames/{domainName}", - } - - if input == nil { - input = &DeleteDomainNameInput{} - } - - output = &DeleteDomainNameOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDomainName API operation for AmazonApiGatewayV2. -// -// Deletes a domain name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation DeleteDomainName for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteDomainName -func (c *ApiGatewayV2) DeleteDomainName(input *DeleteDomainNameInput) (*DeleteDomainNameOutput, error) { - req, out := c.DeleteDomainNameRequest(input) - return out, req.Send() -} - -// DeleteDomainNameWithContext is the same as DeleteDomainName with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDomainName for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) DeleteDomainNameWithContext(ctx aws.Context, input *DeleteDomainNameInput, opts ...request.Option) (*DeleteDomainNameOutput, error) { - req, out := c.DeleteDomainNameRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIntegration = "DeleteIntegration" - -// DeleteIntegrationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIntegration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIntegration for more information on using the DeleteIntegration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIntegrationRequest method. -// req, resp := client.DeleteIntegrationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteIntegration -func (c *ApiGatewayV2) DeleteIntegrationRequest(input *DeleteIntegrationInput) (req *request.Request, output *DeleteIntegrationOutput) { - op := &request.Operation{ - Name: opDeleteIntegration, - HTTPMethod: "DELETE", - HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}", - } - - if input == nil { - input = &DeleteIntegrationInput{} - } - - output = &DeleteIntegrationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteIntegration API operation for AmazonApiGatewayV2. -// -// Deletes an Integration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation DeleteIntegration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteIntegration -func (c *ApiGatewayV2) DeleteIntegration(input *DeleteIntegrationInput) (*DeleteIntegrationOutput, error) { - req, out := c.DeleteIntegrationRequest(input) - return out, req.Send() -} - -// DeleteIntegrationWithContext is the same as DeleteIntegration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIntegration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) DeleteIntegrationWithContext(ctx aws.Context, input *DeleteIntegrationInput, opts ...request.Option) (*DeleteIntegrationOutput, error) { - req, out := c.DeleteIntegrationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIntegrationResponse = "DeleteIntegrationResponse" - -// DeleteIntegrationResponseRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIntegrationResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIntegrationResponse for more information on using the DeleteIntegrationResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIntegrationResponseRequest method. -// req, resp := client.DeleteIntegrationResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteIntegrationResponse -func (c *ApiGatewayV2) DeleteIntegrationResponseRequest(input *DeleteIntegrationResponseInput) (req *request.Request, output *DeleteIntegrationResponseOutput) { - op := &request.Operation{ - Name: opDeleteIntegrationResponse, - HTTPMethod: "DELETE", - HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}", - } - - if input == nil { - input = &DeleteIntegrationResponseInput{} - } - - output = &DeleteIntegrationResponseOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteIntegrationResponse API operation for AmazonApiGatewayV2. -// -// Deletes an IntegrationResponses. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation DeleteIntegrationResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteIntegrationResponse -func (c *ApiGatewayV2) DeleteIntegrationResponse(input *DeleteIntegrationResponseInput) (*DeleteIntegrationResponseOutput, error) { - req, out := c.DeleteIntegrationResponseRequest(input) - return out, req.Send() -} - -// DeleteIntegrationResponseWithContext is the same as DeleteIntegrationResponse with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIntegrationResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) DeleteIntegrationResponseWithContext(ctx aws.Context, input *DeleteIntegrationResponseInput, opts ...request.Option) (*DeleteIntegrationResponseOutput, error) { - req, out := c.DeleteIntegrationResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteModel = "DeleteModel" - -// DeleteModelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteModel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteModel for more information on using the DeleteModel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteModelRequest method. -// req, resp := client.DeleteModelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteModel -func (c *ApiGatewayV2) DeleteModelRequest(input *DeleteModelInput) (req *request.Request, output *DeleteModelOutput) { - op := &request.Operation{ - Name: opDeleteModel, - HTTPMethod: "DELETE", - HTTPPath: "/v2/apis/{apiId}/models/{modelId}", - } - - if input == nil { - input = &DeleteModelInput{} - } - - output = &DeleteModelOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteModel API operation for AmazonApiGatewayV2. -// -// Deletes a Model. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation DeleteModel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteModel -func (c *ApiGatewayV2) DeleteModel(input *DeleteModelInput) (*DeleteModelOutput, error) { - req, out := c.DeleteModelRequest(input) - return out, req.Send() -} - -// DeleteModelWithContext is the same as DeleteModel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteModel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) DeleteModelWithContext(ctx aws.Context, input *DeleteModelInput, opts ...request.Option) (*DeleteModelOutput, error) { - req, out := c.DeleteModelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRoute = "DeleteRoute" - -// DeleteRouteRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRoute for more information on using the DeleteRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRouteRequest method. -// req, resp := client.DeleteRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteRoute -func (c *ApiGatewayV2) DeleteRouteRequest(input *DeleteRouteInput) (req *request.Request, output *DeleteRouteOutput) { - op := &request.Operation{ - Name: opDeleteRoute, - HTTPMethod: "DELETE", - HTTPPath: "/v2/apis/{apiId}/routes/{routeId}", - } - - if input == nil { - input = &DeleteRouteInput{} - } - - output = &DeleteRouteOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRoute API operation for AmazonApiGatewayV2. -// -// Deletes a Route. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation DeleteRoute for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteRoute -func (c *ApiGatewayV2) DeleteRoute(input *DeleteRouteInput) (*DeleteRouteOutput, error) { - req, out := c.DeleteRouteRequest(input) - return out, req.Send() -} - -// DeleteRouteWithContext is the same as DeleteRoute with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) DeleteRouteWithContext(ctx aws.Context, input *DeleteRouteInput, opts ...request.Option) (*DeleteRouteOutput, error) { - req, out := c.DeleteRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRouteResponse = "DeleteRouteResponse" - -// DeleteRouteResponseRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRouteResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRouteResponse for more information on using the DeleteRouteResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRouteResponseRequest method. -// req, resp := client.DeleteRouteResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteRouteResponse -func (c *ApiGatewayV2) DeleteRouteResponseRequest(input *DeleteRouteResponseInput) (req *request.Request, output *DeleteRouteResponseOutput) { - op := &request.Operation{ - Name: opDeleteRouteResponse, - HTTPMethod: "DELETE", - HTTPPath: "/v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}", - } - - if input == nil { - input = &DeleteRouteResponseInput{} - } - - output = &DeleteRouteResponseOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRouteResponse API operation for AmazonApiGatewayV2. -// -// Deletes a RouteResponse. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation DeleteRouteResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteRouteResponse -func (c *ApiGatewayV2) DeleteRouteResponse(input *DeleteRouteResponseInput) (*DeleteRouteResponseOutput, error) { - req, out := c.DeleteRouteResponseRequest(input) - return out, req.Send() -} - -// DeleteRouteResponseWithContext is the same as DeleteRouteResponse with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRouteResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) DeleteRouteResponseWithContext(ctx aws.Context, input *DeleteRouteResponseInput, opts ...request.Option) (*DeleteRouteResponseOutput, error) { - req, out := c.DeleteRouteResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteStage = "DeleteStage" - -// DeleteStageRequest generates a "aws/request.Request" representing the -// client's request for the DeleteStage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteStage for more information on using the DeleteStage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteStageRequest method. -// req, resp := client.DeleteStageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteStage -func (c *ApiGatewayV2) DeleteStageRequest(input *DeleteStageInput) (req *request.Request, output *DeleteStageOutput) { - op := &request.Operation{ - Name: opDeleteStage, - HTTPMethod: "DELETE", - HTTPPath: "/v2/apis/{apiId}/stages/{stageName}", - } - - if input == nil { - input = &DeleteStageInput{} - } - - output = &DeleteStageOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteStage API operation for AmazonApiGatewayV2. -// -// Deletes a Stage. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation DeleteStage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteStage -func (c *ApiGatewayV2) DeleteStage(input *DeleteStageInput) (*DeleteStageOutput, error) { - req, out := c.DeleteStageRequest(input) - return out, req.Send() -} - -// DeleteStageWithContext is the same as DeleteStage with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteStage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) DeleteStageWithContext(ctx aws.Context, input *DeleteStageInput, opts ...request.Option) (*DeleteStageOutput, error) { - req, out := c.DeleteStageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApi = "GetApi" - -// GetApiRequest generates a "aws/request.Request" representing the -// client's request for the GetApi operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApi for more information on using the GetApi -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApiRequest method. -// req, resp := client.GetApiRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApi -func (c *ApiGatewayV2) GetApiRequest(input *GetApiInput) (req *request.Request, output *GetApiOutput) { - op := &request.Operation{ - Name: opGetApi, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}", - } - - if input == nil { - input = &GetApiInput{} - } - - output = &GetApiOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApi API operation for AmazonApiGatewayV2. -// -// Gets an Api resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetApi for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApi -func (c *ApiGatewayV2) GetApi(input *GetApiInput) (*GetApiOutput, error) { - req, out := c.GetApiRequest(input) - return out, req.Send() -} - -// GetApiWithContext is the same as GetApi with the addition of -// the ability to pass a context and additional request options. -// -// See GetApi for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetApiWithContext(ctx aws.Context, input *GetApiInput, opts ...request.Option) (*GetApiOutput, error) { - req, out := c.GetApiRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApiMapping = "GetApiMapping" - -// GetApiMappingRequest generates a "aws/request.Request" representing the -// client's request for the GetApiMapping operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApiMapping for more information on using the GetApiMapping -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApiMappingRequest method. -// req, resp := client.GetApiMappingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApiMapping -func (c *ApiGatewayV2) GetApiMappingRequest(input *GetApiMappingInput) (req *request.Request, output *GetApiMappingOutput) { - op := &request.Operation{ - Name: opGetApiMapping, - HTTPMethod: "GET", - HTTPPath: "/v2/domainnames/{domainName}/apimappings/{apiMappingId}", - } - - if input == nil { - input = &GetApiMappingInput{} - } - - output = &GetApiMappingOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApiMapping API operation for AmazonApiGatewayV2. -// -// The API mapping. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetApiMapping for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApiMapping -func (c *ApiGatewayV2) GetApiMapping(input *GetApiMappingInput) (*GetApiMappingOutput, error) { - req, out := c.GetApiMappingRequest(input) - return out, req.Send() -} - -// GetApiMappingWithContext is the same as GetApiMapping with the addition of -// the ability to pass a context and additional request options. -// -// See GetApiMapping for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetApiMappingWithContext(ctx aws.Context, input *GetApiMappingInput, opts ...request.Option) (*GetApiMappingOutput, error) { - req, out := c.GetApiMappingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApiMappings = "GetApiMappings" - -// GetApiMappingsRequest generates a "aws/request.Request" representing the -// client's request for the GetApiMappings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApiMappings for more information on using the GetApiMappings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApiMappingsRequest method. -// req, resp := client.GetApiMappingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApiMappings -func (c *ApiGatewayV2) GetApiMappingsRequest(input *GetApiMappingsInput) (req *request.Request, output *GetApiMappingsOutput) { - op := &request.Operation{ - Name: opGetApiMappings, - HTTPMethod: "GET", - HTTPPath: "/v2/domainnames/{domainName}/apimappings", - } - - if input == nil { - input = &GetApiMappingsInput{} - } - - output = &GetApiMappingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApiMappings API operation for AmazonApiGatewayV2. -// -// The API mappings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetApiMappings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApiMappings -func (c *ApiGatewayV2) GetApiMappings(input *GetApiMappingsInput) (*GetApiMappingsOutput, error) { - req, out := c.GetApiMappingsRequest(input) - return out, req.Send() -} - -// GetApiMappingsWithContext is the same as GetApiMappings with the addition of -// the ability to pass a context and additional request options. -// -// See GetApiMappings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetApiMappingsWithContext(ctx aws.Context, input *GetApiMappingsInput, opts ...request.Option) (*GetApiMappingsOutput, error) { - req, out := c.GetApiMappingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApis = "GetApis" - -// GetApisRequest generates a "aws/request.Request" representing the -// client's request for the GetApis operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApis for more information on using the GetApis -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApisRequest method. -// req, resp := client.GetApisRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApis -func (c *ApiGatewayV2) GetApisRequest(input *GetApisInput) (req *request.Request, output *GetApisOutput) { - op := &request.Operation{ - Name: opGetApis, - HTTPMethod: "GET", - HTTPPath: "/v2/apis", - } - - if input == nil { - input = &GetApisInput{} - } - - output = &GetApisOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApis API operation for AmazonApiGatewayV2. -// -// Gets a collection of Api resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetApis for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApis -func (c *ApiGatewayV2) GetApis(input *GetApisInput) (*GetApisOutput, error) { - req, out := c.GetApisRequest(input) - return out, req.Send() -} - -// GetApisWithContext is the same as GetApis with the addition of -// the ability to pass a context and additional request options. -// -// See GetApis for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetApisWithContext(ctx aws.Context, input *GetApisInput, opts ...request.Option) (*GetApisOutput, error) { - req, out := c.GetApisRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAuthorizer = "GetAuthorizer" - -// GetAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the GetAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAuthorizer for more information on using the GetAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAuthorizerRequest method. -// req, resp := client.GetAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetAuthorizer -func (c *ApiGatewayV2) GetAuthorizerRequest(input *GetAuthorizerInput) (req *request.Request, output *GetAuthorizerOutput) { - op := &request.Operation{ - Name: opGetAuthorizer, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/authorizers/{authorizerId}", - } - - if input == nil { - input = &GetAuthorizerInput{} - } - - output = &GetAuthorizerOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAuthorizer API operation for AmazonApiGatewayV2. -// -// Gets an Authorizer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetAuthorizer -func (c *ApiGatewayV2) GetAuthorizer(input *GetAuthorizerInput) (*GetAuthorizerOutput, error) { - req, out := c.GetAuthorizerRequest(input) - return out, req.Send() -} - -// GetAuthorizerWithContext is the same as GetAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See GetAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetAuthorizerWithContext(ctx aws.Context, input *GetAuthorizerInput, opts ...request.Option) (*GetAuthorizerOutput, error) { - req, out := c.GetAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAuthorizers = "GetAuthorizers" - -// GetAuthorizersRequest generates a "aws/request.Request" representing the -// client's request for the GetAuthorizers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAuthorizers for more information on using the GetAuthorizers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAuthorizersRequest method. -// req, resp := client.GetAuthorizersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetAuthorizers -func (c *ApiGatewayV2) GetAuthorizersRequest(input *GetAuthorizersInput) (req *request.Request, output *GetAuthorizersOutput) { - op := &request.Operation{ - Name: opGetAuthorizers, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/authorizers", - } - - if input == nil { - input = &GetAuthorizersInput{} - } - - output = &GetAuthorizersOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAuthorizers API operation for AmazonApiGatewayV2. -// -// Gets the Authorizers for an API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetAuthorizers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetAuthorizers -func (c *ApiGatewayV2) GetAuthorizers(input *GetAuthorizersInput) (*GetAuthorizersOutput, error) { - req, out := c.GetAuthorizersRequest(input) - return out, req.Send() -} - -// GetAuthorizersWithContext is the same as GetAuthorizers with the addition of -// the ability to pass a context and additional request options. -// -// See GetAuthorizers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetAuthorizersWithContext(ctx aws.Context, input *GetAuthorizersInput, opts ...request.Option) (*GetAuthorizersOutput, error) { - req, out := c.GetAuthorizersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDeployment = "GetDeployment" - -// GetDeploymentRequest generates a "aws/request.Request" representing the -// client's request for the GetDeployment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDeployment for more information on using the GetDeployment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDeploymentRequest method. -// req, resp := client.GetDeploymentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDeployment -func (c *ApiGatewayV2) GetDeploymentRequest(input *GetDeploymentInput) (req *request.Request, output *GetDeploymentOutput) { - op := &request.Operation{ - Name: opGetDeployment, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/deployments/{deploymentId}", - } - - if input == nil { - input = &GetDeploymentInput{} - } - - output = &GetDeploymentOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDeployment API operation for AmazonApiGatewayV2. -// -// Gets 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 AmazonApiGatewayV2's -// API operation GetDeployment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDeployment -func (c *ApiGatewayV2) GetDeployment(input *GetDeploymentInput) (*GetDeploymentOutput, error) { - req, out := c.GetDeploymentRequest(input) - return out, req.Send() -} - -// GetDeploymentWithContext is the same as GetDeployment with the addition of -// the ability to pass a context and additional request options. -// -// See GetDeployment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetDeploymentWithContext(ctx aws.Context, input *GetDeploymentInput, opts ...request.Option) (*GetDeploymentOutput, error) { - req, out := c.GetDeploymentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDeployments = "GetDeployments" - -// GetDeploymentsRequest generates a "aws/request.Request" representing the -// client's request for the GetDeployments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDeployments for more information on using the GetDeployments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDeploymentsRequest method. -// req, resp := client.GetDeploymentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDeployments -func (c *ApiGatewayV2) GetDeploymentsRequest(input *GetDeploymentsInput) (req *request.Request, output *GetDeploymentsOutput) { - op := &request.Operation{ - Name: opGetDeployments, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/deployments", - } - - if input == nil { - input = &GetDeploymentsInput{} - } - - output = &GetDeploymentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDeployments API operation for AmazonApiGatewayV2. -// -// Gets the Deployments for an API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetDeployments for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDeployments -func (c *ApiGatewayV2) GetDeployments(input *GetDeploymentsInput) (*GetDeploymentsOutput, error) { - req, out := c.GetDeploymentsRequest(input) - return out, req.Send() -} - -// GetDeploymentsWithContext is the same as GetDeployments with the addition of -// the ability to pass a context and additional request options. -// -// See GetDeployments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetDeploymentsWithContext(ctx aws.Context, input *GetDeploymentsInput, opts ...request.Option) (*GetDeploymentsOutput, error) { - req, out := c.GetDeploymentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDomainName = "GetDomainName" - -// GetDomainNameRequest generates a "aws/request.Request" representing the -// client's request for the GetDomainName operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDomainName for more information on using the GetDomainName -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDomainNameRequest method. -// req, resp := client.GetDomainNameRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDomainName -func (c *ApiGatewayV2) GetDomainNameRequest(input *GetDomainNameInput) (req *request.Request, output *GetDomainNameOutput) { - op := &request.Operation{ - Name: opGetDomainName, - HTTPMethod: "GET", - HTTPPath: "/v2/domainnames/{domainName}", - } - - if input == nil { - input = &GetDomainNameInput{} - } - - output = &GetDomainNameOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDomainName API operation for AmazonApiGatewayV2. -// -// Gets a domain name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetDomainName for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDomainName -func (c *ApiGatewayV2) GetDomainName(input *GetDomainNameInput) (*GetDomainNameOutput, error) { - req, out := c.GetDomainNameRequest(input) - return out, req.Send() -} - -// GetDomainNameWithContext is the same as GetDomainName with the addition of -// the ability to pass a context and additional request options. -// -// See GetDomainName for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetDomainNameWithContext(ctx aws.Context, input *GetDomainNameInput, opts ...request.Option) (*GetDomainNameOutput, error) { - req, out := c.GetDomainNameRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDomainNames = "GetDomainNames" - -// GetDomainNamesRequest generates a "aws/request.Request" representing the -// client's request for the GetDomainNames operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDomainNames for more information on using the GetDomainNames -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDomainNamesRequest method. -// req, resp := client.GetDomainNamesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDomainNames -func (c *ApiGatewayV2) GetDomainNamesRequest(input *GetDomainNamesInput) (req *request.Request, output *GetDomainNamesOutput) { - op := &request.Operation{ - Name: opGetDomainNames, - HTTPMethod: "GET", - HTTPPath: "/v2/domainnames", - } - - if input == nil { - input = &GetDomainNamesInput{} - } - - output = &GetDomainNamesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDomainNames API operation for AmazonApiGatewayV2. -// -// Gets the domain names for an AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetDomainNames for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDomainNames -func (c *ApiGatewayV2) GetDomainNames(input *GetDomainNamesInput) (*GetDomainNamesOutput, error) { - req, out := c.GetDomainNamesRequest(input) - return out, req.Send() -} - -// GetDomainNamesWithContext is the same as GetDomainNames with the addition of -// the ability to pass a context and additional request options. -// -// See GetDomainNames for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetDomainNamesWithContext(ctx aws.Context, input *GetDomainNamesInput, opts ...request.Option) (*GetDomainNamesOutput, error) { - req, out := c.GetDomainNamesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIntegration = "GetIntegration" - -// GetIntegrationRequest generates a "aws/request.Request" representing the -// client's request for the GetIntegration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIntegration for more information on using the GetIntegration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIntegrationRequest method. -// req, resp := client.GetIntegrationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegration -func (c *ApiGatewayV2) GetIntegrationRequest(input *GetIntegrationInput) (req *request.Request, output *GetIntegrationOutput) { - op := &request.Operation{ - Name: opGetIntegration, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}", - } - - if input == nil { - input = &GetIntegrationInput{} - } - - output = &GetIntegrationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIntegration API operation for AmazonApiGatewayV2. -// -// Gets an Integration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetIntegration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegration -func (c *ApiGatewayV2) GetIntegration(input *GetIntegrationInput) (*GetIntegrationOutput, error) { - req, out := c.GetIntegrationRequest(input) - return out, req.Send() -} - -// GetIntegrationWithContext is the same as GetIntegration with the addition of -// the ability to pass a context and additional request options. -// -// See GetIntegration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetIntegrationWithContext(ctx aws.Context, input *GetIntegrationInput, opts ...request.Option) (*GetIntegrationOutput, error) { - req, out := c.GetIntegrationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIntegrationResponse = "GetIntegrationResponse" - -// GetIntegrationResponseRequest generates a "aws/request.Request" representing the -// client's request for the GetIntegrationResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIntegrationResponse for more information on using the GetIntegrationResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIntegrationResponseRequest method. -// req, resp := client.GetIntegrationResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegrationResponse -func (c *ApiGatewayV2) GetIntegrationResponseRequest(input *GetIntegrationResponseInput) (req *request.Request, output *GetIntegrationResponseOutput) { - op := &request.Operation{ - Name: opGetIntegrationResponse, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}", - } - - if input == nil { - input = &GetIntegrationResponseInput{} - } - - output = &GetIntegrationResponseOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIntegrationResponse API operation for AmazonApiGatewayV2. -// -// Gets an IntegrationResponses. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetIntegrationResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegrationResponse -func (c *ApiGatewayV2) GetIntegrationResponse(input *GetIntegrationResponseInput) (*GetIntegrationResponseOutput, error) { - req, out := c.GetIntegrationResponseRequest(input) - return out, req.Send() -} - -// GetIntegrationResponseWithContext is the same as GetIntegrationResponse with the addition of -// the ability to pass a context and additional request options. -// -// See GetIntegrationResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetIntegrationResponseWithContext(ctx aws.Context, input *GetIntegrationResponseInput, opts ...request.Option) (*GetIntegrationResponseOutput, error) { - req, out := c.GetIntegrationResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIntegrationResponses = "GetIntegrationResponses" - -// GetIntegrationResponsesRequest generates a "aws/request.Request" representing the -// client's request for the GetIntegrationResponses operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIntegrationResponses for more information on using the GetIntegrationResponses -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIntegrationResponsesRequest method. -// req, resp := client.GetIntegrationResponsesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegrationResponses -func (c *ApiGatewayV2) GetIntegrationResponsesRequest(input *GetIntegrationResponsesInput) (req *request.Request, output *GetIntegrationResponsesOutput) { - op := &request.Operation{ - Name: opGetIntegrationResponses, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses", - } - - if input == nil { - input = &GetIntegrationResponsesInput{} - } - - output = &GetIntegrationResponsesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIntegrationResponses API operation for AmazonApiGatewayV2. -// -// Gets the IntegrationResponses for an Integration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetIntegrationResponses for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegrationResponses -func (c *ApiGatewayV2) GetIntegrationResponses(input *GetIntegrationResponsesInput) (*GetIntegrationResponsesOutput, error) { - req, out := c.GetIntegrationResponsesRequest(input) - return out, req.Send() -} - -// GetIntegrationResponsesWithContext is the same as GetIntegrationResponses with the addition of -// the ability to pass a context and additional request options. -// -// See GetIntegrationResponses for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetIntegrationResponsesWithContext(ctx aws.Context, input *GetIntegrationResponsesInput, opts ...request.Option) (*GetIntegrationResponsesOutput, error) { - req, out := c.GetIntegrationResponsesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIntegrations = "GetIntegrations" - -// GetIntegrationsRequest generates a "aws/request.Request" representing the -// client's request for the GetIntegrations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIntegrations for more information on using the GetIntegrations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIntegrationsRequest method. -// req, resp := client.GetIntegrationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegrations -func (c *ApiGatewayV2) GetIntegrationsRequest(input *GetIntegrationsInput) (req *request.Request, output *GetIntegrationsOutput) { - op := &request.Operation{ - Name: opGetIntegrations, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/integrations", - } - - if input == nil { - input = &GetIntegrationsInput{} - } - - output = &GetIntegrationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIntegrations API operation for AmazonApiGatewayV2. -// -// Gets the Integrations for an API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetIntegrations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegrations -func (c *ApiGatewayV2) GetIntegrations(input *GetIntegrationsInput) (*GetIntegrationsOutput, error) { - req, out := c.GetIntegrationsRequest(input) - return out, req.Send() -} - -// GetIntegrationsWithContext is the same as GetIntegrations with the addition of -// the ability to pass a context and additional request options. -// -// See GetIntegrations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetIntegrationsWithContext(ctx aws.Context, input *GetIntegrationsInput, opts ...request.Option) (*GetIntegrationsOutput, error) { - req, out := c.GetIntegrationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetModel = "GetModel" - -// GetModelRequest generates a "aws/request.Request" representing the -// client's request for the GetModel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetModel for more information on using the GetModel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetModelRequest method. -// req, resp := client.GetModelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetModel -func (c *ApiGatewayV2) GetModelRequest(input *GetModelInput) (req *request.Request, output *GetModelOutput) { - op := &request.Operation{ - Name: opGetModel, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/models/{modelId}", - } - - if input == nil { - input = &GetModelInput{} - } - - output = &GetModelOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetModel API operation for AmazonApiGatewayV2. -// -// Gets a Model. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetModel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetModel -func (c *ApiGatewayV2) GetModel(input *GetModelInput) (*GetModelOutput, error) { - req, out := c.GetModelRequest(input) - return out, req.Send() -} - -// GetModelWithContext is the same as GetModel with the addition of -// the ability to pass a context and additional request options. -// -// See GetModel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetModelWithContext(ctx aws.Context, input *GetModelInput, opts ...request.Option) (*GetModelOutput, error) { - req, out := c.GetModelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetModelTemplate = "GetModelTemplate" - -// GetModelTemplateRequest generates a "aws/request.Request" representing the -// client's request for the GetModelTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetModelTemplate for more information on using the GetModelTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetModelTemplateRequest method. -// req, resp := client.GetModelTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetModelTemplate -func (c *ApiGatewayV2) GetModelTemplateRequest(input *GetModelTemplateInput) (req *request.Request, output *GetModelTemplateOutput) { - op := &request.Operation{ - Name: opGetModelTemplate, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/models/{modelId}/template", - } - - if input == nil { - input = &GetModelTemplateInput{} - } - - output = &GetModelTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetModelTemplate API operation for AmazonApiGatewayV2. -// -// Gets a model template. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetModelTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetModelTemplate -func (c *ApiGatewayV2) GetModelTemplate(input *GetModelTemplateInput) (*GetModelTemplateOutput, error) { - req, out := c.GetModelTemplateRequest(input) - return out, req.Send() -} - -// GetModelTemplateWithContext is the same as GetModelTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See GetModelTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetModelTemplateWithContext(ctx aws.Context, input *GetModelTemplateInput, opts ...request.Option) (*GetModelTemplateOutput, error) { - req, out := c.GetModelTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetModels = "GetModels" - -// GetModelsRequest generates a "aws/request.Request" representing the -// client's request for the GetModels operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetModels for more information on using the GetModels -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetModelsRequest method. -// req, resp := client.GetModelsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetModels -func (c *ApiGatewayV2) GetModelsRequest(input *GetModelsInput) (req *request.Request, output *GetModelsOutput) { - op := &request.Operation{ - Name: opGetModels, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/models", - } - - if input == nil { - input = &GetModelsInput{} - } - - output = &GetModelsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetModels API operation for AmazonApiGatewayV2. -// -// Gets the Models for an API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetModels for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetModels -func (c *ApiGatewayV2) GetModels(input *GetModelsInput) (*GetModelsOutput, error) { - req, out := c.GetModelsRequest(input) - return out, req.Send() -} - -// GetModelsWithContext is the same as GetModels with the addition of -// the ability to pass a context and additional request options. -// -// See GetModels for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetModelsWithContext(ctx aws.Context, input *GetModelsInput, opts ...request.Option) (*GetModelsOutput, error) { - req, out := c.GetModelsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRoute = "GetRoute" - -// GetRouteRequest generates a "aws/request.Request" representing the -// client's request for the GetRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRoute for more information on using the GetRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRouteRequest method. -// req, resp := client.GetRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRoute -func (c *ApiGatewayV2) GetRouteRequest(input *GetRouteInput) (req *request.Request, output *GetRouteOutput) { - op := &request.Operation{ - Name: opGetRoute, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/routes/{routeId}", - } - - if input == nil { - input = &GetRouteInput{} - } - - output = &GetRouteOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRoute API operation for AmazonApiGatewayV2. -// -// Gets a Route. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetRoute for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRoute -func (c *ApiGatewayV2) GetRoute(input *GetRouteInput) (*GetRouteOutput, error) { - req, out := c.GetRouteRequest(input) - return out, req.Send() -} - -// GetRouteWithContext is the same as GetRoute with the addition of -// the ability to pass a context and additional request options. -// -// See GetRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetRouteWithContext(ctx aws.Context, input *GetRouteInput, opts ...request.Option) (*GetRouteOutput, error) { - req, out := c.GetRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRouteResponse = "GetRouteResponse" - -// GetRouteResponseRequest generates a "aws/request.Request" representing the -// client's request for the GetRouteResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRouteResponse for more information on using the GetRouteResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRouteResponseRequest method. -// req, resp := client.GetRouteResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRouteResponse -func (c *ApiGatewayV2) GetRouteResponseRequest(input *GetRouteResponseInput) (req *request.Request, output *GetRouteResponseOutput) { - op := &request.Operation{ - Name: opGetRouteResponse, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}", - } - - if input == nil { - input = &GetRouteResponseInput{} - } - - output = &GetRouteResponseOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRouteResponse API operation for AmazonApiGatewayV2. -// -// Gets a RouteResponse. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetRouteResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRouteResponse -func (c *ApiGatewayV2) GetRouteResponse(input *GetRouteResponseInput) (*GetRouteResponseOutput, error) { - req, out := c.GetRouteResponseRequest(input) - return out, req.Send() -} - -// GetRouteResponseWithContext is the same as GetRouteResponse with the addition of -// the ability to pass a context and additional request options. -// -// See GetRouteResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetRouteResponseWithContext(ctx aws.Context, input *GetRouteResponseInput, opts ...request.Option) (*GetRouteResponseOutput, error) { - req, out := c.GetRouteResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRouteResponses = "GetRouteResponses" - -// GetRouteResponsesRequest generates a "aws/request.Request" representing the -// client's request for the GetRouteResponses operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRouteResponses for more information on using the GetRouteResponses -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRouteResponsesRequest method. -// req, resp := client.GetRouteResponsesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRouteResponses -func (c *ApiGatewayV2) GetRouteResponsesRequest(input *GetRouteResponsesInput) (req *request.Request, output *GetRouteResponsesOutput) { - op := &request.Operation{ - Name: opGetRouteResponses, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/routes/{routeId}/routeresponses", - } - - if input == nil { - input = &GetRouteResponsesInput{} - } - - output = &GetRouteResponsesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRouteResponses API operation for AmazonApiGatewayV2. -// -// Gets the RouteResponses for a Route. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetRouteResponses for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRouteResponses -func (c *ApiGatewayV2) GetRouteResponses(input *GetRouteResponsesInput) (*GetRouteResponsesOutput, error) { - req, out := c.GetRouteResponsesRequest(input) - return out, req.Send() -} - -// GetRouteResponsesWithContext is the same as GetRouteResponses with the addition of -// the ability to pass a context and additional request options. -// -// See GetRouteResponses for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetRouteResponsesWithContext(ctx aws.Context, input *GetRouteResponsesInput, opts ...request.Option) (*GetRouteResponsesOutput, error) { - req, out := c.GetRouteResponsesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRoutes = "GetRoutes" - -// GetRoutesRequest generates a "aws/request.Request" representing the -// client's request for the GetRoutes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRoutes for more information on using the GetRoutes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRoutesRequest method. -// req, resp := client.GetRoutesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRoutes -func (c *ApiGatewayV2) GetRoutesRequest(input *GetRoutesInput) (req *request.Request, output *GetRoutesOutput) { - op := &request.Operation{ - Name: opGetRoutes, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/routes", - } - - if input == nil { - input = &GetRoutesInput{} - } - - output = &GetRoutesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRoutes API operation for AmazonApiGatewayV2. -// -// Gets the Routes for an API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetRoutes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRoutes -func (c *ApiGatewayV2) GetRoutes(input *GetRoutesInput) (*GetRoutesOutput, error) { - req, out := c.GetRoutesRequest(input) - return out, req.Send() -} - -// GetRoutesWithContext is the same as GetRoutes with the addition of -// the ability to pass a context and additional request options. -// -// See GetRoutes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetRoutesWithContext(ctx aws.Context, input *GetRoutesInput, opts ...request.Option) (*GetRoutesOutput, error) { - req, out := c.GetRoutesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetStage = "GetStage" - -// GetStageRequest generates a "aws/request.Request" representing the -// client's request for the GetStage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetStage for more information on using the GetStage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetStageRequest method. -// req, resp := client.GetStageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetStage -func (c *ApiGatewayV2) GetStageRequest(input *GetStageInput) (req *request.Request, output *GetStageOutput) { - op := &request.Operation{ - Name: opGetStage, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/stages/{stageName}", - } - - if input == nil { - input = &GetStageInput{} - } - - output = &GetStageOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetStage API operation for AmazonApiGatewayV2. -// -// Gets a Stage. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetStage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetStage -func (c *ApiGatewayV2) GetStage(input *GetStageInput) (*GetStageOutput, error) { - req, out := c.GetStageRequest(input) - return out, req.Send() -} - -// GetStageWithContext is the same as GetStage with the addition of -// the ability to pass a context and additional request options. -// -// See GetStage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetStageWithContext(ctx aws.Context, input *GetStageInput, opts ...request.Option) (*GetStageOutput, error) { - req, out := c.GetStageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetStages = "GetStages" - -// GetStagesRequest generates a "aws/request.Request" representing the -// client's request for the GetStages operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetStages for more information on using the GetStages -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetStagesRequest method. -// req, resp := client.GetStagesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetStages -func (c *ApiGatewayV2) GetStagesRequest(input *GetStagesInput) (req *request.Request, output *GetStagesOutput) { - op := &request.Operation{ - Name: opGetStages, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}/stages", - } - - if input == nil { - input = &GetStagesInput{} - } - - output = &GetStagesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetStages API operation for AmazonApiGatewayV2. -// -// Gets the Stages for an API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetStages for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetStages -func (c *ApiGatewayV2) GetStages(input *GetStagesInput) (*GetStagesOutput, error) { - req, out := c.GetStagesRequest(input) - return out, req.Send() -} - -// GetStagesWithContext is the same as GetStages with the addition of -// the ability to pass a context and additional request options. -// -// See GetStages for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) GetStagesWithContext(ctx aws.Context, input *GetStagesInput, opts ...request.Option) (*GetStagesOutput, error) { - req, out := c.GetStagesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApi = "UpdateApi" - -// UpdateApiRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApi operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApi for more information on using the UpdateApi -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApiRequest method. -// req, resp := client.UpdateApiRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateApi -func (c *ApiGatewayV2) UpdateApiRequest(input *UpdateApiInput) (req *request.Request, output *UpdateApiOutput) { - op := &request.Operation{ - Name: opUpdateApi, - HTTPMethod: "PATCH", - HTTPPath: "/v2/apis/{apiId}", - } - - if input == nil { - input = &UpdateApiInput{} - } - - output = &UpdateApiOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateApi API operation for AmazonApiGatewayV2. -// -// Updates an Api resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation UpdateApi for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateApi -func (c *ApiGatewayV2) UpdateApi(input *UpdateApiInput) (*UpdateApiOutput, error) { - req, out := c.UpdateApiRequest(input) - return out, req.Send() -} - -// UpdateApiWithContext is the same as UpdateApi with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApi for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) UpdateApiWithContext(ctx aws.Context, input *UpdateApiInput, opts ...request.Option) (*UpdateApiOutput, error) { - req, out := c.UpdateApiRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApiMapping = "UpdateApiMapping" - -// UpdateApiMappingRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApiMapping operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApiMapping for more information on using the UpdateApiMapping -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApiMappingRequest method. -// req, resp := client.UpdateApiMappingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateApiMapping -func (c *ApiGatewayV2) UpdateApiMappingRequest(input *UpdateApiMappingInput) (req *request.Request, output *UpdateApiMappingOutput) { - op := &request.Operation{ - Name: opUpdateApiMapping, - HTTPMethod: "PATCH", - HTTPPath: "/v2/domainnames/{domainName}/apimappings/{apiMappingId}", - } - - if input == nil { - input = &UpdateApiMappingInput{} - } - - output = &UpdateApiMappingOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateApiMapping API operation for AmazonApiGatewayV2. -// -// The API mapping. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation UpdateApiMapping for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateApiMapping -func (c *ApiGatewayV2) UpdateApiMapping(input *UpdateApiMappingInput) (*UpdateApiMappingOutput, error) { - req, out := c.UpdateApiMappingRequest(input) - return out, req.Send() -} - -// UpdateApiMappingWithContext is the same as UpdateApiMapping with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApiMapping for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) UpdateApiMappingWithContext(ctx aws.Context, input *UpdateApiMappingInput, opts ...request.Option) (*UpdateApiMappingOutput, error) { - req, out := c.UpdateApiMappingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAuthorizer = "UpdateAuthorizer" - -// UpdateAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAuthorizer for more information on using the UpdateAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAuthorizerRequest method. -// req, resp := client.UpdateAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateAuthorizer -func (c *ApiGatewayV2) UpdateAuthorizerRequest(input *UpdateAuthorizerInput) (req *request.Request, output *UpdateAuthorizerOutput) { - op := &request.Operation{ - Name: opUpdateAuthorizer, - HTTPMethod: "PATCH", - HTTPPath: "/v2/apis/{apiId}/authorizers/{authorizerId}", - } - - if input == nil { - input = &UpdateAuthorizerInput{} - } - - output = &UpdateAuthorizerOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateAuthorizer API operation for AmazonApiGatewayV2. -// -// Updates an Authorizer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation UpdateAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateAuthorizer -func (c *ApiGatewayV2) UpdateAuthorizer(input *UpdateAuthorizerInput) (*UpdateAuthorizerOutput, error) { - req, out := c.UpdateAuthorizerRequest(input) - return out, req.Send() -} - -// UpdateAuthorizerWithContext is the same as UpdateAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) UpdateAuthorizerWithContext(ctx aws.Context, input *UpdateAuthorizerInput, opts ...request.Option) (*UpdateAuthorizerOutput, error) { - req, out := c.UpdateAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDeployment = "UpdateDeployment" - -// UpdateDeploymentRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDeployment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDeployment for more information on using the UpdateDeployment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDeploymentRequest method. -// req, resp := client.UpdateDeploymentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateDeployment -func (c *ApiGatewayV2) UpdateDeploymentRequest(input *UpdateDeploymentInput) (req *request.Request, output *UpdateDeploymentOutput) { - op := &request.Operation{ - Name: opUpdateDeployment, - HTTPMethod: "PATCH", - HTTPPath: "/v2/apis/{apiId}/deployments/{deploymentId}", - } - - if input == nil { - input = &UpdateDeploymentInput{} - } - - output = &UpdateDeploymentOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDeployment API operation for AmazonApiGatewayV2. -// -// Updates 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 AmazonApiGatewayV2's -// API operation UpdateDeployment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateDeployment -func (c *ApiGatewayV2) UpdateDeployment(input *UpdateDeploymentInput) (*UpdateDeploymentOutput, error) { - req, out := c.UpdateDeploymentRequest(input) - return out, req.Send() -} - -// UpdateDeploymentWithContext is the same as UpdateDeployment with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDeployment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) UpdateDeploymentWithContext(ctx aws.Context, input *UpdateDeploymentInput, opts ...request.Option) (*UpdateDeploymentOutput, error) { - req, out := c.UpdateDeploymentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDomainName = "UpdateDomainName" - -// UpdateDomainNameRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDomainName operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDomainName for more information on using the UpdateDomainName -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDomainNameRequest method. -// req, resp := client.UpdateDomainNameRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateDomainName -func (c *ApiGatewayV2) UpdateDomainNameRequest(input *UpdateDomainNameInput) (req *request.Request, output *UpdateDomainNameOutput) { - op := &request.Operation{ - Name: opUpdateDomainName, - HTTPMethod: "PATCH", - HTTPPath: "/v2/domainnames/{domainName}", - } - - if input == nil { - input = &UpdateDomainNameInput{} - } - - output = &UpdateDomainNameOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDomainName API operation for AmazonApiGatewayV2. -// -// Updates a domain name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation UpdateDomainName for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateDomainName -func (c *ApiGatewayV2) UpdateDomainName(input *UpdateDomainNameInput) (*UpdateDomainNameOutput, error) { - req, out := c.UpdateDomainNameRequest(input) - return out, req.Send() -} - -// UpdateDomainNameWithContext is the same as UpdateDomainName with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDomainName for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) UpdateDomainNameWithContext(ctx aws.Context, input *UpdateDomainNameInput, opts ...request.Option) (*UpdateDomainNameOutput, error) { - req, out := c.UpdateDomainNameRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateIntegration = "UpdateIntegration" - -// UpdateIntegrationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateIntegration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateIntegration for more information on using the UpdateIntegration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateIntegrationRequest method. -// req, resp := client.UpdateIntegrationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateIntegration -func (c *ApiGatewayV2) UpdateIntegrationRequest(input *UpdateIntegrationInput) (req *request.Request, output *UpdateIntegrationOutput) { - op := &request.Operation{ - Name: opUpdateIntegration, - HTTPMethod: "PATCH", - HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}", - } - - if input == nil { - input = &UpdateIntegrationInput{} - } - - output = &UpdateIntegrationOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateIntegration API operation for AmazonApiGatewayV2. -// -// Updates an Integration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation UpdateIntegration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateIntegration -func (c *ApiGatewayV2) UpdateIntegration(input *UpdateIntegrationInput) (*UpdateIntegrationOutput, error) { - req, out := c.UpdateIntegrationRequest(input) - return out, req.Send() -} - -// UpdateIntegrationWithContext is the same as UpdateIntegration with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateIntegration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) UpdateIntegrationWithContext(ctx aws.Context, input *UpdateIntegrationInput, opts ...request.Option) (*UpdateIntegrationOutput, error) { - req, out := c.UpdateIntegrationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateIntegrationResponse = "UpdateIntegrationResponse" - -// UpdateIntegrationResponseRequest generates a "aws/request.Request" representing the -// client's request for the UpdateIntegrationResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateIntegrationResponse for more information on using the UpdateIntegrationResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateIntegrationResponseRequest method. -// req, resp := client.UpdateIntegrationResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateIntegrationResponse -func (c *ApiGatewayV2) UpdateIntegrationResponseRequest(input *UpdateIntegrationResponseInput) (req *request.Request, output *UpdateIntegrationResponseOutput) { - op := &request.Operation{ - Name: opUpdateIntegrationResponse, - HTTPMethod: "PATCH", - HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}", - } - - if input == nil { - input = &UpdateIntegrationResponseInput{} - } - - output = &UpdateIntegrationResponseOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateIntegrationResponse API operation for AmazonApiGatewayV2. -// -// Updates an IntegrationResponses. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation UpdateIntegrationResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateIntegrationResponse -func (c *ApiGatewayV2) UpdateIntegrationResponse(input *UpdateIntegrationResponseInput) (*UpdateIntegrationResponseOutput, error) { - req, out := c.UpdateIntegrationResponseRequest(input) - return out, req.Send() -} - -// UpdateIntegrationResponseWithContext is the same as UpdateIntegrationResponse with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateIntegrationResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) UpdateIntegrationResponseWithContext(ctx aws.Context, input *UpdateIntegrationResponseInput, opts ...request.Option) (*UpdateIntegrationResponseOutput, error) { - req, out := c.UpdateIntegrationResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateModel = "UpdateModel" - -// UpdateModelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateModel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateModel for more information on using the UpdateModel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateModelRequest method. -// req, resp := client.UpdateModelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateModel -func (c *ApiGatewayV2) UpdateModelRequest(input *UpdateModelInput) (req *request.Request, output *UpdateModelOutput) { - op := &request.Operation{ - Name: opUpdateModel, - HTTPMethod: "PATCH", - HTTPPath: "/v2/apis/{apiId}/models/{modelId}", - } - - if input == nil { - input = &UpdateModelInput{} - } - - output = &UpdateModelOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateModel API operation for AmazonApiGatewayV2. -// -// Updates a Model. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation UpdateModel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateModel -func (c *ApiGatewayV2) UpdateModel(input *UpdateModelInput) (*UpdateModelOutput, error) { - req, out := c.UpdateModelRequest(input) - return out, req.Send() -} - -// UpdateModelWithContext is the same as UpdateModel with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateModel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) UpdateModelWithContext(ctx aws.Context, input *UpdateModelInput, opts ...request.Option) (*UpdateModelOutput, error) { - req, out := c.UpdateModelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRoute = "UpdateRoute" - -// UpdateRouteRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRoute for more information on using the UpdateRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRouteRequest method. -// req, resp := client.UpdateRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateRoute -func (c *ApiGatewayV2) UpdateRouteRequest(input *UpdateRouteInput) (req *request.Request, output *UpdateRouteOutput) { - op := &request.Operation{ - Name: opUpdateRoute, - HTTPMethod: "PATCH", - HTTPPath: "/v2/apis/{apiId}/routes/{routeId}", - } - - if input == nil { - input = &UpdateRouteInput{} - } - - output = &UpdateRouteOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRoute API operation for AmazonApiGatewayV2. -// -// Updates a Route. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation UpdateRoute for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateRoute -func (c *ApiGatewayV2) UpdateRoute(input *UpdateRouteInput) (*UpdateRouteOutput, error) { - req, out := c.UpdateRouteRequest(input) - return out, req.Send() -} - -// UpdateRouteWithContext is the same as UpdateRoute with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) UpdateRouteWithContext(ctx aws.Context, input *UpdateRouteInput, opts ...request.Option) (*UpdateRouteOutput, error) { - req, out := c.UpdateRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRouteResponse = "UpdateRouteResponse" - -// UpdateRouteResponseRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRouteResponse operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRouteResponse for more information on using the UpdateRouteResponse -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRouteResponseRequest method. -// req, resp := client.UpdateRouteResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateRouteResponse -func (c *ApiGatewayV2) UpdateRouteResponseRequest(input *UpdateRouteResponseInput) (req *request.Request, output *UpdateRouteResponseOutput) { - op := &request.Operation{ - Name: opUpdateRouteResponse, - HTTPMethod: "PATCH", - HTTPPath: "/v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}", - } - - if input == nil { - input = &UpdateRouteResponseInput{} - } - - output = &UpdateRouteResponseOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRouteResponse API operation for AmazonApiGatewayV2. -// -// Updates a RouteResponse. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation UpdateRouteResponse for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateRouteResponse -func (c *ApiGatewayV2) UpdateRouteResponse(input *UpdateRouteResponseInput) (*UpdateRouteResponseOutput, error) { - req, out := c.UpdateRouteResponseRequest(input) - return out, req.Send() -} - -// UpdateRouteResponseWithContext is the same as UpdateRouteResponse with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRouteResponse for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) UpdateRouteResponseWithContext(ctx aws.Context, input *UpdateRouteResponseInput, opts ...request.Option) (*UpdateRouteResponseOutput, error) { - req, out := c.UpdateRouteResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateStage = "UpdateStage" - -// UpdateStageRequest generates a "aws/request.Request" representing the -// client's request for the UpdateStage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateStage for more information on using the UpdateStage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateStageRequest method. -// req, resp := client.UpdateStageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateStage -func (c *ApiGatewayV2) UpdateStageRequest(input *UpdateStageInput) (req *request.Request, output *UpdateStageOutput) { - op := &request.Operation{ - Name: opUpdateStage, - HTTPMethod: "PATCH", - HTTPPath: "/v2/apis/{apiId}/stages/{stageName}", - } - - if input == nil { - input = &UpdateStageInput{} - } - - output = &UpdateStageOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateStage API operation for AmazonApiGatewayV2. -// -// Updates a Stage. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonApiGatewayV2's -// API operation UpdateStage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. See the message field -// for more information. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// A limit has been exceeded. See the accompanying error message for details. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateStage -func (c *ApiGatewayV2) UpdateStage(input *UpdateStageInput) (*UpdateStageOutput, error) { - req, out := c.UpdateStageRequest(input) - return out, req.Send() -} - -// UpdateStageWithContext is the same as UpdateStage with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateStage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApiGatewayV2) UpdateStageWithContext(ctx aws.Context, input *UpdateStageInput, opts ...request.Option) (*UpdateStageOutput, error) { - req, out := c.UpdateStageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Settings for logging access in a stage. -type AccessLogSettings struct { - _ struct{} `type:"structure"` - - // The ARN of the CloudWatch Logs log group to receive access logs. - DestinationArn *string `locationName:"destinationArn" type:"string"` - - // A single line format of the access logs of data, as specified by selected - // $context variables. The format must include at least $context.requestId. - Format *string `locationName:"format" type:"string"` -} - -// String returns the string representation -func (s AccessLogSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccessLogSettings) GoString() string { - return s.String() -} - -// SetDestinationArn sets the DestinationArn field's value. -func (s *AccessLogSettings) SetDestinationArn(v string) *AccessLogSettings { - s.DestinationArn = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *AccessLogSettings) SetFormat(v string) *AccessLogSettings { - s.Format = &v - return s -} - -// Represents an API. -type Api struct { - _ struct{} `type:"structure"` - - // The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. - // The stage name is typically appended to this URI to form a complete path - // to a deployed API stage. - ApiEndpoint *string `locationName:"apiEndpoint" type:"string"` - - // The API ID. - ApiId *string `locationName:"apiId" type:"string"` - - // An API key selection expression. See API Key Selection Expressions (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions). - ApiKeySelectionExpression *string `locationName:"apiKeySelectionExpression" type:"string"` - - // The timestamp when the API was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` - - // The description of the API. - Description *string `locationName:"description" type:"string"` - - // Avoid validating models when creating a deployment. - DisableSchemaValidation *bool `locationName:"disableSchemaValidation" type:"boolean"` - - // The name of the API. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The API protocol: HTTP or WEBSOCKET. - // - // ProtocolType is a required field - ProtocolType *string `locationName:"protocolType" type:"string" required:"true" enum:"ProtocolType"` - - // The route selection expression for the API. - // - // RouteSelectionExpression is a required field - RouteSelectionExpression *string `locationName:"routeSelectionExpression" type:"string" required:"true"` - - // A version identifier for the API. - Version *string `locationName:"version" type:"string"` - - // The warning messages reported when failonwarnings is turned on during API - // import. - Warnings []*string `locationName:"warnings" type:"list"` -} - -// String returns the string representation -func (s Api) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Api) GoString() string { - return s.String() -} - -// SetApiEndpoint sets the ApiEndpoint field's value. -func (s *Api) SetApiEndpoint(v string) *Api { - s.ApiEndpoint = &v - return s -} - -// SetApiId sets the ApiId field's value. -func (s *Api) SetApiId(v string) *Api { - s.ApiId = &v - return s -} - -// SetApiKeySelectionExpression sets the ApiKeySelectionExpression field's value. -func (s *Api) SetApiKeySelectionExpression(v string) *Api { - s.ApiKeySelectionExpression = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *Api) SetCreatedDate(v time.Time) *Api { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Api) SetDescription(v string) *Api { - s.Description = &v - return s -} - -// SetDisableSchemaValidation sets the DisableSchemaValidation field's value. -func (s *Api) SetDisableSchemaValidation(v bool) *Api { - s.DisableSchemaValidation = &v - return s -} - -// SetName sets the Name field's value. -func (s *Api) SetName(v string) *Api { - s.Name = &v - return s -} - -// SetProtocolType sets the ProtocolType field's value. -func (s *Api) SetProtocolType(v string) *Api { - s.ProtocolType = &v - return s -} - -// SetRouteSelectionExpression sets the RouteSelectionExpression field's value. -func (s *Api) SetRouteSelectionExpression(v string) *Api { - s.RouteSelectionExpression = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *Api) SetVersion(v string) *Api { - s.Version = &v - return s -} - -// SetWarnings sets the Warnings field's value. -func (s *Api) SetWarnings(v []*string) *Api { - s.Warnings = v - return s -} - -// Represents an authorizer. -type Authorizer struct { - _ struct{} `type:"structure"` - - // Specifies the required credentials as an IAM role for API Gateway to invoke - // the authorizer. To specify an IAM role for API Gateway to assume, use the - // role's Amazon Resource Name (ARN). To use resource-based permissions on the - // Lambda function, specify null. - AuthorizerCredentialsArn *string `locationName:"authorizerCredentialsArn" type:"string"` - - // The authorizer identifier. - AuthorizerId *string `locationName:"authorizerId" type:"string"` - - // The time to live (TTL), in seconds, of cached authorizer results. If it equals - // 0, authorization caching is disabled. If it is greater than 0, API Gateway - // will cache authorizer responses. If this field is not set, the default value - // is 300. The maximum value is 3600, or 1 hour. - AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` - - // The authorizer type. Currently the only valid value is REQUEST, for a Lambda - // function using incoming request parameters. - AuthorizerType *string `locationName:"authorizerType" type:"string" enum:"AuthorizerType"` - - // The authorizer's Uniform Resource Identifier (URI). ForREQUEST authorizers, - // this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. - // In general, the URI has this form: arn:aws:apigateway:{region}:lambda:path/{service_api} - // , where {region} is the same as the region hosting the Lambda function, path - // indicates that the remaining substring in the URI should be treated as the - // path to the resource, including the initial /. For Lambda functions, this - // is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. - AuthorizerUri *string `locationName:"authorizerUri" type:"string"` - - // The identity source for which authorization is requested. - // - // For the REQUEST authorizer, this is required when authorization caching is - // enabled. The value is a comma-separated string of one or more mapping expressions - // of the specified request parameters. For example, if an Auth header and a - // Name query string parameters are defined as identity sources, this value - // is method.request.header.Auth, method.request.querystring.Name. These parameters - // will be used to derive the authorization caching key and to perform runtime - // validation of the REQUEST authorizer by verifying all of the identity-related - // request parameters are present, not null, and non-empty. Only when this is - // true does the authorizer invoke the authorizer Lambda function, otherwise, - // it returns a 401 Unauthorized response without calling the Lambda function. - // The valid value is a string of comma-separated mapping expressions of the - // specified request parameters. When the authorization caching is not enabled, - // this property is optional. - IdentitySource []*string `locationName:"identitySource" type:"list"` - - // The validation expression does not apply to the REQUEST authorizer. - IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` - - // The name of the authorizer. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // For REQUEST authorizer, this is not defined. - ProviderArns []*string `locationName:"providerArns" type:"list"` -} - -// String returns the string representation -func (s Authorizer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Authorizer) GoString() string { - return s.String() -} - -// SetAuthorizerCredentialsArn sets the AuthorizerCredentialsArn field's value. -func (s *Authorizer) SetAuthorizerCredentialsArn(v string) *Authorizer { - s.AuthorizerCredentialsArn = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *Authorizer) SetAuthorizerId(v string) *Authorizer { - s.AuthorizerId = &v - return s -} - -// SetAuthorizerResultTtlInSeconds sets the AuthorizerResultTtlInSeconds field's value. -func (s *Authorizer) SetAuthorizerResultTtlInSeconds(v int64) *Authorizer { - s.AuthorizerResultTtlInSeconds = &v - return s -} - -// SetAuthorizerType sets the AuthorizerType field's value. -func (s *Authorizer) SetAuthorizerType(v string) *Authorizer { - s.AuthorizerType = &v - return s -} - -// SetAuthorizerUri sets the AuthorizerUri field's value. -func (s *Authorizer) SetAuthorizerUri(v string) *Authorizer { - s.AuthorizerUri = &v - return s -} - -// SetIdentitySource sets the IdentitySource field's value. -func (s *Authorizer) SetIdentitySource(v []*string) *Authorizer { - s.IdentitySource = v - return s -} - -// SetIdentityValidationExpression sets the IdentityValidationExpression field's value. -func (s *Authorizer) SetIdentityValidationExpression(v string) *Authorizer { - s.IdentityValidationExpression = &v - return s -} - -// SetName sets the Name field's value. -func (s *Authorizer) SetName(v string) *Authorizer { - s.Name = &v - return s -} - -// SetProviderArns sets the ProviderArns field's value. -func (s *Authorizer) SetProviderArns(v []*string) *Authorizer { - s.ProviderArns = v - return s -} - -type CreateApiInput struct { - _ struct{} `type:"structure"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ApiKeySelectionExpression *string `locationName:"apiKeySelectionExpression" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - DisableSchemaValidation *bool `locationName:"disableSchemaValidation" type:"boolean"` - - // A string with a length between [1-128]. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // ProtocolType is a required field - ProtocolType *string `locationName:"protocolType" type:"string" required:"true" enum:"ProtocolType"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - // - // RouteSelectionExpression is a required field - RouteSelectionExpression *string `locationName:"routeSelectionExpression" type:"string" required:"true"` - - // A string with a length between [1-64]. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s CreateApiInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApiInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateApiInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.ProtocolType == nil { - invalidParams.Add(request.NewErrParamRequired("ProtocolType")) - } - if s.RouteSelectionExpression == nil { - invalidParams.Add(request.NewErrParamRequired("RouteSelectionExpression")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiKeySelectionExpression sets the ApiKeySelectionExpression field's value. -func (s *CreateApiInput) SetApiKeySelectionExpression(v string) *CreateApiInput { - s.ApiKeySelectionExpression = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateApiInput) SetDescription(v string) *CreateApiInput { - s.Description = &v - return s -} - -// SetDisableSchemaValidation sets the DisableSchemaValidation field's value. -func (s *CreateApiInput) SetDisableSchemaValidation(v bool) *CreateApiInput { - s.DisableSchemaValidation = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateApiInput) SetName(v string) *CreateApiInput { - s.Name = &v - return s -} - -// SetProtocolType sets the ProtocolType field's value. -func (s *CreateApiInput) SetProtocolType(v string) *CreateApiInput { - s.ProtocolType = &v - return s -} - -// SetRouteSelectionExpression sets the RouteSelectionExpression field's value. -func (s *CreateApiInput) SetRouteSelectionExpression(v string) *CreateApiInput { - s.RouteSelectionExpression = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *CreateApiInput) SetVersion(v string) *CreateApiInput { - s.Version = &v - return s -} - -type CreateApiMappingInput struct { - _ struct{} `type:"structure"` - - // An API Gateway-generated, unique identifier. - // - // ApiId is a required field - ApiId *string `locationName:"apiId" type:"string" required:"true"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - ApiMappingKey *string `locationName:"apiMappingKey" type:"string"` - - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` - - // A string with a length between [1-128]. - // - // Stage is a required field - Stage *string `locationName:"stage" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateApiMappingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApiMappingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateApiMappingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateApiMappingInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - if s.Stage == nil { - invalidParams.Add(request.NewErrParamRequired("Stage")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *CreateApiMappingInput) SetApiId(v string) *CreateApiMappingInput { - s.ApiId = &v - return s -} - -// SetApiMappingKey sets the ApiMappingKey field's value. -func (s *CreateApiMappingInput) SetApiMappingKey(v string) *CreateApiMappingInput { - s.ApiMappingKey = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *CreateApiMappingInput) SetDomainName(v string) *CreateApiMappingInput { - s.DomainName = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *CreateApiMappingInput) SetStage(v string) *CreateApiMappingInput { - s.Stage = &v - return s -} - -type CreateApiMappingOutput struct { - _ struct{} `type:"structure"` - - // An API Gateway-generated, unique identifier. - ApiId *string `locationName:"apiId" type:"string"` - - // An API Gateway-generated, unique identifier. - ApiMappingId *string `locationName:"apiMappingId" type:"string"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - ApiMappingKey *string `locationName:"apiMappingKey" type:"string"` - - // A string with a length between [1-128]. - Stage *string `locationName:"stage" type:"string"` -} - -// String returns the string representation -func (s CreateApiMappingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApiMappingOutput) GoString() string { - return s.String() -} - -// SetApiId sets the ApiId field's value. -func (s *CreateApiMappingOutput) SetApiId(v string) *CreateApiMappingOutput { - s.ApiId = &v - return s -} - -// SetApiMappingId sets the ApiMappingId field's value. -func (s *CreateApiMappingOutput) SetApiMappingId(v string) *CreateApiMappingOutput { - s.ApiMappingId = &v - return s -} - -// SetApiMappingKey sets the ApiMappingKey field's value. -func (s *CreateApiMappingOutput) SetApiMappingKey(v string) *CreateApiMappingOutput { - s.ApiMappingKey = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *CreateApiMappingOutput) SetStage(v string) *CreateApiMappingOutput { - s.Stage = &v - return s -} - -type CreateApiOutput struct { - _ struct{} `type:"structure"` - - ApiEndpoint *string `locationName:"apiEndpoint" type:"string"` - - // An API Gateway-generated, unique identifier. - ApiId *string `locationName:"apiId" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ApiKeySelectionExpression *string `locationName:"apiKeySelectionExpression" type:"string"` - - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - DisableSchemaValidation *bool `locationName:"disableSchemaValidation" type:"boolean"` - - // A string with a length between [1-128]. - Name *string `locationName:"name" type:"string"` - - ProtocolType *string `locationName:"protocolType" type:"string" enum:"ProtocolType"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - RouteSelectionExpression *string `locationName:"routeSelectionExpression" type:"string"` - - // A string with a length between [1-64]. - Version *string `locationName:"version" type:"string"` - - Warnings []*string `locationName:"warnings" type:"list"` -} - -// String returns the string representation -func (s CreateApiOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApiOutput) GoString() string { - return s.String() -} - -// SetApiEndpoint sets the ApiEndpoint field's value. -func (s *CreateApiOutput) SetApiEndpoint(v string) *CreateApiOutput { - s.ApiEndpoint = &v - return s -} - -// SetApiId sets the ApiId field's value. -func (s *CreateApiOutput) SetApiId(v string) *CreateApiOutput { - s.ApiId = &v - return s -} - -// SetApiKeySelectionExpression sets the ApiKeySelectionExpression field's value. -func (s *CreateApiOutput) SetApiKeySelectionExpression(v string) *CreateApiOutput { - s.ApiKeySelectionExpression = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *CreateApiOutput) SetCreatedDate(v time.Time) *CreateApiOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateApiOutput) SetDescription(v string) *CreateApiOutput { - s.Description = &v - return s -} - -// SetDisableSchemaValidation sets the DisableSchemaValidation field's value. -func (s *CreateApiOutput) SetDisableSchemaValidation(v bool) *CreateApiOutput { - s.DisableSchemaValidation = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateApiOutput) SetName(v string) *CreateApiOutput { - s.Name = &v - return s -} - -// SetProtocolType sets the ProtocolType field's value. -func (s *CreateApiOutput) SetProtocolType(v string) *CreateApiOutput { - s.ProtocolType = &v - return s -} - -// SetRouteSelectionExpression sets the RouteSelectionExpression field's value. -func (s *CreateApiOutput) SetRouteSelectionExpression(v string) *CreateApiOutput { - s.RouteSelectionExpression = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *CreateApiOutput) SetVersion(v string) *CreateApiOutput { - s.Version = &v - return s -} - -// SetWarnings sets the Warnings field's value. -func (s *CreateApiOutput) SetWarnings(v []*string) *CreateApiOutput { - s.Warnings = v - return s -} - -type CreateAuthorizerInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // Represents an Amazon Resource Name (ARN). - AuthorizerCredentialsArn *string `locationName:"authorizerCredentialsArn" type:"string"` - - // An integer with a value between [0-3600]. - AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` - - // The authorizer type. Currently the only valid value is REQUEST, for a Lambda - // function using incoming request parameters. - // - // AuthorizerType is a required field - AuthorizerType *string `locationName:"authorizerType" type:"string" required:"true" enum:"AuthorizerType"` - - // A string representation of a URI with a length between [1-2048]. - // - // AuthorizerUri is a required field - AuthorizerUri *string `locationName:"authorizerUri" type:"string" required:"true"` - - // The identity source for which authorization is requested. - // - // For the REQUEST authorizer, this is required when authorization caching is - // enabled. The value is a comma-separated string of one or more mapping expressions - // of the specified request parameters. For example, if an Auth header, a Name - // query string parameter are defined as identity sources, this value is $method.request.header.Auth, - // $method.request.querystring.Name. These parameters will be used to derive - // the authorization caching key and to perform runtime validation of the REQUEST - // authorizer by verifying all of the identity-related request parameters are - // present, not null and non-empty. Only when this is true does the authorizer - // invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized - // response without calling the Lambda function. The valid value is a string - // of comma-separated mapping expressions of the specified request parameters. - // When the authorization caching is not enabled, this property is optional. - // - // IdentitySource is a required field - IdentitySource []*string `locationName:"identitySource" type:"list" required:"true"` - - // A string with a length between [0-1024]. - IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` - - // A string with a length between [1-128]. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // For REQUEST authorizer, this is not defined. - ProviderArns []*string `locationName:"providerArns" type:"list"` -} - -// String returns the string representation -func (s CreateAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAuthorizerInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.AuthorizerType == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerType")) - } - if s.AuthorizerUri == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerUri")) - } - if s.IdentitySource == nil { - invalidParams.Add(request.NewErrParamRequired("IdentitySource")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *CreateAuthorizerInput) SetApiId(v string) *CreateAuthorizerInput { - s.ApiId = &v - return s -} - -// SetAuthorizerCredentialsArn sets the AuthorizerCredentialsArn field's value. -func (s *CreateAuthorizerInput) SetAuthorizerCredentialsArn(v string) *CreateAuthorizerInput { - s.AuthorizerCredentialsArn = &v - return s -} - -// SetAuthorizerResultTtlInSeconds sets the AuthorizerResultTtlInSeconds field's value. -func (s *CreateAuthorizerInput) SetAuthorizerResultTtlInSeconds(v int64) *CreateAuthorizerInput { - s.AuthorizerResultTtlInSeconds = &v - return s -} - -// SetAuthorizerType sets the AuthorizerType field's value. -func (s *CreateAuthorizerInput) SetAuthorizerType(v string) *CreateAuthorizerInput { - s.AuthorizerType = &v - return s -} - -// SetAuthorizerUri sets the AuthorizerUri field's value. -func (s *CreateAuthorizerInput) SetAuthorizerUri(v string) *CreateAuthorizerInput { - s.AuthorizerUri = &v - return s -} - -// SetIdentitySource sets the IdentitySource field's value. -func (s *CreateAuthorizerInput) SetIdentitySource(v []*string) *CreateAuthorizerInput { - s.IdentitySource = v - return s -} - -// SetIdentityValidationExpression sets the IdentityValidationExpression field's value. -func (s *CreateAuthorizerInput) SetIdentityValidationExpression(v string) *CreateAuthorizerInput { - s.IdentityValidationExpression = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateAuthorizerInput) SetName(v string) *CreateAuthorizerInput { - s.Name = &v - return s -} - -// SetProviderArns sets the ProviderArns field's value. -func (s *CreateAuthorizerInput) SetProviderArns(v []*string) *CreateAuthorizerInput { - s.ProviderArns = v - return s -} - -type CreateAuthorizerOutput struct { - _ struct{} `type:"structure"` - - // Represents an Amazon Resource Name (ARN). - AuthorizerCredentialsArn *string `locationName:"authorizerCredentialsArn" type:"string"` - - // An API Gateway-generated, unique identifier. - AuthorizerId *string `locationName:"authorizerId" type:"string"` - - // An integer with a value between [0-3600]. - AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` - - // The authorizer type. Currently the only valid value is REQUEST, for a Lambda - // function using incoming request parameters. - AuthorizerType *string `locationName:"authorizerType" type:"string" enum:"AuthorizerType"` - - // A string representation of a URI with a length between [1-2048]. - AuthorizerUri *string `locationName:"authorizerUri" type:"string"` - - // The identity source for which authorization is requested. - // - // For the REQUEST authorizer, this is required when authorization caching is - // enabled. The value is a comma-separated string of one or more mapping expressions - // of the specified request parameters. For example, if an Auth header, a Name - // query string parameter are defined as identity sources, this value is $method.request.header.Auth, - // $method.request.querystring.Name. These parameters will be used to derive - // the authorization caching key and to perform runtime validation of the REQUEST - // authorizer by verifying all of the identity-related request parameters are - // present, not null and non-empty. Only when this is true does the authorizer - // invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized - // response without calling the Lambda function. The valid value is a string - // of comma-separated mapping expressions of the specified request parameters. - // When the authorization caching is not enabled, this property is optional. - IdentitySource []*string `locationName:"identitySource" type:"list"` - - // A string with a length between [0-1024]. - IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` - - // A string with a length between [1-128]. - Name *string `locationName:"name" type:"string"` - - // For REQUEST authorizer, this is not defined. - ProviderArns []*string `locationName:"providerArns" type:"list"` -} - -// String returns the string representation -func (s CreateAuthorizerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAuthorizerOutput) GoString() string { - return s.String() -} - -// SetAuthorizerCredentialsArn sets the AuthorizerCredentialsArn field's value. -func (s *CreateAuthorizerOutput) SetAuthorizerCredentialsArn(v string) *CreateAuthorizerOutput { - s.AuthorizerCredentialsArn = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *CreateAuthorizerOutput) SetAuthorizerId(v string) *CreateAuthorizerOutput { - s.AuthorizerId = &v - return s -} - -// SetAuthorizerResultTtlInSeconds sets the AuthorizerResultTtlInSeconds field's value. -func (s *CreateAuthorizerOutput) SetAuthorizerResultTtlInSeconds(v int64) *CreateAuthorizerOutput { - s.AuthorizerResultTtlInSeconds = &v - return s -} - -// SetAuthorizerType sets the AuthorizerType field's value. -func (s *CreateAuthorizerOutput) SetAuthorizerType(v string) *CreateAuthorizerOutput { - s.AuthorizerType = &v - return s -} - -// SetAuthorizerUri sets the AuthorizerUri field's value. -func (s *CreateAuthorizerOutput) SetAuthorizerUri(v string) *CreateAuthorizerOutput { - s.AuthorizerUri = &v - return s -} - -// SetIdentitySource sets the IdentitySource field's value. -func (s *CreateAuthorizerOutput) SetIdentitySource(v []*string) *CreateAuthorizerOutput { - s.IdentitySource = v - return s -} - -// SetIdentityValidationExpression sets the IdentityValidationExpression field's value. -func (s *CreateAuthorizerOutput) SetIdentityValidationExpression(v string) *CreateAuthorizerOutput { - s.IdentityValidationExpression = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateAuthorizerOutput) SetName(v string) *CreateAuthorizerOutput { - s.Name = &v - return s -} - -// SetProviderArns sets the ProviderArns field's value. -func (s *CreateAuthorizerOutput) SetProviderArns(v []*string) *CreateAuthorizerOutput { - s.ProviderArns = v - return s -} - -type CreateDeploymentInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - // A string with a length between [1-128]. - StageName *string `locationName:"stageName" 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.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *CreateDeploymentInput) SetApiId(v string) *CreateDeploymentInput { - s.ApiId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateDeploymentInput) SetDescription(v string) *CreateDeploymentInput { - s.Description = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *CreateDeploymentInput) SetStageName(v string) *CreateDeploymentInput { - s.StageName = &v - return s -} - -type CreateDeploymentOutput struct { - _ struct{} `type:"structure"` - - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` - - // An API Gateway-generated, unique identifier. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // Represents a deployment status. - DeploymentStatus *string `locationName:"deploymentStatus" type:"string" enum:"DeploymentStatus"` - - DeploymentStatusMessage *string `locationName:"deploymentStatusMessage" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" 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() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *CreateDeploymentOutput) SetCreatedDate(v time.Time) *CreateDeploymentOutput { - s.CreatedDate = &v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *CreateDeploymentOutput) SetDeploymentId(v string) *CreateDeploymentOutput { - s.DeploymentId = &v - return s -} - -// SetDeploymentStatus sets the DeploymentStatus field's value. -func (s *CreateDeploymentOutput) SetDeploymentStatus(v string) *CreateDeploymentOutput { - s.DeploymentStatus = &v - return s -} - -// SetDeploymentStatusMessage sets the DeploymentStatusMessage field's value. -func (s *CreateDeploymentOutput) SetDeploymentStatusMessage(v string) *CreateDeploymentOutput { - s.DeploymentStatusMessage = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateDeploymentOutput) SetDescription(v string) *CreateDeploymentOutput { - s.Description = &v - return s -} - -type CreateDomainNameInput struct { - _ struct{} `type:"structure"` - - // A string with a length between [1-512]. - // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` - - // The domain name configurations. - DomainNameConfigurations []*DomainNameConfiguration `locationName:"domainNameConfigurations" type:"list"` -} - -// String returns the string representation -func (s CreateDomainNameInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDomainNameInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDomainNameInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDomainNameInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *CreateDomainNameInput) SetDomainName(v string) *CreateDomainNameInput { - s.DomainName = &v - return s -} - -// SetDomainNameConfigurations sets the DomainNameConfigurations field's value. -func (s *CreateDomainNameInput) SetDomainNameConfigurations(v []*DomainNameConfiguration) *CreateDomainNameInput { - s.DomainNameConfigurations = v - return s -} - -type CreateDomainNameOutput struct { - _ struct{} `type:"structure"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ApiMappingSelectionExpression *string `locationName:"apiMappingSelectionExpression" type:"string"` - - // A string with a length between [1-512]. - DomainName *string `locationName:"domainName" type:"string"` - - // The domain name configurations. - DomainNameConfigurations []*DomainNameConfiguration `locationName:"domainNameConfigurations" type:"list"` -} - -// String returns the string representation -func (s CreateDomainNameOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDomainNameOutput) GoString() string { - return s.String() -} - -// SetApiMappingSelectionExpression sets the ApiMappingSelectionExpression field's value. -func (s *CreateDomainNameOutput) SetApiMappingSelectionExpression(v string) *CreateDomainNameOutput { - s.ApiMappingSelectionExpression = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *CreateDomainNameOutput) SetDomainName(v string) *CreateDomainNameOutput { - s.DomainName = &v - return s -} - -// SetDomainNameConfigurations sets the DomainNameConfigurations field's value. -func (s *CreateDomainNameOutput) SetDomainNameConfigurations(v []*DomainNameConfiguration) *CreateDomainNameOutput { - s.DomainNameConfigurations = v - return s -} - -type CreateIntegrationInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // A string with a length between [1-1024]. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // Represents a connection type. - ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` - - // Specifies how to handle response payload content type conversions. - ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` - - // Represents an Amazon Resource Name (ARN). - CredentialsArn *string `locationName:"credentialsArn" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - // A string with a length between [1-64]. - IntegrationMethod *string `locationName:"integrationMethod" type:"string"` - - // Represents an API method integration type. - IntegrationType *string `locationName:"integrationType" type:"string" enum:"IntegrationType"` - - // A string representation of a URI with a length between [1-2048]. - IntegrationUri *string `locationName:"integrationUri" type:"string"` - - // Represents passthrough behavior for an integration response. - PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string" enum:"PassthroughBehavior"` - - // A key-value map specifying response parameters that are passed to the method - // response from the backend. The key is a method response header parameter - // name and the mapped value is an integration response header value, a static - // value enclosed within a pair of single quotes, or a JSON expression from - // the integration response body. The mapping key must match the pattern of - // method.response.header.{name}, where name is a valid and unique header name. - // The mapped non-static value must match the pattern of integration.response.header.{name} - // or integration.response.body.{JSON-expression}, where name is a valid and - // unique response header name and JSON-expression is a valid JSON expression - // without the $ prefix. - RequestParameters map[string]*string `locationName:"requestParameters" type:"map"` - - // A mapping of identifier keys to templates. The value is an actual template - // script. The key is typically a SelectionKey which is chosen based on evaluating - // a selection expression. - RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` - - // An integer with a value between [50-29000]. - TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` -} - -// String returns the string representation -func (s CreateIntegrationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIntegrationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateIntegrationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateIntegrationInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.TimeoutInMillis != nil && *s.TimeoutInMillis < 50 { - invalidParams.Add(request.NewErrParamMinValue("TimeoutInMillis", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *CreateIntegrationInput) SetApiId(v string) *CreateIntegrationInput { - s.ApiId = &v - return s -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *CreateIntegrationInput) SetConnectionId(v string) *CreateIntegrationInput { - s.ConnectionId = &v - return s -} - -// SetConnectionType sets the ConnectionType field's value. -func (s *CreateIntegrationInput) SetConnectionType(v string) *CreateIntegrationInput { - s.ConnectionType = &v - return s -} - -// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. -func (s *CreateIntegrationInput) SetContentHandlingStrategy(v string) *CreateIntegrationInput { - s.ContentHandlingStrategy = &v - return s -} - -// SetCredentialsArn sets the CredentialsArn field's value. -func (s *CreateIntegrationInput) SetCredentialsArn(v string) *CreateIntegrationInput { - s.CredentialsArn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateIntegrationInput) SetDescription(v string) *CreateIntegrationInput { - s.Description = &v - return s -} - -// SetIntegrationMethod sets the IntegrationMethod field's value. -func (s *CreateIntegrationInput) SetIntegrationMethod(v string) *CreateIntegrationInput { - s.IntegrationMethod = &v - return s -} - -// SetIntegrationType sets the IntegrationType field's value. -func (s *CreateIntegrationInput) SetIntegrationType(v string) *CreateIntegrationInput { - s.IntegrationType = &v - return s -} - -// SetIntegrationUri sets the IntegrationUri field's value. -func (s *CreateIntegrationInput) SetIntegrationUri(v string) *CreateIntegrationInput { - s.IntegrationUri = &v - return s -} - -// SetPassthroughBehavior sets the PassthroughBehavior field's value. -func (s *CreateIntegrationInput) SetPassthroughBehavior(v string) *CreateIntegrationInput { - s.PassthroughBehavior = &v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *CreateIntegrationInput) SetRequestParameters(v map[string]*string) *CreateIntegrationInput { - s.RequestParameters = v - return s -} - -// SetRequestTemplates sets the RequestTemplates field's value. -func (s *CreateIntegrationInput) SetRequestTemplates(v map[string]*string) *CreateIntegrationInput { - s.RequestTemplates = v - return s -} - -// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. -func (s *CreateIntegrationInput) SetTemplateSelectionExpression(v string) *CreateIntegrationInput { - s.TemplateSelectionExpression = &v - return s -} - -// SetTimeoutInMillis sets the TimeoutInMillis field's value. -func (s *CreateIntegrationInput) SetTimeoutInMillis(v int64) *CreateIntegrationInput { - s.TimeoutInMillis = &v - return s -} - -type CreateIntegrationOutput struct { - _ struct{} `type:"structure"` - - // A string with a length between [1-1024]. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // Represents a connection type. - ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` - - // Specifies how to handle response payload content type conversions. - ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` - - // Represents an Amazon Resource Name (ARN). - CredentialsArn *string `locationName:"credentialsArn" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - // An API Gateway-generated, unique identifier. - IntegrationId *string `locationName:"integrationId" type:"string"` - - // A string with a length between [1-64]. - IntegrationMethod *string `locationName:"integrationMethod" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - IntegrationResponseSelectionExpression *string `locationName:"integrationResponseSelectionExpression" type:"string"` - - // Represents an API method integration type. - IntegrationType *string `locationName:"integrationType" type:"string" enum:"IntegrationType"` - - // A string representation of a URI with a length between [1-2048]. - IntegrationUri *string `locationName:"integrationUri" type:"string"` - - // Represents passthrough behavior for an integration response. - PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string" enum:"PassthroughBehavior"` - - // A key-value map specifying response parameters that are passed to the method - // response from the backend. The key is a method response header parameter - // name and the mapped value is an integration response header value, a static - // value enclosed within a pair of single quotes, or a JSON expression from - // the integration response body. The mapping key must match the pattern of - // method.response.header.{name}, where name is a valid and unique header name. - // The mapped non-static value must match the pattern of integration.response.header.{name} - // or integration.response.body.{JSON-expression}, where name is a valid and - // unique response header name and JSON-expression is a valid JSON expression - // without the $ prefix. - RequestParameters map[string]*string `locationName:"requestParameters" type:"map"` - - // A mapping of identifier keys to templates. The value is an actual template - // script. The key is typically a SelectionKey which is chosen based on evaluating - // a selection expression. - RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` - - // An integer with a value between [50-29000]. - TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` -} - -// String returns the string representation -func (s CreateIntegrationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIntegrationOutput) GoString() string { - return s.String() -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *CreateIntegrationOutput) SetConnectionId(v string) *CreateIntegrationOutput { - s.ConnectionId = &v - return s -} - -// SetConnectionType sets the ConnectionType field's value. -func (s *CreateIntegrationOutput) SetConnectionType(v string) *CreateIntegrationOutput { - s.ConnectionType = &v - return s -} - -// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. -func (s *CreateIntegrationOutput) SetContentHandlingStrategy(v string) *CreateIntegrationOutput { - s.ContentHandlingStrategy = &v - return s -} - -// SetCredentialsArn sets the CredentialsArn field's value. -func (s *CreateIntegrationOutput) SetCredentialsArn(v string) *CreateIntegrationOutput { - s.CredentialsArn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateIntegrationOutput) SetDescription(v string) *CreateIntegrationOutput { - s.Description = &v - return s -} - -// SetIntegrationId sets the IntegrationId field's value. -func (s *CreateIntegrationOutput) SetIntegrationId(v string) *CreateIntegrationOutput { - s.IntegrationId = &v - return s -} - -// SetIntegrationMethod sets the IntegrationMethod field's value. -func (s *CreateIntegrationOutput) SetIntegrationMethod(v string) *CreateIntegrationOutput { - s.IntegrationMethod = &v - return s -} - -// SetIntegrationResponseSelectionExpression sets the IntegrationResponseSelectionExpression field's value. -func (s *CreateIntegrationOutput) SetIntegrationResponseSelectionExpression(v string) *CreateIntegrationOutput { - s.IntegrationResponseSelectionExpression = &v - return s -} - -// SetIntegrationType sets the IntegrationType field's value. -func (s *CreateIntegrationOutput) SetIntegrationType(v string) *CreateIntegrationOutput { - s.IntegrationType = &v - return s -} - -// SetIntegrationUri sets the IntegrationUri field's value. -func (s *CreateIntegrationOutput) SetIntegrationUri(v string) *CreateIntegrationOutput { - s.IntegrationUri = &v - return s -} - -// SetPassthroughBehavior sets the PassthroughBehavior field's value. -func (s *CreateIntegrationOutput) SetPassthroughBehavior(v string) *CreateIntegrationOutput { - s.PassthroughBehavior = &v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *CreateIntegrationOutput) SetRequestParameters(v map[string]*string) *CreateIntegrationOutput { - s.RequestParameters = v - return s -} - -// SetRequestTemplates sets the RequestTemplates field's value. -func (s *CreateIntegrationOutput) SetRequestTemplates(v map[string]*string) *CreateIntegrationOutput { - s.RequestTemplates = v - return s -} - -// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. -func (s *CreateIntegrationOutput) SetTemplateSelectionExpression(v string) *CreateIntegrationOutput { - s.TemplateSelectionExpression = &v - return s -} - -// SetTimeoutInMillis sets the TimeoutInMillis field's value. -func (s *CreateIntegrationOutput) SetTimeoutInMillis(v int64) *CreateIntegrationOutput { - s.TimeoutInMillis = &v - return s -} - -type CreateIntegrationResponseInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // Specifies how to handle response payload content type conversions. - ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` - - // IntegrationId is a required field - IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - // - // IntegrationResponseKey is a required field - IntegrationResponseKey *string `locationName:"integrationResponseKey" type:"string" required:"true"` - - // A key-value map specifying response parameters that are passed to the method - // response from the backend. The key is a method response header parameter - // name and the mapped value is an integration response header value, a static - // value enclosed within a pair of single quotes, or a JSON expression from - // the integration response body. The mapping key must match the pattern of - // method.response.header.{name}, where name is a valid and unique header name. - // The mapped non-static value must match the pattern of integration.response.header.{name} - // or integration.response.body.{JSON-expression}, where name is a valid and - // unique response header name and JSON-expression is a valid JSON expression - // without the $ prefix. - ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` - - // A mapping of identifier keys to templates. The value is an actual template - // script. The key is typically a SelectionKey which is chosen based on evaluating - // a selection expression. - ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` -} - -// String returns the string representation -func (s CreateIntegrationResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIntegrationResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateIntegrationResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateIntegrationResponseInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.IntegrationId == nil { - invalidParams.Add(request.NewErrParamRequired("IntegrationId")) - } - if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) - } - if s.IntegrationResponseKey == nil { - invalidParams.Add(request.NewErrParamRequired("IntegrationResponseKey")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *CreateIntegrationResponseInput) SetApiId(v string) *CreateIntegrationResponseInput { - s.ApiId = &v - return s -} - -// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. -func (s *CreateIntegrationResponseInput) SetContentHandlingStrategy(v string) *CreateIntegrationResponseInput { - s.ContentHandlingStrategy = &v - return s -} - -// SetIntegrationId sets the IntegrationId field's value. -func (s *CreateIntegrationResponseInput) SetIntegrationId(v string) *CreateIntegrationResponseInput { - s.IntegrationId = &v - return s -} - -// SetIntegrationResponseKey sets the IntegrationResponseKey field's value. -func (s *CreateIntegrationResponseInput) SetIntegrationResponseKey(v string) *CreateIntegrationResponseInput { - s.IntegrationResponseKey = &v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *CreateIntegrationResponseInput) SetResponseParameters(v map[string]*string) *CreateIntegrationResponseInput { - s.ResponseParameters = v - return s -} - -// SetResponseTemplates sets the ResponseTemplates field's value. -func (s *CreateIntegrationResponseInput) SetResponseTemplates(v map[string]*string) *CreateIntegrationResponseInput { - s.ResponseTemplates = v - return s -} - -// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. -func (s *CreateIntegrationResponseInput) SetTemplateSelectionExpression(v string) *CreateIntegrationResponseInput { - s.TemplateSelectionExpression = &v - return s -} - -type CreateIntegrationResponseOutput struct { - _ struct{} `type:"structure"` - - // Specifies how to handle response payload content type conversions. - ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` - - // An API Gateway-generated, unique identifier. - IntegrationResponseId *string `locationName:"integrationResponseId" type:"string"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - IntegrationResponseKey *string `locationName:"integrationResponseKey" type:"string"` - - // A key-value map specifying response parameters that are passed to the method - // response from the backend. The key is a method response header parameter - // name and the mapped value is an integration response header value, a static - // value enclosed within a pair of single quotes, or a JSON expression from - // the integration response body. The mapping key must match the pattern of - // method.response.header.{name}, where name is a valid and unique header name. - // The mapped non-static value must match the pattern of integration.response.header.{name} - // or integration.response.body.{JSON-expression}, where name is a valid and - // unique response header name and JSON-expression is a valid JSON expression - // without the $ prefix. - ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` - - // A mapping of identifier keys to templates. The value is an actual template - // script. The key is typically a SelectionKey which is chosen based on evaluating - // a selection expression. - ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` -} - -// String returns the string representation -func (s CreateIntegrationResponseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIntegrationResponseOutput) GoString() string { - return s.String() -} - -// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. -func (s *CreateIntegrationResponseOutput) SetContentHandlingStrategy(v string) *CreateIntegrationResponseOutput { - s.ContentHandlingStrategy = &v - return s -} - -// SetIntegrationResponseId sets the IntegrationResponseId field's value. -func (s *CreateIntegrationResponseOutput) SetIntegrationResponseId(v string) *CreateIntegrationResponseOutput { - s.IntegrationResponseId = &v - return s -} - -// SetIntegrationResponseKey sets the IntegrationResponseKey field's value. -func (s *CreateIntegrationResponseOutput) SetIntegrationResponseKey(v string) *CreateIntegrationResponseOutput { - s.IntegrationResponseKey = &v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *CreateIntegrationResponseOutput) SetResponseParameters(v map[string]*string) *CreateIntegrationResponseOutput { - s.ResponseParameters = v - return s -} - -// SetResponseTemplates sets the ResponseTemplates field's value. -func (s *CreateIntegrationResponseOutput) SetResponseTemplates(v map[string]*string) *CreateIntegrationResponseOutput { - s.ResponseTemplates = v - return s -} - -// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. -func (s *CreateIntegrationResponseOutput) SetTemplateSelectionExpression(v string) *CreateIntegrationResponseOutput { - s.TemplateSelectionExpression = &v - return s -} - -type CreateModelInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // A string with a length between [1-256]. - ContentType *string `locationName:"contentType" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - // A string with a length between [1-128]. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // A string with a length between [0-32768]. - Schema *string `locationName:"schema" type:"string"` -} - -// String returns the string representation -func (s CreateModelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateModelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateModelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateModelInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *CreateModelInput) SetApiId(v string) *CreateModelInput { - s.ApiId = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *CreateModelInput) SetContentType(v string) *CreateModelInput { - s.ContentType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateModelInput) SetDescription(v string) *CreateModelInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateModelInput) SetName(v string) *CreateModelInput { - s.Name = &v - return s -} - -// SetSchema sets the Schema field's value. -func (s *CreateModelInput) SetSchema(v string) *CreateModelInput { - s.Schema = &v - return s -} - -type CreateModelOutput struct { - _ struct{} `type:"structure"` - - // A string with a length between [1-256]. - ContentType *string `locationName:"contentType" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - // An API Gateway-generated, unique identifier. - ModelId *string `locationName:"modelId" type:"string"` - - // A string with a length between [1-128]. - Name *string `locationName:"name" type:"string"` - - // A string with a length between [0-32768]. - Schema *string `locationName:"schema" type:"string"` -} - -// String returns the string representation -func (s CreateModelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateModelOutput) GoString() string { - return s.String() -} - -// SetContentType sets the ContentType field's value. -func (s *CreateModelOutput) SetContentType(v string) *CreateModelOutput { - s.ContentType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateModelOutput) SetDescription(v string) *CreateModelOutput { - s.Description = &v - return s -} - -// SetModelId sets the ModelId field's value. -func (s *CreateModelOutput) SetModelId(v string) *CreateModelOutput { - s.ModelId = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateModelOutput) SetName(v string) *CreateModelOutput { - s.Name = &v - return s -} - -// SetSchema sets the Schema field's value. -func (s *CreateModelOutput) SetSchema(v string) *CreateModelOutput { - s.Schema = &v - return s -} - -type CreateRouteInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` - - // A list of authorization scopes configured on a route. The scopes are used - // with a COGNITO_USER_POOLS authorizer to authorize the method invocation. - // The authorization works by matching the route scopes against the scopes parsed - // from the access token in the incoming request. The method invocation is authorized - // if any route scope matches a claimed scope in the access token. Otherwise, - // the invocation is not authorized. When the route scope is configured, the - // client must provide an access token instead of an identity token for authorization - // purposes. - AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` - - // The authorization type. Valid values are NONE for open access, AWS_IAM for - // using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. - AuthorizationType *string `locationName:"authorizationType" type:"string" enum:"AuthorizationType"` - - // An API Gateway-generated, unique identifier. - AuthorizerId *string `locationName:"authorizerId" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` - - // A string with a length between [1-64]. - OperationName *string `locationName:"operationName" type:"string"` - - // The route models. - RequestModels map[string]*string `locationName:"requestModels" type:"map"` - - // The route parameters. - RequestParameters map[string]*ParameterConstraints `locationName:"requestParameters" type:"map"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - // - // RouteKey is a required field - RouteKey *string `locationName:"routeKey" type:"string" required:"true"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - RouteResponseSelectionExpression *string `locationName:"routeResponseSelectionExpression" type:"string"` - - // A string with a length between [1-128]. - Target *string `locationName:"target" type:"string"` -} - -// String returns the string representation -func (s CreateRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRouteInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.RouteKey == nil { - invalidParams.Add(request.NewErrParamRequired("RouteKey")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *CreateRouteInput) SetApiId(v string) *CreateRouteInput { - s.ApiId = &v - return s -} - -// SetApiKeyRequired sets the ApiKeyRequired field's value. -func (s *CreateRouteInput) SetApiKeyRequired(v bool) *CreateRouteInput { - s.ApiKeyRequired = &v - return s -} - -// SetAuthorizationScopes sets the AuthorizationScopes field's value. -func (s *CreateRouteInput) SetAuthorizationScopes(v []*string) *CreateRouteInput { - s.AuthorizationScopes = v - return s -} - -// SetAuthorizationType sets the AuthorizationType field's value. -func (s *CreateRouteInput) SetAuthorizationType(v string) *CreateRouteInput { - s.AuthorizationType = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *CreateRouteInput) SetAuthorizerId(v string) *CreateRouteInput { - s.AuthorizerId = &v - return s -} - -// SetModelSelectionExpression sets the ModelSelectionExpression field's value. -func (s *CreateRouteInput) SetModelSelectionExpression(v string) *CreateRouteInput { - s.ModelSelectionExpression = &v - return s -} - -// SetOperationName sets the OperationName field's value. -func (s *CreateRouteInput) SetOperationName(v string) *CreateRouteInput { - s.OperationName = &v - return s -} - -// SetRequestModels sets the RequestModels field's value. -func (s *CreateRouteInput) SetRequestModels(v map[string]*string) *CreateRouteInput { - s.RequestModels = v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *CreateRouteInput) SetRequestParameters(v map[string]*ParameterConstraints) *CreateRouteInput { - s.RequestParameters = v - return s -} - -// SetRouteKey sets the RouteKey field's value. -func (s *CreateRouteInput) SetRouteKey(v string) *CreateRouteInput { - s.RouteKey = &v - return s -} - -// SetRouteResponseSelectionExpression sets the RouteResponseSelectionExpression field's value. -func (s *CreateRouteInput) SetRouteResponseSelectionExpression(v string) *CreateRouteInput { - s.RouteResponseSelectionExpression = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *CreateRouteInput) SetTarget(v string) *CreateRouteInput { - s.Target = &v - return s -} - -type CreateRouteOutput struct { - _ struct{} `type:"structure"` - - ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` - - // A list of authorization scopes configured on a route. The scopes are used - // with a COGNITO_USER_POOLS authorizer to authorize the method invocation. - // The authorization works by matching the route scopes against the scopes parsed - // from the access token in the incoming request. The method invocation is authorized - // if any route scope matches a claimed scope in the access token. Otherwise, - // the invocation is not authorized. When the route scope is configured, the - // client must provide an access token instead of an identity token for authorization - // purposes. - AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` - - // The authorization type. Valid values are NONE for open access, AWS_IAM for - // using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. - AuthorizationType *string `locationName:"authorizationType" type:"string" enum:"AuthorizationType"` - - // An API Gateway-generated, unique identifier. - AuthorizerId *string `locationName:"authorizerId" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` - - // A string with a length between [1-64]. - OperationName *string `locationName:"operationName" type:"string"` - - // The route models. - RequestModels map[string]*string `locationName:"requestModels" type:"map"` - - // The route parameters. - RequestParameters map[string]*ParameterConstraints `locationName:"requestParameters" type:"map"` - - // An API Gateway-generated, unique identifier. - RouteId *string `locationName:"routeId" type:"string"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - RouteKey *string `locationName:"routeKey" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - RouteResponseSelectionExpression *string `locationName:"routeResponseSelectionExpression" type:"string"` - - // A string with a length between [1-128]. - Target *string `locationName:"target" type:"string"` -} - -// String returns the string representation -func (s CreateRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRouteOutput) GoString() string { - return s.String() -} - -// SetApiKeyRequired sets the ApiKeyRequired field's value. -func (s *CreateRouteOutput) SetApiKeyRequired(v bool) *CreateRouteOutput { - s.ApiKeyRequired = &v - return s -} - -// SetAuthorizationScopes sets the AuthorizationScopes field's value. -func (s *CreateRouteOutput) SetAuthorizationScopes(v []*string) *CreateRouteOutput { - s.AuthorizationScopes = v - return s -} - -// SetAuthorizationType sets the AuthorizationType field's value. -func (s *CreateRouteOutput) SetAuthorizationType(v string) *CreateRouteOutput { - s.AuthorizationType = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *CreateRouteOutput) SetAuthorizerId(v string) *CreateRouteOutput { - s.AuthorizerId = &v - return s -} - -// SetModelSelectionExpression sets the ModelSelectionExpression field's value. -func (s *CreateRouteOutput) SetModelSelectionExpression(v string) *CreateRouteOutput { - s.ModelSelectionExpression = &v - return s -} - -// SetOperationName sets the OperationName field's value. -func (s *CreateRouteOutput) SetOperationName(v string) *CreateRouteOutput { - s.OperationName = &v - return s -} - -// SetRequestModels sets the RequestModels field's value. -func (s *CreateRouteOutput) SetRequestModels(v map[string]*string) *CreateRouteOutput { - s.RequestModels = v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *CreateRouteOutput) SetRequestParameters(v map[string]*ParameterConstraints) *CreateRouteOutput { - s.RequestParameters = v - return s -} - -// SetRouteId sets the RouteId field's value. -func (s *CreateRouteOutput) SetRouteId(v string) *CreateRouteOutput { - s.RouteId = &v - return s -} - -// SetRouteKey sets the RouteKey field's value. -func (s *CreateRouteOutput) SetRouteKey(v string) *CreateRouteOutput { - s.RouteKey = &v - return s -} - -// SetRouteResponseSelectionExpression sets the RouteResponseSelectionExpression field's value. -func (s *CreateRouteOutput) SetRouteResponseSelectionExpression(v string) *CreateRouteOutput { - s.RouteResponseSelectionExpression = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *CreateRouteOutput) SetTarget(v string) *CreateRouteOutput { - s.Target = &v - return s -} - -type CreateRouteResponseInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` - - // The route models. - ResponseModels map[string]*string `locationName:"responseModels" type:"map"` - - // The route parameters. - ResponseParameters map[string]*ParameterConstraints `locationName:"responseParameters" type:"map"` - - // RouteId is a required field - RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - // - // RouteResponseKey is a required field - RouteResponseKey *string `locationName:"routeResponseKey" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateRouteResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRouteResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRouteResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRouteResponseInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.RouteId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteId")) - } - if s.RouteId != nil && len(*s.RouteId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) - } - if s.RouteResponseKey == nil { - invalidParams.Add(request.NewErrParamRequired("RouteResponseKey")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *CreateRouteResponseInput) SetApiId(v string) *CreateRouteResponseInput { - s.ApiId = &v - return s -} - -// SetModelSelectionExpression sets the ModelSelectionExpression field's value. -func (s *CreateRouteResponseInput) SetModelSelectionExpression(v string) *CreateRouteResponseInput { - s.ModelSelectionExpression = &v - return s -} - -// SetResponseModels sets the ResponseModels field's value. -func (s *CreateRouteResponseInput) SetResponseModels(v map[string]*string) *CreateRouteResponseInput { - s.ResponseModels = v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *CreateRouteResponseInput) SetResponseParameters(v map[string]*ParameterConstraints) *CreateRouteResponseInput { - s.ResponseParameters = v - return s -} - -// SetRouteId sets the RouteId field's value. -func (s *CreateRouteResponseInput) SetRouteId(v string) *CreateRouteResponseInput { - s.RouteId = &v - return s -} - -// SetRouteResponseKey sets the RouteResponseKey field's value. -func (s *CreateRouteResponseInput) SetRouteResponseKey(v string) *CreateRouteResponseInput { - s.RouteResponseKey = &v - return s -} - -type CreateRouteResponseOutput struct { - _ struct{} `type:"structure"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` - - // The route models. - ResponseModels map[string]*string `locationName:"responseModels" type:"map"` - - // The route parameters. - ResponseParameters map[string]*ParameterConstraints `locationName:"responseParameters" type:"map"` - - // An API Gateway-generated, unique identifier. - RouteResponseId *string `locationName:"routeResponseId" type:"string"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - RouteResponseKey *string `locationName:"routeResponseKey" type:"string"` -} - -// String returns the string representation -func (s CreateRouteResponseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRouteResponseOutput) GoString() string { - return s.String() -} - -// SetModelSelectionExpression sets the ModelSelectionExpression field's value. -func (s *CreateRouteResponseOutput) SetModelSelectionExpression(v string) *CreateRouteResponseOutput { - s.ModelSelectionExpression = &v - return s -} - -// SetResponseModels sets the ResponseModels field's value. -func (s *CreateRouteResponseOutput) SetResponseModels(v map[string]*string) *CreateRouteResponseOutput { - s.ResponseModels = v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *CreateRouteResponseOutput) SetResponseParameters(v map[string]*ParameterConstraints) *CreateRouteResponseOutput { - s.ResponseParameters = v - return s -} - -// SetRouteResponseId sets the RouteResponseId field's value. -func (s *CreateRouteResponseOutput) SetRouteResponseId(v string) *CreateRouteResponseOutput { - s.RouteResponseId = &v - return s -} - -// SetRouteResponseKey sets the RouteResponseKey field's value. -func (s *CreateRouteResponseOutput) SetRouteResponseKey(v string) *CreateRouteResponseOutput { - s.RouteResponseKey = &v - return s -} - -type CreateStageInput struct { - _ struct{} `type:"structure"` - - // Settings for logging access in a stage. - AccessLogSettings *AccessLogSettings `locationName:"accessLogSettings" type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // An API Gateway-generated, unique identifier. - ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` - - // Represents a collection of route settings. - DefaultRouteSettings *RouteSettings `locationName:"defaultRouteSettings" type:"structure"` - - // An API Gateway-generated, unique identifier. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - // The route settings map. - RouteSettings map[string]*RouteSettings `locationName:"routeSettings" type:"map"` - - // A string with a length between [1-128]. - // - // StageName is a required field - StageName *string `locationName:"stageName" type:"string" required:"true"` - - // The stage variable map. - StageVariables map[string]*string `locationName:"stageVariables" type:"map"` -} - -// String returns the string representation -func (s CreateStageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStageInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessLogSettings sets the AccessLogSettings field's value. -func (s *CreateStageInput) SetAccessLogSettings(v *AccessLogSettings) *CreateStageInput { - s.AccessLogSettings = v - return s -} - -// SetApiId sets the ApiId field's value. -func (s *CreateStageInput) SetApiId(v string) *CreateStageInput { - s.ApiId = &v - return s -} - -// SetClientCertificateId sets the ClientCertificateId field's value. -func (s *CreateStageInput) SetClientCertificateId(v string) *CreateStageInput { - s.ClientCertificateId = &v - return s -} - -// SetDefaultRouteSettings sets the DefaultRouteSettings field's value. -func (s *CreateStageInput) SetDefaultRouteSettings(v *RouteSettings) *CreateStageInput { - s.DefaultRouteSettings = v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *CreateStageInput) SetDeploymentId(v string) *CreateStageInput { - s.DeploymentId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateStageInput) SetDescription(v string) *CreateStageInput { - s.Description = &v - return s -} - -// SetRouteSettings sets the RouteSettings field's value. -func (s *CreateStageInput) SetRouteSettings(v map[string]*RouteSettings) *CreateStageInput { - s.RouteSettings = v - return s -} - -// SetStageName sets the StageName field's value. -func (s *CreateStageInput) SetStageName(v string) *CreateStageInput { - s.StageName = &v - return s -} - -// SetStageVariables sets the StageVariables field's value. -func (s *CreateStageInput) SetStageVariables(v map[string]*string) *CreateStageInput { - s.StageVariables = v - return s -} - -type CreateStageOutput struct { - _ struct{} `type:"structure"` - - // Settings for logging access in a stage. - AccessLogSettings *AccessLogSettings `locationName:"accessLogSettings" type:"structure"` - - // An API Gateway-generated, unique identifier. - ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` - - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` - - // Represents a collection of route settings. - DefaultRouteSettings *RouteSettings `locationName:"defaultRouteSettings" type:"structure"` - - // An API Gateway-generated, unique identifier. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"iso8601"` - - // The route settings map. - RouteSettings map[string]*RouteSettings `locationName:"routeSettings" type:"map"` - - // A string with a length between [1-128]. - StageName *string `locationName:"stageName" type:"string"` - - // The stage variable map. - StageVariables map[string]*string `locationName:"stageVariables" type:"map"` -} - -// String returns the string representation -func (s CreateStageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStageOutput) GoString() string { - return s.String() -} - -// SetAccessLogSettings sets the AccessLogSettings field's value. -func (s *CreateStageOutput) SetAccessLogSettings(v *AccessLogSettings) *CreateStageOutput { - s.AccessLogSettings = v - return s -} - -// SetClientCertificateId sets the ClientCertificateId field's value. -func (s *CreateStageOutput) SetClientCertificateId(v string) *CreateStageOutput { - s.ClientCertificateId = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *CreateStageOutput) SetCreatedDate(v time.Time) *CreateStageOutput { - s.CreatedDate = &v - return s -} - -// SetDefaultRouteSettings sets the DefaultRouteSettings field's value. -func (s *CreateStageOutput) SetDefaultRouteSettings(v *RouteSettings) *CreateStageOutput { - s.DefaultRouteSettings = v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *CreateStageOutput) SetDeploymentId(v string) *CreateStageOutput { - s.DeploymentId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateStageOutput) SetDescription(v string) *CreateStageOutput { - s.Description = &v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *CreateStageOutput) SetLastUpdatedDate(v time.Time) *CreateStageOutput { - s.LastUpdatedDate = &v - return s -} - -// SetRouteSettings sets the RouteSettings field's value. -func (s *CreateStageOutput) SetRouteSettings(v map[string]*RouteSettings) *CreateStageOutput { - s.RouteSettings = v - return s -} - -// SetStageName sets the StageName field's value. -func (s *CreateStageOutput) SetStageName(v string) *CreateStageOutput { - s.StageName = &v - return s -} - -// SetStageVariables sets the StageVariables field's value. -func (s *CreateStageOutput) SetStageVariables(v map[string]*string) *CreateStageOutput { - s.StageVariables = v - return s -} - -type DeleteApiInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteApiInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApiInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApiInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteApiInput) SetApiId(v string) *DeleteApiInput { - s.ApiId = &v - return s -} - -type DeleteApiMappingInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"querystring" locationName:"apiId" type:"string" required:"true"` - - // ApiMappingId is a required field - ApiMappingId *string `location:"uri" locationName:"apiMappingId" type:"string" required:"true"` - - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteApiMappingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApiMappingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApiMappingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApiMappingInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiMappingId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiMappingId")) - } - if s.ApiMappingId != nil && len(*s.ApiMappingId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiMappingId", 1)) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteApiMappingInput) SetApiId(v string) *DeleteApiMappingInput { - s.ApiId = &v - return s -} - -// SetApiMappingId sets the ApiMappingId field's value. -func (s *DeleteApiMappingInput) SetApiMappingId(v string) *DeleteApiMappingInput { - s.ApiMappingId = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteApiMappingInput) SetDomainName(v string) *DeleteApiMappingInput { - s.DomainName = &v - return s -} - -type DeleteApiMappingOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteApiMappingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApiMappingOutput) GoString() string { - return s.String() -} - -type DeleteApiOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteApiOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApiOutput) GoString() string { - return s.String() -} - -type DeleteAuthorizerInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // AuthorizerId is a required field - AuthorizerId *string `location:"uri" locationName:"authorizerId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAuthorizerInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.AuthorizerId == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) - } - if s.AuthorizerId != nil && len(*s.AuthorizerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizerId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteAuthorizerInput) SetApiId(v string) *DeleteAuthorizerInput { - s.ApiId = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *DeleteAuthorizerInput) SetAuthorizerId(v string) *DeleteAuthorizerInput { - s.AuthorizerId = &v - return s -} - -type DeleteAuthorizerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAuthorizerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAuthorizerOutput) GoString() string { - return s.String() -} - -type DeleteDeploymentInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // DeploymentId is a required field - DeploymentId *string `location:"uri" locationName:"deploymentId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDeploymentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDeploymentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDeploymentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDeploymentInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.DeploymentId == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentId")) - } - if s.DeploymentId != nil && len(*s.DeploymentId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeploymentId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteDeploymentInput) SetApiId(v string) *DeleteDeploymentInput { - s.ApiId = &v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *DeleteDeploymentInput) SetDeploymentId(v string) *DeleteDeploymentInput { - s.DeploymentId = &v - return s -} - -type DeleteDeploymentOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDeploymentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDeploymentOutput) GoString() string { - return s.String() -} - -type DeleteDomainNameInput struct { - _ struct{} `type:"structure"` - - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDomainNameInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDomainNameInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDomainNameInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDomainNameInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteDomainNameInput) SetDomainName(v string) *DeleteDomainNameInput { - s.DomainName = &v - return s -} - -type DeleteDomainNameOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDomainNameOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDomainNameOutput) GoString() string { - return s.String() -} - -type DeleteIntegrationInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // IntegrationId is a required field - IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteIntegrationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIntegrationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIntegrationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIntegrationInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.IntegrationId == nil { - invalidParams.Add(request.NewErrParamRequired("IntegrationId")) - } - if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteIntegrationInput) SetApiId(v string) *DeleteIntegrationInput { - s.ApiId = &v - return s -} - -// SetIntegrationId sets the IntegrationId field's value. -func (s *DeleteIntegrationInput) SetIntegrationId(v string) *DeleteIntegrationInput { - s.IntegrationId = &v - return s -} - -type DeleteIntegrationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteIntegrationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIntegrationOutput) GoString() string { - return s.String() -} - -type DeleteIntegrationResponseInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // IntegrationId is a required field - IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` - - // IntegrationResponseId is a required field - IntegrationResponseId *string `location:"uri" locationName:"integrationResponseId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteIntegrationResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIntegrationResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIntegrationResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIntegrationResponseInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.IntegrationId == nil { - invalidParams.Add(request.NewErrParamRequired("IntegrationId")) - } - if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) - } - if s.IntegrationResponseId == nil { - invalidParams.Add(request.NewErrParamRequired("IntegrationResponseId")) - } - if s.IntegrationResponseId != nil && len(*s.IntegrationResponseId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IntegrationResponseId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteIntegrationResponseInput) SetApiId(v string) *DeleteIntegrationResponseInput { - s.ApiId = &v - return s -} - -// SetIntegrationId sets the IntegrationId field's value. -func (s *DeleteIntegrationResponseInput) SetIntegrationId(v string) *DeleteIntegrationResponseInput { - s.IntegrationId = &v - return s -} - -// SetIntegrationResponseId sets the IntegrationResponseId field's value. -func (s *DeleteIntegrationResponseInput) SetIntegrationResponseId(v string) *DeleteIntegrationResponseInput { - s.IntegrationResponseId = &v - return s -} - -type DeleteIntegrationResponseOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteIntegrationResponseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIntegrationResponseOutput) GoString() string { - return s.String() -} - -type DeleteModelInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // ModelId is a required field - ModelId *string `location:"uri" locationName:"modelId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteModelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteModelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteModelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteModelInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.ModelId == nil { - invalidParams.Add(request.NewErrParamRequired("ModelId")) - } - if s.ModelId != nil && len(*s.ModelId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ModelId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteModelInput) SetApiId(v string) *DeleteModelInput { - s.ApiId = &v - return s -} - -// SetModelId sets the ModelId field's value. -func (s *DeleteModelInput) SetModelId(v string) *DeleteModelInput { - s.ModelId = &v - return s -} - -type DeleteModelOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteModelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteModelOutput) GoString() string { - return s.String() -} - -type DeleteRouteInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // RouteId is a required field - RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRouteInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.RouteId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteId")) - } - if s.RouteId != nil && len(*s.RouteId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteRouteInput) SetApiId(v string) *DeleteRouteInput { - s.ApiId = &v - return s -} - -// SetRouteId sets the RouteId field's value. -func (s *DeleteRouteInput) SetRouteId(v string) *DeleteRouteInput { - s.RouteId = &v - return s -} - -type DeleteRouteOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRouteOutput) GoString() string { - return s.String() -} - -type DeleteRouteResponseInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // RouteId is a required field - RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` - - // RouteResponseId is a required field - RouteResponseId *string `location:"uri" locationName:"routeResponseId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRouteResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRouteResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRouteResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRouteResponseInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.RouteId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteId")) - } - if s.RouteId != nil && len(*s.RouteId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) - } - if s.RouteResponseId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteResponseId")) - } - if s.RouteResponseId != nil && len(*s.RouteResponseId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteResponseId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteRouteResponseInput) SetApiId(v string) *DeleteRouteResponseInput { - s.ApiId = &v - return s -} - -// SetRouteId sets the RouteId field's value. -func (s *DeleteRouteResponseInput) SetRouteId(v string) *DeleteRouteResponseInput { - s.RouteId = &v - return s -} - -// SetRouteResponseId sets the RouteResponseId field's value. -func (s *DeleteRouteResponseInput) SetRouteResponseId(v string) *DeleteRouteResponseInput { - s.RouteResponseId = &v - return s -} - -type DeleteRouteResponseOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRouteResponseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRouteResponseOutput) GoString() string { - return s.String() -} - -type DeleteStageInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // StageName is a required field - StageName *string `location:"uri" locationName:"stageName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteStageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteStageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteStageInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteStageInput) SetApiId(v string) *DeleteStageInput { - s.ApiId = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *DeleteStageInput) SetStageName(v string) *DeleteStageInput { - s.StageName = &v - return s -} - -type DeleteStageOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteStageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStageOutput) GoString() string { - return s.String() -} - -// An immutable representation of an API that can be called by users. A Deployment -// must be associated with a Stage for it to be callable over the internet. -type Deployment struct { - _ struct{} `type:"structure"` - - // The date and time when the Deployment resource was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` - - // The identifier for the deployment. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // The status of the deployment: PENDING, FAILED, or SUCCEEDED. - DeploymentStatus *string `locationName:"deploymentStatus" type:"string" enum:"DeploymentStatus"` - - // May contain additional feedback on the status of an API deployment. - DeploymentStatusMessage *string `locationName:"deploymentStatusMessage" type:"string"` - - // The description for the deployment. - Description *string `locationName:"description" 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() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *Deployment) SetCreatedDate(v time.Time) *Deployment { - s.CreatedDate = &v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *Deployment) SetDeploymentId(v string) *Deployment { - s.DeploymentId = &v - return s -} - -// SetDeploymentStatus sets the DeploymentStatus field's value. -func (s *Deployment) SetDeploymentStatus(v string) *Deployment { - s.DeploymentStatus = &v - return s -} - -// SetDeploymentStatusMessage sets the DeploymentStatusMessage field's value. -func (s *Deployment) SetDeploymentStatusMessage(v string) *Deployment { - s.DeploymentStatusMessage = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Deployment) SetDescription(v string) *Deployment { - s.Description = &v - return s -} - -// Represents a domain name. -type DomainName struct { - _ struct{} `type:"structure"` - - // The API mapping selection expression. - ApiMappingSelectionExpression *string `locationName:"apiMappingSelectionExpression" type:"string"` - - // The name of the DomainName resource. - // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` - - // The domain name configurations. - DomainNameConfigurations []*DomainNameConfiguration `locationName:"domainNameConfigurations" type:"list"` -} - -// String returns the string representation -func (s DomainName) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainName) GoString() string { - return s.String() -} - -// SetApiMappingSelectionExpression sets the ApiMappingSelectionExpression field's value. -func (s *DomainName) SetApiMappingSelectionExpression(v string) *DomainName { - s.ApiMappingSelectionExpression = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DomainName) SetDomainName(v string) *DomainName { - s.DomainName = &v - return s -} - -// SetDomainNameConfigurations sets the DomainNameConfigurations field's value. -func (s *DomainName) SetDomainNameConfigurations(v []*DomainNameConfiguration) *DomainName { - s.DomainNameConfigurations = v - return s -} - -// The domain name configuration. -type DomainNameConfiguration struct { - _ struct{} `type:"structure"` - - // A domain name for the WebSocket API. - ApiGatewayDomainName *string `locationName:"apiGatewayDomainName" type:"string"` - - // An AWS-managed certificate that will be used by the edge-optimized endpoint - // for this domain name. AWS Certificate Manager is the only supported source. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // The user-friendly name of the certificate that will be used by the edge-optimized - // endpoint for this domain name. - CertificateName *string `locationName:"certificateName" type:"string"` - - // The timestamp when the certificate that was used by edge-optimized endpoint - // for this domain name was uploaded. - CertificateUploadDate *time.Time `locationName:"certificateUploadDate" type:"timestamp" timestampFormat:"iso8601"` - - // The endpoint type. - EndpointType *string `locationName:"endpointType" type:"string" enum:"EndpointType"` - - // The Amazon Route 53 Hosted Zone ID of the endpoint. See AWS Regions and Endpoints - // for API Gateway (docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region). - HostedZoneId *string `locationName:"hostedZoneId" type:"string"` -} - -// String returns the string representation -func (s DomainNameConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainNameConfiguration) GoString() string { - return s.String() -} - -// SetApiGatewayDomainName sets the ApiGatewayDomainName field's value. -func (s *DomainNameConfiguration) SetApiGatewayDomainName(v string) *DomainNameConfiguration { - s.ApiGatewayDomainName = &v - return s -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *DomainNameConfiguration) SetCertificateArn(v string) *DomainNameConfiguration { - s.CertificateArn = &v - return s -} - -// SetCertificateName sets the CertificateName field's value. -func (s *DomainNameConfiguration) SetCertificateName(v string) *DomainNameConfiguration { - s.CertificateName = &v - return s -} - -// SetCertificateUploadDate sets the CertificateUploadDate field's value. -func (s *DomainNameConfiguration) SetCertificateUploadDate(v time.Time) *DomainNameConfiguration { - s.CertificateUploadDate = &v - return s -} - -// SetEndpointType sets the EndpointType field's value. -func (s *DomainNameConfiguration) SetEndpointType(v string) *DomainNameConfiguration { - s.EndpointType = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *DomainNameConfiguration) SetHostedZoneId(v string) *DomainNameConfiguration { - s.HostedZoneId = &v - return s -} - -type GetApiInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetApiInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApiInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetApiInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetApiInput) SetApiId(v string) *GetApiInput { - s.ApiId = &v - return s -} - -type GetApiMappingInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"querystring" locationName:"apiId" type:"string" required:"true"` - - // ApiMappingId is a required field - ApiMappingId *string `location:"uri" locationName:"apiMappingId" type:"string" required:"true"` - - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetApiMappingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApiMappingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetApiMappingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetApiMappingInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiMappingId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiMappingId")) - } - if s.ApiMappingId != nil && len(*s.ApiMappingId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiMappingId", 1)) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetApiMappingInput) SetApiId(v string) *GetApiMappingInput { - s.ApiId = &v - return s -} - -// SetApiMappingId sets the ApiMappingId field's value. -func (s *GetApiMappingInput) SetApiMappingId(v string) *GetApiMappingInput { - s.ApiMappingId = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *GetApiMappingInput) SetDomainName(v string) *GetApiMappingInput { - s.DomainName = &v - return s -} - -type GetApiMappingOutput struct { - _ struct{} `type:"structure"` - - // An API Gateway-generated, unique identifier. - ApiId *string `locationName:"apiId" type:"string"` - - // An API Gateway-generated, unique identifier. - ApiMappingId *string `locationName:"apiMappingId" type:"string"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - ApiMappingKey *string `locationName:"apiMappingKey" type:"string"` - - // A string with a length between [1-128]. - Stage *string `locationName:"stage" type:"string"` -} - -// String returns the string representation -func (s GetApiMappingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApiMappingOutput) GoString() string { - return s.String() -} - -// SetApiId sets the ApiId field's value. -func (s *GetApiMappingOutput) SetApiId(v string) *GetApiMappingOutput { - s.ApiId = &v - return s -} - -// SetApiMappingId sets the ApiMappingId field's value. -func (s *GetApiMappingOutput) SetApiMappingId(v string) *GetApiMappingOutput { - s.ApiMappingId = &v - return s -} - -// SetApiMappingKey sets the ApiMappingKey field's value. -func (s *GetApiMappingOutput) SetApiMappingKey(v string) *GetApiMappingOutput { - s.ApiMappingKey = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *GetApiMappingOutput) SetStage(v string) *GetApiMappingOutput { - s.Stage = &v - return s -} - -type GetApiMappingsInput struct { - _ struct{} `type:"structure"` - - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domainName" 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 GetApiMappingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApiMappingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetApiMappingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetApiMappingsInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *GetApiMappingsInput) SetDomainName(v string) *GetApiMappingsInput { - s.DomainName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetApiMappingsInput) SetMaxResults(v string) *GetApiMappingsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetApiMappingsInput) SetNextToken(v string) *GetApiMappingsInput { - s.NextToken = &v - return s -} - -type GetApiMappingsOutput struct { - _ struct{} `type:"structure"` - - // An API Gateway-generated, unique identifier. - ApiId *string `locationName:"apiId" type:"string"` - - // An API Gateway-generated, unique identifier. - ApiMappingId *string `locationName:"apiMappingId" type:"string"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - ApiMappingKey *string `locationName:"apiMappingKey" type:"string"` - - // A string with a length between [1-128]. - Stage *string `locationName:"stage" type:"string"` -} - -// String returns the string representation -func (s GetApiMappingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApiMappingsOutput) GoString() string { - return s.String() -} - -// SetApiId sets the ApiId field's value. -func (s *GetApiMappingsOutput) SetApiId(v string) *GetApiMappingsOutput { - s.ApiId = &v - return s -} - -// SetApiMappingId sets the ApiMappingId field's value. -func (s *GetApiMappingsOutput) SetApiMappingId(v string) *GetApiMappingsOutput { - s.ApiMappingId = &v - return s -} - -// SetApiMappingKey sets the ApiMappingKey field's value. -func (s *GetApiMappingsOutput) SetApiMappingKey(v string) *GetApiMappingsOutput { - s.ApiMappingKey = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *GetApiMappingsOutput) SetStage(v string) *GetApiMappingsOutput { - s.Stage = &v - return s -} - -type GetApiOutput struct { - _ struct{} `type:"structure"` - - ApiEndpoint *string `locationName:"apiEndpoint" type:"string"` - - // An API Gateway-generated, unique identifier. - ApiId *string `locationName:"apiId" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ApiKeySelectionExpression *string `locationName:"apiKeySelectionExpression" type:"string"` - - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - DisableSchemaValidation *bool `locationName:"disableSchemaValidation" type:"boolean"` - - // A string with a length between [1-128]. - Name *string `locationName:"name" type:"string"` - - ProtocolType *string `locationName:"protocolType" type:"string" enum:"ProtocolType"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - RouteSelectionExpression *string `locationName:"routeSelectionExpression" type:"string"` - - // A string with a length between [1-64]. - Version *string `locationName:"version" type:"string"` - - Warnings []*string `locationName:"warnings" type:"list"` -} - -// String returns the string representation -func (s GetApiOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApiOutput) GoString() string { - return s.String() -} - -// SetApiEndpoint sets the ApiEndpoint field's value. -func (s *GetApiOutput) SetApiEndpoint(v string) *GetApiOutput { - s.ApiEndpoint = &v - return s -} - -// SetApiId sets the ApiId field's value. -func (s *GetApiOutput) SetApiId(v string) *GetApiOutput { - s.ApiId = &v - return s -} - -// SetApiKeySelectionExpression sets the ApiKeySelectionExpression field's value. -func (s *GetApiOutput) SetApiKeySelectionExpression(v string) *GetApiOutput { - s.ApiKeySelectionExpression = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *GetApiOutput) SetCreatedDate(v time.Time) *GetApiOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetApiOutput) SetDescription(v string) *GetApiOutput { - s.Description = &v - return s -} - -// SetDisableSchemaValidation sets the DisableSchemaValidation field's value. -func (s *GetApiOutput) SetDisableSchemaValidation(v bool) *GetApiOutput { - s.DisableSchemaValidation = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetApiOutput) SetName(v string) *GetApiOutput { - s.Name = &v - return s -} - -// SetProtocolType sets the ProtocolType field's value. -func (s *GetApiOutput) SetProtocolType(v string) *GetApiOutput { - s.ProtocolType = &v - return s -} - -// SetRouteSelectionExpression sets the RouteSelectionExpression field's value. -func (s *GetApiOutput) SetRouteSelectionExpression(v string) *GetApiOutput { - s.RouteSelectionExpression = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetApiOutput) SetVersion(v string) *GetApiOutput { - s.Version = &v - return s -} - -// SetWarnings sets the Warnings field's value. -func (s *GetApiOutput) SetWarnings(v []*string) *GetApiOutput { - s.Warnings = v - return s -} - -type GetApisInput 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 GetApisInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApisInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetApisInput) SetMaxResults(v string) *GetApisInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetApisInput) SetNextToken(v string) *GetApisInput { - s.NextToken = &v - return s -} - -type GetApisOutput struct { - _ struct{} `type:"structure"` - - Items []*Api `locationName:"items" type:"list"` - - // The next page of elements from this collection. Not valid for the last element - // of the collection. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetApisOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApisOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetApisOutput) SetItems(v []*Api) *GetApisOutput { - s.Items = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetApisOutput) SetNextToken(v string) *GetApisOutput { - s.NextToken = &v - return s -} - -type GetAuthorizerInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // AuthorizerId is a required field - AuthorizerId *string `location:"uri" locationName:"authorizerId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAuthorizerInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.AuthorizerId == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) - } - if s.AuthorizerId != nil && len(*s.AuthorizerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizerId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetAuthorizerInput) SetApiId(v string) *GetAuthorizerInput { - s.ApiId = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *GetAuthorizerInput) SetAuthorizerId(v string) *GetAuthorizerInput { - s.AuthorizerId = &v - return s -} - -type GetAuthorizerOutput struct { - _ struct{} `type:"structure"` - - // Represents an Amazon Resource Name (ARN). - AuthorizerCredentialsArn *string `locationName:"authorizerCredentialsArn" type:"string"` - - // An API Gateway-generated, unique identifier. - AuthorizerId *string `locationName:"authorizerId" type:"string"` - - // An integer with a value between [0-3600]. - AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` - - // The authorizer type. Currently the only valid value is REQUEST, for a Lambda - // function using incoming request parameters. - AuthorizerType *string `locationName:"authorizerType" type:"string" enum:"AuthorizerType"` - - // A string representation of a URI with a length between [1-2048]. - AuthorizerUri *string `locationName:"authorizerUri" type:"string"` - - // The identity source for which authorization is requested. - // - // For the REQUEST authorizer, this is required when authorization caching is - // enabled. The value is a comma-separated string of one or more mapping expressions - // of the specified request parameters. For example, if an Auth header, a Name - // query string parameter are defined as identity sources, this value is $method.request.header.Auth, - // $method.request.querystring.Name. These parameters will be used to derive - // the authorization caching key and to perform runtime validation of the REQUEST - // authorizer by verifying all of the identity-related request parameters are - // present, not null and non-empty. Only when this is true does the authorizer - // invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized - // response without calling the Lambda function. The valid value is a string - // of comma-separated mapping expressions of the specified request parameters. - // When the authorization caching is not enabled, this property is optional. - IdentitySource []*string `locationName:"identitySource" type:"list"` - - // A string with a length between [0-1024]. - IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` - - // A string with a length between [1-128]. - Name *string `locationName:"name" type:"string"` - - // For REQUEST authorizer, this is not defined. - ProviderArns []*string `locationName:"providerArns" type:"list"` -} - -// String returns the string representation -func (s GetAuthorizerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAuthorizerOutput) GoString() string { - return s.String() -} - -// SetAuthorizerCredentialsArn sets the AuthorizerCredentialsArn field's value. -func (s *GetAuthorizerOutput) SetAuthorizerCredentialsArn(v string) *GetAuthorizerOutput { - s.AuthorizerCredentialsArn = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *GetAuthorizerOutput) SetAuthorizerId(v string) *GetAuthorizerOutput { - s.AuthorizerId = &v - return s -} - -// SetAuthorizerResultTtlInSeconds sets the AuthorizerResultTtlInSeconds field's value. -func (s *GetAuthorizerOutput) SetAuthorizerResultTtlInSeconds(v int64) *GetAuthorizerOutput { - s.AuthorizerResultTtlInSeconds = &v - return s -} - -// SetAuthorizerType sets the AuthorizerType field's value. -func (s *GetAuthorizerOutput) SetAuthorizerType(v string) *GetAuthorizerOutput { - s.AuthorizerType = &v - return s -} - -// SetAuthorizerUri sets the AuthorizerUri field's value. -func (s *GetAuthorizerOutput) SetAuthorizerUri(v string) *GetAuthorizerOutput { - s.AuthorizerUri = &v - return s -} - -// SetIdentitySource sets the IdentitySource field's value. -func (s *GetAuthorizerOutput) SetIdentitySource(v []*string) *GetAuthorizerOutput { - s.IdentitySource = v - return s -} - -// SetIdentityValidationExpression sets the IdentityValidationExpression field's value. -func (s *GetAuthorizerOutput) SetIdentityValidationExpression(v string) *GetAuthorizerOutput { - s.IdentityValidationExpression = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetAuthorizerOutput) SetName(v string) *GetAuthorizerOutput { - s.Name = &v - return s -} - -// SetProviderArns sets the ProviderArns field's value. -func (s *GetAuthorizerOutput) SetProviderArns(v []*string) *GetAuthorizerOutput { - s.ProviderArns = v - return s -} - -type GetAuthorizersInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" 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 GetAuthorizersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAuthorizersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAuthorizersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAuthorizersInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetAuthorizersInput) SetApiId(v string) *GetAuthorizersInput { - s.ApiId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetAuthorizersInput) SetMaxResults(v string) *GetAuthorizersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetAuthorizersInput) SetNextToken(v string) *GetAuthorizersInput { - s.NextToken = &v - return s -} - -type GetAuthorizersOutput struct { - _ struct{} `type:"structure"` - - Items []*Authorizer `locationName:"items" type:"list"` - - // The next page of elements from this collection. Not valid for the last element - // of the collection. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetAuthorizersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAuthorizersOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetAuthorizersOutput) SetItems(v []*Authorizer) *GetAuthorizersOutput { - s.Items = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetAuthorizersOutput) SetNextToken(v string) *GetAuthorizersOutput { - s.NextToken = &v - return s -} - -type GetDeploymentInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // DeploymentId is a required field - DeploymentId *string `location:"uri" locationName:"deploymentId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDeploymentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeploymentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeploymentInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.DeploymentId == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentId")) - } - if s.DeploymentId != nil && len(*s.DeploymentId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeploymentId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetDeploymentInput) SetApiId(v string) *GetDeploymentInput { - s.ApiId = &v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *GetDeploymentInput) SetDeploymentId(v string) *GetDeploymentInput { - s.DeploymentId = &v - return s -} - -type GetDeploymentOutput struct { - _ struct{} `type:"structure"` - - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` - - // An API Gateway-generated, unique identifier. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // Represents a deployment status. - DeploymentStatus *string `locationName:"deploymentStatus" type:"string" enum:"DeploymentStatus"` - - DeploymentStatusMessage *string `locationName:"deploymentStatusMessage" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` -} - -// String returns the string representation -func (s GetDeploymentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentOutput) GoString() string { - return s.String() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *GetDeploymentOutput) SetCreatedDate(v time.Time) *GetDeploymentOutput { - s.CreatedDate = &v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *GetDeploymentOutput) SetDeploymentId(v string) *GetDeploymentOutput { - s.DeploymentId = &v - return s -} - -// SetDeploymentStatus sets the DeploymentStatus field's value. -func (s *GetDeploymentOutput) SetDeploymentStatus(v string) *GetDeploymentOutput { - s.DeploymentStatus = &v - return s -} - -// SetDeploymentStatusMessage sets the DeploymentStatusMessage field's value. -func (s *GetDeploymentOutput) SetDeploymentStatusMessage(v string) *GetDeploymentOutput { - s.DeploymentStatusMessage = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetDeploymentOutput) SetDescription(v string) *GetDeploymentOutput { - s.Description = &v - return s -} - -type GetDeploymentsInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" 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 GetDeploymentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeploymentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeploymentsInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetDeploymentsInput) SetApiId(v string) *GetDeploymentsInput { - s.ApiId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetDeploymentsInput) SetMaxResults(v string) *GetDeploymentsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetDeploymentsInput) SetNextToken(v string) *GetDeploymentsInput { - s.NextToken = &v - return s -} - -type GetDeploymentsOutput struct { - _ struct{} `type:"structure"` - - Items []*Deployment `locationName:"items" type:"list"` - - // The next page of elements from this collection. Not valid for the last element - // of the collection. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetDeploymentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentsOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetDeploymentsOutput) SetItems(v []*Deployment) *GetDeploymentsOutput { - s.Items = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetDeploymentsOutput) SetNextToken(v string) *GetDeploymentsOutput { - s.NextToken = &v - return s -} - -type GetDomainNameInput struct { - _ struct{} `type:"structure"` - - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDomainNameInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDomainNameInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDomainNameInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDomainNameInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *GetDomainNameInput) SetDomainName(v string) *GetDomainNameInput { - s.DomainName = &v - return s -} - -type GetDomainNameOutput struct { - _ struct{} `type:"structure"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ApiMappingSelectionExpression *string `locationName:"apiMappingSelectionExpression" type:"string"` - - // A string with a length between [1-512]. - DomainName *string `locationName:"domainName" type:"string"` - - // The domain name configurations. - DomainNameConfigurations []*DomainNameConfiguration `locationName:"domainNameConfigurations" type:"list"` -} - -// String returns the string representation -func (s GetDomainNameOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDomainNameOutput) GoString() string { - return s.String() -} - -// SetApiMappingSelectionExpression sets the ApiMappingSelectionExpression field's value. -func (s *GetDomainNameOutput) SetApiMappingSelectionExpression(v string) *GetDomainNameOutput { - s.ApiMappingSelectionExpression = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *GetDomainNameOutput) SetDomainName(v string) *GetDomainNameOutput { - s.DomainName = &v - return s -} - -// SetDomainNameConfigurations sets the DomainNameConfigurations field's value. -func (s *GetDomainNameOutput) SetDomainNameConfigurations(v []*DomainNameConfiguration) *GetDomainNameOutput { - s.DomainNameConfigurations = v - return s -} - -type GetDomainNamesInput 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 GetDomainNamesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDomainNamesInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetDomainNamesInput) SetMaxResults(v string) *GetDomainNamesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetDomainNamesInput) SetNextToken(v string) *GetDomainNamesInput { - s.NextToken = &v - return s -} - -type GetDomainNamesOutput struct { - _ struct{} `type:"structure"` - - Items []*DomainName `locationName:"items" type:"list"` - - // The next page of elements from this collection. Not valid for the last element - // of the collection. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetDomainNamesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDomainNamesOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetDomainNamesOutput) SetItems(v []*DomainName) *GetDomainNamesOutput { - s.Items = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetDomainNamesOutput) SetNextToken(v string) *GetDomainNamesOutput { - s.NextToken = &v - return s -} - -type GetIntegrationInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // IntegrationId is a required field - IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetIntegrationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntegrationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIntegrationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIntegrationInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.IntegrationId == nil { - invalidParams.Add(request.NewErrParamRequired("IntegrationId")) - } - if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetIntegrationInput) SetApiId(v string) *GetIntegrationInput { - s.ApiId = &v - return s -} - -// SetIntegrationId sets the IntegrationId field's value. -func (s *GetIntegrationInput) SetIntegrationId(v string) *GetIntegrationInput { - s.IntegrationId = &v - return s -} - -type GetIntegrationOutput struct { - _ struct{} `type:"structure"` - - // A string with a length between [1-1024]. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // Represents a connection type. - ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` - - // Specifies how to handle response payload content type conversions. - ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` - - // Represents an Amazon Resource Name (ARN). - CredentialsArn *string `locationName:"credentialsArn" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - // An API Gateway-generated, unique identifier. - IntegrationId *string `locationName:"integrationId" type:"string"` - - // A string with a length between [1-64]. - IntegrationMethod *string `locationName:"integrationMethod" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - IntegrationResponseSelectionExpression *string `locationName:"integrationResponseSelectionExpression" type:"string"` - - // Represents an API method integration type. - IntegrationType *string `locationName:"integrationType" type:"string" enum:"IntegrationType"` - - // A string representation of a URI with a length between [1-2048]. - IntegrationUri *string `locationName:"integrationUri" type:"string"` - - // Represents passthrough behavior for an integration response. - PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string" enum:"PassthroughBehavior"` - - // A key-value map specifying response parameters that are passed to the method - // response from the backend. The key is a method response header parameter - // name and the mapped value is an integration response header value, a static - // value enclosed within a pair of single quotes, or a JSON expression from - // the integration response body. The mapping key must match the pattern of - // method.response.header.{name}, where name is a valid and unique header name. - // The mapped non-static value must match the pattern of integration.response.header.{name} - // or integration.response.body.{JSON-expression}, where name is a valid and - // unique response header name and JSON-expression is a valid JSON expression - // without the $ prefix. - RequestParameters map[string]*string `locationName:"requestParameters" type:"map"` - - // A mapping of identifier keys to templates. The value is an actual template - // script. The key is typically a SelectionKey which is chosen based on evaluating - // a selection expression. - RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` - - // An integer with a value between [50-29000]. - TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` -} - -// String returns the string representation -func (s GetIntegrationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntegrationOutput) GoString() string { - return s.String() -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *GetIntegrationOutput) SetConnectionId(v string) *GetIntegrationOutput { - s.ConnectionId = &v - return s -} - -// SetConnectionType sets the ConnectionType field's value. -func (s *GetIntegrationOutput) SetConnectionType(v string) *GetIntegrationOutput { - s.ConnectionType = &v - return s -} - -// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. -func (s *GetIntegrationOutput) SetContentHandlingStrategy(v string) *GetIntegrationOutput { - s.ContentHandlingStrategy = &v - return s -} - -// SetCredentialsArn sets the CredentialsArn field's value. -func (s *GetIntegrationOutput) SetCredentialsArn(v string) *GetIntegrationOutput { - s.CredentialsArn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetIntegrationOutput) SetDescription(v string) *GetIntegrationOutput { - s.Description = &v - return s -} - -// SetIntegrationId sets the IntegrationId field's value. -func (s *GetIntegrationOutput) SetIntegrationId(v string) *GetIntegrationOutput { - s.IntegrationId = &v - return s -} - -// SetIntegrationMethod sets the IntegrationMethod field's value. -func (s *GetIntegrationOutput) SetIntegrationMethod(v string) *GetIntegrationOutput { - s.IntegrationMethod = &v - return s -} - -// SetIntegrationResponseSelectionExpression sets the IntegrationResponseSelectionExpression field's value. -func (s *GetIntegrationOutput) SetIntegrationResponseSelectionExpression(v string) *GetIntegrationOutput { - s.IntegrationResponseSelectionExpression = &v - return s -} - -// SetIntegrationType sets the IntegrationType field's value. -func (s *GetIntegrationOutput) SetIntegrationType(v string) *GetIntegrationOutput { - s.IntegrationType = &v - return s -} - -// SetIntegrationUri sets the IntegrationUri field's value. -func (s *GetIntegrationOutput) SetIntegrationUri(v string) *GetIntegrationOutput { - s.IntegrationUri = &v - return s -} - -// SetPassthroughBehavior sets the PassthroughBehavior field's value. -func (s *GetIntegrationOutput) SetPassthroughBehavior(v string) *GetIntegrationOutput { - s.PassthroughBehavior = &v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *GetIntegrationOutput) SetRequestParameters(v map[string]*string) *GetIntegrationOutput { - s.RequestParameters = v - return s -} - -// SetRequestTemplates sets the RequestTemplates field's value. -func (s *GetIntegrationOutput) SetRequestTemplates(v map[string]*string) *GetIntegrationOutput { - s.RequestTemplates = v - return s -} - -// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. -func (s *GetIntegrationOutput) SetTemplateSelectionExpression(v string) *GetIntegrationOutput { - s.TemplateSelectionExpression = &v - return s -} - -// SetTimeoutInMillis sets the TimeoutInMillis field's value. -func (s *GetIntegrationOutput) SetTimeoutInMillis(v int64) *GetIntegrationOutput { - s.TimeoutInMillis = &v - return s -} - -type GetIntegrationResponseInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // IntegrationId is a required field - IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` - - // IntegrationResponseId is a required field - IntegrationResponseId *string `location:"uri" locationName:"integrationResponseId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetIntegrationResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntegrationResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIntegrationResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIntegrationResponseInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.IntegrationId == nil { - invalidParams.Add(request.NewErrParamRequired("IntegrationId")) - } - if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) - } - if s.IntegrationResponseId == nil { - invalidParams.Add(request.NewErrParamRequired("IntegrationResponseId")) - } - if s.IntegrationResponseId != nil && len(*s.IntegrationResponseId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IntegrationResponseId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetIntegrationResponseInput) SetApiId(v string) *GetIntegrationResponseInput { - s.ApiId = &v - return s -} - -// SetIntegrationId sets the IntegrationId field's value. -func (s *GetIntegrationResponseInput) SetIntegrationId(v string) *GetIntegrationResponseInput { - s.IntegrationId = &v - return s -} - -// SetIntegrationResponseId sets the IntegrationResponseId field's value. -func (s *GetIntegrationResponseInput) SetIntegrationResponseId(v string) *GetIntegrationResponseInput { - s.IntegrationResponseId = &v - return s -} - -type GetIntegrationResponseOutput struct { - _ struct{} `type:"structure"` - - // Specifies how to handle response payload content type conversions. - ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` - - // An API Gateway-generated, unique identifier. - IntegrationResponseId *string `locationName:"integrationResponseId" type:"string"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - IntegrationResponseKey *string `locationName:"integrationResponseKey" type:"string"` - - // A key-value map specifying response parameters that are passed to the method - // response from the backend. The key is a method response header parameter - // name and the mapped value is an integration response header value, a static - // value enclosed within a pair of single quotes, or a JSON expression from - // the integration response body. The mapping key must match the pattern of - // method.response.header.{name}, where name is a valid and unique header name. - // The mapped non-static value must match the pattern of integration.response.header.{name} - // or integration.response.body.{JSON-expression}, where name is a valid and - // unique response header name and JSON-expression is a valid JSON expression - // without the $ prefix. - ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` - - // A mapping of identifier keys to templates. The value is an actual template - // script. The key is typically a SelectionKey which is chosen based on evaluating - // a selection expression. - ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` -} - -// String returns the string representation -func (s GetIntegrationResponseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntegrationResponseOutput) GoString() string { - return s.String() -} - -// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. -func (s *GetIntegrationResponseOutput) SetContentHandlingStrategy(v string) *GetIntegrationResponseOutput { - s.ContentHandlingStrategy = &v - return s -} - -// SetIntegrationResponseId sets the IntegrationResponseId field's value. -func (s *GetIntegrationResponseOutput) SetIntegrationResponseId(v string) *GetIntegrationResponseOutput { - s.IntegrationResponseId = &v - return s -} - -// SetIntegrationResponseKey sets the IntegrationResponseKey field's value. -func (s *GetIntegrationResponseOutput) SetIntegrationResponseKey(v string) *GetIntegrationResponseOutput { - s.IntegrationResponseKey = &v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *GetIntegrationResponseOutput) SetResponseParameters(v map[string]*string) *GetIntegrationResponseOutput { - s.ResponseParameters = v - return s -} - -// SetResponseTemplates sets the ResponseTemplates field's value. -func (s *GetIntegrationResponseOutput) SetResponseTemplates(v map[string]*string) *GetIntegrationResponseOutput { - s.ResponseTemplates = v - return s -} - -// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. -func (s *GetIntegrationResponseOutput) SetTemplateSelectionExpression(v string) *GetIntegrationResponseOutput { - s.TemplateSelectionExpression = &v - return s -} - -type GetIntegrationResponsesInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // IntegrationId is a required field - IntegrationId *string `location:"uri" locationName:"integrationId" 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 GetIntegrationResponsesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntegrationResponsesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIntegrationResponsesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIntegrationResponsesInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.IntegrationId == nil { - invalidParams.Add(request.NewErrParamRequired("IntegrationId")) - } - if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetIntegrationResponsesInput) SetApiId(v string) *GetIntegrationResponsesInput { - s.ApiId = &v - return s -} - -// SetIntegrationId sets the IntegrationId field's value. -func (s *GetIntegrationResponsesInput) SetIntegrationId(v string) *GetIntegrationResponsesInput { - s.IntegrationId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetIntegrationResponsesInput) SetMaxResults(v string) *GetIntegrationResponsesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetIntegrationResponsesInput) SetNextToken(v string) *GetIntegrationResponsesInput { - s.NextToken = &v - return s -} - -type GetIntegrationResponsesOutput struct { - _ struct{} `type:"structure"` - - Items []*IntegrationResponse `locationName:"items" type:"list"` - - // The next page of elements from this collection. Not valid for the last element - // of the collection. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetIntegrationResponsesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntegrationResponsesOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetIntegrationResponsesOutput) SetItems(v []*IntegrationResponse) *GetIntegrationResponsesOutput { - s.Items = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetIntegrationResponsesOutput) SetNextToken(v string) *GetIntegrationResponsesOutput { - s.NextToken = &v - return s -} - -type GetIntegrationsInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" 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 GetIntegrationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntegrationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIntegrationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIntegrationsInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetIntegrationsInput) SetApiId(v string) *GetIntegrationsInput { - s.ApiId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetIntegrationsInput) SetMaxResults(v string) *GetIntegrationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetIntegrationsInput) SetNextToken(v string) *GetIntegrationsInput { - s.NextToken = &v - return s -} - -type GetIntegrationsOutput struct { - _ struct{} `type:"structure"` - - Items []*Integration `locationName:"items" type:"list"` - - // The next page of elements from this collection. Not valid for the last element - // of the collection. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetIntegrationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntegrationsOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetIntegrationsOutput) SetItems(v []*Integration) *GetIntegrationsOutput { - s.Items = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetIntegrationsOutput) SetNextToken(v string) *GetIntegrationsOutput { - s.NextToken = &v - return s -} - -type GetModelInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // ModelId is a required field - ModelId *string `location:"uri" locationName:"modelId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetModelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetModelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetModelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetModelInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.ModelId == nil { - invalidParams.Add(request.NewErrParamRequired("ModelId")) - } - if s.ModelId != nil && len(*s.ModelId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ModelId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetModelInput) SetApiId(v string) *GetModelInput { - s.ApiId = &v - return s -} - -// SetModelId sets the ModelId field's value. -func (s *GetModelInput) SetModelId(v string) *GetModelInput { - s.ModelId = &v - return s -} - -type GetModelOutput struct { - _ struct{} `type:"structure"` - - // A string with a length between [1-256]. - ContentType *string `locationName:"contentType" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - // An API Gateway-generated, unique identifier. - ModelId *string `locationName:"modelId" type:"string"` - - // A string with a length between [1-128]. - Name *string `locationName:"name" type:"string"` - - // A string with a length between [0-32768]. - Schema *string `locationName:"schema" type:"string"` -} - -// String returns the string representation -func (s GetModelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetModelOutput) GoString() string { - return s.String() -} - -// SetContentType sets the ContentType field's value. -func (s *GetModelOutput) SetContentType(v string) *GetModelOutput { - s.ContentType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetModelOutput) SetDescription(v string) *GetModelOutput { - s.Description = &v - return s -} - -// SetModelId sets the ModelId field's value. -func (s *GetModelOutput) SetModelId(v string) *GetModelOutput { - s.ModelId = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetModelOutput) SetName(v string) *GetModelOutput { - s.Name = &v - return s -} - -// SetSchema sets the Schema field's value. -func (s *GetModelOutput) SetSchema(v string) *GetModelOutput { - s.Schema = &v - return s -} - -type GetModelTemplateInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // ModelId is a required field - ModelId *string `location:"uri" locationName:"modelId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetModelTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetModelTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetModelTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetModelTemplateInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.ModelId == nil { - invalidParams.Add(request.NewErrParamRequired("ModelId")) - } - if s.ModelId != nil && len(*s.ModelId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ModelId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetModelTemplateInput) SetApiId(v string) *GetModelTemplateInput { - s.ApiId = &v - return s -} - -// SetModelId sets the ModelId field's value. -func (s *GetModelTemplateInput) SetModelId(v string) *GetModelTemplateInput { - s.ModelId = &v - return s -} - -type GetModelTemplateOutput struct { - _ struct{} `type:"structure"` - - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s GetModelTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetModelTemplateOutput) GoString() string { - return s.String() -} - -// SetValue sets the Value field's value. -func (s *GetModelTemplateOutput) SetValue(v string) *GetModelTemplateOutput { - s.Value = &v - return s -} - -type GetModelsInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" 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 GetModelsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetModelsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetModelsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetModelsInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetModelsInput) SetApiId(v string) *GetModelsInput { - s.ApiId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetModelsInput) SetMaxResults(v string) *GetModelsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetModelsInput) SetNextToken(v string) *GetModelsInput { - s.NextToken = &v - return s -} - -type GetModelsOutput struct { - _ struct{} `type:"structure"` - - Items []*Model `locationName:"items" type:"list"` - - // The next page of elements from this collection. Not valid for the last element - // of the collection. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetModelsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetModelsOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetModelsOutput) SetItems(v []*Model) *GetModelsOutput { - s.Items = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetModelsOutput) SetNextToken(v string) *GetModelsOutput { - s.NextToken = &v - return s -} - -type GetRouteInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // RouteId is a required field - RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRouteInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.RouteId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteId")) - } - if s.RouteId != nil && len(*s.RouteId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetRouteInput) SetApiId(v string) *GetRouteInput { - s.ApiId = &v - return s -} - -// SetRouteId sets the RouteId field's value. -func (s *GetRouteInput) SetRouteId(v string) *GetRouteInput { - s.RouteId = &v - return s -} - -type GetRouteOutput struct { - _ struct{} `type:"structure"` - - ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` - - // A list of authorization scopes configured on a route. The scopes are used - // with a COGNITO_USER_POOLS authorizer to authorize the method invocation. - // The authorization works by matching the route scopes against the scopes parsed - // from the access token in the incoming request. The method invocation is authorized - // if any route scope matches a claimed scope in the access token. Otherwise, - // the invocation is not authorized. When the route scope is configured, the - // client must provide an access token instead of an identity token for authorization - // purposes. - AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` - - // The authorization type. Valid values are NONE for open access, AWS_IAM for - // using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. - AuthorizationType *string `locationName:"authorizationType" type:"string" enum:"AuthorizationType"` - - // An API Gateway-generated, unique identifier. - AuthorizerId *string `locationName:"authorizerId" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` - - // A string with a length between [1-64]. - OperationName *string `locationName:"operationName" type:"string"` - - // The route models. - RequestModels map[string]*string `locationName:"requestModels" type:"map"` - - // The route parameters. - RequestParameters map[string]*ParameterConstraints `locationName:"requestParameters" type:"map"` - - // An API Gateway-generated, unique identifier. - RouteId *string `locationName:"routeId" type:"string"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - RouteKey *string `locationName:"routeKey" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - RouteResponseSelectionExpression *string `locationName:"routeResponseSelectionExpression" type:"string"` - - // A string with a length between [1-128]. - Target *string `locationName:"target" type:"string"` -} - -// String returns the string representation -func (s GetRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRouteOutput) GoString() string { - return s.String() -} - -// SetApiKeyRequired sets the ApiKeyRequired field's value. -func (s *GetRouteOutput) SetApiKeyRequired(v bool) *GetRouteOutput { - s.ApiKeyRequired = &v - return s -} - -// SetAuthorizationScopes sets the AuthorizationScopes field's value. -func (s *GetRouteOutput) SetAuthorizationScopes(v []*string) *GetRouteOutput { - s.AuthorizationScopes = v - return s -} - -// SetAuthorizationType sets the AuthorizationType field's value. -func (s *GetRouteOutput) SetAuthorizationType(v string) *GetRouteOutput { - s.AuthorizationType = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *GetRouteOutput) SetAuthorizerId(v string) *GetRouteOutput { - s.AuthorizerId = &v - return s -} - -// SetModelSelectionExpression sets the ModelSelectionExpression field's value. -func (s *GetRouteOutput) SetModelSelectionExpression(v string) *GetRouteOutput { - s.ModelSelectionExpression = &v - return s -} - -// SetOperationName sets the OperationName field's value. -func (s *GetRouteOutput) SetOperationName(v string) *GetRouteOutput { - s.OperationName = &v - return s -} - -// SetRequestModels sets the RequestModels field's value. -func (s *GetRouteOutput) SetRequestModels(v map[string]*string) *GetRouteOutput { - s.RequestModels = v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *GetRouteOutput) SetRequestParameters(v map[string]*ParameterConstraints) *GetRouteOutput { - s.RequestParameters = v - return s -} - -// SetRouteId sets the RouteId field's value. -func (s *GetRouteOutput) SetRouteId(v string) *GetRouteOutput { - s.RouteId = &v - return s -} - -// SetRouteKey sets the RouteKey field's value. -func (s *GetRouteOutput) SetRouteKey(v string) *GetRouteOutput { - s.RouteKey = &v - return s -} - -// SetRouteResponseSelectionExpression sets the RouteResponseSelectionExpression field's value. -func (s *GetRouteOutput) SetRouteResponseSelectionExpression(v string) *GetRouteOutput { - s.RouteResponseSelectionExpression = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *GetRouteOutput) SetTarget(v string) *GetRouteOutput { - s.Target = &v - return s -} - -type GetRouteResponseInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // RouteId is a required field - RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` - - // RouteResponseId is a required field - RouteResponseId *string `location:"uri" locationName:"routeResponseId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRouteResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRouteResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRouteResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRouteResponseInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.RouteId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteId")) - } - if s.RouteId != nil && len(*s.RouteId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) - } - if s.RouteResponseId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteResponseId")) - } - if s.RouteResponseId != nil && len(*s.RouteResponseId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteResponseId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetRouteResponseInput) SetApiId(v string) *GetRouteResponseInput { - s.ApiId = &v - return s -} - -// SetRouteId sets the RouteId field's value. -func (s *GetRouteResponseInput) SetRouteId(v string) *GetRouteResponseInput { - s.RouteId = &v - return s -} - -// SetRouteResponseId sets the RouteResponseId field's value. -func (s *GetRouteResponseInput) SetRouteResponseId(v string) *GetRouteResponseInput { - s.RouteResponseId = &v - return s -} - -type GetRouteResponseOutput struct { - _ struct{} `type:"structure"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` - - // The route models. - ResponseModels map[string]*string `locationName:"responseModels" type:"map"` - - // The route parameters. - ResponseParameters map[string]*ParameterConstraints `locationName:"responseParameters" type:"map"` - - // An API Gateway-generated, unique identifier. - RouteResponseId *string `locationName:"routeResponseId" type:"string"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - RouteResponseKey *string `locationName:"routeResponseKey" type:"string"` -} - -// String returns the string representation -func (s GetRouteResponseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRouteResponseOutput) GoString() string { - return s.String() -} - -// SetModelSelectionExpression sets the ModelSelectionExpression field's value. -func (s *GetRouteResponseOutput) SetModelSelectionExpression(v string) *GetRouteResponseOutput { - s.ModelSelectionExpression = &v - return s -} - -// SetResponseModels sets the ResponseModels field's value. -func (s *GetRouteResponseOutput) SetResponseModels(v map[string]*string) *GetRouteResponseOutput { - s.ResponseModels = v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *GetRouteResponseOutput) SetResponseParameters(v map[string]*ParameterConstraints) *GetRouteResponseOutput { - s.ResponseParameters = v - return s -} - -// SetRouteResponseId sets the RouteResponseId field's value. -func (s *GetRouteResponseOutput) SetRouteResponseId(v string) *GetRouteResponseOutput { - s.RouteResponseId = &v - return s -} - -// SetRouteResponseKey sets the RouteResponseKey field's value. -func (s *GetRouteResponseOutput) SetRouteResponseKey(v string) *GetRouteResponseOutput { - s.RouteResponseKey = &v - return s -} - -type GetRouteResponsesInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - MaxResults *string `location:"querystring" locationName:"maxResults" type:"string"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // RouteId is a required field - RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRouteResponsesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRouteResponsesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRouteResponsesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRouteResponsesInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.RouteId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteId")) - } - if s.RouteId != nil && len(*s.RouteId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetRouteResponsesInput) SetApiId(v string) *GetRouteResponsesInput { - s.ApiId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetRouteResponsesInput) SetMaxResults(v string) *GetRouteResponsesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetRouteResponsesInput) SetNextToken(v string) *GetRouteResponsesInput { - s.NextToken = &v - return s -} - -// SetRouteId sets the RouteId field's value. -func (s *GetRouteResponsesInput) SetRouteId(v string) *GetRouteResponsesInput { - s.RouteId = &v - return s -} - -type GetRouteResponsesOutput struct { - _ struct{} `type:"structure"` - - Items []*RouteResponse `locationName:"items" type:"list"` - - // The next page of elements from this collection. Not valid for the last element - // of the collection. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetRouteResponsesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRouteResponsesOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetRouteResponsesOutput) SetItems(v []*RouteResponse) *GetRouteResponsesOutput { - s.Items = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetRouteResponsesOutput) SetNextToken(v string) *GetRouteResponsesOutput { - s.NextToken = &v - return s -} - -type GetRoutesInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" 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 GetRoutesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRoutesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRoutesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRoutesInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetRoutesInput) SetApiId(v string) *GetRoutesInput { - s.ApiId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetRoutesInput) SetMaxResults(v string) *GetRoutesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetRoutesInput) SetNextToken(v string) *GetRoutesInput { - s.NextToken = &v - return s -} - -type GetRoutesOutput struct { - _ struct{} `type:"structure"` - - Items []*Route `locationName:"items" type:"list"` - - // The next page of elements from this collection. Not valid for the last element - // of the collection. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetRoutesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRoutesOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetRoutesOutput) SetItems(v []*Route) *GetRoutesOutput { - s.Items = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetRoutesOutput) SetNextToken(v string) *GetRoutesOutput { - s.NextToken = &v - return s -} - -type GetStageInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // StageName is a required field - StageName *string `location:"uri" locationName:"stageName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetStageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetStageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetStageInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetStageInput) SetApiId(v string) *GetStageInput { - s.ApiId = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *GetStageInput) SetStageName(v string) *GetStageInput { - s.StageName = &v - return s -} - -type GetStageOutput struct { - _ struct{} `type:"structure"` - - // Settings for logging access in a stage. - AccessLogSettings *AccessLogSettings `locationName:"accessLogSettings" type:"structure"` - - // An API Gateway-generated, unique identifier. - ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` - - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` - - // Represents a collection of route settings. - DefaultRouteSettings *RouteSettings `locationName:"defaultRouteSettings" type:"structure"` - - // An API Gateway-generated, unique identifier. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"iso8601"` - - // The route settings map. - RouteSettings map[string]*RouteSettings `locationName:"routeSettings" type:"map"` - - // A string with a length between [1-128]. - StageName *string `locationName:"stageName" type:"string"` - - // The stage variable map. - StageVariables map[string]*string `locationName:"stageVariables" type:"map"` -} - -// String returns the string representation -func (s GetStageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStageOutput) GoString() string { - return s.String() -} - -// SetAccessLogSettings sets the AccessLogSettings field's value. -func (s *GetStageOutput) SetAccessLogSettings(v *AccessLogSettings) *GetStageOutput { - s.AccessLogSettings = v - return s -} - -// SetClientCertificateId sets the ClientCertificateId field's value. -func (s *GetStageOutput) SetClientCertificateId(v string) *GetStageOutput { - s.ClientCertificateId = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *GetStageOutput) SetCreatedDate(v time.Time) *GetStageOutput { - s.CreatedDate = &v - return s -} - -// SetDefaultRouteSettings sets the DefaultRouteSettings field's value. -func (s *GetStageOutput) SetDefaultRouteSettings(v *RouteSettings) *GetStageOutput { - s.DefaultRouteSettings = v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *GetStageOutput) SetDeploymentId(v string) *GetStageOutput { - s.DeploymentId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetStageOutput) SetDescription(v string) *GetStageOutput { - s.Description = &v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *GetStageOutput) SetLastUpdatedDate(v time.Time) *GetStageOutput { - s.LastUpdatedDate = &v - return s -} - -// SetRouteSettings sets the RouteSettings field's value. -func (s *GetStageOutput) SetRouteSettings(v map[string]*RouteSettings) *GetStageOutput { - s.RouteSettings = v - return s -} - -// SetStageName sets the StageName field's value. -func (s *GetStageOutput) SetStageName(v string) *GetStageOutput { - s.StageName = &v - return s -} - -// SetStageVariables sets the StageVariables field's value. -func (s *GetStageOutput) SetStageVariables(v map[string]*string) *GetStageOutput { - s.StageVariables = v - return s -} - -type GetStagesInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" 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 GetStagesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStagesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetStagesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetStagesInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetStagesInput) SetApiId(v string) *GetStagesInput { - s.ApiId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetStagesInput) SetMaxResults(v string) *GetStagesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetStagesInput) SetNextToken(v string) *GetStagesInput { - s.NextToken = &v - return s -} - -type GetStagesOutput struct { - _ struct{} `type:"structure"` - - Items []*Stage `locationName:"items" type:"list"` - - // The next page of elements from this collection. Not valid for the last element - // of the collection. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetStagesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStagesOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *GetStagesOutput) SetItems(v []*Stage) *GetStagesOutput { - s.Items = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetStagesOutput) SetNextToken(v string) *GetStagesOutput { - s.NextToken = &v - return s -} - -// Represents an integration. -type Integration struct { - _ struct{} `type:"structure"` - - // The identifier of the VpcLink used for the integration when the connectionType - // is VPC_LINK; otherwise undefined. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // The type of the network connection to the integration endpoint. The valid - // value is INTERNET for connections through the public routable internet or - // VPC_LINK for private connections between API Gateway and a network load balancer - // in a VPC. The default value is INTERNET. - ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` - - // Specifies how to handle response payload content type conversions. Supported - // values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: - // - // CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string - // to the corresponding binary blob. - // - // CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded - // string. - // - // If this property is not defined, the response payload will be passed through - // from the integration response to the route response or method response without - // modification. - ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` - - // Specifies the credentials required for the integration, if any. For AWS integrations, - // three options are available. To specify an IAM Role for API Gateway to assume, - // use the role's Amazon Resource Name (ARN). To require that the caller's identity - // be passed through from the request, specify the string arn:aws:iam::*:user/*. - // To use resource-based permissions on supported AWS services, specify null. - CredentialsArn *string `locationName:"credentialsArn" type:"string"` - - // Represents the description of an integration. - Description *string `locationName:"description" type:"string"` - - // Represents the identifier of an integration. - IntegrationId *string `locationName:"integrationId" type:"string"` - - // Specifies the integration's HTTP method type. - IntegrationMethod *string `locationName:"integrationMethod" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - IntegrationResponseSelectionExpression *string `locationName:"integrationResponseSelectionExpression" type:"string"` - - // The integration type of an integration. One of the following: - // - // AWS: for integrating the route or method request with an AWS service action, - // including the Lambda function-invoking action. With the Lambda function-invoking - // action, this is referred to as the Lambda custom integration. With any other - // AWS service action, this is known as AWS integration. - // - // AWS_PROXY: for integrating the route or method request with the Lambda function-invoking - // action with the client request passed through as-is. This integration is - // also referred to as Lambda proxy integration. - // - // HTTP: for integrating the route or method request with an HTTP endpoint, - // including a private HTTP endpoint within a VPC. This integration is also - // referred to as the HTTP custom integration. - // - // HTTP_PROXY: for integrating route or method request with an HTTP endpoint, - // including a private HTTP endpoint within a VPC, with the client request passed - // through as-is. This is also referred to as HTTP proxy integration. - // - // MOCK: for integrating the route or method request with API Gateway as a "loopback" - // endpoint without invoking any backend. - IntegrationType *string `locationName:"integrationType" type:"string" enum:"IntegrationType"` - - // Specifies the Uniform Resource Identifier (URI) of the integration endpoint. - // - // For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded - // HTTP(S) URL according to the RFC-3986 specification (https://en.wikipedia.org/wiki/Uniform_Resource_Identifier), - // for either standard integration, where connectionType is not VPC_LINK, or - // private integration, where connectionType is VPC_LINK. For a private HTTP - // integration, the URI is not used for routing. - // - // For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. - // Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is - // the name of the integrated AWS service (e.g., s3); and {subdomain} is a designated - // subdomain supported by certain AWS service for fast host-name lookup. action - // can be used for an AWS service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... - // query string. The ensuing {service_api} refers to a supported action {name} - // plus any required input parameters. Alternatively, path can be used for an - // AWS service path-based API. The ensuing service_api refers to the path to - // an AWS service resource, including the region of the integrated AWS service, - // if applicable. For example, for integration with the S3 API of GetObject, - // the URI can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} - // or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} - IntegrationUri *string `locationName:"integrationUri" type:"string"` - - // Specifies the pass-through behavior for incoming requests based on the Content-Type - // header in the request, and the available mapping templates specified as the - // requestTemplates property on the Integration resource. There are three valid - // values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. - // - // WHEN_NO_MATCH passes the request body for unmapped content types through - // to the integration backend without transformation. - // - // NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type - // response. - // - // WHEN_NO_TEMPLATES allows pass-through when the integration has no content - // types mapped to templates. However, if there is at least one content type - // defined, unmapped content types will be rejected with the same HTTP 415 Unsupported - // Media Type response. - PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string" enum:"PassthroughBehavior"` - - // A key-value map specifying request parameters that are passed from the method - // request to the backend. The key is an integration request parameter name - // and the associated value is a method request parameter value or static value - // that must be enclosed within single quotes and pre-encoded as required by - // the backend. The method request parameter value must match the pattern of - // method.request.{location}.{name} , where {location} is querystring, path, - // or header; and {name} must be a valid and unique method request parameter - // name. - RequestParameters map[string]*string `locationName:"requestParameters" type:"map"` - - // Represents a map of Velocity templates that are applied on the request payload - // based on the value of the Content-Type header sent by the client. The content - // type value is the key in this map, and the template (as a String) is the - // value. - RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` - - // The template selection expression for the integration. - TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` - - // Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 - // milliseconds or 29 seconds. - TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` -} - -// String returns the string representation -func (s Integration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Integration) GoString() string { - return s.String() -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *Integration) SetConnectionId(v string) *Integration { - s.ConnectionId = &v - return s -} - -// SetConnectionType sets the ConnectionType field's value. -func (s *Integration) SetConnectionType(v string) *Integration { - s.ConnectionType = &v - return s -} - -// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. -func (s *Integration) SetContentHandlingStrategy(v string) *Integration { - s.ContentHandlingStrategy = &v - return s -} - -// SetCredentialsArn sets the CredentialsArn field's value. -func (s *Integration) SetCredentialsArn(v string) *Integration { - s.CredentialsArn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Integration) SetDescription(v string) *Integration { - s.Description = &v - return s -} - -// SetIntegrationId sets the IntegrationId field's value. -func (s *Integration) SetIntegrationId(v string) *Integration { - s.IntegrationId = &v - return s -} - -// SetIntegrationMethod sets the IntegrationMethod field's value. -func (s *Integration) SetIntegrationMethod(v string) *Integration { - s.IntegrationMethod = &v - return s -} - -// SetIntegrationResponseSelectionExpression sets the IntegrationResponseSelectionExpression field's value. -func (s *Integration) SetIntegrationResponseSelectionExpression(v string) *Integration { - s.IntegrationResponseSelectionExpression = &v - return s -} - -// SetIntegrationType sets the IntegrationType field's value. -func (s *Integration) SetIntegrationType(v string) *Integration { - s.IntegrationType = &v - return s -} - -// SetIntegrationUri sets the IntegrationUri field's value. -func (s *Integration) SetIntegrationUri(v string) *Integration { - s.IntegrationUri = &v - return s -} - -// SetPassthroughBehavior sets the PassthroughBehavior field's value. -func (s *Integration) SetPassthroughBehavior(v string) *Integration { - s.PassthroughBehavior = &v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *Integration) SetRequestParameters(v map[string]*string) *Integration { - s.RequestParameters = v - return s -} - -// SetRequestTemplates sets the RequestTemplates field's value. -func (s *Integration) SetRequestTemplates(v map[string]*string) *Integration { - s.RequestTemplates = v - return s -} - -// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. -func (s *Integration) SetTemplateSelectionExpression(v string) *Integration { - s.TemplateSelectionExpression = &v - return s -} - -// SetTimeoutInMillis sets the TimeoutInMillis field's value. -func (s *Integration) SetTimeoutInMillis(v int64) *Integration { - s.TimeoutInMillis = &v - return s -} - -// Represents an integration response. -type IntegrationResponse struct { - _ struct{} `type:"structure"` - - // Specifies how to handle response payload content type conversions. Supported - // values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: - // - // CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string - // to the corresponding binary blob. - // - // CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded - // string. - // - // If this property is not defined, the response payload will be passed through - // from the integration response to the route response or method response without - // modification. - ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` - - // The integration response ID. - IntegrationResponseId *string `locationName:"integrationResponseId" type:"string"` - - // The integration response key. - // - // IntegrationResponseKey is a required field - IntegrationResponseKey *string `locationName:"integrationResponseKey" type:"string" required:"true"` - - // A key-value map specifying response parameters that are passed to the method - // response from the backend. The key is a method response header parameter - // name and the mapped value is an integration response header value, a static - // value enclosed within a pair of single quotes, or a JSON expression from - // the integration response body. The mapping key must match the pattern of - // method.response.header.{name}, where name is a valid and unique header name. - // The mapped non-static value must match the pattern of integration.response.header.{name} - // or integration.response.body.{JSON-expression}, where name is a valid and - // unique response header name and JSON-expression is a valid JSON expression - // without the $ prefix. - ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` - - // The collection of response templates for the integration response as a string-to-string - // map of key-value pairs. Response templates are represented as a key/value - // map, with a content-type as the key and a template as the value. - ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` - - // The template selection expressions for the integration response. - TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` -} - -// String returns the string representation -func (s IntegrationResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IntegrationResponse) GoString() string { - return s.String() -} - -// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. -func (s *IntegrationResponse) SetContentHandlingStrategy(v string) *IntegrationResponse { - s.ContentHandlingStrategy = &v - return s -} - -// SetIntegrationResponseId sets the IntegrationResponseId field's value. -func (s *IntegrationResponse) SetIntegrationResponseId(v string) *IntegrationResponse { - s.IntegrationResponseId = &v - return s -} - -// SetIntegrationResponseKey sets the IntegrationResponseKey field's value. -func (s *IntegrationResponse) SetIntegrationResponseKey(v string) *IntegrationResponse { - s.IntegrationResponseKey = &v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *IntegrationResponse) SetResponseParameters(v map[string]*string) *IntegrationResponse { - s.ResponseParameters = v - return s -} - -// SetResponseTemplates sets the ResponseTemplates field's value. -func (s *IntegrationResponse) SetResponseTemplates(v map[string]*string) *IntegrationResponse { - s.ResponseTemplates = v - return s -} - -// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. -func (s *IntegrationResponse) SetTemplateSelectionExpression(v string) *IntegrationResponse { - s.TemplateSelectionExpression = &v - return s -} - -// Represents a data model for an API. See Create Models and Mapping Templates -// for Request and Response Mappings (https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html). -type Model struct { - _ struct{} `type:"structure"` - - // The content-type for the model, for example, "application/json". - ContentType *string `locationName:"contentType" type:"string"` - - // The description of the model. - Description *string `locationName:"description" type:"string"` - - // The model identifier. - ModelId *string `locationName:"modelId" type:"string"` - - // The name of the model. Must be alphanumeric. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The schema for the model. For application/json models, this should be JSON - // schema draft 4 model. - Schema *string `locationName:"schema" type:"string"` -} - -// String returns the string representation -func (s Model) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Model) GoString() string { - return s.String() -} - -// SetContentType sets the ContentType field's value. -func (s *Model) SetContentType(v string) *Model { - s.ContentType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Model) SetDescription(v string) *Model { - s.Description = &v - return s -} - -// SetModelId sets the ModelId field's value. -func (s *Model) SetModelId(v string) *Model { - s.ModelId = &v - return s -} - -// SetName sets the Name field's value. -func (s *Model) SetName(v string) *Model { - s.Name = &v - return s -} - -// SetSchema sets the Schema field's value. -func (s *Model) SetSchema(v string) *Model { - s.Schema = &v - return s -} - -// Validation constraints imposed on parameters of a request (path, query string, -// headers). -type ParameterConstraints struct { - _ struct{} `type:"structure"` - - // Whether or not the parameter is required. - Required *bool `locationName:"required" type:"boolean"` -} - -// String returns the string representation -func (s ParameterConstraints) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterConstraints) GoString() string { - return s.String() -} - -// SetRequired sets the Required field's value. -func (s *ParameterConstraints) SetRequired(v bool) *ParameterConstraints { - s.Required = &v - return s -} - -// Represents a route. -type Route struct { - _ struct{} `type:"structure"` - - // Specifies whether an API key is required for this route. - ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` - - // The authorization scopes supported by this route. - AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` - - // The authorization type for the route. Valid values are NONE for open access, - // AWS_IAM for using AWS IAM permissions. - AuthorizationType *string `locationName:"authorizationType" type:"string" enum:"AuthorizationType"` - - // The identifier of the Authorizer resource to be associated with this route. - AuthorizerId *string `locationName:"authorizerId" type:"string"` - - // The model selection expression for the route. - ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` - - // The operation name for the route. - OperationName *string `locationName:"operationName" type:"string"` - - // The request models for the route. - RequestModels map[string]*string `locationName:"requestModels" type:"map"` - - // The request parameters for the route. - RequestParameters map[string]*ParameterConstraints `locationName:"requestParameters" type:"map"` - - // The route ID. - RouteId *string `locationName:"routeId" type:"string"` - - // The route key for the route. - // - // RouteKey is a required field - RouteKey *string `locationName:"routeKey" type:"string" required:"true"` - - // The route response selection expression for the route. - RouteResponseSelectionExpression *string `locationName:"routeResponseSelectionExpression" type:"string"` - - // The target for the route. - Target *string `locationName:"target" type:"string"` -} - -// String returns the string representation -func (s Route) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Route) GoString() string { - return s.String() -} - -// SetApiKeyRequired sets the ApiKeyRequired field's value. -func (s *Route) SetApiKeyRequired(v bool) *Route { - s.ApiKeyRequired = &v - return s -} - -// SetAuthorizationScopes sets the AuthorizationScopes field's value. -func (s *Route) SetAuthorizationScopes(v []*string) *Route { - s.AuthorizationScopes = v - return s -} - -// SetAuthorizationType sets the AuthorizationType field's value. -func (s *Route) SetAuthorizationType(v string) *Route { - s.AuthorizationType = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *Route) SetAuthorizerId(v string) *Route { - s.AuthorizerId = &v - return s -} - -// SetModelSelectionExpression sets the ModelSelectionExpression field's value. -func (s *Route) SetModelSelectionExpression(v string) *Route { - s.ModelSelectionExpression = &v - return s -} - -// SetOperationName sets the OperationName field's value. -func (s *Route) SetOperationName(v string) *Route { - s.OperationName = &v - return s -} - -// SetRequestModels sets the RequestModels field's value. -func (s *Route) SetRequestModels(v map[string]*string) *Route { - s.RequestModels = v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *Route) SetRequestParameters(v map[string]*ParameterConstraints) *Route { - s.RequestParameters = v - return s -} - -// SetRouteId sets the RouteId field's value. -func (s *Route) SetRouteId(v string) *Route { - s.RouteId = &v - return s -} - -// SetRouteKey sets the RouteKey field's value. -func (s *Route) SetRouteKey(v string) *Route { - s.RouteKey = &v - return s -} - -// SetRouteResponseSelectionExpression sets the RouteResponseSelectionExpression field's value. -func (s *Route) SetRouteResponseSelectionExpression(v string) *Route { - s.RouteResponseSelectionExpression = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *Route) SetTarget(v string) *Route { - s.Target = &v - return s -} - -// Represents a route response. -type RouteResponse struct { - _ struct{} `type:"structure"` - - // Represents the model selection expression of a route response. - ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` - - // Represents the response models of a route response. - ResponseModels map[string]*string `locationName:"responseModels" type:"map"` - - // Represents the response parameters of a route response. - ResponseParameters map[string]*ParameterConstraints `locationName:"responseParameters" type:"map"` - - // Represents the identifier of a route response. - RouteResponseId *string `locationName:"routeResponseId" type:"string"` - - // Represents the route response key of a route response. - // - // RouteResponseKey is a required field - RouteResponseKey *string `locationName:"routeResponseKey" type:"string" required:"true"` -} - -// String returns the string representation -func (s RouteResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RouteResponse) GoString() string { - return s.String() -} - -// SetModelSelectionExpression sets the ModelSelectionExpression field's value. -func (s *RouteResponse) SetModelSelectionExpression(v string) *RouteResponse { - s.ModelSelectionExpression = &v - return s -} - -// SetResponseModels sets the ResponseModels field's value. -func (s *RouteResponse) SetResponseModels(v map[string]*string) *RouteResponse { - s.ResponseModels = v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *RouteResponse) SetResponseParameters(v map[string]*ParameterConstraints) *RouteResponse { - s.ResponseParameters = v - return s -} - -// SetRouteResponseId sets the RouteResponseId field's value. -func (s *RouteResponse) SetRouteResponseId(v string) *RouteResponse { - s.RouteResponseId = &v - return s -} - -// SetRouteResponseKey sets the RouteResponseKey field's value. -func (s *RouteResponse) SetRouteResponseKey(v string) *RouteResponse { - s.RouteResponseKey = &v - return s -} - -// Represents a collection of route settings. -type RouteSettings struct { - _ struct{} `type:"structure"` - - // Specifies whether (true) or not (false) data trace logging is enabled for - // this route. This property affects the log entries pushed to Amazon CloudWatch - // Logs. - DataTraceEnabled *bool `locationName:"dataTraceEnabled" type:"boolean"` - - // Specifies whether detailed metrics are enabled. - DetailedMetricsEnabled *bool `locationName:"detailedMetricsEnabled" type:"boolean"` - - // Specifies the logging level for this route: DEBUG, INFO, or WARN. This property - // affects the log entries pushed to Amazon CloudWatch Logs. - LoggingLevel *string `locationName:"loggingLevel" type:"string" enum:"LoggingLevel"` - - // Specifies the throttling burst limit. - ThrottlingBurstLimit *int64 `locationName:"throttlingBurstLimit" type:"integer"` - - // Specifies the throttling rate limit. - ThrottlingRateLimit *float64 `locationName:"throttlingRateLimit" type:"double"` -} - -// String returns the string representation -func (s RouteSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RouteSettings) GoString() string { - return s.String() -} - -// SetDataTraceEnabled sets the DataTraceEnabled field's value. -func (s *RouteSettings) SetDataTraceEnabled(v bool) *RouteSettings { - s.DataTraceEnabled = &v - return s -} - -// SetDetailedMetricsEnabled sets the DetailedMetricsEnabled field's value. -func (s *RouteSettings) SetDetailedMetricsEnabled(v bool) *RouteSettings { - s.DetailedMetricsEnabled = &v - return s -} - -// SetLoggingLevel sets the LoggingLevel field's value. -func (s *RouteSettings) SetLoggingLevel(v string) *RouteSettings { - s.LoggingLevel = &v - return s -} - -// SetThrottlingBurstLimit sets the ThrottlingBurstLimit field's value. -func (s *RouteSettings) SetThrottlingBurstLimit(v int64) *RouteSettings { - s.ThrottlingBurstLimit = &v - return s -} - -// SetThrottlingRateLimit sets the ThrottlingRateLimit field's value. -func (s *RouteSettings) SetThrottlingRateLimit(v float64) *RouteSettings { - s.ThrottlingRateLimit = &v - return s -} - -// Represents an API stage. -type Stage struct { - _ struct{} `type:"structure"` - - // Settings for logging access in this stage. - AccessLogSettings *AccessLogSettings `locationName:"accessLogSettings" type:"structure"` - - // The identifier of a client certificate for a Stage. - ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` - - // The timestamp when the stage was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` - - // Default route settings for the stage. - DefaultRouteSettings *RouteSettings `locationName:"defaultRouteSettings" type:"structure"` - - // The identifier of the Deployment that the Stage is associated with. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // The description of the stage. - Description *string `locationName:"description" type:"string"` - - // The timestamp when the stage was last updated. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"iso8601"` - - // Route settings for the stage. - RouteSettings map[string]*RouteSettings `locationName:"routeSettings" type:"map"` - - // The name of the stage. - // - // StageName is a required field - StageName *string `locationName:"stageName" type:"string" required:"true"` - - // A map that defines the stage variables for a stage resource. Variable names - // can have alphanumeric and underscore characters, and the values must match - // [A-Za-z0-9-._~:/?#&=,]+. - StageVariables map[string]*string `locationName:"stageVariables" type:"map"` -} - -// String returns the string representation -func (s Stage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Stage) GoString() string { - return s.String() -} - -// SetAccessLogSettings sets the AccessLogSettings field's value. -func (s *Stage) SetAccessLogSettings(v *AccessLogSettings) *Stage { - s.AccessLogSettings = v - return s -} - -// SetClientCertificateId sets the ClientCertificateId field's value. -func (s *Stage) SetClientCertificateId(v string) *Stage { - s.ClientCertificateId = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *Stage) SetCreatedDate(v time.Time) *Stage { - s.CreatedDate = &v - return s -} - -// SetDefaultRouteSettings sets the DefaultRouteSettings field's value. -func (s *Stage) SetDefaultRouteSettings(v *RouteSettings) *Stage { - s.DefaultRouteSettings = v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *Stage) SetDeploymentId(v string) *Stage { - s.DeploymentId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Stage) SetDescription(v string) *Stage { - s.Description = &v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *Stage) SetLastUpdatedDate(v time.Time) *Stage { - s.LastUpdatedDate = &v - return s -} - -// SetRouteSettings sets the RouteSettings field's value. -func (s *Stage) SetRouteSettings(v map[string]*RouteSettings) *Stage { - s.RouteSettings = v - return s -} - -// SetStageName sets the StageName field's value. -func (s *Stage) SetStageName(v string) *Stage { - s.StageName = &v - return s -} - -// SetStageVariables sets the StageVariables field's value. -func (s *Stage) SetStageVariables(v map[string]*string) *Stage { - s.StageVariables = v - return s -} - -type UpdateApiInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ApiKeySelectionExpression *string `locationName:"apiKeySelectionExpression" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - DisableSchemaValidation *bool `locationName:"disableSchemaValidation" type:"boolean"` - - // A string with a length between [1-128]. - Name *string `locationName:"name" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - RouteSelectionExpression *string `locationName:"routeSelectionExpression" type:"string"` - - // A string with a length between [1-64]. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s UpdateApiInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApiInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApiInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateApiInput) SetApiId(v string) *UpdateApiInput { - s.ApiId = &v - return s -} - -// SetApiKeySelectionExpression sets the ApiKeySelectionExpression field's value. -func (s *UpdateApiInput) SetApiKeySelectionExpression(v string) *UpdateApiInput { - s.ApiKeySelectionExpression = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateApiInput) SetDescription(v string) *UpdateApiInput { - s.Description = &v - return s -} - -// SetDisableSchemaValidation sets the DisableSchemaValidation field's value. -func (s *UpdateApiInput) SetDisableSchemaValidation(v bool) *UpdateApiInput { - s.DisableSchemaValidation = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateApiInput) SetName(v string) *UpdateApiInput { - s.Name = &v - return s -} - -// SetRouteSelectionExpression sets the RouteSelectionExpression field's value. -func (s *UpdateApiInput) SetRouteSelectionExpression(v string) *UpdateApiInput { - s.RouteSelectionExpression = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *UpdateApiInput) SetVersion(v string) *UpdateApiInput { - s.Version = &v - return s -} - -type UpdateApiMappingInput struct { - _ struct{} `type:"structure"` - - // An API Gateway-generated, unique identifier. - // - // ApiId is a required field - ApiId *string `locationName:"apiId" type:"string" required:"true"` - - // ApiMappingId is a required field - ApiMappingId *string `location:"uri" locationName:"apiMappingId" type:"string" required:"true"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - ApiMappingKey *string `locationName:"apiMappingKey" type:"string"` - - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` - - // A string with a length between [1-128]. - Stage *string `locationName:"stage" type:"string"` -} - -// String returns the string representation -func (s UpdateApiMappingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApiMappingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApiMappingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApiMappingInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiMappingId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiMappingId")) - } - if s.ApiMappingId != nil && len(*s.ApiMappingId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiMappingId", 1)) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateApiMappingInput) SetApiId(v string) *UpdateApiMappingInput { - s.ApiId = &v - return s -} - -// SetApiMappingId sets the ApiMappingId field's value. -func (s *UpdateApiMappingInput) SetApiMappingId(v string) *UpdateApiMappingInput { - s.ApiMappingId = &v - return s -} - -// SetApiMappingKey sets the ApiMappingKey field's value. -func (s *UpdateApiMappingInput) SetApiMappingKey(v string) *UpdateApiMappingInput { - s.ApiMappingKey = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *UpdateApiMappingInput) SetDomainName(v string) *UpdateApiMappingInput { - s.DomainName = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *UpdateApiMappingInput) SetStage(v string) *UpdateApiMappingInput { - s.Stage = &v - return s -} - -type UpdateApiMappingOutput struct { - _ struct{} `type:"structure"` - - // An API Gateway-generated, unique identifier. - ApiId *string `locationName:"apiId" type:"string"` - - // An API Gateway-generated, unique identifier. - ApiMappingId *string `locationName:"apiMappingId" type:"string"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - ApiMappingKey *string `locationName:"apiMappingKey" type:"string"` - - // A string with a length between [1-128]. - Stage *string `locationName:"stage" type:"string"` -} - -// String returns the string representation -func (s UpdateApiMappingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApiMappingOutput) GoString() string { - return s.String() -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateApiMappingOutput) SetApiId(v string) *UpdateApiMappingOutput { - s.ApiId = &v - return s -} - -// SetApiMappingId sets the ApiMappingId field's value. -func (s *UpdateApiMappingOutput) SetApiMappingId(v string) *UpdateApiMappingOutput { - s.ApiMappingId = &v - return s -} - -// SetApiMappingKey sets the ApiMappingKey field's value. -func (s *UpdateApiMappingOutput) SetApiMappingKey(v string) *UpdateApiMappingOutput { - s.ApiMappingKey = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *UpdateApiMappingOutput) SetStage(v string) *UpdateApiMappingOutput { - s.Stage = &v - return s -} - -type UpdateApiOutput struct { - _ struct{} `type:"structure"` - - ApiEndpoint *string `locationName:"apiEndpoint" type:"string"` - - // An API Gateway-generated, unique identifier. - ApiId *string `locationName:"apiId" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ApiKeySelectionExpression *string `locationName:"apiKeySelectionExpression" type:"string"` - - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - DisableSchemaValidation *bool `locationName:"disableSchemaValidation" type:"boolean"` - - // A string with a length between [1-128]. - Name *string `locationName:"name" type:"string"` - - ProtocolType *string `locationName:"protocolType" type:"string" enum:"ProtocolType"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - RouteSelectionExpression *string `locationName:"routeSelectionExpression" type:"string"` - - // A string with a length between [1-64]. - Version *string `locationName:"version" type:"string"` - - Warnings []*string `locationName:"warnings" type:"list"` -} - -// String returns the string representation -func (s UpdateApiOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApiOutput) GoString() string { - return s.String() -} - -// SetApiEndpoint sets the ApiEndpoint field's value. -func (s *UpdateApiOutput) SetApiEndpoint(v string) *UpdateApiOutput { - s.ApiEndpoint = &v - return s -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateApiOutput) SetApiId(v string) *UpdateApiOutput { - s.ApiId = &v - return s -} - -// SetApiKeySelectionExpression sets the ApiKeySelectionExpression field's value. -func (s *UpdateApiOutput) SetApiKeySelectionExpression(v string) *UpdateApiOutput { - s.ApiKeySelectionExpression = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *UpdateApiOutput) SetCreatedDate(v time.Time) *UpdateApiOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateApiOutput) SetDescription(v string) *UpdateApiOutput { - s.Description = &v - return s -} - -// SetDisableSchemaValidation sets the DisableSchemaValidation field's value. -func (s *UpdateApiOutput) SetDisableSchemaValidation(v bool) *UpdateApiOutput { - s.DisableSchemaValidation = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateApiOutput) SetName(v string) *UpdateApiOutput { - s.Name = &v - return s -} - -// SetProtocolType sets the ProtocolType field's value. -func (s *UpdateApiOutput) SetProtocolType(v string) *UpdateApiOutput { - s.ProtocolType = &v - return s -} - -// SetRouteSelectionExpression sets the RouteSelectionExpression field's value. -func (s *UpdateApiOutput) SetRouteSelectionExpression(v string) *UpdateApiOutput { - s.RouteSelectionExpression = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *UpdateApiOutput) SetVersion(v string) *UpdateApiOutput { - s.Version = &v - return s -} - -// SetWarnings sets the Warnings field's value. -func (s *UpdateApiOutput) SetWarnings(v []*string) *UpdateApiOutput { - s.Warnings = v - return s -} - -type UpdateAuthorizerInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // Represents an Amazon Resource Name (ARN). - AuthorizerCredentialsArn *string `locationName:"authorizerCredentialsArn" type:"string"` - - // AuthorizerId is a required field - AuthorizerId *string `location:"uri" locationName:"authorizerId" type:"string" required:"true"` - - // An integer with a value between [0-3600]. - AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` - - // The authorizer type. Currently the only valid value is REQUEST, for a Lambda - // function using incoming request parameters. - AuthorizerType *string `locationName:"authorizerType" type:"string" enum:"AuthorizerType"` - - // A string representation of a URI with a length between [1-2048]. - AuthorizerUri *string `locationName:"authorizerUri" type:"string"` - - // The identity source for which authorization is requested. - // - // For the REQUEST authorizer, this is required when authorization caching is - // enabled. The value is a comma-separated string of one or more mapping expressions - // of the specified request parameters. For example, if an Auth header, a Name - // query string parameter are defined as identity sources, this value is $method.request.header.Auth, - // $method.request.querystring.Name. These parameters will be used to derive - // the authorization caching key and to perform runtime validation of the REQUEST - // authorizer by verifying all of the identity-related request parameters are - // present, not null and non-empty. Only when this is true does the authorizer - // invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized - // response without calling the Lambda function. The valid value is a string - // of comma-separated mapping expressions of the specified request parameters. - // When the authorization caching is not enabled, this property is optional. - IdentitySource []*string `locationName:"identitySource" type:"list"` - - // A string with a length between [0-1024]. - IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` - - // A string with a length between [1-128]. - Name *string `locationName:"name" type:"string"` - - // For REQUEST authorizer, this is not defined. - ProviderArns []*string `locationName:"providerArns" type:"list"` -} - -// String returns the string representation -func (s UpdateAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAuthorizerInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.AuthorizerId == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) - } - if s.AuthorizerId != nil && len(*s.AuthorizerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizerId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateAuthorizerInput) SetApiId(v string) *UpdateAuthorizerInput { - s.ApiId = &v - return s -} - -// SetAuthorizerCredentialsArn sets the AuthorizerCredentialsArn field's value. -func (s *UpdateAuthorizerInput) SetAuthorizerCredentialsArn(v string) *UpdateAuthorizerInput { - s.AuthorizerCredentialsArn = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *UpdateAuthorizerInput) SetAuthorizerId(v string) *UpdateAuthorizerInput { - s.AuthorizerId = &v - return s -} - -// SetAuthorizerResultTtlInSeconds sets the AuthorizerResultTtlInSeconds field's value. -func (s *UpdateAuthorizerInput) SetAuthorizerResultTtlInSeconds(v int64) *UpdateAuthorizerInput { - s.AuthorizerResultTtlInSeconds = &v - return s -} - -// SetAuthorizerType sets the AuthorizerType field's value. -func (s *UpdateAuthorizerInput) SetAuthorizerType(v string) *UpdateAuthorizerInput { - s.AuthorizerType = &v - return s -} - -// SetAuthorizerUri sets the AuthorizerUri field's value. -func (s *UpdateAuthorizerInput) SetAuthorizerUri(v string) *UpdateAuthorizerInput { - s.AuthorizerUri = &v - return s -} - -// SetIdentitySource sets the IdentitySource field's value. -func (s *UpdateAuthorizerInput) SetIdentitySource(v []*string) *UpdateAuthorizerInput { - s.IdentitySource = v - return s -} - -// SetIdentityValidationExpression sets the IdentityValidationExpression field's value. -func (s *UpdateAuthorizerInput) SetIdentityValidationExpression(v string) *UpdateAuthorizerInput { - s.IdentityValidationExpression = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateAuthorizerInput) SetName(v string) *UpdateAuthorizerInput { - s.Name = &v - return s -} - -// SetProviderArns sets the ProviderArns field's value. -func (s *UpdateAuthorizerInput) SetProviderArns(v []*string) *UpdateAuthorizerInput { - s.ProviderArns = v - return s -} - -type UpdateAuthorizerOutput struct { - _ struct{} `type:"structure"` - - // Represents an Amazon Resource Name (ARN). - AuthorizerCredentialsArn *string `locationName:"authorizerCredentialsArn" type:"string"` - - // An API Gateway-generated, unique identifier. - AuthorizerId *string `locationName:"authorizerId" type:"string"` - - // An integer with a value between [0-3600]. - AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` - - // The authorizer type. Currently the only valid value is REQUEST, for a Lambda - // function using incoming request parameters. - AuthorizerType *string `locationName:"authorizerType" type:"string" enum:"AuthorizerType"` - - // A string representation of a URI with a length between [1-2048]. - AuthorizerUri *string `locationName:"authorizerUri" type:"string"` - - // The identity source for which authorization is requested. - // - // For the REQUEST authorizer, this is required when authorization caching is - // enabled. The value is a comma-separated string of one or more mapping expressions - // of the specified request parameters. For example, if an Auth header, a Name - // query string parameter are defined as identity sources, this value is $method.request.header.Auth, - // $method.request.querystring.Name. These parameters will be used to derive - // the authorization caching key and to perform runtime validation of the REQUEST - // authorizer by verifying all of the identity-related request parameters are - // present, not null and non-empty. Only when this is true does the authorizer - // invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized - // response without calling the Lambda function. The valid value is a string - // of comma-separated mapping expressions of the specified request parameters. - // When the authorization caching is not enabled, this property is optional. - IdentitySource []*string `locationName:"identitySource" type:"list"` - - // A string with a length between [0-1024]. - IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` - - // A string with a length between [1-128]. - Name *string `locationName:"name" type:"string"` - - // For REQUEST authorizer, this is not defined. - ProviderArns []*string `locationName:"providerArns" type:"list"` -} - -// String returns the string representation -func (s UpdateAuthorizerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAuthorizerOutput) GoString() string { - return s.String() -} - -// SetAuthorizerCredentialsArn sets the AuthorizerCredentialsArn field's value. -func (s *UpdateAuthorizerOutput) SetAuthorizerCredentialsArn(v string) *UpdateAuthorizerOutput { - s.AuthorizerCredentialsArn = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *UpdateAuthorizerOutput) SetAuthorizerId(v string) *UpdateAuthorizerOutput { - s.AuthorizerId = &v - return s -} - -// SetAuthorizerResultTtlInSeconds sets the AuthorizerResultTtlInSeconds field's value. -func (s *UpdateAuthorizerOutput) SetAuthorizerResultTtlInSeconds(v int64) *UpdateAuthorizerOutput { - s.AuthorizerResultTtlInSeconds = &v - return s -} - -// SetAuthorizerType sets the AuthorizerType field's value. -func (s *UpdateAuthorizerOutput) SetAuthorizerType(v string) *UpdateAuthorizerOutput { - s.AuthorizerType = &v - return s -} - -// SetAuthorizerUri sets the AuthorizerUri field's value. -func (s *UpdateAuthorizerOutput) SetAuthorizerUri(v string) *UpdateAuthorizerOutput { - s.AuthorizerUri = &v - return s -} - -// SetIdentitySource sets the IdentitySource field's value. -func (s *UpdateAuthorizerOutput) SetIdentitySource(v []*string) *UpdateAuthorizerOutput { - s.IdentitySource = v - return s -} - -// SetIdentityValidationExpression sets the IdentityValidationExpression field's value. -func (s *UpdateAuthorizerOutput) SetIdentityValidationExpression(v string) *UpdateAuthorizerOutput { - s.IdentityValidationExpression = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateAuthorizerOutput) SetName(v string) *UpdateAuthorizerOutput { - s.Name = &v - return s -} - -// SetProviderArns sets the ProviderArns field's value. -func (s *UpdateAuthorizerOutput) SetProviderArns(v []*string) *UpdateAuthorizerOutput { - s.ProviderArns = v - return s -} - -type UpdateDeploymentInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // DeploymentId is a required field - DeploymentId *string `location:"uri" locationName:"deploymentId" type:"string" required:"true"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` -} - -// String returns the string representation -func (s UpdateDeploymentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDeploymentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDeploymentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDeploymentInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.DeploymentId == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentId")) - } - if s.DeploymentId != nil && len(*s.DeploymentId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeploymentId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateDeploymentInput) SetApiId(v string) *UpdateDeploymentInput { - s.ApiId = &v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *UpdateDeploymentInput) SetDeploymentId(v string) *UpdateDeploymentInput { - s.DeploymentId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateDeploymentInput) SetDescription(v string) *UpdateDeploymentInput { - s.Description = &v - return s -} - -type UpdateDeploymentOutput struct { - _ struct{} `type:"structure"` - - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` - - // An API Gateway-generated, unique identifier. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // Represents a deployment status. - DeploymentStatus *string `locationName:"deploymentStatus" type:"string" enum:"DeploymentStatus"` - - DeploymentStatusMessage *string `locationName:"deploymentStatusMessage" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` -} - -// String returns the string representation -func (s UpdateDeploymentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDeploymentOutput) GoString() string { - return s.String() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *UpdateDeploymentOutput) SetCreatedDate(v time.Time) *UpdateDeploymentOutput { - s.CreatedDate = &v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *UpdateDeploymentOutput) SetDeploymentId(v string) *UpdateDeploymentOutput { - s.DeploymentId = &v - return s -} - -// SetDeploymentStatus sets the DeploymentStatus field's value. -func (s *UpdateDeploymentOutput) SetDeploymentStatus(v string) *UpdateDeploymentOutput { - s.DeploymentStatus = &v - return s -} - -// SetDeploymentStatusMessage sets the DeploymentStatusMessage field's value. -func (s *UpdateDeploymentOutput) SetDeploymentStatusMessage(v string) *UpdateDeploymentOutput { - s.DeploymentStatusMessage = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateDeploymentOutput) SetDescription(v string) *UpdateDeploymentOutput { - s.Description = &v - return s -} - -type UpdateDomainNameInput struct { - _ struct{} `type:"structure"` - - // DomainName is a required field - DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` - - // The domain name configurations. - DomainNameConfigurations []*DomainNameConfiguration `locationName:"domainNameConfigurations" type:"list"` -} - -// String returns the string representation -func (s UpdateDomainNameInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDomainNameInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDomainNameInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDomainNameInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *UpdateDomainNameInput) SetDomainName(v string) *UpdateDomainNameInput { - s.DomainName = &v - return s -} - -// SetDomainNameConfigurations sets the DomainNameConfigurations field's value. -func (s *UpdateDomainNameInput) SetDomainNameConfigurations(v []*DomainNameConfiguration) *UpdateDomainNameInput { - s.DomainNameConfigurations = v - return s -} - -type UpdateDomainNameOutput struct { - _ struct{} `type:"structure"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ApiMappingSelectionExpression *string `locationName:"apiMappingSelectionExpression" type:"string"` - - // A string with a length between [1-512]. - DomainName *string `locationName:"domainName" type:"string"` - - // The domain name configurations. - DomainNameConfigurations []*DomainNameConfiguration `locationName:"domainNameConfigurations" type:"list"` -} - -// String returns the string representation -func (s UpdateDomainNameOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDomainNameOutput) GoString() string { - return s.String() -} - -// SetApiMappingSelectionExpression sets the ApiMappingSelectionExpression field's value. -func (s *UpdateDomainNameOutput) SetApiMappingSelectionExpression(v string) *UpdateDomainNameOutput { - s.ApiMappingSelectionExpression = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *UpdateDomainNameOutput) SetDomainName(v string) *UpdateDomainNameOutput { - s.DomainName = &v - return s -} - -// SetDomainNameConfigurations sets the DomainNameConfigurations field's value. -func (s *UpdateDomainNameOutput) SetDomainNameConfigurations(v []*DomainNameConfiguration) *UpdateDomainNameOutput { - s.DomainNameConfigurations = v - return s -} - -type UpdateIntegrationInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // A string with a length between [1-1024]. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // Represents a connection type. - ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` - - // Specifies how to handle response payload content type conversions. - ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` - - // Represents an Amazon Resource Name (ARN). - CredentialsArn *string `locationName:"credentialsArn" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - // IntegrationId is a required field - IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` - - // A string with a length between [1-64]. - IntegrationMethod *string `locationName:"integrationMethod" type:"string"` - - // Represents an API method integration type. - IntegrationType *string `locationName:"integrationType" type:"string" enum:"IntegrationType"` - - // A string representation of a URI with a length between [1-2048]. - IntegrationUri *string `locationName:"integrationUri" type:"string"` - - // Represents passthrough behavior for an integration response. - PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string" enum:"PassthroughBehavior"` - - // A key-value map specifying response parameters that are passed to the method - // response from the backend. The key is a method response header parameter - // name and the mapped value is an integration response header value, a static - // value enclosed within a pair of single quotes, or a JSON expression from - // the integration response body. The mapping key must match the pattern of - // method.response.header.{name}, where name is a valid and unique header name. - // The mapped non-static value must match the pattern of integration.response.header.{name} - // or integration.response.body.{JSON-expression}, where name is a valid and - // unique response header name and JSON-expression is a valid JSON expression - // without the $ prefix. - RequestParameters map[string]*string `locationName:"requestParameters" type:"map"` - - // A mapping of identifier keys to templates. The value is an actual template - // script. The key is typically a SelectionKey which is chosen based on evaluating - // a selection expression. - RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` - - // An integer with a value between [50-29000]. - TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` -} - -// String returns the string representation -func (s UpdateIntegrationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIntegrationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateIntegrationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateIntegrationInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.IntegrationId == nil { - invalidParams.Add(request.NewErrParamRequired("IntegrationId")) - } - if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) - } - if s.TimeoutInMillis != nil && *s.TimeoutInMillis < 50 { - invalidParams.Add(request.NewErrParamMinValue("TimeoutInMillis", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateIntegrationInput) SetApiId(v string) *UpdateIntegrationInput { - s.ApiId = &v - return s -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *UpdateIntegrationInput) SetConnectionId(v string) *UpdateIntegrationInput { - s.ConnectionId = &v - return s -} - -// SetConnectionType sets the ConnectionType field's value. -func (s *UpdateIntegrationInput) SetConnectionType(v string) *UpdateIntegrationInput { - s.ConnectionType = &v - return s -} - -// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. -func (s *UpdateIntegrationInput) SetContentHandlingStrategy(v string) *UpdateIntegrationInput { - s.ContentHandlingStrategy = &v - return s -} - -// SetCredentialsArn sets the CredentialsArn field's value. -func (s *UpdateIntegrationInput) SetCredentialsArn(v string) *UpdateIntegrationInput { - s.CredentialsArn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateIntegrationInput) SetDescription(v string) *UpdateIntegrationInput { - s.Description = &v - return s -} - -// SetIntegrationId sets the IntegrationId field's value. -func (s *UpdateIntegrationInput) SetIntegrationId(v string) *UpdateIntegrationInput { - s.IntegrationId = &v - return s -} - -// SetIntegrationMethod sets the IntegrationMethod field's value. -func (s *UpdateIntegrationInput) SetIntegrationMethod(v string) *UpdateIntegrationInput { - s.IntegrationMethod = &v - return s -} - -// SetIntegrationType sets the IntegrationType field's value. -func (s *UpdateIntegrationInput) SetIntegrationType(v string) *UpdateIntegrationInput { - s.IntegrationType = &v - return s -} - -// SetIntegrationUri sets the IntegrationUri field's value. -func (s *UpdateIntegrationInput) SetIntegrationUri(v string) *UpdateIntegrationInput { - s.IntegrationUri = &v - return s -} - -// SetPassthroughBehavior sets the PassthroughBehavior field's value. -func (s *UpdateIntegrationInput) SetPassthroughBehavior(v string) *UpdateIntegrationInput { - s.PassthroughBehavior = &v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *UpdateIntegrationInput) SetRequestParameters(v map[string]*string) *UpdateIntegrationInput { - s.RequestParameters = v - return s -} - -// SetRequestTemplates sets the RequestTemplates field's value. -func (s *UpdateIntegrationInput) SetRequestTemplates(v map[string]*string) *UpdateIntegrationInput { - s.RequestTemplates = v - return s -} - -// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. -func (s *UpdateIntegrationInput) SetTemplateSelectionExpression(v string) *UpdateIntegrationInput { - s.TemplateSelectionExpression = &v - return s -} - -// SetTimeoutInMillis sets the TimeoutInMillis field's value. -func (s *UpdateIntegrationInput) SetTimeoutInMillis(v int64) *UpdateIntegrationInput { - s.TimeoutInMillis = &v - return s -} - -type UpdateIntegrationOutput struct { - _ struct{} `type:"structure"` - - // A string with a length between [1-1024]. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // Represents a connection type. - ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` - - // Specifies how to handle response payload content type conversions. - ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` - - // Represents an Amazon Resource Name (ARN). - CredentialsArn *string `locationName:"credentialsArn" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - // An API Gateway-generated, unique identifier. - IntegrationId *string `locationName:"integrationId" type:"string"` - - // A string with a length between [1-64]. - IntegrationMethod *string `locationName:"integrationMethod" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - IntegrationResponseSelectionExpression *string `locationName:"integrationResponseSelectionExpression" type:"string"` - - // Represents an API method integration type. - IntegrationType *string `locationName:"integrationType" type:"string" enum:"IntegrationType"` - - // A string representation of a URI with a length between [1-2048]. - IntegrationUri *string `locationName:"integrationUri" type:"string"` - - // Represents passthrough behavior for an integration response. - PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string" enum:"PassthroughBehavior"` - - // A key-value map specifying response parameters that are passed to the method - // response from the backend. The key is a method response header parameter - // name and the mapped value is an integration response header value, a static - // value enclosed within a pair of single quotes, or a JSON expression from - // the integration response body. The mapping key must match the pattern of - // method.response.header.{name}, where name is a valid and unique header name. - // The mapped non-static value must match the pattern of integration.response.header.{name} - // or integration.response.body.{JSON-expression}, where name is a valid and - // unique response header name and JSON-expression is a valid JSON expression - // without the $ prefix. - RequestParameters map[string]*string `locationName:"requestParameters" type:"map"` - - // A mapping of identifier keys to templates. The value is an actual template - // script. The key is typically a SelectionKey which is chosen based on evaluating - // a selection expression. - RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` - - // An integer with a value between [50-29000]. - TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` -} - -// String returns the string representation -func (s UpdateIntegrationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIntegrationOutput) GoString() string { - return s.String() -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *UpdateIntegrationOutput) SetConnectionId(v string) *UpdateIntegrationOutput { - s.ConnectionId = &v - return s -} - -// SetConnectionType sets the ConnectionType field's value. -func (s *UpdateIntegrationOutput) SetConnectionType(v string) *UpdateIntegrationOutput { - s.ConnectionType = &v - return s -} - -// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. -func (s *UpdateIntegrationOutput) SetContentHandlingStrategy(v string) *UpdateIntegrationOutput { - s.ContentHandlingStrategy = &v - return s -} - -// SetCredentialsArn sets the CredentialsArn field's value. -func (s *UpdateIntegrationOutput) SetCredentialsArn(v string) *UpdateIntegrationOutput { - s.CredentialsArn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateIntegrationOutput) SetDescription(v string) *UpdateIntegrationOutput { - s.Description = &v - return s -} - -// SetIntegrationId sets the IntegrationId field's value. -func (s *UpdateIntegrationOutput) SetIntegrationId(v string) *UpdateIntegrationOutput { - s.IntegrationId = &v - return s -} - -// SetIntegrationMethod sets the IntegrationMethod field's value. -func (s *UpdateIntegrationOutput) SetIntegrationMethod(v string) *UpdateIntegrationOutput { - s.IntegrationMethod = &v - return s -} - -// SetIntegrationResponseSelectionExpression sets the IntegrationResponseSelectionExpression field's value. -func (s *UpdateIntegrationOutput) SetIntegrationResponseSelectionExpression(v string) *UpdateIntegrationOutput { - s.IntegrationResponseSelectionExpression = &v - return s -} - -// SetIntegrationType sets the IntegrationType field's value. -func (s *UpdateIntegrationOutput) SetIntegrationType(v string) *UpdateIntegrationOutput { - s.IntegrationType = &v - return s -} - -// SetIntegrationUri sets the IntegrationUri field's value. -func (s *UpdateIntegrationOutput) SetIntegrationUri(v string) *UpdateIntegrationOutput { - s.IntegrationUri = &v - return s -} - -// SetPassthroughBehavior sets the PassthroughBehavior field's value. -func (s *UpdateIntegrationOutput) SetPassthroughBehavior(v string) *UpdateIntegrationOutput { - s.PassthroughBehavior = &v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *UpdateIntegrationOutput) SetRequestParameters(v map[string]*string) *UpdateIntegrationOutput { - s.RequestParameters = v - return s -} - -// SetRequestTemplates sets the RequestTemplates field's value. -func (s *UpdateIntegrationOutput) SetRequestTemplates(v map[string]*string) *UpdateIntegrationOutput { - s.RequestTemplates = v - return s -} - -// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. -func (s *UpdateIntegrationOutput) SetTemplateSelectionExpression(v string) *UpdateIntegrationOutput { - s.TemplateSelectionExpression = &v - return s -} - -// SetTimeoutInMillis sets the TimeoutInMillis field's value. -func (s *UpdateIntegrationOutput) SetTimeoutInMillis(v int64) *UpdateIntegrationOutput { - s.TimeoutInMillis = &v - return s -} - -type UpdateIntegrationResponseInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // Specifies how to handle response payload content type conversions. - ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` - - // IntegrationId is a required field - IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` - - // IntegrationResponseId is a required field - IntegrationResponseId *string `location:"uri" locationName:"integrationResponseId" type:"string" required:"true"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - IntegrationResponseKey *string `locationName:"integrationResponseKey" type:"string"` - - // A key-value map specifying response parameters that are passed to the method - // response from the backend. The key is a method response header parameter - // name and the mapped value is an integration response header value, a static - // value enclosed within a pair of single quotes, or a JSON expression from - // the integration response body. The mapping key must match the pattern of - // method.response.header.{name}, where name is a valid and unique header name. - // The mapped non-static value must match the pattern of integration.response.header.{name} - // or integration.response.body.{JSON-expression}, where name is a valid and - // unique response header name and JSON-expression is a valid JSON expression - // without the $ prefix. - ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` - - // A mapping of identifier keys to templates. The value is an actual template - // script. The key is typically a SelectionKey which is chosen based on evaluating - // a selection expression. - ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` -} - -// String returns the string representation -func (s UpdateIntegrationResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIntegrationResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateIntegrationResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateIntegrationResponseInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.IntegrationId == nil { - invalidParams.Add(request.NewErrParamRequired("IntegrationId")) - } - if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) - } - if s.IntegrationResponseId == nil { - invalidParams.Add(request.NewErrParamRequired("IntegrationResponseId")) - } - if s.IntegrationResponseId != nil && len(*s.IntegrationResponseId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IntegrationResponseId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateIntegrationResponseInput) SetApiId(v string) *UpdateIntegrationResponseInput { - s.ApiId = &v - return s -} - -// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. -func (s *UpdateIntegrationResponseInput) SetContentHandlingStrategy(v string) *UpdateIntegrationResponseInput { - s.ContentHandlingStrategy = &v - return s -} - -// SetIntegrationId sets the IntegrationId field's value. -func (s *UpdateIntegrationResponseInput) SetIntegrationId(v string) *UpdateIntegrationResponseInput { - s.IntegrationId = &v - return s -} - -// SetIntegrationResponseId sets the IntegrationResponseId field's value. -func (s *UpdateIntegrationResponseInput) SetIntegrationResponseId(v string) *UpdateIntegrationResponseInput { - s.IntegrationResponseId = &v - return s -} - -// SetIntegrationResponseKey sets the IntegrationResponseKey field's value. -func (s *UpdateIntegrationResponseInput) SetIntegrationResponseKey(v string) *UpdateIntegrationResponseInput { - s.IntegrationResponseKey = &v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *UpdateIntegrationResponseInput) SetResponseParameters(v map[string]*string) *UpdateIntegrationResponseInput { - s.ResponseParameters = v - return s -} - -// SetResponseTemplates sets the ResponseTemplates field's value. -func (s *UpdateIntegrationResponseInput) SetResponseTemplates(v map[string]*string) *UpdateIntegrationResponseInput { - s.ResponseTemplates = v - return s -} - -// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. -func (s *UpdateIntegrationResponseInput) SetTemplateSelectionExpression(v string) *UpdateIntegrationResponseInput { - s.TemplateSelectionExpression = &v - return s -} - -type UpdateIntegrationResponseOutput struct { - _ struct{} `type:"structure"` - - // Specifies how to handle response payload content type conversions. - ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` - - // An API Gateway-generated, unique identifier. - IntegrationResponseId *string `locationName:"integrationResponseId" type:"string"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - IntegrationResponseKey *string `locationName:"integrationResponseKey" type:"string"` - - // A key-value map specifying response parameters that are passed to the method - // response from the backend. The key is a method response header parameter - // name and the mapped value is an integration response header value, a static - // value enclosed within a pair of single quotes, or a JSON expression from - // the integration response body. The mapping key must match the pattern of - // method.response.header.{name}, where name is a valid and unique header name. - // The mapped non-static value must match the pattern of integration.response.header.{name} - // or integration.response.body.{JSON-expression}, where name is a valid and - // unique response header name and JSON-expression is a valid JSON expression - // without the $ prefix. - ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` - - // A mapping of identifier keys to templates. The value is an actual template - // script. The key is typically a SelectionKey which is chosen based on evaluating - // a selection expression. - ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` -} - -// String returns the string representation -func (s UpdateIntegrationResponseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIntegrationResponseOutput) GoString() string { - return s.String() -} - -// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. -func (s *UpdateIntegrationResponseOutput) SetContentHandlingStrategy(v string) *UpdateIntegrationResponseOutput { - s.ContentHandlingStrategy = &v - return s -} - -// SetIntegrationResponseId sets the IntegrationResponseId field's value. -func (s *UpdateIntegrationResponseOutput) SetIntegrationResponseId(v string) *UpdateIntegrationResponseOutput { - s.IntegrationResponseId = &v - return s -} - -// SetIntegrationResponseKey sets the IntegrationResponseKey field's value. -func (s *UpdateIntegrationResponseOutput) SetIntegrationResponseKey(v string) *UpdateIntegrationResponseOutput { - s.IntegrationResponseKey = &v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *UpdateIntegrationResponseOutput) SetResponseParameters(v map[string]*string) *UpdateIntegrationResponseOutput { - s.ResponseParameters = v - return s -} - -// SetResponseTemplates sets the ResponseTemplates field's value. -func (s *UpdateIntegrationResponseOutput) SetResponseTemplates(v map[string]*string) *UpdateIntegrationResponseOutput { - s.ResponseTemplates = v - return s -} - -// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. -func (s *UpdateIntegrationResponseOutput) SetTemplateSelectionExpression(v string) *UpdateIntegrationResponseOutput { - s.TemplateSelectionExpression = &v - return s -} - -type UpdateModelInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // A string with a length between [1-256]. - ContentType *string `locationName:"contentType" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - // ModelId is a required field - ModelId *string `location:"uri" locationName:"modelId" type:"string" required:"true"` - - // A string with a length between [1-128]. - Name *string `locationName:"name" type:"string"` - - // A string with a length between [0-32768]. - Schema *string `locationName:"schema" type:"string"` -} - -// String returns the string representation -func (s UpdateModelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateModelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateModelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateModelInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.ModelId == nil { - invalidParams.Add(request.NewErrParamRequired("ModelId")) - } - if s.ModelId != nil && len(*s.ModelId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ModelId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateModelInput) SetApiId(v string) *UpdateModelInput { - s.ApiId = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *UpdateModelInput) SetContentType(v string) *UpdateModelInput { - s.ContentType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateModelInput) SetDescription(v string) *UpdateModelInput { - s.Description = &v - return s -} - -// SetModelId sets the ModelId field's value. -func (s *UpdateModelInput) SetModelId(v string) *UpdateModelInput { - s.ModelId = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateModelInput) SetName(v string) *UpdateModelInput { - s.Name = &v - return s -} - -// SetSchema sets the Schema field's value. -func (s *UpdateModelInput) SetSchema(v string) *UpdateModelInput { - s.Schema = &v - return s -} - -type UpdateModelOutput struct { - _ struct{} `type:"structure"` - - // A string with a length between [1-256]. - ContentType *string `locationName:"contentType" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - // An API Gateway-generated, unique identifier. - ModelId *string `locationName:"modelId" type:"string"` - - // A string with a length between [1-128]. - Name *string `locationName:"name" type:"string"` - - // A string with a length between [0-32768]. - Schema *string `locationName:"schema" type:"string"` -} - -// String returns the string representation -func (s UpdateModelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateModelOutput) GoString() string { - return s.String() -} - -// SetContentType sets the ContentType field's value. -func (s *UpdateModelOutput) SetContentType(v string) *UpdateModelOutput { - s.ContentType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateModelOutput) SetDescription(v string) *UpdateModelOutput { - s.Description = &v - return s -} - -// SetModelId sets the ModelId field's value. -func (s *UpdateModelOutput) SetModelId(v string) *UpdateModelOutput { - s.ModelId = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateModelOutput) SetName(v string) *UpdateModelOutput { - s.Name = &v - return s -} - -// SetSchema sets the Schema field's value. -func (s *UpdateModelOutput) SetSchema(v string) *UpdateModelOutput { - s.Schema = &v - return s -} - -type UpdateRouteInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` - - // A list of authorization scopes configured on a route. The scopes are used - // with a COGNITO_USER_POOLS authorizer to authorize the method invocation. - // The authorization works by matching the route scopes against the scopes parsed - // from the access token in the incoming request. The method invocation is authorized - // if any route scope matches a claimed scope in the access token. Otherwise, - // the invocation is not authorized. When the route scope is configured, the - // client must provide an access token instead of an identity token for authorization - // purposes. - AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` - - // The authorization type. Valid values are NONE for open access, AWS_IAM for - // using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. - AuthorizationType *string `locationName:"authorizationType" type:"string" enum:"AuthorizationType"` - - // An API Gateway-generated, unique identifier. - AuthorizerId *string `locationName:"authorizerId" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` - - // A string with a length between [1-64]. - OperationName *string `locationName:"operationName" type:"string"` - - // The route models. - RequestModels map[string]*string `locationName:"requestModels" type:"map"` - - // The route parameters. - RequestParameters map[string]*ParameterConstraints `locationName:"requestParameters" type:"map"` - - // RouteId is a required field - RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - RouteKey *string `locationName:"routeKey" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - RouteResponseSelectionExpression *string `locationName:"routeResponseSelectionExpression" type:"string"` - - // A string with a length between [1-128]. - Target *string `locationName:"target" type:"string"` -} - -// String returns the string representation -func (s UpdateRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRouteInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.RouteId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteId")) - } - if s.RouteId != nil && len(*s.RouteId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateRouteInput) SetApiId(v string) *UpdateRouteInput { - s.ApiId = &v - return s -} - -// SetApiKeyRequired sets the ApiKeyRequired field's value. -func (s *UpdateRouteInput) SetApiKeyRequired(v bool) *UpdateRouteInput { - s.ApiKeyRequired = &v - return s -} - -// SetAuthorizationScopes sets the AuthorizationScopes field's value. -func (s *UpdateRouteInput) SetAuthorizationScopes(v []*string) *UpdateRouteInput { - s.AuthorizationScopes = v - return s -} - -// SetAuthorizationType sets the AuthorizationType field's value. -func (s *UpdateRouteInput) SetAuthorizationType(v string) *UpdateRouteInput { - s.AuthorizationType = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *UpdateRouteInput) SetAuthorizerId(v string) *UpdateRouteInput { - s.AuthorizerId = &v - return s -} - -// SetModelSelectionExpression sets the ModelSelectionExpression field's value. -func (s *UpdateRouteInput) SetModelSelectionExpression(v string) *UpdateRouteInput { - s.ModelSelectionExpression = &v - return s -} - -// SetOperationName sets the OperationName field's value. -func (s *UpdateRouteInput) SetOperationName(v string) *UpdateRouteInput { - s.OperationName = &v - return s -} - -// SetRequestModels sets the RequestModels field's value. -func (s *UpdateRouteInput) SetRequestModels(v map[string]*string) *UpdateRouteInput { - s.RequestModels = v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *UpdateRouteInput) SetRequestParameters(v map[string]*ParameterConstraints) *UpdateRouteInput { - s.RequestParameters = v - return s -} - -// SetRouteId sets the RouteId field's value. -func (s *UpdateRouteInput) SetRouteId(v string) *UpdateRouteInput { - s.RouteId = &v - return s -} - -// SetRouteKey sets the RouteKey field's value. -func (s *UpdateRouteInput) SetRouteKey(v string) *UpdateRouteInput { - s.RouteKey = &v - return s -} - -// SetRouteResponseSelectionExpression sets the RouteResponseSelectionExpression field's value. -func (s *UpdateRouteInput) SetRouteResponseSelectionExpression(v string) *UpdateRouteInput { - s.RouteResponseSelectionExpression = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *UpdateRouteInput) SetTarget(v string) *UpdateRouteInput { - s.Target = &v - return s -} - -type UpdateRouteOutput struct { - _ struct{} `type:"structure"` - - ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` - - // A list of authorization scopes configured on a route. The scopes are used - // with a COGNITO_USER_POOLS authorizer to authorize the method invocation. - // The authorization works by matching the route scopes against the scopes parsed - // from the access token in the incoming request. The method invocation is authorized - // if any route scope matches a claimed scope in the access token. Otherwise, - // the invocation is not authorized. When the route scope is configured, the - // client must provide an access token instead of an identity token for authorization - // purposes. - AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` - - // The authorization type. Valid values are NONE for open access, AWS_IAM for - // using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. - AuthorizationType *string `locationName:"authorizationType" type:"string" enum:"AuthorizationType"` - - // An API Gateway-generated, unique identifier. - AuthorizerId *string `locationName:"authorizerId" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` - - // A string with a length between [1-64]. - OperationName *string `locationName:"operationName" type:"string"` - - // The route models. - RequestModels map[string]*string `locationName:"requestModels" type:"map"` - - // The route parameters. - RequestParameters map[string]*ParameterConstraints `locationName:"requestParameters" type:"map"` - - // An API Gateway-generated, unique identifier. - RouteId *string `locationName:"routeId" type:"string"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - RouteKey *string `locationName:"routeKey" type:"string"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - RouteResponseSelectionExpression *string `locationName:"routeResponseSelectionExpression" type:"string"` - - // A string with a length between [1-128]. - Target *string `locationName:"target" type:"string"` -} - -// String returns the string representation -func (s UpdateRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRouteOutput) GoString() string { - return s.String() -} - -// SetApiKeyRequired sets the ApiKeyRequired field's value. -func (s *UpdateRouteOutput) SetApiKeyRequired(v bool) *UpdateRouteOutput { - s.ApiKeyRequired = &v - return s -} - -// SetAuthorizationScopes sets the AuthorizationScopes field's value. -func (s *UpdateRouteOutput) SetAuthorizationScopes(v []*string) *UpdateRouteOutput { - s.AuthorizationScopes = v - return s -} - -// SetAuthorizationType sets the AuthorizationType field's value. -func (s *UpdateRouteOutput) SetAuthorizationType(v string) *UpdateRouteOutput { - s.AuthorizationType = &v - return s -} - -// SetAuthorizerId sets the AuthorizerId field's value. -func (s *UpdateRouteOutput) SetAuthorizerId(v string) *UpdateRouteOutput { - s.AuthorizerId = &v - return s -} - -// SetModelSelectionExpression sets the ModelSelectionExpression field's value. -func (s *UpdateRouteOutput) SetModelSelectionExpression(v string) *UpdateRouteOutput { - s.ModelSelectionExpression = &v - return s -} - -// SetOperationName sets the OperationName field's value. -func (s *UpdateRouteOutput) SetOperationName(v string) *UpdateRouteOutput { - s.OperationName = &v - return s -} - -// SetRequestModels sets the RequestModels field's value. -func (s *UpdateRouteOutput) SetRequestModels(v map[string]*string) *UpdateRouteOutput { - s.RequestModels = v - return s -} - -// SetRequestParameters sets the RequestParameters field's value. -func (s *UpdateRouteOutput) SetRequestParameters(v map[string]*ParameterConstraints) *UpdateRouteOutput { - s.RequestParameters = v - return s -} - -// SetRouteId sets the RouteId field's value. -func (s *UpdateRouteOutput) SetRouteId(v string) *UpdateRouteOutput { - s.RouteId = &v - return s -} - -// SetRouteKey sets the RouteKey field's value. -func (s *UpdateRouteOutput) SetRouteKey(v string) *UpdateRouteOutput { - s.RouteKey = &v - return s -} - -// SetRouteResponseSelectionExpression sets the RouteResponseSelectionExpression field's value. -func (s *UpdateRouteOutput) SetRouteResponseSelectionExpression(v string) *UpdateRouteOutput { - s.RouteResponseSelectionExpression = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *UpdateRouteOutput) SetTarget(v string) *UpdateRouteOutput { - s.Target = &v - return s -} - -type UpdateRouteResponseInput struct { - _ struct{} `type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` - - // The route models. - ResponseModels map[string]*string `locationName:"responseModels" type:"map"` - - // The route parameters. - ResponseParameters map[string]*ParameterConstraints `locationName:"responseParameters" type:"map"` - - // RouteId is a required field - RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` - - // RouteResponseId is a required field - RouteResponseId *string `location:"uri" locationName:"routeResponseId" type:"string" required:"true"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - RouteResponseKey *string `locationName:"routeResponseKey" type:"string"` -} - -// String returns the string representation -func (s UpdateRouteResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRouteResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRouteResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRouteResponseInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.RouteId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteId")) - } - if s.RouteId != nil && len(*s.RouteId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) - } - if s.RouteResponseId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteResponseId")) - } - if s.RouteResponseId != nil && len(*s.RouteResponseId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteResponseId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateRouteResponseInput) SetApiId(v string) *UpdateRouteResponseInput { - s.ApiId = &v - return s -} - -// SetModelSelectionExpression sets the ModelSelectionExpression field's value. -func (s *UpdateRouteResponseInput) SetModelSelectionExpression(v string) *UpdateRouteResponseInput { - s.ModelSelectionExpression = &v - return s -} - -// SetResponseModels sets the ResponseModels field's value. -func (s *UpdateRouteResponseInput) SetResponseModels(v map[string]*string) *UpdateRouteResponseInput { - s.ResponseModels = v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *UpdateRouteResponseInput) SetResponseParameters(v map[string]*ParameterConstraints) *UpdateRouteResponseInput { - s.ResponseParameters = v - return s -} - -// SetRouteId sets the RouteId field's value. -func (s *UpdateRouteResponseInput) SetRouteId(v string) *UpdateRouteResponseInput { - s.RouteId = &v - return s -} - -// SetRouteResponseId sets the RouteResponseId field's value. -func (s *UpdateRouteResponseInput) SetRouteResponseId(v string) *UpdateRouteResponseInput { - s.RouteResponseId = &v - return s -} - -// SetRouteResponseKey sets the RouteResponseKey field's value. -func (s *UpdateRouteResponseInput) SetRouteResponseKey(v string) *UpdateRouteResponseInput { - s.RouteResponseKey = &v - return s -} - -type UpdateRouteResponseOutput struct { - _ struct{} `type:"structure"` - - // An expression used to extract information at runtime. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for more information. - ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` - - // The route models. - ResponseModels map[string]*string `locationName:"responseModels" type:"map"` - - // The route parameters. - ResponseParameters map[string]*ParameterConstraints `locationName:"responseParameters" type:"map"` - - // An API Gateway-generated, unique identifier. - RouteResponseId *string `locationName:"routeResponseId" type:"string"` - - // After evaulating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) - // for a list of expressions and each expression's associated selection key - // type. - RouteResponseKey *string `locationName:"routeResponseKey" type:"string"` -} - -// String returns the string representation -func (s UpdateRouteResponseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRouteResponseOutput) GoString() string { - return s.String() -} - -// SetModelSelectionExpression sets the ModelSelectionExpression field's value. -func (s *UpdateRouteResponseOutput) SetModelSelectionExpression(v string) *UpdateRouteResponseOutput { - s.ModelSelectionExpression = &v - return s -} - -// SetResponseModels sets the ResponseModels field's value. -func (s *UpdateRouteResponseOutput) SetResponseModels(v map[string]*string) *UpdateRouteResponseOutput { - s.ResponseModels = v - return s -} - -// SetResponseParameters sets the ResponseParameters field's value. -func (s *UpdateRouteResponseOutput) SetResponseParameters(v map[string]*ParameterConstraints) *UpdateRouteResponseOutput { - s.ResponseParameters = v - return s -} - -// SetRouteResponseId sets the RouteResponseId field's value. -func (s *UpdateRouteResponseOutput) SetRouteResponseId(v string) *UpdateRouteResponseOutput { - s.RouteResponseId = &v - return s -} - -// SetRouteResponseKey sets the RouteResponseKey field's value. -func (s *UpdateRouteResponseOutput) SetRouteResponseKey(v string) *UpdateRouteResponseOutput { - s.RouteResponseKey = &v - return s -} - -type UpdateStageInput struct { - _ struct{} `type:"structure"` - - // Settings for logging access in a stage. - AccessLogSettings *AccessLogSettings `locationName:"accessLogSettings" type:"structure"` - - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // An API Gateway-generated, unique identifier. - ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` - - // Represents a collection of route settings. - DefaultRouteSettings *RouteSettings `locationName:"defaultRouteSettings" type:"structure"` - - // An API Gateway-generated, unique identifier. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - // The route settings map. - RouteSettings map[string]*RouteSettings `locationName:"routeSettings" type:"map"` - - // StageName is a required field - StageName *string `location:"uri" locationName:"stageName" type:"string" required:"true"` - - // The stage variable map. - StageVariables map[string]*string `locationName:"stageVariables" type:"map"` -} - -// String returns the string representation -func (s UpdateStageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateStageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateStageInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessLogSettings sets the AccessLogSettings field's value. -func (s *UpdateStageInput) SetAccessLogSettings(v *AccessLogSettings) *UpdateStageInput { - s.AccessLogSettings = v - return s -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateStageInput) SetApiId(v string) *UpdateStageInput { - s.ApiId = &v - return s -} - -// SetClientCertificateId sets the ClientCertificateId field's value. -func (s *UpdateStageInput) SetClientCertificateId(v string) *UpdateStageInput { - s.ClientCertificateId = &v - return s -} - -// SetDefaultRouteSettings sets the DefaultRouteSettings field's value. -func (s *UpdateStageInput) SetDefaultRouteSettings(v *RouteSettings) *UpdateStageInput { - s.DefaultRouteSettings = v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *UpdateStageInput) SetDeploymentId(v string) *UpdateStageInput { - s.DeploymentId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateStageInput) SetDescription(v string) *UpdateStageInput { - s.Description = &v - return s -} - -// SetRouteSettings sets the RouteSettings field's value. -func (s *UpdateStageInput) SetRouteSettings(v map[string]*RouteSettings) *UpdateStageInput { - s.RouteSettings = v - return s -} - -// SetStageName sets the StageName field's value. -func (s *UpdateStageInput) SetStageName(v string) *UpdateStageInput { - s.StageName = &v - return s -} - -// SetStageVariables sets the StageVariables field's value. -func (s *UpdateStageInput) SetStageVariables(v map[string]*string) *UpdateStageInput { - s.StageVariables = v - return s -} - -type UpdateStageOutput struct { - _ struct{} `type:"structure"` - - // Settings for logging access in a stage. - AccessLogSettings *AccessLogSettings `locationName:"accessLogSettings" type:"structure"` - - // An API Gateway-generated, unique identifier. - ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` - - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` - - // Represents a collection of route settings. - DefaultRouteSettings *RouteSettings `locationName:"defaultRouteSettings" type:"structure"` - - // An API Gateway-generated, unique identifier. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // A string with a length between [0-1024]. - Description *string `locationName:"description" type:"string"` - - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"iso8601"` - - // The route settings map. - RouteSettings map[string]*RouteSettings `locationName:"routeSettings" type:"map"` - - // A string with a length between [1-128]. - StageName *string `locationName:"stageName" type:"string"` - - // The stage variable map. - StageVariables map[string]*string `locationName:"stageVariables" type:"map"` -} - -// String returns the string representation -func (s UpdateStageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStageOutput) GoString() string { - return s.String() -} - -// SetAccessLogSettings sets the AccessLogSettings field's value. -func (s *UpdateStageOutput) SetAccessLogSettings(v *AccessLogSettings) *UpdateStageOutput { - s.AccessLogSettings = v - return s -} - -// SetClientCertificateId sets the ClientCertificateId field's value. -func (s *UpdateStageOutput) SetClientCertificateId(v string) *UpdateStageOutput { - s.ClientCertificateId = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *UpdateStageOutput) SetCreatedDate(v time.Time) *UpdateStageOutput { - s.CreatedDate = &v - return s -} - -// SetDefaultRouteSettings sets the DefaultRouteSettings field's value. -func (s *UpdateStageOutput) SetDefaultRouteSettings(v *RouteSettings) *UpdateStageOutput { - s.DefaultRouteSettings = v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *UpdateStageOutput) SetDeploymentId(v string) *UpdateStageOutput { - s.DeploymentId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateStageOutput) SetDescription(v string) *UpdateStageOutput { - s.Description = &v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *UpdateStageOutput) SetLastUpdatedDate(v time.Time) *UpdateStageOutput { - s.LastUpdatedDate = &v - return s -} - -// SetRouteSettings sets the RouteSettings field's value. -func (s *UpdateStageOutput) SetRouteSettings(v map[string]*RouteSettings) *UpdateStageOutput { - s.RouteSettings = v - return s -} - -// SetStageName sets the StageName field's value. -func (s *UpdateStageOutput) SetStageName(v string) *UpdateStageOutput { - s.StageName = &v - return s -} - -// SetStageVariables sets the StageVariables field's value. -func (s *UpdateStageOutput) SetStageVariables(v map[string]*string) *UpdateStageOutput { - s.StageVariables = v - return s -} - -// The authorization type. Valid values are NONE for open access, AWS_IAM for -// using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. -const ( - // AuthorizationTypeNone is a AuthorizationType enum value - AuthorizationTypeNone = "NONE" - - // AuthorizationTypeAwsIam is a AuthorizationType enum value - AuthorizationTypeAwsIam = "AWS_IAM" - - // AuthorizationTypeCustom is a AuthorizationType enum value - AuthorizationTypeCustom = "CUSTOM" -) - -// The authorizer type. Currently the only valid value is REQUEST, for a Lambda -// function using incoming request parameters. -const ( - // AuthorizerTypeRequest is a AuthorizerType enum value - AuthorizerTypeRequest = "REQUEST" -) - -// Represents a connection type. -const ( - // ConnectionTypeInternet is a ConnectionType enum value - ConnectionTypeInternet = "INTERNET" - - // ConnectionTypeVpcLink is a ConnectionType enum value - ConnectionTypeVpcLink = "VPC_LINK" -) - -// Specifies how to handle response payload content type conversions. -const ( - // ContentHandlingStrategyConvertToBinary is a ContentHandlingStrategy enum value - ContentHandlingStrategyConvertToBinary = "CONVERT_TO_BINARY" - - // ContentHandlingStrategyConvertToText is a ContentHandlingStrategy enum value - ContentHandlingStrategyConvertToText = "CONVERT_TO_TEXT" -) - -// Represents a deployment status. -const ( - // DeploymentStatusPending is a DeploymentStatus enum value - DeploymentStatusPending = "PENDING" - - // DeploymentStatusFailed is a DeploymentStatus enum value - DeploymentStatusFailed = "FAILED" - - // DeploymentStatusDeployed is a DeploymentStatus enum value - DeploymentStatusDeployed = "DEPLOYED" -) - -// Represents an endpoint type. -const ( - // EndpointTypeRegional is a EndpointType enum value - EndpointTypeRegional = "REGIONAL" - - // EndpointTypeEdge is a EndpointType enum value - EndpointTypeEdge = "EDGE" -) - -// Represents an API method integration type. -const ( - // IntegrationTypeAws is a IntegrationType enum value - IntegrationTypeAws = "AWS" - - // IntegrationTypeHttp is a IntegrationType enum value - IntegrationTypeHttp = "HTTP" - - // IntegrationTypeMock is a IntegrationType enum value - IntegrationTypeMock = "MOCK" - - // IntegrationTypeHttpProxy is a IntegrationType enum value - IntegrationTypeHttpProxy = "HTTP_PROXY" - - // IntegrationTypeAwsProxy is a IntegrationType enum value - IntegrationTypeAwsProxy = "AWS_PROXY" -) - -// The logging level. -const ( - // LoggingLevelError is a LoggingLevel enum value - LoggingLevelError = "ERROR" - - // LoggingLevelInfo is a LoggingLevel enum value - LoggingLevelInfo = "INFO" - - // LoggingLevelFalse is a LoggingLevel enum value - LoggingLevelFalse = "false" -) - -// Represents passthrough behavior for an integration response. -const ( - // PassthroughBehaviorWhenNoMatch is a PassthroughBehavior enum value - PassthroughBehaviorWhenNoMatch = "WHEN_NO_MATCH" - - // PassthroughBehaviorNever is a PassthroughBehavior enum value - PassthroughBehaviorNever = "NEVER" - - // PassthroughBehaviorWhenNoTemplates is a PassthroughBehavior enum value - PassthroughBehaviorWhenNoTemplates = "WHEN_NO_TEMPLATES" -) - -const ( - // ProtocolTypeWebsocket is a ProtocolType enum value - ProtocolTypeWebsocket = "WEBSOCKET" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/doc.go deleted file mode 100644 index 009cd801c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package apigatewayv2 provides the client and types for making API -// requests to AmazonApiGatewayV2. -// -// Amazon API Gateway V2 -// -// See https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29 for more information on this service. -// -// See apigatewayv2 package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/apigatewayv2/ -// -// Using the Client -// -// To contact AmazonApiGatewayV2 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 AmazonApiGatewayV2 client ApiGatewayV2 for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/apigatewayv2/#New -package apigatewayv2 diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/errors.go deleted file mode 100644 index 141b1bab7..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/errors.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package apigatewayv2 - -const ( - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - // - // The request is not valid, for example, the input is incomplete or incorrect. - // See the accompanying error message for details. - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeConflictException for service response error code - // "ConflictException". - // - // The requested operation would cause a conflict with the current state of - // a service resource associated with the request. Resolve the conflict before - // retrying this request. See the accompanying error message for details. - ErrCodeConflictException = "ConflictException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // The resource specified in the request was not found. See the message field - // for more information. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // A limit has been exceeded. See the accompanying error message for details. - ErrCodeTooManyRequestsException = "TooManyRequestsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/service.go b/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/service.go deleted file mode 100644 index 4a722afe9..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package apigatewayv2 - -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" -) - -// ApiGatewayV2 provides the API operation methods for making requests to -// AmazonApiGatewayV2. See this package's package overview docs -// for details on the service. -// -// ApiGatewayV2 methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ApiGatewayV2 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 = "ApiGatewayV2" // Name of service. - EndpointsID = "apigateway" // ID to lookup a service endpoint with. - ServiceID = "ApiGatewayV2" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ApiGatewayV2 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 ApiGatewayV2 client from just a session. -// svc := apigatewayv2.New(mySession) -// -// // Create a ApiGatewayV2 client with additional configuration -// svc := apigatewayv2.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ApiGatewayV2 { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "apigateway" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ApiGatewayV2 { - svc := &ApiGatewayV2{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-11-29", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ApiGatewayV2 operation and runs any -// custom request initialization. -func (c *ApiGatewayV2) 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/applicationautoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go deleted file mode 100644 index 5fa02a90d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go +++ /dev/null @@ -1,4568 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package applicationautoscaling - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opDeleteScalingPolicy = "DeleteScalingPolicy" - -// DeleteScalingPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteScalingPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteScalingPolicy for more information on using the DeleteScalingPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteScalingPolicyRequest method. -// req, resp := client.DeleteScalingPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScalingPolicy -func (c *ApplicationAutoScaling) DeleteScalingPolicyRequest(input *DeleteScalingPolicyInput) (req *request.Request, output *DeleteScalingPolicyOutput) { - op := &request.Operation{ - Name: opDeleteScalingPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteScalingPolicyInput{} - } - - output = &DeleteScalingPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteScalingPolicy API operation for Application Auto Scaling. -// -// Deletes the specified Application Auto Scaling scaling policy. -// -// Deleting a policy deletes the underlying alarm action, but does not delete -// the CloudWatch alarm associated with the scaling policy, even if it no longer -// has an associated action. -// -// To create a scaling policy or update an existing one, see PutScalingPolicy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Application Auto Scaling's -// API operation DeleteScalingPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// An exception was thrown for a validation issue. Review the available parameters -// for the API request. -// -// * ErrCodeObjectNotFoundException "ObjectNotFoundException" -// The specified object could not be found. For any operation that depends on -// the existence of a scalable target, this exception is thrown if the scalable -// target with the specified service namespace, resource ID, and scalable dimension -// does not exist. For any operation that deletes or deregisters a resource, -// this exception is thrown if the resource cannot be found. -// -// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException" -// Concurrent updates caused an exception, for example, if you request an update -// to an Application Auto Scaling resource that already has a pending update. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScalingPolicy -func (c *ApplicationAutoScaling) DeleteScalingPolicy(input *DeleteScalingPolicyInput) (*DeleteScalingPolicyOutput, error) { - req, out := c.DeleteScalingPolicyRequest(input) - return out, req.Send() -} - -// DeleteScalingPolicyWithContext is the same as DeleteScalingPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteScalingPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApplicationAutoScaling) DeleteScalingPolicyWithContext(ctx aws.Context, input *DeleteScalingPolicyInput, opts ...request.Option) (*DeleteScalingPolicyOutput, error) { - req, out := c.DeleteScalingPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteScheduledAction = "DeleteScheduledAction" - -// DeleteScheduledActionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteScheduledAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteScheduledAction for more information on using the DeleteScheduledAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteScheduledActionRequest method. -// req, resp := client.DeleteScheduledActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScheduledAction -func (c *ApplicationAutoScaling) DeleteScheduledActionRequest(input *DeleteScheduledActionInput) (req *request.Request, output *DeleteScheduledActionOutput) { - op := &request.Operation{ - Name: opDeleteScheduledAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteScheduledActionInput{} - } - - output = &DeleteScheduledActionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteScheduledAction API operation for Application Auto Scaling. -// -// Deletes the specified Application Auto Scaling scheduled action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Application Auto Scaling's -// API operation DeleteScheduledAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// An exception was thrown for a validation issue. Review the available parameters -// for the API request. -// -// * ErrCodeObjectNotFoundException "ObjectNotFoundException" -// The specified object could not be found. For any operation that depends on -// the existence of a scalable target, this exception is thrown if the scalable -// target with the specified service namespace, resource ID, and scalable dimension -// does not exist. For any operation that deletes or deregisters a resource, -// this exception is thrown if the resource cannot be found. -// -// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException" -// Concurrent updates caused an exception, for example, if you request an update -// to an Application Auto Scaling resource that already has a pending update. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScheduledAction -func (c *ApplicationAutoScaling) DeleteScheduledAction(input *DeleteScheduledActionInput) (*DeleteScheduledActionOutput, error) { - req, out := c.DeleteScheduledActionRequest(input) - return out, req.Send() -} - -// DeleteScheduledActionWithContext is the same as DeleteScheduledAction with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteScheduledAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApplicationAutoScaling) DeleteScheduledActionWithContext(ctx aws.Context, input *DeleteScheduledActionInput, opts ...request.Option) (*DeleteScheduledActionOutput, error) { - req, out := c.DeleteScheduledActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterScalableTarget = "DeregisterScalableTarget" - -// DeregisterScalableTargetRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterScalableTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterScalableTarget for more information on using the DeregisterScalableTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterScalableTargetRequest method. -// req, resp := client.DeregisterScalableTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeregisterScalableTarget -func (c *ApplicationAutoScaling) DeregisterScalableTargetRequest(input *DeregisterScalableTargetInput) (req *request.Request, output *DeregisterScalableTargetOutput) { - op := &request.Operation{ - Name: opDeregisterScalableTarget, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterScalableTargetInput{} - } - - output = &DeregisterScalableTargetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterScalableTarget API operation for Application Auto Scaling. -// -// Deregisters a scalable target. -// -// Deregistering a scalable target deletes the scaling policies that are associated -// with it. -// -// To create a scalable target or update an existing one, see RegisterScalableTarget. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Application Auto Scaling's -// API operation DeregisterScalableTarget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// An exception was thrown for a validation issue. Review the available parameters -// for the API request. -// -// * ErrCodeObjectNotFoundException "ObjectNotFoundException" -// The specified object could not be found. For any operation that depends on -// the existence of a scalable target, this exception is thrown if the scalable -// target with the specified service namespace, resource ID, and scalable dimension -// does not exist. For any operation that deletes or deregisters a resource, -// this exception is thrown if the resource cannot be found. -// -// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException" -// Concurrent updates caused an exception, for example, if you request an update -// to an Application Auto Scaling resource that already has a pending update. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeregisterScalableTarget -func (c *ApplicationAutoScaling) DeregisterScalableTarget(input *DeregisterScalableTargetInput) (*DeregisterScalableTargetOutput, error) { - req, out := c.DeregisterScalableTargetRequest(input) - return out, req.Send() -} - -// DeregisterScalableTargetWithContext is the same as DeregisterScalableTarget with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterScalableTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApplicationAutoScaling) DeregisterScalableTargetWithContext(ctx aws.Context, input *DeregisterScalableTargetInput, opts ...request.Option) (*DeregisterScalableTargetOutput, error) { - req, out := c.DeregisterScalableTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeScalableTargets = "DescribeScalableTargets" - -// DescribeScalableTargetsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeScalableTargets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeScalableTargets for more information on using the DescribeScalableTargets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeScalableTargetsRequest method. -// req, resp := client.DescribeScalableTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalableTargets -func (c *ApplicationAutoScaling) DescribeScalableTargetsRequest(input *DescribeScalableTargetsInput) (req *request.Request, output *DescribeScalableTargetsOutput) { - op := &request.Operation{ - Name: opDescribeScalableTargets, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeScalableTargetsInput{} - } - - output = &DescribeScalableTargetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeScalableTargets API operation for Application Auto Scaling. -// -// Gets information about the scalable targets in the specified namespace. -// -// You can filter the results using the ResourceIds and ScalableDimension parameters. -// -// To create a scalable target or update an existing one, see RegisterScalableTarget. -// If you are no longer using a scalable target, you can deregister it using -// DeregisterScalableTarget. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Application Auto Scaling's -// API operation DescribeScalableTargets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// An exception was thrown for a validation issue. Review the available parameters -// for the API request. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token supplied was invalid. -// -// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException" -// Concurrent updates caused an exception, for example, if you request an update -// to an Application Auto Scaling resource that already has a pending update. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalableTargets -func (c *ApplicationAutoScaling) DescribeScalableTargets(input *DescribeScalableTargetsInput) (*DescribeScalableTargetsOutput, error) { - req, out := c.DescribeScalableTargetsRequest(input) - return out, req.Send() -} - -// DescribeScalableTargetsWithContext is the same as DescribeScalableTargets with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeScalableTargets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApplicationAutoScaling) DescribeScalableTargetsWithContext(ctx aws.Context, input *DescribeScalableTargetsInput, opts ...request.Option) (*DescribeScalableTargetsOutput, error) { - req, out := c.DescribeScalableTargetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeScalableTargetsPages iterates over the pages of a DescribeScalableTargets operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeScalableTargets 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 DescribeScalableTargets operation. -// pageNum := 0 -// err := client.DescribeScalableTargetsPages(params, -// func(page *DescribeScalableTargetsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ApplicationAutoScaling) DescribeScalableTargetsPages(input *DescribeScalableTargetsInput, fn func(*DescribeScalableTargetsOutput, bool) bool) error { - return c.DescribeScalableTargetsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeScalableTargetsPagesWithContext same as DescribeScalableTargetsPages 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 *ApplicationAutoScaling) DescribeScalableTargetsPagesWithContext(ctx aws.Context, input *DescribeScalableTargetsInput, fn func(*DescribeScalableTargetsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeScalableTargetsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeScalableTargetsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScalableTargetsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeScalingActivities = "DescribeScalingActivities" - -// DescribeScalingActivitiesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeScalingActivities operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeScalingActivities for more information on using the DescribeScalingActivities -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeScalingActivitiesRequest method. -// req, resp := client.DescribeScalingActivitiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalingActivities -func (c *ApplicationAutoScaling) DescribeScalingActivitiesRequest(input *DescribeScalingActivitiesInput) (req *request.Request, output *DescribeScalingActivitiesOutput) { - op := &request.Operation{ - Name: opDescribeScalingActivities, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeScalingActivitiesInput{} - } - - output = &DescribeScalingActivitiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeScalingActivities API operation for Application Auto Scaling. -// -// Provides descriptive information about the scaling activities in the specified -// namespace from the previous six weeks. -// -// You can filter the results using the ResourceId and ScalableDimension parameters. -// -// Scaling activities are triggered by CloudWatch alarms that are associated -// with scaling policies. To view the scaling policies for a service namespace, -// see DescribeScalingPolicies. To create a scaling policy or update an existing -// one, see PutScalingPolicy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Application Auto Scaling's -// API operation DescribeScalingActivities for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// An exception was thrown for a validation issue. Review the available parameters -// for the API request. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token supplied was invalid. -// -// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException" -// Concurrent updates caused an exception, for example, if you request an update -// to an Application Auto Scaling resource that already has a pending update. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalingActivities -func (c *ApplicationAutoScaling) DescribeScalingActivities(input *DescribeScalingActivitiesInput) (*DescribeScalingActivitiesOutput, error) { - req, out := c.DescribeScalingActivitiesRequest(input) - return out, req.Send() -} - -// DescribeScalingActivitiesWithContext is the same as DescribeScalingActivities with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeScalingActivities for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApplicationAutoScaling) DescribeScalingActivitiesWithContext(ctx aws.Context, input *DescribeScalingActivitiesInput, opts ...request.Option) (*DescribeScalingActivitiesOutput, error) { - req, out := c.DescribeScalingActivitiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeScalingActivitiesPages iterates over the pages of a DescribeScalingActivities operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeScalingActivities 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 DescribeScalingActivities operation. -// pageNum := 0 -// err := client.DescribeScalingActivitiesPages(params, -// func(page *DescribeScalingActivitiesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ApplicationAutoScaling) DescribeScalingActivitiesPages(input *DescribeScalingActivitiesInput, fn func(*DescribeScalingActivitiesOutput, bool) bool) error { - return c.DescribeScalingActivitiesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeScalingActivitiesPagesWithContext same as DescribeScalingActivitiesPages 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 *ApplicationAutoScaling) DescribeScalingActivitiesPagesWithContext(ctx aws.Context, input *DescribeScalingActivitiesInput, fn func(*DescribeScalingActivitiesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeScalingActivitiesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeScalingActivitiesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScalingActivitiesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeScalingPolicies = "DescribeScalingPolicies" - -// DescribeScalingPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeScalingPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeScalingPolicies for more information on using the DescribeScalingPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeScalingPoliciesRequest method. -// req, resp := client.DescribeScalingPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalingPolicies -func (c *ApplicationAutoScaling) DescribeScalingPoliciesRequest(input *DescribeScalingPoliciesInput) (req *request.Request, output *DescribeScalingPoliciesOutput) { - op := &request.Operation{ - Name: opDescribeScalingPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeScalingPoliciesInput{} - } - - output = &DescribeScalingPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeScalingPolicies API operation for Application Auto Scaling. -// -// Describes the scaling policies for the specified service namespace. -// -// You can filter the results using the ResourceId, ScalableDimension, and PolicyNames -// parameters. -// -// To create a scaling policy or update an existing one, see PutScalingPolicy. -// If you are no longer using a scaling policy, you can delete it using DeleteScalingPolicy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Application Auto Scaling's -// API operation DescribeScalingPolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// An exception was thrown for a validation issue. Review the available parameters -// for the API request. -// -// * ErrCodeFailedResourceAccessException "FailedResourceAccessException" -// Failed access to resources caused an exception. This exception is thrown -// when Application Auto Scaling is unable to retrieve the alarms associated -// with a scaling policy due to a client error, for example, if the role ARN -// specified for a scalable target does not have permission to call the CloudWatch -// DescribeAlarms (http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html) -// on your behalf. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token supplied was invalid. -// -// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException" -// Concurrent updates caused an exception, for example, if you request an update -// to an Application Auto Scaling resource that already has a pending update. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalingPolicies -func (c *ApplicationAutoScaling) DescribeScalingPolicies(input *DescribeScalingPoliciesInput) (*DescribeScalingPoliciesOutput, error) { - req, out := c.DescribeScalingPoliciesRequest(input) - return out, req.Send() -} - -// DescribeScalingPoliciesWithContext is the same as DescribeScalingPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeScalingPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApplicationAutoScaling) DescribeScalingPoliciesWithContext(ctx aws.Context, input *DescribeScalingPoliciesInput, opts ...request.Option) (*DescribeScalingPoliciesOutput, error) { - req, out := c.DescribeScalingPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeScalingPoliciesPages iterates over the pages of a DescribeScalingPolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeScalingPolicies 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 DescribeScalingPolicies operation. -// pageNum := 0 -// err := client.DescribeScalingPoliciesPages(params, -// func(page *DescribeScalingPoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ApplicationAutoScaling) DescribeScalingPoliciesPages(input *DescribeScalingPoliciesInput, fn func(*DescribeScalingPoliciesOutput, bool) bool) error { - return c.DescribeScalingPoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeScalingPoliciesPagesWithContext same as DescribeScalingPoliciesPages 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 *ApplicationAutoScaling) DescribeScalingPoliciesPagesWithContext(ctx aws.Context, input *DescribeScalingPoliciesInput, fn func(*DescribeScalingPoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeScalingPoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeScalingPoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScalingPoliciesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeScheduledActions = "DescribeScheduledActions" - -// DescribeScheduledActionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeScheduledActions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeScheduledActions for more information on using the DescribeScheduledActions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeScheduledActionsRequest method. -// req, resp := client.DescribeScheduledActionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScheduledActions -func (c *ApplicationAutoScaling) DescribeScheduledActionsRequest(input *DescribeScheduledActionsInput) (req *request.Request, output *DescribeScheduledActionsOutput) { - op := &request.Operation{ - Name: opDescribeScheduledActions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeScheduledActionsInput{} - } - - output = &DescribeScheduledActionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeScheduledActions API operation for Application Auto Scaling. -// -// Describes the scheduled actions for the specified service namespace. -// -// You can filter the results using the ResourceId, ScalableDimension, and ScheduledActionNames -// parameters. -// -// To create a scheduled action or update an existing one, see PutScheduledAction. -// If you are no longer using a scheduled action, you can delete it using DeleteScheduledAction. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Application Auto Scaling's -// API operation DescribeScheduledActions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// An exception was thrown for a validation issue. Review the available parameters -// for the API request. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token supplied was invalid. -// -// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException" -// Concurrent updates caused an exception, for example, if you request an update -// to an Application Auto Scaling resource that already has a pending update. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScheduledActions -func (c *ApplicationAutoScaling) DescribeScheduledActions(input *DescribeScheduledActionsInput) (*DescribeScheduledActionsOutput, error) { - req, out := c.DescribeScheduledActionsRequest(input) - return out, req.Send() -} - -// DescribeScheduledActionsWithContext is the same as DescribeScheduledActions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeScheduledActions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApplicationAutoScaling) DescribeScheduledActionsWithContext(ctx aws.Context, input *DescribeScheduledActionsInput, opts ...request.Option) (*DescribeScheduledActionsOutput, error) { - req, out := c.DescribeScheduledActionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutScalingPolicy = "PutScalingPolicy" - -// PutScalingPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutScalingPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutScalingPolicy for more information on using the PutScalingPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutScalingPolicyRequest method. -// req, resp := client.PutScalingPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScalingPolicy -func (c *ApplicationAutoScaling) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req *request.Request, output *PutScalingPolicyOutput) { - op := &request.Operation{ - Name: opPutScalingPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutScalingPolicyInput{} - } - - output = &PutScalingPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutScalingPolicy API operation for Application Auto Scaling. -// -// Creates or updates a policy for an Application Auto Scaling scalable target. -// -// Each scalable target is identified by a service namespace, resource ID, and -// scalable dimension. A scaling policy applies to the scalable target identified -// by those three attributes. You cannot create a scaling policy until you register -// the scalable target using RegisterScalableTarget. -// -// To update a policy, specify its policy name and the parameters that you want -// to change. Any parameters that you don't specify are not changed by this -// update request. -// -// You can view the scaling policies for a service namespace using DescribeScalingPolicies. -// If you are no longer using a scaling policy, you can delete it using DeleteScalingPolicy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Application Auto Scaling's -// API operation PutScalingPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// An exception was thrown for a validation issue. Review the available parameters -// for the API request. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A per-account resource limit is exceeded. For more information, see Application -// Auto Scaling Limits (http://docs.aws.amazon.com/ApplicationAutoScaling/latest/userguide/application-auto-scaling-limits.html). -// -// * ErrCodeObjectNotFoundException "ObjectNotFoundException" -// The specified object could not be found. For any operation that depends on -// the existence of a scalable target, this exception is thrown if the scalable -// target with the specified service namespace, resource ID, and scalable dimension -// does not exist. For any operation that deletes or deregisters a resource, -// this exception is thrown if the resource cannot be found. -// -// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException" -// Concurrent updates caused an exception, for example, if you request an update -// to an Application Auto Scaling resource that already has a pending update. -// -// * ErrCodeFailedResourceAccessException "FailedResourceAccessException" -// Failed access to resources caused an exception. This exception is thrown -// when Application Auto Scaling is unable to retrieve the alarms associated -// with a scaling policy due to a client error, for example, if the role ARN -// specified for a scalable target does not have permission to call the CloudWatch -// DescribeAlarms (http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html) -// on your behalf. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScalingPolicy -func (c *ApplicationAutoScaling) PutScalingPolicy(input *PutScalingPolicyInput) (*PutScalingPolicyOutput, error) { - req, out := c.PutScalingPolicyRequest(input) - return out, req.Send() -} - -// PutScalingPolicyWithContext is the same as PutScalingPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutScalingPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApplicationAutoScaling) PutScalingPolicyWithContext(ctx aws.Context, input *PutScalingPolicyInput, opts ...request.Option) (*PutScalingPolicyOutput, error) { - req, out := c.PutScalingPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutScheduledAction = "PutScheduledAction" - -// PutScheduledActionRequest generates a "aws/request.Request" representing the -// client's request for the PutScheduledAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutScheduledAction for more information on using the PutScheduledAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutScheduledActionRequest method. -// req, resp := client.PutScheduledActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScheduledAction -func (c *ApplicationAutoScaling) PutScheduledActionRequest(input *PutScheduledActionInput) (req *request.Request, output *PutScheduledActionOutput) { - op := &request.Operation{ - Name: opPutScheduledAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutScheduledActionInput{} - } - - output = &PutScheduledActionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutScheduledAction API operation for Application Auto Scaling. -// -// Creates or updates a scheduled action for an Application Auto Scaling scalable -// target. -// -// Each scalable target is identified by a service namespace, resource ID, and -// scalable dimension. A scheduled action applies to the scalable target identified -// by those three attributes. You cannot create a scheduled action until you -// register the scalable target using RegisterScalableTarget. -// -// To update an action, specify its name and the parameters that you want to -// change. If you don't specify start and end times, the old values are deleted. -// Any other parameters that you don't specify are not changed by this update -// request. -// -// You can view the scheduled actions using DescribeScheduledActions. If you -// are no longer using a scheduled action, you can delete it using DeleteScheduledAction. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Application Auto Scaling's -// API operation PutScheduledAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// An exception was thrown for a validation issue. Review the available parameters -// for the API request. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A per-account resource limit is exceeded. For more information, see Application -// Auto Scaling Limits (http://docs.aws.amazon.com/ApplicationAutoScaling/latest/userguide/application-auto-scaling-limits.html). -// -// * ErrCodeObjectNotFoundException "ObjectNotFoundException" -// The specified object could not be found. For any operation that depends on -// the existence of a scalable target, this exception is thrown if the scalable -// target with the specified service namespace, resource ID, and scalable dimension -// does not exist. For any operation that deletes or deregisters a resource, -// this exception is thrown if the resource cannot be found. -// -// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException" -// Concurrent updates caused an exception, for example, if you request an update -// to an Application Auto Scaling resource that already has a pending update. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScheduledAction -func (c *ApplicationAutoScaling) PutScheduledAction(input *PutScheduledActionInput) (*PutScheduledActionOutput, error) { - req, out := c.PutScheduledActionRequest(input) - return out, req.Send() -} - -// PutScheduledActionWithContext is the same as PutScheduledAction with the addition of -// the ability to pass a context and additional request options. -// -// See PutScheduledAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApplicationAutoScaling) PutScheduledActionWithContext(ctx aws.Context, input *PutScheduledActionInput, opts ...request.Option) (*PutScheduledActionOutput, error) { - req, out := c.PutScheduledActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterScalableTarget = "RegisterScalableTarget" - -// RegisterScalableTargetRequest generates a "aws/request.Request" representing the -// client's request for the RegisterScalableTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterScalableTarget for more information on using the RegisterScalableTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterScalableTargetRequest method. -// req, resp := client.RegisterScalableTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/RegisterScalableTarget -func (c *ApplicationAutoScaling) RegisterScalableTargetRequest(input *RegisterScalableTargetInput) (req *request.Request, output *RegisterScalableTargetOutput) { - op := &request.Operation{ - Name: opRegisterScalableTarget, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterScalableTargetInput{} - } - - output = &RegisterScalableTargetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RegisterScalableTarget API operation for Application Auto Scaling. -// -// Registers or updates a scalable target. A scalable target is a resource that -// Application Auto Scaling can scale out or scale in. After you have registered -// a scalable target, you can use this operation to update the minimum and maximum -// values for its scalable dimension. -// -// After you register a scalable target, you can create and apply scaling policies -// using PutScalingPolicy. You can view the scaling policies for a service namespace -// using DescribeScalableTargets. If you no longer need a scalable target, you -// can deregister it using DeregisterScalableTarget. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Application Auto Scaling's -// API operation RegisterScalableTarget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// An exception was thrown for a validation issue. Review the available parameters -// for the API request. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A per-account resource limit is exceeded. For more information, see Application -// Auto Scaling Limits (http://docs.aws.amazon.com/ApplicationAutoScaling/latest/userguide/application-auto-scaling-limits.html). -// -// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException" -// Concurrent updates caused an exception, for example, if you request an update -// to an Application Auto Scaling resource that already has a pending update. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/RegisterScalableTarget -func (c *ApplicationAutoScaling) RegisterScalableTarget(input *RegisterScalableTargetInput) (*RegisterScalableTargetOutput, error) { - req, out := c.RegisterScalableTargetRequest(input) - return out, req.Send() -} - -// RegisterScalableTargetWithContext is the same as RegisterScalableTarget with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterScalableTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ApplicationAutoScaling) RegisterScalableTargetWithContext(ctx aws.Context, input *RegisterScalableTargetInput, opts ...request.Option) (*RegisterScalableTargetOutput, error) { - req, out := c.RegisterScalableTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Represents a CloudWatch alarm associated with a scaling policy. -type Alarm struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the alarm. - // - // AlarmARN is a required field - AlarmARN *string `type:"string" required:"true"` - - // The name of the alarm. - // - // AlarmName is a required field - AlarmName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Alarm) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Alarm) GoString() string { - return s.String() -} - -// SetAlarmARN sets the AlarmARN field's value. -func (s *Alarm) SetAlarmARN(v string) *Alarm { - s.AlarmARN = &v - return s -} - -// SetAlarmName sets the AlarmName field's value. -func (s *Alarm) SetAlarmName(v string) *Alarm { - s.AlarmName = &v - return s -} - -// Configures a customized metric for a target tracking policy. -type CustomizedMetricSpecification struct { - _ struct{} `type:"structure"` - - // The dimensions of the metric. - Dimensions []*MetricDimension `type:"list"` - - // The name of the metric. - // - // MetricName is a required field - MetricName *string `type:"string" required:"true"` - - // The namespace of the metric. - // - // Namespace is a required field - Namespace *string `type:"string" required:"true"` - - // The statistic of the metric. - // - // Statistic is a required field - Statistic *string `type:"string" required:"true" enum:"MetricStatistic"` - - // The unit of the metric. - Unit *string `type:"string"` -} - -// String returns the string representation -func (s CustomizedMetricSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CustomizedMetricSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomizedMetricSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomizedMetricSpecification"} - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.Namespace == nil { - invalidParams.Add(request.NewErrParamRequired("Namespace")) - } - if s.Statistic == nil { - invalidParams.Add(request.NewErrParamRequired("Statistic")) - } - if s.Dimensions != nil { - for i, v := range s.Dimensions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDimensions sets the Dimensions field's value. -func (s *CustomizedMetricSpecification) SetDimensions(v []*MetricDimension) *CustomizedMetricSpecification { - s.Dimensions = v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *CustomizedMetricSpecification) SetMetricName(v string) *CustomizedMetricSpecification { - s.MetricName = &v - return s -} - -// SetNamespace sets the Namespace field's value. -func (s *CustomizedMetricSpecification) SetNamespace(v string) *CustomizedMetricSpecification { - s.Namespace = &v - return s -} - -// SetStatistic sets the Statistic field's value. -func (s *CustomizedMetricSpecification) SetStatistic(v string) *CustomizedMetricSpecification { - s.Statistic = &v - return s -} - -// SetUnit sets the Unit field's value. -func (s *CustomizedMetricSpecification) SetUnit(v string) *CustomizedMetricSpecification { - s.Unit = &v - return s -} - -type DeleteScalingPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the scaling policy. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The identifier of the resource associated with the scalable target. This - // string consists of the resource type and unique identifier. - // - // * ECS service - The resource type is service and the unique identifier - // is the cluster name and service name. Example: service/default/sample-webapp. - // - // * Spot fleet request - The resource type is spot-fleet-request and the - // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. - // - // * EMR cluster - The resource type is instancegroup and the unique identifier - // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. - // - // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier - // is the fleet name. Example: fleet/sample-fleet. - // - // * DynamoDB table - The resource type is table and the unique identifier - // is the resource ID. Example: table/my-table. - // - // * DynamoDB global secondary index - The resource type is index and the - // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. - // - // * Aurora DB cluster - The resource type is cluster and the unique identifier - // is the cluster name. Example: cluster:my-db-cluster. - // - // * Amazon SageMaker endpoint variants - The resource type is variant and - // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. - // - // * Custom resources are not supported with a resource type. This parameter - // must specify the OutputValue from the CloudFormation template stack used - // to access the resources. The unique identifier is defined by the service - // provider. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // The scalable dimension. This string consists of the service namespace, resource - // type, and scaling property. - // - // * ecs:service:DesiredCount - The desired task count of an ECS service. - // - // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot - // fleet request. - // - // * elasticmapreduce:instancegroup:InstanceCount - The instance count of - // an EMR Instance Group. - // - // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream - // 2.0 fleet. - // - // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB table. - // - // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB table. - // - // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB global secondary index. - // - // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB global secondary index. - // - // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora - // DB cluster. Available for Aurora MySQL-compatible edition. - // - // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances - // for an Amazon SageMaker model endpoint variant. - // - // * custom-resource:ResourceType:Property - The scalable dimension for a - // custom resource provided by your own application or service. - // - // ScalableDimension is a required field - ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` -} - -// String returns the string representation -func (s DeleteScalingPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteScalingPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteScalingPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteScalingPolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ScalableDimension == nil { - invalidParams.Add(request.NewErrParamRequired("ScalableDimension")) - } - if s.ServiceNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteScalingPolicyInput) SetPolicyName(v string) *DeleteScalingPolicyInput { - s.PolicyName = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *DeleteScalingPolicyInput) SetResourceId(v string) *DeleteScalingPolicyInput { - s.ResourceId = &v - return s -} - -// SetScalableDimension sets the ScalableDimension field's value. -func (s *DeleteScalingPolicyInput) SetScalableDimension(v string) *DeleteScalingPolicyInput { - s.ScalableDimension = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *DeleteScalingPolicyInput) SetServiceNamespace(v string) *DeleteScalingPolicyInput { - s.ServiceNamespace = &v - return s -} - -type DeleteScalingPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteScalingPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteScalingPolicyOutput) GoString() string { - return s.String() -} - -type DeleteScheduledActionInput struct { - _ struct{} `type:"structure"` - - // The identifier of the resource associated with the scheduled action. This - // string consists of the resource type and unique identifier. - // - // * ECS service - The resource type is service and the unique identifier - // is the cluster name and service name. Example: service/default/sample-webapp. - // - // * Spot fleet request - The resource type is spot-fleet-request and the - // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. - // - // * EMR cluster - The resource type is instancegroup and the unique identifier - // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. - // - // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier - // is the fleet name. Example: fleet/sample-fleet. - // - // * DynamoDB table - The resource type is table and the unique identifier - // is the resource ID. Example: table/my-table. - // - // * DynamoDB global secondary index - The resource type is index and the - // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. - // - // * Aurora DB cluster - The resource type is cluster and the unique identifier - // is the cluster name. Example: cluster:my-db-cluster. - // - // * Amazon SageMaker endpoint variants - The resource type is variant and - // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. - // - // * Custom resources are not supported with a resource type. This parameter - // must specify the OutputValue from the CloudFormation template stack used - // to access the resources. The unique identifier is defined by the service - // provider. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // The scalable dimension. This string consists of the service namespace, resource - // type, and scaling property. - // - // * ecs:service:DesiredCount - The desired task count of an ECS service. - // - // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot - // fleet request. - // - // * elasticmapreduce:instancegroup:InstanceCount - The instance count of - // an EMR Instance Group. - // - // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream - // 2.0 fleet. - // - // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB table. - // - // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB table. - // - // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB global secondary index. - // - // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB global secondary index. - // - // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora - // DB cluster. Available for Aurora MySQL-compatible edition. - // - // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances - // for an Amazon SageMaker model endpoint variant. - // - // * custom-resource:ResourceType:Property - The scalable dimension for a - // custom resource provided by your own application or service. - ScalableDimension *string `type:"string" enum:"ScalableDimension"` - - // The name of the scheduled action. - // - // ScheduledActionName is a required field - ScheduledActionName *string `min:"1" type:"string" required:"true"` - - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` -} - -// String returns the string representation -func (s DeleteScheduledActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteScheduledActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteScheduledActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteScheduledActionInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ScheduledActionName == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduledActionName")) - } - if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1)) - } - if s.ServiceNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *DeleteScheduledActionInput) SetResourceId(v string) *DeleteScheduledActionInput { - s.ResourceId = &v - return s -} - -// SetScalableDimension sets the ScalableDimension field's value. -func (s *DeleteScheduledActionInput) SetScalableDimension(v string) *DeleteScheduledActionInput { - s.ScalableDimension = &v - return s -} - -// SetScheduledActionName sets the ScheduledActionName field's value. -func (s *DeleteScheduledActionInput) SetScheduledActionName(v string) *DeleteScheduledActionInput { - s.ScheduledActionName = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *DeleteScheduledActionInput) SetServiceNamespace(v string) *DeleteScheduledActionInput { - s.ServiceNamespace = &v - return s -} - -type DeleteScheduledActionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteScheduledActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteScheduledActionOutput) GoString() string { - return s.String() -} - -type DeregisterScalableTargetInput struct { - _ struct{} `type:"structure"` - - // The identifier of the resource associated with the scalable target. This - // string consists of the resource type and unique identifier. - // - // * ECS service - The resource type is service and the unique identifier - // is the cluster name and service name. Example: service/default/sample-webapp. - // - // * Spot fleet request - The resource type is spot-fleet-request and the - // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. - // - // * EMR cluster - The resource type is instancegroup and the unique identifier - // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. - // - // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier - // is the fleet name. Example: fleet/sample-fleet. - // - // * DynamoDB table - The resource type is table and the unique identifier - // is the resource ID. Example: table/my-table. - // - // * DynamoDB global secondary index - The resource type is index and the - // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. - // - // * Aurora DB cluster - The resource type is cluster and the unique identifier - // is the cluster name. Example: cluster:my-db-cluster. - // - // * Amazon SageMaker endpoint variants - The resource type is variant and - // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. - // - // * Custom resources are not supported with a resource type. This parameter - // must specify the OutputValue from the CloudFormation template stack used - // to access the resources. The unique identifier is defined by the service - // provider. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // The scalable dimension associated with the scalable target. This string consists - // of the service namespace, resource type, and scaling property. - // - // * ecs:service:DesiredCount - The desired task count of an ECS service. - // - // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot - // fleet request. - // - // * elasticmapreduce:instancegroup:InstanceCount - The instance count of - // an EMR Instance Group. - // - // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream - // 2.0 fleet. - // - // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB table. - // - // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB table. - // - // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB global secondary index. - // - // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB global secondary index. - // - // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora - // DB cluster. Available for Aurora MySQL-compatible edition. - // - // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances - // for an Amazon SageMaker model endpoint variant. - // - // * custom-resource:ResourceType:Property - The scalable dimension for a - // custom resource provided by your own application or service. - // - // ScalableDimension is a required field - ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` -} - -// String returns the string representation -func (s DeregisterScalableTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterScalableTargetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterScalableTargetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterScalableTargetInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ScalableDimension == nil { - invalidParams.Add(request.NewErrParamRequired("ScalableDimension")) - } - if s.ServiceNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *DeregisterScalableTargetInput) SetResourceId(v string) *DeregisterScalableTargetInput { - s.ResourceId = &v - return s -} - -// SetScalableDimension sets the ScalableDimension field's value. -func (s *DeregisterScalableTargetInput) SetScalableDimension(v string) *DeregisterScalableTargetInput { - s.ScalableDimension = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *DeregisterScalableTargetInput) SetServiceNamespace(v string) *DeregisterScalableTargetInput { - s.ServiceNamespace = &v - return s -} - -type DeregisterScalableTargetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeregisterScalableTargetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterScalableTargetOutput) GoString() string { - return s.String() -} - -type DescribeScalableTargetsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of scalable targets. This value can be between 1 and 50. - // The default value is 50. - // - // If this parameter is used, the operation returns up to MaxResults results - // at a time, along with a NextToken value. To get the next set of results, - // include the NextToken value in a subsequent call. If this parameter is not - // used, the operation returns up to 50 results and a NextToken value, if applicable. - MaxResults *int64 `type:"integer"` - - // The token for the next set of results. - NextToken *string `type:"string"` - - // The identifier of the resource associated with the scalable target. This - // string consists of the resource type and unique identifier. If you specify - // a scalable dimension, you must also specify a resource ID. - // - // * ECS service - The resource type is service and the unique identifier - // is the cluster name and service name. Example: service/default/sample-webapp. - // - // * Spot fleet request - The resource type is spot-fleet-request and the - // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. - // - // * EMR cluster - The resource type is instancegroup and the unique identifier - // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. - // - // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier - // is the fleet name. Example: fleet/sample-fleet. - // - // * DynamoDB table - The resource type is table and the unique identifier - // is the resource ID. Example: table/my-table. - // - // * DynamoDB global secondary index - The resource type is index and the - // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. - // - // * Aurora DB cluster - The resource type is cluster and the unique identifier - // is the cluster name. Example: cluster:my-db-cluster. - // - // * Amazon SageMaker endpoint variants - The resource type is variant and - // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. - // - // * Custom resources are not supported with a resource type. This parameter - // must specify the OutputValue from the CloudFormation template stack used - // to access the resources. The unique identifier is defined by the service - // provider. - ResourceIds []*string `type:"list"` - - // The scalable dimension associated with the scalable target. This string consists - // of the service namespace, resource type, and scaling property. If you specify - // a scalable dimension, you must also specify a resource ID. - // - // * ecs:service:DesiredCount - The desired task count of an ECS service. - // - // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot - // fleet request. - // - // * elasticmapreduce:instancegroup:InstanceCount - The instance count of - // an EMR Instance Group. - // - // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream - // 2.0 fleet. - // - // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB table. - // - // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB table. - // - // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB global secondary index. - // - // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB global secondary index. - // - // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora - // DB cluster. Available for Aurora MySQL-compatible edition. - // - // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances - // for an Amazon SageMaker model endpoint variant. - // - // * custom-resource:ResourceType:Property - The scalable dimension for a - // custom resource provided by your own application or service. - ScalableDimension *string `type:"string" enum:"ScalableDimension"` - - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` -} - -// String returns the string representation -func (s DescribeScalableTargetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScalableTargetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeScalableTargetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeScalableTargetsInput"} - if s.ServiceNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeScalableTargetsInput) SetMaxResults(v int64) *DescribeScalableTargetsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScalableTargetsInput) SetNextToken(v string) *DescribeScalableTargetsInput { - s.NextToken = &v - return s -} - -// SetResourceIds sets the ResourceIds field's value. -func (s *DescribeScalableTargetsInput) SetResourceIds(v []*string) *DescribeScalableTargetsInput { - s.ResourceIds = v - return s -} - -// SetScalableDimension sets the ScalableDimension field's value. -func (s *DescribeScalableTargetsInput) SetScalableDimension(v string) *DescribeScalableTargetsInput { - s.ScalableDimension = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *DescribeScalableTargetsInput) SetServiceNamespace(v string) *DescribeScalableTargetsInput { - s.ServiceNamespace = &v - return s -} - -type DescribeScalableTargetsOutput struct { - _ struct{} `type:"structure"` - - // The token required to get the next set of results. This value is null if - // there are no more results to return. - NextToken *string `type:"string"` - - // The scalable targets that match the request parameters. - ScalableTargets []*ScalableTarget `type:"list"` -} - -// String returns the string representation -func (s DescribeScalableTargetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScalableTargetsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScalableTargetsOutput) SetNextToken(v string) *DescribeScalableTargetsOutput { - s.NextToken = &v - return s -} - -// SetScalableTargets sets the ScalableTargets field's value. -func (s *DescribeScalableTargetsOutput) SetScalableTargets(v []*ScalableTarget) *DescribeScalableTargetsOutput { - s.ScalableTargets = v - return s -} - -type DescribeScalingActivitiesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of scalable targets. This value can be between 1 and 50. - // The default value is 50. - // - // If this parameter is used, the operation returns up to MaxResults results - // at a time, along with a NextToken value. To get the next set of results, - // include the NextToken value in a subsequent call. If this parameter is not - // used, the operation returns up to 50 results and a NextToken value, if applicable. - MaxResults *int64 `type:"integer"` - - // The token for the next set of results. - NextToken *string `type:"string"` - - // The identifier of the resource associated with the scaling activity. This - // string consists of the resource type and unique identifier. If you specify - // a scalable dimension, you must also specify a resource ID. - // - // * ECS service - The resource type is service and the unique identifier - // is the cluster name and service name. Example: service/default/sample-webapp. - // - // * Spot fleet request - The resource type is spot-fleet-request and the - // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. - // - // * EMR cluster - The resource type is instancegroup and the unique identifier - // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. - // - // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier - // is the fleet name. Example: fleet/sample-fleet. - // - // * DynamoDB table - The resource type is table and the unique identifier - // is the resource ID. Example: table/my-table. - // - // * DynamoDB global secondary index - The resource type is index and the - // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. - // - // * Aurora DB cluster - The resource type is cluster and the unique identifier - // is the cluster name. Example: cluster:my-db-cluster. - // - // * Amazon SageMaker endpoint variants - The resource type is variant and - // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. - // - // * Custom resources are not supported with a resource type. This parameter - // must specify the OutputValue from the CloudFormation template stack used - // to access the resources. The unique identifier is defined by the service - // provider. - ResourceId *string `min:"1" type:"string"` - - // The scalable dimension. This string consists of the service namespace, resource - // type, and scaling property. If you specify a scalable dimension, you must - // also specify a resource ID. - // - // * ecs:service:DesiredCount - The desired task count of an ECS service. - // - // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot - // fleet request. - // - // * elasticmapreduce:instancegroup:InstanceCount - The instance count of - // an EMR Instance Group. - // - // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream - // 2.0 fleet. - // - // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB table. - // - // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB table. - // - // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB global secondary index. - // - // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB global secondary index. - // - // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora - // DB cluster. Available for Aurora MySQL-compatible edition. - // - // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances - // for an Amazon SageMaker model endpoint variant. - // - // * custom-resource:ResourceType:Property - The scalable dimension for a - // custom resource provided by your own application or service. - ScalableDimension *string `type:"string" enum:"ScalableDimension"` - - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` -} - -// String returns the string representation -func (s DescribeScalingActivitiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScalingActivitiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeScalingActivitiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeScalingActivitiesInput"} - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ServiceNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeScalingActivitiesInput) SetMaxResults(v int64) *DescribeScalingActivitiesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScalingActivitiesInput) SetNextToken(v string) *DescribeScalingActivitiesInput { - s.NextToken = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *DescribeScalingActivitiesInput) SetResourceId(v string) *DescribeScalingActivitiesInput { - s.ResourceId = &v - return s -} - -// SetScalableDimension sets the ScalableDimension field's value. -func (s *DescribeScalingActivitiesInput) SetScalableDimension(v string) *DescribeScalingActivitiesInput { - s.ScalableDimension = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *DescribeScalingActivitiesInput) SetServiceNamespace(v string) *DescribeScalingActivitiesInput { - s.ServiceNamespace = &v - return s -} - -type DescribeScalingActivitiesOutput struct { - _ struct{} `type:"structure"` - - // The token required to get the next set of results. This value is null if - // there are no more results to return. - NextToken *string `type:"string"` - - // A list of scaling activity objects. - ScalingActivities []*ScalingActivity `type:"list"` -} - -// String returns the string representation -func (s DescribeScalingActivitiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScalingActivitiesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScalingActivitiesOutput) SetNextToken(v string) *DescribeScalingActivitiesOutput { - s.NextToken = &v - return s -} - -// SetScalingActivities sets the ScalingActivities field's value. -func (s *DescribeScalingActivitiesOutput) SetScalingActivities(v []*ScalingActivity) *DescribeScalingActivitiesOutput { - s.ScalingActivities = v - return s -} - -type DescribeScalingPoliciesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of scalable targets. This value can be between 1 and 50. - // The default value is 50. - // - // If this parameter is used, the operation returns up to MaxResults results - // at a time, along with a NextToken value. To get the next set of results, - // include the NextToken value in a subsequent call. If this parameter is not - // used, the operation returns up to 50 results and a NextToken value, if applicable. - MaxResults *int64 `type:"integer"` - - // The token for the next set of results. - NextToken *string `type:"string"` - - // The names of the scaling policies to describe. - PolicyNames []*string `type:"list"` - - // The identifier of the resource associated with the scaling policy. This string - // consists of the resource type and unique identifier. If you specify a scalable - // dimension, you must also specify a resource ID. - // - // * ECS service - The resource type is service and the unique identifier - // is the cluster name and service name. Example: service/default/sample-webapp. - // - // * Spot fleet request - The resource type is spot-fleet-request and the - // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. - // - // * EMR cluster - The resource type is instancegroup and the unique identifier - // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. - // - // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier - // is the fleet name. Example: fleet/sample-fleet. - // - // * DynamoDB table - The resource type is table and the unique identifier - // is the resource ID. Example: table/my-table. - // - // * DynamoDB global secondary index - The resource type is index and the - // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. - // - // * Aurora DB cluster - The resource type is cluster and the unique identifier - // is the cluster name. Example: cluster:my-db-cluster. - // - // * Amazon SageMaker endpoint variants - The resource type is variant and - // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. - // - // * Custom resources are not supported with a resource type. This parameter - // must specify the OutputValue from the CloudFormation template stack used - // to access the resources. The unique identifier is defined by the service - // provider. - ResourceId *string `min:"1" type:"string"` - - // The scalable dimension. This string consists of the service namespace, resource - // type, and scaling property. If you specify a scalable dimension, you must - // also specify a resource ID. - // - // * ecs:service:DesiredCount - The desired task count of an ECS service. - // - // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot - // fleet request. - // - // * elasticmapreduce:instancegroup:InstanceCount - The instance count of - // an EMR Instance Group. - // - // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream - // 2.0 fleet. - // - // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB table. - // - // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB table. - // - // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB global secondary index. - // - // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB global secondary index. - // - // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora - // DB cluster. Available for Aurora MySQL-compatible edition. - // - // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances - // for an Amazon SageMaker model endpoint variant. - // - // * custom-resource:ResourceType:Property - The scalable dimension for a - // custom resource provided by your own application or service. - ScalableDimension *string `type:"string" enum:"ScalableDimension"` - - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` -} - -// String returns the string representation -func (s DescribeScalingPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScalingPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeScalingPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeScalingPoliciesInput"} - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ServiceNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeScalingPoliciesInput) SetMaxResults(v int64) *DescribeScalingPoliciesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScalingPoliciesInput) SetNextToken(v string) *DescribeScalingPoliciesInput { - s.NextToken = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *DescribeScalingPoliciesInput) SetPolicyNames(v []*string) *DescribeScalingPoliciesInput { - s.PolicyNames = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *DescribeScalingPoliciesInput) SetResourceId(v string) *DescribeScalingPoliciesInput { - s.ResourceId = &v - return s -} - -// SetScalableDimension sets the ScalableDimension field's value. -func (s *DescribeScalingPoliciesInput) SetScalableDimension(v string) *DescribeScalingPoliciesInput { - s.ScalableDimension = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *DescribeScalingPoliciesInput) SetServiceNamespace(v string) *DescribeScalingPoliciesInput { - s.ServiceNamespace = &v - return s -} - -type DescribeScalingPoliciesOutput struct { - _ struct{} `type:"structure"` - - // The token required to get the next set of results. This value is null if - // there are no more results to return. - NextToken *string `type:"string"` - - // Information about the scaling policies. - ScalingPolicies []*ScalingPolicy `type:"list"` -} - -// String returns the string representation -func (s DescribeScalingPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScalingPoliciesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScalingPoliciesOutput) SetNextToken(v string) *DescribeScalingPoliciesOutput { - s.NextToken = &v - return s -} - -// SetScalingPolicies sets the ScalingPolicies field's value. -func (s *DescribeScalingPoliciesOutput) SetScalingPolicies(v []*ScalingPolicy) *DescribeScalingPoliciesOutput { - s.ScalingPolicies = v - return s -} - -type DescribeScheduledActionsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of scheduled action results. This value can be between - // 1 and 50. The default value is 50. - // - // If this parameter is used, the operation returns up to MaxResults results - // at a time, along with a NextToken value. To get the next set of results, - // include the NextToken value in a subsequent call. If this parameter is not - // used, the operation returns up to 50 results and a NextToken value, if applicable. - MaxResults *int64 `type:"integer"` - - // The token for the next set of results. - NextToken *string `type:"string"` - - // The identifier of the resource associated with the scheduled action. This - // string consists of the resource type and unique identifier. If you specify - // a scalable dimension, you must also specify a resource ID. - // - // * ECS service - The resource type is service and the unique identifier - // is the cluster name and service name. Example: service/default/sample-webapp. - // - // * Spot fleet request - The resource type is spot-fleet-request and the - // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. - // - // * EMR cluster - The resource type is instancegroup and the unique identifier - // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. - // - // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier - // is the fleet name. Example: fleet/sample-fleet. - // - // * DynamoDB table - The resource type is table and the unique identifier - // is the resource ID. Example: table/my-table. - // - // * DynamoDB global secondary index - The resource type is index and the - // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. - // - // * Aurora DB cluster - The resource type is cluster and the unique identifier - // is the cluster name. Example: cluster:my-db-cluster. - // - // * Amazon SageMaker endpoint variants - The resource type is variant and - // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. - // - // * Custom resources are not supported with a resource type. This parameter - // must specify the OutputValue from the CloudFormation template stack used - // to access the resources. The unique identifier is defined by the service - // provider. - ResourceId *string `min:"1" type:"string"` - - // The scalable dimension. This string consists of the service namespace, resource - // type, and scaling property. If you specify a scalable dimension, you must - // also specify a resource ID. - // - // * ecs:service:DesiredCount - The desired task count of an ECS service. - // - // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot - // fleet request. - // - // * elasticmapreduce:instancegroup:InstanceCount - The instance count of - // an EMR Instance Group. - // - // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream - // 2.0 fleet. - // - // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB table. - // - // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB table. - // - // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB global secondary index. - // - // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB global secondary index. - // - // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora - // DB cluster. Available for Aurora MySQL-compatible edition. - // - // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances - // for an Amazon SageMaker model endpoint variant. - // - // * custom-resource:ResourceType:Property - The scalable dimension for a - // custom resource provided by your own application or service. - ScalableDimension *string `type:"string" enum:"ScalableDimension"` - - // The names of the scheduled actions to describe. - ScheduledActionNames []*string `type:"list"` - - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` -} - -// String returns the string representation -func (s DescribeScheduledActionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScheduledActionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeScheduledActionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeScheduledActionsInput"} - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ServiceNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeScheduledActionsInput) SetMaxResults(v int64) *DescribeScheduledActionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScheduledActionsInput) SetNextToken(v string) *DescribeScheduledActionsInput { - s.NextToken = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *DescribeScheduledActionsInput) SetResourceId(v string) *DescribeScheduledActionsInput { - s.ResourceId = &v - return s -} - -// SetScalableDimension sets the ScalableDimension field's value. -func (s *DescribeScheduledActionsInput) SetScalableDimension(v string) *DescribeScheduledActionsInput { - s.ScalableDimension = &v - return s -} - -// SetScheduledActionNames sets the ScheduledActionNames field's value. -func (s *DescribeScheduledActionsInput) SetScheduledActionNames(v []*string) *DescribeScheduledActionsInput { - s.ScheduledActionNames = v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *DescribeScheduledActionsInput) SetServiceNamespace(v string) *DescribeScheduledActionsInput { - s.ServiceNamespace = &v - return s -} - -type DescribeScheduledActionsOutput struct { - _ struct{} `type:"structure"` - - // The token required to get the next set of results. This value is null if - // there are no more results to return. - NextToken *string `type:"string"` - - // Information about the scheduled actions. - ScheduledActions []*ScheduledAction `type:"list"` -} - -// String returns the string representation -func (s DescribeScheduledActionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScheduledActionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScheduledActionsOutput) SetNextToken(v string) *DescribeScheduledActionsOutput { - s.NextToken = &v - return s -} - -// SetScheduledActions sets the ScheduledActions field's value. -func (s *DescribeScheduledActionsOutput) SetScheduledActions(v []*ScheduledAction) *DescribeScheduledActionsOutput { - s.ScheduledActions = v - return s -} - -// Describes the dimension of a metric. -type MetricDimension struct { - _ struct{} `type:"structure"` - - // The name of the dimension. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The value of the dimension. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s MetricDimension) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricDimension) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MetricDimension) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MetricDimension"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *MetricDimension) SetName(v string) *MetricDimension { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *MetricDimension) SetValue(v string) *MetricDimension { - s.Value = &v - return s -} - -// Configures a predefined metric for a target tracking policy. -type PredefinedMetricSpecification struct { - _ struct{} `type:"structure"` - - // The metric type. The ALBRequestCountPerTarget metric type applies only to - // Spot fleet requests and ECS services. - // - // PredefinedMetricType is a required field - PredefinedMetricType *string `type:"string" required:"true" enum:"MetricType"` - - // Identifies the resource associated with the metric type. You can't specify - // a resource label unless the metric type is ALBRequestCountPerTarget and there - // is a target group attached to the Spot fleet request or ECS service. - // - // The format is app///targetgroup//, - // where: - // - // * app// is the final portion of - // the load balancer ARN - // - // * targetgroup// is the final portion - // of the target group ARN. - ResourceLabel *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PredefinedMetricSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PredefinedMetricSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PredefinedMetricSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PredefinedMetricSpecification"} - if s.PredefinedMetricType == nil { - invalidParams.Add(request.NewErrParamRequired("PredefinedMetricType")) - } - if s.ResourceLabel != nil && len(*s.ResourceLabel) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceLabel", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPredefinedMetricType sets the PredefinedMetricType field's value. -func (s *PredefinedMetricSpecification) SetPredefinedMetricType(v string) *PredefinedMetricSpecification { - s.PredefinedMetricType = &v - return s -} - -// SetResourceLabel sets the ResourceLabel field's value. -func (s *PredefinedMetricSpecification) SetResourceLabel(v string) *PredefinedMetricSpecification { - s.ResourceLabel = &v - return s -} - -type PutScalingPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the scaling policy. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The policy type. This parameter is required if you are creating a policy. - // - // For DynamoDB, only TargetTrackingScaling is supported. For Amazon ECS, Spot - // Fleet, and Amazon RDS, both StepScaling and TargetTrackingScaling are supported. - // For any other service, only StepScaling is supported. - PolicyType *string `type:"string" enum:"PolicyType"` - - // The identifier of the resource associated with the scaling policy. This string - // consists of the resource type and unique identifier. - // - // * ECS service - The resource type is service and the unique identifier - // is the cluster name and service name. Example: service/default/sample-webapp. - // - // * Spot fleet request - The resource type is spot-fleet-request and the - // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. - // - // * EMR cluster - The resource type is instancegroup and the unique identifier - // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. - // - // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier - // is the fleet name. Example: fleet/sample-fleet. - // - // * DynamoDB table - The resource type is table and the unique identifier - // is the resource ID. Example: table/my-table. - // - // * DynamoDB global secondary index - The resource type is index and the - // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. - // - // * Aurora DB cluster - The resource type is cluster and the unique identifier - // is the cluster name. Example: cluster:my-db-cluster. - // - // * Amazon SageMaker endpoint variants - The resource type is variant and - // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. - // - // * Custom resources are not supported with a resource type. This parameter - // must specify the OutputValue from the CloudFormation template stack used - // to access the resources. The unique identifier is defined by the service - // provider. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // The scalable dimension. This string consists of the service namespace, resource - // type, and scaling property. - // - // * ecs:service:DesiredCount - The desired task count of an ECS service. - // - // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot - // fleet request. - // - // * elasticmapreduce:instancegroup:InstanceCount - The instance count of - // an EMR Instance Group. - // - // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream - // 2.0 fleet. - // - // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB table. - // - // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB table. - // - // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB global secondary index. - // - // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB global secondary index. - // - // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora - // DB cluster. Available for Aurora MySQL-compatible edition. - // - // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances - // for an Amazon SageMaker model endpoint variant. - // - // * custom-resource:ResourceType:Property - The scalable dimension for a - // custom resource provided by your own application or service. - // - // ScalableDimension is a required field - ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` - - // A step scaling policy. - // - // This parameter is required if you are creating a policy and the policy type - // is StepScaling. - StepScalingPolicyConfiguration *StepScalingPolicyConfiguration `type:"structure"` - - // A target tracking policy. - // - // This parameter is required if you are creating a policy and the policy type - // is TargetTrackingScaling. - TargetTrackingScalingPolicyConfiguration *TargetTrackingScalingPolicyConfiguration `type:"structure"` -} - -// String returns the string representation -func (s PutScalingPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutScalingPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutScalingPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutScalingPolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ScalableDimension == nil { - invalidParams.Add(request.NewErrParamRequired("ScalableDimension")) - } - if s.ServiceNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) - } - if s.StepScalingPolicyConfiguration != nil { - if err := s.StepScalingPolicyConfiguration.Validate(); err != nil { - invalidParams.AddNested("StepScalingPolicyConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.TargetTrackingScalingPolicyConfiguration != nil { - if err := s.TargetTrackingScalingPolicyConfiguration.Validate(); err != nil { - invalidParams.AddNested("TargetTrackingScalingPolicyConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PutScalingPolicyInput) SetPolicyName(v string) *PutScalingPolicyInput { - s.PolicyName = &v - return s -} - -// SetPolicyType sets the PolicyType field's value. -func (s *PutScalingPolicyInput) SetPolicyType(v string) *PutScalingPolicyInput { - s.PolicyType = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *PutScalingPolicyInput) SetResourceId(v string) *PutScalingPolicyInput { - s.ResourceId = &v - return s -} - -// SetScalableDimension sets the ScalableDimension field's value. -func (s *PutScalingPolicyInput) SetScalableDimension(v string) *PutScalingPolicyInput { - s.ScalableDimension = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *PutScalingPolicyInput) SetServiceNamespace(v string) *PutScalingPolicyInput { - s.ServiceNamespace = &v - return s -} - -// SetStepScalingPolicyConfiguration sets the StepScalingPolicyConfiguration field's value. -func (s *PutScalingPolicyInput) SetStepScalingPolicyConfiguration(v *StepScalingPolicyConfiguration) *PutScalingPolicyInput { - s.StepScalingPolicyConfiguration = v - return s -} - -// SetTargetTrackingScalingPolicyConfiguration sets the TargetTrackingScalingPolicyConfiguration field's value. -func (s *PutScalingPolicyInput) SetTargetTrackingScalingPolicyConfiguration(v *TargetTrackingScalingPolicyConfiguration) *PutScalingPolicyInput { - s.TargetTrackingScalingPolicyConfiguration = v - return s -} - -type PutScalingPolicyOutput struct { - _ struct{} `type:"structure"` - - // The CloudWatch alarms created for the target tracking policy. - Alarms []*Alarm `type:"list"` - - // The Amazon Resource Name (ARN) of the resulting scaling policy. - // - // PolicyARN is a required field - PolicyARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutScalingPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutScalingPolicyOutput) GoString() string { - return s.String() -} - -// SetAlarms sets the Alarms field's value. -func (s *PutScalingPolicyOutput) SetAlarms(v []*Alarm) *PutScalingPolicyOutput { - s.Alarms = v - return s -} - -// SetPolicyARN sets the PolicyARN field's value. -func (s *PutScalingPolicyOutput) SetPolicyARN(v string) *PutScalingPolicyOutput { - s.PolicyARN = &v - return s -} - -type PutScheduledActionInput struct { - _ struct{} `type:"structure"` - - // The date and time for the scheduled action to end. - EndTime *time.Time `type:"timestamp"` - - // The identifier of the resource associated with the scheduled action. This - // string consists of the resource type and unique identifier. - // - // * ECS service - The resource type is service and the unique identifier - // is the cluster name and service name. Example: service/default/sample-webapp. - // - // * Spot fleet request - The resource type is spot-fleet-request and the - // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. - // - // * EMR cluster - The resource type is instancegroup and the unique identifier - // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. - // - // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier - // is the fleet name. Example: fleet/sample-fleet. - // - // * DynamoDB table - The resource type is table and the unique identifier - // is the resource ID. Example: table/my-table. - // - // * DynamoDB global secondary index - The resource type is index and the - // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. - // - // * Aurora DB cluster - The resource type is cluster and the unique identifier - // is the cluster name. Example: cluster:my-db-cluster. - // - // * Amazon SageMaker endpoint variants - The resource type is variant and - // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. - // - // * Custom resources are not supported with a resource type. This parameter - // must specify the OutputValue from the CloudFormation template stack used - // to access the resources. The unique identifier is defined by the service - // provider. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // The scalable dimension. This parameter is required if you are creating a - // scheduled action. This string consists of the service namespace, resource - // type, and scaling property. - // - // * ecs:service:DesiredCount - The desired task count of an ECS service. - // - // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot - // fleet request. - // - // * elasticmapreduce:instancegroup:InstanceCount - The instance count of - // an EMR Instance Group. - // - // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream - // 2.0 fleet. - // - // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB table. - // - // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB table. - // - // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB global secondary index. - // - // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB global secondary index. - // - // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora - // DB cluster. Available for Aurora MySQL-compatible edition. - // - // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances - // for an Amazon SageMaker model endpoint variant. - // - // * custom-resource:ResourceType:Property - The scalable dimension for a - // custom resource provided by your own application or service. - ScalableDimension *string `type:"string" enum:"ScalableDimension"` - - // The new minimum and maximum capacity. You can set both values or just one. - // During the scheduled time, if the current capacity is below the minimum capacity, - // Application Auto Scaling scales out to the minimum capacity. If the current - // capacity is above the maximum capacity, Application Auto Scaling scales in - // to the maximum capacity. - ScalableTargetAction *ScalableTargetAction `type:"structure"` - - // The schedule for this action. The following formats are supported: - // - // * At expressions - at(yyyy-mm-ddThh:mm:ss) - // - // * Rate expressions - rate(valueunit) - // - // * Cron expressions - cron(fields) - // - // At expressions are useful for one-time schedules. Specify the time, in UTC. - // - // For rate expressions, value is a positive integer and unit is minute | minutes - // | hour | hours | day | days. - // - // For more information about cron expressions, see Cron Expressions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions) - // in the Amazon CloudWatch Events User Guide. - Schedule *string `min:"1" type:"string"` - - // The name of the scheduled action. - // - // ScheduledActionName is a required field - ScheduledActionName *string `min:"1" type:"string" required:"true"` - - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` - - // The date and time for the scheduled action to start. - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s PutScheduledActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutScheduledActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutScheduledActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutScheduledActionInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.Schedule != nil && len(*s.Schedule) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Schedule", 1)) - } - if s.ScheduledActionName == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduledActionName")) - } - if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1)) - } - if s.ServiceNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndTime sets the EndTime field's value. -func (s *PutScheduledActionInput) SetEndTime(v time.Time) *PutScheduledActionInput { - s.EndTime = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *PutScheduledActionInput) SetResourceId(v string) *PutScheduledActionInput { - s.ResourceId = &v - return s -} - -// SetScalableDimension sets the ScalableDimension field's value. -func (s *PutScheduledActionInput) SetScalableDimension(v string) *PutScheduledActionInput { - s.ScalableDimension = &v - return s -} - -// SetScalableTargetAction sets the ScalableTargetAction field's value. -func (s *PutScheduledActionInput) SetScalableTargetAction(v *ScalableTargetAction) *PutScheduledActionInput { - s.ScalableTargetAction = v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *PutScheduledActionInput) SetSchedule(v string) *PutScheduledActionInput { - s.Schedule = &v - return s -} - -// SetScheduledActionName sets the ScheduledActionName field's value. -func (s *PutScheduledActionInput) SetScheduledActionName(v string) *PutScheduledActionInput { - s.ScheduledActionName = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *PutScheduledActionInput) SetServiceNamespace(v string) *PutScheduledActionInput { - s.ServiceNamespace = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *PutScheduledActionInput) SetStartTime(v time.Time) *PutScheduledActionInput { - s.StartTime = &v - return s -} - -type PutScheduledActionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutScheduledActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutScheduledActionOutput) GoString() string { - return s.String() -} - -type RegisterScalableTargetInput struct { - _ struct{} `type:"structure"` - - // The maximum value to scale to in response to a scale out event. This parameter - // is required if you are registering a scalable target. - MaxCapacity *int64 `type:"integer"` - - // The minimum value to scale to in response to a scale in event. This parameter - // is required if you are registering a scalable target. - MinCapacity *int64 `type:"integer"` - - // The identifier of the resource associated with the scalable target. This - // string consists of the resource type and unique identifier. - // - // * ECS service - The resource type is service and the unique identifier - // is the cluster name and service name. Example: service/default/sample-webapp. - // - // * Spot fleet request - The resource type is spot-fleet-request and the - // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. - // - // * EMR cluster - The resource type is instancegroup and the unique identifier - // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. - // - // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier - // is the fleet name. Example: fleet/sample-fleet. - // - // * DynamoDB table - The resource type is table and the unique identifier - // is the resource ID. Example: table/my-table. - // - // * DynamoDB global secondary index - The resource type is index and the - // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. - // - // * Aurora DB cluster - The resource type is cluster and the unique identifier - // is the cluster name. Example: cluster:my-db-cluster. - // - // * Amazon SageMaker endpoint variants - The resource type is variant and - // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. - // - // * Custom resources are not supported with a resource type. This parameter - // must specify the OutputValue from the CloudFormation template stack used - // to access the resources. The unique identifier is defined by the service - // provider. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // Application Auto Scaling creates a service-linked role that grants it permissions - // to modify the scalable target on your behalf. For more information, see Service-Linked - // Roles for Application Auto Scaling (http://docs.aws.amazon.com/autoscaling/application/userguide/application-autoscaling-service-linked-roles.html). - // - // For resources that are not supported using a service-linked role, this parameter - // is required and must specify the ARN of an IAM role that allows Application - // Auto Scaling to modify the scalable target on your behalf. - RoleARN *string `min:"1" type:"string"` - - // The scalable dimension associated with the scalable target. This string consists - // of the service namespace, resource type, and scaling property. - // - // * ecs:service:DesiredCount - The desired task count of an ECS service. - // - // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot - // fleet request. - // - // * elasticmapreduce:instancegroup:InstanceCount - The instance count of - // an EMR Instance Group. - // - // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream - // 2.0 fleet. - // - // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB table. - // - // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB table. - // - // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB global secondary index. - // - // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB global secondary index. - // - // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora - // DB cluster. Available for Aurora MySQL-compatible edition. - // - // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances - // for an Amazon SageMaker model endpoint variant. - // - // * custom-resource:ResourceType:Property - The scalable dimension for a - // custom resource provided by your own application or service. - // - // ScalableDimension is a required field - ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` -} - -// String returns the string representation -func (s RegisterScalableTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterScalableTargetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterScalableTargetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterScalableTargetInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - if s.ScalableDimension == nil { - invalidParams.Add(request.NewErrParamRequired("ScalableDimension")) - } - if s.ServiceNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxCapacity sets the MaxCapacity field's value. -func (s *RegisterScalableTargetInput) SetMaxCapacity(v int64) *RegisterScalableTargetInput { - s.MaxCapacity = &v - return s -} - -// SetMinCapacity sets the MinCapacity field's value. -func (s *RegisterScalableTargetInput) SetMinCapacity(v int64) *RegisterScalableTargetInput { - s.MinCapacity = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *RegisterScalableTargetInput) SetResourceId(v string) *RegisterScalableTargetInput { - s.ResourceId = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *RegisterScalableTargetInput) SetRoleARN(v string) *RegisterScalableTargetInput { - s.RoleARN = &v - return s -} - -// SetScalableDimension sets the ScalableDimension field's value. -func (s *RegisterScalableTargetInput) SetScalableDimension(v string) *RegisterScalableTargetInput { - s.ScalableDimension = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *RegisterScalableTargetInput) SetServiceNamespace(v string) *RegisterScalableTargetInput { - s.ServiceNamespace = &v - return s -} - -type RegisterScalableTargetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RegisterScalableTargetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterScalableTargetOutput) GoString() string { - return s.String() -} - -// Represents a scalable target. -type ScalableTarget struct { - _ struct{} `type:"structure"` - - // The Unix timestamp for when the scalable target was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The maximum value to scale to in response to a scale out event. - // - // MaxCapacity is a required field - MaxCapacity *int64 `type:"integer" required:"true"` - - // The minimum value to scale to in response to a scale in event. - // - // MinCapacity is a required field - MinCapacity *int64 `type:"integer" required:"true"` - - // The identifier of the resource associated with the scalable target. This - // string consists of the resource type and unique identifier. - // - // * ECS service - The resource type is service and the unique identifier - // is the cluster name and service name. Example: service/default/sample-webapp. - // - // * Spot fleet request - The resource type is spot-fleet-request and the - // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. - // - // * EMR cluster - The resource type is instancegroup and the unique identifier - // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. - // - // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier - // is the fleet name. Example: fleet/sample-fleet. - // - // * DynamoDB table - The resource type is table and the unique identifier - // is the resource ID. Example: table/my-table. - // - // * DynamoDB global secondary index - The resource type is index and the - // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. - // - // * Aurora DB cluster - The resource type is cluster and the unique identifier - // is the cluster name. Example: cluster:my-db-cluster. - // - // * Amazon SageMaker endpoint variants - The resource type is variant and - // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. - // - // * Custom resources are not supported with a resource type. This parameter - // must specify the OutputValue from the CloudFormation template stack used - // to access the resources. The unique identifier is defined by the service - // provider. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // The ARN of an IAM role that allows Application Auto Scaling to modify the - // scalable target on your behalf. - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` - - // The scalable dimension associated with the scalable target. This string consists - // of the service namespace, resource type, and scaling property. - // - // * ecs:service:DesiredCount - The desired task count of an ECS service. - // - // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot - // fleet request. - // - // * elasticmapreduce:instancegroup:InstanceCount - The instance count of - // an EMR Instance Group. - // - // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream - // 2.0 fleet. - // - // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB table. - // - // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB table. - // - // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB global secondary index. - // - // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB global secondary index. - // - // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora - // DB cluster. Available for Aurora MySQL-compatible edition. - // - // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances - // for an Amazon SageMaker model endpoint variant. - // - // * custom-resource:ResourceType:Property - The scalable dimension for a - // custom resource provided by your own application or service. - // - // ScalableDimension is a required field - ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` -} - -// String returns the string representation -func (s ScalableTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalableTarget) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ScalableTarget) SetCreationTime(v time.Time) *ScalableTarget { - s.CreationTime = &v - return s -} - -// SetMaxCapacity sets the MaxCapacity field's value. -func (s *ScalableTarget) SetMaxCapacity(v int64) *ScalableTarget { - s.MaxCapacity = &v - return s -} - -// SetMinCapacity sets the MinCapacity field's value. -func (s *ScalableTarget) SetMinCapacity(v int64) *ScalableTarget { - s.MinCapacity = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ScalableTarget) SetResourceId(v string) *ScalableTarget { - s.ResourceId = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *ScalableTarget) SetRoleARN(v string) *ScalableTarget { - s.RoleARN = &v - return s -} - -// SetScalableDimension sets the ScalableDimension field's value. -func (s *ScalableTarget) SetScalableDimension(v string) *ScalableTarget { - s.ScalableDimension = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *ScalableTarget) SetServiceNamespace(v string) *ScalableTarget { - s.ServiceNamespace = &v - return s -} - -// Represents the minimum and maximum capacity for a scheduled action. -type ScalableTargetAction struct { - _ struct{} `type:"structure"` - - // The maximum capacity. - MaxCapacity *int64 `type:"integer"` - - // The minimum capacity. - MinCapacity *int64 `type:"integer"` -} - -// String returns the string representation -func (s ScalableTargetAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalableTargetAction) GoString() string { - return s.String() -} - -// SetMaxCapacity sets the MaxCapacity field's value. -func (s *ScalableTargetAction) SetMaxCapacity(v int64) *ScalableTargetAction { - s.MaxCapacity = &v - return s -} - -// SetMinCapacity sets the MinCapacity field's value. -func (s *ScalableTargetAction) SetMinCapacity(v int64) *ScalableTargetAction { - s.MinCapacity = &v - return s -} - -// Represents a scaling activity. -type ScalingActivity struct { - _ struct{} `type:"structure"` - - // The unique identifier of the scaling activity. - // - // ActivityId is a required field - ActivityId *string `type:"string" required:"true"` - - // A simple description of what caused the scaling activity to happen. - // - // Cause is a required field - Cause *string `type:"string" required:"true"` - - // A simple description of what action the scaling activity intends to accomplish. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // The details about the scaling activity. - Details *string `type:"string"` - - // The Unix timestamp for when the scaling activity ended. - EndTime *time.Time `type:"timestamp"` - - // The identifier of the resource associated with the scaling activity. This - // string consists of the resource type and unique identifier. - // - // * ECS service - The resource type is service and the unique identifier - // is the cluster name and service name. Example: service/default/sample-webapp. - // - // * Spot fleet request - The resource type is spot-fleet-request and the - // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. - // - // * EMR cluster - The resource type is instancegroup and the unique identifier - // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. - // - // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier - // is the fleet name. Example: fleet/sample-fleet. - // - // * DynamoDB table - The resource type is table and the unique identifier - // is the resource ID. Example: table/my-table. - // - // * DynamoDB global secondary index - The resource type is index and the - // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. - // - // * Aurora DB cluster - The resource type is cluster and the unique identifier - // is the cluster name. Example: cluster:my-db-cluster. - // - // * Amazon SageMaker endpoint variants - The resource type is variant and - // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. - // - // * Custom resources are not supported with a resource type. This parameter - // must specify the OutputValue from the CloudFormation template stack used - // to access the resources. The unique identifier is defined by the service - // provider. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // The scalable dimension. This string consists of the service namespace, resource - // type, and scaling property. - // - // * ecs:service:DesiredCount - The desired task count of an ECS service. - // - // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot - // fleet request. - // - // * elasticmapreduce:instancegroup:InstanceCount - The instance count of - // an EMR Instance Group. - // - // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream - // 2.0 fleet. - // - // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB table. - // - // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB table. - // - // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB global secondary index. - // - // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB global secondary index. - // - // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora - // DB cluster. Available for Aurora MySQL-compatible edition. - // - // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances - // for an Amazon SageMaker model endpoint variant. - // - // * custom-resource:ResourceType:Property - The scalable dimension for a - // custom resource provided by your own application or service. - // - // ScalableDimension is a required field - ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` - - // The Unix timestamp for when the scaling activity began. - // - // StartTime is a required field - StartTime *time.Time `type:"timestamp" required:"true"` - - // Indicates the status of the scaling activity. - // - // StatusCode is a required field - StatusCode *string `type:"string" required:"true" enum:"ScalingActivityStatusCode"` - - // A simple message about the current status of the scaling activity. - StatusMessage *string `type:"string"` -} - -// String returns the string representation -func (s ScalingActivity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalingActivity) GoString() string { - return s.String() -} - -// SetActivityId sets the ActivityId field's value. -func (s *ScalingActivity) SetActivityId(v string) *ScalingActivity { - s.ActivityId = &v - return s -} - -// SetCause sets the Cause field's value. -func (s *ScalingActivity) SetCause(v string) *ScalingActivity { - s.Cause = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ScalingActivity) SetDescription(v string) *ScalingActivity { - s.Description = &v - return s -} - -// SetDetails sets the Details field's value. -func (s *ScalingActivity) SetDetails(v string) *ScalingActivity { - s.Details = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *ScalingActivity) SetEndTime(v time.Time) *ScalingActivity { - s.EndTime = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ScalingActivity) SetResourceId(v string) *ScalingActivity { - s.ResourceId = &v - return s -} - -// SetScalableDimension sets the ScalableDimension field's value. -func (s *ScalingActivity) SetScalableDimension(v string) *ScalingActivity { - s.ScalableDimension = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *ScalingActivity) SetServiceNamespace(v string) *ScalingActivity { - s.ServiceNamespace = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *ScalingActivity) SetStartTime(v time.Time) *ScalingActivity { - s.StartTime = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *ScalingActivity) SetStatusCode(v string) *ScalingActivity { - s.StatusCode = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ScalingActivity) SetStatusMessage(v string) *ScalingActivity { - s.StatusMessage = &v - return s -} - -// Represents a scaling policy. -type ScalingPolicy struct { - _ struct{} `type:"structure"` - - // The CloudWatch alarms associated with the scaling policy. - Alarms []*Alarm `type:"list"` - - // The Unix timestamp for when the scaling policy was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The Amazon Resource Name (ARN) of the scaling policy. - // - // PolicyARN is a required field - PolicyARN *string `min:"1" type:"string" required:"true"` - - // The name of the scaling policy. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The scaling policy type. - // - // PolicyType is a required field - PolicyType *string `type:"string" required:"true" enum:"PolicyType"` - - // The identifier of the resource associated with the scaling policy. This string - // consists of the resource type and unique identifier. - // - // * ECS service - The resource type is service and the unique identifier - // is the cluster name and service name. Example: service/default/sample-webapp. - // - // * Spot fleet request - The resource type is spot-fleet-request and the - // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. - // - // * EMR cluster - The resource type is instancegroup and the unique identifier - // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. - // - // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier - // is the fleet name. Example: fleet/sample-fleet. - // - // * DynamoDB table - The resource type is table and the unique identifier - // is the resource ID. Example: table/my-table. - // - // * DynamoDB global secondary index - The resource type is index and the - // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. - // - // * Aurora DB cluster - The resource type is cluster and the unique identifier - // is the cluster name. Example: cluster:my-db-cluster. - // - // * Amazon SageMaker endpoint variants - The resource type is variant and - // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. - // - // * Custom resources are not supported with a resource type. This parameter - // must specify the OutputValue from the CloudFormation template stack used - // to access the resources. The unique identifier is defined by the service - // provider. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // The scalable dimension. This string consists of the service namespace, resource - // type, and scaling property. - // - // * ecs:service:DesiredCount - The desired task count of an ECS service. - // - // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot - // fleet request. - // - // * elasticmapreduce:instancegroup:InstanceCount - The instance count of - // an EMR Instance Group. - // - // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream - // 2.0 fleet. - // - // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB table. - // - // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB table. - // - // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB global secondary index. - // - // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB global secondary index. - // - // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora - // DB cluster. Available for Aurora MySQL-compatible edition. - // - // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances - // for an Amazon SageMaker model endpoint variant. - // - // * custom-resource:ResourceType:Property - The scalable dimension for a - // custom resource provided by your own application or service. - // - // ScalableDimension is a required field - ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` - - // A step scaling policy. - StepScalingPolicyConfiguration *StepScalingPolicyConfiguration `type:"structure"` - - // A target tracking policy. - TargetTrackingScalingPolicyConfiguration *TargetTrackingScalingPolicyConfiguration `type:"structure"` -} - -// String returns the string representation -func (s ScalingPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalingPolicy) GoString() string { - return s.String() -} - -// SetAlarms sets the Alarms field's value. -func (s *ScalingPolicy) SetAlarms(v []*Alarm) *ScalingPolicy { - s.Alarms = v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ScalingPolicy) SetCreationTime(v time.Time) *ScalingPolicy { - s.CreationTime = &v - return s -} - -// SetPolicyARN sets the PolicyARN field's value. -func (s *ScalingPolicy) SetPolicyARN(v string) *ScalingPolicy { - s.PolicyARN = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *ScalingPolicy) SetPolicyName(v string) *ScalingPolicy { - s.PolicyName = &v - return s -} - -// SetPolicyType sets the PolicyType field's value. -func (s *ScalingPolicy) SetPolicyType(v string) *ScalingPolicy { - s.PolicyType = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ScalingPolicy) SetResourceId(v string) *ScalingPolicy { - s.ResourceId = &v - return s -} - -// SetScalableDimension sets the ScalableDimension field's value. -func (s *ScalingPolicy) SetScalableDimension(v string) *ScalingPolicy { - s.ScalableDimension = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *ScalingPolicy) SetServiceNamespace(v string) *ScalingPolicy { - s.ServiceNamespace = &v - return s -} - -// SetStepScalingPolicyConfiguration sets the StepScalingPolicyConfiguration field's value. -func (s *ScalingPolicy) SetStepScalingPolicyConfiguration(v *StepScalingPolicyConfiguration) *ScalingPolicy { - s.StepScalingPolicyConfiguration = v - return s -} - -// SetTargetTrackingScalingPolicyConfiguration sets the TargetTrackingScalingPolicyConfiguration field's value. -func (s *ScalingPolicy) SetTargetTrackingScalingPolicyConfiguration(v *TargetTrackingScalingPolicyConfiguration) *ScalingPolicy { - s.TargetTrackingScalingPolicyConfiguration = v - return s -} - -// Represents a scheduled action. -type ScheduledAction struct { - _ struct{} `type:"structure"` - - // The date and time that the scheduled action was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The date and time that the action is scheduled to end. - EndTime *time.Time `type:"timestamp"` - - // The identifier of the resource associated with the scaling policy. This string - // consists of the resource type and unique identifier. - // - // * ECS service - The resource type is service and the unique identifier - // is the cluster name and service name. Example: service/default/sample-webapp. - // - // * Spot fleet request - The resource type is spot-fleet-request and the - // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. - // - // * EMR cluster - The resource type is instancegroup and the unique identifier - // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. - // - // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier - // is the fleet name. Example: fleet/sample-fleet. - // - // * DynamoDB table - The resource type is table and the unique identifier - // is the resource ID. Example: table/my-table. - // - // * DynamoDB global secondary index - The resource type is index and the - // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. - // - // * Aurora DB cluster - The resource type is cluster and the unique identifier - // is the cluster name. Example: cluster:my-db-cluster. - // - // * Amazon SageMaker endpoint variants - The resource type is variant and - // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. - // - // * Custom resources are not supported with a resource type. This parameter - // must specify the OutputValue from the CloudFormation template stack used - // to access the resources. The unique identifier is defined by the service - // provider. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // The scalable dimension. This string consists of the service namespace, resource - // type, and scaling property. - // - // * ecs:service:DesiredCount - The desired task count of an ECS service. - // - // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot - // fleet request. - // - // * elasticmapreduce:instancegroup:InstanceCount - The instance count of - // an EMR Instance Group. - // - // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream - // 2.0 fleet. - // - // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB table. - // - // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB table. - // - // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for - // a DynamoDB global secondary index. - // - // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for - // a DynamoDB global secondary index. - // - // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora - // DB cluster. Available for Aurora MySQL-compatible edition. - // - // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances - // for an Amazon SageMaker model endpoint variant. - // - // * custom-resource:ResourceType:Property - The scalable dimension for a - // custom resource provided by your own application or service. - ScalableDimension *string `type:"string" enum:"ScalableDimension"` - - // The new minimum and maximum capacity. You can set both values or just one. - // During the scheduled time, if the current capacity is below the minimum capacity, - // Application Auto Scaling scales out to the minimum capacity. If the current - // capacity is above the maximum capacity, Application Auto Scaling scales in - // to the maximum capacity. - ScalableTargetAction *ScalableTargetAction `type:"structure"` - - // The schedule for this action. The following formats are supported: - // - // * At expressions - at(yyyy-mm-ddThh:mm:ss) - // - // * Rate expressions - rate(valueunit) - // - // * Cron expressions - cron(fields) - // - // At expressions are useful for one-time schedules. Specify the time, in UTC. - // - // For rate expressions, value is a positive integer and unit is minute | minutes - // | hour | hours | day | days. - // - // For more information about cron expressions, see Cron Expressions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions) - // in the Amazon CloudWatch Events User Guide. - // - // Schedule is a required field - Schedule *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the scheduled action. - // - // ScheduledActionARN is a required field - ScheduledActionARN *string `min:"1" type:"string" required:"true"` - - // The name of the scheduled action. - // - // ScheduledActionName is a required field - ScheduledActionName *string `min:"1" type:"string" required:"true"` - - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` - - // The date and time that the action is scheduled to begin. - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s ScheduledAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledAction) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ScheduledAction) SetCreationTime(v time.Time) *ScheduledAction { - s.CreationTime = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *ScheduledAction) SetEndTime(v time.Time) *ScheduledAction { - s.EndTime = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ScheduledAction) SetResourceId(v string) *ScheduledAction { - s.ResourceId = &v - return s -} - -// SetScalableDimension sets the ScalableDimension field's value. -func (s *ScheduledAction) SetScalableDimension(v string) *ScheduledAction { - s.ScalableDimension = &v - return s -} - -// SetScalableTargetAction sets the ScalableTargetAction field's value. -func (s *ScheduledAction) SetScalableTargetAction(v *ScalableTargetAction) *ScheduledAction { - s.ScalableTargetAction = v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *ScheduledAction) SetSchedule(v string) *ScheduledAction { - s.Schedule = &v - return s -} - -// SetScheduledActionARN sets the ScheduledActionARN field's value. -func (s *ScheduledAction) SetScheduledActionARN(v string) *ScheduledAction { - s.ScheduledActionARN = &v - return s -} - -// SetScheduledActionName sets the ScheduledActionName field's value. -func (s *ScheduledAction) SetScheduledActionName(v string) *ScheduledAction { - s.ScheduledActionName = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *ScheduledAction) SetServiceNamespace(v string) *ScheduledAction { - s.ServiceNamespace = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *ScheduledAction) SetStartTime(v time.Time) *ScheduledAction { - s.StartTime = &v - return s -} - -// Represents a step adjustment for a StepScalingPolicyConfiguration. Describes -// an adjustment based on the difference between the value of the aggregated -// CloudWatch metric and the breach threshold that you've defined for the alarm. -// -// For the following examples, suppose that you have an alarm with a breach -// threshold of 50: -// -// * To trigger the adjustment when the metric is greater than or equal to -// 50 and less than 60, specify a lower bound of 0 and an upper bound of -// 10. -// -// * To trigger the adjustment when the metric is greater than 40 and less -// than or equal to 50, specify a lower bound of -10 and an upper bound of -// 0. -// -// There are a few rules for the step adjustments for your step policy: -// -// * The ranges of your step adjustments can't overlap or have a gap. -// -// * At most one step adjustment can have a null lower bound. If one step -// adjustment has a negative lower bound, then there must be a step adjustment -// with a null lower bound. -// -// * At most one step adjustment can have a null upper bound. If one step -// adjustment has a positive upper bound, then there must be a step adjustment -// with a null upper bound. -// -// * The upper and lower bound can't be null in the same step adjustment. -type StepAdjustment struct { - _ struct{} `type:"structure"` - - // The lower bound for the difference between the alarm threshold and the CloudWatch - // metric. If the metric value is above the breach threshold, the lower bound - // is inclusive (the metric must be greater than or equal to the threshold plus - // the lower bound). Otherwise, it is exclusive (the metric must be greater - // than the threshold plus the lower bound). A null value indicates negative - // infinity. - MetricIntervalLowerBound *float64 `type:"double"` - - // The upper bound for the difference between the alarm threshold and the CloudWatch - // metric. If the metric value is above the breach threshold, the upper bound - // is exclusive (the metric must be less than the threshold plus the upper bound). - // Otherwise, it is inclusive (the metric must be less than or equal to the - // threshold plus the upper bound). A null value indicates positive infinity. - // - // The upper bound must be greater than the lower bound. - MetricIntervalUpperBound *float64 `type:"double"` - - // The amount by which to scale, based on the specified adjustment type. A positive - // value adds to the current scalable dimension while a negative number removes - // from the current scalable dimension. - // - // ScalingAdjustment is a required field - ScalingAdjustment *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s StepAdjustment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StepAdjustment) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StepAdjustment) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StepAdjustment"} - if s.ScalingAdjustment == nil { - invalidParams.Add(request.NewErrParamRequired("ScalingAdjustment")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMetricIntervalLowerBound sets the MetricIntervalLowerBound field's value. -func (s *StepAdjustment) SetMetricIntervalLowerBound(v float64) *StepAdjustment { - s.MetricIntervalLowerBound = &v - return s -} - -// SetMetricIntervalUpperBound sets the MetricIntervalUpperBound field's value. -func (s *StepAdjustment) SetMetricIntervalUpperBound(v float64) *StepAdjustment { - s.MetricIntervalUpperBound = &v - return s -} - -// SetScalingAdjustment sets the ScalingAdjustment field's value. -func (s *StepAdjustment) SetScalingAdjustment(v int64) *StepAdjustment { - s.ScalingAdjustment = &v - return s -} - -// Represents a step scaling policy configuration. -type StepScalingPolicyConfiguration struct { - _ struct{} `type:"structure"` - - // The adjustment type, which specifies how the ScalingAdjustment parameter - // in a StepAdjustment is interpreted. - AdjustmentType *string `type:"string" enum:"AdjustmentType"` - - // The amount of time, in seconds, after a scaling activity completes where - // previous trigger-related scaling activities can influence future scaling - // events. - // - // For scale out policies, while the cooldown period is in effect, the capacity - // that has been added by the previous scale out event that initiated the cooldown - // is calculated as part of the desired capacity for the next scale out. The - // intention is to continuously (but not excessively) scale out. For example, - // an alarm triggers a step scaling policy to scale out an Amazon ECS service - // by 2 tasks, the scaling activity completes successfully, and a cooldown period - // of 5 minutes starts. During the Cooldown period, if the alarm triggers the - // same policy again but at a more aggressive step adjustment to scale out the - // service by 3 tasks, the 2 tasks that were added in the previous scale out - // event are considered part of that capacity and only 1 additional task is - // added to the desired count. - // - // For scale in policies, the cooldown period is used to block subsequent scale - // in requests until it has expired. The intention is to scale in conservatively - // to protect your application's availability. However, if another alarm triggers - // a scale out policy during the cooldown period after a scale-in, Application - // Auto Scaling scales out your scalable target immediately. - Cooldown *int64 `type:"integer"` - - // The aggregation type for the CloudWatch metrics. Valid values are Minimum, - // Maximum, and Average. - MetricAggregationType *string `type:"string" enum:"MetricAggregationType"` - - // The minimum number to adjust your scalable dimension as a result of a scaling - // activity. If the adjustment type is PercentChangeInCapacity, the scaling - // policy changes the scalable dimension of the scalable target by this amount. - MinAdjustmentMagnitude *int64 `type:"integer"` - - // A set of adjustments that enable you to scale based on the size of the alarm - // breach. - StepAdjustments []*StepAdjustment `type:"list"` -} - -// String returns the string representation -func (s StepScalingPolicyConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StepScalingPolicyConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StepScalingPolicyConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StepScalingPolicyConfiguration"} - if s.StepAdjustments != nil { - for i, v := range s.StepAdjustments { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "StepAdjustments", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdjustmentType sets the AdjustmentType field's value. -func (s *StepScalingPolicyConfiguration) SetAdjustmentType(v string) *StepScalingPolicyConfiguration { - s.AdjustmentType = &v - return s -} - -// SetCooldown sets the Cooldown field's value. -func (s *StepScalingPolicyConfiguration) SetCooldown(v int64) *StepScalingPolicyConfiguration { - s.Cooldown = &v - return s -} - -// SetMetricAggregationType sets the MetricAggregationType field's value. -func (s *StepScalingPolicyConfiguration) SetMetricAggregationType(v string) *StepScalingPolicyConfiguration { - s.MetricAggregationType = &v - return s -} - -// SetMinAdjustmentMagnitude sets the MinAdjustmentMagnitude field's value. -func (s *StepScalingPolicyConfiguration) SetMinAdjustmentMagnitude(v int64) *StepScalingPolicyConfiguration { - s.MinAdjustmentMagnitude = &v - return s -} - -// SetStepAdjustments sets the StepAdjustments field's value. -func (s *StepScalingPolicyConfiguration) SetStepAdjustments(v []*StepAdjustment) *StepScalingPolicyConfiguration { - s.StepAdjustments = v - return s -} - -// Represents a target tracking scaling policy configuration. -type TargetTrackingScalingPolicyConfiguration struct { - _ struct{} `type:"structure"` - - // A customized metric. - CustomizedMetricSpecification *CustomizedMetricSpecification `type:"structure"` - - // Indicates whether scale in by the target tracking policy is disabled. If - // the value is true, scale in is disabled and the target tracking policy won't - // remove capacity from the scalable resource. Otherwise, scale in is enabled - // and the target tracking policy can remove capacity from the scalable resource. - // The default value is false. - DisableScaleIn *bool `type:"boolean"` - - // A predefined metric. - PredefinedMetricSpecification *PredefinedMetricSpecification `type:"structure"` - - // The amount of time, in seconds, after a scale in activity completes before - // another scale in activity can start. - // - // The cooldown period is used to block subsequent scale in requests until it - // has expired. The intention is to scale in conservatively to protect your - // application's availability. However, if another alarm triggers a scale out - // policy during the cooldown period after a scale-in, Application Auto Scaling - // scales out your scalable target immediately. - ScaleInCooldown *int64 `type:"integer"` - - // The amount of time, in seconds, after a scale out activity completes before - // another scale out activity can start. - // - // While the cooldown period is in effect, the capacity that has been added - // by the previous scale out event that initiated the cooldown is calculated - // as part of the desired capacity for the next scale out. The intention is - // to continuously (but not excessively) scale out. - ScaleOutCooldown *int64 `type:"integer"` - - // The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 - // (Base 10) or 2e-360 to 2e360 (Base 2). - // - // TargetValue is a required field - TargetValue *float64 `type:"double" required:"true"` -} - -// String returns the string representation -func (s TargetTrackingScalingPolicyConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetTrackingScalingPolicyConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetTrackingScalingPolicyConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetTrackingScalingPolicyConfiguration"} - if s.TargetValue == nil { - invalidParams.Add(request.NewErrParamRequired("TargetValue")) - } - if s.CustomizedMetricSpecification != nil { - if err := s.CustomizedMetricSpecification.Validate(); err != nil { - invalidParams.AddNested("CustomizedMetricSpecification", err.(request.ErrInvalidParams)) - } - } - if s.PredefinedMetricSpecification != nil { - if err := s.PredefinedMetricSpecification.Validate(); err != nil { - invalidParams.AddNested("PredefinedMetricSpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomizedMetricSpecification sets the CustomizedMetricSpecification field's value. -func (s *TargetTrackingScalingPolicyConfiguration) SetCustomizedMetricSpecification(v *CustomizedMetricSpecification) *TargetTrackingScalingPolicyConfiguration { - s.CustomizedMetricSpecification = v - return s -} - -// SetDisableScaleIn sets the DisableScaleIn field's value. -func (s *TargetTrackingScalingPolicyConfiguration) SetDisableScaleIn(v bool) *TargetTrackingScalingPolicyConfiguration { - s.DisableScaleIn = &v - return s -} - -// SetPredefinedMetricSpecification sets the PredefinedMetricSpecification field's value. -func (s *TargetTrackingScalingPolicyConfiguration) SetPredefinedMetricSpecification(v *PredefinedMetricSpecification) *TargetTrackingScalingPolicyConfiguration { - s.PredefinedMetricSpecification = v - return s -} - -// SetScaleInCooldown sets the ScaleInCooldown field's value. -func (s *TargetTrackingScalingPolicyConfiguration) SetScaleInCooldown(v int64) *TargetTrackingScalingPolicyConfiguration { - s.ScaleInCooldown = &v - return s -} - -// SetScaleOutCooldown sets the ScaleOutCooldown field's value. -func (s *TargetTrackingScalingPolicyConfiguration) SetScaleOutCooldown(v int64) *TargetTrackingScalingPolicyConfiguration { - s.ScaleOutCooldown = &v - return s -} - -// SetTargetValue sets the TargetValue field's value. -func (s *TargetTrackingScalingPolicyConfiguration) SetTargetValue(v float64) *TargetTrackingScalingPolicyConfiguration { - s.TargetValue = &v - return s -} - -const ( - // AdjustmentTypeChangeInCapacity is a AdjustmentType enum value - AdjustmentTypeChangeInCapacity = "ChangeInCapacity" - - // AdjustmentTypePercentChangeInCapacity is a AdjustmentType enum value - AdjustmentTypePercentChangeInCapacity = "PercentChangeInCapacity" - - // AdjustmentTypeExactCapacity is a AdjustmentType enum value - AdjustmentTypeExactCapacity = "ExactCapacity" -) - -const ( - // MetricAggregationTypeAverage is a MetricAggregationType enum value - MetricAggregationTypeAverage = "Average" - - // MetricAggregationTypeMinimum is a MetricAggregationType enum value - MetricAggregationTypeMinimum = "Minimum" - - // MetricAggregationTypeMaximum is a MetricAggregationType enum value - MetricAggregationTypeMaximum = "Maximum" -) - -const ( - // MetricStatisticAverage is a MetricStatistic enum value - MetricStatisticAverage = "Average" - - // MetricStatisticMinimum is a MetricStatistic enum value - MetricStatisticMinimum = "Minimum" - - // MetricStatisticMaximum is a MetricStatistic enum value - MetricStatisticMaximum = "Maximum" - - // MetricStatisticSampleCount is a MetricStatistic enum value - MetricStatisticSampleCount = "SampleCount" - - // MetricStatisticSum is a MetricStatistic enum value - MetricStatisticSum = "Sum" -) - -const ( - // MetricTypeDynamoDbreadCapacityUtilization is a MetricType enum value - MetricTypeDynamoDbreadCapacityUtilization = "DynamoDBReadCapacityUtilization" - - // MetricTypeDynamoDbwriteCapacityUtilization is a MetricType enum value - MetricTypeDynamoDbwriteCapacityUtilization = "DynamoDBWriteCapacityUtilization" - - // MetricTypeAlbrequestCountPerTarget is a MetricType enum value - MetricTypeAlbrequestCountPerTarget = "ALBRequestCountPerTarget" - - // MetricTypeRdsreaderAverageCpuutilization is a MetricType enum value - MetricTypeRdsreaderAverageCpuutilization = "RDSReaderAverageCPUUtilization" - - // MetricTypeRdsreaderAverageDatabaseConnections is a MetricType enum value - MetricTypeRdsreaderAverageDatabaseConnections = "RDSReaderAverageDatabaseConnections" - - // MetricTypeEc2spotFleetRequestAverageCpuutilization is a MetricType enum value - MetricTypeEc2spotFleetRequestAverageCpuutilization = "EC2SpotFleetRequestAverageCPUUtilization" - - // MetricTypeEc2spotFleetRequestAverageNetworkIn is a MetricType enum value - MetricTypeEc2spotFleetRequestAverageNetworkIn = "EC2SpotFleetRequestAverageNetworkIn" - - // MetricTypeEc2spotFleetRequestAverageNetworkOut is a MetricType enum value - MetricTypeEc2spotFleetRequestAverageNetworkOut = "EC2SpotFleetRequestAverageNetworkOut" - - // MetricTypeSageMakerVariantInvocationsPerInstance is a MetricType enum value - MetricTypeSageMakerVariantInvocationsPerInstance = "SageMakerVariantInvocationsPerInstance" - - // MetricTypeEcsserviceAverageCpuutilization is a MetricType enum value - MetricTypeEcsserviceAverageCpuutilization = "ECSServiceAverageCPUUtilization" - - // MetricTypeEcsserviceAverageMemoryUtilization is a MetricType enum value - MetricTypeEcsserviceAverageMemoryUtilization = "ECSServiceAverageMemoryUtilization" -) - -const ( - // PolicyTypeStepScaling is a PolicyType enum value - PolicyTypeStepScaling = "StepScaling" - - // PolicyTypeTargetTrackingScaling is a PolicyType enum value - PolicyTypeTargetTrackingScaling = "TargetTrackingScaling" -) - -const ( - // ScalableDimensionEcsServiceDesiredCount is a ScalableDimension enum value - ScalableDimensionEcsServiceDesiredCount = "ecs:service:DesiredCount" - - // ScalableDimensionEc2SpotFleetRequestTargetCapacity is a ScalableDimension enum value - ScalableDimensionEc2SpotFleetRequestTargetCapacity = "ec2:spot-fleet-request:TargetCapacity" - - // ScalableDimensionElasticmapreduceInstancegroupInstanceCount is a ScalableDimension enum value - ScalableDimensionElasticmapreduceInstancegroupInstanceCount = "elasticmapreduce:instancegroup:InstanceCount" - - // ScalableDimensionAppstreamFleetDesiredCapacity is a ScalableDimension enum value - ScalableDimensionAppstreamFleetDesiredCapacity = "appstream:fleet:DesiredCapacity" - - // ScalableDimensionDynamodbTableReadCapacityUnits is a ScalableDimension enum value - ScalableDimensionDynamodbTableReadCapacityUnits = "dynamodb:table:ReadCapacityUnits" - - // ScalableDimensionDynamodbTableWriteCapacityUnits is a ScalableDimension enum value - ScalableDimensionDynamodbTableWriteCapacityUnits = "dynamodb:table:WriteCapacityUnits" - - // ScalableDimensionDynamodbIndexReadCapacityUnits is a ScalableDimension enum value - ScalableDimensionDynamodbIndexReadCapacityUnits = "dynamodb:index:ReadCapacityUnits" - - // ScalableDimensionDynamodbIndexWriteCapacityUnits is a ScalableDimension enum value - ScalableDimensionDynamodbIndexWriteCapacityUnits = "dynamodb:index:WriteCapacityUnits" - - // ScalableDimensionRdsClusterReadReplicaCount is a ScalableDimension enum value - ScalableDimensionRdsClusterReadReplicaCount = "rds:cluster:ReadReplicaCount" - - // ScalableDimensionSagemakerVariantDesiredInstanceCount is a ScalableDimension enum value - ScalableDimensionSagemakerVariantDesiredInstanceCount = "sagemaker:variant:DesiredInstanceCount" - - // ScalableDimensionCustomResourceResourceTypeProperty is a ScalableDimension enum value - ScalableDimensionCustomResourceResourceTypeProperty = "custom-resource:ResourceType:Property" -) - -const ( - // ScalingActivityStatusCodePending is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodePending = "Pending" - - // ScalingActivityStatusCodeInProgress is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeInProgress = "InProgress" - - // ScalingActivityStatusCodeSuccessful is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeSuccessful = "Successful" - - // ScalingActivityStatusCodeOverridden is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeOverridden = "Overridden" - - // ScalingActivityStatusCodeUnfulfilled is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeUnfulfilled = "Unfulfilled" - - // ScalingActivityStatusCodeFailed is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeFailed = "Failed" -) - -const ( - // ServiceNamespaceEcs is a ServiceNamespace enum value - ServiceNamespaceEcs = "ecs" - - // ServiceNamespaceElasticmapreduce is a ServiceNamespace enum value - ServiceNamespaceElasticmapreduce = "elasticmapreduce" - - // ServiceNamespaceEc2 is a ServiceNamespace enum value - ServiceNamespaceEc2 = "ec2" - - // ServiceNamespaceAppstream is a ServiceNamespace enum value - ServiceNamespaceAppstream = "appstream" - - // ServiceNamespaceDynamodb is a ServiceNamespace enum value - ServiceNamespaceDynamodb = "dynamodb" - - // ServiceNamespaceRds is a ServiceNamespace enum value - ServiceNamespaceRds = "rds" - - // ServiceNamespaceSagemaker is a ServiceNamespace enum value - ServiceNamespaceSagemaker = "sagemaker" - - // ServiceNamespaceCustomResource is a ServiceNamespace enum value - ServiceNamespaceCustomResource = "custom-resource" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go deleted file mode 100644 index 9d1c051a2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package applicationautoscaling provides the client and types for making API -// requests to Application Auto Scaling. -// -// With Application Auto Scaling, you can configure automatic scaling for your -// scalable resources. You can use Application Auto Scaling to accomplish the -// following tasks: -// -// * Define scaling policies to automatically scale your AWS or custom resources -// -// * Scale your resources in response to CloudWatch alarms -// -// * Schedule one-time or recurring scaling actions -// -// * View the history of your scaling events -// -// Application Auto Scaling can scale the following resources: -// -// * Amazon ECS services. For more information, see Service Auto Scaling -// (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html) -// in the Amazon Elastic Container Service Developer Guide. -// -// * Amazon EC2 Spot fleets. For more information, see Automatic Scaling -// for Spot Fleet (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/fleet-auto-scaling.html) -// in the Amazon EC2 User Guide. -// -// * Amazon EMR clusters. For more information, see Using Automatic Scaling -// in Amazon EMR (http://docs.aws.amazon.com/ElasticMapReduce/latest/ManagementGuide/emr-automatic-scaling.html) -// in the Amazon EMR Management Guide. -// -// * AppStream 2.0 fleets. For more information, see Fleet Auto Scaling for -// Amazon AppStream 2.0 (http://docs.aws.amazon.com/appstream2/latest/developerguide/autoscaling.html) -// in the Amazon AppStream 2.0 Developer Guide. -// -// * Provisioned read and write capacity for Amazon DynamoDB tables and global -// secondary indexes. For more information, see Managing Throughput Capacity -// Automatically with DynamoDB Auto Scaling (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/AutoScaling.html) -// in the Amazon DynamoDB Developer Guide. -// -// * Amazon Aurora Replicas. For more information, see Using Amazon Aurora -// Auto Scaling with Aurora Replicas (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Integrating.AutoScaling.html). -// -// * Amazon SageMaker endpoint variants. For more information, see Automatically -// Scaling Amazon SageMaker Models (http://docs.aws.amazon.com/sagemaker/latest/dg/endpoint-auto-scaling.html). -// -// * Custom resources provided by your own applications or services. More -// information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource). -// -// -// To learn more about Application Auto Scaling, see the Application Auto Scaling -// User Guide (http://docs.aws.amazon.com/autoscaling/application/userguide/what-is-application-auto-scaling.html). -// -// To configure automatic scaling for multiple resources across multiple services, -// use AWS Auto Scaling to create a scaling plan for your application. For more -// information, see the AWS Auto Scaling User Guide (http://docs.aws.amazon.com/autoscaling/plans/userguide/what-is-aws-auto-scaling.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06 for more information on this service. -// -// See applicationautoscaling package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/applicationautoscaling/ -// -// Using the Client -// -// To contact Application Auto Scaling 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 Application Auto Scaling client ApplicationAutoScaling for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/applicationautoscaling/#New -package applicationautoscaling diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/errors.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/errors.go deleted file mode 100644 index bf1476bd7..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/errors.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package applicationautoscaling - -const ( - - // ErrCodeConcurrentUpdateException for service response error code - // "ConcurrentUpdateException". - // - // Concurrent updates caused an exception, for example, if you request an update - // to an Application Auto Scaling resource that already has a pending update. - ErrCodeConcurrentUpdateException = "ConcurrentUpdateException" - - // ErrCodeFailedResourceAccessException for service response error code - // "FailedResourceAccessException". - // - // Failed access to resources caused an exception. This exception is thrown - // when Application Auto Scaling is unable to retrieve the alarms associated - // with a scaling policy due to a client error, for example, if the role ARN - // specified for a scalable target does not have permission to call the CloudWatch - // DescribeAlarms (http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html) - // on your behalf. - ErrCodeFailedResourceAccessException = "FailedResourceAccessException" - - // ErrCodeInternalServiceException for service response error code - // "InternalServiceException". - // - // The service encountered an internal error. - ErrCodeInternalServiceException = "InternalServiceException" - - // ErrCodeInvalidNextTokenException for service response error code - // "InvalidNextTokenException". - // - // The next token supplied was invalid. - ErrCodeInvalidNextTokenException = "InvalidNextTokenException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // A per-account resource limit is exceeded. For more information, see Application - // Auto Scaling Limits (http://docs.aws.amazon.com/ApplicationAutoScaling/latest/userguide/application-auto-scaling-limits.html). - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeObjectNotFoundException for service response error code - // "ObjectNotFoundException". - // - // The specified object could not be found. For any operation that depends on - // the existence of a scalable target, this exception is thrown if the scalable - // target with the specified service namespace, resource ID, and scalable dimension - // does not exist. For any operation that deletes or deregisters a resource, - // this exception is thrown if the resource cannot be found. - ErrCodeObjectNotFoundException = "ObjectNotFoundException" - - // ErrCodeValidationException for service response error code - // "ValidationException". - // - // An exception was thrown for a validation issue. Review the available parameters - // for the API request. - ErrCodeValidationException = "ValidationException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go deleted file mode 100644 index 902d81d42..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package applicationautoscaling - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// ApplicationAutoScaling provides the API operation methods for making requests to -// Application Auto Scaling. See this package's package overview docs -// for details on the service. -// -// ApplicationAutoScaling methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ApplicationAutoScaling 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 = "autoscaling" // Name of service. - EndpointsID = "application-autoscaling" // ID to lookup a service endpoint with. - ServiceID = "Application Auto Scaling" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ApplicationAutoScaling client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a ApplicationAutoScaling client from just a session. -// svc := applicationautoscaling.New(mySession) -// -// // Create a ApplicationAutoScaling client with additional configuration -// svc := applicationautoscaling.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ApplicationAutoScaling { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "application-autoscaling" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ApplicationAutoScaling { - svc := &ApplicationAutoScaling{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2016-02-06", - JSONVersion: "1.1", - TargetPrefix: "AnyScaleFrontendService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ApplicationAutoScaling operation and runs any -// custom request initialization. -func (c *ApplicationAutoScaling) 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/appmesh/api.go b/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go deleted file mode 100644 index 79b45590c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go +++ /dev/null @@ -1,5286 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package appmesh - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" -) - -const opCreateMesh = "CreateMesh" - -// CreateMeshRequest generates a "aws/request.Request" representing the -// client's request for the CreateMesh operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateMesh for more information on using the CreateMesh -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateMeshRequest method. -// req, resp := client.CreateMeshRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateMesh -func (c *AppMesh) CreateMeshRequest(input *CreateMeshInput) (req *request.Request, output *CreateMeshOutput) { - op := &request.Operation{ - Name: opCreateMesh, - HTTPMethod: "PUT", - HTTPPath: "/meshes", - } - - if input == nil { - input = &CreateMeshInput{} - } - - output = &CreateMeshOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateMesh API operation for AWS App Mesh. -// -// Creates a new service mesh. A service mesh is a logical boundary for network -// traffic between the services that reside within it. -// -// After you create your service mesh, you can create virtual nodes, virtual -// routers, and routes to distribute traffic between the applications in your -// mesh. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation CreateMesh for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeConflictException "ConflictException" -// The request contains a client token that was used for a previous update resource -// call with different specifications. Try the request again with a new client -// token. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) -// in the AWS App Mesh User Guide. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateMesh -func (c *AppMesh) CreateMesh(input *CreateMeshInput) (*CreateMeshOutput, error) { - req, out := c.CreateMeshRequest(input) - return out, req.Send() -} - -// CreateMeshWithContext is the same as CreateMesh with the addition of -// the ability to pass a context and additional request options. -// -// See CreateMesh for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) CreateMeshWithContext(ctx aws.Context, input *CreateMeshInput, opts ...request.Option) (*CreateMeshOutput, error) { - req, out := c.CreateMeshRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRoute = "CreateRoute" - -// CreateRouteRequest generates a "aws/request.Request" representing the -// client's request for the CreateRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRoute for more information on using the CreateRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRouteRequest method. -// req, resp := client.CreateRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateRoute -func (c *AppMesh) CreateRouteRequest(input *CreateRouteInput) (req *request.Request, output *CreateRouteOutput) { - op := &request.Operation{ - Name: opCreateRoute, - HTTPMethod: "PUT", - HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes", - } - - if input == nil { - input = &CreateRouteInput{} - } - - output = &CreateRouteOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRoute API operation for AWS App Mesh. -// -// Creates a new route that is associated with a virtual router. -// -// You can use the prefix parameter in your route specification for path-based -// routing of requests. For example, if your virtual router service name is -// my-service.local, and you want the route to match requests to my-service.local/metrics, -// then your prefix should be /metrics. -// -// If your route matches a request, you can distribute traffic to one or more -// target virtual nodes with relative weighting. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation CreateRoute for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeConflictException "ConflictException" -// The request contains a client token that was used for a previous update resource -// call with different specifications. Try the request again with a new client -// token. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) -// in the AWS App Mesh User Guide. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateRoute -func (c *AppMesh) CreateRoute(input *CreateRouteInput) (*CreateRouteOutput, error) { - req, out := c.CreateRouteRequest(input) - return out, req.Send() -} - -// CreateRouteWithContext is the same as CreateRoute with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) CreateRouteWithContext(ctx aws.Context, input *CreateRouteInput, opts ...request.Option) (*CreateRouteOutput, error) { - req, out := c.CreateRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVirtualNode = "CreateVirtualNode" - -// CreateVirtualNodeRequest generates a "aws/request.Request" representing the -// client's request for the CreateVirtualNode operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVirtualNode for more information on using the CreateVirtualNode -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVirtualNodeRequest method. -// req, resp := client.CreateVirtualNodeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateVirtualNode -func (c *AppMesh) CreateVirtualNodeRequest(input *CreateVirtualNodeInput) (req *request.Request, output *CreateVirtualNodeOutput) { - op := &request.Operation{ - Name: opCreateVirtualNode, - HTTPMethod: "PUT", - HTTPPath: "/meshes/{meshName}/virtualNodes", - } - - if input == nil { - input = &CreateVirtualNodeInput{} - } - - output = &CreateVirtualNodeOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVirtualNode API operation for AWS App Mesh. -// -// Creates a new virtual node within a service mesh. -// -// A virtual node acts as logical pointer to a particular task group, such as -// an Amazon ECS service or a Kubernetes deployment. When you create a virtual -// node, you must specify the DNS service discovery name for your task group. -// -// Any inbound traffic that your virtual node expects should be specified as -// a listener. Any outbound traffic that your virtual node expects to reach -// should be specified as a backend. -// -// The response metadata for your new virtual node contains the arn that is -// associated with the virtual node. Set this value (either the full ARN or -// the truncated resource name, for example, mesh/default/virtualNode/simpleapp, -// as the APPMESH_VIRTUAL_NODE_NAME environment variable for your task group's -// Envoy proxy container in your task definition or pod spec. This is then mapped -// to the node.id and node.cluster Envoy parameters. -// -// If you require your Envoy stats or tracing to use a different name, you can -// override the node.cluster value that is set by APPMESH_VIRTUAL_NODE_NAME -// with the APPMESH_VIRTUAL_NODE_CLUSTER environment variable. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation CreateVirtualNode for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeConflictException "ConflictException" -// The request contains a client token that was used for a previous update resource -// call with different specifications. Try the request again with a new client -// token. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) -// in the AWS App Mesh User Guide. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateVirtualNode -func (c *AppMesh) CreateVirtualNode(input *CreateVirtualNodeInput) (*CreateVirtualNodeOutput, error) { - req, out := c.CreateVirtualNodeRequest(input) - return out, req.Send() -} - -// CreateVirtualNodeWithContext is the same as CreateVirtualNode with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVirtualNode for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) CreateVirtualNodeWithContext(ctx aws.Context, input *CreateVirtualNodeInput, opts ...request.Option) (*CreateVirtualNodeOutput, error) { - req, out := c.CreateVirtualNodeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVirtualRouter = "CreateVirtualRouter" - -// CreateVirtualRouterRequest generates a "aws/request.Request" representing the -// client's request for the CreateVirtualRouter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVirtualRouter for more information on using the CreateVirtualRouter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVirtualRouterRequest method. -// req, resp := client.CreateVirtualRouterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateVirtualRouter -func (c *AppMesh) CreateVirtualRouterRequest(input *CreateVirtualRouterInput) (req *request.Request, output *CreateVirtualRouterOutput) { - op := &request.Operation{ - Name: opCreateVirtualRouter, - HTTPMethod: "PUT", - HTTPPath: "/meshes/{meshName}/virtualRouters", - } - - if input == nil { - input = &CreateVirtualRouterInput{} - } - - output = &CreateVirtualRouterOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVirtualRouter API operation for AWS App Mesh. -// -// Creates a new virtual router within a service mesh. -// -// Virtual routers handle traffic for one or more service names within your -// mesh. After you create your virtual router, create and associate routes for -// your virtual router that direct incoming requests to different virtual nodes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation CreateVirtualRouter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeConflictException "ConflictException" -// The request contains a client token that was used for a previous update resource -// call with different specifications. Try the request again with a new client -// token. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) -// in the AWS App Mesh User Guide. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateVirtualRouter -func (c *AppMesh) CreateVirtualRouter(input *CreateVirtualRouterInput) (*CreateVirtualRouterOutput, error) { - req, out := c.CreateVirtualRouterRequest(input) - return out, req.Send() -} - -// CreateVirtualRouterWithContext is the same as CreateVirtualRouter with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVirtualRouter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) CreateVirtualRouterWithContext(ctx aws.Context, input *CreateVirtualRouterInput, opts ...request.Option) (*CreateVirtualRouterOutput, error) { - req, out := c.CreateVirtualRouterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteMesh = "DeleteMesh" - -// DeleteMeshRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMesh operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteMesh for more information on using the DeleteMesh -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteMeshRequest method. -// req, resp := client.DeleteMeshRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteMesh -func (c *AppMesh) DeleteMeshRequest(input *DeleteMeshInput) (req *request.Request, output *DeleteMeshOutput) { - op := &request.Operation{ - Name: opDeleteMesh, - HTTPMethod: "DELETE", - HTTPPath: "/meshes/{meshName}", - } - - if input == nil { - input = &DeleteMeshInput{} - } - - output = &DeleteMeshOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteMesh API operation for AWS App Mesh. -// -// Deletes an existing service mesh. -// -// You must delete all resources (routes, virtual routers, virtual nodes) in -// the service mesh before you can delete the mesh itself. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation DeleteMesh for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// You cannot delete the specified resource because it is in use or required -// by another resource. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteMesh -func (c *AppMesh) DeleteMesh(input *DeleteMeshInput) (*DeleteMeshOutput, error) { - req, out := c.DeleteMeshRequest(input) - return out, req.Send() -} - -// DeleteMeshWithContext is the same as DeleteMesh with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteMesh for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) DeleteMeshWithContext(ctx aws.Context, input *DeleteMeshInput, opts ...request.Option) (*DeleteMeshOutput, error) { - req, out := c.DeleteMeshRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRoute = "DeleteRoute" - -// DeleteRouteRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRoute for more information on using the DeleteRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRouteRequest method. -// req, resp := client.DeleteRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteRoute -func (c *AppMesh) DeleteRouteRequest(input *DeleteRouteInput) (req *request.Request, output *DeleteRouteOutput) { - op := &request.Operation{ - Name: opDeleteRoute, - HTTPMethod: "DELETE", - HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes/{routeName}", - } - - if input == nil { - input = &DeleteRouteInput{} - } - - output = &DeleteRouteOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRoute API operation for AWS App Mesh. -// -// Deletes an existing route. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation DeleteRoute for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// You cannot delete the specified resource because it is in use or required -// by another resource. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteRoute -func (c *AppMesh) DeleteRoute(input *DeleteRouteInput) (*DeleteRouteOutput, error) { - req, out := c.DeleteRouteRequest(input) - return out, req.Send() -} - -// DeleteRouteWithContext is the same as DeleteRoute with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) DeleteRouteWithContext(ctx aws.Context, input *DeleteRouteInput, opts ...request.Option) (*DeleteRouteOutput, error) { - req, out := c.DeleteRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVirtualNode = "DeleteVirtualNode" - -// DeleteVirtualNodeRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVirtualNode operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVirtualNode for more information on using the DeleteVirtualNode -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVirtualNodeRequest method. -// req, resp := client.DeleteVirtualNodeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteVirtualNode -func (c *AppMesh) DeleteVirtualNodeRequest(input *DeleteVirtualNodeInput) (req *request.Request, output *DeleteVirtualNodeOutput) { - op := &request.Operation{ - Name: opDeleteVirtualNode, - HTTPMethod: "DELETE", - HTTPPath: "/meshes/{meshName}/virtualNodes/{virtualNodeName}", - } - - if input == nil { - input = &DeleteVirtualNodeInput{} - } - - output = &DeleteVirtualNodeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteVirtualNode API operation for AWS App Mesh. -// -// Deletes an existing virtual node. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation DeleteVirtualNode for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// You cannot delete the specified resource because it is in use or required -// by another resource. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteVirtualNode -func (c *AppMesh) DeleteVirtualNode(input *DeleteVirtualNodeInput) (*DeleteVirtualNodeOutput, error) { - req, out := c.DeleteVirtualNodeRequest(input) - return out, req.Send() -} - -// DeleteVirtualNodeWithContext is the same as DeleteVirtualNode with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVirtualNode for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) DeleteVirtualNodeWithContext(ctx aws.Context, input *DeleteVirtualNodeInput, opts ...request.Option) (*DeleteVirtualNodeOutput, error) { - req, out := c.DeleteVirtualNodeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVirtualRouter = "DeleteVirtualRouter" - -// DeleteVirtualRouterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVirtualRouter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVirtualRouter for more information on using the DeleteVirtualRouter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVirtualRouterRequest method. -// req, resp := client.DeleteVirtualRouterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteVirtualRouter -func (c *AppMesh) DeleteVirtualRouterRequest(input *DeleteVirtualRouterInput) (req *request.Request, output *DeleteVirtualRouterOutput) { - op := &request.Operation{ - Name: opDeleteVirtualRouter, - HTTPMethod: "DELETE", - HTTPPath: "/meshes/{meshName}/virtualRouters/{virtualRouterName}", - } - - if input == nil { - input = &DeleteVirtualRouterInput{} - } - - output = &DeleteVirtualRouterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteVirtualRouter API operation for AWS App Mesh. -// -// Deletes an existing virtual router. -// -// You must delete any routes associated with the virtual router before you -// can delete the router itself. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation DeleteVirtualRouter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// You cannot delete the specified resource because it is in use or required -// by another resource. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteVirtualRouter -func (c *AppMesh) DeleteVirtualRouter(input *DeleteVirtualRouterInput) (*DeleteVirtualRouterOutput, error) { - req, out := c.DeleteVirtualRouterRequest(input) - return out, req.Send() -} - -// DeleteVirtualRouterWithContext is the same as DeleteVirtualRouter with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVirtualRouter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) DeleteVirtualRouterWithContext(ctx aws.Context, input *DeleteVirtualRouterInput, opts ...request.Option) (*DeleteVirtualRouterOutput, error) { - req, out := c.DeleteVirtualRouterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMesh = "DescribeMesh" - -// DescribeMeshRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMesh operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMesh for more information on using the DescribeMesh -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMeshRequest method. -// req, resp := client.DescribeMeshRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeMesh -func (c *AppMesh) DescribeMeshRequest(input *DescribeMeshInput) (req *request.Request, output *DescribeMeshOutput) { - op := &request.Operation{ - Name: opDescribeMesh, - HTTPMethod: "GET", - HTTPPath: "/meshes/{meshName}", - } - - if input == nil { - input = &DescribeMeshInput{} - } - - output = &DescribeMeshOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMesh API operation for AWS App Mesh. -// -// Describes an existing service mesh. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation DescribeMesh for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeMesh -func (c *AppMesh) DescribeMesh(input *DescribeMeshInput) (*DescribeMeshOutput, error) { - req, out := c.DescribeMeshRequest(input) - return out, req.Send() -} - -// DescribeMeshWithContext is the same as DescribeMesh with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMesh for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) DescribeMeshWithContext(ctx aws.Context, input *DescribeMeshInput, opts ...request.Option) (*DescribeMeshOutput, error) { - req, out := c.DescribeMeshRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeRoute = "DescribeRoute" - -// DescribeRouteRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRoute for more information on using the DescribeRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRouteRequest method. -// req, resp := client.DescribeRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeRoute -func (c *AppMesh) DescribeRouteRequest(input *DescribeRouteInput) (req *request.Request, output *DescribeRouteOutput) { - op := &request.Operation{ - Name: opDescribeRoute, - HTTPMethod: "GET", - HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes/{routeName}", - } - - if input == nil { - input = &DescribeRouteInput{} - } - - output = &DescribeRouteOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRoute API operation for AWS App Mesh. -// -// Describes an existing route. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation DescribeRoute for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeRoute -func (c *AppMesh) DescribeRoute(input *DescribeRouteInput) (*DescribeRouteOutput, error) { - req, out := c.DescribeRouteRequest(input) - return out, req.Send() -} - -// DescribeRouteWithContext is the same as DescribeRoute with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) DescribeRouteWithContext(ctx aws.Context, input *DescribeRouteInput, opts ...request.Option) (*DescribeRouteOutput, error) { - req, out := c.DescribeRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVirtualNode = "DescribeVirtualNode" - -// DescribeVirtualNodeRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVirtualNode operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVirtualNode for more information on using the DescribeVirtualNode -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVirtualNodeRequest method. -// req, resp := client.DescribeVirtualNodeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeVirtualNode -func (c *AppMesh) DescribeVirtualNodeRequest(input *DescribeVirtualNodeInput) (req *request.Request, output *DescribeVirtualNodeOutput) { - op := &request.Operation{ - Name: opDescribeVirtualNode, - HTTPMethod: "GET", - HTTPPath: "/meshes/{meshName}/virtualNodes/{virtualNodeName}", - } - - if input == nil { - input = &DescribeVirtualNodeInput{} - } - - output = &DescribeVirtualNodeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVirtualNode API operation for AWS App Mesh. -// -// Describes an existing virtual node. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation DescribeVirtualNode for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeVirtualNode -func (c *AppMesh) DescribeVirtualNode(input *DescribeVirtualNodeInput) (*DescribeVirtualNodeOutput, error) { - req, out := c.DescribeVirtualNodeRequest(input) - return out, req.Send() -} - -// DescribeVirtualNodeWithContext is the same as DescribeVirtualNode with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVirtualNode for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) DescribeVirtualNodeWithContext(ctx aws.Context, input *DescribeVirtualNodeInput, opts ...request.Option) (*DescribeVirtualNodeOutput, error) { - req, out := c.DescribeVirtualNodeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVirtualRouter = "DescribeVirtualRouter" - -// DescribeVirtualRouterRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVirtualRouter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVirtualRouter for more information on using the DescribeVirtualRouter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVirtualRouterRequest method. -// req, resp := client.DescribeVirtualRouterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeVirtualRouter -func (c *AppMesh) DescribeVirtualRouterRequest(input *DescribeVirtualRouterInput) (req *request.Request, output *DescribeVirtualRouterOutput) { - op := &request.Operation{ - Name: opDescribeVirtualRouter, - HTTPMethod: "GET", - HTTPPath: "/meshes/{meshName}/virtualRouters/{virtualRouterName}", - } - - if input == nil { - input = &DescribeVirtualRouterInput{} - } - - output = &DescribeVirtualRouterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVirtualRouter API operation for AWS App Mesh. -// -// Describes an existing virtual router. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation DescribeVirtualRouter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeVirtualRouter -func (c *AppMesh) DescribeVirtualRouter(input *DescribeVirtualRouterInput) (*DescribeVirtualRouterOutput, error) { - req, out := c.DescribeVirtualRouterRequest(input) - return out, req.Send() -} - -// DescribeVirtualRouterWithContext is the same as DescribeVirtualRouter with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVirtualRouter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) DescribeVirtualRouterWithContext(ctx aws.Context, input *DescribeVirtualRouterInput, opts ...request.Option) (*DescribeVirtualRouterOutput, error) { - req, out := c.DescribeVirtualRouterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListMeshes = "ListMeshes" - -// ListMeshesRequest generates a "aws/request.Request" representing the -// client's request for the ListMeshes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListMeshes for more information on using the ListMeshes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListMeshesRequest method. -// req, resp := client.ListMeshesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListMeshes -func (c *AppMesh) ListMeshesRequest(input *ListMeshesInput) (req *request.Request, output *ListMeshesOutput) { - op := &request.Operation{ - Name: opListMeshes, - HTTPMethod: "GET", - HTTPPath: "/meshes", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListMeshesInput{} - } - - output = &ListMeshesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListMeshes API operation for AWS App Mesh. -// -// Returns a list of existing service meshes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation ListMeshes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListMeshes -func (c *AppMesh) ListMeshes(input *ListMeshesInput) (*ListMeshesOutput, error) { - req, out := c.ListMeshesRequest(input) - return out, req.Send() -} - -// ListMeshesWithContext is the same as ListMeshes with the addition of -// the ability to pass a context and additional request options. -// -// See ListMeshes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) ListMeshesWithContext(ctx aws.Context, input *ListMeshesInput, opts ...request.Option) (*ListMeshesOutput, error) { - req, out := c.ListMeshesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListMeshesPages iterates over the pages of a ListMeshes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListMeshes 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 ListMeshes operation. -// pageNum := 0 -// err := client.ListMeshesPages(params, -// func(page *ListMeshesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *AppMesh) ListMeshesPages(input *ListMeshesInput, fn func(*ListMeshesOutput, bool) bool) error { - return c.ListMeshesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListMeshesPagesWithContext same as ListMeshesPages 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 *AppMesh) ListMeshesPagesWithContext(ctx aws.Context, input *ListMeshesInput, fn func(*ListMeshesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListMeshesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListMeshesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMeshesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListRoutes = "ListRoutes" - -// ListRoutesRequest generates a "aws/request.Request" representing the -// client's request for the ListRoutes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRoutes for more information on using the ListRoutes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRoutesRequest method. -// req, resp := client.ListRoutesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListRoutes -func (c *AppMesh) ListRoutesRequest(input *ListRoutesInput) (req *request.Request, output *ListRoutesOutput) { - op := &request.Operation{ - Name: opListRoutes, - HTTPMethod: "GET", - HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListRoutesInput{} - } - - output = &ListRoutesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRoutes API operation for AWS App Mesh. -// -// Returns a list of existing routes in a service mesh. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation ListRoutes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListRoutes -func (c *AppMesh) ListRoutes(input *ListRoutesInput) (*ListRoutesOutput, error) { - req, out := c.ListRoutesRequest(input) - return out, req.Send() -} - -// ListRoutesWithContext is the same as ListRoutes with the addition of -// the ability to pass a context and additional request options. -// -// See ListRoutes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) ListRoutesWithContext(ctx aws.Context, input *ListRoutesInput, opts ...request.Option) (*ListRoutesOutput, error) { - req, out := c.ListRoutesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListRoutesPages iterates over the pages of a ListRoutes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListRoutes 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 ListRoutes operation. -// pageNum := 0 -// err := client.ListRoutesPages(params, -// func(page *ListRoutesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *AppMesh) ListRoutesPages(input *ListRoutesInput, fn func(*ListRoutesOutput, bool) bool) error { - return c.ListRoutesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListRoutesPagesWithContext same as ListRoutesPages 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 *AppMesh) ListRoutesPagesWithContext(ctx aws.Context, input *ListRoutesInput, fn func(*ListRoutesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListRoutesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListRoutesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRoutesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListVirtualNodes = "ListVirtualNodes" - -// ListVirtualNodesRequest generates a "aws/request.Request" representing the -// client's request for the ListVirtualNodes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListVirtualNodes for more information on using the ListVirtualNodes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListVirtualNodesRequest method. -// req, resp := client.ListVirtualNodesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListVirtualNodes -func (c *AppMesh) ListVirtualNodesRequest(input *ListVirtualNodesInput) (req *request.Request, output *ListVirtualNodesOutput) { - op := &request.Operation{ - Name: opListVirtualNodes, - HTTPMethod: "GET", - HTTPPath: "/meshes/{meshName}/virtualNodes", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListVirtualNodesInput{} - } - - output = &ListVirtualNodesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListVirtualNodes API operation for AWS App Mesh. -// -// Returns a list of existing virtual nodes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation ListVirtualNodes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListVirtualNodes -func (c *AppMesh) ListVirtualNodes(input *ListVirtualNodesInput) (*ListVirtualNodesOutput, error) { - req, out := c.ListVirtualNodesRequest(input) - return out, req.Send() -} - -// ListVirtualNodesWithContext is the same as ListVirtualNodes with the addition of -// the ability to pass a context and additional request options. -// -// See ListVirtualNodes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) ListVirtualNodesWithContext(ctx aws.Context, input *ListVirtualNodesInput, opts ...request.Option) (*ListVirtualNodesOutput, error) { - req, out := c.ListVirtualNodesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListVirtualNodesPages iterates over the pages of a ListVirtualNodes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListVirtualNodes 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 ListVirtualNodes operation. -// pageNum := 0 -// err := client.ListVirtualNodesPages(params, -// func(page *ListVirtualNodesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *AppMesh) ListVirtualNodesPages(input *ListVirtualNodesInput, fn func(*ListVirtualNodesOutput, bool) bool) error { - return c.ListVirtualNodesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListVirtualNodesPagesWithContext same as ListVirtualNodesPages 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 *AppMesh) ListVirtualNodesPagesWithContext(ctx aws.Context, input *ListVirtualNodesInput, fn func(*ListVirtualNodesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListVirtualNodesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListVirtualNodesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListVirtualNodesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListVirtualRouters = "ListVirtualRouters" - -// ListVirtualRoutersRequest generates a "aws/request.Request" representing the -// client's request for the ListVirtualRouters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListVirtualRouters for more information on using the ListVirtualRouters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListVirtualRoutersRequest method. -// req, resp := client.ListVirtualRoutersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListVirtualRouters -func (c *AppMesh) ListVirtualRoutersRequest(input *ListVirtualRoutersInput) (req *request.Request, output *ListVirtualRoutersOutput) { - op := &request.Operation{ - Name: opListVirtualRouters, - HTTPMethod: "GET", - HTTPPath: "/meshes/{meshName}/virtualRouters", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListVirtualRoutersInput{} - } - - output = &ListVirtualRoutersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListVirtualRouters API operation for AWS App Mesh. -// -// Returns a list of existing virtual routers in a service mesh. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation ListVirtualRouters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListVirtualRouters -func (c *AppMesh) ListVirtualRouters(input *ListVirtualRoutersInput) (*ListVirtualRoutersOutput, error) { - req, out := c.ListVirtualRoutersRequest(input) - return out, req.Send() -} - -// ListVirtualRoutersWithContext is the same as ListVirtualRouters with the addition of -// the ability to pass a context and additional request options. -// -// See ListVirtualRouters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) ListVirtualRoutersWithContext(ctx aws.Context, input *ListVirtualRoutersInput, opts ...request.Option) (*ListVirtualRoutersOutput, error) { - req, out := c.ListVirtualRoutersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListVirtualRoutersPages iterates over the pages of a ListVirtualRouters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListVirtualRouters 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 ListVirtualRouters operation. -// pageNum := 0 -// err := client.ListVirtualRoutersPages(params, -// func(page *ListVirtualRoutersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *AppMesh) ListVirtualRoutersPages(input *ListVirtualRoutersInput, fn func(*ListVirtualRoutersOutput, bool) bool) error { - return c.ListVirtualRoutersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListVirtualRoutersPagesWithContext same as ListVirtualRoutersPages 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 *AppMesh) ListVirtualRoutersPagesWithContext(ctx aws.Context, input *ListVirtualRoutersInput, fn func(*ListVirtualRoutersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListVirtualRoutersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListVirtualRoutersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListVirtualRoutersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opUpdateRoute = "UpdateRoute" - -// UpdateRouteRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRoute for more information on using the UpdateRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRouteRequest method. -// req, resp := client.UpdateRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateRoute -func (c *AppMesh) UpdateRouteRequest(input *UpdateRouteInput) (req *request.Request, output *UpdateRouteOutput) { - op := &request.Operation{ - Name: opUpdateRoute, - HTTPMethod: "PUT", - HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes/{routeName}", - } - - if input == nil { - input = &UpdateRouteInput{} - } - - output = &UpdateRouteOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRoute API operation for AWS App Mesh. -// -// Updates an existing route for a specified service mesh and virtual router. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation UpdateRoute for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeConflictException "ConflictException" -// The request contains a client token that was used for a previous update resource -// call with different specifications. Try the request again with a new client -// token. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) -// in the AWS App Mesh User Guide. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateRoute -func (c *AppMesh) UpdateRoute(input *UpdateRouteInput) (*UpdateRouteOutput, error) { - req, out := c.UpdateRouteRequest(input) - return out, req.Send() -} - -// UpdateRouteWithContext is the same as UpdateRoute with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) UpdateRouteWithContext(ctx aws.Context, input *UpdateRouteInput, opts ...request.Option) (*UpdateRouteOutput, error) { - req, out := c.UpdateRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateVirtualNode = "UpdateVirtualNode" - -// UpdateVirtualNodeRequest generates a "aws/request.Request" representing the -// client's request for the UpdateVirtualNode operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateVirtualNode for more information on using the UpdateVirtualNode -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateVirtualNodeRequest method. -// req, resp := client.UpdateVirtualNodeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateVirtualNode -func (c *AppMesh) UpdateVirtualNodeRequest(input *UpdateVirtualNodeInput) (req *request.Request, output *UpdateVirtualNodeOutput) { - op := &request.Operation{ - Name: opUpdateVirtualNode, - HTTPMethod: "PUT", - HTTPPath: "/meshes/{meshName}/virtualNodes/{virtualNodeName}", - } - - if input == nil { - input = &UpdateVirtualNodeInput{} - } - - output = &UpdateVirtualNodeOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateVirtualNode API operation for AWS App Mesh. -// -// Updates an existing virtual node in a specified service mesh. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation UpdateVirtualNode for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeConflictException "ConflictException" -// The request contains a client token that was used for a previous update resource -// call with different specifications. Try the request again with a new client -// token. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) -// in the AWS App Mesh User Guide. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateVirtualNode -func (c *AppMesh) UpdateVirtualNode(input *UpdateVirtualNodeInput) (*UpdateVirtualNodeOutput, error) { - req, out := c.UpdateVirtualNodeRequest(input) - return out, req.Send() -} - -// UpdateVirtualNodeWithContext is the same as UpdateVirtualNode with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateVirtualNode for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) UpdateVirtualNodeWithContext(ctx aws.Context, input *UpdateVirtualNodeInput, opts ...request.Option) (*UpdateVirtualNodeOutput, error) { - req, out := c.UpdateVirtualNodeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateVirtualRouter = "UpdateVirtualRouter" - -// UpdateVirtualRouterRequest generates a "aws/request.Request" representing the -// client's request for the UpdateVirtualRouter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateVirtualRouter for more information on using the UpdateVirtualRouter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateVirtualRouterRequest method. -// req, resp := client.UpdateVirtualRouterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateVirtualRouter -func (c *AppMesh) UpdateVirtualRouterRequest(input *UpdateVirtualRouterInput) (req *request.Request, output *UpdateVirtualRouterOutput) { - op := &request.Operation{ - Name: opUpdateVirtualRouter, - HTTPMethod: "PUT", - HTTPPath: "/meshes/{meshName}/virtualRouters/{virtualRouterName}", - } - - if input == nil { - input = &UpdateVirtualRouterInput{} - } - - output = &UpdateVirtualRouterOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateVirtualRouter API operation for AWS App Mesh. -// -// Updates an existing virtual router in a specified service mesh. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS App Mesh's -// API operation UpdateVirtualRouter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request syntax was malformed. Check your request syntax and try again. -// -// * ErrCodeConflictException "ConflictException" -// The request contains a client token that was used for a previous update resource -// call with different specifications. Try the request again with a new client -// token. -// -// * ErrCodeForbiddenException "ForbiddenException" -// You do not have permissions to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The request processing has failed because of an unknown error, exception, -// or failure. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) -// in the AWS App Mesh User Guide. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified resource does not exist. Check your request syntax and try -// again. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed due to a temporary failure of the service. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The maximum request rate permitted by the App Mesh APIs has been exceeded -// for your account. For best results, use an increasing or variable sleep interval -// between requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateVirtualRouter -func (c *AppMesh) UpdateVirtualRouter(input *UpdateVirtualRouterInput) (*UpdateVirtualRouterOutput, error) { - req, out := c.UpdateVirtualRouterRequest(input) - return out, req.Send() -} - -// UpdateVirtualRouterWithContext is the same as UpdateVirtualRouter with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateVirtualRouter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppMesh) UpdateVirtualRouterWithContext(ctx aws.Context, input *UpdateVirtualRouterInput, opts ...request.Option) (*UpdateVirtualRouterOutput, error) { - req, out := c.UpdateVirtualRouterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type CreateMeshInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed. - ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - - // The name to use for the service mesh. - // - // MeshName is a required field - MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateMeshInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMeshInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateMeshInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateMeshInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateMeshInput) SetClientToken(v string) *CreateMeshInput { - s.ClientToken = &v - return s -} - -// SetMeshName sets the MeshName field's value. -func (s *CreateMeshInput) SetMeshName(v string) *CreateMeshInput { - s.MeshName = &v - return s -} - -type CreateMeshOutput struct { - _ struct{} `type:"structure" payload:"Mesh"` - - // The full description of your service mesh following the create call. - Mesh *MeshData `locationName:"mesh" type:"structure"` -} - -// String returns the string representation -func (s CreateMeshOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMeshOutput) GoString() string { - return s.String() -} - -// SetMesh sets the Mesh field's value. -func (s *CreateMeshOutput) SetMesh(v *MeshData) *CreateMeshOutput { - s.Mesh = v - return s -} - -type CreateRouteInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed. - ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - - // The name of the service mesh in which to create the route. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The name to use for the route. - // - // RouteName is a required field - RouteName *string `locationName:"routeName" min:"1" type:"string" required:"true"` - - // The route specification to apply. - // - // Spec is a required field - Spec *RouteSpec `locationName:"spec" type:"structure" required:"true"` - - // The name of the virtual router in which to create the route. - // - // VirtualRouterName is a required field - VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRouteInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - if s.RouteName == nil { - invalidParams.Add(request.NewErrParamRequired("RouteName")) - } - if s.RouteName != nil && len(*s.RouteName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteName", 1)) - } - if s.Spec == nil { - invalidParams.Add(request.NewErrParamRequired("Spec")) - } - if s.VirtualRouterName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) - } - if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) - } - if s.Spec != nil { - if err := s.Spec.Validate(); err != nil { - invalidParams.AddNested("Spec", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateRouteInput) SetClientToken(v string) *CreateRouteInput { - s.ClientToken = &v - return s -} - -// SetMeshName sets the MeshName field's value. -func (s *CreateRouteInput) SetMeshName(v string) *CreateRouteInput { - s.MeshName = &v - return s -} - -// SetRouteName sets the RouteName field's value. -func (s *CreateRouteInput) SetRouteName(v string) *CreateRouteInput { - s.RouteName = &v - return s -} - -// SetSpec sets the Spec field's value. -func (s *CreateRouteInput) SetSpec(v *RouteSpec) *CreateRouteInput { - s.Spec = v - return s -} - -// SetVirtualRouterName sets the VirtualRouterName field's value. -func (s *CreateRouteInput) SetVirtualRouterName(v string) *CreateRouteInput { - s.VirtualRouterName = &v - return s -} - -type CreateRouteOutput struct { - _ struct{} `type:"structure" payload:"Route"` - - // The full description of your mesh following the create call. - Route *RouteData `locationName:"route" type:"structure"` -} - -// String returns the string representation -func (s CreateRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRouteOutput) GoString() string { - return s.String() -} - -// SetRoute sets the Route field's value. -func (s *CreateRouteOutput) SetRoute(v *RouteData) *CreateRouteOutput { - s.Route = v - return s -} - -type CreateVirtualNodeInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed. - ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - - // The name of the service mesh in which to create the virtual node. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The virtual node specification to apply. - // - // Spec is a required field - Spec *VirtualNodeSpec `locationName:"spec" type:"structure" required:"true"` - - // The name to use for the virtual node. - // - // VirtualNodeName is a required field - VirtualNodeName *string `locationName:"virtualNodeName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateVirtualNodeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVirtualNodeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVirtualNodeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVirtualNodeInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - if s.Spec == nil { - invalidParams.Add(request.NewErrParamRequired("Spec")) - } - if s.VirtualNodeName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualNodeName")) - } - if s.VirtualNodeName != nil && len(*s.VirtualNodeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualNodeName", 1)) - } - if s.Spec != nil { - if err := s.Spec.Validate(); err != nil { - invalidParams.AddNested("Spec", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateVirtualNodeInput) SetClientToken(v string) *CreateVirtualNodeInput { - s.ClientToken = &v - return s -} - -// SetMeshName sets the MeshName field's value. -func (s *CreateVirtualNodeInput) SetMeshName(v string) *CreateVirtualNodeInput { - s.MeshName = &v - return s -} - -// SetSpec sets the Spec field's value. -func (s *CreateVirtualNodeInput) SetSpec(v *VirtualNodeSpec) *CreateVirtualNodeInput { - s.Spec = v - return s -} - -// SetVirtualNodeName sets the VirtualNodeName field's value. -func (s *CreateVirtualNodeInput) SetVirtualNodeName(v string) *CreateVirtualNodeInput { - s.VirtualNodeName = &v - return s -} - -type CreateVirtualNodeOutput struct { - _ struct{} `type:"structure" payload:"VirtualNode"` - - // The full description of your virtual node following the create call. - VirtualNode *VirtualNodeData `locationName:"virtualNode" type:"structure"` -} - -// String returns the string representation -func (s CreateVirtualNodeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVirtualNodeOutput) GoString() string { - return s.String() -} - -// SetVirtualNode sets the VirtualNode field's value. -func (s *CreateVirtualNodeOutput) SetVirtualNode(v *VirtualNodeData) *CreateVirtualNodeOutput { - s.VirtualNode = v - return s -} - -type CreateVirtualRouterInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed. - ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - - // The name of the service mesh in which to create the virtual router. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The virtual router specification to apply. - // - // Spec is a required field - Spec *VirtualRouterSpec `locationName:"spec" type:"structure" required:"true"` - - // The name to use for the virtual router. - // - // VirtualRouterName is a required field - VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateVirtualRouterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVirtualRouterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVirtualRouterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVirtualRouterInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - if s.Spec == nil { - invalidParams.Add(request.NewErrParamRequired("Spec")) - } - if s.VirtualRouterName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) - } - if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateVirtualRouterInput) SetClientToken(v string) *CreateVirtualRouterInput { - s.ClientToken = &v - return s -} - -// SetMeshName sets the MeshName field's value. -func (s *CreateVirtualRouterInput) SetMeshName(v string) *CreateVirtualRouterInput { - s.MeshName = &v - return s -} - -// SetSpec sets the Spec field's value. -func (s *CreateVirtualRouterInput) SetSpec(v *VirtualRouterSpec) *CreateVirtualRouterInput { - s.Spec = v - return s -} - -// SetVirtualRouterName sets the VirtualRouterName field's value. -func (s *CreateVirtualRouterInput) SetVirtualRouterName(v string) *CreateVirtualRouterInput { - s.VirtualRouterName = &v - return s -} - -type CreateVirtualRouterOutput struct { - _ struct{} `type:"structure" payload:"VirtualRouter"` - - // The full description of your virtual router following the create call. - VirtualRouter *VirtualRouterData `locationName:"virtualRouter" type:"structure"` -} - -// String returns the string representation -func (s CreateVirtualRouterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVirtualRouterOutput) GoString() string { - return s.String() -} - -// SetVirtualRouter sets the VirtualRouter field's value. -func (s *CreateVirtualRouterOutput) SetVirtualRouter(v *VirtualRouterData) *CreateVirtualRouterOutput { - s.VirtualRouter = v - return s -} - -type DeleteMeshInput struct { - _ struct{} `type:"structure"` - - // The name of the service mesh to delete. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteMeshInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMeshInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMeshInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMeshInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMeshName sets the MeshName field's value. -func (s *DeleteMeshInput) SetMeshName(v string) *DeleteMeshInput { - s.MeshName = &v - return s -} - -type DeleteMeshOutput struct { - _ struct{} `type:"structure" payload:"Mesh"` - - // The service mesh that was deleted. - Mesh *MeshData `locationName:"mesh" type:"structure"` -} - -// String returns the string representation -func (s DeleteMeshOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMeshOutput) GoString() string { - return s.String() -} - -// SetMesh sets the Mesh field's value. -func (s *DeleteMeshOutput) SetMesh(v *MeshData) *DeleteMeshOutput { - s.Mesh = v - return s -} - -type DeleteRouteInput struct { - _ struct{} `type:"structure"` - - // The name of the service mesh in which to delete the route. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The name of the route to delete. - // - // RouteName is a required field - RouteName *string `location:"uri" locationName:"routeName" min:"1" type:"string" required:"true"` - - // The name of the virtual router in which to delete the route. - // - // VirtualRouterName is a required field - VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRouteInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - if s.RouteName == nil { - invalidParams.Add(request.NewErrParamRequired("RouteName")) - } - if s.RouteName != nil && len(*s.RouteName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteName", 1)) - } - if s.VirtualRouterName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) - } - if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMeshName sets the MeshName field's value. -func (s *DeleteRouteInput) SetMeshName(v string) *DeleteRouteInput { - s.MeshName = &v - return s -} - -// SetRouteName sets the RouteName field's value. -func (s *DeleteRouteInput) SetRouteName(v string) *DeleteRouteInput { - s.RouteName = &v - return s -} - -// SetVirtualRouterName sets the VirtualRouterName field's value. -func (s *DeleteRouteInput) SetVirtualRouterName(v string) *DeleteRouteInput { - s.VirtualRouterName = &v - return s -} - -type DeleteRouteOutput struct { - _ struct{} `type:"structure" payload:"Route"` - - // The route that was deleted. - Route *RouteData `locationName:"route" type:"structure"` -} - -// String returns the string representation -func (s DeleteRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRouteOutput) GoString() string { - return s.String() -} - -// SetRoute sets the Route field's value. -func (s *DeleteRouteOutput) SetRoute(v *RouteData) *DeleteRouteOutput { - s.Route = v - return s -} - -type DeleteVirtualNodeInput struct { - _ struct{} `type:"structure"` - - // The name of the service mesh in which to delete the virtual node. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The name of the virtual node to delete. - // - // VirtualNodeName is a required field - VirtualNodeName *string `location:"uri" locationName:"virtualNodeName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVirtualNodeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVirtualNodeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVirtualNodeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVirtualNodeInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - if s.VirtualNodeName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualNodeName")) - } - if s.VirtualNodeName != nil && len(*s.VirtualNodeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualNodeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMeshName sets the MeshName field's value. -func (s *DeleteVirtualNodeInput) SetMeshName(v string) *DeleteVirtualNodeInput { - s.MeshName = &v - return s -} - -// SetVirtualNodeName sets the VirtualNodeName field's value. -func (s *DeleteVirtualNodeInput) SetVirtualNodeName(v string) *DeleteVirtualNodeInput { - s.VirtualNodeName = &v - return s -} - -type DeleteVirtualNodeOutput struct { - _ struct{} `type:"structure" payload:"VirtualNode"` - - // The virtual node that was deleted. - VirtualNode *VirtualNodeData `locationName:"virtualNode" type:"structure"` -} - -// String returns the string representation -func (s DeleteVirtualNodeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVirtualNodeOutput) GoString() string { - return s.String() -} - -// SetVirtualNode sets the VirtualNode field's value. -func (s *DeleteVirtualNodeOutput) SetVirtualNode(v *VirtualNodeData) *DeleteVirtualNodeOutput { - s.VirtualNode = v - return s -} - -type DeleteVirtualRouterInput struct { - _ struct{} `type:"structure"` - - // The name of the service mesh in which to delete the virtual router. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The name of the virtual router to delete. - // - // VirtualRouterName is a required field - VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVirtualRouterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVirtualRouterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVirtualRouterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVirtualRouterInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - if s.VirtualRouterName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) - } - if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMeshName sets the MeshName field's value. -func (s *DeleteVirtualRouterInput) SetMeshName(v string) *DeleteVirtualRouterInput { - s.MeshName = &v - return s -} - -// SetVirtualRouterName sets the VirtualRouterName field's value. -func (s *DeleteVirtualRouterInput) SetVirtualRouterName(v string) *DeleteVirtualRouterInput { - s.VirtualRouterName = &v - return s -} - -type DeleteVirtualRouterOutput struct { - _ struct{} `type:"structure" payload:"VirtualRouter"` - - // The virtual router that was deleted. - VirtualRouter *VirtualRouterData `locationName:"virtualRouter" type:"structure"` -} - -// String returns the string representation -func (s DeleteVirtualRouterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVirtualRouterOutput) GoString() string { - return s.String() -} - -// SetVirtualRouter sets the VirtualRouter field's value. -func (s *DeleteVirtualRouterOutput) SetVirtualRouter(v *VirtualRouterData) *DeleteVirtualRouterOutput { - s.VirtualRouter = v - return s -} - -type DescribeMeshInput struct { - _ struct{} `type:"structure"` - - // The name of the service mesh to describe. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeMeshInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMeshInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMeshInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMeshInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMeshName sets the MeshName field's value. -func (s *DescribeMeshInput) SetMeshName(v string) *DescribeMeshInput { - s.MeshName = &v - return s -} - -type DescribeMeshOutput struct { - _ struct{} `type:"structure" payload:"Mesh"` - - // The full description of your service mesh. - Mesh *MeshData `locationName:"mesh" type:"structure"` -} - -// String returns the string representation -func (s DescribeMeshOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMeshOutput) GoString() string { - return s.String() -} - -// SetMesh sets the Mesh field's value. -func (s *DescribeMeshOutput) SetMesh(v *MeshData) *DescribeMeshOutput { - s.Mesh = v - return s -} - -type DescribeRouteInput struct { - _ struct{} `type:"structure"` - - // The name of the service mesh in which the route resides. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The name of the route to describe. - // - // RouteName is a required field - RouteName *string `location:"uri" locationName:"routeName" min:"1" type:"string" required:"true"` - - // The name of the virtual router with which the route is associated. - // - // VirtualRouterName is a required field - VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRouteInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - if s.RouteName == nil { - invalidParams.Add(request.NewErrParamRequired("RouteName")) - } - if s.RouteName != nil && len(*s.RouteName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteName", 1)) - } - if s.VirtualRouterName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) - } - if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMeshName sets the MeshName field's value. -func (s *DescribeRouteInput) SetMeshName(v string) *DescribeRouteInput { - s.MeshName = &v - return s -} - -// SetRouteName sets the RouteName field's value. -func (s *DescribeRouteInput) SetRouteName(v string) *DescribeRouteInput { - s.RouteName = &v - return s -} - -// SetVirtualRouterName sets the VirtualRouterName field's value. -func (s *DescribeRouteInput) SetVirtualRouterName(v string) *DescribeRouteInput { - s.VirtualRouterName = &v - return s -} - -type DescribeRouteOutput struct { - _ struct{} `type:"structure" payload:"Route"` - - // The full description of your route. - Route *RouteData `locationName:"route" type:"structure"` -} - -// String returns the string representation -func (s DescribeRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRouteOutput) GoString() string { - return s.String() -} - -// SetRoute sets the Route field's value. -func (s *DescribeRouteOutput) SetRoute(v *RouteData) *DescribeRouteOutput { - s.Route = v - return s -} - -type DescribeVirtualNodeInput struct { - _ struct{} `type:"structure"` - - // The name of the service mesh in which the virtual node resides. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The name of the virtual node to describe. - // - // VirtualNodeName is a required field - VirtualNodeName *string `location:"uri" locationName:"virtualNodeName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeVirtualNodeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVirtualNodeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeVirtualNodeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeVirtualNodeInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - if s.VirtualNodeName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualNodeName")) - } - if s.VirtualNodeName != nil && len(*s.VirtualNodeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualNodeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMeshName sets the MeshName field's value. -func (s *DescribeVirtualNodeInput) SetMeshName(v string) *DescribeVirtualNodeInput { - s.MeshName = &v - return s -} - -// SetVirtualNodeName sets the VirtualNodeName field's value. -func (s *DescribeVirtualNodeInput) SetVirtualNodeName(v string) *DescribeVirtualNodeInput { - s.VirtualNodeName = &v - return s -} - -type DescribeVirtualNodeOutput struct { - _ struct{} `type:"structure" payload:"VirtualNode"` - - // The full description of your virtual node. - VirtualNode *VirtualNodeData `locationName:"virtualNode" type:"structure"` -} - -// String returns the string representation -func (s DescribeVirtualNodeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVirtualNodeOutput) GoString() string { - return s.String() -} - -// SetVirtualNode sets the VirtualNode field's value. -func (s *DescribeVirtualNodeOutput) SetVirtualNode(v *VirtualNodeData) *DescribeVirtualNodeOutput { - s.VirtualNode = v - return s -} - -type DescribeVirtualRouterInput struct { - _ struct{} `type:"structure"` - - // The name of the service mesh in which the virtual router resides. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The name of the virtual router to describe. - // - // VirtualRouterName is a required field - VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeVirtualRouterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVirtualRouterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeVirtualRouterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeVirtualRouterInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - if s.VirtualRouterName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) - } - if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMeshName sets the MeshName field's value. -func (s *DescribeVirtualRouterInput) SetMeshName(v string) *DescribeVirtualRouterInput { - s.MeshName = &v - return s -} - -// SetVirtualRouterName sets the VirtualRouterName field's value. -func (s *DescribeVirtualRouterInput) SetVirtualRouterName(v string) *DescribeVirtualRouterInput { - s.VirtualRouterName = &v - return s -} - -type DescribeVirtualRouterOutput struct { - _ struct{} `type:"structure" payload:"VirtualRouter"` - - // The full description of your virtual router. - VirtualRouter *VirtualRouterData `locationName:"virtualRouter" type:"structure"` -} - -// String returns the string representation -func (s DescribeVirtualRouterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVirtualRouterOutput) GoString() string { - return s.String() -} - -// SetVirtualRouter sets the VirtualRouter field's value. -func (s *DescribeVirtualRouterOutput) SetVirtualRouter(v *VirtualRouterData) *DescribeVirtualRouterOutput { - s.VirtualRouter = v - return s -} - -// The DNS service discovery information for your virtual node. -type DnsServiceDiscovery struct { - _ struct{} `type:"structure"` - - // The DNS service name for your virtual node. - ServiceName *string `locationName:"serviceName" type:"string"` -} - -// String returns the string representation -func (s DnsServiceDiscovery) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DnsServiceDiscovery) GoString() string { - return s.String() -} - -// SetServiceName sets the ServiceName field's value. -func (s *DnsServiceDiscovery) SetServiceName(v string) *DnsServiceDiscovery { - s.ServiceName = &v - return s -} - -// An object representing the health check policy for a virtual node's listener. -type HealthCheckPolicy struct { - _ struct{} `type:"structure"` - - // The number of consecutive successful health checks that must occur before - // declaring listener healthy. - // - // HealthyThreshold is a required field - HealthyThreshold *int64 `locationName:"healthyThreshold" min:"2" type:"integer" required:"true"` - - // The time period in milliseconds between each health check execution. - // - // IntervalMillis is a required field - IntervalMillis *int64 `locationName:"intervalMillis" min:"5000" type:"long" required:"true"` - - // The destination path for the health check request. This is only required - // if the specified protocol is HTTP; if the protocol is TCP, then this parameter - // is ignored. - Path *string `locationName:"path" type:"string"` - - // The destination port for the health check request. This port must match the - // port defined in the PortMapping for the listener. - Port *int64 `locationName:"port" min:"1" type:"integer"` - - // The protocol for the health check request. - // - // Protocol is a required field - Protocol *string `locationName:"protocol" type:"string" required:"true" enum:"PortProtocol"` - - // The amount of time to wait when receiving a response from the health check, - // in milliseconds. - // - // TimeoutMillis is a required field - TimeoutMillis *int64 `locationName:"timeoutMillis" min:"2000" type:"long" required:"true"` - - // The number of consecutive failed health checks that must occur before declaring - // a virtual node unhealthy. - // - // UnhealthyThreshold is a required field - UnhealthyThreshold *int64 `locationName:"unhealthyThreshold" min:"2" type:"integer" required:"true"` -} - -// String returns the string representation -func (s HealthCheckPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HealthCheckPolicy) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HealthCheckPolicy) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HealthCheckPolicy"} - if s.HealthyThreshold == nil { - invalidParams.Add(request.NewErrParamRequired("HealthyThreshold")) - } - if s.HealthyThreshold != nil && *s.HealthyThreshold < 2 { - invalidParams.Add(request.NewErrParamMinValue("HealthyThreshold", 2)) - } - if s.IntervalMillis == nil { - invalidParams.Add(request.NewErrParamRequired("IntervalMillis")) - } - if s.IntervalMillis != nil && *s.IntervalMillis < 5000 { - invalidParams.Add(request.NewErrParamMinValue("IntervalMillis", 5000)) - } - if s.Port != nil && *s.Port < 1 { - invalidParams.Add(request.NewErrParamMinValue("Port", 1)) - } - if s.Protocol == nil { - invalidParams.Add(request.NewErrParamRequired("Protocol")) - } - if s.TimeoutMillis == nil { - invalidParams.Add(request.NewErrParamRequired("TimeoutMillis")) - } - if s.TimeoutMillis != nil && *s.TimeoutMillis < 2000 { - invalidParams.Add(request.NewErrParamMinValue("TimeoutMillis", 2000)) - } - if s.UnhealthyThreshold == nil { - invalidParams.Add(request.NewErrParamRequired("UnhealthyThreshold")) - } - if s.UnhealthyThreshold != nil && *s.UnhealthyThreshold < 2 { - invalidParams.Add(request.NewErrParamMinValue("UnhealthyThreshold", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthyThreshold sets the HealthyThreshold field's value. -func (s *HealthCheckPolicy) SetHealthyThreshold(v int64) *HealthCheckPolicy { - s.HealthyThreshold = &v - return s -} - -// SetIntervalMillis sets the IntervalMillis field's value. -func (s *HealthCheckPolicy) SetIntervalMillis(v int64) *HealthCheckPolicy { - s.IntervalMillis = &v - return s -} - -// SetPath sets the Path field's value. -func (s *HealthCheckPolicy) SetPath(v string) *HealthCheckPolicy { - s.Path = &v - return s -} - -// SetPort sets the Port field's value. -func (s *HealthCheckPolicy) SetPort(v int64) *HealthCheckPolicy { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *HealthCheckPolicy) SetProtocol(v string) *HealthCheckPolicy { - s.Protocol = &v - return s -} - -// SetTimeoutMillis sets the TimeoutMillis field's value. -func (s *HealthCheckPolicy) SetTimeoutMillis(v int64) *HealthCheckPolicy { - s.TimeoutMillis = &v - return s -} - -// SetUnhealthyThreshold sets the UnhealthyThreshold field's value. -func (s *HealthCheckPolicy) SetUnhealthyThreshold(v int64) *HealthCheckPolicy { - s.UnhealthyThreshold = &v - return s -} - -// An object representing the HTTP routing specification for a route. -type HttpRoute struct { - _ struct{} `type:"structure"` - - // The action to take if a match is determined. - Action *HttpRouteAction `locationName:"action" type:"structure"` - - // The criteria for determining an HTTP request match. - Match *HttpRouteMatch `locationName:"match" type:"structure"` -} - -// String returns the string representation -func (s HttpRoute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HttpRoute) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HttpRoute) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HttpRoute"} - if s.Action != nil { - if err := s.Action.Validate(); err != nil { - invalidParams.AddNested("Action", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *HttpRoute) SetAction(v *HttpRouteAction) *HttpRoute { - s.Action = v - return s -} - -// SetMatch sets the Match field's value. -func (s *HttpRoute) SetMatch(v *HttpRouteMatch) *HttpRoute { - s.Match = v - return s -} - -// An object representing the traffic distribution requirements for matched -// HTTP requests. -type HttpRouteAction struct { - _ struct{} `type:"structure"` - - // The targets that traffic is routed to when a request matches the route. You - // can specify one or more targets and their relative weights with which to - // distribute traffic. - WeightedTargets []*WeightedTarget `locationName:"weightedTargets" type:"list"` -} - -// String returns the string representation -func (s HttpRouteAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HttpRouteAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HttpRouteAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HttpRouteAction"} - if s.WeightedTargets != nil { - for i, v := range s.WeightedTargets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "WeightedTargets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWeightedTargets sets the WeightedTargets field's value. -func (s *HttpRouteAction) SetWeightedTargets(v []*WeightedTarget) *HttpRouteAction { - s.WeightedTargets = v - return s -} - -// An object representing the requirements for a route to match HTTP requests -// for a virtual router. -type HttpRouteMatch struct { - _ struct{} `type:"structure"` - - // Specifies the path with which to match requests. This parameter must always - // start with /, which by itself matches all requests to the virtual router - // service name. You can also match for path-based routing of requests. For - // example, if your virtual router service name is my-service.local, and you - // want the route to match requests to my-service.local/metrics, then your prefix - // should be /metrics. - Prefix *string `locationName:"prefix" type:"string"` -} - -// String returns the string representation -func (s HttpRouteMatch) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HttpRouteMatch) GoString() string { - return s.String() -} - -// SetPrefix sets the Prefix field's value. -func (s *HttpRouteMatch) SetPrefix(v string) *HttpRouteMatch { - s.Prefix = &v - return s -} - -type ListMeshesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of mesh results returned by ListMeshes in paginated output. - // When this parameter is used, ListMeshes only returns limit results in a single - // page along with a nextToken response element. The remaining results of the - // initial request can be seen by sending another ListMeshes request with the - // returned nextToken value. This value can be between 1 and 100. If this parameter - // is not used, then ListMeshes returns up to 100 results and a nextToken value - // if applicable. - Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"` - - // The nextToken value returned from a previous paginated ListMeshes request - // where limit was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListMeshesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListMeshesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListMeshesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListMeshesInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListMeshesInput) SetLimit(v int64) *ListMeshesInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListMeshesInput) SetNextToken(v string) *ListMeshesInput { - s.NextToken = &v - return s -} - -type ListMeshesOutput struct { - _ struct{} `type:"structure"` - - // The list of existing service meshes. - // - // Meshes is a required field - Meshes []*MeshRef `locationName:"meshes" type:"list" required:"true"` - - // The nextToken value to include in a future ListMeshes request. When the results - // of a ListMeshes request exceed limit, this value can be used to retrieve - // the next page of results. This value is null when there are no more results - // to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListMeshesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListMeshesOutput) GoString() string { - return s.String() -} - -// SetMeshes sets the Meshes field's value. -func (s *ListMeshesOutput) SetMeshes(v []*MeshRef) *ListMeshesOutput { - s.Meshes = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListMeshesOutput) SetNextToken(v string) *ListMeshesOutput { - s.NextToken = &v - return s -} - -type ListRoutesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of mesh results returned by ListRoutes in paginated output. - // When this parameter is used, ListRoutes only returns limit results in a single - // page along with a nextToken response element. The remaining results of the - // initial request can be seen by sending another ListRoutes request with the - // returned nextToken value. This value can be between 1 and 100. If this parameter - // is not used, then ListRoutes returns up to 100 results and a nextToken value - // if applicable. - Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"` - - // The name of the service mesh in which to list routes. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The nextToken value returned from a previous paginated ListRoutes request - // where limit was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The name of the virtual router in which to list routes. - // - // VirtualRouterName is a required field - VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListRoutesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRoutesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRoutesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRoutesInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - if s.VirtualRouterName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) - } - if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListRoutesInput) SetLimit(v int64) *ListRoutesInput { - s.Limit = &v - return s -} - -// SetMeshName sets the MeshName field's value. -func (s *ListRoutesInput) SetMeshName(v string) *ListRoutesInput { - s.MeshName = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRoutesInput) SetNextToken(v string) *ListRoutesInput { - s.NextToken = &v - return s -} - -// SetVirtualRouterName sets the VirtualRouterName field's value. -func (s *ListRoutesInput) SetVirtualRouterName(v string) *ListRoutesInput { - s.VirtualRouterName = &v - return s -} - -type ListRoutesOutput struct { - _ struct{} `type:"structure"` - - // The nextToken value to include in a future ListRoutes request. When the results - // of a ListRoutes request exceed limit, this value can be used to retrieve - // the next page of results. This value is null when there are no more results - // to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // The list of existing routes for the specified service mesh and virtual router. - // - // Routes is a required field - Routes []*RouteRef `locationName:"routes" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListRoutesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRoutesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRoutesOutput) SetNextToken(v string) *ListRoutesOutput { - s.NextToken = &v - return s -} - -// SetRoutes sets the Routes field's value. -func (s *ListRoutesOutput) SetRoutes(v []*RouteRef) *ListRoutesOutput { - s.Routes = v - return s -} - -type ListVirtualNodesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of mesh results returned by ListVirtualNodes in paginated - // output. When this parameter is used, ListVirtualNodes only returns limit - // results in a single page along with a nextToken response element. The remaining - // results of the initial request can be seen by sending another ListVirtualNodes - // request with the returned nextToken value. This value can be between 1 and - // 100. If this parameter is not used, then ListVirtualNodes returns up to 100 - // results and a nextToken value if applicable. - Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"` - - // The name of the service mesh in which to list virtual nodes. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The nextToken value returned from a previous paginated ListVirtualNodes request - // where limit was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListVirtualNodesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVirtualNodesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListVirtualNodesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListVirtualNodesInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListVirtualNodesInput) SetLimit(v int64) *ListVirtualNodesInput { - s.Limit = &v - return s -} - -// SetMeshName sets the MeshName field's value. -func (s *ListVirtualNodesInput) SetMeshName(v string) *ListVirtualNodesInput { - s.MeshName = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListVirtualNodesInput) SetNextToken(v string) *ListVirtualNodesInput { - s.NextToken = &v - return s -} - -type ListVirtualNodesOutput struct { - _ struct{} `type:"structure"` - - // The nextToken value to include in a future ListVirtualNodes request. When - // the results of a ListVirtualNodes request exceed limit, this value can be - // used to retrieve the next page of results. This value is null when there - // are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // The list of existing virtual nodes for the specified service mesh. - // - // VirtualNodes is a required field - VirtualNodes []*VirtualNodeRef `locationName:"virtualNodes" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListVirtualNodesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVirtualNodesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListVirtualNodesOutput) SetNextToken(v string) *ListVirtualNodesOutput { - s.NextToken = &v - return s -} - -// SetVirtualNodes sets the VirtualNodes field's value. -func (s *ListVirtualNodesOutput) SetVirtualNodes(v []*VirtualNodeRef) *ListVirtualNodesOutput { - s.VirtualNodes = v - return s -} - -type ListVirtualRoutersInput struct { - _ struct{} `type:"structure"` - - // The maximum number of mesh results returned by ListVirtualRouters in paginated - // output. When this parameter is used, ListVirtualRouters only returns limit - // results in a single page along with a nextToken response element. The remaining - // results of the initial request can be seen by sending another ListVirtualRouters - // request with the returned nextToken value. This value can be between 1 and - // 100. If this parameter is not used, then ListVirtualRouters returns up to - // 100 results and a nextToken value if applicable. - Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"` - - // The name of the service mesh in which to list virtual routers. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The nextToken value returned from a previous paginated ListVirtualRouters - // request where limit was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListVirtualRoutersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVirtualRoutersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListVirtualRoutersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListVirtualRoutersInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListVirtualRoutersInput) SetLimit(v int64) *ListVirtualRoutersInput { - s.Limit = &v - return s -} - -// SetMeshName sets the MeshName field's value. -func (s *ListVirtualRoutersInput) SetMeshName(v string) *ListVirtualRoutersInput { - s.MeshName = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListVirtualRoutersInput) SetNextToken(v string) *ListVirtualRoutersInput { - s.NextToken = &v - return s -} - -type ListVirtualRoutersOutput struct { - _ struct{} `type:"structure"` - - // The nextToken value to include in a future ListVirtualRouters request. When - // the results of a ListVirtualRouters request exceed limit, this value can - // be used to retrieve the next page of results. This value is null when there - // are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // The list of existing virtual routers for the specified service mesh. - // - // VirtualRouters is a required field - VirtualRouters []*VirtualRouterRef `locationName:"virtualRouters" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListVirtualRoutersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVirtualRoutersOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListVirtualRoutersOutput) SetNextToken(v string) *ListVirtualRoutersOutput { - s.NextToken = &v - return s -} - -// SetVirtualRouters sets the VirtualRouters field's value. -func (s *ListVirtualRoutersOutput) SetVirtualRouters(v []*VirtualRouterRef) *ListVirtualRoutersOutput { - s.VirtualRouters = v - return s -} - -// An object representing a listener for a virtual node. -type Listener struct { - _ struct{} `type:"structure"` - - // The health check information for the listener. - HealthCheck *HealthCheckPolicy `locationName:"healthCheck" type:"structure"` - - // The port mapping information for the listener. - PortMapping *PortMapping `locationName:"portMapping" type:"structure"` -} - -// String returns the string representation -func (s Listener) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Listener) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Listener) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Listener"} - if s.HealthCheck != nil { - if err := s.HealthCheck.Validate(); err != nil { - invalidParams.AddNested("HealthCheck", err.(request.ErrInvalidParams)) - } - } - if s.PortMapping != nil { - if err := s.PortMapping.Validate(); err != nil { - invalidParams.AddNested("PortMapping", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthCheck sets the HealthCheck field's value. -func (s *Listener) SetHealthCheck(v *HealthCheckPolicy) *Listener { - s.HealthCheck = v - return s -} - -// SetPortMapping sets the PortMapping field's value. -func (s *Listener) SetPortMapping(v *PortMapping) *Listener { - s.PortMapping = v - return s -} - -// An object representing a service mesh returned by a describe operation. -type MeshData struct { - _ struct{} `type:"structure"` - - // The name of the service mesh. - // - // MeshName is a required field - MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` - - // The associated metadata for the service mesh. - // - // Metadata is a required field - Metadata *ResourceMetadata `locationName:"metadata" type:"structure" required:"true"` - - // The status of the service mesh. - Status *MeshStatus `locationName:"status" type:"structure"` -} - -// String returns the string representation -func (s MeshData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MeshData) GoString() string { - return s.String() -} - -// SetMeshName sets the MeshName field's value. -func (s *MeshData) SetMeshName(v string) *MeshData { - s.MeshName = &v - return s -} - -// SetMetadata sets the Metadata field's value. -func (s *MeshData) SetMetadata(v *ResourceMetadata) *MeshData { - s.Metadata = v - return s -} - -// SetStatus sets the Status field's value. -func (s *MeshData) SetStatus(v *MeshStatus) *MeshData { - s.Status = v - return s -} - -// An object representing a service mesh returned by a list operation. -type MeshRef struct { - _ struct{} `type:"structure"` - - // The full Amazon Resource Name (ARN) of the service mesh. - Arn *string `locationName:"arn" type:"string"` - - // The name of the service mesh. - MeshName *string `locationName:"meshName" min:"1" type:"string"` -} - -// String returns the string representation -func (s MeshRef) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MeshRef) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *MeshRef) SetArn(v string) *MeshRef { - s.Arn = &v - return s -} - -// SetMeshName sets the MeshName field's value. -func (s *MeshRef) SetMeshName(v string) *MeshRef { - s.MeshName = &v - return s -} - -// An object representing the status of a service mesh. -type MeshStatus struct { - _ struct{} `type:"structure"` - - // The current mesh status. - Status *string `locationName:"status" type:"string" enum:"MeshStatusCode"` -} - -// String returns the string representation -func (s MeshStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MeshStatus) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *MeshStatus) SetStatus(v string) *MeshStatus { - s.Status = &v - return s -} - -// An object representing a virtual node listener port mapping. -type PortMapping struct { - _ struct{} `type:"structure"` - - // The port used for the port mapping. - Port *int64 `locationName:"port" min:"1" type:"integer"` - - // The protocol used for the port mapping. - Protocol *string `locationName:"protocol" type:"string" enum:"PortProtocol"` -} - -// String returns the string representation -func (s PortMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PortMapping) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PortMapping) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PortMapping"} - if s.Port != nil && *s.Port < 1 { - invalidParams.Add(request.NewErrParamMinValue("Port", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPort sets the Port field's value. -func (s *PortMapping) SetPort(v int64) *PortMapping { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *PortMapping) SetProtocol(v string) *PortMapping { - s.Protocol = &v - return s -} - -// An object representing metadata for a resource. -type ResourceMetadata struct { - _ struct{} `type:"structure"` - - // The full Amazon Resource Name (ARN) for the resource. - // - // After you create a virtual node, set this value (either the full ARN or the - // truncated resource name, for example, mesh/default/virtualNode/simpleapp, - // as the APPMESH_VIRTUAL_NODE_NAME environment variable for your task group's - // Envoy proxy container in your task definition or pod spec. This is then mapped - // to the node.id and node.cluster Envoy parameters. - // - // If you require your Envoy stats or tracing to use a different name, you can - // override the node.cluster value that is set by APPMESH_VIRTUAL_NODE_NAME - // with the APPMESH_VIRTUAL_NODE_CLUSTER environment variable. - Arn *string `locationName:"arn" type:"string"` - - // The Unix epoch timestamp in seconds for when the resource was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The Unix epoch timestamp in seconds for when the resource was last updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` - - // The unique identifier for the resource. - Uid *string `locationName:"uid" type:"string"` - - // The version of the resource. Resources are created at version 1, and this - // version is incremented each time they are updated. - Version *int64 `locationName:"version" type:"long"` -} - -// String returns the string representation -func (s ResourceMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceMetadata) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ResourceMetadata) SetArn(v string) *ResourceMetadata { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *ResourceMetadata) SetCreatedAt(v time.Time) *ResourceMetadata { - s.CreatedAt = &v - return s -} - -// SetLastUpdatedAt sets the LastUpdatedAt field's value. -func (s *ResourceMetadata) SetLastUpdatedAt(v time.Time) *ResourceMetadata { - s.LastUpdatedAt = &v - return s -} - -// SetUid sets the Uid field's value. -func (s *ResourceMetadata) SetUid(v string) *ResourceMetadata { - s.Uid = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *ResourceMetadata) SetVersion(v int64) *ResourceMetadata { - s.Version = &v - return s -} - -// An object representing a route returned by a describe operation. -type RouteData struct { - _ struct{} `type:"structure"` - - // The name of the service mesh in which the route resides. - // - // MeshName is a required field - MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` - - // The associated metadata for the route. - Metadata *ResourceMetadata `locationName:"metadata" type:"structure"` - - // The name of the route. - // - // RouteName is a required field - RouteName *string `locationName:"routeName" min:"1" type:"string" required:"true"` - - // The specifications of the route. - Spec *RouteSpec `locationName:"spec" type:"structure"` - - // The status of the route. - Status *RouteStatus `locationName:"status" type:"structure"` - - // The virtual router with which the route is associated. - // - // VirtualRouterName is a required field - VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RouteData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RouteData) GoString() string { - return s.String() -} - -// SetMeshName sets the MeshName field's value. -func (s *RouteData) SetMeshName(v string) *RouteData { - s.MeshName = &v - return s -} - -// SetMetadata sets the Metadata field's value. -func (s *RouteData) SetMetadata(v *ResourceMetadata) *RouteData { - s.Metadata = v - return s -} - -// SetRouteName sets the RouteName field's value. -func (s *RouteData) SetRouteName(v string) *RouteData { - s.RouteName = &v - return s -} - -// SetSpec sets the Spec field's value. -func (s *RouteData) SetSpec(v *RouteSpec) *RouteData { - s.Spec = v - return s -} - -// SetStatus sets the Status field's value. -func (s *RouteData) SetStatus(v *RouteStatus) *RouteData { - s.Status = v - return s -} - -// SetVirtualRouterName sets the VirtualRouterName field's value. -func (s *RouteData) SetVirtualRouterName(v string) *RouteData { - s.VirtualRouterName = &v - return s -} - -// An object representing a route returned by a list operation. -type RouteRef struct { - _ struct{} `type:"structure"` - - // The full Amazon Resource Name (ARN) for the route. - Arn *string `locationName:"arn" type:"string"` - - // The name of the service mesh in which the route resides. - MeshName *string `locationName:"meshName" min:"1" type:"string"` - - // The name of the route. - RouteName *string `locationName:"routeName" min:"1" type:"string"` - - // The virtual router with which the route is associated. - VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string"` -} - -// String returns the string representation -func (s RouteRef) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RouteRef) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *RouteRef) SetArn(v string) *RouteRef { - s.Arn = &v - return s -} - -// SetMeshName sets the MeshName field's value. -func (s *RouteRef) SetMeshName(v string) *RouteRef { - s.MeshName = &v - return s -} - -// SetRouteName sets the RouteName field's value. -func (s *RouteRef) SetRouteName(v string) *RouteRef { - s.RouteName = &v - return s -} - -// SetVirtualRouterName sets the VirtualRouterName field's value. -func (s *RouteRef) SetVirtualRouterName(v string) *RouteRef { - s.VirtualRouterName = &v - return s -} - -// An object representing the specification of a route. -type RouteSpec struct { - _ struct{} `type:"structure"` - - // The HTTP routing information for the route. - HttpRoute *HttpRoute `locationName:"httpRoute" type:"structure"` -} - -// String returns the string representation -func (s RouteSpec) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RouteSpec) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RouteSpec) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RouteSpec"} - if s.HttpRoute != nil { - if err := s.HttpRoute.Validate(); err != nil { - invalidParams.AddNested("HttpRoute", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpRoute sets the HttpRoute field's value. -func (s *RouteSpec) SetHttpRoute(v *HttpRoute) *RouteSpec { - s.HttpRoute = v - return s -} - -// An object representing the current status of a route. -type RouteStatus struct { - _ struct{} `type:"structure"` - - // The current status for the route. - Status *string `locationName:"status" type:"string" enum:"RouteStatusCode"` -} - -// String returns the string representation -func (s RouteStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RouteStatus) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *RouteStatus) SetStatus(v string) *RouteStatus { - s.Status = &v - return s -} - -// An object representing the service discovery information for a virtual node. -type ServiceDiscovery struct { - _ struct{} `type:"structure"` - - // Specifies the DNS service name for the virtual node. - Dns *DnsServiceDiscovery `locationName:"dns" type:"structure"` -} - -// String returns the string representation -func (s ServiceDiscovery) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceDiscovery) GoString() string { - return s.String() -} - -// SetDns sets the Dns field's value. -func (s *ServiceDiscovery) SetDns(v *DnsServiceDiscovery) *ServiceDiscovery { - s.Dns = v - return s -} - -type UpdateRouteInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed. - ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - - // The name of the service mesh in which the route resides. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The name of the route to update. - // - // RouteName is a required field - RouteName *string `location:"uri" locationName:"routeName" min:"1" type:"string" required:"true"` - - // The new route specification to apply. This overwrites the existing data. - // - // Spec is a required field - Spec *RouteSpec `locationName:"spec" type:"structure" required:"true"` - - // The name of the virtual router with which the route is associated. - // - // VirtualRouterName is a required field - VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRouteInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - if s.RouteName == nil { - invalidParams.Add(request.NewErrParamRequired("RouteName")) - } - if s.RouteName != nil && len(*s.RouteName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RouteName", 1)) - } - if s.Spec == nil { - invalidParams.Add(request.NewErrParamRequired("Spec")) - } - if s.VirtualRouterName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) - } - if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) - } - if s.Spec != nil { - if err := s.Spec.Validate(); err != nil { - invalidParams.AddNested("Spec", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *UpdateRouteInput) SetClientToken(v string) *UpdateRouteInput { - s.ClientToken = &v - return s -} - -// SetMeshName sets the MeshName field's value. -func (s *UpdateRouteInput) SetMeshName(v string) *UpdateRouteInput { - s.MeshName = &v - return s -} - -// SetRouteName sets the RouteName field's value. -func (s *UpdateRouteInput) SetRouteName(v string) *UpdateRouteInput { - s.RouteName = &v - return s -} - -// SetSpec sets the Spec field's value. -func (s *UpdateRouteInput) SetSpec(v *RouteSpec) *UpdateRouteInput { - s.Spec = v - return s -} - -// SetVirtualRouterName sets the VirtualRouterName field's value. -func (s *UpdateRouteInput) SetVirtualRouterName(v string) *UpdateRouteInput { - s.VirtualRouterName = &v - return s -} - -type UpdateRouteOutput struct { - _ struct{} `type:"structure" payload:"Route"` - - // A full description of the route that was updated. - Route *RouteData `locationName:"route" type:"structure"` -} - -// String returns the string representation -func (s UpdateRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRouteOutput) GoString() string { - return s.String() -} - -// SetRoute sets the Route field's value. -func (s *UpdateRouteOutput) SetRoute(v *RouteData) *UpdateRouteOutput { - s.Route = v - return s -} - -type UpdateVirtualNodeInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed. - ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - - // The name of the service mesh in which the virtual node resides. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The new virtual node specification to apply. This overwrites the existing - // data. - // - // Spec is a required field - Spec *VirtualNodeSpec `locationName:"spec" type:"structure" required:"true"` - - // The name of the virtual node to update. - // - // VirtualNodeName is a required field - VirtualNodeName *string `location:"uri" locationName:"virtualNodeName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateVirtualNodeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVirtualNodeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateVirtualNodeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateVirtualNodeInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - if s.Spec == nil { - invalidParams.Add(request.NewErrParamRequired("Spec")) - } - if s.VirtualNodeName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualNodeName")) - } - if s.VirtualNodeName != nil && len(*s.VirtualNodeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualNodeName", 1)) - } - if s.Spec != nil { - if err := s.Spec.Validate(); err != nil { - invalidParams.AddNested("Spec", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *UpdateVirtualNodeInput) SetClientToken(v string) *UpdateVirtualNodeInput { - s.ClientToken = &v - return s -} - -// SetMeshName sets the MeshName field's value. -func (s *UpdateVirtualNodeInput) SetMeshName(v string) *UpdateVirtualNodeInput { - s.MeshName = &v - return s -} - -// SetSpec sets the Spec field's value. -func (s *UpdateVirtualNodeInput) SetSpec(v *VirtualNodeSpec) *UpdateVirtualNodeInput { - s.Spec = v - return s -} - -// SetVirtualNodeName sets the VirtualNodeName field's value. -func (s *UpdateVirtualNodeInput) SetVirtualNodeName(v string) *UpdateVirtualNodeInput { - s.VirtualNodeName = &v - return s -} - -type UpdateVirtualNodeOutput struct { - _ struct{} `type:"structure" payload:"VirtualNode"` - - // A full description of the virtual node that was updated. - VirtualNode *VirtualNodeData `locationName:"virtualNode" type:"structure"` -} - -// String returns the string representation -func (s UpdateVirtualNodeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVirtualNodeOutput) GoString() string { - return s.String() -} - -// SetVirtualNode sets the VirtualNode field's value. -func (s *UpdateVirtualNodeOutput) SetVirtualNode(v *VirtualNodeData) *UpdateVirtualNodeOutput { - s.VirtualNode = v - return s -} - -type UpdateVirtualRouterInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed. - ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - - // The name of the service mesh in which the virtual router resides. - // - // MeshName is a required field - MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"` - - // The new virtual router specification to apply. This overwrites the existing - // data. - // - // Spec is a required field - Spec *VirtualRouterSpec `locationName:"spec" type:"structure" required:"true"` - - // The name of the virtual router to update. - // - // VirtualRouterName is a required field - VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateVirtualRouterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVirtualRouterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateVirtualRouterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateVirtualRouterInput"} - if s.MeshName == nil { - invalidParams.Add(request.NewErrParamRequired("MeshName")) - } - if s.MeshName != nil && len(*s.MeshName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MeshName", 1)) - } - if s.Spec == nil { - invalidParams.Add(request.NewErrParamRequired("Spec")) - } - if s.VirtualRouterName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualRouterName")) - } - if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *UpdateVirtualRouterInput) SetClientToken(v string) *UpdateVirtualRouterInput { - s.ClientToken = &v - return s -} - -// SetMeshName sets the MeshName field's value. -func (s *UpdateVirtualRouterInput) SetMeshName(v string) *UpdateVirtualRouterInput { - s.MeshName = &v - return s -} - -// SetSpec sets the Spec field's value. -func (s *UpdateVirtualRouterInput) SetSpec(v *VirtualRouterSpec) *UpdateVirtualRouterInput { - s.Spec = v - return s -} - -// SetVirtualRouterName sets the VirtualRouterName field's value. -func (s *UpdateVirtualRouterInput) SetVirtualRouterName(v string) *UpdateVirtualRouterInput { - s.VirtualRouterName = &v - return s -} - -type UpdateVirtualRouterOutput struct { - _ struct{} `type:"structure" payload:"VirtualRouter"` - - // A full description of the virtual router that was updated. - VirtualRouter *VirtualRouterData `locationName:"virtualRouter" type:"structure"` -} - -// String returns the string representation -func (s UpdateVirtualRouterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVirtualRouterOutput) GoString() string { - return s.String() -} - -// SetVirtualRouter sets the VirtualRouter field's value. -func (s *UpdateVirtualRouterOutput) SetVirtualRouter(v *VirtualRouterData) *UpdateVirtualRouterOutput { - s.VirtualRouter = v - return s -} - -// An object representing a virtual node returned by a describe operation. -type VirtualNodeData struct { - _ struct{} `type:"structure"` - - // The name of the service mesh in which the virtual node resides. - // - // MeshName is a required field - MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` - - // The associated metadata for the virtual node. - Metadata *ResourceMetadata `locationName:"metadata" type:"structure"` - - // The specifications of the virtual node. - Spec *VirtualNodeSpec `locationName:"spec" type:"structure"` - - // The current status for the virtual node. - Status *VirtualNodeStatus `locationName:"status" type:"structure"` - - // The name of the virtual node. - // - // VirtualNodeName is a required field - VirtualNodeName *string `locationName:"virtualNodeName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s VirtualNodeData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VirtualNodeData) GoString() string { - return s.String() -} - -// SetMeshName sets the MeshName field's value. -func (s *VirtualNodeData) SetMeshName(v string) *VirtualNodeData { - s.MeshName = &v - return s -} - -// SetMetadata sets the Metadata field's value. -func (s *VirtualNodeData) SetMetadata(v *ResourceMetadata) *VirtualNodeData { - s.Metadata = v - return s -} - -// SetSpec sets the Spec field's value. -func (s *VirtualNodeData) SetSpec(v *VirtualNodeSpec) *VirtualNodeData { - s.Spec = v - return s -} - -// SetStatus sets the Status field's value. -func (s *VirtualNodeData) SetStatus(v *VirtualNodeStatus) *VirtualNodeData { - s.Status = v - return s -} - -// SetVirtualNodeName sets the VirtualNodeName field's value. -func (s *VirtualNodeData) SetVirtualNodeName(v string) *VirtualNodeData { - s.VirtualNodeName = &v - return s -} - -// An object representing a virtual node returned by a list operation. -type VirtualNodeRef struct { - _ struct{} `type:"structure"` - - // The full Amazon Resource Name (ARN) for the virtual node. - Arn *string `locationName:"arn" type:"string"` - - // The name of the service mesh in which the virtual node resides. - MeshName *string `locationName:"meshName" min:"1" type:"string"` - - // The name of the virtual node. - VirtualNodeName *string `locationName:"virtualNodeName" min:"1" type:"string"` -} - -// String returns the string representation -func (s VirtualNodeRef) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VirtualNodeRef) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *VirtualNodeRef) SetArn(v string) *VirtualNodeRef { - s.Arn = &v - return s -} - -// SetMeshName sets the MeshName field's value. -func (s *VirtualNodeRef) SetMeshName(v string) *VirtualNodeRef { - s.MeshName = &v - return s -} - -// SetVirtualNodeName sets the VirtualNodeName field's value. -func (s *VirtualNodeRef) SetVirtualNodeName(v string) *VirtualNodeRef { - s.VirtualNodeName = &v - return s -} - -// An object representing the specification of a virtual node. -type VirtualNodeSpec struct { - _ struct{} `type:"structure"` - - // The backends to which the virtual node is expected to send outbound traffic. - Backends []*string `locationName:"backends" type:"list"` - - // The listeners from which the virtual node is expected to receive inbound - // traffic. - Listeners []*Listener `locationName:"listeners" type:"list"` - - // The service discovery information for the virtual node. - ServiceDiscovery *ServiceDiscovery `locationName:"serviceDiscovery" type:"structure"` -} - -// String returns the string representation -func (s VirtualNodeSpec) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VirtualNodeSpec) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VirtualNodeSpec) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VirtualNodeSpec"} - if s.Listeners != nil { - for i, v := range s.Listeners { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Listeners", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackends sets the Backends field's value. -func (s *VirtualNodeSpec) SetBackends(v []*string) *VirtualNodeSpec { - s.Backends = v - return s -} - -// SetListeners sets the Listeners field's value. -func (s *VirtualNodeSpec) SetListeners(v []*Listener) *VirtualNodeSpec { - s.Listeners = v - return s -} - -// SetServiceDiscovery sets the ServiceDiscovery field's value. -func (s *VirtualNodeSpec) SetServiceDiscovery(v *ServiceDiscovery) *VirtualNodeSpec { - s.ServiceDiscovery = v - return s -} - -// An object representing the current status of the virtual node. -type VirtualNodeStatus struct { - _ struct{} `type:"structure"` - - // The current status of the virtual node. - Status *string `locationName:"status" type:"string" enum:"VirtualNodeStatusCode"` -} - -// String returns the string representation -func (s VirtualNodeStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VirtualNodeStatus) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *VirtualNodeStatus) SetStatus(v string) *VirtualNodeStatus { - s.Status = &v - return s -} - -// An object representing a virtual router returned by a describe operation. -type VirtualRouterData struct { - _ struct{} `type:"structure"` - - // The name of the service mesh in which the virtual router resides. - // - // MeshName is a required field - MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` - - // The associated metadata for the virtual router. - Metadata *ResourceMetadata `locationName:"metadata" type:"structure"` - - // The specifications of the virtual router. - Spec *VirtualRouterSpec `locationName:"spec" type:"structure"` - - // The current status of the virtual router. - Status *VirtualRouterStatus `locationName:"status" type:"structure"` - - // The name of the virtual router. - // - // VirtualRouterName is a required field - VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s VirtualRouterData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VirtualRouterData) GoString() string { - return s.String() -} - -// SetMeshName sets the MeshName field's value. -func (s *VirtualRouterData) SetMeshName(v string) *VirtualRouterData { - s.MeshName = &v - return s -} - -// SetMetadata sets the Metadata field's value. -func (s *VirtualRouterData) SetMetadata(v *ResourceMetadata) *VirtualRouterData { - s.Metadata = v - return s -} - -// SetSpec sets the Spec field's value. -func (s *VirtualRouterData) SetSpec(v *VirtualRouterSpec) *VirtualRouterData { - s.Spec = v - return s -} - -// SetStatus sets the Status field's value. -func (s *VirtualRouterData) SetStatus(v *VirtualRouterStatus) *VirtualRouterData { - s.Status = v - return s -} - -// SetVirtualRouterName sets the VirtualRouterName field's value. -func (s *VirtualRouterData) SetVirtualRouterName(v string) *VirtualRouterData { - s.VirtualRouterName = &v - return s -} - -// An object representing a virtual router returned by a list operation. -type VirtualRouterRef struct { - _ struct{} `type:"structure"` - - // The full Amazon Resource Name (ARN) for the virtual router. - Arn *string `locationName:"arn" type:"string"` - - // The name of the service mesh in which the virtual router resides. - MeshName *string `locationName:"meshName" min:"1" type:"string"` - - // The name of the virtual router. - VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string"` -} - -// String returns the string representation -func (s VirtualRouterRef) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VirtualRouterRef) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *VirtualRouterRef) SetArn(v string) *VirtualRouterRef { - s.Arn = &v - return s -} - -// SetMeshName sets the MeshName field's value. -func (s *VirtualRouterRef) SetMeshName(v string) *VirtualRouterRef { - s.MeshName = &v - return s -} - -// SetVirtualRouterName sets the VirtualRouterName field's value. -func (s *VirtualRouterRef) SetVirtualRouterName(v string) *VirtualRouterRef { - s.VirtualRouterName = &v - return s -} - -// An object representing the specification of a virtual router. -type VirtualRouterSpec struct { - _ struct{} `type:"structure"` - - // The service mesh service names to associate with the virtual router. - ServiceNames []*string `locationName:"serviceNames" type:"list"` -} - -// String returns the string representation -func (s VirtualRouterSpec) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VirtualRouterSpec) GoString() string { - return s.String() -} - -// SetServiceNames sets the ServiceNames field's value. -func (s *VirtualRouterSpec) SetServiceNames(v []*string) *VirtualRouterSpec { - s.ServiceNames = v - return s -} - -// An object representing the status of a virtual router. -type VirtualRouterStatus struct { - _ struct{} `type:"structure"` - - // The current status of the virtual router. - Status *string `locationName:"status" type:"string" enum:"VirtualRouterStatusCode"` -} - -// String returns the string representation -func (s VirtualRouterStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VirtualRouterStatus) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *VirtualRouterStatus) SetStatus(v string) *VirtualRouterStatus { - s.Status = &v - return s -} - -// An object representing a target and its relative weight. Traffic is distributed -// across targets according to their relative weight. For example, a weighted -// target with a relative weight of 50 receives five times as much traffic as -// one with a relative weight of 10. -type WeightedTarget struct { - _ struct{} `type:"structure"` - - // The virtual node to associate with the weighted target. - VirtualNode *string `locationName:"virtualNode" min:"1" type:"string"` - - // The relative weight of the weighted target. - Weight *int64 `locationName:"weight" type:"integer"` -} - -// String returns the string representation -func (s WeightedTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WeightedTarget) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WeightedTarget) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WeightedTarget"} - if s.VirtualNode != nil && len(*s.VirtualNode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualNode", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVirtualNode sets the VirtualNode field's value. -func (s *WeightedTarget) SetVirtualNode(v string) *WeightedTarget { - s.VirtualNode = &v - return s -} - -// SetWeight sets the Weight field's value. -func (s *WeightedTarget) SetWeight(v int64) *WeightedTarget { - s.Weight = &v - return s -} - -const ( - // MeshStatusCodeActive is a MeshStatusCode enum value - MeshStatusCodeActive = "ACTIVE" - - // MeshStatusCodeDeleted is a MeshStatusCode enum value - MeshStatusCodeDeleted = "DELETED" - - // MeshStatusCodeInactive is a MeshStatusCode enum value - MeshStatusCodeInactive = "INACTIVE" -) - -const ( - // PortProtocolHttp is a PortProtocol enum value - PortProtocolHttp = "http" - - // PortProtocolTcp is a PortProtocol enum value - PortProtocolTcp = "tcp" -) - -const ( - // RouteStatusCodeActive is a RouteStatusCode enum value - RouteStatusCodeActive = "ACTIVE" - - // RouteStatusCodeDeleted is a RouteStatusCode enum value - RouteStatusCodeDeleted = "DELETED" - - // RouteStatusCodeInactive is a RouteStatusCode enum value - RouteStatusCodeInactive = "INACTIVE" -) - -const ( - // VirtualNodeStatusCodeActive is a VirtualNodeStatusCode enum value - VirtualNodeStatusCodeActive = "ACTIVE" - - // VirtualNodeStatusCodeDeleted is a VirtualNodeStatusCode enum value - VirtualNodeStatusCodeDeleted = "DELETED" - - // VirtualNodeStatusCodeInactive is a VirtualNodeStatusCode enum value - VirtualNodeStatusCodeInactive = "INACTIVE" -) - -const ( - // VirtualRouterStatusCodeActive is a VirtualRouterStatusCode enum value - VirtualRouterStatusCodeActive = "ACTIVE" - - // VirtualRouterStatusCodeDeleted is a VirtualRouterStatusCode enum value - VirtualRouterStatusCodeDeleted = "DELETED" - - // VirtualRouterStatusCodeInactive is a VirtualRouterStatusCode enum value - VirtualRouterStatusCodeInactive = "INACTIVE" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go b/vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go deleted file mode 100644 index c8217e7b2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package appmesh provides the client and types for making API -// requests to AWS App Mesh. -// -// AWS App Mesh is a service mesh based on the Envoy proxy that makes it easy -// to monitor and control containerized microservices. App Mesh standardizes -// how your microservices communicate, giving you end-to-end visibility and -// helping to ensure high-availability for your applications. -// -// App Mesh gives you consistent visibility and network traffic controls for -// every microservice in an application. You can use App Mesh with Amazon ECS -// (using the Amazon EC2 launch type), Amazon EKS, and Kubernetes on AWS. -// -// App Mesh supports containerized microservice applications that use service -// discovery naming for their components. To use App Mesh, you must have a containerized -// application running on Amazon EC2 instances, hosted in either Amazon ECS, -// Amazon EKS, or Kubernetes on AWS. For more information about service discovery -// on Amazon ECS, see Service Discovery (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html) -// in the Amazon Elastic Container Service Developer Guide. Kubernetes kube-dns -// is supported. For more information, see DNS for Services and Pods (https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/) -// in the Kubernetes documentation. -// -// See https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01 for more information on this service. -// -// See appmesh package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/appmesh/ -// -// Using the Client -// -// To contact AWS App Mesh 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 App Mesh client AppMesh for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/appmesh/#New -package appmesh diff --git a/vendor/github.com/aws/aws-sdk-go/service/appmesh/errors.go b/vendor/github.com/aws/aws-sdk-go/service/appmesh/errors.go deleted file mode 100644 index 69ea820d8..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/appmesh/errors.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package appmesh - -const ( - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - // - // The request syntax was malformed. Check your request syntax and try again. - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeConflictException for service response error code - // "ConflictException". - // - // The request contains a client token that was used for a previous update resource - // call with different specifications. Try the request again with a new client - // token. - ErrCodeConflictException = "ConflictException" - - // ErrCodeForbiddenException for service response error code - // "ForbiddenException". - // - // You do not have permissions to perform this action. - ErrCodeForbiddenException = "ForbiddenException" - - // ErrCodeInternalServerErrorException for service response error code - // "InternalServerErrorException". - // - // The request processing has failed because of an unknown error, exception, - // or failure. - ErrCodeInternalServerErrorException = "InternalServerErrorException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // You have exceeded a service limit for your account. For more information, - // see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) - // in the AWS App Mesh User Guide. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // The specified resource does not exist. Check your request syntax and try - // again. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUseException". - // - // You cannot delete the specified resource because it is in use or required - // by another resource. - ErrCodeResourceInUseException = "ResourceInUseException" - - // ErrCodeServiceUnavailableException for service response error code - // "ServiceUnavailableException". - // - // The request has failed due to a temporary failure of the service. - ErrCodeServiceUnavailableException = "ServiceUnavailableException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // The maximum request rate permitted by the App Mesh APIs has been exceeded - // for your account. For best results, use an increasing or variable sleep interval - // between requests. - ErrCodeTooManyRequestsException = "TooManyRequestsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/appmesh/service.go b/vendor/github.com/aws/aws-sdk-go/service/appmesh/service.go deleted file mode 100644 index 92ff26566..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/appmesh/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package appmesh - -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" -) - -// AppMesh provides the API operation methods for making requests to -// AWS App Mesh. See this package's package overview docs -// for details on the service. -// -// AppMesh methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type AppMesh 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 = "App Mesh" // Name of service. - EndpointsID = "appmesh" // ID to lookup a service endpoint with. - ServiceID = "App Mesh" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the AppMesh 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 AppMesh client from just a session. -// svc := appmesh.New(mySession) -// -// // Create a AppMesh client with additional configuration -// svc := appmesh.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *AppMesh { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "appmesh" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *AppMesh { - svc := &AppMesh{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-10-01", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a AppMesh operation and runs any -// custom request initialization. -func (c *AppMesh) 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/appsync/api.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go deleted file mode 100644 index 92f9197e2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go +++ /dev/null @@ -1,7698 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package appsync - -import ( - "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 opCreateApiKey = "CreateApiKey" - -// CreateApiKeyRequest generates a "aws/request.Request" representing the -// client's request for the CreateApiKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateApiKey for more information on using the CreateApiKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateApiKeyRequest method. -// req, resp := client.CreateApiKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateApiKey -func (c *AppSync) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request.Request, output *CreateApiKeyOutput) { - op := &request.Operation{ - Name: opCreateApiKey, - HTTPMethod: "POST", - HTTPPath: "/v1/apis/{apiId}/apikeys", - } - - if input == nil { - input = &CreateApiKeyInput{} - } - - output = &CreateApiKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateApiKey API operation for AWS AppSync. -// -// Creates a unique key that you can distribute to clients who are executing -// your API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation CreateApiKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// * ErrCodeApiKeyLimitExceededException "ApiKeyLimitExceededException" -// The API key exceeded a limit. Try your request again. -// -// * ErrCodeApiKeyValidityOutOfBoundsException "ApiKeyValidityOutOfBoundsException" -// The API key expiration must be set to a value between 1 and 365 days from -// creation (for CreateApiKey) or from update (for UpdateApiKey). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateApiKey -func (c *AppSync) CreateApiKey(input *CreateApiKeyInput) (*CreateApiKeyOutput, error) { - req, out := c.CreateApiKeyRequest(input) - return out, req.Send() -} - -// CreateApiKeyWithContext is the same as CreateApiKey with the addition of -// the ability to pass a context and additional request options. -// -// See CreateApiKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) CreateApiKeyWithContext(ctx aws.Context, input *CreateApiKeyInput, opts ...request.Option) (*CreateApiKeyOutput, error) { - req, out := c.CreateApiKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDataSource = "CreateDataSource" - -// CreateDataSourceRequest generates a "aws/request.Request" representing the -// client's request for the CreateDataSource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDataSource for more information on using the CreateDataSource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDataSourceRequest method. -// req, resp := client.CreateDataSourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateDataSource -func (c *AppSync) CreateDataSourceRequest(input *CreateDataSourceInput) (req *request.Request, output *CreateDataSourceOutput) { - op := &request.Operation{ - Name: opCreateDataSource, - HTTPMethod: "POST", - HTTPPath: "/v1/apis/{apiId}/datasources", - } - - if input == nil { - input = &CreateDataSourceInput{} - } - - output = &CreateDataSourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDataSource API operation for AWS AppSync. -// -// Creates a DataSource object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation CreateDataSource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateDataSource -func (c *AppSync) CreateDataSource(input *CreateDataSourceInput) (*CreateDataSourceOutput, error) { - req, out := c.CreateDataSourceRequest(input) - return out, req.Send() -} - -// CreateDataSourceWithContext is the same as CreateDataSource with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDataSource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) CreateDataSourceWithContext(ctx aws.Context, input *CreateDataSourceInput, opts ...request.Option) (*CreateDataSourceOutput, error) { - req, out := c.CreateDataSourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFunction = "CreateFunction" - -// CreateFunctionRequest generates a "aws/request.Request" representing the -// client's request for the CreateFunction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFunction for more information on using the CreateFunction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateFunctionRequest method. -// req, resp := client.CreateFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateFunction -func (c *AppSync) CreateFunctionRequest(input *CreateFunctionInput) (req *request.Request, output *CreateFunctionOutput) { - op := &request.Operation{ - Name: opCreateFunction, - HTTPMethod: "POST", - HTTPPath: "/v1/apis/{apiId}/functions", - } - - if input == nil { - input = &CreateFunctionInput{} - } - - output = &CreateFunctionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFunction API operation for AWS AppSync. -// -// Creates a Function object. -// -// A function is a reusable entity. Multiple functions can be used to compose -// the resolver logic. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation CreateFunction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateFunction -func (c *AppSync) CreateFunction(input *CreateFunctionInput) (*CreateFunctionOutput, error) { - req, out := c.CreateFunctionRequest(input) - return out, req.Send() -} - -// CreateFunctionWithContext is the same as CreateFunction with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFunction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) CreateFunctionWithContext(ctx aws.Context, input *CreateFunctionInput, opts ...request.Option) (*CreateFunctionOutput, error) { - req, out := c.CreateFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateGraphqlApi = "CreateGraphqlApi" - -// CreateGraphqlApiRequest generates a "aws/request.Request" representing the -// client's request for the CreateGraphqlApi operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateGraphqlApi for more information on using the CreateGraphqlApi -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateGraphqlApiRequest method. -// req, resp := client.CreateGraphqlApiRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateGraphqlApi -func (c *AppSync) CreateGraphqlApiRequest(input *CreateGraphqlApiInput) (req *request.Request, output *CreateGraphqlApiOutput) { - op := &request.Operation{ - Name: opCreateGraphqlApi, - HTTPMethod: "POST", - HTTPPath: "/v1/apis", - } - - if input == nil { - input = &CreateGraphqlApiInput{} - } - - output = &CreateGraphqlApiOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateGraphqlApi API operation for AWS AppSync. -// -// Creates a GraphqlApi object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation CreateGraphqlApi for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// * ErrCodeApiLimitExceededException "ApiLimitExceededException" -// The GraphQL API exceeded a limit. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateGraphqlApi -func (c *AppSync) CreateGraphqlApi(input *CreateGraphqlApiInput) (*CreateGraphqlApiOutput, error) { - req, out := c.CreateGraphqlApiRequest(input) - return out, req.Send() -} - -// CreateGraphqlApiWithContext is the same as CreateGraphqlApi with the addition of -// the ability to pass a context and additional request options. -// -// See CreateGraphqlApi for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) CreateGraphqlApiWithContext(ctx aws.Context, input *CreateGraphqlApiInput, opts ...request.Option) (*CreateGraphqlApiOutput, error) { - req, out := c.CreateGraphqlApiRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateResolver = "CreateResolver" - -// CreateResolverRequest generates a "aws/request.Request" representing the -// client's request for the CreateResolver operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateResolver for more information on using the CreateResolver -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateResolverRequest method. -// req, resp := client.CreateResolverRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateResolver -func (c *AppSync) CreateResolverRequest(input *CreateResolverInput) (req *request.Request, output *CreateResolverOutput) { - op := &request.Operation{ - Name: opCreateResolver, - HTTPMethod: "POST", - HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers", - } - - if input == nil { - input = &CreateResolverInput{} - } - - output = &CreateResolverOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateResolver API operation for AWS AppSync. -// -// Creates a Resolver object. -// -// A resolver converts incoming requests into a format that a data source can -// understand and converts the data source's responses into GraphQL. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation CreateResolver for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateResolver -func (c *AppSync) CreateResolver(input *CreateResolverInput) (*CreateResolverOutput, error) { - req, out := c.CreateResolverRequest(input) - return out, req.Send() -} - -// CreateResolverWithContext is the same as CreateResolver with the addition of -// the ability to pass a context and additional request options. -// -// See CreateResolver for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) CreateResolverWithContext(ctx aws.Context, input *CreateResolverInput, opts ...request.Option) (*CreateResolverOutput, error) { - req, out := c.CreateResolverRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateType = "CreateType" - -// CreateTypeRequest generates a "aws/request.Request" representing the -// client's request for the CreateType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateType for more information on using the CreateType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTypeRequest method. -// req, resp := client.CreateTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateType -func (c *AppSync) CreateTypeRequest(input *CreateTypeInput) (req *request.Request, output *CreateTypeOutput) { - op := &request.Operation{ - Name: opCreateType, - HTTPMethod: "POST", - HTTPPath: "/v1/apis/{apiId}/types", - } - - if input == nil { - input = &CreateTypeInput{} - } - - output = &CreateTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateType API operation for AWS AppSync. -// -// Creates a Type object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation CreateType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateType -func (c *AppSync) CreateType(input *CreateTypeInput) (*CreateTypeOutput, error) { - req, out := c.CreateTypeRequest(input) - return out, req.Send() -} - -// CreateTypeWithContext is the same as CreateType with the addition of -// the ability to pass a context and additional request options. -// -// See CreateType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) CreateTypeWithContext(ctx aws.Context, input *CreateTypeInput, opts ...request.Option) (*CreateTypeOutput, error) { - req, out := c.CreateTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApiKey = "DeleteApiKey" - -// DeleteApiKeyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApiKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApiKey for more information on using the DeleteApiKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApiKeyRequest method. -// req, resp := client.DeleteApiKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteApiKey -func (c *AppSync) DeleteApiKeyRequest(input *DeleteApiKeyInput) (req *request.Request, output *DeleteApiKeyOutput) { - op := &request.Operation{ - Name: opDeleteApiKey, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apis/{apiId}/apikeys/{id}", - } - - if input == nil { - input = &DeleteApiKeyInput{} - } - - output = &DeleteApiKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteApiKey API operation for AWS AppSync. -// -// Deletes an API key. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation DeleteApiKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteApiKey -func (c *AppSync) DeleteApiKey(input *DeleteApiKeyInput) (*DeleteApiKeyOutput, error) { - req, out := c.DeleteApiKeyRequest(input) - return out, req.Send() -} - -// DeleteApiKeyWithContext is the same as DeleteApiKey with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApiKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) DeleteApiKeyWithContext(ctx aws.Context, input *DeleteApiKeyInput, opts ...request.Option) (*DeleteApiKeyOutput, error) { - req, out := c.DeleteApiKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDataSource = "DeleteDataSource" - -// DeleteDataSourceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDataSource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDataSource for more information on using the DeleteDataSource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDataSourceRequest method. -// req, resp := client.DeleteDataSourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteDataSource -func (c *AppSync) DeleteDataSourceRequest(input *DeleteDataSourceInput) (req *request.Request, output *DeleteDataSourceOutput) { - op := &request.Operation{ - Name: opDeleteDataSource, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apis/{apiId}/datasources/{name}", - } - - if input == nil { - input = &DeleteDataSourceInput{} - } - - output = &DeleteDataSourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDataSource API operation for AWS AppSync. -// -// Deletes a DataSource object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation DeleteDataSource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteDataSource -func (c *AppSync) DeleteDataSource(input *DeleteDataSourceInput) (*DeleteDataSourceOutput, error) { - req, out := c.DeleteDataSourceRequest(input) - return out, req.Send() -} - -// DeleteDataSourceWithContext is the same as DeleteDataSource with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDataSource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) DeleteDataSourceWithContext(ctx aws.Context, input *DeleteDataSourceInput, opts ...request.Option) (*DeleteDataSourceOutput, error) { - req, out := c.DeleteDataSourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFunction = "DeleteFunction" - -// DeleteFunctionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFunction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFunction for more information on using the DeleteFunction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFunctionRequest method. -// req, resp := client.DeleteFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteFunction -func (c *AppSync) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request.Request, output *DeleteFunctionOutput) { - op := &request.Operation{ - Name: opDeleteFunction, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apis/{apiId}/functions/{functionId}", - } - - if input == nil { - input = &DeleteFunctionInput{} - } - - output = &DeleteFunctionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteFunction API operation for AWS AppSync. -// -// Deletes a Function. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation DeleteFunction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteFunction -func (c *AppSync) DeleteFunction(input *DeleteFunctionInput) (*DeleteFunctionOutput, error) { - req, out := c.DeleteFunctionRequest(input) - return out, req.Send() -} - -// DeleteFunctionWithContext is the same as DeleteFunction with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFunction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) DeleteFunctionWithContext(ctx aws.Context, input *DeleteFunctionInput, opts ...request.Option) (*DeleteFunctionOutput, error) { - req, out := c.DeleteFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteGraphqlApi = "DeleteGraphqlApi" - -// DeleteGraphqlApiRequest generates a "aws/request.Request" representing the -// client's request for the DeleteGraphqlApi operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteGraphqlApi for more information on using the DeleteGraphqlApi -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteGraphqlApiRequest method. -// req, resp := client.DeleteGraphqlApiRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteGraphqlApi -func (c *AppSync) DeleteGraphqlApiRequest(input *DeleteGraphqlApiInput) (req *request.Request, output *DeleteGraphqlApiOutput) { - op := &request.Operation{ - Name: opDeleteGraphqlApi, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apis/{apiId}", - } - - if input == nil { - input = &DeleteGraphqlApiInput{} - } - - output = &DeleteGraphqlApiOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteGraphqlApi API operation for AWS AppSync. -// -// Deletes a GraphqlApi object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation DeleteGraphqlApi for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteGraphqlApi -func (c *AppSync) DeleteGraphqlApi(input *DeleteGraphqlApiInput) (*DeleteGraphqlApiOutput, error) { - req, out := c.DeleteGraphqlApiRequest(input) - return out, req.Send() -} - -// DeleteGraphqlApiWithContext is the same as DeleteGraphqlApi with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteGraphqlApi for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) DeleteGraphqlApiWithContext(ctx aws.Context, input *DeleteGraphqlApiInput, opts ...request.Option) (*DeleteGraphqlApiOutput, error) { - req, out := c.DeleteGraphqlApiRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteResolver = "DeleteResolver" - -// DeleteResolverRequest generates a "aws/request.Request" representing the -// client's request for the DeleteResolver operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteResolver for more information on using the DeleteResolver -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteResolverRequest method. -// req, resp := client.DeleteResolverRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteResolver -func (c *AppSync) DeleteResolverRequest(input *DeleteResolverInput) (req *request.Request, output *DeleteResolverOutput) { - op := &request.Operation{ - Name: opDeleteResolver, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers/{fieldName}", - } - - if input == nil { - input = &DeleteResolverInput{} - } - - output = &DeleteResolverOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteResolver API operation for AWS AppSync. -// -// Deletes a Resolver object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation DeleteResolver for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteResolver -func (c *AppSync) DeleteResolver(input *DeleteResolverInput) (*DeleteResolverOutput, error) { - req, out := c.DeleteResolverRequest(input) - return out, req.Send() -} - -// DeleteResolverWithContext is the same as DeleteResolver with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteResolver for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) DeleteResolverWithContext(ctx aws.Context, input *DeleteResolverInput, opts ...request.Option) (*DeleteResolverOutput, error) { - req, out := c.DeleteResolverRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteType = "DeleteType" - -// DeleteTypeRequest generates a "aws/request.Request" representing the -// client's request for the DeleteType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteType for more information on using the DeleteType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTypeRequest method. -// req, resp := client.DeleteTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteType -func (c *AppSync) DeleteTypeRequest(input *DeleteTypeInput) (req *request.Request, output *DeleteTypeOutput) { - op := &request.Operation{ - Name: opDeleteType, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apis/{apiId}/types/{typeName}", - } - - if input == nil { - input = &DeleteTypeInput{} - } - - output = &DeleteTypeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteType API operation for AWS AppSync. -// -// Deletes a Type object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation DeleteType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteType -func (c *AppSync) DeleteType(input *DeleteTypeInput) (*DeleteTypeOutput, error) { - req, out := c.DeleteTypeRequest(input) - return out, req.Send() -} - -// DeleteTypeWithContext is the same as DeleteType with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) DeleteTypeWithContext(ctx aws.Context, input *DeleteTypeInput, opts ...request.Option) (*DeleteTypeOutput, error) { - req, out := c.DeleteTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDataSource = "GetDataSource" - -// GetDataSourceRequest generates a "aws/request.Request" representing the -// client's request for the GetDataSource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDataSource for more information on using the GetDataSource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDataSourceRequest method. -// req, resp := client.GetDataSourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetDataSource -func (c *AppSync) GetDataSourceRequest(input *GetDataSourceInput) (req *request.Request, output *GetDataSourceOutput) { - op := &request.Operation{ - Name: opGetDataSource, - HTTPMethod: "GET", - HTTPPath: "/v1/apis/{apiId}/datasources/{name}", - } - - if input == nil { - input = &GetDataSourceInput{} - } - - output = &GetDataSourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDataSource API operation for AWS AppSync. -// -// Retrieves a DataSource object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation GetDataSource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetDataSource -func (c *AppSync) GetDataSource(input *GetDataSourceInput) (*GetDataSourceOutput, error) { - req, out := c.GetDataSourceRequest(input) - return out, req.Send() -} - -// GetDataSourceWithContext is the same as GetDataSource with the addition of -// the ability to pass a context and additional request options. -// -// See GetDataSource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) GetDataSourceWithContext(ctx aws.Context, input *GetDataSourceInput, opts ...request.Option) (*GetDataSourceOutput, error) { - req, out := c.GetDataSourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFunction = "GetFunction" - -// GetFunctionRequest generates a "aws/request.Request" representing the -// client's request for the GetFunction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetFunction for more information on using the GetFunction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetFunctionRequest method. -// req, resp := client.GetFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetFunction -func (c *AppSync) GetFunctionRequest(input *GetFunctionInput) (req *request.Request, output *GetFunctionOutput) { - op := &request.Operation{ - Name: opGetFunction, - HTTPMethod: "GET", - HTTPPath: "/v1/apis/{apiId}/functions/{functionId}", - } - - if input == nil { - input = &GetFunctionInput{} - } - - output = &GetFunctionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFunction API operation for AWS AppSync. -// -// Get a Function. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation GetFunction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetFunction -func (c *AppSync) GetFunction(input *GetFunctionInput) (*GetFunctionOutput, error) { - req, out := c.GetFunctionRequest(input) - return out, req.Send() -} - -// GetFunctionWithContext is the same as GetFunction with the addition of -// the ability to pass a context and additional request options. -// -// See GetFunction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) GetFunctionWithContext(ctx aws.Context, input *GetFunctionInput, opts ...request.Option) (*GetFunctionOutput, error) { - req, out := c.GetFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetGraphqlApi = "GetGraphqlApi" - -// GetGraphqlApiRequest generates a "aws/request.Request" representing the -// client's request for the GetGraphqlApi operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetGraphqlApi for more information on using the GetGraphqlApi -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetGraphqlApiRequest method. -// req, resp := client.GetGraphqlApiRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetGraphqlApi -func (c *AppSync) GetGraphqlApiRequest(input *GetGraphqlApiInput) (req *request.Request, output *GetGraphqlApiOutput) { - op := &request.Operation{ - Name: opGetGraphqlApi, - HTTPMethod: "GET", - HTTPPath: "/v1/apis/{apiId}", - } - - if input == nil { - input = &GetGraphqlApiInput{} - } - - output = &GetGraphqlApiOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGraphqlApi API operation for AWS AppSync. -// -// Retrieves a GraphqlApi object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation GetGraphqlApi for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetGraphqlApi -func (c *AppSync) GetGraphqlApi(input *GetGraphqlApiInput) (*GetGraphqlApiOutput, error) { - req, out := c.GetGraphqlApiRequest(input) - return out, req.Send() -} - -// GetGraphqlApiWithContext is the same as GetGraphqlApi with the addition of -// the ability to pass a context and additional request options. -// -// See GetGraphqlApi for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) GetGraphqlApiWithContext(ctx aws.Context, input *GetGraphqlApiInput, opts ...request.Option) (*GetGraphqlApiOutput, error) { - req, out := c.GetGraphqlApiRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIntrospectionSchema = "GetIntrospectionSchema" - -// GetIntrospectionSchemaRequest generates a "aws/request.Request" representing the -// client's request for the GetIntrospectionSchema operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIntrospectionSchema for more information on using the GetIntrospectionSchema -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIntrospectionSchemaRequest method. -// req, resp := client.GetIntrospectionSchemaRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetIntrospectionSchema -func (c *AppSync) GetIntrospectionSchemaRequest(input *GetIntrospectionSchemaInput) (req *request.Request, output *GetIntrospectionSchemaOutput) { - op := &request.Operation{ - Name: opGetIntrospectionSchema, - HTTPMethod: "GET", - HTTPPath: "/v1/apis/{apiId}/schema", - } - - if input == nil { - input = &GetIntrospectionSchemaInput{} - } - - output = &GetIntrospectionSchemaOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIntrospectionSchema API operation for AWS AppSync. -// -// Retrieves the introspection schema for a GraphQL API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation GetIntrospectionSchema for usage and error information. -// -// Returned Error Codes: -// * ErrCodeGraphQLSchemaException "GraphQLSchemaException" -// The GraphQL schema is not valid. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetIntrospectionSchema -func (c *AppSync) GetIntrospectionSchema(input *GetIntrospectionSchemaInput) (*GetIntrospectionSchemaOutput, error) { - req, out := c.GetIntrospectionSchemaRequest(input) - return out, req.Send() -} - -// GetIntrospectionSchemaWithContext is the same as GetIntrospectionSchema with the addition of -// the ability to pass a context and additional request options. -// -// See GetIntrospectionSchema for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) GetIntrospectionSchemaWithContext(ctx aws.Context, input *GetIntrospectionSchemaInput, opts ...request.Option) (*GetIntrospectionSchemaOutput, error) { - req, out := c.GetIntrospectionSchemaRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetResolver = "GetResolver" - -// GetResolverRequest generates a "aws/request.Request" representing the -// client's request for the GetResolver operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResolver for more information on using the GetResolver -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetResolverRequest method. -// req, resp := client.GetResolverRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetResolver -func (c *AppSync) GetResolverRequest(input *GetResolverInput) (req *request.Request, output *GetResolverOutput) { - op := &request.Operation{ - Name: opGetResolver, - HTTPMethod: "GET", - HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers/{fieldName}", - } - - if input == nil { - input = &GetResolverInput{} - } - - output = &GetResolverOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResolver API operation for AWS AppSync. -// -// Retrieves a Resolver object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation GetResolver for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetResolver -func (c *AppSync) GetResolver(input *GetResolverInput) (*GetResolverOutput, error) { - req, out := c.GetResolverRequest(input) - return out, req.Send() -} - -// GetResolverWithContext is the same as GetResolver with the addition of -// the ability to pass a context and additional request options. -// -// See GetResolver for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) GetResolverWithContext(ctx aws.Context, input *GetResolverInput, opts ...request.Option) (*GetResolverOutput, error) { - req, out := c.GetResolverRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSchemaCreationStatus = "GetSchemaCreationStatus" - -// GetSchemaCreationStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetSchemaCreationStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSchemaCreationStatus for more information on using the GetSchemaCreationStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSchemaCreationStatusRequest method. -// req, resp := client.GetSchemaCreationStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetSchemaCreationStatus -func (c *AppSync) GetSchemaCreationStatusRequest(input *GetSchemaCreationStatusInput) (req *request.Request, output *GetSchemaCreationStatusOutput) { - op := &request.Operation{ - Name: opGetSchemaCreationStatus, - HTTPMethod: "GET", - HTTPPath: "/v1/apis/{apiId}/schemacreation", - } - - if input == nil { - input = &GetSchemaCreationStatusInput{} - } - - output = &GetSchemaCreationStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSchemaCreationStatus API operation for AWS AppSync. -// -// Retrieves the current status of a schema creation operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation GetSchemaCreationStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetSchemaCreationStatus -func (c *AppSync) GetSchemaCreationStatus(input *GetSchemaCreationStatusInput) (*GetSchemaCreationStatusOutput, error) { - req, out := c.GetSchemaCreationStatusRequest(input) - return out, req.Send() -} - -// GetSchemaCreationStatusWithContext is the same as GetSchemaCreationStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetSchemaCreationStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) GetSchemaCreationStatusWithContext(ctx aws.Context, input *GetSchemaCreationStatusInput, opts ...request.Option) (*GetSchemaCreationStatusOutput, error) { - req, out := c.GetSchemaCreationStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetType = "GetType" - -// GetTypeRequest generates a "aws/request.Request" representing the -// client's request for the GetType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetType for more information on using the GetType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTypeRequest method. -// req, resp := client.GetTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetType -func (c *AppSync) GetTypeRequest(input *GetTypeInput) (req *request.Request, output *GetTypeOutput) { - op := &request.Operation{ - Name: opGetType, - HTTPMethod: "GET", - HTTPPath: "/v1/apis/{apiId}/types/{typeName}", - } - - if input == nil { - input = &GetTypeInput{} - } - - output = &GetTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetType API operation for AWS AppSync. -// -// Retrieves a Type object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation GetType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetType -func (c *AppSync) GetType(input *GetTypeInput) (*GetTypeOutput, error) { - req, out := c.GetTypeRequest(input) - return out, req.Send() -} - -// GetTypeWithContext is the same as GetType with the addition of -// the ability to pass a context and additional request options. -// -// See GetType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) GetTypeWithContext(ctx aws.Context, input *GetTypeInput, opts ...request.Option) (*GetTypeOutput, error) { - req, out := c.GetTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListApiKeys = "ListApiKeys" - -// ListApiKeysRequest generates a "aws/request.Request" representing the -// client's request for the ListApiKeys operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListApiKeys for more information on using the ListApiKeys -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListApiKeysRequest method. -// req, resp := client.ListApiKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListApiKeys -func (c *AppSync) ListApiKeysRequest(input *ListApiKeysInput) (req *request.Request, output *ListApiKeysOutput) { - op := &request.Operation{ - Name: opListApiKeys, - HTTPMethod: "GET", - HTTPPath: "/v1/apis/{apiId}/apikeys", - } - - if input == nil { - input = &ListApiKeysInput{} - } - - output = &ListApiKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListApiKeys API operation for AWS AppSync. -// -// Lists the API keys for a given API. -// -// API keys are deleted automatically sometime after they expire. However, they -// may still be included in the response until they have actually been deleted. -// You can safely call DeleteApiKey to manually delete a key before it's automatically -// deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation ListApiKeys for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListApiKeys -func (c *AppSync) ListApiKeys(input *ListApiKeysInput) (*ListApiKeysOutput, error) { - req, out := c.ListApiKeysRequest(input) - return out, req.Send() -} - -// ListApiKeysWithContext is the same as ListApiKeys with the addition of -// the ability to pass a context and additional request options. -// -// See ListApiKeys for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) ListApiKeysWithContext(ctx aws.Context, input *ListApiKeysInput, opts ...request.Option) (*ListApiKeysOutput, error) { - req, out := c.ListApiKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDataSources = "ListDataSources" - -// ListDataSourcesRequest generates a "aws/request.Request" representing the -// client's request for the ListDataSources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDataSources for more information on using the ListDataSources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDataSourcesRequest method. -// req, resp := client.ListDataSourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListDataSources -func (c *AppSync) ListDataSourcesRequest(input *ListDataSourcesInput) (req *request.Request, output *ListDataSourcesOutput) { - op := &request.Operation{ - Name: opListDataSources, - HTTPMethod: "GET", - HTTPPath: "/v1/apis/{apiId}/datasources", - } - - if input == nil { - input = &ListDataSourcesInput{} - } - - output = &ListDataSourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDataSources API operation for AWS AppSync. -// -// Lists the data sources for a given API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation ListDataSources for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListDataSources -func (c *AppSync) ListDataSources(input *ListDataSourcesInput) (*ListDataSourcesOutput, error) { - req, out := c.ListDataSourcesRequest(input) - return out, req.Send() -} - -// ListDataSourcesWithContext is the same as ListDataSources with the addition of -// the ability to pass a context and additional request options. -// -// See ListDataSources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) ListDataSourcesWithContext(ctx aws.Context, input *ListDataSourcesInput, opts ...request.Option) (*ListDataSourcesOutput, error) { - req, out := c.ListDataSourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListFunctions = "ListFunctions" - -// ListFunctionsRequest generates a "aws/request.Request" representing the -// client's request for the ListFunctions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListFunctions for more information on using the ListFunctions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListFunctionsRequest method. -// req, resp := client.ListFunctionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListFunctions -func (c *AppSync) ListFunctionsRequest(input *ListFunctionsInput) (req *request.Request, output *ListFunctionsOutput) { - op := &request.Operation{ - Name: opListFunctions, - HTTPMethod: "GET", - HTTPPath: "/v1/apis/{apiId}/functions", - } - - if input == nil { - input = &ListFunctionsInput{} - } - - output = &ListFunctionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListFunctions API operation for AWS AppSync. -// -// List multiple functions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation ListFunctions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListFunctions -func (c *AppSync) ListFunctions(input *ListFunctionsInput) (*ListFunctionsOutput, error) { - req, out := c.ListFunctionsRequest(input) - return out, req.Send() -} - -// ListFunctionsWithContext is the same as ListFunctions with the addition of -// the ability to pass a context and additional request options. -// -// See ListFunctions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) ListFunctionsWithContext(ctx aws.Context, input *ListFunctionsInput, opts ...request.Option) (*ListFunctionsOutput, error) { - req, out := c.ListFunctionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListGraphqlApis = "ListGraphqlApis" - -// ListGraphqlApisRequest generates a "aws/request.Request" representing the -// client's request for the ListGraphqlApis operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListGraphqlApis for more information on using the ListGraphqlApis -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListGraphqlApisRequest method. -// req, resp := client.ListGraphqlApisRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListGraphqlApis -func (c *AppSync) ListGraphqlApisRequest(input *ListGraphqlApisInput) (req *request.Request, output *ListGraphqlApisOutput) { - op := &request.Operation{ - Name: opListGraphqlApis, - HTTPMethod: "GET", - HTTPPath: "/v1/apis", - } - - if input == nil { - input = &ListGraphqlApisInput{} - } - - output = &ListGraphqlApisOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGraphqlApis API operation for AWS AppSync. -// -// Lists your GraphQL APIs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation ListGraphqlApis for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListGraphqlApis -func (c *AppSync) ListGraphqlApis(input *ListGraphqlApisInput) (*ListGraphqlApisOutput, error) { - req, out := c.ListGraphqlApisRequest(input) - return out, req.Send() -} - -// ListGraphqlApisWithContext is the same as ListGraphqlApis with the addition of -// the ability to pass a context and additional request options. -// -// See ListGraphqlApis for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) ListGraphqlApisWithContext(ctx aws.Context, input *ListGraphqlApisInput, opts ...request.Option) (*ListGraphqlApisOutput, error) { - req, out := c.ListGraphqlApisRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListResolvers = "ListResolvers" - -// ListResolversRequest generates a "aws/request.Request" representing the -// client's request for the ListResolvers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResolvers for more information on using the ListResolvers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResolversRequest method. -// req, resp := client.ListResolversRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListResolvers -func (c *AppSync) ListResolversRequest(input *ListResolversInput) (req *request.Request, output *ListResolversOutput) { - op := &request.Operation{ - Name: opListResolvers, - HTTPMethod: "GET", - HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers", - } - - if input == nil { - input = &ListResolversInput{} - } - - output = &ListResolversOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResolvers API operation for AWS AppSync. -// -// Lists the resolvers for a given API and type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation ListResolvers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListResolvers -func (c *AppSync) ListResolvers(input *ListResolversInput) (*ListResolversOutput, error) { - req, out := c.ListResolversRequest(input) - return out, req.Send() -} - -// ListResolversWithContext is the same as ListResolvers with the addition of -// the ability to pass a context and additional request options. -// -// See ListResolvers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) ListResolversWithContext(ctx aws.Context, input *ListResolversInput, opts ...request.Option) (*ListResolversOutput, error) { - req, out := c.ListResolversRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListResolversByFunction = "ListResolversByFunction" - -// ListResolversByFunctionRequest generates a "aws/request.Request" representing the -// client's request for the ListResolversByFunction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResolversByFunction for more information on using the ListResolversByFunction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResolversByFunctionRequest method. -// req, resp := client.ListResolversByFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListResolversByFunction -func (c *AppSync) ListResolversByFunctionRequest(input *ListResolversByFunctionInput) (req *request.Request, output *ListResolversByFunctionOutput) { - op := &request.Operation{ - Name: opListResolversByFunction, - HTTPMethod: "GET", - HTTPPath: "/v1/apis/{apiId}/functions/{functionId}/resolvers", - } - - if input == nil { - input = &ListResolversByFunctionInput{} - } - - output = &ListResolversByFunctionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResolversByFunction API operation for AWS AppSync. -// -// List the resolvers that are associated with a specific function. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation ListResolversByFunction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListResolversByFunction -func (c *AppSync) ListResolversByFunction(input *ListResolversByFunctionInput) (*ListResolversByFunctionOutput, error) { - req, out := c.ListResolversByFunctionRequest(input) - return out, req.Send() -} - -// ListResolversByFunctionWithContext is the same as ListResolversByFunction with the addition of -// the ability to pass a context and additional request options. -// -// See ListResolversByFunction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) ListResolversByFunctionWithContext(ctx aws.Context, input *ListResolversByFunctionInput, opts ...request.Option) (*ListResolversByFunctionOutput, error) { - req, out := c.ListResolversByFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTypes = "ListTypes" - -// ListTypesRequest generates a "aws/request.Request" representing the -// client's request for the ListTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTypes for more information on using the ListTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTypesRequest method. -// req, resp := client.ListTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListTypes -func (c *AppSync) ListTypesRequest(input *ListTypesInput) (req *request.Request, output *ListTypesOutput) { - op := &request.Operation{ - Name: opListTypes, - HTTPMethod: "GET", - HTTPPath: "/v1/apis/{apiId}/types", - } - - if input == nil { - input = &ListTypesInput{} - } - - output = &ListTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTypes API operation for AWS AppSync. -// -// Lists the types for a given API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation ListTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListTypes -func (c *AppSync) ListTypes(input *ListTypesInput) (*ListTypesOutput, error) { - req, out := c.ListTypesRequest(input) - return out, req.Send() -} - -// ListTypesWithContext is the same as ListTypes with the addition of -// the ability to pass a context and additional request options. -// -// See ListTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) ListTypesWithContext(ctx aws.Context, input *ListTypesInput, opts ...request.Option) (*ListTypesOutput, error) { - req, out := c.ListTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartSchemaCreation = "StartSchemaCreation" - -// StartSchemaCreationRequest generates a "aws/request.Request" representing the -// client's request for the StartSchemaCreation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartSchemaCreation for more information on using the StartSchemaCreation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartSchemaCreationRequest method. -// req, resp := client.StartSchemaCreationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/StartSchemaCreation -func (c *AppSync) StartSchemaCreationRequest(input *StartSchemaCreationInput) (req *request.Request, output *StartSchemaCreationOutput) { - op := &request.Operation{ - Name: opStartSchemaCreation, - HTTPMethod: "POST", - HTTPPath: "/v1/apis/{apiId}/schemacreation", - } - - if input == nil { - input = &StartSchemaCreationInput{} - } - - output = &StartSchemaCreationOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartSchemaCreation API operation for AWS AppSync. -// -// Adds a new schema to your GraphQL API. -// -// This operation is asynchronous. Use to determine when it has completed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation StartSchemaCreation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/StartSchemaCreation -func (c *AppSync) StartSchemaCreation(input *StartSchemaCreationInput) (*StartSchemaCreationOutput, error) { - req, out := c.StartSchemaCreationRequest(input) - return out, req.Send() -} - -// StartSchemaCreationWithContext is the same as StartSchemaCreation with the addition of -// the ability to pass a context and additional request options. -// -// See StartSchemaCreation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) StartSchemaCreationWithContext(ctx aws.Context, input *StartSchemaCreationInput, opts ...request.Option) (*StartSchemaCreationOutput, error) { - req, out := c.StartSchemaCreationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApiKey = "UpdateApiKey" - -// UpdateApiKeyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApiKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApiKey for more information on using the UpdateApiKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApiKeyRequest method. -// req, resp := client.UpdateApiKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateApiKey -func (c *AppSync) UpdateApiKeyRequest(input *UpdateApiKeyInput) (req *request.Request, output *UpdateApiKeyOutput) { - op := &request.Operation{ - Name: opUpdateApiKey, - HTTPMethod: "POST", - HTTPPath: "/v1/apis/{apiId}/apikeys/{id}", - } - - if input == nil { - input = &UpdateApiKeyInput{} - } - - output = &UpdateApiKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateApiKey API operation for AWS AppSync. -// -// Updates an API key. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation UpdateApiKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// * ErrCodeApiKeyValidityOutOfBoundsException "ApiKeyValidityOutOfBoundsException" -// The API key expiration must be set to a value between 1 and 365 days from -// creation (for CreateApiKey) or from update (for UpdateApiKey). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateApiKey -func (c *AppSync) UpdateApiKey(input *UpdateApiKeyInput) (*UpdateApiKeyOutput, error) { - req, out := c.UpdateApiKeyRequest(input) - return out, req.Send() -} - -// UpdateApiKeyWithContext is the same as UpdateApiKey with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApiKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) UpdateApiKeyWithContext(ctx aws.Context, input *UpdateApiKeyInput, opts ...request.Option) (*UpdateApiKeyOutput, error) { - req, out := c.UpdateApiKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDataSource = "UpdateDataSource" - -// UpdateDataSourceRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDataSource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDataSource for more information on using the UpdateDataSource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDataSourceRequest method. -// req, resp := client.UpdateDataSourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateDataSource -func (c *AppSync) UpdateDataSourceRequest(input *UpdateDataSourceInput) (req *request.Request, output *UpdateDataSourceOutput) { - op := &request.Operation{ - Name: opUpdateDataSource, - HTTPMethod: "POST", - HTTPPath: "/v1/apis/{apiId}/datasources/{name}", - } - - if input == nil { - input = &UpdateDataSourceInput{} - } - - output = &UpdateDataSourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDataSource API operation for AWS AppSync. -// -// Updates a DataSource object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation UpdateDataSource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateDataSource -func (c *AppSync) UpdateDataSource(input *UpdateDataSourceInput) (*UpdateDataSourceOutput, error) { - req, out := c.UpdateDataSourceRequest(input) - return out, req.Send() -} - -// UpdateDataSourceWithContext is the same as UpdateDataSource with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDataSource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) UpdateDataSourceWithContext(ctx aws.Context, input *UpdateDataSourceInput, opts ...request.Option) (*UpdateDataSourceOutput, error) { - req, out := c.UpdateDataSourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFunction = "UpdateFunction" - -// UpdateFunctionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFunction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFunction for more information on using the UpdateFunction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFunctionRequest method. -// req, resp := client.UpdateFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateFunction -func (c *AppSync) UpdateFunctionRequest(input *UpdateFunctionInput) (req *request.Request, output *UpdateFunctionOutput) { - op := &request.Operation{ - Name: opUpdateFunction, - HTTPMethod: "POST", - HTTPPath: "/v1/apis/{apiId}/functions/{functionId}", - } - - if input == nil { - input = &UpdateFunctionInput{} - } - - output = &UpdateFunctionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFunction API operation for AWS AppSync. -// -// Updates a Function object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation UpdateFunction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateFunction -func (c *AppSync) UpdateFunction(input *UpdateFunctionInput) (*UpdateFunctionOutput, error) { - req, out := c.UpdateFunctionRequest(input) - return out, req.Send() -} - -// UpdateFunctionWithContext is the same as UpdateFunction with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFunction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) UpdateFunctionWithContext(ctx aws.Context, input *UpdateFunctionInput, opts ...request.Option) (*UpdateFunctionOutput, error) { - req, out := c.UpdateFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateGraphqlApi = "UpdateGraphqlApi" - -// UpdateGraphqlApiRequest generates a "aws/request.Request" representing the -// client's request for the UpdateGraphqlApi operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateGraphqlApi for more information on using the UpdateGraphqlApi -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateGraphqlApiRequest method. -// req, resp := client.UpdateGraphqlApiRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateGraphqlApi -func (c *AppSync) UpdateGraphqlApiRequest(input *UpdateGraphqlApiInput) (req *request.Request, output *UpdateGraphqlApiOutput) { - op := &request.Operation{ - Name: opUpdateGraphqlApi, - HTTPMethod: "POST", - HTTPPath: "/v1/apis/{apiId}", - } - - if input == nil { - input = &UpdateGraphqlApiInput{} - } - - output = &UpdateGraphqlApiOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateGraphqlApi API operation for AWS AppSync. -// -// Updates a GraphqlApi object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation UpdateGraphqlApi for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateGraphqlApi -func (c *AppSync) UpdateGraphqlApi(input *UpdateGraphqlApiInput) (*UpdateGraphqlApiOutput, error) { - req, out := c.UpdateGraphqlApiRequest(input) - return out, req.Send() -} - -// UpdateGraphqlApiWithContext is the same as UpdateGraphqlApi with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateGraphqlApi for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) UpdateGraphqlApiWithContext(ctx aws.Context, input *UpdateGraphqlApiInput, opts ...request.Option) (*UpdateGraphqlApiOutput, error) { - req, out := c.UpdateGraphqlApiRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateResolver = "UpdateResolver" - -// UpdateResolverRequest generates a "aws/request.Request" representing the -// client's request for the UpdateResolver operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateResolver for more information on using the UpdateResolver -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateResolverRequest method. -// req, resp := client.UpdateResolverRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateResolver -func (c *AppSync) UpdateResolverRequest(input *UpdateResolverInput) (req *request.Request, output *UpdateResolverOutput) { - op := &request.Operation{ - Name: opUpdateResolver, - HTTPMethod: "POST", - HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers/{fieldName}", - } - - if input == nil { - input = &UpdateResolverInput{} - } - - output = &UpdateResolverOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateResolver API operation for AWS AppSync. -// -// Updates a Resolver object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation UpdateResolver for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateResolver -func (c *AppSync) UpdateResolver(input *UpdateResolverInput) (*UpdateResolverOutput, error) { - req, out := c.UpdateResolverRequest(input) - return out, req.Send() -} - -// UpdateResolverWithContext is the same as UpdateResolver with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateResolver for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) UpdateResolverWithContext(ctx aws.Context, input *UpdateResolverInput, opts ...request.Option) (*UpdateResolverOutput, error) { - req, out := c.UpdateResolverRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateType = "UpdateType" - -// UpdateTypeRequest generates a "aws/request.Request" representing the -// client's request for the UpdateType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateType for more information on using the UpdateType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateTypeRequest method. -// req, resp := client.UpdateTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateType -func (c *AppSync) UpdateTypeRequest(input *UpdateTypeInput) (req *request.Request, output *UpdateTypeOutput) { - op := &request.Operation{ - Name: opUpdateType, - HTTPMethod: "POST", - HTTPPath: "/v1/apis/{apiId}/types/{typeName}", - } - - if input == nil { - input = &UpdateTypeInput{} - } - - output = &UpdateTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateType API operation for AWS AppSync. -// -// Updates a Type object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS AppSync's -// API operation UpdateType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and then try again. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is in progress at this time and it must complete before -// you can make your change. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource, -// and then try again. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal AWS AppSync error occurred. Try your request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateType -func (c *AppSync) UpdateType(input *UpdateTypeInput) (*UpdateTypeOutput, error) { - req, out := c.UpdateTypeRequest(input) - return out, req.Send() -} - -// UpdateTypeWithContext is the same as UpdateType with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AppSync) UpdateTypeWithContext(ctx aws.Context, input *UpdateTypeInput, opts ...request.Option) (*UpdateTypeOutput, error) { - req, out := c.UpdateTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Describes an API key. -// -// Customers invoke AWS AppSync GraphQL API operations with API keys as an identity -// mechanism. There are two key versions: -// -// da1: This version was introduced at launch in November 2017. These keys always -// expire after 7 days. Key expiration is managed by Amazon DynamoDB TTL. The -// keys ceased to be valid after February 21, 2018 and should not be used after -// that date. -// -// * ListApiKeys returns the expiration time in milliseconds. -// -// * CreateApiKey returns the expiration time in milliseconds. -// -// * UpdateApiKey is not available for this key version. -// -// * DeleteApiKey deletes the item from the table. -// -// * Expiration is stored in Amazon DynamoDB as milliseconds. This results -// in a bug where keys are not automatically deleted because DynamoDB expects -// the TTL to be stored in seconds. As a one-time action, we will delete -// these keys from the table after February 21, 2018. -// -// da2: This version was introduced in February 2018 when AppSync added support -// to extend key expiration. -// -// * ListApiKeys returns the expiration time in seconds. -// -// * CreateApiKey returns the expiration time in seconds and accepts a user-provided -// expiration time in seconds. -// -// * UpdateApiKey returns the expiration time in seconds and accepts a user-provided -// expiration time in seconds. Key expiration can only be updated while the -// key has not expired. -// -// * DeleteApiKey deletes the item from the table. -// -// * Expiration is stored in Amazon DynamoDB as seconds. -type ApiKey struct { - _ struct{} `type:"structure"` - - // A description of the purpose of the API key. - Description *string `locationName:"description" type:"string"` - - // The time after which the API key expires. The date is represented as seconds - // since the epoch, rounded down to the nearest hour. - Expires *int64 `locationName:"expires" type:"long"` - - // The API key ID. - Id *string `locationName:"id" type:"string"` -} - -// String returns the string representation -func (s ApiKey) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApiKey) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *ApiKey) SetDescription(v string) *ApiKey { - s.Description = &v - return s -} - -// SetExpires sets the Expires field's value. -func (s *ApiKey) SetExpires(v int64) *ApiKey { - s.Expires = &v - return s -} - -// SetId sets the Id field's value. -func (s *ApiKey) SetId(v string) *ApiKey { - s.Id = &v - return s -} - -// The authorization config in case the HTTP endpoint requires authorization. -type AuthorizationConfig struct { - _ struct{} `type:"structure"` - - // The authorization type required by the HTTP endpoint. - // - // * AWS_IAM: The authorization type is Sigv4. - // - // AuthorizationType is a required field - AuthorizationType *string `locationName:"authorizationType" type:"string" required:"true" enum:"AuthorizationType"` - - // The AWS IAM settings. - AwsIamConfig *AwsIamConfig `locationName:"awsIamConfig" type:"structure"` -} - -// String returns the string representation -func (s AuthorizationConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizationConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AuthorizationConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuthorizationConfig"} - if s.AuthorizationType == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizationType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthorizationType sets the AuthorizationType field's value. -func (s *AuthorizationConfig) SetAuthorizationType(v string) *AuthorizationConfig { - s.AuthorizationType = &v - return s -} - -// SetAwsIamConfig sets the AwsIamConfig field's value. -func (s *AuthorizationConfig) SetAwsIamConfig(v *AwsIamConfig) *AuthorizationConfig { - s.AwsIamConfig = v - return s -} - -// The AWS IAM configuration. -type AwsIamConfig struct { - _ struct{} `type:"structure"` - - // The signing region for AWS IAM authorization. - SigningRegion *string `locationName:"signingRegion" type:"string"` - - // The signing service name for AWS IAM authorization. - SigningServiceName *string `locationName:"signingServiceName" type:"string"` -} - -// String returns the string representation -func (s AwsIamConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AwsIamConfig) GoString() string { - return s.String() -} - -// SetSigningRegion sets the SigningRegion field's value. -func (s *AwsIamConfig) SetSigningRegion(v string) *AwsIamConfig { - s.SigningRegion = &v - return s -} - -// SetSigningServiceName sets the SigningServiceName field's value. -func (s *AwsIamConfig) SetSigningServiceName(v string) *AwsIamConfig { - s.SigningServiceName = &v - return s -} - -type CreateApiKeyInput struct { - _ struct{} `type:"structure"` - - // The ID for your GraphQL API. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // A description of the purpose of the API key. - Description *string `locationName:"description" type:"string"` - - // The time from creation time after which the API key expires. The date is - // represented as seconds since the epoch, rounded down to the nearest hour. - // The default value for this parameter is 7 days from creation time. For more - // information, see . - Expires *int64 `locationName:"expires" type:"long"` -} - -// String returns the string representation -func (s CreateApiKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApiKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateApiKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateApiKeyInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *CreateApiKeyInput) SetApiId(v string) *CreateApiKeyInput { - s.ApiId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateApiKeyInput) SetDescription(v string) *CreateApiKeyInput { - s.Description = &v - return s -} - -// SetExpires sets the Expires field's value. -func (s *CreateApiKeyInput) SetExpires(v int64) *CreateApiKeyInput { - s.Expires = &v - return s -} - -type CreateApiKeyOutput struct { - _ struct{} `type:"structure"` - - // The API key. - ApiKey *ApiKey `locationName:"apiKey" type:"structure"` -} - -// String returns the string representation -func (s CreateApiKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApiKeyOutput) GoString() string { - return s.String() -} - -// SetApiKey sets the ApiKey field's value. -func (s *CreateApiKeyOutput) SetApiKey(v *ApiKey) *CreateApiKeyOutput { - s.ApiKey = v - return s -} - -type CreateDataSourceInput struct { - _ struct{} `type:"structure"` - - // The API ID for the GraphQL API for the DataSource. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // A description of the DataSource. - Description *string `locationName:"description" type:"string"` - - // Amazon DynamoDB settings. - DynamodbConfig *DynamodbDataSourceConfig `locationName:"dynamodbConfig" type:"structure"` - - // Amazon Elasticsearch Service settings. - ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` - - // HTTP endpoint settings. - HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"` - - // AWS Lambda settings. - LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"` - - // A user-supplied name for the DataSource. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // Relational database settings. - RelationalDatabaseConfig *RelationalDatabaseDataSourceConfig `locationName:"relationalDatabaseConfig" type:"structure"` - - // The AWS IAM service role ARN for the data source. The system assumes this - // role when accessing the data source. - ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"` - - // The type of the DataSource. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"DataSourceType"` -} - -// String returns the string representation -func (s CreateDataSourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDataSourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDataSourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDataSourceInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.DynamodbConfig != nil { - if err := s.DynamodbConfig.Validate(); err != nil { - invalidParams.AddNested("DynamodbConfig", err.(request.ErrInvalidParams)) - } - } - if s.ElasticsearchConfig != nil { - if err := s.ElasticsearchConfig.Validate(); err != nil { - invalidParams.AddNested("ElasticsearchConfig", err.(request.ErrInvalidParams)) - } - } - if s.HttpConfig != nil { - if err := s.HttpConfig.Validate(); err != nil { - invalidParams.AddNested("HttpConfig", err.(request.ErrInvalidParams)) - } - } - if s.LambdaConfig != nil { - if err := s.LambdaConfig.Validate(); err != nil { - invalidParams.AddNested("LambdaConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *CreateDataSourceInput) SetApiId(v string) *CreateDataSourceInput { - s.ApiId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateDataSourceInput) SetDescription(v string) *CreateDataSourceInput { - s.Description = &v - return s -} - -// SetDynamodbConfig sets the DynamodbConfig field's value. -func (s *CreateDataSourceInput) SetDynamodbConfig(v *DynamodbDataSourceConfig) *CreateDataSourceInput { - s.DynamodbConfig = v - return s -} - -// SetElasticsearchConfig sets the ElasticsearchConfig field's value. -func (s *CreateDataSourceInput) SetElasticsearchConfig(v *ElasticsearchDataSourceConfig) *CreateDataSourceInput { - s.ElasticsearchConfig = v - return s -} - -// SetHttpConfig sets the HttpConfig field's value. -func (s *CreateDataSourceInput) SetHttpConfig(v *HttpDataSourceConfig) *CreateDataSourceInput { - s.HttpConfig = v - return s -} - -// SetLambdaConfig sets the LambdaConfig field's value. -func (s *CreateDataSourceInput) SetLambdaConfig(v *LambdaDataSourceConfig) *CreateDataSourceInput { - s.LambdaConfig = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateDataSourceInput) SetName(v string) *CreateDataSourceInput { - s.Name = &v - return s -} - -// SetRelationalDatabaseConfig sets the RelationalDatabaseConfig field's value. -func (s *CreateDataSourceInput) SetRelationalDatabaseConfig(v *RelationalDatabaseDataSourceConfig) *CreateDataSourceInput { - s.RelationalDatabaseConfig = v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *CreateDataSourceInput) SetServiceRoleArn(v string) *CreateDataSourceInput { - s.ServiceRoleArn = &v - return s -} - -// SetType sets the Type field's value. -func (s *CreateDataSourceInput) SetType(v string) *CreateDataSourceInput { - s.Type = &v - return s -} - -type CreateDataSourceOutput struct { - _ struct{} `type:"structure"` - - // The DataSource object. - DataSource *DataSource `locationName:"dataSource" type:"structure"` -} - -// String returns the string representation -func (s CreateDataSourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDataSourceOutput) GoString() string { - return s.String() -} - -// SetDataSource sets the DataSource field's value. -func (s *CreateDataSourceOutput) SetDataSource(v *DataSource) *CreateDataSourceOutput { - s.DataSource = v - return s -} - -type CreateFunctionInput struct { - _ struct{} `type:"structure"` - - // The GraphQL API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The FunctionDataSource name. - // - // DataSourceName is a required field - DataSourceName *string `locationName:"dataSourceName" type:"string" required:"true"` - - // The Function description. - Description *string `locationName:"description" type:"string"` - - // The version of the request mapping template. Currently the supported value - // is 2018-05-29. - // - // FunctionVersion is a required field - FunctionVersion *string `locationName:"functionVersion" type:"string" required:"true"` - - // The Function name. The function name does not have to be unique. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The Function request mapping template. Functions support only the 2018-05-29 - // version of the request mapping template. - // - // RequestMappingTemplate is a required field - RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string" required:"true"` - - // The Function response mapping template. - ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFunctionInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.DataSourceName == nil { - invalidParams.Add(request.NewErrParamRequired("DataSourceName")) - } - if s.FunctionVersion == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionVersion")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.RequestMappingTemplate == nil { - invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate")) - } - if s.RequestMappingTemplate != nil && len(*s.RequestMappingTemplate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RequestMappingTemplate", 1)) - } - if s.ResponseMappingTemplate != nil && len(*s.ResponseMappingTemplate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResponseMappingTemplate", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *CreateFunctionInput) SetApiId(v string) *CreateFunctionInput { - s.ApiId = &v - return s -} - -// SetDataSourceName sets the DataSourceName field's value. -func (s *CreateFunctionInput) SetDataSourceName(v string) *CreateFunctionInput { - s.DataSourceName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateFunctionInput) SetDescription(v string) *CreateFunctionInput { - s.Description = &v - return s -} - -// SetFunctionVersion sets the FunctionVersion field's value. -func (s *CreateFunctionInput) SetFunctionVersion(v string) *CreateFunctionInput { - s.FunctionVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateFunctionInput) SetName(v string) *CreateFunctionInput { - s.Name = &v - return s -} - -// SetRequestMappingTemplate sets the RequestMappingTemplate field's value. -func (s *CreateFunctionInput) SetRequestMappingTemplate(v string) *CreateFunctionInput { - s.RequestMappingTemplate = &v - return s -} - -// SetResponseMappingTemplate sets the ResponseMappingTemplate field's value. -func (s *CreateFunctionInput) SetResponseMappingTemplate(v string) *CreateFunctionInput { - s.ResponseMappingTemplate = &v - return s -} - -type CreateFunctionOutput struct { - _ struct{} `type:"structure"` - - // The Function object. - FunctionConfiguration *FunctionConfiguration `locationName:"functionConfiguration" type:"structure"` -} - -// String returns the string representation -func (s CreateFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFunctionOutput) GoString() string { - return s.String() -} - -// SetFunctionConfiguration sets the FunctionConfiguration field's value. -func (s *CreateFunctionOutput) SetFunctionConfiguration(v *FunctionConfiguration) *CreateFunctionOutput { - s.FunctionConfiguration = v - return s -} - -type CreateGraphqlApiInput struct { - _ struct{} `type:"structure"` - - // The authentication type: API key, AWS IAM, or Amazon Cognito user pools. - // - // AuthenticationType is a required field - AuthenticationType *string `locationName:"authenticationType" type:"string" required:"true" enum:"AuthenticationType"` - - // The Amazon CloudWatch Logs configuration. - LogConfig *LogConfig `locationName:"logConfig" type:"structure"` - - // A user-supplied name for the GraphqlApi. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The OpenID Connect configuration. - OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"` - - // The Amazon Cognito user pool configuration. - UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` -} - -// String returns the string representation -func (s CreateGraphqlApiInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateGraphqlApiInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateGraphqlApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateGraphqlApiInput"} - if s.AuthenticationType == nil { - invalidParams.Add(request.NewErrParamRequired("AuthenticationType")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.LogConfig != nil { - if err := s.LogConfig.Validate(); err != nil { - invalidParams.AddNested("LogConfig", err.(request.ErrInvalidParams)) - } - } - if s.OpenIDConnectConfig != nil { - if err := s.OpenIDConnectConfig.Validate(); err != nil { - invalidParams.AddNested("OpenIDConnectConfig", err.(request.ErrInvalidParams)) - } - } - if s.UserPoolConfig != nil { - if err := s.UserPoolConfig.Validate(); err != nil { - invalidParams.AddNested("UserPoolConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticationType sets the AuthenticationType field's value. -func (s *CreateGraphqlApiInput) SetAuthenticationType(v string) *CreateGraphqlApiInput { - s.AuthenticationType = &v - return s -} - -// SetLogConfig sets the LogConfig field's value. -func (s *CreateGraphqlApiInput) SetLogConfig(v *LogConfig) *CreateGraphqlApiInput { - s.LogConfig = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateGraphqlApiInput) SetName(v string) *CreateGraphqlApiInput { - s.Name = &v - return s -} - -// SetOpenIDConnectConfig sets the OpenIDConnectConfig field's value. -func (s *CreateGraphqlApiInput) SetOpenIDConnectConfig(v *OpenIDConnectConfig) *CreateGraphqlApiInput { - s.OpenIDConnectConfig = v - return s -} - -// SetUserPoolConfig sets the UserPoolConfig field's value. -func (s *CreateGraphqlApiInput) SetUserPoolConfig(v *UserPoolConfig) *CreateGraphqlApiInput { - s.UserPoolConfig = v - return s -} - -type CreateGraphqlApiOutput struct { - _ struct{} `type:"structure"` - - // The GraphqlApi. - GraphqlApi *GraphqlApi `locationName:"graphqlApi" type:"structure"` -} - -// String returns the string representation -func (s CreateGraphqlApiOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateGraphqlApiOutput) GoString() string { - return s.String() -} - -// SetGraphqlApi sets the GraphqlApi field's value. -func (s *CreateGraphqlApiOutput) SetGraphqlApi(v *GraphqlApi) *CreateGraphqlApiOutput { - s.GraphqlApi = v - return s -} - -type CreateResolverInput struct { - _ struct{} `type:"structure"` - - // The ID for the GraphQL API for which the resolver is being created. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The name of the data source for which the resolver is being created. - DataSourceName *string `locationName:"dataSourceName" type:"string"` - - // The name of the field to attach the resolver to. - // - // FieldName is a required field - FieldName *string `locationName:"fieldName" type:"string" required:"true"` - - // The resolver type. - // - // * UNIT: A UNIT resolver type. A UNIT resolver is the default resolver - // type. A UNIT resolver enables you to execute a GraphQL query against a - // single data source. - // - // * PIPELINE: A PIPELINE resolver type. A PIPELINE resolver enables you - // to execute a series of Function in a serial manner. You can use a pipeline - // resolver to execute a GraphQL query against multiple data sources. - Kind *string `locationName:"kind" type:"string" enum:"ResolverKind"` - - // The PipelineConfig. - PipelineConfig *PipelineConfig `locationName:"pipelineConfig" type:"structure"` - - // The mapping template to be used for requests. - // - // A resolver uses a request mapping template to convert a GraphQL expression - // into a format that a data source can understand. Mapping templates are written - // in Apache Velocity Template Language (VTL). - // - // RequestMappingTemplate is a required field - RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string" required:"true"` - - // The mapping template to be used for responses from the data source. - ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` - - // The name of the Type. - // - // TypeName is a required field - TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateResolverInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResolverInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateResolverInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateResolverInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.FieldName == nil { - invalidParams.Add(request.NewErrParamRequired("FieldName")) - } - if s.RequestMappingTemplate == nil { - invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate")) - } - if s.RequestMappingTemplate != nil && len(*s.RequestMappingTemplate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RequestMappingTemplate", 1)) - } - if s.ResponseMappingTemplate != nil && len(*s.ResponseMappingTemplate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResponseMappingTemplate", 1)) - } - if s.TypeName == nil { - invalidParams.Add(request.NewErrParamRequired("TypeName")) - } - if s.TypeName != nil && len(*s.TypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *CreateResolverInput) SetApiId(v string) *CreateResolverInput { - s.ApiId = &v - return s -} - -// SetDataSourceName sets the DataSourceName field's value. -func (s *CreateResolverInput) SetDataSourceName(v string) *CreateResolverInput { - s.DataSourceName = &v - return s -} - -// SetFieldName sets the FieldName field's value. -func (s *CreateResolverInput) SetFieldName(v string) *CreateResolverInput { - s.FieldName = &v - return s -} - -// SetKind sets the Kind field's value. -func (s *CreateResolverInput) SetKind(v string) *CreateResolverInput { - s.Kind = &v - return s -} - -// SetPipelineConfig sets the PipelineConfig field's value. -func (s *CreateResolverInput) SetPipelineConfig(v *PipelineConfig) *CreateResolverInput { - s.PipelineConfig = v - return s -} - -// SetRequestMappingTemplate sets the RequestMappingTemplate field's value. -func (s *CreateResolverInput) SetRequestMappingTemplate(v string) *CreateResolverInput { - s.RequestMappingTemplate = &v - return s -} - -// SetResponseMappingTemplate sets the ResponseMappingTemplate field's value. -func (s *CreateResolverInput) SetResponseMappingTemplate(v string) *CreateResolverInput { - s.ResponseMappingTemplate = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *CreateResolverInput) SetTypeName(v string) *CreateResolverInput { - s.TypeName = &v - return s -} - -type CreateResolverOutput struct { - _ struct{} `type:"structure"` - - // The Resolver object. - Resolver *Resolver `locationName:"resolver" type:"structure"` -} - -// String returns the string representation -func (s CreateResolverOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResolverOutput) GoString() string { - return s.String() -} - -// SetResolver sets the Resolver field's value. -func (s *CreateResolverOutput) SetResolver(v *Resolver) *CreateResolverOutput { - s.Resolver = v - return s -} - -type CreateTypeInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The type definition, in GraphQL Schema Definition Language (SDL) format. - // - // For more information, see the GraphQL SDL documentation (http://graphql.org/learn/schema/). - // - // Definition is a required field - Definition *string `locationName:"definition" type:"string" required:"true"` - - // The type format: SDL or JSON. - // - // Format is a required field - Format *string `locationName:"format" type:"string" required:"true" enum:"TypeDefinitionFormat"` -} - -// String returns the string representation -func (s CreateTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTypeInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.Definition == nil { - invalidParams.Add(request.NewErrParamRequired("Definition")) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *CreateTypeInput) SetApiId(v string) *CreateTypeInput { - s.ApiId = &v - return s -} - -// SetDefinition sets the Definition field's value. -func (s *CreateTypeInput) SetDefinition(v string) *CreateTypeInput { - s.Definition = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *CreateTypeInput) SetFormat(v string) *CreateTypeInput { - s.Format = &v - return s -} - -type CreateTypeOutput struct { - _ struct{} `type:"structure"` - - // The Type object. - Type *Type `locationName:"type" type:"structure"` -} - -// String returns the string representation -func (s CreateTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTypeOutput) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *CreateTypeOutput) SetType(v *Type) *CreateTypeOutput { - s.Type = v - return s -} - -// Describes a data source. -type DataSource struct { - _ struct{} `type:"structure"` - - // The data source ARN. - DataSourceArn *string `locationName:"dataSourceArn" type:"string"` - - // The description of the data source. - Description *string `locationName:"description" type:"string"` - - // Amazon DynamoDB settings. - DynamodbConfig *DynamodbDataSourceConfig `locationName:"dynamodbConfig" type:"structure"` - - // Amazon Elasticsearch Service settings. - ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` - - // HTTP endpoint settings. - HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"` - - // AWS Lambda settings. - LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"` - - // The name of the data source. - Name *string `locationName:"name" type:"string"` - - // Relational database settings. - RelationalDatabaseConfig *RelationalDatabaseDataSourceConfig `locationName:"relationalDatabaseConfig" type:"structure"` - - // The AWS IAM service role ARN for the data source. The system assumes this - // role when accessing the data source. - ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"` - - // The type of the data source. - // - // * AMAZON_DYNAMODB: The data source is an Amazon DynamoDB table. - // - // * AMAZON_ELASTICSEARCH: The data source is an Amazon Elasticsearch Service - // domain. - // - // * AWS_LAMBDA: The data source is an AWS Lambda function. - // - // * NONE: There is no data source. This type is used when you wish to invoke - // a GraphQL operation without connecting to a data source, such as performing - // data transformation with resolvers or triggering a subscription to be - // invoked from a mutation. - // - // * HTTP: The data source is an HTTP endpoint. - // - // * RELATIONAL_DATABASE: The data source is a relational database. - Type *string `locationName:"type" type:"string" enum:"DataSourceType"` -} - -// String returns the string representation -func (s DataSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DataSource) GoString() string { - return s.String() -} - -// SetDataSourceArn sets the DataSourceArn field's value. -func (s *DataSource) SetDataSourceArn(v string) *DataSource { - s.DataSourceArn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DataSource) SetDescription(v string) *DataSource { - s.Description = &v - return s -} - -// SetDynamodbConfig sets the DynamodbConfig field's value. -func (s *DataSource) SetDynamodbConfig(v *DynamodbDataSourceConfig) *DataSource { - s.DynamodbConfig = v - return s -} - -// SetElasticsearchConfig sets the ElasticsearchConfig field's value. -func (s *DataSource) SetElasticsearchConfig(v *ElasticsearchDataSourceConfig) *DataSource { - s.ElasticsearchConfig = v - return s -} - -// SetHttpConfig sets the HttpConfig field's value. -func (s *DataSource) SetHttpConfig(v *HttpDataSourceConfig) *DataSource { - s.HttpConfig = v - return s -} - -// SetLambdaConfig sets the LambdaConfig field's value. -func (s *DataSource) SetLambdaConfig(v *LambdaDataSourceConfig) *DataSource { - s.LambdaConfig = v - return s -} - -// SetName sets the Name field's value. -func (s *DataSource) SetName(v string) *DataSource { - s.Name = &v - return s -} - -// SetRelationalDatabaseConfig sets the RelationalDatabaseConfig field's value. -func (s *DataSource) SetRelationalDatabaseConfig(v *RelationalDatabaseDataSourceConfig) *DataSource { - s.RelationalDatabaseConfig = v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *DataSource) SetServiceRoleArn(v string) *DataSource { - s.ServiceRoleArn = &v - return s -} - -// SetType sets the Type field's value. -func (s *DataSource) SetType(v string) *DataSource { - s.Type = &v - return s -} - -type DeleteApiKeyInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The ID for the API key. - // - // Id is a required field - Id *string `location:"uri" locationName:"id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteApiKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApiKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApiKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApiKeyInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteApiKeyInput) SetApiId(v string) *DeleteApiKeyInput { - s.ApiId = &v - return s -} - -// SetId sets the Id field's value. -func (s *DeleteApiKeyInput) SetId(v string) *DeleteApiKeyInput { - s.Id = &v - return s -} - -type DeleteApiKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteApiKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApiKeyOutput) GoString() string { - return s.String() -} - -type DeleteDataSourceInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The name of the data source. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDataSourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDataSourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDataSourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDataSourceInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteDataSourceInput) SetApiId(v string) *DeleteDataSourceInput { - s.ApiId = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteDataSourceInput) SetName(v string) *DeleteDataSourceInput { - s.Name = &v - return s -} - -type DeleteDataSourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDataSourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDataSourceOutput) GoString() string { - return s.String() -} - -type DeleteFunctionInput struct { - _ struct{} `type:"structure"` - - // The GraphQL API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The Function ID. - // - // FunctionId is a required field - FunctionId *string `location:"uri" locationName:"functionId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFunctionInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.FunctionId == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionId")) - } - if s.FunctionId != nil && len(*s.FunctionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteFunctionInput) SetApiId(v string) *DeleteFunctionInput { - s.ApiId = &v - return s -} - -// SetFunctionId sets the FunctionId field's value. -func (s *DeleteFunctionInput) SetFunctionId(v string) *DeleteFunctionInput { - s.FunctionId = &v - return s -} - -type DeleteFunctionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFunctionOutput) GoString() string { - return s.String() -} - -type DeleteGraphqlApiInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteGraphqlApiInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGraphqlApiInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteGraphqlApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteGraphqlApiInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteGraphqlApiInput) SetApiId(v string) *DeleteGraphqlApiInput { - s.ApiId = &v - return s -} - -type DeleteGraphqlApiOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteGraphqlApiOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGraphqlApiOutput) GoString() string { - return s.String() -} - -type DeleteResolverInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The resolver field name. - // - // FieldName is a required field - FieldName *string `location:"uri" locationName:"fieldName" type:"string" required:"true"` - - // The name of the resolver type. - // - // TypeName is a required field - TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteResolverInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResolverInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteResolverInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteResolverInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.FieldName == nil { - invalidParams.Add(request.NewErrParamRequired("FieldName")) - } - if s.FieldName != nil && len(*s.FieldName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FieldName", 1)) - } - if s.TypeName == nil { - invalidParams.Add(request.NewErrParamRequired("TypeName")) - } - if s.TypeName != nil && len(*s.TypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteResolverInput) SetApiId(v string) *DeleteResolverInput { - s.ApiId = &v - return s -} - -// SetFieldName sets the FieldName field's value. -func (s *DeleteResolverInput) SetFieldName(v string) *DeleteResolverInput { - s.FieldName = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *DeleteResolverInput) SetTypeName(v string) *DeleteResolverInput { - s.TypeName = &v - return s -} - -type DeleteResolverOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteResolverOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResolverOutput) GoString() string { - return s.String() -} - -type DeleteTypeInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The type name. - // - // TypeName is a required field - TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTypeInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.TypeName == nil { - invalidParams.Add(request.NewErrParamRequired("TypeName")) - } - if s.TypeName != nil && len(*s.TypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *DeleteTypeInput) SetApiId(v string) *DeleteTypeInput { - s.ApiId = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *DeleteTypeInput) SetTypeName(v string) *DeleteTypeInput { - s.TypeName = &v - return s -} - -type DeleteTypeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTypeOutput) GoString() string { - return s.String() -} - -// Describes an Amazon DynamoDB data source configuration. -type DynamodbDataSourceConfig struct { - _ struct{} `type:"structure"` - - // The AWS Region. - // - // AwsRegion is a required field - AwsRegion *string `locationName:"awsRegion" type:"string" required:"true"` - - // The table name. - // - // TableName is a required field - TableName *string `locationName:"tableName" type:"string" required:"true"` - - // Set to TRUE to use Amazon Cognito credentials with this data source. - UseCallerCredentials *bool `locationName:"useCallerCredentials" type:"boolean"` -} - -// String returns the string representation -func (s DynamodbDataSourceConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DynamodbDataSourceConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DynamodbDataSourceConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DynamodbDataSourceConfig"} - if s.AwsRegion == nil { - invalidParams.Add(request.NewErrParamRequired("AwsRegion")) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAwsRegion sets the AwsRegion field's value. -func (s *DynamodbDataSourceConfig) SetAwsRegion(v string) *DynamodbDataSourceConfig { - s.AwsRegion = &v - return s -} - -// SetTableName sets the TableName field's value. -func (s *DynamodbDataSourceConfig) SetTableName(v string) *DynamodbDataSourceConfig { - s.TableName = &v - return s -} - -// SetUseCallerCredentials sets the UseCallerCredentials field's value. -func (s *DynamodbDataSourceConfig) SetUseCallerCredentials(v bool) *DynamodbDataSourceConfig { - s.UseCallerCredentials = &v - return s -} - -// Describes an Elasticsearch data source configuration. -type ElasticsearchDataSourceConfig struct { - _ struct{} `type:"structure"` - - // The AWS Region. - // - // AwsRegion is a required field - AwsRegion *string `locationName:"awsRegion" type:"string" required:"true"` - - // The endpoint. - // - // Endpoint is a required field - Endpoint *string `locationName:"endpoint" type:"string" required:"true"` -} - -// String returns the string representation -func (s ElasticsearchDataSourceConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticsearchDataSourceConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ElasticsearchDataSourceConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ElasticsearchDataSourceConfig"} - if s.AwsRegion == nil { - invalidParams.Add(request.NewErrParamRequired("AwsRegion")) - } - if s.Endpoint == nil { - invalidParams.Add(request.NewErrParamRequired("Endpoint")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAwsRegion sets the AwsRegion field's value. -func (s *ElasticsearchDataSourceConfig) SetAwsRegion(v string) *ElasticsearchDataSourceConfig { - s.AwsRegion = &v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *ElasticsearchDataSourceConfig) SetEndpoint(v string) *ElasticsearchDataSourceConfig { - s.Endpoint = &v - return s -} - -// A function is a reusable entity. Multiple functions can be used to compose -// the resolver logic. -type FunctionConfiguration struct { - _ struct{} `type:"structure"` - - // The name of the DataSource. - DataSourceName *string `locationName:"dataSourceName" type:"string"` - - // The Function description. - Description *string `locationName:"description" type:"string"` - - // The ARN of the Function object. - FunctionArn *string `locationName:"functionArn" type:"string"` - - // A unique ID representing the Function object. - FunctionId *string `locationName:"functionId" type:"string"` - - // The version of the request mapping template. Currently only the 2018-05-29 - // version of the template is supported. - FunctionVersion *string `locationName:"functionVersion" type:"string"` - - // The name of the Function object. - Name *string `locationName:"name" type:"string"` - - // The Function request mapping template. Functions support only the 2018-05-29 - // version of the request mapping template. - RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string"` - - // The Function response mapping template. - ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` -} - -// 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() -} - -// SetDataSourceName sets the DataSourceName field's value. -func (s *FunctionConfiguration) SetDataSourceName(v string) *FunctionConfiguration { - s.DataSourceName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *FunctionConfiguration) SetDescription(v string) *FunctionConfiguration { - s.Description = &v - return s -} - -// SetFunctionArn sets the FunctionArn field's value. -func (s *FunctionConfiguration) SetFunctionArn(v string) *FunctionConfiguration { - s.FunctionArn = &v - return s -} - -// SetFunctionId sets the FunctionId field's value. -func (s *FunctionConfiguration) SetFunctionId(v string) *FunctionConfiguration { - s.FunctionId = &v - return s -} - -// SetFunctionVersion sets the FunctionVersion field's value. -func (s *FunctionConfiguration) SetFunctionVersion(v string) *FunctionConfiguration { - s.FunctionVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *FunctionConfiguration) SetName(v string) *FunctionConfiguration { - s.Name = &v - return s -} - -// SetRequestMappingTemplate sets the RequestMappingTemplate field's value. -func (s *FunctionConfiguration) SetRequestMappingTemplate(v string) *FunctionConfiguration { - s.RequestMappingTemplate = &v - return s -} - -// SetResponseMappingTemplate sets the ResponseMappingTemplate field's value. -func (s *FunctionConfiguration) SetResponseMappingTemplate(v string) *FunctionConfiguration { - s.ResponseMappingTemplate = &v - return s -} - -type GetDataSourceInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The name of the data source. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDataSourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDataSourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDataSourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDataSourceInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetDataSourceInput) SetApiId(v string) *GetDataSourceInput { - s.ApiId = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetDataSourceInput) SetName(v string) *GetDataSourceInput { - s.Name = &v - return s -} - -type GetDataSourceOutput struct { - _ struct{} `type:"structure"` - - // The DataSource object. - DataSource *DataSource `locationName:"dataSource" type:"structure"` -} - -// String returns the string representation -func (s GetDataSourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDataSourceOutput) GoString() string { - return s.String() -} - -// SetDataSource sets the DataSource field's value. -func (s *GetDataSourceOutput) SetDataSource(v *DataSource) *GetDataSourceOutput { - s.DataSource = v - return s -} - -type GetFunctionInput struct { - _ struct{} `type:"structure"` - - // The GraphQL API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The Function ID. - // - // FunctionId is a required field - FunctionId *string `location:"uri" locationName:"functionId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFunctionInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.FunctionId == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionId")) - } - if s.FunctionId != nil && len(*s.FunctionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetFunctionInput) SetApiId(v string) *GetFunctionInput { - s.ApiId = &v - return s -} - -// SetFunctionId sets the FunctionId field's value. -func (s *GetFunctionInput) SetFunctionId(v string) *GetFunctionInput { - s.FunctionId = &v - return s -} - -type GetFunctionOutput struct { - _ struct{} `type:"structure"` - - // The Function object. - FunctionConfiguration *FunctionConfiguration `locationName:"functionConfiguration" type:"structure"` -} - -// String returns the string representation -func (s GetFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFunctionOutput) GoString() string { - return s.String() -} - -// SetFunctionConfiguration sets the FunctionConfiguration field's value. -func (s *GetFunctionOutput) SetFunctionConfiguration(v *FunctionConfiguration) *GetFunctionOutput { - s.FunctionConfiguration = v - return s -} - -type GetGraphqlApiInput struct { - _ struct{} `type:"structure"` - - // The API ID for the GraphQL API. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetGraphqlApiInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGraphqlApiInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetGraphqlApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetGraphqlApiInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetGraphqlApiInput) SetApiId(v string) *GetGraphqlApiInput { - s.ApiId = &v - return s -} - -type GetGraphqlApiOutput struct { - _ struct{} `type:"structure"` - - // The GraphqlApi object. - GraphqlApi *GraphqlApi `locationName:"graphqlApi" type:"structure"` -} - -// String returns the string representation -func (s GetGraphqlApiOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGraphqlApiOutput) GoString() string { - return s.String() -} - -// SetGraphqlApi sets the GraphqlApi field's value. -func (s *GetGraphqlApiOutput) SetGraphqlApi(v *GraphqlApi) *GetGraphqlApiOutput { - s.GraphqlApi = v - return s -} - -type GetIntrospectionSchemaInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The schema format: SDL or JSON. - // - // Format is a required field - Format *string `location:"querystring" locationName:"format" type:"string" required:"true" enum:"OutputType"` -} - -// String returns the string representation -func (s GetIntrospectionSchemaInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntrospectionSchemaInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIntrospectionSchemaInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIntrospectionSchemaInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetIntrospectionSchemaInput) SetApiId(v string) *GetIntrospectionSchemaInput { - s.ApiId = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *GetIntrospectionSchemaInput) SetFormat(v string) *GetIntrospectionSchemaInput { - s.Format = &v - return s -} - -type GetIntrospectionSchemaOutput struct { - _ struct{} `type:"structure" payload:"Schema"` - - // The schema, in GraphQL Schema Definition Language (SDL) format. - // - // For more information, see the GraphQL SDL documentation (http://graphql.org/learn/schema/). - Schema []byte `locationName:"schema" type:"blob"` -} - -// String returns the string representation -func (s GetIntrospectionSchemaOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntrospectionSchemaOutput) GoString() string { - return s.String() -} - -// SetSchema sets the Schema field's value. -func (s *GetIntrospectionSchemaOutput) SetSchema(v []byte) *GetIntrospectionSchemaOutput { - s.Schema = v - return s -} - -type GetResolverInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The resolver field name. - // - // FieldName is a required field - FieldName *string `location:"uri" locationName:"fieldName" type:"string" required:"true"` - - // The resolver type name. - // - // TypeName is a required field - TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetResolverInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResolverInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResolverInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResolverInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.FieldName == nil { - invalidParams.Add(request.NewErrParamRequired("FieldName")) - } - if s.FieldName != nil && len(*s.FieldName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FieldName", 1)) - } - if s.TypeName == nil { - invalidParams.Add(request.NewErrParamRequired("TypeName")) - } - if s.TypeName != nil && len(*s.TypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetResolverInput) SetApiId(v string) *GetResolverInput { - s.ApiId = &v - return s -} - -// SetFieldName sets the FieldName field's value. -func (s *GetResolverInput) SetFieldName(v string) *GetResolverInput { - s.FieldName = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *GetResolverInput) SetTypeName(v string) *GetResolverInput { - s.TypeName = &v - return s -} - -type GetResolverOutput struct { - _ struct{} `type:"structure"` - - // The Resolver object. - Resolver *Resolver `locationName:"resolver" type:"structure"` -} - -// String returns the string representation -func (s GetResolverOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResolverOutput) GoString() string { - return s.String() -} - -// SetResolver sets the Resolver field's value. -func (s *GetResolverOutput) SetResolver(v *Resolver) *GetResolverOutput { - s.Resolver = v - return s -} - -type GetSchemaCreationStatusInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSchemaCreationStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSchemaCreationStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSchemaCreationStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSchemaCreationStatusInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetSchemaCreationStatusInput) SetApiId(v string) *GetSchemaCreationStatusInput { - s.ApiId = &v - return s -} - -type GetSchemaCreationStatusOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about the status of the schema creation operation. - Details *string `locationName:"details" type:"string"` - - // The current state of the schema (PROCESSING, ACTIVE, or DELETING). Once the - // schema is in the ACTIVE state, you can add data. - Status *string `locationName:"status" type:"string" enum:"SchemaStatus"` -} - -// String returns the string representation -func (s GetSchemaCreationStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSchemaCreationStatusOutput) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *GetSchemaCreationStatusOutput) SetDetails(v string) *GetSchemaCreationStatusOutput { - s.Details = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetSchemaCreationStatusOutput) SetStatus(v string) *GetSchemaCreationStatusOutput { - s.Status = &v - return s -} - -type GetTypeInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The type format: SDL or JSON. - // - // Format is a required field - Format *string `location:"querystring" locationName:"format" type:"string" required:"true" enum:"TypeDefinitionFormat"` - - // The type name. - // - // TypeName is a required field - TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTypeInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) - } - if s.TypeName == nil { - invalidParams.Add(request.NewErrParamRequired("TypeName")) - } - if s.TypeName != nil && len(*s.TypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *GetTypeInput) SetApiId(v string) *GetTypeInput { - s.ApiId = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *GetTypeInput) SetFormat(v string) *GetTypeInput { - s.Format = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *GetTypeInput) SetTypeName(v string) *GetTypeInput { - s.TypeName = &v - return s -} - -type GetTypeOutput struct { - _ struct{} `type:"structure"` - - // The Type object. - Type *Type `locationName:"type" type:"structure"` -} - -// String returns the string representation -func (s GetTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTypeOutput) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *GetTypeOutput) SetType(v *Type) *GetTypeOutput { - s.Type = v - return s -} - -// Describes a GraphQL API. -type GraphqlApi struct { - _ struct{} `type:"structure"` - - // The API ID. - ApiId *string `locationName:"apiId" type:"string"` - - // The ARN. - Arn *string `locationName:"arn" type:"string"` - - // The authentication type. - AuthenticationType *string `locationName:"authenticationType" type:"string" enum:"AuthenticationType"` - - // The Amazon CloudWatch Logs configuration. - LogConfig *LogConfig `locationName:"logConfig" type:"structure"` - - // The API name. - Name *string `locationName:"name" type:"string"` - - // The OpenID Connect configuration. - OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"` - - // The URIs. - Uris map[string]*string `locationName:"uris" type:"map"` - - // The Amazon Cognito user pool configuration. - UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` -} - -// String returns the string representation -func (s GraphqlApi) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GraphqlApi) GoString() string { - return s.String() -} - -// SetApiId sets the ApiId field's value. -func (s *GraphqlApi) SetApiId(v string) *GraphqlApi { - s.ApiId = &v - return s -} - -// SetArn sets the Arn field's value. -func (s *GraphqlApi) SetArn(v string) *GraphqlApi { - s.Arn = &v - return s -} - -// SetAuthenticationType sets the AuthenticationType field's value. -func (s *GraphqlApi) SetAuthenticationType(v string) *GraphqlApi { - s.AuthenticationType = &v - return s -} - -// SetLogConfig sets the LogConfig field's value. -func (s *GraphqlApi) SetLogConfig(v *LogConfig) *GraphqlApi { - s.LogConfig = v - return s -} - -// SetName sets the Name field's value. -func (s *GraphqlApi) SetName(v string) *GraphqlApi { - s.Name = &v - return s -} - -// SetOpenIDConnectConfig sets the OpenIDConnectConfig field's value. -func (s *GraphqlApi) SetOpenIDConnectConfig(v *OpenIDConnectConfig) *GraphqlApi { - s.OpenIDConnectConfig = v - return s -} - -// SetUris sets the Uris field's value. -func (s *GraphqlApi) SetUris(v map[string]*string) *GraphqlApi { - s.Uris = v - return s -} - -// SetUserPoolConfig sets the UserPoolConfig field's value. -func (s *GraphqlApi) SetUserPoolConfig(v *UserPoolConfig) *GraphqlApi { - s.UserPoolConfig = v - return s -} - -// Describes an HTTP data source configuration. -type HttpDataSourceConfig struct { - _ struct{} `type:"structure"` - - // The authorization config in case the HTTP endpoint requires authorization. - AuthorizationConfig *AuthorizationConfig `locationName:"authorizationConfig" type:"structure"` - - // The HTTP URL endpoint. You can either specify the domain name or IP, and - // port combination, and the URL scheme must be HTTP or HTTPS. If the port is - // not specified, AWS AppSync uses the default port 80 for the HTTP endpoint - // and port 443 for HTTPS endpoints. - Endpoint *string `locationName:"endpoint" type:"string"` -} - -// String returns the string representation -func (s HttpDataSourceConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HttpDataSourceConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HttpDataSourceConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HttpDataSourceConfig"} - if s.AuthorizationConfig != nil { - if err := s.AuthorizationConfig.Validate(); err != nil { - invalidParams.AddNested("AuthorizationConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthorizationConfig sets the AuthorizationConfig field's value. -func (s *HttpDataSourceConfig) SetAuthorizationConfig(v *AuthorizationConfig) *HttpDataSourceConfig { - s.AuthorizationConfig = v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *HttpDataSourceConfig) SetEndpoint(v string) *HttpDataSourceConfig { - s.Endpoint = &v - return s -} - -// Describes an AWS Lambda data source configuration. -type LambdaDataSourceConfig struct { - _ struct{} `type:"structure"` - - // The ARN for the Lambda function. - // - // LambdaFunctionArn is a required field - LambdaFunctionArn *string `locationName:"lambdaFunctionArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s LambdaDataSourceConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaDataSourceConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LambdaDataSourceConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LambdaDataSourceConfig"} - if s.LambdaFunctionArn == nil { - invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLambdaFunctionArn sets the LambdaFunctionArn field's value. -func (s *LambdaDataSourceConfig) SetLambdaFunctionArn(v string) *LambdaDataSourceConfig { - s.LambdaFunctionArn = &v - return s -} - -type ListApiKeysInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The maximum number of results you want the request to return. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListApiKeysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListApiKeysInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListApiKeysInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListApiKeysInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *ListApiKeysInput) SetApiId(v string) *ListApiKeysInput { - s.ApiId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListApiKeysInput) SetMaxResults(v int64) *ListApiKeysInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListApiKeysInput) SetNextToken(v string) *ListApiKeysInput { - s.NextToken = &v - return s -} - -type ListApiKeysOutput struct { - _ struct{} `type:"structure"` - - // The ApiKey objects. - ApiKeys []*ApiKey `locationName:"apiKeys" type:"list"` - - // An identifier to be passed in the next request to this operation to return - // the next set of items in the list. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListApiKeysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListApiKeysOutput) GoString() string { - return s.String() -} - -// SetApiKeys sets the ApiKeys field's value. -func (s *ListApiKeysOutput) SetApiKeys(v []*ApiKey) *ListApiKeysOutput { - s.ApiKeys = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListApiKeysOutput) SetNextToken(v string) *ListApiKeysOutput { - s.NextToken = &v - return s -} - -type ListDataSourcesInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The maximum number of results you want the request to return. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListDataSourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDataSourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDataSourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDataSourcesInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *ListDataSourcesInput) SetApiId(v string) *ListDataSourcesInput { - s.ApiId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListDataSourcesInput) SetMaxResults(v int64) *ListDataSourcesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDataSourcesInput) SetNextToken(v string) *ListDataSourcesInput { - s.NextToken = &v - return s -} - -type ListDataSourcesOutput struct { - _ struct{} `type:"structure"` - - // The DataSource objects. - DataSources []*DataSource `locationName:"dataSources" type:"list"` - - // An identifier to be passed in the next request to this operation to return - // the next set of items in the list. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListDataSourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDataSourcesOutput) GoString() string { - return s.String() -} - -// SetDataSources sets the DataSources field's value. -func (s *ListDataSourcesOutput) SetDataSources(v []*DataSource) *ListDataSourcesOutput { - s.DataSources = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDataSourcesOutput) SetNextToken(v string) *ListDataSourcesOutput { - s.NextToken = &v - return s -} - -type ListFunctionsInput struct { - _ struct{} `type:"structure"` - - // The GraphQL API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The maximum number of results you want the request to return. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListFunctionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFunctionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListFunctionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListFunctionsInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *ListFunctionsInput) SetApiId(v string) *ListFunctionsInput { - s.ApiId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListFunctionsInput) SetMaxResults(v int64) *ListFunctionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListFunctionsInput) SetNextToken(v string) *ListFunctionsInput { - s.NextToken = &v - return s -} - -type ListFunctionsOutput struct { - _ struct{} `type:"structure"` - - // A list of Function objects. - Functions []*FunctionConfiguration `locationName:"functions" type:"list"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListFunctionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFunctionsOutput) GoString() string { - return s.String() -} - -// SetFunctions sets the Functions field's value. -func (s *ListFunctionsOutput) SetFunctions(v []*FunctionConfiguration) *ListFunctionsOutput { - s.Functions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListFunctionsOutput) SetNextToken(v string) *ListFunctionsOutput { - s.NextToken = &v - return s -} - -type ListGraphqlApisInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results you want the request to return. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListGraphqlApisInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListGraphqlApisInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListGraphqlApisInput) SetMaxResults(v int64) *ListGraphqlApisInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListGraphqlApisInput) SetNextToken(v string) *ListGraphqlApisInput { - s.NextToken = &v - return s -} - -type ListGraphqlApisOutput struct { - _ struct{} `type:"structure"` - - // The GraphqlApi objects. - GraphqlApis []*GraphqlApi `locationName:"graphqlApis" type:"list"` - - // An identifier to be passed in the next request to this operation to return - // the next set of items in the list. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListGraphqlApisOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListGraphqlApisOutput) GoString() string { - return s.String() -} - -// SetGraphqlApis sets the GraphqlApis field's value. -func (s *ListGraphqlApisOutput) SetGraphqlApis(v []*GraphqlApi) *ListGraphqlApisOutput { - s.GraphqlApis = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListGraphqlApisOutput) SetNextToken(v string) *ListGraphqlApisOutput { - s.NextToken = &v - return s -} - -type ListResolversByFunctionInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The Function ID. - // - // FunctionId is a required field - FunctionId *string `location:"uri" locationName:"functionId" type:"string" required:"true"` - - // The maximum number of results you want the request to return. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which you can use to return the next set of items in the list. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListResolversByFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResolversByFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResolversByFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResolversByFunctionInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.FunctionId == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionId")) - } - if s.FunctionId != nil && len(*s.FunctionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *ListResolversByFunctionInput) SetApiId(v string) *ListResolversByFunctionInput { - s.ApiId = &v - return s -} - -// SetFunctionId sets the FunctionId field's value. -func (s *ListResolversByFunctionInput) SetFunctionId(v string) *ListResolversByFunctionInput { - s.FunctionId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListResolversByFunctionInput) SetMaxResults(v int64) *ListResolversByFunctionInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResolversByFunctionInput) SetNextToken(v string) *ListResolversByFunctionInput { - s.NextToken = &v - return s -} - -type ListResolversByFunctionOutput struct { - _ struct{} `type:"structure"` - - // An identifier that can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" type:"string"` - - // The list of resolvers. - Resolvers []*Resolver `locationName:"resolvers" type:"list"` -} - -// String returns the string representation -func (s ListResolversByFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResolversByFunctionOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResolversByFunctionOutput) SetNextToken(v string) *ListResolversByFunctionOutput { - s.NextToken = &v - return s -} - -// SetResolvers sets the Resolvers field's value. -func (s *ListResolversByFunctionOutput) SetResolvers(v []*Resolver) *ListResolversByFunctionOutput { - s.Resolvers = v - return s -} - -type ListResolversInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The maximum number of results you want the request to return. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The type name. - // - // TypeName is a required field - TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListResolversInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResolversInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResolversInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResolversInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.TypeName == nil { - invalidParams.Add(request.NewErrParamRequired("TypeName")) - } - if s.TypeName != nil && len(*s.TypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *ListResolversInput) SetApiId(v string) *ListResolversInput { - s.ApiId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListResolversInput) SetMaxResults(v int64) *ListResolversInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResolversInput) SetNextToken(v string) *ListResolversInput { - s.NextToken = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *ListResolversInput) SetTypeName(v string) *ListResolversInput { - s.TypeName = &v - return s -} - -type ListResolversOutput struct { - _ struct{} `type:"structure"` - - // An identifier to be passed in the next request to this operation to return - // the next set of items in the list. - NextToken *string `locationName:"nextToken" type:"string"` - - // The Resolver objects. - Resolvers []*Resolver `locationName:"resolvers" type:"list"` -} - -// String returns the string representation -func (s ListResolversOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResolversOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResolversOutput) SetNextToken(v string) *ListResolversOutput { - s.NextToken = &v - return s -} - -// SetResolvers sets the Resolvers field's value. -func (s *ListResolversOutput) SetResolvers(v []*Resolver) *ListResolversOutput { - s.Resolvers = v - return s -} - -type ListTypesInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The type format: SDL or JSON. - // - // Format is a required field - Format *string `location:"querystring" locationName:"format" type:"string" required:"true" enum:"TypeDefinitionFormat"` - - // The maximum number of results you want the request to return. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTypesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTypesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTypesInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *ListTypesInput) SetApiId(v string) *ListTypesInput { - s.ApiId = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *ListTypesInput) SetFormat(v string) *ListTypesInput { - s.Format = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTypesInput) SetMaxResults(v int64) *ListTypesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTypesInput) SetNextToken(v string) *ListTypesInput { - s.NextToken = &v - return s -} - -type ListTypesOutput struct { - _ struct{} `type:"structure"` - - // An identifier to be passed in the next request to this operation to return - // the next set of items in the list. - NextToken *string `locationName:"nextToken" type:"string"` - - // The Type objects. - Types []*Type `locationName:"types" type:"list"` -} - -// String returns the string representation -func (s ListTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTypesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTypesOutput) SetNextToken(v string) *ListTypesOutput { - s.NextToken = &v - return s -} - -// SetTypes sets the Types field's value. -func (s *ListTypesOutput) SetTypes(v []*Type) *ListTypesOutput { - s.Types = v - return s -} - -// The CloudWatch Logs configuration. -type LogConfig struct { - _ struct{} `type:"structure"` - - // The service role that AWS AppSync will assume to publish to Amazon CloudWatch - // logs in your account. - // - // CloudWatchLogsRoleArn is a required field - CloudWatchLogsRoleArn *string `locationName:"cloudWatchLogsRoleArn" type:"string" required:"true"` - - // The field logging level. Values can be NONE, ERROR, or ALL. - // - // * NONE: No field-level logs are captured. - // - // * ERROR: Logs the following information only for the fields that are in - // error: - // - // The error section in the server response. - // - // Field-level errors. - // - // The generated request/response functions that got resolved for error fields. - // - // * ALL: The following information is logged for all fields in the query: - // - // Field-level tracing information. - // - // The generated request/response functions that got resolved for each field. - // - // FieldLogLevel is a required field - FieldLogLevel *string `locationName:"fieldLogLevel" type:"string" required:"true" enum:"FieldLogLevel"` -} - -// String returns the string representation -func (s LogConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LogConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LogConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LogConfig"} - if s.CloudWatchLogsRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("CloudWatchLogsRoleArn")) - } - if s.FieldLogLevel == nil { - invalidParams.Add(request.NewErrParamRequired("FieldLogLevel")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value. -func (s *LogConfig) SetCloudWatchLogsRoleArn(v string) *LogConfig { - s.CloudWatchLogsRoleArn = &v - return s -} - -// SetFieldLogLevel sets the FieldLogLevel field's value. -func (s *LogConfig) SetFieldLogLevel(v string) *LogConfig { - s.FieldLogLevel = &v - return s -} - -// Describes an OpenID Connect configuration. -type OpenIDConnectConfig struct { - _ struct{} `type:"structure"` - - // The number of milliseconds a token is valid after being authenticated. - AuthTTL *int64 `locationName:"authTTL" type:"long"` - - // The client identifier of the Relying party at the OpenID identity provider. - // This identifier is typically obtained when the Relying party is registered - // with the OpenID identity provider. You can specify a regular expression so - // the AWS AppSync can validate against multiple client identifiers at a time. - ClientId *string `locationName:"clientId" type:"string"` - - // The number of milliseconds a token is valid after being issued to a user. - IatTTL *int64 `locationName:"iatTTL" type:"long"` - - // The issuer for the OpenID Connect configuration. The issuer returned by discovery - // must exactly match the value of iss in the ID token. - // - // Issuer is a required field - Issuer *string `locationName:"issuer" type:"string" required:"true"` -} - -// String returns the string representation -func (s OpenIDConnectConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OpenIDConnectConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OpenIDConnectConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OpenIDConnectConfig"} - if s.Issuer == nil { - invalidParams.Add(request.NewErrParamRequired("Issuer")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthTTL sets the AuthTTL field's value. -func (s *OpenIDConnectConfig) SetAuthTTL(v int64) *OpenIDConnectConfig { - s.AuthTTL = &v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *OpenIDConnectConfig) SetClientId(v string) *OpenIDConnectConfig { - s.ClientId = &v - return s -} - -// SetIatTTL sets the IatTTL field's value. -func (s *OpenIDConnectConfig) SetIatTTL(v int64) *OpenIDConnectConfig { - s.IatTTL = &v - return s -} - -// SetIssuer sets the Issuer field's value. -func (s *OpenIDConnectConfig) SetIssuer(v string) *OpenIDConnectConfig { - s.Issuer = &v - return s -} - -// The pipeline configuration for a resolver of kind PIPELINE. -type PipelineConfig struct { - _ struct{} `type:"structure"` - - // A list of Function objects. - Functions []*string `locationName:"functions" type:"list"` -} - -// String returns the string representation -func (s PipelineConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PipelineConfig) GoString() string { - return s.String() -} - -// SetFunctions sets the Functions field's value. -func (s *PipelineConfig) SetFunctions(v []*string) *PipelineConfig { - s.Functions = v - return s -} - -// The Amazon RDS HTTP endpoint configuration. -type RdsHttpEndpointConfig struct { - _ struct{} `type:"structure"` - - // AWS Region for RDS HTTP endpoint. - AwsRegion *string `locationName:"awsRegion" type:"string"` - - // AWS secret store ARN for database credentials. - AwsSecretStoreArn *string `locationName:"awsSecretStoreArn" type:"string"` - - // Logical database name. - DatabaseName *string `locationName:"databaseName" type:"string"` - - // Amazon RDS cluster identifier. - DbClusterIdentifier *string `locationName:"dbClusterIdentifier" type:"string"` - - // Logical schema name. - Schema *string `locationName:"schema" type:"string"` -} - -// String returns the string representation -func (s RdsHttpEndpointConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RdsHttpEndpointConfig) GoString() string { - return s.String() -} - -// SetAwsRegion sets the AwsRegion field's value. -func (s *RdsHttpEndpointConfig) SetAwsRegion(v string) *RdsHttpEndpointConfig { - s.AwsRegion = &v - return s -} - -// SetAwsSecretStoreArn sets the AwsSecretStoreArn field's value. -func (s *RdsHttpEndpointConfig) SetAwsSecretStoreArn(v string) *RdsHttpEndpointConfig { - s.AwsSecretStoreArn = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *RdsHttpEndpointConfig) SetDatabaseName(v string) *RdsHttpEndpointConfig { - s.DatabaseName = &v - return s -} - -// SetDbClusterIdentifier sets the DbClusterIdentifier field's value. -func (s *RdsHttpEndpointConfig) SetDbClusterIdentifier(v string) *RdsHttpEndpointConfig { - s.DbClusterIdentifier = &v - return s -} - -// SetSchema sets the Schema field's value. -func (s *RdsHttpEndpointConfig) SetSchema(v string) *RdsHttpEndpointConfig { - s.Schema = &v - return s -} - -// Describes a relational database data source configuration. -type RelationalDatabaseDataSourceConfig struct { - _ struct{} `type:"structure"` - - // Amazon RDS HTTP endpoint settings. - RdsHttpEndpointConfig *RdsHttpEndpointConfig `locationName:"rdsHttpEndpointConfig" type:"structure"` - - // Source type for the relational database. - // - // * RDS_HTTP_ENDPOINT: The relational database source type is an Amazon - // RDS HTTP endpoint. - RelationalDatabaseSourceType *string `locationName:"relationalDatabaseSourceType" type:"string" enum:"RelationalDatabaseSourceType"` -} - -// String returns the string representation -func (s RelationalDatabaseDataSourceConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RelationalDatabaseDataSourceConfig) GoString() string { - return s.String() -} - -// SetRdsHttpEndpointConfig sets the RdsHttpEndpointConfig field's value. -func (s *RelationalDatabaseDataSourceConfig) SetRdsHttpEndpointConfig(v *RdsHttpEndpointConfig) *RelationalDatabaseDataSourceConfig { - s.RdsHttpEndpointConfig = v - return s -} - -// SetRelationalDatabaseSourceType sets the RelationalDatabaseSourceType field's value. -func (s *RelationalDatabaseDataSourceConfig) SetRelationalDatabaseSourceType(v string) *RelationalDatabaseDataSourceConfig { - s.RelationalDatabaseSourceType = &v - return s -} - -// Describes a resolver. -type Resolver struct { - _ struct{} `type:"structure"` - - // The resolver data source name. - DataSourceName *string `locationName:"dataSourceName" type:"string"` - - // The resolver field name. - FieldName *string `locationName:"fieldName" type:"string"` - - // The resolver type. - // - // * UNIT: A UNIT resolver type. A UNIT resolver is the default resolver - // type. A UNIT resolver enables you to execute a GraphQL query against a - // single data source. - // - // * PIPELINE: A PIPELINE resolver type. A PIPELINE resolver enables you - // to execute a series of Function in a serial manner. You can use a pipeline - // resolver to execute a GraphQL query against multiple data sources. - Kind *string `locationName:"kind" type:"string" enum:"ResolverKind"` - - // The PipelineConfig. - PipelineConfig *PipelineConfig `locationName:"pipelineConfig" type:"structure"` - - // The request mapping template. - RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string"` - - // The resolver ARN. - ResolverArn *string `locationName:"resolverArn" type:"string"` - - // The response mapping template. - ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` - - // The resolver type name. - TypeName *string `locationName:"typeName" type:"string"` -} - -// String returns the string representation -func (s Resolver) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Resolver) GoString() string { - return s.String() -} - -// SetDataSourceName sets the DataSourceName field's value. -func (s *Resolver) SetDataSourceName(v string) *Resolver { - s.DataSourceName = &v - return s -} - -// SetFieldName sets the FieldName field's value. -func (s *Resolver) SetFieldName(v string) *Resolver { - s.FieldName = &v - return s -} - -// SetKind sets the Kind field's value. -func (s *Resolver) SetKind(v string) *Resolver { - s.Kind = &v - return s -} - -// SetPipelineConfig sets the PipelineConfig field's value. -func (s *Resolver) SetPipelineConfig(v *PipelineConfig) *Resolver { - s.PipelineConfig = v - return s -} - -// SetRequestMappingTemplate sets the RequestMappingTemplate field's value. -func (s *Resolver) SetRequestMappingTemplate(v string) *Resolver { - s.RequestMappingTemplate = &v - return s -} - -// SetResolverArn sets the ResolverArn field's value. -func (s *Resolver) SetResolverArn(v string) *Resolver { - s.ResolverArn = &v - return s -} - -// SetResponseMappingTemplate sets the ResponseMappingTemplate field's value. -func (s *Resolver) SetResponseMappingTemplate(v string) *Resolver { - s.ResponseMappingTemplate = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *Resolver) SetTypeName(v string) *Resolver { - s.TypeName = &v - return s -} - -type StartSchemaCreationInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The schema definition, in GraphQL schema language format. - // - // Definition is automatically base64 encoded/decoded by the SDK. - // - // Definition is a required field - Definition []byte `locationName:"definition" type:"blob" required:"true"` -} - -// String returns the string representation -func (s StartSchemaCreationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartSchemaCreationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartSchemaCreationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartSchemaCreationInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.Definition == nil { - invalidParams.Add(request.NewErrParamRequired("Definition")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *StartSchemaCreationInput) SetApiId(v string) *StartSchemaCreationInput { - s.ApiId = &v - return s -} - -// SetDefinition sets the Definition field's value. -func (s *StartSchemaCreationInput) SetDefinition(v []byte) *StartSchemaCreationInput { - s.Definition = v - return s -} - -type StartSchemaCreationOutput struct { - _ struct{} `type:"structure"` - - // The current state of the schema (PROCESSING, ACTIVE, or DELETING). When the - // schema is in the ACTIVE state, you can add data. - Status *string `locationName:"status" type:"string" enum:"SchemaStatus"` -} - -// String returns the string representation -func (s StartSchemaCreationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartSchemaCreationOutput) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *StartSchemaCreationOutput) SetStatus(v string) *StartSchemaCreationOutput { - s.Status = &v - return s -} - -// Describes a type. -type Type struct { - _ struct{} `type:"structure"` - - // The type ARN. - Arn *string `locationName:"arn" type:"string"` - - // The type definition. - Definition *string `locationName:"definition" type:"string"` - - // The type description. - Description *string `locationName:"description" type:"string"` - - // The type format: SDL or JSON. - Format *string `locationName:"format" type:"string" enum:"TypeDefinitionFormat"` - - // The type name. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s Type) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Type) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Type) SetArn(v string) *Type { - s.Arn = &v - return s -} - -// SetDefinition sets the Definition field's value. -func (s *Type) SetDefinition(v string) *Type { - s.Definition = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Type) SetDescription(v string) *Type { - s.Description = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *Type) SetFormat(v string) *Type { - s.Format = &v - return s -} - -// SetName sets the Name field's value. -func (s *Type) SetName(v string) *Type { - s.Name = &v - return s -} - -type UpdateApiKeyInput struct { - _ struct{} `type:"structure"` - - // The ID for the GraphQL API. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // A description of the purpose of the API key. - Description *string `locationName:"description" type:"string"` - - // The time from update time after which the API key expires. The date is represented - // as seconds since the epoch. For more information, see . - Expires *int64 `locationName:"expires" type:"long"` - - // The API key ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateApiKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApiKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApiKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApiKeyInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateApiKeyInput) SetApiId(v string) *UpdateApiKeyInput { - s.ApiId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateApiKeyInput) SetDescription(v string) *UpdateApiKeyInput { - s.Description = &v - return s -} - -// SetExpires sets the Expires field's value. -func (s *UpdateApiKeyInput) SetExpires(v int64) *UpdateApiKeyInput { - s.Expires = &v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateApiKeyInput) SetId(v string) *UpdateApiKeyInput { - s.Id = &v - return s -} - -type UpdateApiKeyOutput struct { - _ struct{} `type:"structure"` - - // The API key. - ApiKey *ApiKey `locationName:"apiKey" type:"structure"` -} - -// String returns the string representation -func (s UpdateApiKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApiKeyOutput) GoString() string { - return s.String() -} - -// SetApiKey sets the ApiKey field's value. -func (s *UpdateApiKeyOutput) SetApiKey(v *ApiKey) *UpdateApiKeyOutput { - s.ApiKey = v - return s -} - -type UpdateDataSourceInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The new description for the data source. - Description *string `locationName:"description" type:"string"` - - // The new Amazon DynamoDB configuration. - DynamodbConfig *DynamodbDataSourceConfig `locationName:"dynamodbConfig" type:"structure"` - - // The new Elasticsearch Service configuration. - ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` - - // The new HTTP endpoint configuration. - HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"` - - // The new AWS Lambda configuration. - LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"` - - // The new name for the data source. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` - - // The new relational database configuration. - RelationalDatabaseConfig *RelationalDatabaseDataSourceConfig `locationName:"relationalDatabaseConfig" type:"structure"` - - // The new service role ARN for the data source. - ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"` - - // The new data source type. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"DataSourceType"` -} - -// String returns the string representation -func (s UpdateDataSourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDataSourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDataSourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDataSourceInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.DynamodbConfig != nil { - if err := s.DynamodbConfig.Validate(); err != nil { - invalidParams.AddNested("DynamodbConfig", err.(request.ErrInvalidParams)) - } - } - if s.ElasticsearchConfig != nil { - if err := s.ElasticsearchConfig.Validate(); err != nil { - invalidParams.AddNested("ElasticsearchConfig", err.(request.ErrInvalidParams)) - } - } - if s.HttpConfig != nil { - if err := s.HttpConfig.Validate(); err != nil { - invalidParams.AddNested("HttpConfig", err.(request.ErrInvalidParams)) - } - } - if s.LambdaConfig != nil { - if err := s.LambdaConfig.Validate(); err != nil { - invalidParams.AddNested("LambdaConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateDataSourceInput) SetApiId(v string) *UpdateDataSourceInput { - s.ApiId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateDataSourceInput) SetDescription(v string) *UpdateDataSourceInput { - s.Description = &v - return s -} - -// SetDynamodbConfig sets the DynamodbConfig field's value. -func (s *UpdateDataSourceInput) SetDynamodbConfig(v *DynamodbDataSourceConfig) *UpdateDataSourceInput { - s.DynamodbConfig = v - return s -} - -// SetElasticsearchConfig sets the ElasticsearchConfig field's value. -func (s *UpdateDataSourceInput) SetElasticsearchConfig(v *ElasticsearchDataSourceConfig) *UpdateDataSourceInput { - s.ElasticsearchConfig = v - return s -} - -// SetHttpConfig sets the HttpConfig field's value. -func (s *UpdateDataSourceInput) SetHttpConfig(v *HttpDataSourceConfig) *UpdateDataSourceInput { - s.HttpConfig = v - return s -} - -// SetLambdaConfig sets the LambdaConfig field's value. -func (s *UpdateDataSourceInput) SetLambdaConfig(v *LambdaDataSourceConfig) *UpdateDataSourceInput { - s.LambdaConfig = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateDataSourceInput) SetName(v string) *UpdateDataSourceInput { - s.Name = &v - return s -} - -// SetRelationalDatabaseConfig sets the RelationalDatabaseConfig field's value. -func (s *UpdateDataSourceInput) SetRelationalDatabaseConfig(v *RelationalDatabaseDataSourceConfig) *UpdateDataSourceInput { - s.RelationalDatabaseConfig = v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *UpdateDataSourceInput) SetServiceRoleArn(v string) *UpdateDataSourceInput { - s.ServiceRoleArn = &v - return s -} - -// SetType sets the Type field's value. -func (s *UpdateDataSourceInput) SetType(v string) *UpdateDataSourceInput { - s.Type = &v - return s -} - -type UpdateDataSourceOutput struct { - _ struct{} `type:"structure"` - - // The updated DataSource object. - DataSource *DataSource `locationName:"dataSource" type:"structure"` -} - -// String returns the string representation -func (s UpdateDataSourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDataSourceOutput) GoString() string { - return s.String() -} - -// SetDataSource sets the DataSource field's value. -func (s *UpdateDataSourceOutput) SetDataSource(v *DataSource) *UpdateDataSourceOutput { - s.DataSource = v - return s -} - -type UpdateFunctionInput struct { - _ struct{} `type:"structure"` - - // The GraphQL API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The FunctionDataSource name. - // - // DataSourceName is a required field - DataSourceName *string `locationName:"dataSourceName" type:"string" required:"true"` - - // The Function description. - Description *string `locationName:"description" type:"string"` - - // The function ID. - // - // FunctionId is a required field - FunctionId *string `location:"uri" locationName:"functionId" type:"string" required:"true"` - - // The version of the request mapping template. Currently the supported value - // is 2018-05-29. - // - // FunctionVersion is a required field - FunctionVersion *string `locationName:"functionVersion" type:"string" required:"true"` - - // The Function name. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The Function request mapping template. Functions support only the 2018-05-29 - // version of the request mapping template. - // - // RequestMappingTemplate is a required field - RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string" required:"true"` - - // The Function request mapping template. - ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.DataSourceName == nil { - invalidParams.Add(request.NewErrParamRequired("DataSourceName")) - } - if s.FunctionId == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionId")) - } - if s.FunctionId != nil && len(*s.FunctionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionId", 1)) - } - if s.FunctionVersion == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionVersion")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.RequestMappingTemplate == nil { - invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate")) - } - if s.RequestMappingTemplate != nil && len(*s.RequestMappingTemplate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RequestMappingTemplate", 1)) - } - if s.ResponseMappingTemplate != nil && len(*s.ResponseMappingTemplate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResponseMappingTemplate", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateFunctionInput) SetApiId(v string) *UpdateFunctionInput { - s.ApiId = &v - return s -} - -// SetDataSourceName sets the DataSourceName field's value. -func (s *UpdateFunctionInput) SetDataSourceName(v string) *UpdateFunctionInput { - s.DataSourceName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateFunctionInput) SetDescription(v string) *UpdateFunctionInput { - s.Description = &v - return s -} - -// SetFunctionId sets the FunctionId field's value. -func (s *UpdateFunctionInput) SetFunctionId(v string) *UpdateFunctionInput { - s.FunctionId = &v - return s -} - -// SetFunctionVersion sets the FunctionVersion field's value. -func (s *UpdateFunctionInput) SetFunctionVersion(v string) *UpdateFunctionInput { - s.FunctionVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateFunctionInput) SetName(v string) *UpdateFunctionInput { - s.Name = &v - return s -} - -// SetRequestMappingTemplate sets the RequestMappingTemplate field's value. -func (s *UpdateFunctionInput) SetRequestMappingTemplate(v string) *UpdateFunctionInput { - s.RequestMappingTemplate = &v - return s -} - -// SetResponseMappingTemplate sets the ResponseMappingTemplate field's value. -func (s *UpdateFunctionInput) SetResponseMappingTemplate(v string) *UpdateFunctionInput { - s.ResponseMappingTemplate = &v - return s -} - -type UpdateFunctionOutput struct { - _ struct{} `type:"structure"` - - // The Function object. - FunctionConfiguration *FunctionConfiguration `locationName:"functionConfiguration" type:"structure"` -} - -// String returns the string representation -func (s UpdateFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFunctionOutput) GoString() string { - return s.String() -} - -// SetFunctionConfiguration sets the FunctionConfiguration field's value. -func (s *UpdateFunctionOutput) SetFunctionConfiguration(v *FunctionConfiguration) *UpdateFunctionOutput { - s.FunctionConfiguration = v - return s -} - -type UpdateGraphqlApiInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The new authentication type for the GraphqlApi object. - AuthenticationType *string `locationName:"authenticationType" type:"string" enum:"AuthenticationType"` - - // The Amazon CloudWatch Logs configuration for the GraphqlApi object. - LogConfig *LogConfig `locationName:"logConfig" type:"structure"` - - // The new name for the GraphqlApi object. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The OpenID Connect configuration for the GraphqlApi object. - OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"` - - // The new Amazon Cognito user pool configuration for the GraphqlApi object. - UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` -} - -// String returns the string representation -func (s UpdateGraphqlApiInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGraphqlApiInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateGraphqlApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateGraphqlApiInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.LogConfig != nil { - if err := s.LogConfig.Validate(); err != nil { - invalidParams.AddNested("LogConfig", err.(request.ErrInvalidParams)) - } - } - if s.OpenIDConnectConfig != nil { - if err := s.OpenIDConnectConfig.Validate(); err != nil { - invalidParams.AddNested("OpenIDConnectConfig", err.(request.ErrInvalidParams)) - } - } - if s.UserPoolConfig != nil { - if err := s.UserPoolConfig.Validate(); err != nil { - invalidParams.AddNested("UserPoolConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateGraphqlApiInput) SetApiId(v string) *UpdateGraphqlApiInput { - s.ApiId = &v - return s -} - -// SetAuthenticationType sets the AuthenticationType field's value. -func (s *UpdateGraphqlApiInput) SetAuthenticationType(v string) *UpdateGraphqlApiInput { - s.AuthenticationType = &v - return s -} - -// SetLogConfig sets the LogConfig field's value. -func (s *UpdateGraphqlApiInput) SetLogConfig(v *LogConfig) *UpdateGraphqlApiInput { - s.LogConfig = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateGraphqlApiInput) SetName(v string) *UpdateGraphqlApiInput { - s.Name = &v - return s -} - -// SetOpenIDConnectConfig sets the OpenIDConnectConfig field's value. -func (s *UpdateGraphqlApiInput) SetOpenIDConnectConfig(v *OpenIDConnectConfig) *UpdateGraphqlApiInput { - s.OpenIDConnectConfig = v - return s -} - -// SetUserPoolConfig sets the UserPoolConfig field's value. -func (s *UpdateGraphqlApiInput) SetUserPoolConfig(v *UserPoolConfig) *UpdateGraphqlApiInput { - s.UserPoolConfig = v - return s -} - -type UpdateGraphqlApiOutput struct { - _ struct{} `type:"structure"` - - // The updated GraphqlApi object. - GraphqlApi *GraphqlApi `locationName:"graphqlApi" type:"structure"` -} - -// String returns the string representation -func (s UpdateGraphqlApiOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGraphqlApiOutput) GoString() string { - return s.String() -} - -// SetGraphqlApi sets the GraphqlApi field's value. -func (s *UpdateGraphqlApiOutput) SetGraphqlApi(v *GraphqlApi) *UpdateGraphqlApiOutput { - s.GraphqlApi = v - return s -} - -type UpdateResolverInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The new data source name. - DataSourceName *string `locationName:"dataSourceName" type:"string"` - - // The new field name. - // - // FieldName is a required field - FieldName *string `location:"uri" locationName:"fieldName" type:"string" required:"true"` - - // The resolver type. - // - // * UNIT: A UNIT resolver type. A UNIT resolver is the default resolver - // type. A UNIT resolver enables you to execute a GraphQL query against a - // single data source. - // - // * PIPELINE: A PIPELINE resolver type. A PIPELINE resolver enables you - // to execute a series of Function in a serial manner. You can use a pipeline - // resolver to execute a GraphQL query against multiple data sources. - Kind *string `locationName:"kind" type:"string" enum:"ResolverKind"` - - // The PipelineConfig. - PipelineConfig *PipelineConfig `locationName:"pipelineConfig" type:"structure"` - - // The new request mapping template. - // - // RequestMappingTemplate is a required field - RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string" required:"true"` - - // The new response mapping template. - ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` - - // The new type name. - // - // TypeName is a required field - TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateResolverInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateResolverInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateResolverInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateResolverInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.FieldName == nil { - invalidParams.Add(request.NewErrParamRequired("FieldName")) - } - if s.FieldName != nil && len(*s.FieldName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FieldName", 1)) - } - if s.RequestMappingTemplate == nil { - invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate")) - } - if s.RequestMappingTemplate != nil && len(*s.RequestMappingTemplate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RequestMappingTemplate", 1)) - } - if s.ResponseMappingTemplate != nil && len(*s.ResponseMappingTemplate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResponseMappingTemplate", 1)) - } - if s.TypeName == nil { - invalidParams.Add(request.NewErrParamRequired("TypeName")) - } - if s.TypeName != nil && len(*s.TypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateResolverInput) SetApiId(v string) *UpdateResolverInput { - s.ApiId = &v - return s -} - -// SetDataSourceName sets the DataSourceName field's value. -func (s *UpdateResolverInput) SetDataSourceName(v string) *UpdateResolverInput { - s.DataSourceName = &v - return s -} - -// SetFieldName sets the FieldName field's value. -func (s *UpdateResolverInput) SetFieldName(v string) *UpdateResolverInput { - s.FieldName = &v - return s -} - -// SetKind sets the Kind field's value. -func (s *UpdateResolverInput) SetKind(v string) *UpdateResolverInput { - s.Kind = &v - return s -} - -// SetPipelineConfig sets the PipelineConfig field's value. -func (s *UpdateResolverInput) SetPipelineConfig(v *PipelineConfig) *UpdateResolverInput { - s.PipelineConfig = v - return s -} - -// SetRequestMappingTemplate sets the RequestMappingTemplate field's value. -func (s *UpdateResolverInput) SetRequestMappingTemplate(v string) *UpdateResolverInput { - s.RequestMappingTemplate = &v - return s -} - -// SetResponseMappingTemplate sets the ResponseMappingTemplate field's value. -func (s *UpdateResolverInput) SetResponseMappingTemplate(v string) *UpdateResolverInput { - s.ResponseMappingTemplate = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *UpdateResolverInput) SetTypeName(v string) *UpdateResolverInput { - s.TypeName = &v - return s -} - -type UpdateResolverOutput struct { - _ struct{} `type:"structure"` - - // The updated Resolver object. - Resolver *Resolver `locationName:"resolver" type:"structure"` -} - -// String returns the string representation -func (s UpdateResolverOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateResolverOutput) GoString() string { - return s.String() -} - -// SetResolver sets the Resolver field's value. -func (s *UpdateResolverOutput) SetResolver(v *Resolver) *UpdateResolverOutput { - s.Resolver = v - return s -} - -type UpdateTypeInput struct { - _ struct{} `type:"structure"` - - // The API ID. - // - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // The new definition. - Definition *string `locationName:"definition" type:"string"` - - // The new type format: SDL or JSON. - // - // Format is a required field - Format *string `locationName:"format" type:"string" required:"true" enum:"TypeDefinitionFormat"` - - // The new type name. - // - // TypeName is a required field - TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateTypeInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) - } - if s.TypeName == nil { - invalidParams.Add(request.NewErrParamRequired("TypeName")) - } - if s.TypeName != nil && len(*s.TypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApiId sets the ApiId field's value. -func (s *UpdateTypeInput) SetApiId(v string) *UpdateTypeInput { - s.ApiId = &v - return s -} - -// SetDefinition sets the Definition field's value. -func (s *UpdateTypeInput) SetDefinition(v string) *UpdateTypeInput { - s.Definition = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *UpdateTypeInput) SetFormat(v string) *UpdateTypeInput { - s.Format = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *UpdateTypeInput) SetTypeName(v string) *UpdateTypeInput { - s.TypeName = &v - return s -} - -type UpdateTypeOutput struct { - _ struct{} `type:"structure"` - - // The updated Type object. - Type *Type `locationName:"type" type:"structure"` -} - -// String returns the string representation -func (s UpdateTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTypeOutput) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *UpdateTypeOutput) SetType(v *Type) *UpdateTypeOutput { - s.Type = v - return s -} - -// Describes an Amazon Cognito user pool configuration. -type UserPoolConfig struct { - _ struct{} `type:"structure"` - - // A regular expression for validating the incoming Amazon Cognito user pool - // app client ID. - AppIdClientRegex *string `locationName:"appIdClientRegex" type:"string"` - - // The AWS Region in which the user pool was created. - // - // AwsRegion is a required field - AwsRegion *string `locationName:"awsRegion" type:"string" required:"true"` - - // The action that you want your GraphQL API to take when a request that uses - // Amazon Cognito user pool authentication doesn't match the Amazon Cognito - // user pool configuration. - // - // DefaultAction is a required field - DefaultAction *string `locationName:"defaultAction" type:"string" required:"true" enum:"DefaultAction"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `locationName:"userPoolId" type:"string" required:"true"` -} - -// String returns the string representation -func (s UserPoolConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserPoolConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UserPoolConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UserPoolConfig"} - if s.AwsRegion == nil { - invalidParams.Add(request.NewErrParamRequired("AwsRegion")) - } - if s.DefaultAction == nil { - invalidParams.Add(request.NewErrParamRequired("DefaultAction")) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAppIdClientRegex sets the AppIdClientRegex field's value. -func (s *UserPoolConfig) SetAppIdClientRegex(v string) *UserPoolConfig { - s.AppIdClientRegex = &v - return s -} - -// SetAwsRegion sets the AwsRegion field's value. -func (s *UserPoolConfig) SetAwsRegion(v string) *UserPoolConfig { - s.AwsRegion = &v - return s -} - -// SetDefaultAction sets the DefaultAction field's value. -func (s *UserPoolConfig) SetDefaultAction(v string) *UserPoolConfig { - s.DefaultAction = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *UserPoolConfig) SetUserPoolId(v string) *UserPoolConfig { - s.UserPoolId = &v - return s -} - -const ( - // AuthenticationTypeApiKey is a AuthenticationType enum value - AuthenticationTypeApiKey = "API_KEY" - - // AuthenticationTypeAwsIam is a AuthenticationType enum value - AuthenticationTypeAwsIam = "AWS_IAM" - - // AuthenticationTypeAmazonCognitoUserPools is a AuthenticationType enum value - AuthenticationTypeAmazonCognitoUserPools = "AMAZON_COGNITO_USER_POOLS" - - // AuthenticationTypeOpenidConnect is a AuthenticationType enum value - AuthenticationTypeOpenidConnect = "OPENID_CONNECT" -) - -const ( - // AuthorizationTypeAwsIam is a AuthorizationType enum value - AuthorizationTypeAwsIam = "AWS_IAM" -) - -const ( - // DataSourceTypeAwsLambda is a DataSourceType enum value - DataSourceTypeAwsLambda = "AWS_LAMBDA" - - // DataSourceTypeAmazonDynamodb is a DataSourceType enum value - DataSourceTypeAmazonDynamodb = "AMAZON_DYNAMODB" - - // DataSourceTypeAmazonElasticsearch is a DataSourceType enum value - DataSourceTypeAmazonElasticsearch = "AMAZON_ELASTICSEARCH" - - // DataSourceTypeNone is a DataSourceType enum value - DataSourceTypeNone = "NONE" - - // DataSourceTypeHttp is a DataSourceType enum value - DataSourceTypeHttp = "HTTP" - - // DataSourceTypeRelationalDatabase is a DataSourceType enum value - DataSourceTypeRelationalDatabase = "RELATIONAL_DATABASE" -) - -const ( - // DefaultActionAllow is a DefaultAction enum value - DefaultActionAllow = "ALLOW" - - // DefaultActionDeny is a DefaultAction enum value - DefaultActionDeny = "DENY" -) - -const ( - // FieldLogLevelNone is a FieldLogLevel enum value - FieldLogLevelNone = "NONE" - - // FieldLogLevelError is a FieldLogLevel enum value - FieldLogLevelError = "ERROR" - - // FieldLogLevelAll is a FieldLogLevel enum value - FieldLogLevelAll = "ALL" -) - -const ( - // OutputTypeSdl is a OutputType enum value - OutputTypeSdl = "SDL" - - // OutputTypeJson is a OutputType enum value - OutputTypeJson = "JSON" -) - -const ( - // RelationalDatabaseSourceTypeRdsHttpEndpoint is a RelationalDatabaseSourceType enum value - RelationalDatabaseSourceTypeRdsHttpEndpoint = "RDS_HTTP_ENDPOINT" -) - -const ( - // ResolverKindUnit is a ResolverKind enum value - ResolverKindUnit = "UNIT" - - // ResolverKindPipeline is a ResolverKind enum value - ResolverKindPipeline = "PIPELINE" -) - -const ( - // SchemaStatusProcessing is a SchemaStatus enum value - SchemaStatusProcessing = "PROCESSING" - - // SchemaStatusActive is a SchemaStatus enum value - SchemaStatusActive = "ACTIVE" - - // SchemaStatusDeleting is a SchemaStatus enum value - SchemaStatusDeleting = "DELETING" -) - -const ( - // TypeDefinitionFormatSdl is a TypeDefinitionFormat enum value - TypeDefinitionFormatSdl = "SDL" - - // TypeDefinitionFormatJson is a TypeDefinitionFormat enum value - TypeDefinitionFormatJson = "JSON" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/doc.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/doc.go deleted file mode 100644 index 2b6bd3907..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/doc.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package appsync provides the client and types for making API -// requests to AWS AppSync. -// -// AWS AppSync provides API actions for creating and interacting with data sources -// using GraphQL from your application. -// -// See https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25 for more information on this service. -// -// See appsync package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/appsync/ -// -// Using the Client -// -// To contact AWS AppSync 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 AppSync client AppSync for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/appsync/#New -package appsync diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go deleted file mode 100644 index ac32f85d4..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package appsync - -const ( - - // ErrCodeApiKeyLimitExceededException for service response error code - // "ApiKeyLimitExceededException". - // - // The API key exceeded a limit. Try your request again. - ErrCodeApiKeyLimitExceededException = "ApiKeyLimitExceededException" - - // ErrCodeApiKeyValidityOutOfBoundsException for service response error code - // "ApiKeyValidityOutOfBoundsException". - // - // The API key expiration must be set to a value between 1 and 365 days from - // creation (for CreateApiKey) or from update (for UpdateApiKey). - ErrCodeApiKeyValidityOutOfBoundsException = "ApiKeyValidityOutOfBoundsException" - - // ErrCodeApiLimitExceededException for service response error code - // "ApiLimitExceededException". - // - // The GraphQL API exceeded a limit. Try your request again. - ErrCodeApiLimitExceededException = "ApiLimitExceededException" - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - // - // The request is not well formed. For example, a value is invalid or a required - // field is missing. Check the field values, and then try again. - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeConcurrentModificationException for service response error code - // "ConcurrentModificationException". - // - // Another modification is in progress at this time and it must complete before - // you can make your change. - ErrCodeConcurrentModificationException = "ConcurrentModificationException" - - // ErrCodeGraphQLSchemaException for service response error code - // "GraphQLSchemaException". - // - // The GraphQL schema is not valid. - ErrCodeGraphQLSchemaException = "GraphQLSchemaException" - - // ErrCodeInternalFailureException for service response error code - // "InternalFailureException". - // - // An internal AWS AppSync error occurred. Try your request again. - ErrCodeInternalFailureException = "InternalFailureException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The request exceeded a limit. Try your request again. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // The resource specified in the request was not found. Check the resource, - // and then try again. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeUnauthorizedException for service response error code - // "UnauthorizedException". - // - // You are not authorized to perform this operation. - ErrCodeUnauthorizedException = "UnauthorizedException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go deleted file mode 100644 index e53f6e71b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package appsync - -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" -) - -// AppSync provides the API operation methods for making requests to -// AWS AppSync. See this package's package overview docs -// for details on the service. -// -// AppSync methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type AppSync 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 = "appsync" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "AppSync" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the AppSync client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a AppSync client from just a session. -// svc := appsync.New(mySession) -// -// // Create a AppSync client with additional configuration -// svc := appsync.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *AppSync { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "appsync" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *AppSync { - svc := &AppSync{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-07-25", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a AppSync operation and runs any -// custom request initialization. -func (c *AppSync) 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/athena/api.go b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go deleted file mode 100644 index 77ba49c81..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/api.go +++ /dev/null @@ -1,2713 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package athena - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opBatchGetNamedQuery = "BatchGetNamedQuery" - -// BatchGetNamedQueryRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetNamedQuery operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetNamedQuery for more information on using the BatchGetNamedQuery -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetNamedQueryRequest method. -// req, resp := client.BatchGetNamedQueryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetNamedQuery -func (c *Athena) BatchGetNamedQueryRequest(input *BatchGetNamedQueryInput) (req *request.Request, output *BatchGetNamedQueryOutput) { - op := &request.Operation{ - Name: opBatchGetNamedQuery, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetNamedQueryInput{} - } - - output = &BatchGetNamedQueryOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetNamedQuery API operation for Amazon Athena. -// -// Returns the details of a single named query or a list of up to 50 queries, -// which you provide as an array of query ID strings. Use ListNamedQueries to -// get the list of named query IDs. If information could not be retrieved for -// a submitted query ID, information about the query ID submitted is listed -// under UnprocessedNamedQueryId. Named queries are different from executed -// queries. Use BatchGetQueryExecution to get details about each unique query -// execution, and ListQueryExecutions to get a list of query execution IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Athena's -// API operation BatchGetNamedQuery for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// Indicates a platform issue, which may be due to a transient condition or -// outage. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a required parameter may be missing or out of range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetNamedQuery -func (c *Athena) BatchGetNamedQuery(input *BatchGetNamedQueryInput) (*BatchGetNamedQueryOutput, error) { - req, out := c.BatchGetNamedQueryRequest(input) - return out, req.Send() -} - -// BatchGetNamedQueryWithContext is the same as BatchGetNamedQuery with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetNamedQuery for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Athena) BatchGetNamedQueryWithContext(ctx aws.Context, input *BatchGetNamedQueryInput, opts ...request.Option) (*BatchGetNamedQueryOutput, error) { - req, out := c.BatchGetNamedQueryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchGetQueryExecution = "BatchGetQueryExecution" - -// BatchGetQueryExecutionRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetQueryExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetQueryExecution for more information on using the BatchGetQueryExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetQueryExecutionRequest method. -// req, resp := client.BatchGetQueryExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetQueryExecution -func (c *Athena) BatchGetQueryExecutionRequest(input *BatchGetQueryExecutionInput) (req *request.Request, output *BatchGetQueryExecutionOutput) { - op := &request.Operation{ - Name: opBatchGetQueryExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetQueryExecutionInput{} - } - - output = &BatchGetQueryExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetQueryExecution API operation for Amazon Athena. -// -// Returns the details of a single query execution or a list of up to 50 query -// executions, which you provide as an array of query execution ID strings. -// To get a list of query execution IDs, use ListQueryExecutions. Query executions -// are different from named (saved) queries. Use BatchGetNamedQuery to get details -// about named queries. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Athena's -// API operation BatchGetQueryExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// Indicates a platform issue, which may be due to a transient condition or -// outage. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a required parameter may be missing or out of range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetQueryExecution -func (c *Athena) BatchGetQueryExecution(input *BatchGetQueryExecutionInput) (*BatchGetQueryExecutionOutput, error) { - req, out := c.BatchGetQueryExecutionRequest(input) - return out, req.Send() -} - -// BatchGetQueryExecutionWithContext is the same as BatchGetQueryExecution with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetQueryExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Athena) BatchGetQueryExecutionWithContext(ctx aws.Context, input *BatchGetQueryExecutionInput, opts ...request.Option) (*BatchGetQueryExecutionOutput, error) { - req, out := c.BatchGetQueryExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateNamedQuery = "CreateNamedQuery" - -// CreateNamedQueryRequest generates a "aws/request.Request" representing the -// client's request for the CreateNamedQuery operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateNamedQuery for more information on using the CreateNamedQuery -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateNamedQueryRequest method. -// req, resp := client.CreateNamedQueryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateNamedQuery -func (c *Athena) CreateNamedQueryRequest(input *CreateNamedQueryInput) (req *request.Request, output *CreateNamedQueryOutput) { - op := &request.Operation{ - Name: opCreateNamedQuery, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateNamedQueryInput{} - } - - output = &CreateNamedQueryOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateNamedQuery API operation for Amazon Athena. -// -// Creates a named query. -// -// For code samples using the AWS SDK for Java, see Examples and Code Samples -// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon -// Athena User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Athena's -// API operation CreateNamedQuery for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// Indicates a platform issue, which may be due to a transient condition or -// outage. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a required parameter may be missing or out of range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateNamedQuery -func (c *Athena) CreateNamedQuery(input *CreateNamedQueryInput) (*CreateNamedQueryOutput, error) { - req, out := c.CreateNamedQueryRequest(input) - return out, req.Send() -} - -// CreateNamedQueryWithContext is the same as CreateNamedQuery with the addition of -// the ability to pass a context and additional request options. -// -// See CreateNamedQuery for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Athena) CreateNamedQueryWithContext(ctx aws.Context, input *CreateNamedQueryInput, opts ...request.Option) (*CreateNamedQueryOutput, error) { - req, out := c.CreateNamedQueryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteNamedQuery = "DeleteNamedQuery" - -// DeleteNamedQueryRequest generates a "aws/request.Request" representing the -// client's request for the DeleteNamedQuery operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteNamedQuery for more information on using the DeleteNamedQuery -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteNamedQueryRequest method. -// req, resp := client.DeleteNamedQueryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteNamedQuery -func (c *Athena) DeleteNamedQueryRequest(input *DeleteNamedQueryInput) (req *request.Request, output *DeleteNamedQueryOutput) { - op := &request.Operation{ - Name: opDeleteNamedQuery, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteNamedQueryInput{} - } - - output = &DeleteNamedQueryOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteNamedQuery API operation for Amazon Athena. -// -// Deletes a named query. -// -// For code samples using the AWS SDK for Java, see Examples and Code Samples -// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon -// Athena User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Athena's -// API operation DeleteNamedQuery for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// Indicates a platform issue, which may be due to a transient condition or -// outage. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a required parameter may be missing or out of range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteNamedQuery -func (c *Athena) DeleteNamedQuery(input *DeleteNamedQueryInput) (*DeleteNamedQueryOutput, error) { - req, out := c.DeleteNamedQueryRequest(input) - return out, req.Send() -} - -// DeleteNamedQueryWithContext is the same as DeleteNamedQuery with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteNamedQuery for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Athena) DeleteNamedQueryWithContext(ctx aws.Context, input *DeleteNamedQueryInput, opts ...request.Option) (*DeleteNamedQueryOutput, error) { - req, out := c.DeleteNamedQueryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetNamedQuery = "GetNamedQuery" - -// GetNamedQueryRequest generates a "aws/request.Request" representing the -// client's request for the GetNamedQuery operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetNamedQuery for more information on using the GetNamedQuery -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetNamedQueryRequest method. -// req, resp := client.GetNamedQueryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetNamedQuery -func (c *Athena) GetNamedQueryRequest(input *GetNamedQueryInput) (req *request.Request, output *GetNamedQueryOutput) { - op := &request.Operation{ - Name: opGetNamedQuery, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetNamedQueryInput{} - } - - output = &GetNamedQueryOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetNamedQuery API operation for Amazon Athena. -// -// Returns information about a single query. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Athena's -// API operation GetNamedQuery for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// Indicates a platform issue, which may be due to a transient condition or -// outage. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a required parameter may be missing or out of range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetNamedQuery -func (c *Athena) GetNamedQuery(input *GetNamedQueryInput) (*GetNamedQueryOutput, error) { - req, out := c.GetNamedQueryRequest(input) - return out, req.Send() -} - -// GetNamedQueryWithContext is the same as GetNamedQuery with the addition of -// the ability to pass a context and additional request options. -// -// See GetNamedQuery for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Athena) GetNamedQueryWithContext(ctx aws.Context, input *GetNamedQueryInput, opts ...request.Option) (*GetNamedQueryOutput, error) { - req, out := c.GetNamedQueryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetQueryExecution = "GetQueryExecution" - -// GetQueryExecutionRequest generates a "aws/request.Request" representing the -// client's request for the GetQueryExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetQueryExecution for more information on using the GetQueryExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetQueryExecutionRequest method. -// req, resp := client.GetQueryExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryExecution -func (c *Athena) GetQueryExecutionRequest(input *GetQueryExecutionInput) (req *request.Request, output *GetQueryExecutionOutput) { - op := &request.Operation{ - Name: opGetQueryExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetQueryExecutionInput{} - } - - output = &GetQueryExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetQueryExecution API operation for Amazon Athena. -// -// Returns information about a single execution of a query. Each time a query -// executes, information about the query execution is saved with a unique ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Athena's -// API operation GetQueryExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// Indicates a platform issue, which may be due to a transient condition or -// outage. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a required parameter may be missing or out of range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryExecution -func (c *Athena) GetQueryExecution(input *GetQueryExecutionInput) (*GetQueryExecutionOutput, error) { - req, out := c.GetQueryExecutionRequest(input) - return out, req.Send() -} - -// GetQueryExecutionWithContext is the same as GetQueryExecution with the addition of -// the ability to pass a context and additional request options. -// -// See GetQueryExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Athena) GetQueryExecutionWithContext(ctx aws.Context, input *GetQueryExecutionInput, opts ...request.Option) (*GetQueryExecutionOutput, error) { - req, out := c.GetQueryExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetQueryResults = "GetQueryResults" - -// GetQueryResultsRequest generates a "aws/request.Request" representing the -// client's request for the GetQueryResults operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetQueryResults for more information on using the GetQueryResults -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetQueryResultsRequest method. -// req, resp := client.GetQueryResultsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryResults -func (c *Athena) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) { - op := &request.Operation{ - Name: opGetQueryResults, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetQueryResultsInput{} - } - - output = &GetQueryResultsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetQueryResults API operation for Amazon Athena. -// -// Returns the results of a single query execution specified by QueryExecutionId. -// This request does not execute the query but returns results. Use StartQueryExecution -// to run a query. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Athena's -// API operation GetQueryResults for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// Indicates a platform issue, which may be due to a transient condition or -// outage. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a required parameter may be missing or out of range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryResults -func (c *Athena) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) { - req, out := c.GetQueryResultsRequest(input) - return out, req.Send() -} - -// GetQueryResultsWithContext is the same as GetQueryResults with the addition of -// the ability to pass a context and additional request options. -// -// See GetQueryResults for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Athena) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) { - req, out := c.GetQueryResultsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetQueryResultsPages iterates over the pages of a GetQueryResults operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetQueryResults 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 GetQueryResults operation. -// pageNum := 0 -// err := client.GetQueryResultsPages(params, -// func(page *GetQueryResultsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Athena) GetQueryResultsPages(input *GetQueryResultsInput, fn func(*GetQueryResultsOutput, bool) bool) error { - return c.GetQueryResultsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetQueryResultsPagesWithContext same as GetQueryResultsPages 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 *Athena) GetQueryResultsPagesWithContext(ctx aws.Context, input *GetQueryResultsInput, fn func(*GetQueryResultsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetQueryResultsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetQueryResultsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetQueryResultsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListNamedQueries = "ListNamedQueries" - -// ListNamedQueriesRequest generates a "aws/request.Request" representing the -// client's request for the ListNamedQueries operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListNamedQueries for more information on using the ListNamedQueries -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListNamedQueriesRequest method. -// req, resp := client.ListNamedQueriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueries -func (c *Athena) ListNamedQueriesRequest(input *ListNamedQueriesInput) (req *request.Request, output *ListNamedQueriesOutput) { - op := &request.Operation{ - Name: opListNamedQueries, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListNamedQueriesInput{} - } - - output = &ListNamedQueriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListNamedQueries API operation for Amazon Athena. -// -// Provides a list of all available query IDs. -// -// For code samples using the AWS SDK for Java, see Examples and Code Samples -// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon -// Athena User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Athena's -// API operation ListNamedQueries for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// Indicates a platform issue, which may be due to a transient condition or -// outage. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a required parameter may be missing or out of range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueries -func (c *Athena) ListNamedQueries(input *ListNamedQueriesInput) (*ListNamedQueriesOutput, error) { - req, out := c.ListNamedQueriesRequest(input) - return out, req.Send() -} - -// ListNamedQueriesWithContext is the same as ListNamedQueries with the addition of -// the ability to pass a context and additional request options. -// -// See ListNamedQueries for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Athena) ListNamedQueriesWithContext(ctx aws.Context, input *ListNamedQueriesInput, opts ...request.Option) (*ListNamedQueriesOutput, error) { - req, out := c.ListNamedQueriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListNamedQueriesPages iterates over the pages of a ListNamedQueries operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListNamedQueries 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 ListNamedQueries operation. -// pageNum := 0 -// err := client.ListNamedQueriesPages(params, -// func(page *ListNamedQueriesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Athena) ListNamedQueriesPages(input *ListNamedQueriesInput, fn func(*ListNamedQueriesOutput, bool) bool) error { - return c.ListNamedQueriesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListNamedQueriesPagesWithContext same as ListNamedQueriesPages 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 *Athena) ListNamedQueriesPagesWithContext(ctx aws.Context, input *ListNamedQueriesInput, fn func(*ListNamedQueriesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListNamedQueriesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListNamedQueriesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListNamedQueriesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListQueryExecutions = "ListQueryExecutions" - -// ListQueryExecutionsRequest generates a "aws/request.Request" representing the -// client's request for the ListQueryExecutions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListQueryExecutions for more information on using the ListQueryExecutions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListQueryExecutionsRequest method. -// req, resp := client.ListQueryExecutionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListQueryExecutions -func (c *Athena) ListQueryExecutionsRequest(input *ListQueryExecutionsInput) (req *request.Request, output *ListQueryExecutionsOutput) { - op := &request.Operation{ - Name: opListQueryExecutions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListQueryExecutionsInput{} - } - - output = &ListQueryExecutionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListQueryExecutions API operation for Amazon Athena. -// -// Provides a list of all available query execution IDs. -// -// For code samples using the AWS SDK for Java, see Examples and Code Samples -// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon -// Athena User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Athena's -// API operation ListQueryExecutions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// Indicates a platform issue, which may be due to a transient condition or -// outage. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a required parameter may be missing or out of range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListQueryExecutions -func (c *Athena) ListQueryExecutions(input *ListQueryExecutionsInput) (*ListQueryExecutionsOutput, error) { - req, out := c.ListQueryExecutionsRequest(input) - return out, req.Send() -} - -// ListQueryExecutionsWithContext is the same as ListQueryExecutions with the addition of -// the ability to pass a context and additional request options. -// -// See ListQueryExecutions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Athena) ListQueryExecutionsWithContext(ctx aws.Context, input *ListQueryExecutionsInput, opts ...request.Option) (*ListQueryExecutionsOutput, error) { - req, out := c.ListQueryExecutionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListQueryExecutionsPages iterates over the pages of a ListQueryExecutions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListQueryExecutions 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 ListQueryExecutions operation. -// pageNum := 0 -// err := client.ListQueryExecutionsPages(params, -// func(page *ListQueryExecutionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Athena) ListQueryExecutionsPages(input *ListQueryExecutionsInput, fn func(*ListQueryExecutionsOutput, bool) bool) error { - return c.ListQueryExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListQueryExecutionsPagesWithContext same as ListQueryExecutionsPages 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 *Athena) ListQueryExecutionsPagesWithContext(ctx aws.Context, input *ListQueryExecutionsInput, fn func(*ListQueryExecutionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListQueryExecutionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListQueryExecutionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListQueryExecutionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opStartQueryExecution = "StartQueryExecution" - -// StartQueryExecutionRequest generates a "aws/request.Request" representing the -// client's request for the StartQueryExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartQueryExecution for more information on using the StartQueryExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartQueryExecutionRequest method. -// req, resp := client.StartQueryExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StartQueryExecution -func (c *Athena) StartQueryExecutionRequest(input *StartQueryExecutionInput) (req *request.Request, output *StartQueryExecutionOutput) { - op := &request.Operation{ - Name: opStartQueryExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartQueryExecutionInput{} - } - - output = &StartQueryExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartQueryExecution API operation for Amazon Athena. -// -// Runs (executes) the SQL query statements contained in the Query string. -// -// For code samples using the AWS SDK for Java, see Examples and Code Samples -// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon -// Athena User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Athena's -// API operation StartQueryExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// Indicates a platform issue, which may be due to a transient condition or -// outage. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a required parameter may be missing or out of range. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Indicates that the request was throttled and includes the reason for throttling, -// for example, the limit of concurrent queries has been exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StartQueryExecution -func (c *Athena) StartQueryExecution(input *StartQueryExecutionInput) (*StartQueryExecutionOutput, error) { - req, out := c.StartQueryExecutionRequest(input) - return out, req.Send() -} - -// StartQueryExecutionWithContext is the same as StartQueryExecution with the addition of -// the ability to pass a context and additional request options. -// -// See StartQueryExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Athena) StartQueryExecutionWithContext(ctx aws.Context, input *StartQueryExecutionInput, opts ...request.Option) (*StartQueryExecutionOutput, error) { - req, out := c.StartQueryExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopQueryExecution = "StopQueryExecution" - -// StopQueryExecutionRequest generates a "aws/request.Request" representing the -// client's request for the StopQueryExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopQueryExecution for more information on using the StopQueryExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopQueryExecutionRequest method. -// req, resp := client.StopQueryExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StopQueryExecution -func (c *Athena) StopQueryExecutionRequest(input *StopQueryExecutionInput) (req *request.Request, output *StopQueryExecutionOutput) { - op := &request.Operation{ - Name: opStopQueryExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopQueryExecutionInput{} - } - - output = &StopQueryExecutionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopQueryExecution API operation for Amazon Athena. -// -// Stops a query execution. -// -// For code samples using the AWS SDK for Java, see Examples and Code Samples -// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon -// Athena User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Athena's -// API operation StopQueryExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// Indicates a platform issue, which may be due to a transient condition or -// outage. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a required parameter may be missing or out of range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StopQueryExecution -func (c *Athena) StopQueryExecution(input *StopQueryExecutionInput) (*StopQueryExecutionOutput, error) { - req, out := c.StopQueryExecutionRequest(input) - return out, req.Send() -} - -// StopQueryExecutionWithContext is the same as StopQueryExecution with the addition of -// the ability to pass a context and additional request options. -// -// See StopQueryExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Athena) StopQueryExecutionWithContext(ctx aws.Context, input *StopQueryExecutionInput, opts ...request.Option) (*StopQueryExecutionOutput, error) { - req, out := c.StopQueryExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type BatchGetNamedQueryInput struct { - _ struct{} `type:"structure"` - - // An array of query IDs. - // - // NamedQueryIds is a required field - NamedQueryIds []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchGetNamedQueryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetNamedQueryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetNamedQueryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetNamedQueryInput"} - if s.NamedQueryIds == nil { - invalidParams.Add(request.NewErrParamRequired("NamedQueryIds")) - } - if s.NamedQueryIds != nil && len(s.NamedQueryIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NamedQueryIds", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNamedQueryIds sets the NamedQueryIds field's value. -func (s *BatchGetNamedQueryInput) SetNamedQueryIds(v []*string) *BatchGetNamedQueryInput { - s.NamedQueryIds = v - return s -} - -type BatchGetNamedQueryOutput struct { - _ struct{} `type:"structure"` - - // Information about the named query IDs submitted. - NamedQueries []*NamedQuery `type:"list"` - - // Information about provided query IDs. - UnprocessedNamedQueryIds []*UnprocessedNamedQueryId `type:"list"` -} - -// String returns the string representation -func (s BatchGetNamedQueryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetNamedQueryOutput) GoString() string { - return s.String() -} - -// SetNamedQueries sets the NamedQueries field's value. -func (s *BatchGetNamedQueryOutput) SetNamedQueries(v []*NamedQuery) *BatchGetNamedQueryOutput { - s.NamedQueries = v - return s -} - -// SetUnprocessedNamedQueryIds sets the UnprocessedNamedQueryIds field's value. -func (s *BatchGetNamedQueryOutput) SetUnprocessedNamedQueryIds(v []*UnprocessedNamedQueryId) *BatchGetNamedQueryOutput { - s.UnprocessedNamedQueryIds = v - return s -} - -type BatchGetQueryExecutionInput struct { - _ struct{} `type:"structure"` - - // An array of query execution IDs. - // - // QueryExecutionIds is a required field - QueryExecutionIds []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchGetQueryExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetQueryExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetQueryExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetQueryExecutionInput"} - if s.QueryExecutionIds == nil { - invalidParams.Add(request.NewErrParamRequired("QueryExecutionIds")) - } - if s.QueryExecutionIds != nil && len(s.QueryExecutionIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("QueryExecutionIds", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueryExecutionIds sets the QueryExecutionIds field's value. -func (s *BatchGetQueryExecutionInput) SetQueryExecutionIds(v []*string) *BatchGetQueryExecutionInput { - s.QueryExecutionIds = v - return s -} - -type BatchGetQueryExecutionOutput struct { - _ struct{} `type:"structure"` - - // Information about a query execution. - QueryExecutions []*QueryExecution `type:"list"` - - // Information about the query executions that failed to run. - UnprocessedQueryExecutionIds []*UnprocessedQueryExecutionId `type:"list"` -} - -// String returns the string representation -func (s BatchGetQueryExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetQueryExecutionOutput) GoString() string { - return s.String() -} - -// SetQueryExecutions sets the QueryExecutions field's value. -func (s *BatchGetQueryExecutionOutput) SetQueryExecutions(v []*QueryExecution) *BatchGetQueryExecutionOutput { - s.QueryExecutions = v - return s -} - -// SetUnprocessedQueryExecutionIds sets the UnprocessedQueryExecutionIds field's value. -func (s *BatchGetQueryExecutionOutput) SetUnprocessedQueryExecutionIds(v []*UnprocessedQueryExecutionId) *BatchGetQueryExecutionOutput { - s.UnprocessedQueryExecutionIds = v - return s -} - -// Information about the columns in a query execution result. -type ColumnInfo struct { - _ struct{} `type:"structure"` - - // Indicates whether values in the column are case-sensitive. - CaseSensitive *bool `type:"boolean"` - - // The catalog to which the query results belong. - CatalogName *string `type:"string"` - - // A column label. - Label *string `type:"string"` - - // The name of the column. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // Indicates the column's nullable status. - Nullable *string `type:"string" enum:"ColumnNullable"` - - // For DECIMAL data types, specifies the total number of digits, up to 38. For - // performance reasons, we recommend up to 18 digits. - Precision *int64 `type:"integer"` - - // For DECIMAL data types, specifies the total number of digits in the fractional - // part of the value. Defaults to 0. - Scale *int64 `type:"integer"` - - // The schema name (database name) to which the query results belong. - SchemaName *string `type:"string"` - - // The table name for the query results. - TableName *string `type:"string"` - - // The data type of the column. - // - // Type is a required field - Type *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ColumnInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ColumnInfo) GoString() string { - return s.String() -} - -// SetCaseSensitive sets the CaseSensitive field's value. -func (s *ColumnInfo) SetCaseSensitive(v bool) *ColumnInfo { - s.CaseSensitive = &v - return s -} - -// SetCatalogName sets the CatalogName field's value. -func (s *ColumnInfo) SetCatalogName(v string) *ColumnInfo { - s.CatalogName = &v - return s -} - -// SetLabel sets the Label field's value. -func (s *ColumnInfo) SetLabel(v string) *ColumnInfo { - s.Label = &v - return s -} - -// SetName sets the Name field's value. -func (s *ColumnInfo) SetName(v string) *ColumnInfo { - s.Name = &v - return s -} - -// SetNullable sets the Nullable field's value. -func (s *ColumnInfo) SetNullable(v string) *ColumnInfo { - s.Nullable = &v - return s -} - -// SetPrecision sets the Precision field's value. -func (s *ColumnInfo) SetPrecision(v int64) *ColumnInfo { - s.Precision = &v - return s -} - -// SetScale sets the Scale field's value. -func (s *ColumnInfo) SetScale(v int64) *ColumnInfo { - s.Scale = &v - return s -} - -// SetSchemaName sets the SchemaName field's value. -func (s *ColumnInfo) SetSchemaName(v string) *ColumnInfo { - s.SchemaName = &v - return s -} - -// SetTableName sets the TableName field's value. -func (s *ColumnInfo) SetTableName(v string) *ColumnInfo { - s.TableName = &v - return s -} - -// SetType sets the Type field's value. -func (s *ColumnInfo) SetType(v string) *ColumnInfo { - s.Type = &v - return s -} - -type CreateNamedQueryInput struct { - _ struct{} `type:"structure"` - - // A unique case-sensitive string used to ensure the request to create the query - // is idempotent (executes only once). If another CreateNamedQuery request is - // received, the same response is returned and another query is not created. - // If a parameter has changed, for example, the QueryString, an error is returned. - // - // This token is listed as not required because AWS SDKs (for example the AWS - // SDK for Java) auto-generate the token for users. If you are not using the - // AWS SDK or the AWS CLI, you must provide this token or the action will fail. - ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` - - // The database to which the query belongs. - // - // Database is a required field - Database *string `min:"1" type:"string" required:"true"` - - // A brief explanation of the query. - Description *string `min:"1" type:"string"` - - // The plain language name for the query. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The text of the query itself. In other words, all query statements. - // - // QueryString is a required field - QueryString *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateNamedQueryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNamedQueryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNamedQueryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNamedQueryInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) - } - if s.Database == nil { - invalidParams.Add(request.NewErrParamRequired("Database")) - } - if s.Database != nil && len(*s.Database) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Database", 1)) - } - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.QueryString == nil { - invalidParams.Add(request.NewErrParamRequired("QueryString")) - } - if s.QueryString != nil && len(*s.QueryString) < 1 { - invalidParams.Add(request.NewErrParamMinLen("QueryString", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *CreateNamedQueryInput) SetClientRequestToken(v string) *CreateNamedQueryInput { - s.ClientRequestToken = &v - return s -} - -// SetDatabase sets the Database field's value. -func (s *CreateNamedQueryInput) SetDatabase(v string) *CreateNamedQueryInput { - s.Database = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateNamedQueryInput) SetDescription(v string) *CreateNamedQueryInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateNamedQueryInput) SetName(v string) *CreateNamedQueryInput { - s.Name = &v - return s -} - -// SetQueryString sets the QueryString field's value. -func (s *CreateNamedQueryInput) SetQueryString(v string) *CreateNamedQueryInput { - s.QueryString = &v - return s -} - -type CreateNamedQueryOutput struct { - _ struct{} `type:"structure"` - - // The unique ID of the query. - NamedQueryId *string `type:"string"` -} - -// String returns the string representation -func (s CreateNamedQueryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNamedQueryOutput) GoString() string { - return s.String() -} - -// SetNamedQueryId sets the NamedQueryId field's value. -func (s *CreateNamedQueryOutput) SetNamedQueryId(v string) *CreateNamedQueryOutput { - s.NamedQueryId = &v - return s -} - -// A piece of data (a field in the table). -type Datum struct { - _ struct{} `type:"structure"` - - // The value of the datum. - VarCharValue *string `type:"string"` -} - -// String returns the string representation -func (s Datum) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Datum) GoString() string { - return s.String() -} - -// SetVarCharValue sets the VarCharValue field's value. -func (s *Datum) SetVarCharValue(v string) *Datum { - s.VarCharValue = &v - return s -} - -type DeleteNamedQueryInput struct { - _ struct{} `type:"structure"` - - // The unique ID of the query to delete. - NamedQueryId *string `type:"string" idempotencyToken:"true"` -} - -// String returns the string representation -func (s DeleteNamedQueryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNamedQueryInput) GoString() string { - return s.String() -} - -// SetNamedQueryId sets the NamedQueryId field's value. -func (s *DeleteNamedQueryInput) SetNamedQueryId(v string) *DeleteNamedQueryInput { - s.NamedQueryId = &v - return s -} - -type DeleteNamedQueryOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteNamedQueryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNamedQueryOutput) GoString() string { - return s.String() -} - -// If query results are encrypted in Amazon S3, indicates the encryption option -// used (for example, SSE-KMS or CSE-KMS) and key information. -type EncryptionConfiguration struct { - _ struct{} `type:"structure"` - - // Indicates whether Amazon S3 server-side encryption with Amazon S3-managed - // keys (SSE-S3), server-side encryption with KMS-managed keys (SSE-KMS), or - // client-side encryption with KMS-managed keys (CSE-KMS) is used. - // - // EncryptionOption is a required field - EncryptionOption *string `type:"string" required:"true" enum:"EncryptionOption"` - - // For SSE-KMS and CSE-KMS, this is the KMS key ARN or ID. - KmsKey *string `type:"string"` -} - -// String returns the string representation -func (s EncryptionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EncryptionConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EncryptionConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EncryptionConfiguration"} - if s.EncryptionOption == nil { - invalidParams.Add(request.NewErrParamRequired("EncryptionOption")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryptionOption sets the EncryptionOption field's value. -func (s *EncryptionConfiguration) SetEncryptionOption(v string) *EncryptionConfiguration { - s.EncryptionOption = &v - return s -} - -// SetKmsKey sets the KmsKey field's value. -func (s *EncryptionConfiguration) SetKmsKey(v string) *EncryptionConfiguration { - s.KmsKey = &v - return s -} - -type GetNamedQueryInput struct { - _ struct{} `type:"structure"` - - // The unique ID of the query. Use ListNamedQueries to get query IDs. - // - // NamedQueryId is a required field - NamedQueryId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetNamedQueryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetNamedQueryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetNamedQueryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetNamedQueryInput"} - if s.NamedQueryId == nil { - invalidParams.Add(request.NewErrParamRequired("NamedQueryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNamedQueryId sets the NamedQueryId field's value. -func (s *GetNamedQueryInput) SetNamedQueryId(v string) *GetNamedQueryInput { - s.NamedQueryId = &v - return s -} - -type GetNamedQueryOutput struct { - _ struct{} `type:"structure"` - - // Information about the query. - NamedQuery *NamedQuery `type:"structure"` -} - -// String returns the string representation -func (s GetNamedQueryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetNamedQueryOutput) GoString() string { - return s.String() -} - -// SetNamedQuery sets the NamedQuery field's value. -func (s *GetNamedQueryOutput) SetNamedQuery(v *NamedQuery) *GetNamedQueryOutput { - s.NamedQuery = v - return s -} - -type GetQueryExecutionInput struct { - _ struct{} `type:"structure"` - - // The unique ID of the query execution. - // - // QueryExecutionId is a required field - QueryExecutionId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetQueryExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetQueryExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetQueryExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetQueryExecutionInput"} - if s.QueryExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("QueryExecutionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueryExecutionId sets the QueryExecutionId field's value. -func (s *GetQueryExecutionInput) SetQueryExecutionId(v string) *GetQueryExecutionInput { - s.QueryExecutionId = &v - return s -} - -type GetQueryExecutionOutput struct { - _ struct{} `type:"structure"` - - // Information about the query execution. - QueryExecution *QueryExecution `type:"structure"` -} - -// String returns the string representation -func (s GetQueryExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetQueryExecutionOutput) GoString() string { - return s.String() -} - -// SetQueryExecution sets the QueryExecution field's value. -func (s *GetQueryExecutionOutput) SetQueryExecution(v *QueryExecution) *GetQueryExecutionOutput { - s.QueryExecution = v - return s -} - -type GetQueryResultsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results (rows) to return in this request. - MaxResults *int64 `type:"integer"` - - // The token that specifies where to start pagination if a previous request - // was truncated. - NextToken *string `type:"string"` - - // The unique ID of the query execution. - // - // QueryExecutionId is a required field - QueryExecutionId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetQueryResultsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetQueryResultsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetQueryResultsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetQueryResultsInput"} - if s.QueryExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("QueryExecutionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetQueryResultsInput) SetMaxResults(v int64) *GetQueryResultsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetQueryResultsInput) SetNextToken(v string) *GetQueryResultsInput { - s.NextToken = &v - return s -} - -// SetQueryExecutionId sets the QueryExecutionId field's value. -func (s *GetQueryResultsInput) SetQueryExecutionId(v string) *GetQueryResultsInput { - s.QueryExecutionId = &v - return s -} - -type GetQueryResultsOutput struct { - _ struct{} `type:"structure"` - - // A token to be used by the next request if this request is truncated. - NextToken *string `type:"string"` - - // The results of the query execution. - ResultSet *ResultSet `type:"structure"` - - // The number of rows inserted with a CREATE TABLE AS SELECT statement. - UpdateCount *int64 `type:"long"` -} - -// String returns the string representation -func (s GetQueryResultsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetQueryResultsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetQueryResultsOutput) SetNextToken(v string) *GetQueryResultsOutput { - s.NextToken = &v - return s -} - -// SetResultSet sets the ResultSet field's value. -func (s *GetQueryResultsOutput) SetResultSet(v *ResultSet) *GetQueryResultsOutput { - s.ResultSet = v - return s -} - -// SetUpdateCount sets the UpdateCount field's value. -func (s *GetQueryResultsOutput) SetUpdateCount(v int64) *GetQueryResultsOutput { - s.UpdateCount = &v - return s -} - -type ListNamedQueriesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of queries to return in this request. - MaxResults *int64 `type:"integer"` - - // The token that specifies where to start pagination if a previous request - // was truncated. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListNamedQueriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListNamedQueriesInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListNamedQueriesInput) SetMaxResults(v int64) *ListNamedQueriesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListNamedQueriesInput) SetNextToken(v string) *ListNamedQueriesInput { - s.NextToken = &v - return s -} - -type ListNamedQueriesOutput struct { - _ struct{} `type:"structure"` - - // The list of unique query IDs. - NamedQueryIds []*string `min:"1" type:"list"` - - // A token to be used by the next request if this request is truncated. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListNamedQueriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListNamedQueriesOutput) GoString() string { - return s.String() -} - -// SetNamedQueryIds sets the NamedQueryIds field's value. -func (s *ListNamedQueriesOutput) SetNamedQueryIds(v []*string) *ListNamedQueriesOutput { - s.NamedQueryIds = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListNamedQueriesOutput) SetNextToken(v string) *ListNamedQueriesOutput { - s.NextToken = &v - return s -} - -type ListQueryExecutionsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of query executions to return in this request. - MaxResults *int64 `type:"integer"` - - // The token that specifies where to start pagination if a previous request - // was truncated. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListQueryExecutionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListQueryExecutionsInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListQueryExecutionsInput) SetMaxResults(v int64) *ListQueryExecutionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListQueryExecutionsInput) SetNextToken(v string) *ListQueryExecutionsInput { - s.NextToken = &v - return s -} - -type ListQueryExecutionsOutput struct { - _ struct{} `type:"structure"` - - // A token to be used by the next request if this request is truncated. - NextToken *string `type:"string"` - - // The unique IDs of each query execution as an array of strings. - QueryExecutionIds []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s ListQueryExecutionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListQueryExecutionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListQueryExecutionsOutput) SetNextToken(v string) *ListQueryExecutionsOutput { - s.NextToken = &v - return s -} - -// SetQueryExecutionIds sets the QueryExecutionIds field's value. -func (s *ListQueryExecutionsOutput) SetQueryExecutionIds(v []*string) *ListQueryExecutionsOutput { - s.QueryExecutionIds = v - return s -} - -// A query, where QueryString is the SQL query statements that comprise the -// query. -type NamedQuery struct { - _ struct{} `type:"structure"` - - // The database to which the query belongs. - // - // Database is a required field - Database *string `min:"1" type:"string" required:"true"` - - // A brief description of the query. - Description *string `min:"1" type:"string"` - - // The plain-language name of the query. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The unique identifier of the query. - NamedQueryId *string `type:"string"` - - // The SQL query statements that comprise the query. - // - // QueryString is a required field - QueryString *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s NamedQuery) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NamedQuery) GoString() string { - return s.String() -} - -// SetDatabase sets the Database field's value. -func (s *NamedQuery) SetDatabase(v string) *NamedQuery { - s.Database = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *NamedQuery) SetDescription(v string) *NamedQuery { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *NamedQuery) SetName(v string) *NamedQuery { - s.Name = &v - return s -} - -// SetNamedQueryId sets the NamedQueryId field's value. -func (s *NamedQuery) SetNamedQueryId(v string) *NamedQuery { - s.NamedQueryId = &v - return s -} - -// SetQueryString sets the QueryString field's value. -func (s *NamedQuery) SetQueryString(v string) *NamedQuery { - s.QueryString = &v - return s -} - -// Information about a single instance of a query execution. -type QueryExecution struct { - _ struct{} `type:"structure"` - - // The SQL query statements which the query execution ran. - Query *string `min:"1" type:"string"` - - // The database in which the query execution occurred. - QueryExecutionContext *QueryExecutionContext `type:"structure"` - - // The unique identifier for each query execution. - QueryExecutionId *string `type:"string"` - - // The location in Amazon S3 where query results were stored and the encryption - // option, if any, used for query results. - ResultConfiguration *ResultConfiguration `type:"structure"` - - // The type of query statement that was run. DDL indicates DDL query statements. - // DML indicates DML (Data Manipulation Language) query statements, such as - // CREATE TABLE AS SELECT. UTILITY indicates query statements other than DDL - // and DML, such as SHOW CREATE TABLE, or DESCRIBE . - StatementType *string `type:"string" enum:"StatementType"` - - // The amount of data scanned during the query execution and the amount of time - // that it took to execute, and the type of statement that was run. - Statistics *QueryExecutionStatistics `type:"structure"` - - // The completion date, current state, submission time, and state change reason - // (if applicable) for the query execution. - Status *QueryExecutionStatus `type:"structure"` -} - -// String returns the string representation -func (s QueryExecution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryExecution) GoString() string { - return s.String() -} - -// SetQuery sets the Query field's value. -func (s *QueryExecution) SetQuery(v string) *QueryExecution { - s.Query = &v - return s -} - -// SetQueryExecutionContext sets the QueryExecutionContext field's value. -func (s *QueryExecution) SetQueryExecutionContext(v *QueryExecutionContext) *QueryExecution { - s.QueryExecutionContext = v - return s -} - -// SetQueryExecutionId sets the QueryExecutionId field's value. -func (s *QueryExecution) SetQueryExecutionId(v string) *QueryExecution { - s.QueryExecutionId = &v - return s -} - -// SetResultConfiguration sets the ResultConfiguration field's value. -func (s *QueryExecution) SetResultConfiguration(v *ResultConfiguration) *QueryExecution { - s.ResultConfiguration = v - return s -} - -// SetStatementType sets the StatementType field's value. -func (s *QueryExecution) SetStatementType(v string) *QueryExecution { - s.StatementType = &v - return s -} - -// SetStatistics sets the Statistics field's value. -func (s *QueryExecution) SetStatistics(v *QueryExecutionStatistics) *QueryExecution { - s.Statistics = v - return s -} - -// SetStatus sets the Status field's value. -func (s *QueryExecution) SetStatus(v *QueryExecutionStatus) *QueryExecution { - s.Status = v - return s -} - -// The database in which the query execution occurs. -type QueryExecutionContext struct { - _ struct{} `type:"structure"` - - // The name of the database. - Database *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s QueryExecutionContext) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryExecutionContext) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *QueryExecutionContext) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "QueryExecutionContext"} - if s.Database != nil && len(*s.Database) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Database", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDatabase sets the Database field's value. -func (s *QueryExecutionContext) SetDatabase(v string) *QueryExecutionContext { - s.Database = &v - return s -} - -// The amount of data scanned during the query execution and the amount of time -// that it took to execute, and the type of statement that was run. -type QueryExecutionStatistics struct { - _ struct{} `type:"structure"` - - // The number of bytes in the data that was queried. - DataScannedInBytes *int64 `type:"long"` - - // The number of milliseconds that the query took to execute. - EngineExecutionTimeInMillis *int64 `type:"long"` -} - -// String returns the string representation -func (s QueryExecutionStatistics) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryExecutionStatistics) GoString() string { - return s.String() -} - -// SetDataScannedInBytes sets the DataScannedInBytes field's value. -func (s *QueryExecutionStatistics) SetDataScannedInBytes(v int64) *QueryExecutionStatistics { - s.DataScannedInBytes = &v - return s -} - -// SetEngineExecutionTimeInMillis sets the EngineExecutionTimeInMillis field's value. -func (s *QueryExecutionStatistics) SetEngineExecutionTimeInMillis(v int64) *QueryExecutionStatistics { - s.EngineExecutionTimeInMillis = &v - return s -} - -// The completion date, current state, submission time, and state change reason -// (if applicable) for the query execution. -type QueryExecutionStatus struct { - _ struct{} `type:"structure"` - - // The date and time that the query completed. - CompletionDateTime *time.Time `type:"timestamp"` - - // The state of query execution. QUEUED state is listed but is not used by Athena - // and is reserved for future use. RUNNING indicates that the query has been - // submitted to the service, and Athena will execute the query as soon as resources - // are available. SUCCEEDED indicates that the query completed without error. - // FAILED indicates that the query experienced an error and did not complete - // processing.CANCELLED indicates that user input interrupted query execution. - State *string `type:"string" enum:"QueryExecutionState"` - - // Further detail about the status of the query. - StateChangeReason *string `type:"string"` - - // The date and time that the query was submitted. - SubmissionDateTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s QueryExecutionStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryExecutionStatus) GoString() string { - return s.String() -} - -// SetCompletionDateTime sets the CompletionDateTime field's value. -func (s *QueryExecutionStatus) SetCompletionDateTime(v time.Time) *QueryExecutionStatus { - s.CompletionDateTime = &v - return s -} - -// SetState sets the State field's value. -func (s *QueryExecutionStatus) SetState(v string) *QueryExecutionStatus { - s.State = &v - return s -} - -// SetStateChangeReason sets the StateChangeReason field's value. -func (s *QueryExecutionStatus) SetStateChangeReason(v string) *QueryExecutionStatus { - s.StateChangeReason = &v - return s -} - -// SetSubmissionDateTime sets the SubmissionDateTime field's value. -func (s *QueryExecutionStatus) SetSubmissionDateTime(v time.Time) *QueryExecutionStatus { - s.SubmissionDateTime = &v - return s -} - -// The location in Amazon S3 where query results are stored and the encryption -// option, if any, used for query results. -type ResultConfiguration struct { - _ struct{} `type:"structure"` - - // If query results are encrypted in Amazon S3, indicates the encryption option - // used (for example, SSE-KMS or CSE-KMS) and key information. - EncryptionConfiguration *EncryptionConfiguration `type:"structure"` - - // The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/. - // For more information, see Queries and Query Result Files. (http://docs.aws.amazon.com/athena/latest/ug/querying.html) - // - // OutputLocation is a required field - OutputLocation *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ResultConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResultConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResultConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResultConfiguration"} - if s.OutputLocation == nil { - invalidParams.Add(request.NewErrParamRequired("OutputLocation")) - } - if s.EncryptionConfiguration != nil { - if err := s.EncryptionConfiguration.Validate(); err != nil { - invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. -func (s *ResultConfiguration) SetEncryptionConfiguration(v *EncryptionConfiguration) *ResultConfiguration { - s.EncryptionConfiguration = v - return s -} - -// SetOutputLocation sets the OutputLocation field's value. -func (s *ResultConfiguration) SetOutputLocation(v string) *ResultConfiguration { - s.OutputLocation = &v - return s -} - -// The metadata and rows that comprise a query result set. The metadata describes -// the column structure and data types. -type ResultSet struct { - _ struct{} `type:"structure"` - - // The metadata that describes the column structure and data types of a table - // of query results. - ResultSetMetadata *ResultSetMetadata `type:"structure"` - - // The rows in the table. - Rows []*Row `type:"list"` -} - -// String returns the string representation -func (s ResultSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResultSet) GoString() string { - return s.String() -} - -// SetResultSetMetadata sets the ResultSetMetadata field's value. -func (s *ResultSet) SetResultSetMetadata(v *ResultSetMetadata) *ResultSet { - s.ResultSetMetadata = v - return s -} - -// SetRows sets the Rows field's value. -func (s *ResultSet) SetRows(v []*Row) *ResultSet { - s.Rows = v - return s -} - -// The metadata that describes the column structure and data types of a table -// of query results. -type ResultSetMetadata struct { - _ struct{} `type:"structure"` - - // Information about the columns returned in a query result metadata. - ColumnInfo []*ColumnInfo `type:"list"` -} - -// String returns the string representation -func (s ResultSetMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResultSetMetadata) GoString() string { - return s.String() -} - -// SetColumnInfo sets the ColumnInfo field's value. -func (s *ResultSetMetadata) SetColumnInfo(v []*ColumnInfo) *ResultSetMetadata { - s.ColumnInfo = v - return s -} - -// The rows that comprise a query result table. -type Row struct { - _ struct{} `type:"structure"` - - // The data that populates a row in a query result table. - Data []*Datum `type:"list"` -} - -// String returns the string representation -func (s Row) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Row) GoString() string { - return s.String() -} - -// SetData sets the Data field's value. -func (s *Row) SetData(v []*Datum) *Row { - s.Data = v - return s -} - -type StartQueryExecutionInput struct { - _ struct{} `type:"structure"` - - // A unique case-sensitive string used to ensure the request to create the query - // is idempotent (executes only once). If another StartQueryExecution request - // is received, the same response is returned and another query is not created. - // If a parameter has changed, for example, the QueryString, an error is returned. - // - // This token is listed as not required because AWS SDKs (for example the AWS - // SDK for Java) auto-generate the token for users. If you are not using the - // AWS SDK or the AWS CLI, you must provide this token or the action will fail. - ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` - - // The database within which the query executes. - QueryExecutionContext *QueryExecutionContext `type:"structure"` - - // The SQL query statements to be executed. - // - // QueryString is a required field - QueryString *string `min:"1" type:"string" required:"true"` - - // Specifies information about where and how to save the results of the query - // execution. - // - // ResultConfiguration is a required field - ResultConfiguration *ResultConfiguration `type:"structure" required:"true"` -} - -// String returns the string representation -func (s StartQueryExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartQueryExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartQueryExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartQueryExecutionInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) - } - if s.QueryString == nil { - invalidParams.Add(request.NewErrParamRequired("QueryString")) - } - if s.QueryString != nil && len(*s.QueryString) < 1 { - invalidParams.Add(request.NewErrParamMinLen("QueryString", 1)) - } - if s.ResultConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("ResultConfiguration")) - } - if s.QueryExecutionContext != nil { - if err := s.QueryExecutionContext.Validate(); err != nil { - invalidParams.AddNested("QueryExecutionContext", err.(request.ErrInvalidParams)) - } - } - if s.ResultConfiguration != nil { - if err := s.ResultConfiguration.Validate(); err != nil { - invalidParams.AddNested("ResultConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *StartQueryExecutionInput) SetClientRequestToken(v string) *StartQueryExecutionInput { - s.ClientRequestToken = &v - return s -} - -// SetQueryExecutionContext sets the QueryExecutionContext field's value. -func (s *StartQueryExecutionInput) SetQueryExecutionContext(v *QueryExecutionContext) *StartQueryExecutionInput { - s.QueryExecutionContext = v - return s -} - -// SetQueryString sets the QueryString field's value. -func (s *StartQueryExecutionInput) SetQueryString(v string) *StartQueryExecutionInput { - s.QueryString = &v - return s -} - -// SetResultConfiguration sets the ResultConfiguration field's value. -func (s *StartQueryExecutionInput) SetResultConfiguration(v *ResultConfiguration) *StartQueryExecutionInput { - s.ResultConfiguration = v - return s -} - -type StartQueryExecutionOutput struct { - _ struct{} `type:"structure"` - - // The unique ID of the query that ran as a result of this request. - QueryExecutionId *string `type:"string"` -} - -// String returns the string representation -func (s StartQueryExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartQueryExecutionOutput) GoString() string { - return s.String() -} - -// SetQueryExecutionId sets the QueryExecutionId field's value. -func (s *StartQueryExecutionOutput) SetQueryExecutionId(v string) *StartQueryExecutionOutput { - s.QueryExecutionId = &v - return s -} - -type StopQueryExecutionInput struct { - _ struct{} `type:"structure"` - - // The unique ID of the query execution to stop. - QueryExecutionId *string `type:"string" idempotencyToken:"true"` -} - -// String returns the string representation -func (s StopQueryExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopQueryExecutionInput) GoString() string { - return s.String() -} - -// SetQueryExecutionId sets the QueryExecutionId field's value. -func (s *StopQueryExecutionInput) SetQueryExecutionId(v string) *StopQueryExecutionInput { - s.QueryExecutionId = &v - return s -} - -type StopQueryExecutionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopQueryExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopQueryExecutionOutput) GoString() string { - return s.String() -} - -// Information about a named query ID that could not be processed. -type UnprocessedNamedQueryId struct { - _ struct{} `type:"structure"` - - // The error code returned when the processing request for the named query failed, - // if applicable. - ErrorCode *string `min:"1" type:"string"` - - // The error message returned when the processing request for the named query - // failed, if applicable. - ErrorMessage *string `type:"string"` - - // The unique identifier of the named query. - NamedQueryId *string `type:"string"` -} - -// String returns the string representation -func (s UnprocessedNamedQueryId) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnprocessedNamedQueryId) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *UnprocessedNamedQueryId) SetErrorCode(v string) *UnprocessedNamedQueryId { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *UnprocessedNamedQueryId) SetErrorMessage(v string) *UnprocessedNamedQueryId { - s.ErrorMessage = &v - return s -} - -// SetNamedQueryId sets the NamedQueryId field's value. -func (s *UnprocessedNamedQueryId) SetNamedQueryId(v string) *UnprocessedNamedQueryId { - s.NamedQueryId = &v - return s -} - -// Describes a query execution that failed to process. -type UnprocessedQueryExecutionId struct { - _ struct{} `type:"structure"` - - // The error code returned when the query execution failed to process, if applicable. - ErrorCode *string `min:"1" type:"string"` - - // The error message returned when the query execution failed to process, if - // applicable. - ErrorMessage *string `type:"string"` - - // The unique identifier of the query execution. - QueryExecutionId *string `type:"string"` -} - -// String returns the string representation -func (s UnprocessedQueryExecutionId) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnprocessedQueryExecutionId) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *UnprocessedQueryExecutionId) SetErrorCode(v string) *UnprocessedQueryExecutionId { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *UnprocessedQueryExecutionId) SetErrorMessage(v string) *UnprocessedQueryExecutionId { - s.ErrorMessage = &v - return s -} - -// SetQueryExecutionId sets the QueryExecutionId field's value. -func (s *UnprocessedQueryExecutionId) SetQueryExecutionId(v string) *UnprocessedQueryExecutionId { - s.QueryExecutionId = &v - return s -} - -const ( - // ColumnNullableNotNull is a ColumnNullable enum value - ColumnNullableNotNull = "NOT_NULL" - - // ColumnNullableNullable is a ColumnNullable enum value - ColumnNullableNullable = "NULLABLE" - - // ColumnNullableUnknown is a ColumnNullable enum value - ColumnNullableUnknown = "UNKNOWN" -) - -const ( - // EncryptionOptionSseS3 is a EncryptionOption enum value - EncryptionOptionSseS3 = "SSE_S3" - - // EncryptionOptionSseKms is a EncryptionOption enum value - EncryptionOptionSseKms = "SSE_KMS" - - // EncryptionOptionCseKms is a EncryptionOption enum value - EncryptionOptionCseKms = "CSE_KMS" -) - -const ( - // QueryExecutionStateQueued is a QueryExecutionState enum value - QueryExecutionStateQueued = "QUEUED" - - // QueryExecutionStateRunning is a QueryExecutionState enum value - QueryExecutionStateRunning = "RUNNING" - - // QueryExecutionStateSucceeded is a QueryExecutionState enum value - QueryExecutionStateSucceeded = "SUCCEEDED" - - // QueryExecutionStateFailed is a QueryExecutionState enum value - QueryExecutionStateFailed = "FAILED" - - // QueryExecutionStateCancelled is a QueryExecutionState enum value - QueryExecutionStateCancelled = "CANCELLED" -) - -const ( - // StatementTypeDdl is a StatementType enum value - StatementTypeDdl = "DDL" - - // StatementTypeDml is a StatementType enum value - StatementTypeDml = "DML" - - // StatementTypeUtility is a StatementType enum value - StatementTypeUtility = "UTILITY" -) - -// The reason for the query throttling, for example, when it exceeds the concurrent -// query limit. -const ( - // ThrottleReasonConcurrentQueryLimitExceeded is a ThrottleReason enum value - ThrottleReasonConcurrentQueryLimitExceeded = "CONCURRENT_QUERY_LIMIT_EXCEEDED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/doc.go b/vendor/github.com/aws/aws-sdk-go/service/athena/doc.go deleted file mode 100644 index 76b6b8989..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/doc.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package athena provides the client and types for making API -// requests to Amazon Athena. -// -// Amazon Athena is an interactive query service that lets you use standard -// SQL to analyze data directly in Amazon S3. You can point Athena at your data -// in Amazon S3 and run ad-hoc queries and get results in seconds. Athena is -// serverless, so there is no infrastructure to set up or manage. You pay only -// for the queries you run. Athena scales automatically—executing queries in -// parallel—so results are fast, even with large datasets and complex queries. -// For more information, see What is Amazon Athena (http://docs.aws.amazon.com/athena/latest/ug/what-is.html) -// in the Amazon Athena User Guide. -// -// If you connect to Athena using the JDBC driver, use version 1.1.0 of the -// driver or later with the Amazon Athena API. Earlier version drivers do not -// support the API. For more information and to download the driver, see Accessing -// Amazon Athena with JDBC (https://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html). -// -// For code samples using the AWS SDK for Java, see Examples and Code Samples -// (https://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon -// Athena User Guide. -// -// See https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18 for more information on this service. -// -// See athena package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/athena/ -// -// Using the Client -// -// To contact Amazon Athena with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Athena client Athena for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/athena/#New -package athena diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/errors.go b/vendor/github.com/aws/aws-sdk-go/service/athena/errors.go deleted file mode 100644 index abfa4fac3..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/errors.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package athena - -const ( - - // ErrCodeInternalServerException for service response error code - // "InternalServerException". - // - // Indicates a platform issue, which may be due to a transient condition or - // outage. - ErrCodeInternalServerException = "InternalServerException" - - // ErrCodeInvalidRequestException for service response error code - // "InvalidRequestException". - // - // Indicates that something is wrong with the input to the request. For example, - // a required parameter may be missing or out of range. - ErrCodeInvalidRequestException = "InvalidRequestException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // Indicates that the request was throttled and includes the reason for throttling, - // for example, the limit of concurrent queries has been exceeded. - ErrCodeTooManyRequestsException = "TooManyRequestsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/service.go b/vendor/github.com/aws/aws-sdk-go/service/athena/service.go deleted file mode 100644 index 6806a62ec..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package athena - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// Athena provides the API operation methods for making requests to -// Amazon Athena. See this package's package overview docs -// for details on the service. -// -// Athena methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Athena 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 = "athena" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Athena" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Athena client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Athena client from just a session. -// svc := athena.New(mySession) -// -// // Create a Athena client with additional configuration -// svc := athena.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Athena { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Athena { - svc := &Athena{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-05-18", - JSONVersion: "1.1", - TargetPrefix: "AmazonAthena", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Athena operation and runs any -// custom request initialization. -func (c *Athena) 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/autoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go deleted file mode 100644 index 2a822a5fb..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go +++ /dev/null @@ -1,13475 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package autoscaling - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/query" -) - -const opAttachInstances = "AttachInstances" - -// AttachInstancesRequest generates a "aws/request.Request" representing the -// client's request for the AttachInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachInstances for more information on using the AttachInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachInstancesRequest method. -// req, resp := client.AttachInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachInstances -func (c *AutoScaling) AttachInstancesRequest(input *AttachInstancesInput) (req *request.Request, output *AttachInstancesOutput) { - op := &request.Operation{ - Name: opAttachInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachInstancesInput{} - } - - output = &AttachInstancesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachInstances API operation for Auto Scaling. -// -// Attaches one or more EC2 instances to the specified Auto Scaling group. -// -// When you attach instances, Amazon EC2 Auto Scaling increases the desired -// capacity of the group by the number of instances being attached. If the number -// of instances being attached plus the desired capacity of the group exceeds -// the maximum size of the group, the operation fails. -// -// If there is a Classic Load Balancer attached to your Auto Scaling group, -// the instances are also registered with the load balancer. If there are target -// groups attached to your Auto Scaling group, the instances are also registered -// with the target groups. -// -// For more information, see Attach EC2 Instances to Your Auto Scaling Group -// (http://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-instance-asg.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation AttachInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure" -// The service-linked role is not yet ready for use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachInstances -func (c *AutoScaling) AttachInstances(input *AttachInstancesInput) (*AttachInstancesOutput, error) { - req, out := c.AttachInstancesRequest(input) - return out, req.Send() -} - -// AttachInstancesWithContext is the same as AttachInstances with the addition of -// the ability to pass a context and additional request options. -// -// See AttachInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) AttachInstancesWithContext(ctx aws.Context, input *AttachInstancesInput, opts ...request.Option) (*AttachInstancesOutput, error) { - req, out := c.AttachInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachLoadBalancerTargetGroups = "AttachLoadBalancerTargetGroups" - -// AttachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the -// client's request for the AttachLoadBalancerTargetGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachLoadBalancerTargetGroups for more information on using the AttachLoadBalancerTargetGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachLoadBalancerTargetGroupsRequest method. -// req, resp := client.AttachLoadBalancerTargetGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancerTargetGroups -func (c *AutoScaling) AttachLoadBalancerTargetGroupsRequest(input *AttachLoadBalancerTargetGroupsInput) (req *request.Request, output *AttachLoadBalancerTargetGroupsOutput) { - op := &request.Operation{ - Name: opAttachLoadBalancerTargetGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachLoadBalancerTargetGroupsInput{} - } - - output = &AttachLoadBalancerTargetGroupsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachLoadBalancerTargetGroups API operation for Auto Scaling. -// -// Attaches one or more target groups to the specified Auto Scaling group. -// -// To describe the target groups for an Auto Scaling group, use DescribeLoadBalancerTargetGroups. -// To detach the target group from the Auto Scaling group, use DetachLoadBalancerTargetGroups. -// -// For more information, see Attach a Load Balancer to Your Auto Scaling Group -// (http://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation AttachLoadBalancerTargetGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure" -// The service-linked role is not yet ready for use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancerTargetGroups -func (c *AutoScaling) AttachLoadBalancerTargetGroups(input *AttachLoadBalancerTargetGroupsInput) (*AttachLoadBalancerTargetGroupsOutput, error) { - req, out := c.AttachLoadBalancerTargetGroupsRequest(input) - return out, req.Send() -} - -// AttachLoadBalancerTargetGroupsWithContext is the same as AttachLoadBalancerTargetGroups with the addition of -// the ability to pass a context and additional request options. -// -// See AttachLoadBalancerTargetGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) AttachLoadBalancerTargetGroupsWithContext(ctx aws.Context, input *AttachLoadBalancerTargetGroupsInput, opts ...request.Option) (*AttachLoadBalancerTargetGroupsOutput, error) { - req, out := c.AttachLoadBalancerTargetGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachLoadBalancers = "AttachLoadBalancers" - -// AttachLoadBalancersRequest generates a "aws/request.Request" representing the -// client's request for the AttachLoadBalancers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachLoadBalancers for more information on using the AttachLoadBalancers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachLoadBalancersRequest method. -// req, resp := client.AttachLoadBalancersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancers -func (c *AutoScaling) AttachLoadBalancersRequest(input *AttachLoadBalancersInput) (req *request.Request, output *AttachLoadBalancersOutput) { - op := &request.Operation{ - Name: opAttachLoadBalancers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachLoadBalancersInput{} - } - - output = &AttachLoadBalancersOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachLoadBalancers API operation for Auto Scaling. -// -// Attaches one or more Classic Load Balancers to the specified Auto Scaling -// group. -// -// To attach an Application Load Balancer instead, see AttachLoadBalancerTargetGroups. -// -// To describe the load balancers for an Auto Scaling group, use DescribeLoadBalancers. -// To detach the load balancer from the Auto Scaling group, use DetachLoadBalancers. -// -// For more information, see Attach a Load Balancer to Your Auto Scaling Group -// (http://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation AttachLoadBalancers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure" -// The service-linked role is not yet ready for use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancers -func (c *AutoScaling) AttachLoadBalancers(input *AttachLoadBalancersInput) (*AttachLoadBalancersOutput, error) { - req, out := c.AttachLoadBalancersRequest(input) - return out, req.Send() -} - -// AttachLoadBalancersWithContext is the same as AttachLoadBalancers with the addition of -// the ability to pass a context and additional request options. -// -// See AttachLoadBalancers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) AttachLoadBalancersWithContext(ctx aws.Context, input *AttachLoadBalancersInput, opts ...request.Option) (*AttachLoadBalancersOutput, error) { - req, out := c.AttachLoadBalancersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchDeleteScheduledAction = "BatchDeleteScheduledAction" - -// BatchDeleteScheduledActionRequest generates a "aws/request.Request" representing the -// client's request for the BatchDeleteScheduledAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchDeleteScheduledAction for more information on using the BatchDeleteScheduledAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchDeleteScheduledActionRequest method. -// req, resp := client.BatchDeleteScheduledActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchDeleteScheduledAction -func (c *AutoScaling) BatchDeleteScheduledActionRequest(input *BatchDeleteScheduledActionInput) (req *request.Request, output *BatchDeleteScheduledActionOutput) { - op := &request.Operation{ - Name: opBatchDeleteScheduledAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchDeleteScheduledActionInput{} - } - - output = &BatchDeleteScheduledActionOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchDeleteScheduledAction API operation for Auto Scaling. -// -// Deletes one or more scheduled actions for the specified Auto Scaling 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 Auto Scaling's -// API operation BatchDeleteScheduledAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchDeleteScheduledAction -func (c *AutoScaling) BatchDeleteScheduledAction(input *BatchDeleteScheduledActionInput) (*BatchDeleteScheduledActionOutput, error) { - req, out := c.BatchDeleteScheduledActionRequest(input) - return out, req.Send() -} - -// BatchDeleteScheduledActionWithContext is the same as BatchDeleteScheduledAction with the addition of -// the ability to pass a context and additional request options. -// -// See BatchDeleteScheduledAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) BatchDeleteScheduledActionWithContext(ctx aws.Context, input *BatchDeleteScheduledActionInput, opts ...request.Option) (*BatchDeleteScheduledActionOutput, error) { - req, out := c.BatchDeleteScheduledActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchPutScheduledUpdateGroupAction = "BatchPutScheduledUpdateGroupAction" - -// BatchPutScheduledUpdateGroupActionRequest generates a "aws/request.Request" representing the -// client's request for the BatchPutScheduledUpdateGroupAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchPutScheduledUpdateGroupAction for more information on using the BatchPutScheduledUpdateGroupAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchPutScheduledUpdateGroupActionRequest method. -// req, resp := client.BatchPutScheduledUpdateGroupActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchPutScheduledUpdateGroupAction -func (c *AutoScaling) BatchPutScheduledUpdateGroupActionRequest(input *BatchPutScheduledUpdateGroupActionInput) (req *request.Request, output *BatchPutScheduledUpdateGroupActionOutput) { - op := &request.Operation{ - Name: opBatchPutScheduledUpdateGroupAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchPutScheduledUpdateGroupActionInput{} - } - - output = &BatchPutScheduledUpdateGroupActionOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchPutScheduledUpdateGroupAction API operation for Auto Scaling. -// -// Creates or updates one or more scheduled scaling actions for an Auto Scaling -// group. If you leave a parameter unspecified when updating a scheduled scaling -// action, the corresponding value remains unchanged. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation BatchPutScheduledUpdateGroupAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAlreadyExistsFault "AlreadyExists" -// You already have an Auto Scaling group or launch configuration with this -// name. -// -// * ErrCodeLimitExceededFault "LimitExceeded" -// You have already reached a limit for your Auto Scaling resources (for example, -// groups, launch configurations, or lifecycle hooks). For more information, -// see DescribeAccountLimits. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchPutScheduledUpdateGroupAction -func (c *AutoScaling) BatchPutScheduledUpdateGroupAction(input *BatchPutScheduledUpdateGroupActionInput) (*BatchPutScheduledUpdateGroupActionOutput, error) { - req, out := c.BatchPutScheduledUpdateGroupActionRequest(input) - return out, req.Send() -} - -// BatchPutScheduledUpdateGroupActionWithContext is the same as BatchPutScheduledUpdateGroupAction with the addition of -// the ability to pass a context and additional request options. -// -// See BatchPutScheduledUpdateGroupAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) BatchPutScheduledUpdateGroupActionWithContext(ctx aws.Context, input *BatchPutScheduledUpdateGroupActionInput, opts ...request.Option) (*BatchPutScheduledUpdateGroupActionOutput, error) { - req, out := c.BatchPutScheduledUpdateGroupActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCompleteLifecycleAction = "CompleteLifecycleAction" - -// CompleteLifecycleActionRequest generates a "aws/request.Request" representing the -// client's request for the CompleteLifecycleAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CompleteLifecycleAction for more information on using the CompleteLifecycleAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CompleteLifecycleActionRequest method. -// req, resp := client.CompleteLifecycleActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CompleteLifecycleAction -func (c *AutoScaling) CompleteLifecycleActionRequest(input *CompleteLifecycleActionInput) (req *request.Request, output *CompleteLifecycleActionOutput) { - op := &request.Operation{ - Name: opCompleteLifecycleAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CompleteLifecycleActionInput{} - } - - output = &CompleteLifecycleActionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CompleteLifecycleAction API operation for Auto Scaling. -// -// Completes the lifecycle action for the specified token or instance with the -// specified result. -// -// This step is a part of the procedure for adding a lifecycle hook to an Auto -// Scaling group: -// -// (Optional) Create a Lambda function and a rule that allows CloudWatch Events -// to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates -// instances. -// -// (Optional) Create a notification target and an IAM role. The target can be -// either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon -// EC2 Auto Scaling to publish lifecycle notifications to the target. -// -// Create the lifecycle hook. Specify whether the hook is used when the instances -// launch or terminate. -// -// If you need more time, record the lifecycle action heartbeat to keep the -// instance in a pending state. -// -// If you finish before the timeout period ends, complete the lifecycle action. -// -// For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation CompleteLifecycleAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CompleteLifecycleAction -func (c *AutoScaling) CompleteLifecycleAction(input *CompleteLifecycleActionInput) (*CompleteLifecycleActionOutput, error) { - req, out := c.CompleteLifecycleActionRequest(input) - return out, req.Send() -} - -// CompleteLifecycleActionWithContext is the same as CompleteLifecycleAction with the addition of -// the ability to pass a context and additional request options. -// -// See CompleteLifecycleAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) CompleteLifecycleActionWithContext(ctx aws.Context, input *CompleteLifecycleActionInput, opts ...request.Option) (*CompleteLifecycleActionOutput, error) { - req, out := c.CompleteLifecycleActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAutoScalingGroup = "CreateAutoScalingGroup" - -// CreateAutoScalingGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateAutoScalingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAutoScalingGroup for more information on using the CreateAutoScalingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAutoScalingGroupRequest method. -// req, resp := client.CreateAutoScalingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateAutoScalingGroup -func (c *AutoScaling) CreateAutoScalingGroupRequest(input *CreateAutoScalingGroupInput) (req *request.Request, output *CreateAutoScalingGroupOutput) { - op := &request.Operation{ - Name: opCreateAutoScalingGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAutoScalingGroupInput{} - } - - output = &CreateAutoScalingGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateAutoScalingGroup API operation for Auto Scaling. -// -// Creates an Auto Scaling group with the specified name and attributes. -// -// If you exceed your maximum limit of Auto Scaling groups, the call fails. -// For information about viewing this limit, see DescribeAccountLimits. For -// information about updating this limit, see Auto Scaling Limits (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// For more information, see Auto Scaling Groups (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroup.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation CreateAutoScalingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAlreadyExistsFault "AlreadyExists" -// You already have an Auto Scaling group or launch configuration with this -// name. -// -// * ErrCodeLimitExceededFault "LimitExceeded" -// You have already reached a limit for your Auto Scaling resources (for example, -// groups, launch configurations, or lifecycle hooks). For more information, -// see DescribeAccountLimits. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure" -// The service-linked role is not yet ready for use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateAutoScalingGroup -func (c *AutoScaling) CreateAutoScalingGroup(input *CreateAutoScalingGroupInput) (*CreateAutoScalingGroupOutput, error) { - req, out := c.CreateAutoScalingGroupRequest(input) - return out, req.Send() -} - -// CreateAutoScalingGroupWithContext is the same as CreateAutoScalingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAutoScalingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) CreateAutoScalingGroupWithContext(ctx aws.Context, input *CreateAutoScalingGroupInput, opts ...request.Option) (*CreateAutoScalingGroupOutput, error) { - req, out := c.CreateAutoScalingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLaunchConfiguration = "CreateLaunchConfiguration" - -// CreateLaunchConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the CreateLaunchConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLaunchConfiguration for more information on using the CreateLaunchConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLaunchConfigurationRequest method. -// req, resp := client.CreateLaunchConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateLaunchConfiguration -func (c *AutoScaling) CreateLaunchConfigurationRequest(input *CreateLaunchConfigurationInput) (req *request.Request, output *CreateLaunchConfigurationOutput) { - op := &request.Operation{ - Name: opCreateLaunchConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLaunchConfigurationInput{} - } - - output = &CreateLaunchConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateLaunchConfiguration API operation for Auto Scaling. -// -// Creates a launch configuration. -// -// If you exceed your maximum limit of launch configurations, the call fails. -// For information about viewing this limit, see DescribeAccountLimits. For -// information about updating this limit, see Auto Scaling Limits (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// For more information, see Launch Configurations (http://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchConfiguration.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation CreateLaunchConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAlreadyExistsFault "AlreadyExists" -// You already have an Auto Scaling group or launch configuration with this -// name. -// -// * ErrCodeLimitExceededFault "LimitExceeded" -// You have already reached a limit for your Auto Scaling resources (for example, -// groups, launch configurations, or lifecycle hooks). For more information, -// see DescribeAccountLimits. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateLaunchConfiguration -func (c *AutoScaling) CreateLaunchConfiguration(input *CreateLaunchConfigurationInput) (*CreateLaunchConfigurationOutput, error) { - req, out := c.CreateLaunchConfigurationRequest(input) - return out, req.Send() -} - -// CreateLaunchConfigurationWithContext is the same as CreateLaunchConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLaunchConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) CreateLaunchConfigurationWithContext(ctx aws.Context, input *CreateLaunchConfigurationInput, opts ...request.Option) (*CreateLaunchConfigurationOutput, error) { - req, out := c.CreateLaunchConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateOrUpdateTags = "CreateOrUpdateTags" - -// CreateOrUpdateTagsRequest generates a "aws/request.Request" representing the -// client's request for the CreateOrUpdateTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateOrUpdateTags for more information on using the CreateOrUpdateTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateOrUpdateTagsRequest method. -// req, resp := client.CreateOrUpdateTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateOrUpdateTags -func (c *AutoScaling) CreateOrUpdateTagsRequest(input *CreateOrUpdateTagsInput) (req *request.Request, output *CreateOrUpdateTagsOutput) { - op := &request.Operation{ - Name: opCreateOrUpdateTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateOrUpdateTagsInput{} - } - - output = &CreateOrUpdateTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateOrUpdateTags API operation for Auto Scaling. -// -// Creates or updates tags for the specified Auto Scaling group. -// -// When you specify a tag with a key that already exists, the operation overwrites -// the previous tag definition, and you do not get an error message. -// -// For more information, see Tagging Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation CreateOrUpdateTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededFault "LimitExceeded" -// You have already reached a limit for your Auto Scaling resources (for example, -// groups, launch configurations, or lifecycle hooks). For more information, -// see DescribeAccountLimits. -// -// * ErrCodeAlreadyExistsFault "AlreadyExists" -// You already have an Auto Scaling group or launch configuration with this -// name. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// * ErrCodeResourceInUseFault "ResourceInUse" -// The operation can't be performed because the resource is in use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateOrUpdateTags -func (c *AutoScaling) CreateOrUpdateTags(input *CreateOrUpdateTagsInput) (*CreateOrUpdateTagsOutput, error) { - req, out := c.CreateOrUpdateTagsRequest(input) - return out, req.Send() -} - -// CreateOrUpdateTagsWithContext is the same as CreateOrUpdateTags with the addition of -// the ability to pass a context and additional request options. -// -// See CreateOrUpdateTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) CreateOrUpdateTagsWithContext(ctx aws.Context, input *CreateOrUpdateTagsInput, opts ...request.Option) (*CreateOrUpdateTagsOutput, error) { - req, out := c.CreateOrUpdateTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAutoScalingGroup = "DeleteAutoScalingGroup" - -// DeleteAutoScalingGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAutoScalingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAutoScalingGroup for more information on using the DeleteAutoScalingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAutoScalingGroupRequest method. -// req, resp := client.DeleteAutoScalingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteAutoScalingGroup -func (c *AutoScaling) DeleteAutoScalingGroupRequest(input *DeleteAutoScalingGroupInput) (req *request.Request, output *DeleteAutoScalingGroupOutput) { - op := &request.Operation{ - Name: opDeleteAutoScalingGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAutoScalingGroupInput{} - } - - output = &DeleteAutoScalingGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAutoScalingGroup API operation for Auto Scaling. -// -// Deletes the specified Auto Scaling group. -// -// If the group has instances or scaling activities in progress, you must specify -// the option to force the deletion in order for it to succeed. -// -// If the group has policies, deleting the group deletes the policies, the underlying -// alarm actions, and any alarm that no longer has an associated action. -// -// To remove instances from the Auto Scaling group before deleting it, call -// DetachInstances with the list of instances and the option to decrement the -// desired capacity. This ensures that Amazon EC2 Auto Scaling does not launch -// replacement instances. -// -// To terminate all instances before deleting the Auto Scaling group, call UpdateAutoScalingGroup -// and set the minimum size and desired capacity of the Auto Scaling group to -// zero. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DeleteAutoScalingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress" -// The operation can't be performed because there are scaling activities in -// progress. -// -// * ErrCodeResourceInUseFault "ResourceInUse" -// The operation can't be performed because the resource is in use. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteAutoScalingGroup -func (c *AutoScaling) DeleteAutoScalingGroup(input *DeleteAutoScalingGroupInput) (*DeleteAutoScalingGroupOutput, error) { - req, out := c.DeleteAutoScalingGroupRequest(input) - return out, req.Send() -} - -// DeleteAutoScalingGroupWithContext is the same as DeleteAutoScalingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAutoScalingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DeleteAutoScalingGroupWithContext(ctx aws.Context, input *DeleteAutoScalingGroupInput, opts ...request.Option) (*DeleteAutoScalingGroupOutput, error) { - req, out := c.DeleteAutoScalingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLaunchConfiguration = "DeleteLaunchConfiguration" - -// DeleteLaunchConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLaunchConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLaunchConfiguration for more information on using the DeleteLaunchConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLaunchConfigurationRequest method. -// req, resp := client.DeleteLaunchConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLaunchConfiguration -func (c *AutoScaling) DeleteLaunchConfigurationRequest(input *DeleteLaunchConfigurationInput) (req *request.Request, output *DeleteLaunchConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteLaunchConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLaunchConfigurationInput{} - } - - output = &DeleteLaunchConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLaunchConfiguration API operation for Auto Scaling. -// -// Deletes the specified launch configuration. -// -// The launch configuration must not be attached to an Auto Scaling group. When -// this call completes, the launch configuration is no longer available for -// use. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DeleteLaunchConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUseFault "ResourceInUse" -// The operation can't be performed because the resource is in use. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLaunchConfiguration -func (c *AutoScaling) DeleteLaunchConfiguration(input *DeleteLaunchConfigurationInput) (*DeleteLaunchConfigurationOutput, error) { - req, out := c.DeleteLaunchConfigurationRequest(input) - return out, req.Send() -} - -// DeleteLaunchConfigurationWithContext is the same as DeleteLaunchConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLaunchConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DeleteLaunchConfigurationWithContext(ctx aws.Context, input *DeleteLaunchConfigurationInput, opts ...request.Option) (*DeleteLaunchConfigurationOutput, error) { - req, out := c.DeleteLaunchConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLifecycleHook = "DeleteLifecycleHook" - -// DeleteLifecycleHookRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLifecycleHook operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLifecycleHook for more information on using the DeleteLifecycleHook -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLifecycleHookRequest method. -// req, resp := client.DeleteLifecycleHookRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLifecycleHook -func (c *AutoScaling) DeleteLifecycleHookRequest(input *DeleteLifecycleHookInput) (req *request.Request, output *DeleteLifecycleHookOutput) { - op := &request.Operation{ - Name: opDeleteLifecycleHook, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLifecycleHookInput{} - } - - output = &DeleteLifecycleHookOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLifecycleHook API operation for Auto Scaling. -// -// Deletes the specified lifecycle hook. -// -// If there are any outstanding lifecycle actions, they are completed first -// (ABANDON for launching instances, CONTINUE for terminating instances). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DeleteLifecycleHook for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLifecycleHook -func (c *AutoScaling) DeleteLifecycleHook(input *DeleteLifecycleHookInput) (*DeleteLifecycleHookOutput, error) { - req, out := c.DeleteLifecycleHookRequest(input) - return out, req.Send() -} - -// DeleteLifecycleHookWithContext is the same as DeleteLifecycleHook with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLifecycleHook for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DeleteLifecycleHookWithContext(ctx aws.Context, input *DeleteLifecycleHookInput, opts ...request.Option) (*DeleteLifecycleHookOutput, error) { - req, out := c.DeleteLifecycleHookRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteNotificationConfiguration = "DeleteNotificationConfiguration" - -// DeleteNotificationConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteNotificationConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteNotificationConfiguration for more information on using the DeleteNotificationConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteNotificationConfigurationRequest method. -// req, resp := client.DeleteNotificationConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteNotificationConfiguration -func (c *AutoScaling) DeleteNotificationConfigurationRequest(input *DeleteNotificationConfigurationInput) (req *request.Request, output *DeleteNotificationConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteNotificationConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteNotificationConfigurationInput{} - } - - output = &DeleteNotificationConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteNotificationConfiguration API operation for Auto Scaling. -// -// Deletes the specified notification. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DeleteNotificationConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteNotificationConfiguration -func (c *AutoScaling) DeleteNotificationConfiguration(input *DeleteNotificationConfigurationInput) (*DeleteNotificationConfigurationOutput, error) { - req, out := c.DeleteNotificationConfigurationRequest(input) - return out, req.Send() -} - -// DeleteNotificationConfigurationWithContext is the same as DeleteNotificationConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteNotificationConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DeleteNotificationConfigurationWithContext(ctx aws.Context, input *DeleteNotificationConfigurationInput, opts ...request.Option) (*DeleteNotificationConfigurationOutput, error) { - req, out := c.DeleteNotificationConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePolicy = "DeletePolicy" - -// DeletePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeletePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePolicy for more information on using the DeletePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePolicyRequest method. -// req, resp := client.DeletePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeletePolicy -func (c *AutoScaling) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) { - op := &request.Operation{ - Name: opDeletePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePolicyInput{} - } - - output = &DeletePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePolicy API operation for Auto Scaling. -// -// Deletes the specified Auto Scaling policy. -// -// Deleting a policy deletes the underlying alarm action, but does not delete -// the alarm, even if it no longer has an associated action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DeletePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure" -// The service-linked role is not yet ready for use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeletePolicy -func (c *AutoScaling) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) { - req, out := c.DeletePolicyRequest(input) - return out, req.Send() -} - -// DeletePolicyWithContext is the same as DeletePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) { - req, out := c.DeletePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteScheduledAction = "DeleteScheduledAction" - -// DeleteScheduledActionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteScheduledAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteScheduledAction for more information on using the DeleteScheduledAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteScheduledActionRequest method. -// req, resp := client.DeleteScheduledActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteScheduledAction -func (c *AutoScaling) DeleteScheduledActionRequest(input *DeleteScheduledActionInput) (req *request.Request, output *DeleteScheduledActionOutput) { - op := &request.Operation{ - Name: opDeleteScheduledAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteScheduledActionInput{} - } - - output = &DeleteScheduledActionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteScheduledAction API operation for Auto Scaling. -// -// Deletes the specified scheduled action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DeleteScheduledAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteScheduledAction -func (c *AutoScaling) DeleteScheduledAction(input *DeleteScheduledActionInput) (*DeleteScheduledActionOutput, error) { - req, out := c.DeleteScheduledActionRequest(input) - return out, req.Send() -} - -// DeleteScheduledActionWithContext is the same as DeleteScheduledAction with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteScheduledAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DeleteScheduledActionWithContext(ctx aws.Context, input *DeleteScheduledActionInput, opts ...request.Option) (*DeleteScheduledActionOutput, error) { - req, out := c.DeleteScheduledActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTags = "DeleteTags" - -// DeleteTagsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTags for more information on using the DeleteTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTagsRequest method. -// req, resp := client.DeleteTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteTags -func (c *AutoScaling) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { - op := &request.Operation{ - Name: opDeleteTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTagsInput{} - } - - output = &DeleteTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTags API operation for Auto Scaling. -// -// Deletes the specified tags. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DeleteTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// * ErrCodeResourceInUseFault "ResourceInUse" -// The operation can't be performed because the resource is in use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteTags -func (c *AutoScaling) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - return out, req.Send() -} - -// DeleteTagsWithContext is the same as DeleteTags with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccountLimits = "DescribeAccountLimits" - -// DescribeAccountLimitsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountLimits operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccountLimits for more information on using the DescribeAccountLimits -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAccountLimitsRequest method. -// req, resp := client.DescribeAccountLimitsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAccountLimits -func (c *AutoScaling) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) (req *request.Request, output *DescribeAccountLimitsOutput) { - op := &request.Operation{ - Name: opDescribeAccountLimits, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAccountLimitsInput{} - } - - output = &DescribeAccountLimitsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccountLimits API operation for Auto Scaling. -// -// Describes the current Auto Scaling resource limits for your AWS account. -// -// For information about requesting an increase in these limits, see Auto Scaling -// Limits (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DescribeAccountLimits for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAccountLimits -func (c *AutoScaling) DescribeAccountLimits(input *DescribeAccountLimitsInput) (*DescribeAccountLimitsOutput, error) { - req, out := c.DescribeAccountLimitsRequest(input) - return out, req.Send() -} - -// DescribeAccountLimitsWithContext is the same as DescribeAccountLimits with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountLimits for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeAccountLimitsWithContext(ctx aws.Context, input *DescribeAccountLimitsInput, opts ...request.Option) (*DescribeAccountLimitsOutput, error) { - req, out := c.DescribeAccountLimitsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAdjustmentTypes = "DescribeAdjustmentTypes" - -// DescribeAdjustmentTypesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAdjustmentTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAdjustmentTypes for more information on using the DescribeAdjustmentTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAdjustmentTypesRequest method. -// req, resp := client.DescribeAdjustmentTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAdjustmentTypes -func (c *AutoScaling) DescribeAdjustmentTypesRequest(input *DescribeAdjustmentTypesInput) (req *request.Request, output *DescribeAdjustmentTypesOutput) { - op := &request.Operation{ - Name: opDescribeAdjustmentTypes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAdjustmentTypesInput{} - } - - output = &DescribeAdjustmentTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAdjustmentTypes API operation for Auto Scaling. -// -// Describes the policy adjustment types for use with PutScalingPolicy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DescribeAdjustmentTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAdjustmentTypes -func (c *AutoScaling) DescribeAdjustmentTypes(input *DescribeAdjustmentTypesInput) (*DescribeAdjustmentTypesOutput, error) { - req, out := c.DescribeAdjustmentTypesRequest(input) - return out, req.Send() -} - -// DescribeAdjustmentTypesWithContext is the same as DescribeAdjustmentTypes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAdjustmentTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeAdjustmentTypesWithContext(ctx aws.Context, input *DescribeAdjustmentTypesInput, opts ...request.Option) (*DescribeAdjustmentTypesOutput, error) { - req, out := c.DescribeAdjustmentTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAutoScalingGroups = "DescribeAutoScalingGroups" - -// DescribeAutoScalingGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAutoScalingGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAutoScalingGroups for more information on using the DescribeAutoScalingGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAutoScalingGroupsRequest method. -// req, resp := client.DescribeAutoScalingGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingGroups -func (c *AutoScaling) DescribeAutoScalingGroupsRequest(input *DescribeAutoScalingGroupsInput) (req *request.Request, output *DescribeAutoScalingGroupsOutput) { - op := &request.Operation{ - Name: opDescribeAutoScalingGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeAutoScalingGroupsInput{} - } - - output = &DescribeAutoScalingGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAutoScalingGroups API operation for Auto Scaling. -// -// Describes one or more Auto Scaling 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 Auto Scaling's -// API operation DescribeAutoScalingGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The NextToken value is not valid. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingGroups -func (c *AutoScaling) DescribeAutoScalingGroups(input *DescribeAutoScalingGroupsInput) (*DescribeAutoScalingGroupsOutput, error) { - req, out := c.DescribeAutoScalingGroupsRequest(input) - return out, req.Send() -} - -// DescribeAutoScalingGroupsWithContext is the same as DescribeAutoScalingGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAutoScalingGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeAutoScalingGroupsWithContext(ctx aws.Context, input *DescribeAutoScalingGroupsInput, opts ...request.Option) (*DescribeAutoScalingGroupsOutput, error) { - req, out := c.DescribeAutoScalingGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeAutoScalingGroupsPages iterates over the pages of a DescribeAutoScalingGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeAutoScalingGroups 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 DescribeAutoScalingGroups operation. -// pageNum := 0 -// err := client.DescribeAutoScalingGroupsPages(params, -// func(page *DescribeAutoScalingGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *AutoScaling) DescribeAutoScalingGroupsPages(input *DescribeAutoScalingGroupsInput, fn func(*DescribeAutoScalingGroupsOutput, bool) bool) error { - return c.DescribeAutoScalingGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeAutoScalingGroupsPagesWithContext same as DescribeAutoScalingGroupsPages 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 *AutoScaling) DescribeAutoScalingGroupsPagesWithContext(ctx aws.Context, input *DescribeAutoScalingGroupsInput, fn func(*DescribeAutoScalingGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeAutoScalingGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeAutoScalingGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeAutoScalingGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeAutoScalingInstances = "DescribeAutoScalingInstances" - -// DescribeAutoScalingInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAutoScalingInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAutoScalingInstances for more information on using the DescribeAutoScalingInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAutoScalingInstancesRequest method. -// req, resp := client.DescribeAutoScalingInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingInstances -func (c *AutoScaling) DescribeAutoScalingInstancesRequest(input *DescribeAutoScalingInstancesInput) (req *request.Request, output *DescribeAutoScalingInstancesOutput) { - op := &request.Operation{ - Name: opDescribeAutoScalingInstances, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeAutoScalingInstancesInput{} - } - - output = &DescribeAutoScalingInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAutoScalingInstances API operation for Auto Scaling. -// -// Describes one or more Auto Scaling instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DescribeAutoScalingInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The NextToken value is not valid. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingInstances -func (c *AutoScaling) DescribeAutoScalingInstances(input *DescribeAutoScalingInstancesInput) (*DescribeAutoScalingInstancesOutput, error) { - req, out := c.DescribeAutoScalingInstancesRequest(input) - return out, req.Send() -} - -// DescribeAutoScalingInstancesWithContext is the same as DescribeAutoScalingInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAutoScalingInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeAutoScalingInstancesWithContext(ctx aws.Context, input *DescribeAutoScalingInstancesInput, opts ...request.Option) (*DescribeAutoScalingInstancesOutput, error) { - req, out := c.DescribeAutoScalingInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeAutoScalingInstancesPages iterates over the pages of a DescribeAutoScalingInstances operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeAutoScalingInstances 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 DescribeAutoScalingInstances operation. -// pageNum := 0 -// err := client.DescribeAutoScalingInstancesPages(params, -// func(page *DescribeAutoScalingInstancesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *AutoScaling) DescribeAutoScalingInstancesPages(input *DescribeAutoScalingInstancesInput, fn func(*DescribeAutoScalingInstancesOutput, bool) bool) error { - return c.DescribeAutoScalingInstancesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeAutoScalingInstancesPagesWithContext same as DescribeAutoScalingInstancesPages 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 *AutoScaling) DescribeAutoScalingInstancesPagesWithContext(ctx aws.Context, input *DescribeAutoScalingInstancesInput, fn func(*DescribeAutoScalingInstancesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeAutoScalingInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeAutoScalingInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeAutoScalingInstancesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeAutoScalingNotificationTypes = "DescribeAutoScalingNotificationTypes" - -// DescribeAutoScalingNotificationTypesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAutoScalingNotificationTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAutoScalingNotificationTypes for more information on using the DescribeAutoScalingNotificationTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAutoScalingNotificationTypesRequest method. -// req, resp := client.DescribeAutoScalingNotificationTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingNotificationTypes -func (c *AutoScaling) DescribeAutoScalingNotificationTypesRequest(input *DescribeAutoScalingNotificationTypesInput) (req *request.Request, output *DescribeAutoScalingNotificationTypesOutput) { - op := &request.Operation{ - Name: opDescribeAutoScalingNotificationTypes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAutoScalingNotificationTypesInput{} - } - - output = &DescribeAutoScalingNotificationTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAutoScalingNotificationTypes API operation for Auto Scaling. -// -// Describes the notification types that are supported by Amazon EC2 Auto Scaling. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DescribeAutoScalingNotificationTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingNotificationTypes -func (c *AutoScaling) DescribeAutoScalingNotificationTypes(input *DescribeAutoScalingNotificationTypesInput) (*DescribeAutoScalingNotificationTypesOutput, error) { - req, out := c.DescribeAutoScalingNotificationTypesRequest(input) - return out, req.Send() -} - -// DescribeAutoScalingNotificationTypesWithContext is the same as DescribeAutoScalingNotificationTypes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAutoScalingNotificationTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeAutoScalingNotificationTypesWithContext(ctx aws.Context, input *DescribeAutoScalingNotificationTypesInput, opts ...request.Option) (*DescribeAutoScalingNotificationTypesOutput, error) { - req, out := c.DescribeAutoScalingNotificationTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLaunchConfigurations = "DescribeLaunchConfigurations" - -// DescribeLaunchConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLaunchConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLaunchConfigurations for more information on using the DescribeLaunchConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLaunchConfigurationsRequest method. -// req, resp := client.DescribeLaunchConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLaunchConfigurations -func (c *AutoScaling) DescribeLaunchConfigurationsRequest(input *DescribeLaunchConfigurationsInput) (req *request.Request, output *DescribeLaunchConfigurationsOutput) { - op := &request.Operation{ - Name: opDescribeLaunchConfigurations, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeLaunchConfigurationsInput{} - } - - output = &DescribeLaunchConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLaunchConfigurations API operation for Auto Scaling. -// -// Describes one or more launch 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 Auto Scaling's -// API operation DescribeLaunchConfigurations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The NextToken value is not valid. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLaunchConfigurations -func (c *AutoScaling) DescribeLaunchConfigurations(input *DescribeLaunchConfigurationsInput) (*DescribeLaunchConfigurationsOutput, error) { - req, out := c.DescribeLaunchConfigurationsRequest(input) - return out, req.Send() -} - -// DescribeLaunchConfigurationsWithContext is the same as DescribeLaunchConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLaunchConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeLaunchConfigurationsWithContext(ctx aws.Context, input *DescribeLaunchConfigurationsInput, opts ...request.Option) (*DescribeLaunchConfigurationsOutput, error) { - req, out := c.DescribeLaunchConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeLaunchConfigurationsPages iterates over the pages of a DescribeLaunchConfigurations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeLaunchConfigurations 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 DescribeLaunchConfigurations operation. -// pageNum := 0 -// err := client.DescribeLaunchConfigurationsPages(params, -// func(page *DescribeLaunchConfigurationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *AutoScaling) DescribeLaunchConfigurationsPages(input *DescribeLaunchConfigurationsInput, fn func(*DescribeLaunchConfigurationsOutput, bool) bool) error { - return c.DescribeLaunchConfigurationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeLaunchConfigurationsPagesWithContext same as DescribeLaunchConfigurationsPages 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 *AutoScaling) DescribeLaunchConfigurationsPagesWithContext(ctx aws.Context, input *DescribeLaunchConfigurationsInput, fn func(*DescribeLaunchConfigurationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeLaunchConfigurationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLaunchConfigurationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeLaunchConfigurationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeLifecycleHookTypes = "DescribeLifecycleHookTypes" - -// DescribeLifecycleHookTypesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLifecycleHookTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLifecycleHookTypes for more information on using the DescribeLifecycleHookTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLifecycleHookTypesRequest method. -// req, resp := client.DescribeLifecycleHookTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHookTypes -func (c *AutoScaling) DescribeLifecycleHookTypesRequest(input *DescribeLifecycleHookTypesInput) (req *request.Request, output *DescribeLifecycleHookTypesOutput) { - op := &request.Operation{ - Name: opDescribeLifecycleHookTypes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLifecycleHookTypesInput{} - } - - output = &DescribeLifecycleHookTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLifecycleHookTypes API operation for Auto Scaling. -// -// Describes the available types of lifecycle hooks. -// -// The following hook types are supported: -// -// * autoscaling:EC2_INSTANCE_LAUNCHING -// -// * autoscaling:EC2_INSTANCE_TERMINATING -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DescribeLifecycleHookTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHookTypes -func (c *AutoScaling) DescribeLifecycleHookTypes(input *DescribeLifecycleHookTypesInput) (*DescribeLifecycleHookTypesOutput, error) { - req, out := c.DescribeLifecycleHookTypesRequest(input) - return out, req.Send() -} - -// DescribeLifecycleHookTypesWithContext is the same as DescribeLifecycleHookTypes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLifecycleHookTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeLifecycleHookTypesWithContext(ctx aws.Context, input *DescribeLifecycleHookTypesInput, opts ...request.Option) (*DescribeLifecycleHookTypesOutput, error) { - req, out := c.DescribeLifecycleHookTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLifecycleHooks = "DescribeLifecycleHooks" - -// DescribeLifecycleHooksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLifecycleHooks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLifecycleHooks for more information on using the DescribeLifecycleHooks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLifecycleHooksRequest method. -// req, resp := client.DescribeLifecycleHooksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHooks -func (c *AutoScaling) DescribeLifecycleHooksRequest(input *DescribeLifecycleHooksInput) (req *request.Request, output *DescribeLifecycleHooksOutput) { - op := &request.Operation{ - Name: opDescribeLifecycleHooks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLifecycleHooksInput{} - } - - output = &DescribeLifecycleHooksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLifecycleHooks API operation for Auto Scaling. -// -// Describes the lifecycle hooks for the specified Auto Scaling 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 Auto Scaling's -// API operation DescribeLifecycleHooks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHooks -func (c *AutoScaling) DescribeLifecycleHooks(input *DescribeLifecycleHooksInput) (*DescribeLifecycleHooksOutput, error) { - req, out := c.DescribeLifecycleHooksRequest(input) - return out, req.Send() -} - -// DescribeLifecycleHooksWithContext is the same as DescribeLifecycleHooks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLifecycleHooks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeLifecycleHooksWithContext(ctx aws.Context, input *DescribeLifecycleHooksInput, opts ...request.Option) (*DescribeLifecycleHooksOutput, error) { - req, out := c.DescribeLifecycleHooksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLoadBalancerTargetGroups = "DescribeLoadBalancerTargetGroups" - -// DescribeLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBalancerTargetGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLoadBalancerTargetGroups for more information on using the DescribeLoadBalancerTargetGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLoadBalancerTargetGroupsRequest method. -// req, resp := client.DescribeLoadBalancerTargetGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancerTargetGroups -func (c *AutoScaling) DescribeLoadBalancerTargetGroupsRequest(input *DescribeLoadBalancerTargetGroupsInput) (req *request.Request, output *DescribeLoadBalancerTargetGroupsOutput) { - op := &request.Operation{ - Name: opDescribeLoadBalancerTargetGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLoadBalancerTargetGroupsInput{} - } - - output = &DescribeLoadBalancerTargetGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBalancerTargetGroups API operation for Auto Scaling. -// -// Describes the target groups for the specified Auto Scaling 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 Auto Scaling's -// API operation DescribeLoadBalancerTargetGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancerTargetGroups -func (c *AutoScaling) DescribeLoadBalancerTargetGroups(input *DescribeLoadBalancerTargetGroupsInput) (*DescribeLoadBalancerTargetGroupsOutput, error) { - req, out := c.DescribeLoadBalancerTargetGroupsRequest(input) - return out, req.Send() -} - -// DescribeLoadBalancerTargetGroupsWithContext is the same as DescribeLoadBalancerTargetGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBalancerTargetGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeLoadBalancerTargetGroupsWithContext(ctx aws.Context, input *DescribeLoadBalancerTargetGroupsInput, opts ...request.Option) (*DescribeLoadBalancerTargetGroupsOutput, error) { - req, out := c.DescribeLoadBalancerTargetGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLoadBalancers = "DescribeLoadBalancers" - -// DescribeLoadBalancersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBalancers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLoadBalancers for more information on using the DescribeLoadBalancers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLoadBalancersRequest method. -// req, resp := client.DescribeLoadBalancersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancers -func (c *AutoScaling) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *request.Request, output *DescribeLoadBalancersOutput) { - op := &request.Operation{ - Name: opDescribeLoadBalancers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLoadBalancersInput{} - } - - output = &DescribeLoadBalancersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBalancers API operation for Auto Scaling. -// -// Describes the load balancers for the specified Auto Scaling group. -// -// This operation describes only Classic Load Balancers. If you have Application -// Load Balancers, use DescribeLoadBalancerTargetGroups instead. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DescribeLoadBalancers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancers -func (c *AutoScaling) DescribeLoadBalancers(input *DescribeLoadBalancersInput) (*DescribeLoadBalancersOutput, error) { - req, out := c.DescribeLoadBalancersRequest(input) - return out, req.Send() -} - -// DescribeLoadBalancersWithContext is the same as DescribeLoadBalancers with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBalancers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeLoadBalancersWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.Option) (*DescribeLoadBalancersOutput, error) { - req, out := c.DescribeLoadBalancersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMetricCollectionTypes = "DescribeMetricCollectionTypes" - -// DescribeMetricCollectionTypesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMetricCollectionTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMetricCollectionTypes for more information on using the DescribeMetricCollectionTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMetricCollectionTypesRequest method. -// req, resp := client.DescribeMetricCollectionTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeMetricCollectionTypes -func (c *AutoScaling) DescribeMetricCollectionTypesRequest(input *DescribeMetricCollectionTypesInput) (req *request.Request, output *DescribeMetricCollectionTypesOutput) { - op := &request.Operation{ - Name: opDescribeMetricCollectionTypes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMetricCollectionTypesInput{} - } - - output = &DescribeMetricCollectionTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMetricCollectionTypes API operation for Auto Scaling. -// -// Describes the available CloudWatch metrics for Amazon EC2 Auto Scaling. -// -// The GroupStandbyInstances metric is not returned by default. You must explicitly -// request this metric when calling EnableMetricsCollection. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DescribeMetricCollectionTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeMetricCollectionTypes -func (c *AutoScaling) DescribeMetricCollectionTypes(input *DescribeMetricCollectionTypesInput) (*DescribeMetricCollectionTypesOutput, error) { - req, out := c.DescribeMetricCollectionTypesRequest(input) - return out, req.Send() -} - -// DescribeMetricCollectionTypesWithContext is the same as DescribeMetricCollectionTypes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMetricCollectionTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeMetricCollectionTypesWithContext(ctx aws.Context, input *DescribeMetricCollectionTypesInput, opts ...request.Option) (*DescribeMetricCollectionTypesOutput, error) { - req, out := c.DescribeMetricCollectionTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeNotificationConfigurations = "DescribeNotificationConfigurations" - -// DescribeNotificationConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeNotificationConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeNotificationConfigurations for more information on using the DescribeNotificationConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeNotificationConfigurationsRequest method. -// req, resp := client.DescribeNotificationConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeNotificationConfigurations -func (c *AutoScaling) DescribeNotificationConfigurationsRequest(input *DescribeNotificationConfigurationsInput) (req *request.Request, output *DescribeNotificationConfigurationsOutput) { - op := &request.Operation{ - Name: opDescribeNotificationConfigurations, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeNotificationConfigurationsInput{} - } - - output = &DescribeNotificationConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeNotificationConfigurations API operation for Auto Scaling. -// -// Describes the notification actions associated with the specified Auto Scaling -// 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 Auto Scaling's -// API operation DescribeNotificationConfigurations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The NextToken value is not valid. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeNotificationConfigurations -func (c *AutoScaling) DescribeNotificationConfigurations(input *DescribeNotificationConfigurationsInput) (*DescribeNotificationConfigurationsOutput, error) { - req, out := c.DescribeNotificationConfigurationsRequest(input) - return out, req.Send() -} - -// DescribeNotificationConfigurationsWithContext is the same as DescribeNotificationConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeNotificationConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeNotificationConfigurationsWithContext(ctx aws.Context, input *DescribeNotificationConfigurationsInput, opts ...request.Option) (*DescribeNotificationConfigurationsOutput, error) { - req, out := c.DescribeNotificationConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeNotificationConfigurationsPages iterates over the pages of a DescribeNotificationConfigurations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeNotificationConfigurations 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 DescribeNotificationConfigurations operation. -// pageNum := 0 -// err := client.DescribeNotificationConfigurationsPages(params, -// func(page *DescribeNotificationConfigurationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *AutoScaling) DescribeNotificationConfigurationsPages(input *DescribeNotificationConfigurationsInput, fn func(*DescribeNotificationConfigurationsOutput, bool) bool) error { - return c.DescribeNotificationConfigurationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeNotificationConfigurationsPagesWithContext same as DescribeNotificationConfigurationsPages 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 *AutoScaling) DescribeNotificationConfigurationsPagesWithContext(ctx aws.Context, input *DescribeNotificationConfigurationsInput, fn func(*DescribeNotificationConfigurationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeNotificationConfigurationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeNotificationConfigurationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeNotificationConfigurationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribePolicies = "DescribePolicies" - -// DescribePoliciesRequest generates a "aws/request.Request" representing the -// client's request for the DescribePolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePolicies for more information on using the DescribePolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePoliciesRequest method. -// req, resp := client.DescribePoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribePolicies -func (c *AutoScaling) DescribePoliciesRequest(input *DescribePoliciesInput) (req *request.Request, output *DescribePoliciesOutput) { - op := &request.Operation{ - Name: opDescribePolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribePoliciesInput{} - } - - output = &DescribePoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePolicies API operation for Auto Scaling. -// -// Describes the policies for the specified Auto Scaling 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 Auto Scaling's -// API operation DescribePolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The NextToken value is not valid. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure" -// The service-linked role is not yet ready for use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribePolicies -func (c *AutoScaling) DescribePolicies(input *DescribePoliciesInput) (*DescribePoliciesOutput, error) { - req, out := c.DescribePoliciesRequest(input) - return out, req.Send() -} - -// DescribePoliciesWithContext is the same as DescribePolicies with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribePoliciesWithContext(ctx aws.Context, input *DescribePoliciesInput, opts ...request.Option) (*DescribePoliciesOutput, error) { - req, out := c.DescribePoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribePoliciesPages iterates over the pages of a DescribePolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribePolicies 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 DescribePolicies operation. -// pageNum := 0 -// err := client.DescribePoliciesPages(params, -// func(page *DescribePoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *AutoScaling) DescribePoliciesPages(input *DescribePoliciesInput, fn func(*DescribePoliciesOutput, bool) bool) error { - return c.DescribePoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribePoliciesPagesWithContext same as DescribePoliciesPages 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 *AutoScaling) DescribePoliciesPagesWithContext(ctx aws.Context, input *DescribePoliciesInput, fn func(*DescribePoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribePoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribePoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribePoliciesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeScalingActivities = "DescribeScalingActivities" - -// DescribeScalingActivitiesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeScalingActivities operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeScalingActivities for more information on using the DescribeScalingActivities -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeScalingActivitiesRequest method. -// req, resp := client.DescribeScalingActivitiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingActivities -func (c *AutoScaling) DescribeScalingActivitiesRequest(input *DescribeScalingActivitiesInput) (req *request.Request, output *DescribeScalingActivitiesOutput) { - op := &request.Operation{ - Name: opDescribeScalingActivities, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeScalingActivitiesInput{} - } - - output = &DescribeScalingActivitiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeScalingActivities API operation for Auto Scaling. -// -// Describes one or more scaling activities for the specified Auto Scaling 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 Auto Scaling's -// API operation DescribeScalingActivities for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The NextToken value is not valid. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingActivities -func (c *AutoScaling) DescribeScalingActivities(input *DescribeScalingActivitiesInput) (*DescribeScalingActivitiesOutput, error) { - req, out := c.DescribeScalingActivitiesRequest(input) - return out, req.Send() -} - -// DescribeScalingActivitiesWithContext is the same as DescribeScalingActivities with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeScalingActivities for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeScalingActivitiesWithContext(ctx aws.Context, input *DescribeScalingActivitiesInput, opts ...request.Option) (*DescribeScalingActivitiesOutput, error) { - req, out := c.DescribeScalingActivitiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeScalingActivitiesPages iterates over the pages of a DescribeScalingActivities operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeScalingActivities 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 DescribeScalingActivities operation. -// pageNum := 0 -// err := client.DescribeScalingActivitiesPages(params, -// func(page *DescribeScalingActivitiesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *AutoScaling) DescribeScalingActivitiesPages(input *DescribeScalingActivitiesInput, fn func(*DescribeScalingActivitiesOutput, bool) bool) error { - return c.DescribeScalingActivitiesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeScalingActivitiesPagesWithContext same as DescribeScalingActivitiesPages 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 *AutoScaling) DescribeScalingActivitiesPagesWithContext(ctx aws.Context, input *DescribeScalingActivitiesInput, fn func(*DescribeScalingActivitiesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeScalingActivitiesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeScalingActivitiesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScalingActivitiesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeScalingProcessTypes = "DescribeScalingProcessTypes" - -// DescribeScalingProcessTypesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeScalingProcessTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeScalingProcessTypes for more information on using the DescribeScalingProcessTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeScalingProcessTypesRequest method. -// req, resp := client.DescribeScalingProcessTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingProcessTypes -func (c *AutoScaling) DescribeScalingProcessTypesRequest(input *DescribeScalingProcessTypesInput) (req *request.Request, output *DescribeScalingProcessTypesOutput) { - op := &request.Operation{ - Name: opDescribeScalingProcessTypes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeScalingProcessTypesInput{} - } - - output = &DescribeScalingProcessTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeScalingProcessTypes API operation for Auto Scaling. -// -// Describes the scaling process types for use with ResumeProcesses and SuspendProcesses. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DescribeScalingProcessTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingProcessTypes -func (c *AutoScaling) DescribeScalingProcessTypes(input *DescribeScalingProcessTypesInput) (*DescribeScalingProcessTypesOutput, error) { - req, out := c.DescribeScalingProcessTypesRequest(input) - return out, req.Send() -} - -// DescribeScalingProcessTypesWithContext is the same as DescribeScalingProcessTypes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeScalingProcessTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeScalingProcessTypesWithContext(ctx aws.Context, input *DescribeScalingProcessTypesInput, opts ...request.Option) (*DescribeScalingProcessTypesOutput, error) { - req, out := c.DescribeScalingProcessTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeScheduledActions = "DescribeScheduledActions" - -// DescribeScheduledActionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeScheduledActions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeScheduledActions for more information on using the DescribeScheduledActions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeScheduledActionsRequest method. -// req, resp := client.DescribeScheduledActionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScheduledActions -func (c *AutoScaling) DescribeScheduledActionsRequest(input *DescribeScheduledActionsInput) (req *request.Request, output *DescribeScheduledActionsOutput) { - op := &request.Operation{ - Name: opDescribeScheduledActions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeScheduledActionsInput{} - } - - output = &DescribeScheduledActionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeScheduledActions API operation for Auto Scaling. -// -// Describes the actions scheduled for your Auto Scaling group that haven't -// run. To describe the actions that have already run, use DescribeScalingActivities. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DescribeScheduledActions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The NextToken value is not valid. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScheduledActions -func (c *AutoScaling) DescribeScheduledActions(input *DescribeScheduledActionsInput) (*DescribeScheduledActionsOutput, error) { - req, out := c.DescribeScheduledActionsRequest(input) - return out, req.Send() -} - -// DescribeScheduledActionsWithContext is the same as DescribeScheduledActions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeScheduledActions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeScheduledActionsWithContext(ctx aws.Context, input *DescribeScheduledActionsInput, opts ...request.Option) (*DescribeScheduledActionsOutput, error) { - req, out := c.DescribeScheduledActionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeScheduledActionsPages iterates over the pages of a DescribeScheduledActions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeScheduledActions 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 DescribeScheduledActions operation. -// pageNum := 0 -// err := client.DescribeScheduledActionsPages(params, -// func(page *DescribeScheduledActionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *AutoScaling) DescribeScheduledActionsPages(input *DescribeScheduledActionsInput, fn func(*DescribeScheduledActionsOutput, bool) bool) error { - return c.DescribeScheduledActionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeScheduledActionsPagesWithContext same as DescribeScheduledActionsPages 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 *AutoScaling) DescribeScheduledActionsPagesWithContext(ctx aws.Context, input *DescribeScheduledActionsInput, fn func(*DescribeScheduledActionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeScheduledActionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeScheduledActionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScheduledActionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeTags = "DescribeTags" - -// DescribeTagsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTags for more information on using the DescribeTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTagsRequest method. -// req, resp := client.DescribeTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTags -func (c *AutoScaling) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { - op := &request.Operation{ - Name: opDescribeTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeTagsInput{} - } - - output = &DescribeTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTags API operation for Auto Scaling. -// -// Describes the specified tags. -// -// You can use filters to limit the results. For example, you can query for -// the tags for a specific Auto Scaling group. You can specify multiple values -// for a filter. A tag must match at least one of the specified values for it -// to be included in the results. -// -// You can also specify multiple filters. The result includes information for -// a particular tag only if it matches all the filters. If there's no match, -// no special message is returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DescribeTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The NextToken value is not valid. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTags -func (c *AutoScaling) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - return out, req.Send() -} - -// DescribeTagsWithContext is the same as DescribeTags with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeTagsPages iterates over the pages of a DescribeTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeTags 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 DescribeTags operation. -// pageNum := 0 -// err := client.DescribeTagsPages(params, -// func(page *DescribeTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *AutoScaling) DescribeTagsPages(input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool) error { - return c.DescribeTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeTagsPagesWithContext same as DescribeTagsPages 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 *AutoScaling) DescribeTagsPagesWithContext(ctx aws.Context, input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTagsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeTerminationPolicyTypes = "DescribeTerminationPolicyTypes" - -// DescribeTerminationPolicyTypesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTerminationPolicyTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTerminationPolicyTypes for more information on using the DescribeTerminationPolicyTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTerminationPolicyTypesRequest method. -// req, resp := client.DescribeTerminationPolicyTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTerminationPolicyTypes -func (c *AutoScaling) DescribeTerminationPolicyTypesRequest(input *DescribeTerminationPolicyTypesInput) (req *request.Request, output *DescribeTerminationPolicyTypesOutput) { - op := &request.Operation{ - Name: opDescribeTerminationPolicyTypes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTerminationPolicyTypesInput{} - } - - output = &DescribeTerminationPolicyTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTerminationPolicyTypes API operation for Auto Scaling. -// -// Describes the termination policies supported by Amazon EC2 Auto Scaling. -// -// For more information, see Controlling Which Auto Scaling Instances Terminate -// During Scale In (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DescribeTerminationPolicyTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTerminationPolicyTypes -func (c *AutoScaling) DescribeTerminationPolicyTypes(input *DescribeTerminationPolicyTypesInput) (*DescribeTerminationPolicyTypesOutput, error) { - req, out := c.DescribeTerminationPolicyTypesRequest(input) - return out, req.Send() -} - -// DescribeTerminationPolicyTypesWithContext is the same as DescribeTerminationPolicyTypes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTerminationPolicyTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DescribeTerminationPolicyTypesWithContext(ctx aws.Context, input *DescribeTerminationPolicyTypesInput, opts ...request.Option) (*DescribeTerminationPolicyTypesOutput, error) { - req, out := c.DescribeTerminationPolicyTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachInstances = "DetachInstances" - -// DetachInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DetachInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachInstances for more information on using the DetachInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachInstancesRequest method. -// req, resp := client.DetachInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachInstances -func (c *AutoScaling) DetachInstancesRequest(input *DetachInstancesInput) (req *request.Request, output *DetachInstancesOutput) { - op := &request.Operation{ - Name: opDetachInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachInstancesInput{} - } - - output = &DetachInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DetachInstances API operation for Auto Scaling. -// -// Removes one or more instances from the specified Auto Scaling group. -// -// After the instances are detached, you can manage them independent of the -// Auto Scaling group. -// -// If you do not specify the option to decrement the desired capacity, Amazon -// EC2 Auto Scaling launches instances to replace the ones that are detached. -// -// If there is a Classic Load Balancer attached to the Auto Scaling group, the -// instances are deregistered from the load balancer. If there are target groups -// attached to the Auto Scaling group, the instances are deregistered from the -// target groups. -// -// For more information, see Detach EC2 Instances from Your Auto Scaling Group -// (http://docs.aws.amazon.com/autoscaling/ec2/userguide/detach-instance-asg.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DetachInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachInstances -func (c *AutoScaling) DetachInstances(input *DetachInstancesInput) (*DetachInstancesOutput, error) { - req, out := c.DetachInstancesRequest(input) - return out, req.Send() -} - -// DetachInstancesWithContext is the same as DetachInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DetachInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DetachInstancesWithContext(ctx aws.Context, input *DetachInstancesInput, opts ...request.Option) (*DetachInstancesOutput, error) { - req, out := c.DetachInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachLoadBalancerTargetGroups = "DetachLoadBalancerTargetGroups" - -// DetachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DetachLoadBalancerTargetGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachLoadBalancerTargetGroups for more information on using the DetachLoadBalancerTargetGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachLoadBalancerTargetGroupsRequest method. -// req, resp := client.DetachLoadBalancerTargetGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachLoadBalancerTargetGroups -func (c *AutoScaling) DetachLoadBalancerTargetGroupsRequest(input *DetachLoadBalancerTargetGroupsInput) (req *request.Request, output *DetachLoadBalancerTargetGroupsOutput) { - op := &request.Operation{ - Name: opDetachLoadBalancerTargetGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachLoadBalancerTargetGroupsInput{} - } - - output = &DetachLoadBalancerTargetGroupsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachLoadBalancerTargetGroups API operation for Auto Scaling. -// -// Detaches one or more target groups from the specified Auto Scaling 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 Auto Scaling's -// API operation DetachLoadBalancerTargetGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachLoadBalancerTargetGroups -func (c *AutoScaling) DetachLoadBalancerTargetGroups(input *DetachLoadBalancerTargetGroupsInput) (*DetachLoadBalancerTargetGroupsOutput, error) { - req, out := c.DetachLoadBalancerTargetGroupsRequest(input) - return out, req.Send() -} - -// DetachLoadBalancerTargetGroupsWithContext is the same as DetachLoadBalancerTargetGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DetachLoadBalancerTargetGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DetachLoadBalancerTargetGroupsWithContext(ctx aws.Context, input *DetachLoadBalancerTargetGroupsInput, opts ...request.Option) (*DetachLoadBalancerTargetGroupsOutput, error) { - req, out := c.DetachLoadBalancerTargetGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachLoadBalancers = "DetachLoadBalancers" - -// DetachLoadBalancersRequest generates a "aws/request.Request" representing the -// client's request for the DetachLoadBalancers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachLoadBalancers for more information on using the DetachLoadBalancers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachLoadBalancersRequest method. -// req, resp := client.DetachLoadBalancersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachLoadBalancers -func (c *AutoScaling) DetachLoadBalancersRequest(input *DetachLoadBalancersInput) (req *request.Request, output *DetachLoadBalancersOutput) { - op := &request.Operation{ - Name: opDetachLoadBalancers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachLoadBalancersInput{} - } - - output = &DetachLoadBalancersOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachLoadBalancers API operation for Auto Scaling. -// -// Detaches one or more Classic Load Balancers from the specified Auto Scaling -// group. -// -// This operation detaches only Classic Load Balancers. If you have Application -// Load Balancers, use DetachLoadBalancerTargetGroups instead. -// -// When you detach a load balancer, it enters the Removing state while deregistering -// the instances in the group. When all instances are deregistered, then you -// can no longer describe the load balancer using DescribeLoadBalancers. The -// instances remain running. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation DetachLoadBalancers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachLoadBalancers -func (c *AutoScaling) DetachLoadBalancers(input *DetachLoadBalancersInput) (*DetachLoadBalancersOutput, error) { - req, out := c.DetachLoadBalancersRequest(input) - return out, req.Send() -} - -// DetachLoadBalancersWithContext is the same as DetachLoadBalancers with the addition of -// the ability to pass a context and additional request options. -// -// See DetachLoadBalancers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DetachLoadBalancersWithContext(ctx aws.Context, input *DetachLoadBalancersInput, opts ...request.Option) (*DetachLoadBalancersOutput, error) { - req, out := c.DetachLoadBalancersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableMetricsCollection = "DisableMetricsCollection" - -// DisableMetricsCollectionRequest generates a "aws/request.Request" representing the -// client's request for the DisableMetricsCollection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableMetricsCollection for more information on using the DisableMetricsCollection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableMetricsCollectionRequest method. -// req, resp := client.DisableMetricsCollectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DisableMetricsCollection -func (c *AutoScaling) DisableMetricsCollectionRequest(input *DisableMetricsCollectionInput) (req *request.Request, output *DisableMetricsCollectionOutput) { - op := &request.Operation{ - Name: opDisableMetricsCollection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableMetricsCollectionInput{} - } - - output = &DisableMetricsCollectionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisableMetricsCollection API operation for Auto Scaling. -// -// Disables group metrics for the specified Auto Scaling 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 Auto Scaling's -// API operation DisableMetricsCollection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DisableMetricsCollection -func (c *AutoScaling) DisableMetricsCollection(input *DisableMetricsCollectionInput) (*DisableMetricsCollectionOutput, error) { - req, out := c.DisableMetricsCollectionRequest(input) - return out, req.Send() -} - -// DisableMetricsCollectionWithContext is the same as DisableMetricsCollection with the addition of -// the ability to pass a context and additional request options. -// -// See DisableMetricsCollection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) DisableMetricsCollectionWithContext(ctx aws.Context, input *DisableMetricsCollectionInput, opts ...request.Option) (*DisableMetricsCollectionOutput, error) { - req, out := c.DisableMetricsCollectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableMetricsCollection = "EnableMetricsCollection" - -// EnableMetricsCollectionRequest generates a "aws/request.Request" representing the -// client's request for the EnableMetricsCollection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableMetricsCollection for more information on using the EnableMetricsCollection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableMetricsCollectionRequest method. -// req, resp := client.EnableMetricsCollectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnableMetricsCollection -func (c *AutoScaling) EnableMetricsCollectionRequest(input *EnableMetricsCollectionInput) (req *request.Request, output *EnableMetricsCollectionOutput) { - op := &request.Operation{ - Name: opEnableMetricsCollection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableMetricsCollectionInput{} - } - - output = &EnableMetricsCollectionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableMetricsCollection API operation for Auto Scaling. -// -// Enables group metrics for the specified Auto Scaling group. For more information, -// see Monitoring Your Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-monitoring.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation EnableMetricsCollection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnableMetricsCollection -func (c *AutoScaling) EnableMetricsCollection(input *EnableMetricsCollectionInput) (*EnableMetricsCollectionOutput, error) { - req, out := c.EnableMetricsCollectionRequest(input) - return out, req.Send() -} - -// EnableMetricsCollectionWithContext is the same as EnableMetricsCollection with the addition of -// the ability to pass a context and additional request options. -// -// See EnableMetricsCollection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) EnableMetricsCollectionWithContext(ctx aws.Context, input *EnableMetricsCollectionInput, opts ...request.Option) (*EnableMetricsCollectionOutput, error) { - req, out := c.EnableMetricsCollectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnterStandby = "EnterStandby" - -// EnterStandbyRequest generates a "aws/request.Request" representing the -// client's request for the EnterStandby operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnterStandby for more information on using the EnterStandby -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnterStandbyRequest method. -// req, resp := client.EnterStandbyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnterStandby -func (c *AutoScaling) EnterStandbyRequest(input *EnterStandbyInput) (req *request.Request, output *EnterStandbyOutput) { - op := &request.Operation{ - Name: opEnterStandby, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnterStandbyInput{} - } - - output = &EnterStandbyOutput{} - req = c.newRequest(op, input, output) - return -} - -// EnterStandby API operation for Auto Scaling. -// -// Moves the specified instances into the standby state. -// -// For more information, see Temporarily Removing Instances from Your Auto Scaling -// Group (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation EnterStandby for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnterStandby -func (c *AutoScaling) EnterStandby(input *EnterStandbyInput) (*EnterStandbyOutput, error) { - req, out := c.EnterStandbyRequest(input) - return out, req.Send() -} - -// EnterStandbyWithContext is the same as EnterStandby with the addition of -// the ability to pass a context and additional request options. -// -// See EnterStandby for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) EnterStandbyWithContext(ctx aws.Context, input *EnterStandbyInput, opts ...request.Option) (*EnterStandbyOutput, error) { - req, out := c.EnterStandbyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opExecutePolicy = "ExecutePolicy" - -// ExecutePolicyRequest generates a "aws/request.Request" representing the -// client's request for the ExecutePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ExecutePolicy for more information on using the ExecutePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ExecutePolicyRequest method. -// req, resp := client.ExecutePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExecutePolicy -func (c *AutoScaling) ExecutePolicyRequest(input *ExecutePolicyInput) (req *request.Request, output *ExecutePolicyOutput) { - op := &request.Operation{ - Name: opExecutePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ExecutePolicyInput{} - } - - output = &ExecutePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ExecutePolicy API operation for Auto Scaling. -// -// Executes the specified policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation ExecutePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress" -// The operation can't be performed because there are scaling activities in -// progress. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExecutePolicy -func (c *AutoScaling) ExecutePolicy(input *ExecutePolicyInput) (*ExecutePolicyOutput, error) { - req, out := c.ExecutePolicyRequest(input) - return out, req.Send() -} - -// ExecutePolicyWithContext is the same as ExecutePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See ExecutePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) ExecutePolicyWithContext(ctx aws.Context, input *ExecutePolicyInput, opts ...request.Option) (*ExecutePolicyOutput, error) { - req, out := c.ExecutePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opExitStandby = "ExitStandby" - -// ExitStandbyRequest generates a "aws/request.Request" representing the -// client's request for the ExitStandby operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ExitStandby for more information on using the ExitStandby -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ExitStandbyRequest method. -// req, resp := client.ExitStandbyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExitStandby -func (c *AutoScaling) ExitStandbyRequest(input *ExitStandbyInput) (req *request.Request, output *ExitStandbyOutput) { - op := &request.Operation{ - Name: opExitStandby, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ExitStandbyInput{} - } - - output = &ExitStandbyOutput{} - req = c.newRequest(op, input, output) - return -} - -// ExitStandby API operation for Auto Scaling. -// -// Moves the specified instances out of the standby state. -// -// For more information, see Temporarily Removing Instances from Your Auto Scaling -// Group (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation ExitStandby for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExitStandby -func (c *AutoScaling) ExitStandby(input *ExitStandbyInput) (*ExitStandbyOutput, error) { - req, out := c.ExitStandbyRequest(input) - return out, req.Send() -} - -// ExitStandbyWithContext is the same as ExitStandby with the addition of -// the ability to pass a context and additional request options. -// -// See ExitStandby for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) ExitStandbyWithContext(ctx aws.Context, input *ExitStandbyInput, opts ...request.Option) (*ExitStandbyOutput, error) { - req, out := c.ExitStandbyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutLifecycleHook = "PutLifecycleHook" - -// PutLifecycleHookRequest generates a "aws/request.Request" representing the -// client's request for the PutLifecycleHook operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutLifecycleHook for more information on using the PutLifecycleHook -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutLifecycleHookRequest method. -// req, resp := client.PutLifecycleHookRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutLifecycleHook -func (c *AutoScaling) PutLifecycleHookRequest(input *PutLifecycleHookInput) (req *request.Request, output *PutLifecycleHookOutput) { - op := &request.Operation{ - Name: opPutLifecycleHook, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutLifecycleHookInput{} - } - - output = &PutLifecycleHookOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutLifecycleHook API operation for Auto Scaling. -// -// Creates or updates a lifecycle hook for the specified Auto Scaling group. -// -// A lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an -// instance that is not actively in service; for example, either when the instance -// launches or before the instance terminates. -// -// This step is a part of the procedure for adding a lifecycle hook to an Auto -// Scaling group: -// -// (Optional) Create a Lambda function and a rule that allows CloudWatch Events -// to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates -// instances. -// -// (Optional) Create a notification target and an IAM role. The target can be -// either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon -// EC2 Auto Scaling to publish lifecycle notifications to the target. -// -// Create the lifecycle hook. Specify whether the hook is used when the instances -// launch or terminate. -// -// If you need more time, record the lifecycle action heartbeat to keep the -// instance in a pending state. -// -// If you finish before the timeout period ends, complete the lifecycle action. -// -// For more information, see Auto Scaling Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// If you exceed your maximum limit of lifecycle hooks, which by default is -// 50 per Auto Scaling group, the call fails. For information about updating -// this limit, see AWS Service Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) -// in the Amazon Web Services General Reference. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation PutLifecycleHook for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededFault "LimitExceeded" -// You have already reached a limit for your Auto Scaling resources (for example, -// groups, launch configurations, or lifecycle hooks). For more information, -// see DescribeAccountLimits. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutLifecycleHook -func (c *AutoScaling) PutLifecycleHook(input *PutLifecycleHookInput) (*PutLifecycleHookOutput, error) { - req, out := c.PutLifecycleHookRequest(input) - return out, req.Send() -} - -// PutLifecycleHookWithContext is the same as PutLifecycleHook with the addition of -// the ability to pass a context and additional request options. -// -// See PutLifecycleHook for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) PutLifecycleHookWithContext(ctx aws.Context, input *PutLifecycleHookInput, opts ...request.Option) (*PutLifecycleHookOutput, error) { - req, out := c.PutLifecycleHookRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutNotificationConfiguration = "PutNotificationConfiguration" - -// PutNotificationConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the PutNotificationConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutNotificationConfiguration for more information on using the PutNotificationConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutNotificationConfigurationRequest method. -// req, resp := client.PutNotificationConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutNotificationConfiguration -func (c *AutoScaling) PutNotificationConfigurationRequest(input *PutNotificationConfigurationInput) (req *request.Request, output *PutNotificationConfigurationOutput) { - op := &request.Operation{ - Name: opPutNotificationConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutNotificationConfigurationInput{} - } - - output = &PutNotificationConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutNotificationConfiguration API operation for Auto Scaling. -// -// Configures an Auto Scaling group to send notifications when specified events -// take place. Subscribers to the specified topic can have messages delivered -// to an endpoint such as a web server or an email address. -// -// This configuration overwrites any existing configuration. -// -// For more information, see Getting SNS Notifications When Your Auto Scaling -// Group Scales (http://docs.aws.amazon.com/autoscaling/ec2/userguide/ASGettingNotifications.html) -// in the Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation PutNotificationConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededFault "LimitExceeded" -// You have already reached a limit for your Auto Scaling resources (for example, -// groups, launch configurations, or lifecycle hooks). For more information, -// see DescribeAccountLimits. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure" -// The service-linked role is not yet ready for use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutNotificationConfiguration -func (c *AutoScaling) PutNotificationConfiguration(input *PutNotificationConfigurationInput) (*PutNotificationConfigurationOutput, error) { - req, out := c.PutNotificationConfigurationRequest(input) - return out, req.Send() -} - -// PutNotificationConfigurationWithContext is the same as PutNotificationConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See PutNotificationConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) PutNotificationConfigurationWithContext(ctx aws.Context, input *PutNotificationConfigurationInput, opts ...request.Option) (*PutNotificationConfigurationOutput, error) { - req, out := c.PutNotificationConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutScalingPolicy = "PutScalingPolicy" - -// PutScalingPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutScalingPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutScalingPolicy for more information on using the PutScalingPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutScalingPolicyRequest method. -// req, resp := client.PutScalingPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutScalingPolicy -func (c *AutoScaling) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req *request.Request, output *PutScalingPolicyOutput) { - op := &request.Operation{ - Name: opPutScalingPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutScalingPolicyInput{} - } - - output = &PutScalingPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutScalingPolicy API operation for Auto Scaling. -// -// Creates or updates a policy for an Auto Scaling group. To update an existing -// policy, use the existing policy name and set the parameters to change. Any -// existing parameter not changed in an update to an existing policy is not -// changed in this update request. -// -// If you exceed your maximum limit of step adjustments, which by default is -// 20 per region, the call fails. For information about updating this limit, -// see AWS Service Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) -// in the Amazon Web Services General Reference. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation PutScalingPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededFault "LimitExceeded" -// You have already reached a limit for your Auto Scaling resources (for example, -// groups, launch configurations, or lifecycle hooks). For more information, -// see DescribeAccountLimits. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure" -// The service-linked role is not yet ready for use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutScalingPolicy -func (c *AutoScaling) PutScalingPolicy(input *PutScalingPolicyInput) (*PutScalingPolicyOutput, error) { - req, out := c.PutScalingPolicyRequest(input) - return out, req.Send() -} - -// PutScalingPolicyWithContext is the same as PutScalingPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutScalingPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) PutScalingPolicyWithContext(ctx aws.Context, input *PutScalingPolicyInput, opts ...request.Option) (*PutScalingPolicyOutput, error) { - req, out := c.PutScalingPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutScheduledUpdateGroupAction = "PutScheduledUpdateGroupAction" - -// PutScheduledUpdateGroupActionRequest generates a "aws/request.Request" representing the -// client's request for the PutScheduledUpdateGroupAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutScheduledUpdateGroupAction for more information on using the PutScheduledUpdateGroupAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutScheduledUpdateGroupActionRequest method. -// req, resp := client.PutScheduledUpdateGroupActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutScheduledUpdateGroupAction -func (c *AutoScaling) PutScheduledUpdateGroupActionRequest(input *PutScheduledUpdateGroupActionInput) (req *request.Request, output *PutScheduledUpdateGroupActionOutput) { - op := &request.Operation{ - Name: opPutScheduledUpdateGroupAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutScheduledUpdateGroupActionInput{} - } - - output = &PutScheduledUpdateGroupActionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutScheduledUpdateGroupAction API operation for Auto Scaling. -// -// Creates or updates a scheduled scaling action for an Auto Scaling group. -// If you leave a parameter unspecified when updating a scheduled scaling action, -// the corresponding value remains unchanged. -// -// For more information, see Scheduled Scaling (http://docs.aws.amazon.com/autoscaling/ec2/userguide/schedule_time.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation PutScheduledUpdateGroupAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAlreadyExistsFault "AlreadyExists" -// You already have an Auto Scaling group or launch configuration with this -// name. -// -// * ErrCodeLimitExceededFault "LimitExceeded" -// You have already reached a limit for your Auto Scaling resources (for example, -// groups, launch configurations, or lifecycle hooks). For more information, -// see DescribeAccountLimits. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutScheduledUpdateGroupAction -func (c *AutoScaling) PutScheduledUpdateGroupAction(input *PutScheduledUpdateGroupActionInput) (*PutScheduledUpdateGroupActionOutput, error) { - req, out := c.PutScheduledUpdateGroupActionRequest(input) - return out, req.Send() -} - -// PutScheduledUpdateGroupActionWithContext is the same as PutScheduledUpdateGroupAction with the addition of -// the ability to pass a context and additional request options. -// -// See PutScheduledUpdateGroupAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) PutScheduledUpdateGroupActionWithContext(ctx aws.Context, input *PutScheduledUpdateGroupActionInput, opts ...request.Option) (*PutScheduledUpdateGroupActionOutput, error) { - req, out := c.PutScheduledUpdateGroupActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRecordLifecycleActionHeartbeat = "RecordLifecycleActionHeartbeat" - -// RecordLifecycleActionHeartbeatRequest generates a "aws/request.Request" representing the -// client's request for the RecordLifecycleActionHeartbeat operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RecordLifecycleActionHeartbeat for more information on using the RecordLifecycleActionHeartbeat -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RecordLifecycleActionHeartbeatRequest method. -// req, resp := client.RecordLifecycleActionHeartbeatRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/RecordLifecycleActionHeartbeat -func (c *AutoScaling) RecordLifecycleActionHeartbeatRequest(input *RecordLifecycleActionHeartbeatInput) (req *request.Request, output *RecordLifecycleActionHeartbeatOutput) { - op := &request.Operation{ - Name: opRecordLifecycleActionHeartbeat, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RecordLifecycleActionHeartbeatInput{} - } - - output = &RecordLifecycleActionHeartbeatOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RecordLifecycleActionHeartbeat API operation for Auto Scaling. -// -// Records a heartbeat for the lifecycle action associated with the specified -// token or instance. This extends the timeout by the length of time defined -// using PutLifecycleHook. -// -// This step is a part of the procedure for adding a lifecycle hook to an Auto -// Scaling group: -// -// (Optional) Create a Lambda function and a rule that allows CloudWatch Events -// to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates -// instances. -// -// (Optional) Create a notification target and an IAM role. The target can be -// either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon -// EC2 Auto Scaling to publish lifecycle notifications to the target. -// -// Create the lifecycle hook. Specify whether the hook is used when the instances -// launch or terminate. -// -// If you need more time, record the lifecycle action heartbeat to keep the -// instance in a pending state. -// -// If you finish before the timeout period ends, complete the lifecycle action. -// -// For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation RecordLifecycleActionHeartbeat for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/RecordLifecycleActionHeartbeat -func (c *AutoScaling) RecordLifecycleActionHeartbeat(input *RecordLifecycleActionHeartbeatInput) (*RecordLifecycleActionHeartbeatOutput, error) { - req, out := c.RecordLifecycleActionHeartbeatRequest(input) - return out, req.Send() -} - -// RecordLifecycleActionHeartbeatWithContext is the same as RecordLifecycleActionHeartbeat with the addition of -// the ability to pass a context and additional request options. -// -// See RecordLifecycleActionHeartbeat for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) RecordLifecycleActionHeartbeatWithContext(ctx aws.Context, input *RecordLifecycleActionHeartbeatInput, opts ...request.Option) (*RecordLifecycleActionHeartbeatOutput, error) { - req, out := c.RecordLifecycleActionHeartbeatRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResumeProcesses = "ResumeProcesses" - -// ResumeProcessesRequest generates a "aws/request.Request" representing the -// client's request for the ResumeProcesses operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResumeProcesses for more information on using the ResumeProcesses -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResumeProcessesRequest method. -// req, resp := client.ResumeProcessesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ResumeProcesses -func (c *AutoScaling) ResumeProcessesRequest(input *ScalingProcessQuery) (req *request.Request, output *ResumeProcessesOutput) { - op := &request.Operation{ - Name: opResumeProcesses, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ScalingProcessQuery{} - } - - output = &ResumeProcessesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ResumeProcesses API operation for Auto Scaling. -// -// Resumes the specified suspended automatic scaling processes, or all suspended -// process, for the specified Auto Scaling group. -// -// For more information, see Suspending and Resuming Scaling Processes (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation ResumeProcesses for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUseFault "ResourceInUse" -// The operation can't be performed because the resource is in use. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ResumeProcesses -func (c *AutoScaling) ResumeProcesses(input *ScalingProcessQuery) (*ResumeProcessesOutput, error) { - req, out := c.ResumeProcessesRequest(input) - return out, req.Send() -} - -// ResumeProcessesWithContext is the same as ResumeProcesses with the addition of -// the ability to pass a context and additional request options. -// -// See ResumeProcesses for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) ResumeProcessesWithContext(ctx aws.Context, input *ScalingProcessQuery, opts ...request.Option) (*ResumeProcessesOutput, error) { - req, out := c.ResumeProcessesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetDesiredCapacity = "SetDesiredCapacity" - -// SetDesiredCapacityRequest generates a "aws/request.Request" representing the -// client's request for the SetDesiredCapacity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetDesiredCapacity for more information on using the SetDesiredCapacity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetDesiredCapacityRequest method. -// req, resp := client.SetDesiredCapacityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetDesiredCapacity -func (c *AutoScaling) SetDesiredCapacityRequest(input *SetDesiredCapacityInput) (req *request.Request, output *SetDesiredCapacityOutput) { - op := &request.Operation{ - Name: opSetDesiredCapacity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetDesiredCapacityInput{} - } - - output = &SetDesiredCapacityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetDesiredCapacity API operation for Auto Scaling. -// -// Sets the size of the specified Auto Scaling group. -// -// For more information about desired capacity, see What Is Amazon EC2 Auto -// Scaling? (http://docs.aws.amazon.com/autoscaling/ec2/userguide/WhatIsAutoScaling.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation SetDesiredCapacity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress" -// The operation can't be performed because there are scaling activities in -// progress. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetDesiredCapacity -func (c *AutoScaling) SetDesiredCapacity(input *SetDesiredCapacityInput) (*SetDesiredCapacityOutput, error) { - req, out := c.SetDesiredCapacityRequest(input) - return out, req.Send() -} - -// SetDesiredCapacityWithContext is the same as SetDesiredCapacity with the addition of -// the ability to pass a context and additional request options. -// -// See SetDesiredCapacity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) SetDesiredCapacityWithContext(ctx aws.Context, input *SetDesiredCapacityInput, opts ...request.Option) (*SetDesiredCapacityOutput, error) { - req, out := c.SetDesiredCapacityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetInstanceHealth = "SetInstanceHealth" - -// SetInstanceHealthRequest generates a "aws/request.Request" representing the -// client's request for the SetInstanceHealth operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetInstanceHealth for more information on using the SetInstanceHealth -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetInstanceHealthRequest method. -// req, resp := client.SetInstanceHealthRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceHealth -func (c *AutoScaling) SetInstanceHealthRequest(input *SetInstanceHealthInput) (req *request.Request, output *SetInstanceHealthOutput) { - op := &request.Operation{ - Name: opSetInstanceHealth, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetInstanceHealthInput{} - } - - output = &SetInstanceHealthOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetInstanceHealth API operation for Auto Scaling. -// -// Sets the health status of the specified instance. -// -// For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation SetInstanceHealth for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceHealth -func (c *AutoScaling) SetInstanceHealth(input *SetInstanceHealthInput) (*SetInstanceHealthOutput, error) { - req, out := c.SetInstanceHealthRequest(input) - return out, req.Send() -} - -// SetInstanceHealthWithContext is the same as SetInstanceHealth with the addition of -// the ability to pass a context and additional request options. -// -// See SetInstanceHealth for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) SetInstanceHealthWithContext(ctx aws.Context, input *SetInstanceHealthInput, opts ...request.Option) (*SetInstanceHealthOutput, error) { - req, out := c.SetInstanceHealthRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetInstanceProtection = "SetInstanceProtection" - -// SetInstanceProtectionRequest generates a "aws/request.Request" representing the -// client's request for the SetInstanceProtection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetInstanceProtection for more information on using the SetInstanceProtection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetInstanceProtectionRequest method. -// req, resp := client.SetInstanceProtectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceProtection -func (c *AutoScaling) SetInstanceProtectionRequest(input *SetInstanceProtectionInput) (req *request.Request, output *SetInstanceProtectionOutput) { - op := &request.Operation{ - Name: opSetInstanceProtection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetInstanceProtectionInput{} - } - - output = &SetInstanceProtectionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetInstanceProtection API operation for Auto Scaling. -// -// Updates the instance protection settings of the specified instances. -// -// For more information, see Instance Protection (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation SetInstanceProtection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededFault "LimitExceeded" -// You have already reached a limit for your Auto Scaling resources (for example, -// groups, launch configurations, or lifecycle hooks). For more information, -// see DescribeAccountLimits. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceProtection -func (c *AutoScaling) SetInstanceProtection(input *SetInstanceProtectionInput) (*SetInstanceProtectionOutput, error) { - req, out := c.SetInstanceProtectionRequest(input) - return out, req.Send() -} - -// SetInstanceProtectionWithContext is the same as SetInstanceProtection with the addition of -// the ability to pass a context and additional request options. -// -// See SetInstanceProtection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) SetInstanceProtectionWithContext(ctx aws.Context, input *SetInstanceProtectionInput, opts ...request.Option) (*SetInstanceProtectionOutput, error) { - req, out := c.SetInstanceProtectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSuspendProcesses = "SuspendProcesses" - -// SuspendProcessesRequest generates a "aws/request.Request" representing the -// client's request for the SuspendProcesses operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SuspendProcesses for more information on using the SuspendProcesses -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SuspendProcessesRequest method. -// req, resp := client.SuspendProcessesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SuspendProcesses -func (c *AutoScaling) SuspendProcessesRequest(input *ScalingProcessQuery) (req *request.Request, output *SuspendProcessesOutput) { - op := &request.Operation{ - Name: opSuspendProcesses, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ScalingProcessQuery{} - } - - output = &SuspendProcessesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SuspendProcesses API operation for Auto Scaling. -// -// Suspends the specified automatic scaling processes, or all processes, for -// the specified Auto Scaling group. -// -// If you suspend either the Launch or Terminate process types, it can prevent -// other process types from functioning properly. -// -// To resume processes that have been suspended, use ResumeProcesses. -// -// For more information, see Suspending and Resuming Scaling Processes (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html) -// in the Amazon EC2 Auto Scaling User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation SuspendProcesses for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUseFault "ResourceInUse" -// The operation can't be performed because the resource is in use. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SuspendProcesses -func (c *AutoScaling) SuspendProcesses(input *ScalingProcessQuery) (*SuspendProcessesOutput, error) { - req, out := c.SuspendProcessesRequest(input) - return out, req.Send() -} - -// SuspendProcessesWithContext is the same as SuspendProcesses with the addition of -// the ability to pass a context and additional request options. -// -// See SuspendProcesses for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) SuspendProcessesWithContext(ctx aws.Context, input *ScalingProcessQuery, opts ...request.Option) (*SuspendProcessesOutput, error) { - req, out := c.SuspendProcessesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTerminateInstanceInAutoScalingGroup = "TerminateInstanceInAutoScalingGroup" - -// TerminateInstanceInAutoScalingGroupRequest generates a "aws/request.Request" representing the -// client's request for the TerminateInstanceInAutoScalingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TerminateInstanceInAutoScalingGroup for more information on using the TerminateInstanceInAutoScalingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TerminateInstanceInAutoScalingGroupRequest method. -// req, resp := client.TerminateInstanceInAutoScalingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/TerminateInstanceInAutoScalingGroup -func (c *AutoScaling) TerminateInstanceInAutoScalingGroupRequest(input *TerminateInstanceInAutoScalingGroupInput) (req *request.Request, output *TerminateInstanceInAutoScalingGroupOutput) { - op := &request.Operation{ - Name: opTerminateInstanceInAutoScalingGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TerminateInstanceInAutoScalingGroupInput{} - } - - output = &TerminateInstanceInAutoScalingGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// TerminateInstanceInAutoScalingGroup API operation for Auto Scaling. -// -// Terminates the specified instance and optionally adjusts the desired group -// size. -// -// This call simply makes a termination request. The instance is not terminated -// immediately. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation TerminateInstanceInAutoScalingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress" -// The operation can't be performed because there are scaling activities in -// progress. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/TerminateInstanceInAutoScalingGroup -func (c *AutoScaling) TerminateInstanceInAutoScalingGroup(input *TerminateInstanceInAutoScalingGroupInput) (*TerminateInstanceInAutoScalingGroupOutput, error) { - req, out := c.TerminateInstanceInAutoScalingGroupRequest(input) - return out, req.Send() -} - -// TerminateInstanceInAutoScalingGroupWithContext is the same as TerminateInstanceInAutoScalingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See TerminateInstanceInAutoScalingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) TerminateInstanceInAutoScalingGroupWithContext(ctx aws.Context, input *TerminateInstanceInAutoScalingGroupInput, opts ...request.Option) (*TerminateInstanceInAutoScalingGroupOutput, error) { - req, out := c.TerminateInstanceInAutoScalingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAutoScalingGroup = "UpdateAutoScalingGroup" - -// UpdateAutoScalingGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAutoScalingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAutoScalingGroup for more information on using the UpdateAutoScalingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAutoScalingGroupRequest method. -// req, resp := client.UpdateAutoScalingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/UpdateAutoScalingGroup -func (c *AutoScaling) UpdateAutoScalingGroupRequest(input *UpdateAutoScalingGroupInput) (req *request.Request, output *UpdateAutoScalingGroupOutput) { - op := &request.Operation{ - Name: opUpdateAutoScalingGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAutoScalingGroupInput{} - } - - output = &UpdateAutoScalingGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateAutoScalingGroup API operation for Auto Scaling. -// -// Updates the configuration for the specified Auto Scaling group. -// -// The new settings take effect on any scaling activities after this call returns. -// Scaling activities that are currently in progress aren't affected. -// -// To update an Auto Scaling group with a launch configuration with InstanceMonitoring -// set to false, you must first disable the collection of group metrics. Otherwise, -// you get an error. If you have previously enabled the collection of group -// metrics, you can disable it using DisableMetricsCollection. -// -// Note the following: -// -// * If you specify a new value for MinSize without specifying a value for -// DesiredCapacity, and the new MinSize is larger than the current size of -// the group, we implicitly call SetDesiredCapacity to set the size of the -// group to the new value of MinSize. -// -// * If you specify a new value for MaxSize without specifying a value for -// DesiredCapacity, and the new MaxSize is smaller than the current size -// of the group, we implicitly call SetDesiredCapacity to set the size of -// the group to the new value of MaxSize. -// -// * All other optional parameters are left unchanged if not specified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Auto Scaling's -// API operation UpdateAutoScalingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress" -// The operation can't be performed because there are scaling activities in -// progress. -// -// * ErrCodeResourceContentionFault "ResourceContention" -// You already have a pending update to an Auto Scaling resource (for example, -// a group, instance, or load balancer). -// -// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure" -// The service-linked role is not yet ready for use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/UpdateAutoScalingGroup -func (c *AutoScaling) UpdateAutoScalingGroup(input *UpdateAutoScalingGroupInput) (*UpdateAutoScalingGroupOutput, error) { - req, out := c.UpdateAutoScalingGroupRequest(input) - return out, req.Send() -} - -// UpdateAutoScalingGroupWithContext is the same as UpdateAutoScalingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAutoScalingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) UpdateAutoScalingGroupWithContext(ctx aws.Context, input *UpdateAutoScalingGroupInput, opts ...request.Option) (*UpdateAutoScalingGroupOutput, error) { - req, out := c.UpdateAutoScalingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Describes scaling activity, which is a long-running process that represents -// a change to your Auto Scaling group, such as changing its size or replacing -// an instance. -type Activity struct { - _ struct{} `type:"structure"` - - // The ID of the activity. - // - // ActivityId is a required field - ActivityId *string `type:"string" required:"true"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The reason the activity began. - // - // Cause is a required field - Cause *string `min:"1" type:"string" required:"true"` - - // A friendly, more verbose description of the activity. - Description *string `type:"string"` - - // The details about the activity. - Details *string `type:"string"` - - // The end time of the activity. - EndTime *time.Time `type:"timestamp"` - - // A value between 0 and 100 that indicates the progress of the activity. - Progress *int64 `type:"integer"` - - // The start time of the activity. - // - // StartTime is a required field - StartTime *time.Time `type:"timestamp" required:"true"` - - // The current status of the activity. - // - // StatusCode is a required field - StatusCode *string `type:"string" required:"true" enum:"ScalingActivityStatusCode"` - - // A friendly, more verbose description of the activity status. - StatusMessage *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s Activity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Activity) GoString() string { - return s.String() -} - -// SetActivityId sets the ActivityId field's value. -func (s *Activity) SetActivityId(v string) *Activity { - s.ActivityId = &v - return s -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *Activity) SetAutoScalingGroupName(v string) *Activity { - s.AutoScalingGroupName = &v - return s -} - -// SetCause sets the Cause field's value. -func (s *Activity) SetCause(v string) *Activity { - s.Cause = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Activity) SetDescription(v string) *Activity { - s.Description = &v - return s -} - -// SetDetails sets the Details field's value. -func (s *Activity) SetDetails(v string) *Activity { - s.Details = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *Activity) SetEndTime(v time.Time) *Activity { - s.EndTime = &v - return s -} - -// SetProgress sets the Progress field's value. -func (s *Activity) SetProgress(v int64) *Activity { - s.Progress = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *Activity) SetStartTime(v time.Time) *Activity { - s.StartTime = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *Activity) SetStatusCode(v string) *Activity { - s.StatusCode = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *Activity) SetStatusMessage(v string) *Activity { - s.StatusMessage = &v - return s -} - -// Describes a policy adjustment type. -// -// For more information, see Dynamic Scaling (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scale-based-on-demand.html) -// in the Amazon EC2 Auto Scaling User Guide. -type AdjustmentType struct { - _ struct{} `type:"structure"` - - // The policy adjustment type. The valid values are ChangeInCapacity, ExactCapacity, - // and PercentChangeInCapacity. - AdjustmentType *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s AdjustmentType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdjustmentType) GoString() string { - return s.String() -} - -// SetAdjustmentType sets the AdjustmentType field's value. -func (s *AdjustmentType) SetAdjustmentType(v string) *AdjustmentType { - s.AdjustmentType = &v - return s -} - -// Describes an alarm. -type Alarm struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the alarm. - AlarmARN *string `min:"1" type:"string"` - - // The name of the alarm. - AlarmName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s Alarm) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Alarm) GoString() string { - return s.String() -} - -// SetAlarmARN sets the AlarmARN field's value. -func (s *Alarm) SetAlarmARN(v string) *Alarm { - s.AlarmARN = &v - return s -} - -// SetAlarmName sets the AlarmName field's value. -func (s *Alarm) SetAlarmName(v string) *Alarm { - s.AlarmName = &v - return s -} - -type AttachInstancesInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The IDs of the instances. You can specify up to 20 instances. - InstanceIds []*string `type:"list"` -} - -// String returns the string representation -func (s AttachInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachInstancesInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *AttachInstancesInput) SetAutoScalingGroupName(v string) *AttachInstancesInput { - s.AutoScalingGroupName = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *AttachInstancesInput) SetInstanceIds(v []*string) *AttachInstancesInput { - s.InstanceIds = v - return s -} - -type AttachInstancesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AttachInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachInstancesOutput) GoString() string { - return s.String() -} - -type AttachLoadBalancerTargetGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Names (ARN) of the target groups. You can specify up - // to 10 target groups. - // - // TargetGroupARNs is a required field - TargetGroupARNs []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s AttachLoadBalancerTargetGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachLoadBalancerTargetGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachLoadBalancerTargetGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancerTargetGroupsInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.TargetGroupARNs == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupARNs")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *AttachLoadBalancerTargetGroupsInput) SetAutoScalingGroupName(v string) *AttachLoadBalancerTargetGroupsInput { - s.AutoScalingGroupName = &v - return s -} - -// SetTargetGroupARNs sets the TargetGroupARNs field's value. -func (s *AttachLoadBalancerTargetGroupsInput) SetTargetGroupARNs(v []*string) *AttachLoadBalancerTargetGroupsInput { - s.TargetGroupARNs = v - return s -} - -type AttachLoadBalancerTargetGroupsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AttachLoadBalancerTargetGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachLoadBalancerTargetGroupsOutput) GoString() string { - return s.String() -} - -type AttachLoadBalancersInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The names of the load balancers. You can specify up to 10 load balancers. - // - // LoadBalancerNames is a required field - LoadBalancerNames []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s AttachLoadBalancersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachLoadBalancersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachLoadBalancersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancersInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.LoadBalancerNames == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *AttachLoadBalancersInput) SetAutoScalingGroupName(v string) *AttachLoadBalancersInput { - s.AutoScalingGroupName = &v - return s -} - -// SetLoadBalancerNames sets the LoadBalancerNames field's value. -func (s *AttachLoadBalancersInput) SetLoadBalancerNames(v []*string) *AttachLoadBalancersInput { - s.LoadBalancerNames = v - return s -} - -type AttachLoadBalancersOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AttachLoadBalancersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachLoadBalancersOutput) GoString() string { - return s.String() -} - -type BatchDeleteScheduledActionInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The names of the scheduled actions to delete. The maximum number allowed - // is 50. - // - // ScheduledActionNames is a required field - ScheduledActionNames []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchDeleteScheduledActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteScheduledActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchDeleteScheduledActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchDeleteScheduledActionInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.ScheduledActionNames == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduledActionNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *BatchDeleteScheduledActionInput) SetAutoScalingGroupName(v string) *BatchDeleteScheduledActionInput { - s.AutoScalingGroupName = &v - return s -} - -// SetScheduledActionNames sets the ScheduledActionNames field's value. -func (s *BatchDeleteScheduledActionInput) SetScheduledActionNames(v []*string) *BatchDeleteScheduledActionInput { - s.ScheduledActionNames = v - return s -} - -type BatchDeleteScheduledActionOutput struct { - _ struct{} `type:"structure"` - - // The names of the scheduled actions that could not be deleted, including an - // error message. - FailedScheduledActions []*FailedScheduledUpdateGroupActionRequest `type:"list"` -} - -// String returns the string representation -func (s BatchDeleteScheduledActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteScheduledActionOutput) GoString() string { - return s.String() -} - -// SetFailedScheduledActions sets the FailedScheduledActions field's value. -func (s *BatchDeleteScheduledActionOutput) SetFailedScheduledActions(v []*FailedScheduledUpdateGroupActionRequest) *BatchDeleteScheduledActionOutput { - s.FailedScheduledActions = v - return s -} - -type BatchPutScheduledUpdateGroupActionInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // One or more scheduled actions. The maximum number allowed is 50. - // - // ScheduledUpdateGroupActions is a required field - ScheduledUpdateGroupActions []*ScheduledUpdateGroupActionRequest `type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchPutScheduledUpdateGroupActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchPutScheduledUpdateGroupActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchPutScheduledUpdateGroupActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchPutScheduledUpdateGroupActionInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.ScheduledUpdateGroupActions == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduledUpdateGroupActions")) - } - if s.ScheduledUpdateGroupActions != nil { - for i, v := range s.ScheduledUpdateGroupActions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ScheduledUpdateGroupActions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *BatchPutScheduledUpdateGroupActionInput) SetAutoScalingGroupName(v string) *BatchPutScheduledUpdateGroupActionInput { - s.AutoScalingGroupName = &v - return s -} - -// SetScheduledUpdateGroupActions sets the ScheduledUpdateGroupActions field's value. -func (s *BatchPutScheduledUpdateGroupActionInput) SetScheduledUpdateGroupActions(v []*ScheduledUpdateGroupActionRequest) *BatchPutScheduledUpdateGroupActionInput { - s.ScheduledUpdateGroupActions = v - return s -} - -type BatchPutScheduledUpdateGroupActionOutput struct { - _ struct{} `type:"structure"` - - // The names of the scheduled actions that could not be created or updated, - // including an error message. - FailedScheduledUpdateGroupActions []*FailedScheduledUpdateGroupActionRequest `type:"list"` -} - -// String returns the string representation -func (s BatchPutScheduledUpdateGroupActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchPutScheduledUpdateGroupActionOutput) GoString() string { - return s.String() -} - -// SetFailedScheduledUpdateGroupActions sets the FailedScheduledUpdateGroupActions field's value. -func (s *BatchPutScheduledUpdateGroupActionOutput) SetFailedScheduledUpdateGroupActions(v []*FailedScheduledUpdateGroupActionRequest) *BatchPutScheduledUpdateGroupActionOutput { - s.FailedScheduledUpdateGroupActions = v - return s -} - -// Describes a block device mapping. -type BlockDeviceMapping struct { - _ struct{} `type:"structure"` - - // The device name exposed to the EC2 instance (for example, /dev/sdh or xvdh). - // - // DeviceName is a required field - DeviceName *string `min:"1" type:"string" required:"true"` - - // The information about the Amazon EBS volume. - Ebs *Ebs `type:"structure"` - - // Suppresses a device mapping. - // - // If this parameter is true for the root device, the instance might fail the - // EC2 health check. In that case, Amazon EC2 Auto Scaling launches a replacement - // instance. - NoDevice *bool `type:"boolean"` - - // The name of the virtual device (for example, ephemeral0). - VirtualName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s BlockDeviceMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BlockDeviceMapping) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BlockDeviceMapping) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BlockDeviceMapping"} - if s.DeviceName == nil { - invalidParams.Add(request.NewErrParamRequired("DeviceName")) - } - if s.DeviceName != nil && len(*s.DeviceName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeviceName", 1)) - } - if s.VirtualName != nil && len(*s.VirtualName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualName", 1)) - } - if s.Ebs != nil { - if err := s.Ebs.Validate(); err != nil { - invalidParams.AddNested("Ebs", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeviceName sets the DeviceName field's value. -func (s *BlockDeviceMapping) SetDeviceName(v string) *BlockDeviceMapping { - s.DeviceName = &v - return s -} - -// SetEbs sets the Ebs field's value. -func (s *BlockDeviceMapping) SetEbs(v *Ebs) *BlockDeviceMapping { - s.Ebs = v - return s -} - -// SetNoDevice sets the NoDevice field's value. -func (s *BlockDeviceMapping) SetNoDevice(v bool) *BlockDeviceMapping { - s.NoDevice = &v - return s -} - -// SetVirtualName sets the VirtualName field's value. -func (s *BlockDeviceMapping) SetVirtualName(v string) *BlockDeviceMapping { - s.VirtualName = &v - return s -} - -type CompleteLifecycleActionInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The ID of the instance. - InstanceId *string `min:"1" type:"string"` - - // The action for the group to take. This parameter can be either CONTINUE or - // ABANDON. - // - // LifecycleActionResult is a required field - LifecycleActionResult *string `type:"string" required:"true"` - - // A universally unique identifier (UUID) that identifies a specific lifecycle - // action associated with an instance. Amazon EC2 Auto Scaling sends this token - // to the notification target you specified when you created the lifecycle hook. - LifecycleActionToken *string `min:"36" type:"string"` - - // The name of the lifecycle hook. - // - // LifecycleHookName is a required field - LifecycleHookName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CompleteLifecycleActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CompleteLifecycleActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CompleteLifecycleActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CompleteLifecycleActionInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.InstanceId != nil && len(*s.InstanceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1)) - } - if s.LifecycleActionResult == nil { - invalidParams.Add(request.NewErrParamRequired("LifecycleActionResult")) - } - if s.LifecycleActionToken != nil && len(*s.LifecycleActionToken) < 36 { - invalidParams.Add(request.NewErrParamMinLen("LifecycleActionToken", 36)) - } - if s.LifecycleHookName == nil { - invalidParams.Add(request.NewErrParamRequired("LifecycleHookName")) - } - if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *CompleteLifecycleActionInput) SetAutoScalingGroupName(v string) *CompleteLifecycleActionInput { - s.AutoScalingGroupName = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *CompleteLifecycleActionInput) SetInstanceId(v string) *CompleteLifecycleActionInput { - s.InstanceId = &v - return s -} - -// SetLifecycleActionResult sets the LifecycleActionResult field's value. -func (s *CompleteLifecycleActionInput) SetLifecycleActionResult(v string) *CompleteLifecycleActionInput { - s.LifecycleActionResult = &v - return s -} - -// SetLifecycleActionToken sets the LifecycleActionToken field's value. -func (s *CompleteLifecycleActionInput) SetLifecycleActionToken(v string) *CompleteLifecycleActionInput { - s.LifecycleActionToken = &v - return s -} - -// SetLifecycleHookName sets the LifecycleHookName field's value. -func (s *CompleteLifecycleActionInput) SetLifecycleHookName(v string) *CompleteLifecycleActionInput { - s.LifecycleHookName = &v - return s -} - -type CompleteLifecycleActionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CompleteLifecycleActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CompleteLifecycleActionOutput) GoString() string { - return s.String() -} - -type CreateAutoScalingGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. This name must be unique within the scope - // of your AWS account. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // One or more Availability Zones for the group. This parameter is optional - // if you specify one or more subnets. - AvailabilityZones []*string `min:"1" type:"list"` - - // The amount of time, in seconds, after a scaling activity completes before - // another scaling activity can start. The default is 300. - // - // For more information, see Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) - // in the Amazon EC2 Auto Scaling User Guide. - DefaultCooldown *int64 `type:"integer"` - - // The number of EC2 instances that should be running in the group. This number - // must be greater than or equal to the minimum size of the group and less than - // or equal to the maximum size of the group. If you do not specify a desired - // capacity, the default is the minimum size of the group. - DesiredCapacity *int64 `type:"integer"` - - // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before - // checking the health status of an EC2 instance that has come into service. - // During this time, any health check failures for the instance are ignored. - // The default is 0. - // - // This parameter is required if you are adding an ELB health check. - // - // For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) - // in the Amazon EC2 Auto Scaling User Guide. - HealthCheckGracePeriod *int64 `type:"integer"` - - // The service to use for the health checks. The valid values are EC2 and ELB. - // - // By default, health checks use Amazon EC2 instance status checks to determine - // the health of an instance. For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) - // in the Amazon EC2 Auto Scaling User Guide. - HealthCheckType *string `min:"1" type:"string"` - - // The ID of the instance used to create a launch configuration for the group. - // This parameter, a launch configuration, a launch template, or a mixed instances - // policy must be specified. - // - // When you specify an ID of an instance, Amazon EC2 Auto Scaling creates a - // new launch configuration and associates it with the group. This launch configuration - // derives its attributes from the specified instance, except for the block - // device mapping. - // - // For more information, see Create an Auto Scaling Group Using an EC2 Instance - // (http://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html) - // in the Amazon EC2 Auto Scaling User Guide. - InstanceId *string `min:"1" type:"string"` - - // The name of the launch configuration. This parameter, a launch template, - // a mixed instances policy, or an EC2 instance must be specified. - LaunchConfigurationName *string `min:"1" type:"string"` - - // The launch template to use to launch instances. This parameter, a launch - // configuration, a mixed instances policy, or an EC2 instance must be specified. - LaunchTemplate *LaunchTemplateSpecification `type:"structure"` - - // One or more lifecycle hooks. - LifecycleHookSpecificationList []*LifecycleHookSpecification `type:"list"` - - // One or more Classic Load Balancers. To specify an Application Load Balancer, - // use TargetGroupARNs instead. - // - // For more information, see Using a Load Balancer With an Auto Scaling Group - // (http://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html) - // in the Amazon EC2 Auto Scaling User Guide. - LoadBalancerNames []*string `type:"list"` - - // The maximum size of the group. - // - // MaxSize is a required field - MaxSize *int64 `type:"integer" required:"true"` - - // The minimum size of the group. - // - // MinSize is a required field - MinSize *int64 `type:"integer" required:"true"` - - // The mixed instances policy to use to launch instances. This parameter, a - // launch template, a launch configuration, or an EC2 instance must be specified. - MixedInstancesPolicy *MixedInstancesPolicy `type:"structure"` - - // Indicates whether newly launched instances are protected from termination - // by Auto Scaling when scaling in. - NewInstancesProtectedFromScaleIn *bool `type:"boolean"` - - // The name of the placement group into which to launch your instances, if any. - // For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) - // in the Amazon Elastic Compute Cloud User Guide. - PlacementGroup *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling - // group uses to call other AWS services on your behalf. By default, Amazon - // EC2 Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling, - // which it creates if it does not exist. - ServiceLinkedRoleARN *string `min:"1" type:"string"` - - // One or more tags. - // - // For more information, see Tagging Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html) - // in the Amazon EC2 Auto Scaling User Guide. - Tags []*Tag `type:"list"` - - // The Amazon Resource Names (ARN) of the target groups. - TargetGroupARNs []*string `type:"list"` - - // One or more termination policies used to select the instance to terminate. - // These policies are executed in the order that they are listed. - // - // For more information, see Controlling Which Instances Auto Scaling Terminates - // During Scale In (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html) - // in the Auto Scaling User Guide. - TerminationPolicies []*string `type:"list"` - - // A comma-separated list of subnet identifiers for your virtual private cloud - // (VPC). - // - // If you specify subnets and Availability Zones with this call, ensure that - // the subnets' Availability Zones match the Availability Zones specified. - // - // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html) - // in the Amazon EC2 Auto Scaling User Guide. - VPCZoneIdentifier *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateAutoScalingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAutoScalingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAutoScalingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAutoScalingGroupInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.AvailabilityZones != nil && len(s.AvailabilityZones) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AvailabilityZones", 1)) - } - if s.HealthCheckType != nil && len(*s.HealthCheckType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HealthCheckType", 1)) - } - if s.InstanceId != nil && len(*s.InstanceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1)) - } - if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1)) - } - if s.MaxSize == nil { - invalidParams.Add(request.NewErrParamRequired("MaxSize")) - } - if s.MinSize == nil { - invalidParams.Add(request.NewErrParamRequired("MinSize")) - } - if s.PlacementGroup != nil && len(*s.PlacementGroup) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlacementGroup", 1)) - } - if s.ServiceLinkedRoleARN != nil && len(*s.ServiceLinkedRoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceLinkedRoleARN", 1)) - } - if s.VPCZoneIdentifier != nil && len(*s.VPCZoneIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VPCZoneIdentifier", 1)) - } - if s.LaunchTemplate != nil { - if err := s.LaunchTemplate.Validate(); err != nil { - invalidParams.AddNested("LaunchTemplate", err.(request.ErrInvalidParams)) - } - } - if s.LifecycleHookSpecificationList != nil { - for i, v := range s.LifecycleHookSpecificationList { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LifecycleHookSpecificationList", i), err.(request.ErrInvalidParams)) - } - } - } - if s.MixedInstancesPolicy != nil { - if err := s.MixedInstancesPolicy.Validate(); err != nil { - invalidParams.AddNested("MixedInstancesPolicy", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *CreateAutoScalingGroupInput) SetAutoScalingGroupName(v string) *CreateAutoScalingGroupInput { - s.AutoScalingGroupName = &v - return s -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *CreateAutoScalingGroupInput) SetAvailabilityZones(v []*string) *CreateAutoScalingGroupInput { - s.AvailabilityZones = v - return s -} - -// SetDefaultCooldown sets the DefaultCooldown field's value. -func (s *CreateAutoScalingGroupInput) SetDefaultCooldown(v int64) *CreateAutoScalingGroupInput { - s.DefaultCooldown = &v - return s -} - -// SetDesiredCapacity sets the DesiredCapacity field's value. -func (s *CreateAutoScalingGroupInput) SetDesiredCapacity(v int64) *CreateAutoScalingGroupInput { - s.DesiredCapacity = &v - return s -} - -// SetHealthCheckGracePeriod sets the HealthCheckGracePeriod field's value. -func (s *CreateAutoScalingGroupInput) SetHealthCheckGracePeriod(v int64) *CreateAutoScalingGroupInput { - s.HealthCheckGracePeriod = &v - return s -} - -// SetHealthCheckType sets the HealthCheckType field's value. -func (s *CreateAutoScalingGroupInput) SetHealthCheckType(v string) *CreateAutoScalingGroupInput { - s.HealthCheckType = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *CreateAutoScalingGroupInput) SetInstanceId(v string) *CreateAutoScalingGroupInput { - s.InstanceId = &v - return s -} - -// SetLaunchConfigurationName sets the LaunchConfigurationName field's value. -func (s *CreateAutoScalingGroupInput) SetLaunchConfigurationName(v string) *CreateAutoScalingGroupInput { - s.LaunchConfigurationName = &v - return s -} - -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *CreateAutoScalingGroupInput) SetLaunchTemplate(v *LaunchTemplateSpecification) *CreateAutoScalingGroupInput { - s.LaunchTemplate = v - return s -} - -// SetLifecycleHookSpecificationList sets the LifecycleHookSpecificationList field's value. -func (s *CreateAutoScalingGroupInput) SetLifecycleHookSpecificationList(v []*LifecycleHookSpecification) *CreateAutoScalingGroupInput { - s.LifecycleHookSpecificationList = v - return s -} - -// SetLoadBalancerNames sets the LoadBalancerNames field's value. -func (s *CreateAutoScalingGroupInput) SetLoadBalancerNames(v []*string) *CreateAutoScalingGroupInput { - s.LoadBalancerNames = v - return s -} - -// SetMaxSize sets the MaxSize field's value. -func (s *CreateAutoScalingGroupInput) SetMaxSize(v int64) *CreateAutoScalingGroupInput { - s.MaxSize = &v - return s -} - -// SetMinSize sets the MinSize field's value. -func (s *CreateAutoScalingGroupInput) SetMinSize(v int64) *CreateAutoScalingGroupInput { - s.MinSize = &v - return s -} - -// SetMixedInstancesPolicy sets the MixedInstancesPolicy field's value. -func (s *CreateAutoScalingGroupInput) SetMixedInstancesPolicy(v *MixedInstancesPolicy) *CreateAutoScalingGroupInput { - s.MixedInstancesPolicy = v - return s -} - -// SetNewInstancesProtectedFromScaleIn sets the NewInstancesProtectedFromScaleIn field's value. -func (s *CreateAutoScalingGroupInput) SetNewInstancesProtectedFromScaleIn(v bool) *CreateAutoScalingGroupInput { - s.NewInstancesProtectedFromScaleIn = &v - return s -} - -// SetPlacementGroup sets the PlacementGroup field's value. -func (s *CreateAutoScalingGroupInput) SetPlacementGroup(v string) *CreateAutoScalingGroupInput { - s.PlacementGroup = &v - return s -} - -// SetServiceLinkedRoleARN sets the ServiceLinkedRoleARN field's value. -func (s *CreateAutoScalingGroupInput) SetServiceLinkedRoleARN(v string) *CreateAutoScalingGroupInput { - s.ServiceLinkedRoleARN = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateAutoScalingGroupInput) SetTags(v []*Tag) *CreateAutoScalingGroupInput { - s.Tags = v - return s -} - -// SetTargetGroupARNs sets the TargetGroupARNs field's value. -func (s *CreateAutoScalingGroupInput) SetTargetGroupARNs(v []*string) *CreateAutoScalingGroupInput { - s.TargetGroupARNs = v - return s -} - -// SetTerminationPolicies sets the TerminationPolicies field's value. -func (s *CreateAutoScalingGroupInput) SetTerminationPolicies(v []*string) *CreateAutoScalingGroupInput { - s.TerminationPolicies = v - return s -} - -// SetVPCZoneIdentifier sets the VPCZoneIdentifier field's value. -func (s *CreateAutoScalingGroupInput) SetVPCZoneIdentifier(v string) *CreateAutoScalingGroupInput { - s.VPCZoneIdentifier = &v - return s -} - -type CreateAutoScalingGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateAutoScalingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAutoScalingGroupOutput) GoString() string { - return s.String() -} - -type CreateLaunchConfigurationInput struct { - _ struct{} `type:"structure"` - - // Used for groups that launch instances into a virtual private cloud (VPC). - // Specifies whether to assign a public IP address to each instance. For more - // information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html) - // in the Amazon EC2 Auto Scaling User Guide. - // - // If you specify this parameter, be sure to specify at least one subnet when - // you create your group. - // - // Default: If the instance is launched into a default subnet, the default is - // to assign a public IP address. If the instance is launched into a nondefault - // subnet, the default is not to assign a public IP address. - AssociatePublicIpAddress *bool `type:"boolean"` - - // One or more mappings that specify how block devices are exposed to the instance. - // For more information, see Block Device Mapping (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html) - // in the Amazon Elastic Compute Cloud User Guide. - BlockDeviceMappings []*BlockDeviceMapping `type:"list"` - - // The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. - // This parameter is supported only if you are launching EC2-Classic instances. - // For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) - // in the Amazon Elastic Compute Cloud User Guide. - ClassicLinkVPCId *string `min:"1" type:"string"` - - // The IDs of one or more security groups for the specified ClassicLink-enabled - // VPC. This parameter is required if you specify a ClassicLink-enabled VPC, - // and is not supported otherwise. For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) - // in the Amazon Elastic Compute Cloud User Guide. - ClassicLinkVPCSecurityGroups []*string `type:"list"` - - // Indicates whether the instance is optimized for Amazon EBS I/O. By default, - // the instance is not optimized for EBS I/O. The optimization provides dedicated - // throughput to Amazon EBS and an optimized configuration stack to provide - // optimal I/O performance. This optimization is not available with all instance - // types. Additional usage charges apply. For more information, see Amazon EBS-Optimized - // Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) - // in the Amazon Elastic Compute Cloud User Guide. - EbsOptimized *bool `type:"boolean"` - - // The name or the Amazon Resource Name (ARN) of the instance profile associated - // with the IAM role for the instance. - // - // EC2 instances launched with an IAM role automatically have AWS security credentials - // available. You can use IAM roles with Amazon EC2 Auto Scaling to automatically - // enable applications running on your EC2 instances to securely access other - // AWS resources. For more information, see Launch Auto Scaling Instances with - // an IAM Role (http://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html) - // in the Amazon EC2 Auto Scaling User Guide. - IamInstanceProfile *string `min:"1" type:"string"` - - // The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances. - // - // If you do not specify InstanceId, you must specify ImageId. - // - // For more information, see Finding an AMI (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html) - // in the Amazon Elastic Compute Cloud User Guide. - ImageId *string `min:"1" type:"string"` - - // The ID of the instance to use to create the launch configuration. The new - // launch configuration derives attributes from the instance, except for the - // block device mapping. - // - // If you do not specify InstanceId, you must specify both ImageId and InstanceType. - // - // To create a launch configuration with a block device mapping or override - // any other instance attributes, specify them as part of the same request. - // - // For more information, see Create a Launch Configuration Using an EC2 Instance - // (http://docs.aws.amazon.com/autoscaling/ec2/userguide/create-lc-with-instanceID.html) - // in the Amazon EC2 Auto Scaling User Guide. - InstanceId *string `min:"1" type:"string"` - - // Enables detailed monitoring (true) or basic monitoring (false) for the Auto - // Scaling instances. The default is true. - InstanceMonitoring *InstanceMonitoring `type:"structure"` - - // The instance type of the EC2 instance. - // - // If you do not specify InstanceId, you must specify InstanceType. - // - // For information about available instance types, see Available Instance Types - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes) - // in the Amazon Elastic Compute Cloud User Guide. - InstanceType *string `min:"1" type:"string"` - - // The ID of the kernel associated with the AMI. - KernelId *string `min:"1" type:"string"` - - // The name of the key pair. For more information, see Amazon EC2 Key Pairs - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) in - // the Amazon Elastic Compute Cloud User Guide. - KeyName *string `min:"1" type:"string"` - - // The name of the launch configuration. This name must be unique within the - // scope of your AWS account. - // - // LaunchConfigurationName is a required field - LaunchConfigurationName *string `min:"1" type:"string" required:"true"` - - // The tenancy of the instance. An instance with a tenancy of dedicated runs - // on single-tenant hardware and can only be launched into a VPC. - // - // To launch Dedicated Instances into a shared tenancy VPC (a VPC with the instance - // placement tenancy attribute set to default), you must set the value of this - // parameter to dedicated. - // - // If you specify this parameter, be sure to specify at least one subnet when - // you create your group. - // - // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html) - // in the Amazon EC2 Auto Scaling User Guide. - // - // Valid values: default | dedicated - PlacementTenancy *string `min:"1" type:"string"` - - // The ID of the RAM disk associated with the AMI. - RamdiskId *string `min:"1" type:"string"` - - // One or more security groups with which to associate the instances. - // - // If your instances are launched in EC2-Classic, you can either specify security - // group names or the security group IDs. For more information, see Amazon EC2 - // Security Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // If your instances are launched into a VPC, specify security group IDs. For - // more information, see Security Groups for Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html) - // in the Amazon Virtual Private Cloud User Guide. - SecurityGroups []*string `type:"list"` - - // The maximum hourly price to be paid for any Spot Instance launched to fulfill - // the request. Spot Instances are launched when the price you specify exceeds - // the current Spot market price. For more information, see Launching Spot Instances - // in Your Auto Scaling Group (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html) - // in the Amazon EC2 Auto Scaling User Guide. - SpotPrice *string `min:"1" type:"string"` - - // The user data to make available to the launched EC2 instances. For more information, - // see Instance Metadata and User Data (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) - // in the Amazon Elastic Compute Cloud User Guide. - UserData *string `type:"string"` -} - -// String returns the string representation -func (s CreateLaunchConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLaunchConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLaunchConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLaunchConfigurationInput"} - if s.ClassicLinkVPCId != nil && len(*s.ClassicLinkVPCId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClassicLinkVPCId", 1)) - } - if s.IamInstanceProfile != nil && len(*s.IamInstanceProfile) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IamInstanceProfile", 1)) - } - if s.ImageId != nil && len(*s.ImageId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ImageId", 1)) - } - if s.InstanceId != nil && len(*s.InstanceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1)) - } - if s.InstanceType != nil && len(*s.InstanceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceType", 1)) - } - if s.KernelId != nil && len(*s.KernelId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KernelId", 1)) - } - if s.KeyName != nil && len(*s.KeyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyName", 1)) - } - if s.LaunchConfigurationName == nil { - invalidParams.Add(request.NewErrParamRequired("LaunchConfigurationName")) - } - if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1)) - } - if s.PlacementTenancy != nil && len(*s.PlacementTenancy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlacementTenancy", 1)) - } - if s.RamdiskId != nil && len(*s.RamdiskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RamdiskId", 1)) - } - if s.SpotPrice != nil && len(*s.SpotPrice) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SpotPrice", 1)) - } - if s.BlockDeviceMappings != nil { - for i, v := range s.BlockDeviceMappings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "BlockDeviceMappings", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. -func (s *CreateLaunchConfigurationInput) SetAssociatePublicIpAddress(v bool) *CreateLaunchConfigurationInput { - s.AssociatePublicIpAddress = &v - return s -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *CreateLaunchConfigurationInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *CreateLaunchConfigurationInput { - s.BlockDeviceMappings = v - return s -} - -// SetClassicLinkVPCId sets the ClassicLinkVPCId field's value. -func (s *CreateLaunchConfigurationInput) SetClassicLinkVPCId(v string) *CreateLaunchConfigurationInput { - s.ClassicLinkVPCId = &v - return s -} - -// SetClassicLinkVPCSecurityGroups sets the ClassicLinkVPCSecurityGroups field's value. -func (s *CreateLaunchConfigurationInput) SetClassicLinkVPCSecurityGroups(v []*string) *CreateLaunchConfigurationInput { - s.ClassicLinkVPCSecurityGroups = v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *CreateLaunchConfigurationInput) SetEbsOptimized(v bool) *CreateLaunchConfigurationInput { - s.EbsOptimized = &v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *CreateLaunchConfigurationInput) SetIamInstanceProfile(v string) *CreateLaunchConfigurationInput { - s.IamInstanceProfile = &v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *CreateLaunchConfigurationInput) SetImageId(v string) *CreateLaunchConfigurationInput { - s.ImageId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *CreateLaunchConfigurationInput) SetInstanceId(v string) *CreateLaunchConfigurationInput { - s.InstanceId = &v - return s -} - -// SetInstanceMonitoring sets the InstanceMonitoring field's value. -func (s *CreateLaunchConfigurationInput) SetInstanceMonitoring(v *InstanceMonitoring) *CreateLaunchConfigurationInput { - s.InstanceMonitoring = v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *CreateLaunchConfigurationInput) SetInstanceType(v string) *CreateLaunchConfigurationInput { - s.InstanceType = &v - return s -} - -// SetKernelId sets the KernelId field's value. -func (s *CreateLaunchConfigurationInput) SetKernelId(v string) *CreateLaunchConfigurationInput { - s.KernelId = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *CreateLaunchConfigurationInput) SetKeyName(v string) *CreateLaunchConfigurationInput { - s.KeyName = &v - return s -} - -// SetLaunchConfigurationName sets the LaunchConfigurationName field's value. -func (s *CreateLaunchConfigurationInput) SetLaunchConfigurationName(v string) *CreateLaunchConfigurationInput { - s.LaunchConfigurationName = &v - return s -} - -// SetPlacementTenancy sets the PlacementTenancy field's value. -func (s *CreateLaunchConfigurationInput) SetPlacementTenancy(v string) *CreateLaunchConfigurationInput { - s.PlacementTenancy = &v - return s -} - -// SetRamdiskId sets the RamdiskId field's value. -func (s *CreateLaunchConfigurationInput) SetRamdiskId(v string) *CreateLaunchConfigurationInput { - s.RamdiskId = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *CreateLaunchConfigurationInput) SetSecurityGroups(v []*string) *CreateLaunchConfigurationInput { - s.SecurityGroups = v - return s -} - -// SetSpotPrice sets the SpotPrice field's value. -func (s *CreateLaunchConfigurationInput) SetSpotPrice(v string) *CreateLaunchConfigurationInput { - s.SpotPrice = &v - return s -} - -// SetUserData sets the UserData field's value. -func (s *CreateLaunchConfigurationInput) SetUserData(v string) *CreateLaunchConfigurationInput { - s.UserData = &v - return s -} - -type CreateLaunchConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateLaunchConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLaunchConfigurationOutput) GoString() string { - return s.String() -} - -type CreateOrUpdateTagsInput struct { - _ struct{} `type:"structure"` - - // One or more tags. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateOrUpdateTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateOrUpdateTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateOrUpdateTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateOrUpdateTagsInput"} - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTags sets the Tags field's value. -func (s *CreateOrUpdateTagsInput) SetTags(v []*Tag) *CreateOrUpdateTagsInput { - s.Tags = v - return s -} - -type CreateOrUpdateTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateOrUpdateTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateOrUpdateTagsOutput) GoString() string { - return s.String() -} - -// Configures a customized metric for a target tracking policy. -type CustomizedMetricSpecification struct { - _ struct{} `type:"structure"` - - // The dimensions of the metric. - Dimensions []*MetricDimension `type:"list"` - - // The name of the metric. - // - // MetricName is a required field - MetricName *string `type:"string" required:"true"` - - // The namespace of the metric. - // - // Namespace is a required field - Namespace *string `type:"string" required:"true"` - - // The statistic of the metric. - // - // Statistic is a required field - Statistic *string `type:"string" required:"true" enum:"MetricStatistic"` - - // The unit of the metric. - Unit *string `type:"string"` -} - -// String returns the string representation -func (s CustomizedMetricSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CustomizedMetricSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomizedMetricSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomizedMetricSpecification"} - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.Namespace == nil { - invalidParams.Add(request.NewErrParamRequired("Namespace")) - } - if s.Statistic == nil { - invalidParams.Add(request.NewErrParamRequired("Statistic")) - } - if s.Dimensions != nil { - for i, v := range s.Dimensions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDimensions sets the Dimensions field's value. -func (s *CustomizedMetricSpecification) SetDimensions(v []*MetricDimension) *CustomizedMetricSpecification { - s.Dimensions = v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *CustomizedMetricSpecification) SetMetricName(v string) *CustomizedMetricSpecification { - s.MetricName = &v - return s -} - -// SetNamespace sets the Namespace field's value. -func (s *CustomizedMetricSpecification) SetNamespace(v string) *CustomizedMetricSpecification { - s.Namespace = &v - return s -} - -// SetStatistic sets the Statistic field's value. -func (s *CustomizedMetricSpecification) SetStatistic(v string) *CustomizedMetricSpecification { - s.Statistic = &v - return s -} - -// SetUnit sets the Unit field's value. -func (s *CustomizedMetricSpecification) SetUnit(v string) *CustomizedMetricSpecification { - s.Unit = &v - return s -} - -type DeleteAutoScalingGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // Specifies that the group is to be deleted along with all instances associated - // with the group, without waiting for all instances to be terminated. This - // parameter also deletes any lifecycle actions associated with the group. - ForceDelete *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeleteAutoScalingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAutoScalingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAutoScalingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAutoScalingGroupInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DeleteAutoScalingGroupInput) SetAutoScalingGroupName(v string) *DeleteAutoScalingGroupInput { - s.AutoScalingGroupName = &v - return s -} - -// SetForceDelete sets the ForceDelete field's value. -func (s *DeleteAutoScalingGroupInput) SetForceDelete(v bool) *DeleteAutoScalingGroupInput { - s.ForceDelete = &v - return s -} - -type DeleteAutoScalingGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAutoScalingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAutoScalingGroupOutput) GoString() string { - return s.String() -} - -type DeleteLaunchConfigurationInput struct { - _ struct{} `type:"structure"` - - // The name of the launch configuration. - // - // LaunchConfigurationName is a required field - LaunchConfigurationName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLaunchConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLaunchConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLaunchConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLaunchConfigurationInput"} - if s.LaunchConfigurationName == nil { - invalidParams.Add(request.NewErrParamRequired("LaunchConfigurationName")) - } - if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLaunchConfigurationName sets the LaunchConfigurationName field's value. -func (s *DeleteLaunchConfigurationInput) SetLaunchConfigurationName(v string) *DeleteLaunchConfigurationInput { - s.LaunchConfigurationName = &v - return s -} - -type DeleteLaunchConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLaunchConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLaunchConfigurationOutput) GoString() string { - return s.String() -} - -type DeleteLifecycleHookInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The name of the lifecycle hook. - // - // LifecycleHookName is a required field - LifecycleHookName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLifecycleHookInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLifecycleHookInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLifecycleHookInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLifecycleHookInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.LifecycleHookName == nil { - invalidParams.Add(request.NewErrParamRequired("LifecycleHookName")) - } - if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DeleteLifecycleHookInput) SetAutoScalingGroupName(v string) *DeleteLifecycleHookInput { - s.AutoScalingGroupName = &v - return s -} - -// SetLifecycleHookName sets the LifecycleHookName field's value. -func (s *DeleteLifecycleHookInput) SetLifecycleHookName(v string) *DeleteLifecycleHookInput { - s.LifecycleHookName = &v - return s -} - -type DeleteLifecycleHookOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLifecycleHookOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLifecycleHookOutput) GoString() string { - return s.String() -} - -type DeleteNotificationConfigurationInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service - // (Amazon SNS) topic. - // - // TopicARN is a required field - TopicARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteNotificationConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNotificationConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNotificationConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNotificationConfigurationInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.TopicARN == nil { - invalidParams.Add(request.NewErrParamRequired("TopicARN")) - } - if s.TopicARN != nil && len(*s.TopicARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TopicARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DeleteNotificationConfigurationInput) SetAutoScalingGroupName(v string) *DeleteNotificationConfigurationInput { - s.AutoScalingGroupName = &v - return s -} - -// SetTopicARN sets the TopicARN field's value. -func (s *DeleteNotificationConfigurationInput) SetTopicARN(v string) *DeleteNotificationConfigurationInput { - s.TopicARN = &v - return s -} - -type DeleteNotificationConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteNotificationConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNotificationConfigurationOutput) GoString() string { - return s.String() -} - -type DeletePolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - AutoScalingGroupName *string `min:"1" type:"string"` - - // The name or Amazon Resource Name (ARN) of the policy. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"} - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DeletePolicyInput) SetAutoScalingGroupName(v string) *DeletePolicyInput { - s.AutoScalingGroupName = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeletePolicyInput) SetPolicyName(v string) *DeletePolicyInput { - s.PolicyName = &v - return s -} - -type DeletePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePolicyOutput) GoString() string { - return s.String() -} - -type DeleteScheduledActionInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The name of the action to delete. - // - // ScheduledActionName is a required field - ScheduledActionName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteScheduledActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteScheduledActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteScheduledActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteScheduledActionInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.ScheduledActionName == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduledActionName")) - } - if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DeleteScheduledActionInput) SetAutoScalingGroupName(v string) *DeleteScheduledActionInput { - s.AutoScalingGroupName = &v - return s -} - -// SetScheduledActionName sets the ScheduledActionName field's value. -func (s *DeleteScheduledActionInput) SetScheduledActionName(v string) *DeleteScheduledActionInput { - s.ScheduledActionName = &v - return s -} - -type DeleteScheduledActionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteScheduledActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteScheduledActionOutput) GoString() string { - return s.String() -} - -type DeleteTagsInput struct { - _ struct{} `type:"structure"` - - // One or more tags. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTags sets the Tags field's value. -func (s *DeleteTagsInput) SetTags(v []*Tag) *DeleteTagsInput { - s.Tags = v - return s -} - -type DeleteTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagsOutput) GoString() string { - return s.String() -} - -type DescribeAccountLimitsInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeAccountLimitsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountLimitsInput) GoString() string { - return s.String() -} - -type DescribeAccountLimitsOutput struct { - _ struct{} `type:"structure"` - - // The maximum number of groups allowed for your AWS account. The default limit - // is 20 per region. - MaxNumberOfAutoScalingGroups *int64 `type:"integer"` - - // The maximum number of launch configurations allowed for your AWS account. - // The default limit is 100 per region. - MaxNumberOfLaunchConfigurations *int64 `type:"integer"` - - // The current number of groups for your AWS account. - NumberOfAutoScalingGroups *int64 `type:"integer"` - - // The current number of launch configurations for your AWS account. - NumberOfLaunchConfigurations *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeAccountLimitsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountLimitsOutput) GoString() string { - return s.String() -} - -// SetMaxNumberOfAutoScalingGroups sets the MaxNumberOfAutoScalingGroups field's value. -func (s *DescribeAccountLimitsOutput) SetMaxNumberOfAutoScalingGroups(v int64) *DescribeAccountLimitsOutput { - s.MaxNumberOfAutoScalingGroups = &v - return s -} - -// SetMaxNumberOfLaunchConfigurations sets the MaxNumberOfLaunchConfigurations field's value. -func (s *DescribeAccountLimitsOutput) SetMaxNumberOfLaunchConfigurations(v int64) *DescribeAccountLimitsOutput { - s.MaxNumberOfLaunchConfigurations = &v - return s -} - -// SetNumberOfAutoScalingGroups sets the NumberOfAutoScalingGroups field's value. -func (s *DescribeAccountLimitsOutput) SetNumberOfAutoScalingGroups(v int64) *DescribeAccountLimitsOutput { - s.NumberOfAutoScalingGroups = &v - return s -} - -// SetNumberOfLaunchConfigurations sets the NumberOfLaunchConfigurations field's value. -func (s *DescribeAccountLimitsOutput) SetNumberOfLaunchConfigurations(v int64) *DescribeAccountLimitsOutput { - s.NumberOfLaunchConfigurations = &v - return s -} - -type DescribeAdjustmentTypesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeAdjustmentTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAdjustmentTypesInput) GoString() string { - return s.String() -} - -type DescribeAdjustmentTypesOutput struct { - _ struct{} `type:"structure"` - - // The policy adjustment types. - AdjustmentTypes []*AdjustmentType `type:"list"` -} - -// String returns the string representation -func (s DescribeAdjustmentTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAdjustmentTypesOutput) GoString() string { - return s.String() -} - -// SetAdjustmentTypes sets the AdjustmentTypes field's value. -func (s *DescribeAdjustmentTypesOutput) SetAdjustmentTypes(v []*AdjustmentType) *DescribeAdjustmentTypesOutput { - s.AdjustmentTypes = v - return s -} - -type DescribeAutoScalingGroupsInput struct { - _ struct{} `type:"structure"` - - // The names of the Auto Scaling groups. You can specify up to MaxRecords names. - // If you omit this parameter, all Auto Scaling groups are described. - AutoScalingGroupNames []*string `type:"list"` - - // The maximum number of items to return with this call. The default value is - // 50 and the maximum value is 100. - MaxRecords *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAutoScalingGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAutoScalingGroupsInput) GoString() string { - return s.String() -} - -// SetAutoScalingGroupNames sets the AutoScalingGroupNames field's value. -func (s *DescribeAutoScalingGroupsInput) SetAutoScalingGroupNames(v []*string) *DescribeAutoScalingGroupsInput { - s.AutoScalingGroupNames = v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeAutoScalingGroupsInput) SetMaxRecords(v int64) *DescribeAutoScalingGroupsInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAutoScalingGroupsInput) SetNextToken(v string) *DescribeAutoScalingGroupsInput { - s.NextToken = &v - return s -} - -type DescribeAutoScalingGroupsOutput struct { - _ struct{} `type:"structure"` - - // The groups. - // - // AutoScalingGroups is a required field - AutoScalingGroups []*Group `type:"list" required:"true"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAutoScalingGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAutoScalingGroupsOutput) GoString() string { - return s.String() -} - -// SetAutoScalingGroups sets the AutoScalingGroups field's value. -func (s *DescribeAutoScalingGroupsOutput) SetAutoScalingGroups(v []*Group) *DescribeAutoScalingGroupsOutput { - s.AutoScalingGroups = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAutoScalingGroupsOutput) SetNextToken(v string) *DescribeAutoScalingGroupsOutput { - s.NextToken = &v - return s -} - -type DescribeAutoScalingInstancesInput struct { - _ struct{} `type:"structure"` - - // The IDs of the instances. You can specify up to MaxRecords IDs. If you omit - // this parameter, all Auto Scaling instances are described. If you specify - // an ID that does not exist, it is ignored with no error. - InstanceIds []*string `type:"list"` - - // The maximum number of items to return with this call. The default value is - // 50 and the maximum value is 50. - MaxRecords *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAutoScalingInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAutoScalingInstancesInput) GoString() string { - return s.String() -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *DescribeAutoScalingInstancesInput) SetInstanceIds(v []*string) *DescribeAutoScalingInstancesInput { - s.InstanceIds = v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeAutoScalingInstancesInput) SetMaxRecords(v int64) *DescribeAutoScalingInstancesInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAutoScalingInstancesInput) SetNextToken(v string) *DescribeAutoScalingInstancesInput { - s.NextToken = &v - return s -} - -type DescribeAutoScalingInstancesOutput struct { - _ struct{} `type:"structure"` - - // The instances. - AutoScalingInstances []*InstanceDetails `type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAutoScalingInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAutoScalingInstancesOutput) GoString() string { - return s.String() -} - -// SetAutoScalingInstances sets the AutoScalingInstances field's value. -func (s *DescribeAutoScalingInstancesOutput) SetAutoScalingInstances(v []*InstanceDetails) *DescribeAutoScalingInstancesOutput { - s.AutoScalingInstances = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAutoScalingInstancesOutput) SetNextToken(v string) *DescribeAutoScalingInstancesOutput { - s.NextToken = &v - return s -} - -type DescribeAutoScalingNotificationTypesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeAutoScalingNotificationTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAutoScalingNotificationTypesInput) GoString() string { - return s.String() -} - -type DescribeAutoScalingNotificationTypesOutput struct { - _ struct{} `type:"structure"` - - // The notification types. - AutoScalingNotificationTypes []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeAutoScalingNotificationTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAutoScalingNotificationTypesOutput) GoString() string { - return s.String() -} - -// SetAutoScalingNotificationTypes sets the AutoScalingNotificationTypes field's value. -func (s *DescribeAutoScalingNotificationTypesOutput) SetAutoScalingNotificationTypes(v []*string) *DescribeAutoScalingNotificationTypesOutput { - s.AutoScalingNotificationTypes = v - return s -} - -type DescribeLaunchConfigurationsInput struct { - _ struct{} `type:"structure"` - - // The launch configuration names. If you omit this parameter, all launch configurations - // are described. - LaunchConfigurationNames []*string `type:"list"` - - // The maximum number of items to return with this call. The default value is - // 50 and the maximum value is 100. - MaxRecords *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeLaunchConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLaunchConfigurationsInput) GoString() string { - return s.String() -} - -// SetLaunchConfigurationNames sets the LaunchConfigurationNames field's value. -func (s *DescribeLaunchConfigurationsInput) SetLaunchConfigurationNames(v []*string) *DescribeLaunchConfigurationsInput { - s.LaunchConfigurationNames = v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeLaunchConfigurationsInput) SetMaxRecords(v int64) *DescribeLaunchConfigurationsInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLaunchConfigurationsInput) SetNextToken(v string) *DescribeLaunchConfigurationsInput { - s.NextToken = &v - return s -} - -type DescribeLaunchConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // The launch configurations. - // - // LaunchConfigurations is a required field - LaunchConfigurations []*LaunchConfiguration `type:"list" required:"true"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeLaunchConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLaunchConfigurationsOutput) GoString() string { - return s.String() -} - -// SetLaunchConfigurations sets the LaunchConfigurations field's value. -func (s *DescribeLaunchConfigurationsOutput) SetLaunchConfigurations(v []*LaunchConfiguration) *DescribeLaunchConfigurationsOutput { - s.LaunchConfigurations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLaunchConfigurationsOutput) SetNextToken(v string) *DescribeLaunchConfigurationsOutput { - s.NextToken = &v - return s -} - -type DescribeLifecycleHookTypesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeLifecycleHookTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLifecycleHookTypesInput) GoString() string { - return s.String() -} - -type DescribeLifecycleHookTypesOutput struct { - _ struct{} `type:"structure"` - - // The lifecycle hook types. - LifecycleHookTypes []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeLifecycleHookTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLifecycleHookTypesOutput) GoString() string { - return s.String() -} - -// SetLifecycleHookTypes sets the LifecycleHookTypes field's value. -func (s *DescribeLifecycleHookTypesOutput) SetLifecycleHookTypes(v []*string) *DescribeLifecycleHookTypesOutput { - s.LifecycleHookTypes = v - return s -} - -type DescribeLifecycleHooksInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The names of one or more lifecycle hooks. If you omit this parameter, all - // lifecycle hooks are described. - LifecycleHookNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeLifecycleHooksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLifecycleHooksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLifecycleHooksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLifecycleHooksInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DescribeLifecycleHooksInput) SetAutoScalingGroupName(v string) *DescribeLifecycleHooksInput { - s.AutoScalingGroupName = &v - return s -} - -// SetLifecycleHookNames sets the LifecycleHookNames field's value. -func (s *DescribeLifecycleHooksInput) SetLifecycleHookNames(v []*string) *DescribeLifecycleHooksInput { - s.LifecycleHookNames = v - return s -} - -type DescribeLifecycleHooksOutput struct { - _ struct{} `type:"structure"` - - // The lifecycle hooks for the specified group. - LifecycleHooks []*LifecycleHook `type:"list"` -} - -// String returns the string representation -func (s DescribeLifecycleHooksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLifecycleHooksOutput) GoString() string { - return s.String() -} - -// SetLifecycleHooks sets the LifecycleHooks field's value. -func (s *DescribeLifecycleHooksOutput) SetLifecycleHooks(v []*LifecycleHook) *DescribeLifecycleHooksOutput { - s.LifecycleHooks = v - return s -} - -type DescribeLoadBalancerTargetGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The maximum number of items to return with this call. The default value is - // 100 and the maximum value is 100. - MaxRecords *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeLoadBalancerTargetGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancerTargetGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLoadBalancerTargetGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancerTargetGroupsInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DescribeLoadBalancerTargetGroupsInput) SetAutoScalingGroupName(v string) *DescribeLoadBalancerTargetGroupsInput { - s.AutoScalingGroupName = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeLoadBalancerTargetGroupsInput) SetMaxRecords(v int64) *DescribeLoadBalancerTargetGroupsInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLoadBalancerTargetGroupsInput) SetNextToken(v string) *DescribeLoadBalancerTargetGroupsInput { - s.NextToken = &v - return s -} - -type DescribeLoadBalancerTargetGroupsOutput struct { - _ struct{} `type:"structure"` - - // Information about the target groups. - LoadBalancerTargetGroups []*LoadBalancerTargetGroupState `type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeLoadBalancerTargetGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancerTargetGroupsOutput) GoString() string { - return s.String() -} - -// SetLoadBalancerTargetGroups sets the LoadBalancerTargetGroups field's value. -func (s *DescribeLoadBalancerTargetGroupsOutput) SetLoadBalancerTargetGroups(v []*LoadBalancerTargetGroupState) *DescribeLoadBalancerTargetGroupsOutput { - s.LoadBalancerTargetGroups = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLoadBalancerTargetGroupsOutput) SetNextToken(v string) *DescribeLoadBalancerTargetGroupsOutput { - s.NextToken = &v - return s -} - -type DescribeLoadBalancersInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The maximum number of items to return with this call. The default value is - // 100 and the maximum value is 100. - MaxRecords *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeLoadBalancersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLoadBalancersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancersInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DescribeLoadBalancersInput) SetAutoScalingGroupName(v string) *DescribeLoadBalancersInput { - s.AutoScalingGroupName = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeLoadBalancersInput) SetMaxRecords(v int64) *DescribeLoadBalancersInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLoadBalancersInput) SetNextToken(v string) *DescribeLoadBalancersInput { - s.NextToken = &v - return s -} - -type DescribeLoadBalancersOutput struct { - _ struct{} `type:"structure"` - - // The load balancers. - LoadBalancers []*LoadBalancerState `type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeLoadBalancersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancersOutput) GoString() string { - return s.String() -} - -// SetLoadBalancers sets the LoadBalancers field's value. -func (s *DescribeLoadBalancersOutput) SetLoadBalancers(v []*LoadBalancerState) *DescribeLoadBalancersOutput { - s.LoadBalancers = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLoadBalancersOutput) SetNextToken(v string) *DescribeLoadBalancersOutput { - s.NextToken = &v - return s -} - -type DescribeMetricCollectionTypesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeMetricCollectionTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMetricCollectionTypesInput) GoString() string { - return s.String() -} - -type DescribeMetricCollectionTypesOutput struct { - _ struct{} `type:"structure"` - - // The granularities for the metrics. - Granularities []*MetricGranularityType `type:"list"` - - // One or more metrics. - Metrics []*MetricCollectionType `type:"list"` -} - -// String returns the string representation -func (s DescribeMetricCollectionTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMetricCollectionTypesOutput) GoString() string { - return s.String() -} - -// SetGranularities sets the Granularities field's value. -func (s *DescribeMetricCollectionTypesOutput) SetGranularities(v []*MetricGranularityType) *DescribeMetricCollectionTypesOutput { - s.Granularities = v - return s -} - -// SetMetrics sets the Metrics field's value. -func (s *DescribeMetricCollectionTypesOutput) SetMetrics(v []*MetricCollectionType) *DescribeMetricCollectionTypesOutput { - s.Metrics = v - return s -} - -type DescribeNotificationConfigurationsInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - AutoScalingGroupNames []*string `type:"list"` - - // The maximum number of items to return with this call. The default value is - // 50 and the maximum value is 100. - MaxRecords *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeNotificationConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNotificationConfigurationsInput) GoString() string { - return s.String() -} - -// SetAutoScalingGroupNames sets the AutoScalingGroupNames field's value. -func (s *DescribeNotificationConfigurationsInput) SetAutoScalingGroupNames(v []*string) *DescribeNotificationConfigurationsInput { - s.AutoScalingGroupNames = v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeNotificationConfigurationsInput) SetMaxRecords(v int64) *DescribeNotificationConfigurationsInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeNotificationConfigurationsInput) SetNextToken(v string) *DescribeNotificationConfigurationsInput { - s.NextToken = &v - return s -} - -type DescribeNotificationConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // The notification configurations. - // - // NotificationConfigurations is a required field - NotificationConfigurations []*NotificationConfiguration `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeNotificationConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNotificationConfigurationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeNotificationConfigurationsOutput) SetNextToken(v string) *DescribeNotificationConfigurationsOutput { - s.NextToken = &v - return s -} - -// SetNotificationConfigurations sets the NotificationConfigurations field's value. -func (s *DescribeNotificationConfigurationsOutput) SetNotificationConfigurations(v []*NotificationConfiguration) *DescribeNotificationConfigurationsOutput { - s.NotificationConfigurations = v - return s -} - -type DescribePoliciesInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - AutoScalingGroupName *string `min:"1" type:"string"` - - // The maximum number of items to be returned with each call. The default value - // is 50 and the maximum value is 100. - MaxRecords *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // The names of one or more policies. If you omit this parameter, all policies - // are described. If a group name is provided, the results are limited to that - // group. This list is limited to 50 items. If you specify an unknown policy - // name, it is ignored with no error. - PolicyNames []*string `type:"list"` - - // One or more policy types. Valid values are SimpleScaling and StepScaling. - PolicyTypes []*string `type:"list"` -} - -// String returns the string representation -func (s DescribePoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribePoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribePoliciesInput"} - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DescribePoliciesInput) SetAutoScalingGroupName(v string) *DescribePoliciesInput { - s.AutoScalingGroupName = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribePoliciesInput) SetMaxRecords(v int64) *DescribePoliciesInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePoliciesInput) SetNextToken(v string) *DescribePoliciesInput { - s.NextToken = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *DescribePoliciesInput) SetPolicyNames(v []*string) *DescribePoliciesInput { - s.PolicyNames = v - return s -} - -// SetPolicyTypes sets the PolicyTypes field's value. -func (s *DescribePoliciesInput) SetPolicyTypes(v []*string) *DescribePoliciesInput { - s.PolicyTypes = v - return s -} - -type DescribePoliciesOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // The scaling policies. - ScalingPolicies []*ScalingPolicy `type:"list"` -} - -// String returns the string representation -func (s DescribePoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePoliciesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePoliciesOutput) SetNextToken(v string) *DescribePoliciesOutput { - s.NextToken = &v - return s -} - -// SetScalingPolicies sets the ScalingPolicies field's value. -func (s *DescribePoliciesOutput) SetScalingPolicies(v []*ScalingPolicy) *DescribePoliciesOutput { - s.ScalingPolicies = v - return s -} - -type DescribeScalingActivitiesInput struct { - _ struct{} `type:"structure"` - - // The activity IDs of the desired scaling activities. You can specify up to - // 50 IDs. If you omit this parameter, all activities for the past six weeks - // are described. If unknown activities are requested, they are ignored with - // no error. If you specify an Auto Scaling group, the results are limited to - // that group. - ActivityIds []*string `type:"list"` - - // The name of the Auto Scaling group. - AutoScalingGroupName *string `min:"1" type:"string"` - - // The maximum number of items to return with this call. The default value is - // 100 and the maximum value is 100. - MaxRecords *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeScalingActivitiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScalingActivitiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeScalingActivitiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeScalingActivitiesInput"} - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivityIds sets the ActivityIds field's value. -func (s *DescribeScalingActivitiesInput) SetActivityIds(v []*string) *DescribeScalingActivitiesInput { - s.ActivityIds = v - return s -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DescribeScalingActivitiesInput) SetAutoScalingGroupName(v string) *DescribeScalingActivitiesInput { - s.AutoScalingGroupName = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeScalingActivitiesInput) SetMaxRecords(v int64) *DescribeScalingActivitiesInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScalingActivitiesInput) SetNextToken(v string) *DescribeScalingActivitiesInput { - s.NextToken = &v - return s -} - -type DescribeScalingActivitiesOutput struct { - _ struct{} `type:"structure"` - - // The scaling activities. Activities are sorted by start time. Activities still - // in progress are described first. - // - // Activities is a required field - Activities []*Activity `type:"list" required:"true"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeScalingActivitiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScalingActivitiesOutput) GoString() string { - return s.String() -} - -// SetActivities sets the Activities field's value. -func (s *DescribeScalingActivitiesOutput) SetActivities(v []*Activity) *DescribeScalingActivitiesOutput { - s.Activities = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScalingActivitiesOutput) SetNextToken(v string) *DescribeScalingActivitiesOutput { - s.NextToken = &v - return s -} - -type DescribeScalingProcessTypesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeScalingProcessTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScalingProcessTypesInput) GoString() string { - return s.String() -} - -type DescribeScalingProcessTypesOutput struct { - _ struct{} `type:"structure"` - - // The names of the process types. - Processes []*ProcessType `type:"list"` -} - -// String returns the string representation -func (s DescribeScalingProcessTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScalingProcessTypesOutput) GoString() string { - return s.String() -} - -// SetProcesses sets the Processes field's value. -func (s *DescribeScalingProcessTypesOutput) SetProcesses(v []*ProcessType) *DescribeScalingProcessTypesOutput { - s.Processes = v - return s -} - -type DescribeScheduledActionsInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - AutoScalingGroupName *string `min:"1" type:"string"` - - // The latest scheduled start time to return. If scheduled action names are - // provided, this parameter is ignored. - EndTime *time.Time `type:"timestamp"` - - // The maximum number of items to return with this call. The default value is - // 50 and the maximum value is 100. - MaxRecords *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // The names of one or more scheduled actions. You can specify up to 50 actions. - // If you omit this parameter, all scheduled actions are described. If you specify - // an unknown scheduled action, it is ignored with no error. - ScheduledActionNames []*string `type:"list"` - - // The earliest scheduled start time to return. If scheduled action names are - // provided, this parameter is ignored. - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s DescribeScheduledActionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScheduledActionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeScheduledActionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeScheduledActionsInput"} - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DescribeScheduledActionsInput) SetAutoScalingGroupName(v string) *DescribeScheduledActionsInput { - s.AutoScalingGroupName = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *DescribeScheduledActionsInput) SetEndTime(v time.Time) *DescribeScheduledActionsInput { - s.EndTime = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeScheduledActionsInput) SetMaxRecords(v int64) *DescribeScheduledActionsInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScheduledActionsInput) SetNextToken(v string) *DescribeScheduledActionsInput { - s.NextToken = &v - return s -} - -// SetScheduledActionNames sets the ScheduledActionNames field's value. -func (s *DescribeScheduledActionsInput) SetScheduledActionNames(v []*string) *DescribeScheduledActionsInput { - s.ScheduledActionNames = v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeScheduledActionsInput) SetStartTime(v time.Time) *DescribeScheduledActionsInput { - s.StartTime = &v - return s -} - -type DescribeScheduledActionsOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // The scheduled actions. - ScheduledUpdateGroupActions []*ScheduledUpdateGroupAction `type:"list"` -} - -// String returns the string representation -func (s DescribeScheduledActionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScheduledActionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScheduledActionsOutput) SetNextToken(v string) *DescribeScheduledActionsOutput { - s.NextToken = &v - return s -} - -// SetScheduledUpdateGroupActions sets the ScheduledUpdateGroupActions field's value. -func (s *DescribeScheduledActionsOutput) SetScheduledUpdateGroupActions(v []*ScheduledUpdateGroupAction) *DescribeScheduledActionsOutput { - s.ScheduledUpdateGroupActions = v - return s -} - -type DescribeTagsInput struct { - _ struct{} `type:"structure"` - - // One or more filters to scope the tags to return. The maximum number of filters - // per filter type (for example, auto-scaling-group) is 1000. - Filters []*Filter `type:"list"` - - // The maximum number of items to return with this call. The default value is - // 50 and the maximum value is 100. - MaxRecords *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsInput) GoString() string { - return s.String() -} - -// SetFilters sets the Filters field's value. -func (s *DescribeTagsInput) SetFilters(v []*Filter) *DescribeTagsInput { - s.Filters = v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeTagsInput) SetMaxRecords(v int64) *DescribeTagsInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeTagsInput) SetNextToken(v string) *DescribeTagsInput { - s.NextToken = &v - return s -} - -type DescribeTagsOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // One or more tags. - Tags []*TagDescription `type:"list"` -} - -// String returns the string representation -func (s DescribeTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeTagsOutput) SetNextToken(v string) *DescribeTagsOutput { - s.NextToken = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *DescribeTagsOutput) SetTags(v []*TagDescription) *DescribeTagsOutput { - s.Tags = v - return s -} - -type DescribeTerminationPolicyTypesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeTerminationPolicyTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTerminationPolicyTypesInput) GoString() string { - return s.String() -} - -type DescribeTerminationPolicyTypesOutput struct { - _ struct{} `type:"structure"` - - // The termination policies supported by Amazon EC2 Auto Scaling: OldestInstance, - // OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, Default, - // OldestLaunchTemplate, and AllocationStrategy. Currently, the OldestLaunchTemplate - // and AllocationStrategy policies are only supported for Auto Scaling groups - // with MixedInstancesPolicy. - TerminationPolicyTypes []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeTerminationPolicyTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTerminationPolicyTypesOutput) GoString() string { - return s.String() -} - -// SetTerminationPolicyTypes sets the TerminationPolicyTypes field's value. -func (s *DescribeTerminationPolicyTypesOutput) SetTerminationPolicyTypes(v []*string) *DescribeTerminationPolicyTypesOutput { - s.TerminationPolicyTypes = v - return s -} - -type DetachInstancesInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The IDs of the instances. You can specify up to 20 instances. - InstanceIds []*string `type:"list"` - - // Indicates whether the Auto Scaling group decrements the desired capacity - // value by the number of instances detached. - // - // ShouldDecrementDesiredCapacity is a required field - ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s DetachInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachInstancesInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.ShouldDecrementDesiredCapacity == nil { - invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DetachInstancesInput) SetAutoScalingGroupName(v string) *DetachInstancesInput { - s.AutoScalingGroupName = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *DetachInstancesInput) SetInstanceIds(v []*string) *DetachInstancesInput { - s.InstanceIds = v - return s -} - -// SetShouldDecrementDesiredCapacity sets the ShouldDecrementDesiredCapacity field's value. -func (s *DetachInstancesInput) SetShouldDecrementDesiredCapacity(v bool) *DetachInstancesInput { - s.ShouldDecrementDesiredCapacity = &v - return s -} - -type DetachInstancesOutput struct { - _ struct{} `type:"structure"` - - // The activities related to detaching the instances from the Auto Scaling group. - Activities []*Activity `type:"list"` -} - -// String returns the string representation -func (s DetachInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachInstancesOutput) GoString() string { - return s.String() -} - -// SetActivities sets the Activities field's value. -func (s *DetachInstancesOutput) SetActivities(v []*Activity) *DetachInstancesOutput { - s.Activities = v - return s -} - -type DetachLoadBalancerTargetGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Names (ARN) of the target groups. You can specify up - // to 10 target groups. - // - // TargetGroupARNs is a required field - TargetGroupARNs []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DetachLoadBalancerTargetGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachLoadBalancerTargetGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachLoadBalancerTargetGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachLoadBalancerTargetGroupsInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.TargetGroupARNs == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupARNs")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DetachLoadBalancerTargetGroupsInput) SetAutoScalingGroupName(v string) *DetachLoadBalancerTargetGroupsInput { - s.AutoScalingGroupName = &v - return s -} - -// SetTargetGroupARNs sets the TargetGroupARNs field's value. -func (s *DetachLoadBalancerTargetGroupsInput) SetTargetGroupARNs(v []*string) *DetachLoadBalancerTargetGroupsInput { - s.TargetGroupARNs = v - return s -} - -type DetachLoadBalancerTargetGroupsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DetachLoadBalancerTargetGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachLoadBalancerTargetGroupsOutput) GoString() string { - return s.String() -} - -type DetachLoadBalancersInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The names of the load balancers. You can specify up to 10 load balancers. - // - // LoadBalancerNames is a required field - LoadBalancerNames []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DetachLoadBalancersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachLoadBalancersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachLoadBalancersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachLoadBalancersInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.LoadBalancerNames == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DetachLoadBalancersInput) SetAutoScalingGroupName(v string) *DetachLoadBalancersInput { - s.AutoScalingGroupName = &v - return s -} - -// SetLoadBalancerNames sets the LoadBalancerNames field's value. -func (s *DetachLoadBalancersInput) SetLoadBalancerNames(v []*string) *DetachLoadBalancersInput { - s.LoadBalancerNames = v - return s -} - -type DetachLoadBalancersOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DetachLoadBalancersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachLoadBalancersOutput) GoString() string { - return s.String() -} - -type DisableMetricsCollectionInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // One or more of the following metrics. If you omit this parameter, all metrics - // are disabled. - // - // * GroupMinSize - // - // * GroupMaxSize - // - // * GroupDesiredCapacity - // - // * GroupInServiceInstances - // - // * GroupPendingInstances - // - // * GroupStandbyInstances - // - // * GroupTerminatingInstances - // - // * GroupTotalInstances - Metrics []*string `type:"list"` -} - -// String returns the string representation -func (s DisableMetricsCollectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableMetricsCollectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableMetricsCollectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableMetricsCollectionInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DisableMetricsCollectionInput) SetAutoScalingGroupName(v string) *DisableMetricsCollectionInput { - s.AutoScalingGroupName = &v - return s -} - -// SetMetrics sets the Metrics field's value. -func (s *DisableMetricsCollectionInput) SetMetrics(v []*string) *DisableMetricsCollectionInput { - s.Metrics = v - return s -} - -type DisableMetricsCollectionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableMetricsCollectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableMetricsCollectionOutput) GoString() string { - return s.String() -} - -// Describes an Amazon EBS volume. -type Ebs struct { - _ struct{} `type:"structure"` - - // Indicates whether the volume is deleted on instance termination. The default - // is true. - DeleteOnTermination *bool `type:"boolean"` - - // Indicates whether the volume should be encrypted. Encrypted EBS volumes must - // be attached to instances that support Amazon EBS encryption. Volumes that - // are created from encrypted snapshots are automatically encrypted. There is - // no way to create an encrypted volume from an unencrypted snapshot or an unencrypted - // volume from an encrypted snapshot. For more information, see Amazon EBS Encryption - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in - // the Amazon Elastic Compute Cloud User Guide. - Encrypted *bool `type:"boolean"` - - // The number of I/O operations per second (IOPS) to provision for the volume. - // - // Constraint: Required when the volume type is io1. - Iops *int64 `min:"100" type:"integer"` - - // The ID of the snapshot. - SnapshotId *string `min:"1" type:"string"` - - // The volume size, in GiB. For standard volumes, specify a value from 1 to - // 1,024. For io1 volumes, specify a value from 4 to 16,384. For gp2 volumes, - // specify a value from 1 to 16,384. If you specify a snapshot, the volume size - // must be equal to or larger than the snapshot size. - // - // Default: If you create a volume from a snapshot and you don't specify a volume - // size, the default is the snapshot size. - VolumeSize *int64 `min:"1" type:"integer"` - - // The volume type. For more information, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // Valid values: standard | io1 | gp2 - VolumeType *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s Ebs) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Ebs) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Ebs) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Ebs"} - if s.Iops != nil && *s.Iops < 100 { - invalidParams.Add(request.NewErrParamMinValue("Iops", 100)) - } - if s.SnapshotId != nil && len(*s.SnapshotId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SnapshotId", 1)) - } - if s.VolumeSize != nil && *s.VolumeSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("VolumeSize", 1)) - } - if s.VolumeType != nil && len(*s.VolumeType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VolumeType", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *Ebs) SetDeleteOnTermination(v bool) *Ebs { - s.DeleteOnTermination = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *Ebs) SetEncrypted(v bool) *Ebs { - s.Encrypted = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *Ebs) SetIops(v int64) *Ebs { - s.Iops = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *Ebs) SetSnapshotId(v string) *Ebs { - s.SnapshotId = &v - return s -} - -// SetVolumeSize sets the VolumeSize field's value. -func (s *Ebs) SetVolumeSize(v int64) *Ebs { - s.VolumeSize = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *Ebs) SetVolumeType(v string) *Ebs { - s.VolumeType = &v - return s -} - -type EnableMetricsCollectionInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The granularity to associate with the metrics to collect. The only valid - // value is 1Minute. - // - // Granularity is a required field - Granularity *string `min:"1" type:"string" required:"true"` - - // One or more of the following metrics. If you omit this parameter, all metrics - // are enabled. - // - // * GroupMinSize - // - // * GroupMaxSize - // - // * GroupDesiredCapacity - // - // * GroupInServiceInstances - // - // * GroupPendingInstances - // - // * GroupStandbyInstances - // - // * GroupTerminatingInstances - // - // * GroupTotalInstances - Metrics []*string `type:"list"` -} - -// String returns the string representation -func (s EnableMetricsCollectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableMetricsCollectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableMetricsCollectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableMetricsCollectionInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.Granularity == nil { - invalidParams.Add(request.NewErrParamRequired("Granularity")) - } - if s.Granularity != nil && len(*s.Granularity) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Granularity", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *EnableMetricsCollectionInput) SetAutoScalingGroupName(v string) *EnableMetricsCollectionInput { - s.AutoScalingGroupName = &v - return s -} - -// SetGranularity sets the Granularity field's value. -func (s *EnableMetricsCollectionInput) SetGranularity(v string) *EnableMetricsCollectionInput { - s.Granularity = &v - return s -} - -// SetMetrics sets the Metrics field's value. -func (s *EnableMetricsCollectionInput) SetMetrics(v []*string) *EnableMetricsCollectionInput { - s.Metrics = v - return s -} - -type EnableMetricsCollectionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableMetricsCollectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableMetricsCollectionOutput) GoString() string { - return s.String() -} - -// Describes an enabled metric. -type EnabledMetric struct { - _ struct{} `type:"structure"` - - // The granularity of the metric. The only valid value is 1Minute. - Granularity *string `min:"1" type:"string"` - - // One of the following metrics: - // - // * GroupMinSize - // - // * GroupMaxSize - // - // * GroupDesiredCapacity - // - // * GroupInServiceInstances - // - // * GroupPendingInstances - // - // * GroupStandbyInstances - // - // * GroupTerminatingInstances - // - // * GroupTotalInstances - Metric *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s EnabledMetric) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnabledMetric) GoString() string { - return s.String() -} - -// SetGranularity sets the Granularity field's value. -func (s *EnabledMetric) SetGranularity(v string) *EnabledMetric { - s.Granularity = &v - return s -} - -// SetMetric sets the Metric field's value. -func (s *EnabledMetric) SetMetric(v string) *EnabledMetric { - s.Metric = &v - return s -} - -type EnterStandbyInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The IDs of the instances. You can specify up to 20 instances. - InstanceIds []*string `type:"list"` - - // Indicates whether to decrement the desired capacity of the Auto Scaling group - // by the number of instances moved to Standby mode. - // - // ShouldDecrementDesiredCapacity is a required field - ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s EnterStandbyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnterStandbyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnterStandbyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnterStandbyInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.ShouldDecrementDesiredCapacity == nil { - invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *EnterStandbyInput) SetAutoScalingGroupName(v string) *EnterStandbyInput { - s.AutoScalingGroupName = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *EnterStandbyInput) SetInstanceIds(v []*string) *EnterStandbyInput { - s.InstanceIds = v - return s -} - -// SetShouldDecrementDesiredCapacity sets the ShouldDecrementDesiredCapacity field's value. -func (s *EnterStandbyInput) SetShouldDecrementDesiredCapacity(v bool) *EnterStandbyInput { - s.ShouldDecrementDesiredCapacity = &v - return s -} - -type EnterStandbyOutput struct { - _ struct{} `type:"structure"` - - // The activities related to moving instances into Standby mode. - Activities []*Activity `type:"list"` -} - -// String returns the string representation -func (s EnterStandbyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnterStandbyOutput) GoString() string { - return s.String() -} - -// SetActivities sets the Activities field's value. -func (s *EnterStandbyOutput) SetActivities(v []*Activity) *EnterStandbyOutput { - s.Activities = v - return s -} - -type ExecutePolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - AutoScalingGroupName *string `min:"1" type:"string"` - - // The breach threshold for the alarm. - // - // This parameter is required if the policy type is StepScaling and not supported - // otherwise. - BreachThreshold *float64 `type:"double"` - - // Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to - // complete before executing the policy. - // - // This parameter is not supported if the policy type is StepScaling. - // - // For more information, see Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) - // in the Amazon EC2 Auto Scaling User Guide. - HonorCooldown *bool `type:"boolean"` - - // The metric value to compare to BreachThreshold. This enables you to execute - // a policy of type StepScaling and determine which step adjustment to use. - // For example, if the breach threshold is 50 and you want to use a step adjustment - // with a lower bound of 0 and an upper bound of 10, you can set the metric - // value to 59. - // - // If you specify a metric value that doesn't correspond to a step adjustment - // for the policy, the call returns an error. - // - // This parameter is required if the policy type is StepScaling and not supported - // otherwise. - MetricValue *float64 `type:"double"` - - // The name or ARN of the policy. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ExecutePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecutePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExecutePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExecutePolicyInput"} - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *ExecutePolicyInput) SetAutoScalingGroupName(v string) *ExecutePolicyInput { - s.AutoScalingGroupName = &v - return s -} - -// SetBreachThreshold sets the BreachThreshold field's value. -func (s *ExecutePolicyInput) SetBreachThreshold(v float64) *ExecutePolicyInput { - s.BreachThreshold = &v - return s -} - -// SetHonorCooldown sets the HonorCooldown field's value. -func (s *ExecutePolicyInput) SetHonorCooldown(v bool) *ExecutePolicyInput { - s.HonorCooldown = &v - return s -} - -// SetMetricValue sets the MetricValue field's value. -func (s *ExecutePolicyInput) SetMetricValue(v float64) *ExecutePolicyInput { - s.MetricValue = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *ExecutePolicyInput) SetPolicyName(v string) *ExecutePolicyInput { - s.PolicyName = &v - return s -} - -type ExecutePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ExecutePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecutePolicyOutput) GoString() string { - return s.String() -} - -type ExitStandbyInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The IDs of the instances. You can specify up to 20 instances. - InstanceIds []*string `type:"list"` -} - -// String returns the string representation -func (s ExitStandbyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExitStandbyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExitStandbyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExitStandbyInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *ExitStandbyInput) SetAutoScalingGroupName(v string) *ExitStandbyInput { - s.AutoScalingGroupName = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *ExitStandbyInput) SetInstanceIds(v []*string) *ExitStandbyInput { - s.InstanceIds = v - return s -} - -type ExitStandbyOutput struct { - _ struct{} `type:"structure"` - - // The activities related to moving instances out of Standby mode. - Activities []*Activity `type:"list"` -} - -// String returns the string representation -func (s ExitStandbyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExitStandbyOutput) GoString() string { - return s.String() -} - -// SetActivities sets the Activities field's value. -func (s *ExitStandbyOutput) SetActivities(v []*Activity) *ExitStandbyOutput { - s.Activities = v - return s -} - -// Describes a scheduled action that could not be created, updated, or deleted. -type FailedScheduledUpdateGroupActionRequest struct { - _ struct{} `type:"structure"` - - // The error code. - ErrorCode *string `min:"1" type:"string"` - - // The error message accompanying the error code. - ErrorMessage *string `type:"string"` - - // The name of the scheduled action. - // - // ScheduledActionName is a required field - ScheduledActionName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s FailedScheduledUpdateGroupActionRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailedScheduledUpdateGroupActionRequest) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *FailedScheduledUpdateGroupActionRequest) SetErrorCode(v string) *FailedScheduledUpdateGroupActionRequest { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *FailedScheduledUpdateGroupActionRequest) SetErrorMessage(v string) *FailedScheduledUpdateGroupActionRequest { - s.ErrorMessage = &v - return s -} - -// SetScheduledActionName sets the ScheduledActionName field's value. -func (s *FailedScheduledUpdateGroupActionRequest) SetScheduledActionName(v string) *FailedScheduledUpdateGroupActionRequest { - s.ScheduledActionName = &v - return s -} - -// Describes a filter. -type Filter struct { - _ struct{} `type:"structure"` - - // The name of the filter. The valid values are: "auto-scaling-group", "key", - // "value", and "propagate-at-launch". - Name *string `type:"string"` - - // The value of the filter. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s Filter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Filter) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *Filter) SetName(v string) *Filter { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *Filter) SetValues(v []*string) *Filter { - s.Values = v - return s -} - -// Describes an Auto Scaling group. -type Group struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the Auto Scaling group. - AutoScalingGroupARN *string `min:"1" type:"string"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // One or more Availability Zones for the group. - // - // AvailabilityZones is a required field - AvailabilityZones []*string `min:"1" type:"list" required:"true"` - - // The date and time the group was created. - // - // CreatedTime is a required field - CreatedTime *time.Time `type:"timestamp" required:"true"` - - // The amount of time, in seconds, after a scaling activity completes before - // another scaling activity can start. - // - // DefaultCooldown is a required field - DefaultCooldown *int64 `type:"integer" required:"true"` - - // The desired size of the group. - // - // DesiredCapacity is a required field - DesiredCapacity *int64 `type:"integer" required:"true"` - - // The metrics enabled for the group. - EnabledMetrics []*EnabledMetric `type:"list"` - - // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before - // checking the health status of an EC2 instance that has come into service. - HealthCheckGracePeriod *int64 `type:"integer"` - - // The service to use for the health checks. The valid values are EC2 and ELB. - // - // HealthCheckType is a required field - HealthCheckType *string `min:"1" type:"string" required:"true"` - - // The EC2 instances associated with the group. - Instances []*Instance `type:"list"` - - // The name of the associated launch configuration. - LaunchConfigurationName *string `min:"1" type:"string"` - - // The launch template for the group. - LaunchTemplate *LaunchTemplateSpecification `type:"structure"` - - // One or more load balancers associated with the group. - LoadBalancerNames []*string `type:"list"` - - // The maximum size of the group. - // - // MaxSize is a required field - MaxSize *int64 `type:"integer" required:"true"` - - // The minimum size of the group. - // - // MinSize is a required field - MinSize *int64 `type:"integer" required:"true"` - - // The mixed instances policy for the group. - MixedInstancesPolicy *MixedInstancesPolicy `type:"structure"` - - // Indicates whether newly launched instances are protected from termination - // by Auto Scaling when scaling in. - NewInstancesProtectedFromScaleIn *bool `type:"boolean"` - - // The name of the placement group into which to launch your instances, if any. - // For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) - // in the Amazon Elastic Compute Cloud User Guide. - PlacementGroup *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling - // group uses to call other AWS services on your behalf. - ServiceLinkedRoleARN *string `min:"1" type:"string"` - - // The current state of the group when DeleteAutoScalingGroup is in progress. - Status *string `min:"1" type:"string"` - - // The suspended processes associated with the group. - SuspendedProcesses []*SuspendedProcess `type:"list"` - - // The tags for the group. - Tags []*TagDescription `type:"list"` - - // The Amazon Resource Names (ARN) of the target groups for your load balancer. - TargetGroupARNs []*string `type:"list"` - - // The termination policies for the group. - TerminationPolicies []*string `type:"list"` - - // One or more subnet IDs, if applicable, separated by commas. - // - // If you specify VPCZoneIdentifier and AvailabilityZones, ensure that the Availability - // Zones of the subnets match the values for AvailabilityZones. - VPCZoneIdentifier *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s Group) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Group) GoString() string { - return s.String() -} - -// SetAutoScalingGroupARN sets the AutoScalingGroupARN field's value. -func (s *Group) SetAutoScalingGroupARN(v string) *Group { - s.AutoScalingGroupARN = &v - return s -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *Group) SetAutoScalingGroupName(v string) *Group { - s.AutoScalingGroupName = &v - return s -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *Group) SetAvailabilityZones(v []*string) *Group { - s.AvailabilityZones = v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *Group) SetCreatedTime(v time.Time) *Group { - s.CreatedTime = &v - return s -} - -// SetDefaultCooldown sets the DefaultCooldown field's value. -func (s *Group) SetDefaultCooldown(v int64) *Group { - s.DefaultCooldown = &v - return s -} - -// SetDesiredCapacity sets the DesiredCapacity field's value. -func (s *Group) SetDesiredCapacity(v int64) *Group { - s.DesiredCapacity = &v - return s -} - -// SetEnabledMetrics sets the EnabledMetrics field's value. -func (s *Group) SetEnabledMetrics(v []*EnabledMetric) *Group { - s.EnabledMetrics = v - return s -} - -// SetHealthCheckGracePeriod sets the HealthCheckGracePeriod field's value. -func (s *Group) SetHealthCheckGracePeriod(v int64) *Group { - s.HealthCheckGracePeriod = &v - return s -} - -// SetHealthCheckType sets the HealthCheckType field's value. -func (s *Group) SetHealthCheckType(v string) *Group { - s.HealthCheckType = &v - return s -} - -// SetInstances sets the Instances field's value. -func (s *Group) SetInstances(v []*Instance) *Group { - s.Instances = v - return s -} - -// SetLaunchConfigurationName sets the LaunchConfigurationName field's value. -func (s *Group) SetLaunchConfigurationName(v string) *Group { - s.LaunchConfigurationName = &v - return s -} - -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *Group) SetLaunchTemplate(v *LaunchTemplateSpecification) *Group { - s.LaunchTemplate = v - return s -} - -// SetLoadBalancerNames sets the LoadBalancerNames field's value. -func (s *Group) SetLoadBalancerNames(v []*string) *Group { - s.LoadBalancerNames = v - return s -} - -// SetMaxSize sets the MaxSize field's value. -func (s *Group) SetMaxSize(v int64) *Group { - s.MaxSize = &v - return s -} - -// SetMinSize sets the MinSize field's value. -func (s *Group) SetMinSize(v int64) *Group { - s.MinSize = &v - return s -} - -// SetMixedInstancesPolicy sets the MixedInstancesPolicy field's value. -func (s *Group) SetMixedInstancesPolicy(v *MixedInstancesPolicy) *Group { - s.MixedInstancesPolicy = v - return s -} - -// SetNewInstancesProtectedFromScaleIn sets the NewInstancesProtectedFromScaleIn field's value. -func (s *Group) SetNewInstancesProtectedFromScaleIn(v bool) *Group { - s.NewInstancesProtectedFromScaleIn = &v - return s -} - -// SetPlacementGroup sets the PlacementGroup field's value. -func (s *Group) SetPlacementGroup(v string) *Group { - s.PlacementGroup = &v - return s -} - -// SetServiceLinkedRoleARN sets the ServiceLinkedRoleARN field's value. -func (s *Group) SetServiceLinkedRoleARN(v string) *Group { - s.ServiceLinkedRoleARN = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Group) SetStatus(v string) *Group { - s.Status = &v - return s -} - -// SetSuspendedProcesses sets the SuspendedProcesses field's value. -func (s *Group) SetSuspendedProcesses(v []*SuspendedProcess) *Group { - s.SuspendedProcesses = v - return s -} - -// SetTags sets the Tags field's value. -func (s *Group) SetTags(v []*TagDescription) *Group { - s.Tags = v - return s -} - -// SetTargetGroupARNs sets the TargetGroupARNs field's value. -func (s *Group) SetTargetGroupARNs(v []*string) *Group { - s.TargetGroupARNs = v - return s -} - -// SetTerminationPolicies sets the TerminationPolicies field's value. -func (s *Group) SetTerminationPolicies(v []*string) *Group { - s.TerminationPolicies = v - return s -} - -// SetVPCZoneIdentifier sets the VPCZoneIdentifier field's value. -func (s *Group) SetVPCZoneIdentifier(v string) *Group { - s.VPCZoneIdentifier = &v - return s -} - -// Describes an EC2 instance. -type Instance struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which the instance is running. - // - // AvailabilityZone is a required field - AvailabilityZone *string `min:"1" type:"string" required:"true"` - - // The last reported health status of the instance. "Healthy" means that the - // instance is healthy and should remain in service. "Unhealthy" means that - // the instance is unhealthy and that Amazon EC2 Auto Scaling should terminate - // and replace it. - // - // HealthStatus is a required field - HealthStatus *string `min:"1" type:"string" required:"true"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `min:"1" type:"string" required:"true"` - - // The launch configuration associated with the instance. - LaunchConfigurationName *string `min:"1" type:"string"` - - // The launch template for the instance. - LaunchTemplate *LaunchTemplateSpecification `type:"structure"` - - // A description of the current lifecycle state. The Quarantined state is not - // used. - // - // LifecycleState is a required field - LifecycleState *string `type:"string" required:"true" enum:"LifecycleState"` - - // Indicates whether the instance is protected from termination by Amazon EC2 - // Auto Scaling when scaling in. - // - // ProtectedFromScaleIn is a required field - ProtectedFromScaleIn *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s Instance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Instance) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Instance) SetAvailabilityZone(v string) *Instance { - s.AvailabilityZone = &v - return s -} - -// SetHealthStatus sets the HealthStatus field's value. -func (s *Instance) SetHealthStatus(v string) *Instance { - s.HealthStatus = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *Instance) SetInstanceId(v string) *Instance { - s.InstanceId = &v - return s -} - -// SetLaunchConfigurationName sets the LaunchConfigurationName field's value. -func (s *Instance) SetLaunchConfigurationName(v string) *Instance { - s.LaunchConfigurationName = &v - return s -} - -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *Instance) SetLaunchTemplate(v *LaunchTemplateSpecification) *Instance { - s.LaunchTemplate = v - return s -} - -// SetLifecycleState sets the LifecycleState field's value. -func (s *Instance) SetLifecycleState(v string) *Instance { - s.LifecycleState = &v - return s -} - -// SetProtectedFromScaleIn sets the ProtectedFromScaleIn field's value. -func (s *Instance) SetProtectedFromScaleIn(v bool) *Instance { - s.ProtectedFromScaleIn = &v - return s -} - -// Describes an EC2 instance associated with an Auto Scaling group. -type InstanceDetails struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group for the instance. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The Availability Zone for the instance. - // - // AvailabilityZone is a required field - AvailabilityZone *string `min:"1" type:"string" required:"true"` - - // The last reported health status of this instance. "Healthy" means that the - // instance is healthy and should remain in service. "Unhealthy" means that - // the instance is unhealthy and Amazon EC2 Auto Scaling should terminate and - // replace it. - // - // HealthStatus is a required field - HealthStatus *string `min:"1" type:"string" required:"true"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `min:"1" type:"string" required:"true"` - - // The launch configuration used to launch the instance. This value is not available - // if you attached the instance to the Auto Scaling group. - LaunchConfigurationName *string `min:"1" type:"string"` - - // The launch template for the instance. - LaunchTemplate *LaunchTemplateSpecification `type:"structure"` - - // The lifecycle state for the instance. For more information, see Auto Scaling - // Lifecycle (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html) - // in the Amazon EC2 Auto Scaling User Guide. - // - // LifecycleState is a required field - LifecycleState *string `min:"1" type:"string" required:"true"` - - // Indicates whether the instance is protected from termination by Amazon EC2 - // Auto Scaling when scaling in. - // - // ProtectedFromScaleIn is a required field - ProtectedFromScaleIn *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s InstanceDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceDetails) GoString() string { - return s.String() -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *InstanceDetails) SetAutoScalingGroupName(v string) *InstanceDetails { - s.AutoScalingGroupName = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *InstanceDetails) SetAvailabilityZone(v string) *InstanceDetails { - s.AvailabilityZone = &v - return s -} - -// SetHealthStatus sets the HealthStatus field's value. -func (s *InstanceDetails) SetHealthStatus(v string) *InstanceDetails { - s.HealthStatus = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceDetails) SetInstanceId(v string) *InstanceDetails { - s.InstanceId = &v - return s -} - -// SetLaunchConfigurationName sets the LaunchConfigurationName field's value. -func (s *InstanceDetails) SetLaunchConfigurationName(v string) *InstanceDetails { - s.LaunchConfigurationName = &v - return s -} - -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *InstanceDetails) SetLaunchTemplate(v *LaunchTemplateSpecification) *InstanceDetails { - s.LaunchTemplate = v - return s -} - -// SetLifecycleState sets the LifecycleState field's value. -func (s *InstanceDetails) SetLifecycleState(v string) *InstanceDetails { - s.LifecycleState = &v - return s -} - -// SetProtectedFromScaleIn sets the ProtectedFromScaleIn field's value. -func (s *InstanceDetails) SetProtectedFromScaleIn(v bool) *InstanceDetails { - s.ProtectedFromScaleIn = &v - return s -} - -// Describes whether detailed monitoring is enabled for the Auto Scaling instances. -type InstanceMonitoring struct { - _ struct{} `type:"structure"` - - // If true, detailed monitoring is enabled. Otherwise, basic monitoring is enabled. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s InstanceMonitoring) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceMonitoring) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *InstanceMonitoring) SetEnabled(v bool) *InstanceMonitoring { - s.Enabled = &v - return s -} - -// Describes an instances distribution for an Auto Scaling group with MixedInstancesPolicy. -// -// The instances distribution specifies the distribution of On-Demand Instances -// and Spot Instances, the maximum price to pay for Spot Instances, and how -// the Auto Scaling group allocates instance types. -type InstancesDistribution struct { - _ struct{} `type:"structure"` - - // Indicates how to allocate instance types to fulfill On-Demand capacity. - // - // The only valid value is prioritized, which is also the default value. This - // strategy uses the order of instance types in the Overrides array of LaunchTemplate - // to define the launch priority of each instance type. The first instance type - // in the array is prioritized higher than the last. If all your On-Demand capacity - // cannot be fulfilled using your highest priority instance, then the Auto Scaling - // groups launches the remaining capacity using the second priority instance - // type, and so on. - OnDemandAllocationStrategy *string `type:"string"` - - // The minimum amount of the Auto Scaling group's capacity that must be fulfilled - // by On-Demand Instances. This base portion is provisioned first as your group - // scales. - // - // The default value is 0. If you leave this parameter set to 0, On-Demand Instances - // are launched as a percentage of the Auto Scaling group's desired capacity, - // per the OnDemandPercentageAboveBaseCapacity setting. - OnDemandBaseCapacity *int64 `type:"integer"` - - // Controls the percentages of On-Demand Instances and Spot Instances for your - // additional capacity beyond OnDemandBaseCapacity. - // - // The range is 0–100. The default value is 100. If you leave this parameter - // set to 100, the percentages are 100% for On-Demand Instances and 0% for Spot - // Instances. - OnDemandPercentageAboveBaseCapacity *int64 `type:"integer"` - - // Indicates how to allocate Spot capacity across Spot pools. - // - // The only valid value is lowest-price, which is also the default value. The - // Auto Scaling group selects the cheapest Spot pools and evenly allocates your - // Spot capacity across the number of Spot pools that you specify. - SpotAllocationStrategy *string `type:"string"` - - // The number of Spot pools to use to allocate your Spot capacity. The Spot - // pools are determined from the different instance types in the Overrides array - // of LaunchTemplate. - // - // The range is 1–20 and the default is 2. - SpotInstancePools *int64 `type:"integer"` - - // The maximum price per unit hour that you are willing to pay for a Spot Instance. - // If you leave this value blank (which is the default), the maximum Spot price - // is set at the On-Demand price. - SpotMaxPrice *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s InstancesDistribution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstancesDistribution) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstancesDistribution) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstancesDistribution"} - if s.SpotMaxPrice != nil && len(*s.SpotMaxPrice) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SpotMaxPrice", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOnDemandAllocationStrategy sets the OnDemandAllocationStrategy field's value. -func (s *InstancesDistribution) SetOnDemandAllocationStrategy(v string) *InstancesDistribution { - s.OnDemandAllocationStrategy = &v - return s -} - -// SetOnDemandBaseCapacity sets the OnDemandBaseCapacity field's value. -func (s *InstancesDistribution) SetOnDemandBaseCapacity(v int64) *InstancesDistribution { - s.OnDemandBaseCapacity = &v - return s -} - -// SetOnDemandPercentageAboveBaseCapacity sets the OnDemandPercentageAboveBaseCapacity field's value. -func (s *InstancesDistribution) SetOnDemandPercentageAboveBaseCapacity(v int64) *InstancesDistribution { - s.OnDemandPercentageAboveBaseCapacity = &v - return s -} - -// SetSpotAllocationStrategy sets the SpotAllocationStrategy field's value. -func (s *InstancesDistribution) SetSpotAllocationStrategy(v string) *InstancesDistribution { - s.SpotAllocationStrategy = &v - return s -} - -// SetSpotInstancePools sets the SpotInstancePools field's value. -func (s *InstancesDistribution) SetSpotInstancePools(v int64) *InstancesDistribution { - s.SpotInstancePools = &v - return s -} - -// SetSpotMaxPrice sets the SpotMaxPrice field's value. -func (s *InstancesDistribution) SetSpotMaxPrice(v string) *InstancesDistribution { - s.SpotMaxPrice = &v - return s -} - -// Describes a launch configuration. -type LaunchConfiguration struct { - _ struct{} `type:"structure"` - - // [EC2-VPC] Indicates whether to assign a public IP address to each instance. - AssociatePublicIpAddress *bool `type:"boolean"` - - // A block device mapping, which specifies the block devices for the instance. - BlockDeviceMappings []*BlockDeviceMapping `type:"list"` - - // The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. - // This parameter can only be used if you are launching EC2-Classic instances. - // For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) - // in the Amazon Elastic Compute Cloud User Guide. - ClassicLinkVPCId *string `min:"1" type:"string"` - - // The IDs of one or more security groups for the VPC specified in ClassicLinkVPCId. - // This parameter is required if you specify a ClassicLink-enabled VPC, and - // cannot be used otherwise. For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) - // in the Amazon Elastic Compute Cloud User Guide. - ClassicLinkVPCSecurityGroups []*string `type:"list"` - - // The creation date and time for the launch configuration. - // - // CreatedTime is a required field - CreatedTime *time.Time `type:"timestamp" required:"true"` - - // Controls whether the instance is optimized for EBS I/O (true) or not (false). - EbsOptimized *bool `type:"boolean"` - - // The name or Amazon Resource Name (ARN) of the instance profile associated - // with the IAM role for the instance. - IamInstanceProfile *string `min:"1" type:"string"` - - // The ID of the Amazon Machine Image (AMI). - // - // ImageId is a required field - ImageId *string `min:"1" type:"string" required:"true"` - - // Controls whether instances in this group are launched with detailed (true) - // or basic (false) monitoring. - InstanceMonitoring *InstanceMonitoring `type:"structure"` - - // The instance type for the instances. - // - // InstanceType is a required field - InstanceType *string `min:"1" type:"string" required:"true"` - - // The ID of the kernel associated with the AMI. - KernelId *string `min:"1" type:"string"` - - // The name of the key pair. - KeyName *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the launch configuration. - LaunchConfigurationARN *string `min:"1" type:"string"` - - // The name of the launch configuration. - // - // LaunchConfigurationName is a required field - LaunchConfigurationName *string `min:"1" type:"string" required:"true"` - - // The tenancy of the instance, either default or dedicated. An instance with - // dedicated tenancy runs in an isolated, single-tenant hardware and can only - // be launched into a VPC. - PlacementTenancy *string `min:"1" type:"string"` - - // The ID of the RAM disk associated with the AMI. - RamdiskId *string `min:"1" type:"string"` - - // The security groups to associate with the instances. - SecurityGroups []*string `type:"list"` - - // The price to bid when launching Spot Instances. - SpotPrice *string `min:"1" type:"string"` - - // The user data available to the instances. - UserData *string `type:"string"` -} - -// String returns the string representation -func (s LaunchConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchConfiguration) GoString() string { - return s.String() -} - -// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. -func (s *LaunchConfiguration) SetAssociatePublicIpAddress(v bool) *LaunchConfiguration { - s.AssociatePublicIpAddress = &v - return s -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *LaunchConfiguration) SetBlockDeviceMappings(v []*BlockDeviceMapping) *LaunchConfiguration { - s.BlockDeviceMappings = v - return s -} - -// SetClassicLinkVPCId sets the ClassicLinkVPCId field's value. -func (s *LaunchConfiguration) SetClassicLinkVPCId(v string) *LaunchConfiguration { - s.ClassicLinkVPCId = &v - return s -} - -// SetClassicLinkVPCSecurityGroups sets the ClassicLinkVPCSecurityGroups field's value. -func (s *LaunchConfiguration) SetClassicLinkVPCSecurityGroups(v []*string) *LaunchConfiguration { - s.ClassicLinkVPCSecurityGroups = v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *LaunchConfiguration) SetCreatedTime(v time.Time) *LaunchConfiguration { - s.CreatedTime = &v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *LaunchConfiguration) SetEbsOptimized(v bool) *LaunchConfiguration { - s.EbsOptimized = &v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *LaunchConfiguration) SetIamInstanceProfile(v string) *LaunchConfiguration { - s.IamInstanceProfile = &v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *LaunchConfiguration) SetImageId(v string) *LaunchConfiguration { - s.ImageId = &v - return s -} - -// SetInstanceMonitoring sets the InstanceMonitoring field's value. -func (s *LaunchConfiguration) SetInstanceMonitoring(v *InstanceMonitoring) *LaunchConfiguration { - s.InstanceMonitoring = v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *LaunchConfiguration) SetInstanceType(v string) *LaunchConfiguration { - s.InstanceType = &v - return s -} - -// SetKernelId sets the KernelId field's value. -func (s *LaunchConfiguration) SetKernelId(v string) *LaunchConfiguration { - s.KernelId = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *LaunchConfiguration) SetKeyName(v string) *LaunchConfiguration { - s.KeyName = &v - return s -} - -// SetLaunchConfigurationARN sets the LaunchConfigurationARN field's value. -func (s *LaunchConfiguration) SetLaunchConfigurationARN(v string) *LaunchConfiguration { - s.LaunchConfigurationARN = &v - return s -} - -// SetLaunchConfigurationName sets the LaunchConfigurationName field's value. -func (s *LaunchConfiguration) SetLaunchConfigurationName(v string) *LaunchConfiguration { - s.LaunchConfigurationName = &v - return s -} - -// SetPlacementTenancy sets the PlacementTenancy field's value. -func (s *LaunchConfiguration) SetPlacementTenancy(v string) *LaunchConfiguration { - s.PlacementTenancy = &v - return s -} - -// SetRamdiskId sets the RamdiskId field's value. -func (s *LaunchConfiguration) SetRamdiskId(v string) *LaunchConfiguration { - s.RamdiskId = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *LaunchConfiguration) SetSecurityGroups(v []*string) *LaunchConfiguration { - s.SecurityGroups = v - return s -} - -// SetSpotPrice sets the SpotPrice field's value. -func (s *LaunchConfiguration) SetSpotPrice(v string) *LaunchConfiguration { - s.SpotPrice = &v - return s -} - -// SetUserData sets the UserData field's value. -func (s *LaunchConfiguration) SetUserData(v string) *LaunchConfiguration { - s.UserData = &v - return s -} - -// Describes a launch template and overrides. -// -// The overrides are used to override the instance type specified by the launch -// template with multiple instance types that can be used to launch On-Demand -// Instances and Spot Instances. -type LaunchTemplate struct { - _ struct{} `type:"structure"` - - // The launch template to use. You must specify either the launch template ID - // or launch template name in the request. - LaunchTemplateSpecification *LaunchTemplateSpecification `type:"structure"` - - // Any parameters that you specify override the same parameters in the launch - // template. Currently, the only supported override is instance type. - // - // You must specify between 2 and 20 overrides. - Overrides []*LaunchTemplateOverrides `type:"list"` -} - -// String returns the string representation -func (s LaunchTemplate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LaunchTemplate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LaunchTemplate"} - if s.LaunchTemplateSpecification != nil { - if err := s.LaunchTemplateSpecification.Validate(); err != nil { - invalidParams.AddNested("LaunchTemplateSpecification", err.(request.ErrInvalidParams)) - } - } - if s.Overrides != nil { - for i, v := range s.Overrides { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Overrides", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. -func (s *LaunchTemplate) SetLaunchTemplateSpecification(v *LaunchTemplateSpecification) *LaunchTemplate { - s.LaunchTemplateSpecification = v - return s -} - -// SetOverrides sets the Overrides field's value. -func (s *LaunchTemplate) SetOverrides(v []*LaunchTemplateOverrides) *LaunchTemplate { - s.Overrides = v - return s -} - -// Describes an override for a launch template. -type LaunchTemplateOverrides struct { - _ struct{} `type:"structure"` - - // The instance type. - // - // For information about available instance types, see Available Instance Types - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes) - // in the Amazon Elastic Compute Cloud User Guide. - InstanceType *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s LaunchTemplateOverrides) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateOverrides) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LaunchTemplateOverrides) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateOverrides"} - if s.InstanceType != nil && len(*s.InstanceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceType", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceType sets the InstanceType field's value. -func (s *LaunchTemplateOverrides) SetInstanceType(v string) *LaunchTemplateOverrides { - s.InstanceType = &v - return s -} - -// Describes a launch template and the launch template version. -// -// The launch template that is specified must be configured for use with an -// Auto Scaling group. For more information, see Creating a Launch Template -// for an Auto Scaling group (http://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html) -// in the Amazon EC2 Auto Scaling User Guide. -type LaunchTemplateSpecification struct { - _ struct{} `type:"structure"` - - // The ID of the launch template. You must specify either a template ID or a - // template name. - LaunchTemplateId *string `min:"1" type:"string"` - - // The name of the launch template. You must specify either a template name - // or a template ID. - LaunchTemplateName *string `min:"3" type:"string"` - - // The version number, $Latest, or $Default. If the value is $Latest, Amazon - // EC2 Auto Scaling selects the latest version of the launch template when launching - // instances. If the value is $Default, Amazon EC2 Auto Scaling selects the - // default version of the launch template when launching instances. The default - // value is $Default. - Version *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s LaunchTemplateSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LaunchTemplateSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateSpecification"} - if s.LaunchTemplateId != nil && len(*s.LaunchTemplateId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateId", 1)) - } - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *LaunchTemplateSpecification) SetLaunchTemplateId(v string) *LaunchTemplateSpecification { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *LaunchTemplateSpecification) SetLaunchTemplateName(v string) *LaunchTemplateSpecification { - s.LaunchTemplateName = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *LaunchTemplateSpecification) SetVersion(v string) *LaunchTemplateSpecification { - s.Version = &v - return s -} - -// Describes a lifecycle hook, which tells Amazon EC2 Auto Scaling that you -// want to perform an action whenever it launches instances or whenever it terminates -// instances. -// -// For more information, see Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) -// in the Amazon EC2 Auto Scaling User Guide. -type LifecycleHook struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group for the lifecycle hook. - AutoScalingGroupName *string `min:"1" type:"string"` - - // Defines the action the Auto Scaling group should take when the lifecycle - // hook timeout elapses or if an unexpected failure occurs. The valid values - // are CONTINUE and ABANDON. The default value is CONTINUE. - DefaultResult *string `type:"string"` - - // The maximum time, in seconds, that an instance can remain in a Pending:Wait - // or Terminating:Wait state. The maximum is 172800 seconds (48 hours) or 100 - // times HeartbeatTimeout, whichever is smaller. - GlobalTimeout *int64 `type:"integer"` - - // The maximum time, in seconds, that can elapse before the lifecycle hook times - // out. If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the - // default action. You can prevent the lifecycle hook from timing out by calling - // RecordLifecycleActionHeartbeat. - HeartbeatTimeout *int64 `type:"integer"` - - // The name of the lifecycle hook. - LifecycleHookName *string `min:"1" type:"string"` - - // The state of the EC2 instance to which to attach the lifecycle hook. The - // following are possible values: - // - // * autoscaling:EC2_INSTANCE_LAUNCHING - // - // * autoscaling:EC2_INSTANCE_TERMINATING - LifecycleTransition *string `type:"string"` - - // Additional information that you want to include any time Amazon EC2 Auto - // Scaling sends a message to the notification target. - NotificationMetadata *string `min:"1" type:"string"` - - // The ARN of the target that Amazon EC2 Auto Scaling sends notifications to - // when an instance is in the transition state for the lifecycle hook. The notification - // target can be either an SQS queue or an SNS topic. - NotificationTargetARN *string `min:"1" type:"string"` - - // The ARN of the IAM role that allows the Auto Scaling group to publish to - // the specified notification target. - RoleARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s LifecycleHook) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LifecycleHook) GoString() string { - return s.String() -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *LifecycleHook) SetAutoScalingGroupName(v string) *LifecycleHook { - s.AutoScalingGroupName = &v - return s -} - -// SetDefaultResult sets the DefaultResult field's value. -func (s *LifecycleHook) SetDefaultResult(v string) *LifecycleHook { - s.DefaultResult = &v - return s -} - -// SetGlobalTimeout sets the GlobalTimeout field's value. -func (s *LifecycleHook) SetGlobalTimeout(v int64) *LifecycleHook { - s.GlobalTimeout = &v - return s -} - -// SetHeartbeatTimeout sets the HeartbeatTimeout field's value. -func (s *LifecycleHook) SetHeartbeatTimeout(v int64) *LifecycleHook { - s.HeartbeatTimeout = &v - return s -} - -// SetLifecycleHookName sets the LifecycleHookName field's value. -func (s *LifecycleHook) SetLifecycleHookName(v string) *LifecycleHook { - s.LifecycleHookName = &v - return s -} - -// SetLifecycleTransition sets the LifecycleTransition field's value. -func (s *LifecycleHook) SetLifecycleTransition(v string) *LifecycleHook { - s.LifecycleTransition = &v - return s -} - -// SetNotificationMetadata sets the NotificationMetadata field's value. -func (s *LifecycleHook) SetNotificationMetadata(v string) *LifecycleHook { - s.NotificationMetadata = &v - return s -} - -// SetNotificationTargetARN sets the NotificationTargetARN field's value. -func (s *LifecycleHook) SetNotificationTargetARN(v string) *LifecycleHook { - s.NotificationTargetARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *LifecycleHook) SetRoleARN(v string) *LifecycleHook { - s.RoleARN = &v - return s -} - -// Describes a lifecycle hook, which tells Amazon EC2 Auto Scaling that you -// want to perform an action whenever it launches instances or whenever it terminates -// instances. -// -// For more information, see Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) -// in the Amazon EC2 Auto Scaling User Guide. -type LifecycleHookSpecification struct { - _ struct{} `type:"structure"` - - // Defines the action the Auto Scaling group should take when the lifecycle - // hook timeout elapses or if an unexpected failure occurs. The valid values - // are CONTINUE and ABANDON. - DefaultResult *string `type:"string"` - - // The maximum time, in seconds, that can elapse before the lifecycle hook times - // out. If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the - // default action. You can prevent the lifecycle hook from timing out by calling - // RecordLifecycleActionHeartbeat. - HeartbeatTimeout *int64 `type:"integer"` - - // The name of the lifecycle hook. - // - // LifecycleHookName is a required field - LifecycleHookName *string `min:"1" type:"string" required:"true"` - - // The state of the EC2 instance to which you want to attach the lifecycle hook. - // The possible values are: - // - // * autoscaling:EC2_INSTANCE_LAUNCHING - // - // * autoscaling:EC2_INSTANCE_TERMINATING - // - // LifecycleTransition is a required field - LifecycleTransition *string `type:"string" required:"true"` - - // Additional information that you want to include any time Amazon EC2 Auto - // Scaling sends a message to the notification target. - NotificationMetadata *string `min:"1" type:"string"` - - // The ARN of the target that Amazon EC2 Auto Scaling sends notifications to - // when an instance is in the transition state for the lifecycle hook. The notification - // target can be either an SQS queue or an SNS topic. - NotificationTargetARN *string `type:"string"` - - // The ARN of the IAM role that allows the Auto Scaling group to publish to - // the specified notification target. - RoleARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s LifecycleHookSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LifecycleHookSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LifecycleHookSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LifecycleHookSpecification"} - if s.LifecycleHookName == nil { - invalidParams.Add(request.NewErrParamRequired("LifecycleHookName")) - } - if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1)) - } - if s.LifecycleTransition == nil { - invalidParams.Add(request.NewErrParamRequired("LifecycleTransition")) - } - if s.NotificationMetadata != nil && len(*s.NotificationMetadata) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NotificationMetadata", 1)) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultResult sets the DefaultResult field's value. -func (s *LifecycleHookSpecification) SetDefaultResult(v string) *LifecycleHookSpecification { - s.DefaultResult = &v - return s -} - -// SetHeartbeatTimeout sets the HeartbeatTimeout field's value. -func (s *LifecycleHookSpecification) SetHeartbeatTimeout(v int64) *LifecycleHookSpecification { - s.HeartbeatTimeout = &v - return s -} - -// SetLifecycleHookName sets the LifecycleHookName field's value. -func (s *LifecycleHookSpecification) SetLifecycleHookName(v string) *LifecycleHookSpecification { - s.LifecycleHookName = &v - return s -} - -// SetLifecycleTransition sets the LifecycleTransition field's value. -func (s *LifecycleHookSpecification) SetLifecycleTransition(v string) *LifecycleHookSpecification { - s.LifecycleTransition = &v - return s -} - -// SetNotificationMetadata sets the NotificationMetadata field's value. -func (s *LifecycleHookSpecification) SetNotificationMetadata(v string) *LifecycleHookSpecification { - s.NotificationMetadata = &v - return s -} - -// SetNotificationTargetARN sets the NotificationTargetARN field's value. -func (s *LifecycleHookSpecification) SetNotificationTargetARN(v string) *LifecycleHookSpecification { - s.NotificationTargetARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *LifecycleHookSpecification) SetRoleARN(v string) *LifecycleHookSpecification { - s.RoleARN = &v - return s -} - -// Describes the state of a Classic Load Balancer. -// -// If you specify a load balancer when creating the Auto Scaling group, the -// state of the load balancer is InService. -// -// If you attach a load balancer to an existing Auto Scaling group, the initial -// state is Adding. The state transitions to Added after all instances in the -// group are registered with the load balancer. If Elastic Load Balancing health -// checks are enabled for the load balancer, the state transitions to InService -// after at least one instance in the group passes the health check. If EC2 -// health checks are enabled instead, the load balancer remains in the Added -// state. -type LoadBalancerState struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - LoadBalancerName *string `min:"1" type:"string"` - - // One of the following load balancer states: - // - // * Adding - The instances in the group are being registered with the load - // balancer. - // - // * Added - All instances in the group are registered with the load balancer. - // - // * InService - At least one instance in the group passed an ELB health - // check. - // - // * Removing - The instances in the group are being deregistered from the - // load balancer. If connection draining is enabled, Elastic Load Balancing - // waits for in-flight requests to complete before deregistering the instances. - // - // * Removed - All instances in the group are deregistered from the load - // balancer. - State *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s LoadBalancerState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancerState) GoString() string { - return s.String() -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *LoadBalancerState) SetLoadBalancerName(v string) *LoadBalancerState { - s.LoadBalancerName = &v - return s -} - -// SetState sets the State field's value. -func (s *LoadBalancerState) SetState(v string) *LoadBalancerState { - s.State = &v - return s -} - -// Describes the state of a target group. -// -// If you attach a target group to an existing Auto Scaling group, the initial -// state is Adding. The state transitions to Added after all Auto Scaling instances -// are registered with the target group. If Elastic Load Balancing health checks -// are enabled, the state transitions to InService after at least one Auto Scaling -// instance passes the health check. If EC2 health checks are enabled instead, -// the target group remains in the Added state. -type LoadBalancerTargetGroupState struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. - LoadBalancerTargetGroupARN *string `min:"1" type:"string"` - - // The state of the target group. - // - // * Adding - The Auto Scaling instances are being registered with the target - // group. - // - // * Added - All Auto Scaling instances are registered with the target group. - // - // * InService - At least one Auto Scaling instance passed an ELB health - // check. - // - // * Removing - The Auto Scaling instances are being deregistered from the - // target group. If connection draining is enabled, Elastic Load Balancing - // waits for in-flight requests to complete before deregistering the instances. - // - // * Removed - All Auto Scaling instances are deregistered from the target - // group. - State *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s LoadBalancerTargetGroupState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancerTargetGroupState) GoString() string { - return s.String() -} - -// SetLoadBalancerTargetGroupARN sets the LoadBalancerTargetGroupARN field's value. -func (s *LoadBalancerTargetGroupState) SetLoadBalancerTargetGroupARN(v string) *LoadBalancerTargetGroupState { - s.LoadBalancerTargetGroupARN = &v - return s -} - -// SetState sets the State field's value. -func (s *LoadBalancerTargetGroupState) SetState(v string) *LoadBalancerTargetGroupState { - s.State = &v - return s -} - -// Describes a metric. -type MetricCollectionType struct { - _ struct{} `type:"structure"` - - // One of the following metrics: - // - // * GroupMinSize - // - // * GroupMaxSize - // - // * GroupDesiredCapacity - // - // * GroupInServiceInstances - // - // * GroupPendingInstances - // - // * GroupStandbyInstances - // - // * GroupTerminatingInstances - // - // * GroupTotalInstances - Metric *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s MetricCollectionType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricCollectionType) GoString() string { - return s.String() -} - -// SetMetric sets the Metric field's value. -func (s *MetricCollectionType) SetMetric(v string) *MetricCollectionType { - s.Metric = &v - return s -} - -// Describes the dimension of a metric. -type MetricDimension struct { - _ struct{} `type:"structure"` - - // The name of the dimension. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The value of the dimension. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s MetricDimension) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricDimension) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MetricDimension) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MetricDimension"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *MetricDimension) SetName(v string) *MetricDimension { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *MetricDimension) SetValue(v string) *MetricDimension { - s.Value = &v - return s -} - -// Describes a granularity of a metric. -type MetricGranularityType struct { - _ struct{} `type:"structure"` - - // The granularity. The only valid value is 1Minute. - Granularity *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s MetricGranularityType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricGranularityType) GoString() string { - return s.String() -} - -// SetGranularity sets the Granularity field's value. -func (s *MetricGranularityType) SetGranularity(v string) *MetricGranularityType { - s.Granularity = &v - return s -} - -// Describes a mixed instances policy for an Auto Scaling group. With mixed -// instances, your Auto Scaling group can provision a combination of On-Demand -// Instances and Spot Instances across multiple instance types. For more information, -// see Using Multiple Instance Types and Purchase Options (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroup.html#asg-purchase-options) -// in the Amazon EC2 Auto Scaling User Guide. -// -// When you create your Auto Scaling group, you can specify a launch configuration -// or template as a parameter for the top-level object, or you can specify a -// mixed instances policy, but not both at the same time. -type MixedInstancesPolicy struct { - _ struct{} `type:"structure"` - - // The instances distribution to use. - // - // If you leave this parameter unspecified when creating the group, the default - // values are used. - InstancesDistribution *InstancesDistribution `type:"structure"` - - // The launch template and overrides. - // - // This parameter is required when creating an Auto Scaling group with a mixed - // instances policy, but is not required when updating the group. - LaunchTemplate *LaunchTemplate `type:"structure"` -} - -// String returns the string representation -func (s MixedInstancesPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MixedInstancesPolicy) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MixedInstancesPolicy) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MixedInstancesPolicy"} - if s.InstancesDistribution != nil { - if err := s.InstancesDistribution.Validate(); err != nil { - invalidParams.AddNested("InstancesDistribution", err.(request.ErrInvalidParams)) - } - } - if s.LaunchTemplate != nil { - if err := s.LaunchTemplate.Validate(); err != nil { - invalidParams.AddNested("LaunchTemplate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstancesDistribution sets the InstancesDistribution field's value. -func (s *MixedInstancesPolicy) SetInstancesDistribution(v *InstancesDistribution) *MixedInstancesPolicy { - s.InstancesDistribution = v - return s -} - -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *MixedInstancesPolicy) SetLaunchTemplate(v *LaunchTemplate) *MixedInstancesPolicy { - s.LaunchTemplate = v - return s -} - -// Describes a notification. -type NotificationConfiguration struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - AutoScalingGroupName *string `min:"1" type:"string"` - - // One of the following event notification types: - // - // * autoscaling:EC2_INSTANCE_LAUNCH - // - // * autoscaling:EC2_INSTANCE_LAUNCH_ERROR - // - // * autoscaling:EC2_INSTANCE_TERMINATE - // - // * autoscaling:EC2_INSTANCE_TERMINATE_ERROR - // - // * autoscaling:TEST_NOTIFICATION - NotificationType *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service - // (Amazon SNS) topic. - TopicARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s NotificationConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NotificationConfiguration) GoString() string { - return s.String() -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *NotificationConfiguration) SetAutoScalingGroupName(v string) *NotificationConfiguration { - s.AutoScalingGroupName = &v - return s -} - -// SetNotificationType sets the NotificationType field's value. -func (s *NotificationConfiguration) SetNotificationType(v string) *NotificationConfiguration { - s.NotificationType = &v - return s -} - -// SetTopicARN sets the TopicARN field's value. -func (s *NotificationConfiguration) SetTopicARN(v string) *NotificationConfiguration { - s.TopicARN = &v - return s -} - -// Configures a predefined metric for a target tracking policy. -type PredefinedMetricSpecification struct { - _ struct{} `type:"structure"` - - // The metric type. - // - // PredefinedMetricType is a required field - PredefinedMetricType *string `type:"string" required:"true" enum:"MetricType"` - - // Identifies the resource associated with the metric type. The following predefined - // metrics are available: - // - // * ASGAverageCPUUtilization - Average CPU utilization of the Auto Scaling - // group. - // - // * ASGAverageNetworkIn - Average number of bytes received on all network - // interfaces by the Auto Scaling group. - // - // * ASGAverageNetworkOut - Average number of bytes sent out on all network - // interfaces by the Auto Scaling group. - // - // * ALBRequestCountPerTarget - Number of requests completed per target in - // an Application Load Balancer target group. - // - // For predefined metric types ASGAverageCPUUtilization, ASGAverageNetworkIn, - // and ASGAverageNetworkOut, the parameter must not be specified as the resource - // associated with the metric type is the Auto Scaling group. For predefined - // metric type ALBRequestCountPerTarget, the parameter must be specified in - // the format: app/load-balancer-name/load-balancer-id/targetgroup/target-group-name/target-group-id, - // where app/load-balancer-name/load-balancer-id is the final portion of the - // load balancer ARN, and targetgroup/target-group-name/target-group-id is the - // final portion of the target group ARN. The target group must be attached - // to the Auto Scaling group. - ResourceLabel *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PredefinedMetricSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PredefinedMetricSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PredefinedMetricSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PredefinedMetricSpecification"} - if s.PredefinedMetricType == nil { - invalidParams.Add(request.NewErrParamRequired("PredefinedMetricType")) - } - if s.ResourceLabel != nil && len(*s.ResourceLabel) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceLabel", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPredefinedMetricType sets the PredefinedMetricType field's value. -func (s *PredefinedMetricSpecification) SetPredefinedMetricType(v string) *PredefinedMetricSpecification { - s.PredefinedMetricType = &v - return s -} - -// SetResourceLabel sets the ResourceLabel field's value. -func (s *PredefinedMetricSpecification) SetResourceLabel(v string) *PredefinedMetricSpecification { - s.ResourceLabel = &v - return s -} - -// Describes a process type. -// -// For more information, see Scaling Processes (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html#process-types) -// in the Amazon EC2 Auto Scaling User Guide. -type ProcessType struct { - _ struct{} `type:"structure"` - - // One of the following processes: - // - // * Launch - // - // * Terminate - // - // * AddToLoadBalancer - // - // * AlarmNotification - // - // * AZRebalance - // - // * HealthCheck - // - // * ReplaceUnhealthy - // - // * ScheduledActions - // - // ProcessName is a required field - ProcessName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ProcessType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProcessType) GoString() string { - return s.String() -} - -// SetProcessName sets the ProcessName field's value. -func (s *ProcessType) SetProcessName(v string) *ProcessType { - s.ProcessName = &v - return s -} - -type PutLifecycleHookInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // Defines the action the Auto Scaling group should take when the lifecycle - // hook timeout elapses or if an unexpected failure occurs. This parameter can - // be either CONTINUE or ABANDON. The default value is ABANDON. - DefaultResult *string `type:"string"` - - // The maximum time, in seconds, that can elapse before the lifecycle hook times - // out. The range is from 30 to 7200 seconds. The default is 3600 seconds (1 - // hour). - // - // If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the default - // action. You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat. - HeartbeatTimeout *int64 `type:"integer"` - - // The name of the lifecycle hook. - // - // LifecycleHookName is a required field - LifecycleHookName *string `min:"1" type:"string" required:"true"` - - // The instance state to which you want to attach the lifecycle hook. The possible - // values are: - // - // * autoscaling:EC2_INSTANCE_LAUNCHING - // - // * autoscaling:EC2_INSTANCE_TERMINATING - // - // This parameter is required for new lifecycle hooks, but optional when updating - // existing hooks. - LifecycleTransition *string `type:"string"` - - // Contains additional information that you want to include any time Amazon - // EC2 Auto Scaling sends a message to the notification target. - NotificationMetadata *string `min:"1" type:"string"` - - // The ARN of the notification target that Amazon EC2 Auto Scaling uses to notify - // you when an instance is in the transition state for the lifecycle hook. This - // target can be either an SQS queue or an SNS topic. If you specify an empty - // string, this overrides the current ARN. - // - // This operation uses the JSON format when sending notifications to an Amazon - // SQS queue, and an email key-value pair format when sending notifications - // to an Amazon SNS topic. - // - // When you specify a notification target, Amazon EC2 Auto Scaling sends it - // a test message. Test messages contain the following additional key-value - // pair: "Event": "autoscaling:TEST_NOTIFICATION". - NotificationTargetARN *string `type:"string"` - - // The ARN of the IAM role that allows the Auto Scaling group to publish to - // the specified notification target. - // - // This parameter is required for new lifecycle hooks, but optional when updating - // existing hooks. - RoleARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PutLifecycleHookInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutLifecycleHookInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutLifecycleHookInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutLifecycleHookInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.LifecycleHookName == nil { - invalidParams.Add(request.NewErrParamRequired("LifecycleHookName")) - } - if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1)) - } - if s.NotificationMetadata != nil && len(*s.NotificationMetadata) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NotificationMetadata", 1)) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *PutLifecycleHookInput) SetAutoScalingGroupName(v string) *PutLifecycleHookInput { - s.AutoScalingGroupName = &v - return s -} - -// SetDefaultResult sets the DefaultResult field's value. -func (s *PutLifecycleHookInput) SetDefaultResult(v string) *PutLifecycleHookInput { - s.DefaultResult = &v - return s -} - -// SetHeartbeatTimeout sets the HeartbeatTimeout field's value. -func (s *PutLifecycleHookInput) SetHeartbeatTimeout(v int64) *PutLifecycleHookInput { - s.HeartbeatTimeout = &v - return s -} - -// SetLifecycleHookName sets the LifecycleHookName field's value. -func (s *PutLifecycleHookInput) SetLifecycleHookName(v string) *PutLifecycleHookInput { - s.LifecycleHookName = &v - return s -} - -// SetLifecycleTransition sets the LifecycleTransition field's value. -func (s *PutLifecycleHookInput) SetLifecycleTransition(v string) *PutLifecycleHookInput { - s.LifecycleTransition = &v - return s -} - -// SetNotificationMetadata sets the NotificationMetadata field's value. -func (s *PutLifecycleHookInput) SetNotificationMetadata(v string) *PutLifecycleHookInput { - s.NotificationMetadata = &v - return s -} - -// SetNotificationTargetARN sets the NotificationTargetARN field's value. -func (s *PutLifecycleHookInput) SetNotificationTargetARN(v string) *PutLifecycleHookInput { - s.NotificationTargetARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *PutLifecycleHookInput) SetRoleARN(v string) *PutLifecycleHookInput { - s.RoleARN = &v - return s -} - -type PutLifecycleHookOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutLifecycleHookOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutLifecycleHookOutput) GoString() string { - return s.String() -} - -type PutNotificationConfigurationInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The type of event that causes the notification to be sent. For more information - // about notification types supported by Amazon EC2 Auto Scaling, see DescribeAutoScalingNotificationTypes. - // - // NotificationTypes is a required field - NotificationTypes []*string `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service - // (Amazon SNS) topic. - // - // TopicARN is a required field - TopicARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutNotificationConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutNotificationConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutNotificationConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutNotificationConfigurationInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.NotificationTypes == nil { - invalidParams.Add(request.NewErrParamRequired("NotificationTypes")) - } - if s.TopicARN == nil { - invalidParams.Add(request.NewErrParamRequired("TopicARN")) - } - if s.TopicARN != nil && len(*s.TopicARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TopicARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *PutNotificationConfigurationInput) SetAutoScalingGroupName(v string) *PutNotificationConfigurationInput { - s.AutoScalingGroupName = &v - return s -} - -// SetNotificationTypes sets the NotificationTypes field's value. -func (s *PutNotificationConfigurationInput) SetNotificationTypes(v []*string) *PutNotificationConfigurationInput { - s.NotificationTypes = v - return s -} - -// SetTopicARN sets the TopicARN field's value. -func (s *PutNotificationConfigurationInput) SetTopicARN(v string) *PutNotificationConfigurationInput { - s.TopicARN = &v - return s -} - -type PutNotificationConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutNotificationConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutNotificationConfigurationOutput) GoString() string { - return s.String() -} - -type PutScalingPolicyInput struct { - _ struct{} `type:"structure"` - - // The adjustment type. The valid values are ChangeInCapacity, ExactCapacity, - // and PercentChangeInCapacity. - // - // This parameter is supported if the policy type is SimpleScaling or StepScaling. - // - // For more information, see Dynamic Scaling (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scale-based-on-demand.html) - // in the Amazon EC2 Auto Scaling User Guide. - AdjustmentType *string `min:"1" type:"string"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The amount of time, in seconds, after a scaling activity completes and before - // the next scaling activity can start. If this parameter is not specified, - // the default cooldown period for the group applies. - // - // This parameter is supported if the policy type is SimpleScaling. - // - // For more information, see Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) - // in the Amazon EC2 Auto Scaling User Guide. - Cooldown *int64 `type:"integer"` - - // The estimated time, in seconds, until a newly launched instance can contribute - // to the CloudWatch metrics. The default is to use the value specified for - // the default cooldown period for the group. - // - // This parameter is supported if the policy type is StepScaling or TargetTrackingScaling. - EstimatedInstanceWarmup *int64 `type:"integer"` - - // The aggregation type for the CloudWatch metrics. The valid values are Minimum, - // Maximum, and Average. If the aggregation type is null, the value is treated - // as Average. - // - // This parameter is supported if the policy type is StepScaling. - MetricAggregationType *string `min:"1" type:"string"` - - // The minimum number of instances to scale. If the value of AdjustmentType - // is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity - // of the Auto Scaling group by at least this many instances. Otherwise, the - // error is ValidationError. - // - // This parameter is supported if the policy type is SimpleScaling or StepScaling. - MinAdjustmentMagnitude *int64 `type:"integer"` - - // Available for backward compatibility. Use MinAdjustmentMagnitude instead. - MinAdjustmentStep *int64 `deprecated:"true" type:"integer"` - - // The name of the policy. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The policy type. The valid values are SimpleScaling, StepScaling, and TargetTrackingScaling. - // If the policy type is null, the value is treated as SimpleScaling. - PolicyType *string `min:"1" type:"string"` - - // The amount by which to scale, based on the specified adjustment type. A positive - // value adds to the current capacity while a negative number removes from the - // current capacity. - // - // This parameter is required if the policy type is SimpleScaling and not supported - // otherwise. - ScalingAdjustment *int64 `type:"integer"` - - // A set of adjustments that enable you to scale based on the size of the alarm - // breach. - // - // This parameter is required if the policy type is StepScaling and not supported - // otherwise. - StepAdjustments []*StepAdjustment `type:"list"` - - // A target tracking policy. - // - // This parameter is required if the policy type is TargetTrackingScaling and - // not supported otherwise. - TargetTrackingConfiguration *TargetTrackingConfiguration `type:"structure"` -} - -// String returns the string representation -func (s PutScalingPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutScalingPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutScalingPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutScalingPolicyInput"} - if s.AdjustmentType != nil && len(*s.AdjustmentType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AdjustmentType", 1)) - } - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.MetricAggregationType != nil && len(*s.MetricAggregationType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MetricAggregationType", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.PolicyType != nil && len(*s.PolicyType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyType", 1)) - } - if s.StepAdjustments != nil { - for i, v := range s.StepAdjustments { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "StepAdjustments", i), err.(request.ErrInvalidParams)) - } - } - } - if s.TargetTrackingConfiguration != nil { - if err := s.TargetTrackingConfiguration.Validate(); err != nil { - invalidParams.AddNested("TargetTrackingConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdjustmentType sets the AdjustmentType field's value. -func (s *PutScalingPolicyInput) SetAdjustmentType(v string) *PutScalingPolicyInput { - s.AdjustmentType = &v - return s -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *PutScalingPolicyInput) SetAutoScalingGroupName(v string) *PutScalingPolicyInput { - s.AutoScalingGroupName = &v - return s -} - -// SetCooldown sets the Cooldown field's value. -func (s *PutScalingPolicyInput) SetCooldown(v int64) *PutScalingPolicyInput { - s.Cooldown = &v - return s -} - -// SetEstimatedInstanceWarmup sets the EstimatedInstanceWarmup field's value. -func (s *PutScalingPolicyInput) SetEstimatedInstanceWarmup(v int64) *PutScalingPolicyInput { - s.EstimatedInstanceWarmup = &v - return s -} - -// SetMetricAggregationType sets the MetricAggregationType field's value. -func (s *PutScalingPolicyInput) SetMetricAggregationType(v string) *PutScalingPolicyInput { - s.MetricAggregationType = &v - return s -} - -// SetMinAdjustmentMagnitude sets the MinAdjustmentMagnitude field's value. -func (s *PutScalingPolicyInput) SetMinAdjustmentMagnitude(v int64) *PutScalingPolicyInput { - s.MinAdjustmentMagnitude = &v - return s -} - -// SetMinAdjustmentStep sets the MinAdjustmentStep field's value. -func (s *PutScalingPolicyInput) SetMinAdjustmentStep(v int64) *PutScalingPolicyInput { - s.MinAdjustmentStep = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PutScalingPolicyInput) SetPolicyName(v string) *PutScalingPolicyInput { - s.PolicyName = &v - return s -} - -// SetPolicyType sets the PolicyType field's value. -func (s *PutScalingPolicyInput) SetPolicyType(v string) *PutScalingPolicyInput { - s.PolicyType = &v - return s -} - -// SetScalingAdjustment sets the ScalingAdjustment field's value. -func (s *PutScalingPolicyInput) SetScalingAdjustment(v int64) *PutScalingPolicyInput { - s.ScalingAdjustment = &v - return s -} - -// SetStepAdjustments sets the StepAdjustments field's value. -func (s *PutScalingPolicyInput) SetStepAdjustments(v []*StepAdjustment) *PutScalingPolicyInput { - s.StepAdjustments = v - return s -} - -// SetTargetTrackingConfiguration sets the TargetTrackingConfiguration field's value. -func (s *PutScalingPolicyInput) SetTargetTrackingConfiguration(v *TargetTrackingConfiguration) *PutScalingPolicyInput { - s.TargetTrackingConfiguration = v - return s -} - -// Contains the output of PutScalingPolicy. -type PutScalingPolicyOutput struct { - _ struct{} `type:"structure"` - - // The CloudWatch alarms created for the target tracking policy. - Alarms []*Alarm `type:"list"` - - // The Amazon Resource Name (ARN) of the policy. - PolicyARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PutScalingPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutScalingPolicyOutput) GoString() string { - return s.String() -} - -// SetAlarms sets the Alarms field's value. -func (s *PutScalingPolicyOutput) SetAlarms(v []*Alarm) *PutScalingPolicyOutput { - s.Alarms = v - return s -} - -// SetPolicyARN sets the PolicyARN field's value. -func (s *PutScalingPolicyOutput) SetPolicyARN(v string) *PutScalingPolicyOutput { - s.PolicyARN = &v - return s -} - -type PutScheduledUpdateGroupActionInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The number of EC2 instances that should be running in the group. - DesiredCapacity *int64 `type:"integer"` - - // The time for the recurring schedule to end. Amazon EC2 Auto Scaling does - // not perform the action after this time. - EndTime *time.Time `type:"timestamp"` - - // The maximum size for the Auto Scaling group. - MaxSize *int64 `type:"integer"` - - // The minimum size for the Auto Scaling group. - MinSize *int64 `type:"integer"` - - // The recurring schedule for this action, in Unix cron syntax format. For more - // information about this format, see Crontab (http://crontab.org). - Recurrence *string `min:"1" type:"string"` - - // The name of this scaling action. - // - // ScheduledActionName is a required field - ScheduledActionName *string `min:"1" type:"string" required:"true"` - - // The time for this action to start, in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT - // only (for example, 2014-06-01T00:00:00Z). - // - // If you specify Recurrence and StartTime, Amazon EC2 Auto Scaling performs - // the action at this time, and then performs the action based on the specified - // recurrence. - // - // If you try to schedule your action in the past, Amazon EC2 Auto Scaling returns - // an error message. - StartTime *time.Time `type:"timestamp"` - - // This parameter is deprecated. - Time *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s PutScheduledUpdateGroupActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutScheduledUpdateGroupActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutScheduledUpdateGroupActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutScheduledUpdateGroupActionInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.Recurrence != nil && len(*s.Recurrence) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Recurrence", 1)) - } - if s.ScheduledActionName == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduledActionName")) - } - if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *PutScheduledUpdateGroupActionInput) SetAutoScalingGroupName(v string) *PutScheduledUpdateGroupActionInput { - s.AutoScalingGroupName = &v - return s -} - -// SetDesiredCapacity sets the DesiredCapacity field's value. -func (s *PutScheduledUpdateGroupActionInput) SetDesiredCapacity(v int64) *PutScheduledUpdateGroupActionInput { - s.DesiredCapacity = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *PutScheduledUpdateGroupActionInput) SetEndTime(v time.Time) *PutScheduledUpdateGroupActionInput { - s.EndTime = &v - return s -} - -// SetMaxSize sets the MaxSize field's value. -func (s *PutScheduledUpdateGroupActionInput) SetMaxSize(v int64) *PutScheduledUpdateGroupActionInput { - s.MaxSize = &v - return s -} - -// SetMinSize sets the MinSize field's value. -func (s *PutScheduledUpdateGroupActionInput) SetMinSize(v int64) *PutScheduledUpdateGroupActionInput { - s.MinSize = &v - return s -} - -// SetRecurrence sets the Recurrence field's value. -func (s *PutScheduledUpdateGroupActionInput) SetRecurrence(v string) *PutScheduledUpdateGroupActionInput { - s.Recurrence = &v - return s -} - -// SetScheduledActionName sets the ScheduledActionName field's value. -func (s *PutScheduledUpdateGroupActionInput) SetScheduledActionName(v string) *PutScheduledUpdateGroupActionInput { - s.ScheduledActionName = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *PutScheduledUpdateGroupActionInput) SetStartTime(v time.Time) *PutScheduledUpdateGroupActionInput { - s.StartTime = &v - return s -} - -// SetTime sets the Time field's value. -func (s *PutScheduledUpdateGroupActionInput) SetTime(v time.Time) *PutScheduledUpdateGroupActionInput { - s.Time = &v - return s -} - -type PutScheduledUpdateGroupActionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutScheduledUpdateGroupActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutScheduledUpdateGroupActionOutput) GoString() string { - return s.String() -} - -type RecordLifecycleActionHeartbeatInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The ID of the instance. - InstanceId *string `min:"1" type:"string"` - - // A token that uniquely identifies a specific lifecycle action associated with - // an instance. Amazon EC2 Auto Scaling sends this token to the notification - // target that you specified when you created the lifecycle hook. - LifecycleActionToken *string `min:"36" type:"string"` - - // The name of the lifecycle hook. - // - // LifecycleHookName is a required field - LifecycleHookName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RecordLifecycleActionHeartbeatInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecordLifecycleActionHeartbeatInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RecordLifecycleActionHeartbeatInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RecordLifecycleActionHeartbeatInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.InstanceId != nil && len(*s.InstanceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1)) - } - if s.LifecycleActionToken != nil && len(*s.LifecycleActionToken) < 36 { - invalidParams.Add(request.NewErrParamMinLen("LifecycleActionToken", 36)) - } - if s.LifecycleHookName == nil { - invalidParams.Add(request.NewErrParamRequired("LifecycleHookName")) - } - if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *RecordLifecycleActionHeartbeatInput) SetAutoScalingGroupName(v string) *RecordLifecycleActionHeartbeatInput { - s.AutoScalingGroupName = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *RecordLifecycleActionHeartbeatInput) SetInstanceId(v string) *RecordLifecycleActionHeartbeatInput { - s.InstanceId = &v - return s -} - -// SetLifecycleActionToken sets the LifecycleActionToken field's value. -func (s *RecordLifecycleActionHeartbeatInput) SetLifecycleActionToken(v string) *RecordLifecycleActionHeartbeatInput { - s.LifecycleActionToken = &v - return s -} - -// SetLifecycleHookName sets the LifecycleHookName field's value. -func (s *RecordLifecycleActionHeartbeatInput) SetLifecycleHookName(v string) *RecordLifecycleActionHeartbeatInput { - s.LifecycleHookName = &v - return s -} - -type RecordLifecycleActionHeartbeatOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RecordLifecycleActionHeartbeatOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecordLifecycleActionHeartbeatOutput) GoString() string { - return s.String() -} - -type ResumeProcessesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ResumeProcessesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResumeProcessesOutput) GoString() string { - return s.String() -} - -// Describes a scaling policy. -type ScalingPolicy struct { - _ struct{} `type:"structure"` - - // The adjustment type, which specifies how ScalingAdjustment is interpreted. - // Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity. - AdjustmentType *string `min:"1" type:"string"` - - // The CloudWatch alarms related to the policy. - Alarms []*Alarm `type:"list"` - - // The name of the Auto Scaling group. - AutoScalingGroupName *string `min:"1" type:"string"` - - // The amount of time, in seconds, after a scaling activity completes before - // any further dynamic scaling activities can start. - Cooldown *int64 `type:"integer"` - - // The estimated time, in seconds, until a newly launched instance can contribute - // to the CloudWatch metrics. - EstimatedInstanceWarmup *int64 `type:"integer"` - - // The aggregation type for the CloudWatch metrics. Valid values are Minimum, - // Maximum, and Average. - MetricAggregationType *string `min:"1" type:"string"` - - // The minimum number of instances to scale. If the value of AdjustmentType - // is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity - // of the Auto Scaling group by at least this many instances. Otherwise, the - // error is ValidationError. - MinAdjustmentMagnitude *int64 `type:"integer"` - - // Available for backward compatibility. Use MinAdjustmentMagnitude instead. - MinAdjustmentStep *int64 `deprecated:"true" type:"integer"` - - // The Amazon Resource Name (ARN) of the policy. - PolicyARN *string `min:"1" type:"string"` - - // The name of the scaling policy. - PolicyName *string `min:"1" type:"string"` - - // The policy type. Valid values are SimpleScaling and StepScaling. - PolicyType *string `min:"1" type:"string"` - - // The amount by which to scale, based on the specified adjustment type. A positive - // value adds to the current capacity while a negative number removes from the - // current capacity. - ScalingAdjustment *int64 `type:"integer"` - - // A set of adjustments that enable you to scale based on the size of the alarm - // breach. - StepAdjustments []*StepAdjustment `type:"list"` - - // A target tracking policy. - TargetTrackingConfiguration *TargetTrackingConfiguration `type:"structure"` -} - -// String returns the string representation -func (s ScalingPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalingPolicy) GoString() string { - return s.String() -} - -// SetAdjustmentType sets the AdjustmentType field's value. -func (s *ScalingPolicy) SetAdjustmentType(v string) *ScalingPolicy { - s.AdjustmentType = &v - return s -} - -// SetAlarms sets the Alarms field's value. -func (s *ScalingPolicy) SetAlarms(v []*Alarm) *ScalingPolicy { - s.Alarms = v - return s -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *ScalingPolicy) SetAutoScalingGroupName(v string) *ScalingPolicy { - s.AutoScalingGroupName = &v - return s -} - -// SetCooldown sets the Cooldown field's value. -func (s *ScalingPolicy) SetCooldown(v int64) *ScalingPolicy { - s.Cooldown = &v - return s -} - -// SetEstimatedInstanceWarmup sets the EstimatedInstanceWarmup field's value. -func (s *ScalingPolicy) SetEstimatedInstanceWarmup(v int64) *ScalingPolicy { - s.EstimatedInstanceWarmup = &v - return s -} - -// SetMetricAggregationType sets the MetricAggregationType field's value. -func (s *ScalingPolicy) SetMetricAggregationType(v string) *ScalingPolicy { - s.MetricAggregationType = &v - return s -} - -// SetMinAdjustmentMagnitude sets the MinAdjustmentMagnitude field's value. -func (s *ScalingPolicy) SetMinAdjustmentMagnitude(v int64) *ScalingPolicy { - s.MinAdjustmentMagnitude = &v - return s -} - -// SetMinAdjustmentStep sets the MinAdjustmentStep field's value. -func (s *ScalingPolicy) SetMinAdjustmentStep(v int64) *ScalingPolicy { - s.MinAdjustmentStep = &v - return s -} - -// SetPolicyARN sets the PolicyARN field's value. -func (s *ScalingPolicy) SetPolicyARN(v string) *ScalingPolicy { - s.PolicyARN = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *ScalingPolicy) SetPolicyName(v string) *ScalingPolicy { - s.PolicyName = &v - return s -} - -// SetPolicyType sets the PolicyType field's value. -func (s *ScalingPolicy) SetPolicyType(v string) *ScalingPolicy { - s.PolicyType = &v - return s -} - -// SetScalingAdjustment sets the ScalingAdjustment field's value. -func (s *ScalingPolicy) SetScalingAdjustment(v int64) *ScalingPolicy { - s.ScalingAdjustment = &v - return s -} - -// SetStepAdjustments sets the StepAdjustments field's value. -func (s *ScalingPolicy) SetStepAdjustments(v []*StepAdjustment) *ScalingPolicy { - s.StepAdjustments = v - return s -} - -// SetTargetTrackingConfiguration sets the TargetTrackingConfiguration field's value. -func (s *ScalingPolicy) SetTargetTrackingConfiguration(v *TargetTrackingConfiguration) *ScalingPolicy { - s.TargetTrackingConfiguration = v - return s -} - -type ScalingProcessQuery struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // One or more of the following processes. If you omit this parameter, all processes - // are specified. - // - // * Launch - // - // * Terminate - // - // * HealthCheck - // - // * ReplaceUnhealthy - // - // * AZRebalance - // - // * AlarmNotification - // - // * ScheduledActions - // - // * AddToLoadBalancer - ScalingProcesses []*string `type:"list"` -} - -// String returns the string representation -func (s ScalingProcessQuery) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalingProcessQuery) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScalingProcessQuery) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScalingProcessQuery"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *ScalingProcessQuery) SetAutoScalingGroupName(v string) *ScalingProcessQuery { - s.AutoScalingGroupName = &v - return s -} - -// SetScalingProcesses sets the ScalingProcesses field's value. -func (s *ScalingProcessQuery) SetScalingProcesses(v []*string) *ScalingProcessQuery { - s.ScalingProcesses = v - return s -} - -// Describes a scheduled scaling action. Used in response to DescribeScheduledActions. -type ScheduledUpdateGroupAction struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - AutoScalingGroupName *string `min:"1" type:"string"` - - // The number of instances you prefer to maintain in the group. - DesiredCapacity *int64 `type:"integer"` - - // The date and time that the action is scheduled to end. This date and time - // can be up to one month in the future. - EndTime *time.Time `type:"timestamp"` - - // The maximum size of the group. - MaxSize *int64 `type:"integer"` - - // The minimum size of the group. - MinSize *int64 `type:"integer"` - - // The recurring schedule for the action. - Recurrence *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the scheduled action. - ScheduledActionARN *string `min:"1" type:"string"` - - // The name of the scheduled action. - ScheduledActionName *string `min:"1" type:"string"` - - // The date and time that the action is scheduled to begin. This date and time - // can be up to one month in the future. - // - // When StartTime and EndTime are specified with Recurrence, they form the boundaries - // of when the recurring action starts and stops. - StartTime *time.Time `type:"timestamp"` - - // This parameter is deprecated. - Time *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s ScheduledUpdateGroupAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledUpdateGroupAction) GoString() string { - return s.String() -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *ScheduledUpdateGroupAction) SetAutoScalingGroupName(v string) *ScheduledUpdateGroupAction { - s.AutoScalingGroupName = &v - return s -} - -// SetDesiredCapacity sets the DesiredCapacity field's value. -func (s *ScheduledUpdateGroupAction) SetDesiredCapacity(v int64) *ScheduledUpdateGroupAction { - s.DesiredCapacity = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *ScheduledUpdateGroupAction) SetEndTime(v time.Time) *ScheduledUpdateGroupAction { - s.EndTime = &v - return s -} - -// SetMaxSize sets the MaxSize field's value. -func (s *ScheduledUpdateGroupAction) SetMaxSize(v int64) *ScheduledUpdateGroupAction { - s.MaxSize = &v - return s -} - -// SetMinSize sets the MinSize field's value. -func (s *ScheduledUpdateGroupAction) SetMinSize(v int64) *ScheduledUpdateGroupAction { - s.MinSize = &v - return s -} - -// SetRecurrence sets the Recurrence field's value. -func (s *ScheduledUpdateGroupAction) SetRecurrence(v string) *ScheduledUpdateGroupAction { - s.Recurrence = &v - return s -} - -// SetScheduledActionARN sets the ScheduledActionARN field's value. -func (s *ScheduledUpdateGroupAction) SetScheduledActionARN(v string) *ScheduledUpdateGroupAction { - s.ScheduledActionARN = &v - return s -} - -// SetScheduledActionName sets the ScheduledActionName field's value. -func (s *ScheduledUpdateGroupAction) SetScheduledActionName(v string) *ScheduledUpdateGroupAction { - s.ScheduledActionName = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *ScheduledUpdateGroupAction) SetStartTime(v time.Time) *ScheduledUpdateGroupAction { - s.StartTime = &v - return s -} - -// SetTime sets the Time field's value. -func (s *ScheduledUpdateGroupAction) SetTime(v time.Time) *ScheduledUpdateGroupAction { - s.Time = &v - return s -} - -// Describes one or more scheduled scaling action updates for a specified Auto -// Scaling group. Used in combination with BatchPutScheduledUpdateGroupAction. -// -// When updating a scheduled scaling action, all optional parameters are left -// unchanged if not specified. -type ScheduledUpdateGroupActionRequest struct { - _ struct{} `type:"structure"` - - // The number of EC2 instances that should be running in the group. - DesiredCapacity *int64 `type:"integer"` - - // The time for the recurring schedule to end. Amazon EC2 Auto Scaling does - // not perform the action after this time. - EndTime *time.Time `type:"timestamp"` - - // The maximum size of the group. - MaxSize *int64 `type:"integer"` - - // The minimum size of the group. - MinSize *int64 `type:"integer"` - - // The recurring schedule for the action, in Unix cron syntax format. For more - // information about this format, see Crontab (http://crontab.org). - Recurrence *string `min:"1" type:"string"` - - // The name of the scaling action. - // - // ScheduledActionName is a required field - ScheduledActionName *string `min:"1" type:"string" required:"true"` - - // The time for the action to start, in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT - // only (for example, 2014-06-01T00:00:00Z). - // - // If you specify Recurrence and StartTime, Amazon EC2 Auto Scaling performs - // the action at this time, and then performs the action based on the specified - // recurrence. - // - // If you try to schedule the action in the past, Amazon EC2 Auto Scaling returns - // an error message. - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s ScheduledUpdateGroupActionRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledUpdateGroupActionRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScheduledUpdateGroupActionRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScheduledUpdateGroupActionRequest"} - if s.Recurrence != nil && len(*s.Recurrence) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Recurrence", 1)) - } - if s.ScheduledActionName == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduledActionName")) - } - if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDesiredCapacity sets the DesiredCapacity field's value. -func (s *ScheduledUpdateGroupActionRequest) SetDesiredCapacity(v int64) *ScheduledUpdateGroupActionRequest { - s.DesiredCapacity = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *ScheduledUpdateGroupActionRequest) SetEndTime(v time.Time) *ScheduledUpdateGroupActionRequest { - s.EndTime = &v - return s -} - -// SetMaxSize sets the MaxSize field's value. -func (s *ScheduledUpdateGroupActionRequest) SetMaxSize(v int64) *ScheduledUpdateGroupActionRequest { - s.MaxSize = &v - return s -} - -// SetMinSize sets the MinSize field's value. -func (s *ScheduledUpdateGroupActionRequest) SetMinSize(v int64) *ScheduledUpdateGroupActionRequest { - s.MinSize = &v - return s -} - -// SetRecurrence sets the Recurrence field's value. -func (s *ScheduledUpdateGroupActionRequest) SetRecurrence(v string) *ScheduledUpdateGroupActionRequest { - s.Recurrence = &v - return s -} - -// SetScheduledActionName sets the ScheduledActionName field's value. -func (s *ScheduledUpdateGroupActionRequest) SetScheduledActionName(v string) *ScheduledUpdateGroupActionRequest { - s.ScheduledActionName = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *ScheduledUpdateGroupActionRequest) SetStartTime(v time.Time) *ScheduledUpdateGroupActionRequest { - s.StartTime = &v - return s -} - -type SetDesiredCapacityInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // The number of EC2 instances that should be running in the Auto Scaling group. - // - // DesiredCapacity is a required field - DesiredCapacity *int64 `type:"integer" required:"true"` - - // Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to - // complete before initiating a scaling activity to set your Auto Scaling group - // to its new capacity. By default, Amazon EC2 Auto Scaling does not honor the - // cooldown period during manual scaling activities. - HonorCooldown *bool `type:"boolean"` -} - -// String returns the string representation -func (s SetDesiredCapacityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetDesiredCapacityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetDesiredCapacityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetDesiredCapacityInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.DesiredCapacity == nil { - invalidParams.Add(request.NewErrParamRequired("DesiredCapacity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *SetDesiredCapacityInput) SetAutoScalingGroupName(v string) *SetDesiredCapacityInput { - s.AutoScalingGroupName = &v - return s -} - -// SetDesiredCapacity sets the DesiredCapacity field's value. -func (s *SetDesiredCapacityInput) SetDesiredCapacity(v int64) *SetDesiredCapacityInput { - s.DesiredCapacity = &v - return s -} - -// SetHonorCooldown sets the HonorCooldown field's value. -func (s *SetDesiredCapacityInput) SetHonorCooldown(v bool) *SetDesiredCapacityInput { - s.HonorCooldown = &v - return s -} - -type SetDesiredCapacityOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetDesiredCapacityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetDesiredCapacityOutput) GoString() string { - return s.String() -} - -type SetInstanceHealthInput struct { - _ struct{} `type:"structure"` - - // The health status of the instance. Set to Healthy to have the instance remain - // in service. Set to Unhealthy to have the instance be out of service. Amazon - // EC2 Auto Scaling terminates and replaces the unhealthy instance. - // - // HealthStatus is a required field - HealthStatus *string `min:"1" type:"string" required:"true"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `min:"1" type:"string" required:"true"` - - // If the Auto Scaling group of the specified instance has a HealthCheckGracePeriod - // specified for the group, by default, this call respects the grace period. - // Set this to False, to have the call not respect the grace period associated - // with the group. - // - // For more information about the health check grace period, see CreateAutoScalingGroup. - ShouldRespectGracePeriod *bool `type:"boolean"` -} - -// String returns the string representation -func (s SetInstanceHealthInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetInstanceHealthInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetInstanceHealthInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetInstanceHealthInput"} - if s.HealthStatus == nil { - invalidParams.Add(request.NewErrParamRequired("HealthStatus")) - } - if s.HealthStatus != nil && len(*s.HealthStatus) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HealthStatus", 1)) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.InstanceId != nil && len(*s.InstanceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthStatus sets the HealthStatus field's value. -func (s *SetInstanceHealthInput) SetHealthStatus(v string) *SetInstanceHealthInput { - s.HealthStatus = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *SetInstanceHealthInput) SetInstanceId(v string) *SetInstanceHealthInput { - s.InstanceId = &v - return s -} - -// SetShouldRespectGracePeriod sets the ShouldRespectGracePeriod field's value. -func (s *SetInstanceHealthInput) SetShouldRespectGracePeriod(v bool) *SetInstanceHealthInput { - s.ShouldRespectGracePeriod = &v - return s -} - -type SetInstanceHealthOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetInstanceHealthOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetInstanceHealthOutput) GoString() string { - return s.String() -} - -type SetInstanceProtectionInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // One or more instance IDs. - // - // InstanceIds is a required field - InstanceIds []*string `type:"list" required:"true"` - - // Indicates whether the instance is protected from termination by Amazon EC2 - // Auto Scaling when scaling in. - // - // ProtectedFromScaleIn is a required field - ProtectedFromScaleIn *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s SetInstanceProtectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetInstanceProtectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetInstanceProtectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetInstanceProtectionInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.InstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceIds")) - } - if s.ProtectedFromScaleIn == nil { - invalidParams.Add(request.NewErrParamRequired("ProtectedFromScaleIn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *SetInstanceProtectionInput) SetAutoScalingGroupName(v string) *SetInstanceProtectionInput { - s.AutoScalingGroupName = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *SetInstanceProtectionInput) SetInstanceIds(v []*string) *SetInstanceProtectionInput { - s.InstanceIds = v - return s -} - -// SetProtectedFromScaleIn sets the ProtectedFromScaleIn field's value. -func (s *SetInstanceProtectionInput) SetProtectedFromScaleIn(v bool) *SetInstanceProtectionInput { - s.ProtectedFromScaleIn = &v - return s -} - -type SetInstanceProtectionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetInstanceProtectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetInstanceProtectionOutput) GoString() string { - return s.String() -} - -// Describes an adjustment based on the difference between the value of the -// aggregated CloudWatch metric and the breach threshold that you've defined -// for the alarm. -// -// For the following examples, suppose that you have an alarm with a breach -// threshold of 50: -// -// * To trigger the adjustment when the metric is greater than or equal to -// 50 and less than 60, specify a lower bound of 0 and an upper bound of -// 10. -// -// * To trigger the adjustment when the metric is greater than 40 and less -// than or equal to 50, specify a lower bound of -10 and an upper bound of -// 0. -// -// There are a few rules for the step adjustments for your step policy: -// -// * The ranges of your step adjustments can't overlap or have a gap. -// -// * At most, one step adjustment can have a null lower bound. If one step -// adjustment has a negative lower bound, then there must be a step adjustment -// with a null lower bound. -// -// * At most, one step adjustment can have a null upper bound. If one step -// adjustment has a positive upper bound, then there must be a step adjustment -// with a null upper bound. -// -// * The upper and lower bound can't be null in the same step adjustment. -type StepAdjustment struct { - _ struct{} `type:"structure"` - - // The lower bound for the difference between the alarm threshold and the CloudWatch - // metric. If the metric value is above the breach threshold, the lower bound - // is inclusive (the metric must be greater than or equal to the threshold plus - // the lower bound). Otherwise, it is exclusive (the metric must be greater - // than the threshold plus the lower bound). A null value indicates negative - // infinity. - MetricIntervalLowerBound *float64 `type:"double"` - - // The upper bound for the difference between the alarm threshold and the CloudWatch - // metric. If the metric value is above the breach threshold, the upper bound - // is exclusive (the metric must be less than the threshold plus the upper bound). - // Otherwise, it is inclusive (the metric must be less than or equal to the - // threshold plus the upper bound). A null value indicates positive infinity. - // - // The upper bound must be greater than the lower bound. - MetricIntervalUpperBound *float64 `type:"double"` - - // The amount by which to scale, based on the specified adjustment type. A positive - // value adds to the current capacity while a negative number removes from the - // current capacity. - // - // ScalingAdjustment is a required field - ScalingAdjustment *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s StepAdjustment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StepAdjustment) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StepAdjustment) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StepAdjustment"} - if s.ScalingAdjustment == nil { - invalidParams.Add(request.NewErrParamRequired("ScalingAdjustment")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMetricIntervalLowerBound sets the MetricIntervalLowerBound field's value. -func (s *StepAdjustment) SetMetricIntervalLowerBound(v float64) *StepAdjustment { - s.MetricIntervalLowerBound = &v - return s -} - -// SetMetricIntervalUpperBound sets the MetricIntervalUpperBound field's value. -func (s *StepAdjustment) SetMetricIntervalUpperBound(v float64) *StepAdjustment { - s.MetricIntervalUpperBound = &v - return s -} - -// SetScalingAdjustment sets the ScalingAdjustment field's value. -func (s *StepAdjustment) SetScalingAdjustment(v int64) *StepAdjustment { - s.ScalingAdjustment = &v - return s -} - -type SuspendProcessesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SuspendProcessesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SuspendProcessesOutput) GoString() string { - return s.String() -} - -// Describes an automatic scaling process that has been suspended. For more -// information, see ProcessType. -type SuspendedProcess struct { - _ struct{} `type:"structure"` - - // The name of the suspended process. - ProcessName *string `min:"1" type:"string"` - - // The reason that the process was suspended. - SuspensionReason *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s SuspendedProcess) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SuspendedProcess) GoString() string { - return s.String() -} - -// SetProcessName sets the ProcessName field's value. -func (s *SuspendedProcess) SetProcessName(v string) *SuspendedProcess { - s.ProcessName = &v - return s -} - -// SetSuspensionReason sets the SuspensionReason field's value. -func (s *SuspendedProcess) SetSuspensionReason(v string) *SuspendedProcess { - s.SuspensionReason = &v - return s -} - -// Describes a tag for an Auto Scaling group. -type Tag struct { - _ struct{} `type:"structure"` - - // The tag key. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // Determines whether the tag is added to new instances as they are launched - // in the group. - PropagateAtLaunch *bool `type:"boolean"` - - // The name of the group. - ResourceId *string `type:"string"` - - // The type of resource. The only supported value is auto-scaling-group. - ResourceType *string `type:"string"` - - // The tag value. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetPropagateAtLaunch sets the PropagateAtLaunch field's value. -func (s *Tag) SetPropagateAtLaunch(v bool) *Tag { - s.PropagateAtLaunch = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *Tag) SetResourceId(v string) *Tag { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *Tag) SetResourceType(v string) *Tag { - s.ResourceType = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Describes a tag for an Auto Scaling group. -type TagDescription struct { - _ struct{} `type:"structure"` - - // The tag key. - Key *string `min:"1" type:"string"` - - // Determines whether the tag is added to new instances as they are launched - // in the group. - PropagateAtLaunch *bool `type:"boolean"` - - // The name of the group. - ResourceId *string `type:"string"` - - // The type of resource. The only supported value is auto-scaling-group. - ResourceType *string `type:"string"` - - // The tag value. - Value *string `type:"string"` -} - -// String returns the string representation -func (s TagDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagDescription) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *TagDescription) SetKey(v string) *TagDescription { - s.Key = &v - return s -} - -// SetPropagateAtLaunch sets the PropagateAtLaunch field's value. -func (s *TagDescription) SetPropagateAtLaunch(v bool) *TagDescription { - s.PropagateAtLaunch = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *TagDescription) SetResourceId(v string) *TagDescription { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TagDescription) SetResourceType(v string) *TagDescription { - s.ResourceType = &v - return s -} - -// SetValue sets the Value field's value. -func (s *TagDescription) SetValue(v string) *TagDescription { - s.Value = &v - return s -} - -// Represents a target tracking policy configuration. -type TargetTrackingConfiguration struct { - _ struct{} `type:"structure"` - - // A customized metric. - CustomizedMetricSpecification *CustomizedMetricSpecification `type:"structure"` - - // Indicates whether scaling in by the target tracking policy is disabled. If - // scaling in is disabled, the target tracking policy doesn't remove instances - // from the Auto Scaling group. Otherwise, the target tracking policy can remove - // instances from the Auto Scaling group. The default is disabled. - DisableScaleIn *bool `type:"boolean"` - - // A predefined metric. You can specify either a predefined metric or a customized - // metric. - PredefinedMetricSpecification *PredefinedMetricSpecification `type:"structure"` - - // The target value for the metric. - // - // TargetValue is a required field - TargetValue *float64 `type:"double" required:"true"` -} - -// String returns the string representation -func (s TargetTrackingConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetTrackingConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetTrackingConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetTrackingConfiguration"} - if s.TargetValue == nil { - invalidParams.Add(request.NewErrParamRequired("TargetValue")) - } - if s.CustomizedMetricSpecification != nil { - if err := s.CustomizedMetricSpecification.Validate(); err != nil { - invalidParams.AddNested("CustomizedMetricSpecification", err.(request.ErrInvalidParams)) - } - } - if s.PredefinedMetricSpecification != nil { - if err := s.PredefinedMetricSpecification.Validate(); err != nil { - invalidParams.AddNested("PredefinedMetricSpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomizedMetricSpecification sets the CustomizedMetricSpecification field's value. -func (s *TargetTrackingConfiguration) SetCustomizedMetricSpecification(v *CustomizedMetricSpecification) *TargetTrackingConfiguration { - s.CustomizedMetricSpecification = v - return s -} - -// SetDisableScaleIn sets the DisableScaleIn field's value. -func (s *TargetTrackingConfiguration) SetDisableScaleIn(v bool) *TargetTrackingConfiguration { - s.DisableScaleIn = &v - return s -} - -// SetPredefinedMetricSpecification sets the PredefinedMetricSpecification field's value. -func (s *TargetTrackingConfiguration) SetPredefinedMetricSpecification(v *PredefinedMetricSpecification) *TargetTrackingConfiguration { - s.PredefinedMetricSpecification = v - return s -} - -// SetTargetValue sets the TargetValue field's value. -func (s *TargetTrackingConfiguration) SetTargetValue(v float64) *TargetTrackingConfiguration { - s.TargetValue = &v - return s -} - -type TerminateInstanceInAutoScalingGroupInput struct { - _ struct{} `type:"structure"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `min:"1" type:"string" required:"true"` - - // Indicates whether terminating the instance also decrements the size of the - // Auto Scaling group. - // - // ShouldDecrementDesiredCapacity is a required field - ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s TerminateInstanceInAutoScalingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateInstanceInAutoScalingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TerminateInstanceInAutoScalingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TerminateInstanceInAutoScalingGroupInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.InstanceId != nil && len(*s.InstanceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1)) - } - if s.ShouldDecrementDesiredCapacity == nil { - invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *TerminateInstanceInAutoScalingGroupInput) SetInstanceId(v string) *TerminateInstanceInAutoScalingGroupInput { - s.InstanceId = &v - return s -} - -// SetShouldDecrementDesiredCapacity sets the ShouldDecrementDesiredCapacity field's value. -func (s *TerminateInstanceInAutoScalingGroupInput) SetShouldDecrementDesiredCapacity(v bool) *TerminateInstanceInAutoScalingGroupInput { - s.ShouldDecrementDesiredCapacity = &v - return s -} - -type TerminateInstanceInAutoScalingGroupOutput struct { - _ struct{} `type:"structure"` - - // A scaling activity. - Activity *Activity `type:"structure"` -} - -// String returns the string representation -func (s TerminateInstanceInAutoScalingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateInstanceInAutoScalingGroupOutput) GoString() string { - return s.String() -} - -// SetActivity sets the Activity field's value. -func (s *TerminateInstanceInAutoScalingGroupOutput) SetActivity(v *Activity) *TerminateInstanceInAutoScalingGroupOutput { - s.Activity = v - return s -} - -type UpdateAutoScalingGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the Auto Scaling group. - // - // AutoScalingGroupName is a required field - AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - - // One or more Availability Zones for the group. - AvailabilityZones []*string `min:"1" type:"list"` - - // The amount of time, in seconds, after a scaling activity completes before - // another scaling activity can start. The default is 300. - // - // For more information, see Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) - // in the Amazon EC2 Auto Scaling User Guide. - DefaultCooldown *int64 `type:"integer"` - - // The number of EC2 instances that should be running in the Auto Scaling group. - // This number must be greater than or equal to the minimum size of the group - // and less than or equal to the maximum size of the group. - DesiredCapacity *int64 `type:"integer"` - - // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before - // checking the health status of an EC2 instance that has come into service. - // The default is 0. - // - // For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) - // in the Amazon EC2 Auto Scaling User Guide. - HealthCheckGracePeriod *int64 `type:"integer"` - - // The service to use for the health checks. The valid values are EC2 and ELB. - HealthCheckType *string `min:"1" type:"string"` - - // The name of the launch configuration. If you specify this parameter, you - // can't specify a launch template or a mixed instances policy. - LaunchConfigurationName *string `min:"1" type:"string"` - - // The launch template and version to use to specify the updates. If you specify - // this parameter, you can't specify a launch configuration or a mixed instances - // policy. - LaunchTemplate *LaunchTemplateSpecification `type:"structure"` - - // The maximum size of the Auto Scaling group. - MaxSize *int64 `type:"integer"` - - // The minimum size of the Auto Scaling group. - MinSize *int64 `type:"integer"` - - // The mixed instances policy to use to specify the updates. If you specify - // this parameter, you can't specify a launch configuration or a launch template. - MixedInstancesPolicy *MixedInstancesPolicy `type:"structure"` - - // Indicates whether newly launched instances are protected from termination - // by Auto Scaling when scaling in. - NewInstancesProtectedFromScaleIn *bool `type:"boolean"` - - // The name of the placement group into which to launch your instances, if any. - // For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) - // in the Amazon Elastic Compute Cloud User Guide. - PlacementGroup *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling - // group uses to call other AWS services on your behalf. - ServiceLinkedRoleARN *string `min:"1" type:"string"` - - // A standalone termination policy or a list of termination policies used to - // select the instance to terminate. The policies are executed in the order - // that they are listed. - // - // For more information, see Controlling Which Instances Auto Scaling Terminates - // During Scale In (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html) - // in the Auto Scaling User Guide. - TerminationPolicies []*string `type:"list"` - - // The ID of the subnet, if you are launching into a VPC. You can specify several - // subnets in a comma-separated list. - // - // When you specify VPCZoneIdentifier with AvailabilityZones, ensure that the - // subnets' Availability Zones match the values you specify for AvailabilityZones. - // - // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html) - // in the Amazon EC2 Auto Scaling User Guide. - VPCZoneIdentifier *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateAutoScalingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAutoScalingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAutoScalingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAutoScalingGroupInput"} - if s.AutoScalingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) - } - if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) - } - if s.AvailabilityZones != nil && len(s.AvailabilityZones) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AvailabilityZones", 1)) - } - if s.HealthCheckType != nil && len(*s.HealthCheckType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HealthCheckType", 1)) - } - if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1)) - } - if s.PlacementGroup != nil && len(*s.PlacementGroup) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlacementGroup", 1)) - } - if s.ServiceLinkedRoleARN != nil && len(*s.ServiceLinkedRoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceLinkedRoleARN", 1)) - } - if s.VPCZoneIdentifier != nil && len(*s.VPCZoneIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VPCZoneIdentifier", 1)) - } - if s.LaunchTemplate != nil { - if err := s.LaunchTemplate.Validate(); err != nil { - invalidParams.AddNested("LaunchTemplate", err.(request.ErrInvalidParams)) - } - } - if s.MixedInstancesPolicy != nil { - if err := s.MixedInstancesPolicy.Validate(); err != nil { - invalidParams.AddNested("MixedInstancesPolicy", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *UpdateAutoScalingGroupInput) SetAutoScalingGroupName(v string) *UpdateAutoScalingGroupInput { - s.AutoScalingGroupName = &v - return s -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *UpdateAutoScalingGroupInput) SetAvailabilityZones(v []*string) *UpdateAutoScalingGroupInput { - s.AvailabilityZones = v - return s -} - -// SetDefaultCooldown sets the DefaultCooldown field's value. -func (s *UpdateAutoScalingGroupInput) SetDefaultCooldown(v int64) *UpdateAutoScalingGroupInput { - s.DefaultCooldown = &v - return s -} - -// SetDesiredCapacity sets the DesiredCapacity field's value. -func (s *UpdateAutoScalingGroupInput) SetDesiredCapacity(v int64) *UpdateAutoScalingGroupInput { - s.DesiredCapacity = &v - return s -} - -// SetHealthCheckGracePeriod sets the HealthCheckGracePeriod field's value. -func (s *UpdateAutoScalingGroupInput) SetHealthCheckGracePeriod(v int64) *UpdateAutoScalingGroupInput { - s.HealthCheckGracePeriod = &v - return s -} - -// SetHealthCheckType sets the HealthCheckType field's value. -func (s *UpdateAutoScalingGroupInput) SetHealthCheckType(v string) *UpdateAutoScalingGroupInput { - s.HealthCheckType = &v - return s -} - -// SetLaunchConfigurationName sets the LaunchConfigurationName field's value. -func (s *UpdateAutoScalingGroupInput) SetLaunchConfigurationName(v string) *UpdateAutoScalingGroupInput { - s.LaunchConfigurationName = &v - return s -} - -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *UpdateAutoScalingGroupInput) SetLaunchTemplate(v *LaunchTemplateSpecification) *UpdateAutoScalingGroupInput { - s.LaunchTemplate = v - return s -} - -// SetMaxSize sets the MaxSize field's value. -func (s *UpdateAutoScalingGroupInput) SetMaxSize(v int64) *UpdateAutoScalingGroupInput { - s.MaxSize = &v - return s -} - -// SetMinSize sets the MinSize field's value. -func (s *UpdateAutoScalingGroupInput) SetMinSize(v int64) *UpdateAutoScalingGroupInput { - s.MinSize = &v - return s -} - -// SetMixedInstancesPolicy sets the MixedInstancesPolicy field's value. -func (s *UpdateAutoScalingGroupInput) SetMixedInstancesPolicy(v *MixedInstancesPolicy) *UpdateAutoScalingGroupInput { - s.MixedInstancesPolicy = v - return s -} - -// SetNewInstancesProtectedFromScaleIn sets the NewInstancesProtectedFromScaleIn field's value. -func (s *UpdateAutoScalingGroupInput) SetNewInstancesProtectedFromScaleIn(v bool) *UpdateAutoScalingGroupInput { - s.NewInstancesProtectedFromScaleIn = &v - return s -} - -// SetPlacementGroup sets the PlacementGroup field's value. -func (s *UpdateAutoScalingGroupInput) SetPlacementGroup(v string) *UpdateAutoScalingGroupInput { - s.PlacementGroup = &v - return s -} - -// SetServiceLinkedRoleARN sets the ServiceLinkedRoleARN field's value. -func (s *UpdateAutoScalingGroupInput) SetServiceLinkedRoleARN(v string) *UpdateAutoScalingGroupInput { - s.ServiceLinkedRoleARN = &v - return s -} - -// SetTerminationPolicies sets the TerminationPolicies field's value. -func (s *UpdateAutoScalingGroupInput) SetTerminationPolicies(v []*string) *UpdateAutoScalingGroupInput { - s.TerminationPolicies = v - return s -} - -// SetVPCZoneIdentifier sets the VPCZoneIdentifier field's value. -func (s *UpdateAutoScalingGroupInput) SetVPCZoneIdentifier(v string) *UpdateAutoScalingGroupInput { - s.VPCZoneIdentifier = &v - return s -} - -type UpdateAutoScalingGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateAutoScalingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAutoScalingGroupOutput) GoString() string { - return s.String() -} - -const ( - // LifecycleStatePending is a LifecycleState enum value - LifecycleStatePending = "Pending" - - // LifecycleStatePendingWait is a LifecycleState enum value - LifecycleStatePendingWait = "Pending:Wait" - - // LifecycleStatePendingProceed is a LifecycleState enum value - LifecycleStatePendingProceed = "Pending:Proceed" - - // LifecycleStateQuarantined is a LifecycleState enum value - LifecycleStateQuarantined = "Quarantined" - - // LifecycleStateInService is a LifecycleState enum value - LifecycleStateInService = "InService" - - // LifecycleStateTerminating is a LifecycleState enum value - LifecycleStateTerminating = "Terminating" - - // LifecycleStateTerminatingWait is a LifecycleState enum value - LifecycleStateTerminatingWait = "Terminating:Wait" - - // LifecycleStateTerminatingProceed is a LifecycleState enum value - LifecycleStateTerminatingProceed = "Terminating:Proceed" - - // LifecycleStateTerminated is a LifecycleState enum value - LifecycleStateTerminated = "Terminated" - - // LifecycleStateDetaching is a LifecycleState enum value - LifecycleStateDetaching = "Detaching" - - // LifecycleStateDetached is a LifecycleState enum value - LifecycleStateDetached = "Detached" - - // LifecycleStateEnteringStandby is a LifecycleState enum value - LifecycleStateEnteringStandby = "EnteringStandby" - - // LifecycleStateStandby is a LifecycleState enum value - LifecycleStateStandby = "Standby" -) - -const ( - // MetricStatisticAverage is a MetricStatistic enum value - MetricStatisticAverage = "Average" - - // MetricStatisticMinimum is a MetricStatistic enum value - MetricStatisticMinimum = "Minimum" - - // MetricStatisticMaximum is a MetricStatistic enum value - MetricStatisticMaximum = "Maximum" - - // MetricStatisticSampleCount is a MetricStatistic enum value - MetricStatisticSampleCount = "SampleCount" - - // MetricStatisticSum is a MetricStatistic enum value - MetricStatisticSum = "Sum" -) - -const ( - // MetricTypeAsgaverageCpuutilization is a MetricType enum value - MetricTypeAsgaverageCpuutilization = "ASGAverageCPUUtilization" - - // MetricTypeAsgaverageNetworkIn is a MetricType enum value - MetricTypeAsgaverageNetworkIn = "ASGAverageNetworkIn" - - // MetricTypeAsgaverageNetworkOut is a MetricType enum value - MetricTypeAsgaverageNetworkOut = "ASGAverageNetworkOut" - - // MetricTypeAlbrequestCountPerTarget is a MetricType enum value - MetricTypeAlbrequestCountPerTarget = "ALBRequestCountPerTarget" -) - -const ( - // ScalingActivityStatusCodePendingSpotBidPlacement is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodePendingSpotBidPlacement = "PendingSpotBidPlacement" - - // ScalingActivityStatusCodeWaitingForSpotInstanceRequestId is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeWaitingForSpotInstanceRequestId = "WaitingForSpotInstanceRequestId" - - // ScalingActivityStatusCodeWaitingForSpotInstanceId is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeWaitingForSpotInstanceId = "WaitingForSpotInstanceId" - - // ScalingActivityStatusCodeWaitingForInstanceId is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeWaitingForInstanceId = "WaitingForInstanceId" - - // ScalingActivityStatusCodePreInService is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodePreInService = "PreInService" - - // ScalingActivityStatusCodeInProgress is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeInProgress = "InProgress" - - // ScalingActivityStatusCodeWaitingForElbconnectionDraining is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeWaitingForElbconnectionDraining = "WaitingForELBConnectionDraining" - - // ScalingActivityStatusCodeMidLifecycleAction is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeMidLifecycleAction = "MidLifecycleAction" - - // ScalingActivityStatusCodeWaitingForInstanceWarmup is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeWaitingForInstanceWarmup = "WaitingForInstanceWarmup" - - // ScalingActivityStatusCodeSuccessful is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeSuccessful = "Successful" - - // ScalingActivityStatusCodeFailed is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeFailed = "Failed" - - // ScalingActivityStatusCodeCancelled is a ScalingActivityStatusCode enum value - ScalingActivityStatusCodeCancelled = "Cancelled" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go deleted file mode 100644 index 32d9594c7..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package autoscaling provides the client and types for making API -// requests to Auto Scaling. -// -// Amazon EC2 Auto Scaling is designed to automatically launch or terminate -// EC2 instances based on user-defined policies, schedules, and health checks. -// Use this service with AWS Auto Scaling, Amazon CloudWatch, and Elastic Load -// Balancing. -// -// For more information, see the Amazon EC2 Auto Scaling User Guide (http://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01 for more information on this service. -// -// See autoscaling package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/autoscaling/ -// -// Using the Client -// -// To contact Auto Scaling 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 Auto Scaling client AutoScaling for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/autoscaling/#New -package autoscaling diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/errors.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/errors.go deleted file mode 100644 index be8b7e70b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/errors.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package autoscaling - -const ( - - // ErrCodeAlreadyExistsFault for service response error code - // "AlreadyExists". - // - // You already have an Auto Scaling group or launch configuration with this - // name. - ErrCodeAlreadyExistsFault = "AlreadyExists" - - // ErrCodeInvalidNextToken for service response error code - // "InvalidNextToken". - // - // The NextToken value is not valid. - ErrCodeInvalidNextToken = "InvalidNextToken" - - // ErrCodeLimitExceededFault for service response error code - // "LimitExceeded". - // - // You have already reached a limit for your Auto Scaling resources (for example, - // groups, launch configurations, or lifecycle hooks). For more information, - // see DescribeAccountLimits. - ErrCodeLimitExceededFault = "LimitExceeded" - - // ErrCodeResourceContentionFault for service response error code - // "ResourceContention". - // - // You already have a pending update to an Auto Scaling resource (for example, - // a group, instance, or load balancer). - ErrCodeResourceContentionFault = "ResourceContention" - - // ErrCodeResourceInUseFault for service response error code - // "ResourceInUse". - // - // The operation can't be performed because the resource is in use. - ErrCodeResourceInUseFault = "ResourceInUse" - - // ErrCodeScalingActivityInProgressFault for service response error code - // "ScalingActivityInProgress". - // - // The operation can't be performed because there are scaling activities in - // progress. - ErrCodeScalingActivityInProgressFault = "ScalingActivityInProgress" - - // ErrCodeServiceLinkedRoleFailure for service response error code - // "ServiceLinkedRoleFailure". - // - // The service-linked role is not yet ready for use. - ErrCodeServiceLinkedRoleFailure = "ServiceLinkedRoleFailure" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/service.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/service.go deleted file mode 100644 index e1da9fd75..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package autoscaling - -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/query" -) - -// AutoScaling provides the API operation methods for making requests to -// Auto Scaling. See this package's package overview docs -// for details on the service. -// -// AutoScaling methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type AutoScaling 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 = "autoscaling" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Auto Scaling" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the AutoScaling client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a AutoScaling client from just a session. -// svc := autoscaling.New(mySession) -// -// // Create a AutoScaling client with additional configuration -// svc := autoscaling.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *AutoScaling { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *AutoScaling { - svc := &AutoScaling{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2011-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a AutoScaling operation and runs any -// custom request initialization. -func (c *AutoScaling) 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/autoscaling/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/waiters.go deleted file mode 100644 index c2e7e2ed8..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/waiters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package autoscaling - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilGroupExists uses the Auto Scaling API operation -// DescribeAutoScalingGroups to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *AutoScaling) WaitUntilGroupExists(input *DescribeAutoScalingGroupsInput) error { - return c.WaitUntilGroupExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilGroupExistsWithContext is an extended version of WaitUntilGroupExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) WaitUntilGroupExistsWithContext(ctx aws.Context, input *DescribeAutoScalingGroupsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilGroupExists", - MaxAttempts: 10, - Delay: request.ConstantWaiterDelay(5 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "length(AutoScalingGroups) > `0`", - Expected: true, - }, - { - State: request.RetryWaiterState, - Matcher: request.PathWaiterMatch, Argument: "length(AutoScalingGroups) > `0`", - Expected: false, - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeAutoScalingGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeAutoScalingGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilGroupInService uses the Auto Scaling API operation -// DescribeAutoScalingGroups to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *AutoScaling) WaitUntilGroupInService(input *DescribeAutoScalingGroupsInput) error { - return c.WaitUntilGroupInServiceWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilGroupInServiceWithContext is an extended version of WaitUntilGroupInService. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) WaitUntilGroupInServiceWithContext(ctx aws.Context, input *DescribeAutoScalingGroupsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilGroupInService", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "contains(AutoScalingGroups[].[length(Instances[?LifecycleState=='InService']) >= MinSize][], `false`)", - Expected: false, - }, - { - State: request.RetryWaiterState, - Matcher: request.PathWaiterMatch, Argument: "contains(AutoScalingGroups[].[length(Instances[?LifecycleState=='InService']) >= MinSize][], `false`)", - Expected: true, - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeAutoScalingGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeAutoScalingGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilGroupNotExists uses the Auto Scaling API operation -// DescribeAutoScalingGroups to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *AutoScaling) WaitUntilGroupNotExists(input *DescribeAutoScalingGroupsInput) error { - return c.WaitUntilGroupNotExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilGroupNotExistsWithContext is an extended version of WaitUntilGroupNotExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *AutoScaling) WaitUntilGroupNotExistsWithContext(ctx aws.Context, input *DescribeAutoScalingGroupsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilGroupNotExists", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "length(AutoScalingGroups) > `0`", - Expected: false, - }, - { - State: request.RetryWaiterState, - Matcher: request.PathWaiterMatch, Argument: "length(AutoScalingGroups) > `0`", - Expected: true, - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeAutoScalingGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeAutoScalingGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/backup/api.go b/vendor/github.com/aws/aws-sdk-go/service/backup/api.go deleted file mode 100644 index 2380f4b02..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/backup/api.go +++ /dev/null @@ -1,10729 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package backup - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opCreateBackupPlan = "CreateBackupPlan" - -// CreateBackupPlanRequest generates a "aws/request.Request" representing the -// client's request for the CreateBackupPlan operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateBackupPlan for more information on using the CreateBackupPlan -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateBackupPlanRequest method. -// req, resp := client.CreateBackupPlanRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupPlan -func (c *Backup) CreateBackupPlanRequest(input *CreateBackupPlanInput) (req *request.Request, output *CreateBackupPlanOutput) { - op := &request.Operation{ - Name: opCreateBackupPlan, - HTTPMethod: "PUT", - HTTPPath: "/backup/plans/", - } - - if input == nil { - input = &CreateBackupPlanInput{} - } - - output = &CreateBackupPlanOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateBackupPlan API operation for AWS Backup. -// -// Backup plans are documents that contain information that AWS Backup uses -// to schedule tasks that create recovery points of resources. -// -// If you call CreateBackupPlan with a plan that already exists, the existing -// backupPlanId is returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation CreateBackupPlan for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit in the request has been exceeded; for example, a maximum number of -// items allowed in a request. -// -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// The required resource already exists. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupPlan -func (c *Backup) CreateBackupPlan(input *CreateBackupPlanInput) (*CreateBackupPlanOutput, error) { - req, out := c.CreateBackupPlanRequest(input) - return out, req.Send() -} - -// CreateBackupPlanWithContext is the same as CreateBackupPlan with the addition of -// the ability to pass a context and additional request options. -// -// See CreateBackupPlan for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) CreateBackupPlanWithContext(ctx aws.Context, input *CreateBackupPlanInput, opts ...request.Option) (*CreateBackupPlanOutput, error) { - req, out := c.CreateBackupPlanRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateBackupSelection = "CreateBackupSelection" - -// CreateBackupSelectionRequest generates a "aws/request.Request" representing the -// client's request for the CreateBackupSelection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateBackupSelection for more information on using the CreateBackupSelection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateBackupSelectionRequest method. -// req, resp := client.CreateBackupSelectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupSelection -func (c *Backup) CreateBackupSelectionRequest(input *CreateBackupSelectionInput) (req *request.Request, output *CreateBackupSelectionOutput) { - op := &request.Operation{ - Name: opCreateBackupSelection, - HTTPMethod: "PUT", - HTTPPath: "/backup/plans/{backupPlanId}/selections/", - } - - if input == nil { - input = &CreateBackupSelectionInput{} - } - - output = &CreateBackupSelectionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateBackupSelection API operation for AWS Backup. -// -// Creates a JSON document that specifies a set of resources to assign to a -// backup plan. Resources can be included by specifying patterns for a ListOfTags -// and selected Resources. -// -// For example, consider the following patterns: -// -// * Resources: "arn:aws:ec2:region:account-id:volume/volume-id" -// -// * ConditionKey:"department" -// -// ConditionValue:"finance" -// -// ConditionType:"StringEquals" -// -// * ConditionKey:"importance" -// -// ConditionValue:"critical" -// -// ConditionType:"StringEquals" -// -// Using these patterns would back up all Amazon Elastic Block Store (Amazon -// EBS) volumes that are tagged as "department=finance", "importance=critical", -// in addition to an EBS volume with the specified volume Id. -// -// Resources and conditions are additive in that all resources that match the -// pattern are selected. This shouldn't be confused with a logical AND, where -// all conditions must match. The matching patterns are logically 'put together -// using the OR operator. In other words, all patterns that match are selected -// for backup. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation CreateBackupSelection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit in the request has been exceeded; for example, a maximum number of -// items allowed in a request. -// -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// The required resource already exists. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupSelection -func (c *Backup) CreateBackupSelection(input *CreateBackupSelectionInput) (*CreateBackupSelectionOutput, error) { - req, out := c.CreateBackupSelectionRequest(input) - return out, req.Send() -} - -// CreateBackupSelectionWithContext is the same as CreateBackupSelection with the addition of -// the ability to pass a context and additional request options. -// -// See CreateBackupSelection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) CreateBackupSelectionWithContext(ctx aws.Context, input *CreateBackupSelectionInput, opts ...request.Option) (*CreateBackupSelectionOutput, error) { - req, out := c.CreateBackupSelectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateBackupVault = "CreateBackupVault" - -// CreateBackupVaultRequest generates a "aws/request.Request" representing the -// client's request for the CreateBackupVault operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateBackupVault for more information on using the CreateBackupVault -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateBackupVaultRequest method. -// req, resp := client.CreateBackupVaultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupVault -func (c *Backup) CreateBackupVaultRequest(input *CreateBackupVaultInput) (req *request.Request, output *CreateBackupVaultOutput) { - op := &request.Operation{ - Name: opCreateBackupVault, - HTTPMethod: "PUT", - HTTPPath: "/backup-vaults/{backupVaultName}", - } - - if input == nil { - input = &CreateBackupVaultInput{} - } - - output = &CreateBackupVaultOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateBackupVault API operation for AWS Backup. -// -// Creates a logical container where backups are stored. A CreateBackupVault -// request includes a name, optionally one or more resource tags, an encryption -// key, and a request ID. -// -// Sensitive data, such as passport numbers, should not be included the name -// of a backup vault. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation CreateBackupVault for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit in the request has been exceeded; for example, a maximum number of -// items allowed in a request. -// -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// The required resource already exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupVault -func (c *Backup) CreateBackupVault(input *CreateBackupVaultInput) (*CreateBackupVaultOutput, error) { - req, out := c.CreateBackupVaultRequest(input) - return out, req.Send() -} - -// CreateBackupVaultWithContext is the same as CreateBackupVault with the addition of -// the ability to pass a context and additional request options. -// -// See CreateBackupVault for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) CreateBackupVaultWithContext(ctx aws.Context, input *CreateBackupVaultInput, opts ...request.Option) (*CreateBackupVaultOutput, error) { - req, out := c.CreateBackupVaultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBackupPlan = "DeleteBackupPlan" - -// DeleteBackupPlanRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBackupPlan operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBackupPlan for more information on using the DeleteBackupPlan -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBackupPlanRequest method. -// req, resp := client.DeleteBackupPlanRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupPlan -func (c *Backup) DeleteBackupPlanRequest(input *DeleteBackupPlanInput) (req *request.Request, output *DeleteBackupPlanOutput) { - op := &request.Operation{ - Name: opDeleteBackupPlan, - HTTPMethod: "DELETE", - HTTPPath: "/backup/plans/{backupPlanId}", - } - - if input == nil { - input = &DeleteBackupPlanInput{} - } - - output = &DeleteBackupPlanOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteBackupPlan API operation for AWS Backup. -// -// Deletes a backup plan. A backup plan can only be deleted after all associated -// selections of resources have been deleted. Deleting a backup plan deletes -// the current version of a backup plan. Previous versions, if any, will still -// exist. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation DeleteBackupPlan for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a parameter is of the wrong type. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupPlan -func (c *Backup) DeleteBackupPlan(input *DeleteBackupPlanInput) (*DeleteBackupPlanOutput, error) { - req, out := c.DeleteBackupPlanRequest(input) - return out, req.Send() -} - -// DeleteBackupPlanWithContext is the same as DeleteBackupPlan with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBackupPlan for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) DeleteBackupPlanWithContext(ctx aws.Context, input *DeleteBackupPlanInput, opts ...request.Option) (*DeleteBackupPlanOutput, error) { - req, out := c.DeleteBackupPlanRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBackupSelection = "DeleteBackupSelection" - -// DeleteBackupSelectionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBackupSelection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBackupSelection for more information on using the DeleteBackupSelection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBackupSelectionRequest method. -// req, resp := client.DeleteBackupSelectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupSelection -func (c *Backup) DeleteBackupSelectionRequest(input *DeleteBackupSelectionInput) (req *request.Request, output *DeleteBackupSelectionOutput) { - op := &request.Operation{ - Name: opDeleteBackupSelection, - HTTPMethod: "DELETE", - HTTPPath: "/backup/plans/{backupPlanId}/selections/{selectionId}", - } - - if input == nil { - input = &DeleteBackupSelectionInput{} - } - - output = &DeleteBackupSelectionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBackupSelection API operation for AWS Backup. -// -// Deletes the resource selection associated with a backup plan that is specified -// by the SelectionId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation DeleteBackupSelection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupSelection -func (c *Backup) DeleteBackupSelection(input *DeleteBackupSelectionInput) (*DeleteBackupSelectionOutput, error) { - req, out := c.DeleteBackupSelectionRequest(input) - return out, req.Send() -} - -// DeleteBackupSelectionWithContext is the same as DeleteBackupSelection with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBackupSelection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) DeleteBackupSelectionWithContext(ctx aws.Context, input *DeleteBackupSelectionInput, opts ...request.Option) (*DeleteBackupSelectionOutput, error) { - req, out := c.DeleteBackupSelectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBackupVault = "DeleteBackupVault" - -// DeleteBackupVaultRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBackupVault operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBackupVault for more information on using the DeleteBackupVault -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBackupVaultRequest method. -// req, resp := client.DeleteBackupVaultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVault -func (c *Backup) DeleteBackupVaultRequest(input *DeleteBackupVaultInput) (req *request.Request, output *DeleteBackupVaultOutput) { - op := &request.Operation{ - Name: opDeleteBackupVault, - HTTPMethod: "DELETE", - HTTPPath: "/backup-vaults/{backupVaultName}", - } - - if input == nil { - input = &DeleteBackupVaultInput{} - } - - output = &DeleteBackupVaultOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBackupVault API operation for AWS Backup. -// -// Deletes the backup vault identified by its name. A vault can be deleted only -// if it is empty. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation DeleteBackupVault for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a parameter is of the wrong type. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVault -func (c *Backup) DeleteBackupVault(input *DeleteBackupVaultInput) (*DeleteBackupVaultOutput, error) { - req, out := c.DeleteBackupVaultRequest(input) - return out, req.Send() -} - -// DeleteBackupVaultWithContext is the same as DeleteBackupVault with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBackupVault for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) DeleteBackupVaultWithContext(ctx aws.Context, input *DeleteBackupVaultInput, opts ...request.Option) (*DeleteBackupVaultOutput, error) { - req, out := c.DeleteBackupVaultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBackupVaultAccessPolicy = "DeleteBackupVaultAccessPolicy" - -// DeleteBackupVaultAccessPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBackupVaultAccessPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBackupVaultAccessPolicy for more information on using the DeleteBackupVaultAccessPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBackupVaultAccessPolicyRequest method. -// req, resp := client.DeleteBackupVaultAccessPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultAccessPolicy -func (c *Backup) DeleteBackupVaultAccessPolicyRequest(input *DeleteBackupVaultAccessPolicyInput) (req *request.Request, output *DeleteBackupVaultAccessPolicyOutput) { - op := &request.Operation{ - Name: opDeleteBackupVaultAccessPolicy, - HTTPMethod: "DELETE", - HTTPPath: "/backup-vaults/{backupVaultName}/access-policy", - } - - if input == nil { - input = &DeleteBackupVaultAccessPolicyInput{} - } - - output = &DeleteBackupVaultAccessPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBackupVaultAccessPolicy API operation for AWS Backup. -// -// Deletes the policy document that manages permissions on a backup vault. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation DeleteBackupVaultAccessPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultAccessPolicy -func (c *Backup) DeleteBackupVaultAccessPolicy(input *DeleteBackupVaultAccessPolicyInput) (*DeleteBackupVaultAccessPolicyOutput, error) { - req, out := c.DeleteBackupVaultAccessPolicyRequest(input) - return out, req.Send() -} - -// DeleteBackupVaultAccessPolicyWithContext is the same as DeleteBackupVaultAccessPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBackupVaultAccessPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) DeleteBackupVaultAccessPolicyWithContext(ctx aws.Context, input *DeleteBackupVaultAccessPolicyInput, opts ...request.Option) (*DeleteBackupVaultAccessPolicyOutput, error) { - req, out := c.DeleteBackupVaultAccessPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBackupVaultNotifications = "DeleteBackupVaultNotifications" - -// DeleteBackupVaultNotificationsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBackupVaultNotifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBackupVaultNotifications for more information on using the DeleteBackupVaultNotifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBackupVaultNotificationsRequest method. -// req, resp := client.DeleteBackupVaultNotificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultNotifications -func (c *Backup) DeleteBackupVaultNotificationsRequest(input *DeleteBackupVaultNotificationsInput) (req *request.Request, output *DeleteBackupVaultNotificationsOutput) { - op := &request.Operation{ - Name: opDeleteBackupVaultNotifications, - HTTPMethod: "DELETE", - HTTPPath: "/backup-vaults/{backupVaultName}/notification-configuration", - } - - if input == nil { - input = &DeleteBackupVaultNotificationsInput{} - } - - output = &DeleteBackupVaultNotificationsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBackupVaultNotifications API operation for AWS Backup. -// -// Deletes event notifications for the specified backup vault. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation DeleteBackupVaultNotifications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultNotifications -func (c *Backup) DeleteBackupVaultNotifications(input *DeleteBackupVaultNotificationsInput) (*DeleteBackupVaultNotificationsOutput, error) { - req, out := c.DeleteBackupVaultNotificationsRequest(input) - return out, req.Send() -} - -// DeleteBackupVaultNotificationsWithContext is the same as DeleteBackupVaultNotifications with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBackupVaultNotifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) DeleteBackupVaultNotificationsWithContext(ctx aws.Context, input *DeleteBackupVaultNotificationsInput, opts ...request.Option) (*DeleteBackupVaultNotificationsOutput, error) { - req, out := c.DeleteBackupVaultNotificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRecoveryPoint = "DeleteRecoveryPoint" - -// DeleteRecoveryPointRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRecoveryPoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRecoveryPoint for more information on using the DeleteRecoveryPoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRecoveryPointRequest method. -// req, resp := client.DeleteRecoveryPointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteRecoveryPoint -func (c *Backup) DeleteRecoveryPointRequest(input *DeleteRecoveryPointInput) (req *request.Request, output *DeleteRecoveryPointOutput) { - op := &request.Operation{ - Name: opDeleteRecoveryPoint, - HTTPMethod: "DELETE", - HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}", - } - - if input == nil { - input = &DeleteRecoveryPointInput{} - } - - output = &DeleteRecoveryPointOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRecoveryPoint API operation for AWS Backup. -// -// Deletes the recovery point specified by a recovery point ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation DeleteRecoveryPoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a parameter is of the wrong type. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteRecoveryPoint -func (c *Backup) DeleteRecoveryPoint(input *DeleteRecoveryPointInput) (*DeleteRecoveryPointOutput, error) { - req, out := c.DeleteRecoveryPointRequest(input) - return out, req.Send() -} - -// DeleteRecoveryPointWithContext is the same as DeleteRecoveryPoint with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRecoveryPoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) DeleteRecoveryPointWithContext(ctx aws.Context, input *DeleteRecoveryPointInput, opts ...request.Option) (*DeleteRecoveryPointOutput, error) { - req, out := c.DeleteRecoveryPointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeBackupJob = "DescribeBackupJob" - -// DescribeBackupJobRequest generates a "aws/request.Request" representing the -// client's request for the DescribeBackupJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeBackupJob for more information on using the DescribeBackupJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeBackupJobRequest method. -// req, resp := client.DescribeBackupJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupJob -func (c *Backup) DescribeBackupJobRequest(input *DescribeBackupJobInput) (req *request.Request, output *DescribeBackupJobOutput) { - op := &request.Operation{ - Name: opDescribeBackupJob, - HTTPMethod: "GET", - HTTPPath: "/backup-jobs/{backupJobId}", - } - - if input == nil { - input = &DescribeBackupJobInput{} - } - - output = &DescribeBackupJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeBackupJob API operation for AWS Backup. -// -// Returns metadata associated with creating a backup of a 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 Backup's -// API operation DescribeBackupJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// * ErrCodeDependencyFailureException "DependencyFailureException" -// A dependent AWS service or resource returned an error to the AWS Backup service, -// and the action cannot be completed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupJob -func (c *Backup) DescribeBackupJob(input *DescribeBackupJobInput) (*DescribeBackupJobOutput, error) { - req, out := c.DescribeBackupJobRequest(input) - return out, req.Send() -} - -// DescribeBackupJobWithContext is the same as DescribeBackupJob with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeBackupJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) DescribeBackupJobWithContext(ctx aws.Context, input *DescribeBackupJobInput, opts ...request.Option) (*DescribeBackupJobOutput, error) { - req, out := c.DescribeBackupJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeBackupVault = "DescribeBackupVault" - -// DescribeBackupVaultRequest generates a "aws/request.Request" representing the -// client's request for the DescribeBackupVault operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeBackupVault for more information on using the DescribeBackupVault -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeBackupVaultRequest method. -// req, resp := client.DescribeBackupVaultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupVault -func (c *Backup) DescribeBackupVaultRequest(input *DescribeBackupVaultInput) (req *request.Request, output *DescribeBackupVaultOutput) { - op := &request.Operation{ - Name: opDescribeBackupVault, - HTTPMethod: "GET", - HTTPPath: "/backup-vaults/{backupVaultName}", - } - - if input == nil { - input = &DescribeBackupVaultInput{} - } - - output = &DescribeBackupVaultOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeBackupVault API operation for AWS Backup. -// -// Returns metadata about a backup vault specified by its name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation DescribeBackupVault for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupVault -func (c *Backup) DescribeBackupVault(input *DescribeBackupVaultInput) (*DescribeBackupVaultOutput, error) { - req, out := c.DescribeBackupVaultRequest(input) - return out, req.Send() -} - -// DescribeBackupVaultWithContext is the same as DescribeBackupVault with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeBackupVault for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) DescribeBackupVaultWithContext(ctx aws.Context, input *DescribeBackupVaultInput, opts ...request.Option) (*DescribeBackupVaultOutput, error) { - req, out := c.DescribeBackupVaultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeProtectedResource = "DescribeProtectedResource" - -// DescribeProtectedResourceRequest generates a "aws/request.Request" representing the -// client's request for the DescribeProtectedResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeProtectedResource for more information on using the DescribeProtectedResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeProtectedResourceRequest method. -// req, resp := client.DescribeProtectedResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeProtectedResource -func (c *Backup) DescribeProtectedResourceRequest(input *DescribeProtectedResourceInput) (req *request.Request, output *DescribeProtectedResourceOutput) { - op := &request.Operation{ - Name: opDescribeProtectedResource, - HTTPMethod: "GET", - HTTPPath: "/resources/{resourceArn}", - } - - if input == nil { - input = &DescribeProtectedResourceInput{} - } - - output = &DescribeProtectedResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeProtectedResource API operation for AWS Backup. -// -// Returns information about a saved resource, including the last time it was -// backed-up, its Amazon Resource Name (ARN), and the AWS service type of the -// saved 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 Backup's -// API operation DescribeProtectedResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeProtectedResource -func (c *Backup) DescribeProtectedResource(input *DescribeProtectedResourceInput) (*DescribeProtectedResourceOutput, error) { - req, out := c.DescribeProtectedResourceRequest(input) - return out, req.Send() -} - -// DescribeProtectedResourceWithContext is the same as DescribeProtectedResource with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeProtectedResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) DescribeProtectedResourceWithContext(ctx aws.Context, input *DescribeProtectedResourceInput, opts ...request.Option) (*DescribeProtectedResourceOutput, error) { - req, out := c.DescribeProtectedResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeRecoveryPoint = "DescribeRecoveryPoint" - -// DescribeRecoveryPointRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRecoveryPoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRecoveryPoint for more information on using the DescribeRecoveryPoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRecoveryPointRequest method. -// req, resp := client.DescribeRecoveryPointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRecoveryPoint -func (c *Backup) DescribeRecoveryPointRequest(input *DescribeRecoveryPointInput) (req *request.Request, output *DescribeRecoveryPointOutput) { - op := &request.Operation{ - Name: opDescribeRecoveryPoint, - HTTPMethod: "GET", - HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}", - } - - if input == nil { - input = &DescribeRecoveryPointInput{} - } - - output = &DescribeRecoveryPointOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRecoveryPoint API operation for AWS Backup. -// -// Returns metadata associated with a recovery point, including ID, status, -// encryption, and lifecycle. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation DescribeRecoveryPoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRecoveryPoint -func (c *Backup) DescribeRecoveryPoint(input *DescribeRecoveryPointInput) (*DescribeRecoveryPointOutput, error) { - req, out := c.DescribeRecoveryPointRequest(input) - return out, req.Send() -} - -// DescribeRecoveryPointWithContext is the same as DescribeRecoveryPoint with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRecoveryPoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) DescribeRecoveryPointWithContext(ctx aws.Context, input *DescribeRecoveryPointInput, opts ...request.Option) (*DescribeRecoveryPointOutput, error) { - req, out := c.DescribeRecoveryPointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeRestoreJob = "DescribeRestoreJob" - -// DescribeRestoreJobRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRestoreJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRestoreJob for more information on using the DescribeRestoreJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRestoreJobRequest method. -// req, resp := client.DescribeRestoreJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRestoreJob -func (c *Backup) DescribeRestoreJobRequest(input *DescribeRestoreJobInput) (req *request.Request, output *DescribeRestoreJobOutput) { - op := &request.Operation{ - Name: opDescribeRestoreJob, - HTTPMethod: "GET", - HTTPPath: "/restore-jobs/{restoreJobId}", - } - - if input == nil { - input = &DescribeRestoreJobInput{} - } - - output = &DescribeRestoreJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRestoreJob API operation for AWS Backup. -// -// Returns metadata associated with a restore job that is specified by a job -// ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation DescribeRestoreJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// * ErrCodeDependencyFailureException "DependencyFailureException" -// A dependent AWS service or resource returned an error to the AWS Backup service, -// and the action cannot be completed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRestoreJob -func (c *Backup) DescribeRestoreJob(input *DescribeRestoreJobInput) (*DescribeRestoreJobOutput, error) { - req, out := c.DescribeRestoreJobRequest(input) - return out, req.Send() -} - -// DescribeRestoreJobWithContext is the same as DescribeRestoreJob with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRestoreJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) DescribeRestoreJobWithContext(ctx aws.Context, input *DescribeRestoreJobInput, opts ...request.Option) (*DescribeRestoreJobOutput, error) { - req, out := c.DescribeRestoreJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opExportBackupPlanTemplate = "ExportBackupPlanTemplate" - -// ExportBackupPlanTemplateRequest generates a "aws/request.Request" representing the -// client's request for the ExportBackupPlanTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ExportBackupPlanTemplate for more information on using the ExportBackupPlanTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ExportBackupPlanTemplateRequest method. -// req, resp := client.ExportBackupPlanTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ExportBackupPlanTemplate -func (c *Backup) ExportBackupPlanTemplateRequest(input *ExportBackupPlanTemplateInput) (req *request.Request, output *ExportBackupPlanTemplateOutput) { - op := &request.Operation{ - Name: opExportBackupPlanTemplate, - HTTPMethod: "GET", - HTTPPath: "/backup/plans/{backupPlanId}/toTemplate/", - } - - if input == nil { - input = &ExportBackupPlanTemplateInput{} - } - - output = &ExportBackupPlanTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// ExportBackupPlanTemplate API operation for AWS Backup. -// -// Returns the backup plan that is specified by the plan ID as a backup template. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation ExportBackupPlanTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ExportBackupPlanTemplate -func (c *Backup) ExportBackupPlanTemplate(input *ExportBackupPlanTemplateInput) (*ExportBackupPlanTemplateOutput, error) { - req, out := c.ExportBackupPlanTemplateRequest(input) - return out, req.Send() -} - -// ExportBackupPlanTemplateWithContext is the same as ExportBackupPlanTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See ExportBackupPlanTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) ExportBackupPlanTemplateWithContext(ctx aws.Context, input *ExportBackupPlanTemplateInput, opts ...request.Option) (*ExportBackupPlanTemplateOutput, error) { - req, out := c.ExportBackupPlanTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBackupPlan = "GetBackupPlan" - -// GetBackupPlanRequest generates a "aws/request.Request" representing the -// client's request for the GetBackupPlan operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBackupPlan for more information on using the GetBackupPlan -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBackupPlanRequest method. -// req, resp := client.GetBackupPlanRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlan -func (c *Backup) GetBackupPlanRequest(input *GetBackupPlanInput) (req *request.Request, output *GetBackupPlanOutput) { - op := &request.Operation{ - Name: opGetBackupPlan, - HTTPMethod: "GET", - HTTPPath: "/backup/plans/{backupPlanId}/", - } - - if input == nil { - input = &GetBackupPlanInput{} - } - - output = &GetBackupPlanOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBackupPlan API operation for AWS Backup. -// -// Returns the body of a backup plan in JSON format, in addition to plan metadata. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation GetBackupPlan for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlan -func (c *Backup) GetBackupPlan(input *GetBackupPlanInput) (*GetBackupPlanOutput, error) { - req, out := c.GetBackupPlanRequest(input) - return out, req.Send() -} - -// GetBackupPlanWithContext is the same as GetBackupPlan with the addition of -// the ability to pass a context and additional request options. -// -// See GetBackupPlan for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) GetBackupPlanWithContext(ctx aws.Context, input *GetBackupPlanInput, opts ...request.Option) (*GetBackupPlanOutput, error) { - req, out := c.GetBackupPlanRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBackupPlanFromJSON = "GetBackupPlanFromJSON" - -// GetBackupPlanFromJSONRequest generates a "aws/request.Request" representing the -// client's request for the GetBackupPlanFromJSON operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBackupPlanFromJSON for more information on using the GetBackupPlanFromJSON -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBackupPlanFromJSONRequest method. -// req, resp := client.GetBackupPlanFromJSONRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromJSON -func (c *Backup) GetBackupPlanFromJSONRequest(input *GetBackupPlanFromJSONInput) (req *request.Request, output *GetBackupPlanFromJSONOutput) { - op := &request.Operation{ - Name: opGetBackupPlanFromJSON, - HTTPMethod: "POST", - HTTPPath: "/backup/template/json/toPlan", - } - - if input == nil { - input = &GetBackupPlanFromJSONInput{} - } - - output = &GetBackupPlanFromJSONOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBackupPlanFromJSON API operation for AWS Backup. -// -// Returns a valid JSON document specifying a backup plan or an error. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation GetBackupPlanFromJSON for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit in the request has been exceeded; for example, a maximum number of -// items allowed in a request. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a parameter is of the wrong type. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromJSON -func (c *Backup) GetBackupPlanFromJSON(input *GetBackupPlanFromJSONInput) (*GetBackupPlanFromJSONOutput, error) { - req, out := c.GetBackupPlanFromJSONRequest(input) - return out, req.Send() -} - -// GetBackupPlanFromJSONWithContext is the same as GetBackupPlanFromJSON with the addition of -// the ability to pass a context and additional request options. -// -// See GetBackupPlanFromJSON for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) GetBackupPlanFromJSONWithContext(ctx aws.Context, input *GetBackupPlanFromJSONInput, opts ...request.Option) (*GetBackupPlanFromJSONOutput, error) { - req, out := c.GetBackupPlanFromJSONRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBackupPlanFromTemplate = "GetBackupPlanFromTemplate" - -// GetBackupPlanFromTemplateRequest generates a "aws/request.Request" representing the -// client's request for the GetBackupPlanFromTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBackupPlanFromTemplate for more information on using the GetBackupPlanFromTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBackupPlanFromTemplateRequest method. -// req, resp := client.GetBackupPlanFromTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromTemplate -func (c *Backup) GetBackupPlanFromTemplateRequest(input *GetBackupPlanFromTemplateInput) (req *request.Request, output *GetBackupPlanFromTemplateOutput) { - op := &request.Operation{ - Name: opGetBackupPlanFromTemplate, - HTTPMethod: "GET", - HTTPPath: "/backup/template/plans/{templateId}/toPlan", - } - - if input == nil { - input = &GetBackupPlanFromTemplateInput{} - } - - output = &GetBackupPlanFromTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBackupPlanFromTemplate API operation for AWS Backup. -// -// Returns the template specified by its templateId as a backup plan. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation GetBackupPlanFromTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromTemplate -func (c *Backup) GetBackupPlanFromTemplate(input *GetBackupPlanFromTemplateInput) (*GetBackupPlanFromTemplateOutput, error) { - req, out := c.GetBackupPlanFromTemplateRequest(input) - return out, req.Send() -} - -// GetBackupPlanFromTemplateWithContext is the same as GetBackupPlanFromTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See GetBackupPlanFromTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) GetBackupPlanFromTemplateWithContext(ctx aws.Context, input *GetBackupPlanFromTemplateInput, opts ...request.Option) (*GetBackupPlanFromTemplateOutput, error) { - req, out := c.GetBackupPlanFromTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBackupSelection = "GetBackupSelection" - -// GetBackupSelectionRequest generates a "aws/request.Request" representing the -// client's request for the GetBackupSelection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBackupSelection for more information on using the GetBackupSelection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBackupSelectionRequest method. -// req, resp := client.GetBackupSelectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupSelection -func (c *Backup) GetBackupSelectionRequest(input *GetBackupSelectionInput) (req *request.Request, output *GetBackupSelectionOutput) { - op := &request.Operation{ - Name: opGetBackupSelection, - HTTPMethod: "GET", - HTTPPath: "/backup/plans/{backupPlanId}/selections/{selectionId}", - } - - if input == nil { - input = &GetBackupSelectionInput{} - } - - output = &GetBackupSelectionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBackupSelection API operation for AWS Backup. -// -// Returns selection metadata and a document in JSON format that specifies a -// list of resources that are associated with a backup plan. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation GetBackupSelection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupSelection -func (c *Backup) GetBackupSelection(input *GetBackupSelectionInput) (*GetBackupSelectionOutput, error) { - req, out := c.GetBackupSelectionRequest(input) - return out, req.Send() -} - -// GetBackupSelectionWithContext is the same as GetBackupSelection with the addition of -// the ability to pass a context and additional request options. -// -// See GetBackupSelection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) GetBackupSelectionWithContext(ctx aws.Context, input *GetBackupSelectionInput, opts ...request.Option) (*GetBackupSelectionOutput, error) { - req, out := c.GetBackupSelectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBackupVaultAccessPolicy = "GetBackupVaultAccessPolicy" - -// GetBackupVaultAccessPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetBackupVaultAccessPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBackupVaultAccessPolicy for more information on using the GetBackupVaultAccessPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBackupVaultAccessPolicyRequest method. -// req, resp := client.GetBackupVaultAccessPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultAccessPolicy -func (c *Backup) GetBackupVaultAccessPolicyRequest(input *GetBackupVaultAccessPolicyInput) (req *request.Request, output *GetBackupVaultAccessPolicyOutput) { - op := &request.Operation{ - Name: opGetBackupVaultAccessPolicy, - HTTPMethod: "GET", - HTTPPath: "/backup-vaults/{backupVaultName}/access-policy", - } - - if input == nil { - input = &GetBackupVaultAccessPolicyInput{} - } - - output = &GetBackupVaultAccessPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBackupVaultAccessPolicy API operation for AWS Backup. -// -// Returns the access policy document that is associated with the named backup -// vault. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation GetBackupVaultAccessPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultAccessPolicy -func (c *Backup) GetBackupVaultAccessPolicy(input *GetBackupVaultAccessPolicyInput) (*GetBackupVaultAccessPolicyOutput, error) { - req, out := c.GetBackupVaultAccessPolicyRequest(input) - return out, req.Send() -} - -// GetBackupVaultAccessPolicyWithContext is the same as GetBackupVaultAccessPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetBackupVaultAccessPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) GetBackupVaultAccessPolicyWithContext(ctx aws.Context, input *GetBackupVaultAccessPolicyInput, opts ...request.Option) (*GetBackupVaultAccessPolicyOutput, error) { - req, out := c.GetBackupVaultAccessPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBackupVaultNotifications = "GetBackupVaultNotifications" - -// GetBackupVaultNotificationsRequest generates a "aws/request.Request" representing the -// client's request for the GetBackupVaultNotifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBackupVaultNotifications for more information on using the GetBackupVaultNotifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBackupVaultNotificationsRequest method. -// req, resp := client.GetBackupVaultNotificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultNotifications -func (c *Backup) GetBackupVaultNotificationsRequest(input *GetBackupVaultNotificationsInput) (req *request.Request, output *GetBackupVaultNotificationsOutput) { - op := &request.Operation{ - Name: opGetBackupVaultNotifications, - HTTPMethod: "GET", - HTTPPath: "/backup-vaults/{backupVaultName}/notification-configuration", - } - - if input == nil { - input = &GetBackupVaultNotificationsInput{} - } - - output = &GetBackupVaultNotificationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBackupVaultNotifications API operation for AWS Backup. -// -// Returns event notifications for the specified backup vault. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation GetBackupVaultNotifications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultNotifications -func (c *Backup) GetBackupVaultNotifications(input *GetBackupVaultNotificationsInput) (*GetBackupVaultNotificationsOutput, error) { - req, out := c.GetBackupVaultNotificationsRequest(input) - return out, req.Send() -} - -// GetBackupVaultNotificationsWithContext is the same as GetBackupVaultNotifications with the addition of -// the ability to pass a context and additional request options. -// -// See GetBackupVaultNotifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) GetBackupVaultNotificationsWithContext(ctx aws.Context, input *GetBackupVaultNotificationsInput, opts ...request.Option) (*GetBackupVaultNotificationsOutput, error) { - req, out := c.GetBackupVaultNotificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRecoveryPointRestoreMetadata = "GetRecoveryPointRestoreMetadata" - -// GetRecoveryPointRestoreMetadataRequest generates a "aws/request.Request" representing the -// client's request for the GetRecoveryPointRestoreMetadata operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRecoveryPointRestoreMetadata for more information on using the GetRecoveryPointRestoreMetadata -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRecoveryPointRestoreMetadataRequest method. -// req, resp := client.GetRecoveryPointRestoreMetadataRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetRecoveryPointRestoreMetadata -func (c *Backup) GetRecoveryPointRestoreMetadataRequest(input *GetRecoveryPointRestoreMetadataInput) (req *request.Request, output *GetRecoveryPointRestoreMetadataOutput) { - op := &request.Operation{ - Name: opGetRecoveryPointRestoreMetadata, - HTTPMethod: "GET", - HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}/restore-metadata", - } - - if input == nil { - input = &GetRecoveryPointRestoreMetadataInput{} - } - - output = &GetRecoveryPointRestoreMetadataOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRecoveryPointRestoreMetadata API operation for AWS Backup. -// -// Returns two sets of metadata key-value pairs. The first set lists the metadata -// that the recovery point was created with. The second set lists the metadata -// key-value pairs that are required to restore the recovery point. -// -// These sets can be the same, or the restore metadata set can contain different -// values if the target service to be restored has changed since the recovery -// point was created and now requires additional or different information in -// order to be restored. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation GetRecoveryPointRestoreMetadata for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetRecoveryPointRestoreMetadata -func (c *Backup) GetRecoveryPointRestoreMetadata(input *GetRecoveryPointRestoreMetadataInput) (*GetRecoveryPointRestoreMetadataOutput, error) { - req, out := c.GetRecoveryPointRestoreMetadataRequest(input) - return out, req.Send() -} - -// GetRecoveryPointRestoreMetadataWithContext is the same as GetRecoveryPointRestoreMetadata with the addition of -// the ability to pass a context and additional request options. -// -// See GetRecoveryPointRestoreMetadata for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) GetRecoveryPointRestoreMetadataWithContext(ctx aws.Context, input *GetRecoveryPointRestoreMetadataInput, opts ...request.Option) (*GetRecoveryPointRestoreMetadataOutput, error) { - req, out := c.GetRecoveryPointRestoreMetadataRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSupportedResourceTypes = "GetSupportedResourceTypes" - -// GetSupportedResourceTypesRequest generates a "aws/request.Request" representing the -// client's request for the GetSupportedResourceTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSupportedResourceTypes for more information on using the GetSupportedResourceTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSupportedResourceTypesRequest method. -// req, resp := client.GetSupportedResourceTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetSupportedResourceTypes -func (c *Backup) GetSupportedResourceTypesRequest(input *GetSupportedResourceTypesInput) (req *request.Request, output *GetSupportedResourceTypesOutput) { - op := &request.Operation{ - Name: opGetSupportedResourceTypes, - HTTPMethod: "GET", - HTTPPath: "/supported-resource-types", - } - - if input == nil { - input = &GetSupportedResourceTypesInput{} - } - - output = &GetSupportedResourceTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSupportedResourceTypes API operation for AWS Backup. -// -// Returns the AWS resource types supported by AWS Backup. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation GetSupportedResourceTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetSupportedResourceTypes -func (c *Backup) GetSupportedResourceTypes(input *GetSupportedResourceTypesInput) (*GetSupportedResourceTypesOutput, error) { - req, out := c.GetSupportedResourceTypesRequest(input) - return out, req.Send() -} - -// GetSupportedResourceTypesWithContext is the same as GetSupportedResourceTypes with the addition of -// the ability to pass a context and additional request options. -// -// See GetSupportedResourceTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) GetSupportedResourceTypesWithContext(ctx aws.Context, input *GetSupportedResourceTypesInput, opts ...request.Option) (*GetSupportedResourceTypesOutput, error) { - req, out := c.GetSupportedResourceTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListBackupJobs = "ListBackupJobs" - -// ListBackupJobsRequest generates a "aws/request.Request" representing the -// client's request for the ListBackupJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListBackupJobs for more information on using the ListBackupJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListBackupJobsRequest method. -// req, resp := client.ListBackupJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupJobs -func (c *Backup) ListBackupJobsRequest(input *ListBackupJobsInput) (req *request.Request, output *ListBackupJobsOutput) { - op := &request.Operation{ - Name: opListBackupJobs, - HTTPMethod: "GET", - HTTPPath: "/backup-jobs/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListBackupJobsInput{} - } - - output = &ListBackupJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBackupJobs API operation for AWS Backup. -// -// Returns metadata about your backup jobs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation ListBackupJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupJobs -func (c *Backup) ListBackupJobs(input *ListBackupJobsInput) (*ListBackupJobsOutput, error) { - req, out := c.ListBackupJobsRequest(input) - return out, req.Send() -} - -// ListBackupJobsWithContext is the same as ListBackupJobs with the addition of -// the ability to pass a context and additional request options. -// -// See ListBackupJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) ListBackupJobsWithContext(ctx aws.Context, input *ListBackupJobsInput, opts ...request.Option) (*ListBackupJobsOutput, error) { - req, out := c.ListBackupJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListBackupJobsPages iterates over the pages of a ListBackupJobs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListBackupJobs 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 ListBackupJobs operation. -// pageNum := 0 -// err := client.ListBackupJobsPages(params, -// func(page *ListBackupJobsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Backup) ListBackupJobsPages(input *ListBackupJobsInput, fn func(*ListBackupJobsOutput, bool) bool) error { - return c.ListBackupJobsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListBackupJobsPagesWithContext same as ListBackupJobsPages 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 *Backup) ListBackupJobsPagesWithContext(ctx aws.Context, input *ListBackupJobsInput, fn func(*ListBackupJobsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListBackupJobsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListBackupJobsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBackupJobsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListBackupPlanTemplates = "ListBackupPlanTemplates" - -// ListBackupPlanTemplatesRequest generates a "aws/request.Request" representing the -// client's request for the ListBackupPlanTemplates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListBackupPlanTemplates for more information on using the ListBackupPlanTemplates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListBackupPlanTemplatesRequest method. -// req, resp := client.ListBackupPlanTemplatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanTemplates -func (c *Backup) ListBackupPlanTemplatesRequest(input *ListBackupPlanTemplatesInput) (req *request.Request, output *ListBackupPlanTemplatesOutput) { - op := &request.Operation{ - Name: opListBackupPlanTemplates, - HTTPMethod: "GET", - HTTPPath: "/backup/template/plans", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListBackupPlanTemplatesInput{} - } - - output = &ListBackupPlanTemplatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBackupPlanTemplates API operation for AWS Backup. -// -// Returns metadata of your saved backup plan templates, including the template -// ID, name, and the creation and deletion dates. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation ListBackupPlanTemplates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanTemplates -func (c *Backup) ListBackupPlanTemplates(input *ListBackupPlanTemplatesInput) (*ListBackupPlanTemplatesOutput, error) { - req, out := c.ListBackupPlanTemplatesRequest(input) - return out, req.Send() -} - -// ListBackupPlanTemplatesWithContext is the same as ListBackupPlanTemplates with the addition of -// the ability to pass a context and additional request options. -// -// See ListBackupPlanTemplates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) ListBackupPlanTemplatesWithContext(ctx aws.Context, input *ListBackupPlanTemplatesInput, opts ...request.Option) (*ListBackupPlanTemplatesOutput, error) { - req, out := c.ListBackupPlanTemplatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListBackupPlanTemplatesPages iterates over the pages of a ListBackupPlanTemplates operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListBackupPlanTemplates 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 ListBackupPlanTemplates operation. -// pageNum := 0 -// err := client.ListBackupPlanTemplatesPages(params, -// func(page *ListBackupPlanTemplatesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Backup) ListBackupPlanTemplatesPages(input *ListBackupPlanTemplatesInput, fn func(*ListBackupPlanTemplatesOutput, bool) bool) error { - return c.ListBackupPlanTemplatesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListBackupPlanTemplatesPagesWithContext same as ListBackupPlanTemplatesPages 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 *Backup) ListBackupPlanTemplatesPagesWithContext(ctx aws.Context, input *ListBackupPlanTemplatesInput, fn func(*ListBackupPlanTemplatesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListBackupPlanTemplatesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListBackupPlanTemplatesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBackupPlanTemplatesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListBackupPlanVersions = "ListBackupPlanVersions" - -// ListBackupPlanVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListBackupPlanVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListBackupPlanVersions for more information on using the ListBackupPlanVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListBackupPlanVersionsRequest method. -// req, resp := client.ListBackupPlanVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanVersions -func (c *Backup) ListBackupPlanVersionsRequest(input *ListBackupPlanVersionsInput) (req *request.Request, output *ListBackupPlanVersionsOutput) { - op := &request.Operation{ - Name: opListBackupPlanVersions, - HTTPMethod: "GET", - HTTPPath: "/backup/plans/{backupPlanId}/versions/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListBackupPlanVersionsInput{} - } - - output = &ListBackupPlanVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBackupPlanVersions API operation for AWS Backup. -// -// Returns version metadata of your backup plans, including Amazon Resource -// Names (ARNs), backup plan IDs, creation and deletion dates, plan names, and -// version IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation ListBackupPlanVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanVersions -func (c *Backup) ListBackupPlanVersions(input *ListBackupPlanVersionsInput) (*ListBackupPlanVersionsOutput, error) { - req, out := c.ListBackupPlanVersionsRequest(input) - return out, req.Send() -} - -// ListBackupPlanVersionsWithContext is the same as ListBackupPlanVersions with the addition of -// the ability to pass a context and additional request options. -// -// See ListBackupPlanVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) ListBackupPlanVersionsWithContext(ctx aws.Context, input *ListBackupPlanVersionsInput, opts ...request.Option) (*ListBackupPlanVersionsOutput, error) { - req, out := c.ListBackupPlanVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListBackupPlanVersionsPages iterates over the pages of a ListBackupPlanVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListBackupPlanVersions 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 ListBackupPlanVersions operation. -// pageNum := 0 -// err := client.ListBackupPlanVersionsPages(params, -// func(page *ListBackupPlanVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Backup) ListBackupPlanVersionsPages(input *ListBackupPlanVersionsInput, fn func(*ListBackupPlanVersionsOutput, bool) bool) error { - return c.ListBackupPlanVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListBackupPlanVersionsPagesWithContext same as ListBackupPlanVersionsPages 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 *Backup) ListBackupPlanVersionsPagesWithContext(ctx aws.Context, input *ListBackupPlanVersionsInput, fn func(*ListBackupPlanVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListBackupPlanVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListBackupPlanVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBackupPlanVersionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListBackupPlans = "ListBackupPlans" - -// ListBackupPlansRequest generates a "aws/request.Request" representing the -// client's request for the ListBackupPlans operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListBackupPlans for more information on using the ListBackupPlans -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListBackupPlansRequest method. -// req, resp := client.ListBackupPlansRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlans -func (c *Backup) ListBackupPlansRequest(input *ListBackupPlansInput) (req *request.Request, output *ListBackupPlansOutput) { - op := &request.Operation{ - Name: opListBackupPlans, - HTTPMethod: "GET", - HTTPPath: "/backup/plans/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListBackupPlansInput{} - } - - output = &ListBackupPlansOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBackupPlans API operation for AWS Backup. -// -// Returns metadata of your saved backup plans, including Amazon Resource Names -// (ARNs), plan IDs, creation and deletion dates, version IDs, plan names, and -// creator request IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation ListBackupPlans for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlans -func (c *Backup) ListBackupPlans(input *ListBackupPlansInput) (*ListBackupPlansOutput, error) { - req, out := c.ListBackupPlansRequest(input) - return out, req.Send() -} - -// ListBackupPlansWithContext is the same as ListBackupPlans with the addition of -// the ability to pass a context and additional request options. -// -// See ListBackupPlans for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) ListBackupPlansWithContext(ctx aws.Context, input *ListBackupPlansInput, opts ...request.Option) (*ListBackupPlansOutput, error) { - req, out := c.ListBackupPlansRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListBackupPlansPages iterates over the pages of a ListBackupPlans operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListBackupPlans 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 ListBackupPlans operation. -// pageNum := 0 -// err := client.ListBackupPlansPages(params, -// func(page *ListBackupPlansOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Backup) ListBackupPlansPages(input *ListBackupPlansInput, fn func(*ListBackupPlansOutput, bool) bool) error { - return c.ListBackupPlansPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListBackupPlansPagesWithContext same as ListBackupPlansPages 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 *Backup) ListBackupPlansPagesWithContext(ctx aws.Context, input *ListBackupPlansInput, fn func(*ListBackupPlansOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListBackupPlansInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListBackupPlansRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBackupPlansOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListBackupSelections = "ListBackupSelections" - -// ListBackupSelectionsRequest generates a "aws/request.Request" representing the -// client's request for the ListBackupSelections operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListBackupSelections for more information on using the ListBackupSelections -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListBackupSelectionsRequest method. -// req, resp := client.ListBackupSelectionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupSelections -func (c *Backup) ListBackupSelectionsRequest(input *ListBackupSelectionsInput) (req *request.Request, output *ListBackupSelectionsOutput) { - op := &request.Operation{ - Name: opListBackupSelections, - HTTPMethod: "GET", - HTTPPath: "/backup/plans/{backupPlanId}/selections/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListBackupSelectionsInput{} - } - - output = &ListBackupSelectionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBackupSelections API operation for AWS Backup. -// -// Returns an array containing metadata of the resources associated with the -// target backup plan. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation ListBackupSelections for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupSelections -func (c *Backup) ListBackupSelections(input *ListBackupSelectionsInput) (*ListBackupSelectionsOutput, error) { - req, out := c.ListBackupSelectionsRequest(input) - return out, req.Send() -} - -// ListBackupSelectionsWithContext is the same as ListBackupSelections with the addition of -// the ability to pass a context and additional request options. -// -// See ListBackupSelections for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) ListBackupSelectionsWithContext(ctx aws.Context, input *ListBackupSelectionsInput, opts ...request.Option) (*ListBackupSelectionsOutput, error) { - req, out := c.ListBackupSelectionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListBackupSelectionsPages iterates over the pages of a ListBackupSelections operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListBackupSelections 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 ListBackupSelections operation. -// pageNum := 0 -// err := client.ListBackupSelectionsPages(params, -// func(page *ListBackupSelectionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Backup) ListBackupSelectionsPages(input *ListBackupSelectionsInput, fn func(*ListBackupSelectionsOutput, bool) bool) error { - return c.ListBackupSelectionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListBackupSelectionsPagesWithContext same as ListBackupSelectionsPages 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 *Backup) ListBackupSelectionsPagesWithContext(ctx aws.Context, input *ListBackupSelectionsInput, fn func(*ListBackupSelectionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListBackupSelectionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListBackupSelectionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBackupSelectionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListBackupVaults = "ListBackupVaults" - -// ListBackupVaultsRequest generates a "aws/request.Request" representing the -// client's request for the ListBackupVaults operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListBackupVaults for more information on using the ListBackupVaults -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListBackupVaultsRequest method. -// req, resp := client.ListBackupVaultsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupVaults -func (c *Backup) ListBackupVaultsRequest(input *ListBackupVaultsInput) (req *request.Request, output *ListBackupVaultsOutput) { - op := &request.Operation{ - Name: opListBackupVaults, - HTTPMethod: "GET", - HTTPPath: "/backup-vaults/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListBackupVaultsInput{} - } - - output = &ListBackupVaultsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBackupVaults API operation for AWS Backup. -// -// Returns a list of recovery point storage containers along with information -// about them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation ListBackupVaults for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupVaults -func (c *Backup) ListBackupVaults(input *ListBackupVaultsInput) (*ListBackupVaultsOutput, error) { - req, out := c.ListBackupVaultsRequest(input) - return out, req.Send() -} - -// ListBackupVaultsWithContext is the same as ListBackupVaults with the addition of -// the ability to pass a context and additional request options. -// -// See ListBackupVaults for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) ListBackupVaultsWithContext(ctx aws.Context, input *ListBackupVaultsInput, opts ...request.Option) (*ListBackupVaultsOutput, error) { - req, out := c.ListBackupVaultsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListBackupVaultsPages iterates over the pages of a ListBackupVaults operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListBackupVaults 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 ListBackupVaults operation. -// pageNum := 0 -// err := client.ListBackupVaultsPages(params, -// func(page *ListBackupVaultsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Backup) ListBackupVaultsPages(input *ListBackupVaultsInput, fn func(*ListBackupVaultsOutput, bool) bool) error { - return c.ListBackupVaultsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListBackupVaultsPagesWithContext same as ListBackupVaultsPages 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 *Backup) ListBackupVaultsPagesWithContext(ctx aws.Context, input *ListBackupVaultsInput, fn func(*ListBackupVaultsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListBackupVaultsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListBackupVaultsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBackupVaultsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListProtectedResources = "ListProtectedResources" - -// ListProtectedResourcesRequest generates a "aws/request.Request" representing the -// client's request for the ListProtectedResources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListProtectedResources for more information on using the ListProtectedResources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListProtectedResourcesRequest method. -// req, resp := client.ListProtectedResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListProtectedResources -func (c *Backup) ListProtectedResourcesRequest(input *ListProtectedResourcesInput) (req *request.Request, output *ListProtectedResourcesOutput) { - op := &request.Operation{ - Name: opListProtectedResources, - HTTPMethod: "GET", - HTTPPath: "/resources/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListProtectedResourcesInput{} - } - - output = &ListProtectedResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListProtectedResources API operation for AWS Backup. -// -// Returns an array of resources successfully backed up by AWS Backup, including -// the time the resource was saved, an Amazon Resource Name (ARN) of the resource, -// and a resource type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation ListProtectedResources for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListProtectedResources -func (c *Backup) ListProtectedResources(input *ListProtectedResourcesInput) (*ListProtectedResourcesOutput, error) { - req, out := c.ListProtectedResourcesRequest(input) - return out, req.Send() -} - -// ListProtectedResourcesWithContext is the same as ListProtectedResources with the addition of -// the ability to pass a context and additional request options. -// -// See ListProtectedResources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) ListProtectedResourcesWithContext(ctx aws.Context, input *ListProtectedResourcesInput, opts ...request.Option) (*ListProtectedResourcesOutput, error) { - req, out := c.ListProtectedResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListProtectedResourcesPages iterates over the pages of a ListProtectedResources operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListProtectedResources 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 ListProtectedResources operation. -// pageNum := 0 -// err := client.ListProtectedResourcesPages(params, -// func(page *ListProtectedResourcesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Backup) ListProtectedResourcesPages(input *ListProtectedResourcesInput, fn func(*ListProtectedResourcesOutput, bool) bool) error { - return c.ListProtectedResourcesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListProtectedResourcesPagesWithContext same as ListProtectedResourcesPages 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 *Backup) ListProtectedResourcesPagesWithContext(ctx aws.Context, input *ListProtectedResourcesInput, fn func(*ListProtectedResourcesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListProtectedResourcesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListProtectedResourcesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListProtectedResourcesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListRecoveryPointsByBackupVault = "ListRecoveryPointsByBackupVault" - -// ListRecoveryPointsByBackupVaultRequest generates a "aws/request.Request" representing the -// client's request for the ListRecoveryPointsByBackupVault operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRecoveryPointsByBackupVault for more information on using the ListRecoveryPointsByBackupVault -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRecoveryPointsByBackupVaultRequest method. -// req, resp := client.ListRecoveryPointsByBackupVaultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByBackupVault -func (c *Backup) ListRecoveryPointsByBackupVaultRequest(input *ListRecoveryPointsByBackupVaultInput) (req *request.Request, output *ListRecoveryPointsByBackupVaultOutput) { - op := &request.Operation{ - Name: opListRecoveryPointsByBackupVault, - HTTPMethod: "GET", - HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListRecoveryPointsByBackupVaultInput{} - } - - output = &ListRecoveryPointsByBackupVaultOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRecoveryPointsByBackupVault API operation for AWS Backup. -// -// Returns detailed information about the recovery points stored in a backup -// vault. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation ListRecoveryPointsByBackupVault for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByBackupVault -func (c *Backup) ListRecoveryPointsByBackupVault(input *ListRecoveryPointsByBackupVaultInput) (*ListRecoveryPointsByBackupVaultOutput, error) { - req, out := c.ListRecoveryPointsByBackupVaultRequest(input) - return out, req.Send() -} - -// ListRecoveryPointsByBackupVaultWithContext is the same as ListRecoveryPointsByBackupVault with the addition of -// the ability to pass a context and additional request options. -// -// See ListRecoveryPointsByBackupVault for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) ListRecoveryPointsByBackupVaultWithContext(ctx aws.Context, input *ListRecoveryPointsByBackupVaultInput, opts ...request.Option) (*ListRecoveryPointsByBackupVaultOutput, error) { - req, out := c.ListRecoveryPointsByBackupVaultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListRecoveryPointsByBackupVaultPages iterates over the pages of a ListRecoveryPointsByBackupVault operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListRecoveryPointsByBackupVault 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 ListRecoveryPointsByBackupVault operation. -// pageNum := 0 -// err := client.ListRecoveryPointsByBackupVaultPages(params, -// func(page *ListRecoveryPointsByBackupVaultOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Backup) ListRecoveryPointsByBackupVaultPages(input *ListRecoveryPointsByBackupVaultInput, fn func(*ListRecoveryPointsByBackupVaultOutput, bool) bool) error { - return c.ListRecoveryPointsByBackupVaultPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListRecoveryPointsByBackupVaultPagesWithContext same as ListRecoveryPointsByBackupVaultPages 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 *Backup) ListRecoveryPointsByBackupVaultPagesWithContext(ctx aws.Context, input *ListRecoveryPointsByBackupVaultInput, fn func(*ListRecoveryPointsByBackupVaultOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListRecoveryPointsByBackupVaultInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListRecoveryPointsByBackupVaultRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRecoveryPointsByBackupVaultOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListRecoveryPointsByResource = "ListRecoveryPointsByResource" - -// ListRecoveryPointsByResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListRecoveryPointsByResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRecoveryPointsByResource for more information on using the ListRecoveryPointsByResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRecoveryPointsByResourceRequest method. -// req, resp := client.ListRecoveryPointsByResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByResource -func (c *Backup) ListRecoveryPointsByResourceRequest(input *ListRecoveryPointsByResourceInput) (req *request.Request, output *ListRecoveryPointsByResourceOutput) { - op := &request.Operation{ - Name: opListRecoveryPointsByResource, - HTTPMethod: "GET", - HTTPPath: "/resources/{resourceArn}/recovery-points/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListRecoveryPointsByResourceInput{} - } - - output = &ListRecoveryPointsByResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRecoveryPointsByResource API operation for AWS Backup. -// -// Returns detailed information about recovery points of the type specified -// by a resource Amazon Resource Name (ARN). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation ListRecoveryPointsByResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByResource -func (c *Backup) ListRecoveryPointsByResource(input *ListRecoveryPointsByResourceInput) (*ListRecoveryPointsByResourceOutput, error) { - req, out := c.ListRecoveryPointsByResourceRequest(input) - return out, req.Send() -} - -// ListRecoveryPointsByResourceWithContext is the same as ListRecoveryPointsByResource with the addition of -// the ability to pass a context and additional request options. -// -// See ListRecoveryPointsByResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) ListRecoveryPointsByResourceWithContext(ctx aws.Context, input *ListRecoveryPointsByResourceInput, opts ...request.Option) (*ListRecoveryPointsByResourceOutput, error) { - req, out := c.ListRecoveryPointsByResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListRecoveryPointsByResourcePages iterates over the pages of a ListRecoveryPointsByResource operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListRecoveryPointsByResource 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 ListRecoveryPointsByResource operation. -// pageNum := 0 -// err := client.ListRecoveryPointsByResourcePages(params, -// func(page *ListRecoveryPointsByResourceOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Backup) ListRecoveryPointsByResourcePages(input *ListRecoveryPointsByResourceInput, fn func(*ListRecoveryPointsByResourceOutput, bool) bool) error { - return c.ListRecoveryPointsByResourcePagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListRecoveryPointsByResourcePagesWithContext same as ListRecoveryPointsByResourcePages 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 *Backup) ListRecoveryPointsByResourcePagesWithContext(ctx aws.Context, input *ListRecoveryPointsByResourceInput, fn func(*ListRecoveryPointsByResourceOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListRecoveryPointsByResourceInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListRecoveryPointsByResourceRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRecoveryPointsByResourceOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListRestoreJobs = "ListRestoreJobs" - -// ListRestoreJobsRequest generates a "aws/request.Request" representing the -// client's request for the ListRestoreJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRestoreJobs for more information on using the ListRestoreJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRestoreJobsRequest method. -// req, resp := client.ListRestoreJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRestoreJobs -func (c *Backup) ListRestoreJobsRequest(input *ListRestoreJobsInput) (req *request.Request, output *ListRestoreJobsOutput) { - op := &request.Operation{ - Name: opListRestoreJobs, - HTTPMethod: "GET", - HTTPPath: "/restore-jobs/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListRestoreJobsInput{} - } - - output = &ListRestoreJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRestoreJobs API operation for AWS Backup. -// -// Returns a list of jobs that AWS Backup initiated to restore a saved resource, -// including metadata about the recovery process. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation ListRestoreJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRestoreJobs -func (c *Backup) ListRestoreJobs(input *ListRestoreJobsInput) (*ListRestoreJobsOutput, error) { - req, out := c.ListRestoreJobsRequest(input) - return out, req.Send() -} - -// ListRestoreJobsWithContext is the same as ListRestoreJobs with the addition of -// the ability to pass a context and additional request options. -// -// See ListRestoreJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) ListRestoreJobsWithContext(ctx aws.Context, input *ListRestoreJobsInput, opts ...request.Option) (*ListRestoreJobsOutput, error) { - req, out := c.ListRestoreJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListRestoreJobsPages iterates over the pages of a ListRestoreJobs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListRestoreJobs 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 ListRestoreJobs operation. -// pageNum := 0 -// err := client.ListRestoreJobsPages(params, -// func(page *ListRestoreJobsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Backup) ListRestoreJobsPages(input *ListRestoreJobsInput, fn func(*ListRestoreJobsOutput, bool) bool) error { - return c.ListRestoreJobsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListRestoreJobsPagesWithContext same as ListRestoreJobsPages 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 *Backup) ListRestoreJobsPagesWithContext(ctx aws.Context, input *ListRestoreJobsInput, fn func(*ListRestoreJobsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListRestoreJobsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListRestoreJobsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRestoreJobsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTags = "ListTags" - -// ListTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTags for more information on using the ListTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsRequest method. -// req, resp := client.ListTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListTags -func (c *Backup) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { - op := &request.Operation{ - Name: opListTags, - HTTPMethod: "GET", - HTTPPath: "/tags/{resourceArn}/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTagsInput{} - } - - output = &ListTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTags API operation for AWS Backup. -// -// Returns a list of key-value pairs assigned to a target recovery point, backup -// plan, or backup vault. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation ListTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListTags -func (c *Backup) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - return out, req.Send() -} - -// ListTagsWithContext is the same as ListTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTagsPages iterates over the pages of a ListTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTags method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListTags operation. -// pageNum := 0 -// err := client.ListTagsPages(params, -// func(page *ListTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Backup) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error { - return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTagsPagesWithContext same as ListTagsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opPutBackupVaultAccessPolicy = "PutBackupVaultAccessPolicy" - -// PutBackupVaultAccessPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutBackupVaultAccessPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutBackupVaultAccessPolicy for more information on using the PutBackupVaultAccessPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutBackupVaultAccessPolicyRequest method. -// req, resp := client.PutBackupVaultAccessPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultAccessPolicy -func (c *Backup) PutBackupVaultAccessPolicyRequest(input *PutBackupVaultAccessPolicyInput) (req *request.Request, output *PutBackupVaultAccessPolicyOutput) { - op := &request.Operation{ - Name: opPutBackupVaultAccessPolicy, - HTTPMethod: "PUT", - HTTPPath: "/backup-vaults/{backupVaultName}/access-policy", - } - - if input == nil { - input = &PutBackupVaultAccessPolicyInput{} - } - - output = &PutBackupVaultAccessPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutBackupVaultAccessPolicy API operation for AWS Backup. -// -// Sets a resource-based policy that is used to manage access permissions on -// the target backup vault. Requires a backup vault name and an access policy -// document in JSON format. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation PutBackupVaultAccessPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultAccessPolicy -func (c *Backup) PutBackupVaultAccessPolicy(input *PutBackupVaultAccessPolicyInput) (*PutBackupVaultAccessPolicyOutput, error) { - req, out := c.PutBackupVaultAccessPolicyRequest(input) - return out, req.Send() -} - -// PutBackupVaultAccessPolicyWithContext is the same as PutBackupVaultAccessPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutBackupVaultAccessPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) PutBackupVaultAccessPolicyWithContext(ctx aws.Context, input *PutBackupVaultAccessPolicyInput, opts ...request.Option) (*PutBackupVaultAccessPolicyOutput, error) { - req, out := c.PutBackupVaultAccessPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBackupVaultNotifications = "PutBackupVaultNotifications" - -// PutBackupVaultNotificationsRequest generates a "aws/request.Request" representing the -// client's request for the PutBackupVaultNotifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutBackupVaultNotifications for more information on using the PutBackupVaultNotifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutBackupVaultNotificationsRequest method. -// req, resp := client.PutBackupVaultNotificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultNotifications -func (c *Backup) PutBackupVaultNotificationsRequest(input *PutBackupVaultNotificationsInput) (req *request.Request, output *PutBackupVaultNotificationsOutput) { - op := &request.Operation{ - Name: opPutBackupVaultNotifications, - HTTPMethod: "PUT", - HTTPPath: "/backup-vaults/{backupVaultName}/notification-configuration", - } - - if input == nil { - input = &PutBackupVaultNotificationsInput{} - } - - output = &PutBackupVaultNotificationsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutBackupVaultNotifications API operation for AWS Backup. -// -// Turns on notifications on a backup vault for the specified topic and events. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation PutBackupVaultNotifications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultNotifications -func (c *Backup) PutBackupVaultNotifications(input *PutBackupVaultNotificationsInput) (*PutBackupVaultNotificationsOutput, error) { - req, out := c.PutBackupVaultNotificationsRequest(input) - return out, req.Send() -} - -// PutBackupVaultNotificationsWithContext is the same as PutBackupVaultNotifications with the addition of -// the ability to pass a context and additional request options. -// -// See PutBackupVaultNotifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) PutBackupVaultNotificationsWithContext(ctx aws.Context, input *PutBackupVaultNotificationsInput, opts ...request.Option) (*PutBackupVaultNotificationsOutput, error) { - req, out := c.PutBackupVaultNotificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartBackupJob = "StartBackupJob" - -// StartBackupJobRequest generates a "aws/request.Request" representing the -// client's request for the StartBackupJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartBackupJob for more information on using the StartBackupJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartBackupJobRequest method. -// req, resp := client.StartBackupJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartBackupJob -func (c *Backup) StartBackupJobRequest(input *StartBackupJobInput) (req *request.Request, output *StartBackupJobOutput) { - op := &request.Operation{ - Name: opStartBackupJob, - HTTPMethod: "PUT", - HTTPPath: "/backup-jobs", - } - - if input == nil { - input = &StartBackupJobInput{} - } - - output = &StartBackupJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartBackupJob API operation for AWS Backup. -// -// Starts a job to create a one-time backup of the specified resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation StartBackupJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit in the request has been exceeded; for example, a maximum number of -// items allowed in a request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartBackupJob -func (c *Backup) StartBackupJob(input *StartBackupJobInput) (*StartBackupJobOutput, error) { - req, out := c.StartBackupJobRequest(input) - return out, req.Send() -} - -// StartBackupJobWithContext is the same as StartBackupJob with the addition of -// the ability to pass a context and additional request options. -// -// See StartBackupJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) StartBackupJobWithContext(ctx aws.Context, input *StartBackupJobInput, opts ...request.Option) (*StartBackupJobOutput, error) { - req, out := c.StartBackupJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartRestoreJob = "StartRestoreJob" - -// StartRestoreJobRequest generates a "aws/request.Request" representing the -// client's request for the StartRestoreJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartRestoreJob for more information on using the StartRestoreJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartRestoreJobRequest method. -// req, resp := client.StartRestoreJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartRestoreJob -func (c *Backup) StartRestoreJobRequest(input *StartRestoreJobInput) (req *request.Request, output *StartRestoreJobOutput) { - op := &request.Operation{ - Name: opStartRestoreJob, - HTTPMethod: "PUT", - HTTPPath: "/restore-jobs", - } - - if input == nil { - input = &StartRestoreJobInput{} - } - - output = &StartRestoreJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartRestoreJob API operation for AWS Backup. -// -// Recovers the saved resource identified by an Amazon Resource Name (ARN). -// -// If the resource ARN is included in the request, then the last complete backup -// of that resource is recovered. If the ARN of a recovery point is supplied, -// then that recovery point is restored. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation StartRestoreJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartRestoreJob -func (c *Backup) StartRestoreJob(input *StartRestoreJobInput) (*StartRestoreJobOutput, error) { - req, out := c.StartRestoreJobRequest(input) - return out, req.Send() -} - -// StartRestoreJobWithContext is the same as StartRestoreJob with the addition of -// the ability to pass a context and additional request options. -// -// See StartRestoreJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) StartRestoreJobWithContext(ctx aws.Context, input *StartRestoreJobInput, opts ...request.Option) (*StartRestoreJobOutput, error) { - req, out := c.StartRestoreJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopBackupJob = "StopBackupJob" - -// StopBackupJobRequest generates a "aws/request.Request" representing the -// client's request for the StopBackupJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopBackupJob for more information on using the StopBackupJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopBackupJobRequest method. -// req, resp := client.StopBackupJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StopBackupJob -func (c *Backup) StopBackupJobRequest(input *StopBackupJobInput) (req *request.Request, output *StopBackupJobOutput) { - op := &request.Operation{ - Name: opStopBackupJob, - HTTPMethod: "POST", - HTTPPath: "/backup-jobs/{backupJobId}", - } - - if input == nil { - input = &StopBackupJobInput{} - } - - output = &StopBackupJobOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopBackupJob API operation for AWS Backup. -// -// Attempts to cancel a job to create a one-time backup of a 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 Backup's -// API operation StopBackupJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Indicates that something is wrong with the input to the request. For example, -// a parameter is of the wrong type. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StopBackupJob -func (c *Backup) StopBackupJob(input *StopBackupJobInput) (*StopBackupJobOutput, error) { - req, out := c.StopBackupJobRequest(input) - return out, req.Send() -} - -// StopBackupJobWithContext is the same as StopBackupJob with the addition of -// the ability to pass a context and additional request options. -// -// See StopBackupJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) StopBackupJobWithContext(ctx aws.Context, input *StopBackupJobInput, opts ...request.Option) (*StopBackupJobOutput, error) { - req, out := c.StopBackupJobRequest(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/backup-2018-11-15/TagResource -func (c *Backup) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/tags/{resourceArn}", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for AWS Backup. -// -// Assigns a set of key-value pairs to a recovery point, backup plan, or backup -// vault identified by an Amazon Resource Name (ARN). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit in the request has been exceeded; for example, a maximum number of -// items allowed in a request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/TagResource -func (c *Backup) 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 *Backup) 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/backup-2018-11-15/UntagResource -func (c *Backup) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/untag/{resourceArn}", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for AWS Backup. -// -// Removes a set of key-value pairs from a recovery point, backup plan, or backup -// vault identified by an Amazon Resource Name (ARN) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UntagResource -func (c *Backup) 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 *Backup) 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 opUpdateBackupPlan = "UpdateBackupPlan" - -// UpdateBackupPlanRequest generates a "aws/request.Request" representing the -// client's request for the UpdateBackupPlan operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateBackupPlan for more information on using the UpdateBackupPlan -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateBackupPlanRequest method. -// req, resp := client.UpdateBackupPlanRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateBackupPlan -func (c *Backup) UpdateBackupPlanRequest(input *UpdateBackupPlanInput) (req *request.Request, output *UpdateBackupPlanOutput) { - op := &request.Operation{ - Name: opUpdateBackupPlan, - HTTPMethod: "POST", - HTTPPath: "/backup/plans/{backupPlanId}", - } - - if input == nil { - input = &UpdateBackupPlanInput{} - } - - output = &UpdateBackupPlanOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateBackupPlan API operation for AWS Backup. -// -// Replaces the body of a saved backup plan identified by its backupPlanId with -// the input document in JSON format. The new version is uniquely identified -// by a VersionId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation UpdateBackupPlan for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateBackupPlan -func (c *Backup) UpdateBackupPlan(input *UpdateBackupPlanInput) (*UpdateBackupPlanOutput, error) { - req, out := c.UpdateBackupPlanRequest(input) - return out, req.Send() -} - -// UpdateBackupPlanWithContext is the same as UpdateBackupPlan with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateBackupPlan for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) UpdateBackupPlanWithContext(ctx aws.Context, input *UpdateBackupPlanInput, opts ...request.Option) (*UpdateBackupPlanOutput, error) { - req, out := c.UpdateBackupPlanRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRecoveryPointLifecycle = "UpdateRecoveryPointLifecycle" - -// UpdateRecoveryPointLifecycleRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRecoveryPointLifecycle operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRecoveryPointLifecycle for more information on using the UpdateRecoveryPointLifecycle -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRecoveryPointLifecycleRequest method. -// req, resp := client.UpdateRecoveryPointLifecycleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateRecoveryPointLifecycle -func (c *Backup) UpdateRecoveryPointLifecycleRequest(input *UpdateRecoveryPointLifecycleInput) (req *request.Request, output *UpdateRecoveryPointLifecycleOutput) { - op := &request.Operation{ - Name: opUpdateRecoveryPointLifecycle, - HTTPMethod: "POST", - HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}", - } - - if input == nil { - input = &UpdateRecoveryPointLifecycleInput{} - } - - output = &UpdateRecoveryPointLifecycleOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRecoveryPointLifecycle API operation for AWS Backup. -// -// Sets the transition lifecycle of a recovery point. -// -// The lifecycle defines when a protected resource is transitioned to cold storage -// and when it expires. AWS Backup transitions and expires backups automatically -// according to the lifecycle that you define. -// -// Backups transitioned to cold storage must be stored in cold storage for a -// minimum of 90 days. Therefore, the “expire after days” setting must be 90 -// days greater than the “transition to cold after days” setting. The “transition -// to cold after days” setting cannot be changed after a backup has been transitioned -// to cold. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Backup's -// API operation UpdateRecoveryPointLifecycle for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource that is required for the action doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Indicates that something is wrong with a parameter's value. For example, -// the value is out of range. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Indicates that a required parameter is missing. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request failed due to a temporary failure of the server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateRecoveryPointLifecycle -func (c *Backup) UpdateRecoveryPointLifecycle(input *UpdateRecoveryPointLifecycleInput) (*UpdateRecoveryPointLifecycleOutput, error) { - req, out := c.UpdateRecoveryPointLifecycleRequest(input) - return out, req.Send() -} - -// UpdateRecoveryPointLifecycleWithContext is the same as UpdateRecoveryPointLifecycle with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRecoveryPointLifecycle for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Backup) UpdateRecoveryPointLifecycleWithContext(ctx aws.Context, input *UpdateRecoveryPointLifecycleInput, opts ...request.Option) (*UpdateRecoveryPointLifecycleOutput, error) { - req, out := c.UpdateRecoveryPointLifecycleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Contains DeleteAt and MoveToColdStorageAt timestamps, which are used to specify -// a lifecycle for a recovery point. -// -// The lifecycle defines when a protected resource is transitioned to cold storage -// and when it expires. AWS Backup transitions and expires backups automatically -// according to the lifecycle that you define. -// -// Backups transitioned to cold storage must be stored in cold storage for a -// minimum of 90 days. Therefore, the “expire after days” setting must be 90 -// days greater than the “transition to cold after days” setting. The “transition -// to cold after days” setting cannot be changed after a backup has been transitioned -// to cold. -type CalculatedLifecycle struct { - _ struct{} `type:"structure"` - - // A timestamp that specifies when to delete a recovery point. - DeleteAt *time.Time `type:"timestamp"` - - // A timestamp that specifies when to transition a recovery point to cold storage. - MoveToColdStorageAt *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s CalculatedLifecycle) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CalculatedLifecycle) GoString() string { - return s.String() -} - -// SetDeleteAt sets the DeleteAt field's value. -func (s *CalculatedLifecycle) SetDeleteAt(v time.Time) *CalculatedLifecycle { - s.DeleteAt = &v - return s -} - -// SetMoveToColdStorageAt sets the MoveToColdStorageAt field's value. -func (s *CalculatedLifecycle) SetMoveToColdStorageAt(v time.Time) *CalculatedLifecycle { - s.MoveToColdStorageAt = &v - return s -} - -// Contains an array of triplets made up of a condition type (such as StringEquals), -// a key, and a value. Conditions are used to filter resources in a selection -// that is assigned to a backup plan. -type Condition struct { - _ struct{} `type:"structure"` - - // The key in a key-value pair. For example, in "ec2:ResourceTag/Department": - // "accounting", "ec2:ResourceTag/Department" is the key. - // - // ConditionKey is a required field - ConditionKey *string `type:"string" required:"true"` - - // An operation, such as StringEquals, that is applied to a key-value pair used - // to filter resources in a selection. - // - // ConditionType is a required field - ConditionType *string `type:"string" required:"true" enum:"ConditionType"` - - // The value in a key-value pair. For example, in "ec2:ResourceTag/Department": - // "accounting", "accounting" is the value. - // - // ConditionValue is a required field - ConditionValue *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Condition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Condition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Condition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Condition"} - if s.ConditionKey == nil { - invalidParams.Add(request.NewErrParamRequired("ConditionKey")) - } - if s.ConditionType == nil { - invalidParams.Add(request.NewErrParamRequired("ConditionType")) - } - if s.ConditionValue == nil { - invalidParams.Add(request.NewErrParamRequired("ConditionValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConditionKey sets the ConditionKey field's value. -func (s *Condition) SetConditionKey(v string) *Condition { - s.ConditionKey = &v - return s -} - -// SetConditionType sets the ConditionType field's value. -func (s *Condition) SetConditionType(v string) *Condition { - s.ConditionType = &v - return s -} - -// SetConditionValue sets the ConditionValue field's value. -func (s *Condition) SetConditionValue(v string) *Condition { - s.ConditionValue = &v - return s -} - -type CreateBackupPlanInput struct { - _ struct{} `type:"structure"` - - // Specifies the body of a backup plan. Includes a BackupPlanName and one or - // more sets of Rules. - // - // BackupPlan is a required field - BackupPlan *PlanInput `type:"structure" required:"true"` - - // To help organize your resources, you can assign your own metadata to the - // resources that you create. Each tag is a key-value pair. The specified tags - // are assigned to all backups created with this plan. - BackupPlanTags map[string]*string `type:"map" sensitive:"true"` - - // Identifies the request and allows failed requests to be retried without the - // risk of executing the operation twice. If the request includes a CreatorRequestId - // that matches an existing backup plan, that plan is returned. This parameter - // is optional. - CreatorRequestId *string `type:"string"` -} - -// String returns the string representation -func (s CreateBackupPlanInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBackupPlanInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateBackupPlanInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateBackupPlanInput"} - if s.BackupPlan == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPlan")) - } - if s.BackupPlan != nil { - if err := s.BackupPlan.Validate(); err != nil { - invalidParams.AddNested("BackupPlan", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupPlan sets the BackupPlan field's value. -func (s *CreateBackupPlanInput) SetBackupPlan(v *PlanInput) *CreateBackupPlanInput { - s.BackupPlan = v - return s -} - -// SetBackupPlanTags sets the BackupPlanTags field's value. -func (s *CreateBackupPlanInput) SetBackupPlanTags(v map[string]*string) *CreateBackupPlanInput { - s.BackupPlanTags = v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *CreateBackupPlanInput) SetCreatorRequestId(v string) *CreateBackupPlanInput { - s.CreatorRequestId = &v - return s -} - -type CreateBackupPlanOutput struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for - // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50. - BackupPlanArn *string `type:"string"` - - // Uniquely identifies a backup plan. - BackupPlanId *string `type:"string"` - - // The date and time that a backup plan is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most - // 1024 bytes long. They cannot be edited. - VersionId *string `type:"string"` -} - -// String returns the string representation -func (s CreateBackupPlanOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBackupPlanOutput) GoString() string { - return s.String() -} - -// SetBackupPlanArn sets the BackupPlanArn field's value. -func (s *CreateBackupPlanOutput) SetBackupPlanArn(v string) *CreateBackupPlanOutput { - s.BackupPlanArn = &v - return s -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *CreateBackupPlanOutput) SetBackupPlanId(v string) *CreateBackupPlanOutput { - s.BackupPlanId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *CreateBackupPlanOutput) SetCreationDate(v time.Time) *CreateBackupPlanOutput { - s.CreationDate = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *CreateBackupPlanOutput) SetVersionId(v string) *CreateBackupPlanOutput { - s.VersionId = &v - return s -} - -type CreateBackupSelectionInput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies the backup plan to be associated with the selection of - // resources. - // - // BackupPlanId is a required field - BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` - - // Specifies the body of a request to assign a set of resources to a backup - // plan. - // - // It includes an array of resources, an optional array of patterns to exclude - // resources, an optional role to provide access to the AWS service the resource - // belongs to, and an optional array of tags used to identify a set of resources. - // - // BackupSelection is a required field - BackupSelection *Selection `type:"structure" required:"true"` - - // A unique string that identifies the request and allows failed requests to - // be retried without the risk of executing the operation twice. - CreatorRequestId *string `type:"string"` -} - -// String returns the string representation -func (s CreateBackupSelectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBackupSelectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateBackupSelectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateBackupSelectionInput"} - if s.BackupPlanId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) - } - if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) - } - if s.BackupSelection == nil { - invalidParams.Add(request.NewErrParamRequired("BackupSelection")) - } - if s.BackupSelection != nil { - if err := s.BackupSelection.Validate(); err != nil { - invalidParams.AddNested("BackupSelection", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *CreateBackupSelectionInput) SetBackupPlanId(v string) *CreateBackupSelectionInput { - s.BackupPlanId = &v - return s -} - -// SetBackupSelection sets the BackupSelection field's value. -func (s *CreateBackupSelectionInput) SetBackupSelection(v *Selection) *CreateBackupSelectionInput { - s.BackupSelection = v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *CreateBackupSelectionInput) SetCreatorRequestId(v string) *CreateBackupSelectionInput { - s.CreatorRequestId = &v - return s -} - -type CreateBackupSelectionOutput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a backup plan. - BackupPlanId *string `type:"string"` - - // The date and time a backup selection is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // Uniquely identifies the body of a request to assign a set of resources to - // a backup plan. - SelectionId *string `type:"string"` -} - -// String returns the string representation -func (s CreateBackupSelectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBackupSelectionOutput) GoString() string { - return s.String() -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *CreateBackupSelectionOutput) SetBackupPlanId(v string) *CreateBackupSelectionOutput { - s.BackupPlanId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *CreateBackupSelectionOutput) SetCreationDate(v time.Time) *CreateBackupSelectionOutput { - s.CreationDate = &v - return s -} - -// SetSelectionId sets the SelectionId field's value. -func (s *CreateBackupSelectionOutput) SetSelectionId(v string) *CreateBackupSelectionOutput { - s.SelectionId = &v - return s -} - -type CreateBackupVaultInput struct { - _ struct{} `type:"structure"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` - - // Metadata that you can assign to help organize the resources that you create. - // Each tag is a key-value pair. - BackupVaultTags map[string]*string `type:"map" sensitive:"true"` - - // A unique string that identifies the request and allows failed requests to - // be retried without the risk of executing the operation twice. - CreatorRequestId *string `type:"string"` - - // The server-side encryption key that is used to protect your backups; for - // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. - EncryptionKeyArn *string `type:"string"` -} - -// String returns the string representation -func (s CreateBackupVaultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBackupVaultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateBackupVaultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateBackupVaultInput"} - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *CreateBackupVaultInput) SetBackupVaultName(v string) *CreateBackupVaultInput { - s.BackupVaultName = &v - return s -} - -// SetBackupVaultTags sets the BackupVaultTags field's value. -func (s *CreateBackupVaultInput) SetBackupVaultTags(v map[string]*string) *CreateBackupVaultInput { - s.BackupVaultTags = v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *CreateBackupVaultInput) SetCreatorRequestId(v string) *CreateBackupVaultInput { - s.CreatorRequestId = &v - return s -} - -// SetEncryptionKeyArn sets the EncryptionKeyArn field's value. -func (s *CreateBackupVaultInput) SetEncryptionKeyArn(v string) *CreateBackupVaultInput { - s.EncryptionKeyArn = &v - return s -} - -type CreateBackupVaultOutput struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. - BackupVaultArn *string `type:"string"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the Region where they are created. They consist of lowercase letters, numbers, - // and hyphens. - BackupVaultName *string `type:"string"` - - // The date and time a backup vault is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s CreateBackupVaultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBackupVaultOutput) GoString() string { - return s.String() -} - -// SetBackupVaultArn sets the BackupVaultArn field's value. -func (s *CreateBackupVaultOutput) SetBackupVaultArn(v string) *CreateBackupVaultOutput { - s.BackupVaultArn = &v - return s -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *CreateBackupVaultOutput) SetBackupVaultName(v string) *CreateBackupVaultOutput { - s.BackupVaultName = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *CreateBackupVaultOutput) SetCreationDate(v time.Time) *CreateBackupVaultOutput { - s.CreationDate = &v - return s -} - -type DeleteBackupPlanInput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a backup plan. - // - // BackupPlanId is a required field - BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBackupPlanInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBackupPlanInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBackupPlanInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBackupPlanInput"} - if s.BackupPlanId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) - } - if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *DeleteBackupPlanInput) SetBackupPlanId(v string) *DeleteBackupPlanInput { - s.BackupPlanId = &v - return s -} - -type DeleteBackupPlanOutput struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for - // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50. - BackupPlanArn *string `type:"string"` - - // Uniquely identifies a backup plan. - BackupPlanId *string `type:"string"` - - // The date and time a backup plan is deleted, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - DeletionDate *time.Time `type:"timestamp"` - - // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most - // 1,024 bytes long. Version Ids cannot be edited. - VersionId *string `type:"string"` -} - -// String returns the string representation -func (s DeleteBackupPlanOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBackupPlanOutput) GoString() string { - return s.String() -} - -// SetBackupPlanArn sets the BackupPlanArn field's value. -func (s *DeleteBackupPlanOutput) SetBackupPlanArn(v string) *DeleteBackupPlanOutput { - s.BackupPlanArn = &v - return s -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *DeleteBackupPlanOutput) SetBackupPlanId(v string) *DeleteBackupPlanOutput { - s.BackupPlanId = &v - return s -} - -// SetDeletionDate sets the DeletionDate field's value. -func (s *DeleteBackupPlanOutput) SetDeletionDate(v time.Time) *DeleteBackupPlanOutput { - s.DeletionDate = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *DeleteBackupPlanOutput) SetVersionId(v string) *DeleteBackupPlanOutput { - s.VersionId = &v - return s -} - -type DeleteBackupSelectionInput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a backup plan. - // - // BackupPlanId is a required field - BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` - - // Uniquely identifies the body of a request to assign a set of resources to - // a backup plan. - // - // SelectionId is a required field - SelectionId *string `location:"uri" locationName:"selectionId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBackupSelectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBackupSelectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBackupSelectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBackupSelectionInput"} - if s.BackupPlanId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) - } - if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) - } - if s.SelectionId == nil { - invalidParams.Add(request.NewErrParamRequired("SelectionId")) - } - if s.SelectionId != nil && len(*s.SelectionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SelectionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *DeleteBackupSelectionInput) SetBackupPlanId(v string) *DeleteBackupSelectionInput { - s.BackupPlanId = &v - return s -} - -// SetSelectionId sets the SelectionId field's value. -func (s *DeleteBackupSelectionInput) SetSelectionId(v string) *DeleteBackupSelectionInput { - s.SelectionId = &v - return s -} - -type DeleteBackupSelectionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteBackupSelectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBackupSelectionOutput) GoString() string { - return s.String() -} - -type DeleteBackupVaultAccessPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBackupVaultAccessPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBackupVaultAccessPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBackupVaultAccessPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBackupVaultAccessPolicyInput"} - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *DeleteBackupVaultAccessPolicyInput) SetBackupVaultName(v string) *DeleteBackupVaultAccessPolicyInput { - s.BackupVaultName = &v - return s -} - -type DeleteBackupVaultAccessPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteBackupVaultAccessPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBackupVaultAccessPolicyOutput) GoString() string { - return s.String() -} - -type DeleteBackupVaultInput struct { - _ struct{} `type:"structure"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // theAWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBackupVaultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBackupVaultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBackupVaultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBackupVaultInput"} - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *DeleteBackupVaultInput) SetBackupVaultName(v string) *DeleteBackupVaultInput { - s.BackupVaultName = &v - return s -} - -type DeleteBackupVaultNotificationsInput struct { - _ struct{} `type:"structure"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the Region where they are created. They consist of lowercase letters, numbers, - // and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBackupVaultNotificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBackupVaultNotificationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBackupVaultNotificationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBackupVaultNotificationsInput"} - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *DeleteBackupVaultNotificationsInput) SetBackupVaultName(v string) *DeleteBackupVaultNotificationsInput { - s.BackupVaultName = &v - return s -} - -type DeleteBackupVaultNotificationsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteBackupVaultNotificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBackupVaultNotificationsOutput) GoString() string { - return s.String() -} - -type DeleteBackupVaultOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteBackupVaultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBackupVaultOutput) GoString() string { - return s.String() -} - -type DeleteRecoveryPointInput struct { - _ struct{} `type:"structure"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` - - // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; - // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - // - // RecoveryPointArn is a required field - RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRecoveryPointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRecoveryPointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRecoveryPointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRecoveryPointInput"} - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) - } - if s.RecoveryPointArn == nil { - invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn")) - } - if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *DeleteRecoveryPointInput) SetBackupVaultName(v string) *DeleteRecoveryPointInput { - s.BackupVaultName = &v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *DeleteRecoveryPointInput) SetRecoveryPointArn(v string) *DeleteRecoveryPointInput { - s.RecoveryPointArn = &v - return s -} - -type DeleteRecoveryPointOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRecoveryPointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRecoveryPointOutput) GoString() string { - return s.String() -} - -type DescribeBackupJobInput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a request to AWS Backup to back up a resource. - // - // BackupJobId is a required field - BackupJobId *string `location:"uri" locationName:"backupJobId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeBackupJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBackupJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeBackupJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeBackupJobInput"} - if s.BackupJobId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupJobId")) - } - if s.BackupJobId != nil && len(*s.BackupJobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupJobId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupJobId sets the BackupJobId field's value. -func (s *DescribeBackupJobInput) SetBackupJobId(v string) *DescribeBackupJobInput { - s.BackupJobId = &v - return s -} - -type DescribeBackupJobOutput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a request to AWS Backup to back up a resource. - BackupJobId *string `type:"string"` - - // The size, in bytes, of a backup. - BackupSizeInBytes *int64 `type:"long"` - - // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. - BackupVaultArn *string `type:"string"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - BackupVaultName *string `type:"string"` - - // The size in bytes transferred to a backup vault at the time that the job - // status was queried. - BytesTransferred *int64 `type:"long"` - - // The date and time that a job to create a backup job is completed, in Unix - // format and Coordinated Universal Time (UTC). The value of CreationDate is - // accurate to milliseconds. For example, the value 1516925490.087 represents - // Friday, January 26, 2018 12:11:30.087 AM. - CompletionDate *time.Time `type:"timestamp"` - - // Contains identifying information about the creation of a backup job, including - // the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId of the - // backup plan that is used to create it. - CreatedBy *RecoveryPointCreator `type:"structure"` - - // The date and time that a backup job is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // The date and time that a job to back up resources is expected to be completed, - // in Unix format and Coordinated Universal Time (UTC). The value of ExpectedCompletionDate - // is accurate to milliseconds. For example, the value 1516925490.087 represents - // Friday, January 26, 2018 12:11:30.087 AM. - ExpectedCompletionDate *time.Time `type:"timestamp"` - - // Specifies the IAM role ARN used to create the target recovery point; for - // example, arn:aws:iam::123456789012:role/S3Access. - IamRoleArn *string `type:"string"` - - // Contains an estimated percentage that is complete of a job at the time the - // job status was queried. - PercentDone *string `type:"string"` - - // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - RecoveryPointArn *string `type:"string"` - - // An ARN that uniquely identifies a saved resource. The format of the ARN depends - // on the resource type. - ResourceArn *string `type:"string"` - - // The type of AWS resource to be backed-up; for example, an Amazon Elastic - // Block Store (Amazon EBS) volume or an Amazon Relational Database Service - // (Amazon RDS) database. - ResourceType *string `type:"string"` - - // Specifies the time in Unix format and Coordinated Universal Time (UTC) when - // a backup job must be started before it is canceled. The value is calculated - // by adding the start window to the scheduled time. So if the scheduled time - // were 6:00 PM and the start window is 2 hours, the StartBy time would be 8:00 - // PM on the date specified. The value of StartBy is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - StartBy *time.Time `type:"timestamp"` - - // The current state of a resource recovery point. - State *string `type:"string" enum:"JobState"` - - // A detailed message explaining the status of the job to back up a resource. - StatusMessage *string `type:"string"` -} - -// String returns the string representation -func (s DescribeBackupJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBackupJobOutput) GoString() string { - return s.String() -} - -// SetBackupJobId sets the BackupJobId field's value. -func (s *DescribeBackupJobOutput) SetBackupJobId(v string) *DescribeBackupJobOutput { - s.BackupJobId = &v - return s -} - -// SetBackupSizeInBytes sets the BackupSizeInBytes field's value. -func (s *DescribeBackupJobOutput) SetBackupSizeInBytes(v int64) *DescribeBackupJobOutput { - s.BackupSizeInBytes = &v - return s -} - -// SetBackupVaultArn sets the BackupVaultArn field's value. -func (s *DescribeBackupJobOutput) SetBackupVaultArn(v string) *DescribeBackupJobOutput { - s.BackupVaultArn = &v - return s -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *DescribeBackupJobOutput) SetBackupVaultName(v string) *DescribeBackupJobOutput { - s.BackupVaultName = &v - return s -} - -// SetBytesTransferred sets the BytesTransferred field's value. -func (s *DescribeBackupJobOutput) SetBytesTransferred(v int64) *DescribeBackupJobOutput { - s.BytesTransferred = &v - return s -} - -// SetCompletionDate sets the CompletionDate field's value. -func (s *DescribeBackupJobOutput) SetCompletionDate(v time.Time) *DescribeBackupJobOutput { - s.CompletionDate = &v - return s -} - -// SetCreatedBy sets the CreatedBy field's value. -func (s *DescribeBackupJobOutput) SetCreatedBy(v *RecoveryPointCreator) *DescribeBackupJobOutput { - s.CreatedBy = v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *DescribeBackupJobOutput) SetCreationDate(v time.Time) *DescribeBackupJobOutput { - s.CreationDate = &v - return s -} - -// SetExpectedCompletionDate sets the ExpectedCompletionDate field's value. -func (s *DescribeBackupJobOutput) SetExpectedCompletionDate(v time.Time) *DescribeBackupJobOutput { - s.ExpectedCompletionDate = &v - return s -} - -// SetIamRoleArn sets the IamRoleArn field's value. -func (s *DescribeBackupJobOutput) SetIamRoleArn(v string) *DescribeBackupJobOutput { - s.IamRoleArn = &v - return s -} - -// SetPercentDone sets the PercentDone field's value. -func (s *DescribeBackupJobOutput) SetPercentDone(v string) *DescribeBackupJobOutput { - s.PercentDone = &v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *DescribeBackupJobOutput) SetRecoveryPointArn(v string) *DescribeBackupJobOutput { - s.RecoveryPointArn = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *DescribeBackupJobOutput) SetResourceArn(v string) *DescribeBackupJobOutput { - s.ResourceArn = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *DescribeBackupJobOutput) SetResourceType(v string) *DescribeBackupJobOutput { - s.ResourceType = &v - return s -} - -// SetStartBy sets the StartBy field's value. -func (s *DescribeBackupJobOutput) SetStartBy(v time.Time) *DescribeBackupJobOutput { - s.StartBy = &v - return s -} - -// SetState sets the State field's value. -func (s *DescribeBackupJobOutput) SetState(v string) *DescribeBackupJobOutput { - s.State = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *DescribeBackupJobOutput) SetStatusMessage(v string) *DescribeBackupJobOutput { - s.StatusMessage = &v - return s -} - -type DescribeBackupVaultInput struct { - _ struct{} `type:"structure"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeBackupVaultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBackupVaultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeBackupVaultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeBackupVaultInput"} - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *DescribeBackupVaultInput) SetBackupVaultName(v string) *DescribeBackupVaultInput { - s.BackupVaultName = &v - return s -} - -type DescribeBackupVaultOutput struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. - BackupVaultArn *string `type:"string"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the Region where they are created. They consist of lowercase letters, numbers, - // and hyphens. - BackupVaultName *string `type:"string"` - - // The date and time that a backup vault is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // A unique string that identifies the request and allows failed requests to - // be retried without the risk of executing the operation twice. - CreatorRequestId *string `type:"string"` - - // The server-side encryption key that is used to protect your backups; for - // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. - EncryptionKeyArn *string `type:"string"` - - // The number of recovery points that are stored in a backup vault. - NumberOfRecoveryPoints *int64 `type:"long"` -} - -// String returns the string representation -func (s DescribeBackupVaultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBackupVaultOutput) GoString() string { - return s.String() -} - -// SetBackupVaultArn sets the BackupVaultArn field's value. -func (s *DescribeBackupVaultOutput) SetBackupVaultArn(v string) *DescribeBackupVaultOutput { - s.BackupVaultArn = &v - return s -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *DescribeBackupVaultOutput) SetBackupVaultName(v string) *DescribeBackupVaultOutput { - s.BackupVaultName = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *DescribeBackupVaultOutput) SetCreationDate(v time.Time) *DescribeBackupVaultOutput { - s.CreationDate = &v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *DescribeBackupVaultOutput) SetCreatorRequestId(v string) *DescribeBackupVaultOutput { - s.CreatorRequestId = &v - return s -} - -// SetEncryptionKeyArn sets the EncryptionKeyArn field's value. -func (s *DescribeBackupVaultOutput) SetEncryptionKeyArn(v string) *DescribeBackupVaultOutput { - s.EncryptionKeyArn = &v - return s -} - -// SetNumberOfRecoveryPoints sets the NumberOfRecoveryPoints field's value. -func (s *DescribeBackupVaultOutput) SetNumberOfRecoveryPoints(v int64) *DescribeBackupVaultOutput { - s.NumberOfRecoveryPoints = &v - return s -} - -type DescribeProtectedResourceInput struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format - // of the ARN depends on the resource type. - // - // ResourceArn is a required field - ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeProtectedResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProtectedResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeProtectedResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeProtectedResourceInput"} - 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 *DescribeProtectedResourceInput) SetResourceArn(v string) *DescribeProtectedResourceInput { - s.ResourceArn = &v - return s -} - -type DescribeProtectedResourceOutput struct { - _ struct{} `type:"structure"` - - // The date and time that a resource was last backed up, in Unix format and - // Coordinated Universal Time (UTC). The value of LastBackupTime is accurate - // to milliseconds. For example, the value 1516925490.087 represents Friday, - // January 26, 2018 12:11:30.087 AM. - LastBackupTime *time.Time `type:"timestamp"` - - // An ARN that uniquely identifies a resource. The format of the ARN depends - // on the resource type. - ResourceArn *string `type:"string"` - - // The type of AWS resource saved as a recovery point; for example, an EBS volume - // or an Amazon RDS database. - ResourceType *string `type:"string"` -} - -// String returns the string representation -func (s DescribeProtectedResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProtectedResourceOutput) GoString() string { - return s.String() -} - -// SetLastBackupTime sets the LastBackupTime field's value. -func (s *DescribeProtectedResourceOutput) SetLastBackupTime(v time.Time) *DescribeProtectedResourceOutput { - s.LastBackupTime = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *DescribeProtectedResourceOutput) SetResourceArn(v string) *DescribeProtectedResourceOutput { - s.ResourceArn = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *DescribeProtectedResourceOutput) SetResourceType(v string) *DescribeProtectedResourceOutput { - s.ResourceType = &v - return s -} - -type DescribeRecoveryPointInput struct { - _ struct{} `type:"structure"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` - - // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; - // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - // - // RecoveryPointArn is a required field - RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeRecoveryPointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRecoveryPointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRecoveryPointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRecoveryPointInput"} - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) - } - if s.RecoveryPointArn == nil { - invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn")) - } - if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *DescribeRecoveryPointInput) SetBackupVaultName(v string) *DescribeRecoveryPointInput { - s.BackupVaultName = &v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *DescribeRecoveryPointInput) SetRecoveryPointArn(v string) *DescribeRecoveryPointInput { - s.RecoveryPointArn = &v - return s -} - -type DescribeRecoveryPointOutput struct { - _ struct{} `type:"structure"` - - // The size, in bytes, of a backup. - BackupSizeInBytes *int64 `type:"long"` - - // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. - BackupVaultArn *string `type:"string"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the Region where they are created. They consist of lowercase letters, numbers, - // and hyphens. - BackupVaultName *string `type:"string"` - - // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt - // timestamps. - CalculatedLifecycle *CalculatedLifecycle `type:"structure"` - - // The date and time that a job to create a recovery point is completed, in - // Unix format and Coordinated Universal Time (UTC). The value of CompletionDate - // is accurate to milliseconds. For example, the value 1516925490.087 represents - // Friday, January 26, 2018 12:11:30.087 AM. - CompletionDate *time.Time `type:"timestamp"` - - // Contains identifying information about the creation of a recovery point, - // including the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId - // of the backup plan used to create it. - CreatedBy *RecoveryPointCreator `type:"structure"` - - // The date and time that a recovery point is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // The server-side encryption key used to protect your backups; for example, - // arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. - EncryptionKeyArn *string `type:"string"` - - // Specifies the IAM role ARN used to create the target recovery point; for - // example, arn:aws:iam::123456789012:role/S3Access. - IamRoleArn *string `type:"string"` - - // A Boolean value that is returned as TRUE if the specified recovery point - // is encrypted, or FALSE if the recovery point is not encrypted. - IsEncrypted *bool `type:"boolean"` - - // The date and time that a recovery point was last restored, in Unix format - // and Coordinated Universal Time (UTC). The value of LastRestoreTime is accurate - // to milliseconds. For example, the value 1516925490.087 represents Friday, - // January 26, 2018 12:11:30.087 AM. - LastRestoreTime *time.Time `type:"timestamp"` - - // The lifecycle defines when a protected resource is transitioned to cold storage - // and when it expires. AWS Backup transitions and expires backups automatically - // according to the lifecycle that you define. - // - // Backups that are transitioned to cold storage must be stored in cold storage - // for a minimum of 90 days. Therefore, the “expire after days” setting must - // be 90 days greater than the “transition to cold after days” setting. The - // “transition to cold after days” setting cannot be changed after a backup - // has been transitioned to cold. - Lifecycle *Lifecycle `type:"structure"` - - // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - RecoveryPointArn *string `type:"string"` - - // An ARN that uniquely identifies a saved resource. The format of the ARN depends - // on the resource type. - ResourceArn *string `type:"string"` - - // The type of AWS resource to save as a recovery point; for example, an Amazon - // Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database - // Service (Amazon RDS) database. - ResourceType *string `type:"string"` - - // A status code specifying the state of the recovery point. - // - // A partial status indicates that the recovery point was not successfully re-created - // and must be retried. - Status *string `type:"string" enum:"RecoveryPointStatus"` - - // Specifies the storage class of the recovery point. Valid values are WARM - // or COLD. - StorageClass *string `type:"string" enum:"StorageClass"` -} - -// String returns the string representation -func (s DescribeRecoveryPointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRecoveryPointOutput) GoString() string { - return s.String() -} - -// SetBackupSizeInBytes sets the BackupSizeInBytes field's value. -func (s *DescribeRecoveryPointOutput) SetBackupSizeInBytes(v int64) *DescribeRecoveryPointOutput { - s.BackupSizeInBytes = &v - return s -} - -// SetBackupVaultArn sets the BackupVaultArn field's value. -func (s *DescribeRecoveryPointOutput) SetBackupVaultArn(v string) *DescribeRecoveryPointOutput { - s.BackupVaultArn = &v - return s -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *DescribeRecoveryPointOutput) SetBackupVaultName(v string) *DescribeRecoveryPointOutput { - s.BackupVaultName = &v - return s -} - -// SetCalculatedLifecycle sets the CalculatedLifecycle field's value. -func (s *DescribeRecoveryPointOutput) SetCalculatedLifecycle(v *CalculatedLifecycle) *DescribeRecoveryPointOutput { - s.CalculatedLifecycle = v - return s -} - -// SetCompletionDate sets the CompletionDate field's value. -func (s *DescribeRecoveryPointOutput) SetCompletionDate(v time.Time) *DescribeRecoveryPointOutput { - s.CompletionDate = &v - return s -} - -// SetCreatedBy sets the CreatedBy field's value. -func (s *DescribeRecoveryPointOutput) SetCreatedBy(v *RecoveryPointCreator) *DescribeRecoveryPointOutput { - s.CreatedBy = v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *DescribeRecoveryPointOutput) SetCreationDate(v time.Time) *DescribeRecoveryPointOutput { - s.CreationDate = &v - return s -} - -// SetEncryptionKeyArn sets the EncryptionKeyArn field's value. -func (s *DescribeRecoveryPointOutput) SetEncryptionKeyArn(v string) *DescribeRecoveryPointOutput { - s.EncryptionKeyArn = &v - return s -} - -// SetIamRoleArn sets the IamRoleArn field's value. -func (s *DescribeRecoveryPointOutput) SetIamRoleArn(v string) *DescribeRecoveryPointOutput { - s.IamRoleArn = &v - return s -} - -// SetIsEncrypted sets the IsEncrypted field's value. -func (s *DescribeRecoveryPointOutput) SetIsEncrypted(v bool) *DescribeRecoveryPointOutput { - s.IsEncrypted = &v - return s -} - -// SetLastRestoreTime sets the LastRestoreTime field's value. -func (s *DescribeRecoveryPointOutput) SetLastRestoreTime(v time.Time) *DescribeRecoveryPointOutput { - s.LastRestoreTime = &v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *DescribeRecoveryPointOutput) SetLifecycle(v *Lifecycle) *DescribeRecoveryPointOutput { - s.Lifecycle = v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *DescribeRecoveryPointOutput) SetRecoveryPointArn(v string) *DescribeRecoveryPointOutput { - s.RecoveryPointArn = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *DescribeRecoveryPointOutput) SetResourceArn(v string) *DescribeRecoveryPointOutput { - s.ResourceArn = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *DescribeRecoveryPointOutput) SetResourceType(v string) *DescribeRecoveryPointOutput { - s.ResourceType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeRecoveryPointOutput) SetStatus(v string) *DescribeRecoveryPointOutput { - s.Status = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *DescribeRecoveryPointOutput) SetStorageClass(v string) *DescribeRecoveryPointOutput { - s.StorageClass = &v - return s -} - -type DescribeRestoreJobInput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies the job that restores a recovery point. - // - // RestoreJobId is a required field - RestoreJobId *string `location:"uri" locationName:"restoreJobId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeRestoreJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRestoreJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRestoreJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRestoreJobInput"} - if s.RestoreJobId == nil { - invalidParams.Add(request.NewErrParamRequired("RestoreJobId")) - } - if s.RestoreJobId != nil && len(*s.RestoreJobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RestoreJobId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRestoreJobId sets the RestoreJobId field's value. -func (s *DescribeRestoreJobInput) SetRestoreJobId(v string) *DescribeRestoreJobInput { - s.RestoreJobId = &v - return s -} - -type DescribeRestoreJobOutput struct { - _ struct{} `type:"structure"` - - // The size, in bytes, of the restored resource. - BackupSizeInBytes *int64 `type:"long"` - - // The date and time that a job to restore a recovery point is completed, in - // Unix format and Coordinated Universal Time (UTC). The value of CompletionDate - // is accurate to milliseconds. For example, the value 1516925490.087 represents - // Friday, January 26, 2018 12:11:30.087 AM. - CompletionDate *time.Time `type:"timestamp"` - - // An Amazon Resource Name (ARN) that uniquely identifies a resource whose recovery - // point is being restored. The format of the ARN depends on the resource type - // of the backed-up resource. - CreatedResourceArn *string `type:"string"` - - // The date and time that a restore job is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // The amount of time in minutes that a job restoring a recovery point is expected - // to take. - ExpectedCompletionTimeMinutes *int64 `type:"long"` - - // Specifies the IAM role ARN used to create the target recovery point; for - // example, arn:aws:iam::123456789012:role/S3Access. - IamRoleArn *string `type:"string"` - - // Contains an estimated percentage that is complete of a job at the time the - // job status was queried. - PercentDone *string `type:"string"` - - // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - RecoveryPointArn *string `type:"string"` - - // Uniquely identifies the job that restores a recovery point. - RestoreJobId *string `type:"string"` - - // Status code specifying the state of the job that is initiated by AWS Backup - // to restore a recovery point. - Status *string `type:"string" enum:"RestoreJobStatus"` - - // A detailed message explaining the status of a job to restore a recovery point. - StatusMessage *string `type:"string"` -} - -// String returns the string representation -func (s DescribeRestoreJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRestoreJobOutput) GoString() string { - return s.String() -} - -// SetBackupSizeInBytes sets the BackupSizeInBytes field's value. -func (s *DescribeRestoreJobOutput) SetBackupSizeInBytes(v int64) *DescribeRestoreJobOutput { - s.BackupSizeInBytes = &v - return s -} - -// SetCompletionDate sets the CompletionDate field's value. -func (s *DescribeRestoreJobOutput) SetCompletionDate(v time.Time) *DescribeRestoreJobOutput { - s.CompletionDate = &v - return s -} - -// SetCreatedResourceArn sets the CreatedResourceArn field's value. -func (s *DescribeRestoreJobOutput) SetCreatedResourceArn(v string) *DescribeRestoreJobOutput { - s.CreatedResourceArn = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *DescribeRestoreJobOutput) SetCreationDate(v time.Time) *DescribeRestoreJobOutput { - s.CreationDate = &v - return s -} - -// SetExpectedCompletionTimeMinutes sets the ExpectedCompletionTimeMinutes field's value. -func (s *DescribeRestoreJobOutput) SetExpectedCompletionTimeMinutes(v int64) *DescribeRestoreJobOutput { - s.ExpectedCompletionTimeMinutes = &v - return s -} - -// SetIamRoleArn sets the IamRoleArn field's value. -func (s *DescribeRestoreJobOutput) SetIamRoleArn(v string) *DescribeRestoreJobOutput { - s.IamRoleArn = &v - return s -} - -// SetPercentDone sets the PercentDone field's value. -func (s *DescribeRestoreJobOutput) SetPercentDone(v string) *DescribeRestoreJobOutput { - s.PercentDone = &v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *DescribeRestoreJobOutput) SetRecoveryPointArn(v string) *DescribeRestoreJobOutput { - s.RecoveryPointArn = &v - return s -} - -// SetRestoreJobId sets the RestoreJobId field's value. -func (s *DescribeRestoreJobOutput) SetRestoreJobId(v string) *DescribeRestoreJobOutput { - s.RestoreJobId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeRestoreJobOutput) SetStatus(v string) *DescribeRestoreJobOutput { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *DescribeRestoreJobOutput) SetStatusMessage(v string) *DescribeRestoreJobOutput { - s.StatusMessage = &v - return s -} - -type ExportBackupPlanTemplateInput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a backup plan. - // - // BackupPlanId is a required field - BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` -} - -// String returns the string representation -func (s ExportBackupPlanTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportBackupPlanTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExportBackupPlanTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExportBackupPlanTemplateInput"} - if s.BackupPlanId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) - } - if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *ExportBackupPlanTemplateInput) SetBackupPlanId(v string) *ExportBackupPlanTemplateInput { - s.BackupPlanId = &v - return s -} - -type ExportBackupPlanTemplateOutput struct { - _ struct{} `type:"structure"` - - // The body of a backup plan template in JSON format. - // - // This is a signed JSON document that cannot be modified before being passed - // to GetBackupPlanFromJSON. - BackupPlanTemplateJson *string `type:"string"` -} - -// String returns the string representation -func (s ExportBackupPlanTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportBackupPlanTemplateOutput) GoString() string { - return s.String() -} - -// SetBackupPlanTemplateJson sets the BackupPlanTemplateJson field's value. -func (s *ExportBackupPlanTemplateOutput) SetBackupPlanTemplateJson(v string) *ExportBackupPlanTemplateOutput { - s.BackupPlanTemplateJson = &v - return s -} - -type GetBackupPlanFromJSONInput struct { - _ struct{} `type:"structure"` - - // A customer-supplied backup plan document in JSON format. - // - // BackupPlanTemplateJson is a required field - BackupPlanTemplateJson *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetBackupPlanFromJSONInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBackupPlanFromJSONInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBackupPlanFromJSONInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBackupPlanFromJSONInput"} - if s.BackupPlanTemplateJson == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPlanTemplateJson")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupPlanTemplateJson sets the BackupPlanTemplateJson field's value. -func (s *GetBackupPlanFromJSONInput) SetBackupPlanTemplateJson(v string) *GetBackupPlanFromJSONInput { - s.BackupPlanTemplateJson = &v - return s -} - -type GetBackupPlanFromJSONOutput struct { - _ struct{} `type:"structure"` - - // Specifies the body of a backup plan. Includes a BackupPlanName and one or - // more sets of Rules. - BackupPlan *Plan `type:"structure"` -} - -// String returns the string representation -func (s GetBackupPlanFromJSONOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBackupPlanFromJSONOutput) GoString() string { - return s.String() -} - -// SetBackupPlan sets the BackupPlan field's value. -func (s *GetBackupPlanFromJSONOutput) SetBackupPlan(v *Plan) *GetBackupPlanFromJSONOutput { - s.BackupPlan = v - return s -} - -type GetBackupPlanFromTemplateInput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a stored backup plan template. - // - // BackupPlanTemplateId is a required field - BackupPlanTemplateId *string `location:"uri" locationName:"templateId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetBackupPlanFromTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBackupPlanFromTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBackupPlanFromTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBackupPlanFromTemplateInput"} - if s.BackupPlanTemplateId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPlanTemplateId")) - } - if s.BackupPlanTemplateId != nil && len(*s.BackupPlanTemplateId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupPlanTemplateId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupPlanTemplateId sets the BackupPlanTemplateId field's value. -func (s *GetBackupPlanFromTemplateInput) SetBackupPlanTemplateId(v string) *GetBackupPlanFromTemplateInput { - s.BackupPlanTemplateId = &v - return s -} - -type GetBackupPlanFromTemplateOutput struct { - _ struct{} `type:"structure"` - - // Returns the body of a backup plan based on the target template, including - // the name, rules, and backup vault of the plan. - BackupPlanDocument *Plan `type:"structure"` -} - -// String returns the string representation -func (s GetBackupPlanFromTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBackupPlanFromTemplateOutput) GoString() string { - return s.String() -} - -// SetBackupPlanDocument sets the BackupPlanDocument field's value. -func (s *GetBackupPlanFromTemplateOutput) SetBackupPlanDocument(v *Plan) *GetBackupPlanFromTemplateOutput { - s.BackupPlanDocument = v - return s -} - -type GetBackupPlanInput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a backup plan. - // - // BackupPlanId is a required field - BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` - - // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most - // 1,024 bytes long. Version IDs cannot be edited. - VersionId *string `location:"querystring" locationName:"versionId" type:"string"` -} - -// String returns the string representation -func (s GetBackupPlanInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBackupPlanInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBackupPlanInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBackupPlanInput"} - if s.BackupPlanId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) - } - if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *GetBackupPlanInput) SetBackupPlanId(v string) *GetBackupPlanInput { - s.BackupPlanId = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetBackupPlanInput) SetVersionId(v string) *GetBackupPlanInput { - s.VersionId = &v - return s -} - -type GetBackupPlanOutput struct { - _ struct{} `type:"structure"` - - // Specifies the body of a backup plan. Includes a BackupPlanName and one or - // more sets of Rules. - BackupPlan *Plan `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for - // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50. - BackupPlanArn *string `type:"string"` - - // Uniquely identifies a backup plan. - BackupPlanId *string `type:"string"` - - // The date and time that a backup plan is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // A unique string that identifies the request and allows failed requests to - // be retried without the risk of executing the operation twice. - CreatorRequestId *string `type:"string"` - - // The date and time that a backup plan is deleted, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - DeletionDate *time.Time `type:"timestamp"` - - // The last time a job to back up resources was executed with this backup plan. - // A date and time, in Unix format and Coordinated Universal Time (UTC). The - // value of LastExecutionDate is accurate to milliseconds. For example, the - // value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. - LastExecutionDate *time.Time `type:"timestamp"` - - // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most - // 1,024 bytes long. Version IDs cannot be edited. - VersionId *string `type:"string"` -} - -// String returns the string representation -func (s GetBackupPlanOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBackupPlanOutput) GoString() string { - return s.String() -} - -// SetBackupPlan sets the BackupPlan field's value. -func (s *GetBackupPlanOutput) SetBackupPlan(v *Plan) *GetBackupPlanOutput { - s.BackupPlan = v - return s -} - -// SetBackupPlanArn sets the BackupPlanArn field's value. -func (s *GetBackupPlanOutput) SetBackupPlanArn(v string) *GetBackupPlanOutput { - s.BackupPlanArn = &v - return s -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *GetBackupPlanOutput) SetBackupPlanId(v string) *GetBackupPlanOutput { - s.BackupPlanId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *GetBackupPlanOutput) SetCreationDate(v time.Time) *GetBackupPlanOutput { - s.CreationDate = &v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *GetBackupPlanOutput) SetCreatorRequestId(v string) *GetBackupPlanOutput { - s.CreatorRequestId = &v - return s -} - -// SetDeletionDate sets the DeletionDate field's value. -func (s *GetBackupPlanOutput) SetDeletionDate(v time.Time) *GetBackupPlanOutput { - s.DeletionDate = &v - return s -} - -// SetLastExecutionDate sets the LastExecutionDate field's value. -func (s *GetBackupPlanOutput) SetLastExecutionDate(v time.Time) *GetBackupPlanOutput { - s.LastExecutionDate = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetBackupPlanOutput) SetVersionId(v string) *GetBackupPlanOutput { - s.VersionId = &v - return s -} - -type GetBackupSelectionInput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a backup plan. - // - // BackupPlanId is a required field - BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` - - // Uniquely identifies the body of a request to assign a set of resources to - // a backup plan. - // - // SelectionId is a required field - SelectionId *string `location:"uri" locationName:"selectionId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetBackupSelectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBackupSelectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBackupSelectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBackupSelectionInput"} - if s.BackupPlanId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) - } - if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) - } - if s.SelectionId == nil { - invalidParams.Add(request.NewErrParamRequired("SelectionId")) - } - if s.SelectionId != nil && len(*s.SelectionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SelectionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *GetBackupSelectionInput) SetBackupPlanId(v string) *GetBackupSelectionInput { - s.BackupPlanId = &v - return s -} - -// SetSelectionId sets the SelectionId field's value. -func (s *GetBackupSelectionInput) SetSelectionId(v string) *GetBackupSelectionInput { - s.SelectionId = &v - return s -} - -type GetBackupSelectionOutput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a backup plan. - BackupPlanId *string `type:"string"` - - // Specifies the body of a request to assign a set of resources to a backup - // plan. - // - // It includes an array of resources, an optional array of patterns to exclude - // resources, an optional role to provide access to the AWS service that the - // resource belongs to, and an optional array of tags used to identify a set - // of resources. - BackupSelection *Selection `type:"structure"` - - // The date and time a backup selection is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // A unique string that identifies the request and allows failed requests to - // be retried without the risk of executing the operation twice. - CreatorRequestId *string `type:"string"` - - // Uniquely identifies the body of a request to assign a set of resources to - // a backup plan. - SelectionId *string `type:"string"` -} - -// String returns the string representation -func (s GetBackupSelectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBackupSelectionOutput) GoString() string { - return s.String() -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *GetBackupSelectionOutput) SetBackupPlanId(v string) *GetBackupSelectionOutput { - s.BackupPlanId = &v - return s -} - -// SetBackupSelection sets the BackupSelection field's value. -func (s *GetBackupSelectionOutput) SetBackupSelection(v *Selection) *GetBackupSelectionOutput { - s.BackupSelection = v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *GetBackupSelectionOutput) SetCreationDate(v time.Time) *GetBackupSelectionOutput { - s.CreationDate = &v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *GetBackupSelectionOutput) SetCreatorRequestId(v string) *GetBackupSelectionOutput { - s.CreatorRequestId = &v - return s -} - -// SetSelectionId sets the SelectionId field's value. -func (s *GetBackupSelectionOutput) SetSelectionId(v string) *GetBackupSelectionOutput { - s.SelectionId = &v - return s -} - -type GetBackupVaultAccessPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetBackupVaultAccessPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBackupVaultAccessPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBackupVaultAccessPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBackupVaultAccessPolicyInput"} - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *GetBackupVaultAccessPolicyInput) SetBackupVaultName(v string) *GetBackupVaultAccessPolicyInput { - s.BackupVaultName = &v - return s -} - -type GetBackupVaultAccessPolicyOutput struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. - BackupVaultArn *string `type:"string"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the Region where they are created. They consist of lowercase letters, numbers, - // and hyphens. - BackupVaultName *string `type:"string"` - - // The backup vault access policy document in JSON format. - Policy *string `type:"string"` -} - -// String returns the string representation -func (s GetBackupVaultAccessPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBackupVaultAccessPolicyOutput) GoString() string { - return s.String() -} - -// SetBackupVaultArn sets the BackupVaultArn field's value. -func (s *GetBackupVaultAccessPolicyOutput) SetBackupVaultArn(v string) *GetBackupVaultAccessPolicyOutput { - s.BackupVaultArn = &v - return s -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *GetBackupVaultAccessPolicyOutput) SetBackupVaultName(v string) *GetBackupVaultAccessPolicyOutput { - s.BackupVaultName = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *GetBackupVaultAccessPolicyOutput) SetPolicy(v string) *GetBackupVaultAccessPolicyOutput { - s.Policy = &v - return s -} - -type GetBackupVaultNotificationsInput struct { - _ struct{} `type:"structure"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetBackupVaultNotificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBackupVaultNotificationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBackupVaultNotificationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBackupVaultNotificationsInput"} - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *GetBackupVaultNotificationsInput) SetBackupVaultName(v string) *GetBackupVaultNotificationsInput { - s.BackupVaultName = &v - return s -} - -type GetBackupVaultNotificationsOutput struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. - BackupVaultArn *string `type:"string"` - - // An array of events that indicate the status of jobs to back up resources - // to the backup vault. - BackupVaultEvents []*string `type:"list"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the Region where they are created. They consist of lowercase letters, numbers, - // and hyphens. - BackupVaultName *string `type:"string"` - - // An ARN that uniquely identifies an Amazon Simple Notification Service (Amazon - // SNS) topic; for example, arn:aws:sns:us-west-2:111122223333:MyTopic. - SNSTopicArn *string `type:"string"` -} - -// String returns the string representation -func (s GetBackupVaultNotificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBackupVaultNotificationsOutput) GoString() string { - return s.String() -} - -// SetBackupVaultArn sets the BackupVaultArn field's value. -func (s *GetBackupVaultNotificationsOutput) SetBackupVaultArn(v string) *GetBackupVaultNotificationsOutput { - s.BackupVaultArn = &v - return s -} - -// SetBackupVaultEvents sets the BackupVaultEvents field's value. -func (s *GetBackupVaultNotificationsOutput) SetBackupVaultEvents(v []*string) *GetBackupVaultNotificationsOutput { - s.BackupVaultEvents = v - return s -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *GetBackupVaultNotificationsOutput) SetBackupVaultName(v string) *GetBackupVaultNotificationsOutput { - s.BackupVaultName = &v - return s -} - -// SetSNSTopicArn sets the SNSTopicArn field's value. -func (s *GetBackupVaultNotificationsOutput) SetSNSTopicArn(v string) *GetBackupVaultNotificationsOutput { - s.SNSTopicArn = &v - return s -} - -type GetRecoveryPointRestoreMetadataInput struct { - _ struct{} `type:"structure"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` - - // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; - // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - // - // RecoveryPointArn is a required field - RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRecoveryPointRestoreMetadataInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRecoveryPointRestoreMetadataInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRecoveryPointRestoreMetadataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRecoveryPointRestoreMetadataInput"} - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) - } - if s.RecoveryPointArn == nil { - invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn")) - } - if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *GetRecoveryPointRestoreMetadataInput) SetBackupVaultName(v string) *GetRecoveryPointRestoreMetadataInput { - s.BackupVaultName = &v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *GetRecoveryPointRestoreMetadataInput) SetRecoveryPointArn(v string) *GetRecoveryPointRestoreMetadataInput { - s.RecoveryPointArn = &v - return s -} - -type GetRecoveryPointRestoreMetadataOutput struct { - _ struct{} `type:"structure"` - - // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. - BackupVaultArn *string `type:"string"` - - // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - RecoveryPointArn *string `type:"string"` - - // A set of metadata key-value pairs that lists the metadata key-value pairs - // that are required to restore the recovery point. - RestoreMetadata map[string]*string `type:"map"` -} - -// String returns the string representation -func (s GetRecoveryPointRestoreMetadataOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRecoveryPointRestoreMetadataOutput) GoString() string { - return s.String() -} - -// SetBackupVaultArn sets the BackupVaultArn field's value. -func (s *GetRecoveryPointRestoreMetadataOutput) SetBackupVaultArn(v string) *GetRecoveryPointRestoreMetadataOutput { - s.BackupVaultArn = &v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *GetRecoveryPointRestoreMetadataOutput) SetRecoveryPointArn(v string) *GetRecoveryPointRestoreMetadataOutput { - s.RecoveryPointArn = &v - return s -} - -// SetRestoreMetadata sets the RestoreMetadata field's value. -func (s *GetRecoveryPointRestoreMetadataOutput) SetRestoreMetadata(v map[string]*string) *GetRecoveryPointRestoreMetadataOutput { - s.RestoreMetadata = v - return s -} - -type GetSupportedResourceTypesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetSupportedResourceTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSupportedResourceTypesInput) GoString() string { - return s.String() -} - -type GetSupportedResourceTypesOutput struct { - _ struct{} `type:"structure"` - - // Contains a string with the supported AWS resource types: - // - // * EBS for Amazon Elastic Block Store - // - // * SGW for AWS Storage Gateway - // - // * RDS for Amazon Relational Database Service - // - // * DDB for Amazon DynamoDB - // - // * EFS for Amazon Elastic File System - ResourceTypes []*string `type:"list"` -} - -// String returns the string representation -func (s GetSupportedResourceTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSupportedResourceTypesOutput) GoString() string { - return s.String() -} - -// SetResourceTypes sets the ResourceTypes field's value. -func (s *GetSupportedResourceTypesOutput) SetResourceTypes(v []*string) *GetSupportedResourceTypesOutput { - s.ResourceTypes = v - return s -} - -// Contains detailed information about a backup job. -type Job struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a request to AWS Backup to back up a resource. - BackupJobId *string `type:"string"` - - // The size, in bytes, of a backup. - BackupSizeInBytes *int64 `type:"long"` - - // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. - BackupVaultArn *string `type:"string"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - BackupVaultName *string `type:"string"` - - // The size in bytes transferred to a backup vault at the time that the job - // status was queried. - BytesTransferred *int64 `type:"long"` - - // The date and time a job to create a backup job is completed, in Unix format - // and Coordinated Universal Time (UTC). The value of CompletionDate is accurate - // to milliseconds. For example, the value 1516925490.087 represents Friday, - // January 26, 2018 12:11:30.087 AM. - CompletionDate *time.Time `type:"timestamp"` - - // Contains identifying information about the creation of a backup job, including - // the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId of the - // backup plan used to create it. - CreatedBy *RecoveryPointCreator `type:"structure"` - - // The date and time a backup job is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // The date and time a job to back up resources is expected to be completed, - // in Unix format and Coordinated Universal Time (UTC). The value of ExpectedCompletionDate - // is accurate to milliseconds. For example, the value 1516925490.087 represents - // Friday, January 26, 2018 12:11:30.087 AM. - ExpectedCompletionDate *time.Time `type:"timestamp"` - - // Specifies the IAM role ARN used to create the target recovery point; for - // example, arn:aws:iam::123456789012:role/S3Access. - IamRoleArn *string `type:"string"` - - // Contains an estimated percentage complete of a job at the time the job status - // was queried. - PercentDone *string `type:"string"` - - // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - RecoveryPointArn *string `type:"string"` - - // An ARN that uniquely identifies a resource. The format of the ARN depends - // on the resource type. - ResourceArn *string `type:"string"` - - // The type of AWS resource to be backed-up; for example, an Amazon Elastic - // Block Store (Amazon EBS) volume or an Amazon Relational Database Service - // (Amazon RDS) database. - ResourceType *string `type:"string"` - - // Specifies the time in Unix format and Coordinated Universal Time (UTC) when - // a backup job must be started before it is canceled. The value is calculated - // by adding the start window to the scheduled time. So if the scheduled time - // were 6:00 PM and the start window is 2 hours, the StartBy time would be 8:00 - // PM on the date specified. The value of StartBy is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - StartBy *time.Time `type:"timestamp"` - - // The current state of a resource recovery point. - State *string `type:"string" enum:"JobState"` - - // A detailed message explaining the status of the job to back up a resource. - StatusMessage *string `type:"string"` -} - -// String returns the string representation -func (s Job) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Job) GoString() string { - return s.String() -} - -// SetBackupJobId sets the BackupJobId field's value. -func (s *Job) SetBackupJobId(v string) *Job { - s.BackupJobId = &v - return s -} - -// SetBackupSizeInBytes sets the BackupSizeInBytes field's value. -func (s *Job) SetBackupSizeInBytes(v int64) *Job { - s.BackupSizeInBytes = &v - return s -} - -// SetBackupVaultArn sets the BackupVaultArn field's value. -func (s *Job) SetBackupVaultArn(v string) *Job { - s.BackupVaultArn = &v - return s -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *Job) SetBackupVaultName(v string) *Job { - s.BackupVaultName = &v - return s -} - -// SetBytesTransferred sets the BytesTransferred field's value. -func (s *Job) SetBytesTransferred(v int64) *Job { - s.BytesTransferred = &v - return s -} - -// SetCompletionDate sets the CompletionDate field's value. -func (s *Job) SetCompletionDate(v time.Time) *Job { - s.CompletionDate = &v - return s -} - -// SetCreatedBy sets the CreatedBy field's value. -func (s *Job) SetCreatedBy(v *RecoveryPointCreator) *Job { - s.CreatedBy = v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *Job) SetCreationDate(v time.Time) *Job { - s.CreationDate = &v - return s -} - -// SetExpectedCompletionDate sets the ExpectedCompletionDate field's value. -func (s *Job) SetExpectedCompletionDate(v time.Time) *Job { - s.ExpectedCompletionDate = &v - return s -} - -// SetIamRoleArn sets the IamRoleArn field's value. -func (s *Job) SetIamRoleArn(v string) *Job { - s.IamRoleArn = &v - return s -} - -// SetPercentDone sets the PercentDone field's value. -func (s *Job) SetPercentDone(v string) *Job { - s.PercentDone = &v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *Job) SetRecoveryPointArn(v string) *Job { - s.RecoveryPointArn = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *Job) SetResourceArn(v string) *Job { - s.ResourceArn = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *Job) SetResourceType(v string) *Job { - s.ResourceType = &v - return s -} - -// SetStartBy sets the StartBy field's value. -func (s *Job) SetStartBy(v time.Time) *Job { - s.StartBy = &v - return s -} - -// SetState sets the State field's value. -func (s *Job) SetState(v string) *Job { - s.State = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *Job) SetStatusMessage(v string) *Job { - s.StatusMessage = &v - return s -} - -// Contains an array of Transition objects specifying how long in days before -// a recovery point transitions to cold storage or is deleted. -type Lifecycle struct { - _ struct{} `type:"structure"` - - // Specifies the number of days after creation that a recovery point is deleted. - // Must be greater than MoveToColdStorageAfterDays. - DeleteAfterDays *int64 `type:"long"` - - // Specifies the number of days after creation that a recovery point is moved - // to cold storage. - MoveToColdStorageAfterDays *int64 `type:"long"` -} - -// String returns the string representation -func (s Lifecycle) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Lifecycle) GoString() string { - return s.String() -} - -// SetDeleteAfterDays sets the DeleteAfterDays field's value. -func (s *Lifecycle) SetDeleteAfterDays(v int64) *Lifecycle { - s.DeleteAfterDays = &v - return s -} - -// SetMoveToColdStorageAfterDays sets the MoveToColdStorageAfterDays field's value. -func (s *Lifecycle) SetMoveToColdStorageAfterDays(v int64) *Lifecycle { - s.MoveToColdStorageAfterDays = &v - return s -} - -type ListBackupJobsInput struct { - _ struct{} `type:"structure"` - - // Returns only backup jobs that will be stored in the specified backup vault. - // Backup vaults are identified by names that are unique to the account used - // to create them and the AWS Region where they are created. They consist of - // lowercase letters, numbers, and hyphens. - ByBackupVaultName *string `location:"querystring" locationName:"backupVaultName" type:"string"` - - // Returns only backup jobs that were created after the specified date. - ByCreatedAfter *time.Time `location:"querystring" locationName:"createdAfter" type:"timestamp"` - - // Returns only backup jobs that were created before the specified date. - ByCreatedBefore *time.Time `location:"querystring" locationName:"createdBefore" type:"timestamp"` - - // Returns only backup jobs that match the specified resource Amazon Resource - // Name (ARN). - ByResourceArn *string `location:"querystring" locationName:"resourceArn" type:"string"` - - // Returns only backup jobs for the specified resources: - // - // * EBS for Amazon Elastic Block Store - // - // * SGW for AWS Storage Gateway - // - // * RDS for Amazon Relational Database Service - // - // * DDB for Amazon DynamoDB - // - // * EFS for Amazon Elastic File System - ByResourceType *string `location:"querystring" locationName:"resourceType" type:"string"` - - // Returns only backup jobs that are in the specified state. - ByState *string `location:"querystring" locationName:"state" type:"string" enum:"JobState"` - - // The maximum number of items to be returned. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListBackupJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBackupJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBackupJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBackupJobsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetByBackupVaultName sets the ByBackupVaultName field's value. -func (s *ListBackupJobsInput) SetByBackupVaultName(v string) *ListBackupJobsInput { - s.ByBackupVaultName = &v - return s -} - -// SetByCreatedAfter sets the ByCreatedAfter field's value. -func (s *ListBackupJobsInput) SetByCreatedAfter(v time.Time) *ListBackupJobsInput { - s.ByCreatedAfter = &v - return s -} - -// SetByCreatedBefore sets the ByCreatedBefore field's value. -func (s *ListBackupJobsInput) SetByCreatedBefore(v time.Time) *ListBackupJobsInput { - s.ByCreatedBefore = &v - return s -} - -// SetByResourceArn sets the ByResourceArn field's value. -func (s *ListBackupJobsInput) SetByResourceArn(v string) *ListBackupJobsInput { - s.ByResourceArn = &v - return s -} - -// SetByResourceType sets the ByResourceType field's value. -func (s *ListBackupJobsInput) SetByResourceType(v string) *ListBackupJobsInput { - s.ByResourceType = &v - return s -} - -// SetByState sets the ByState field's value. -func (s *ListBackupJobsInput) SetByState(v string) *ListBackupJobsInput { - s.ByState = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListBackupJobsInput) SetMaxResults(v int64) *ListBackupJobsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBackupJobsInput) SetNextToken(v string) *ListBackupJobsInput { - s.NextToken = &v - return s -} - -type ListBackupJobsOutput struct { - _ struct{} `type:"structure"` - - // An array of structures containing metadata about your backup jobs returned - // in JSON format. - BackupJobs []*Job `type:"list"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListBackupJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBackupJobsOutput) GoString() string { - return s.String() -} - -// SetBackupJobs sets the BackupJobs field's value. -func (s *ListBackupJobsOutput) SetBackupJobs(v []*Job) *ListBackupJobsOutput { - s.BackupJobs = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBackupJobsOutput) SetNextToken(v string) *ListBackupJobsOutput { - s.NextToken = &v - return s -} - -type ListBackupPlanTemplatesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to be returned. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListBackupPlanTemplatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBackupPlanTemplatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBackupPlanTemplatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBackupPlanTemplatesInput"} - 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 *ListBackupPlanTemplatesInput) SetMaxResults(v int64) *ListBackupPlanTemplatesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBackupPlanTemplatesInput) SetNextToken(v string) *ListBackupPlanTemplatesInput { - s.NextToken = &v - return s -} - -type ListBackupPlanTemplatesOutput struct { - _ struct{} `type:"structure"` - - // An array of template list items containing metadata about your saved templates. - BackupPlanTemplatesList []*PlanTemplatesListMember `type:"list"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListBackupPlanTemplatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBackupPlanTemplatesOutput) GoString() string { - return s.String() -} - -// SetBackupPlanTemplatesList sets the BackupPlanTemplatesList field's value. -func (s *ListBackupPlanTemplatesOutput) SetBackupPlanTemplatesList(v []*PlanTemplatesListMember) *ListBackupPlanTemplatesOutput { - s.BackupPlanTemplatesList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBackupPlanTemplatesOutput) SetNextToken(v string) *ListBackupPlanTemplatesOutput { - s.NextToken = &v - return s -} - -type ListBackupPlanVersionsInput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a backup plan. - // - // BackupPlanId is a required field - BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` - - // The maximum number of items to be returned. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListBackupPlanVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBackupPlanVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBackupPlanVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBackupPlanVersionsInput"} - if s.BackupPlanId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) - } - if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *ListBackupPlanVersionsInput) SetBackupPlanId(v string) *ListBackupPlanVersionsInput { - s.BackupPlanId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListBackupPlanVersionsInput) SetMaxResults(v int64) *ListBackupPlanVersionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBackupPlanVersionsInput) SetNextToken(v string) *ListBackupPlanVersionsInput { - s.NextToken = &v - return s -} - -type ListBackupPlanVersionsOutput struct { - _ struct{} `type:"structure"` - - // An array of version list items containing metadata about your backup plans. - BackupPlanVersionsList []*PlansListMember `type:"list"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListBackupPlanVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBackupPlanVersionsOutput) GoString() string { - return s.String() -} - -// SetBackupPlanVersionsList sets the BackupPlanVersionsList field's value. -func (s *ListBackupPlanVersionsOutput) SetBackupPlanVersionsList(v []*PlansListMember) *ListBackupPlanVersionsOutput { - s.BackupPlanVersionsList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBackupPlanVersionsOutput) SetNextToken(v string) *ListBackupPlanVersionsOutput { - s.NextToken = &v - return s -} - -type ListBackupPlansInput struct { - _ struct{} `type:"structure"` - - // A Boolean value with a default value of FALSE that returns deleted backup - // plans when set to TRUE. - IncludeDeleted *bool `location:"querystring" locationName:"includeDeleted" type:"boolean"` - - // The maximum number of items to be returned. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListBackupPlansInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBackupPlansInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBackupPlansInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBackupPlansInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIncludeDeleted sets the IncludeDeleted field's value. -func (s *ListBackupPlansInput) SetIncludeDeleted(v bool) *ListBackupPlansInput { - s.IncludeDeleted = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListBackupPlansInput) SetMaxResults(v int64) *ListBackupPlansInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBackupPlansInput) SetNextToken(v string) *ListBackupPlansInput { - s.NextToken = &v - return s -} - -type ListBackupPlansOutput struct { - _ struct{} `type:"structure"` - - // An array of backup plan list items containing metadata about your saved backup - // plans. - BackupPlansList []*PlansListMember `type:"list"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListBackupPlansOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBackupPlansOutput) GoString() string { - return s.String() -} - -// SetBackupPlansList sets the BackupPlansList field's value. -func (s *ListBackupPlansOutput) SetBackupPlansList(v []*PlansListMember) *ListBackupPlansOutput { - s.BackupPlansList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBackupPlansOutput) SetNextToken(v string) *ListBackupPlansOutput { - s.NextToken = &v - return s -} - -type ListBackupSelectionsInput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a backup plan. - // - // BackupPlanId is a required field - BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` - - // The maximum number of items to be returned. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListBackupSelectionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBackupSelectionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBackupSelectionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBackupSelectionsInput"} - if s.BackupPlanId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) - } - if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *ListBackupSelectionsInput) SetBackupPlanId(v string) *ListBackupSelectionsInput { - s.BackupPlanId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListBackupSelectionsInput) SetMaxResults(v int64) *ListBackupSelectionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBackupSelectionsInput) SetNextToken(v string) *ListBackupSelectionsInput { - s.NextToken = &v - return s -} - -type ListBackupSelectionsOutput struct { - _ struct{} `type:"structure"` - - // An array of backup selection list items containing metadata about each resource - // in the list. - BackupSelectionsList []*SelectionsListMember `type:"list"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListBackupSelectionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBackupSelectionsOutput) GoString() string { - return s.String() -} - -// SetBackupSelectionsList sets the BackupSelectionsList field's value. -func (s *ListBackupSelectionsOutput) SetBackupSelectionsList(v []*SelectionsListMember) *ListBackupSelectionsOutput { - s.BackupSelectionsList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBackupSelectionsOutput) SetNextToken(v string) *ListBackupSelectionsOutput { - s.NextToken = &v - return s -} - -type ListBackupVaultsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to be returned. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListBackupVaultsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBackupVaultsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBackupVaultsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBackupVaultsInput"} - 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 *ListBackupVaultsInput) SetMaxResults(v int64) *ListBackupVaultsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBackupVaultsInput) SetNextToken(v string) *ListBackupVaultsInput { - s.NextToken = &v - return s -} - -type ListBackupVaultsOutput struct { - _ struct{} `type:"structure"` - - // An array of backup vault list members containing vault metadata, including - // Amazon Resource Name (ARN), display name, creation date, number of saved - // recovery points, and encryption information if the resources saved in the - // backup vault are encrypted. - BackupVaultList []*VaultListMember `type:"list"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListBackupVaultsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBackupVaultsOutput) GoString() string { - return s.String() -} - -// SetBackupVaultList sets the BackupVaultList field's value. -func (s *ListBackupVaultsOutput) SetBackupVaultList(v []*VaultListMember) *ListBackupVaultsOutput { - s.BackupVaultList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBackupVaultsOutput) SetNextToken(v string) *ListBackupVaultsOutput { - s.NextToken = &v - return s -} - -type ListProtectedResourcesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to be returned. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListProtectedResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListProtectedResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListProtectedResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListProtectedResourcesInput"} - 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 *ListProtectedResourcesInput) SetMaxResults(v int64) *ListProtectedResourcesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListProtectedResourcesInput) SetNextToken(v string) *ListProtectedResourcesInput { - s.NextToken = &v - return s -} - -type ListProtectedResourcesOutput struct { - _ struct{} `type:"structure"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `type:"string"` - - // An array of resources successfully backed up by AWS Backup including the - // time the resource was saved, an Amazon Resource Name (ARN) of the resource, - // and a resource type. - Results []*ProtectedResource `type:"list"` -} - -// String returns the string representation -func (s ListProtectedResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListProtectedResourcesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListProtectedResourcesOutput) SetNextToken(v string) *ListProtectedResourcesOutput { - s.NextToken = &v - return s -} - -// SetResults sets the Results field's value. -func (s *ListProtectedResourcesOutput) SetResults(v []*ProtectedResource) *ListProtectedResourcesOutput { - s.Results = v - return s -} - -type ListRecoveryPointsByBackupVaultInput struct { - _ struct{} `type:"structure"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` - - // Returns only recovery points that match the specified backup plan ID. - ByBackupPlanId *string `location:"querystring" locationName:"backupPlanId" type:"string"` - - // Returns only recovery points that were created after the specified timestamp. - ByCreatedAfter *time.Time `location:"querystring" locationName:"createdAfter" type:"timestamp"` - - // Returns only recovery points that were created before the specified timestamp. - ByCreatedBefore *time.Time `location:"querystring" locationName:"createdBefore" type:"timestamp"` - - // Returns only recovery points that match the specified resource Amazon Resource - // Name (ARN). - ByResourceArn *string `location:"querystring" locationName:"resourceArn" type:"string"` - - // Returns only recovery points that match the specified resource type. - ByResourceType *string `location:"querystring" locationName:"resourceType" type:"string"` - - // The maximum number of items to be returned. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListRecoveryPointsByBackupVaultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRecoveryPointsByBackupVaultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRecoveryPointsByBackupVaultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRecoveryPointsByBackupVaultInput"} - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *ListRecoveryPointsByBackupVaultInput) SetBackupVaultName(v string) *ListRecoveryPointsByBackupVaultInput { - s.BackupVaultName = &v - return s -} - -// SetByBackupPlanId sets the ByBackupPlanId field's value. -func (s *ListRecoveryPointsByBackupVaultInput) SetByBackupPlanId(v string) *ListRecoveryPointsByBackupVaultInput { - s.ByBackupPlanId = &v - return s -} - -// SetByCreatedAfter sets the ByCreatedAfter field's value. -func (s *ListRecoveryPointsByBackupVaultInput) SetByCreatedAfter(v time.Time) *ListRecoveryPointsByBackupVaultInput { - s.ByCreatedAfter = &v - return s -} - -// SetByCreatedBefore sets the ByCreatedBefore field's value. -func (s *ListRecoveryPointsByBackupVaultInput) SetByCreatedBefore(v time.Time) *ListRecoveryPointsByBackupVaultInput { - s.ByCreatedBefore = &v - return s -} - -// SetByResourceArn sets the ByResourceArn field's value. -func (s *ListRecoveryPointsByBackupVaultInput) SetByResourceArn(v string) *ListRecoveryPointsByBackupVaultInput { - s.ByResourceArn = &v - return s -} - -// SetByResourceType sets the ByResourceType field's value. -func (s *ListRecoveryPointsByBackupVaultInput) SetByResourceType(v string) *ListRecoveryPointsByBackupVaultInput { - s.ByResourceType = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListRecoveryPointsByBackupVaultInput) SetMaxResults(v int64) *ListRecoveryPointsByBackupVaultInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRecoveryPointsByBackupVaultInput) SetNextToken(v string) *ListRecoveryPointsByBackupVaultInput { - s.NextToken = &v - return s -} - -type ListRecoveryPointsByBackupVaultOutput struct { - _ struct{} `type:"structure"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `type:"string"` - - // An array of objects that contain detailed information about recovery points - // saved in a backup vault. - RecoveryPoints []*RecoveryPointByBackupVault `type:"list"` -} - -// String returns the string representation -func (s ListRecoveryPointsByBackupVaultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRecoveryPointsByBackupVaultOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRecoveryPointsByBackupVaultOutput) SetNextToken(v string) *ListRecoveryPointsByBackupVaultOutput { - s.NextToken = &v - return s -} - -// SetRecoveryPoints sets the RecoveryPoints field's value. -func (s *ListRecoveryPointsByBackupVaultOutput) SetRecoveryPoints(v []*RecoveryPointByBackupVault) *ListRecoveryPointsByBackupVaultOutput { - s.RecoveryPoints = v - return s -} - -type ListRecoveryPointsByResourceInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to be returned. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // An ARN that uniquely identifies a resource. The format of the ARN depends - // on the resource type. - // - // ResourceArn is a required field - ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListRecoveryPointsByResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRecoveryPointsByResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRecoveryPointsByResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRecoveryPointsByResourceInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListRecoveryPointsByResourceInput) SetMaxResults(v int64) *ListRecoveryPointsByResourceInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRecoveryPointsByResourceInput) SetNextToken(v string) *ListRecoveryPointsByResourceInput { - s.NextToken = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ListRecoveryPointsByResourceInput) SetResourceArn(v string) *ListRecoveryPointsByResourceInput { - s.ResourceArn = &v - return s -} - -type ListRecoveryPointsByResourceOutput struct { - _ struct{} `type:"structure"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `type:"string"` - - // An array of objects that contain detailed information about recovery points - // of the specified resource type. - RecoveryPoints []*RecoveryPointByResource `type:"list"` -} - -// String returns the string representation -func (s ListRecoveryPointsByResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRecoveryPointsByResourceOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRecoveryPointsByResourceOutput) SetNextToken(v string) *ListRecoveryPointsByResourceOutput { - s.NextToken = &v - return s -} - -// SetRecoveryPoints sets the RecoveryPoints field's value. -func (s *ListRecoveryPointsByResourceOutput) SetRecoveryPoints(v []*RecoveryPointByResource) *ListRecoveryPointsByResourceOutput { - s.RecoveryPoints = v - return s -} - -type ListRestoreJobsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to be returned. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListRestoreJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRestoreJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRestoreJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRestoreJobsInput"} - 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 *ListRestoreJobsInput) SetMaxResults(v int64) *ListRestoreJobsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRestoreJobsInput) SetNextToken(v string) *ListRestoreJobsInput { - s.NextToken = &v - return s -} - -type ListRestoreJobsOutput struct { - _ struct{} `type:"structure"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `type:"string"` - - // An array of objects that contain detailed information about jobs to restore - // saved resources. - RestoreJobs []*RestoreJobsListMember `type:"list"` -} - -// String returns the string representation -func (s ListRestoreJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRestoreJobsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRestoreJobsOutput) SetNextToken(v string) *ListRestoreJobsOutput { - s.NextToken = &v - return s -} - -// SetRestoreJobs sets the RestoreJobs field's value. -func (s *ListRestoreJobsOutput) SetRestoreJobs(v []*RestoreJobsListMember) *ListRestoreJobsOutput { - s.RestoreJobs = v - return s -} - -type ListTagsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to be returned. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format - // of the ARN depends on the type of resource. Valid targets for ListTags are - // recovery points, backup plans, and backup vaults. - // - // ResourceArn is a required field - ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput { - s.NextToken = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ListTagsInput) SetResourceArn(v string) *ListTagsInput { - s.ResourceArn = &v - return s -} - -type ListTagsOutput struct { - _ struct{} `type:"structure"` - - // The next item following a partial list of returned items. For example, if - // a request is made to return maxResults number of items, NextToken allows - // you to return more items in your list starting at the location pointed to - // by the next token. - NextToken *string `type:"string"` - - // To help organize your resources, you can assign your own metadata to the - // resources you create. Each tag is a key-value pair. - Tags map[string]*string `type:"map" sensitive:"true"` -} - -// String returns the string representation -func (s ListTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput { - s.NextToken = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput { - s.Tags = v - return s -} - -// Contains an optional backup plan display name and an array of BackupRule -// objects, each of which specifies a backup rule. Each rule in a backup plan -// is a separate scheduled task and can back up a different selection of AWS -// resources. -type Plan struct { - _ struct{} `type:"structure"` - - // The display name of a backup plan. - // - // BackupPlanName is a required field - BackupPlanName *string `type:"string" required:"true"` - - // An array of BackupRule objects, each of which specifies a scheduled task - // that is used to back up a selection of resources. - // - // Rules is a required field - Rules []*Rule `type:"list" required:"true"` -} - -// String returns the string representation -func (s Plan) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Plan) GoString() string { - return s.String() -} - -// SetBackupPlanName sets the BackupPlanName field's value. -func (s *Plan) SetBackupPlanName(v string) *Plan { - s.BackupPlanName = &v - return s -} - -// SetRules sets the Rules field's value. -func (s *Plan) SetRules(v []*Rule) *Plan { - s.Rules = v - return s -} - -// Contains an optional backup plan display name and an array of BackupRule -// objects, each of which specifies a backup rule. Each rule in a backup plan -// is a separate scheduled task and can back up a different selection of AWS -// resources. -type PlanInput struct { - _ struct{} `type:"structure"` - - // The display name of a backup plan. - // - // BackupPlanName is a required field - BackupPlanName *string `type:"string" required:"true"` - - // An array of BackupRule objects, each of which specifies a scheduled task - // that is used to back up a selection of resources. - // - // Rules is a required field - Rules []*RuleInput `type:"list" required:"true"` -} - -// String returns the string representation -func (s PlanInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlanInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PlanInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PlanInput"} - if s.BackupPlanName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPlanName")) - } - if s.Rules == nil { - invalidParams.Add(request.NewErrParamRequired("Rules")) - } - if s.Rules != nil { - for i, v := range s.Rules { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupPlanName sets the BackupPlanName field's value. -func (s *PlanInput) SetBackupPlanName(v string) *PlanInput { - s.BackupPlanName = &v - return s -} - -// SetRules sets the Rules field's value. -func (s *PlanInput) SetRules(v []*RuleInput) *PlanInput { - s.Rules = v - return s -} - -// An object specifying metadata associated with a backup plan template. -type PlanTemplatesListMember struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a stored backup plan template. - BackupPlanTemplateId *string `type:"string"` - - // The optional display name of a backup plan template. - BackupPlanTemplateName *string `type:"string"` -} - -// String returns the string representation -func (s PlanTemplatesListMember) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlanTemplatesListMember) GoString() string { - return s.String() -} - -// SetBackupPlanTemplateId sets the BackupPlanTemplateId field's value. -func (s *PlanTemplatesListMember) SetBackupPlanTemplateId(v string) *PlanTemplatesListMember { - s.BackupPlanTemplateId = &v - return s -} - -// SetBackupPlanTemplateName sets the BackupPlanTemplateName field's value. -func (s *PlanTemplatesListMember) SetBackupPlanTemplateName(v string) *PlanTemplatesListMember { - s.BackupPlanTemplateName = &v - return s -} - -// Contains metadata about a backup plan. -type PlansListMember struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for - // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50. - BackupPlanArn *string `type:"string"` - - // Uniquely identifies a backup plan. - BackupPlanId *string `type:"string"` - - // The display name of a saved backup plan. - BackupPlanName *string `type:"string"` - - // The date and time a resource backup plan is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // A unique string that identifies the request and allows failed requests to - // be retried without the risk of executing the operation twice. - CreatorRequestId *string `type:"string"` - - // The date and time a backup plan is deleted, in Unix format and Coordinated - // Universal Time (UTC). The value of DeletionDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - DeletionDate *time.Time `type:"timestamp"` - - // The last time a job to back up resources was executed with this rule. A date - // and time, in Unix format and Coordinated Universal Time (UTC). The value - // of LastExecutionDate is accurate to milliseconds. For example, the value - // 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. - LastExecutionDate *time.Time `type:"timestamp"` - - // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most - // 1,024 bytes long. Version IDs cannot be edited. - VersionId *string `type:"string"` -} - -// String returns the string representation -func (s PlansListMember) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlansListMember) GoString() string { - return s.String() -} - -// SetBackupPlanArn sets the BackupPlanArn field's value. -func (s *PlansListMember) SetBackupPlanArn(v string) *PlansListMember { - s.BackupPlanArn = &v - return s -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *PlansListMember) SetBackupPlanId(v string) *PlansListMember { - s.BackupPlanId = &v - return s -} - -// SetBackupPlanName sets the BackupPlanName field's value. -func (s *PlansListMember) SetBackupPlanName(v string) *PlansListMember { - s.BackupPlanName = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *PlansListMember) SetCreationDate(v time.Time) *PlansListMember { - s.CreationDate = &v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *PlansListMember) SetCreatorRequestId(v string) *PlansListMember { - s.CreatorRequestId = &v - return s -} - -// SetDeletionDate sets the DeletionDate field's value. -func (s *PlansListMember) SetDeletionDate(v time.Time) *PlansListMember { - s.DeletionDate = &v - return s -} - -// SetLastExecutionDate sets the LastExecutionDate field's value. -func (s *PlansListMember) SetLastExecutionDate(v time.Time) *PlansListMember { - s.LastExecutionDate = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *PlansListMember) SetVersionId(v string) *PlansListMember { - s.VersionId = &v - return s -} - -// A structure that contains information about a backed-up resource. -type ProtectedResource struct { - _ struct{} `type:"structure"` - - // The date and time a resource was last backed up, in Unix format and Coordinated - // Universal Time (UTC). The value of LastBackupTime is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - LastBackupTime *time.Time `type:"timestamp"` - - // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format - // of the ARN depends on the resource type. - ResourceArn *string `type:"string"` - - // The type of AWS resource; for example, an Amazon Elastic Block Store (Amazon - // EBS) volume or an Amazon Relational Database Service (Amazon RDS) database. - ResourceType *string `type:"string"` -} - -// String returns the string representation -func (s ProtectedResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProtectedResource) GoString() string { - return s.String() -} - -// SetLastBackupTime sets the LastBackupTime field's value. -func (s *ProtectedResource) SetLastBackupTime(v time.Time) *ProtectedResource { - s.LastBackupTime = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ProtectedResource) SetResourceArn(v string) *ProtectedResource { - s.ResourceArn = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ProtectedResource) SetResourceType(v string) *ProtectedResource { - s.ResourceType = &v - return s -} - -type PutBackupVaultAccessPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` - - // The backup vault access policy document in JSON format. - Policy *string `type:"string"` -} - -// String returns the string representation -func (s PutBackupVaultAccessPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutBackupVaultAccessPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBackupVaultAccessPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBackupVaultAccessPolicyInput"} - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *PutBackupVaultAccessPolicyInput) SetBackupVaultName(v string) *PutBackupVaultAccessPolicyInput { - s.BackupVaultName = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *PutBackupVaultAccessPolicyInput) SetPolicy(v string) *PutBackupVaultAccessPolicyInput { - s.Policy = &v - return s -} - -type PutBackupVaultAccessPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutBackupVaultAccessPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutBackupVaultAccessPolicyOutput) GoString() string { - return s.String() -} - -type PutBackupVaultNotificationsInput struct { - _ struct{} `type:"structure"` - - // An array of events that indicate the status of jobs to back up resources - // to the backup vault. - // - // BackupVaultEvents is a required field - BackupVaultEvents []*string `type:"list" required:"true"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) that specifies the topic for a backup vault’s - // events; for example, arn:aws:sns:us-west-2:111122223333:MyVaultTopic. - // - // SNSTopicArn is a required field - SNSTopicArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PutBackupVaultNotificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutBackupVaultNotificationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBackupVaultNotificationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBackupVaultNotificationsInput"} - if s.BackupVaultEvents == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultEvents")) - } - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) - } - if s.SNSTopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("SNSTopicArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultEvents sets the BackupVaultEvents field's value. -func (s *PutBackupVaultNotificationsInput) SetBackupVaultEvents(v []*string) *PutBackupVaultNotificationsInput { - s.BackupVaultEvents = v - return s -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *PutBackupVaultNotificationsInput) SetBackupVaultName(v string) *PutBackupVaultNotificationsInput { - s.BackupVaultName = &v - return s -} - -// SetSNSTopicArn sets the SNSTopicArn field's value. -func (s *PutBackupVaultNotificationsInput) SetSNSTopicArn(v string) *PutBackupVaultNotificationsInput { - s.SNSTopicArn = &v - return s -} - -type PutBackupVaultNotificationsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutBackupVaultNotificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutBackupVaultNotificationsOutput) GoString() string { - return s.String() -} - -// Contains detailed information about the recovery points stored in a backup -// vault. -type RecoveryPointByBackupVault struct { - _ struct{} `type:"structure"` - - // The size, in bytes, of a backup. - BackupSizeInBytes *int64 `type:"long"` - - // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. - BackupVaultArn *string `type:"string"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - BackupVaultName *string `type:"string"` - - // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt - // timestamps. - CalculatedLifecycle *CalculatedLifecycle `type:"structure"` - - // The date and time a job to restore a recovery point is completed, in Unix - // format and Coordinated Universal Time (UTC). The value of CompletionDate - // is accurate to milliseconds. For example, the value 1516925490.087 represents - // Friday, January 26, 2018 12:11:30.087 AM. - CompletionDate *time.Time `type:"timestamp"` - - // Contains identifying information about the creation of a recovery point, - // including the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId - // of the backup plan that is used to create it. - CreatedBy *RecoveryPointCreator `type:"structure"` - - // The date and time a recovery point is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // The server-side encryption key that is used to protect your backups; for - // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. - EncryptionKeyArn *string `type:"string"` - - // Specifies the IAM role ARN used to create the target recovery point; for - // example, arn:aws:iam::123456789012:role/S3Access. - IamRoleArn *string `type:"string"` - - // A Boolean value that is returned as TRUE if the specified recovery point - // is encrypted, or FALSE if the recovery point is not encrypted. - IsEncrypted *bool `type:"boolean"` - - // The date and time a recovery point was last restored, in Unix format and - // Coordinated Universal Time (UTC). The value of LastRestoreTime is accurate - // to milliseconds. For example, the value 1516925490.087 represents Friday, - // January 26, 2018 12:11:30.087 AM. - LastRestoreTime *time.Time `type:"timestamp"` - - // The lifecycle defines when a protected resource is transitioned to cold storage - // and when it expires. AWS Backup transitions and expires backups automatically - // according to the lifecycle that you define. - // - // Backups transitioned to cold storage must be stored in cold storage for a - // minimum of 90 days. Therefore, the “expire after days” setting must be 90 - // days greater than the “transition to cold after days” setting. The “transition - // to cold after days” setting cannot be changed after a backup has been transitioned - // to cold. - Lifecycle *Lifecycle `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; - // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - RecoveryPointArn *string `type:"string"` - - // An ARN that uniquely identifies a resource. The format of the ARN depends - // on the resource type. - ResourceArn *string `type:"string"` - - // The type of AWS resource saved as a recovery point; for example, an Amazon - // Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database - // Service (Amazon RDS) database. - ResourceType *string `type:"string"` - - // A status code specifying the state of the recovery point. - Status *string `type:"string" enum:"RecoveryPointStatus"` -} - -// String returns the string representation -func (s RecoveryPointByBackupVault) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecoveryPointByBackupVault) GoString() string { - return s.String() -} - -// SetBackupSizeInBytes sets the BackupSizeInBytes field's value. -func (s *RecoveryPointByBackupVault) SetBackupSizeInBytes(v int64) *RecoveryPointByBackupVault { - s.BackupSizeInBytes = &v - return s -} - -// SetBackupVaultArn sets the BackupVaultArn field's value. -func (s *RecoveryPointByBackupVault) SetBackupVaultArn(v string) *RecoveryPointByBackupVault { - s.BackupVaultArn = &v - return s -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *RecoveryPointByBackupVault) SetBackupVaultName(v string) *RecoveryPointByBackupVault { - s.BackupVaultName = &v - return s -} - -// SetCalculatedLifecycle sets the CalculatedLifecycle field's value. -func (s *RecoveryPointByBackupVault) SetCalculatedLifecycle(v *CalculatedLifecycle) *RecoveryPointByBackupVault { - s.CalculatedLifecycle = v - return s -} - -// SetCompletionDate sets the CompletionDate field's value. -func (s *RecoveryPointByBackupVault) SetCompletionDate(v time.Time) *RecoveryPointByBackupVault { - s.CompletionDate = &v - return s -} - -// SetCreatedBy sets the CreatedBy field's value. -func (s *RecoveryPointByBackupVault) SetCreatedBy(v *RecoveryPointCreator) *RecoveryPointByBackupVault { - s.CreatedBy = v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *RecoveryPointByBackupVault) SetCreationDate(v time.Time) *RecoveryPointByBackupVault { - s.CreationDate = &v - return s -} - -// SetEncryptionKeyArn sets the EncryptionKeyArn field's value. -func (s *RecoveryPointByBackupVault) SetEncryptionKeyArn(v string) *RecoveryPointByBackupVault { - s.EncryptionKeyArn = &v - return s -} - -// SetIamRoleArn sets the IamRoleArn field's value. -func (s *RecoveryPointByBackupVault) SetIamRoleArn(v string) *RecoveryPointByBackupVault { - s.IamRoleArn = &v - return s -} - -// SetIsEncrypted sets the IsEncrypted field's value. -func (s *RecoveryPointByBackupVault) SetIsEncrypted(v bool) *RecoveryPointByBackupVault { - s.IsEncrypted = &v - return s -} - -// SetLastRestoreTime sets the LastRestoreTime field's value. -func (s *RecoveryPointByBackupVault) SetLastRestoreTime(v time.Time) *RecoveryPointByBackupVault { - s.LastRestoreTime = &v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *RecoveryPointByBackupVault) SetLifecycle(v *Lifecycle) *RecoveryPointByBackupVault { - s.Lifecycle = v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *RecoveryPointByBackupVault) SetRecoveryPointArn(v string) *RecoveryPointByBackupVault { - s.RecoveryPointArn = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *RecoveryPointByBackupVault) SetResourceArn(v string) *RecoveryPointByBackupVault { - s.ResourceArn = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *RecoveryPointByBackupVault) SetResourceType(v string) *RecoveryPointByBackupVault { - s.ResourceType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *RecoveryPointByBackupVault) SetStatus(v string) *RecoveryPointByBackupVault { - s.Status = &v - return s -} - -// Contains detailed information about a saved recovery point. -type RecoveryPointByResource struct { - _ struct{} `type:"structure"` - - // The size, in bytes, of a backup. - BackupSizeBytes *int64 `type:"long"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - BackupVaultName *string `type:"string"` - - // The date and time a recovery point is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // The server-side encryption key that is used to protect your backups; for - // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. - EncryptionKeyArn *string `type:"string"` - - // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; - // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - RecoveryPointArn *string `type:"string"` - - // A status code specifying the state of the recovery point. - Status *string `type:"string" enum:"RecoveryPointStatus"` -} - -// String returns the string representation -func (s RecoveryPointByResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecoveryPointByResource) GoString() string { - return s.String() -} - -// SetBackupSizeBytes sets the BackupSizeBytes field's value. -func (s *RecoveryPointByResource) SetBackupSizeBytes(v int64) *RecoveryPointByResource { - s.BackupSizeBytes = &v - return s -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *RecoveryPointByResource) SetBackupVaultName(v string) *RecoveryPointByResource { - s.BackupVaultName = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *RecoveryPointByResource) SetCreationDate(v time.Time) *RecoveryPointByResource { - s.CreationDate = &v - return s -} - -// SetEncryptionKeyArn sets the EncryptionKeyArn field's value. -func (s *RecoveryPointByResource) SetEncryptionKeyArn(v string) *RecoveryPointByResource { - s.EncryptionKeyArn = &v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *RecoveryPointByResource) SetRecoveryPointArn(v string) *RecoveryPointByResource { - s.RecoveryPointArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *RecoveryPointByResource) SetStatus(v string) *RecoveryPointByResource { - s.Status = &v - return s -} - -// Contains information about the backup plan and rule that AWS Backup used -// to initiate the recovery point backup. -type RecoveryPointCreator struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for - // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50. - BackupPlanArn *string `type:"string"` - - // Uniquely identifies a backup plan. - BackupPlanId *string `type:"string"` - - // Version IDs are unique, randomly generated, Unicode, UTF-8 encoded strings - // that are at most 1,024 bytes long. They cannot be edited. - BackupPlanVersion *string `type:"string"` - - // Uniquely identifies a rule used to schedule the backup of a selection of - // resources. - BackupRuleId *string `type:"string"` -} - -// String returns the string representation -func (s RecoveryPointCreator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecoveryPointCreator) GoString() string { - return s.String() -} - -// SetBackupPlanArn sets the BackupPlanArn field's value. -func (s *RecoveryPointCreator) SetBackupPlanArn(v string) *RecoveryPointCreator { - s.BackupPlanArn = &v - return s -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *RecoveryPointCreator) SetBackupPlanId(v string) *RecoveryPointCreator { - s.BackupPlanId = &v - return s -} - -// SetBackupPlanVersion sets the BackupPlanVersion field's value. -func (s *RecoveryPointCreator) SetBackupPlanVersion(v string) *RecoveryPointCreator { - s.BackupPlanVersion = &v - return s -} - -// SetBackupRuleId sets the BackupRuleId field's value. -func (s *RecoveryPointCreator) SetBackupRuleId(v string) *RecoveryPointCreator { - s.BackupRuleId = &v - return s -} - -// Contains metadata about a restore job. -type RestoreJobsListMember struct { - _ struct{} `type:"structure"` - - // The size, in bytes, of the restored resource. - BackupSizeInBytes *int64 `type:"long"` - - // The date and time a job to restore a recovery point is completed, in Unix - // format and Coordinated Universal Time (UTC). The value of CompletionDate - // is accurate to milliseconds. For example, the value 1516925490.087 represents - // Friday, January 26, 2018 12:11:30.087 AM. - CompletionDate *time.Time `type:"timestamp"` - - // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format - // of the ARN depends on the resource type. - CreatedResourceArn *string `type:"string"` - - // The date and time a restore job is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // The amount of time in minutes that a job restoring a recovery point is expected - // to take. - ExpectedCompletionTimeMinutes *int64 `type:"long"` - - // Specifies the IAM role ARN used to create the target recovery point; for - // example, arn:aws:iam::123456789012:role/S3Access. - IamRoleArn *string `type:"string"` - - // Contains an estimated percentage complete of a job at the time the job status - // was queried. - PercentDone *string `type:"string"` - - // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - RecoveryPointArn *string `type:"string"` - - // Uniquely identifies the job that restores a recovery point. - RestoreJobId *string `type:"string"` - - // A status code specifying the state of the job initiated by AWS Backup to - // restore a recovery point. - Status *string `type:"string" enum:"RestoreJobStatus"` - - // A detailed message explaining the status of the job to restore a recovery - // point. - StatusMessage *string `type:"string"` -} - -// String returns the string representation -func (s RestoreJobsListMember) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreJobsListMember) GoString() string { - return s.String() -} - -// SetBackupSizeInBytes sets the BackupSizeInBytes field's value. -func (s *RestoreJobsListMember) SetBackupSizeInBytes(v int64) *RestoreJobsListMember { - s.BackupSizeInBytes = &v - return s -} - -// SetCompletionDate sets the CompletionDate field's value. -func (s *RestoreJobsListMember) SetCompletionDate(v time.Time) *RestoreJobsListMember { - s.CompletionDate = &v - return s -} - -// SetCreatedResourceArn sets the CreatedResourceArn field's value. -func (s *RestoreJobsListMember) SetCreatedResourceArn(v string) *RestoreJobsListMember { - s.CreatedResourceArn = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *RestoreJobsListMember) SetCreationDate(v time.Time) *RestoreJobsListMember { - s.CreationDate = &v - return s -} - -// SetExpectedCompletionTimeMinutes sets the ExpectedCompletionTimeMinutes field's value. -func (s *RestoreJobsListMember) SetExpectedCompletionTimeMinutes(v int64) *RestoreJobsListMember { - s.ExpectedCompletionTimeMinutes = &v - return s -} - -// SetIamRoleArn sets the IamRoleArn field's value. -func (s *RestoreJobsListMember) SetIamRoleArn(v string) *RestoreJobsListMember { - s.IamRoleArn = &v - return s -} - -// SetPercentDone sets the PercentDone field's value. -func (s *RestoreJobsListMember) SetPercentDone(v string) *RestoreJobsListMember { - s.PercentDone = &v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *RestoreJobsListMember) SetRecoveryPointArn(v string) *RestoreJobsListMember { - s.RecoveryPointArn = &v - return s -} - -// SetRestoreJobId sets the RestoreJobId field's value. -func (s *RestoreJobsListMember) SetRestoreJobId(v string) *RestoreJobsListMember { - s.RestoreJobId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *RestoreJobsListMember) SetStatus(v string) *RestoreJobsListMember { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *RestoreJobsListMember) SetStatusMessage(v string) *RestoreJobsListMember { - s.StatusMessage = &v - return s -} - -// Specifies a scheduled task used to back up a selection of resources. -type Rule struct { - _ struct{} `type:"structure"` - - // A value in minutes after a backup job is successfully started before it must - // be completed or it is canceled by AWS Backup. This value is optional. - CompletionWindowMinutes *int64 `type:"long"` - - // The lifecycle defines when a protected resource is transitioned to cold storage - // and when it expires. AWS Backup transitions and expires backups automatically - // according to the lifecycle that you define. - // - // Backups transitioned to cold storage must be stored in cold storage for a - // minimum of 90 days. Therefore, the “expire after days” setting must be 90 - // days greater than the “transition to cold after days” setting. The “transition - // to cold after days” setting cannot be changed after a backup has been transitioned - // to cold. - Lifecycle *Lifecycle `type:"structure"` - - // An array of key-value pair strings that are assigned to resources that are - // associated with this rule when restored from backup. - RecoveryPointTags map[string]*string `type:"map" sensitive:"true"` - - // Uniquely identifies a rule that is used to schedule the backup of a selection - // of resources. - RuleId *string `type:"string"` - - // An optional display name for a backup rule. - // - // RuleName is a required field - RuleName *string `type:"string" required:"true"` - - // A CRON expression specifying when AWS Backup initiates a backup job. - ScheduleExpression *string `type:"string"` - - // An optional value that specifies a period of time in minutes after a backup - // is scheduled before a job is canceled if it doesn't start successfully. - StartWindowMinutes *int64 `type:"long"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // TargetBackupVaultName is a required field - TargetBackupVaultName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Rule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Rule) GoString() string { - return s.String() -} - -// SetCompletionWindowMinutes sets the CompletionWindowMinutes field's value. -func (s *Rule) SetCompletionWindowMinutes(v int64) *Rule { - s.CompletionWindowMinutes = &v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *Rule) SetLifecycle(v *Lifecycle) *Rule { - s.Lifecycle = v - return s -} - -// SetRecoveryPointTags sets the RecoveryPointTags field's value. -func (s *Rule) SetRecoveryPointTags(v map[string]*string) *Rule { - s.RecoveryPointTags = v - return s -} - -// SetRuleId sets the RuleId field's value. -func (s *Rule) SetRuleId(v string) *Rule { - s.RuleId = &v - return s -} - -// SetRuleName sets the RuleName field's value. -func (s *Rule) SetRuleName(v string) *Rule { - s.RuleName = &v - return s -} - -// SetScheduleExpression sets the ScheduleExpression field's value. -func (s *Rule) SetScheduleExpression(v string) *Rule { - s.ScheduleExpression = &v - return s -} - -// SetStartWindowMinutes sets the StartWindowMinutes field's value. -func (s *Rule) SetStartWindowMinutes(v int64) *Rule { - s.StartWindowMinutes = &v - return s -} - -// SetTargetBackupVaultName sets the TargetBackupVaultName field's value. -func (s *Rule) SetTargetBackupVaultName(v string) *Rule { - s.TargetBackupVaultName = &v - return s -} - -// Specifies a scheduled task used to back up a selection of resources. -type RuleInput struct { - _ struct{} `type:"structure"` - - // The amount of time AWS Backup attempts a backup before canceling the job - // and returning an error. - CompletionWindowMinutes *int64 `type:"long"` - - // The lifecycle defines when a protected resource is transitioned to cold storage - // and when it expires. AWS Backup will transition and expire backups automatically - // according to the lifecycle that you define. - // - // Backups transitioned to cold storage must be stored in cold storage for a - // minimum of 90 days. Therefore, the “expire after days” setting must be 90 - // days greater than the “transition to cold after days”. The “transition to - // cold after days” setting cannot be changed after a backup has been transitioned - // to cold. - Lifecycle *Lifecycle `type:"structure"` - - // To help organize your resources, you can assign your own metadata to the - // resources that you create. Each tag is a key-value pair. - RecoveryPointTags map[string]*string `type:"map" sensitive:"true"` - - // >An optional display name for a backup rule. - // - // RuleName is a required field - RuleName *string `type:"string" required:"true"` - - // A CRON expression specifying when AWS Backup initiates a backup job. - ScheduleExpression *string `type:"string"` - - // The amount of time in minutes before beginning a backup. - StartWindowMinutes *int64 `type:"long"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // TargetBackupVaultName is a required field - TargetBackupVaultName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RuleInput"} - if s.RuleName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleName")) - } - if s.TargetBackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("TargetBackupVaultName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCompletionWindowMinutes sets the CompletionWindowMinutes field's value. -func (s *RuleInput) SetCompletionWindowMinutes(v int64) *RuleInput { - s.CompletionWindowMinutes = &v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *RuleInput) SetLifecycle(v *Lifecycle) *RuleInput { - s.Lifecycle = v - return s -} - -// SetRecoveryPointTags sets the RecoveryPointTags field's value. -func (s *RuleInput) SetRecoveryPointTags(v map[string]*string) *RuleInput { - s.RecoveryPointTags = v - return s -} - -// SetRuleName sets the RuleName field's value. -func (s *RuleInput) SetRuleName(v string) *RuleInput { - s.RuleName = &v - return s -} - -// SetScheduleExpression sets the ScheduleExpression field's value. -func (s *RuleInput) SetScheduleExpression(v string) *RuleInput { - s.ScheduleExpression = &v - return s -} - -// SetStartWindowMinutes sets the StartWindowMinutes field's value. -func (s *RuleInput) SetStartWindowMinutes(v int64) *RuleInput { - s.StartWindowMinutes = &v - return s -} - -// SetTargetBackupVaultName sets the TargetBackupVaultName field's value. -func (s *RuleInput) SetTargetBackupVaultName(v string) *RuleInput { - s.TargetBackupVaultName = &v - return s -} - -// Used to specify a set of resources to a backup plan. -type Selection struct { - _ struct{} `type:"structure"` - - // The ARN of the IAM role that AWS Backup uses to authenticate when restoring - // the target resource; for example, arn:aws:iam::123456789012:role/S3Access. - // - // IamRoleArn is a required field - IamRoleArn *string `type:"string" required:"true"` - - // An array of conditions used to specify a set of resources to assign to a - // backup plan; for example, "StringEquals": {"ec2:ResourceTag/Department": - // "accounting". - ListOfTags []*Condition `type:"list"` - - // An array of strings that either contain Amazon Resource Names (ARNs) or match - // patterns such as "arn:aws:ec2:us-east-1:123456789012:volume/*" of resources - // to assign to a backup plan. - Resources []*string `type:"list"` - - // The display name of a resource selection document. - // - // SelectionName is a required field - SelectionName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Selection) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Selection) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Selection) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Selection"} - if s.IamRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("IamRoleArn")) - } - if s.SelectionName == nil { - invalidParams.Add(request.NewErrParamRequired("SelectionName")) - } - if s.ListOfTags != nil { - for i, v := range s.ListOfTags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ListOfTags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIamRoleArn sets the IamRoleArn field's value. -func (s *Selection) SetIamRoleArn(v string) *Selection { - s.IamRoleArn = &v - return s -} - -// SetListOfTags sets the ListOfTags field's value. -func (s *Selection) SetListOfTags(v []*Condition) *Selection { - s.ListOfTags = v - return s -} - -// SetResources sets the Resources field's value. -func (s *Selection) SetResources(v []*string) *Selection { - s.Resources = v - return s -} - -// SetSelectionName sets the SelectionName field's value. -func (s *Selection) SetSelectionName(v string) *Selection { - s.SelectionName = &v - return s -} - -// Contains metadata about a BackupSelection object. -type SelectionsListMember struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a backup plan. - BackupPlanId *string `type:"string"` - - // The date and time a backup plan is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // A unique string that identifies the request and allows failed requests to - // be retried without the risk of executing the operation twice. - CreatorRequestId *string `type:"string"` - - // Specifies the IAM role Amazon Resource Name (ARN) to create the target recovery - // point; for example, arn:aws:iam::123456789012:role/S3Access. - IamRoleArn *string `type:"string"` - - // Uniquely identifies a request to assign a set of resources to a backup plan. - SelectionId *string `type:"string"` - - // The display name of a resource selection document. - SelectionName *string `type:"string"` -} - -// String returns the string representation -func (s SelectionsListMember) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SelectionsListMember) GoString() string { - return s.String() -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *SelectionsListMember) SetBackupPlanId(v string) *SelectionsListMember { - s.BackupPlanId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *SelectionsListMember) SetCreationDate(v time.Time) *SelectionsListMember { - s.CreationDate = &v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *SelectionsListMember) SetCreatorRequestId(v string) *SelectionsListMember { - s.CreatorRequestId = &v - return s -} - -// SetIamRoleArn sets the IamRoleArn field's value. -func (s *SelectionsListMember) SetIamRoleArn(v string) *SelectionsListMember { - s.IamRoleArn = &v - return s -} - -// SetSelectionId sets the SelectionId field's value. -func (s *SelectionsListMember) SetSelectionId(v string) *SelectionsListMember { - s.SelectionId = &v - return s -} - -// SetSelectionName sets the SelectionName field's value. -func (s *SelectionsListMember) SetSelectionName(v string) *SelectionsListMember { - s.SelectionName = &v - return s -} - -type StartBackupJobInput struct { - _ struct{} `type:"structure"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `type:"string" required:"true"` - - // The amount of time AWS Backup attempts a backup before canceling the job - // and returning an error. - CompleteWindowMinutes *int64 `type:"long"` - - // Specifies the IAM role ARN used to create the target recovery point; for - // example, arn:aws:iam::123456789012:role/S3Access. - // - // IamRoleArn is a required field - IamRoleArn *string `type:"string" required:"true"` - - // A customer chosen string that can be used to distinguish between calls to - // StartBackupJob. Idempotency tokens time out after one hour. Therefore, if - // you call StartBackupJob multiple times with the same idempotency token within - // one hour, AWS Backup recognizes that you are requesting only one backup job - // and initiates only one. If you change the idempotency token for each call, - // AWS Backup recognizes that you are requesting to start multiple backups. - IdempotencyToken *string `type:"string"` - - // The lifecycle defines when a protected resource is transitioned to cold storage - // and when it expires. AWS Backup will transition and expire backups automatically - // according to the lifecycle that you define. - // - // Backups transitioned to cold storage must be stored in cold storage for a - // minimum of 90 days. Therefore, the “expire after days” setting must be 90 - // days greater than the “transition to cold after days” setting. The “transition - // to cold after days” setting cannot be changed after a backup has been transitioned - // to cold. - Lifecycle *Lifecycle `type:"structure"` - - // To help organize your resources, you can assign your own metadata to the - // resources that you create. Each tag is a key-value pair. - RecoveryPointTags map[string]*string `type:"map" sensitive:"true"` - - // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format - // of the ARN depends on the resource type. - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` - - // The amount of time in minutes before beginning a backup. - StartWindowMinutes *int64 `type:"long"` -} - -// String returns the string representation -func (s StartBackupJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartBackupJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartBackupJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartBackupJobInput"} - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.IamRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("IamRoleArn")) - } - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *StartBackupJobInput) SetBackupVaultName(v string) *StartBackupJobInput { - s.BackupVaultName = &v - return s -} - -// SetCompleteWindowMinutes sets the CompleteWindowMinutes field's value. -func (s *StartBackupJobInput) SetCompleteWindowMinutes(v int64) *StartBackupJobInput { - s.CompleteWindowMinutes = &v - return s -} - -// SetIamRoleArn sets the IamRoleArn field's value. -func (s *StartBackupJobInput) SetIamRoleArn(v string) *StartBackupJobInput { - s.IamRoleArn = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *StartBackupJobInput) SetIdempotencyToken(v string) *StartBackupJobInput { - s.IdempotencyToken = &v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *StartBackupJobInput) SetLifecycle(v *Lifecycle) *StartBackupJobInput { - s.Lifecycle = v - return s -} - -// SetRecoveryPointTags sets the RecoveryPointTags field's value. -func (s *StartBackupJobInput) SetRecoveryPointTags(v map[string]*string) *StartBackupJobInput { - s.RecoveryPointTags = v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *StartBackupJobInput) SetResourceArn(v string) *StartBackupJobInput { - s.ResourceArn = &v - return s -} - -// SetStartWindowMinutes sets the StartWindowMinutes field's value. -func (s *StartBackupJobInput) SetStartWindowMinutes(v int64) *StartBackupJobInput { - s.StartWindowMinutes = &v - return s -} - -type StartBackupJobOutput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a request to AWS Backup to back up a resource. - BackupJobId *string `type:"string"` - - // The date and time that a backup job is started, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - RecoveryPointArn *string `type:"string"` -} - -// String returns the string representation -func (s StartBackupJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartBackupJobOutput) GoString() string { - return s.String() -} - -// SetBackupJobId sets the BackupJobId field's value. -func (s *StartBackupJobOutput) SetBackupJobId(v string) *StartBackupJobOutput { - s.BackupJobId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *StartBackupJobOutput) SetCreationDate(v time.Time) *StartBackupJobOutput { - s.CreationDate = &v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *StartBackupJobOutput) SetRecoveryPointArn(v string) *StartBackupJobOutput { - s.RecoveryPointArn = &v - return s -} - -type StartRestoreJobInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM role that AWS Backup uses to create - // the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access. - // - // IamRoleArn is a required field - IamRoleArn *string `type:"string" required:"true"` - - // A customer chosen string that can be used to distinguish between calls to - // StartRestoreJob. Idempotency tokens time out after one hour. Therefore, if - // you call StartRestoreJob multiple times with the same idempotency token within - // one hour, AWS Backup recognizes that you are requesting only one restore - // job and initiates only one. If you change the idempotency token for each - // call, AWS Backup recognizes that you are requesting to start multiple restores. - IdempotencyToken *string `type:"string"` - - // A set of metadata key-value pairs. Lists the metadata that the recovery point - // was created with. - // - // Metadata is a required field - Metadata map[string]*string `type:"map" required:"true"` - - // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - // - // RecoveryPointArn is a required field - RecoveryPointArn *string `type:"string" required:"true"` - - // Starts a job to restore a recovery point for one of the following resources: - // - // * EBS for Amazon Elastic Block Store - // - // * SGW for AWS Storage Gateway - // - // * RDS for Amazon Relational Database Service - // - // * DDB for Amazon DynamoDB - // - // * EFS for Amazon Elastic File System - ResourceType *string `type:"string"` -} - -// String returns the string representation -func (s StartRestoreJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartRestoreJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartRestoreJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartRestoreJobInput"} - if s.IamRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("IamRoleArn")) - } - if s.Metadata == nil { - invalidParams.Add(request.NewErrParamRequired("Metadata")) - } - if s.RecoveryPointArn == nil { - invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIamRoleArn sets the IamRoleArn field's value. -func (s *StartRestoreJobInput) SetIamRoleArn(v string) *StartRestoreJobInput { - s.IamRoleArn = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *StartRestoreJobInput) SetIdempotencyToken(v string) *StartRestoreJobInput { - s.IdempotencyToken = &v - return s -} - -// SetMetadata sets the Metadata field's value. -func (s *StartRestoreJobInput) SetMetadata(v map[string]*string) *StartRestoreJobInput { - s.Metadata = v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *StartRestoreJobInput) SetRecoveryPointArn(v string) *StartRestoreJobInput { - s.RecoveryPointArn = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *StartRestoreJobInput) SetResourceType(v string) *StartRestoreJobInput { - s.ResourceType = &v - return s -} - -type StartRestoreJobOutput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies the job that restores a recovery point. - RestoreJobId *string `type:"string"` -} - -// String returns the string representation -func (s StartRestoreJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartRestoreJobOutput) GoString() string { - return s.String() -} - -// SetRestoreJobId sets the RestoreJobId field's value. -func (s *StartRestoreJobOutput) SetRestoreJobId(v string) *StartRestoreJobOutput { - s.RestoreJobId = &v - return s -} - -type StopBackupJobInput struct { - _ struct{} `type:"structure"` - - // Uniquely identifies a request to AWS Backup to back up a resource. - // - // BackupJobId is a required field - BackupJobId *string `location:"uri" locationName:"backupJobId" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopBackupJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopBackupJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopBackupJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopBackupJobInput"} - if s.BackupJobId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupJobId")) - } - if s.BackupJobId != nil && len(*s.BackupJobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupJobId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupJobId sets the BackupJobId field's value. -func (s *StopBackupJobInput) SetBackupJobId(v string) *StopBackupJobInput { - s.BackupJobId = &v - return s -} - -type StopBackupJobOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopBackupJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopBackupJobOutput) GoString() string { - return s.String() -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // An ARN that uniquely identifies a resource. The format of the ARN depends - // on the type of the tagged resource. - // - // ResourceArn is a required field - ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` - - // Key-value pairs that are used to help organize your resources. You can assign - // your own metadata to the resources you create. - // - // Tags is a required field - Tags map[string]*string `type:"map" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v 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"` - - // An ARN that uniquely identifies a resource. The format of the ARN depends - // on the type of the tagged resource. - // - // ResourceArn is a required field - ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` - - // A list of keys to identify which key-value tags to remove from a resource. - // - // TagKeyList is a required field - TagKeyList []*string `type:"list" required:"true" sensitive:"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.TagKeyList == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeyList")) - } - - 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 -} - -// SetTagKeyList sets the TagKeyList field's value. -func (s *UntagResourceInput) SetTagKeyList(v []*string) *UntagResourceInput { - s.TagKeyList = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UpdateBackupPlanInput struct { - _ struct{} `type:"structure"` - - // Specifies the body of a backup plan. Includes a BackupPlanName and one or - // more sets of Rules. - // - // BackupPlan is a required field - BackupPlan *PlanInput `type:"structure" required:"true"` - - // Uniquely identifies a backup plan. - // - // BackupPlanId is a required field - BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateBackupPlanInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBackupPlanInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateBackupPlanInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateBackupPlanInput"} - if s.BackupPlan == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPlan")) - } - if s.BackupPlanId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) - } - if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) - } - if s.BackupPlan != nil { - if err := s.BackupPlan.Validate(); err != nil { - invalidParams.AddNested("BackupPlan", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupPlan sets the BackupPlan field's value. -func (s *UpdateBackupPlanInput) SetBackupPlan(v *PlanInput) *UpdateBackupPlanInput { - s.BackupPlan = v - return s -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *UpdateBackupPlanInput) SetBackupPlanId(v string) *UpdateBackupPlanInput { - s.BackupPlanId = &v - return s -} - -type UpdateBackupPlanOutput struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for - // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50. - BackupPlanArn *string `type:"string"` - - // Uniquely identifies a backup plan. - BackupPlanId *string `type:"string"` - - // The date and time a backup plan is updated, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most - // 1,024 bytes long. Version Ids cannot be edited. - VersionId *string `type:"string"` -} - -// String returns the string representation -func (s UpdateBackupPlanOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBackupPlanOutput) GoString() string { - return s.String() -} - -// SetBackupPlanArn sets the BackupPlanArn field's value. -func (s *UpdateBackupPlanOutput) SetBackupPlanArn(v string) *UpdateBackupPlanOutput { - s.BackupPlanArn = &v - return s -} - -// SetBackupPlanId sets the BackupPlanId field's value. -func (s *UpdateBackupPlanOutput) SetBackupPlanId(v string) *UpdateBackupPlanOutput { - s.BackupPlanId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *UpdateBackupPlanOutput) SetCreationDate(v time.Time) *UpdateBackupPlanOutput { - s.CreationDate = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *UpdateBackupPlanOutput) SetVersionId(v string) *UpdateBackupPlanOutput { - s.VersionId = &v - return s -} - -type UpdateRecoveryPointLifecycleInput struct { - _ struct{} `type:"structure"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - // - // BackupVaultName is a required field - BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` - - // The lifecycle defines when a protected resource is transitioned to cold storage - // and when it expires. AWS Backup transitions and expires backups automatically - // according to the lifecycle that you define. - // - // Backups transitioned to cold storage must be stored in cold storage for a - // minimum of 90 days. Therefore, the “expire after days” setting must be 90 - // days greater than the “transition to cold after days” setting. The “transition - // to cold after days” setting cannot be changed after a backup has been transitioned - // to cold. - Lifecycle *Lifecycle `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; - // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - // - // RecoveryPointArn is a required field - RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateRecoveryPointLifecycleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRecoveryPointLifecycleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRecoveryPointLifecycleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRecoveryPointLifecycleInput"} - if s.BackupVaultName == nil { - invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) - } - if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) - } - if s.RecoveryPointArn == nil { - invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn")) - } - if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *UpdateRecoveryPointLifecycleInput) SetBackupVaultName(v string) *UpdateRecoveryPointLifecycleInput { - s.BackupVaultName = &v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *UpdateRecoveryPointLifecycleInput) SetLifecycle(v *Lifecycle) *UpdateRecoveryPointLifecycleInput { - s.Lifecycle = v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *UpdateRecoveryPointLifecycleInput) SetRecoveryPointArn(v string) *UpdateRecoveryPointLifecycleInput { - s.RecoveryPointArn = &v - return s -} - -type UpdateRecoveryPointLifecycleOutput struct { - _ struct{} `type:"structure"` - - // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. - BackupVaultArn *string `type:"string"` - - // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt - // timestamps. - CalculatedLifecycle *CalculatedLifecycle `type:"structure"` - - // The lifecycle defines when a protected resource is transitioned to cold storage - // and when it expires. AWS Backup transitions and expires backups automatically - // according to the lifecycle that you define. - // - // Backups transitioned to cold storage must be stored in cold storage for a - // minimum of 90 days. Therefore, the “expire after days” setting must be 90 - // days greater than the “transition to cold after days” setting. The “transition - // to cold after days” setting cannot be changed after a backup has been transitioned - // to cold. - Lifecycle *Lifecycle `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; - // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. - RecoveryPointArn *string `type:"string"` -} - -// String returns the string representation -func (s UpdateRecoveryPointLifecycleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRecoveryPointLifecycleOutput) GoString() string { - return s.String() -} - -// SetBackupVaultArn sets the BackupVaultArn field's value. -func (s *UpdateRecoveryPointLifecycleOutput) SetBackupVaultArn(v string) *UpdateRecoveryPointLifecycleOutput { - s.BackupVaultArn = &v - return s -} - -// SetCalculatedLifecycle sets the CalculatedLifecycle field's value. -func (s *UpdateRecoveryPointLifecycleOutput) SetCalculatedLifecycle(v *CalculatedLifecycle) *UpdateRecoveryPointLifecycleOutput { - s.CalculatedLifecycle = v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *UpdateRecoveryPointLifecycleOutput) SetLifecycle(v *Lifecycle) *UpdateRecoveryPointLifecycleOutput { - s.Lifecycle = v - return s -} - -// SetRecoveryPointArn sets the RecoveryPointArn field's value. -func (s *UpdateRecoveryPointLifecycleOutput) SetRecoveryPointArn(v string) *UpdateRecoveryPointLifecycleOutput { - s.RecoveryPointArn = &v - return s -} - -// Contains metadata about a backup vault. -type VaultListMember struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for - // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. - BackupVaultArn *string `type:"string"` - - // The name of a logical container where backups are stored. Backup vaults are - // identified by names that are unique to the account used to create them and - // the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. - BackupVaultName *string `type:"string"` - - // The date and time a resource backup is created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreationDate *time.Time `type:"timestamp"` - - // A unique string that identifies the request and allows failed requests to - // be retried without the risk of executing the operation twice. - CreatorRequestId *string `type:"string"` - - // The server-side encryption key that is used to protect your backups; for - // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. - EncryptionKeyArn *string `type:"string"` - - // The number of recovery points that are stored in a backup vault. - NumberOfRecoveryPoints *int64 `type:"long"` -} - -// String returns the string representation -func (s VaultListMember) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VaultListMember) GoString() string { - return s.String() -} - -// SetBackupVaultArn sets the BackupVaultArn field's value. -func (s *VaultListMember) SetBackupVaultArn(v string) *VaultListMember { - s.BackupVaultArn = &v - return s -} - -// SetBackupVaultName sets the BackupVaultName field's value. -func (s *VaultListMember) SetBackupVaultName(v string) *VaultListMember { - s.BackupVaultName = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *VaultListMember) SetCreationDate(v time.Time) *VaultListMember { - s.CreationDate = &v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *VaultListMember) SetCreatorRequestId(v string) *VaultListMember { - s.CreatorRequestId = &v - return s -} - -// SetEncryptionKeyArn sets the EncryptionKeyArn field's value. -func (s *VaultListMember) SetEncryptionKeyArn(v string) *VaultListMember { - s.EncryptionKeyArn = &v - return s -} - -// SetNumberOfRecoveryPoints sets the NumberOfRecoveryPoints field's value. -func (s *VaultListMember) SetNumberOfRecoveryPoints(v int64) *VaultListMember { - s.NumberOfRecoveryPoints = &v - return s -} - -const ( - // ConditionTypeStringequals is a ConditionType enum value - ConditionTypeStringequals = "STRINGEQUALS" -) - -const ( - // JobStateCreated is a JobState enum value - JobStateCreated = "CREATED" - - // JobStatePending is a JobState enum value - JobStatePending = "PENDING" - - // JobStateRunning is a JobState enum value - JobStateRunning = "RUNNING" - - // JobStateAborting is a JobState enum value - JobStateAborting = "ABORTING" - - // JobStateAborted is a JobState enum value - JobStateAborted = "ABORTED" - - // JobStateCompleted is a JobState enum value - JobStateCompleted = "COMPLETED" - - // JobStateFailed is a JobState enum value - JobStateFailed = "FAILED" - - // JobStateExpired is a JobState enum value - JobStateExpired = "EXPIRED" -) - -const ( - // RecoveryPointStatusCompleted is a RecoveryPointStatus enum value - RecoveryPointStatusCompleted = "COMPLETED" - - // RecoveryPointStatusPartial is a RecoveryPointStatus enum value - RecoveryPointStatusPartial = "PARTIAL" - - // RecoveryPointStatusDeleting is a RecoveryPointStatus enum value - RecoveryPointStatusDeleting = "DELETING" - - // RecoveryPointStatusExpired is a RecoveryPointStatus enum value - RecoveryPointStatusExpired = "EXPIRED" -) - -const ( - // RestoreJobStatusPending is a RestoreJobStatus enum value - RestoreJobStatusPending = "PENDING" - - // RestoreJobStatusRunning is a RestoreJobStatus enum value - RestoreJobStatusRunning = "RUNNING" - - // RestoreJobStatusCompleted is a RestoreJobStatus enum value - RestoreJobStatusCompleted = "COMPLETED" - - // RestoreJobStatusAborted is a RestoreJobStatus enum value - RestoreJobStatusAborted = "ABORTED" - - // RestoreJobStatusFailed is a RestoreJobStatus enum value - RestoreJobStatusFailed = "FAILED" -) - -const ( - // StorageClassWarm is a StorageClass enum value - StorageClassWarm = "WARM" - - // StorageClassCold is a StorageClass enum value - StorageClassCold = "COLD" - - // StorageClassDeleted is a StorageClass enum value - StorageClassDeleted = "DELETED" -) - -const ( - // VaultEventBackupJobStarted is a VaultEvent enum value - VaultEventBackupJobStarted = "BACKUP_JOB_STARTED" - - // VaultEventBackupJobCompleted is a VaultEvent enum value - VaultEventBackupJobCompleted = "BACKUP_JOB_COMPLETED" - - // VaultEventRestoreJobStarted is a VaultEvent enum value - VaultEventRestoreJobStarted = "RESTORE_JOB_STARTED" - - // VaultEventRestoreJobCompleted is a VaultEvent enum value - VaultEventRestoreJobCompleted = "RESTORE_JOB_COMPLETED" - - // VaultEventRecoveryPointModified is a VaultEvent enum value - VaultEventRecoveryPointModified = "RECOVERY_POINT_MODIFIED" - - // VaultEventBackupPlanCreated is a VaultEvent enum value - VaultEventBackupPlanCreated = "BACKUP_PLAN_CREATED" - - // VaultEventBackupPlanModified is a VaultEvent enum value - VaultEventBackupPlanModified = "BACKUP_PLAN_MODIFIED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/backup/doc.go b/vendor/github.com/aws/aws-sdk-go/service/backup/doc.go deleted file mode 100644 index d1013b4c2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/backup/doc.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package backup provides the client and types for making API -// requests to AWS Backup. -// -// AWS Backup is a unified backup service designed to protect AWS services and -// their associated data. AWS Backup simplifies the creation, migration, restoration, -// and deletion of backups, while also providing reporting and auditing. -// -// See https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15 for more information on this service. -// -// See backup package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/backup/ -// -// Using the Client -// -// To contact AWS Backup 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 Backup client Backup for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/backup/#New -package backup diff --git a/vendor/github.com/aws/aws-sdk-go/service/backup/errors.go b/vendor/github.com/aws/aws-sdk-go/service/backup/errors.go deleted file mode 100644 index 06cc16b5a..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/backup/errors.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package backup - -const ( - - // ErrCodeAlreadyExistsException for service response error code - // "AlreadyExistsException". - // - // The required resource already exists. - ErrCodeAlreadyExistsException = "AlreadyExistsException" - - // ErrCodeDependencyFailureException for service response error code - // "DependencyFailureException". - // - // A dependent AWS service or resource returned an error to the AWS Backup service, - // and the action cannot be completed. - ErrCodeDependencyFailureException = "DependencyFailureException" - - // ErrCodeInvalidParameterValueException for service response error code - // "InvalidParameterValueException". - // - // Indicates that something is wrong with a parameter's value. For example, - // the value is out of range. - ErrCodeInvalidParameterValueException = "InvalidParameterValueException" - - // ErrCodeInvalidRequestException for service response error code - // "InvalidRequestException". - // - // Indicates that something is wrong with the input to the request. For example, - // a parameter is of the wrong type. - ErrCodeInvalidRequestException = "InvalidRequestException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // A limit in the request has been exceeded; for example, a maximum number of - // items allowed in a request. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeMissingParameterValueException for service response error code - // "MissingParameterValueException". - // - // Indicates that a required parameter is missing. - ErrCodeMissingParameterValueException = "MissingParameterValueException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // A resource that is required for the action doesn't exist. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeServiceUnavailableException for service response error code - // "ServiceUnavailableException". - // - // The request failed due to a temporary failure of the server. - ErrCodeServiceUnavailableException = "ServiceUnavailableException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/backup/service.go b/vendor/github.com/aws/aws-sdk-go/service/backup/service.go deleted file mode 100644 index 7ec6d9502..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/backup/service.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package backup - -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" -) - -// Backup provides the API operation methods for making requests to -// AWS Backup. See this package's package overview docs -// for details on the service. -// -// Backup methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Backup 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 = "Backup" // Name of service. - EndpointsID = "backup" // ID to lookup a service endpoint with. - ServiceID = "Backup" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Backup 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 Backup client from just a session. -// svc := backup.New(mySession) -// -// // Create a Backup client with additional configuration -// svc := backup.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Backup { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Backup { - svc := &Backup{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-11-15", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Backup operation and runs any -// custom request initialization. -func (c *Backup) 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/batch/api.go b/vendor/github.com/aws/aws-sdk-go/service/batch/api.go deleted file mode 100644 index 6a8daca4a..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/batch/api.go +++ /dev/null @@ -1,5614 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package batch - -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 opCancelJob = "CancelJob" - -// CancelJobRequest generates a "aws/request.Request" representing the -// client's request for the CancelJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelJob for more information on using the CancelJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelJobRequest method. -// req, resp := client.CancelJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CancelJob -func (c *Batch) CancelJobRequest(input *CancelJobInput) (req *request.Request, output *CancelJobOutput) { - op := &request.Operation{ - Name: opCancelJob, - HTTPMethod: "POST", - HTTPPath: "/v1/canceljob", - } - - if input == nil { - input = &CancelJobInput{} - } - - output = &CancelJobOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CancelJob API operation for AWS Batch. -// -// Cancels a job in an AWS Batch job queue. Jobs that are in the SUBMITTED, -// PENDING, or RUNNABLE state are cancelled. Jobs that have progressed to STARTING -// or RUNNING are not cancelled (but the API operation still succeeds, even -// if no job is cancelled); these jobs must be terminated with the TerminateJob -// operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation CancelJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CancelJob -func (c *Batch) CancelJob(input *CancelJobInput) (*CancelJobOutput, error) { - req, out := c.CancelJobRequest(input) - return out, req.Send() -} - -// CancelJobWithContext is the same as CancelJob with the addition of -// the ability to pass a context and additional request options. -// -// See CancelJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) CancelJobWithContext(ctx aws.Context, input *CancelJobInput, opts ...request.Option) (*CancelJobOutput, error) { - req, out := c.CancelJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateComputeEnvironment = "CreateComputeEnvironment" - -// CreateComputeEnvironmentRequest generates a "aws/request.Request" representing the -// client's request for the CreateComputeEnvironment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateComputeEnvironment for more information on using the CreateComputeEnvironment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateComputeEnvironmentRequest method. -// req, resp := client.CreateComputeEnvironmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateComputeEnvironment -func (c *Batch) CreateComputeEnvironmentRequest(input *CreateComputeEnvironmentInput) (req *request.Request, output *CreateComputeEnvironmentOutput) { - op := &request.Operation{ - Name: opCreateComputeEnvironment, - HTTPMethod: "POST", - HTTPPath: "/v1/createcomputeenvironment", - } - - if input == nil { - input = &CreateComputeEnvironmentInput{} - } - - output = &CreateComputeEnvironmentOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateComputeEnvironment API operation for AWS Batch. -// -// Creates an AWS Batch compute environment. You can create MANAGED or UNMANAGED -// compute environments. -// -// In a managed compute environment, AWS Batch manages the capacity and instance -// types of the compute resources within the environment. This is based on the -// compute resource specification that you define or the launch template (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) -// that you specify when you create the compute environment. You can choose -// to use Amazon EC2 On-Demand Instances or Spot Instances in your managed compute -// environment. You can optionally set a maximum price so that Spot Instances -// only launch when the Spot Instance price is below a specified percentage -// of the On-Demand price. -// -// Multi-node parallel jobs are not supported on Spot Instances. -// -// In an unmanaged compute environment, you can manage your own compute resources. -// This provides more compute resource configuration options, such as using -// a custom AMI, but you must ensure that your AMI meets the Amazon ECS container -// instance AMI specification. For more information, see Container Instance -// AMIs (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/container_instance_AMIs.html) -// in the Amazon Elastic Container Service Developer Guide. After you have created -// your unmanaged compute environment, you can use the DescribeComputeEnvironments -// operation to find the Amazon ECS cluster that is associated with it. Then, -// manually launch your container instances into that Amazon ECS cluster. For -// more information, see Launching an Amazon ECS Container Instance (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html) -// in the Amazon Elastic Container Service Developer Guide. -// -// AWS Batch does not upgrade the AMIs in a compute environment after it is -// created (for example, when a newer version of the Amazon ECS-optimized AMI -// is available). You are responsible for the management of the guest operating -// system (including updates and security patches) and any additional application -// software or utilities that you install on the compute resources. To use a -// new AMI for your AWS Batch jobs: -// -// Create a new compute environment with the new AMI. -// -// Add the compute environment to an existing job queue. -// -// Remove the old compute environment from your job queue. -// -// Delete the old compute environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation CreateComputeEnvironment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateComputeEnvironment -func (c *Batch) CreateComputeEnvironment(input *CreateComputeEnvironmentInput) (*CreateComputeEnvironmentOutput, error) { - req, out := c.CreateComputeEnvironmentRequest(input) - return out, req.Send() -} - -// CreateComputeEnvironmentWithContext is the same as CreateComputeEnvironment with the addition of -// the ability to pass a context and additional request options. -// -// See CreateComputeEnvironment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) CreateComputeEnvironmentWithContext(ctx aws.Context, input *CreateComputeEnvironmentInput, opts ...request.Option) (*CreateComputeEnvironmentOutput, error) { - req, out := c.CreateComputeEnvironmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateJobQueue = "CreateJobQueue" - -// CreateJobQueueRequest generates a "aws/request.Request" representing the -// client's request for the CreateJobQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateJobQueue for more information on using the CreateJobQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateJobQueueRequest method. -// req, resp := client.CreateJobQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateJobQueue -func (c *Batch) CreateJobQueueRequest(input *CreateJobQueueInput) (req *request.Request, output *CreateJobQueueOutput) { - op := &request.Operation{ - Name: opCreateJobQueue, - HTTPMethod: "POST", - HTTPPath: "/v1/createjobqueue", - } - - if input == nil { - input = &CreateJobQueueInput{} - } - - output = &CreateJobQueueOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateJobQueue API operation for AWS Batch. -// -// Creates an AWS Batch job queue. When you create a job queue, you associate -// one or more compute environments to the queue and assign an order of preference -// for the compute environments. -// -// You also set a priority to the job queue that determines the order in which -// the AWS Batch scheduler places jobs onto its associated compute environments. -// For example, if a compute environment is associated with more than one job -// queue, the job queue with a higher priority is given preference for scheduling -// jobs to that compute environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation CreateJobQueue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateJobQueue -func (c *Batch) CreateJobQueue(input *CreateJobQueueInput) (*CreateJobQueueOutput, error) { - req, out := c.CreateJobQueueRequest(input) - return out, req.Send() -} - -// CreateJobQueueWithContext is the same as CreateJobQueue with the addition of -// the ability to pass a context and additional request options. -// -// See CreateJobQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) CreateJobQueueWithContext(ctx aws.Context, input *CreateJobQueueInput, opts ...request.Option) (*CreateJobQueueOutput, error) { - req, out := c.CreateJobQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteComputeEnvironment = "DeleteComputeEnvironment" - -// DeleteComputeEnvironmentRequest generates a "aws/request.Request" representing the -// client's request for the DeleteComputeEnvironment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteComputeEnvironment for more information on using the DeleteComputeEnvironment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteComputeEnvironmentRequest method. -// req, resp := client.DeleteComputeEnvironmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteComputeEnvironment -func (c *Batch) DeleteComputeEnvironmentRequest(input *DeleteComputeEnvironmentInput) (req *request.Request, output *DeleteComputeEnvironmentOutput) { - op := &request.Operation{ - Name: opDeleteComputeEnvironment, - HTTPMethod: "POST", - HTTPPath: "/v1/deletecomputeenvironment", - } - - if input == nil { - input = &DeleteComputeEnvironmentInput{} - } - - output = &DeleteComputeEnvironmentOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteComputeEnvironment API operation for AWS Batch. -// -// Deletes an AWS Batch compute environment. -// -// Before you can delete a compute environment, you must set its state to DISABLED -// with the UpdateComputeEnvironment API operation and disassociate it from -// any job queues with the UpdateJobQueue API operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation DeleteComputeEnvironment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteComputeEnvironment -func (c *Batch) DeleteComputeEnvironment(input *DeleteComputeEnvironmentInput) (*DeleteComputeEnvironmentOutput, error) { - req, out := c.DeleteComputeEnvironmentRequest(input) - return out, req.Send() -} - -// DeleteComputeEnvironmentWithContext is the same as DeleteComputeEnvironment with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteComputeEnvironment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) DeleteComputeEnvironmentWithContext(ctx aws.Context, input *DeleteComputeEnvironmentInput, opts ...request.Option) (*DeleteComputeEnvironmentOutput, error) { - req, out := c.DeleteComputeEnvironmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteJobQueue = "DeleteJobQueue" - -// DeleteJobQueueRequest generates a "aws/request.Request" representing the -// client's request for the DeleteJobQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteJobQueue for more information on using the DeleteJobQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteJobQueueRequest method. -// req, resp := client.DeleteJobQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteJobQueue -func (c *Batch) DeleteJobQueueRequest(input *DeleteJobQueueInput) (req *request.Request, output *DeleteJobQueueOutput) { - op := &request.Operation{ - Name: opDeleteJobQueue, - HTTPMethod: "POST", - HTTPPath: "/v1/deletejobqueue", - } - - if input == nil { - input = &DeleteJobQueueInput{} - } - - output = &DeleteJobQueueOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteJobQueue API operation for AWS Batch. -// -// Deletes the specified job queue. You must first disable submissions for a -// queue with the UpdateJobQueue operation. All jobs in the queue are terminated -// when you delete a job queue. -// -// It is not necessary to disassociate compute environments from a queue before -// submitting a DeleteJobQueue request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation DeleteJobQueue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteJobQueue -func (c *Batch) DeleteJobQueue(input *DeleteJobQueueInput) (*DeleteJobQueueOutput, error) { - req, out := c.DeleteJobQueueRequest(input) - return out, req.Send() -} - -// DeleteJobQueueWithContext is the same as DeleteJobQueue with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteJobQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) DeleteJobQueueWithContext(ctx aws.Context, input *DeleteJobQueueInput, opts ...request.Option) (*DeleteJobQueueOutput, error) { - req, out := c.DeleteJobQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterJobDefinition = "DeregisterJobDefinition" - -// DeregisterJobDefinitionRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterJobDefinition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterJobDefinition for more information on using the DeregisterJobDefinition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterJobDefinitionRequest method. -// req, resp := client.DeregisterJobDefinitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeregisterJobDefinition -func (c *Batch) DeregisterJobDefinitionRequest(input *DeregisterJobDefinitionInput) (req *request.Request, output *DeregisterJobDefinitionOutput) { - op := &request.Operation{ - Name: opDeregisterJobDefinition, - HTTPMethod: "POST", - HTTPPath: "/v1/deregisterjobdefinition", - } - - if input == nil { - input = &DeregisterJobDefinitionInput{} - } - - output = &DeregisterJobDefinitionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterJobDefinition API operation for AWS Batch. -// -// Deregisters an AWS Batch job definition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation DeregisterJobDefinition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeregisterJobDefinition -func (c *Batch) DeregisterJobDefinition(input *DeregisterJobDefinitionInput) (*DeregisterJobDefinitionOutput, error) { - req, out := c.DeregisterJobDefinitionRequest(input) - return out, req.Send() -} - -// DeregisterJobDefinitionWithContext is the same as DeregisterJobDefinition with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterJobDefinition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) DeregisterJobDefinitionWithContext(ctx aws.Context, input *DeregisterJobDefinitionInput, opts ...request.Option) (*DeregisterJobDefinitionOutput, error) { - req, out := c.DeregisterJobDefinitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeComputeEnvironments = "DescribeComputeEnvironments" - -// DescribeComputeEnvironmentsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeComputeEnvironments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeComputeEnvironments for more information on using the DescribeComputeEnvironments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeComputeEnvironmentsRequest method. -// req, resp := client.DescribeComputeEnvironmentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeComputeEnvironments -func (c *Batch) DescribeComputeEnvironmentsRequest(input *DescribeComputeEnvironmentsInput) (req *request.Request, output *DescribeComputeEnvironmentsOutput) { - op := &request.Operation{ - Name: opDescribeComputeEnvironments, - HTTPMethod: "POST", - HTTPPath: "/v1/describecomputeenvironments", - } - - if input == nil { - input = &DescribeComputeEnvironmentsInput{} - } - - output = &DescribeComputeEnvironmentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeComputeEnvironments API operation for AWS Batch. -// -// Describes one or more of your compute environments. -// -// If you are using an unmanaged compute environment, you can use the DescribeComputeEnvironment -// operation to determine the ecsClusterArn that you should launch your Amazon -// ECS container instances into. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation DescribeComputeEnvironments for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeComputeEnvironments -func (c *Batch) DescribeComputeEnvironments(input *DescribeComputeEnvironmentsInput) (*DescribeComputeEnvironmentsOutput, error) { - req, out := c.DescribeComputeEnvironmentsRequest(input) - return out, req.Send() -} - -// DescribeComputeEnvironmentsWithContext is the same as DescribeComputeEnvironments with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeComputeEnvironments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) DescribeComputeEnvironmentsWithContext(ctx aws.Context, input *DescribeComputeEnvironmentsInput, opts ...request.Option) (*DescribeComputeEnvironmentsOutput, error) { - req, out := c.DescribeComputeEnvironmentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeJobDefinitions = "DescribeJobDefinitions" - -// DescribeJobDefinitionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeJobDefinitions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeJobDefinitions for more information on using the DescribeJobDefinitions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeJobDefinitionsRequest method. -// req, resp := client.DescribeJobDefinitionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobDefinitions -func (c *Batch) DescribeJobDefinitionsRequest(input *DescribeJobDefinitionsInput) (req *request.Request, output *DescribeJobDefinitionsOutput) { - op := &request.Operation{ - Name: opDescribeJobDefinitions, - HTTPMethod: "POST", - HTTPPath: "/v1/describejobdefinitions", - } - - if input == nil { - input = &DescribeJobDefinitionsInput{} - } - - output = &DescribeJobDefinitionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeJobDefinitions API operation for AWS Batch. -// -// Describes a list of job definitions. You can specify a status (such as ACTIVE) -// to only return job definitions that match that 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 Batch's -// API operation DescribeJobDefinitions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobDefinitions -func (c *Batch) DescribeJobDefinitions(input *DescribeJobDefinitionsInput) (*DescribeJobDefinitionsOutput, error) { - req, out := c.DescribeJobDefinitionsRequest(input) - return out, req.Send() -} - -// DescribeJobDefinitionsWithContext is the same as DescribeJobDefinitions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeJobDefinitions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) DescribeJobDefinitionsWithContext(ctx aws.Context, input *DescribeJobDefinitionsInput, opts ...request.Option) (*DescribeJobDefinitionsOutput, error) { - req, out := c.DescribeJobDefinitionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeJobQueues = "DescribeJobQueues" - -// DescribeJobQueuesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeJobQueues operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeJobQueues for more information on using the DescribeJobQueues -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeJobQueuesRequest method. -// req, resp := client.DescribeJobQueuesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobQueues -func (c *Batch) DescribeJobQueuesRequest(input *DescribeJobQueuesInput) (req *request.Request, output *DescribeJobQueuesOutput) { - op := &request.Operation{ - Name: opDescribeJobQueues, - HTTPMethod: "POST", - HTTPPath: "/v1/describejobqueues", - } - - if input == nil { - input = &DescribeJobQueuesInput{} - } - - output = &DescribeJobQueuesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeJobQueues API operation for AWS Batch. -// -// Describes one or more of your job queues. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation DescribeJobQueues for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobQueues -func (c *Batch) DescribeJobQueues(input *DescribeJobQueuesInput) (*DescribeJobQueuesOutput, error) { - req, out := c.DescribeJobQueuesRequest(input) - return out, req.Send() -} - -// DescribeJobQueuesWithContext is the same as DescribeJobQueues with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeJobQueues for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) DescribeJobQueuesWithContext(ctx aws.Context, input *DescribeJobQueuesInput, opts ...request.Option) (*DescribeJobQueuesOutput, error) { - req, out := c.DescribeJobQueuesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeJobs = "DescribeJobs" - -// DescribeJobsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeJobs for more information on using the DescribeJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeJobsRequest method. -// req, resp := client.DescribeJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobs -func (c *Batch) DescribeJobsRequest(input *DescribeJobsInput) (req *request.Request, output *DescribeJobsOutput) { - op := &request.Operation{ - Name: opDescribeJobs, - HTTPMethod: "POST", - HTTPPath: "/v1/describejobs", - } - - if input == nil { - input = &DescribeJobsInput{} - } - - output = &DescribeJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeJobs API operation for AWS Batch. -// -// Describes a list of AWS Batch jobs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation DescribeJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobs -func (c *Batch) DescribeJobs(input *DescribeJobsInput) (*DescribeJobsOutput, error) { - req, out := c.DescribeJobsRequest(input) - return out, req.Send() -} - -// DescribeJobsWithContext is the same as DescribeJobs with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) DescribeJobsWithContext(ctx aws.Context, input *DescribeJobsInput, opts ...request.Option) (*DescribeJobsOutput, error) { - req, out := c.DescribeJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListJobs = "ListJobs" - -// ListJobsRequest generates a "aws/request.Request" representing the -// client's request for the ListJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListJobs for more information on using the ListJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListJobsRequest method. -// req, resp := client.ListJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ListJobs -func (c *Batch) ListJobsRequest(input *ListJobsInput) (req *request.Request, output *ListJobsOutput) { - op := &request.Operation{ - Name: opListJobs, - HTTPMethod: "POST", - HTTPPath: "/v1/listjobs", - } - - if input == nil { - input = &ListJobsInput{} - } - - output = &ListJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListJobs API operation for AWS Batch. -// -// Returns a list of AWS Batch jobs. -// -// You must specify only one of the following: -// -// * a job queue ID to return a list of jobs in that job queue -// -// * a multi-node parallel job ID to return a list of that job's nodes -// -// * an array job ID to return a list of that job's children -// -// You can filter the results by job status with the jobStatus parameter. If -// you do not specify a status, only RUNNING jobs are returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation ListJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ListJobs -func (c *Batch) ListJobs(input *ListJobsInput) (*ListJobsOutput, error) { - req, out := c.ListJobsRequest(input) - return out, req.Send() -} - -// ListJobsWithContext is the same as ListJobs with the addition of -// the ability to pass a context and additional request options. -// -// See ListJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) ListJobsWithContext(ctx aws.Context, input *ListJobsInput, opts ...request.Option) (*ListJobsOutput, error) { - req, out := c.ListJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterJobDefinition = "RegisterJobDefinition" - -// RegisterJobDefinitionRequest generates a "aws/request.Request" representing the -// client's request for the RegisterJobDefinition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterJobDefinition for more information on using the RegisterJobDefinition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterJobDefinitionRequest method. -// req, resp := client.RegisterJobDefinitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/RegisterJobDefinition -func (c *Batch) RegisterJobDefinitionRequest(input *RegisterJobDefinitionInput) (req *request.Request, output *RegisterJobDefinitionOutput) { - op := &request.Operation{ - Name: opRegisterJobDefinition, - HTTPMethod: "POST", - HTTPPath: "/v1/registerjobdefinition", - } - - if input == nil { - input = &RegisterJobDefinitionInput{} - } - - output = &RegisterJobDefinitionOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterJobDefinition API operation for AWS Batch. -// -// Registers an AWS Batch job definition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation RegisterJobDefinition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/RegisterJobDefinition -func (c *Batch) RegisterJobDefinition(input *RegisterJobDefinitionInput) (*RegisterJobDefinitionOutput, error) { - req, out := c.RegisterJobDefinitionRequest(input) - return out, req.Send() -} - -// RegisterJobDefinitionWithContext is the same as RegisterJobDefinition with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterJobDefinition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) RegisterJobDefinitionWithContext(ctx aws.Context, input *RegisterJobDefinitionInput, opts ...request.Option) (*RegisterJobDefinitionOutput, error) { - req, out := c.RegisterJobDefinitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSubmitJob = "SubmitJob" - -// SubmitJobRequest generates a "aws/request.Request" representing the -// client's request for the SubmitJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SubmitJob for more information on using the SubmitJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SubmitJobRequest method. -// req, resp := client.SubmitJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/SubmitJob -func (c *Batch) SubmitJobRequest(input *SubmitJobInput) (req *request.Request, output *SubmitJobOutput) { - op := &request.Operation{ - Name: opSubmitJob, - HTTPMethod: "POST", - HTTPPath: "/v1/submitjob", - } - - if input == nil { - input = &SubmitJobInput{} - } - - output = &SubmitJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// SubmitJob API operation for AWS Batch. -// -// Submits an AWS Batch job from a job definition. Parameters specified during -// SubmitJob override parameters defined in the job definition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation SubmitJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/SubmitJob -func (c *Batch) SubmitJob(input *SubmitJobInput) (*SubmitJobOutput, error) { - req, out := c.SubmitJobRequest(input) - return out, req.Send() -} - -// SubmitJobWithContext is the same as SubmitJob with the addition of -// the ability to pass a context and additional request options. -// -// See SubmitJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) SubmitJobWithContext(ctx aws.Context, input *SubmitJobInput, opts ...request.Option) (*SubmitJobOutput, error) { - req, out := c.SubmitJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTerminateJob = "TerminateJob" - -// TerminateJobRequest generates a "aws/request.Request" representing the -// client's request for the TerminateJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TerminateJob for more information on using the TerminateJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TerminateJobRequest method. -// req, resp := client.TerminateJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/TerminateJob -func (c *Batch) TerminateJobRequest(input *TerminateJobInput) (req *request.Request, output *TerminateJobOutput) { - op := &request.Operation{ - Name: opTerminateJob, - HTTPMethod: "POST", - HTTPPath: "/v1/terminatejob", - } - - if input == nil { - input = &TerminateJobInput{} - } - - output = &TerminateJobOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TerminateJob API operation for AWS Batch. -// -// Terminates a job in a job queue. Jobs that are in the STARTING or RUNNING -// state are terminated, which causes them to transition to FAILED. Jobs that -// have not progressed to the STARTING state are cancelled. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation TerminateJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/TerminateJob -func (c *Batch) TerminateJob(input *TerminateJobInput) (*TerminateJobOutput, error) { - req, out := c.TerminateJobRequest(input) - return out, req.Send() -} - -// TerminateJobWithContext is the same as TerminateJob with the addition of -// the ability to pass a context and additional request options. -// -// See TerminateJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) TerminateJobWithContext(ctx aws.Context, input *TerminateJobInput, opts ...request.Option) (*TerminateJobOutput, error) { - req, out := c.TerminateJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateComputeEnvironment = "UpdateComputeEnvironment" - -// UpdateComputeEnvironmentRequest generates a "aws/request.Request" representing the -// client's request for the UpdateComputeEnvironment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateComputeEnvironment for more information on using the UpdateComputeEnvironment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateComputeEnvironmentRequest method. -// req, resp := client.UpdateComputeEnvironmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateComputeEnvironment -func (c *Batch) UpdateComputeEnvironmentRequest(input *UpdateComputeEnvironmentInput) (req *request.Request, output *UpdateComputeEnvironmentOutput) { - op := &request.Operation{ - Name: opUpdateComputeEnvironment, - HTTPMethod: "POST", - HTTPPath: "/v1/updatecomputeenvironment", - } - - if input == nil { - input = &UpdateComputeEnvironmentInput{} - } - - output = &UpdateComputeEnvironmentOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateComputeEnvironment API operation for AWS Batch. -// -// Updates an AWS Batch compute environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation UpdateComputeEnvironment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateComputeEnvironment -func (c *Batch) UpdateComputeEnvironment(input *UpdateComputeEnvironmentInput) (*UpdateComputeEnvironmentOutput, error) { - req, out := c.UpdateComputeEnvironmentRequest(input) - return out, req.Send() -} - -// UpdateComputeEnvironmentWithContext is the same as UpdateComputeEnvironment with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateComputeEnvironment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) UpdateComputeEnvironmentWithContext(ctx aws.Context, input *UpdateComputeEnvironmentInput, opts ...request.Option) (*UpdateComputeEnvironmentOutput, error) { - req, out := c.UpdateComputeEnvironmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateJobQueue = "UpdateJobQueue" - -// UpdateJobQueueRequest generates a "aws/request.Request" representing the -// client's request for the UpdateJobQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateJobQueue for more information on using the UpdateJobQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateJobQueueRequest method. -// req, resp := client.UpdateJobQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateJobQueue -func (c *Batch) UpdateJobQueueRequest(input *UpdateJobQueueInput) (req *request.Request, output *UpdateJobQueueOutput) { - op := &request.Operation{ - Name: opUpdateJobQueue, - HTTPMethod: "POST", - HTTPPath: "/v1/updatejobqueue", - } - - if input == nil { - input = &UpdateJobQueueInput{} - } - - output = &UpdateJobQueueOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateJobQueue API operation for AWS Batch. -// -// Updates a job queue. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Batch's -// API operation UpdateJobQueue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateJobQueue -func (c *Batch) UpdateJobQueue(input *UpdateJobQueueInput) (*UpdateJobQueueOutput, error) { - req, out := c.UpdateJobQueueRequest(input) - return out, req.Send() -} - -// UpdateJobQueueWithContext is the same as UpdateJobQueue with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateJobQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Batch) UpdateJobQueueWithContext(ctx aws.Context, input *UpdateJobQueueInput, opts ...request.Option) (*UpdateJobQueueOutput, error) { - req, out := c.UpdateJobQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// An object representing an AWS Batch array job. -type ArrayProperties struct { - _ struct{} `type:"structure"` - - // The size of the array job. - Size *int64 `locationName:"size" type:"integer"` -} - -// String returns the string representation -func (s ArrayProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ArrayProperties) GoString() string { - return s.String() -} - -// SetSize sets the Size field's value. -func (s *ArrayProperties) SetSize(v int64) *ArrayProperties { - s.Size = &v - return s -} - -// An object representing the array properties of a job. -type ArrayPropertiesDetail struct { - _ struct{} `type:"structure"` - - // The job index within the array that is associated with this job. This parameter - // is returned for array job children. - Index *int64 `locationName:"index" type:"integer"` - - // The size of the array job. This parameter is returned for parent array jobs. - Size *int64 `locationName:"size" type:"integer"` - - // A summary of the number of array job children in each available job status. - // This parameter is returned for parent array jobs. - StatusSummary map[string]*int64 `locationName:"statusSummary" type:"map"` -} - -// String returns the string representation -func (s ArrayPropertiesDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ArrayPropertiesDetail) GoString() string { - return s.String() -} - -// SetIndex sets the Index field's value. -func (s *ArrayPropertiesDetail) SetIndex(v int64) *ArrayPropertiesDetail { - s.Index = &v - return s -} - -// SetSize sets the Size field's value. -func (s *ArrayPropertiesDetail) SetSize(v int64) *ArrayPropertiesDetail { - s.Size = &v - return s -} - -// SetStatusSummary sets the StatusSummary field's value. -func (s *ArrayPropertiesDetail) SetStatusSummary(v map[string]*int64) *ArrayPropertiesDetail { - s.StatusSummary = v - return s -} - -// An object representing the array properties of a job. -type ArrayPropertiesSummary struct { - _ struct{} `type:"structure"` - - // The job index within the array that is associated with this job. This parameter - // is returned for children of array jobs. - Index *int64 `locationName:"index" type:"integer"` - - // The size of the array job. This parameter is returned for parent array jobs. - Size *int64 `locationName:"size" type:"integer"` -} - -// String returns the string representation -func (s ArrayPropertiesSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ArrayPropertiesSummary) GoString() string { - return s.String() -} - -// SetIndex sets the Index field's value. -func (s *ArrayPropertiesSummary) SetIndex(v int64) *ArrayPropertiesSummary { - s.Index = &v - return s -} - -// SetSize sets the Size field's value. -func (s *ArrayPropertiesSummary) SetSize(v int64) *ArrayPropertiesSummary { - s.Size = &v - return s -} - -// An object representing the details of a container that is part of a job attempt. -type AttemptContainerDetail struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the Amazon ECS container instance that - // hosts the job attempt. - ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"` - - // The exit code for the job attempt. A non-zero exit code is considered a failure. - ExitCode *int64 `locationName:"exitCode" type:"integer"` - - // The name of the CloudWatch Logs log stream associated with the container. - // The log group for AWS Batch jobs is /aws/batch/job. Each container attempt - // receives a log stream name when they reach the RUNNING status. - LogStreamName *string `locationName:"logStreamName" type:"string"` - - // The network interfaces associated with the job attempt. - NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaces" type:"list"` - - // A short (255 max characters) human-readable string to provide additional - // details about a running or stopped container. - Reason *string `locationName:"reason" type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon ECS task that is associated - // with the job attempt. Each container attempt receives a task ARN when they - // reach the STARTING status. - TaskArn *string `locationName:"taskArn" type:"string"` -} - -// String returns the string representation -func (s AttemptContainerDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttemptContainerDetail) GoString() string { - return s.String() -} - -// SetContainerInstanceArn sets the ContainerInstanceArn field's value. -func (s *AttemptContainerDetail) SetContainerInstanceArn(v string) *AttemptContainerDetail { - s.ContainerInstanceArn = &v - return s -} - -// SetExitCode sets the ExitCode field's value. -func (s *AttemptContainerDetail) SetExitCode(v int64) *AttemptContainerDetail { - s.ExitCode = &v - return s -} - -// SetLogStreamName sets the LogStreamName field's value. -func (s *AttemptContainerDetail) SetLogStreamName(v string) *AttemptContainerDetail { - s.LogStreamName = &v - return s -} - -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *AttemptContainerDetail) SetNetworkInterfaces(v []*NetworkInterface) *AttemptContainerDetail { - s.NetworkInterfaces = v - return s -} - -// SetReason sets the Reason field's value. -func (s *AttemptContainerDetail) SetReason(v string) *AttemptContainerDetail { - s.Reason = &v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *AttemptContainerDetail) SetTaskArn(v string) *AttemptContainerDetail { - s.TaskArn = &v - return s -} - -// An object representing a job attempt. -type AttemptDetail struct { - _ struct{} `type:"structure"` - - // Details about the container in this job attempt. - Container *AttemptContainerDetail `locationName:"container" type:"structure"` - - // The Unix timestamp (in seconds and milliseconds) for when the attempt was - // started (when the attempt transitioned from the STARTING state to the RUNNING - // state). - StartedAt *int64 `locationName:"startedAt" type:"long"` - - // A short, human-readable string to provide additional details about the current - // status of the job attempt. - StatusReason *string `locationName:"statusReason" type:"string"` - - // The Unix timestamp (in seconds and milliseconds) for when the attempt was - // stopped (when the attempt transitioned from the RUNNING state to a terminal - // state, such as SUCCEEDED or FAILED). - StoppedAt *int64 `locationName:"stoppedAt" type:"long"` -} - -// String returns the string representation -func (s AttemptDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttemptDetail) GoString() string { - return s.String() -} - -// SetContainer sets the Container field's value. -func (s *AttemptDetail) SetContainer(v *AttemptContainerDetail) *AttemptDetail { - s.Container = v - return s -} - -// SetStartedAt sets the StartedAt field's value. -func (s *AttemptDetail) SetStartedAt(v int64) *AttemptDetail { - s.StartedAt = &v - return s -} - -// SetStatusReason sets the StatusReason field's value. -func (s *AttemptDetail) SetStatusReason(v string) *AttemptDetail { - s.StatusReason = &v - return s -} - -// SetStoppedAt sets the StoppedAt field's value. -func (s *AttemptDetail) SetStoppedAt(v int64) *AttemptDetail { - s.StoppedAt = &v - return s -} - -type CancelJobInput struct { - _ struct{} `type:"structure"` - - // The AWS Batch job ID of the job to cancel. - // - // JobId is a required field - JobId *string `locationName:"jobId" type:"string" required:"true"` - - // A message to attach to the job that explains the reason for canceling it. - // This message is returned by future DescribeJobs operations on the job. This - // message is also recorded in the AWS Batch activity logs. - // - // Reason is a required field - Reason *string `locationName:"reason" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelJobInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.Reason == nil { - invalidParams.Add(request.NewErrParamRequired("Reason")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobId sets the JobId field's value. -func (s *CancelJobInput) SetJobId(v string) *CancelJobInput { - s.JobId = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *CancelJobInput) SetReason(v string) *CancelJobInput { - s.Reason = &v - return s -} - -type CancelJobOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CancelJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelJobOutput) GoString() string { - return s.String() -} - -// An object representing an AWS Batch compute environment. -type ComputeEnvironmentDetail struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the compute environment. - // - // ComputeEnvironmentArn is a required field - ComputeEnvironmentArn *string `locationName:"computeEnvironmentArn" type:"string" required:"true"` - - // The name of the compute environment. - // - // ComputeEnvironmentName is a required field - ComputeEnvironmentName *string `locationName:"computeEnvironmentName" type:"string" required:"true"` - - // The compute resources defined for the compute environment. - ComputeResources *ComputeResource `locationName:"computeResources" type:"structure"` - - // The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used - // by the compute environment. - // - // EcsClusterArn is a required field - EcsClusterArn *string `locationName:"ecsClusterArn" type:"string" required:"true"` - - // The service role associated with the compute environment that allows AWS - // Batch to make calls to AWS API operations on your behalf. - ServiceRole *string `locationName:"serviceRole" type:"string"` - - // The state of the compute environment. The valid values are ENABLED or DISABLED. - // - // If the state is ENABLED, then the AWS Batch scheduler can attempt to place - // jobs from an associated job queue on the compute resources within the environment. - // If the compute environment is managed, then it can scale its instances out - // or in automatically, based on the job queue demand. - // - // If the state is DISABLED, then the AWS Batch scheduler does not attempt to - // place jobs within the environment. Jobs in a STARTING or RUNNING state continue - // to progress normally. Managed compute environments in the DISABLED state - // do not scale out. However, they scale in to minvCpus value after instances - // become idle. - State *string `locationName:"state" type:"string" enum:"CEState"` - - // The current status of the compute environment (for example, CREATING or VALID). - Status *string `locationName:"status" type:"string" enum:"CEStatus"` - - // A short, human-readable string to provide additional details about the current - // status of the compute environment. - StatusReason *string `locationName:"statusReason" type:"string"` - - // The type of the compute environment. - Type *string `locationName:"type" type:"string" enum:"CEType"` -} - -// String returns the string representation -func (s ComputeEnvironmentDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComputeEnvironmentDetail) GoString() string { - return s.String() -} - -// SetComputeEnvironmentArn sets the ComputeEnvironmentArn field's value. -func (s *ComputeEnvironmentDetail) SetComputeEnvironmentArn(v string) *ComputeEnvironmentDetail { - s.ComputeEnvironmentArn = &v - return s -} - -// SetComputeEnvironmentName sets the ComputeEnvironmentName field's value. -func (s *ComputeEnvironmentDetail) SetComputeEnvironmentName(v string) *ComputeEnvironmentDetail { - s.ComputeEnvironmentName = &v - return s -} - -// SetComputeResources sets the ComputeResources field's value. -func (s *ComputeEnvironmentDetail) SetComputeResources(v *ComputeResource) *ComputeEnvironmentDetail { - s.ComputeResources = v - return s -} - -// SetEcsClusterArn sets the EcsClusterArn field's value. -func (s *ComputeEnvironmentDetail) SetEcsClusterArn(v string) *ComputeEnvironmentDetail { - s.EcsClusterArn = &v - return s -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *ComputeEnvironmentDetail) SetServiceRole(v string) *ComputeEnvironmentDetail { - s.ServiceRole = &v - return s -} - -// SetState sets the State field's value. -func (s *ComputeEnvironmentDetail) SetState(v string) *ComputeEnvironmentDetail { - s.State = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ComputeEnvironmentDetail) SetStatus(v string) *ComputeEnvironmentDetail { - s.Status = &v - return s -} - -// SetStatusReason sets the StatusReason field's value. -func (s *ComputeEnvironmentDetail) SetStatusReason(v string) *ComputeEnvironmentDetail { - s.StatusReason = &v - return s -} - -// SetType sets the Type field's value. -func (s *ComputeEnvironmentDetail) SetType(v string) *ComputeEnvironmentDetail { - s.Type = &v - return s -} - -// The order in which compute environments are tried for job placement within -// a queue. Compute environments are tried in ascending order. For example, -// if two compute environments are associated with a job queue, the compute -// environment with a lower order integer value is tried for job placement first. -type ComputeEnvironmentOrder struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the compute environment. - // - // ComputeEnvironment is a required field - ComputeEnvironment *string `locationName:"computeEnvironment" type:"string" required:"true"` - - // The order of the compute environment. - // - // Order is a required field - Order *int64 `locationName:"order" type:"integer" required:"true"` -} - -// String returns the string representation -func (s ComputeEnvironmentOrder) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComputeEnvironmentOrder) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ComputeEnvironmentOrder) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ComputeEnvironmentOrder"} - if s.ComputeEnvironment == nil { - invalidParams.Add(request.NewErrParamRequired("ComputeEnvironment")) - } - if s.Order == nil { - invalidParams.Add(request.NewErrParamRequired("Order")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComputeEnvironment sets the ComputeEnvironment field's value. -func (s *ComputeEnvironmentOrder) SetComputeEnvironment(v string) *ComputeEnvironmentOrder { - s.ComputeEnvironment = &v - return s -} - -// SetOrder sets the Order field's value. -func (s *ComputeEnvironmentOrder) SetOrder(v int64) *ComputeEnvironmentOrder { - s.Order = &v - return s -} - -// An object representing an AWS Batch compute resource. -type ComputeResource struct { - _ struct{} `type:"structure"` - - // The maximum percentage that a Spot Instance price can be when compared with - // the On-Demand price for that instance type before instances are launched. - // For example, if your maximum percentage is 20%, then the Spot price must - // be below 20% of the current On-Demand price for that EC2 instance. You always - // pay the lowest (market) price and never more than your maximum percentage. - // If you leave this field empty, the default value is 100% of the On-Demand - // price. - BidPercentage *int64 `locationName:"bidPercentage" type:"integer"` - - // The desired number of EC2 vCPUS in the compute environment. - DesiredvCpus *int64 `locationName:"desiredvCpus" type:"integer"` - - // The EC2 key pair that is used for instances launched in the compute environment. - Ec2KeyPair *string `locationName:"ec2KeyPair" type:"string"` - - // The Amazon Machine Image (AMI) ID used for instances launched in the compute - // environment. - ImageId *string `locationName:"imageId" type:"string"` - - // The Amazon ECS instance profile applied to Amazon EC2 instances in a compute - // environment. You can specify the short name or full Amazon Resource Name - // (ARN) of an instance profile. For example, ecsInstanceRole or arn:aws:iam:::instance-profile/ecsInstanceRole. - // For more information, see Amazon ECS Instance Role (http://docs.aws.amazon.com/batch/latest/userguide/instance_IAM_role.html) - // in the AWS Batch User Guide. - // - // InstanceRole is a required field - InstanceRole *string `locationName:"instanceRole" type:"string" required:"true"` - - // The instances types that may be launched. You can specify instance families - // to launch any instance type within those families (for example, c4 or p3), - // or you can specify specific sizes within a family (such as c4.8xlarge). You - // can also choose optimal to pick instance types (from the latest C, M, and - // R instance families) on the fly that match the demand of your job queues. - // - // InstanceTypes is a required field - InstanceTypes []*string `locationName:"instanceTypes" type:"list" required:"true"` - - // The launch template to use for your compute resources. Any other compute - // resource parameters that you specify in a CreateComputeEnvironment API operation - // override the same parameters in the launch template. You must specify either - // the launch template ID or launch template name in the request, but not both. - LaunchTemplate *LaunchTemplateSpecification `locationName:"launchTemplate" type:"structure"` - - // The maximum number of EC2 vCPUs that an environment can reach. - // - // MaxvCpus is a required field - MaxvCpus *int64 `locationName:"maxvCpus" type:"integer" required:"true"` - - // The minimum number of EC2 vCPUs that an environment should maintain (even - // if the compute environment is DISABLED). - // - // MinvCpus is a required field - MinvCpus *int64 `locationName:"minvCpus" type:"integer" required:"true"` - - // The Amazon EC2 placement group to associate with your compute resources. - // If you intend to submit multi-node parallel jobs to your compute environment, - // you should consider creating a cluster placement group and associate it with - // your compute resources. This keeps your multi-node parallel job on a logical - // grouping of instances within a single Availability Zone with high network - // flow potential. For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) - // in the Amazon EC2 User Guide for Linux Instances. - PlacementGroup *string `locationName:"placementGroup" type:"string"` - - // The EC2 security group that is associated with instances launched in the - // compute environment. - SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list"` - - // The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied - // to a SPOT compute environment. - SpotIamFleetRole *string `locationName:"spotIamFleetRole" type:"string"` - - // The VPC subnets into which the compute resources are launched. - // - // Subnets is a required field - Subnets []*string `locationName:"subnets" type:"list" required:"true"` - - // Key-value pair tags to be applied to resources that are launched in the compute - // environment. - Tags map[string]*string `locationName:"tags" type:"map"` - - // The type of compute environment. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"CRType"` -} - -// String returns the string representation -func (s ComputeResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComputeResource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ComputeResource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ComputeResource"} - if s.InstanceRole == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceRole")) - } - if s.InstanceTypes == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceTypes")) - } - if s.MaxvCpus == nil { - invalidParams.Add(request.NewErrParamRequired("MaxvCpus")) - } - if s.MinvCpus == nil { - invalidParams.Add(request.NewErrParamRequired("MinvCpus")) - } - if s.Subnets == nil { - invalidParams.Add(request.NewErrParamRequired("Subnets")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBidPercentage sets the BidPercentage field's value. -func (s *ComputeResource) SetBidPercentage(v int64) *ComputeResource { - s.BidPercentage = &v - return s -} - -// SetDesiredvCpus sets the DesiredvCpus field's value. -func (s *ComputeResource) SetDesiredvCpus(v int64) *ComputeResource { - s.DesiredvCpus = &v - return s -} - -// SetEc2KeyPair sets the Ec2KeyPair field's value. -func (s *ComputeResource) SetEc2KeyPair(v string) *ComputeResource { - s.Ec2KeyPair = &v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *ComputeResource) SetImageId(v string) *ComputeResource { - s.ImageId = &v - return s -} - -// SetInstanceRole sets the InstanceRole field's value. -func (s *ComputeResource) SetInstanceRole(v string) *ComputeResource { - s.InstanceRole = &v - return s -} - -// SetInstanceTypes sets the InstanceTypes field's value. -func (s *ComputeResource) SetInstanceTypes(v []*string) *ComputeResource { - s.InstanceTypes = v - return s -} - -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *ComputeResource) SetLaunchTemplate(v *LaunchTemplateSpecification) *ComputeResource { - s.LaunchTemplate = v - return s -} - -// SetMaxvCpus sets the MaxvCpus field's value. -func (s *ComputeResource) SetMaxvCpus(v int64) *ComputeResource { - s.MaxvCpus = &v - return s -} - -// SetMinvCpus sets the MinvCpus field's value. -func (s *ComputeResource) SetMinvCpus(v int64) *ComputeResource { - s.MinvCpus = &v - return s -} - -// SetPlacementGroup sets the PlacementGroup field's value. -func (s *ComputeResource) SetPlacementGroup(v string) *ComputeResource { - s.PlacementGroup = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *ComputeResource) SetSecurityGroupIds(v []*string) *ComputeResource { - s.SecurityGroupIds = v - return s -} - -// SetSpotIamFleetRole sets the SpotIamFleetRole field's value. -func (s *ComputeResource) SetSpotIamFleetRole(v string) *ComputeResource { - s.SpotIamFleetRole = &v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *ComputeResource) SetSubnets(v []*string) *ComputeResource { - s.Subnets = v - return s -} - -// SetTags sets the Tags field's value. -func (s *ComputeResource) SetTags(v map[string]*string) *ComputeResource { - s.Tags = v - return s -} - -// SetType sets the Type field's value. -func (s *ComputeResource) SetType(v string) *ComputeResource { - s.Type = &v - return s -} - -// An object representing the attributes of a compute environment that can be -// updated. -type ComputeResourceUpdate struct { - _ struct{} `type:"structure"` - - // The desired number of EC2 vCPUS in the compute environment. - DesiredvCpus *int64 `locationName:"desiredvCpus" type:"integer"` - - // The maximum number of EC2 vCPUs that an environment can reach. - MaxvCpus *int64 `locationName:"maxvCpus" type:"integer"` - - // The minimum number of EC2 vCPUs that an environment should maintain. - MinvCpus *int64 `locationName:"minvCpus" type:"integer"` -} - -// String returns the string representation -func (s ComputeResourceUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComputeResourceUpdate) GoString() string { - return s.String() -} - -// SetDesiredvCpus sets the DesiredvCpus field's value. -func (s *ComputeResourceUpdate) SetDesiredvCpus(v int64) *ComputeResourceUpdate { - s.DesiredvCpus = &v - return s -} - -// SetMaxvCpus sets the MaxvCpus field's value. -func (s *ComputeResourceUpdate) SetMaxvCpus(v int64) *ComputeResourceUpdate { - s.MaxvCpus = &v - return s -} - -// SetMinvCpus sets the MinvCpus field's value. -func (s *ComputeResourceUpdate) SetMinvCpus(v int64) *ComputeResourceUpdate { - s.MinvCpus = &v - return s -} - -// An object representing the details of a container that is part of a job. -type ContainerDetail struct { - _ struct{} `type:"structure"` - - // The command that is passed to the container. - Command []*string `locationName:"command" type:"list"` - - // The Amazon Resource Name (ARN) of the container instance on which the container - // is running. - ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"` - - // The environment variables to pass to a container. - // - // Environment variables must not start with AWS_BATCH; this naming convention - // is reserved for variables that are set by the AWS Batch service. - Environment []*KeyValuePair `locationName:"environment" type:"list"` - - // The exit code to return upon completion. - ExitCode *int64 `locationName:"exitCode" type:"integer"` - - // The image used to start the container. - Image *string `locationName:"image" type:"string"` - - // The instance type of the underlying host infrastructure of a multi-node parallel - // job. - InstanceType *string `locationName:"instanceType" type:"string"` - - // The Amazon Resource Name (ARN) associated with the job upon execution. - JobRoleArn *string `locationName:"jobRoleArn" type:"string"` - - // The name of the CloudWatch Logs log stream associated with the container. - // The log group for AWS Batch jobs is /aws/batch/job. Each container attempt - // receives a log stream name when they reach the RUNNING status. - LogStreamName *string `locationName:"logStreamName" type:"string"` - - // The number of MiB of memory reserved for the job. - Memory *int64 `locationName:"memory" type:"integer"` - - // The mount points for data volumes in your container. - MountPoints []*MountPoint `locationName:"mountPoints" type:"list"` - - // The network interfaces associated with the job. - NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaces" type:"list"` - - // When this parameter is true, the container is given elevated privileges on - // the host container instance (similar to the root user). - Privileged *bool `locationName:"privileged" type:"boolean"` - - // When this parameter is true, the container is given read-only access to its - // root file system. - ReadonlyRootFilesystem *bool `locationName:"readonlyRootFilesystem" type:"boolean"` - - // A short (255 max characters) human-readable string to provide additional - // details about a running or stopped container. - Reason *string `locationName:"reason" type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon ECS task that is associated - // with the container job. Each container attempt receives a task ARN when they - // reach the STARTING status. - TaskArn *string `locationName:"taskArn" type:"string"` - - // A list of ulimit values to set in the container. - Ulimits []*Ulimit `locationName:"ulimits" type:"list"` - - // The user name to use inside the container. - User *string `locationName:"user" type:"string"` - - // The number of VCPUs allocated for the job. - Vcpus *int64 `locationName:"vcpus" type:"integer"` - - // A list of volumes associated with the job. - Volumes []*Volume `locationName:"volumes" type:"list"` -} - -// String returns the string representation -func (s ContainerDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContainerDetail) GoString() string { - return s.String() -} - -// SetCommand sets the Command field's value. -func (s *ContainerDetail) SetCommand(v []*string) *ContainerDetail { - s.Command = v - return s -} - -// SetContainerInstanceArn sets the ContainerInstanceArn field's value. -func (s *ContainerDetail) SetContainerInstanceArn(v string) *ContainerDetail { - s.ContainerInstanceArn = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *ContainerDetail) SetEnvironment(v []*KeyValuePair) *ContainerDetail { - s.Environment = v - return s -} - -// SetExitCode sets the ExitCode field's value. -func (s *ContainerDetail) SetExitCode(v int64) *ContainerDetail { - s.ExitCode = &v - return s -} - -// SetImage sets the Image field's value. -func (s *ContainerDetail) SetImage(v string) *ContainerDetail { - s.Image = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ContainerDetail) SetInstanceType(v string) *ContainerDetail { - s.InstanceType = &v - return s -} - -// SetJobRoleArn sets the JobRoleArn field's value. -func (s *ContainerDetail) SetJobRoleArn(v string) *ContainerDetail { - s.JobRoleArn = &v - return s -} - -// SetLogStreamName sets the LogStreamName field's value. -func (s *ContainerDetail) SetLogStreamName(v string) *ContainerDetail { - s.LogStreamName = &v - return s -} - -// SetMemory sets the Memory field's value. -func (s *ContainerDetail) SetMemory(v int64) *ContainerDetail { - s.Memory = &v - return s -} - -// SetMountPoints sets the MountPoints field's value. -func (s *ContainerDetail) SetMountPoints(v []*MountPoint) *ContainerDetail { - s.MountPoints = v - return s -} - -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *ContainerDetail) SetNetworkInterfaces(v []*NetworkInterface) *ContainerDetail { - s.NetworkInterfaces = v - return s -} - -// SetPrivileged sets the Privileged field's value. -func (s *ContainerDetail) SetPrivileged(v bool) *ContainerDetail { - s.Privileged = &v - return s -} - -// SetReadonlyRootFilesystem sets the ReadonlyRootFilesystem field's value. -func (s *ContainerDetail) SetReadonlyRootFilesystem(v bool) *ContainerDetail { - s.ReadonlyRootFilesystem = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *ContainerDetail) SetReason(v string) *ContainerDetail { - s.Reason = &v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *ContainerDetail) SetTaskArn(v string) *ContainerDetail { - s.TaskArn = &v - return s -} - -// SetUlimits sets the Ulimits field's value. -func (s *ContainerDetail) SetUlimits(v []*Ulimit) *ContainerDetail { - s.Ulimits = v - return s -} - -// SetUser sets the User field's value. -func (s *ContainerDetail) SetUser(v string) *ContainerDetail { - s.User = &v - return s -} - -// SetVcpus sets the Vcpus field's value. -func (s *ContainerDetail) SetVcpus(v int64) *ContainerDetail { - s.Vcpus = &v - return s -} - -// SetVolumes sets the Volumes field's value. -func (s *ContainerDetail) SetVolumes(v []*Volume) *ContainerDetail { - s.Volumes = v - return s -} - -// The overrides that should be sent to a container. -type ContainerOverrides struct { - _ struct{} `type:"structure"` - - // The command to send to the container that overrides the default command from - // the Docker image or the job definition. - Command []*string `locationName:"command" type:"list"` - - // The environment variables to send to the container. You can add new environment - // variables, which are added to the container at launch, or you can override - // the existing environment variables from the Docker image or the job definition. - // - // Environment variables must not start with AWS_BATCH; this naming convention - // is reserved for variables that are set by the AWS Batch service. - Environment []*KeyValuePair `locationName:"environment" type:"list"` - - // The instance type to use for a multi-node parallel job. This parameter is - // not valid for single-node container jobs. - InstanceType *string `locationName:"instanceType" type:"string"` - - // The number of MiB of memory reserved for the job. This value overrides the - // value set in the job definition. - Memory *int64 `locationName:"memory" type:"integer"` - - // The number of vCPUs to reserve for the container. This value overrides the - // value set in the job definition. - Vcpus *int64 `locationName:"vcpus" type:"integer"` -} - -// String returns the string representation -func (s ContainerOverrides) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContainerOverrides) GoString() string { - return s.String() -} - -// SetCommand sets the Command field's value. -func (s *ContainerOverrides) SetCommand(v []*string) *ContainerOverrides { - s.Command = v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *ContainerOverrides) SetEnvironment(v []*KeyValuePair) *ContainerOverrides { - s.Environment = v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ContainerOverrides) SetInstanceType(v string) *ContainerOverrides { - s.InstanceType = &v - return s -} - -// SetMemory sets the Memory field's value. -func (s *ContainerOverrides) SetMemory(v int64) *ContainerOverrides { - s.Memory = &v - return s -} - -// SetVcpus sets the Vcpus field's value. -func (s *ContainerOverrides) SetVcpus(v int64) *ContainerOverrides { - s.Vcpus = &v - return s -} - -// Container properties are used in job definitions to describe the container -// that is launched as part of a job. -type ContainerProperties struct { - _ struct{} `type:"structure"` - - // The command that is passed to the container. This parameter maps to Cmd in - // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) - // and the COMMAND parameter to docker run (https://docs.docker.com/engine/reference/run/). - // For more information, see https://docs.docker.com/engine/reference/builder/#cmd - // (https://docs.docker.com/engine/reference/builder/#cmd). - Command []*string `locationName:"command" type:"list"` - - // The environment variables to pass to a container. This parameter maps to - // Env in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) - // and the --env option to docker run (https://docs.docker.com/engine/reference/run/). - // - // We do not recommend using plaintext environment variables for sensitive information, - // such as credential data. - // - // Environment variables must not start with AWS_BATCH; this naming convention - // is reserved for variables that are set by the AWS Batch service. - Environment []*KeyValuePair `locationName:"environment" type:"list"` - - // The image used to start a container. This string is passed directly to the - // Docker daemon. Images in the Docker Hub registry are available by default. - // Other repositories are specified with repository-url/image:tag. Up to 255 - // letters (uppercase and lowercase), numbers, hyphens, underscores, colons, - // periods, forward slashes, and number signs are allowed. This parameter maps - // to Image in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) - // and the IMAGE parameter of docker run (https://docs.docker.com/engine/reference/run/). - // - // * Images in Amazon ECR repositories use the full registry and repository - // URI (for example, 012345678910.dkr.ecr..amazonaws.com/). - // - // - // * Images in official repositories on Docker Hub use a single name (for - // example, ubuntu or mongo). - // - // * Images in other repositories on Docker Hub are qualified with an organization - // name (for example, amazon/amazon-ecs-agent). - // - // * Images in other online repositories are qualified further by a domain - // name (for example, quay.io/assemblyline/ubuntu). - Image *string `locationName:"image" type:"string"` - - // The instance type to use for a multi-node parallel job. Currently all node - // groups in a multi-node parallel job must use the same instance type. This - // parameter is not valid for single-node container jobs. - InstanceType *string `locationName:"instanceType" type:"string"` - - // The Amazon Resource Name (ARN) of the IAM role that the container can assume - // for AWS permissions. - JobRoleArn *string `locationName:"jobRoleArn" type:"string"` - - // The hard limit (in MiB) of memory to present to the container. If your container - // attempts to exceed the memory specified here, the container is killed. This - // parameter maps to Memory in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) - // and the --memory option to docker run (https://docs.docker.com/engine/reference/run/). - // You must specify at least 4 MiB of memory for a job. - // - // If you are trying to maximize your resource utilization by providing your - // jobs as much memory as possible for a particular instance type, see Memory - // Management (http://docs.aws.amazon.com/batch/latest/userguide/memory-management.html) - // in the AWS Batch User Guide. - Memory *int64 `locationName:"memory" type:"integer"` - - // The mount points for data volumes in your container. This parameter maps - // to Volumes in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) - // and the --volume option to docker run (https://docs.docker.com/engine/reference/run/). - MountPoints []*MountPoint `locationName:"mountPoints" type:"list"` - - // When this parameter is true, the container is given elevated privileges on - // the host container instance (similar to the root user). This parameter maps - // to Privileged in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) - // and the --privileged option to docker run (https://docs.docker.com/engine/reference/run/). - Privileged *bool `locationName:"privileged" type:"boolean"` - - // When this parameter is true, the container is given read-only access to its - // root file system. This parameter maps to ReadonlyRootfs in the Create a container - // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) - // and the --read-only option to docker run. - ReadonlyRootFilesystem *bool `locationName:"readonlyRootFilesystem" type:"boolean"` - - // A list of ulimits to set in the container. This parameter maps to Ulimits - // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) - // and the --ulimit option to docker run (https://docs.docker.com/engine/reference/run/). - Ulimits []*Ulimit `locationName:"ulimits" type:"list"` - - // The user name to use inside the container. This parameter maps to User in - // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) - // and the --user option to docker run (https://docs.docker.com/engine/reference/run/). - User *string `locationName:"user" type:"string"` - - // The number of vCPUs reserved for the container. This parameter maps to CpuShares - // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) - // and the --cpu-shares option to docker run (https://docs.docker.com/engine/reference/run/). - // Each vCPU is equivalent to 1,024 CPU shares. You must specify at least one - // vCPU. - Vcpus *int64 `locationName:"vcpus" type:"integer"` - - // A list of data volumes used in a job. - Volumes []*Volume `locationName:"volumes" type:"list"` -} - -// String returns the string representation -func (s ContainerProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContainerProperties) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContainerProperties) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContainerProperties"} - if s.Ulimits != nil { - for i, v := range s.Ulimits { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Ulimits", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCommand sets the Command field's value. -func (s *ContainerProperties) SetCommand(v []*string) *ContainerProperties { - s.Command = v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *ContainerProperties) SetEnvironment(v []*KeyValuePair) *ContainerProperties { - s.Environment = v - return s -} - -// SetImage sets the Image field's value. -func (s *ContainerProperties) SetImage(v string) *ContainerProperties { - s.Image = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ContainerProperties) SetInstanceType(v string) *ContainerProperties { - s.InstanceType = &v - return s -} - -// SetJobRoleArn sets the JobRoleArn field's value. -func (s *ContainerProperties) SetJobRoleArn(v string) *ContainerProperties { - s.JobRoleArn = &v - return s -} - -// SetMemory sets the Memory field's value. -func (s *ContainerProperties) SetMemory(v int64) *ContainerProperties { - s.Memory = &v - return s -} - -// SetMountPoints sets the MountPoints field's value. -func (s *ContainerProperties) SetMountPoints(v []*MountPoint) *ContainerProperties { - s.MountPoints = v - return s -} - -// SetPrivileged sets the Privileged field's value. -func (s *ContainerProperties) SetPrivileged(v bool) *ContainerProperties { - s.Privileged = &v - return s -} - -// SetReadonlyRootFilesystem sets the ReadonlyRootFilesystem field's value. -func (s *ContainerProperties) SetReadonlyRootFilesystem(v bool) *ContainerProperties { - s.ReadonlyRootFilesystem = &v - return s -} - -// SetUlimits sets the Ulimits field's value. -func (s *ContainerProperties) SetUlimits(v []*Ulimit) *ContainerProperties { - s.Ulimits = v - return s -} - -// SetUser sets the User field's value. -func (s *ContainerProperties) SetUser(v string) *ContainerProperties { - s.User = &v - return s -} - -// SetVcpus sets the Vcpus field's value. -func (s *ContainerProperties) SetVcpus(v int64) *ContainerProperties { - s.Vcpus = &v - return s -} - -// SetVolumes sets the Volumes field's value. -func (s *ContainerProperties) SetVolumes(v []*Volume) *ContainerProperties { - s.Volumes = v - return s -} - -// An object representing summary details of a container within a job. -type ContainerSummary struct { - _ struct{} `type:"structure"` - - // The exit code to return upon completion. - ExitCode *int64 `locationName:"exitCode" type:"integer"` - - // A short (255 max characters) human-readable string to provide additional - // details about a running or stopped container. - Reason *string `locationName:"reason" type:"string"` -} - -// String returns the string representation -func (s ContainerSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContainerSummary) GoString() string { - return s.String() -} - -// SetExitCode sets the ExitCode field's value. -func (s *ContainerSummary) SetExitCode(v int64) *ContainerSummary { - s.ExitCode = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *ContainerSummary) SetReason(v string) *ContainerSummary { - s.Reason = &v - return s -} - -type CreateComputeEnvironmentInput struct { - _ struct{} `type:"structure"` - - // The name for your compute environment. Up to 128 letters (uppercase and lowercase), - // numbers, hyphens, and underscores are allowed. - // - // ComputeEnvironmentName is a required field - ComputeEnvironmentName *string `locationName:"computeEnvironmentName" type:"string" required:"true"` - - // Details of the compute resources managed by the compute environment. This - // parameter is required for managed compute environments. - ComputeResources *ComputeResource `locationName:"computeResources" type:"structure"` - - // The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch - // to make calls to other AWS services on your behalf. - // - // If your specified role has a path other than /, then you must either specify - // the full role ARN (this is recommended) or prefix the role name with the - // path. - // - // Depending on how you created your AWS Batch service role, its ARN may contain - // the service-role path prefix. When you only specify the name of the service - // role, AWS Batch assumes that your ARN does not use the service-role path - // prefix. Because of this, we recommend that you specify the full ARN of your - // service role when you create compute environments. - // - // ServiceRole is a required field - ServiceRole *string `locationName:"serviceRole" type:"string" required:"true"` - - // The state of the compute environment. If the state is ENABLED, then the compute - // environment accepts jobs from a queue and can scale out automatically based - // on queues. - State *string `locationName:"state" type:"string" enum:"CEState"` - - // The type of the compute environment. For more information, see Compute Environments - // (http://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html) - // in the AWS Batch User Guide. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"CEType"` -} - -// String returns the string representation -func (s CreateComputeEnvironmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateComputeEnvironmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateComputeEnvironmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateComputeEnvironmentInput"} - if s.ComputeEnvironmentName == nil { - invalidParams.Add(request.NewErrParamRequired("ComputeEnvironmentName")) - } - if s.ServiceRole == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceRole")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.ComputeResources != nil { - if err := s.ComputeResources.Validate(); err != nil { - invalidParams.AddNested("ComputeResources", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComputeEnvironmentName sets the ComputeEnvironmentName field's value. -func (s *CreateComputeEnvironmentInput) SetComputeEnvironmentName(v string) *CreateComputeEnvironmentInput { - s.ComputeEnvironmentName = &v - return s -} - -// SetComputeResources sets the ComputeResources field's value. -func (s *CreateComputeEnvironmentInput) SetComputeResources(v *ComputeResource) *CreateComputeEnvironmentInput { - s.ComputeResources = v - return s -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *CreateComputeEnvironmentInput) SetServiceRole(v string) *CreateComputeEnvironmentInput { - s.ServiceRole = &v - return s -} - -// SetState sets the State field's value. -func (s *CreateComputeEnvironmentInput) SetState(v string) *CreateComputeEnvironmentInput { - s.State = &v - return s -} - -// SetType sets the Type field's value. -func (s *CreateComputeEnvironmentInput) SetType(v string) *CreateComputeEnvironmentInput { - s.Type = &v - return s -} - -type CreateComputeEnvironmentOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the compute environment. - ComputeEnvironmentArn *string `locationName:"computeEnvironmentArn" type:"string"` - - // The name of the compute environment. - ComputeEnvironmentName *string `locationName:"computeEnvironmentName" type:"string"` -} - -// String returns the string representation -func (s CreateComputeEnvironmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateComputeEnvironmentOutput) GoString() string { - return s.String() -} - -// SetComputeEnvironmentArn sets the ComputeEnvironmentArn field's value. -func (s *CreateComputeEnvironmentOutput) SetComputeEnvironmentArn(v string) *CreateComputeEnvironmentOutput { - s.ComputeEnvironmentArn = &v - return s -} - -// SetComputeEnvironmentName sets the ComputeEnvironmentName field's value. -func (s *CreateComputeEnvironmentOutput) SetComputeEnvironmentName(v string) *CreateComputeEnvironmentOutput { - s.ComputeEnvironmentName = &v - return s -} - -type CreateJobQueueInput struct { - _ struct{} `type:"structure"` - - // The set of compute environments mapped to a job queue and their order relative - // to each other. The job scheduler uses this parameter to determine which compute - // environment should execute a given job. Compute environments must be in the - // VALID state before you can associate them with a job queue. You can associate - // up to three compute environments with a job queue. - // - // ComputeEnvironmentOrder is a required field - ComputeEnvironmentOrder []*ComputeEnvironmentOrder `locationName:"computeEnvironmentOrder" type:"list" required:"true"` - - // The name of the job queue. - // - // JobQueueName is a required field - JobQueueName *string `locationName:"jobQueueName" type:"string" required:"true"` - - // The priority of the job queue. Job queues with a higher priority (or a higher - // integer value for the priority parameter) are evaluated first when associated - // with the same compute environment. Priority is determined in descending order, - // for example, a job queue with a priority value of 10 is given scheduling - // preference over a job queue with a priority value of 1. - // - // Priority is a required field - Priority *int64 `locationName:"priority" type:"integer" required:"true"` - - // The state of the job queue. If the job queue state is ENABLED, it is able - // to accept jobs. - State *string `locationName:"state" type:"string" enum:"JQState"` -} - -// String returns the string representation -func (s CreateJobQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJobQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateJobQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateJobQueueInput"} - if s.ComputeEnvironmentOrder == nil { - invalidParams.Add(request.NewErrParamRequired("ComputeEnvironmentOrder")) - } - if s.JobQueueName == nil { - invalidParams.Add(request.NewErrParamRequired("JobQueueName")) - } - if s.Priority == nil { - invalidParams.Add(request.NewErrParamRequired("Priority")) - } - if s.ComputeEnvironmentOrder != nil { - for i, v := range s.ComputeEnvironmentOrder { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ComputeEnvironmentOrder", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComputeEnvironmentOrder sets the ComputeEnvironmentOrder field's value. -func (s *CreateJobQueueInput) SetComputeEnvironmentOrder(v []*ComputeEnvironmentOrder) *CreateJobQueueInput { - s.ComputeEnvironmentOrder = v - return s -} - -// SetJobQueueName sets the JobQueueName field's value. -func (s *CreateJobQueueInput) SetJobQueueName(v string) *CreateJobQueueInput { - s.JobQueueName = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *CreateJobQueueInput) SetPriority(v int64) *CreateJobQueueInput { - s.Priority = &v - return s -} - -// SetState sets the State field's value. -func (s *CreateJobQueueInput) SetState(v string) *CreateJobQueueInput { - s.State = &v - return s -} - -type CreateJobQueueOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the job queue. - // - // JobQueueArn is a required field - JobQueueArn *string `locationName:"jobQueueArn" type:"string" required:"true"` - - // The name of the job queue. - // - // JobQueueName is a required field - JobQueueName *string `locationName:"jobQueueName" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateJobQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJobQueueOutput) GoString() string { - return s.String() -} - -// SetJobQueueArn sets the JobQueueArn field's value. -func (s *CreateJobQueueOutput) SetJobQueueArn(v string) *CreateJobQueueOutput { - s.JobQueueArn = &v - return s -} - -// SetJobQueueName sets the JobQueueName field's value. -func (s *CreateJobQueueOutput) SetJobQueueName(v string) *CreateJobQueueOutput { - s.JobQueueName = &v - return s -} - -type DeleteComputeEnvironmentInput struct { - _ struct{} `type:"structure"` - - // The name or Amazon Resource Name (ARN) of the compute environment to delete. - // - // ComputeEnvironment is a required field - ComputeEnvironment *string `locationName:"computeEnvironment" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteComputeEnvironmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteComputeEnvironmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteComputeEnvironmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteComputeEnvironmentInput"} - if s.ComputeEnvironment == nil { - invalidParams.Add(request.NewErrParamRequired("ComputeEnvironment")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComputeEnvironment sets the ComputeEnvironment field's value. -func (s *DeleteComputeEnvironmentInput) SetComputeEnvironment(v string) *DeleteComputeEnvironmentInput { - s.ComputeEnvironment = &v - return s -} - -type DeleteComputeEnvironmentOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteComputeEnvironmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteComputeEnvironmentOutput) GoString() string { - return s.String() -} - -type DeleteJobQueueInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the queue to delete. - // - // JobQueue is a required field - JobQueue *string `locationName:"jobQueue" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteJobQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteJobQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteJobQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteJobQueueInput"} - if s.JobQueue == nil { - invalidParams.Add(request.NewErrParamRequired("JobQueue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobQueue sets the JobQueue field's value. -func (s *DeleteJobQueueInput) SetJobQueue(v string) *DeleteJobQueueInput { - s.JobQueue = &v - return s -} - -type DeleteJobQueueOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteJobQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteJobQueueOutput) GoString() string { - return s.String() -} - -type DeregisterJobDefinitionInput struct { - _ struct{} `type:"structure"` - - // The name and revision (name:revision) or full Amazon Resource Name (ARN) - // of the job definition to deregister. - // - // JobDefinition is a required field - JobDefinition *string `locationName:"jobDefinition" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterJobDefinitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterJobDefinitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterJobDefinitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterJobDefinitionInput"} - if s.JobDefinition == nil { - invalidParams.Add(request.NewErrParamRequired("JobDefinition")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobDefinition sets the JobDefinition field's value. -func (s *DeregisterJobDefinitionInput) SetJobDefinition(v string) *DeregisterJobDefinitionInput { - s.JobDefinition = &v - return s -} - -type DeregisterJobDefinitionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeregisterJobDefinitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterJobDefinitionOutput) GoString() string { - return s.String() -} - -type DescribeComputeEnvironmentsInput struct { - _ struct{} `type:"structure"` - - // A list of up to 100 compute environment names or full Amazon Resource Name - // (ARN) entries. - ComputeEnvironments []*string `locationName:"computeEnvironments" type:"list"` - - // The maximum number of cluster results returned by DescribeComputeEnvironments - // in paginated output. When this parameter is used, DescribeComputeEnvironments - // only returns maxResults results in a single page along with a nextToken response - // element. The remaining results of the initial request can be seen by sending - // another DescribeComputeEnvironments request with the returned nextToken value. - // This value can be between 1 and 100. If this parameter is not used, then - // DescribeComputeEnvironments returns up to 100 results and a nextToken value - // if applicable. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The nextToken value returned from a previous paginated DescribeComputeEnvironments - // request where maxResults was used and the results exceeded the value of that - // parameter. Pagination continues from the end of the previous results that - // returned the nextToken value. This value is null when there are no more results - // to return. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeComputeEnvironmentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeComputeEnvironmentsInput) GoString() string { - return s.String() -} - -// SetComputeEnvironments sets the ComputeEnvironments field's value. -func (s *DescribeComputeEnvironmentsInput) SetComputeEnvironments(v []*string) *DescribeComputeEnvironmentsInput { - s.ComputeEnvironments = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeComputeEnvironmentsInput) SetMaxResults(v int64) *DescribeComputeEnvironmentsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeComputeEnvironmentsInput) SetNextToken(v string) *DescribeComputeEnvironmentsInput { - s.NextToken = &v - return s -} - -type DescribeComputeEnvironmentsOutput struct { - _ struct{} `type:"structure"` - - // The list of compute environments. - ComputeEnvironments []*ComputeEnvironmentDetail `locationName:"computeEnvironments" type:"list"` - - // The nextToken value to include in a future DescribeComputeEnvironments request. - // When the results of a DescribeJobDefinitions request exceed maxResults, this - // value can be used to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeComputeEnvironmentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeComputeEnvironmentsOutput) GoString() string { - return s.String() -} - -// SetComputeEnvironments sets the ComputeEnvironments field's value. -func (s *DescribeComputeEnvironmentsOutput) SetComputeEnvironments(v []*ComputeEnvironmentDetail) *DescribeComputeEnvironmentsOutput { - s.ComputeEnvironments = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeComputeEnvironmentsOutput) SetNextToken(v string) *DescribeComputeEnvironmentsOutput { - s.NextToken = &v - return s -} - -type DescribeJobDefinitionsInput struct { - _ struct{} `type:"structure"` - - // The name of the job definition to describe. - JobDefinitionName *string `locationName:"jobDefinitionName" type:"string"` - - // A space-separated list of up to 100 job definition names or full Amazon Resource - // Name (ARN) entries. - JobDefinitions []*string `locationName:"jobDefinitions" type:"list"` - - // The maximum number of results returned by DescribeJobDefinitions in paginated - // output. When this parameter is used, DescribeJobDefinitions only returns - // maxResults results in a single page along with a nextToken response element. - // The remaining results of the initial request can be seen by sending another - // DescribeJobDefinitions request with the returned nextToken value. This value - // can be between 1 and 100. If this parameter is not used, then DescribeJobDefinitions - // returns up to 100 results and a nextToken value if applicable. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The nextToken value returned from a previous paginated DescribeJobDefinitions - // request where maxResults was used and the results exceeded the value of that - // parameter. Pagination continues from the end of the previous results that - // returned the nextToken value. This value is null when there are no more results - // to return. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `locationName:"nextToken" type:"string"` - - // The status with which to filter job definitions. - Status *string `locationName:"status" type:"string"` -} - -// String returns the string representation -func (s DescribeJobDefinitionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeJobDefinitionsInput) GoString() string { - return s.String() -} - -// SetJobDefinitionName sets the JobDefinitionName field's value. -func (s *DescribeJobDefinitionsInput) SetJobDefinitionName(v string) *DescribeJobDefinitionsInput { - s.JobDefinitionName = &v - return s -} - -// SetJobDefinitions sets the JobDefinitions field's value. -func (s *DescribeJobDefinitionsInput) SetJobDefinitions(v []*string) *DescribeJobDefinitionsInput { - s.JobDefinitions = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeJobDefinitionsInput) SetMaxResults(v int64) *DescribeJobDefinitionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeJobDefinitionsInput) SetNextToken(v string) *DescribeJobDefinitionsInput { - s.NextToken = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeJobDefinitionsInput) SetStatus(v string) *DescribeJobDefinitionsInput { - s.Status = &v - return s -} - -type DescribeJobDefinitionsOutput struct { - _ struct{} `type:"structure"` - - // The list of job definitions. - JobDefinitions []*JobDefinition `locationName:"jobDefinitions" type:"list"` - - // The nextToken value to include in a future DescribeJobDefinitions request. - // When the results of a DescribeJobDefinitions request exceed maxResults, this - // value can be used to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeJobDefinitionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeJobDefinitionsOutput) GoString() string { - return s.String() -} - -// SetJobDefinitions sets the JobDefinitions field's value. -func (s *DescribeJobDefinitionsOutput) SetJobDefinitions(v []*JobDefinition) *DescribeJobDefinitionsOutput { - s.JobDefinitions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeJobDefinitionsOutput) SetNextToken(v string) *DescribeJobDefinitionsOutput { - s.NextToken = &v - return s -} - -type DescribeJobQueuesInput struct { - _ struct{} `type:"structure"` - - // A list of up to 100 queue names or full queue Amazon Resource Name (ARN) - // entries. - JobQueues []*string `locationName:"jobQueues" type:"list"` - - // The maximum number of results returned by DescribeJobQueues in paginated - // output. When this parameter is used, DescribeJobQueues only returns maxResults - // results in a single page along with a nextToken response element. The remaining - // results of the initial request can be seen by sending another DescribeJobQueues - // request with the returned nextToken value. This value can be between 1 and - // 100. If this parameter is not used, then DescribeJobQueues returns up to - // 100 results and a nextToken value if applicable. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The nextToken value returned from a previous paginated DescribeJobQueues - // request where maxResults was used and the results exceeded the value of that - // parameter. Pagination continues from the end of the previous results that - // returned the nextToken value. This value is null when there are no more results - // to return. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeJobQueuesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeJobQueuesInput) GoString() string { - return s.String() -} - -// SetJobQueues sets the JobQueues field's value. -func (s *DescribeJobQueuesInput) SetJobQueues(v []*string) *DescribeJobQueuesInput { - s.JobQueues = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeJobQueuesInput) SetMaxResults(v int64) *DescribeJobQueuesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeJobQueuesInput) SetNextToken(v string) *DescribeJobQueuesInput { - s.NextToken = &v - return s -} - -type DescribeJobQueuesOutput struct { - _ struct{} `type:"structure"` - - // The list of job queues. - JobQueues []*JobQueueDetail `locationName:"jobQueues" type:"list"` - - // The nextToken value to include in a future DescribeJobQueues request. When - // the results of a DescribeJobQueues request exceed maxResults, this value - // can be used to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeJobQueuesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeJobQueuesOutput) GoString() string { - return s.String() -} - -// SetJobQueues sets the JobQueues field's value. -func (s *DescribeJobQueuesOutput) SetJobQueues(v []*JobQueueDetail) *DescribeJobQueuesOutput { - s.JobQueues = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeJobQueuesOutput) SetNextToken(v string) *DescribeJobQueuesOutput { - s.NextToken = &v - return s -} - -type DescribeJobsInput struct { - _ struct{} `type:"structure"` - - // A space-separated list of up to 100 job IDs. - // - // Jobs is a required field - Jobs []*string `locationName:"jobs" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeJobsInput"} - if s.Jobs == nil { - invalidParams.Add(request.NewErrParamRequired("Jobs")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobs sets the Jobs field's value. -func (s *DescribeJobsInput) SetJobs(v []*string) *DescribeJobsInput { - s.Jobs = v - return s -} - -type DescribeJobsOutput struct { - _ struct{} `type:"structure"` - - // The list of jobs. - Jobs []*JobDetail `locationName:"jobs" type:"list"` -} - -// String returns the string representation -func (s DescribeJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeJobsOutput) GoString() string { - return s.String() -} - -// SetJobs sets the Jobs field's value. -func (s *DescribeJobsOutput) SetJobs(v []*JobDetail) *DescribeJobsOutput { - s.Jobs = v - return s -} - -// The contents of the host parameter determine whether your data volume persists -// on the host container instance and where it is stored. If the host parameter -// is empty, then the Docker daemon assigns a host path for your data volume, -// but the data is not guaranteed to persist after the containers associated -// with it stop running. -type Host struct { - _ struct{} `type:"structure"` - - // The path on the host container instance that is presented to the container. - // If this parameter is empty, then the Docker daemon has assigned a host path - // for you. If the host parameter contains a sourcePath file location, then - // the data volume persists at the specified location on the host container - // instance until you delete it manually. If the sourcePath value does not exist - // on the host container instance, the Docker daemon creates it. If the location - // does exist, the contents of the source path folder are exported. - SourcePath *string `locationName:"sourcePath" type:"string"` -} - -// String returns the string representation -func (s Host) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Host) GoString() string { - return s.String() -} - -// SetSourcePath sets the SourcePath field's value. -func (s *Host) SetSourcePath(v string) *Host { - s.SourcePath = &v - return s -} - -// An object representing an AWS Batch job definition. -type JobDefinition struct { - _ struct{} `type:"structure"` - - // An object with various properties specific to container-based jobs. - ContainerProperties *ContainerProperties `locationName:"containerProperties" type:"structure"` - - // The Amazon Resource Name (ARN) for the job definition. - // - // JobDefinitionArn is a required field - JobDefinitionArn *string `locationName:"jobDefinitionArn" type:"string" required:"true"` - - // The name of the job definition. - // - // JobDefinitionName is a required field - JobDefinitionName *string `locationName:"jobDefinitionName" type:"string" required:"true"` - - // An object with various properties specific to multi-node parallel jobs. - NodeProperties *NodeProperties `locationName:"nodeProperties" type:"structure"` - - // Default parameters or parameter substitution placeholders that are set in - // the job definition. Parameters are specified as a key-value pair mapping. - // Parameters in a SubmitJob request override any corresponding parameter defaults - // from the job definition. - Parameters map[string]*string `locationName:"parameters" type:"map"` - - // The retry strategy to use for failed jobs that are submitted with this job - // definition. - RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` - - // The revision of the job definition. - // - // Revision is a required field - Revision *int64 `locationName:"revision" type:"integer" required:"true"` - - // The status of the job definition. - Status *string `locationName:"status" type:"string"` - - // The timeout configuration for jobs that are submitted with this job definition. - // You can specify a timeout duration after which AWS Batch terminates your - // jobs if they have not finished. - Timeout *JobTimeout `locationName:"timeout" type:"structure"` - - // The type of job definition. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true"` -} - -// String returns the string representation -func (s JobDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobDefinition) GoString() string { - return s.String() -} - -// SetContainerProperties sets the ContainerProperties field's value. -func (s *JobDefinition) SetContainerProperties(v *ContainerProperties) *JobDefinition { - s.ContainerProperties = v - return s -} - -// SetJobDefinitionArn sets the JobDefinitionArn field's value. -func (s *JobDefinition) SetJobDefinitionArn(v string) *JobDefinition { - s.JobDefinitionArn = &v - return s -} - -// SetJobDefinitionName sets the JobDefinitionName field's value. -func (s *JobDefinition) SetJobDefinitionName(v string) *JobDefinition { - s.JobDefinitionName = &v - return s -} - -// SetNodeProperties sets the NodeProperties field's value. -func (s *JobDefinition) SetNodeProperties(v *NodeProperties) *JobDefinition { - s.NodeProperties = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *JobDefinition) SetParameters(v map[string]*string) *JobDefinition { - s.Parameters = v - return s -} - -// SetRetryStrategy sets the RetryStrategy field's value. -func (s *JobDefinition) SetRetryStrategy(v *RetryStrategy) *JobDefinition { - s.RetryStrategy = v - return s -} - -// SetRevision sets the Revision field's value. -func (s *JobDefinition) SetRevision(v int64) *JobDefinition { - s.Revision = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *JobDefinition) SetStatus(v string) *JobDefinition { - s.Status = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *JobDefinition) SetTimeout(v *JobTimeout) *JobDefinition { - s.Timeout = v - return s -} - -// SetType sets the Type field's value. -func (s *JobDefinition) SetType(v string) *JobDefinition { - s.Type = &v - return s -} - -// An object representing an AWS Batch job dependency. -type JobDependency struct { - _ struct{} `type:"structure"` - - // The job ID of the AWS Batch job associated with this dependency. - JobId *string `locationName:"jobId" type:"string"` - - // The type of the job dependency. - Type *string `locationName:"type" type:"string" enum:"ArrayJobDependency"` -} - -// String returns the string representation -func (s JobDependency) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobDependency) GoString() string { - return s.String() -} - -// SetJobId sets the JobId field's value. -func (s *JobDependency) SetJobId(v string) *JobDependency { - s.JobId = &v - return s -} - -// SetType sets the Type field's value. -func (s *JobDependency) SetType(v string) *JobDependency { - s.Type = &v - return s -} - -// An object representing an AWS Batch job. -type JobDetail struct { - _ struct{} `type:"structure"` - - // The array properties of the job, if it is an array job. - ArrayProperties *ArrayPropertiesDetail `locationName:"arrayProperties" type:"structure"` - - // A list of job attempts associated with this job. - Attempts []*AttemptDetail `locationName:"attempts" type:"list"` - - // An object representing the details of the container that is associated with - // the job. - Container *ContainerDetail `locationName:"container" type:"structure"` - - // The Unix timestamp (in seconds and milliseconds) for when the job was created. - // For non-array jobs and parent array jobs, this is when the job entered the - // SUBMITTED state (at the time SubmitJob was called). For array child jobs, - // this is when the child job was spawned by its parent and entered the PENDING - // state. - CreatedAt *int64 `locationName:"createdAt" type:"long"` - - // A list of job names or IDs on which this job depends. - DependsOn []*JobDependency `locationName:"dependsOn" type:"list"` - - // The job definition that is used by this job. - // - // JobDefinition is a required field - JobDefinition *string `locationName:"jobDefinition" type:"string" required:"true"` - - // The ID for the job. - // - // JobId is a required field - JobId *string `locationName:"jobId" type:"string" required:"true"` - - // The name of the job. - // - // JobName is a required field - JobName *string `locationName:"jobName" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the job queue with which the job is associated. - // - // JobQueue is a required field - JobQueue *string `locationName:"jobQueue" type:"string" required:"true"` - - // An object representing the details of a node that is associated with a multi-node - // parallel job. - NodeDetails *NodeDetails `locationName:"nodeDetails" type:"structure"` - - // An object representing the node properties of a multi-node parallel job. - NodeProperties *NodeProperties `locationName:"nodeProperties" type:"structure"` - - // Additional parameters passed to the job that replace parameter substitution - // placeholders or override any corresponding parameter defaults from the job - // definition. - Parameters map[string]*string `locationName:"parameters" type:"map"` - - // The retry strategy to use for this job if an attempt fails. - RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` - - // The Unix timestamp (in seconds and milliseconds) for when the job was started - // (when the job transitioned from the STARTING state to the RUNNING state). - // - // StartedAt is a required field - StartedAt *int64 `locationName:"startedAt" type:"long" required:"true"` - - // The current status for the job. - // - // If your jobs do not progress to STARTING, see Jobs Stuck in (http://docs.aws.amazon.com/batch/latest/userguide/troubleshooting.html#job_stuck_in_runnable)RUNNABLE - // Status in the troubleshooting section of the AWS Batch User Guide. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"JobStatus"` - - // A short, human-readable string to provide additional details about the current - // status of the job. - StatusReason *string `locationName:"statusReason" type:"string"` - - // The Unix timestamp (in seconds and milliseconds) for when the job was stopped - // (when the job transitioned from the RUNNING state to a terminal state, such - // as SUCCEEDED or FAILED). - StoppedAt *int64 `locationName:"stoppedAt" type:"long"` - - // The timeout configuration for the job. - Timeout *JobTimeout `locationName:"timeout" type:"structure"` -} - -// String returns the string representation -func (s JobDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobDetail) GoString() string { - return s.String() -} - -// SetArrayProperties sets the ArrayProperties field's value. -func (s *JobDetail) SetArrayProperties(v *ArrayPropertiesDetail) *JobDetail { - s.ArrayProperties = v - return s -} - -// SetAttempts sets the Attempts field's value. -func (s *JobDetail) SetAttempts(v []*AttemptDetail) *JobDetail { - s.Attempts = v - return s -} - -// SetContainer sets the Container field's value. -func (s *JobDetail) SetContainer(v *ContainerDetail) *JobDetail { - s.Container = v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *JobDetail) SetCreatedAt(v int64) *JobDetail { - s.CreatedAt = &v - return s -} - -// SetDependsOn sets the DependsOn field's value. -func (s *JobDetail) SetDependsOn(v []*JobDependency) *JobDetail { - s.DependsOn = v - return s -} - -// SetJobDefinition sets the JobDefinition field's value. -func (s *JobDetail) SetJobDefinition(v string) *JobDetail { - s.JobDefinition = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *JobDetail) SetJobId(v string) *JobDetail { - s.JobId = &v - return s -} - -// SetJobName sets the JobName field's value. -func (s *JobDetail) SetJobName(v string) *JobDetail { - s.JobName = &v - return s -} - -// SetJobQueue sets the JobQueue field's value. -func (s *JobDetail) SetJobQueue(v string) *JobDetail { - s.JobQueue = &v - return s -} - -// SetNodeDetails sets the NodeDetails field's value. -func (s *JobDetail) SetNodeDetails(v *NodeDetails) *JobDetail { - s.NodeDetails = v - return s -} - -// SetNodeProperties sets the NodeProperties field's value. -func (s *JobDetail) SetNodeProperties(v *NodeProperties) *JobDetail { - s.NodeProperties = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *JobDetail) SetParameters(v map[string]*string) *JobDetail { - s.Parameters = v - return s -} - -// SetRetryStrategy sets the RetryStrategy field's value. -func (s *JobDetail) SetRetryStrategy(v *RetryStrategy) *JobDetail { - s.RetryStrategy = v - return s -} - -// SetStartedAt sets the StartedAt field's value. -func (s *JobDetail) SetStartedAt(v int64) *JobDetail { - s.StartedAt = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *JobDetail) SetStatus(v string) *JobDetail { - s.Status = &v - return s -} - -// SetStatusReason sets the StatusReason field's value. -func (s *JobDetail) SetStatusReason(v string) *JobDetail { - s.StatusReason = &v - return s -} - -// SetStoppedAt sets the StoppedAt field's value. -func (s *JobDetail) SetStoppedAt(v int64) *JobDetail { - s.StoppedAt = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *JobDetail) SetTimeout(v *JobTimeout) *JobDetail { - s.Timeout = v - return s -} - -// An object representing the details of an AWS Batch job queue. -type JobQueueDetail struct { - _ struct{} `type:"structure"` - - // The compute environments that are attached to the job queue and the order - // in which job placement is preferred. Compute environments are selected for - // job placement in ascending order. - // - // ComputeEnvironmentOrder is a required field - ComputeEnvironmentOrder []*ComputeEnvironmentOrder `locationName:"computeEnvironmentOrder" type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the job queue. - // - // JobQueueArn is a required field - JobQueueArn *string `locationName:"jobQueueArn" type:"string" required:"true"` - - // The name of the job queue. - // - // JobQueueName is a required field - JobQueueName *string `locationName:"jobQueueName" type:"string" required:"true"` - - // The priority of the job queue. - // - // Priority is a required field - Priority *int64 `locationName:"priority" type:"integer" required:"true"` - - // Describes the ability of the queue to accept new jobs. - // - // State is a required field - State *string `locationName:"state" type:"string" required:"true" enum:"JQState"` - - // The status of the job queue (for example, CREATING or VALID). - Status *string `locationName:"status" type:"string" enum:"JQStatus"` - - // A short, human-readable string to provide additional details about the current - // status of the job queue. - StatusReason *string `locationName:"statusReason" type:"string"` -} - -// String returns the string representation -func (s JobQueueDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobQueueDetail) GoString() string { - return s.String() -} - -// SetComputeEnvironmentOrder sets the ComputeEnvironmentOrder field's value. -func (s *JobQueueDetail) SetComputeEnvironmentOrder(v []*ComputeEnvironmentOrder) *JobQueueDetail { - s.ComputeEnvironmentOrder = v - return s -} - -// SetJobQueueArn sets the JobQueueArn field's value. -func (s *JobQueueDetail) SetJobQueueArn(v string) *JobQueueDetail { - s.JobQueueArn = &v - return s -} - -// SetJobQueueName sets the JobQueueName field's value. -func (s *JobQueueDetail) SetJobQueueName(v string) *JobQueueDetail { - s.JobQueueName = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *JobQueueDetail) SetPriority(v int64) *JobQueueDetail { - s.Priority = &v - return s -} - -// SetState sets the State field's value. -func (s *JobQueueDetail) SetState(v string) *JobQueueDetail { - s.State = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *JobQueueDetail) SetStatus(v string) *JobQueueDetail { - s.Status = &v - return s -} - -// SetStatusReason sets the StatusReason field's value. -func (s *JobQueueDetail) SetStatusReason(v string) *JobQueueDetail { - s.StatusReason = &v - return s -} - -// An object representing summary details of a job. -type JobSummary struct { - _ struct{} `type:"structure"` - - // The array properties of the job, if it is an array job. - ArrayProperties *ArrayPropertiesSummary `locationName:"arrayProperties" type:"structure"` - - // An object representing the details of the container that is associated with - // the job. - Container *ContainerSummary `locationName:"container" type:"structure"` - - // The Unix timestamp for when the job was created. For non-array jobs and parent - // array jobs, this is when the job entered the SUBMITTED state (at the time - // SubmitJob was called). For array child jobs, this is when the child job was - // spawned by its parent and entered the PENDING state. - CreatedAt *int64 `locationName:"createdAt" type:"long"` - - // The ID of the job. - // - // JobId is a required field - JobId *string `locationName:"jobId" type:"string" required:"true"` - - // The name of the job. - // - // JobName is a required field - JobName *string `locationName:"jobName" type:"string" required:"true"` - - // The node properties for a single node in a job summary list. - NodeProperties *NodePropertiesSummary `locationName:"nodeProperties" type:"structure"` - - // The Unix timestamp for when the job was started (when the job transitioned - // from the STARTING state to the RUNNING state). - StartedAt *int64 `locationName:"startedAt" type:"long"` - - // The current status for the job. - Status *string `locationName:"status" type:"string" enum:"JobStatus"` - - // A short, human-readable string to provide additional details about the current - // status of the job. - StatusReason *string `locationName:"statusReason" type:"string"` - - // The Unix timestamp for when the job was stopped (when the job transitioned - // from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED). - StoppedAt *int64 `locationName:"stoppedAt" type:"long"` -} - -// String returns the string representation -func (s JobSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobSummary) GoString() string { - return s.String() -} - -// SetArrayProperties sets the ArrayProperties field's value. -func (s *JobSummary) SetArrayProperties(v *ArrayPropertiesSummary) *JobSummary { - s.ArrayProperties = v - return s -} - -// SetContainer sets the Container field's value. -func (s *JobSummary) SetContainer(v *ContainerSummary) *JobSummary { - s.Container = v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *JobSummary) SetCreatedAt(v int64) *JobSummary { - s.CreatedAt = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *JobSummary) SetJobId(v string) *JobSummary { - s.JobId = &v - return s -} - -// SetJobName sets the JobName field's value. -func (s *JobSummary) SetJobName(v string) *JobSummary { - s.JobName = &v - return s -} - -// SetNodeProperties sets the NodeProperties field's value. -func (s *JobSummary) SetNodeProperties(v *NodePropertiesSummary) *JobSummary { - s.NodeProperties = v - return s -} - -// SetStartedAt sets the StartedAt field's value. -func (s *JobSummary) SetStartedAt(v int64) *JobSummary { - s.StartedAt = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *JobSummary) SetStatus(v string) *JobSummary { - s.Status = &v - return s -} - -// SetStatusReason sets the StatusReason field's value. -func (s *JobSummary) SetStatusReason(v string) *JobSummary { - s.StatusReason = &v - return s -} - -// SetStoppedAt sets the StoppedAt field's value. -func (s *JobSummary) SetStoppedAt(v int64) *JobSummary { - s.StoppedAt = &v - return s -} - -// An object representing a job timeout configuration. -type JobTimeout struct { - _ struct{} `type:"structure"` - - // The time duration in seconds (measured from the job attempt's startedAt timestamp) - // after which AWS Batch terminates your jobs if they have not finished. - AttemptDurationSeconds *int64 `locationName:"attemptDurationSeconds" type:"integer"` -} - -// String returns the string representation -func (s JobTimeout) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobTimeout) GoString() string { - return s.String() -} - -// SetAttemptDurationSeconds sets the AttemptDurationSeconds field's value. -func (s *JobTimeout) SetAttemptDurationSeconds(v int64) *JobTimeout { - s.AttemptDurationSeconds = &v - return s -} - -// A key-value pair object. -type KeyValuePair struct { - _ struct{} `type:"structure"` - - // The name of the key-value pair. For environment variables, this is the name - // of the environment variable. - Name *string `locationName:"name" type:"string"` - - // The value of the key-value pair. For environment variables, this is the value - // of the environment variable. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s KeyValuePair) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KeyValuePair) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *KeyValuePair) SetName(v string) *KeyValuePair { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *KeyValuePair) SetValue(v string) *KeyValuePair { - s.Value = &v - return s -} - -// An object representing a launch template associated with a compute resource. -// You must specify either the launch template ID or launch template name in -// the request, but not both. -type LaunchTemplateSpecification struct { - _ struct{} `type:"structure"` - - // The ID of the launch template. - LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` - - // The name of the launch template. - LaunchTemplateName *string `locationName:"launchTemplateName" type:"string"` - - // The version number of the launch template. - // - // Default: The default version of the launch template. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s LaunchTemplateSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateSpecification) GoString() string { - return s.String() -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *LaunchTemplateSpecification) SetLaunchTemplateId(v string) *LaunchTemplateSpecification { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *LaunchTemplateSpecification) SetLaunchTemplateName(v string) *LaunchTemplateSpecification { - s.LaunchTemplateName = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *LaunchTemplateSpecification) SetVersion(v string) *LaunchTemplateSpecification { - s.Version = &v - return s -} - -type ListJobsInput struct { - _ struct{} `type:"structure"` - - // The job ID for an array job. Specifying an array job ID with this parameter - // lists all child jobs from within the specified array. - ArrayJobId *string `locationName:"arrayJobId" type:"string"` - - // The name or full Amazon Resource Name (ARN) of the job queue with which to - // list jobs. - JobQueue *string `locationName:"jobQueue" type:"string"` - - // The job status with which to filter jobs in the specified queue. If you do - // not specify a status, only RUNNING jobs are returned. - JobStatus *string `locationName:"jobStatus" type:"string" enum:"JobStatus"` - - // The maximum number of results returned by ListJobs in paginated output. When - // this parameter is used, ListJobs only returns maxResults results in a single - // page along with a nextToken response element. The remaining results of the - // initial request can be seen by sending another ListJobs request with the - // returned nextToken value. This value can be between 1 and 100. If this parameter - // is not used, then ListJobs returns up to 100 results and a nextToken value - // if applicable. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The job ID for a multi-node parallel job. Specifying a multi-node parallel - // job ID with this parameter lists all nodes that are associated with the specified - // job. - MultiNodeJobId *string `locationName:"multiNodeJobId" type:"string"` - - // The nextToken value returned from a previous paginated ListJobs request where - // maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. This value is null when there are no more results to return. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobsInput) GoString() string { - return s.String() -} - -// SetArrayJobId sets the ArrayJobId field's value. -func (s *ListJobsInput) SetArrayJobId(v string) *ListJobsInput { - s.ArrayJobId = &v - return s -} - -// SetJobQueue sets the JobQueue field's value. -func (s *ListJobsInput) SetJobQueue(v string) *ListJobsInput { - s.JobQueue = &v - return s -} - -// SetJobStatus sets the JobStatus field's value. -func (s *ListJobsInput) SetJobStatus(v string) *ListJobsInput { - s.JobStatus = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListJobsInput) SetMaxResults(v int64) *ListJobsInput { - s.MaxResults = &v - return s -} - -// SetMultiNodeJobId sets the MultiNodeJobId field's value. -func (s *ListJobsInput) SetMultiNodeJobId(v string) *ListJobsInput { - s.MultiNodeJobId = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListJobsInput) SetNextToken(v string) *ListJobsInput { - s.NextToken = &v - return s -} - -type ListJobsOutput struct { - _ struct{} `type:"structure"` - - // A list of job summaries that match the request. - // - // JobSummaryList is a required field - JobSummaryList []*JobSummary `locationName:"jobSummaryList" type:"list" required:"true"` - - // The nextToken value to include in a future ListJobs request. When the results - // of a ListJobs request exceed maxResults, this value can be used to retrieve - // the next page of results. This value is null when there are no more results - // to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobsOutput) GoString() string { - return s.String() -} - -// SetJobSummaryList sets the JobSummaryList field's value. -func (s *ListJobsOutput) SetJobSummaryList(v []*JobSummary) *ListJobsOutput { - s.JobSummaryList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListJobsOutput) SetNextToken(v string) *ListJobsOutput { - s.NextToken = &v - return s -} - -// Details on a Docker volume mount point that is used in a job's container -// properties. -type MountPoint struct { - _ struct{} `type:"structure"` - - // The path on the container at which to mount the host volume. - ContainerPath *string `locationName:"containerPath" type:"string"` - - // If this value is true, the container has read-only access to the volume; - // otherwise, the container can write to the volume. The default value is false. - ReadOnly *bool `locationName:"readOnly" type:"boolean"` - - // The name of the volume to mount. - SourceVolume *string `locationName:"sourceVolume" type:"string"` -} - -// String returns the string representation -func (s MountPoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MountPoint) GoString() string { - return s.String() -} - -// SetContainerPath sets the ContainerPath field's value. -func (s *MountPoint) SetContainerPath(v string) *MountPoint { - s.ContainerPath = &v - return s -} - -// SetReadOnly sets the ReadOnly field's value. -func (s *MountPoint) SetReadOnly(v bool) *MountPoint { - s.ReadOnly = &v - return s -} - -// SetSourceVolume sets the SourceVolume field's value. -func (s *MountPoint) SetSourceVolume(v string) *MountPoint { - s.SourceVolume = &v - return s -} - -// An object representing the elastic network interface for a multi-node parallel -// job node. -type NetworkInterface struct { - _ struct{} `type:"structure"` - - // The attachment ID for the network interface. - AttachmentId *string `locationName:"attachmentId" type:"string"` - - // The private IPv6 address for the network interface. - Ipv6Address *string `locationName:"ipv6Address" type:"string"` - - // The private IPv4 address for the network interface. - PrivateIpv4Address *string `locationName:"privateIpv4Address" type:"string"` -} - -// String returns the string representation -func (s NetworkInterface) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInterface) GoString() string { - return s.String() -} - -// SetAttachmentId sets the AttachmentId field's value. -func (s *NetworkInterface) SetAttachmentId(v string) *NetworkInterface { - s.AttachmentId = &v - return s -} - -// SetIpv6Address sets the Ipv6Address field's value. -func (s *NetworkInterface) SetIpv6Address(v string) *NetworkInterface { - s.Ipv6Address = &v - return s -} - -// SetPrivateIpv4Address sets the PrivateIpv4Address field's value. -func (s *NetworkInterface) SetPrivateIpv4Address(v string) *NetworkInterface { - s.PrivateIpv4Address = &v - return s -} - -// An object representing the details of a multi-node parallel job node. -type NodeDetails struct { - _ struct{} `type:"structure"` - - // Specifies whether the current node is the main node for a multi-node parallel - // job. - IsMainNode *bool `locationName:"isMainNode" type:"boolean"` - - // The node index for the node. Node index numbering begins at zero. This index - // is also available on the node with the AWS_BATCH_JOB_NODE_INDEX environment - // variable. - NodeIndex *int64 `locationName:"nodeIndex" type:"integer"` -} - -// String returns the string representation -func (s NodeDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NodeDetails) GoString() string { - return s.String() -} - -// SetIsMainNode sets the IsMainNode field's value. -func (s *NodeDetails) SetIsMainNode(v bool) *NodeDetails { - s.IsMainNode = &v - return s -} - -// SetNodeIndex sets the NodeIndex field's value. -func (s *NodeDetails) SetNodeIndex(v int64) *NodeDetails { - s.NodeIndex = &v - return s -} - -// Object representing any node overrides to a job definition that is used in -// a SubmitJob API operation. -type NodeOverrides struct { - _ struct{} `type:"structure"` - - // The node property overrides for the job. - NodePropertyOverrides []*NodePropertyOverride `locationName:"nodePropertyOverrides" type:"list"` -} - -// String returns the string representation -func (s NodeOverrides) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NodeOverrides) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NodeOverrides) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NodeOverrides"} - if s.NodePropertyOverrides != nil { - for i, v := range s.NodePropertyOverrides { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NodePropertyOverrides", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNodePropertyOverrides sets the NodePropertyOverrides field's value. -func (s *NodeOverrides) SetNodePropertyOverrides(v []*NodePropertyOverride) *NodeOverrides { - s.NodePropertyOverrides = v - return s -} - -// An object representing the node properties of a multi-node parallel job. -type NodeProperties struct { - _ struct{} `type:"structure"` - - // Specifies the node index for the main node of a multi-node parallel job. - // - // MainNode is a required field - MainNode *int64 `locationName:"mainNode" type:"integer" required:"true"` - - // A list of node ranges and their properties associated with a multi-node parallel - // job. - // - // NodeRangeProperties is a required field - NodeRangeProperties []*NodeRangeProperty `locationName:"nodeRangeProperties" type:"list" required:"true"` - - // The number of nodes associated with a multi-node parallel job. - // - // NumNodes is a required field - NumNodes *int64 `locationName:"numNodes" type:"integer" required:"true"` -} - -// String returns the string representation -func (s NodeProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NodeProperties) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NodeProperties) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NodeProperties"} - if s.MainNode == nil { - invalidParams.Add(request.NewErrParamRequired("MainNode")) - } - if s.NodeRangeProperties == nil { - invalidParams.Add(request.NewErrParamRequired("NodeRangeProperties")) - } - if s.NumNodes == nil { - invalidParams.Add(request.NewErrParamRequired("NumNodes")) - } - if s.NodeRangeProperties != nil { - for i, v := range s.NodeRangeProperties { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NodeRangeProperties", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMainNode sets the MainNode field's value. -func (s *NodeProperties) SetMainNode(v int64) *NodeProperties { - s.MainNode = &v - return s -} - -// SetNodeRangeProperties sets the NodeRangeProperties field's value. -func (s *NodeProperties) SetNodeRangeProperties(v []*NodeRangeProperty) *NodeProperties { - s.NodeRangeProperties = v - return s -} - -// SetNumNodes sets the NumNodes field's value. -func (s *NodeProperties) SetNumNodes(v int64) *NodeProperties { - s.NumNodes = &v - return s -} - -// An object representing the properties of a node that is associated with a -// multi-node parallel job. -type NodePropertiesSummary struct { - _ struct{} `type:"structure"` - - // Specifies whether the current node is the main node for a multi-node parallel - // job. - IsMainNode *bool `locationName:"isMainNode" type:"boolean"` - - // The node index for the node. Node index numbering begins at zero. This index - // is also available on the node with the AWS_BATCH_JOB_NODE_INDEX environment - // variable. - NodeIndex *int64 `locationName:"nodeIndex" type:"integer"` - - // The number of nodes associated with a multi-node parallel job. - NumNodes *int64 `locationName:"numNodes" type:"integer"` -} - -// String returns the string representation -func (s NodePropertiesSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NodePropertiesSummary) GoString() string { - return s.String() -} - -// SetIsMainNode sets the IsMainNode field's value. -func (s *NodePropertiesSummary) SetIsMainNode(v bool) *NodePropertiesSummary { - s.IsMainNode = &v - return s -} - -// SetNodeIndex sets the NodeIndex field's value. -func (s *NodePropertiesSummary) SetNodeIndex(v int64) *NodePropertiesSummary { - s.NodeIndex = &v - return s -} - -// SetNumNodes sets the NumNodes field's value. -func (s *NodePropertiesSummary) SetNumNodes(v int64) *NodePropertiesSummary { - s.NumNodes = &v - return s -} - -// Object representing any node overrides to a job definition that is used in -// a SubmitJob API operation. -type NodePropertyOverride struct { - _ struct{} `type:"structure"` - - // The overrides that should be sent to a node range. - ContainerOverrides *ContainerOverrides `locationName:"containerOverrides" type:"structure"` - - // The range of nodes, using node index values, with which to override. A range - // of 0:3 indicates nodes with index values of 0 through 3. If the starting - // range value is omitted (:n), then 0 is used to start the range. If the ending - // range value is omitted (n:), then the highest possible node index is used - // to end the range. - // - // TargetNodes is a required field - TargetNodes *string `locationName:"targetNodes" type:"string" required:"true"` -} - -// String returns the string representation -func (s NodePropertyOverride) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NodePropertyOverride) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NodePropertyOverride) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NodePropertyOverride"} - if s.TargetNodes == nil { - invalidParams.Add(request.NewErrParamRequired("TargetNodes")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerOverrides sets the ContainerOverrides field's value. -func (s *NodePropertyOverride) SetContainerOverrides(v *ContainerOverrides) *NodePropertyOverride { - s.ContainerOverrides = v - return s -} - -// SetTargetNodes sets the TargetNodes field's value. -func (s *NodePropertyOverride) SetTargetNodes(v string) *NodePropertyOverride { - s.TargetNodes = &v - return s -} - -// An object representing the properties of the node range for a multi-node -// parallel job. -type NodeRangeProperty struct { - _ struct{} `type:"structure"` - - // The container details for the node range. - Container *ContainerProperties `locationName:"container" type:"structure"` - - // The range of nodes, using node index values. A range of 0:3 indicates nodes - // with index values of 0 through 3. If the starting range value is omitted - // (:n), then 0 is used to start the range. If the ending range value is omitted - // (n:), then the highest possible node index is used to end the range. Your - // accumulative node ranges must account for all nodes (0:n). You may nest node - // ranges, for example 0:10 and 4:5, in which case the 4:5 range properties - // override the 0:10 properties. - // - // TargetNodes is a required field - TargetNodes *string `locationName:"targetNodes" type:"string" required:"true"` -} - -// String returns the string representation -func (s NodeRangeProperty) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NodeRangeProperty) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NodeRangeProperty) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NodeRangeProperty"} - if s.TargetNodes == nil { - invalidParams.Add(request.NewErrParamRequired("TargetNodes")) - } - if s.Container != nil { - if err := s.Container.Validate(); err != nil { - invalidParams.AddNested("Container", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainer sets the Container field's value. -func (s *NodeRangeProperty) SetContainer(v *ContainerProperties) *NodeRangeProperty { - s.Container = v - return s -} - -// SetTargetNodes sets the TargetNodes field's value. -func (s *NodeRangeProperty) SetTargetNodes(v string) *NodeRangeProperty { - s.TargetNodes = &v - return s -} - -type RegisterJobDefinitionInput struct { - _ struct{} `type:"structure"` - - // An object with various properties specific to single-node container-based - // jobs. If the job definition's type parameter is container, then you must - // specify either containerProperties or nodeProperties. - ContainerProperties *ContainerProperties `locationName:"containerProperties" type:"structure"` - - // The name of the job definition to register. Up to 128 letters (uppercase - // and lowercase), numbers, hyphens, and underscores are allowed. - // - // JobDefinitionName is a required field - JobDefinitionName *string `locationName:"jobDefinitionName" type:"string" required:"true"` - - // An object with various properties specific to multi-node parallel jobs. If - // you specify node properties for a job, it becomes a multi-node parallel job. - // For more information, see Multi-node Parallel Jobs (http://docs.aws.amazon.com/batch/latest/userguide/multi-node-parallel-jobs.html) - // in the AWS Batch User Guide. If the job definition's type parameter is container, - // then you must specify either containerProperties or nodeProperties. - NodeProperties *NodeProperties `locationName:"nodeProperties" type:"structure"` - - // Default parameter substitution placeholders to set in the job definition. - // Parameters are specified as a key-value pair mapping. Parameters in a SubmitJob - // request override any corresponding parameter defaults from the job definition. - Parameters map[string]*string `locationName:"parameters" type:"map"` - - // The retry strategy to use for failed jobs that are submitted with this job - // definition. Any retry strategy that is specified during a SubmitJob operation - // overrides the retry strategy defined here. If a job is terminated due to - // a timeout, it is not retried. - RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` - - // The timeout configuration for jobs that are submitted with this job definition, - // after which AWS Batch terminates your jobs if they have not finished. If - // a job is terminated due to a timeout, it is not retried. The minimum value - // for the timeout is 60 seconds. Any timeout configuration that is specified - // during a SubmitJob operation overrides the timeout configuration defined - // here. For more information, see Job Timeouts (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/job_timeouts.html) - // in the Amazon Elastic Container Service Developer Guide. - Timeout *JobTimeout `locationName:"timeout" type:"structure"` - - // The type of job definition. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"JobDefinitionType"` -} - -// String returns the string representation -func (s RegisterJobDefinitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterJobDefinitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterJobDefinitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterJobDefinitionInput"} - if s.JobDefinitionName == nil { - invalidParams.Add(request.NewErrParamRequired("JobDefinitionName")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.ContainerProperties != nil { - if err := s.ContainerProperties.Validate(); err != nil { - invalidParams.AddNested("ContainerProperties", err.(request.ErrInvalidParams)) - } - } - if s.NodeProperties != nil { - if err := s.NodeProperties.Validate(); err != nil { - invalidParams.AddNested("NodeProperties", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerProperties sets the ContainerProperties field's value. -func (s *RegisterJobDefinitionInput) SetContainerProperties(v *ContainerProperties) *RegisterJobDefinitionInput { - s.ContainerProperties = v - return s -} - -// SetJobDefinitionName sets the JobDefinitionName field's value. -func (s *RegisterJobDefinitionInput) SetJobDefinitionName(v string) *RegisterJobDefinitionInput { - s.JobDefinitionName = &v - return s -} - -// SetNodeProperties sets the NodeProperties field's value. -func (s *RegisterJobDefinitionInput) SetNodeProperties(v *NodeProperties) *RegisterJobDefinitionInput { - s.NodeProperties = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *RegisterJobDefinitionInput) SetParameters(v map[string]*string) *RegisterJobDefinitionInput { - s.Parameters = v - return s -} - -// SetRetryStrategy sets the RetryStrategy field's value. -func (s *RegisterJobDefinitionInput) SetRetryStrategy(v *RetryStrategy) *RegisterJobDefinitionInput { - s.RetryStrategy = v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *RegisterJobDefinitionInput) SetTimeout(v *JobTimeout) *RegisterJobDefinitionInput { - s.Timeout = v - return s -} - -// SetType sets the Type field's value. -func (s *RegisterJobDefinitionInput) SetType(v string) *RegisterJobDefinitionInput { - s.Type = &v - return s -} - -type RegisterJobDefinitionOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the job definition. - // - // JobDefinitionArn is a required field - JobDefinitionArn *string `locationName:"jobDefinitionArn" type:"string" required:"true"` - - // The name of the job definition. - // - // JobDefinitionName is a required field - JobDefinitionName *string `locationName:"jobDefinitionName" type:"string" required:"true"` - - // The revision of the job definition. - // - // Revision is a required field - Revision *int64 `locationName:"revision" type:"integer" required:"true"` -} - -// String returns the string representation -func (s RegisterJobDefinitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterJobDefinitionOutput) GoString() string { - return s.String() -} - -// SetJobDefinitionArn sets the JobDefinitionArn field's value. -func (s *RegisterJobDefinitionOutput) SetJobDefinitionArn(v string) *RegisterJobDefinitionOutput { - s.JobDefinitionArn = &v - return s -} - -// SetJobDefinitionName sets the JobDefinitionName field's value. -func (s *RegisterJobDefinitionOutput) SetJobDefinitionName(v string) *RegisterJobDefinitionOutput { - s.JobDefinitionName = &v - return s -} - -// SetRevision sets the Revision field's value. -func (s *RegisterJobDefinitionOutput) SetRevision(v int64) *RegisterJobDefinitionOutput { - s.Revision = &v - return s -} - -// The retry strategy associated with a job. -type RetryStrategy struct { - _ struct{} `type:"structure"` - - // The number of times to move a job to the RUNNABLE status. You may specify - // between 1 and 10 attempts. If the value of attempts is greater than one, - // the job is retried on failure the same number of attempts as the value. - Attempts *int64 `locationName:"attempts" type:"integer"` -} - -// String returns the string representation -func (s RetryStrategy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RetryStrategy) GoString() string { - return s.String() -} - -// SetAttempts sets the Attempts field's value. -func (s *RetryStrategy) SetAttempts(v int64) *RetryStrategy { - s.Attempts = &v - return s -} - -type SubmitJobInput struct { - _ struct{} `type:"structure"` - - // The array properties for the submitted job, such as the size of the array. - // The array size can be between 2 and 10,000. If you specify array properties - // for a job, it becomes an array job. For more information, see Array Jobs - // (http://docs.aws.amazon.com/batch/latest/userguide/array_jobs.html) in the - // AWS Batch User Guide. - ArrayProperties *ArrayProperties `locationName:"arrayProperties" type:"structure"` - - // A list of container overrides in JSON format that specify the name of a container - // in the specified job definition and the overrides it should receive. You - // can override the default command for a container (that is specified in the - // job definition or the Docker image) with a command override. You can also - // override existing environment variables (that are specified in the job definition - // or Docker image) on a container or add new environment variables to it with - // an environment override. - ContainerOverrides *ContainerOverrides `locationName:"containerOverrides" type:"structure"` - - // A list of dependencies for the job. A job can depend upon a maximum of 20 - // jobs. You can specify a SEQUENTIAL type dependency without specifying a job - // ID for array jobs so that each child array job completes sequentially, starting - // at index 0. You can also specify an N_TO_N type dependency with a job ID - // for array jobs. In that case, each index child of this job must wait for - // the corresponding index child of each dependency to complete before it can - // begin. - DependsOn []*JobDependency `locationName:"dependsOn" type:"list"` - - // The job definition used by this job. This value can be either a name:revision - // or the Amazon Resource Name (ARN) for the job definition. - // - // JobDefinition is a required field - JobDefinition *string `locationName:"jobDefinition" type:"string" required:"true"` - - // The name of the job. The first character must be alphanumeric, and up to - // 128 letters (uppercase and lowercase), numbers, hyphens, and underscores - // are allowed. - // - // JobName is a required field - JobName *string `locationName:"jobName" type:"string" required:"true"` - - // The job queue into which the job is submitted. You can specify either the - // name or the Amazon Resource Name (ARN) of the queue. - // - // JobQueue is a required field - JobQueue *string `locationName:"jobQueue" type:"string" required:"true"` - - // A list of node overrides in JSON format that specify the node range to target - // and the container overrides for that node range. - NodeOverrides *NodeOverrides `locationName:"nodeOverrides" type:"structure"` - - // Additional parameters passed to the job that replace parameter substitution - // placeholders that are set in the job definition. Parameters are specified - // as a key and value pair mapping. Parameters in a SubmitJob request override - // any corresponding parameter defaults from the job definition. - Parameters map[string]*string `locationName:"parameters" type:"map"` - - // The retry strategy to use for failed jobs from this SubmitJob operation. - // When a retry strategy is specified here, it overrides the retry strategy - // defined in the job definition. - RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` - - // The timeout configuration for this SubmitJob operation. You can specify a - // timeout duration after which AWS Batch terminates your jobs if they have - // not finished. If a job is terminated due to a timeout, it is not retried. - // The minimum value for the timeout is 60 seconds. This configuration overrides - // any timeout configuration specified in the job definition. For array jobs, - // child jobs have the same timeout configuration as the parent job. For more - // information, see Job Timeouts (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/job_timeouts.html) - // in the Amazon Elastic Container Service Developer Guide. - Timeout *JobTimeout `locationName:"timeout" type:"structure"` -} - -// String returns the string representation -func (s SubmitJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubmitJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SubmitJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SubmitJobInput"} - if s.JobDefinition == nil { - invalidParams.Add(request.NewErrParamRequired("JobDefinition")) - } - if s.JobName == nil { - invalidParams.Add(request.NewErrParamRequired("JobName")) - } - if s.JobQueue == nil { - invalidParams.Add(request.NewErrParamRequired("JobQueue")) - } - if s.NodeOverrides != nil { - if err := s.NodeOverrides.Validate(); err != nil { - invalidParams.AddNested("NodeOverrides", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArrayProperties sets the ArrayProperties field's value. -func (s *SubmitJobInput) SetArrayProperties(v *ArrayProperties) *SubmitJobInput { - s.ArrayProperties = v - return s -} - -// SetContainerOverrides sets the ContainerOverrides field's value. -func (s *SubmitJobInput) SetContainerOverrides(v *ContainerOverrides) *SubmitJobInput { - s.ContainerOverrides = v - return s -} - -// SetDependsOn sets the DependsOn field's value. -func (s *SubmitJobInput) SetDependsOn(v []*JobDependency) *SubmitJobInput { - s.DependsOn = v - return s -} - -// SetJobDefinition sets the JobDefinition field's value. -func (s *SubmitJobInput) SetJobDefinition(v string) *SubmitJobInput { - s.JobDefinition = &v - return s -} - -// SetJobName sets the JobName field's value. -func (s *SubmitJobInput) SetJobName(v string) *SubmitJobInput { - s.JobName = &v - return s -} - -// SetJobQueue sets the JobQueue field's value. -func (s *SubmitJobInput) SetJobQueue(v string) *SubmitJobInput { - s.JobQueue = &v - return s -} - -// SetNodeOverrides sets the NodeOverrides field's value. -func (s *SubmitJobInput) SetNodeOverrides(v *NodeOverrides) *SubmitJobInput { - s.NodeOverrides = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *SubmitJobInput) SetParameters(v map[string]*string) *SubmitJobInput { - s.Parameters = v - return s -} - -// SetRetryStrategy sets the RetryStrategy field's value. -func (s *SubmitJobInput) SetRetryStrategy(v *RetryStrategy) *SubmitJobInput { - s.RetryStrategy = v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *SubmitJobInput) SetTimeout(v *JobTimeout) *SubmitJobInput { - s.Timeout = v - return s -} - -type SubmitJobOutput struct { - _ struct{} `type:"structure"` - - // The unique identifier for the job. - // - // JobId is a required field - JobId *string `locationName:"jobId" type:"string" required:"true"` - - // The name of the job. - // - // JobName is a required field - JobName *string `locationName:"jobName" type:"string" required:"true"` -} - -// String returns the string representation -func (s SubmitJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubmitJobOutput) GoString() string { - return s.String() -} - -// SetJobId sets the JobId field's value. -func (s *SubmitJobOutput) SetJobId(v string) *SubmitJobOutput { - s.JobId = &v - return s -} - -// SetJobName sets the JobName field's value. -func (s *SubmitJobOutput) SetJobName(v string) *SubmitJobOutput { - s.JobName = &v - return s -} - -type TerminateJobInput struct { - _ struct{} `type:"structure"` - - // The AWS Batch job ID of the job to terminate. - // - // JobId is a required field - JobId *string `locationName:"jobId" type:"string" required:"true"` - - // A message to attach to the job that explains the reason for canceling it. - // This message is returned by future DescribeJobs operations on the job. This - // message is also recorded in the AWS Batch activity logs. - // - // Reason is a required field - Reason *string `locationName:"reason" type:"string" required:"true"` -} - -// String returns the string representation -func (s TerminateJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TerminateJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TerminateJobInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.Reason == nil { - invalidParams.Add(request.NewErrParamRequired("Reason")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobId sets the JobId field's value. -func (s *TerminateJobInput) SetJobId(v string) *TerminateJobInput { - s.JobId = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *TerminateJobInput) SetReason(v string) *TerminateJobInput { - s.Reason = &v - return s -} - -type TerminateJobOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TerminateJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateJobOutput) GoString() string { - return s.String() -} - -// The ulimit settings to pass to the container. -type Ulimit struct { - _ struct{} `type:"structure"` - - // The hard limit for the ulimit type. - // - // HardLimit is a required field - HardLimit *int64 `locationName:"hardLimit" type:"integer" required:"true"` - - // The type of the ulimit. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The soft limit for the ulimit type. - // - // SoftLimit is a required field - SoftLimit *int64 `locationName:"softLimit" type:"integer" required:"true"` -} - -// String returns the string representation -func (s Ulimit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Ulimit) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Ulimit) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Ulimit"} - if s.HardLimit == nil { - invalidParams.Add(request.NewErrParamRequired("HardLimit")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.SoftLimit == nil { - invalidParams.Add(request.NewErrParamRequired("SoftLimit")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHardLimit sets the HardLimit field's value. -func (s *Ulimit) SetHardLimit(v int64) *Ulimit { - s.HardLimit = &v - return s -} - -// SetName sets the Name field's value. -func (s *Ulimit) SetName(v string) *Ulimit { - s.Name = &v - return s -} - -// SetSoftLimit sets the SoftLimit field's value. -func (s *Ulimit) SetSoftLimit(v int64) *Ulimit { - s.SoftLimit = &v - return s -} - -type UpdateComputeEnvironmentInput struct { - _ struct{} `type:"structure"` - - // The name or full Amazon Resource Name (ARN) of the compute environment to - // update. - // - // ComputeEnvironment is a required field - ComputeEnvironment *string `locationName:"computeEnvironment" type:"string" required:"true"` - - // Details of the compute resources managed by the compute environment. Required - // for a managed compute environment. - ComputeResources *ComputeResourceUpdate `locationName:"computeResources" type:"structure"` - - // The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch - // to make calls to other AWS services on your behalf. - // - // If your specified role has a path other than /, then you must either specify - // the full role ARN (this is recommended) or prefix the role name with the - // path. - // - // Depending on how you created your AWS Batch service role, its ARN may contain - // the service-role path prefix. When you only specify the name of the service - // role, AWS Batch assumes that your ARN does not use the service-role path - // prefix. Because of this, we recommend that you specify the full ARN of your - // service role when you create compute environments. - ServiceRole *string `locationName:"serviceRole" type:"string"` - - // The state of the compute environment. Compute environments in the ENABLED - // state can accept jobs from a queue and scale in or out automatically based - // on the workload demand of its associated queues. - State *string `locationName:"state" type:"string" enum:"CEState"` -} - -// String returns the string representation -func (s UpdateComputeEnvironmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateComputeEnvironmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateComputeEnvironmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateComputeEnvironmentInput"} - if s.ComputeEnvironment == nil { - invalidParams.Add(request.NewErrParamRequired("ComputeEnvironment")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComputeEnvironment sets the ComputeEnvironment field's value. -func (s *UpdateComputeEnvironmentInput) SetComputeEnvironment(v string) *UpdateComputeEnvironmentInput { - s.ComputeEnvironment = &v - return s -} - -// SetComputeResources sets the ComputeResources field's value. -func (s *UpdateComputeEnvironmentInput) SetComputeResources(v *ComputeResourceUpdate) *UpdateComputeEnvironmentInput { - s.ComputeResources = v - return s -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *UpdateComputeEnvironmentInput) SetServiceRole(v string) *UpdateComputeEnvironmentInput { - s.ServiceRole = &v - return s -} - -// SetState sets the State field's value. -func (s *UpdateComputeEnvironmentInput) SetState(v string) *UpdateComputeEnvironmentInput { - s.State = &v - return s -} - -type UpdateComputeEnvironmentOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the compute environment. - ComputeEnvironmentArn *string `locationName:"computeEnvironmentArn" type:"string"` - - // The name of the compute environment. - ComputeEnvironmentName *string `locationName:"computeEnvironmentName" type:"string"` -} - -// String returns the string representation -func (s UpdateComputeEnvironmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateComputeEnvironmentOutput) GoString() string { - return s.String() -} - -// SetComputeEnvironmentArn sets the ComputeEnvironmentArn field's value. -func (s *UpdateComputeEnvironmentOutput) SetComputeEnvironmentArn(v string) *UpdateComputeEnvironmentOutput { - s.ComputeEnvironmentArn = &v - return s -} - -// SetComputeEnvironmentName sets the ComputeEnvironmentName field's value. -func (s *UpdateComputeEnvironmentOutput) SetComputeEnvironmentName(v string) *UpdateComputeEnvironmentOutput { - s.ComputeEnvironmentName = &v - return s -} - -type UpdateJobQueueInput struct { - _ struct{} `type:"structure"` - - // Details the set of compute environments mapped to a job queue and their order - // relative to each other. This is one of the parameters used by the job scheduler - // to determine which compute environment should execute a given job. - ComputeEnvironmentOrder []*ComputeEnvironmentOrder `locationName:"computeEnvironmentOrder" type:"list"` - - // The name or the Amazon Resource Name (ARN) of the job queue. - // - // JobQueue is a required field - JobQueue *string `locationName:"jobQueue" type:"string" required:"true"` - - // The priority of the job queue. Job queues with a higher priority (or a higher - // integer value for the priority parameter) are evaluated first when associated - // with the same compute environment. Priority is determined in descending order, - // for example, a job queue with a priority value of 10 is given scheduling - // preference over a job queue with a priority value of 1. - Priority *int64 `locationName:"priority" type:"integer"` - - // Describes the queue's ability to accept new jobs. - State *string `locationName:"state" type:"string" enum:"JQState"` -} - -// String returns the string representation -func (s UpdateJobQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateJobQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateJobQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateJobQueueInput"} - if s.JobQueue == nil { - invalidParams.Add(request.NewErrParamRequired("JobQueue")) - } - if s.ComputeEnvironmentOrder != nil { - for i, v := range s.ComputeEnvironmentOrder { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ComputeEnvironmentOrder", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComputeEnvironmentOrder sets the ComputeEnvironmentOrder field's value. -func (s *UpdateJobQueueInput) SetComputeEnvironmentOrder(v []*ComputeEnvironmentOrder) *UpdateJobQueueInput { - s.ComputeEnvironmentOrder = v - return s -} - -// SetJobQueue sets the JobQueue field's value. -func (s *UpdateJobQueueInput) SetJobQueue(v string) *UpdateJobQueueInput { - s.JobQueue = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *UpdateJobQueueInput) SetPriority(v int64) *UpdateJobQueueInput { - s.Priority = &v - return s -} - -// SetState sets the State field's value. -func (s *UpdateJobQueueInput) SetState(v string) *UpdateJobQueueInput { - s.State = &v - return s -} - -type UpdateJobQueueOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the job queue. - JobQueueArn *string `locationName:"jobQueueArn" type:"string"` - - // The name of the job queue. - JobQueueName *string `locationName:"jobQueueName" type:"string"` -} - -// String returns the string representation -func (s UpdateJobQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateJobQueueOutput) GoString() string { - return s.String() -} - -// SetJobQueueArn sets the JobQueueArn field's value. -func (s *UpdateJobQueueOutput) SetJobQueueArn(v string) *UpdateJobQueueOutput { - s.JobQueueArn = &v - return s -} - -// SetJobQueueName sets the JobQueueName field's value. -func (s *UpdateJobQueueOutput) SetJobQueueName(v string) *UpdateJobQueueOutput { - s.JobQueueName = &v - return s -} - -// A data volume used in a job's container properties. -type Volume struct { - _ struct{} `type:"structure"` - - // The contents of the host parameter determine whether your data volume persists - // on the host container instance and where it is stored. If the host parameter - // is empty, then the Docker daemon assigns a host path for your data volume. - // However, the data is not guaranteed to persist after the containers associated - // with it stop running. - Host *Host `locationName:"host" type:"structure"` - - // The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, - // hyphens, and underscores are allowed. This name is referenced in the sourceVolume - // parameter of container definition mountPoints. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s Volume) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Volume) GoString() string { - return s.String() -} - -// SetHost sets the Host field's value. -func (s *Volume) SetHost(v *Host) *Volume { - s.Host = v - return s -} - -// SetName sets the Name field's value. -func (s *Volume) SetName(v string) *Volume { - s.Name = &v - return s -} - -const ( - // ArrayJobDependencyNToN is a ArrayJobDependency enum value - ArrayJobDependencyNToN = "N_TO_N" - - // ArrayJobDependencySequential is a ArrayJobDependency enum value - ArrayJobDependencySequential = "SEQUENTIAL" -) - -const ( - // CEStateEnabled is a CEState enum value - CEStateEnabled = "ENABLED" - - // CEStateDisabled is a CEState enum value - CEStateDisabled = "DISABLED" -) - -const ( - // CEStatusCreating is a CEStatus enum value - CEStatusCreating = "CREATING" - - // CEStatusUpdating is a CEStatus enum value - CEStatusUpdating = "UPDATING" - - // CEStatusDeleting is a CEStatus enum value - CEStatusDeleting = "DELETING" - - // CEStatusDeleted is a CEStatus enum value - CEStatusDeleted = "DELETED" - - // CEStatusValid is a CEStatus enum value - CEStatusValid = "VALID" - - // CEStatusInvalid is a CEStatus enum value - CEStatusInvalid = "INVALID" -) - -const ( - // CETypeManaged is a CEType enum value - CETypeManaged = "MANAGED" - - // CETypeUnmanaged is a CEType enum value - CETypeUnmanaged = "UNMANAGED" -) - -const ( - // CRTypeEc2 is a CRType enum value - CRTypeEc2 = "EC2" - - // CRTypeSpot is a CRType enum value - CRTypeSpot = "SPOT" -) - -const ( - // JQStateEnabled is a JQState enum value - JQStateEnabled = "ENABLED" - - // JQStateDisabled is a JQState enum value - JQStateDisabled = "DISABLED" -) - -const ( - // JQStatusCreating is a JQStatus enum value - JQStatusCreating = "CREATING" - - // JQStatusUpdating is a JQStatus enum value - JQStatusUpdating = "UPDATING" - - // JQStatusDeleting is a JQStatus enum value - JQStatusDeleting = "DELETING" - - // JQStatusDeleted is a JQStatus enum value - JQStatusDeleted = "DELETED" - - // JQStatusValid is a JQStatus enum value - JQStatusValid = "VALID" - - // JQStatusInvalid is a JQStatus enum value - JQStatusInvalid = "INVALID" -) - -const ( - // JobDefinitionTypeContainer is a JobDefinitionType enum value - JobDefinitionTypeContainer = "container" - - // JobDefinitionTypeMultinode is a JobDefinitionType enum value - JobDefinitionTypeMultinode = "multinode" -) - -const ( - // JobStatusSubmitted is a JobStatus enum value - JobStatusSubmitted = "SUBMITTED" - - // JobStatusPending is a JobStatus enum value - JobStatusPending = "PENDING" - - // JobStatusRunnable is a JobStatus enum value - JobStatusRunnable = "RUNNABLE" - - // JobStatusStarting is a JobStatus enum value - JobStatusStarting = "STARTING" - - // JobStatusRunning is a JobStatus enum value - JobStatusRunning = "RUNNING" - - // JobStatusSucceeded is a JobStatus enum value - JobStatusSucceeded = "SUCCEEDED" - - // JobStatusFailed is a JobStatus enum value - JobStatusFailed = "FAILED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/batch/doc.go b/vendor/github.com/aws/aws-sdk-go/service/batch/doc.go deleted file mode 100644 index f3a80c9f5..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/batch/doc.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package batch provides the client and types for making API -// requests to AWS Batch. -// -// AWS Batch enables you to run batch computing workloads on the AWS Cloud. -// Batch computing is a common way for developers, scientists, and engineers -// to access large amounts of compute resources, and AWS Batch removes the undifferentiated -// heavy lifting of configuring and managing the required infrastructure. AWS -// Batch will be familiar to users of traditional batch computing software. -// This service can efficiently provision resources in response to jobs submitted -// in order to eliminate capacity constraints, reduce compute costs, and deliver -// results quickly. -// -// As a fully managed service, AWS Batch enables developers, scientists, and -// engineers to run batch computing workloads of any scale. AWS Batch automatically -// provisions compute resources and optimizes the workload distribution based -// on the quantity and scale of the workloads. With AWS Batch, there is no need -// to install or manage batch computing software, which allows you to focus -// on analyzing results and solving problems. AWS Batch reduces operational -// complexities, saves time, and reduces costs, which makes it easy for developers, -// scientists, and engineers to run their batch jobs in the AWS Cloud. -// -// See https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10 for more information on this service. -// -// See batch package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/batch/ -// -// Using the Client -// -// To contact AWS Batch 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 Batch client Batch for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/batch/#New -package batch diff --git a/vendor/github.com/aws/aws-sdk-go/service/batch/errors.go b/vendor/github.com/aws/aws-sdk-go/service/batch/errors.go deleted file mode 100644 index eb3086586..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/batch/errors.go +++ /dev/null @@ -1,20 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package batch - -const ( - - // ErrCodeClientException for service response error code - // "ClientException". - // - // These errors are usually caused by a client action, such as using an action - // or resource on behalf of a user that doesn't have permissions to use the - // action or resource, or specifying an identifier that is not valid. - ErrCodeClientException = "ClientException" - - // ErrCodeServerException for service response error code - // "ServerException". - // - // These errors are usually caused by a server issue. - ErrCodeServerException = "ServerException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/batch/service.go b/vendor/github.com/aws/aws-sdk-go/service/batch/service.go deleted file mode 100644 index 0d04e7497..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/batch/service.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package batch - -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" -) - -// Batch provides the API operation methods for making requests to -// AWS Batch. See this package's package overview docs -// for details on the service. -// -// Batch methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Batch 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 = "batch" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Batch" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Batch client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Batch client from just a session. -// svc := batch.New(mySession) -// -// // Create a Batch client with additional configuration -// svc := batch.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Batch { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Batch { - svc := &Batch{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2016-08-10", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Batch operation and runs any -// custom request initialization. -func (c *Batch) 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/budgets/api.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go deleted file mode 100644 index 7bff348f4..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go +++ /dev/null @@ -1,3697 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package budgets - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateBudget = "CreateBudget" - -// CreateBudgetRequest generates a "aws/request.Request" representing the -// client's request for the CreateBudget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateBudget for more information on using the CreateBudget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateBudgetRequest method. -// req, resp := client.CreateBudgetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Budgets) CreateBudgetRequest(input *CreateBudgetInput) (req *request.Request, output *CreateBudgetOutput) { - op := &request.Operation{ - Name: opCreateBudget, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateBudgetInput{} - } - - output = &CreateBudgetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateBudget API operation for AWS Budgets. -// -// Creates a budget and, if included, notifications and subscribers. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Budgets's -// API operation CreateBudget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// An error on the client occurred. Typically, the cause is an invalid input -// value. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeCreationLimitExceededException "CreationLimitExceededException" -// You've exceeded the notification or subscriber limit. -// -// * ErrCodeDuplicateRecordException "DuplicateRecordException" -// The budget name already exists. Budget names must be unique within an account. -// -func (c *Budgets) CreateBudget(input *CreateBudgetInput) (*CreateBudgetOutput, error) { - req, out := c.CreateBudgetRequest(input) - return out, req.Send() -} - -// CreateBudgetWithContext is the same as CreateBudget with the addition of -// the ability to pass a context and additional request options. -// -// See CreateBudget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Budgets) CreateBudgetWithContext(ctx aws.Context, input *CreateBudgetInput, opts ...request.Option) (*CreateBudgetOutput, error) { - req, out := c.CreateBudgetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateNotification = "CreateNotification" - -// CreateNotificationRequest generates a "aws/request.Request" representing the -// client's request for the CreateNotification operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateNotification for more information on using the CreateNotification -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateNotificationRequest method. -// req, resp := client.CreateNotificationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Budgets) CreateNotificationRequest(input *CreateNotificationInput) (req *request.Request, output *CreateNotificationOutput) { - op := &request.Operation{ - Name: opCreateNotification, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateNotificationInput{} - } - - output = &CreateNotificationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateNotification API operation for AWS Budgets. -// -// Creates a notification. You must create the budget before you create the -// associated notification. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Budgets's -// API operation CreateNotification for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// An error on the client occurred. Typically, the cause is an invalid input -// value. -// -// * ErrCodeNotFoundException "NotFoundException" -// We can’t locate the resource that you specified. -// -// * ErrCodeCreationLimitExceededException "CreationLimitExceededException" -// You've exceeded the notification or subscriber limit. -// -// * ErrCodeDuplicateRecordException "DuplicateRecordException" -// The budget name already exists. Budget names must be unique within an account. -// -func (c *Budgets) CreateNotification(input *CreateNotificationInput) (*CreateNotificationOutput, error) { - req, out := c.CreateNotificationRequest(input) - return out, req.Send() -} - -// CreateNotificationWithContext is the same as CreateNotification with the addition of -// the ability to pass a context and additional request options. -// -// See CreateNotification for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Budgets) CreateNotificationWithContext(ctx aws.Context, input *CreateNotificationInput, opts ...request.Option) (*CreateNotificationOutput, error) { - req, out := c.CreateNotificationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSubscriber = "CreateSubscriber" - -// CreateSubscriberRequest generates a "aws/request.Request" representing the -// client's request for the CreateSubscriber operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSubscriber for more information on using the CreateSubscriber -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSubscriberRequest method. -// req, resp := client.CreateSubscriberRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Budgets) CreateSubscriberRequest(input *CreateSubscriberInput) (req *request.Request, output *CreateSubscriberOutput) { - op := &request.Operation{ - Name: opCreateSubscriber, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSubscriberInput{} - } - - output = &CreateSubscriberOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateSubscriber API operation for AWS Budgets. -// -// Creates a subscriber. You must create the associated budget and notification -// before you create the subscriber. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Budgets's -// API operation CreateSubscriber for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// An error on the client occurred. Typically, the cause is an invalid input -// value. -// -// * ErrCodeCreationLimitExceededException "CreationLimitExceededException" -// You've exceeded the notification or subscriber limit. -// -// * ErrCodeDuplicateRecordException "DuplicateRecordException" -// The budget name already exists. Budget names must be unique within an account. -// -// * ErrCodeNotFoundException "NotFoundException" -// We can’t locate the resource that you specified. -// -func (c *Budgets) CreateSubscriber(input *CreateSubscriberInput) (*CreateSubscriberOutput, error) { - req, out := c.CreateSubscriberRequest(input) - return out, req.Send() -} - -// CreateSubscriberWithContext is the same as CreateSubscriber with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSubscriber for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Budgets) CreateSubscriberWithContext(ctx aws.Context, input *CreateSubscriberInput, opts ...request.Option) (*CreateSubscriberOutput, error) { - req, out := c.CreateSubscriberRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBudget = "DeleteBudget" - -// DeleteBudgetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBudget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBudget for more information on using the DeleteBudget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBudgetRequest method. -// req, resp := client.DeleteBudgetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Budgets) DeleteBudgetRequest(input *DeleteBudgetInput) (req *request.Request, output *DeleteBudgetOutput) { - op := &request.Operation{ - Name: opDeleteBudget, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteBudgetInput{} - } - - output = &DeleteBudgetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBudget API operation for AWS Budgets. -// -// Deletes a budget. You can delete your budget at any time. -// -// Deleting a budget also deletes the notifications and subscribers that are -// associated with that budget. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Budgets's -// API operation DeleteBudget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// An error on the client occurred. Typically, the cause is an invalid input -// value. -// -// * ErrCodeNotFoundException "NotFoundException" -// We can’t locate the resource that you specified. -// -func (c *Budgets) DeleteBudget(input *DeleteBudgetInput) (*DeleteBudgetOutput, error) { - req, out := c.DeleteBudgetRequest(input) - return out, req.Send() -} - -// DeleteBudgetWithContext is the same as DeleteBudget with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBudget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Budgets) DeleteBudgetWithContext(ctx aws.Context, input *DeleteBudgetInput, opts ...request.Option) (*DeleteBudgetOutput, error) { - req, out := c.DeleteBudgetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteNotification = "DeleteNotification" - -// DeleteNotificationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteNotification operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteNotification for more information on using the DeleteNotification -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteNotificationRequest method. -// req, resp := client.DeleteNotificationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Budgets) DeleteNotificationRequest(input *DeleteNotificationInput) (req *request.Request, output *DeleteNotificationOutput) { - op := &request.Operation{ - Name: opDeleteNotification, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteNotificationInput{} - } - - output = &DeleteNotificationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteNotification API operation for AWS Budgets. -// -// Deletes a notification. -// -// Deleting a notification also deletes the subscribers that are associated -// with the notification. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Budgets's -// API operation DeleteNotification for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// An error on the client occurred. Typically, the cause is an invalid input -// value. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeNotFoundException "NotFoundException" -// We can’t locate the resource that you specified. -// -func (c *Budgets) DeleteNotification(input *DeleteNotificationInput) (*DeleteNotificationOutput, error) { - req, out := c.DeleteNotificationRequest(input) - return out, req.Send() -} - -// DeleteNotificationWithContext is the same as DeleteNotification with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteNotification for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Budgets) DeleteNotificationWithContext(ctx aws.Context, input *DeleteNotificationInput, opts ...request.Option) (*DeleteNotificationOutput, error) { - req, out := c.DeleteNotificationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSubscriber = "DeleteSubscriber" - -// DeleteSubscriberRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSubscriber operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSubscriber for more information on using the DeleteSubscriber -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSubscriberRequest method. -// req, resp := client.DeleteSubscriberRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Budgets) DeleteSubscriberRequest(input *DeleteSubscriberInput) (req *request.Request, output *DeleteSubscriberOutput) { - op := &request.Operation{ - Name: opDeleteSubscriber, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSubscriberInput{} - } - - output = &DeleteSubscriberOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSubscriber API operation for AWS Budgets. -// -// Deletes a subscriber. -// -// Deleting the last subscriber to a notification also deletes the notification. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Budgets's -// API operation DeleteSubscriber for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// An error on the client occurred. Typically, the cause is an invalid input -// value. -// -// * ErrCodeNotFoundException "NotFoundException" -// We can’t locate the resource that you specified. -// -func (c *Budgets) DeleteSubscriber(input *DeleteSubscriberInput) (*DeleteSubscriberOutput, error) { - req, out := c.DeleteSubscriberRequest(input) - return out, req.Send() -} - -// DeleteSubscriberWithContext is the same as DeleteSubscriber with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSubscriber for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Budgets) DeleteSubscriberWithContext(ctx aws.Context, input *DeleteSubscriberInput, opts ...request.Option) (*DeleteSubscriberOutput, error) { - req, out := c.DeleteSubscriberRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeBudget = "DescribeBudget" - -// DescribeBudgetRequest generates a "aws/request.Request" representing the -// client's request for the DescribeBudget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeBudget for more information on using the DescribeBudget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeBudgetRequest method. -// req, resp := client.DescribeBudgetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Budgets) DescribeBudgetRequest(input *DescribeBudgetInput) (req *request.Request, output *DescribeBudgetOutput) { - op := &request.Operation{ - Name: opDescribeBudget, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeBudgetInput{} - } - - output = &DescribeBudgetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeBudget API operation for AWS Budgets. -// -// Describes a budget. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Budgets's -// API operation DescribeBudget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// An error on the client occurred. Typically, the cause is an invalid input -// value. -// -// * ErrCodeNotFoundException "NotFoundException" -// We can’t locate the resource that you specified. -// -func (c *Budgets) DescribeBudget(input *DescribeBudgetInput) (*DescribeBudgetOutput, error) { - req, out := c.DescribeBudgetRequest(input) - return out, req.Send() -} - -// DescribeBudgetWithContext is the same as DescribeBudget with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeBudget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Budgets) DescribeBudgetWithContext(ctx aws.Context, input *DescribeBudgetInput, opts ...request.Option) (*DescribeBudgetOutput, error) { - req, out := c.DescribeBudgetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeBudgetPerformanceHistory = "DescribeBudgetPerformanceHistory" - -// DescribeBudgetPerformanceHistoryRequest generates a "aws/request.Request" representing the -// client's request for the DescribeBudgetPerformanceHistory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeBudgetPerformanceHistory for more information on using the DescribeBudgetPerformanceHistory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeBudgetPerformanceHistoryRequest method. -// req, resp := client.DescribeBudgetPerformanceHistoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Budgets) DescribeBudgetPerformanceHistoryRequest(input *DescribeBudgetPerformanceHistoryInput) (req *request.Request, output *DescribeBudgetPerformanceHistoryOutput) { - op := &request.Operation{ - Name: opDescribeBudgetPerformanceHistory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeBudgetPerformanceHistoryInput{} - } - - output = &DescribeBudgetPerformanceHistoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeBudgetPerformanceHistory API operation for AWS Budgets. -// -// Describes the history for DAILY, MONTHLY, and QUARTERLY budgets. Budget history -// isn't available for ANNUAL budgets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Budgets's -// API operation DescribeBudgetPerformanceHistory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// An error on the client occurred. Typically, the cause is an invalid input -// value. -// -// * ErrCodeNotFoundException "NotFoundException" -// We can’t locate the resource that you specified. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The pagination token is invalid. -// -// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" -// The pagination token expired. -// -func (c *Budgets) DescribeBudgetPerformanceHistory(input *DescribeBudgetPerformanceHistoryInput) (*DescribeBudgetPerformanceHistoryOutput, error) { - req, out := c.DescribeBudgetPerformanceHistoryRequest(input) - return out, req.Send() -} - -// DescribeBudgetPerformanceHistoryWithContext is the same as DescribeBudgetPerformanceHistory with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeBudgetPerformanceHistory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Budgets) DescribeBudgetPerformanceHistoryWithContext(ctx aws.Context, input *DescribeBudgetPerformanceHistoryInput, opts ...request.Option) (*DescribeBudgetPerformanceHistoryOutput, error) { - req, out := c.DescribeBudgetPerformanceHistoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeBudgets = "DescribeBudgets" - -// DescribeBudgetsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeBudgets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeBudgets for more information on using the DescribeBudgets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeBudgetsRequest method. -// req, resp := client.DescribeBudgetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Budgets) DescribeBudgetsRequest(input *DescribeBudgetsInput) (req *request.Request, output *DescribeBudgetsOutput) { - op := &request.Operation{ - Name: opDescribeBudgets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeBudgetsInput{} - } - - output = &DescribeBudgetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeBudgets API operation for AWS Budgets. -// -// Lists the budgets that are associated with an 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 Budgets's -// API operation DescribeBudgets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// An error on the client occurred. Typically, the cause is an invalid input -// value. -// -// * ErrCodeNotFoundException "NotFoundException" -// We can’t locate the resource that you specified. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The pagination token is invalid. -// -// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" -// The pagination token expired. -// -func (c *Budgets) DescribeBudgets(input *DescribeBudgetsInput) (*DescribeBudgetsOutput, error) { - req, out := c.DescribeBudgetsRequest(input) - return out, req.Send() -} - -// DescribeBudgetsWithContext is the same as DescribeBudgets with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeBudgets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Budgets) DescribeBudgetsWithContext(ctx aws.Context, input *DescribeBudgetsInput, opts ...request.Option) (*DescribeBudgetsOutput, error) { - req, out := c.DescribeBudgetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeNotificationsForBudget = "DescribeNotificationsForBudget" - -// DescribeNotificationsForBudgetRequest generates a "aws/request.Request" representing the -// client's request for the DescribeNotificationsForBudget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeNotificationsForBudget for more information on using the DescribeNotificationsForBudget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeNotificationsForBudgetRequest method. -// req, resp := client.DescribeNotificationsForBudgetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Budgets) DescribeNotificationsForBudgetRequest(input *DescribeNotificationsForBudgetInput) (req *request.Request, output *DescribeNotificationsForBudgetOutput) { - op := &request.Operation{ - Name: opDescribeNotificationsForBudget, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeNotificationsForBudgetInput{} - } - - output = &DescribeNotificationsForBudgetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeNotificationsForBudget API operation for AWS Budgets. -// -// Lists the notifications that are associated with a budget. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Budgets's -// API operation DescribeNotificationsForBudget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// An error on the client occurred. Typically, the cause is an invalid input -// value. -// -// * ErrCodeNotFoundException "NotFoundException" -// We can’t locate the resource that you specified. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The pagination token is invalid. -// -// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" -// The pagination token expired. -// -func (c *Budgets) DescribeNotificationsForBudget(input *DescribeNotificationsForBudgetInput) (*DescribeNotificationsForBudgetOutput, error) { - req, out := c.DescribeNotificationsForBudgetRequest(input) - return out, req.Send() -} - -// DescribeNotificationsForBudgetWithContext is the same as DescribeNotificationsForBudget with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeNotificationsForBudget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Budgets) DescribeNotificationsForBudgetWithContext(ctx aws.Context, input *DescribeNotificationsForBudgetInput, opts ...request.Option) (*DescribeNotificationsForBudgetOutput, error) { - req, out := c.DescribeNotificationsForBudgetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSubscribersForNotification = "DescribeSubscribersForNotification" - -// DescribeSubscribersForNotificationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSubscribersForNotification operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSubscribersForNotification for more information on using the DescribeSubscribersForNotification -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSubscribersForNotificationRequest method. -// req, resp := client.DescribeSubscribersForNotificationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Budgets) DescribeSubscribersForNotificationRequest(input *DescribeSubscribersForNotificationInput) (req *request.Request, output *DescribeSubscribersForNotificationOutput) { - op := &request.Operation{ - Name: opDescribeSubscribersForNotification, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSubscribersForNotificationInput{} - } - - output = &DescribeSubscribersForNotificationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSubscribersForNotification API operation for AWS Budgets. -// -// Lists the subscribers that are associated with a notification. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Budgets's -// API operation DescribeSubscribersForNotification for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeNotFoundException "NotFoundException" -// We can’t locate the resource that you specified. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// An error on the client occurred. Typically, the cause is an invalid input -// value. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The pagination token is invalid. -// -// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" -// The pagination token expired. -// -func (c *Budgets) DescribeSubscribersForNotification(input *DescribeSubscribersForNotificationInput) (*DescribeSubscribersForNotificationOutput, error) { - req, out := c.DescribeSubscribersForNotificationRequest(input) - return out, req.Send() -} - -// DescribeSubscribersForNotificationWithContext is the same as DescribeSubscribersForNotification with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSubscribersForNotification for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Budgets) DescribeSubscribersForNotificationWithContext(ctx aws.Context, input *DescribeSubscribersForNotificationInput, opts ...request.Option) (*DescribeSubscribersForNotificationOutput, error) { - req, out := c.DescribeSubscribersForNotificationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateBudget = "UpdateBudget" - -// UpdateBudgetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateBudget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateBudget for more information on using the UpdateBudget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateBudgetRequest method. -// req, resp := client.UpdateBudgetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Budgets) UpdateBudgetRequest(input *UpdateBudgetInput) (req *request.Request, output *UpdateBudgetOutput) { - op := &request.Operation{ - Name: opUpdateBudget, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateBudgetInput{} - } - - output = &UpdateBudgetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateBudget API operation for AWS Budgets. -// -// Updates a budget. You can change every part of a budget except for the budgetName -// and the calculatedSpend. When you modify a budget, the calculatedSpend drops -// to zero until AWS has new usage data to use for forecasting. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Budgets's -// API operation UpdateBudget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// An error on the client occurred. Typically, the cause is an invalid input -// value. -// -// * ErrCodeNotFoundException "NotFoundException" -// We can’t locate the resource that you specified. -// -func (c *Budgets) UpdateBudget(input *UpdateBudgetInput) (*UpdateBudgetOutput, error) { - req, out := c.UpdateBudgetRequest(input) - return out, req.Send() -} - -// UpdateBudgetWithContext is the same as UpdateBudget with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateBudget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Budgets) UpdateBudgetWithContext(ctx aws.Context, input *UpdateBudgetInput, opts ...request.Option) (*UpdateBudgetOutput, error) { - req, out := c.UpdateBudgetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateNotification = "UpdateNotification" - -// UpdateNotificationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateNotification operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateNotification for more information on using the UpdateNotification -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateNotificationRequest method. -// req, resp := client.UpdateNotificationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Budgets) UpdateNotificationRequest(input *UpdateNotificationInput) (req *request.Request, output *UpdateNotificationOutput) { - op := &request.Operation{ - Name: opUpdateNotification, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateNotificationInput{} - } - - output = &UpdateNotificationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateNotification API operation for AWS Budgets. -// -// Updates a notification. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Budgets's -// API operation UpdateNotification for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// An error on the client occurred. Typically, the cause is an invalid input -// value. -// -// * ErrCodeNotFoundException "NotFoundException" -// We can’t locate the resource that you specified. -// -// * ErrCodeDuplicateRecordException "DuplicateRecordException" -// The budget name already exists. Budget names must be unique within an account. -// -func (c *Budgets) UpdateNotification(input *UpdateNotificationInput) (*UpdateNotificationOutput, error) { - req, out := c.UpdateNotificationRequest(input) - return out, req.Send() -} - -// UpdateNotificationWithContext is the same as UpdateNotification with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateNotification for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Budgets) UpdateNotificationWithContext(ctx aws.Context, input *UpdateNotificationInput, opts ...request.Option) (*UpdateNotificationOutput, error) { - req, out := c.UpdateNotificationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSubscriber = "UpdateSubscriber" - -// UpdateSubscriberRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSubscriber operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSubscriber for more information on using the UpdateSubscriber -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSubscriberRequest method. -// req, resp := client.UpdateSubscriberRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Budgets) UpdateSubscriberRequest(input *UpdateSubscriberInput) (req *request.Request, output *UpdateSubscriberOutput) { - op := &request.Operation{ - Name: opUpdateSubscriber, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSubscriberInput{} - } - - output = &UpdateSubscriberOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateSubscriber API operation for AWS Budgets. -// -// Updates a subscriber. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Budgets's -// API operation UpdateSubscriber for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// An error on the client occurred. Typically, the cause is an invalid input -// value. -// -// * ErrCodeNotFoundException "NotFoundException" -// We can’t locate the resource that you specified. -// -// * ErrCodeDuplicateRecordException "DuplicateRecordException" -// The budget name already exists. Budget names must be unique within an account. -// -func (c *Budgets) UpdateSubscriber(input *UpdateSubscriberInput) (*UpdateSubscriberOutput, error) { - req, out := c.UpdateSubscriberRequest(input) - return out, req.Send() -} - -// UpdateSubscriberWithContext is the same as UpdateSubscriber with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSubscriber for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Budgets) UpdateSubscriberWithContext(ctx aws.Context, input *UpdateSubscriberInput, opts ...request.Option) (*UpdateSubscriberOutput, error) { - req, out := c.UpdateSubscriberRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Represents the output of the CreateBudget operation. The content consists -// of the detailed metadata and data file information, and the current status -// of the budget object. -// -// This is the ARN pattern for a budget: -// -// arn:aws:budgetservice::AccountId:budget/budgetName -type Budget struct { - _ struct{} `type:"structure"` - - // The total amount of cost, usage, RI utilization, or RI coverage that you - // want to track with your budget. - // - // BudgetLimit is required for cost or usage budgets, but optional for RI utilization - // or coverage budgets. RI utilization or coverage budgets default to 100, which - // is the only valid value for RI utilization or coverage budgets. - BudgetLimit *Spend `type:"structure"` - - // The name of a budget. The name must be unique within accounts. The : and - // \ characters aren't allowed in BudgetName. - // - // BudgetName is a required field - BudgetName *string `min:"1" type:"string" required:"true"` - - // Whether this budget tracks monetary costs, usage, RI utilization, or RI coverage. - // - // BudgetType is a required field - BudgetType *string `type:"string" required:"true" enum:"BudgetType"` - - // The actual and forecasted cost or usage that the budget tracks. - CalculatedSpend *CalculatedSpend `type:"structure"` - - // The cost filters, such as service or region, that are applied to a budget. - // - // AWS Budgets supports the following services as a filter for RI budgets: - // - // * Amazon Elastic Compute Cloud - Compute - // - // * Amazon Redshift - // - // * Amazon Relational Database Service - // - // * Amazon ElastiCache - // - // * Amazon Elasticsearch Service - CostFilters map[string][]*string `type:"map"` - - // The types of costs that are included in this COST budget. - // - // USAGE, RI_UTILIZATION, and RI_COVERAGE budgets do not have CostTypes. - CostTypes *CostTypes `type:"structure"` - - // The last time that you updated this budget. - LastUpdatedTime *time.Time `type:"timestamp"` - - // The period of time that is covered by a budget. The period has a start date - // and an end date. The start date must come before the end date. The end date - // must come before 06/15/87 00:00 UTC. - // - // If you create your budget and don't specify a start date, AWS defaults to - // the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). - // For example, if you created your budget on January 24, 2018, chose DAILY, - // and didn't set a start date, AWS set your start date to 01/24/18 00:00 UTC. - // If you chose MONTHLY, AWS set your start date to 01/01/18 00:00 UTC. If you - // didn't specify an end date, AWS set your end date to 06/15/87 00:00 UTC. - // The defaults are the same for the AWS Billing and Cost Management console - // and the API. - // - // You can change either date with the UpdateBudget operation. - // - // After the end date, AWS deletes the budget and all associated notifications - // and subscribers. - TimePeriod *TimePeriod `type:"structure"` - - // The length of time until a budget resets the actual and forecasted spend. - // DAILY is available only for RI_UTILIZATION and RI_COVERAGE budgets. - // - // TimeUnit is a required field - TimeUnit *string `type:"string" required:"true" enum:"TimeUnit"` -} - -// String returns the string representation -func (s Budget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Budget) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Budget) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Budget"} - if s.BudgetName == nil { - invalidParams.Add(request.NewErrParamRequired("BudgetName")) - } - if s.BudgetName != nil && len(*s.BudgetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) - } - if s.BudgetType == nil { - invalidParams.Add(request.NewErrParamRequired("BudgetType")) - } - if s.TimeUnit == nil { - invalidParams.Add(request.NewErrParamRequired("TimeUnit")) - } - if s.BudgetLimit != nil { - if err := s.BudgetLimit.Validate(); err != nil { - invalidParams.AddNested("BudgetLimit", err.(request.ErrInvalidParams)) - } - } - if s.CalculatedSpend != nil { - if err := s.CalculatedSpend.Validate(); err != nil { - invalidParams.AddNested("CalculatedSpend", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBudgetLimit sets the BudgetLimit field's value. -func (s *Budget) SetBudgetLimit(v *Spend) *Budget { - s.BudgetLimit = v - return s -} - -// SetBudgetName sets the BudgetName field's value. -func (s *Budget) SetBudgetName(v string) *Budget { - s.BudgetName = &v - return s -} - -// SetBudgetType sets the BudgetType field's value. -func (s *Budget) SetBudgetType(v string) *Budget { - s.BudgetType = &v - return s -} - -// SetCalculatedSpend sets the CalculatedSpend field's value. -func (s *Budget) SetCalculatedSpend(v *CalculatedSpend) *Budget { - s.CalculatedSpend = v - return s -} - -// SetCostFilters sets the CostFilters field's value. -func (s *Budget) SetCostFilters(v map[string][]*string) *Budget { - s.CostFilters = v - return s -} - -// SetCostTypes sets the CostTypes field's value. -func (s *Budget) SetCostTypes(v *CostTypes) *Budget { - s.CostTypes = v - return s -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *Budget) SetLastUpdatedTime(v time.Time) *Budget { - s.LastUpdatedTime = &v - return s -} - -// SetTimePeriod sets the TimePeriod field's value. -func (s *Budget) SetTimePeriod(v *TimePeriod) *Budget { - s.TimePeriod = v - return s -} - -// SetTimeUnit sets the TimeUnit field's value. -func (s *Budget) SetTimeUnit(v string) *Budget { - s.TimeUnit = &v - return s -} - -// A history of the state of a budget at the end of the budget's specified time -// period. -type BudgetPerformanceHistory struct { - _ struct{} `type:"structure"` - - // A string that represents the budget name. The ":" and "\" characters aren't - // allowed. - BudgetName *string `min:"1" type:"string"` - - // The type of a budget. It must be one of the following types: - // - // COST, USAGE, RI_UTILIZATION, or RI_COVERAGE. - BudgetType *string `type:"string" enum:"BudgetType"` - - // A list of amounts of cost or usage that you created budgets for, compared - // to your actual costs or usage. - BudgetedAndActualAmountsList []*BudgetedAndActualAmounts `type:"list"` - - // The history of the cost filters for a budget during the specified time period. - CostFilters map[string][]*string `type:"map"` - - // The history of the cost types for a budget during the specified time period. - CostTypes *CostTypes `type:"structure"` - - // The time unit of the budget, such as MONTHLY or QUARTERLY. - TimeUnit *string `type:"string" enum:"TimeUnit"` -} - -// String returns the string representation -func (s BudgetPerformanceHistory) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BudgetPerformanceHistory) GoString() string { - return s.String() -} - -// SetBudgetName sets the BudgetName field's value. -func (s *BudgetPerformanceHistory) SetBudgetName(v string) *BudgetPerformanceHistory { - s.BudgetName = &v - return s -} - -// SetBudgetType sets the BudgetType field's value. -func (s *BudgetPerformanceHistory) SetBudgetType(v string) *BudgetPerformanceHistory { - s.BudgetType = &v - return s -} - -// SetBudgetedAndActualAmountsList sets the BudgetedAndActualAmountsList field's value. -func (s *BudgetPerformanceHistory) SetBudgetedAndActualAmountsList(v []*BudgetedAndActualAmounts) *BudgetPerformanceHistory { - s.BudgetedAndActualAmountsList = v - return s -} - -// SetCostFilters sets the CostFilters field's value. -func (s *BudgetPerformanceHistory) SetCostFilters(v map[string][]*string) *BudgetPerformanceHistory { - s.CostFilters = v - return s -} - -// SetCostTypes sets the CostTypes field's value. -func (s *BudgetPerformanceHistory) SetCostTypes(v *CostTypes) *BudgetPerformanceHistory { - s.CostTypes = v - return s -} - -// SetTimeUnit sets the TimeUnit field's value. -func (s *BudgetPerformanceHistory) SetTimeUnit(v string) *BudgetPerformanceHistory { - s.TimeUnit = &v - return s -} - -// The amount of cost or usage that you created the budget for, compared to -// your actual costs or usage. -type BudgetedAndActualAmounts struct { - _ struct{} `type:"structure"` - - // Your actual costs or usage for a budget period. - ActualAmount *Spend `type:"structure"` - - // The amount of cost or usage that you created the budget for. - BudgetedAmount *Spend `type:"structure"` - - // The time period covered by this budget comparison. - TimePeriod *TimePeriod `type:"structure"` -} - -// String returns the string representation -func (s BudgetedAndActualAmounts) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BudgetedAndActualAmounts) GoString() string { - return s.String() -} - -// SetActualAmount sets the ActualAmount field's value. -func (s *BudgetedAndActualAmounts) SetActualAmount(v *Spend) *BudgetedAndActualAmounts { - s.ActualAmount = v - return s -} - -// SetBudgetedAmount sets the BudgetedAmount field's value. -func (s *BudgetedAndActualAmounts) SetBudgetedAmount(v *Spend) *BudgetedAndActualAmounts { - s.BudgetedAmount = v - return s -} - -// SetTimePeriod sets the TimePeriod field's value. -func (s *BudgetedAndActualAmounts) SetTimePeriod(v *TimePeriod) *BudgetedAndActualAmounts { - s.TimePeriod = v - return s -} - -// The spend objects that are associated with this budget. The actualSpend tracks -// how much you've used, cost, usage, or RI units, and the forecastedSpend tracks -// how much you are predicted to spend if your current usage remains steady. -// -// For example, if it is the 20th of the month and you have spent 50 dollars -// on Amazon EC2, your actualSpend is 50 USD, and your forecastedSpend is 75 -// USD. -type CalculatedSpend struct { - _ struct{} `type:"structure"` - - // The amount of cost, usage, or RI units that you have used. - // - // ActualSpend is a required field - ActualSpend *Spend `type:"structure" required:"true"` - - // The amount of cost, usage, or RI units that you are forecasted to use. - ForecastedSpend *Spend `type:"structure"` -} - -// String returns the string representation -func (s CalculatedSpend) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CalculatedSpend) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CalculatedSpend) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CalculatedSpend"} - if s.ActualSpend == nil { - invalidParams.Add(request.NewErrParamRequired("ActualSpend")) - } - if s.ActualSpend != nil { - if err := s.ActualSpend.Validate(); err != nil { - invalidParams.AddNested("ActualSpend", err.(request.ErrInvalidParams)) - } - } - if s.ForecastedSpend != nil { - if err := s.ForecastedSpend.Validate(); err != nil { - invalidParams.AddNested("ForecastedSpend", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActualSpend sets the ActualSpend field's value. -func (s *CalculatedSpend) SetActualSpend(v *Spend) *CalculatedSpend { - s.ActualSpend = v - return s -} - -// SetForecastedSpend sets the ForecastedSpend field's value. -func (s *CalculatedSpend) SetForecastedSpend(v *Spend) *CalculatedSpend { - s.ForecastedSpend = v - return s -} - -// The types of cost that are included in a COST budget, such as tax and subscriptions. -// -// USAGE, RI_UTILIZATION, and RI_COVERAGE budgets do not have CostTypes. -type CostTypes struct { - _ struct{} `type:"structure"` - - // Specifies whether a budget includes credits. - // - // The default value is true. - IncludeCredit *bool `type:"boolean"` - - // Specifies whether a budget includes discounts. - // - // The default value is true. - IncludeDiscount *bool `type:"boolean"` - - // Specifies whether a budget includes non-RI subscription costs. - // - // The default value is true. - IncludeOtherSubscription *bool `type:"boolean"` - - // Specifies whether a budget includes recurring fees such as monthly RI fees. - // - // The default value is true. - IncludeRecurring *bool `type:"boolean"` - - // Specifies whether a budget includes refunds. - // - // The default value is true. - IncludeRefund *bool `type:"boolean"` - - // Specifies whether a budget includes subscriptions. - // - // The default value is true. - IncludeSubscription *bool `type:"boolean"` - - // Specifies whether a budget includes support subscription fees. - // - // The default value is true. - IncludeSupport *bool `type:"boolean"` - - // Specifies whether a budget includes taxes. - // - // The default value is true. - IncludeTax *bool `type:"boolean"` - - // Specifies whether a budget includes upfront RI costs. - // - // The default value is true. - IncludeUpfront *bool `type:"boolean"` - - // Specifies whether a budget uses the amortized rate. - // - // The default value is false. - UseAmortized *bool `type:"boolean"` - - // Specifies whether a budget uses a blended rate. - // - // The default value is false. - UseBlended *bool `type:"boolean"` -} - -// String returns the string representation -func (s CostTypes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CostTypes) GoString() string { - return s.String() -} - -// SetIncludeCredit sets the IncludeCredit field's value. -func (s *CostTypes) SetIncludeCredit(v bool) *CostTypes { - s.IncludeCredit = &v - return s -} - -// SetIncludeDiscount sets the IncludeDiscount field's value. -func (s *CostTypes) SetIncludeDiscount(v bool) *CostTypes { - s.IncludeDiscount = &v - return s -} - -// SetIncludeOtherSubscription sets the IncludeOtherSubscription field's value. -func (s *CostTypes) SetIncludeOtherSubscription(v bool) *CostTypes { - s.IncludeOtherSubscription = &v - return s -} - -// SetIncludeRecurring sets the IncludeRecurring field's value. -func (s *CostTypes) SetIncludeRecurring(v bool) *CostTypes { - s.IncludeRecurring = &v - return s -} - -// SetIncludeRefund sets the IncludeRefund field's value. -func (s *CostTypes) SetIncludeRefund(v bool) *CostTypes { - s.IncludeRefund = &v - return s -} - -// SetIncludeSubscription sets the IncludeSubscription field's value. -func (s *CostTypes) SetIncludeSubscription(v bool) *CostTypes { - s.IncludeSubscription = &v - return s -} - -// SetIncludeSupport sets the IncludeSupport field's value. -func (s *CostTypes) SetIncludeSupport(v bool) *CostTypes { - s.IncludeSupport = &v - return s -} - -// SetIncludeTax sets the IncludeTax field's value. -func (s *CostTypes) SetIncludeTax(v bool) *CostTypes { - s.IncludeTax = &v - return s -} - -// SetIncludeUpfront sets the IncludeUpfront field's value. -func (s *CostTypes) SetIncludeUpfront(v bool) *CostTypes { - s.IncludeUpfront = &v - return s -} - -// SetUseAmortized sets the UseAmortized field's value. -func (s *CostTypes) SetUseAmortized(v bool) *CostTypes { - s.UseAmortized = &v - return s -} - -// SetUseBlended sets the UseBlended field's value. -func (s *CostTypes) SetUseBlended(v bool) *CostTypes { - s.UseBlended = &v - return s -} - -// Request of CreateBudget -type CreateBudgetInput struct { - _ struct{} `type:"structure"` - - // The accountId that is associated with the budget. - // - // AccountId is a required field - AccountId *string `min:"12" type:"string" required:"true"` - - // The budget object that you want to create. - // - // Budget is a required field - Budget *Budget `type:"structure" required:"true"` - - // A notification that you want to associate with a budget. A budget can have - // up to five notifications, and each notification can have one SNS subscriber - // and up to 10 email subscribers. If you include notifications and subscribers - // in your CreateBudget call, AWS creates the notifications and subscribers - // for you. - NotificationsWithSubscribers []*NotificationWithSubscribers `type:"list"` -} - -// String returns the string representation -func (s CreateBudgetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBudgetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateBudgetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateBudgetInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) - } - if s.Budget == nil { - invalidParams.Add(request.NewErrParamRequired("Budget")) - } - if s.Budget != nil { - if err := s.Budget.Validate(); err != nil { - invalidParams.AddNested("Budget", err.(request.ErrInvalidParams)) - } - } - if s.NotificationsWithSubscribers != nil { - for i, v := range s.NotificationsWithSubscribers { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NotificationsWithSubscribers", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *CreateBudgetInput) SetAccountId(v string) *CreateBudgetInput { - s.AccountId = &v - return s -} - -// SetBudget sets the Budget field's value. -func (s *CreateBudgetInput) SetBudget(v *Budget) *CreateBudgetInput { - s.Budget = v - return s -} - -// SetNotificationsWithSubscribers sets the NotificationsWithSubscribers field's value. -func (s *CreateBudgetInput) SetNotificationsWithSubscribers(v []*NotificationWithSubscribers) *CreateBudgetInput { - s.NotificationsWithSubscribers = v - return s -} - -// Response of CreateBudget -type CreateBudgetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateBudgetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBudgetOutput) GoString() string { - return s.String() -} - -// Request of CreateNotification -type CreateNotificationInput struct { - _ struct{} `type:"structure"` - - // The accountId that is associated with the budget that you want to create - // a notification for. - // - // AccountId is a required field - AccountId *string `min:"12" type:"string" required:"true"` - - // The name of the budget that you want AWS to notify you about. Budget names - // must be unique within an account. - // - // BudgetName is a required field - BudgetName *string `min:"1" type:"string" required:"true"` - - // The notification that you want to create. - // - // Notification is a required field - Notification *Notification `type:"structure" required:"true"` - - // A list of subscribers that you want to associate with the notification. Each - // notification can have one SNS subscriber and up to 10 email subscribers. - // - // Subscribers is a required field - Subscribers []*Subscriber `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateNotificationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNotificationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNotificationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNotificationInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) - } - if s.BudgetName == nil { - invalidParams.Add(request.NewErrParamRequired("BudgetName")) - } - if s.BudgetName != nil && len(*s.BudgetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) - } - if s.Notification == nil { - invalidParams.Add(request.NewErrParamRequired("Notification")) - } - if s.Subscribers == nil { - invalidParams.Add(request.NewErrParamRequired("Subscribers")) - } - if s.Subscribers != nil && len(s.Subscribers) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Subscribers", 1)) - } - if s.Notification != nil { - if err := s.Notification.Validate(); err != nil { - invalidParams.AddNested("Notification", err.(request.ErrInvalidParams)) - } - } - if s.Subscribers != nil { - for i, v := range s.Subscribers { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Subscribers", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *CreateNotificationInput) SetAccountId(v string) *CreateNotificationInput { - s.AccountId = &v - return s -} - -// SetBudgetName sets the BudgetName field's value. -func (s *CreateNotificationInput) SetBudgetName(v string) *CreateNotificationInput { - s.BudgetName = &v - return s -} - -// SetNotification sets the Notification field's value. -func (s *CreateNotificationInput) SetNotification(v *Notification) *CreateNotificationInput { - s.Notification = v - return s -} - -// SetSubscribers sets the Subscribers field's value. -func (s *CreateNotificationInput) SetSubscribers(v []*Subscriber) *CreateNotificationInput { - s.Subscribers = v - return s -} - -// Response of CreateNotification -type CreateNotificationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateNotificationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNotificationOutput) GoString() string { - return s.String() -} - -// Request of CreateSubscriber -type CreateSubscriberInput struct { - _ struct{} `type:"structure"` - - // The accountId that is associated with the budget that you want to create - // a subscriber for. - // - // AccountId is a required field - AccountId *string `min:"12" type:"string" required:"true"` - - // The name of the budget that you want to subscribe to. Budget names must be - // unique within an account. - // - // BudgetName is a required field - BudgetName *string `min:"1" type:"string" required:"true"` - - // The notification that you want to create a subscriber for. - // - // Notification is a required field - Notification *Notification `type:"structure" required:"true"` - - // The subscriber that you want to associate with a budget notification. - // - // Subscriber is a required field - Subscriber *Subscriber `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateSubscriberInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSubscriberInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSubscriberInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSubscriberInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) - } - if s.BudgetName == nil { - invalidParams.Add(request.NewErrParamRequired("BudgetName")) - } - if s.BudgetName != nil && len(*s.BudgetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) - } - if s.Notification == nil { - invalidParams.Add(request.NewErrParamRequired("Notification")) - } - if s.Subscriber == nil { - invalidParams.Add(request.NewErrParamRequired("Subscriber")) - } - if s.Notification != nil { - if err := s.Notification.Validate(); err != nil { - invalidParams.AddNested("Notification", err.(request.ErrInvalidParams)) - } - } - if s.Subscriber != nil { - if err := s.Subscriber.Validate(); err != nil { - invalidParams.AddNested("Subscriber", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *CreateSubscriberInput) SetAccountId(v string) *CreateSubscriberInput { - s.AccountId = &v - return s -} - -// SetBudgetName sets the BudgetName field's value. -func (s *CreateSubscriberInput) SetBudgetName(v string) *CreateSubscriberInput { - s.BudgetName = &v - return s -} - -// SetNotification sets the Notification field's value. -func (s *CreateSubscriberInput) SetNotification(v *Notification) *CreateSubscriberInput { - s.Notification = v - return s -} - -// SetSubscriber sets the Subscriber field's value. -func (s *CreateSubscriberInput) SetSubscriber(v *Subscriber) *CreateSubscriberInput { - s.Subscriber = v - return s -} - -// Response of CreateSubscriber -type CreateSubscriberOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateSubscriberOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSubscriberOutput) GoString() string { - return s.String() -} - -// Request of DeleteBudget -type DeleteBudgetInput struct { - _ struct{} `type:"structure"` - - // The accountId that is associated with the budget that you want to delete. - // - // AccountId is a required field - AccountId *string `min:"12" type:"string" required:"true"` - - // The name of the budget that you want to delete. - // - // BudgetName is a required field - BudgetName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBudgetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBudgetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBudgetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBudgetInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) - } - if s.BudgetName == nil { - invalidParams.Add(request.NewErrParamRequired("BudgetName")) - } - if s.BudgetName != nil && len(*s.BudgetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DeleteBudgetInput) SetAccountId(v string) *DeleteBudgetInput { - s.AccountId = &v - return s -} - -// SetBudgetName sets the BudgetName field's value. -func (s *DeleteBudgetInput) SetBudgetName(v string) *DeleteBudgetInput { - s.BudgetName = &v - return s -} - -// Response of DeleteBudget -type DeleteBudgetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteBudgetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBudgetOutput) GoString() string { - return s.String() -} - -// Request of DeleteNotification -type DeleteNotificationInput struct { - _ struct{} `type:"structure"` - - // The accountId that is associated with the budget whose notification you want - // to delete. - // - // AccountId is a required field - AccountId *string `min:"12" type:"string" required:"true"` - - // The name of the budget whose notification you want to delete. - // - // BudgetName is a required field - BudgetName *string `min:"1" type:"string" required:"true"` - - // The notification that you want to delete. - // - // Notification is a required field - Notification *Notification `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteNotificationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNotificationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNotificationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNotificationInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) - } - if s.BudgetName == nil { - invalidParams.Add(request.NewErrParamRequired("BudgetName")) - } - if s.BudgetName != nil && len(*s.BudgetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) - } - if s.Notification == nil { - invalidParams.Add(request.NewErrParamRequired("Notification")) - } - if s.Notification != nil { - if err := s.Notification.Validate(); err != nil { - invalidParams.AddNested("Notification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DeleteNotificationInput) SetAccountId(v string) *DeleteNotificationInput { - s.AccountId = &v - return s -} - -// SetBudgetName sets the BudgetName field's value. -func (s *DeleteNotificationInput) SetBudgetName(v string) *DeleteNotificationInput { - s.BudgetName = &v - return s -} - -// SetNotification sets the Notification field's value. -func (s *DeleteNotificationInput) SetNotification(v *Notification) *DeleteNotificationInput { - s.Notification = v - return s -} - -// Response of DeleteNotification -type DeleteNotificationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteNotificationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNotificationOutput) GoString() string { - return s.String() -} - -// Request of DeleteSubscriber -type DeleteSubscriberInput struct { - _ struct{} `type:"structure"` - - // The accountId that is associated with the budget whose subscriber you want - // to delete. - // - // AccountId is a required field - AccountId *string `min:"12" type:"string" required:"true"` - - // The name of the budget whose subscriber you want to delete. - // - // BudgetName is a required field - BudgetName *string `min:"1" type:"string" required:"true"` - - // The notification whose subscriber you want to delete. - // - // Notification is a required field - Notification *Notification `type:"structure" required:"true"` - - // The subscriber that you want to delete. - // - // Subscriber is a required field - Subscriber *Subscriber `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteSubscriberInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSubscriberInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSubscriberInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSubscriberInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) - } - if s.BudgetName == nil { - invalidParams.Add(request.NewErrParamRequired("BudgetName")) - } - if s.BudgetName != nil && len(*s.BudgetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) - } - if s.Notification == nil { - invalidParams.Add(request.NewErrParamRequired("Notification")) - } - if s.Subscriber == nil { - invalidParams.Add(request.NewErrParamRequired("Subscriber")) - } - if s.Notification != nil { - if err := s.Notification.Validate(); err != nil { - invalidParams.AddNested("Notification", err.(request.ErrInvalidParams)) - } - } - if s.Subscriber != nil { - if err := s.Subscriber.Validate(); err != nil { - invalidParams.AddNested("Subscriber", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DeleteSubscriberInput) SetAccountId(v string) *DeleteSubscriberInput { - s.AccountId = &v - return s -} - -// SetBudgetName sets the BudgetName field's value. -func (s *DeleteSubscriberInput) SetBudgetName(v string) *DeleteSubscriberInput { - s.BudgetName = &v - return s -} - -// SetNotification sets the Notification field's value. -func (s *DeleteSubscriberInput) SetNotification(v *Notification) *DeleteSubscriberInput { - s.Notification = v - return s -} - -// SetSubscriber sets the Subscriber field's value. -func (s *DeleteSubscriberInput) SetSubscriber(v *Subscriber) *DeleteSubscriberInput { - s.Subscriber = v - return s -} - -// Response of DeleteSubscriber -type DeleteSubscriberOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteSubscriberOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSubscriberOutput) GoString() string { - return s.String() -} - -// Request of DescribeBudget -type DescribeBudgetInput struct { - _ struct{} `type:"structure"` - - // The accountId that is associated with the budget that you want a description - // of. - // - // AccountId is a required field - AccountId *string `min:"12" type:"string" required:"true"` - - // The name of the budget that you want a description of. - // - // BudgetName is a required field - BudgetName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeBudgetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBudgetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeBudgetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeBudgetInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) - } - if s.BudgetName == nil { - invalidParams.Add(request.NewErrParamRequired("BudgetName")) - } - if s.BudgetName != nil && len(*s.BudgetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DescribeBudgetInput) SetAccountId(v string) *DescribeBudgetInput { - s.AccountId = &v - return s -} - -// SetBudgetName sets the BudgetName field's value. -func (s *DescribeBudgetInput) SetBudgetName(v string) *DescribeBudgetInput { - s.BudgetName = &v - return s -} - -// Response of DescribeBudget -type DescribeBudgetOutput struct { - _ struct{} `type:"structure"` - - // The description of the budget. - Budget *Budget `type:"structure"` -} - -// String returns the string representation -func (s DescribeBudgetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBudgetOutput) GoString() string { - return s.String() -} - -// SetBudget sets the Budget field's value. -func (s *DescribeBudgetOutput) SetBudget(v *Budget) *DescribeBudgetOutput { - s.Budget = v - return s -} - -type DescribeBudgetPerformanceHistoryInput struct { - _ struct{} `type:"structure"` - - // The account ID of the user. It should be a 12-digit number. - // - // AccountId is a required field - AccountId *string `min:"12" type:"string" required:"true"` - - // A string that represents the budget name. The ":" and "\" characters aren't - // allowed. - // - // BudgetName is a required field - BudgetName *string `min:"1" type:"string" required:"true"` - - // An integer that represents how many entries a paginated response contains. - // The maximum is 100. - MaxResults *int64 `min:"1" type:"integer"` - - // A generic string. - NextToken *string `type:"string"` - - // Retrieves how often the budget went into an ALARM state for the specified - // time period. - TimePeriod *TimePeriod `type:"structure"` -} - -// String returns the string representation -func (s DescribeBudgetPerformanceHistoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBudgetPerformanceHistoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeBudgetPerformanceHistoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeBudgetPerformanceHistoryInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) - } - if s.BudgetName == nil { - invalidParams.Add(request.NewErrParamRequired("BudgetName")) - } - if s.BudgetName != nil && len(*s.BudgetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DescribeBudgetPerformanceHistoryInput) SetAccountId(v string) *DescribeBudgetPerformanceHistoryInput { - s.AccountId = &v - return s -} - -// SetBudgetName sets the BudgetName field's value. -func (s *DescribeBudgetPerformanceHistoryInput) SetBudgetName(v string) *DescribeBudgetPerformanceHistoryInput { - s.BudgetName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeBudgetPerformanceHistoryInput) SetMaxResults(v int64) *DescribeBudgetPerformanceHistoryInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeBudgetPerformanceHistoryInput) SetNextToken(v string) *DescribeBudgetPerformanceHistoryInput { - s.NextToken = &v - return s -} - -// SetTimePeriod sets the TimePeriod field's value. -func (s *DescribeBudgetPerformanceHistoryInput) SetTimePeriod(v *TimePeriod) *DescribeBudgetPerformanceHistoryInput { - s.TimePeriod = v - return s -} - -type DescribeBudgetPerformanceHistoryOutput struct { - _ struct{} `type:"structure"` - - // The history of how often the budget has gone into an ALARM state. - // - // For DAILY budgets, the history saves the state of the budget for the last - // 60 days. For MONTHLY budgets, the history saves the state of the budget for - // the current month plus the last 12 months. For QUARTERLY budgets, the history - // saves the state of the budget for the last four quarters. - BudgetPerformanceHistory *BudgetPerformanceHistory `type:"structure"` - - // A generic string. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeBudgetPerformanceHistoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBudgetPerformanceHistoryOutput) GoString() string { - return s.String() -} - -// SetBudgetPerformanceHistory sets the BudgetPerformanceHistory field's value. -func (s *DescribeBudgetPerformanceHistoryOutput) SetBudgetPerformanceHistory(v *BudgetPerformanceHistory) *DescribeBudgetPerformanceHistoryOutput { - s.BudgetPerformanceHistory = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeBudgetPerformanceHistoryOutput) SetNextToken(v string) *DescribeBudgetPerformanceHistoryOutput { - s.NextToken = &v - return s -} - -// Request of DescribeBudgets -type DescribeBudgetsInput struct { - _ struct{} `type:"structure"` - - // The accountId that is associated with the budgets that you want descriptions - // of. - // - // AccountId is a required field - AccountId *string `min:"12" type:"string" required:"true"` - - // An optional integer that represents how many entries a paginated response - // contains. The maximum is 100. - MaxResults *int64 `min:"1" type:"integer"` - - // The pagination token that you include in your request to indicate the next - // set of results that you want to retrieve. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeBudgetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBudgetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeBudgetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeBudgetsInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DescribeBudgetsInput) SetAccountId(v string) *DescribeBudgetsInput { - s.AccountId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeBudgetsInput) SetMaxResults(v int64) *DescribeBudgetsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeBudgetsInput) SetNextToken(v string) *DescribeBudgetsInput { - s.NextToken = &v - return s -} - -// Response of DescribeBudgets -type DescribeBudgetsOutput struct { - _ struct{} `type:"structure"` - - // A list of budgets. - Budgets []*Budget `type:"list"` - - // The pagination token in the service response that indicates the next set - // of results that you can retrieve. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeBudgetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBudgetsOutput) GoString() string { - return s.String() -} - -// SetBudgets sets the Budgets field's value. -func (s *DescribeBudgetsOutput) SetBudgets(v []*Budget) *DescribeBudgetsOutput { - s.Budgets = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeBudgetsOutput) SetNextToken(v string) *DescribeBudgetsOutput { - s.NextToken = &v - return s -} - -// Request of DescribeNotificationsForBudget -type DescribeNotificationsForBudgetInput struct { - _ struct{} `type:"structure"` - - // The accountId that is associated with the budget whose notifications you - // want descriptions of. - // - // AccountId is a required field - AccountId *string `min:"12" type:"string" required:"true"` - - // The name of the budget whose notifications you want descriptions of. - // - // BudgetName is a required field - BudgetName *string `min:"1" type:"string" required:"true"` - - // An optional integer that represents how many entries a paginated response - // contains. The maximum is 100. - MaxResults *int64 `min:"1" type:"integer"` - - // The pagination token that you include in your request to indicate the next - // set of results that you want to retrieve. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeNotificationsForBudgetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNotificationsForBudgetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeNotificationsForBudgetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeNotificationsForBudgetInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) - } - if s.BudgetName == nil { - invalidParams.Add(request.NewErrParamRequired("BudgetName")) - } - if s.BudgetName != nil && len(*s.BudgetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DescribeNotificationsForBudgetInput) SetAccountId(v string) *DescribeNotificationsForBudgetInput { - s.AccountId = &v - return s -} - -// SetBudgetName sets the BudgetName field's value. -func (s *DescribeNotificationsForBudgetInput) SetBudgetName(v string) *DescribeNotificationsForBudgetInput { - s.BudgetName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeNotificationsForBudgetInput) SetMaxResults(v int64) *DescribeNotificationsForBudgetInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeNotificationsForBudgetInput) SetNextToken(v string) *DescribeNotificationsForBudgetInput { - s.NextToken = &v - return s -} - -// Response of GetNotificationsForBudget -type DescribeNotificationsForBudgetOutput struct { - _ struct{} `type:"structure"` - - // The pagination token in the service response that indicates the next set - // of results that you can retrieve. - NextToken *string `type:"string"` - - // A list of notifications that are associated with a budget. - Notifications []*Notification `type:"list"` -} - -// String returns the string representation -func (s DescribeNotificationsForBudgetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNotificationsForBudgetOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeNotificationsForBudgetOutput) SetNextToken(v string) *DescribeNotificationsForBudgetOutput { - s.NextToken = &v - return s -} - -// SetNotifications sets the Notifications field's value. -func (s *DescribeNotificationsForBudgetOutput) SetNotifications(v []*Notification) *DescribeNotificationsForBudgetOutput { - s.Notifications = v - return s -} - -// Request of DescribeSubscribersForNotification -type DescribeSubscribersForNotificationInput struct { - _ struct{} `type:"structure"` - - // The accountId that is associated with the budget whose subscribers you want - // descriptions of. - // - // AccountId is a required field - AccountId *string `min:"12" type:"string" required:"true"` - - // The name of the budget whose subscribers you want descriptions of. - // - // BudgetName is a required field - BudgetName *string `min:"1" type:"string" required:"true"` - - // An optional integer that represents how many entries a paginated response - // contains. The maximum is 100. - MaxResults *int64 `min:"1" type:"integer"` - - // The pagination token that you include in your request to indicate the next - // set of results that you want to retrieve. - NextToken *string `type:"string"` - - // The notification whose subscribers you want to list. - // - // Notification is a required field - Notification *Notification `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeSubscribersForNotificationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSubscribersForNotificationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSubscribersForNotificationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSubscribersForNotificationInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) - } - if s.BudgetName == nil { - invalidParams.Add(request.NewErrParamRequired("BudgetName")) - } - if s.BudgetName != nil && len(*s.BudgetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Notification == nil { - invalidParams.Add(request.NewErrParamRequired("Notification")) - } - if s.Notification != nil { - if err := s.Notification.Validate(); err != nil { - invalidParams.AddNested("Notification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DescribeSubscribersForNotificationInput) SetAccountId(v string) *DescribeSubscribersForNotificationInput { - s.AccountId = &v - return s -} - -// SetBudgetName sets the BudgetName field's value. -func (s *DescribeSubscribersForNotificationInput) SetBudgetName(v string) *DescribeSubscribersForNotificationInput { - s.BudgetName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSubscribersForNotificationInput) SetMaxResults(v int64) *DescribeSubscribersForNotificationInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSubscribersForNotificationInput) SetNextToken(v string) *DescribeSubscribersForNotificationInput { - s.NextToken = &v - return s -} - -// SetNotification sets the Notification field's value. -func (s *DescribeSubscribersForNotificationInput) SetNotification(v *Notification) *DescribeSubscribersForNotificationInput { - s.Notification = v - return s -} - -// Response of DescribeSubscribersForNotification -type DescribeSubscribersForNotificationOutput struct { - _ struct{} `type:"structure"` - - // The pagination token in the service response that indicates the next set - // of results that you can retrieve. - NextToken *string `type:"string"` - - // A list of subscribers that are associated with a notification. - Subscribers []*Subscriber `min:"1" type:"list"` -} - -// String returns the string representation -func (s DescribeSubscribersForNotificationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSubscribersForNotificationOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSubscribersForNotificationOutput) SetNextToken(v string) *DescribeSubscribersForNotificationOutput { - s.NextToken = &v - return s -} - -// SetSubscribers sets the Subscribers field's value. -func (s *DescribeSubscribersForNotificationOutput) SetSubscribers(v []*Subscriber) *DescribeSubscribersForNotificationOutput { - s.Subscribers = v - return s -} - -// A notification that is associated with a budget. A budget can have up to -// five notifications. -// -// Each notification must have at least one subscriber. A notification can have -// one SNS subscriber and up to 10 email subscribers, for a total of 11 subscribers. -// -// For example, if you have a budget for 200 dollars and you want to be notified -// when you go over 160 dollars, create a notification with the following parameters: -// -// * A notificationType of ACTUAL -// -// * A thresholdType of PERCENTAGE -// -// * A comparisonOperator of GREATER_THAN -// -// * A notification threshold of 80 -type Notification struct { - _ struct{} `type:"structure"` - - // The comparison that is used for this notification. - // - // ComparisonOperator is a required field - ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"` - - // Whether this notification is in alarm. If a budget notification is in the - // ALARM state, you have passed the set threshold for the budget. - NotificationState *string `type:"string" enum:"NotificationState"` - - // Whether the notification is for how much you have spent (ACTUAL) or for how - // much you're forecasted to spend (FORECASTED). - // - // NotificationType is a required field - NotificationType *string `type:"string" required:"true" enum:"NotificationType"` - - // The threshold that is associated with a notification. Thresholds are always - // a percentage. - // - // Threshold is a required field - Threshold *float64 `type:"double" required:"true"` - - // The type of threshold for a notification. For ABSOLUTE_VALUE thresholds, - // AWS notifies you when you go over or are forecasted to go over your total - // cost threshold. For PERCENTAGE thresholds, AWS notifies you when you go over - // or are forecasted to go over a certain percentage of your forecasted spend. - // For example, if you have a budget for 200 dollars and you have a PERCENTAGE - // threshold of 80%, AWS notifies you when you go over 160 dollars. - ThresholdType *string `type:"string" enum:"ThresholdType"` -} - -// String returns the string representation -func (s Notification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Notification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Notification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Notification"} - if s.ComparisonOperator == nil { - invalidParams.Add(request.NewErrParamRequired("ComparisonOperator")) - } - if s.NotificationType == nil { - invalidParams.Add(request.NewErrParamRequired("NotificationType")) - } - if s.Threshold == nil { - invalidParams.Add(request.NewErrParamRequired("Threshold")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComparisonOperator sets the ComparisonOperator field's value. -func (s *Notification) SetComparisonOperator(v string) *Notification { - s.ComparisonOperator = &v - return s -} - -// SetNotificationState sets the NotificationState field's value. -func (s *Notification) SetNotificationState(v string) *Notification { - s.NotificationState = &v - return s -} - -// SetNotificationType sets the NotificationType field's value. -func (s *Notification) SetNotificationType(v string) *Notification { - s.NotificationType = &v - return s -} - -// SetThreshold sets the Threshold field's value. -func (s *Notification) SetThreshold(v float64) *Notification { - s.Threshold = &v - return s -} - -// SetThresholdType sets the ThresholdType field's value. -func (s *Notification) SetThresholdType(v string) *Notification { - s.ThresholdType = &v - return s -} - -// A notification with subscribers. A notification can have one SNS subscriber -// and up to 10 email subscribers, for a total of 11 subscribers. -type NotificationWithSubscribers struct { - _ struct{} `type:"structure"` - - // The notification that is associated with a budget. - // - // Notification is a required field - Notification *Notification `type:"structure" required:"true"` - - // A list of subscribers who are subscribed to this notification. - // - // Subscribers is a required field - Subscribers []*Subscriber `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s NotificationWithSubscribers) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NotificationWithSubscribers) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NotificationWithSubscribers) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NotificationWithSubscribers"} - if s.Notification == nil { - invalidParams.Add(request.NewErrParamRequired("Notification")) - } - if s.Subscribers == nil { - invalidParams.Add(request.NewErrParamRequired("Subscribers")) - } - if s.Subscribers != nil && len(s.Subscribers) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Subscribers", 1)) - } - if s.Notification != nil { - if err := s.Notification.Validate(); err != nil { - invalidParams.AddNested("Notification", err.(request.ErrInvalidParams)) - } - } - if s.Subscribers != nil { - for i, v := range s.Subscribers { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Subscribers", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNotification sets the Notification field's value. -func (s *NotificationWithSubscribers) SetNotification(v *Notification) *NotificationWithSubscribers { - s.Notification = v - return s -} - -// SetSubscribers sets the Subscribers field's value. -func (s *NotificationWithSubscribers) SetSubscribers(v []*Subscriber) *NotificationWithSubscribers { - s.Subscribers = v - return s -} - -// The amount of cost or usage that is measured for a budget. -// -// For example, a Spend for 3 GB of S3 usage would have the following parameters: -// -// * An Amount of 3 -// -// * A unit of GB -type Spend struct { - _ struct{} `type:"structure"` - - // The cost or usage amount that is associated with a budget forecast, actual - // spend, or budget threshold. - // - // Amount is a required field - Amount *string `min:"1" type:"string" required:"true"` - - // The unit of measurement that is used for the budget forecast, actual spend, - // or budget threshold, such as dollars or GB. - // - // Unit is a required field - Unit *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Spend) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Spend) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Spend) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Spend"} - if s.Amount == nil { - invalidParams.Add(request.NewErrParamRequired("Amount")) - } - if s.Amount != nil && len(*s.Amount) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Amount", 1)) - } - if s.Unit == nil { - invalidParams.Add(request.NewErrParamRequired("Unit")) - } - if s.Unit != nil && len(*s.Unit) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Unit", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAmount sets the Amount field's value. -func (s *Spend) SetAmount(v string) *Spend { - s.Amount = &v - return s -} - -// SetUnit sets the Unit field's value. -func (s *Spend) SetUnit(v string) *Spend { - s.Unit = &v - return s -} - -// The subscriber to a budget notification. The subscriber consists of a subscription -// type and either an Amazon SNS topic or an email address. -// -// For example, an email subscriber would have the following parameters: -// -// * A subscriptionType of EMAIL -// -// * An address of example@example.com -type Subscriber struct { - _ struct{} `type:"structure"` - - // The address that AWS sends budget notifications to, either an SNS topic or - // an email. - // - // Address is a required field - Address *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The type of notification that AWS sends to a subscriber. - // - // SubscriptionType is a required field - SubscriptionType *string `type:"string" required:"true" enum:"SubscriptionType"` -} - -// String returns the string representation -func (s Subscriber) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Subscriber) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Subscriber) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Subscriber"} - if s.Address == nil { - invalidParams.Add(request.NewErrParamRequired("Address")) - } - if s.Address != nil && len(*s.Address) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Address", 1)) - } - if s.SubscriptionType == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddress sets the Address field's value. -func (s *Subscriber) SetAddress(v string) *Subscriber { - s.Address = &v - return s -} - -// SetSubscriptionType sets the SubscriptionType field's value. -func (s *Subscriber) SetSubscriptionType(v string) *Subscriber { - s.SubscriptionType = &v - return s -} - -// The period of time that is covered by a budget. The period has a start date -// and an end date. The start date must come before the end date. There are -// no restrictions on the end date. -type TimePeriod struct { - _ struct{} `type:"structure"` - - // The end date for a budget. If you didn't specify an end date, AWS set your - // end date to 06/15/87 00:00 UTC. The defaults are the same for the AWS Billing - // and Cost Management console and the API. - // - // After the end date, AWS deletes the budget and all associated notifications - // and subscribers. You can change your end date with the UpdateBudget operation. - End *time.Time `type:"timestamp"` - - // The start date for a budget. If you created your budget and didn't specify - // a start date, AWS defaults to the start of your chosen time period (DAILY, - // MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget - // on January 24, 2018, chose DAILY, and didn't set a start date, AWS set your - // start date to 01/24/18 00:00 UTC. If you chose MONTHLY, AWS set your start - // date to 01/01/18 00:00 UTC. The defaults are the same for the AWS Billing - // and Cost Management console and the API. - // - // You can change your start date with the UpdateBudget operation. - Start *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s TimePeriod) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimePeriod) GoString() string { - return s.String() -} - -// SetEnd sets the End field's value. -func (s *TimePeriod) SetEnd(v time.Time) *TimePeriod { - s.End = &v - return s -} - -// SetStart sets the Start field's value. -func (s *TimePeriod) SetStart(v time.Time) *TimePeriod { - s.Start = &v - return s -} - -// Request of UpdateBudget -type UpdateBudgetInput struct { - _ struct{} `type:"structure"` - - // The accountId that is associated with the budget that you want to update. - // - // AccountId is a required field - AccountId *string `min:"12" type:"string" required:"true"` - - // The budget that you want to update your budget to. - // - // NewBudget is a required field - NewBudget *Budget `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateBudgetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBudgetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateBudgetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateBudgetInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) - } - if s.NewBudget == nil { - invalidParams.Add(request.NewErrParamRequired("NewBudget")) - } - if s.NewBudget != nil { - if err := s.NewBudget.Validate(); err != nil { - invalidParams.AddNested("NewBudget", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *UpdateBudgetInput) SetAccountId(v string) *UpdateBudgetInput { - s.AccountId = &v - return s -} - -// SetNewBudget sets the NewBudget field's value. -func (s *UpdateBudgetInput) SetNewBudget(v *Budget) *UpdateBudgetInput { - s.NewBudget = v - return s -} - -// Response of UpdateBudget -type UpdateBudgetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateBudgetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBudgetOutput) GoString() string { - return s.String() -} - -// Request of UpdateNotification -type UpdateNotificationInput struct { - _ struct{} `type:"structure"` - - // The accountId that is associated with the budget whose notification you want - // to update. - // - // AccountId is a required field - AccountId *string `min:"12" type:"string" required:"true"` - - // The name of the budget whose notification you want to update. - // - // BudgetName is a required field - BudgetName *string `min:"1" type:"string" required:"true"` - - // The updated notification to be associated with a budget. - // - // NewNotification is a required field - NewNotification *Notification `type:"structure" required:"true"` - - // The previous notification that is associated with a budget. - // - // OldNotification is a required field - OldNotification *Notification `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateNotificationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateNotificationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateNotificationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateNotificationInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) - } - if s.BudgetName == nil { - invalidParams.Add(request.NewErrParamRequired("BudgetName")) - } - if s.BudgetName != nil && len(*s.BudgetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) - } - if s.NewNotification == nil { - invalidParams.Add(request.NewErrParamRequired("NewNotification")) - } - if s.OldNotification == nil { - invalidParams.Add(request.NewErrParamRequired("OldNotification")) - } - if s.NewNotification != nil { - if err := s.NewNotification.Validate(); err != nil { - invalidParams.AddNested("NewNotification", err.(request.ErrInvalidParams)) - } - } - if s.OldNotification != nil { - if err := s.OldNotification.Validate(); err != nil { - invalidParams.AddNested("OldNotification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *UpdateNotificationInput) SetAccountId(v string) *UpdateNotificationInput { - s.AccountId = &v - return s -} - -// SetBudgetName sets the BudgetName field's value. -func (s *UpdateNotificationInput) SetBudgetName(v string) *UpdateNotificationInput { - s.BudgetName = &v - return s -} - -// SetNewNotification sets the NewNotification field's value. -func (s *UpdateNotificationInput) SetNewNotification(v *Notification) *UpdateNotificationInput { - s.NewNotification = v - return s -} - -// SetOldNotification sets the OldNotification field's value. -func (s *UpdateNotificationInput) SetOldNotification(v *Notification) *UpdateNotificationInput { - s.OldNotification = v - return s -} - -// Response of UpdateNotification -type UpdateNotificationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateNotificationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateNotificationOutput) GoString() string { - return s.String() -} - -// Request of UpdateSubscriber -type UpdateSubscriberInput struct { - _ struct{} `type:"structure"` - - // The accountId that is associated with the budget whose subscriber you want - // to update. - // - // AccountId is a required field - AccountId *string `min:"12" type:"string" required:"true"` - - // The name of the budget whose subscriber you want to update. - // - // BudgetName is a required field - BudgetName *string `min:"1" type:"string" required:"true"` - - // The updated subscriber that is associated with a budget notification. - // - // NewSubscriber is a required field - NewSubscriber *Subscriber `type:"structure" required:"true"` - - // The notification whose subscriber you want to update. - // - // Notification is a required field - Notification *Notification `type:"structure" required:"true"` - - // The previous subscriber that is associated with a budget notification. - // - // OldSubscriber is a required field - OldSubscriber *Subscriber `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateSubscriberInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSubscriberInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSubscriberInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSubscriberInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) - } - if s.BudgetName == nil { - invalidParams.Add(request.NewErrParamRequired("BudgetName")) - } - if s.BudgetName != nil && len(*s.BudgetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) - } - if s.NewSubscriber == nil { - invalidParams.Add(request.NewErrParamRequired("NewSubscriber")) - } - if s.Notification == nil { - invalidParams.Add(request.NewErrParamRequired("Notification")) - } - if s.OldSubscriber == nil { - invalidParams.Add(request.NewErrParamRequired("OldSubscriber")) - } - if s.NewSubscriber != nil { - if err := s.NewSubscriber.Validate(); err != nil { - invalidParams.AddNested("NewSubscriber", err.(request.ErrInvalidParams)) - } - } - if s.Notification != nil { - if err := s.Notification.Validate(); err != nil { - invalidParams.AddNested("Notification", err.(request.ErrInvalidParams)) - } - } - if s.OldSubscriber != nil { - if err := s.OldSubscriber.Validate(); err != nil { - invalidParams.AddNested("OldSubscriber", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *UpdateSubscriberInput) SetAccountId(v string) *UpdateSubscriberInput { - s.AccountId = &v - return s -} - -// SetBudgetName sets the BudgetName field's value. -func (s *UpdateSubscriberInput) SetBudgetName(v string) *UpdateSubscriberInput { - s.BudgetName = &v - return s -} - -// SetNewSubscriber sets the NewSubscriber field's value. -func (s *UpdateSubscriberInput) SetNewSubscriber(v *Subscriber) *UpdateSubscriberInput { - s.NewSubscriber = v - return s -} - -// SetNotification sets the Notification field's value. -func (s *UpdateSubscriberInput) SetNotification(v *Notification) *UpdateSubscriberInput { - s.Notification = v - return s -} - -// SetOldSubscriber sets the OldSubscriber field's value. -func (s *UpdateSubscriberInput) SetOldSubscriber(v *Subscriber) *UpdateSubscriberInput { - s.OldSubscriber = v - return s -} - -// Response of UpdateSubscriber -type UpdateSubscriberOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateSubscriberOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSubscriberOutput) GoString() string { - return s.String() -} - -// The type of a budget. It must be one of the following types: -// -// COST, USAGE, RI_UTILIZATION, or RI_COVERAGE. -const ( - // BudgetTypeUsage is a BudgetType enum value - BudgetTypeUsage = "USAGE" - - // BudgetTypeCost is a BudgetType enum value - BudgetTypeCost = "COST" - - // BudgetTypeRiUtilization is a BudgetType enum value - BudgetTypeRiUtilization = "RI_UTILIZATION" - - // BudgetTypeRiCoverage is a BudgetType enum value - BudgetTypeRiCoverage = "RI_COVERAGE" -) - -// The comparison operator of a notification. Currently the service supports -// the following operators: -// -// GREATER_THAN, LESS_THAN, EQUAL_TO -const ( - // ComparisonOperatorGreaterThan is a ComparisonOperator enum value - ComparisonOperatorGreaterThan = "GREATER_THAN" - - // ComparisonOperatorLessThan is a ComparisonOperator enum value - ComparisonOperatorLessThan = "LESS_THAN" - - // ComparisonOperatorEqualTo is a ComparisonOperator enum value - ComparisonOperatorEqualTo = "EQUAL_TO" -) - -const ( - // NotificationStateOk is a NotificationState enum value - NotificationStateOk = "OK" - - // NotificationStateAlarm is a NotificationState enum value - NotificationStateAlarm = "ALARM" -) - -// The type of a notification. It must be ACTUAL or FORECASTED. -const ( - // NotificationTypeActual is a NotificationType enum value - NotificationTypeActual = "ACTUAL" - - // NotificationTypeForecasted is a NotificationType enum value - NotificationTypeForecasted = "FORECASTED" -) - -// The subscription type of the subscriber. It can be SMS or EMAIL. -const ( - // SubscriptionTypeSns is a SubscriptionType enum value - SubscriptionTypeSns = "SNS" - - // SubscriptionTypeEmail is a SubscriptionType enum value - SubscriptionTypeEmail = "EMAIL" -) - -// The type of threshold for a notification. It can be PERCENTAGE or ABSOLUTE_VALUE. -const ( - // ThresholdTypePercentage is a ThresholdType enum value - ThresholdTypePercentage = "PERCENTAGE" - - // ThresholdTypeAbsoluteValue is a ThresholdType enum value - ThresholdTypeAbsoluteValue = "ABSOLUTE_VALUE" -) - -// The time unit of the budget, such as MONTHLY or QUARTERLY. -const ( - // TimeUnitDaily is a TimeUnit enum value - TimeUnitDaily = "DAILY" - - // TimeUnitMonthly is a TimeUnit enum value - TimeUnitMonthly = "MONTHLY" - - // TimeUnitQuarterly is a TimeUnit enum value - TimeUnitQuarterly = "QUARTERLY" - - // TimeUnitAnnually is a TimeUnit enum value - TimeUnitAnnually = "ANNUALLY" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go deleted file mode 100644 index 918baf668..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go +++ /dev/null @@ -1,67 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package budgets provides the client and types for making API -// requests to AWS Budgets. -// -// The AWS Budgets API enables you to use AWS Budgets to plan your service usage, -// service costs, and instance reservations. The API reference provides descriptions, -// syntax, and usage examples for each of the actions and data types for AWS -// Budgets. -// -// Budgets provide you with a way to see the following information: -// -// * How close your plan is to your budgeted amount or to the free tier limits -// -// * Your usage-to-date, including how much you've used of your Reserved -// Instances (RIs) -// -// * Your current estimated charges from AWS, and how much your predicted -// usage will accrue in charges by the end of the month -// -// * How much of your budget has been used -// -// AWS updates your budget status several times a day. Budgets track your unblended -// costs, subscriptions, refunds, and RIs. You can create the following types -// of budgets: -// -// * Cost budgets - Plan how much you want to spend on a service. -// -// * Usage budgets - Plan how much you want to use one or more services. -// -// * RI utilization budgets - Define a utilization threshold, and receive -// alerts when your RI usage falls below that threshold. This lets you see -// if your RIs are unused or under-utilized. -// -// * RI coverage budgets - Define a coverage threshold, and receive alerts -// when the number of your instance hours that are covered by RIs fall below -// that threshold. This lets you see how much of your instance usage is covered -// by a reservation. -// -// Service Endpoint -// -// The AWS Budgets API provides the following endpoint: -// -// * https://budgets.amazonaws.com -// -// For information about costs that are associated with the AWS Budgets API, -// see AWS Cost Management Pricing (https://aws.amazon.com/aws-cost-management/pricing/). -// -// See budgets package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/budgets/ -// -// Using the Client -// -// To contact AWS Budgets 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 Budgets client Budgets for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/budgets/#New -package budgets diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/errors.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/errors.go deleted file mode 100644 index 8737c2daa..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/budgets/errors.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package budgets - -const ( - - // ErrCodeCreationLimitExceededException for service response error code - // "CreationLimitExceededException". - // - // You've exceeded the notification or subscriber limit. - ErrCodeCreationLimitExceededException = "CreationLimitExceededException" - - // ErrCodeDuplicateRecordException for service response error code - // "DuplicateRecordException". - // - // The budget name already exists. Budget names must be unique within an account. - ErrCodeDuplicateRecordException = "DuplicateRecordException" - - // ErrCodeExpiredNextTokenException for service response error code - // "ExpiredNextTokenException". - // - // The pagination token expired. - ErrCodeExpiredNextTokenException = "ExpiredNextTokenException" - - // ErrCodeInternalErrorException for service response error code - // "InternalErrorException". - // - // An error on the server occurred during the processing of your request. Try - // again later. - ErrCodeInternalErrorException = "InternalErrorException" - - // ErrCodeInvalidNextTokenException for service response error code - // "InvalidNextTokenException". - // - // The pagination token is invalid. - ErrCodeInvalidNextTokenException = "InvalidNextTokenException" - - // ErrCodeInvalidParameterException for service response error code - // "InvalidParameterException". - // - // An error on the client occurred. Typically, the cause is an invalid input - // value. - ErrCodeInvalidParameterException = "InvalidParameterException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // We can’t locate the resource that you specified. - ErrCodeNotFoundException = "NotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/service.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/service.go deleted file mode 100644 index dc10c2aaa..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/budgets/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package budgets - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// Budgets provides the API operation methods for making requests to -// AWS Budgets. See this package's package overview docs -// for details on the service. -// -// Budgets methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Budgets 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 = "budgets" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Budgets" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Budgets client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Budgets client from just a session. -// svc := budgets.New(mySession) -// -// // Create a Budgets client with additional configuration -// svc := budgets.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Budgets { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Budgets { - svc := &Budgets{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2016-10-20", - JSONVersion: "1.1", - TargetPrefix: "AWSBudgetServiceGateway", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Budgets operation and runs any -// custom request initialization. -func (c *Budgets) 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/cloud9/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go deleted file mode 100644 index abc4ea415..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go +++ /dev/null @@ -1,2148 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloud9 - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateEnvironmentEC2 = "CreateEnvironmentEC2" - -// CreateEnvironmentEC2Request generates a "aws/request.Request" representing the -// client's request for the CreateEnvironmentEC2 operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateEnvironmentEC2 for more information on using the CreateEnvironmentEC2 -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateEnvironmentEC2Request method. -// req, resp := client.CreateEnvironmentEC2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentEC2 -func (c *Cloud9) CreateEnvironmentEC2Request(input *CreateEnvironmentEC2Input) (req *request.Request, output *CreateEnvironmentEC2Output) { - op := &request.Operation{ - Name: opCreateEnvironmentEC2, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateEnvironmentEC2Input{} - } - - output = &CreateEnvironmentEC2Output{} - req = c.newRequest(op, input, output) - return -} - -// CreateEnvironmentEC2 API operation for AWS Cloud9. -// -// Creates an AWS Cloud9 development environment, launches an Amazon Elastic -// Compute Cloud (Amazon EC2) instance, and then connects from the instance -// to the environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud9's -// API operation CreateEnvironmentEC2 for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The target request is invalid. -// -// * ErrCodeConflictException "ConflictException" -// A conflict occurred. -// -// * ErrCodeNotFoundException "NotFoundException" -// The target resource cannot be found. -// -// * ErrCodeForbiddenException "ForbiddenException" -// An access permissions issue occurred. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Too many service requests were made over the given time period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A service limit was exceeded. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal server error occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentEC2 -func (c *Cloud9) CreateEnvironmentEC2(input *CreateEnvironmentEC2Input) (*CreateEnvironmentEC2Output, error) { - req, out := c.CreateEnvironmentEC2Request(input) - return out, req.Send() -} - -// CreateEnvironmentEC2WithContext is the same as CreateEnvironmentEC2 with the addition of -// the ability to pass a context and additional request options. -// -// See CreateEnvironmentEC2 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Cloud9) CreateEnvironmentEC2WithContext(ctx aws.Context, input *CreateEnvironmentEC2Input, opts ...request.Option) (*CreateEnvironmentEC2Output, error) { - req, out := c.CreateEnvironmentEC2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateEnvironmentMembership = "CreateEnvironmentMembership" - -// CreateEnvironmentMembershipRequest generates a "aws/request.Request" representing the -// client's request for the CreateEnvironmentMembership operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateEnvironmentMembership for more information on using the CreateEnvironmentMembership -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateEnvironmentMembershipRequest method. -// req, resp := client.CreateEnvironmentMembershipRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentMembership -func (c *Cloud9) CreateEnvironmentMembershipRequest(input *CreateEnvironmentMembershipInput) (req *request.Request, output *CreateEnvironmentMembershipOutput) { - op := &request.Operation{ - Name: opCreateEnvironmentMembership, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateEnvironmentMembershipInput{} - } - - output = &CreateEnvironmentMembershipOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateEnvironmentMembership API operation for AWS Cloud9. -// -// Adds an environment member to an AWS Cloud9 development environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud9's -// API operation CreateEnvironmentMembership for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The target request is invalid. -// -// * ErrCodeConflictException "ConflictException" -// A conflict occurred. -// -// * ErrCodeNotFoundException "NotFoundException" -// The target resource cannot be found. -// -// * ErrCodeForbiddenException "ForbiddenException" -// An access permissions issue occurred. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Too many service requests were made over the given time period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A service limit was exceeded. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal server error occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentMembership -func (c *Cloud9) CreateEnvironmentMembership(input *CreateEnvironmentMembershipInput) (*CreateEnvironmentMembershipOutput, error) { - req, out := c.CreateEnvironmentMembershipRequest(input) - return out, req.Send() -} - -// CreateEnvironmentMembershipWithContext is the same as CreateEnvironmentMembership with the addition of -// the ability to pass a context and additional request options. -// -// See CreateEnvironmentMembership for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Cloud9) CreateEnvironmentMembershipWithContext(ctx aws.Context, input *CreateEnvironmentMembershipInput, opts ...request.Option) (*CreateEnvironmentMembershipOutput, error) { - req, out := c.CreateEnvironmentMembershipRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEnvironment = "DeleteEnvironment" - -// DeleteEnvironmentRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEnvironment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEnvironment for more information on using the DeleteEnvironment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEnvironmentRequest method. -// req, resp := client.DeleteEnvironmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironment -func (c *Cloud9) DeleteEnvironmentRequest(input *DeleteEnvironmentInput) (req *request.Request, output *DeleteEnvironmentOutput) { - op := &request.Operation{ - Name: opDeleteEnvironment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteEnvironmentInput{} - } - - output = &DeleteEnvironmentOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteEnvironment API operation for AWS Cloud9. -// -// Deletes an AWS Cloud9 development environment. If an Amazon EC2 instance -// is connected to the environment, also terminates the instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud9's -// API operation DeleteEnvironment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The target request is invalid. -// -// * ErrCodeConflictException "ConflictException" -// A conflict occurred. -// -// * ErrCodeNotFoundException "NotFoundException" -// The target resource cannot be found. -// -// * ErrCodeForbiddenException "ForbiddenException" -// An access permissions issue occurred. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Too many service requests were made over the given time period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A service limit was exceeded. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal server error occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironment -func (c *Cloud9) DeleteEnvironment(input *DeleteEnvironmentInput) (*DeleteEnvironmentOutput, error) { - req, out := c.DeleteEnvironmentRequest(input) - return out, req.Send() -} - -// DeleteEnvironmentWithContext is the same as DeleteEnvironment with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEnvironment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Cloud9) DeleteEnvironmentWithContext(ctx aws.Context, input *DeleteEnvironmentInput, opts ...request.Option) (*DeleteEnvironmentOutput, error) { - req, out := c.DeleteEnvironmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEnvironmentMembership = "DeleteEnvironmentMembership" - -// DeleteEnvironmentMembershipRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEnvironmentMembership operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEnvironmentMembership for more information on using the DeleteEnvironmentMembership -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEnvironmentMembershipRequest method. -// req, resp := client.DeleteEnvironmentMembershipRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentMembership -func (c *Cloud9) DeleteEnvironmentMembershipRequest(input *DeleteEnvironmentMembershipInput) (req *request.Request, output *DeleteEnvironmentMembershipOutput) { - op := &request.Operation{ - Name: opDeleteEnvironmentMembership, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteEnvironmentMembershipInput{} - } - - output = &DeleteEnvironmentMembershipOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteEnvironmentMembership API operation for AWS Cloud9. -// -// Deletes an environment member from an AWS Cloud9 development environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud9's -// API operation DeleteEnvironmentMembership for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The target request is invalid. -// -// * ErrCodeConflictException "ConflictException" -// A conflict occurred. -// -// * ErrCodeNotFoundException "NotFoundException" -// The target resource cannot be found. -// -// * ErrCodeForbiddenException "ForbiddenException" -// An access permissions issue occurred. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Too many service requests were made over the given time period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A service limit was exceeded. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal server error occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentMembership -func (c *Cloud9) DeleteEnvironmentMembership(input *DeleteEnvironmentMembershipInput) (*DeleteEnvironmentMembershipOutput, error) { - req, out := c.DeleteEnvironmentMembershipRequest(input) - return out, req.Send() -} - -// DeleteEnvironmentMembershipWithContext is the same as DeleteEnvironmentMembership with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEnvironmentMembership for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Cloud9) DeleteEnvironmentMembershipWithContext(ctx aws.Context, input *DeleteEnvironmentMembershipInput, opts ...request.Option) (*DeleteEnvironmentMembershipOutput, error) { - req, out := c.DeleteEnvironmentMembershipRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEnvironmentMemberships = "DescribeEnvironmentMemberships" - -// DescribeEnvironmentMembershipsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEnvironmentMemberships operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEnvironmentMemberships for more information on using the DescribeEnvironmentMemberships -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEnvironmentMembershipsRequest method. -// req, resp := client.DescribeEnvironmentMembershipsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentMemberships -func (c *Cloud9) DescribeEnvironmentMembershipsRequest(input *DescribeEnvironmentMembershipsInput) (req *request.Request, output *DescribeEnvironmentMembershipsOutput) { - op := &request.Operation{ - Name: opDescribeEnvironmentMemberships, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEnvironmentMembershipsInput{} - } - - output = &DescribeEnvironmentMembershipsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEnvironmentMemberships API operation for AWS Cloud9. -// -// Gets information about environment members for an AWS Cloud9 development -// environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud9's -// API operation DescribeEnvironmentMemberships for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The target request is invalid. -// -// * ErrCodeConflictException "ConflictException" -// A conflict occurred. -// -// * ErrCodeNotFoundException "NotFoundException" -// The target resource cannot be found. -// -// * ErrCodeForbiddenException "ForbiddenException" -// An access permissions issue occurred. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Too many service requests were made over the given time period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A service limit was exceeded. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal server error occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentMemberships -func (c *Cloud9) DescribeEnvironmentMemberships(input *DescribeEnvironmentMembershipsInput) (*DescribeEnvironmentMembershipsOutput, error) { - req, out := c.DescribeEnvironmentMembershipsRequest(input) - return out, req.Send() -} - -// DescribeEnvironmentMembershipsWithContext is the same as DescribeEnvironmentMemberships with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEnvironmentMemberships for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Cloud9) DescribeEnvironmentMembershipsWithContext(ctx aws.Context, input *DescribeEnvironmentMembershipsInput, opts ...request.Option) (*DescribeEnvironmentMembershipsOutput, error) { - req, out := c.DescribeEnvironmentMembershipsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEnvironmentMembershipsPages iterates over the pages of a DescribeEnvironmentMemberships operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEnvironmentMemberships 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 DescribeEnvironmentMemberships operation. -// pageNum := 0 -// err := client.DescribeEnvironmentMembershipsPages(params, -// func(page *DescribeEnvironmentMembershipsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Cloud9) DescribeEnvironmentMembershipsPages(input *DescribeEnvironmentMembershipsInput, fn func(*DescribeEnvironmentMembershipsOutput, bool) bool) error { - return c.DescribeEnvironmentMembershipsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEnvironmentMembershipsPagesWithContext same as DescribeEnvironmentMembershipsPages 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 *Cloud9) DescribeEnvironmentMembershipsPagesWithContext(ctx aws.Context, input *DescribeEnvironmentMembershipsInput, fn func(*DescribeEnvironmentMembershipsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEnvironmentMembershipsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEnvironmentMembershipsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEnvironmentMembershipsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEnvironmentStatus = "DescribeEnvironmentStatus" - -// DescribeEnvironmentStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEnvironmentStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEnvironmentStatus for more information on using the DescribeEnvironmentStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEnvironmentStatusRequest method. -// req, resp := client.DescribeEnvironmentStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentStatus -func (c *Cloud9) DescribeEnvironmentStatusRequest(input *DescribeEnvironmentStatusInput) (req *request.Request, output *DescribeEnvironmentStatusOutput) { - op := &request.Operation{ - Name: opDescribeEnvironmentStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEnvironmentStatusInput{} - } - - output = &DescribeEnvironmentStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEnvironmentStatus API operation for AWS Cloud9. -// -// Gets status information for an AWS Cloud9 development environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud9's -// API operation DescribeEnvironmentStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The target request is invalid. -// -// * ErrCodeConflictException "ConflictException" -// A conflict occurred. -// -// * ErrCodeNotFoundException "NotFoundException" -// The target resource cannot be found. -// -// * ErrCodeForbiddenException "ForbiddenException" -// An access permissions issue occurred. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Too many service requests were made over the given time period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A service limit was exceeded. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal server error occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentStatus -func (c *Cloud9) DescribeEnvironmentStatus(input *DescribeEnvironmentStatusInput) (*DescribeEnvironmentStatusOutput, error) { - req, out := c.DescribeEnvironmentStatusRequest(input) - return out, req.Send() -} - -// DescribeEnvironmentStatusWithContext is the same as DescribeEnvironmentStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEnvironmentStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Cloud9) DescribeEnvironmentStatusWithContext(ctx aws.Context, input *DescribeEnvironmentStatusInput, opts ...request.Option) (*DescribeEnvironmentStatusOutput, error) { - req, out := c.DescribeEnvironmentStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEnvironments = "DescribeEnvironments" - -// DescribeEnvironmentsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEnvironments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEnvironments for more information on using the DescribeEnvironments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEnvironmentsRequest method. -// req, resp := client.DescribeEnvironmentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironments -func (c *Cloud9) DescribeEnvironmentsRequest(input *DescribeEnvironmentsInput) (req *request.Request, output *DescribeEnvironmentsOutput) { - op := &request.Operation{ - Name: opDescribeEnvironments, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEnvironmentsInput{} - } - - output = &DescribeEnvironmentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEnvironments API operation for AWS Cloud9. -// -// Gets information about AWS Cloud9 development environments. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud9's -// API operation DescribeEnvironments for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The target request is invalid. -// -// * ErrCodeConflictException "ConflictException" -// A conflict occurred. -// -// * ErrCodeNotFoundException "NotFoundException" -// The target resource cannot be found. -// -// * ErrCodeForbiddenException "ForbiddenException" -// An access permissions issue occurred. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Too many service requests were made over the given time period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A service limit was exceeded. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal server error occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironments -func (c *Cloud9) DescribeEnvironments(input *DescribeEnvironmentsInput) (*DescribeEnvironmentsOutput, error) { - req, out := c.DescribeEnvironmentsRequest(input) - return out, req.Send() -} - -// DescribeEnvironmentsWithContext is the same as DescribeEnvironments with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEnvironments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Cloud9) DescribeEnvironmentsWithContext(ctx aws.Context, input *DescribeEnvironmentsInput, opts ...request.Option) (*DescribeEnvironmentsOutput, error) { - req, out := c.DescribeEnvironmentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListEnvironments = "ListEnvironments" - -// ListEnvironmentsRequest generates a "aws/request.Request" representing the -// client's request for the ListEnvironments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListEnvironments for more information on using the ListEnvironments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListEnvironmentsRequest method. -// req, resp := client.ListEnvironmentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/ListEnvironments -func (c *Cloud9) ListEnvironmentsRequest(input *ListEnvironmentsInput) (req *request.Request, output *ListEnvironmentsOutput) { - op := &request.Operation{ - Name: opListEnvironments, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListEnvironmentsInput{} - } - - output = &ListEnvironmentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListEnvironments API operation for AWS Cloud9. -// -// Gets a list of AWS Cloud9 development environment identifiers. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud9's -// API operation ListEnvironments for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The target request is invalid. -// -// * ErrCodeConflictException "ConflictException" -// A conflict occurred. -// -// * ErrCodeNotFoundException "NotFoundException" -// The target resource cannot be found. -// -// * ErrCodeForbiddenException "ForbiddenException" -// An access permissions issue occurred. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Too many service requests were made over the given time period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A service limit was exceeded. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal server error occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/ListEnvironments -func (c *Cloud9) ListEnvironments(input *ListEnvironmentsInput) (*ListEnvironmentsOutput, error) { - req, out := c.ListEnvironmentsRequest(input) - return out, req.Send() -} - -// ListEnvironmentsWithContext is the same as ListEnvironments with the addition of -// the ability to pass a context and additional request options. -// -// See ListEnvironments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Cloud9) ListEnvironmentsWithContext(ctx aws.Context, input *ListEnvironmentsInput, opts ...request.Option) (*ListEnvironmentsOutput, error) { - req, out := c.ListEnvironmentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListEnvironmentsPages iterates over the pages of a ListEnvironments operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListEnvironments 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 ListEnvironments operation. -// pageNum := 0 -// err := client.ListEnvironmentsPages(params, -// func(page *ListEnvironmentsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Cloud9) ListEnvironmentsPages(input *ListEnvironmentsInput, fn func(*ListEnvironmentsOutput, bool) bool) error { - return c.ListEnvironmentsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListEnvironmentsPagesWithContext same as ListEnvironmentsPages 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 *Cloud9) ListEnvironmentsPagesWithContext(ctx aws.Context, input *ListEnvironmentsInput, fn func(*ListEnvironmentsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListEnvironmentsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListEnvironmentsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEnvironmentsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opUpdateEnvironment = "UpdateEnvironment" - -// UpdateEnvironmentRequest generates a "aws/request.Request" representing the -// client's request for the UpdateEnvironment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateEnvironment for more information on using the UpdateEnvironment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateEnvironmentRequest method. -// req, resp := client.UpdateEnvironmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironment -func (c *Cloud9) UpdateEnvironmentRequest(input *UpdateEnvironmentInput) (req *request.Request, output *UpdateEnvironmentOutput) { - op := &request.Operation{ - Name: opUpdateEnvironment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateEnvironmentInput{} - } - - output = &UpdateEnvironmentOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateEnvironment API operation for AWS Cloud9. -// -// Changes the settings of an existing AWS Cloud9 development environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud9's -// API operation UpdateEnvironment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The target request is invalid. -// -// * ErrCodeConflictException "ConflictException" -// A conflict occurred. -// -// * ErrCodeNotFoundException "NotFoundException" -// The target resource cannot be found. -// -// * ErrCodeForbiddenException "ForbiddenException" -// An access permissions issue occurred. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Too many service requests were made over the given time period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A service limit was exceeded. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal server error occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironment -func (c *Cloud9) UpdateEnvironment(input *UpdateEnvironmentInput) (*UpdateEnvironmentOutput, error) { - req, out := c.UpdateEnvironmentRequest(input) - return out, req.Send() -} - -// UpdateEnvironmentWithContext is the same as UpdateEnvironment with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateEnvironment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Cloud9) UpdateEnvironmentWithContext(ctx aws.Context, input *UpdateEnvironmentInput, opts ...request.Option) (*UpdateEnvironmentOutput, error) { - req, out := c.UpdateEnvironmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateEnvironmentMembership = "UpdateEnvironmentMembership" - -// UpdateEnvironmentMembershipRequest generates a "aws/request.Request" representing the -// client's request for the UpdateEnvironmentMembership operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateEnvironmentMembership for more information on using the UpdateEnvironmentMembership -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateEnvironmentMembershipRequest method. -// req, resp := client.UpdateEnvironmentMembershipRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironmentMembership -func (c *Cloud9) UpdateEnvironmentMembershipRequest(input *UpdateEnvironmentMembershipInput) (req *request.Request, output *UpdateEnvironmentMembershipOutput) { - op := &request.Operation{ - Name: opUpdateEnvironmentMembership, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateEnvironmentMembershipInput{} - } - - output = &UpdateEnvironmentMembershipOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateEnvironmentMembership API operation for AWS Cloud9. -// -// Changes the settings of an existing environment member for an AWS Cloud9 -// development environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud9's -// API operation UpdateEnvironmentMembership for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The target request is invalid. -// -// * ErrCodeConflictException "ConflictException" -// A conflict occurred. -// -// * ErrCodeNotFoundException "NotFoundException" -// The target resource cannot be found. -// -// * ErrCodeForbiddenException "ForbiddenException" -// An access permissions issue occurred. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Too many service requests were made over the given time period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A service limit was exceeded. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal server error occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironmentMembership -func (c *Cloud9) UpdateEnvironmentMembership(input *UpdateEnvironmentMembershipInput) (*UpdateEnvironmentMembershipOutput, error) { - req, out := c.UpdateEnvironmentMembershipRequest(input) - return out, req.Send() -} - -// UpdateEnvironmentMembershipWithContext is the same as UpdateEnvironmentMembership with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateEnvironmentMembership for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Cloud9) UpdateEnvironmentMembershipWithContext(ctx aws.Context, input *UpdateEnvironmentMembershipInput, opts ...request.Option) (*UpdateEnvironmentMembershipOutput, error) { - req, out := c.UpdateEnvironmentMembershipRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type CreateEnvironmentEC2Input struct { - _ struct{} `type:"structure"` - - // The number of minutes until the running instance is shut down after the environment - // has last been used. - AutomaticStopTimeMinutes *int64 `locationName:"automaticStopTimeMinutes" type:"integer"` - - // A unique, case-sensitive string that helps AWS Cloud9 to ensure this operation - // completes no more than one time. - // - // For more information, see Client Tokens (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // in the Amazon EC2 API Reference. - ClientRequestToken *string `locationName:"clientRequestToken" type:"string"` - - // The description of the environment to create. - Description *string `locationName:"description" type:"string"` - - // The type of instance to connect to the environment (for example, t2.micro). - // - // InstanceType is a required field - InstanceType *string `locationName:"instanceType" min:"5" type:"string" required:"true"` - - // The name of the environment to create. - // - // This name is visible to other AWS IAM users in the same AWS account. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the environment owner. This ARN can be - // the ARN of any AWS IAM principal. If this value is not specified, the ARN - // defaults to this environment's creator. - OwnerArn *string `locationName:"ownerArn" type:"string"` - - // The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate - // with the Amazon EC2 instance. - SubnetId *string `locationName:"subnetId" min:"5" type:"string"` -} - -// String returns the string representation -func (s CreateEnvironmentEC2Input) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEnvironmentEC2Input) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateEnvironmentEC2Input) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateEnvironmentEC2Input"} - if s.InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceType")) - } - if s.InstanceType != nil && len(*s.InstanceType) < 5 { - invalidParams.Add(request.NewErrParamMinLen("InstanceType", 5)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.SubnetId != nil && len(*s.SubnetId) < 5 { - invalidParams.Add(request.NewErrParamMinLen("SubnetId", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutomaticStopTimeMinutes sets the AutomaticStopTimeMinutes field's value. -func (s *CreateEnvironmentEC2Input) SetAutomaticStopTimeMinutes(v int64) *CreateEnvironmentEC2Input { - s.AutomaticStopTimeMinutes = &v - return s -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *CreateEnvironmentEC2Input) SetClientRequestToken(v string) *CreateEnvironmentEC2Input { - s.ClientRequestToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateEnvironmentEC2Input) SetDescription(v string) *CreateEnvironmentEC2Input { - s.Description = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *CreateEnvironmentEC2Input) SetInstanceType(v string) *CreateEnvironmentEC2Input { - s.InstanceType = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateEnvironmentEC2Input) SetName(v string) *CreateEnvironmentEC2Input { - s.Name = &v - return s -} - -// SetOwnerArn sets the OwnerArn field's value. -func (s *CreateEnvironmentEC2Input) SetOwnerArn(v string) *CreateEnvironmentEC2Input { - s.OwnerArn = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *CreateEnvironmentEC2Input) SetSubnetId(v string) *CreateEnvironmentEC2Input { - s.SubnetId = &v - return s -} - -type CreateEnvironmentEC2Output struct { - _ struct{} `type:"structure"` - - // The ID of the environment that was created. - EnvironmentId *string `locationName:"environmentId" type:"string"` -} - -// String returns the string representation -func (s CreateEnvironmentEC2Output) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEnvironmentEC2Output) GoString() string { - return s.String() -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *CreateEnvironmentEC2Output) SetEnvironmentId(v string) *CreateEnvironmentEC2Output { - s.EnvironmentId = &v - return s -} - -type CreateEnvironmentMembershipInput struct { - _ struct{} `type:"structure"` - - // The ID of the environment that contains the environment member you want to - // add. - // - // EnvironmentId is a required field - EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"` - - // The type of environment member permissions you want to associate with this - // environment member. Available values include: - // - // * read-only: Has read-only access to the environment. - // - // * read-write: Has read-write access to the environment. - // - // Permissions is a required field - Permissions *string `locationName:"permissions" type:"string" required:"true" enum:"MemberPermissions"` - - // The Amazon Resource Name (ARN) of the environment member you want to add. - // - // UserArn is a required field - UserArn *string `locationName:"userArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateEnvironmentMembershipInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEnvironmentMembershipInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateEnvironmentMembershipInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateEnvironmentMembershipInput"} - if s.EnvironmentId == nil { - invalidParams.Add(request.NewErrParamRequired("EnvironmentId")) - } - if s.Permissions == nil { - invalidParams.Add(request.NewErrParamRequired("Permissions")) - } - if s.UserArn == nil { - invalidParams.Add(request.NewErrParamRequired("UserArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *CreateEnvironmentMembershipInput) SetEnvironmentId(v string) *CreateEnvironmentMembershipInput { - s.EnvironmentId = &v - return s -} - -// SetPermissions sets the Permissions field's value. -func (s *CreateEnvironmentMembershipInput) SetPermissions(v string) *CreateEnvironmentMembershipInput { - s.Permissions = &v - return s -} - -// SetUserArn sets the UserArn field's value. -func (s *CreateEnvironmentMembershipInput) SetUserArn(v string) *CreateEnvironmentMembershipInput { - s.UserArn = &v - return s -} - -type CreateEnvironmentMembershipOutput struct { - _ struct{} `type:"structure"` - - // Information about the environment member that was added. - Membership *EnvironmentMember `locationName:"membership" type:"structure"` -} - -// String returns the string representation -func (s CreateEnvironmentMembershipOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEnvironmentMembershipOutput) GoString() string { - return s.String() -} - -// SetMembership sets the Membership field's value. -func (s *CreateEnvironmentMembershipOutput) SetMembership(v *EnvironmentMember) *CreateEnvironmentMembershipOutput { - s.Membership = v - return s -} - -type DeleteEnvironmentInput struct { - _ struct{} `type:"structure"` - - // The ID of the environment to delete. - // - // EnvironmentId is a required field - EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEnvironmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEnvironmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEnvironmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEnvironmentInput"} - if s.EnvironmentId == nil { - invalidParams.Add(request.NewErrParamRequired("EnvironmentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *DeleteEnvironmentInput) SetEnvironmentId(v string) *DeleteEnvironmentInput { - s.EnvironmentId = &v - return s -} - -type DeleteEnvironmentMembershipInput struct { - _ struct{} `type:"structure"` - - // The ID of the environment to delete the environment member from. - // - // EnvironmentId is a required field - EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the environment member to delete from the - // environment. - // - // UserArn is a required field - UserArn *string `locationName:"userArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEnvironmentMembershipInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEnvironmentMembershipInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEnvironmentMembershipInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEnvironmentMembershipInput"} - if s.EnvironmentId == nil { - invalidParams.Add(request.NewErrParamRequired("EnvironmentId")) - } - if s.UserArn == nil { - invalidParams.Add(request.NewErrParamRequired("UserArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *DeleteEnvironmentMembershipInput) SetEnvironmentId(v string) *DeleteEnvironmentMembershipInput { - s.EnvironmentId = &v - return s -} - -// SetUserArn sets the UserArn field's value. -func (s *DeleteEnvironmentMembershipInput) SetUserArn(v string) *DeleteEnvironmentMembershipInput { - s.UserArn = &v - return s -} - -type DeleteEnvironmentMembershipOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteEnvironmentMembershipOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEnvironmentMembershipOutput) GoString() string { - return s.String() -} - -type DeleteEnvironmentOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteEnvironmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEnvironmentOutput) GoString() string { - return s.String() -} - -type DescribeEnvironmentMembershipsInput struct { - _ struct{} `type:"structure"` - - // The ID of the environment to get environment member information about. - EnvironmentId *string `locationName:"environmentId" type:"string"` - - // The maximum number of environment members to get information about. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // During a previous call, if there are more than 25 items in the list, only - // the first 25 items are returned, along with a unique string called a next - // token. To get the next batch of items in the list, call this operation again, - // adding the next token to the call. To get all of the items in the list, keep - // calling this operation with each subsequent next token that is returned, - // until no more next tokens are returned. - NextToken *string `locationName:"nextToken" type:"string"` - - // The type of environment member permissions to get information about. Available - // values include: - // - // * owner: Owns the environment. - // - // * read-only: Has read-only access to the environment. - // - // * read-write: Has read-write access to the environment. - // - // If no value is specified, information about all environment members are returned. - Permissions []*string `locationName:"permissions" type:"list"` - - // The Amazon Resource Name (ARN) of an individual environment member to get - // information about. If no value is specified, information about all environment - // members are returned. - UserArn *string `locationName:"userArn" type:"string"` -} - -// String returns the string representation -func (s DescribeEnvironmentMembershipsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentMembershipsInput) GoString() string { - return s.String() -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *DescribeEnvironmentMembershipsInput) SetEnvironmentId(v string) *DescribeEnvironmentMembershipsInput { - s.EnvironmentId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeEnvironmentMembershipsInput) SetMaxResults(v int64) *DescribeEnvironmentMembershipsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEnvironmentMembershipsInput) SetNextToken(v string) *DescribeEnvironmentMembershipsInput { - s.NextToken = &v - return s -} - -// SetPermissions sets the Permissions field's value. -func (s *DescribeEnvironmentMembershipsInput) SetPermissions(v []*string) *DescribeEnvironmentMembershipsInput { - s.Permissions = v - return s -} - -// SetUserArn sets the UserArn field's value. -func (s *DescribeEnvironmentMembershipsInput) SetUserArn(v string) *DescribeEnvironmentMembershipsInput { - s.UserArn = &v - return s -} - -type DescribeEnvironmentMembershipsOutput struct { - _ struct{} `type:"structure"` - - // Information about the environment members for the environment. - Memberships []*EnvironmentMember `locationName:"memberships" type:"list"` - - // If there are more than 25 items in the list, only the first 25 items are - // returned, along with a unique string called a next token. To get the next - // batch of items in the list, call this operation again, adding the next token - // to the call. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeEnvironmentMembershipsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentMembershipsOutput) GoString() string { - return s.String() -} - -// SetMemberships sets the Memberships field's value. -func (s *DescribeEnvironmentMembershipsOutput) SetMemberships(v []*EnvironmentMember) *DescribeEnvironmentMembershipsOutput { - s.Memberships = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEnvironmentMembershipsOutput) SetNextToken(v string) *DescribeEnvironmentMembershipsOutput { - s.NextToken = &v - return s -} - -type DescribeEnvironmentStatusInput struct { - _ struct{} `type:"structure"` - - // The ID of the environment to get status information about. - // - // EnvironmentId is a required field - EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeEnvironmentStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEnvironmentStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEnvironmentStatusInput"} - if s.EnvironmentId == nil { - invalidParams.Add(request.NewErrParamRequired("EnvironmentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *DescribeEnvironmentStatusInput) SetEnvironmentId(v string) *DescribeEnvironmentStatusInput { - s.EnvironmentId = &v - return s -} - -type DescribeEnvironmentStatusOutput struct { - _ struct{} `type:"structure"` - - // Any informational message about the status of the environment. - Message *string `locationName:"message" type:"string"` - - // The status of the environment. Available values include: - // - // * connecting: The environment is connecting. - // - // * creating: The environment is being created. - // - // * deleting: The environment is being deleted. - // - // * error: The environment is in an error state. - // - // * ready: The environment is ready. - // - // * stopped: The environment is stopped. - // - // * stopping: The environment is stopping. - Status *string `locationName:"status" type:"string" enum:"EnvironmentStatus"` -} - -// String returns the string representation -func (s DescribeEnvironmentStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentStatusOutput) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *DescribeEnvironmentStatusOutput) SetMessage(v string) *DescribeEnvironmentStatusOutput { - s.Message = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeEnvironmentStatusOutput) SetStatus(v string) *DescribeEnvironmentStatusOutput { - s.Status = &v - return s -} - -type DescribeEnvironmentsInput struct { - _ struct{} `type:"structure"` - - // The IDs of individual environments to get information about. - // - // EnvironmentIds is a required field - EnvironmentIds []*string `locationName:"environmentIds" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeEnvironmentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEnvironmentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEnvironmentsInput"} - if s.EnvironmentIds == nil { - invalidParams.Add(request.NewErrParamRequired("EnvironmentIds")) - } - if s.EnvironmentIds != nil && len(s.EnvironmentIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentIds", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentIds sets the EnvironmentIds field's value. -func (s *DescribeEnvironmentsInput) SetEnvironmentIds(v []*string) *DescribeEnvironmentsInput { - s.EnvironmentIds = v - return s -} - -type DescribeEnvironmentsOutput struct { - _ struct{} `type:"structure"` - - // Information about the environments that are returned. - Environments []*Environment `locationName:"environments" type:"list"` -} - -// String returns the string representation -func (s DescribeEnvironmentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentsOutput) GoString() string { - return s.String() -} - -// SetEnvironments sets the Environments field's value. -func (s *DescribeEnvironmentsOutput) SetEnvironments(v []*Environment) *DescribeEnvironmentsOutput { - s.Environments = v - return s -} - -// Information about an AWS Cloud9 development environment. -type Environment struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the environment. - Arn *string `locationName:"arn" type:"string"` - - // The description for the environment. - Description *string `locationName:"description" type:"string"` - - // The ID of the environment. - Id *string `locationName:"id" type:"string"` - - // The name of the environment. - Name *string `locationName:"name" min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the environment owner. - OwnerArn *string `locationName:"ownerArn" type:"string"` - - // The type of environment. Valid values include the following: - // - // * ec2: An Amazon Elastic Compute Cloud (Amazon EC2) instance connects - // to the environment. - // - // * ssh: Your own server connects to the environment. - Type *string `locationName:"type" type:"string" enum:"EnvironmentType"` -} - -// String returns the string representation -func (s Environment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Environment) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Environment) SetArn(v string) *Environment { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Environment) SetDescription(v string) *Environment { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *Environment) SetId(v string) *Environment { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *Environment) SetName(v string) *Environment { - s.Name = &v - return s -} - -// SetOwnerArn sets the OwnerArn field's value. -func (s *Environment) SetOwnerArn(v string) *Environment { - s.OwnerArn = &v - return s -} - -// SetType sets the Type field's value. -func (s *Environment) SetType(v string) *Environment { - s.Type = &v - return s -} - -// Information about an environment member for an AWS Cloud9 development environment. -type EnvironmentMember struct { - _ struct{} `type:"structure"` - - // The ID of the environment for the environment member. - EnvironmentId *string `locationName:"environmentId" type:"string"` - - // The time, expressed in epoch time format, when the environment member last - // opened the environment. - LastAccess *time.Time `locationName:"lastAccess" type:"timestamp"` - - // The type of environment member permissions associated with this environment - // member. Available values include: - // - // * owner: Owns the environment. - // - // * read-only: Has read-only access to the environment. - // - // * read-write: Has read-write access to the environment. - Permissions *string `locationName:"permissions" type:"string" enum:"Permissions"` - - // The Amazon Resource Name (ARN) of the environment member. - UserArn *string `locationName:"userArn" type:"string"` - - // The user ID in AWS Identity and Access Management (AWS IAM) of the environment - // member. - UserId *string `locationName:"userId" type:"string"` -} - -// String returns the string representation -func (s EnvironmentMember) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentMember) GoString() string { - return s.String() -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *EnvironmentMember) SetEnvironmentId(v string) *EnvironmentMember { - s.EnvironmentId = &v - return s -} - -// SetLastAccess sets the LastAccess field's value. -func (s *EnvironmentMember) SetLastAccess(v time.Time) *EnvironmentMember { - s.LastAccess = &v - return s -} - -// SetPermissions sets the Permissions field's value. -func (s *EnvironmentMember) SetPermissions(v string) *EnvironmentMember { - s.Permissions = &v - return s -} - -// SetUserArn sets the UserArn field's value. -func (s *EnvironmentMember) SetUserArn(v string) *EnvironmentMember { - s.UserArn = &v - return s -} - -// SetUserId sets the UserId field's value. -func (s *EnvironmentMember) SetUserId(v string) *EnvironmentMember { - s.UserId = &v - return s -} - -type ListEnvironmentsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of environments to get identifiers for. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // During a previous call, if there are more than 25 items in the list, only - // the first 25 items are returned, along with a unique string called a next - // token. To get the next batch of items in the list, call this operation again, - // adding the next token to the call. To get all of the items in the list, keep - // calling this operation with each subsequent next token that is returned, - // until no more next tokens are returned. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListEnvironmentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEnvironmentsInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListEnvironmentsInput) SetMaxResults(v int64) *ListEnvironmentsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEnvironmentsInput) SetNextToken(v string) *ListEnvironmentsInput { - s.NextToken = &v - return s -} - -type ListEnvironmentsOutput struct { - _ struct{} `type:"structure"` - - // The list of environment identifiers. - EnvironmentIds []*string `locationName:"environmentIds" type:"list"` - - // If there are more than 25 items in the list, only the first 25 items are - // returned, along with a unique string called a next token. To get the next - // batch of items in the list, call this operation again, adding the next token - // to the call. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListEnvironmentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEnvironmentsOutput) GoString() string { - return s.String() -} - -// SetEnvironmentIds sets the EnvironmentIds field's value. -func (s *ListEnvironmentsOutput) SetEnvironmentIds(v []*string) *ListEnvironmentsOutput { - s.EnvironmentIds = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEnvironmentsOutput) SetNextToken(v string) *ListEnvironmentsOutput { - s.NextToken = &v - return s -} - -type UpdateEnvironmentInput struct { - _ struct{} `type:"structure"` - - // Any new or replacement description for the environment. - Description *string `locationName:"description" type:"string"` - - // The ID of the environment to change settings. - // - // EnvironmentId is a required field - EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"` - - // A replacement name for the environment. - Name *string `locationName:"name" min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateEnvironmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEnvironmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateEnvironmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateEnvironmentInput"} - if s.EnvironmentId == nil { - invalidParams.Add(request.NewErrParamRequired("EnvironmentId")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateEnvironmentInput) SetDescription(v string) *UpdateEnvironmentInput { - s.Description = &v - return s -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *UpdateEnvironmentInput) SetEnvironmentId(v string) *UpdateEnvironmentInput { - s.EnvironmentId = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateEnvironmentInput) SetName(v string) *UpdateEnvironmentInput { - s.Name = &v - return s -} - -type UpdateEnvironmentMembershipInput struct { - _ struct{} `type:"structure"` - - // The ID of the environment for the environment member whose settings you want - // to change. - // - // EnvironmentId is a required field - EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"` - - // The replacement type of environment member permissions you want to associate - // with this environment member. Available values include: - // - // * read-only: Has read-only access to the environment. - // - // * read-write: Has read-write access to the environment. - // - // Permissions is a required field - Permissions *string `locationName:"permissions" type:"string" required:"true" enum:"MemberPermissions"` - - // The Amazon Resource Name (ARN) of the environment member whose settings you - // want to change. - // - // UserArn is a required field - UserArn *string `locationName:"userArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateEnvironmentMembershipInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEnvironmentMembershipInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateEnvironmentMembershipInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateEnvironmentMembershipInput"} - if s.EnvironmentId == nil { - invalidParams.Add(request.NewErrParamRequired("EnvironmentId")) - } - if s.Permissions == nil { - invalidParams.Add(request.NewErrParamRequired("Permissions")) - } - if s.UserArn == nil { - invalidParams.Add(request.NewErrParamRequired("UserArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *UpdateEnvironmentMembershipInput) SetEnvironmentId(v string) *UpdateEnvironmentMembershipInput { - s.EnvironmentId = &v - return s -} - -// SetPermissions sets the Permissions field's value. -func (s *UpdateEnvironmentMembershipInput) SetPermissions(v string) *UpdateEnvironmentMembershipInput { - s.Permissions = &v - return s -} - -// SetUserArn sets the UserArn field's value. -func (s *UpdateEnvironmentMembershipInput) SetUserArn(v string) *UpdateEnvironmentMembershipInput { - s.UserArn = &v - return s -} - -type UpdateEnvironmentMembershipOutput struct { - _ struct{} `type:"structure"` - - // Information about the environment member whose settings were changed. - Membership *EnvironmentMember `locationName:"membership" type:"structure"` -} - -// String returns the string representation -func (s UpdateEnvironmentMembershipOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEnvironmentMembershipOutput) GoString() string { - return s.String() -} - -// SetMembership sets the Membership field's value. -func (s *UpdateEnvironmentMembershipOutput) SetMembership(v *EnvironmentMember) *UpdateEnvironmentMembershipOutput { - s.Membership = v - return s -} - -type UpdateEnvironmentOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateEnvironmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEnvironmentOutput) GoString() string { - return s.String() -} - -const ( - // EnvironmentStatusError is a EnvironmentStatus enum value - EnvironmentStatusError = "error" - - // EnvironmentStatusCreating is a EnvironmentStatus enum value - EnvironmentStatusCreating = "creating" - - // EnvironmentStatusConnecting is a EnvironmentStatus enum value - EnvironmentStatusConnecting = "connecting" - - // EnvironmentStatusReady is a EnvironmentStatus enum value - EnvironmentStatusReady = "ready" - - // EnvironmentStatusStopping is a EnvironmentStatus enum value - EnvironmentStatusStopping = "stopping" - - // EnvironmentStatusStopped is a EnvironmentStatus enum value - EnvironmentStatusStopped = "stopped" - - // EnvironmentStatusDeleting is a EnvironmentStatus enum value - EnvironmentStatusDeleting = "deleting" -) - -const ( - // EnvironmentTypeSsh is a EnvironmentType enum value - EnvironmentTypeSsh = "ssh" - - // EnvironmentTypeEc2 is a EnvironmentType enum value - EnvironmentTypeEc2 = "ec2" -) - -const ( - // MemberPermissionsReadWrite is a MemberPermissions enum value - MemberPermissionsReadWrite = "read-write" - - // MemberPermissionsReadOnly is a MemberPermissions enum value - MemberPermissionsReadOnly = "read-only" -) - -const ( - // PermissionsOwner is a Permissions enum value - PermissionsOwner = "owner" - - // PermissionsReadWrite is a Permissions enum value - PermissionsReadWrite = "read-write" - - // PermissionsReadOnly is a Permissions enum value - PermissionsReadOnly = "read-only" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloud9/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloud9/doc.go deleted file mode 100644 index c20c565e2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloud9/doc.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package cloud9 provides the client and types for making API -// requests to AWS Cloud9. -// -// AWS Cloud9 is a collection of tools that you can use to code, build, run, -// test, debug, and release software in the cloud. -// -// For more information about AWS Cloud9, see the AWS Cloud9 User Guide (https://docs.aws.amazon.com/cloud9/latest/user-guide). -// -// AWS Cloud9 supports these operations: -// -// * CreateEnvironmentEC2: Creates an AWS Cloud9 development environment, -// launches an Amazon EC2 instance, and then connects from the instance to -// the environment. -// -// * CreateEnvironmentMembership: Adds an environment member to an environment. -// -// * DeleteEnvironment: Deletes an environment. If an Amazon EC2 instance -// is connected to the environment, also terminates the instance. -// -// * DeleteEnvironmentMembership: Deletes an environment member from an environment. -// -// * DescribeEnvironmentMemberships: Gets information about environment members -// for an environment. -// -// * DescribeEnvironments: Gets information about environments. -// -// * DescribeEnvironmentStatus: Gets status information for an environment. -// -// * ListEnvironments: Gets a list of environment identifiers. -// -// * UpdateEnvironment: Changes the settings of an existing environment. -// -// * UpdateEnvironmentMembership: Changes the settings of an existing environment -// member for an environment. -// -// See https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23 for more information on this service. -// -// See cloud9 package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloud9/ -// -// Using the Client -// -// To contact AWS Cloud9 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 Cloud9 client Cloud9 for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloud9/#New -package cloud9 diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloud9/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloud9/errors.go deleted file mode 100644 index b5369ad46..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloud9/errors.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloud9 - -const ( - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - // - // The target request is invalid. - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeConflictException for service response error code - // "ConflictException". - // - // A conflict occurred. - ErrCodeConflictException = "ConflictException" - - // ErrCodeForbiddenException for service response error code - // "ForbiddenException". - // - // An access permissions issue occurred. - ErrCodeForbiddenException = "ForbiddenException" - - // ErrCodeInternalServerErrorException for service response error code - // "InternalServerErrorException". - // - // An internal server error occurred. - ErrCodeInternalServerErrorException = "InternalServerErrorException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // A service limit was exceeded. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // The target resource cannot be found. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // Too many service requests were made over the given time period. - ErrCodeTooManyRequestsException = "TooManyRequestsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloud9/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloud9/service.go deleted file mode 100644 index 8b9d30d54..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloud9/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloud9 - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// Cloud9 provides the API operation methods for making requests to -// AWS Cloud9. See this package's package overview docs -// for details on the service. -// -// Cloud9 methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Cloud9 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 = "cloud9" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Cloud9" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Cloud9 client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Cloud9 client from just a session. -// svc := cloud9.New(mySession) -// -// // Create a Cloud9 client with additional configuration -// svc := cloud9.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Cloud9 { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Cloud9 { - svc := &Cloud9{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-09-23", - JSONVersion: "1.1", - TargetPrefix: "AWSCloud9WorkspaceManagementService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Cloud9 operation and runs any -// custom request initialization. -func (c *Cloud9) 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/cloudformation/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go deleted file mode 100644 index b033dc8c5..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go +++ /dev/null @@ -1,13731 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudformation - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/query" -) - -const opCancelUpdateStack = "CancelUpdateStack" - -// CancelUpdateStackRequest generates a "aws/request.Request" representing the -// client's request for the CancelUpdateStack operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelUpdateStack for more information on using the CancelUpdateStack -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelUpdateStackRequest method. -// req, resp := client.CancelUpdateStackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CancelUpdateStack -func (c *CloudFormation) CancelUpdateStackRequest(input *CancelUpdateStackInput) (req *request.Request, output *CancelUpdateStackOutput) { - op := &request.Operation{ - Name: opCancelUpdateStack, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelUpdateStackInput{} - } - - output = &CancelUpdateStackOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CancelUpdateStack API operation for AWS CloudFormation. -// -// Cancels an update on the specified stack. If the call completes successfully, -// the stack rolls back the update and reverts to the previous stack configuration. -// -// You can cancel only stacks that are in the UPDATE_IN_PROGRESS state. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation CancelUpdateStack for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTokenAlreadyExistsException "TokenAlreadyExistsException" -// A client request token already exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CancelUpdateStack -func (c *CloudFormation) CancelUpdateStack(input *CancelUpdateStackInput) (*CancelUpdateStackOutput, error) { - req, out := c.CancelUpdateStackRequest(input) - return out, req.Send() -} - -// CancelUpdateStackWithContext is the same as CancelUpdateStack with the addition of -// the ability to pass a context and additional request options. -// -// See CancelUpdateStack for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) CancelUpdateStackWithContext(ctx aws.Context, input *CancelUpdateStackInput, opts ...request.Option) (*CancelUpdateStackOutput, error) { - req, out := c.CancelUpdateStackRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opContinueUpdateRollback = "ContinueUpdateRollback" - -// ContinueUpdateRollbackRequest generates a "aws/request.Request" representing the -// client's request for the ContinueUpdateRollback operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ContinueUpdateRollback for more information on using the ContinueUpdateRollback -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ContinueUpdateRollbackRequest method. -// req, resp := client.ContinueUpdateRollbackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ContinueUpdateRollback -func (c *CloudFormation) ContinueUpdateRollbackRequest(input *ContinueUpdateRollbackInput) (req *request.Request, output *ContinueUpdateRollbackOutput) { - op := &request.Operation{ - Name: opContinueUpdateRollback, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ContinueUpdateRollbackInput{} - } - - output = &ContinueUpdateRollbackOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ContinueUpdateRollback API operation for AWS CloudFormation. -// -// For a specified stack that is in the UPDATE_ROLLBACK_FAILED state, continues -// rolling it back to the UPDATE_ROLLBACK_COMPLETE state. Depending on the cause -// of the failure, you can manually fix the error (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/troubleshooting.html#troubleshooting-errors-update-rollback-failed) -// and continue the rollback. By continuing the rollback, you can return your -// stack to a working state (the UPDATE_ROLLBACK_COMPLETE state), and then try -// to update the stack again. -// -// A stack goes into the UPDATE_ROLLBACK_FAILED state when AWS CloudFormation -// cannot roll back all changes after a failed stack update. For example, you -// might have a stack that is rolling back to an old database instance that -// was deleted outside of AWS CloudFormation. Because AWS CloudFormation doesn't -// know the database was deleted, it assumes that the database instance still -// exists and attempts to roll back to it, causing the update rollback to fail. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation ContinueUpdateRollback for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTokenAlreadyExistsException "TokenAlreadyExistsException" -// A client request token already exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ContinueUpdateRollback -func (c *CloudFormation) ContinueUpdateRollback(input *ContinueUpdateRollbackInput) (*ContinueUpdateRollbackOutput, error) { - req, out := c.ContinueUpdateRollbackRequest(input) - return out, req.Send() -} - -// ContinueUpdateRollbackWithContext is the same as ContinueUpdateRollback with the addition of -// the ability to pass a context and additional request options. -// -// See ContinueUpdateRollback for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ContinueUpdateRollbackWithContext(ctx aws.Context, input *ContinueUpdateRollbackInput, opts ...request.Option) (*ContinueUpdateRollbackOutput, error) { - req, out := c.ContinueUpdateRollbackRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateChangeSet = "CreateChangeSet" - -// CreateChangeSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateChangeSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateChangeSet for more information on using the CreateChangeSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateChangeSetRequest method. -// req, resp := client.CreateChangeSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet -func (c *CloudFormation) CreateChangeSetRequest(input *CreateChangeSetInput) (req *request.Request, output *CreateChangeSetOutput) { - op := &request.Operation{ - Name: opCreateChangeSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateChangeSetInput{} - } - - output = &CreateChangeSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateChangeSet API operation for AWS CloudFormation. -// -// Creates a list of changes that will be applied to a stack so that you can -// review the changes before executing them. You can create a change set for -// a stack that doesn't exist or an existing stack. If you create a change set -// for a stack that doesn't exist, the change set shows all of the resources -// that AWS CloudFormation will create. If you create a change set for an existing -// stack, AWS CloudFormation compares the stack's information with the information -// that you submit in the change set and lists the differences. Use change sets -// to understand which resources AWS CloudFormation will create or change, and -// how it will change resources in an existing stack, before you create or update -// a stack. -// -// To create a change set for a stack that doesn't exist, for the ChangeSetType -// parameter, specify CREATE. To create a change set for an existing stack, -// specify UPDATE for the ChangeSetType parameter. After the CreateChangeSet -// call successfully completes, AWS CloudFormation starts creating the change -// set. To check the status of the change set or to review it, use the DescribeChangeSet -// action. -// -// When you are satisfied with the changes the change set will make, execute -// the change set by using the ExecuteChangeSet action. AWS CloudFormation doesn't -// make changes until you execute the change set. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation CreateChangeSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// The resource with the name requested already exists. -// -// * ErrCodeInsufficientCapabilitiesException "InsufficientCapabilitiesException" -// The template contains resources with capabilities that weren't specified -// in the Capabilities parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The quota for the resource has already been reached. -// -// For information on stack set limitations, see Limitations of StackSets (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-limitations.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet -func (c *CloudFormation) CreateChangeSet(input *CreateChangeSetInput) (*CreateChangeSetOutput, error) { - req, out := c.CreateChangeSetRequest(input) - return out, req.Send() -} - -// CreateChangeSetWithContext is the same as CreateChangeSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateChangeSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) CreateChangeSetWithContext(ctx aws.Context, input *CreateChangeSetInput, opts ...request.Option) (*CreateChangeSetOutput, error) { - req, out := c.CreateChangeSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStack = "CreateStack" - -// CreateStackRequest generates a "aws/request.Request" representing the -// client's request for the CreateStack operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateStack for more information on using the CreateStack -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateStackRequest method. -// req, resp := client.CreateStackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateStack -func (c *CloudFormation) CreateStackRequest(input *CreateStackInput) (req *request.Request, output *CreateStackOutput) { - op := &request.Operation{ - Name: opCreateStack, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateStackInput{} - } - - output = &CreateStackOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateStack API operation for AWS CloudFormation. -// -// Creates a stack as specified in the template. After the call completes successfully, -// the stack creation starts. You can check the status of the stack via the -// DescribeStacks API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation CreateStack for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// The quota for the resource has already been reached. -// -// For information on stack set limitations, see Limitations of StackSets (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-limitations.html). -// -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// The resource with the name requested already exists. -// -// * ErrCodeTokenAlreadyExistsException "TokenAlreadyExistsException" -// A client request token already exists. -// -// * ErrCodeInsufficientCapabilitiesException "InsufficientCapabilitiesException" -// The template contains resources with capabilities that weren't specified -// in the Capabilities parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateStack -func (c *CloudFormation) CreateStack(input *CreateStackInput) (*CreateStackOutput, error) { - req, out := c.CreateStackRequest(input) - return out, req.Send() -} - -// CreateStackWithContext is the same as CreateStack with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStack for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) CreateStackWithContext(ctx aws.Context, input *CreateStackInput, opts ...request.Option) (*CreateStackOutput, error) { - req, out := c.CreateStackRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStackInstances = "CreateStackInstances" - -// CreateStackInstancesRequest generates a "aws/request.Request" representing the -// client's request for the CreateStackInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateStackInstances for more information on using the CreateStackInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateStackInstancesRequest method. -// req, resp := client.CreateStackInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateStackInstances -func (c *CloudFormation) CreateStackInstancesRequest(input *CreateStackInstancesInput) (req *request.Request, output *CreateStackInstancesOutput) { - op := &request.Operation{ - Name: opCreateStackInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateStackInstancesInput{} - } - - output = &CreateStackInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateStackInstances API operation for AWS CloudFormation. -// -// Creates stack instances for the specified accounts, within the specified -// regions. A stack instance refers to a stack in a specific account and region. -// Accounts and Regions are required parameters—you must specify at least one -// account and one region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation CreateStackInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStackSetNotFoundException "StackSetNotFoundException" -// The specified stack set doesn't exist. -// -// * ErrCodeOperationInProgressException "OperationInProgressException" -// Another operation is currently in progress for this stack set. Only one operation -// can be performed for a stack set at a given time. -// -// * ErrCodeOperationIdAlreadyExistsException "OperationIdAlreadyExistsException" -// The specified operation ID already exists. -// -// * ErrCodeStaleRequestException "StaleRequestException" -// Another operation has been performed on this stack set since the specified -// operation was performed. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The specified operation isn't valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The quota for the resource has already been reached. -// -// For information on stack set limitations, see Limitations of StackSets (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-limitations.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateStackInstances -func (c *CloudFormation) CreateStackInstances(input *CreateStackInstancesInput) (*CreateStackInstancesOutput, error) { - req, out := c.CreateStackInstancesRequest(input) - return out, req.Send() -} - -// CreateStackInstancesWithContext is the same as CreateStackInstances with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStackInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) CreateStackInstancesWithContext(ctx aws.Context, input *CreateStackInstancesInput, opts ...request.Option) (*CreateStackInstancesOutput, error) { - req, out := c.CreateStackInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStackSet = "CreateStackSet" - -// CreateStackSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateStackSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateStackSet for more information on using the CreateStackSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateStackSetRequest method. -// req, resp := client.CreateStackSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateStackSet -func (c *CloudFormation) CreateStackSetRequest(input *CreateStackSetInput) (req *request.Request, output *CreateStackSetOutput) { - op := &request.Operation{ - Name: opCreateStackSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateStackSetInput{} - } - - output = &CreateStackSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateStackSet API operation for AWS CloudFormation. -// -// Creates a stack set. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation CreateStackSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNameAlreadyExistsException "NameAlreadyExistsException" -// The specified name is already in use. -// -// * ErrCodeCreatedButModifiedException "CreatedButModifiedException" -// The specified resource exists, but has been changed. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The quota for the resource has already been reached. -// -// For information on stack set limitations, see Limitations of StackSets (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-limitations.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateStackSet -func (c *CloudFormation) CreateStackSet(input *CreateStackSetInput) (*CreateStackSetOutput, error) { - req, out := c.CreateStackSetRequest(input) - return out, req.Send() -} - -// CreateStackSetWithContext is the same as CreateStackSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStackSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) CreateStackSetWithContext(ctx aws.Context, input *CreateStackSetInput, opts ...request.Option) (*CreateStackSetOutput, error) { - req, out := c.CreateStackSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteChangeSet = "DeleteChangeSet" - -// DeleteChangeSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteChangeSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteChangeSet for more information on using the DeleteChangeSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteChangeSetRequest method. -// req, resp := client.DeleteChangeSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DeleteChangeSet -func (c *CloudFormation) DeleteChangeSetRequest(input *DeleteChangeSetInput) (req *request.Request, output *DeleteChangeSetOutput) { - op := &request.Operation{ - Name: opDeleteChangeSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteChangeSetInput{} - } - - output = &DeleteChangeSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteChangeSet API operation for AWS CloudFormation. -// -// Deletes the specified change set. Deleting change sets ensures that no one -// executes the wrong change set. -// -// If the call successfully completes, AWS CloudFormation successfully deleted -// the change set. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DeleteChangeSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidChangeSetStatusException "InvalidChangeSetStatus" -// The specified change set can't be used to update the stack. For example, -// the change set status might be CREATE_IN_PROGRESS, or the stack status might -// be UPDATE_IN_PROGRESS. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DeleteChangeSet -func (c *CloudFormation) DeleteChangeSet(input *DeleteChangeSetInput) (*DeleteChangeSetOutput, error) { - req, out := c.DeleteChangeSetRequest(input) - return out, req.Send() -} - -// DeleteChangeSetWithContext is the same as DeleteChangeSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteChangeSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DeleteChangeSetWithContext(ctx aws.Context, input *DeleteChangeSetInput, opts ...request.Option) (*DeleteChangeSetOutput, error) { - req, out := c.DeleteChangeSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteStack = "DeleteStack" - -// DeleteStackRequest generates a "aws/request.Request" representing the -// client's request for the DeleteStack operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteStack for more information on using the DeleteStack -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteStackRequest method. -// req, resp := client.DeleteStackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DeleteStack -func (c *CloudFormation) DeleteStackRequest(input *DeleteStackInput) (req *request.Request, output *DeleteStackOutput) { - op := &request.Operation{ - Name: opDeleteStack, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteStackInput{} - } - - output = &DeleteStackOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteStack API operation for AWS CloudFormation. -// -// Deletes a specified stack. Once the call completes successfully, stack deletion -// starts. Deleted stacks do not show up in the DescribeStacks API if the deletion -// has been completed successfully. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DeleteStack for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTokenAlreadyExistsException "TokenAlreadyExistsException" -// A client request token already exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DeleteStack -func (c *CloudFormation) DeleteStack(input *DeleteStackInput) (*DeleteStackOutput, error) { - req, out := c.DeleteStackRequest(input) - return out, req.Send() -} - -// DeleteStackWithContext is the same as DeleteStack with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteStack for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DeleteStackWithContext(ctx aws.Context, input *DeleteStackInput, opts ...request.Option) (*DeleteStackOutput, error) { - req, out := c.DeleteStackRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteStackInstances = "DeleteStackInstances" - -// DeleteStackInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DeleteStackInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteStackInstances for more information on using the DeleteStackInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteStackInstancesRequest method. -// req, resp := client.DeleteStackInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DeleteStackInstances -func (c *CloudFormation) DeleteStackInstancesRequest(input *DeleteStackInstancesInput) (req *request.Request, output *DeleteStackInstancesOutput) { - op := &request.Operation{ - Name: opDeleteStackInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteStackInstancesInput{} - } - - output = &DeleteStackInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteStackInstances API operation for AWS CloudFormation. -// -// Deletes stack instances for the specified accounts, in the specified regions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DeleteStackInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStackSetNotFoundException "StackSetNotFoundException" -// The specified stack set doesn't exist. -// -// * ErrCodeOperationInProgressException "OperationInProgressException" -// Another operation is currently in progress for this stack set. Only one operation -// can be performed for a stack set at a given time. -// -// * ErrCodeOperationIdAlreadyExistsException "OperationIdAlreadyExistsException" -// The specified operation ID already exists. -// -// * ErrCodeStaleRequestException "StaleRequestException" -// Another operation has been performed on this stack set since the specified -// operation was performed. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The specified operation isn't valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DeleteStackInstances -func (c *CloudFormation) DeleteStackInstances(input *DeleteStackInstancesInput) (*DeleteStackInstancesOutput, error) { - req, out := c.DeleteStackInstancesRequest(input) - return out, req.Send() -} - -// DeleteStackInstancesWithContext is the same as DeleteStackInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteStackInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DeleteStackInstancesWithContext(ctx aws.Context, input *DeleteStackInstancesInput, opts ...request.Option) (*DeleteStackInstancesOutput, error) { - req, out := c.DeleteStackInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteStackSet = "DeleteStackSet" - -// DeleteStackSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteStackSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteStackSet for more information on using the DeleteStackSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteStackSetRequest method. -// req, resp := client.DeleteStackSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DeleteStackSet -func (c *CloudFormation) DeleteStackSetRequest(input *DeleteStackSetInput) (req *request.Request, output *DeleteStackSetOutput) { - op := &request.Operation{ - Name: opDeleteStackSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteStackSetInput{} - } - - output = &DeleteStackSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteStackSet API operation for AWS CloudFormation. -// -// Deletes a stack set. Before you can delete a stack set, all of its member -// stack instances must be deleted. For more information about how to do this, -// see DeleteStackInstances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DeleteStackSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStackSetNotEmptyException "StackSetNotEmptyException" -// You can't yet delete this stack set, because it still contains one or more -// stack instances. Delete all stack instances from the stack set before deleting -// the stack set. -// -// * ErrCodeOperationInProgressException "OperationInProgressException" -// Another operation is currently in progress for this stack set. Only one operation -// can be performed for a stack set at a given time. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DeleteStackSet -func (c *CloudFormation) DeleteStackSet(input *DeleteStackSetInput) (*DeleteStackSetOutput, error) { - req, out := c.DeleteStackSetRequest(input) - return out, req.Send() -} - -// DeleteStackSetWithContext is the same as DeleteStackSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteStackSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DeleteStackSetWithContext(ctx aws.Context, input *DeleteStackSetInput, opts ...request.Option) (*DeleteStackSetOutput, error) { - req, out := c.DeleteStackSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccountLimits = "DescribeAccountLimits" - -// DescribeAccountLimitsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountLimits operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccountLimits for more information on using the DescribeAccountLimits -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAccountLimitsRequest method. -// req, resp := client.DescribeAccountLimitsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeAccountLimits -func (c *CloudFormation) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) (req *request.Request, output *DescribeAccountLimitsOutput) { - op := &request.Operation{ - Name: opDescribeAccountLimits, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAccountLimitsInput{} - } - - output = &DescribeAccountLimitsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccountLimits API operation for AWS CloudFormation. -// -// Retrieves your account's AWS CloudFormation limits, such as the maximum number -// of stacks that you can create in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DescribeAccountLimits for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeAccountLimits -func (c *CloudFormation) DescribeAccountLimits(input *DescribeAccountLimitsInput) (*DescribeAccountLimitsOutput, error) { - req, out := c.DescribeAccountLimitsRequest(input) - return out, req.Send() -} - -// DescribeAccountLimitsWithContext is the same as DescribeAccountLimits with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountLimits for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DescribeAccountLimitsWithContext(ctx aws.Context, input *DescribeAccountLimitsInput, opts ...request.Option) (*DescribeAccountLimitsOutput, error) { - req, out := c.DescribeAccountLimitsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeChangeSet = "DescribeChangeSet" - -// DescribeChangeSetRequest generates a "aws/request.Request" representing the -// client's request for the DescribeChangeSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeChangeSet for more information on using the DescribeChangeSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeChangeSetRequest method. -// req, resp := client.DescribeChangeSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeChangeSet -func (c *CloudFormation) DescribeChangeSetRequest(input *DescribeChangeSetInput) (req *request.Request, output *DescribeChangeSetOutput) { - op := &request.Operation{ - Name: opDescribeChangeSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeChangeSetInput{} - } - - output = &DescribeChangeSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeChangeSet API operation for AWS CloudFormation. -// -// Returns the inputs for the change set and a list of changes that AWS CloudFormation -// will make if you execute the change set. For more information, see Updating -// Stacks Using Change Sets (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-changesets.html) -// in the AWS CloudFormation User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DescribeChangeSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeChangeSetNotFoundException "ChangeSetNotFound" -// The specified change set name or ID doesn't exit. To view valid change sets -// for a stack, use the ListChangeSets action. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeChangeSet -func (c *CloudFormation) DescribeChangeSet(input *DescribeChangeSetInput) (*DescribeChangeSetOutput, error) { - req, out := c.DescribeChangeSetRequest(input) - return out, req.Send() -} - -// DescribeChangeSetWithContext is the same as DescribeChangeSet with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeChangeSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DescribeChangeSetWithContext(ctx aws.Context, input *DescribeChangeSetInput, opts ...request.Option) (*DescribeChangeSetOutput, error) { - req, out := c.DescribeChangeSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStackDriftDetectionStatus = "DescribeStackDriftDetectionStatus" - -// DescribeStackDriftDetectionStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStackDriftDetectionStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStackDriftDetectionStatus for more information on using the DescribeStackDriftDetectionStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStackDriftDetectionStatusRequest method. -// req, resp := client.DescribeStackDriftDetectionStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackDriftDetectionStatus -func (c *CloudFormation) DescribeStackDriftDetectionStatusRequest(input *DescribeStackDriftDetectionStatusInput) (req *request.Request, output *DescribeStackDriftDetectionStatusOutput) { - op := &request.Operation{ - Name: opDescribeStackDriftDetectionStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStackDriftDetectionStatusInput{} - } - - output = &DescribeStackDriftDetectionStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStackDriftDetectionStatus API operation for AWS CloudFormation. -// -// Returns information about a stack drift detection operation. A stack drift -// detection operation detects whether a stack's actual configuration differs, -// or has drifted, from it's expected configuration, as defined in the stack -// template and any values specified as template parameters. A stack is considered -// to have drifted if one or more of its resources have drifted. For more information -// on stack and resource drift, see Detecting Unregulated Configuration Changes -// to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). -// -// Use DetectStackDrift to initiate a stack drift detection operation. DetectStackDrift -// returns a StackDriftDetectionId you can use to monitor the progress of the -// operation using DescribeStackDriftDetectionStatus. Once the drift detection -// operation has completed, use DescribeStackResourceDrifts to return drift -// information about the stack and its resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DescribeStackDriftDetectionStatus for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackDriftDetectionStatus -func (c *CloudFormation) DescribeStackDriftDetectionStatus(input *DescribeStackDriftDetectionStatusInput) (*DescribeStackDriftDetectionStatusOutput, error) { - req, out := c.DescribeStackDriftDetectionStatusRequest(input) - return out, req.Send() -} - -// DescribeStackDriftDetectionStatusWithContext is the same as DescribeStackDriftDetectionStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStackDriftDetectionStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DescribeStackDriftDetectionStatusWithContext(ctx aws.Context, input *DescribeStackDriftDetectionStatusInput, opts ...request.Option) (*DescribeStackDriftDetectionStatusOutput, error) { - req, out := c.DescribeStackDriftDetectionStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStackEvents = "DescribeStackEvents" - -// DescribeStackEventsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStackEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStackEvents for more information on using the DescribeStackEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStackEventsRequest method. -// req, resp := client.DescribeStackEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackEvents -func (c *CloudFormation) DescribeStackEventsRequest(input *DescribeStackEventsInput) (req *request.Request, output *DescribeStackEventsOutput) { - op := &request.Operation{ - Name: opDescribeStackEvents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeStackEventsInput{} - } - - output = &DescribeStackEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStackEvents API operation for AWS CloudFormation. -// -// Returns all stack related events for a specified stack in reverse chronological -// order. For more information about a stack's event history, go to Stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/concept-stack.html) -// in the AWS CloudFormation User Guide. -// -// You can list events for stacks that have failed to create or have been deleted -// by specifying the unique stack identifier (stack ID). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DescribeStackEvents for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackEvents -func (c *CloudFormation) DescribeStackEvents(input *DescribeStackEventsInput) (*DescribeStackEventsOutput, error) { - req, out := c.DescribeStackEventsRequest(input) - return out, req.Send() -} - -// DescribeStackEventsWithContext is the same as DescribeStackEvents with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStackEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DescribeStackEventsWithContext(ctx aws.Context, input *DescribeStackEventsInput, opts ...request.Option) (*DescribeStackEventsOutput, error) { - req, out := c.DescribeStackEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeStackEventsPages iterates over the pages of a DescribeStackEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeStackEvents 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 DescribeStackEvents operation. -// pageNum := 0 -// err := client.DescribeStackEventsPages(params, -// func(page *DescribeStackEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFormation) DescribeStackEventsPages(input *DescribeStackEventsInput, fn func(*DescribeStackEventsOutput, bool) bool) error { - return c.DescribeStackEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeStackEventsPagesWithContext same as DescribeStackEventsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DescribeStackEventsPagesWithContext(ctx aws.Context, input *DescribeStackEventsInput, fn func(*DescribeStackEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeStackEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeStackEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeStackEventsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeStackInstance = "DescribeStackInstance" - -// DescribeStackInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStackInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStackInstance for more information on using the DescribeStackInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStackInstanceRequest method. -// req, resp := client.DescribeStackInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackInstance -func (c *CloudFormation) DescribeStackInstanceRequest(input *DescribeStackInstanceInput) (req *request.Request, output *DescribeStackInstanceOutput) { - op := &request.Operation{ - Name: opDescribeStackInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStackInstanceInput{} - } - - output = &DescribeStackInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStackInstance API operation for AWS CloudFormation. -// -// Returns the stack instance that's associated with the specified stack set, -// AWS account, and region. -// -// For a list of stack instances that are associated with a specific stack set, -// use ListStackInstances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DescribeStackInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStackSetNotFoundException "StackSetNotFoundException" -// The specified stack set doesn't exist. -// -// * ErrCodeStackInstanceNotFoundException "StackInstanceNotFoundException" -// The specified stack instance doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackInstance -func (c *CloudFormation) DescribeStackInstance(input *DescribeStackInstanceInput) (*DescribeStackInstanceOutput, error) { - req, out := c.DescribeStackInstanceRequest(input) - return out, req.Send() -} - -// DescribeStackInstanceWithContext is the same as DescribeStackInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStackInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DescribeStackInstanceWithContext(ctx aws.Context, input *DescribeStackInstanceInput, opts ...request.Option) (*DescribeStackInstanceOutput, error) { - req, out := c.DescribeStackInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStackResource = "DescribeStackResource" - -// DescribeStackResourceRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStackResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStackResource for more information on using the DescribeStackResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStackResourceRequest method. -// req, resp := client.DescribeStackResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackResource -func (c *CloudFormation) DescribeStackResourceRequest(input *DescribeStackResourceInput) (req *request.Request, output *DescribeStackResourceOutput) { - op := &request.Operation{ - Name: opDescribeStackResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStackResourceInput{} - } - - output = &DescribeStackResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStackResource API operation for AWS CloudFormation. -// -// Returns a description of the specified resource in the specified stack. -// -// For deleted stacks, DescribeStackResource returns resource information for -// up to 90 days after the stack has been deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DescribeStackResource for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackResource -func (c *CloudFormation) DescribeStackResource(input *DescribeStackResourceInput) (*DescribeStackResourceOutput, error) { - req, out := c.DescribeStackResourceRequest(input) - return out, req.Send() -} - -// DescribeStackResourceWithContext is the same as DescribeStackResource with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStackResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DescribeStackResourceWithContext(ctx aws.Context, input *DescribeStackResourceInput, opts ...request.Option) (*DescribeStackResourceOutput, error) { - req, out := c.DescribeStackResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStackResourceDrifts = "DescribeStackResourceDrifts" - -// DescribeStackResourceDriftsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStackResourceDrifts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStackResourceDrifts for more information on using the DescribeStackResourceDrifts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStackResourceDriftsRequest method. -// req, resp := client.DescribeStackResourceDriftsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackResourceDrifts -func (c *CloudFormation) DescribeStackResourceDriftsRequest(input *DescribeStackResourceDriftsInput) (req *request.Request, output *DescribeStackResourceDriftsOutput) { - op := &request.Operation{ - Name: opDescribeStackResourceDrifts, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeStackResourceDriftsInput{} - } - - output = &DescribeStackResourceDriftsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStackResourceDrifts API operation for AWS CloudFormation. -// -// Returns drift information for the resources that have been checked for drift -// in the specified stack. This includes actual and expected configuration values -// for resources where AWS CloudFormation detects configuration drift. -// -// For a given stack, there will be one StackResourceDrift for each stack resource -// that has been checked for drift. Resources that have not yet been checked -// for drift are not included. Resources that do not currently support drift -// detection are not checked, and so not included. For a list of resources that -// support drift detection, see Resources that Support Drift Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). -// -// Use DetectStackResourceDrift to detect drift on individual resources, or -// DetectStackDrift to detect drift on all supported resources for a given stack. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DescribeStackResourceDrifts for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackResourceDrifts -func (c *CloudFormation) DescribeStackResourceDrifts(input *DescribeStackResourceDriftsInput) (*DescribeStackResourceDriftsOutput, error) { - req, out := c.DescribeStackResourceDriftsRequest(input) - return out, req.Send() -} - -// DescribeStackResourceDriftsWithContext is the same as DescribeStackResourceDrifts with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStackResourceDrifts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DescribeStackResourceDriftsWithContext(ctx aws.Context, input *DescribeStackResourceDriftsInput, opts ...request.Option) (*DescribeStackResourceDriftsOutput, error) { - req, out := c.DescribeStackResourceDriftsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeStackResourceDriftsPages iterates over the pages of a DescribeStackResourceDrifts operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeStackResourceDrifts 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 DescribeStackResourceDrifts operation. -// pageNum := 0 -// err := client.DescribeStackResourceDriftsPages(params, -// func(page *DescribeStackResourceDriftsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFormation) DescribeStackResourceDriftsPages(input *DescribeStackResourceDriftsInput, fn func(*DescribeStackResourceDriftsOutput, bool) bool) error { - return c.DescribeStackResourceDriftsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeStackResourceDriftsPagesWithContext same as DescribeStackResourceDriftsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DescribeStackResourceDriftsPagesWithContext(ctx aws.Context, input *DescribeStackResourceDriftsInput, fn func(*DescribeStackResourceDriftsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeStackResourceDriftsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeStackResourceDriftsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeStackResourceDriftsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeStackResources = "DescribeStackResources" - -// DescribeStackResourcesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStackResources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStackResources for more information on using the DescribeStackResources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStackResourcesRequest method. -// req, resp := client.DescribeStackResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackResources -func (c *CloudFormation) DescribeStackResourcesRequest(input *DescribeStackResourcesInput) (req *request.Request, output *DescribeStackResourcesOutput) { - op := &request.Operation{ - Name: opDescribeStackResources, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStackResourcesInput{} - } - - output = &DescribeStackResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStackResources API operation for AWS CloudFormation. -// -// Returns AWS resource descriptions for running and deleted stacks. If StackName -// is specified, all the associated resources that are part of the stack are -// returned. If PhysicalResourceId is specified, the associated resources of -// the stack that the resource belongs to are returned. -// -// Only the first 100 resources will be returned. If your stack has more resources -// than this, you should use ListStackResources instead. -// -// For deleted stacks, DescribeStackResources returns resource information for -// up to 90 days after the stack has been deleted. -// -// You must specify either StackName or PhysicalResourceId, but not both. In -// addition, you can specify LogicalResourceId to filter the returned result. -// For more information about resources, the LogicalResourceId and PhysicalResourceId, -// go to the AWS CloudFormation User Guide (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/). -// -// A ValidationError is returned if you specify both StackName and PhysicalResourceId -// in the same request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DescribeStackResources for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackResources -func (c *CloudFormation) DescribeStackResources(input *DescribeStackResourcesInput) (*DescribeStackResourcesOutput, error) { - req, out := c.DescribeStackResourcesRequest(input) - return out, req.Send() -} - -// DescribeStackResourcesWithContext is the same as DescribeStackResources with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStackResources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DescribeStackResourcesWithContext(ctx aws.Context, input *DescribeStackResourcesInput, opts ...request.Option) (*DescribeStackResourcesOutput, error) { - req, out := c.DescribeStackResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStackSet = "DescribeStackSet" - -// DescribeStackSetRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStackSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStackSet for more information on using the DescribeStackSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStackSetRequest method. -// req, resp := client.DescribeStackSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackSet -func (c *CloudFormation) DescribeStackSetRequest(input *DescribeStackSetInput) (req *request.Request, output *DescribeStackSetOutput) { - op := &request.Operation{ - Name: opDescribeStackSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStackSetInput{} - } - - output = &DescribeStackSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStackSet API operation for AWS CloudFormation. -// -// Returns the description of the specified stack set. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DescribeStackSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStackSetNotFoundException "StackSetNotFoundException" -// The specified stack set doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackSet -func (c *CloudFormation) DescribeStackSet(input *DescribeStackSetInput) (*DescribeStackSetOutput, error) { - req, out := c.DescribeStackSetRequest(input) - return out, req.Send() -} - -// DescribeStackSetWithContext is the same as DescribeStackSet with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStackSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DescribeStackSetWithContext(ctx aws.Context, input *DescribeStackSetInput, opts ...request.Option) (*DescribeStackSetOutput, error) { - req, out := c.DescribeStackSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStackSetOperation = "DescribeStackSetOperation" - -// DescribeStackSetOperationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStackSetOperation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStackSetOperation for more information on using the DescribeStackSetOperation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStackSetOperationRequest method. -// req, resp := client.DescribeStackSetOperationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackSetOperation -func (c *CloudFormation) DescribeStackSetOperationRequest(input *DescribeStackSetOperationInput) (req *request.Request, output *DescribeStackSetOperationOutput) { - op := &request.Operation{ - Name: opDescribeStackSetOperation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStackSetOperationInput{} - } - - output = &DescribeStackSetOperationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStackSetOperation API operation for AWS CloudFormation. -// -// Returns the description of the specified stack set operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DescribeStackSetOperation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStackSetNotFoundException "StackSetNotFoundException" -// The specified stack set doesn't exist. -// -// * ErrCodeOperationNotFoundException "OperationNotFoundException" -// The specified ID refers to an operation that doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackSetOperation -func (c *CloudFormation) DescribeStackSetOperation(input *DescribeStackSetOperationInput) (*DescribeStackSetOperationOutput, error) { - req, out := c.DescribeStackSetOperationRequest(input) - return out, req.Send() -} - -// DescribeStackSetOperationWithContext is the same as DescribeStackSetOperation with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStackSetOperation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DescribeStackSetOperationWithContext(ctx aws.Context, input *DescribeStackSetOperationInput, opts ...request.Option) (*DescribeStackSetOperationOutput, error) { - req, out := c.DescribeStackSetOperationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStacks = "DescribeStacks" - -// DescribeStacksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStacks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStacks for more information on using the DescribeStacks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStacksRequest method. -// req, resp := client.DescribeStacksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStacks -func (c *CloudFormation) DescribeStacksRequest(input *DescribeStacksInput) (req *request.Request, output *DescribeStacksOutput) { - op := &request.Operation{ - Name: opDescribeStacks, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeStacksInput{} - } - - output = &DescribeStacksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStacks API operation for AWS CloudFormation. -// -// Returns the description for the specified stack; if no stack name was specified, -// then it returns the description for all the stacks created. -// -// If the stack does not exist, an AmazonCloudFormationException is returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DescribeStacks for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStacks -func (c *CloudFormation) DescribeStacks(input *DescribeStacksInput) (*DescribeStacksOutput, error) { - req, out := c.DescribeStacksRequest(input) - return out, req.Send() -} - -// DescribeStacksWithContext is the same as DescribeStacks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStacks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DescribeStacksWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.Option) (*DescribeStacksOutput, error) { - req, out := c.DescribeStacksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeStacksPages iterates over the pages of a DescribeStacks operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeStacks 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 DescribeStacks operation. -// pageNum := 0 -// err := client.DescribeStacksPages(params, -// func(page *DescribeStacksOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFormation) DescribeStacksPages(input *DescribeStacksInput, fn func(*DescribeStacksOutput, bool) bool) error { - return c.DescribeStacksPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeStacksPagesWithContext same as DescribeStacksPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DescribeStacksPagesWithContext(ctx aws.Context, input *DescribeStacksInput, fn func(*DescribeStacksOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeStacksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeStacksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeStacksOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDetectStackDrift = "DetectStackDrift" - -// DetectStackDriftRequest generates a "aws/request.Request" representing the -// client's request for the DetectStackDrift operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetectStackDrift for more information on using the DetectStackDrift -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetectStackDriftRequest method. -// req, resp := client.DetectStackDriftRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DetectStackDrift -func (c *CloudFormation) DetectStackDriftRequest(input *DetectStackDriftInput) (req *request.Request, output *DetectStackDriftOutput) { - op := &request.Operation{ - Name: opDetectStackDrift, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetectStackDriftInput{} - } - - output = &DetectStackDriftOutput{} - req = c.newRequest(op, input, output) - return -} - -// DetectStackDrift API operation for AWS CloudFormation. -// -// Detects whether a stack's actual configuration differs, or has drifted, from -// it's expected configuration, as defined in the stack template and any values -// specified as template parameters. For each resource in the stack that supports -// drift detection, AWS CloudFormation compares the actual configuration of -// the resource with its expected template configuration. Only resource properties -// explicitly defined in the stack template are checked for drift. A stack is -// considered to have drifted if one or more of its resources differ from their -// expected template configurations. For more information, see Detecting Unregulated -// Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). -// -// Use DetectStackDrift to detect drift on all supported resources for a given -// stack, or DetectStackResourceDrift to detect drift on individual resources. -// -// For a list of stack resources that currently support drift detection, see -// Resources that Support Drift Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). -// -// DetectStackDrift can take up to several minutes, depending on the number -// of resources contained within the stack. Use DescribeStackDriftDetectionStatus -// to monitor the progress of a detect stack drift operation. Once the drift -// detection operation has completed, use DescribeStackResourceDrifts to return -// drift information about the stack and its resources. -// -// When detecting drift on a stack, AWS CloudFormation does not detect drift -// on any nested stacks belonging to that stack. Perform DetectStackDrift directly -// on the nested stack itself. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DetectStackDrift for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DetectStackDrift -func (c *CloudFormation) DetectStackDrift(input *DetectStackDriftInput) (*DetectStackDriftOutput, error) { - req, out := c.DetectStackDriftRequest(input) - return out, req.Send() -} - -// DetectStackDriftWithContext is the same as DetectStackDrift with the addition of -// the ability to pass a context and additional request options. -// -// See DetectStackDrift for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DetectStackDriftWithContext(ctx aws.Context, input *DetectStackDriftInput, opts ...request.Option) (*DetectStackDriftOutput, error) { - req, out := c.DetectStackDriftRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetectStackResourceDrift = "DetectStackResourceDrift" - -// DetectStackResourceDriftRequest generates a "aws/request.Request" representing the -// client's request for the DetectStackResourceDrift operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetectStackResourceDrift for more information on using the DetectStackResourceDrift -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetectStackResourceDriftRequest method. -// req, resp := client.DetectStackResourceDriftRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DetectStackResourceDrift -func (c *CloudFormation) DetectStackResourceDriftRequest(input *DetectStackResourceDriftInput) (req *request.Request, output *DetectStackResourceDriftOutput) { - op := &request.Operation{ - Name: opDetectStackResourceDrift, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetectStackResourceDriftInput{} - } - - output = &DetectStackResourceDriftOutput{} - req = c.newRequest(op, input, output) - return -} - -// DetectStackResourceDrift API operation for AWS CloudFormation. -// -// Returns information about whether a resource's actual configuration differs, -// or has drifted, from it's expected configuration, as defined in the stack -// template and any values specified as template parameters. This information -// includes actual and expected property values for resources in which AWS CloudFormation -// detects drift. Only resource properties explicitly defined in the stack template -// are checked for drift. For more information about stack and resource drift, -// see Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). -// -// Use DetectStackResourceDrift to detect drift on individual resources, or -// DetectStackDrift to detect drift on all resources in a given stack that support -// drift detection. -// -// Resources that do not currently support drift detection cannot be checked. -// For a list of resources that support drift detection, see Resources that -// Support Drift Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation DetectStackResourceDrift for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DetectStackResourceDrift -func (c *CloudFormation) DetectStackResourceDrift(input *DetectStackResourceDriftInput) (*DetectStackResourceDriftOutput, error) { - req, out := c.DetectStackResourceDriftRequest(input) - return out, req.Send() -} - -// DetectStackResourceDriftWithContext is the same as DetectStackResourceDrift with the addition of -// the ability to pass a context and additional request options. -// -// See DetectStackResourceDrift for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) DetectStackResourceDriftWithContext(ctx aws.Context, input *DetectStackResourceDriftInput, opts ...request.Option) (*DetectStackResourceDriftOutput, error) { - req, out := c.DetectStackResourceDriftRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEstimateTemplateCost = "EstimateTemplateCost" - -// EstimateTemplateCostRequest generates a "aws/request.Request" representing the -// client's request for the EstimateTemplateCost operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EstimateTemplateCost for more information on using the EstimateTemplateCost -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EstimateTemplateCostRequest method. -// req, resp := client.EstimateTemplateCostRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/EstimateTemplateCost -func (c *CloudFormation) EstimateTemplateCostRequest(input *EstimateTemplateCostInput) (req *request.Request, output *EstimateTemplateCostOutput) { - op := &request.Operation{ - Name: opEstimateTemplateCost, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EstimateTemplateCostInput{} - } - - output = &EstimateTemplateCostOutput{} - req = c.newRequest(op, input, output) - return -} - -// EstimateTemplateCost API operation for AWS CloudFormation. -// -// Returns the estimated monthly cost of a template. The return value is an -// AWS Simple Monthly Calculator URL with a query string that describes the -// resources required to run the template. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation EstimateTemplateCost for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/EstimateTemplateCost -func (c *CloudFormation) EstimateTemplateCost(input *EstimateTemplateCostInput) (*EstimateTemplateCostOutput, error) { - req, out := c.EstimateTemplateCostRequest(input) - return out, req.Send() -} - -// EstimateTemplateCostWithContext is the same as EstimateTemplateCost with the addition of -// the ability to pass a context and additional request options. -// -// See EstimateTemplateCost for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) EstimateTemplateCostWithContext(ctx aws.Context, input *EstimateTemplateCostInput, opts ...request.Option) (*EstimateTemplateCostOutput, error) { - req, out := c.EstimateTemplateCostRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opExecuteChangeSet = "ExecuteChangeSet" - -// ExecuteChangeSetRequest generates a "aws/request.Request" representing the -// client's request for the ExecuteChangeSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ExecuteChangeSet for more information on using the ExecuteChangeSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ExecuteChangeSetRequest method. -// req, resp := client.ExecuteChangeSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ExecuteChangeSet -func (c *CloudFormation) ExecuteChangeSetRequest(input *ExecuteChangeSetInput) (req *request.Request, output *ExecuteChangeSetOutput) { - op := &request.Operation{ - Name: opExecuteChangeSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ExecuteChangeSetInput{} - } - - output = &ExecuteChangeSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ExecuteChangeSet API operation for AWS CloudFormation. -// -// Updates a stack using the input information that was provided when the specified -// change set was created. After the call successfully completes, AWS CloudFormation -// starts updating the stack. Use the DescribeStacks action to view the status -// of the update. -// -// When you execute a change set, AWS CloudFormation deletes all other change -// sets associated with the stack because they aren't valid for the updated -// stack. -// -// If a stack policy is associated with the stack, AWS CloudFormation enforces -// the policy during the update. You can't specify a temporary stack policy -// that overrides the current policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation ExecuteChangeSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidChangeSetStatusException "InvalidChangeSetStatus" -// The specified change set can't be used to update the stack. For example, -// the change set status might be CREATE_IN_PROGRESS, or the stack status might -// be UPDATE_IN_PROGRESS. -// -// * ErrCodeChangeSetNotFoundException "ChangeSetNotFound" -// The specified change set name or ID doesn't exit. To view valid change sets -// for a stack, use the ListChangeSets action. -// -// * ErrCodeInsufficientCapabilitiesException "InsufficientCapabilitiesException" -// The template contains resources with capabilities that weren't specified -// in the Capabilities parameter. -// -// * ErrCodeTokenAlreadyExistsException "TokenAlreadyExistsException" -// A client request token already exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ExecuteChangeSet -func (c *CloudFormation) ExecuteChangeSet(input *ExecuteChangeSetInput) (*ExecuteChangeSetOutput, error) { - req, out := c.ExecuteChangeSetRequest(input) - return out, req.Send() -} - -// ExecuteChangeSetWithContext is the same as ExecuteChangeSet with the addition of -// the ability to pass a context and additional request options. -// -// See ExecuteChangeSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ExecuteChangeSetWithContext(ctx aws.Context, input *ExecuteChangeSetInput, opts ...request.Option) (*ExecuteChangeSetOutput, error) { - req, out := c.ExecuteChangeSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetStackPolicy = "GetStackPolicy" - -// GetStackPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetStackPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetStackPolicy for more information on using the GetStackPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetStackPolicyRequest method. -// req, resp := client.GetStackPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/GetStackPolicy -func (c *CloudFormation) GetStackPolicyRequest(input *GetStackPolicyInput) (req *request.Request, output *GetStackPolicyOutput) { - op := &request.Operation{ - Name: opGetStackPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetStackPolicyInput{} - } - - output = &GetStackPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetStackPolicy API operation for AWS CloudFormation. -// -// Returns the stack policy for a specified stack. If a stack doesn't have a -// policy, a null value is returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation GetStackPolicy for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/GetStackPolicy -func (c *CloudFormation) GetStackPolicy(input *GetStackPolicyInput) (*GetStackPolicyOutput, error) { - req, out := c.GetStackPolicyRequest(input) - return out, req.Send() -} - -// GetStackPolicyWithContext is the same as GetStackPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetStackPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) GetStackPolicyWithContext(ctx aws.Context, input *GetStackPolicyInput, opts ...request.Option) (*GetStackPolicyOutput, error) { - req, out := c.GetStackPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTemplate = "GetTemplate" - -// GetTemplateRequest generates a "aws/request.Request" representing the -// client's request for the GetTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTemplate for more information on using the GetTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTemplateRequest method. -// req, resp := client.GetTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/GetTemplate -func (c *CloudFormation) GetTemplateRequest(input *GetTemplateInput) (req *request.Request, output *GetTemplateOutput) { - op := &request.Operation{ - Name: opGetTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTemplateInput{} - } - - output = &GetTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTemplate API operation for AWS CloudFormation. -// -// Returns the template body for a specified stack. You can get the template -// for running or deleted stacks. -// -// For deleted stacks, GetTemplate returns the template for up to 90 days after -// the stack has been deleted. -// -// If the template does not exist, a ValidationError is returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation GetTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeChangeSetNotFoundException "ChangeSetNotFound" -// The specified change set name or ID doesn't exit. To view valid change sets -// for a stack, use the ListChangeSets action. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/GetTemplate -func (c *CloudFormation) GetTemplate(input *GetTemplateInput) (*GetTemplateOutput, error) { - req, out := c.GetTemplateRequest(input) - return out, req.Send() -} - -// GetTemplateWithContext is the same as GetTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See GetTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) GetTemplateWithContext(ctx aws.Context, input *GetTemplateInput, opts ...request.Option) (*GetTemplateOutput, error) { - req, out := c.GetTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTemplateSummary = "GetTemplateSummary" - -// GetTemplateSummaryRequest generates a "aws/request.Request" representing the -// client's request for the GetTemplateSummary operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTemplateSummary for more information on using the GetTemplateSummary -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTemplateSummaryRequest method. -// req, resp := client.GetTemplateSummaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/GetTemplateSummary -func (c *CloudFormation) GetTemplateSummaryRequest(input *GetTemplateSummaryInput) (req *request.Request, output *GetTemplateSummaryOutput) { - op := &request.Operation{ - Name: opGetTemplateSummary, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTemplateSummaryInput{} - } - - output = &GetTemplateSummaryOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTemplateSummary API operation for AWS CloudFormation. -// -// Returns information about a new or existing template. The GetTemplateSummary -// action is useful for viewing parameter information, such as default parameter -// values and parameter types, before you create or update a stack or stack -// set. -// -// You can use the GetTemplateSummary action when you submit a template, or -// you can get template information for a stack set, or a running or deleted -// stack. -// -// For deleted stacks, GetTemplateSummary returns the template information for -// up to 90 days after the stack has been deleted. If the template does not -// exist, a ValidationError is returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation GetTemplateSummary for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStackSetNotFoundException "StackSetNotFoundException" -// The specified stack set doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/GetTemplateSummary -func (c *CloudFormation) GetTemplateSummary(input *GetTemplateSummaryInput) (*GetTemplateSummaryOutput, error) { - req, out := c.GetTemplateSummaryRequest(input) - return out, req.Send() -} - -// GetTemplateSummaryWithContext is the same as GetTemplateSummary with the addition of -// the ability to pass a context and additional request options. -// -// See GetTemplateSummary for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) GetTemplateSummaryWithContext(ctx aws.Context, input *GetTemplateSummaryInput, opts ...request.Option) (*GetTemplateSummaryOutput, error) { - req, out := c.GetTemplateSummaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListChangeSets = "ListChangeSets" - -// ListChangeSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListChangeSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListChangeSets for more information on using the ListChangeSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListChangeSetsRequest method. -// req, resp := client.ListChangeSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListChangeSets -func (c *CloudFormation) ListChangeSetsRequest(input *ListChangeSetsInput) (req *request.Request, output *ListChangeSetsOutput) { - op := &request.Operation{ - Name: opListChangeSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListChangeSetsInput{} - } - - output = &ListChangeSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListChangeSets API operation for AWS CloudFormation. -// -// Returns the ID and status of each active change set for a stack. For example, -// AWS CloudFormation lists change sets that are in the CREATE_IN_PROGRESS or -// CREATE_PENDING state. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation ListChangeSets for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListChangeSets -func (c *CloudFormation) ListChangeSets(input *ListChangeSetsInput) (*ListChangeSetsOutput, error) { - req, out := c.ListChangeSetsRequest(input) - return out, req.Send() -} - -// ListChangeSetsWithContext is the same as ListChangeSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListChangeSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ListChangeSetsWithContext(ctx aws.Context, input *ListChangeSetsInput, opts ...request.Option) (*ListChangeSetsOutput, error) { - req, out := c.ListChangeSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListExports = "ListExports" - -// ListExportsRequest generates a "aws/request.Request" representing the -// client's request for the ListExports operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListExports for more information on using the ListExports -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListExportsRequest method. -// req, resp := client.ListExportsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListExports -func (c *CloudFormation) ListExportsRequest(input *ListExportsInput) (req *request.Request, output *ListExportsOutput) { - op := &request.Operation{ - Name: opListExports, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListExportsInput{} - } - - output = &ListExportsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListExports API operation for AWS CloudFormation. -// -// Lists all exported output values in the account and region in which you call -// this action. Use this action to see the exported output values that you can -// import into other stacks. To import values, use the Fn::ImportValue (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html) -// function. -// -// For more information, see AWS CloudFormation Export Stack Output Values -// (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-exports.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation ListExports for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListExports -func (c *CloudFormation) ListExports(input *ListExportsInput) (*ListExportsOutput, error) { - req, out := c.ListExportsRequest(input) - return out, req.Send() -} - -// ListExportsWithContext is the same as ListExports with the addition of -// the ability to pass a context and additional request options. -// -// See ListExports for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ListExportsWithContext(ctx aws.Context, input *ListExportsInput, opts ...request.Option) (*ListExportsOutput, error) { - req, out := c.ListExportsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListExportsPages iterates over the pages of a ListExports operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListExports 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 ListExports operation. -// pageNum := 0 -// err := client.ListExportsPages(params, -// func(page *ListExportsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFormation) ListExportsPages(input *ListExportsInput, fn func(*ListExportsOutput, bool) bool) error { - return c.ListExportsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListExportsPagesWithContext same as ListExportsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ListExportsPagesWithContext(ctx aws.Context, input *ListExportsInput, fn func(*ListExportsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListExportsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListExportsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListExportsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListImports = "ListImports" - -// ListImportsRequest generates a "aws/request.Request" representing the -// client's request for the ListImports operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListImports for more information on using the ListImports -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListImportsRequest method. -// req, resp := client.ListImportsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListImports -func (c *CloudFormation) ListImportsRequest(input *ListImportsInput) (req *request.Request, output *ListImportsOutput) { - op := &request.Operation{ - Name: opListImports, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListImportsInput{} - } - - output = &ListImportsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListImports API operation for AWS CloudFormation. -// -// Lists all stacks that are importing an exported output value. To modify or -// remove an exported output value, first use this action to see which stacks -// are using it. To see the exported output values in your account, see ListExports. -// -// For more information about importing an exported output value, see the Fn::ImportValue -// (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html) -// function. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation ListImports for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListImports -func (c *CloudFormation) ListImports(input *ListImportsInput) (*ListImportsOutput, error) { - req, out := c.ListImportsRequest(input) - return out, req.Send() -} - -// ListImportsWithContext is the same as ListImports with the addition of -// the ability to pass a context and additional request options. -// -// See ListImports for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ListImportsWithContext(ctx aws.Context, input *ListImportsInput, opts ...request.Option) (*ListImportsOutput, error) { - req, out := c.ListImportsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListImportsPages iterates over the pages of a ListImports operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListImports 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 ListImports operation. -// pageNum := 0 -// err := client.ListImportsPages(params, -// func(page *ListImportsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFormation) ListImportsPages(input *ListImportsInput, fn func(*ListImportsOutput, bool) bool) error { - return c.ListImportsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListImportsPagesWithContext same as ListImportsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ListImportsPagesWithContext(ctx aws.Context, input *ListImportsInput, fn func(*ListImportsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListImportsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListImportsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListImportsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListStackInstances = "ListStackInstances" - -// ListStackInstancesRequest generates a "aws/request.Request" representing the -// client's request for the ListStackInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListStackInstances for more information on using the ListStackInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListStackInstancesRequest method. -// req, resp := client.ListStackInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListStackInstances -func (c *CloudFormation) ListStackInstancesRequest(input *ListStackInstancesInput) (req *request.Request, output *ListStackInstancesOutput) { - op := &request.Operation{ - Name: opListStackInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListStackInstancesInput{} - } - - output = &ListStackInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListStackInstances API operation for AWS CloudFormation. -// -// Returns summary information about stack instances that are associated with -// the specified stack set. You can filter for stack instances that are associated -// with a specific AWS account name or region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation ListStackInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStackSetNotFoundException "StackSetNotFoundException" -// The specified stack set doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListStackInstances -func (c *CloudFormation) ListStackInstances(input *ListStackInstancesInput) (*ListStackInstancesOutput, error) { - req, out := c.ListStackInstancesRequest(input) - return out, req.Send() -} - -// ListStackInstancesWithContext is the same as ListStackInstances with the addition of -// the ability to pass a context and additional request options. -// -// See ListStackInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ListStackInstancesWithContext(ctx aws.Context, input *ListStackInstancesInput, opts ...request.Option) (*ListStackInstancesOutput, error) { - req, out := c.ListStackInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListStackResources = "ListStackResources" - -// ListStackResourcesRequest generates a "aws/request.Request" representing the -// client's request for the ListStackResources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListStackResources for more information on using the ListStackResources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListStackResourcesRequest method. -// req, resp := client.ListStackResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListStackResources -func (c *CloudFormation) ListStackResourcesRequest(input *ListStackResourcesInput) (req *request.Request, output *ListStackResourcesOutput) { - op := &request.Operation{ - Name: opListStackResources, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListStackResourcesInput{} - } - - output = &ListStackResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListStackResources API operation for AWS CloudFormation. -// -// Returns descriptions of all resources of the specified stack. -// -// For deleted stacks, ListStackResources returns resource information for up -// to 90 days after the stack has been deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation ListStackResources for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListStackResources -func (c *CloudFormation) ListStackResources(input *ListStackResourcesInput) (*ListStackResourcesOutput, error) { - req, out := c.ListStackResourcesRequest(input) - return out, req.Send() -} - -// ListStackResourcesWithContext is the same as ListStackResources with the addition of -// the ability to pass a context and additional request options. -// -// See ListStackResources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ListStackResourcesWithContext(ctx aws.Context, input *ListStackResourcesInput, opts ...request.Option) (*ListStackResourcesOutput, error) { - req, out := c.ListStackResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListStackResourcesPages iterates over the pages of a ListStackResources operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListStackResources 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 ListStackResources operation. -// pageNum := 0 -// err := client.ListStackResourcesPages(params, -// func(page *ListStackResourcesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFormation) ListStackResourcesPages(input *ListStackResourcesInput, fn func(*ListStackResourcesOutput, bool) bool) error { - return c.ListStackResourcesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListStackResourcesPagesWithContext same as ListStackResourcesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ListStackResourcesPagesWithContext(ctx aws.Context, input *ListStackResourcesInput, fn func(*ListStackResourcesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListStackResourcesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListStackResourcesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStackResourcesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListStackSetOperationResults = "ListStackSetOperationResults" - -// ListStackSetOperationResultsRequest generates a "aws/request.Request" representing the -// client's request for the ListStackSetOperationResults operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListStackSetOperationResults for more information on using the ListStackSetOperationResults -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListStackSetOperationResultsRequest method. -// req, resp := client.ListStackSetOperationResultsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListStackSetOperationResults -func (c *CloudFormation) ListStackSetOperationResultsRequest(input *ListStackSetOperationResultsInput) (req *request.Request, output *ListStackSetOperationResultsOutput) { - op := &request.Operation{ - Name: opListStackSetOperationResults, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListStackSetOperationResultsInput{} - } - - output = &ListStackSetOperationResultsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListStackSetOperationResults API operation for AWS CloudFormation. -// -// Returns summary information about the results of a stack set operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation ListStackSetOperationResults for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStackSetNotFoundException "StackSetNotFoundException" -// The specified stack set doesn't exist. -// -// * ErrCodeOperationNotFoundException "OperationNotFoundException" -// The specified ID refers to an operation that doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListStackSetOperationResults -func (c *CloudFormation) ListStackSetOperationResults(input *ListStackSetOperationResultsInput) (*ListStackSetOperationResultsOutput, error) { - req, out := c.ListStackSetOperationResultsRequest(input) - return out, req.Send() -} - -// ListStackSetOperationResultsWithContext is the same as ListStackSetOperationResults with the addition of -// the ability to pass a context and additional request options. -// -// See ListStackSetOperationResults for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ListStackSetOperationResultsWithContext(ctx aws.Context, input *ListStackSetOperationResultsInput, opts ...request.Option) (*ListStackSetOperationResultsOutput, error) { - req, out := c.ListStackSetOperationResultsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListStackSetOperations = "ListStackSetOperations" - -// ListStackSetOperationsRequest generates a "aws/request.Request" representing the -// client's request for the ListStackSetOperations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListStackSetOperations for more information on using the ListStackSetOperations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListStackSetOperationsRequest method. -// req, resp := client.ListStackSetOperationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListStackSetOperations -func (c *CloudFormation) ListStackSetOperationsRequest(input *ListStackSetOperationsInput) (req *request.Request, output *ListStackSetOperationsOutput) { - op := &request.Operation{ - Name: opListStackSetOperations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListStackSetOperationsInput{} - } - - output = &ListStackSetOperationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListStackSetOperations API operation for AWS CloudFormation. -// -// Returns summary information about operations performed on a stack set. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation ListStackSetOperations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStackSetNotFoundException "StackSetNotFoundException" -// The specified stack set doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListStackSetOperations -func (c *CloudFormation) ListStackSetOperations(input *ListStackSetOperationsInput) (*ListStackSetOperationsOutput, error) { - req, out := c.ListStackSetOperationsRequest(input) - return out, req.Send() -} - -// ListStackSetOperationsWithContext is the same as ListStackSetOperations with the addition of -// the ability to pass a context and additional request options. -// -// See ListStackSetOperations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ListStackSetOperationsWithContext(ctx aws.Context, input *ListStackSetOperationsInput, opts ...request.Option) (*ListStackSetOperationsOutput, error) { - req, out := c.ListStackSetOperationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListStackSets = "ListStackSets" - -// ListStackSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListStackSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListStackSets for more information on using the ListStackSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListStackSetsRequest method. -// req, resp := client.ListStackSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListStackSets -func (c *CloudFormation) ListStackSetsRequest(input *ListStackSetsInput) (req *request.Request, output *ListStackSetsOutput) { - op := &request.Operation{ - Name: opListStackSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListStackSetsInput{} - } - - output = &ListStackSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListStackSets API operation for AWS CloudFormation. -// -// Returns summary information about stack sets that are associated with the -// user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation ListStackSets for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListStackSets -func (c *CloudFormation) ListStackSets(input *ListStackSetsInput) (*ListStackSetsOutput, error) { - req, out := c.ListStackSetsRequest(input) - return out, req.Send() -} - -// ListStackSetsWithContext is the same as ListStackSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListStackSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ListStackSetsWithContext(ctx aws.Context, input *ListStackSetsInput, opts ...request.Option) (*ListStackSetsOutput, error) { - req, out := c.ListStackSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListStacks = "ListStacks" - -// ListStacksRequest generates a "aws/request.Request" representing the -// client's request for the ListStacks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListStacks for more information on using the ListStacks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListStacksRequest method. -// req, resp := client.ListStacksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListStacks -func (c *CloudFormation) ListStacksRequest(input *ListStacksInput) (req *request.Request, output *ListStacksOutput) { - op := &request.Operation{ - Name: opListStacks, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListStacksInput{} - } - - output = &ListStacksOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListStacks API operation for AWS CloudFormation. -// -// Returns the summary information for stacks whose status matches the specified -// StackStatusFilter. Summary information for stacks that have been deleted -// is kept for 90 days after the stack is deleted. If no StackStatusFilter is -// specified, summary information for all stacks is returned (including existing -// stacks and stacks that have been deleted). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation ListStacks for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListStacks -func (c *CloudFormation) ListStacks(input *ListStacksInput) (*ListStacksOutput, error) { - req, out := c.ListStacksRequest(input) - return out, req.Send() -} - -// ListStacksWithContext is the same as ListStacks with the addition of -// the ability to pass a context and additional request options. -// -// See ListStacks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ListStacksWithContext(ctx aws.Context, input *ListStacksInput, opts ...request.Option) (*ListStacksOutput, error) { - req, out := c.ListStacksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListStacksPages iterates over the pages of a ListStacks operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListStacks 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 ListStacks operation. -// pageNum := 0 -// err := client.ListStacksPages(params, -// func(page *ListStacksOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFormation) ListStacksPages(input *ListStacksInput, fn func(*ListStacksOutput, bool) bool) error { - return c.ListStacksPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListStacksPagesWithContext same as ListStacksPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ListStacksPagesWithContext(ctx aws.Context, input *ListStacksInput, fn func(*ListStacksOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListStacksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListStacksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStacksOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opSetStackPolicy = "SetStackPolicy" - -// SetStackPolicyRequest generates a "aws/request.Request" representing the -// client's request for the SetStackPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetStackPolicy for more information on using the SetStackPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetStackPolicyRequest method. -// req, resp := client.SetStackPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/SetStackPolicy -func (c *CloudFormation) SetStackPolicyRequest(input *SetStackPolicyInput) (req *request.Request, output *SetStackPolicyOutput) { - op := &request.Operation{ - Name: opSetStackPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetStackPolicyInput{} - } - - output = &SetStackPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetStackPolicy API operation for AWS CloudFormation. -// -// Sets a stack policy for a specified stack. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation SetStackPolicy for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/SetStackPolicy -func (c *CloudFormation) SetStackPolicy(input *SetStackPolicyInput) (*SetStackPolicyOutput, error) { - req, out := c.SetStackPolicyRequest(input) - return out, req.Send() -} - -// SetStackPolicyWithContext is the same as SetStackPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See SetStackPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) SetStackPolicyWithContext(ctx aws.Context, input *SetStackPolicyInput, opts ...request.Option) (*SetStackPolicyOutput, error) { - req, out := c.SetStackPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSignalResource = "SignalResource" - -// SignalResourceRequest generates a "aws/request.Request" representing the -// client's request for the SignalResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SignalResource for more information on using the SignalResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SignalResourceRequest method. -// req, resp := client.SignalResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/SignalResource -func (c *CloudFormation) SignalResourceRequest(input *SignalResourceInput) (req *request.Request, output *SignalResourceOutput) { - op := &request.Operation{ - Name: opSignalResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SignalResourceInput{} - } - - output = &SignalResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SignalResource API operation for AWS CloudFormation. -// -// Sends a signal to the specified resource with a success or failure status. -// You can use the SignalResource API in conjunction with a creation policy -// or update policy. AWS CloudFormation doesn't proceed with a stack creation -// or update until resources receive the required number of signals or the timeout -// period is exceeded. The SignalResource API is useful in cases where you want -// to send signals from anywhere other than an Amazon EC2 instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation SignalResource for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/SignalResource -func (c *CloudFormation) SignalResource(input *SignalResourceInput) (*SignalResourceOutput, error) { - req, out := c.SignalResourceRequest(input) - return out, req.Send() -} - -// SignalResourceWithContext is the same as SignalResource with the addition of -// the ability to pass a context and additional request options. -// -// See SignalResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) SignalResourceWithContext(ctx aws.Context, input *SignalResourceInput, opts ...request.Option) (*SignalResourceOutput, error) { - req, out := c.SignalResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopStackSetOperation = "StopStackSetOperation" - -// StopStackSetOperationRequest generates a "aws/request.Request" representing the -// client's request for the StopStackSetOperation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopStackSetOperation for more information on using the StopStackSetOperation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopStackSetOperationRequest method. -// req, resp := client.StopStackSetOperationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/StopStackSetOperation -func (c *CloudFormation) StopStackSetOperationRequest(input *StopStackSetOperationInput) (req *request.Request, output *StopStackSetOperationOutput) { - op := &request.Operation{ - Name: opStopStackSetOperation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopStackSetOperationInput{} - } - - output = &StopStackSetOperationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopStackSetOperation API operation for AWS CloudFormation. -// -// Stops an in-progress operation on a stack set and its associated stack instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation StopStackSetOperation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStackSetNotFoundException "StackSetNotFoundException" -// The specified stack set doesn't exist. -// -// * ErrCodeOperationNotFoundException "OperationNotFoundException" -// The specified ID refers to an operation that doesn't exist. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The specified operation isn't valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/StopStackSetOperation -func (c *CloudFormation) StopStackSetOperation(input *StopStackSetOperationInput) (*StopStackSetOperationOutput, error) { - req, out := c.StopStackSetOperationRequest(input) - return out, req.Send() -} - -// StopStackSetOperationWithContext is the same as StopStackSetOperation with the addition of -// the ability to pass a context and additional request options. -// -// See StopStackSetOperation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) StopStackSetOperationWithContext(ctx aws.Context, input *StopStackSetOperationInput, opts ...request.Option) (*StopStackSetOperationOutput, error) { - req, out := c.StopStackSetOperationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateStack = "UpdateStack" - -// UpdateStackRequest generates a "aws/request.Request" representing the -// client's request for the UpdateStack operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateStack for more information on using the UpdateStack -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateStackRequest method. -// req, resp := client.UpdateStackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStack -func (c *CloudFormation) UpdateStackRequest(input *UpdateStackInput) (req *request.Request, output *UpdateStackOutput) { - op := &request.Operation{ - Name: opUpdateStack, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateStackInput{} - } - - output = &UpdateStackOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateStack API operation for AWS CloudFormation. -// -// Updates a stack as specified in the template. After the call completes successfully, -// the stack update starts. You can check the status of the stack via the DescribeStacks -// action. -// -// To get a copy of the template for an existing stack, you can use the GetTemplate -// action. -// -// For more information about creating an update template, updating a stack, -// and monitoring the progress of the update, see Updating a Stack (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation UpdateStack for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientCapabilitiesException "InsufficientCapabilitiesException" -// The template contains resources with capabilities that weren't specified -// in the Capabilities parameter. -// -// * ErrCodeTokenAlreadyExistsException "TokenAlreadyExistsException" -// A client request token already exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStack -func (c *CloudFormation) UpdateStack(input *UpdateStackInput) (*UpdateStackOutput, error) { - req, out := c.UpdateStackRequest(input) - return out, req.Send() -} - -// UpdateStackWithContext is the same as UpdateStack with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateStack for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) UpdateStackWithContext(ctx aws.Context, input *UpdateStackInput, opts ...request.Option) (*UpdateStackOutput, error) { - req, out := c.UpdateStackRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateStackInstances = "UpdateStackInstances" - -// UpdateStackInstancesRequest generates a "aws/request.Request" representing the -// client's request for the UpdateStackInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateStackInstances for more information on using the UpdateStackInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateStackInstancesRequest method. -// req, resp := client.UpdateStackInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStackInstances -func (c *CloudFormation) UpdateStackInstancesRequest(input *UpdateStackInstancesInput) (req *request.Request, output *UpdateStackInstancesOutput) { - op := &request.Operation{ - Name: opUpdateStackInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateStackInstancesInput{} - } - - output = &UpdateStackInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateStackInstances API operation for AWS CloudFormation. -// -// Updates the parameter values for stack instances for the specified accounts, -// within the specified regions. A stack instance refers to a stack in a specific -// account and region. -// -// You can only update stack instances in regions and accounts where they already -// exist; to create additional stack instances, use CreateStackInstances (http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStackInstances.html). -// -// During stack set updates, any parameters overridden for a stack instance -// are not updated, but retain their overridden value. -// -// You can only update the parameter values that are specified in the stack -// set; to add or delete a parameter itself, use UpdateStackSet (http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html) -// to update the stack set template. If you add a parameter to a template, before -// you can override the parameter value specified in the stack set you must -// first use UpdateStackSet (http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html) -// to update all stack instances with the updated template and parameter value -// specified in the stack set. Once a stack instance has been updated with the -// new parameter, you can then override the parameter value using UpdateStackInstances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation UpdateStackInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStackSetNotFoundException "StackSetNotFoundException" -// The specified stack set doesn't exist. -// -// * ErrCodeStackInstanceNotFoundException "StackInstanceNotFoundException" -// The specified stack instance doesn't exist. -// -// * ErrCodeOperationInProgressException "OperationInProgressException" -// Another operation is currently in progress for this stack set. Only one operation -// can be performed for a stack set at a given time. -// -// * ErrCodeOperationIdAlreadyExistsException "OperationIdAlreadyExistsException" -// The specified operation ID already exists. -// -// * ErrCodeStaleRequestException "StaleRequestException" -// Another operation has been performed on this stack set since the specified -// operation was performed. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The specified operation isn't valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStackInstances -func (c *CloudFormation) UpdateStackInstances(input *UpdateStackInstancesInput) (*UpdateStackInstancesOutput, error) { - req, out := c.UpdateStackInstancesRequest(input) - return out, req.Send() -} - -// UpdateStackInstancesWithContext is the same as UpdateStackInstances with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateStackInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) UpdateStackInstancesWithContext(ctx aws.Context, input *UpdateStackInstancesInput, opts ...request.Option) (*UpdateStackInstancesOutput, error) { - req, out := c.UpdateStackInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateStackSet = "UpdateStackSet" - -// UpdateStackSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateStackSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateStackSet for more information on using the UpdateStackSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateStackSetRequest method. -// req, resp := client.UpdateStackSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStackSet -func (c *CloudFormation) UpdateStackSetRequest(input *UpdateStackSetInput) (req *request.Request, output *UpdateStackSetOutput) { - op := &request.Operation{ - Name: opUpdateStackSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateStackSetInput{} - } - - output = &UpdateStackSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateStackSet API operation for AWS CloudFormation. -// -// Updates the stack set, and associated stack instances in the specified accounts -// and regions. -// -// Even if the stack set operation created by updating the stack set fails (completely -// or partially, below or above a specified failure tolerance), the stack set -// is updated with your changes. Subsequent CreateStackInstances calls on the -// specified stack set use the updated stack set. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation UpdateStackSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStackSetNotFoundException "StackSetNotFoundException" -// The specified stack set doesn't exist. -// -// * ErrCodeOperationInProgressException "OperationInProgressException" -// Another operation is currently in progress for this stack set. Only one operation -// can be performed for a stack set at a given time. -// -// * ErrCodeOperationIdAlreadyExistsException "OperationIdAlreadyExistsException" -// The specified operation ID already exists. -// -// * ErrCodeStaleRequestException "StaleRequestException" -// Another operation has been performed on this stack set since the specified -// operation was performed. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The specified operation isn't valid. -// -// * ErrCodeStackInstanceNotFoundException "StackInstanceNotFoundException" -// The specified stack instance doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStackSet -func (c *CloudFormation) UpdateStackSet(input *UpdateStackSetInput) (*UpdateStackSetOutput, error) { - req, out := c.UpdateStackSetRequest(input) - return out, req.Send() -} - -// UpdateStackSetWithContext is the same as UpdateStackSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateStackSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) UpdateStackSetWithContext(ctx aws.Context, input *UpdateStackSetInput, opts ...request.Option) (*UpdateStackSetOutput, error) { - req, out := c.UpdateStackSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateTerminationProtection = "UpdateTerminationProtection" - -// UpdateTerminationProtectionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateTerminationProtection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateTerminationProtection for more information on using the UpdateTerminationProtection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateTerminationProtectionRequest method. -// req, resp := client.UpdateTerminationProtectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateTerminationProtection -func (c *CloudFormation) UpdateTerminationProtectionRequest(input *UpdateTerminationProtectionInput) (req *request.Request, output *UpdateTerminationProtectionOutput) { - op := &request.Operation{ - Name: opUpdateTerminationProtection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateTerminationProtectionInput{} - } - - output = &UpdateTerminationProtectionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateTerminationProtection API operation for AWS CloudFormation. -// -// Updates termination protection for the specified stack. If a user attempts -// to delete a stack with termination protection enabled, the operation fails -// and the stack remains unchanged. For more information, see Protecting a Stack -// From Being Deleted (AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) -// in the AWS CloudFormation User Guide. -// -// For nested stacks (AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html), -// termination protection is set on the root stack and cannot be changed directly -// on the nested stack. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation UpdateTerminationProtection for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateTerminationProtection -func (c *CloudFormation) UpdateTerminationProtection(input *UpdateTerminationProtectionInput) (*UpdateTerminationProtectionOutput, error) { - req, out := c.UpdateTerminationProtectionRequest(input) - return out, req.Send() -} - -// UpdateTerminationProtectionWithContext is the same as UpdateTerminationProtection with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateTerminationProtection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) UpdateTerminationProtectionWithContext(ctx aws.Context, input *UpdateTerminationProtectionInput, opts ...request.Option) (*UpdateTerminationProtectionOutput, error) { - req, out := c.UpdateTerminationProtectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opValidateTemplate = "ValidateTemplate" - -// ValidateTemplateRequest generates a "aws/request.Request" representing the -// client's request for the ValidateTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ValidateTemplate for more information on using the ValidateTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ValidateTemplateRequest method. -// req, resp := client.ValidateTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ValidateTemplate -func (c *CloudFormation) ValidateTemplateRequest(input *ValidateTemplateInput) (req *request.Request, output *ValidateTemplateOutput) { - op := &request.Operation{ - Name: opValidateTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ValidateTemplateInput{} - } - - output = &ValidateTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// ValidateTemplate API operation for AWS CloudFormation. -// -// Validates a specified template. AWS CloudFormation first checks if the template -// is valid JSON. If it isn't, AWS CloudFormation checks if the template is -// valid YAML. If both these checks fail, AWS CloudFormation returns a template -// validation error. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudFormation's -// API operation ValidateTemplate for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ValidateTemplate -func (c *CloudFormation) ValidateTemplate(input *ValidateTemplateInput) (*ValidateTemplateOutput, error) { - req, out := c.ValidateTemplateRequest(input) - return out, req.Send() -} - -// ValidateTemplateWithContext is the same as ValidateTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See ValidateTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) ValidateTemplateWithContext(ctx aws.Context, input *ValidateTemplateInput, opts ...request.Option) (*ValidateTemplateOutput, error) { - req, out := c.ValidateTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Structure that contains the results of the account gate function which AWS -// CloudFormation invokes, if present, before proceeding with a stack set operation -// in an account and region. -// -// For each account and region, AWS CloudFormation lets you specify a Lamdba -// function that encapsulates any requirements that must be met before CloudFormation -// can proceed with a stack set operation in that account and region. CloudFormation -// invokes the function each time a stack set operation is requested for that -// account and region; if the function returns FAILED, CloudFormation cancels -// the operation in that account and region, and sets the stack set operation -// result status for that account and region to FAILED. -// -// For more information, see Configuring a target account gate (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-account-gating.html). -type AccountGateResult struct { - _ struct{} `type:"structure"` - - // The status of the account gate function. - // - // * SUCCEEDED: The account gate function has determined that the account - // and region passes any requirements for a stack set operation to occur. - // AWS CloudFormation proceeds with the stack operation in that account and - // region. - // - // * FAILED: The account gate function has determined that the account and - // region does not meet the requirements for a stack set operation to occur. - // AWS CloudFormation cancels the stack set operation in that account and - // region, and sets the stack set operation result status for that account - // and region to FAILED. - // - // * SKIPPED: AWS CloudFormation has skipped calling the account gate function - // for this account and region, for one of the following reasons: - // - // An account gate function has not been specified for the account and region. - // AWS CloudFormation proceeds with the stack set operation in this account - // and region. - // - // The AWSCloudFormationStackSetExecutionRole of the stack set adminstration - // account lacks permissions to invoke the function. AWS CloudFormation proceeds - // with the stack set operation in this account and region. - // - // Either no action is necessary, or no action is possible, on the stack. AWS - // CloudFormation skips the stack set operation in this account and region. - Status *string `type:"string" enum:"AccountGateStatus"` - - // The reason for the account gate status assigned to this account and region - // for the stack set operation. - StatusReason *string `type:"string"` -} - -// String returns the string representation -func (s AccountGateResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountGateResult) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *AccountGateResult) SetStatus(v string) *AccountGateResult { - s.Status = &v - return s -} - -// SetStatusReason sets the StatusReason field's value. -func (s *AccountGateResult) SetStatusReason(v string) *AccountGateResult { - s.StatusReason = &v - return s -} - -// The AccountLimit data type. -type AccountLimit struct { - _ struct{} `type:"structure"` - - // The name of the account limit. Currently, the only account limit is StackLimit. - Name *string `type:"string"` - - // The value that is associated with the account limit name. - Value *int64 `type:"integer"` -} - -// String returns the string representation -func (s AccountLimit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountLimit) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *AccountLimit) SetName(v string) *AccountLimit { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *AccountLimit) SetValue(v int64) *AccountLimit { - s.Value = &v - return s -} - -// The input for the CancelUpdateStack action. -type CancelUpdateStackInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for this CancelUpdateStack request. Specify this token - // if you plan to retry requests so that AWS CloudFormation knows that you're - // not attempting to cancel an update on a stack with the same name. You might - // retry CancelUpdateStack requests to ensure that AWS CloudFormation successfully - // received them. - ClientRequestToken *string `min:"1" type:"string"` - - // The name or the unique stack ID that is associated with the stack. - // - // StackName is a required field - StackName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelUpdateStackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelUpdateStackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelUpdateStackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelUpdateStackInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *CancelUpdateStackInput) SetClientRequestToken(v string) *CancelUpdateStackInput { - s.ClientRequestToken = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *CancelUpdateStackInput) SetStackName(v string) *CancelUpdateStackInput { - s.StackName = &v - return s -} - -type CancelUpdateStackOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CancelUpdateStackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelUpdateStackOutput) GoString() string { - return s.String() -} - -// The Change structure describes the changes AWS CloudFormation will perform -// if you execute the change set. -type Change struct { - _ struct{} `type:"structure"` - - // A ResourceChange structure that describes the resource and action that AWS - // CloudFormation will perform. - ResourceChange *ResourceChange `type:"structure"` - - // The type of entity that AWS CloudFormation changes. Currently, the only entity - // type is Resource. - Type *string `type:"string" enum:"ChangeType"` -} - -// String returns the string representation -func (s Change) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Change) GoString() string { - return s.String() -} - -// SetResourceChange sets the ResourceChange field's value. -func (s *Change) SetResourceChange(v *ResourceChange) *Change { - s.ResourceChange = v - return s -} - -// SetType sets the Type field's value. -func (s *Change) SetType(v string) *Change { - s.Type = &v - return s -} - -// The ChangeSetSummary structure describes a change set, its status, and the -// stack with which it's associated. -type ChangeSetSummary struct { - _ struct{} `type:"structure"` - - // The ID of the change set. - ChangeSetId *string `min:"1" type:"string"` - - // The name of the change set. - ChangeSetName *string `min:"1" type:"string"` - - // The start time when the change set was created, in UTC. - CreationTime *time.Time `type:"timestamp"` - - // Descriptive information about the change set. - Description *string `min:"1" type:"string"` - - // If the change set execution status is AVAILABLE, you can execute the change - // set. If you can’t execute the change set, the status indicates why. For example, - // a change set might be in an UNAVAILABLE state because AWS CloudFormation - // is still creating it or in an OBSOLETE state because the stack was already - // updated. - ExecutionStatus *string `type:"string" enum:"ExecutionStatus"` - - // The ID of the stack with which the change set is associated. - StackId *string `type:"string"` - - // The name of the stack with which the change set is associated. - StackName *string `type:"string"` - - // The state of the change set, such as CREATE_IN_PROGRESS, CREATE_COMPLETE, - // or FAILED. - Status *string `type:"string" enum:"ChangeSetStatus"` - - // A description of the change set's status. For example, if your change set - // is in the FAILED state, AWS CloudFormation shows the error message. - StatusReason *string `type:"string"` -} - -// String returns the string representation -func (s ChangeSetSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangeSetSummary) GoString() string { - return s.String() -} - -// SetChangeSetId sets the ChangeSetId field's value. -func (s *ChangeSetSummary) SetChangeSetId(v string) *ChangeSetSummary { - s.ChangeSetId = &v - return s -} - -// SetChangeSetName sets the ChangeSetName field's value. -func (s *ChangeSetSummary) SetChangeSetName(v string) *ChangeSetSummary { - s.ChangeSetName = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ChangeSetSummary) SetCreationTime(v time.Time) *ChangeSetSummary { - s.CreationTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ChangeSetSummary) SetDescription(v string) *ChangeSetSummary { - s.Description = &v - return s -} - -// SetExecutionStatus sets the ExecutionStatus field's value. -func (s *ChangeSetSummary) SetExecutionStatus(v string) *ChangeSetSummary { - s.ExecutionStatus = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *ChangeSetSummary) SetStackId(v string) *ChangeSetSummary { - s.StackId = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *ChangeSetSummary) SetStackName(v string) *ChangeSetSummary { - s.StackName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ChangeSetSummary) SetStatus(v string) *ChangeSetSummary { - s.Status = &v - return s -} - -// SetStatusReason sets the StatusReason field's value. -func (s *ChangeSetSummary) SetStatusReason(v string) *ChangeSetSummary { - s.StatusReason = &v - return s -} - -// The input for the ContinueUpdateRollback action. -type ContinueUpdateRollbackInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for this ContinueUpdateRollback request. Specify this - // token if you plan to retry requests so that AWS CloudFormation knows that - // you're not attempting to continue the rollback to a stack with the same name. - // You might retry ContinueUpdateRollback requests to ensure that AWS CloudFormation - // successfully received them. - ClientRequestToken *string `min:"1" type:"string"` - - // A list of the logical IDs of the resources that AWS CloudFormation skips - // during the continue update rollback operation. You can specify only resources - // that are in the UPDATE_FAILED state because a rollback failed. You can't - // specify resources that are in the UPDATE_FAILED state for other reasons, - // for example, because an update was cancelled. To check why a resource update - // failed, use the DescribeStackResources action, and view the resource status - // reason. - // - // Specify this property to skip rolling back resources that AWS CloudFormation - // can't successfully roll back. We recommend that you troubleshoot (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/troubleshooting.html#troubleshooting-errors-update-rollback-failed) - // resources before skipping them. AWS CloudFormation sets the status of the - // specified resources to UPDATE_COMPLETE and continues to roll back the stack. - // After the rollback is complete, the state of the skipped resources will be - // inconsistent with the state of the resources in the stack template. Before - // performing another stack update, you must update the stack or resources to - // be consistent with each other. If you don't, subsequent stack updates might - // fail, and the stack will become unrecoverable. - // - // Specify the minimum number of resources required to successfully roll back - // your stack. For example, a failed resource update might cause dependent resources - // to fail. In this case, it might not be necessary to skip the dependent resources. - // - // To skip resources that are part of nested stacks, use the following format: - // NestedStackName.ResourceLogicalID. If you want to specify the logical ID - // of a stack resource (Type: AWS::CloudFormation::Stack) in the ResourcesToSkip - // list, then its corresponding embedded stack must be in one of the following - // states: DELETE_IN_PROGRESS, DELETE_COMPLETE, or DELETE_FAILED. - // - // Don't confuse a child stack's name with its corresponding logical ID defined - // in the parent stack. For an example of a continue update rollback operation - // with nested stacks, see Using ResourcesToSkip to recover a nested stacks - // hierarchy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-continueupdaterollback.html#nested-stacks). - ResourcesToSkip []*string `type:"list"` - - // The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) - // role that AWS CloudFormation assumes to roll back the stack. AWS CloudFormation - // uses the role's credentials to make calls on your behalf. AWS CloudFormation - // always uses this role for all future operations on the stack. As long as - // users have permission to operate on the stack, AWS CloudFormation uses this - // role even if the users don't have permission to pass it. Ensure that the - // role grants least privilege. - // - // If you don't specify a value, AWS CloudFormation uses the role that was previously - // associated with the stack. If no role is available, AWS CloudFormation uses - // a temporary session that is generated from your user credentials. - RoleARN *string `min:"20" type:"string"` - - // The name or the unique ID of the stack that you want to continue rolling - // back. - // - // Don't specify the name of a nested stack (a stack that was created by using - // the AWS::CloudFormation::Stack resource). Instead, use this operation on - // the parent stack (the stack that contains the AWS::CloudFormation::Stack - // resource). - // - // StackName is a required field - StackName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ContinueUpdateRollbackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContinueUpdateRollbackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContinueUpdateRollbackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContinueUpdateRollbackInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) - } - if s.RoleARN != nil && len(*s.RoleARN) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 20)) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - if s.StackName != nil && len(*s.StackName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *ContinueUpdateRollbackInput) SetClientRequestToken(v string) *ContinueUpdateRollbackInput { - s.ClientRequestToken = &v - return s -} - -// SetResourcesToSkip sets the ResourcesToSkip field's value. -func (s *ContinueUpdateRollbackInput) SetResourcesToSkip(v []*string) *ContinueUpdateRollbackInput { - s.ResourcesToSkip = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *ContinueUpdateRollbackInput) SetRoleARN(v string) *ContinueUpdateRollbackInput { - s.RoleARN = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *ContinueUpdateRollbackInput) SetStackName(v string) *ContinueUpdateRollbackInput { - s.StackName = &v - return s -} - -// The output for a ContinueUpdateRollback action. -type ContinueUpdateRollbackOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ContinueUpdateRollbackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContinueUpdateRollbackOutput) GoString() string { - return s.String() -} - -// The input for the CreateChangeSet action. -type CreateChangeSetInput struct { - _ struct{} `type:"structure"` - - // In some cases, you must explicity acknowledge that your stack template contains - // certain capabilities in order for AWS CloudFormation to create the stack. - // - // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM - // - // Some stack templates might include resources that can affect permissions - // in your AWS account; for example, by creating new AWS Identity and Access - // Management (IAM) users. For those stacks, you must explicitly acknowledge - // this by specifying one of these capabilities. - // - // The following IAM resources require you to specify either the CAPABILITY_IAM - // or CAPABILITY_NAMED_IAM capability. - // - // If you have IAM resources, you can specify either capability. - // - // If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. - // - // - // If you don't specify either of these capabilities, AWS CloudFormation returns - // an InsufficientCapabilities error. - // - // If your stack template contains these resources, we recommend that you review - // all permissions associated with them and edit their permissions if necessary. - // - // AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) - // - // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) - // - // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) - // - // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) - // - // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) - // - // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) - // - // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) - // - // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). - // - // * CAPABILITY_AUTO_EXPAND - // - // Some template contain macros. Macros perform custom processing on templates; - // this can include simple actions like find-and-replace operations, all - // the way to extensive transformations of entire templates. Because of this, - // users typically create a change set from the processed template, so that - // they can review the changes resulting from the macros before actually - // creating the stack. If your stack template contains one or more macros, - // and you choose to create a stack directly from the processed template, - // without first reviewing the resulting changes in a change set, you must - // acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) - // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) - // transforms, which are macros hosted by AWS CloudFormation. - // - // This capacity does not apply to creating change sets, and specifying it when - // creating change sets has no effect. - // - // Also, change sets do not currently support nested stacks. If you want to - // create a stack from a stack template that contains macros and nested stacks, - // you must create or update the stack directly from the template using the - // CreateStack or UpdateStack action, and specifying this capability. - // - // For more information on macros, see Using AWS CloudFormation Macros to Perform - // Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). - Capabilities []*string `type:"list"` - - // The name of the change set. The name must be unique among all change sets - // that are associated with the specified stack. - // - // A change set name can contain only alphanumeric, case sensitive characters - // and hyphens. It must start with an alphabetic character and cannot exceed - // 128 characters. - // - // ChangeSetName is a required field - ChangeSetName *string `min:"1" type:"string" required:"true"` - - // The type of change set operation. To create a change set for a new stack, - // specify CREATE. To create a change set for an existing stack, specify UPDATE. - // - // If you create a change set for a new stack, AWS Cloudformation creates a - // stack with a unique stack ID, but no template or resources. The stack will - // be in the REVIEW_IN_PROGRESS (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html#d0e11995) - // state until you execute the change set. - // - // By default, AWS CloudFormation specifies UPDATE. You can't use the UPDATE - // type to create a change set for a new stack or the CREATE type to create - // a change set for an existing stack. - ChangeSetType *string `type:"string" enum:"ChangeSetType"` - - // A unique identifier for this CreateChangeSet request. Specify this token - // if you plan to retry requests so that AWS CloudFormation knows that you're - // not attempting to create another change set with the same name. You might - // retry CreateChangeSet requests to ensure that AWS CloudFormation successfully - // received them. - ClientToken *string `min:"1" type:"string"` - - // A description to help you identify this change set. - Description *string `min:"1" type:"string"` - - // The Amazon Resource Names (ARNs) of Amazon Simple Notification Service (Amazon - // SNS) topics that AWS CloudFormation associates with the stack. To remove - // all associated notification topics, specify an empty list. - NotificationARNs []*string `type:"list"` - - // A list of Parameter structures that specify input parameters for the change - // set. For more information, see the Parameter data type. - Parameters []*Parameter `type:"list"` - - // The template resource types that you have permissions to work with if you - // execute this change set, such as AWS::EC2::Instance, AWS::EC2::*, or Custom::MyCustomInstance. - // - // If the list of resource types doesn't include a resource type that you're - // updating, the stack update fails. By default, AWS CloudFormation grants permissions - // to all resource types. AWS Identity and Access Management (IAM) uses this - // parameter for condition keys in IAM policies for AWS CloudFormation. For - // more information, see Controlling Access with AWS Identity and Access Management - // (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html) - // in the AWS CloudFormation User Guide. - ResourceTypes []*string `type:"list"` - - // The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) - // role that AWS CloudFormation assumes when executing the change set. AWS CloudFormation - // uses the role's credentials to make calls on your behalf. AWS CloudFormation - // uses this role for all future operations on the stack. As long as users have - // permission to operate on the stack, AWS CloudFormation uses this role even - // if the users don't have permission to pass it. Ensure that the role grants - // least privilege. - // - // If you don't specify a value, AWS CloudFormation uses the role that was previously - // associated with the stack. If no role is available, AWS CloudFormation uses - // a temporary session that is generated from your user credentials. - RoleARN *string `min:"20" type:"string"` - - // The rollback triggers for AWS CloudFormation to monitor during stack creation - // and updating operations, and for the specified monitoring period afterwards. - RollbackConfiguration *RollbackConfiguration `type:"structure"` - - // The name or the unique ID of the stack for which you are creating a change - // set. AWS CloudFormation generates the change set by comparing this stack's - // information with the information that you submit, such as a modified template - // or different parameter input values. - // - // StackName is a required field - StackName *string `min:"1" type:"string" required:"true"` - - // Key-value pairs to associate with this stack. AWS CloudFormation also propagates - // these tags to resources in the stack. You can specify a maximum of 50 tags. - Tags []*Tag `type:"list"` - - // A structure that contains the body of the revised template, with a minimum - // length of 1 byte and a maximum length of 51,200 bytes. AWS CloudFormation - // generates the change set by comparing this template with the template of - // the stack that you specified. - // - // Conditional: You must specify only TemplateBody or TemplateURL. - TemplateBody *string `min:"1" type:"string"` - - // The location of the file that contains the revised template. The URL must - // point to a template (max size: 460,800 bytes) that is located in an S3 bucket. - // AWS CloudFormation generates the change set by comparing this template with - // the stack that you specified. - // - // Conditional: You must specify only TemplateBody or TemplateURL. - TemplateURL *string `min:"1" type:"string"` - - // Whether to reuse the template that is associated with the stack to create - // the change set. - UsePreviousTemplate *bool `type:"boolean"` -} - -// String returns the string representation -func (s CreateChangeSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateChangeSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateChangeSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateChangeSetInput"} - if s.ChangeSetName == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeSetName")) - } - if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1)) - } - if s.ClientToken != nil && len(*s.ClientToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) - } - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.RoleARN != nil && len(*s.RoleARN) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 20)) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - if s.StackName != nil && len(*s.StackName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) - } - if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) - } - if s.TemplateURL != nil && len(*s.TemplateURL) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1)) - } - if s.RollbackConfiguration != nil { - if err := s.RollbackConfiguration.Validate(); err != nil { - invalidParams.AddNested("RollbackConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCapabilities sets the Capabilities field's value. -func (s *CreateChangeSetInput) SetCapabilities(v []*string) *CreateChangeSetInput { - s.Capabilities = v - return s -} - -// SetChangeSetName sets the ChangeSetName field's value. -func (s *CreateChangeSetInput) SetChangeSetName(v string) *CreateChangeSetInput { - s.ChangeSetName = &v - return s -} - -// SetChangeSetType sets the ChangeSetType field's value. -func (s *CreateChangeSetInput) SetChangeSetType(v string) *CreateChangeSetInput { - s.ChangeSetType = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateChangeSetInput) SetClientToken(v string) *CreateChangeSetInput { - s.ClientToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateChangeSetInput) SetDescription(v string) *CreateChangeSetInput { - s.Description = &v - return s -} - -// SetNotificationARNs sets the NotificationARNs field's value. -func (s *CreateChangeSetInput) SetNotificationARNs(v []*string) *CreateChangeSetInput { - s.NotificationARNs = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *CreateChangeSetInput) SetParameters(v []*Parameter) *CreateChangeSetInput { - s.Parameters = v - return s -} - -// SetResourceTypes sets the ResourceTypes field's value. -func (s *CreateChangeSetInput) SetResourceTypes(v []*string) *CreateChangeSetInput { - s.ResourceTypes = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *CreateChangeSetInput) SetRoleARN(v string) *CreateChangeSetInput { - s.RoleARN = &v - return s -} - -// SetRollbackConfiguration sets the RollbackConfiguration field's value. -func (s *CreateChangeSetInput) SetRollbackConfiguration(v *RollbackConfiguration) *CreateChangeSetInput { - s.RollbackConfiguration = v - return s -} - -// SetStackName sets the StackName field's value. -func (s *CreateChangeSetInput) SetStackName(v string) *CreateChangeSetInput { - s.StackName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateChangeSetInput) SetTags(v []*Tag) *CreateChangeSetInput { - s.Tags = v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *CreateChangeSetInput) SetTemplateBody(v string) *CreateChangeSetInput { - s.TemplateBody = &v - return s -} - -// SetTemplateURL sets the TemplateURL field's value. -func (s *CreateChangeSetInput) SetTemplateURL(v string) *CreateChangeSetInput { - s.TemplateURL = &v - return s -} - -// SetUsePreviousTemplate sets the UsePreviousTemplate field's value. -func (s *CreateChangeSetInput) SetUsePreviousTemplate(v bool) *CreateChangeSetInput { - s.UsePreviousTemplate = &v - return s -} - -// The output for the CreateChangeSet action. -type CreateChangeSetOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the change set. - Id *string `min:"1" type:"string"` - - // The unique ID of the stack. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s CreateChangeSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateChangeSetOutput) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *CreateChangeSetOutput) SetId(v string) *CreateChangeSetOutput { - s.Id = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *CreateChangeSetOutput) SetStackId(v string) *CreateChangeSetOutput { - s.StackId = &v - return s -} - -// The input for CreateStack action. -type CreateStackInput struct { - _ struct{} `type:"structure"` - - // In some cases, you must explicity acknowledge that your stack template contains - // certain capabilities in order for AWS CloudFormation to create the stack. - // - // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM - // - // Some stack templates might include resources that can affect permissions - // in your AWS account; for example, by creating new AWS Identity and Access - // Management (IAM) users. For those stacks, you must explicitly acknowledge - // this by specifying one of these capabilities. - // - // The following IAM resources require you to specify either the CAPABILITY_IAM - // or CAPABILITY_NAMED_IAM capability. - // - // If you have IAM resources, you can specify either capability. - // - // If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. - // - // - // If you don't specify either of these capabilities, AWS CloudFormation returns - // an InsufficientCapabilities error. - // - // If your stack template contains these resources, we recommend that you review - // all permissions associated with them and edit their permissions if necessary. - // - // AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) - // - // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) - // - // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) - // - // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) - // - // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) - // - // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) - // - // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) - // - // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). - // - // * CAPABILITY_AUTO_EXPAND - // - // Some template contain macros. Macros perform custom processing on templates; - // this can include simple actions like find-and-replace operations, all - // the way to extensive transformations of entire templates. Because of this, - // users typically create a change set from the processed template, so that - // they can review the changes resulting from the macros before actually - // creating the stack. If your stack template contains one or more macros, - // and you choose to create a stack directly from the processed template, - // without first reviewing the resulting changes in a change set, you must - // acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) - // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) - // transforms, which are macros hosted by AWS CloudFormation. - // - // Change sets do not currently support nested stacks. If you want to create - // a stack from a stack template that contains macros and nested stacks, - // you must create the stack directly from the template using this capability. - // - // You should only create stacks directly from a stack template that contains - // macros if you know what processing the macro performs. - // - // Each macro relies on an underlying Lambda service function for processing - // stack templates. Be aware that the Lambda function owner can update the - // function operation without AWS CloudFormation being notified. - // - // For more information, see Using AWS CloudFormation Macros to Perform Custom - // Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). - Capabilities []*string `type:"list"` - - // A unique identifier for this CreateStack request. Specify this token if you - // plan to retry requests so that AWS CloudFormation knows that you're not attempting - // to create a stack with the same name. You might retry CreateStack requests - // to ensure that AWS CloudFormation successfully received them. - // - // All events triggered by a given stack operation are assigned the same client - // request token, which you can use to track operations. For example, if you - // execute a CreateStack operation with the token token1, then all the StackEvents - // generated by that operation will have ClientRequestToken set as token1. - // - // In the console, stack operations display the client request token on the - // Events tab. Stack operations that are initiated from the console use the - // token format Console-StackOperation-ID, which helps you easily identify the - // stack operation . For example, if you create a stack using the console, each - // stack event would be assigned the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002. - ClientRequestToken *string `min:"1" type:"string"` - - // Set to true to disable rollback of the stack if stack creation failed. You - // can specify either DisableRollback or OnFailure, but not both. - // - // Default: false - DisableRollback *bool `type:"boolean"` - - // Whether to enable termination protection on the specified stack. If a user - // attempts to delete a stack with termination protection enabled, the operation - // fails and the stack remains unchanged. For more information, see Protecting - // a Stack From Being Deleted (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) - // in the AWS CloudFormation User Guide. Termination protection is disabled - // on stacks by default. - // - // For nested stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html), - // termination protection is set on the root stack and cannot be changed directly - // on the nested stack. - EnableTerminationProtection *bool `type:"boolean"` - - // The Simple Notification Service (SNS) topic ARNs to publish stack related - // events. You can find your SNS topic ARNs using the SNS console or your Command - // Line Interface (CLI). - NotificationARNs []*string `type:"list"` - - // Determines what action will be taken if stack creation fails. This must be - // one of: DO_NOTHING, ROLLBACK, or DELETE. You can specify either OnFailure - // or DisableRollback, but not both. - // - // Default: ROLLBACK - OnFailure *string `type:"string" enum:"OnFailure"` - - // A list of Parameter structures that specify input parameters for the stack. - // For more information, see the Parameter (http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html) - // data type. - Parameters []*Parameter `type:"list"` - - // The template resource types that you have permissions to work with for this - // create stack action, such as AWS::EC2::Instance, AWS::EC2::*, or Custom::MyCustomInstance. - // Use the following syntax to describe template resource types: AWS::* (for - // all AWS resource), Custom::* (for all custom resources), Custom::logical_ID - // (for a specific custom resource), AWS::service_name::* (for all resources - // of a particular AWS service), and AWS::service_name::resource_logical_ID - // (for a specific AWS resource). - // - // If the list of resource types doesn't include a resource that you're creating, - // the stack creation fails. By default, AWS CloudFormation grants permissions - // to all resource types. AWS Identity and Access Management (IAM) uses this - // parameter for AWS CloudFormation-specific condition keys in IAM policies. - // For more information, see Controlling Access with AWS Identity and Access - // Management (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html). - ResourceTypes []*string `type:"list"` - - // The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) - // role that AWS CloudFormation assumes to create the stack. AWS CloudFormation - // uses the role's credentials to make calls on your behalf. AWS CloudFormation - // always uses this role for all future operations on the stack. As long as - // users have permission to operate on the stack, AWS CloudFormation uses this - // role even if the users don't have permission to pass it. Ensure that the - // role grants least privilege. - // - // If you don't specify a value, AWS CloudFormation uses the role that was previously - // associated with the stack. If no role is available, AWS CloudFormation uses - // a temporary session that is generated from your user credentials. - RoleARN *string `min:"20" type:"string"` - - // The rollback triggers for AWS CloudFormation to monitor during stack creation - // and updating operations, and for the specified monitoring period afterwards. - RollbackConfiguration *RollbackConfiguration `type:"structure"` - - // The name that is associated with the stack. The name must be unique in the - // region in which you are creating the stack. - // - // A stack name can contain only alphanumeric characters (case sensitive) and - // hyphens. It must start with an alphabetic character and cannot be longer - // than 128 characters. - // - // StackName is a required field - StackName *string `type:"string" required:"true"` - - // Structure containing the stack policy body. For more information, go to - // Prevent Updates to Stack Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html) - // in the AWS CloudFormation User Guide. You can specify either the StackPolicyBody - // or the StackPolicyURL parameter, but not both. - StackPolicyBody *string `min:"1" type:"string"` - - // Location of a file containing the stack policy. The URL must point to a policy - // (maximum size: 16 KB) located in an S3 bucket in the same region as the stack. - // You can specify either the StackPolicyBody or the StackPolicyURL parameter, - // but not both. - StackPolicyURL *string `min:"1" type:"string"` - - // Key-value pairs to associate with this stack. AWS CloudFormation also propagates - // these tags to the resources created in the stack. A maximum number of 50 - // tags can be specified. - Tags []*Tag `type:"list"` - - // Structure containing the template body with a minimum length of 1 byte and - // a maximum length of 51,200 bytes. For more information, go to Template Anatomy - // (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide. - // - // Conditional: You must specify either the TemplateBody or the TemplateURL - // parameter, but not both. - TemplateBody *string `min:"1" type:"string"` - - // Location of file containing the template body. The URL must point to a template - // (max size: 460,800 bytes) that is located in an Amazon S3 bucket. For more - // information, go to the Template Anatomy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide. - // - // Conditional: You must specify either the TemplateBody or the TemplateURL - // parameter, but not both. - TemplateURL *string `min:"1" type:"string"` - - // The amount of time that can pass before the stack status becomes CREATE_FAILED; - // if DisableRollback is not set or is set to false, the stack will be rolled - // back. - TimeoutInMinutes *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s CreateStackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStackInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) - } - if s.RoleARN != nil && len(*s.RoleARN) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 20)) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - if s.StackPolicyBody != nil && len(*s.StackPolicyBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackPolicyBody", 1)) - } - if s.StackPolicyURL != nil && len(*s.StackPolicyURL) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackPolicyURL", 1)) - } - if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) - } - if s.TemplateURL != nil && len(*s.TemplateURL) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1)) - } - if s.TimeoutInMinutes != nil && *s.TimeoutInMinutes < 1 { - invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutes", 1)) - } - if s.RollbackConfiguration != nil { - if err := s.RollbackConfiguration.Validate(); err != nil { - invalidParams.AddNested("RollbackConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCapabilities sets the Capabilities field's value. -func (s *CreateStackInput) SetCapabilities(v []*string) *CreateStackInput { - s.Capabilities = v - return s -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *CreateStackInput) SetClientRequestToken(v string) *CreateStackInput { - s.ClientRequestToken = &v - return s -} - -// SetDisableRollback sets the DisableRollback field's value. -func (s *CreateStackInput) SetDisableRollback(v bool) *CreateStackInput { - s.DisableRollback = &v - return s -} - -// SetEnableTerminationProtection sets the EnableTerminationProtection field's value. -func (s *CreateStackInput) SetEnableTerminationProtection(v bool) *CreateStackInput { - s.EnableTerminationProtection = &v - return s -} - -// SetNotificationARNs sets the NotificationARNs field's value. -func (s *CreateStackInput) SetNotificationARNs(v []*string) *CreateStackInput { - s.NotificationARNs = v - return s -} - -// SetOnFailure sets the OnFailure field's value. -func (s *CreateStackInput) SetOnFailure(v string) *CreateStackInput { - s.OnFailure = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *CreateStackInput) SetParameters(v []*Parameter) *CreateStackInput { - s.Parameters = v - return s -} - -// SetResourceTypes sets the ResourceTypes field's value. -func (s *CreateStackInput) SetResourceTypes(v []*string) *CreateStackInput { - s.ResourceTypes = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *CreateStackInput) SetRoleARN(v string) *CreateStackInput { - s.RoleARN = &v - return s -} - -// SetRollbackConfiguration sets the RollbackConfiguration field's value. -func (s *CreateStackInput) SetRollbackConfiguration(v *RollbackConfiguration) *CreateStackInput { - s.RollbackConfiguration = v - return s -} - -// SetStackName sets the StackName field's value. -func (s *CreateStackInput) SetStackName(v string) *CreateStackInput { - s.StackName = &v - return s -} - -// SetStackPolicyBody sets the StackPolicyBody field's value. -func (s *CreateStackInput) SetStackPolicyBody(v string) *CreateStackInput { - s.StackPolicyBody = &v - return s -} - -// SetStackPolicyURL sets the StackPolicyURL field's value. -func (s *CreateStackInput) SetStackPolicyURL(v string) *CreateStackInput { - s.StackPolicyURL = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateStackInput) SetTags(v []*Tag) *CreateStackInput { - s.Tags = v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *CreateStackInput) SetTemplateBody(v string) *CreateStackInput { - s.TemplateBody = &v - return s -} - -// SetTemplateURL sets the TemplateURL field's value. -func (s *CreateStackInput) SetTemplateURL(v string) *CreateStackInput { - s.TemplateURL = &v - return s -} - -// SetTimeoutInMinutes sets the TimeoutInMinutes field's value. -func (s *CreateStackInput) SetTimeoutInMinutes(v int64) *CreateStackInput { - s.TimeoutInMinutes = &v - return s -} - -type CreateStackInstancesInput struct { - _ struct{} `type:"structure"` - - // The names of one or more AWS accounts that you want to create stack instances - // in the specified region(s) for. - // - // Accounts is a required field - Accounts []*string `type:"list" required:"true"` - - // The unique identifier for this stack set operation. - // - // The operation ID also functions as an idempotency token, to ensure that AWS - // CloudFormation performs the stack set operation only once, even if you retry - // the request multiple times. You might retry stack set operation requests - // to ensure that AWS CloudFormation successfully received them. - // - // If you don't specify an operation ID, the SDK generates one automatically. - // - // Repeating this stack set operation with a new operation ID retries all stack - // instances whose status is OUTDATED. - OperationId *string `min:"1" type:"string" idempotencyToken:"true"` - - // Preferences for how AWS CloudFormation performs this stack set operation. - OperationPreferences *StackSetOperationPreferences `type:"structure"` - - // A list of stack set parameters whose values you want to override in the selected - // stack instances. - // - // Any overridden parameter values will be applied to all stack instances in - // the specified accounts and regions. When specifying parameters and their - // values, be aware of how AWS CloudFormation sets parameter values during stack - // instance operations: - // - // * To override the current value for a parameter, include the parameter - // and specify its value. - // - // * To leave a parameter set to its present value, you can do one of the - // following: - // - // Do not include the parameter in the list. - // - // Include the parameter and specify UsePreviousValue as true. (You cannot specify - // both a value and set UsePreviousValue to true.) - // - // * To set all overridden parameter back to the values specified in the - // stack set, specify a parameter list but do not include any parameters. - // - // * To leave all parameters set to their present values, do not specify - // this property at all. - // - // During stack set updates, any parameter values overridden for a stack instance - // are not updated, but retain their overridden value. - // - // You can only override the parameter values that are specified in the stack - // set; to add or delete a parameter itself, use UpdateStackSet (http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html) - // to update the stack set template. - ParameterOverrides []*Parameter `type:"list"` - - // The names of one or more regions where you want to create stack instances - // using the specified AWS account(s). - // - // Regions is a required field - Regions []*string `type:"list" required:"true"` - - // The name or unique ID of the stack set that you want to create stack instances - // from. - // - // StackSetName is a required field - StackSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateStackInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStackInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStackInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStackInstancesInput"} - if s.Accounts == nil { - invalidParams.Add(request.NewErrParamRequired("Accounts")) - } - if s.OperationId != nil && len(*s.OperationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OperationId", 1)) - } - if s.Regions == nil { - invalidParams.Add(request.NewErrParamRequired("Regions")) - } - if s.StackSetName == nil { - invalidParams.Add(request.NewErrParamRequired("StackSetName")) - } - if s.OperationPreferences != nil { - if err := s.OperationPreferences.Validate(); err != nil { - invalidParams.AddNested("OperationPreferences", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccounts sets the Accounts field's value. -func (s *CreateStackInstancesInput) SetAccounts(v []*string) *CreateStackInstancesInput { - s.Accounts = v - return s -} - -// SetOperationId sets the OperationId field's value. -func (s *CreateStackInstancesInput) SetOperationId(v string) *CreateStackInstancesInput { - s.OperationId = &v - return s -} - -// SetOperationPreferences sets the OperationPreferences field's value. -func (s *CreateStackInstancesInput) SetOperationPreferences(v *StackSetOperationPreferences) *CreateStackInstancesInput { - s.OperationPreferences = v - return s -} - -// SetParameterOverrides sets the ParameterOverrides field's value. -func (s *CreateStackInstancesInput) SetParameterOverrides(v []*Parameter) *CreateStackInstancesInput { - s.ParameterOverrides = v - return s -} - -// SetRegions sets the Regions field's value. -func (s *CreateStackInstancesInput) SetRegions(v []*string) *CreateStackInstancesInput { - s.Regions = v - return s -} - -// SetStackSetName sets the StackSetName field's value. -func (s *CreateStackInstancesInput) SetStackSetName(v string) *CreateStackInstancesInput { - s.StackSetName = &v - return s -} - -type CreateStackInstancesOutput struct { - _ struct{} `type:"structure"` - - // The unique identifier for this stack set operation. - OperationId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateStackInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStackInstancesOutput) GoString() string { - return s.String() -} - -// SetOperationId sets the OperationId field's value. -func (s *CreateStackInstancesOutput) SetOperationId(v string) *CreateStackInstancesOutput { - s.OperationId = &v - return s -} - -// The output for a CreateStack action. -type CreateStackOutput struct { - _ struct{} `type:"structure"` - - // Unique identifier of the stack. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s CreateStackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStackOutput) GoString() string { - return s.String() -} - -// SetStackId sets the StackId field's value. -func (s *CreateStackOutput) SetStackId(v string) *CreateStackOutput { - s.StackId = &v - return s -} - -type CreateStackSetInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Number (ARN) of the IAM role to use to create this stack - // set. - // - // Specify an IAM role only if you are using customized administrator roles - // to control which users or groups can manage specific stack sets within the - // same administrator account. For more information, see Prerequisites: Granting - // Permissions for Stack Set Operations (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) - // in the AWS CloudFormation User Guide. - AdministrationRoleARN *string `min:"20" type:"string"` - - // In some cases, you must explicity acknowledge that your stack set template - // contains certain capabilities in order for AWS CloudFormation to create the - // stack set and related stack instances. - // - // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM - // - // Some stack templates might include resources that can affect permissions - // in your AWS account; for example, by creating new AWS Identity and Access - // Management (IAM) users. For those stack sets, you must explicitly acknowledge - // this by specifying one of these capabilities. - // - // The following IAM resources require you to specify either the CAPABILITY_IAM - // or CAPABILITY_NAMED_IAM capability. - // - // If you have IAM resources, you can specify either capability. - // - // If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. - // - // - // If you don't specify either of these capabilities, AWS CloudFormation returns - // an InsufficientCapabilities error. - // - // If your stack template contains these resources, we recommend that you review - // all permissions associated with them and edit their permissions if necessary. - // - // AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) - // - // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) - // - // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) - // - // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) - // - // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) - // - // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) - // - // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) - // - // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). - // - // * CAPABILITY_AUTO_EXPAND - // - // Some templates contain macros. If your stack template contains one or more - // macros, and you choose to create a stack directly from the processed template, - // without first reviewing the resulting changes in a change set, you must - // acknowledge this capability. For more information, see Using AWS CloudFormation - // Macros to Perform Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). - // - // Stack sets do not currently support macros in stack templates. (This includes - // the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) - // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) - // transforms, which are macros hosted by AWS CloudFormation.) Even if you - // specify this capability, if you include a macro in your template the stack - // set operation will fail. - Capabilities []*string `type:"list"` - - // A unique identifier for this CreateStackSet request. Specify this token if - // you plan to retry requests so that AWS CloudFormation knows that you're not - // attempting to create another stack set with the same name. You might retry - // CreateStackSet requests to ensure that AWS CloudFormation successfully received - // them. - // - // If you don't specify an operation ID, the SDK generates one automatically. - ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // A description of the stack set. You can use the description to identify the - // stack set's purpose or other important information. - Description *string `min:"1" type:"string"` - - // The name of the IAM execution role to use to create the stack set. If you - // do not specify an execution role, AWS CloudFormation uses the AWSCloudFormationStackSetExecutionRole - // role for the stack set operation. - // - // Specify an IAM role only if you are using customized execution roles to control - // which stack resources users and groups can include in their stack sets. - ExecutionRoleName *string `min:"1" type:"string"` - - // The input parameters for the stack set template. - Parameters []*Parameter `type:"list"` - - // The name to associate with the stack set. The name must be unique in the - // region where you create your stack set. - // - // A stack name can contain only alphanumeric characters (case-sensitive) and - // hyphens. It must start with an alphabetic character and can't be longer than - // 128 characters. - // - // StackSetName is a required field - StackSetName *string `type:"string" required:"true"` - - // The key-value pairs to associate with this stack set and the stacks created - // from it. AWS CloudFormation also propagates these tags to supported resources - // that are created in the stacks. A maximum number of 50 tags can be specified. - // - // If you specify tags as part of a CreateStackSet action, AWS CloudFormation - // checks to see if you have the required IAM permission to tag resources. If - // you don't, the entire CreateStackSet action fails with an access denied error, - // and the stack set is not created. - Tags []*Tag `type:"list"` - - // The structure that contains the template body, with a minimum length of 1 - // byte and a maximum length of 51,200 bytes. For more information, see Template - // Anatomy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide. - // - // Conditional: You must specify either the TemplateBody or the TemplateURL - // parameter, but not both. - TemplateBody *string `min:"1" type:"string"` - - // The location of the file that contains the template body. The URL must point - // to a template (maximum size: 460,800 bytes) that's located in an Amazon S3 - // bucket. For more information, see Template Anatomy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide. - // - // Conditional: You must specify either the TemplateBody or the TemplateURL - // parameter, but not both. - TemplateURL *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateStackSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStackSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStackSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStackSetInput"} - if s.AdministrationRoleARN != nil && len(*s.AdministrationRoleARN) < 20 { - invalidParams.Add(request.NewErrParamMinLen("AdministrationRoleARN", 20)) - } - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) - } - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.ExecutionRoleName != nil && len(*s.ExecutionRoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleName", 1)) - } - if s.StackSetName == nil { - invalidParams.Add(request.NewErrParamRequired("StackSetName")) - } - if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) - } - if s.TemplateURL != nil && len(*s.TemplateURL) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdministrationRoleARN sets the AdministrationRoleARN field's value. -func (s *CreateStackSetInput) SetAdministrationRoleARN(v string) *CreateStackSetInput { - s.AdministrationRoleARN = &v - return s -} - -// SetCapabilities sets the Capabilities field's value. -func (s *CreateStackSetInput) SetCapabilities(v []*string) *CreateStackSetInput { - s.Capabilities = v - return s -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *CreateStackSetInput) SetClientRequestToken(v string) *CreateStackSetInput { - s.ClientRequestToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateStackSetInput) SetDescription(v string) *CreateStackSetInput { - s.Description = &v - return s -} - -// SetExecutionRoleName sets the ExecutionRoleName field's value. -func (s *CreateStackSetInput) SetExecutionRoleName(v string) *CreateStackSetInput { - s.ExecutionRoleName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *CreateStackSetInput) SetParameters(v []*Parameter) *CreateStackSetInput { - s.Parameters = v - return s -} - -// SetStackSetName sets the StackSetName field's value. -func (s *CreateStackSetInput) SetStackSetName(v string) *CreateStackSetInput { - s.StackSetName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateStackSetInput) SetTags(v []*Tag) *CreateStackSetInput { - s.Tags = v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *CreateStackSetInput) SetTemplateBody(v string) *CreateStackSetInput { - s.TemplateBody = &v - return s -} - -// SetTemplateURL sets the TemplateURL field's value. -func (s *CreateStackSetInput) SetTemplateURL(v string) *CreateStackSetInput { - s.TemplateURL = &v - return s -} - -type CreateStackSetOutput struct { - _ struct{} `type:"structure"` - - // The ID of the stack set that you're creating. - StackSetId *string `type:"string"` -} - -// String returns the string representation -func (s CreateStackSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStackSetOutput) GoString() string { - return s.String() -} - -// SetStackSetId sets the StackSetId field's value. -func (s *CreateStackSetOutput) SetStackSetId(v string) *CreateStackSetOutput { - s.StackSetId = &v - return s -} - -// The input for the DeleteChangeSet action. -type DeleteChangeSetInput struct { - _ struct{} `type:"structure"` - - // The name or Amazon Resource Name (ARN) of the change set that you want to - // delete. - // - // ChangeSetName is a required field - ChangeSetName *string `min:"1" type:"string" required:"true"` - - // If you specified the name of a change set to delete, specify the stack name - // or ID (ARN) that is associated with it. - StackName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteChangeSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteChangeSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteChangeSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteChangeSetInput"} - if s.ChangeSetName == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeSetName")) - } - if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1)) - } - if s.StackName != nil && len(*s.StackName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeSetName sets the ChangeSetName field's value. -func (s *DeleteChangeSetInput) SetChangeSetName(v string) *DeleteChangeSetInput { - s.ChangeSetName = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *DeleteChangeSetInput) SetStackName(v string) *DeleteChangeSetInput { - s.StackName = &v - return s -} - -// The output for the DeleteChangeSet action. -type DeleteChangeSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteChangeSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteChangeSetOutput) GoString() string { - return s.String() -} - -// The input for DeleteStack action. -type DeleteStackInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for this DeleteStack request. Specify this token if you - // plan to retry requests so that AWS CloudFormation knows that you're not attempting - // to delete a stack with the same name. You might retry DeleteStack requests - // to ensure that AWS CloudFormation successfully received them. - // - // All events triggered by a given stack operation are assigned the same client - // request token, which you can use to track operations. For example, if you - // execute a CreateStack operation with the token token1, then all the StackEvents - // generated by that operation will have ClientRequestToken set as token1. - // - // In the console, stack operations display the client request token on the - // Events tab. Stack operations that are initiated from the console use the - // token format Console-StackOperation-ID, which helps you easily identify the - // stack operation . For example, if you create a stack using the console, each - // stack event would be assigned the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002. - ClientRequestToken *string `min:"1" type:"string"` - - // For stacks in the DELETE_FAILED state, a list of resource logical IDs that - // are associated with the resources you want to retain. During deletion, AWS - // CloudFormation deletes the stack but does not delete the retained resources. - // - // Retaining resources is useful when you cannot delete a resource, such as - // a non-empty S3 bucket, but you want to delete the stack. - RetainResources []*string `type:"list"` - - // The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) - // role that AWS CloudFormation assumes to delete the stack. AWS CloudFormation - // uses the role's credentials to make calls on your behalf. - // - // If you don't specify a value, AWS CloudFormation uses the role that was previously - // associated with the stack. If no role is available, AWS CloudFormation uses - // a temporary session that is generated from your user credentials. - RoleARN *string `min:"20" type:"string"` - - // The name or the unique stack ID that is associated with the stack. - // - // StackName is a required field - StackName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteStackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteStackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteStackInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) - } - if s.RoleARN != nil && len(*s.RoleARN) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 20)) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *DeleteStackInput) SetClientRequestToken(v string) *DeleteStackInput { - s.ClientRequestToken = &v - return s -} - -// SetRetainResources sets the RetainResources field's value. -func (s *DeleteStackInput) SetRetainResources(v []*string) *DeleteStackInput { - s.RetainResources = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *DeleteStackInput) SetRoleARN(v string) *DeleteStackInput { - s.RoleARN = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *DeleteStackInput) SetStackName(v string) *DeleteStackInput { - s.StackName = &v - return s -} - -type DeleteStackInstancesInput struct { - _ struct{} `type:"structure"` - - // The names of the AWS accounts that you want to delete stack instances for. - // - // Accounts is a required field - Accounts []*string `type:"list" required:"true"` - - // The unique identifier for this stack set operation. - // - // If you don't specify an operation ID, the SDK generates one automatically. - // - // The operation ID also functions as an idempotency token, to ensure that AWS - // CloudFormation performs the stack set operation only once, even if you retry - // the request multiple times. You can retry stack set operation requests to - // ensure that AWS CloudFormation successfully received them. - // - // Repeating this stack set operation with a new operation ID retries all stack - // instances whose status is OUTDATED. - OperationId *string `min:"1" type:"string" idempotencyToken:"true"` - - // Preferences for how AWS CloudFormation performs this stack set operation. - OperationPreferences *StackSetOperationPreferences `type:"structure"` - - // The regions where you want to delete stack set instances. - // - // Regions is a required field - Regions []*string `type:"list" required:"true"` - - // Removes the stack instances from the specified stack set, but doesn't delete - // the stacks. You can't reassociate a retained stack or add an existing, saved - // stack to a new stack set. - // - // For more information, see Stack set operation options (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stackset-ops-options). - // - // RetainStacks is a required field - RetainStacks *bool `type:"boolean" required:"true"` - - // The name or unique ID of the stack set that you want to delete stack instances - // for. - // - // StackSetName is a required field - StackSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteStackInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStackInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteStackInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteStackInstancesInput"} - if s.Accounts == nil { - invalidParams.Add(request.NewErrParamRequired("Accounts")) - } - if s.OperationId != nil && len(*s.OperationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OperationId", 1)) - } - if s.Regions == nil { - invalidParams.Add(request.NewErrParamRequired("Regions")) - } - if s.RetainStacks == nil { - invalidParams.Add(request.NewErrParamRequired("RetainStacks")) - } - if s.StackSetName == nil { - invalidParams.Add(request.NewErrParamRequired("StackSetName")) - } - if s.OperationPreferences != nil { - if err := s.OperationPreferences.Validate(); err != nil { - invalidParams.AddNested("OperationPreferences", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccounts sets the Accounts field's value. -func (s *DeleteStackInstancesInput) SetAccounts(v []*string) *DeleteStackInstancesInput { - s.Accounts = v - return s -} - -// SetOperationId sets the OperationId field's value. -func (s *DeleteStackInstancesInput) SetOperationId(v string) *DeleteStackInstancesInput { - s.OperationId = &v - return s -} - -// SetOperationPreferences sets the OperationPreferences field's value. -func (s *DeleteStackInstancesInput) SetOperationPreferences(v *StackSetOperationPreferences) *DeleteStackInstancesInput { - s.OperationPreferences = v - return s -} - -// SetRegions sets the Regions field's value. -func (s *DeleteStackInstancesInput) SetRegions(v []*string) *DeleteStackInstancesInput { - s.Regions = v - return s -} - -// SetRetainStacks sets the RetainStacks field's value. -func (s *DeleteStackInstancesInput) SetRetainStacks(v bool) *DeleteStackInstancesInput { - s.RetainStacks = &v - return s -} - -// SetStackSetName sets the StackSetName field's value. -func (s *DeleteStackInstancesInput) SetStackSetName(v string) *DeleteStackInstancesInput { - s.StackSetName = &v - return s -} - -type DeleteStackInstancesOutput struct { - _ struct{} `type:"structure"` - - // The unique identifier for this stack set operation. - OperationId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteStackInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStackInstancesOutput) GoString() string { - return s.String() -} - -// SetOperationId sets the OperationId field's value. -func (s *DeleteStackInstancesOutput) SetOperationId(v string) *DeleteStackInstancesOutput { - s.OperationId = &v - return s -} - -type DeleteStackOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteStackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStackOutput) GoString() string { - return s.String() -} - -type DeleteStackSetInput struct { - _ struct{} `type:"structure"` - - // The name or unique ID of the stack set that you're deleting. You can obtain - // this value by running ListStackSets. - // - // StackSetName is a required field - StackSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteStackSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStackSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteStackSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteStackSetInput"} - if s.StackSetName == nil { - invalidParams.Add(request.NewErrParamRequired("StackSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStackSetName sets the StackSetName field's value. -func (s *DeleteStackSetInput) SetStackSetName(v string) *DeleteStackSetInput { - s.StackSetName = &v - return s -} - -type DeleteStackSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteStackSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStackSetOutput) GoString() string { - return s.String() -} - -// The input for the DescribeAccountLimits action. -type DescribeAccountLimitsInput struct { - _ struct{} `type:"structure"` - - // A string that identifies the next page of limits that you want to retrieve. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeAccountLimitsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountLimitsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAccountLimitsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAccountLimitsInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAccountLimitsInput) SetNextToken(v string) *DescribeAccountLimitsInput { - s.NextToken = &v - return s -} - -// The output for the DescribeAccountLimits action. -type DescribeAccountLimitsOutput struct { - _ struct{} `type:"structure"` - - // An account limit structure that contain a list of AWS CloudFormation account - // limits and their values. - AccountLimits []*AccountLimit `type:"list"` - - // If the output exceeds 1 MB in size, a string that identifies the next page - // of limits. If no additional page exists, this value is null. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeAccountLimitsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountLimitsOutput) GoString() string { - return s.String() -} - -// SetAccountLimits sets the AccountLimits field's value. -func (s *DescribeAccountLimitsOutput) SetAccountLimits(v []*AccountLimit) *DescribeAccountLimitsOutput { - s.AccountLimits = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAccountLimitsOutput) SetNextToken(v string) *DescribeAccountLimitsOutput { - s.NextToken = &v - return s -} - -// The input for the DescribeChangeSet action. -type DescribeChangeSetInput struct { - _ struct{} `type:"structure"` - - // The name or Amazon Resource Name (ARN) of the change set that you want to - // describe. - // - // ChangeSetName is a required field - ChangeSetName *string `min:"1" type:"string" required:"true"` - - // A string (provided by the DescribeChangeSet response output) that identifies - // the next page of information that you want to retrieve. - NextToken *string `min:"1" type:"string"` - - // If you specified the name of a change set, specify the stack name or ID (ARN) - // of the change set you want to describe. - StackName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeChangeSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeChangeSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeChangeSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeChangeSetInput"} - if s.ChangeSetName == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeSetName")) - } - if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.StackName != nil && len(*s.StackName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeSetName sets the ChangeSetName field's value. -func (s *DescribeChangeSetInput) SetChangeSetName(v string) *DescribeChangeSetInput { - s.ChangeSetName = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeChangeSetInput) SetNextToken(v string) *DescribeChangeSetInput { - s.NextToken = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *DescribeChangeSetInput) SetStackName(v string) *DescribeChangeSetInput { - s.StackName = &v - return s -} - -// The output for the DescribeChangeSet action. -type DescribeChangeSetOutput struct { - _ struct{} `type:"structure"` - - // If you execute the change set, the list of capabilities that were explicitly - // acknowledged when the change set was created. - Capabilities []*string `type:"list"` - - // The ARN of the change set. - ChangeSetId *string `min:"1" type:"string"` - - // The name of the change set. - ChangeSetName *string `min:"1" type:"string"` - - // A list of Change structures that describes the resources AWS CloudFormation - // changes if you execute the change set. - Changes []*Change `type:"list"` - - // The start time when the change set was created, in UTC. - CreationTime *time.Time `type:"timestamp"` - - // Information about the change set. - Description *string `min:"1" type:"string"` - - // If the change set execution status is AVAILABLE, you can execute the change - // set. If you can’t execute the change set, the status indicates why. For example, - // a change set might be in an UNAVAILABLE state because AWS CloudFormation - // is still creating it or in an OBSOLETE state because the stack was already - // updated. - ExecutionStatus *string `type:"string" enum:"ExecutionStatus"` - - // If the output exceeds 1 MB, a string that identifies the next page of changes. - // If there is no additional page, this value is null. - NextToken *string `min:"1" type:"string"` - - // The ARNs of the Amazon Simple Notification Service (Amazon SNS) topics that - // will be associated with the stack if you execute the change set. - NotificationARNs []*string `type:"list"` - - // A list of Parameter structures that describes the input parameters and their - // values used to create the change set. For more information, see the Parameter - // (http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html) - // data type. - Parameters []*Parameter `type:"list"` - - // The rollback triggers for AWS CloudFormation to monitor during stack creation - // and updating operations, and for the specified monitoring period afterwards. - RollbackConfiguration *RollbackConfiguration `type:"structure"` - - // The ARN of the stack that is associated with the change set. - StackId *string `type:"string"` - - // The name of the stack that is associated with the change set. - StackName *string `type:"string"` - - // The current status of the change set, such as CREATE_IN_PROGRESS, CREATE_COMPLETE, - // or FAILED. - Status *string `type:"string" enum:"ChangeSetStatus"` - - // A description of the change set's status. For example, if your attempt to - // create a change set failed, AWS CloudFormation shows the error message. - StatusReason *string `type:"string"` - - // If you execute the change set, the tags that will be associated with the - // stack. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s DescribeChangeSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeChangeSetOutput) GoString() string { - return s.String() -} - -// SetCapabilities sets the Capabilities field's value. -func (s *DescribeChangeSetOutput) SetCapabilities(v []*string) *DescribeChangeSetOutput { - s.Capabilities = v - return s -} - -// SetChangeSetId sets the ChangeSetId field's value. -func (s *DescribeChangeSetOutput) SetChangeSetId(v string) *DescribeChangeSetOutput { - s.ChangeSetId = &v - return s -} - -// SetChangeSetName sets the ChangeSetName field's value. -func (s *DescribeChangeSetOutput) SetChangeSetName(v string) *DescribeChangeSetOutput { - s.ChangeSetName = &v - return s -} - -// SetChanges sets the Changes field's value. -func (s *DescribeChangeSetOutput) SetChanges(v []*Change) *DescribeChangeSetOutput { - s.Changes = v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeChangeSetOutput) SetCreationTime(v time.Time) *DescribeChangeSetOutput { - s.CreationTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DescribeChangeSetOutput) SetDescription(v string) *DescribeChangeSetOutput { - s.Description = &v - return s -} - -// SetExecutionStatus sets the ExecutionStatus field's value. -func (s *DescribeChangeSetOutput) SetExecutionStatus(v string) *DescribeChangeSetOutput { - s.ExecutionStatus = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeChangeSetOutput) SetNextToken(v string) *DescribeChangeSetOutput { - s.NextToken = &v - return s -} - -// SetNotificationARNs sets the NotificationARNs field's value. -func (s *DescribeChangeSetOutput) SetNotificationARNs(v []*string) *DescribeChangeSetOutput { - s.NotificationARNs = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DescribeChangeSetOutput) SetParameters(v []*Parameter) *DescribeChangeSetOutput { - s.Parameters = v - return s -} - -// SetRollbackConfiguration sets the RollbackConfiguration field's value. -func (s *DescribeChangeSetOutput) SetRollbackConfiguration(v *RollbackConfiguration) *DescribeChangeSetOutput { - s.RollbackConfiguration = v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribeChangeSetOutput) SetStackId(v string) *DescribeChangeSetOutput { - s.StackId = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *DescribeChangeSetOutput) SetStackName(v string) *DescribeChangeSetOutput { - s.StackName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeChangeSetOutput) SetStatus(v string) *DescribeChangeSetOutput { - s.Status = &v - return s -} - -// SetStatusReason sets the StatusReason field's value. -func (s *DescribeChangeSetOutput) SetStatusReason(v string) *DescribeChangeSetOutput { - s.StatusReason = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *DescribeChangeSetOutput) SetTags(v []*Tag) *DescribeChangeSetOutput { - s.Tags = v - return s -} - -type DescribeStackDriftDetectionStatusInput struct { - _ struct{} `type:"structure"` - - // The ID of the drift detection results of this operation. - // - // AWS CloudFormation generates new results, with a new drift detection ID, - // each time this operation is run. However, the number of drift results AWS - // CloudFormation retains for any given stack, and for how long, may vary. - // - // StackDriftDetectionId is a required field - StackDriftDetectionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeStackDriftDetectionStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackDriftDetectionStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStackDriftDetectionStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStackDriftDetectionStatusInput"} - if s.StackDriftDetectionId == nil { - invalidParams.Add(request.NewErrParamRequired("StackDriftDetectionId")) - } - if s.StackDriftDetectionId != nil && len(*s.StackDriftDetectionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackDriftDetectionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStackDriftDetectionId sets the StackDriftDetectionId field's value. -func (s *DescribeStackDriftDetectionStatusInput) SetStackDriftDetectionId(v string) *DescribeStackDriftDetectionStatusInput { - s.StackDriftDetectionId = &v - return s -} - -type DescribeStackDriftDetectionStatusOutput struct { - _ struct{} `type:"structure"` - - // The status of the stack drift detection operation. - // - // * DETECTION_COMPLETE: The stack drift detection operation has successfully - // completed for all resources in the stack that support drift detection. - // (Resources that do not currently support stack detection remain unchecked.) - // - // If you specified logical resource IDs for AWS CloudFormation to use as a - // filter for the stack drift detection operation, only the resources with - // those logical IDs are checked for drift. - // - // * DETECTION_FAILED: The stack drift detection operation has failed for - // at least one resource in the stack. Results will be available for resources - // on which AWS CloudFormation successfully completed drift detection. - // - // * DETECTION_IN_PROGRESS: The stack drift detection operation is currently - // in progress. - // - // DetectionStatus is a required field - DetectionStatus *string `type:"string" required:"true" enum:"StackDriftDetectionStatus"` - - // The reason the stack drift detection operation has its current status. - DetectionStatusReason *string `type:"string"` - - // Total number of stack resources that have drifted. This is NULL until the - // drift detection operation reaches a status of DETECTION_COMPLETE. This value - // will be 0 for stacks whose drift status is IN_SYNC. - DriftedStackResourceCount *int64 `type:"integer"` - - // The ID of the drift detection results of this operation. - // - // AWS CloudFormation generates new results, with a new drift detection ID, - // each time this operation is run. However, the number of reports AWS CloudFormation - // retains for any given stack, and for how long, may vary. - // - // StackDriftDetectionId is a required field - StackDriftDetectionId *string `min:"1" type:"string" required:"true"` - - // Status of the stack's actual configuration compared to its expected configuration. - // - // * DRIFTED: The stack differs from its expected template configuration. - // A stack is considered to have drifted if one or more of its resources - // have drifted. - // - // * NOT_CHECKED: AWS CloudFormation has not checked if the stack differs - // from its expected template configuration. - // - // * IN_SYNC: The stack's actual configuration matches its expected template - // configuration. - // - // * UNKNOWN: This value is reserved for future use. - StackDriftStatus *string `type:"string" enum:"StackDriftStatus"` - - // The ID of the stack. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` - - // Time at which the stack drift detection operation was initiated. - // - // Timestamp is a required field - Timestamp *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s DescribeStackDriftDetectionStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackDriftDetectionStatusOutput) GoString() string { - return s.String() -} - -// SetDetectionStatus sets the DetectionStatus field's value. -func (s *DescribeStackDriftDetectionStatusOutput) SetDetectionStatus(v string) *DescribeStackDriftDetectionStatusOutput { - s.DetectionStatus = &v - return s -} - -// SetDetectionStatusReason sets the DetectionStatusReason field's value. -func (s *DescribeStackDriftDetectionStatusOutput) SetDetectionStatusReason(v string) *DescribeStackDriftDetectionStatusOutput { - s.DetectionStatusReason = &v - return s -} - -// SetDriftedStackResourceCount sets the DriftedStackResourceCount field's value. -func (s *DescribeStackDriftDetectionStatusOutput) SetDriftedStackResourceCount(v int64) *DescribeStackDriftDetectionStatusOutput { - s.DriftedStackResourceCount = &v - return s -} - -// SetStackDriftDetectionId sets the StackDriftDetectionId field's value. -func (s *DescribeStackDriftDetectionStatusOutput) SetStackDriftDetectionId(v string) *DescribeStackDriftDetectionStatusOutput { - s.StackDriftDetectionId = &v - return s -} - -// SetStackDriftStatus sets the StackDriftStatus field's value. -func (s *DescribeStackDriftDetectionStatusOutput) SetStackDriftStatus(v string) *DescribeStackDriftDetectionStatusOutput { - s.StackDriftStatus = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribeStackDriftDetectionStatusOutput) SetStackId(v string) *DescribeStackDriftDetectionStatusOutput { - s.StackId = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *DescribeStackDriftDetectionStatusOutput) SetTimestamp(v time.Time) *DescribeStackDriftDetectionStatusOutput { - s.Timestamp = &v - return s -} - -// The input for DescribeStackEvents action. -type DescribeStackEventsInput struct { - _ struct{} `type:"structure"` - - // A string that identifies the next page of events that you want to retrieve. - NextToken *string `min:"1" type:"string"` - - // The name or the unique stack ID that is associated with the stack, which - // are not always interchangeable: - // - // * Running stacks: You can specify either the stack's name or its unique - // stack ID. - // - // * Deleted stacks: You must specify the unique stack ID. - // - // Default: There is no default value. - StackName *string `type:"string"` -} - -// String returns the string representation -func (s DescribeStackEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStackEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStackEventsInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeStackEventsInput) SetNextToken(v string) *DescribeStackEventsInput { - s.NextToken = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *DescribeStackEventsInput) SetStackName(v string) *DescribeStackEventsInput { - s.StackName = &v - return s -} - -// The output for a DescribeStackEvents action. -type DescribeStackEventsOutput struct { - _ struct{} `type:"structure"` - - // If the output exceeds 1 MB in size, a string that identifies the next page - // of events. If no additional page exists, this value is null. - NextToken *string `min:"1" type:"string"` - - // A list of StackEvents structures. - StackEvents []*StackEvent `type:"list"` -} - -// String returns the string representation -func (s DescribeStackEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackEventsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeStackEventsOutput) SetNextToken(v string) *DescribeStackEventsOutput { - s.NextToken = &v - return s -} - -// SetStackEvents sets the StackEvents field's value. -func (s *DescribeStackEventsOutput) SetStackEvents(v []*StackEvent) *DescribeStackEventsOutput { - s.StackEvents = v - return s -} - -type DescribeStackInstanceInput struct { - _ struct{} `type:"structure"` - - // The ID of an AWS account that's associated with this stack instance. - // - // StackInstanceAccount is a required field - StackInstanceAccount *string `type:"string" required:"true"` - - // The name of a region that's associated with this stack instance. - // - // StackInstanceRegion is a required field - StackInstanceRegion *string `type:"string" required:"true"` - - // The name or the unique stack ID of the stack set that you want to get stack - // instance information for. - // - // StackSetName is a required field - StackSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeStackInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStackInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStackInstanceInput"} - if s.StackInstanceAccount == nil { - invalidParams.Add(request.NewErrParamRequired("StackInstanceAccount")) - } - if s.StackInstanceRegion == nil { - invalidParams.Add(request.NewErrParamRequired("StackInstanceRegion")) - } - if s.StackSetName == nil { - invalidParams.Add(request.NewErrParamRequired("StackSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStackInstanceAccount sets the StackInstanceAccount field's value. -func (s *DescribeStackInstanceInput) SetStackInstanceAccount(v string) *DescribeStackInstanceInput { - s.StackInstanceAccount = &v - return s -} - -// SetStackInstanceRegion sets the StackInstanceRegion field's value. -func (s *DescribeStackInstanceInput) SetStackInstanceRegion(v string) *DescribeStackInstanceInput { - s.StackInstanceRegion = &v - return s -} - -// SetStackSetName sets the StackSetName field's value. -func (s *DescribeStackInstanceInput) SetStackSetName(v string) *DescribeStackInstanceInput { - s.StackSetName = &v - return s -} - -type DescribeStackInstanceOutput struct { - _ struct{} `type:"structure"` - - // The stack instance that matches the specified request parameters. - StackInstance *StackInstance `type:"structure"` -} - -// String returns the string representation -func (s DescribeStackInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackInstanceOutput) GoString() string { - return s.String() -} - -// SetStackInstance sets the StackInstance field's value. -func (s *DescribeStackInstanceOutput) SetStackInstance(v *StackInstance) *DescribeStackInstanceOutput { - s.StackInstance = v - return s -} - -type DescribeStackResourceDriftsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to be returned with a single call. If the number - // of available results exceeds this maximum, the response includes a NextToken - // value that you can assign to the NextToken request parameter to get the next - // set of results. - MaxResults *int64 `min:"1" type:"integer"` - - // A string that identifies the next page of stack resource drift results. - NextToken *string `min:"1" type:"string"` - - // The name of the stack for which you want drift information. - // - // StackName is a required field - StackName *string `min:"1" type:"string" required:"true"` - - // The resource drift status values to use as filters for the resource drift - // results returned. - // - // * DELETED: The resource differs from its expected template configuration - // in that the resource has been deleted. - // - // * MODIFIED: One or more resource properties differ from their expected - // template values. - // - // * IN_SYNC: The resources's actual configuration matches its expected template - // configuration. - // - // * NOT_CHECKED: AWS CloudFormation does not currently return this value. - StackResourceDriftStatusFilters []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s DescribeStackResourceDriftsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackResourceDriftsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStackResourceDriftsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStackResourceDriftsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - if s.StackName != nil && len(*s.StackName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) - } - if s.StackResourceDriftStatusFilters != nil && len(s.StackResourceDriftStatusFilters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackResourceDriftStatusFilters", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeStackResourceDriftsInput) SetMaxResults(v int64) *DescribeStackResourceDriftsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeStackResourceDriftsInput) SetNextToken(v string) *DescribeStackResourceDriftsInput { - s.NextToken = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *DescribeStackResourceDriftsInput) SetStackName(v string) *DescribeStackResourceDriftsInput { - s.StackName = &v - return s -} - -// SetStackResourceDriftStatusFilters sets the StackResourceDriftStatusFilters field's value. -func (s *DescribeStackResourceDriftsInput) SetStackResourceDriftStatusFilters(v []*string) *DescribeStackResourceDriftsInput { - s.StackResourceDriftStatusFilters = v - return s -} - -type DescribeStackResourceDriftsOutput struct { - _ struct{} `type:"structure"` - - // If the request doesn't return all of the remaining results, NextToken is - // set to a token. To retrieve the next set of results, call DescribeStackResourceDrifts - // again and assign that token to the request object's NextToken parameter. - // If the request returns all results, NextToken is set to null. - NextToken *string `min:"1" type:"string"` - - // Drift information for the resources that have been checked for drift in the - // specified stack. This includes actual and expected configuration values for - // resources where AWS CloudFormation detects drift. - // - // For a given stack, there will be one StackResourceDrift for each stack resource - // that has been checked for drift. Resources that have not yet been checked - // for drift are not included. Resources that do not currently support drift - // detection are not checked, and so not included. For a list of resources that - // support drift detection, see Resources that Support Drift Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). - // - // StackResourceDrifts is a required field - StackResourceDrifts []*StackResourceDrift `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeStackResourceDriftsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackResourceDriftsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeStackResourceDriftsOutput) SetNextToken(v string) *DescribeStackResourceDriftsOutput { - s.NextToken = &v - return s -} - -// SetStackResourceDrifts sets the StackResourceDrifts field's value. -func (s *DescribeStackResourceDriftsOutput) SetStackResourceDrifts(v []*StackResourceDrift) *DescribeStackResourceDriftsOutput { - s.StackResourceDrifts = v - return s -} - -// The input for DescribeStackResource action. -type DescribeStackResourceInput struct { - _ struct{} `type:"structure"` - - // The logical name of the resource as specified in the template. - // - // Default: There is no default value. - // - // LogicalResourceId is a required field - LogicalResourceId *string `type:"string" required:"true"` - - // The name or the unique stack ID that is associated with the stack, which - // are not always interchangeable: - // - // * Running stacks: You can specify either the stack's name or its unique - // stack ID. - // - // * Deleted stacks: You must specify the unique stack ID. - // - // Default: There is no default value. - // - // StackName is a required field - StackName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeStackResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStackResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStackResourceInput"} - if s.LogicalResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("LogicalResourceId")) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogicalResourceId sets the LogicalResourceId field's value. -func (s *DescribeStackResourceInput) SetLogicalResourceId(v string) *DescribeStackResourceInput { - s.LogicalResourceId = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *DescribeStackResourceInput) SetStackName(v string) *DescribeStackResourceInput { - s.StackName = &v - return s -} - -// The output for a DescribeStackResource action. -type DescribeStackResourceOutput struct { - _ struct{} `type:"structure"` - - // A StackResourceDetail structure containing the description of the specified - // resource in the specified stack. - StackResourceDetail *StackResourceDetail `type:"structure"` -} - -// String returns the string representation -func (s DescribeStackResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackResourceOutput) GoString() string { - return s.String() -} - -// SetStackResourceDetail sets the StackResourceDetail field's value. -func (s *DescribeStackResourceOutput) SetStackResourceDetail(v *StackResourceDetail) *DescribeStackResourceOutput { - s.StackResourceDetail = v - return s -} - -// The input for DescribeStackResources action. -type DescribeStackResourcesInput struct { - _ struct{} `type:"structure"` - - // The logical name of the resource as specified in the template. - // - // Default: There is no default value. - LogicalResourceId *string `type:"string"` - - // The name or unique identifier that corresponds to a physical instance ID - // of a resource supported by AWS CloudFormation. - // - // For example, for an Amazon Elastic Compute Cloud (EC2) instance, PhysicalResourceId - // corresponds to the InstanceId. You can pass the EC2 InstanceId to DescribeStackResources - // to find which stack the instance belongs to and what other resources are - // part of the stack. - // - // Required: Conditional. If you do not specify PhysicalResourceId, you must - // specify StackName. - // - // Default: There is no default value. - PhysicalResourceId *string `type:"string"` - - // The name or the unique stack ID that is associated with the stack, which - // are not always interchangeable: - // - // * Running stacks: You can specify either the stack's name or its unique - // stack ID. - // - // * Deleted stacks: You must specify the unique stack ID. - // - // Default: There is no default value. - // - // Required: Conditional. If you do not specify StackName, you must specify - // PhysicalResourceId. - StackName *string `type:"string"` -} - -// String returns the string representation -func (s DescribeStackResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackResourcesInput) GoString() string { - return s.String() -} - -// SetLogicalResourceId sets the LogicalResourceId field's value. -func (s *DescribeStackResourcesInput) SetLogicalResourceId(v string) *DescribeStackResourcesInput { - s.LogicalResourceId = &v - return s -} - -// SetPhysicalResourceId sets the PhysicalResourceId field's value. -func (s *DescribeStackResourcesInput) SetPhysicalResourceId(v string) *DescribeStackResourcesInput { - s.PhysicalResourceId = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *DescribeStackResourcesInput) SetStackName(v string) *DescribeStackResourcesInput { - s.StackName = &v - return s -} - -// The output for a DescribeStackResources action. -type DescribeStackResourcesOutput struct { - _ struct{} `type:"structure"` - - // A list of StackResource structures. - StackResources []*StackResource `type:"list"` -} - -// String returns the string representation -func (s DescribeStackResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackResourcesOutput) GoString() string { - return s.String() -} - -// SetStackResources sets the StackResources field's value. -func (s *DescribeStackResourcesOutput) SetStackResources(v []*StackResource) *DescribeStackResourcesOutput { - s.StackResources = v - return s -} - -type DescribeStackSetInput struct { - _ struct{} `type:"structure"` - - // The name or unique ID of the stack set whose description you want. - // - // StackSetName is a required field - StackSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeStackSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStackSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStackSetInput"} - if s.StackSetName == nil { - invalidParams.Add(request.NewErrParamRequired("StackSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStackSetName sets the StackSetName field's value. -func (s *DescribeStackSetInput) SetStackSetName(v string) *DescribeStackSetInput { - s.StackSetName = &v - return s -} - -type DescribeStackSetOperationInput struct { - _ struct{} `type:"structure"` - - // The unique ID of the stack set operation. - // - // OperationId is a required field - OperationId *string `min:"1" type:"string" required:"true"` - - // The name or the unique stack ID of the stack set for the stack operation. - // - // StackSetName is a required field - StackSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeStackSetOperationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackSetOperationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStackSetOperationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStackSetOperationInput"} - if s.OperationId == nil { - invalidParams.Add(request.NewErrParamRequired("OperationId")) - } - if s.OperationId != nil && len(*s.OperationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OperationId", 1)) - } - if s.StackSetName == nil { - invalidParams.Add(request.NewErrParamRequired("StackSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOperationId sets the OperationId field's value. -func (s *DescribeStackSetOperationInput) SetOperationId(v string) *DescribeStackSetOperationInput { - s.OperationId = &v - return s -} - -// SetStackSetName sets the StackSetName field's value. -func (s *DescribeStackSetOperationInput) SetStackSetName(v string) *DescribeStackSetOperationInput { - s.StackSetName = &v - return s -} - -type DescribeStackSetOperationOutput struct { - _ struct{} `type:"structure"` - - // The specified stack set operation. - StackSetOperation *StackSetOperation `type:"structure"` -} - -// String returns the string representation -func (s DescribeStackSetOperationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackSetOperationOutput) GoString() string { - return s.String() -} - -// SetStackSetOperation sets the StackSetOperation field's value. -func (s *DescribeStackSetOperationOutput) SetStackSetOperation(v *StackSetOperation) *DescribeStackSetOperationOutput { - s.StackSetOperation = v - return s -} - -type DescribeStackSetOutput struct { - _ struct{} `type:"structure"` - - // The specified stack set. - StackSet *StackSet `type:"structure"` -} - -// String returns the string representation -func (s DescribeStackSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackSetOutput) GoString() string { - return s.String() -} - -// SetStackSet sets the StackSet field's value. -func (s *DescribeStackSetOutput) SetStackSet(v *StackSet) *DescribeStackSetOutput { - s.StackSet = v - return s -} - -// The input for DescribeStacks action. -type DescribeStacksInput struct { - _ struct{} `type:"structure"` - - // A string that identifies the next page of stacks that you want to retrieve. - NextToken *string `min:"1" type:"string"` - - // The name or the unique stack ID that is associated with the stack, which - // are not always interchangeable: - // - // * Running stacks: You can specify either the stack's name or its unique - // stack ID. - // - // * Deleted stacks: You must specify the unique stack ID. - // - // Default: There is no default value. - StackName *string `type:"string"` -} - -// String returns the string representation -func (s DescribeStacksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStacksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStacksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStacksInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeStacksInput) SetNextToken(v string) *DescribeStacksInput { - s.NextToken = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *DescribeStacksInput) SetStackName(v string) *DescribeStacksInput { - s.StackName = &v - return s -} - -// The output for a DescribeStacks action. -type DescribeStacksOutput struct { - _ struct{} `type:"structure"` - - // If the output exceeds 1 MB in size, a string that identifies the next page - // of stacks. If no additional page exists, this value is null. - NextToken *string `min:"1" type:"string"` - - // A list of stack structures. - Stacks []*Stack `type:"list"` -} - -// String returns the string representation -func (s DescribeStacksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStacksOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeStacksOutput) SetNextToken(v string) *DescribeStacksOutput { - s.NextToken = &v - return s -} - -// SetStacks sets the Stacks field's value. -func (s *DescribeStacksOutput) SetStacks(v []*Stack) *DescribeStacksOutput { - s.Stacks = v - return s -} - -type DetectStackDriftInput struct { - _ struct{} `type:"structure"` - - // The logical names of any resources you want to use as filters. - LogicalResourceIds []*string `min:"1" type:"list"` - - // The name of the stack for which you want to detect drift. - // - // StackName is a required field - StackName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DetectStackDriftInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetectStackDriftInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetectStackDriftInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetectStackDriftInput"} - if s.LogicalResourceIds != nil && len(s.LogicalResourceIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogicalResourceIds", 1)) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - if s.StackName != nil && len(*s.StackName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogicalResourceIds sets the LogicalResourceIds field's value. -func (s *DetectStackDriftInput) SetLogicalResourceIds(v []*string) *DetectStackDriftInput { - s.LogicalResourceIds = v - return s -} - -// SetStackName sets the StackName field's value. -func (s *DetectStackDriftInput) SetStackName(v string) *DetectStackDriftInput { - s.StackName = &v - return s -} - -type DetectStackDriftOutput struct { - _ struct{} `type:"structure"` - - // The ID of the drift detection results of this operation. - // - // AWS CloudFormation generates new results, with a new drift detection ID, - // each time this operation is run. However, the number of drift results AWS - // CloudFormation retains for any given stack, and for how long, may vary. - // - // StackDriftDetectionId is a required field - StackDriftDetectionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DetectStackDriftOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetectStackDriftOutput) GoString() string { - return s.String() -} - -// SetStackDriftDetectionId sets the StackDriftDetectionId field's value. -func (s *DetectStackDriftOutput) SetStackDriftDetectionId(v string) *DetectStackDriftOutput { - s.StackDriftDetectionId = &v - return s -} - -type DetectStackResourceDriftInput struct { - _ struct{} `type:"structure"` - - // The logical name of the resource for which to return drift information. - // - // LogicalResourceId is a required field - LogicalResourceId *string `type:"string" required:"true"` - - // The name of the stack to which the resource belongs. - // - // StackName is a required field - StackName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DetectStackResourceDriftInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetectStackResourceDriftInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetectStackResourceDriftInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetectStackResourceDriftInput"} - if s.LogicalResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("LogicalResourceId")) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - if s.StackName != nil && len(*s.StackName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogicalResourceId sets the LogicalResourceId field's value. -func (s *DetectStackResourceDriftInput) SetLogicalResourceId(v string) *DetectStackResourceDriftInput { - s.LogicalResourceId = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *DetectStackResourceDriftInput) SetStackName(v string) *DetectStackResourceDriftInput { - s.StackName = &v - return s -} - -type DetectStackResourceDriftOutput struct { - _ struct{} `type:"structure"` - - // Information about whether the resource's actual configuration has drifted - // from its expected template configuration, including actual and expected property - // values and any differences detected. - // - // StackResourceDrift is a required field - StackResourceDrift *StackResourceDrift `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DetectStackResourceDriftOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetectStackResourceDriftOutput) GoString() string { - return s.String() -} - -// SetStackResourceDrift sets the StackResourceDrift field's value. -func (s *DetectStackResourceDriftOutput) SetStackResourceDrift(v *StackResourceDrift) *DetectStackResourceDriftOutput { - s.StackResourceDrift = v - return s -} - -// The input for an EstimateTemplateCost action. -type EstimateTemplateCostInput struct { - _ struct{} `type:"structure"` - - // A list of Parameter structures that specify input parameters. - Parameters []*Parameter `type:"list"` - - // Structure containing the template body with a minimum length of 1 byte and - // a maximum length of 51,200 bytes. (For more information, go to Template Anatomy - // (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide.) - // - // Conditional: You must pass TemplateBody or TemplateURL. If both are passed, - // only TemplateBody is used. - TemplateBody *string `min:"1" type:"string"` - - // Location of file containing the template body. The URL must point to a template - // that is located in an Amazon S3 bucket. For more information, go to Template - // Anatomy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide. - // - // Conditional: You must pass TemplateURL or TemplateBody. If both are passed, - // only TemplateBody is used. - TemplateURL *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s EstimateTemplateCostInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EstimateTemplateCostInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EstimateTemplateCostInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EstimateTemplateCostInput"} - if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) - } - if s.TemplateURL != nil && len(*s.TemplateURL) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParameters sets the Parameters field's value. -func (s *EstimateTemplateCostInput) SetParameters(v []*Parameter) *EstimateTemplateCostInput { - s.Parameters = v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *EstimateTemplateCostInput) SetTemplateBody(v string) *EstimateTemplateCostInput { - s.TemplateBody = &v - return s -} - -// SetTemplateURL sets the TemplateURL field's value. -func (s *EstimateTemplateCostInput) SetTemplateURL(v string) *EstimateTemplateCostInput { - s.TemplateURL = &v - return s -} - -// The output for a EstimateTemplateCost action. -type EstimateTemplateCostOutput struct { - _ struct{} `type:"structure"` - - // An AWS Simple Monthly Calculator URL with a query string that describes the - // resources required to run the template. - Url *string `type:"string"` -} - -// String returns the string representation -func (s EstimateTemplateCostOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EstimateTemplateCostOutput) GoString() string { - return s.String() -} - -// SetUrl sets the Url field's value. -func (s *EstimateTemplateCostOutput) SetUrl(v string) *EstimateTemplateCostOutput { - s.Url = &v - return s -} - -// The input for the ExecuteChangeSet action. -type ExecuteChangeSetInput struct { - _ struct{} `type:"structure"` - - // The name or ARN of the change set that you want use to update the specified - // stack. - // - // ChangeSetName is a required field - ChangeSetName *string `min:"1" type:"string" required:"true"` - - // A unique identifier for this ExecuteChangeSet request. Specify this token - // if you plan to retry requests so that AWS CloudFormation knows that you're - // not attempting to execute a change set to update a stack with the same name. - // You might retry ExecuteChangeSet requests to ensure that AWS CloudFormation - // successfully received them. - ClientRequestToken *string `min:"1" type:"string"` - - // If you specified the name of a change set, specify the stack name or ID (ARN) - // that is associated with the change set you want to execute. - StackName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ExecuteChangeSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecuteChangeSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExecuteChangeSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExecuteChangeSetInput"} - if s.ChangeSetName == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeSetName")) - } - if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1)) - } - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) - } - if s.StackName != nil && len(*s.StackName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeSetName sets the ChangeSetName field's value. -func (s *ExecuteChangeSetInput) SetChangeSetName(v string) *ExecuteChangeSetInput { - s.ChangeSetName = &v - return s -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *ExecuteChangeSetInput) SetClientRequestToken(v string) *ExecuteChangeSetInput { - s.ClientRequestToken = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *ExecuteChangeSetInput) SetStackName(v string) *ExecuteChangeSetInput { - s.StackName = &v - return s -} - -// The output for the ExecuteChangeSet action. -type ExecuteChangeSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ExecuteChangeSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecuteChangeSetOutput) GoString() string { - return s.String() -} - -// The Export structure describes the exported output values for a stack. -type Export struct { - _ struct{} `type:"structure"` - - // The stack that contains the exported output name and value. - ExportingStackId *string `type:"string"` - - // The name of exported output value. Use this name and the Fn::ImportValue - // function to import the associated value into other stacks. The name is defined - // in the Export field in the associated stack's Outputs section. - Name *string `type:"string"` - - // The value of the exported output, such as a resource physical ID. This value - // is defined in the Export field in the associated stack's Outputs section. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Export) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Export) GoString() string { - return s.String() -} - -// SetExportingStackId sets the ExportingStackId field's value. -func (s *Export) SetExportingStackId(v string) *Export { - s.ExportingStackId = &v - return s -} - -// SetName sets the Name field's value. -func (s *Export) SetName(v string) *Export { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Export) SetValue(v string) *Export { - s.Value = &v - return s -} - -// The input for the GetStackPolicy action. -type GetStackPolicyInput struct { - _ struct{} `type:"structure"` - - // The name or unique stack ID that is associated with the stack whose policy - // you want to get. - // - // StackName is a required field - StackName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetStackPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStackPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetStackPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetStackPolicyInput"} - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStackName sets the StackName field's value. -func (s *GetStackPolicyInput) SetStackName(v string) *GetStackPolicyInput { - s.StackName = &v - return s -} - -// The output for the GetStackPolicy action. -type GetStackPolicyOutput struct { - _ struct{} `type:"structure"` - - // Structure containing the stack policy body. (For more information, go to - // Prevent Updates to Stack Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html) - // in the AWS CloudFormation User Guide.) - StackPolicyBody *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetStackPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStackPolicyOutput) GoString() string { - return s.String() -} - -// SetStackPolicyBody sets the StackPolicyBody field's value. -func (s *GetStackPolicyOutput) SetStackPolicyBody(v string) *GetStackPolicyOutput { - s.StackPolicyBody = &v - return s -} - -// The input for a GetTemplate action. -type GetTemplateInput struct { - _ struct{} `type:"structure"` - - // The name or Amazon Resource Name (ARN) of a change set for which AWS CloudFormation - // returns the associated template. If you specify a name, you must also specify - // the StackName. - ChangeSetName *string `min:"1" type:"string"` - - // The name or the unique stack ID that is associated with the stack, which - // are not always interchangeable: - // - // * Running stacks: You can specify either the stack's name or its unique - // stack ID. - // - // * Deleted stacks: You must specify the unique stack ID. - // - // Default: There is no default value. - StackName *string `type:"string"` - - // For templates that include transforms, the stage of the template that AWS - // CloudFormation returns. To get the user-submitted template, specify Original. - // To get the template after AWS CloudFormation has processed all transforms, - // specify Processed. - // - // If the template doesn't include transforms, Original and Processed return - // the same template. By default, AWS CloudFormation specifies Original. - TemplateStage *string `type:"string" enum:"TemplateStage"` -} - -// String returns the string representation -func (s GetTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTemplateInput"} - if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeSetName sets the ChangeSetName field's value. -func (s *GetTemplateInput) SetChangeSetName(v string) *GetTemplateInput { - s.ChangeSetName = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *GetTemplateInput) SetStackName(v string) *GetTemplateInput { - s.StackName = &v - return s -} - -// SetTemplateStage sets the TemplateStage field's value. -func (s *GetTemplateInput) SetTemplateStage(v string) *GetTemplateInput { - s.TemplateStage = &v - return s -} - -// The output for GetTemplate action. -type GetTemplateOutput struct { - _ struct{} `type:"structure"` - - // The stage of the template that you can retrieve. For stacks, the Original - // and Processed templates are always available. For change sets, the Original - // template is always available. After AWS CloudFormation finishes creating - // the change set, the Processed template becomes available. - StagesAvailable []*string `type:"list"` - - // Structure containing the template body. (For more information, go to Template - // Anatomy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide.) - // - // AWS CloudFormation returns the same template that was used when the stack - // was created. - TemplateBody *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTemplateOutput) GoString() string { - return s.String() -} - -// SetStagesAvailable sets the StagesAvailable field's value. -func (s *GetTemplateOutput) SetStagesAvailable(v []*string) *GetTemplateOutput { - s.StagesAvailable = v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *GetTemplateOutput) SetTemplateBody(v string) *GetTemplateOutput { - s.TemplateBody = &v - return s -} - -// The input for the GetTemplateSummary action. -type GetTemplateSummaryInput struct { - _ struct{} `type:"structure"` - - // The name or the stack ID that is associated with the stack, which are not - // always interchangeable. For running stacks, you can specify either the stack's - // name or its unique stack ID. For deleted stack, you must specify the unique - // stack ID. - // - // Conditional: You must specify only one of the following parameters: StackName, - // StackSetName, TemplateBody, or TemplateURL. - StackName *string `min:"1" type:"string"` - - // The name or unique ID of the stack set from which the stack was created. - // - // Conditional: You must specify only one of the following parameters: StackName, - // StackSetName, TemplateBody, or TemplateURL. - StackSetName *string `type:"string"` - - // Structure containing the template body with a minimum length of 1 byte and - // a maximum length of 51,200 bytes. For more information about templates, see - // Template Anatomy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide. - // - // Conditional: You must specify only one of the following parameters: StackName, - // StackSetName, TemplateBody, or TemplateURL. - TemplateBody *string `min:"1" type:"string"` - - // Location of file containing the template body. The URL must point to a template - // (max size: 460,800 bytes) that is located in an Amazon S3 bucket. For more - // information about templates, see Template Anatomy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide. - // - // Conditional: You must specify only one of the following parameters: StackName, - // StackSetName, TemplateBody, or TemplateURL. - TemplateURL *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetTemplateSummaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTemplateSummaryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTemplateSummaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTemplateSummaryInput"} - if s.StackName != nil && len(*s.StackName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) - } - if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) - } - if s.TemplateURL != nil && len(*s.TemplateURL) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStackName sets the StackName field's value. -func (s *GetTemplateSummaryInput) SetStackName(v string) *GetTemplateSummaryInput { - s.StackName = &v - return s -} - -// SetStackSetName sets the StackSetName field's value. -func (s *GetTemplateSummaryInput) SetStackSetName(v string) *GetTemplateSummaryInput { - s.StackSetName = &v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *GetTemplateSummaryInput) SetTemplateBody(v string) *GetTemplateSummaryInput { - s.TemplateBody = &v - return s -} - -// SetTemplateURL sets the TemplateURL field's value. -func (s *GetTemplateSummaryInput) SetTemplateURL(v string) *GetTemplateSummaryInput { - s.TemplateURL = &v - return s -} - -// The output for the GetTemplateSummary action. -type GetTemplateSummaryOutput struct { - _ struct{} `type:"structure"` - - // The capabilities found within the template. If your template contains IAM - // resources, you must specify the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value - // for this parameter when you use the CreateStack or UpdateStack actions with - // your template; otherwise, those actions return an InsufficientCapabilities - // error. - // - // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). - Capabilities []*string `type:"list"` - - // The list of resources that generated the values in the Capabilities response - // element. - CapabilitiesReason *string `type:"string"` - - // A list of the transforms that are declared in the template. - DeclaredTransforms []*string `type:"list"` - - // The value that is defined in the Description property of the template. - Description *string `min:"1" type:"string"` - - // The value that is defined for the Metadata property of the template. - Metadata *string `type:"string"` - - // A list of parameter declarations that describe various properties for each - // parameter. - Parameters []*ParameterDeclaration `type:"list"` - - // A list of all the template resource types that are defined in the template, - // such as AWS::EC2::Instance, AWS::Dynamo::Table, and Custom::MyCustomInstance. - ResourceTypes []*string `type:"list"` - - // The AWS template format version, which identifies the capabilities of the - // template. - Version *string `type:"string"` -} - -// String returns the string representation -func (s GetTemplateSummaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTemplateSummaryOutput) GoString() string { - return s.String() -} - -// SetCapabilities sets the Capabilities field's value. -func (s *GetTemplateSummaryOutput) SetCapabilities(v []*string) *GetTemplateSummaryOutput { - s.Capabilities = v - return s -} - -// SetCapabilitiesReason sets the CapabilitiesReason field's value. -func (s *GetTemplateSummaryOutput) SetCapabilitiesReason(v string) *GetTemplateSummaryOutput { - s.CapabilitiesReason = &v - return s -} - -// SetDeclaredTransforms sets the DeclaredTransforms field's value. -func (s *GetTemplateSummaryOutput) SetDeclaredTransforms(v []*string) *GetTemplateSummaryOutput { - s.DeclaredTransforms = v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetTemplateSummaryOutput) SetDescription(v string) *GetTemplateSummaryOutput { - s.Description = &v - return s -} - -// SetMetadata sets the Metadata field's value. -func (s *GetTemplateSummaryOutput) SetMetadata(v string) *GetTemplateSummaryOutput { - s.Metadata = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *GetTemplateSummaryOutput) SetParameters(v []*ParameterDeclaration) *GetTemplateSummaryOutput { - s.Parameters = v - return s -} - -// SetResourceTypes sets the ResourceTypes field's value. -func (s *GetTemplateSummaryOutput) SetResourceTypes(v []*string) *GetTemplateSummaryOutput { - s.ResourceTypes = v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetTemplateSummaryOutput) SetVersion(v string) *GetTemplateSummaryOutput { - s.Version = &v - return s -} - -// The input for the ListChangeSets action. -type ListChangeSetsInput struct { - _ struct{} `type:"structure"` - - // A string (provided by the ListChangeSets response output) that identifies - // the next page of change sets that you want to retrieve. - NextToken *string `min:"1" type:"string"` - - // The name or the Amazon Resource Name (ARN) of the stack for which you want - // to list change sets. - // - // StackName is a required field - StackName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListChangeSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListChangeSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListChangeSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListChangeSetsInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - if s.StackName != nil && len(*s.StackName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListChangeSetsInput) SetNextToken(v string) *ListChangeSetsInput { - s.NextToken = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *ListChangeSetsInput) SetStackName(v string) *ListChangeSetsInput { - s.StackName = &v - return s -} - -// The output for the ListChangeSets action. -type ListChangeSetsOutput struct { - _ struct{} `type:"structure"` - - // If the output exceeds 1 MB, a string that identifies the next page of change - // sets. If there is no additional page, this value is null. - NextToken *string `min:"1" type:"string"` - - // A list of ChangeSetSummary structures that provides the ID and status of - // each change set for the specified stack. - Summaries []*ChangeSetSummary `type:"list"` -} - -// String returns the string representation -func (s ListChangeSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListChangeSetsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListChangeSetsOutput) SetNextToken(v string) *ListChangeSetsOutput { - s.NextToken = &v - return s -} - -// SetSummaries sets the Summaries field's value. -func (s *ListChangeSetsOutput) SetSummaries(v []*ChangeSetSummary) *ListChangeSetsOutput { - s.Summaries = v - return s -} - -type ListExportsInput struct { - _ struct{} `type:"structure"` - - // A string (provided by the ListExports response output) that identifies the - // next page of exported output values that you asked to retrieve. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListExportsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListExportsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListExportsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListExportsInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListExportsInput) SetNextToken(v string) *ListExportsInput { - s.NextToken = &v - return s -} - -type ListExportsOutput struct { - _ struct{} `type:"structure"` - - // The output for the ListExports action. - Exports []*Export `type:"list"` - - // If the output exceeds 100 exported output values, a string that identifies - // the next page of exports. If there is no additional page, this value is null. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListExportsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListExportsOutput) GoString() string { - return s.String() -} - -// SetExports sets the Exports field's value. -func (s *ListExportsOutput) SetExports(v []*Export) *ListExportsOutput { - s.Exports = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListExportsOutput) SetNextToken(v string) *ListExportsOutput { - s.NextToken = &v - return s -} - -type ListImportsInput struct { - _ struct{} `type:"structure"` - - // The name of the exported output value. AWS CloudFormation returns the stack - // names that are importing this value. - // - // ExportName is a required field - ExportName *string `type:"string" required:"true"` - - // A string (provided by the ListImports response output) that identifies the - // next page of stacks that are importing the specified exported output value. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListImportsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListImportsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListImportsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListImportsInput"} - if s.ExportName == nil { - invalidParams.Add(request.NewErrParamRequired("ExportName")) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExportName sets the ExportName field's value. -func (s *ListImportsInput) SetExportName(v string) *ListImportsInput { - s.ExportName = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListImportsInput) SetNextToken(v string) *ListImportsInput { - s.NextToken = &v - return s -} - -type ListImportsOutput struct { - _ struct{} `type:"structure"` - - // A list of stack names that are importing the specified exported output value. - Imports []*string `type:"list"` - - // A string that identifies the next page of exports. If there is no additional - // page, this value is null. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListImportsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListImportsOutput) GoString() string { - return s.String() -} - -// SetImports sets the Imports field's value. -func (s *ListImportsOutput) SetImports(v []*string) *ListImportsOutput { - s.Imports = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListImportsOutput) SetNextToken(v string) *ListImportsOutput { - s.NextToken = &v - return s -} - -type ListStackInstancesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to be returned with a single call. If the number - // of available results exceeds this maximum, the response includes a NextToken - // value that you can assign to the NextToken request parameter to get the next - // set of results. - MaxResults *int64 `min:"1" type:"integer"` - - // If the previous request didn't return all of the remaining results, the response's - // NextToken parameter value is set to a token. To retrieve the next set of - // results, call ListStackInstances again and assign that token to the request - // object's NextToken parameter. If there are no remaining results, the previous - // response object's NextToken parameter is set to null. - NextToken *string `min:"1" type:"string"` - - // The name of the AWS account that you want to list stack instances for. - StackInstanceAccount *string `type:"string"` - - // The name of the region where you want to list stack instances. - StackInstanceRegion *string `type:"string"` - - // The name or unique ID of the stack set that you want to list stack instances - // for. - // - // StackSetName is a required field - StackSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListStackInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStackInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListStackInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListStackInstancesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.StackSetName == nil { - invalidParams.Add(request.NewErrParamRequired("StackSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListStackInstancesInput) SetMaxResults(v int64) *ListStackInstancesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStackInstancesInput) SetNextToken(v string) *ListStackInstancesInput { - s.NextToken = &v - return s -} - -// SetStackInstanceAccount sets the StackInstanceAccount field's value. -func (s *ListStackInstancesInput) SetStackInstanceAccount(v string) *ListStackInstancesInput { - s.StackInstanceAccount = &v - return s -} - -// SetStackInstanceRegion sets the StackInstanceRegion field's value. -func (s *ListStackInstancesInput) SetStackInstanceRegion(v string) *ListStackInstancesInput { - s.StackInstanceRegion = &v - return s -} - -// SetStackSetName sets the StackSetName field's value. -func (s *ListStackInstancesInput) SetStackSetName(v string) *ListStackInstancesInput { - s.StackSetName = &v - return s -} - -type ListStackInstancesOutput struct { - _ struct{} `type:"structure"` - - // If the request doesn't return all of the remaining results, NextToken is - // set to a token. To retrieve the next set of results, call ListStackInstances - // again and assign that token to the request object's NextToken parameter. - // If the request returns all results, NextToken is set to null. - NextToken *string `min:"1" type:"string"` - - // A list of StackInstanceSummary structures that contain information about - // the specified stack instances. - Summaries []*StackInstanceSummary `type:"list"` -} - -// String returns the string representation -func (s ListStackInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStackInstancesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStackInstancesOutput) SetNextToken(v string) *ListStackInstancesOutput { - s.NextToken = &v - return s -} - -// SetSummaries sets the Summaries field's value. -func (s *ListStackInstancesOutput) SetSummaries(v []*StackInstanceSummary) *ListStackInstancesOutput { - s.Summaries = v - return s -} - -// The input for the ListStackResource action. -type ListStackResourcesInput struct { - _ struct{} `type:"structure"` - - // A string that identifies the next page of stack resources that you want to - // retrieve. - NextToken *string `min:"1" type:"string"` - - // The name or the unique stack ID that is associated with the stack, which - // are not always interchangeable: - // - // * Running stacks: You can specify either the stack's name or its unique - // stack ID. - // - // * Deleted stacks: You must specify the unique stack ID. - // - // Default: There is no default value. - // - // StackName is a required field - StackName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListStackResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStackResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListStackResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListStackResourcesInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStackResourcesInput) SetNextToken(v string) *ListStackResourcesInput { - s.NextToken = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *ListStackResourcesInput) SetStackName(v string) *ListStackResourcesInput { - s.StackName = &v - return s -} - -// The output for a ListStackResources action. -type ListStackResourcesOutput struct { - _ struct{} `type:"structure"` - - // If the output exceeds 1 MB, a string that identifies the next page of stack - // resources. If no additional page exists, this value is null. - NextToken *string `min:"1" type:"string"` - - // A list of StackResourceSummary structures. - StackResourceSummaries []*StackResourceSummary `type:"list"` -} - -// String returns the string representation -func (s ListStackResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStackResourcesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStackResourcesOutput) SetNextToken(v string) *ListStackResourcesOutput { - s.NextToken = &v - return s -} - -// SetStackResourceSummaries sets the StackResourceSummaries field's value. -func (s *ListStackResourcesOutput) SetStackResourceSummaries(v []*StackResourceSummary) *ListStackResourcesOutput { - s.StackResourceSummaries = v - return s -} - -type ListStackSetOperationResultsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to be returned with a single call. If the number - // of available results exceeds this maximum, the response includes a NextToken - // value that you can assign to the NextToken request parameter to get the next - // set of results. - MaxResults *int64 `min:"1" type:"integer"` - - // If the previous request didn't return all of the remaining results, the response - // object's NextToken parameter value is set to a token. To retrieve the next - // set of results, call ListStackSetOperationResults again and assign that token - // to the request object's NextToken parameter. If there are no remaining results, - // the previous response object's NextToken parameter is set to null. - NextToken *string `min:"1" type:"string"` - - // The ID of the stack set operation. - // - // OperationId is a required field - OperationId *string `min:"1" type:"string" required:"true"` - - // The name or unique ID of the stack set that you want to get operation results - // for. - // - // StackSetName is a required field - StackSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListStackSetOperationResultsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStackSetOperationResultsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListStackSetOperationResultsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListStackSetOperationResultsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.OperationId == nil { - invalidParams.Add(request.NewErrParamRequired("OperationId")) - } - if s.OperationId != nil && len(*s.OperationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OperationId", 1)) - } - if s.StackSetName == nil { - invalidParams.Add(request.NewErrParamRequired("StackSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListStackSetOperationResultsInput) SetMaxResults(v int64) *ListStackSetOperationResultsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStackSetOperationResultsInput) SetNextToken(v string) *ListStackSetOperationResultsInput { - s.NextToken = &v - return s -} - -// SetOperationId sets the OperationId field's value. -func (s *ListStackSetOperationResultsInput) SetOperationId(v string) *ListStackSetOperationResultsInput { - s.OperationId = &v - return s -} - -// SetStackSetName sets the StackSetName field's value. -func (s *ListStackSetOperationResultsInput) SetStackSetName(v string) *ListStackSetOperationResultsInput { - s.StackSetName = &v - return s -} - -type ListStackSetOperationResultsOutput struct { - _ struct{} `type:"structure"` - - // If the request doesn't return all results, NextToken is set to a token. To - // retrieve the next set of results, call ListOperationResults again and assign - // that token to the request object's NextToken parameter. If there are no remaining - // results, NextToken is set to null. - NextToken *string `min:"1" type:"string"` - - // A list of StackSetOperationResultSummary structures that contain information - // about the specified operation results, for accounts and regions that are - // included in the operation. - Summaries []*StackSetOperationResultSummary `type:"list"` -} - -// String returns the string representation -func (s ListStackSetOperationResultsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStackSetOperationResultsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStackSetOperationResultsOutput) SetNextToken(v string) *ListStackSetOperationResultsOutput { - s.NextToken = &v - return s -} - -// SetSummaries sets the Summaries field's value. -func (s *ListStackSetOperationResultsOutput) SetSummaries(v []*StackSetOperationResultSummary) *ListStackSetOperationResultsOutput { - s.Summaries = v - return s -} - -type ListStackSetOperationsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to be returned with a single call. If the number - // of available results exceeds this maximum, the response includes a NextToken - // value that you can assign to the NextToken request parameter to get the next - // set of results. - MaxResults *int64 `min:"1" type:"integer"` - - // If the previous paginated request didn't return all of the remaining results, - // the response object's NextToken parameter value is set to a token. To retrieve - // the next set of results, call ListStackSetOperations again and assign that - // token to the request object's NextToken parameter. If there are no remaining - // results, the previous response object's NextToken parameter is set to null. - NextToken *string `min:"1" type:"string"` - - // The name or unique ID of the stack set that you want to get operation summaries - // for. - // - // StackSetName is a required field - StackSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListStackSetOperationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStackSetOperationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListStackSetOperationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListStackSetOperationsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.StackSetName == nil { - invalidParams.Add(request.NewErrParamRequired("StackSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListStackSetOperationsInput) SetMaxResults(v int64) *ListStackSetOperationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStackSetOperationsInput) SetNextToken(v string) *ListStackSetOperationsInput { - s.NextToken = &v - return s -} - -// SetStackSetName sets the StackSetName field's value. -func (s *ListStackSetOperationsInput) SetStackSetName(v string) *ListStackSetOperationsInput { - s.StackSetName = &v - return s -} - -type ListStackSetOperationsOutput struct { - _ struct{} `type:"structure"` - - // If the request doesn't return all results, NextToken is set to a token. To - // retrieve the next set of results, call ListOperationResults again and assign - // that token to the request object's NextToken parameter. If there are no remaining - // results, NextToken is set to null. - NextToken *string `min:"1" type:"string"` - - // A list of StackSetOperationSummary structures that contain summary information - // about operations for the specified stack set. - Summaries []*StackSetOperationSummary `type:"list"` -} - -// String returns the string representation -func (s ListStackSetOperationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStackSetOperationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStackSetOperationsOutput) SetNextToken(v string) *ListStackSetOperationsOutput { - s.NextToken = &v - return s -} - -// SetSummaries sets the Summaries field's value. -func (s *ListStackSetOperationsOutput) SetSummaries(v []*StackSetOperationSummary) *ListStackSetOperationsOutput { - s.Summaries = v - return s -} - -type ListStackSetsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to be returned with a single call. If the number - // of available results exceeds this maximum, the response includes a NextToken - // value that you can assign to the NextToken request parameter to get the next - // set of results. - MaxResults *int64 `min:"1" type:"integer"` - - // If the previous paginated request didn't return all of the remaining results, - // the response object's NextToken parameter value is set to a token. To retrieve - // the next set of results, call ListStackSets again and assign that token to - // the request object's NextToken parameter. If there are no remaining results, - // the previous response object's NextToken parameter is set to null. - NextToken *string `min:"1" type:"string"` - - // The status of the stack sets that you want to get summary information about. - Status *string `type:"string" enum:"StackSetStatus"` -} - -// String returns the string representation -func (s ListStackSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStackSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListStackSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListStackSetsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListStackSetsInput) SetMaxResults(v int64) *ListStackSetsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStackSetsInput) SetNextToken(v string) *ListStackSetsInput { - s.NextToken = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ListStackSetsInput) SetStatus(v string) *ListStackSetsInput { - s.Status = &v - return s -} - -type ListStackSetsOutput struct { - _ struct{} `type:"structure"` - - // If the request doesn't return all of the remaining results, NextToken is - // set to a token. To retrieve the next set of results, call ListStackInstances - // again and assign that token to the request object's NextToken parameter. - // If the request returns all results, NextToken is set to null. - NextToken *string `min:"1" type:"string"` - - // A list of StackSetSummary structures that contain information about the user's - // stack sets. - Summaries []*StackSetSummary `type:"list"` -} - -// String returns the string representation -func (s ListStackSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStackSetsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStackSetsOutput) SetNextToken(v string) *ListStackSetsOutput { - s.NextToken = &v - return s -} - -// SetSummaries sets the Summaries field's value. -func (s *ListStackSetsOutput) SetSummaries(v []*StackSetSummary) *ListStackSetsOutput { - s.Summaries = v - return s -} - -// The input for ListStacks action. -type ListStacksInput struct { - _ struct{} `type:"structure"` - - // A string that identifies the next page of stacks that you want to retrieve. - NextToken *string `min:"1" type:"string"` - - // Stack status to use as a filter. Specify one or more stack status codes to - // list only stacks with the specified status codes. For a complete list of - // stack status codes, see the StackStatus parameter of the Stack data type. - StackStatusFilter []*string `type:"list"` -} - -// String returns the string representation -func (s ListStacksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStacksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListStacksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListStacksInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStacksInput) SetNextToken(v string) *ListStacksInput { - s.NextToken = &v - return s -} - -// SetStackStatusFilter sets the StackStatusFilter field's value. -func (s *ListStacksInput) SetStackStatusFilter(v []*string) *ListStacksInput { - s.StackStatusFilter = v - return s -} - -// The output for ListStacks action. -type ListStacksOutput struct { - _ struct{} `type:"structure"` - - // If the output exceeds 1 MB in size, a string that identifies the next page - // of stacks. If no additional page exists, this value is null. - NextToken *string `min:"1" type:"string"` - - // A list of StackSummary structures containing information about the specified - // stacks. - StackSummaries []*StackSummary `type:"list"` -} - -// String returns the string representation -func (s ListStacksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStacksOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStacksOutput) SetNextToken(v string) *ListStacksOutput { - s.NextToken = &v - return s -} - -// SetStackSummaries sets the StackSummaries field's value. -func (s *ListStacksOutput) SetStackSummaries(v []*StackSummary) *ListStacksOutput { - s.StackSummaries = v - return s -} - -// The Output data type. -type Output struct { - _ struct{} `type:"structure"` - - // User defined description associated with the output. - Description *string `min:"1" type:"string"` - - // The name of the export associated with the output. - ExportName *string `type:"string"` - - // The key associated with the output. - OutputKey *string `type:"string"` - - // The value associated with the output. - OutputValue *string `type:"string"` -} - -// String returns the string representation -func (s Output) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Output) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *Output) SetDescription(v string) *Output { - s.Description = &v - return s -} - -// SetExportName sets the ExportName field's value. -func (s *Output) SetExportName(v string) *Output { - s.ExportName = &v - return s -} - -// SetOutputKey sets the OutputKey field's value. -func (s *Output) SetOutputKey(v string) *Output { - s.OutputKey = &v - return s -} - -// SetOutputValue sets the OutputValue field's value. -func (s *Output) SetOutputValue(v string) *Output { - s.OutputValue = &v - return s -} - -// The Parameter data type. -type Parameter struct { - _ struct{} `type:"structure"` - - // The key associated with the parameter. If you don't specify a key and value - // for a particular parameter, AWS CloudFormation uses the default value that - // is specified in your template. - ParameterKey *string `type:"string"` - - // The input value associated with the parameter. - ParameterValue *string `type:"string"` - - // Read-only. The value that corresponds to a Systems Manager parameter key. - // This field is returned only for SSM (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-ssm-parameter-types) - // parameter types in the template. - ResolvedValue *string `type:"string"` - - // During a stack update, use the existing parameter value that the stack is - // using for a given parameter key. If you specify true, do not specify a parameter - // value. - UsePreviousValue *bool `type:"boolean"` -} - -// String returns the string representation -func (s Parameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Parameter) GoString() string { - return s.String() -} - -// SetParameterKey sets the ParameterKey field's value. -func (s *Parameter) SetParameterKey(v string) *Parameter { - s.ParameterKey = &v - return s -} - -// SetParameterValue sets the ParameterValue field's value. -func (s *Parameter) SetParameterValue(v string) *Parameter { - s.ParameterValue = &v - return s -} - -// SetResolvedValue sets the ResolvedValue field's value. -func (s *Parameter) SetResolvedValue(v string) *Parameter { - s.ResolvedValue = &v - return s -} - -// SetUsePreviousValue sets the UsePreviousValue field's value. -func (s *Parameter) SetUsePreviousValue(v bool) *Parameter { - s.UsePreviousValue = &v - return s -} - -// A set of criteria that AWS CloudFormation uses to validate parameter values. -// Although other constraints might be defined in the stack template, AWS CloudFormation -// returns only the AllowedValues property. -type ParameterConstraints struct { - _ struct{} `type:"structure"` - - // A list of values that are permitted for a parameter. - AllowedValues []*string `type:"list"` -} - -// String returns the string representation -func (s ParameterConstraints) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterConstraints) GoString() string { - return s.String() -} - -// SetAllowedValues sets the AllowedValues field's value. -func (s *ParameterConstraints) SetAllowedValues(v []*string) *ParameterConstraints { - s.AllowedValues = v - return s -} - -// The ParameterDeclaration data type. -type ParameterDeclaration struct { - _ struct{} `type:"structure"` - - // The default value of the parameter. - DefaultValue *string `type:"string"` - - // The description that is associate with the parameter. - Description *string `min:"1" type:"string"` - - // Flag that indicates whether the parameter value is shown as plain text in - // logs and in the AWS Management Console. - NoEcho *bool `type:"boolean"` - - // The criteria that AWS CloudFormation uses to validate parameter values. - ParameterConstraints *ParameterConstraints `type:"structure"` - - // The name that is associated with the parameter. - ParameterKey *string `type:"string"` - - // The type of parameter. - ParameterType *string `type:"string"` -} - -// String returns the string representation -func (s ParameterDeclaration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterDeclaration) GoString() string { - return s.String() -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *ParameterDeclaration) SetDefaultValue(v string) *ParameterDeclaration { - s.DefaultValue = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ParameterDeclaration) SetDescription(v string) *ParameterDeclaration { - s.Description = &v - return s -} - -// SetNoEcho sets the NoEcho field's value. -func (s *ParameterDeclaration) SetNoEcho(v bool) *ParameterDeclaration { - s.NoEcho = &v - return s -} - -// SetParameterConstraints sets the ParameterConstraints field's value. -func (s *ParameterDeclaration) SetParameterConstraints(v *ParameterConstraints) *ParameterDeclaration { - s.ParameterConstraints = v - return s -} - -// SetParameterKey sets the ParameterKey field's value. -func (s *ParameterDeclaration) SetParameterKey(v string) *ParameterDeclaration { - s.ParameterKey = &v - return s -} - -// SetParameterType sets the ParameterType field's value. -func (s *ParameterDeclaration) SetParameterType(v string) *ParameterDeclaration { - s.ParameterType = &v - return s -} - -// Context information that enables AWS CloudFormation to uniquely identify -// a resource. AWS CloudFormation uses context key-value pairs in cases where -// a resource's logical and physical IDs are not enough to uniquely identify -// that resource. Each context key-value pair specifies a resource that contains -// the targeted resource. -type PhysicalResourceIdContextKeyValuePair struct { - _ struct{} `type:"structure"` - - // The resource context key. - // - // Key is a required field - Key *string `type:"string" required:"true"` - - // The resource context value. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PhysicalResourceIdContextKeyValuePair) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PhysicalResourceIdContextKeyValuePair) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *PhysicalResourceIdContextKeyValuePair) SetKey(v string) *PhysicalResourceIdContextKeyValuePair { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *PhysicalResourceIdContextKeyValuePair) SetValue(v string) *PhysicalResourceIdContextKeyValuePair { - s.Value = &v - return s -} - -// Information about a resource property whose actual value differs from its -// expected value, as defined in the stack template and any values specified -// as template parameters. These will be present only for resources whose StackResourceDriftStatus -// is MODIFIED. For more information, see Detecting Unregulated Configuration -// Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). -type PropertyDifference struct { - _ struct{} `type:"structure"` - - // The actual property value of the resource property. - // - // ActualValue is a required field - ActualValue *string `type:"string" required:"true"` - - // The type of property difference. - // - // * ADD: A value has been added to a resource property that is an array - // or list data type. - // - // * REMOVE: The property has been removed from the current resource configuration. - // - // * NOT_EQUAL: The current property value differs from its expected value - // (as defined in the stack template and any values specified as template - // parameters). - // - // DifferenceType is a required field - DifferenceType *string `type:"string" required:"true" enum:"DifferenceType"` - - // The expected property value of the resource property, as defined in the stack - // template and any values specified as template parameters. - // - // ExpectedValue is a required field - ExpectedValue *string `type:"string" required:"true"` - - // The fully-qualified path to the resource property. - // - // PropertyPath is a required field - PropertyPath *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PropertyDifference) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PropertyDifference) GoString() string { - return s.String() -} - -// SetActualValue sets the ActualValue field's value. -func (s *PropertyDifference) SetActualValue(v string) *PropertyDifference { - s.ActualValue = &v - return s -} - -// SetDifferenceType sets the DifferenceType field's value. -func (s *PropertyDifference) SetDifferenceType(v string) *PropertyDifference { - s.DifferenceType = &v - return s -} - -// SetExpectedValue sets the ExpectedValue field's value. -func (s *PropertyDifference) SetExpectedValue(v string) *PropertyDifference { - s.ExpectedValue = &v - return s -} - -// SetPropertyPath sets the PropertyPath field's value. -func (s *PropertyDifference) SetPropertyPath(v string) *PropertyDifference { - s.PropertyPath = &v - return s -} - -// The ResourceChange structure describes the resource and the action that AWS -// CloudFormation will perform on it if you execute this change set. -type ResourceChange struct { - _ struct{} `type:"structure"` - - // The action that AWS CloudFormation takes on the resource, such as Add (adds - // a new resource), Modify (changes a resource), or Remove (deletes a resource). - Action *string `type:"string" enum:"ChangeAction"` - - // For the Modify action, a list of ResourceChangeDetail structures that describes - // the changes that AWS CloudFormation will make to the resource. - Details []*ResourceChangeDetail `type:"list"` - - // The resource's logical ID, which is defined in the stack's template. - LogicalResourceId *string `type:"string"` - - // The resource's physical ID (resource name). Resources that you are adding - // don't have physical IDs because they haven't been created. - PhysicalResourceId *string `type:"string"` - - // For the Modify action, indicates whether AWS CloudFormation will replace - // the resource by creating a new one and deleting the old one. This value depends - // on the value of the RequiresRecreation property in the ResourceTargetDefinition - // structure. For example, if the RequiresRecreation field is Always and the - // Evaluation field is Static, Replacement is True. If the RequiresRecreation - // field is Always and the Evaluation field is Dynamic, Replacement is Conditionally. - // - // If you have multiple changes with different RequiresRecreation values, the - // Replacement value depends on the change with the most impact. A RequiresRecreation - // value of Always has the most impact, followed by Conditionally, and then - // Never. - Replacement *string `type:"string" enum:"Replacement"` - - // The type of AWS CloudFormation resource, such as AWS::S3::Bucket. - ResourceType *string `min:"1" type:"string"` - - // For the Modify action, indicates which resource attribute is triggering this - // update, such as a change in the resource attribute's Metadata, Properties, - // or Tags. - Scope []*string `type:"list"` -} - -// String returns the string representation -func (s ResourceChange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceChange) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *ResourceChange) SetAction(v string) *ResourceChange { - s.Action = &v - return s -} - -// SetDetails sets the Details field's value. -func (s *ResourceChange) SetDetails(v []*ResourceChangeDetail) *ResourceChange { - s.Details = v - return s -} - -// SetLogicalResourceId sets the LogicalResourceId field's value. -func (s *ResourceChange) SetLogicalResourceId(v string) *ResourceChange { - s.LogicalResourceId = &v - return s -} - -// SetPhysicalResourceId sets the PhysicalResourceId field's value. -func (s *ResourceChange) SetPhysicalResourceId(v string) *ResourceChange { - s.PhysicalResourceId = &v - return s -} - -// SetReplacement sets the Replacement field's value. -func (s *ResourceChange) SetReplacement(v string) *ResourceChange { - s.Replacement = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ResourceChange) SetResourceType(v string) *ResourceChange { - s.ResourceType = &v - return s -} - -// SetScope sets the Scope field's value. -func (s *ResourceChange) SetScope(v []*string) *ResourceChange { - s.Scope = v - return s -} - -// For a resource with Modify as the action, the ResourceChange structure describes -// the changes AWS CloudFormation will make to that resource. -type ResourceChangeDetail struct { - _ struct{} `type:"structure"` - - // The identity of the entity that triggered this change. This entity is a member - // of the group that is specified by the ChangeSource field. For example, if - // you modified the value of the KeyPairName parameter, the CausingEntity is - // the name of the parameter (KeyPairName). - // - // If the ChangeSource value is DirectModification, no value is given for CausingEntity. - CausingEntity *string `type:"string"` - - // The group to which the CausingEntity value belongs. There are five entity - // groups: - // - // * ResourceReference entities are Ref intrinsic functions that refer to - // resources in the template, such as { "Ref" : "MyEC2InstanceResource" }. - // - // * ParameterReference entities are Ref intrinsic functions that get template - // parameter values, such as { "Ref" : "MyPasswordParameter" }. - // - // * ResourceAttribute entities are Fn::GetAtt intrinsic functions that get - // resource attribute values, such as { "Fn::GetAtt" : [ "MyEC2InstanceResource", - // "PublicDnsName" ] }. - // - // * DirectModification entities are changes that are made directly to the - // template. - // - // * Automatic entities are AWS::CloudFormation::Stack resource types, which - // are also known as nested stacks. If you made no changes to the AWS::CloudFormation::Stack - // resource, AWS CloudFormation sets the ChangeSource to Automatic because - // the nested stack's template might have changed. Changes to a nested stack's - // template aren't visible to AWS CloudFormation until you run an update - // on the parent stack. - ChangeSource *string `type:"string" enum:"ChangeSource"` - - // Indicates whether AWS CloudFormation can determine the target value, and - // whether the target value will change before you execute a change set. - // - // For Static evaluations, AWS CloudFormation can determine that the target - // value will change, and its value. For example, if you directly modify the - // InstanceType property of an EC2 instance, AWS CloudFormation knows that this - // property value will change, and its value, so this is a Static evaluation. - // - // For Dynamic evaluations, cannot determine the target value because it depends - // on the result of an intrinsic function, such as a Ref or Fn::GetAtt intrinsic - // function, when the stack is updated. For example, if your template includes - // a reference to a resource that is conditionally recreated, the value of the - // reference (the physical ID of the resource) might change, depending on if - // the resource is recreated. If the resource is recreated, it will have a new - // physical ID, so all references to that resource will also be updated. - Evaluation *string `type:"string" enum:"EvaluationType"` - - // A ResourceTargetDefinition structure that describes the field that AWS CloudFormation - // will change and whether the resource will be recreated. - Target *ResourceTargetDefinition `type:"structure"` -} - -// String returns the string representation -func (s ResourceChangeDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceChangeDetail) GoString() string { - return s.String() -} - -// SetCausingEntity sets the CausingEntity field's value. -func (s *ResourceChangeDetail) SetCausingEntity(v string) *ResourceChangeDetail { - s.CausingEntity = &v - return s -} - -// SetChangeSource sets the ChangeSource field's value. -func (s *ResourceChangeDetail) SetChangeSource(v string) *ResourceChangeDetail { - s.ChangeSource = &v - return s -} - -// SetEvaluation sets the Evaluation field's value. -func (s *ResourceChangeDetail) SetEvaluation(v string) *ResourceChangeDetail { - s.Evaluation = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *ResourceChangeDetail) SetTarget(v *ResourceTargetDefinition) *ResourceChangeDetail { - s.Target = v - return s -} - -// The field that AWS CloudFormation will change, such as the name of a resource's -// property, and whether the resource will be recreated. -type ResourceTargetDefinition struct { - _ struct{} `type:"structure"` - - // Indicates which resource attribute is triggering this update, such as a change - // in the resource attribute's Metadata, Properties, or Tags. - Attribute *string `type:"string" enum:"ResourceAttribute"` - - // If the Attribute value is Properties, the name of the property. For all other - // attributes, the value is null. - Name *string `type:"string"` - - // If the Attribute value is Properties, indicates whether a change to this - // property causes the resource to be recreated. The value can be Never, Always, - // or Conditionally. To determine the conditions for a Conditionally recreation, - // see the update behavior for that property (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) - // in the AWS CloudFormation User Guide. - RequiresRecreation *string `type:"string" enum:"RequiresRecreation"` -} - -// String returns the string representation -func (s ResourceTargetDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceTargetDefinition) GoString() string { - return s.String() -} - -// SetAttribute sets the Attribute field's value. -func (s *ResourceTargetDefinition) SetAttribute(v string) *ResourceTargetDefinition { - s.Attribute = &v - return s -} - -// SetName sets the Name field's value. -func (s *ResourceTargetDefinition) SetName(v string) *ResourceTargetDefinition { - s.Name = &v - return s -} - -// SetRequiresRecreation sets the RequiresRecreation field's value. -func (s *ResourceTargetDefinition) SetRequiresRecreation(v string) *ResourceTargetDefinition { - s.RequiresRecreation = &v - return s -} - -// Structure containing the rollback triggers for AWS CloudFormation to monitor -// during stack creation and updating operations, and for the specified monitoring -// period afterwards. -// -// Rollback triggers enable you to have AWS CloudFormation monitor the state -// of your application during stack creation and updating, and to roll back -// that operation if the application breaches the threshold of any of the alarms -// you've specified. For more information, see Monitor and Roll Back Stack Operations -// (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-rollback-triggers.html). -type RollbackConfiguration struct { - _ struct{} `type:"structure"` - - // The amount of time, in minutes, during which CloudFormation should monitor - // all the rollback triggers after the stack creation or update operation deploys - // all necessary resources. - // - // The default is 0 minutes. - // - // If you specify a monitoring period but do not specify any rollback triggers, - // CloudFormation still waits the specified period of time before cleaning up - // old resources after update operations. You can use this monitoring period - // to perform any manual stack validation desired, and manually cancel the stack - // creation or update (using CancelUpdateStack (http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CancelUpdateStack.html), - // for example) as necessary. - // - // If you specify 0 for this parameter, CloudFormation still monitors the specified - // rollback triggers during stack creation and update operations. Then, for - // update operations, it begins disposing of old resources immediately once - // the operation completes. - MonitoringTimeInMinutes *int64 `type:"integer"` - - // The triggers to monitor during stack creation or update actions. - // - // By default, AWS CloudFormation saves the rollback triggers specified for - // a stack and applies them to any subsequent update operations for the stack, - // unless you specify otherwise. If you do specify rollback triggers for this - // parameter, those triggers replace any list of triggers previously specified - // for the stack. This means: - // - // * To use the rollback triggers previously specified for this stack, if - // any, don't specify this parameter. - // - // * To specify new or updated rollback triggers, you must specify all the - // triggers that you want used for this stack, even triggers you've specifed - // before (for example, when creating the stack or during a previous stack - // update). Any triggers that you don't include in the updated list of triggers - // are no longer applied to the stack. - // - // * To remove all currently specified triggers, specify an empty list for - // this parameter. - // - // If a specified trigger is missing, the entire stack operation fails and is - // rolled back. - RollbackTriggers []*RollbackTrigger `type:"list"` -} - -// String returns the string representation -func (s RollbackConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RollbackConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RollbackConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RollbackConfiguration"} - if s.RollbackTriggers != nil { - for i, v := range s.RollbackTriggers { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RollbackTriggers", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMonitoringTimeInMinutes sets the MonitoringTimeInMinutes field's value. -func (s *RollbackConfiguration) SetMonitoringTimeInMinutes(v int64) *RollbackConfiguration { - s.MonitoringTimeInMinutes = &v - return s -} - -// SetRollbackTriggers sets the RollbackTriggers field's value. -func (s *RollbackConfiguration) SetRollbackTriggers(v []*RollbackTrigger) *RollbackConfiguration { - s.RollbackTriggers = v - return s -} - -// A rollback trigger AWS CloudFormation monitors during creation and updating -// of stacks. If any of the alarms you specify goes to ALARM state during the -// stack operation or within the specified monitoring period afterwards, CloudFormation -// rolls back the entire stack operation. -type RollbackTrigger struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the rollback trigger. - // - // If a specified trigger is missing, the entire stack operation fails and is - // rolled back. - // - // Arn is a required field - Arn *string `type:"string" required:"true"` - - // The resource type of the rollback trigger. Currently, AWS::CloudWatch::Alarm - // (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html) - // is the only supported resource type. - // - // Type is a required field - Type *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RollbackTrigger) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RollbackTrigger) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RollbackTrigger) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RollbackTrigger"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *RollbackTrigger) SetArn(v string) *RollbackTrigger { - s.Arn = &v - return s -} - -// SetType sets the Type field's value. -func (s *RollbackTrigger) SetType(v string) *RollbackTrigger { - s.Type = &v - return s -} - -// The input for the SetStackPolicy action. -type SetStackPolicyInput struct { - _ struct{} `type:"structure"` - - // The name or unique stack ID that you want to associate a policy with. - // - // StackName is a required field - StackName *string `type:"string" required:"true"` - - // Structure containing the stack policy body. For more information, go to - // Prevent Updates to Stack Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html) - // in the AWS CloudFormation User Guide. You can specify either the StackPolicyBody - // or the StackPolicyURL parameter, but not both. - StackPolicyBody *string `min:"1" type:"string"` - - // Location of a file containing the stack policy. The URL must point to a policy - // (maximum size: 16 KB) located in an S3 bucket in the same region as the stack. - // You can specify either the StackPolicyBody or the StackPolicyURL parameter, - // but not both. - StackPolicyURL *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s SetStackPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetStackPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetStackPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetStackPolicyInput"} - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - if s.StackPolicyBody != nil && len(*s.StackPolicyBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackPolicyBody", 1)) - } - if s.StackPolicyURL != nil && len(*s.StackPolicyURL) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackPolicyURL", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStackName sets the StackName field's value. -func (s *SetStackPolicyInput) SetStackName(v string) *SetStackPolicyInput { - s.StackName = &v - return s -} - -// SetStackPolicyBody sets the StackPolicyBody field's value. -func (s *SetStackPolicyInput) SetStackPolicyBody(v string) *SetStackPolicyInput { - s.StackPolicyBody = &v - return s -} - -// SetStackPolicyURL sets the StackPolicyURL field's value. -func (s *SetStackPolicyInput) SetStackPolicyURL(v string) *SetStackPolicyInput { - s.StackPolicyURL = &v - return s -} - -type SetStackPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetStackPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetStackPolicyOutput) GoString() string { - return s.String() -} - -// The input for the SignalResource action. -type SignalResourceInput struct { - _ struct{} `type:"structure"` - - // The logical ID of the resource that you want to signal. The logical ID is - // the name of the resource that given in the template. - // - // LogicalResourceId is a required field - LogicalResourceId *string `type:"string" required:"true"` - - // The stack name or unique stack ID that includes the resource that you want - // to signal. - // - // StackName is a required field - StackName *string `min:"1" type:"string" required:"true"` - - // The status of the signal, which is either success or failure. A failure signal - // causes AWS CloudFormation to immediately fail the stack creation or update. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"ResourceSignalStatus"` - - // A unique ID of the signal. When you signal Amazon EC2 instances or Auto Scaling - // groups, specify the instance ID that you are signaling as the unique ID. - // If you send multiple signals to a single resource (such as signaling a wait - // condition), each signal requires a different unique ID. - // - // UniqueId is a required field - UniqueId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SignalResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SignalResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SignalResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SignalResourceInput"} - if s.LogicalResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("LogicalResourceId")) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - if s.StackName != nil && len(*s.StackName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.UniqueId == nil { - invalidParams.Add(request.NewErrParamRequired("UniqueId")) - } - if s.UniqueId != nil && len(*s.UniqueId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UniqueId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogicalResourceId sets the LogicalResourceId field's value. -func (s *SignalResourceInput) SetLogicalResourceId(v string) *SignalResourceInput { - s.LogicalResourceId = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *SignalResourceInput) SetStackName(v string) *SignalResourceInput { - s.StackName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SignalResourceInput) SetStatus(v string) *SignalResourceInput { - s.Status = &v - return s -} - -// SetUniqueId sets the UniqueId field's value. -func (s *SignalResourceInput) SetUniqueId(v string) *SignalResourceInput { - s.UniqueId = &v - return s -} - -type SignalResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SignalResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SignalResourceOutput) GoString() string { - return s.String() -} - -// The Stack data type. -type Stack struct { - _ struct{} `type:"structure"` - - // The capabilities allowed in the stack. - Capabilities []*string `type:"list"` - - // The unique ID of the change set. - ChangeSetId *string `min:"1" type:"string"` - - // The time at which the stack was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The time the stack was deleted. - DeletionTime *time.Time `type:"timestamp"` - - // A user-defined description associated with the stack. - Description *string `min:"1" type:"string"` - - // Boolean to enable or disable rollback on stack creation failures: - // - // * true: disable rollback - // - // * false: enable rollback - DisableRollback *bool `type:"boolean"` - - // Information on whether a stack's actual configuration differs, or has drifted, - // from it's expected configuration, as defined in the stack template and any - // values specified as template parameters. For more information, see Detecting - // Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). - DriftInformation *StackDriftInformation `type:"structure"` - - // Whether termination protection is enabled for the stack. - // - // For nested stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html), - // termination protection is set on the root stack and cannot be changed directly - // on the nested stack. For more information, see Protecting a Stack From Being - // Deleted (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) - // in the AWS CloudFormation User Guide. - EnableTerminationProtection *bool `type:"boolean"` - - // The time the stack was last updated. This field will only be returned if - // the stack has been updated at least once. - LastUpdatedTime *time.Time `type:"timestamp"` - - // SNS topic ARNs to which stack related events are published. - NotificationARNs []*string `type:"list"` - - // A list of output structures. - Outputs []*Output `type:"list"` - - // A list of Parameter structures. - Parameters []*Parameter `type:"list"` - - // For nested stacks--stacks created as resources for another stack--the stack - // ID of the direct parent of this stack. For the first level of nested stacks, - // the root stack is also the parent stack. - // - // For more information, see Working with Nested Stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) - // in the AWS CloudFormation User Guide. - ParentId *string `type:"string"` - - // The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) - // role that is associated with the stack. During a stack operation, AWS CloudFormation - // uses this role's credentials to make calls on your behalf. - RoleARN *string `min:"20" type:"string"` - - // The rollback triggers for AWS CloudFormation to monitor during stack creation - // and updating operations, and for the specified monitoring period afterwards. - RollbackConfiguration *RollbackConfiguration `type:"structure"` - - // For nested stacks--stacks created as resources for another stack--the stack - // ID of the the top-level stack to which the nested stack ultimately belongs. - // - // For more information, see Working with Nested Stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) - // in the AWS CloudFormation User Guide. - RootId *string `type:"string"` - - // Unique identifier of the stack. - StackId *string `type:"string"` - - // The name associated with the stack. - // - // StackName is a required field - StackName *string `type:"string" required:"true"` - - // Current status of the stack. - // - // StackStatus is a required field - StackStatus *string `type:"string" required:"true" enum:"StackStatus"` - - // Success/failure message associated with the stack status. - StackStatusReason *string `type:"string"` - - // A list of Tags that specify information about the stack. - Tags []*Tag `type:"list"` - - // The amount of time within which stack creation should complete. - TimeoutInMinutes *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s Stack) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Stack) GoString() string { - return s.String() -} - -// SetCapabilities sets the Capabilities field's value. -func (s *Stack) SetCapabilities(v []*string) *Stack { - s.Capabilities = v - return s -} - -// SetChangeSetId sets the ChangeSetId field's value. -func (s *Stack) SetChangeSetId(v string) *Stack { - s.ChangeSetId = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *Stack) SetCreationTime(v time.Time) *Stack { - s.CreationTime = &v - return s -} - -// SetDeletionTime sets the DeletionTime field's value. -func (s *Stack) SetDeletionTime(v time.Time) *Stack { - s.DeletionTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Stack) SetDescription(v string) *Stack { - s.Description = &v - return s -} - -// SetDisableRollback sets the DisableRollback field's value. -func (s *Stack) SetDisableRollback(v bool) *Stack { - s.DisableRollback = &v - return s -} - -// SetDriftInformation sets the DriftInformation field's value. -func (s *Stack) SetDriftInformation(v *StackDriftInformation) *Stack { - s.DriftInformation = v - return s -} - -// SetEnableTerminationProtection sets the EnableTerminationProtection field's value. -func (s *Stack) SetEnableTerminationProtection(v bool) *Stack { - s.EnableTerminationProtection = &v - return s -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *Stack) SetLastUpdatedTime(v time.Time) *Stack { - s.LastUpdatedTime = &v - return s -} - -// SetNotificationARNs sets the NotificationARNs field's value. -func (s *Stack) SetNotificationARNs(v []*string) *Stack { - s.NotificationARNs = v - return s -} - -// SetOutputs sets the Outputs field's value. -func (s *Stack) SetOutputs(v []*Output) *Stack { - s.Outputs = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *Stack) SetParameters(v []*Parameter) *Stack { - s.Parameters = v - return s -} - -// SetParentId sets the ParentId field's value. -func (s *Stack) SetParentId(v string) *Stack { - s.ParentId = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *Stack) SetRoleARN(v string) *Stack { - s.RoleARN = &v - return s -} - -// SetRollbackConfiguration sets the RollbackConfiguration field's value. -func (s *Stack) SetRollbackConfiguration(v *RollbackConfiguration) *Stack { - s.RollbackConfiguration = v - return s -} - -// SetRootId sets the RootId field's value. -func (s *Stack) SetRootId(v string) *Stack { - s.RootId = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *Stack) SetStackId(v string) *Stack { - s.StackId = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *Stack) SetStackName(v string) *Stack { - s.StackName = &v - return s -} - -// SetStackStatus sets the StackStatus field's value. -func (s *Stack) SetStackStatus(v string) *Stack { - s.StackStatus = &v - return s -} - -// SetStackStatusReason sets the StackStatusReason field's value. -func (s *Stack) SetStackStatusReason(v string) *Stack { - s.StackStatusReason = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Stack) SetTags(v []*Tag) *Stack { - s.Tags = v - return s -} - -// SetTimeoutInMinutes sets the TimeoutInMinutes field's value. -func (s *Stack) SetTimeoutInMinutes(v int64) *Stack { - s.TimeoutInMinutes = &v - return s -} - -// Contains information about whether the stack's actual configuration differs, -// or has drifted, from its expected configuration, as defined in the stack -// template and any values specified as template parameters. A stack is considered -// to have drifted if one or more of its resources have drifted. -type StackDriftInformation struct { - _ struct{} `type:"structure"` - - // Most recent time when a drift detection operation was initiated on the stack, - // or any of its individual resources that support drift detection. - LastCheckTimestamp *time.Time `type:"timestamp"` - - // Status of the stack's actual configuration compared to its expected template - // configuration. - // - // * DRIFTED: The stack differs from its expected template configuration. - // A stack is considered to have drifted if one or more of its resources - // have drifted. - // - // * NOT_CHECKED: AWS CloudFormation has not checked if the stack differs - // from its expected template configuration. - // - // * IN_SYNC: The stack's actual configuration matches its expected template - // configuration. - // - // * UNKNOWN: This value is reserved for future use. - // - // StackDriftStatus is a required field - StackDriftStatus *string `type:"string" required:"true" enum:"StackDriftStatus"` -} - -// String returns the string representation -func (s StackDriftInformation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackDriftInformation) GoString() string { - return s.String() -} - -// SetLastCheckTimestamp sets the LastCheckTimestamp field's value. -func (s *StackDriftInformation) SetLastCheckTimestamp(v time.Time) *StackDriftInformation { - s.LastCheckTimestamp = &v - return s -} - -// SetStackDriftStatus sets the StackDriftStatus field's value. -func (s *StackDriftInformation) SetStackDriftStatus(v string) *StackDriftInformation { - s.StackDriftStatus = &v - return s -} - -// Contains information about whether the stack's actual configuration differs, -// or has drifted, from its expected configuration, as defined in the stack -// template and any values specified as template parameters. A stack is considered -// to have drifted if one or more of its resources have drifted. -type StackDriftInformationSummary struct { - _ struct{} `type:"structure"` - - // Most recent time when a drift detection operation was initiated on the stack, - // or any of its individual resources that support drift detection. - LastCheckTimestamp *time.Time `type:"timestamp"` - - // Status of the stack's actual configuration compared to its expected template - // configuration. - // - // * DRIFTED: The stack differs from its expected template configuration. - // A stack is considered to have drifted if one or more of its resources - // have drifted. - // - // * NOT_CHECKED: AWS CloudFormation has not checked if the stack differs - // from its expected template configuration. - // - // * IN_SYNC: The stack's actual configuration matches its expected template - // configuration. - // - // * UNKNOWN: This value is reserved for future use. - // - // StackDriftStatus is a required field - StackDriftStatus *string `type:"string" required:"true" enum:"StackDriftStatus"` -} - -// String returns the string representation -func (s StackDriftInformationSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackDriftInformationSummary) GoString() string { - return s.String() -} - -// SetLastCheckTimestamp sets the LastCheckTimestamp field's value. -func (s *StackDriftInformationSummary) SetLastCheckTimestamp(v time.Time) *StackDriftInformationSummary { - s.LastCheckTimestamp = &v - return s -} - -// SetStackDriftStatus sets the StackDriftStatus field's value. -func (s *StackDriftInformationSummary) SetStackDriftStatus(v string) *StackDriftInformationSummary { - s.StackDriftStatus = &v - return s -} - -// The StackEvent data type. -type StackEvent struct { - _ struct{} `type:"structure"` - - // The token passed to the operation that generated this event. - // - // All events triggered by a given stack operation are assigned the same client - // request token, which you can use to track operations. For example, if you - // execute a CreateStack operation with the token token1, then all the StackEvents - // generated by that operation will have ClientRequestToken set as token1. - // - // In the console, stack operations display the client request token on the - // Events tab. Stack operations that are initiated from the console use the - // token format Console-StackOperation-ID, which helps you easily identify the - // stack operation . For example, if you create a stack using the console, each - // stack event would be assigned the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002. - ClientRequestToken *string `min:"1" type:"string"` - - // The unique ID of this event. - // - // EventId is a required field - EventId *string `type:"string" required:"true"` - - // The logical name of the resource specified in the template. - LogicalResourceId *string `type:"string"` - - // The name or unique identifier associated with the physical instance of the - // resource. - PhysicalResourceId *string `type:"string"` - - // BLOB of the properties used to create the resource. - ResourceProperties *string `type:"string"` - - // Current status of the resource. - ResourceStatus *string `type:"string" enum:"ResourceStatus"` - - // Success/failure message associated with the resource. - ResourceStatusReason *string `type:"string"` - - // Type of resource. (For more information, go to AWS Resource Types Reference - // (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) - // in the AWS CloudFormation User Guide.) - ResourceType *string `min:"1" type:"string"` - - // The unique ID name of the instance of the stack. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` - - // The name associated with a stack. - // - // StackName is a required field - StackName *string `type:"string" required:"true"` - - // Time the status was updated. - // - // Timestamp is a required field - Timestamp *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s StackEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackEvent) GoString() string { - return s.String() -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *StackEvent) SetClientRequestToken(v string) *StackEvent { - s.ClientRequestToken = &v - return s -} - -// SetEventId sets the EventId field's value. -func (s *StackEvent) SetEventId(v string) *StackEvent { - s.EventId = &v - return s -} - -// SetLogicalResourceId sets the LogicalResourceId field's value. -func (s *StackEvent) SetLogicalResourceId(v string) *StackEvent { - s.LogicalResourceId = &v - return s -} - -// SetPhysicalResourceId sets the PhysicalResourceId field's value. -func (s *StackEvent) SetPhysicalResourceId(v string) *StackEvent { - s.PhysicalResourceId = &v - return s -} - -// SetResourceProperties sets the ResourceProperties field's value. -func (s *StackEvent) SetResourceProperties(v string) *StackEvent { - s.ResourceProperties = &v - return s -} - -// SetResourceStatus sets the ResourceStatus field's value. -func (s *StackEvent) SetResourceStatus(v string) *StackEvent { - s.ResourceStatus = &v - return s -} - -// SetResourceStatusReason sets the ResourceStatusReason field's value. -func (s *StackEvent) SetResourceStatusReason(v string) *StackEvent { - s.ResourceStatusReason = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *StackEvent) SetResourceType(v string) *StackEvent { - s.ResourceType = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *StackEvent) SetStackId(v string) *StackEvent { - s.StackId = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *StackEvent) SetStackName(v string) *StackEvent { - s.StackName = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *StackEvent) SetTimestamp(v time.Time) *StackEvent { - s.Timestamp = &v - return s -} - -// An AWS CloudFormation stack, in a specific account and region, that's part -// of a stack set operation. A stack instance is a reference to an attempted -// or actual stack in a given account within a given region. A stack instance -// can exist without a stack—for example, if the stack couldn't be created for -// some reason. A stack instance is associated with only one stack set. Each -// stack instance contains the ID of its associated stack set, as well as the -// ID of the actual stack and the stack status. -type StackInstance struct { - _ struct{} `type:"structure"` - - // The name of the AWS account that the stack instance is associated with. - Account *string `type:"string"` - - // A list of parameters from the stack set template whose values have been overridden - // in this stack instance. - ParameterOverrides []*Parameter `type:"list"` - - // The name of the AWS region that the stack instance is associated with. - Region *string `type:"string"` - - // The ID of the stack instance. - StackId *string `type:"string"` - - // The name or unique ID of the stack set that the stack instance is associated - // with. - StackSetId *string `type:"string"` - - // The status of the stack instance, in terms of its synchronization with its - // associated stack set. - // - // * INOPERABLE: A DeleteStackInstances operation has failed and left the - // stack in an unstable state. Stacks in this state are excluded from further - // UpdateStackSet operations. You might need to perform a DeleteStackInstances - // operation, with RetainStacks set to true, to delete the stack instance, - // and then delete the stack manually. - // - // * OUTDATED: The stack isn't currently up to date with the stack set because: - // - // The associated stack failed during a CreateStackSet or UpdateStackSet operation. - // - // - // The stack was part of a CreateStackSet or UpdateStackSet operation that failed - // or was stopped before the stack was created or updated. - // - // * CURRENT: The stack is currently up to date with the stack set. - Status *string `type:"string" enum:"StackInstanceStatus"` - - // The explanation for the specific status code that is assigned to this stack - // instance. - StatusReason *string `type:"string"` -} - -// String returns the string representation -func (s StackInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackInstance) GoString() string { - return s.String() -} - -// SetAccount sets the Account field's value. -func (s *StackInstance) SetAccount(v string) *StackInstance { - s.Account = &v - return s -} - -// SetParameterOverrides sets the ParameterOverrides field's value. -func (s *StackInstance) SetParameterOverrides(v []*Parameter) *StackInstance { - s.ParameterOverrides = v - return s -} - -// SetRegion sets the Region field's value. -func (s *StackInstance) SetRegion(v string) *StackInstance { - s.Region = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *StackInstance) SetStackId(v string) *StackInstance { - s.StackId = &v - return s -} - -// SetStackSetId sets the StackSetId field's value. -func (s *StackInstance) SetStackSetId(v string) *StackInstance { - s.StackSetId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StackInstance) SetStatus(v string) *StackInstance { - s.Status = &v - return s -} - -// SetStatusReason sets the StatusReason field's value. -func (s *StackInstance) SetStatusReason(v string) *StackInstance { - s.StatusReason = &v - return s -} - -// The structure that contains summary information about a stack instance. -type StackInstanceSummary struct { - _ struct{} `type:"structure"` - - // The name of the AWS account that the stack instance is associated with. - Account *string `type:"string"` - - // The name of the AWS region that the stack instance is associated with. - Region *string `type:"string"` - - // The ID of the stack instance. - StackId *string `type:"string"` - - // The name or unique ID of the stack set that the stack instance is associated - // with. - StackSetId *string `type:"string"` - - // The status of the stack instance, in terms of its synchronization with its - // associated stack set. - // - // * INOPERABLE: A DeleteStackInstances operation has failed and left the - // stack in an unstable state. Stacks in this state are excluded from further - // UpdateStackSet operations. You might need to perform a DeleteStackInstances - // operation, with RetainStacks set to true, to delete the stack instance, - // and then delete the stack manually. - // - // * OUTDATED: The stack isn't currently up to date with the stack set because: - // - // The associated stack failed during a CreateStackSet or UpdateStackSet operation. - // - // - // The stack was part of a CreateStackSet or UpdateStackSet operation that failed - // or was stopped before the stack was created or updated. - // - // * CURRENT: The stack is currently up to date with the stack set. - Status *string `type:"string" enum:"StackInstanceStatus"` - - // The explanation for the specific status code assigned to this stack instance. - StatusReason *string `type:"string"` -} - -// String returns the string representation -func (s StackInstanceSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackInstanceSummary) GoString() string { - return s.String() -} - -// SetAccount sets the Account field's value. -func (s *StackInstanceSummary) SetAccount(v string) *StackInstanceSummary { - s.Account = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *StackInstanceSummary) SetRegion(v string) *StackInstanceSummary { - s.Region = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *StackInstanceSummary) SetStackId(v string) *StackInstanceSummary { - s.StackId = &v - return s -} - -// SetStackSetId sets the StackSetId field's value. -func (s *StackInstanceSummary) SetStackSetId(v string) *StackInstanceSummary { - s.StackSetId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StackInstanceSummary) SetStatus(v string) *StackInstanceSummary { - s.Status = &v - return s -} - -// SetStatusReason sets the StatusReason field's value. -func (s *StackInstanceSummary) SetStatusReason(v string) *StackInstanceSummary { - s.StatusReason = &v - return s -} - -// The StackResource data type. -type StackResource struct { - _ struct{} `type:"structure"` - - // User defined description associated with the resource. - Description *string `min:"1" type:"string"` - - // Information about whether the resource's actual configuration differs, or - // has drifted, from its expected configuration, as defined in the stack template - // and any values specified as template parameters. For more information, see - // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). - DriftInformation *StackResourceDriftInformation `type:"structure"` - - // The logical name of the resource specified in the template. - // - // LogicalResourceId is a required field - LogicalResourceId *string `type:"string" required:"true"` - - // The name or unique identifier that corresponds to a physical instance ID - // of a resource supported by AWS CloudFormation. - PhysicalResourceId *string `type:"string"` - - // Current status of the resource. - // - // ResourceStatus is a required field - ResourceStatus *string `type:"string" required:"true" enum:"ResourceStatus"` - - // Success/failure message associated with the resource. - ResourceStatusReason *string `type:"string"` - - // Type of resource. (For more information, go to AWS Resource Types Reference - // (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) - // in the AWS CloudFormation User Guide.) - // - // ResourceType is a required field - ResourceType *string `min:"1" type:"string" required:"true"` - - // Unique identifier of the stack. - StackId *string `type:"string"` - - // The name associated with the stack. - StackName *string `type:"string"` - - // Time the status was updated. - // - // Timestamp is a required field - Timestamp *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s StackResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackResource) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *StackResource) SetDescription(v string) *StackResource { - s.Description = &v - return s -} - -// SetDriftInformation sets the DriftInformation field's value. -func (s *StackResource) SetDriftInformation(v *StackResourceDriftInformation) *StackResource { - s.DriftInformation = v - return s -} - -// SetLogicalResourceId sets the LogicalResourceId field's value. -func (s *StackResource) SetLogicalResourceId(v string) *StackResource { - s.LogicalResourceId = &v - return s -} - -// SetPhysicalResourceId sets the PhysicalResourceId field's value. -func (s *StackResource) SetPhysicalResourceId(v string) *StackResource { - s.PhysicalResourceId = &v - return s -} - -// SetResourceStatus sets the ResourceStatus field's value. -func (s *StackResource) SetResourceStatus(v string) *StackResource { - s.ResourceStatus = &v - return s -} - -// SetResourceStatusReason sets the ResourceStatusReason field's value. -func (s *StackResource) SetResourceStatusReason(v string) *StackResource { - s.ResourceStatusReason = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *StackResource) SetResourceType(v string) *StackResource { - s.ResourceType = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *StackResource) SetStackId(v string) *StackResource { - s.StackId = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *StackResource) SetStackName(v string) *StackResource { - s.StackName = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *StackResource) SetTimestamp(v time.Time) *StackResource { - s.Timestamp = &v - return s -} - -// Contains detailed information about the specified stack resource. -type StackResourceDetail struct { - _ struct{} `type:"structure"` - - // User defined description associated with the resource. - Description *string `min:"1" type:"string"` - - // Information about whether the resource's actual configuration differs, or - // has drifted, from its expected configuration, as defined in the stack template - // and any values specified as template parameters. For more information, see - // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). - DriftInformation *StackResourceDriftInformation `type:"structure"` - - // Time the status was updated. - // - // LastUpdatedTimestamp is a required field - LastUpdatedTimestamp *time.Time `type:"timestamp" required:"true"` - - // The logical name of the resource specified in the template. - // - // LogicalResourceId is a required field - LogicalResourceId *string `type:"string" required:"true"` - - // The content of the Metadata attribute declared for the resource. For more - // information, see Metadata Attribute (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html) - // in the AWS CloudFormation User Guide. - Metadata *string `type:"string"` - - // The name or unique identifier that corresponds to a physical instance ID - // of a resource supported by AWS CloudFormation. - PhysicalResourceId *string `type:"string"` - - // Current status of the resource. - // - // ResourceStatus is a required field - ResourceStatus *string `type:"string" required:"true" enum:"ResourceStatus"` - - // Success/failure message associated with the resource. - ResourceStatusReason *string `type:"string"` - - // Type of resource. ((For more information, go to AWS Resource Types Reference - // (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) - // in the AWS CloudFormation User Guide.) - // - // ResourceType is a required field - ResourceType *string `min:"1" type:"string" required:"true"` - - // Unique identifier of the stack. - StackId *string `type:"string"` - - // The name associated with the stack. - StackName *string `type:"string"` -} - -// String returns the string representation -func (s StackResourceDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackResourceDetail) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *StackResourceDetail) SetDescription(v string) *StackResourceDetail { - s.Description = &v - return s -} - -// SetDriftInformation sets the DriftInformation field's value. -func (s *StackResourceDetail) SetDriftInformation(v *StackResourceDriftInformation) *StackResourceDetail { - s.DriftInformation = v - return s -} - -// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. -func (s *StackResourceDetail) SetLastUpdatedTimestamp(v time.Time) *StackResourceDetail { - s.LastUpdatedTimestamp = &v - return s -} - -// SetLogicalResourceId sets the LogicalResourceId field's value. -func (s *StackResourceDetail) SetLogicalResourceId(v string) *StackResourceDetail { - s.LogicalResourceId = &v - return s -} - -// SetMetadata sets the Metadata field's value. -func (s *StackResourceDetail) SetMetadata(v string) *StackResourceDetail { - s.Metadata = &v - return s -} - -// SetPhysicalResourceId sets the PhysicalResourceId field's value. -func (s *StackResourceDetail) SetPhysicalResourceId(v string) *StackResourceDetail { - s.PhysicalResourceId = &v - return s -} - -// SetResourceStatus sets the ResourceStatus field's value. -func (s *StackResourceDetail) SetResourceStatus(v string) *StackResourceDetail { - s.ResourceStatus = &v - return s -} - -// SetResourceStatusReason sets the ResourceStatusReason field's value. -func (s *StackResourceDetail) SetResourceStatusReason(v string) *StackResourceDetail { - s.ResourceStatusReason = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *StackResourceDetail) SetResourceType(v string) *StackResourceDetail { - s.ResourceType = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *StackResourceDetail) SetStackId(v string) *StackResourceDetail { - s.StackId = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *StackResourceDetail) SetStackName(v string) *StackResourceDetail { - s.StackName = &v - return s -} - -// Contains the drift information for a resource that has been checked for drift. -// This includes actual and expected property values for resources in which -// AWS CloudFormation has detected drift. Only resource properties explicitly -// defined in the stack template are checked for drift. For more information, -// see Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). -// -// Resources that do not currently support drift detection cannot be checked. -// For a list of resources that support drift detection, see Resources that -// Support Drift Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). -// -// Use DetectStackResourceDrift to detect drift on individual resources, or -// DetectStackDrift to detect drift on all resources in a given stack that support -// drift detection. -type StackResourceDrift struct { - _ struct{} `type:"structure"` - - // A JSON structure containing the actual property values of the stack resource. - // - // For resources whose StackResourceDriftStatus is DELETED, this structure will - // not be present. - ActualProperties *string `type:"string"` - - // A JSON structure containing the expected property values of the stack resource, - // as defined in the stack template and any values specified as template parameters. - // - // For resources whose StackResourceDriftStatus is DELETED, this structure will - // not be present. - ExpectedProperties *string `type:"string"` - - // The logical name of the resource specified in the template. - // - // LogicalResourceId is a required field - LogicalResourceId *string `type:"string" required:"true"` - - // The name or unique identifier that corresponds to a physical instance ID - // of a resource supported by AWS CloudFormation. - PhysicalResourceId *string `type:"string"` - - // Context information that enables AWS CloudFormation to uniquely identify - // a resource. AWS CloudFormation uses context key-value pairs in cases where - // a resource's logical and physical IDs are not enough to uniquely identify - // that resource. Each context key-value pair specifies a unique resource that - // contains the targeted resource. - PhysicalResourceIdContext []*PhysicalResourceIdContextKeyValuePair `type:"list"` - - // A collection of the resource properties whose actual values differ from their - // expected values. These will be present only for resources whose StackResourceDriftStatus - // is MODIFIED. - PropertyDifferences []*PropertyDifference `type:"list"` - - // The type of the resource. - // - // ResourceType is a required field - ResourceType *string `min:"1" type:"string" required:"true"` - - // The ID of the stack. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` - - // Status of the resource's actual configuration compared to its expected configuration - // - // * DELETED: The resource differs from its expected template configuration - // because the resource has been deleted. - // - // * MODIFIED: One or more resource properties differ from their expected - // values (as defined in the stack template and any values specified as template - // parameters). - // - // * IN_SYNC: The resources's actual configuration matches its expected template - // configuration. - // - // * NOT_CHECKED: AWS CloudFormation does not currently return this value. - // - // StackResourceDriftStatus is a required field - StackResourceDriftStatus *string `type:"string" required:"true" enum:"StackResourceDriftStatus"` - - // Time at which AWS CloudFormation performed drift detection on the stack resource. - // - // Timestamp is a required field - Timestamp *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s StackResourceDrift) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackResourceDrift) GoString() string { - return s.String() -} - -// SetActualProperties sets the ActualProperties field's value. -func (s *StackResourceDrift) SetActualProperties(v string) *StackResourceDrift { - s.ActualProperties = &v - return s -} - -// SetExpectedProperties sets the ExpectedProperties field's value. -func (s *StackResourceDrift) SetExpectedProperties(v string) *StackResourceDrift { - s.ExpectedProperties = &v - return s -} - -// SetLogicalResourceId sets the LogicalResourceId field's value. -func (s *StackResourceDrift) SetLogicalResourceId(v string) *StackResourceDrift { - s.LogicalResourceId = &v - return s -} - -// SetPhysicalResourceId sets the PhysicalResourceId field's value. -func (s *StackResourceDrift) SetPhysicalResourceId(v string) *StackResourceDrift { - s.PhysicalResourceId = &v - return s -} - -// SetPhysicalResourceIdContext sets the PhysicalResourceIdContext field's value. -func (s *StackResourceDrift) SetPhysicalResourceIdContext(v []*PhysicalResourceIdContextKeyValuePair) *StackResourceDrift { - s.PhysicalResourceIdContext = v - return s -} - -// SetPropertyDifferences sets the PropertyDifferences field's value. -func (s *StackResourceDrift) SetPropertyDifferences(v []*PropertyDifference) *StackResourceDrift { - s.PropertyDifferences = v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *StackResourceDrift) SetResourceType(v string) *StackResourceDrift { - s.ResourceType = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *StackResourceDrift) SetStackId(v string) *StackResourceDrift { - s.StackId = &v - return s -} - -// SetStackResourceDriftStatus sets the StackResourceDriftStatus field's value. -func (s *StackResourceDrift) SetStackResourceDriftStatus(v string) *StackResourceDrift { - s.StackResourceDriftStatus = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *StackResourceDrift) SetTimestamp(v time.Time) *StackResourceDrift { - s.Timestamp = &v - return s -} - -// Contains information about whether the resource's actual configuration differs, -// or has drifted, from its expected configuration. -type StackResourceDriftInformation struct { - _ struct{} `type:"structure"` - - // When AWS CloudFormation last checked if the resource had drifted from its - // expected configuration. - LastCheckTimestamp *time.Time `type:"timestamp"` - - // Status of the resource's actual configuration compared to its expected configuration - // - // * DELETED: The resource differs from its expected configuration in that - // it has been deleted. - // - // * MODIFIED: The resource differs from its expected configuration. - // - // * NOT_CHECKED: AWS CloudFormation has not checked if the resource differs - // from its expected configuration. - // - // Any resources that do not currently support drift detection have a status - // of NOT_CHECKED. For more information, see Resources that Support Drift - // Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). - // - // - // * IN_SYNC: The resources's actual configuration matches its expected configuration. - // - // StackResourceDriftStatus is a required field - StackResourceDriftStatus *string `type:"string" required:"true" enum:"StackResourceDriftStatus"` -} - -// String returns the string representation -func (s StackResourceDriftInformation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackResourceDriftInformation) GoString() string { - return s.String() -} - -// SetLastCheckTimestamp sets the LastCheckTimestamp field's value. -func (s *StackResourceDriftInformation) SetLastCheckTimestamp(v time.Time) *StackResourceDriftInformation { - s.LastCheckTimestamp = &v - return s -} - -// SetStackResourceDriftStatus sets the StackResourceDriftStatus field's value. -func (s *StackResourceDriftInformation) SetStackResourceDriftStatus(v string) *StackResourceDriftInformation { - s.StackResourceDriftStatus = &v - return s -} - -// Summarizes information about whether the resource's actual configuration -// differs, or has drifted, from its expected configuration. -type StackResourceDriftInformationSummary struct { - _ struct{} `type:"structure"` - - // When AWS CloudFormation last checked if the resource had drifted from its - // expected configuration. - LastCheckTimestamp *time.Time `type:"timestamp"` - - // Status of the resource's actual configuration compared to its expected configuration - // - // * DELETED: The resource differs from its expected configuration in that - // it has been deleted. - // - // * MODIFIED: The resource differs from its expected configuration. - // - // * NOT_CHECKED: AWS CloudFormation has not checked if the resource differs - // from its expected configuration. - // - // Any resources that do not currently support drift detection have a status - // of NOT_CHECKED. For more information, see Resources that Support Drift - // Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). - // If you performed an ContinueUpdateRollback operation on a stack, any resources - // included in ResourcesToSkip will also have a status of NOT_CHECKED. For - // more information on skipping resources during rollback operations, see - // Continue Rolling Back an Update (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-continueupdaterollback.html) - // in the AWS CloudFormation User Guide. - // - // * IN_SYNC: The resources's actual configuration matches its expected configuration. - // - // StackResourceDriftStatus is a required field - StackResourceDriftStatus *string `type:"string" required:"true" enum:"StackResourceDriftStatus"` -} - -// String returns the string representation -func (s StackResourceDriftInformationSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackResourceDriftInformationSummary) GoString() string { - return s.String() -} - -// SetLastCheckTimestamp sets the LastCheckTimestamp field's value. -func (s *StackResourceDriftInformationSummary) SetLastCheckTimestamp(v time.Time) *StackResourceDriftInformationSummary { - s.LastCheckTimestamp = &v - return s -} - -// SetStackResourceDriftStatus sets the StackResourceDriftStatus field's value. -func (s *StackResourceDriftInformationSummary) SetStackResourceDriftStatus(v string) *StackResourceDriftInformationSummary { - s.StackResourceDriftStatus = &v - return s -} - -// Contains high-level information about the specified stack resource. -type StackResourceSummary struct { - _ struct{} `type:"structure"` - - // Information about whether the resource's actual configuration differs, or - // has drifted, from its expected configuration, as defined in the stack template - // and any values specified as template parameters. For more information, see - // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). - DriftInformation *StackResourceDriftInformationSummary `type:"structure"` - - // Time the status was updated. - // - // LastUpdatedTimestamp is a required field - LastUpdatedTimestamp *time.Time `type:"timestamp" required:"true"` - - // The logical name of the resource specified in the template. - // - // LogicalResourceId is a required field - LogicalResourceId *string `type:"string" required:"true"` - - // The name or unique identifier that corresponds to a physical instance ID - // of the resource. - PhysicalResourceId *string `type:"string"` - - // Current status of the resource. - // - // ResourceStatus is a required field - ResourceStatus *string `type:"string" required:"true" enum:"ResourceStatus"` - - // Success/failure message associated with the resource. - ResourceStatusReason *string `type:"string"` - - // Type of resource. (For more information, go to AWS Resource Types Reference - // (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) - // in the AWS CloudFormation User Guide.) - // - // ResourceType is a required field - ResourceType *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StackResourceSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackResourceSummary) GoString() string { - return s.String() -} - -// SetDriftInformation sets the DriftInformation field's value. -func (s *StackResourceSummary) SetDriftInformation(v *StackResourceDriftInformationSummary) *StackResourceSummary { - s.DriftInformation = v - return s -} - -// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. -func (s *StackResourceSummary) SetLastUpdatedTimestamp(v time.Time) *StackResourceSummary { - s.LastUpdatedTimestamp = &v - return s -} - -// SetLogicalResourceId sets the LogicalResourceId field's value. -func (s *StackResourceSummary) SetLogicalResourceId(v string) *StackResourceSummary { - s.LogicalResourceId = &v - return s -} - -// SetPhysicalResourceId sets the PhysicalResourceId field's value. -func (s *StackResourceSummary) SetPhysicalResourceId(v string) *StackResourceSummary { - s.PhysicalResourceId = &v - return s -} - -// SetResourceStatus sets the ResourceStatus field's value. -func (s *StackResourceSummary) SetResourceStatus(v string) *StackResourceSummary { - s.ResourceStatus = &v - return s -} - -// SetResourceStatusReason sets the ResourceStatusReason field's value. -func (s *StackResourceSummary) SetResourceStatusReason(v string) *StackResourceSummary { - s.ResourceStatusReason = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *StackResourceSummary) SetResourceType(v string) *StackResourceSummary { - s.ResourceType = &v - return s -} - -// A structure that contains information about a stack set. A stack set enables -// you to provision stacks into AWS accounts and across regions by using a single -// CloudFormation template. In the stack set, you specify the template to use, -// as well as any parameters and capabilities that the template requires. -type StackSet struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Number (ARN) of the IAM role used to create or update - // the stack set. - // - // Use customized administrator roles to control which users or groups can manage - // specific stack sets within the same administrator account. For more information, - // see Prerequisites: Granting Permissions for Stack Set Operations (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) - // in the AWS CloudFormation User Guide. - AdministrationRoleARN *string `min:"20" type:"string"` - - // The capabilities that are allowed in the stack set. Some stack set templates - // might include resources that can affect permissions in your AWS account—for - // example, by creating new AWS Identity and Access Management (IAM) users. - // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates. (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) - Capabilities []*string `type:"list"` - - // A description of the stack set that you specify when the stack set is created - // or updated. - Description *string `min:"1" type:"string"` - - // The name of the IAM execution role used to create or update the stack set. - // - // Use customized execution roles to control which stack resources users and - // groups can include in their stack sets. - ExecutionRoleName *string `min:"1" type:"string"` - - // A list of input parameters for a stack set. - Parameters []*Parameter `type:"list"` - - // The Amazon Resource Number (ARN) of the stack set. - StackSetARN *string `type:"string"` - - // The ID of the stack set. - StackSetId *string `type:"string"` - - // The name that's associated with the stack set. - StackSetName *string `type:"string"` - - // The status of the stack set. - Status *string `type:"string" enum:"StackSetStatus"` - - // A list of tags that specify information about the stack set. A maximum number - // of 50 tags can be specified. - Tags []*Tag `type:"list"` - - // The structure that contains the body of the template that was used to create - // or update the stack set. - TemplateBody *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s StackSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackSet) GoString() string { - return s.String() -} - -// SetAdministrationRoleARN sets the AdministrationRoleARN field's value. -func (s *StackSet) SetAdministrationRoleARN(v string) *StackSet { - s.AdministrationRoleARN = &v - return s -} - -// SetCapabilities sets the Capabilities field's value. -func (s *StackSet) SetCapabilities(v []*string) *StackSet { - s.Capabilities = v - return s -} - -// SetDescription sets the Description field's value. -func (s *StackSet) SetDescription(v string) *StackSet { - s.Description = &v - return s -} - -// SetExecutionRoleName sets the ExecutionRoleName field's value. -func (s *StackSet) SetExecutionRoleName(v string) *StackSet { - s.ExecutionRoleName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *StackSet) SetParameters(v []*Parameter) *StackSet { - s.Parameters = v - return s -} - -// SetStackSetARN sets the StackSetARN field's value. -func (s *StackSet) SetStackSetARN(v string) *StackSet { - s.StackSetARN = &v - return s -} - -// SetStackSetId sets the StackSetId field's value. -func (s *StackSet) SetStackSetId(v string) *StackSet { - s.StackSetId = &v - return s -} - -// SetStackSetName sets the StackSetName field's value. -func (s *StackSet) SetStackSetName(v string) *StackSet { - s.StackSetName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StackSet) SetStatus(v string) *StackSet { - s.Status = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *StackSet) SetTags(v []*Tag) *StackSet { - s.Tags = v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *StackSet) SetTemplateBody(v string) *StackSet { - s.TemplateBody = &v - return s -} - -// The structure that contains information about a stack set operation. -type StackSetOperation struct { - _ struct{} `type:"structure"` - - // The type of stack set operation: CREATE, UPDATE, or DELETE. Create and delete - // operations affect only the specified stack set instances that are associated - // with the specified stack set. Update operations affect both the stack set - // itself, as well as all associated stack set instances. - Action *string `type:"string" enum:"StackSetOperationAction"` - - // The Amazon Resource Number (ARN) of the IAM role used to perform this stack - // set operation. - // - // Use customized administrator roles to control which users or groups can manage - // specific stack sets within the same administrator account. For more information, - // see Define Permissions for Multiple Administrators (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) - // in the AWS CloudFormation User Guide. - AdministrationRoleARN *string `min:"20" type:"string"` - - // The time at which the operation was initiated. Note that the creation times - // for the stack set operation might differ from the creation time of the individual - // stacks themselves. This is because AWS CloudFormation needs to perform preparatory - // work for the operation, such as dispatching the work to the requested regions, - // before actually creating the first stacks. - CreationTimestamp *time.Time `type:"timestamp"` - - // The time at which the stack set operation ended, across all accounts and - // regions specified. Note that this doesn't necessarily mean that the stack - // set operation was successful, or even attempted, in each account or region. - EndTimestamp *time.Time `type:"timestamp"` - - // The name of the IAM execution role used to create or update the stack set. - // - // Use customized execution roles to control which stack resources users and - // groups can include in their stack sets. - ExecutionRoleName *string `min:"1" type:"string"` - - // The unique ID of a stack set operation. - OperationId *string `min:"1" type:"string"` - - // The preferences for how AWS CloudFormation performs this stack set operation. - OperationPreferences *StackSetOperationPreferences `type:"structure"` - - // For stack set operations of action type DELETE, specifies whether to remove - // the stack instances from the specified stack set, but doesn't delete the - // stacks. You can't reassociate a retained stack, or add an existing, saved - // stack to a new stack set. - RetainStacks *bool `type:"boolean"` - - // The ID of the stack set. - StackSetId *string `type:"string"` - - // The status of the operation. - // - // * FAILED: The operation exceeded the specified failure tolerance. The - // failure tolerance value that you've set for an operation is applied for - // each region during stack create and update operations. If the number of - // failed stacks within a region exceeds the failure tolerance, the status - // of the operation in the region is set to FAILED. This in turn sets the - // status of the operation as a whole to FAILED, and AWS CloudFormation cancels - // the operation in any remaining regions. - // - // * RUNNING: The operation is currently being performed. - // - // * STOPPED: The user has cancelled the operation. - // - // * STOPPING: The operation is in the process of stopping, at user request. - // - // - // * SUCCEEDED: The operation completed creating or updating all the specified - // stacks without exceeding the failure tolerance for the operation. - Status *string `type:"string" enum:"StackSetOperationStatus"` -} - -// String returns the string representation -func (s StackSetOperation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackSetOperation) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *StackSetOperation) SetAction(v string) *StackSetOperation { - s.Action = &v - return s -} - -// SetAdministrationRoleARN sets the AdministrationRoleARN field's value. -func (s *StackSetOperation) SetAdministrationRoleARN(v string) *StackSetOperation { - s.AdministrationRoleARN = &v - return s -} - -// SetCreationTimestamp sets the CreationTimestamp field's value. -func (s *StackSetOperation) SetCreationTimestamp(v time.Time) *StackSetOperation { - s.CreationTimestamp = &v - return s -} - -// SetEndTimestamp sets the EndTimestamp field's value. -func (s *StackSetOperation) SetEndTimestamp(v time.Time) *StackSetOperation { - s.EndTimestamp = &v - return s -} - -// SetExecutionRoleName sets the ExecutionRoleName field's value. -func (s *StackSetOperation) SetExecutionRoleName(v string) *StackSetOperation { - s.ExecutionRoleName = &v - return s -} - -// SetOperationId sets the OperationId field's value. -func (s *StackSetOperation) SetOperationId(v string) *StackSetOperation { - s.OperationId = &v - return s -} - -// SetOperationPreferences sets the OperationPreferences field's value. -func (s *StackSetOperation) SetOperationPreferences(v *StackSetOperationPreferences) *StackSetOperation { - s.OperationPreferences = v - return s -} - -// SetRetainStacks sets the RetainStacks field's value. -func (s *StackSetOperation) SetRetainStacks(v bool) *StackSetOperation { - s.RetainStacks = &v - return s -} - -// SetStackSetId sets the StackSetId field's value. -func (s *StackSetOperation) SetStackSetId(v string) *StackSetOperation { - s.StackSetId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StackSetOperation) SetStatus(v string) *StackSetOperation { - s.Status = &v - return s -} - -// The user-specified preferences for how AWS CloudFormation performs a stack -// set operation. -// -// For more information on maximum concurrent accounts and failure tolerance, -// see Stack set operation options (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stackset-ops-options). -type StackSetOperationPreferences struct { - _ struct{} `type:"structure"` - - // The number of accounts, per region, for which this operation can fail before - // AWS CloudFormation stops the operation in that region. If the operation is - // stopped in a region, AWS CloudFormation doesn't attempt the operation in - // any subsequent regions. - // - // Conditional: You must specify either FailureToleranceCount or FailureTolerancePercentage - // (but not both). - FailureToleranceCount *int64 `type:"integer"` - - // The percentage of accounts, per region, for which this stack operation can - // fail before AWS CloudFormation stops the operation in that region. If the - // operation is stopped in a region, AWS CloudFormation doesn't attempt the - // operation in any subsequent regions. - // - // When calculating the number of accounts based on the specified percentage, - // AWS CloudFormation rounds down to the next whole number. - // - // Conditional: You must specify either FailureToleranceCount or FailureTolerancePercentage, - // but not both. - FailureTolerancePercentage *int64 `type:"integer"` - - // The maximum number of accounts in which to perform this operation at one - // time. This is dependent on the value of FailureToleranceCount—MaxConcurrentCount - // is at most one more than the FailureToleranceCount . - // - // Note that this setting lets you specify the maximum for operations. For large - // deployments, under certain circumstances the actual number of accounts acted - // upon concurrently may be lower due to service throttling. - // - // Conditional: You must specify either MaxConcurrentCount or MaxConcurrentPercentage, - // but not both. - MaxConcurrentCount *int64 `min:"1" type:"integer"` - - // The maximum percentage of accounts in which to perform this operation at - // one time. - // - // When calculating the number of accounts based on the specified percentage, - // AWS CloudFormation rounds down to the next whole number. This is true except - // in cases where rounding down would result is zero. In this case, CloudFormation - // sets the number as one instead. - // - // Note that this setting lets you specify the maximum for operations. For large - // deployments, under certain circumstances the actual number of accounts acted - // upon concurrently may be lower due to service throttling. - // - // Conditional: You must specify either MaxConcurrentCount or MaxConcurrentPercentage, - // but not both. - MaxConcurrentPercentage *int64 `min:"1" type:"integer"` - - // The order of the regions in where you want to perform the stack operation. - RegionOrder []*string `type:"list"` -} - -// String returns the string representation -func (s StackSetOperationPreferences) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackSetOperationPreferences) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StackSetOperationPreferences) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StackSetOperationPreferences"} - if s.MaxConcurrentCount != nil && *s.MaxConcurrentCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxConcurrentCount", 1)) - } - if s.MaxConcurrentPercentage != nil && *s.MaxConcurrentPercentage < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxConcurrentPercentage", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFailureToleranceCount sets the FailureToleranceCount field's value. -func (s *StackSetOperationPreferences) SetFailureToleranceCount(v int64) *StackSetOperationPreferences { - s.FailureToleranceCount = &v - return s -} - -// SetFailureTolerancePercentage sets the FailureTolerancePercentage field's value. -func (s *StackSetOperationPreferences) SetFailureTolerancePercentage(v int64) *StackSetOperationPreferences { - s.FailureTolerancePercentage = &v - return s -} - -// SetMaxConcurrentCount sets the MaxConcurrentCount field's value. -func (s *StackSetOperationPreferences) SetMaxConcurrentCount(v int64) *StackSetOperationPreferences { - s.MaxConcurrentCount = &v - return s -} - -// SetMaxConcurrentPercentage sets the MaxConcurrentPercentage field's value. -func (s *StackSetOperationPreferences) SetMaxConcurrentPercentage(v int64) *StackSetOperationPreferences { - s.MaxConcurrentPercentage = &v - return s -} - -// SetRegionOrder sets the RegionOrder field's value. -func (s *StackSetOperationPreferences) SetRegionOrder(v []*string) *StackSetOperationPreferences { - s.RegionOrder = v - return s -} - -// The structure that contains information about a specified operation's results -// for a given account in a given region. -type StackSetOperationResultSummary struct { - _ struct{} `type:"structure"` - - // The name of the AWS account for this operation result. - Account *string `type:"string"` - - // The results of the account gate function AWS CloudFormation invokes, if present, - // before proceeding with stack set operations in an account - AccountGateResult *AccountGateResult `type:"structure"` - - // The name of the AWS region for this operation result. - Region *string `type:"string"` - - // The result status of the stack set operation for the given account in the - // given region. - // - // * CANCELLED: The operation in the specified account and region has been - // cancelled. This is either because a user has stopped the stack set operation, - // or because the failure tolerance of the stack set operation has been exceeded. - // - // * FAILED: The operation in the specified account and region failed. - // - // If the stack set operation fails in enough accounts within a region, the - // failure tolerance for the stack set operation as a whole might be exceeded. - // - // - // * RUNNING: The operation in the specified account and region is currently - // in progress. - // - // * PENDING: The operation in the specified account and region has yet to - // start. - // - // * SUCCEEDED: The operation in the specified account and region completed - // successfully. - Status *string `type:"string" enum:"StackSetOperationResultStatus"` - - // The reason for the assigned result status. - StatusReason *string `type:"string"` -} - -// String returns the string representation -func (s StackSetOperationResultSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackSetOperationResultSummary) GoString() string { - return s.String() -} - -// SetAccount sets the Account field's value. -func (s *StackSetOperationResultSummary) SetAccount(v string) *StackSetOperationResultSummary { - s.Account = &v - return s -} - -// SetAccountGateResult sets the AccountGateResult field's value. -func (s *StackSetOperationResultSummary) SetAccountGateResult(v *AccountGateResult) *StackSetOperationResultSummary { - s.AccountGateResult = v - return s -} - -// SetRegion sets the Region field's value. -func (s *StackSetOperationResultSummary) SetRegion(v string) *StackSetOperationResultSummary { - s.Region = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StackSetOperationResultSummary) SetStatus(v string) *StackSetOperationResultSummary { - s.Status = &v - return s -} - -// SetStatusReason sets the StatusReason field's value. -func (s *StackSetOperationResultSummary) SetStatusReason(v string) *StackSetOperationResultSummary { - s.StatusReason = &v - return s -} - -// The structures that contain summary information about the specified operation. -type StackSetOperationSummary struct { - _ struct{} `type:"structure"` - - // The type of operation: CREATE, UPDATE, or DELETE. Create and delete operations - // affect only the specified stack instances that are associated with the specified - // stack set. Update operations affect both the stack set itself as well as - // all associated stack set instances. - Action *string `type:"string" enum:"StackSetOperationAction"` - - // The time at which the operation was initiated. Note that the creation times - // for the stack set operation might differ from the creation time of the individual - // stacks themselves. This is because AWS CloudFormation needs to perform preparatory - // work for the operation, such as dispatching the work to the requested regions, - // before actually creating the first stacks. - CreationTimestamp *time.Time `type:"timestamp"` - - // The time at which the stack set operation ended, across all accounts and - // regions specified. Note that this doesn't necessarily mean that the stack - // set operation was successful, or even attempted, in each account or region. - EndTimestamp *time.Time `type:"timestamp"` - - // The unique ID of the stack set operation. - OperationId *string `min:"1" type:"string"` - - // The overall status of the operation. - // - // * FAILED: The operation exceeded the specified failure tolerance. The - // failure tolerance value that you've set for an operation is applied for - // each region during stack create and update operations. If the number of - // failed stacks within a region exceeds the failure tolerance, the status - // of the operation in the region is set to FAILED. This in turn sets the - // status of the operation as a whole to FAILED, and AWS CloudFormation cancels - // the operation in any remaining regions. - // - // * RUNNING: The operation is currently being performed. - // - // * STOPPED: The user has cancelled the operation. - // - // * STOPPING: The operation is in the process of stopping, at user request. - // - // - // * SUCCEEDED: The operation completed creating or updating all the specified - // stacks without exceeding the failure tolerance for the operation. - Status *string `type:"string" enum:"StackSetOperationStatus"` -} - -// String returns the string representation -func (s StackSetOperationSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackSetOperationSummary) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *StackSetOperationSummary) SetAction(v string) *StackSetOperationSummary { - s.Action = &v - return s -} - -// SetCreationTimestamp sets the CreationTimestamp field's value. -func (s *StackSetOperationSummary) SetCreationTimestamp(v time.Time) *StackSetOperationSummary { - s.CreationTimestamp = &v - return s -} - -// SetEndTimestamp sets the EndTimestamp field's value. -func (s *StackSetOperationSummary) SetEndTimestamp(v time.Time) *StackSetOperationSummary { - s.EndTimestamp = &v - return s -} - -// SetOperationId sets the OperationId field's value. -func (s *StackSetOperationSummary) SetOperationId(v string) *StackSetOperationSummary { - s.OperationId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StackSetOperationSummary) SetStatus(v string) *StackSetOperationSummary { - s.Status = &v - return s -} - -// The structures that contain summary information about the specified stack -// set. -type StackSetSummary struct { - _ struct{} `type:"structure"` - - // A description of the stack set that you specify when the stack set is created - // or updated. - Description *string `min:"1" type:"string"` - - // The ID of the stack set. - StackSetId *string `type:"string"` - - // The name of the stack set. - StackSetName *string `type:"string"` - - // The status of the stack set. - Status *string `type:"string" enum:"StackSetStatus"` -} - -// String returns the string representation -func (s StackSetSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackSetSummary) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *StackSetSummary) SetDescription(v string) *StackSetSummary { - s.Description = &v - return s -} - -// SetStackSetId sets the StackSetId field's value. -func (s *StackSetSummary) SetStackSetId(v string) *StackSetSummary { - s.StackSetId = &v - return s -} - -// SetStackSetName sets the StackSetName field's value. -func (s *StackSetSummary) SetStackSetName(v string) *StackSetSummary { - s.StackSetName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StackSetSummary) SetStatus(v string) *StackSetSummary { - s.Status = &v - return s -} - -// The StackSummary Data Type -type StackSummary struct { - _ struct{} `type:"structure"` - - // The time the stack was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The time the stack was deleted. - DeletionTime *time.Time `type:"timestamp"` - - // Summarizes information on whether a stack's actual configuration differs, - // or has drifted, from it's expected configuration, as defined in the stack - // template and any values specified as template parameters. For more information, - // see Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). - DriftInformation *StackDriftInformationSummary `type:"structure"` - - // The time the stack was last updated. This field will only be returned if - // the stack has been updated at least once. - LastUpdatedTime *time.Time `type:"timestamp"` - - // For nested stacks--stacks created as resources for another stack--the stack - // ID of the direct parent of this stack. For the first level of nested stacks, - // the root stack is also the parent stack. - // - // For more information, see Working with Nested Stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) - // in the AWS CloudFormation User Guide. - ParentId *string `type:"string"` - - // For nested stacks--stacks created as resources for another stack--the stack - // ID of the the top-level stack to which the nested stack ultimately belongs. - // - // For more information, see Working with Nested Stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) - // in the AWS CloudFormation User Guide. - RootId *string `type:"string"` - - // Unique stack identifier. - StackId *string `type:"string"` - - // The name associated with the stack. - // - // StackName is a required field - StackName *string `type:"string" required:"true"` - - // The current status of the stack. - // - // StackStatus is a required field - StackStatus *string `type:"string" required:"true" enum:"StackStatus"` - - // Success/Failure message associated with the stack status. - StackStatusReason *string `type:"string"` - - // The template description of the template used to create the stack. - TemplateDescription *string `type:"string"` -} - -// String returns the string representation -func (s StackSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackSummary) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *StackSummary) SetCreationTime(v time.Time) *StackSummary { - s.CreationTime = &v - return s -} - -// SetDeletionTime sets the DeletionTime field's value. -func (s *StackSummary) SetDeletionTime(v time.Time) *StackSummary { - s.DeletionTime = &v - return s -} - -// SetDriftInformation sets the DriftInformation field's value. -func (s *StackSummary) SetDriftInformation(v *StackDriftInformationSummary) *StackSummary { - s.DriftInformation = v - return s -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *StackSummary) SetLastUpdatedTime(v time.Time) *StackSummary { - s.LastUpdatedTime = &v - return s -} - -// SetParentId sets the ParentId field's value. -func (s *StackSummary) SetParentId(v string) *StackSummary { - s.ParentId = &v - return s -} - -// SetRootId sets the RootId field's value. -func (s *StackSummary) SetRootId(v string) *StackSummary { - s.RootId = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *StackSummary) SetStackId(v string) *StackSummary { - s.StackId = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *StackSummary) SetStackName(v string) *StackSummary { - s.StackName = &v - return s -} - -// SetStackStatus sets the StackStatus field's value. -func (s *StackSummary) SetStackStatus(v string) *StackSummary { - s.StackStatus = &v - return s -} - -// SetStackStatusReason sets the StackStatusReason field's value. -func (s *StackSummary) SetStackStatusReason(v string) *StackSummary { - s.StackStatusReason = &v - return s -} - -// SetTemplateDescription sets the TemplateDescription field's value. -func (s *StackSummary) SetTemplateDescription(v string) *StackSummary { - s.TemplateDescription = &v - return s -} - -type StopStackSetOperationInput struct { - _ struct{} `type:"structure"` - - // The ID of the stack operation. - // - // OperationId is a required field - OperationId *string `min:"1" type:"string" required:"true"` - - // The name or unique ID of the stack set that you want to stop the operation - // for. - // - // StackSetName is a required field - StackSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StopStackSetOperationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopStackSetOperationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopStackSetOperationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopStackSetOperationInput"} - if s.OperationId == nil { - invalidParams.Add(request.NewErrParamRequired("OperationId")) - } - if s.OperationId != nil && len(*s.OperationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OperationId", 1)) - } - if s.StackSetName == nil { - invalidParams.Add(request.NewErrParamRequired("StackSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOperationId sets the OperationId field's value. -func (s *StopStackSetOperationInput) SetOperationId(v string) *StopStackSetOperationInput { - s.OperationId = &v - return s -} - -// SetStackSetName sets the StackSetName field's value. -func (s *StopStackSetOperationInput) SetStackSetName(v string) *StopStackSetOperationInput { - s.StackSetName = &v - return s -} - -type StopStackSetOperationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopStackSetOperationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopStackSetOperationOutput) GoString() string { - return s.String() -} - -// The Tag type enables you to specify a key-value pair that can be used to -// store information about an AWS CloudFormation stack. -type Tag struct { - _ struct{} `type:"structure"` - - // Required. A string used to identify this tag. You can specify a maximum of - // 128 characters for a tag key. Tags owned by Amazon Web Services (AWS) have - // the reserved prefix: aws:. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // Required. A string containing the value for this tag. You can specify a maximum - // of 256 characters for a tag value. - // - // Value is a required field - Value *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// The TemplateParameter data type. -type TemplateParameter struct { - _ struct{} `type:"structure"` - - // The default value associated with the parameter. - DefaultValue *string `type:"string"` - - // User defined description associated with the parameter. - Description *string `min:"1" type:"string"` - - // Flag indicating whether the parameter should be displayed as plain text in - // logs and UIs. - NoEcho *bool `type:"boolean"` - - // The name associated with the parameter. - ParameterKey *string `type:"string"` -} - -// String returns the string representation -func (s TemplateParameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TemplateParameter) GoString() string { - return s.String() -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *TemplateParameter) SetDefaultValue(v string) *TemplateParameter { - s.DefaultValue = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *TemplateParameter) SetDescription(v string) *TemplateParameter { - s.Description = &v - return s -} - -// SetNoEcho sets the NoEcho field's value. -func (s *TemplateParameter) SetNoEcho(v bool) *TemplateParameter { - s.NoEcho = &v - return s -} - -// SetParameterKey sets the ParameterKey field's value. -func (s *TemplateParameter) SetParameterKey(v string) *TemplateParameter { - s.ParameterKey = &v - return s -} - -// The input for an UpdateStack action. -type UpdateStackInput struct { - _ struct{} `type:"structure"` - - // In some cases, you must explicity acknowledge that your stack template contains - // certain capabilities in order for AWS CloudFormation to update the stack. - // - // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM - // - // Some stack templates might include resources that can affect permissions - // in your AWS account; for example, by creating new AWS Identity and Access - // Management (IAM) users. For those stacks, you must explicitly acknowledge - // this by specifying one of these capabilities. - // - // The following IAM resources require you to specify either the CAPABILITY_IAM - // or CAPABILITY_NAMED_IAM capability. - // - // If you have IAM resources, you can specify either capability. - // - // If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. - // - // - // If you don't specify either of these capabilities, AWS CloudFormation returns - // an InsufficientCapabilities error. - // - // If your stack template contains these resources, we recommend that you review - // all permissions associated with them and edit their permissions if necessary. - // - // AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) - // - // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) - // - // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) - // - // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) - // - // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) - // - // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) - // - // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) - // - // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). - // - // * CAPABILITY_AUTO_EXPAND - // - // Some template contain macros. Macros perform custom processing on templates; - // this can include simple actions like find-and-replace operations, all - // the way to extensive transformations of entire templates. Because of this, - // users typically create a change set from the processed template, so that - // they can review the changes resulting from the macros before actually - // updating the stack. If your stack template contains one or more macros, - // and you choose to update a stack directly from the processed template, - // without first reviewing the resulting changes in a change set, you must - // acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) - // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) - // transforms, which are macros hosted by AWS CloudFormation. - // - // Change sets do not currently support nested stacks. If you want to update - // a stack from a stack template that contains macros and nested stacks, - // you must update the stack directly from the template using this capability. - // - // You should only update stacks directly from a stack template that contains - // macros if you know what processing the macro performs. - // - // Each macro relies on an underlying Lambda service function for processing - // stack templates. Be aware that the Lambda function owner can update the - // function operation without AWS CloudFormation being notified. - // - // For more information, see Using AWS CloudFormation Macros to Perform Custom - // Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). - Capabilities []*string `type:"list"` - - // A unique identifier for this UpdateStack request. Specify this token if you - // plan to retry requests so that AWS CloudFormation knows that you're not attempting - // to update a stack with the same name. You might retry UpdateStack requests - // to ensure that AWS CloudFormation successfully received them. - // - // All events triggered by a given stack operation are assigned the same client - // request token, which you can use to track operations. For example, if you - // execute a CreateStack operation with the token token1, then all the StackEvents - // generated by that operation will have ClientRequestToken set as token1. - // - // In the console, stack operations display the client request token on the - // Events tab. Stack operations that are initiated from the console use the - // token format Console-StackOperation-ID, which helps you easily identify the - // stack operation . For example, if you create a stack using the console, each - // stack event would be assigned the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002. - ClientRequestToken *string `min:"1" type:"string"` - - // Amazon Simple Notification Service topic Amazon Resource Names (ARNs) that - // AWS CloudFormation associates with the stack. Specify an empty list to remove - // all notification topics. - NotificationARNs []*string `type:"list"` - - // A list of Parameter structures that specify input parameters for the stack. - // For more information, see the Parameter (http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html) - // data type. - Parameters []*Parameter `type:"list"` - - // The template resource types that you have permissions to work with for this - // update stack action, such as AWS::EC2::Instance, AWS::EC2::*, or Custom::MyCustomInstance. - // - // If the list of resource types doesn't include a resource that you're updating, - // the stack update fails. By default, AWS CloudFormation grants permissions - // to all resource types. AWS Identity and Access Management (IAM) uses this - // parameter for AWS CloudFormation-specific condition keys in IAM policies. - // For more information, see Controlling Access with AWS Identity and Access - // Management (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html). - ResourceTypes []*string `type:"list"` - - // The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) - // role that AWS CloudFormation assumes to update the stack. AWS CloudFormation - // uses the role's credentials to make calls on your behalf. AWS CloudFormation - // always uses this role for all future operations on the stack. As long as - // users have permission to operate on the stack, AWS CloudFormation uses this - // role even if the users don't have permission to pass it. Ensure that the - // role grants least privilege. - // - // If you don't specify a value, AWS CloudFormation uses the role that was previously - // associated with the stack. If no role is available, AWS CloudFormation uses - // a temporary session that is generated from your user credentials. - RoleARN *string `min:"20" type:"string"` - - // The rollback triggers for AWS CloudFormation to monitor during stack creation - // and updating operations, and for the specified monitoring period afterwards. - RollbackConfiguration *RollbackConfiguration `type:"structure"` - - // The name or unique stack ID of the stack to update. - // - // StackName is a required field - StackName *string `type:"string" required:"true"` - - // Structure containing a new stack policy body. You can specify either the - // StackPolicyBody or the StackPolicyURL parameter, but not both. - // - // You might update the stack policy, for example, in order to protect a new - // resource that you created during a stack update. If you do not specify a - // stack policy, the current policy that is associated with the stack is unchanged. - StackPolicyBody *string `min:"1" type:"string"` - - // Structure containing the temporary overriding stack policy body. You can - // specify either the StackPolicyDuringUpdateBody or the StackPolicyDuringUpdateURL - // parameter, but not both. - // - // If you want to update protected resources, specify a temporary overriding - // stack policy during this update. If you do not specify a stack policy, the - // current policy that is associated with the stack will be used. - StackPolicyDuringUpdateBody *string `min:"1" type:"string"` - - // Location of a file containing the temporary overriding stack policy. The - // URL must point to a policy (max size: 16KB) located in an S3 bucket in the - // same region as the stack. You can specify either the StackPolicyDuringUpdateBody - // or the StackPolicyDuringUpdateURL parameter, but not both. - // - // If you want to update protected resources, specify a temporary overriding - // stack policy during this update. If you do not specify a stack policy, the - // current policy that is associated with the stack will be used. - StackPolicyDuringUpdateURL *string `min:"1" type:"string"` - - // Location of a file containing the updated stack policy. The URL must point - // to a policy (max size: 16KB) located in an S3 bucket in the same region as - // the stack. You can specify either the StackPolicyBody or the StackPolicyURL - // parameter, but not both. - // - // You might update the stack policy, for example, in order to protect a new - // resource that you created during a stack update. If you do not specify a - // stack policy, the current policy that is associated with the stack is unchanged. - StackPolicyURL *string `min:"1" type:"string"` - - // Key-value pairs to associate with this stack. AWS CloudFormation also propagates - // these tags to supported resources in the stack. You can specify a maximum - // number of 50 tags. - // - // If you don't specify this parameter, AWS CloudFormation doesn't modify the - // stack's tags. If you specify an empty value, AWS CloudFormation removes all - // associated tags. - Tags []*Tag `type:"list"` - - // Structure containing the template body with a minimum length of 1 byte and - // a maximum length of 51,200 bytes. (For more information, go to Template Anatomy - // (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide.) - // - // Conditional: You must specify only one of the following parameters: TemplateBody, - // TemplateURL, or set the UsePreviousTemplate to true. - TemplateBody *string `min:"1" type:"string"` - - // Location of file containing the template body. The URL must point to a template - // that is located in an Amazon S3 bucket. For more information, go to Template - // Anatomy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide. - // - // Conditional: You must specify only one of the following parameters: TemplateBody, - // TemplateURL, or set the UsePreviousTemplate to true. - TemplateURL *string `min:"1" type:"string"` - - // Reuse the existing template that is associated with the stack that you are - // updating. - // - // Conditional: You must specify only one of the following parameters: TemplateBody, - // TemplateURL, or set the UsePreviousTemplate to true. - UsePreviousTemplate *bool `type:"boolean"` -} - -// String returns the string representation -func (s UpdateStackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateStackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateStackInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) - } - if s.RoleARN != nil && len(*s.RoleARN) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 20)) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - if s.StackPolicyBody != nil && len(*s.StackPolicyBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackPolicyBody", 1)) - } - if s.StackPolicyDuringUpdateBody != nil && len(*s.StackPolicyDuringUpdateBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackPolicyDuringUpdateBody", 1)) - } - if s.StackPolicyDuringUpdateURL != nil && len(*s.StackPolicyDuringUpdateURL) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackPolicyDuringUpdateURL", 1)) - } - if s.StackPolicyURL != nil && len(*s.StackPolicyURL) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackPolicyURL", 1)) - } - if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) - } - if s.TemplateURL != nil && len(*s.TemplateURL) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1)) - } - if s.RollbackConfiguration != nil { - if err := s.RollbackConfiguration.Validate(); err != nil { - invalidParams.AddNested("RollbackConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCapabilities sets the Capabilities field's value. -func (s *UpdateStackInput) SetCapabilities(v []*string) *UpdateStackInput { - s.Capabilities = v - return s -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *UpdateStackInput) SetClientRequestToken(v string) *UpdateStackInput { - s.ClientRequestToken = &v - return s -} - -// SetNotificationARNs sets the NotificationARNs field's value. -func (s *UpdateStackInput) SetNotificationARNs(v []*string) *UpdateStackInput { - s.NotificationARNs = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *UpdateStackInput) SetParameters(v []*Parameter) *UpdateStackInput { - s.Parameters = v - return s -} - -// SetResourceTypes sets the ResourceTypes field's value. -func (s *UpdateStackInput) SetResourceTypes(v []*string) *UpdateStackInput { - s.ResourceTypes = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *UpdateStackInput) SetRoleARN(v string) *UpdateStackInput { - s.RoleARN = &v - return s -} - -// SetRollbackConfiguration sets the RollbackConfiguration field's value. -func (s *UpdateStackInput) SetRollbackConfiguration(v *RollbackConfiguration) *UpdateStackInput { - s.RollbackConfiguration = v - return s -} - -// SetStackName sets the StackName field's value. -func (s *UpdateStackInput) SetStackName(v string) *UpdateStackInput { - s.StackName = &v - return s -} - -// SetStackPolicyBody sets the StackPolicyBody field's value. -func (s *UpdateStackInput) SetStackPolicyBody(v string) *UpdateStackInput { - s.StackPolicyBody = &v - return s -} - -// SetStackPolicyDuringUpdateBody sets the StackPolicyDuringUpdateBody field's value. -func (s *UpdateStackInput) SetStackPolicyDuringUpdateBody(v string) *UpdateStackInput { - s.StackPolicyDuringUpdateBody = &v - return s -} - -// SetStackPolicyDuringUpdateURL sets the StackPolicyDuringUpdateURL field's value. -func (s *UpdateStackInput) SetStackPolicyDuringUpdateURL(v string) *UpdateStackInput { - s.StackPolicyDuringUpdateURL = &v - return s -} - -// SetStackPolicyURL sets the StackPolicyURL field's value. -func (s *UpdateStackInput) SetStackPolicyURL(v string) *UpdateStackInput { - s.StackPolicyURL = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *UpdateStackInput) SetTags(v []*Tag) *UpdateStackInput { - s.Tags = v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *UpdateStackInput) SetTemplateBody(v string) *UpdateStackInput { - s.TemplateBody = &v - return s -} - -// SetTemplateURL sets the TemplateURL field's value. -func (s *UpdateStackInput) SetTemplateURL(v string) *UpdateStackInput { - s.TemplateURL = &v - return s -} - -// SetUsePreviousTemplate sets the UsePreviousTemplate field's value. -func (s *UpdateStackInput) SetUsePreviousTemplate(v bool) *UpdateStackInput { - s.UsePreviousTemplate = &v - return s -} - -type UpdateStackInstancesInput struct { - _ struct{} `type:"structure"` - - // The names of one or more AWS accounts for which you want to update parameter - // values for stack instances. The overridden parameter values will be applied - // to all stack instances in the specified accounts and regions. - // - // Accounts is a required field - Accounts []*string `type:"list" required:"true"` - - // The unique identifier for this stack set operation. - // - // The operation ID also functions as an idempotency token, to ensure that AWS - // CloudFormation performs the stack set operation only once, even if you retry - // the request multiple times. You might retry stack set operation requests - // to ensure that AWS CloudFormation successfully received them. - // - // If you don't specify an operation ID, the SDK generates one automatically. - OperationId *string `min:"1" type:"string" idempotencyToken:"true"` - - // Preferences for how AWS CloudFormation performs this stack set operation. - OperationPreferences *StackSetOperationPreferences `type:"structure"` - - // A list of input parameters whose values you want to update for the specified - // stack instances. - // - // Any overridden parameter values will be applied to all stack instances in - // the specified accounts and regions. When specifying parameters and their - // values, be aware of how AWS CloudFormation sets parameter values during stack - // instance update operations: - // - // * To override the current value for a parameter, include the parameter - // and specify its value. - // - // * To leave a parameter set to its present value, you can do one of the - // following: - // - // Do not include the parameter in the list. - // - // Include the parameter and specify UsePreviousValue as true. (You cannot specify - // both a value and set UsePreviousValue to true.) - // - // * To set all overridden parameter back to the values specified in the - // stack set, specify a parameter list but do not include any parameters. - // - // * To leave all parameters set to their present values, do not specify - // this property at all. - // - // During stack set updates, any parameter values overridden for a stack instance - // are not updated, but retain their overridden value. - // - // You can only override the parameter values that are specified in the stack - // set; to add or delete a parameter itself, use UpdateStackSet to update the - // stack set template. If you add a parameter to a template, before you can - // override the parameter value specified in the stack set you must first use - // UpdateStackSet (http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html) - // to update all stack instances with the updated template and parameter value - // specified in the stack set. Once a stack instance has been updated with the - // new parameter, you can then override the parameter value using UpdateStackInstances. - ParameterOverrides []*Parameter `type:"list"` - - // The names of one or more regions in which you want to update parameter values - // for stack instances. The overridden parameter values will be applied to all - // stack instances in the specified accounts and regions. - // - // Regions is a required field - Regions []*string `type:"list" required:"true"` - - // The name or unique ID of the stack set associated with the stack instances. - // - // StackSetName is a required field - StackSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateStackInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStackInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateStackInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateStackInstancesInput"} - if s.Accounts == nil { - invalidParams.Add(request.NewErrParamRequired("Accounts")) - } - if s.OperationId != nil && len(*s.OperationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OperationId", 1)) - } - if s.Regions == nil { - invalidParams.Add(request.NewErrParamRequired("Regions")) - } - if s.StackSetName == nil { - invalidParams.Add(request.NewErrParamRequired("StackSetName")) - } - if s.OperationPreferences != nil { - if err := s.OperationPreferences.Validate(); err != nil { - invalidParams.AddNested("OperationPreferences", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccounts sets the Accounts field's value. -func (s *UpdateStackInstancesInput) SetAccounts(v []*string) *UpdateStackInstancesInput { - s.Accounts = v - return s -} - -// SetOperationId sets the OperationId field's value. -func (s *UpdateStackInstancesInput) SetOperationId(v string) *UpdateStackInstancesInput { - s.OperationId = &v - return s -} - -// SetOperationPreferences sets the OperationPreferences field's value. -func (s *UpdateStackInstancesInput) SetOperationPreferences(v *StackSetOperationPreferences) *UpdateStackInstancesInput { - s.OperationPreferences = v - return s -} - -// SetParameterOverrides sets the ParameterOverrides field's value. -func (s *UpdateStackInstancesInput) SetParameterOverrides(v []*Parameter) *UpdateStackInstancesInput { - s.ParameterOverrides = v - return s -} - -// SetRegions sets the Regions field's value. -func (s *UpdateStackInstancesInput) SetRegions(v []*string) *UpdateStackInstancesInput { - s.Regions = v - return s -} - -// SetStackSetName sets the StackSetName field's value. -func (s *UpdateStackInstancesInput) SetStackSetName(v string) *UpdateStackInstancesInput { - s.StackSetName = &v - return s -} - -type UpdateStackInstancesOutput struct { - _ struct{} `type:"structure"` - - // The unique identifier for this stack set operation. - OperationId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateStackInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStackInstancesOutput) GoString() string { - return s.String() -} - -// SetOperationId sets the OperationId field's value. -func (s *UpdateStackInstancesOutput) SetOperationId(v string) *UpdateStackInstancesOutput { - s.OperationId = &v - return s -} - -// The output for an UpdateStack action. -type UpdateStackOutput struct { - _ struct{} `type:"structure"` - - // Unique identifier of the stack. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s UpdateStackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStackOutput) GoString() string { - return s.String() -} - -// SetStackId sets the StackId field's value. -func (s *UpdateStackOutput) SetStackId(v string) *UpdateStackOutput { - s.StackId = &v - return s -} - -type UpdateStackSetInput struct { - _ struct{} `type:"structure"` - - // The accounts in which to update associated stack instances. If you specify - // accounts, you must also specify the regions in which to update stack set - // instances. - // - // To update all the stack instances associated with this stack set, do not - // specify the Accounts or Regions properties. - // - // If the stack set update includes changes to the template (that is, if the - // TemplateBody or TemplateURL properties are specified), or the Parameters - // property, AWS CloudFormation marks all stack instances with a status of OUTDATED - // prior to updating the stack instances in the specified accounts and regions. - // If the stack set update does not include changes to the template or parameters, - // AWS CloudFormation updates the stack instances in the specified accounts - // and regions, while leaving all other stack instances with their existing - // stack instance status. - Accounts []*string `type:"list"` - - // The Amazon Resource Number (ARN) of the IAM role to use to update this stack - // set. - // - // Specify an IAM role only if you are using customized administrator roles - // to control which users or groups can manage specific stack sets within the - // same administrator account. For more information, see Define Permissions - // for Multiple Administrators (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) - // in the AWS CloudFormation User Guide. - // - // If you specify a customized administrator role, AWS CloudFormation uses that - // role to update the stack. If you do not specify a customized administrator - // role, AWS CloudFormation performs the update using the role previously associated - // with the stack set, so long as you have permissions to perform operations - // on the stack set. - AdministrationRoleARN *string `min:"20" type:"string"` - - // In some cases, you must explicity acknowledge that your stack template contains - // certain capabilities in order for AWS CloudFormation to update the stack - // set and its associated stack instances. - // - // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM - // - // Some stack templates might include resources that can affect permissions - // in your AWS account; for example, by creating new AWS Identity and Access - // Management (IAM) users. For those stacks sets, you must explicitly acknowledge - // this by specifying one of these capabilities. - // - // The following IAM resources require you to specify either the CAPABILITY_IAM - // or CAPABILITY_NAMED_IAM capability. - // - // If you have IAM resources, you can specify either capability. - // - // If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. - // - // - // If you don't specify either of these capabilities, AWS CloudFormation returns - // an InsufficientCapabilities error. - // - // If your stack template contains these resources, we recommend that you review - // all permissions associated with them and edit their permissions if necessary. - // - // AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) - // - // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) - // - // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) - // - // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) - // - // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) - // - // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) - // - // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) - // - // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). - // - // * CAPABILITY_AUTO_EXPAND - // - // Some templates contain macros. If your stack template contains one or more - // macros, and you choose to update a stack directly from the processed template, - // without first reviewing the resulting changes in a change set, you must - // acknowledge this capability. For more information, see Using AWS CloudFormation - // Macros to Perform Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). - // - // Stack sets do not currently support macros in stack templates. (This includes - // the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) - // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) - // transforms, which are macros hosted by AWS CloudFormation.) Even if you - // specify this capability, if you include a macro in your template the stack - // set operation will fail. - Capabilities []*string `type:"list"` - - // A brief description of updates that you are making. - Description *string `min:"1" type:"string"` - - // The name of the IAM execution role to use to update the stack set. If you - // do not specify an execution role, AWS CloudFormation uses the AWSCloudFormationStackSetExecutionRole - // role for the stack set operation. - // - // Specify an IAM role only if you are using customized execution roles to control - // which stack resources users and groups can include in their stack sets. - // - // If you specify a customized execution role, AWS CloudFormation uses that - // role to update the stack. If you do not specify a customized execution role, - // AWS CloudFormation performs the update using the role previously associated - // with the stack set, so long as you have permissions to perform operations - // on the stack set. - ExecutionRoleName *string `min:"1" type:"string"` - - // The unique ID for this stack set operation. - // - // The operation ID also functions as an idempotency token, to ensure that AWS - // CloudFormation performs the stack set operation only once, even if you retry - // the request multiple times. You might retry stack set operation requests - // to ensure that AWS CloudFormation successfully received them. - // - // If you don't specify an operation ID, AWS CloudFormation generates one automatically. - // - // Repeating this stack set operation with a new operation ID retries all stack - // instances whose status is OUTDATED. - OperationId *string `min:"1" type:"string" idempotencyToken:"true"` - - // Preferences for how AWS CloudFormation performs this stack set operation. - OperationPreferences *StackSetOperationPreferences `type:"structure"` - - // A list of input parameters for the stack set template. - Parameters []*Parameter `type:"list"` - - // The regions in which to update associated stack instances. If you specify - // regions, you must also specify accounts in which to update stack set instances. - // - // To update all the stack instances associated with this stack set, do not - // specify the Accounts or Regions properties. - // - // If the stack set update includes changes to the template (that is, if the - // TemplateBody or TemplateURL properties are specified), or the Parameters - // property, AWS CloudFormation marks all stack instances with a status of OUTDATED - // prior to updating the stack instances in the specified accounts and regions. - // If the stack set update does not include changes to the template or parameters, - // AWS CloudFormation updates the stack instances in the specified accounts - // and regions, while leaving all other stack instances with their existing - // stack instance status. - Regions []*string `type:"list"` - - // The name or unique ID of the stack set that you want to update. - // - // StackSetName is a required field - StackSetName *string `type:"string" required:"true"` - - // The key-value pairs to associate with this stack set and the stacks created - // from it. AWS CloudFormation also propagates these tags to supported resources - // that are created in the stacks. You can specify a maximum number of 50 tags. - // - // If you specify tags for this parameter, those tags replace any list of tags - // that are currently associated with this stack set. This means: - // - // * If you don't specify this parameter, AWS CloudFormation doesn't modify - // the stack's tags. - // - // * If you specify any tags using this parameter, you must specify all the - // tags that you want associated with this stack set, even tags you've specifed - // before (for example, when creating the stack set or during a previous - // update of the stack set.). Any tags that you don't include in the updated - // list of tags are removed from the stack set, and therefore from the stacks - // and resources as well. - // - // * If you specify an empty value, AWS CloudFormation removes all currently - // associated tags. - // - // If you specify new tags as part of an UpdateStackSet action, AWS CloudFormation - // checks to see if you have the required IAM permission to tag resources. If - // you omit tags that are currently associated with the stack set from the list - // of tags you specify, AWS CloudFormation assumes that you want to remove those - // tags from the stack set, and checks to see if you have permission to untag - // resources. If you don't have the necessary permission(s), the entire UpdateStackSet - // action fails with an access denied error, and the stack set is not updated. - Tags []*Tag `type:"list"` - - // The structure that contains the template body, with a minimum length of 1 - // byte and a maximum length of 51,200 bytes. For more information, see Template - // Anatomy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide. - // - // Conditional: You must specify only one of the following parameters: TemplateBody - // or TemplateURL—or set UsePreviousTemplate to true. - TemplateBody *string `min:"1" type:"string"` - - // The location of the file that contains the template body. The URL must point - // to a template (maximum size: 460,800 bytes) that is located in an Amazon - // S3 bucket. For more information, see Template Anatomy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide. - // - // Conditional: You must specify only one of the following parameters: TemplateBody - // or TemplateURL—or set UsePreviousTemplate to true. - TemplateURL *string `min:"1" type:"string"` - - // Use the existing template that's associated with the stack set that you're - // updating. - // - // Conditional: You must specify only one of the following parameters: TemplateBody - // or TemplateURL—or set UsePreviousTemplate to true. - UsePreviousTemplate *bool `type:"boolean"` -} - -// String returns the string representation -func (s UpdateStackSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStackSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateStackSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateStackSetInput"} - if s.AdministrationRoleARN != nil && len(*s.AdministrationRoleARN) < 20 { - invalidParams.Add(request.NewErrParamMinLen("AdministrationRoleARN", 20)) - } - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.ExecutionRoleName != nil && len(*s.ExecutionRoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleName", 1)) - } - if s.OperationId != nil && len(*s.OperationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OperationId", 1)) - } - if s.StackSetName == nil { - invalidParams.Add(request.NewErrParamRequired("StackSetName")) - } - if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) - } - if s.TemplateURL != nil && len(*s.TemplateURL) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1)) - } - if s.OperationPreferences != nil { - if err := s.OperationPreferences.Validate(); err != nil { - invalidParams.AddNested("OperationPreferences", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccounts sets the Accounts field's value. -func (s *UpdateStackSetInput) SetAccounts(v []*string) *UpdateStackSetInput { - s.Accounts = v - return s -} - -// SetAdministrationRoleARN sets the AdministrationRoleARN field's value. -func (s *UpdateStackSetInput) SetAdministrationRoleARN(v string) *UpdateStackSetInput { - s.AdministrationRoleARN = &v - return s -} - -// SetCapabilities sets the Capabilities field's value. -func (s *UpdateStackSetInput) SetCapabilities(v []*string) *UpdateStackSetInput { - s.Capabilities = v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateStackSetInput) SetDescription(v string) *UpdateStackSetInput { - s.Description = &v - return s -} - -// SetExecutionRoleName sets the ExecutionRoleName field's value. -func (s *UpdateStackSetInput) SetExecutionRoleName(v string) *UpdateStackSetInput { - s.ExecutionRoleName = &v - return s -} - -// SetOperationId sets the OperationId field's value. -func (s *UpdateStackSetInput) SetOperationId(v string) *UpdateStackSetInput { - s.OperationId = &v - return s -} - -// SetOperationPreferences sets the OperationPreferences field's value. -func (s *UpdateStackSetInput) SetOperationPreferences(v *StackSetOperationPreferences) *UpdateStackSetInput { - s.OperationPreferences = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *UpdateStackSetInput) SetParameters(v []*Parameter) *UpdateStackSetInput { - s.Parameters = v - return s -} - -// SetRegions sets the Regions field's value. -func (s *UpdateStackSetInput) SetRegions(v []*string) *UpdateStackSetInput { - s.Regions = v - return s -} - -// SetStackSetName sets the StackSetName field's value. -func (s *UpdateStackSetInput) SetStackSetName(v string) *UpdateStackSetInput { - s.StackSetName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *UpdateStackSetInput) SetTags(v []*Tag) *UpdateStackSetInput { - s.Tags = v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *UpdateStackSetInput) SetTemplateBody(v string) *UpdateStackSetInput { - s.TemplateBody = &v - return s -} - -// SetTemplateURL sets the TemplateURL field's value. -func (s *UpdateStackSetInput) SetTemplateURL(v string) *UpdateStackSetInput { - s.TemplateURL = &v - return s -} - -// SetUsePreviousTemplate sets the UsePreviousTemplate field's value. -func (s *UpdateStackSetInput) SetUsePreviousTemplate(v bool) *UpdateStackSetInput { - s.UsePreviousTemplate = &v - return s -} - -type UpdateStackSetOutput struct { - _ struct{} `type:"structure"` - - // The unique ID for this stack set operation. - OperationId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateStackSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStackSetOutput) GoString() string { - return s.String() -} - -// SetOperationId sets the OperationId field's value. -func (s *UpdateStackSetOutput) SetOperationId(v string) *UpdateStackSetOutput { - s.OperationId = &v - return s -} - -type UpdateTerminationProtectionInput struct { - _ struct{} `type:"structure"` - - // Whether to enable termination protection on the specified stack. - // - // EnableTerminationProtection is a required field - EnableTerminationProtection *bool `type:"boolean" required:"true"` - - // The name or unique ID of the stack for which you want to set termination - // protection. - // - // StackName is a required field - StackName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateTerminationProtectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTerminationProtectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateTerminationProtectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateTerminationProtectionInput"} - if s.EnableTerminationProtection == nil { - invalidParams.Add(request.NewErrParamRequired("EnableTerminationProtection")) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - if s.StackName != nil && len(*s.StackName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnableTerminationProtection sets the EnableTerminationProtection field's value. -func (s *UpdateTerminationProtectionInput) SetEnableTerminationProtection(v bool) *UpdateTerminationProtectionInput { - s.EnableTerminationProtection = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *UpdateTerminationProtectionInput) SetStackName(v string) *UpdateTerminationProtectionInput { - s.StackName = &v - return s -} - -type UpdateTerminationProtectionOutput struct { - _ struct{} `type:"structure"` - - // The unique ID of the stack. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s UpdateTerminationProtectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTerminationProtectionOutput) GoString() string { - return s.String() -} - -// SetStackId sets the StackId field's value. -func (s *UpdateTerminationProtectionOutput) SetStackId(v string) *UpdateTerminationProtectionOutput { - s.StackId = &v - return s -} - -// The input for ValidateTemplate action. -type ValidateTemplateInput struct { - _ struct{} `type:"structure"` - - // Structure containing the template body with a minimum length of 1 byte and - // a maximum length of 51,200 bytes. For more information, go to Template Anatomy - // (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide. - // - // Conditional: You must pass TemplateURL or TemplateBody. If both are passed, - // only TemplateBody is used. - TemplateBody *string `min:"1" type:"string"` - - // Location of file containing the template body. The URL must point to a template - // (max size: 460,800 bytes) that is located in an Amazon S3 bucket. For more - // information, go to Template Anatomy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) - // in the AWS CloudFormation User Guide. - // - // Conditional: You must pass TemplateURL or TemplateBody. If both are passed, - // only TemplateBody is used. - TemplateURL *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ValidateTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidateTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ValidateTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ValidateTemplateInput"} - if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) - } - if s.TemplateURL != nil && len(*s.TemplateURL) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *ValidateTemplateInput) SetTemplateBody(v string) *ValidateTemplateInput { - s.TemplateBody = &v - return s -} - -// SetTemplateURL sets the TemplateURL field's value. -func (s *ValidateTemplateInput) SetTemplateURL(v string) *ValidateTemplateInput { - s.TemplateURL = &v - return s -} - -// The output for ValidateTemplate action. -type ValidateTemplateOutput struct { - _ struct{} `type:"structure"` - - // The capabilities found within the template. If your template contains IAM - // resources, you must specify the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value - // for this parameter when you use the CreateStack or UpdateStack actions with - // your template; otherwise, those actions return an InsufficientCapabilities - // error. - // - // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). - Capabilities []*string `type:"list"` - - // The list of resources that generated the values in the Capabilities response - // element. - CapabilitiesReason *string `type:"string"` - - // A list of the transforms that are declared in the template. - DeclaredTransforms []*string `type:"list"` - - // The description found within the template. - Description *string `min:"1" type:"string"` - - // A list of TemplateParameter structures. - Parameters []*TemplateParameter `type:"list"` -} - -// String returns the string representation -func (s ValidateTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidateTemplateOutput) GoString() string { - return s.String() -} - -// SetCapabilities sets the Capabilities field's value. -func (s *ValidateTemplateOutput) SetCapabilities(v []*string) *ValidateTemplateOutput { - s.Capabilities = v - return s -} - -// SetCapabilitiesReason sets the CapabilitiesReason field's value. -func (s *ValidateTemplateOutput) SetCapabilitiesReason(v string) *ValidateTemplateOutput { - s.CapabilitiesReason = &v - return s -} - -// SetDeclaredTransforms sets the DeclaredTransforms field's value. -func (s *ValidateTemplateOutput) SetDeclaredTransforms(v []*string) *ValidateTemplateOutput { - s.DeclaredTransforms = v - return s -} - -// SetDescription sets the Description field's value. -func (s *ValidateTemplateOutput) SetDescription(v string) *ValidateTemplateOutput { - s.Description = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ValidateTemplateOutput) SetParameters(v []*TemplateParameter) *ValidateTemplateOutput { - s.Parameters = v - return s -} - -const ( - // AccountGateStatusSucceeded is a AccountGateStatus enum value - AccountGateStatusSucceeded = "SUCCEEDED" - - // AccountGateStatusFailed is a AccountGateStatus enum value - AccountGateStatusFailed = "FAILED" - - // AccountGateStatusSkipped is a AccountGateStatus enum value - AccountGateStatusSkipped = "SKIPPED" -) - -const ( - // CapabilityCapabilityIam is a Capability enum value - CapabilityCapabilityIam = "CAPABILITY_IAM" - - // CapabilityCapabilityNamedIam is a Capability enum value - CapabilityCapabilityNamedIam = "CAPABILITY_NAMED_IAM" - - // CapabilityCapabilityAutoExpand is a Capability enum value - CapabilityCapabilityAutoExpand = "CAPABILITY_AUTO_EXPAND" -) - -const ( - // ChangeActionAdd is a ChangeAction enum value - ChangeActionAdd = "Add" - - // ChangeActionModify is a ChangeAction enum value - ChangeActionModify = "Modify" - - // ChangeActionRemove is a ChangeAction enum value - ChangeActionRemove = "Remove" -) - -const ( - // ChangeSetStatusCreatePending is a ChangeSetStatus enum value - ChangeSetStatusCreatePending = "CREATE_PENDING" - - // ChangeSetStatusCreateInProgress is a ChangeSetStatus enum value - ChangeSetStatusCreateInProgress = "CREATE_IN_PROGRESS" - - // ChangeSetStatusCreateComplete is a ChangeSetStatus enum value - ChangeSetStatusCreateComplete = "CREATE_COMPLETE" - - // ChangeSetStatusDeleteComplete is a ChangeSetStatus enum value - ChangeSetStatusDeleteComplete = "DELETE_COMPLETE" - - // ChangeSetStatusFailed is a ChangeSetStatus enum value - ChangeSetStatusFailed = "FAILED" -) - -const ( - // ChangeSetTypeCreate is a ChangeSetType enum value - ChangeSetTypeCreate = "CREATE" - - // ChangeSetTypeUpdate is a ChangeSetType enum value - ChangeSetTypeUpdate = "UPDATE" -) - -const ( - // ChangeSourceResourceReference is a ChangeSource enum value - ChangeSourceResourceReference = "ResourceReference" - - // ChangeSourceParameterReference is a ChangeSource enum value - ChangeSourceParameterReference = "ParameterReference" - - // ChangeSourceResourceAttribute is a ChangeSource enum value - ChangeSourceResourceAttribute = "ResourceAttribute" - - // ChangeSourceDirectModification is a ChangeSource enum value - ChangeSourceDirectModification = "DirectModification" - - // ChangeSourceAutomatic is a ChangeSource enum value - ChangeSourceAutomatic = "Automatic" -) - -const ( - // ChangeTypeResource is a ChangeType enum value - ChangeTypeResource = "Resource" -) - -const ( - // DifferenceTypeAdd is a DifferenceType enum value - DifferenceTypeAdd = "ADD" - - // DifferenceTypeRemove is a DifferenceType enum value - DifferenceTypeRemove = "REMOVE" - - // DifferenceTypeNotEqual is a DifferenceType enum value - DifferenceTypeNotEqual = "NOT_EQUAL" -) - -const ( - // EvaluationTypeStatic is a EvaluationType enum value - EvaluationTypeStatic = "Static" - - // EvaluationTypeDynamic is a EvaluationType enum value - EvaluationTypeDynamic = "Dynamic" -) - -const ( - // ExecutionStatusUnavailable is a ExecutionStatus enum value - ExecutionStatusUnavailable = "UNAVAILABLE" - - // ExecutionStatusAvailable is a ExecutionStatus enum value - ExecutionStatusAvailable = "AVAILABLE" - - // ExecutionStatusExecuteInProgress is a ExecutionStatus enum value - ExecutionStatusExecuteInProgress = "EXECUTE_IN_PROGRESS" - - // ExecutionStatusExecuteComplete is a ExecutionStatus enum value - ExecutionStatusExecuteComplete = "EXECUTE_COMPLETE" - - // ExecutionStatusExecuteFailed is a ExecutionStatus enum value - ExecutionStatusExecuteFailed = "EXECUTE_FAILED" - - // ExecutionStatusObsolete is a ExecutionStatus enum value - ExecutionStatusObsolete = "OBSOLETE" -) - -const ( - // OnFailureDoNothing is a OnFailure enum value - OnFailureDoNothing = "DO_NOTHING" - - // OnFailureRollback is a OnFailure enum value - OnFailureRollback = "ROLLBACK" - - // OnFailureDelete is a OnFailure enum value - OnFailureDelete = "DELETE" -) - -const ( - // ReplacementTrue is a Replacement enum value - ReplacementTrue = "True" - - // ReplacementFalse is a Replacement enum value - ReplacementFalse = "False" - - // ReplacementConditional is a Replacement enum value - ReplacementConditional = "Conditional" -) - -const ( - // RequiresRecreationNever is a RequiresRecreation enum value - RequiresRecreationNever = "Never" - - // RequiresRecreationConditionally is a RequiresRecreation enum value - RequiresRecreationConditionally = "Conditionally" - - // RequiresRecreationAlways is a RequiresRecreation enum value - RequiresRecreationAlways = "Always" -) - -const ( - // ResourceAttributeProperties is a ResourceAttribute enum value - ResourceAttributeProperties = "Properties" - - // ResourceAttributeMetadata is a ResourceAttribute enum value - ResourceAttributeMetadata = "Metadata" - - // ResourceAttributeCreationPolicy is a ResourceAttribute enum value - ResourceAttributeCreationPolicy = "CreationPolicy" - - // ResourceAttributeUpdatePolicy is a ResourceAttribute enum value - ResourceAttributeUpdatePolicy = "UpdatePolicy" - - // ResourceAttributeDeletionPolicy is a ResourceAttribute enum value - ResourceAttributeDeletionPolicy = "DeletionPolicy" - - // ResourceAttributeTags is a ResourceAttribute enum value - ResourceAttributeTags = "Tags" -) - -const ( - // ResourceSignalStatusSuccess is a ResourceSignalStatus enum value - ResourceSignalStatusSuccess = "SUCCESS" - - // ResourceSignalStatusFailure is a ResourceSignalStatus enum value - ResourceSignalStatusFailure = "FAILURE" -) - -const ( - // ResourceStatusCreateInProgress is a ResourceStatus enum value - ResourceStatusCreateInProgress = "CREATE_IN_PROGRESS" - - // ResourceStatusCreateFailed is a ResourceStatus enum value - ResourceStatusCreateFailed = "CREATE_FAILED" - - // ResourceStatusCreateComplete is a ResourceStatus enum value - ResourceStatusCreateComplete = "CREATE_COMPLETE" - - // ResourceStatusDeleteInProgress is a ResourceStatus enum value - ResourceStatusDeleteInProgress = "DELETE_IN_PROGRESS" - - // ResourceStatusDeleteFailed is a ResourceStatus enum value - ResourceStatusDeleteFailed = "DELETE_FAILED" - - // ResourceStatusDeleteComplete is a ResourceStatus enum value - ResourceStatusDeleteComplete = "DELETE_COMPLETE" - - // ResourceStatusDeleteSkipped is a ResourceStatus enum value - ResourceStatusDeleteSkipped = "DELETE_SKIPPED" - - // ResourceStatusUpdateInProgress is a ResourceStatus enum value - ResourceStatusUpdateInProgress = "UPDATE_IN_PROGRESS" - - // ResourceStatusUpdateFailed is a ResourceStatus enum value - ResourceStatusUpdateFailed = "UPDATE_FAILED" - - // ResourceStatusUpdateComplete is a ResourceStatus enum value - ResourceStatusUpdateComplete = "UPDATE_COMPLETE" -) - -const ( - // StackDriftDetectionStatusDetectionInProgress is a StackDriftDetectionStatus enum value - StackDriftDetectionStatusDetectionInProgress = "DETECTION_IN_PROGRESS" - - // StackDriftDetectionStatusDetectionFailed is a StackDriftDetectionStatus enum value - StackDriftDetectionStatusDetectionFailed = "DETECTION_FAILED" - - // StackDriftDetectionStatusDetectionComplete is a StackDriftDetectionStatus enum value - StackDriftDetectionStatusDetectionComplete = "DETECTION_COMPLETE" -) - -const ( - // StackDriftStatusDrifted is a StackDriftStatus enum value - StackDriftStatusDrifted = "DRIFTED" - - // StackDriftStatusInSync is a StackDriftStatus enum value - StackDriftStatusInSync = "IN_SYNC" - - // StackDriftStatusUnknown is a StackDriftStatus enum value - StackDriftStatusUnknown = "UNKNOWN" - - // StackDriftStatusNotChecked is a StackDriftStatus enum value - StackDriftStatusNotChecked = "NOT_CHECKED" -) - -const ( - // StackInstanceStatusCurrent is a StackInstanceStatus enum value - StackInstanceStatusCurrent = "CURRENT" - - // StackInstanceStatusOutdated is a StackInstanceStatus enum value - StackInstanceStatusOutdated = "OUTDATED" - - // StackInstanceStatusInoperable is a StackInstanceStatus enum value - StackInstanceStatusInoperable = "INOPERABLE" -) - -const ( - // StackResourceDriftStatusInSync is a StackResourceDriftStatus enum value - StackResourceDriftStatusInSync = "IN_SYNC" - - // StackResourceDriftStatusModified is a StackResourceDriftStatus enum value - StackResourceDriftStatusModified = "MODIFIED" - - // StackResourceDriftStatusDeleted is a StackResourceDriftStatus enum value - StackResourceDriftStatusDeleted = "DELETED" - - // StackResourceDriftStatusNotChecked is a StackResourceDriftStatus enum value - StackResourceDriftStatusNotChecked = "NOT_CHECKED" -) - -const ( - // StackSetOperationActionCreate is a StackSetOperationAction enum value - StackSetOperationActionCreate = "CREATE" - - // StackSetOperationActionUpdate is a StackSetOperationAction enum value - StackSetOperationActionUpdate = "UPDATE" - - // StackSetOperationActionDelete is a StackSetOperationAction enum value - StackSetOperationActionDelete = "DELETE" -) - -const ( - // StackSetOperationResultStatusPending is a StackSetOperationResultStatus enum value - StackSetOperationResultStatusPending = "PENDING" - - // StackSetOperationResultStatusRunning is a StackSetOperationResultStatus enum value - StackSetOperationResultStatusRunning = "RUNNING" - - // StackSetOperationResultStatusSucceeded is a StackSetOperationResultStatus enum value - StackSetOperationResultStatusSucceeded = "SUCCEEDED" - - // StackSetOperationResultStatusFailed is a StackSetOperationResultStatus enum value - StackSetOperationResultStatusFailed = "FAILED" - - // StackSetOperationResultStatusCancelled is a StackSetOperationResultStatus enum value - StackSetOperationResultStatusCancelled = "CANCELLED" -) - -const ( - // StackSetOperationStatusRunning is a StackSetOperationStatus enum value - StackSetOperationStatusRunning = "RUNNING" - - // StackSetOperationStatusSucceeded is a StackSetOperationStatus enum value - StackSetOperationStatusSucceeded = "SUCCEEDED" - - // StackSetOperationStatusFailed is a StackSetOperationStatus enum value - StackSetOperationStatusFailed = "FAILED" - - // StackSetOperationStatusStopping is a StackSetOperationStatus enum value - StackSetOperationStatusStopping = "STOPPING" - - // StackSetOperationStatusStopped is a StackSetOperationStatus enum value - StackSetOperationStatusStopped = "STOPPED" -) - -const ( - // StackSetStatusActive is a StackSetStatus enum value - StackSetStatusActive = "ACTIVE" - - // StackSetStatusDeleted is a StackSetStatus enum value - StackSetStatusDeleted = "DELETED" -) - -const ( - // StackStatusCreateInProgress is a StackStatus enum value - StackStatusCreateInProgress = "CREATE_IN_PROGRESS" - - // StackStatusCreateFailed is a StackStatus enum value - StackStatusCreateFailed = "CREATE_FAILED" - - // StackStatusCreateComplete is a StackStatus enum value - StackStatusCreateComplete = "CREATE_COMPLETE" - - // StackStatusRollbackInProgress is a StackStatus enum value - StackStatusRollbackInProgress = "ROLLBACK_IN_PROGRESS" - - // StackStatusRollbackFailed is a StackStatus enum value - StackStatusRollbackFailed = "ROLLBACK_FAILED" - - // StackStatusRollbackComplete is a StackStatus enum value - StackStatusRollbackComplete = "ROLLBACK_COMPLETE" - - // StackStatusDeleteInProgress is a StackStatus enum value - StackStatusDeleteInProgress = "DELETE_IN_PROGRESS" - - // StackStatusDeleteFailed is a StackStatus enum value - StackStatusDeleteFailed = "DELETE_FAILED" - - // StackStatusDeleteComplete is a StackStatus enum value - StackStatusDeleteComplete = "DELETE_COMPLETE" - - // StackStatusUpdateInProgress is a StackStatus enum value - StackStatusUpdateInProgress = "UPDATE_IN_PROGRESS" - - // StackStatusUpdateCompleteCleanupInProgress is a StackStatus enum value - StackStatusUpdateCompleteCleanupInProgress = "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS" - - // StackStatusUpdateComplete is a StackStatus enum value - StackStatusUpdateComplete = "UPDATE_COMPLETE" - - // StackStatusUpdateRollbackInProgress is a StackStatus enum value - StackStatusUpdateRollbackInProgress = "UPDATE_ROLLBACK_IN_PROGRESS" - - // StackStatusUpdateRollbackFailed is a StackStatus enum value - StackStatusUpdateRollbackFailed = "UPDATE_ROLLBACK_FAILED" - - // StackStatusUpdateRollbackCompleteCleanupInProgress is a StackStatus enum value - StackStatusUpdateRollbackCompleteCleanupInProgress = "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS" - - // StackStatusUpdateRollbackComplete is a StackStatus enum value - StackStatusUpdateRollbackComplete = "UPDATE_ROLLBACK_COMPLETE" - - // StackStatusReviewInProgress is a StackStatus enum value - StackStatusReviewInProgress = "REVIEW_IN_PROGRESS" -) - -const ( - // TemplateStageOriginal is a TemplateStage enum value - TemplateStageOriginal = "Original" - - // TemplateStageProcessed is a TemplateStage enum value - TemplateStageProcessed = "Processed" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/doc.go deleted file mode 100644 index d82dd221d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/doc.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package cloudformation provides the client and types for making API -// requests to AWS CloudFormation. -// -// AWS CloudFormation allows you to create and manage AWS infrastructure deployments -// predictably and repeatedly. You can use AWS CloudFormation to leverage AWS -// products, such as Amazon Elastic Compute Cloud, Amazon Elastic Block Store, -// Amazon Simple Notification Service, Elastic Load Balancing, and Auto Scaling -// to build highly-reliable, highly scalable, cost-effective applications without -// creating or configuring the underlying AWS infrastructure. -// -// With AWS CloudFormation, you declare all of your resources and dependencies -// in a template file. The template defines a collection of resources as a single -// unit called a stack. AWS CloudFormation creates and deletes all member resources -// of the stack together and manages all dependencies between the resources -// for you. -// -// For more information about AWS CloudFormation, see the AWS CloudFormation -// Product Page (http://aws.amazon.com/cloudformation/). -// -// Amazon CloudFormation makes use of other AWS products. If you need additional -// technical information about a specific AWS product, you can find the product's -// technical documentation at docs.aws.amazon.com (http://docs.aws.amazon.com/). -// -// See https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15 for more information on this service. -// -// See cloudformation package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudformation/ -// -// Using the Client -// -// To contact AWS CloudFormation 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 CloudFormation client CloudFormation for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudformation/#New -package cloudformation diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/errors.go deleted file mode 100644 index 8744a3b76..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/errors.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudformation - -const ( - - // ErrCodeAlreadyExistsException for service response error code - // "AlreadyExistsException". - // - // The resource with the name requested already exists. - ErrCodeAlreadyExistsException = "AlreadyExistsException" - - // ErrCodeChangeSetNotFoundException for service response error code - // "ChangeSetNotFound". - // - // The specified change set name or ID doesn't exit. To view valid change sets - // for a stack, use the ListChangeSets action. - ErrCodeChangeSetNotFoundException = "ChangeSetNotFound" - - // ErrCodeCreatedButModifiedException for service response error code - // "CreatedButModifiedException". - // - // The specified resource exists, but has been changed. - ErrCodeCreatedButModifiedException = "CreatedButModifiedException" - - // ErrCodeInsufficientCapabilitiesException for service response error code - // "InsufficientCapabilitiesException". - // - // The template contains resources with capabilities that weren't specified - // in the Capabilities parameter. - ErrCodeInsufficientCapabilitiesException = "InsufficientCapabilitiesException" - - // ErrCodeInvalidChangeSetStatusException for service response error code - // "InvalidChangeSetStatus". - // - // The specified change set can't be used to update the stack. For example, - // the change set status might be CREATE_IN_PROGRESS, or the stack status might - // be UPDATE_IN_PROGRESS. - ErrCodeInvalidChangeSetStatusException = "InvalidChangeSetStatus" - - // ErrCodeInvalidOperationException for service response error code - // "InvalidOperationException". - // - // The specified operation isn't valid. - ErrCodeInvalidOperationException = "InvalidOperationException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The quota for the resource has already been reached. - // - // For information on stack set limitations, see Limitations of StackSets (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-limitations.html). - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeNameAlreadyExistsException for service response error code - // "NameAlreadyExistsException". - // - // The specified name is already in use. - ErrCodeNameAlreadyExistsException = "NameAlreadyExistsException" - - // ErrCodeOperationIdAlreadyExistsException for service response error code - // "OperationIdAlreadyExistsException". - // - // The specified operation ID already exists. - ErrCodeOperationIdAlreadyExistsException = "OperationIdAlreadyExistsException" - - // ErrCodeOperationInProgressException for service response error code - // "OperationInProgressException". - // - // Another operation is currently in progress for this stack set. Only one operation - // can be performed for a stack set at a given time. - ErrCodeOperationInProgressException = "OperationInProgressException" - - // ErrCodeOperationNotFoundException for service response error code - // "OperationNotFoundException". - // - // The specified ID refers to an operation that doesn't exist. - ErrCodeOperationNotFoundException = "OperationNotFoundException" - - // ErrCodeStackInstanceNotFoundException for service response error code - // "StackInstanceNotFoundException". - // - // The specified stack instance doesn't exist. - ErrCodeStackInstanceNotFoundException = "StackInstanceNotFoundException" - - // ErrCodeStackSetNotEmptyException for service response error code - // "StackSetNotEmptyException". - // - // You can't yet delete this stack set, because it still contains one or more - // stack instances. Delete all stack instances from the stack set before deleting - // the stack set. - ErrCodeStackSetNotEmptyException = "StackSetNotEmptyException" - - // ErrCodeStackSetNotFoundException for service response error code - // "StackSetNotFoundException". - // - // The specified stack set doesn't exist. - ErrCodeStackSetNotFoundException = "StackSetNotFoundException" - - // ErrCodeStaleRequestException for service response error code - // "StaleRequestException". - // - // Another operation has been performed on this stack set since the specified - // operation was performed. - ErrCodeStaleRequestException = "StaleRequestException" - - // ErrCodeTokenAlreadyExistsException for service response error code - // "TokenAlreadyExistsException". - // - // A client request token already exists. - ErrCodeTokenAlreadyExistsException = "TokenAlreadyExistsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go deleted file mode 100644 index 65df49a0c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudformation - -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/query" -) - -// CloudFormation provides the API operation methods for making requests to -// AWS CloudFormation. See this package's package overview docs -// for details on the service. -// -// CloudFormation methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CloudFormation 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 = "cloudformation" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "CloudFormation" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CloudFormation client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a CloudFormation client from just a session. -// svc := cloudformation.New(mySession) -// -// // Create a CloudFormation client with additional configuration -// svc := cloudformation.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudFormation { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CloudFormation { - svc := &CloudFormation{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2010-05-15", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CloudFormation operation and runs any -// custom request initialization. -func (c *CloudFormation) 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/cloudformation/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/waiters.go deleted file mode 100644 index afe8a1b2e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/waiters.go +++ /dev/null @@ -1,335 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudformation - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilChangeSetCreateComplete uses the AWS CloudFormation API operation -// DescribeChangeSet to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *CloudFormation) WaitUntilChangeSetCreateComplete(input *DescribeChangeSetInput) error { - return c.WaitUntilChangeSetCreateCompleteWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilChangeSetCreateCompleteWithContext is an extended version of WaitUntilChangeSetCreateComplete. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) WaitUntilChangeSetCreateCompleteWithContext(ctx aws.Context, input *DescribeChangeSetInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilChangeSetCreateComplete", - MaxAttempts: 120, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Status", - Expected: "CREATE_COMPLETE", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Status", - Expected: "FAILED", - }, - { - State: request.FailureWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ValidationError", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeChangeSetInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeChangeSetRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilStackCreateComplete uses the AWS CloudFormation API operation -// DescribeStacks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *CloudFormation) WaitUntilStackCreateComplete(input *DescribeStacksInput) error { - return c.WaitUntilStackCreateCompleteWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilStackCreateCompleteWithContext is an extended version of WaitUntilStackCreateComplete. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) WaitUntilStackCreateCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilStackCreateComplete", - MaxAttempts: 120, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "CREATE_COMPLETE", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "CREATE_FAILED", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "DELETE_COMPLETE", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "DELETE_FAILED", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "ROLLBACK_FAILED", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "ROLLBACK_COMPLETE", - }, - { - State: request.FailureWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ValidationError", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeStacksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeStacksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilStackDeleteComplete uses the AWS CloudFormation API operation -// DescribeStacks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *CloudFormation) WaitUntilStackDeleteComplete(input *DescribeStacksInput) error { - return c.WaitUntilStackDeleteCompleteWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilStackDeleteCompleteWithContext is an extended version of WaitUntilStackDeleteComplete. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) WaitUntilStackDeleteCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilStackDeleteComplete", - MaxAttempts: 120, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "DELETE_COMPLETE", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ValidationError", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "DELETE_FAILED", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "CREATE_FAILED", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "ROLLBACK_FAILED", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "UPDATE_ROLLBACK_FAILED", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "UPDATE_ROLLBACK_IN_PROGRESS", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeStacksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeStacksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilStackExists uses the AWS CloudFormation API operation -// DescribeStacks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *CloudFormation) WaitUntilStackExists(input *DescribeStacksInput) error { - return c.WaitUntilStackExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilStackExistsWithContext is an extended version of WaitUntilStackExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) WaitUntilStackExistsWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilStackExists", - MaxAttempts: 20, - Delay: request.ConstantWaiterDelay(5 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ValidationError", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeStacksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeStacksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilStackUpdateComplete uses the AWS CloudFormation API operation -// DescribeStacks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *CloudFormation) WaitUntilStackUpdateComplete(input *DescribeStacksInput) error { - return c.WaitUntilStackUpdateCompleteWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilStackUpdateCompleteWithContext is an extended version of WaitUntilStackUpdateComplete. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFormation) WaitUntilStackUpdateCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilStackUpdateComplete", - MaxAttempts: 120, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "UPDATE_COMPLETE", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "UPDATE_FAILED", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "UPDATE_ROLLBACK_FAILED", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", - Expected: "UPDATE_ROLLBACK_COMPLETE", - }, - { - State: request.FailureWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ValidationError", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeStacksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeStacksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} 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 deleted file mode 100644 index e7808318f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go +++ /dev/null @@ -1,15445 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudfront - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restxml" -) - -const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIdentity2018_11_05" - -// CreateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the -// client's request for the CreateCloudFrontOriginAccessIdentity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCloudFrontOriginAccessIdentity for more information on using the CreateCloudFrontOriginAccessIdentity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCloudFrontOriginAccessIdentityRequest method. -// req, resp := client.CreateCloudFrontOriginAccessIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateCloudFrontOriginAccessIdentity -func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *CreateCloudFrontOriginAccessIdentityOutput) { - op := &request.Operation{ - Name: opCreateCloudFrontOriginAccessIdentity, - HTTPMethod: "POST", - HTTPPath: "/2018-11-05/origin-access-identity/cloudfront", - } - - if input == nil { - input = &CreateCloudFrontOriginAccessIdentityInput{} - } - - output = &CreateCloudFrontOriginAccessIdentityOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCloudFrontOriginAccessIdentity API operation for Amazon CloudFront. -// -// Creates a new origin access identity. If you're using Amazon S3 for your -// origin, you can use an origin access identity to require users to access -// your content using a CloudFront URL instead of the Amazon S3 URL. For more -// information about how to use origin access identities, see Serving Private -// Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) -// in the Amazon CloudFront Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation CreateCloudFrontOriginAccessIdentity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOriginAccessIdentityAlreadyExists "CloudFrontOriginAccessIdentityAlreadyExists" -// If the CallerReference is a value you already sent in a previous request -// to create an identity but the content of the CloudFrontOriginAccessIdentityConfig -// is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists -// error. -// -// * ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// * ErrCodeTooManyCloudFrontOriginAccessIdentities "TooManyCloudFrontOriginAccessIdentities" -// Processing your request would cause you to exceed the maximum number of origin -// access identities allowed. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateCloudFrontOriginAccessIdentity -func (c *CloudFront) CreateCloudFrontOriginAccessIdentity(input *CreateCloudFrontOriginAccessIdentityInput) (*CreateCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.CreateCloudFrontOriginAccessIdentityRequest(input) - return out, req.Send() -} - -// CreateCloudFrontOriginAccessIdentityWithContext is the same as CreateCloudFrontOriginAccessIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCloudFrontOriginAccessIdentity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) CreateCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *CreateCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*CreateCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.CreateCloudFrontOriginAccessIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDistribution = "CreateDistribution2018_11_05" - -// CreateDistributionRequest generates a "aws/request.Request" representing the -// client's request for the CreateDistribution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDistribution for more information on using the CreateDistribution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDistributionRequest method. -// req, resp := client.CreateDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistribution -func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) (req *request.Request, output *CreateDistributionOutput) { - op := &request.Operation{ - Name: opCreateDistribution, - HTTPMethod: "POST", - HTTPPath: "/2018-11-05/distribution", - } - - if input == nil { - input = &CreateDistributionInput{} - } - - output = &CreateDistributionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDistribution API operation for Amazon CloudFront. -// -// Creates a new web distribution. You create a CloudFront distribution to tell -// CloudFront where you want content to be delivered from, and the details about -// how to track and manage content delivery. Send a POST request to the /CloudFront -// API version/distribution/distribution ID resource. -// -// When you update a distribution, there are more required fields than when -// you create a distribution. When you update your distribution by using UpdateDistribution, -// follow the steps included in the documentation to get the current configuration -// and then make your updates. This helps to make sure that you include all -// of the required fields. To view a summary, see Required Fields for Create -// Distribution and Update Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-overview-required-fields.html) -// in the Amazon CloudFront Developer Guide. -// -// If you are using Adobe Flash Media Server's RTMP protocol, you set up a different -// kind of CloudFront distribution. For more information, see CreateStreamingDistribution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation CreateDistribution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// -// * ErrCodeDistributionAlreadyExists "DistributionAlreadyExists" -// The caller reference you attempted to create the distribution with is associated -// with another distribution. -// -// * ErrCodeInvalidOrigin "InvalidOrigin" -// The Amazon S3 origin server specified does not refer to a valid Amazon S3 -// bucket. -// -// * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// * ErrCodeInvalidViewerCertificate "InvalidViewerCertificate" -// -// * ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion" -// -// * ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// * ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs" -// Your request contains more CNAMEs than are allowed per distribution. -// -// * ErrCodeTooManyDistributions "TooManyDistributions" -// Processing your request would cause you to exceed the maximum number of distributions -// allowed. -// -// * ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject" -// The default root object file name is too big or contains an invalid character. -// -// * ErrCodeInvalidRelativePath "InvalidRelativePath" -// The relative path is too big, is not URL-encoded, or does not begin with -// a slash (/). -// -// * ErrCodeInvalidErrorCode "InvalidErrorCode" -// -// * ErrCodeInvalidResponseCode "InvalidResponseCode" -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol" -// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS -// protocol in your request, or omit the RequiredProtocols element from your -// distribution configuration. -// -// * ErrCodeNoSuchOrigin "NoSuchOrigin" -// No origin exists with the specified Origin Id. -// -// * ErrCodeTooManyOrigins "TooManyOrigins" -// You cannot create more origins for the distribution. -// -// * ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution" -// Processing your request would cause you to exceed the maximum number of origin -// groups allowed. -// -// * ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" -// You cannot create more cache behaviors for the distribution. -// -// * ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList" -// Your request contains more cookie names in the whitelist than are allowed -// per cache behavior. -// -// * ErrCodeInvalidForwardCookies "InvalidForwardCookies" -// Your request contains forward cookies option which doesn't match with the -// expectation for the whitelisted list of cookie names. Either list of cookie -// names has been specified when not allowed or list of cookie names is missing -// when expected. -// -// * ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues" -// -// * ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin" -// -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// * ErrCodeTooManyCertificates "TooManyCertificates" -// You cannot create anymore custom SSL/TLS certificates. -// -// * ErrCodeInvalidLocationCode "InvalidLocationCode" -// -// * ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter" -// -// * ErrCodeInvalidProtocolSettings "InvalidProtocolSettings" -// You cannot specify SSLv3 as the minimum protocol version if you only want -// to support only clients that support Server Name Indication (SNI). -// -// * ErrCodeInvalidTTLOrder "InvalidTTLOrder" -// -// * ErrCodeInvalidWebACLId "InvalidWebACLId" -// -// * ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders" -// -// * ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters" -// -// * ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters" -// -// * ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations" -// Processing your request would cause the maximum number of distributions with -// Lambda function associations per owner to be exceeded. -// -// * ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations" -// Your request contains more Lambda function associations than are allowed -// per distribution. -// -// * ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation" -// The specified Lambda function association is invalid. -// -// * ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout" -// -// * ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout" -// -// * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// * ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" -// The specified configuration for field-level encryption can't be associated -// with the specified cache behavior. -// -// * ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" -// The maximum number of distributions have been associated with the specified -// configuration for field-level encryption. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistribution -func (c *CloudFront) CreateDistribution(input *CreateDistributionInput) (*CreateDistributionOutput, error) { - req, out := c.CreateDistributionRequest(input) - return out, req.Send() -} - -// CreateDistributionWithContext is the same as CreateDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDistribution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) CreateDistributionWithContext(ctx aws.Context, input *CreateDistributionInput, opts ...request.Option) (*CreateDistributionOutput, error) { - req, out := c.CreateDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDistributionWithTags = "CreateDistributionWithTags2018_11_05" - -// CreateDistributionWithTagsRequest generates a "aws/request.Request" representing the -// client's request for the CreateDistributionWithTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDistributionWithTags for more information on using the CreateDistributionWithTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDistributionWithTagsRequest method. -// req, resp := client.CreateDistributionWithTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistributionWithTags -func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistributionWithTagsInput) (req *request.Request, output *CreateDistributionWithTagsOutput) { - op := &request.Operation{ - Name: opCreateDistributionWithTags, - HTTPMethod: "POST", - HTTPPath: "/2018-11-05/distribution?WithTags", - } - - if input == nil { - input = &CreateDistributionWithTagsInput{} - } - - output = &CreateDistributionWithTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDistributionWithTags API operation for Amazon CloudFront. -// -// Create a new distribution with tags. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation CreateDistributionWithTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// -// * ErrCodeDistributionAlreadyExists "DistributionAlreadyExists" -// The caller reference you attempted to create the distribution with is associated -// with another distribution. -// -// * ErrCodeInvalidOrigin "InvalidOrigin" -// The Amazon S3 origin server specified does not refer to a valid Amazon S3 -// bucket. -// -// * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// * ErrCodeInvalidViewerCertificate "InvalidViewerCertificate" -// -// * ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion" -// -// * ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// * ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs" -// Your request contains more CNAMEs than are allowed per distribution. -// -// * ErrCodeTooManyDistributions "TooManyDistributions" -// Processing your request would cause you to exceed the maximum number of distributions -// allowed. -// -// * ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject" -// The default root object file name is too big or contains an invalid character. -// -// * ErrCodeInvalidRelativePath "InvalidRelativePath" -// The relative path is too big, is not URL-encoded, or does not begin with -// a slash (/). -// -// * ErrCodeInvalidErrorCode "InvalidErrorCode" -// -// * ErrCodeInvalidResponseCode "InvalidResponseCode" -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol" -// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS -// protocol in your request, or omit the RequiredProtocols element from your -// distribution configuration. -// -// * ErrCodeNoSuchOrigin "NoSuchOrigin" -// No origin exists with the specified Origin Id. -// -// * ErrCodeTooManyOrigins "TooManyOrigins" -// You cannot create more origins for the distribution. -// -// * ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution" -// Processing your request would cause you to exceed the maximum number of origin -// groups allowed. -// -// * ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" -// You cannot create more cache behaviors for the distribution. -// -// * ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList" -// Your request contains more cookie names in the whitelist than are allowed -// per cache behavior. -// -// * ErrCodeInvalidForwardCookies "InvalidForwardCookies" -// Your request contains forward cookies option which doesn't match with the -// expectation for the whitelisted list of cookie names. Either list of cookie -// names has been specified when not allowed or list of cookie names is missing -// when expected. -// -// * ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues" -// -// * ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin" -// -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// * ErrCodeTooManyCertificates "TooManyCertificates" -// You cannot create anymore custom SSL/TLS certificates. -// -// * ErrCodeInvalidLocationCode "InvalidLocationCode" -// -// * ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter" -// -// * ErrCodeInvalidProtocolSettings "InvalidProtocolSettings" -// You cannot specify SSLv3 as the minimum protocol version if you only want -// to support only clients that support Server Name Indication (SNI). -// -// * ErrCodeInvalidTTLOrder "InvalidTTLOrder" -// -// * ErrCodeInvalidWebACLId "InvalidWebACLId" -// -// * ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders" -// -// * ErrCodeInvalidTagging "InvalidTagging" -// -// * ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters" -// -// * ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters" -// -// * ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations" -// Processing your request would cause the maximum number of distributions with -// Lambda function associations per owner to be exceeded. -// -// * ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations" -// Your request contains more Lambda function associations than are allowed -// per distribution. -// -// * ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation" -// The specified Lambda function association is invalid. -// -// * ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout" -// -// * ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout" -// -// * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// * ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" -// The specified configuration for field-level encryption can't be associated -// with the specified cache behavior. -// -// * ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" -// The maximum number of distributions have been associated with the specified -// configuration for field-level encryption. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistributionWithTags -func (c *CloudFront) CreateDistributionWithTags(input *CreateDistributionWithTagsInput) (*CreateDistributionWithTagsOutput, error) { - req, out := c.CreateDistributionWithTagsRequest(input) - return out, req.Send() -} - -// CreateDistributionWithTagsWithContext is the same as CreateDistributionWithTags with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDistributionWithTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) CreateDistributionWithTagsWithContext(ctx aws.Context, input *CreateDistributionWithTagsInput, opts ...request.Option) (*CreateDistributionWithTagsOutput, error) { - req, out := c.CreateDistributionWithTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFieldLevelEncryptionConfig = "CreateFieldLevelEncryptionConfig2018_11_05" - -// CreateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the -// client's request for the CreateFieldLevelEncryptionConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFieldLevelEncryptionConfig for more information on using the CreateFieldLevelEncryptionConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateFieldLevelEncryptionConfigRequest method. -// req, resp := client.CreateFieldLevelEncryptionConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionConfig -func (c *CloudFront) CreateFieldLevelEncryptionConfigRequest(input *CreateFieldLevelEncryptionConfigInput) (req *request.Request, output *CreateFieldLevelEncryptionConfigOutput) { - op := &request.Operation{ - Name: opCreateFieldLevelEncryptionConfig, - HTTPMethod: "POST", - HTTPPath: "/2018-11-05/field-level-encryption", - } - - if input == nil { - input = &CreateFieldLevelEncryptionConfigInput{} - } - - output = &CreateFieldLevelEncryptionConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFieldLevelEncryptionConfig API operation for Amazon CloudFront. -// -// Create a new field-level encryption configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation CreateFieldLevelEncryptionConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" -// The specified profile for field-level encryption doesn't exist. -// -// * ErrCodeFieldLevelEncryptionConfigAlreadyExists "FieldLevelEncryptionConfigAlreadyExists" -// The specified configuration for field-level encryption already exists. -// -// * ErrCodeTooManyFieldLevelEncryptionConfigs "TooManyFieldLevelEncryptionConfigs" -// The maximum number of configurations for field-level encryption have been -// created. -// -// * ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles "TooManyFieldLevelEncryptionQueryArgProfiles" -// The maximum number of query arg profiles for field-level encryption have -// been created. -// -// * ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles "TooManyFieldLevelEncryptionContentTypeProfiles" -// The maximum number of content type profiles for field-level encryption have -// been created. -// -// * ErrCodeQueryArgProfileEmpty "QueryArgProfileEmpty" -// No profile specified for the field-level encryption query argument. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionConfig -func (c *CloudFront) CreateFieldLevelEncryptionConfig(input *CreateFieldLevelEncryptionConfigInput) (*CreateFieldLevelEncryptionConfigOutput, error) { - req, out := c.CreateFieldLevelEncryptionConfigRequest(input) - return out, req.Send() -} - -// CreateFieldLevelEncryptionConfigWithContext is the same as CreateFieldLevelEncryptionConfig with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFieldLevelEncryptionConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) CreateFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *CreateFieldLevelEncryptionConfigInput, opts ...request.Option) (*CreateFieldLevelEncryptionConfigOutput, error) { - req, out := c.CreateFieldLevelEncryptionConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFieldLevelEncryptionProfile = "CreateFieldLevelEncryptionProfile2018_11_05" - -// CreateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the -// client's request for the CreateFieldLevelEncryptionProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFieldLevelEncryptionProfile for more information on using the CreateFieldLevelEncryptionProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateFieldLevelEncryptionProfileRequest method. -// req, resp := client.CreateFieldLevelEncryptionProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionProfile -func (c *CloudFront) CreateFieldLevelEncryptionProfileRequest(input *CreateFieldLevelEncryptionProfileInput) (req *request.Request, output *CreateFieldLevelEncryptionProfileOutput) { - op := &request.Operation{ - Name: opCreateFieldLevelEncryptionProfile, - HTTPMethod: "POST", - HTTPPath: "/2018-11-05/field-level-encryption-profile", - } - - if input == nil { - input = &CreateFieldLevelEncryptionProfileInput{} - } - - output = &CreateFieldLevelEncryptionProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFieldLevelEncryptionProfile API operation for Amazon CloudFront. -// -// Create a field-level encryption profile. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation CreateFieldLevelEncryptionProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeNoSuchPublicKey "NoSuchPublicKey" -// The specified public key doesn't exist. -// -// * ErrCodeFieldLevelEncryptionProfileAlreadyExists "FieldLevelEncryptionProfileAlreadyExists" -// The specified profile for field-level encryption already exists. -// -// * ErrCodeFieldLevelEncryptionProfileSizeExceeded "FieldLevelEncryptionProfileSizeExceeded" -// The maximum size of a profile for field-level encryption was exceeded. -// -// * ErrCodeTooManyFieldLevelEncryptionProfiles "TooManyFieldLevelEncryptionProfiles" -// The maximum number of profiles for field-level encryption have been created. -// -// * ErrCodeTooManyFieldLevelEncryptionEncryptionEntities "TooManyFieldLevelEncryptionEncryptionEntities" -// The maximum number of encryption entities for field-level encryption have -// been created. -// -// * ErrCodeTooManyFieldLevelEncryptionFieldPatterns "TooManyFieldLevelEncryptionFieldPatterns" -// The maximum number of field patterns for field-level encryption have been -// created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionProfile -func (c *CloudFront) CreateFieldLevelEncryptionProfile(input *CreateFieldLevelEncryptionProfileInput) (*CreateFieldLevelEncryptionProfileOutput, error) { - req, out := c.CreateFieldLevelEncryptionProfileRequest(input) - return out, req.Send() -} - -// CreateFieldLevelEncryptionProfileWithContext is the same as CreateFieldLevelEncryptionProfile with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFieldLevelEncryptionProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) CreateFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *CreateFieldLevelEncryptionProfileInput, opts ...request.Option) (*CreateFieldLevelEncryptionProfileOutput, error) { - req, out := c.CreateFieldLevelEncryptionProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateInvalidation = "CreateInvalidation2018_11_05" - -// CreateInvalidationRequest generates a "aws/request.Request" representing the -// client's request for the CreateInvalidation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateInvalidation for more information on using the CreateInvalidation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateInvalidationRequest method. -// req, resp := client.CreateInvalidationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateInvalidation -func (c *CloudFront) CreateInvalidationRequest(input *CreateInvalidationInput) (req *request.Request, output *CreateInvalidationOutput) { - op := &request.Operation{ - Name: opCreateInvalidation, - HTTPMethod: "POST", - HTTPPath: "/2018-11-05/distribution/{DistributionId}/invalidation", - } - - if input == nil { - input = &CreateInvalidationInput{} - } - - output = &CreateInvalidationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateInvalidation API operation for Amazon CloudFront. -// -// Create a new invalidation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation CreateInvalidation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// * ErrCodeBatchTooLarge "BatchTooLarge" -// -// * ErrCodeTooManyInvalidationsInProgress "TooManyInvalidationsInProgress" -// You have exceeded the maximum number of allowable InProgress invalidation -// batch requests, or invalidation objects. -// -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateInvalidation -func (c *CloudFront) CreateInvalidation(input *CreateInvalidationInput) (*CreateInvalidationOutput, error) { - req, out := c.CreateInvalidationRequest(input) - return out, req.Send() -} - -// CreateInvalidationWithContext is the same as CreateInvalidation with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInvalidation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) CreateInvalidationWithContext(ctx aws.Context, input *CreateInvalidationInput, opts ...request.Option) (*CreateInvalidationOutput, error) { - req, out := c.CreateInvalidationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePublicKey = "CreatePublicKey2018_11_05" - -// CreatePublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the CreatePublicKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePublicKey for more information on using the CreatePublicKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePublicKeyRequest method. -// req, resp := client.CreatePublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreatePublicKey -func (c *CloudFront) CreatePublicKeyRequest(input *CreatePublicKeyInput) (req *request.Request, output *CreatePublicKeyOutput) { - op := &request.Operation{ - Name: opCreatePublicKey, - HTTPMethod: "POST", - HTTPPath: "/2018-11-05/public-key", - } - - if input == nil { - input = &CreatePublicKeyInput{} - } - - output = &CreatePublicKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePublicKey API operation for Amazon CloudFront. -// -// Add a new public key to CloudFront to use, for example, for field-level encryption. -// You can add a maximum of 10 public keys with one AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation CreatePublicKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodePublicKeyAlreadyExists "PublicKeyAlreadyExists" -// The specified public key already exists. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeTooManyPublicKeys "TooManyPublicKeys" -// The maximum number of public keys for field-level encryption have been created. -// To create a new public key, delete one of the existing keys. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreatePublicKey -func (c *CloudFront) CreatePublicKey(input *CreatePublicKeyInput) (*CreatePublicKeyOutput, error) { - req, out := c.CreatePublicKeyRequest(input) - return out, req.Send() -} - -// CreatePublicKeyWithContext is the same as CreatePublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePublicKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) CreatePublicKeyWithContext(ctx aws.Context, input *CreatePublicKeyInput, opts ...request.Option) (*CreatePublicKeyOutput, error) { - req, out := c.CreatePublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStreamingDistribution = "CreateStreamingDistribution2018_11_05" - -// CreateStreamingDistributionRequest generates a "aws/request.Request" representing the -// client's request for the CreateStreamingDistribution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateStreamingDistribution for more information on using the CreateStreamingDistribution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateStreamingDistributionRequest method. -// req, resp := client.CreateStreamingDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistribution -func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDistributionInput) (req *request.Request, output *CreateStreamingDistributionOutput) { - op := &request.Operation{ - Name: opCreateStreamingDistribution, - HTTPMethod: "POST", - HTTPPath: "/2018-11-05/streaming-distribution", - } - - if input == nil { - input = &CreateStreamingDistributionInput{} - } - - output = &CreateStreamingDistributionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateStreamingDistribution API operation for Amazon CloudFront. -// -// Creates a new RMTP distribution. An RTMP distribution is similar to a web -// distribution, but an RTMP distribution streams media files using the Adobe -// Real-Time Messaging Protocol (RTMP) instead of serving files using HTTP. -// -// To create a new web distribution, submit a POST request to the CloudFront -// API version/distribution resource. The request body must include a document -// with a StreamingDistributionConfig element. The response echoes the StreamingDistributionConfig -// element and returns other information about the RTMP distribution. -// -// To get the status of your request, use the GET StreamingDistribution API -// action. When the value of Enabled is true and the value of Status is Deployed, -// your distribution is ready. A distribution usually deploys in less than 15 -// minutes. -// -// For more information about web distributions, see Working with RTMP Distributions -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-rtmp.html) -// in the Amazon CloudFront Developer Guide. -// -// Beginning with the 2012-05-05 version of the CloudFront API, we made substantial -// changes to the format of the XML document that you include in the request -// body when you create or update a web distribution or an RTMP distribution, -// and when you invalidate objects. With previous versions of the API, we discovered -// that it was too easy to accidentally delete one or more values for an element -// that accepts multiple values, for example, CNAMEs and trusted signers. Our -// changes for the 2012-05-05 release are intended to prevent these accidental -// deletions and to notify you when there's a mismatch between the number of -// values you say you're specifying in the Quantity element and the number of -// values specified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation CreateStreamingDistribution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// -// * ErrCodeStreamingDistributionAlreadyExists "StreamingDistributionAlreadyExists" -// -// * ErrCodeInvalidOrigin "InvalidOrigin" -// The Amazon S3 origin server specified does not refer to a valid Amazon S3 -// bucket. -// -// * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// * ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// * ErrCodeTooManyStreamingDistributionCNAMEs "TooManyStreamingDistributionCNAMEs" -// -// * ErrCodeTooManyStreamingDistributions "TooManyStreamingDistributions" -// Processing your request would cause you to exceed the maximum number of streaming -// distributions allowed. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistribution -func (c *CloudFront) CreateStreamingDistribution(input *CreateStreamingDistributionInput) (*CreateStreamingDistributionOutput, error) { - req, out := c.CreateStreamingDistributionRequest(input) - return out, req.Send() -} - -// CreateStreamingDistributionWithContext is the same as CreateStreamingDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStreamingDistribution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) CreateStreamingDistributionWithContext(ctx aws.Context, input *CreateStreamingDistributionInput, opts ...request.Option) (*CreateStreamingDistributionOutput, error) { - req, out := c.CreateStreamingDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTags2018_11_05" - -// CreateStreamingDistributionWithTagsRequest generates a "aws/request.Request" representing the -// client's request for the CreateStreamingDistributionWithTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateStreamingDistributionWithTags for more information on using the CreateStreamingDistributionWithTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateStreamingDistributionWithTagsRequest method. -// req, resp := client.CreateStreamingDistributionWithTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistributionWithTags -func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStreamingDistributionWithTagsInput) (req *request.Request, output *CreateStreamingDistributionWithTagsOutput) { - op := &request.Operation{ - Name: opCreateStreamingDistributionWithTags, - HTTPMethod: "POST", - HTTPPath: "/2018-11-05/streaming-distribution?WithTags", - } - - if input == nil { - input = &CreateStreamingDistributionWithTagsInput{} - } - - output = &CreateStreamingDistributionWithTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateStreamingDistributionWithTags API operation for Amazon CloudFront. -// -// Create a new streaming distribution with tags. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation CreateStreamingDistributionWithTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// -// * ErrCodeStreamingDistributionAlreadyExists "StreamingDistributionAlreadyExists" -// -// * ErrCodeInvalidOrigin "InvalidOrigin" -// The Amazon S3 origin server specified does not refer to a valid Amazon S3 -// bucket. -// -// * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// * ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// * ErrCodeTooManyStreamingDistributionCNAMEs "TooManyStreamingDistributionCNAMEs" -// -// * ErrCodeTooManyStreamingDistributions "TooManyStreamingDistributions" -// Processing your request would cause you to exceed the maximum number of streaming -// distributions allowed. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// * ErrCodeInvalidTagging "InvalidTagging" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistributionWithTags -func (c *CloudFront) CreateStreamingDistributionWithTags(input *CreateStreamingDistributionWithTagsInput) (*CreateStreamingDistributionWithTagsOutput, error) { - req, out := c.CreateStreamingDistributionWithTagsRequest(input) - return out, req.Send() -} - -// CreateStreamingDistributionWithTagsWithContext is the same as CreateStreamingDistributionWithTags with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStreamingDistributionWithTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) CreateStreamingDistributionWithTagsWithContext(ctx aws.Context, input *CreateStreamingDistributionWithTagsInput, opts ...request.Option) (*CreateStreamingDistributionWithTagsOutput, error) { - req, out := c.CreateStreamingDistributionWithTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIdentity2018_11_05" - -// DeleteCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCloudFrontOriginAccessIdentity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCloudFrontOriginAccessIdentity for more information on using the DeleteCloudFrontOriginAccessIdentity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCloudFrontOriginAccessIdentityRequest method. -// req, resp := client.DeleteCloudFrontOriginAccessIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteCloudFrontOriginAccessIdentity -func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCloudFrontOriginAccessIdentityInput) (req *request.Request, output *DeleteCloudFrontOriginAccessIdentityOutput) { - op := &request.Operation{ - Name: opDeleteCloudFrontOriginAccessIdentity, - HTTPMethod: "DELETE", - HTTPPath: "/2018-11-05/origin-access-identity/cloudfront/{Id}", - } - - if input == nil { - input = &DeleteCloudFrontOriginAccessIdentityInput{} - } - - output = &DeleteCloudFrontOriginAccessIdentityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCloudFrontOriginAccessIdentity API operation for Amazon CloudFront. -// -// Delete an origin access identity. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation DeleteCloudFrontOriginAccessIdentity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. -// -// * ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity" -// The specified origin access identity does not exist. -// -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. -// -// * ErrCodeOriginAccessIdentityInUse "CloudFrontOriginAccessIdentityInUse" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteCloudFrontOriginAccessIdentity -func (c *CloudFront) DeleteCloudFrontOriginAccessIdentity(input *DeleteCloudFrontOriginAccessIdentityInput) (*DeleteCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.DeleteCloudFrontOriginAccessIdentityRequest(input) - return out, req.Send() -} - -// DeleteCloudFrontOriginAccessIdentityWithContext is the same as DeleteCloudFrontOriginAccessIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCloudFrontOriginAccessIdentity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *DeleteCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*DeleteCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.DeleteCloudFrontOriginAccessIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDistribution = "DeleteDistribution2018_11_05" - -// DeleteDistributionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDistribution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDistribution for more information on using the DeleteDistribution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDistributionRequest method. -// req, resp := client.DeleteDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteDistribution -func (c *CloudFront) DeleteDistributionRequest(input *DeleteDistributionInput) (req *request.Request, output *DeleteDistributionOutput) { - op := &request.Operation{ - Name: opDeleteDistribution, - HTTPMethod: "DELETE", - HTTPPath: "/2018-11-05/distribution/{Id}", - } - - if input == nil { - input = &DeleteDistributionInput{} - } - - output = &DeleteDistributionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDistribution API operation for Amazon CloudFront. -// -// Delete a distribution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation DeleteDistribution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeDistributionNotDisabled "DistributionNotDisabled" -// -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. -// -// * ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteDistribution -func (c *CloudFront) DeleteDistribution(input *DeleteDistributionInput) (*DeleteDistributionOutput, error) { - req, out := c.DeleteDistributionRequest(input) - return out, req.Send() -} - -// DeleteDistributionWithContext is the same as DeleteDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDistribution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) DeleteDistributionWithContext(ctx aws.Context, input *DeleteDistributionInput, opts ...request.Option) (*DeleteDistributionOutput, error) { - req, out := c.DeleteDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFieldLevelEncryptionConfig = "DeleteFieldLevelEncryptionConfig2018_11_05" - -// DeleteFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFieldLevelEncryptionConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFieldLevelEncryptionConfig for more information on using the DeleteFieldLevelEncryptionConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFieldLevelEncryptionConfigRequest method. -// req, resp := client.DeleteFieldLevelEncryptionConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionConfig -func (c *CloudFront) DeleteFieldLevelEncryptionConfigRequest(input *DeleteFieldLevelEncryptionConfigInput) (req *request.Request, output *DeleteFieldLevelEncryptionConfigOutput) { - op := &request.Operation{ - Name: opDeleteFieldLevelEncryptionConfig, - HTTPMethod: "DELETE", - HTTPPath: "/2018-11-05/field-level-encryption/{Id}", - } - - if input == nil { - input = &DeleteFieldLevelEncryptionConfigInput{} - } - - output = &DeleteFieldLevelEncryptionConfigOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteFieldLevelEncryptionConfig API operation for Amazon CloudFront. -// -// Remove a field-level encryption configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation DeleteFieldLevelEncryptionConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. -// -// * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. -// -// * ErrCodeFieldLevelEncryptionConfigInUse "FieldLevelEncryptionConfigInUse" -// The specified configuration for field-level encryption is in use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionConfig -func (c *CloudFront) DeleteFieldLevelEncryptionConfig(input *DeleteFieldLevelEncryptionConfigInput) (*DeleteFieldLevelEncryptionConfigOutput, error) { - req, out := c.DeleteFieldLevelEncryptionConfigRequest(input) - return out, req.Send() -} - -// DeleteFieldLevelEncryptionConfigWithContext is the same as DeleteFieldLevelEncryptionConfig with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFieldLevelEncryptionConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) DeleteFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *DeleteFieldLevelEncryptionConfigInput, opts ...request.Option) (*DeleteFieldLevelEncryptionConfigOutput, error) { - req, out := c.DeleteFieldLevelEncryptionConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFieldLevelEncryptionProfile = "DeleteFieldLevelEncryptionProfile2018_11_05" - -// DeleteFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFieldLevelEncryptionProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFieldLevelEncryptionProfile for more information on using the DeleteFieldLevelEncryptionProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFieldLevelEncryptionProfileRequest method. -// req, resp := client.DeleteFieldLevelEncryptionProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionProfile -func (c *CloudFront) DeleteFieldLevelEncryptionProfileRequest(input *DeleteFieldLevelEncryptionProfileInput) (req *request.Request, output *DeleteFieldLevelEncryptionProfileOutput) { - op := &request.Operation{ - Name: opDeleteFieldLevelEncryptionProfile, - HTTPMethod: "DELETE", - HTTPPath: "/2018-11-05/field-level-encryption-profile/{Id}", - } - - if input == nil { - input = &DeleteFieldLevelEncryptionProfileInput{} - } - - output = &DeleteFieldLevelEncryptionProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteFieldLevelEncryptionProfile API operation for Amazon CloudFront. -// -// Remove a field-level encryption profile. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation DeleteFieldLevelEncryptionProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. -// -// * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" -// The specified profile for field-level encryption doesn't exist. -// -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. -// -// * ErrCodeFieldLevelEncryptionProfileInUse "FieldLevelEncryptionProfileInUse" -// The specified profile for field-level encryption is in use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionProfile -func (c *CloudFront) DeleteFieldLevelEncryptionProfile(input *DeleteFieldLevelEncryptionProfileInput) (*DeleteFieldLevelEncryptionProfileOutput, error) { - req, out := c.DeleteFieldLevelEncryptionProfileRequest(input) - return out, req.Send() -} - -// DeleteFieldLevelEncryptionProfileWithContext is the same as DeleteFieldLevelEncryptionProfile with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFieldLevelEncryptionProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) DeleteFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *DeleteFieldLevelEncryptionProfileInput, opts ...request.Option) (*DeleteFieldLevelEncryptionProfileOutput, error) { - req, out := c.DeleteFieldLevelEncryptionProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePublicKey = "DeletePublicKey2018_11_05" - -// DeletePublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the DeletePublicKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePublicKey for more information on using the DeletePublicKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePublicKeyRequest method. -// req, resp := client.DeletePublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeletePublicKey -func (c *CloudFront) DeletePublicKeyRequest(input *DeletePublicKeyInput) (req *request.Request, output *DeletePublicKeyOutput) { - op := &request.Operation{ - Name: opDeletePublicKey, - HTTPMethod: "DELETE", - HTTPPath: "/2018-11-05/public-key/{Id}", - } - - if input == nil { - input = &DeletePublicKeyInput{} - } - - output = &DeletePublicKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePublicKey API operation for Amazon CloudFront. -// -// Remove a public key you previously added to CloudFront. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation DeletePublicKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodePublicKeyInUse "PublicKeyInUse" -// The specified public key is in use. -// -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. -// -// * ErrCodeNoSuchPublicKey "NoSuchPublicKey" -// The specified public key doesn't exist. -// -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeletePublicKey -func (c *CloudFront) DeletePublicKey(input *DeletePublicKeyInput) (*DeletePublicKeyOutput, error) { - req, out := c.DeletePublicKeyRequest(input) - return out, req.Send() -} - -// DeletePublicKeyWithContext is the same as DeletePublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePublicKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) DeletePublicKeyWithContext(ctx aws.Context, input *DeletePublicKeyInput, opts ...request.Option) (*DeletePublicKeyOutput, error) { - req, out := c.DeletePublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteStreamingDistribution = "DeleteStreamingDistribution2018_11_05" - -// DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteStreamingDistribution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteStreamingDistribution for more information on using the DeleteStreamingDistribution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteStreamingDistributionRequest method. -// req, resp := client.DeleteStreamingDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteStreamingDistribution -func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDistributionInput) (req *request.Request, output *DeleteStreamingDistributionOutput) { - op := &request.Operation{ - Name: opDeleteStreamingDistribution, - HTTPMethod: "DELETE", - HTTPPath: "/2018-11-05/streaming-distribution/{Id}", - } - - if input == nil { - input = &DeleteStreamingDistributionInput{} - } - - output = &DeleteStreamingDistributionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteStreamingDistribution API operation for Amazon CloudFront. -// -// Delete a streaming distribution. To delete an RTMP distribution using the -// CloudFront API, perform the following steps. -// -// To delete an RTMP distribution using the CloudFront API: -// -// Disable the RTMP distribution. -// -// Submit a GET Streaming Distribution Config request to get the current configuration -// and the Etag header for the distribution. -// -// Update the XML document that was returned in the response to your GET Streaming -// Distribution Config request to change the value of Enabled to false. -// -// Submit a PUT Streaming Distribution Config request to update the configuration -// for your distribution. In the request body, include the XML document that -// you updated in Step 3. Then set the value of the HTTP If-Match header to -// the value of the ETag header that CloudFront returned when you submitted -// the GET Streaming Distribution Config request in Step 2. -// -// Review the response to the PUT Streaming Distribution Config request to confirm -// that the distribution was successfully disabled. -// -// Submit a GET Streaming Distribution Config request to confirm that your changes -// have propagated. When propagation is complete, the value of Status is Deployed. -// -// Submit a DELETE Streaming Distribution request. Set the value of the HTTP -// If-Match header to the value of the ETag header that CloudFront returned -// when you submitted the GET Streaming Distribution Config request in Step -// 2. -// -// Review the response to your DELETE Streaming Distribution request to confirm -// that the distribution was successfully deleted. -// -// For information about deleting a distribution using the CloudFront console, -// see Deleting a Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html) -// in the Amazon CloudFront Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation DeleteStreamingDistribution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeStreamingDistributionNotDisabled "StreamingDistributionNotDisabled" -// -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. -// -// * ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" -// The specified streaming distribution does not exist. -// -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteStreamingDistribution -func (c *CloudFront) DeleteStreamingDistribution(input *DeleteStreamingDistributionInput) (*DeleteStreamingDistributionOutput, error) { - req, out := c.DeleteStreamingDistributionRequest(input) - return out, req.Send() -} - -// DeleteStreamingDistributionWithContext is the same as DeleteStreamingDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteStreamingDistribution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) DeleteStreamingDistributionWithContext(ctx aws.Context, input *DeleteStreamingDistributionInput, opts ...request.Option) (*DeleteStreamingDistributionOutput, error) { - req, out := c.DeleteStreamingDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity2018_11_05" - -// GetCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the -// client's request for the GetCloudFrontOriginAccessIdentity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCloudFrontOriginAccessIdentity for more information on using the GetCloudFrontOriginAccessIdentity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCloudFrontOriginAccessIdentityRequest method. -// req, resp := client.GetCloudFrontOriginAccessIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentity -func (c *CloudFront) GetCloudFrontOriginAccessIdentityRequest(input *GetCloudFrontOriginAccessIdentityInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityOutput) { - op := &request.Operation{ - Name: opGetCloudFrontOriginAccessIdentity, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/origin-access-identity/cloudfront/{Id}", - } - - if input == nil { - input = &GetCloudFrontOriginAccessIdentityInput{} - } - - output = &GetCloudFrontOriginAccessIdentityOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCloudFrontOriginAccessIdentity API operation for Amazon CloudFront. -// -// Get the information about an origin access identity. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation GetCloudFrontOriginAccessIdentity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity" -// The specified origin access identity does not exist. -// -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentity -func (c *CloudFront) GetCloudFrontOriginAccessIdentity(input *GetCloudFrontOriginAccessIdentityInput) (*GetCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.GetCloudFrontOriginAccessIdentityRequest(input) - return out, req.Send() -} - -// GetCloudFrontOriginAccessIdentityWithContext is the same as GetCloudFrontOriginAccessIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See GetCloudFrontOriginAccessIdentity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) GetCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *GetCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*GetCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.GetCloudFrontOriginAccessIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIdentityConfig2018_11_05" - -// GetCloudFrontOriginAccessIdentityConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetCloudFrontOriginAccessIdentityConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCloudFrontOriginAccessIdentityConfig for more information on using the GetCloudFrontOriginAccessIdentityConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCloudFrontOriginAccessIdentityConfigRequest method. -// req, resp := client.GetCloudFrontOriginAccessIdentityConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentityConfig -func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigRequest(input *GetCloudFrontOriginAccessIdentityConfigInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityConfigOutput) { - op := &request.Operation{ - Name: opGetCloudFrontOriginAccessIdentityConfig, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/origin-access-identity/cloudfront/{Id}/config", - } - - if input == nil { - input = &GetCloudFrontOriginAccessIdentityConfigInput{} - } - - output = &GetCloudFrontOriginAccessIdentityConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCloudFrontOriginAccessIdentityConfig API operation for Amazon CloudFront. -// -// Get the configuration information about an origin access identity. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation GetCloudFrontOriginAccessIdentityConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity" -// The specified origin access identity does not exist. -// -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentityConfig -func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfig(input *GetCloudFrontOriginAccessIdentityConfigInput) (*GetCloudFrontOriginAccessIdentityConfigOutput, error) { - req, out := c.GetCloudFrontOriginAccessIdentityConfigRequest(input) - return out, req.Send() -} - -// GetCloudFrontOriginAccessIdentityConfigWithContext is the same as GetCloudFrontOriginAccessIdentityConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetCloudFrontOriginAccessIdentityConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigWithContext(ctx aws.Context, input *GetCloudFrontOriginAccessIdentityConfigInput, opts ...request.Option) (*GetCloudFrontOriginAccessIdentityConfigOutput, error) { - req, out := c.GetCloudFrontOriginAccessIdentityConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDistribution = "GetDistribution2018_11_05" - -// GetDistributionRequest generates a "aws/request.Request" representing the -// client's request for the GetDistribution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDistribution for more information on using the GetDistribution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDistributionRequest method. -// req, resp := client.GetDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistribution -func (c *CloudFront) GetDistributionRequest(input *GetDistributionInput) (req *request.Request, output *GetDistributionOutput) { - op := &request.Operation{ - Name: opGetDistribution, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/distribution/{Id}", - } - - if input == nil { - input = &GetDistributionInput{} - } - - output = &GetDistributionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDistribution API operation for Amazon CloudFront. -// -// Get the information about a distribution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation GetDistribution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistribution -func (c *CloudFront) GetDistribution(input *GetDistributionInput) (*GetDistributionOutput, error) { - req, out := c.GetDistributionRequest(input) - return out, req.Send() -} - -// GetDistributionWithContext is the same as GetDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See GetDistribution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) GetDistributionWithContext(ctx aws.Context, input *GetDistributionInput, opts ...request.Option) (*GetDistributionOutput, error) { - req, out := c.GetDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDistributionConfig = "GetDistributionConfig2018_11_05" - -// GetDistributionConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetDistributionConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDistributionConfig for more information on using the GetDistributionConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDistributionConfigRequest method. -// req, resp := client.GetDistributionConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistributionConfig -func (c *CloudFront) GetDistributionConfigRequest(input *GetDistributionConfigInput) (req *request.Request, output *GetDistributionConfigOutput) { - op := &request.Operation{ - Name: opGetDistributionConfig, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/distribution/{Id}/config", - } - - if input == nil { - input = &GetDistributionConfigInput{} - } - - output = &GetDistributionConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDistributionConfig API operation for Amazon CloudFront. -// -// Get the configuration information about a distribution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation GetDistributionConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistributionConfig -func (c *CloudFront) GetDistributionConfig(input *GetDistributionConfigInput) (*GetDistributionConfigOutput, error) { - req, out := c.GetDistributionConfigRequest(input) - return out, req.Send() -} - -// GetDistributionConfigWithContext is the same as GetDistributionConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetDistributionConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) GetDistributionConfigWithContext(ctx aws.Context, input *GetDistributionConfigInput, opts ...request.Option) (*GetDistributionConfigOutput, error) { - req, out := c.GetDistributionConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFieldLevelEncryption = "GetFieldLevelEncryption2018_11_05" - -// GetFieldLevelEncryptionRequest generates a "aws/request.Request" representing the -// client's request for the GetFieldLevelEncryption operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetFieldLevelEncryption for more information on using the GetFieldLevelEncryption -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetFieldLevelEncryptionRequest method. -// req, resp := client.GetFieldLevelEncryptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryption -func (c *CloudFront) GetFieldLevelEncryptionRequest(input *GetFieldLevelEncryptionInput) (req *request.Request, output *GetFieldLevelEncryptionOutput) { - op := &request.Operation{ - Name: opGetFieldLevelEncryption, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/field-level-encryption/{Id}", - } - - if input == nil { - input = &GetFieldLevelEncryptionInput{} - } - - output = &GetFieldLevelEncryptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFieldLevelEncryption API operation for Amazon CloudFront. -// -// Get the field-level encryption configuration information. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation GetFieldLevelEncryption for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryption -func (c *CloudFront) GetFieldLevelEncryption(input *GetFieldLevelEncryptionInput) (*GetFieldLevelEncryptionOutput, error) { - req, out := c.GetFieldLevelEncryptionRequest(input) - return out, req.Send() -} - -// GetFieldLevelEncryptionWithContext is the same as GetFieldLevelEncryption with the addition of -// the ability to pass a context and additional request options. -// -// See GetFieldLevelEncryption for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) GetFieldLevelEncryptionWithContext(ctx aws.Context, input *GetFieldLevelEncryptionInput, opts ...request.Option) (*GetFieldLevelEncryptionOutput, error) { - req, out := c.GetFieldLevelEncryptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFieldLevelEncryptionConfig = "GetFieldLevelEncryptionConfig2018_11_05" - -// GetFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetFieldLevelEncryptionConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetFieldLevelEncryptionConfig for more information on using the GetFieldLevelEncryptionConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetFieldLevelEncryptionConfigRequest method. -// req, resp := client.GetFieldLevelEncryptionConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionConfig -func (c *CloudFront) GetFieldLevelEncryptionConfigRequest(input *GetFieldLevelEncryptionConfigInput) (req *request.Request, output *GetFieldLevelEncryptionConfigOutput) { - op := &request.Operation{ - Name: opGetFieldLevelEncryptionConfig, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/field-level-encryption/{Id}/config", - } - - if input == nil { - input = &GetFieldLevelEncryptionConfigInput{} - } - - output = &GetFieldLevelEncryptionConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFieldLevelEncryptionConfig API operation for Amazon CloudFront. -// -// Get the field-level encryption configuration information. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation GetFieldLevelEncryptionConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionConfig -func (c *CloudFront) GetFieldLevelEncryptionConfig(input *GetFieldLevelEncryptionConfigInput) (*GetFieldLevelEncryptionConfigOutput, error) { - req, out := c.GetFieldLevelEncryptionConfigRequest(input) - return out, req.Send() -} - -// GetFieldLevelEncryptionConfigWithContext is the same as GetFieldLevelEncryptionConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetFieldLevelEncryptionConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) GetFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *GetFieldLevelEncryptionConfigInput, opts ...request.Option) (*GetFieldLevelEncryptionConfigOutput, error) { - req, out := c.GetFieldLevelEncryptionConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFieldLevelEncryptionProfile = "GetFieldLevelEncryptionProfile2018_11_05" - -// GetFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the -// client's request for the GetFieldLevelEncryptionProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetFieldLevelEncryptionProfile for more information on using the GetFieldLevelEncryptionProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetFieldLevelEncryptionProfileRequest method. -// req, resp := client.GetFieldLevelEncryptionProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfile -func (c *CloudFront) GetFieldLevelEncryptionProfileRequest(input *GetFieldLevelEncryptionProfileInput) (req *request.Request, output *GetFieldLevelEncryptionProfileOutput) { - op := &request.Operation{ - Name: opGetFieldLevelEncryptionProfile, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/field-level-encryption-profile/{Id}", - } - - if input == nil { - input = &GetFieldLevelEncryptionProfileInput{} - } - - output = &GetFieldLevelEncryptionProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFieldLevelEncryptionProfile API operation for Amazon CloudFront. -// -// Get the field-level encryption profile information. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation GetFieldLevelEncryptionProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" -// The specified profile for field-level encryption doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfile -func (c *CloudFront) GetFieldLevelEncryptionProfile(input *GetFieldLevelEncryptionProfileInput) (*GetFieldLevelEncryptionProfileOutput, error) { - req, out := c.GetFieldLevelEncryptionProfileRequest(input) - return out, req.Send() -} - -// GetFieldLevelEncryptionProfileWithContext is the same as GetFieldLevelEncryptionProfile with the addition of -// the ability to pass a context and additional request options. -// -// See GetFieldLevelEncryptionProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) GetFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *GetFieldLevelEncryptionProfileInput, opts ...request.Option) (*GetFieldLevelEncryptionProfileOutput, error) { - req, out := c.GetFieldLevelEncryptionProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFieldLevelEncryptionProfileConfig = "GetFieldLevelEncryptionProfileConfig2018_11_05" - -// GetFieldLevelEncryptionProfileConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetFieldLevelEncryptionProfileConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetFieldLevelEncryptionProfileConfig for more information on using the GetFieldLevelEncryptionProfileConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetFieldLevelEncryptionProfileConfigRequest method. -// req, resp := client.GetFieldLevelEncryptionProfileConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfileConfig -func (c *CloudFront) GetFieldLevelEncryptionProfileConfigRequest(input *GetFieldLevelEncryptionProfileConfigInput) (req *request.Request, output *GetFieldLevelEncryptionProfileConfigOutput) { - op := &request.Operation{ - Name: opGetFieldLevelEncryptionProfileConfig, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/field-level-encryption-profile/{Id}/config", - } - - if input == nil { - input = &GetFieldLevelEncryptionProfileConfigInput{} - } - - output = &GetFieldLevelEncryptionProfileConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFieldLevelEncryptionProfileConfig API operation for Amazon CloudFront. -// -// Get the field-level encryption profile configuration information. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation GetFieldLevelEncryptionProfileConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" -// The specified profile for field-level encryption doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfileConfig -func (c *CloudFront) GetFieldLevelEncryptionProfileConfig(input *GetFieldLevelEncryptionProfileConfigInput) (*GetFieldLevelEncryptionProfileConfigOutput, error) { - req, out := c.GetFieldLevelEncryptionProfileConfigRequest(input) - return out, req.Send() -} - -// GetFieldLevelEncryptionProfileConfigWithContext is the same as GetFieldLevelEncryptionProfileConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetFieldLevelEncryptionProfileConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) GetFieldLevelEncryptionProfileConfigWithContext(ctx aws.Context, input *GetFieldLevelEncryptionProfileConfigInput, opts ...request.Option) (*GetFieldLevelEncryptionProfileConfigOutput, error) { - req, out := c.GetFieldLevelEncryptionProfileConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInvalidation = "GetInvalidation2018_11_05" - -// GetInvalidationRequest generates a "aws/request.Request" representing the -// client's request for the GetInvalidation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInvalidation for more information on using the GetInvalidation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInvalidationRequest method. -// req, resp := client.GetInvalidationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetInvalidation -func (c *CloudFront) GetInvalidationRequest(input *GetInvalidationInput) (req *request.Request, output *GetInvalidationOutput) { - op := &request.Operation{ - Name: opGetInvalidation, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/distribution/{DistributionId}/invalidation/{Id}", - } - - if input == nil { - input = &GetInvalidationInput{} - } - - output = &GetInvalidationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInvalidation API operation for Amazon CloudFront. -// -// Get the information about an invalidation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation GetInvalidation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchInvalidation "NoSuchInvalidation" -// The specified invalidation does not exist. -// -// * ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetInvalidation -func (c *CloudFront) GetInvalidation(input *GetInvalidationInput) (*GetInvalidationOutput, error) { - req, out := c.GetInvalidationRequest(input) - return out, req.Send() -} - -// GetInvalidationWithContext is the same as GetInvalidation with the addition of -// the ability to pass a context and additional request options. -// -// See GetInvalidation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) GetInvalidationWithContext(ctx aws.Context, input *GetInvalidationInput, opts ...request.Option) (*GetInvalidationOutput, error) { - req, out := c.GetInvalidationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPublicKey = "GetPublicKey2018_11_05" - -// GetPublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the GetPublicKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPublicKey for more information on using the GetPublicKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPublicKeyRequest method. -// req, resp := client.GetPublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKey -func (c *CloudFront) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request.Request, output *GetPublicKeyOutput) { - op := &request.Operation{ - Name: opGetPublicKey, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/public-key/{Id}", - } - - if input == nil { - input = &GetPublicKeyInput{} - } - - output = &GetPublicKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPublicKey API operation for Amazon CloudFront. -// -// Get the public key information. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation GetPublicKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeNoSuchPublicKey "NoSuchPublicKey" -// The specified public key doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKey -func (c *CloudFront) GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error) { - req, out := c.GetPublicKeyRequest(input) - return out, req.Send() -} - -// GetPublicKeyWithContext is the same as GetPublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See GetPublicKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) GetPublicKeyWithContext(ctx aws.Context, input *GetPublicKeyInput, opts ...request.Option) (*GetPublicKeyOutput, error) { - req, out := c.GetPublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPublicKeyConfig = "GetPublicKeyConfig2018_11_05" - -// GetPublicKeyConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetPublicKeyConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPublicKeyConfig for more information on using the GetPublicKeyConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPublicKeyConfigRequest method. -// req, resp := client.GetPublicKeyConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKeyConfig -func (c *CloudFront) GetPublicKeyConfigRequest(input *GetPublicKeyConfigInput) (req *request.Request, output *GetPublicKeyConfigOutput) { - op := &request.Operation{ - Name: opGetPublicKeyConfig, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/public-key/{Id}/config", - } - - if input == nil { - input = &GetPublicKeyConfigInput{} - } - - output = &GetPublicKeyConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPublicKeyConfig API operation for Amazon CloudFront. -// -// Return public key configuration informaation -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation GetPublicKeyConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeNoSuchPublicKey "NoSuchPublicKey" -// The specified public key doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKeyConfig -func (c *CloudFront) GetPublicKeyConfig(input *GetPublicKeyConfigInput) (*GetPublicKeyConfigOutput, error) { - req, out := c.GetPublicKeyConfigRequest(input) - return out, req.Send() -} - -// GetPublicKeyConfigWithContext is the same as GetPublicKeyConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetPublicKeyConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) GetPublicKeyConfigWithContext(ctx aws.Context, input *GetPublicKeyConfigInput, opts ...request.Option) (*GetPublicKeyConfigOutput, error) { - req, out := c.GetPublicKeyConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetStreamingDistribution = "GetStreamingDistribution2018_11_05" - -// GetStreamingDistributionRequest generates a "aws/request.Request" representing the -// client's request for the GetStreamingDistribution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetStreamingDistribution for more information on using the GetStreamingDistribution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetStreamingDistributionRequest method. -// req, resp := client.GetStreamingDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistribution -func (c *CloudFront) GetStreamingDistributionRequest(input *GetStreamingDistributionInput) (req *request.Request, output *GetStreamingDistributionOutput) { - op := &request.Operation{ - Name: opGetStreamingDistribution, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/streaming-distribution/{Id}", - } - - if input == nil { - input = &GetStreamingDistributionInput{} - } - - output = &GetStreamingDistributionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetStreamingDistribution API operation for Amazon CloudFront. -// -// Gets information about a specified RTMP distribution, including the distribution -// configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation GetStreamingDistribution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" -// The specified streaming distribution does not exist. -// -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistribution -func (c *CloudFront) GetStreamingDistribution(input *GetStreamingDistributionInput) (*GetStreamingDistributionOutput, error) { - req, out := c.GetStreamingDistributionRequest(input) - return out, req.Send() -} - -// GetStreamingDistributionWithContext is the same as GetStreamingDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See GetStreamingDistribution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) GetStreamingDistributionWithContext(ctx aws.Context, input *GetStreamingDistributionInput, opts ...request.Option) (*GetStreamingDistributionOutput, error) { - req, out := c.GetStreamingDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetStreamingDistributionConfig = "GetStreamingDistributionConfig2018_11_05" - -// GetStreamingDistributionConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetStreamingDistributionConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetStreamingDistributionConfig for more information on using the GetStreamingDistributionConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetStreamingDistributionConfigRequest method. -// req, resp := client.GetStreamingDistributionConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistributionConfig -func (c *CloudFront) GetStreamingDistributionConfigRequest(input *GetStreamingDistributionConfigInput) (req *request.Request, output *GetStreamingDistributionConfigOutput) { - op := &request.Operation{ - Name: opGetStreamingDistributionConfig, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/streaming-distribution/{Id}/config", - } - - if input == nil { - input = &GetStreamingDistributionConfigInput{} - } - - output = &GetStreamingDistributionConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetStreamingDistributionConfig API operation for Amazon CloudFront. -// -// Get the configuration information about a streaming distribution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation GetStreamingDistributionConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" -// The specified streaming distribution does not exist. -// -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistributionConfig -func (c *CloudFront) GetStreamingDistributionConfig(input *GetStreamingDistributionConfigInput) (*GetStreamingDistributionConfigOutput, error) { - req, out := c.GetStreamingDistributionConfigRequest(input) - return out, req.Send() -} - -// GetStreamingDistributionConfigWithContext is the same as GetStreamingDistributionConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetStreamingDistributionConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) GetStreamingDistributionConfigWithContext(ctx aws.Context, input *GetStreamingDistributionConfigInput, opts ...request.Option) (*GetStreamingDistributionConfigOutput, error) { - req, out := c.GetStreamingDistributionConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListCloudFrontOriginAccessIdentities = "ListCloudFrontOriginAccessIdentities2018_11_05" - -// ListCloudFrontOriginAccessIdentitiesRequest generates a "aws/request.Request" representing the -// client's request for the ListCloudFrontOriginAccessIdentities operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListCloudFrontOriginAccessIdentities for more information on using the ListCloudFrontOriginAccessIdentities -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListCloudFrontOriginAccessIdentitiesRequest method. -// req, resp := client.ListCloudFrontOriginAccessIdentitiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListCloudFrontOriginAccessIdentities -func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesRequest(input *ListCloudFrontOriginAccessIdentitiesInput) (req *request.Request, output *ListCloudFrontOriginAccessIdentitiesOutput) { - op := &request.Operation{ - Name: opListCloudFrontOriginAccessIdentities, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/origin-access-identity/cloudfront", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"CloudFrontOriginAccessIdentityList.NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "CloudFrontOriginAccessIdentityList.IsTruncated", - }, - } - - if input == nil { - input = &ListCloudFrontOriginAccessIdentitiesInput{} - } - - output = &ListCloudFrontOriginAccessIdentitiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCloudFrontOriginAccessIdentities API operation for Amazon CloudFront. -// -// Lists origin access identities. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation ListCloudFrontOriginAccessIdentities for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListCloudFrontOriginAccessIdentities -func (c *CloudFront) ListCloudFrontOriginAccessIdentities(input *ListCloudFrontOriginAccessIdentitiesInput) (*ListCloudFrontOriginAccessIdentitiesOutput, error) { - req, out := c.ListCloudFrontOriginAccessIdentitiesRequest(input) - return out, req.Send() -} - -// ListCloudFrontOriginAccessIdentitiesWithContext is the same as ListCloudFrontOriginAccessIdentities with the addition of -// the ability to pass a context and additional request options. -// -// See ListCloudFrontOriginAccessIdentities for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesWithContext(ctx aws.Context, input *ListCloudFrontOriginAccessIdentitiesInput, opts ...request.Option) (*ListCloudFrontOriginAccessIdentitiesOutput, error) { - req, out := c.ListCloudFrontOriginAccessIdentitiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListCloudFrontOriginAccessIdentitiesPages iterates over the pages of a ListCloudFrontOriginAccessIdentities operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListCloudFrontOriginAccessIdentities method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListCloudFrontOriginAccessIdentities operation. -// pageNum := 0 -// err := client.ListCloudFrontOriginAccessIdentitiesPages(params, -// func(page *ListCloudFrontOriginAccessIdentitiesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPages(input *ListCloudFrontOriginAccessIdentitiesInput, fn func(*ListCloudFrontOriginAccessIdentitiesOutput, bool) bool) error { - return c.ListCloudFrontOriginAccessIdentitiesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListCloudFrontOriginAccessIdentitiesPagesWithContext same as ListCloudFrontOriginAccessIdentitiesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPagesWithContext(ctx aws.Context, input *ListCloudFrontOriginAccessIdentitiesInput, fn func(*ListCloudFrontOriginAccessIdentitiesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListCloudFrontOriginAccessIdentitiesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListCloudFrontOriginAccessIdentitiesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCloudFrontOriginAccessIdentitiesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListDistributions = "ListDistributions2018_11_05" - -// ListDistributionsRequest generates a "aws/request.Request" representing the -// client's request for the ListDistributions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDistributions for more information on using the ListDistributions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDistributionsRequest method. -// req, resp := client.ListDistributionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributions -func (c *CloudFront) ListDistributionsRequest(input *ListDistributionsInput) (req *request.Request, output *ListDistributionsOutput) { - op := &request.Operation{ - Name: opListDistributions, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/distribution", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"DistributionList.NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "DistributionList.IsTruncated", - }, - } - - if input == nil { - input = &ListDistributionsInput{} - } - - output = &ListDistributionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDistributions API operation for Amazon CloudFront. -// -// List distributions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation ListDistributions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributions -func (c *CloudFront) ListDistributions(input *ListDistributionsInput) (*ListDistributionsOutput, error) { - req, out := c.ListDistributionsRequest(input) - return out, req.Send() -} - -// ListDistributionsWithContext is the same as ListDistributions with the addition of -// the ability to pass a context and additional request options. -// -// See ListDistributions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListDistributionsWithContext(ctx aws.Context, input *ListDistributionsInput, opts ...request.Option) (*ListDistributionsOutput, error) { - req, out := c.ListDistributionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListDistributionsPages iterates over the pages of a ListDistributions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDistributions method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListDistributions operation. -// pageNum := 0 -// err := client.ListDistributionsPages(params, -// func(page *ListDistributionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFront) ListDistributionsPages(input *ListDistributionsInput, fn func(*ListDistributionsOutput, bool) bool) error { - return c.ListDistributionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDistributionsPagesWithContext same as ListDistributionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListDistributionsPagesWithContext(ctx aws.Context, input *ListDistributionsInput, fn func(*ListDistributionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDistributionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDistributionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDistributionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListDistributionsByWebACLId = "ListDistributionsByWebACLId2018_11_05" - -// ListDistributionsByWebACLIdRequest generates a "aws/request.Request" representing the -// client's request for the ListDistributionsByWebACLId operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDistributionsByWebACLId for more information on using the ListDistributionsByWebACLId -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDistributionsByWebACLIdRequest method. -// req, resp := client.ListDistributionsByWebACLIdRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributionsByWebACLId -func (c *CloudFront) ListDistributionsByWebACLIdRequest(input *ListDistributionsByWebACLIdInput) (req *request.Request, output *ListDistributionsByWebACLIdOutput) { - op := &request.Operation{ - Name: opListDistributionsByWebACLId, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/distributionsByWebACLId/{WebACLId}", - } - - if input == nil { - input = &ListDistributionsByWebACLIdInput{} - } - - output = &ListDistributionsByWebACLIdOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDistributionsByWebACLId API operation for Amazon CloudFront. -// -// List the distributions that are associated with a specified AWS WAF web ACL. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation ListDistributionsByWebACLId for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInvalidWebACLId "InvalidWebACLId" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributionsByWebACLId -func (c *CloudFront) ListDistributionsByWebACLId(input *ListDistributionsByWebACLIdInput) (*ListDistributionsByWebACLIdOutput, error) { - req, out := c.ListDistributionsByWebACLIdRequest(input) - return out, req.Send() -} - -// ListDistributionsByWebACLIdWithContext is the same as ListDistributionsByWebACLId with the addition of -// the ability to pass a context and additional request options. -// -// See ListDistributionsByWebACLId for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListDistributionsByWebACLIdWithContext(ctx aws.Context, input *ListDistributionsByWebACLIdInput, opts ...request.Option) (*ListDistributionsByWebACLIdOutput, error) { - req, out := c.ListDistributionsByWebACLIdRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListFieldLevelEncryptionConfigs = "ListFieldLevelEncryptionConfigs2018_11_05" - -// ListFieldLevelEncryptionConfigsRequest generates a "aws/request.Request" representing the -// client's request for the ListFieldLevelEncryptionConfigs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListFieldLevelEncryptionConfigs for more information on using the ListFieldLevelEncryptionConfigs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListFieldLevelEncryptionConfigsRequest method. -// req, resp := client.ListFieldLevelEncryptionConfigsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionConfigs -func (c *CloudFront) ListFieldLevelEncryptionConfigsRequest(input *ListFieldLevelEncryptionConfigsInput) (req *request.Request, output *ListFieldLevelEncryptionConfigsOutput) { - op := &request.Operation{ - Name: opListFieldLevelEncryptionConfigs, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/field-level-encryption", - } - - if input == nil { - input = &ListFieldLevelEncryptionConfigsInput{} - } - - output = &ListFieldLevelEncryptionConfigsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListFieldLevelEncryptionConfigs API operation for Amazon CloudFront. -// -// List all field-level encryption configurations that have been created in -// CloudFront for this account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation ListFieldLevelEncryptionConfigs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionConfigs -func (c *CloudFront) ListFieldLevelEncryptionConfigs(input *ListFieldLevelEncryptionConfigsInput) (*ListFieldLevelEncryptionConfigsOutput, error) { - req, out := c.ListFieldLevelEncryptionConfigsRequest(input) - return out, req.Send() -} - -// ListFieldLevelEncryptionConfigsWithContext is the same as ListFieldLevelEncryptionConfigs with the addition of -// the ability to pass a context and additional request options. -// -// See ListFieldLevelEncryptionConfigs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListFieldLevelEncryptionConfigsWithContext(ctx aws.Context, input *ListFieldLevelEncryptionConfigsInput, opts ...request.Option) (*ListFieldLevelEncryptionConfigsOutput, error) { - req, out := c.ListFieldLevelEncryptionConfigsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListFieldLevelEncryptionProfiles = "ListFieldLevelEncryptionProfiles2018_11_05" - -// ListFieldLevelEncryptionProfilesRequest generates a "aws/request.Request" representing the -// client's request for the ListFieldLevelEncryptionProfiles operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListFieldLevelEncryptionProfiles for more information on using the ListFieldLevelEncryptionProfiles -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListFieldLevelEncryptionProfilesRequest method. -// req, resp := client.ListFieldLevelEncryptionProfilesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionProfiles -func (c *CloudFront) ListFieldLevelEncryptionProfilesRequest(input *ListFieldLevelEncryptionProfilesInput) (req *request.Request, output *ListFieldLevelEncryptionProfilesOutput) { - op := &request.Operation{ - Name: opListFieldLevelEncryptionProfiles, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/field-level-encryption-profile", - } - - if input == nil { - input = &ListFieldLevelEncryptionProfilesInput{} - } - - output = &ListFieldLevelEncryptionProfilesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListFieldLevelEncryptionProfiles API operation for Amazon CloudFront. -// -// Request a list of field-level encryption profiles that have been created -// in CloudFront for this account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation ListFieldLevelEncryptionProfiles for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionProfiles -func (c *CloudFront) ListFieldLevelEncryptionProfiles(input *ListFieldLevelEncryptionProfilesInput) (*ListFieldLevelEncryptionProfilesOutput, error) { - req, out := c.ListFieldLevelEncryptionProfilesRequest(input) - return out, req.Send() -} - -// ListFieldLevelEncryptionProfilesWithContext is the same as ListFieldLevelEncryptionProfiles with the addition of -// the ability to pass a context and additional request options. -// -// See ListFieldLevelEncryptionProfiles for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListFieldLevelEncryptionProfilesWithContext(ctx aws.Context, input *ListFieldLevelEncryptionProfilesInput, opts ...request.Option) (*ListFieldLevelEncryptionProfilesOutput, error) { - req, out := c.ListFieldLevelEncryptionProfilesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListInvalidations = "ListInvalidations2018_11_05" - -// ListInvalidationsRequest generates a "aws/request.Request" representing the -// client's request for the ListInvalidations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListInvalidations for more information on using the ListInvalidations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListInvalidationsRequest method. -// req, resp := client.ListInvalidationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListInvalidations -func (c *CloudFront) ListInvalidationsRequest(input *ListInvalidationsInput) (req *request.Request, output *ListInvalidationsOutput) { - op := &request.Operation{ - Name: opListInvalidations, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/distribution/{DistributionId}/invalidation", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"InvalidationList.NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "InvalidationList.IsTruncated", - }, - } - - if input == nil { - input = &ListInvalidationsInput{} - } - - output = &ListInvalidationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInvalidations API operation for Amazon CloudFront. -// -// Lists invalidation batches. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation ListInvalidations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListInvalidations -func (c *CloudFront) ListInvalidations(input *ListInvalidationsInput) (*ListInvalidationsOutput, error) { - req, out := c.ListInvalidationsRequest(input) - return out, req.Send() -} - -// ListInvalidationsWithContext is the same as ListInvalidations with the addition of -// the ability to pass a context and additional request options. -// -// See ListInvalidations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListInvalidationsWithContext(ctx aws.Context, input *ListInvalidationsInput, opts ...request.Option) (*ListInvalidationsOutput, error) { - req, out := c.ListInvalidationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInvalidationsPages iterates over the pages of a ListInvalidations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInvalidations method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListInvalidations operation. -// pageNum := 0 -// err := client.ListInvalidationsPages(params, -// func(page *ListInvalidationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFront) ListInvalidationsPages(input *ListInvalidationsInput, fn func(*ListInvalidationsOutput, bool) bool) error { - return c.ListInvalidationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInvalidationsPagesWithContext same as ListInvalidationsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListInvalidationsPagesWithContext(ctx aws.Context, input *ListInvalidationsInput, fn func(*ListInvalidationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInvalidationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInvalidationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInvalidationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListPublicKeys = "ListPublicKeys2018_11_05" - -// ListPublicKeysRequest generates a "aws/request.Request" representing the -// client's request for the ListPublicKeys operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPublicKeys for more information on using the ListPublicKeys -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPublicKeysRequest method. -// req, resp := client.ListPublicKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListPublicKeys -func (c *CloudFront) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput) { - op := &request.Operation{ - Name: opListPublicKeys, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/public-key", - } - - if input == nil { - input = &ListPublicKeysInput{} - } - - output = &ListPublicKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPublicKeys API operation for Amazon CloudFront. -// -// List all public keys that have been added to CloudFront for this account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation ListPublicKeys for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListPublicKeys -func (c *CloudFront) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error) { - req, out := c.ListPublicKeysRequest(input) - return out, req.Send() -} - -// ListPublicKeysWithContext is the same as ListPublicKeys with the addition of -// the ability to pass a context and additional request options. -// -// See ListPublicKeys for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListPublicKeysWithContext(ctx aws.Context, input *ListPublicKeysInput, opts ...request.Option) (*ListPublicKeysOutput, error) { - req, out := c.ListPublicKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListStreamingDistributions = "ListStreamingDistributions2018_11_05" - -// ListStreamingDistributionsRequest generates a "aws/request.Request" representing the -// client's request for the ListStreamingDistributions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListStreamingDistributions for more information on using the ListStreamingDistributions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListStreamingDistributionsRequest method. -// req, resp := client.ListStreamingDistributionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListStreamingDistributions -func (c *CloudFront) ListStreamingDistributionsRequest(input *ListStreamingDistributionsInput) (req *request.Request, output *ListStreamingDistributionsOutput) { - op := &request.Operation{ - Name: opListStreamingDistributions, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/streaming-distribution", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"StreamingDistributionList.NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "StreamingDistributionList.IsTruncated", - }, - } - - if input == nil { - input = &ListStreamingDistributionsInput{} - } - - output = &ListStreamingDistributionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListStreamingDistributions API operation for Amazon CloudFront. -// -// List streaming distributions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation ListStreamingDistributions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListStreamingDistributions -func (c *CloudFront) ListStreamingDistributions(input *ListStreamingDistributionsInput) (*ListStreamingDistributionsOutput, error) { - req, out := c.ListStreamingDistributionsRequest(input) - return out, req.Send() -} - -// ListStreamingDistributionsWithContext is the same as ListStreamingDistributions with the addition of -// the ability to pass a context and additional request options. -// -// See ListStreamingDistributions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListStreamingDistributionsWithContext(ctx aws.Context, input *ListStreamingDistributionsInput, opts ...request.Option) (*ListStreamingDistributionsOutput, error) { - req, out := c.ListStreamingDistributionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListStreamingDistributionsPages iterates over the pages of a ListStreamingDistributions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListStreamingDistributions method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListStreamingDistributions operation. -// pageNum := 0 -// err := client.ListStreamingDistributionsPages(params, -// func(page *ListStreamingDistributionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFront) ListStreamingDistributionsPages(input *ListStreamingDistributionsInput, fn func(*ListStreamingDistributionsOutput, bool) bool) error { - return c.ListStreamingDistributionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListStreamingDistributionsPagesWithContext same as ListStreamingDistributionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListStreamingDistributionsPagesWithContext(ctx aws.Context, input *ListStreamingDistributionsInput, fn func(*ListStreamingDistributionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListStreamingDistributionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListStreamingDistributionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStreamingDistributionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTagsForResource = "ListTagsForResource2018_11_05" - -// 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/cloudfront-2018-11-05/ListTagsForResource -func (c *CloudFront) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "GET", - HTTPPath: "/2018-11-05/tagging", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for Amazon CloudFront. -// -// List tags for a CloudFront resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInvalidTagging "InvalidTagging" -// -// * ErrCodeNoSuchResource "NoSuchResource" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListTagsForResource -func (c *CloudFront) 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 *CloudFront) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagResource = "TagResource2018_11_05" - -// 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/cloudfront-2018-11-05/TagResource -func (c *CloudFront) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/2018-11-05/tagging?Operation=Tag", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for Amazon CloudFront. -// -// Add tags to a CloudFront resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInvalidTagging "InvalidTagging" -// -// * ErrCodeNoSuchResource "NoSuchResource" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/TagResource -func (c *CloudFront) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) - return out, req.Send() -} - -// TagResourceWithContext is the same as TagResource with the addition of -// the ability to pass a context and additional request options. -// -// See TagResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagResource = "UntagResource2018_11_05" - -// 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/cloudfront-2018-11-05/UntagResource -func (c *CloudFront) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/2018-11-05/tagging?Operation=Untag", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for Amazon CloudFront. -// -// Remove tags from a CloudFront resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInvalidTagging "InvalidTagging" -// -// * ErrCodeNoSuchResource "NoSuchResource" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UntagResource -func (c *CloudFront) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) - return out, req.Send() -} - -// UntagResourceWithContext is the same as UntagResource with the addition of -// the ability to pass a context and additional request options. -// -// See UntagResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateCloudFrontOriginAccessIdentity = "UpdateCloudFrontOriginAccessIdentity2018_11_05" - -// UpdateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCloudFrontOriginAccessIdentity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateCloudFrontOriginAccessIdentity for more information on using the UpdateCloudFrontOriginAccessIdentity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateCloudFrontOriginAccessIdentityRequest method. -// req, resp := client.UpdateCloudFrontOriginAccessIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateCloudFrontOriginAccessIdentity -func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityRequest(input *UpdateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *UpdateCloudFrontOriginAccessIdentityOutput) { - op := &request.Operation{ - Name: opUpdateCloudFrontOriginAccessIdentity, - HTTPMethod: "PUT", - HTTPPath: "/2018-11-05/origin-access-identity/cloudfront/{Id}/config", - } - - if input == nil { - input = &UpdateCloudFrontOriginAccessIdentityInput{} - } - - output = &UpdateCloudFrontOriginAccessIdentityOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateCloudFrontOriginAccessIdentity API operation for Amazon CloudFront. -// -// Update an origin access identity. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation UpdateCloudFrontOriginAccessIdentity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeIllegalUpdate "IllegalUpdate" -// Origin and CallerReference cannot be updated. -// -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. -// -// * ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// * ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity" -// The specified origin access identity does not exist. -// -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateCloudFrontOriginAccessIdentity -func (c *CloudFront) UpdateCloudFrontOriginAccessIdentity(input *UpdateCloudFrontOriginAccessIdentityInput) (*UpdateCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.UpdateCloudFrontOriginAccessIdentityRequest(input) - return out, req.Send() -} - -// UpdateCloudFrontOriginAccessIdentityWithContext is the same as UpdateCloudFrontOriginAccessIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCloudFrontOriginAccessIdentity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *UpdateCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*UpdateCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.UpdateCloudFrontOriginAccessIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDistribution = "UpdateDistribution2018_11_05" - -// UpdateDistributionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDistribution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDistribution for more information on using the UpdateDistribution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDistributionRequest method. -// req, resp := client.UpdateDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateDistribution -func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) (req *request.Request, output *UpdateDistributionOutput) { - op := &request.Operation{ - Name: opUpdateDistribution, - HTTPMethod: "PUT", - HTTPPath: "/2018-11-05/distribution/{Id}/config", - } - - if input == nil { - input = &UpdateDistributionInput{} - } - - output = &UpdateDistributionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDistribution API operation for Amazon CloudFront. -// -// Updates the configuration for a web distribution. -// -// When you update a distribution, there are more required fields than when -// you create a distribution. When you update your distribution by using this -// API action, follow the steps here to get the current configuration and then -// make your updates, to make sure that you include all of the required fields. -// To view a summary, see Required Fields for Create Distribution and Update -// Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-overview-required-fields.html) -// in the Amazon CloudFront Developer Guide. -// -// The update process includes getting the current distribution configuration, -// updating the XML document that is returned to make your changes, and then -// submitting an UpdateDistribution request to make the updates. -// -// For information about updating a distribution using the CloudFront console -// instead, see Creating a Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating-console.html) -// in the Amazon CloudFront Developer Guide. -// -// To update a web distribution using the CloudFront API -// -// Submit a GetDistributionConfig request to get the current configuration and -// an Etag header for the distribution. -// -// If you update the distribution again, you must get a new Etag header. -// -// Update the XML document that was returned in the response to your GetDistributionConfig -// request to include your changes. -// -// When you edit the XML file, be aware of the following: -// -// You must strip out the ETag parameter that is returned. -// -// Additional fields are required when you update a distribution. There may -// be fields included in the XML file for features that you haven't configured -// for your distribution. This is expected and required to successfully update -// the distribution. -// -// You can't change the value of CallerReference. If you try to change this -// value, CloudFront returns an IllegalUpdate error. -// -// The new configuration replaces the existing configuration; the values that -// you specify in an UpdateDistribution request are not merged into your existing -// configuration. When you add, delete, or replace values in an element that -// allows multiple values (for example, CNAME), you must specify all of the -// values that you want to appear in the updated distribution. In addition, -// you must update the corresponding Quantity element. -// -// Submit an UpdateDistribution request to update the configuration for your -// distribution: -// -// In the request body, include the XML document that you updated in Step 2. -// The request body must include an XML document with a DistributionConfig element. -// -// Set the value of the HTTP If-Match header to the value of the ETag header -// that CloudFront returned when you submitted the GetDistributionConfig request -// in Step 1. -// -// Review the response to the UpdateDistribution request to confirm that the -// configuration was successfully updated. -// -// Optional: Submit a GetDistribution request to confirm that your changes have -// propagated. When propagation is complete, the value of Status is Deployed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation UpdateDistribution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// -// * ErrCodeIllegalUpdate "IllegalUpdate" -// Origin and CallerReference cannot be updated. -// -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. -// -// * ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// * ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. -// -// * ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs" -// Your request contains more CNAMEs than are allowed per distribution. -// -// * ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject" -// The default root object file name is too big or contains an invalid character. -// -// * ErrCodeInvalidRelativePath "InvalidRelativePath" -// The relative path is too big, is not URL-encoded, or does not begin with -// a slash (/). -// -// * ErrCodeInvalidErrorCode "InvalidErrorCode" -// -// * ErrCodeInvalidResponseCode "InvalidResponseCode" -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// * ErrCodeInvalidViewerCertificate "InvalidViewerCertificate" -// -// * ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion" -// -// * ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol" -// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS -// protocol in your request, or omit the RequiredProtocols element from your -// distribution configuration. -// -// * ErrCodeNoSuchOrigin "NoSuchOrigin" -// No origin exists with the specified Origin Id. -// -// * ErrCodeTooManyOrigins "TooManyOrigins" -// You cannot create more origins for the distribution. -// -// * ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution" -// Processing your request would cause you to exceed the maximum number of origin -// groups allowed. -// -// * ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" -// You cannot create more cache behaviors for the distribution. -// -// * ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList" -// Your request contains more cookie names in the whitelist than are allowed -// per cache behavior. -// -// * ErrCodeInvalidForwardCookies "InvalidForwardCookies" -// Your request contains forward cookies option which doesn't match with the -// expectation for the whitelisted list of cookie names. Either list of cookie -// names has been specified when not allowed or list of cookie names is missing -// when expected. -// -// * ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues" -// -// * ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin" -// -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// * ErrCodeTooManyCertificates "TooManyCertificates" -// You cannot create anymore custom SSL/TLS certificates. -// -// * ErrCodeInvalidLocationCode "InvalidLocationCode" -// -// * ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter" -// -// * ErrCodeInvalidTTLOrder "InvalidTTLOrder" -// -// * ErrCodeInvalidWebACLId "InvalidWebACLId" -// -// * ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders" -// -// * ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters" -// -// * ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters" -// -// * ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations" -// Processing your request would cause the maximum number of distributions with -// Lambda function associations per owner to be exceeded. -// -// * ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations" -// Your request contains more Lambda function associations than are allowed -// per distribution. -// -// * ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation" -// The specified Lambda function association is invalid. -// -// * ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout" -// -// * ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout" -// -// * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// * ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" -// The specified configuration for field-level encryption can't be associated -// with the specified cache behavior. -// -// * ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" -// The maximum number of distributions have been associated with the specified -// configuration for field-level encryption. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateDistribution -func (c *CloudFront) UpdateDistribution(input *UpdateDistributionInput) (*UpdateDistributionOutput, error) { - req, out := c.UpdateDistributionRequest(input) - return out, req.Send() -} - -// UpdateDistributionWithContext is the same as UpdateDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDistribution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) UpdateDistributionWithContext(ctx aws.Context, input *UpdateDistributionInput, opts ...request.Option) (*UpdateDistributionOutput, error) { - req, out := c.UpdateDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFieldLevelEncryptionConfig = "UpdateFieldLevelEncryptionConfig2018_11_05" - -// UpdateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFieldLevelEncryptionConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFieldLevelEncryptionConfig for more information on using the UpdateFieldLevelEncryptionConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFieldLevelEncryptionConfigRequest method. -// req, resp := client.UpdateFieldLevelEncryptionConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionConfig -func (c *CloudFront) UpdateFieldLevelEncryptionConfigRequest(input *UpdateFieldLevelEncryptionConfigInput) (req *request.Request, output *UpdateFieldLevelEncryptionConfigOutput) { - op := &request.Operation{ - Name: opUpdateFieldLevelEncryptionConfig, - HTTPMethod: "PUT", - HTTPPath: "/2018-11-05/field-level-encryption/{Id}/config", - } - - if input == nil { - input = &UpdateFieldLevelEncryptionConfigInput{} - } - - output = &UpdateFieldLevelEncryptionConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFieldLevelEncryptionConfig API operation for Amazon CloudFront. -// -// Update a field-level encryption configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation UpdateFieldLevelEncryptionConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeIllegalUpdate "IllegalUpdate" -// Origin and CallerReference cannot be updated. -// -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. -// -// * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" -// The specified profile for field-level encryption doesn't exist. -// -// * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. -// -// * ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles "TooManyFieldLevelEncryptionQueryArgProfiles" -// The maximum number of query arg profiles for field-level encryption have -// been created. -// -// * ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles "TooManyFieldLevelEncryptionContentTypeProfiles" -// The maximum number of content type profiles for field-level encryption have -// been created. -// -// * ErrCodeQueryArgProfileEmpty "QueryArgProfileEmpty" -// No profile specified for the field-level encryption query argument. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionConfig -func (c *CloudFront) UpdateFieldLevelEncryptionConfig(input *UpdateFieldLevelEncryptionConfigInput) (*UpdateFieldLevelEncryptionConfigOutput, error) { - req, out := c.UpdateFieldLevelEncryptionConfigRequest(input) - return out, req.Send() -} - -// UpdateFieldLevelEncryptionConfigWithContext is the same as UpdateFieldLevelEncryptionConfig with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFieldLevelEncryptionConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) UpdateFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *UpdateFieldLevelEncryptionConfigInput, opts ...request.Option) (*UpdateFieldLevelEncryptionConfigOutput, error) { - req, out := c.UpdateFieldLevelEncryptionConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFieldLevelEncryptionProfile = "UpdateFieldLevelEncryptionProfile2018_11_05" - -// UpdateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFieldLevelEncryptionProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFieldLevelEncryptionProfile for more information on using the UpdateFieldLevelEncryptionProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFieldLevelEncryptionProfileRequest method. -// req, resp := client.UpdateFieldLevelEncryptionProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionProfile -func (c *CloudFront) UpdateFieldLevelEncryptionProfileRequest(input *UpdateFieldLevelEncryptionProfileInput) (req *request.Request, output *UpdateFieldLevelEncryptionProfileOutput) { - op := &request.Operation{ - Name: opUpdateFieldLevelEncryptionProfile, - HTTPMethod: "PUT", - HTTPPath: "/2018-11-05/field-level-encryption-profile/{Id}/config", - } - - if input == nil { - input = &UpdateFieldLevelEncryptionProfileInput{} - } - - output = &UpdateFieldLevelEncryptionProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFieldLevelEncryptionProfile API operation for Amazon CloudFront. -// -// Update a field-level encryption profile. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation UpdateFieldLevelEncryptionProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeFieldLevelEncryptionProfileAlreadyExists "FieldLevelEncryptionProfileAlreadyExists" -// The specified profile for field-level encryption already exists. -// -// * ErrCodeIllegalUpdate "IllegalUpdate" -// Origin and CallerReference cannot be updated. -// -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. -// -// * ErrCodeNoSuchPublicKey "NoSuchPublicKey" -// The specified public key doesn't exist. -// -// * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" -// The specified profile for field-level encryption doesn't exist. -// -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. -// -// * ErrCodeFieldLevelEncryptionProfileSizeExceeded "FieldLevelEncryptionProfileSizeExceeded" -// The maximum size of a profile for field-level encryption was exceeded. -// -// * ErrCodeTooManyFieldLevelEncryptionEncryptionEntities "TooManyFieldLevelEncryptionEncryptionEntities" -// The maximum number of encryption entities for field-level encryption have -// been created. -// -// * ErrCodeTooManyFieldLevelEncryptionFieldPatterns "TooManyFieldLevelEncryptionFieldPatterns" -// The maximum number of field patterns for field-level encryption have been -// created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionProfile -func (c *CloudFront) UpdateFieldLevelEncryptionProfile(input *UpdateFieldLevelEncryptionProfileInput) (*UpdateFieldLevelEncryptionProfileOutput, error) { - req, out := c.UpdateFieldLevelEncryptionProfileRequest(input) - return out, req.Send() -} - -// UpdateFieldLevelEncryptionProfileWithContext is the same as UpdateFieldLevelEncryptionProfile with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFieldLevelEncryptionProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) UpdateFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *UpdateFieldLevelEncryptionProfileInput, opts ...request.Option) (*UpdateFieldLevelEncryptionProfileOutput, error) { - req, out := c.UpdateFieldLevelEncryptionProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdatePublicKey = "UpdatePublicKey2018_11_05" - -// UpdatePublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePublicKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdatePublicKey for more information on using the UpdatePublicKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdatePublicKeyRequest method. -// req, resp := client.UpdatePublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdatePublicKey -func (c *CloudFront) UpdatePublicKeyRequest(input *UpdatePublicKeyInput) (req *request.Request, output *UpdatePublicKeyOutput) { - op := &request.Operation{ - Name: opUpdatePublicKey, - HTTPMethod: "PUT", - HTTPPath: "/2018-11-05/public-key/{Id}/config", - } - - if input == nil { - input = &UpdatePublicKeyInput{} - } - - output = &UpdatePublicKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdatePublicKey API operation for Amazon CloudFront. -// -// Update public key information. Note that the only value you can change is -// the comment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation UpdatePublicKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeCannotChangeImmutablePublicKeyFields "CannotChangeImmutablePublicKeyFields" -// You can't change the value of a public key. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. -// -// * ErrCodeIllegalUpdate "IllegalUpdate" -// Origin and CallerReference cannot be updated. -// -// * ErrCodeNoSuchPublicKey "NoSuchPublicKey" -// The specified public key doesn't exist. -// -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdatePublicKey -func (c *CloudFront) UpdatePublicKey(input *UpdatePublicKeyInput) (*UpdatePublicKeyOutput, error) { - req, out := c.UpdatePublicKeyRequest(input) - return out, req.Send() -} - -// UpdatePublicKeyWithContext is the same as UpdatePublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See UpdatePublicKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) UpdatePublicKeyWithContext(ctx aws.Context, input *UpdatePublicKeyInput, opts ...request.Option) (*UpdatePublicKeyOutput, error) { - req, out := c.UpdatePublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateStreamingDistribution = "UpdateStreamingDistribution2018_11_05" - -// UpdateStreamingDistributionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateStreamingDistribution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateStreamingDistribution for more information on using the UpdateStreamingDistribution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateStreamingDistributionRequest method. -// req, resp := client.UpdateStreamingDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateStreamingDistribution -func (c *CloudFront) UpdateStreamingDistributionRequest(input *UpdateStreamingDistributionInput) (req *request.Request, output *UpdateStreamingDistributionOutput) { - op := &request.Operation{ - Name: opUpdateStreamingDistribution, - HTTPMethod: "PUT", - HTTPPath: "/2018-11-05/streaming-distribution/{Id}/config", - } - - if input == nil { - input = &UpdateStreamingDistributionInput{} - } - - output = &UpdateStreamingDistributionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateStreamingDistribution API operation for Amazon CloudFront. -// -// Update a streaming distribution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation UpdateStreamingDistribution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// -// * ErrCodeIllegalUpdate "IllegalUpdate" -// Origin and CallerReference cannot be updated. -// -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. -// -// * ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// * ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" -// The specified streaming distribution does not exist. -// -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. -// -// * ErrCodeTooManyStreamingDistributionCNAMEs "TooManyStreamingDistributionCNAMEs" -// -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateStreamingDistribution -func (c *CloudFront) UpdateStreamingDistribution(input *UpdateStreamingDistributionInput) (*UpdateStreamingDistributionOutput, error) { - req, out := c.UpdateStreamingDistributionRequest(input) - return out, req.Send() -} - -// UpdateStreamingDistributionWithContext is the same as UpdateStreamingDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateStreamingDistribution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) UpdateStreamingDistributionWithContext(ctx aws.Context, input *UpdateStreamingDistributionInput, opts ...request.Option) (*UpdateStreamingDistributionOutput, error) { - req, out := c.UpdateStreamingDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// A complex type that lists the AWS accounts, if any, that you included in -// the TrustedSigners complex type for this distribution. These are the accounts -// that you want to allow to create signed URLs for private content. -// -// The Signer complex type lists the AWS account number of the trusted signer -// or self if the signer is the AWS account that created the distribution. The -// Signer element also includes the IDs of any active CloudFront key pairs that -// are associated with the trusted signer's AWS account. If no KeyPairId element -// appears for a Signer, that signer can't create signed URLs. -// -// For more information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) -// in the Amazon CloudFront Developer Guide. -type ActiveTrustedSigners struct { - _ struct{} `type:"structure"` - - // Enabled is true if any of the AWS accounts listed in the TrustedSigners complex - // type for this RTMP distribution have active CloudFront key pairs. If not, - // Enabled is false. - // - // For more information, see ActiveTrustedSigners. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // A complex type that contains one Signer complex type for each trusted signer - // that is specified in the TrustedSigners complex type. - // - // For more information, see ActiveTrustedSigners. - Items []*Signer `locationNameList:"Signer" type:"list"` - - // A complex type that contains one Signer complex type for each trusted signer - // specified in the TrustedSigners complex type. - // - // For more information, see ActiveTrustedSigners. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s ActiveTrustedSigners) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActiveTrustedSigners) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *ActiveTrustedSigners) SetEnabled(v bool) *ActiveTrustedSigners { - s.Enabled = &v - return s -} - -// SetItems sets the Items field's value. -func (s *ActiveTrustedSigners) SetItems(v []*Signer) *ActiveTrustedSigners { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *ActiveTrustedSigners) SetQuantity(v int64) *ActiveTrustedSigners { - s.Quantity = &v - return s -} - -// A complex type that contains information about CNAMEs (alternate domain names), -// if any, for this distribution. -type Aliases struct { - _ struct{} `type:"structure"` - - // A complex type that contains the CNAME aliases, if any, that you want to - // associate with this distribution. - Items []*string `locationNameList:"CNAME" type:"list"` - - // The number of CNAME aliases, if any, that you want to associate with this - // distribution. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s Aliases) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Aliases) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Aliases) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Aliases"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *Aliases) SetItems(v []*string) *Aliases { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *Aliases) SetQuantity(v int64) *Aliases { - s.Quantity = &v - return s -} - -// A complex type that controls which HTTP methods CloudFront processes and -// forwards to your Amazon S3 bucket or your custom origin. There are three -// choices: -// -// * CloudFront forwards only GET and HEAD requests. -// -// * CloudFront forwards only GET, HEAD, and OPTIONS requests. -// -// * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE -// requests. -// -// If you pick the third choice, you may need to restrict access to your Amazon -// S3 bucket or to your custom origin so users can't perform operations that -// you don't want them to. For example, you might not want users to have permissions -// to delete objects from your origin. -type AllowedMethods struct { - _ struct{} `type:"structure"` - - // A complex type that controls whether CloudFront caches the response to requests - // using the specified HTTP methods. There are two choices: - // - // * CloudFront caches responses to GET and HEAD requests. - // - // * CloudFront caches responses to GET, HEAD, and OPTIONS requests. - // - // If you pick the second choice for your Amazon S3 Origin, you may need to - // forward Access-Control-Request-Method, Access-Control-Request-Headers, and - // Origin headers for the responses to be cached correctly. - CachedMethods *CachedMethods `type:"structure"` - - // A complex type that contains the HTTP methods that you want CloudFront to - // process and forward to your origin. - // - // Items is a required field - Items []*string `locationNameList:"Method" type:"list" required:"true"` - - // The number of HTTP methods that you want CloudFront to forward to your origin. - // Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD, and OPTIONS - // requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests). - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s AllowedMethods) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AllowedMethods) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AllowedMethods) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AllowedMethods"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.CachedMethods != nil { - if err := s.CachedMethods.Validate(); err != nil { - invalidParams.AddNested("CachedMethods", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCachedMethods sets the CachedMethods field's value. -func (s *AllowedMethods) SetCachedMethods(v *CachedMethods) *AllowedMethods { - s.CachedMethods = v - return s -} - -// SetItems sets the Items field's value. -func (s *AllowedMethods) SetItems(v []*string) *AllowedMethods { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *AllowedMethods) SetQuantity(v int64) *AllowedMethods { - s.Quantity = &v - return s -} - -// A complex type that describes how CloudFront processes requests. -// -// You must create at least as many cache behaviors (including the default cache -// behavior) as you have origins if you want CloudFront to distribute objects -// from all of the origins. Each cache behavior specifies the one origin from -// which you want CloudFront to get objects. If you have two origins and only -// the default cache behavior, the default cache behavior will cause CloudFront -// to get objects from one of the origins, but the other origin is never used. -// -// For the current limit on the number of cache behaviors that you can add to -// a distribution, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront) -// in the AWS General Reference. -// -// If you don't want to specify any cache behaviors, include only an empty CacheBehaviors -// element. Don't include an empty CacheBehavior element, or CloudFront returns -// a MalformedXML error. -// -// To delete all cache behaviors in an existing distribution, update the distribution -// configuration and include only an empty CacheBehaviors element. -// -// To add, change, or remove one or more cache behaviors, update the distribution -// configuration and specify all of the cache behaviors that you want to include -// in the updated distribution. -// -// For more information about cache behaviors, see Cache Behaviors (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior) -// in the Amazon CloudFront Developer Guide. -type CacheBehavior struct { - _ struct{} `type:"structure"` - - // A complex type that controls which HTTP methods CloudFront processes and - // forwards to your Amazon S3 bucket or your custom origin. There are three - // choices: - // - // * CloudFront forwards only GET and HEAD requests. - // - // * CloudFront forwards only GET, HEAD, and OPTIONS requests. - // - // * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE - // requests. - // - // If you pick the third choice, you may need to restrict access to your Amazon - // S3 bucket or to your custom origin so users can't perform operations that - // you don't want them to. For example, you might not want users to have permissions - // to delete objects from your origin. - AllowedMethods *AllowedMethods `type:"structure"` - - // Whether you want CloudFront to automatically compress certain files for this - // cache behavior. If so, specify true; if not, specify false. For more information, - // see Serving Compressed Files (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) - // in the Amazon CloudFront Developer Guide. - Compress *bool `type:"boolean"` - - // The default amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. The value that you specify applies only when - // your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control - // s-maxage, and Expires to objects. For more information, see Specifying How - // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - DefaultTTL *int64 `type:"long"` - - // The value of ID for the field-level encryption configuration that you want - // CloudFront to use for encrypting specific fields of data for a cache behavior - // or for the default cache behavior in your distribution. - FieldLevelEncryptionId *string `type:"string"` - - // A complex type that specifies how CloudFront handles query strings and cookies. - // - // ForwardedValues is a required field - ForwardedValues *ForwardedValues `type:"structure" required:"true"` - - // A complex type that contains zero or more Lambda function associations for - // a cache behavior. - LambdaFunctionAssociations *LambdaFunctionAssociations `type:"structure"` - - // The maximum amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. The value that you specify applies only when - // your origin adds HTTP headers such as Cache-Control max-age, Cache-Control - // s-maxage, and Expires to objects. For more information, see Specifying How - // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - MaxTTL *int64 `type:"long"` - - // The minimum amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. For more information, see Specifying How Long - // Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon Amazon CloudFront Developer Guide. - // - // You must specify 0 for MinTTL if you configure CloudFront to forward all - // headers to your origin (under Headers, if you specify 1 for Quantity and - // * for Name). - // - // MinTTL is a required field - MinTTL *int64 `type:"long" required:"true"` - - // The pattern (for example, images/*.jpg) that specifies which requests to - // apply the behavior to. When CloudFront receives a viewer request, the requested - // path is compared with path patterns in the order in which cache behaviors - // are listed in the distribution. - // - // You can optionally include a slash (/) at the beginning of the path pattern. - // For example, /images/*.jpg. CloudFront behavior is the same with or without - // the leading /. - // - // The path pattern for the default cache behavior is * and cannot be changed. - // If the request for an object does not match the path pattern for any cache - // behaviors, CloudFront applies the behavior in the default cache behavior. - // - // For more information, see Path Pattern (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesPathPattern) - // in the Amazon CloudFront Developer Guide. - // - // PathPattern is a required field - PathPattern *string `type:"string" required:"true"` - - // Indicates whether you want to distribute media files in the Microsoft Smooth - // Streaming format using the origin that is associated with this cache behavior. - // If so, specify true; if not, specify false. If you specify true for SmoothStreaming, - // you can still distribute other content using this cache behavior if the content - // matches the value of PathPattern. - SmoothStreaming *bool `type:"boolean"` - - // The value of ID for the origin that you want CloudFront to route requests - // to when a request matches the path pattern either for a cache behavior or - // for the default cache behavior in your distribution. - // - // TargetOriginId is a required field - TargetOriginId *string `type:"string" required:"true"` - - // A complex type that specifies the AWS accounts, if any, that you want to - // allow to create signed URLs for private content. - // - // If you want to require signed URLs in requests for objects in the target - // origin that match the PathPattern for this cache behavior, specify true for - // Enabled, and specify the applicable values for Quantity and Items. For more - // information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon Amazon CloudFront Developer Guide. - // - // If you don't want to require signed URLs in requests for objects that match - // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items. - // - // To add, change, or remove one or more trusted signers, change Enabled to - // true (if it's currently false), change Quantity as applicable, and specify - // all of the trusted signers that you want to include in the updated distribution. - // - // TrustedSigners is a required field - TrustedSigners *TrustedSigners `type:"structure" required:"true"` - - // The protocol that viewers can use to access the files in the origin specified - // by TargetOriginId when a request matches the path pattern in PathPattern. - // You can specify the following options: - // - // * allow-all: Viewers can use HTTP or HTTPS. - // - // * redirect-to-https: If a viewer submits an HTTP request, CloudFront returns - // an HTTP status code of 301 (Moved Permanently) to the viewer along with - // the HTTPS URL. The viewer then resubmits the request using the new URL. - // - // - // * https-only: If a viewer sends an HTTP request, CloudFront returns an - // HTTP status code of 403 (Forbidden). - // - // For more information about requiring the HTTPS protocol, see Using an HTTPS - // Connection to Access Your Objects (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html) - // in the Amazon CloudFront Developer Guide. - // - // The only way to guarantee that viewers retrieve an object that was fetched - // from the origin using HTTPS is never to use any other protocol to fetch the - // object. If you have recently changed from HTTP to HTTPS, we recommend that - // you clear your objects' cache because cached objects are protocol agnostic. - // That means that an edge location will return an object from the cache regardless - // of whether the current request protocol matches the protocol used previously. - // For more information, see Specifying How Long Objects and Errors Stay in - // a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - // - // ViewerProtocolPolicy is a required field - ViewerProtocolPolicy *string `type:"string" required:"true" enum:"ViewerProtocolPolicy"` -} - -// String returns the string representation -func (s CacheBehavior) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CacheBehavior) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CacheBehavior) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CacheBehavior"} - if s.ForwardedValues == nil { - invalidParams.Add(request.NewErrParamRequired("ForwardedValues")) - } - if s.MinTTL == nil { - invalidParams.Add(request.NewErrParamRequired("MinTTL")) - } - if s.PathPattern == nil { - invalidParams.Add(request.NewErrParamRequired("PathPattern")) - } - if s.TargetOriginId == nil { - invalidParams.Add(request.NewErrParamRequired("TargetOriginId")) - } - if s.TrustedSigners == nil { - invalidParams.Add(request.NewErrParamRequired("TrustedSigners")) - } - if s.ViewerProtocolPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy")) - } - if s.AllowedMethods != nil { - if err := s.AllowedMethods.Validate(); err != nil { - invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams)) - } - } - if s.ForwardedValues != nil { - if err := s.ForwardedValues.Validate(); err != nil { - invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams)) - } - } - if s.LambdaFunctionAssociations != nil { - if err := s.LambdaFunctionAssociations.Validate(); err != nil { - invalidParams.AddNested("LambdaFunctionAssociations", err.(request.ErrInvalidParams)) - } - } - if s.TrustedSigners != nil { - if err := s.TrustedSigners.Validate(); err != nil { - invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowedMethods sets the AllowedMethods field's value. -func (s *CacheBehavior) SetAllowedMethods(v *AllowedMethods) *CacheBehavior { - s.AllowedMethods = v - return s -} - -// SetCompress sets the Compress field's value. -func (s *CacheBehavior) SetCompress(v bool) *CacheBehavior { - s.Compress = &v - return s -} - -// SetDefaultTTL sets the DefaultTTL field's value. -func (s *CacheBehavior) SetDefaultTTL(v int64) *CacheBehavior { - s.DefaultTTL = &v - return s -} - -// SetFieldLevelEncryptionId sets the FieldLevelEncryptionId field's value. -func (s *CacheBehavior) SetFieldLevelEncryptionId(v string) *CacheBehavior { - s.FieldLevelEncryptionId = &v - return s -} - -// SetForwardedValues sets the ForwardedValues field's value. -func (s *CacheBehavior) SetForwardedValues(v *ForwardedValues) *CacheBehavior { - s.ForwardedValues = v - return s -} - -// SetLambdaFunctionAssociations sets the LambdaFunctionAssociations field's value. -func (s *CacheBehavior) SetLambdaFunctionAssociations(v *LambdaFunctionAssociations) *CacheBehavior { - s.LambdaFunctionAssociations = v - return s -} - -// SetMaxTTL sets the MaxTTL field's value. -func (s *CacheBehavior) SetMaxTTL(v int64) *CacheBehavior { - s.MaxTTL = &v - return s -} - -// SetMinTTL sets the MinTTL field's value. -func (s *CacheBehavior) SetMinTTL(v int64) *CacheBehavior { - s.MinTTL = &v - return s -} - -// SetPathPattern sets the PathPattern field's value. -func (s *CacheBehavior) SetPathPattern(v string) *CacheBehavior { - s.PathPattern = &v - return s -} - -// SetSmoothStreaming sets the SmoothStreaming field's value. -func (s *CacheBehavior) SetSmoothStreaming(v bool) *CacheBehavior { - s.SmoothStreaming = &v - return s -} - -// SetTargetOriginId sets the TargetOriginId field's value. -func (s *CacheBehavior) SetTargetOriginId(v string) *CacheBehavior { - s.TargetOriginId = &v - return s -} - -// SetTrustedSigners sets the TrustedSigners field's value. -func (s *CacheBehavior) SetTrustedSigners(v *TrustedSigners) *CacheBehavior { - s.TrustedSigners = v - return s -} - -// SetViewerProtocolPolicy sets the ViewerProtocolPolicy field's value. -func (s *CacheBehavior) SetViewerProtocolPolicy(v string) *CacheBehavior { - s.ViewerProtocolPolicy = &v - return s -} - -// A complex type that contains zero or more CacheBehavior elements. -type CacheBehaviors struct { - _ struct{} `type:"structure"` - - // Optional: A complex type that contains cache behaviors for this distribution. - // If Quantity is 0, you can omit Items. - Items []*CacheBehavior `locationNameList:"CacheBehavior" type:"list"` - - // The number of cache behaviors for this distribution. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s CacheBehaviors) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CacheBehaviors) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CacheBehaviors) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CacheBehaviors"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *CacheBehaviors) SetItems(v []*CacheBehavior) *CacheBehaviors { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *CacheBehaviors) SetQuantity(v int64) *CacheBehaviors { - s.Quantity = &v - return s -} - -// A complex type that controls whether CloudFront caches the response to requests -// using the specified HTTP methods. There are two choices: -// -// * CloudFront caches responses to GET and HEAD requests. -// -// * CloudFront caches responses to GET, HEAD, and OPTIONS requests. -// -// If you pick the second choice for your Amazon S3 Origin, you may need to -// forward Access-Control-Request-Method, Access-Control-Request-Headers, and -// Origin headers for the responses to be cached correctly. -type CachedMethods struct { - _ struct{} `type:"structure"` - - // A complex type that contains the HTTP methods that you want CloudFront to - // cache responses to. - // - // Items is a required field - Items []*string `locationNameList:"Method" type:"list" required:"true"` - - // The number of HTTP methods for which you want CloudFront to cache responses. - // Valid values are 2 (for caching responses to GET and HEAD requests) and 3 - // (for caching responses to GET, HEAD, and OPTIONS requests). - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s CachedMethods) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CachedMethods) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CachedMethods) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CachedMethods"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *CachedMethods) SetItems(v []*string) *CachedMethods { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *CachedMethods) SetQuantity(v int64) *CachedMethods { - s.Quantity = &v - return s -} - -// A field-level encryption content type profile. -type ContentTypeProfile struct { - _ struct{} `type:"structure"` - - // The content type for a field-level encryption content type-profile mapping. - // - // ContentType is a required field - ContentType *string `type:"string" required:"true"` - - // The format for a field-level encryption content type-profile mapping. - // - // Format is a required field - Format *string `type:"string" required:"true" enum:"Format"` - - // The profile ID for a field-level encryption content type-profile mapping. - ProfileId *string `type:"string"` -} - -// String returns the string representation -func (s ContentTypeProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContentTypeProfile) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContentTypeProfile) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContentTypeProfile"} - if s.ContentType == nil { - invalidParams.Add(request.NewErrParamRequired("ContentType")) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContentType sets the ContentType field's value. -func (s *ContentTypeProfile) SetContentType(v string) *ContentTypeProfile { - s.ContentType = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *ContentTypeProfile) SetFormat(v string) *ContentTypeProfile { - s.Format = &v - return s -} - -// SetProfileId sets the ProfileId field's value. -func (s *ContentTypeProfile) SetProfileId(v string) *ContentTypeProfile { - s.ProfileId = &v - return s -} - -// The configuration for a field-level encryption content type-profile mapping. -type ContentTypeProfileConfig struct { - _ struct{} `type:"structure"` - - // The configuration for a field-level encryption content type-profile. - ContentTypeProfiles *ContentTypeProfiles `type:"structure"` - - // The setting in a field-level encryption content type-profile mapping that - // specifies what to do when an unknown content type is provided for the profile. - // If true, content is forwarded without being encrypted when the content type - // is unknown. If false (the default), an error is returned when the content - // type is unknown. - // - // ForwardWhenContentTypeIsUnknown is a required field - ForwardWhenContentTypeIsUnknown *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s ContentTypeProfileConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContentTypeProfileConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContentTypeProfileConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContentTypeProfileConfig"} - if s.ForwardWhenContentTypeIsUnknown == nil { - invalidParams.Add(request.NewErrParamRequired("ForwardWhenContentTypeIsUnknown")) - } - if s.ContentTypeProfiles != nil { - if err := s.ContentTypeProfiles.Validate(); err != nil { - invalidParams.AddNested("ContentTypeProfiles", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContentTypeProfiles sets the ContentTypeProfiles field's value. -func (s *ContentTypeProfileConfig) SetContentTypeProfiles(v *ContentTypeProfiles) *ContentTypeProfileConfig { - s.ContentTypeProfiles = v - return s -} - -// SetForwardWhenContentTypeIsUnknown sets the ForwardWhenContentTypeIsUnknown field's value. -func (s *ContentTypeProfileConfig) SetForwardWhenContentTypeIsUnknown(v bool) *ContentTypeProfileConfig { - s.ForwardWhenContentTypeIsUnknown = &v - return s -} - -// Field-level encryption content type-profile. -type ContentTypeProfiles struct { - _ struct{} `type:"structure"` - - // Items in a field-level encryption content type-profile mapping. - Items []*ContentTypeProfile `locationNameList:"ContentTypeProfile" type:"list"` - - // The number of field-level encryption content type-profile mappings. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s ContentTypeProfiles) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContentTypeProfiles) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContentTypeProfiles) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContentTypeProfiles"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *ContentTypeProfiles) SetItems(v []*ContentTypeProfile) *ContentTypeProfiles { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *ContentTypeProfiles) SetQuantity(v int64) *ContentTypeProfiles { - s.Quantity = &v - return s -} - -// A complex type that specifies whether you want CloudFront to forward cookies -// to the origin and, if so, which ones. For more information about forwarding -// cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) -// in the Amazon CloudFront Developer Guide. -type CookieNames struct { - _ struct{} `type:"structure"` - - // A complex type that contains one Name element for each cookie that you want - // CloudFront to forward to the origin for this cache behavior. - Items []*string `locationNameList:"Name" type:"list"` - - // The number of different cookies that you want CloudFront to forward to the - // origin for this cache behavior. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s CookieNames) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CookieNames) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CookieNames) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CookieNames"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *CookieNames) SetItems(v []*string) *CookieNames { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *CookieNames) SetQuantity(v int64) *CookieNames { - s.Quantity = &v - return s -} - -// A complex type that specifies whether you want CloudFront to forward cookies -// to the origin and, if so, which ones. For more information about forwarding -// cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) -// in the Amazon CloudFront Developer Guide. -type CookiePreference struct { - _ struct{} `type:"structure"` - - // Specifies which cookies to forward to the origin for this cache behavior: - // all, none, or the list of cookies specified in the WhitelistedNames complex - // type. - // - // Amazon S3 doesn't process cookies. When the cache behavior is forwarding - // requests to an Amazon S3 origin, specify none for the Forward element. - // - // Forward is a required field - Forward *string `type:"string" required:"true" enum:"ItemSelection"` - - // Required if you specify whitelist for the value of Forward:. A complex type - // that specifies how many different cookies you want CloudFront to forward - // to the origin for this cache behavior and, if you want to forward selected - // cookies, the names of those cookies. - // - // If you specify all or none for the value of Forward, omit WhitelistedNames. - // If you change the value of Forward from whitelist to all or none and you - // don't delete the WhitelistedNames element and its child elements, CloudFront - // deletes them automatically. - // - // For the current limit on the number of cookie names that you can whitelist - // for each cache behavior, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront) - // in the AWS General Reference. - WhitelistedNames *CookieNames `type:"structure"` -} - -// String returns the string representation -func (s CookiePreference) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CookiePreference) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CookiePreference) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CookiePreference"} - if s.Forward == nil { - invalidParams.Add(request.NewErrParamRequired("Forward")) - } - if s.WhitelistedNames != nil { - if err := s.WhitelistedNames.Validate(); err != nil { - invalidParams.AddNested("WhitelistedNames", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForward sets the Forward field's value. -func (s *CookiePreference) SetForward(v string) *CookiePreference { - s.Forward = &v - return s -} - -// SetWhitelistedNames sets the WhitelistedNames field's value. -func (s *CookiePreference) SetWhitelistedNames(v *CookieNames) *CookiePreference { - s.WhitelistedNames = v - return s -} - -// The request to create a new origin access identity. -type CreateCloudFrontOriginAccessIdentityInput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"` - - // The current configuration information for the identity. - // - // CloudFrontOriginAccessIdentityConfig is a required field - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` -} - -// String returns the string representation -func (s CreateCloudFrontOriginAccessIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCloudFrontOriginAccessIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCloudFrontOriginAccessIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCloudFrontOriginAccessIdentityInput"} - if s.CloudFrontOriginAccessIdentityConfig == nil { - invalidParams.Add(request.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig")) - } - if s.CloudFrontOriginAccessIdentityConfig != nil { - if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil { - invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value. -func (s *CreateCloudFrontOriginAccessIdentityInput) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *CreateCloudFrontOriginAccessIdentityInput { - s.CloudFrontOriginAccessIdentityConfig = v - return s -} - -// The returned result of the corresponding request. -type CreateCloudFrontOriginAccessIdentityOutput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"` - - // The origin access identity's information. - CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"` - - // The current version of the origin access identity created. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the new origin access identity just created. For - // example: https://cloudfront.amazonaws.com/2010-11-01/origin-access-identity/cloudfront/E74FTE3AJFJ256A. - Location *string `location:"header" locationName:"Location" type:"string"` -} - -// String returns the string representation -func (s CreateCloudFrontOriginAccessIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCloudFrontOriginAccessIdentityOutput) GoString() string { - return s.String() -} - -// SetCloudFrontOriginAccessIdentity sets the CloudFrontOriginAccessIdentity field's value. -func (s *CreateCloudFrontOriginAccessIdentityOutput) SetCloudFrontOriginAccessIdentity(v *OriginAccessIdentity) *CreateCloudFrontOriginAccessIdentityOutput { - s.CloudFrontOriginAccessIdentity = v - return s -} - -// SetETag sets the ETag field's value. -func (s *CreateCloudFrontOriginAccessIdentityOutput) SetETag(v string) *CreateCloudFrontOriginAccessIdentityOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateCloudFrontOriginAccessIdentityOutput) SetLocation(v string) *CreateCloudFrontOriginAccessIdentityOutput { - s.Location = &v - return s -} - -// The request to create a new distribution. -type CreateDistributionInput struct { - _ struct{} `type:"structure" payload:"DistributionConfig"` - - // The distribution's configuration information. - // - // DistributionConfig is a required field - DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` -} - -// String returns the string representation -func (s CreateDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDistributionInput"} - if s.DistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionConfig")) - } - if s.DistributionConfig != nil { - if err := s.DistributionConfig.Validate(); err != nil { - invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionConfig sets the DistributionConfig field's value. -func (s *CreateDistributionInput) SetDistributionConfig(v *DistributionConfig) *CreateDistributionInput { - s.DistributionConfig = v - return s -} - -// The returned result of the corresponding request. -type CreateDistributionOutput struct { - _ struct{} `type:"structure" payload:"Distribution"` - - // The distribution's information. - Distribution *Distribution `type:"structure"` - - // The current version of the distribution created. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the new distribution resource just created. For - // example: https://cloudfront.amazonaws.com/2010-11-01/distribution/EDFDVBD632BHDS5. - Location *string `location:"header" locationName:"Location" type:"string"` -} - -// String returns the string representation -func (s CreateDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDistributionOutput) GoString() string { - return s.String() -} - -// SetDistribution sets the Distribution field's value. -func (s *CreateDistributionOutput) SetDistribution(v *Distribution) *CreateDistributionOutput { - s.Distribution = v - return s -} - -// SetETag sets the ETag field's value. -func (s *CreateDistributionOutput) SetETag(v string) *CreateDistributionOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateDistributionOutput) SetLocation(v string) *CreateDistributionOutput { - s.Location = &v - return s -} - -// The request to create a new distribution with tags. -type CreateDistributionWithTagsInput struct { - _ struct{} `type:"structure" payload:"DistributionConfigWithTags"` - - // The distribution's configuration information. - // - // DistributionConfigWithTags is a required field - DistributionConfigWithTags *DistributionConfigWithTags `locationName:"DistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` -} - -// String returns the string representation -func (s CreateDistributionWithTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDistributionWithTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDistributionWithTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDistributionWithTagsInput"} - if s.DistributionConfigWithTags == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionConfigWithTags")) - } - if s.DistributionConfigWithTags != nil { - if err := s.DistributionConfigWithTags.Validate(); err != nil { - invalidParams.AddNested("DistributionConfigWithTags", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionConfigWithTags sets the DistributionConfigWithTags field's value. -func (s *CreateDistributionWithTagsInput) SetDistributionConfigWithTags(v *DistributionConfigWithTags) *CreateDistributionWithTagsInput { - s.DistributionConfigWithTags = v - return s -} - -// The returned result of the corresponding request. -type CreateDistributionWithTagsOutput struct { - _ struct{} `type:"structure" payload:"Distribution"` - - // The distribution's information. - Distribution *Distribution `type:"structure"` - - // The current version of the distribution created. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the new distribution resource just created. For - // example: https://cloudfront.amazonaws.com/2010-11-01/distribution/EDFDVBD632BHDS5. - Location *string `location:"header" locationName:"Location" type:"string"` -} - -// String returns the string representation -func (s CreateDistributionWithTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDistributionWithTagsOutput) GoString() string { - return s.String() -} - -// SetDistribution sets the Distribution field's value. -func (s *CreateDistributionWithTagsOutput) SetDistribution(v *Distribution) *CreateDistributionWithTagsOutput { - s.Distribution = v - return s -} - -// SetETag sets the ETag field's value. -func (s *CreateDistributionWithTagsOutput) SetETag(v string) *CreateDistributionWithTagsOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateDistributionWithTagsOutput) SetLocation(v string) *CreateDistributionWithTagsOutput { - s.Location = &v - return s -} - -type CreateFieldLevelEncryptionConfigInput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionConfig"` - - // The request to create a new field-level encryption configuration. - // - // FieldLevelEncryptionConfig is a required field - FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` -} - -// String returns the string representation -func (s CreateFieldLevelEncryptionConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFieldLevelEncryptionConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFieldLevelEncryptionConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFieldLevelEncryptionConfigInput"} - if s.FieldLevelEncryptionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionConfig")) - } - if s.FieldLevelEncryptionConfig != nil { - if err := s.FieldLevelEncryptionConfig.Validate(); err != nil { - invalidParams.AddNested("FieldLevelEncryptionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value. -func (s *CreateFieldLevelEncryptionConfigInput) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *CreateFieldLevelEncryptionConfigInput { - s.FieldLevelEncryptionConfig = v - return s -} - -type CreateFieldLevelEncryptionConfigOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryption"` - - // The current version of the field level encryption configuration. For example: - // E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Returned when you create a new field-level encryption configuration. - FieldLevelEncryption *FieldLevelEncryption `type:"structure"` - - // The fully qualified URI of the new configuration resource just created. For - // example: https://cloudfront.amazonaws.com/2010-11-01/field-level-encryption-config/EDFDVBD632BHDS5. - Location *string `location:"header" locationName:"Location" type:"string"` -} - -// String returns the string representation -func (s CreateFieldLevelEncryptionConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFieldLevelEncryptionConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateFieldLevelEncryptionConfigOutput) SetETag(v string) *CreateFieldLevelEncryptionConfigOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryption sets the FieldLevelEncryption field's value. -func (s *CreateFieldLevelEncryptionConfigOutput) SetFieldLevelEncryption(v *FieldLevelEncryption) *CreateFieldLevelEncryptionConfigOutput { - s.FieldLevelEncryption = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateFieldLevelEncryptionConfigOutput) SetLocation(v string) *CreateFieldLevelEncryptionConfigOutput { - s.Location = &v - return s -} - -type CreateFieldLevelEncryptionProfileInput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfileConfig"` - - // The request to create a field-level encryption profile. - // - // FieldLevelEncryptionProfileConfig is a required field - FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` -} - -// String returns the string representation -func (s CreateFieldLevelEncryptionProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFieldLevelEncryptionProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFieldLevelEncryptionProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFieldLevelEncryptionProfileInput"} - if s.FieldLevelEncryptionProfileConfig == nil { - invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionProfileConfig")) - } - if s.FieldLevelEncryptionProfileConfig != nil { - if err := s.FieldLevelEncryptionProfileConfig.Validate(); err != nil { - invalidParams.AddNested("FieldLevelEncryptionProfileConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value. -func (s *CreateFieldLevelEncryptionProfileInput) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *CreateFieldLevelEncryptionProfileInput { - s.FieldLevelEncryptionProfileConfig = v - return s -} - -type CreateFieldLevelEncryptionProfileOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfile"` - - // The current version of the field level encryption profile. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Returned when you create a new field-level encryption profile. - FieldLevelEncryptionProfile *FieldLevelEncryptionProfile `type:"structure"` - - // The fully qualified URI of the new profile resource just created. For example: - // https://cloudfront.amazonaws.com/2010-11-01/field-level-encryption-profile/EDFDVBD632BHDS5. - Location *string `location:"header" locationName:"Location" type:"string"` -} - -// String returns the string representation -func (s CreateFieldLevelEncryptionProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFieldLevelEncryptionProfileOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateFieldLevelEncryptionProfileOutput) SetETag(v string) *CreateFieldLevelEncryptionProfileOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryptionProfile sets the FieldLevelEncryptionProfile field's value. -func (s *CreateFieldLevelEncryptionProfileOutput) SetFieldLevelEncryptionProfile(v *FieldLevelEncryptionProfile) *CreateFieldLevelEncryptionProfileOutput { - s.FieldLevelEncryptionProfile = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateFieldLevelEncryptionProfileOutput) SetLocation(v string) *CreateFieldLevelEncryptionProfileOutput { - s.Location = &v - return s -} - -// The request to create an invalidation. -type CreateInvalidationInput struct { - _ struct{} `type:"structure" payload:"InvalidationBatch"` - - // The distribution's id. - // - // DistributionId is a required field - DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"` - - // The batch information for the invalidation. - // - // InvalidationBatch is a required field - InvalidationBatch *InvalidationBatch `locationName:"InvalidationBatch" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` -} - -// String returns the string representation -func (s CreateInvalidationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInvalidationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInvalidationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInvalidationInput"} - if s.DistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionId")) - } - if s.DistributionId != nil && len(*s.DistributionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1)) - } - if s.InvalidationBatch == nil { - invalidParams.Add(request.NewErrParamRequired("InvalidationBatch")) - } - if s.InvalidationBatch != nil { - if err := s.InvalidationBatch.Validate(); err != nil { - invalidParams.AddNested("InvalidationBatch", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionId sets the DistributionId field's value. -func (s *CreateInvalidationInput) SetDistributionId(v string) *CreateInvalidationInput { - s.DistributionId = &v - return s -} - -// SetInvalidationBatch sets the InvalidationBatch field's value. -func (s *CreateInvalidationInput) SetInvalidationBatch(v *InvalidationBatch) *CreateInvalidationInput { - s.InvalidationBatch = v - return s -} - -// The returned result of the corresponding request. -type CreateInvalidationOutput struct { - _ struct{} `type:"structure" payload:"Invalidation"` - - // The invalidation's information. - Invalidation *Invalidation `type:"structure"` - - // The fully qualified URI of the distribution and invalidation batch request, - // including the Invalidation ID. - Location *string `location:"header" locationName:"Location" type:"string"` -} - -// String returns the string representation -func (s CreateInvalidationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInvalidationOutput) GoString() string { - return s.String() -} - -// SetInvalidation sets the Invalidation field's value. -func (s *CreateInvalidationOutput) SetInvalidation(v *Invalidation) *CreateInvalidationOutput { - s.Invalidation = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateInvalidationOutput) SetLocation(v string) *CreateInvalidationOutput { - s.Location = &v - return s -} - -type CreatePublicKeyInput struct { - _ struct{} `type:"structure" payload:"PublicKeyConfig"` - - // The request to add a public key to CloudFront. - // - // PublicKeyConfig is a required field - PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` -} - -// String returns the string representation -func (s CreatePublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePublicKeyInput"} - if s.PublicKeyConfig == nil { - invalidParams.Add(request.NewErrParamRequired("PublicKeyConfig")) - } - if s.PublicKeyConfig != nil { - if err := s.PublicKeyConfig.Validate(); err != nil { - invalidParams.AddNested("PublicKeyConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPublicKeyConfig sets the PublicKeyConfig field's value. -func (s *CreatePublicKeyInput) SetPublicKeyConfig(v *PublicKeyConfig) *CreatePublicKeyInput { - s.PublicKeyConfig = v - return s -} - -type CreatePublicKeyOutput struct { - _ struct{} `type:"structure" payload:"PublicKey"` - - // The current version of the public key. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the new public key resource just created. For - // example: https://cloudfront.amazonaws.com/2010-11-01/cloudfront-public-key/EDFDVBD632BHDS5. - Location *string `location:"header" locationName:"Location" type:"string"` - - // Returned when you add a public key. - PublicKey *PublicKey `type:"structure"` -} - -// String returns the string representation -func (s CreatePublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePublicKeyOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreatePublicKeyOutput) SetETag(v string) *CreatePublicKeyOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreatePublicKeyOutput) SetLocation(v string) *CreatePublicKeyOutput { - s.Location = &v - return s -} - -// SetPublicKey sets the PublicKey field's value. -func (s *CreatePublicKeyOutput) SetPublicKey(v *PublicKey) *CreatePublicKeyOutput { - s.PublicKey = v - return s -} - -// The request to create a new streaming distribution. -type CreateStreamingDistributionInput struct { - _ struct{} `type:"structure" payload:"StreamingDistributionConfig"` - - // The streaming distribution's configuration information. - // - // StreamingDistributionConfig is a required field - StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` -} - -// String returns the string representation -func (s CreateStreamingDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStreamingDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStreamingDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionInput"} - if s.StreamingDistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig")) - } - if s.StreamingDistributionConfig != nil { - if err := s.StreamingDistributionConfig.Validate(); err != nil { - invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value. -func (s *CreateStreamingDistributionInput) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *CreateStreamingDistributionInput { - s.StreamingDistributionConfig = v - return s -} - -// The returned result of the corresponding request. -type CreateStreamingDistributionOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistribution"` - - // The current version of the streaming distribution created. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the new streaming distribution resource just created. - // For example: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8. - Location *string `location:"header" locationName:"Location" type:"string"` - - // The streaming distribution's information. - StreamingDistribution *StreamingDistribution `type:"structure"` -} - -// String returns the string representation -func (s CreateStreamingDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStreamingDistributionOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateStreamingDistributionOutput) SetETag(v string) *CreateStreamingDistributionOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateStreamingDistributionOutput) SetLocation(v string) *CreateStreamingDistributionOutput { - s.Location = &v - return s -} - -// SetStreamingDistribution sets the StreamingDistribution field's value. -func (s *CreateStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDistribution) *CreateStreamingDistributionOutput { - s.StreamingDistribution = v - return s -} - -// The request to create a new streaming distribution with tags. -type CreateStreamingDistributionWithTagsInput struct { - _ struct{} `type:"structure" payload:"StreamingDistributionConfigWithTags"` - - // The streaming distribution's configuration information. - // - // StreamingDistributionConfigWithTags is a required field - StreamingDistributionConfigWithTags *StreamingDistributionConfigWithTags `locationName:"StreamingDistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` -} - -// String returns the string representation -func (s CreateStreamingDistributionWithTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStreamingDistributionWithTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStreamingDistributionWithTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionWithTagsInput"} - if s.StreamingDistributionConfigWithTags == nil { - invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfigWithTags")) - } - if s.StreamingDistributionConfigWithTags != nil { - if err := s.StreamingDistributionConfigWithTags.Validate(); err != nil { - invalidParams.AddNested("StreamingDistributionConfigWithTags", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStreamingDistributionConfigWithTags sets the StreamingDistributionConfigWithTags field's value. -func (s *CreateStreamingDistributionWithTagsInput) SetStreamingDistributionConfigWithTags(v *StreamingDistributionConfigWithTags) *CreateStreamingDistributionWithTagsInput { - s.StreamingDistributionConfigWithTags = v - return s -} - -// The returned result of the corresponding request. -type CreateStreamingDistributionWithTagsOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistribution"` - - // The current version of the distribution created. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the new streaming distribution resource just created. - // For example: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8. - Location *string `location:"header" locationName:"Location" type:"string"` - - // The streaming distribution's information. - StreamingDistribution *StreamingDistribution `type:"structure"` -} - -// String returns the string representation -func (s CreateStreamingDistributionWithTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStreamingDistributionWithTagsOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateStreamingDistributionWithTagsOutput) SetETag(v string) *CreateStreamingDistributionWithTagsOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateStreamingDistributionWithTagsOutput) SetLocation(v string) *CreateStreamingDistributionWithTagsOutput { - s.Location = &v - return s -} - -// SetStreamingDistribution sets the StreamingDistribution field's value. -func (s *CreateStreamingDistributionWithTagsOutput) SetStreamingDistribution(v *StreamingDistribution) *CreateStreamingDistributionWithTagsOutput { - s.StreamingDistribution = v - return s -} - -// A complex type that controls: -// -// * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range -// with custom error messages before returning the response to the viewer. -// -// -// * How long CloudFront caches HTTP status codes in the 4xx and 5xx range. -// -// For more information about custom error pages, see Customizing Error Responses -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) -// in the Amazon CloudFront Developer Guide. -type CustomErrorResponse struct { - _ struct{} `type:"structure"` - - // The minimum amount of time, in seconds, that you want CloudFront to cache - // the HTTP status code specified in ErrorCode. When this time period has elapsed, - // CloudFront queries your origin to see whether the problem that caused the - // error has been resolved and the requested object is now available. - // - // If you don't want to specify a value, include an empty element, , - // in the XML document. - // - // For more information, see Customizing Error Responses (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) - // in the Amazon CloudFront Developer Guide. - ErrorCachingMinTTL *int64 `type:"long"` - - // The HTTP status code for which you want to specify a custom error page and/or - // a caching duration. - // - // ErrorCode is a required field - ErrorCode *int64 `type:"integer" required:"true"` - - // The HTTP status code that you want CloudFront to return to the viewer along - // with the custom error page. There are a variety of reasons that you might - // want CloudFront to return a status code different from the status code that - // your origin returned to CloudFront, for example: - // - // * Some Internet devices (some firewalls and corporate proxies, for example) - // intercept HTTP 4xx and 5xx and prevent the response from being returned - // to the viewer. If you substitute 200, the response typically won't be - // intercepted. - // - // * If you don't care about distinguishing among different client errors - // or server errors, you can specify 400 or 500 as the ResponseCode for all - // 4xx or 5xx errors. - // - // * You might want to return a 200 status code (OK) and static website so - // your customers don't know that your website is down. - // - // If you specify a value for ResponseCode, you must also specify a value for - // ResponsePagePath. If you don't want to specify a value, include an empty - // element, , in the XML document. - ResponseCode *string `type:"string"` - - // The path to the custom error page that you want CloudFront to return to a - // viewer when your origin returns the HTTP status code specified by ErrorCode, - // for example, /4xx-errors/403-forbidden.html. If you want to store your objects - // and your custom error pages in different locations, your distribution must - // include a cache behavior for which the following is true: - // - // * The value of PathPattern matches the path to your custom error messages. - // For example, suppose you saved custom error pages for 4xx errors in an - // Amazon S3 bucket in a directory named /4xx-errors. Your distribution must - // include a cache behavior for which the path pattern routes requests for - // your custom error pages to that location, for example, /4xx-errors/*. - // - // - // * The value of TargetOriginId specifies the value of the ID element for - // the origin that contains your custom error pages. - // - // If you specify a value for ResponsePagePath, you must also specify a value - // for ResponseCode. If you don't want to specify a value, include an empty - // element, , in the XML document. - // - // We recommend that you store custom error pages in an Amazon S3 bucket. If - // you store custom error pages on an HTTP server and the server starts to return - // 5xx errors, CloudFront can't get the files that you want to return to viewers - // because the origin server is unavailable. - ResponsePagePath *string `type:"string"` -} - -// String returns the string representation -func (s CustomErrorResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CustomErrorResponse) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomErrorResponse) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponse"} - if s.ErrorCode == nil { - invalidParams.Add(request.NewErrParamRequired("ErrorCode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetErrorCachingMinTTL sets the ErrorCachingMinTTL field's value. -func (s *CustomErrorResponse) SetErrorCachingMinTTL(v int64) *CustomErrorResponse { - s.ErrorCachingMinTTL = &v - return s -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *CustomErrorResponse) SetErrorCode(v int64) *CustomErrorResponse { - s.ErrorCode = &v - return s -} - -// SetResponseCode sets the ResponseCode field's value. -func (s *CustomErrorResponse) SetResponseCode(v string) *CustomErrorResponse { - s.ResponseCode = &v - return s -} - -// SetResponsePagePath sets the ResponsePagePath field's value. -func (s *CustomErrorResponse) SetResponsePagePath(v string) *CustomErrorResponse { - s.ResponsePagePath = &v - return s -} - -// A complex type that controls: -// -// * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range -// with custom error messages before returning the response to the viewer. -// -// * How long CloudFront caches HTTP status codes in the 4xx and 5xx range. -// -// For more information about custom error pages, see Customizing Error Responses -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) -// in the Amazon CloudFront Developer Guide. -type CustomErrorResponses struct { - _ struct{} `type:"structure"` - - // A complex type that contains a CustomErrorResponse element for each HTTP - // status code for which you want to specify a custom error page and/or a caching - // duration. - Items []*CustomErrorResponse `locationNameList:"CustomErrorResponse" type:"list"` - - // The number of HTTP status codes for which you want to specify a custom error - // page and/or a caching duration. If Quantity is 0, you can omit Items. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s CustomErrorResponses) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CustomErrorResponses) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomErrorResponses) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponses"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *CustomErrorResponses) SetItems(v []*CustomErrorResponse) *CustomErrorResponses { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *CustomErrorResponses) SetQuantity(v int64) *CustomErrorResponses { - s.Quantity = &v - return s -} - -// A complex type that contains the list of Custom Headers for each origin. -type CustomHeaders struct { - _ struct{} `type:"structure"` - - // Optional: A list that contains one OriginCustomHeader element for each custom - // header that you want CloudFront to forward to the origin. If Quantity is - // 0, omit Items. - Items []*OriginCustomHeader `locationNameList:"OriginCustomHeader" type:"list"` - - // The number of custom headers, if any, for this distribution. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s CustomHeaders) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CustomHeaders) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomHeaders) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomHeaders"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *CustomHeaders) SetItems(v []*OriginCustomHeader) *CustomHeaders { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *CustomHeaders) SetQuantity(v int64) *CustomHeaders { - s.Quantity = &v - return s -} - -// A customer origin or an Amazon S3 bucket configured as a website endpoint. -type CustomOriginConfig struct { - _ struct{} `type:"structure"` - - // The HTTP port the custom origin listens on. - // - // HTTPPort is a required field - HTTPPort *int64 `type:"integer" required:"true"` - - // The HTTPS port the custom origin listens on. - // - // HTTPSPort is a required field - HTTPSPort *int64 `type:"integer" required:"true"` - - // You can create a custom keep-alive timeout. All timeout units are in seconds. - // The default keep-alive timeout is 5 seconds, but you can configure custom - // timeout lengths using the CloudFront API. The minimum timeout length is 1 - // second; the maximum is 60 seconds. - // - // If you need to increase the maximum time limit, contact the AWS Support Center - // (https://console.aws.amazon.com/support/home#/). - OriginKeepaliveTimeout *int64 `type:"integer"` - - // The origin protocol policy to apply to your origin. - // - // OriginProtocolPolicy is a required field - OriginProtocolPolicy *string `type:"string" required:"true" enum:"OriginProtocolPolicy"` - - // You can create a custom origin read timeout. All timeout units are in seconds. - // The default origin read timeout is 30 seconds, but you can configure custom - // timeout lengths using the CloudFront API. The minimum timeout length is 4 - // seconds; the maximum is 60 seconds. - // - // If you need to increase the maximum time limit, contact the AWS Support Center - // (https://console.aws.amazon.com/support/home#/). - OriginReadTimeout *int64 `type:"integer"` - - // The SSL/TLS protocols that you want CloudFront to use when communicating - // with your origin over HTTPS. - OriginSslProtocols *OriginSslProtocols `type:"structure"` -} - -// String returns the string representation -func (s CustomOriginConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CustomOriginConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomOriginConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomOriginConfig"} - if s.HTTPPort == nil { - invalidParams.Add(request.NewErrParamRequired("HTTPPort")) - } - if s.HTTPSPort == nil { - invalidParams.Add(request.NewErrParamRequired("HTTPSPort")) - } - if s.OriginProtocolPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("OriginProtocolPolicy")) - } - if s.OriginSslProtocols != nil { - if err := s.OriginSslProtocols.Validate(); err != nil { - invalidParams.AddNested("OriginSslProtocols", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHTTPPort sets the HTTPPort field's value. -func (s *CustomOriginConfig) SetHTTPPort(v int64) *CustomOriginConfig { - s.HTTPPort = &v - return s -} - -// SetHTTPSPort sets the HTTPSPort field's value. -func (s *CustomOriginConfig) SetHTTPSPort(v int64) *CustomOriginConfig { - s.HTTPSPort = &v - return s -} - -// SetOriginKeepaliveTimeout sets the OriginKeepaliveTimeout field's value. -func (s *CustomOriginConfig) SetOriginKeepaliveTimeout(v int64) *CustomOriginConfig { - s.OriginKeepaliveTimeout = &v - return s -} - -// SetOriginProtocolPolicy sets the OriginProtocolPolicy field's value. -func (s *CustomOriginConfig) SetOriginProtocolPolicy(v string) *CustomOriginConfig { - s.OriginProtocolPolicy = &v - return s -} - -// SetOriginReadTimeout sets the OriginReadTimeout field's value. -func (s *CustomOriginConfig) SetOriginReadTimeout(v int64) *CustomOriginConfig { - s.OriginReadTimeout = &v - return s -} - -// SetOriginSslProtocols sets the OriginSslProtocols field's value. -func (s *CustomOriginConfig) SetOriginSslProtocols(v *OriginSslProtocols) *CustomOriginConfig { - s.OriginSslProtocols = v - return s -} - -// A complex type that describes the default cache behavior if you don't specify -// a CacheBehavior element or if files don't match any of the values of PathPattern -// in CacheBehavior elements. You must create exactly one default cache behavior. -type DefaultCacheBehavior struct { - _ struct{} `type:"structure"` - - // A complex type that controls which HTTP methods CloudFront processes and - // forwards to your Amazon S3 bucket or your custom origin. There are three - // choices: - // - // * CloudFront forwards only GET and HEAD requests. - // - // * CloudFront forwards only GET, HEAD, and OPTIONS requests. - // - // * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE - // requests. - // - // If you pick the third choice, you may need to restrict access to your Amazon - // S3 bucket or to your custom origin so users can't perform operations that - // you don't want them to. For example, you might not want users to have permissions - // to delete objects from your origin. - AllowedMethods *AllowedMethods `type:"structure"` - - // Whether you want CloudFront to automatically compress certain files for this - // cache behavior. If so, specify true; if not, specify false. For more information, - // see Serving Compressed Files (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) - // in the Amazon CloudFront Developer Guide. - Compress *bool `type:"boolean"` - - // The default amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. The value that you specify applies only when - // your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control - // s-maxage, and Expires to objects. For more information, see Specifying How - // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - DefaultTTL *int64 `type:"long"` - - // The value of ID for the field-level encryption configuration that you want - // CloudFront to use for encrypting specific fields of data for a cache behavior - // or for the default cache behavior in your distribution. - FieldLevelEncryptionId *string `type:"string"` - - // A complex type that specifies how CloudFront handles query strings and cookies. - // - // ForwardedValues is a required field - ForwardedValues *ForwardedValues `type:"structure" required:"true"` - - // A complex type that contains zero or more Lambda function associations for - // a cache behavior. - LambdaFunctionAssociations *LambdaFunctionAssociations `type:"structure"` - - MaxTTL *int64 `type:"long"` - - // The minimum amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. For more information, see Specifying How Long - // Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon Amazon CloudFront Developer Guide. - // - // You must specify 0 for MinTTL if you configure CloudFront to forward all - // headers to your origin (under Headers, if you specify 1 for Quantity and - // * for Name). - // - // MinTTL is a required field - MinTTL *int64 `type:"long" required:"true"` - - // Indicates whether you want to distribute media files in the Microsoft Smooth - // Streaming format using the origin that is associated with this cache behavior. - // If so, specify true; if not, specify false. If you specify true for SmoothStreaming, - // you can still distribute other content using this cache behavior if the content - // matches the value of PathPattern. - SmoothStreaming *bool `type:"boolean"` - - // The value of ID for the origin that you want CloudFront to route requests - // to when a request matches the path pattern either for a cache behavior or - // for the default cache behavior in your distribution. - // - // TargetOriginId is a required field - TargetOriginId *string `type:"string" required:"true"` - - // A complex type that specifies the AWS accounts, if any, that you want to - // allow to create signed URLs for private content. - // - // If you want to require signed URLs in requests for objects in the target - // origin that match the PathPattern for this cache behavior, specify true for - // Enabled, and specify the applicable values for Quantity and Items. For more - // information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon Amazon CloudFront Developer Guide. - // - // If you don't want to require signed URLs in requests for objects that match - // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items. - // - // To add, change, or remove one or more trusted signers, change Enabled to - // true (if it's currently false), change Quantity as applicable, and specify - // all of the trusted signers that you want to include in the updated distribution. - // - // TrustedSigners is a required field - TrustedSigners *TrustedSigners `type:"structure" required:"true"` - - // The protocol that viewers can use to access the files in the origin specified - // by TargetOriginId when a request matches the path pattern in PathPattern. - // You can specify the following options: - // - // * allow-all: Viewers can use HTTP or HTTPS. - // - // * redirect-to-https: If a viewer submits an HTTP request, CloudFront returns - // an HTTP status code of 301 (Moved Permanently) to the viewer along with - // the HTTPS URL. The viewer then resubmits the request using the new URL. - // - // * https-only: If a viewer sends an HTTP request, CloudFront returns an - // HTTP status code of 403 (Forbidden). - // - // For more information about requiring the HTTPS protocol, see Using an HTTPS - // Connection to Access Your Objects (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html) - // in the Amazon CloudFront Developer Guide. - // - // The only way to guarantee that viewers retrieve an object that was fetched - // from the origin using HTTPS is never to use any other protocol to fetch the - // object. If you have recently changed from HTTP to HTTPS, we recommend that - // you clear your objects' cache because cached objects are protocol agnostic. - // That means that an edge location will return an object from the cache regardless - // of whether the current request protocol matches the protocol used previously. - // For more information, see Specifying How Long Objects and Errors Stay in - // a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - // - // ViewerProtocolPolicy is a required field - ViewerProtocolPolicy *string `type:"string" required:"true" enum:"ViewerProtocolPolicy"` -} - -// String returns the string representation -func (s DefaultCacheBehavior) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DefaultCacheBehavior) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DefaultCacheBehavior) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DefaultCacheBehavior"} - if s.ForwardedValues == nil { - invalidParams.Add(request.NewErrParamRequired("ForwardedValues")) - } - if s.MinTTL == nil { - invalidParams.Add(request.NewErrParamRequired("MinTTL")) - } - if s.TargetOriginId == nil { - invalidParams.Add(request.NewErrParamRequired("TargetOriginId")) - } - if s.TrustedSigners == nil { - invalidParams.Add(request.NewErrParamRequired("TrustedSigners")) - } - if s.ViewerProtocolPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy")) - } - if s.AllowedMethods != nil { - if err := s.AllowedMethods.Validate(); err != nil { - invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams)) - } - } - if s.ForwardedValues != nil { - if err := s.ForwardedValues.Validate(); err != nil { - invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams)) - } - } - if s.LambdaFunctionAssociations != nil { - if err := s.LambdaFunctionAssociations.Validate(); err != nil { - invalidParams.AddNested("LambdaFunctionAssociations", err.(request.ErrInvalidParams)) - } - } - if s.TrustedSigners != nil { - if err := s.TrustedSigners.Validate(); err != nil { - invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowedMethods sets the AllowedMethods field's value. -func (s *DefaultCacheBehavior) SetAllowedMethods(v *AllowedMethods) *DefaultCacheBehavior { - s.AllowedMethods = v - return s -} - -// SetCompress sets the Compress field's value. -func (s *DefaultCacheBehavior) SetCompress(v bool) *DefaultCacheBehavior { - s.Compress = &v - return s -} - -// SetDefaultTTL sets the DefaultTTL field's value. -func (s *DefaultCacheBehavior) SetDefaultTTL(v int64) *DefaultCacheBehavior { - s.DefaultTTL = &v - return s -} - -// SetFieldLevelEncryptionId sets the FieldLevelEncryptionId field's value. -func (s *DefaultCacheBehavior) SetFieldLevelEncryptionId(v string) *DefaultCacheBehavior { - s.FieldLevelEncryptionId = &v - return s -} - -// SetForwardedValues sets the ForwardedValues field's value. -func (s *DefaultCacheBehavior) SetForwardedValues(v *ForwardedValues) *DefaultCacheBehavior { - s.ForwardedValues = v - return s -} - -// SetLambdaFunctionAssociations sets the LambdaFunctionAssociations field's value. -func (s *DefaultCacheBehavior) SetLambdaFunctionAssociations(v *LambdaFunctionAssociations) *DefaultCacheBehavior { - s.LambdaFunctionAssociations = v - return s -} - -// SetMaxTTL sets the MaxTTL field's value. -func (s *DefaultCacheBehavior) SetMaxTTL(v int64) *DefaultCacheBehavior { - s.MaxTTL = &v - return s -} - -// SetMinTTL sets the MinTTL field's value. -func (s *DefaultCacheBehavior) SetMinTTL(v int64) *DefaultCacheBehavior { - s.MinTTL = &v - return s -} - -// SetSmoothStreaming sets the SmoothStreaming field's value. -func (s *DefaultCacheBehavior) SetSmoothStreaming(v bool) *DefaultCacheBehavior { - s.SmoothStreaming = &v - return s -} - -// SetTargetOriginId sets the TargetOriginId field's value. -func (s *DefaultCacheBehavior) SetTargetOriginId(v string) *DefaultCacheBehavior { - s.TargetOriginId = &v - return s -} - -// SetTrustedSigners sets the TrustedSigners field's value. -func (s *DefaultCacheBehavior) SetTrustedSigners(v *TrustedSigners) *DefaultCacheBehavior { - s.TrustedSigners = v - return s -} - -// SetViewerProtocolPolicy sets the ViewerProtocolPolicy field's value. -func (s *DefaultCacheBehavior) SetViewerProtocolPolicy(v string) *DefaultCacheBehavior { - s.ViewerProtocolPolicy = &v - return s -} - -// Deletes a origin access identity. -type DeleteCloudFrontOriginAccessIdentityInput struct { - _ struct{} `type:"structure"` - - // The origin access identity's ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header you received from a previous GET or PUT request. - // For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` -} - -// String returns the string representation -func (s DeleteCloudFrontOriginAccessIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCloudFrontOriginAccessIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCloudFrontOriginAccessIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCloudFrontOriginAccessIdentityInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteCloudFrontOriginAccessIdentityInput) SetId(v string) *DeleteCloudFrontOriginAccessIdentityInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteCloudFrontOriginAccessIdentityInput) SetIfMatch(v string) *DeleteCloudFrontOriginAccessIdentityInput { - s.IfMatch = &v - return s -} - -type DeleteCloudFrontOriginAccessIdentityOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCloudFrontOriginAccessIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCloudFrontOriginAccessIdentityOutput) GoString() string { - return s.String() -} - -// This action deletes a web distribution. To delete a web distribution using -// the CloudFront API, perform the following steps. -// -// To delete a web distribution using the CloudFront API: -// -// Disable the web distribution -// -// Submit a GET Distribution Config request to get the current configuration -// and the Etag header for the distribution. -// -// Update the XML document that was returned in the response to your GET Distribution -// Config request to change the value of Enabled to false. -// -// Submit a PUT Distribution Config request to update the configuration for -// your distribution. In the request body, include the XML document that you -// updated in Step 3. Set the value of the HTTP If-Match header to the value -// of the ETag header that CloudFront returned when you submitted the GET Distribution -// Config request in Step 2. -// -// Review the response to the PUT Distribution Config request to confirm that -// the distribution was successfully disabled. -// -// Submit a GET Distribution request to confirm that your changes have propagated. -// When propagation is complete, the value of Status is Deployed. -// -// Submit a DELETE Distribution request. Set the value of the HTTP If-Match -// header to the value of the ETag header that CloudFront returned when you -// submitted the GET Distribution Config request in Step 6. -// -// Review the response to your DELETE Distribution request to confirm that the -// distribution was successfully deleted. -// -// For information about deleting a distribution using the CloudFront console, -// see Deleting a Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html) -// in the Amazon CloudFront Developer Guide. -type DeleteDistributionInput struct { - _ struct{} `type:"structure"` - - // The distribution ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when you disabled the distribution. - // For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` -} - -// String returns the string representation -func (s DeleteDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDistributionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteDistributionInput) SetId(v string) *DeleteDistributionInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteDistributionInput) SetIfMatch(v string) *DeleteDistributionInput { - s.IfMatch = &v - return s -} - -type DeleteDistributionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDistributionOutput) GoString() string { - return s.String() -} - -type DeleteFieldLevelEncryptionConfigInput struct { - _ struct{} `type:"structure"` - - // The ID of the configuration you want to delete from CloudFront. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the configuration - // identity to delete. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` -} - -// String returns the string representation -func (s DeleteFieldLevelEncryptionConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFieldLevelEncryptionConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFieldLevelEncryptionConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFieldLevelEncryptionConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteFieldLevelEncryptionConfigInput) SetId(v string) *DeleteFieldLevelEncryptionConfigInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteFieldLevelEncryptionConfigInput) SetIfMatch(v string) *DeleteFieldLevelEncryptionConfigInput { - s.IfMatch = &v - return s -} - -type DeleteFieldLevelEncryptionConfigOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteFieldLevelEncryptionConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFieldLevelEncryptionConfigOutput) GoString() string { - return s.String() -} - -type DeleteFieldLevelEncryptionProfileInput struct { - _ struct{} `type:"structure"` - - // Request the ID of the profile you want to delete from CloudFront. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the profile - // to delete. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` -} - -// String returns the string representation -func (s DeleteFieldLevelEncryptionProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFieldLevelEncryptionProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFieldLevelEncryptionProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFieldLevelEncryptionProfileInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteFieldLevelEncryptionProfileInput) SetId(v string) *DeleteFieldLevelEncryptionProfileInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteFieldLevelEncryptionProfileInput) SetIfMatch(v string) *DeleteFieldLevelEncryptionProfileInput { - s.IfMatch = &v - return s -} - -type DeleteFieldLevelEncryptionProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteFieldLevelEncryptionProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFieldLevelEncryptionProfileOutput) GoString() string { - return s.String() -} - -type DeletePublicKeyInput struct { - _ struct{} `type:"structure"` - - // The ID of the public key you want to remove from CloudFront. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the public - // key identity to delete. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` -} - -// String returns the string representation -func (s DeletePublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePublicKeyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeletePublicKeyInput) SetId(v string) *DeletePublicKeyInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeletePublicKeyInput) SetIfMatch(v string) *DeletePublicKeyInput { - s.IfMatch = &v - return s -} - -type DeletePublicKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePublicKeyOutput) GoString() string { - return s.String() -} - -// The request to delete a streaming distribution. -type DeleteStreamingDistributionInput struct { - _ struct{} `type:"structure"` - - // The distribution ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when you disabled the streaming - // distribution. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` -} - -// String returns the string representation -func (s DeleteStreamingDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStreamingDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteStreamingDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteStreamingDistributionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteStreamingDistributionInput) SetId(v string) *DeleteStreamingDistributionInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteStreamingDistributionInput) SetIfMatch(v string) *DeleteStreamingDistributionInput { - s.IfMatch = &v - return s -} - -type DeleteStreamingDistributionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteStreamingDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStreamingDistributionOutput) GoString() string { - return s.String() -} - -// The distribution's information. -type Distribution struct { - _ struct{} `type:"structure"` - - // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, - // where 123456789012 is your AWS account ID. - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // CloudFront automatically adds this element to the response only if you've - // set up the distribution to serve private content with signed URLs. The element - // lists the key pair IDs that CloudFront is aware of for each trusted signer. - // The Signer child element lists the AWS account number of the trusted signer - // (or an empty Self element if the signer is you). The Signer element also - // includes the IDs of any active key pairs associated with the trusted signer's - // AWS account. If no KeyPairId element appears for a Signer, that signer can't - // create working signed URLs. - // - // ActiveTrustedSigners is a required field - ActiveTrustedSigners *ActiveTrustedSigners `type:"structure" required:"true"` - - // The current configuration information for the distribution. Send a GET request - // to the /CloudFront API version/distribution ID/config resource. - // - // DistributionConfig is a required field - DistributionConfig *DistributionConfig `type:"structure" required:"true"` - - // The domain name corresponding to the distribution, for example, d111111abcdef8.cloudfront.net. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // The identifier for the distribution. For example: EDFDVBD632BHDS5. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The number of invalidation batches currently in progress. - // - // InProgressInvalidationBatches is a required field - InProgressInvalidationBatches *int64 `type:"integer" required:"true"` - - // The date and time the distribution was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // This response element indicates the current status of the distribution. When - // the status is Deployed, the distribution's information is fully propagated - // to all CloudFront edge locations. - // - // Status is a required field - Status *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Distribution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Distribution) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *Distribution) SetARN(v string) *Distribution { - s.ARN = &v - return s -} - -// SetActiveTrustedSigners sets the ActiveTrustedSigners field's value. -func (s *Distribution) SetActiveTrustedSigners(v *ActiveTrustedSigners) *Distribution { - s.ActiveTrustedSigners = v - return s -} - -// SetDistributionConfig sets the DistributionConfig field's value. -func (s *Distribution) SetDistributionConfig(v *DistributionConfig) *Distribution { - s.DistributionConfig = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *Distribution) SetDomainName(v string) *Distribution { - s.DomainName = &v - return s -} - -// SetId sets the Id field's value. -func (s *Distribution) SetId(v string) *Distribution { - s.Id = &v - return s -} - -// SetInProgressInvalidationBatches sets the InProgressInvalidationBatches field's value. -func (s *Distribution) SetInProgressInvalidationBatches(v int64) *Distribution { - s.InProgressInvalidationBatches = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *Distribution) SetLastModifiedTime(v time.Time) *Distribution { - s.LastModifiedTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Distribution) SetStatus(v string) *Distribution { - s.Status = &v - return s -} - -// A distribution configuration. -type DistributionConfig struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about CNAMEs (alternate domain names), - // if any, for this distribution. - Aliases *Aliases `type:"structure"` - - // A complex type that contains zero or more CacheBehavior elements. - CacheBehaviors *CacheBehaviors `type:"structure"` - - // A unique value (for example, a date-time stamp) that ensures that the request - // can't be replayed. - // - // If the value of CallerReference is new (regardless of the content of the - // DistributionConfig object), CloudFront creates a new distribution. - // - // If CallerReference is a value that you already sent in a previous request - // to create a distribution, CloudFront returns a DistributionAlreadyExists - // error. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // Any comments you want to include about the distribution. - // - // If you don't want to specify a comment, include an empty Comment element. - // - // To delete an existing comment, update the distribution configuration and - // include an empty Comment element. - // - // To add or change a comment, update the distribution configuration and specify - // the new comment. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` - - // A complex type that controls the following: - // - // * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range - // with custom error messages before returning the response to the viewer. - // - // * How long CloudFront caches HTTP status codes in the 4xx and 5xx range. - // - // For more information about custom error pages, see Customizing Error Responses - // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) - // in the Amazon CloudFront Developer Guide. - CustomErrorResponses *CustomErrorResponses `type:"structure"` - - // A complex type that describes the default cache behavior if you don't specify - // a CacheBehavior element or if files don't match any of the values of PathPattern - // in CacheBehavior elements. You must create exactly one default cache behavior. - // - // DefaultCacheBehavior is a required field - DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"` - - // The object that you want CloudFront to request from your origin (for example, - // index.html) when a viewer requests the root URL for your distribution (http://www.example.com) - // instead of an object in your distribution (http://www.example.com/product-description.html). - // Specifying a default root object avoids exposing the contents of your distribution. - // - // Specify only the object name, for example, index.html. Don't add a / before - // the object name. - // - // If you don't want to specify a default root object when you create a distribution, - // include an empty DefaultRootObject element. - // - // To delete the default root object from an existing distribution, update the - // distribution configuration and include an empty DefaultRootObject element. - // - // To replace the default root object, update the distribution configuration - // and specify the new object. - // - // For more information about the default root object, see Creating a Default - // Root Object (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html) - // in the Amazon CloudFront Developer Guide. - DefaultRootObject *string `type:"string"` - - // From this field, you can enable or disable the selected distribution. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // (Optional) Specify the maximum HTTP version that you want viewers to use - // to communicate with CloudFront. The default value for new web distributions - // is http2. Viewers that don't support HTTP/2 automatically use an earlier - // HTTP version. - // - // For viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 or - // later, and must support Server Name Identification (SNI). - // - // In general, configuring CloudFront to communicate with viewers using HTTP/2 - // reduces latency. You can improve performance by optimizing for HTTP/2. For - // more information, do an Internet search for "http/2 optimization." - HttpVersion *string `type:"string" enum:"HttpVersion"` - - // If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address - // for your distribution, specify true. If you specify false, CloudFront responds - // to IPv6 DNS requests with the DNS response code NOERROR and with no IP addresses. - // This allows viewers to submit a second request, for an IPv4 address for your - // distribution. - // - // In general, you should enable IPv6 if you have users on IPv6 networks who - // want to access your content. However, if you're using signed URLs or signed - // cookies to restrict access to your content, and if you're using a custom - // policy that includes the IpAddress parameter to restrict the IP addresses - // that can access your content, don't enable IPv6. If you want to restrict - // access to some content by IP address and not restrict access to other content - // (or restrict access but not by IP address), you can create two distributions. - // For more information, see Creating a Signed URL Using a Custom Policy (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html) - // in the Amazon CloudFront Developer Guide. - // - // If you're using an Amazon Route 53 alias resource record set to route traffic - // to your CloudFront distribution, you need to create a second alias resource - // record set when both of the following are true: - // - // * You enable IPv6 for the distribution - // - // * You're using alternate domain names in the URLs for your objects - // - // For more information, see Routing Traffic to an Amazon CloudFront Web Distribution - // by Using Your Domain Name (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html) - // in the Amazon Route 53 Developer Guide. - // - // If you created a CNAME resource record set, either with Amazon Route 53 or - // with another DNS service, you don't need to make any changes. A CNAME record - // will route traffic to your distribution regardless of the IP address format - // of the viewer request. - IsIPV6Enabled *bool `type:"boolean"` - - // A complex type that controls whether access logs are written for the distribution. - // - // For more information about logging, see Access Logs (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) - // in the Amazon CloudFront Developer Guide. - Logging *LoggingConfig `type:"structure"` - - // A complex type that contains information about origin groups for this distribution. - OriginGroups *OriginGroups `type:"structure"` - - // A complex type that contains information about origins for this distribution. - // - // Origins is a required field - Origins *Origins `type:"structure" required:"true"` - - // The price class that corresponds with the maximum price that you want to - // pay for CloudFront service. If you specify PriceClass_All, CloudFront responds - // to requests for your objects from all CloudFront edge locations. - // - // If you specify a price class other than PriceClass_All, CloudFront serves - // your objects from the CloudFront edge location that has the lowest latency - // among the edge locations in your price class. Viewers who are in or near - // regions that are excluded from your specified price class may encounter slower - // performance. - // - // For more information about price classes, see Choosing the Price Class for - // a CloudFront Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html) - // in the Amazon CloudFront Developer Guide. For information about CloudFront - // pricing, including how price classes (such as Price Class 100) map to CloudFront - // regions, see Amazon CloudFront Pricing (https://aws.amazon.com/cloudfront/pricing/). - // For price class information, scroll down to see the table at the bottom of - // the page. - PriceClass *string `type:"string" enum:"PriceClass"` - - // A complex type that identifies ways in which you want to restrict distribution - // of your content. - Restrictions *Restrictions `type:"structure"` - - // A complex type that specifies the following: - // - // * Whether you want viewers to use HTTP or HTTPS to request your objects. - // - // * If you want viewers to use HTTPS, whether you're using an alternate - // domain name such as example.com or the CloudFront domain name for your - // distribution, such as d111111abcdef8.cloudfront.net. - // - // * If you're using an alternate domain name, whether AWS Certificate Manager - // (ACM) provided the certificate, or you purchased a certificate from a - // third-party certificate authority and imported it into ACM or uploaded - // it to the IAM certificate store. - // - // You must specify only one of the following values: - // - // * ViewerCertificate$ACMCertificateArn - // - // * ViewerCertificate$IAMCertificateId - // - // * ViewerCertificate$CloudFrontDefaultCertificate - // - // Don't specify false for CloudFrontDefaultCertificate. - // - // If you want viewers to use HTTP instead of HTTPS to request your objects: - // Specify the following value: - // - // true - // - // In addition, specify allow-all for ViewerProtocolPolicy for all of your cache - // behaviors. - // - // If you want viewers to use HTTPS to request your objects: Choose the type - // of certificate that you want to use based on whether you're using an alternate - // domain name for your objects or the CloudFront domain name: - // - // * If you're using an alternate domain name, such as example.com: Specify - // one of the following values, depending on whether ACM provided your certificate - // or you purchased your certificate from third-party certificate authority: - // - // ARN for ACM SSL/TLS certificate where - // ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate - // that you want to use for this distribution. - // - // IAM certificate ID where IAM certificate - // ID is the ID that IAM returned when you added the certificate to the IAM - // certificate store. - // - // If you specify ACMCertificateArn or IAMCertificateId, you must also specify - // a value for SSLSupportMethod. - // - // If you choose to use an ACM certificate or a certificate in the IAM certificate - // store, we recommend that you use only an alternate domain name in your - // object URLs (https://example.com/logo.jpg). If you use the domain name - // that is associated with your CloudFront distribution (such as https://d111111abcdef8.cloudfront.net/logo.jpg) - // and the viewer supports SNI, then CloudFront behaves normally. However, - // if the browser does not support SNI, the user's experience depends on - // the value that you choose for SSLSupportMethod: - // - // vip: The viewer displays a warning because there is a mismatch between the - // CloudFront domain name and the domain name in your SSL/TLS certificate. - // - // sni-only: CloudFront drops the connection with the browser without returning - // the object. - // - // * If you're using the CloudFront domain name for your distribution, such - // as d111111abcdef8.cloudfront.net: Specify the following value: - // - // true - // - // If you want viewers to use HTTPS, you must also specify one of the following - // values in your cache behaviors: - // - // * https-only - // - // * redirect-to-https - // - // You can also optionally require that CloudFront use HTTPS to communicate - // with your origin by specifying one of the following values for the applicable - // origins: - // - // * https-only - // - // * match-viewer - // - // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS) - // in the Amazon CloudFront Developer Guide. - ViewerCertificate *ViewerCertificate `type:"structure"` - - // A unique identifier that specifies the AWS WAF web ACL, if any, to associate - // with this distribution. - // - // AWS WAF is a web application firewall that lets you monitor the HTTP and - // HTTPS requests that are forwarded to CloudFront, and lets you control access - // to your content. Based on conditions that you specify, such as the IP addresses - // that requests originate from or the values of query strings, CloudFront responds - // to requests either with the requested content or with an HTTP 403 status - // code (Forbidden). You can also configure CloudFront to return a custom error - // page when a request is blocked. For more information about AWS WAF, see the - // AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html). - WebACLId *string `type:"string"` -} - -// String returns the string representation -func (s DistributionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DistributionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DistributionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DistributionConfig"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.Comment == nil { - invalidParams.Add(request.NewErrParamRequired("Comment")) - } - if s.DefaultCacheBehavior == nil { - invalidParams.Add(request.NewErrParamRequired("DefaultCacheBehavior")) - } - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.Origins == nil { - invalidParams.Add(request.NewErrParamRequired("Origins")) - } - if s.Aliases != nil { - if err := s.Aliases.Validate(); err != nil { - invalidParams.AddNested("Aliases", err.(request.ErrInvalidParams)) - } - } - if s.CacheBehaviors != nil { - if err := s.CacheBehaviors.Validate(); err != nil { - invalidParams.AddNested("CacheBehaviors", err.(request.ErrInvalidParams)) - } - } - if s.CustomErrorResponses != nil { - if err := s.CustomErrorResponses.Validate(); err != nil { - invalidParams.AddNested("CustomErrorResponses", err.(request.ErrInvalidParams)) - } - } - if s.DefaultCacheBehavior != nil { - if err := s.DefaultCacheBehavior.Validate(); err != nil { - invalidParams.AddNested("DefaultCacheBehavior", err.(request.ErrInvalidParams)) - } - } - if s.Logging != nil { - if err := s.Logging.Validate(); err != nil { - invalidParams.AddNested("Logging", err.(request.ErrInvalidParams)) - } - } - if s.OriginGroups != nil { - if err := s.OriginGroups.Validate(); err != nil { - invalidParams.AddNested("OriginGroups", err.(request.ErrInvalidParams)) - } - } - if s.Origins != nil { - if err := s.Origins.Validate(); err != nil { - invalidParams.AddNested("Origins", err.(request.ErrInvalidParams)) - } - } - if s.Restrictions != nil { - if err := s.Restrictions.Validate(); err != nil { - invalidParams.AddNested("Restrictions", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliases sets the Aliases field's value. -func (s *DistributionConfig) SetAliases(v *Aliases) *DistributionConfig { - s.Aliases = v - return s -} - -// SetCacheBehaviors sets the CacheBehaviors field's value. -func (s *DistributionConfig) SetCacheBehaviors(v *CacheBehaviors) *DistributionConfig { - s.CacheBehaviors = v - return s -} - -// SetCallerReference sets the CallerReference field's value. -func (s *DistributionConfig) SetCallerReference(v string) *DistributionConfig { - s.CallerReference = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *DistributionConfig) SetComment(v string) *DistributionConfig { - s.Comment = &v - return s -} - -// SetCustomErrorResponses sets the CustomErrorResponses field's value. -func (s *DistributionConfig) SetCustomErrorResponses(v *CustomErrorResponses) *DistributionConfig { - s.CustomErrorResponses = v - return s -} - -// SetDefaultCacheBehavior sets the DefaultCacheBehavior field's value. -func (s *DistributionConfig) SetDefaultCacheBehavior(v *DefaultCacheBehavior) *DistributionConfig { - s.DefaultCacheBehavior = v - return s -} - -// SetDefaultRootObject sets the DefaultRootObject field's value. -func (s *DistributionConfig) SetDefaultRootObject(v string) *DistributionConfig { - s.DefaultRootObject = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *DistributionConfig) SetEnabled(v bool) *DistributionConfig { - s.Enabled = &v - return s -} - -// SetHttpVersion sets the HttpVersion field's value. -func (s *DistributionConfig) SetHttpVersion(v string) *DistributionConfig { - s.HttpVersion = &v - return s -} - -// SetIsIPV6Enabled sets the IsIPV6Enabled field's value. -func (s *DistributionConfig) SetIsIPV6Enabled(v bool) *DistributionConfig { - s.IsIPV6Enabled = &v - return s -} - -// SetLogging sets the Logging field's value. -func (s *DistributionConfig) SetLogging(v *LoggingConfig) *DistributionConfig { - s.Logging = v - return s -} - -// SetOriginGroups sets the OriginGroups field's value. -func (s *DistributionConfig) SetOriginGroups(v *OriginGroups) *DistributionConfig { - s.OriginGroups = v - return s -} - -// SetOrigins sets the Origins field's value. -func (s *DistributionConfig) SetOrigins(v *Origins) *DistributionConfig { - s.Origins = v - return s -} - -// SetPriceClass sets the PriceClass field's value. -func (s *DistributionConfig) SetPriceClass(v string) *DistributionConfig { - s.PriceClass = &v - return s -} - -// SetRestrictions sets the Restrictions field's value. -func (s *DistributionConfig) SetRestrictions(v *Restrictions) *DistributionConfig { - s.Restrictions = v - return s -} - -// SetViewerCertificate sets the ViewerCertificate field's value. -func (s *DistributionConfig) SetViewerCertificate(v *ViewerCertificate) *DistributionConfig { - s.ViewerCertificate = v - return s -} - -// SetWebACLId sets the WebACLId field's value. -func (s *DistributionConfig) SetWebACLId(v string) *DistributionConfig { - s.WebACLId = &v - return s -} - -// A distribution Configuration and a list of tags to be associated with the -// distribution. -type DistributionConfigWithTags struct { - _ struct{} `type:"structure"` - - // A distribution configuration. - // - // DistributionConfig is a required field - DistributionConfig *DistributionConfig `type:"structure" required:"true"` - - // A complex type that contains zero or more Tag elements. - // - // Tags is a required field - Tags *Tags `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DistributionConfigWithTags) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DistributionConfigWithTags) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DistributionConfigWithTags) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DistributionConfigWithTags"} - if s.DistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionConfig")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.DistributionConfig != nil { - if err := s.DistributionConfig.Validate(); err != nil { - invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - if err := s.Tags.Validate(); err != nil { - invalidParams.AddNested("Tags", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionConfig sets the DistributionConfig field's value. -func (s *DistributionConfigWithTags) SetDistributionConfig(v *DistributionConfig) *DistributionConfigWithTags { - s.DistributionConfig = v - return s -} - -// SetTags sets the Tags field's value. -func (s *DistributionConfigWithTags) SetTags(v *Tags) *DistributionConfigWithTags { - s.Tags = v - return s -} - -// A distribution list. -type DistributionList struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether more distributions remain to be listed. If - // your results were truncated, you can make a follow-up pagination request - // using the Marker request parameter to retrieve more distributions in the - // list. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // A complex type that contains one DistributionSummary element for each distribution - // that was created by the current AWS account. - Items []*DistributionSummary `locationNameList:"DistributionSummary" type:"list"` - - // The value you provided for the Marker request parameter. - // - // Marker is a required field - Marker *string `type:"string" required:"true"` - - // The value you provided for the MaxItems request parameter. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If IsTruncated is true, this element is present and contains the value you - // can use for the Marker request parameter to continue listing your distributions - // where they left off. - NextMarker *string `type:"string"` - - // The number of distributions that were created by the current AWS account. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s DistributionList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DistributionList) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *DistributionList) SetIsTruncated(v bool) *DistributionList { - s.IsTruncated = &v - return s -} - -// SetItems sets the Items field's value. -func (s *DistributionList) SetItems(v []*DistributionSummary) *DistributionList { - s.Items = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DistributionList) SetMarker(v string) *DistributionList { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *DistributionList) SetMaxItems(v int64) *DistributionList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DistributionList) SetNextMarker(v string) *DistributionList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *DistributionList) SetQuantity(v int64) *DistributionList { - s.Quantity = &v - return s -} - -// A summary of the information about a CloudFront distribution. -type DistributionSummary struct { - _ struct{} `type:"structure"` - - // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, - // where 123456789012 is your AWS account ID. - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // A complex type that contains information about CNAMEs (alternate domain names), - // if any, for this distribution. - // - // Aliases is a required field - Aliases *Aliases `type:"structure" required:"true"` - - // A complex type that contains zero or more CacheBehavior elements. - // - // CacheBehaviors is a required field - CacheBehaviors *CacheBehaviors `type:"structure" required:"true"` - - // The comment originally specified when this distribution was created. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` - - // A complex type that contains zero or more CustomErrorResponses elements. - // - // CustomErrorResponses is a required field - CustomErrorResponses *CustomErrorResponses `type:"structure" required:"true"` - - // A complex type that describes the default cache behavior if you don't specify - // a CacheBehavior element or if files don't match any of the values of PathPattern - // in CacheBehavior elements. You must create exactly one default cache behavior. - // - // DefaultCacheBehavior is a required field - DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"` - - // The domain name that corresponds to the distribution, for example, d111111abcdef8.cloudfront.net. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // Whether the distribution is enabled to accept user requests for content. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // Specify the maximum HTTP version that you want viewers to use to communicate - // with CloudFront. The default value for new web distributions is http2. Viewers - // that don't support HTTP/2 will automatically use an earlier version. - // - // HttpVersion is a required field - HttpVersion *string `type:"string" required:"true" enum:"HttpVersion"` - - // The identifier for the distribution. For example: EDFDVBD632BHDS5. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // Whether CloudFront responds to IPv6 DNS requests with an IPv6 address for - // your distribution. - // - // IsIPV6Enabled is a required field - IsIPV6Enabled *bool `type:"boolean" required:"true"` - - // The date and time the distribution was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // A complex type that contains information about origin groups for this distribution. - OriginGroups *OriginGroups `type:"structure"` - - // A complex type that contains information about origins for this distribution. - // - // Origins is a required field - Origins *Origins `type:"structure" required:"true"` - - // A complex type that contains information about price class for this streaming - // distribution. - // - // PriceClass is a required field - PriceClass *string `type:"string" required:"true" enum:"PriceClass"` - - // A complex type that identifies ways in which you want to restrict distribution - // of your content. - // - // Restrictions is a required field - Restrictions *Restrictions `type:"structure" required:"true"` - - // The current status of the distribution. When the status is Deployed, the - // distribution's information is propagated to all CloudFront edge locations. - // - // Status is a required field - Status *string `type:"string" required:"true"` - - // A complex type that specifies the following: - // - // * Whether you want viewers to use HTTP or HTTPS to request your objects. - // - // * If you want viewers to use HTTPS, whether you're using an alternate - // domain name such as example.com or the CloudFront domain name for your - // distribution, such as d111111abcdef8.cloudfront.net. - // - // * If you're using an alternate domain name, whether AWS Certificate Manager - // (ACM) provided the certificate, or you purchased a certificate from a - // third-party certificate authority and imported it into ACM or uploaded - // it to the IAM certificate store. - // - // You must specify only one of the following values: - // - // * ViewerCertificate$ACMCertificateArn - // - // * ViewerCertificate$IAMCertificateId - // - // * ViewerCertificate$CloudFrontDefaultCertificate - // - // Don't specify false for CloudFrontDefaultCertificate. - // - // If you want viewers to use HTTP instead of HTTPS to request your objects: - // Specify the following value: - // - // true - // - // In addition, specify allow-all for ViewerProtocolPolicy for all of your cache - // behaviors. - // - // If you want viewers to use HTTPS to request your objects: Choose the type - // of certificate that you want to use based on whether you're using an alternate - // domain name for your objects or the CloudFront domain name: - // - // * If you're using an alternate domain name, such as example.com: Specify - // one of the following values, depending on whether ACM provided your certificate - // or you purchased your certificate from third-party certificate authority: - // - // ARN for ACM SSL/TLS certificate where - // ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate - // that you want to use for this distribution. - // - // IAM certificate ID where IAM certificate - // ID is the ID that IAM returned when you added the certificate to the IAM - // certificate store. - // - // If you specify ACMCertificateArn or IAMCertificateId, you must also specify - // a value for SSLSupportMethod. - // - // If you choose to use an ACM certificate or a certificate in the IAM certificate - // store, we recommend that you use only an alternate domain name in your - // object URLs (https://example.com/logo.jpg). If you use the domain name - // that is associated with your CloudFront distribution (such as https://d111111abcdef8.cloudfront.net/logo.jpg) - // and the viewer supports SNI, then CloudFront behaves normally. However, - // if the browser does not support SNI, the user's experience depends on - // the value that you choose for SSLSupportMethod: - // - // vip: The viewer displays a warning because there is a mismatch between the - // CloudFront domain name and the domain name in your SSL/TLS certificate. - // - // sni-only: CloudFront drops the connection with the browser without returning - // the object. - // - // * If you're using the CloudFront domain name for your distribution, such - // as d111111abcdef8.cloudfront.net: Specify the following value: - // - // true - // - // If you want viewers to use HTTPS, you must also specify one of the following - // values in your cache behaviors: - // - // * https-only - // - // * redirect-to-https - // - // You can also optionally require that CloudFront use HTTPS to communicate - // with your origin by specifying one of the following values for the applicable - // origins: - // - // * https-only - // - // * match-viewer - // - // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS) - // in the Amazon CloudFront Developer Guide. - // - // ViewerCertificate is a required field - ViewerCertificate *ViewerCertificate `type:"structure" required:"true"` - - // The Web ACL Id (if any) associated with the distribution. - // - // WebACLId is a required field - WebACLId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DistributionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DistributionSummary) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *DistributionSummary) SetARN(v string) *DistributionSummary { - s.ARN = &v - return s -} - -// SetAliases sets the Aliases field's value. -func (s *DistributionSummary) SetAliases(v *Aliases) *DistributionSummary { - s.Aliases = v - return s -} - -// SetCacheBehaviors sets the CacheBehaviors field's value. -func (s *DistributionSummary) SetCacheBehaviors(v *CacheBehaviors) *DistributionSummary { - s.CacheBehaviors = v - return s -} - -// SetComment sets the Comment field's value. -func (s *DistributionSummary) SetComment(v string) *DistributionSummary { - s.Comment = &v - return s -} - -// SetCustomErrorResponses sets the CustomErrorResponses field's value. -func (s *DistributionSummary) SetCustomErrorResponses(v *CustomErrorResponses) *DistributionSummary { - s.CustomErrorResponses = v - return s -} - -// SetDefaultCacheBehavior sets the DefaultCacheBehavior field's value. -func (s *DistributionSummary) SetDefaultCacheBehavior(v *DefaultCacheBehavior) *DistributionSummary { - s.DefaultCacheBehavior = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DistributionSummary) SetDomainName(v string) *DistributionSummary { - s.DomainName = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *DistributionSummary) SetEnabled(v bool) *DistributionSummary { - s.Enabled = &v - return s -} - -// SetHttpVersion sets the HttpVersion field's value. -func (s *DistributionSummary) SetHttpVersion(v string) *DistributionSummary { - s.HttpVersion = &v - return s -} - -// SetId sets the Id field's value. -func (s *DistributionSummary) SetId(v string) *DistributionSummary { - s.Id = &v - return s -} - -// SetIsIPV6Enabled sets the IsIPV6Enabled field's value. -func (s *DistributionSummary) SetIsIPV6Enabled(v bool) *DistributionSummary { - s.IsIPV6Enabled = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *DistributionSummary) SetLastModifiedTime(v time.Time) *DistributionSummary { - s.LastModifiedTime = &v - return s -} - -// SetOriginGroups sets the OriginGroups field's value. -func (s *DistributionSummary) SetOriginGroups(v *OriginGroups) *DistributionSummary { - s.OriginGroups = v - return s -} - -// SetOrigins sets the Origins field's value. -func (s *DistributionSummary) SetOrigins(v *Origins) *DistributionSummary { - s.Origins = v - return s -} - -// SetPriceClass sets the PriceClass field's value. -func (s *DistributionSummary) SetPriceClass(v string) *DistributionSummary { - s.PriceClass = &v - return s -} - -// SetRestrictions sets the Restrictions field's value. -func (s *DistributionSummary) SetRestrictions(v *Restrictions) *DistributionSummary { - s.Restrictions = v - return s -} - -// SetStatus sets the Status field's value. -func (s *DistributionSummary) SetStatus(v string) *DistributionSummary { - s.Status = &v - return s -} - -// SetViewerCertificate sets the ViewerCertificate field's value. -func (s *DistributionSummary) SetViewerCertificate(v *ViewerCertificate) *DistributionSummary { - s.ViewerCertificate = v - return s -} - -// SetWebACLId sets the WebACLId field's value. -func (s *DistributionSummary) SetWebACLId(v string) *DistributionSummary { - s.WebACLId = &v - return s -} - -// Complex data type for field-level encryption profiles that includes all of -// the encryption entities. -type EncryptionEntities struct { - _ struct{} `type:"structure"` - - // An array of field patterns in a field-level encryption content type-profile - // mapping. - Items []*EncryptionEntity `locationNameList:"EncryptionEntity" type:"list"` - - // Number of field pattern items in a field-level encryption content type-profile - // mapping. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s EncryptionEntities) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EncryptionEntities) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EncryptionEntities) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EncryptionEntities"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *EncryptionEntities) SetItems(v []*EncryptionEntity) *EncryptionEntities { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *EncryptionEntities) SetQuantity(v int64) *EncryptionEntities { - s.Quantity = &v - return s -} - -// Complex data type for field-level encryption profiles that includes the encryption -// key and field pattern specifications. -type EncryptionEntity struct { - _ struct{} `type:"structure"` - - // Field patterns in a field-level encryption content type profile specify the - // fields that you want to be encrypted. You can provide the full field name, - // or any beginning characters followed by a wildcard (*). You can't overlap - // field patterns. For example, you can't have both ABC* and AB*. Note that - // field patterns are case-sensitive. - // - // FieldPatterns is a required field - FieldPatterns *FieldPatterns `type:"structure" required:"true"` - - // The provider associated with the public key being used for encryption. This - // value must also be provided with the private key for applications to be able - // to decrypt data. - // - // ProviderId is a required field - ProviderId *string `type:"string" required:"true"` - - // The public key associated with a set of field-level encryption patterns, - // to be used when encrypting the fields that match the patterns. - // - // PublicKeyId is a required field - PublicKeyId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s EncryptionEntity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EncryptionEntity) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EncryptionEntity) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EncryptionEntity"} - if s.FieldPatterns == nil { - invalidParams.Add(request.NewErrParamRequired("FieldPatterns")) - } - if s.ProviderId == nil { - invalidParams.Add(request.NewErrParamRequired("ProviderId")) - } - if s.PublicKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("PublicKeyId")) - } - if s.FieldPatterns != nil { - if err := s.FieldPatterns.Validate(); err != nil { - invalidParams.AddNested("FieldPatterns", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFieldPatterns sets the FieldPatterns field's value. -func (s *EncryptionEntity) SetFieldPatterns(v *FieldPatterns) *EncryptionEntity { - s.FieldPatterns = v - return s -} - -// SetProviderId sets the ProviderId field's value. -func (s *EncryptionEntity) SetProviderId(v string) *EncryptionEntity { - s.ProviderId = &v - return s -} - -// SetPublicKeyId sets the PublicKeyId field's value. -func (s *EncryptionEntity) SetPublicKeyId(v string) *EncryptionEntity { - s.PublicKeyId = &v - return s -} - -// A complex data type that includes the profile configurations and other options -// specified for field-level encryption. -type FieldLevelEncryption struct { - _ struct{} `type:"structure"` - - // A complex data type that includes the profile configurations specified for - // field-level encryption. - // - // FieldLevelEncryptionConfig is a required field - FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `type:"structure" required:"true"` - - // The configuration ID for a field-level encryption configuration which includes - // a set of profiles that specify certain selected data fields to be encrypted - // by specific public keys. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The last time the field-level encryption configuration was changed. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s FieldLevelEncryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FieldLevelEncryption) GoString() string { - return s.String() -} - -// SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value. -func (s *FieldLevelEncryption) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *FieldLevelEncryption { - s.FieldLevelEncryptionConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *FieldLevelEncryption) SetId(v string) *FieldLevelEncryption { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *FieldLevelEncryption) SetLastModifiedTime(v time.Time) *FieldLevelEncryption { - s.LastModifiedTime = &v - return s -} - -// A complex data type that includes the profile configurations specified for -// field-level encryption. -type FieldLevelEncryptionConfig struct { - _ struct{} `type:"structure"` - - // A unique number that ensures the request can't be replayed. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // An optional comment about the configuration. - Comment *string `type:"string"` - - // A complex data type that specifies when to forward content if a content type - // isn't recognized and profiles to use as by default in a request if a query - // argument doesn't specify a profile to use. - ContentTypeProfileConfig *ContentTypeProfileConfig `type:"structure"` - - // A complex data type that specifies when to forward content if a profile isn't - // found and the profile that can be provided as a query argument in a request. - QueryArgProfileConfig *QueryArgProfileConfig `type:"structure"` -} - -// String returns the string representation -func (s FieldLevelEncryptionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FieldLevelEncryptionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FieldLevelEncryptionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FieldLevelEncryptionConfig"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.ContentTypeProfileConfig != nil { - if err := s.ContentTypeProfileConfig.Validate(); err != nil { - invalidParams.AddNested("ContentTypeProfileConfig", err.(request.ErrInvalidParams)) - } - } - if s.QueryArgProfileConfig != nil { - if err := s.QueryArgProfileConfig.Validate(); err != nil { - invalidParams.AddNested("QueryArgProfileConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCallerReference sets the CallerReference field's value. -func (s *FieldLevelEncryptionConfig) SetCallerReference(v string) *FieldLevelEncryptionConfig { - s.CallerReference = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *FieldLevelEncryptionConfig) SetComment(v string) *FieldLevelEncryptionConfig { - s.Comment = &v - return s -} - -// SetContentTypeProfileConfig sets the ContentTypeProfileConfig field's value. -func (s *FieldLevelEncryptionConfig) SetContentTypeProfileConfig(v *ContentTypeProfileConfig) *FieldLevelEncryptionConfig { - s.ContentTypeProfileConfig = v - return s -} - -// SetQueryArgProfileConfig sets the QueryArgProfileConfig field's value. -func (s *FieldLevelEncryptionConfig) SetQueryArgProfileConfig(v *QueryArgProfileConfig) *FieldLevelEncryptionConfig { - s.QueryArgProfileConfig = v - return s -} - -// List of field-level encrpytion configurations. -type FieldLevelEncryptionList struct { - _ struct{} `type:"structure"` - - // An array of field-level encryption items. - Items []*FieldLevelEncryptionSummary `locationNameList:"FieldLevelEncryptionSummary" type:"list"` - - // The maximum number of elements you want in the response body. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If there are more elements to be listed, this element is present and contains - // the value that you can use for the Marker request parameter to continue listing - // your configurations where you left off. - NextMarker *string `type:"string"` - - // The number of field-level encryption items. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s FieldLevelEncryptionList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FieldLevelEncryptionList) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *FieldLevelEncryptionList) SetItems(v []*FieldLevelEncryptionSummary) *FieldLevelEncryptionList { - s.Items = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *FieldLevelEncryptionList) SetMaxItems(v int64) *FieldLevelEncryptionList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *FieldLevelEncryptionList) SetNextMarker(v string) *FieldLevelEncryptionList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *FieldLevelEncryptionList) SetQuantity(v int64) *FieldLevelEncryptionList { - s.Quantity = &v - return s -} - -// A complex data type for field-level encryption profiles. -type FieldLevelEncryptionProfile struct { - _ struct{} `type:"structure"` - - // A complex data type that includes the profile name and the encryption entities - // for the field-level encryption profile. - // - // FieldLevelEncryptionProfileConfig is a required field - FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `type:"structure" required:"true"` - - // The ID for a field-level encryption profile configuration which includes - // a set of profiles that specify certain selected data fields to be encrypted - // by specific public keys. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The last time the field-level encryption profile was updated. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s FieldLevelEncryptionProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FieldLevelEncryptionProfile) GoString() string { - return s.String() -} - -// SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value. -func (s *FieldLevelEncryptionProfile) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *FieldLevelEncryptionProfile { - s.FieldLevelEncryptionProfileConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *FieldLevelEncryptionProfile) SetId(v string) *FieldLevelEncryptionProfile { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *FieldLevelEncryptionProfile) SetLastModifiedTime(v time.Time) *FieldLevelEncryptionProfile { - s.LastModifiedTime = &v - return s -} - -// A complex data type of profiles for the field-level encryption. -type FieldLevelEncryptionProfileConfig struct { - _ struct{} `type:"structure"` - - // A unique number that ensures that the request can't be replayed. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // An optional comment for the field-level encryption profile. - Comment *string `type:"string"` - - // A complex data type of encryption entities for the field-level encryption - // profile that include the public key ID, provider, and field patterns for - // specifying which fields to encrypt with this key. - // - // EncryptionEntities is a required field - EncryptionEntities *EncryptionEntities `type:"structure" required:"true"` - - // Profile name for the field-level encryption profile. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s FieldLevelEncryptionProfileConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FieldLevelEncryptionProfileConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FieldLevelEncryptionProfileConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FieldLevelEncryptionProfileConfig"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.EncryptionEntities == nil { - invalidParams.Add(request.NewErrParamRequired("EncryptionEntities")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.EncryptionEntities != nil { - if err := s.EncryptionEntities.Validate(); err != nil { - invalidParams.AddNested("EncryptionEntities", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCallerReference sets the CallerReference field's value. -func (s *FieldLevelEncryptionProfileConfig) SetCallerReference(v string) *FieldLevelEncryptionProfileConfig { - s.CallerReference = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *FieldLevelEncryptionProfileConfig) SetComment(v string) *FieldLevelEncryptionProfileConfig { - s.Comment = &v - return s -} - -// SetEncryptionEntities sets the EncryptionEntities field's value. -func (s *FieldLevelEncryptionProfileConfig) SetEncryptionEntities(v *EncryptionEntities) *FieldLevelEncryptionProfileConfig { - s.EncryptionEntities = v - return s -} - -// SetName sets the Name field's value. -func (s *FieldLevelEncryptionProfileConfig) SetName(v string) *FieldLevelEncryptionProfileConfig { - s.Name = &v - return s -} - -// List of field-level encryption profiles. -type FieldLevelEncryptionProfileList struct { - _ struct{} `type:"structure"` - - // The field-level encryption profile items. - Items []*FieldLevelEncryptionProfileSummary `locationNameList:"FieldLevelEncryptionProfileSummary" type:"list"` - - // The maximum number of field-level encryption profiles you want in the response - // body. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If there are more elements to be listed, this element is present and contains - // the value that you can use for the Marker request parameter to continue listing - // your profiles where you left off. - NextMarker *string `type:"string"` - - // The number of field-level encryption profiles. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s FieldLevelEncryptionProfileList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FieldLevelEncryptionProfileList) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *FieldLevelEncryptionProfileList) SetItems(v []*FieldLevelEncryptionProfileSummary) *FieldLevelEncryptionProfileList { - s.Items = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *FieldLevelEncryptionProfileList) SetMaxItems(v int64) *FieldLevelEncryptionProfileList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *FieldLevelEncryptionProfileList) SetNextMarker(v string) *FieldLevelEncryptionProfileList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *FieldLevelEncryptionProfileList) SetQuantity(v int64) *FieldLevelEncryptionProfileList { - s.Quantity = &v - return s -} - -// The field-level encryption profile summary. -type FieldLevelEncryptionProfileSummary struct { - _ struct{} `type:"structure"` - - // An optional comment for the field-level encryption profile summary. - Comment *string `type:"string"` - - // A complex data type of encryption entities for the field-level encryption - // profile that include the public key ID, provider, and field patterns for - // specifying which fields to encrypt with this key. - // - // EncryptionEntities is a required field - EncryptionEntities *EncryptionEntities `type:"structure" required:"true"` - - // ID for the field-level encryption profile summary. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The time when the the field-level encryption profile summary was last updated. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // Name for the field-level encryption profile summary. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s FieldLevelEncryptionProfileSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FieldLevelEncryptionProfileSummary) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *FieldLevelEncryptionProfileSummary) SetComment(v string) *FieldLevelEncryptionProfileSummary { - s.Comment = &v - return s -} - -// SetEncryptionEntities sets the EncryptionEntities field's value. -func (s *FieldLevelEncryptionProfileSummary) SetEncryptionEntities(v *EncryptionEntities) *FieldLevelEncryptionProfileSummary { - s.EncryptionEntities = v - return s -} - -// SetId sets the Id field's value. -func (s *FieldLevelEncryptionProfileSummary) SetId(v string) *FieldLevelEncryptionProfileSummary { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *FieldLevelEncryptionProfileSummary) SetLastModifiedTime(v time.Time) *FieldLevelEncryptionProfileSummary { - s.LastModifiedTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *FieldLevelEncryptionProfileSummary) SetName(v string) *FieldLevelEncryptionProfileSummary { - s.Name = &v - return s -} - -// A summary of a field-level encryption item. -type FieldLevelEncryptionSummary struct { - _ struct{} `type:"structure"` - - // An optional comment about the field-level encryption item. - Comment *string `type:"string"` - - // A summary of a content type-profile mapping. - ContentTypeProfileConfig *ContentTypeProfileConfig `type:"structure"` - - // The unique ID of a field-level encryption item. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The last time that the summary of field-level encryption items was modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // A summary of a query argument-profile mapping. - QueryArgProfileConfig *QueryArgProfileConfig `type:"structure"` -} - -// String returns the string representation -func (s FieldLevelEncryptionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FieldLevelEncryptionSummary) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *FieldLevelEncryptionSummary) SetComment(v string) *FieldLevelEncryptionSummary { - s.Comment = &v - return s -} - -// SetContentTypeProfileConfig sets the ContentTypeProfileConfig field's value. -func (s *FieldLevelEncryptionSummary) SetContentTypeProfileConfig(v *ContentTypeProfileConfig) *FieldLevelEncryptionSummary { - s.ContentTypeProfileConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *FieldLevelEncryptionSummary) SetId(v string) *FieldLevelEncryptionSummary { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *FieldLevelEncryptionSummary) SetLastModifiedTime(v time.Time) *FieldLevelEncryptionSummary { - s.LastModifiedTime = &v - return s -} - -// SetQueryArgProfileConfig sets the QueryArgProfileConfig field's value. -func (s *FieldLevelEncryptionSummary) SetQueryArgProfileConfig(v *QueryArgProfileConfig) *FieldLevelEncryptionSummary { - s.QueryArgProfileConfig = v - return s -} - -// A complex data type that includes the field patterns to match for field-level -// encryption. -type FieldPatterns struct { - _ struct{} `type:"structure"` - - // An array of the field-level encryption field patterns. - Items []*string `locationNameList:"FieldPattern" type:"list"` - - // The number of field-level encryption field patterns. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s FieldPatterns) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FieldPatterns) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FieldPatterns) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FieldPatterns"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *FieldPatterns) SetItems(v []*string) *FieldPatterns { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *FieldPatterns) SetQuantity(v int64) *FieldPatterns { - s.Quantity = &v - return s -} - -// A complex type that specifies how CloudFront handles query strings and cookies. -type ForwardedValues struct { - _ struct{} `type:"structure"` - - // A complex type that specifies whether you want CloudFront to forward cookies - // to the origin and, if so, which ones. For more information about forwarding - // cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies - // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) - // in the Amazon CloudFront Developer Guide. - // - // Cookies is a required field - Cookies *CookiePreference `type:"structure" required:"true"` - - // A complex type that specifies the Headers, if any, that you want CloudFront - // to base caching on for this cache behavior. - Headers *Headers `type:"structure"` - - // Indicates whether you want CloudFront to forward query strings to the origin - // that is associated with this cache behavior and cache based on the query - // string parameters. CloudFront behavior depends on the value of QueryString - // and on the values that you specify for QueryStringCacheKeys, if any: - // - // If you specify true for QueryString and you don't specify any values for - // QueryStringCacheKeys, CloudFront forwards all query string parameters to - // the origin and caches based on all query string parameters. Depending on - // how many query string parameters and values you have, this can adversely - // affect performance because CloudFront must forward more requests to the origin. - // - // If you specify true for QueryString and you specify one or more values for - // QueryStringCacheKeys, CloudFront forwards all query string parameters to - // the origin, but it only caches based on the query string parameters that - // you specify. - // - // If you specify false for QueryString, CloudFront doesn't forward any query - // string parameters to the origin, and doesn't cache based on query string - // parameters. - // - // For more information, see Configuring CloudFront to Cache Based on Query - // String Parameters (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html) - // in the Amazon CloudFront Developer Guide. - // - // QueryString is a required field - QueryString *bool `type:"boolean" required:"true"` - - // A complex type that contains information about the query string parameters - // that you want CloudFront to use for caching for this cache behavior. - QueryStringCacheKeys *QueryStringCacheKeys `type:"structure"` -} - -// String returns the string representation -func (s ForwardedValues) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ForwardedValues) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ForwardedValues) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ForwardedValues"} - if s.Cookies == nil { - invalidParams.Add(request.NewErrParamRequired("Cookies")) - } - if s.QueryString == nil { - invalidParams.Add(request.NewErrParamRequired("QueryString")) - } - if s.Cookies != nil { - if err := s.Cookies.Validate(); err != nil { - invalidParams.AddNested("Cookies", err.(request.ErrInvalidParams)) - } - } - if s.Headers != nil { - if err := s.Headers.Validate(); err != nil { - invalidParams.AddNested("Headers", err.(request.ErrInvalidParams)) - } - } - if s.QueryStringCacheKeys != nil { - if err := s.QueryStringCacheKeys.Validate(); err != nil { - invalidParams.AddNested("QueryStringCacheKeys", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCookies sets the Cookies field's value. -func (s *ForwardedValues) SetCookies(v *CookiePreference) *ForwardedValues { - s.Cookies = v - return s -} - -// SetHeaders sets the Headers field's value. -func (s *ForwardedValues) SetHeaders(v *Headers) *ForwardedValues { - s.Headers = v - return s -} - -// SetQueryString sets the QueryString field's value. -func (s *ForwardedValues) SetQueryString(v bool) *ForwardedValues { - s.QueryString = &v - return s -} - -// SetQueryStringCacheKeys sets the QueryStringCacheKeys field's value. -func (s *ForwardedValues) SetQueryStringCacheKeys(v *QueryStringCacheKeys) *ForwardedValues { - s.QueryStringCacheKeys = v - return s -} - -// A complex type that controls the countries in which your content is distributed. -// CloudFront determines the location of your users using MaxMind GeoIP databases. -type GeoRestriction struct { - _ struct{} `type:"structure"` - - // A complex type that contains a Location element for each country in which - // you want CloudFront either to distribute your content (whitelist) or not - // distribute your content (blacklist). - // - // The Location element is a two-letter, uppercase country code for a country - // that you want to include in your blacklist or whitelist. Include one Location - // element for each country. - // - // CloudFront and MaxMind both use ISO 3166 country codes. For the current list - // of countries and the corresponding codes, see ISO 3166-1-alpha-2 code on - // the International Organization for Standardization website. You can also - // refer to the country list on the CloudFront console, which includes both - // country names and codes. - Items []*string `locationNameList:"Location" type:"list"` - - // When geo restriction is enabled, this is the number of countries in your - // whitelist or blacklist. Otherwise, when it is not enabled, Quantity is 0, - // and you can omit Items. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` - - // The method that you want to use to restrict distribution of your content - // by country: - // - // * none: No geo restriction is enabled, meaning access to content is not - // restricted by client geo location. - // - // * blacklist: The Location elements specify the countries in which you - // don't want CloudFront to distribute your content. - // - // * whitelist: The Location elements specify the countries in which you - // want CloudFront to distribute your content. - // - // RestrictionType is a required field - RestrictionType *string `type:"string" required:"true" enum:"GeoRestrictionType"` -} - -// String returns the string representation -func (s GeoRestriction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GeoRestriction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GeoRestriction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GeoRestriction"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.RestrictionType == nil { - invalidParams.Add(request.NewErrParamRequired("RestrictionType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *GeoRestriction) SetItems(v []*string) *GeoRestriction { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *GeoRestriction) SetQuantity(v int64) *GeoRestriction { - s.Quantity = &v - return s -} - -// SetRestrictionType sets the RestrictionType field's value. -func (s *GeoRestriction) SetRestrictionType(v string) *GeoRestriction { - s.RestrictionType = &v - return s -} - -// The origin access identity's configuration information. For more information, -// see CloudFrontOriginAccessIdentityConfigComplexType. -type GetCloudFrontOriginAccessIdentityConfigInput struct { - _ struct{} `type:"structure"` - - // The identity's ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCloudFrontOriginAccessIdentityConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCloudFrontOriginAccessIdentityConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCloudFrontOriginAccessIdentityConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetCloudFrontOriginAccessIdentityConfigInput) SetId(v string) *GetCloudFrontOriginAccessIdentityConfigInput { - s.Id = &v - return s -} - -// The returned result of the corresponding request. -type GetCloudFrontOriginAccessIdentityConfigOutput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"` - - // The origin access identity's configuration information. - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"` - - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` -} - -// String returns the string representation -func (s GetCloudFrontOriginAccessIdentityConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCloudFrontOriginAccessIdentityConfigOutput) GoString() string { - return s.String() -} - -// SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value. -func (s *GetCloudFrontOriginAccessIdentityConfigOutput) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *GetCloudFrontOriginAccessIdentityConfigOutput { - s.CloudFrontOriginAccessIdentityConfig = v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetCloudFrontOriginAccessIdentityConfigOutput) SetETag(v string) *GetCloudFrontOriginAccessIdentityConfigOutput { - s.ETag = &v - return s -} - -// The request to get an origin access identity's information. -type GetCloudFrontOriginAccessIdentityInput struct { - _ struct{} `type:"structure"` - - // The identity's ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCloudFrontOriginAccessIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCloudFrontOriginAccessIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCloudFrontOriginAccessIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetCloudFrontOriginAccessIdentityInput) SetId(v string) *GetCloudFrontOriginAccessIdentityInput { - s.Id = &v - return s -} - -// The returned result of the corresponding request. -type GetCloudFrontOriginAccessIdentityOutput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"` - - // The origin access identity's information. - CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"` - - // The current version of the origin access identity's information. For example: - // E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` -} - -// String returns the string representation -func (s GetCloudFrontOriginAccessIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCloudFrontOriginAccessIdentityOutput) GoString() string { - return s.String() -} - -// SetCloudFrontOriginAccessIdentity sets the CloudFrontOriginAccessIdentity field's value. -func (s *GetCloudFrontOriginAccessIdentityOutput) SetCloudFrontOriginAccessIdentity(v *OriginAccessIdentity) *GetCloudFrontOriginAccessIdentityOutput { - s.CloudFrontOriginAccessIdentity = v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetCloudFrontOriginAccessIdentityOutput) SetETag(v string) *GetCloudFrontOriginAccessIdentityOutput { - s.ETag = &v - return s -} - -// The request to get a distribution configuration. -type GetDistributionConfigInput struct { - _ struct{} `type:"structure"` - - // The distribution's ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDistributionConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDistributionConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDistributionConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDistributionConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetDistributionConfigInput) SetId(v string) *GetDistributionConfigInput { - s.Id = &v - return s -} - -// The returned result of the corresponding request. -type GetDistributionConfigOutput struct { - _ struct{} `type:"structure" payload:"DistributionConfig"` - - // The distribution's configuration information. - DistributionConfig *DistributionConfig `type:"structure"` - - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` -} - -// String returns the string representation -func (s GetDistributionConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDistributionConfigOutput) GoString() string { - return s.String() -} - -// SetDistributionConfig sets the DistributionConfig field's value. -func (s *GetDistributionConfigOutput) SetDistributionConfig(v *DistributionConfig) *GetDistributionConfigOutput { - s.DistributionConfig = v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetDistributionConfigOutput) SetETag(v string) *GetDistributionConfigOutput { - s.ETag = &v - return s -} - -// The request to get a distribution's information. -type GetDistributionInput struct { - _ struct{} `type:"structure"` - - // The distribution's ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDistributionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetDistributionInput) SetId(v string) *GetDistributionInput { - s.Id = &v - return s -} - -// The returned result of the corresponding request. -type GetDistributionOutput struct { - _ struct{} `type:"structure" payload:"Distribution"` - - // The distribution's information. - Distribution *Distribution `type:"structure"` - - // The current version of the distribution's information. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` -} - -// String returns the string representation -func (s GetDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDistributionOutput) GoString() string { - return s.String() -} - -// SetDistribution sets the Distribution field's value. -func (s *GetDistributionOutput) SetDistribution(v *Distribution) *GetDistributionOutput { - s.Distribution = v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetDistributionOutput) SetETag(v string) *GetDistributionOutput { - s.ETag = &v - return s -} - -type GetFieldLevelEncryptionConfigInput struct { - _ struct{} `type:"structure"` - - // Request the ID for the field-level encryption configuration information. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetFieldLevelEncryptionConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFieldLevelEncryptionConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFieldLevelEncryptionConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetFieldLevelEncryptionConfigInput) SetId(v string) *GetFieldLevelEncryptionConfigInput { - s.Id = &v - return s -} - -type GetFieldLevelEncryptionConfigOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionConfig"` - - // The current version of the field level encryption configuration. For example: - // E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the field-level encryption configuration information. - FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `type:"structure"` -} - -// String returns the string representation -func (s GetFieldLevelEncryptionConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFieldLevelEncryptionConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetFieldLevelEncryptionConfigOutput) SetETag(v string) *GetFieldLevelEncryptionConfigOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value. -func (s *GetFieldLevelEncryptionConfigOutput) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *GetFieldLevelEncryptionConfigOutput { - s.FieldLevelEncryptionConfig = v - return s -} - -type GetFieldLevelEncryptionInput struct { - _ struct{} `type:"structure"` - - // Request the ID for the field-level encryption configuration information. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetFieldLevelEncryptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFieldLevelEncryptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFieldLevelEncryptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetFieldLevelEncryptionInput) SetId(v string) *GetFieldLevelEncryptionInput { - s.Id = &v - return s -} - -type GetFieldLevelEncryptionOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryption"` - - // The current version of the field level encryption configuration. For example: - // E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the field-level encryption configuration information. - FieldLevelEncryption *FieldLevelEncryption `type:"structure"` -} - -// String returns the string representation -func (s GetFieldLevelEncryptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFieldLevelEncryptionOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetFieldLevelEncryptionOutput) SetETag(v string) *GetFieldLevelEncryptionOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryption sets the FieldLevelEncryption field's value. -func (s *GetFieldLevelEncryptionOutput) SetFieldLevelEncryption(v *FieldLevelEncryption) *GetFieldLevelEncryptionOutput { - s.FieldLevelEncryption = v - return s -} - -type GetFieldLevelEncryptionProfileConfigInput struct { - _ struct{} `type:"structure"` - - // Get the ID for the field-level encryption profile configuration information. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetFieldLevelEncryptionProfileConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFieldLevelEncryptionProfileConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFieldLevelEncryptionProfileConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionProfileConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetFieldLevelEncryptionProfileConfigInput) SetId(v string) *GetFieldLevelEncryptionProfileConfigInput { - s.Id = &v - return s -} - -type GetFieldLevelEncryptionProfileConfigOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfileConfig"` - - // The current version of the field-level encryption profile configuration result. - // For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the field-level encryption profile configuration information. - FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `type:"structure"` -} - -// String returns the string representation -func (s GetFieldLevelEncryptionProfileConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFieldLevelEncryptionProfileConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetFieldLevelEncryptionProfileConfigOutput) SetETag(v string) *GetFieldLevelEncryptionProfileConfigOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value. -func (s *GetFieldLevelEncryptionProfileConfigOutput) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *GetFieldLevelEncryptionProfileConfigOutput { - s.FieldLevelEncryptionProfileConfig = v - return s -} - -type GetFieldLevelEncryptionProfileInput struct { - _ struct{} `type:"structure"` - - // Get the ID for the field-level encryption profile information. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetFieldLevelEncryptionProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFieldLevelEncryptionProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFieldLevelEncryptionProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionProfileInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetFieldLevelEncryptionProfileInput) SetId(v string) *GetFieldLevelEncryptionProfileInput { - s.Id = &v - return s -} - -type GetFieldLevelEncryptionProfileOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfile"` - - // The current version of the field level encryption profile. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the field-level encryption profile information. - FieldLevelEncryptionProfile *FieldLevelEncryptionProfile `type:"structure"` -} - -// String returns the string representation -func (s GetFieldLevelEncryptionProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFieldLevelEncryptionProfileOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetFieldLevelEncryptionProfileOutput) SetETag(v string) *GetFieldLevelEncryptionProfileOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryptionProfile sets the FieldLevelEncryptionProfile field's value. -func (s *GetFieldLevelEncryptionProfileOutput) SetFieldLevelEncryptionProfile(v *FieldLevelEncryptionProfile) *GetFieldLevelEncryptionProfileOutput { - s.FieldLevelEncryptionProfile = v - return s -} - -// The request to get an invalidation's information. -type GetInvalidationInput struct { - _ struct{} `type:"structure"` - - // The distribution's ID. - // - // DistributionId is a required field - DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"` - - // The identifier for the invalidation request, for example, IDFDVBD632BHDS5. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetInvalidationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInvalidationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInvalidationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInvalidationInput"} - if s.DistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionId")) - } - if s.DistributionId != nil && len(*s.DistributionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionId sets the DistributionId field's value. -func (s *GetInvalidationInput) SetDistributionId(v string) *GetInvalidationInput { - s.DistributionId = &v - return s -} - -// SetId sets the Id field's value. -func (s *GetInvalidationInput) SetId(v string) *GetInvalidationInput { - s.Id = &v - return s -} - -// The returned result of the corresponding request. -type GetInvalidationOutput struct { - _ struct{} `type:"structure" payload:"Invalidation"` - - // The invalidation's information. For more information, see Invalidation Complex - // Type (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/InvalidationDatatype.html). - Invalidation *Invalidation `type:"structure"` -} - -// String returns the string representation -func (s GetInvalidationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInvalidationOutput) GoString() string { - return s.String() -} - -// SetInvalidation sets the Invalidation field's value. -func (s *GetInvalidationOutput) SetInvalidation(v *Invalidation) *GetInvalidationOutput { - s.Invalidation = v - return s -} - -type GetPublicKeyConfigInput struct { - _ struct{} `type:"structure"` - - // Request the ID for the public key configuration. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPublicKeyConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPublicKeyConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPublicKeyConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPublicKeyConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetPublicKeyConfigInput) SetId(v string) *GetPublicKeyConfigInput { - s.Id = &v - return s -} - -type GetPublicKeyConfigOutput struct { - _ struct{} `type:"structure" payload:"PublicKeyConfig"` - - // The current version of the public key configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the result for the public key configuration. - PublicKeyConfig *PublicKeyConfig `type:"structure"` -} - -// String returns the string representation -func (s GetPublicKeyConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPublicKeyConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetPublicKeyConfigOutput) SetETag(v string) *GetPublicKeyConfigOutput { - s.ETag = &v - return s -} - -// SetPublicKeyConfig sets the PublicKeyConfig field's value. -func (s *GetPublicKeyConfigOutput) SetPublicKeyConfig(v *PublicKeyConfig) *GetPublicKeyConfigOutput { - s.PublicKeyConfig = v - return s -} - -type GetPublicKeyInput struct { - _ struct{} `type:"structure"` - - // Request the ID for the public key. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPublicKeyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetPublicKeyInput) SetId(v string) *GetPublicKeyInput { - s.Id = &v - return s -} - -type GetPublicKeyOutput struct { - _ struct{} `type:"structure" payload:"PublicKey"` - - // The current version of the public key. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the public key. - PublicKey *PublicKey `type:"structure"` -} - -// String returns the string representation -func (s GetPublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPublicKeyOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetPublicKeyOutput) SetETag(v string) *GetPublicKeyOutput { - s.ETag = &v - return s -} - -// SetPublicKey sets the PublicKey field's value. -func (s *GetPublicKeyOutput) SetPublicKey(v *PublicKey) *GetPublicKeyOutput { - s.PublicKey = v - return s -} - -// To request to get a streaming distribution configuration. -type GetStreamingDistributionConfigInput struct { - _ struct{} `type:"structure"` - - // The streaming distribution's ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetStreamingDistributionConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStreamingDistributionConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetStreamingDistributionConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetStreamingDistributionConfigInput) SetId(v string) *GetStreamingDistributionConfigInput { - s.Id = &v - return s -} - -// The returned result of the corresponding request. -type GetStreamingDistributionConfigOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistributionConfig"` - - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The streaming distribution's configuration information. - StreamingDistributionConfig *StreamingDistributionConfig `type:"structure"` -} - -// String returns the string representation -func (s GetStreamingDistributionConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStreamingDistributionConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetStreamingDistributionConfigOutput) SetETag(v string) *GetStreamingDistributionConfigOutput { - s.ETag = &v - return s -} - -// SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value. -func (s *GetStreamingDistributionConfigOutput) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *GetStreamingDistributionConfigOutput { - s.StreamingDistributionConfig = v - return s -} - -// The request to get a streaming distribution's information. -type GetStreamingDistributionInput struct { - _ struct{} `type:"structure"` - - // The streaming distribution's ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetStreamingDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStreamingDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetStreamingDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetStreamingDistributionInput) SetId(v string) *GetStreamingDistributionInput { - s.Id = &v - return s -} - -// The returned result of the corresponding request. -type GetStreamingDistributionOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistribution"` - - // The current version of the streaming distribution's information. For example: - // E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The streaming distribution's information. - StreamingDistribution *StreamingDistribution `type:"structure"` -} - -// String returns the string representation -func (s GetStreamingDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStreamingDistributionOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetStreamingDistributionOutput) SetETag(v string) *GetStreamingDistributionOutput { - s.ETag = &v - return s -} - -// SetStreamingDistribution sets the StreamingDistribution field's value. -func (s *GetStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDistribution) *GetStreamingDistributionOutput { - s.StreamingDistribution = v - return s -} - -// A complex type that specifies the request headers, if any, that you want -// CloudFront to base caching on for this cache behavior. -// -// For the headers that you specify, CloudFront caches separate versions of -// a specified object based on the header values in viewer requests. For example, -// suppose viewer requests for logo.jpg contain a custom product header that -// has a value of either acme or apex, and you configure CloudFront to cache -// your content based on values in the product header. CloudFront forwards the -// product header to the origin and caches the response from the origin once -// for each header value. For more information about caching based on header -// values, see How CloudFront Forwards and Caches Headers (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html) -// in the Amazon CloudFront Developer Guide. -type Headers struct { - _ struct{} `type:"structure"` - - // A list that contains one Name element for each header that you want CloudFront - // to use for caching in this cache behavior. If Quantity is 0, omit Items. - Items []*string `locationNameList:"Name" type:"list"` - - // The number of different headers that you want CloudFront to base caching - // on for this cache behavior. You can configure each cache behavior in a web - // distribution to do one of the following: - // - // * Forward all headers to your origin: Specify 1 for Quantity and * for - // Name. - // - // CloudFront doesn't cache the objects that are associated with this cache - // behavior. Instead, CloudFront sends every request to the origin. - // - // * Forward a whitelist of headers you specify: Specify the number of headers - // that you want CloudFront to base caching on. Then specify the header names - // in Name elements. CloudFront caches your objects based on the values in - // the specified headers. - // - // * Forward only the default headers: Specify 0 for Quantity and omit Items. - // In this configuration, CloudFront doesn't cache based on the values in - // the request headers. - // - // Regardless of which option you choose, CloudFront forwards headers to your - // origin based on whether the origin is an S3 bucket or a custom origin. See - // the following documentation: - // - // * S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates - // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorS3Origin.html#request-s3-removed-headers) - // - // * Custom origin: See HTTP Request Headers and CloudFront Behavior (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#request-custom-headers-behavior) - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s Headers) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Headers) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Headers) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Headers"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *Headers) SetItems(v []*string) *Headers { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *Headers) SetQuantity(v int64) *Headers { - s.Quantity = &v - return s -} - -// An invalidation. -type Invalidation struct { - _ struct{} `type:"structure"` - - // The date and time the invalidation request was first made. - // - // CreateTime is a required field - CreateTime *time.Time `type:"timestamp" required:"true"` - - // The identifier for the invalidation request. For example: IDFDVBD632BHDS5. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The current invalidation information for the batch request. - // - // InvalidationBatch is a required field - InvalidationBatch *InvalidationBatch `type:"structure" required:"true"` - - // The status of the invalidation request. When the invalidation batch is finished, - // the status is Completed. - // - // Status is a required field - Status *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Invalidation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Invalidation) GoString() string { - return s.String() -} - -// SetCreateTime sets the CreateTime field's value. -func (s *Invalidation) SetCreateTime(v time.Time) *Invalidation { - s.CreateTime = &v - return s -} - -// SetId sets the Id field's value. -func (s *Invalidation) SetId(v string) *Invalidation { - s.Id = &v - return s -} - -// SetInvalidationBatch sets the InvalidationBatch field's value. -func (s *Invalidation) SetInvalidationBatch(v *InvalidationBatch) *Invalidation { - s.InvalidationBatch = v - return s -} - -// SetStatus sets the Status field's value. -func (s *Invalidation) SetStatus(v string) *Invalidation { - s.Status = &v - return s -} - -// An invalidation batch. -type InvalidationBatch struct { - _ struct{} `type:"structure"` - - // A value that you specify to uniquely identify an invalidation request. CloudFront - // uses the value to prevent you from accidentally resubmitting an identical - // request. Whenever you create a new invalidation request, you must specify - // a new value for CallerReference and change other values in the request as - // applicable. One way to ensure that the value of CallerReference is unique - // is to use a timestamp, for example, 20120301090000. - // - // If you make a second invalidation request with the same value for CallerReference, - // and if the rest of the request is the same, CloudFront doesn't create a new - // invalidation request. Instead, CloudFront returns information about the invalidation - // request that you previously created with the same CallerReference. - // - // If CallerReference is a value you already sent in a previous invalidation - // batch request but the content of any Path is different from the original - // request, CloudFront returns an InvalidationBatchAlreadyExists error. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // A complex type that contains information about the objects that you want - // to invalidate. For more information, see Specifying the Objects to Invalidate - // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects) - // in the Amazon CloudFront Developer Guide. - // - // Paths is a required field - Paths *Paths `type:"structure" required:"true"` -} - -// String returns the string representation -func (s InvalidationBatch) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InvalidationBatch) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InvalidationBatch) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InvalidationBatch"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.Paths == nil { - invalidParams.Add(request.NewErrParamRequired("Paths")) - } - if s.Paths != nil { - if err := s.Paths.Validate(); err != nil { - invalidParams.AddNested("Paths", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCallerReference sets the CallerReference field's value. -func (s *InvalidationBatch) SetCallerReference(v string) *InvalidationBatch { - s.CallerReference = &v - return s -} - -// SetPaths sets the Paths field's value. -func (s *InvalidationBatch) SetPaths(v *Paths) *InvalidationBatch { - s.Paths = v - return s -} - -// The InvalidationList complex type describes the list of invalidation objects. -// For more information about invalidation, see Invalidating Objects (Web Distributions -// Only) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html) -// in the Amazon CloudFront Developer Guide. -type InvalidationList struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether more invalidation batch requests remain to - // be listed. If your results were truncated, you can make a follow-up pagination - // request using the Marker request parameter to retrieve more invalidation - // batches in the list. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // A complex type that contains one InvalidationSummary element for each invalidation - // batch created by the current AWS account. - Items []*InvalidationSummary `locationNameList:"InvalidationSummary" type:"list"` - - // The value that you provided for the Marker request parameter. - // - // Marker is a required field - Marker *string `type:"string" required:"true"` - - // The value that you provided for the MaxItems request parameter. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If IsTruncated is true, this element is present and contains the value that - // you can use for the Marker request parameter to continue listing your invalidation - // batches where they left off. - NextMarker *string `type:"string"` - - // The number of invalidation batches that were created by the current AWS account. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s InvalidationList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InvalidationList) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *InvalidationList) SetIsTruncated(v bool) *InvalidationList { - s.IsTruncated = &v - return s -} - -// SetItems sets the Items field's value. -func (s *InvalidationList) SetItems(v []*InvalidationSummary) *InvalidationList { - s.Items = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *InvalidationList) SetMarker(v string) *InvalidationList { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *InvalidationList) SetMaxItems(v int64) *InvalidationList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *InvalidationList) SetNextMarker(v string) *InvalidationList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *InvalidationList) SetQuantity(v int64) *InvalidationList { - s.Quantity = &v - return s -} - -// A summary of an invalidation request. -type InvalidationSummary struct { - _ struct{} `type:"structure"` - - // The time that an invalidation request was created. - // - // CreateTime is a required field - CreateTime *time.Time `type:"timestamp" required:"true"` - - // The unique ID for an invalidation request. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The status of an invalidation request. - // - // Status is a required field - Status *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s InvalidationSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InvalidationSummary) GoString() string { - return s.String() -} - -// SetCreateTime sets the CreateTime field's value. -func (s *InvalidationSummary) SetCreateTime(v time.Time) *InvalidationSummary { - s.CreateTime = &v - return s -} - -// SetId sets the Id field's value. -func (s *InvalidationSummary) SetId(v string) *InvalidationSummary { - s.Id = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *InvalidationSummary) SetStatus(v string) *InvalidationSummary { - s.Status = &v - return s -} - -// A complex type that lists the active CloudFront key pairs, if any, that are -// associated with AwsAccountNumber. -// -// For more information, see ActiveTrustedSigners. -type KeyPairIds struct { - _ struct{} `type:"structure"` - - // A complex type that lists the active CloudFront key pairs, if any, that are - // associated with AwsAccountNumber. - // - // For more information, see ActiveTrustedSigners. - Items []*string `locationNameList:"KeyPairId" type:"list"` - - // The number of active CloudFront key pairs for AwsAccountNumber. - // - // For more information, see ActiveTrustedSigners. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s KeyPairIds) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KeyPairIds) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *KeyPairIds) SetItems(v []*string) *KeyPairIds { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *KeyPairIds) SetQuantity(v int64) *KeyPairIds { - s.Quantity = &v - return s -} - -// A complex type that contains a Lambda function association. -type LambdaFunctionAssociation struct { - _ struct{} `type:"structure"` - - // Specifies the event type that triggers a Lambda function invocation. You - // can specify the following values: - // - // * viewer-request: The function executes when CloudFront receives a request - // from a viewer and before it checks to see whether the requested object - // is in the edge cache. - // - // * origin-request: The function executes only when CloudFront forwards - // a request to your origin. When the requested object is in the edge cache, - // the function doesn't execute. - // - // * origin-response: The function executes after CloudFront receives a response - // from the origin and before it caches the object in the response. When - // the requested object is in the edge cache, the function doesn't execute. - // - // * viewer-response: The function executes before CloudFront returns the - // requested object to the viewer. The function executes regardless of whether - // the object was already in the edge cache. - // - // If the origin returns an HTTP status code other than HTTP 200 (OK), the function - // doesn't execute. - // - // EventType is a required field - EventType *string `type:"string" required:"true" enum:"EventType"` - - // A flag that allows a Lambda function to have read access to the body content. - // For more information, see Accessing the Request Body by Choosing the Include - // Body Option (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html) - // in the Amazon CloudFront Developer Guide. - IncludeBody *bool `type:"boolean"` - - // The ARN of the Lambda function. You must specify the ARN of a function version; - // you can't specify a Lambda alias or $LATEST. - // - // LambdaFunctionARN is a required field - LambdaFunctionARN *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s LambdaFunctionAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaFunctionAssociation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LambdaFunctionAssociation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionAssociation"} - if s.EventType == nil { - invalidParams.Add(request.NewErrParamRequired("EventType")) - } - if s.LambdaFunctionARN == nil { - invalidParams.Add(request.NewErrParamRequired("LambdaFunctionARN")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEventType sets the EventType field's value. -func (s *LambdaFunctionAssociation) SetEventType(v string) *LambdaFunctionAssociation { - s.EventType = &v - return s -} - -// SetIncludeBody sets the IncludeBody field's value. -func (s *LambdaFunctionAssociation) SetIncludeBody(v bool) *LambdaFunctionAssociation { - s.IncludeBody = &v - return s -} - -// SetLambdaFunctionARN sets the LambdaFunctionARN field's value. -func (s *LambdaFunctionAssociation) SetLambdaFunctionARN(v string) *LambdaFunctionAssociation { - s.LambdaFunctionARN = &v - return s -} - -// A complex type that specifies a list of Lambda functions associations for -// a cache behavior. -// -// If you want to invoke one or more Lambda functions triggered by requests -// that match the PathPattern of the cache behavior, specify the applicable -// values for Quantity and Items. Note that there can be up to 4 LambdaFunctionAssociation -// items in this list (one for each possible value of EventType) and each EventType -// can be associated with the Lambda function only once. -// -// If you don't want to invoke any Lambda functions for the requests that match -// PathPattern, specify 0 for Quantity and omit Items. -type LambdaFunctionAssociations struct { - _ struct{} `type:"structure"` - - // Optional: A complex type that contains LambdaFunctionAssociation items for - // this cache behavior. If Quantity is 0, you can omit Items. - Items []*LambdaFunctionAssociation `locationNameList:"LambdaFunctionAssociation" type:"list"` - - // The number of Lambda function associations for this cache behavior. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s LambdaFunctionAssociations) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaFunctionAssociations) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LambdaFunctionAssociations) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionAssociations"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *LambdaFunctionAssociations) SetItems(v []*LambdaFunctionAssociation) *LambdaFunctionAssociations { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *LambdaFunctionAssociations) SetQuantity(v int64) *LambdaFunctionAssociations { - s.Quantity = &v - return s -} - -// The request to list origin access identities. -type ListCloudFrontOriginAccessIdentitiesInput struct { - _ struct{} `type:"structure"` - - // Use this when paginating results to indicate where to begin in your list - // of origin access identities. The results include identities in the list that - // occur after the marker. To get the next page of results, set the Marker to - // the value of the NextMarker from the current page's response (which is also - // the ID of the last identity on that page). - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of origin access identities you want in the response body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` -} - -// String returns the string representation -func (s ListCloudFrontOriginAccessIdentitiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCloudFrontOriginAccessIdentitiesInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListCloudFrontOriginAccessIdentitiesInput) SetMarker(v string) *ListCloudFrontOriginAccessIdentitiesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListCloudFrontOriginAccessIdentitiesInput) SetMaxItems(v int64) *ListCloudFrontOriginAccessIdentitiesInput { - s.MaxItems = &v - return s -} - -// The returned result of the corresponding request. -type ListCloudFrontOriginAccessIdentitiesOutput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityList"` - - // The CloudFrontOriginAccessIdentityList type. - CloudFrontOriginAccessIdentityList *OriginAccessIdentityList `type:"structure"` -} - -// String returns the string representation -func (s ListCloudFrontOriginAccessIdentitiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCloudFrontOriginAccessIdentitiesOutput) GoString() string { - return s.String() -} - -// SetCloudFrontOriginAccessIdentityList sets the CloudFrontOriginAccessIdentityList field's value. -func (s *ListCloudFrontOriginAccessIdentitiesOutput) SetCloudFrontOriginAccessIdentityList(v *OriginAccessIdentityList) *ListCloudFrontOriginAccessIdentitiesOutput { - s.CloudFrontOriginAccessIdentityList = v - return s -} - -// The request to list distributions that are associated with a specified AWS -// WAF web ACL. -type ListDistributionsByWebACLIdInput struct { - _ struct{} `type:"structure"` - - // Use Marker and MaxItems to control pagination of results. If you have more - // than MaxItems distributions that satisfy the request, the response includes - // a NextMarker element. To get the next page of results, submit another request. - // For the value of Marker, specify the value of NextMarker from the last response. - // (For the first request, omit Marker.) - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of distributions that you want CloudFront to return in - // the response body. The maximum and default values are both 100. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` - - // The ID of the AWS WAF web ACL that you want to list the associated distributions. - // If you specify "null" for the ID, the request returns a list of the distributions - // that aren't associated with a web ACL. - // - // WebACLId is a required field - WebACLId *string `location:"uri" locationName:"WebACLId" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListDistributionsByWebACLIdInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDistributionsByWebACLIdInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDistributionsByWebACLIdInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDistributionsByWebACLIdInput"} - if s.WebACLId == nil { - invalidParams.Add(request.NewErrParamRequired("WebACLId")) - } - if s.WebACLId != nil && len(*s.WebACLId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListDistributionsByWebACLIdInput) SetMarker(v string) *ListDistributionsByWebACLIdInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListDistributionsByWebACLIdInput) SetMaxItems(v int64) *ListDistributionsByWebACLIdInput { - s.MaxItems = &v - return s -} - -// SetWebACLId sets the WebACLId field's value. -func (s *ListDistributionsByWebACLIdInput) SetWebACLId(v string) *ListDistributionsByWebACLIdInput { - s.WebACLId = &v - return s -} - -// The response to a request to list the distributions that are associated with -// a specified AWS WAF web ACL. -type ListDistributionsByWebACLIdOutput struct { - _ struct{} `type:"structure" payload:"DistributionList"` - - // The DistributionList type. - DistributionList *DistributionList `type:"structure"` -} - -// String returns the string representation -func (s ListDistributionsByWebACLIdOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDistributionsByWebACLIdOutput) GoString() string { - return s.String() -} - -// SetDistributionList sets the DistributionList field's value. -func (s *ListDistributionsByWebACLIdOutput) SetDistributionList(v *DistributionList) *ListDistributionsByWebACLIdOutput { - s.DistributionList = v - return s -} - -// The request to list your distributions. -type ListDistributionsInput struct { - _ struct{} `type:"structure"` - - // Use this when paginating results to indicate where to begin in your list - // of distributions. The results include distributions in the list that occur - // after the marker. To get the next page of results, set the Marker to the - // value of the NextMarker from the current page's response (which is also the - // ID of the last distribution on that page). - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of distributions you want in the response body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` -} - -// String returns the string representation -func (s ListDistributionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDistributionsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListDistributionsInput) SetMarker(v string) *ListDistributionsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListDistributionsInput) SetMaxItems(v int64) *ListDistributionsInput { - s.MaxItems = &v - return s -} - -// The returned result of the corresponding request. -type ListDistributionsOutput struct { - _ struct{} `type:"structure" payload:"DistributionList"` - - // The DistributionList type. - DistributionList *DistributionList `type:"structure"` -} - -// String returns the string representation -func (s ListDistributionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDistributionsOutput) GoString() string { - return s.String() -} - -// SetDistributionList sets the DistributionList field's value. -func (s *ListDistributionsOutput) SetDistributionList(v *DistributionList) *ListDistributionsOutput { - s.DistributionList = v - return s -} - -type ListFieldLevelEncryptionConfigsInput struct { - _ struct{} `type:"structure"` - - // Use this when paginating results to indicate where to begin in your list - // of configurations. The results include configurations in the list that occur - // after the marker. To get the next page of results, set the Marker to the - // value of the NextMarker from the current page's response (which is also the - // ID of the last configuration on that page). - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of field-level encryption configurations you want in the - // response body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` -} - -// String returns the string representation -func (s ListFieldLevelEncryptionConfigsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFieldLevelEncryptionConfigsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListFieldLevelEncryptionConfigsInput) SetMarker(v string) *ListFieldLevelEncryptionConfigsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListFieldLevelEncryptionConfigsInput) SetMaxItems(v int64) *ListFieldLevelEncryptionConfigsInput { - s.MaxItems = &v - return s -} - -type ListFieldLevelEncryptionConfigsOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionList"` - - // Returns a list of all field-level encryption configurations that have been - // created in CloudFront for this account. - FieldLevelEncryptionList *FieldLevelEncryptionList `type:"structure"` -} - -// String returns the string representation -func (s ListFieldLevelEncryptionConfigsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFieldLevelEncryptionConfigsOutput) GoString() string { - return s.String() -} - -// SetFieldLevelEncryptionList sets the FieldLevelEncryptionList field's value. -func (s *ListFieldLevelEncryptionConfigsOutput) SetFieldLevelEncryptionList(v *FieldLevelEncryptionList) *ListFieldLevelEncryptionConfigsOutput { - s.FieldLevelEncryptionList = v - return s -} - -type ListFieldLevelEncryptionProfilesInput struct { - _ struct{} `type:"structure"` - - // Use this when paginating results to indicate where to begin in your list - // of profiles. The results include profiles in the list that occur after the - // marker. To get the next page of results, set the Marker to the value of the - // NextMarker from the current page's response (which is also the ID of the - // last profile on that page). - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of field-level encryption profiles you want in the response - // body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` -} - -// String returns the string representation -func (s ListFieldLevelEncryptionProfilesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFieldLevelEncryptionProfilesInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListFieldLevelEncryptionProfilesInput) SetMarker(v string) *ListFieldLevelEncryptionProfilesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListFieldLevelEncryptionProfilesInput) SetMaxItems(v int64) *ListFieldLevelEncryptionProfilesInput { - s.MaxItems = &v - return s -} - -type ListFieldLevelEncryptionProfilesOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfileList"` - - // Returns a list of the field-level encryption profiles that have been created - // in CloudFront for this account. - FieldLevelEncryptionProfileList *FieldLevelEncryptionProfileList `type:"structure"` -} - -// String returns the string representation -func (s ListFieldLevelEncryptionProfilesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFieldLevelEncryptionProfilesOutput) GoString() string { - return s.String() -} - -// SetFieldLevelEncryptionProfileList sets the FieldLevelEncryptionProfileList field's value. -func (s *ListFieldLevelEncryptionProfilesOutput) SetFieldLevelEncryptionProfileList(v *FieldLevelEncryptionProfileList) *ListFieldLevelEncryptionProfilesOutput { - s.FieldLevelEncryptionProfileList = v - return s -} - -// The request to list invalidations. -type ListInvalidationsInput struct { - _ struct{} `type:"structure"` - - // The distribution's ID. - // - // DistributionId is a required field - DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"` - - // Use this parameter when paginating results to indicate where to begin in - // your list of invalidation batches. Because the results are returned in decreasing - // order from most recent to oldest, the most recent results are on the first - // page, the second page will contain earlier results, and so on. To get the - // next page of results, set Marker to the value of the NextMarker from the - // current page's response. This value is the same as the ID of the last invalidation - // batch on that page. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of invalidation batches that you want in the response - // body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` -} - -// String returns the string representation -func (s ListInvalidationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInvalidationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInvalidationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInvalidationsInput"} - if s.DistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionId")) - } - if s.DistributionId != nil && len(*s.DistributionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionId sets the DistributionId field's value. -func (s *ListInvalidationsInput) SetDistributionId(v string) *ListInvalidationsInput { - s.DistributionId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInvalidationsInput) SetMarker(v string) *ListInvalidationsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListInvalidationsInput) SetMaxItems(v int64) *ListInvalidationsInput { - s.MaxItems = &v - return s -} - -// The returned result of the corresponding request. -type ListInvalidationsOutput struct { - _ struct{} `type:"structure" payload:"InvalidationList"` - - // Information about invalidation batches. - InvalidationList *InvalidationList `type:"structure"` -} - -// String returns the string representation -func (s ListInvalidationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInvalidationsOutput) GoString() string { - return s.String() -} - -// SetInvalidationList sets the InvalidationList field's value. -func (s *ListInvalidationsOutput) SetInvalidationList(v *InvalidationList) *ListInvalidationsOutput { - s.InvalidationList = v - return s -} - -type ListPublicKeysInput struct { - _ struct{} `type:"structure"` - - // Use this when paginating results to indicate where to begin in your list - // of public keys. The results include public keys in the list that occur after - // the marker. To get the next page of results, set the Marker to the value - // of the NextMarker from the current page's response (which is also the ID - // of the last public key on that page). - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of public keys you want in the response body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` -} - -// String returns the string representation -func (s ListPublicKeysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPublicKeysInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListPublicKeysInput) SetMarker(v string) *ListPublicKeysInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListPublicKeysInput) SetMaxItems(v int64) *ListPublicKeysInput { - s.MaxItems = &v - return s -} - -type ListPublicKeysOutput struct { - _ struct{} `type:"structure" payload:"PublicKeyList"` - - // Returns a list of all public keys that have been added to CloudFront for - // this account. - PublicKeyList *PublicKeyList `type:"structure"` -} - -// String returns the string representation -func (s ListPublicKeysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPublicKeysOutput) GoString() string { - return s.String() -} - -// SetPublicKeyList sets the PublicKeyList field's value. -func (s *ListPublicKeysOutput) SetPublicKeyList(v *PublicKeyList) *ListPublicKeysOutput { - s.PublicKeyList = v - return s -} - -// The request to list your streaming distributions. -type ListStreamingDistributionsInput struct { - _ struct{} `type:"structure"` - - // The value that you provided for the Marker request parameter. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The value that you provided for the MaxItems request parameter. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` -} - -// String returns the string representation -func (s ListStreamingDistributionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStreamingDistributionsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListStreamingDistributionsInput) SetMarker(v string) *ListStreamingDistributionsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListStreamingDistributionsInput) SetMaxItems(v int64) *ListStreamingDistributionsInput { - s.MaxItems = &v - return s -} - -// The returned result of the corresponding request. -type ListStreamingDistributionsOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistributionList"` - - // The StreamingDistributionList type. - StreamingDistributionList *StreamingDistributionList `type:"structure"` -} - -// String returns the string representation -func (s ListStreamingDistributionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStreamingDistributionsOutput) GoString() string { - return s.String() -} - -// SetStreamingDistributionList sets the StreamingDistributionList field's value. -func (s *ListStreamingDistributionsOutput) SetStreamingDistributionList(v *StreamingDistributionList) *ListStreamingDistributionsOutput { - s.StreamingDistributionList = v - return s -} - -// The request to list tags for a CloudFront resource. -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // An ARN of a CloudFront resource. - // - // Resource is a required field - Resource *string `location:"querystring" locationName:"Resource" 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.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResource sets the Resource field's value. -func (s *ListTagsForResourceInput) SetResource(v string) *ListTagsForResourceInput { - s.Resource = &v - return s -} - -// The returned result of the corresponding request. -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure" payload:"Tags"` - - // A complex type that contains zero or more Tag elements. - // - // Tags is a required field - Tags *Tags `type:"structure" required:"true"` -} - -// String returns the string representation -func (s 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 *Tags) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -// A complex type that controls whether access logs are written for the distribution. -type LoggingConfig struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com. - // - // Bucket is a required field - Bucket *string `type:"string" required:"true"` - - // Specifies whether you want CloudFront to save access logs to an Amazon S3 - // bucket. If you don't want to enable logging when you create a distribution - // or if you want to disable logging for an existing distribution, specify false - // for Enabled, and specify empty Bucket and Prefix elements. If you specify - // false for Enabled but you specify values for Bucket, prefix, and IncludeCookies, - // the values are automatically deleted. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // Specifies whether you want CloudFront to include cookies in access logs, - // specify true for IncludeCookies. If you choose to include cookies in logs, - // CloudFront logs all cookies regardless of how you configure the cache behaviors - // for this distribution. If you don't want to include cookies when you create - // a distribution or if you want to disable include cookies for an existing - // distribution, specify false for IncludeCookies. - // - // IncludeCookies is a required field - IncludeCookies *bool `type:"boolean" required:"true"` - - // An optional string that you want CloudFront to prefix to the access log filenames - // for this distribution, for example, myprefix/. If you want to enable logging, - // but you don't want to specify a prefix, you still must include an empty Prefix - // element in the Logging element. - // - // Prefix is a required field - Prefix *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s LoggingConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoggingConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LoggingConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LoggingConfig"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.IncludeCookies == nil { - invalidParams.Add(request.NewErrParamRequired("IncludeCookies")) - } - if s.Prefix == nil { - invalidParams.Add(request.NewErrParamRequired("Prefix")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *LoggingConfig) SetBucket(v string) *LoggingConfig { - s.Bucket = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *LoggingConfig) SetEnabled(v bool) *LoggingConfig { - s.Enabled = &v - return s -} - -// SetIncludeCookies sets the IncludeCookies field's value. -func (s *LoggingConfig) SetIncludeCookies(v bool) *LoggingConfig { - s.IncludeCookies = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *LoggingConfig) SetPrefix(v string) *LoggingConfig { - s.Prefix = &v - return s -} - -// A complex type that describes the Amazon S3 bucket, HTTP server (for example, -// a web server), Amazon MediaStore, or other server from which CloudFront gets -// your files. This can also be an origin group, if you've created an origin -// group. You must specify at least one origin or origin group. -// -// For the current limit on the number of origins or origin groups that you -// can specify for a distribution, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront) -// in the AWS General Reference. -type Origin struct { - _ struct{} `type:"structure"` - - // A complex type that contains names and values for the custom headers that - // you want. - CustomHeaders *CustomHeaders `type:"structure"` - - // A complex type that contains information about a custom origin. If the origin - // is an Amazon S3 bucket, use the S3OriginConfig element instead. - CustomOriginConfig *CustomOriginConfig `type:"structure"` - - // Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want - // CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com. - // If you set up your bucket to be configured as a website endpoint, enter the - // Amazon S3 static website hosting endpoint for the bucket. - // - // For more information about specifying this value for different types of origins, - // see Origin Domain Name (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesDomainName) - // in the Amazon CloudFront Developer Guide. - // - // Constraints for Amazon S3 origins: - // - // * If you configured Amazon S3 Transfer Acceleration for your bucket, don't - // specify the s3-accelerate endpoint for DomainName. - // - // * The bucket name must be between 3 and 63 characters long (inclusive). - // - // * The bucket name must contain only lowercase characters, numbers, periods, - // underscores, and dashes. - // - // * The bucket name must not contain adjacent periods. - // - // Custom Origins: The DNS domain name for the HTTP server from which you want - // CloudFront to get objects for this origin, for example, www.example.com. - // - // Constraints for custom origins: - // - // * DomainName must be a valid DNS name that contains only a-z, A-Z, 0-9, - // dot (.), hyphen (-), or underscore (_) characters. - // - // * The name cannot exceed 128 characters. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // A unique identifier for the origin or origin group. The value of Id must - // be unique within the distribution. - // - // When you specify the value of TargetOriginId for the default cache behavior - // or for another cache behavior, you indicate the origin to which you want - // the cache behavior to route requests by specifying the value of the Id element - // for that origin. When a request matches the path pattern for that cache behavior, - // CloudFront routes the request to the specified origin. For more information, - // see Cache Behavior Settings (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior) - // in the Amazon CloudFront Developer Guide. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // An optional element that causes CloudFront to request your content from a - // directory in your Amazon S3 bucket or your custom origin. When you include - // the OriginPath element, specify the directory name, beginning with a /. CloudFront - // appends the directory name to the value of DomainName, for example, example.com/production. - // Do not include a / at the end of the directory name. - // - // For example, suppose you've specified the following values for your distribution: - // - // * DomainName: An Amazon S3 bucket named myawsbucket. - // - // * OriginPath: /production - // - // * CNAME: example.com - // - // When a user enters example.com/index.html in a browser, CloudFront sends - // a request to Amazon S3 for myawsbucket/production/index.html. - // - // When a user enters example.com/acme/index.html in a browser, CloudFront sends - // a request to Amazon S3 for myawsbucket/production/acme/index.html. - OriginPath *string `type:"string"` - - // A complex type that contains information about the Amazon S3 origin. If the - // origin is a custom origin, use the CustomOriginConfig element instead. - S3OriginConfig *S3OriginConfig `type:"structure"` -} - -// String returns the string representation -func (s Origin) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Origin) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Origin) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Origin"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.CustomHeaders != nil { - if err := s.CustomHeaders.Validate(); err != nil { - invalidParams.AddNested("CustomHeaders", err.(request.ErrInvalidParams)) - } - } - if s.CustomOriginConfig != nil { - if err := s.CustomOriginConfig.Validate(); err != nil { - invalidParams.AddNested("CustomOriginConfig", err.(request.ErrInvalidParams)) - } - } - if s.S3OriginConfig != nil { - if err := s.S3OriginConfig.Validate(); err != nil { - invalidParams.AddNested("S3OriginConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomHeaders sets the CustomHeaders field's value. -func (s *Origin) SetCustomHeaders(v *CustomHeaders) *Origin { - s.CustomHeaders = v - return s -} - -// SetCustomOriginConfig sets the CustomOriginConfig field's value. -func (s *Origin) SetCustomOriginConfig(v *CustomOriginConfig) *Origin { - s.CustomOriginConfig = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *Origin) SetDomainName(v string) *Origin { - s.DomainName = &v - return s -} - -// SetId sets the Id field's value. -func (s *Origin) SetId(v string) *Origin { - s.Id = &v - return s -} - -// SetOriginPath sets the OriginPath field's value. -func (s *Origin) SetOriginPath(v string) *Origin { - s.OriginPath = &v - return s -} - -// SetS3OriginConfig sets the S3OriginConfig field's value. -func (s *Origin) SetS3OriginConfig(v *S3OriginConfig) *Origin { - s.S3OriginConfig = v - return s -} - -// CloudFront origin access identity. -type OriginAccessIdentity struct { - _ struct{} `type:"structure"` - - // The current configuration information for the identity. - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"` - - // The ID for the origin access identity, for example, E74FTE3AJFJ256A. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The Amazon S3 canonical user ID for the origin access identity, used when - // giving the origin access identity read permission to an object in Amazon - // S3. - // - // S3CanonicalUserId is a required field - S3CanonicalUserId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s OriginAccessIdentity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OriginAccessIdentity) GoString() string { - return s.String() -} - -// SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value. -func (s *OriginAccessIdentity) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *OriginAccessIdentity { - s.CloudFrontOriginAccessIdentityConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *OriginAccessIdentity) SetId(v string) *OriginAccessIdentity { - s.Id = &v - return s -} - -// SetS3CanonicalUserId sets the S3CanonicalUserId field's value. -func (s *OriginAccessIdentity) SetS3CanonicalUserId(v string) *OriginAccessIdentity { - s.S3CanonicalUserId = &v - return s -} - -// Origin access identity configuration. Send a GET request to the /CloudFront -// API version/CloudFront/identity ID/config resource. -type OriginAccessIdentityConfig struct { - _ struct{} `type:"structure"` - - // A unique value (for example, a date-time stamp) that ensures that the request - // can't be replayed. - // - // If the value of CallerReference is new (regardless of the content of the - // CloudFrontOriginAccessIdentityConfig object), a new origin access identity - // is created. - // - // If the CallerReference is a value already sent in a previous identity request, - // and the content of the CloudFrontOriginAccessIdentityConfig is identical - // to the original request (ignoring white space), the response includes the - // same information returned to the original request. - // - // If the CallerReference is a value you already sent in a previous request - // to create an identity, but the content of the CloudFrontOriginAccessIdentityConfig - // is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists - // error. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // Any comments you want to include about the origin access identity. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s OriginAccessIdentityConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OriginAccessIdentityConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginAccessIdentityConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginAccessIdentityConfig"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.Comment == nil { - invalidParams.Add(request.NewErrParamRequired("Comment")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCallerReference sets the CallerReference field's value. -func (s *OriginAccessIdentityConfig) SetCallerReference(v string) *OriginAccessIdentityConfig { - s.CallerReference = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *OriginAccessIdentityConfig) SetComment(v string) *OriginAccessIdentityConfig { - s.Comment = &v - return s -} - -// Lists the origin access identities for CloudFront.Send a GET request to the -// /CloudFront API version/origin-access-identity/cloudfront resource. The response -// includes a CloudFrontOriginAccessIdentityList element with zero or more CloudFrontOriginAccessIdentitySummary -// child elements. By default, your entire list of origin access identities -// is returned in one single page. If the list is long, you can paginate it -// using the MaxItems and Marker parameters. -type OriginAccessIdentityList struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether more origin access identities remain to be - // listed. If your results were truncated, you can make a follow-up pagination - // request using the Marker request parameter to retrieve more items in the - // list. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // A complex type that contains one CloudFrontOriginAccessIdentitySummary element - // for each origin access identity that was created by the current AWS account. - Items []*OriginAccessIdentitySummary `locationNameList:"CloudFrontOriginAccessIdentitySummary" type:"list"` - - // Use this when paginating results to indicate where to begin in your list - // of origin access identities. The results include identities in the list that - // occur after the marker. To get the next page of results, set the Marker to - // the value of the NextMarker from the current page's response (which is also - // the ID of the last identity on that page). - // - // Marker is a required field - Marker *string `type:"string" required:"true"` - - // The maximum number of origin access identities you want in the response body. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If IsTruncated is true, this element is present and contains the value you - // can use for the Marker request parameter to continue listing your origin - // access identities where they left off. - NextMarker *string `type:"string"` - - // The number of CloudFront origin access identities that were created by the - // current AWS account. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s OriginAccessIdentityList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OriginAccessIdentityList) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *OriginAccessIdentityList) SetIsTruncated(v bool) *OriginAccessIdentityList { - s.IsTruncated = &v - return s -} - -// SetItems sets the Items field's value. -func (s *OriginAccessIdentityList) SetItems(v []*OriginAccessIdentitySummary) *OriginAccessIdentityList { - s.Items = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *OriginAccessIdentityList) SetMarker(v string) *OriginAccessIdentityList { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *OriginAccessIdentityList) SetMaxItems(v int64) *OriginAccessIdentityList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *OriginAccessIdentityList) SetNextMarker(v string) *OriginAccessIdentityList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *OriginAccessIdentityList) SetQuantity(v int64) *OriginAccessIdentityList { - s.Quantity = &v - return s -} - -// Summary of the information about a CloudFront origin access identity. -type OriginAccessIdentitySummary struct { - _ struct{} `type:"structure"` - - // The comment for this origin access identity, as originally specified when - // created. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` - - // The ID for the origin access identity. For example: E74FTE3AJFJ256A. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The Amazon S3 canonical user ID for the origin access identity, which you - // use when giving the origin access identity read permission to an object in - // Amazon S3. - // - // S3CanonicalUserId is a required field - S3CanonicalUserId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s OriginAccessIdentitySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OriginAccessIdentitySummary) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *OriginAccessIdentitySummary) SetComment(v string) *OriginAccessIdentitySummary { - s.Comment = &v - return s -} - -// SetId sets the Id field's value. -func (s *OriginAccessIdentitySummary) SetId(v string) *OriginAccessIdentitySummary { - s.Id = &v - return s -} - -// SetS3CanonicalUserId sets the S3CanonicalUserId field's value. -func (s *OriginAccessIdentitySummary) SetS3CanonicalUserId(v string) *OriginAccessIdentitySummary { - s.S3CanonicalUserId = &v - return s -} - -// A complex type that contains HeaderName and HeaderValue elements, if any, -// for this distribution. -type OriginCustomHeader struct { - _ struct{} `type:"structure"` - - // The name of a header that you want CloudFront to forward to your origin. - // For more information, see Forwarding Custom Headers to Your Origin (Web Distributions - // Only) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/forward-custom-headers.html) - // in the Amazon Amazon CloudFront Developer Guide. - // - // HeaderName is a required field - HeaderName *string `type:"string" required:"true"` - - // The value for the header that you specified in the HeaderName field. - // - // HeaderValue is a required field - HeaderValue *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s OriginCustomHeader) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OriginCustomHeader) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginCustomHeader) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginCustomHeader"} - if s.HeaderName == nil { - invalidParams.Add(request.NewErrParamRequired("HeaderName")) - } - if s.HeaderValue == nil { - invalidParams.Add(request.NewErrParamRequired("HeaderValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHeaderName sets the HeaderName field's value. -func (s *OriginCustomHeader) SetHeaderName(v string) *OriginCustomHeader { - s.HeaderName = &v - return s -} - -// SetHeaderValue sets the HeaderValue field's value. -func (s *OriginCustomHeader) SetHeaderValue(v string) *OriginCustomHeader { - s.HeaderValue = &v - return s -} - -// An origin group includes two origins (a primary origin and a second origin -// to failover to) and a failover criteria that you specify. You create an origin -// group to support origin failover in CloudFront. When you create or update -// a distribution, you can specifiy the origin group instead of a single origin, -// and CloudFront will failover from the primary origin to the second origin -// under the failover conditions that you've chosen. -type OriginGroup struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about the failover criteria for - // an origin group. - // - // FailoverCriteria is a required field - FailoverCriteria *OriginGroupFailoverCriteria `type:"structure" required:"true"` - - // The origin group's ID. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // A complex type that contains information about the origins in an origin group. - // - // Members is a required field - Members *OriginGroupMembers `type:"structure" required:"true"` -} - -// String returns the string representation -func (s OriginGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OriginGroup) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginGroup) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginGroup"} - if s.FailoverCriteria == nil { - invalidParams.Add(request.NewErrParamRequired("FailoverCriteria")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Members == nil { - invalidParams.Add(request.NewErrParamRequired("Members")) - } - if s.FailoverCriteria != nil { - if err := s.FailoverCriteria.Validate(); err != nil { - invalidParams.AddNested("FailoverCriteria", err.(request.ErrInvalidParams)) - } - } - if s.Members != nil { - if err := s.Members.Validate(); err != nil { - invalidParams.AddNested("Members", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFailoverCriteria sets the FailoverCriteria field's value. -func (s *OriginGroup) SetFailoverCriteria(v *OriginGroupFailoverCriteria) *OriginGroup { - s.FailoverCriteria = v - return s -} - -// SetId sets the Id field's value. -func (s *OriginGroup) SetId(v string) *OriginGroup { - s.Id = &v - return s -} - -// SetMembers sets the Members field's value. -func (s *OriginGroup) SetMembers(v *OriginGroupMembers) *OriginGroup { - s.Members = v - return s -} - -// A complex data type that includes information about the failover criteria -// for an origin group, including the status codes for which CloudFront will -// failover from the primary origin to the second origin. -type OriginGroupFailoverCriteria struct { - _ struct{} `type:"structure"` - - // The status codes that, when returned from the primary origin, will trigger - // CloudFront to failover to the second origin. - // - // StatusCodes is a required field - StatusCodes *StatusCodes `type:"structure" required:"true"` -} - -// String returns the string representation -func (s OriginGroupFailoverCriteria) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OriginGroupFailoverCriteria) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginGroupFailoverCriteria) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginGroupFailoverCriteria"} - if s.StatusCodes == nil { - invalidParams.Add(request.NewErrParamRequired("StatusCodes")) - } - if s.StatusCodes != nil { - if err := s.StatusCodes.Validate(); err != nil { - invalidParams.AddNested("StatusCodes", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStatusCodes sets the StatusCodes field's value. -func (s *OriginGroupFailoverCriteria) SetStatusCodes(v *StatusCodes) *OriginGroupFailoverCriteria { - s.StatusCodes = v - return s -} - -// An origin in an origin group. -type OriginGroupMember struct { - _ struct{} `type:"structure"` - - // The ID for an origin in an origin group. - // - // OriginId is a required field - OriginId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s OriginGroupMember) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OriginGroupMember) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginGroupMember) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginGroupMember"} - if s.OriginId == nil { - invalidParams.Add(request.NewErrParamRequired("OriginId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOriginId sets the OriginId field's value. -func (s *OriginGroupMember) SetOriginId(v string) *OriginGroupMember { - s.OriginId = &v - return s -} - -// A complex data type for the origins included in an origin group. -type OriginGroupMembers struct { - _ struct{} `type:"structure"` - - // Items (origins) in an origin group. - // - // Items is a required field - Items []*OriginGroupMember `locationNameList:"OriginGroupMember" min:"2" type:"list" required:"true"` - - // The number of origins in an origin group. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s OriginGroupMembers) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OriginGroupMembers) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginGroupMembers) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginGroupMembers"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Items != nil && len(s.Items) < 2 { - invalidParams.Add(request.NewErrParamMinLen("Items", 2)) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *OriginGroupMembers) SetItems(v []*OriginGroupMember) *OriginGroupMembers { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *OriginGroupMembers) SetQuantity(v int64) *OriginGroupMembers { - s.Quantity = &v - return s -} - -// A complex data type for the origin groups specified for a distribution. -type OriginGroups struct { - _ struct{} `type:"structure"` - - // The items (origin groups) in a distribution. - Items []*OriginGroup `locationNameList:"OriginGroup" type:"list"` - - // The number of origin groups. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s OriginGroups) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OriginGroups) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginGroups) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginGroups"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *OriginGroups) SetItems(v []*OriginGroup) *OriginGroups { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *OriginGroups) SetQuantity(v int64) *OriginGroups { - s.Quantity = &v - return s -} - -// A complex type that contains information about the SSL/TLS protocols that -// CloudFront can use when establishing an HTTPS connection with your origin. -type OriginSslProtocols struct { - _ struct{} `type:"structure"` - - // A list that contains allowed SSL/TLS protocols for this distribution. - // - // Items is a required field - Items []*string `locationNameList:"SslProtocol" type:"list" required:"true"` - - // The number of SSL/TLS protocols that you want to allow CloudFront to use - // when establishing an HTTPS connection with this origin. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s OriginSslProtocols) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OriginSslProtocols) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginSslProtocols) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginSslProtocols"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *OriginSslProtocols) SetItems(v []*string) *OriginSslProtocols { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *OriginSslProtocols) SetQuantity(v int64) *OriginSslProtocols { - s.Quantity = &v - return s -} - -// A complex type that contains information about origins and origin groups -// for this distribution. -type Origins struct { - _ struct{} `type:"structure"` - - // A complex type that contains origins or origin groups for this distribution. - // - // Items is a required field - Items []*Origin `locationNameList:"Origin" min:"1" type:"list" required:"true"` - - // The number of origins or origin groups for this distribution. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s Origins) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Origins) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Origins) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Origins"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Items != nil && len(s.Items) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Items", 1)) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *Origins) SetItems(v []*Origin) *Origins { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *Origins) SetQuantity(v int64) *Origins { - s.Quantity = &v - return s -} - -// A complex type that contains information about the objects that you want -// to invalidate. For more information, see Specifying the Objects to Invalidate -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects) -// in the Amazon CloudFront Developer Guide. -type Paths struct { - _ struct{} `type:"structure"` - - // A complex type that contains a list of the paths that you want to invalidate. - Items []*string `locationNameList:"Path" type:"list"` - - // The number of objects that you want to invalidate. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s Paths) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Paths) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Paths) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Paths"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *Paths) SetItems(v []*string) *Paths { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *Paths) SetQuantity(v int64) *Paths { - s.Quantity = &v - return s -} - -// A complex data type of public keys you add to CloudFront to use with features -// like field-level encryption. -type PublicKey struct { - _ struct{} `type:"structure"` - - // A time you added a public key to CloudFront. - // - // CreatedTime is a required field - CreatedTime *time.Time `type:"timestamp" required:"true"` - - // A unique ID assigned to a public key you've added to CloudFront. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // A complex data type for a public key you add to CloudFront to use with features - // like field-level encryption. - // - // PublicKeyConfig is a required field - PublicKeyConfig *PublicKeyConfig `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PublicKey) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublicKey) GoString() string { - return s.String() -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *PublicKey) SetCreatedTime(v time.Time) *PublicKey { - s.CreatedTime = &v - return s -} - -// SetId sets the Id field's value. -func (s *PublicKey) SetId(v string) *PublicKey { - s.Id = &v - return s -} - -// SetPublicKeyConfig sets the PublicKeyConfig field's value. -func (s *PublicKey) SetPublicKeyConfig(v *PublicKeyConfig) *PublicKey { - s.PublicKeyConfig = v - return s -} - -// Information about a public key you add to CloudFront to use with features -// like field-level encryption. -type PublicKeyConfig struct { - _ struct{} `type:"structure"` - - // A unique number that ensures that the request can't be replayed. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // An optional comment about a public key. - Comment *string `type:"string"` - - // The encoded public key that you want to add to CloudFront to use with features - // like field-level encryption. - // - // EncodedKey is a required field - EncodedKey *string `type:"string" required:"true"` - - // The name for a public key you add to CloudFront to use with features like - // field-level encryption. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PublicKeyConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublicKeyConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PublicKeyConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PublicKeyConfig"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.EncodedKey == nil { - invalidParams.Add(request.NewErrParamRequired("EncodedKey")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCallerReference sets the CallerReference field's value. -func (s *PublicKeyConfig) SetCallerReference(v string) *PublicKeyConfig { - s.CallerReference = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *PublicKeyConfig) SetComment(v string) *PublicKeyConfig { - s.Comment = &v - return s -} - -// SetEncodedKey sets the EncodedKey field's value. -func (s *PublicKeyConfig) SetEncodedKey(v string) *PublicKeyConfig { - s.EncodedKey = &v - return s -} - -// SetName sets the Name field's value. -func (s *PublicKeyConfig) SetName(v string) *PublicKeyConfig { - s.Name = &v - return s -} - -// A list of public keys you've added to CloudFront to use with features like -// field-level encryption. -type PublicKeyList struct { - _ struct{} `type:"structure"` - - // An array of information about a public key you add to CloudFront to use with - // features like field-level encryption. - Items []*PublicKeySummary `locationNameList:"PublicKeySummary" type:"list"` - - // The maximum number of public keys you want in the response body. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If there are more elements to be listed, this element is present and contains - // the value that you can use for the Marker request parameter to continue listing - // your public keys where you left off. - NextMarker *string `type:"string"` - - // The number of public keys you added to CloudFront to use with features like - // field-level encryption. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s PublicKeyList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublicKeyList) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *PublicKeyList) SetItems(v []*PublicKeySummary) *PublicKeyList { - s.Items = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *PublicKeyList) SetMaxItems(v int64) *PublicKeyList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *PublicKeyList) SetNextMarker(v string) *PublicKeyList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *PublicKeyList) SetQuantity(v int64) *PublicKeyList { - s.Quantity = &v - return s -} - -// A complex data type for public key information. -type PublicKeySummary struct { - _ struct{} `type:"structure"` - - // Comment for public key information summary. - Comment *string `type:"string"` - - // Creation time for public key information summary. - // - // CreatedTime is a required field - CreatedTime *time.Time `type:"timestamp" required:"true"` - - // Encoded key for public key information summary. - // - // EncodedKey is a required field - EncodedKey *string `type:"string" required:"true"` - - // ID for public key information summary. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // Name for public key information summary. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PublicKeySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublicKeySummary) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *PublicKeySummary) SetComment(v string) *PublicKeySummary { - s.Comment = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *PublicKeySummary) SetCreatedTime(v time.Time) *PublicKeySummary { - s.CreatedTime = &v - return s -} - -// SetEncodedKey sets the EncodedKey field's value. -func (s *PublicKeySummary) SetEncodedKey(v string) *PublicKeySummary { - s.EncodedKey = &v - return s -} - -// SetId sets the Id field's value. -func (s *PublicKeySummary) SetId(v string) *PublicKeySummary { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *PublicKeySummary) SetName(v string) *PublicKeySummary { - s.Name = &v - return s -} - -// Query argument-profile mapping for field-level encryption. -type QueryArgProfile struct { - _ struct{} `type:"structure"` - - // ID of profile to use for field-level encryption query argument-profile mapping - // - // ProfileId is a required field - ProfileId *string `type:"string" required:"true"` - - // Query argument for field-level encryption query argument-profile mapping. - // - // QueryArg is a required field - QueryArg *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s QueryArgProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryArgProfile) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *QueryArgProfile) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "QueryArgProfile"} - if s.ProfileId == nil { - invalidParams.Add(request.NewErrParamRequired("ProfileId")) - } - if s.QueryArg == nil { - invalidParams.Add(request.NewErrParamRequired("QueryArg")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetProfileId sets the ProfileId field's value. -func (s *QueryArgProfile) SetProfileId(v string) *QueryArgProfile { - s.ProfileId = &v - return s -} - -// SetQueryArg sets the QueryArg field's value. -func (s *QueryArgProfile) SetQueryArg(v string) *QueryArgProfile { - s.QueryArg = &v - return s -} - -// Configuration for query argument-profile mapping for field-level encryption. -type QueryArgProfileConfig struct { - _ struct{} `type:"structure"` - - // Flag to set if you want a request to be forwarded to the origin even if the - // profile specified by the field-level encryption query argument, fle-profile, - // is unknown. - // - // ForwardWhenQueryArgProfileIsUnknown is a required field - ForwardWhenQueryArgProfileIsUnknown *bool `type:"boolean" required:"true"` - - // Profiles specified for query argument-profile mapping for field-level encryption. - QueryArgProfiles *QueryArgProfiles `type:"structure"` -} - -// String returns the string representation -func (s QueryArgProfileConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryArgProfileConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *QueryArgProfileConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "QueryArgProfileConfig"} - if s.ForwardWhenQueryArgProfileIsUnknown == nil { - invalidParams.Add(request.NewErrParamRequired("ForwardWhenQueryArgProfileIsUnknown")) - } - if s.QueryArgProfiles != nil { - if err := s.QueryArgProfiles.Validate(); err != nil { - invalidParams.AddNested("QueryArgProfiles", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForwardWhenQueryArgProfileIsUnknown sets the ForwardWhenQueryArgProfileIsUnknown field's value. -func (s *QueryArgProfileConfig) SetForwardWhenQueryArgProfileIsUnknown(v bool) *QueryArgProfileConfig { - s.ForwardWhenQueryArgProfileIsUnknown = &v - return s -} - -// SetQueryArgProfiles sets the QueryArgProfiles field's value. -func (s *QueryArgProfileConfig) SetQueryArgProfiles(v *QueryArgProfiles) *QueryArgProfileConfig { - s.QueryArgProfiles = v - return s -} - -// Query argument-profile mapping for field-level encryption. -type QueryArgProfiles struct { - _ struct{} `type:"structure"` - - // Number of items for query argument-profile mapping for field-level encryption. - Items []*QueryArgProfile `locationNameList:"QueryArgProfile" type:"list"` - - // Number of profiles for query argument-profile mapping for field-level encryption. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s QueryArgProfiles) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryArgProfiles) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *QueryArgProfiles) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "QueryArgProfiles"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *QueryArgProfiles) SetItems(v []*QueryArgProfile) *QueryArgProfiles { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *QueryArgProfiles) SetQuantity(v int64) *QueryArgProfiles { - s.Quantity = &v - return s -} - -type QueryStringCacheKeys struct { - _ struct{} `type:"structure"` - - // (Optional) A list that contains the query string parameters that you want - // CloudFront to use as a basis for caching for this cache behavior. If Quantity - // is 0, you can omit Items. - Items []*string `locationNameList:"Name" type:"list"` - - // The number of whitelisted query string parameters for this cache behavior. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s QueryStringCacheKeys) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryStringCacheKeys) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *QueryStringCacheKeys) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "QueryStringCacheKeys"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *QueryStringCacheKeys) SetItems(v []*string) *QueryStringCacheKeys { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *QueryStringCacheKeys) SetQuantity(v int64) *QueryStringCacheKeys { - s.Quantity = &v - return s -} - -// A complex type that identifies ways in which you want to restrict distribution -// of your content. -type Restrictions struct { - _ struct{} `type:"structure"` - - // A complex type that controls the countries in which your content is distributed. - // CloudFront determines the location of your users using MaxMind GeoIP databases. - // - // GeoRestriction is a required field - GeoRestriction *GeoRestriction `type:"structure" required:"true"` -} - -// String returns the string representation -func (s Restrictions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Restrictions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Restrictions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Restrictions"} - if s.GeoRestriction == nil { - invalidParams.Add(request.NewErrParamRequired("GeoRestriction")) - } - if s.GeoRestriction != nil { - if err := s.GeoRestriction.Validate(); err != nil { - invalidParams.AddNested("GeoRestriction", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGeoRestriction sets the GeoRestriction field's value. -func (s *Restrictions) SetGeoRestriction(v *GeoRestriction) *Restrictions { - s.GeoRestriction = v - return s -} - -// A complex type that contains information about the Amazon S3 bucket from -// which you want CloudFront to get your media files for distribution. -type S3Origin struct { - _ struct{} `type:"structure"` - - // The DNS name of the Amazon S3 origin. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // The CloudFront origin access identity to associate with the RTMP distribution. - // Use an origin access identity to configure the distribution so that end users - // can only access objects in an Amazon S3 bucket through CloudFront. - // - // If you want end users to be able to access objects using either the CloudFront - // URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element. - // - // To delete the origin access identity from an existing distribution, update - // the distribution configuration and include an empty OriginAccessIdentity - // element. - // - // To replace the origin access identity, update the distribution configuration - // and specify the new origin access identity. - // - // For more information, see Using an Origin Access Identity to Restrict Access - // to Your Amazon S3 Content (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html) - // in the Amazon Amazon CloudFront Developer Guide. - // - // OriginAccessIdentity is a required field - OriginAccessIdentity *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s S3Origin) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Origin) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3Origin) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3Origin"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.OriginAccessIdentity == nil { - invalidParams.Add(request.NewErrParamRequired("OriginAccessIdentity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *S3Origin) SetDomainName(v string) *S3Origin { - s.DomainName = &v - return s -} - -// SetOriginAccessIdentity sets the OriginAccessIdentity field's value. -func (s *S3Origin) SetOriginAccessIdentity(v string) *S3Origin { - s.OriginAccessIdentity = &v - return s -} - -// A complex type that contains information about the Amazon S3 origin. If the -// origin is a custom origin, use the CustomOriginConfig element instead. -type S3OriginConfig struct { - _ struct{} `type:"structure"` - - // The CloudFront origin access identity to associate with the origin. Use an - // origin access identity to configure the origin so that viewers can only access - // objects in an Amazon S3 bucket through CloudFront. The format of the value - // is: - // - // origin-access-identity/cloudfront/ID-of-origin-access-identity - // - // where ID-of-origin-access-identity is the value that CloudFront returned - // in the ID element when you created the origin access identity. - // - // If you want viewers to be able to access objects using either the CloudFront - // URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element. - // - // To delete the origin access identity from an existing distribution, update - // the distribution configuration and include an empty OriginAccessIdentity - // element. - // - // To replace the origin access identity, update the distribution configuration - // and specify the new origin access identity. - // - // For more information about the origin access identity, see Serving Private - // Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon CloudFront Developer Guide. - // - // OriginAccessIdentity is a required field - OriginAccessIdentity *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s S3OriginConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3OriginConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3OriginConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3OriginConfig"} - if s.OriginAccessIdentity == nil { - invalidParams.Add(request.NewErrParamRequired("OriginAccessIdentity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOriginAccessIdentity sets the OriginAccessIdentity field's value. -func (s *S3OriginConfig) SetOriginAccessIdentity(v string) *S3OriginConfig { - s.OriginAccessIdentity = &v - return s -} - -// A complex type that lists the AWS accounts that were included in the TrustedSigners -// complex type, as well as their active CloudFront key pair IDs, if any. -type Signer struct { - _ struct{} `type:"structure"` - - // An AWS account that is included in the TrustedSigners complex type for this - // RTMP distribution. Valid values include: - // - // * self, which is the AWS account used to create the distribution. - // - // * An AWS account number. - AwsAccountNumber *string `type:"string"` - - // A complex type that lists the active CloudFront key pairs, if any, that are - // associated with AwsAccountNumber. - KeyPairIds *KeyPairIds `type:"structure"` -} - -// String returns the string representation -func (s Signer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Signer) GoString() string { - return s.String() -} - -// SetAwsAccountNumber sets the AwsAccountNumber field's value. -func (s *Signer) SetAwsAccountNumber(v string) *Signer { - s.AwsAccountNumber = &v - return s -} - -// SetKeyPairIds sets the KeyPairIds field's value. -func (s *Signer) SetKeyPairIds(v *KeyPairIds) *Signer { - s.KeyPairIds = v - return s -} - -// A complex data type for the status codes that you specify that, when returned -// by a primary origin, trigger CloudFront to failover to a second origin. -type StatusCodes struct { - _ struct{} `type:"structure"` - - // The items (status codes) for an origin group. - // - // Items is a required field - Items []*int64 `locationNameList:"StatusCode" min:"1" type:"list" required:"true"` - - // The number of status codes. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s StatusCodes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StatusCodes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StatusCodes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StatusCodes"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Items != nil && len(s.Items) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Items", 1)) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *StatusCodes) SetItems(v []*int64) *StatusCodes { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *StatusCodes) SetQuantity(v int64) *StatusCodes { - s.Quantity = &v - return s -} - -// A streaming distribution. -type StreamingDistribution struct { - _ struct{} `type:"structure"` - - // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, - // where 123456789012 is your AWS account ID. - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // A complex type that lists the AWS accounts, if any, that you included in - // the TrustedSigners complex type for this distribution. These are the accounts - // that you want to allow to create signed URLs for private content. - // - // The Signer complex type lists the AWS account number of the trusted signer - // or self if the signer is the AWS account that created the distribution. The - // Signer element also includes the IDs of any active CloudFront key pairs that - // are associated with the trusted signer's AWS account. If no KeyPairId element - // appears for a Signer, that signer can't create signed URLs. - // - // For more information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon CloudFront Developer Guide. - // - // ActiveTrustedSigners is a required field - ActiveTrustedSigners *ActiveTrustedSigners `type:"structure" required:"true"` - - // The domain name that corresponds to the streaming distribution, for example, - // s5c39gqb8ow64r.cloudfront.net. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // The identifier for the RTMP distribution. For example: EGTXBD79EXAMPLE. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The date and time that the distribution was last modified. - LastModifiedTime *time.Time `type:"timestamp"` - - // The current status of the RTMP distribution. When the status is Deployed, - // the distribution's information is propagated to all CloudFront edge locations. - // - // Status is a required field - Status *string `type:"string" required:"true"` - - // The current configuration information for the RTMP distribution. - // - // StreamingDistributionConfig is a required field - StreamingDistributionConfig *StreamingDistributionConfig `type:"structure" required:"true"` -} - -// String returns the string representation -func (s StreamingDistribution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StreamingDistribution) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *StreamingDistribution) SetARN(v string) *StreamingDistribution { - s.ARN = &v - return s -} - -// SetActiveTrustedSigners sets the ActiveTrustedSigners field's value. -func (s *StreamingDistribution) SetActiveTrustedSigners(v *ActiveTrustedSigners) *StreamingDistribution { - s.ActiveTrustedSigners = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *StreamingDistribution) SetDomainName(v string) *StreamingDistribution { - s.DomainName = &v - return s -} - -// SetId sets the Id field's value. -func (s *StreamingDistribution) SetId(v string) *StreamingDistribution { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *StreamingDistribution) SetLastModifiedTime(v time.Time) *StreamingDistribution { - s.LastModifiedTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StreamingDistribution) SetStatus(v string) *StreamingDistribution { - s.Status = &v - return s -} - -// SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value. -func (s *StreamingDistribution) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *StreamingDistribution { - s.StreamingDistributionConfig = v - return s -} - -// The RTMP distribution's configuration information. -type StreamingDistributionConfig struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about CNAMEs (alternate domain names), - // if any, for this streaming distribution. - Aliases *Aliases `type:"structure"` - - // A unique value (for example, a date-time stamp) that ensures that the request - // can't be replayed. - // - // If the value of CallerReference is new (regardless of the content of the - // StreamingDistributionConfig object), CloudFront creates a new distribution. - // - // If CallerReference is a value that you already sent in a previous request - // to create a distribution, CloudFront returns a DistributionAlreadyExists - // error. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // Any comments you want to include about the streaming distribution. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` - - // Whether the streaming distribution is enabled to accept user requests for - // content. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // A complex type that controls whether access logs are written for the streaming - // distribution. - Logging *StreamingLoggingConfig `type:"structure"` - - // A complex type that contains information about price class for this streaming - // distribution. - PriceClass *string `type:"string" enum:"PriceClass"` - - // A complex type that contains information about the Amazon S3 bucket from - // which you want CloudFront to get your media files for distribution. - // - // S3Origin is a required field - S3Origin *S3Origin `type:"structure" required:"true"` - - // A complex type that specifies any AWS accounts that you want to permit to - // create signed URLs for private content. If you want the distribution to use - // signed URLs, include this element; if you want the distribution to use public - // URLs, remove this element. For more information, see Serving Private Content - // through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon CloudFront Developer Guide. - // - // TrustedSigners is a required field - TrustedSigners *TrustedSigners `type:"structure" required:"true"` -} - -// String returns the string representation -func (s StreamingDistributionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StreamingDistributionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StreamingDistributionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StreamingDistributionConfig"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.Comment == nil { - invalidParams.Add(request.NewErrParamRequired("Comment")) - } - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.S3Origin == nil { - invalidParams.Add(request.NewErrParamRequired("S3Origin")) - } - if s.TrustedSigners == nil { - invalidParams.Add(request.NewErrParamRequired("TrustedSigners")) - } - if s.Aliases != nil { - if err := s.Aliases.Validate(); err != nil { - invalidParams.AddNested("Aliases", err.(request.ErrInvalidParams)) - } - } - if s.Logging != nil { - if err := s.Logging.Validate(); err != nil { - invalidParams.AddNested("Logging", err.(request.ErrInvalidParams)) - } - } - if s.S3Origin != nil { - if err := s.S3Origin.Validate(); err != nil { - invalidParams.AddNested("S3Origin", err.(request.ErrInvalidParams)) - } - } - if s.TrustedSigners != nil { - if err := s.TrustedSigners.Validate(); err != nil { - invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliases sets the Aliases field's value. -func (s *StreamingDistributionConfig) SetAliases(v *Aliases) *StreamingDistributionConfig { - s.Aliases = v - return s -} - -// SetCallerReference sets the CallerReference field's value. -func (s *StreamingDistributionConfig) SetCallerReference(v string) *StreamingDistributionConfig { - s.CallerReference = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *StreamingDistributionConfig) SetComment(v string) *StreamingDistributionConfig { - s.Comment = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *StreamingDistributionConfig) SetEnabled(v bool) *StreamingDistributionConfig { - s.Enabled = &v - return s -} - -// SetLogging sets the Logging field's value. -func (s *StreamingDistributionConfig) SetLogging(v *StreamingLoggingConfig) *StreamingDistributionConfig { - s.Logging = v - return s -} - -// SetPriceClass sets the PriceClass field's value. -func (s *StreamingDistributionConfig) SetPriceClass(v string) *StreamingDistributionConfig { - s.PriceClass = &v - return s -} - -// SetS3Origin sets the S3Origin field's value. -func (s *StreamingDistributionConfig) SetS3Origin(v *S3Origin) *StreamingDistributionConfig { - s.S3Origin = v - return s -} - -// SetTrustedSigners sets the TrustedSigners field's value. -func (s *StreamingDistributionConfig) SetTrustedSigners(v *TrustedSigners) *StreamingDistributionConfig { - s.TrustedSigners = v - return s -} - -// A streaming distribution Configuration and a list of tags to be associated -// with the streaming distribution. -type StreamingDistributionConfigWithTags struct { - _ struct{} `type:"structure"` - - // A streaming distribution Configuration. - // - // StreamingDistributionConfig is a required field - StreamingDistributionConfig *StreamingDistributionConfig `type:"structure" required:"true"` - - // A complex type that contains zero or more Tag elements. - // - // Tags is a required field - Tags *Tags `type:"structure" required:"true"` -} - -// String returns the string representation -func (s StreamingDistributionConfigWithTags) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StreamingDistributionConfigWithTags) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StreamingDistributionConfigWithTags) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StreamingDistributionConfigWithTags"} - if s.StreamingDistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.StreamingDistributionConfig != nil { - if err := s.StreamingDistributionConfig.Validate(); err != nil { - invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - if err := s.Tags.Validate(); err != nil { - invalidParams.AddNested("Tags", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value. -func (s *StreamingDistributionConfigWithTags) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *StreamingDistributionConfigWithTags { - s.StreamingDistributionConfig = v - return s -} - -// SetTags sets the Tags field's value. -func (s *StreamingDistributionConfigWithTags) SetTags(v *Tags) *StreamingDistributionConfigWithTags { - s.Tags = v - return s -} - -// A streaming distribution list. -type StreamingDistributionList struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether more streaming distributions remain to be listed. - // If your results were truncated, you can make a follow-up pagination request - // using the Marker request parameter to retrieve more distributions in the - // list. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // A complex type that contains one StreamingDistributionSummary element for - // each distribution that was created by the current AWS account. - Items []*StreamingDistributionSummary `locationNameList:"StreamingDistributionSummary" type:"list"` - - // The value you provided for the Marker request parameter. - // - // Marker is a required field - Marker *string `type:"string" required:"true"` - - // The value you provided for the MaxItems request parameter. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If IsTruncated is true, this element is present and contains the value you - // can use for the Marker request parameter to continue listing your RTMP distributions - // where they left off. - NextMarker *string `type:"string"` - - // The number of streaming distributions that were created by the current AWS - // account. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s StreamingDistributionList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StreamingDistributionList) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *StreamingDistributionList) SetIsTruncated(v bool) *StreamingDistributionList { - s.IsTruncated = &v - return s -} - -// SetItems sets the Items field's value. -func (s *StreamingDistributionList) SetItems(v []*StreamingDistributionSummary) *StreamingDistributionList { - s.Items = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *StreamingDistributionList) SetMarker(v string) *StreamingDistributionList { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *StreamingDistributionList) SetMaxItems(v int64) *StreamingDistributionList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *StreamingDistributionList) SetNextMarker(v string) *StreamingDistributionList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *StreamingDistributionList) SetQuantity(v int64) *StreamingDistributionList { - s.Quantity = &v - return s -} - -// A summary of the information for an Amazon CloudFront streaming distribution. -type StreamingDistributionSummary struct { - _ struct{} `type:"structure"` - - // The ARN (Amazon Resource Name) for the streaming distribution. For example: - // arn:aws:cloudfront::123456789012:streaming-distribution/EDFDVBD632BHDS5, - // where 123456789012 is your AWS account ID. - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // A complex type that contains information about CNAMEs (alternate domain names), - // if any, for this streaming distribution. - // - // Aliases is a required field - Aliases *Aliases `type:"structure" required:"true"` - - // The comment originally specified when this distribution was created. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` - - // The domain name corresponding to the distribution, for example, d111111abcdef8.cloudfront.net. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // Whether the distribution is enabled to accept end user requests for content. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // The identifier for the distribution, for example, EDFDVBD632BHDS5. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The date and time the distribution was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // PriceClass is a required field - PriceClass *string `type:"string" required:"true" enum:"PriceClass"` - - // A complex type that contains information about the Amazon S3 bucket from - // which you want CloudFront to get your media files for distribution. - // - // S3Origin is a required field - S3Origin *S3Origin `type:"structure" required:"true"` - - // Indicates the current status of the distribution. When the status is Deployed, - // the distribution's information is fully propagated throughout the Amazon - // CloudFront system. - // - // Status is a required field - Status *string `type:"string" required:"true"` - - // A complex type that specifies the AWS accounts, if any, that you want to - // allow to create signed URLs for private content. If you want to require signed - // URLs in requests for objects in the target origin that match the PathPattern - // for this cache behavior, specify true for Enabled, and specify the applicable - // values for Quantity and Items.If you don't want to require signed URLs in - // requests for objects that match PathPattern, specify false for Enabled and - // 0 for Quantity. Omit Items. To add, change, or remove one or more trusted - // signers, change Enabled to true (if it's currently false), change Quantity - // as applicable, and specify all of the trusted signers that you want to include - // in the updated distribution. - // - // TrustedSigners is a required field - TrustedSigners *TrustedSigners `type:"structure" required:"true"` -} - -// String returns the string representation -func (s StreamingDistributionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StreamingDistributionSummary) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *StreamingDistributionSummary) SetARN(v string) *StreamingDistributionSummary { - s.ARN = &v - return s -} - -// SetAliases sets the Aliases field's value. -func (s *StreamingDistributionSummary) SetAliases(v *Aliases) *StreamingDistributionSummary { - s.Aliases = v - return s -} - -// SetComment sets the Comment field's value. -func (s *StreamingDistributionSummary) SetComment(v string) *StreamingDistributionSummary { - s.Comment = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *StreamingDistributionSummary) SetDomainName(v string) *StreamingDistributionSummary { - s.DomainName = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *StreamingDistributionSummary) SetEnabled(v bool) *StreamingDistributionSummary { - s.Enabled = &v - return s -} - -// SetId sets the Id field's value. -func (s *StreamingDistributionSummary) SetId(v string) *StreamingDistributionSummary { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *StreamingDistributionSummary) SetLastModifiedTime(v time.Time) *StreamingDistributionSummary { - s.LastModifiedTime = &v - return s -} - -// SetPriceClass sets the PriceClass field's value. -func (s *StreamingDistributionSummary) SetPriceClass(v string) *StreamingDistributionSummary { - s.PriceClass = &v - return s -} - -// SetS3Origin sets the S3Origin field's value. -func (s *StreamingDistributionSummary) SetS3Origin(v *S3Origin) *StreamingDistributionSummary { - s.S3Origin = v - return s -} - -// SetStatus sets the Status field's value. -func (s *StreamingDistributionSummary) SetStatus(v string) *StreamingDistributionSummary { - s.Status = &v - return s -} - -// SetTrustedSigners sets the TrustedSigners field's value. -func (s *StreamingDistributionSummary) SetTrustedSigners(v *TrustedSigners) *StreamingDistributionSummary { - s.TrustedSigners = v - return s -} - -// A complex type that controls whether access logs are written for this streaming -// distribution. -type StreamingLoggingConfig struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com. - // - // Bucket is a required field - Bucket *string `type:"string" required:"true"` - - // Specifies whether you want CloudFront to save access logs to an Amazon S3 - // bucket. If you don't want to enable logging when you create a streaming distribution - // or if you want to disable logging for an existing streaming distribution, - // specify false for Enabled, and specify empty Bucket and Prefix elements. - // If you specify false for Enabled but you specify values for Bucket and Prefix, - // the values are automatically deleted. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // An optional string that you want CloudFront to prefix to the access log filenames - // for this streaming distribution, for example, myprefix/. If you want to enable - // logging, but you don't want to specify a prefix, you still must include an - // empty Prefix element in the Logging element. - // - // Prefix is a required field - Prefix *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StreamingLoggingConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StreamingLoggingConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StreamingLoggingConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StreamingLoggingConfig"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.Prefix == nil { - invalidParams.Add(request.NewErrParamRequired("Prefix")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *StreamingLoggingConfig) SetBucket(v string) *StreamingLoggingConfig { - s.Bucket = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *StreamingLoggingConfig) SetEnabled(v bool) *StreamingLoggingConfig { - s.Enabled = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *StreamingLoggingConfig) SetPrefix(v string) *StreamingLoggingConfig { - s.Prefix = &v - return s -} - -// A complex type that contains Tag key and Tag value. -type Tag struct { - _ struct{} `type:"structure"` - - // A string that contains Tag key. - // - // The string length should be between 1 and 128 characters. Valid characters - // include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // A string that contains an optional Tag value. - // - // The string length should be between 0 and 256 characters. Valid characters - // include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// A complex type that contains zero or more Tag elements. -type TagKeys struct { - _ struct{} `type:"structure"` - - // A complex type that contains Tag key elements. - Items []*string `locationNameList:"Key" type:"list"` -} - -// String returns the string representation -func (s TagKeys) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagKeys) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *TagKeys) SetItems(v []*string) *TagKeys { - s.Items = v - return s -} - -// The request to add tags to a CloudFront resource. -type TagResourceInput struct { - _ struct{} `type:"structure" payload:"Tags"` - - // An ARN of a CloudFront resource. - // - // Resource is a required field - Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"` - - // A complex type that contains zero or more Tag elements. - // - // Tags is a required field - Tags *Tags `locationName:"Tags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` -} - -// 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.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - if err := s.Tags.Validate(); err != nil { - invalidParams.AddNested("Tags", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResource sets the Resource field's value. -func (s *TagResourceInput) SetResource(v string) *TagResourceInput { - s.Resource = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v *Tags) *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() -} - -// A complex type that contains zero or more Tag elements. -type Tags struct { - _ struct{} `type:"structure"` - - // A complex type that contains Tag elements. - Items []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s Tags) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tags) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tags) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tags"} - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *Tags) SetItems(v []*Tag) *Tags { - s.Items = v - return s -} - -// A complex type that specifies the AWS accounts, if any, that you want to -// allow to create signed URLs for private content. -// -// If you want to require signed URLs in requests for objects in the target -// origin that match the PathPattern for this cache behavior, specify true for -// Enabled, and specify the applicable values for Quantity and Items. For more -// information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) -// in the Amazon Amazon CloudFront Developer Guide. -// -// If you don't want to require signed URLs in requests for objects that match -// PathPattern, specify false for Enabled and 0 for Quantity. Omit Items. -// -// To add, change, or remove one or more trusted signers, change Enabled to -// true (if it's currently false), change Quantity as applicable, and specify -// all of the trusted signers that you want to include in the updated distribution. -// -// For more information about updating the distribution configuration, see DistributionConfig -// . -type TrustedSigners struct { - _ struct{} `type:"structure"` - - // Specifies whether you want to require viewers to use signed URLs to access - // the files specified by PathPattern and TargetOriginId. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // Optional: A complex type that contains trusted signers for this cache behavior. - // If Quantity is 0, you can omit Items. - Items []*string `locationNameList:"AwsAccountNumber" type:"list"` - - // The number of trusted signers for this cache behavior. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s TrustedSigners) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TrustedSigners) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TrustedSigners) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TrustedSigners"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *TrustedSigners) SetEnabled(v bool) *TrustedSigners { - s.Enabled = &v - return s -} - -// SetItems sets the Items field's value. -func (s *TrustedSigners) SetItems(v []*string) *TrustedSigners { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *TrustedSigners) SetQuantity(v int64) *TrustedSigners { - s.Quantity = &v - return s -} - -// The request to remove tags from a CloudFront resource. -type UntagResourceInput struct { - _ struct{} `type:"structure" payload:"TagKeys"` - - // An ARN of a CloudFront resource. - // - // Resource is a required field - Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"` - - // A complex type that contains zero or more Tag key elements. - // - // TagKeys is a required field - TagKeys *TagKeys `locationName:"TagKeys" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` -} - -// 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.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResource sets the Resource field's value. -func (s *UntagResourceInput) SetResource(v string) *UntagResourceInput { - s.Resource = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v *TagKeys) *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() -} - -// The request to update an origin access identity. -type UpdateCloudFrontOriginAccessIdentityInput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"` - - // The identity's configuration information. - // - // CloudFrontOriginAccessIdentityConfig is a required field - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` - - // The identity's id. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the identity's - // configuration. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` -} - -// String returns the string representation -func (s UpdateCloudFrontOriginAccessIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCloudFrontOriginAccessIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCloudFrontOriginAccessIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCloudFrontOriginAccessIdentityInput"} - if s.CloudFrontOriginAccessIdentityConfig == nil { - invalidParams.Add(request.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.CloudFrontOriginAccessIdentityConfig != nil { - if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil { - invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value. -func (s *UpdateCloudFrontOriginAccessIdentityInput) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *UpdateCloudFrontOriginAccessIdentityInput { - s.CloudFrontOriginAccessIdentityConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateCloudFrontOriginAccessIdentityInput) SetId(v string) *UpdateCloudFrontOriginAccessIdentityInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateCloudFrontOriginAccessIdentityInput) SetIfMatch(v string) *UpdateCloudFrontOriginAccessIdentityInput { - s.IfMatch = &v - return s -} - -// The returned result of the corresponding request. -type UpdateCloudFrontOriginAccessIdentityOutput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"` - - // The origin access identity's information. - CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"` - - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` -} - -// String returns the string representation -func (s UpdateCloudFrontOriginAccessIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCloudFrontOriginAccessIdentityOutput) GoString() string { - return s.String() -} - -// SetCloudFrontOriginAccessIdentity sets the CloudFrontOriginAccessIdentity field's value. -func (s *UpdateCloudFrontOriginAccessIdentityOutput) SetCloudFrontOriginAccessIdentity(v *OriginAccessIdentity) *UpdateCloudFrontOriginAccessIdentityOutput { - s.CloudFrontOriginAccessIdentity = v - return s -} - -// SetETag sets the ETag field's value. -func (s *UpdateCloudFrontOriginAccessIdentityOutput) SetETag(v string) *UpdateCloudFrontOriginAccessIdentityOutput { - s.ETag = &v - return s -} - -// The request to update a distribution. -type UpdateDistributionInput struct { - _ struct{} `type:"structure" payload:"DistributionConfig"` - - // The distribution's configuration information. - // - // DistributionConfig is a required field - DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` - - // The distribution's id. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the distribution's - // configuration. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` -} - -// String returns the string representation -func (s UpdateDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDistributionInput"} - if s.DistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionConfig")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.DistributionConfig != nil { - if err := s.DistributionConfig.Validate(); err != nil { - invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionConfig sets the DistributionConfig field's value. -func (s *UpdateDistributionInput) SetDistributionConfig(v *DistributionConfig) *UpdateDistributionInput { - s.DistributionConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateDistributionInput) SetId(v string) *UpdateDistributionInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateDistributionInput) SetIfMatch(v string) *UpdateDistributionInput { - s.IfMatch = &v - return s -} - -// The returned result of the corresponding request. -type UpdateDistributionOutput struct { - _ struct{} `type:"structure" payload:"Distribution"` - - // The distribution's information. - Distribution *Distribution `type:"structure"` - - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` -} - -// String returns the string representation -func (s UpdateDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDistributionOutput) GoString() string { - return s.String() -} - -// SetDistribution sets the Distribution field's value. -func (s *UpdateDistributionOutput) SetDistribution(v *Distribution) *UpdateDistributionOutput { - s.Distribution = v - return s -} - -// SetETag sets the ETag field's value. -func (s *UpdateDistributionOutput) SetETag(v string) *UpdateDistributionOutput { - s.ETag = &v - return s -} - -type UpdateFieldLevelEncryptionConfigInput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionConfig"` - - // Request to update a field-level encryption configuration. - // - // FieldLevelEncryptionConfig is a required field - FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` - - // The ID of the configuration you want to update. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the configuration - // identity to update. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` -} - -// String returns the string representation -func (s UpdateFieldLevelEncryptionConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFieldLevelEncryptionConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFieldLevelEncryptionConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFieldLevelEncryptionConfigInput"} - if s.FieldLevelEncryptionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionConfig")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.FieldLevelEncryptionConfig != nil { - if err := s.FieldLevelEncryptionConfig.Validate(); err != nil { - invalidParams.AddNested("FieldLevelEncryptionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value. -func (s *UpdateFieldLevelEncryptionConfigInput) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *UpdateFieldLevelEncryptionConfigInput { - s.FieldLevelEncryptionConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateFieldLevelEncryptionConfigInput) SetId(v string) *UpdateFieldLevelEncryptionConfigInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateFieldLevelEncryptionConfigInput) SetIfMatch(v string) *UpdateFieldLevelEncryptionConfigInput { - s.IfMatch = &v - return s -} - -type UpdateFieldLevelEncryptionConfigOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryption"` - - // The value of the ETag header that you received when updating the configuration. - // For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the results of updating the configuration. - FieldLevelEncryption *FieldLevelEncryption `type:"structure"` -} - -// String returns the string representation -func (s UpdateFieldLevelEncryptionConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFieldLevelEncryptionConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *UpdateFieldLevelEncryptionConfigOutput) SetETag(v string) *UpdateFieldLevelEncryptionConfigOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryption sets the FieldLevelEncryption field's value. -func (s *UpdateFieldLevelEncryptionConfigOutput) SetFieldLevelEncryption(v *FieldLevelEncryption) *UpdateFieldLevelEncryptionConfigOutput { - s.FieldLevelEncryption = v - return s -} - -type UpdateFieldLevelEncryptionProfileInput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfileConfig"` - - // Request to update a field-level encryption profile. - // - // FieldLevelEncryptionProfileConfig is a required field - FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` - - // The ID of the field-level encryption profile request. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the profile - // identity to update. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` -} - -// String returns the string representation -func (s UpdateFieldLevelEncryptionProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFieldLevelEncryptionProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFieldLevelEncryptionProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFieldLevelEncryptionProfileInput"} - if s.FieldLevelEncryptionProfileConfig == nil { - invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionProfileConfig")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.FieldLevelEncryptionProfileConfig != nil { - if err := s.FieldLevelEncryptionProfileConfig.Validate(); err != nil { - invalidParams.AddNested("FieldLevelEncryptionProfileConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value. -func (s *UpdateFieldLevelEncryptionProfileInput) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *UpdateFieldLevelEncryptionProfileInput { - s.FieldLevelEncryptionProfileConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateFieldLevelEncryptionProfileInput) SetId(v string) *UpdateFieldLevelEncryptionProfileInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateFieldLevelEncryptionProfileInput) SetIfMatch(v string) *UpdateFieldLevelEncryptionProfileInput { - s.IfMatch = &v - return s -} - -type UpdateFieldLevelEncryptionProfileOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfile"` - - // The result of the field-level encryption profile request. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the results of updating the profile. - FieldLevelEncryptionProfile *FieldLevelEncryptionProfile `type:"structure"` -} - -// String returns the string representation -func (s UpdateFieldLevelEncryptionProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFieldLevelEncryptionProfileOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *UpdateFieldLevelEncryptionProfileOutput) SetETag(v string) *UpdateFieldLevelEncryptionProfileOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryptionProfile sets the FieldLevelEncryptionProfile field's value. -func (s *UpdateFieldLevelEncryptionProfileOutput) SetFieldLevelEncryptionProfile(v *FieldLevelEncryptionProfile) *UpdateFieldLevelEncryptionProfileOutput { - s.FieldLevelEncryptionProfile = v - return s -} - -type UpdatePublicKeyInput struct { - _ struct{} `type:"structure" payload:"PublicKeyConfig"` - - // ID of the public key to be updated. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the public - // key to update. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` - - // Request to update public key information. - // - // PublicKeyConfig is a required field - PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` -} - -// String returns the string representation -func (s UpdatePublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdatePublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdatePublicKeyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.PublicKeyConfig == nil { - invalidParams.Add(request.NewErrParamRequired("PublicKeyConfig")) - } - if s.PublicKeyConfig != nil { - if err := s.PublicKeyConfig.Validate(); err != nil { - invalidParams.AddNested("PublicKeyConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *UpdatePublicKeyInput) SetId(v string) *UpdatePublicKeyInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdatePublicKeyInput) SetIfMatch(v string) *UpdatePublicKeyInput { - s.IfMatch = &v - return s -} - -// SetPublicKeyConfig sets the PublicKeyConfig field's value. -func (s *UpdatePublicKeyInput) SetPublicKeyConfig(v *PublicKeyConfig) *UpdatePublicKeyInput { - s.PublicKeyConfig = v - return s -} - -type UpdatePublicKeyOutput struct { - _ struct{} `type:"structure" payload:"PublicKey"` - - // The current version of the update public key result. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the results of updating the public key. - PublicKey *PublicKey `type:"structure"` -} - -// String returns the string representation -func (s UpdatePublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePublicKeyOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *UpdatePublicKeyOutput) SetETag(v string) *UpdatePublicKeyOutput { - s.ETag = &v - return s -} - -// SetPublicKey sets the PublicKey field's value. -func (s *UpdatePublicKeyOutput) SetPublicKey(v *PublicKey) *UpdatePublicKeyOutput { - s.PublicKey = v - return s -} - -// The request to update a streaming distribution. -type UpdateStreamingDistributionInput struct { - _ struct{} `type:"structure" payload:"StreamingDistributionConfig"` - - // The streaming distribution's id. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the streaming - // distribution's configuration. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` - - // The streaming distribution's configuration information. - // - // StreamingDistributionConfig is a required field - StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` -} - -// String returns the string representation -func (s UpdateStreamingDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStreamingDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateStreamingDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateStreamingDistributionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.StreamingDistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig")) - } - if s.StreamingDistributionConfig != nil { - if err := s.StreamingDistributionConfig.Validate(); err != nil { - invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *UpdateStreamingDistributionInput) SetId(v string) *UpdateStreamingDistributionInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateStreamingDistributionInput) SetIfMatch(v string) *UpdateStreamingDistributionInput { - s.IfMatch = &v - return s -} - -// SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value. -func (s *UpdateStreamingDistributionInput) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *UpdateStreamingDistributionInput { - s.StreamingDistributionConfig = v - return s -} - -// The returned result of the corresponding request. -type UpdateStreamingDistributionOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistribution"` - - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The streaming distribution's information. - StreamingDistribution *StreamingDistribution `type:"structure"` -} - -// String returns the string representation -func (s UpdateStreamingDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStreamingDistributionOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *UpdateStreamingDistributionOutput) SetETag(v string) *UpdateStreamingDistributionOutput { - s.ETag = &v - return s -} - -// SetStreamingDistribution sets the StreamingDistribution field's value. -func (s *UpdateStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDistribution) *UpdateStreamingDistributionOutput { - s.StreamingDistribution = v - return s -} - -// A complex type that specifies the following: -// -// * Whether you want viewers to use HTTP or HTTPS to request your objects. -// -// * If you want viewers to use HTTPS, whether you're using an alternate -// domain name such as example.com or the CloudFront domain name for your -// distribution, such as d111111abcdef8.cloudfront.net. -// -// * If you're using an alternate domain name, whether AWS Certificate Manager -// (ACM) provided the certificate, or you purchased a certificate from a -// third-party certificate authority and imported it into ACM or uploaded -// it to the IAM certificate store. -// -// You must specify only one of the following values: -// -// * ViewerCertificate$ACMCertificateArn -// -// * ViewerCertificate$IAMCertificateId -// -// * ViewerCertificate$CloudFrontDefaultCertificate -// -// Don't specify false for CloudFrontDefaultCertificate. -// -// If you want viewers to use HTTP instead of HTTPS to request your objects: -// Specify the following value: -// -// true -// -// In addition, specify allow-all for ViewerProtocolPolicy for all of your cache -// behaviors. -// -// If you want viewers to use HTTPS to request your objects: Choose the type -// of certificate that you want to use based on whether you're using an alternate -// domain name for your objects or the CloudFront domain name: -// -// * If you're using an alternate domain name, such as example.com: Specify -// one of the following values, depending on whether ACM provided your certificate -// or you purchased your certificate from third-party certificate authority: -// -// ARN for ACM SSL/TLS certificate where -// ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate -// that you want to use for this distribution. -// -// IAM certificate ID where IAM certificate -// ID is the ID that IAM returned when you added the certificate to the IAM -// certificate store. -// -// If you specify ACMCertificateArn or IAMCertificateId, you must also specify -// a value for SSLSupportMethod. -// -// If you choose to use an ACM certificate or a certificate in the IAM certificate -// store, we recommend that you use only an alternate domain name in your -// object URLs (https://example.com/logo.jpg). If you use the domain name -// that is associated with your CloudFront distribution (such as https://d111111abcdef8.cloudfront.net/logo.jpg) -// and the viewer supports SNI, then CloudFront behaves normally. However, -// if the browser does not support SNI, the user's experience depends on -// the value that you choose for SSLSupportMethod: -// -// vip: The viewer displays a warning because there is a mismatch between the -// CloudFront domain name and the domain name in your SSL/TLS certificate. -// -// sni-only: CloudFront drops the connection with the browser without returning -// the object. -// -// * If you're using the CloudFront domain name for your distribution, such -// as d111111abcdef8.cloudfront.net: Specify the following value: -// -// true -// -// If you want viewers to use HTTPS, you must also specify one of the following -// values in your cache behaviors: -// -// * https-only -// -// * redirect-to-https -// -// You can also optionally require that CloudFront use HTTPS to communicate -// with your origin by specifying one of the following values for the applicable -// origins: -// -// * https-only -// -// * match-viewer -// -// For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS) -// in the Amazon CloudFront Developer Guide. -type ViewerCertificate struct { - _ struct{} `type:"structure"` - - // For information about how and when to use ACMCertificateArn, see ViewerCertificate. - ACMCertificateArn *string `type:"string"` - - // This field has been deprecated. Use one of the following fields instead: - // - // * ViewerCertificate$ACMCertificateArn - // - // * ViewerCertificate$IAMCertificateId - // - // * ViewerCertificate$CloudFrontDefaultCertificate - // - // Deprecated: Certificate has been deprecated - Certificate *string `deprecated:"true" type:"string"` - - // This field has been deprecated. Use one of the following fields instead: - // - // * ViewerCertificate$ACMCertificateArn - // - // * ViewerCertificate$IAMCertificateId - // - // * ViewerCertificate$CloudFrontDefaultCertificate - // - // Deprecated: CertificateSource has been deprecated - CertificateSource *string `deprecated:"true" type:"string" enum:"CertificateSource"` - - // For information about how and when to use CloudFrontDefaultCertificate, see - // ViewerCertificate. - CloudFrontDefaultCertificate *bool `type:"boolean"` - - // For information about how and when to use IAMCertificateId, see ViewerCertificate. - IAMCertificateId *string `type:"string"` - - // Specify the security policy that you want CloudFront to use for HTTPS connections. - // A security policy determines two settings: - // - // * The minimum SSL/TLS protocol that CloudFront uses to communicate with - // viewers - // - // * The cipher that CloudFront uses to encrypt the content that it returns - // to viewers - // - // On the CloudFront console, this setting is called Security policy. - // - // We recommend that you specify TLSv1.1_2016 unless your users are using browsers - // or devices that do not support TLSv1.1 or later. - // - // When both of the following are true, you must specify TLSv1 or later for - // the security policy: - // - // * You're using a custom certificate: you specified a value for ACMCertificateArn - // or for IAMCertificateId - // - // * You're using SNI: you specified sni-only for SSLSupportMethod - // - // If you specify true for CloudFrontDefaultCertificate, CloudFront automatically - // sets the security policy to TLSv1 regardless of the value that you specify - // for MinimumProtocolVersion. - // - // For information about the relationship between the security policy that you - // choose and the protocols and ciphers that CloudFront uses to communicate - // with viewers, see Supported SSL/TLS Protocols and Ciphers for Communication - // Between Viewers and CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html#secure-connections-supported-ciphers) - // in the Amazon CloudFront Developer Guide. - MinimumProtocolVersion *string `type:"string" enum:"MinimumProtocolVersion"` - - // If you specify a value for ViewerCertificate$ACMCertificateArn or for ViewerCertificate$IAMCertificateId, - // you must also specify how you want CloudFront to serve HTTPS requests: using - // a method that works for all clients or one that works for most clients: - // - // * vip: CloudFront uses dedicated IP addresses for your content and can - // respond to HTTPS requests from any viewer. However, you will incur additional - // monthly charges. - // - // * sni-only: CloudFront can respond to HTTPS requests from viewers that - // support Server Name Indication (SNI). All modern browsers support SNI, - // but some browsers still in use don't support SNI. If some of your users' - // browsers don't support SNI, we recommend that you do one of the following: - // - // Use the vip option (dedicated IP addresses) instead of sni-only. - // - // Use the CloudFront SSL/TLS certificate instead of a custom certificate. This - // requires that you use the CloudFront domain name of your distribution - // in the URLs for your objects, for example, https://d111111abcdef8.cloudfront.net/logo.png. - // - // If you can control which browser your users use, upgrade the browser to one - // that supports SNI. - // - // Use HTTP instead of HTTPS. - // - // Don't specify a value for SSLSupportMethod if you specified true. - // - // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS.html) - // in the Amazon CloudFront Developer Guide. - SSLSupportMethod *string `type:"string" enum:"SSLSupportMethod"` -} - -// String returns the string representation -func (s ViewerCertificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ViewerCertificate) GoString() string { - return s.String() -} - -// SetACMCertificateArn sets the ACMCertificateArn field's value. -func (s *ViewerCertificate) SetACMCertificateArn(v string) *ViewerCertificate { - s.ACMCertificateArn = &v - return s -} - -// SetCertificate sets the Certificate field's value. -func (s *ViewerCertificate) SetCertificate(v string) *ViewerCertificate { - s.Certificate = &v - return s -} - -// SetCertificateSource sets the CertificateSource field's value. -func (s *ViewerCertificate) SetCertificateSource(v string) *ViewerCertificate { - s.CertificateSource = &v - return s -} - -// SetCloudFrontDefaultCertificate sets the CloudFrontDefaultCertificate field's value. -func (s *ViewerCertificate) SetCloudFrontDefaultCertificate(v bool) *ViewerCertificate { - s.CloudFrontDefaultCertificate = &v - return s -} - -// SetIAMCertificateId sets the IAMCertificateId field's value. -func (s *ViewerCertificate) SetIAMCertificateId(v string) *ViewerCertificate { - s.IAMCertificateId = &v - return s -} - -// SetMinimumProtocolVersion sets the MinimumProtocolVersion field's value. -func (s *ViewerCertificate) SetMinimumProtocolVersion(v string) *ViewerCertificate { - s.MinimumProtocolVersion = &v - return s -} - -// SetSSLSupportMethod sets the SSLSupportMethod field's value. -func (s *ViewerCertificate) SetSSLSupportMethod(v string) *ViewerCertificate { - s.SSLSupportMethod = &v - return s -} - -const ( - // CertificateSourceCloudfront is a CertificateSource enum value - CertificateSourceCloudfront = "cloudfront" - - // CertificateSourceIam is a CertificateSource enum value - CertificateSourceIam = "iam" - - // CertificateSourceAcm is a CertificateSource enum value - CertificateSourceAcm = "acm" -) - -const ( - // EventTypeViewerRequest is a EventType enum value - EventTypeViewerRequest = "viewer-request" - - // EventTypeViewerResponse is a EventType enum value - EventTypeViewerResponse = "viewer-response" - - // EventTypeOriginRequest is a EventType enum value - EventTypeOriginRequest = "origin-request" - - // EventTypeOriginResponse is a EventType enum value - EventTypeOriginResponse = "origin-response" -) - -const ( - // FormatUrlencoded is a Format enum value - FormatUrlencoded = "URLEncoded" -) - -const ( - // GeoRestrictionTypeBlacklist is a GeoRestrictionType enum value - GeoRestrictionTypeBlacklist = "blacklist" - - // GeoRestrictionTypeWhitelist is a GeoRestrictionType enum value - GeoRestrictionTypeWhitelist = "whitelist" - - // GeoRestrictionTypeNone is a GeoRestrictionType enum value - GeoRestrictionTypeNone = "none" -) - -const ( - // HttpVersionHttp11 is a HttpVersion enum value - HttpVersionHttp11 = "http1.1" - - // HttpVersionHttp2 is a HttpVersion enum value - HttpVersionHttp2 = "http2" -) - -const ( - // ItemSelectionNone is a ItemSelection enum value - ItemSelectionNone = "none" - - // ItemSelectionWhitelist is a ItemSelection enum value - ItemSelectionWhitelist = "whitelist" - - // ItemSelectionAll is a ItemSelection enum value - ItemSelectionAll = "all" -) - -const ( - // MethodGet is a Method enum value - MethodGet = "GET" - - // MethodHead is a Method enum value - MethodHead = "HEAD" - - // MethodPost is a Method enum value - MethodPost = "POST" - - // MethodPut is a Method enum value - MethodPut = "PUT" - - // MethodPatch is a Method enum value - MethodPatch = "PATCH" - - // MethodOptions is a Method enum value - MethodOptions = "OPTIONS" - - // MethodDelete is a Method enum value - MethodDelete = "DELETE" -) - -const ( - // MinimumProtocolVersionSslv3 is a MinimumProtocolVersion enum value - MinimumProtocolVersionSslv3 = "SSLv3" - - // MinimumProtocolVersionTlsv1 is a MinimumProtocolVersion enum value - MinimumProtocolVersionTlsv1 = "TLSv1" - - // MinimumProtocolVersionTlsv12016 is a MinimumProtocolVersion enum value - MinimumProtocolVersionTlsv12016 = "TLSv1_2016" - - // MinimumProtocolVersionTlsv112016 is a MinimumProtocolVersion enum value - MinimumProtocolVersionTlsv112016 = "TLSv1.1_2016" - - // MinimumProtocolVersionTlsv122018 is a MinimumProtocolVersion enum value - MinimumProtocolVersionTlsv122018 = "TLSv1.2_2018" -) - -const ( - // OriginProtocolPolicyHttpOnly is a OriginProtocolPolicy enum value - OriginProtocolPolicyHttpOnly = "http-only" - - // OriginProtocolPolicyMatchViewer is a OriginProtocolPolicy enum value - OriginProtocolPolicyMatchViewer = "match-viewer" - - // OriginProtocolPolicyHttpsOnly is a OriginProtocolPolicy enum value - OriginProtocolPolicyHttpsOnly = "https-only" -) - -const ( - // PriceClassPriceClass100 is a PriceClass enum value - PriceClassPriceClass100 = "PriceClass_100" - - // PriceClassPriceClass200 is a PriceClass enum value - PriceClassPriceClass200 = "PriceClass_200" - - // PriceClassPriceClassAll is a PriceClass enum value - PriceClassPriceClassAll = "PriceClass_All" -) - -const ( - // SSLSupportMethodSniOnly is a SSLSupportMethod enum value - SSLSupportMethodSniOnly = "sni-only" - - // SSLSupportMethodVip is a SSLSupportMethod enum value - SSLSupportMethodVip = "vip" -) - -const ( - // SslProtocolSslv3 is a SslProtocol enum value - SslProtocolSslv3 = "SSLv3" - - // SslProtocolTlsv1 is a SslProtocol enum value - SslProtocolTlsv1 = "TLSv1" - - // SslProtocolTlsv11 is a SslProtocol enum value - SslProtocolTlsv11 = "TLSv1.1" - - // SslProtocolTlsv12 is a SslProtocol enum value - SslProtocolTlsv12 = "TLSv1.2" -) - -const ( - // ViewerProtocolPolicyAllowAll is a ViewerProtocolPolicy enum value - ViewerProtocolPolicyAllowAll = "allow-all" - - // ViewerProtocolPolicyHttpsOnly is a ViewerProtocolPolicy enum value - ViewerProtocolPolicyHttpsOnly = "https-only" - - // ViewerProtocolPolicyRedirectToHttps is a ViewerProtocolPolicy enum value - ViewerProtocolPolicyRedirectToHttps = "redirect-to-https" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go deleted file mode 100644 index 27960eab4..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package cloudfront provides the client and types for making API -// requests to Amazon CloudFront. -// -// This is the Amazon CloudFront API Reference. This guide is for developers -// who need detailed information about CloudFront API actions, data types, and -// errors. For detailed information about CloudFront features, see the Amazon -// CloudFront Developer Guide. -// -// See https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05 for more information on this service. -// -// See cloudfront package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudfront/ -// -// Using the Client -// -// To contact Amazon CloudFront with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon CloudFront client CloudFront for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudfront/#New -package cloudfront diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go deleted file mode 100644 index 7cedc1e46..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go +++ /dev/null @@ -1,474 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudfront - -const ( - - // ErrCodeAccessDenied for service response error code - // "AccessDenied". - // - // Access denied. - ErrCodeAccessDenied = "AccessDenied" - - // ErrCodeBatchTooLarge for service response error code - // "BatchTooLarge". - ErrCodeBatchTooLarge = "BatchTooLarge" - - // ErrCodeCNAMEAlreadyExists for service response error code - // "CNAMEAlreadyExists". - ErrCodeCNAMEAlreadyExists = "CNAMEAlreadyExists" - - // ErrCodeCannotChangeImmutablePublicKeyFields for service response error code - // "CannotChangeImmutablePublicKeyFields". - // - // You can't change the value of a public key. - ErrCodeCannotChangeImmutablePublicKeyFields = "CannotChangeImmutablePublicKeyFields" - - // ErrCodeDistributionAlreadyExists for service response error code - // "DistributionAlreadyExists". - // - // The caller reference you attempted to create the distribution with is associated - // with another distribution. - ErrCodeDistributionAlreadyExists = "DistributionAlreadyExists" - - // ErrCodeDistributionNotDisabled for service response error code - // "DistributionNotDisabled". - ErrCodeDistributionNotDisabled = "DistributionNotDisabled" - - // ErrCodeFieldLevelEncryptionConfigAlreadyExists for service response error code - // "FieldLevelEncryptionConfigAlreadyExists". - // - // The specified configuration for field-level encryption already exists. - ErrCodeFieldLevelEncryptionConfigAlreadyExists = "FieldLevelEncryptionConfigAlreadyExists" - - // ErrCodeFieldLevelEncryptionConfigInUse for service response error code - // "FieldLevelEncryptionConfigInUse". - // - // The specified configuration for field-level encryption is in use. - ErrCodeFieldLevelEncryptionConfigInUse = "FieldLevelEncryptionConfigInUse" - - // ErrCodeFieldLevelEncryptionProfileAlreadyExists for service response error code - // "FieldLevelEncryptionProfileAlreadyExists". - // - // The specified profile for field-level encryption already exists. - ErrCodeFieldLevelEncryptionProfileAlreadyExists = "FieldLevelEncryptionProfileAlreadyExists" - - // ErrCodeFieldLevelEncryptionProfileInUse for service response error code - // "FieldLevelEncryptionProfileInUse". - // - // The specified profile for field-level encryption is in use. - ErrCodeFieldLevelEncryptionProfileInUse = "FieldLevelEncryptionProfileInUse" - - // ErrCodeFieldLevelEncryptionProfileSizeExceeded for service response error code - // "FieldLevelEncryptionProfileSizeExceeded". - // - // The maximum size of a profile for field-level encryption was exceeded. - ErrCodeFieldLevelEncryptionProfileSizeExceeded = "FieldLevelEncryptionProfileSizeExceeded" - - // ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior for service response error code - // "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior". - // - // The specified configuration for field-level encryption can't be associated - // with the specified cache behavior. - ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior = "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" - - // ErrCodeIllegalUpdate for service response error code - // "IllegalUpdate". - // - // Origin and CallerReference cannot be updated. - ErrCodeIllegalUpdate = "IllegalUpdate" - - // ErrCodeInconsistentQuantities for service response error code - // "InconsistentQuantities". - // - // The value of Quantity and the size of Items don't match. - ErrCodeInconsistentQuantities = "InconsistentQuantities" - - // ErrCodeInvalidArgument for service response error code - // "InvalidArgument". - // - // The argument is invalid. - ErrCodeInvalidArgument = "InvalidArgument" - - // ErrCodeInvalidDefaultRootObject for service response error code - // "InvalidDefaultRootObject". - // - // The default root object file name is too big or contains an invalid character. - ErrCodeInvalidDefaultRootObject = "InvalidDefaultRootObject" - - // ErrCodeInvalidErrorCode for service response error code - // "InvalidErrorCode". - ErrCodeInvalidErrorCode = "InvalidErrorCode" - - // ErrCodeInvalidForwardCookies for service response error code - // "InvalidForwardCookies". - // - // Your request contains forward cookies option which doesn't match with the - // expectation for the whitelisted list of cookie names. Either list of cookie - // names has been specified when not allowed or list of cookie names is missing - // when expected. - ErrCodeInvalidForwardCookies = "InvalidForwardCookies" - - // ErrCodeInvalidGeoRestrictionParameter for service response error code - // "InvalidGeoRestrictionParameter". - ErrCodeInvalidGeoRestrictionParameter = "InvalidGeoRestrictionParameter" - - // ErrCodeInvalidHeadersForS3Origin for service response error code - // "InvalidHeadersForS3Origin". - ErrCodeInvalidHeadersForS3Origin = "InvalidHeadersForS3Origin" - - // ErrCodeInvalidIfMatchVersion for service response error code - // "InvalidIfMatchVersion". - // - // The If-Match version is missing or not valid for the distribution. - ErrCodeInvalidIfMatchVersion = "InvalidIfMatchVersion" - - // ErrCodeInvalidLambdaFunctionAssociation for service response error code - // "InvalidLambdaFunctionAssociation". - // - // The specified Lambda function association is invalid. - ErrCodeInvalidLambdaFunctionAssociation = "InvalidLambdaFunctionAssociation" - - // ErrCodeInvalidLocationCode for service response error code - // "InvalidLocationCode". - ErrCodeInvalidLocationCode = "InvalidLocationCode" - - // ErrCodeInvalidMinimumProtocolVersion for service response error code - // "InvalidMinimumProtocolVersion". - ErrCodeInvalidMinimumProtocolVersion = "InvalidMinimumProtocolVersion" - - // ErrCodeInvalidOrigin for service response error code - // "InvalidOrigin". - // - // The Amazon S3 origin server specified does not refer to a valid Amazon S3 - // bucket. - ErrCodeInvalidOrigin = "InvalidOrigin" - - // ErrCodeInvalidOriginAccessIdentity for service response error code - // "InvalidOriginAccessIdentity". - // - // The origin access identity is not valid or doesn't exist. - ErrCodeInvalidOriginAccessIdentity = "InvalidOriginAccessIdentity" - - // ErrCodeInvalidOriginKeepaliveTimeout for service response error code - // "InvalidOriginKeepaliveTimeout". - ErrCodeInvalidOriginKeepaliveTimeout = "InvalidOriginKeepaliveTimeout" - - // ErrCodeInvalidOriginReadTimeout for service response error code - // "InvalidOriginReadTimeout". - ErrCodeInvalidOriginReadTimeout = "InvalidOriginReadTimeout" - - // ErrCodeInvalidProtocolSettings for service response error code - // "InvalidProtocolSettings". - // - // You cannot specify SSLv3 as the minimum protocol version if you only want - // to support only clients that support Server Name Indication (SNI). - ErrCodeInvalidProtocolSettings = "InvalidProtocolSettings" - - // ErrCodeInvalidQueryStringParameters for service response error code - // "InvalidQueryStringParameters". - ErrCodeInvalidQueryStringParameters = "InvalidQueryStringParameters" - - // ErrCodeInvalidRelativePath for service response error code - // "InvalidRelativePath". - // - // The relative path is too big, is not URL-encoded, or does not begin with - // a slash (/). - ErrCodeInvalidRelativePath = "InvalidRelativePath" - - // ErrCodeInvalidRequiredProtocol for service response error code - // "InvalidRequiredProtocol". - // - // This operation requires the HTTPS protocol. Ensure that you specify the HTTPS - // protocol in your request, or omit the RequiredProtocols element from your - // distribution configuration. - ErrCodeInvalidRequiredProtocol = "InvalidRequiredProtocol" - - // ErrCodeInvalidResponseCode for service response error code - // "InvalidResponseCode". - ErrCodeInvalidResponseCode = "InvalidResponseCode" - - // ErrCodeInvalidTTLOrder for service response error code - // "InvalidTTLOrder". - ErrCodeInvalidTTLOrder = "InvalidTTLOrder" - - // ErrCodeInvalidTagging for service response error code - // "InvalidTagging". - ErrCodeInvalidTagging = "InvalidTagging" - - // ErrCodeInvalidViewerCertificate for service response error code - // "InvalidViewerCertificate". - ErrCodeInvalidViewerCertificate = "InvalidViewerCertificate" - - // ErrCodeInvalidWebACLId for service response error code - // "InvalidWebACLId". - ErrCodeInvalidWebACLId = "InvalidWebACLId" - - // ErrCodeMissingBody for service response error code - // "MissingBody". - // - // This operation requires a body. Ensure that the body is present and the Content-Type - // header is set. - ErrCodeMissingBody = "MissingBody" - - // ErrCodeNoSuchCloudFrontOriginAccessIdentity for service response error code - // "NoSuchCloudFrontOriginAccessIdentity". - // - // The specified origin access identity does not exist. - ErrCodeNoSuchCloudFrontOriginAccessIdentity = "NoSuchCloudFrontOriginAccessIdentity" - - // ErrCodeNoSuchDistribution for service response error code - // "NoSuchDistribution". - // - // The specified distribution does not exist. - ErrCodeNoSuchDistribution = "NoSuchDistribution" - - // ErrCodeNoSuchFieldLevelEncryptionConfig for service response error code - // "NoSuchFieldLevelEncryptionConfig". - // - // The specified configuration for field-level encryption doesn't exist. - ErrCodeNoSuchFieldLevelEncryptionConfig = "NoSuchFieldLevelEncryptionConfig" - - // ErrCodeNoSuchFieldLevelEncryptionProfile for service response error code - // "NoSuchFieldLevelEncryptionProfile". - // - // The specified profile for field-level encryption doesn't exist. - ErrCodeNoSuchFieldLevelEncryptionProfile = "NoSuchFieldLevelEncryptionProfile" - - // ErrCodeNoSuchInvalidation for service response error code - // "NoSuchInvalidation". - // - // The specified invalidation does not exist. - ErrCodeNoSuchInvalidation = "NoSuchInvalidation" - - // ErrCodeNoSuchOrigin for service response error code - // "NoSuchOrigin". - // - // No origin exists with the specified Origin Id. - ErrCodeNoSuchOrigin = "NoSuchOrigin" - - // ErrCodeNoSuchPublicKey for service response error code - // "NoSuchPublicKey". - // - // The specified public key doesn't exist. - ErrCodeNoSuchPublicKey = "NoSuchPublicKey" - - // ErrCodeNoSuchResource for service response error code - // "NoSuchResource". - ErrCodeNoSuchResource = "NoSuchResource" - - // ErrCodeNoSuchStreamingDistribution for service response error code - // "NoSuchStreamingDistribution". - // - // The specified streaming distribution does not exist. - ErrCodeNoSuchStreamingDistribution = "NoSuchStreamingDistribution" - - // ErrCodeOriginAccessIdentityAlreadyExists for service response error code - // "CloudFrontOriginAccessIdentityAlreadyExists". - // - // If the CallerReference is a value you already sent in a previous request - // to create an identity but the content of the CloudFrontOriginAccessIdentityConfig - // is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists - // error. - ErrCodeOriginAccessIdentityAlreadyExists = "CloudFrontOriginAccessIdentityAlreadyExists" - - // ErrCodeOriginAccessIdentityInUse for service response error code - // "CloudFrontOriginAccessIdentityInUse". - ErrCodeOriginAccessIdentityInUse = "CloudFrontOriginAccessIdentityInUse" - - // ErrCodePreconditionFailed for service response error code - // "PreconditionFailed". - // - // The precondition given in one or more of the request-header fields evaluated - // to false. - ErrCodePreconditionFailed = "PreconditionFailed" - - // ErrCodePublicKeyAlreadyExists for service response error code - // "PublicKeyAlreadyExists". - // - // The specified public key already exists. - ErrCodePublicKeyAlreadyExists = "PublicKeyAlreadyExists" - - // ErrCodePublicKeyInUse for service response error code - // "PublicKeyInUse". - // - // The specified public key is in use. - ErrCodePublicKeyInUse = "PublicKeyInUse" - - // ErrCodeQueryArgProfileEmpty for service response error code - // "QueryArgProfileEmpty". - // - // No profile specified for the field-level encryption query argument. - ErrCodeQueryArgProfileEmpty = "QueryArgProfileEmpty" - - // ErrCodeStreamingDistributionAlreadyExists for service response error code - // "StreamingDistributionAlreadyExists". - ErrCodeStreamingDistributionAlreadyExists = "StreamingDistributionAlreadyExists" - - // ErrCodeStreamingDistributionNotDisabled for service response error code - // "StreamingDistributionNotDisabled". - ErrCodeStreamingDistributionNotDisabled = "StreamingDistributionNotDisabled" - - // ErrCodeTooManyCacheBehaviors for service response error code - // "TooManyCacheBehaviors". - // - // You cannot create more cache behaviors for the distribution. - ErrCodeTooManyCacheBehaviors = "TooManyCacheBehaviors" - - // ErrCodeTooManyCertificates for service response error code - // "TooManyCertificates". - // - // You cannot create anymore custom SSL/TLS certificates. - ErrCodeTooManyCertificates = "TooManyCertificates" - - // ErrCodeTooManyCloudFrontOriginAccessIdentities for service response error code - // "TooManyCloudFrontOriginAccessIdentities". - // - // Processing your request would cause you to exceed the maximum number of origin - // access identities allowed. - ErrCodeTooManyCloudFrontOriginAccessIdentities = "TooManyCloudFrontOriginAccessIdentities" - - // ErrCodeTooManyCookieNamesInWhiteList for service response error code - // "TooManyCookieNamesInWhiteList". - // - // Your request contains more cookie names in the whitelist than are allowed - // per cache behavior. - ErrCodeTooManyCookieNamesInWhiteList = "TooManyCookieNamesInWhiteList" - - // ErrCodeTooManyDistributionCNAMEs for service response error code - // "TooManyDistributionCNAMEs". - // - // Your request contains more CNAMEs than are allowed per distribution. - ErrCodeTooManyDistributionCNAMEs = "TooManyDistributionCNAMEs" - - // ErrCodeTooManyDistributions for service response error code - // "TooManyDistributions". - // - // Processing your request would cause you to exceed the maximum number of distributions - // allowed. - ErrCodeTooManyDistributions = "TooManyDistributions" - - // ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig for service response error code - // "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig". - // - // The maximum number of distributions have been associated with the specified - // configuration for field-level encryption. - ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig = "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" - - // ErrCodeTooManyDistributionsWithLambdaAssociations for service response error code - // "TooManyDistributionsWithLambdaAssociations". - // - // Processing your request would cause the maximum number of distributions with - // Lambda function associations per owner to be exceeded. - ErrCodeTooManyDistributionsWithLambdaAssociations = "TooManyDistributionsWithLambdaAssociations" - - // ErrCodeTooManyFieldLevelEncryptionConfigs for service response error code - // "TooManyFieldLevelEncryptionConfigs". - // - // The maximum number of configurations for field-level encryption have been - // created. - ErrCodeTooManyFieldLevelEncryptionConfigs = "TooManyFieldLevelEncryptionConfigs" - - // ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles for service response error code - // "TooManyFieldLevelEncryptionContentTypeProfiles". - // - // The maximum number of content type profiles for field-level encryption have - // been created. - ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles = "TooManyFieldLevelEncryptionContentTypeProfiles" - - // ErrCodeTooManyFieldLevelEncryptionEncryptionEntities for service response error code - // "TooManyFieldLevelEncryptionEncryptionEntities". - // - // The maximum number of encryption entities for field-level encryption have - // been created. - ErrCodeTooManyFieldLevelEncryptionEncryptionEntities = "TooManyFieldLevelEncryptionEncryptionEntities" - - // ErrCodeTooManyFieldLevelEncryptionFieldPatterns for service response error code - // "TooManyFieldLevelEncryptionFieldPatterns". - // - // The maximum number of field patterns for field-level encryption have been - // created. - ErrCodeTooManyFieldLevelEncryptionFieldPatterns = "TooManyFieldLevelEncryptionFieldPatterns" - - // ErrCodeTooManyFieldLevelEncryptionProfiles for service response error code - // "TooManyFieldLevelEncryptionProfiles". - // - // The maximum number of profiles for field-level encryption have been created. - ErrCodeTooManyFieldLevelEncryptionProfiles = "TooManyFieldLevelEncryptionProfiles" - - // ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles for service response error code - // "TooManyFieldLevelEncryptionQueryArgProfiles". - // - // The maximum number of query arg profiles for field-level encryption have - // been created. - ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles = "TooManyFieldLevelEncryptionQueryArgProfiles" - - // ErrCodeTooManyHeadersInForwardedValues for service response error code - // "TooManyHeadersInForwardedValues". - ErrCodeTooManyHeadersInForwardedValues = "TooManyHeadersInForwardedValues" - - // ErrCodeTooManyInvalidationsInProgress for service response error code - // "TooManyInvalidationsInProgress". - // - // You have exceeded the maximum number of allowable InProgress invalidation - // batch requests, or invalidation objects. - ErrCodeTooManyInvalidationsInProgress = "TooManyInvalidationsInProgress" - - // ErrCodeTooManyLambdaFunctionAssociations for service response error code - // "TooManyLambdaFunctionAssociations". - // - // Your request contains more Lambda function associations than are allowed - // per distribution. - ErrCodeTooManyLambdaFunctionAssociations = "TooManyLambdaFunctionAssociations" - - // ErrCodeTooManyOriginCustomHeaders for service response error code - // "TooManyOriginCustomHeaders". - ErrCodeTooManyOriginCustomHeaders = "TooManyOriginCustomHeaders" - - // ErrCodeTooManyOriginGroupsPerDistribution for service response error code - // "TooManyOriginGroupsPerDistribution". - // - // Processing your request would cause you to exceed the maximum number of origin - // groups allowed. - ErrCodeTooManyOriginGroupsPerDistribution = "TooManyOriginGroupsPerDistribution" - - // ErrCodeTooManyOrigins for service response error code - // "TooManyOrigins". - // - // You cannot create more origins for the distribution. - ErrCodeTooManyOrigins = "TooManyOrigins" - - // ErrCodeTooManyPublicKeys for service response error code - // "TooManyPublicKeys". - // - // The maximum number of public keys for field-level encryption have been created. - // To create a new public key, delete one of the existing keys. - ErrCodeTooManyPublicKeys = "TooManyPublicKeys" - - // ErrCodeTooManyQueryStringParameters for service response error code - // "TooManyQueryStringParameters". - ErrCodeTooManyQueryStringParameters = "TooManyQueryStringParameters" - - // ErrCodeTooManyStreamingDistributionCNAMEs for service response error code - // "TooManyStreamingDistributionCNAMEs". - ErrCodeTooManyStreamingDistributionCNAMEs = "TooManyStreamingDistributionCNAMEs" - - // ErrCodeTooManyStreamingDistributions for service response error code - // "TooManyStreamingDistributions". - // - // Processing your request would cause you to exceed the maximum number of streaming - // distributions allowed. - ErrCodeTooManyStreamingDistributions = "TooManyStreamingDistributions" - - // ErrCodeTooManyTrustedSigners for service response error code - // "TooManyTrustedSigners". - // - // Your request contains more trusted signers than are allowed per distribution. - ErrCodeTooManyTrustedSigners = "TooManyTrustedSigners" - - // ErrCodeTrustedSignerDoesNotExist for service response error code - // "TrustedSignerDoesNotExist". - // - // One or more of your trusted signers don't exist. - ErrCodeTrustedSignerDoesNotExist = "TrustedSignerDoesNotExist" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go deleted file mode 100644 index 7fe4399de..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudfront - -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/restxml" -) - -// CloudFront provides the API operation methods for making requests to -// Amazon CloudFront. See this package's package overview docs -// for details on the service. -// -// CloudFront methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CloudFront 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 = "cloudfront" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "CloudFront" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CloudFront client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a CloudFront client from just a session. -// svc := cloudfront.New(mySession) -// -// // Create a CloudFront client with additional configuration -// svc := cloudfront.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudFront { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CloudFront { - svc := &CloudFront{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-11-05", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CloudFront operation and runs any -// custom request initialization. -func (c *CloudFront) 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/cloudfront/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/waiters.go deleted file mode 100644 index 6ccd0cee4..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/waiters.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudfront - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilDistributionDeployed uses the CloudFront API operation -// GetDistribution to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *CloudFront) WaitUntilDistributionDeployed(input *GetDistributionInput) error { - return c.WaitUntilDistributionDeployedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilDistributionDeployedWithContext is an extended version of WaitUntilDistributionDeployed. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) WaitUntilDistributionDeployedWithContext(ctx aws.Context, input *GetDistributionInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilDistributionDeployed", - MaxAttempts: 25, - Delay: request.ConstantWaiterDelay(60 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Distribution.Status", - Expected: "Deployed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetDistributionInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetDistributionRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInvalidationCompleted uses the CloudFront API operation -// GetInvalidation to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *CloudFront) WaitUntilInvalidationCompleted(input *GetInvalidationInput) error { - return c.WaitUntilInvalidationCompletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInvalidationCompletedWithContext is an extended version of WaitUntilInvalidationCompleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) WaitUntilInvalidationCompletedWithContext(ctx aws.Context, input *GetInvalidationInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInvalidationCompleted", - MaxAttempts: 30, - Delay: request.ConstantWaiterDelay(20 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Invalidation.Status", - Expected: "Completed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetInvalidationInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetInvalidationRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilStreamingDistributionDeployed uses the CloudFront API operation -// GetStreamingDistribution to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *CloudFront) WaitUntilStreamingDistributionDeployed(input *GetStreamingDistributionInput) error { - return c.WaitUntilStreamingDistributionDeployedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilStreamingDistributionDeployedWithContext is an extended version of WaitUntilStreamingDistributionDeployed. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) WaitUntilStreamingDistributionDeployedWithContext(ctx aws.Context, input *GetStreamingDistributionInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilStreamingDistributionDeployed", - MaxAttempts: 25, - Delay: request.ConstantWaiterDelay(60 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "StreamingDistribution.Status", - Expected: "Deployed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetStreamingDistributionInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetStreamingDistributionRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go deleted file mode 100644 index 30dcd7da9..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go +++ /dev/null @@ -1,3073 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudhsmv2 - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCopyBackupToRegion = "CopyBackupToRegion" - -// CopyBackupToRegionRequest generates a "aws/request.Request" representing the -// client's request for the CopyBackupToRegion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyBackupToRegion for more information on using the CopyBackupToRegion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyBackupToRegionRequest method. -// req, resp := client.CopyBackupToRegionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CopyBackupToRegion -func (c *CloudHSMV2) CopyBackupToRegionRequest(input *CopyBackupToRegionInput) (req *request.Request, output *CopyBackupToRegionOutput) { - op := &request.Operation{ - Name: opCopyBackupToRegion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyBackupToRegionInput{} - } - - output = &CopyBackupToRegionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyBackupToRegion API operation for AWS CloudHSM V2. -// -// Copy an AWS CloudHSM cluster backup to a different region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudHSM V2's -// API operation CopyBackupToRegion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" -// The request was rejected because of an AWS CloudHSM internal failure. The -// request can be retried. -// -// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" -// The request was rejected because an error occurred. -// -// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" -// The request was rejected because it refers to a resource that cannot be found. -// -// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" -// The request was rejected because it is not a valid request. -// -// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" -// The request was rejected because the requester does not have permission to -// perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CopyBackupToRegion -func (c *CloudHSMV2) CopyBackupToRegion(input *CopyBackupToRegionInput) (*CopyBackupToRegionOutput, error) { - req, out := c.CopyBackupToRegionRequest(input) - return out, req.Send() -} - -// CopyBackupToRegionWithContext is the same as CopyBackupToRegion with the addition of -// the ability to pass a context and additional request options. -// -// See CopyBackupToRegion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) CopyBackupToRegionWithContext(ctx aws.Context, input *CopyBackupToRegionInput, opts ...request.Option) (*CopyBackupToRegionOutput, error) { - req, out := c.CopyBackupToRegionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCluster = "CreateCluster" - -// CreateClusterRequest generates a "aws/request.Request" representing the -// client's request for the CreateCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCluster for more information on using the CreateCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateClusterRequest method. -// req, resp := client.CreateClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster -func (c *CloudHSMV2) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) { - op := &request.Operation{ - Name: opCreateCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateClusterInput{} - } - - output = &CreateClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCluster API operation for AWS CloudHSM V2. -// -// Creates a new AWS CloudHSM cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudHSM V2's -// API operation CreateCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" -// The request was rejected because of an AWS CloudHSM internal failure. The -// request can be retried. -// -// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" -// The request was rejected because an error occurred. -// -// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" -// The request was rejected because it refers to a resource that cannot be found. -// -// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" -// The request was rejected because it is not a valid request. -// -// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" -// The request was rejected because the requester does not have permission to -// perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster -func (c *CloudHSMV2) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) { - req, out := c.CreateClusterRequest(input) - return out, req.Send() -} - -// CreateClusterWithContext is the same as CreateCluster with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) { - req, out := c.CreateClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateHsm = "CreateHsm" - -// CreateHsmRequest generates a "aws/request.Request" representing the -// client's request for the CreateHsm operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateHsm for more information on using the CreateHsm -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateHsmRequest method. -// req, resp := client.CreateHsmRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm -func (c *CloudHSMV2) CreateHsmRequest(input *CreateHsmInput) (req *request.Request, output *CreateHsmOutput) { - op := &request.Operation{ - Name: opCreateHsm, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateHsmInput{} - } - - output = &CreateHsmOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateHsm API operation for AWS CloudHSM V2. -// -// Creates a new hardware security module (HSM) in the specified AWS CloudHSM -// cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudHSM V2's -// API operation CreateHsm for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" -// The request was rejected because of an AWS CloudHSM internal failure. The -// request can be retried. -// -// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" -// The request was rejected because an error occurred. -// -// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" -// The request was rejected because it is not a valid request. -// -// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" -// The request was rejected because it refers to a resource that cannot be found. -// -// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" -// The request was rejected because the requester does not have permission to -// perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm -func (c *CloudHSMV2) CreateHsm(input *CreateHsmInput) (*CreateHsmOutput, error) { - req, out := c.CreateHsmRequest(input) - return out, req.Send() -} - -// CreateHsmWithContext is the same as CreateHsm with the addition of -// the ability to pass a context and additional request options. -// -// See CreateHsm for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) CreateHsmWithContext(ctx aws.Context, input *CreateHsmInput, opts ...request.Option) (*CreateHsmOutput, error) { - req, out := c.CreateHsmRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBackup = "DeleteBackup" - -// DeleteBackupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBackup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBackup for more information on using the DeleteBackup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBackupRequest method. -// req, resp := client.DeleteBackupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteBackup -func (c *CloudHSMV2) DeleteBackupRequest(input *DeleteBackupInput) (req *request.Request, output *DeleteBackupOutput) { - op := &request.Operation{ - Name: opDeleteBackup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteBackupInput{} - } - - output = &DeleteBackupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteBackup API operation for AWS CloudHSM V2. -// -// Deletes a specified AWS CloudHSM backup. A backup can be restored up to 7 -// days after the DeleteBackup request. For more information on restoring a -// backup, see RestoreBackup -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudHSM V2's -// API operation DeleteBackup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" -// The request was rejected because of an AWS CloudHSM internal failure. The -// request can be retried. -// -// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" -// The request was rejected because an error occurred. -// -// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" -// The request was rejected because it refers to a resource that cannot be found. -// -// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" -// The request was rejected because it is not a valid request. -// -// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" -// The request was rejected because the requester does not have permission to -// perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteBackup -func (c *CloudHSMV2) DeleteBackup(input *DeleteBackupInput) (*DeleteBackupOutput, error) { - req, out := c.DeleteBackupRequest(input) - return out, req.Send() -} - -// DeleteBackupWithContext is the same as DeleteBackup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBackup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) DeleteBackupWithContext(ctx aws.Context, input *DeleteBackupInput, opts ...request.Option) (*DeleteBackupOutput, error) { - req, out := c.DeleteBackupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCluster = "DeleteCluster" - -// DeleteClusterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCluster for more information on using the DeleteCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteClusterRequest method. -// req, resp := client.DeleteClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster -func (c *CloudHSMV2) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) { - op := &request.Operation{ - Name: opDeleteCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteClusterInput{} - } - - output = &DeleteClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteCluster API operation for AWS CloudHSM V2. -// -// Deletes the specified AWS CloudHSM cluster. Before you can delete a cluster, -// you must delete all HSMs in the cluster. To see if the cluster contains any -// HSMs, use DescribeClusters. To delete an HSM, use DeleteHsm. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudHSM V2's -// API operation DeleteCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" -// The request was rejected because of an AWS CloudHSM internal failure. The -// request can be retried. -// -// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" -// The request was rejected because an error occurred. -// -// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" -// The request was rejected because it refers to a resource that cannot be found. -// -// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" -// The request was rejected because it is not a valid request. -// -// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" -// The request was rejected because the requester does not have permission to -// perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster -func (c *CloudHSMV2) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) { - req, out := c.DeleteClusterRequest(input) - return out, req.Send() -} - -// DeleteClusterWithContext is the same as DeleteCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) { - req, out := c.DeleteClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteHsm = "DeleteHsm" - -// DeleteHsmRequest generates a "aws/request.Request" representing the -// client's request for the DeleteHsm operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteHsm for more information on using the DeleteHsm -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteHsmRequest method. -// req, resp := client.DeleteHsmRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm -func (c *CloudHSMV2) DeleteHsmRequest(input *DeleteHsmInput) (req *request.Request, output *DeleteHsmOutput) { - op := &request.Operation{ - Name: opDeleteHsm, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteHsmInput{} - } - - output = &DeleteHsmOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteHsm API operation for AWS CloudHSM V2. -// -// Deletes the specified HSM. To specify an HSM, you can use its identifier -// (ID), the IP address of the HSM's elastic network interface (ENI), or the -// ID of the HSM's ENI. You need to specify only one of these values. To find -// these values, use DescribeClusters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudHSM V2's -// API operation DeleteHsm for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" -// The request was rejected because of an AWS CloudHSM internal failure. The -// request can be retried. -// -// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" -// The request was rejected because an error occurred. -// -// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" -// The request was rejected because it refers to a resource that cannot be found. -// -// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" -// The request was rejected because it is not a valid request. -// -// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" -// The request was rejected because the requester does not have permission to -// perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm -func (c *CloudHSMV2) DeleteHsm(input *DeleteHsmInput) (*DeleteHsmOutput, error) { - req, out := c.DeleteHsmRequest(input) - return out, req.Send() -} - -// DeleteHsmWithContext is the same as DeleteHsm with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteHsm for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) DeleteHsmWithContext(ctx aws.Context, input *DeleteHsmInput, opts ...request.Option) (*DeleteHsmOutput, error) { - req, out := c.DeleteHsmRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeBackups = "DescribeBackups" - -// DescribeBackupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeBackups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeBackups for more information on using the DescribeBackups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeBackupsRequest method. -// req, resp := client.DescribeBackupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups -func (c *CloudHSMV2) DescribeBackupsRequest(input *DescribeBackupsInput) (req *request.Request, output *DescribeBackupsOutput) { - op := &request.Operation{ - Name: opDescribeBackups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeBackupsInput{} - } - - output = &DescribeBackupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeBackups API operation for AWS CloudHSM V2. -// -// Gets information about backups of AWS CloudHSM clusters. -// -// This is a paginated operation, which means that each response might contain -// only a subset of all the backups. When the response contains only a subset -// of backups, it includes a NextToken value. Use this value in a subsequent -// DescribeBackups request to get more backups. When you receive a response -// with no NextToken (or an empty or null value), that means there are no more -// backups to get. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudHSM V2's -// API operation DescribeBackups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" -// The request was rejected because of an AWS CloudHSM internal failure. The -// request can be retried. -// -// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" -// The request was rejected because an error occurred. -// -// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" -// The request was rejected because it refers to a resource that cannot be found. -// -// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" -// The request was rejected because it is not a valid request. -// -// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" -// The request was rejected because the requester does not have permission to -// perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups -func (c *CloudHSMV2) DescribeBackups(input *DescribeBackupsInput) (*DescribeBackupsOutput, error) { - req, out := c.DescribeBackupsRequest(input) - return out, req.Send() -} - -// DescribeBackupsWithContext is the same as DescribeBackups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeBackups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) DescribeBackupsWithContext(ctx aws.Context, input *DescribeBackupsInput, opts ...request.Option) (*DescribeBackupsOutput, error) { - req, out := c.DescribeBackupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeBackupsPages iterates over the pages of a DescribeBackups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeBackups method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeBackups operation. -// pageNum := 0 -// err := client.DescribeBackupsPages(params, -// func(page *DescribeBackupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudHSMV2) DescribeBackupsPages(input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool) error { - return c.DescribeBackupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeBackupsPagesWithContext same as DescribeBackupsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) DescribeBackupsPagesWithContext(ctx aws.Context, input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeBackupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeBackupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeBackupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeClusters = "DescribeClusters" - -// DescribeClustersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClusters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClusters for more information on using the DescribeClusters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClustersRequest method. -// req, resp := client.DescribeClustersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters -func (c *CloudHSMV2) DescribeClustersRequest(input *DescribeClustersInput) (req *request.Request, output *DescribeClustersOutput) { - op := &request.Operation{ - Name: opDescribeClusters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeClustersInput{} - } - - output = &DescribeClustersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClusters API operation for AWS CloudHSM V2. -// -// Gets information about AWS CloudHSM clusters. -// -// This is a paginated operation, which means that each response might contain -// only a subset of all the clusters. When the response contains only a subset -// of clusters, it includes a NextToken value. Use this value in a subsequent -// DescribeClusters request to get more clusters. When you receive a response -// with no NextToken (or an empty or null value), that means there are no more -// clusters to get. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudHSM V2's -// API operation DescribeClusters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" -// The request was rejected because of an AWS CloudHSM internal failure. The -// request can be retried. -// -// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" -// The request was rejected because an error occurred. -// -// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" -// The request was rejected because it is not a valid request. -// -// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" -// The request was rejected because the requester does not have permission to -// perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters -func (c *CloudHSMV2) DescribeClusters(input *DescribeClustersInput) (*DescribeClustersOutput, error) { - req, out := c.DescribeClustersRequest(input) - return out, req.Send() -} - -// DescribeClustersWithContext is the same as DescribeClusters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClusters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) DescribeClustersWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.Option) (*DescribeClustersOutput, error) { - req, out := c.DescribeClustersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeClustersPages iterates over the pages of a DescribeClusters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeClusters method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeClusters operation. -// pageNum := 0 -// err := client.DescribeClustersPages(params, -// func(page *DescribeClustersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudHSMV2) DescribeClustersPages(input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool) error { - return c.DescribeClustersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeClustersPagesWithContext same as DescribeClustersPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) DescribeClustersPagesWithContext(ctx aws.Context, input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeClustersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClustersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClustersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opInitializeCluster = "InitializeCluster" - -// InitializeClusterRequest generates a "aws/request.Request" representing the -// client's request for the InitializeCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See InitializeCluster for more information on using the InitializeCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the InitializeClusterRequest method. -// req, resp := client.InitializeClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster -func (c *CloudHSMV2) InitializeClusterRequest(input *InitializeClusterInput) (req *request.Request, output *InitializeClusterOutput) { - op := &request.Operation{ - Name: opInitializeCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InitializeClusterInput{} - } - - output = &InitializeClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// InitializeCluster API operation for AWS CloudHSM V2. -// -// Claims an AWS CloudHSM cluster by submitting the cluster certificate issued -// by your issuing certificate authority (CA) and the CA's root certificate. -// Before you can claim a cluster, you must sign the cluster's certificate signing -// request (CSR) with your issuing CA. To get the cluster's CSR, use DescribeClusters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudHSM V2's -// API operation InitializeCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" -// The request was rejected because of an AWS CloudHSM internal failure. The -// request can be retried. -// -// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" -// The request was rejected because an error occurred. -// -// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" -// The request was rejected because it refers to a resource that cannot be found. -// -// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" -// The request was rejected because it is not a valid request. -// -// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" -// The request was rejected because the requester does not have permission to -// perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster -func (c *CloudHSMV2) InitializeCluster(input *InitializeClusterInput) (*InitializeClusterOutput, error) { - req, out := c.InitializeClusterRequest(input) - return out, req.Send() -} - -// InitializeClusterWithContext is the same as InitializeCluster with the addition of -// the ability to pass a context and additional request options. -// -// See InitializeCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) InitializeClusterWithContext(ctx aws.Context, input *InitializeClusterInput, opts ...request.Option) (*InitializeClusterOutput, error) { - req, out := c.InitializeClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTags = "ListTags" - -// ListTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTags for more information on using the ListTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsRequest method. -// req, resp := client.ListTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags -func (c *CloudHSMV2) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { - op := &request.Operation{ - Name: opListTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTagsInput{} - } - - output = &ListTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTags API operation for AWS CloudHSM V2. -// -// Gets a list of tags for the specified AWS CloudHSM cluster. -// -// This is a paginated operation, which means that each response might contain -// only a subset of all the tags. When the response contains only a subset of -// tags, it includes a NextToken value. Use this value in a subsequent ListTags -// request to get more tags. When you receive a response with no NextToken (or -// an empty or null value), that means there are no more tags to get. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudHSM V2's -// API operation ListTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" -// The request was rejected because of an AWS CloudHSM internal failure. The -// request can be retried. -// -// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" -// The request was rejected because an error occurred. -// -// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" -// The request was rejected because it refers to a resource that cannot be found. -// -// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" -// The request was rejected because it is not a valid request. -// -// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" -// The request was rejected because the requester does not have permission to -// perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags -func (c *CloudHSMV2) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - return out, req.Send() -} - -// ListTagsWithContext is the same as ListTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTagsPages iterates over the pages of a ListTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTags method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListTags operation. -// pageNum := 0 -// err := client.ListTagsPages(params, -// func(page *ListTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudHSMV2) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error { - return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTagsPagesWithContext same as ListTagsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opRestoreBackup = "RestoreBackup" - -// RestoreBackupRequest generates a "aws/request.Request" representing the -// client's request for the RestoreBackup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreBackup for more information on using the RestoreBackup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreBackupRequest method. -// req, resp := client.RestoreBackupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/RestoreBackup -func (c *CloudHSMV2) RestoreBackupRequest(input *RestoreBackupInput) (req *request.Request, output *RestoreBackupOutput) { - op := &request.Operation{ - Name: opRestoreBackup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreBackupInput{} - } - - output = &RestoreBackupOutput{} - req = c.newRequest(op, input, output) - return -} - -// RestoreBackup API operation for AWS CloudHSM V2. -// -// Restores a specified AWS CloudHSM backup that is in the PENDING_DELETION -// state. For more information on deleting a backup, see DeleteBackup. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudHSM V2's -// API operation RestoreBackup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" -// The request was rejected because of an AWS CloudHSM internal failure. The -// request can be retried. -// -// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" -// The request was rejected because an error occurred. -// -// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" -// The request was rejected because it refers to a resource that cannot be found. -// -// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" -// The request was rejected because it is not a valid request. -// -// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" -// The request was rejected because the requester does not have permission to -// perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/RestoreBackup -func (c *CloudHSMV2) RestoreBackup(input *RestoreBackupInput) (*RestoreBackupOutput, error) { - req, out := c.RestoreBackupRequest(input) - return out, req.Send() -} - -// RestoreBackupWithContext is the same as RestoreBackup with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreBackup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) RestoreBackupWithContext(ctx aws.Context, input *RestoreBackupInput, opts ...request.Option) (*RestoreBackupOutput, error) { - req, out := c.RestoreBackupRequest(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/cloudhsmv2-2017-04-28/TagResource -func (c *CloudHSMV2) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for AWS CloudHSM V2. -// -// Adds or overwrites one or more tags for the specified AWS CloudHSM cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudHSM V2's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" -// The request was rejected because of an AWS CloudHSM internal failure. The -// request can be retried. -// -// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" -// The request was rejected because an error occurred. -// -// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" -// The request was rejected because it refers to a resource that cannot be found. -// -// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" -// The request was rejected because it is not a valid request. -// -// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" -// The request was rejected because the requester does not have permission to -// perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/TagResource -func (c *CloudHSMV2) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) - return out, req.Send() -} - -// TagResourceWithContext is the same as TagResource with the addition of -// the ability to pass a context and additional request options. -// -// See TagResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagResource = "UntagResource" - -// UntagResourceRequest generates a "aws/request.Request" representing the -// client's request for the UntagResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagResource for more information on using the UntagResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UntagResourceRequest method. -// req, resp := client.UntagResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource -func (c *CloudHSMV2) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for AWS CloudHSM V2. -// -// Removes the specified tag or tags from the specified AWS CloudHSM cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudHSM V2's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" -// The request was rejected because of an AWS CloudHSM internal failure. The -// request can be retried. -// -// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" -// The request was rejected because an error occurred. -// -// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" -// The request was rejected because it refers to a resource that cannot be found. -// -// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" -// The request was rejected because it is not a valid request. -// -// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" -// The request was rejected because the requester does not have permission to -// perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource -func (c *CloudHSMV2) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) - return out, req.Send() -} - -// UntagResourceWithContext is the same as UntagResource with the addition of -// the ability to pass a context and additional request options. -// -// See UntagResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudHSMV2) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Contains information about a backup of an AWS CloudHSM cluster. -type Backup struct { - _ struct{} `type:"structure"` - - // The identifier (ID) of the backup. - // - // BackupId is a required field - BackupId *string `type:"string" required:"true"` - - // The state of the backup. - BackupState *string `type:"string" enum:"BackupState"` - - // The identifier (ID) of the cluster that was backed up. - ClusterId *string `type:"string"` - - CopyTimestamp *time.Time `type:"timestamp"` - - // The date and time when the backup was created. - CreateTimestamp *time.Time `type:"timestamp"` - - // The date and time when the backup will be permanently deleted. - DeleteTimestamp *time.Time `type:"timestamp"` - - SourceBackup *string `type:"string"` - - SourceCluster *string `type:"string"` - - SourceRegion *string `type:"string"` -} - -// String returns the string representation -func (s Backup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Backup) GoString() string { - return s.String() -} - -// SetBackupId sets the BackupId field's value. -func (s *Backup) SetBackupId(v string) *Backup { - s.BackupId = &v - return s -} - -// SetBackupState sets the BackupState field's value. -func (s *Backup) SetBackupState(v string) *Backup { - s.BackupState = &v - return s -} - -// SetClusterId sets the ClusterId field's value. -func (s *Backup) SetClusterId(v string) *Backup { - s.ClusterId = &v - return s -} - -// SetCopyTimestamp sets the CopyTimestamp field's value. -func (s *Backup) SetCopyTimestamp(v time.Time) *Backup { - s.CopyTimestamp = &v - return s -} - -// SetCreateTimestamp sets the CreateTimestamp field's value. -func (s *Backup) SetCreateTimestamp(v time.Time) *Backup { - s.CreateTimestamp = &v - return s -} - -// SetDeleteTimestamp sets the DeleteTimestamp field's value. -func (s *Backup) SetDeleteTimestamp(v time.Time) *Backup { - s.DeleteTimestamp = &v - return s -} - -// SetSourceBackup sets the SourceBackup field's value. -func (s *Backup) SetSourceBackup(v string) *Backup { - s.SourceBackup = &v - return s -} - -// SetSourceCluster sets the SourceCluster field's value. -func (s *Backup) SetSourceCluster(v string) *Backup { - s.SourceCluster = &v - return s -} - -// SetSourceRegion sets the SourceRegion field's value. -func (s *Backup) SetSourceRegion(v string) *Backup { - s.SourceRegion = &v - return s -} - -// Contains one or more certificates or a certificate signing request (CSR). -type Certificates struct { - _ struct{} `type:"structure"` - - // The HSM hardware certificate issued (signed) by AWS CloudHSM. - AwsHardwareCertificate *string `type:"string"` - - // The cluster certificate issued (signed) by the issuing certificate authority - // (CA) of the cluster's owner. - ClusterCertificate *string `type:"string"` - - // The cluster's certificate signing request (CSR). The CSR exists only when - // the cluster's state is UNINITIALIZED. - ClusterCsr *string `type:"string"` - - // The HSM certificate issued (signed) by the HSM hardware. - HsmCertificate *string `type:"string"` - - // The HSM hardware certificate issued (signed) by the hardware manufacturer. - ManufacturerHardwareCertificate *string `type:"string"` -} - -// String returns the string representation -func (s Certificates) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Certificates) GoString() string { - return s.String() -} - -// SetAwsHardwareCertificate sets the AwsHardwareCertificate field's value. -func (s *Certificates) SetAwsHardwareCertificate(v string) *Certificates { - s.AwsHardwareCertificate = &v - return s -} - -// SetClusterCertificate sets the ClusterCertificate field's value. -func (s *Certificates) SetClusterCertificate(v string) *Certificates { - s.ClusterCertificate = &v - return s -} - -// SetClusterCsr sets the ClusterCsr field's value. -func (s *Certificates) SetClusterCsr(v string) *Certificates { - s.ClusterCsr = &v - return s -} - -// SetHsmCertificate sets the HsmCertificate field's value. -func (s *Certificates) SetHsmCertificate(v string) *Certificates { - s.HsmCertificate = &v - return s -} - -// SetManufacturerHardwareCertificate sets the ManufacturerHardwareCertificate field's value. -func (s *Certificates) SetManufacturerHardwareCertificate(v string) *Certificates { - s.ManufacturerHardwareCertificate = &v - return s -} - -// Contains information about an AWS CloudHSM cluster. -type Cluster struct { - _ struct{} `type:"structure"` - - // The cluster's backup policy. - BackupPolicy *string `type:"string" enum:"BackupPolicy"` - - // Contains one or more certificates or a certificate signing request (CSR). - Certificates *Certificates `type:"structure"` - - // The cluster's identifier (ID). - ClusterId *string `type:"string"` - - // The date and time when the cluster was created. - CreateTimestamp *time.Time `type:"timestamp"` - - // The type of HSM that the cluster contains. - HsmType *string `type:"string"` - - // Contains information about the HSMs in the cluster. - Hsms []*Hsm `type:"list"` - - // The default password for the cluster's Pre-Crypto Officer (PRECO) user. - PreCoPassword *string `min:"7" type:"string"` - - // The identifier (ID) of the cluster's security group. - SecurityGroup *string `type:"string"` - - // The identifier (ID) of the backup used to create the cluster. This value - // exists only when the cluster was created from a backup. - SourceBackupId *string `type:"string"` - - // The cluster's state. - State *string `type:"string" enum:"ClusterState"` - - // A description of the cluster's state. - StateMessage *string `type:"string"` - - // A map of the cluster's subnets and their corresponding Availability Zones. - SubnetMapping map[string]*string `type:"map"` - - // The identifier (ID) of the virtual private cloud (VPC) that contains the - // cluster. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s Cluster) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Cluster) GoString() string { - return s.String() -} - -// SetBackupPolicy sets the BackupPolicy field's value. -func (s *Cluster) SetBackupPolicy(v string) *Cluster { - s.BackupPolicy = &v - return s -} - -// SetCertificates sets the Certificates field's value. -func (s *Cluster) SetCertificates(v *Certificates) *Cluster { - s.Certificates = v - return s -} - -// SetClusterId sets the ClusterId field's value. -func (s *Cluster) SetClusterId(v string) *Cluster { - s.ClusterId = &v - return s -} - -// SetCreateTimestamp sets the CreateTimestamp field's value. -func (s *Cluster) SetCreateTimestamp(v time.Time) *Cluster { - s.CreateTimestamp = &v - return s -} - -// SetHsmType sets the HsmType field's value. -func (s *Cluster) SetHsmType(v string) *Cluster { - s.HsmType = &v - return s -} - -// SetHsms sets the Hsms field's value. -func (s *Cluster) SetHsms(v []*Hsm) *Cluster { - s.Hsms = v - return s -} - -// SetPreCoPassword sets the PreCoPassword field's value. -func (s *Cluster) SetPreCoPassword(v string) *Cluster { - s.PreCoPassword = &v - return s -} - -// SetSecurityGroup sets the SecurityGroup field's value. -func (s *Cluster) SetSecurityGroup(v string) *Cluster { - s.SecurityGroup = &v - return s -} - -// SetSourceBackupId sets the SourceBackupId field's value. -func (s *Cluster) SetSourceBackupId(v string) *Cluster { - s.SourceBackupId = &v - return s -} - -// SetState sets the State field's value. -func (s *Cluster) SetState(v string) *Cluster { - s.State = &v - return s -} - -// SetStateMessage sets the StateMessage field's value. -func (s *Cluster) SetStateMessage(v string) *Cluster { - s.StateMessage = &v - return s -} - -// SetSubnetMapping sets the SubnetMapping field's value. -func (s *Cluster) SetSubnetMapping(v map[string]*string) *Cluster { - s.SubnetMapping = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *Cluster) SetVpcId(v string) *Cluster { - s.VpcId = &v - return s -} - -type CopyBackupToRegionInput struct { - _ struct{} `type:"structure"` - - // The ID of the backup that will be copied to the destination region. - // - // BackupId is a required field - BackupId *string `type:"string" required:"true"` - - // The AWS region that will contain your copied CloudHSM cluster backup. - // - // DestinationRegion is a required field - DestinationRegion *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyBackupToRegionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyBackupToRegionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyBackupToRegionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyBackupToRegionInput"} - if s.BackupId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupId")) - } - if s.DestinationRegion == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationRegion")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupId sets the BackupId field's value. -func (s *CopyBackupToRegionInput) SetBackupId(v string) *CopyBackupToRegionInput { - s.BackupId = &v - return s -} - -// SetDestinationRegion sets the DestinationRegion field's value. -func (s *CopyBackupToRegionInput) SetDestinationRegion(v string) *CopyBackupToRegionInput { - s.DestinationRegion = &v - return s -} - -type CopyBackupToRegionOutput struct { - _ struct{} `type:"structure"` - - // Information on the backup that will be copied to the destination region, - // including CreateTimestamp, SourceBackup, SourceCluster, and Source Region. - // CreateTimestamp of the destination backup will be the same as that of the - // source backup. - // - // You will need to use the sourceBackupID returned in this operation to use - // the DescribeBackups operation on the backup that will be copied to the destination - // region. - DestinationBackup *DestinationBackup `type:"structure"` -} - -// String returns the string representation -func (s CopyBackupToRegionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyBackupToRegionOutput) GoString() string { - return s.String() -} - -// SetDestinationBackup sets the DestinationBackup field's value. -func (s *CopyBackupToRegionOutput) SetDestinationBackup(v *DestinationBackup) *CopyBackupToRegionOutput { - s.DestinationBackup = v - return s -} - -type CreateClusterInput struct { - _ struct{} `type:"structure"` - - // The type of HSM to use in the cluster. Currently the only allowed value is - // hsm1.medium. - // - // HsmType is a required field - HsmType *string `type:"string" required:"true"` - - // The identifier (ID) of the cluster backup to restore. Use this value to restore - // the cluster from a backup instead of creating a new cluster. To find the - // backup ID, use DescribeBackups. - SourceBackupId *string `type:"string"` - - // The identifiers (IDs) of the subnets where you are creating the cluster. - // You must specify at least one subnet. If you specify multiple subnets, they - // must meet the following criteria: - // - // * All subnets must be in the same virtual private cloud (VPC). - // - // * You can specify only one subnet per Availability Zone. - // - // SubnetIds is a required field - SubnetIds []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"} - if s.HsmType == nil { - invalidParams.Add(request.NewErrParamRequired("HsmType")) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - if s.SubnetIds != nil && len(s.SubnetIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SubnetIds", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHsmType sets the HsmType field's value. -func (s *CreateClusterInput) SetHsmType(v string) *CreateClusterInput { - s.HsmType = &v - return s -} - -// SetSourceBackupId sets the SourceBackupId field's value. -func (s *CreateClusterInput) SetSourceBackupId(v string) *CreateClusterInput { - s.SourceBackupId = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateClusterInput) SetSubnetIds(v []*string) *CreateClusterInput { - s.SubnetIds = v - return s -} - -type CreateClusterOutput struct { - _ struct{} `type:"structure"` - - // Information about the cluster that was created. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s CreateClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *CreateClusterOutput) SetCluster(v *Cluster) *CreateClusterOutput { - s.Cluster = v - return s -} - -type CreateHsmInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone where you are creating the HSM. To find the cluster's - // Availability Zones, use DescribeClusters. - // - // AvailabilityZone is a required field - AvailabilityZone *string `type:"string" required:"true"` - - // The identifier (ID) of the HSM's cluster. To find the cluster ID, use DescribeClusters. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` - - // The HSM's IP address. If you specify an IP address, use an available address - // from the subnet that maps to the Availability Zone where you are creating - // the HSM. If you don't specify an IP address, one is chosen for you from that - // subnet. - IpAddress *string `type:"string"` -} - -// String returns the string representation -func (s CreateHsmInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateHsmInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateHsmInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateHsmInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateHsmInput) SetAvailabilityZone(v string) *CreateHsmInput { - s.AvailabilityZone = &v - return s -} - -// SetClusterId sets the ClusterId field's value. -func (s *CreateHsmInput) SetClusterId(v string) *CreateHsmInput { - s.ClusterId = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *CreateHsmInput) SetIpAddress(v string) *CreateHsmInput { - s.IpAddress = &v - return s -} - -type CreateHsmOutput struct { - _ struct{} `type:"structure"` - - // Information about the HSM that was created. - Hsm *Hsm `type:"structure"` -} - -// String returns the string representation -func (s CreateHsmOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateHsmOutput) GoString() string { - return s.String() -} - -// SetHsm sets the Hsm field's value. -func (s *CreateHsmOutput) SetHsm(v *Hsm) *CreateHsmOutput { - s.Hsm = v - return s -} - -type DeleteBackupInput struct { - _ struct{} `type:"structure"` - - // The ID of the backup to be deleted. To find the ID of a backup, use the DescribeBackups - // operation. - // - // BackupId is a required field - BackupId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBackupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBackupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBackupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBackupInput"} - if s.BackupId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupId sets the BackupId field's value. -func (s *DeleteBackupInput) SetBackupId(v string) *DeleteBackupInput { - s.BackupId = &v - return s -} - -type DeleteBackupOutput struct { - _ struct{} `type:"structure"` - - // Information on the Backup object deleted. - Backup *Backup `type:"structure"` -} - -// String returns the string representation -func (s DeleteBackupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBackupOutput) GoString() string { - return s.String() -} - -// SetBackup sets the Backup field's value. -func (s *DeleteBackupOutput) SetBackup(v *Backup) *DeleteBackupOutput { - s.Backup = v - return s -} - -type DeleteClusterInput struct { - _ struct{} `type:"structure"` - - // The identifier (ID) of the cluster that you are deleting. To find the cluster - // ID, use DescribeClusters. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"} - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterId sets the ClusterId field's value. -func (s *DeleteClusterInput) SetClusterId(v string) *DeleteClusterInput { - s.ClusterId = &v - return s -} - -type DeleteClusterOutput struct { - _ struct{} `type:"structure"` - - // Information about the cluster that was deleted. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s DeleteClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *DeleteClusterOutput) SetCluster(v *Cluster) *DeleteClusterOutput { - s.Cluster = v - return s -} - -type DeleteHsmInput struct { - _ struct{} `type:"structure"` - - // The identifier (ID) of the cluster that contains the HSM that you are deleting. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` - - // The identifier (ID) of the elastic network interface (ENI) of the HSM that - // you are deleting. - EniId *string `type:"string"` - - // The IP address of the elastic network interface (ENI) of the HSM that you - // are deleting. - EniIp *string `type:"string"` - - // The identifier (ID) of the HSM that you are deleting. - HsmId *string `type:"string"` -} - -// String returns the string representation -func (s DeleteHsmInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteHsmInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteHsmInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteHsmInput"} - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterId sets the ClusterId field's value. -func (s *DeleteHsmInput) SetClusterId(v string) *DeleteHsmInput { - s.ClusterId = &v - return s -} - -// SetEniId sets the EniId field's value. -func (s *DeleteHsmInput) SetEniId(v string) *DeleteHsmInput { - s.EniId = &v - return s -} - -// SetEniIp sets the EniIp field's value. -func (s *DeleteHsmInput) SetEniIp(v string) *DeleteHsmInput { - s.EniIp = &v - return s -} - -// SetHsmId sets the HsmId field's value. -func (s *DeleteHsmInput) SetHsmId(v string) *DeleteHsmInput { - s.HsmId = &v - return s -} - -type DeleteHsmOutput struct { - _ struct{} `type:"structure"` - - // The identifier (ID) of the HSM that was deleted. - HsmId *string `type:"string"` -} - -// String returns the string representation -func (s DeleteHsmOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteHsmOutput) GoString() string { - return s.String() -} - -// SetHsmId sets the HsmId field's value. -func (s *DeleteHsmOutput) SetHsmId(v string) *DeleteHsmOutput { - s.HsmId = &v - return s -} - -type DescribeBackupsInput struct { - _ struct{} `type:"structure"` - - // One or more filters to limit the items returned in the response. - // - // Use the backupIds filter to return only the specified backups. Specify backups - // by their backup identifier (ID). - // - // Use the sourceBackupIds filter to return only the backups created from a - // source backup. The sourceBackupID of a source backup is returned by the CopyBackupToRegion - // operation. - // - // Use the clusterIds filter to return only the backups for the specified clusters. - // Specify clusters by their cluster identifier (ID). - // - // Use the states filter to return only backups that match the specified state. - Filters map[string][]*string `type:"map"` - - // The maximum number of backups to return in the response. When there are more - // backups than the number you specify, the response contains a NextToken value. - MaxResults *int64 `min:"1" type:"integer"` - - // The NextToken value that you received in the previous response. Use this - // value to get more backups. - NextToken *string `type:"string"` - - SortAscending *bool `type:"boolean"` -} - -// String returns the string representation -func (s DescribeBackupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBackupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeBackupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeBackupsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeBackupsInput) SetFilters(v map[string][]*string) *DescribeBackupsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeBackupsInput) SetMaxResults(v int64) *DescribeBackupsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeBackupsInput) SetNextToken(v string) *DescribeBackupsInput { - s.NextToken = &v - return s -} - -// SetSortAscending sets the SortAscending field's value. -func (s *DescribeBackupsInput) SetSortAscending(v bool) *DescribeBackupsInput { - s.SortAscending = &v - return s -} - -type DescribeBackupsOutput struct { - _ struct{} `type:"structure"` - - // A list of backups. - Backups []*Backup `type:"list"` - - // An opaque string that indicates that the response contains only a subset - // of backups. Use this value in a subsequent DescribeBackups request to get - // more backups. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeBackupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBackupsOutput) GoString() string { - return s.String() -} - -// SetBackups sets the Backups field's value. -func (s *DescribeBackupsOutput) SetBackups(v []*Backup) *DescribeBackupsOutput { - s.Backups = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeBackupsOutput) SetNextToken(v string) *DescribeBackupsOutput { - s.NextToken = &v - return s -} - -type DescribeClustersInput struct { - _ struct{} `type:"structure"` - - // One or more filters to limit the items returned in the response. - // - // Use the clusterIds filter to return only the specified clusters. Specify - // clusters by their cluster identifier (ID). - // - // Use the vpcIds filter to return only the clusters in the specified virtual - // private clouds (VPCs). Specify VPCs by their VPC identifier (ID). - // - // Use the states filter to return only clusters that match the specified state. - Filters map[string][]*string `type:"map"` - - // The maximum number of clusters to return in the response. When there are - // more clusters than the number you specify, the response contains a NextToken - // value. - MaxResults *int64 `min:"1" type:"integer"` - - // The NextToken value that you received in the previous response. Use this - // value to get more clusters. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeClustersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClustersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeClustersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeClustersInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeClustersInput) SetFilters(v map[string][]*string) *DescribeClustersInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeClustersInput) SetMaxResults(v int64) *DescribeClustersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClustersInput) SetNextToken(v string) *DescribeClustersInput { - s.NextToken = &v - return s -} - -type DescribeClustersOutput struct { - _ struct{} `type:"structure"` - - // A list of clusters. - Clusters []*Cluster `type:"list"` - - // An opaque string that indicates that the response contains only a subset - // of clusters. Use this value in a subsequent DescribeClusters request to get - // more clusters. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeClustersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClustersOutput) GoString() string { - return s.String() -} - -// SetClusters sets the Clusters field's value. -func (s *DescribeClustersOutput) SetClusters(v []*Cluster) *DescribeClustersOutput { - s.Clusters = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClustersOutput) SetNextToken(v string) *DescribeClustersOutput { - s.NextToken = &v - return s -} - -type DestinationBackup struct { - _ struct{} `type:"structure"` - - CreateTimestamp *time.Time `type:"timestamp"` - - SourceBackup *string `type:"string"` - - SourceCluster *string `type:"string"` - - SourceRegion *string `type:"string"` -} - -// String returns the string representation -func (s DestinationBackup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DestinationBackup) GoString() string { - return s.String() -} - -// SetCreateTimestamp sets the CreateTimestamp field's value. -func (s *DestinationBackup) SetCreateTimestamp(v time.Time) *DestinationBackup { - s.CreateTimestamp = &v - return s -} - -// SetSourceBackup sets the SourceBackup field's value. -func (s *DestinationBackup) SetSourceBackup(v string) *DestinationBackup { - s.SourceBackup = &v - return s -} - -// SetSourceCluster sets the SourceCluster field's value. -func (s *DestinationBackup) SetSourceCluster(v string) *DestinationBackup { - s.SourceCluster = &v - return s -} - -// SetSourceRegion sets the SourceRegion field's value. -func (s *DestinationBackup) SetSourceRegion(v string) *DestinationBackup { - s.SourceRegion = &v - return s -} - -// Contains information about a hardware security module (HSM) in an AWS CloudHSM -// cluster. -type Hsm struct { - _ struct{} `type:"structure"` - - // The Availability Zone that contains the HSM. - AvailabilityZone *string `type:"string"` - - // The identifier (ID) of the cluster that contains the HSM. - ClusterId *string `type:"string"` - - // The identifier (ID) of the HSM's elastic network interface (ENI). - EniId *string `type:"string"` - - // The IP address of the HSM's elastic network interface (ENI). - EniIp *string `type:"string"` - - // The HSM's identifier (ID). - // - // HsmId is a required field - HsmId *string `type:"string" required:"true"` - - // The HSM's state. - State *string `type:"string" enum:"HsmState"` - - // A description of the HSM's state. - StateMessage *string `type:"string"` - - // The subnet that contains the HSM's elastic network interface (ENI). - SubnetId *string `type:"string"` -} - -// String returns the string representation -func (s Hsm) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Hsm) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Hsm) SetAvailabilityZone(v string) *Hsm { - s.AvailabilityZone = &v - return s -} - -// SetClusterId sets the ClusterId field's value. -func (s *Hsm) SetClusterId(v string) *Hsm { - s.ClusterId = &v - return s -} - -// SetEniId sets the EniId field's value. -func (s *Hsm) SetEniId(v string) *Hsm { - s.EniId = &v - return s -} - -// SetEniIp sets the EniIp field's value. -func (s *Hsm) SetEniIp(v string) *Hsm { - s.EniIp = &v - return s -} - -// SetHsmId sets the HsmId field's value. -func (s *Hsm) SetHsmId(v string) *Hsm { - s.HsmId = &v - return s -} - -// SetState sets the State field's value. -func (s *Hsm) SetState(v string) *Hsm { - s.State = &v - return s -} - -// SetStateMessage sets the StateMessage field's value. -func (s *Hsm) SetStateMessage(v string) *Hsm { - s.StateMessage = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *Hsm) SetSubnetId(v string) *Hsm { - s.SubnetId = &v - return s -} - -type InitializeClusterInput struct { - _ struct{} `type:"structure"` - - // The identifier (ID) of the cluster that you are claiming. To find the cluster - // ID, use DescribeClusters. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` - - // The cluster certificate issued (signed) by your issuing certificate authority - // (CA). The certificate must be in PEM format and can contain a maximum of - // 5000 characters. - // - // SignedCert is a required field - SignedCert *string `type:"string" required:"true"` - - // The issuing certificate of the issuing certificate authority (CA) that issued - // (signed) the cluster certificate. This can be a root (self-signed) certificate - // or a certificate chain that begins with the certificate that issued the cluster - // certificate and ends with a root certificate. The certificate or certificate - // chain must be in PEM format and can contain a maximum of 5000 characters. - // - // TrustAnchor is a required field - TrustAnchor *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s InitializeClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InitializeClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InitializeClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InitializeClusterInput"} - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - if s.SignedCert == nil { - invalidParams.Add(request.NewErrParamRequired("SignedCert")) - } - if s.TrustAnchor == nil { - invalidParams.Add(request.NewErrParamRequired("TrustAnchor")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterId sets the ClusterId field's value. -func (s *InitializeClusterInput) SetClusterId(v string) *InitializeClusterInput { - s.ClusterId = &v - return s -} - -// SetSignedCert sets the SignedCert field's value. -func (s *InitializeClusterInput) SetSignedCert(v string) *InitializeClusterInput { - s.SignedCert = &v - return s -} - -// SetTrustAnchor sets the TrustAnchor field's value. -func (s *InitializeClusterInput) SetTrustAnchor(v string) *InitializeClusterInput { - s.TrustAnchor = &v - return s -} - -type InitializeClusterOutput struct { - _ struct{} `type:"structure"` - - // The cluster's state. - State *string `type:"string" enum:"ClusterState"` - - // A description of the cluster's state. - StateMessage *string `type:"string"` -} - -// String returns the string representation -func (s InitializeClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InitializeClusterOutput) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *InitializeClusterOutput) SetState(v string) *InitializeClusterOutput { - s.State = &v - return s -} - -// SetStateMessage sets the StateMessage field's value. -func (s *InitializeClusterOutput) SetStateMessage(v string) *InitializeClusterOutput { - s.StateMessage = &v - return s -} - -type ListTagsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of tags to return in the response. When there are more - // tags than the number you specify, the response contains a NextToken value. - MaxResults *int64 `min:"1" type:"integer"` - - // The NextToken value that you received in the previous response. Use this - // value to get more tags. - NextToken *string `type:"string"` - - // The cluster identifier (ID) for the cluster whose tags you are getting. To - // find the cluster ID, use DescribeClusters. - // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput { - s.NextToken = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ListTagsInput) SetResourceId(v string) *ListTagsInput { - s.ResourceId = &v - return s -} - -type ListTagsOutput struct { - _ struct{} `type:"structure"` - - // An opaque string that indicates that the response contains only a subset - // of tags. Use this value in a subsequent ListTags request to get more tags. - NextToken *string `type:"string"` - - // A list of tags. - // - // TagList is a required field - TagList []*Tag `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput { - s.NextToken = &v - return s -} - -// SetTagList sets the TagList field's value. -func (s *ListTagsOutput) SetTagList(v []*Tag) *ListTagsOutput { - s.TagList = v - return s -} - -type RestoreBackupInput struct { - _ struct{} `type:"structure"` - - // The ID of the backup to be restored. To find the ID of a backup, use the - // DescribeBackups operation. - // - // BackupId is a required field - BackupId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RestoreBackupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreBackupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreBackupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreBackupInput"} - if s.BackupId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupId sets the BackupId field's value. -func (s *RestoreBackupInput) SetBackupId(v string) *RestoreBackupInput { - s.BackupId = &v - return s -} - -type RestoreBackupOutput struct { - _ struct{} `type:"structure"` - - // Information on the Backup object created. - Backup *Backup `type:"structure"` -} - -// String returns the string representation -func (s RestoreBackupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreBackupOutput) GoString() string { - return s.String() -} - -// SetBackup sets the Backup field's value. -func (s *RestoreBackupOutput) SetBackup(v *Backup) *RestoreBackupOutput { - s.Backup = v - return s -} - -// Contains a tag. A tag is a key-value pair. -type Tag struct { - _ struct{} `type:"structure"` - - // The key of the tag. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The value of the tag. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The cluster identifier (ID) for the cluster that you are tagging. To find - // the cluster ID, use DescribeClusters. - // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` - - // A list of one or more tags. - // - // TagList is a required field - TagList []*Tag `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.TagList == nil { - invalidParams.Add(request.NewErrParamRequired("TagList")) - } - if s.TagList != nil && len(s.TagList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagList", 1)) - } - if s.TagList != nil { - for i, v := range s.TagList { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *TagResourceInput) SetResourceId(v string) *TagResourceInput { - s.ResourceId = &v - return s -} - -// SetTagList sets the TagList field's value. -func (s *TagResourceInput) SetTagList(v []*Tag) *TagResourceInput { - s.TagList = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The cluster identifier (ID) for the cluster whose tags you are removing. - // To find the cluster ID, use DescribeClusters. - // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` - - // A list of one or more tag keys for the tags that you are removing. Specify - // only the tag keys, not the tag values. - // - // TagKeyList is a required field - TagKeyList []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s UntagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.TagKeyList == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeyList")) - } - if s.TagKeyList != nil && len(s.TagKeyList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagKeyList", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *UntagResourceInput) SetResourceId(v string) *UntagResourceInput { - s.ResourceId = &v - return s -} - -// SetTagKeyList sets the TagKeyList field's value. -func (s *UntagResourceInput) SetTagKeyList(v []*string) *UntagResourceInput { - s.TagKeyList = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -const ( - // BackupPolicyDefault is a BackupPolicy enum value - BackupPolicyDefault = "DEFAULT" -) - -const ( - // BackupStateCreateInProgress is a BackupState enum value - BackupStateCreateInProgress = "CREATE_IN_PROGRESS" - - // BackupStateReady is a BackupState enum value - BackupStateReady = "READY" - - // BackupStateDeleted is a BackupState enum value - BackupStateDeleted = "DELETED" - - // BackupStatePendingDeletion is a BackupState enum value - BackupStatePendingDeletion = "PENDING_DELETION" -) - -const ( - // ClusterStateCreateInProgress is a ClusterState enum value - ClusterStateCreateInProgress = "CREATE_IN_PROGRESS" - - // ClusterStateUninitialized is a ClusterState enum value - ClusterStateUninitialized = "UNINITIALIZED" - - // ClusterStateInitializeInProgress is a ClusterState enum value - ClusterStateInitializeInProgress = "INITIALIZE_IN_PROGRESS" - - // ClusterStateInitialized is a ClusterState enum value - ClusterStateInitialized = "INITIALIZED" - - // ClusterStateActive is a ClusterState enum value - ClusterStateActive = "ACTIVE" - - // ClusterStateUpdateInProgress is a ClusterState enum value - ClusterStateUpdateInProgress = "UPDATE_IN_PROGRESS" - - // ClusterStateDeleteInProgress is a ClusterState enum value - ClusterStateDeleteInProgress = "DELETE_IN_PROGRESS" - - // ClusterStateDeleted is a ClusterState enum value - ClusterStateDeleted = "DELETED" - - // ClusterStateDegraded is a ClusterState enum value - ClusterStateDegraded = "DEGRADED" -) - -const ( - // HsmStateCreateInProgress is a HsmState enum value - HsmStateCreateInProgress = "CREATE_IN_PROGRESS" - - // HsmStateActive is a HsmState enum value - HsmStateActive = "ACTIVE" - - // HsmStateDegraded is a HsmState enum value - HsmStateDegraded = "DEGRADED" - - // HsmStateDeleteInProgress is a HsmState enum value - HsmStateDeleteInProgress = "DELETE_IN_PROGRESS" - - // HsmStateDeleted is a HsmState enum value - HsmStateDeleted = "DELETED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/doc.go deleted file mode 100644 index fd7b0ef8e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/doc.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package cloudhsmv2 provides the client and types for making API -// requests to AWS CloudHSM V2. -// -// For more information about AWS CloudHSM, see AWS CloudHSM (http://aws.amazon.com/cloudhsm/) -// and the AWS CloudHSM User Guide (http://docs.aws.amazon.com/cloudhsm/latest/userguide/). -// -// See https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28 for more information on this service. -// -// See cloudhsmv2 package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudhsmv2/ -// -// Using the Client -// -// To contact AWS CloudHSM V2 with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS CloudHSM V2 client CloudHSMV2 for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudhsmv2/#New -package cloudhsmv2 diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/errors.go deleted file mode 100644 index 542f2f404..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/errors.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudhsmv2 - -const ( - - // ErrCodeCloudHsmAccessDeniedException for service response error code - // "CloudHsmAccessDeniedException". - // - // The request was rejected because the requester does not have permission to - // perform the requested operation. - ErrCodeCloudHsmAccessDeniedException = "CloudHsmAccessDeniedException" - - // ErrCodeCloudHsmInternalFailureException for service response error code - // "CloudHsmInternalFailureException". - // - // The request was rejected because of an AWS CloudHSM internal failure. The - // request can be retried. - ErrCodeCloudHsmInternalFailureException = "CloudHsmInternalFailureException" - - // ErrCodeCloudHsmInvalidRequestException for service response error code - // "CloudHsmInvalidRequestException". - // - // The request was rejected because it is not a valid request. - ErrCodeCloudHsmInvalidRequestException = "CloudHsmInvalidRequestException" - - // ErrCodeCloudHsmResourceNotFoundException for service response error code - // "CloudHsmResourceNotFoundException". - // - // The request was rejected because it refers to a resource that cannot be found. - ErrCodeCloudHsmResourceNotFoundException = "CloudHsmResourceNotFoundException" - - // ErrCodeCloudHsmServiceException for service response error code - // "CloudHsmServiceException". - // - // The request was rejected because an error occurred. - ErrCodeCloudHsmServiceException = "CloudHsmServiceException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go deleted file mode 100644 index c86db6ae7..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudhsmv2 - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// CloudHSMV2 provides the API operation methods for making requests to -// AWS CloudHSM V2. See this package's package overview docs -// for details on the service. -// -// CloudHSMV2 methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CloudHSMV2 struct { - *client.Client -} - -// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) - -// Service information constants -const ( - ServiceName = "cloudhsmv2" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "CloudHSM V2" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CloudHSMV2 client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a CloudHSMV2 client from just a session. -// svc := cloudhsmv2.New(mySession) -// -// // Create a CloudHSMV2 client with additional configuration -// svc := cloudhsmv2.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudHSMV2 { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "cloudhsm" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CloudHSMV2 { - svc := &CloudHSMV2{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-04-28", - JSONVersion: "1.1", - TargetPrefix: "BaldrApiService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CloudHSMV2 operation and runs any -// custom request initialization. -func (c *CloudHSMV2) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go deleted file mode 100644 index dbbf3a16a..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go +++ /dev/null @@ -1,6406 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudsearch - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" -) - -const opBuildSuggesters = "BuildSuggesters" - -// BuildSuggestersRequest generates a "aws/request.Request" representing the -// client's request for the BuildSuggesters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BuildSuggesters for more information on using the BuildSuggesters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BuildSuggestersRequest method. -// req, resp := client.BuildSuggestersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) BuildSuggestersRequest(input *BuildSuggestersInput) (req *request.Request, output *BuildSuggestersOutput) { - op := &request.Operation{ - Name: opBuildSuggesters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BuildSuggestersInput{} - } - - output = &BuildSuggestersOutput{} - req = c.newRequest(op, input, output) - return -} - -// BuildSuggesters API operation for Amazon CloudSearch. -// -// Indexes the search suggestions. For more information, see Configuring Suggesters -// (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html#configuring-suggesters) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation BuildSuggesters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) BuildSuggesters(input *BuildSuggestersInput) (*BuildSuggestersOutput, error) { - req, out := c.BuildSuggestersRequest(input) - return out, req.Send() -} - -// BuildSuggestersWithContext is the same as BuildSuggesters with the addition of -// the ability to pass a context and additional request options. -// -// See BuildSuggesters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) BuildSuggestersWithContext(ctx aws.Context, input *BuildSuggestersInput, opts ...request.Option) (*BuildSuggestersOutput, error) { - req, out := c.BuildSuggestersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDomain = "CreateDomain" - -// CreateDomainRequest generates a "aws/request.Request" representing the -// client's request for the CreateDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDomain for more information on using the CreateDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDomainRequest method. -// req, resp := client.CreateDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) CreateDomainRequest(input *CreateDomainInput) (req *request.Request, output *CreateDomainOutput) { - op := &request.Operation{ - Name: opCreateDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDomainInput{} - } - - output = &CreateDomainOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDomain API operation for Amazon CloudSearch. -// -// Creates a new search domain. For more information, see Creating a Search -// Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/creating-domains.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation CreateDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because a resource limit has already been met. -// -func (c *CloudSearch) CreateDomain(input *CreateDomainInput) (*CreateDomainOutput, error) { - req, out := c.CreateDomainRequest(input) - return out, req.Send() -} - -// CreateDomainWithContext is the same as CreateDomain with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) CreateDomainWithContext(ctx aws.Context, input *CreateDomainInput, opts ...request.Option) (*CreateDomainOutput, error) { - req, out := c.CreateDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDefineAnalysisScheme = "DefineAnalysisScheme" - -// DefineAnalysisSchemeRequest generates a "aws/request.Request" representing the -// client's request for the DefineAnalysisScheme operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DefineAnalysisScheme for more information on using the DefineAnalysisScheme -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DefineAnalysisSchemeRequest method. -// req, resp := client.DefineAnalysisSchemeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DefineAnalysisSchemeRequest(input *DefineAnalysisSchemeInput) (req *request.Request, output *DefineAnalysisSchemeOutput) { - op := &request.Operation{ - Name: opDefineAnalysisScheme, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DefineAnalysisSchemeInput{} - } - - output = &DefineAnalysisSchemeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DefineAnalysisScheme API operation for Amazon CloudSearch. -// -// Configures an analysis scheme that can be applied to a text or text-array -// field to define language-specific text processing options. For more information, -// see Configuring Analysis Schemes (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DefineAnalysisScheme for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because a resource limit has already been met. -// -// * ErrCodeInvalidTypeException "InvalidType" -// The request was rejected because it specified an invalid type definition. -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) DefineAnalysisScheme(input *DefineAnalysisSchemeInput) (*DefineAnalysisSchemeOutput, error) { - req, out := c.DefineAnalysisSchemeRequest(input) - return out, req.Send() -} - -// DefineAnalysisSchemeWithContext is the same as DefineAnalysisScheme with the addition of -// the ability to pass a context and additional request options. -// -// See DefineAnalysisScheme for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DefineAnalysisSchemeWithContext(ctx aws.Context, input *DefineAnalysisSchemeInput, opts ...request.Option) (*DefineAnalysisSchemeOutput, error) { - req, out := c.DefineAnalysisSchemeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDefineExpression = "DefineExpression" - -// DefineExpressionRequest generates a "aws/request.Request" representing the -// client's request for the DefineExpression operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DefineExpression for more information on using the DefineExpression -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DefineExpressionRequest method. -// req, resp := client.DefineExpressionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DefineExpressionRequest(input *DefineExpressionInput) (req *request.Request, output *DefineExpressionOutput) { - op := &request.Operation{ - Name: opDefineExpression, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DefineExpressionInput{} - } - - output = &DefineExpressionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DefineExpression API operation for Amazon CloudSearch. -// -// Configures an Expression for the search domain. Used to create new expressions -// and modify existing ones. If the expression exists, the new configuration -// replaces the old one. For more information, see Configuring Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DefineExpression for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because a resource limit has already been met. -// -// * ErrCodeInvalidTypeException "InvalidType" -// The request was rejected because it specified an invalid type definition. -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) DefineExpression(input *DefineExpressionInput) (*DefineExpressionOutput, error) { - req, out := c.DefineExpressionRequest(input) - return out, req.Send() -} - -// DefineExpressionWithContext is the same as DefineExpression with the addition of -// the ability to pass a context and additional request options. -// -// See DefineExpression for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DefineExpressionWithContext(ctx aws.Context, input *DefineExpressionInput, opts ...request.Option) (*DefineExpressionOutput, error) { - req, out := c.DefineExpressionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDefineIndexField = "DefineIndexField" - -// DefineIndexFieldRequest generates a "aws/request.Request" representing the -// client's request for the DefineIndexField operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DefineIndexField for more information on using the DefineIndexField -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DefineIndexFieldRequest method. -// req, resp := client.DefineIndexFieldRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DefineIndexFieldRequest(input *DefineIndexFieldInput) (req *request.Request, output *DefineIndexFieldOutput) { - op := &request.Operation{ - Name: opDefineIndexField, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DefineIndexFieldInput{} - } - - output = &DefineIndexFieldOutput{} - req = c.newRequest(op, input, output) - return -} - -// DefineIndexField API operation for Amazon CloudSearch. -// -// Configures an IndexField for the search domain. Used to create new fields -// and modify existing ones. You must specify the name of the domain you are -// configuring and an index field configuration. The index field configuration -// specifies a unique name, the index field type, and the options you want to -// configure for the field. The options you can specify depend on the IndexFieldType. -// If the field exists, the new configuration replaces the old one. For more -// information, see Configuring Index Fields (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DefineIndexField for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because a resource limit has already been met. -// -// * ErrCodeInvalidTypeException "InvalidType" -// The request was rejected because it specified an invalid type definition. -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) DefineIndexField(input *DefineIndexFieldInput) (*DefineIndexFieldOutput, error) { - req, out := c.DefineIndexFieldRequest(input) - return out, req.Send() -} - -// DefineIndexFieldWithContext is the same as DefineIndexField with the addition of -// the ability to pass a context and additional request options. -// -// See DefineIndexField for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DefineIndexFieldWithContext(ctx aws.Context, input *DefineIndexFieldInput, opts ...request.Option) (*DefineIndexFieldOutput, error) { - req, out := c.DefineIndexFieldRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDefineSuggester = "DefineSuggester" - -// DefineSuggesterRequest generates a "aws/request.Request" representing the -// client's request for the DefineSuggester operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DefineSuggester for more information on using the DefineSuggester -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DefineSuggesterRequest method. -// req, resp := client.DefineSuggesterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DefineSuggesterRequest(input *DefineSuggesterInput) (req *request.Request, output *DefineSuggesterOutput) { - op := &request.Operation{ - Name: opDefineSuggester, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DefineSuggesterInput{} - } - - output = &DefineSuggesterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DefineSuggester API operation for Amazon CloudSearch. -// -// Configures a suggester for a domain. A suggester enables you to display possible -// matches before users finish typing their queries. When you configure a suggester, -// you must specify the name of the text field you want to search for possible -// matches and a unique name for the suggester. For more information, see Getting -// Search Suggestions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DefineSuggester for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because a resource limit has already been met. -// -// * ErrCodeInvalidTypeException "InvalidType" -// The request was rejected because it specified an invalid type definition. -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) DefineSuggester(input *DefineSuggesterInput) (*DefineSuggesterOutput, error) { - req, out := c.DefineSuggesterRequest(input) - return out, req.Send() -} - -// DefineSuggesterWithContext is the same as DefineSuggester with the addition of -// the ability to pass a context and additional request options. -// -// See DefineSuggester for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DefineSuggesterWithContext(ctx aws.Context, input *DefineSuggesterInput, opts ...request.Option) (*DefineSuggesterOutput, error) { - req, out := c.DefineSuggesterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAnalysisScheme = "DeleteAnalysisScheme" - -// DeleteAnalysisSchemeRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAnalysisScheme operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAnalysisScheme for more information on using the DeleteAnalysisScheme -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAnalysisSchemeRequest method. -// req, resp := client.DeleteAnalysisSchemeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DeleteAnalysisSchemeRequest(input *DeleteAnalysisSchemeInput) (req *request.Request, output *DeleteAnalysisSchemeOutput) { - op := &request.Operation{ - Name: opDeleteAnalysisScheme, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAnalysisSchemeInput{} - } - - output = &DeleteAnalysisSchemeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteAnalysisScheme API operation for Amazon CloudSearch. -// -// Deletes an analysis scheme. For more information, see Configuring Analysis -// Schemes (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DeleteAnalysisScheme for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeInvalidTypeException "InvalidType" -// The request was rejected because it specified an invalid type definition. -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) DeleteAnalysisScheme(input *DeleteAnalysisSchemeInput) (*DeleteAnalysisSchemeOutput, error) { - req, out := c.DeleteAnalysisSchemeRequest(input) - return out, req.Send() -} - -// DeleteAnalysisSchemeWithContext is the same as DeleteAnalysisScheme with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAnalysisScheme for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DeleteAnalysisSchemeWithContext(ctx aws.Context, input *DeleteAnalysisSchemeInput, opts ...request.Option) (*DeleteAnalysisSchemeOutput, error) { - req, out := c.DeleteAnalysisSchemeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDomain = "DeleteDomain" - -// DeleteDomainRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDomain for more information on using the DeleteDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDomainRequest method. -// req, resp := client.DeleteDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DeleteDomainRequest(input *DeleteDomainInput) (req *request.Request, output *DeleteDomainOutput) { - op := &request.Operation{ - Name: opDeleteDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDomainInput{} - } - - output = &DeleteDomainOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDomain API operation for Amazon CloudSearch. -// -// Permanently deletes a search domain and all of its data. Once a domain has -// been deleted, it cannot be recovered. For more information, see Deleting -// a Search Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/deleting-domains.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DeleteDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -func (c *CloudSearch) DeleteDomain(input *DeleteDomainInput) (*DeleteDomainOutput, error) { - req, out := c.DeleteDomainRequest(input) - return out, req.Send() -} - -// DeleteDomainWithContext is the same as DeleteDomain with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DeleteDomainWithContext(ctx aws.Context, input *DeleteDomainInput, opts ...request.Option) (*DeleteDomainOutput, error) { - req, out := c.DeleteDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteExpression = "DeleteExpression" - -// DeleteExpressionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteExpression operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteExpression for more information on using the DeleteExpression -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteExpressionRequest method. -// req, resp := client.DeleteExpressionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DeleteExpressionRequest(input *DeleteExpressionInput) (req *request.Request, output *DeleteExpressionOutput) { - op := &request.Operation{ - Name: opDeleteExpression, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteExpressionInput{} - } - - output = &DeleteExpressionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteExpression API operation for Amazon CloudSearch. -// -// Removes an Expression from the search domain. For more information, see Configuring -// Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DeleteExpression for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeInvalidTypeException "InvalidType" -// The request was rejected because it specified an invalid type definition. -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) DeleteExpression(input *DeleteExpressionInput) (*DeleteExpressionOutput, error) { - req, out := c.DeleteExpressionRequest(input) - return out, req.Send() -} - -// DeleteExpressionWithContext is the same as DeleteExpression with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteExpression for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DeleteExpressionWithContext(ctx aws.Context, input *DeleteExpressionInput, opts ...request.Option) (*DeleteExpressionOutput, error) { - req, out := c.DeleteExpressionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIndexField = "DeleteIndexField" - -// DeleteIndexFieldRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIndexField operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIndexField for more information on using the DeleteIndexField -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIndexFieldRequest method. -// req, resp := client.DeleteIndexFieldRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DeleteIndexFieldRequest(input *DeleteIndexFieldInput) (req *request.Request, output *DeleteIndexFieldOutput) { - op := &request.Operation{ - Name: opDeleteIndexField, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteIndexFieldInput{} - } - - output = &DeleteIndexFieldOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteIndexField API operation for Amazon CloudSearch. -// -// Removes an IndexField from the search domain. For more information, see Configuring -// Index Fields (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DeleteIndexField for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeInvalidTypeException "InvalidType" -// The request was rejected because it specified an invalid type definition. -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) DeleteIndexField(input *DeleteIndexFieldInput) (*DeleteIndexFieldOutput, error) { - req, out := c.DeleteIndexFieldRequest(input) - return out, req.Send() -} - -// DeleteIndexFieldWithContext is the same as DeleteIndexField with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIndexField for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DeleteIndexFieldWithContext(ctx aws.Context, input *DeleteIndexFieldInput, opts ...request.Option) (*DeleteIndexFieldOutput, error) { - req, out := c.DeleteIndexFieldRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSuggester = "DeleteSuggester" - -// DeleteSuggesterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSuggester operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSuggester for more information on using the DeleteSuggester -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSuggesterRequest method. -// req, resp := client.DeleteSuggesterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DeleteSuggesterRequest(input *DeleteSuggesterInput) (req *request.Request, output *DeleteSuggesterOutput) { - op := &request.Operation{ - Name: opDeleteSuggester, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSuggesterInput{} - } - - output = &DeleteSuggesterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteSuggester API operation for Amazon CloudSearch. -// -// Deletes a suggester. For more information, see Getting Search Suggestions -// (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DeleteSuggester for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeInvalidTypeException "InvalidType" -// The request was rejected because it specified an invalid type definition. -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) DeleteSuggester(input *DeleteSuggesterInput) (*DeleteSuggesterOutput, error) { - req, out := c.DeleteSuggesterRequest(input) - return out, req.Send() -} - -// DeleteSuggesterWithContext is the same as DeleteSuggester with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSuggester for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DeleteSuggesterWithContext(ctx aws.Context, input *DeleteSuggesterInput, opts ...request.Option) (*DeleteSuggesterOutput, error) { - req, out := c.DeleteSuggesterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAnalysisSchemes = "DescribeAnalysisSchemes" - -// DescribeAnalysisSchemesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAnalysisSchemes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAnalysisSchemes for more information on using the DescribeAnalysisSchemes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAnalysisSchemesRequest method. -// req, resp := client.DescribeAnalysisSchemesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DescribeAnalysisSchemesRequest(input *DescribeAnalysisSchemesInput) (req *request.Request, output *DescribeAnalysisSchemesOutput) { - op := &request.Operation{ - Name: opDescribeAnalysisSchemes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAnalysisSchemesInput{} - } - - output = &DescribeAnalysisSchemesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAnalysisSchemes API operation for Amazon CloudSearch. -// -// Gets the analysis schemes configured for a domain. An analysis scheme defines -// language-specific text processing options for a text field. Can be limited -// to specific analysis schemes by name. By default, shows all analysis schemes -// and includes any pending changes to the configuration. Set the Deployed option -// to true to show the active configuration and exclude pending changes. For -// more information, see Configuring Analysis Schemes (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DescribeAnalysisSchemes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) DescribeAnalysisSchemes(input *DescribeAnalysisSchemesInput) (*DescribeAnalysisSchemesOutput, error) { - req, out := c.DescribeAnalysisSchemesRequest(input) - return out, req.Send() -} - -// DescribeAnalysisSchemesWithContext is the same as DescribeAnalysisSchemes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAnalysisSchemes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DescribeAnalysisSchemesWithContext(ctx aws.Context, input *DescribeAnalysisSchemesInput, opts ...request.Option) (*DescribeAnalysisSchemesOutput, error) { - req, out := c.DescribeAnalysisSchemesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAvailabilityOptions = "DescribeAvailabilityOptions" - -// DescribeAvailabilityOptionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAvailabilityOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAvailabilityOptions for more information on using the DescribeAvailabilityOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAvailabilityOptionsRequest method. -// req, resp := client.DescribeAvailabilityOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DescribeAvailabilityOptionsRequest(input *DescribeAvailabilityOptionsInput) (req *request.Request, output *DescribeAvailabilityOptionsOutput) { - op := &request.Operation{ - Name: opDescribeAvailabilityOptions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAvailabilityOptionsInput{} - } - - output = &DescribeAvailabilityOptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAvailabilityOptions API operation for Amazon CloudSearch. -// -// Gets the availability options configured for a domain. By default, shows -// the configuration with any pending changes. Set the Deployed option to true -// to show the active configuration and exclude pending changes. For more information, -// see Configuring Availability Options (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-availability-options.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DescribeAvailabilityOptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeInvalidTypeException "InvalidType" -// The request was rejected because it specified an invalid type definition. -// -// * ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because a resource limit has already been met. -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -// * ErrCodeDisabledOperationException "DisabledAction" -// The request was rejected because it attempted an operation which is not enabled. -// -func (c *CloudSearch) DescribeAvailabilityOptions(input *DescribeAvailabilityOptionsInput) (*DescribeAvailabilityOptionsOutput, error) { - req, out := c.DescribeAvailabilityOptionsRequest(input) - return out, req.Send() -} - -// DescribeAvailabilityOptionsWithContext is the same as DescribeAvailabilityOptions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAvailabilityOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DescribeAvailabilityOptionsWithContext(ctx aws.Context, input *DescribeAvailabilityOptionsInput, opts ...request.Option) (*DescribeAvailabilityOptionsOutput, error) { - req, out := c.DescribeAvailabilityOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDomains = "DescribeDomains" - -// DescribeDomainsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDomains operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDomains for more information on using the DescribeDomains -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDomainsRequest method. -// req, resp := client.DescribeDomainsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DescribeDomainsRequest(input *DescribeDomainsInput) (req *request.Request, output *DescribeDomainsOutput) { - op := &request.Operation{ - Name: opDescribeDomains, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDomainsInput{} - } - - output = &DescribeDomainsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDomains API operation for Amazon CloudSearch. -// -// Gets information about the search domains owned by this account. Can be limited -// to specific domains. Shows all domains by default. To get the number of searchable -// documents in a domain, use the console or submit a matchall request to your -// domain's search endpoint: q=matchall&q.parser=structured&size=0. -// For more information, see Getting Information about a Search Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-domain-info.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DescribeDomains for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -func (c *CloudSearch) DescribeDomains(input *DescribeDomainsInput) (*DescribeDomainsOutput, error) { - req, out := c.DescribeDomainsRequest(input) - return out, req.Send() -} - -// DescribeDomainsWithContext is the same as DescribeDomains with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDomains for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DescribeDomainsWithContext(ctx aws.Context, input *DescribeDomainsInput, opts ...request.Option) (*DescribeDomainsOutput, error) { - req, out := c.DescribeDomainsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeExpressions = "DescribeExpressions" - -// DescribeExpressionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeExpressions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeExpressions for more information on using the DescribeExpressions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeExpressionsRequest method. -// req, resp := client.DescribeExpressionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DescribeExpressionsRequest(input *DescribeExpressionsInput) (req *request.Request, output *DescribeExpressionsOutput) { - op := &request.Operation{ - Name: opDescribeExpressions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeExpressionsInput{} - } - - output = &DescribeExpressionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeExpressions API operation for Amazon CloudSearch. -// -// Gets the expressions configured for the search domain. Can be limited to -// specific expressions by name. By default, shows all expressions and includes -// any pending changes to the configuration. Set the Deployed option to true -// to show the active configuration and exclude pending changes. For more information, -// see Configuring Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DescribeExpressions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) DescribeExpressions(input *DescribeExpressionsInput) (*DescribeExpressionsOutput, error) { - req, out := c.DescribeExpressionsRequest(input) - return out, req.Send() -} - -// DescribeExpressionsWithContext is the same as DescribeExpressions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeExpressions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DescribeExpressionsWithContext(ctx aws.Context, input *DescribeExpressionsInput, opts ...request.Option) (*DescribeExpressionsOutput, error) { - req, out := c.DescribeExpressionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeIndexFields = "DescribeIndexFields" - -// DescribeIndexFieldsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeIndexFields operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeIndexFields for more information on using the DescribeIndexFields -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeIndexFieldsRequest method. -// req, resp := client.DescribeIndexFieldsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DescribeIndexFieldsRequest(input *DescribeIndexFieldsInput) (req *request.Request, output *DescribeIndexFieldsOutput) { - op := &request.Operation{ - Name: opDescribeIndexFields, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeIndexFieldsInput{} - } - - output = &DescribeIndexFieldsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeIndexFields API operation for Amazon CloudSearch. -// -// Gets information about the index fields configured for the search domain. -// Can be limited to specific fields by name. By default, shows all fields and -// includes any pending changes to the configuration. Set the Deployed option -// to true to show the active configuration and exclude pending changes. For -// more information, see Getting Domain Information (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-domain-info.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DescribeIndexFields for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) DescribeIndexFields(input *DescribeIndexFieldsInput) (*DescribeIndexFieldsOutput, error) { - req, out := c.DescribeIndexFieldsRequest(input) - return out, req.Send() -} - -// DescribeIndexFieldsWithContext is the same as DescribeIndexFields with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeIndexFields for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DescribeIndexFieldsWithContext(ctx aws.Context, input *DescribeIndexFieldsInput, opts ...request.Option) (*DescribeIndexFieldsOutput, error) { - req, out := c.DescribeIndexFieldsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeScalingParameters = "DescribeScalingParameters" - -// DescribeScalingParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeScalingParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeScalingParameters for more information on using the DescribeScalingParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeScalingParametersRequest method. -// req, resp := client.DescribeScalingParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DescribeScalingParametersRequest(input *DescribeScalingParametersInput) (req *request.Request, output *DescribeScalingParametersOutput) { - op := &request.Operation{ - Name: opDescribeScalingParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeScalingParametersInput{} - } - - output = &DescribeScalingParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeScalingParameters API operation for Amazon CloudSearch. -// -// Gets the scaling parameters configured for a domain. A domain's scaling parameters -// specify the desired search instance type and replication count. For more -// information, see Configuring Scaling Options (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-scaling-options.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DescribeScalingParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) DescribeScalingParameters(input *DescribeScalingParametersInput) (*DescribeScalingParametersOutput, error) { - req, out := c.DescribeScalingParametersRequest(input) - return out, req.Send() -} - -// DescribeScalingParametersWithContext is the same as DescribeScalingParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeScalingParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DescribeScalingParametersWithContext(ctx aws.Context, input *DescribeScalingParametersInput, opts ...request.Option) (*DescribeScalingParametersOutput, error) { - req, out := c.DescribeScalingParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeServiceAccessPolicies = "DescribeServiceAccessPolicies" - -// DescribeServiceAccessPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeServiceAccessPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeServiceAccessPolicies for more information on using the DescribeServiceAccessPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeServiceAccessPoliciesRequest method. -// req, resp := client.DescribeServiceAccessPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DescribeServiceAccessPoliciesRequest(input *DescribeServiceAccessPoliciesInput) (req *request.Request, output *DescribeServiceAccessPoliciesOutput) { - op := &request.Operation{ - Name: opDescribeServiceAccessPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeServiceAccessPoliciesInput{} - } - - output = &DescribeServiceAccessPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeServiceAccessPolicies API operation for Amazon CloudSearch. -// -// Gets information about the access policies that control access to the domain's -// document and search endpoints. By default, shows the configuration with any -// pending changes. Set the Deployed option to true to show the active configuration -// and exclude pending changes. For more information, see Configuring Access -// for a Search Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-access.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DescribeServiceAccessPolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) DescribeServiceAccessPolicies(input *DescribeServiceAccessPoliciesInput) (*DescribeServiceAccessPoliciesOutput, error) { - req, out := c.DescribeServiceAccessPoliciesRequest(input) - return out, req.Send() -} - -// DescribeServiceAccessPoliciesWithContext is the same as DescribeServiceAccessPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeServiceAccessPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DescribeServiceAccessPoliciesWithContext(ctx aws.Context, input *DescribeServiceAccessPoliciesInput, opts ...request.Option) (*DescribeServiceAccessPoliciesOutput, error) { - req, out := c.DescribeServiceAccessPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSuggesters = "DescribeSuggesters" - -// DescribeSuggestersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSuggesters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSuggesters for more information on using the DescribeSuggesters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSuggestersRequest method. -// req, resp := client.DescribeSuggestersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) DescribeSuggestersRequest(input *DescribeSuggestersInput) (req *request.Request, output *DescribeSuggestersOutput) { - op := &request.Operation{ - Name: opDescribeSuggesters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSuggestersInput{} - } - - output = &DescribeSuggestersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSuggesters API operation for Amazon CloudSearch. -// -// Gets the suggesters configured for a domain. A suggester enables you to display -// possible matches before users finish typing their queries. Can be limited -// to specific suggesters by name. By default, shows all suggesters and includes -// any pending changes to the configuration. Set the Deployed option to true -// to show the active configuration and exclude pending changes. For more information, -// see Getting Search Suggestions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation DescribeSuggesters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) DescribeSuggesters(input *DescribeSuggestersInput) (*DescribeSuggestersOutput, error) { - req, out := c.DescribeSuggestersRequest(input) - return out, req.Send() -} - -// DescribeSuggestersWithContext is the same as DescribeSuggesters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSuggesters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) DescribeSuggestersWithContext(ctx aws.Context, input *DescribeSuggestersInput, opts ...request.Option) (*DescribeSuggestersOutput, error) { - req, out := c.DescribeSuggestersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opIndexDocuments = "IndexDocuments" - -// IndexDocumentsRequest generates a "aws/request.Request" representing the -// client's request for the IndexDocuments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See IndexDocuments for more information on using the IndexDocuments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the IndexDocumentsRequest method. -// req, resp := client.IndexDocumentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) IndexDocumentsRequest(input *IndexDocumentsInput) (req *request.Request, output *IndexDocumentsOutput) { - op := &request.Operation{ - Name: opIndexDocuments, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &IndexDocumentsInput{} - } - - output = &IndexDocumentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// IndexDocuments API operation for Amazon CloudSearch. -// -// Tells the search domain to start indexing its documents using the latest -// indexing options. This operation must be invoked to activate options whose -// OptionStatus is RequiresIndexDocuments. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation IndexDocuments for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -func (c *CloudSearch) IndexDocuments(input *IndexDocumentsInput) (*IndexDocumentsOutput, error) { - req, out := c.IndexDocumentsRequest(input) - return out, req.Send() -} - -// IndexDocumentsWithContext is the same as IndexDocuments with the addition of -// the ability to pass a context and additional request options. -// -// See IndexDocuments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) IndexDocumentsWithContext(ctx aws.Context, input *IndexDocumentsInput, opts ...request.Option) (*IndexDocumentsOutput, error) { - req, out := c.IndexDocumentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDomainNames = "ListDomainNames" - -// ListDomainNamesRequest generates a "aws/request.Request" representing the -// client's request for the ListDomainNames operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDomainNames for more information on using the ListDomainNames -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDomainNamesRequest method. -// req, resp := client.ListDomainNamesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) ListDomainNamesRequest(input *ListDomainNamesInput) (req *request.Request, output *ListDomainNamesOutput) { - op := &request.Operation{ - Name: opListDomainNames, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListDomainNamesInput{} - } - - output = &ListDomainNamesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDomainNames API operation for Amazon CloudSearch. -// -// Lists all search domains owned by an account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation ListDomainNames for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -func (c *CloudSearch) ListDomainNames(input *ListDomainNamesInput) (*ListDomainNamesOutput, error) { - req, out := c.ListDomainNamesRequest(input) - return out, req.Send() -} - -// ListDomainNamesWithContext is the same as ListDomainNames with the addition of -// the ability to pass a context and additional request options. -// -// See ListDomainNames for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) ListDomainNamesWithContext(ctx aws.Context, input *ListDomainNamesInput, opts ...request.Option) (*ListDomainNamesOutput, error) { - req, out := c.ListDomainNamesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAvailabilityOptions = "UpdateAvailabilityOptions" - -// UpdateAvailabilityOptionsRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAvailabilityOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAvailabilityOptions for more information on using the UpdateAvailabilityOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAvailabilityOptionsRequest method. -// req, resp := client.UpdateAvailabilityOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) UpdateAvailabilityOptionsRequest(input *UpdateAvailabilityOptionsInput) (req *request.Request, output *UpdateAvailabilityOptionsOutput) { - op := &request.Operation{ - Name: opUpdateAvailabilityOptions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAvailabilityOptionsInput{} - } - - output = &UpdateAvailabilityOptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateAvailabilityOptions API operation for Amazon CloudSearch. -// -// Configures the availability options for a domain. Enabling the Multi-AZ option -// expands an Amazon CloudSearch domain to an additional Availability Zone in -// the same Region to increase fault tolerance in the event of a service disruption. -// Changes to the Multi-AZ option can take about half an hour to become active. -// For more information, see Configuring Availability Options (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-availability-options.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation UpdateAvailabilityOptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeInvalidTypeException "InvalidType" -// The request was rejected because it specified an invalid type definition. -// -// * ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because a resource limit has already been met. -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -// * ErrCodeDisabledOperationException "DisabledAction" -// The request was rejected because it attempted an operation which is not enabled. -// -func (c *CloudSearch) UpdateAvailabilityOptions(input *UpdateAvailabilityOptionsInput) (*UpdateAvailabilityOptionsOutput, error) { - req, out := c.UpdateAvailabilityOptionsRequest(input) - return out, req.Send() -} - -// UpdateAvailabilityOptionsWithContext is the same as UpdateAvailabilityOptions with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAvailabilityOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) UpdateAvailabilityOptionsWithContext(ctx aws.Context, input *UpdateAvailabilityOptionsInput, opts ...request.Option) (*UpdateAvailabilityOptionsOutput, error) { - req, out := c.UpdateAvailabilityOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateScalingParameters = "UpdateScalingParameters" - -// UpdateScalingParametersRequest generates a "aws/request.Request" representing the -// client's request for the UpdateScalingParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateScalingParameters for more information on using the UpdateScalingParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateScalingParametersRequest method. -// req, resp := client.UpdateScalingParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) UpdateScalingParametersRequest(input *UpdateScalingParametersInput) (req *request.Request, output *UpdateScalingParametersOutput) { - op := &request.Operation{ - Name: opUpdateScalingParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateScalingParametersInput{} - } - - output = &UpdateScalingParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateScalingParameters API operation for Amazon CloudSearch. -// -// Configures scaling parameters for a domain. A domain's scaling parameters -// specify the desired search instance type and replication count. Amazon CloudSearch -// will still automatically scale your domain based on the volume of data and -// traffic, but not below the desired instance type and replication count. If -// the Multi-AZ option is enabled, these values control the resources used per -// Availability Zone. For more information, see Configuring Scaling Options -// (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-scaling-options.html) -// in the Amazon CloudSearch Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation UpdateScalingParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because a resource limit has already been met. -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -// * ErrCodeInvalidTypeException "InvalidType" -// The request was rejected because it specified an invalid type definition. -// -func (c *CloudSearch) UpdateScalingParameters(input *UpdateScalingParametersInput) (*UpdateScalingParametersOutput, error) { - req, out := c.UpdateScalingParametersRequest(input) - return out, req.Send() -} - -// UpdateScalingParametersWithContext is the same as UpdateScalingParameters with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateScalingParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) UpdateScalingParametersWithContext(ctx aws.Context, input *UpdateScalingParametersInput, opts ...request.Option) (*UpdateScalingParametersOutput, error) { - req, out := c.UpdateScalingParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateServiceAccessPolicies = "UpdateServiceAccessPolicies" - -// UpdateServiceAccessPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the UpdateServiceAccessPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateServiceAccessPolicies for more information on using the UpdateServiceAccessPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateServiceAccessPoliciesRequest method. -// req, resp := client.UpdateServiceAccessPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *CloudSearch) UpdateServiceAccessPoliciesRequest(input *UpdateServiceAccessPoliciesInput) (req *request.Request, output *UpdateServiceAccessPoliciesOutput) { - op := &request.Operation{ - Name: opUpdateServiceAccessPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateServiceAccessPoliciesInput{} - } - - output = &UpdateServiceAccessPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateServiceAccessPolicies API operation for Amazon CloudSearch. -// -// Configures the access rules that control access to the domain's document -// and search endpoints. For more information, see Configuring Access for an -// Amazon CloudSearch Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-access.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudSearch's -// API operation UpdateServiceAccessPolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// An internal error occurred while processing the request. If this problem -// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). -// -// * ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because a resource limit has already been met. -// -// * ErrCodeResourceNotFoundException "ResourceNotFound" -// The request was rejected because it attempted to reference a resource that -// does not exist. -// -// * ErrCodeInvalidTypeException "InvalidType" -// The request was rejected because it specified an invalid type definition. -// -func (c *CloudSearch) UpdateServiceAccessPolicies(input *UpdateServiceAccessPoliciesInput) (*UpdateServiceAccessPoliciesOutput, error) { - req, out := c.UpdateServiceAccessPoliciesRequest(input) - return out, req.Send() -} - -// UpdateServiceAccessPoliciesWithContext is the same as UpdateServiceAccessPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateServiceAccessPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudSearch) UpdateServiceAccessPoliciesWithContext(ctx aws.Context, input *UpdateServiceAccessPoliciesInput, opts ...request.Option) (*UpdateServiceAccessPoliciesOutput, error) { - req, out := c.UpdateServiceAccessPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// The configured access rules for the domain's document and search endpoints, -// and the current status of those rules. -type AccessPoliciesStatus struct { - _ struct{} `type:"structure"` - - // Access rules for a domain's document or search service endpoints. For more - // information, see Configuring Access for a Search Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-access.html) - // in the Amazon CloudSearch Developer Guide. The maximum size of a policy document - // is 100 KB. - // - // Options is a required field - Options *string `type:"string" required:"true"` - - // The status of domain configuration option. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s AccessPoliciesStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccessPoliciesStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *AccessPoliciesStatus) SetOptions(v string) *AccessPoliciesStatus { - s.Options = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AccessPoliciesStatus) SetStatus(v *OptionStatus) *AccessPoliciesStatus { - s.Status = v - return s -} - -// Synonyms, stopwords, and stemming options for an analysis scheme. Includes -// tokenization dictionary for Japanese. -type AnalysisOptions struct { - _ struct{} `type:"structure"` - - // The level of algorithmic stemming to perform: none, minimal, light, or full. - // The available levels vary depending on the language. For more information, - // see Language Specific Text Processing Settings (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/text-processing.html#text-processing-settings) - // in the Amazon CloudSearch Developer Guide - AlgorithmicStemming *string `type:"string" enum:"AlgorithmicStemming"` - - // A JSON array that contains a collection of terms, tokens, readings and part - // of speech for Japanese Tokenizaiton. The Japanese tokenization dictionary - // enables you to override the default tokenization for selected terms. This - // is only valid for Japanese language fields. - JapaneseTokenizationDictionary *string `type:"string"` - - // A JSON object that contains a collection of string:value pairs that each - // map a term to its stem. For example, {"term1": "stem1", "term2": "stem2", - // "term3": "stem3"}. The stemming dictionary is applied in addition to any - // algorithmic stemming. This enables you to override the results of the algorithmic - // stemming to correct specific cases of overstemming or understemming. The - // maximum size of a stemming dictionary is 500 KB. - StemmingDictionary *string `type:"string"` - - // A JSON array of terms to ignore during indexing and searching. For example, - // ["a", "an", "the", "of"]. The stopwords dictionary must explicitly list each - // word you want to ignore. Wildcards and regular expressions are not supported. - Stopwords *string `type:"string"` - - // A JSON object that defines synonym groups and aliases. A synonym group is - // an array of arrays, where each sub-array is a group of terms where each term - // in the group is considered a synonym of every other term in the group. The - // aliases value is an object that contains a collection of string:value pairs - // where the string specifies a term and the array of values specifies each - // of the aliases for that term. An alias is considered a synonym of the specified - // term, but the term is not considered a synonym of the alias. For more information - // about specifying synonyms, see Synonyms (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html#synonyms) - // in the Amazon CloudSearch Developer Guide. - Synonyms *string `type:"string"` -} - -// String returns the string representation -func (s AnalysisOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AnalysisOptions) GoString() string { - return s.String() -} - -// SetAlgorithmicStemming sets the AlgorithmicStemming field's value. -func (s *AnalysisOptions) SetAlgorithmicStemming(v string) *AnalysisOptions { - s.AlgorithmicStemming = &v - return s -} - -// SetJapaneseTokenizationDictionary sets the JapaneseTokenizationDictionary field's value. -func (s *AnalysisOptions) SetJapaneseTokenizationDictionary(v string) *AnalysisOptions { - s.JapaneseTokenizationDictionary = &v - return s -} - -// SetStemmingDictionary sets the StemmingDictionary field's value. -func (s *AnalysisOptions) SetStemmingDictionary(v string) *AnalysisOptions { - s.StemmingDictionary = &v - return s -} - -// SetStopwords sets the Stopwords field's value. -func (s *AnalysisOptions) SetStopwords(v string) *AnalysisOptions { - s.Stopwords = &v - return s -} - -// SetSynonyms sets the Synonyms field's value. -func (s *AnalysisOptions) SetSynonyms(v string) *AnalysisOptions { - s.Synonyms = &v - return s -} - -// Configuration information for an analysis scheme. Each analysis scheme has -// a unique name and specifies the language of the text to be processed. The -// following options can be configured for an analysis scheme: Synonyms, Stopwords, -// StemmingDictionary, JapaneseTokenizationDictionary and AlgorithmicStemming. -type AnalysisScheme struct { - _ struct{} `type:"structure"` - - // Synonyms, stopwords, and stemming options for an analysis scheme. Includes - // tokenization dictionary for Japanese. - AnalysisOptions *AnalysisOptions `type:"structure"` - - // An IETF RFC 4646 (http://tools.ietf.org/html/rfc4646) language code or mul - // for multiple languages. - // - // AnalysisSchemeLanguage is a required field - AnalysisSchemeLanguage *string `type:"string" required:"true" enum:"AnalysisSchemeLanguage"` - - // Names must begin with a letter and can contain the following characters: - // a-z (lowercase), 0-9, and _ (underscore). - // - // AnalysisSchemeName is a required field - AnalysisSchemeName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AnalysisScheme) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AnalysisScheme) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AnalysisScheme) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AnalysisScheme"} - if s.AnalysisSchemeLanguage == nil { - invalidParams.Add(request.NewErrParamRequired("AnalysisSchemeLanguage")) - } - if s.AnalysisSchemeName == nil { - invalidParams.Add(request.NewErrParamRequired("AnalysisSchemeName")) - } - if s.AnalysisSchemeName != nil && len(*s.AnalysisSchemeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AnalysisSchemeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalysisOptions sets the AnalysisOptions field's value. -func (s *AnalysisScheme) SetAnalysisOptions(v *AnalysisOptions) *AnalysisScheme { - s.AnalysisOptions = v - return s -} - -// SetAnalysisSchemeLanguage sets the AnalysisSchemeLanguage field's value. -func (s *AnalysisScheme) SetAnalysisSchemeLanguage(v string) *AnalysisScheme { - s.AnalysisSchemeLanguage = &v - return s -} - -// SetAnalysisSchemeName sets the AnalysisSchemeName field's value. -func (s *AnalysisScheme) SetAnalysisSchemeName(v string) *AnalysisScheme { - s.AnalysisSchemeName = &v - return s -} - -// The status and configuration of an AnalysisScheme. -type AnalysisSchemeStatus struct { - _ struct{} `type:"structure"` - - // Configuration information for an analysis scheme. Each analysis scheme has - // a unique name and specifies the language of the text to be processed. The - // following options can be configured for an analysis scheme: Synonyms, Stopwords, - // StemmingDictionary, JapaneseTokenizationDictionary and AlgorithmicStemming. - // - // Options is a required field - Options *AnalysisScheme `type:"structure" required:"true"` - - // The status of domain configuration option. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s AnalysisSchemeStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AnalysisSchemeStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *AnalysisSchemeStatus) SetOptions(v *AnalysisScheme) *AnalysisSchemeStatus { - s.Options = v - return s -} - -// SetStatus sets the Status field's value. -func (s *AnalysisSchemeStatus) SetStatus(v *OptionStatus) *AnalysisSchemeStatus { - s.Status = v - return s -} - -// The status and configuration of the domain's availability options. -type AvailabilityOptionsStatus struct { - _ struct{} `type:"structure"` - - // The availability options configured for the domain. - // - // Options is a required field - Options *bool `type:"boolean" required:"true"` - - // The status of domain configuration option. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s AvailabilityOptionsStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailabilityOptionsStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *AvailabilityOptionsStatus) SetOptions(v bool) *AvailabilityOptionsStatus { - s.Options = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AvailabilityOptionsStatus) SetStatus(v *OptionStatus) *AvailabilityOptionsStatus { - s.Status = v - return s -} - -// Container for the parameters to the BuildSuggester operation. Specifies the -// name of the domain you want to update. -type BuildSuggestersInput struct { - _ struct{} `type:"structure"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s BuildSuggestersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BuildSuggestersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BuildSuggestersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BuildSuggestersInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *BuildSuggestersInput) SetDomainName(v string) *BuildSuggestersInput { - s.DomainName = &v - return s -} - -// The result of a BuildSuggester request. Contains a list of the fields used -// for suggestions. -type BuildSuggestersOutput struct { - _ struct{} `type:"structure"` - - // A list of field names. - FieldNames []*string `type:"list"` -} - -// String returns the string representation -func (s BuildSuggestersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BuildSuggestersOutput) GoString() string { - return s.String() -} - -// SetFieldNames sets the FieldNames field's value. -func (s *BuildSuggestersOutput) SetFieldNames(v []*string) *BuildSuggestersOutput { - s.FieldNames = v - return s -} - -// Container for the parameters to the CreateDomain operation. Specifies a name -// for the new search domain. -type CreateDomainInput struct { - _ struct{} `type:"structure"` - - // A name for the domain you are creating. Allowed characters are a-z (lower-case - // letters), 0-9, and hyphen (-). Domain names must start with a letter or number - // and be at least 3 and no more than 28 characters long. - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *CreateDomainInput) SetDomainName(v string) *CreateDomainInput { - s.DomainName = &v - return s -} - -// The result of a CreateDomainRequest. Contains the status of a newly created -// domain. -type CreateDomainOutput struct { - _ struct{} `type:"structure"` - - // The current status of the search domain. - DomainStatus *DomainStatus `type:"structure"` -} - -// String returns the string representation -func (s CreateDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDomainOutput) GoString() string { - return s.String() -} - -// SetDomainStatus sets the DomainStatus field's value. -func (s *CreateDomainOutput) SetDomainStatus(v *DomainStatus) *CreateDomainOutput { - s.DomainStatus = v - return s -} - -// Options for a field that contains an array of dates. Present if IndexFieldType -// specifies the field is of type date-array. All options are enabled by default. -type DateArrayOptions struct { - _ struct{} `type:"structure"` - - // A value to use for the field if the field isn't specified for a document. - DefaultValue *string `type:"string"` - - // Whether facet information can be returned for the field. - FacetEnabled *bool `type:"boolean"` - - // Whether the contents of the field can be returned in the search results. - ReturnEnabled *bool `type:"boolean"` - - // Whether the contents of the field are searchable. - SearchEnabled *bool `type:"boolean"` - - // A list of source fields to map to the field. - SourceFields *string `type:"string"` -} - -// String returns the string representation -func (s DateArrayOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DateArrayOptions) GoString() string { - return s.String() -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *DateArrayOptions) SetDefaultValue(v string) *DateArrayOptions { - s.DefaultValue = &v - return s -} - -// SetFacetEnabled sets the FacetEnabled field's value. -func (s *DateArrayOptions) SetFacetEnabled(v bool) *DateArrayOptions { - s.FacetEnabled = &v - return s -} - -// SetReturnEnabled sets the ReturnEnabled field's value. -func (s *DateArrayOptions) SetReturnEnabled(v bool) *DateArrayOptions { - s.ReturnEnabled = &v - return s -} - -// SetSearchEnabled sets the SearchEnabled field's value. -func (s *DateArrayOptions) SetSearchEnabled(v bool) *DateArrayOptions { - s.SearchEnabled = &v - return s -} - -// SetSourceFields sets the SourceFields field's value. -func (s *DateArrayOptions) SetSourceFields(v string) *DateArrayOptions { - s.SourceFields = &v - return s -} - -// Options for a date field. Dates and times are specified in UTC (Coordinated -// Universal Time) according to IETF RFC3339: yyyy-mm-ddT00:00:00Z. Present -// if IndexFieldType specifies the field is of type date. All options are enabled -// by default. -type DateOptions struct { - _ struct{} `type:"structure"` - - // A value to use for the field if the field isn't specified for a document. - DefaultValue *string `type:"string"` - - // Whether facet information can be returned for the field. - FacetEnabled *bool `type:"boolean"` - - // Whether the contents of the field can be returned in the search results. - ReturnEnabled *bool `type:"boolean"` - - // Whether the contents of the field are searchable. - SearchEnabled *bool `type:"boolean"` - - // Whether the field can be used to sort the search results. - SortEnabled *bool `type:"boolean"` - - // A string that represents the name of an index field. CloudSearch supports - // regular index fields as well as dynamic fields. A dynamic field's name defines - // a pattern that begins or ends with a wildcard. Any document fields that don't - // map to a regular index field but do match a dynamic field's pattern are configured - // with the dynamic field's indexing options. - // - // Regular field names begin with a letter and can contain the following characters: - // a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin - // or end with a wildcard (*). The wildcard can also be the only character in - // a dynamic field name. Multiple wildcards, and wildcards embedded within a - // string are not supported. - // - // The name score is reserved and cannot be used as a field name. To reference - // a document's ID, you can use the name _id. - SourceField *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DateOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DateOptions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DateOptions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DateOptions"} - if s.SourceField != nil && len(*s.SourceField) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceField", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *DateOptions) SetDefaultValue(v string) *DateOptions { - s.DefaultValue = &v - return s -} - -// SetFacetEnabled sets the FacetEnabled field's value. -func (s *DateOptions) SetFacetEnabled(v bool) *DateOptions { - s.FacetEnabled = &v - return s -} - -// SetReturnEnabled sets the ReturnEnabled field's value. -func (s *DateOptions) SetReturnEnabled(v bool) *DateOptions { - s.ReturnEnabled = &v - return s -} - -// SetSearchEnabled sets the SearchEnabled field's value. -func (s *DateOptions) SetSearchEnabled(v bool) *DateOptions { - s.SearchEnabled = &v - return s -} - -// SetSortEnabled sets the SortEnabled field's value. -func (s *DateOptions) SetSortEnabled(v bool) *DateOptions { - s.SortEnabled = &v - return s -} - -// SetSourceField sets the SourceField field's value. -func (s *DateOptions) SetSourceField(v string) *DateOptions { - s.SourceField = &v - return s -} - -// Container for the parameters to the DefineAnalysisScheme operation. Specifies -// the name of the domain you want to update and the analysis scheme configuration. -type DefineAnalysisSchemeInput struct { - _ struct{} `type:"structure"` - - // Configuration information for an analysis scheme. Each analysis scheme has - // a unique name and specifies the language of the text to be processed. The - // following options can be configured for an analysis scheme: Synonyms, Stopwords, - // StemmingDictionary, JapaneseTokenizationDictionary and AlgorithmicStemming. - // - // AnalysisScheme is a required field - AnalysisScheme *AnalysisScheme `type:"structure" required:"true"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s DefineAnalysisSchemeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DefineAnalysisSchemeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DefineAnalysisSchemeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DefineAnalysisSchemeInput"} - if s.AnalysisScheme == nil { - invalidParams.Add(request.NewErrParamRequired("AnalysisScheme")) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.AnalysisScheme != nil { - if err := s.AnalysisScheme.Validate(); err != nil { - invalidParams.AddNested("AnalysisScheme", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalysisScheme sets the AnalysisScheme field's value. -func (s *DefineAnalysisSchemeInput) SetAnalysisScheme(v *AnalysisScheme) *DefineAnalysisSchemeInput { - s.AnalysisScheme = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DefineAnalysisSchemeInput) SetDomainName(v string) *DefineAnalysisSchemeInput { - s.DomainName = &v - return s -} - -// The result of a DefineAnalysisScheme request. Contains the status of the -// newly-configured analysis scheme. -type DefineAnalysisSchemeOutput struct { - _ struct{} `type:"structure"` - - // The status and configuration of an AnalysisScheme. - // - // AnalysisScheme is a required field - AnalysisScheme *AnalysisSchemeStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DefineAnalysisSchemeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DefineAnalysisSchemeOutput) GoString() string { - return s.String() -} - -// SetAnalysisScheme sets the AnalysisScheme field's value. -func (s *DefineAnalysisSchemeOutput) SetAnalysisScheme(v *AnalysisSchemeStatus) *DefineAnalysisSchemeOutput { - s.AnalysisScheme = v - return s -} - -// Container for the parameters to the DefineExpression operation. Specifies -// the name of the domain you want to update and the expression you want to -// configure. -type DefineExpressionInput struct { - _ struct{} `type:"structure"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - // A named expression that can be evaluated at search time. Can be used to sort - // the search results, define other expressions, or return computed information - // in the search results. - // - // Expression is a required field - Expression *Expression `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DefineExpressionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DefineExpressionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DefineExpressionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DefineExpressionInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.Expression == nil { - invalidParams.Add(request.NewErrParamRequired("Expression")) - } - if s.Expression != nil { - if err := s.Expression.Validate(); err != nil { - invalidParams.AddNested("Expression", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DefineExpressionInput) SetDomainName(v string) *DefineExpressionInput { - s.DomainName = &v - return s -} - -// SetExpression sets the Expression field's value. -func (s *DefineExpressionInput) SetExpression(v *Expression) *DefineExpressionInput { - s.Expression = v - return s -} - -// The result of a DefineExpression request. Contains the status of the newly-configured -// expression. -type DefineExpressionOutput struct { - _ struct{} `type:"structure"` - - // The value of an Expression and its current status. - // - // Expression is a required field - Expression *ExpressionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DefineExpressionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DefineExpressionOutput) GoString() string { - return s.String() -} - -// SetExpression sets the Expression field's value. -func (s *DefineExpressionOutput) SetExpression(v *ExpressionStatus) *DefineExpressionOutput { - s.Expression = v - return s -} - -// Container for the parameters to the DefineIndexField operation. Specifies -// the name of the domain you want to update and the index field configuration. -type DefineIndexFieldInput struct { - _ struct{} `type:"structure"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - // The index field and field options you want to configure. - // - // IndexField is a required field - IndexField *IndexField `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DefineIndexFieldInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DefineIndexFieldInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DefineIndexFieldInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DefineIndexFieldInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.IndexField == nil { - invalidParams.Add(request.NewErrParamRequired("IndexField")) - } - if s.IndexField != nil { - if err := s.IndexField.Validate(); err != nil { - invalidParams.AddNested("IndexField", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DefineIndexFieldInput) SetDomainName(v string) *DefineIndexFieldInput { - s.DomainName = &v - return s -} - -// SetIndexField sets the IndexField field's value. -func (s *DefineIndexFieldInput) SetIndexField(v *IndexField) *DefineIndexFieldInput { - s.IndexField = v - return s -} - -// The result of a DefineIndexField request. Contains the status of the newly-configured -// index field. -type DefineIndexFieldOutput struct { - _ struct{} `type:"structure"` - - // The value of an IndexField and its current status. - // - // IndexField is a required field - IndexField *IndexFieldStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DefineIndexFieldOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DefineIndexFieldOutput) GoString() string { - return s.String() -} - -// SetIndexField sets the IndexField field's value. -func (s *DefineIndexFieldOutput) SetIndexField(v *IndexFieldStatus) *DefineIndexFieldOutput { - s.IndexField = v - return s -} - -// Container for the parameters to the DefineSuggester operation. Specifies -// the name of the domain you want to update and the suggester configuration. -type DefineSuggesterInput struct { - _ struct{} `type:"structure"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - // Configuration information for a search suggester. Each suggester has a unique - // name and specifies the text field you want to use for suggestions. The following - // options can be configured for a suggester: FuzzyMatching, SortExpression. - // - // Suggester is a required field - Suggester *Suggester `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DefineSuggesterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DefineSuggesterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DefineSuggesterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DefineSuggesterInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.Suggester == nil { - invalidParams.Add(request.NewErrParamRequired("Suggester")) - } - if s.Suggester != nil { - if err := s.Suggester.Validate(); err != nil { - invalidParams.AddNested("Suggester", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DefineSuggesterInput) SetDomainName(v string) *DefineSuggesterInput { - s.DomainName = &v - return s -} - -// SetSuggester sets the Suggester field's value. -func (s *DefineSuggesterInput) SetSuggester(v *Suggester) *DefineSuggesterInput { - s.Suggester = v - return s -} - -// The result of a DefineSuggester request. Contains the status of the newly-configured -// suggester. -type DefineSuggesterOutput struct { - _ struct{} `type:"structure"` - - // The value of a Suggester and its current status. - // - // Suggester is a required field - Suggester *SuggesterStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DefineSuggesterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DefineSuggesterOutput) GoString() string { - return s.String() -} - -// SetSuggester sets the Suggester field's value. -func (s *DefineSuggesterOutput) SetSuggester(v *SuggesterStatus) *DefineSuggesterOutput { - s.Suggester = v - return s -} - -// Container for the parameters to the DeleteAnalysisScheme operation. Specifies -// the name of the domain you want to update and the analysis scheme you want -// to delete. -type DeleteAnalysisSchemeInput struct { - _ struct{} `type:"structure"` - - // The name of the analysis scheme you want to delete. - // - // AnalysisSchemeName is a required field - AnalysisSchemeName *string `min:"1" type:"string" required:"true"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAnalysisSchemeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAnalysisSchemeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAnalysisSchemeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAnalysisSchemeInput"} - if s.AnalysisSchemeName == nil { - invalidParams.Add(request.NewErrParamRequired("AnalysisSchemeName")) - } - if s.AnalysisSchemeName != nil && len(*s.AnalysisSchemeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AnalysisSchemeName", 1)) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalysisSchemeName sets the AnalysisSchemeName field's value. -func (s *DeleteAnalysisSchemeInput) SetAnalysisSchemeName(v string) *DeleteAnalysisSchemeInput { - s.AnalysisSchemeName = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteAnalysisSchemeInput) SetDomainName(v string) *DeleteAnalysisSchemeInput { - s.DomainName = &v - return s -} - -// The result of a DeleteAnalysisScheme request. Contains the status of the -// deleted analysis scheme. -type DeleteAnalysisSchemeOutput struct { - _ struct{} `type:"structure"` - - // The status of the analysis scheme being deleted. - // - // AnalysisScheme is a required field - AnalysisScheme *AnalysisSchemeStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteAnalysisSchemeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAnalysisSchemeOutput) GoString() string { - return s.String() -} - -// SetAnalysisScheme sets the AnalysisScheme field's value. -func (s *DeleteAnalysisSchemeOutput) SetAnalysisScheme(v *AnalysisSchemeStatus) *DeleteAnalysisSchemeOutput { - s.AnalysisScheme = v - return s -} - -// Container for the parameters to the DeleteDomain operation. Specifies the -// name of the domain you want to delete. -type DeleteDomainInput struct { - _ struct{} `type:"structure"` - - // The name of the domain you want to permanently delete. - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteDomainInput) SetDomainName(v string) *DeleteDomainInput { - s.DomainName = &v - return s -} - -// The result of a DeleteDomain request. Contains the status of a newly deleted -// domain, or no status if the domain has already been completely deleted. -type DeleteDomainOutput struct { - _ struct{} `type:"structure"` - - // The current status of the search domain. - DomainStatus *DomainStatus `type:"structure"` -} - -// String returns the string representation -func (s DeleteDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDomainOutput) GoString() string { - return s.String() -} - -// SetDomainStatus sets the DomainStatus field's value. -func (s *DeleteDomainOutput) SetDomainStatus(v *DomainStatus) *DeleteDomainOutput { - s.DomainStatus = v - return s -} - -// Container for the parameters to the DeleteExpression operation. Specifies -// the name of the domain you want to update and the name of the expression -// you want to delete. -type DeleteExpressionInput struct { - _ struct{} `type:"structure"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - // The name of the Expression to delete. - // - // ExpressionName is a required field - ExpressionName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteExpressionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteExpressionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteExpressionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteExpressionInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.ExpressionName == nil { - invalidParams.Add(request.NewErrParamRequired("ExpressionName")) - } - if s.ExpressionName != nil && len(*s.ExpressionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExpressionName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteExpressionInput) SetDomainName(v string) *DeleteExpressionInput { - s.DomainName = &v - return s -} - -// SetExpressionName sets the ExpressionName field's value. -func (s *DeleteExpressionInput) SetExpressionName(v string) *DeleteExpressionInput { - s.ExpressionName = &v - return s -} - -// The result of a DeleteExpression request. Specifies the expression being -// deleted. -type DeleteExpressionOutput struct { - _ struct{} `type:"structure"` - - // The status of the expression being deleted. - // - // Expression is a required field - Expression *ExpressionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteExpressionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteExpressionOutput) GoString() string { - return s.String() -} - -// SetExpression sets the Expression field's value. -func (s *DeleteExpressionOutput) SetExpression(v *ExpressionStatus) *DeleteExpressionOutput { - s.Expression = v - return s -} - -// Container for the parameters to the DeleteIndexField operation. Specifies -// the name of the domain you want to update and the name of the index field -// you want to delete. -type DeleteIndexFieldInput struct { - _ struct{} `type:"structure"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - // The name of the index field your want to remove from the domain's indexing - // options. - // - // IndexFieldName is a required field - IndexFieldName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteIndexFieldInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIndexFieldInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIndexFieldInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIndexFieldInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.IndexFieldName == nil { - invalidParams.Add(request.NewErrParamRequired("IndexFieldName")) - } - if s.IndexFieldName != nil && len(*s.IndexFieldName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IndexFieldName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteIndexFieldInput) SetDomainName(v string) *DeleteIndexFieldInput { - s.DomainName = &v - return s -} - -// SetIndexFieldName sets the IndexFieldName field's value. -func (s *DeleteIndexFieldInput) SetIndexFieldName(v string) *DeleteIndexFieldInput { - s.IndexFieldName = &v - return s -} - -// The result of a DeleteIndexField request. -type DeleteIndexFieldOutput struct { - _ struct{} `type:"structure"` - - // The status of the index field being deleted. - // - // IndexField is a required field - IndexField *IndexFieldStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteIndexFieldOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIndexFieldOutput) GoString() string { - return s.String() -} - -// SetIndexField sets the IndexField field's value. -func (s *DeleteIndexFieldOutput) SetIndexField(v *IndexFieldStatus) *DeleteIndexFieldOutput { - s.IndexField = v - return s -} - -// Container for the parameters to the DeleteSuggester operation. Specifies -// the name of the domain you want to update and name of the suggester you want -// to delete. -type DeleteSuggesterInput struct { - _ struct{} `type:"structure"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - // Specifies the name of the suggester you want to delete. - // - // SuggesterName is a required field - SuggesterName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSuggesterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSuggesterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSuggesterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSuggesterInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.SuggesterName == nil { - invalidParams.Add(request.NewErrParamRequired("SuggesterName")) - } - if s.SuggesterName != nil && len(*s.SuggesterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SuggesterName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteSuggesterInput) SetDomainName(v string) *DeleteSuggesterInput { - s.DomainName = &v - return s -} - -// SetSuggesterName sets the SuggesterName field's value. -func (s *DeleteSuggesterInput) SetSuggesterName(v string) *DeleteSuggesterInput { - s.SuggesterName = &v - return s -} - -// The result of a DeleteSuggester request. Contains the status of the deleted -// suggester. -type DeleteSuggesterOutput struct { - _ struct{} `type:"structure"` - - // The status of the suggester being deleted. - // - // Suggester is a required field - Suggester *SuggesterStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteSuggesterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSuggesterOutput) GoString() string { - return s.String() -} - -// SetSuggester sets the Suggester field's value. -func (s *DeleteSuggesterOutput) SetSuggester(v *SuggesterStatus) *DeleteSuggesterOutput { - s.Suggester = v - return s -} - -// Container for the parameters to the DescribeAnalysisSchemes operation. Specifies -// the name of the domain you want to describe. To limit the response to particular -// analysis schemes, specify the names of the analysis schemes you want to describe. -// To show the active configuration and exclude any pending changes, set the -// Deployed option to true. -type DescribeAnalysisSchemesInput struct { - _ struct{} `type:"structure"` - - // The analysis schemes you want to describe. - AnalysisSchemeNames []*string `type:"list"` - - // Whether to display the deployed configuration (true) or include any pending - // changes (false). Defaults to false. - Deployed *bool `type:"boolean"` - - // The name of the domain you want to describe. - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeAnalysisSchemesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAnalysisSchemesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAnalysisSchemesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAnalysisSchemesInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalysisSchemeNames sets the AnalysisSchemeNames field's value. -func (s *DescribeAnalysisSchemesInput) SetAnalysisSchemeNames(v []*string) *DescribeAnalysisSchemesInput { - s.AnalysisSchemeNames = v - return s -} - -// SetDeployed sets the Deployed field's value. -func (s *DescribeAnalysisSchemesInput) SetDeployed(v bool) *DescribeAnalysisSchemesInput { - s.Deployed = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DescribeAnalysisSchemesInput) SetDomainName(v string) *DescribeAnalysisSchemesInput { - s.DomainName = &v - return s -} - -// The result of a DescribeAnalysisSchemes request. Contains the analysis schemes -// configured for the domain specified in the request. -type DescribeAnalysisSchemesOutput struct { - _ struct{} `type:"structure"` - - // The analysis scheme descriptions. - // - // AnalysisSchemes is a required field - AnalysisSchemes []*AnalysisSchemeStatus `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeAnalysisSchemesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAnalysisSchemesOutput) GoString() string { - return s.String() -} - -// SetAnalysisSchemes sets the AnalysisSchemes field's value. -func (s *DescribeAnalysisSchemesOutput) SetAnalysisSchemes(v []*AnalysisSchemeStatus) *DescribeAnalysisSchemesOutput { - s.AnalysisSchemes = v - return s -} - -// Container for the parameters to the DescribeAvailabilityOptions operation. -// Specifies the name of the domain you want to describe. To show the active -// configuration and exclude any pending changes, set the Deployed option to -// true. -type DescribeAvailabilityOptionsInput struct { - _ struct{} `type:"structure"` - - // Whether to display the deployed configuration (true) or include any pending - // changes (false). Defaults to false. - Deployed *bool `type:"boolean"` - - // The name of the domain you want to describe. - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeAvailabilityOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAvailabilityOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAvailabilityOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAvailabilityOptionsInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeployed sets the Deployed field's value. -func (s *DescribeAvailabilityOptionsInput) SetDeployed(v bool) *DescribeAvailabilityOptionsInput { - s.Deployed = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DescribeAvailabilityOptionsInput) SetDomainName(v string) *DescribeAvailabilityOptionsInput { - s.DomainName = &v - return s -} - -// The result of a DescribeAvailabilityOptions request. Indicates whether or -// not the Multi-AZ option is enabled for the domain specified in the request. -type DescribeAvailabilityOptionsOutput struct { - _ struct{} `type:"structure"` - - // The availability options configured for the domain. Indicates whether Multi-AZ - // is enabled for the domain. - AvailabilityOptions *AvailabilityOptionsStatus `type:"structure"` -} - -// String returns the string representation -func (s DescribeAvailabilityOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAvailabilityOptionsOutput) GoString() string { - return s.String() -} - -// SetAvailabilityOptions sets the AvailabilityOptions field's value. -func (s *DescribeAvailabilityOptionsOutput) SetAvailabilityOptions(v *AvailabilityOptionsStatus) *DescribeAvailabilityOptionsOutput { - s.AvailabilityOptions = v - return s -} - -// Container for the parameters to the DescribeDomains operation. By default -// shows the status of all domains. To restrict the response to particular domains, -// specify the names of the domains you want to describe. -type DescribeDomainsInput struct { - _ struct{} `type:"structure"` - - // The names of the domains you want to include in the response. - DomainNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeDomainsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDomainsInput) GoString() string { - return s.String() -} - -// SetDomainNames sets the DomainNames field's value. -func (s *DescribeDomainsInput) SetDomainNames(v []*string) *DescribeDomainsInput { - s.DomainNames = v - return s -} - -// The result of a DescribeDomains request. Contains the status of the domains -// specified in the request or all domains owned by the account. -type DescribeDomainsOutput struct { - _ struct{} `type:"structure"` - - // A list that contains the status of each requested domain. - // - // DomainStatusList is a required field - DomainStatusList []*DomainStatus `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeDomainsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDomainsOutput) GoString() string { - return s.String() -} - -// SetDomainStatusList sets the DomainStatusList field's value. -func (s *DescribeDomainsOutput) SetDomainStatusList(v []*DomainStatus) *DescribeDomainsOutput { - s.DomainStatusList = v - return s -} - -// Container for the parameters to the DescribeDomains operation. Specifies -// the name of the domain you want to describe. To restrict the response to -// particular expressions, specify the names of the expressions you want to -// describe. To show the active configuration and exclude any pending changes, -// set the Deployed option to true. -type DescribeExpressionsInput struct { - _ struct{} `type:"structure"` - - // Whether to display the deployed configuration (true) or include any pending - // changes (false). Defaults to false. - Deployed *bool `type:"boolean"` - - // The name of the domain you want to describe. - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - // Limits the DescribeExpressions response to the specified expressions. If - // not specified, all expressions are shown. - ExpressionNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeExpressionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeExpressionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeExpressionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeExpressionsInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeployed sets the Deployed field's value. -func (s *DescribeExpressionsInput) SetDeployed(v bool) *DescribeExpressionsInput { - s.Deployed = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DescribeExpressionsInput) SetDomainName(v string) *DescribeExpressionsInput { - s.DomainName = &v - return s -} - -// SetExpressionNames sets the ExpressionNames field's value. -func (s *DescribeExpressionsInput) SetExpressionNames(v []*string) *DescribeExpressionsInput { - s.ExpressionNames = v - return s -} - -// The result of a DescribeExpressions request. Contains the expressions configured -// for the domain specified in the request. -type DescribeExpressionsOutput struct { - _ struct{} `type:"structure"` - - // The expressions configured for the domain. - // - // Expressions is a required field - Expressions []*ExpressionStatus `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeExpressionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeExpressionsOutput) GoString() string { - return s.String() -} - -// SetExpressions sets the Expressions field's value. -func (s *DescribeExpressionsOutput) SetExpressions(v []*ExpressionStatus) *DescribeExpressionsOutput { - s.Expressions = v - return s -} - -// Container for the parameters to the DescribeIndexFields operation. Specifies -// the name of the domain you want to describe. To restrict the response to -// particular index fields, specify the names of the index fields you want to -// describe. To show the active configuration and exclude any pending changes, -// set the Deployed option to true. -type DescribeIndexFieldsInput struct { - _ struct{} `type:"structure"` - - // Whether to display the deployed configuration (true) or include any pending - // changes (false). Defaults to false. - Deployed *bool `type:"boolean"` - - // The name of the domain you want to describe. - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - // A list of the index fields you want to describe. If not specified, information - // is returned for all configured index fields. - FieldNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeIndexFieldsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIndexFieldsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeIndexFieldsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeIndexFieldsInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeployed sets the Deployed field's value. -func (s *DescribeIndexFieldsInput) SetDeployed(v bool) *DescribeIndexFieldsInput { - s.Deployed = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DescribeIndexFieldsInput) SetDomainName(v string) *DescribeIndexFieldsInput { - s.DomainName = &v - return s -} - -// SetFieldNames sets the FieldNames field's value. -func (s *DescribeIndexFieldsInput) SetFieldNames(v []*string) *DescribeIndexFieldsInput { - s.FieldNames = v - return s -} - -// The result of a DescribeIndexFields request. Contains the index fields configured -// for the domain specified in the request. -type DescribeIndexFieldsOutput struct { - _ struct{} `type:"structure"` - - // The index fields configured for the domain. - // - // IndexFields is a required field - IndexFields []*IndexFieldStatus `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeIndexFieldsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIndexFieldsOutput) GoString() string { - return s.String() -} - -// SetIndexFields sets the IndexFields field's value. -func (s *DescribeIndexFieldsOutput) SetIndexFields(v []*IndexFieldStatus) *DescribeIndexFieldsOutput { - s.IndexFields = v - return s -} - -// Container for the parameters to the DescribeScalingParameters operation. -// Specifies the name of the domain you want to describe. -type DescribeScalingParametersInput struct { - _ struct{} `type:"structure"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeScalingParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScalingParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeScalingParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeScalingParametersInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DescribeScalingParametersInput) SetDomainName(v string) *DescribeScalingParametersInput { - s.DomainName = &v - return s -} - -// The result of a DescribeScalingParameters request. Contains the scaling parameters -// configured for the domain specified in the request. -type DescribeScalingParametersOutput struct { - _ struct{} `type:"structure"` - - // The status and configuration of a search domain's scaling parameters. - // - // ScalingParameters is a required field - ScalingParameters *ScalingParametersStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeScalingParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScalingParametersOutput) GoString() string { - return s.String() -} - -// SetScalingParameters sets the ScalingParameters field's value. -func (s *DescribeScalingParametersOutput) SetScalingParameters(v *ScalingParametersStatus) *DescribeScalingParametersOutput { - s.ScalingParameters = v - return s -} - -// Container for the parameters to the DescribeServiceAccessPolicies operation. -// Specifies the name of the domain you want to describe. To show the active -// configuration and exclude any pending changes, set the Deployed option to -// true. -type DescribeServiceAccessPoliciesInput struct { - _ struct{} `type:"structure"` - - // Whether to display the deployed configuration (true) or include any pending - // changes (false). Defaults to false. - Deployed *bool `type:"boolean"` - - // The name of the domain you want to describe. - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeServiceAccessPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeServiceAccessPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeServiceAccessPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeServiceAccessPoliciesInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeployed sets the Deployed field's value. -func (s *DescribeServiceAccessPoliciesInput) SetDeployed(v bool) *DescribeServiceAccessPoliciesInput { - s.Deployed = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DescribeServiceAccessPoliciesInput) SetDomainName(v string) *DescribeServiceAccessPoliciesInput { - s.DomainName = &v - return s -} - -// The result of a DescribeServiceAccessPolicies request. -type DescribeServiceAccessPoliciesOutput struct { - _ struct{} `type:"structure"` - - // The access rules configured for the domain specified in the request. - // - // AccessPolicies is a required field - AccessPolicies *AccessPoliciesStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeServiceAccessPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeServiceAccessPoliciesOutput) GoString() string { - return s.String() -} - -// SetAccessPolicies sets the AccessPolicies field's value. -func (s *DescribeServiceAccessPoliciesOutput) SetAccessPolicies(v *AccessPoliciesStatus) *DescribeServiceAccessPoliciesOutput { - s.AccessPolicies = v - return s -} - -// Container for the parameters to the DescribeSuggester operation. Specifies -// the name of the domain you want to describe. To restrict the response to -// particular suggesters, specify the names of the suggesters you want to describe. -// To show the active configuration and exclude any pending changes, set the -// Deployed option to true. -type DescribeSuggestersInput struct { - _ struct{} `type:"structure"` - - // Whether to display the deployed configuration (true) or include any pending - // changes (false). Defaults to false. - Deployed *bool `type:"boolean"` - - // The name of the domain you want to describe. - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - // The suggesters you want to describe. - SuggesterNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeSuggestersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSuggestersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSuggestersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSuggestersInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeployed sets the Deployed field's value. -func (s *DescribeSuggestersInput) SetDeployed(v bool) *DescribeSuggestersInput { - s.Deployed = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DescribeSuggestersInput) SetDomainName(v string) *DescribeSuggestersInput { - s.DomainName = &v - return s -} - -// SetSuggesterNames sets the SuggesterNames field's value. -func (s *DescribeSuggestersInput) SetSuggesterNames(v []*string) *DescribeSuggestersInput { - s.SuggesterNames = v - return s -} - -// The result of a DescribeSuggesters request. -type DescribeSuggestersOutput struct { - _ struct{} `type:"structure"` - - // The suggesters configured for the domain specified in the request. - // - // Suggesters is a required field - Suggesters []*SuggesterStatus `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeSuggestersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSuggestersOutput) GoString() string { - return s.String() -} - -// SetSuggesters sets the Suggesters field's value. -func (s *DescribeSuggestersOutput) SetSuggesters(v []*SuggesterStatus) *DescribeSuggestersOutput { - s.Suggesters = v - return s -} - -// Options for a search suggester. -type DocumentSuggesterOptions struct { - _ struct{} `type:"structure"` - - // The level of fuzziness allowed when suggesting matches for a string: none, - // low, or high. With none, the specified string is treated as an exact prefix. - // With low, suggestions must differ from the specified string by no more than - // one character. With high, suggestions can differ by up to two characters. - // The default is none. - FuzzyMatching *string `type:"string" enum:"SuggesterFuzzyMatching"` - - // An expression that computes a score for each suggestion to control how they - // are sorted. The scores are rounded to the nearest integer, with a floor of - // 0 and a ceiling of 2^31-1. A document's relevance score is not computed for - // suggestions, so sort expressions cannot reference the _score value. To sort - // suggestions using a numeric field or existing expression, simply specify - // the name of the field or expression. If no expression is configured for the - // suggester, the suggestions are sorted with the closest matches listed first. - SortExpression *string `type:"string"` - - // The name of the index field you want to use for suggestions. - // - // SourceField is a required field - SourceField *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DocumentSuggesterOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DocumentSuggesterOptions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DocumentSuggesterOptions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DocumentSuggesterOptions"} - if s.SourceField == nil { - invalidParams.Add(request.NewErrParamRequired("SourceField")) - } - if s.SourceField != nil && len(*s.SourceField) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceField", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFuzzyMatching sets the FuzzyMatching field's value. -func (s *DocumentSuggesterOptions) SetFuzzyMatching(v string) *DocumentSuggesterOptions { - s.FuzzyMatching = &v - return s -} - -// SetSortExpression sets the SortExpression field's value. -func (s *DocumentSuggesterOptions) SetSortExpression(v string) *DocumentSuggesterOptions { - s.SortExpression = &v - return s -} - -// SetSourceField sets the SourceField field's value. -func (s *DocumentSuggesterOptions) SetSourceField(v string) *DocumentSuggesterOptions { - s.SourceField = &v - return s -} - -// The current status of the search domain. -type DomainStatus struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the search domain. See Identifiers for - // IAM Entities (http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?Using_Identifiers.html) - // in Using AWS Identity and Access Management for more information. - ARN *string `type:"string"` - - // True if the search domain is created. It can take several minutes to initialize - // a domain when CreateDomain is called. Newly created search domains are returned - // from DescribeDomains with a false value for Created until domain creation - // is complete. - Created *bool `type:"boolean"` - - // True if the search domain has been deleted. The system must clean up resources - // dedicated to the search domain when DeleteDomain is called. Newly deleted - // search domains are returned from DescribeDomains with a true value for IsDeleted - // for several minutes until resource cleanup is complete. - Deleted *bool `type:"boolean"` - - // The service endpoint for updating documents in a search domain. - DocService *ServiceEndpoint `type:"structure"` - - // An internally generated unique identifier for a domain. - // - // DomainId is a required field - DomainId *string `min:"1" type:"string" required:"true"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - Limits *Limits `type:"structure"` - - // True if processing is being done to activate the current domain configuration. - Processing *bool `type:"boolean"` - - // True if IndexDocuments needs to be called to activate the current domain - // configuration. - // - // RequiresIndexDocuments is a required field - RequiresIndexDocuments *bool `type:"boolean" required:"true"` - - // The number of search instances that are available to process search requests. - SearchInstanceCount *int64 `min:"1" type:"integer"` - - // The instance type that is being used to process search requests. - SearchInstanceType *string `type:"string"` - - // The number of partitions across which the search index is spread. - SearchPartitionCount *int64 `min:"1" type:"integer"` - - // The service endpoint for requesting search results from a search domain. - SearchService *ServiceEndpoint `type:"structure"` -} - -// String returns the string representation -func (s DomainStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainStatus) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *DomainStatus) SetARN(v string) *DomainStatus { - s.ARN = &v - return s -} - -// SetCreated sets the Created field's value. -func (s *DomainStatus) SetCreated(v bool) *DomainStatus { - s.Created = &v - return s -} - -// SetDeleted sets the Deleted field's value. -func (s *DomainStatus) SetDeleted(v bool) *DomainStatus { - s.Deleted = &v - return s -} - -// SetDocService sets the DocService field's value. -func (s *DomainStatus) SetDocService(v *ServiceEndpoint) *DomainStatus { - s.DocService = v - return s -} - -// SetDomainId sets the DomainId field's value. -func (s *DomainStatus) SetDomainId(v string) *DomainStatus { - s.DomainId = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DomainStatus) SetDomainName(v string) *DomainStatus { - s.DomainName = &v - return s -} - -// SetLimits sets the Limits field's value. -func (s *DomainStatus) SetLimits(v *Limits) *DomainStatus { - s.Limits = v - return s -} - -// SetProcessing sets the Processing field's value. -func (s *DomainStatus) SetProcessing(v bool) *DomainStatus { - s.Processing = &v - return s -} - -// SetRequiresIndexDocuments sets the RequiresIndexDocuments field's value. -func (s *DomainStatus) SetRequiresIndexDocuments(v bool) *DomainStatus { - s.RequiresIndexDocuments = &v - return s -} - -// SetSearchInstanceCount sets the SearchInstanceCount field's value. -func (s *DomainStatus) SetSearchInstanceCount(v int64) *DomainStatus { - s.SearchInstanceCount = &v - return s -} - -// SetSearchInstanceType sets the SearchInstanceType field's value. -func (s *DomainStatus) SetSearchInstanceType(v string) *DomainStatus { - s.SearchInstanceType = &v - return s -} - -// SetSearchPartitionCount sets the SearchPartitionCount field's value. -func (s *DomainStatus) SetSearchPartitionCount(v int64) *DomainStatus { - s.SearchPartitionCount = &v - return s -} - -// SetSearchService sets the SearchService field's value. -func (s *DomainStatus) SetSearchService(v *ServiceEndpoint) *DomainStatus { - s.SearchService = v - return s -} - -// Options for a field that contains an array of double-precision 64-bit floating -// point values. Present if IndexFieldType specifies the field is of type double-array. -// All options are enabled by default. -type DoubleArrayOptions struct { - _ struct{} `type:"structure"` - - // A value to use for the field if the field isn't specified for a document. - DefaultValue *float64 `type:"double"` - - // Whether facet information can be returned for the field. - FacetEnabled *bool `type:"boolean"` - - // Whether the contents of the field can be returned in the search results. - ReturnEnabled *bool `type:"boolean"` - - // Whether the contents of the field are searchable. - SearchEnabled *bool `type:"boolean"` - - // A list of source fields to map to the field. - SourceFields *string `type:"string"` -} - -// String returns the string representation -func (s DoubleArrayOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DoubleArrayOptions) GoString() string { - return s.String() -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *DoubleArrayOptions) SetDefaultValue(v float64) *DoubleArrayOptions { - s.DefaultValue = &v - return s -} - -// SetFacetEnabled sets the FacetEnabled field's value. -func (s *DoubleArrayOptions) SetFacetEnabled(v bool) *DoubleArrayOptions { - s.FacetEnabled = &v - return s -} - -// SetReturnEnabled sets the ReturnEnabled field's value. -func (s *DoubleArrayOptions) SetReturnEnabled(v bool) *DoubleArrayOptions { - s.ReturnEnabled = &v - return s -} - -// SetSearchEnabled sets the SearchEnabled field's value. -func (s *DoubleArrayOptions) SetSearchEnabled(v bool) *DoubleArrayOptions { - s.SearchEnabled = &v - return s -} - -// SetSourceFields sets the SourceFields field's value. -func (s *DoubleArrayOptions) SetSourceFields(v string) *DoubleArrayOptions { - s.SourceFields = &v - return s -} - -// Options for a double-precision 64-bit floating point field. Present if IndexFieldType -// specifies the field is of type double. All options are enabled by default. -type DoubleOptions struct { - _ struct{} `type:"structure"` - - // A value to use for the field if the field isn't specified for a document. - // This can be important if you are using the field in an expression and that - // field is not present in every document. - DefaultValue *float64 `type:"double"` - - // Whether facet information can be returned for the field. - FacetEnabled *bool `type:"boolean"` - - // Whether the contents of the field can be returned in the search results. - ReturnEnabled *bool `type:"boolean"` - - // Whether the contents of the field are searchable. - SearchEnabled *bool `type:"boolean"` - - // Whether the field can be used to sort the search results. - SortEnabled *bool `type:"boolean"` - - // The name of the source field to map to the field. - SourceField *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DoubleOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DoubleOptions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DoubleOptions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DoubleOptions"} - if s.SourceField != nil && len(*s.SourceField) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceField", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *DoubleOptions) SetDefaultValue(v float64) *DoubleOptions { - s.DefaultValue = &v - return s -} - -// SetFacetEnabled sets the FacetEnabled field's value. -func (s *DoubleOptions) SetFacetEnabled(v bool) *DoubleOptions { - s.FacetEnabled = &v - return s -} - -// SetReturnEnabled sets the ReturnEnabled field's value. -func (s *DoubleOptions) SetReturnEnabled(v bool) *DoubleOptions { - s.ReturnEnabled = &v - return s -} - -// SetSearchEnabled sets the SearchEnabled field's value. -func (s *DoubleOptions) SetSearchEnabled(v bool) *DoubleOptions { - s.SearchEnabled = &v - return s -} - -// SetSortEnabled sets the SortEnabled field's value. -func (s *DoubleOptions) SetSortEnabled(v bool) *DoubleOptions { - s.SortEnabled = &v - return s -} - -// SetSourceField sets the SourceField field's value. -func (s *DoubleOptions) SetSourceField(v string) *DoubleOptions { - s.SourceField = &v - return s -} - -// A named expression that can be evaluated at search time. Can be used to sort -// the search results, define other expressions, or return computed information -// in the search results. -type Expression struct { - _ struct{} `type:"structure"` - - // Names must begin with a letter and can contain the following characters: - // a-z (lowercase), 0-9, and _ (underscore). - // - // ExpressionName is a required field - ExpressionName *string `min:"1" type:"string" required:"true"` - - // The expression to evaluate for sorting while processing a search request. - // The Expression syntax is based on JavaScript expressions. For more information, - // see Configuring Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html) - // in the Amazon CloudSearch Developer Guide. - // - // ExpressionValue is a required field - ExpressionValue *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Expression) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Expression) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Expression) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Expression"} - if s.ExpressionName == nil { - invalidParams.Add(request.NewErrParamRequired("ExpressionName")) - } - if s.ExpressionName != nil && len(*s.ExpressionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExpressionName", 1)) - } - if s.ExpressionValue == nil { - invalidParams.Add(request.NewErrParamRequired("ExpressionValue")) - } - if s.ExpressionValue != nil && len(*s.ExpressionValue) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExpressionValue", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExpressionName sets the ExpressionName field's value. -func (s *Expression) SetExpressionName(v string) *Expression { - s.ExpressionName = &v - return s -} - -// SetExpressionValue sets the ExpressionValue field's value. -func (s *Expression) SetExpressionValue(v string) *Expression { - s.ExpressionValue = &v - return s -} - -// The value of an Expression and its current status. -type ExpressionStatus struct { - _ struct{} `type:"structure"` - - // The expression that is evaluated for sorting while processing a search request. - // - // Options is a required field - Options *Expression `type:"structure" required:"true"` - - // The status of domain configuration option. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ExpressionStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExpressionStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *ExpressionStatus) SetOptions(v *Expression) *ExpressionStatus { - s.Options = v - return s -} - -// SetStatus sets the Status field's value. -func (s *ExpressionStatus) SetStatus(v *OptionStatus) *ExpressionStatus { - s.Status = v - return s -} - -// Container for the parameters to the IndexDocuments operation. Specifies the -// name of the domain you want to re-index. -type IndexDocumentsInput struct { - _ struct{} `type:"structure"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s IndexDocumentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IndexDocumentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IndexDocumentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IndexDocumentsInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *IndexDocumentsInput) SetDomainName(v string) *IndexDocumentsInput { - s.DomainName = &v - return s -} - -// The result of an IndexDocuments request. Contains the status of the indexing -// operation, including the fields being indexed. -type IndexDocumentsOutput struct { - _ struct{} `type:"structure"` - - // The names of the fields that are currently being indexed. - FieldNames []*string `type:"list"` -} - -// String returns the string representation -func (s IndexDocumentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IndexDocumentsOutput) GoString() string { - return s.String() -} - -// SetFieldNames sets the FieldNames field's value. -func (s *IndexDocumentsOutput) SetFieldNames(v []*string) *IndexDocumentsOutput { - s.FieldNames = v - return s -} - -// Configuration information for a field in the index, including its name, type, -// and options. The supported options depend on the IndexFieldType. -type IndexField struct { - _ struct{} `type:"structure"` - - // Options for a field that contains an array of dates. Present if IndexFieldType - // specifies the field is of type date-array. All options are enabled by default. - DateArrayOptions *DateArrayOptions `type:"structure"` - - // Options for a date field. Dates and times are specified in UTC (Coordinated - // Universal Time) according to IETF RFC3339: yyyy-mm-ddT00:00:00Z. Present - // if IndexFieldType specifies the field is of type date. All options are enabled - // by default. - DateOptions *DateOptions `type:"structure"` - - // Options for a field that contains an array of double-precision 64-bit floating - // point values. Present if IndexFieldType specifies the field is of type double-array. - // All options are enabled by default. - DoubleArrayOptions *DoubleArrayOptions `type:"structure"` - - // Options for a double-precision 64-bit floating point field. Present if IndexFieldType - // specifies the field is of type double. All options are enabled by default. - DoubleOptions *DoubleOptions `type:"structure"` - - // A string that represents the name of an index field. CloudSearch supports - // regular index fields as well as dynamic fields. A dynamic field's name defines - // a pattern that begins or ends with a wildcard. Any document fields that don't - // map to a regular index field but do match a dynamic field's pattern are configured - // with the dynamic field's indexing options. - // - // Regular field names begin with a letter and can contain the following characters: - // a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin - // or end with a wildcard (*). The wildcard can also be the only character in - // a dynamic field name. Multiple wildcards, and wildcards embedded within a - // string are not supported. - // - // The name score is reserved and cannot be used as a field name. To reference - // a document's ID, you can use the name _id. - // - // IndexFieldName is a required field - IndexFieldName *string `min:"1" type:"string" required:"true"` - - // The type of field. The valid options for a field depend on the field type. - // For more information about the supported field types, see Configuring Index - // Fields (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html) - // in the Amazon CloudSearch Developer Guide. - // - // IndexFieldType is a required field - IndexFieldType *string `type:"string" required:"true" enum:"IndexFieldType"` - - // Options for a field that contains an array of 64-bit signed integers. Present - // if IndexFieldType specifies the field is of type int-array. All options are - // enabled by default. - IntArrayOptions *IntArrayOptions `type:"structure"` - - // Options for a 64-bit signed integer field. Present if IndexFieldType specifies - // the field is of type int. All options are enabled by default. - IntOptions *IntOptions `type:"structure"` - - // Options for a latlon field. A latlon field contains a location stored as - // a latitude and longitude value pair. Present if IndexFieldType specifies - // the field is of type latlon. All options are enabled by default. - LatLonOptions *LatLonOptions `type:"structure"` - - // Options for a field that contains an array of literal strings. Present if - // IndexFieldType specifies the field is of type literal-array. All options - // are enabled by default. - LiteralArrayOptions *LiteralArrayOptions `type:"structure"` - - // Options for literal field. Present if IndexFieldType specifies the field - // is of type literal. All options are enabled by default. - LiteralOptions *LiteralOptions `type:"structure"` - - // Options for a field that contains an array of text strings. Present if IndexFieldType - // specifies the field is of type text-array. A text-array field is always searchable. - // All options are enabled by default. - TextArrayOptions *TextArrayOptions `type:"structure"` - - // Options for text field. Present if IndexFieldType specifies the field is - // of type text. A text field is always searchable. All options are enabled - // by default. - TextOptions *TextOptions `type:"structure"` -} - -// String returns the string representation -func (s IndexField) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IndexField) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IndexField) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IndexField"} - if s.IndexFieldName == nil { - invalidParams.Add(request.NewErrParamRequired("IndexFieldName")) - } - if s.IndexFieldName != nil && len(*s.IndexFieldName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IndexFieldName", 1)) - } - if s.IndexFieldType == nil { - invalidParams.Add(request.NewErrParamRequired("IndexFieldType")) - } - if s.DateOptions != nil { - if err := s.DateOptions.Validate(); err != nil { - invalidParams.AddNested("DateOptions", err.(request.ErrInvalidParams)) - } - } - if s.DoubleOptions != nil { - if err := s.DoubleOptions.Validate(); err != nil { - invalidParams.AddNested("DoubleOptions", err.(request.ErrInvalidParams)) - } - } - if s.IntOptions != nil { - if err := s.IntOptions.Validate(); err != nil { - invalidParams.AddNested("IntOptions", err.(request.ErrInvalidParams)) - } - } - if s.LatLonOptions != nil { - if err := s.LatLonOptions.Validate(); err != nil { - invalidParams.AddNested("LatLonOptions", err.(request.ErrInvalidParams)) - } - } - if s.LiteralOptions != nil { - if err := s.LiteralOptions.Validate(); err != nil { - invalidParams.AddNested("LiteralOptions", err.(request.ErrInvalidParams)) - } - } - if s.TextOptions != nil { - if err := s.TextOptions.Validate(); err != nil { - invalidParams.AddNested("TextOptions", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDateArrayOptions sets the DateArrayOptions field's value. -func (s *IndexField) SetDateArrayOptions(v *DateArrayOptions) *IndexField { - s.DateArrayOptions = v - return s -} - -// SetDateOptions sets the DateOptions field's value. -func (s *IndexField) SetDateOptions(v *DateOptions) *IndexField { - s.DateOptions = v - return s -} - -// SetDoubleArrayOptions sets the DoubleArrayOptions field's value. -func (s *IndexField) SetDoubleArrayOptions(v *DoubleArrayOptions) *IndexField { - s.DoubleArrayOptions = v - return s -} - -// SetDoubleOptions sets the DoubleOptions field's value. -func (s *IndexField) SetDoubleOptions(v *DoubleOptions) *IndexField { - s.DoubleOptions = v - return s -} - -// SetIndexFieldName sets the IndexFieldName field's value. -func (s *IndexField) SetIndexFieldName(v string) *IndexField { - s.IndexFieldName = &v - return s -} - -// SetIndexFieldType sets the IndexFieldType field's value. -func (s *IndexField) SetIndexFieldType(v string) *IndexField { - s.IndexFieldType = &v - return s -} - -// SetIntArrayOptions sets the IntArrayOptions field's value. -func (s *IndexField) SetIntArrayOptions(v *IntArrayOptions) *IndexField { - s.IntArrayOptions = v - return s -} - -// SetIntOptions sets the IntOptions field's value. -func (s *IndexField) SetIntOptions(v *IntOptions) *IndexField { - s.IntOptions = v - return s -} - -// SetLatLonOptions sets the LatLonOptions field's value. -func (s *IndexField) SetLatLonOptions(v *LatLonOptions) *IndexField { - s.LatLonOptions = v - return s -} - -// SetLiteralArrayOptions sets the LiteralArrayOptions field's value. -func (s *IndexField) SetLiteralArrayOptions(v *LiteralArrayOptions) *IndexField { - s.LiteralArrayOptions = v - return s -} - -// SetLiteralOptions sets the LiteralOptions field's value. -func (s *IndexField) SetLiteralOptions(v *LiteralOptions) *IndexField { - s.LiteralOptions = v - return s -} - -// SetTextArrayOptions sets the TextArrayOptions field's value. -func (s *IndexField) SetTextArrayOptions(v *TextArrayOptions) *IndexField { - s.TextArrayOptions = v - return s -} - -// SetTextOptions sets the TextOptions field's value. -func (s *IndexField) SetTextOptions(v *TextOptions) *IndexField { - s.TextOptions = v - return s -} - -// The value of an IndexField and its current status. -type IndexFieldStatus struct { - _ struct{} `type:"structure"` - - // Configuration information for a field in the index, including its name, type, - // and options. The supported options depend on the IndexFieldType. - // - // Options is a required field - Options *IndexField `type:"structure" required:"true"` - - // The status of domain configuration option. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s IndexFieldStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IndexFieldStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *IndexFieldStatus) SetOptions(v *IndexField) *IndexFieldStatus { - s.Options = v - return s -} - -// SetStatus sets the Status field's value. -func (s *IndexFieldStatus) SetStatus(v *OptionStatus) *IndexFieldStatus { - s.Status = v - return s -} - -// Options for a field that contains an array of 64-bit signed integers. Present -// if IndexFieldType specifies the field is of type int-array. All options are -// enabled by default. -type IntArrayOptions struct { - _ struct{} `type:"structure"` - - // A value to use for the field if the field isn't specified for a document. - DefaultValue *int64 `type:"long"` - - // Whether facet information can be returned for the field. - FacetEnabled *bool `type:"boolean"` - - // Whether the contents of the field can be returned in the search results. - ReturnEnabled *bool `type:"boolean"` - - // Whether the contents of the field are searchable. - SearchEnabled *bool `type:"boolean"` - - // A list of source fields to map to the field. - SourceFields *string `type:"string"` -} - -// String returns the string representation -func (s IntArrayOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IntArrayOptions) GoString() string { - return s.String() -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *IntArrayOptions) SetDefaultValue(v int64) *IntArrayOptions { - s.DefaultValue = &v - return s -} - -// SetFacetEnabled sets the FacetEnabled field's value. -func (s *IntArrayOptions) SetFacetEnabled(v bool) *IntArrayOptions { - s.FacetEnabled = &v - return s -} - -// SetReturnEnabled sets the ReturnEnabled field's value. -func (s *IntArrayOptions) SetReturnEnabled(v bool) *IntArrayOptions { - s.ReturnEnabled = &v - return s -} - -// SetSearchEnabled sets the SearchEnabled field's value. -func (s *IntArrayOptions) SetSearchEnabled(v bool) *IntArrayOptions { - s.SearchEnabled = &v - return s -} - -// SetSourceFields sets the SourceFields field's value. -func (s *IntArrayOptions) SetSourceFields(v string) *IntArrayOptions { - s.SourceFields = &v - return s -} - -// Options for a 64-bit signed integer field. Present if IndexFieldType specifies -// the field is of type int. All options are enabled by default. -type IntOptions struct { - _ struct{} `type:"structure"` - - // A value to use for the field if the field isn't specified for a document. - // This can be important if you are using the field in an expression and that - // field is not present in every document. - DefaultValue *int64 `type:"long"` - - // Whether facet information can be returned for the field. - FacetEnabled *bool `type:"boolean"` - - // Whether the contents of the field can be returned in the search results. - ReturnEnabled *bool `type:"boolean"` - - // Whether the contents of the field are searchable. - SearchEnabled *bool `type:"boolean"` - - // Whether the field can be used to sort the search results. - SortEnabled *bool `type:"boolean"` - - // The name of the source field to map to the field. - SourceField *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s IntOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IntOptions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IntOptions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IntOptions"} - if s.SourceField != nil && len(*s.SourceField) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceField", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *IntOptions) SetDefaultValue(v int64) *IntOptions { - s.DefaultValue = &v - return s -} - -// SetFacetEnabled sets the FacetEnabled field's value. -func (s *IntOptions) SetFacetEnabled(v bool) *IntOptions { - s.FacetEnabled = &v - return s -} - -// SetReturnEnabled sets the ReturnEnabled field's value. -func (s *IntOptions) SetReturnEnabled(v bool) *IntOptions { - s.ReturnEnabled = &v - return s -} - -// SetSearchEnabled sets the SearchEnabled field's value. -func (s *IntOptions) SetSearchEnabled(v bool) *IntOptions { - s.SearchEnabled = &v - return s -} - -// SetSortEnabled sets the SortEnabled field's value. -func (s *IntOptions) SetSortEnabled(v bool) *IntOptions { - s.SortEnabled = &v - return s -} - -// SetSourceField sets the SourceField field's value. -func (s *IntOptions) SetSourceField(v string) *IntOptions { - s.SourceField = &v - return s -} - -// Options for a latlon field. A latlon field contains a location stored as -// a latitude and longitude value pair. Present if IndexFieldType specifies -// the field is of type latlon. All options are enabled by default. -type LatLonOptions struct { - _ struct{} `type:"structure"` - - // A value to use for the field if the field isn't specified for a document. - DefaultValue *string `type:"string"` - - // Whether facet information can be returned for the field. - FacetEnabled *bool `type:"boolean"` - - // Whether the contents of the field can be returned in the search results. - ReturnEnabled *bool `type:"boolean"` - - // Whether the contents of the field are searchable. - SearchEnabled *bool `type:"boolean"` - - // Whether the field can be used to sort the search results. - SortEnabled *bool `type:"boolean"` - - // A string that represents the name of an index field. CloudSearch supports - // regular index fields as well as dynamic fields. A dynamic field's name defines - // a pattern that begins or ends with a wildcard. Any document fields that don't - // map to a regular index field but do match a dynamic field's pattern are configured - // with the dynamic field's indexing options. - // - // Regular field names begin with a letter and can contain the following characters: - // a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin - // or end with a wildcard (*). The wildcard can also be the only character in - // a dynamic field name. Multiple wildcards, and wildcards embedded within a - // string are not supported. - // - // The name score is reserved and cannot be used as a field name. To reference - // a document's ID, you can use the name _id. - SourceField *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s LatLonOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LatLonOptions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LatLonOptions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LatLonOptions"} - if s.SourceField != nil && len(*s.SourceField) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceField", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *LatLonOptions) SetDefaultValue(v string) *LatLonOptions { - s.DefaultValue = &v - return s -} - -// SetFacetEnabled sets the FacetEnabled field's value. -func (s *LatLonOptions) SetFacetEnabled(v bool) *LatLonOptions { - s.FacetEnabled = &v - return s -} - -// SetReturnEnabled sets the ReturnEnabled field's value. -func (s *LatLonOptions) SetReturnEnabled(v bool) *LatLonOptions { - s.ReturnEnabled = &v - return s -} - -// SetSearchEnabled sets the SearchEnabled field's value. -func (s *LatLonOptions) SetSearchEnabled(v bool) *LatLonOptions { - s.SearchEnabled = &v - return s -} - -// SetSortEnabled sets the SortEnabled field's value. -func (s *LatLonOptions) SetSortEnabled(v bool) *LatLonOptions { - s.SortEnabled = &v - return s -} - -// SetSourceField sets the SourceField field's value. -func (s *LatLonOptions) SetSourceField(v string) *LatLonOptions { - s.SourceField = &v - return s -} - -type Limits struct { - _ struct{} `type:"structure"` - - // MaximumPartitionCount is a required field - MaximumPartitionCount *int64 `min:"1" type:"integer" required:"true"` - - // MaximumReplicationCount is a required field - MaximumReplicationCount *int64 `min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s Limits) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Limits) GoString() string { - return s.String() -} - -// SetMaximumPartitionCount sets the MaximumPartitionCount field's value. -func (s *Limits) SetMaximumPartitionCount(v int64) *Limits { - s.MaximumPartitionCount = &v - return s -} - -// SetMaximumReplicationCount sets the MaximumReplicationCount field's value. -func (s *Limits) SetMaximumReplicationCount(v int64) *Limits { - s.MaximumReplicationCount = &v - return s -} - -type ListDomainNamesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ListDomainNamesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDomainNamesInput) GoString() string { - return s.String() -} - -// The result of a ListDomainNames request. Contains a list of the domains owned -// by an account. -type ListDomainNamesOutput struct { - _ struct{} `type:"structure"` - - // The names of the search domains owned by an account. - DomainNames map[string]*string `type:"map"` -} - -// String returns the string representation -func (s ListDomainNamesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDomainNamesOutput) GoString() string { - return s.String() -} - -// SetDomainNames sets the DomainNames field's value. -func (s *ListDomainNamesOutput) SetDomainNames(v map[string]*string) *ListDomainNamesOutput { - s.DomainNames = v - return s -} - -// Options for a field that contains an array of literal strings. Present if -// IndexFieldType specifies the field is of type literal-array. All options -// are enabled by default. -type LiteralArrayOptions struct { - _ struct{} `type:"structure"` - - // A value to use for the field if the field isn't specified for a document. - DefaultValue *string `type:"string"` - - // Whether facet information can be returned for the field. - FacetEnabled *bool `type:"boolean"` - - // Whether the contents of the field can be returned in the search results. - ReturnEnabled *bool `type:"boolean"` - - // Whether the contents of the field are searchable. - SearchEnabled *bool `type:"boolean"` - - // A list of source fields to map to the field. - SourceFields *string `type:"string"` -} - -// String returns the string representation -func (s LiteralArrayOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LiteralArrayOptions) GoString() string { - return s.String() -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *LiteralArrayOptions) SetDefaultValue(v string) *LiteralArrayOptions { - s.DefaultValue = &v - return s -} - -// SetFacetEnabled sets the FacetEnabled field's value. -func (s *LiteralArrayOptions) SetFacetEnabled(v bool) *LiteralArrayOptions { - s.FacetEnabled = &v - return s -} - -// SetReturnEnabled sets the ReturnEnabled field's value. -func (s *LiteralArrayOptions) SetReturnEnabled(v bool) *LiteralArrayOptions { - s.ReturnEnabled = &v - return s -} - -// SetSearchEnabled sets the SearchEnabled field's value. -func (s *LiteralArrayOptions) SetSearchEnabled(v bool) *LiteralArrayOptions { - s.SearchEnabled = &v - return s -} - -// SetSourceFields sets the SourceFields field's value. -func (s *LiteralArrayOptions) SetSourceFields(v string) *LiteralArrayOptions { - s.SourceFields = &v - return s -} - -// Options for literal field. Present if IndexFieldType specifies the field -// is of type literal. All options are enabled by default. -type LiteralOptions struct { - _ struct{} `type:"structure"` - - // A value to use for the field if the field isn't specified for a document. - DefaultValue *string `type:"string"` - - // Whether facet information can be returned for the field. - FacetEnabled *bool `type:"boolean"` - - // Whether the contents of the field can be returned in the search results. - ReturnEnabled *bool `type:"boolean"` - - // Whether the contents of the field are searchable. - SearchEnabled *bool `type:"boolean"` - - // Whether the field can be used to sort the search results. - SortEnabled *bool `type:"boolean"` - - // A string that represents the name of an index field. CloudSearch supports - // regular index fields as well as dynamic fields. A dynamic field's name defines - // a pattern that begins or ends with a wildcard. Any document fields that don't - // map to a regular index field but do match a dynamic field's pattern are configured - // with the dynamic field's indexing options. - // - // Regular field names begin with a letter and can contain the following characters: - // a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin - // or end with a wildcard (*). The wildcard can also be the only character in - // a dynamic field name. Multiple wildcards, and wildcards embedded within a - // string are not supported. - // - // The name score is reserved and cannot be used as a field name. To reference - // a document's ID, you can use the name _id. - SourceField *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s LiteralOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LiteralOptions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LiteralOptions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LiteralOptions"} - if s.SourceField != nil && len(*s.SourceField) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceField", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *LiteralOptions) SetDefaultValue(v string) *LiteralOptions { - s.DefaultValue = &v - return s -} - -// SetFacetEnabled sets the FacetEnabled field's value. -func (s *LiteralOptions) SetFacetEnabled(v bool) *LiteralOptions { - s.FacetEnabled = &v - return s -} - -// SetReturnEnabled sets the ReturnEnabled field's value. -func (s *LiteralOptions) SetReturnEnabled(v bool) *LiteralOptions { - s.ReturnEnabled = &v - return s -} - -// SetSearchEnabled sets the SearchEnabled field's value. -func (s *LiteralOptions) SetSearchEnabled(v bool) *LiteralOptions { - s.SearchEnabled = &v - return s -} - -// SetSortEnabled sets the SortEnabled field's value. -func (s *LiteralOptions) SetSortEnabled(v bool) *LiteralOptions { - s.SortEnabled = &v - return s -} - -// SetSourceField sets the SourceField field's value. -func (s *LiteralOptions) SetSourceField(v string) *LiteralOptions { - s.SourceField = &v - return s -} - -// The status of domain configuration option. -type OptionStatus struct { - _ struct{} `type:"structure"` - - // A timestamp for when this option was created. - // - // CreationDate is a required field - CreationDate *time.Time `type:"timestamp" required:"true"` - - // Indicates that the option will be deleted once processing is complete. - PendingDeletion *bool `type:"boolean"` - - // The state of processing a change to an option. Possible values: - // - // * RequiresIndexDocuments: the option's latest value will not be deployed - // until IndexDocuments has been called and indexing is complete. - // * Processing: the option's latest value is in the process of being activated. - // - // * Active: the option's latest value is completely deployed. - // * FailedToValidate: the option value is not compatible with the domain's - // data and cannot be used to index the data. You must either modify the - // option value or update or remove the incompatible documents. - // - // State is a required field - State *string `type:"string" required:"true" enum:"OptionState"` - - // A timestamp for when this option was last updated. - // - // UpdateDate is a required field - UpdateDate *time.Time `type:"timestamp" required:"true"` - - // A unique integer that indicates when this option was last updated. - UpdateVersion *int64 `type:"integer"` -} - -// String returns the string representation -func (s OptionStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OptionStatus) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *OptionStatus) SetCreationDate(v time.Time) *OptionStatus { - s.CreationDate = &v - return s -} - -// SetPendingDeletion sets the PendingDeletion field's value. -func (s *OptionStatus) SetPendingDeletion(v bool) *OptionStatus { - s.PendingDeletion = &v - return s -} - -// SetState sets the State field's value. -func (s *OptionStatus) SetState(v string) *OptionStatus { - s.State = &v - return s -} - -// SetUpdateDate sets the UpdateDate field's value. -func (s *OptionStatus) SetUpdateDate(v time.Time) *OptionStatus { - s.UpdateDate = &v - return s -} - -// SetUpdateVersion sets the UpdateVersion field's value. -func (s *OptionStatus) SetUpdateVersion(v int64) *OptionStatus { - s.UpdateVersion = &v - return s -} - -// The desired instance type and desired number of replicas of each index partition. -type ScalingParameters struct { - _ struct{} `type:"structure"` - - // The instance type that you want to preconfigure for your domain. For example, - // search.m1.small. - DesiredInstanceType *string `type:"string" enum:"PartitionInstanceType"` - - // The number of partitions you want to preconfigure for your domain. Only valid - // when you select m2.2xlarge as the desired instance type. - DesiredPartitionCount *int64 `type:"integer"` - - // The number of replicas you want to preconfigure for each index partition. - DesiredReplicationCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s ScalingParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalingParameters) GoString() string { - return s.String() -} - -// SetDesiredInstanceType sets the DesiredInstanceType field's value. -func (s *ScalingParameters) SetDesiredInstanceType(v string) *ScalingParameters { - s.DesiredInstanceType = &v - return s -} - -// SetDesiredPartitionCount sets the DesiredPartitionCount field's value. -func (s *ScalingParameters) SetDesiredPartitionCount(v int64) *ScalingParameters { - s.DesiredPartitionCount = &v - return s -} - -// SetDesiredReplicationCount sets the DesiredReplicationCount field's value. -func (s *ScalingParameters) SetDesiredReplicationCount(v int64) *ScalingParameters { - s.DesiredReplicationCount = &v - return s -} - -// The status and configuration of a search domain's scaling parameters. -type ScalingParametersStatus struct { - _ struct{} `type:"structure"` - - // The desired instance type and desired number of replicas of each index partition. - // - // Options is a required field - Options *ScalingParameters `type:"structure" required:"true"` - - // The status of domain configuration option. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ScalingParametersStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalingParametersStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *ScalingParametersStatus) SetOptions(v *ScalingParameters) *ScalingParametersStatus { - s.Options = v - return s -} - -// SetStatus sets the Status field's value. -func (s *ScalingParametersStatus) SetStatus(v *OptionStatus) *ScalingParametersStatus { - s.Status = v - return s -} - -// The endpoint to which service requests can be submitted. -type ServiceEndpoint struct { - _ struct{} `type:"structure"` - - // The endpoint to which service requests can be submitted. For example, search-imdb-movies-oopcnjfn6ugofer3zx5iadxxca.eu-west-1.cloudsearch.amazonaws.com - // or doc-imdb-movies-oopcnjfn6ugofer3zx5iadxxca.eu-west-1.cloudsearch.amazonaws.com. - Endpoint *string `type:"string"` -} - -// String returns the string representation -func (s ServiceEndpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceEndpoint) GoString() string { - return s.String() -} - -// SetEndpoint sets the Endpoint field's value. -func (s *ServiceEndpoint) SetEndpoint(v string) *ServiceEndpoint { - s.Endpoint = &v - return s -} - -// Configuration information for a search suggester. Each suggester has a unique -// name and specifies the text field you want to use for suggestions. The following -// options can be configured for a suggester: FuzzyMatching, SortExpression. -type Suggester struct { - _ struct{} `type:"structure"` - - // Options for a search suggester. - // - // DocumentSuggesterOptions is a required field - DocumentSuggesterOptions *DocumentSuggesterOptions `type:"structure" required:"true"` - - // Names must begin with a letter and can contain the following characters: - // a-z (lowercase), 0-9, and _ (underscore). - // - // SuggesterName is a required field - SuggesterName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Suggester) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Suggester) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Suggester) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Suggester"} - if s.DocumentSuggesterOptions == nil { - invalidParams.Add(request.NewErrParamRequired("DocumentSuggesterOptions")) - } - if s.SuggesterName == nil { - invalidParams.Add(request.NewErrParamRequired("SuggesterName")) - } - if s.SuggesterName != nil && len(*s.SuggesterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SuggesterName", 1)) - } - if s.DocumentSuggesterOptions != nil { - if err := s.DocumentSuggesterOptions.Validate(); err != nil { - invalidParams.AddNested("DocumentSuggesterOptions", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDocumentSuggesterOptions sets the DocumentSuggesterOptions field's value. -func (s *Suggester) SetDocumentSuggesterOptions(v *DocumentSuggesterOptions) *Suggester { - s.DocumentSuggesterOptions = v - return s -} - -// SetSuggesterName sets the SuggesterName field's value. -func (s *Suggester) SetSuggesterName(v string) *Suggester { - s.SuggesterName = &v - return s -} - -// The value of a Suggester and its current status. -type SuggesterStatus struct { - _ struct{} `type:"structure"` - - // Configuration information for a search suggester. Each suggester has a unique - // name and specifies the text field you want to use for suggestions. The following - // options can be configured for a suggester: FuzzyMatching, SortExpression. - // - // Options is a required field - Options *Suggester `type:"structure" required:"true"` - - // The status of domain configuration option. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s SuggesterStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SuggesterStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *SuggesterStatus) SetOptions(v *Suggester) *SuggesterStatus { - s.Options = v - return s -} - -// SetStatus sets the Status field's value. -func (s *SuggesterStatus) SetStatus(v *OptionStatus) *SuggesterStatus { - s.Status = v - return s -} - -// Options for a field that contains an array of text strings. Present if IndexFieldType -// specifies the field is of type text-array. A text-array field is always searchable. -// All options are enabled by default. -type TextArrayOptions struct { - _ struct{} `type:"structure"` - - // The name of an analysis scheme for a text-array field. - AnalysisScheme *string `type:"string"` - - // A value to use for the field if the field isn't specified for a document. - DefaultValue *string `type:"string"` - - // Whether highlights can be returned for the field. - HighlightEnabled *bool `type:"boolean"` - - // Whether the contents of the field can be returned in the search results. - ReturnEnabled *bool `type:"boolean"` - - // A list of source fields to map to the field. - SourceFields *string `type:"string"` -} - -// String returns the string representation -func (s TextArrayOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TextArrayOptions) GoString() string { - return s.String() -} - -// SetAnalysisScheme sets the AnalysisScheme field's value. -func (s *TextArrayOptions) SetAnalysisScheme(v string) *TextArrayOptions { - s.AnalysisScheme = &v - return s -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *TextArrayOptions) SetDefaultValue(v string) *TextArrayOptions { - s.DefaultValue = &v - return s -} - -// SetHighlightEnabled sets the HighlightEnabled field's value. -func (s *TextArrayOptions) SetHighlightEnabled(v bool) *TextArrayOptions { - s.HighlightEnabled = &v - return s -} - -// SetReturnEnabled sets the ReturnEnabled field's value. -func (s *TextArrayOptions) SetReturnEnabled(v bool) *TextArrayOptions { - s.ReturnEnabled = &v - return s -} - -// SetSourceFields sets the SourceFields field's value. -func (s *TextArrayOptions) SetSourceFields(v string) *TextArrayOptions { - s.SourceFields = &v - return s -} - -// Options for text field. Present if IndexFieldType specifies the field is -// of type text. A text field is always searchable. All options are enabled -// by default. -type TextOptions struct { - _ struct{} `type:"structure"` - - // The name of an analysis scheme for a text field. - AnalysisScheme *string `type:"string"` - - // A value to use for the field if the field isn't specified for a document. - DefaultValue *string `type:"string"` - - // Whether highlights can be returned for the field. - HighlightEnabled *bool `type:"boolean"` - - // Whether the contents of the field can be returned in the search results. - ReturnEnabled *bool `type:"boolean"` - - // Whether the field can be used to sort the search results. - SortEnabled *bool `type:"boolean"` - - // A string that represents the name of an index field. CloudSearch supports - // regular index fields as well as dynamic fields. A dynamic field's name defines - // a pattern that begins or ends with a wildcard. Any document fields that don't - // map to a regular index field but do match a dynamic field's pattern are configured - // with the dynamic field's indexing options. - // - // Regular field names begin with a letter and can contain the following characters: - // a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin - // or end with a wildcard (*). The wildcard can also be the only character in - // a dynamic field name. Multiple wildcards, and wildcards embedded within a - // string are not supported. - // - // The name score is reserved and cannot be used as a field name. To reference - // a document's ID, you can use the name _id. - SourceField *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s TextOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TextOptions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TextOptions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TextOptions"} - if s.SourceField != nil && len(*s.SourceField) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceField", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalysisScheme sets the AnalysisScheme field's value. -func (s *TextOptions) SetAnalysisScheme(v string) *TextOptions { - s.AnalysisScheme = &v - return s -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *TextOptions) SetDefaultValue(v string) *TextOptions { - s.DefaultValue = &v - return s -} - -// SetHighlightEnabled sets the HighlightEnabled field's value. -func (s *TextOptions) SetHighlightEnabled(v bool) *TextOptions { - s.HighlightEnabled = &v - return s -} - -// SetReturnEnabled sets the ReturnEnabled field's value. -func (s *TextOptions) SetReturnEnabled(v bool) *TextOptions { - s.ReturnEnabled = &v - return s -} - -// SetSortEnabled sets the SortEnabled field's value. -func (s *TextOptions) SetSortEnabled(v bool) *TextOptions { - s.SortEnabled = &v - return s -} - -// SetSourceField sets the SourceField field's value. -func (s *TextOptions) SetSourceField(v string) *TextOptions { - s.SourceField = &v - return s -} - -// Container for the parameters to the UpdateAvailabilityOptions operation. -// Specifies the name of the domain you want to update and the Multi-AZ availability -// option. -type UpdateAvailabilityOptionsInput struct { - _ struct{} `type:"structure"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - // You expand an existing search domain to a second Availability Zone by setting - // the Multi-AZ option to true. Similarly, you can turn off the Multi-AZ option - // to downgrade the domain to a single Availability Zone by setting the Multi-AZ - // option to false. - // - // MultiAZ is a required field - MultiAZ *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s UpdateAvailabilityOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAvailabilityOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAvailabilityOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAvailabilityOptionsInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.MultiAZ == nil { - invalidParams.Add(request.NewErrParamRequired("MultiAZ")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *UpdateAvailabilityOptionsInput) SetDomainName(v string) *UpdateAvailabilityOptionsInput { - s.DomainName = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *UpdateAvailabilityOptionsInput) SetMultiAZ(v bool) *UpdateAvailabilityOptionsInput { - s.MultiAZ = &v - return s -} - -// The result of a UpdateAvailabilityOptions request. Contains the status of -// the domain's availability options. -type UpdateAvailabilityOptionsOutput struct { - _ struct{} `type:"structure"` - - // The newly-configured availability options. Indicates whether Multi-AZ is - // enabled for the domain. - AvailabilityOptions *AvailabilityOptionsStatus `type:"structure"` -} - -// String returns the string representation -func (s UpdateAvailabilityOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAvailabilityOptionsOutput) GoString() string { - return s.String() -} - -// SetAvailabilityOptions sets the AvailabilityOptions field's value. -func (s *UpdateAvailabilityOptionsOutput) SetAvailabilityOptions(v *AvailabilityOptionsStatus) *UpdateAvailabilityOptionsOutput { - s.AvailabilityOptions = v - return s -} - -// Container for the parameters to the UpdateScalingParameters operation. Specifies -// the name of the domain you want to update and the scaling parameters you -// want to configure. -type UpdateScalingParametersInput struct { - _ struct{} `type:"structure"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - // The desired instance type and desired number of replicas of each index partition. - // - // ScalingParameters is a required field - ScalingParameters *ScalingParameters `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateScalingParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateScalingParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateScalingParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateScalingParametersInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.ScalingParameters == nil { - invalidParams.Add(request.NewErrParamRequired("ScalingParameters")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *UpdateScalingParametersInput) SetDomainName(v string) *UpdateScalingParametersInput { - s.DomainName = &v - return s -} - -// SetScalingParameters sets the ScalingParameters field's value. -func (s *UpdateScalingParametersInput) SetScalingParameters(v *ScalingParameters) *UpdateScalingParametersInput { - s.ScalingParameters = v - return s -} - -// The result of a UpdateScalingParameters request. Contains the status of the -// newly-configured scaling parameters. -type UpdateScalingParametersOutput struct { - _ struct{} `type:"structure"` - - // The status and configuration of a search domain's scaling parameters. - // - // ScalingParameters is a required field - ScalingParameters *ScalingParametersStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateScalingParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateScalingParametersOutput) GoString() string { - return s.String() -} - -// SetScalingParameters sets the ScalingParameters field's value. -func (s *UpdateScalingParametersOutput) SetScalingParameters(v *ScalingParametersStatus) *UpdateScalingParametersOutput { - s.ScalingParameters = v - return s -} - -// Container for the parameters to the UpdateServiceAccessPolicies operation. -// Specifies the name of the domain you want to update and the access rules -// you want to configure. -type UpdateServiceAccessPoliciesInput struct { - _ struct{} `type:"structure"` - - // The access rules you want to configure. These rules replace any existing - // rules. - // - // AccessPolicies is a required field - AccessPolicies *string `type:"string" required:"true"` - - // A string that represents the name of a domain. Domain names are unique across - // the domains owned by an account within an AWS region. Domain names start - // with a letter or number and can contain the following characters: a-z (lowercase), - // 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateServiceAccessPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateServiceAccessPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateServiceAccessPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateServiceAccessPoliciesInput"} - if s.AccessPolicies == nil { - invalidParams.Add(request.NewErrParamRequired("AccessPolicies")) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessPolicies sets the AccessPolicies field's value. -func (s *UpdateServiceAccessPoliciesInput) SetAccessPolicies(v string) *UpdateServiceAccessPoliciesInput { - s.AccessPolicies = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *UpdateServiceAccessPoliciesInput) SetDomainName(v string) *UpdateServiceAccessPoliciesInput { - s.DomainName = &v - return s -} - -// The result of an UpdateServiceAccessPolicies request. Contains the new access -// policies. -type UpdateServiceAccessPoliciesOutput struct { - _ struct{} `type:"structure"` - - // The access rules configured for the domain. - // - // AccessPolicies is a required field - AccessPolicies *AccessPoliciesStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateServiceAccessPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateServiceAccessPoliciesOutput) GoString() string { - return s.String() -} - -// SetAccessPolicies sets the AccessPolicies field's value. -func (s *UpdateServiceAccessPoliciesOutput) SetAccessPolicies(v *AccessPoliciesStatus) *UpdateServiceAccessPoliciesOutput { - s.AccessPolicies = v - return s -} - -const ( - // AlgorithmicStemmingNone is a AlgorithmicStemming enum value - AlgorithmicStemmingNone = "none" - - // AlgorithmicStemmingMinimal is a AlgorithmicStemming enum value - AlgorithmicStemmingMinimal = "minimal" - - // AlgorithmicStemmingLight is a AlgorithmicStemming enum value - AlgorithmicStemmingLight = "light" - - // AlgorithmicStemmingFull is a AlgorithmicStemming enum value - AlgorithmicStemmingFull = "full" -) - -// An IETF RFC 4646 (http://tools.ietf.org/html/rfc4646) language code or mul -// for multiple languages. -const ( - // AnalysisSchemeLanguageAr is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageAr = "ar" - - // AnalysisSchemeLanguageBg is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageBg = "bg" - - // AnalysisSchemeLanguageCa is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageCa = "ca" - - // AnalysisSchemeLanguageCs is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageCs = "cs" - - // AnalysisSchemeLanguageDa is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageDa = "da" - - // AnalysisSchemeLanguageDe is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageDe = "de" - - // AnalysisSchemeLanguageEl is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageEl = "el" - - // AnalysisSchemeLanguageEn is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageEn = "en" - - // AnalysisSchemeLanguageEs is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageEs = "es" - - // AnalysisSchemeLanguageEu is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageEu = "eu" - - // AnalysisSchemeLanguageFa is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageFa = "fa" - - // AnalysisSchemeLanguageFi is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageFi = "fi" - - // AnalysisSchemeLanguageFr is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageFr = "fr" - - // AnalysisSchemeLanguageGa is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageGa = "ga" - - // AnalysisSchemeLanguageGl is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageGl = "gl" - - // AnalysisSchemeLanguageHe is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageHe = "he" - - // AnalysisSchemeLanguageHi is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageHi = "hi" - - // AnalysisSchemeLanguageHu is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageHu = "hu" - - // AnalysisSchemeLanguageHy is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageHy = "hy" - - // AnalysisSchemeLanguageId is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageId = "id" - - // AnalysisSchemeLanguageIt is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageIt = "it" - - // AnalysisSchemeLanguageJa is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageJa = "ja" - - // AnalysisSchemeLanguageKo is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageKo = "ko" - - // AnalysisSchemeLanguageLv is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageLv = "lv" - - // AnalysisSchemeLanguageMul is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageMul = "mul" - - // AnalysisSchemeLanguageNl is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageNl = "nl" - - // AnalysisSchemeLanguageNo is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageNo = "no" - - // AnalysisSchemeLanguagePt is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguagePt = "pt" - - // AnalysisSchemeLanguageRo is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageRo = "ro" - - // AnalysisSchemeLanguageRu is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageRu = "ru" - - // AnalysisSchemeLanguageSv is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageSv = "sv" - - // AnalysisSchemeLanguageTh is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageTh = "th" - - // AnalysisSchemeLanguageTr is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageTr = "tr" - - // AnalysisSchemeLanguageZhHans is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageZhHans = "zh-Hans" - - // AnalysisSchemeLanguageZhHant is a AnalysisSchemeLanguage enum value - AnalysisSchemeLanguageZhHant = "zh-Hant" -) - -// The type of field. The valid options for a field depend on the field type. -// For more information about the supported field types, see Configuring Index -// Fields (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html) -// in the Amazon CloudSearch Developer Guide. -const ( - // IndexFieldTypeInt is a IndexFieldType enum value - IndexFieldTypeInt = "int" - - // IndexFieldTypeDouble is a IndexFieldType enum value - IndexFieldTypeDouble = "double" - - // IndexFieldTypeLiteral is a IndexFieldType enum value - IndexFieldTypeLiteral = "literal" - - // IndexFieldTypeText is a IndexFieldType enum value - IndexFieldTypeText = "text" - - // IndexFieldTypeDate is a IndexFieldType enum value - IndexFieldTypeDate = "date" - - // IndexFieldTypeLatlon is a IndexFieldType enum value - IndexFieldTypeLatlon = "latlon" - - // IndexFieldTypeIntArray is a IndexFieldType enum value - IndexFieldTypeIntArray = "int-array" - - // IndexFieldTypeDoubleArray is a IndexFieldType enum value - IndexFieldTypeDoubleArray = "double-array" - - // IndexFieldTypeLiteralArray is a IndexFieldType enum value - IndexFieldTypeLiteralArray = "literal-array" - - // IndexFieldTypeTextArray is a IndexFieldType enum value - IndexFieldTypeTextArray = "text-array" - - // IndexFieldTypeDateArray is a IndexFieldType enum value - IndexFieldTypeDateArray = "date-array" -) - -// The state of processing a change to an option. One of: -// -// * RequiresIndexDocuments: The option's latest value will not be deployed -// until IndexDocuments has been called and indexing is complete. -// * Processing: The option's latest value is in the process of being activated. -// -// * Active: The option's latest value is fully deployed. -// * FailedToValidate: The option value is not compatible with the domain's -// data and cannot be used to index the data. You must either modify the -// option value or update or remove the incompatible documents. -const ( - // OptionStateRequiresIndexDocuments is a OptionState enum value - OptionStateRequiresIndexDocuments = "RequiresIndexDocuments" - - // OptionStateProcessing is a OptionState enum value - OptionStateProcessing = "Processing" - - // OptionStateActive is a OptionState enum value - OptionStateActive = "Active" - - // OptionStateFailedToValidate is a OptionState enum value - OptionStateFailedToValidate = "FailedToValidate" -) - -// The instance type (such as search.m1.small) on which an index partition is -// hosted. -const ( - // PartitionInstanceTypeSearchM1Small is a PartitionInstanceType enum value - PartitionInstanceTypeSearchM1Small = "search.m1.small" - - // PartitionInstanceTypeSearchM1Large is a PartitionInstanceType enum value - PartitionInstanceTypeSearchM1Large = "search.m1.large" - - // PartitionInstanceTypeSearchM2Xlarge is a PartitionInstanceType enum value - PartitionInstanceTypeSearchM2Xlarge = "search.m2.xlarge" - - // PartitionInstanceTypeSearchM22xlarge is a PartitionInstanceType enum value - PartitionInstanceTypeSearchM22xlarge = "search.m2.2xlarge" - - // PartitionInstanceTypeSearchM3Medium is a PartitionInstanceType enum value - PartitionInstanceTypeSearchM3Medium = "search.m3.medium" - - // PartitionInstanceTypeSearchM3Large is a PartitionInstanceType enum value - PartitionInstanceTypeSearchM3Large = "search.m3.large" - - // PartitionInstanceTypeSearchM3Xlarge is a PartitionInstanceType enum value - PartitionInstanceTypeSearchM3Xlarge = "search.m3.xlarge" - - // PartitionInstanceTypeSearchM32xlarge is a PartitionInstanceType enum value - PartitionInstanceTypeSearchM32xlarge = "search.m3.2xlarge" -) - -const ( - // SuggesterFuzzyMatchingNone is a SuggesterFuzzyMatching enum value - SuggesterFuzzyMatchingNone = "none" - - // SuggesterFuzzyMatchingLow is a SuggesterFuzzyMatching enum value - SuggesterFuzzyMatchingLow = "low" - - // SuggesterFuzzyMatchingHigh is a SuggesterFuzzyMatching enum value - SuggesterFuzzyMatchingHigh = "high" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/doc.go deleted file mode 100644 index cdcf458a9..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/doc.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package cloudsearch provides the client and types for making API -// requests to Amazon CloudSearch. -// -// You use the Amazon CloudSearch configuration service to create, configure, -// and manage search domains. Configuration service requests are submitted using -// the AWS Query protocol. AWS Query requests are HTTP or HTTPS requests submitted -// via HTTP GET or POST with a query parameter named Action. -// -// The endpoint for configuration service requests is region-specific: cloudsearch.region.amazonaws.com. -// For example, cloudsearch.us-east-1.amazonaws.com. For a current list of supported -// regions and endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#cloudsearch_region). -// -// See cloudsearch package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudsearch/ -// -// Using the Client -// -// To contact Amazon CloudSearch with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon CloudSearch client CloudSearch for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudsearch/#New -package cloudsearch diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/errors.go deleted file mode 100644 index f0ed2f1e2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/errors.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudsearch - -const ( - - // ErrCodeBaseException for service response error code - // "BaseException". - // - // An error occurred while processing the request. - ErrCodeBaseException = "BaseException" - - // ErrCodeDisabledOperationException for service response error code - // "DisabledAction". - // - // The request was rejected because it attempted an operation which is not enabled. - ErrCodeDisabledOperationException = "DisabledAction" - - // ErrCodeInternalException for service response error code - // "InternalException". - // - // An internal error occurred while processing the request. If this problem - // persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). - ErrCodeInternalException = "InternalException" - - // ErrCodeInvalidTypeException for service response error code - // "InvalidType". - // - // The request was rejected because it specified an invalid type definition. - ErrCodeInvalidTypeException = "InvalidType" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceeded". - // - // The request was rejected because a resource limit has already been met. - ErrCodeLimitExceededException = "LimitExceeded" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFound". - // - // The request was rejected because it attempted to reference a resource that - // does not exist. - ErrCodeResourceNotFoundException = "ResourceNotFound" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/service.go deleted file mode 100644 index 850bc1370..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudsearch - -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/query" -) - -// CloudSearch provides the API operation methods for making requests to -// Amazon CloudSearch. See this package's package overview docs -// for details on the service. -// -// CloudSearch methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CloudSearch 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 = "cloudsearch" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "CloudSearch" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CloudSearch client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a CloudSearch client from just a session. -// svc := cloudsearch.New(mySession) -// -// // Create a CloudSearch client with additional configuration -// svc := cloudsearch.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudSearch { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CloudSearch { - svc := &CloudSearch{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2013-01-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CloudSearch operation and runs any -// custom request initialization. -func (c *CloudSearch) 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/cloudtrail/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go deleted file mode 100644 index dccb979a4..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go +++ /dev/null @@ -1,4378 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudtrail - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAddTags = "AddTags" - -// AddTagsRequest generates a "aws/request.Request" representing the -// client's request for the AddTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTags for more information on using the AddTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsRequest method. -// req, resp := client.AddTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags -func (c *CloudTrail) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) { - op := &request.Operation{ - Name: opAddTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsInput{} - } - - output = &AddTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTags API operation for AWS CloudTrail. -// -// Adds one or more tags to a trail, up to a limit of 50. Tags must be unique -// per trail. Overwrites an existing tag's value when a new value is specified -// for an existing tag key. If you specify a key without a value, the tag will -// be created with the specified key and a value of null. You can tag a trail -// that applies to all regions only from the region in which the trail was created -// (that is, from its home region). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudTrail's -// API operation AddTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the specified resource is not found. -// -// * ErrCodeARNInvalidException "CloudTrailARNInvalidException" -// This exception is thrown when an operation is called with an invalid trail -// ARN. The format of a trail ARN is: -// -// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail -// -// * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" -// This exception is thrown when the specified resource type is not supported -// by CloudTrail. -// -// * ErrCodeTagsLimitExceededException "TagsLimitExceededException" -// The number of tags per trail has exceeded the permitted amount. Currently, -// the limit is 50. -// -// * ErrCodeInvalidTrailNameException "InvalidTrailNameException" -// This exception is thrown when the provided trail name is not valid. Trail -// names must meet the following requirements: -// -// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores -// (_), or dashes (-) -// -// * Start with a letter or number, and end with a letter or number -// -// * Be between 3 and 128 characters -// -// * Have no adjacent periods, underscores or dashes. Names like my-_namespace -// and my--namespace are invalid. -// -// * Not be in IP address format (for example, 192.168.5.4) -// -// * ErrCodeInvalidTagParameterException "InvalidTagParameterException" -// This exception is thrown when the key or value specified for the tag does -// not match the regular expression ^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// This exception is thrown when the requested operation is not supported. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// This exception is thrown when the requested operation is not permitted. -// -// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" -// This exception is thrown when the AWS account making the request to create -// or update an organization trail is not the master account for an organization -// in AWS Organizations. For more information, see Prepare For Creating a Trail -// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags -func (c *CloudTrail) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - return out, req.Send() -} - -// AddTagsWithContext is the same as AddTags with the addition of -// the ability to pass a context and additional request options. -// -// See AddTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudTrail) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTrail = "CreateTrail" - -// CreateTrailRequest generates a "aws/request.Request" representing the -// client's request for the CreateTrail operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTrail for more information on using the CreateTrail -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTrailRequest method. -// req, resp := client.CreateTrailRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail -func (c *CloudTrail) CreateTrailRequest(input *CreateTrailInput) (req *request.Request, output *CreateTrailOutput) { - op := &request.Operation{ - Name: opCreateTrail, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTrailInput{} - } - - output = &CreateTrailOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTrail API operation for AWS CloudTrail. -// -// Creates a trail that specifies the settings for delivery of log data to an -// Amazon S3 bucket. A maximum of five trails can exist in a region, irrespective -// of the region in which they were created. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudTrail's -// API operation CreateTrail for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMaximumNumberOfTrailsExceededException "MaximumNumberOfTrailsExceededException" -// This exception is thrown when the maximum number of trails is reached. -// -// * ErrCodeTrailAlreadyExistsException "TrailAlreadyExistsException" -// This exception is thrown when the specified trail already exists. -// -// * ErrCodeS3BucketDoesNotExistException "S3BucketDoesNotExistException" -// This exception is thrown when the specified S3 bucket does not exist. -// -// * ErrCodeInsufficientS3BucketPolicyException "InsufficientS3BucketPolicyException" -// This exception is thrown when the policy on the S3 bucket is not sufficient. -// -// * ErrCodeInsufficientSnsTopicPolicyException "InsufficientSnsTopicPolicyException" -// This exception is thrown when the policy on the SNS topic is not sufficient. -// -// * ErrCodeInsufficientEncryptionPolicyException "InsufficientEncryptionPolicyException" -// This exception is thrown when the policy on the S3 bucket or KMS key is not -// sufficient. -// -// * ErrCodeInvalidS3BucketNameException "InvalidS3BucketNameException" -// This exception is thrown when the provided S3 bucket name is not valid. -// -// * ErrCodeInvalidS3PrefixException "InvalidS3PrefixException" -// This exception is thrown when the provided S3 prefix is not valid. -// -// * ErrCodeInvalidSnsTopicNameException "InvalidSnsTopicNameException" -// This exception is thrown when the provided SNS topic name is not valid. -// -// * ErrCodeInvalidKmsKeyIdException "InvalidKmsKeyIdException" -// This exception is thrown when the KMS key ARN is invalid. -// -// * ErrCodeInvalidTrailNameException "InvalidTrailNameException" -// This exception is thrown when the provided trail name is not valid. Trail -// names must meet the following requirements: -// -// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores -// (_), or dashes (-) -// -// * Start with a letter or number, and end with a letter or number -// -// * Be between 3 and 128 characters -// -// * Have no adjacent periods, underscores or dashes. Names like my-_namespace -// and my--namespace are invalid. -// -// * Not be in IP address format (for example, 192.168.5.4) -// -// * ErrCodeTrailNotProvidedException "TrailNotProvidedException" -// This exception is deprecated. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// This exception is thrown when the combination of parameters provided is not -// valid. -// -// * ErrCodeKmsKeyNotFoundException "KmsKeyNotFoundException" -// This exception is thrown when the KMS key does not exist, or when the S3 -// bucket and the KMS key are not in the same region. -// -// * ErrCodeKmsKeyDisabledException "KmsKeyDisabledException" -// This exception is deprecated. -// -// * ErrCodeKmsException "KmsException" -// This exception is thrown when there is an issue with the specified KMS key -// and the trail can’t be updated. -// -// * ErrCodeInvalidCloudWatchLogsLogGroupArnException "InvalidCloudWatchLogsLogGroupArnException" -// This exception is thrown when the provided CloudWatch log group is not valid. -// -// * ErrCodeInvalidCloudWatchLogsRoleArnException "InvalidCloudWatchLogsRoleArnException" -// This exception is thrown when the provided role is not valid. -// -// * ErrCodeCloudWatchLogsDeliveryUnavailableException "CloudWatchLogsDeliveryUnavailableException" -// Cannot set a CloudWatch Logs delivery for this region. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// This exception is thrown when the requested operation is not supported. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// This exception is thrown when the requested operation is not permitted. -// -// * ErrCodeAccessNotEnabledException "CloudTrailAccessNotEnabledException" -// This exception is thrown when trusted access has not been enabled between -// AWS CloudTrail and AWS Organizations. For more information, see Enabling -// Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) -// and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException" -// This exception is thrown when the IAM user or role that is used to create -// the organization trail is lacking one or more required permissions for creating -// an organization trail in a required service. For more information, see Prepare -// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" -// This exception is thrown when the AWS account making the request to create -// or update an organization trail is not the master account for an organization -// in AWS Organizations. For more information, see Prepare For Creating a Trail -// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// * ErrCodeOrganizationsNotInUseException "OrganizationsNotInUseException" -// This exception is thrown when the request is made from an AWS account that -// is not a member of an organization. To make this request, sign in using the -// credentials of an account that belongs to an organization. -// -// * ErrCodeOrganizationNotInAllFeaturesModeException "OrganizationNotInAllFeaturesModeException" -// This exception is thrown when AWS Organizations is not configured to support -// all features. All features must be enabled in AWS Organization to support -// creating an organization trail. For more information, see Prepare For Creating -// a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail -func (c *CloudTrail) CreateTrail(input *CreateTrailInput) (*CreateTrailOutput, error) { - req, out := c.CreateTrailRequest(input) - return out, req.Send() -} - -// CreateTrailWithContext is the same as CreateTrail with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTrail for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudTrail) CreateTrailWithContext(ctx aws.Context, input *CreateTrailInput, opts ...request.Option) (*CreateTrailOutput, error) { - req, out := c.CreateTrailRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTrail = "DeleteTrail" - -// DeleteTrailRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTrail operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTrail for more information on using the DeleteTrail -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTrailRequest method. -// req, resp := client.DeleteTrailRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail -func (c *CloudTrail) DeleteTrailRequest(input *DeleteTrailInput) (req *request.Request, output *DeleteTrailOutput) { - op := &request.Operation{ - Name: opDeleteTrail, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTrailInput{} - } - - output = &DeleteTrailOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTrail API operation for AWS CloudTrail. -// -// Deletes a trail. This operation must be called from the region in which the -// trail was created. DeleteTrail cannot be called on the shadow trails (replicated -// trails in other regions) of a trail that is enabled in all regions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudTrail's -// API operation DeleteTrail for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTrailNotFoundException "TrailNotFoundException" -// This exception is thrown when the trail with the given name is not found. -// -// * ErrCodeInvalidTrailNameException "InvalidTrailNameException" -// This exception is thrown when the provided trail name is not valid. Trail -// names must meet the following requirements: -// -// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores -// (_), or dashes (-) -// -// * Start with a letter or number, and end with a letter or number -// -// * Be between 3 and 128 characters -// -// * Have no adjacent periods, underscores or dashes. Names like my-_namespace -// and my--namespace are invalid. -// -// * Not be in IP address format (for example, 192.168.5.4) -// -// * ErrCodeInvalidHomeRegionException "InvalidHomeRegionException" -// This exception is thrown when an operation is called on a trail from a region -// other than the region in which the trail was created. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// This exception is thrown when the requested operation is not supported. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// This exception is thrown when the requested operation is not permitted. -// -// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" -// This exception is thrown when the AWS account making the request to create -// or update an organization trail is not the master account for an organization -// in AWS Organizations. For more information, see Prepare For Creating a Trail -// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException" -// This exception is thrown when the IAM user or role that is used to create -// the organization trail is lacking one or more required permissions for creating -// an organization trail in a required service. For more information, see Prepare -// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail -func (c *CloudTrail) DeleteTrail(input *DeleteTrailInput) (*DeleteTrailOutput, error) { - req, out := c.DeleteTrailRequest(input) - return out, req.Send() -} - -// DeleteTrailWithContext is the same as DeleteTrail with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTrail for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudTrail) DeleteTrailWithContext(ctx aws.Context, input *DeleteTrailInput, opts ...request.Option) (*DeleteTrailOutput, error) { - req, out := c.DeleteTrailRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTrails = "DescribeTrails" - -// DescribeTrailsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTrails operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTrails for more information on using the DescribeTrails -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTrailsRequest method. -// req, resp := client.DescribeTrailsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails -func (c *CloudTrail) DescribeTrailsRequest(input *DescribeTrailsInput) (req *request.Request, output *DescribeTrailsOutput) { - op := &request.Operation{ - Name: opDescribeTrails, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTrailsInput{} - } - - output = &DescribeTrailsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTrails API operation for AWS CloudTrail. -// -// Retrieves settings for the trail associated with the current region for 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 CloudTrail's -// API operation DescribeTrails for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// This exception is thrown when the requested operation is not supported. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// This exception is thrown when the requested operation is not permitted. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails -func (c *CloudTrail) DescribeTrails(input *DescribeTrailsInput) (*DescribeTrailsOutput, error) { - req, out := c.DescribeTrailsRequest(input) - return out, req.Send() -} - -// DescribeTrailsWithContext is the same as DescribeTrails with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTrails for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudTrail) DescribeTrailsWithContext(ctx aws.Context, input *DescribeTrailsInput, opts ...request.Option) (*DescribeTrailsOutput, error) { - req, out := c.DescribeTrailsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetEventSelectors = "GetEventSelectors" - -// GetEventSelectorsRequest generates a "aws/request.Request" representing the -// client's request for the GetEventSelectors operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetEventSelectors for more information on using the GetEventSelectors -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetEventSelectorsRequest method. -// req, resp := client.GetEventSelectorsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors -func (c *CloudTrail) GetEventSelectorsRequest(input *GetEventSelectorsInput) (req *request.Request, output *GetEventSelectorsOutput) { - op := &request.Operation{ - Name: opGetEventSelectors, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetEventSelectorsInput{} - } - - output = &GetEventSelectorsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetEventSelectors API operation for AWS CloudTrail. -// -// Describes the settings for the event selectors that you configured for your -// trail. The information returned for your event selectors includes the following: -// -// * If your event selector includes read-only events, write-only events, -// or all events. This applies to both management events and data events. -// -// * If your event selector includes management events. -// -// * If your event selector includes data events, the Amazon S3 objects or -// AWS Lambda functions that you are logging for data events. -// -// For more information, see Logging Data and Management Events for Trails -// (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html) -// in the AWS CloudTrail User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudTrail's -// API operation GetEventSelectors for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTrailNotFoundException "TrailNotFoundException" -// This exception is thrown when the trail with the given name is not found. -// -// * ErrCodeInvalidTrailNameException "InvalidTrailNameException" -// This exception is thrown when the provided trail name is not valid. Trail -// names must meet the following requirements: -// -// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores -// (_), or dashes (-) -// -// * Start with a letter or number, and end with a letter or number -// -// * Be between 3 and 128 characters -// -// * Have no adjacent periods, underscores or dashes. Names like my-_namespace -// and my--namespace are invalid. -// -// * Not be in IP address format (for example, 192.168.5.4) -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// This exception is thrown when the requested operation is not supported. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// This exception is thrown when the requested operation is not permitted. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors -func (c *CloudTrail) GetEventSelectors(input *GetEventSelectorsInput) (*GetEventSelectorsOutput, error) { - req, out := c.GetEventSelectorsRequest(input) - return out, req.Send() -} - -// GetEventSelectorsWithContext is the same as GetEventSelectors with the addition of -// the ability to pass a context and additional request options. -// -// See GetEventSelectors for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudTrail) GetEventSelectorsWithContext(ctx aws.Context, input *GetEventSelectorsInput, opts ...request.Option) (*GetEventSelectorsOutput, error) { - req, out := c.GetEventSelectorsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTrailStatus = "GetTrailStatus" - -// GetTrailStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetTrailStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTrailStatus for more information on using the GetTrailStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTrailStatusRequest method. -// req, resp := client.GetTrailStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus -func (c *CloudTrail) GetTrailStatusRequest(input *GetTrailStatusInput) (req *request.Request, output *GetTrailStatusOutput) { - op := &request.Operation{ - Name: opGetTrailStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTrailStatusInput{} - } - - output = &GetTrailStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTrailStatus API operation for AWS CloudTrail. -// -// Returns a JSON-formatted list of information about the specified trail. Fields -// include information on delivery errors, Amazon SNS and Amazon S3 errors, -// and start and stop logging times for each trail. This operation returns trail -// status from a single region. To return trail status from all regions, you -// must call the operation on each region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudTrail's -// API operation GetTrailStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTrailNotFoundException "TrailNotFoundException" -// This exception is thrown when the trail with the given name is not found. -// -// * ErrCodeInvalidTrailNameException "InvalidTrailNameException" -// This exception is thrown when the provided trail name is not valid. Trail -// names must meet the following requirements: -// -// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores -// (_), or dashes (-) -// -// * Start with a letter or number, and end with a letter or number -// -// * Be between 3 and 128 characters -// -// * Have no adjacent periods, underscores or dashes. Names like my-_namespace -// and my--namespace are invalid. -// -// * Not be in IP address format (for example, 192.168.5.4) -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus -func (c *CloudTrail) GetTrailStatus(input *GetTrailStatusInput) (*GetTrailStatusOutput, error) { - req, out := c.GetTrailStatusRequest(input) - return out, req.Send() -} - -// GetTrailStatusWithContext is the same as GetTrailStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetTrailStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudTrail) GetTrailStatusWithContext(ctx aws.Context, input *GetTrailStatusInput, opts ...request.Option) (*GetTrailStatusOutput, error) { - req, out := c.GetTrailStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPublicKeys = "ListPublicKeys" - -// ListPublicKeysRequest generates a "aws/request.Request" representing the -// client's request for the ListPublicKeys operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPublicKeys for more information on using the ListPublicKeys -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPublicKeysRequest method. -// req, resp := client.ListPublicKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys -func (c *CloudTrail) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput) { - op := &request.Operation{ - Name: opListPublicKeys, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListPublicKeysInput{} - } - - output = &ListPublicKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPublicKeys API operation for AWS CloudTrail. -// -// Returns all public keys whose private keys were used to sign the digest files -// within the specified time range. The public key is needed to validate digest -// files that were signed with its corresponding private key. -// -// CloudTrail uses different private/public key pairs per region. Each digest -// file is signed with a private key unique to its region. Therefore, when you -// validate a digest file from a particular region, you must look in the same -// region for its corresponding public key. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudTrail's -// API operation ListPublicKeys for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidTimeRangeException "InvalidTimeRangeException" -// Occurs if the timestamp values are invalid. Either the start time occurs -// after the end time or the time range is outside the range of possible values. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// This exception is thrown when the requested operation is not supported. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// This exception is thrown when the requested operation is not permitted. -// -// * ErrCodeInvalidTokenException "InvalidTokenException" -// Reserved for future use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys -func (c *CloudTrail) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error) { - req, out := c.ListPublicKeysRequest(input) - return out, req.Send() -} - -// ListPublicKeysWithContext is the same as ListPublicKeys with the addition of -// the ability to pass a context and additional request options. -// -// See ListPublicKeys for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudTrail) ListPublicKeysWithContext(ctx aws.Context, input *ListPublicKeysInput, opts ...request.Option) (*ListPublicKeysOutput, error) { - req, out := c.ListPublicKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTags = "ListTags" - -// ListTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTags for more information on using the ListTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsRequest method. -// req, resp := client.ListTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags -func (c *CloudTrail) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { - op := &request.Operation{ - Name: opListTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsInput{} - } - - output = &ListTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTags API operation for AWS CloudTrail. -// -// Lists the tags for the trail in the current region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudTrail's -// API operation ListTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the specified resource is not found. -// -// * ErrCodeARNInvalidException "CloudTrailARNInvalidException" -// This exception is thrown when an operation is called with an invalid trail -// ARN. The format of a trail ARN is: -// -// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail -// -// * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" -// This exception is thrown when the specified resource type is not supported -// by CloudTrail. -// -// * ErrCodeInvalidTrailNameException "InvalidTrailNameException" -// This exception is thrown when the provided trail name is not valid. Trail -// names must meet the following requirements: -// -// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores -// (_), or dashes (-) -// -// * Start with a letter or number, and end with a letter or number -// -// * Be between 3 and 128 characters -// -// * Have no adjacent periods, underscores or dashes. Names like my-_namespace -// and my--namespace are invalid. -// -// * Not be in IP address format (for example, 192.168.5.4) -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// This exception is thrown when the requested operation is not supported. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// This exception is thrown when the requested operation is not permitted. -// -// * ErrCodeInvalidTokenException "InvalidTokenException" -// Reserved for future use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags -func (c *CloudTrail) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - return out, req.Send() -} - -// ListTagsWithContext is the same as ListTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudTrail) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opLookupEvents = "LookupEvents" - -// LookupEventsRequest generates a "aws/request.Request" representing the -// client's request for the LookupEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See LookupEvents for more information on using the LookupEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the LookupEventsRequest method. -// req, resp := client.LookupEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents -func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request.Request, output *LookupEventsOutput) { - op := &request.Operation{ - Name: opLookupEvents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &LookupEventsInput{} - } - - output = &LookupEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// LookupEvents API operation for AWS CloudTrail. -// -// Looks up management events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events) -// captured by CloudTrail. Events for a region can be looked up in that region -// during the last 90 days. Lookup supports the following attributes: -// -// * AWS access key -// -// * Event ID -// -// * Event name -// -// * Event source -// -// * Read only -// -// * Resource name -// -// * Resource type -// -// * User name -// -// All attributes are optional. The default number of results returned is 50, -// with a maximum of 50 possible. The response includes a token that you can -// use to get the next page of results. -// -// The rate of lookup requests is limited to one per second per account. If -// this limit is exceeded, a throttling error occurs. -// -// Events that occurred during the selected time range will not be available -// for lookup if CloudTrail logging was not enabled when the events occurred. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudTrail's -// API operation LookupEvents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidLookupAttributesException "InvalidLookupAttributesException" -// Occurs when an invalid lookup attribute is specified. -// -// * ErrCodeInvalidTimeRangeException "InvalidTimeRangeException" -// Occurs if the timestamp values are invalid. Either the start time occurs -// after the end time or the time range is outside the range of possible values. -// -// * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException" -// This exception is thrown if the limit specified is invalid. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// Invalid token or token that was previously used in a request with different -// parameters. This exception is thrown if the token is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents -func (c *CloudTrail) LookupEvents(input *LookupEventsInput) (*LookupEventsOutput, error) { - req, out := c.LookupEventsRequest(input) - return out, req.Send() -} - -// LookupEventsWithContext is the same as LookupEvents with the addition of -// the ability to pass a context and additional request options. -// -// See LookupEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudTrail) LookupEventsWithContext(ctx aws.Context, input *LookupEventsInput, opts ...request.Option) (*LookupEventsOutput, error) { - req, out := c.LookupEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// LookupEventsPages iterates over the pages of a LookupEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See LookupEvents 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 LookupEvents operation. -// pageNum := 0 -// err := client.LookupEventsPages(params, -// func(page *LookupEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudTrail) LookupEventsPages(input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool) error { - return c.LookupEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// LookupEventsPagesWithContext same as LookupEventsPages 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 *CloudTrail) LookupEventsPagesWithContext(ctx aws.Context, input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *LookupEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.LookupEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*LookupEventsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opPutEventSelectors = "PutEventSelectors" - -// PutEventSelectorsRequest generates a "aws/request.Request" representing the -// client's request for the PutEventSelectors operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutEventSelectors for more information on using the PutEventSelectors -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutEventSelectorsRequest method. -// req, resp := client.PutEventSelectorsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors -func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (req *request.Request, output *PutEventSelectorsOutput) { - op := &request.Operation{ - Name: opPutEventSelectors, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutEventSelectorsInput{} - } - - output = &PutEventSelectorsOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutEventSelectors API operation for AWS CloudTrail. -// -// Configures an event selector for your trail. Use event selectors to further -// specify the management and data event settings for your trail. By default, -// trails created without specific event selectors will be configured to log -// all read and write management events, and no data events. -// -// When an event occurs in your account, CloudTrail evaluates the event selectors -// in all trails. For each trail, if the event matches any event selector, the -// trail processes and logs the event. If the event doesn't match any event -// selector, the trail doesn't log the event. -// -// Example -// -// You create an event selector for a trail and specify that you want write-only -// events. -// -// The EC2 GetConsoleOutput and RunInstances API operations occur in your account. -// -// CloudTrail evaluates whether the events match your event selectors. -// -// The RunInstances is a write-only event and it matches your event selector. -// The trail logs the event. -// -// The GetConsoleOutput is a read-only event but it doesn't match your event -// selector. The trail doesn't log the event. -// -// The PutEventSelectors operation must be called from the region in which the -// trail was created; otherwise, an InvalidHomeRegionException is thrown. -// -// You can configure up to five event selectors for each trail. For more information, -// see Logging Data and Management Events for Trails (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html) -// and Limits in AWS CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html) -// in the AWS CloudTrail User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudTrail's -// API operation PutEventSelectors for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTrailNotFoundException "TrailNotFoundException" -// This exception is thrown when the trail with the given name is not found. -// -// * ErrCodeInvalidTrailNameException "InvalidTrailNameException" -// This exception is thrown when the provided trail name is not valid. Trail -// names must meet the following requirements: -// -// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores -// (_), or dashes (-) -// -// * Start with a letter or number, and end with a letter or number -// -// * Be between 3 and 128 characters -// -// * Have no adjacent periods, underscores or dashes. Names like my-_namespace -// and my--namespace are invalid. -// -// * Not be in IP address format (for example, 192.168.5.4) -// -// * ErrCodeInvalidHomeRegionException "InvalidHomeRegionException" -// This exception is thrown when an operation is called on a trail from a region -// other than the region in which the trail was created. -// -// * ErrCodeInvalidEventSelectorsException "InvalidEventSelectorsException" -// This exception is thrown when the PutEventSelectors operation is called with -// a number of event selectors or data resources that is not valid. The combination -// of event selectors and data resources is not valid. A trail can have up to -// 5 event selectors. A trail is limited to 250 data resources. These data resources -// can be distributed across event selectors, but the overall total cannot exceed -// 250. -// -// You can: -// -// * Specify a valid number of event selectors (1 to 5) for a trail. -// -// * Specify a valid number of data resources (1 to 250) for an event selector. -// The limit of number of resources on an individual event selector is configurable -// up to 250. However, this upper limit is allowed only if the total number -// of data resources does not exceed 250 across all event selectors for a -// trail. -// -// * Specify a valid value for a parameter. For example, specifying the ReadWriteType -// parameter with a value of read-only is invalid. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// This exception is thrown when the requested operation is not supported. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// This exception is thrown when the requested operation is not permitted. -// -// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" -// This exception is thrown when the AWS account making the request to create -// or update an organization trail is not the master account for an organization -// in AWS Organizations. For more information, see Prepare For Creating a Trail -// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException" -// This exception is thrown when the IAM user or role that is used to create -// the organization trail is lacking one or more required permissions for creating -// an organization trail in a required service. For more information, see Prepare -// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors -func (c *CloudTrail) PutEventSelectors(input *PutEventSelectorsInput) (*PutEventSelectorsOutput, error) { - req, out := c.PutEventSelectorsRequest(input) - return out, req.Send() -} - -// PutEventSelectorsWithContext is the same as PutEventSelectors with the addition of -// the ability to pass a context and additional request options. -// -// See PutEventSelectors for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudTrail) PutEventSelectorsWithContext(ctx aws.Context, input *PutEventSelectorsInput, opts ...request.Option) (*PutEventSelectorsOutput, error) { - req, out := c.PutEventSelectorsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTags = "RemoveTags" - -// RemoveTagsRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTags for more information on using the RemoveTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsRequest method. -// req, resp := client.RemoveTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags -func (c *CloudTrail) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) { - op := &request.Operation{ - Name: opRemoveTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsInput{} - } - - output = &RemoveTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTags API operation for AWS CloudTrail. -// -// Removes the specified tags from a trail. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudTrail's -// API operation RemoveTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the specified resource is not found. -// -// * ErrCodeARNInvalidException "CloudTrailARNInvalidException" -// This exception is thrown when an operation is called with an invalid trail -// ARN. The format of a trail ARN is: -// -// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail -// -// * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" -// This exception is thrown when the specified resource type is not supported -// by CloudTrail. -// -// * ErrCodeInvalidTrailNameException "InvalidTrailNameException" -// This exception is thrown when the provided trail name is not valid. Trail -// names must meet the following requirements: -// -// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores -// (_), or dashes (-) -// -// * Start with a letter or number, and end with a letter or number -// -// * Be between 3 and 128 characters -// -// * Have no adjacent periods, underscores or dashes. Names like my-_namespace -// and my--namespace are invalid. -// -// * Not be in IP address format (for example, 192.168.5.4) -// -// * ErrCodeInvalidTagParameterException "InvalidTagParameterException" -// This exception is thrown when the key or value specified for the tag does -// not match the regular expression ^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// This exception is thrown when the requested operation is not supported. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// This exception is thrown when the requested operation is not permitted. -// -// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" -// This exception is thrown when the AWS account making the request to create -// or update an organization trail is not the master account for an organization -// in AWS Organizations. For more information, see Prepare For Creating a Trail -// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags -func (c *CloudTrail) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - return out, req.Send() -} - -// RemoveTagsWithContext is the same as RemoveTags with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudTrail) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartLogging = "StartLogging" - -// StartLoggingRequest generates a "aws/request.Request" representing the -// client's request for the StartLogging operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartLogging for more information on using the StartLogging -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartLoggingRequest method. -// req, resp := client.StartLoggingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging -func (c *CloudTrail) StartLoggingRequest(input *StartLoggingInput) (req *request.Request, output *StartLoggingOutput) { - op := &request.Operation{ - Name: opStartLogging, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartLoggingInput{} - } - - output = &StartLoggingOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartLogging API operation for AWS CloudTrail. -// -// Starts the recording of AWS API calls and log file delivery for a trail. -// For a trail that is enabled in all regions, this operation must be called -// from the region in which the trail was created. This operation cannot be -// called on the shadow trails (replicated trails in other regions) of a trail -// that is enabled in all regions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudTrail's -// API operation StartLogging for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTrailNotFoundException "TrailNotFoundException" -// This exception is thrown when the trail with the given name is not found. -// -// * ErrCodeInvalidTrailNameException "InvalidTrailNameException" -// This exception is thrown when the provided trail name is not valid. Trail -// names must meet the following requirements: -// -// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores -// (_), or dashes (-) -// -// * Start with a letter or number, and end with a letter or number -// -// * Be between 3 and 128 characters -// -// * Have no adjacent periods, underscores or dashes. Names like my-_namespace -// and my--namespace are invalid. -// -// * Not be in IP address format (for example, 192.168.5.4) -// -// * ErrCodeInvalidHomeRegionException "InvalidHomeRegionException" -// This exception is thrown when an operation is called on a trail from a region -// other than the region in which the trail was created. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// This exception is thrown when the requested operation is not supported. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// This exception is thrown when the requested operation is not permitted. -// -// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" -// This exception is thrown when the AWS account making the request to create -// or update an organization trail is not the master account for an organization -// in AWS Organizations. For more information, see Prepare For Creating a Trail -// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException" -// This exception is thrown when the IAM user or role that is used to create -// the organization trail is lacking one or more required permissions for creating -// an organization trail in a required service. For more information, see Prepare -// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging -func (c *CloudTrail) StartLogging(input *StartLoggingInput) (*StartLoggingOutput, error) { - req, out := c.StartLoggingRequest(input) - return out, req.Send() -} - -// StartLoggingWithContext is the same as StartLogging with the addition of -// the ability to pass a context and additional request options. -// -// See StartLogging for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudTrail) StartLoggingWithContext(ctx aws.Context, input *StartLoggingInput, opts ...request.Option) (*StartLoggingOutput, error) { - req, out := c.StartLoggingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopLogging = "StopLogging" - -// StopLoggingRequest generates a "aws/request.Request" representing the -// client's request for the StopLogging operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopLogging for more information on using the StopLogging -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopLoggingRequest method. -// req, resp := client.StopLoggingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging -func (c *CloudTrail) StopLoggingRequest(input *StopLoggingInput) (req *request.Request, output *StopLoggingOutput) { - op := &request.Operation{ - Name: opStopLogging, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopLoggingInput{} - } - - output = &StopLoggingOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopLogging API operation for AWS CloudTrail. -// -// Suspends the recording of AWS API calls and log file delivery for the specified -// trail. Under most circumstances, there is no need to use this action. You -// can update a trail without stopping it first. This action is the only way -// to stop recording. For a trail enabled in all regions, this operation must -// be called from the region in which the trail was created, or an InvalidHomeRegionException -// will occur. This operation cannot be called on the shadow trails (replicated -// trails in other regions) of a trail enabled in all regions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudTrail's -// API operation StopLogging for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTrailNotFoundException "TrailNotFoundException" -// This exception is thrown when the trail with the given name is not found. -// -// * ErrCodeInvalidTrailNameException "InvalidTrailNameException" -// This exception is thrown when the provided trail name is not valid. Trail -// names must meet the following requirements: -// -// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores -// (_), or dashes (-) -// -// * Start with a letter or number, and end with a letter or number -// -// * Be between 3 and 128 characters -// -// * Have no adjacent periods, underscores or dashes. Names like my-_namespace -// and my--namespace are invalid. -// -// * Not be in IP address format (for example, 192.168.5.4) -// -// * ErrCodeInvalidHomeRegionException "InvalidHomeRegionException" -// This exception is thrown when an operation is called on a trail from a region -// other than the region in which the trail was created. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// This exception is thrown when the requested operation is not supported. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// This exception is thrown when the requested operation is not permitted. -// -// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" -// This exception is thrown when the AWS account making the request to create -// or update an organization trail is not the master account for an organization -// in AWS Organizations. For more information, see Prepare For Creating a Trail -// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException" -// This exception is thrown when the IAM user or role that is used to create -// the organization trail is lacking one or more required permissions for creating -// an organization trail in a required service. For more information, see Prepare -// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging -func (c *CloudTrail) StopLogging(input *StopLoggingInput) (*StopLoggingOutput, error) { - req, out := c.StopLoggingRequest(input) - return out, req.Send() -} - -// StopLoggingWithContext is the same as StopLogging with the addition of -// the ability to pass a context and additional request options. -// -// See StopLogging for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudTrail) StopLoggingWithContext(ctx aws.Context, input *StopLoggingInput, opts ...request.Option) (*StopLoggingOutput, error) { - req, out := c.StopLoggingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateTrail = "UpdateTrail" - -// UpdateTrailRequest generates a "aws/request.Request" representing the -// client's request for the UpdateTrail operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateTrail for more information on using the UpdateTrail -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateTrailRequest method. -// req, resp := client.UpdateTrailRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail -func (c *CloudTrail) UpdateTrailRequest(input *UpdateTrailInput) (req *request.Request, output *UpdateTrailOutput) { - op := &request.Operation{ - Name: opUpdateTrail, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateTrailInput{} - } - - output = &UpdateTrailOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateTrail API operation for AWS CloudTrail. -// -// Updates the settings that specify delivery of log files. Changes to a trail -// do not require stopping the CloudTrail service. Use this action to designate -// an existing bucket for log delivery. If the existing bucket has previously -// been a target for CloudTrail log files, an IAM policy exists for the bucket. -// UpdateTrail must be called from the region in which the trail was created; -// otherwise, an InvalidHomeRegionException is thrown. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CloudTrail's -// API operation UpdateTrail for usage and error information. -// -// Returned Error Codes: -// * ErrCodeS3BucketDoesNotExistException "S3BucketDoesNotExistException" -// This exception is thrown when the specified S3 bucket does not exist. -// -// * ErrCodeInsufficientS3BucketPolicyException "InsufficientS3BucketPolicyException" -// This exception is thrown when the policy on the S3 bucket is not sufficient. -// -// * ErrCodeInsufficientSnsTopicPolicyException "InsufficientSnsTopicPolicyException" -// This exception is thrown when the policy on the SNS topic is not sufficient. -// -// * ErrCodeInsufficientEncryptionPolicyException "InsufficientEncryptionPolicyException" -// This exception is thrown when the policy on the S3 bucket or KMS key is not -// sufficient. -// -// * ErrCodeTrailNotFoundException "TrailNotFoundException" -// This exception is thrown when the trail with the given name is not found. -// -// * ErrCodeInvalidS3BucketNameException "InvalidS3BucketNameException" -// This exception is thrown when the provided S3 bucket name is not valid. -// -// * ErrCodeInvalidS3PrefixException "InvalidS3PrefixException" -// This exception is thrown when the provided S3 prefix is not valid. -// -// * ErrCodeInvalidSnsTopicNameException "InvalidSnsTopicNameException" -// This exception is thrown when the provided SNS topic name is not valid. -// -// * ErrCodeInvalidKmsKeyIdException "InvalidKmsKeyIdException" -// This exception is thrown when the KMS key ARN is invalid. -// -// * ErrCodeInvalidTrailNameException "InvalidTrailNameException" -// This exception is thrown when the provided trail name is not valid. Trail -// names must meet the following requirements: -// -// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores -// (_), or dashes (-) -// -// * Start with a letter or number, and end with a letter or number -// -// * Be between 3 and 128 characters -// -// * Have no adjacent periods, underscores or dashes. Names like my-_namespace -// and my--namespace are invalid. -// -// * Not be in IP address format (for example, 192.168.5.4) -// -// * ErrCodeTrailNotProvidedException "TrailNotProvidedException" -// This exception is deprecated. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// This exception is thrown when the combination of parameters provided is not -// valid. -// -// * ErrCodeInvalidHomeRegionException "InvalidHomeRegionException" -// This exception is thrown when an operation is called on a trail from a region -// other than the region in which the trail was created. -// -// * ErrCodeKmsKeyNotFoundException "KmsKeyNotFoundException" -// This exception is thrown when the KMS key does not exist, or when the S3 -// bucket and the KMS key are not in the same region. -// -// * ErrCodeKmsKeyDisabledException "KmsKeyDisabledException" -// This exception is deprecated. -// -// * ErrCodeKmsException "KmsException" -// This exception is thrown when there is an issue with the specified KMS key -// and the trail can’t be updated. -// -// * ErrCodeInvalidCloudWatchLogsLogGroupArnException "InvalidCloudWatchLogsLogGroupArnException" -// This exception is thrown when the provided CloudWatch log group is not valid. -// -// * ErrCodeInvalidCloudWatchLogsRoleArnException "InvalidCloudWatchLogsRoleArnException" -// This exception is thrown when the provided role is not valid. -// -// * ErrCodeCloudWatchLogsDeliveryUnavailableException "CloudWatchLogsDeliveryUnavailableException" -// Cannot set a CloudWatch Logs delivery for this region. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// This exception is thrown when the requested operation is not supported. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// This exception is thrown when the requested operation is not permitted. -// -// * ErrCodeAccessNotEnabledException "CloudTrailAccessNotEnabledException" -// This exception is thrown when trusted access has not been enabled between -// AWS CloudTrail and AWS Organizations. For more information, see Enabling -// Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) -// and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException" -// This exception is thrown when the IAM user or role that is used to create -// the organization trail is lacking one or more required permissions for creating -// an organization trail in a required service. For more information, see Prepare -// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// * ErrCodeOrganizationsNotInUseException "OrganizationsNotInUseException" -// This exception is thrown when the request is made from an AWS account that -// is not a member of an organization. To make this request, sign in using the -// credentials of an account that belongs to an organization. -// -// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" -// This exception is thrown when the AWS account making the request to create -// or update an organization trail is not the master account for an organization -// in AWS Organizations. For more information, see Prepare For Creating a Trail -// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// * ErrCodeOrganizationNotInAllFeaturesModeException "OrganizationNotInAllFeaturesModeException" -// This exception is thrown when AWS Organizations is not configured to support -// all features. All features must be enabled in AWS Organization to support -// creating an organization trail. For more information, see Prepare For Creating -// a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail -func (c *CloudTrail) UpdateTrail(input *UpdateTrailInput) (*UpdateTrailOutput, error) { - req, out := c.UpdateTrailRequest(input) - return out, req.Send() -} - -// UpdateTrailWithContext is the same as UpdateTrail with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateTrail for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudTrail) UpdateTrailWithContext(ctx aws.Context, input *UpdateTrailInput, opts ...request.Option) (*UpdateTrailOutput, error) { - req, out := c.UpdateTrailRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Specifies the tags to add to a trail. -type AddTagsInput struct { - _ struct{} `type:"structure"` - - // Specifies the ARN of the trail to which one or more tags will be added. The - // format of a trail ARN is: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` - - // Contains a list of CloudTrail tags, up to a limit of 50 - TagsList []*Tag `type:"list"` -} - -// String returns the string representation -func (s AddTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.TagsList != nil { - for i, v := range s.TagsList { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *AddTagsInput) SetResourceId(v string) *AddTagsInput { - s.ResourceId = &v - return s -} - -// SetTagsList sets the TagsList field's value. -func (s *AddTagsInput) SetTagsList(v []*Tag) *AddTagsInput { - s.TagsList = v - return s -} - -// Returns the objects or data listed below if successful. Otherwise, returns -// an error. -type AddTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsOutput) GoString() string { - return s.String() -} - -// Specifies the settings for each trail. -type CreateTrailInput struct { - _ struct{} `type:"structure"` - - // Specifies a log group name using an Amazon Resource Name (ARN), a unique - // identifier that represents the log group to which CloudTrail logs will be - // delivered. Not required unless you specify CloudWatchLogsRoleArn. - CloudWatchLogsLogGroupArn *string `type:"string"` - - // Specifies the role for the CloudWatch Logs endpoint to assume to write to - // a user's log group. - CloudWatchLogsRoleArn *string `type:"string"` - - // Specifies whether log file integrity validation is enabled. The default is - // false. - // - // When you disable log file integrity validation, the chain of digest files - // is broken after one hour. CloudTrail will not create digest files for log - // files that were delivered during a period in which log file integrity validation - // was disabled. For example, if you enable log file integrity validation at - // noon on January 1, disable it at noon on January 2, and re-enable it at noon - // on January 10, digest files will not be created for the log files delivered - // from noon on January 2 to noon on January 10. The same applies whenever you - // stop CloudTrail logging or delete a trail. - EnableLogFileValidation *bool `type:"boolean"` - - // Specifies whether the trail is publishing events from global services such - // as IAM to the log files. - IncludeGlobalServiceEvents *bool `type:"boolean"` - - // Specifies whether the trail is created in the current region or in all regions. - // The default is false. - IsMultiRegionTrail *bool `type:"boolean"` - - // Specifies whether the trail is created for all accounts in an organization - // in AWS Organizations, or only for the current AWS account. The default is - // false, and cannot be true unless the call is made on behalf of an AWS account - // that is the master account for an organization in AWS Organizations. - IsOrganizationTrail *bool `type:"boolean"` - - // Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. - // The value can be an alias name prefixed by "alias/", a fully specified ARN - // to an alias, a fully specified ARN to a key, or a globally unique identifier. - // - // Examples: - // - // * alias/MyAliasName - // - // * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName - // - // * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 - // - // * 12345678-1234-1234-1234-123456789012 - KmsKeyId *string `type:"string"` - - // Specifies the name of the trail. The name must meet the following requirements: - // - // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores - // (_), or dashes (-) - // - // * Start with a letter or number, and end with a letter or number - // - // * Be between 3 and 128 characters - // - // * Have no adjacent periods, underscores or dashes. Names like my-_namespace - // and my--namespace are invalid. - // - // * Not be in IP address format (for example, 192.168.5.4) - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // Specifies the name of the Amazon S3 bucket designated for publishing log - // files. See Amazon S3 Bucket Naming Requirements (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html). - // - // S3BucketName is a required field - S3BucketName *string `type:"string" required:"true"` - - // Specifies the Amazon S3 key prefix that comes after the name of the bucket - // you have designated for log file delivery. For more information, see Finding - // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html). - // The maximum length is 200 characters. - S3KeyPrefix *string `type:"string"` - - // Specifies the name of the Amazon SNS topic defined for notification of log - // file delivery. The maximum length is 256 characters. - SnsTopicName *string `type:"string"` -} - -// String returns the string representation -func (s CreateTrailInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTrailInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTrailInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTrailInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.S3BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("S3BucketName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value. -func (s *CreateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailInput { - s.CloudWatchLogsLogGroupArn = &v - return s -} - -// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value. -func (s *CreateTrailInput) SetCloudWatchLogsRoleArn(v string) *CreateTrailInput { - s.CloudWatchLogsRoleArn = &v - return s -} - -// SetEnableLogFileValidation sets the EnableLogFileValidation field's value. -func (s *CreateTrailInput) SetEnableLogFileValidation(v bool) *CreateTrailInput { - s.EnableLogFileValidation = &v - return s -} - -// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value. -func (s *CreateTrailInput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailInput { - s.IncludeGlobalServiceEvents = &v - return s -} - -// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value. -func (s *CreateTrailInput) SetIsMultiRegionTrail(v bool) *CreateTrailInput { - s.IsMultiRegionTrail = &v - return s -} - -// SetIsOrganizationTrail sets the IsOrganizationTrail field's value. -func (s *CreateTrailInput) SetIsOrganizationTrail(v bool) *CreateTrailInput { - s.IsOrganizationTrail = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateTrailInput) SetKmsKeyId(v string) *CreateTrailInput { - s.KmsKeyId = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateTrailInput) SetName(v string) *CreateTrailInput { - s.Name = &v - return s -} - -// SetS3BucketName sets the S3BucketName field's value. -func (s *CreateTrailInput) SetS3BucketName(v string) *CreateTrailInput { - s.S3BucketName = &v - return s -} - -// SetS3KeyPrefix sets the S3KeyPrefix field's value. -func (s *CreateTrailInput) SetS3KeyPrefix(v string) *CreateTrailInput { - s.S3KeyPrefix = &v - return s -} - -// SetSnsTopicName sets the SnsTopicName field's value. -func (s *CreateTrailInput) SetSnsTopicName(v string) *CreateTrailInput { - s.SnsTopicName = &v - return s -} - -// Returns the objects or data listed below if successful. Otherwise, returns -// an error. -type CreateTrailOutput struct { - _ struct{} `type:"structure"` - - // Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail - // logs will be delivered. - CloudWatchLogsLogGroupArn *string `type:"string"` - - // Specifies the role for the CloudWatch Logs endpoint to assume to write to - // a user's log group. - CloudWatchLogsRoleArn *string `type:"string"` - - // Specifies whether the trail is publishing events from global services such - // as IAM to the log files. - IncludeGlobalServiceEvents *bool `type:"boolean"` - - // Specifies whether the trail exists in one region or in all regions. - IsMultiRegionTrail *bool `type:"boolean"` - - // Specifies whether the trail is an organization trail. - IsOrganizationTrail *bool `type:"boolean"` - - // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. - // The value is a fully specified ARN to a KMS key in the format: - // - // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 - KmsKeyId *string `type:"string"` - - // Specifies whether log file integrity validation is enabled. - LogFileValidationEnabled *bool `type:"boolean"` - - // Specifies the name of the trail. - Name *string `type:"string"` - - // Specifies the name of the Amazon S3 bucket designated for publishing log - // files. - S3BucketName *string `type:"string"` - - // Specifies the Amazon S3 key prefix that comes after the name of the bucket - // you have designated for log file delivery. For more information, see Finding - // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html). - S3KeyPrefix *string `type:"string"` - - // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications - // when log files are delivered. The format of a topic ARN is: - // - // arn:aws:sns:us-east-2:123456789012:MyTopic - SnsTopicARN *string `type:"string"` - - // This field is deprecated. Use SnsTopicARN. - // - // Deprecated: SnsTopicName has been deprecated - SnsTopicName *string `deprecated:"true" type:"string"` - - // Specifies the ARN of the trail that was created. The format of a trail ARN - // is: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - TrailARN *string `type:"string"` -} - -// String returns the string representation -func (s CreateTrailOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTrailOutput) GoString() string { - return s.String() -} - -// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value. -func (s *CreateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailOutput { - s.CloudWatchLogsLogGroupArn = &v - return s -} - -// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value. -func (s *CreateTrailOutput) SetCloudWatchLogsRoleArn(v string) *CreateTrailOutput { - s.CloudWatchLogsRoleArn = &v - return s -} - -// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value. -func (s *CreateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailOutput { - s.IncludeGlobalServiceEvents = &v - return s -} - -// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value. -func (s *CreateTrailOutput) SetIsMultiRegionTrail(v bool) *CreateTrailOutput { - s.IsMultiRegionTrail = &v - return s -} - -// SetIsOrganizationTrail sets the IsOrganizationTrail field's value. -func (s *CreateTrailOutput) SetIsOrganizationTrail(v bool) *CreateTrailOutput { - s.IsOrganizationTrail = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateTrailOutput) SetKmsKeyId(v string) *CreateTrailOutput { - s.KmsKeyId = &v - return s -} - -// SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value. -func (s *CreateTrailOutput) SetLogFileValidationEnabled(v bool) *CreateTrailOutput { - s.LogFileValidationEnabled = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateTrailOutput) SetName(v string) *CreateTrailOutput { - s.Name = &v - return s -} - -// SetS3BucketName sets the S3BucketName field's value. -func (s *CreateTrailOutput) SetS3BucketName(v string) *CreateTrailOutput { - s.S3BucketName = &v - return s -} - -// SetS3KeyPrefix sets the S3KeyPrefix field's value. -func (s *CreateTrailOutput) SetS3KeyPrefix(v string) *CreateTrailOutput { - s.S3KeyPrefix = &v - return s -} - -// SetSnsTopicARN sets the SnsTopicARN field's value. -func (s *CreateTrailOutput) SetSnsTopicARN(v string) *CreateTrailOutput { - s.SnsTopicARN = &v - return s -} - -// SetSnsTopicName sets the SnsTopicName field's value. -func (s *CreateTrailOutput) SetSnsTopicName(v string) *CreateTrailOutput { - s.SnsTopicName = &v - return s -} - -// SetTrailARN sets the TrailARN field's value. -func (s *CreateTrailOutput) SetTrailARN(v string) *CreateTrailOutput { - s.TrailARN = &v - return s -} - -// The Amazon S3 buckets or AWS Lambda functions that you specify in your event -// selectors for your trail to log data events. Data events provide insight -// into the resource operations performed on or within a resource itself. These -// are also known as data plane operations. You can specify up to 250 data resources -// for a trail. -// -// The total number of allowed data resources is 250. This number can be distributed -// between 1 and 5 event selectors, but the total cannot exceed 250 across all -// selectors. -// -// The following example demonstrates how logging works when you configure logging -// of all data events for an S3 bucket named bucket-1. In this example, the -// CloudTrail user spcified an empty prefix, and the option to log both Read -// and Write data events. -// -// A user uploads an image file to bucket-1. -// -// The PutObject API operation is an Amazon S3 object-level API. It is recorded -// as a data event in CloudTrail. Because the CloudTrail user specified an S3 -// bucket with an empty prefix, events that occur on any object in that bucket -// are logged. The trail processes and logs the event. -// -// A user uploads an object to an Amazon S3 bucket named arn:aws:s3:::bucket-2. -// -// The PutObject API operation occurred for an object in an S3 bucket that the -// CloudTrail user didn't specify for the trail. The trail doesn’t log the event. -// -// The following example demonstrates how logging works when you configure logging -// of AWS Lambda data events for a Lambda function named MyLambdaFunction, but -// not for all AWS Lambda functions. -// -// A user runs a script that includes a call to the MyLambdaFunction function -// and the MyOtherLambdaFunction function. -// -// The Invoke API operation on MyLambdaFunction is an AWS Lambda API. It is -// recorded as a data event in CloudTrail. Because the CloudTrail user specified -// logging data events for MyLambdaFunction, any invocations of that function -// are logged. The trail processes and logs the event. -// -// The Invoke API operation on MyOtherLambdaFunction is an AWS Lambda API. Because -// the CloudTrail user did not specify logging data events for all Lambda functions, -// the Invoke operation for MyOtherLambdaFunction does not match the function -// specified for the trail. The trail doesn’t log the event. -type DataResource struct { - _ struct{} `type:"structure"` - - // The resource type in which you want to log data events. You can specify AWS::S3::Object - // or AWS::Lambda::Function resources. - Type *string `type:"string"` - - // An array of Amazon Resource Name (ARN) strings or partial ARN strings for - // the specified objects. - // - // * To log data events for all objects in all S3 buckets in your AWS account, - // specify the prefix as arn:aws:s3:::. - // - // This will also enable logging of data event activity performed by any user - // or role in your AWS account, even if that activity is performed on a bucket - // that belongs to another AWS account. - // - // * To log data events for all objects in all S3 buckets that include my-bucket - // in their names, specify the prefix as aws:s3:::my-bucket. The trail logs - // data events for all objects in all buckets whose name contains a match - // for my-bucket. - // - // * To log data events for all objects in an S3 bucket, specify the bucket - // and an empty object prefix such as arn:aws:s3:::bucket-1/. The trail logs - // data events for all objects in this S3 bucket. - // - // * To log data events for specific objects, specify the S3 bucket and object - // prefix such as arn:aws:s3:::bucket-1/example-images. The trail logs data - // events for objects in this S3 bucket that match the prefix. - // - // * To log data events for all functions in your AWS account, specify the - // prefix as arn:aws:lambda. - // - // This will also enable logging of Invoke activity performed by any user or - // role in your AWS account, even if that activity is performed on a function - // that belongs to another AWS account. - // - // * To log data eents for a specific Lambda function, specify the function - // ARN. - // - // Lambda function ARNs are exact. Unlike S3, you cannot use matching. For example, - // if you specify a function ARN arn:aws:lambda:us-west-2:111111111111:function:helloworld, - // data events will only be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld. - // They will not be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld2. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s DataResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DataResource) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *DataResource) SetType(v string) *DataResource { - s.Type = &v - return s -} - -// SetValues sets the Values field's value. -func (s *DataResource) SetValues(v []*string) *DataResource { - s.Values = v - return s -} - -// The request that specifies the name of a trail to delete. -type DeleteTrailInput struct { - _ struct{} `type:"structure"` - - // Specifies the name or the CloudTrail ARN of the trail to be deleted. The - // format of a trail ARN is: arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTrailInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTrailInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTrailInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTrailInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteTrailInput) SetName(v string) *DeleteTrailInput { - s.Name = &v - return s -} - -// Returns the objects or data listed below if successful. Otherwise, returns -// an error. -type DeleteTrailOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTrailOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTrailOutput) GoString() string { - return s.String() -} - -// Returns information about the trail. -type DescribeTrailsInput struct { - _ struct{} `type:"structure"` - - // Specifies whether to include shadow trails in the response. A shadow trail - // is the replication in a region of a trail that was created in a different - // region, or in the case of an organization trail, the replication of an organization - // trail in member accounts. If you do not include shadow trails, organization - // trails in a member account and region replication trails will not be returned. - // The default is true. - IncludeShadowTrails *bool `locationName:"includeShadowTrails" type:"boolean"` - - // Specifies a list of trail names, trail ARNs, or both, of the trails to describe. - // The format of a trail ARN is: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - // - // If an empty list is specified, information for the trail in the current region - // is returned. - // - // * If an empty list is specified and IncludeShadowTrails is false, then - // information for all trails in the current region is returned. - // - // * If an empty list is specified and IncludeShadowTrails is null or true, - // then information for all trails in the current region and any associated - // shadow trails in other regions is returned. - // - // If one or more trail names are specified, information is returned only if - // the names match the names of trails belonging only to the current region. - // To return information about a trail in another region, you must specify its - // trail ARN. - TrailNameList []*string `locationName:"trailNameList" type:"list"` -} - -// String returns the string representation -func (s DescribeTrailsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTrailsInput) GoString() string { - return s.String() -} - -// SetIncludeShadowTrails sets the IncludeShadowTrails field's value. -func (s *DescribeTrailsInput) SetIncludeShadowTrails(v bool) *DescribeTrailsInput { - s.IncludeShadowTrails = &v - return s -} - -// SetTrailNameList sets the TrailNameList field's value. -func (s *DescribeTrailsInput) SetTrailNameList(v []*string) *DescribeTrailsInput { - s.TrailNameList = v - return s -} - -// Returns the objects or data listed below if successful. Otherwise, returns -// an error. -type DescribeTrailsOutput struct { - _ struct{} `type:"structure"` - - // The list of trail objects. - TrailList []*Trail `locationName:"trailList" type:"list"` -} - -// String returns the string representation -func (s DescribeTrailsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTrailsOutput) GoString() string { - return s.String() -} - -// SetTrailList sets the TrailList field's value. -func (s *DescribeTrailsOutput) SetTrailList(v []*Trail) *DescribeTrailsOutput { - s.TrailList = v - return s -} - -// Contains information about an event that was returned by a lookup request. -// The result includes a representation of a CloudTrail event. -type Event struct { - _ struct{} `type:"structure"` - - // The AWS access key ID that was used to sign the request. If the request was - // made with temporary security credentials, this is the access key ID of the - // temporary credentials. - AccessKeyId *string `type:"string"` - - // A JSON string that contains a representation of the event returned. - CloudTrailEvent *string `type:"string"` - - // The CloudTrail ID of the event returned. - EventId *string `type:"string"` - - // The name of the event returned. - EventName *string `type:"string"` - - // The AWS service that the request was made to. - EventSource *string `type:"string"` - - // The date and time of the event returned. - EventTime *time.Time `type:"timestamp"` - - // Information about whether the event is a write event or a read event. - ReadOnly *string `type:"string"` - - // A list of resources referenced by the event returned. - Resources []*Resource `type:"list"` - - // A user name or role name of the requester that called the API in the event - // returned. - Username *string `type:"string"` -} - -// String returns the string representation -func (s Event) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Event) GoString() string { - return s.String() -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *Event) SetAccessKeyId(v string) *Event { - s.AccessKeyId = &v - return s -} - -// SetCloudTrailEvent sets the CloudTrailEvent field's value. -func (s *Event) SetCloudTrailEvent(v string) *Event { - s.CloudTrailEvent = &v - return s -} - -// SetEventId sets the EventId field's value. -func (s *Event) SetEventId(v string) *Event { - s.EventId = &v - return s -} - -// SetEventName sets the EventName field's value. -func (s *Event) SetEventName(v string) *Event { - s.EventName = &v - return s -} - -// SetEventSource sets the EventSource field's value. -func (s *Event) SetEventSource(v string) *Event { - s.EventSource = &v - return s -} - -// SetEventTime sets the EventTime field's value. -func (s *Event) SetEventTime(v time.Time) *Event { - s.EventTime = &v - return s -} - -// SetReadOnly sets the ReadOnly field's value. -func (s *Event) SetReadOnly(v string) *Event { - s.ReadOnly = &v - return s -} - -// SetResources sets the Resources field's value. -func (s *Event) SetResources(v []*Resource) *Event { - s.Resources = v - return s -} - -// SetUsername sets the Username field's value. -func (s *Event) SetUsername(v string) *Event { - s.Username = &v - return s -} - -// Use event selectors to further specify the management and data event settings -// for your trail. By default, trails created without specific event selectors -// will be configured to log all read and write management events, and no data -// events. When an event occurs in your account, CloudTrail evaluates the event -// selector for all trails. For each trail, if the event matches any event selector, -// the trail processes and logs the event. If the event doesn't match any event -// selector, the trail doesn't log the event. -// -// You can configure up to five event selectors for a trail. -type EventSelector struct { - _ struct{} `type:"structure"` - - // CloudTrail supports data event logging for Amazon S3 objects and AWS Lambda - // functions. You can specify up to 250 resources for an individual event selector, - // but the total number of data resources cannot exceed 250 across all event - // selectors in a trail. This limit does not apply if you configure resource - // logging for all data events. - // - // For more information, see Data Events (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-data-events) - // and Limits in AWS CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html) - // in the AWS CloudTrail User Guide. - DataResources []*DataResource `type:"list"` - - // Specify if you want your event selector to include management events for - // your trail. - // - // For more information, see Management Events (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-management-events) - // in the AWS CloudTrail User Guide. - // - // By default, the value is true. - IncludeManagementEvents *bool `type:"boolean"` - - // Specify if you want your trail to log read-only events, write-only events, - // or all. For example, the EC2 GetConsoleOutput is a read-only API operation - // and RunInstances is a write-only API operation. - // - // By default, the value is All. - ReadWriteType *string `type:"string" enum:"ReadWriteType"` -} - -// String returns the string representation -func (s EventSelector) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventSelector) GoString() string { - return s.String() -} - -// SetDataResources sets the DataResources field's value. -func (s *EventSelector) SetDataResources(v []*DataResource) *EventSelector { - s.DataResources = v - return s -} - -// SetIncludeManagementEvents sets the IncludeManagementEvents field's value. -func (s *EventSelector) SetIncludeManagementEvents(v bool) *EventSelector { - s.IncludeManagementEvents = &v - return s -} - -// SetReadWriteType sets the ReadWriteType field's value. -func (s *EventSelector) SetReadWriteType(v string) *EventSelector { - s.ReadWriteType = &v - return s -} - -type GetEventSelectorsInput struct { - _ struct{} `type:"structure"` - - // Specifies the name of the trail or trail ARN. If you specify a trail name, - // the string must meet the following requirements: - // - // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores - // (_), or dashes (-) - // - // * Start with a letter or number, and end with a letter or number - // - // * Be between 3 and 128 characters - // - // * Have no adjacent periods, underscores or dashes. Names like my-_namespace - // and my--namespace are not valid. - // - // * Not be in IP address format (for example, 192.168.5.4) - // - // If you specify a trail ARN, it must be in the format: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - // - // TrailName is a required field - TrailName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetEventSelectorsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEventSelectorsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetEventSelectorsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetEventSelectorsInput"} - if s.TrailName == nil { - invalidParams.Add(request.NewErrParamRequired("TrailName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTrailName sets the TrailName field's value. -func (s *GetEventSelectorsInput) SetTrailName(v string) *GetEventSelectorsInput { - s.TrailName = &v - return s -} - -type GetEventSelectorsOutput struct { - _ struct{} `type:"structure"` - - // The event selectors that are configured for the trail. - EventSelectors []*EventSelector `type:"list"` - - // The specified trail ARN that has the event selectors. - TrailARN *string `type:"string"` -} - -// String returns the string representation -func (s GetEventSelectorsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEventSelectorsOutput) GoString() string { - return s.String() -} - -// SetEventSelectors sets the EventSelectors field's value. -func (s *GetEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *GetEventSelectorsOutput { - s.EventSelectors = v - return s -} - -// SetTrailARN sets the TrailARN field's value. -func (s *GetEventSelectorsOutput) SetTrailARN(v string) *GetEventSelectorsOutput { - s.TrailARN = &v - return s -} - -// The name of a trail about which you want the current status. -type GetTrailStatusInput struct { - _ struct{} `type:"structure"` - - // Specifies the name or the CloudTrail ARN of the trail for which you are requesting - // status. To get the status of a shadow trail (a replication of the trail in - // another region), you must specify its ARN. The format of a trail ARN is: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTrailStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTrailStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTrailStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTrailStatusInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetTrailStatusInput) SetName(v string) *GetTrailStatusInput { - s.Name = &v - return s -} - -// Returns the objects or data listed below if successful. Otherwise, returns -// an error. -type GetTrailStatusOutput struct { - _ struct{} `type:"structure"` - - // Whether the CloudTrail is currently logging AWS API calls. - IsLogging *bool `type:"boolean"` - - // Displays any CloudWatch Logs error that CloudTrail encountered when attempting - // to deliver logs to CloudWatch Logs. - LatestCloudWatchLogsDeliveryError *string `type:"string"` - - // Displays the most recent date and time when CloudTrail delivered logs to - // CloudWatch Logs. - LatestCloudWatchLogsDeliveryTime *time.Time `type:"timestamp"` - - // This field is deprecated. - LatestDeliveryAttemptSucceeded *string `type:"string"` - - // This field is deprecated. - LatestDeliveryAttemptTime *string `type:"string"` - - // Displays any Amazon S3 error that CloudTrail encountered when attempting - // to deliver log files to the designated bucket. For more information see the - // topic Error Responses (http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html) - // in the Amazon S3 API Reference. - // - // This error occurs only when there is a problem with the destination S3 bucket - // and will not occur for timeouts. To resolve the issue, create a new bucket - // and call UpdateTrail to specify the new bucket, or fix the existing objects - // so that CloudTrail can again write to the bucket. - LatestDeliveryError *string `type:"string"` - - // Specifies the date and time that CloudTrail last delivered log files to an - // account's Amazon S3 bucket. - LatestDeliveryTime *time.Time `type:"timestamp"` - - // Displays any Amazon S3 error that CloudTrail encountered when attempting - // to deliver a digest file to the designated bucket. For more information see - // the topic Error Responses (http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html) - // in the Amazon S3 API Reference. - // - // This error occurs only when there is a problem with the destination S3 bucket - // and will not occur for timeouts. To resolve the issue, create a new bucket - // and call UpdateTrail to specify the new bucket, or fix the existing objects - // so that CloudTrail can again write to the bucket. - LatestDigestDeliveryError *string `type:"string"` - - // Specifies the date and time that CloudTrail last delivered a digest file - // to an account's Amazon S3 bucket. - LatestDigestDeliveryTime *time.Time `type:"timestamp"` - - // This field is deprecated. - LatestNotificationAttemptSucceeded *string `type:"string"` - - // This field is deprecated. - LatestNotificationAttemptTime *string `type:"string"` - - // Displays any Amazon SNS error that CloudTrail encountered when attempting - // to send a notification. For more information about Amazon SNS errors, see - // the Amazon SNS Developer Guide (http://docs.aws.amazon.com/sns/latest/dg/welcome.html). - LatestNotificationError *string `type:"string"` - - // Specifies the date and time of the most recent Amazon SNS notification that - // CloudTrail has written a new log file to an account's Amazon S3 bucket. - LatestNotificationTime *time.Time `type:"timestamp"` - - // Specifies the most recent date and time when CloudTrail started recording - // API calls for an AWS account. - StartLoggingTime *time.Time `type:"timestamp"` - - // Specifies the most recent date and time when CloudTrail stopped recording - // API calls for an AWS account. - StopLoggingTime *time.Time `type:"timestamp"` - - // This field is deprecated. - TimeLoggingStarted *string `type:"string"` - - // This field is deprecated. - TimeLoggingStopped *string `type:"string"` -} - -// String returns the string representation -func (s GetTrailStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTrailStatusOutput) GoString() string { - return s.String() -} - -// SetIsLogging sets the IsLogging field's value. -func (s *GetTrailStatusOutput) SetIsLogging(v bool) *GetTrailStatusOutput { - s.IsLogging = &v - return s -} - -// SetLatestCloudWatchLogsDeliveryError sets the LatestCloudWatchLogsDeliveryError field's value. -func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryError(v string) *GetTrailStatusOutput { - s.LatestCloudWatchLogsDeliveryError = &v - return s -} - -// SetLatestCloudWatchLogsDeliveryTime sets the LatestCloudWatchLogsDeliveryTime field's value. -func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryTime(v time.Time) *GetTrailStatusOutput { - s.LatestCloudWatchLogsDeliveryTime = &v - return s -} - -// SetLatestDeliveryAttemptSucceeded sets the LatestDeliveryAttemptSucceeded field's value. -func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptSucceeded(v string) *GetTrailStatusOutput { - s.LatestDeliveryAttemptSucceeded = &v - return s -} - -// SetLatestDeliveryAttemptTime sets the LatestDeliveryAttemptTime field's value. -func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptTime(v string) *GetTrailStatusOutput { - s.LatestDeliveryAttemptTime = &v - return s -} - -// SetLatestDeliveryError sets the LatestDeliveryError field's value. -func (s *GetTrailStatusOutput) SetLatestDeliveryError(v string) *GetTrailStatusOutput { - s.LatestDeliveryError = &v - return s -} - -// SetLatestDeliveryTime sets the LatestDeliveryTime field's value. -func (s *GetTrailStatusOutput) SetLatestDeliveryTime(v time.Time) *GetTrailStatusOutput { - s.LatestDeliveryTime = &v - return s -} - -// SetLatestDigestDeliveryError sets the LatestDigestDeliveryError field's value. -func (s *GetTrailStatusOutput) SetLatestDigestDeliveryError(v string) *GetTrailStatusOutput { - s.LatestDigestDeliveryError = &v - return s -} - -// SetLatestDigestDeliveryTime sets the LatestDigestDeliveryTime field's value. -func (s *GetTrailStatusOutput) SetLatestDigestDeliveryTime(v time.Time) *GetTrailStatusOutput { - s.LatestDigestDeliveryTime = &v - return s -} - -// SetLatestNotificationAttemptSucceeded sets the LatestNotificationAttemptSucceeded field's value. -func (s *GetTrailStatusOutput) SetLatestNotificationAttemptSucceeded(v string) *GetTrailStatusOutput { - s.LatestNotificationAttemptSucceeded = &v - return s -} - -// SetLatestNotificationAttemptTime sets the LatestNotificationAttemptTime field's value. -func (s *GetTrailStatusOutput) SetLatestNotificationAttemptTime(v string) *GetTrailStatusOutput { - s.LatestNotificationAttemptTime = &v - return s -} - -// SetLatestNotificationError sets the LatestNotificationError field's value. -func (s *GetTrailStatusOutput) SetLatestNotificationError(v string) *GetTrailStatusOutput { - s.LatestNotificationError = &v - return s -} - -// SetLatestNotificationTime sets the LatestNotificationTime field's value. -func (s *GetTrailStatusOutput) SetLatestNotificationTime(v time.Time) *GetTrailStatusOutput { - s.LatestNotificationTime = &v - return s -} - -// SetStartLoggingTime sets the StartLoggingTime field's value. -func (s *GetTrailStatusOutput) SetStartLoggingTime(v time.Time) *GetTrailStatusOutput { - s.StartLoggingTime = &v - return s -} - -// SetStopLoggingTime sets the StopLoggingTime field's value. -func (s *GetTrailStatusOutput) SetStopLoggingTime(v time.Time) *GetTrailStatusOutput { - s.StopLoggingTime = &v - return s -} - -// SetTimeLoggingStarted sets the TimeLoggingStarted field's value. -func (s *GetTrailStatusOutput) SetTimeLoggingStarted(v string) *GetTrailStatusOutput { - s.TimeLoggingStarted = &v - return s -} - -// SetTimeLoggingStopped sets the TimeLoggingStopped field's value. -func (s *GetTrailStatusOutput) SetTimeLoggingStopped(v string) *GetTrailStatusOutput { - s.TimeLoggingStopped = &v - return s -} - -// Requests the public keys for a specified time range. -type ListPublicKeysInput struct { - _ struct{} `type:"structure"` - - // Optionally specifies, in UTC, the end of the time range to look up public - // keys for CloudTrail digest files. If not specified, the current time is used. - EndTime *time.Time `type:"timestamp"` - - // Reserved for future use. - NextToken *string `type:"string"` - - // Optionally specifies, in UTC, the start of the time range to look up public - // keys for CloudTrail digest files. If not specified, the current time is used, - // and the current public key is returned. - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s ListPublicKeysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPublicKeysInput) GoString() string { - return s.String() -} - -// SetEndTime sets the EndTime field's value. -func (s *ListPublicKeysInput) SetEndTime(v time.Time) *ListPublicKeysInput { - s.EndTime = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPublicKeysInput) SetNextToken(v string) *ListPublicKeysInput { - s.NextToken = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *ListPublicKeysInput) SetStartTime(v time.Time) *ListPublicKeysInput { - s.StartTime = &v - return s -} - -// Returns the objects or data listed below if successful. Otherwise, returns -// an error. -type ListPublicKeysOutput struct { - _ struct{} `type:"structure"` - - // Reserved for future use. - NextToken *string `type:"string"` - - // Contains an array of PublicKey objects. - // - // The returned public keys may have validity time ranges that overlap. - PublicKeyList []*PublicKey `type:"list"` -} - -// String returns the string representation -func (s ListPublicKeysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPublicKeysOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPublicKeysOutput) SetNextToken(v string) *ListPublicKeysOutput { - s.NextToken = &v - return s -} - -// SetPublicKeyList sets the PublicKeyList field's value. -func (s *ListPublicKeysOutput) SetPublicKeyList(v []*PublicKey) *ListPublicKeysOutput { - s.PublicKeyList = v - return s -} - -// Specifies a list of trail tags to return. -type ListTagsInput struct { - _ struct{} `type:"structure"` - - // Reserved for future use. - NextToken *string `type:"string"` - - // Specifies a list of trail ARNs whose tags will be listed. The list has a - // limit of 20 ARNs. The format of a trail ARN is: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - // - // ResourceIdList is a required field - ResourceIdList []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s ListTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} - if s.ResourceIdList == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceIdList")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput { - s.NextToken = &v - return s -} - -// SetResourceIdList sets the ResourceIdList field's value. -func (s *ListTagsInput) SetResourceIdList(v []*string) *ListTagsInput { - s.ResourceIdList = v - return s -} - -// Returns the objects or data listed below if successful. Otherwise, returns -// an error. -type ListTagsOutput struct { - _ struct{} `type:"structure"` - - // Reserved for future use. - NextToken *string `type:"string"` - - // A list of resource tags. - ResourceTagList []*ResourceTag `type:"list"` -} - -// String returns the string representation -func (s ListTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput { - s.NextToken = &v - return s -} - -// SetResourceTagList sets the ResourceTagList field's value. -func (s *ListTagsOutput) SetResourceTagList(v []*ResourceTag) *ListTagsOutput { - s.ResourceTagList = v - return s -} - -// Specifies an attribute and value that filter the events returned. -type LookupAttribute struct { - _ struct{} `type:"structure"` - - // Specifies an attribute on which to filter the events returned. - // - // AttributeKey is a required field - AttributeKey *string `type:"string" required:"true" enum:"LookupAttributeKey"` - - // Specifies a value for the specified AttributeKey. - // - // AttributeValue is a required field - AttributeValue *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s LookupAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LookupAttribute) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LookupAttribute) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LookupAttribute"} - if s.AttributeKey == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeKey")) - } - if s.AttributeValue == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeKey sets the AttributeKey field's value. -func (s *LookupAttribute) SetAttributeKey(v string) *LookupAttribute { - s.AttributeKey = &v - return s -} - -// SetAttributeValue sets the AttributeValue field's value. -func (s *LookupAttribute) SetAttributeValue(v string) *LookupAttribute { - s.AttributeValue = &v - return s -} - -// Contains a request for LookupEvents. -type LookupEventsInput struct { - _ struct{} `type:"structure"` - - // Specifies that only events that occur before or at the specified time are - // returned. If the specified end time is before the specified start time, an - // error is returned. - EndTime *time.Time `type:"timestamp"` - - // Contains a list of lookup attributes. Currently the list can contain only - // one item. - LookupAttributes []*LookupAttribute `type:"list"` - - // The number of events to return. Possible values are 1 through 50. The default - // is 50. - MaxResults *int64 `min:"1" type:"integer"` - - // The token to use to get the next page of results after a previous API call. - // This token must be passed in with the same parameters that were specified - // in the the original call. For example, if the original call specified an - // AttributeKey of 'Username' with a value of 'root', the call with NextToken - // should include those same parameters. - NextToken *string `type:"string"` - - // Specifies that only events that occur after or at the specified time are - // returned. If the specified start time is after the specified end time, an - // error is returned. - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s LookupEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LookupEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LookupEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LookupEventsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.LookupAttributes != nil { - for i, v := range s.LookupAttributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LookupAttributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndTime sets the EndTime field's value. -func (s *LookupEventsInput) SetEndTime(v time.Time) *LookupEventsInput { - s.EndTime = &v - return s -} - -// SetLookupAttributes sets the LookupAttributes field's value. -func (s *LookupEventsInput) SetLookupAttributes(v []*LookupAttribute) *LookupEventsInput { - s.LookupAttributes = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *LookupEventsInput) SetMaxResults(v int64) *LookupEventsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *LookupEventsInput) SetNextToken(v string) *LookupEventsInput { - s.NextToken = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *LookupEventsInput) SetStartTime(v time.Time) *LookupEventsInput { - s.StartTime = &v - return s -} - -// Contains a response to a LookupEvents action. -type LookupEventsOutput struct { - _ struct{} `type:"structure"` - - // A list of events returned based on the lookup attributes specified and the - // CloudTrail event. The events list is sorted by time. The most recent event - // is listed first. - Events []*Event `type:"list"` - - // The token to use to get the next page of results after a previous API call. - // If the token does not appear, there are no more results to return. The token - // must be passed in with the same parameters as the previous call. For example, - // if the original call specified an AttributeKey of 'Username' with a value - // of 'root', the call with NextToken should include those same parameters. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s LookupEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LookupEventsOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *LookupEventsOutput) SetEvents(v []*Event) *LookupEventsOutput { - s.Events = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *LookupEventsOutput) SetNextToken(v string) *LookupEventsOutput { - s.NextToken = &v - return s -} - -// Contains information about a returned public key. -type PublicKey struct { - _ struct{} `type:"structure"` - - // The fingerprint of the public key. - Fingerprint *string `type:"string"` - - // The ending time of validity of the public key. - ValidityEndTime *time.Time `type:"timestamp"` - - // The starting time of validity of the public key. - ValidityStartTime *time.Time `type:"timestamp"` - - // The DER encoded public key value in PKCS#1 format. - // - // Value is automatically base64 encoded/decoded by the SDK. - Value []byte `type:"blob"` -} - -// String returns the string representation -func (s PublicKey) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublicKey) GoString() string { - return s.String() -} - -// SetFingerprint sets the Fingerprint field's value. -func (s *PublicKey) SetFingerprint(v string) *PublicKey { - s.Fingerprint = &v - return s -} - -// SetValidityEndTime sets the ValidityEndTime field's value. -func (s *PublicKey) SetValidityEndTime(v time.Time) *PublicKey { - s.ValidityEndTime = &v - return s -} - -// SetValidityStartTime sets the ValidityStartTime field's value. -func (s *PublicKey) SetValidityStartTime(v time.Time) *PublicKey { - s.ValidityStartTime = &v - return s -} - -// SetValue sets the Value field's value. -func (s *PublicKey) SetValue(v []byte) *PublicKey { - s.Value = v - return s -} - -type PutEventSelectorsInput struct { - _ struct{} `type:"structure"` - - // Specifies the settings for your event selectors. You can configure up to - // five event selectors for a trail. - // - // EventSelectors is a required field - EventSelectors []*EventSelector `type:"list" required:"true"` - - // Specifies the name of the trail or trail ARN. If you specify a trail name, - // the string must meet the following requirements: - // - // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores - // (_), or dashes (-) - // - // * Start with a letter or number, and end with a letter or number - // - // * Be between 3 and 128 characters - // - // * Have no adjacent periods, underscores or dashes. Names like my-_namespace - // and my--namespace are invalid. - // - // * Not be in IP address format (for example, 192.168.5.4) - // - // If you specify a trail ARN, it must be in the format: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - // - // TrailName is a required field - TrailName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PutEventSelectorsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutEventSelectorsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutEventSelectorsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutEventSelectorsInput"} - if s.EventSelectors == nil { - invalidParams.Add(request.NewErrParamRequired("EventSelectors")) - } - if s.TrailName == nil { - invalidParams.Add(request.NewErrParamRequired("TrailName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEventSelectors sets the EventSelectors field's value. -func (s *PutEventSelectorsInput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsInput { - s.EventSelectors = v - return s -} - -// SetTrailName sets the TrailName field's value. -func (s *PutEventSelectorsInput) SetTrailName(v string) *PutEventSelectorsInput { - s.TrailName = &v - return s -} - -type PutEventSelectorsOutput struct { - _ struct{} `type:"structure"` - - // Specifies the event selectors configured for your trail. - EventSelectors []*EventSelector `type:"list"` - - // Specifies the ARN of the trail that was updated with event selectors. The - // format of a trail ARN is: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - TrailARN *string `type:"string"` -} - -// String returns the string representation -func (s PutEventSelectorsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutEventSelectorsOutput) GoString() string { - return s.String() -} - -// SetEventSelectors sets the EventSelectors field's value. -func (s *PutEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsOutput { - s.EventSelectors = v - return s -} - -// SetTrailARN sets the TrailARN field's value. -func (s *PutEventSelectorsOutput) SetTrailARN(v string) *PutEventSelectorsOutput { - s.TrailARN = &v - return s -} - -// Specifies the tags to remove from a trail. -type RemoveTagsInput struct { - _ struct{} `type:"structure"` - - // Specifies the ARN of the trail from which tags should be removed. The format - // of a trail ARN is: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` - - // Specifies a list of tags to be removed. - TagsList []*Tag `type:"list"` -} - -// String returns the string representation -func (s RemoveTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.TagsList != nil { - for i, v := range s.TagsList { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *RemoveTagsInput) SetResourceId(v string) *RemoveTagsInput { - s.ResourceId = &v - return s -} - -// SetTagsList sets the TagsList field's value. -func (s *RemoveTagsInput) SetTagsList(v []*Tag) *RemoveTagsInput { - s.TagsList = v - return s -} - -// Returns the objects or data listed below if successful. Otherwise, returns -// an error. -type RemoveTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsOutput) GoString() string { - return s.String() -} - -// Specifies the type and name of a resource referenced by an event. -type Resource struct { - _ struct{} `type:"structure"` - - // The name of the resource referenced by the event returned. These are user-created - // names whose values will depend on the environment. For example, the resource - // name might be "auto-scaling-test-group" for an Auto Scaling Group or "i-1234567" - // for an EC2 Instance. - ResourceName *string `type:"string"` - - // The type of a resource referenced by the event returned. When the resource - // type cannot be determined, null is returned. Some examples of resource types - // are: Instance for EC2, Trail for CloudTrail, DBInstance for RDS, and AccessKey - // for IAM. For a list of resource types supported for event lookup, see Resource - // Types Supported for Event Lookup (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/lookup_supported_resourcetypes.html). - ResourceType *string `type:"string"` -} - -// 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() -} - -// SetResourceName sets the ResourceName field's value. -func (s *Resource) SetResourceName(v string) *Resource { - s.ResourceName = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *Resource) SetResourceType(v string) *Resource { - s.ResourceType = &v - return s -} - -// A resource tag. -type ResourceTag struct { - _ struct{} `type:"structure"` - - // Specifies the ARN of the resource. - ResourceId *string `type:"string"` - - // A list of tags. - TagsList []*Tag `type:"list"` -} - -// String returns the string representation -func (s ResourceTag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceTag) GoString() string { - return s.String() -} - -// SetResourceId sets the ResourceId field's value. -func (s *ResourceTag) SetResourceId(v string) *ResourceTag { - s.ResourceId = &v - return s -} - -// SetTagsList sets the TagsList field's value. -func (s *ResourceTag) SetTagsList(v []*Tag) *ResourceTag { - s.TagsList = v - return s -} - -// The request to CloudTrail to start logging AWS API calls for an account. -type StartLoggingInput struct { - _ struct{} `type:"structure"` - - // Specifies the name or the CloudTrail ARN of the trail for which CloudTrail - // logs AWS API calls. The format of a trail ARN is: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StartLoggingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartLoggingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartLoggingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartLoggingInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *StartLoggingInput) SetName(v string) *StartLoggingInput { - s.Name = &v - return s -} - -// Returns the objects or data listed below if successful. Otherwise, returns -// an error. -type StartLoggingOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StartLoggingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartLoggingOutput) GoString() string { - return s.String() -} - -// Passes the request to CloudTrail to stop logging AWS API calls for the specified -// account. -type StopLoggingInput struct { - _ struct{} `type:"structure"` - - // Specifies the name or the CloudTrail ARN of the trail for which CloudTrail - // will stop logging AWS API calls. The format of a trail ARN is: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StopLoggingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopLoggingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopLoggingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopLoggingInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *StopLoggingInput) SetName(v string) *StopLoggingInput { - s.Name = &v - return s -} - -// Returns the objects or data listed below if successful. Otherwise, returns -// an error. -type StopLoggingOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopLoggingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopLoggingOutput) GoString() string { - return s.String() -} - -// A custom key-value pair associated with a resource such as a CloudTrail trail. -type Tag struct { - _ struct{} `type:"structure"` - - // The key in a key-value pair. The key must be must be no longer than 128 Unicode - // characters. The key must be unique for the resource to which it applies. - // - // Key is a required field - Key *string `type:"string" required:"true"` - - // The value in a key-value pair of a tag. The value must be no longer than - // 256 Unicode characters. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// The settings for a trail. -type Trail struct { - _ struct{} `type:"structure"` - - // Specifies an Amazon Resource Name (ARN), a unique identifier that represents - // the log group to which CloudTrail logs will be delivered. - CloudWatchLogsLogGroupArn *string `type:"string"` - - // Specifies the role for the CloudWatch Logs endpoint to assume to write to - // a user's log group. - CloudWatchLogsRoleArn *string `type:"string"` - - // Specifies if the trail has custom event selectors. - HasCustomEventSelectors *bool `type:"boolean"` - - // The region in which the trail was created. - HomeRegion *string `type:"string"` - - // Set to True to include AWS API calls from AWS global services such as IAM. - // Otherwise, False. - IncludeGlobalServiceEvents *bool `type:"boolean"` - - // Specifies whether the trail belongs only to one region or exists in all regions. - IsMultiRegionTrail *bool `type:"boolean"` - - // Specifies whether the trail is an organization trail. - IsOrganizationTrail *bool `type:"boolean"` - - // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. - // The value is a fully specified ARN to a KMS key in the format: - // - // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 - KmsKeyId *string `type:"string"` - - // Specifies whether log file validation is enabled. - LogFileValidationEnabled *bool `type:"boolean"` - - // Name of the trail set by calling CreateTrail. The maximum length is 128 characters. - Name *string `type:"string"` - - // Name of the Amazon S3 bucket into which CloudTrail delivers your trail files. - // See Amazon S3 Bucket Naming Requirements (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html). - S3BucketName *string `type:"string"` - - // Specifies the Amazon S3 key prefix that comes after the name of the bucket - // you have designated for log file delivery. For more information, see Finding - // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).The - // maximum length is 200 characters. - S3KeyPrefix *string `type:"string"` - - // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications - // when log files are delivered. The format of a topic ARN is: - // - // arn:aws:sns:us-east-2:123456789012:MyTopic - SnsTopicARN *string `type:"string"` - - // This field is deprecated. Use SnsTopicARN. - // - // Deprecated: SnsTopicName has been deprecated - SnsTopicName *string `deprecated:"true" type:"string"` - - // Specifies the ARN of the trail. The format of a trail ARN is: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - TrailARN *string `type:"string"` -} - -// String returns the string representation -func (s Trail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Trail) GoString() string { - return s.String() -} - -// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value. -func (s *Trail) SetCloudWatchLogsLogGroupArn(v string) *Trail { - s.CloudWatchLogsLogGroupArn = &v - return s -} - -// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value. -func (s *Trail) SetCloudWatchLogsRoleArn(v string) *Trail { - s.CloudWatchLogsRoleArn = &v - return s -} - -// SetHasCustomEventSelectors sets the HasCustomEventSelectors field's value. -func (s *Trail) SetHasCustomEventSelectors(v bool) *Trail { - s.HasCustomEventSelectors = &v - return s -} - -// SetHomeRegion sets the HomeRegion field's value. -func (s *Trail) SetHomeRegion(v string) *Trail { - s.HomeRegion = &v - return s -} - -// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value. -func (s *Trail) SetIncludeGlobalServiceEvents(v bool) *Trail { - s.IncludeGlobalServiceEvents = &v - return s -} - -// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value. -func (s *Trail) SetIsMultiRegionTrail(v bool) *Trail { - s.IsMultiRegionTrail = &v - return s -} - -// SetIsOrganizationTrail sets the IsOrganizationTrail field's value. -func (s *Trail) SetIsOrganizationTrail(v bool) *Trail { - s.IsOrganizationTrail = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *Trail) SetKmsKeyId(v string) *Trail { - s.KmsKeyId = &v - return s -} - -// SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value. -func (s *Trail) SetLogFileValidationEnabled(v bool) *Trail { - s.LogFileValidationEnabled = &v - return s -} - -// SetName sets the Name field's value. -func (s *Trail) SetName(v string) *Trail { - s.Name = &v - return s -} - -// SetS3BucketName sets the S3BucketName field's value. -func (s *Trail) SetS3BucketName(v string) *Trail { - s.S3BucketName = &v - return s -} - -// SetS3KeyPrefix sets the S3KeyPrefix field's value. -func (s *Trail) SetS3KeyPrefix(v string) *Trail { - s.S3KeyPrefix = &v - return s -} - -// SetSnsTopicARN sets the SnsTopicARN field's value. -func (s *Trail) SetSnsTopicARN(v string) *Trail { - s.SnsTopicARN = &v - return s -} - -// SetSnsTopicName sets the SnsTopicName field's value. -func (s *Trail) SetSnsTopicName(v string) *Trail { - s.SnsTopicName = &v - return s -} - -// SetTrailARN sets the TrailARN field's value. -func (s *Trail) SetTrailARN(v string) *Trail { - s.TrailARN = &v - return s -} - -// Specifies settings to update for the trail. -type UpdateTrailInput struct { - _ struct{} `type:"structure"` - - // Specifies a log group name using an Amazon Resource Name (ARN), a unique - // identifier that represents the log group to which CloudTrail logs will be - // delivered. Not required unless you specify CloudWatchLogsRoleArn. - CloudWatchLogsLogGroupArn *string `type:"string"` - - // Specifies the role for the CloudWatch Logs endpoint to assume to write to - // a user's log group. - CloudWatchLogsRoleArn *string `type:"string"` - - // Specifies whether log file validation is enabled. The default is false. - // - // When you disable log file integrity validation, the chain of digest files - // is broken after one hour. CloudTrail will not create digest files for log - // files that were delivered during a period in which log file integrity validation - // was disabled. For example, if you enable log file integrity validation at - // noon on January 1, disable it at noon on January 2, and re-enable it at noon - // on January 10, digest files will not be created for the log files delivered - // from noon on January 2 to noon on January 10. The same applies whenever you - // stop CloudTrail logging or delete a trail. - EnableLogFileValidation *bool `type:"boolean"` - - // Specifies whether the trail is publishing events from global services such - // as IAM to the log files. - IncludeGlobalServiceEvents *bool `type:"boolean"` - - // Specifies whether the trail applies only to the current region or to all - // regions. The default is false. If the trail exists only in the current region - // and this value is set to true, shadow trails (replications of the trail) - // will be created in the other regions. If the trail exists in all regions - // and this value is set to false, the trail will remain in the region where - // it was created, and its shadow trails in other regions will be deleted. - IsMultiRegionTrail *bool `type:"boolean"` - - // Specifies whether the trail is applied to all accounts in an organization - // in AWS Organizations, or only for the current AWS account. The default is - // false, and cannot be true unless the call is made on behalf of an AWS account - // that is the master account for an organization in AWS Organizations. If the - // trail is not an organization trail and this is set to true, the trail will - // be created in all AWS accounts that belong to the organization. If the trail - // is an organization trail and this is set to false, the trail will remain - // in the current AWS account but be deleted from all member accounts in the - // organization. - IsOrganizationTrail *bool `type:"boolean"` - - // Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. - // The value can be an alias name prefixed by "alias/", a fully specified ARN - // to an alias, a fully specified ARN to a key, or a globally unique identifier. - // - // Examples: - // - // * alias/MyAliasName - // - // * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName - // - // * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 - // - // * 12345678-1234-1234-1234-123456789012 - KmsKeyId *string `type:"string"` - - // Specifies the name of the trail or trail ARN. If Name is a trail name, the - // string must meet the following requirements: - // - // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores - // (_), or dashes (-) - // - // * Start with a letter or number, and end with a letter or number - // - // * Be between 3 and 128 characters - // - // * Have no adjacent periods, underscores or dashes. Names like my-_namespace - // and my--namespace are invalid. - // - // * Not be in IP address format (for example, 192.168.5.4) - // - // If Name is a trail ARN, it must be in the format: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // Specifies the name of the Amazon S3 bucket designated for publishing log - // files. See Amazon S3 Bucket Naming Requirements (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html). - S3BucketName *string `type:"string"` - - // Specifies the Amazon S3 key prefix that comes after the name of the bucket - // you have designated for log file delivery. For more information, see Finding - // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html). - // The maximum length is 200 characters. - S3KeyPrefix *string `type:"string"` - - // Specifies the name of the Amazon SNS topic defined for notification of log - // file delivery. The maximum length is 256 characters. - SnsTopicName *string `type:"string"` -} - -// String returns the string representation -func (s UpdateTrailInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTrailInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateTrailInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateTrailInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value. -func (s *UpdateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailInput { - s.CloudWatchLogsLogGroupArn = &v - return s -} - -// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value. -func (s *UpdateTrailInput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailInput { - s.CloudWatchLogsRoleArn = &v - return s -} - -// SetEnableLogFileValidation sets the EnableLogFileValidation field's value. -func (s *UpdateTrailInput) SetEnableLogFileValidation(v bool) *UpdateTrailInput { - s.EnableLogFileValidation = &v - return s -} - -// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value. -func (s *UpdateTrailInput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailInput { - s.IncludeGlobalServiceEvents = &v - return s -} - -// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value. -func (s *UpdateTrailInput) SetIsMultiRegionTrail(v bool) *UpdateTrailInput { - s.IsMultiRegionTrail = &v - return s -} - -// SetIsOrganizationTrail sets the IsOrganizationTrail field's value. -func (s *UpdateTrailInput) SetIsOrganizationTrail(v bool) *UpdateTrailInput { - s.IsOrganizationTrail = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *UpdateTrailInput) SetKmsKeyId(v string) *UpdateTrailInput { - s.KmsKeyId = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateTrailInput) SetName(v string) *UpdateTrailInput { - s.Name = &v - return s -} - -// SetS3BucketName sets the S3BucketName field's value. -func (s *UpdateTrailInput) SetS3BucketName(v string) *UpdateTrailInput { - s.S3BucketName = &v - return s -} - -// SetS3KeyPrefix sets the S3KeyPrefix field's value. -func (s *UpdateTrailInput) SetS3KeyPrefix(v string) *UpdateTrailInput { - s.S3KeyPrefix = &v - return s -} - -// SetSnsTopicName sets the SnsTopicName field's value. -func (s *UpdateTrailInput) SetSnsTopicName(v string) *UpdateTrailInput { - s.SnsTopicName = &v - return s -} - -// Returns the objects or data listed below if successful. Otherwise, returns -// an error. -type UpdateTrailOutput struct { - _ struct{} `type:"structure"` - - // Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail - // logs will be delivered. - CloudWatchLogsLogGroupArn *string `type:"string"` - - // Specifies the role for the CloudWatch Logs endpoint to assume to write to - // a user's log group. - CloudWatchLogsRoleArn *string `type:"string"` - - // Specifies whether the trail is publishing events from global services such - // as IAM to the log files. - IncludeGlobalServiceEvents *bool `type:"boolean"` - - // Specifies whether the trail exists in one region or in all regions. - IsMultiRegionTrail *bool `type:"boolean"` - - // Specifies whether the trail is an organization trail. - IsOrganizationTrail *bool `type:"boolean"` - - // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. - // The value is a fully specified ARN to a KMS key in the format: - // - // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 - KmsKeyId *string `type:"string"` - - // Specifies whether log file integrity validation is enabled. - LogFileValidationEnabled *bool `type:"boolean"` - - // Specifies the name of the trail. - Name *string `type:"string"` - - // Specifies the name of the Amazon S3 bucket designated for publishing log - // files. - S3BucketName *string `type:"string"` - - // Specifies the Amazon S3 key prefix that comes after the name of the bucket - // you have designated for log file delivery. For more information, see Finding - // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html). - S3KeyPrefix *string `type:"string"` - - // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications - // when log files are delivered. The format of a topic ARN is: - // - // arn:aws:sns:us-east-2:123456789012:MyTopic - SnsTopicARN *string `type:"string"` - - // This field is deprecated. Use SnsTopicARN. - // - // Deprecated: SnsTopicName has been deprecated - SnsTopicName *string `deprecated:"true" type:"string"` - - // Specifies the ARN of the trail that was updated. The format of a trail ARN - // is: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - TrailARN *string `type:"string"` -} - -// String returns the string representation -func (s UpdateTrailOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTrailOutput) GoString() string { - return s.String() -} - -// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value. -func (s *UpdateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailOutput { - s.CloudWatchLogsLogGroupArn = &v - return s -} - -// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value. -func (s *UpdateTrailOutput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailOutput { - s.CloudWatchLogsRoleArn = &v - return s -} - -// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value. -func (s *UpdateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailOutput { - s.IncludeGlobalServiceEvents = &v - return s -} - -// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value. -func (s *UpdateTrailOutput) SetIsMultiRegionTrail(v bool) *UpdateTrailOutput { - s.IsMultiRegionTrail = &v - return s -} - -// SetIsOrganizationTrail sets the IsOrganizationTrail field's value. -func (s *UpdateTrailOutput) SetIsOrganizationTrail(v bool) *UpdateTrailOutput { - s.IsOrganizationTrail = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *UpdateTrailOutput) SetKmsKeyId(v string) *UpdateTrailOutput { - s.KmsKeyId = &v - return s -} - -// SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value. -func (s *UpdateTrailOutput) SetLogFileValidationEnabled(v bool) *UpdateTrailOutput { - s.LogFileValidationEnabled = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateTrailOutput) SetName(v string) *UpdateTrailOutput { - s.Name = &v - return s -} - -// SetS3BucketName sets the S3BucketName field's value. -func (s *UpdateTrailOutput) SetS3BucketName(v string) *UpdateTrailOutput { - s.S3BucketName = &v - return s -} - -// SetS3KeyPrefix sets the S3KeyPrefix field's value. -func (s *UpdateTrailOutput) SetS3KeyPrefix(v string) *UpdateTrailOutput { - s.S3KeyPrefix = &v - return s -} - -// SetSnsTopicARN sets the SnsTopicARN field's value. -func (s *UpdateTrailOutput) SetSnsTopicARN(v string) *UpdateTrailOutput { - s.SnsTopicARN = &v - return s -} - -// SetSnsTopicName sets the SnsTopicName field's value. -func (s *UpdateTrailOutput) SetSnsTopicName(v string) *UpdateTrailOutput { - s.SnsTopicName = &v - return s -} - -// SetTrailARN sets the TrailARN field's value. -func (s *UpdateTrailOutput) SetTrailARN(v string) *UpdateTrailOutput { - s.TrailARN = &v - return s -} - -const ( - // LookupAttributeKeyEventId is a LookupAttributeKey enum value - LookupAttributeKeyEventId = "EventId" - - // LookupAttributeKeyEventName is a LookupAttributeKey enum value - LookupAttributeKeyEventName = "EventName" - - // LookupAttributeKeyReadOnly is a LookupAttributeKey enum value - LookupAttributeKeyReadOnly = "ReadOnly" - - // LookupAttributeKeyUsername is a LookupAttributeKey enum value - LookupAttributeKeyUsername = "Username" - - // LookupAttributeKeyResourceType is a LookupAttributeKey enum value - LookupAttributeKeyResourceType = "ResourceType" - - // LookupAttributeKeyResourceName is a LookupAttributeKey enum value - LookupAttributeKeyResourceName = "ResourceName" - - // LookupAttributeKeyEventSource is a LookupAttributeKey enum value - LookupAttributeKeyEventSource = "EventSource" - - // LookupAttributeKeyAccessKeyId is a LookupAttributeKey enum value - LookupAttributeKeyAccessKeyId = "AccessKeyId" -) - -const ( - // ReadWriteTypeReadOnly is a ReadWriteType enum value - ReadWriteTypeReadOnly = "ReadOnly" - - // ReadWriteTypeWriteOnly is a ReadWriteType enum value - ReadWriteTypeWriteOnly = "WriteOnly" - - // ReadWriteTypeAll is a ReadWriteType enum value - ReadWriteTypeAll = "All" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/doc.go deleted file mode 100644 index 8226ac8b0..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/doc.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package cloudtrail provides the client and types for making API -// requests to AWS CloudTrail. -// -// This is the CloudTrail API Reference. It provides descriptions of actions, -// data types, common parameters, and common errors for CloudTrail. -// -// CloudTrail is a web service that records AWS API calls for your AWS account -// and delivers log files to an Amazon S3 bucket. The recorded information includes -// the identity of the user, the start time of the AWS API call, the source -// IP address, the request parameters, and the response elements returned by -// the service. -// -// As an alternative to the API, you can use one of the AWS SDKs, which consist -// of libraries and sample code for various programming languages and platforms -// (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient way -// to create programmatic access to AWSCloudTrail. For example, the SDKs take -// care of cryptographically signing requests, managing errors, and retrying -// requests automatically. For information about the AWS SDKs, including how -// to download and install them, see the Tools for Amazon Web Services page -// (http://aws.amazon.com/tools/). -// -// See the AWS CloudTrail User Guide (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html) -// for information about the data that is included with each AWS API call listed -// in the log files. -// -// See https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01 for more information on this service. -// -// See cloudtrail package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudtrail/ -// -// Using the Client -// -// To contact AWS CloudTrail 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 CloudTrail client CloudTrail for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudtrail/#New -package cloudtrail diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go deleted file mode 100644 index 4fdd9a37b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go +++ /dev/null @@ -1,298 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudtrail - -const ( - - // ErrCodeARNInvalidException for service response error code - // "CloudTrailARNInvalidException". - // - // This exception is thrown when an operation is called with an invalid trail - // ARN. The format of a trail ARN is: - // - // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail - ErrCodeARNInvalidException = "CloudTrailARNInvalidException" - - // ErrCodeAccessNotEnabledException for service response error code - // "CloudTrailAccessNotEnabledException". - // - // This exception is thrown when trusted access has not been enabled between - // AWS CloudTrail and AWS Organizations. For more information, see Enabling - // Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) - // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). - ErrCodeAccessNotEnabledException = "CloudTrailAccessNotEnabledException" - - // ErrCodeCloudWatchLogsDeliveryUnavailableException for service response error code - // "CloudWatchLogsDeliveryUnavailableException". - // - // Cannot set a CloudWatch Logs delivery for this region. - ErrCodeCloudWatchLogsDeliveryUnavailableException = "CloudWatchLogsDeliveryUnavailableException" - - // ErrCodeInsufficientDependencyServiceAccessPermissionException for service response error code - // "InsufficientDependencyServiceAccessPermissionException". - // - // This exception is thrown when the IAM user or role that is used to create - // the organization trail is lacking one or more required permissions for creating - // an organization trail in a required service. For more information, see Prepare - // For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). - ErrCodeInsufficientDependencyServiceAccessPermissionException = "InsufficientDependencyServiceAccessPermissionException" - - // ErrCodeInsufficientEncryptionPolicyException for service response error code - // "InsufficientEncryptionPolicyException". - // - // This exception is thrown when the policy on the S3 bucket or KMS key is not - // sufficient. - ErrCodeInsufficientEncryptionPolicyException = "InsufficientEncryptionPolicyException" - - // ErrCodeInsufficientS3BucketPolicyException for service response error code - // "InsufficientS3BucketPolicyException". - // - // This exception is thrown when the policy on the S3 bucket is not sufficient. - ErrCodeInsufficientS3BucketPolicyException = "InsufficientS3BucketPolicyException" - - // ErrCodeInsufficientSnsTopicPolicyException for service response error code - // "InsufficientSnsTopicPolicyException". - // - // This exception is thrown when the policy on the SNS topic is not sufficient. - ErrCodeInsufficientSnsTopicPolicyException = "InsufficientSnsTopicPolicyException" - - // ErrCodeInvalidCloudWatchLogsLogGroupArnException for service response error code - // "InvalidCloudWatchLogsLogGroupArnException". - // - // This exception is thrown when the provided CloudWatch log group is not valid. - ErrCodeInvalidCloudWatchLogsLogGroupArnException = "InvalidCloudWatchLogsLogGroupArnException" - - // ErrCodeInvalidCloudWatchLogsRoleArnException for service response error code - // "InvalidCloudWatchLogsRoleArnException". - // - // This exception is thrown when the provided role is not valid. - ErrCodeInvalidCloudWatchLogsRoleArnException = "InvalidCloudWatchLogsRoleArnException" - - // ErrCodeInvalidEventSelectorsException for service response error code - // "InvalidEventSelectorsException". - // - // This exception is thrown when the PutEventSelectors operation is called with - // a number of event selectors or data resources that is not valid. The combination - // of event selectors and data resources is not valid. A trail can have up to - // 5 event selectors. A trail is limited to 250 data resources. These data resources - // can be distributed across event selectors, but the overall total cannot exceed - // 250. - // - // You can: - // - // * Specify a valid number of event selectors (1 to 5) for a trail. - // - // * Specify a valid number of data resources (1 to 250) for an event selector. - // The limit of number of resources on an individual event selector is configurable - // up to 250. However, this upper limit is allowed only if the total number - // of data resources does not exceed 250 across all event selectors for a - // trail. - // - // * Specify a valid value for a parameter. For example, specifying the ReadWriteType - // parameter with a value of read-only is invalid. - ErrCodeInvalidEventSelectorsException = "InvalidEventSelectorsException" - - // ErrCodeInvalidHomeRegionException for service response error code - // "InvalidHomeRegionException". - // - // This exception is thrown when an operation is called on a trail from a region - // other than the region in which the trail was created. - ErrCodeInvalidHomeRegionException = "InvalidHomeRegionException" - - // ErrCodeInvalidKmsKeyIdException for service response error code - // "InvalidKmsKeyIdException". - // - // This exception is thrown when the KMS key ARN is invalid. - ErrCodeInvalidKmsKeyIdException = "InvalidKmsKeyIdException" - - // ErrCodeInvalidLookupAttributesException for service response error code - // "InvalidLookupAttributesException". - // - // Occurs when an invalid lookup attribute is specified. - ErrCodeInvalidLookupAttributesException = "InvalidLookupAttributesException" - - // ErrCodeInvalidMaxResultsException for service response error code - // "InvalidMaxResultsException". - // - // This exception is thrown if the limit specified is invalid. - ErrCodeInvalidMaxResultsException = "InvalidMaxResultsException" - - // ErrCodeInvalidNextTokenException for service response error code - // "InvalidNextTokenException". - // - // Invalid token or token that was previously used in a request with different - // parameters. This exception is thrown if the token is invalid. - ErrCodeInvalidNextTokenException = "InvalidNextTokenException" - - // ErrCodeInvalidParameterCombinationException for service response error code - // "InvalidParameterCombinationException". - // - // This exception is thrown when the combination of parameters provided is not - // valid. - ErrCodeInvalidParameterCombinationException = "InvalidParameterCombinationException" - - // ErrCodeInvalidS3BucketNameException for service response error code - // "InvalidS3BucketNameException". - // - // This exception is thrown when the provided S3 bucket name is not valid. - ErrCodeInvalidS3BucketNameException = "InvalidS3BucketNameException" - - // ErrCodeInvalidS3PrefixException for service response error code - // "InvalidS3PrefixException". - // - // This exception is thrown when the provided S3 prefix is not valid. - ErrCodeInvalidS3PrefixException = "InvalidS3PrefixException" - - // ErrCodeInvalidSnsTopicNameException for service response error code - // "InvalidSnsTopicNameException". - // - // This exception is thrown when the provided SNS topic name is not valid. - ErrCodeInvalidSnsTopicNameException = "InvalidSnsTopicNameException" - - // ErrCodeInvalidTagParameterException for service response error code - // "InvalidTagParameterException". - // - // This exception is thrown when the key or value specified for the tag does - // not match the regular expression ^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$. - ErrCodeInvalidTagParameterException = "InvalidTagParameterException" - - // ErrCodeInvalidTimeRangeException for service response error code - // "InvalidTimeRangeException". - // - // Occurs if the timestamp values are invalid. Either the start time occurs - // after the end time or the time range is outside the range of possible values. - ErrCodeInvalidTimeRangeException = "InvalidTimeRangeException" - - // ErrCodeInvalidTokenException for service response error code - // "InvalidTokenException". - // - // Reserved for future use. - ErrCodeInvalidTokenException = "InvalidTokenException" - - // ErrCodeInvalidTrailNameException for service response error code - // "InvalidTrailNameException". - // - // This exception is thrown when the provided trail name is not valid. Trail - // names must meet the following requirements: - // - // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores - // (_), or dashes (-) - // - // * Start with a letter or number, and end with a letter or number - // - // * Be between 3 and 128 characters - // - // * Have no adjacent periods, underscores or dashes. Names like my-_namespace - // and my--namespace are invalid. - // - // * Not be in IP address format (for example, 192.168.5.4) - ErrCodeInvalidTrailNameException = "InvalidTrailNameException" - - // ErrCodeKmsException for service response error code - // "KmsException". - // - // This exception is thrown when there is an issue with the specified KMS key - // and the trail can’t be updated. - ErrCodeKmsException = "KmsException" - - // ErrCodeKmsKeyDisabledException for service response error code - // "KmsKeyDisabledException". - // - // This exception is deprecated. - ErrCodeKmsKeyDisabledException = "KmsKeyDisabledException" - - // ErrCodeKmsKeyNotFoundException for service response error code - // "KmsKeyNotFoundException". - // - // This exception is thrown when the KMS key does not exist, or when the S3 - // bucket and the KMS key are not in the same region. - ErrCodeKmsKeyNotFoundException = "KmsKeyNotFoundException" - - // ErrCodeMaximumNumberOfTrailsExceededException for service response error code - // "MaximumNumberOfTrailsExceededException". - // - // This exception is thrown when the maximum number of trails is reached. - ErrCodeMaximumNumberOfTrailsExceededException = "MaximumNumberOfTrailsExceededException" - - // ErrCodeNotOrganizationMasterAccountException for service response error code - // "NotOrganizationMasterAccountException". - // - // This exception is thrown when the AWS account making the request to create - // or update an organization trail is not the master account for an organization - // in AWS Organizations. For more information, see Prepare For Creating a Trail - // For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). - ErrCodeNotOrganizationMasterAccountException = "NotOrganizationMasterAccountException" - - // ErrCodeOperationNotPermittedException for service response error code - // "OperationNotPermittedException". - // - // This exception is thrown when the requested operation is not permitted. - ErrCodeOperationNotPermittedException = "OperationNotPermittedException" - - // ErrCodeOrganizationNotInAllFeaturesModeException for service response error code - // "OrganizationNotInAllFeaturesModeException". - // - // This exception is thrown when AWS Organizations is not configured to support - // all features. All features must be enabled in AWS Organization to support - // creating an organization trail. For more information, see Prepare For Creating - // a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). - ErrCodeOrganizationNotInAllFeaturesModeException = "OrganizationNotInAllFeaturesModeException" - - // ErrCodeOrganizationsNotInUseException for service response error code - // "OrganizationsNotInUseException". - // - // This exception is thrown when the request is made from an AWS account that - // is not a member of an organization. To make this request, sign in using the - // credentials of an account that belongs to an organization. - ErrCodeOrganizationsNotInUseException = "OrganizationsNotInUseException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // This exception is thrown when the specified resource is not found. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeResourceTypeNotSupportedException for service response error code - // "ResourceTypeNotSupportedException". - // - // This exception is thrown when the specified resource type is not supported - // by CloudTrail. - ErrCodeResourceTypeNotSupportedException = "ResourceTypeNotSupportedException" - - // ErrCodeS3BucketDoesNotExistException for service response error code - // "S3BucketDoesNotExistException". - // - // This exception is thrown when the specified S3 bucket does not exist. - ErrCodeS3BucketDoesNotExistException = "S3BucketDoesNotExistException" - - // ErrCodeTagsLimitExceededException for service response error code - // "TagsLimitExceededException". - // - // The number of tags per trail has exceeded the permitted amount. Currently, - // the limit is 50. - ErrCodeTagsLimitExceededException = "TagsLimitExceededException" - - // ErrCodeTrailAlreadyExistsException for service response error code - // "TrailAlreadyExistsException". - // - // This exception is thrown when the specified trail already exists. - ErrCodeTrailAlreadyExistsException = "TrailAlreadyExistsException" - - // ErrCodeTrailNotFoundException for service response error code - // "TrailNotFoundException". - // - // This exception is thrown when the trail with the given name is not found. - ErrCodeTrailNotFoundException = "TrailNotFoundException" - - // ErrCodeTrailNotProvidedException for service response error code - // "TrailNotProvidedException". - // - // This exception is deprecated. - ErrCodeTrailNotProvidedException = "TrailNotProvidedException" - - // ErrCodeUnsupportedOperationException for service response error code - // "UnsupportedOperationException". - // - // This exception is thrown when the requested operation is not supported. - ErrCodeUnsupportedOperationException = "UnsupportedOperationException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go deleted file mode 100644 index 5f1d4ddc4..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudtrail - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// CloudTrail provides the API operation methods for making requests to -// AWS CloudTrail. See this package's package overview docs -// for details on the service. -// -// CloudTrail methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CloudTrail 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 = "cloudtrail" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "CloudTrail" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CloudTrail client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a CloudTrail client from just a session. -// svc := cloudtrail.New(mySession) -// -// // Create a CloudTrail client with additional configuration -// svc := cloudtrail.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudTrail { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CloudTrail { - svc := &CloudTrail{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2013-11-01", - JSONVersion: "1.1", - TargetPrefix: "com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CloudTrail operation and runs any -// custom request initialization. -func (c *CloudTrail) 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/cloudwatch/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go deleted file mode 100644 index b7be8d6a1..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go +++ /dev/null @@ -1,5189 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudwatch - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/query" -) - -const opDeleteAlarms = "DeleteAlarms" - -// DeleteAlarmsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAlarms operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAlarms for more information on using the DeleteAlarms -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAlarmsRequest method. -// req, resp := client.DeleteAlarmsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAlarms -func (c *CloudWatch) DeleteAlarmsRequest(input *DeleteAlarmsInput) (req *request.Request, output *DeleteAlarmsOutput) { - op := &request.Operation{ - Name: opDeleteAlarms, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAlarmsInput{} - } - - output = &DeleteAlarmsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAlarms API operation for Amazon CloudWatch. -// -// Deletes the specified alarms. In the event of an error, no alarms are deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation DeleteAlarms for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFound "ResourceNotFound" -// The named resource does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAlarms -func (c *CloudWatch) DeleteAlarms(input *DeleteAlarmsInput) (*DeleteAlarmsOutput, error) { - req, out := c.DeleteAlarmsRequest(input) - return out, req.Send() -} - -// DeleteAlarmsWithContext is the same as DeleteAlarms with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAlarms for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) DeleteAlarmsWithContext(ctx aws.Context, input *DeleteAlarmsInput, opts ...request.Option) (*DeleteAlarmsOutput, error) { - req, out := c.DeleteAlarmsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDashboards = "DeleteDashboards" - -// DeleteDashboardsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDashboards operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDashboards for more information on using the DeleteDashboards -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDashboardsRequest method. -// req, resp := client.DeleteDashboardsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteDashboards -func (c *CloudWatch) DeleteDashboardsRequest(input *DeleteDashboardsInput) (req *request.Request, output *DeleteDashboardsOutput) { - op := &request.Operation{ - Name: opDeleteDashboards, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDashboardsInput{} - } - - output = &DeleteDashboardsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDashboards API operation for Amazon CloudWatch. -// -// Deletes all dashboards that you specify. You may specify up to 100 dashboards -// to delete. If there is an error during this call, no dashboards are deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation DeleteDashboards for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value of an input parameter is bad or out-of-range. -// -// * ErrCodeDashboardNotFoundError "ResourceNotFound" -// The specified dashboard does not exist. -// -// * ErrCodeInternalServiceFault "InternalServiceError" -// Request processing has failed due to some unknown error, exception, or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteDashboards -func (c *CloudWatch) DeleteDashboards(input *DeleteDashboardsInput) (*DeleteDashboardsOutput, error) { - req, out := c.DeleteDashboardsRequest(input) - return out, req.Send() -} - -// DeleteDashboardsWithContext is the same as DeleteDashboards with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDashboards for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) DeleteDashboardsWithContext(ctx aws.Context, input *DeleteDashboardsInput, opts ...request.Option) (*DeleteDashboardsOutput, error) { - req, out := c.DeleteDashboardsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAlarmHistory = "DescribeAlarmHistory" - -// DescribeAlarmHistoryRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAlarmHistory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAlarmHistory for more information on using the DescribeAlarmHistory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAlarmHistoryRequest method. -// req, resp := client.DescribeAlarmHistoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmHistory -func (c *CloudWatch) DescribeAlarmHistoryRequest(input *DescribeAlarmHistoryInput) (req *request.Request, output *DescribeAlarmHistoryOutput) { - op := &request.Operation{ - Name: opDescribeAlarmHistory, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeAlarmHistoryInput{} - } - - output = &DescribeAlarmHistoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAlarmHistory API operation for Amazon CloudWatch. -// -// Retrieves the history for the specified alarm. You can filter the results -// by date range or item type. If an alarm name is not specified, the histories -// for all alarms are returned. -// -// CloudWatch retains the history of an alarm even if you delete the alarm. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation DescribeAlarmHistory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The next token specified is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmHistory -func (c *CloudWatch) DescribeAlarmHistory(input *DescribeAlarmHistoryInput) (*DescribeAlarmHistoryOutput, error) { - req, out := c.DescribeAlarmHistoryRequest(input) - return out, req.Send() -} - -// DescribeAlarmHistoryWithContext is the same as DescribeAlarmHistory with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAlarmHistory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) DescribeAlarmHistoryWithContext(ctx aws.Context, input *DescribeAlarmHistoryInput, opts ...request.Option) (*DescribeAlarmHistoryOutput, error) { - req, out := c.DescribeAlarmHistoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeAlarmHistoryPages iterates over the pages of a DescribeAlarmHistory operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeAlarmHistory 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 DescribeAlarmHistory operation. -// pageNum := 0 -// err := client.DescribeAlarmHistoryPages(params, -// func(page *DescribeAlarmHistoryOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudWatch) DescribeAlarmHistoryPages(input *DescribeAlarmHistoryInput, fn func(*DescribeAlarmHistoryOutput, bool) bool) error { - return c.DescribeAlarmHistoryPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeAlarmHistoryPagesWithContext same as DescribeAlarmHistoryPages 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 *CloudWatch) DescribeAlarmHistoryPagesWithContext(ctx aws.Context, input *DescribeAlarmHistoryInput, fn func(*DescribeAlarmHistoryOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeAlarmHistoryInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeAlarmHistoryRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeAlarmHistoryOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeAlarms = "DescribeAlarms" - -// DescribeAlarmsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAlarms operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAlarms for more information on using the DescribeAlarms -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAlarmsRequest method. -// req, resp := client.DescribeAlarmsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarms -func (c *CloudWatch) DescribeAlarmsRequest(input *DescribeAlarmsInput) (req *request.Request, output *DescribeAlarmsOutput) { - op := &request.Operation{ - Name: opDescribeAlarms, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeAlarmsInput{} - } - - output = &DescribeAlarmsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAlarms API operation for Amazon CloudWatch. -// -// Retrieves the specified alarms. If no alarms are specified, all alarms are -// returned. Alarms can be retrieved by using only a prefix for the alarm name, -// the alarm state, or a prefix for any action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation DescribeAlarms for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The next token specified is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarms -func (c *CloudWatch) DescribeAlarms(input *DescribeAlarmsInput) (*DescribeAlarmsOutput, error) { - req, out := c.DescribeAlarmsRequest(input) - return out, req.Send() -} - -// DescribeAlarmsWithContext is the same as DescribeAlarms with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAlarms for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) DescribeAlarmsWithContext(ctx aws.Context, input *DescribeAlarmsInput, opts ...request.Option) (*DescribeAlarmsOutput, error) { - req, out := c.DescribeAlarmsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeAlarmsPages iterates over the pages of a DescribeAlarms operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeAlarms 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 DescribeAlarms operation. -// pageNum := 0 -// err := client.DescribeAlarmsPages(params, -// func(page *DescribeAlarmsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudWatch) DescribeAlarmsPages(input *DescribeAlarmsInput, fn func(*DescribeAlarmsOutput, bool) bool) error { - return c.DescribeAlarmsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeAlarmsPagesWithContext same as DescribeAlarmsPages 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 *CloudWatch) DescribeAlarmsPagesWithContext(ctx aws.Context, input *DescribeAlarmsInput, fn func(*DescribeAlarmsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeAlarmsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeAlarmsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeAlarmsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeAlarmsForMetric = "DescribeAlarmsForMetric" - -// DescribeAlarmsForMetricRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAlarmsForMetric operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAlarmsForMetric for more information on using the DescribeAlarmsForMetric -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAlarmsForMetricRequest method. -// req, resp := client.DescribeAlarmsForMetricRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsForMetric -func (c *CloudWatch) DescribeAlarmsForMetricRequest(input *DescribeAlarmsForMetricInput) (req *request.Request, output *DescribeAlarmsForMetricOutput) { - op := &request.Operation{ - Name: opDescribeAlarmsForMetric, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAlarmsForMetricInput{} - } - - output = &DescribeAlarmsForMetricOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAlarmsForMetric API operation for Amazon CloudWatch. -// -// Retrieves the alarms for the specified metric. To filter the results, specify -// a statistic, period, or unit. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation DescribeAlarmsForMetric for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsForMetric -func (c *CloudWatch) DescribeAlarmsForMetric(input *DescribeAlarmsForMetricInput) (*DescribeAlarmsForMetricOutput, error) { - req, out := c.DescribeAlarmsForMetricRequest(input) - return out, req.Send() -} - -// DescribeAlarmsForMetricWithContext is the same as DescribeAlarmsForMetric with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAlarmsForMetric for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) DescribeAlarmsForMetricWithContext(ctx aws.Context, input *DescribeAlarmsForMetricInput, opts ...request.Option) (*DescribeAlarmsForMetricOutput, error) { - req, out := c.DescribeAlarmsForMetricRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableAlarmActions = "DisableAlarmActions" - -// DisableAlarmActionsRequest generates a "aws/request.Request" representing the -// client's request for the DisableAlarmActions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableAlarmActions for more information on using the DisableAlarmActions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableAlarmActionsRequest method. -// req, resp := client.DisableAlarmActionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DisableAlarmActions -func (c *CloudWatch) DisableAlarmActionsRequest(input *DisableAlarmActionsInput) (req *request.Request, output *DisableAlarmActionsOutput) { - op := &request.Operation{ - Name: opDisableAlarmActions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableAlarmActionsInput{} - } - - output = &DisableAlarmActionsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisableAlarmActions API operation for Amazon CloudWatch. -// -// Disables the actions for the specified alarms. When an alarm's actions are -// disabled, the alarm actions do not execute when the alarm state changes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation DisableAlarmActions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DisableAlarmActions -func (c *CloudWatch) DisableAlarmActions(input *DisableAlarmActionsInput) (*DisableAlarmActionsOutput, error) { - req, out := c.DisableAlarmActionsRequest(input) - return out, req.Send() -} - -// DisableAlarmActionsWithContext is the same as DisableAlarmActions with the addition of -// the ability to pass a context and additional request options. -// -// See DisableAlarmActions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) DisableAlarmActionsWithContext(ctx aws.Context, input *DisableAlarmActionsInput, opts ...request.Option) (*DisableAlarmActionsOutput, error) { - req, out := c.DisableAlarmActionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableAlarmActions = "EnableAlarmActions" - -// EnableAlarmActionsRequest generates a "aws/request.Request" representing the -// client's request for the EnableAlarmActions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableAlarmActions for more information on using the EnableAlarmActions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableAlarmActionsRequest method. -// req, resp := client.EnableAlarmActionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/EnableAlarmActions -func (c *CloudWatch) EnableAlarmActionsRequest(input *EnableAlarmActionsInput) (req *request.Request, output *EnableAlarmActionsOutput) { - op := &request.Operation{ - Name: opEnableAlarmActions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableAlarmActionsInput{} - } - - output = &EnableAlarmActionsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableAlarmActions API operation for Amazon CloudWatch. -// -// Enables the actions for the specified alarms. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation EnableAlarmActions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/EnableAlarmActions -func (c *CloudWatch) EnableAlarmActions(input *EnableAlarmActionsInput) (*EnableAlarmActionsOutput, error) { - req, out := c.EnableAlarmActionsRequest(input) - return out, req.Send() -} - -// EnableAlarmActionsWithContext is the same as EnableAlarmActions with the addition of -// the ability to pass a context and additional request options. -// -// See EnableAlarmActions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) EnableAlarmActionsWithContext(ctx aws.Context, input *EnableAlarmActionsInput, opts ...request.Option) (*EnableAlarmActionsOutput, error) { - req, out := c.EnableAlarmActionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDashboard = "GetDashboard" - -// GetDashboardRequest generates a "aws/request.Request" representing the -// client's request for the GetDashboard operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDashboard for more information on using the GetDashboard -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDashboardRequest method. -// req, resp := client.GetDashboardRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetDashboard -func (c *CloudWatch) GetDashboardRequest(input *GetDashboardInput) (req *request.Request, output *GetDashboardOutput) { - op := &request.Operation{ - Name: opGetDashboard, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDashboardInput{} - } - - output = &GetDashboardOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDashboard API operation for Amazon CloudWatch. -// -// Displays the details of the dashboard that you specify. -// -// To copy an existing dashboard, use GetDashboard, and then use the data returned -// within DashboardBody as the template for the new dashboard when you call -// PutDashboard to create the copy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation GetDashboard for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value of an input parameter is bad or out-of-range. -// -// * ErrCodeDashboardNotFoundError "ResourceNotFound" -// The specified dashboard does not exist. -// -// * ErrCodeInternalServiceFault "InternalServiceError" -// Request processing has failed due to some unknown error, exception, or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetDashboard -func (c *CloudWatch) GetDashboard(input *GetDashboardInput) (*GetDashboardOutput, error) { - req, out := c.GetDashboardRequest(input) - return out, req.Send() -} - -// GetDashboardWithContext is the same as GetDashboard with the addition of -// the ability to pass a context and additional request options. -// -// See GetDashboard for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) GetDashboardWithContext(ctx aws.Context, input *GetDashboardInput, opts ...request.Option) (*GetDashboardOutput, error) { - req, out := c.GetDashboardRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMetricData = "GetMetricData" - -// GetMetricDataRequest generates a "aws/request.Request" representing the -// client's request for the GetMetricData operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMetricData for more information on using the GetMetricData -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMetricDataRequest method. -// req, resp := client.GetMetricDataRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricData -func (c *CloudWatch) GetMetricDataRequest(input *GetMetricDataInput) (req *request.Request, output *GetMetricDataOutput) { - op := &request.Operation{ - Name: opGetMetricData, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetMetricDataInput{} - } - - output = &GetMetricDataOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMetricData API operation for Amazon CloudWatch. -// -// You can use the GetMetricData API to retrieve as many as 100 different metrics -// in a single request, with a total of as many as 100,800 datapoints. You can -// also optionally perform math expressions on the values of the returned statistics, -// to create new time series that represent new insights into your data. For -// example, using Lambda metrics, you could divide the Errors metric by the -// Invocations metric to get an error rate time series. For more information -// about metric math expressions, see Metric Math Syntax and Functions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) -// in the Amazon CloudWatch User Guide. -// -// Calls to the GetMetricData API have a different pricing structure than calls -// to GetMetricStatistics. For more information about pricing, see Amazon CloudWatch -// Pricing (https://aws.amazon.com/cloudwatch/pricing/). -// -// Amazon CloudWatch retains metric data as follows: -// -// * Data points with a period of less than 60 seconds are available for -// 3 hours. These data points are high-resolution metrics and are available -// only for custom metrics that have been defined with a StorageResolution -// of 1. -// -// * Data points with a period of 60 seconds (1-minute) are available for -// 15 days. -// -// * Data points with a period of 300 seconds (5-minute) are available for -// 63 days. -// -// * Data points with a period of 3600 seconds (1 hour) are available for -// 455 days (15 months). -// -// Data points that are initially published with a shorter period are aggregated -// together for long-term storage. For example, if you collect data using a -// period of 1 minute, the data remains available for 15 days with 1-minute -// resolution. After 15 days, this data is still available, but is aggregated -// and retrievable only with a resolution of 5 minutes. After 63 days, the data -// is further aggregated and is available with a resolution of 1 hour. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation GetMetricData for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The next token specified is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricData -func (c *CloudWatch) GetMetricData(input *GetMetricDataInput) (*GetMetricDataOutput, error) { - req, out := c.GetMetricDataRequest(input) - return out, req.Send() -} - -// GetMetricDataWithContext is the same as GetMetricData with the addition of -// the ability to pass a context and additional request options. -// -// See GetMetricData for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) GetMetricDataWithContext(ctx aws.Context, input *GetMetricDataInput, opts ...request.Option) (*GetMetricDataOutput, error) { - req, out := c.GetMetricDataRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMetricStatistics = "GetMetricStatistics" - -// GetMetricStatisticsRequest generates a "aws/request.Request" representing the -// client's request for the GetMetricStatistics operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMetricStatistics for more information on using the GetMetricStatistics -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMetricStatisticsRequest method. -// req, resp := client.GetMetricStatisticsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricStatistics -func (c *CloudWatch) GetMetricStatisticsRequest(input *GetMetricStatisticsInput) (req *request.Request, output *GetMetricStatisticsOutput) { - op := &request.Operation{ - Name: opGetMetricStatistics, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetMetricStatisticsInput{} - } - - output = &GetMetricStatisticsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMetricStatistics API operation for Amazon CloudWatch. -// -// Gets statistics for the specified metric. -// -// The maximum number of data points returned from a single call is 1,440. If -// you request more than 1,440 data points, CloudWatch returns an error. To -// reduce the number of data points, you can narrow the specified time range -// and make multiple requests across adjacent time ranges, or you can increase -// the specified period. Data points are not returned in chronological order. -// -// CloudWatch aggregates data points based on the length of the period that -// you specify. For example, if you request statistics with a one-hour period, -// CloudWatch aggregates all data points with time stamps that fall within each -// one-hour period. Therefore, the number of values aggregated by CloudWatch -// is larger than the number of data points returned. -// -// CloudWatch needs raw data points to calculate percentile statistics. If you -// publish data using a statistic set instead, you can only retrieve percentile -// statistics for this data if one of the following conditions is true: -// -// * The SampleCount value of the statistic set is 1. -// -// * The Min and the Max values of the statistic set are equal. -// -// Percentile statistics are not available for metrics when any of the metric -// values are negative numbers. -// -// Amazon CloudWatch retains metric data as follows: -// -// * Data points with a period of less than 60 seconds are available for -// 3 hours. These data points are high-resolution metrics and are available -// only for custom metrics that have been defined with a StorageResolution -// of 1. -// -// * Data points with a period of 60 seconds (1-minute) are available for -// 15 days. -// -// * Data points with a period of 300 seconds (5-minute) are available for -// 63 days. -// -// * Data points with a period of 3600 seconds (1 hour) are available for -// 455 days (15 months). -// -// Data points that are initially published with a shorter period are aggregated -// together for long-term storage. For example, if you collect data using a -// period of 1 minute, the data remains available for 15 days with 1-minute -// resolution. After 15 days, this data is still available, but is aggregated -// and retrievable only with a resolution of 5 minutes. After 63 days, the data -// is further aggregated and is available with a resolution of 1 hour. -// -// CloudWatch started retaining 5-minute and 1-hour metric data as of July 9, -// 2016. -// -// For information about metrics and dimensions supported by AWS services, see -// the Amazon CloudWatch Metrics and Dimensions Reference (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CW_Support_For_AWS.html) -// in the Amazon CloudWatch User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation GetMetricStatistics for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value of an input parameter is bad or out-of-range. -// -// * ErrCodeMissingRequiredParameterException "MissingParameter" -// An input parameter that is required is missing. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Parameters were used together that cannot be used together. -// -// * ErrCodeInternalServiceFault "InternalServiceError" -// Request processing has failed due to some unknown error, exception, or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricStatistics -func (c *CloudWatch) GetMetricStatistics(input *GetMetricStatisticsInput) (*GetMetricStatisticsOutput, error) { - req, out := c.GetMetricStatisticsRequest(input) - return out, req.Send() -} - -// GetMetricStatisticsWithContext is the same as GetMetricStatistics with the addition of -// the ability to pass a context and additional request options. -// -// See GetMetricStatistics for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) GetMetricStatisticsWithContext(ctx aws.Context, input *GetMetricStatisticsInput, opts ...request.Option) (*GetMetricStatisticsOutput, error) { - req, out := c.GetMetricStatisticsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMetricWidgetImage = "GetMetricWidgetImage" - -// GetMetricWidgetImageRequest generates a "aws/request.Request" representing the -// client's request for the GetMetricWidgetImage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMetricWidgetImage for more information on using the GetMetricWidgetImage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMetricWidgetImageRequest method. -// req, resp := client.GetMetricWidgetImageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricWidgetImage -func (c *CloudWatch) GetMetricWidgetImageRequest(input *GetMetricWidgetImageInput) (req *request.Request, output *GetMetricWidgetImageOutput) { - op := &request.Operation{ - Name: opGetMetricWidgetImage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetMetricWidgetImageInput{} - } - - output = &GetMetricWidgetImageOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMetricWidgetImage API operation for Amazon CloudWatch. -// -// You can use the GetMetricWidgetImage API to retrieve a snapshot graph of -// one or more Amazon CloudWatch metrics as a bitmap image. You can then embed -// this image into your services and products, such as wiki pages, reports, -// and documents. You could also retrieve images regularly, such as every minute, -// and create your own custom live dashboard. -// -// The graph you retrieve can include all CloudWatch metric graph features, -// including metric math and horizontal and vertical annotations. -// -// There is a limit of 20 transactions per second for this API. Each GetMetricWidgetImage -// action has the following limits: -// -// * As many as 100 metrics in the graph. -// -// * Up to 100 KB uncompressed payload. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation GetMetricWidgetImage for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricWidgetImage -func (c *CloudWatch) GetMetricWidgetImage(input *GetMetricWidgetImageInput) (*GetMetricWidgetImageOutput, error) { - req, out := c.GetMetricWidgetImageRequest(input) - return out, req.Send() -} - -// GetMetricWidgetImageWithContext is the same as GetMetricWidgetImage with the addition of -// the ability to pass a context and additional request options. -// -// See GetMetricWidgetImage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) GetMetricWidgetImageWithContext(ctx aws.Context, input *GetMetricWidgetImageInput, opts ...request.Option) (*GetMetricWidgetImageOutput, error) { - req, out := c.GetMetricWidgetImageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDashboards = "ListDashboards" - -// ListDashboardsRequest generates a "aws/request.Request" representing the -// client's request for the ListDashboards operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDashboards for more information on using the ListDashboards -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDashboardsRequest method. -// req, resp := client.ListDashboardsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListDashboards -func (c *CloudWatch) ListDashboardsRequest(input *ListDashboardsInput) (req *request.Request, output *ListDashboardsOutput) { - op := &request.Operation{ - Name: opListDashboards, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListDashboardsInput{} - } - - output = &ListDashboardsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDashboards API operation for Amazon CloudWatch. -// -// Returns a list of the dashboards for your account. If you include DashboardNamePrefix, -// only those dashboards with names starting with the prefix are listed. Otherwise, -// all dashboards in your account are listed. -// -// ListDashboards returns up to 1000 results on one page. If there are more -// than 1000 dashboards, you can call ListDashboards again and include the value -// you received for NextToken in the first call, to receive the next 1000 results. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation ListDashboards for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value of an input parameter is bad or out-of-range. -// -// * ErrCodeInternalServiceFault "InternalServiceError" -// Request processing has failed due to some unknown error, exception, or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListDashboards -func (c *CloudWatch) ListDashboards(input *ListDashboardsInput) (*ListDashboardsOutput, error) { - req, out := c.ListDashboardsRequest(input) - return out, req.Send() -} - -// ListDashboardsWithContext is the same as ListDashboards with the addition of -// the ability to pass a context and additional request options. -// -// See ListDashboards for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) ListDashboardsWithContext(ctx aws.Context, input *ListDashboardsInput, opts ...request.Option) (*ListDashboardsOutput, error) { - req, out := c.ListDashboardsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListMetrics = "ListMetrics" - -// ListMetricsRequest generates a "aws/request.Request" representing the -// client's request for the ListMetrics operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListMetrics for more information on using the ListMetrics -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListMetricsRequest method. -// req, resp := client.ListMetricsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetrics -func (c *CloudWatch) ListMetricsRequest(input *ListMetricsInput) (req *request.Request, output *ListMetricsOutput) { - op := &request.Operation{ - Name: opListMetrics, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListMetricsInput{} - } - - output = &ListMetricsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListMetrics API operation for Amazon CloudWatch. -// -// List the specified metrics. You can use the returned metrics with GetMetricData -// or GetMetricStatistics to obtain statistical data. -// -// Up to 500 results are returned for any one call. To retrieve additional results, -// use the returned token with subsequent calls. -// -// After you create a metric, allow up to fifteen minutes before the metric -// appears. Statistics about the metric, however, are available sooner using -// GetMetricData or GetMetricStatistics. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation ListMetrics for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceFault "InternalServiceError" -// Request processing has failed due to some unknown error, exception, or failure. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value of an input parameter is bad or out-of-range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetrics -func (c *CloudWatch) ListMetrics(input *ListMetricsInput) (*ListMetricsOutput, error) { - req, out := c.ListMetricsRequest(input) - return out, req.Send() -} - -// ListMetricsWithContext is the same as ListMetrics with the addition of -// the ability to pass a context and additional request options. -// -// See ListMetrics for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) ListMetricsWithContext(ctx aws.Context, input *ListMetricsInput, opts ...request.Option) (*ListMetricsOutput, error) { - req, out := c.ListMetricsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListMetricsPages iterates over the pages of a ListMetrics operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListMetrics 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 ListMetrics operation. -// pageNum := 0 -// err := client.ListMetricsPages(params, -// func(page *ListMetricsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudWatch) ListMetricsPages(input *ListMetricsInput, fn func(*ListMetricsOutput, bool) bool) error { - return c.ListMetricsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListMetricsPagesWithContext same as ListMetricsPages 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 *CloudWatch) ListMetricsPagesWithContext(ctx aws.Context, input *ListMetricsInput, fn func(*ListMetricsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListMetricsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListMetricsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMetricsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opPutDashboard = "PutDashboard" - -// PutDashboardRequest generates a "aws/request.Request" representing the -// client's request for the PutDashboard operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutDashboard for more information on using the PutDashboard -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutDashboardRequest method. -// req, resp := client.PutDashboardRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutDashboard -func (c *CloudWatch) PutDashboardRequest(input *PutDashboardInput) (req *request.Request, output *PutDashboardOutput) { - op := &request.Operation{ - Name: opPutDashboard, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutDashboardInput{} - } - - output = &PutDashboardOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutDashboard API operation for Amazon CloudWatch. -// -// Creates a dashboard if it does not already exist, or updates an existing -// dashboard. If you update a dashboard, the entire contents are replaced with -// what you specify here. -// -// There is no limit to the number of dashboards in your account. All dashboards -// in your account are global, not region-specific. -// -// A simple way to create a dashboard using PutDashboard is to copy an existing -// dashboard. To copy an existing dashboard using the console, you can load -// the dashboard and then use the View/edit source command in the Actions menu -// to display the JSON block for that dashboard. Another way to copy a dashboard -// is to use GetDashboard, and then use the data returned within DashboardBody -// as the template for the new dashboard when you call PutDashboard. -// -// When you create a dashboard with PutDashboard, a good practice is to add -// a text widget at the top of the dashboard with a message that the dashboard -// was created by script and should not be changed in the console. This message -// could also point console users to the location of the DashboardBody script -// or the CloudFormation template used to create the dashboard. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation PutDashboard for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDashboardInvalidInputError "InvalidParameterInput" -// Some part of the dashboard data is invalid. -// -// * ErrCodeInternalServiceFault "InternalServiceError" -// Request processing has failed due to some unknown error, exception, or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutDashboard -func (c *CloudWatch) PutDashboard(input *PutDashboardInput) (*PutDashboardOutput, error) { - req, out := c.PutDashboardRequest(input) - return out, req.Send() -} - -// PutDashboardWithContext is the same as PutDashboard with the addition of -// the ability to pass a context and additional request options. -// -// See PutDashboard for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) PutDashboardWithContext(ctx aws.Context, input *PutDashboardInput, opts ...request.Option) (*PutDashboardOutput, error) { - req, out := c.PutDashboardRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutMetricAlarm = "PutMetricAlarm" - -// PutMetricAlarmRequest generates a "aws/request.Request" representing the -// client's request for the PutMetricAlarm operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutMetricAlarm for more information on using the PutMetricAlarm -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutMetricAlarmRequest method. -// req, resp := client.PutMetricAlarmRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricAlarm -func (c *CloudWatch) PutMetricAlarmRequest(input *PutMetricAlarmInput) (req *request.Request, output *PutMetricAlarmOutput) { - op := &request.Operation{ - Name: opPutMetricAlarm, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutMetricAlarmInput{} - } - - output = &PutMetricAlarmOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutMetricAlarm API operation for Amazon CloudWatch. -// -// Creates or updates an alarm and associates it with the specified metric or -// metric math expression. -// -// When this operation creates an alarm, the alarm state is immediately set -// to INSUFFICIENT_DATA. The alarm is then evaluated and its state is set appropriately. -// Any actions associated with the new state are then executed. -// -// When you update an existing alarm, its state is left unchanged, but the update -// completely overwrites the previous configuration of the alarm. -// -// If you are an IAM user, you must have Amazon EC2 permissions for some alarm -// operations: -// -// * iam:CreateServiceLinkedRole for all alarms with EC2 actions -// -// * ec2:DescribeInstanceStatus and ec2:DescribeInstances for all alarms -// on EC2 instance status metrics -// -// * ec2:StopInstances for alarms with stop actions -// -// * ec2:TerminateInstances for alarms with terminate actions -// -// * ec2:DescribeInstanceRecoveryAttribute and ec2:RecoverInstances for alarms -// with recover actions -// -// If you have read/write permissions for Amazon CloudWatch but not for Amazon -// EC2, you can still create an alarm, but the stop or terminate actions are -// not performed. However, if you are later granted the required permissions, -// the alarm actions that you created earlier are performed. -// -// If you are using an IAM role (for example, an EC2 instance profile), you -// cannot stop or terminate the instance using alarm actions. However, you can -// still see the alarm state and perform any other actions such as Amazon SNS -// notifications or Auto Scaling policies. -// -// If you are using temporary security credentials granted using AWS STS, you -// cannot stop or terminate an EC2 instance using alarm actions. -// -// The first time you create an alarm in the AWS Management Console, the CLI, -// or by using the PutMetricAlarm API, CloudWatch creates the necessary service-linked -// role for you. The service-linked role is called AWSServiceRoleForCloudWatchEvents. -// For more information, see AWS service-linked role (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation PutMetricAlarm for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededFault "LimitExceeded" -// The quota for alarms for this customer has already been reached. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricAlarm -func (c *CloudWatch) PutMetricAlarm(input *PutMetricAlarmInput) (*PutMetricAlarmOutput, error) { - req, out := c.PutMetricAlarmRequest(input) - return out, req.Send() -} - -// PutMetricAlarmWithContext is the same as PutMetricAlarm with the addition of -// the ability to pass a context and additional request options. -// -// See PutMetricAlarm for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) PutMetricAlarmWithContext(ctx aws.Context, input *PutMetricAlarmInput, opts ...request.Option) (*PutMetricAlarmOutput, error) { - req, out := c.PutMetricAlarmRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutMetricData = "PutMetricData" - -// PutMetricDataRequest generates a "aws/request.Request" representing the -// client's request for the PutMetricData operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutMetricData for more information on using the PutMetricData -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutMetricDataRequest method. -// req, resp := client.PutMetricDataRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricData -func (c *CloudWatch) PutMetricDataRequest(input *PutMetricDataInput) (req *request.Request, output *PutMetricDataOutput) { - op := &request.Operation{ - Name: opPutMetricData, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutMetricDataInput{} - } - - output = &PutMetricDataOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutMetricData API operation for Amazon CloudWatch. -// -// Publishes metric data points to Amazon CloudWatch. CloudWatch associates -// the data points with the specified metric. If the specified metric does not -// exist, CloudWatch creates the metric. When CloudWatch creates a metric, it -// can take up to fifteen minutes for the metric to appear in calls to ListMetrics. -// -// You can publish either individual data points in the Value field, or arrays -// of values and the number of times each value occurred during the period by -// using the Values and Counts fields in the MetricDatum structure. Using the -// Values and Counts method enables you to publish up to 150 values per metric -// with one PutMetricData request, and supports retrieving percentile statistics -// on this data. -// -// Each PutMetricData request is limited to 40 KB in size for HTTP POST requests. -// You can send a payload compressed by gzip. Each request is also limited to -// no more than 20 different metrics. -// -// Although the Value parameter accepts numbers of type Double, CloudWatch rejects -// values that are either too small or too large. Values must be in the range -// of 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). -// In addition, special values (for example, NaN, +Infinity, -Infinity) are -// not supported. -// -// You can use up to 10 dimensions per metric to further clarify what data the -// metric collects. For more information about specifying dimensions, see Publishing -// Metrics (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html) -// in the Amazon CloudWatch User Guide. -// -// Data points with time stamps from 24 hours ago or longer can take at least -// 48 hours to become available for GetMetricData or GetMetricStatistics from -// the time they are submitted. -// -// CloudWatch needs raw data points to calculate percentile statistics. If you -// publish data using a statistic set instead, you can only retrieve percentile -// statistics for this data if one of the following conditions is true: -// -// * The SampleCount value of the statistic set is 1 and Min, Max, and Sum -// are all equal. -// -// * The Min and Max are equal, and Sum is equal to Min multiplied by SampleCount. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation PutMetricData for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value of an input parameter is bad or out-of-range. -// -// * ErrCodeMissingRequiredParameterException "MissingParameter" -// An input parameter that is required is missing. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Parameters were used together that cannot be used together. -// -// * ErrCodeInternalServiceFault "InternalServiceError" -// Request processing has failed due to some unknown error, exception, or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricData -func (c *CloudWatch) PutMetricData(input *PutMetricDataInput) (*PutMetricDataOutput, error) { - req, out := c.PutMetricDataRequest(input) - return out, req.Send() -} - -// PutMetricDataWithContext is the same as PutMetricData with the addition of -// the ability to pass a context and additional request options. -// -// See PutMetricData for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) PutMetricDataWithContext(ctx aws.Context, input *PutMetricDataInput, opts ...request.Option) (*PutMetricDataOutput, error) { - req, out := c.PutMetricDataRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetAlarmState = "SetAlarmState" - -// SetAlarmStateRequest generates a "aws/request.Request" representing the -// client's request for the SetAlarmState operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetAlarmState for more information on using the SetAlarmState -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetAlarmStateRequest method. -// req, resp := client.SetAlarmStateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/SetAlarmState -func (c *CloudWatch) SetAlarmStateRequest(input *SetAlarmStateInput) (req *request.Request, output *SetAlarmStateOutput) { - op := &request.Operation{ - Name: opSetAlarmState, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetAlarmStateInput{} - } - - output = &SetAlarmStateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetAlarmState API operation for Amazon CloudWatch. -// -// Temporarily sets the state of an alarm for testing purposes. When the updated -// state differs from the previous value, the action configured for the appropriate -// state is invoked. For example, if your alarm is configured to send an Amazon -// SNS message when an alarm is triggered, temporarily changing the alarm state -// to ALARM sends an SNS message. The alarm returns to its actual state (often -// within seconds). Because the alarm state change happens quickly, it is typically -// only visible in the alarm's History tab in the Amazon CloudWatch console -// or through DescribeAlarmHistory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch's -// API operation SetAlarmState for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFound "ResourceNotFound" -// The named resource does not exist. -// -// * ErrCodeInvalidFormatFault "InvalidFormat" -// Data was not syntactically valid JSON. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/SetAlarmState -func (c *CloudWatch) SetAlarmState(input *SetAlarmStateInput) (*SetAlarmStateOutput, error) { - req, out := c.SetAlarmStateRequest(input) - return out, req.Send() -} - -// SetAlarmStateWithContext is the same as SetAlarmState with the addition of -// the ability to pass a context and additional request options. -// -// See SetAlarmState for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) SetAlarmStateWithContext(ctx aws.Context, input *SetAlarmStateInput, opts ...request.Option) (*SetAlarmStateOutput, error) { - req, out := c.SetAlarmStateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Represents the history of a specific alarm. -type AlarmHistoryItem struct { - _ struct{} `type:"structure"` - - // The descriptive name for the alarm. - AlarmName *string `min:"1" type:"string"` - - // Data about the alarm, in JSON format. - HistoryData *string `min:"1" type:"string"` - - // The type of alarm history item. - HistoryItemType *string `type:"string" enum:"HistoryItemType"` - - // A summary of the alarm history, in text format. - HistorySummary *string `min:"1" type:"string"` - - // The time stamp for the alarm history item. - Timestamp *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s AlarmHistoryItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AlarmHistoryItem) GoString() string { - return s.String() -} - -// SetAlarmName sets the AlarmName field's value. -func (s *AlarmHistoryItem) SetAlarmName(v string) *AlarmHistoryItem { - s.AlarmName = &v - return s -} - -// SetHistoryData sets the HistoryData field's value. -func (s *AlarmHistoryItem) SetHistoryData(v string) *AlarmHistoryItem { - s.HistoryData = &v - return s -} - -// SetHistoryItemType sets the HistoryItemType field's value. -func (s *AlarmHistoryItem) SetHistoryItemType(v string) *AlarmHistoryItem { - s.HistoryItemType = &v - return s -} - -// SetHistorySummary sets the HistorySummary field's value. -func (s *AlarmHistoryItem) SetHistorySummary(v string) *AlarmHistoryItem { - s.HistorySummary = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *AlarmHistoryItem) SetTimestamp(v time.Time) *AlarmHistoryItem { - s.Timestamp = &v - return s -} - -// Represents a specific dashboard. -type DashboardEntry struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the dashboard. - DashboardArn *string `type:"string"` - - // The name of the dashboard. - DashboardName *string `type:"string"` - - // The time stamp of when the dashboard was last modified, either by an API - // call or through the console. This number is expressed as the number of milliseconds - // since Jan 1, 1970 00:00:00 UTC. - LastModified *time.Time `type:"timestamp"` - - // The size of the dashboard, in bytes. - Size *int64 `type:"long"` -} - -// String returns the string representation -func (s DashboardEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DashboardEntry) GoString() string { - return s.String() -} - -// SetDashboardArn sets the DashboardArn field's value. -func (s *DashboardEntry) SetDashboardArn(v string) *DashboardEntry { - s.DashboardArn = &v - return s -} - -// SetDashboardName sets the DashboardName field's value. -func (s *DashboardEntry) SetDashboardName(v string) *DashboardEntry { - s.DashboardName = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *DashboardEntry) SetLastModified(v time.Time) *DashboardEntry { - s.LastModified = &v - return s -} - -// SetSize sets the Size field's value. -func (s *DashboardEntry) SetSize(v int64) *DashboardEntry { - s.Size = &v - return s -} - -// An error or warning for the operation. -type DashboardValidationMessage struct { - _ struct{} `type:"structure"` - - // The data path related to the message. - DataPath *string `type:"string"` - - // A message describing the error or warning. - Message *string `type:"string"` -} - -// String returns the string representation -func (s DashboardValidationMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DashboardValidationMessage) GoString() string { - return s.String() -} - -// SetDataPath sets the DataPath field's value. -func (s *DashboardValidationMessage) SetDataPath(v string) *DashboardValidationMessage { - s.DataPath = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *DashboardValidationMessage) SetMessage(v string) *DashboardValidationMessage { - s.Message = &v - return s -} - -// Encapsulates the statistical data that CloudWatch computes from metric data. -type Datapoint struct { - _ struct{} `type:"structure"` - - // The average of the metric values that correspond to the data point. - Average *float64 `type:"double"` - - // The percentile statistic for the data point. - ExtendedStatistics map[string]*float64 `type:"map"` - - // The maximum metric value for the data point. - Maximum *float64 `type:"double"` - - // The minimum metric value for the data point. - Minimum *float64 `type:"double"` - - // The number of metric values that contributed to the aggregate value of this - // data point. - SampleCount *float64 `type:"double"` - - // The sum of the metric values for the data point. - Sum *float64 `type:"double"` - - // The time stamp used for the data point. - Timestamp *time.Time `type:"timestamp"` - - // The standard unit for the data point. - Unit *string `type:"string" enum:"StandardUnit"` -} - -// String returns the string representation -func (s Datapoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Datapoint) GoString() string { - return s.String() -} - -// SetAverage sets the Average field's value. -func (s *Datapoint) SetAverage(v float64) *Datapoint { - s.Average = &v - return s -} - -// SetExtendedStatistics sets the ExtendedStatistics field's value. -func (s *Datapoint) SetExtendedStatistics(v map[string]*float64) *Datapoint { - s.ExtendedStatistics = v - return s -} - -// SetMaximum sets the Maximum field's value. -func (s *Datapoint) SetMaximum(v float64) *Datapoint { - s.Maximum = &v - return s -} - -// SetMinimum sets the Minimum field's value. -func (s *Datapoint) SetMinimum(v float64) *Datapoint { - s.Minimum = &v - return s -} - -// SetSampleCount sets the SampleCount field's value. -func (s *Datapoint) SetSampleCount(v float64) *Datapoint { - s.SampleCount = &v - return s -} - -// SetSum sets the Sum field's value. -func (s *Datapoint) SetSum(v float64) *Datapoint { - s.Sum = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *Datapoint) SetTimestamp(v time.Time) *Datapoint { - s.Timestamp = &v - return s -} - -// SetUnit sets the Unit field's value. -func (s *Datapoint) SetUnit(v string) *Datapoint { - s.Unit = &v - return s -} - -type DeleteAlarmsInput struct { - _ struct{} `type:"structure"` - - // The alarms to be deleted. - // - // AlarmNames is a required field - AlarmNames []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteAlarmsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAlarmsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAlarmsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAlarmsInput"} - if s.AlarmNames == nil { - invalidParams.Add(request.NewErrParamRequired("AlarmNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlarmNames sets the AlarmNames field's value. -func (s *DeleteAlarmsInput) SetAlarmNames(v []*string) *DeleteAlarmsInput { - s.AlarmNames = v - return s -} - -type DeleteAlarmsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAlarmsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAlarmsOutput) GoString() string { - return s.String() -} - -type DeleteDashboardsInput struct { - _ struct{} `type:"structure"` - - // The dashboards to be deleted. This parameter is required. - // - // DashboardNames is a required field - DashboardNames []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteDashboardsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDashboardsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDashboardsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDashboardsInput"} - if s.DashboardNames == nil { - invalidParams.Add(request.NewErrParamRequired("DashboardNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDashboardNames sets the DashboardNames field's value. -func (s *DeleteDashboardsInput) SetDashboardNames(v []*string) *DeleteDashboardsInput { - s.DashboardNames = v - return s -} - -type DeleteDashboardsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDashboardsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDashboardsOutput) GoString() string { - return s.String() -} - -type DescribeAlarmHistoryInput struct { - _ struct{} `type:"structure"` - - // The name of the alarm. - AlarmName *string `min:"1" type:"string"` - - // The ending date to retrieve alarm history. - EndDate *time.Time `type:"timestamp"` - - // The type of alarm histories to retrieve. - HistoryItemType *string `type:"string" enum:"HistoryItemType"` - - // The maximum number of alarm history records to retrieve. - MaxRecords *int64 `min:"1" type:"integer"` - - // The token returned by a previous call to indicate that there is more data - // available. - NextToken *string `type:"string"` - - // The starting date to retrieve alarm history. - StartDate *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s DescribeAlarmHistoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAlarmHistoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAlarmHistoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAlarmHistoryInput"} - if s.AlarmName != nil && len(*s.AlarmName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AlarmName", 1)) - } - if s.MaxRecords != nil && *s.MaxRecords < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlarmName sets the AlarmName field's value. -func (s *DescribeAlarmHistoryInput) SetAlarmName(v string) *DescribeAlarmHistoryInput { - s.AlarmName = &v - return s -} - -// SetEndDate sets the EndDate field's value. -func (s *DescribeAlarmHistoryInput) SetEndDate(v time.Time) *DescribeAlarmHistoryInput { - s.EndDate = &v - return s -} - -// SetHistoryItemType sets the HistoryItemType field's value. -func (s *DescribeAlarmHistoryInput) SetHistoryItemType(v string) *DescribeAlarmHistoryInput { - s.HistoryItemType = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeAlarmHistoryInput) SetMaxRecords(v int64) *DescribeAlarmHistoryInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAlarmHistoryInput) SetNextToken(v string) *DescribeAlarmHistoryInput { - s.NextToken = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *DescribeAlarmHistoryInput) SetStartDate(v time.Time) *DescribeAlarmHistoryInput { - s.StartDate = &v - return s -} - -type DescribeAlarmHistoryOutput struct { - _ struct{} `type:"structure"` - - // The alarm histories, in JSON format. - AlarmHistoryItems []*AlarmHistoryItem `type:"list"` - - // The token that marks the start of the next batch of returned results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAlarmHistoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAlarmHistoryOutput) GoString() string { - return s.String() -} - -// SetAlarmHistoryItems sets the AlarmHistoryItems field's value. -func (s *DescribeAlarmHistoryOutput) SetAlarmHistoryItems(v []*AlarmHistoryItem) *DescribeAlarmHistoryOutput { - s.AlarmHistoryItems = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAlarmHistoryOutput) SetNextToken(v string) *DescribeAlarmHistoryOutput { - s.NextToken = &v - return s -} - -type DescribeAlarmsForMetricInput struct { - _ struct{} `type:"structure"` - - // The dimensions associated with the metric. If the metric has any associated - // dimensions, you must specify them in order for the call to succeed. - Dimensions []*Dimension `type:"list"` - - // The percentile statistic for the metric. Specify a value between p0.0 and - // p100. - ExtendedStatistic *string `type:"string"` - - // The name of the metric. - // - // MetricName is a required field - MetricName *string `min:"1" type:"string" required:"true"` - - // The namespace of the metric. - // - // Namespace is a required field - Namespace *string `min:"1" type:"string" required:"true"` - - // The period, in seconds, over which the statistic is applied. - Period *int64 `min:"1" type:"integer"` - - // The statistic for the metric, other than percentiles. For percentile statistics, - // use ExtendedStatistics. - Statistic *string `type:"string" enum:"Statistic"` - - // The unit for the metric. - Unit *string `type:"string" enum:"StandardUnit"` -} - -// String returns the string representation -func (s DescribeAlarmsForMetricInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAlarmsForMetricInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAlarmsForMetricInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAlarmsForMetricInput"} - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.MetricName != nil && len(*s.MetricName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) - } - if s.Namespace == nil { - invalidParams.Add(request.NewErrParamRequired("Namespace")) - } - if s.Namespace != nil && len(*s.Namespace) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) - } - if s.Period != nil && *s.Period < 1 { - invalidParams.Add(request.NewErrParamMinValue("Period", 1)) - } - if s.Dimensions != nil { - for i, v := range s.Dimensions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDimensions sets the Dimensions field's value. -func (s *DescribeAlarmsForMetricInput) SetDimensions(v []*Dimension) *DescribeAlarmsForMetricInput { - s.Dimensions = v - return s -} - -// SetExtendedStatistic sets the ExtendedStatistic field's value. -func (s *DescribeAlarmsForMetricInput) SetExtendedStatistic(v string) *DescribeAlarmsForMetricInput { - s.ExtendedStatistic = &v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *DescribeAlarmsForMetricInput) SetMetricName(v string) *DescribeAlarmsForMetricInput { - s.MetricName = &v - return s -} - -// SetNamespace sets the Namespace field's value. -func (s *DescribeAlarmsForMetricInput) SetNamespace(v string) *DescribeAlarmsForMetricInput { - s.Namespace = &v - return s -} - -// SetPeriod sets the Period field's value. -func (s *DescribeAlarmsForMetricInput) SetPeriod(v int64) *DescribeAlarmsForMetricInput { - s.Period = &v - return s -} - -// SetStatistic sets the Statistic field's value. -func (s *DescribeAlarmsForMetricInput) SetStatistic(v string) *DescribeAlarmsForMetricInput { - s.Statistic = &v - return s -} - -// SetUnit sets the Unit field's value. -func (s *DescribeAlarmsForMetricInput) SetUnit(v string) *DescribeAlarmsForMetricInput { - s.Unit = &v - return s -} - -type DescribeAlarmsForMetricOutput struct { - _ struct{} `type:"structure"` - - // The information for each alarm with the specified metric. - MetricAlarms []*MetricAlarm `type:"list"` -} - -// String returns the string representation -func (s DescribeAlarmsForMetricOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAlarmsForMetricOutput) GoString() string { - return s.String() -} - -// SetMetricAlarms sets the MetricAlarms field's value. -func (s *DescribeAlarmsForMetricOutput) SetMetricAlarms(v []*MetricAlarm) *DescribeAlarmsForMetricOutput { - s.MetricAlarms = v - return s -} - -type DescribeAlarmsInput struct { - _ struct{} `type:"structure"` - - // The action name prefix. - ActionPrefix *string `min:"1" type:"string"` - - // The alarm name prefix. If this parameter is specified, you cannot specify - // AlarmNames. - AlarmNamePrefix *string `min:"1" type:"string"` - - // The names of the alarms. - AlarmNames []*string `type:"list"` - - // The maximum number of alarm descriptions to retrieve. - MaxRecords *int64 `min:"1" type:"integer"` - - // The token returned by a previous call to indicate that there is more data - // available. - NextToken *string `type:"string"` - - // The state value to be used in matching alarms. - StateValue *string `type:"string" enum:"StateValue"` -} - -// String returns the string representation -func (s DescribeAlarmsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAlarmsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAlarmsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAlarmsInput"} - if s.ActionPrefix != nil && len(*s.ActionPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ActionPrefix", 1)) - } - if s.AlarmNamePrefix != nil && len(*s.AlarmNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AlarmNamePrefix", 1)) - } - if s.MaxRecords != nil && *s.MaxRecords < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionPrefix sets the ActionPrefix field's value. -func (s *DescribeAlarmsInput) SetActionPrefix(v string) *DescribeAlarmsInput { - s.ActionPrefix = &v - return s -} - -// SetAlarmNamePrefix sets the AlarmNamePrefix field's value. -func (s *DescribeAlarmsInput) SetAlarmNamePrefix(v string) *DescribeAlarmsInput { - s.AlarmNamePrefix = &v - return s -} - -// SetAlarmNames sets the AlarmNames field's value. -func (s *DescribeAlarmsInput) SetAlarmNames(v []*string) *DescribeAlarmsInput { - s.AlarmNames = v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeAlarmsInput) SetMaxRecords(v int64) *DescribeAlarmsInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAlarmsInput) SetNextToken(v string) *DescribeAlarmsInput { - s.NextToken = &v - return s -} - -// SetStateValue sets the StateValue field's value. -func (s *DescribeAlarmsInput) SetStateValue(v string) *DescribeAlarmsInput { - s.StateValue = &v - return s -} - -type DescribeAlarmsOutput struct { - _ struct{} `type:"structure"` - - // The information for the specified alarms. - MetricAlarms []*MetricAlarm `type:"list"` - - // The token that marks the start of the next batch of returned results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAlarmsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAlarmsOutput) GoString() string { - return s.String() -} - -// SetMetricAlarms sets the MetricAlarms field's value. -func (s *DescribeAlarmsOutput) SetMetricAlarms(v []*MetricAlarm) *DescribeAlarmsOutput { - s.MetricAlarms = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAlarmsOutput) SetNextToken(v string) *DescribeAlarmsOutput { - s.NextToken = &v - return s -} - -// Expands the identity of a metric. -type Dimension struct { - _ struct{} `type:"structure"` - - // The name of the dimension. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The value representing the dimension measurement. - // - // Value is a required field - Value *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Dimension) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Dimension) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Dimension) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Dimension"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *Dimension) SetName(v string) *Dimension { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Dimension) SetValue(v string) *Dimension { - s.Value = &v - return s -} - -// Represents filters for a dimension. -type DimensionFilter struct { - _ struct{} `type:"structure"` - - // The dimension name to be matched. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The value of the dimension to be matched. - Value *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DimensionFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DimensionFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DimensionFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DimensionFilter"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DimensionFilter) SetName(v string) *DimensionFilter { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *DimensionFilter) SetValue(v string) *DimensionFilter { - s.Value = &v - return s -} - -type DisableAlarmActionsInput struct { - _ struct{} `type:"structure"` - - // The names of the alarms. - // - // AlarmNames is a required field - AlarmNames []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DisableAlarmActionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableAlarmActionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableAlarmActionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableAlarmActionsInput"} - if s.AlarmNames == nil { - invalidParams.Add(request.NewErrParamRequired("AlarmNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlarmNames sets the AlarmNames field's value. -func (s *DisableAlarmActionsInput) SetAlarmNames(v []*string) *DisableAlarmActionsInput { - s.AlarmNames = v - return s -} - -type DisableAlarmActionsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableAlarmActionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableAlarmActionsOutput) GoString() string { - return s.String() -} - -type EnableAlarmActionsInput struct { - _ struct{} `type:"structure"` - - // The names of the alarms. - // - // AlarmNames is a required field - AlarmNames []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s EnableAlarmActionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableAlarmActionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableAlarmActionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableAlarmActionsInput"} - if s.AlarmNames == nil { - invalidParams.Add(request.NewErrParamRequired("AlarmNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlarmNames sets the AlarmNames field's value. -func (s *EnableAlarmActionsInput) SetAlarmNames(v []*string) *EnableAlarmActionsInput { - s.AlarmNames = v - return s -} - -type EnableAlarmActionsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableAlarmActionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableAlarmActionsOutput) GoString() string { - return s.String() -} - -type GetDashboardInput struct { - _ struct{} `type:"structure"` - - // The name of the dashboard to be described. - // - // DashboardName is a required field - DashboardName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDashboardInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDashboardInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDashboardInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDashboardInput"} - if s.DashboardName == nil { - invalidParams.Add(request.NewErrParamRequired("DashboardName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDashboardName sets the DashboardName field's value. -func (s *GetDashboardInput) SetDashboardName(v string) *GetDashboardInput { - s.DashboardName = &v - return s -} - -type GetDashboardOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the dashboard. - DashboardArn *string `type:"string"` - - // The detailed information about the dashboard, including what widgets are - // included and their location on the dashboard. For more information about - // the DashboardBody syntax, see CloudWatch-Dashboard-Body-Structure. - DashboardBody *string `type:"string"` - - // The name of the dashboard. - DashboardName *string `type:"string"` -} - -// String returns the string representation -func (s GetDashboardOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDashboardOutput) GoString() string { - return s.String() -} - -// SetDashboardArn sets the DashboardArn field's value. -func (s *GetDashboardOutput) SetDashboardArn(v string) *GetDashboardOutput { - s.DashboardArn = &v - return s -} - -// SetDashboardBody sets the DashboardBody field's value. -func (s *GetDashboardOutput) SetDashboardBody(v string) *GetDashboardOutput { - s.DashboardBody = &v - return s -} - -// SetDashboardName sets the DashboardName field's value. -func (s *GetDashboardOutput) SetDashboardName(v string) *GetDashboardOutput { - s.DashboardName = &v - return s -} - -type GetMetricDataInput struct { - _ struct{} `type:"structure"` - - // The time stamp indicating the latest data to be returned. - // - // For better performance, specify StartTime and EndTime values that align with - // the value of the metric's Period and sync up with the beginning and end of - // an hour. For example, if the Period of a metric is 5 minutes, specifying - // 12:05 or 12:30 as EndTime can get a faster response from CloudWatch then - // setting 12:07 or 12:29 as the EndTime. - // - // EndTime is a required field - EndTime *time.Time `type:"timestamp" required:"true"` - - // The maximum number of data points the request should return before paginating. - // If you omit this, the default of 100,800 is used. - MaxDatapoints *int64 `type:"integer"` - - // The metric queries to be returned. A single GetMetricData call can include - // as many as 100 MetricDataQuery structures. Each of these structures can specify - // either a metric to retrieve, or a math expression to perform on retrieved - // data. - // - // MetricDataQueries is a required field - MetricDataQueries []*MetricDataQuery `type:"list" required:"true"` - - // Include this value, if it was returned by the previous call, to get the next - // set of data points. - NextToken *string `type:"string"` - - // The order in which data points should be returned. TimestampDescending returns - // the newest data first and paginates when the MaxDatapoints limit is reached. - // TimestampAscending returns the oldest data first and paginates when the MaxDatapoints - // limit is reached. - ScanBy *string `type:"string" enum:"ScanBy"` - - // The time stamp indicating the earliest data to be returned. - // - // For better performance, specify StartTime and EndTime values that align with - // the value of the metric's Period and sync up with the beginning and end of - // an hour. For example, if the Period of a metric is 5 minutes, specifying - // 12:05 or 12:30 as StartTime can get a faster response from CloudWatch then - // setting 12:07 or 12:29 as the StartTime. - // - // StartTime is a required field - StartTime *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s GetMetricDataInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMetricDataInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMetricDataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMetricDataInput"} - if s.EndTime == nil { - invalidParams.Add(request.NewErrParamRequired("EndTime")) - } - if s.MetricDataQueries == nil { - invalidParams.Add(request.NewErrParamRequired("MetricDataQueries")) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) - } - if s.MetricDataQueries != nil { - for i, v := range s.MetricDataQueries { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricDataQueries", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndTime sets the EndTime field's value. -func (s *GetMetricDataInput) SetEndTime(v time.Time) *GetMetricDataInput { - s.EndTime = &v - return s -} - -// SetMaxDatapoints sets the MaxDatapoints field's value. -func (s *GetMetricDataInput) SetMaxDatapoints(v int64) *GetMetricDataInput { - s.MaxDatapoints = &v - return s -} - -// SetMetricDataQueries sets the MetricDataQueries field's value. -func (s *GetMetricDataInput) SetMetricDataQueries(v []*MetricDataQuery) *GetMetricDataInput { - s.MetricDataQueries = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetMetricDataInput) SetNextToken(v string) *GetMetricDataInput { - s.NextToken = &v - return s -} - -// SetScanBy sets the ScanBy field's value. -func (s *GetMetricDataInput) SetScanBy(v string) *GetMetricDataInput { - s.ScanBy = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *GetMetricDataInput) SetStartTime(v time.Time) *GetMetricDataInput { - s.StartTime = &v - return s -} - -type GetMetricDataOutput struct { - _ struct{} `type:"structure"` - - // The metrics that are returned, including the metric name, namespace, and - // dimensions. - MetricDataResults []*MetricDataResult `type:"list"` - - // A token that marks the next batch of returned results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetMetricDataOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMetricDataOutput) GoString() string { - return s.String() -} - -// SetMetricDataResults sets the MetricDataResults field's value. -func (s *GetMetricDataOutput) SetMetricDataResults(v []*MetricDataResult) *GetMetricDataOutput { - s.MetricDataResults = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetMetricDataOutput) SetNextToken(v string) *GetMetricDataOutput { - s.NextToken = &v - return s -} - -type GetMetricStatisticsInput struct { - _ struct{} `type:"structure"` - - // The dimensions. If the metric contains multiple dimensions, you must include - // a value for each dimension. CloudWatch treats each unique combination of - // dimensions as a separate metric. If a specific combination of dimensions - // was not published, you can't retrieve statistics for it. You must specify - // the same dimensions that were used when the metrics were created. For an - // example, see Dimension Combinations (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#dimension-combinations) - // in the Amazon CloudWatch User Guide. For more information about specifying - // dimensions, see Publishing Metrics (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html) - // in the Amazon CloudWatch User Guide. - Dimensions []*Dimension `type:"list"` - - // The time stamp that determines the last data point to return. - // - // The value specified is exclusive; results include data points up to the specified - // time stamp. The time stamp must be in ISO 8601 UTC format (for example, 2016-10-10T23:00:00Z). - // - // EndTime is a required field - EndTime *time.Time `type:"timestamp" required:"true"` - - // The percentile statistics. Specify values between p0.0 and p100. When calling - // GetMetricStatistics, you must specify either Statistics or ExtendedStatistics, - // but not both. Percentile statistics are not available for metrics when any - // of the metric values are negative numbers. - ExtendedStatistics []*string `min:"1" type:"list"` - - // The name of the metric, with or without spaces. - // - // MetricName is a required field - MetricName *string `min:"1" type:"string" required:"true"` - - // The namespace of the metric, with or without spaces. - // - // Namespace is a required field - Namespace *string `min:"1" type:"string" required:"true"` - - // The granularity, in seconds, of the returned data points. For metrics with - // regular resolution, a period can be as short as one minute (60 seconds) and - // must be a multiple of 60. For high-resolution metrics that are collected - // at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, - // or any multiple of 60. High-resolution metrics are those metrics stored by - // a PutMetricData call that includes a StorageResolution of 1 second. - // - // If the StartTime parameter specifies a time stamp that is greater than 3 - // hours ago, you must specify the period as follows or no data points in that - // time range is returned: - // - // * Start time between 3 hours and 15 days ago - Use a multiple of 60 seconds - // (1 minute). - // - // * Start time between 15 and 63 days ago - Use a multiple of 300 seconds - // (5 minutes). - // - // * Start time greater than 63 days ago - Use a multiple of 3600 seconds - // (1 hour). - // - // Period is a required field - Period *int64 `min:"1" type:"integer" required:"true"` - - // The time stamp that determines the first data point to return. Start times - // are evaluated relative to the time that CloudWatch receives the request. - // - // The value specified is inclusive; results include data points with the specified - // time stamp. The time stamp must be in ISO 8601 UTC format (for example, 2016-10-03T23:00:00Z). - // - // CloudWatch rounds the specified time stamp as follows: - // - // * Start time less than 15 days ago - Round down to the nearest whole minute. - // For example, 12:32:34 is rounded down to 12:32:00. - // - // * Start time between 15 and 63 days ago - Round down to the nearest 5-minute - // clock interval. For example, 12:32:34 is rounded down to 12:30:00. - // - // * Start time greater than 63 days ago - Round down to the nearest 1-hour - // clock interval. For example, 12:32:34 is rounded down to 12:00:00. - // - // If you set Period to 5, 10, or 30, the start time of your request is rounded - // down to the nearest time that corresponds to even 5-, 10-, or 30-second divisions - // of a minute. For example, if you make a query at (HH:mm:ss) 01:05:23 for - // the previous 10-second period, the start time of your request is rounded - // down and you receive data from 01:05:10 to 01:05:20. If you make a query - // at 15:07:17 for the previous 5 minutes of data, using a period of 5 seconds, - // you receive data timestamped between 15:02:15 and 15:07:15. - // - // StartTime is a required field - StartTime *time.Time `type:"timestamp" required:"true"` - - // The metric statistics, other than percentile. For percentile statistics, - // use ExtendedStatistics. When calling GetMetricStatistics, you must specify - // either Statistics or ExtendedStatistics, but not both. - Statistics []*string `min:"1" type:"list"` - - // The unit for a given metric. Metrics may be reported in multiple units. Not - // supplying a unit results in all units being returned. If you specify only - // a unit that the metric does not report, the results of the call are null. - Unit *string `type:"string" enum:"StandardUnit"` -} - -// String returns the string representation -func (s GetMetricStatisticsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMetricStatisticsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMetricStatisticsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMetricStatisticsInput"} - if s.EndTime == nil { - invalidParams.Add(request.NewErrParamRequired("EndTime")) - } - if s.ExtendedStatistics != nil && len(s.ExtendedStatistics) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExtendedStatistics", 1)) - } - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.MetricName != nil && len(*s.MetricName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) - } - if s.Namespace == nil { - invalidParams.Add(request.NewErrParamRequired("Namespace")) - } - if s.Namespace != nil && len(*s.Namespace) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) - } - if s.Period == nil { - invalidParams.Add(request.NewErrParamRequired("Period")) - } - if s.Period != nil && *s.Period < 1 { - invalidParams.Add(request.NewErrParamMinValue("Period", 1)) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) - } - if s.Statistics != nil && len(s.Statistics) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Statistics", 1)) - } - if s.Dimensions != nil { - for i, v := range s.Dimensions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDimensions sets the Dimensions field's value. -func (s *GetMetricStatisticsInput) SetDimensions(v []*Dimension) *GetMetricStatisticsInput { - s.Dimensions = v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *GetMetricStatisticsInput) SetEndTime(v time.Time) *GetMetricStatisticsInput { - s.EndTime = &v - return s -} - -// SetExtendedStatistics sets the ExtendedStatistics field's value. -func (s *GetMetricStatisticsInput) SetExtendedStatistics(v []*string) *GetMetricStatisticsInput { - s.ExtendedStatistics = v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *GetMetricStatisticsInput) SetMetricName(v string) *GetMetricStatisticsInput { - s.MetricName = &v - return s -} - -// SetNamespace sets the Namespace field's value. -func (s *GetMetricStatisticsInput) SetNamespace(v string) *GetMetricStatisticsInput { - s.Namespace = &v - return s -} - -// SetPeriod sets the Period field's value. -func (s *GetMetricStatisticsInput) SetPeriod(v int64) *GetMetricStatisticsInput { - s.Period = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *GetMetricStatisticsInput) SetStartTime(v time.Time) *GetMetricStatisticsInput { - s.StartTime = &v - return s -} - -// SetStatistics sets the Statistics field's value. -func (s *GetMetricStatisticsInput) SetStatistics(v []*string) *GetMetricStatisticsInput { - s.Statistics = v - return s -} - -// SetUnit sets the Unit field's value. -func (s *GetMetricStatisticsInput) SetUnit(v string) *GetMetricStatisticsInput { - s.Unit = &v - return s -} - -type GetMetricStatisticsOutput struct { - _ struct{} `type:"structure"` - - // The data points for the specified metric. - Datapoints []*Datapoint `type:"list"` - - // A label for the specified metric. - Label *string `type:"string"` -} - -// String returns the string representation -func (s GetMetricStatisticsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMetricStatisticsOutput) GoString() string { - return s.String() -} - -// SetDatapoints sets the Datapoints field's value. -func (s *GetMetricStatisticsOutput) SetDatapoints(v []*Datapoint) *GetMetricStatisticsOutput { - s.Datapoints = v - return s -} - -// SetLabel sets the Label field's value. -func (s *GetMetricStatisticsOutput) SetLabel(v string) *GetMetricStatisticsOutput { - s.Label = &v - return s -} - -type GetMetricWidgetImageInput struct { - _ struct{} `type:"structure"` - - // A JSON string that defines the bitmap graph to be retrieved. The string includes - // the metrics to include in the graph, statistics, annotations, title, axis - // limits, and so on. You can include only one MetricWidget parameter in each - // GetMetricWidgetImage call. - // - // For more information about the syntax of MetricWidget see CloudWatch-Metric-Widget-Structure. - // - // If any metric on the graph could not load all the requested data points, - // an orange triangle with an exclamation point appears next to the graph legend. - // - // MetricWidget is a required field - MetricWidget *string `type:"string" required:"true"` - - // The format of the resulting image. Only PNG images are supported. - // - // The default is png. If you specify png, the API returns an HTTP response - // with the content-type set to text/xml. The image data is in a MetricWidgetImage - // field. For example: - // - // - // - // - // - // - // - // iVBORw0KGgoAAAANSUhEUgAAAlgAAAGQEAYAAAAip... - // - // - // - // - // - // - // - // 6f0d4192-4d42-11e8-82c1-f539a07e0e3b - // - // - // - // - // - // The image/png setting is intended only for custom HTTP requests. For most - // use cases, and all actions using an AWS SDK, you should use png. If you specify - // image/png, the HTTP response has a content-type set to image/png, and the - // body of the response is a PNG image. - OutputFormat *string `type:"string"` -} - -// String returns the string representation -func (s GetMetricWidgetImageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMetricWidgetImageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMetricWidgetImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMetricWidgetImageInput"} - if s.MetricWidget == nil { - invalidParams.Add(request.NewErrParamRequired("MetricWidget")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMetricWidget sets the MetricWidget field's value. -func (s *GetMetricWidgetImageInput) SetMetricWidget(v string) *GetMetricWidgetImageInput { - s.MetricWidget = &v - return s -} - -// SetOutputFormat sets the OutputFormat field's value. -func (s *GetMetricWidgetImageInput) SetOutputFormat(v string) *GetMetricWidgetImageInput { - s.OutputFormat = &v - return s -} - -type GetMetricWidgetImageOutput struct { - _ struct{} `type:"structure"` - - // The image of the graph, in the output format specified. - // - // MetricWidgetImage is automatically base64 encoded/decoded by the SDK. - MetricWidgetImage []byte `type:"blob"` -} - -// String returns the string representation -func (s GetMetricWidgetImageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMetricWidgetImageOutput) GoString() string { - return s.String() -} - -// SetMetricWidgetImage sets the MetricWidgetImage field's value. -func (s *GetMetricWidgetImageOutput) SetMetricWidgetImage(v []byte) *GetMetricWidgetImageOutput { - s.MetricWidgetImage = v - return s -} - -type ListDashboardsInput struct { - _ struct{} `type:"structure"` - - // If you specify this parameter, only the dashboards with names starting with - // the specified string are listed. The maximum length is 255, and valid characters - // are A-Z, a-z, 0-9, ".", "-", and "_". - DashboardNamePrefix *string `type:"string"` - - // The token returned by a previous call to indicate that there is more data - // available. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListDashboardsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDashboardsInput) GoString() string { - return s.String() -} - -// SetDashboardNamePrefix sets the DashboardNamePrefix field's value. -func (s *ListDashboardsInput) SetDashboardNamePrefix(v string) *ListDashboardsInput { - s.DashboardNamePrefix = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDashboardsInput) SetNextToken(v string) *ListDashboardsInput { - s.NextToken = &v - return s -} - -type ListDashboardsOutput struct { - _ struct{} `type:"structure"` - - // The list of matching dashboards. - DashboardEntries []*DashboardEntry `type:"list"` - - // The token that marks the start of the next batch of returned results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListDashboardsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDashboardsOutput) GoString() string { - return s.String() -} - -// SetDashboardEntries sets the DashboardEntries field's value. -func (s *ListDashboardsOutput) SetDashboardEntries(v []*DashboardEntry) *ListDashboardsOutput { - s.DashboardEntries = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDashboardsOutput) SetNextToken(v string) *ListDashboardsOutput { - s.NextToken = &v - return s -} - -type ListMetricsInput struct { - _ struct{} `type:"structure"` - - // The dimensions to filter against. - Dimensions []*DimensionFilter `type:"list"` - - // The name of the metric to filter against. - MetricName *string `min:"1" type:"string"` - - // The namespace to filter against. - Namespace *string `min:"1" type:"string"` - - // The token returned by a previous call to indicate that there is more data - // available. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListMetricsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListMetricsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListMetricsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListMetricsInput"} - if s.MetricName != nil && len(*s.MetricName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) - } - if s.Namespace != nil && len(*s.Namespace) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) - } - if s.Dimensions != nil { - for i, v := range s.Dimensions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDimensions sets the Dimensions field's value. -func (s *ListMetricsInput) SetDimensions(v []*DimensionFilter) *ListMetricsInput { - s.Dimensions = v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *ListMetricsInput) SetMetricName(v string) *ListMetricsInput { - s.MetricName = &v - return s -} - -// SetNamespace sets the Namespace field's value. -func (s *ListMetricsInput) SetNamespace(v string) *ListMetricsInput { - s.Namespace = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListMetricsInput) SetNextToken(v string) *ListMetricsInput { - s.NextToken = &v - return s -} - -type ListMetricsOutput struct { - _ struct{} `type:"structure"` - - // The metrics. - Metrics []*Metric `type:"list"` - - // The token that marks the start of the next batch of returned results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListMetricsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListMetricsOutput) GoString() string { - return s.String() -} - -// SetMetrics sets the Metrics field's value. -func (s *ListMetricsOutput) SetMetrics(v []*Metric) *ListMetricsOutput { - s.Metrics = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListMetricsOutput) SetNextToken(v string) *ListMetricsOutput { - s.NextToken = &v - return s -} - -// A message returned by the GetMetricDataAPI, including a code and a description. -type MessageData struct { - _ struct{} `type:"structure"` - - // The error code or status code associated with the message. - Code *string `type:"string"` - - // The message text. - Value *string `type:"string"` -} - -// String returns the string representation -func (s MessageData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MessageData) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *MessageData) SetCode(v string) *MessageData { - s.Code = &v - return s -} - -// SetValue sets the Value field's value. -func (s *MessageData) SetValue(v string) *MessageData { - s.Value = &v - return s -} - -// Represents a specific metric. -type Metric struct { - _ struct{} `type:"structure"` - - // The dimensions for the metric. - Dimensions []*Dimension `type:"list"` - - // The name of the metric. This is a required field. - MetricName *string `min:"1" type:"string"` - - // The namespace of the metric. - Namespace *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s Metric) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Metric) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Metric) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Metric"} - if s.MetricName != nil && len(*s.MetricName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) - } - if s.Namespace != nil && len(*s.Namespace) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) - } - if s.Dimensions != nil { - for i, v := range s.Dimensions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDimensions sets the Dimensions field's value. -func (s *Metric) SetDimensions(v []*Dimension) *Metric { - s.Dimensions = v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *Metric) SetMetricName(v string) *Metric { - s.MetricName = &v - return s -} - -// SetNamespace sets the Namespace field's value. -func (s *Metric) SetNamespace(v string) *Metric { - s.Namespace = &v - return s -} - -// Represents an alarm. -type MetricAlarm struct { - _ struct{} `type:"structure"` - - // Indicates whether actions should be executed during any changes to the alarm - // state. - ActionsEnabled *bool `type:"boolean"` - - // The actions to execute when this alarm transitions to the ALARM state from - // any other state. Each action is specified as an Amazon Resource Name (ARN). - AlarmActions []*string `type:"list"` - - // The Amazon Resource Name (ARN) of the alarm. - AlarmArn *string `min:"1" type:"string"` - - // The time stamp of the last update to the alarm configuration. - AlarmConfigurationUpdatedTimestamp *time.Time `type:"timestamp"` - - // The description of the alarm. - AlarmDescription *string `type:"string"` - - // The name of the alarm. - AlarmName *string `min:"1" type:"string"` - - // The arithmetic operation to use when comparing the specified statistic and - // threshold. The specified statistic value is used as the first operand. - ComparisonOperator *string `type:"string" enum:"ComparisonOperator"` - - // The number of datapoints that must be breaching to trigger the alarm. - DatapointsToAlarm *int64 `min:"1" type:"integer"` - - // The dimensions for the metric associated with the alarm. - Dimensions []*Dimension `type:"list"` - - // Used only for alarms based on percentiles. If ignore, the alarm state does - // not change during periods with too few data points to be statistically significant. - // If evaluate or this parameter is not used, the alarm is always evaluated - // and possibly changes state no matter how many data points are available. - EvaluateLowSampleCountPercentile *string `min:"1" type:"string"` - - // The number of periods over which data is compared to the specified threshold. - EvaluationPeriods *int64 `min:"1" type:"integer"` - - // The percentile statistic for the metric associated with the alarm. Specify - // a value between p0.0 and p100. - ExtendedStatistic *string `type:"string"` - - // The actions to execute when this alarm transitions to the INSUFFICIENT_DATA - // state from any other state. Each action is specified as an Amazon Resource - // Name (ARN). - InsufficientDataActions []*string `type:"list"` - - // The name of the metric associated with the alarm. - MetricName *string `min:"1" type:"string"` - - Metrics []*MetricDataQuery `type:"list"` - - // The namespace of the metric associated with the alarm. - Namespace *string `min:"1" type:"string"` - - // The actions to execute when this alarm transitions to the OK state from any - // other state. Each action is specified as an Amazon Resource Name (ARN). - OKActions []*string `type:"list"` - - // The period, in seconds, over which the statistic is applied. - Period *int64 `min:"1" type:"integer"` - - // An explanation for the alarm state, in text format. - StateReason *string `type:"string"` - - // An explanation for the alarm state, in JSON format. - StateReasonData *string `type:"string"` - - // The time stamp of the last update to the alarm state. - StateUpdatedTimestamp *time.Time `type:"timestamp"` - - // The state value for the alarm. - StateValue *string `type:"string" enum:"StateValue"` - - // The statistic for the metric associated with the alarm, other than percentile. - // For percentile statistics, use ExtendedStatistic. - Statistic *string `type:"string" enum:"Statistic"` - - // The value to compare with the specified statistic. - Threshold *float64 `type:"double"` - - // Sets how this alarm is to handle missing data points. If this parameter is - // omitted, the default behavior of missing is used. - TreatMissingData *string `min:"1" type:"string"` - - // The unit of the metric associated with the alarm. - Unit *string `type:"string" enum:"StandardUnit"` -} - -// String returns the string representation -func (s MetricAlarm) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricAlarm) GoString() string { - return s.String() -} - -// SetActionsEnabled sets the ActionsEnabled field's value. -func (s *MetricAlarm) SetActionsEnabled(v bool) *MetricAlarm { - s.ActionsEnabled = &v - return s -} - -// SetAlarmActions sets the AlarmActions field's value. -func (s *MetricAlarm) SetAlarmActions(v []*string) *MetricAlarm { - s.AlarmActions = v - return s -} - -// SetAlarmArn sets the AlarmArn field's value. -func (s *MetricAlarm) SetAlarmArn(v string) *MetricAlarm { - s.AlarmArn = &v - return s -} - -// SetAlarmConfigurationUpdatedTimestamp sets the AlarmConfigurationUpdatedTimestamp field's value. -func (s *MetricAlarm) SetAlarmConfigurationUpdatedTimestamp(v time.Time) *MetricAlarm { - s.AlarmConfigurationUpdatedTimestamp = &v - return s -} - -// SetAlarmDescription sets the AlarmDescription field's value. -func (s *MetricAlarm) SetAlarmDescription(v string) *MetricAlarm { - s.AlarmDescription = &v - return s -} - -// SetAlarmName sets the AlarmName field's value. -func (s *MetricAlarm) SetAlarmName(v string) *MetricAlarm { - s.AlarmName = &v - return s -} - -// SetComparisonOperator sets the ComparisonOperator field's value. -func (s *MetricAlarm) SetComparisonOperator(v string) *MetricAlarm { - s.ComparisonOperator = &v - return s -} - -// SetDatapointsToAlarm sets the DatapointsToAlarm field's value. -func (s *MetricAlarm) SetDatapointsToAlarm(v int64) *MetricAlarm { - s.DatapointsToAlarm = &v - return s -} - -// SetDimensions sets the Dimensions field's value. -func (s *MetricAlarm) SetDimensions(v []*Dimension) *MetricAlarm { - s.Dimensions = v - return s -} - -// SetEvaluateLowSampleCountPercentile sets the EvaluateLowSampleCountPercentile field's value. -func (s *MetricAlarm) SetEvaluateLowSampleCountPercentile(v string) *MetricAlarm { - s.EvaluateLowSampleCountPercentile = &v - return s -} - -// SetEvaluationPeriods sets the EvaluationPeriods field's value. -func (s *MetricAlarm) SetEvaluationPeriods(v int64) *MetricAlarm { - s.EvaluationPeriods = &v - return s -} - -// SetExtendedStatistic sets the ExtendedStatistic field's value. -func (s *MetricAlarm) SetExtendedStatistic(v string) *MetricAlarm { - s.ExtendedStatistic = &v - return s -} - -// SetInsufficientDataActions sets the InsufficientDataActions field's value. -func (s *MetricAlarm) SetInsufficientDataActions(v []*string) *MetricAlarm { - s.InsufficientDataActions = v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *MetricAlarm) SetMetricName(v string) *MetricAlarm { - s.MetricName = &v - return s -} - -// SetMetrics sets the Metrics field's value. -func (s *MetricAlarm) SetMetrics(v []*MetricDataQuery) *MetricAlarm { - s.Metrics = v - return s -} - -// SetNamespace sets the Namespace field's value. -func (s *MetricAlarm) SetNamespace(v string) *MetricAlarm { - s.Namespace = &v - return s -} - -// SetOKActions sets the OKActions field's value. -func (s *MetricAlarm) SetOKActions(v []*string) *MetricAlarm { - s.OKActions = v - return s -} - -// SetPeriod sets the Period field's value. -func (s *MetricAlarm) SetPeriod(v int64) *MetricAlarm { - s.Period = &v - return s -} - -// SetStateReason sets the StateReason field's value. -func (s *MetricAlarm) SetStateReason(v string) *MetricAlarm { - s.StateReason = &v - return s -} - -// SetStateReasonData sets the StateReasonData field's value. -func (s *MetricAlarm) SetStateReasonData(v string) *MetricAlarm { - s.StateReasonData = &v - return s -} - -// SetStateUpdatedTimestamp sets the StateUpdatedTimestamp field's value. -func (s *MetricAlarm) SetStateUpdatedTimestamp(v time.Time) *MetricAlarm { - s.StateUpdatedTimestamp = &v - return s -} - -// SetStateValue sets the StateValue field's value. -func (s *MetricAlarm) SetStateValue(v string) *MetricAlarm { - s.StateValue = &v - return s -} - -// SetStatistic sets the Statistic field's value. -func (s *MetricAlarm) SetStatistic(v string) *MetricAlarm { - s.Statistic = &v - return s -} - -// SetThreshold sets the Threshold field's value. -func (s *MetricAlarm) SetThreshold(v float64) *MetricAlarm { - s.Threshold = &v - return s -} - -// SetTreatMissingData sets the TreatMissingData field's value. -func (s *MetricAlarm) SetTreatMissingData(v string) *MetricAlarm { - s.TreatMissingData = &v - return s -} - -// SetUnit sets the Unit field's value. -func (s *MetricAlarm) SetUnit(v string) *MetricAlarm { - s.Unit = &v - return s -} - -// This structure is used in both GetMetricData and PutMetricAlarm. The supported -// use of this structure is different for those two operations. -// -// When used in GetMetricData, it indicates the metric data to return, and whether -// this call is just retrieving a batch set of data for one metric, or is performing -// a math expression on metric data. A single GetMetricData call can include -// up to 100 MetricDataQuery structures. -// -// When used in PutMetricAlarm, it enables you to create an alarm based on a -// metric math expression. Each MetricDataQuery in the array specifies either -// a metric to retrieve, or a math expression to be performed on retrieved metrics. -// A single PutMetricAlarm call can include up to 20 MetricDataQuery structures -// in the array. The 20 structures can include as many as 10 structures that -// contain a MetricStat parameter to retrieve a metric, and as many as 10 structures -// that contain the Expression parameter to perform a math expression. Any expression -// used in a PutMetricAlarm operation must return a single time series. For -// more information, see Metric Math Syntax and Functions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) -// in the Amazon CloudWatch User Guide. -// -// Some of the parameters of this structure also have different uses whether -// you are using this structure in a GetMetricData operation or a PutMetricAlarm -// operation. These differences are explained in the following parameter list. -type MetricDataQuery struct { - _ struct{} `type:"structure"` - - // The math expression to be performed on the returned data, if this object - // is performing a math expression. This expression can use the Id of the other - // metrics to refer to those metrics, and can also use the Id of other expressions - // to use the result of those expressions. For more information about metric - // math expressions, see Metric Math Syntax and Functions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) - // in the Amazon CloudWatch User Guide. - // - // Within each MetricDataQuery object, you must specify either Expression or - // MetricStat but not both. - Expression *string `min:"1" type:"string"` - - // A short name used to tie this object to the results in the response. This - // name must be unique within a single call to GetMetricData. If you are performing - // math expressions on this set of data, this name represents that data and - // can serve as a variable in the mathematical expression. The valid characters - // are letters, numbers, and underscore. The first character must be a lowercase - // letter. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` - - // A human-readable label for this metric or expression. This is especially - // useful if this is an expression, so that you know what the value represents. - // If the metric or expression is shown in a CloudWatch dashboard widget, the - // label is shown. If Label is omitted, CloudWatch generates a default. - Label *string `type:"string"` - - // The metric to be returned, along with statistics, period, and units. Use - // this parameter only if this object is retrieving a metric and not performing - // a math expression on returned data. - // - // Within one MetricDataQuery object, you must specify either Expression or - // MetricStat but not both. - MetricStat *MetricStat `type:"structure"` - - // When used in GetMetricData, this option indicates whether to return the timestamps - // and raw data values of this metric. If you are performing this call just - // to do math expressions and do not also need the raw data returned, you can - // specify False. If you omit this, the default of True is used. - // - // When used in PutMetricAlarm, specify True for the one expression result to - // use as the alarm. For all other metrics and expressions in the same PutMetricAlarm - // operation, specify ReturnData as False. - ReturnData *bool `type:"boolean"` -} - -// String returns the string representation -func (s MetricDataQuery) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricDataQuery) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MetricDataQuery) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MetricDataQuery"} - if s.Expression != nil && len(*s.Expression) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Expression", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.MetricStat != nil { - if err := s.MetricStat.Validate(); err != nil { - invalidParams.AddNested("MetricStat", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExpression sets the Expression field's value. -func (s *MetricDataQuery) SetExpression(v string) *MetricDataQuery { - s.Expression = &v - return s -} - -// SetId sets the Id field's value. -func (s *MetricDataQuery) SetId(v string) *MetricDataQuery { - s.Id = &v - return s -} - -// SetLabel sets the Label field's value. -func (s *MetricDataQuery) SetLabel(v string) *MetricDataQuery { - s.Label = &v - return s -} - -// SetMetricStat sets the MetricStat field's value. -func (s *MetricDataQuery) SetMetricStat(v *MetricStat) *MetricDataQuery { - s.MetricStat = v - return s -} - -// SetReturnData sets the ReturnData field's value. -func (s *MetricDataQuery) SetReturnData(v bool) *MetricDataQuery { - s.ReturnData = &v - return s -} - -// A GetMetricData call returns an array of MetricDataResult structures. Each -// of these structures includes the data points for that metric, along with -// the timestamps of those data points and other identifying information. -type MetricDataResult struct { - _ struct{} `type:"structure"` - - // The short name you specified to represent this metric. - Id *string `min:"1" type:"string"` - - // The human-readable label associated with the data. - Label *string `type:"string"` - - // A list of messages with additional information about the data returned. - Messages []*MessageData `type:"list"` - - // The status of the returned data. Complete indicates that all data points - // in the requested time range were returned. PartialData means that an incomplete - // set of data points were returned. You can use the NextToken value that was - // returned and repeat your request to get more data points. NextToken is not - // returned if you are performing a math expression. InternalError indicates - // that an error occurred. Retry your request using NextToken, if present. - StatusCode *string `type:"string" enum:"StatusCode"` - - // The timestamps for the data points, formatted in Unix timestamp format. The - // number of timestamps always matches the number of values and the value for - // Timestamps[x] is Values[x]. - Timestamps []*time.Time `type:"list"` - - // The data points for the metric corresponding to Timestamps. The number of - // values always matches the number of timestamps and the timestamp for Values[x] - // is Timestamps[x]. - Values []*float64 `type:"list"` -} - -// String returns the string representation -func (s MetricDataResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricDataResult) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *MetricDataResult) SetId(v string) *MetricDataResult { - s.Id = &v - return s -} - -// SetLabel sets the Label field's value. -func (s *MetricDataResult) SetLabel(v string) *MetricDataResult { - s.Label = &v - return s -} - -// SetMessages sets the Messages field's value. -func (s *MetricDataResult) SetMessages(v []*MessageData) *MetricDataResult { - s.Messages = v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *MetricDataResult) SetStatusCode(v string) *MetricDataResult { - s.StatusCode = &v - return s -} - -// SetTimestamps sets the Timestamps field's value. -func (s *MetricDataResult) SetTimestamps(v []*time.Time) *MetricDataResult { - s.Timestamps = v - return s -} - -// SetValues sets the Values field's value. -func (s *MetricDataResult) SetValues(v []*float64) *MetricDataResult { - s.Values = v - return s -} - -// Encapsulates the information sent to either create a metric or add new values -// to be aggregated into an existing metric. -type MetricDatum struct { - _ struct{} `type:"structure"` - - // Array of numbers that is used along with the Values array. Each number in - // the Count array is the number of times the corresponding value in the Values - // array occurred during the period. - // - // If you omit the Counts array, the default of 1 is used as the value for each - // count. If you include a Counts array, it must include the same amount of - // values as the Values array. - Counts []*float64 `type:"list"` - - // The dimensions associated with the metric. - Dimensions []*Dimension `type:"list"` - - // The name of the metric. - // - // MetricName is a required field - MetricName *string `min:"1" type:"string" required:"true"` - - // The statistical values for the metric. - StatisticValues *StatisticSet `type:"structure"` - - // Valid values are 1 and 60. Setting this to 1 specifies this metric as a high-resolution - // metric, so that CloudWatch stores the metric with sub-minute resolution down - // to one second. Setting this to 60 specifies this metric as a regular-resolution - // metric, which CloudWatch stores at 1-minute resolution. Currently, high resolution - // is available only for custom metrics. For more information about high-resolution - // metrics, see High-Resolution Metrics (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html#high-resolution-metrics) - // in the Amazon CloudWatch User Guide. - // - // This field is optional, if you do not specify it the default of 60 is used. - StorageResolution *int64 `min:"1" type:"integer"` - - // The time the metric data was received, expressed as the number of milliseconds - // since Jan 1, 1970 00:00:00 UTC. - Timestamp *time.Time `type:"timestamp"` - - // The unit of the metric. - Unit *string `type:"string" enum:"StandardUnit"` - - // The value for the metric. - // - // Although the parameter accepts numbers of type Double, CloudWatch rejects - // values that are either too small or too large. Values must be in the range - // of 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). - // In addition, special values (for example, NaN, +Infinity, -Infinity) are - // not supported. - Value *float64 `type:"double"` - - // Array of numbers representing the values for the metric during the period. - // Each unique value is listed just once in this array, and the corresponding - // number in the Counts array specifies the number of times that value occurred - // during the period. You can include up to 150 unique values in each PutMetricData - // action that specifies a Values array. - // - // Although the Values array accepts numbers of type Double, CloudWatch rejects - // values that are either too small or too large. Values must be in the range - // of 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). - // In addition, special values (for example, NaN, +Infinity, -Infinity) are - // not supported. - Values []*float64 `type:"list"` -} - -// String returns the string representation -func (s MetricDatum) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricDatum) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MetricDatum) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MetricDatum"} - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.MetricName != nil && len(*s.MetricName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) - } - if s.StorageResolution != nil && *s.StorageResolution < 1 { - invalidParams.Add(request.NewErrParamMinValue("StorageResolution", 1)) - } - if s.Dimensions != nil { - for i, v := range s.Dimensions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.StatisticValues != nil { - if err := s.StatisticValues.Validate(); err != nil { - invalidParams.AddNested("StatisticValues", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCounts sets the Counts field's value. -func (s *MetricDatum) SetCounts(v []*float64) *MetricDatum { - s.Counts = v - return s -} - -// SetDimensions sets the Dimensions field's value. -func (s *MetricDatum) SetDimensions(v []*Dimension) *MetricDatum { - s.Dimensions = v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *MetricDatum) SetMetricName(v string) *MetricDatum { - s.MetricName = &v - return s -} - -// SetStatisticValues sets the StatisticValues field's value. -func (s *MetricDatum) SetStatisticValues(v *StatisticSet) *MetricDatum { - s.StatisticValues = v - return s -} - -// SetStorageResolution sets the StorageResolution field's value. -func (s *MetricDatum) SetStorageResolution(v int64) *MetricDatum { - s.StorageResolution = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *MetricDatum) SetTimestamp(v time.Time) *MetricDatum { - s.Timestamp = &v - return s -} - -// SetUnit sets the Unit field's value. -func (s *MetricDatum) SetUnit(v string) *MetricDatum { - s.Unit = &v - return s -} - -// SetValue sets the Value field's value. -func (s *MetricDatum) SetValue(v float64) *MetricDatum { - s.Value = &v - return s -} - -// SetValues sets the Values field's value. -func (s *MetricDatum) SetValues(v []*float64) *MetricDatum { - s.Values = v - return s -} - -// This structure defines the metric to be returned, along with the statistics, -// period, and units. -type MetricStat struct { - _ struct{} `type:"structure"` - - // The metric to return, including the metric name, namespace, and dimensions. - // - // Metric is a required field - Metric *Metric `type:"structure" required:"true"` - - // The period, in seconds, to use when retrieving the metric. - // - // Period is a required field - Period *int64 `min:"1" type:"integer" required:"true"` - - // The statistic to return. It can include any CloudWatch statistic or extended - // statistic. - // - // Stat is a required field - Stat *string `type:"string" required:"true"` - - // The unit to use for the returned data points. - Unit *string `type:"string" enum:"StandardUnit"` -} - -// String returns the string representation -func (s MetricStat) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricStat) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MetricStat) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MetricStat"} - if s.Metric == nil { - invalidParams.Add(request.NewErrParamRequired("Metric")) - } - if s.Period == nil { - invalidParams.Add(request.NewErrParamRequired("Period")) - } - if s.Period != nil && *s.Period < 1 { - invalidParams.Add(request.NewErrParamMinValue("Period", 1)) - } - if s.Stat == nil { - invalidParams.Add(request.NewErrParamRequired("Stat")) - } - if s.Metric != nil { - if err := s.Metric.Validate(); err != nil { - invalidParams.AddNested("Metric", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMetric sets the Metric field's value. -func (s *MetricStat) SetMetric(v *Metric) *MetricStat { - s.Metric = v - return s -} - -// SetPeriod sets the Period field's value. -func (s *MetricStat) SetPeriod(v int64) *MetricStat { - s.Period = &v - return s -} - -// SetStat sets the Stat field's value. -func (s *MetricStat) SetStat(v string) *MetricStat { - s.Stat = &v - return s -} - -// SetUnit sets the Unit field's value. -func (s *MetricStat) SetUnit(v string) *MetricStat { - s.Unit = &v - return s -} - -type PutDashboardInput struct { - _ struct{} `type:"structure"` - - // The detailed information about the dashboard in JSON format, including the - // widgets to include and their location on the dashboard. This parameter is - // required. - // - // For more information about the syntax, see CloudWatch-Dashboard-Body-Structure. - // - // DashboardBody is a required field - DashboardBody *string `type:"string" required:"true"` - - // The name of the dashboard. If a dashboard with this name already exists, - // this call modifies that dashboard, replacing its current contents. Otherwise, - // a new dashboard is created. The maximum length is 255, and valid characters - // are A-Z, a-z, 0-9, "-", and "_". This parameter is required. - // - // DashboardName is a required field - DashboardName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PutDashboardInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutDashboardInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutDashboardInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutDashboardInput"} - if s.DashboardBody == nil { - invalidParams.Add(request.NewErrParamRequired("DashboardBody")) - } - if s.DashboardName == nil { - invalidParams.Add(request.NewErrParamRequired("DashboardName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDashboardBody sets the DashboardBody field's value. -func (s *PutDashboardInput) SetDashboardBody(v string) *PutDashboardInput { - s.DashboardBody = &v - return s -} - -// SetDashboardName sets the DashboardName field's value. -func (s *PutDashboardInput) SetDashboardName(v string) *PutDashboardInput { - s.DashboardName = &v - return s -} - -type PutDashboardOutput struct { - _ struct{} `type:"structure"` - - // If the input for PutDashboard was correct and the dashboard was successfully - // created or modified, this result is empty. - // - // If this result includes only warning messages, then the input was valid enough - // for the dashboard to be created or modified, but some elements of the dashboard - // may not render. - // - // If this result includes error messages, the input was not valid and the operation - // failed. - DashboardValidationMessages []*DashboardValidationMessage `type:"list"` -} - -// String returns the string representation -func (s PutDashboardOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutDashboardOutput) GoString() string { - return s.String() -} - -// SetDashboardValidationMessages sets the DashboardValidationMessages field's value. -func (s *PutDashboardOutput) SetDashboardValidationMessages(v []*DashboardValidationMessage) *PutDashboardOutput { - s.DashboardValidationMessages = v - return s -} - -type PutMetricAlarmInput struct { - _ struct{} `type:"structure"` - - // Indicates whether actions should be executed during any changes to the alarm - // state. The default is TRUE. - ActionsEnabled *bool `type:"boolean"` - - // The actions to execute when this alarm transitions to the ALARM state from - // any other state. Each action is specified as an Amazon Resource Name (ARN). - // - // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate - // | arn:aws:automate:region:ec2:recover | arn:aws:sns:region:account-id:sns-topic-name - // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name - // - // Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 - // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 - // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 - AlarmActions []*string `type:"list"` - - // The description for the alarm. - AlarmDescription *string `type:"string"` - - // The name for the alarm. This name must be unique within your AWS account. - // - // AlarmName is a required field - AlarmName *string `min:"1" type:"string" required:"true"` - - // The arithmetic operation to use when comparing the specified statistic and - // threshold. The specified statistic value is used as the first operand. - // - // ComparisonOperator is a required field - ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"` - - // The number of datapoints that must be breaching to trigger the alarm. This - // is used only if you are setting an "M out of N" alarm. In that case, this - // value is the M. For more information, see Evaluating an Alarm (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) - // in the Amazon CloudWatch User Guide. - DatapointsToAlarm *int64 `min:"1" type:"integer"` - - // The dimensions for the metric specified in MetricName. - Dimensions []*Dimension `type:"list"` - - // Used only for alarms based on percentiles. If you specify ignore, the alarm - // state does not change during periods with too few data points to be statistically - // significant. If you specify evaluate or omit this parameter, the alarm is - // always evaluated and possibly changes state no matter how many data points - // are available. For more information, see Percentile-Based CloudWatch Alarms - // and Low Data Samples (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#percentiles-with-low-samples). - // - // Valid Values: evaluate | ignore - EvaluateLowSampleCountPercentile *string `min:"1" type:"string"` - - // The number of periods over which data is compared to the specified threshold. - // If you are setting an alarm that requires that a number of consecutive data - // points be breaching to trigger the alarm, this value specifies that number. - // If you are setting an "M out of N" alarm, this value is the N. - // - // An alarm's total current evaluation period can be no longer than one day, - // so this number multiplied by Period cannot be more than 86,400 seconds. - // - // EvaluationPeriods is a required field - EvaluationPeriods *int64 `min:"1" type:"integer" required:"true"` - - // The percentile statistic for the metric specified in MetricName. Specify - // a value between p0.0 and p100. When you call PutMetricAlarm and specify a - // MetricName, you must specify either Statistic or ExtendedStatistic, but not - // both. - ExtendedStatistic *string `type:"string"` - - // The actions to execute when this alarm transitions to the INSUFFICIENT_DATA - // state from any other state. Each action is specified as an Amazon Resource - // Name (ARN). - // - // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate - // | arn:aws:automate:region:ec2:recover | arn:aws:sns:region:account-id:sns-topic-name - // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name - // - // Valid Values (for use with IAM roles): >arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 - // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 - // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 - InsufficientDataActions []*string `type:"list"` - - // The name for the metric associated with the alarm. - // - // If you are creating an alarm based on a math expression, you cannot specify - // this parameter, or any of the Dimensions, Period, Namespace, Statistic, or - // ExtendedStatistic parameters. Instead, you specify all this information in - // the Metrics array. - MetricName *string `min:"1" type:"string"` - - // An array of MetricDataQuery structures that enable you to create an alarm - // based on the result of a metric math expression. Each item in the Metrics - // array either retrieves a metric or performs a math expression. - // - // If you use the Metrics parameter, you cannot include the MetricName, Dimensions, - // Period, Namespace, Statistic, or ExtendedStatistic parameters of PutMetricAlarm - // in the same operation. Instead, you retrieve the metrics you are using in - // your math expression as part of the Metrics array. - Metrics []*MetricDataQuery `type:"list"` - - // The namespace for the metric associated specified in MetricName. - Namespace *string `min:"1" type:"string"` - - // The actions to execute when this alarm transitions to an OK state from any - // other state. Each action is specified as an Amazon Resource Name (ARN). - // - // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate - // | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot - // | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name - // - // Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 - // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 - // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 - OKActions []*string `type:"list"` - - // The length, in seconds, used each time the metric specified in MetricName - // is evaluated. Valid values are 10, 30, and any multiple of 60. - // - // Be sure to specify 10 or 30 only for metrics that are stored by a PutMetricData - // call with a StorageResolution of 1. If you specify a period of 10 or 30 for - // a metric that does not have sub-minute resolution, the alarm still attempts - // to gather data at the period rate that you specify. In this case, it does - // not receive data for the attempts that do not correspond to a one-minute - // data resolution, and the alarm may often lapse into INSUFFICENT_DATA status. - // Specifying 10 or 30 also sets this alarm as a high-resolution alarm, which - // has a higher charge than other alarms. For more information about pricing, - // see Amazon CloudWatch Pricing (https://aws.amazon.com/cloudwatch/pricing/). - // - // An alarm's total current evaluation period can be no longer than one day, - // so Period multiplied by EvaluationPeriods cannot be more than 86,400 seconds. - Period *int64 `min:"1" type:"integer"` - - // The statistic for the metric specified in MetricName, other than percentile. - // For percentile statistics, use ExtendedStatistic. When you call PutMetricAlarm - // and specify a MetricName, you must specify either Statistic or ExtendedStatistic, - // but not both. - Statistic *string `type:"string" enum:"Statistic"` - - // The value against which the specified statistic is compared. - // - // Threshold is a required field - Threshold *float64 `type:"double" required:"true"` - - // Sets how this alarm is to handle missing data points. If TreatMissingData - // is omitted, the default behavior of missing is used. For more information, - // see Configuring How CloudWatch Alarms Treats Missing Data (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-and-missing-data). - // - // Valid Values: breaching | notBreaching | ignore | missing - TreatMissingData *string `min:"1" type:"string"` - - // The unit of measure for the statistic. For example, the units for the Amazon - // EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes - // that an instance receives on all network interfaces. You can also specify - // a unit when you create a custom metric. Units help provide conceptual meaning - // to your data. Metric data points that specify a unit of measure, such as - // Percent, are aggregated separately. - // - // If you specify a unit, you must use a unit that is appropriate for the metric. - // Otherwise, the CloudWatch alarm can get stuck in the INSUFFICIENT DATA state. - Unit *string `type:"string" enum:"StandardUnit"` -} - -// String returns the string representation -func (s PutMetricAlarmInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutMetricAlarmInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutMetricAlarmInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutMetricAlarmInput"} - if s.AlarmName == nil { - invalidParams.Add(request.NewErrParamRequired("AlarmName")) - } - if s.AlarmName != nil && len(*s.AlarmName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AlarmName", 1)) - } - if s.ComparisonOperator == nil { - invalidParams.Add(request.NewErrParamRequired("ComparisonOperator")) - } - if s.DatapointsToAlarm != nil && *s.DatapointsToAlarm < 1 { - invalidParams.Add(request.NewErrParamMinValue("DatapointsToAlarm", 1)) - } - if s.EvaluateLowSampleCountPercentile != nil && len(*s.EvaluateLowSampleCountPercentile) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EvaluateLowSampleCountPercentile", 1)) - } - if s.EvaluationPeriods == nil { - invalidParams.Add(request.NewErrParamRequired("EvaluationPeriods")) - } - if s.EvaluationPeriods != nil && *s.EvaluationPeriods < 1 { - invalidParams.Add(request.NewErrParamMinValue("EvaluationPeriods", 1)) - } - if s.MetricName != nil && len(*s.MetricName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) - } - if s.Namespace != nil && len(*s.Namespace) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) - } - if s.Period != nil && *s.Period < 1 { - invalidParams.Add(request.NewErrParamMinValue("Period", 1)) - } - if s.Threshold == nil { - invalidParams.Add(request.NewErrParamRequired("Threshold")) - } - if s.TreatMissingData != nil && len(*s.TreatMissingData) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TreatMissingData", 1)) - } - if s.Dimensions != nil { - for i, v := range s.Dimensions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Metrics != nil { - for i, v := range s.Metrics { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Metrics", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionsEnabled sets the ActionsEnabled field's value. -func (s *PutMetricAlarmInput) SetActionsEnabled(v bool) *PutMetricAlarmInput { - s.ActionsEnabled = &v - return s -} - -// SetAlarmActions sets the AlarmActions field's value. -func (s *PutMetricAlarmInput) SetAlarmActions(v []*string) *PutMetricAlarmInput { - s.AlarmActions = v - return s -} - -// SetAlarmDescription sets the AlarmDescription field's value. -func (s *PutMetricAlarmInput) SetAlarmDescription(v string) *PutMetricAlarmInput { - s.AlarmDescription = &v - return s -} - -// SetAlarmName sets the AlarmName field's value. -func (s *PutMetricAlarmInput) SetAlarmName(v string) *PutMetricAlarmInput { - s.AlarmName = &v - return s -} - -// SetComparisonOperator sets the ComparisonOperator field's value. -func (s *PutMetricAlarmInput) SetComparisonOperator(v string) *PutMetricAlarmInput { - s.ComparisonOperator = &v - return s -} - -// SetDatapointsToAlarm sets the DatapointsToAlarm field's value. -func (s *PutMetricAlarmInput) SetDatapointsToAlarm(v int64) *PutMetricAlarmInput { - s.DatapointsToAlarm = &v - return s -} - -// SetDimensions sets the Dimensions field's value. -func (s *PutMetricAlarmInput) SetDimensions(v []*Dimension) *PutMetricAlarmInput { - s.Dimensions = v - return s -} - -// SetEvaluateLowSampleCountPercentile sets the EvaluateLowSampleCountPercentile field's value. -func (s *PutMetricAlarmInput) SetEvaluateLowSampleCountPercentile(v string) *PutMetricAlarmInput { - s.EvaluateLowSampleCountPercentile = &v - return s -} - -// SetEvaluationPeriods sets the EvaluationPeriods field's value. -func (s *PutMetricAlarmInput) SetEvaluationPeriods(v int64) *PutMetricAlarmInput { - s.EvaluationPeriods = &v - return s -} - -// SetExtendedStatistic sets the ExtendedStatistic field's value. -func (s *PutMetricAlarmInput) SetExtendedStatistic(v string) *PutMetricAlarmInput { - s.ExtendedStatistic = &v - return s -} - -// SetInsufficientDataActions sets the InsufficientDataActions field's value. -func (s *PutMetricAlarmInput) SetInsufficientDataActions(v []*string) *PutMetricAlarmInput { - s.InsufficientDataActions = v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *PutMetricAlarmInput) SetMetricName(v string) *PutMetricAlarmInput { - s.MetricName = &v - return s -} - -// SetMetrics sets the Metrics field's value. -func (s *PutMetricAlarmInput) SetMetrics(v []*MetricDataQuery) *PutMetricAlarmInput { - s.Metrics = v - return s -} - -// SetNamespace sets the Namespace field's value. -func (s *PutMetricAlarmInput) SetNamespace(v string) *PutMetricAlarmInput { - s.Namespace = &v - return s -} - -// SetOKActions sets the OKActions field's value. -func (s *PutMetricAlarmInput) SetOKActions(v []*string) *PutMetricAlarmInput { - s.OKActions = v - return s -} - -// SetPeriod sets the Period field's value. -func (s *PutMetricAlarmInput) SetPeriod(v int64) *PutMetricAlarmInput { - s.Period = &v - return s -} - -// SetStatistic sets the Statistic field's value. -func (s *PutMetricAlarmInput) SetStatistic(v string) *PutMetricAlarmInput { - s.Statistic = &v - return s -} - -// SetThreshold sets the Threshold field's value. -func (s *PutMetricAlarmInput) SetThreshold(v float64) *PutMetricAlarmInput { - s.Threshold = &v - return s -} - -// SetTreatMissingData sets the TreatMissingData field's value. -func (s *PutMetricAlarmInput) SetTreatMissingData(v string) *PutMetricAlarmInput { - s.TreatMissingData = &v - return s -} - -// SetUnit sets the Unit field's value. -func (s *PutMetricAlarmInput) SetUnit(v string) *PutMetricAlarmInput { - s.Unit = &v - return s -} - -type PutMetricAlarmOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutMetricAlarmOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutMetricAlarmOutput) GoString() string { - return s.String() -} - -type PutMetricDataInput struct { - _ struct{} `type:"structure"` - - // The data for the metric. The array can include no more than 20 metrics per - // call. - // - // MetricData is a required field - MetricData []*MetricDatum `type:"list" required:"true"` - - // The namespace for the metric data. - // - // You cannot specify a namespace that begins with "AWS/". Namespaces that begin - // with "AWS/" are reserved for use by Amazon Web Services products. - // - // Namespace is a required field - Namespace *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutMetricDataInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutMetricDataInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutMetricDataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutMetricDataInput"} - if s.MetricData == nil { - invalidParams.Add(request.NewErrParamRequired("MetricData")) - } - if s.Namespace == nil { - invalidParams.Add(request.NewErrParamRequired("Namespace")) - } - if s.Namespace != nil && len(*s.Namespace) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) - } - if s.MetricData != nil { - for i, v := range s.MetricData { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricData", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMetricData sets the MetricData field's value. -func (s *PutMetricDataInput) SetMetricData(v []*MetricDatum) *PutMetricDataInput { - s.MetricData = v - return s -} - -// SetNamespace sets the Namespace field's value. -func (s *PutMetricDataInput) SetNamespace(v string) *PutMetricDataInput { - s.Namespace = &v - return s -} - -type PutMetricDataOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutMetricDataOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutMetricDataOutput) GoString() string { - return s.String() -} - -type SetAlarmStateInput struct { - _ struct{} `type:"structure"` - - // The name for the alarm. This name must be unique within the AWS account. - // The maximum length is 255 characters. - // - // AlarmName is a required field - AlarmName *string `min:"1" type:"string" required:"true"` - - // The reason that this alarm is set to this specific state, in text format. - // - // StateReason is a required field - StateReason *string `type:"string" required:"true"` - - // The reason that this alarm is set to this specific state, in JSON format. - StateReasonData *string `type:"string"` - - // The value of the state. - // - // StateValue is a required field - StateValue *string `type:"string" required:"true" enum:"StateValue"` -} - -// String returns the string representation -func (s SetAlarmStateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetAlarmStateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetAlarmStateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetAlarmStateInput"} - if s.AlarmName == nil { - invalidParams.Add(request.NewErrParamRequired("AlarmName")) - } - if s.AlarmName != nil && len(*s.AlarmName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AlarmName", 1)) - } - if s.StateReason == nil { - invalidParams.Add(request.NewErrParamRequired("StateReason")) - } - if s.StateValue == nil { - invalidParams.Add(request.NewErrParamRequired("StateValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlarmName sets the AlarmName field's value. -func (s *SetAlarmStateInput) SetAlarmName(v string) *SetAlarmStateInput { - s.AlarmName = &v - return s -} - -// SetStateReason sets the StateReason field's value. -func (s *SetAlarmStateInput) SetStateReason(v string) *SetAlarmStateInput { - s.StateReason = &v - return s -} - -// SetStateReasonData sets the StateReasonData field's value. -func (s *SetAlarmStateInput) SetStateReasonData(v string) *SetAlarmStateInput { - s.StateReasonData = &v - return s -} - -// SetStateValue sets the StateValue field's value. -func (s *SetAlarmStateInput) SetStateValue(v string) *SetAlarmStateInput { - s.StateValue = &v - return s -} - -type SetAlarmStateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetAlarmStateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetAlarmStateOutput) GoString() string { - return s.String() -} - -// Represents a set of statistics that describes a specific metric. -type StatisticSet struct { - _ struct{} `type:"structure"` - - // The maximum value of the sample set. - // - // Maximum is a required field - Maximum *float64 `type:"double" required:"true"` - - // The minimum value of the sample set. - // - // Minimum is a required field - Minimum *float64 `type:"double" required:"true"` - - // The number of samples used for the statistic set. - // - // SampleCount is a required field - SampleCount *float64 `type:"double" required:"true"` - - // The sum of values for the sample set. - // - // Sum is a required field - Sum *float64 `type:"double" required:"true"` -} - -// String returns the string representation -func (s StatisticSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StatisticSet) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StatisticSet) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StatisticSet"} - if s.Maximum == nil { - invalidParams.Add(request.NewErrParamRequired("Maximum")) - } - if s.Minimum == nil { - invalidParams.Add(request.NewErrParamRequired("Minimum")) - } - if s.SampleCount == nil { - invalidParams.Add(request.NewErrParamRequired("SampleCount")) - } - if s.Sum == nil { - invalidParams.Add(request.NewErrParamRequired("Sum")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaximum sets the Maximum field's value. -func (s *StatisticSet) SetMaximum(v float64) *StatisticSet { - s.Maximum = &v - return s -} - -// SetMinimum sets the Minimum field's value. -func (s *StatisticSet) SetMinimum(v float64) *StatisticSet { - s.Minimum = &v - return s -} - -// SetSampleCount sets the SampleCount field's value. -func (s *StatisticSet) SetSampleCount(v float64) *StatisticSet { - s.SampleCount = &v - return s -} - -// SetSum sets the Sum field's value. -func (s *StatisticSet) SetSum(v float64) *StatisticSet { - s.Sum = &v - return s -} - -const ( - // ComparisonOperatorGreaterThanOrEqualToThreshold is a ComparisonOperator enum value - ComparisonOperatorGreaterThanOrEqualToThreshold = "GreaterThanOrEqualToThreshold" - - // ComparisonOperatorGreaterThanThreshold is a ComparisonOperator enum value - ComparisonOperatorGreaterThanThreshold = "GreaterThanThreshold" - - // ComparisonOperatorLessThanThreshold is a ComparisonOperator enum value - ComparisonOperatorLessThanThreshold = "LessThanThreshold" - - // ComparisonOperatorLessThanOrEqualToThreshold is a ComparisonOperator enum value - ComparisonOperatorLessThanOrEqualToThreshold = "LessThanOrEqualToThreshold" -) - -const ( - // HistoryItemTypeConfigurationUpdate is a HistoryItemType enum value - HistoryItemTypeConfigurationUpdate = "ConfigurationUpdate" - - // HistoryItemTypeStateUpdate is a HistoryItemType enum value - HistoryItemTypeStateUpdate = "StateUpdate" - - // HistoryItemTypeAction is a HistoryItemType enum value - HistoryItemTypeAction = "Action" -) - -const ( - // ScanByTimestampDescending is a ScanBy enum value - ScanByTimestampDescending = "TimestampDescending" - - // ScanByTimestampAscending is a ScanBy enum value - ScanByTimestampAscending = "TimestampAscending" -) - -const ( - // StandardUnitSeconds is a StandardUnit enum value - StandardUnitSeconds = "Seconds" - - // StandardUnitMicroseconds is a StandardUnit enum value - StandardUnitMicroseconds = "Microseconds" - - // StandardUnitMilliseconds is a StandardUnit enum value - StandardUnitMilliseconds = "Milliseconds" - - // StandardUnitBytes is a StandardUnit enum value - StandardUnitBytes = "Bytes" - - // StandardUnitKilobytes is a StandardUnit enum value - StandardUnitKilobytes = "Kilobytes" - - // StandardUnitMegabytes is a StandardUnit enum value - StandardUnitMegabytes = "Megabytes" - - // StandardUnitGigabytes is a StandardUnit enum value - StandardUnitGigabytes = "Gigabytes" - - // StandardUnitTerabytes is a StandardUnit enum value - StandardUnitTerabytes = "Terabytes" - - // StandardUnitBits is a StandardUnit enum value - StandardUnitBits = "Bits" - - // StandardUnitKilobits is a StandardUnit enum value - StandardUnitKilobits = "Kilobits" - - // StandardUnitMegabits is a StandardUnit enum value - StandardUnitMegabits = "Megabits" - - // StandardUnitGigabits is a StandardUnit enum value - StandardUnitGigabits = "Gigabits" - - // StandardUnitTerabits is a StandardUnit enum value - StandardUnitTerabits = "Terabits" - - // StandardUnitPercent is a StandardUnit enum value - StandardUnitPercent = "Percent" - - // StandardUnitCount is a StandardUnit enum value - StandardUnitCount = "Count" - - // StandardUnitBytesSecond is a StandardUnit enum value - StandardUnitBytesSecond = "Bytes/Second" - - // StandardUnitKilobytesSecond is a StandardUnit enum value - StandardUnitKilobytesSecond = "Kilobytes/Second" - - // StandardUnitMegabytesSecond is a StandardUnit enum value - StandardUnitMegabytesSecond = "Megabytes/Second" - - // StandardUnitGigabytesSecond is a StandardUnit enum value - StandardUnitGigabytesSecond = "Gigabytes/Second" - - // StandardUnitTerabytesSecond is a StandardUnit enum value - StandardUnitTerabytesSecond = "Terabytes/Second" - - // StandardUnitBitsSecond is a StandardUnit enum value - StandardUnitBitsSecond = "Bits/Second" - - // StandardUnitKilobitsSecond is a StandardUnit enum value - StandardUnitKilobitsSecond = "Kilobits/Second" - - // StandardUnitMegabitsSecond is a StandardUnit enum value - StandardUnitMegabitsSecond = "Megabits/Second" - - // StandardUnitGigabitsSecond is a StandardUnit enum value - StandardUnitGigabitsSecond = "Gigabits/Second" - - // StandardUnitTerabitsSecond is a StandardUnit enum value - StandardUnitTerabitsSecond = "Terabits/Second" - - // StandardUnitCountSecond is a StandardUnit enum value - StandardUnitCountSecond = "Count/Second" - - // StandardUnitNone is a StandardUnit enum value - StandardUnitNone = "None" -) - -const ( - // StateValueOk is a StateValue enum value - StateValueOk = "OK" - - // StateValueAlarm is a StateValue enum value - StateValueAlarm = "ALARM" - - // StateValueInsufficientData is a StateValue enum value - StateValueInsufficientData = "INSUFFICIENT_DATA" -) - -const ( - // StatisticSampleCount is a Statistic enum value - StatisticSampleCount = "SampleCount" - - // StatisticAverage is a Statistic enum value - StatisticAverage = "Average" - - // StatisticSum is a Statistic enum value - StatisticSum = "Sum" - - // StatisticMinimum is a Statistic enum value - StatisticMinimum = "Minimum" - - // StatisticMaximum is a Statistic enum value - StatisticMaximum = "Maximum" -) - -const ( - // StatusCodeComplete is a StatusCode enum value - StatusCodeComplete = "Complete" - - // StatusCodeInternalError is a StatusCode enum value - StatusCodeInternalError = "InternalError" - - // StatusCodePartialData is a StatusCode enum value - StatusCodePartialData = "PartialData" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/doc.go deleted file mode 100644 index 662023540..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/doc.go +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package cloudwatch provides the client and types for making API -// requests to Amazon CloudWatch. -// -// Amazon CloudWatch monitors your Amazon Web Services (AWS) resources and the -// applications you run on AWS in real time. You can use CloudWatch to collect -// and track metrics, which are the variables you want to measure for your resources -// and applications. -// -// CloudWatch alarms send notifications or automatically change the resources -// you are monitoring based on rules that you define. For example, you can monitor -// the CPU usage and disk reads and writes of your Amazon EC2 instances. Then, -// use this data to determine whether you should launch additional instances -// to handle increased load. You can also use this data to stop under-used instances -// to save money. -// -// In addition to monitoring the built-in metrics that come with AWS, you can -// monitor your own custom metrics. With CloudWatch, you gain system-wide visibility -// into resource utilization, application performance, and operational health. -// -// See https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01 for more information on this service. -// -// See cloudwatch package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatch/ -// -// Using the Client -// -// To contact Amazon CloudWatch with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon CloudWatch client CloudWatch for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatch/#New -package cloudwatch diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/errors.go deleted file mode 100644 index 0029aa38f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/errors.go +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudwatch - -const ( - - // ErrCodeDashboardInvalidInputError for service response error code - // "InvalidParameterInput". - // - // Some part of the dashboard data is invalid. - ErrCodeDashboardInvalidInputError = "InvalidParameterInput" - - // ErrCodeDashboardNotFoundError for service response error code - // "ResourceNotFound". - // - // The specified dashboard does not exist. - ErrCodeDashboardNotFoundError = "ResourceNotFound" - - // ErrCodeInternalServiceFault for service response error code - // "InternalServiceError". - // - // Request processing has failed due to some unknown error, exception, or failure. - ErrCodeInternalServiceFault = "InternalServiceError" - - // ErrCodeInvalidFormatFault for service response error code - // "InvalidFormat". - // - // Data was not syntactically valid JSON. - ErrCodeInvalidFormatFault = "InvalidFormat" - - // ErrCodeInvalidNextToken for service response error code - // "InvalidNextToken". - // - // The next token specified is invalid. - ErrCodeInvalidNextToken = "InvalidNextToken" - - // ErrCodeInvalidParameterCombinationException for service response error code - // "InvalidParameterCombination". - // - // Parameters were used together that cannot be used together. - ErrCodeInvalidParameterCombinationException = "InvalidParameterCombination" - - // ErrCodeInvalidParameterValueException for service response error code - // "InvalidParameterValue". - // - // The value of an input parameter is bad or out-of-range. - ErrCodeInvalidParameterValueException = "InvalidParameterValue" - - // ErrCodeLimitExceededFault for service response error code - // "LimitExceeded". - // - // The quota for alarms for this customer has already been reached. - ErrCodeLimitExceededFault = "LimitExceeded" - - // ErrCodeMissingRequiredParameterException for service response error code - // "MissingParameter". - // - // An input parameter that is required is missing. - ErrCodeMissingRequiredParameterException = "MissingParameter" - - // ErrCodeResourceNotFound for service response error code - // "ResourceNotFound". - // - // The named resource does not exist. - ErrCodeResourceNotFound = "ResourceNotFound" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/service.go deleted file mode 100644 index 0d4786622..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudwatch - -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/query" -) - -// CloudWatch provides the API operation methods for making requests to -// Amazon CloudWatch. See this package's package overview docs -// for details on the service. -// -// CloudWatch methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CloudWatch 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 = "monitoring" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "CloudWatch" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CloudWatch client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a CloudWatch client from just a session. -// svc := cloudwatch.New(mySession) -// -// // Create a CloudWatch client with additional configuration -// svc := cloudwatch.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudWatch { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CloudWatch { - svc := &CloudWatch{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2010-08-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CloudWatch operation and runs any -// custom request initialization. -func (c *CloudWatch) 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/cloudwatch/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/waiters.go deleted file mode 100644 index 21e42ac58..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/waiters.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudwatch - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilAlarmExists uses the CloudWatch API operation -// DescribeAlarms to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *CloudWatch) WaitUntilAlarmExists(input *DescribeAlarmsInput) error { - return c.WaitUntilAlarmExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilAlarmExistsWithContext is an extended version of WaitUntilAlarmExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatch) WaitUntilAlarmExistsWithContext(ctx aws.Context, input *DescribeAlarmsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilAlarmExists", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(5 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "length(MetricAlarms[]) > `0`", - Expected: true, - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeAlarmsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeAlarmsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go deleted file mode 100644 index 69c41c660..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go +++ /dev/null @@ -1,4026 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudwatchevents - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opDeleteRule = "DeleteRule" - -// DeleteRuleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRule for more information on using the DeleteRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRuleRequest method. -// req, resp := client.DeleteRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DeleteRule -func (c *CloudWatchEvents) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, output *DeleteRuleOutput) { - op := &request.Operation{ - Name: opDeleteRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRuleInput{} - } - - output = &DeleteRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRule API operation for Amazon CloudWatch Events. -// -// Deletes the specified rule. -// -// Before you can delete the rule, you must remove all targets, using RemoveTargets. -// -// When you delete a rule, incoming events might continue to match to the deleted -// rule. Allow a short period of time for changes to take effect. -// -// Managed rules are rules created and managed by another AWS service on your -// behalf. These rules are created by those other AWS services to support functionality -// in those services. You can delete these rules using the Force option, but -// you should do so only if you are sure the other service is not still using -// that rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation DeleteRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. -// -// * ErrCodeManagedRuleException "ManagedRuleException" -// This rule was created by an AWS service on behalf of your account. It is -// managed by that service. If you see this error in response to DeleteRule -// or RemoveTargets, you can use the Force parameter in those calls to delete -// the rule or remove targets from the rule. You cannot modify these managed -// rules by using DisableRule, EnableRule, PutTargets, or PutRule. -// -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DeleteRule -func (c *CloudWatchEvents) DeleteRule(input *DeleteRuleInput) (*DeleteRuleOutput, error) { - req, out := c.DeleteRuleRequest(input) - return out, req.Send() -} - -// DeleteRuleWithContext is the same as DeleteRule with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) DeleteRuleWithContext(ctx aws.Context, input *DeleteRuleInput, opts ...request.Option) (*DeleteRuleOutput, error) { - req, out := c.DeleteRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEventBus = "DescribeEventBus" - -// DescribeEventBusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEventBus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEventBus for more information on using the DescribeEventBus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventBusRequest method. -// req, resp := client.DescribeEventBusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeEventBus -func (c *CloudWatchEvents) DescribeEventBusRequest(input *DescribeEventBusInput) (req *request.Request, output *DescribeEventBusOutput) { - op := &request.Operation{ - Name: opDescribeEventBus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEventBusInput{} - } - - output = &DescribeEventBusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEventBus API operation for Amazon CloudWatch Events. -// -// Displays the external AWS accounts that are permitted to write events to -// your account using your account's event bus, and the associated policy. To -// enable your account to receive events from other accounts, use PutPermission. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation DescribeEventBus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeEventBus -func (c *CloudWatchEvents) DescribeEventBus(input *DescribeEventBusInput) (*DescribeEventBusOutput, error) { - req, out := c.DescribeEventBusRequest(input) - return out, req.Send() -} - -// DescribeEventBusWithContext is the same as DescribeEventBus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEventBus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) DescribeEventBusWithContext(ctx aws.Context, input *DescribeEventBusInput, opts ...request.Option) (*DescribeEventBusOutput, error) { - req, out := c.DescribeEventBusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeRule = "DescribeRule" - -// DescribeRuleRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRule for more information on using the DescribeRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRuleRequest method. -// req, resp := client.DescribeRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeRule -func (c *CloudWatchEvents) DescribeRuleRequest(input *DescribeRuleInput) (req *request.Request, output *DescribeRuleOutput) { - op := &request.Operation{ - Name: opDescribeRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeRuleInput{} - } - - output = &DescribeRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRule API operation for Amazon CloudWatch Events. -// -// Describes the specified rule. -// -// DescribeRule does not list the targets of a rule. To see the targets associated -// with a rule, use ListTargetsByRule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation DescribeRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeRule -func (c *CloudWatchEvents) DescribeRule(input *DescribeRuleInput) (*DescribeRuleOutput, error) { - req, out := c.DescribeRuleRequest(input) - return out, req.Send() -} - -// DescribeRuleWithContext is the same as DescribeRule with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) DescribeRuleWithContext(ctx aws.Context, input *DescribeRuleInput, opts ...request.Option) (*DescribeRuleOutput, error) { - req, out := c.DescribeRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableRule = "DisableRule" - -// DisableRuleRequest generates a "aws/request.Request" representing the -// client's request for the DisableRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableRule for more information on using the DisableRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableRuleRequest method. -// req, resp := client.DisableRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DisableRule -func (c *CloudWatchEvents) DisableRuleRequest(input *DisableRuleInput) (req *request.Request, output *DisableRuleOutput) { - op := &request.Operation{ - Name: opDisableRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableRuleInput{} - } - - output = &DisableRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisableRule API operation for Amazon CloudWatch Events. -// -// Disables the specified rule. A disabled rule won't match any events, and -// won't self-trigger if it has a schedule expression. -// -// When you disable a rule, incoming events might continue to match to the disabled -// rule. Allow a short period of time for changes to take effect. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation DisableRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. -// -// * ErrCodeManagedRuleException "ManagedRuleException" -// This rule was created by an AWS service on behalf of your account. It is -// managed by that service. If you see this error in response to DeleteRule -// or RemoveTargets, you can use the Force parameter in those calls to delete -// the rule or remove targets from the rule. You cannot modify these managed -// rules by using DisableRule, EnableRule, PutTargets, or PutRule. -// -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DisableRule -func (c *CloudWatchEvents) DisableRule(input *DisableRuleInput) (*DisableRuleOutput, error) { - req, out := c.DisableRuleRequest(input) - return out, req.Send() -} - -// DisableRuleWithContext is the same as DisableRule with the addition of -// the ability to pass a context and additional request options. -// -// See DisableRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) DisableRuleWithContext(ctx aws.Context, input *DisableRuleInput, opts ...request.Option) (*DisableRuleOutput, error) { - req, out := c.DisableRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableRule = "EnableRule" - -// EnableRuleRequest generates a "aws/request.Request" representing the -// client's request for the EnableRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableRule for more information on using the EnableRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableRuleRequest method. -// req, resp := client.EnableRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/EnableRule -func (c *CloudWatchEvents) EnableRuleRequest(input *EnableRuleInput) (req *request.Request, output *EnableRuleOutput) { - op := &request.Operation{ - Name: opEnableRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableRuleInput{} - } - - output = &EnableRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableRule API operation for Amazon CloudWatch Events. -// -// Enables the specified rule. If the rule does not exist, the operation fails. -// -// When you enable a rule, incoming events might not immediately start matching -// to a newly enabled rule. Allow a short period of time for changes to take -// effect. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation EnableRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. -// -// * ErrCodeManagedRuleException "ManagedRuleException" -// This rule was created by an AWS service on behalf of your account. It is -// managed by that service. If you see this error in response to DeleteRule -// or RemoveTargets, you can use the Force parameter in those calls to delete -// the rule or remove targets from the rule. You cannot modify these managed -// rules by using DisableRule, EnableRule, PutTargets, or PutRule. -// -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/EnableRule -func (c *CloudWatchEvents) EnableRule(input *EnableRuleInput) (*EnableRuleOutput, error) { - req, out := c.EnableRuleRequest(input) - return out, req.Send() -} - -// EnableRuleWithContext is the same as EnableRule with the addition of -// the ability to pass a context and additional request options. -// -// See EnableRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) EnableRuleWithContext(ctx aws.Context, input *EnableRuleInput, opts ...request.Option) (*EnableRuleOutput, error) { - req, out := c.EnableRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRuleNamesByTarget = "ListRuleNamesByTarget" - -// ListRuleNamesByTargetRequest generates a "aws/request.Request" representing the -// client's request for the ListRuleNamesByTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRuleNamesByTarget for more information on using the ListRuleNamesByTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRuleNamesByTargetRequest method. -// req, resp := client.ListRuleNamesByTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListRuleNamesByTarget -func (c *CloudWatchEvents) ListRuleNamesByTargetRequest(input *ListRuleNamesByTargetInput) (req *request.Request, output *ListRuleNamesByTargetOutput) { - op := &request.Operation{ - Name: opListRuleNamesByTarget, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListRuleNamesByTargetInput{} - } - - output = &ListRuleNamesByTargetOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRuleNamesByTarget API operation for Amazon CloudWatch Events. -// -// Lists the rules for the specified target. You can see which of the rules -// in Amazon CloudWatch Events can invoke a specific target in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation ListRuleNamesByTarget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListRuleNamesByTarget -func (c *CloudWatchEvents) ListRuleNamesByTarget(input *ListRuleNamesByTargetInput) (*ListRuleNamesByTargetOutput, error) { - req, out := c.ListRuleNamesByTargetRequest(input) - return out, req.Send() -} - -// ListRuleNamesByTargetWithContext is the same as ListRuleNamesByTarget with the addition of -// the ability to pass a context and additional request options. -// -// See ListRuleNamesByTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) ListRuleNamesByTargetWithContext(ctx aws.Context, input *ListRuleNamesByTargetInput, opts ...request.Option) (*ListRuleNamesByTargetOutput, error) { - req, out := c.ListRuleNamesByTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRules = "ListRules" - -// ListRulesRequest generates a "aws/request.Request" representing the -// client's request for the ListRules operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRules for more information on using the ListRules -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRulesRequest method. -// req, resp := client.ListRulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListRules -func (c *CloudWatchEvents) ListRulesRequest(input *ListRulesInput) (req *request.Request, output *ListRulesOutput) { - op := &request.Operation{ - Name: opListRules, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListRulesInput{} - } - - output = &ListRulesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRules API operation for Amazon CloudWatch Events. -// -// Lists your Amazon CloudWatch Events rules. You can either list all the rules -// or you can provide a prefix to match to the rule names. -// -// ListRules does not list the targets of a rule. To see the targets associated -// with a rule, use ListTargetsByRule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation ListRules for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListRules -func (c *CloudWatchEvents) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { - req, out := c.ListRulesRequest(input) - return out, req.Send() -} - -// ListRulesWithContext is the same as ListRules with the addition of -// the ability to pass a context and additional request options. -// -// See ListRules for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) ListRulesWithContext(ctx aws.Context, input *ListRulesInput, opts ...request.Option) (*ListRulesOutput, error) { - req, out := c.ListRulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTargetsByRule = "ListTargetsByRule" - -// ListTargetsByRuleRequest generates a "aws/request.Request" representing the -// client's request for the ListTargetsByRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTargetsByRule for more information on using the ListTargetsByRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTargetsByRuleRequest method. -// req, resp := client.ListTargetsByRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListTargetsByRule -func (c *CloudWatchEvents) ListTargetsByRuleRequest(input *ListTargetsByRuleInput) (req *request.Request, output *ListTargetsByRuleOutput) { - op := &request.Operation{ - Name: opListTargetsByRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTargetsByRuleInput{} - } - - output = &ListTargetsByRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTargetsByRule API operation for Amazon CloudWatch Events. -// -// Lists the targets assigned to the specified rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation ListTargetsByRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListTargetsByRule -func (c *CloudWatchEvents) ListTargetsByRule(input *ListTargetsByRuleInput) (*ListTargetsByRuleOutput, error) { - req, out := c.ListTargetsByRuleRequest(input) - return out, req.Send() -} - -// ListTargetsByRuleWithContext is the same as ListTargetsByRule with the addition of -// the ability to pass a context and additional request options. -// -// See ListTargetsByRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) ListTargetsByRuleWithContext(ctx aws.Context, input *ListTargetsByRuleInput, opts ...request.Option) (*ListTargetsByRuleOutput, error) { - req, out := c.ListTargetsByRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutEvents = "PutEvents" - -// PutEventsRequest generates a "aws/request.Request" representing the -// client's request for the PutEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutEvents for more information on using the PutEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutEventsRequest method. -// req, resp := client.PutEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutEvents -func (c *CloudWatchEvents) PutEventsRequest(input *PutEventsInput) (req *request.Request, output *PutEventsOutput) { - op := &request.Operation{ - Name: opPutEvents, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutEventsInput{} - } - - output = &PutEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutEvents API operation for Amazon CloudWatch Events. -// -// Sends custom events to Amazon CloudWatch Events so that they can be matched -// to rules. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation PutEvents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutEvents -func (c *CloudWatchEvents) PutEvents(input *PutEventsInput) (*PutEventsOutput, error) { - req, out := c.PutEventsRequest(input) - return out, req.Send() -} - -// PutEventsWithContext is the same as PutEvents with the addition of -// the ability to pass a context and additional request options. -// -// See PutEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) PutEventsWithContext(ctx aws.Context, input *PutEventsInput, opts ...request.Option) (*PutEventsOutput, error) { - req, out := c.PutEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutPermission = "PutPermission" - -// PutPermissionRequest generates a "aws/request.Request" representing the -// client's request for the PutPermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutPermission for more information on using the PutPermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutPermissionRequest method. -// req, resp := client.PutPermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutPermission -func (c *CloudWatchEvents) PutPermissionRequest(input *PutPermissionInput) (req *request.Request, output *PutPermissionOutput) { - op := &request.Operation{ - Name: opPutPermission, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutPermissionInput{} - } - - output = &PutPermissionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutPermission API operation for Amazon CloudWatch Events. -// -// Running PutPermission permits the specified AWS account or AWS organization -// to put events to your account's default event bus. CloudWatch Events rules -// in your account are triggered by these events arriving to your default event -// bus. -// -// For another account to send events to your account, that external account -// must have a CloudWatch Events rule with your account's default event bus -// as a target. -// -// To enable multiple AWS accounts to put events to your default event bus, -// run PutPermission once for each of these accounts. Or, if all the accounts -// are members of the same AWS organization, you can run PutPermission once -// specifying Principal as "*" and specifying the AWS organization ID in Condition, -// to grant permissions to all accounts in that organization. -// -// If you grant permissions using an organization, then accounts in that organization -// must specify a RoleArn with proper permissions when they use PutTarget to -// add your account's event bus as a target. For more information, see Sending -// and Receiving Events Between AWS Accounts (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEvents-CrossAccountEventDelivery.html) -// in the Amazon CloudWatch Events User Guide. -// -// The permission policy on the default event bus cannot exceed 10 KB in size. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation PutPermission for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodePolicyLengthExceededException "PolicyLengthExceededException" -// The event bus policy is too long. For more information, see the limits. -// -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutPermission -func (c *CloudWatchEvents) PutPermission(input *PutPermissionInput) (*PutPermissionOutput, error) { - req, out := c.PutPermissionRequest(input) - return out, req.Send() -} - -// PutPermissionWithContext is the same as PutPermission with the addition of -// the ability to pass a context and additional request options. -// -// See PutPermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) PutPermissionWithContext(ctx aws.Context, input *PutPermissionInput, opts ...request.Option) (*PutPermissionOutput, error) { - req, out := c.PutPermissionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutRule = "PutRule" - -// PutRuleRequest generates a "aws/request.Request" representing the -// client's request for the PutRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutRule for more information on using the PutRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutRuleRequest method. -// req, resp := client.PutRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutRule -func (c *CloudWatchEvents) PutRuleRequest(input *PutRuleInput) (req *request.Request, output *PutRuleOutput) { - op := &request.Operation{ - Name: opPutRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutRuleInput{} - } - - output = &PutRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutRule API operation for Amazon CloudWatch Events. -// -// Creates or updates the specified rule. Rules are enabled by default, or based -// on value of the state. You can disable a rule using DisableRule. -// -// If you are updating an existing rule, the rule is replaced with what you -// specify in this PutRule command. If you omit arguments in PutRule, the old -// values for those arguments are not kept. Instead, they are replaced with -// null values. -// -// When you create or update a rule, incoming events might not immediately start -// matching to new or updated rules. Allow a short period of time for changes -// to take effect. -// -// A rule must contain at least an EventPattern or ScheduleExpression. Rules -// with EventPatterns are triggered when a matching event is observed. Rules -// with ScheduleExpressions self-trigger based on the given schedule. A rule -// can have both an EventPattern and a ScheduleExpression, in which case the -// rule triggers on matching events as well as on a schedule. -// -// Most services in AWS treat : or / as the same character in Amazon Resource -// Names (ARNs). However, CloudWatch Events uses an exact match in event patterns -// and rules. Be sure to use the correct ARN characters when creating event -// patterns so that they match the ARN syntax in the event you want to match. -// -// In CloudWatch Events, it is possible to create rules that lead to infinite -// loops, where a rule is fired repeatedly. For example, a rule might detect -// that ACLs have changed on an S3 bucket, and trigger software to change them -// to the desired state. If the rule is not written carefully, the subsequent -// change to the ACLs fires the rule again, creating an infinite loop. -// -// To prevent this, write the rules so that the triggered actions do not re-fire -// the same rule. For example, your rule could fire only if ACLs are found to -// be in a bad state, instead of after any change. -// -// An infinite loop can quickly cause higher than expected charges. We recommend -// that you use budgeting, which alerts you when charges exceed your specified -// limit. For more information, see Managing Your Costs with Budgets (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-managing-costs.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation PutRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidEventPatternException "InvalidEventPatternException" -// The event pattern is not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You tried to create more rules or add more targets to a rule than is allowed. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. -// -// * ErrCodeManagedRuleException "ManagedRuleException" -// This rule was created by an AWS service on behalf of your account. It is -// managed by that service. If you see this error in response to DeleteRule -// or RemoveTargets, you can use the Force parameter in those calls to delete -// the rule or remove targets from the rule. You cannot modify these managed -// rules by using DisableRule, EnableRule, PutTargets, or PutRule. -// -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutRule -func (c *CloudWatchEvents) PutRule(input *PutRuleInput) (*PutRuleOutput, error) { - req, out := c.PutRuleRequest(input) - return out, req.Send() -} - -// PutRuleWithContext is the same as PutRule with the addition of -// the ability to pass a context and additional request options. -// -// See PutRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) PutRuleWithContext(ctx aws.Context, input *PutRuleInput, opts ...request.Option) (*PutRuleOutput, error) { - req, out := c.PutRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutTargets = "PutTargets" - -// PutTargetsRequest generates a "aws/request.Request" representing the -// client's request for the PutTargets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutTargets for more information on using the PutTargets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutTargetsRequest method. -// req, resp := client.PutTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutTargets -func (c *CloudWatchEvents) PutTargetsRequest(input *PutTargetsInput) (req *request.Request, output *PutTargetsOutput) { - op := &request.Operation{ - Name: opPutTargets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutTargetsInput{} - } - - output = &PutTargetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutTargets API operation for Amazon CloudWatch Events. -// -// Adds the specified targets to the specified rule, or updates the targets -// if they are already associated with the rule. -// -// Targets are the resources that are invoked when a rule is triggered. -// -// You can configure the following as targets for CloudWatch Events: -// -// * EC2 instances -// -// * SSM Run Command -// -// * SSM Automation -// -// * AWS Lambda functions -// -// * Data streams in Amazon Kinesis Data Streams -// -// * Data delivery streams in Amazon Kinesis Data Firehose -// -// * Amazon ECS tasks -// -// * AWS Step Functions state machines -// -// * AWS Batch jobs -// -// * AWS CodeBuild projects -// -// * Pipelines in AWS CodePipeline -// -// * Amazon Inspector assessment templates -// -// * Amazon SNS topics -// -// * Amazon SQS queues, including FIFO queues -// -// * The default event bus of another AWS account -// -// Creating rules with built-in targets is supported only in the AWS Management -// Console. The built-in targets are EC2 CreateSnapshot API call, EC2 RebootInstances -// API call, EC2 StopInstances API call, and EC2 TerminateInstances API call. -// -// For some target types, PutTargets provides target-specific parameters. If -// the target is a Kinesis data stream, you can optionally specify which shard -// the event goes to by using the KinesisParameters argument. To invoke a command -// on multiple EC2 instances with one rule, you can use the RunCommandParameters -// field. -// -// To be able to make API calls against the resources that you own, Amazon CloudWatch -// Events needs the appropriate permissions. For AWS Lambda and Amazon SNS resources, -// CloudWatch Events relies on resource-based policies. For EC2 instances, Kinesis -// data streams, and AWS Step Functions state machines, CloudWatch Events relies -// on IAM roles that you specify in the RoleARN argument in PutTargets. For -// more information, see Authentication and Access Control (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/auth-and-access-control-cwe.html) -// in the Amazon CloudWatch Events User Guide. -// -// If another AWS account is in the same region and has granted you permission -// (using PutPermission), you can send events to that account. Set that account's -// event bus as a target of the rules in your account. To send the matched events -// to the other account, specify that account's event bus as the Arn value when -// you run PutTargets. If your account sends events to another account, your -// account is charged for each sent event. Each event sent to another account -// is charged as a custom event. The account receiving the event is not charged. -// For more information, see Amazon CloudWatch Pricing (https://aws.amazon.com/cloudwatch/pricing/). -// -// If you are setting the event bus of another account as the target, and that -// account granted permission to your account through an organization instead -// of directly by the account ID, then you must specify a RoleArn with proper -// permissions in the Target structure. For more information, see Sending and -// Receiving Events Between AWS Accounts (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEvents-CrossAccountEventDelivery.html) -// in the Amazon CloudWatch Events User Guide. -// -// For more information about enabling cross-account events, see PutPermission. -// -// Input, InputPath, and InputTransformer are mutually exclusive and optional -// parameters of a target. When a rule is triggered due to a matched event: -// -// * If none of the following arguments are specified for a target, then -// the entire event is passed to the target in JSON format (unless the target -// is Amazon EC2 Run Command or Amazon ECS task, in which case nothing from -// the event is passed to the target). -// -// * If Input is specified in the form of valid JSON, then the matched event -// is overridden with this constant. -// -// * If InputPath is specified in the form of JSONPath (for example, $.detail), -// then only the part of the event specified in the path is passed to the -// target (for example, only the detail part of the event is passed). -// -// * If InputTransformer is specified, then one or more specified JSONPaths -// are extracted from the event and used as values in a template that you -// specify as the input to the target. -// -// When you specify InputPath or InputTransformer, you must use JSON dot notation, -// not bracket notation. -// -// When you add targets to a rule and the associated rule triggers soon after, -// new or updated targets might not be immediately invoked. Allow a short period -// of time for changes to take effect. -// -// This action can partially fail if too many requests are made at the same -// time. If that happens, FailedEntryCount is non-zero in the response and each -// entry in FailedEntries provides the ID of the failed target and the error -// code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation PutTargets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You tried to create more rules or add more targets to a rule than is allowed. -// -// * ErrCodeManagedRuleException "ManagedRuleException" -// This rule was created by an AWS service on behalf of your account. It is -// managed by that service. If you see this error in response to DeleteRule -// or RemoveTargets, you can use the Force parameter in those calls to delete -// the rule or remove targets from the rule. You cannot modify these managed -// rules by using DisableRule, EnableRule, PutTargets, or PutRule. -// -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutTargets -func (c *CloudWatchEvents) PutTargets(input *PutTargetsInput) (*PutTargetsOutput, error) { - req, out := c.PutTargetsRequest(input) - return out, req.Send() -} - -// PutTargetsWithContext is the same as PutTargets with the addition of -// the ability to pass a context and additional request options. -// -// See PutTargets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) PutTargetsWithContext(ctx aws.Context, input *PutTargetsInput, opts ...request.Option) (*PutTargetsOutput, error) { - req, out := c.PutTargetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemovePermission = "RemovePermission" - -// RemovePermissionRequest generates a "aws/request.Request" representing the -// client's request for the RemovePermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemovePermission for more information on using the RemovePermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemovePermissionRequest method. -// req, resp := client.RemovePermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/RemovePermission -func (c *CloudWatchEvents) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) { - op := &request.Operation{ - Name: opRemovePermission, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemovePermissionInput{} - } - - output = &RemovePermissionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemovePermission API operation for Amazon CloudWatch Events. -// -// Revokes the permission of another AWS account to be able to put events to -// your default event bus. Specify the account to revoke by the StatementId -// value that you associated with the account when you granted it permission -// with PutPermission. You can find the StatementId by using DescribeEventBus. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation RemovePermission for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/RemovePermission -func (c *CloudWatchEvents) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) { - req, out := c.RemovePermissionRequest(input) - return out, req.Send() -} - -// RemovePermissionWithContext is the same as RemovePermission with the addition of -// the ability to pass a context and additional request options. -// -// See RemovePermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error) { - req, out := c.RemovePermissionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTargets = "RemoveTargets" - -// RemoveTargetsRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTargets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTargets for more information on using the RemoveTargets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTargetsRequest method. -// req, resp := client.RemoveTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/RemoveTargets -func (c *CloudWatchEvents) RemoveTargetsRequest(input *RemoveTargetsInput) (req *request.Request, output *RemoveTargetsOutput) { - op := &request.Operation{ - Name: opRemoveTargets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTargetsInput{} - } - - output = &RemoveTargetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// RemoveTargets API operation for Amazon CloudWatch Events. -// -// Removes the specified targets from the specified rule. When the rule is triggered, -// those targets are no longer be invoked. -// -// When you remove a target, when the associated rule triggers, removed targets -// might continue to be invoked. Allow a short period of time for changes to -// take effect. -// -// This action can partially fail if too many requests are made at the same -// time. If that happens, FailedEntryCount is non-zero in the response and each -// entry in FailedEntries provides the ID of the failed target and the error -// code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation RemoveTargets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. -// -// * ErrCodeManagedRuleException "ManagedRuleException" -// This rule was created by an AWS service on behalf of your account. It is -// managed by that service. If you see this error in response to DeleteRule -// or RemoveTargets, you can use the Force parameter in those calls to delete -// the rule or remove targets from the rule. You cannot modify these managed -// rules by using DisableRule, EnableRule, PutTargets, or PutRule. -// -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/RemoveTargets -func (c *CloudWatchEvents) RemoveTargets(input *RemoveTargetsInput) (*RemoveTargetsOutput, error) { - req, out := c.RemoveTargetsRequest(input) - return out, req.Send() -} - -// RemoveTargetsWithContext is the same as RemoveTargets with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTargets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) RemoveTargetsWithContext(ctx aws.Context, input *RemoveTargetsInput, opts ...request.Option) (*RemoveTargetsOutput, error) { - req, out := c.RemoveTargetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTestEventPattern = "TestEventPattern" - -// TestEventPatternRequest generates a "aws/request.Request" representing the -// client's request for the TestEventPattern operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TestEventPattern for more information on using the TestEventPattern -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TestEventPatternRequest method. -// req, resp := client.TestEventPatternRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/TestEventPattern -func (c *CloudWatchEvents) TestEventPatternRequest(input *TestEventPatternInput) (req *request.Request, output *TestEventPatternOutput) { - op := &request.Operation{ - Name: opTestEventPattern, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TestEventPatternInput{} - } - - output = &TestEventPatternOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestEventPattern API operation for Amazon CloudWatch Events. -// -// Tests whether the specified event pattern matches the provided event. -// -// Most services in AWS treat : or / as the same character in Amazon Resource -// Names (ARNs). However, CloudWatch Events uses an exact match in event patterns -// and rules. Be sure to use the correct ARN characters when creating event -// patterns so that they match the ARN syntax in the event you want to match. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation TestEventPattern for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidEventPatternException "InvalidEventPatternException" -// The event pattern is not valid. -// -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/TestEventPattern -func (c *CloudWatchEvents) TestEventPattern(input *TestEventPatternInput) (*TestEventPatternOutput, error) { - req, out := c.TestEventPatternRequest(input) - return out, req.Send() -} - -// TestEventPatternWithContext is the same as TestEventPattern with the addition of -// the ability to pass a context and additional request options. -// -// See TestEventPattern for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchEvents) TestEventPatternWithContext(ctx aws.Context, input *TestEventPatternInput, opts ...request.Option) (*TestEventPatternOutput, error) { - req, out := c.TestEventPatternRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// This structure specifies the VPC subnets and security groups for the task, -// and whether a public IP address is to be used. This structure is relevant -// only for ECS tasks that use the awsvpc network mode. -type AwsVpcConfiguration struct { - _ struct{} `type:"structure"` - - // Specifies whether the task's elastic network interface receives a public - // IP address. You can specify ENABLED only when LaunchType in EcsParameters - // is set to FARGATE. - AssignPublicIp *string `type:"string" enum:"AssignPublicIp"` - - // Specifies the security groups associated with the task. These security groups - // must all be in the same VPC. You can specify as many as five security groups. - // If you do not specify a security group, the default security group for the - // VPC is used. - SecurityGroups []*string `type:"list"` - - // Specifies the subnets associated with the task. These subnets must all be - // in the same VPC. You can specify as many as 16 subnets. - // - // Subnets is a required field - Subnets []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s AwsVpcConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AwsVpcConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AwsVpcConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AwsVpcConfiguration"} - if s.Subnets == nil { - invalidParams.Add(request.NewErrParamRequired("Subnets")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssignPublicIp sets the AssignPublicIp field's value. -func (s *AwsVpcConfiguration) SetAssignPublicIp(v string) *AwsVpcConfiguration { - s.AssignPublicIp = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *AwsVpcConfiguration) SetSecurityGroups(v []*string) *AwsVpcConfiguration { - s.SecurityGroups = v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *AwsVpcConfiguration) SetSubnets(v []*string) *AwsVpcConfiguration { - s.Subnets = v - return s -} - -// The array properties for the submitted job, such as the size of the array. -// The array size can be between 2 and 10,000. If you specify array properties -// for a job, it becomes an array job. This parameter is used only if the target -// is an AWS Batch job. -type BatchArrayProperties struct { - _ struct{} `type:"structure"` - - // The size of the array, if this is an array batch job. Valid values are integers - // between 2 and 10,000. - Size *int64 `type:"integer"` -} - -// String returns the string representation -func (s BatchArrayProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchArrayProperties) GoString() string { - return s.String() -} - -// SetSize sets the Size field's value. -func (s *BatchArrayProperties) SetSize(v int64) *BatchArrayProperties { - s.Size = &v - return s -} - -// The custom parameters to be used when the target is an AWS Batch job. -type BatchParameters struct { - _ struct{} `type:"structure"` - - // The array properties for the submitted job, such as the size of the array. - // The array size can be between 2 and 10,000. If you specify array properties - // for a job, it becomes an array job. This parameter is used only if the target - // is an AWS Batch job. - ArrayProperties *BatchArrayProperties `type:"structure"` - - // The ARN or name of the job definition to use if the event target is an AWS - // Batch job. This job definition must already exist. - // - // JobDefinition is a required field - JobDefinition *string `type:"string" required:"true"` - - // The name to use for this execution of the job, if the target is an AWS Batch - // job. - // - // JobName is a required field - JobName *string `type:"string" required:"true"` - - // The retry strategy to use for failed jobs, if the target is an AWS Batch - // job. The retry strategy is the number of times to retry the failed job execution. - // Valid values are 1–10. When you specify a retry strategy here, it overrides - // the retry strategy defined in the job definition. - RetryStrategy *BatchRetryStrategy `type:"structure"` -} - -// String returns the string representation -func (s BatchParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchParameters"} - if s.JobDefinition == nil { - invalidParams.Add(request.NewErrParamRequired("JobDefinition")) - } - if s.JobName == nil { - invalidParams.Add(request.NewErrParamRequired("JobName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArrayProperties sets the ArrayProperties field's value. -func (s *BatchParameters) SetArrayProperties(v *BatchArrayProperties) *BatchParameters { - s.ArrayProperties = v - return s -} - -// SetJobDefinition sets the JobDefinition field's value. -func (s *BatchParameters) SetJobDefinition(v string) *BatchParameters { - s.JobDefinition = &v - return s -} - -// SetJobName sets the JobName field's value. -func (s *BatchParameters) SetJobName(v string) *BatchParameters { - s.JobName = &v - return s -} - -// SetRetryStrategy sets the RetryStrategy field's value. -func (s *BatchParameters) SetRetryStrategy(v *BatchRetryStrategy) *BatchParameters { - s.RetryStrategy = v - return s -} - -// The retry strategy to use for failed jobs, if the target is an AWS Batch -// job. If you specify a retry strategy here, it overrides the retry strategy -// defined in the job definition. -type BatchRetryStrategy struct { - _ struct{} `type:"structure"` - - // The number of times to attempt to retry, if the job fails. Valid values are - // 1–10. - Attempts *int64 `type:"integer"` -} - -// String returns the string representation -func (s BatchRetryStrategy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchRetryStrategy) GoString() string { - return s.String() -} - -// SetAttempts sets the Attempts field's value. -func (s *BatchRetryStrategy) SetAttempts(v int64) *BatchRetryStrategy { - s.Attempts = &v - return s -} - -// A JSON string which you can use to limit the event bus permissions you are -// granting to only accounts that fulfill the condition. Currently, the only -// supported condition is membership in a certain AWS organization. The string -// must contain Type, Key, and Value fields. The Value field specifies the ID -// of the AWS organization. Following is an example value for Condition: -// -// '{"Type" : "StringEquals", "Key": "aws:PrincipalOrgID", "Value": "o-1234567890"}' -type Condition struct { - _ struct{} `type:"structure"` - - // Specifies the key for the condition. Currently the only supported key is - // aws:PrincipalOrgID. - // - // Key is a required field - Key *string `type:"string" required:"true"` - - // Specifies the type of condition. Currently the only supported value is StringEquals. - // - // Type is a required field - Type *string `type:"string" required:"true"` - - // Specifies the value for the key. Currently, this must be the ID of the organization. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Condition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Condition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Condition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Condition"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Condition) SetKey(v string) *Condition { - s.Key = &v - return s -} - -// SetType sets the Type field's value. -func (s *Condition) SetType(v string) *Condition { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Condition) SetValue(v string) *Condition { - s.Value = &v - return s -} - -type DeleteRuleInput struct { - _ struct{} `type:"structure"` - - // If this is a managed rule, created by an AWS service on your behalf, you - // must specify Force as True to delete the rule. This parameter is ignored - // for rules that are not managed rules. You can check whether a rule is a managed - // rule by using DescribeRule or ListRules and checking the ManagedBy field - // of the response. - Force *bool `type:"boolean"` - - // The name of the rule. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRuleInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForce sets the Force field's value. -func (s *DeleteRuleInput) SetForce(v bool) *DeleteRuleInput { - s.Force = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteRuleInput) SetName(v string) *DeleteRuleInput { - s.Name = &v - return s -} - -type DeleteRuleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRuleOutput) GoString() string { - return s.String() -} - -type DescribeEventBusInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeEventBusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventBusInput) GoString() string { - return s.String() -} - -type DescribeEventBusOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the account permitted to write events to - // the current account. - Arn *string `type:"string"` - - // The name of the event bus. Currently, this is always default. - Name *string `type:"string"` - - // The policy that enables the external account to send events to your account. - Policy *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventBusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventBusOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DescribeEventBusOutput) SetArn(v string) *DescribeEventBusOutput { - s.Arn = &v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeEventBusOutput) SetName(v string) *DescribeEventBusOutput { - s.Name = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *DescribeEventBusOutput) SetPolicy(v string) *DescribeEventBusOutput { - s.Policy = &v - return s -} - -type DescribeRuleInput struct { - _ struct{} `type:"structure"` - - // The name of the rule. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRuleInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DescribeRuleInput) SetName(v string) *DescribeRuleInput { - s.Name = &v - return s -} - -type DescribeRuleOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the rule. - Arn *string `min:"1" type:"string"` - - // The description of the rule. - Description *string `type:"string"` - - // The event pattern. For more information, see Events and Event Patterns (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html) - // in the Amazon CloudWatch Events User Guide. - EventPattern *string `type:"string"` - - // If this is a managed rule, created by an AWS service on your behalf, this - // field displays the principal name of the AWS service that created the rule. - ManagedBy *string `min:"1" type:"string"` - - // The name of the rule. - Name *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the IAM role associated with the rule. - RoleArn *string `min:"1" type:"string"` - - // The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". - ScheduleExpression *string `type:"string"` - - // Specifies whether the rule is enabled or disabled. - State *string `type:"string" enum:"RuleState"` -} - -// String returns the string representation -func (s DescribeRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRuleOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DescribeRuleOutput) SetArn(v string) *DescribeRuleOutput { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DescribeRuleOutput) SetDescription(v string) *DescribeRuleOutput { - s.Description = &v - return s -} - -// SetEventPattern sets the EventPattern field's value. -func (s *DescribeRuleOutput) SetEventPattern(v string) *DescribeRuleOutput { - s.EventPattern = &v - return s -} - -// SetManagedBy sets the ManagedBy field's value. -func (s *DescribeRuleOutput) SetManagedBy(v string) *DescribeRuleOutput { - s.ManagedBy = &v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeRuleOutput) SetName(v string) *DescribeRuleOutput { - s.Name = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DescribeRuleOutput) SetRoleArn(v string) *DescribeRuleOutput { - s.RoleArn = &v - return s -} - -// SetScheduleExpression sets the ScheduleExpression field's value. -func (s *DescribeRuleOutput) SetScheduleExpression(v string) *DescribeRuleOutput { - s.ScheduleExpression = &v - return s -} - -// SetState sets the State field's value. -func (s *DescribeRuleOutput) SetState(v string) *DescribeRuleOutput { - s.State = &v - return s -} - -type DisableRuleInput struct { - _ struct{} `type:"structure"` - - // The name of the rule. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableRuleInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DisableRuleInput) SetName(v string) *DisableRuleInput { - s.Name = &v - return s -} - -type DisableRuleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableRuleOutput) GoString() string { - return s.String() -} - -// The custom parameters to be used when the target is an Amazon ECS task. -type EcsParameters struct { - _ struct{} `type:"structure"` - - // Specifies an ECS task group for the task. The maximum length is 255 characters. - Group *string `type:"string"` - - // Specifies the launch type on which your task is running. The launch type - // that you specify here must match one of the launch type (compatibilities) - // of the target task. The FARGATE value is supported only in the Regions where - // AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate - // on Amazon ECS (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS-Fargate.html) - // in the Amazon Elastic Container Service Developer Guide. - LaunchType *string `type:"string" enum:"LaunchType"` - - // Use this structure if the ECS task uses the awsvpc network mode. This structure - // specifies the VPC subnets and security groups associated with the task, and - // whether a public IP address is to be used. This structure is required if - // LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks. - // - // If you specify NetworkConfiguration when the target ECS task does not use - // the awsvpc network mode, the task fails. - NetworkConfiguration *NetworkConfiguration `type:"structure"` - - // Specifies the platform version for the task. Specify only the numeric portion - // of the platform version, such as 1.1.0. - // - // This structure is used only if LaunchType is FARGATE. For more information - // about valid platform versions, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) - // in the Amazon Elastic Container Service Developer Guide. - PlatformVersion *string `type:"string"` - - // The number of tasks to create based on TaskDefinition. The default is 1. - TaskCount *int64 `min:"1" type:"integer"` - - // The ARN of the task definition to use if the event target is an Amazon ECS - // task. - // - // TaskDefinitionArn is a required field - TaskDefinitionArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s EcsParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EcsParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EcsParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EcsParameters"} - if s.TaskCount != nil && *s.TaskCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("TaskCount", 1)) - } - if s.TaskDefinitionArn == nil { - invalidParams.Add(request.NewErrParamRequired("TaskDefinitionArn")) - } - if s.TaskDefinitionArn != nil && len(*s.TaskDefinitionArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskDefinitionArn", 1)) - } - if s.NetworkConfiguration != nil { - if err := s.NetworkConfiguration.Validate(); err != nil { - invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroup sets the Group field's value. -func (s *EcsParameters) SetGroup(v string) *EcsParameters { - s.Group = &v - return s -} - -// SetLaunchType sets the LaunchType field's value. -func (s *EcsParameters) SetLaunchType(v string) *EcsParameters { - s.LaunchType = &v - return s -} - -// SetNetworkConfiguration sets the NetworkConfiguration field's value. -func (s *EcsParameters) SetNetworkConfiguration(v *NetworkConfiguration) *EcsParameters { - s.NetworkConfiguration = v - return s -} - -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *EcsParameters) SetPlatformVersion(v string) *EcsParameters { - s.PlatformVersion = &v - return s -} - -// SetTaskCount sets the TaskCount field's value. -func (s *EcsParameters) SetTaskCount(v int64) *EcsParameters { - s.TaskCount = &v - return s -} - -// SetTaskDefinitionArn sets the TaskDefinitionArn field's value. -func (s *EcsParameters) SetTaskDefinitionArn(v string) *EcsParameters { - s.TaskDefinitionArn = &v - return s -} - -type EnableRuleInput struct { - _ struct{} `type:"structure"` - - // The name of the rule. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s EnableRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableRuleInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *EnableRuleInput) SetName(v string) *EnableRuleInput { - s.Name = &v - return s -} - -type EnableRuleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableRuleOutput) GoString() string { - return s.String() -} - -// Contains the parameters needed for you to provide custom input to a target -// based on one or more pieces of data extracted from the event. -type InputTransformer struct { - _ struct{} `type:"structure"` - - // Map of JSON paths to be extracted from the event. You can then insert these - // in the template in InputTemplate to produce the output you want to be sent - // to the target. - // - // InputPathsMap is an array key-value pairs, where each value is a valid JSON - // path. You can have as many as 10 key-value pairs. You must use JSON dot notation, - // not bracket notation. - // - // The keys cannot start with "AWS." - InputPathsMap map[string]*string `type:"map"` - - // Input template where you specify placeholders that will be filled with the - // values of the keys from InputPathsMap to customize the data sent to the target. - // Enclose each InputPathsMaps value in brackets: The InputTemplate - // must be valid JSON. - // - // If InputTemplate is a JSON object (surrounded by curly braces), the following - // restrictions apply: - // - // * The placeholder cannot be used as an object key. - // - // * Object values cannot include quote marks. - // - // The following example shows the syntax for using InputPathsMap and InputTemplate. - // - // "InputTransformer": - // - // { - // - // "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"}, - // - // "InputTemplate": " is in state " - // - // } - // - // To have the InputTemplate include quote marks within a JSON string, escape - // each quote marks with a slash, as in the following example: - // - // "InputTransformer": - // - // { - // - // "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"}, - // - // "InputTemplate": " is in state \"\"" - // - // } - // - // InputTemplate is a required field - InputTemplate *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s InputTransformer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputTransformer) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputTransformer) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputTransformer"} - if s.InputTemplate == nil { - invalidParams.Add(request.NewErrParamRequired("InputTemplate")) - } - if s.InputTemplate != nil && len(*s.InputTemplate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputTemplate", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputPathsMap sets the InputPathsMap field's value. -func (s *InputTransformer) SetInputPathsMap(v map[string]*string) *InputTransformer { - s.InputPathsMap = v - return s -} - -// SetInputTemplate sets the InputTemplate field's value. -func (s *InputTransformer) SetInputTemplate(v string) *InputTransformer { - s.InputTemplate = &v - return s -} - -// This object enables you to specify a JSON path to extract from the event -// and use as the partition key for the Amazon Kinesis data stream, so that -// you can control the shard to which the event goes. If you do not include -// this parameter, the default is to use the eventId as the partition key. -type KinesisParameters struct { - _ struct{} `type:"structure"` - - // The JSON path to be extracted from the event and used as the partition key. - // For more information, see Amazon Kinesis Streams Key Concepts (http://docs.aws.amazon.com/streams/latest/dev/key-concepts.html#partition-key) - // in the Amazon Kinesis Streams Developer Guide. - // - // PartitionKeyPath is a required field - PartitionKeyPath *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s KinesisParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KinesisParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KinesisParameters"} - if s.PartitionKeyPath == nil { - invalidParams.Add(request.NewErrParamRequired("PartitionKeyPath")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPartitionKeyPath sets the PartitionKeyPath field's value. -func (s *KinesisParameters) SetPartitionKeyPath(v string) *KinesisParameters { - s.PartitionKeyPath = &v - return s -} - -type ListRuleNamesByTargetInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return. - Limit *int64 `min:"1" type:"integer"` - - // The token returned by a previous call to retrieve the next set of results. - NextToken *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the target resource. - // - // TargetArn is a required field - TargetArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListRuleNamesByTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRuleNamesByTargetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRuleNamesByTargetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRuleNamesByTargetInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.TargetArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetArn")) - } - if s.TargetArn != nil && len(*s.TargetArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListRuleNamesByTargetInput) SetLimit(v int64) *ListRuleNamesByTargetInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRuleNamesByTargetInput) SetNextToken(v string) *ListRuleNamesByTargetInput { - s.NextToken = &v - return s -} - -// SetTargetArn sets the TargetArn field's value. -func (s *ListRuleNamesByTargetInput) SetTargetArn(v string) *ListRuleNamesByTargetInput { - s.TargetArn = &v - return s -} - -type ListRuleNamesByTargetOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether there are additional results to retrieve. If there are - // no more results, the value is null. - NextToken *string `min:"1" type:"string"` - - // The names of the rules that can invoke the given target. - RuleNames []*string `type:"list"` -} - -// String returns the string representation -func (s ListRuleNamesByTargetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRuleNamesByTargetOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRuleNamesByTargetOutput) SetNextToken(v string) *ListRuleNamesByTargetOutput { - s.NextToken = &v - return s -} - -// SetRuleNames sets the RuleNames field's value. -func (s *ListRuleNamesByTargetOutput) SetRuleNames(v []*string) *ListRuleNamesByTargetOutput { - s.RuleNames = v - return s -} - -type ListRulesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return. - Limit *int64 `min:"1" type:"integer"` - - // The prefix matching the rule name. - NamePrefix *string `min:"1" type:"string"` - - // The token returned by a previous call to retrieve the next set of results. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListRulesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRulesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRulesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRulesInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListRulesInput) SetLimit(v int64) *ListRulesInput { - s.Limit = &v - return s -} - -// SetNamePrefix sets the NamePrefix field's value. -func (s *ListRulesInput) SetNamePrefix(v string) *ListRulesInput { - s.NamePrefix = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRulesInput) SetNextToken(v string) *ListRulesInput { - s.NextToken = &v - return s -} - -type ListRulesOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether there are additional results to retrieve. If there are - // no more results, the value is null. - NextToken *string `min:"1" type:"string"` - - // The rules that match the specified criteria. - Rules []*Rule `type:"list"` -} - -// String returns the string representation -func (s ListRulesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRulesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRulesOutput) SetNextToken(v string) *ListRulesOutput { - s.NextToken = &v - return s -} - -// SetRules sets the Rules field's value. -func (s *ListRulesOutput) SetRules(v []*Rule) *ListRulesOutput { - s.Rules = v - return s -} - -type ListTargetsByRuleInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return. - Limit *int64 `min:"1" type:"integer"` - - // The token returned by a previous call to retrieve the next set of results. - NextToken *string `min:"1" type:"string"` - - // The name of the rule. - // - // Rule is a required field - Rule *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTargetsByRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTargetsByRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTargetsByRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTargetsByRuleInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.Rule == nil { - invalidParams.Add(request.NewErrParamRequired("Rule")) - } - if s.Rule != nil && len(*s.Rule) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Rule", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListTargetsByRuleInput) SetLimit(v int64) *ListTargetsByRuleInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTargetsByRuleInput) SetNextToken(v string) *ListTargetsByRuleInput { - s.NextToken = &v - return s -} - -// SetRule sets the Rule field's value. -func (s *ListTargetsByRuleInput) SetRule(v string) *ListTargetsByRuleInput { - s.Rule = &v - return s -} - -type ListTargetsByRuleOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether there are additional results to retrieve. If there are - // no more results, the value is null. - NextToken *string `min:"1" type:"string"` - - // The targets assigned to the rule. - Targets []*Target `min:"1" type:"list"` -} - -// String returns the string representation -func (s ListTargetsByRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTargetsByRuleOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTargetsByRuleOutput) SetNextToken(v string) *ListTargetsByRuleOutput { - s.NextToken = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *ListTargetsByRuleOutput) SetTargets(v []*Target) *ListTargetsByRuleOutput { - s.Targets = v - return s -} - -// This structure specifies the network configuration for an ECS task. -type NetworkConfiguration struct { - _ struct{} `type:"structure"` - - // Use this structure to specify the VPC subnets and security groups for the - // task, and whether a public IP address is to be used. This structure is relevant - // only for ECS tasks that use the awsvpc network mode. - AwsvpcConfiguration *AwsVpcConfiguration `locationName:"awsvpcConfiguration" type:"structure"` -} - -// String returns the string representation -func (s NetworkConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NetworkConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NetworkConfiguration"} - if s.AwsvpcConfiguration != nil { - if err := s.AwsvpcConfiguration.Validate(); err != nil { - invalidParams.AddNested("AwsvpcConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAwsvpcConfiguration sets the AwsvpcConfiguration field's value. -func (s *NetworkConfiguration) SetAwsvpcConfiguration(v *AwsVpcConfiguration) *NetworkConfiguration { - s.AwsvpcConfiguration = v - return s -} - -type PutEventsInput struct { - _ struct{} `type:"structure"` - - // The entry that defines an event in your system. You can specify several parameters - // for the entry such as the source and type of the event, resources associated - // with the event, and so on. - // - // Entries is a required field - Entries []*PutEventsRequestEntry `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s PutEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutEventsInput"} - if s.Entries == nil { - invalidParams.Add(request.NewErrParamRequired("Entries")) - } - if s.Entries != nil && len(s.Entries) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Entries", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEntries sets the Entries field's value. -func (s *PutEventsInput) SetEntries(v []*PutEventsRequestEntry) *PutEventsInput { - s.Entries = v - return s -} - -type PutEventsOutput struct { - _ struct{} `type:"structure"` - - // The successfully and unsuccessfully ingested events results. If the ingestion - // was successful, the entry has the event ID in it. Otherwise, you can use - // the error code and error message to identify the problem with the entry. - Entries []*PutEventsResultEntry `type:"list"` - - // The number of failed entries. - FailedEntryCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s PutEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutEventsOutput) GoString() string { - return s.String() -} - -// SetEntries sets the Entries field's value. -func (s *PutEventsOutput) SetEntries(v []*PutEventsResultEntry) *PutEventsOutput { - s.Entries = v - return s -} - -// SetFailedEntryCount sets the FailedEntryCount field's value. -func (s *PutEventsOutput) SetFailedEntryCount(v int64) *PutEventsOutput { - s.FailedEntryCount = &v - return s -} - -// Represents an event to be submitted. -type PutEventsRequestEntry struct { - _ struct{} `type:"structure"` - - // A valid JSON string. There is no other schema imposed. The JSON string may - // contain fields and nested subobjects. - Detail *string `type:"string"` - - // Free-form string used to decide what fields to expect in the event detail. - DetailType *string `type:"string"` - - // AWS resources, identified by Amazon Resource Name (ARN), which the event - // primarily concerns. Any number, including zero, may be present. - Resources []*string `type:"list"` - - // The source of the event. This field is required. - Source *string `type:"string"` - - // The time stamp of the event, per RFC3339 (https://www.rfc-editor.org/rfc/rfc3339.txt). - // If no time stamp is provided, the time stamp of the PutEvents call is used. - Time *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s PutEventsRequestEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutEventsRequestEntry) GoString() string { - return s.String() -} - -// SetDetail sets the Detail field's value. -func (s *PutEventsRequestEntry) SetDetail(v string) *PutEventsRequestEntry { - s.Detail = &v - return s -} - -// SetDetailType sets the DetailType field's value. -func (s *PutEventsRequestEntry) SetDetailType(v string) *PutEventsRequestEntry { - s.DetailType = &v - return s -} - -// SetResources sets the Resources field's value. -func (s *PutEventsRequestEntry) SetResources(v []*string) *PutEventsRequestEntry { - s.Resources = v - return s -} - -// SetSource sets the Source field's value. -func (s *PutEventsRequestEntry) SetSource(v string) *PutEventsRequestEntry { - s.Source = &v - return s -} - -// SetTime sets the Time field's value. -func (s *PutEventsRequestEntry) SetTime(v time.Time) *PutEventsRequestEntry { - s.Time = &v - return s -} - -// Represents an event that failed to be submitted. -type PutEventsResultEntry struct { - _ struct{} `type:"structure"` - - // The error code that indicates why the event submission failed. - ErrorCode *string `type:"string"` - - // The error message that explains why the event submission failed. - ErrorMessage *string `type:"string"` - - // The ID of the event. - EventId *string `type:"string"` -} - -// String returns the string representation -func (s PutEventsResultEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutEventsResultEntry) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *PutEventsResultEntry) SetErrorCode(v string) *PutEventsResultEntry { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *PutEventsResultEntry) SetErrorMessage(v string) *PutEventsResultEntry { - s.ErrorMessage = &v - return s -} - -// SetEventId sets the EventId field's value. -func (s *PutEventsResultEntry) SetEventId(v string) *PutEventsResultEntry { - s.EventId = &v - return s -} - -type PutPermissionInput struct { - _ struct{} `type:"structure"` - - // The action that you are enabling the other account to perform. Currently, - // this must be events:PutEvents. - // - // Action is a required field - Action *string `min:"1" type:"string" required:"true"` - - // This parameter enables you to limit the permission to accounts that fulfill - // a certain condition, such as being a member of a certain AWS organization. - // For more information about AWS Organizations, see What Is AWS Organizations - // (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html) - // in the AWS Organizations User Guide. - // - // If you specify Condition with an AWS organization ID, and specify "*" as - // the value for Principal, you grant permission to all the accounts in the - // named organization. - // - // The Condition is a JSON string which must contain Type, Key, and Value fields. - Condition *Condition `type:"structure"` - - // The 12-digit AWS account ID that you are permitting to put events to your - // default event bus. Specify "*" to permit any account to put events to your - // default event bus. - // - // If you specify "*" without specifying Condition, avoid creating rules that - // may match undesirable events. To create more secure rules, make sure that - // the event pattern for each rule contains an account field with a specific - // account ID from which to receive events. Rules with an account field do not - // match any events sent from other accounts. - // - // Principal is a required field - Principal *string `min:"1" type:"string" required:"true"` - - // An identifier string for the external account that you are granting permissions - // to. If you later want to revoke the permission for this external account, - // specify this StatementId when you run RemovePermission. - // - // StatementId is a required field - StatementId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutPermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutPermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutPermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutPermissionInput"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.Action != nil && len(*s.Action) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Action", 1)) - } - if s.Principal == nil { - invalidParams.Add(request.NewErrParamRequired("Principal")) - } - if s.Principal != nil && len(*s.Principal) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Principal", 1)) - } - if s.StatementId == nil { - invalidParams.Add(request.NewErrParamRequired("StatementId")) - } - if s.StatementId != nil && len(*s.StatementId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) - } - if s.Condition != nil { - if err := s.Condition.Validate(); err != nil { - invalidParams.AddNested("Condition", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *PutPermissionInput) SetAction(v string) *PutPermissionInput { - s.Action = &v - return s -} - -// SetCondition sets the Condition field's value. -func (s *PutPermissionInput) SetCondition(v *Condition) *PutPermissionInput { - s.Condition = v - return s -} - -// SetPrincipal sets the Principal field's value. -func (s *PutPermissionInput) SetPrincipal(v string) *PutPermissionInput { - s.Principal = &v - return s -} - -// SetStatementId sets the StatementId field's value. -func (s *PutPermissionInput) SetStatementId(v string) *PutPermissionInput { - s.StatementId = &v - return s -} - -type PutPermissionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutPermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutPermissionOutput) GoString() string { - return s.String() -} - -type PutRuleInput struct { - _ struct{} `type:"structure"` - - // A description of the rule. - Description *string `type:"string"` - - // The event pattern. For more information, see Events and Event Patterns (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html) - // in the Amazon CloudWatch Events User Guide. - EventPattern *string `type:"string"` - - // The name of the rule that you are creating or updating. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM role associated with the rule. - RoleArn *string `min:"1" type:"string"` - - // The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 minutes)". - ScheduleExpression *string `type:"string"` - - // Indicates whether the rule is enabled or disabled. - State *string `type:"string" enum:"RuleState"` -} - -// String returns the string representation -func (s PutRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutRuleInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.RoleArn != nil && len(*s.RoleArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *PutRuleInput) SetDescription(v string) *PutRuleInput { - s.Description = &v - return s -} - -// SetEventPattern sets the EventPattern field's value. -func (s *PutRuleInput) SetEventPattern(v string) *PutRuleInput { - s.EventPattern = &v - return s -} - -// SetName sets the Name field's value. -func (s *PutRuleInput) SetName(v string) *PutRuleInput { - s.Name = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *PutRuleInput) SetRoleArn(v string) *PutRuleInput { - s.RoleArn = &v - return s -} - -// SetScheduleExpression sets the ScheduleExpression field's value. -func (s *PutRuleInput) SetScheduleExpression(v string) *PutRuleInput { - s.ScheduleExpression = &v - return s -} - -// SetState sets the State field's value. -func (s *PutRuleInput) SetState(v string) *PutRuleInput { - s.State = &v - return s -} - -type PutRuleOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the rule. - RuleArn *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PutRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRuleOutput) GoString() string { - return s.String() -} - -// SetRuleArn sets the RuleArn field's value. -func (s *PutRuleOutput) SetRuleArn(v string) *PutRuleOutput { - s.RuleArn = &v - return s -} - -type PutTargetsInput struct { - _ struct{} `type:"structure"` - - // The name of the rule. - // - // Rule is a required field - Rule *string `min:"1" type:"string" required:"true"` - - // The targets to update or add to the rule. - // - // Targets is a required field - Targets []*Target `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s PutTargetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutTargetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutTargetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutTargetsInput"} - if s.Rule == nil { - invalidParams.Add(request.NewErrParamRequired("Rule")) - } - if s.Rule != nil && len(*s.Rule) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Rule", 1)) - } - if s.Targets == nil { - invalidParams.Add(request.NewErrParamRequired("Targets")) - } - if s.Targets != nil && len(s.Targets) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Targets", 1)) - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRule sets the Rule field's value. -func (s *PutTargetsInput) SetRule(v string) *PutTargetsInput { - s.Rule = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *PutTargetsInput) SetTargets(v []*Target) *PutTargetsInput { - s.Targets = v - return s -} - -type PutTargetsOutput struct { - _ struct{} `type:"structure"` - - // The failed target entries. - FailedEntries []*PutTargetsResultEntry `type:"list"` - - // The number of failed entries. - FailedEntryCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s PutTargetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutTargetsOutput) GoString() string { - return s.String() -} - -// SetFailedEntries sets the FailedEntries field's value. -func (s *PutTargetsOutput) SetFailedEntries(v []*PutTargetsResultEntry) *PutTargetsOutput { - s.FailedEntries = v - return s -} - -// SetFailedEntryCount sets the FailedEntryCount field's value. -func (s *PutTargetsOutput) SetFailedEntryCount(v int64) *PutTargetsOutput { - s.FailedEntryCount = &v - return s -} - -// Represents a target that failed to be added to a rule. -type PutTargetsResultEntry struct { - _ struct{} `type:"structure"` - - // The error code that indicates why the target addition failed. If the value - // is ConcurrentModificationException, too many requests were made at the same - // time. - ErrorCode *string `type:"string"` - - // The error message that explains why the target addition failed. - ErrorMessage *string `type:"string"` - - // The ID of the target. - TargetId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PutTargetsResultEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutTargetsResultEntry) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *PutTargetsResultEntry) SetErrorCode(v string) *PutTargetsResultEntry { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *PutTargetsResultEntry) SetErrorMessage(v string) *PutTargetsResultEntry { - s.ErrorMessage = &v - return s -} - -// SetTargetId sets the TargetId field's value. -func (s *PutTargetsResultEntry) SetTargetId(v string) *PutTargetsResultEntry { - s.TargetId = &v - return s -} - -type RemovePermissionInput struct { - _ struct{} `type:"structure"` - - // The statement ID corresponding to the account that is no longer allowed to - // put events to the default event bus. - // - // StatementId is a required field - StatementId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RemovePermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemovePermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemovePermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"} - if s.StatementId == nil { - invalidParams.Add(request.NewErrParamRequired("StatementId")) - } - if s.StatementId != nil && len(*s.StatementId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStatementId sets the StatementId field's value. -func (s *RemovePermissionInput) SetStatementId(v string) *RemovePermissionInput { - s.StatementId = &v - return s -} - -type RemovePermissionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemovePermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemovePermissionOutput) GoString() string { - return s.String() -} - -type RemoveTargetsInput struct { - _ struct{} `type:"structure"` - - // If this is a managed rule, created by an AWS service on your behalf, you - // must specify Force as True to remove targets. This parameter is ignored for - // rules that are not managed rules. You can check whether a rule is a managed - // rule by using DescribeRule or ListRules and checking the ManagedBy field - // of the response. - Force *bool `type:"boolean"` - - // The IDs of the targets to remove from the rule. - // - // Ids is a required field - Ids []*string `min:"1" type:"list" required:"true"` - - // The name of the rule. - // - // Rule is a required field - Rule *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RemoveTargetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTargetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTargetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTargetsInput"} - if s.Ids == nil { - invalidParams.Add(request.NewErrParamRequired("Ids")) - } - if s.Ids != nil && len(s.Ids) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Ids", 1)) - } - if s.Rule == nil { - invalidParams.Add(request.NewErrParamRequired("Rule")) - } - if s.Rule != nil && len(*s.Rule) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Rule", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForce sets the Force field's value. -func (s *RemoveTargetsInput) SetForce(v bool) *RemoveTargetsInput { - s.Force = &v - return s -} - -// SetIds sets the Ids field's value. -func (s *RemoveTargetsInput) SetIds(v []*string) *RemoveTargetsInput { - s.Ids = v - return s -} - -// SetRule sets the Rule field's value. -func (s *RemoveTargetsInput) SetRule(v string) *RemoveTargetsInput { - s.Rule = &v - return s -} - -type RemoveTargetsOutput struct { - _ struct{} `type:"structure"` - - // The failed target entries. - FailedEntries []*RemoveTargetsResultEntry `type:"list"` - - // The number of failed entries. - FailedEntryCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s RemoveTargetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTargetsOutput) GoString() string { - return s.String() -} - -// SetFailedEntries sets the FailedEntries field's value. -func (s *RemoveTargetsOutput) SetFailedEntries(v []*RemoveTargetsResultEntry) *RemoveTargetsOutput { - s.FailedEntries = v - return s -} - -// SetFailedEntryCount sets the FailedEntryCount field's value. -func (s *RemoveTargetsOutput) SetFailedEntryCount(v int64) *RemoveTargetsOutput { - s.FailedEntryCount = &v - return s -} - -// Represents a target that failed to be removed from a rule. -type RemoveTargetsResultEntry struct { - _ struct{} `type:"structure"` - - // The error code that indicates why the target removal failed. If the value - // is ConcurrentModificationException, too many requests were made at the same - // time. - ErrorCode *string `type:"string"` - - // The error message that explains why the target removal failed. - ErrorMessage *string `type:"string"` - - // The ID of the target. - TargetId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s RemoveTargetsResultEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTargetsResultEntry) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *RemoveTargetsResultEntry) SetErrorCode(v string) *RemoveTargetsResultEntry { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *RemoveTargetsResultEntry) SetErrorMessage(v string) *RemoveTargetsResultEntry { - s.ErrorMessage = &v - return s -} - -// SetTargetId sets the TargetId field's value. -func (s *RemoveTargetsResultEntry) SetTargetId(v string) *RemoveTargetsResultEntry { - s.TargetId = &v - return s -} - -// Contains information about a rule in Amazon CloudWatch Events. -type Rule struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the rule. - Arn *string `min:"1" type:"string"` - - // The description of the rule. - Description *string `type:"string"` - - // The event pattern of the rule. For more information, see Events and Event - // Patterns (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html) - // in the Amazon CloudWatch Events User Guide. - EventPattern *string `type:"string"` - - // If the rule was created on behalf of your account by an AWS service, this - // field displays the principal name of the service that created the rule. - ManagedBy *string `min:"1" type:"string"` - - // The name of the rule. - Name *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the role that is used for target invocation. - RoleArn *string `min:"1" type:"string"` - - // The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". - ScheduleExpression *string `type:"string"` - - // The state of the rule. - State *string `type:"string" enum:"RuleState"` -} - -// String returns the string representation -func (s Rule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Rule) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Rule) SetArn(v string) *Rule { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Rule) SetDescription(v string) *Rule { - s.Description = &v - return s -} - -// SetEventPattern sets the EventPattern field's value. -func (s *Rule) SetEventPattern(v string) *Rule { - s.EventPattern = &v - return s -} - -// SetManagedBy sets the ManagedBy field's value. -func (s *Rule) SetManagedBy(v string) *Rule { - s.ManagedBy = &v - return s -} - -// SetName sets the Name field's value. -func (s *Rule) SetName(v string) *Rule { - s.Name = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *Rule) SetRoleArn(v string) *Rule { - s.RoleArn = &v - return s -} - -// SetScheduleExpression sets the ScheduleExpression field's value. -func (s *Rule) SetScheduleExpression(v string) *Rule { - s.ScheduleExpression = &v - return s -} - -// SetState sets the State field's value. -func (s *Rule) SetState(v string) *Rule { - s.State = &v - return s -} - -// This parameter contains the criteria (either InstanceIds or a tag) used to -// specify which EC2 instances are to be sent the command. -type RunCommandParameters struct { - _ struct{} `type:"structure"` - - // Currently, we support including only one RunCommandTarget block, which specifies - // either an array of InstanceIds or a tag. - // - // RunCommandTargets is a required field - RunCommandTargets []*RunCommandTarget `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s RunCommandParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RunCommandParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RunCommandParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RunCommandParameters"} - if s.RunCommandTargets == nil { - invalidParams.Add(request.NewErrParamRequired("RunCommandTargets")) - } - if s.RunCommandTargets != nil && len(s.RunCommandTargets) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RunCommandTargets", 1)) - } - if s.RunCommandTargets != nil { - for i, v := range s.RunCommandTargets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RunCommandTargets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRunCommandTargets sets the RunCommandTargets field's value. -func (s *RunCommandParameters) SetRunCommandTargets(v []*RunCommandTarget) *RunCommandParameters { - s.RunCommandTargets = v - return s -} - -// Information about the EC2 instances that are to be sent the command, specified -// as key-value pairs. Each RunCommandTarget block can include only one key, -// but this key may specify multiple values. -type RunCommandTarget struct { - _ struct{} `type:"structure"` - - // Can be either tag:tag-key or InstanceIds. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // If Key is tag:tag-key, Values is a list of tag values. If Key is InstanceIds, - // Values is a list of Amazon EC2 instance IDs. - // - // Values is a required field - Values []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s RunCommandTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RunCommandTarget) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RunCommandTarget) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RunCommandTarget"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *RunCommandTarget) SetKey(v string) *RunCommandTarget { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *RunCommandTarget) SetValues(v []*string) *RunCommandTarget { - s.Values = v - return s -} - -// This structure includes the custom parameter to be used when the target is -// an SQS FIFO queue. -type SqsParameters struct { - _ struct{} `type:"structure"` - - // The FIFO message group ID to use as the target. - MessageGroupId *string `type:"string"` -} - -// String returns the string representation -func (s SqsParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SqsParameters) GoString() string { - return s.String() -} - -// SetMessageGroupId sets the MessageGroupId field's value. -func (s *SqsParameters) SetMessageGroupId(v string) *SqsParameters { - s.MessageGroupId = &v - return s -} - -// Targets are the resources to be invoked when a rule is triggered. For a complete -// list of services and resources that can be set as a target, see PutTargets. -// -// If you are setting the event bus of another account as the target, and that -// account granted permission to your account through an organization instead -// of directly by the account ID, then you must specify a RoleArn with proper -// permissions in the Target structure. For more information, see Sending and -// Receiving Events Between AWS Accounts (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEvents-CrossAccountEventDelivery.html) -// in the Amazon CloudWatch Events User Guide. -type Target struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the target. - // - // Arn is a required field - Arn *string `min:"1" type:"string" required:"true"` - - // If the event target is an AWS Batch job, this contains the job definition, - // job name, and other parameters. For more information, see Jobs (http://docs.aws.amazon.com/batch/latest/userguide/jobs.html) - // in the AWS Batch User Guide. - BatchParameters *BatchParameters `type:"structure"` - - // Contains the Amazon ECS task definition and task count to be used, if the - // event target is an Amazon ECS task. For more information about Amazon ECS - // tasks, see Task Definitions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) - // in the Amazon EC2 Container Service Developer Guide. - EcsParameters *EcsParameters `type:"structure"` - - // The ID of the target. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` - - // Valid JSON text passed to the target. In this case, nothing from the event - // itself is passed to the target. For more information, see The JavaScript - // Object Notation (JSON) Data Interchange Format (http://www.rfc-editor.org/rfc/rfc7159.txt). - Input *string `type:"string"` - - // The value of the JSONPath that is used for extracting part of the matched - // event when passing it to the target. You must use JSON dot notation, not - // bracket notation. For more information about JSON paths, see JSONPath (http://goessner.net/articles/JsonPath/). - InputPath *string `type:"string"` - - // Settings to enable you to provide custom input to a target based on certain - // event data. You can extract one or more key-value pairs from the event and - // then use that data to send customized input to the target. - InputTransformer *InputTransformer `type:"structure"` - - // The custom parameter you can use to control the shard assignment, when the - // target is a Kinesis data stream. If you do not include this parameter, the - // default is to use the eventId as the partition key. - KinesisParameters *KinesisParameters `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM role to be used for this target - // when the rule is triggered. If one rule triggers multiple targets, you can - // use a different IAM role for each target. - RoleArn *string `min:"1" type:"string"` - - // Parameters used when you are using the rule to invoke Amazon EC2 Run Command. - RunCommandParameters *RunCommandParameters `type:"structure"` - - // Contains the message group ID to use when the target is a FIFO queue. - // - // If you specify an SQS FIFO queue as a target, the queue must have content-based - // deduplication enabled. - SqsParameters *SqsParameters `type:"structure"` -} - -// String returns the string representation -func (s Target) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Target) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Target) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Target"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.RoleArn != nil && len(*s.RoleArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) - } - if s.BatchParameters != nil { - if err := s.BatchParameters.Validate(); err != nil { - invalidParams.AddNested("BatchParameters", err.(request.ErrInvalidParams)) - } - } - if s.EcsParameters != nil { - if err := s.EcsParameters.Validate(); err != nil { - invalidParams.AddNested("EcsParameters", err.(request.ErrInvalidParams)) - } - } - if s.InputTransformer != nil { - if err := s.InputTransformer.Validate(); err != nil { - invalidParams.AddNested("InputTransformer", err.(request.ErrInvalidParams)) - } - } - if s.KinesisParameters != nil { - if err := s.KinesisParameters.Validate(); err != nil { - invalidParams.AddNested("KinesisParameters", err.(request.ErrInvalidParams)) - } - } - if s.RunCommandParameters != nil { - if err := s.RunCommandParameters.Validate(); err != nil { - invalidParams.AddNested("RunCommandParameters", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *Target) SetArn(v string) *Target { - s.Arn = &v - return s -} - -// SetBatchParameters sets the BatchParameters field's value. -func (s *Target) SetBatchParameters(v *BatchParameters) *Target { - s.BatchParameters = v - return s -} - -// SetEcsParameters sets the EcsParameters field's value. -func (s *Target) SetEcsParameters(v *EcsParameters) *Target { - s.EcsParameters = v - return s -} - -// SetId sets the Id field's value. -func (s *Target) SetId(v string) *Target { - s.Id = &v - return s -} - -// SetInput sets the Input field's value. -func (s *Target) SetInput(v string) *Target { - s.Input = &v - return s -} - -// SetInputPath sets the InputPath field's value. -func (s *Target) SetInputPath(v string) *Target { - s.InputPath = &v - return s -} - -// SetInputTransformer sets the InputTransformer field's value. -func (s *Target) SetInputTransformer(v *InputTransformer) *Target { - s.InputTransformer = v - return s -} - -// SetKinesisParameters sets the KinesisParameters field's value. -func (s *Target) SetKinesisParameters(v *KinesisParameters) *Target { - s.KinesisParameters = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *Target) SetRoleArn(v string) *Target { - s.RoleArn = &v - return s -} - -// SetRunCommandParameters sets the RunCommandParameters field's value. -func (s *Target) SetRunCommandParameters(v *RunCommandParameters) *Target { - s.RunCommandParameters = v - return s -} - -// SetSqsParameters sets the SqsParameters field's value. -func (s *Target) SetSqsParameters(v *SqsParameters) *Target { - s.SqsParameters = v - return s -} - -type TestEventPatternInput struct { - _ struct{} `type:"structure"` - - // The event, in JSON format, to test against the event pattern. - // - // Event is a required field - Event *string `type:"string" required:"true"` - - // The event pattern. For more information, see Events and Event Patterns (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html) - // in the Amazon CloudWatch Events User Guide. - // - // EventPattern is a required field - EventPattern *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s TestEventPatternInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestEventPatternInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TestEventPatternInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TestEventPatternInput"} - if s.Event == nil { - invalidParams.Add(request.NewErrParamRequired("Event")) - } - if s.EventPattern == nil { - invalidParams.Add(request.NewErrParamRequired("EventPattern")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEvent sets the Event field's value. -func (s *TestEventPatternInput) SetEvent(v string) *TestEventPatternInput { - s.Event = &v - return s -} - -// SetEventPattern sets the EventPattern field's value. -func (s *TestEventPatternInput) SetEventPattern(v string) *TestEventPatternInput { - s.EventPattern = &v - return s -} - -type TestEventPatternOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether the event matches the event pattern. - Result *bool `type:"boolean"` -} - -// String returns the string representation -func (s TestEventPatternOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestEventPatternOutput) GoString() string { - return s.String() -} - -// SetResult sets the Result field's value. -func (s *TestEventPatternOutput) SetResult(v bool) *TestEventPatternOutput { - s.Result = &v - return s -} - -const ( - // AssignPublicIpEnabled is a AssignPublicIp enum value - AssignPublicIpEnabled = "ENABLED" - - // AssignPublicIpDisabled is a AssignPublicIp enum value - AssignPublicIpDisabled = "DISABLED" -) - -const ( - // LaunchTypeEc2 is a LaunchType enum value - LaunchTypeEc2 = "EC2" - - // LaunchTypeFargate is a LaunchType enum value - LaunchTypeFargate = "FARGATE" -) - -const ( - // RuleStateEnabled is a RuleState enum value - RuleStateEnabled = "ENABLED" - - // RuleStateDisabled is a RuleState enum value - RuleStateDisabled = "DISABLED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go deleted file mode 100644 index 553efdee2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package cloudwatchevents provides the client and types for making API -// requests to Amazon CloudWatch Events. -// -// Amazon CloudWatch Events helps you to respond to state changes in your AWS -// resources. When your resources change state, they automatically send events -// into an event stream. You can create rules that match selected events in -// the stream and route them to targets to take action. You can also use rules -// to take action on a predetermined schedule. For example, you can configure -// rules to: -// -// * Automatically invoke an AWS Lambda function to update DNS entries when -// an event notifies you that Amazon EC2 instance enters the running state. -// -// * Direct specific API records from AWS CloudTrail to an Amazon Kinesis -// data stream for detailed analysis of potential security or availability -// risks. -// -// * Periodically invoke a built-in target to create a snapshot of an Amazon -// EBS volume. -// -// For more information about the features of Amazon CloudWatch Events, see -// the Amazon CloudWatch Events User Guide (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events). -// -// See https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07 for more information on this service. -// -// See cloudwatchevents package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatchevents/ -// -// Using the Client -// -// To contact Amazon CloudWatch Events with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon CloudWatch Events client CloudWatchEvents for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatchevents/#New -package cloudwatchevents diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/errors.go deleted file mode 100644 index 30b9de6d9..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/errors.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudwatchevents - -const ( - - // ErrCodeConcurrentModificationException for service response error code - // "ConcurrentModificationException". - // - // There is concurrent modification on a rule or target. - ErrCodeConcurrentModificationException = "ConcurrentModificationException" - - // ErrCodeInternalException for service response error code - // "InternalException". - // - // This exception occurs due to unexpected causes. - ErrCodeInternalException = "InternalException" - - // ErrCodeInvalidEventPatternException for service response error code - // "InvalidEventPatternException". - // - // The event pattern is not valid. - ErrCodeInvalidEventPatternException = "InvalidEventPatternException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // You tried to create more rules or add more targets to a rule than is allowed. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeManagedRuleException for service response error code - // "ManagedRuleException". - // - // This rule was created by an AWS service on behalf of your account. It is - // managed by that service. If you see this error in response to DeleteRule - // or RemoveTargets, you can use the Force parameter in those calls to delete - // the rule or remove targets from the rule. You cannot modify these managed - // rules by using DisableRule, EnableRule, PutTargets, or PutRule. - ErrCodeManagedRuleException = "ManagedRuleException" - - // ErrCodePolicyLengthExceededException for service response error code - // "PolicyLengthExceededException". - // - // The event bus policy is too long. For more information, see the limits. - ErrCodePolicyLengthExceededException = "PolicyLengthExceededException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // An entity that you specified does not exist. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/service.go deleted file mode 100644 index 2a7f6969c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudwatchevents - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// CloudWatchEvents provides the API operation methods for making requests to -// Amazon CloudWatch Events. See this package's package overview docs -// for details on the service. -// -// CloudWatchEvents methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CloudWatchEvents 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 = "events" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "CloudWatch Events" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CloudWatchEvents client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a CloudWatchEvents client from just a session. -// svc := cloudwatchevents.New(mySession) -// -// // Create a CloudWatchEvents client with additional configuration -// svc := cloudwatchevents.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudWatchEvents { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CloudWatchEvents { - svc := &CloudWatchEvents{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-10-07", - JSONVersion: "1.1", - TargetPrefix: "AWSEvents", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CloudWatchEvents operation and runs any -// custom request initialization. -func (c *CloudWatchEvents) 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/cloudwatchlogs/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go deleted file mode 100644 index d0e806829..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go +++ /dev/null @@ -1,8809 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudwatchlogs - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAssociateKmsKey = "AssociateKmsKey" - -// AssociateKmsKeyRequest generates a "aws/request.Request" representing the -// client's request for the AssociateKmsKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateKmsKey for more information on using the AssociateKmsKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateKmsKeyRequest method. -// req, resp := client.AssociateKmsKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKey -func (c *CloudWatchLogs) AssociateKmsKeyRequest(input *AssociateKmsKeyInput) (req *request.Request, output *AssociateKmsKeyOutput) { - op := &request.Operation{ - Name: opAssociateKmsKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateKmsKeyInput{} - } - - output = &AssociateKmsKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssociateKmsKey API operation for Amazon CloudWatch Logs. -// -// Associates the specified AWS Key Management Service (AWS KMS) customer master -// key (CMK) with the specified log group. -// -// Associating an AWS KMS CMK with a log group overrides any existing associations -// between the log group and a CMK. After a CMK is associated with a log group, -// all newly ingested data for the log group is encrypted using the CMK. This -// association is stored as long as the data encrypted with the CMK is still -// within Amazon CloudWatch Logs. This enables Amazon CloudWatch Logs to decrypt -// this data whenever it is requested. -// -// Note that it can take up to 5 minutes for this operation to take effect. -// -// If you attempt to associate a CMK with a log group but the CMK does not exist -// or the CMK is disabled, you will receive an InvalidParameterException error. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation AssociateKmsKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKey -func (c *CloudWatchLogs) AssociateKmsKey(input *AssociateKmsKeyInput) (*AssociateKmsKeyOutput, error) { - req, out := c.AssociateKmsKeyRequest(input) - return out, req.Send() -} - -// AssociateKmsKeyWithContext is the same as AssociateKmsKey with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateKmsKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) AssociateKmsKeyWithContext(ctx aws.Context, input *AssociateKmsKeyInput, opts ...request.Option) (*AssociateKmsKeyOutput, error) { - req, out := c.AssociateKmsKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelExportTask = "CancelExportTask" - -// CancelExportTaskRequest generates a "aws/request.Request" representing the -// client's request for the CancelExportTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelExportTask for more information on using the CancelExportTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelExportTaskRequest method. -// req, resp := client.CancelExportTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CancelExportTask -func (c *CloudWatchLogs) CancelExportTaskRequest(input *CancelExportTaskInput) (req *request.Request, output *CancelExportTaskOutput) { - op := &request.Operation{ - Name: opCancelExportTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelExportTaskInput{} - } - - output = &CancelExportTaskOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CancelExportTask API operation for Amazon CloudWatch Logs. -// -// Cancels the specified export task. -// -// The task must be in the PENDING or RUNNING state. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation CancelExportTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The operation is not valid on the specified resource. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CancelExportTask -func (c *CloudWatchLogs) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskOutput, error) { - req, out := c.CancelExportTaskRequest(input) - return out, req.Send() -} - -// CancelExportTaskWithContext is the same as CancelExportTask with the addition of -// the ability to pass a context and additional request options. -// -// See CancelExportTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) CancelExportTaskWithContext(ctx aws.Context, input *CancelExportTaskInput, opts ...request.Option) (*CancelExportTaskOutput, error) { - req, out := c.CancelExportTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateExportTask = "CreateExportTask" - -// CreateExportTaskRequest generates a "aws/request.Request" representing the -// client's request for the CreateExportTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateExportTask for more information on using the CreateExportTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateExportTaskRequest method. -// req, resp := client.CreateExportTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateExportTask -func (c *CloudWatchLogs) CreateExportTaskRequest(input *CreateExportTaskInput) (req *request.Request, output *CreateExportTaskOutput) { - op := &request.Operation{ - Name: opCreateExportTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateExportTaskInput{} - } - - output = &CreateExportTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateExportTask API operation for Amazon CloudWatch Logs. -// -// Creates an export task, which allows you to efficiently export data from -// a log group to an Amazon S3 bucket. -// -// This is an asynchronous call. If all the required information is provided, -// this operation initiates an export task and responds with the ID of the task. -// After the task has started, you can use DescribeExportTasks to get the status -// of the export task. Each account can only have one active (RUNNING or PENDING) -// export task at a time. To cancel an export task, use CancelExportTask. -// -// You can export logs from multiple log groups or multiple time ranges to the -// same S3 bucket. To separate out log data for each export task, you can specify -// a prefix to be used as the Amazon S3 key prefix for all exported objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation CreateExportTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have reached the maximum number of resources that can be created. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The specified resource already exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateExportTask -func (c *CloudWatchLogs) CreateExportTask(input *CreateExportTaskInput) (*CreateExportTaskOutput, error) { - req, out := c.CreateExportTaskRequest(input) - return out, req.Send() -} - -// CreateExportTaskWithContext is the same as CreateExportTask with the addition of -// the ability to pass a context and additional request options. -// -// See CreateExportTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) CreateExportTaskWithContext(ctx aws.Context, input *CreateExportTaskInput, opts ...request.Option) (*CreateExportTaskOutput, error) { - req, out := c.CreateExportTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLogGroup = "CreateLogGroup" - -// CreateLogGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateLogGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLogGroup for more information on using the CreateLogGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLogGroupRequest method. -// req, resp := client.CreateLogGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogGroup -func (c *CloudWatchLogs) CreateLogGroupRequest(input *CreateLogGroupInput) (req *request.Request, output *CreateLogGroupOutput) { - op := &request.Operation{ - Name: opCreateLogGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLogGroupInput{} - } - - output = &CreateLogGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateLogGroup API operation for Amazon CloudWatch Logs. -// -// Creates a log group with the specified name. -// -// You can create up to 5000 log groups per account. -// -// You must use the following guidelines when naming a log group: -// -// * Log group names must be unique within a region for an AWS account. -// -// * Log group names can be between 1 and 512 characters long. -// -// * Log group names consist of the following characters: a-z, A-Z, 0-9, -// '_' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period). -// -// If you associate a AWS Key Management Service (AWS KMS) customer master key -// (CMK) with the log group, ingested data is encrypted using the CMK. This -// association is stored as long as the data encrypted with the CMK is still -// within Amazon CloudWatch Logs. This enables Amazon CloudWatch Logs to decrypt -// this data whenever it is requested. -// -// If you attempt to associate a CMK with the log group but the CMK does not -// exist or the CMK is disabled, you will receive an InvalidParameterException -// error. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation CreateLogGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The specified resource already exists. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have reached the maximum number of resources that can be created. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogGroup -func (c *CloudWatchLogs) CreateLogGroup(input *CreateLogGroupInput) (*CreateLogGroupOutput, error) { - req, out := c.CreateLogGroupRequest(input) - return out, req.Send() -} - -// CreateLogGroupWithContext is the same as CreateLogGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLogGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) CreateLogGroupWithContext(ctx aws.Context, input *CreateLogGroupInput, opts ...request.Option) (*CreateLogGroupOutput, error) { - req, out := c.CreateLogGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLogStream = "CreateLogStream" - -// CreateLogStreamRequest generates a "aws/request.Request" representing the -// client's request for the CreateLogStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLogStream for more information on using the CreateLogStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLogStreamRequest method. -// req, resp := client.CreateLogStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogStream -func (c *CloudWatchLogs) CreateLogStreamRequest(input *CreateLogStreamInput) (req *request.Request, output *CreateLogStreamOutput) { - op := &request.Operation{ - Name: opCreateLogStream, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLogStreamInput{} - } - - output = &CreateLogStreamOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateLogStream API operation for Amazon CloudWatch Logs. -// -// Creates a log stream for the specified log group. -// -// There is no limit on the number of log streams that you can create for a -// log group. -// -// You must use the following guidelines when naming a log stream: -// -// * Log stream names must be unique within the log group. -// -// * Log stream names can be between 1 and 512 characters long. -// -// * The ':' (colon) and '*' (asterisk) characters are not allowed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation CreateLogStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The specified resource already exists. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogStream -func (c *CloudWatchLogs) CreateLogStream(input *CreateLogStreamInput) (*CreateLogStreamOutput, error) { - req, out := c.CreateLogStreamRequest(input) - return out, req.Send() -} - -// CreateLogStreamWithContext is the same as CreateLogStream with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLogStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) CreateLogStreamWithContext(ctx aws.Context, input *CreateLogStreamInput, opts ...request.Option) (*CreateLogStreamOutput, error) { - req, out := c.CreateLogStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDestination = "DeleteDestination" - -// DeleteDestinationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDestination operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDestination for more information on using the DeleteDestination -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDestinationRequest method. -// req, resp := client.DeleteDestinationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination -func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) (req *request.Request, output *DeleteDestinationOutput) { - op := &request.Operation{ - Name: opDeleteDestination, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDestinationInput{} - } - - output = &DeleteDestinationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDestination API operation for Amazon CloudWatch Logs. -// -// Deletes the specified destination, and eventually disables all the subscription -// filters that publish to it. This operation does not delete the physical resource -// encapsulated by the destination. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteDestination for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination -func (c *CloudWatchLogs) DeleteDestination(input *DeleteDestinationInput) (*DeleteDestinationOutput, error) { - req, out := c.DeleteDestinationRequest(input) - return out, req.Send() -} - -// DeleteDestinationWithContext is the same as DeleteDestination with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDestination for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DeleteDestinationWithContext(ctx aws.Context, input *DeleteDestinationInput, opts ...request.Option) (*DeleteDestinationOutput, error) { - req, out := c.DeleteDestinationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLogGroup = "DeleteLogGroup" - -// DeleteLogGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLogGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLogGroup for more information on using the DeleteLogGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLogGroupRequest method. -// req, resp := client.DeleteLogGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup -func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req *request.Request, output *DeleteLogGroupOutput) { - op := &request.Operation{ - Name: opDeleteLogGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLogGroupInput{} - } - - output = &DeleteLogGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLogGroup API operation for Amazon CloudWatch Logs. -// -// Deletes the specified log group and permanently deletes all the archived -// log events associated with the log group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteLogGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup -func (c *CloudWatchLogs) DeleteLogGroup(input *DeleteLogGroupInput) (*DeleteLogGroupOutput, error) { - req, out := c.DeleteLogGroupRequest(input) - return out, req.Send() -} - -// DeleteLogGroupWithContext is the same as DeleteLogGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLogGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DeleteLogGroupWithContext(ctx aws.Context, input *DeleteLogGroupInput, opts ...request.Option) (*DeleteLogGroupOutput, error) { - req, out := c.DeleteLogGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLogStream = "DeleteLogStream" - -// DeleteLogStreamRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLogStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLogStream for more information on using the DeleteLogStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLogStreamRequest method. -// req, resp := client.DeleteLogStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream -func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (req *request.Request, output *DeleteLogStreamOutput) { - op := &request.Operation{ - Name: opDeleteLogStream, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLogStreamInput{} - } - - output = &DeleteLogStreamOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLogStream API operation for Amazon CloudWatch Logs. -// -// Deletes the specified log stream and permanently deletes all the archived -// log events associated with the log stream. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteLogStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream -func (c *CloudWatchLogs) DeleteLogStream(input *DeleteLogStreamInput) (*DeleteLogStreamOutput, error) { - req, out := c.DeleteLogStreamRequest(input) - return out, req.Send() -} - -// DeleteLogStreamWithContext is the same as DeleteLogStream with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLogStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DeleteLogStreamWithContext(ctx aws.Context, input *DeleteLogStreamInput, opts ...request.Option) (*DeleteLogStreamOutput, error) { - req, out := c.DeleteLogStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteMetricFilter = "DeleteMetricFilter" - -// DeleteMetricFilterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMetricFilter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteMetricFilter for more information on using the DeleteMetricFilter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteMetricFilterRequest method. -// req, resp := client.DeleteMetricFilterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter -func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInput) (req *request.Request, output *DeleteMetricFilterOutput) { - op := &request.Operation{ - Name: opDeleteMetricFilter, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteMetricFilterInput{} - } - - output = &DeleteMetricFilterOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteMetricFilter API operation for Amazon CloudWatch Logs. -// -// Deletes the specified metric filter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteMetricFilter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter -func (c *CloudWatchLogs) DeleteMetricFilter(input *DeleteMetricFilterInput) (*DeleteMetricFilterOutput, error) { - req, out := c.DeleteMetricFilterRequest(input) - return out, req.Send() -} - -// DeleteMetricFilterWithContext is the same as DeleteMetricFilter with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteMetricFilter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DeleteMetricFilterWithContext(ctx aws.Context, input *DeleteMetricFilterInput, opts ...request.Option) (*DeleteMetricFilterOutput, error) { - req, out := c.DeleteMetricFilterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteResourcePolicy = "DeleteResourcePolicy" - -// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteResourcePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteResourcePolicy for more information on using the DeleteResourcePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteResourcePolicyRequest method. -// req, resp := client.DeleteResourcePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy -func (c *CloudWatchLogs) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { - op := &request.Operation{ - Name: opDeleteResourcePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteResourcePolicyInput{} - } - - output = &DeleteResourcePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteResourcePolicy API operation for Amazon CloudWatch Logs. -// -// Deletes a resource policy from this account. This revokes the access of the -// identities in that policy to put log events to this account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteResourcePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy -func (c *CloudWatchLogs) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { - req, out := c.DeleteResourcePolicyRequest(input) - return out, req.Send() -} - -// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteResourcePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { - req, out := c.DeleteResourcePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRetentionPolicy = "DeleteRetentionPolicy" - -// DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRetentionPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRetentionPolicy for more information on using the DeleteRetentionPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRetentionPolicyRequest method. -// req, resp := client.DeleteRetentionPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy -func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPolicyInput) (req *request.Request, output *DeleteRetentionPolicyOutput) { - op := &request.Operation{ - Name: opDeleteRetentionPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRetentionPolicyInput{} - } - - output = &DeleteRetentionPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRetentionPolicy API operation for Amazon CloudWatch Logs. -// -// Deletes the specified retention policy. -// -// Log events do not expire if they belong to log groups without a retention -// policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteRetentionPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy -func (c *CloudWatchLogs) DeleteRetentionPolicy(input *DeleteRetentionPolicyInput) (*DeleteRetentionPolicyOutput, error) { - req, out := c.DeleteRetentionPolicyRequest(input) - return out, req.Send() -} - -// DeleteRetentionPolicyWithContext is the same as DeleteRetentionPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRetentionPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DeleteRetentionPolicyWithContext(ctx aws.Context, input *DeleteRetentionPolicyInput, opts ...request.Option) (*DeleteRetentionPolicyOutput, error) { - req, out := c.DeleteRetentionPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSubscriptionFilter = "DeleteSubscriptionFilter" - -// DeleteSubscriptionFilterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSubscriptionFilter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSubscriptionFilter for more information on using the DeleteSubscriptionFilter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSubscriptionFilterRequest method. -// req, resp := client.DeleteSubscriptionFilterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter -func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscriptionFilterInput) (req *request.Request, output *DeleteSubscriptionFilterOutput) { - op := &request.Operation{ - Name: opDeleteSubscriptionFilter, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSubscriptionFilterInput{} - } - - output = &DeleteSubscriptionFilterOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSubscriptionFilter API operation for Amazon CloudWatch Logs. -// -// Deletes the specified subscription filter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteSubscriptionFilter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter -func (c *CloudWatchLogs) DeleteSubscriptionFilter(input *DeleteSubscriptionFilterInput) (*DeleteSubscriptionFilterOutput, error) { - req, out := c.DeleteSubscriptionFilterRequest(input) - return out, req.Send() -} - -// DeleteSubscriptionFilterWithContext is the same as DeleteSubscriptionFilter with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSubscriptionFilter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DeleteSubscriptionFilterWithContext(ctx aws.Context, input *DeleteSubscriptionFilterInput, opts ...request.Option) (*DeleteSubscriptionFilterOutput, error) { - req, out := c.DeleteSubscriptionFilterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDestinations = "DescribeDestinations" - -// DescribeDestinationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDestinations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDestinations for more information on using the DescribeDestinations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDestinationsRequest method. -// req, resp := client.DescribeDestinationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations -func (c *CloudWatchLogs) DescribeDestinationsRequest(input *DescribeDestinationsInput) (req *request.Request, output *DescribeDestinationsOutput) { - op := &request.Operation{ - Name: opDescribeDestinations, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDestinationsInput{} - } - - output = &DescribeDestinationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDestinations API operation for Amazon CloudWatch Logs. -// -// Lists all your destinations. The results are ASCII-sorted by destination -// name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeDestinations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations -func (c *CloudWatchLogs) DescribeDestinations(input *DescribeDestinationsInput) (*DescribeDestinationsOutput, error) { - req, out := c.DescribeDestinationsRequest(input) - return out, req.Send() -} - -// DescribeDestinationsWithContext is the same as DescribeDestinations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDestinations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeDestinationsWithContext(ctx aws.Context, input *DescribeDestinationsInput, opts ...request.Option) (*DescribeDestinationsOutput, error) { - req, out := c.DescribeDestinationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDestinationsPages iterates over the pages of a DescribeDestinations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDestinations 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 DescribeDestinations operation. -// pageNum := 0 -// err := client.DescribeDestinationsPages(params, -// func(page *DescribeDestinationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudWatchLogs) DescribeDestinationsPages(input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool) error { - return c.DescribeDestinationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDestinationsPagesWithContext same as DescribeDestinationsPages 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 *CloudWatchLogs) DescribeDestinationsPagesWithContext(ctx aws.Context, input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDestinationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDestinationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDestinationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeExportTasks = "DescribeExportTasks" - -// DescribeExportTasksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeExportTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeExportTasks for more information on using the DescribeExportTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeExportTasksRequest method. -// req, resp := client.DescribeExportTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks -func (c *CloudWatchLogs) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput) { - op := &request.Operation{ - Name: opDescribeExportTasks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeExportTasksInput{} - } - - output = &DescribeExportTasksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeExportTasks API operation for Amazon CloudWatch Logs. -// -// Lists the specified export tasks. You can list all your export tasks or filter -// the results based on task ID or task 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 Amazon CloudWatch Logs's -// API operation DescribeExportTasks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks -func (c *CloudWatchLogs) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) { - req, out := c.DescribeExportTasksRequest(input) - return out, req.Send() -} - -// DescribeExportTasksWithContext is the same as DescribeExportTasks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeExportTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeExportTasksWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.Option) (*DescribeExportTasksOutput, error) { - req, out := c.DescribeExportTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLogGroups = "DescribeLogGroups" - -// DescribeLogGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLogGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLogGroups for more information on using the DescribeLogGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLogGroupsRequest method. -// req, resp := client.DescribeLogGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups -func (c *CloudWatchLogs) DescribeLogGroupsRequest(input *DescribeLogGroupsInput) (req *request.Request, output *DescribeLogGroupsOutput) { - op := &request.Operation{ - Name: opDescribeLogGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeLogGroupsInput{} - } - - output = &DescribeLogGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLogGroups API operation for Amazon CloudWatch Logs. -// -// Lists the specified log groups. You can list all your log groups or filter -// the results by prefix. The results are ASCII-sorted by log group name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeLogGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups -func (c *CloudWatchLogs) DescribeLogGroups(input *DescribeLogGroupsInput) (*DescribeLogGroupsOutput, error) { - req, out := c.DescribeLogGroupsRequest(input) - return out, req.Send() -} - -// DescribeLogGroupsWithContext is the same as DescribeLogGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLogGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeLogGroupsWithContext(ctx aws.Context, input *DescribeLogGroupsInput, opts ...request.Option) (*DescribeLogGroupsOutput, error) { - req, out := c.DescribeLogGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeLogGroupsPages iterates over the pages of a DescribeLogGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeLogGroups 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 DescribeLogGroups operation. -// pageNum := 0 -// err := client.DescribeLogGroupsPages(params, -// func(page *DescribeLogGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudWatchLogs) DescribeLogGroupsPages(input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool) error { - return c.DescribeLogGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeLogGroupsPagesWithContext same as DescribeLogGroupsPages 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 *CloudWatchLogs) DescribeLogGroupsPagesWithContext(ctx aws.Context, input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeLogGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLogGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeLogGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeLogStreams = "DescribeLogStreams" - -// DescribeLogStreamsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLogStreams operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLogStreams for more information on using the DescribeLogStreams -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLogStreamsRequest method. -// req, resp := client.DescribeLogStreamsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams -func (c *CloudWatchLogs) DescribeLogStreamsRequest(input *DescribeLogStreamsInput) (req *request.Request, output *DescribeLogStreamsOutput) { - op := &request.Operation{ - Name: opDescribeLogStreams, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeLogStreamsInput{} - } - - output = &DescribeLogStreamsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLogStreams API operation for Amazon CloudWatch Logs. -// -// Lists the log streams for the specified log group. You can list all the log -// streams or filter the results by prefix. You can also control how the results -// are ordered. -// -// This operation has a limit of five transactions per second, after which transactions -// are throttled. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeLogStreams for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams -func (c *CloudWatchLogs) DescribeLogStreams(input *DescribeLogStreamsInput) (*DescribeLogStreamsOutput, error) { - req, out := c.DescribeLogStreamsRequest(input) - return out, req.Send() -} - -// DescribeLogStreamsWithContext is the same as DescribeLogStreams with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLogStreams for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeLogStreamsWithContext(ctx aws.Context, input *DescribeLogStreamsInput, opts ...request.Option) (*DescribeLogStreamsOutput, error) { - req, out := c.DescribeLogStreamsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeLogStreamsPages iterates over the pages of a DescribeLogStreams operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeLogStreams 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 DescribeLogStreams operation. -// pageNum := 0 -// err := client.DescribeLogStreamsPages(params, -// func(page *DescribeLogStreamsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudWatchLogs) DescribeLogStreamsPages(input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool) error { - return c.DescribeLogStreamsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeLogStreamsPagesWithContext same as DescribeLogStreamsPages 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 *CloudWatchLogs) DescribeLogStreamsPagesWithContext(ctx aws.Context, input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeLogStreamsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLogStreamsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeLogStreamsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeMetricFilters = "DescribeMetricFilters" - -// DescribeMetricFiltersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMetricFilters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMetricFilters for more information on using the DescribeMetricFilters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMetricFiltersRequest method. -// req, resp := client.DescribeMetricFiltersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters -func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFiltersInput) (req *request.Request, output *DescribeMetricFiltersOutput) { - op := &request.Operation{ - Name: opDescribeMetricFilters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeMetricFiltersInput{} - } - - output = &DescribeMetricFiltersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMetricFilters API operation for Amazon CloudWatch Logs. -// -// Lists the specified metric filters. You can list all the metric filters or -// filter the results by log name, prefix, metric name, or metric namespace. -// The results are ASCII-sorted by filter name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeMetricFilters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters -func (c *CloudWatchLogs) DescribeMetricFilters(input *DescribeMetricFiltersInput) (*DescribeMetricFiltersOutput, error) { - req, out := c.DescribeMetricFiltersRequest(input) - return out, req.Send() -} - -// DescribeMetricFiltersWithContext is the same as DescribeMetricFilters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMetricFilters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeMetricFiltersWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, opts ...request.Option) (*DescribeMetricFiltersOutput, error) { - req, out := c.DescribeMetricFiltersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeMetricFiltersPages iterates over the pages of a DescribeMetricFilters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeMetricFilters 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 DescribeMetricFilters operation. -// pageNum := 0 -// err := client.DescribeMetricFiltersPages(params, -// func(page *DescribeMetricFiltersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudWatchLogs) DescribeMetricFiltersPages(input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool) error { - return c.DescribeMetricFiltersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeMetricFiltersPagesWithContext same as DescribeMetricFiltersPages 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 *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeMetricFiltersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeMetricFiltersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeMetricFiltersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeQueries = "DescribeQueries" - -// DescribeQueriesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeQueries operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeQueries for more information on using the DescribeQueries -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeQueriesRequest method. -// req, resp := client.DescribeQueriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries -func (c *CloudWatchLogs) DescribeQueriesRequest(input *DescribeQueriesInput) (req *request.Request, output *DescribeQueriesOutput) { - op := &request.Operation{ - Name: opDescribeQueries, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeQueriesInput{} - } - - output = &DescribeQueriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeQueries API operation for Amazon CloudWatch Logs. -// -// Returns a list of CloudWatch Logs Insights queries that are scheduled, executing, -// or have been executed recently in this account. You can request all queries, -// or limit it to queries of a specific log group or queries with a certain -// 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 Amazon CloudWatch Logs's -// API operation DescribeQueries for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries -func (c *CloudWatchLogs) DescribeQueries(input *DescribeQueriesInput) (*DescribeQueriesOutput, error) { - req, out := c.DescribeQueriesRequest(input) - return out, req.Send() -} - -// DescribeQueriesWithContext is the same as DescribeQueries with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeQueries for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeQueriesWithContext(ctx aws.Context, input *DescribeQueriesInput, opts ...request.Option) (*DescribeQueriesOutput, error) { - req, out := c.DescribeQueriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeResourcePolicies = "DescribeResourcePolicies" - -// DescribeResourcePoliciesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeResourcePolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeResourcePolicies for more information on using the DescribeResourcePolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeResourcePoliciesRequest method. -// req, resp := client.DescribeResourcePoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies -func (c *CloudWatchLogs) DescribeResourcePoliciesRequest(input *DescribeResourcePoliciesInput) (req *request.Request, output *DescribeResourcePoliciesOutput) { - op := &request.Operation{ - Name: opDescribeResourcePolicies, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeResourcePoliciesInput{} - } - - output = &DescribeResourcePoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeResourcePolicies API operation for Amazon CloudWatch Logs. -// -// Lists the resource policies in this account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeResourcePolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies -func (c *CloudWatchLogs) DescribeResourcePolicies(input *DescribeResourcePoliciesInput) (*DescribeResourcePoliciesOutput, error) { - req, out := c.DescribeResourcePoliciesRequest(input) - return out, req.Send() -} - -// DescribeResourcePoliciesWithContext is the same as DescribeResourcePolicies with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeResourcePolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeResourcePoliciesWithContext(ctx aws.Context, input *DescribeResourcePoliciesInput, opts ...request.Option) (*DescribeResourcePoliciesOutput, error) { - req, out := c.DescribeResourcePoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSubscriptionFilters = "DescribeSubscriptionFilters" - -// DescribeSubscriptionFiltersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSubscriptionFilters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSubscriptionFilters for more information on using the DescribeSubscriptionFilters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSubscriptionFiltersRequest method. -// req, resp := client.DescribeSubscriptionFiltersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters -func (c *CloudWatchLogs) DescribeSubscriptionFiltersRequest(input *DescribeSubscriptionFiltersInput) (req *request.Request, output *DescribeSubscriptionFiltersOutput) { - op := &request.Operation{ - Name: opDescribeSubscriptionFilters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeSubscriptionFiltersInput{} - } - - output = &DescribeSubscriptionFiltersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSubscriptionFilters API operation for Amazon CloudWatch Logs. -// -// Lists the subscription filters for the specified log group. You can list -// all the subscription filters or filter the results by prefix. The results -// are ASCII-sorted by filter name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeSubscriptionFilters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters -func (c *CloudWatchLogs) DescribeSubscriptionFilters(input *DescribeSubscriptionFiltersInput) (*DescribeSubscriptionFiltersOutput, error) { - req, out := c.DescribeSubscriptionFiltersRequest(input) - return out, req.Send() -} - -// DescribeSubscriptionFiltersWithContext is the same as DescribeSubscriptionFilters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSubscriptionFilters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeSubscriptionFiltersWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, opts ...request.Option) (*DescribeSubscriptionFiltersOutput, error) { - req, out := c.DescribeSubscriptionFiltersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeSubscriptionFiltersPages iterates over the pages of a DescribeSubscriptionFilters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeSubscriptionFilters 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 DescribeSubscriptionFilters operation. -// pageNum := 0 -// err := client.DescribeSubscriptionFiltersPages(params, -// func(page *DescribeSubscriptionFiltersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudWatchLogs) DescribeSubscriptionFiltersPages(input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool) error { - return c.DescribeSubscriptionFiltersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeSubscriptionFiltersPagesWithContext same as DescribeSubscriptionFiltersPages 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 *CloudWatchLogs) DescribeSubscriptionFiltersPagesWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeSubscriptionFiltersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeSubscriptionFiltersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSubscriptionFiltersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDisassociateKmsKey = "DisassociateKmsKey" - -// DisassociateKmsKeyRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateKmsKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateKmsKey for more information on using the DisassociateKmsKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateKmsKeyRequest method. -// req, resp := client.DisassociateKmsKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey -func (c *CloudWatchLogs) DisassociateKmsKeyRequest(input *DisassociateKmsKeyInput) (req *request.Request, output *DisassociateKmsKeyOutput) { - op := &request.Operation{ - Name: opDisassociateKmsKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateKmsKeyInput{} - } - - output = &DisassociateKmsKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateKmsKey API operation for Amazon CloudWatch Logs. -// -// Disassociates the associated AWS Key Management Service (AWS KMS) customer -// master key (CMK) from the specified log group. -// -// After the AWS KMS CMK is disassociated from the log group, AWS CloudWatch -// Logs stops encrypting newly ingested data for the log group. All previously -// ingested data remains encrypted, and AWS CloudWatch Logs requires permissions -// for the CMK whenever the encrypted data is requested. -// -// Note that it can take up to 5 minutes for this operation to take effect. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DisassociateKmsKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey -func (c *CloudWatchLogs) DisassociateKmsKey(input *DisassociateKmsKeyInput) (*DisassociateKmsKeyOutput, error) { - req, out := c.DisassociateKmsKeyRequest(input) - return out, req.Send() -} - -// DisassociateKmsKeyWithContext is the same as DisassociateKmsKey with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateKmsKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DisassociateKmsKeyWithContext(ctx aws.Context, input *DisassociateKmsKeyInput, opts ...request.Option) (*DisassociateKmsKeyOutput, error) { - req, out := c.DisassociateKmsKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opFilterLogEvents = "FilterLogEvents" - -// FilterLogEventsRequest generates a "aws/request.Request" representing the -// client's request for the FilterLogEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See FilterLogEvents for more information on using the FilterLogEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the FilterLogEventsRequest method. -// req, resp := client.FilterLogEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents -func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (req *request.Request, output *FilterLogEventsOutput) { - op := &request.Operation{ - Name: opFilterLogEvents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &FilterLogEventsInput{} - } - - output = &FilterLogEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// FilterLogEvents API operation for Amazon CloudWatch Logs. -// -// Lists log events from the specified log group. You can list all the log events -// or filter the results using a filter pattern, a time range, and the name -// of the log stream. -// -// By default, this operation returns as many log events as can fit in 1 MB -// (up to 10,000 log events), or all the events found within the time range -// that you specify. If the results include a token, then there are more log -// events available, and you can get additional results by specifying the token -// in a subsequent call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation FilterLogEvents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents -func (c *CloudWatchLogs) FilterLogEvents(input *FilterLogEventsInput) (*FilterLogEventsOutput, error) { - req, out := c.FilterLogEventsRequest(input) - return out, req.Send() -} - -// FilterLogEventsWithContext is the same as FilterLogEvents with the addition of -// the ability to pass a context and additional request options. -// -// See FilterLogEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) FilterLogEventsWithContext(ctx aws.Context, input *FilterLogEventsInput, opts ...request.Option) (*FilterLogEventsOutput, error) { - req, out := c.FilterLogEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// FilterLogEventsPages iterates over the pages of a FilterLogEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See FilterLogEvents 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 FilterLogEvents operation. -// pageNum := 0 -// err := client.FilterLogEventsPages(params, -// func(page *FilterLogEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudWatchLogs) FilterLogEventsPages(input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool) error { - return c.FilterLogEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// FilterLogEventsPagesWithContext same as FilterLogEventsPages 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 *CloudWatchLogs) FilterLogEventsPagesWithContext(ctx aws.Context, input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *FilterLogEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.FilterLogEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*FilterLogEventsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetLogEvents = "GetLogEvents" - -// GetLogEventsRequest generates a "aws/request.Request" representing the -// client's request for the GetLogEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLogEvents for more information on using the GetLogEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLogEventsRequest method. -// req, resp := client.GetLogEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents -func (c *CloudWatchLogs) GetLogEventsRequest(input *GetLogEventsInput) (req *request.Request, output *GetLogEventsOutput) { - op := &request.Operation{ - Name: opGetLogEvents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextForwardToken"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetLogEventsInput{} - } - - output = &GetLogEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLogEvents API operation for Amazon CloudWatch Logs. -// -// Lists log events from the specified log stream. You can list all the log -// events or filter using a time range. -// -// By default, this operation returns as many log events as can fit in a response -// size of 1MB (up to 10,000 log events). You can get additional log events -// by specifying one of the tokens in a subsequent call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetLogEvents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents -func (c *CloudWatchLogs) GetLogEvents(input *GetLogEventsInput) (*GetLogEventsOutput, error) { - req, out := c.GetLogEventsRequest(input) - return out, req.Send() -} - -// GetLogEventsWithContext is the same as GetLogEvents with the addition of -// the ability to pass a context and additional request options. -// -// See GetLogEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) GetLogEventsWithContext(ctx aws.Context, input *GetLogEventsInput, opts ...request.Option) (*GetLogEventsOutput, error) { - req, out := c.GetLogEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetLogEventsPages iterates over the pages of a GetLogEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetLogEvents 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 GetLogEvents operation. -// pageNum := 0 -// err := client.GetLogEventsPages(params, -// func(page *GetLogEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudWatchLogs) GetLogEventsPages(input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool) error { - return c.GetLogEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetLogEventsPagesWithContext same as GetLogEventsPages 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 *CloudWatchLogs) GetLogEventsPagesWithContext(ctx aws.Context, input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *GetLogEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetLogEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetLogEventsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetLogGroupFields = "GetLogGroupFields" - -// GetLogGroupFieldsRequest generates a "aws/request.Request" representing the -// client's request for the GetLogGroupFields operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLogGroupFields for more information on using the GetLogGroupFields -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLogGroupFieldsRequest method. -// req, resp := client.GetLogGroupFieldsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields -func (c *CloudWatchLogs) GetLogGroupFieldsRequest(input *GetLogGroupFieldsInput) (req *request.Request, output *GetLogGroupFieldsOutput) { - op := &request.Operation{ - Name: opGetLogGroupFields, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetLogGroupFieldsInput{} - } - - output = &GetLogGroupFieldsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLogGroupFields API operation for Amazon CloudWatch Logs. -// -// Returns a list of the fields that are included in log events in the specified -// log group, along with the percentage of log events that contain each field. -// The search is limited to a time period that you specify. -// -// In the results, fields that start with @ are fields generated by CloudWatch -// Logs. For example, @timestamp is the timestamp of each log event. -// -// The response results are sorted by the frequency percentage, starting with -// the highest percentage. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetLogGroupFields for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have reached the maximum number of resources that can be created. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields -func (c *CloudWatchLogs) GetLogGroupFields(input *GetLogGroupFieldsInput) (*GetLogGroupFieldsOutput, error) { - req, out := c.GetLogGroupFieldsRequest(input) - return out, req.Send() -} - -// GetLogGroupFieldsWithContext is the same as GetLogGroupFields with the addition of -// the ability to pass a context and additional request options. -// -// See GetLogGroupFields for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) GetLogGroupFieldsWithContext(ctx aws.Context, input *GetLogGroupFieldsInput, opts ...request.Option) (*GetLogGroupFieldsOutput, error) { - req, out := c.GetLogGroupFieldsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLogRecord = "GetLogRecord" - -// GetLogRecordRequest generates a "aws/request.Request" representing the -// client's request for the GetLogRecord operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLogRecord for more information on using the GetLogRecord -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLogRecordRequest method. -// req, resp := client.GetLogRecordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord -func (c *CloudWatchLogs) GetLogRecordRequest(input *GetLogRecordInput) (req *request.Request, output *GetLogRecordOutput) { - op := &request.Operation{ - Name: opGetLogRecord, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetLogRecordInput{} - } - - output = &GetLogRecordOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLogRecord API operation for Amazon CloudWatch Logs. -// -// Retrieves all the fields and values of a single log event. All fields are -// retrieved, even if the original query that produced the logRecordPointer -// retrieved only a subset of fields. Fields are returned as field name/field -// value pairs. -// -// Additionally, the entire unparsed log event is returned within @message. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetLogRecord for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have reached the maximum number of resources that can be created. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord -func (c *CloudWatchLogs) GetLogRecord(input *GetLogRecordInput) (*GetLogRecordOutput, error) { - req, out := c.GetLogRecordRequest(input) - return out, req.Send() -} - -// GetLogRecordWithContext is the same as GetLogRecord with the addition of -// the ability to pass a context and additional request options. -// -// See GetLogRecord for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) GetLogRecordWithContext(ctx aws.Context, input *GetLogRecordInput, opts ...request.Option) (*GetLogRecordOutput, error) { - req, out := c.GetLogRecordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetQueryResults = "GetQueryResults" - -// GetQueryResultsRequest generates a "aws/request.Request" representing the -// client's request for the GetQueryResults operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetQueryResults for more information on using the GetQueryResults -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetQueryResultsRequest method. -// req, resp := client.GetQueryResultsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults -func (c *CloudWatchLogs) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) { - op := &request.Operation{ - Name: opGetQueryResults, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetQueryResultsInput{} - } - - output = &GetQueryResultsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetQueryResults API operation for Amazon CloudWatch Logs. -// -// Returns the results from the specified query. If the query is in progress, -// partial results of that current execution are returned. Only the fields requested -// in the query are returned. -// -// GetQueryResults does not start a query execution. To run a query, use . -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetQueryResults for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults -func (c *CloudWatchLogs) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) { - req, out := c.GetQueryResultsRequest(input) - return out, req.Send() -} - -// GetQueryResultsWithContext is the same as GetQueryResults with the addition of -// the ability to pass a context and additional request options. -// -// See GetQueryResults for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) { - req, out := c.GetQueryResultsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTagsLogGroup = "ListTagsLogGroup" - -// ListTagsLogGroupRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsLogGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTagsLogGroup for more information on using the ListTagsLogGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsLogGroupRequest method. -// req, resp := client.ListTagsLogGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup -func (c *CloudWatchLogs) ListTagsLogGroupRequest(input *ListTagsLogGroupInput) (req *request.Request, output *ListTagsLogGroupOutput) { - op := &request.Operation{ - Name: opListTagsLogGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsLogGroupInput{} - } - - output = &ListTagsLogGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsLogGroup API operation for Amazon CloudWatch Logs. -// -// Lists the tags for the specified log group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation ListTagsLogGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup -func (c *CloudWatchLogs) ListTagsLogGroup(input *ListTagsLogGroupInput) (*ListTagsLogGroupOutput, error) { - req, out := c.ListTagsLogGroupRequest(input) - return out, req.Send() -} - -// ListTagsLogGroupWithContext is the same as ListTagsLogGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ListTagsLogGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) ListTagsLogGroupWithContext(ctx aws.Context, input *ListTagsLogGroupInput, opts ...request.Option) (*ListTagsLogGroupOutput, error) { - req, out := c.ListTagsLogGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutDestination = "PutDestination" - -// PutDestinationRequest generates a "aws/request.Request" representing the -// client's request for the PutDestination operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutDestination for more information on using the PutDestination -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutDestinationRequest method. -// req, resp := client.PutDestinationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination -func (c *CloudWatchLogs) PutDestinationRequest(input *PutDestinationInput) (req *request.Request, output *PutDestinationOutput) { - op := &request.Operation{ - Name: opPutDestination, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutDestinationInput{} - } - - output = &PutDestinationOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutDestination API operation for Amazon CloudWatch Logs. -// -// Creates or updates a destination. A destination encapsulates a physical resource -// (such as an Amazon Kinesis stream) and enables you to subscribe to a real-time -// stream of log events for a different account, ingested using PutLogEvents. -// Currently, the only supported physical resource is a Kinesis stream belonging -// to the same account as the destination. -// -// Through an access policy, a destination controls what is written to its Kinesis -// stream. By default, PutDestination does not set any access policy with the -// destination, which means a cross-account user cannot call PutSubscriptionFilter -// against this destination. To enable this, the destination owner must call -// PutDestinationPolicy after PutDestination. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutDestination for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination -func (c *CloudWatchLogs) PutDestination(input *PutDestinationInput) (*PutDestinationOutput, error) { - req, out := c.PutDestinationRequest(input) - return out, req.Send() -} - -// PutDestinationWithContext is the same as PutDestination with the addition of -// the ability to pass a context and additional request options. -// -// See PutDestination for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) PutDestinationWithContext(ctx aws.Context, input *PutDestinationInput, opts ...request.Option) (*PutDestinationOutput, error) { - req, out := c.PutDestinationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutDestinationPolicy = "PutDestinationPolicy" - -// PutDestinationPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutDestinationPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutDestinationPolicy for more information on using the PutDestinationPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutDestinationPolicyRequest method. -// req, resp := client.PutDestinationPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy -func (c *CloudWatchLogs) PutDestinationPolicyRequest(input *PutDestinationPolicyInput) (req *request.Request, output *PutDestinationPolicyOutput) { - op := &request.Operation{ - Name: opPutDestinationPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutDestinationPolicyInput{} - } - - output = &PutDestinationPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutDestinationPolicy API operation for Amazon CloudWatch Logs. -// -// Creates or updates an access policy associated with an existing destination. -// An access policy is an IAM policy document (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html) -// that is used to authorize claims to register a subscription filter against -// a given destination. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutDestinationPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy -func (c *CloudWatchLogs) PutDestinationPolicy(input *PutDestinationPolicyInput) (*PutDestinationPolicyOutput, error) { - req, out := c.PutDestinationPolicyRequest(input) - return out, req.Send() -} - -// PutDestinationPolicyWithContext is the same as PutDestinationPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutDestinationPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) PutDestinationPolicyWithContext(ctx aws.Context, input *PutDestinationPolicyInput, opts ...request.Option) (*PutDestinationPolicyOutput, error) { - req, out := c.PutDestinationPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutLogEvents = "PutLogEvents" - -// PutLogEventsRequest generates a "aws/request.Request" representing the -// client's request for the PutLogEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutLogEvents for more information on using the PutLogEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutLogEventsRequest method. -// req, resp := client.PutLogEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents -func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *request.Request, output *PutLogEventsOutput) { - op := &request.Operation{ - Name: opPutLogEvents, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutLogEventsInput{} - } - - output = &PutLogEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutLogEvents API operation for Amazon CloudWatch Logs. -// -// Uploads a batch of log events to the specified log stream. -// -// You must include the sequence token obtained from the response of the previous -// call. An upload in a newly created log stream does not require a sequence -// token. You can also get the sequence token using DescribeLogStreams. If you -// call PutLogEvents twice within a narrow time period using the same value -// for sequenceToken, both calls may be successful, or one may be rejected. -// -// The batch of events must satisfy the following constraints: -// -// * The maximum batch size is 1,048,576 bytes, and this size is calculated -// as the sum of all event messages in UTF-8, plus 26 bytes for each log -// event. -// -// * None of the log events in the batch can be more than 2 hours in the -// future. -// -// * None of the log events in the batch can be older than 14 days or the -// retention period of the log group. -// -// * The log events in the batch must be in chronological ordered by their -// timestamp. The timestamp is the time the event occurred, expressed as -// the number of milliseconds after Jan 1, 1970 00:00:00 UTC. (In AWS Tools -// for PowerShell and the AWS SDK for .NET, the timestamp is specified in -// .NET format: yyyy-mm-ddThh:mm:ss. For example, 2017-09-15T13:45:30.) -// -// * The maximum number of log events in a batch is 10,000. -// -// * A batch of log events in a single request cannot span more than 24 hours. -// Otherwise, the operation fails. -// -// If a call to PutLogEvents returns "UnrecognizedClientException" the most -// likely cause is an invalid AWS access key ID or secret key. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutLogEvents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeInvalidSequenceTokenException "InvalidSequenceTokenException" -// The sequence token is not valid. -// -// * ErrCodeDataAlreadyAcceptedException "DataAlreadyAcceptedException" -// The event was already logged. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// * ErrCodeUnrecognizedClientException "UnrecognizedClientException" -// The most likely cause is an invalid AWS access key ID or secret key. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents -func (c *CloudWatchLogs) PutLogEvents(input *PutLogEventsInput) (*PutLogEventsOutput, error) { - req, out := c.PutLogEventsRequest(input) - return out, req.Send() -} - -// PutLogEventsWithContext is the same as PutLogEvents with the addition of -// the ability to pass a context and additional request options. -// -// See PutLogEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) PutLogEventsWithContext(ctx aws.Context, input *PutLogEventsInput, opts ...request.Option) (*PutLogEventsOutput, error) { - req, out := c.PutLogEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutMetricFilter = "PutMetricFilter" - -// PutMetricFilterRequest generates a "aws/request.Request" representing the -// client's request for the PutMetricFilter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutMetricFilter for more information on using the PutMetricFilter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutMetricFilterRequest method. -// req, resp := client.PutMetricFilterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter -func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (req *request.Request, output *PutMetricFilterOutput) { - op := &request.Operation{ - Name: opPutMetricFilter, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutMetricFilterInput{} - } - - output = &PutMetricFilterOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutMetricFilter API operation for Amazon CloudWatch Logs. -// -// Creates or updates a metric filter and associates it with the specified log -// group. Metric filters allow you to configure rules to extract metric data -// from log events ingested through PutLogEvents. -// -// The maximum number of metric filters that can be associated with a log group -// is 100. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutMetricFilter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have reached the maximum number of resources that can be created. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter -func (c *CloudWatchLogs) PutMetricFilter(input *PutMetricFilterInput) (*PutMetricFilterOutput, error) { - req, out := c.PutMetricFilterRequest(input) - return out, req.Send() -} - -// PutMetricFilterWithContext is the same as PutMetricFilter with the addition of -// the ability to pass a context and additional request options. -// -// See PutMetricFilter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) PutMetricFilterWithContext(ctx aws.Context, input *PutMetricFilterInput, opts ...request.Option) (*PutMetricFilterOutput, error) { - req, out := c.PutMetricFilterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutResourcePolicy = "PutResourcePolicy" - -// PutResourcePolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutResourcePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutResourcePolicy for more information on using the PutResourcePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutResourcePolicyRequest method. -// req, resp := client.PutResourcePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy -func (c *CloudWatchLogs) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) { - op := &request.Operation{ - Name: opPutResourcePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutResourcePolicyInput{} - } - - output = &PutResourcePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutResourcePolicy API operation for Amazon CloudWatch Logs. -// -// Creates or updates a resource policy allowing other AWS services to put log -// events to this account, such as Amazon Route 53. An account can have up to -// 10 resource policies per region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutResourcePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have reached the maximum number of resources that can be created. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy -func (c *CloudWatchLogs) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { - req, out := c.PutResourcePolicyRequest(input) - return out, req.Send() -} - -// PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutResourcePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) { - req, out := c.PutResourcePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutRetentionPolicy = "PutRetentionPolicy" - -// PutRetentionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutRetentionPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutRetentionPolicy for more information on using the PutRetentionPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutRetentionPolicyRequest method. -// req, resp := client.PutRetentionPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy -func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInput) (req *request.Request, output *PutRetentionPolicyOutput) { - op := &request.Operation{ - Name: opPutRetentionPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutRetentionPolicyInput{} - } - - output = &PutRetentionPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutRetentionPolicy API operation for Amazon CloudWatch Logs. -// -// Sets the retention of the specified log group. A retention policy allows -// you to configure the number of days for which to retain log events in the -// specified log group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutRetentionPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy -func (c *CloudWatchLogs) PutRetentionPolicy(input *PutRetentionPolicyInput) (*PutRetentionPolicyOutput, error) { - req, out := c.PutRetentionPolicyRequest(input) - return out, req.Send() -} - -// PutRetentionPolicyWithContext is the same as PutRetentionPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutRetentionPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) PutRetentionPolicyWithContext(ctx aws.Context, input *PutRetentionPolicyInput, opts ...request.Option) (*PutRetentionPolicyOutput, error) { - req, out := c.PutRetentionPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutSubscriptionFilter = "PutSubscriptionFilter" - -// PutSubscriptionFilterRequest generates a "aws/request.Request" representing the -// client's request for the PutSubscriptionFilter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutSubscriptionFilter for more information on using the PutSubscriptionFilter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutSubscriptionFilterRequest method. -// req, resp := client.PutSubscriptionFilterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter -func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilterInput) (req *request.Request, output *PutSubscriptionFilterOutput) { - op := &request.Operation{ - Name: opPutSubscriptionFilter, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutSubscriptionFilterInput{} - } - - output = &PutSubscriptionFilterOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutSubscriptionFilter API operation for Amazon CloudWatch Logs. -// -// Creates or updates a subscription filter and associates it with the specified -// log group. Subscription filters allow you to subscribe to a real-time stream -// of log events ingested through PutLogEvents and have them delivered to a -// specific destination. Currently, the supported destinations are: -// -// * An Amazon Kinesis stream belonging to the same account as the subscription -// filter, for same-account delivery. -// -// * A logical destination that belongs to a different account, for cross-account -// delivery. -// -// * An Amazon Kinesis Firehose delivery stream that belongs to the same -// account as the subscription filter, for same-account delivery. -// -// * An AWS Lambda function that belongs to the same account as the subscription -// filter, for same-account delivery. -// -// There can only be one subscription filter associated with a log group. If -// you are updating an existing filter, you must specify the correct name in -// filterName. Otherwise, the call fails because you cannot associate a second -// filter with a log group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutSubscriptionFilter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeOperationAbortedException "OperationAbortedException" -// Multiple requests to update the same resource were in conflict. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have reached the maximum number of resources that can be created. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter -func (c *CloudWatchLogs) PutSubscriptionFilter(input *PutSubscriptionFilterInput) (*PutSubscriptionFilterOutput, error) { - req, out := c.PutSubscriptionFilterRequest(input) - return out, req.Send() -} - -// PutSubscriptionFilterWithContext is the same as PutSubscriptionFilter with the addition of -// the ability to pass a context and additional request options. -// -// See PutSubscriptionFilter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) PutSubscriptionFilterWithContext(ctx aws.Context, input *PutSubscriptionFilterInput, opts ...request.Option) (*PutSubscriptionFilterOutput, error) { - req, out := c.PutSubscriptionFilterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartQuery = "StartQuery" - -// StartQueryRequest generates a "aws/request.Request" representing the -// client's request for the StartQuery operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartQuery for more information on using the StartQuery -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartQueryRequest method. -// req, resp := client.StartQueryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery -func (c *CloudWatchLogs) StartQueryRequest(input *StartQueryInput) (req *request.Request, output *StartQueryOutput) { - op := &request.Operation{ - Name: opStartQuery, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartQueryInput{} - } - - output = &StartQueryOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartQuery API operation for Amazon CloudWatch Logs. -// -// Schedules a query of a log group using CloudWatch Logs Insights. You specify -// the log group and time range to query, and the query string to use. -// -// For more information, see CloudWatch Logs Insights Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation StartQuery for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMalformedQueryException "MalformedQueryException" -// The query string is not valid. Details about this error are displayed in -// a QueryCompileError object. For more information, see . -// -// For more information about valid query syntax, see CloudWatch Logs Insights -// Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have reached the maximum number of resources that can be created. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery -func (c *CloudWatchLogs) StartQuery(input *StartQueryInput) (*StartQueryOutput, error) { - req, out := c.StartQueryRequest(input) - return out, req.Send() -} - -// StartQueryWithContext is the same as StartQuery with the addition of -// the ability to pass a context and additional request options. -// -// See StartQuery for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) StartQueryWithContext(ctx aws.Context, input *StartQueryInput, opts ...request.Option) (*StartQueryOutput, error) { - req, out := c.StartQueryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopQuery = "StopQuery" - -// StopQueryRequest generates a "aws/request.Request" representing the -// client's request for the StopQuery operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopQuery for more information on using the StopQuery -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopQueryRequest method. -// req, resp := client.StopQueryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery -func (c *CloudWatchLogs) StopQueryRequest(input *StopQueryInput) (req *request.Request, output *StopQueryOutput) { - op := &request.Operation{ - Name: opStopQuery, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopQueryInput{} - } - - output = &StopQueryOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopQuery API operation for Amazon CloudWatch Logs. -// -// Stops a CloudWatch Logs Insights query that is in progress. If the query -// has already ended, the operation returns an error indicating that the specified -// query is not running. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation StopQuery for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery -func (c *CloudWatchLogs) StopQuery(input *StopQueryInput) (*StopQueryOutput, error) { - req, out := c.StopQueryRequest(input) - return out, req.Send() -} - -// StopQueryWithContext is the same as StopQuery with the addition of -// the ability to pass a context and additional request options. -// -// See StopQuery for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) StopQueryWithContext(ctx aws.Context, input *StopQueryInput, opts ...request.Option) (*StopQueryOutput, error) { - req, out := c.StopQueryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagLogGroup = "TagLogGroup" - -// TagLogGroupRequest generates a "aws/request.Request" representing the -// client's request for the TagLogGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagLogGroup for more information on using the TagLogGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TagLogGroupRequest method. -// req, resp := client.TagLogGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup -func (c *CloudWatchLogs) TagLogGroupRequest(input *TagLogGroupInput) (req *request.Request, output *TagLogGroupOutput) { - op := &request.Operation{ - Name: opTagLogGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagLogGroupInput{} - } - - output = &TagLogGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagLogGroup API operation for Amazon CloudWatch Logs. -// -// Adds or updates the specified tags for the specified log group. -// -// To list the tags for a log group, use ListTagsLogGroup. To remove tags, use -// UntagLogGroup. -// -// For more information about tags, see Tag Log Groups in Amazon CloudWatch -// Logs (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/log-group-tagging.html) -// in the Amazon CloudWatch Logs User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation TagLogGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup -func (c *CloudWatchLogs) TagLogGroup(input *TagLogGroupInput) (*TagLogGroupOutput, error) { - req, out := c.TagLogGroupRequest(input) - return out, req.Send() -} - -// TagLogGroupWithContext is the same as TagLogGroup with the addition of -// the ability to pass a context and additional request options. -// -// See TagLogGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) TagLogGroupWithContext(ctx aws.Context, input *TagLogGroupInput, opts ...request.Option) (*TagLogGroupOutput, error) { - req, out := c.TagLogGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTestMetricFilter = "TestMetricFilter" - -// TestMetricFilterRequest generates a "aws/request.Request" representing the -// client's request for the TestMetricFilter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TestMetricFilter for more information on using the TestMetricFilter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TestMetricFilterRequest method. -// req, resp := client.TestMetricFilterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter -func (c *CloudWatchLogs) TestMetricFilterRequest(input *TestMetricFilterInput) (req *request.Request, output *TestMetricFilterOutput) { - op := &request.Operation{ - Name: opTestMetricFilter, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TestMetricFilterInput{} - } - - output = &TestMetricFilterOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestMetricFilter API operation for Amazon CloudWatch Logs. -// -// Tests the filter pattern of a metric filter against a sample of log event -// messages. You can use this operation to validate the correctness of a metric -// filter pattern. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation TestMetricFilter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is specified incorrectly. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter -func (c *CloudWatchLogs) TestMetricFilter(input *TestMetricFilterInput) (*TestMetricFilterOutput, error) { - req, out := c.TestMetricFilterRequest(input) - return out, req.Send() -} - -// TestMetricFilterWithContext is the same as TestMetricFilter with the addition of -// the ability to pass a context and additional request options. -// -// See TestMetricFilter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) TestMetricFilterWithContext(ctx aws.Context, input *TestMetricFilterInput, opts ...request.Option) (*TestMetricFilterOutput, error) { - req, out := c.TestMetricFilterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagLogGroup = "UntagLogGroup" - -// UntagLogGroupRequest generates a "aws/request.Request" representing the -// client's request for the UntagLogGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagLogGroup for more information on using the UntagLogGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UntagLogGroupRequest method. -// req, resp := client.UntagLogGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup -func (c *CloudWatchLogs) UntagLogGroupRequest(input *UntagLogGroupInput) (req *request.Request, output *UntagLogGroupOutput) { - op := &request.Operation{ - Name: opUntagLogGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagLogGroupInput{} - } - - output = &UntagLogGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagLogGroup API operation for Amazon CloudWatch Logs. -// -// Removes the specified tags from the specified log group. -// -// To list the tags for a log group, use ListTagsLogGroup. To add tags, use -// UntagLogGroup. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation UntagLogGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup -func (c *CloudWatchLogs) UntagLogGroup(input *UntagLogGroupInput) (*UntagLogGroupOutput, error) { - req, out := c.UntagLogGroupRequest(input) - return out, req.Send() -} - -// UntagLogGroupWithContext is the same as UntagLogGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UntagLogGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) UntagLogGroupWithContext(ctx aws.Context, input *UntagLogGroupInput, opts ...request.Option) (*UntagLogGroupOutput, error) { - req, out := c.UntagLogGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AssociateKmsKeyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. - // For more information, see Amazon Resource Names - AWS Key Management Service - // (AWS KMS) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms). - // - // KmsKeyId is a required field - KmsKeyId *string `locationName:"kmsKeyId" type:"string" required:"true"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateKmsKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateKmsKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateKmsKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateKmsKeyInput"} - if s.KmsKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KmsKeyId")) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *AssociateKmsKeyInput) SetKmsKeyId(v string) *AssociateKmsKeyInput { - s.KmsKeyId = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *AssociateKmsKeyInput) SetLogGroupName(v string) *AssociateKmsKeyInput { - s.LogGroupName = &v - return s -} - -type AssociateKmsKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssociateKmsKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateKmsKeyOutput) GoString() string { - return s.String() -} - -type CancelExportTaskInput struct { - _ struct{} `type:"structure"` - - // The ID of the export task. - // - // TaskId is a required field - TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelExportTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelExportTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelExportTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelExportTaskInput"} - if s.TaskId == nil { - invalidParams.Add(request.NewErrParamRequired("TaskId")) - } - if s.TaskId != nil && len(*s.TaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTaskId sets the TaskId field's value. -func (s *CancelExportTaskInput) SetTaskId(v string) *CancelExportTaskInput { - s.TaskId = &v - return s -} - -type CancelExportTaskOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CancelExportTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelExportTaskOutput) GoString() string { - return s.String() -} - -type CreateExportTaskInput struct { - _ struct{} `type:"structure"` - - // The name of S3 bucket for the exported log data. The bucket must be in the - // same AWS region. - // - // Destination is a required field - Destination *string `locationName:"destination" min:"1" type:"string" required:"true"` - - // The prefix used as the start of the key for every object exported. If you - // don't specify a value, the default is exportedlogs. - DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` - - // The start time of the range for the request, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this - // time are not exported. - // - // From is a required field - From *int64 `locationName:"from" type:"long" required:"true"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // Export only log streams that match the provided prefix. If you don't specify - // a value, no prefix filter is applied. - LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` - - // The name of the export task. - TaskName *string `locationName:"taskName" min:"1" type:"string"` - - // The end time of the range for the request, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time - // are not exported. - // - // To is a required field - To *int64 `locationName:"to" type:"long" required:"true"` -} - -// String returns the string representation -func (s CreateExportTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateExportTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateExportTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateExportTaskInput"} - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - if s.Destination != nil && len(*s.Destination) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Destination", 1)) - } - if s.From == nil { - invalidParams.Add(request.NewErrParamRequired("From")) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) - } - if s.TaskName != nil && len(*s.TaskName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskName", 1)) - } - if s.To == nil { - invalidParams.Add(request.NewErrParamRequired("To")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestination sets the Destination field's value. -func (s *CreateExportTaskInput) SetDestination(v string) *CreateExportTaskInput { - s.Destination = &v - return s -} - -// SetDestinationPrefix sets the DestinationPrefix field's value. -func (s *CreateExportTaskInput) SetDestinationPrefix(v string) *CreateExportTaskInput { - s.DestinationPrefix = &v - return s -} - -// SetFrom sets the From field's value. -func (s *CreateExportTaskInput) SetFrom(v int64) *CreateExportTaskInput { - s.From = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *CreateExportTaskInput) SetLogGroupName(v string) *CreateExportTaskInput { - s.LogGroupName = &v - return s -} - -// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. -func (s *CreateExportTaskInput) SetLogStreamNamePrefix(v string) *CreateExportTaskInput { - s.LogStreamNamePrefix = &v - return s -} - -// SetTaskName sets the TaskName field's value. -func (s *CreateExportTaskInput) SetTaskName(v string) *CreateExportTaskInput { - s.TaskName = &v - return s -} - -// SetTo sets the To field's value. -func (s *CreateExportTaskInput) SetTo(v int64) *CreateExportTaskInput { - s.To = &v - return s -} - -type CreateExportTaskOutput struct { - _ struct{} `type:"structure"` - - // The ID of the export task. - TaskId *string `locationName:"taskId" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateExportTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateExportTaskOutput) GoString() string { - return s.String() -} - -// SetTaskId sets the TaskId field's value. -func (s *CreateExportTaskOutput) SetTaskId(v string) *CreateExportTaskOutput { - s.TaskId = &v - return s -} - -type CreateLogGroupInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. - // For more information, see Amazon Resource Names - AWS Key Management Service - // (AWS KMS) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms). - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The key-value pairs to use for the tags. - Tags map[string]*string `locationName:"tags" min:"1" type:"map"` -} - -// String returns the string representation -func (s CreateLogGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLogGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLogGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLogGroupInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateLogGroupInput) SetKmsKeyId(v string) *CreateLogGroupInput { - s.KmsKeyId = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *CreateLogGroupInput) SetLogGroupName(v string) *CreateLogGroupInput { - s.LogGroupName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateLogGroupInput) SetTags(v map[string]*string) *CreateLogGroupInput { - s.Tags = v - return s -} - -type CreateLogGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateLogGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLogGroupOutput) GoString() string { - return s.String() -} - -type CreateLogStreamInput struct { - _ struct{} `type:"structure"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The name of the log stream. - // - // LogStreamName is a required field - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateLogStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLogStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLogStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLogStreamInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.LogStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("LogStreamName")) - } - if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *CreateLogStreamInput) SetLogGroupName(v string) *CreateLogStreamInput { - s.LogGroupName = &v - return s -} - -// SetLogStreamName sets the LogStreamName field's value. -func (s *CreateLogStreamInput) SetLogStreamName(v string) *CreateLogStreamInput { - s.LogStreamName = &v - return s -} - -type CreateLogStreamOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateLogStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLogStreamOutput) GoString() string { - return s.String() -} - -type DeleteDestinationInput struct { - _ struct{} `type:"structure"` - - // The name of the destination. - // - // DestinationName is a required field - DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDestinationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDestinationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDestinationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDestinationInput"} - if s.DestinationName == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationName")) - } - if s.DestinationName != nil && len(*s.DestinationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationName sets the DestinationName field's value. -func (s *DeleteDestinationInput) SetDestinationName(v string) *DeleteDestinationInput { - s.DestinationName = &v - return s -} - -type DeleteDestinationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDestinationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDestinationOutput) GoString() string { - return s.String() -} - -type DeleteLogGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLogGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLogGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLogGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLogGroupInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteLogGroupInput) SetLogGroupName(v string) *DeleteLogGroupInput { - s.LogGroupName = &v - return s -} - -type DeleteLogGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLogGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLogGroupOutput) GoString() string { - return s.String() -} - -type DeleteLogStreamInput struct { - _ struct{} `type:"structure"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The name of the log stream. - // - // LogStreamName is a required field - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLogStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLogStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLogStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLogStreamInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.LogStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("LogStreamName")) - } - if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteLogStreamInput) SetLogGroupName(v string) *DeleteLogStreamInput { - s.LogGroupName = &v - return s -} - -// SetLogStreamName sets the LogStreamName field's value. -func (s *DeleteLogStreamInput) SetLogStreamName(v string) *DeleteLogStreamInput { - s.LogStreamName = &v - return s -} - -type DeleteLogStreamOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLogStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLogStreamOutput) GoString() string { - return s.String() -} - -type DeleteMetricFilterInput struct { - _ struct{} `type:"structure"` - - // The name of the metric filter. - // - // FilterName is a required field - FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteMetricFilterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMetricFilterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMetricFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMetricFilterInput"} - if s.FilterName == nil { - invalidParams.Add(request.NewErrParamRequired("FilterName")) - } - if s.FilterName != nil && len(*s.FilterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilterName sets the FilterName field's value. -func (s *DeleteMetricFilterInput) SetFilterName(v string) *DeleteMetricFilterInput { - s.FilterName = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteMetricFilterInput) SetLogGroupName(v string) *DeleteMetricFilterInput { - s.LogGroupName = &v - return s -} - -type DeleteMetricFilterOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteMetricFilterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMetricFilterOutput) GoString() string { - return s.String() -} - -type DeleteResourcePolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the policy to be revoked. This parameter is required. - PolicyName *string `locationName:"policyName" type:"string"` -} - -// String returns the string representation -func (s DeleteResourcePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResourcePolicyInput) GoString() string { - return s.String() -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteResourcePolicyInput) SetPolicyName(v string) *DeleteResourcePolicyInput { - s.PolicyName = &v - return s -} - -type DeleteResourcePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteResourcePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResourcePolicyOutput) GoString() string { - return s.String() -} - -type DeleteRetentionPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRetentionPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRetentionPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRetentionPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRetentionPolicyInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteRetentionPolicyInput) SetLogGroupName(v string) *DeleteRetentionPolicyInput { - s.LogGroupName = &v - return s -} - -type DeleteRetentionPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRetentionPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRetentionPolicyOutput) GoString() string { - return s.String() -} - -type DeleteSubscriptionFilterInput struct { - _ struct{} `type:"structure"` - - // The name of the subscription filter. - // - // FilterName is a required field - FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSubscriptionFilterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSubscriptionFilterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSubscriptionFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSubscriptionFilterInput"} - if s.FilterName == nil { - invalidParams.Add(request.NewErrParamRequired("FilterName")) - } - if s.FilterName != nil && len(*s.FilterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilterName sets the FilterName field's value. -func (s *DeleteSubscriptionFilterInput) SetFilterName(v string) *DeleteSubscriptionFilterInput { - s.FilterName = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteSubscriptionFilterInput) SetLogGroupName(v string) *DeleteSubscriptionFilterInput { - s.LogGroupName = &v - return s -} - -type DeleteSubscriptionFilterOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteSubscriptionFilterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSubscriptionFilterOutput) GoString() string { - return s.String() -} - -type DescribeDestinationsInput struct { - _ struct{} `type:"structure"` - - // The prefix to match. If you don't specify a value, no prefix filter is applied. - DestinationNamePrefix *string `min:"1" type:"string"` - - // The maximum number of items returned. If you don't specify a value, the default - // is up to 50 items. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeDestinationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDestinationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDestinationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDestinationsInput"} - if s.DestinationNamePrefix != nil && len(*s.DestinationNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DestinationNamePrefix", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationNamePrefix sets the DestinationNamePrefix field's value. -func (s *DescribeDestinationsInput) SetDestinationNamePrefix(v string) *DescribeDestinationsInput { - s.DestinationNamePrefix = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeDestinationsInput) SetLimit(v int64) *DescribeDestinationsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDestinationsInput) SetNextToken(v string) *DescribeDestinationsInput { - s.NextToken = &v - return s -} - -type DescribeDestinationsOutput struct { - _ struct{} `type:"structure"` - - // The destinations. - Destinations []*Destination `locationName:"destinations" type:"list"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeDestinationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDestinationsOutput) GoString() string { - return s.String() -} - -// SetDestinations sets the Destinations field's value. -func (s *DescribeDestinationsOutput) SetDestinations(v []*Destination) *DescribeDestinationsOutput { - s.Destinations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDestinationsOutput) SetNextToken(v string) *DescribeDestinationsOutput { - s.NextToken = &v - return s -} - -type DescribeExportTasksInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items returned. If you don't specify a value, the default - // is up to 50 items. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The status code of the export task. Specifying a status code filters the - // results to zero or more export tasks. - StatusCode *string `locationName:"statusCode" type:"string" enum:"ExportTaskStatusCode"` - - // The ID of the export task. Specifying a task ID filters the results to zero - // or one export tasks. - TaskId *string `locationName:"taskId" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeExportTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeExportTasksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeExportTasksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeExportTasksInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.TaskId != nil && len(*s.TaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *DescribeExportTasksInput) SetLimit(v int64) *DescribeExportTasksInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeExportTasksInput) SetNextToken(v string) *DescribeExportTasksInput { - s.NextToken = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *DescribeExportTasksInput) SetStatusCode(v string) *DescribeExportTasksInput { - s.StatusCode = &v - return s -} - -// SetTaskId sets the TaskId field's value. -func (s *DescribeExportTasksInput) SetTaskId(v string) *DescribeExportTasksInput { - s.TaskId = &v - return s -} - -type DescribeExportTasksOutput struct { - _ struct{} `type:"structure"` - - // The export tasks. - ExportTasks []*ExportTask `locationName:"exportTasks" type:"list"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeExportTasksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeExportTasksOutput) GoString() string { - return s.String() -} - -// SetExportTasks sets the ExportTasks field's value. -func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExportTasksOutput { - s.ExportTasks = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeExportTasksOutput) SetNextToken(v string) *DescribeExportTasksOutput { - s.NextToken = &v - return s -} - -type DescribeLogGroupsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items returned. If you don't specify a value, the default - // is up to 50 items. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // The prefix to match. - LogGroupNamePrefix *string `locationName:"logGroupNamePrefix" min:"1" type:"string"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeLogGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLogGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLogGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLogGroupsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.LogGroupNamePrefix != nil && len(*s.LogGroupNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupNamePrefix", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *DescribeLogGroupsInput) SetLimit(v int64) *DescribeLogGroupsInput { - s.Limit = &v - return s -} - -// SetLogGroupNamePrefix sets the LogGroupNamePrefix field's value. -func (s *DescribeLogGroupsInput) SetLogGroupNamePrefix(v string) *DescribeLogGroupsInput { - s.LogGroupNamePrefix = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLogGroupsInput) SetNextToken(v string) *DescribeLogGroupsInput { - s.NextToken = &v - return s -} - -type DescribeLogGroupsOutput struct { - _ struct{} `type:"structure"` - - // The log groups. - LogGroups []*LogGroup `locationName:"logGroups" type:"list"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeLogGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLogGroupsOutput) GoString() string { - return s.String() -} - -// SetLogGroups sets the LogGroups field's value. -func (s *DescribeLogGroupsOutput) SetLogGroups(v []*LogGroup) *DescribeLogGroupsOutput { - s.LogGroups = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLogGroupsOutput) SetNextToken(v string) *DescribeLogGroupsOutput { - s.NextToken = &v - return s -} - -type DescribeLogStreamsInput struct { - _ struct{} `type:"structure"` - - // If the value is true, results are returned in descending order. If the value - // is to false, results are returned in ascending order. The default value is - // false. - Descending *bool `locationName:"descending" type:"boolean"` - - // The maximum number of items returned. If you don't specify a value, the default - // is up to 50 items. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The prefix to match. - // - // If orderBy is LastEventTime,you cannot specify this parameter. - LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // If the value is LogStreamName, the results are ordered by log stream name. - // If the value is LastEventTime, the results are ordered by the event time. - // The default value is LogStreamName. - // - // If you order the results by event time, you cannot specify the logStreamNamePrefix - // parameter. - // - // lastEventTimestamp represents the time of the most recent log event in the - // log stream in CloudWatch Logs. This number is expressed as the number of - // milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimeStamp updates on - // an eventual consistency basis. It typically updates in less than an hour - // from ingestion, but may take longer in some rare situations. - OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"` -} - -// String returns the string representation -func (s DescribeLogStreamsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLogStreamsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLogStreamsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLogStreamsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescending sets the Descending field's value. -func (s *DescribeLogStreamsInput) SetDescending(v bool) *DescribeLogStreamsInput { - s.Descending = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeLogStreamsInput) SetLimit(v int64) *DescribeLogStreamsInput { - s.Limit = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *DescribeLogStreamsInput) SetLogGroupName(v string) *DescribeLogStreamsInput { - s.LogGroupName = &v - return s -} - -// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. -func (s *DescribeLogStreamsInput) SetLogStreamNamePrefix(v string) *DescribeLogStreamsInput { - s.LogStreamNamePrefix = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLogStreamsInput) SetNextToken(v string) *DescribeLogStreamsInput { - s.NextToken = &v - return s -} - -// SetOrderBy sets the OrderBy field's value. -func (s *DescribeLogStreamsInput) SetOrderBy(v string) *DescribeLogStreamsInput { - s.OrderBy = &v - return s -} - -type DescribeLogStreamsOutput struct { - _ struct{} `type:"structure"` - - // The log streams. - LogStreams []*LogStream `locationName:"logStreams" type:"list"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeLogStreamsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLogStreamsOutput) GoString() string { - return s.String() -} - -// SetLogStreams sets the LogStreams field's value. -func (s *DescribeLogStreamsOutput) SetLogStreams(v []*LogStream) *DescribeLogStreamsOutput { - s.LogStreams = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLogStreamsOutput) SetNextToken(v string) *DescribeLogStreamsOutput { - s.NextToken = &v - return s -} - -type DescribeMetricFiltersInput struct { - _ struct{} `type:"structure"` - - // The prefix to match. - FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"` - - // The maximum number of items returned. If you don't specify a value, the default - // is up to 50 items. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // The name of the log group. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // Filters results to include only those with the specified metric name. If - // you include this parameter in your request, you must also include the metricNamespace - // parameter. - MetricName *string `locationName:"metricName" type:"string"` - - // Filters results to include only those in the specified namespace. If you - // include this parameter in your request, you must also include the metricName - // parameter. - MetricNamespace *string `locationName:"metricNamespace" type:"string"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeMetricFiltersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMetricFiltersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMetricFiltersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMetricFiltersInput"} - if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilterNamePrefix sets the FilterNamePrefix field's value. -func (s *DescribeMetricFiltersInput) SetFilterNamePrefix(v string) *DescribeMetricFiltersInput { - s.FilterNamePrefix = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeMetricFiltersInput) SetLimit(v int64) *DescribeMetricFiltersInput { - s.Limit = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *DescribeMetricFiltersInput) SetLogGroupName(v string) *DescribeMetricFiltersInput { - s.LogGroupName = &v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *DescribeMetricFiltersInput) SetMetricName(v string) *DescribeMetricFiltersInput { - s.MetricName = &v - return s -} - -// SetMetricNamespace sets the MetricNamespace field's value. -func (s *DescribeMetricFiltersInput) SetMetricNamespace(v string) *DescribeMetricFiltersInput { - s.MetricNamespace = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMetricFiltersInput) SetNextToken(v string) *DescribeMetricFiltersInput { - s.NextToken = &v - return s -} - -type DescribeMetricFiltersOutput struct { - _ struct{} `type:"structure"` - - // The metric filters. - MetricFilters []*MetricFilter `locationName:"metricFilters" type:"list"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeMetricFiltersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMetricFiltersOutput) GoString() string { - return s.String() -} - -// SetMetricFilters sets the MetricFilters field's value. -func (s *DescribeMetricFiltersOutput) SetMetricFilters(v []*MetricFilter) *DescribeMetricFiltersOutput { - s.MetricFilters = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMetricFiltersOutput) SetNextToken(v string) *DescribeMetricFiltersOutput { - s.NextToken = &v - return s -} - -type DescribeQueriesInput struct { - _ struct{} `type:"structure"` - - // Limits the returned queries to only those for the specified log group. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // Limits the number of returned queries to the specified number. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // Limits the returned queries to only those that have the specified status. - // Valid values are Cancelled, Complete, Failed, Running, and Scheduled. - Status *string `locationName:"status" type:"string" enum:"QueryStatus"` -} - -// String returns the string representation -func (s DescribeQueriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeQueriesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeQueriesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeQueriesInput"} - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *DescribeQueriesInput) SetLogGroupName(v string) *DescribeQueriesInput { - s.LogGroupName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeQueriesInput) SetMaxResults(v int64) *DescribeQueriesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeQueriesInput) SetNextToken(v string) *DescribeQueriesInput { - s.NextToken = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeQueriesInput) SetStatus(v string) *DescribeQueriesInput { - s.Status = &v - return s -} - -type DescribeQueriesOutput struct { - _ struct{} `type:"structure"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The list of queries that match the request. - Queries []*QueryInfo `locationName:"queries" type:"list"` -} - -// String returns the string representation -func (s DescribeQueriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeQueriesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeQueriesOutput) SetNextToken(v string) *DescribeQueriesOutput { - s.NextToken = &v - return s -} - -// SetQueries sets the Queries field's value. -func (s *DescribeQueriesOutput) SetQueries(v []*QueryInfo) *DescribeQueriesOutput { - s.Queries = v - return s -} - -type DescribeResourcePoliciesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of resource policies to be displayed with one call of - // this API. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeResourcePoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeResourcePoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeResourcePoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeResourcePoliciesInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *DescribeResourcePoliciesInput) SetLimit(v int64) *DescribeResourcePoliciesInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeResourcePoliciesInput) SetNextToken(v string) *DescribeResourcePoliciesInput { - s.NextToken = &v - return s -} - -type DescribeResourcePoliciesOutput struct { - _ struct{} `type:"structure"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The resource policies that exist in this account. - ResourcePolicies []*ResourcePolicy `locationName:"resourcePolicies" type:"list"` -} - -// String returns the string representation -func (s DescribeResourcePoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeResourcePoliciesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeResourcePoliciesOutput) SetNextToken(v string) *DescribeResourcePoliciesOutput { - s.NextToken = &v - return s -} - -// SetResourcePolicies sets the ResourcePolicies field's value. -func (s *DescribeResourcePoliciesOutput) SetResourcePolicies(v []*ResourcePolicy) *DescribeResourcePoliciesOutput { - s.ResourcePolicies = v - return s -} - -type DescribeSubscriptionFiltersInput struct { - _ struct{} `type:"structure"` - - // The prefix to match. If you don't specify a value, no prefix filter is applied. - FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"` - - // The maximum number of items returned. If you don't specify a value, the default - // is up to 50 items. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeSubscriptionFiltersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSubscriptionFiltersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSubscriptionFiltersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSubscriptionFiltersInput"} - if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilterNamePrefix sets the FilterNamePrefix field's value. -func (s *DescribeSubscriptionFiltersInput) SetFilterNamePrefix(v string) *DescribeSubscriptionFiltersInput { - s.FilterNamePrefix = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeSubscriptionFiltersInput) SetLimit(v int64) *DescribeSubscriptionFiltersInput { - s.Limit = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *DescribeSubscriptionFiltersInput) SetLogGroupName(v string) *DescribeSubscriptionFiltersInput { - s.LogGroupName = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSubscriptionFiltersInput) SetNextToken(v string) *DescribeSubscriptionFiltersInput { - s.NextToken = &v - return s -} - -type DescribeSubscriptionFiltersOutput struct { - _ struct{} `type:"structure"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The subscription filters. - SubscriptionFilters []*SubscriptionFilter `locationName:"subscriptionFilters" type:"list"` -} - -// String returns the string representation -func (s DescribeSubscriptionFiltersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSubscriptionFiltersOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSubscriptionFiltersOutput) SetNextToken(v string) *DescribeSubscriptionFiltersOutput { - s.NextToken = &v - return s -} - -// SetSubscriptionFilters sets the SubscriptionFilters field's value. -func (s *DescribeSubscriptionFiltersOutput) SetSubscriptionFilters(v []*SubscriptionFilter) *DescribeSubscriptionFiltersOutput { - s.SubscriptionFilters = v - return s -} - -// Represents a cross-account destination that receives subscription log events. -type Destination struct { - _ struct{} `type:"structure"` - - // An IAM policy document that governs which AWS accounts can create subscription - // filters against this destination. - AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string"` - - // The ARN of this destination. - Arn *string `locationName:"arn" type:"string"` - - // The creation time of the destination, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - CreationTime *int64 `locationName:"creationTime" type:"long"` - - // The name of the destination. - DestinationName *string `locationName:"destinationName" min:"1" type:"string"` - - // A role for impersonation, used when delivering log events to the target. - RoleArn *string `locationName:"roleArn" min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the physical target to where the log events - // are delivered (for example, a Kinesis stream). - TargetArn *string `locationName:"targetArn" min:"1" type:"string"` -} - -// String returns the string representation -func (s Destination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Destination) GoString() string { - return s.String() -} - -// SetAccessPolicy sets the AccessPolicy field's value. -func (s *Destination) SetAccessPolicy(v string) *Destination { - s.AccessPolicy = &v - return s -} - -// SetArn sets the Arn field's value. -func (s *Destination) SetArn(v string) *Destination { - s.Arn = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *Destination) SetCreationTime(v int64) *Destination { - s.CreationTime = &v - return s -} - -// SetDestinationName sets the DestinationName field's value. -func (s *Destination) SetDestinationName(v string) *Destination { - s.DestinationName = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *Destination) SetRoleArn(v string) *Destination { - s.RoleArn = &v - return s -} - -// SetTargetArn sets the TargetArn field's value. -func (s *Destination) SetTargetArn(v string) *Destination { - s.TargetArn = &v - return s -} - -type DisassociateKmsKeyInput struct { - _ struct{} `type:"structure"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateKmsKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateKmsKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateKmsKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateKmsKeyInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *DisassociateKmsKeyInput) SetLogGroupName(v string) *DisassociateKmsKeyInput { - s.LogGroupName = &v - return s -} - -type DisassociateKmsKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateKmsKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateKmsKeyOutput) GoString() string { - return s.String() -} - -// Represents an export task. -type ExportTask struct { - _ struct{} `type:"structure"` - - // The name of Amazon S3 bucket to which the log data was exported. - Destination *string `locationName:"destination" min:"1" type:"string"` - - // The prefix that was used as the start of Amazon S3 key for every object exported. - DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` - - // Execution info about the export task. - ExecutionInfo *ExportTaskExecutionInfo `locationName:"executionInfo" type:"structure"` - - // The start time, expressed as the number of milliseconds after Jan 1, 1970 - // 00:00:00 UTC. Events with a timestamp before this time are not exported. - From *int64 `locationName:"from" type:"long"` - - // The name of the log group from which logs data was exported. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // The status of the export task. - Status *ExportTaskStatus `locationName:"status" type:"structure"` - - // The ID of the export task. - TaskId *string `locationName:"taskId" min:"1" type:"string"` - - // The name of the export task. - TaskName *string `locationName:"taskName" min:"1" type:"string"` - - // The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 - // UTC. Events with a timestamp later than this time are not exported. - To *int64 `locationName:"to" type:"long"` -} - -// String returns the string representation -func (s ExportTask) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportTask) GoString() string { - return s.String() -} - -// SetDestination sets the Destination field's value. -func (s *ExportTask) SetDestination(v string) *ExportTask { - s.Destination = &v - return s -} - -// SetDestinationPrefix sets the DestinationPrefix field's value. -func (s *ExportTask) SetDestinationPrefix(v string) *ExportTask { - s.DestinationPrefix = &v - return s -} - -// SetExecutionInfo sets the ExecutionInfo field's value. -func (s *ExportTask) SetExecutionInfo(v *ExportTaskExecutionInfo) *ExportTask { - s.ExecutionInfo = v - return s -} - -// SetFrom sets the From field's value. -func (s *ExportTask) SetFrom(v int64) *ExportTask { - s.From = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *ExportTask) SetLogGroupName(v string) *ExportTask { - s.LogGroupName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ExportTask) SetStatus(v *ExportTaskStatus) *ExportTask { - s.Status = v - return s -} - -// SetTaskId sets the TaskId field's value. -func (s *ExportTask) SetTaskId(v string) *ExportTask { - s.TaskId = &v - return s -} - -// SetTaskName sets the TaskName field's value. -func (s *ExportTask) SetTaskName(v string) *ExportTask { - s.TaskName = &v - return s -} - -// SetTo sets the To field's value. -func (s *ExportTask) SetTo(v int64) *ExportTask { - s.To = &v - return s -} - -// Represents the status of an export task. -type ExportTaskExecutionInfo struct { - _ struct{} `type:"structure"` - - // The completion time of the export task, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - CompletionTime *int64 `locationName:"completionTime" type:"long"` - - // The creation time of the export task, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - CreationTime *int64 `locationName:"creationTime" type:"long"` -} - -// String returns the string representation -func (s ExportTaskExecutionInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportTaskExecutionInfo) GoString() string { - return s.String() -} - -// SetCompletionTime sets the CompletionTime field's value. -func (s *ExportTaskExecutionInfo) SetCompletionTime(v int64) *ExportTaskExecutionInfo { - s.CompletionTime = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ExportTaskExecutionInfo) SetCreationTime(v int64) *ExportTaskExecutionInfo { - s.CreationTime = &v - return s -} - -// Represents the status of an export task. -type ExportTaskStatus struct { - _ struct{} `type:"structure"` - - // The status code of the export task. - Code *string `locationName:"code" type:"string" enum:"ExportTaskStatusCode"` - - // The status message related to the status code. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s ExportTaskStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportTaskStatus) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *ExportTaskStatus) SetCode(v string) *ExportTaskStatus { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ExportTaskStatus) SetMessage(v string) *ExportTaskStatus { - s.Message = &v - return s -} - -type FilterLogEventsInput struct { - _ struct{} `type:"structure"` - - // The end of the time range, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are - // not returned. - EndTime *int64 `locationName:"endTime" type:"long"` - - // The filter pattern to use. For more information, see Filter and Pattern Syntax - // (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). - // - // If not provided, all the events are matched. - FilterPattern *string `locationName:"filterPattern" type:"string"` - - // If the value is true, the operation makes a best effort to provide responses - // that contain events from multiple log streams within the log group, interleaved - // in a single response. If the value is false, all the matched log events in - // the first log stream are searched first, then those in the next log stream, - // and so on. The default is false. - Interleaved *bool `locationName:"interleaved" type:"boolean"` - - // The maximum number of events to return. The default is 10,000 events. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // The name of the log group to search. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // Filters the results to include only events from log streams that have names - // starting with this prefix. - // - // If you specify a value for both logStreamNamePrefix and logStreamNames, but - // the value for logStreamNamePrefix does not match any log stream names specified - // in logStreamNames, the action returns an InvalidParameterException error. - LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` - - // Filters the results to only logs from the log streams in this list. - // - // If you specify a value for both logStreamNamePrefix and logStreamNames, the - // action returns an InvalidParameterException error. - LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"` - - // The token for the next set of events to return. (You received this token - // from a previous call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The start of the time range, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not - // returned. - StartTime *int64 `locationName:"startTime" type:"long"` -} - -// String returns the string representation -func (s FilterLogEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FilterLogEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FilterLogEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FilterLogEventsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) - } - if s.LogStreamNames != nil && len(s.LogStreamNames) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamNames", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndTime sets the EndTime field's value. -func (s *FilterLogEventsInput) SetEndTime(v int64) *FilterLogEventsInput { - s.EndTime = &v - return s -} - -// SetFilterPattern sets the FilterPattern field's value. -func (s *FilterLogEventsInput) SetFilterPattern(v string) *FilterLogEventsInput { - s.FilterPattern = &v - return s -} - -// SetInterleaved sets the Interleaved field's value. -func (s *FilterLogEventsInput) SetInterleaved(v bool) *FilterLogEventsInput { - s.Interleaved = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *FilterLogEventsInput) SetLimit(v int64) *FilterLogEventsInput { - s.Limit = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *FilterLogEventsInput) SetLogGroupName(v string) *FilterLogEventsInput { - s.LogGroupName = &v - return s -} - -// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. -func (s *FilterLogEventsInput) SetLogStreamNamePrefix(v string) *FilterLogEventsInput { - s.LogStreamNamePrefix = &v - return s -} - -// SetLogStreamNames sets the LogStreamNames field's value. -func (s *FilterLogEventsInput) SetLogStreamNames(v []*string) *FilterLogEventsInput { - s.LogStreamNames = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *FilterLogEventsInput) SetNextToken(v string) *FilterLogEventsInput { - s.NextToken = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *FilterLogEventsInput) SetStartTime(v int64) *FilterLogEventsInput { - s.StartTime = &v - return s -} - -type FilterLogEventsOutput struct { - _ struct{} `type:"structure"` - - // The matched events. - Events []*FilteredLogEvent `locationName:"events" type:"list"` - - // The token to use when requesting the next set of items. The token expires - // after 24 hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // Indicates which log streams have been searched and whether each has been - // searched completely. - SearchedLogStreams []*SearchedLogStream `locationName:"searchedLogStreams" type:"list"` -} - -// String returns the string representation -func (s FilterLogEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FilterLogEventsOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *FilterLogEventsOutput) SetEvents(v []*FilteredLogEvent) *FilterLogEventsOutput { - s.Events = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *FilterLogEventsOutput) SetNextToken(v string) *FilterLogEventsOutput { - s.NextToken = &v - return s -} - -// SetSearchedLogStreams sets the SearchedLogStreams field's value. -func (s *FilterLogEventsOutput) SetSearchedLogStreams(v []*SearchedLogStream) *FilterLogEventsOutput { - s.SearchedLogStreams = v - return s -} - -// Represents a matched event. -type FilteredLogEvent struct { - _ struct{} `type:"structure"` - - // The ID of the event. - EventId *string `locationName:"eventId" type:"string"` - - // The time the event was ingested, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - IngestionTime *int64 `locationName:"ingestionTime" type:"long"` - - // The name of the log stream to which this event belongs. - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` - - // The data contained in the log event. - Message *string `locationName:"message" min:"1" type:"string"` - - // The time the event occurred, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. - Timestamp *int64 `locationName:"timestamp" type:"long"` -} - -// String returns the string representation -func (s FilteredLogEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FilteredLogEvent) GoString() string { - return s.String() -} - -// SetEventId sets the EventId field's value. -func (s *FilteredLogEvent) SetEventId(v string) *FilteredLogEvent { - s.EventId = &v - return s -} - -// SetIngestionTime sets the IngestionTime field's value. -func (s *FilteredLogEvent) SetIngestionTime(v int64) *FilteredLogEvent { - s.IngestionTime = &v - return s -} - -// SetLogStreamName sets the LogStreamName field's value. -func (s *FilteredLogEvent) SetLogStreamName(v string) *FilteredLogEvent { - s.LogStreamName = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *FilteredLogEvent) SetMessage(v string) *FilteredLogEvent { - s.Message = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *FilteredLogEvent) SetTimestamp(v int64) *FilteredLogEvent { - s.Timestamp = &v - return s -} - -type GetLogEventsInput struct { - _ struct{} `type:"structure"` - - // The end of the time range, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to or later than - // this time are not included. - EndTime *int64 `locationName:"endTime" type:"long"` - - // The maximum number of log events returned. If you don't specify a value, - // the maximum is as many log events as can fit in a response size of 1 MB, - // up to 10,000 log events. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The name of the log stream. - // - // LogStreamName is a required field - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // If the value is true, the earliest log events are returned first. If the - // value is false, the latest log events are returned first. The default value - // is false. - StartFromHead *bool `locationName:"startFromHead" type:"boolean"` - - // The start of the time range, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to this time or later - // than this time are included. Events with a timestamp earlier than this time - // are not included. - StartTime *int64 `locationName:"startTime" type:"long"` -} - -// String returns the string representation -func (s GetLogEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLogEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLogEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLogEventsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.LogStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("LogStreamName")) - } - if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndTime sets the EndTime field's value. -func (s *GetLogEventsInput) SetEndTime(v int64) *GetLogEventsInput { - s.EndTime = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *GetLogEventsInput) SetLimit(v int64) *GetLogEventsInput { - s.Limit = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *GetLogEventsInput) SetLogGroupName(v string) *GetLogEventsInput { - s.LogGroupName = &v - return s -} - -// SetLogStreamName sets the LogStreamName field's value. -func (s *GetLogEventsInput) SetLogStreamName(v string) *GetLogEventsInput { - s.LogStreamName = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetLogEventsInput) SetNextToken(v string) *GetLogEventsInput { - s.NextToken = &v - return s -} - -// SetStartFromHead sets the StartFromHead field's value. -func (s *GetLogEventsInput) SetStartFromHead(v bool) *GetLogEventsInput { - s.StartFromHead = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *GetLogEventsInput) SetStartTime(v int64) *GetLogEventsInput { - s.StartTime = &v - return s -} - -type GetLogEventsOutput struct { - _ struct{} `type:"structure"` - - // The events. - Events []*OutputLogEvent `locationName:"events" type:"list"` - - // The token for the next set of items in the backward direction. The token - // expires after 24 hours. This token will never be null. If you have reached - // the end of the stream, it will return the same token you passed in. - NextBackwardToken *string `locationName:"nextBackwardToken" min:"1" type:"string"` - - // The token for the next set of items in the forward direction. The token expires - // after 24 hours. If you have reached the end of the stream, it will return - // the same token you passed in. - NextForwardToken *string `locationName:"nextForwardToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetLogEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLogEventsOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *GetLogEventsOutput) SetEvents(v []*OutputLogEvent) *GetLogEventsOutput { - s.Events = v - return s -} - -// SetNextBackwardToken sets the NextBackwardToken field's value. -func (s *GetLogEventsOutput) SetNextBackwardToken(v string) *GetLogEventsOutput { - s.NextBackwardToken = &v - return s -} - -// SetNextForwardToken sets the NextForwardToken field's value. -func (s *GetLogEventsOutput) SetNextForwardToken(v string) *GetLogEventsOutput { - s.NextForwardToken = &v - return s -} - -type GetLogGroupFieldsInput struct { - _ struct{} `type:"structure"` - - // The name of the log group to search. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The time to set as the center of the query. If you specify time, the 8 minutes - // before and 8 minutes after this time are searched. If you omit time, the - // past 15 minutes are queried. - // - // The time value is specified as epoch time, the number of seconds since January - // 1, 1970, 00:00:00 UTC. - Time *int64 `locationName:"time" type:"long"` -} - -// String returns the string representation -func (s GetLogGroupFieldsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLogGroupFieldsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLogGroupFieldsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLogGroupFieldsInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *GetLogGroupFieldsInput) SetLogGroupName(v string) *GetLogGroupFieldsInput { - s.LogGroupName = &v - return s -} - -// SetTime sets the Time field's value. -func (s *GetLogGroupFieldsInput) SetTime(v int64) *GetLogGroupFieldsInput { - s.Time = &v - return s -} - -type GetLogGroupFieldsOutput struct { - _ struct{} `type:"structure"` - - // The array of fields found in the query. Each object in the array contains - // the name of the field, along with the percentage of time it appeared in the - // log events that were queried. - LogGroupFields []*LogGroupField `locationName:"logGroupFields" type:"list"` -} - -// String returns the string representation -func (s GetLogGroupFieldsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLogGroupFieldsOutput) GoString() string { - return s.String() -} - -// SetLogGroupFields sets the LogGroupFields field's value. -func (s *GetLogGroupFieldsOutput) SetLogGroupFields(v []*LogGroupField) *GetLogGroupFieldsOutput { - s.LogGroupFields = v - return s -} - -type GetLogRecordInput struct { - _ struct{} `type:"structure"` - - // The pointer corresponding to the log event record you want to retrieve. You - // get this from the response of a GetQueryResults operation. In that response, - // the value of the @ptr field for a log event is the value to use as logRecordPointer - // to retrieve that complete log event record. - // - // LogRecordPointer is a required field - LogRecordPointer *string `locationName:"logRecordPointer" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetLogRecordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLogRecordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLogRecordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLogRecordInput"} - if s.LogRecordPointer == nil { - invalidParams.Add(request.NewErrParamRequired("LogRecordPointer")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogRecordPointer sets the LogRecordPointer field's value. -func (s *GetLogRecordInput) SetLogRecordPointer(v string) *GetLogRecordInput { - s.LogRecordPointer = &v - return s -} - -type GetLogRecordOutput struct { - _ struct{} `type:"structure"` - - // The requested log event, as a JSON string. - LogRecord map[string]*string `locationName:"logRecord" type:"map"` -} - -// String returns the string representation -func (s GetLogRecordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLogRecordOutput) GoString() string { - return s.String() -} - -// SetLogRecord sets the LogRecord field's value. -func (s *GetLogRecordOutput) SetLogRecord(v map[string]*string) *GetLogRecordOutput { - s.LogRecord = v - return s -} - -type GetQueryResultsInput struct { - _ struct{} `type:"structure"` - - // The ID number of the query. - // - // QueryId is a required field - QueryId *string `locationName:"queryId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetQueryResultsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetQueryResultsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetQueryResultsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetQueryResultsInput"} - if s.QueryId == nil { - invalidParams.Add(request.NewErrParamRequired("QueryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueryId sets the QueryId field's value. -func (s *GetQueryResultsInput) SetQueryId(v string) *GetQueryResultsInput { - s.QueryId = &v - return s -} - -type GetQueryResultsOutput struct { - _ struct{} `type:"structure"` - - // The log events that matched the query criteria during the most recent time - // it ran. - // - // The results value is an array of arrays. Each log event is one object in - // the top-level array. Each of these log event objects is an array of field/value - // pairs. - Results [][]*ResultField `locationName:"results" type:"list"` - - // Includes the number of log events scanned by the query, the number of log - // events that matched the query criteria, and the total number of bytes in - // the log events that were scanned. - Statistics *QueryStatistics `locationName:"statistics" type:"structure"` - - // The status of the most recent running of the query. Possible values are Cancelled, - // Complete, Failed, Running, Scheduled, and Unknown. - Status *string `locationName:"status" type:"string" enum:"QueryStatus"` -} - -// String returns the string representation -func (s GetQueryResultsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetQueryResultsOutput) GoString() string { - return s.String() -} - -// SetResults sets the Results field's value. -func (s *GetQueryResultsOutput) SetResults(v [][]*ResultField) *GetQueryResultsOutput { - s.Results = v - return s -} - -// SetStatistics sets the Statistics field's value. -func (s *GetQueryResultsOutput) SetStatistics(v *QueryStatistics) *GetQueryResultsOutput { - s.Statistics = v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetQueryResultsOutput) SetStatus(v string) *GetQueryResultsOutput { - s.Status = &v - return s -} - -// Represents a log event, which is a record of activity that was recorded by -// the application or resource being monitored. -type InputLogEvent struct { - _ struct{} `type:"structure"` - - // The raw event message. - // - // Message is a required field - Message *string `locationName:"message" min:"1" type:"string" required:"true"` - - // The time the event occurred, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. - // - // Timestamp is a required field - Timestamp *int64 `locationName:"timestamp" type:"long" required:"true"` -} - -// String returns the string representation -func (s InputLogEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputLogEvent) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputLogEvent) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputLogEvent"} - if s.Message == nil { - invalidParams.Add(request.NewErrParamRequired("Message")) - } - if s.Message != nil && len(*s.Message) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Message", 1)) - } - if s.Timestamp == nil { - invalidParams.Add(request.NewErrParamRequired("Timestamp")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMessage sets the Message field's value. -func (s *InputLogEvent) SetMessage(v string) *InputLogEvent { - s.Message = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *InputLogEvent) SetTimestamp(v int64) *InputLogEvent { - s.Timestamp = &v - return s -} - -type ListTagsLogGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsLogGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsLogGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsLogGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsLogGroupInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *ListTagsLogGroupInput) SetLogGroupName(v string) *ListTagsLogGroupInput { - s.LogGroupName = &v - return s -} - -type ListTagsLogGroupOutput struct { - _ struct{} `type:"structure"` - - // The tags for the log group. - Tags map[string]*string `locationName:"tags" min:"1" type:"map"` -} - -// String returns the string representation -func (s ListTagsLogGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsLogGroupOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *ListTagsLogGroupOutput) SetTags(v map[string]*string) *ListTagsLogGroupOutput { - s.Tags = v - return s -} - -// Represents a log group. -type LogGroup struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the log group. - Arn *string `locationName:"arn" type:"string"` - - // The creation time of the log group, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - CreationTime *int64 `locationName:"creationTime" type:"long"` - - // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - - // The name of the log group. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // The number of metric filters. - MetricFilterCount *int64 `locationName:"metricFilterCount" type:"integer"` - - // The number of days to retain the log events in the specified log group. Possible - // values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, - // 1827, and 3653. - RetentionInDays *int64 `locationName:"retentionInDays" type:"integer"` - - // The number of bytes stored. - StoredBytes *int64 `locationName:"storedBytes" type:"long"` -} - -// String returns the string representation -func (s LogGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LogGroup) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *LogGroup) SetArn(v string) *LogGroup { - s.Arn = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *LogGroup) SetCreationTime(v int64) *LogGroup { - s.CreationTime = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *LogGroup) SetKmsKeyId(v string) *LogGroup { - s.KmsKeyId = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *LogGroup) SetLogGroupName(v string) *LogGroup { - s.LogGroupName = &v - return s -} - -// SetMetricFilterCount sets the MetricFilterCount field's value. -func (s *LogGroup) SetMetricFilterCount(v int64) *LogGroup { - s.MetricFilterCount = &v - return s -} - -// SetRetentionInDays sets the RetentionInDays field's value. -func (s *LogGroup) SetRetentionInDays(v int64) *LogGroup { - s.RetentionInDays = &v - return s -} - -// SetStoredBytes sets the StoredBytes field's value. -func (s *LogGroup) SetStoredBytes(v int64) *LogGroup { - s.StoredBytes = &v - return s -} - -// The fields contained in log events found by a GetLogGroupFields operation, -// along with the percentage of queried log events in which each field appears. -type LogGroupField struct { - _ struct{} `type:"structure"` - - // The name of a log field. - Name *string `locationName:"name" type:"string"` - - // The percentage of log events queried that contained the field. - Percent *int64 `locationName:"percent" type:"integer"` -} - -// String returns the string representation -func (s LogGroupField) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LogGroupField) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *LogGroupField) SetName(v string) *LogGroupField { - s.Name = &v - return s -} - -// SetPercent sets the Percent field's value. -func (s *LogGroupField) SetPercent(v int64) *LogGroupField { - s.Percent = &v - return s -} - -// Represents a log stream, which is a sequence of log events from a single -// emitter of logs. -type LogStream struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the log stream. - Arn *string `locationName:"arn" type:"string"` - - // The creation time of the stream, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - CreationTime *int64 `locationName:"creationTime" type:"long"` - - // The time of the first event, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. - FirstEventTimestamp *int64 `locationName:"firstEventTimestamp" type:"long"` - - // The time of the most recent log event in the log stream in CloudWatch Logs. - // This number is expressed as the number of milliseconds after Jan 1, 1970 - // 00:00:00 UTC. The lastEventTime value updates on an eventual consistency - // basis. It typically updates in less than an hour from ingestion, but may - // take longer in some rare situations. - LastEventTimestamp *int64 `locationName:"lastEventTimestamp" type:"long"` - - // The ingestion time, expressed as the number of milliseconds after Jan 1, - // 1970 00:00:00 UTC. - LastIngestionTime *int64 `locationName:"lastIngestionTime" type:"long"` - - // The name of the log stream. - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` - - // The number of bytes stored. - StoredBytes *int64 `locationName:"storedBytes" type:"long"` - - // The sequence token. - UploadSequenceToken *string `locationName:"uploadSequenceToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s LogStream) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LogStream) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *LogStream) SetArn(v string) *LogStream { - s.Arn = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *LogStream) SetCreationTime(v int64) *LogStream { - s.CreationTime = &v - return s -} - -// SetFirstEventTimestamp sets the FirstEventTimestamp field's value. -func (s *LogStream) SetFirstEventTimestamp(v int64) *LogStream { - s.FirstEventTimestamp = &v - return s -} - -// SetLastEventTimestamp sets the LastEventTimestamp field's value. -func (s *LogStream) SetLastEventTimestamp(v int64) *LogStream { - s.LastEventTimestamp = &v - return s -} - -// SetLastIngestionTime sets the LastIngestionTime field's value. -func (s *LogStream) SetLastIngestionTime(v int64) *LogStream { - s.LastIngestionTime = &v - return s -} - -// SetLogStreamName sets the LogStreamName field's value. -func (s *LogStream) SetLogStreamName(v string) *LogStream { - s.LogStreamName = &v - return s -} - -// SetStoredBytes sets the StoredBytes field's value. -func (s *LogStream) SetStoredBytes(v int64) *LogStream { - s.StoredBytes = &v - return s -} - -// SetUploadSequenceToken sets the UploadSequenceToken field's value. -func (s *LogStream) SetUploadSequenceToken(v string) *LogStream { - s.UploadSequenceToken = &v - return s -} - -// Metric filters express how CloudWatch Logs would extract metric observations -// from ingested log events and transform them into metric data in a CloudWatch -// metric. -type MetricFilter struct { - _ struct{} `type:"structure"` - - // The creation time of the metric filter, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - CreationTime *int64 `locationName:"creationTime" type:"long"` - - // The name of the metric filter. - FilterName *string `locationName:"filterName" min:"1" type:"string"` - - // A symbolic description of how CloudWatch Logs should interpret the data in - // each log event. For example, a log event may contain timestamps, IP addresses, - // strings, and so on. You use the filter pattern to specify what to look for - // in the log event message. - FilterPattern *string `locationName:"filterPattern" type:"string"` - - // The name of the log group. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // The metric transformations. - MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list"` -} - -// String returns the string representation -func (s MetricFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricFilter) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *MetricFilter) SetCreationTime(v int64) *MetricFilter { - s.CreationTime = &v - return s -} - -// SetFilterName sets the FilterName field's value. -func (s *MetricFilter) SetFilterName(v string) *MetricFilter { - s.FilterName = &v - return s -} - -// SetFilterPattern sets the FilterPattern field's value. -func (s *MetricFilter) SetFilterPattern(v string) *MetricFilter { - s.FilterPattern = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *MetricFilter) SetLogGroupName(v string) *MetricFilter { - s.LogGroupName = &v - return s -} - -// SetMetricTransformations sets the MetricTransformations field's value. -func (s *MetricFilter) SetMetricTransformations(v []*MetricTransformation) *MetricFilter { - s.MetricTransformations = v - return s -} - -// Represents a matched event. -type MetricFilterMatchRecord struct { - _ struct{} `type:"structure"` - - // The raw event data. - EventMessage *string `locationName:"eventMessage" min:"1" type:"string"` - - // The event number. - EventNumber *int64 `locationName:"eventNumber" type:"long"` - - // The values extracted from the event data by the filter. - ExtractedValues map[string]*string `locationName:"extractedValues" type:"map"` -} - -// String returns the string representation -func (s MetricFilterMatchRecord) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricFilterMatchRecord) GoString() string { - return s.String() -} - -// SetEventMessage sets the EventMessage field's value. -func (s *MetricFilterMatchRecord) SetEventMessage(v string) *MetricFilterMatchRecord { - s.EventMessage = &v - return s -} - -// SetEventNumber sets the EventNumber field's value. -func (s *MetricFilterMatchRecord) SetEventNumber(v int64) *MetricFilterMatchRecord { - s.EventNumber = &v - return s -} - -// SetExtractedValues sets the ExtractedValues field's value. -func (s *MetricFilterMatchRecord) SetExtractedValues(v map[string]*string) *MetricFilterMatchRecord { - s.ExtractedValues = v - return s -} - -// Indicates how to transform ingested log eventsto metric data in a CloudWatch -// metric. -type MetricTransformation struct { - _ struct{} `type:"structure"` - - // (Optional) The value to emit when a filter pattern does not match a log event. - // This value can be null. - DefaultValue *float64 `locationName:"defaultValue" type:"double"` - - // The name of the CloudWatch metric. - // - // MetricName is a required field - MetricName *string `locationName:"metricName" type:"string" required:"true"` - - // The namespace of the CloudWatch metric. - // - // MetricNamespace is a required field - MetricNamespace *string `locationName:"metricNamespace" type:"string" required:"true"` - - // The value to publish to the CloudWatch metric when a filter pattern matches - // a log event. - // - // MetricValue is a required field - MetricValue *string `locationName:"metricValue" type:"string" required:"true"` -} - -// String returns the string representation -func (s MetricTransformation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricTransformation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MetricTransformation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MetricTransformation"} - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.MetricNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("MetricNamespace")) - } - if s.MetricValue == nil { - invalidParams.Add(request.NewErrParamRequired("MetricValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *MetricTransformation) SetDefaultValue(v float64) *MetricTransformation { - s.DefaultValue = &v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *MetricTransformation) SetMetricName(v string) *MetricTransformation { - s.MetricName = &v - return s -} - -// SetMetricNamespace sets the MetricNamespace field's value. -func (s *MetricTransformation) SetMetricNamespace(v string) *MetricTransformation { - s.MetricNamespace = &v - return s -} - -// SetMetricValue sets the MetricValue field's value. -func (s *MetricTransformation) SetMetricValue(v string) *MetricTransformation { - s.MetricValue = &v - return s -} - -// Represents a log event. -type OutputLogEvent struct { - _ struct{} `type:"structure"` - - // The time the event was ingested, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - IngestionTime *int64 `locationName:"ingestionTime" type:"long"` - - // The data contained in the log event. - Message *string `locationName:"message" min:"1" type:"string"` - - // The time the event occurred, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. - Timestamp *int64 `locationName:"timestamp" type:"long"` -} - -// String returns the string representation -func (s OutputLogEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputLogEvent) GoString() string { - return s.String() -} - -// SetIngestionTime sets the IngestionTime field's value. -func (s *OutputLogEvent) SetIngestionTime(v int64) *OutputLogEvent { - s.IngestionTime = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *OutputLogEvent) SetMessage(v string) *OutputLogEvent { - s.Message = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *OutputLogEvent) SetTimestamp(v int64) *OutputLogEvent { - s.Timestamp = &v - return s -} - -type PutDestinationInput struct { - _ struct{} `type:"structure"` - - // A name for the destination. - // - // DestinationName is a required field - DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"` - - // The ARN of an IAM role that grants CloudWatch Logs permissions to call the - // Amazon Kinesis PutRecord operation on the destination stream. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"` - - // The ARN of an Amazon Kinesis stream to which to deliver matching log events. - // - // TargetArn is a required field - TargetArn *string `locationName:"targetArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutDestinationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutDestinationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutDestinationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutDestinationInput"} - if s.DestinationName == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationName")) - } - if s.DestinationName != nil && len(*s.DestinationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1)) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) - } - if s.TargetArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetArn")) - } - if s.TargetArn != nil && len(*s.TargetArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationName sets the DestinationName field's value. -func (s *PutDestinationInput) SetDestinationName(v string) *PutDestinationInput { - s.DestinationName = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *PutDestinationInput) SetRoleArn(v string) *PutDestinationInput { - s.RoleArn = &v - return s -} - -// SetTargetArn sets the TargetArn field's value. -func (s *PutDestinationInput) SetTargetArn(v string) *PutDestinationInput { - s.TargetArn = &v - return s -} - -type PutDestinationOutput struct { - _ struct{} `type:"structure"` - - // The destination. - Destination *Destination `locationName:"destination" type:"structure"` -} - -// String returns the string representation -func (s PutDestinationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutDestinationOutput) GoString() string { - return s.String() -} - -// SetDestination sets the Destination field's value. -func (s *PutDestinationOutput) SetDestination(v *Destination) *PutDestinationOutput { - s.Destination = v - return s -} - -type PutDestinationPolicyInput struct { - _ struct{} `type:"structure"` - - // An IAM policy document that authorizes cross-account users to deliver their - // log events to the associated destination. - // - // AccessPolicy is a required field - AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string" required:"true"` - - // A name for an existing destination. - // - // DestinationName is a required field - DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutDestinationPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutDestinationPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutDestinationPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutDestinationPolicyInput"} - if s.AccessPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("AccessPolicy")) - } - if s.AccessPolicy != nil && len(*s.AccessPolicy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccessPolicy", 1)) - } - if s.DestinationName == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationName")) - } - if s.DestinationName != nil && len(*s.DestinationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessPolicy sets the AccessPolicy field's value. -func (s *PutDestinationPolicyInput) SetAccessPolicy(v string) *PutDestinationPolicyInput { - s.AccessPolicy = &v - return s -} - -// SetDestinationName sets the DestinationName field's value. -func (s *PutDestinationPolicyInput) SetDestinationName(v string) *PutDestinationPolicyInput { - s.DestinationName = &v - return s -} - -type PutDestinationPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutDestinationPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutDestinationPolicyOutput) GoString() string { - return s.String() -} - -type PutLogEventsInput struct { - _ struct{} `type:"structure"` - - // The log events. - // - // LogEvents is a required field - LogEvents []*InputLogEvent `locationName:"logEvents" min:"1" type:"list" required:"true"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The name of the log stream. - // - // LogStreamName is a required field - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` - - // The sequence token obtained from the response of the previous PutLogEvents - // call. An upload in a newly created log stream does not require a sequence - // token. You can also get the sequence token using DescribeLogStreams. If you - // call PutLogEvents twice within a narrow time period using the same value - // for sequenceToken, both calls may be successful, or one may be rejected. - SequenceToken *string `locationName:"sequenceToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s PutLogEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutLogEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutLogEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutLogEventsInput"} - if s.LogEvents == nil { - invalidParams.Add(request.NewErrParamRequired("LogEvents")) - } - if s.LogEvents != nil && len(s.LogEvents) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogEvents", 1)) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.LogStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("LogStreamName")) - } - if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) - } - if s.SequenceToken != nil && len(*s.SequenceToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SequenceToken", 1)) - } - if s.LogEvents != nil { - for i, v := range s.LogEvents { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LogEvents", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogEvents sets the LogEvents field's value. -func (s *PutLogEventsInput) SetLogEvents(v []*InputLogEvent) *PutLogEventsInput { - s.LogEvents = v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *PutLogEventsInput) SetLogGroupName(v string) *PutLogEventsInput { - s.LogGroupName = &v - return s -} - -// SetLogStreamName sets the LogStreamName field's value. -func (s *PutLogEventsInput) SetLogStreamName(v string) *PutLogEventsInput { - s.LogStreamName = &v - return s -} - -// SetSequenceToken sets the SequenceToken field's value. -func (s *PutLogEventsInput) SetSequenceToken(v string) *PutLogEventsInput { - s.SequenceToken = &v - return s -} - -type PutLogEventsOutput struct { - _ struct{} `type:"structure"` - - // The next sequence token. - NextSequenceToken *string `locationName:"nextSequenceToken" min:"1" type:"string"` - - // The rejected events. - RejectedLogEventsInfo *RejectedLogEventsInfo `locationName:"rejectedLogEventsInfo" type:"structure"` -} - -// String returns the string representation -func (s PutLogEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutLogEventsOutput) GoString() string { - return s.String() -} - -// SetNextSequenceToken sets the NextSequenceToken field's value. -func (s *PutLogEventsOutput) SetNextSequenceToken(v string) *PutLogEventsOutput { - s.NextSequenceToken = &v - return s -} - -// SetRejectedLogEventsInfo sets the RejectedLogEventsInfo field's value. -func (s *PutLogEventsOutput) SetRejectedLogEventsInfo(v *RejectedLogEventsInfo) *PutLogEventsOutput { - s.RejectedLogEventsInfo = v - return s -} - -type PutMetricFilterInput struct { - _ struct{} `type:"structure"` - - // A name for the metric filter. - // - // FilterName is a required field - FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` - - // A filter pattern for extracting metric data out of ingested log events. - // - // FilterPattern is a required field - FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // A collection of information that defines how metric data gets emitted. - // - // MetricTransformations is a required field - MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s PutMetricFilterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutMetricFilterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutMetricFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutMetricFilterInput"} - if s.FilterName == nil { - invalidParams.Add(request.NewErrParamRequired("FilterName")) - } - if s.FilterName != nil && len(*s.FilterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) - } - if s.FilterPattern == nil { - invalidParams.Add(request.NewErrParamRequired("FilterPattern")) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.MetricTransformations == nil { - invalidParams.Add(request.NewErrParamRequired("MetricTransformations")) - } - if s.MetricTransformations != nil && len(s.MetricTransformations) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MetricTransformations", 1)) - } - if s.MetricTransformations != nil { - for i, v := range s.MetricTransformations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricTransformations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilterName sets the FilterName field's value. -func (s *PutMetricFilterInput) SetFilterName(v string) *PutMetricFilterInput { - s.FilterName = &v - return s -} - -// SetFilterPattern sets the FilterPattern field's value. -func (s *PutMetricFilterInput) SetFilterPattern(v string) *PutMetricFilterInput { - s.FilterPattern = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *PutMetricFilterInput) SetLogGroupName(v string) *PutMetricFilterInput { - s.LogGroupName = &v - return s -} - -// SetMetricTransformations sets the MetricTransformations field's value. -func (s *PutMetricFilterInput) SetMetricTransformations(v []*MetricTransformation) *PutMetricFilterInput { - s.MetricTransformations = v - return s -} - -type PutMetricFilterOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutMetricFilterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutMetricFilterOutput) GoString() string { - return s.String() -} - -type PutResourcePolicyInput struct { - _ struct{} `type:"structure"` - - // Details of the new policy, including the identity of the principal that is - // enabled to put logs to this account. This is formatted as a JSON string. - // - // The following example creates a resource policy enabling the Route 53 service - // to put DNS query logs in to the specified log group. Replace "logArn" with - // the ARN of your CloudWatch Logs resource, such as a log group or log stream. - // - // { "Version": "2012-10-17", "Statement": [ { "Sid": "Route53LogsToCloudWatchLogs", - // "Effect": "Allow", "Principal": { "Service": [ "route53.amazonaws.com" ] - // }, "Action":"logs:PutLogEvents", "Resource": "logArn" } ] } - PolicyDocument *string `locationName:"policyDocument" min:"1" type:"string"` - - // Name of the new policy. This parameter is required. - PolicyName *string `locationName:"policyName" type:"string"` -} - -// String returns the string representation -func (s PutResourcePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutResourcePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutResourcePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"} - if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PutResourcePolicyInput) SetPolicyDocument(v string) *PutResourcePolicyInput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PutResourcePolicyInput) SetPolicyName(v string) *PutResourcePolicyInput { - s.PolicyName = &v - return s -} - -type PutResourcePolicyOutput struct { - _ struct{} `type:"structure"` - - // The new policy. - ResourcePolicy *ResourcePolicy `locationName:"resourcePolicy" type:"structure"` -} - -// String returns the string representation -func (s PutResourcePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutResourcePolicyOutput) GoString() string { - return s.String() -} - -// SetResourcePolicy sets the ResourcePolicy field's value. -func (s *PutResourcePolicyOutput) SetResourcePolicy(v *ResourcePolicy) *PutResourcePolicyOutput { - s.ResourcePolicy = v - return s -} - -type PutRetentionPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The number of days to retain the log events in the specified log group. Possible - // values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, - // 1827, and 3653. - // - // RetentionInDays is a required field - RetentionInDays *int64 `locationName:"retentionInDays" type:"integer" required:"true"` -} - -// String returns the string representation -func (s PutRetentionPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRetentionPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutRetentionPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutRetentionPolicyInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.RetentionInDays == nil { - invalidParams.Add(request.NewErrParamRequired("RetentionInDays")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *PutRetentionPolicyInput) SetLogGroupName(v string) *PutRetentionPolicyInput { - s.LogGroupName = &v - return s -} - -// SetRetentionInDays sets the RetentionInDays field's value. -func (s *PutRetentionPolicyInput) SetRetentionInDays(v int64) *PutRetentionPolicyInput { - s.RetentionInDays = &v - return s -} - -type PutRetentionPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutRetentionPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRetentionPolicyOutput) GoString() string { - return s.String() -} - -type PutSubscriptionFilterInput struct { - _ struct{} `type:"structure"` - - // The ARN of the destination to deliver matching log events to. Currently, - // the supported destinations are: - // - // * An Amazon Kinesis stream belonging to the same account as the subscription - // filter, for same-account delivery. - // - // * A logical destination (specified using an ARN) belonging to a different - // account, for cross-account delivery. - // - // * An Amazon Kinesis Firehose delivery stream belonging to the same account - // as the subscription filter, for same-account delivery. - // - // * An AWS Lambda function belonging to the same account as the subscription - // filter, for same-account delivery. - // - // DestinationArn is a required field - DestinationArn *string `locationName:"destinationArn" min:"1" type:"string" required:"true"` - - // The method used to distribute log data to the destination. By default log - // data is grouped by log stream, but the grouping can be set to random for - // a more even distribution. This property is only applicable when the destination - // is an Amazon Kinesis stream. - Distribution *string `locationName:"distribution" type:"string" enum:"Distribution"` - - // A name for the subscription filter. If you are updating an existing filter, - // you must specify the correct name in filterName. Otherwise, the call fails - // because you cannot associate a second filter with a log group. To find the - // name of the filter currently associated with a log group, use DescribeSubscriptionFilters. - // - // FilterName is a required field - FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` - - // A filter pattern for subscribing to a filtered stream of log events. - // - // FilterPattern is a required field - FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The ARN of an IAM role that grants CloudWatch Logs permissions to deliver - // ingested log events to the destination stream. You don't need to provide - // the ARN when you are working with a logical destination for cross-account - // delivery. - RoleArn *string `locationName:"roleArn" min:"1" type:"string"` -} - -// String returns the string representation -func (s PutSubscriptionFilterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutSubscriptionFilterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutSubscriptionFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutSubscriptionFilterInput"} - if s.DestinationArn == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationArn")) - } - if s.DestinationArn != nil && len(*s.DestinationArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DestinationArn", 1)) - } - if s.FilterName == nil { - invalidParams.Add(request.NewErrParamRequired("FilterName")) - } - if s.FilterName != nil && len(*s.FilterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) - } - if s.FilterPattern == nil { - invalidParams.Add(request.NewErrParamRequired("FilterPattern")) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.RoleArn != nil && len(*s.RoleArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationArn sets the DestinationArn field's value. -func (s *PutSubscriptionFilterInput) SetDestinationArn(v string) *PutSubscriptionFilterInput { - s.DestinationArn = &v - return s -} - -// SetDistribution sets the Distribution field's value. -func (s *PutSubscriptionFilterInput) SetDistribution(v string) *PutSubscriptionFilterInput { - s.Distribution = &v - return s -} - -// SetFilterName sets the FilterName field's value. -func (s *PutSubscriptionFilterInput) SetFilterName(v string) *PutSubscriptionFilterInput { - s.FilterName = &v - return s -} - -// SetFilterPattern sets the FilterPattern field's value. -func (s *PutSubscriptionFilterInput) SetFilterPattern(v string) *PutSubscriptionFilterInput { - s.FilterPattern = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *PutSubscriptionFilterInput) SetLogGroupName(v string) *PutSubscriptionFilterInput { - s.LogGroupName = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *PutSubscriptionFilterInput) SetRoleArn(v string) *PutSubscriptionFilterInput { - s.RoleArn = &v - return s -} - -type PutSubscriptionFilterOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutSubscriptionFilterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutSubscriptionFilterOutput) GoString() string { - return s.String() -} - -// Reserved. -type QueryCompileError struct { - _ struct{} `type:"structure"` - - // Reserved. - Location *QueryCompileErrorLocation `locationName:"location" type:"structure"` - - // Reserved. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s QueryCompileError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryCompileError) GoString() string { - return s.String() -} - -// SetLocation sets the Location field's value. -func (s *QueryCompileError) SetLocation(v *QueryCompileErrorLocation) *QueryCompileError { - s.Location = v - return s -} - -// SetMessage sets the Message field's value. -func (s *QueryCompileError) SetMessage(v string) *QueryCompileError { - s.Message = &v - return s -} - -// Reserved. -type QueryCompileErrorLocation struct { - _ struct{} `type:"structure"` - - // Reserved. - EndCharOffset *int64 `locationName:"endCharOffset" type:"integer"` - - // Reserved. - StartCharOffset *int64 `locationName:"startCharOffset" type:"integer"` -} - -// String returns the string representation -func (s QueryCompileErrorLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryCompileErrorLocation) GoString() string { - return s.String() -} - -// SetEndCharOffset sets the EndCharOffset field's value. -func (s *QueryCompileErrorLocation) SetEndCharOffset(v int64) *QueryCompileErrorLocation { - s.EndCharOffset = &v - return s -} - -// SetStartCharOffset sets the StartCharOffset field's value. -func (s *QueryCompileErrorLocation) SetStartCharOffset(v int64) *QueryCompileErrorLocation { - s.StartCharOffset = &v - return s -} - -// Information about one CloudWatch Logs Insights query that matches the request -// in a DescribeQueries operation. -type QueryInfo struct { - _ struct{} `type:"structure"` - - // The date and time that this query was created. - CreateTime *int64 `locationName:"createTime" type:"long"` - - // The name of the log group scanned by this query. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // The unique ID number of this query. - QueryId *string `locationName:"queryId" type:"string"` - - // The query string used in this query. - QueryString *string `locationName:"queryString" type:"string"` - - // The status of this query. Possible values are Cancelled, Complete, Failed, - // Running, Scheduled, and Unknown. - Status *string `locationName:"status" type:"string" enum:"QueryStatus"` -} - -// String returns the string representation -func (s QueryInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryInfo) GoString() string { - return s.String() -} - -// SetCreateTime sets the CreateTime field's value. -func (s *QueryInfo) SetCreateTime(v int64) *QueryInfo { - s.CreateTime = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *QueryInfo) SetLogGroupName(v string) *QueryInfo { - s.LogGroupName = &v - return s -} - -// SetQueryId sets the QueryId field's value. -func (s *QueryInfo) SetQueryId(v string) *QueryInfo { - s.QueryId = &v - return s -} - -// SetQueryString sets the QueryString field's value. -func (s *QueryInfo) SetQueryString(v string) *QueryInfo { - s.QueryString = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *QueryInfo) SetStatus(v string) *QueryInfo { - s.Status = &v - return s -} - -// Contains the number of log events scanned by the query, the number of log -// events that matched the query criteria, and the total number of bytes in -// the log events that were scanned. -type QueryStatistics struct { - _ struct{} `type:"structure"` - - // The total number of bytes in the log events scanned during the query. - BytesScanned *float64 `locationName:"bytesScanned" type:"double"` - - // The number of log events that matched the query string. - RecordsMatched *float64 `locationName:"recordsMatched" type:"double"` - - // The total number of log events scanned during the query. - RecordsScanned *float64 `locationName:"recordsScanned" type:"double"` -} - -// String returns the string representation -func (s QueryStatistics) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryStatistics) GoString() string { - return s.String() -} - -// SetBytesScanned sets the BytesScanned field's value. -func (s *QueryStatistics) SetBytesScanned(v float64) *QueryStatistics { - s.BytesScanned = &v - return s -} - -// SetRecordsMatched sets the RecordsMatched field's value. -func (s *QueryStatistics) SetRecordsMatched(v float64) *QueryStatistics { - s.RecordsMatched = &v - return s -} - -// SetRecordsScanned sets the RecordsScanned field's value. -func (s *QueryStatistics) SetRecordsScanned(v float64) *QueryStatistics { - s.RecordsScanned = &v - return s -} - -// Represents the rejected events. -type RejectedLogEventsInfo struct { - _ struct{} `type:"structure"` - - // The expired log events. - ExpiredLogEventEndIndex *int64 `locationName:"expiredLogEventEndIndex" type:"integer"` - - // The log events that are too new. - TooNewLogEventStartIndex *int64 `locationName:"tooNewLogEventStartIndex" type:"integer"` - - // The log events that are too old. - TooOldLogEventEndIndex *int64 `locationName:"tooOldLogEventEndIndex" type:"integer"` -} - -// String returns the string representation -func (s RejectedLogEventsInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectedLogEventsInfo) GoString() string { - return s.String() -} - -// SetExpiredLogEventEndIndex sets the ExpiredLogEventEndIndex field's value. -func (s *RejectedLogEventsInfo) SetExpiredLogEventEndIndex(v int64) *RejectedLogEventsInfo { - s.ExpiredLogEventEndIndex = &v - return s -} - -// SetTooNewLogEventStartIndex sets the TooNewLogEventStartIndex field's value. -func (s *RejectedLogEventsInfo) SetTooNewLogEventStartIndex(v int64) *RejectedLogEventsInfo { - s.TooNewLogEventStartIndex = &v - return s -} - -// SetTooOldLogEventEndIndex sets the TooOldLogEventEndIndex field's value. -func (s *RejectedLogEventsInfo) SetTooOldLogEventEndIndex(v int64) *RejectedLogEventsInfo { - s.TooOldLogEventEndIndex = &v - return s -} - -// A policy enabling one or more entities to put logs to a log group in this -// account. -type ResourcePolicy struct { - _ struct{} `type:"structure"` - - // Timestamp showing when this policy was last updated, expressed as the number - // of milliseconds after Jan 1, 1970 00:00:00 UTC. - LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` - - // The details of the policy. - PolicyDocument *string `locationName:"policyDocument" min:"1" type:"string"` - - // The name of the resource policy. - PolicyName *string `locationName:"policyName" type:"string"` -} - -// String returns the string representation -func (s ResourcePolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourcePolicy) GoString() string { - return s.String() -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *ResourcePolicy) SetLastUpdatedTime(v int64) *ResourcePolicy { - s.LastUpdatedTime = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *ResourcePolicy) SetPolicyDocument(v string) *ResourcePolicy { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *ResourcePolicy) SetPolicyName(v string) *ResourcePolicy { - s.PolicyName = &v - return s -} - -// Contains one field from one log event returned by a CloudWatch Logs Insights -// query, along with the value of that field. -type ResultField struct { - _ struct{} `type:"structure"` - - // The log event field. - Field *string `locationName:"field" type:"string"` - - // The value of this field. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s ResultField) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResultField) GoString() string { - return s.String() -} - -// SetField sets the Field field's value. -func (s *ResultField) SetField(v string) *ResultField { - s.Field = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ResultField) SetValue(v string) *ResultField { - s.Value = &v - return s -} - -// Represents the search status of a log stream. -type SearchedLogStream struct { - _ struct{} `type:"structure"` - - // The name of the log stream. - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` - - // Indicates whether all the events in this log stream were searched. - SearchedCompletely *bool `locationName:"searchedCompletely" type:"boolean"` -} - -// String returns the string representation -func (s SearchedLogStream) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchedLogStream) GoString() string { - return s.String() -} - -// SetLogStreamName sets the LogStreamName field's value. -func (s *SearchedLogStream) SetLogStreamName(v string) *SearchedLogStream { - s.LogStreamName = &v - return s -} - -// SetSearchedCompletely sets the SearchedCompletely field's value. -func (s *SearchedLogStream) SetSearchedCompletely(v bool) *SearchedLogStream { - s.SearchedCompletely = &v - return s -} - -type StartQueryInput struct { - _ struct{} `type:"structure"` - - // The end of the time range to query. Specified as epoch time, the number of - // seconds since January 1, 1970, 00:00:00 UTC. - // - // EndTime is a required field - EndTime *int64 `locationName:"endTime" type:"long" required:"true"` - - // The maximum number of log events to return in the query. If the query string - // uses the fields command, only the specified fields and their values are returned. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // The log group on which to perform the query. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The query string to use. For more information, see CloudWatch Logs Insights - // Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). - // - // QueryString is a required field - QueryString *string `locationName:"queryString" type:"string" required:"true"` - - // The beginning of the time range to query. Specified as epoch time, the number - // of seconds since January 1, 1970, 00:00:00 UTC. - // - // StartTime is a required field - StartTime *int64 `locationName:"startTime" type:"long" required:"true"` -} - -// String returns the string representation -func (s StartQueryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartQueryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartQueryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartQueryInput"} - if s.EndTime == nil { - invalidParams.Add(request.NewErrParamRequired("EndTime")) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.QueryString == nil { - invalidParams.Add(request.NewErrParamRequired("QueryString")) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndTime sets the EndTime field's value. -func (s *StartQueryInput) SetEndTime(v int64) *StartQueryInput { - s.EndTime = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *StartQueryInput) SetLimit(v int64) *StartQueryInput { - s.Limit = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *StartQueryInput) SetLogGroupName(v string) *StartQueryInput { - s.LogGroupName = &v - return s -} - -// SetQueryString sets the QueryString field's value. -func (s *StartQueryInput) SetQueryString(v string) *StartQueryInput { - s.QueryString = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *StartQueryInput) SetStartTime(v int64) *StartQueryInput { - s.StartTime = &v - return s -} - -type StartQueryOutput struct { - _ struct{} `type:"structure"` - - // The unique ID of the query. - QueryId *string `locationName:"queryId" type:"string"` -} - -// String returns the string representation -func (s StartQueryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartQueryOutput) GoString() string { - return s.String() -} - -// SetQueryId sets the QueryId field's value. -func (s *StartQueryOutput) SetQueryId(v string) *StartQueryOutput { - s.QueryId = &v - return s -} - -type StopQueryInput struct { - _ struct{} `type:"structure"` - - // The ID number of the query to stop. If necessary, you can use DescribeQueries - // to find this ID number. - // - // QueryId is a required field - QueryId *string `locationName:"queryId" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopQueryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopQueryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopQueryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopQueryInput"} - if s.QueryId == nil { - invalidParams.Add(request.NewErrParamRequired("QueryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueryId sets the QueryId field's value. -func (s *StopQueryInput) SetQueryId(v string) *StopQueryInput { - s.QueryId = &v - return s -} - -type StopQueryOutput struct { - _ struct{} `type:"structure"` - - // This is true if the query was stopped by the StopQuery operation. - Success *bool `locationName:"success" type:"boolean"` -} - -// String returns the string representation -func (s StopQueryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopQueryOutput) GoString() string { - return s.String() -} - -// SetSuccess sets the Success field's value. -func (s *StopQueryOutput) SetSuccess(v bool) *StopQueryOutput { - s.Success = &v - return s -} - -// Represents a subscription filter. -type SubscriptionFilter struct { - _ struct{} `type:"structure"` - - // The creation time of the subscription filter, expressed as the number of - // milliseconds after Jan 1, 1970 00:00:00 UTC. - CreationTime *int64 `locationName:"creationTime" type:"long"` - - // The Amazon Resource Name (ARN) of the destination. - DestinationArn *string `locationName:"destinationArn" min:"1" type:"string"` - - // The method used to distribute log data to the destination, which can be either - // random or grouped by log stream. - Distribution *string `locationName:"distribution" type:"string" enum:"Distribution"` - - // The name of the subscription filter. - FilterName *string `locationName:"filterName" min:"1" type:"string"` - - // A symbolic description of how CloudWatch Logs should interpret the data in - // each log event. For example, a log event may contain timestamps, IP addresses, - // strings, and so on. You use the filter pattern to specify what to look for - // in the log event message. - FilterPattern *string `locationName:"filterPattern" type:"string"` - - // The name of the log group. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - RoleArn *string `locationName:"roleArn" min:"1" type:"string"` -} - -// String returns the string representation -func (s SubscriptionFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubscriptionFilter) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *SubscriptionFilter) SetCreationTime(v int64) *SubscriptionFilter { - s.CreationTime = &v - return s -} - -// SetDestinationArn sets the DestinationArn field's value. -func (s *SubscriptionFilter) SetDestinationArn(v string) *SubscriptionFilter { - s.DestinationArn = &v - return s -} - -// SetDistribution sets the Distribution field's value. -func (s *SubscriptionFilter) SetDistribution(v string) *SubscriptionFilter { - s.Distribution = &v - return s -} - -// SetFilterName sets the FilterName field's value. -func (s *SubscriptionFilter) SetFilterName(v string) *SubscriptionFilter { - s.FilterName = &v - return s -} - -// SetFilterPattern sets the FilterPattern field's value. -func (s *SubscriptionFilter) SetFilterPattern(v string) *SubscriptionFilter { - s.FilterPattern = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *SubscriptionFilter) SetLogGroupName(v string) *SubscriptionFilter { - s.LogGroupName = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *SubscriptionFilter) SetRoleArn(v string) *SubscriptionFilter { - s.RoleArn = &v - return s -} - -type TagLogGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The key-value pairs to use for the tags. - // - // Tags is a required field - Tags map[string]*string `locationName:"tags" min:"1" type:"map" required:"true"` -} - -// String returns the string representation -func (s TagLogGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagLogGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagLogGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagLogGroupInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *TagLogGroupInput) SetLogGroupName(v string) *TagLogGroupInput { - s.LogGroupName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagLogGroupInput) SetTags(v map[string]*string) *TagLogGroupInput { - s.Tags = v - return s -} - -type TagLogGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagLogGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagLogGroupOutput) GoString() string { - return s.String() -} - -type TestMetricFilterInput struct { - _ struct{} `type:"structure"` - - // A symbolic description of how CloudWatch Logs should interpret the data in - // each log event. For example, a log event may contain timestamps, IP addresses, - // strings, and so on. You use the filter pattern to specify what to look for - // in the log event message. - // - // FilterPattern is a required field - FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"` - - // The log event messages to test. - // - // LogEventMessages is a required field - LogEventMessages []*string `locationName:"logEventMessages" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s TestMetricFilterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestMetricFilterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TestMetricFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TestMetricFilterInput"} - if s.FilterPattern == nil { - invalidParams.Add(request.NewErrParamRequired("FilterPattern")) - } - if s.LogEventMessages == nil { - invalidParams.Add(request.NewErrParamRequired("LogEventMessages")) - } - if s.LogEventMessages != nil && len(s.LogEventMessages) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogEventMessages", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilterPattern sets the FilterPattern field's value. -func (s *TestMetricFilterInput) SetFilterPattern(v string) *TestMetricFilterInput { - s.FilterPattern = &v - return s -} - -// SetLogEventMessages sets the LogEventMessages field's value. -func (s *TestMetricFilterInput) SetLogEventMessages(v []*string) *TestMetricFilterInput { - s.LogEventMessages = v - return s -} - -type TestMetricFilterOutput struct { - _ struct{} `type:"structure"` - - // The matched events. - Matches []*MetricFilterMatchRecord `locationName:"matches" type:"list"` -} - -// String returns the string representation -func (s TestMetricFilterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestMetricFilterOutput) GoString() string { - return s.String() -} - -// SetMatches sets the Matches field's value. -func (s *TestMetricFilterOutput) SetMatches(v []*MetricFilterMatchRecord) *TestMetricFilterOutput { - s.Matches = v - return s -} - -type UntagLogGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The tag keys. The corresponding tags are removed from the log group. - // - // Tags is a required field - Tags []*string `locationName:"tags" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s UntagLogGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagLogGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagLogGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagLogGroupInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *UntagLogGroupInput) SetLogGroupName(v string) *UntagLogGroupInput { - s.LogGroupName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *UntagLogGroupInput) SetTags(v []*string) *UntagLogGroupInput { - s.Tags = v - return s -} - -type UntagLogGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagLogGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagLogGroupOutput) GoString() string { - return s.String() -} - -// The method used to distribute log data to the destination, which can be either -// random or grouped by log stream. -const ( - // DistributionRandom is a Distribution enum value - DistributionRandom = "Random" - - // DistributionByLogStream is a Distribution enum value - DistributionByLogStream = "ByLogStream" -) - -const ( - // ExportTaskStatusCodeCancelled is a ExportTaskStatusCode enum value - ExportTaskStatusCodeCancelled = "CANCELLED" - - // ExportTaskStatusCodeCompleted is a ExportTaskStatusCode enum value - ExportTaskStatusCodeCompleted = "COMPLETED" - - // ExportTaskStatusCodeFailed is a ExportTaskStatusCode enum value - ExportTaskStatusCodeFailed = "FAILED" - - // ExportTaskStatusCodePending is a ExportTaskStatusCode enum value - ExportTaskStatusCodePending = "PENDING" - - // ExportTaskStatusCodePendingCancel is a ExportTaskStatusCode enum value - ExportTaskStatusCodePendingCancel = "PENDING_CANCEL" - - // ExportTaskStatusCodeRunning is a ExportTaskStatusCode enum value - ExportTaskStatusCodeRunning = "RUNNING" -) - -const ( - // OrderByLogStreamName is a OrderBy enum value - OrderByLogStreamName = "LogStreamName" - - // OrderByLastEventTime is a OrderBy enum value - OrderByLastEventTime = "LastEventTime" -) - -const ( - // QueryStatusScheduled is a QueryStatus enum value - QueryStatusScheduled = "Scheduled" - - // QueryStatusRunning is a QueryStatus enum value - QueryStatusRunning = "Running" - - // QueryStatusComplete is a QueryStatus enum value - QueryStatusComplete = "Complete" - - // QueryStatusFailed is a QueryStatus enum value - QueryStatusFailed = "Failed" - - // QueryStatusCancelled is a QueryStatus enum value - QueryStatusCancelled = "Cancelled" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/doc.go deleted file mode 100644 index a20147e7b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/doc.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package cloudwatchlogs provides the client and types for making API -// requests to Amazon CloudWatch Logs. -// -// You can use Amazon CloudWatch Logs to monitor, store, and access your log -// files from Amazon EC2 instances, AWS CloudTrail, or other sources. You can -// then retrieve the associated log data from CloudWatch Logs using the CloudWatch -// console, CloudWatch Logs commands in the AWS CLI, CloudWatch Logs API, or -// CloudWatch Logs SDK. -// -// You can use CloudWatch Logs to: -// -// * Monitor logs from EC2 instances in real-time: You can use CloudWatch -// Logs to monitor applications and systems using log data. For example, -// CloudWatch Logs can track the number of errors that occur in your application -// logs and send you a notification whenever the rate of errors exceeds a -// threshold that you specify. CloudWatch Logs uses your log data for monitoring; -// so, no code changes are required. For example, you can monitor application -// logs for specific literal terms (such as "NullReferenceException") or -// count the number of occurrences of a literal term at a particular position -// in log data (such as "404" status codes in an Apache access log). When -// the term you are searching for is found, CloudWatch Logs reports the data -// to a CloudWatch metric that you specify. -// -// * Monitor AWS CloudTrail logged events: You can create alarms in CloudWatch -// and receive notifications of particular API activity as captured by CloudTrail -// and use the notification to perform troubleshooting. -// -// * Archive log data: You can use CloudWatch Logs to store your log data -// in highly durable storage. You can change the log retention setting so -// that any log events older than this setting are automatically deleted. -// The CloudWatch Logs agent makes it easy to quickly send both rotated and -// non-rotated log data off of a host and into the log service. You can then -// access the raw log data when you need it. -// -// See https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28 for more information on this service. -// -// See cloudwatchlogs package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatchlogs/ -// -// Using the Client -// -// To contact Amazon CloudWatch Logs with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon CloudWatch Logs client CloudWatchLogs for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatchlogs/#New -package cloudwatchlogs diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go deleted file mode 100644 index fb8754b55..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudwatchlogs - -const ( - - // ErrCodeDataAlreadyAcceptedException for service response error code - // "DataAlreadyAcceptedException". - // - // The event was already logged. - ErrCodeDataAlreadyAcceptedException = "DataAlreadyAcceptedException" - - // ErrCodeInvalidOperationException for service response error code - // "InvalidOperationException". - // - // The operation is not valid on the specified resource. - ErrCodeInvalidOperationException = "InvalidOperationException" - - // ErrCodeInvalidParameterException for service response error code - // "InvalidParameterException". - // - // A parameter is specified incorrectly. - ErrCodeInvalidParameterException = "InvalidParameterException" - - // ErrCodeInvalidSequenceTokenException for service response error code - // "InvalidSequenceTokenException". - // - // The sequence token is not valid. - ErrCodeInvalidSequenceTokenException = "InvalidSequenceTokenException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // You have reached the maximum number of resources that can be created. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeMalformedQueryException for service response error code - // "MalformedQueryException". - // - // The query string is not valid. Details about this error are displayed in - // a QueryCompileError object. For more information, see . - // - // For more information about valid query syntax, see CloudWatch Logs Insights - // Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). - ErrCodeMalformedQueryException = "MalformedQueryException" - - // ErrCodeOperationAbortedException for service response error code - // "OperationAbortedException". - // - // Multiple requests to update the same resource were in conflict. - ErrCodeOperationAbortedException = "OperationAbortedException" - - // ErrCodeResourceAlreadyExistsException for service response error code - // "ResourceAlreadyExistsException". - // - // The specified resource already exists. - ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The specified resource does not exist. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeServiceUnavailableException for service response error code - // "ServiceUnavailableException". - // - // The service cannot complete the request. - ErrCodeServiceUnavailableException = "ServiceUnavailableException" - - // ErrCodeUnrecognizedClientException for service response error code - // "UnrecognizedClientException". - // - // The most likely cause is an invalid AWS access key ID or secret key. - ErrCodeUnrecognizedClientException = "UnrecognizedClientException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go deleted file mode 100644 index 8d5f929df..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudwatchlogs - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// CloudWatchLogs provides the API operation methods for making requests to -// Amazon CloudWatch Logs. See this package's package overview docs -// for details on the service. -// -// CloudWatchLogs methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CloudWatchLogs 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 = "logs" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "CloudWatch Logs" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CloudWatchLogs client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a CloudWatchLogs client from just a session. -// svc := cloudwatchlogs.New(mySession) -// -// // Create a CloudWatchLogs client with additional configuration -// svc := cloudwatchlogs.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudWatchLogs { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CloudWatchLogs { - svc := &CloudWatchLogs{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-03-28", - JSONVersion: "1.1", - TargetPrefix: "Logs_20140328", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CloudWatchLogs operation and runs any -// custom request initialization. -func (c *CloudWatchLogs) 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/codebuild/api.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go deleted file mode 100644 index 864e7db1b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go +++ /dev/null @@ -1,6313 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package codebuild - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opBatchDeleteBuilds = "BatchDeleteBuilds" - -// BatchDeleteBuildsRequest generates a "aws/request.Request" representing the -// client's request for the BatchDeleteBuilds operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchDeleteBuilds for more information on using the BatchDeleteBuilds -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchDeleteBuildsRequest method. -// req, resp := client.BatchDeleteBuildsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchDeleteBuilds -func (c *CodeBuild) BatchDeleteBuildsRequest(input *BatchDeleteBuildsInput) (req *request.Request, output *BatchDeleteBuildsOutput) { - op := &request.Operation{ - Name: opBatchDeleteBuilds, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchDeleteBuildsInput{} - } - - output = &BatchDeleteBuildsOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchDeleteBuilds API operation for AWS CodeBuild. -// -// Deletes one or more builds. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation BatchDeleteBuilds for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchDeleteBuilds -func (c *CodeBuild) BatchDeleteBuilds(input *BatchDeleteBuildsInput) (*BatchDeleteBuildsOutput, error) { - req, out := c.BatchDeleteBuildsRequest(input) - return out, req.Send() -} - -// BatchDeleteBuildsWithContext is the same as BatchDeleteBuilds with the addition of -// the ability to pass a context and additional request options. -// -// See BatchDeleteBuilds for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) BatchDeleteBuildsWithContext(ctx aws.Context, input *BatchDeleteBuildsInput, opts ...request.Option) (*BatchDeleteBuildsOutput, error) { - req, out := c.BatchDeleteBuildsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchGetBuilds = "BatchGetBuilds" - -// BatchGetBuildsRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetBuilds operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetBuilds for more information on using the BatchGetBuilds -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetBuildsRequest method. -// req, resp := client.BatchGetBuildsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchGetBuilds -func (c *CodeBuild) BatchGetBuildsRequest(input *BatchGetBuildsInput) (req *request.Request, output *BatchGetBuildsOutput) { - op := &request.Operation{ - Name: opBatchGetBuilds, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetBuildsInput{} - } - - output = &BatchGetBuildsOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetBuilds API operation for AWS CodeBuild. -// -// Gets information about builds. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation BatchGetBuilds for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchGetBuilds -func (c *CodeBuild) BatchGetBuilds(input *BatchGetBuildsInput) (*BatchGetBuildsOutput, error) { - req, out := c.BatchGetBuildsRequest(input) - return out, req.Send() -} - -// BatchGetBuildsWithContext is the same as BatchGetBuilds with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetBuilds for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) BatchGetBuildsWithContext(ctx aws.Context, input *BatchGetBuildsInput, opts ...request.Option) (*BatchGetBuildsOutput, error) { - req, out := c.BatchGetBuildsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchGetProjects = "BatchGetProjects" - -// BatchGetProjectsRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetProjects operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetProjects for more information on using the BatchGetProjects -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetProjectsRequest method. -// req, resp := client.BatchGetProjectsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchGetProjects -func (c *CodeBuild) BatchGetProjectsRequest(input *BatchGetProjectsInput) (req *request.Request, output *BatchGetProjectsOutput) { - op := &request.Operation{ - Name: opBatchGetProjects, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetProjectsInput{} - } - - output = &BatchGetProjectsOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetProjects API operation for AWS CodeBuild. -// -// Gets information about build projects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation BatchGetProjects for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchGetProjects -func (c *CodeBuild) BatchGetProjects(input *BatchGetProjectsInput) (*BatchGetProjectsOutput, error) { - req, out := c.BatchGetProjectsRequest(input) - return out, req.Send() -} - -// BatchGetProjectsWithContext is the same as BatchGetProjects with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetProjects for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) BatchGetProjectsWithContext(ctx aws.Context, input *BatchGetProjectsInput, opts ...request.Option) (*BatchGetProjectsOutput, error) { - req, out := c.BatchGetProjectsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateProject = "CreateProject" - -// CreateProjectRequest generates a "aws/request.Request" representing the -// client's request for the CreateProject operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateProject for more information on using the CreateProject -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateProjectRequest method. -// req, resp := client.CreateProjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/CreateProject -func (c *CodeBuild) CreateProjectRequest(input *CreateProjectInput) (req *request.Request, output *CreateProjectOutput) { - op := &request.Operation{ - Name: opCreateProject, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateProjectInput{} - } - - output = &CreateProjectOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateProject API operation for AWS CodeBuild. -// -// Creates a build project. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation CreateProject for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The specified AWS resource cannot be created, because an AWS resource with -// the same settings already exists. -// -// * ErrCodeAccountLimitExceededException "AccountLimitExceededException" -// An AWS service limit was exceeded for the calling AWS account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/CreateProject -func (c *CodeBuild) CreateProject(input *CreateProjectInput) (*CreateProjectOutput, error) { - req, out := c.CreateProjectRequest(input) - return out, req.Send() -} - -// CreateProjectWithContext is the same as CreateProject with the addition of -// the ability to pass a context and additional request options. -// -// See CreateProject for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) CreateProjectWithContext(ctx aws.Context, input *CreateProjectInput, opts ...request.Option) (*CreateProjectOutput, error) { - req, out := c.CreateProjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateWebhook = "CreateWebhook" - -// CreateWebhookRequest generates a "aws/request.Request" representing the -// client's request for the CreateWebhook operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateWebhook for more information on using the CreateWebhook -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateWebhookRequest method. -// req, resp := client.CreateWebhookRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/CreateWebhook -func (c *CodeBuild) CreateWebhookRequest(input *CreateWebhookInput) (req *request.Request, output *CreateWebhookOutput) { - op := &request.Operation{ - Name: opCreateWebhook, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateWebhookInput{} - } - - output = &CreateWebhookOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateWebhook API operation for AWS CodeBuild. -// -// For an existing AWS CodeBuild build project that has its source code stored -// in a GitHub or Bitbucket repository, enables AWS CodeBuild to start rebuilding -// the source code every time a code change is pushed to the repository. -// -// If you enable webhooks for an AWS CodeBuild project, and the project is used -// as a build step in AWS CodePipeline, then two identical builds are created -// for each commit. One build is triggered through webhooks, and one through -// AWS CodePipeline. Because billing is on a per-build basis, you are billed -// for both builds. Therefore, if you are using AWS CodePipeline, we recommend -// that you disable webhooks in AWS CodeBuild. In the AWS CodeBuild console, -// clear the Webhook box. For more information, see step 5 in Change a Build -// Project's Settings (http://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation CreateWebhook for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// * ErrCodeOAuthProviderException "OAuthProviderException" -// There was a problem with the underlying OAuth provider. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The specified AWS resource cannot be created, because an AWS resource with -// the same settings already exists. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified AWS resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/CreateWebhook -func (c *CodeBuild) CreateWebhook(input *CreateWebhookInput) (*CreateWebhookOutput, error) { - req, out := c.CreateWebhookRequest(input) - return out, req.Send() -} - -// CreateWebhookWithContext is the same as CreateWebhook with the addition of -// the ability to pass a context and additional request options. -// -// See CreateWebhook for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) CreateWebhookWithContext(ctx aws.Context, input *CreateWebhookInput, opts ...request.Option) (*CreateWebhookOutput, error) { - req, out := c.CreateWebhookRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteProject = "DeleteProject" - -// DeleteProjectRequest generates a "aws/request.Request" representing the -// client's request for the DeleteProject operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteProject for more information on using the DeleteProject -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteProjectRequest method. -// req, resp := client.DeleteProjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteProject -func (c *CodeBuild) DeleteProjectRequest(input *DeleteProjectInput) (req *request.Request, output *DeleteProjectOutput) { - op := &request.Operation{ - Name: opDeleteProject, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteProjectInput{} - } - - output = &DeleteProjectOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteProject API operation for AWS CodeBuild. -// -// Deletes a build project. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation DeleteProject for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteProject -func (c *CodeBuild) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) { - req, out := c.DeleteProjectRequest(input) - return out, req.Send() -} - -// DeleteProjectWithContext is the same as DeleteProject with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteProject for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) DeleteProjectWithContext(ctx aws.Context, input *DeleteProjectInput, opts ...request.Option) (*DeleteProjectOutput, error) { - req, out := c.DeleteProjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSourceCredentials = "DeleteSourceCredentials" - -// DeleteSourceCredentialsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSourceCredentials operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSourceCredentials for more information on using the DeleteSourceCredentials -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSourceCredentialsRequest method. -// req, resp := client.DeleteSourceCredentialsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteSourceCredentials -func (c *CodeBuild) DeleteSourceCredentialsRequest(input *DeleteSourceCredentialsInput) (req *request.Request, output *DeleteSourceCredentialsOutput) { - op := &request.Operation{ - Name: opDeleteSourceCredentials, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSourceCredentialsInput{} - } - - output = &DeleteSourceCredentialsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteSourceCredentials API operation for AWS CodeBuild. -// -// Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation DeleteSourceCredentials for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified AWS resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteSourceCredentials -func (c *CodeBuild) DeleteSourceCredentials(input *DeleteSourceCredentialsInput) (*DeleteSourceCredentialsOutput, error) { - req, out := c.DeleteSourceCredentialsRequest(input) - return out, req.Send() -} - -// DeleteSourceCredentialsWithContext is the same as DeleteSourceCredentials with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSourceCredentials for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) DeleteSourceCredentialsWithContext(ctx aws.Context, input *DeleteSourceCredentialsInput, opts ...request.Option) (*DeleteSourceCredentialsOutput, error) { - req, out := c.DeleteSourceCredentialsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteWebhook = "DeleteWebhook" - -// DeleteWebhookRequest generates a "aws/request.Request" representing the -// client's request for the DeleteWebhook operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteWebhook for more information on using the DeleteWebhook -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteWebhookRequest method. -// req, resp := client.DeleteWebhookRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteWebhook -func (c *CodeBuild) DeleteWebhookRequest(input *DeleteWebhookInput) (req *request.Request, output *DeleteWebhookOutput) { - op := &request.Operation{ - Name: opDeleteWebhook, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteWebhookInput{} - } - - output = &DeleteWebhookOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteWebhook API operation for AWS CodeBuild. -// -// For an existing AWS CodeBuild build project that has its source code stored -// in a GitHub or Bitbucket repository, stops AWS CodeBuild from rebuilding -// the source code every time a code change is pushed to the repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation DeleteWebhook for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified AWS resource cannot be found. -// -// * ErrCodeOAuthProviderException "OAuthProviderException" -// There was a problem with the underlying OAuth provider. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteWebhook -func (c *CodeBuild) DeleteWebhook(input *DeleteWebhookInput) (*DeleteWebhookOutput, error) { - req, out := c.DeleteWebhookRequest(input) - return out, req.Send() -} - -// DeleteWebhookWithContext is the same as DeleteWebhook with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteWebhook for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) DeleteWebhookWithContext(ctx aws.Context, input *DeleteWebhookInput, opts ...request.Option) (*DeleteWebhookOutput, error) { - req, out := c.DeleteWebhookRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportSourceCredentials = "ImportSourceCredentials" - -// ImportSourceCredentialsRequest generates a "aws/request.Request" representing the -// client's request for the ImportSourceCredentials operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportSourceCredentials for more information on using the ImportSourceCredentials -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportSourceCredentialsRequest method. -// req, resp := client.ImportSourceCredentialsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ImportSourceCredentials -func (c *CodeBuild) ImportSourceCredentialsRequest(input *ImportSourceCredentialsInput) (req *request.Request, output *ImportSourceCredentialsOutput) { - op := &request.Operation{ - Name: opImportSourceCredentials, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportSourceCredentialsInput{} - } - - output = &ImportSourceCredentialsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ImportSourceCredentials API operation for AWS CodeBuild. -// -// Imports the source repository credentials for an AWS CodeBuild project that -// has its source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation ImportSourceCredentials for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// * ErrCodeAccountLimitExceededException "AccountLimitExceededException" -// An AWS service limit was exceeded for the calling AWS account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ImportSourceCredentials -func (c *CodeBuild) ImportSourceCredentials(input *ImportSourceCredentialsInput) (*ImportSourceCredentialsOutput, error) { - req, out := c.ImportSourceCredentialsRequest(input) - return out, req.Send() -} - -// ImportSourceCredentialsWithContext is the same as ImportSourceCredentials with the addition of -// the ability to pass a context and additional request options. -// -// See ImportSourceCredentials for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) ImportSourceCredentialsWithContext(ctx aws.Context, input *ImportSourceCredentialsInput, opts ...request.Option) (*ImportSourceCredentialsOutput, error) { - req, out := c.ImportSourceCredentialsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInvalidateProjectCache = "InvalidateProjectCache" - -// InvalidateProjectCacheRequest generates a "aws/request.Request" representing the -// client's request for the InvalidateProjectCache operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See InvalidateProjectCache for more information on using the InvalidateProjectCache -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the InvalidateProjectCacheRequest method. -// req, resp := client.InvalidateProjectCacheRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/InvalidateProjectCache -func (c *CodeBuild) InvalidateProjectCacheRequest(input *InvalidateProjectCacheInput) (req *request.Request, output *InvalidateProjectCacheOutput) { - op := &request.Operation{ - Name: opInvalidateProjectCache, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InvalidateProjectCacheInput{} - } - - output = &InvalidateProjectCacheOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// InvalidateProjectCache API operation for AWS CodeBuild. -// -// Resets the cache for a project. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation InvalidateProjectCache for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified AWS resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/InvalidateProjectCache -func (c *CodeBuild) InvalidateProjectCache(input *InvalidateProjectCacheInput) (*InvalidateProjectCacheOutput, error) { - req, out := c.InvalidateProjectCacheRequest(input) - return out, req.Send() -} - -// InvalidateProjectCacheWithContext is the same as InvalidateProjectCache with the addition of -// the ability to pass a context and additional request options. -// -// See InvalidateProjectCache for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) InvalidateProjectCacheWithContext(ctx aws.Context, input *InvalidateProjectCacheInput, opts ...request.Option) (*InvalidateProjectCacheOutput, error) { - req, out := c.InvalidateProjectCacheRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListBuilds = "ListBuilds" - -// ListBuildsRequest generates a "aws/request.Request" representing the -// client's request for the ListBuilds operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListBuilds for more information on using the ListBuilds -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListBuildsRequest method. -// req, resp := client.ListBuildsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListBuilds -func (c *CodeBuild) ListBuildsRequest(input *ListBuildsInput) (req *request.Request, output *ListBuildsOutput) { - op := &request.Operation{ - Name: opListBuilds, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListBuildsInput{} - } - - output = &ListBuildsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBuilds API operation for AWS CodeBuild. -// -// Gets a list of build IDs, with each build ID representing a single build. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation ListBuilds for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListBuilds -func (c *CodeBuild) ListBuilds(input *ListBuildsInput) (*ListBuildsOutput, error) { - req, out := c.ListBuildsRequest(input) - return out, req.Send() -} - -// ListBuildsWithContext is the same as ListBuilds with the addition of -// the ability to pass a context and additional request options. -// -// See ListBuilds for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) ListBuildsWithContext(ctx aws.Context, input *ListBuildsInput, opts ...request.Option) (*ListBuildsOutput, error) { - req, out := c.ListBuildsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListBuildsForProject = "ListBuildsForProject" - -// ListBuildsForProjectRequest generates a "aws/request.Request" representing the -// client's request for the ListBuildsForProject operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListBuildsForProject for more information on using the ListBuildsForProject -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListBuildsForProjectRequest method. -// req, resp := client.ListBuildsForProjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListBuildsForProject -func (c *CodeBuild) ListBuildsForProjectRequest(input *ListBuildsForProjectInput) (req *request.Request, output *ListBuildsForProjectOutput) { - op := &request.Operation{ - Name: opListBuildsForProject, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListBuildsForProjectInput{} - } - - output = &ListBuildsForProjectOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBuildsForProject API operation for AWS CodeBuild. -// -// Gets a list of build IDs for the specified build project, with each build -// ID representing a single build. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation ListBuildsForProject for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified AWS resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListBuildsForProject -func (c *CodeBuild) ListBuildsForProject(input *ListBuildsForProjectInput) (*ListBuildsForProjectOutput, error) { - req, out := c.ListBuildsForProjectRequest(input) - return out, req.Send() -} - -// ListBuildsForProjectWithContext is the same as ListBuildsForProject with the addition of -// the ability to pass a context and additional request options. -// -// See ListBuildsForProject for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) ListBuildsForProjectWithContext(ctx aws.Context, input *ListBuildsForProjectInput, opts ...request.Option) (*ListBuildsForProjectOutput, error) { - req, out := c.ListBuildsForProjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListCuratedEnvironmentImages = "ListCuratedEnvironmentImages" - -// ListCuratedEnvironmentImagesRequest generates a "aws/request.Request" representing the -// client's request for the ListCuratedEnvironmentImages operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListCuratedEnvironmentImages for more information on using the ListCuratedEnvironmentImages -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListCuratedEnvironmentImagesRequest method. -// req, resp := client.ListCuratedEnvironmentImagesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListCuratedEnvironmentImages -func (c *CodeBuild) ListCuratedEnvironmentImagesRequest(input *ListCuratedEnvironmentImagesInput) (req *request.Request, output *ListCuratedEnvironmentImagesOutput) { - op := &request.Operation{ - Name: opListCuratedEnvironmentImages, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListCuratedEnvironmentImagesInput{} - } - - output = &ListCuratedEnvironmentImagesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCuratedEnvironmentImages API operation for AWS CodeBuild. -// -// Gets information about Docker images that are managed by AWS CodeBuild. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation ListCuratedEnvironmentImages for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListCuratedEnvironmentImages -func (c *CodeBuild) ListCuratedEnvironmentImages(input *ListCuratedEnvironmentImagesInput) (*ListCuratedEnvironmentImagesOutput, error) { - req, out := c.ListCuratedEnvironmentImagesRequest(input) - return out, req.Send() -} - -// ListCuratedEnvironmentImagesWithContext is the same as ListCuratedEnvironmentImages with the addition of -// the ability to pass a context and additional request options. -// -// See ListCuratedEnvironmentImages for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) ListCuratedEnvironmentImagesWithContext(ctx aws.Context, input *ListCuratedEnvironmentImagesInput, opts ...request.Option) (*ListCuratedEnvironmentImagesOutput, error) { - req, out := c.ListCuratedEnvironmentImagesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListProjects = "ListProjects" - -// ListProjectsRequest generates a "aws/request.Request" representing the -// client's request for the ListProjects operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListProjects for more information on using the ListProjects -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListProjectsRequest method. -// req, resp := client.ListProjectsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListProjects -func (c *CodeBuild) ListProjectsRequest(input *ListProjectsInput) (req *request.Request, output *ListProjectsOutput) { - op := &request.Operation{ - Name: opListProjects, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListProjectsInput{} - } - - output = &ListProjectsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListProjects API operation for AWS CodeBuild. -// -// Gets a list of build project names, with each build project name representing -// a single build project. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation ListProjects for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListProjects -func (c *CodeBuild) ListProjects(input *ListProjectsInput) (*ListProjectsOutput, error) { - req, out := c.ListProjectsRequest(input) - return out, req.Send() -} - -// ListProjectsWithContext is the same as ListProjects with the addition of -// the ability to pass a context and additional request options. -// -// See ListProjects for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) ListProjectsWithContext(ctx aws.Context, input *ListProjectsInput, opts ...request.Option) (*ListProjectsOutput, error) { - req, out := c.ListProjectsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSourceCredentials = "ListSourceCredentials" - -// ListSourceCredentialsRequest generates a "aws/request.Request" representing the -// client's request for the ListSourceCredentials operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSourceCredentials for more information on using the ListSourceCredentials -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSourceCredentialsRequest method. -// req, resp := client.ListSourceCredentialsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListSourceCredentials -func (c *CodeBuild) ListSourceCredentialsRequest(input *ListSourceCredentialsInput) (req *request.Request, output *ListSourceCredentialsOutput) { - op := &request.Operation{ - Name: opListSourceCredentials, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListSourceCredentialsInput{} - } - - output = &ListSourceCredentialsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSourceCredentials API operation for AWS CodeBuild. -// -// Returns a list of SourceCredentialsInfo objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation ListSourceCredentials for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListSourceCredentials -func (c *CodeBuild) ListSourceCredentials(input *ListSourceCredentialsInput) (*ListSourceCredentialsOutput, error) { - req, out := c.ListSourceCredentialsRequest(input) - return out, req.Send() -} - -// ListSourceCredentialsWithContext is the same as ListSourceCredentials with the addition of -// the ability to pass a context and additional request options. -// -// See ListSourceCredentials for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) ListSourceCredentialsWithContext(ctx aws.Context, input *ListSourceCredentialsInput, opts ...request.Option) (*ListSourceCredentialsOutput, error) { - req, out := c.ListSourceCredentialsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartBuild = "StartBuild" - -// StartBuildRequest generates a "aws/request.Request" representing the -// client's request for the StartBuild operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartBuild for more information on using the StartBuild -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartBuildRequest method. -// req, resp := client.StartBuildRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/StartBuild -func (c *CodeBuild) StartBuildRequest(input *StartBuildInput) (req *request.Request, output *StartBuildOutput) { - op := &request.Operation{ - Name: opStartBuild, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartBuildInput{} - } - - output = &StartBuildOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartBuild API operation for AWS CodeBuild. -// -// Starts running a build. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation StartBuild for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified AWS resource cannot be found. -// -// * ErrCodeAccountLimitExceededException "AccountLimitExceededException" -// An AWS service limit was exceeded for the calling AWS account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/StartBuild -func (c *CodeBuild) StartBuild(input *StartBuildInput) (*StartBuildOutput, error) { - req, out := c.StartBuildRequest(input) - return out, req.Send() -} - -// StartBuildWithContext is the same as StartBuild with the addition of -// the ability to pass a context and additional request options. -// -// See StartBuild for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) StartBuildWithContext(ctx aws.Context, input *StartBuildInput, opts ...request.Option) (*StartBuildOutput, error) { - req, out := c.StartBuildRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopBuild = "StopBuild" - -// StopBuildRequest generates a "aws/request.Request" representing the -// client's request for the StopBuild operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopBuild for more information on using the StopBuild -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopBuildRequest method. -// req, resp := client.StopBuildRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/StopBuild -func (c *CodeBuild) StopBuildRequest(input *StopBuildInput) (req *request.Request, output *StopBuildOutput) { - op := &request.Operation{ - Name: opStopBuild, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopBuildInput{} - } - - output = &StopBuildOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopBuild API operation for AWS CodeBuild. -// -// Attempts to stop running a build. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation StopBuild for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified AWS resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/StopBuild -func (c *CodeBuild) StopBuild(input *StopBuildInput) (*StopBuildOutput, error) { - req, out := c.StopBuildRequest(input) - return out, req.Send() -} - -// StopBuildWithContext is the same as StopBuild with the addition of -// the ability to pass a context and additional request options. -// -// See StopBuild for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) StopBuildWithContext(ctx aws.Context, input *StopBuildInput, opts ...request.Option) (*StopBuildOutput, error) { - req, out := c.StopBuildRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateProject = "UpdateProject" - -// UpdateProjectRequest generates a "aws/request.Request" representing the -// client's request for the UpdateProject operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateProject for more information on using the UpdateProject -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateProjectRequest method. -// req, resp := client.UpdateProjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/UpdateProject -func (c *CodeBuild) UpdateProjectRequest(input *UpdateProjectInput) (req *request.Request, output *UpdateProjectOutput) { - op := &request.Operation{ - Name: opUpdateProject, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateProjectInput{} - } - - output = &UpdateProjectOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateProject API operation for AWS CodeBuild. -// -// Changes the settings of a build project. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation UpdateProject for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified AWS resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/UpdateProject -func (c *CodeBuild) UpdateProject(input *UpdateProjectInput) (*UpdateProjectOutput, error) { - req, out := c.UpdateProjectRequest(input) - return out, req.Send() -} - -// UpdateProjectWithContext is the same as UpdateProject with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateProject for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) UpdateProjectWithContext(ctx aws.Context, input *UpdateProjectInput, opts ...request.Option) (*UpdateProjectOutput, error) { - req, out := c.UpdateProjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateWebhook = "UpdateWebhook" - -// UpdateWebhookRequest generates a "aws/request.Request" representing the -// client's request for the UpdateWebhook operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateWebhook for more information on using the UpdateWebhook -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateWebhookRequest method. -// req, resp := client.UpdateWebhookRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/UpdateWebhook -func (c *CodeBuild) UpdateWebhookRequest(input *UpdateWebhookInput) (req *request.Request, output *UpdateWebhookOutput) { - op := &request.Operation{ - Name: opUpdateWebhook, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateWebhookInput{} - } - - output = &UpdateWebhookOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateWebhook API operation for AWS CodeBuild. -// -// Updates the webhook associated with an AWS CodeBuild build project. -// -// If you use Bitbucket for your repository, rotateSecret is ignored. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeBuild's -// API operation UpdateWebhook for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input value that was provided is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified AWS resource cannot be found. -// -// * ErrCodeOAuthProviderException "OAuthProviderException" -// There was a problem with the underlying OAuth provider. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/UpdateWebhook -func (c *CodeBuild) UpdateWebhook(input *UpdateWebhookInput) (*UpdateWebhookOutput, error) { - req, out := c.UpdateWebhookRequest(input) - return out, req.Send() -} - -// UpdateWebhookWithContext is the same as UpdateWebhook with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateWebhook for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeBuild) UpdateWebhookWithContext(ctx aws.Context, input *UpdateWebhookInput, opts ...request.Option) (*UpdateWebhookOutput, error) { - req, out := c.UpdateWebhookRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type BatchDeleteBuildsInput struct { - _ struct{} `type:"structure"` - - // The IDs of the builds to delete. - // - // Ids is a required field - Ids []*string `locationName:"ids" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchDeleteBuildsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteBuildsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchDeleteBuildsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchDeleteBuildsInput"} - if s.Ids == nil { - invalidParams.Add(request.NewErrParamRequired("Ids")) - } - if s.Ids != nil && len(s.Ids) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Ids", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIds sets the Ids field's value. -func (s *BatchDeleteBuildsInput) SetIds(v []*string) *BatchDeleteBuildsInput { - s.Ids = v - return s -} - -type BatchDeleteBuildsOutput struct { - _ struct{} `type:"structure"` - - // The IDs of the builds that were successfully deleted. - BuildsDeleted []*string `locationName:"buildsDeleted" min:"1" type:"list"` - - // Information about any builds that could not be successfully deleted. - BuildsNotDeleted []*BuildNotDeleted `locationName:"buildsNotDeleted" type:"list"` -} - -// String returns the string representation -func (s BatchDeleteBuildsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteBuildsOutput) GoString() string { - return s.String() -} - -// SetBuildsDeleted sets the BuildsDeleted field's value. -func (s *BatchDeleteBuildsOutput) SetBuildsDeleted(v []*string) *BatchDeleteBuildsOutput { - s.BuildsDeleted = v - return s -} - -// SetBuildsNotDeleted sets the BuildsNotDeleted field's value. -func (s *BatchDeleteBuildsOutput) SetBuildsNotDeleted(v []*BuildNotDeleted) *BatchDeleteBuildsOutput { - s.BuildsNotDeleted = v - return s -} - -type BatchGetBuildsInput struct { - _ struct{} `type:"structure"` - - // The IDs of the builds. - // - // Ids is a required field - Ids []*string `locationName:"ids" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchGetBuildsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetBuildsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetBuildsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetBuildsInput"} - if s.Ids == nil { - invalidParams.Add(request.NewErrParamRequired("Ids")) - } - if s.Ids != nil && len(s.Ids) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Ids", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIds sets the Ids field's value. -func (s *BatchGetBuildsInput) SetIds(v []*string) *BatchGetBuildsInput { - s.Ids = v - return s -} - -type BatchGetBuildsOutput struct { - _ struct{} `type:"structure"` - - // Information about the requested builds. - Builds []*Build `locationName:"builds" type:"list"` - - // The IDs of builds for which information could not be found. - BuildsNotFound []*string `locationName:"buildsNotFound" min:"1" type:"list"` -} - -// String returns the string representation -func (s BatchGetBuildsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetBuildsOutput) GoString() string { - return s.String() -} - -// SetBuilds sets the Builds field's value. -func (s *BatchGetBuildsOutput) SetBuilds(v []*Build) *BatchGetBuildsOutput { - s.Builds = v - return s -} - -// SetBuildsNotFound sets the BuildsNotFound field's value. -func (s *BatchGetBuildsOutput) SetBuildsNotFound(v []*string) *BatchGetBuildsOutput { - s.BuildsNotFound = v - return s -} - -type BatchGetProjectsInput struct { - _ struct{} `type:"structure"` - - // The names of the build projects. - // - // Names is a required field - Names []*string `locationName:"names" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchGetProjectsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetProjectsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetProjectsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetProjectsInput"} - if s.Names == nil { - invalidParams.Add(request.NewErrParamRequired("Names")) - } - if s.Names != nil && len(s.Names) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Names", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNames sets the Names field's value. -func (s *BatchGetProjectsInput) SetNames(v []*string) *BatchGetProjectsInput { - s.Names = v - return s -} - -type BatchGetProjectsOutput struct { - _ struct{} `type:"structure"` - - // Information about the requested build projects. - Projects []*Project `locationName:"projects" type:"list"` - - // The names of build projects for which information could not be found. - ProjectsNotFound []*string `locationName:"projectsNotFound" min:"1" type:"list"` -} - -// String returns the string representation -func (s BatchGetProjectsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetProjectsOutput) GoString() string { - return s.String() -} - -// SetProjects sets the Projects field's value. -func (s *BatchGetProjectsOutput) SetProjects(v []*Project) *BatchGetProjectsOutput { - s.Projects = v - return s -} - -// SetProjectsNotFound sets the ProjectsNotFound field's value. -func (s *BatchGetProjectsOutput) SetProjectsNotFound(v []*string) *BatchGetProjectsOutput { - s.ProjectsNotFound = v - return s -} - -// Information about a build. -type Build struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the build. - Arn *string `locationName:"arn" min:"1" type:"string"` - - // Information about the output artifacts for the build. - Artifacts *BuildArtifacts `locationName:"artifacts" type:"structure"` - - // Whether the build is complete. True if complete; otherwise, false. - BuildComplete *bool `locationName:"buildComplete" type:"boolean"` - - // The current status of the build. Valid values include: - // - // * FAILED: The build failed. - // - // * FAULT: The build faulted. - // - // * IN_PROGRESS: The build is still in progress. - // - // * STOPPED: The build stopped. - // - // * SUCCEEDED: The build succeeded. - // - // * TIMED_OUT: The build timed out. - BuildStatus *string `locationName:"buildStatus" type:"string" enum:"StatusType"` - - // Information about the cache for the build. - Cache *ProjectCache `locationName:"cache" type:"structure"` - - // The current build phase. - CurrentPhase *string `locationName:"currentPhase" type:"string"` - - // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be - // used for encrypting the build output artifacts. - // - // This is expressed either as the Amazon Resource Name (ARN) of the CMK or, - // if specified, the CMK's alias (using the format alias/alias-name). - EncryptionKey *string `locationName:"encryptionKey" min:"1" type:"string"` - - // When the build process ended, expressed in Unix time format. - EndTime *time.Time `locationName:"endTime" type:"timestamp"` - - // Information about the build environment for this build. - Environment *ProjectEnvironment `locationName:"environment" type:"structure"` - - // The unique ID for the build. - Id *string `locationName:"id" min:"1" type:"string"` - - // The entity that started the build. Valid values include: - // - // * If AWS CodePipeline started the build, the pipeline's name (for example, - // codepipeline/my-demo-pipeline). - // - // * If an AWS Identity and Access Management (IAM) user started the build, - // the user's name (for example, MyUserName). - // - // * If the Jenkins plugin for AWS CodeBuild started the build, the string - // CodeBuild-Jenkins-Plugin. - Initiator *string `locationName:"initiator" type:"string"` - - // Information about the build's logs in Amazon CloudWatch Logs. - Logs *LogsLocation `locationName:"logs" type:"structure"` - - // Describes a network interface. - NetworkInterface *NetworkInterface `locationName:"networkInterface" type:"structure"` - - // Information about all previous build phases that are complete and information - // about any current build phase that is not yet complete. - Phases []*BuildPhase `locationName:"phases" type:"list"` - - // The name of the AWS CodeBuild project. - ProjectName *string `locationName:"projectName" min:"1" type:"string"` - - // The number of minutes a build is allowed to be queued before it times out. - QueuedTimeoutInMinutes *int64 `locationName:"queuedTimeoutInMinutes" type:"integer"` - - // An identifier for the version of this build's source code. - // - // * For AWS CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit - // ID. - // - // * For AWS CodePipeline, the source revision provided by AWS CodePipeline. - // - // - // * For Amazon Simple Storage Service (Amazon S3), this does not apply. - ResolvedSourceVersion *string `locationName:"resolvedSourceVersion" min:"1" type:"string"` - - // An array of ProjectArtifacts objects. - SecondaryArtifacts []*BuildArtifacts `locationName:"secondaryArtifacts" type:"list"` - - // An array of ProjectSourceVersion objects. Each ProjectSourceVersion must - // be one of: - // - // * For AWS CodeCommit: the commit ID to use. - // - // * For GitHub: the commit ID, pull request ID, branch name, or tag name - // that corresponds to the version of the source code you want to build. - // If a pull request ID is specified, it must use the format pr/pull-request-ID - // (for example, pr/25). If a branch name is specified, the branch's HEAD - // commit ID is used. If not specified, the default branch's HEAD commit - // ID is used. - // - // * For Bitbucket: the commit ID, branch name, or tag name that corresponds - // to the version of the source code you want to build. If a branch name - // is specified, the branch's HEAD commit ID is used. If not specified, the - // default branch's HEAD commit ID is used. - // - // * For Amazon Simple Storage Service (Amazon S3): the version ID of the - // object that represents the build input ZIP file to use. - SecondarySourceVersions []*ProjectSourceVersion `locationName:"secondarySourceVersions" type:"list"` - - // An array of ProjectSource objects. - SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"` - - // The name of a service role used for this build. - ServiceRole *string `locationName:"serviceRole" min:"1" type:"string"` - - // Information about the source code to be built. - Source *ProjectSource `locationName:"source" type:"structure"` - - // Any version identifier for the version of the source code to be built. - SourceVersion *string `locationName:"sourceVersion" min:"1" type:"string"` - - // When the build process started, expressed in Unix time format. - StartTime *time.Time `locationName:"startTime" type:"timestamp"` - - // How long, in minutes, for AWS CodeBuild to wait before timing out this build - // if it does not get marked as completed. - TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" type:"integer"` - - // If your AWS CodeBuild project accesses resources in an Amazon VPC, you provide - // this parameter that identifies the VPC ID and the list of security group - // IDs and subnet IDs. The security groups and subnets must belong to the same - // VPC. You must provide at least one security group and one subnet ID. - VpcConfig *VpcConfig `locationName:"vpcConfig" type:"structure"` -} - -// String returns the string representation -func (s Build) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Build) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Build) SetArn(v string) *Build { - s.Arn = &v - return s -} - -// SetArtifacts sets the Artifacts field's value. -func (s *Build) SetArtifacts(v *BuildArtifacts) *Build { - s.Artifacts = v - return s -} - -// SetBuildComplete sets the BuildComplete field's value. -func (s *Build) SetBuildComplete(v bool) *Build { - s.BuildComplete = &v - return s -} - -// SetBuildStatus sets the BuildStatus field's value. -func (s *Build) SetBuildStatus(v string) *Build { - s.BuildStatus = &v - return s -} - -// SetCache sets the Cache field's value. -func (s *Build) SetCache(v *ProjectCache) *Build { - s.Cache = v - return s -} - -// SetCurrentPhase sets the CurrentPhase field's value. -func (s *Build) SetCurrentPhase(v string) *Build { - s.CurrentPhase = &v - return s -} - -// SetEncryptionKey sets the EncryptionKey field's value. -func (s *Build) SetEncryptionKey(v string) *Build { - s.EncryptionKey = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *Build) SetEndTime(v time.Time) *Build { - s.EndTime = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *Build) SetEnvironment(v *ProjectEnvironment) *Build { - s.Environment = v - return s -} - -// SetId sets the Id field's value. -func (s *Build) SetId(v string) *Build { - s.Id = &v - return s -} - -// SetInitiator sets the Initiator field's value. -func (s *Build) SetInitiator(v string) *Build { - s.Initiator = &v - return s -} - -// SetLogs sets the Logs field's value. -func (s *Build) SetLogs(v *LogsLocation) *Build { - s.Logs = v - return s -} - -// SetNetworkInterface sets the NetworkInterface field's value. -func (s *Build) SetNetworkInterface(v *NetworkInterface) *Build { - s.NetworkInterface = v - return s -} - -// SetPhases sets the Phases field's value. -func (s *Build) SetPhases(v []*BuildPhase) *Build { - s.Phases = v - return s -} - -// SetProjectName sets the ProjectName field's value. -func (s *Build) SetProjectName(v string) *Build { - s.ProjectName = &v - return s -} - -// SetQueuedTimeoutInMinutes sets the QueuedTimeoutInMinutes field's value. -func (s *Build) SetQueuedTimeoutInMinutes(v int64) *Build { - s.QueuedTimeoutInMinutes = &v - return s -} - -// SetResolvedSourceVersion sets the ResolvedSourceVersion field's value. -func (s *Build) SetResolvedSourceVersion(v string) *Build { - s.ResolvedSourceVersion = &v - return s -} - -// SetSecondaryArtifacts sets the SecondaryArtifacts field's value. -func (s *Build) SetSecondaryArtifacts(v []*BuildArtifacts) *Build { - s.SecondaryArtifacts = v - return s -} - -// SetSecondarySourceVersions sets the SecondarySourceVersions field's value. -func (s *Build) SetSecondarySourceVersions(v []*ProjectSourceVersion) *Build { - s.SecondarySourceVersions = v - return s -} - -// SetSecondarySources sets the SecondarySources field's value. -func (s *Build) SetSecondarySources(v []*ProjectSource) *Build { - s.SecondarySources = v - return s -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *Build) SetServiceRole(v string) *Build { - s.ServiceRole = &v - return s -} - -// SetSource sets the Source field's value. -func (s *Build) SetSource(v *ProjectSource) *Build { - s.Source = v - return s -} - -// SetSourceVersion sets the SourceVersion field's value. -func (s *Build) SetSourceVersion(v string) *Build { - s.SourceVersion = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *Build) SetStartTime(v time.Time) *Build { - s.StartTime = &v - return s -} - -// SetTimeoutInMinutes sets the TimeoutInMinutes field's value. -func (s *Build) SetTimeoutInMinutes(v int64) *Build { - s.TimeoutInMinutes = &v - return s -} - -// SetVpcConfig sets the VpcConfig field's value. -func (s *Build) SetVpcConfig(v *VpcConfig) *Build { - s.VpcConfig = v - return s -} - -// Information about build output artifacts. -type BuildArtifacts struct { - _ struct{} `type:"structure"` - - // An identifier for this artifact definition. - ArtifactIdentifier *string `locationName:"artifactIdentifier" type:"string"` - - // Information that tells you if encryption for build artifacts is disabled. - EncryptionDisabled *bool `locationName:"encryptionDisabled" type:"boolean"` - - // Information about the location of the build artifacts. - Location *string `locationName:"location" type:"string"` - - // The MD5 hash of the build artifact. - // - // You can use this hash along with a checksum tool to confirm file integrity - // and authenticity. - // - // This value is available only if the build project's packaging value is set - // to ZIP. - Md5sum *string `locationName:"md5sum" type:"string"` - - // If this flag is set, a name specified in the build spec file overrides the - // artifact name. The name specified in a build spec file is calculated at build - // time and uses the Shell Command Language. For example, you can append a date - // and time to your artifact name so that it is always unique. - OverrideArtifactName *bool `locationName:"overrideArtifactName" type:"boolean"` - - // The SHA-256 hash of the build artifact. - // - // You can use this hash along with a checksum tool to confirm file integrity - // and authenticity. - // - // This value is available only if the build project's packaging value is set - // to ZIP. - Sha256sum *string `locationName:"sha256sum" type:"string"` -} - -// String returns the string representation -func (s BuildArtifacts) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BuildArtifacts) GoString() string { - return s.String() -} - -// SetArtifactIdentifier sets the ArtifactIdentifier field's value. -func (s *BuildArtifacts) SetArtifactIdentifier(v string) *BuildArtifacts { - s.ArtifactIdentifier = &v - return s -} - -// SetEncryptionDisabled sets the EncryptionDisabled field's value. -func (s *BuildArtifacts) SetEncryptionDisabled(v bool) *BuildArtifacts { - s.EncryptionDisabled = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *BuildArtifacts) SetLocation(v string) *BuildArtifacts { - s.Location = &v - return s -} - -// SetMd5sum sets the Md5sum field's value. -func (s *BuildArtifacts) SetMd5sum(v string) *BuildArtifacts { - s.Md5sum = &v - return s -} - -// SetOverrideArtifactName sets the OverrideArtifactName field's value. -func (s *BuildArtifacts) SetOverrideArtifactName(v bool) *BuildArtifacts { - s.OverrideArtifactName = &v - return s -} - -// SetSha256sum sets the Sha256sum field's value. -func (s *BuildArtifacts) SetSha256sum(v string) *BuildArtifacts { - s.Sha256sum = &v - return s -} - -// Information about a build that could not be successfully deleted. -type BuildNotDeleted struct { - _ struct{} `type:"structure"` - - // The ID of the build that could not be successfully deleted. - Id *string `locationName:"id" min:"1" type:"string"` - - // Additional information about the build that could not be successfully deleted. - StatusCode *string `locationName:"statusCode" type:"string"` -} - -// String returns the string representation -func (s BuildNotDeleted) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BuildNotDeleted) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *BuildNotDeleted) SetId(v string) *BuildNotDeleted { - s.Id = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *BuildNotDeleted) SetStatusCode(v string) *BuildNotDeleted { - s.StatusCode = &v - return s -} - -// Information about a stage for a build. -type BuildPhase struct { - _ struct{} `type:"structure"` - - // Additional information about a build phase, especially to help troubleshoot - // a failed build. - Contexts []*PhaseContext `locationName:"contexts" type:"list"` - - // How long, in seconds, between the starting and ending times of the build's - // phase. - DurationInSeconds *int64 `locationName:"durationInSeconds" type:"long"` - - // When the build phase ended, expressed in Unix time format. - EndTime *time.Time `locationName:"endTime" type:"timestamp"` - - // The current status of the build phase. Valid values include: - // - // * FAILED: The build phase failed. - // - // * FAULT: The build phase faulted. - // - // * IN_PROGRESS: The build phase is still in progress. - // - // * QUEUED: The build has been submitted and is queued behind other submitted - // builds. - // - // * STOPPED: The build phase stopped. - // - // * SUCCEEDED: The build phase succeeded. - // - // * TIMED_OUT: The build phase timed out. - PhaseStatus *string `locationName:"phaseStatus" type:"string" enum:"StatusType"` - - // The name of the build phase. Valid values include: - // - // * BUILD: Core build activities typically occur in this build phase. - // - // * COMPLETED: The build has been completed. - // - // * DOWNLOAD_SOURCE: Source code is being downloaded in this build phase. - // - // * FINALIZING: The build process is completing in this build phase. - // - // * INSTALL: Installation activities typically occur in this build phase. - // - // * POST_BUILD: Post-build activities typically occur in this build phase. - // - // * PRE_BUILD: Pre-build activities typically occur in this build phase. - // - // * PROVISIONING: The build environment is being set up. - // - // * QUEUED: The build has been submitted and is queued behind other submitted - // builds. - // - // * SUBMITTED: The build has been submitted. - // - // * UPLOAD_ARTIFACTS: Build output artifacts are being uploaded to the output - // location. - PhaseType *string `locationName:"phaseType" type:"string" enum:"BuildPhaseType"` - - // When the build phase started, expressed in Unix time format. - StartTime *time.Time `locationName:"startTime" type:"timestamp"` -} - -// String returns the string representation -func (s BuildPhase) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BuildPhase) GoString() string { - return s.String() -} - -// SetContexts sets the Contexts field's value. -func (s *BuildPhase) SetContexts(v []*PhaseContext) *BuildPhase { - s.Contexts = v - return s -} - -// SetDurationInSeconds sets the DurationInSeconds field's value. -func (s *BuildPhase) SetDurationInSeconds(v int64) *BuildPhase { - s.DurationInSeconds = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *BuildPhase) SetEndTime(v time.Time) *BuildPhase { - s.EndTime = &v - return s -} - -// SetPhaseStatus sets the PhaseStatus field's value. -func (s *BuildPhase) SetPhaseStatus(v string) *BuildPhase { - s.PhaseStatus = &v - return s -} - -// SetPhaseType sets the PhaseType field's value. -func (s *BuildPhase) SetPhaseType(v string) *BuildPhase { - s.PhaseType = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *BuildPhase) SetStartTime(v time.Time) *BuildPhase { - s.StartTime = &v - return s -} - -// Information about Amazon CloudWatch Logs for a build project. -type CloudWatchLogsConfig struct { - _ struct{} `type:"structure"` - - // The group name of the logs in Amazon CloudWatch Logs. For more information, - // see Working with Log Groups and Log Streams (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html). - GroupName *string `locationName:"groupName" type:"string"` - - // The current status of the logs in Amazon CloudWatch Logs for a build project. - // Valid values are: - // - // * ENABLED: Amazon CloudWatch Logs are enabled for this build project. - // - // * DISABLED: Amazon CloudWatch Logs are not enabled for this build project. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"LogsConfigStatusType"` - - // The prefix of the stream name of the Amazon CloudWatch Logs. For more information, - // see Working with Log Groups and Log Streams (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html). - StreamName *string `locationName:"streamName" type:"string"` -} - -// String returns the string representation -func (s CloudWatchLogsConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudWatchLogsConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CloudWatchLogsConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloudWatchLogsConfig"} - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *CloudWatchLogsConfig) SetGroupName(v string) *CloudWatchLogsConfig { - s.GroupName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CloudWatchLogsConfig) SetStatus(v string) *CloudWatchLogsConfig { - s.Status = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *CloudWatchLogsConfig) SetStreamName(v string) *CloudWatchLogsConfig { - s.StreamName = &v - return s -} - -type CreateProjectInput struct { - _ struct{} `type:"structure"` - - // Information about the build output artifacts for the build project. - // - // Artifacts is a required field - Artifacts *ProjectArtifacts `locationName:"artifacts" type:"structure" required:"true"` - - // Set this to true to generate a publicly accessible URL for your project's - // build badge. - BadgeEnabled *bool `locationName:"badgeEnabled" type:"boolean"` - - // Stores recently used information so that it can be quickly accessed at a - // later time. - Cache *ProjectCache `locationName:"cache" type:"structure"` - - // A description that makes the build project easy to identify. - Description *string `locationName:"description" type:"string"` - - // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be - // used for encrypting the build output artifacts. - // - // You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, - // the CMK's alias (using the format alias/alias-name). - EncryptionKey *string `locationName:"encryptionKey" min:"1" type:"string"` - - // Information about the build environment for the build project. - // - // Environment is a required field - Environment *ProjectEnvironment `locationName:"environment" type:"structure" required:"true"` - - // Information about logs for the build project. These can be logs in Amazon - // CloudWatch Logs, logs uploaded to a specified S3 bucket, or both. - LogsConfig *LogsConfig `locationName:"logsConfig" type:"structure"` - - // The name of the build project. - // - // Name is a required field - Name *string `locationName:"name" min:"2" type:"string" required:"true"` - - // The number of minutes a build is allowed to be queued before it times out. - QueuedTimeoutInMinutes *int64 `locationName:"queuedTimeoutInMinutes" min:"5" type:"integer"` - - // An array of ProjectArtifacts objects. - SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"` - - // An array of ProjectSource objects. - SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"` - - // The ARN of the AWS Identity and Access Management (IAM) role that enables - // AWS CodeBuild to interact with dependent AWS services on behalf of the AWS - // account. - // - // ServiceRole is a required field - ServiceRole *string `locationName:"serviceRole" min:"1" type:"string" required:"true"` - - // Information about the build input source code for the build project. - // - // Source is a required field - Source *ProjectSource `locationName:"source" type:"structure" required:"true"` - - // A set of tags for this build project. - // - // These tags are available for use by AWS services that support AWS CodeBuild - // build project tags. - Tags []*Tag `locationName:"tags" type:"list"` - - // How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait - // before it times out any build that has not been marked as completed. The - // default is 60 minutes. - TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"5" type:"integer"` - - // VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC. - VpcConfig *VpcConfig `locationName:"vpcConfig" type:"structure"` -} - -// String returns the string representation -func (s CreateProjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateProjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateProjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateProjectInput"} - if s.Artifacts == nil { - invalidParams.Add(request.NewErrParamRequired("Artifacts")) - } - if s.EncryptionKey != nil && len(*s.EncryptionKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EncryptionKey", 1)) - } - if s.Environment == nil { - invalidParams.Add(request.NewErrParamRequired("Environment")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 2 { - invalidParams.Add(request.NewErrParamMinLen("Name", 2)) - } - if s.QueuedTimeoutInMinutes != nil && *s.QueuedTimeoutInMinutes < 5 { - invalidParams.Add(request.NewErrParamMinValue("QueuedTimeoutInMinutes", 5)) - } - if s.ServiceRole == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceRole")) - } - if s.ServiceRole != nil && len(*s.ServiceRole) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceRole", 1)) - } - if s.Source == nil { - invalidParams.Add(request.NewErrParamRequired("Source")) - } - if s.TimeoutInMinutes != nil && *s.TimeoutInMinutes < 5 { - invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutes", 5)) - } - if s.Artifacts != nil { - if err := s.Artifacts.Validate(); err != nil { - invalidParams.AddNested("Artifacts", err.(request.ErrInvalidParams)) - } - } - if s.Cache != nil { - if err := s.Cache.Validate(); err != nil { - invalidParams.AddNested("Cache", err.(request.ErrInvalidParams)) - } - } - if s.Environment != nil { - if err := s.Environment.Validate(); err != nil { - invalidParams.AddNested("Environment", err.(request.ErrInvalidParams)) - } - } - if s.LogsConfig != nil { - if err := s.LogsConfig.Validate(); err != nil { - invalidParams.AddNested("LogsConfig", err.(request.ErrInvalidParams)) - } - } - if s.SecondaryArtifacts != nil { - for i, v := range s.SecondaryArtifacts { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondaryArtifacts", i), err.(request.ErrInvalidParams)) - } - } - } - if s.SecondarySources != nil { - for i, v := range s.SecondarySources { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySources", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Source != nil { - if err := s.Source.Validate(); err != nil { - invalidParams.AddNested("Source", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - if s.VpcConfig != nil { - if err := s.VpcConfig.Validate(); err != nil { - invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArtifacts sets the Artifacts field's value. -func (s *CreateProjectInput) SetArtifacts(v *ProjectArtifacts) *CreateProjectInput { - s.Artifacts = v - return s -} - -// SetBadgeEnabled sets the BadgeEnabled field's value. -func (s *CreateProjectInput) SetBadgeEnabled(v bool) *CreateProjectInput { - s.BadgeEnabled = &v - return s -} - -// SetCache sets the Cache field's value. -func (s *CreateProjectInput) SetCache(v *ProjectCache) *CreateProjectInput { - s.Cache = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateProjectInput) SetDescription(v string) *CreateProjectInput { - s.Description = &v - return s -} - -// SetEncryptionKey sets the EncryptionKey field's value. -func (s *CreateProjectInput) SetEncryptionKey(v string) *CreateProjectInput { - s.EncryptionKey = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *CreateProjectInput) SetEnvironment(v *ProjectEnvironment) *CreateProjectInput { - s.Environment = v - return s -} - -// SetLogsConfig sets the LogsConfig field's value. -func (s *CreateProjectInput) SetLogsConfig(v *LogsConfig) *CreateProjectInput { - s.LogsConfig = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateProjectInput) SetName(v string) *CreateProjectInput { - s.Name = &v - return s -} - -// SetQueuedTimeoutInMinutes sets the QueuedTimeoutInMinutes field's value. -func (s *CreateProjectInput) SetQueuedTimeoutInMinutes(v int64) *CreateProjectInput { - s.QueuedTimeoutInMinutes = &v - return s -} - -// SetSecondaryArtifacts sets the SecondaryArtifacts field's value. -func (s *CreateProjectInput) SetSecondaryArtifacts(v []*ProjectArtifacts) *CreateProjectInput { - s.SecondaryArtifacts = v - return s -} - -// SetSecondarySources sets the SecondarySources field's value. -func (s *CreateProjectInput) SetSecondarySources(v []*ProjectSource) *CreateProjectInput { - s.SecondarySources = v - return s -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *CreateProjectInput) SetServiceRole(v string) *CreateProjectInput { - s.ServiceRole = &v - return s -} - -// SetSource sets the Source field's value. -func (s *CreateProjectInput) SetSource(v *ProjectSource) *CreateProjectInput { - s.Source = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateProjectInput) SetTags(v []*Tag) *CreateProjectInput { - s.Tags = v - return s -} - -// SetTimeoutInMinutes sets the TimeoutInMinutes field's value. -func (s *CreateProjectInput) SetTimeoutInMinutes(v int64) *CreateProjectInput { - s.TimeoutInMinutes = &v - return s -} - -// SetVpcConfig sets the VpcConfig field's value. -func (s *CreateProjectInput) SetVpcConfig(v *VpcConfig) *CreateProjectInput { - s.VpcConfig = v - return s -} - -type CreateProjectOutput struct { - _ struct{} `type:"structure"` - - // Information about the build project that was created. - Project *Project `locationName:"project" type:"structure"` -} - -// String returns the string representation -func (s CreateProjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateProjectOutput) GoString() string { - return s.String() -} - -// SetProject sets the Project field's value. -func (s *CreateProjectOutput) SetProject(v *Project) *CreateProjectOutput { - s.Project = v - return s -} - -type CreateWebhookInput struct { - _ struct{} `type:"structure"` - - // A regular expression used to determine which repository branches are built - // when a webhook is triggered. If the name of a branch matches the regular - // expression, then it is built. If branchFilter is empty, then all branches - // are built. - BranchFilter *string `locationName:"branchFilter" type:"string"` - - // The name of the AWS CodeBuild project. - // - // ProjectName is a required field - ProjectName *string `locationName:"projectName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateWebhookInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateWebhookInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateWebhookInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateWebhookInput"} - if s.ProjectName == nil { - invalidParams.Add(request.NewErrParamRequired("ProjectName")) - } - if s.ProjectName != nil && len(*s.ProjectName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("ProjectName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBranchFilter sets the BranchFilter field's value. -func (s *CreateWebhookInput) SetBranchFilter(v string) *CreateWebhookInput { - s.BranchFilter = &v - return s -} - -// SetProjectName sets the ProjectName field's value. -func (s *CreateWebhookInput) SetProjectName(v string) *CreateWebhookInput { - s.ProjectName = &v - return s -} - -type CreateWebhookOutput struct { - _ struct{} `type:"structure"` - - // Information about a webhook that connects repository events to a build project - // in AWS CodeBuild. - Webhook *Webhook `locationName:"webhook" type:"structure"` -} - -// String returns the string representation -func (s CreateWebhookOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateWebhookOutput) GoString() string { - return s.String() -} - -// SetWebhook sets the Webhook field's value. -func (s *CreateWebhookOutput) SetWebhook(v *Webhook) *CreateWebhookOutput { - s.Webhook = v - return s -} - -type DeleteProjectInput struct { - _ struct{} `type:"structure"` - - // The name of the build project. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteProjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteProjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteProjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteProjectInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteProjectInput) SetName(v string) *DeleteProjectInput { - s.Name = &v - return s -} - -type DeleteProjectOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteProjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteProjectOutput) GoString() string { - return s.String() -} - -type DeleteSourceCredentialsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the token. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSourceCredentialsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSourceCredentialsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSourceCredentialsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSourceCredentialsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *DeleteSourceCredentialsInput) SetArn(v string) *DeleteSourceCredentialsInput { - s.Arn = &v - return s -} - -type DeleteSourceCredentialsOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the token. - Arn *string `locationName:"arn" min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteSourceCredentialsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSourceCredentialsOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DeleteSourceCredentialsOutput) SetArn(v string) *DeleteSourceCredentialsOutput { - s.Arn = &v - return s -} - -type DeleteWebhookInput struct { - _ struct{} `type:"structure"` - - // The name of the AWS CodeBuild project. - // - // ProjectName is a required field - ProjectName *string `locationName:"projectName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteWebhookInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteWebhookInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteWebhookInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteWebhookInput"} - if s.ProjectName == nil { - invalidParams.Add(request.NewErrParamRequired("ProjectName")) - } - if s.ProjectName != nil && len(*s.ProjectName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("ProjectName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetProjectName sets the ProjectName field's value. -func (s *DeleteWebhookInput) SetProjectName(v string) *DeleteWebhookInput { - s.ProjectName = &v - return s -} - -type DeleteWebhookOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteWebhookOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteWebhookOutput) GoString() string { - return s.String() -} - -// Information about a Docker image that is managed by AWS CodeBuild. -type EnvironmentImage struct { - _ struct{} `type:"structure"` - - // The description of the Docker image. - Description *string `locationName:"description" type:"string"` - - // The name of the Docker image. - Name *string `locationName:"name" type:"string"` - - // A list of environment image versions. - Versions []*string `locationName:"versions" type:"list"` -} - -// String returns the string representation -func (s EnvironmentImage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentImage) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *EnvironmentImage) SetDescription(v string) *EnvironmentImage { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *EnvironmentImage) SetName(v string) *EnvironmentImage { - s.Name = &v - return s -} - -// SetVersions sets the Versions field's value. -func (s *EnvironmentImage) SetVersions(v []*string) *EnvironmentImage { - s.Versions = v - return s -} - -// A set of Docker images that are related by programming language and are managed -// by AWS CodeBuild. -type EnvironmentLanguage struct { - _ struct{} `type:"structure"` - - // The list of Docker images that are related by the specified programming language. - Images []*EnvironmentImage `locationName:"images" type:"list"` - - // The programming language for the Docker images. - Language *string `locationName:"language" type:"string" enum:"LanguageType"` -} - -// String returns the string representation -func (s EnvironmentLanguage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentLanguage) GoString() string { - return s.String() -} - -// SetImages sets the Images field's value. -func (s *EnvironmentLanguage) SetImages(v []*EnvironmentImage) *EnvironmentLanguage { - s.Images = v - return s -} - -// SetLanguage sets the Language field's value. -func (s *EnvironmentLanguage) SetLanguage(v string) *EnvironmentLanguage { - s.Language = &v - return s -} - -// A set of Docker images that are related by platform and are managed by AWS -// CodeBuild. -type EnvironmentPlatform struct { - _ struct{} `type:"structure"` - - // The list of programming languages that are available for the specified platform. - Languages []*EnvironmentLanguage `locationName:"languages" type:"list"` - - // The platform's name. - Platform *string `locationName:"platform" type:"string" enum:"PlatformType"` -} - -// String returns the string representation -func (s EnvironmentPlatform) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentPlatform) GoString() string { - return s.String() -} - -// SetLanguages sets the Languages field's value. -func (s *EnvironmentPlatform) SetLanguages(v []*EnvironmentLanguage) *EnvironmentPlatform { - s.Languages = v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *EnvironmentPlatform) SetPlatform(v string) *EnvironmentPlatform { - s.Platform = &v - return s -} - -// Information about an environment variable for a build project or a build. -type EnvironmentVariable struct { - _ struct{} `type:"structure"` - - // The name or key of the environment variable. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The type of environment variable. Valid values include: - // - // * PARAMETER_STORE: An environment variable stored in Amazon EC2 Systems - // Manager Parameter Store. - // - // * PLAINTEXT: An environment variable in plaintext format. - Type *string `locationName:"type" type:"string" enum:"EnvironmentVariableType"` - - // The value of the environment variable. - // - // We strongly discourage the use of environment variables to store sensitive - // values, especially AWS secret key IDs and secret access keys. Environment - // variables can be displayed in plain text using the AWS CodeBuild console - // and the AWS Command Line Interface (AWS CLI). - // - // Value is a required field - Value *string `locationName:"value" type:"string" required:"true"` -} - -// String returns the string representation -func (s EnvironmentVariable) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentVariable) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnvironmentVariable) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnvironmentVariable"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *EnvironmentVariable) SetName(v string) *EnvironmentVariable { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *EnvironmentVariable) SetType(v string) *EnvironmentVariable { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *EnvironmentVariable) SetValue(v string) *EnvironmentVariable { - s.Value = &v - return s -} - -type ImportSourceCredentialsInput struct { - _ struct{} `type:"structure"` - - // The type of authentication used to connect to a GitHub, GitHub Enterprise, - // or Bitbucket repository. An OAUTH connection is not supported by the API - // and must be created using the AWS CodeBuild console. - // - // AuthType is a required field - AuthType *string `locationName:"authType" type:"string" required:"true" enum:"AuthType"` - - // The source provider used for this project. - // - // ServerType is a required field - ServerType *string `locationName:"serverType" type:"string" required:"true" enum:"ServerType"` - - // For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, - // this is the app password. - // - // Token is a required field - Token *string `locationName:"token" min:"1" type:"string" required:"true" sensitive:"true"` - - // The Bitbucket username when the authType is BASIC_AUTH. This parameter is - // not valid for other types of source providers or connections. - Username *string `locationName:"username" min:"1" type:"string"` -} - -// String returns the string representation -func (s ImportSourceCredentialsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportSourceCredentialsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportSourceCredentialsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportSourceCredentialsInput"} - if s.AuthType == nil { - invalidParams.Add(request.NewErrParamRequired("AuthType")) - } - if s.ServerType == nil { - invalidParams.Add(request.NewErrParamRequired("ServerType")) - } - if s.Token == nil { - invalidParams.Add(request.NewErrParamRequired("Token")) - } - if s.Token != nil && len(*s.Token) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Token", 1)) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthType sets the AuthType field's value. -func (s *ImportSourceCredentialsInput) SetAuthType(v string) *ImportSourceCredentialsInput { - s.AuthType = &v - return s -} - -// SetServerType sets the ServerType field's value. -func (s *ImportSourceCredentialsInput) SetServerType(v string) *ImportSourceCredentialsInput { - s.ServerType = &v - return s -} - -// SetToken sets the Token field's value. -func (s *ImportSourceCredentialsInput) SetToken(v string) *ImportSourceCredentialsInput { - s.Token = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *ImportSourceCredentialsInput) SetUsername(v string) *ImportSourceCredentialsInput { - s.Username = &v - return s -} - -type ImportSourceCredentialsOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the token. - Arn *string `locationName:"arn" min:"1" type:"string"` -} - -// String returns the string representation -func (s ImportSourceCredentialsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportSourceCredentialsOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ImportSourceCredentialsOutput) SetArn(v string) *ImportSourceCredentialsOutput { - s.Arn = &v - return s -} - -type InvalidateProjectCacheInput struct { - _ struct{} `type:"structure"` - - // The name of the AWS CodeBuild build project that the cache is reset for. - // - // ProjectName is a required field - ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s InvalidateProjectCacheInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InvalidateProjectCacheInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InvalidateProjectCacheInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InvalidateProjectCacheInput"} - if s.ProjectName == nil { - invalidParams.Add(request.NewErrParamRequired("ProjectName")) - } - if s.ProjectName != nil && len(*s.ProjectName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetProjectName sets the ProjectName field's value. -func (s *InvalidateProjectCacheInput) SetProjectName(v string) *InvalidateProjectCacheInput { - s.ProjectName = &v - return s -} - -type InvalidateProjectCacheOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s InvalidateProjectCacheOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InvalidateProjectCacheOutput) GoString() string { - return s.String() -} - -type ListBuildsForProjectInput struct { - _ struct{} `type:"structure"` - - // During a previous call, if there are more than 100 items in the list, only - // the first 100 items are returned, along with a unique string called a next - // token. To get the next batch of items in the list, call this operation again, - // adding the next token to the call. To get all of the items in the list, keep - // calling this operation with each subsequent next token that is returned, - // until no more next tokens are returned. - NextToken *string `locationName:"nextToken" type:"string"` - - // The name of the AWS CodeBuild project. - // - // ProjectName is a required field - ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"` - - // The order to list build IDs. Valid values include: - // - // * ASCENDING: List the build IDs in ascending order by build ID. - // - // * DESCENDING: List the build IDs in descending order by build ID. - SortOrder *string `locationName:"sortOrder" type:"string" enum:"SortOrderType"` -} - -// String returns the string representation -func (s ListBuildsForProjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBuildsForProjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBuildsForProjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBuildsForProjectInput"} - if s.ProjectName == nil { - invalidParams.Add(request.NewErrParamRequired("ProjectName")) - } - if s.ProjectName != nil && len(*s.ProjectName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBuildsForProjectInput) SetNextToken(v string) *ListBuildsForProjectInput { - s.NextToken = &v - return s -} - -// SetProjectName sets the ProjectName field's value. -func (s *ListBuildsForProjectInput) SetProjectName(v string) *ListBuildsForProjectInput { - s.ProjectName = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListBuildsForProjectInput) SetSortOrder(v string) *ListBuildsForProjectInput { - s.SortOrder = &v - return s -} - -type ListBuildsForProjectOutput struct { - _ struct{} `type:"structure"` - - // A list of build IDs for the specified build project, with each build ID representing - // a single build. - Ids []*string `locationName:"ids" min:"1" type:"list"` - - // If there are more than 100 items in the list, only the first 100 items are - // returned, along with a unique string called a next token. To get the next - // batch of items in the list, call this operation again, adding the next token - // to the call. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListBuildsForProjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBuildsForProjectOutput) GoString() string { - return s.String() -} - -// SetIds sets the Ids field's value. -func (s *ListBuildsForProjectOutput) SetIds(v []*string) *ListBuildsForProjectOutput { - s.Ids = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBuildsForProjectOutput) SetNextToken(v string) *ListBuildsForProjectOutput { - s.NextToken = &v - return s -} - -type ListBuildsInput struct { - _ struct{} `type:"structure"` - - // During a previous call, if there are more than 100 items in the list, only - // the first 100 items are returned, along with a unique string called a next - // token. To get the next batch of items in the list, call this operation again, - // adding the next token to the call. To get all of the items in the list, keep - // calling this operation with each subsequent next token that is returned, - // until no more next tokens are returned. - NextToken *string `locationName:"nextToken" type:"string"` - - // The order to list build IDs. Valid values include: - // - // * ASCENDING: List the build IDs in ascending order by build ID. - // - // * DESCENDING: List the build IDs in descending order by build ID. - SortOrder *string `locationName:"sortOrder" type:"string" enum:"SortOrderType"` -} - -// String returns the string representation -func (s ListBuildsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBuildsInput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBuildsInput) SetNextToken(v string) *ListBuildsInput { - s.NextToken = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListBuildsInput) SetSortOrder(v string) *ListBuildsInput { - s.SortOrder = &v - return s -} - -type ListBuildsOutput struct { - _ struct{} `type:"structure"` - - // A list of build IDs, with each build ID representing a single build. - Ids []*string `locationName:"ids" min:"1" type:"list"` - - // If there are more than 100 items in the list, only the first 100 items are - // returned, along with a unique string called a next token. To get the next - // batch of items in the list, call this operation again, adding the next token - // to the call. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListBuildsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBuildsOutput) GoString() string { - return s.String() -} - -// SetIds sets the Ids field's value. -func (s *ListBuildsOutput) SetIds(v []*string) *ListBuildsOutput { - s.Ids = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBuildsOutput) SetNextToken(v string) *ListBuildsOutput { - s.NextToken = &v - return s -} - -type ListCuratedEnvironmentImagesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ListCuratedEnvironmentImagesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCuratedEnvironmentImagesInput) GoString() string { - return s.String() -} - -type ListCuratedEnvironmentImagesOutput struct { - _ struct{} `type:"structure"` - - // Information about supported platforms for Docker images that are managed - // by AWS CodeBuild. - Platforms []*EnvironmentPlatform `locationName:"platforms" type:"list"` -} - -// String returns the string representation -func (s ListCuratedEnvironmentImagesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCuratedEnvironmentImagesOutput) GoString() string { - return s.String() -} - -// SetPlatforms sets the Platforms field's value. -func (s *ListCuratedEnvironmentImagesOutput) SetPlatforms(v []*EnvironmentPlatform) *ListCuratedEnvironmentImagesOutput { - s.Platforms = v - return s -} - -type ListProjectsInput struct { - _ struct{} `type:"structure"` - - // During a previous call, if there are more than 100 items in the list, only - // the first 100 items are returned, along with a unique string called a next - // token. To get the next batch of items in the list, call this operation again, - // adding the next token to the call. To get all of the items in the list, keep - // calling this operation with each subsequent next token that is returned, - // until no more next tokens are returned. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The criterion to be used to list build project names. Valid values include: - // - // * CREATED_TIME: List based on when each build project was created. - // - // * LAST_MODIFIED_TIME: List based on when information about each build - // project was last changed. - // - // * NAME: List based on each build project's name. - // - // Use sortOrder to specify in what order to list the build project names based - // on the preceding criteria. - SortBy *string `locationName:"sortBy" type:"string" enum:"ProjectSortByType"` - - // The order in which to list build projects. Valid values include: - // - // * ASCENDING: List in ascending order. - // - // * DESCENDING: List in descending order. - // - // Use sortBy to specify the criterion to be used to list build project names. - SortOrder *string `locationName:"sortOrder" type:"string" enum:"SortOrderType"` -} - -// String returns the string representation -func (s ListProjectsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListProjectsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListProjectsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListProjectsInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListProjectsInput) SetNextToken(v string) *ListProjectsInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListProjectsInput) SetSortBy(v string) *ListProjectsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListProjectsInput) SetSortOrder(v string) *ListProjectsInput { - s.SortOrder = &v - return s -} - -type ListProjectsOutput struct { - _ struct{} `type:"structure"` - - // If there are more than 100 items in the list, only the first 100 items are - // returned, along with a unique string called a next token. To get the next - // batch of items in the list, call this operation again, adding the next token - // to the call. - NextToken *string `locationName:"nextToken" type:"string"` - - // The list of build project names, with each build project name representing - // a single build project. - Projects []*string `locationName:"projects" min:"1" type:"list"` -} - -// String returns the string representation -func (s ListProjectsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListProjectsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListProjectsOutput) SetNextToken(v string) *ListProjectsOutput { - s.NextToken = &v - return s -} - -// SetProjects sets the Projects field's value. -func (s *ListProjectsOutput) SetProjects(v []*string) *ListProjectsOutput { - s.Projects = v - return s -} - -type ListSourceCredentialsInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ListSourceCredentialsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSourceCredentialsInput) GoString() string { - return s.String() -} - -type ListSourceCredentialsOutput struct { - _ struct{} `type:"structure"` - - // A list of SourceCredentialsInfo objects. Each SourceCredentialsInfo object - // includes the authentication type, token ARN, and type of source provider - // for one set of credentials. - SourceCredentialsInfos []*SourceCredentialsInfo `locationName:"sourceCredentialsInfos" type:"list"` -} - -// String returns the string representation -func (s ListSourceCredentialsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSourceCredentialsOutput) GoString() string { - return s.String() -} - -// SetSourceCredentialsInfos sets the SourceCredentialsInfos field's value. -func (s *ListSourceCredentialsOutput) SetSourceCredentialsInfos(v []*SourceCredentialsInfo) *ListSourceCredentialsOutput { - s.SourceCredentialsInfos = v - return s -} - -// Information about logs for a build project. These can be logs in Amazon CloudWatch -// Logs, built in a specified S3 bucket, or both. -type LogsConfig struct { - _ struct{} `type:"structure"` - - // Information about Amazon CloudWatch Logs for a build project. Amazon CloudWatch - // Logs are enabled by default. - CloudWatchLogs *CloudWatchLogsConfig `locationName:"cloudWatchLogs" type:"structure"` - - // Information about logs built to an S3 bucket for a build project. S3 logs - // are not enabled by default. - S3Logs *S3LogsConfig `locationName:"s3Logs" type:"structure"` -} - -// String returns the string representation -func (s LogsConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LogsConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LogsConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LogsConfig"} - if s.CloudWatchLogs != nil { - if err := s.CloudWatchLogs.Validate(); err != nil { - invalidParams.AddNested("CloudWatchLogs", err.(request.ErrInvalidParams)) - } - } - if s.S3Logs != nil { - if err := s.S3Logs.Validate(); err != nil { - invalidParams.AddNested("S3Logs", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchLogs sets the CloudWatchLogs field's value. -func (s *LogsConfig) SetCloudWatchLogs(v *CloudWatchLogsConfig) *LogsConfig { - s.CloudWatchLogs = v - return s -} - -// SetS3Logs sets the S3Logs field's value. -func (s *LogsConfig) SetS3Logs(v *S3LogsConfig) *LogsConfig { - s.S3Logs = v - return s -} - -// Information about build logs in Amazon CloudWatch Logs. -type LogsLocation struct { - _ struct{} `type:"structure"` - - // Information about Amazon CloudWatch Logs for a build project. - CloudWatchLogs *CloudWatchLogsConfig `locationName:"cloudWatchLogs" type:"structure"` - - // The URL to an individual build log in Amazon CloudWatch Logs. - DeepLink *string `locationName:"deepLink" type:"string"` - - // The name of the Amazon CloudWatch Logs group for the build logs. - GroupName *string `locationName:"groupName" type:"string"` - - // The URL to a build log in an S3 bucket. - S3DeepLink *string `locationName:"s3DeepLink" type:"string"` - - // Information about S3 logs for a build project. - S3Logs *S3LogsConfig `locationName:"s3Logs" type:"structure"` - - // The name of the Amazon CloudWatch Logs stream for the build logs. - StreamName *string `locationName:"streamName" type:"string"` -} - -// String returns the string representation -func (s LogsLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LogsLocation) GoString() string { - return s.String() -} - -// SetCloudWatchLogs sets the CloudWatchLogs field's value. -func (s *LogsLocation) SetCloudWatchLogs(v *CloudWatchLogsConfig) *LogsLocation { - s.CloudWatchLogs = v - return s -} - -// SetDeepLink sets the DeepLink field's value. -func (s *LogsLocation) SetDeepLink(v string) *LogsLocation { - s.DeepLink = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *LogsLocation) SetGroupName(v string) *LogsLocation { - s.GroupName = &v - return s -} - -// SetS3DeepLink sets the S3DeepLink field's value. -func (s *LogsLocation) SetS3DeepLink(v string) *LogsLocation { - s.S3DeepLink = &v - return s -} - -// SetS3Logs sets the S3Logs field's value. -func (s *LogsLocation) SetS3Logs(v *S3LogsConfig) *LogsLocation { - s.S3Logs = v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *LogsLocation) SetStreamName(v string) *LogsLocation { - s.StreamName = &v - return s -} - -// Describes a network interface. -type NetworkInterface struct { - _ struct{} `type:"structure"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" min:"1" type:"string"` - - // The ID of the subnet. - SubnetId *string `locationName:"subnetId" min:"1" type:"string"` -} - -// String returns the string representation -func (s NetworkInterface) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInterface) GoString() string { - return s.String() -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *NetworkInterface) SetNetworkInterfaceId(v string) *NetworkInterface { - s.NetworkInterfaceId = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *NetworkInterface) SetSubnetId(v string) *NetworkInterface { - s.SubnetId = &v - return s -} - -// Additional information about a build phase that has an error. You can use -// this information for troubleshooting. -type PhaseContext struct { - _ struct{} `type:"structure"` - - // An explanation of the build phase's context. This might include a command - // ID and an exit code. - Message *string `locationName:"message" type:"string"` - - // The status code for the context of the build phase. - StatusCode *string `locationName:"statusCode" type:"string"` -} - -// String returns the string representation -func (s PhaseContext) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PhaseContext) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *PhaseContext) SetMessage(v string) *PhaseContext { - s.Message = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *PhaseContext) SetStatusCode(v string) *PhaseContext { - s.StatusCode = &v - return s -} - -// Information about a build project. -type Project struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the build project. - Arn *string `locationName:"arn" type:"string"` - - // Information about the build output artifacts for the build project. - Artifacts *ProjectArtifacts `locationName:"artifacts" type:"structure"` - - // Information about the build badge for the build project. - Badge *ProjectBadge `locationName:"badge" type:"structure"` - - // Information about the cache for the build project. - Cache *ProjectCache `locationName:"cache" type:"structure"` - - // When the build project was created, expressed in Unix time format. - Created *time.Time `locationName:"created" type:"timestamp"` - - // A description that makes the build project easy to identify. - Description *string `locationName:"description" type:"string"` - - // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be - // used for encrypting the build output artifacts. - // - // This is expressed either as the Amazon Resource Name (ARN) of the CMK or, - // if specified, the CMK's alias (using the format alias/alias-name). - EncryptionKey *string `locationName:"encryptionKey" min:"1" type:"string"` - - // Information about the build environment for this build project. - Environment *ProjectEnvironment `locationName:"environment" type:"structure"` - - // When the build project's settings were last modified, expressed in Unix time - // format. - LastModified *time.Time `locationName:"lastModified" type:"timestamp"` - - // Information about logs for the build project. A project can create logs in - // Amazon CloudWatch Logs, an S3 bucket, or both. - LogsConfig *LogsConfig `locationName:"logsConfig" type:"structure"` - - // The name of the build project. - Name *string `locationName:"name" min:"2" type:"string"` - - // The number of minutes a build is allowed to be queued before it times out. - QueuedTimeoutInMinutes *int64 `locationName:"queuedTimeoutInMinutes" min:"5" type:"integer"` - - // An array of ProjectArtifacts objects. - SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"` - - // An array of ProjectSource objects. - SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"` - - // The ARN of the AWS Identity and Access Management (IAM) role that enables - // AWS CodeBuild to interact with dependent AWS services on behalf of the AWS - // account. - ServiceRole *string `locationName:"serviceRole" min:"1" type:"string"` - - // Information about the build input source code for this build project. - Source *ProjectSource `locationName:"source" type:"structure"` - - // The tags for this build project. - // - // These tags are available for use by AWS services that support AWS CodeBuild - // build project tags. - Tags []*Tag `locationName:"tags" type:"list"` - - // How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait - // before timing out any related build that did not get marked as completed. - // The default is 60 minutes. - TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"5" type:"integer"` - - // Information about the VPC configuration that AWS CodeBuild accesses. - VpcConfig *VpcConfig `locationName:"vpcConfig" type:"structure"` - - // Information about a webhook that connects repository events to a build project - // in AWS CodeBuild. - Webhook *Webhook `locationName:"webhook" type:"structure"` -} - -// String returns the string representation -func (s Project) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Project) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Project) SetArn(v string) *Project { - s.Arn = &v - return s -} - -// SetArtifacts sets the Artifacts field's value. -func (s *Project) SetArtifacts(v *ProjectArtifacts) *Project { - s.Artifacts = v - return s -} - -// SetBadge sets the Badge field's value. -func (s *Project) SetBadge(v *ProjectBadge) *Project { - s.Badge = v - return s -} - -// SetCache sets the Cache field's value. -func (s *Project) SetCache(v *ProjectCache) *Project { - s.Cache = v - return s -} - -// SetCreated sets the Created field's value. -func (s *Project) SetCreated(v time.Time) *Project { - s.Created = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Project) SetDescription(v string) *Project { - s.Description = &v - return s -} - -// SetEncryptionKey sets the EncryptionKey field's value. -func (s *Project) SetEncryptionKey(v string) *Project { - s.EncryptionKey = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *Project) SetEnvironment(v *ProjectEnvironment) *Project { - s.Environment = v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *Project) SetLastModified(v time.Time) *Project { - s.LastModified = &v - return s -} - -// SetLogsConfig sets the LogsConfig field's value. -func (s *Project) SetLogsConfig(v *LogsConfig) *Project { - s.LogsConfig = v - return s -} - -// SetName sets the Name field's value. -func (s *Project) SetName(v string) *Project { - s.Name = &v - return s -} - -// SetQueuedTimeoutInMinutes sets the QueuedTimeoutInMinutes field's value. -func (s *Project) SetQueuedTimeoutInMinutes(v int64) *Project { - s.QueuedTimeoutInMinutes = &v - return s -} - -// SetSecondaryArtifacts sets the SecondaryArtifacts field's value. -func (s *Project) SetSecondaryArtifacts(v []*ProjectArtifacts) *Project { - s.SecondaryArtifacts = v - return s -} - -// SetSecondarySources sets the SecondarySources field's value. -func (s *Project) SetSecondarySources(v []*ProjectSource) *Project { - s.SecondarySources = v - return s -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *Project) SetServiceRole(v string) *Project { - s.ServiceRole = &v - return s -} - -// SetSource sets the Source field's value. -func (s *Project) SetSource(v *ProjectSource) *Project { - s.Source = v - return s -} - -// SetTags sets the Tags field's value. -func (s *Project) SetTags(v []*Tag) *Project { - s.Tags = v - return s -} - -// SetTimeoutInMinutes sets the TimeoutInMinutes field's value. -func (s *Project) SetTimeoutInMinutes(v int64) *Project { - s.TimeoutInMinutes = &v - return s -} - -// SetVpcConfig sets the VpcConfig field's value. -func (s *Project) SetVpcConfig(v *VpcConfig) *Project { - s.VpcConfig = v - return s -} - -// SetWebhook sets the Webhook field's value. -func (s *Project) SetWebhook(v *Webhook) *Project { - s.Webhook = v - return s -} - -// Information about the build output artifacts for the build project. -type ProjectArtifacts struct { - _ struct{} `type:"structure"` - - // An identifier for this artifact definition. - ArtifactIdentifier *string `locationName:"artifactIdentifier" type:"string"` - - // Set to true if you do not want your output artifacts encrypted. This option - // is valid only if your artifacts type is Amazon Simple Storage Service (Amazon - // S3). If this is set with another artifacts type, an invalidInputException - // is thrown. - EncryptionDisabled *bool `locationName:"encryptionDisabled" type:"boolean"` - - // Information about the build output artifact location: - // - // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value - // if specified. This is because AWS CodePipeline manages its build output - // locations instead of AWS CodeBuild. - // - // * If type is set to NO_ARTIFACTS, this value is ignored if specified, - // because no build output is produced. - // - // * If type is set to S3, this is the name of the output bucket. - Location *string `locationName:"location" type:"string"` - - // Along with path and namespaceType, the pattern that AWS CodeBuild uses to - // name and store the output artifact: - // - // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value - // if specified. This is because AWS CodePipeline manages its build output - // names instead of AWS CodeBuild. - // - // * If type is set to NO_ARTIFACTS, this value is ignored if specified, - // because no build output is produced. - // - // * If type is set to S3, this is the name of the output artifact object. - // If you set the name to be a forward slash ("/"), the artifact is stored - // in the root of the output bucket. - // - // For example: - // - // * If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and - // name is set to MyArtifact.zip, then the output artifact is stored in MyArtifacts/build-ID/MyArtifact.zip. - // - // - // * If path is empty, namespaceType is set to NONE, and name is set to - // "/", the output artifact is stored in the root of the output bucket. - // - // * If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and - // name is set to "/", the output artifact is stored in MyArtifacts/build-ID. - Name *string `locationName:"name" type:"string"` - - // Along with path and name, the pattern that AWS CodeBuild uses to determine - // the name and location to store the output artifact: - // - // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value - // if specified. This is because AWS CodePipeline manages its build output - // names instead of AWS CodeBuild. - // - // * If type is set to NO_ARTIFACTS, this value is ignored if specified, - // because no build output is produced. - // - // * If type is set to S3, valid values include: - // - // BUILD_ID: Include the build ID in the location of the build output artifact. - // - // NONE: Do not include the build ID. This is the default if namespaceType is - // not specified. - // - // For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, - // and name is set to MyArtifact.zip, the output artifact is stored in MyArtifacts/build-ID/MyArtifact.zip. - NamespaceType *string `locationName:"namespaceType" type:"string" enum:"ArtifactNamespace"` - - // If this flag is set, a name specified in the build spec file overrides the - // artifact name. The name specified in a build spec file is calculated at build - // time and uses the Shell Command Language. For example, you can append a date - // and time to your artifact name so that it is always unique. - OverrideArtifactName *bool `locationName:"overrideArtifactName" type:"boolean"` - - // The type of build output artifact to create: - // - // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value - // if specified. This is because AWS CodePipeline manages its build output - // artifacts instead of AWS CodeBuild. - // - // * If type is set to NO_ARTIFACTS, this value is ignored if specified, - // because no build output is produced. - // - // * If type is set to S3, valid values include: - // - // NONE: AWS CodeBuild creates in the output bucket a folder that contains the - // build output. This is the default if packaging is not specified. - // - // ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains - // the build output. - Packaging *string `locationName:"packaging" type:"string" enum:"ArtifactPackaging"` - - // Along with namespaceType and name, the pattern that AWS CodeBuild uses to - // name and store the output artifact: - // - // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value - // if specified. This is because AWS CodePipeline manages its build output - // names instead of AWS CodeBuild. - // - // * If type is set to NO_ARTIFACTS, this value is ignored if specified, - // because no build output is produced. - // - // * If type is set to S3, this is the path to the output artifact. If path - // is not specified, path is not used. - // - // For example, if path is set to MyArtifacts, namespaceType is set to NONE, - // and name is set to MyArtifact.zip, the output artifact is stored in the output - // bucket at MyArtifacts/MyArtifact.zip. - Path *string `locationName:"path" type:"string"` - - // The type of build output artifact. Valid values include: - // - // * CODEPIPELINE: The build project has build output generated through AWS - // CodePipeline. - // - // * NO_ARTIFACTS: The build project does not produce any build output. - // - // * S3: The build project stores build output in Amazon Simple Storage Service - // (Amazon S3). - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"ArtifactsType"` -} - -// String returns the string representation -func (s ProjectArtifacts) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProjectArtifacts) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProjectArtifacts) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProjectArtifacts"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArtifactIdentifier sets the ArtifactIdentifier field's value. -func (s *ProjectArtifacts) SetArtifactIdentifier(v string) *ProjectArtifacts { - s.ArtifactIdentifier = &v - return s -} - -// SetEncryptionDisabled sets the EncryptionDisabled field's value. -func (s *ProjectArtifacts) SetEncryptionDisabled(v bool) *ProjectArtifacts { - s.EncryptionDisabled = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *ProjectArtifacts) SetLocation(v string) *ProjectArtifacts { - s.Location = &v - return s -} - -// SetName sets the Name field's value. -func (s *ProjectArtifacts) SetName(v string) *ProjectArtifacts { - s.Name = &v - return s -} - -// SetNamespaceType sets the NamespaceType field's value. -func (s *ProjectArtifacts) SetNamespaceType(v string) *ProjectArtifacts { - s.NamespaceType = &v - return s -} - -// SetOverrideArtifactName sets the OverrideArtifactName field's value. -func (s *ProjectArtifacts) SetOverrideArtifactName(v bool) *ProjectArtifacts { - s.OverrideArtifactName = &v - return s -} - -// SetPackaging sets the Packaging field's value. -func (s *ProjectArtifacts) SetPackaging(v string) *ProjectArtifacts { - s.Packaging = &v - return s -} - -// SetPath sets the Path field's value. -func (s *ProjectArtifacts) SetPath(v string) *ProjectArtifacts { - s.Path = &v - return s -} - -// SetType sets the Type field's value. -func (s *ProjectArtifacts) SetType(v string) *ProjectArtifacts { - s.Type = &v - return s -} - -// Information about the build badge for the build project. -type ProjectBadge struct { - _ struct{} `type:"structure"` - - // Set this to true to generate a publicly accessible URL for your project's - // build badge. - BadgeEnabled *bool `locationName:"badgeEnabled" type:"boolean"` - - // The publicly-accessible URL through which you can access the build badge - // for your project. - // - // The publicly accessible URL through which you can access the build badge - // for your project. - BadgeRequestUrl *string `locationName:"badgeRequestUrl" type:"string"` -} - -// String returns the string representation -func (s ProjectBadge) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProjectBadge) GoString() string { - return s.String() -} - -// SetBadgeEnabled sets the BadgeEnabled field's value. -func (s *ProjectBadge) SetBadgeEnabled(v bool) *ProjectBadge { - s.BadgeEnabled = &v - return s -} - -// SetBadgeRequestUrl sets the BadgeRequestUrl field's value. -func (s *ProjectBadge) SetBadgeRequestUrl(v string) *ProjectBadge { - s.BadgeRequestUrl = &v - return s -} - -// Information about the cache for the build project. -type ProjectCache struct { - _ struct{} `type:"structure"` - - // Information about the cache location: - // - // * NO_CACHE: This value is ignored. - // - // * S3: This is the S3 bucket name/prefix. - Location *string `locationName:"location" type:"string"` - - // The type of cache used by the build project. Valid values include: - // - // * NO_CACHE: The build project does not use any cache. - // - // * S3: The build project reads and writes from and to S3. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"CacheType"` -} - -// String returns the string representation -func (s ProjectCache) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProjectCache) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProjectCache) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProjectCache"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLocation sets the Location field's value. -func (s *ProjectCache) SetLocation(v string) *ProjectCache { - s.Location = &v - return s -} - -// SetType sets the Type field's value. -func (s *ProjectCache) SetType(v string) *ProjectCache { - s.Type = &v - return s -} - -// Information about the build environment of the build project. -type ProjectEnvironment struct { - _ struct{} `type:"structure"` - - // The certificate to use with this build project. - Certificate *string `locationName:"certificate" type:"string"` - - // Information about the compute resources the build project uses. Available - // values include: - // - // * BUILD_GENERAL1_SMALL: Use up to 3 GB memory and 2 vCPUs for builds. - // - // * BUILD_GENERAL1_MEDIUM: Use up to 7 GB memory and 4 vCPUs for builds. - // - // * BUILD_GENERAL1_LARGE: Use up to 15 GB memory and 8 vCPUs for builds. - // - // ComputeType is a required field - ComputeType *string `locationName:"computeType" type:"string" required:"true" enum:"ComputeType"` - - // A set of environment variables to make available to builds for this build - // project. - EnvironmentVariables []*EnvironmentVariable `locationName:"environmentVariables" type:"list"` - - // The image tag or image digest that identifies the Docker image to use for - // this build project. Use the following formats: - // - // * For an image tag: registry/repository:tag. For example, to specify an - // image with the tag "latest," use registry/repository:latest. - // - // * For an image digest: registry/repository@digest. For example, to specify - // an image with the digest "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf," - // use registry/repository@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf. - // - // Image is a required field - Image *string `locationName:"image" min:"1" type:"string" required:"true"` - - // The type of credentials AWS CodeBuild uses to pull images in your build. - // There are two valid values: - // - // * CODEBUILD specifies that AWS CodeBuild uses its own credentials. This - // requires that you modify your ECR repository policy to trust AWS CodeBuild's - // service principal. - // - // * SERVICE_ROLE specifies that AWS CodeBuild uses your build project's - // service role. - // - // When you use a cross-account or private registry image, you must use SERVICE_ROLE - // credentials. When you use an AWS CodeBuild curated image, you must use CODEBUILD - // credentials. - ImagePullCredentialsType *string `locationName:"imagePullCredentialsType" type:"string" enum:"ImagePullCredentialsType"` - - // Enables running the Docker daemon inside a Docker container. Set to true - // only if the build project is be used to build Docker images, and the specified - // build environment image is not provided by AWS CodeBuild with Docker support. - // Otherwise, all associated builds that attempt to interact with the Docker - // daemon fail. You must also start the Docker daemon so that builds can interact - // with it. One way to do this is to initialize the Docker daemon during the - // install phase of your build spec by running the following build commands. - // (Do not run these commands if the specified build environment image is provided - // by AWS CodeBuild with Docker support.) - // - // If the operating system's base image is Ubuntu Linux: - // - // - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 - // --storage-driver=overlay& - timeout 15 sh -c "until docker info; do echo - // .; sleep 1; done" - // - // If the operating system's base image is Alpine Linux, add the -t argument - // to timeout: - // - // - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 - // --storage-driver=overlay& - timeout 15 -t sh -c "until docker info; do echo - // .; sleep 1; done" - PrivilegedMode *bool `locationName:"privilegedMode" type:"boolean"` - - // The credentials for access to a private registry. - RegistryCredential *RegistryCredential `locationName:"registryCredential" type:"structure"` - - // The type of build environment to use for related builds. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"EnvironmentType"` -} - -// String returns the string representation -func (s ProjectEnvironment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProjectEnvironment) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProjectEnvironment) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProjectEnvironment"} - if s.ComputeType == nil { - invalidParams.Add(request.NewErrParamRequired("ComputeType")) - } - if s.Image == nil { - invalidParams.Add(request.NewErrParamRequired("Image")) - } - if s.Image != nil && len(*s.Image) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Image", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.EnvironmentVariables != nil { - for i, v := range s.EnvironmentVariables { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EnvironmentVariables", i), err.(request.ErrInvalidParams)) - } - } - } - if s.RegistryCredential != nil { - if err := s.RegistryCredential.Validate(); err != nil { - invalidParams.AddNested("RegistryCredential", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificate sets the Certificate field's value. -func (s *ProjectEnvironment) SetCertificate(v string) *ProjectEnvironment { - s.Certificate = &v - return s -} - -// SetComputeType sets the ComputeType field's value. -func (s *ProjectEnvironment) SetComputeType(v string) *ProjectEnvironment { - s.ComputeType = &v - return s -} - -// SetEnvironmentVariables sets the EnvironmentVariables field's value. -func (s *ProjectEnvironment) SetEnvironmentVariables(v []*EnvironmentVariable) *ProjectEnvironment { - s.EnvironmentVariables = v - return s -} - -// SetImage sets the Image field's value. -func (s *ProjectEnvironment) SetImage(v string) *ProjectEnvironment { - s.Image = &v - return s -} - -// SetImagePullCredentialsType sets the ImagePullCredentialsType field's value. -func (s *ProjectEnvironment) SetImagePullCredentialsType(v string) *ProjectEnvironment { - s.ImagePullCredentialsType = &v - return s -} - -// SetPrivilegedMode sets the PrivilegedMode field's value. -func (s *ProjectEnvironment) SetPrivilegedMode(v bool) *ProjectEnvironment { - s.PrivilegedMode = &v - return s -} - -// SetRegistryCredential sets the RegistryCredential field's value. -func (s *ProjectEnvironment) SetRegistryCredential(v *RegistryCredential) *ProjectEnvironment { - s.RegistryCredential = v - return s -} - -// SetType sets the Type field's value. -func (s *ProjectEnvironment) SetType(v string) *ProjectEnvironment { - s.Type = &v - return s -} - -// Information about the build input source code for the build project. -type ProjectSource struct { - _ struct{} `type:"structure"` - - // Information about the authorization settings for AWS CodeBuild to access - // the source code to be built. - // - // This information is for the AWS CodeBuild console's use only. Your code should - // not get or set this information directly. - Auth *SourceAuth `locationName:"auth" type:"structure"` - - // The build spec declaration to use for the builds in this build project. - // - // If this value is not specified, a build spec must be included along with - // the source code to be built. - Buildspec *string `locationName:"buildspec" type:"string"` - - // Information about the git clone depth for the build project. - GitCloneDepth *int64 `locationName:"gitCloneDepth" type:"integer"` - - // Enable this flag to ignore SSL warnings while connecting to the project source - // code. - InsecureSsl *bool `locationName:"insecureSsl" type:"boolean"` - - // Information about the location of the source code to be built. Valid values - // include: - // - // * For source code settings that are specified in the source action of - // a pipeline in AWS CodePipeline, location should not be specified. If it - // is specified, AWS CodePipeline ignores it. This is because AWS CodePipeline - // uses the settings in a pipeline's source action instead of this value. - // - // * For source code in an AWS CodeCommit repository, the HTTPS clone URL - // to the repository that contains the source code and the build spec (for - // example, https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name). - // - // * For source code in an Amazon Simple Storage Service (Amazon S3) input - // bucket, one of the following. - // - // The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip). - // - // - // The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/). - // - // - // * For source code in a GitHub repository, the HTTPS clone URL to the repository - // that contains the source and the build spec. You must connect your AWS - // account to your GitHub account. Use the AWS CodeBuild console to start - // creating a build project. When you use the console to connect (or reconnect) - // with GitHub, on the GitHub Authorize application page, for Organization - // access, choose Request access next to each repository you want to allow - // AWS CodeBuild to have access to, and then choose Authorize application. - // (After you have connected to your GitHub account, you do not need to finish - // creating the build project. You can leave the AWS CodeBuild console.) - // To instruct AWS CodeBuild to use this connection, in the source object, - // set the auth object's type value to OAUTH. - // - // * For source code in a Bitbucket repository, the HTTPS clone URL to the - // repository that contains the source and the build spec. You must connect - // your AWS account to your Bitbucket account. Use the AWS CodeBuild console - // to start creating a build project. When you use the console to connect - // (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your - // account page, choose Grant access. (After you have connected to your Bitbucket - // account, you do not need to finish creating the build project. You can - // leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this - // connection, in the source object, set the auth object's type value to - // OAUTH. - Location *string `locationName:"location" type:"string"` - - // Set to true to report the status of a build's start and finish to your source - // provider. This option is valid only when your source provider is GitHub, - // GitHub Enterprise, or Bitbucket. If this is set and you use a different source - // provider, an invalidInputException is thrown. - ReportBuildStatus *bool `locationName:"reportBuildStatus" type:"boolean"` - - // An identifier for this project source. - SourceIdentifier *string `locationName:"sourceIdentifier" type:"string"` - - // The type of repository that contains the source code to be built. Valid values - // include: - // - // * BITBUCKET: The source code is in a Bitbucket repository. - // - // * CODECOMMIT: The source code is in an AWS CodeCommit repository. - // - // * CODEPIPELINE: The source code settings are specified in the source action - // of a pipeline in AWS CodePipeline. - // - // * GITHUB: The source code is in a GitHub repository. - // - // * NO_SOURCE: The project does not have input source code. - // - // * S3: The source code is in an Amazon Simple Storage Service (Amazon S3) - // input bucket. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"SourceType"` -} - -// String returns the string representation -func (s ProjectSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProjectSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProjectSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProjectSource"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Auth != nil { - if err := s.Auth.Validate(); err != nil { - invalidParams.AddNested("Auth", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuth sets the Auth field's value. -func (s *ProjectSource) SetAuth(v *SourceAuth) *ProjectSource { - s.Auth = v - return s -} - -// SetBuildspec sets the Buildspec field's value. -func (s *ProjectSource) SetBuildspec(v string) *ProjectSource { - s.Buildspec = &v - return s -} - -// SetGitCloneDepth sets the GitCloneDepth field's value. -func (s *ProjectSource) SetGitCloneDepth(v int64) *ProjectSource { - s.GitCloneDepth = &v - return s -} - -// SetInsecureSsl sets the InsecureSsl field's value. -func (s *ProjectSource) SetInsecureSsl(v bool) *ProjectSource { - s.InsecureSsl = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *ProjectSource) SetLocation(v string) *ProjectSource { - s.Location = &v - return s -} - -// SetReportBuildStatus sets the ReportBuildStatus field's value. -func (s *ProjectSource) SetReportBuildStatus(v bool) *ProjectSource { - s.ReportBuildStatus = &v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *ProjectSource) SetSourceIdentifier(v string) *ProjectSource { - s.SourceIdentifier = &v - return s -} - -// SetType sets the Type field's value. -func (s *ProjectSource) SetType(v string) *ProjectSource { - s.Type = &v - return s -} - -// A source identifier and its corresponding version. -type ProjectSourceVersion struct { - _ struct{} `type:"structure"` - - // An identifier for a source in the build project. - // - // SourceIdentifier is a required field - SourceIdentifier *string `locationName:"sourceIdentifier" type:"string" required:"true"` - - // The source version for the corresponding source identifier. If specified, - // must be one of: - // - // * For AWS CodeCommit: the commit ID to use. - // - // * For GitHub: the commit ID, pull request ID, branch name, or tag name - // that corresponds to the version of the source code you want to build. - // If a pull request ID is specified, it must use the format pr/pull-request-ID - // (for example, pr/25). If a branch name is specified, the branch's HEAD - // commit ID is used. If not specified, the default branch's HEAD commit - // ID is used. - // - // * For Bitbucket: the commit ID, branch name, or tag name that corresponds - // to the version of the source code you want to build. If a branch name - // is specified, the branch's HEAD commit ID is used. If not specified, the - // default branch's HEAD commit ID is used. - // - // * For Amazon Simple Storage Service (Amazon S3): the version ID of the - // object that represents the build input ZIP file to use. - // - // SourceVersion is a required field - SourceVersion *string `locationName:"sourceVersion" type:"string" required:"true"` -} - -// String returns the string representation -func (s ProjectSourceVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProjectSourceVersion) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProjectSourceVersion) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProjectSourceVersion"} - if s.SourceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceIdentifier")) - } - if s.SourceVersion == nil { - invalidParams.Add(request.NewErrParamRequired("SourceVersion")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *ProjectSourceVersion) SetSourceIdentifier(v string) *ProjectSourceVersion { - s.SourceIdentifier = &v - return s -} - -// SetSourceVersion sets the SourceVersion field's value. -func (s *ProjectSourceVersion) SetSourceVersion(v string) *ProjectSourceVersion { - s.SourceVersion = &v - return s -} - -// Information about credentials that provide access to a private Docker registry. -// When this is set: -// -// * imagePullCredentialsType must be set to SERVICE_ROLE. -// -// * images cannot be curated or an Amazon ECR image. -// -// For more information, see Private Registry with AWS Secrets Manager Samle -// for AWS CodeBuild (http://docs.aws.amazon.com/codebuild/latest/userguide/sample-private-registry.html). -type RegistryCredential struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets - // Manager. - // - // The credential can use the name of the credentials only if they exist in - // your current region. - // - // Credential is a required field - Credential *string `locationName:"credential" min:"1" type:"string" required:"true"` - - // The service that created the credentials to access a private Docker registry. - // The valid value, SECRETS_MANAGER, is for AWS Secrets Manager. - // - // CredentialProvider is a required field - CredentialProvider *string `locationName:"credentialProvider" type:"string" required:"true" enum:"CredentialProviderType"` -} - -// String returns the string representation -func (s RegistryCredential) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegistryCredential) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegistryCredential) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegistryCredential"} - if s.Credential == nil { - invalidParams.Add(request.NewErrParamRequired("Credential")) - } - if s.Credential != nil && len(*s.Credential) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Credential", 1)) - } - if s.CredentialProvider == nil { - invalidParams.Add(request.NewErrParamRequired("CredentialProvider")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCredential sets the Credential field's value. -func (s *RegistryCredential) SetCredential(v string) *RegistryCredential { - s.Credential = &v - return s -} - -// SetCredentialProvider sets the CredentialProvider field's value. -func (s *RegistryCredential) SetCredentialProvider(v string) *RegistryCredential { - s.CredentialProvider = &v - return s -} - -// Information about S3 logs for a build project. -type S3LogsConfig struct { - _ struct{} `type:"structure"` - - // The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 - // bucket name is my-bucket, and your path prefix is build-log, then acceptable - // formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log. - Location *string `locationName:"location" type:"string"` - - // The current status of the S3 build logs. Valid values are: - // - // * ENABLED: S3 build logs are enabled for this build project. - // - // * DISABLED: S3 build logs are not enabled for this build project. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"LogsConfigStatusType"` -} - -// String returns the string representation -func (s S3LogsConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3LogsConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3LogsConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3LogsConfig"} - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLocation sets the Location field's value. -func (s *S3LogsConfig) SetLocation(v string) *S3LogsConfig { - s.Location = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *S3LogsConfig) SetStatus(v string) *S3LogsConfig { - s.Status = &v - return s -} - -// Information about the authorization settings for AWS CodeBuild to access -// the source code to be built. -// -// This information is for the AWS CodeBuild console's use only. Your code should -// not get or set this information directly. -type SourceAuth struct { - _ struct{} `type:"structure"` - - // The resource value that applies to the specified authorization type. - Resource *string `locationName:"resource" type:"string"` - - // This data type is deprecated and is no longer accurate or used. - // - // The authorization type to use. The only valid value is OAUTH, which represents - // the OAuth authorization type. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"SourceAuthType"` -} - -// String returns the string representation -func (s SourceAuth) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SourceAuth) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SourceAuth) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SourceAuth"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResource sets the Resource field's value. -func (s *SourceAuth) SetResource(v string) *SourceAuth { - s.Resource = &v - return s -} - -// SetType sets the Type field's value. -func (s *SourceAuth) SetType(v string) *SourceAuth { - s.Type = &v - return s -} - -// Information about the credentials for a GitHub, GitHub Enterprise, or Bitbucket -// repository. -type SourceCredentialsInfo struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the token. - Arn *string `locationName:"arn" min:"1" type:"string"` - - // The type of authentication used by the credentials. Valid options are OAUTH, - // BASIC_AUTH, or PERSONAL_ACCESS_TOKEN. - AuthType *string `locationName:"authType" type:"string" enum:"AuthType"` - - // The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, - // or BITBUCKET. - ServerType *string `locationName:"serverType" type:"string" enum:"ServerType"` -} - -// String returns the string representation -func (s SourceCredentialsInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SourceCredentialsInfo) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *SourceCredentialsInfo) SetArn(v string) *SourceCredentialsInfo { - s.Arn = &v - return s -} - -// SetAuthType sets the AuthType field's value. -func (s *SourceCredentialsInfo) SetAuthType(v string) *SourceCredentialsInfo { - s.AuthType = &v - return s -} - -// SetServerType sets the ServerType field's value. -func (s *SourceCredentialsInfo) SetServerType(v string) *SourceCredentialsInfo { - s.ServerType = &v - return s -} - -type StartBuildInput struct { - _ struct{} `type:"structure"` - - // Build output artifact settings that override, for this build only, the latest - // ones already defined in the build project. - ArtifactsOverride *ProjectArtifacts `locationName:"artifactsOverride" type:"structure"` - - // A build spec declaration that overrides, for this build only, the latest - // one already defined in the build project. - BuildspecOverride *string `locationName:"buildspecOverride" type:"string"` - - // A ProjectCache object specified for this build that overrides the one defined - // in the build project. - CacheOverride *ProjectCache `locationName:"cacheOverride" type:"structure"` - - // The name of a certificate for this build that overrides the one specified - // in the build project. - CertificateOverride *string `locationName:"certificateOverride" type:"string"` - - // The name of a compute type for this build that overrides the one specified - // in the build project. - ComputeTypeOverride *string `locationName:"computeTypeOverride" type:"string" enum:"ComputeType"` - - // A container type for this build that overrides the one specified in the build - // project. - EnvironmentTypeOverride *string `locationName:"environmentTypeOverride" type:"string" enum:"EnvironmentType"` - - // A set of environment variables that overrides, for this build only, the latest - // ones already defined in the build project. - EnvironmentVariablesOverride []*EnvironmentVariable `locationName:"environmentVariablesOverride" type:"list"` - - // The user-defined depth of history, with a minimum value of 0, that overrides, - // for this build only, any previous depth of history defined in the build project. - GitCloneDepthOverride *int64 `locationName:"gitCloneDepthOverride" type:"integer"` - - // A unique, case sensitive identifier you provide to ensure the idempotency - // of the StartBuild request. The token is included in the StartBuild request - // and is valid for 12 hours. If you repeat the StartBuild request with the - // same token, but change a parameter, AWS CodeBuild returns a parameter mismatch - // error. - IdempotencyToken *string `locationName:"idempotencyToken" type:"string"` - - // The name of an image for this build that overrides the one specified in the - // build project. - ImageOverride *string `locationName:"imageOverride" min:"1" type:"string"` - - // The type of credentials AWS CodeBuild uses to pull images in your build. - // There are two valid values: - // - // * CODEBUILD specifies that AWS CodeBuild uses its own credentials. This - // requires that you modify your ECR repository policy to trust AWS CodeBuild's - // service principal. - // - // * SERVICE_ROLE specifies that AWS CodeBuild uses your build project's - // service role. - // - // When using a cross-account or private registry image, you must use SERVICE_ROLE - // credentials. When using an AWS CodeBuild curated image, you must use CODEBUILD - // credentials. - ImagePullCredentialsTypeOverride *string `locationName:"imagePullCredentialsTypeOverride" type:"string" enum:"ImagePullCredentialsType"` - - // Enable this flag to override the insecure SSL setting that is specified in - // the build project. The insecure SSL setting determines whether to ignore - // SSL warnings while connecting to the project source code. This override applies - // only if the build's source is GitHub Enterprise. - InsecureSslOverride *bool `locationName:"insecureSslOverride" type:"boolean"` - - // Log settings for this build that override the log settings defined in the - // build project. - LogsConfigOverride *LogsConfig `locationName:"logsConfigOverride" type:"structure"` - - // Enable this flag to override privileged mode in the build project. - PrivilegedModeOverride *bool `locationName:"privilegedModeOverride" type:"boolean"` - - // The name of the AWS CodeBuild build project to start running a build. - // - // ProjectName is a required field - ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"` - - // The number of minutes a build is allowed to be queued before it times out. - QueuedTimeoutInMinutesOverride *int64 `locationName:"queuedTimeoutInMinutesOverride" min:"5" type:"integer"` - - // The credentials for access to a private registry. - RegistryCredentialOverride *RegistryCredential `locationName:"registryCredentialOverride" type:"structure"` - - // Set to true to report to your source provider the status of a build's start - // and completion. If you use this option with a source provider other than - // GitHub, GitHub Enterprise, or Bitbucket, an invalidInputException is thrown. - ReportBuildStatusOverride *bool `locationName:"reportBuildStatusOverride" type:"boolean"` - - // An array of ProjectArtifacts objects. - SecondaryArtifactsOverride []*ProjectArtifacts `locationName:"secondaryArtifactsOverride" type:"list"` - - // An array of ProjectSource objects. - SecondarySourcesOverride []*ProjectSource `locationName:"secondarySourcesOverride" type:"list"` - - // An array of ProjectSourceVersion objects that specify one or more versions - // of the project's secondary sources to be used for this build only. - SecondarySourcesVersionOverride []*ProjectSourceVersion `locationName:"secondarySourcesVersionOverride" type:"list"` - - // The name of a service role for this build that overrides the one specified - // in the build project. - ServiceRoleOverride *string `locationName:"serviceRoleOverride" min:"1" type:"string"` - - // An authorization type for this build that overrides the one defined in the - // build project. This override applies only if the build project's source is - // BitBucket or GitHub. - SourceAuthOverride *SourceAuth `locationName:"sourceAuthOverride" type:"structure"` - - // A location that overrides, for this build, the source location for the one - // defined in the build project. - SourceLocationOverride *string `locationName:"sourceLocationOverride" type:"string"` - - // A source input type, for this build, that overrides the source input defined - // in the build project. - SourceTypeOverride *string `locationName:"sourceTypeOverride" type:"string" enum:"SourceType"` - - // A version of the build input to be built, for this build only. If not specified, - // the latest version is used. If specified, must be one of: - // - // * For AWS CodeCommit: the commit ID to use. - // - // * For GitHub: the commit ID, pull request ID, branch name, or tag name - // that corresponds to the version of the source code you want to build. - // If a pull request ID is specified, it must use the format pr/pull-request-ID - // (for example pr/25). If a branch name is specified, the branch's HEAD - // commit ID is used. If not specified, the default branch's HEAD commit - // ID is used. - // - // * For Bitbucket: the commit ID, branch name, or tag name that corresponds - // to the version of the source code you want to build. If a branch name - // is specified, the branch's HEAD commit ID is used. If not specified, the - // default branch's HEAD commit ID is used. - // - // * For Amazon Simple Storage Service (Amazon S3): the version ID of the - // object that represents the build input ZIP file to use. - SourceVersion *string `locationName:"sourceVersion" type:"string"` - - // The number of build timeout minutes, from 5 to 480 (8 hours), that overrides, - // for this build only, the latest setting already defined in the build project. - TimeoutInMinutesOverride *int64 `locationName:"timeoutInMinutesOverride" min:"5" type:"integer"` -} - -// String returns the string representation -func (s StartBuildInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartBuildInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartBuildInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartBuildInput"} - if s.ImageOverride != nil && len(*s.ImageOverride) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ImageOverride", 1)) - } - if s.ProjectName == nil { - invalidParams.Add(request.NewErrParamRequired("ProjectName")) - } - if s.ProjectName != nil && len(*s.ProjectName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) - } - if s.QueuedTimeoutInMinutesOverride != nil && *s.QueuedTimeoutInMinutesOverride < 5 { - invalidParams.Add(request.NewErrParamMinValue("QueuedTimeoutInMinutesOverride", 5)) - } - if s.ServiceRoleOverride != nil && len(*s.ServiceRoleOverride) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceRoleOverride", 1)) - } - if s.TimeoutInMinutesOverride != nil && *s.TimeoutInMinutesOverride < 5 { - invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutesOverride", 5)) - } - if s.ArtifactsOverride != nil { - if err := s.ArtifactsOverride.Validate(); err != nil { - invalidParams.AddNested("ArtifactsOverride", err.(request.ErrInvalidParams)) - } - } - if s.CacheOverride != nil { - if err := s.CacheOverride.Validate(); err != nil { - invalidParams.AddNested("CacheOverride", err.(request.ErrInvalidParams)) - } - } - if s.EnvironmentVariablesOverride != nil { - for i, v := range s.EnvironmentVariablesOverride { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EnvironmentVariablesOverride", i), err.(request.ErrInvalidParams)) - } - } - } - if s.LogsConfigOverride != nil { - if err := s.LogsConfigOverride.Validate(); err != nil { - invalidParams.AddNested("LogsConfigOverride", err.(request.ErrInvalidParams)) - } - } - if s.RegistryCredentialOverride != nil { - if err := s.RegistryCredentialOverride.Validate(); err != nil { - invalidParams.AddNested("RegistryCredentialOverride", err.(request.ErrInvalidParams)) - } - } - if s.SecondaryArtifactsOverride != nil { - for i, v := range s.SecondaryArtifactsOverride { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondaryArtifactsOverride", i), err.(request.ErrInvalidParams)) - } - } - } - if s.SecondarySourcesOverride != nil { - for i, v := range s.SecondarySourcesOverride { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySourcesOverride", i), err.(request.ErrInvalidParams)) - } - } - } - if s.SecondarySourcesVersionOverride != nil { - for i, v := range s.SecondarySourcesVersionOverride { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySourcesVersionOverride", i), err.(request.ErrInvalidParams)) - } - } - } - if s.SourceAuthOverride != nil { - if err := s.SourceAuthOverride.Validate(); err != nil { - invalidParams.AddNested("SourceAuthOverride", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArtifactsOverride sets the ArtifactsOverride field's value. -func (s *StartBuildInput) SetArtifactsOverride(v *ProjectArtifacts) *StartBuildInput { - s.ArtifactsOverride = v - return s -} - -// SetBuildspecOverride sets the BuildspecOverride field's value. -func (s *StartBuildInput) SetBuildspecOverride(v string) *StartBuildInput { - s.BuildspecOverride = &v - return s -} - -// SetCacheOverride sets the CacheOverride field's value. -func (s *StartBuildInput) SetCacheOverride(v *ProjectCache) *StartBuildInput { - s.CacheOverride = v - return s -} - -// SetCertificateOverride sets the CertificateOverride field's value. -func (s *StartBuildInput) SetCertificateOverride(v string) *StartBuildInput { - s.CertificateOverride = &v - return s -} - -// SetComputeTypeOverride sets the ComputeTypeOverride field's value. -func (s *StartBuildInput) SetComputeTypeOverride(v string) *StartBuildInput { - s.ComputeTypeOverride = &v - return s -} - -// SetEnvironmentTypeOverride sets the EnvironmentTypeOverride field's value. -func (s *StartBuildInput) SetEnvironmentTypeOverride(v string) *StartBuildInput { - s.EnvironmentTypeOverride = &v - return s -} - -// SetEnvironmentVariablesOverride sets the EnvironmentVariablesOverride field's value. -func (s *StartBuildInput) SetEnvironmentVariablesOverride(v []*EnvironmentVariable) *StartBuildInput { - s.EnvironmentVariablesOverride = v - return s -} - -// SetGitCloneDepthOverride sets the GitCloneDepthOverride field's value. -func (s *StartBuildInput) SetGitCloneDepthOverride(v int64) *StartBuildInput { - s.GitCloneDepthOverride = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *StartBuildInput) SetIdempotencyToken(v string) *StartBuildInput { - s.IdempotencyToken = &v - return s -} - -// SetImageOverride sets the ImageOverride field's value. -func (s *StartBuildInput) SetImageOverride(v string) *StartBuildInput { - s.ImageOverride = &v - return s -} - -// SetImagePullCredentialsTypeOverride sets the ImagePullCredentialsTypeOverride field's value. -func (s *StartBuildInput) SetImagePullCredentialsTypeOverride(v string) *StartBuildInput { - s.ImagePullCredentialsTypeOverride = &v - return s -} - -// SetInsecureSslOverride sets the InsecureSslOverride field's value. -func (s *StartBuildInput) SetInsecureSslOverride(v bool) *StartBuildInput { - s.InsecureSslOverride = &v - return s -} - -// SetLogsConfigOverride sets the LogsConfigOverride field's value. -func (s *StartBuildInput) SetLogsConfigOverride(v *LogsConfig) *StartBuildInput { - s.LogsConfigOverride = v - return s -} - -// SetPrivilegedModeOverride sets the PrivilegedModeOverride field's value. -func (s *StartBuildInput) SetPrivilegedModeOverride(v bool) *StartBuildInput { - s.PrivilegedModeOverride = &v - return s -} - -// SetProjectName sets the ProjectName field's value. -func (s *StartBuildInput) SetProjectName(v string) *StartBuildInput { - s.ProjectName = &v - return s -} - -// SetQueuedTimeoutInMinutesOverride sets the QueuedTimeoutInMinutesOverride field's value. -func (s *StartBuildInput) SetQueuedTimeoutInMinutesOverride(v int64) *StartBuildInput { - s.QueuedTimeoutInMinutesOverride = &v - return s -} - -// SetRegistryCredentialOverride sets the RegistryCredentialOverride field's value. -func (s *StartBuildInput) SetRegistryCredentialOverride(v *RegistryCredential) *StartBuildInput { - s.RegistryCredentialOverride = v - return s -} - -// SetReportBuildStatusOverride sets the ReportBuildStatusOverride field's value. -func (s *StartBuildInput) SetReportBuildStatusOverride(v bool) *StartBuildInput { - s.ReportBuildStatusOverride = &v - return s -} - -// SetSecondaryArtifactsOverride sets the SecondaryArtifactsOverride field's value. -func (s *StartBuildInput) SetSecondaryArtifactsOverride(v []*ProjectArtifacts) *StartBuildInput { - s.SecondaryArtifactsOverride = v - return s -} - -// SetSecondarySourcesOverride sets the SecondarySourcesOverride field's value. -func (s *StartBuildInput) SetSecondarySourcesOverride(v []*ProjectSource) *StartBuildInput { - s.SecondarySourcesOverride = v - return s -} - -// SetSecondarySourcesVersionOverride sets the SecondarySourcesVersionOverride field's value. -func (s *StartBuildInput) SetSecondarySourcesVersionOverride(v []*ProjectSourceVersion) *StartBuildInput { - s.SecondarySourcesVersionOverride = v - return s -} - -// SetServiceRoleOverride sets the ServiceRoleOverride field's value. -func (s *StartBuildInput) SetServiceRoleOverride(v string) *StartBuildInput { - s.ServiceRoleOverride = &v - return s -} - -// SetSourceAuthOverride sets the SourceAuthOverride field's value. -func (s *StartBuildInput) SetSourceAuthOverride(v *SourceAuth) *StartBuildInput { - s.SourceAuthOverride = v - return s -} - -// SetSourceLocationOverride sets the SourceLocationOverride field's value. -func (s *StartBuildInput) SetSourceLocationOverride(v string) *StartBuildInput { - s.SourceLocationOverride = &v - return s -} - -// SetSourceTypeOverride sets the SourceTypeOverride field's value. -func (s *StartBuildInput) SetSourceTypeOverride(v string) *StartBuildInput { - s.SourceTypeOverride = &v - return s -} - -// SetSourceVersion sets the SourceVersion field's value. -func (s *StartBuildInput) SetSourceVersion(v string) *StartBuildInput { - s.SourceVersion = &v - return s -} - -// SetTimeoutInMinutesOverride sets the TimeoutInMinutesOverride field's value. -func (s *StartBuildInput) SetTimeoutInMinutesOverride(v int64) *StartBuildInput { - s.TimeoutInMinutesOverride = &v - return s -} - -type StartBuildOutput struct { - _ struct{} `type:"structure"` - - // Information about the build to be run. - Build *Build `locationName:"build" type:"structure"` -} - -// String returns the string representation -func (s StartBuildOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartBuildOutput) GoString() string { - return s.String() -} - -// SetBuild sets the Build field's value. -func (s *StartBuildOutput) SetBuild(v *Build) *StartBuildOutput { - s.Build = v - return s -} - -type StopBuildInput struct { - _ struct{} `type:"structure"` - - // The ID of the build. - // - // Id is a required field - Id *string `locationName:"id" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopBuildInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopBuildInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopBuildInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopBuildInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *StopBuildInput) SetId(v string) *StopBuildInput { - s.Id = &v - return s -} - -type StopBuildOutput struct { - _ struct{} `type:"structure"` - - // Information about the build. - Build *Build `locationName:"build" type:"structure"` -} - -// String returns the string representation -func (s StopBuildOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopBuildOutput) GoString() string { - return s.String() -} - -// SetBuild sets the Build field's value. -func (s *StopBuildOutput) SetBuild(v *Build) *StopBuildOutput { - s.Build = v - return s -} - -// A tag, consisting of a key and a value. -// -// This tag is available for use by AWS services that support tags in AWS CodeBuild. -type Tag struct { - _ struct{} `type:"structure"` - - // The tag's key. - Key *string `locationName:"key" min:"1" type:"string"` - - // The tag's value. - Value *string `locationName:"value" min:"1" type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type UpdateProjectInput struct { - _ struct{} `type:"structure"` - - // Information to be changed about the build output artifacts for the build - // project. - Artifacts *ProjectArtifacts `locationName:"artifacts" type:"structure"` - - // Set this to true to generate a publicly accessible URL for your project's - // build badge. - BadgeEnabled *bool `locationName:"badgeEnabled" type:"boolean"` - - // Stores recently used information so that it can be quickly accessed at a - // later time. - Cache *ProjectCache `locationName:"cache" type:"structure"` - - // A new or replacement description of the build project. - Description *string `locationName:"description" type:"string"` - - // The replacement AWS Key Management Service (AWS KMS) customer master key - // (CMK) to be used for encrypting the build output artifacts. - // - // You can specify either the Amazon Resource Name (ARN)of the CMK or, if available, - // the CMK's alias (using the format alias/alias-name). - EncryptionKey *string `locationName:"encryptionKey" min:"1" type:"string"` - - // Information to be changed about the build environment for the build project. - Environment *ProjectEnvironment `locationName:"environment" type:"structure"` - - // Information about logs for the build project. A project can create logs in - // Amazon CloudWatch Logs, logs in an S3 bucket, or both. - LogsConfig *LogsConfig `locationName:"logsConfig" type:"structure"` - - // The name of the build project. - // - // You cannot change a build project's name. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The number of minutes a build is allowed to be queued before it times out. - QueuedTimeoutInMinutes *int64 `locationName:"queuedTimeoutInMinutes" min:"5" type:"integer"` - - // An array of ProjectSource objects. - SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"` - - // An array of ProjectSource objects. - SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"` - - // The replacement ARN of the AWS Identity and Access Management (IAM) role - // that enables AWS CodeBuild to interact with dependent AWS services on behalf - // of the AWS account. - ServiceRole *string `locationName:"serviceRole" min:"1" type:"string"` - - // Information to be changed about the build input source code for the build - // project. - Source *ProjectSource `locationName:"source" type:"structure"` - - // The replacement set of tags for this build project. - // - // These tags are available for use by AWS services that support AWS CodeBuild - // build project tags. - Tags []*Tag `locationName:"tags" type:"list"` - - // The replacement value in minutes, from 5 to 480 (8 hours), for AWS CodeBuild - // to wait before timing out any related build that did not get marked as completed. - TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"5" type:"integer"` - - // VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC. - VpcConfig *VpcConfig `locationName:"vpcConfig" type:"structure"` -} - -// String returns the string representation -func (s UpdateProjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateProjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateProjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateProjectInput"} - if s.EncryptionKey != nil && len(*s.EncryptionKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EncryptionKey", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.QueuedTimeoutInMinutes != nil && *s.QueuedTimeoutInMinutes < 5 { - invalidParams.Add(request.NewErrParamMinValue("QueuedTimeoutInMinutes", 5)) - } - if s.ServiceRole != nil && len(*s.ServiceRole) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceRole", 1)) - } - if s.TimeoutInMinutes != nil && *s.TimeoutInMinutes < 5 { - invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutes", 5)) - } - if s.Artifacts != nil { - if err := s.Artifacts.Validate(); err != nil { - invalidParams.AddNested("Artifacts", err.(request.ErrInvalidParams)) - } - } - if s.Cache != nil { - if err := s.Cache.Validate(); err != nil { - invalidParams.AddNested("Cache", err.(request.ErrInvalidParams)) - } - } - if s.Environment != nil { - if err := s.Environment.Validate(); err != nil { - invalidParams.AddNested("Environment", err.(request.ErrInvalidParams)) - } - } - if s.LogsConfig != nil { - if err := s.LogsConfig.Validate(); err != nil { - invalidParams.AddNested("LogsConfig", err.(request.ErrInvalidParams)) - } - } - if s.SecondaryArtifacts != nil { - for i, v := range s.SecondaryArtifacts { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondaryArtifacts", i), err.(request.ErrInvalidParams)) - } - } - } - if s.SecondarySources != nil { - for i, v := range s.SecondarySources { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySources", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Source != nil { - if err := s.Source.Validate(); err != nil { - invalidParams.AddNested("Source", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - if s.VpcConfig != nil { - if err := s.VpcConfig.Validate(); err != nil { - invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArtifacts sets the Artifacts field's value. -func (s *UpdateProjectInput) SetArtifacts(v *ProjectArtifacts) *UpdateProjectInput { - s.Artifacts = v - return s -} - -// SetBadgeEnabled sets the BadgeEnabled field's value. -func (s *UpdateProjectInput) SetBadgeEnabled(v bool) *UpdateProjectInput { - s.BadgeEnabled = &v - return s -} - -// SetCache sets the Cache field's value. -func (s *UpdateProjectInput) SetCache(v *ProjectCache) *UpdateProjectInput { - s.Cache = v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateProjectInput) SetDescription(v string) *UpdateProjectInput { - s.Description = &v - return s -} - -// SetEncryptionKey sets the EncryptionKey field's value. -func (s *UpdateProjectInput) SetEncryptionKey(v string) *UpdateProjectInput { - s.EncryptionKey = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *UpdateProjectInput) SetEnvironment(v *ProjectEnvironment) *UpdateProjectInput { - s.Environment = v - return s -} - -// SetLogsConfig sets the LogsConfig field's value. -func (s *UpdateProjectInput) SetLogsConfig(v *LogsConfig) *UpdateProjectInput { - s.LogsConfig = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateProjectInput) SetName(v string) *UpdateProjectInput { - s.Name = &v - return s -} - -// SetQueuedTimeoutInMinutes sets the QueuedTimeoutInMinutes field's value. -func (s *UpdateProjectInput) SetQueuedTimeoutInMinutes(v int64) *UpdateProjectInput { - s.QueuedTimeoutInMinutes = &v - return s -} - -// SetSecondaryArtifacts sets the SecondaryArtifacts field's value. -func (s *UpdateProjectInput) SetSecondaryArtifacts(v []*ProjectArtifacts) *UpdateProjectInput { - s.SecondaryArtifacts = v - return s -} - -// SetSecondarySources sets the SecondarySources field's value. -func (s *UpdateProjectInput) SetSecondarySources(v []*ProjectSource) *UpdateProjectInput { - s.SecondarySources = v - return s -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *UpdateProjectInput) SetServiceRole(v string) *UpdateProjectInput { - s.ServiceRole = &v - return s -} - -// SetSource sets the Source field's value. -func (s *UpdateProjectInput) SetSource(v *ProjectSource) *UpdateProjectInput { - s.Source = v - return s -} - -// SetTags sets the Tags field's value. -func (s *UpdateProjectInput) SetTags(v []*Tag) *UpdateProjectInput { - s.Tags = v - return s -} - -// SetTimeoutInMinutes sets the TimeoutInMinutes field's value. -func (s *UpdateProjectInput) SetTimeoutInMinutes(v int64) *UpdateProjectInput { - s.TimeoutInMinutes = &v - return s -} - -// SetVpcConfig sets the VpcConfig field's value. -func (s *UpdateProjectInput) SetVpcConfig(v *VpcConfig) *UpdateProjectInput { - s.VpcConfig = v - return s -} - -type UpdateProjectOutput struct { - _ struct{} `type:"structure"` - - // Information about the build project that was changed. - Project *Project `locationName:"project" type:"structure"` -} - -// String returns the string representation -func (s UpdateProjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateProjectOutput) GoString() string { - return s.String() -} - -// SetProject sets the Project field's value. -func (s *UpdateProjectOutput) SetProject(v *Project) *UpdateProjectOutput { - s.Project = v - return s -} - -type UpdateWebhookInput struct { - _ struct{} `type:"structure"` - - // A regular expression used to determine which repository branches are built - // when a webhook is triggered. If the name of a branch matches the regular - // expression, then it is built. If branchFilter is empty, then all branches - // are built. - BranchFilter *string `locationName:"branchFilter" type:"string"` - - // The name of the AWS CodeBuild project. - // - // ProjectName is a required field - ProjectName *string `locationName:"projectName" min:"2" type:"string" required:"true"` - - // A boolean value that specifies whether the associated GitHub repository's - // secret token should be updated. If you use Bitbucket for your repository, - // rotateSecret is ignored. - RotateSecret *bool `locationName:"rotateSecret" type:"boolean"` -} - -// String returns the string representation -func (s UpdateWebhookInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateWebhookInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateWebhookInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateWebhookInput"} - if s.ProjectName == nil { - invalidParams.Add(request.NewErrParamRequired("ProjectName")) - } - if s.ProjectName != nil && len(*s.ProjectName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("ProjectName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBranchFilter sets the BranchFilter field's value. -func (s *UpdateWebhookInput) SetBranchFilter(v string) *UpdateWebhookInput { - s.BranchFilter = &v - return s -} - -// SetProjectName sets the ProjectName field's value. -func (s *UpdateWebhookInput) SetProjectName(v string) *UpdateWebhookInput { - s.ProjectName = &v - return s -} - -// SetRotateSecret sets the RotateSecret field's value. -func (s *UpdateWebhookInput) SetRotateSecret(v bool) *UpdateWebhookInput { - s.RotateSecret = &v - return s -} - -type UpdateWebhookOutput struct { - _ struct{} `type:"structure"` - - // Information about a repository's webhook that is associated with a project - // in AWS CodeBuild. - Webhook *Webhook `locationName:"webhook" type:"structure"` -} - -// String returns the string representation -func (s UpdateWebhookOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateWebhookOutput) GoString() string { - return s.String() -} - -// SetWebhook sets the Webhook field's value. -func (s *UpdateWebhookOutput) SetWebhook(v *Webhook) *UpdateWebhookOutput { - s.Webhook = v - return s -} - -// Information about the VPC configuration that AWS CodeBuild accesses. -type VpcConfig struct { - _ struct{} `type:"structure"` - - // A list of one or more security groups IDs in your Amazon VPC. - SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list"` - - // A list of one or more subnet IDs in your Amazon VPC. - Subnets []*string `locationName:"subnets" type:"list"` - - // The ID of the Amazon VPC. - VpcId *string `locationName:"vpcId" min:"1" type:"string"` -} - -// String returns the string representation -func (s VpcConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VpcConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VpcConfig"} - if s.VpcId != nil && len(*s.VpcId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VpcId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *VpcConfig) SetSecurityGroupIds(v []*string) *VpcConfig { - s.SecurityGroupIds = v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *VpcConfig) SetSubnets(v []*string) *VpcConfig { - s.Subnets = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *VpcConfig) SetVpcId(v string) *VpcConfig { - s.VpcId = &v - return s -} - -// Information about a webhook that connects repository events to a build project -// in AWS CodeBuild. -type Webhook struct { - _ struct{} `type:"structure"` - - // A regular expression used to determine which repository branches are built - // when a webhook is triggered. If the name of a branch matches the regular - // expression, then it is built. If branchFilter is empty, then all branches - // are built. - BranchFilter *string `locationName:"branchFilter" type:"string"` - - // A timestamp that indicates the last time a repository's secret token was - // modified. - LastModifiedSecret *time.Time `locationName:"lastModifiedSecret" type:"timestamp"` - - // The AWS CodeBuild endpoint where webhook events are sent. - PayloadUrl *string `locationName:"payloadUrl" min:"1" type:"string"` - - // The secret token of the associated repository. - // - // A Bitbucket webhook does not support secret. - Secret *string `locationName:"secret" min:"1" type:"string"` - - // The URL to the webhook. - Url *string `locationName:"url" min:"1" type:"string"` -} - -// String returns the string representation -func (s Webhook) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Webhook) GoString() string { - return s.String() -} - -// SetBranchFilter sets the BranchFilter field's value. -func (s *Webhook) SetBranchFilter(v string) *Webhook { - s.BranchFilter = &v - return s -} - -// SetLastModifiedSecret sets the LastModifiedSecret field's value. -func (s *Webhook) SetLastModifiedSecret(v time.Time) *Webhook { - s.LastModifiedSecret = &v - return s -} - -// SetPayloadUrl sets the PayloadUrl field's value. -func (s *Webhook) SetPayloadUrl(v string) *Webhook { - s.PayloadUrl = &v - return s -} - -// SetSecret sets the Secret field's value. -func (s *Webhook) SetSecret(v string) *Webhook { - s.Secret = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *Webhook) SetUrl(v string) *Webhook { - s.Url = &v - return s -} - -const ( - // ArtifactNamespaceNone is a ArtifactNamespace enum value - ArtifactNamespaceNone = "NONE" - - // ArtifactNamespaceBuildId is a ArtifactNamespace enum value - ArtifactNamespaceBuildId = "BUILD_ID" -) - -const ( - // ArtifactPackagingNone is a ArtifactPackaging enum value - ArtifactPackagingNone = "NONE" - - // ArtifactPackagingZip is a ArtifactPackaging enum value - ArtifactPackagingZip = "ZIP" -) - -const ( - // ArtifactsTypeCodepipeline is a ArtifactsType enum value - ArtifactsTypeCodepipeline = "CODEPIPELINE" - - // ArtifactsTypeS3 is a ArtifactsType enum value - ArtifactsTypeS3 = "S3" - - // ArtifactsTypeNoArtifacts is a ArtifactsType enum value - ArtifactsTypeNoArtifacts = "NO_ARTIFACTS" -) - -const ( - // AuthTypeOauth is a AuthType enum value - AuthTypeOauth = "OAUTH" - - // AuthTypeBasicAuth is a AuthType enum value - AuthTypeBasicAuth = "BASIC_AUTH" - - // AuthTypePersonalAccessToken is a AuthType enum value - AuthTypePersonalAccessToken = "PERSONAL_ACCESS_TOKEN" -) - -const ( - // BuildPhaseTypeSubmitted is a BuildPhaseType enum value - BuildPhaseTypeSubmitted = "SUBMITTED" - - // BuildPhaseTypeQueued is a BuildPhaseType enum value - BuildPhaseTypeQueued = "QUEUED" - - // BuildPhaseTypeProvisioning is a BuildPhaseType enum value - BuildPhaseTypeProvisioning = "PROVISIONING" - - // BuildPhaseTypeDownloadSource is a BuildPhaseType enum value - BuildPhaseTypeDownloadSource = "DOWNLOAD_SOURCE" - - // BuildPhaseTypeInstall is a BuildPhaseType enum value - BuildPhaseTypeInstall = "INSTALL" - - // BuildPhaseTypePreBuild is a BuildPhaseType enum value - BuildPhaseTypePreBuild = "PRE_BUILD" - - // BuildPhaseTypeBuild is a BuildPhaseType enum value - BuildPhaseTypeBuild = "BUILD" - - // BuildPhaseTypePostBuild is a BuildPhaseType enum value - BuildPhaseTypePostBuild = "POST_BUILD" - - // BuildPhaseTypeUploadArtifacts is a BuildPhaseType enum value - BuildPhaseTypeUploadArtifacts = "UPLOAD_ARTIFACTS" - - // BuildPhaseTypeFinalizing is a BuildPhaseType enum value - BuildPhaseTypeFinalizing = "FINALIZING" - - // BuildPhaseTypeCompleted is a BuildPhaseType enum value - BuildPhaseTypeCompleted = "COMPLETED" -) - -const ( - // CacheTypeNoCache is a CacheType enum value - CacheTypeNoCache = "NO_CACHE" - - // CacheTypeS3 is a CacheType enum value - CacheTypeS3 = "S3" -) - -const ( - // ComputeTypeBuildGeneral1Small is a ComputeType enum value - ComputeTypeBuildGeneral1Small = "BUILD_GENERAL1_SMALL" - - // ComputeTypeBuildGeneral1Medium is a ComputeType enum value - ComputeTypeBuildGeneral1Medium = "BUILD_GENERAL1_MEDIUM" - - // ComputeTypeBuildGeneral1Large is a ComputeType enum value - ComputeTypeBuildGeneral1Large = "BUILD_GENERAL1_LARGE" -) - -const ( - // CredentialProviderTypeSecretsManager is a CredentialProviderType enum value - CredentialProviderTypeSecretsManager = "SECRETS_MANAGER" -) - -const ( - // EnvironmentTypeWindowsContainer is a EnvironmentType enum value - EnvironmentTypeWindowsContainer = "WINDOWS_CONTAINER" - - // EnvironmentTypeLinuxContainer is a EnvironmentType enum value - EnvironmentTypeLinuxContainer = "LINUX_CONTAINER" -) - -const ( - // EnvironmentVariableTypePlaintext is a EnvironmentVariableType enum value - EnvironmentVariableTypePlaintext = "PLAINTEXT" - - // EnvironmentVariableTypeParameterStore is a EnvironmentVariableType enum value - EnvironmentVariableTypeParameterStore = "PARAMETER_STORE" -) - -const ( - // ImagePullCredentialsTypeCodebuild is a ImagePullCredentialsType enum value - ImagePullCredentialsTypeCodebuild = "CODEBUILD" - - // ImagePullCredentialsTypeServiceRole is a ImagePullCredentialsType enum value - ImagePullCredentialsTypeServiceRole = "SERVICE_ROLE" -) - -const ( - // LanguageTypeJava is a LanguageType enum value - LanguageTypeJava = "JAVA" - - // LanguageTypePython is a LanguageType enum value - LanguageTypePython = "PYTHON" - - // LanguageTypeNodeJs is a LanguageType enum value - LanguageTypeNodeJs = "NODE_JS" - - // LanguageTypeRuby is a LanguageType enum value - LanguageTypeRuby = "RUBY" - - // LanguageTypeGolang is a LanguageType enum value - LanguageTypeGolang = "GOLANG" - - // LanguageTypeDocker is a LanguageType enum value - LanguageTypeDocker = "DOCKER" - - // LanguageTypeAndroid is a LanguageType enum value - LanguageTypeAndroid = "ANDROID" - - // LanguageTypeDotnet is a LanguageType enum value - LanguageTypeDotnet = "DOTNET" - - // LanguageTypeBase is a LanguageType enum value - LanguageTypeBase = "BASE" - - // LanguageTypePhp is a LanguageType enum value - LanguageTypePhp = "PHP" -) - -const ( - // LogsConfigStatusTypeEnabled is a LogsConfigStatusType enum value - LogsConfigStatusTypeEnabled = "ENABLED" - - // LogsConfigStatusTypeDisabled is a LogsConfigStatusType enum value - LogsConfigStatusTypeDisabled = "DISABLED" -) - -const ( - // PlatformTypeDebian is a PlatformType enum value - PlatformTypeDebian = "DEBIAN" - - // PlatformTypeAmazonLinux is a PlatformType enum value - PlatformTypeAmazonLinux = "AMAZON_LINUX" - - // PlatformTypeUbuntu is a PlatformType enum value - PlatformTypeUbuntu = "UBUNTU" - - // PlatformTypeWindowsServer is a PlatformType enum value - PlatformTypeWindowsServer = "WINDOWS_SERVER" -) - -const ( - // ProjectSortByTypeName is a ProjectSortByType enum value - ProjectSortByTypeName = "NAME" - - // ProjectSortByTypeCreatedTime is a ProjectSortByType enum value - ProjectSortByTypeCreatedTime = "CREATED_TIME" - - // ProjectSortByTypeLastModifiedTime is a ProjectSortByType enum value - ProjectSortByTypeLastModifiedTime = "LAST_MODIFIED_TIME" -) - -const ( - // ServerTypeGithub is a ServerType enum value - ServerTypeGithub = "GITHUB" - - // ServerTypeBitbucket is a ServerType enum value - ServerTypeBitbucket = "BITBUCKET" - - // ServerTypeGithubEnterprise is a ServerType enum value - ServerTypeGithubEnterprise = "GITHUB_ENTERPRISE" -) - -const ( - // SortOrderTypeAscending is a SortOrderType enum value - SortOrderTypeAscending = "ASCENDING" - - // SortOrderTypeDescending is a SortOrderType enum value - SortOrderTypeDescending = "DESCENDING" -) - -const ( - // SourceAuthTypeOauth is a SourceAuthType enum value - SourceAuthTypeOauth = "OAUTH" -) - -const ( - // SourceTypeCodecommit is a SourceType enum value - SourceTypeCodecommit = "CODECOMMIT" - - // SourceTypeCodepipeline is a SourceType enum value - SourceTypeCodepipeline = "CODEPIPELINE" - - // SourceTypeGithub is a SourceType enum value - SourceTypeGithub = "GITHUB" - - // SourceTypeS3 is a SourceType enum value - SourceTypeS3 = "S3" - - // SourceTypeBitbucket is a SourceType enum value - SourceTypeBitbucket = "BITBUCKET" - - // SourceTypeGithubEnterprise is a SourceType enum value - SourceTypeGithubEnterprise = "GITHUB_ENTERPRISE" - - // SourceTypeNoSource is a SourceType enum value - SourceTypeNoSource = "NO_SOURCE" -) - -const ( - // StatusTypeSucceeded is a StatusType enum value - StatusTypeSucceeded = "SUCCEEDED" - - // StatusTypeFailed is a StatusType enum value - StatusTypeFailed = "FAILED" - - // StatusTypeFault is a StatusType enum value - StatusTypeFault = "FAULT" - - // StatusTypeTimedOut is a StatusType enum value - StatusTypeTimedOut = "TIMED_OUT" - - // StatusTypeInProgress is a StatusType enum value - StatusTypeInProgress = "IN_PROGRESS" - - // StatusTypeStopped is a StatusType enum value - StatusTypeStopped = "STOPPED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go deleted file mode 100644 index ac6bf6287..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package codebuild provides the client and types for making API -// requests to AWS CodeBuild. -// -// AWS CodeBuild is a fully managed build service in the cloud. AWS CodeBuild -// compiles your source code, runs unit tests, and produces artifacts that are -// ready to deploy. AWS CodeBuild eliminates the need to provision, manage, -// and scale your own build servers. It provides prepackaged build environments -// for the most popular programming languages and build tools, such as Apache -// Maven, Gradle, and more. You can also fully customize build environments -// in AWS CodeBuild to use your own build tools. AWS CodeBuild scales automatically -// to meet peak build requests. You pay only for the build time you consume. -// For more information about AWS CodeBuild, see the AWS CodeBuild User Guide. -// -// AWS CodeBuild supports these operations: -// -// * BatchDeleteBuilds: Deletes one or more builds. -// -// * BatchGetProjects: Gets information about one or more build projects. -// A build project defines how AWS CodeBuild runs a build. This includes -// information such as where to get the source code to build, the build environment -// to use, the build commands to run, and where to store the build output. -// A build environment is a representation of operating system, programming -// language runtime, and tools that AWS CodeBuild uses to run a build. You -// can add tags to build projects to help manage your resources and costs. -// -// * CreateProject: Creates a build project. -// -// * CreateWebhook: For an existing AWS CodeBuild build project that has -// its source code stored in a GitHub or Bitbucket repository, enables AWS -// CodeBuild to start rebuilding the source code every time a code change -// is pushed to the repository. -// -// * UpdateWebhook: Changes the settings of an existing webhook. -// -// * DeleteProject: Deletes a build project. -// -// * DeleteWebhook: For an existing AWS CodeBuild build project that has -// its source code stored in a GitHub or Bitbucket repository, stops AWS -// CodeBuild from rebuilding the source code every time a code change is -// pushed to the repository. -// -// * ListProjects: Gets a list of build project names, with each build project -// name representing a single build project. -// -// * UpdateProject: Changes the settings of an existing build project. -// -// * BatchGetBuilds: Gets information about one or more builds. -// -// * ListBuilds: Gets a list of build IDs, with each build ID representing -// a single build. -// -// * ListBuildsForProject: Gets a list of build IDs for the specified build -// project, with each build ID representing a single build. -// -// * StartBuild: Starts running a build. -// -// * StopBuild: Attempts to stop running a build. -// -// * ListCuratedEnvironmentImages: Gets information about Docker images that -// are managed by AWS CodeBuild. -// -// * DeleteSourceCredentials: Deletes a set of GitHub, GitHub Enterprise, -// or Bitbucket source credentials. -// -// * ImportSourceCredentials: Imports the source repository credentials for -// an AWS CodeBuild project that has its source code stored in a GitHub, -// GitHub Enterprise, or Bitbucket repository. -// -// * ListSourceCredentials: Returns a list of SourceCredentialsInfo objects. -// Each SourceCredentialsInfo object includes the authentication type, token -// ARN, and type of source provider for one set of credentials. -// -// See https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06 for more information on this service. -// -// See codebuild package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/codebuild/ -// -// Using the Client -// -// To contact AWS CodeBuild 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 CodeBuild client CodeBuild for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/codebuild/#New -package codebuild diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/errors.go deleted file mode 100644 index eba0333fb..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/errors.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package codebuild - -const ( - - // ErrCodeAccountLimitExceededException for service response error code - // "AccountLimitExceededException". - // - // An AWS service limit was exceeded for the calling AWS account. - ErrCodeAccountLimitExceededException = "AccountLimitExceededException" - - // ErrCodeInvalidInputException for service response error code - // "InvalidInputException". - // - // The input value that was provided is not valid. - ErrCodeInvalidInputException = "InvalidInputException" - - // ErrCodeOAuthProviderException for service response error code - // "OAuthProviderException". - // - // There was a problem with the underlying OAuth provider. - ErrCodeOAuthProviderException = "OAuthProviderException" - - // ErrCodeResourceAlreadyExistsException for service response error code - // "ResourceAlreadyExistsException". - // - // The specified AWS resource cannot be created, because an AWS resource with - // the same settings already exists. - ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The specified AWS resource cannot be found. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/service.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/service.go deleted file mode 100644 index b9ff2b6f7..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package codebuild - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// CodeBuild provides the API operation methods for making requests to -// AWS CodeBuild. See this package's package overview docs -// for details on the service. -// -// CodeBuild methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CodeBuild 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 = "codebuild" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "CodeBuild" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CodeBuild client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a CodeBuild client from just a session. -// svc := codebuild.New(mySession) -// -// // Create a CodeBuild client with additional configuration -// svc := codebuild.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CodeBuild { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CodeBuild { - svc := &CodeBuild{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2016-10-06", - JSONVersion: "1.1", - TargetPrefix: "CodeBuild_20161006", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CodeBuild operation and runs any -// custom request initialization. -func (c *CodeBuild) 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/codecommit/api.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go deleted file mode 100644 index a897e65b8..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go +++ /dev/null @@ -1,10845 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package codecommit - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opBatchGetRepositories = "BatchGetRepositories" - -// BatchGetRepositoriesRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetRepositories operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetRepositories for more information on using the BatchGetRepositories -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetRepositoriesRequest method. -// req, resp := client.BatchGetRepositoriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/BatchGetRepositories -func (c *CodeCommit) BatchGetRepositoriesRequest(input *BatchGetRepositoriesInput) (req *request.Request, output *BatchGetRepositoriesOutput) { - op := &request.Operation{ - Name: opBatchGetRepositories, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetRepositoriesInput{} - } - - output = &BatchGetRepositoriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetRepositories API operation for AWS CodeCommit. -// -// Returns information about one or more repositories. -// -// The description field for a repository accepts all HTML characters and all -// valid Unicode characters. Applications that do not HTML-encode the description -// and display it in a web page could expose users to potentially malicious -// code. Make sure that you HTML-encode the description field in any application -// that uses this API to display the repository description on a web page. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation BatchGetRepositories for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNamesRequiredException "RepositoryNamesRequiredException" -// A repository names object is required but was not specified. -// -// * ErrCodeMaximumRepositoryNamesExceededException "MaximumRepositoryNamesExceededException" -// The maximum number of allowed repository names was exceeded. Currently, this -// number is 25. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/BatchGetRepositories -func (c *CodeCommit) BatchGetRepositories(input *BatchGetRepositoriesInput) (*BatchGetRepositoriesOutput, error) { - req, out := c.BatchGetRepositoriesRequest(input) - return out, req.Send() -} - -// BatchGetRepositoriesWithContext is the same as BatchGetRepositories with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetRepositories for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) BatchGetRepositoriesWithContext(ctx aws.Context, input *BatchGetRepositoriesInput, opts ...request.Option) (*BatchGetRepositoriesOutput, error) { - req, out := c.BatchGetRepositoriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateBranch = "CreateBranch" - -// CreateBranchRequest generates a "aws/request.Request" representing the -// client's request for the CreateBranch operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateBranch for more information on using the CreateBranch -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateBranchRequest method. -// req, resp := client.CreateBranchRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/CreateBranch -func (c *CodeCommit) CreateBranchRequest(input *CreateBranchInput) (req *request.Request, output *CreateBranchOutput) { - op := &request.Operation{ - Name: opCreateBranch, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateBranchInput{} - } - - output = &CreateBranchOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateBranch API operation for AWS CodeCommit. -// -// Creates a new branch in a repository and points the branch to a commit. -// -// Calling the create branch operation does not set a repository's default branch. -// To do this, call the update default branch operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation CreateBranch for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeBranchNameRequiredException "BranchNameRequiredException" -// A branch name is required but was not specified. -// -// * ErrCodeBranchNameExistsException "BranchNameExistsException" -// The specified branch name already exists. -// -// * ErrCodeInvalidBranchNameException "InvalidBranchNameException" -// The specified reference name is not valid. -// -// * ErrCodeCommitIdRequiredException "CommitIdRequiredException" -// A commit ID was not specified. -// -// * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException" -// The specified commit does not exist or no commit was specified, and the specified -// repository has no default branch. -// -// * ErrCodeInvalidCommitIdException "InvalidCommitIdException" -// The specified commit ID is not valid. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/CreateBranch -func (c *CodeCommit) CreateBranch(input *CreateBranchInput) (*CreateBranchOutput, error) { - req, out := c.CreateBranchRequest(input) - return out, req.Send() -} - -// CreateBranchWithContext is the same as CreateBranch with the addition of -// the ability to pass a context and additional request options. -// -// See CreateBranch for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) CreateBranchWithContext(ctx aws.Context, input *CreateBranchInput, opts ...request.Option) (*CreateBranchOutput, error) { - req, out := c.CreateBranchRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePullRequest = "CreatePullRequest" - -// CreatePullRequestRequest generates a "aws/request.Request" representing the -// client's request for the CreatePullRequest operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePullRequest for more information on using the CreatePullRequest -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePullRequestRequest method. -// req, resp := client.CreatePullRequestRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/CreatePullRequest -func (c *CodeCommit) CreatePullRequestRequest(input *CreatePullRequestInput) (req *request.Request, output *CreatePullRequestOutput) { - op := &request.Operation{ - Name: opCreatePullRequest, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePullRequestInput{} - } - - output = &CreatePullRequestOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePullRequest API operation for AWS CodeCommit. -// -// Creates a pull request in the specified repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation CreatePullRequest for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// * ErrCodeClientRequestTokenRequiredException "ClientRequestTokenRequiredException" -// A client request token is required. A client request token is an unique, -// client-generated idempotency token that when provided in a request, ensures -// the request cannot be repeated with a changed parameter. If a request is -// received with the same parameters and a token is included, the request will -// return information about the initial request that used that token. -// -// * ErrCodeInvalidClientRequestTokenException "InvalidClientRequestTokenException" -// The client request token is not valid. -// -// * ErrCodeIdempotencyParameterMismatchException "IdempotencyParameterMismatchException" -// The client request token is not valid. Either the token is not in a valid -// format, or the token has been used in a previous request and cannot be re-used. -// -// * ErrCodeReferenceNameRequiredException "ReferenceNameRequiredException" -// A reference name is required, but none was provided. -// -// * ErrCodeInvalidReferenceNameException "InvalidReferenceNameException" -// The specified reference name format is not valid. Reference names must conform -// to the Git references format, for example refs/heads/master. For more information, -// see Git Internals - Git References (https://git-scm.com/book/en/v2/Git-Internals-Git-References) -// or consult your Git documentation. -// -// * ErrCodeReferenceDoesNotExistException "ReferenceDoesNotExistException" -// The specified reference does not exist. You must provide a full commit ID. -// -// * ErrCodeReferenceTypeNotSupportedException "ReferenceTypeNotSupportedException" -// The specified reference is not a supported type. -// -// * ErrCodeTitleRequiredException "TitleRequiredException" -// A pull request title is required. It cannot be empty or null. -// -// * ErrCodeInvalidTitleException "InvalidTitleException" -// The title of the pull request is not valid. Pull request titles cannot exceed -// 100 characters in length. -// -// * ErrCodeInvalidDescriptionException "InvalidDescriptionException" -// The pull request description is not valid. Descriptions are limited to 1,000 -// characters in length. -// -// * ErrCodeTargetsRequiredException "TargetsRequiredException" -// An array of target objects is required. It cannot be empty or null. -// -// * ErrCodeInvalidTargetsException "InvalidTargetsException" -// The targets for the pull request is not valid or not in a valid format. Targets -// are a list of target objects. Each target object must contain the full values -// for the repository name, source branch, and destination branch for a pull -// request. -// -// * ErrCodeTargetRequiredException "TargetRequiredException" -// A pull request target is required. It cannot be empty or null. A pull request -// target must contain the full values for the repository name, source branch, -// and destination branch for the pull request. -// -// * ErrCodeInvalidTargetException "InvalidTargetException" -// The target for the pull request is not valid. A target must contain the full -// values for the repository name, source branch, and destination branch for -// the pull request. -// -// * ErrCodeMultipleRepositoriesInPullRequestException "MultipleRepositoriesInPullRequestException" -// You cannot include more than one repository in a pull request. Make sure -// you have specified only one repository name in your request, and then try -// again. -// -// * ErrCodeMaximumOpenPullRequestsExceededException "MaximumOpenPullRequestsExceededException" -// You cannot create the pull request because the repository has too many open -// pull requests. The maximum number of open pull requests for a repository -// is 1,000. Close one or more open pull requests, and then try again. -// -// * ErrCodeSourceAndDestinationAreSameException "SourceAndDestinationAreSameException" -// The source branch and the destination branch for the pull request are the -// same. You must specify different branches for the source and destination. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/CreatePullRequest -func (c *CodeCommit) CreatePullRequest(input *CreatePullRequestInput) (*CreatePullRequestOutput, error) { - req, out := c.CreatePullRequestRequest(input) - return out, req.Send() -} - -// CreatePullRequestWithContext is the same as CreatePullRequest with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePullRequest for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) CreatePullRequestWithContext(ctx aws.Context, input *CreatePullRequestInput, opts ...request.Option) (*CreatePullRequestOutput, error) { - req, out := c.CreatePullRequestRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRepository = "CreateRepository" - -// CreateRepositoryRequest generates a "aws/request.Request" representing the -// client's request for the CreateRepository operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRepository for more information on using the CreateRepository -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRepositoryRequest method. -// req, resp := client.CreateRepositoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/CreateRepository -func (c *CodeCommit) CreateRepositoryRequest(input *CreateRepositoryInput) (req *request.Request, output *CreateRepositoryOutput) { - op := &request.Operation{ - Name: opCreateRepository, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRepositoryInput{} - } - - output = &CreateRepositoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRepository API operation for AWS CodeCommit. -// -// Creates a new, empty repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation CreateRepository for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameExistsException "RepositoryNameExistsException" -// The specified repository name already exists. -// -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeInvalidRepositoryDescriptionException "InvalidRepositoryDescriptionException" -// The specified repository description is not valid. -// -// * ErrCodeRepositoryLimitExceededException "RepositoryLimitExceededException" -// A repository resource limit was exceeded. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/CreateRepository -func (c *CodeCommit) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) { - req, out := c.CreateRepositoryRequest(input) - return out, req.Send() -} - -// CreateRepositoryWithContext is the same as CreateRepository with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRepository for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) CreateRepositoryWithContext(ctx aws.Context, input *CreateRepositoryInput, opts ...request.Option) (*CreateRepositoryOutput, error) { - req, out := c.CreateRepositoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBranch = "DeleteBranch" - -// DeleteBranchRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBranch operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBranch for more information on using the DeleteBranch -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBranchRequest method. -// req, resp := client.DeleteBranchRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteBranch -func (c *CodeCommit) DeleteBranchRequest(input *DeleteBranchInput) (req *request.Request, output *DeleteBranchOutput) { - op := &request.Operation{ - Name: opDeleteBranch, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteBranchInput{} - } - - output = &DeleteBranchOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteBranch API operation for AWS CodeCommit. -// -// Deletes a branch from a repository, unless that branch is the default branch -// for the repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation DeleteBranch for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeBranchNameRequiredException "BranchNameRequiredException" -// A branch name is required but was not specified. -// -// * ErrCodeInvalidBranchNameException "InvalidBranchNameException" -// The specified reference name is not valid. -// -// * ErrCodeDefaultBranchCannotBeDeletedException "DefaultBranchCannotBeDeletedException" -// The specified branch is the default branch for the repository, and cannot -// be deleted. To delete this branch, you must first set another branch as the -// default branch. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteBranch -func (c *CodeCommit) DeleteBranch(input *DeleteBranchInput) (*DeleteBranchOutput, error) { - req, out := c.DeleteBranchRequest(input) - return out, req.Send() -} - -// DeleteBranchWithContext is the same as DeleteBranch with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBranch for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) DeleteBranchWithContext(ctx aws.Context, input *DeleteBranchInput, opts ...request.Option) (*DeleteBranchOutput, error) { - req, out := c.DeleteBranchRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCommentContent = "DeleteCommentContent" - -// DeleteCommentContentRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCommentContent operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCommentContent for more information on using the DeleteCommentContent -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCommentContentRequest method. -// req, resp := client.DeleteCommentContentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteCommentContent -func (c *CodeCommit) DeleteCommentContentRequest(input *DeleteCommentContentInput) (req *request.Request, output *DeleteCommentContentOutput) { - op := &request.Operation{ - Name: opDeleteCommentContent, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCommentContentInput{} - } - - output = &DeleteCommentContentOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteCommentContent API operation for AWS CodeCommit. -// -// Deletes the content of a comment made on a change, file, or commit in a repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation DeleteCommentContent for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCommentDoesNotExistException "CommentDoesNotExistException" -// No comment exists with the provided ID. Verify that you have provided the -// correct ID, and then try again. -// -// * ErrCodeCommentIdRequiredException "CommentIdRequiredException" -// The comment ID is missing or null. A comment ID is required. -// -// * ErrCodeInvalidCommentIdException "InvalidCommentIdException" -// The comment ID is not in a valid format. Make sure that you have provided -// the full comment ID. -// -// * ErrCodeCommentDeletedException "CommentDeletedException" -// This comment has already been deleted. You cannot edit or delete a deleted -// comment. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteCommentContent -func (c *CodeCommit) DeleteCommentContent(input *DeleteCommentContentInput) (*DeleteCommentContentOutput, error) { - req, out := c.DeleteCommentContentRequest(input) - return out, req.Send() -} - -// DeleteCommentContentWithContext is the same as DeleteCommentContent with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCommentContent for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) DeleteCommentContentWithContext(ctx aws.Context, input *DeleteCommentContentInput, opts ...request.Option) (*DeleteCommentContentOutput, error) { - req, out := c.DeleteCommentContentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFile = "DeleteFile" - -// DeleteFileRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFile for more information on using the DeleteFile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFileRequest method. -// req, resp := client.DeleteFileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteFile -func (c *CodeCommit) DeleteFileRequest(input *DeleteFileInput) (req *request.Request, output *DeleteFileOutput) { - op := &request.Operation{ - Name: opDeleteFile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteFileInput{} - } - - output = &DeleteFileOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteFile API operation for AWS CodeCommit. -// -// Deletes a specified file from a specified branch. A commit is created on -// the branch that contains the revision. The file will still exist in the commits -// prior to the commit that contains the deletion. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation DeleteFile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeParentCommitIdRequiredException "ParentCommitIdRequiredException" -// A parent commit ID is required. To view the full commit ID of a branch in -// a repository, use GetBranch or a Git command (for example, git pull or git -// log). -// -// * ErrCodeInvalidParentCommitIdException "InvalidParentCommitIdException" -// The parent commit ID is not valid. The commit ID cannot be empty, and must -// match the head commit ID for the branch of the repository where you want -// to add or update a file. -// -// * ErrCodeParentCommitDoesNotExistException "ParentCommitDoesNotExistException" -// The parent commit ID is not valid because it does not exist. The specified -// parent commit ID does not exist in the specified branch of the repository. -// -// * ErrCodeParentCommitIdOutdatedException "ParentCommitIdOutdatedException" -// The file could not be added because the provided parent commit ID is not -// the current tip of the specified branch. To view the full commit ID of the -// current head of the branch, use GetBranch. -// -// * ErrCodePathRequiredException "PathRequiredException" -// The folderPath for a location cannot be null. -// -// * ErrCodeInvalidPathException "InvalidPathException" -// The specified path is not valid. -// -// * ErrCodeFileDoesNotExistException "FileDoesNotExistException" -// The specified file does not exist. Verify that you have provided the correct -// name of the file, including its full path and extension. -// -// * ErrCodeBranchNameRequiredException "BranchNameRequiredException" -// A branch name is required but was not specified. -// -// * ErrCodeInvalidBranchNameException "InvalidBranchNameException" -// The specified reference name is not valid. -// -// * ErrCodeBranchDoesNotExistException "BranchDoesNotExistException" -// The specified branch does not exist. -// -// * ErrCodeBranchNameIsTagNameException "BranchNameIsTagNameException" -// The specified branch name is not valid because it is a tag name. Type the -// name of a current branch in the repository. For a list of valid branch names, -// use ListBranches. -// -// * ErrCodeNameLengthExceededException "NameLengthExceededException" -// The user name is not valid because it has exceeded the character limit for -// file names. File names, including the path to the file, cannot exceed the -// character limit. -// -// * ErrCodeInvalidEmailException "InvalidEmailException" -// The specified email address either contains one or more characters that are -// not allowed, or it exceeds the maximum number of characters allowed for an -// email address. -// -// * ErrCodeCommitMessageLengthExceededException "CommitMessageLengthExceededException" -// The commit message is too long. Provide a shorter string. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteFile -func (c *CodeCommit) DeleteFile(input *DeleteFileInput) (*DeleteFileOutput, error) { - req, out := c.DeleteFileRequest(input) - return out, req.Send() -} - -// DeleteFileWithContext is the same as DeleteFile with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) DeleteFileWithContext(ctx aws.Context, input *DeleteFileInput, opts ...request.Option) (*DeleteFileOutput, error) { - req, out := c.DeleteFileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRepository = "DeleteRepository" - -// DeleteRepositoryRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRepository operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRepository for more information on using the DeleteRepository -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRepositoryRequest method. -// req, resp := client.DeleteRepositoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteRepository -func (c *CodeCommit) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *request.Request, output *DeleteRepositoryOutput) { - op := &request.Operation{ - Name: opDeleteRepository, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRepositoryInput{} - } - - output = &DeleteRepositoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRepository API operation for AWS CodeCommit. -// -// Deletes a repository. If a specified repository was already deleted, a null -// repository ID will be returned. -// -// Deleting a repository also deletes all associated objects and metadata. After -// a repository is deleted, all future push calls to the deleted repository -// will fail. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation DeleteRepository for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteRepository -func (c *CodeCommit) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) { - req, out := c.DeleteRepositoryRequest(input) - return out, req.Send() -} - -// DeleteRepositoryWithContext is the same as DeleteRepository with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRepository for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) DeleteRepositoryWithContext(ctx aws.Context, input *DeleteRepositoryInput, opts ...request.Option) (*DeleteRepositoryOutput, error) { - req, out := c.DeleteRepositoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribePullRequestEvents = "DescribePullRequestEvents" - -// DescribePullRequestEventsRequest generates a "aws/request.Request" representing the -// client's request for the DescribePullRequestEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePullRequestEvents for more information on using the DescribePullRequestEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePullRequestEventsRequest method. -// req, resp := client.DescribePullRequestEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DescribePullRequestEvents -func (c *CodeCommit) DescribePullRequestEventsRequest(input *DescribePullRequestEventsInput) (req *request.Request, output *DescribePullRequestEventsOutput) { - op := &request.Operation{ - Name: opDescribePullRequestEvents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribePullRequestEventsInput{} - } - - output = &DescribePullRequestEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePullRequestEvents API operation for AWS CodeCommit. -// -// Returns information about one or more pull request events. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation DescribePullRequestEvents for usage and error information. -// -// Returned Error Codes: -// * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException" -// The pull request ID could not be found. Make sure that you have specified -// the correct repository name and pull request ID, and then try again. -// -// * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException" -// The pull request ID is not valid. Make sure that you have provided the full -// ID and that the pull request is in the specified repository, and then try -// again. -// -// * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException" -// A pull request ID is required, but none was provided. -// -// * ErrCodeInvalidPullRequestEventTypeException "InvalidPullRequestEventTypeException" -// The pull request event type is not valid. -// -// * ErrCodeInvalidActorArnException "InvalidActorArnException" -// The Amazon Resource Name (ARN) is not valid. Make sure that you have provided -// the full ARN for the user who initiated the change for the pull request, -// and then try again. -// -// * ErrCodeActorDoesNotExistException "ActorDoesNotExistException" -// The specified Amazon Resource Name (ARN) does not exist in the AWS account. -// -// * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException" -// The specified number of maximum results is not valid. -// -// * ErrCodeInvalidContinuationTokenException "InvalidContinuationTokenException" -// The specified continuation token is not valid. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DescribePullRequestEvents -func (c *CodeCommit) DescribePullRequestEvents(input *DescribePullRequestEventsInput) (*DescribePullRequestEventsOutput, error) { - req, out := c.DescribePullRequestEventsRequest(input) - return out, req.Send() -} - -// DescribePullRequestEventsWithContext is the same as DescribePullRequestEvents with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePullRequestEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) DescribePullRequestEventsWithContext(ctx aws.Context, input *DescribePullRequestEventsInput, opts ...request.Option) (*DescribePullRequestEventsOutput, error) { - req, out := c.DescribePullRequestEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribePullRequestEventsPages iterates over the pages of a DescribePullRequestEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribePullRequestEvents 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 DescribePullRequestEvents operation. -// pageNum := 0 -// err := client.DescribePullRequestEventsPages(params, -// func(page *DescribePullRequestEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CodeCommit) DescribePullRequestEventsPages(input *DescribePullRequestEventsInput, fn func(*DescribePullRequestEventsOutput, bool) bool) error { - return c.DescribePullRequestEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribePullRequestEventsPagesWithContext same as DescribePullRequestEventsPages 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 *CodeCommit) DescribePullRequestEventsPagesWithContext(ctx aws.Context, input *DescribePullRequestEventsInput, fn func(*DescribePullRequestEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribePullRequestEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribePullRequestEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribePullRequestEventsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetBlob = "GetBlob" - -// GetBlobRequest generates a "aws/request.Request" representing the -// client's request for the GetBlob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBlob for more information on using the GetBlob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBlobRequest method. -// req, resp := client.GetBlobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetBlob -func (c *CodeCommit) GetBlobRequest(input *GetBlobInput) (req *request.Request, output *GetBlobOutput) { - op := &request.Operation{ - Name: opGetBlob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetBlobInput{} - } - - output = &GetBlobOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBlob API operation for AWS CodeCommit. -// -// Returns the base-64 encoded content of an individual blob within a repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation GetBlob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeBlobIdRequiredException "BlobIdRequiredException" -// A blob ID is required but was not specified. -// -// * ErrCodeInvalidBlobIdException "InvalidBlobIdException" -// The specified blob is not valid. -// -// * ErrCodeBlobIdDoesNotExistException "BlobIdDoesNotExistException" -// The specified blob does not exist. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// * ErrCodeFileTooLargeException "FileTooLargeException" -// The specified file exceeds the file size limit for AWS CodeCommit. For more -// information about limits in AWS CodeCommit, see AWS CodeCommit User Guide -// (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetBlob -func (c *CodeCommit) GetBlob(input *GetBlobInput) (*GetBlobOutput, error) { - req, out := c.GetBlobRequest(input) - return out, req.Send() -} - -// GetBlobWithContext is the same as GetBlob with the addition of -// the ability to pass a context and additional request options. -// -// See GetBlob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) GetBlobWithContext(ctx aws.Context, input *GetBlobInput, opts ...request.Option) (*GetBlobOutput, error) { - req, out := c.GetBlobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBranch = "GetBranch" - -// GetBranchRequest generates a "aws/request.Request" representing the -// client's request for the GetBranch operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBranch for more information on using the GetBranch -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBranchRequest method. -// req, resp := client.GetBranchRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetBranch -func (c *CodeCommit) GetBranchRequest(input *GetBranchInput) (req *request.Request, output *GetBranchOutput) { - op := &request.Operation{ - Name: opGetBranch, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetBranchInput{} - } - - output = &GetBranchOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBranch API operation for AWS CodeCommit. -// -// Returns information about a repository branch, including its name and the -// last commit ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation GetBranch for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeBranchNameRequiredException "BranchNameRequiredException" -// A branch name is required but was not specified. -// -// * ErrCodeInvalidBranchNameException "InvalidBranchNameException" -// The specified reference name is not valid. -// -// * ErrCodeBranchDoesNotExistException "BranchDoesNotExistException" -// The specified branch does not exist. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetBranch -func (c *CodeCommit) GetBranch(input *GetBranchInput) (*GetBranchOutput, error) { - req, out := c.GetBranchRequest(input) - return out, req.Send() -} - -// GetBranchWithContext is the same as GetBranch with the addition of -// the ability to pass a context and additional request options. -// -// See GetBranch for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) GetBranchWithContext(ctx aws.Context, input *GetBranchInput, opts ...request.Option) (*GetBranchOutput, error) { - req, out := c.GetBranchRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetComment = "GetComment" - -// GetCommentRequest generates a "aws/request.Request" representing the -// client's request for the GetComment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetComment for more information on using the GetComment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCommentRequest method. -// req, resp := client.GetCommentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetComment -func (c *CodeCommit) GetCommentRequest(input *GetCommentInput) (req *request.Request, output *GetCommentOutput) { - op := &request.Operation{ - Name: opGetComment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCommentInput{} - } - - output = &GetCommentOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetComment API operation for AWS CodeCommit. -// -// Returns the content of a comment made on a change, file, or commit in a repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation GetComment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCommentDoesNotExistException "CommentDoesNotExistException" -// No comment exists with the provided ID. Verify that you have provided the -// correct ID, and then try again. -// -// * ErrCodeCommentIdRequiredException "CommentIdRequiredException" -// The comment ID is missing or null. A comment ID is required. -// -// * ErrCodeInvalidCommentIdException "InvalidCommentIdException" -// The comment ID is not in a valid format. Make sure that you have provided -// the full comment ID. -// -// * ErrCodeCommentDeletedException "CommentDeletedException" -// This comment has already been deleted. You cannot edit or delete a deleted -// comment. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetComment -func (c *CodeCommit) GetComment(input *GetCommentInput) (*GetCommentOutput, error) { - req, out := c.GetCommentRequest(input) - return out, req.Send() -} - -// GetCommentWithContext is the same as GetComment with the addition of -// the ability to pass a context and additional request options. -// -// See GetComment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) GetCommentWithContext(ctx aws.Context, input *GetCommentInput, opts ...request.Option) (*GetCommentOutput, error) { - req, out := c.GetCommentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCommentsForComparedCommit = "GetCommentsForComparedCommit" - -// GetCommentsForComparedCommitRequest generates a "aws/request.Request" representing the -// client's request for the GetCommentsForComparedCommit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCommentsForComparedCommit for more information on using the GetCommentsForComparedCommit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCommentsForComparedCommitRequest method. -// req, resp := client.GetCommentsForComparedCommitRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetCommentsForComparedCommit -func (c *CodeCommit) GetCommentsForComparedCommitRequest(input *GetCommentsForComparedCommitInput) (req *request.Request, output *GetCommentsForComparedCommitOutput) { - op := &request.Operation{ - Name: opGetCommentsForComparedCommit, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetCommentsForComparedCommitInput{} - } - - output = &GetCommentsForComparedCommitOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCommentsForComparedCommit API operation for AWS CodeCommit. -// -// Returns information about comments made on the comparison between two commits. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation GetCommentsForComparedCommit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeCommitIdRequiredException "CommitIdRequiredException" -// A commit ID was not specified. -// -// * ErrCodeInvalidCommitIdException "InvalidCommitIdException" -// The specified commit ID is not valid. -// -// * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException" -// The specified commit does not exist or no commit was specified, and the specified -// repository has no default branch. -// -// * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException" -// The specified number of maximum results is not valid. -// -// * ErrCodeInvalidContinuationTokenException "InvalidContinuationTokenException" -// The specified continuation token is not valid. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetCommentsForComparedCommit -func (c *CodeCommit) GetCommentsForComparedCommit(input *GetCommentsForComparedCommitInput) (*GetCommentsForComparedCommitOutput, error) { - req, out := c.GetCommentsForComparedCommitRequest(input) - return out, req.Send() -} - -// GetCommentsForComparedCommitWithContext is the same as GetCommentsForComparedCommit with the addition of -// the ability to pass a context and additional request options. -// -// See GetCommentsForComparedCommit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) GetCommentsForComparedCommitWithContext(ctx aws.Context, input *GetCommentsForComparedCommitInput, opts ...request.Option) (*GetCommentsForComparedCommitOutput, error) { - req, out := c.GetCommentsForComparedCommitRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetCommentsForComparedCommitPages iterates over the pages of a GetCommentsForComparedCommit operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetCommentsForComparedCommit 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 GetCommentsForComparedCommit operation. -// pageNum := 0 -// err := client.GetCommentsForComparedCommitPages(params, -// func(page *GetCommentsForComparedCommitOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CodeCommit) GetCommentsForComparedCommitPages(input *GetCommentsForComparedCommitInput, fn func(*GetCommentsForComparedCommitOutput, bool) bool) error { - return c.GetCommentsForComparedCommitPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetCommentsForComparedCommitPagesWithContext same as GetCommentsForComparedCommitPages 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 *CodeCommit) GetCommentsForComparedCommitPagesWithContext(ctx aws.Context, input *GetCommentsForComparedCommitInput, fn func(*GetCommentsForComparedCommitOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetCommentsForComparedCommitInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetCommentsForComparedCommitRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetCommentsForComparedCommitOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetCommentsForPullRequest = "GetCommentsForPullRequest" - -// GetCommentsForPullRequestRequest generates a "aws/request.Request" representing the -// client's request for the GetCommentsForPullRequest operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCommentsForPullRequest for more information on using the GetCommentsForPullRequest -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCommentsForPullRequestRequest method. -// req, resp := client.GetCommentsForPullRequestRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetCommentsForPullRequest -func (c *CodeCommit) GetCommentsForPullRequestRequest(input *GetCommentsForPullRequestInput) (req *request.Request, output *GetCommentsForPullRequestOutput) { - op := &request.Operation{ - Name: opGetCommentsForPullRequest, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetCommentsForPullRequestInput{} - } - - output = &GetCommentsForPullRequestOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCommentsForPullRequest API operation for AWS CodeCommit. -// -// Returns comments made on a pull request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation GetCommentsForPullRequest for usage and error information. -// -// Returned Error Codes: -// * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException" -// A pull request ID is required, but none was provided. -// -// * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException" -// The pull request ID could not be found. Make sure that you have specified -// the correct repository name and pull request ID, and then try again. -// -// * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException" -// The pull request ID is not valid. Make sure that you have provided the full -// ID and that the pull request is in the specified repository, and then try -// again. -// -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeCommitIdRequiredException "CommitIdRequiredException" -// A commit ID was not specified. -// -// * ErrCodeInvalidCommitIdException "InvalidCommitIdException" -// The specified commit ID is not valid. -// -// * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException" -// The specified commit does not exist or no commit was specified, and the specified -// repository has no default branch. -// -// * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException" -// The specified number of maximum results is not valid. -// -// * ErrCodeInvalidContinuationTokenException "InvalidContinuationTokenException" -// The specified continuation token is not valid. -// -// * ErrCodeRepositoryNotAssociatedWithPullRequestException "RepositoryNotAssociatedWithPullRequestException" -// The repository does not contain any pull requests with that pull request -// ID. Check to make sure you have provided the correct repository name for -// the pull request. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetCommentsForPullRequest -func (c *CodeCommit) GetCommentsForPullRequest(input *GetCommentsForPullRequestInput) (*GetCommentsForPullRequestOutput, error) { - req, out := c.GetCommentsForPullRequestRequest(input) - return out, req.Send() -} - -// GetCommentsForPullRequestWithContext is the same as GetCommentsForPullRequest with the addition of -// the ability to pass a context and additional request options. -// -// See GetCommentsForPullRequest for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) GetCommentsForPullRequestWithContext(ctx aws.Context, input *GetCommentsForPullRequestInput, opts ...request.Option) (*GetCommentsForPullRequestOutput, error) { - req, out := c.GetCommentsForPullRequestRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetCommentsForPullRequestPages iterates over the pages of a GetCommentsForPullRequest operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetCommentsForPullRequest 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 GetCommentsForPullRequest operation. -// pageNum := 0 -// err := client.GetCommentsForPullRequestPages(params, -// func(page *GetCommentsForPullRequestOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CodeCommit) GetCommentsForPullRequestPages(input *GetCommentsForPullRequestInput, fn func(*GetCommentsForPullRequestOutput, bool) bool) error { - return c.GetCommentsForPullRequestPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetCommentsForPullRequestPagesWithContext same as GetCommentsForPullRequestPages 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 *CodeCommit) GetCommentsForPullRequestPagesWithContext(ctx aws.Context, input *GetCommentsForPullRequestInput, fn func(*GetCommentsForPullRequestOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetCommentsForPullRequestInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetCommentsForPullRequestRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetCommentsForPullRequestOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetCommit = "GetCommit" - -// GetCommitRequest generates a "aws/request.Request" representing the -// client's request for the GetCommit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCommit for more information on using the GetCommit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCommitRequest method. -// req, resp := client.GetCommitRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetCommit -func (c *CodeCommit) GetCommitRequest(input *GetCommitInput) (req *request.Request, output *GetCommitOutput) { - op := &request.Operation{ - Name: opGetCommit, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCommitInput{} - } - - output = &GetCommitOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCommit API operation for AWS CodeCommit. -// -// Returns information about a commit, including commit message and committer -// information. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation GetCommit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeCommitIdRequiredException "CommitIdRequiredException" -// A commit ID was not specified. -// -// * ErrCodeInvalidCommitIdException "InvalidCommitIdException" -// The specified commit ID is not valid. -// -// * ErrCodeCommitIdDoesNotExistException "CommitIdDoesNotExistException" -// The specified commit ID does not exist. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetCommit -func (c *CodeCommit) GetCommit(input *GetCommitInput) (*GetCommitOutput, error) { - req, out := c.GetCommitRequest(input) - return out, req.Send() -} - -// GetCommitWithContext is the same as GetCommit with the addition of -// the ability to pass a context and additional request options. -// -// See GetCommit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) GetCommitWithContext(ctx aws.Context, input *GetCommitInput, opts ...request.Option) (*GetCommitOutput, error) { - req, out := c.GetCommitRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDifferences = "GetDifferences" - -// GetDifferencesRequest generates a "aws/request.Request" representing the -// client's request for the GetDifferences operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDifferences for more information on using the GetDifferences -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDifferencesRequest method. -// req, resp := client.GetDifferencesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetDifferences -func (c *CodeCommit) GetDifferencesRequest(input *GetDifferencesInput) (req *request.Request, output *GetDifferencesOutput) { - op := &request.Operation{ - Name: opGetDifferences, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetDifferencesInput{} - } - - output = &GetDifferencesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDifferences API operation for AWS CodeCommit. -// -// Returns information about the differences in a valid commit specifier (such -// as a branch, tag, HEAD, commit ID or other fully qualified reference). Results -// can be limited to a specified path. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation GetDifferences for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeInvalidContinuationTokenException "InvalidContinuationTokenException" -// The specified continuation token is not valid. -// -// * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException" -// The specified number of maximum results is not valid. -// -// * ErrCodeInvalidCommitIdException "InvalidCommitIdException" -// The specified commit ID is not valid. -// -// * ErrCodeCommitRequiredException "CommitRequiredException" -// A commit was not specified. -// -// * ErrCodeInvalidCommitException "InvalidCommitException" -// The specified commit is not valid. -// -// * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException" -// The specified commit does not exist or no commit was specified, and the specified -// repository has no default branch. -// -// * ErrCodeInvalidPathException "InvalidPathException" -// The specified path is not valid. -// -// * ErrCodePathDoesNotExistException "PathDoesNotExistException" -// The specified path does not exist. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetDifferences -func (c *CodeCommit) GetDifferences(input *GetDifferencesInput) (*GetDifferencesOutput, error) { - req, out := c.GetDifferencesRequest(input) - return out, req.Send() -} - -// GetDifferencesWithContext is the same as GetDifferences with the addition of -// the ability to pass a context and additional request options. -// -// See GetDifferences for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) GetDifferencesWithContext(ctx aws.Context, input *GetDifferencesInput, opts ...request.Option) (*GetDifferencesOutput, error) { - req, out := c.GetDifferencesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetDifferencesPages iterates over the pages of a GetDifferences operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetDifferences 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 GetDifferences operation. -// pageNum := 0 -// err := client.GetDifferencesPages(params, -// func(page *GetDifferencesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CodeCommit) GetDifferencesPages(input *GetDifferencesInput, fn func(*GetDifferencesOutput, bool) bool) error { - return c.GetDifferencesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetDifferencesPagesWithContext same as GetDifferencesPages 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 *CodeCommit) GetDifferencesPagesWithContext(ctx aws.Context, input *GetDifferencesInput, fn func(*GetDifferencesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetDifferencesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetDifferencesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetDifferencesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetFile = "GetFile" - -// GetFileRequest generates a "aws/request.Request" representing the -// client's request for the GetFile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetFile for more information on using the GetFile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetFileRequest method. -// req, resp := client.GetFileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFile -func (c *CodeCommit) GetFileRequest(input *GetFileInput) (req *request.Request, output *GetFileOutput) { - op := &request.Operation{ - Name: opGetFile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetFileInput{} - } - - output = &GetFileOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFile API operation for AWS CodeCommit. -// -// Returns the base-64 encoded contents of a specified file and its metadata. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation GetFile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeInvalidCommitException "InvalidCommitException" -// The specified commit is not valid. -// -// * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException" -// The specified commit does not exist or no commit was specified, and the specified -// repository has no default branch. -// -// * ErrCodePathRequiredException "PathRequiredException" -// The folderPath for a location cannot be null. -// -// * ErrCodeInvalidPathException "InvalidPathException" -// The specified path is not valid. -// -// * ErrCodeFileDoesNotExistException "FileDoesNotExistException" -// The specified file does not exist. Verify that you have provided the correct -// name of the file, including its full path and extension. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// * ErrCodeFileTooLargeException "FileTooLargeException" -// The specified file exceeds the file size limit for AWS CodeCommit. For more -// information about limits in AWS CodeCommit, see AWS CodeCommit User Guide -// (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFile -func (c *CodeCommit) GetFile(input *GetFileInput) (*GetFileOutput, error) { - req, out := c.GetFileRequest(input) - return out, req.Send() -} - -// GetFileWithContext is the same as GetFile with the addition of -// the ability to pass a context and additional request options. -// -// See GetFile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) GetFileWithContext(ctx aws.Context, input *GetFileInput, opts ...request.Option) (*GetFileOutput, error) { - req, out := c.GetFileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFolder = "GetFolder" - -// GetFolderRequest generates a "aws/request.Request" representing the -// client's request for the GetFolder operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetFolder for more information on using the GetFolder -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetFolderRequest method. -// req, resp := client.GetFolderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFolder -func (c *CodeCommit) GetFolderRequest(input *GetFolderInput) (req *request.Request, output *GetFolderOutput) { - op := &request.Operation{ - Name: opGetFolder, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetFolderInput{} - } - - output = &GetFolderOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFolder API operation for AWS CodeCommit. -// -// Returns the contents of a specified folder in a repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation GetFolder for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeInvalidCommitException "InvalidCommitException" -// The specified commit is not valid. -// -// * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException" -// The specified commit does not exist or no commit was specified, and the specified -// repository has no default branch. -// -// * ErrCodePathRequiredException "PathRequiredException" -// The folderPath for a location cannot be null. -// -// * ErrCodeInvalidPathException "InvalidPathException" -// The specified path is not valid. -// -// * ErrCodeFolderDoesNotExistException "FolderDoesNotExistException" -// The specified folder does not exist. Either the folder name is not correct, -// or you did not provide the full path to the folder. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFolder -func (c *CodeCommit) GetFolder(input *GetFolderInput) (*GetFolderOutput, error) { - req, out := c.GetFolderRequest(input) - return out, req.Send() -} - -// GetFolderWithContext is the same as GetFolder with the addition of -// the ability to pass a context and additional request options. -// -// See GetFolder for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) GetFolderWithContext(ctx aws.Context, input *GetFolderInput, opts ...request.Option) (*GetFolderOutput, error) { - req, out := c.GetFolderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMergeConflicts = "GetMergeConflicts" - -// GetMergeConflictsRequest generates a "aws/request.Request" representing the -// client's request for the GetMergeConflicts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMergeConflicts for more information on using the GetMergeConflicts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMergeConflictsRequest method. -// req, resp := client.GetMergeConflictsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetMergeConflicts -func (c *CodeCommit) GetMergeConflictsRequest(input *GetMergeConflictsInput) (req *request.Request, output *GetMergeConflictsOutput) { - op := &request.Operation{ - Name: opGetMergeConflicts, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetMergeConflictsInput{} - } - - output = &GetMergeConflictsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMergeConflicts API operation for AWS CodeCommit. -// -// Returns information about merge conflicts between the before and after commit -// IDs for a pull request in a repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation GetMergeConflicts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeMergeOptionRequiredException "MergeOptionRequiredException" -// A merge option or stategy is required, and none was provided. -// -// * ErrCodeInvalidMergeOptionException "InvalidMergeOptionException" -// The specified merge option is not valid. The only valid value is FAST_FORWARD_MERGE. -// -// * ErrCodeInvalidDestinationCommitSpecifierException "InvalidDestinationCommitSpecifierException" -// The destination commit specifier is not valid. You must provide a valid branch -// name, tag, or full commit ID. -// -// * ErrCodeInvalidSourceCommitSpecifierException "InvalidSourceCommitSpecifierException" -// The source commit specifier is not valid. You must provide a valid branch -// name, tag, or full commit ID. -// -// * ErrCodeCommitRequiredException "CommitRequiredException" -// A commit was not specified. -// -// * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException" -// The specified commit does not exist or no commit was specified, and the specified -// repository has no default branch. -// -// * ErrCodeInvalidCommitException "InvalidCommitException" -// The specified commit is not valid. -// -// * ErrCodeTipsDivergenceExceededException "TipsDivergenceExceededException" -// The divergence between the tips of the provided commit specifiers is too -// great to determine whether there might be any merge conflicts. Locally compare -// the specifiers using git diff or a diff tool. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetMergeConflicts -func (c *CodeCommit) GetMergeConflicts(input *GetMergeConflictsInput) (*GetMergeConflictsOutput, error) { - req, out := c.GetMergeConflictsRequest(input) - return out, req.Send() -} - -// GetMergeConflictsWithContext is the same as GetMergeConflicts with the addition of -// the ability to pass a context and additional request options. -// -// See GetMergeConflicts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) GetMergeConflictsWithContext(ctx aws.Context, input *GetMergeConflictsInput, opts ...request.Option) (*GetMergeConflictsOutput, error) { - req, out := c.GetMergeConflictsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPullRequest = "GetPullRequest" - -// GetPullRequestRequest generates a "aws/request.Request" representing the -// client's request for the GetPullRequest operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPullRequest for more information on using the GetPullRequest -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPullRequestRequest method. -// req, resp := client.GetPullRequestRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetPullRequest -func (c *CodeCommit) GetPullRequestRequest(input *GetPullRequestInput) (req *request.Request, output *GetPullRequestOutput) { - op := &request.Operation{ - Name: opGetPullRequest, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPullRequestInput{} - } - - output = &GetPullRequestOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPullRequest API operation for AWS CodeCommit. -// -// Gets information about a pull request in a specified repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation GetPullRequest for usage and error information. -// -// Returned Error Codes: -// * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException" -// The pull request ID could not be found. Make sure that you have specified -// the correct repository name and pull request ID, and then try again. -// -// * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException" -// The pull request ID is not valid. Make sure that you have provided the full -// ID and that the pull request is in the specified repository, and then try -// again. -// -// * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException" -// A pull request ID is required, but none was provided. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetPullRequest -func (c *CodeCommit) GetPullRequest(input *GetPullRequestInput) (*GetPullRequestOutput, error) { - req, out := c.GetPullRequestRequest(input) - return out, req.Send() -} - -// GetPullRequestWithContext is the same as GetPullRequest with the addition of -// the ability to pass a context and additional request options. -// -// See GetPullRequest for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) GetPullRequestWithContext(ctx aws.Context, input *GetPullRequestInput, opts ...request.Option) (*GetPullRequestOutput, error) { - req, out := c.GetPullRequestRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRepository = "GetRepository" - -// GetRepositoryRequest generates a "aws/request.Request" representing the -// client's request for the GetRepository operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRepository for more information on using the GetRepository -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRepositoryRequest method. -// req, resp := client.GetRepositoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetRepository -func (c *CodeCommit) GetRepositoryRequest(input *GetRepositoryInput) (req *request.Request, output *GetRepositoryOutput) { - op := &request.Operation{ - Name: opGetRepository, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRepositoryInput{} - } - - output = &GetRepositoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRepository API operation for AWS CodeCommit. -// -// Returns information about a repository. -// -// The description field for a repository accepts all HTML characters and all -// valid Unicode characters. Applications that do not HTML-encode the description -// and display it in a web page could expose users to potentially malicious -// code. Make sure that you HTML-encode the description field in any application -// that uses this API to display the repository description on a web page. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation GetRepository for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetRepository -func (c *CodeCommit) GetRepository(input *GetRepositoryInput) (*GetRepositoryOutput, error) { - req, out := c.GetRepositoryRequest(input) - return out, req.Send() -} - -// GetRepositoryWithContext is the same as GetRepository with the addition of -// the ability to pass a context and additional request options. -// -// See GetRepository for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) GetRepositoryWithContext(ctx aws.Context, input *GetRepositoryInput, opts ...request.Option) (*GetRepositoryOutput, error) { - req, out := c.GetRepositoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRepositoryTriggers = "GetRepositoryTriggers" - -// GetRepositoryTriggersRequest generates a "aws/request.Request" representing the -// client's request for the GetRepositoryTriggers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRepositoryTriggers for more information on using the GetRepositoryTriggers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRepositoryTriggersRequest method. -// req, resp := client.GetRepositoryTriggersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetRepositoryTriggers -func (c *CodeCommit) GetRepositoryTriggersRequest(input *GetRepositoryTriggersInput) (req *request.Request, output *GetRepositoryTriggersOutput) { - op := &request.Operation{ - Name: opGetRepositoryTriggers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRepositoryTriggersInput{} - } - - output = &GetRepositoryTriggersOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRepositoryTriggers API operation for AWS CodeCommit. -// -// Gets information about triggers configured for a repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation GetRepositoryTriggers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetRepositoryTriggers -func (c *CodeCommit) GetRepositoryTriggers(input *GetRepositoryTriggersInput) (*GetRepositoryTriggersOutput, error) { - req, out := c.GetRepositoryTriggersRequest(input) - return out, req.Send() -} - -// GetRepositoryTriggersWithContext is the same as GetRepositoryTriggers with the addition of -// the ability to pass a context and additional request options. -// -// See GetRepositoryTriggers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) GetRepositoryTriggersWithContext(ctx aws.Context, input *GetRepositoryTriggersInput, opts ...request.Option) (*GetRepositoryTriggersOutput, error) { - req, out := c.GetRepositoryTriggersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListBranches = "ListBranches" - -// ListBranchesRequest generates a "aws/request.Request" representing the -// client's request for the ListBranches operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListBranches for more information on using the ListBranches -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListBranchesRequest method. -// req, resp := client.ListBranchesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/ListBranches -func (c *CodeCommit) ListBranchesRequest(input *ListBranchesInput) (req *request.Request, output *ListBranchesOutput) { - op := &request.Operation{ - Name: opListBranches, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListBranchesInput{} - } - - output = &ListBranchesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBranches API operation for AWS CodeCommit. -// -// Gets information about one or more branches in a repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation ListBranches for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// * ErrCodeInvalidContinuationTokenException "InvalidContinuationTokenException" -// The specified continuation token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/ListBranches -func (c *CodeCommit) ListBranches(input *ListBranchesInput) (*ListBranchesOutput, error) { - req, out := c.ListBranchesRequest(input) - return out, req.Send() -} - -// ListBranchesWithContext is the same as ListBranches with the addition of -// the ability to pass a context and additional request options. -// -// See ListBranches for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) ListBranchesWithContext(ctx aws.Context, input *ListBranchesInput, opts ...request.Option) (*ListBranchesOutput, error) { - req, out := c.ListBranchesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListBranchesPages iterates over the pages of a ListBranches operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListBranches 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 ListBranches operation. -// pageNum := 0 -// err := client.ListBranchesPages(params, -// func(page *ListBranchesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CodeCommit) ListBranchesPages(input *ListBranchesInput, fn func(*ListBranchesOutput, bool) bool) error { - return c.ListBranchesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListBranchesPagesWithContext same as ListBranchesPages 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 *CodeCommit) ListBranchesPagesWithContext(ctx aws.Context, input *ListBranchesInput, fn func(*ListBranchesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListBranchesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListBranchesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBranchesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListPullRequests = "ListPullRequests" - -// ListPullRequestsRequest generates a "aws/request.Request" representing the -// client's request for the ListPullRequests operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPullRequests for more information on using the ListPullRequests -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPullRequestsRequest method. -// req, resp := client.ListPullRequestsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/ListPullRequests -func (c *CodeCommit) ListPullRequestsRequest(input *ListPullRequestsInput) (req *request.Request, output *ListPullRequestsOutput) { - op := &request.Operation{ - Name: opListPullRequests, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListPullRequestsInput{} - } - - output = &ListPullRequestsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPullRequests API operation for AWS CodeCommit. -// -// Returns a list of pull requests for a specified repository. The return list -// can be refined by pull request status or pull request author 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 CodeCommit's -// API operation ListPullRequests for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidPullRequestStatusException "InvalidPullRequestStatusException" -// The pull request status is not valid. The only valid values are OPEN and -// CLOSED. -// -// * ErrCodeInvalidAuthorArnException "InvalidAuthorArnException" -// The Amazon Resource Name (ARN) is not valid. Make sure that you have provided -// the full ARN for the author of the pull request, and then try again. -// -// * ErrCodeAuthorDoesNotExistException "AuthorDoesNotExistException" -// The specified Amazon Resource Name (ARN) does not exist in the AWS account. -// -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException" -// The specified number of maximum results is not valid. -// -// * ErrCodeInvalidContinuationTokenException "InvalidContinuationTokenException" -// The specified continuation token is not valid. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/ListPullRequests -func (c *CodeCommit) ListPullRequests(input *ListPullRequestsInput) (*ListPullRequestsOutput, error) { - req, out := c.ListPullRequestsRequest(input) - return out, req.Send() -} - -// ListPullRequestsWithContext is the same as ListPullRequests with the addition of -// the ability to pass a context and additional request options. -// -// See ListPullRequests for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) ListPullRequestsWithContext(ctx aws.Context, input *ListPullRequestsInput, opts ...request.Option) (*ListPullRequestsOutput, error) { - req, out := c.ListPullRequestsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPullRequestsPages iterates over the pages of a ListPullRequests operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPullRequests 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 ListPullRequests operation. -// pageNum := 0 -// err := client.ListPullRequestsPages(params, -// func(page *ListPullRequestsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CodeCommit) ListPullRequestsPages(input *ListPullRequestsInput, fn func(*ListPullRequestsOutput, bool) bool) error { - return c.ListPullRequestsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPullRequestsPagesWithContext same as ListPullRequestsPages 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 *CodeCommit) ListPullRequestsPagesWithContext(ctx aws.Context, input *ListPullRequestsInput, fn func(*ListPullRequestsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPullRequestsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPullRequestsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPullRequestsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListRepositories = "ListRepositories" - -// ListRepositoriesRequest generates a "aws/request.Request" representing the -// client's request for the ListRepositories operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRepositories for more information on using the ListRepositories -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRepositoriesRequest method. -// req, resp := client.ListRepositoriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/ListRepositories -func (c *CodeCommit) ListRepositoriesRequest(input *ListRepositoriesInput) (req *request.Request, output *ListRepositoriesOutput) { - op := &request.Operation{ - Name: opListRepositories, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListRepositoriesInput{} - } - - output = &ListRepositoriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRepositories API operation for AWS CodeCommit. -// -// Gets information about one or more repositories. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation ListRepositories for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidSortByException "InvalidSortByException" -// The specified sort by value is not valid. -// -// * ErrCodeInvalidOrderException "InvalidOrderException" -// The specified sort order is not valid. -// -// * ErrCodeInvalidContinuationTokenException "InvalidContinuationTokenException" -// The specified continuation token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/ListRepositories -func (c *CodeCommit) ListRepositories(input *ListRepositoriesInput) (*ListRepositoriesOutput, error) { - req, out := c.ListRepositoriesRequest(input) - return out, req.Send() -} - -// ListRepositoriesWithContext is the same as ListRepositories with the addition of -// the ability to pass a context and additional request options. -// -// See ListRepositories for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) ListRepositoriesWithContext(ctx aws.Context, input *ListRepositoriesInput, opts ...request.Option) (*ListRepositoriesOutput, error) { - req, out := c.ListRepositoriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListRepositoriesPages iterates over the pages of a ListRepositories operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListRepositories 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 ListRepositories operation. -// pageNum := 0 -// err := client.ListRepositoriesPages(params, -// func(page *ListRepositoriesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CodeCommit) ListRepositoriesPages(input *ListRepositoriesInput, fn func(*ListRepositoriesOutput, bool) bool) error { - return c.ListRepositoriesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListRepositoriesPagesWithContext same as ListRepositoriesPages 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 *CodeCommit) ListRepositoriesPagesWithContext(ctx aws.Context, input *ListRepositoriesInput, fn func(*ListRepositoriesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListRepositoriesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListRepositoriesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRepositoriesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opMergePullRequestByFastForward = "MergePullRequestByFastForward" - -// MergePullRequestByFastForwardRequest generates a "aws/request.Request" representing the -// client's request for the MergePullRequestByFastForward operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See MergePullRequestByFastForward for more information on using the MergePullRequestByFastForward -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the MergePullRequestByFastForwardRequest method. -// req, resp := client.MergePullRequestByFastForwardRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/MergePullRequestByFastForward -func (c *CodeCommit) MergePullRequestByFastForwardRequest(input *MergePullRequestByFastForwardInput) (req *request.Request, output *MergePullRequestByFastForwardOutput) { - op := &request.Operation{ - Name: opMergePullRequestByFastForward, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &MergePullRequestByFastForwardInput{} - } - - output = &MergePullRequestByFastForwardOutput{} - req = c.newRequest(op, input, output) - return -} - -// MergePullRequestByFastForward API operation for AWS CodeCommit. -// -// Closes a pull request and attempts to merge the source commit of a pull request -// into the specified destination branch for that pull request at the specified -// commit using the fast-forward merge option. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation MergePullRequestByFastForward for usage and error information. -// -// Returned Error Codes: -// * ErrCodeManualMergeRequiredException "ManualMergeRequiredException" -// The pull request cannot be merged automatically into the destination branch. -// You must manually merge the branches and resolve any conflicts. -// -// * ErrCodePullRequestAlreadyClosedException "PullRequestAlreadyClosedException" -// The pull request status cannot be updated because it is already closed. -// -// * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException" -// The pull request ID could not be found. Make sure that you have specified -// the correct repository name and pull request ID, and then try again. -// -// * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException" -// The pull request ID is not valid. Make sure that you have provided the full -// ID and that the pull request is in the specified repository, and then try -// again. -// -// * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException" -// A pull request ID is required, but none was provided. -// -// * ErrCodeTipOfSourceReferenceIsDifferentException "TipOfSourceReferenceIsDifferentException" -// The tip of the source branch in the destination repository does not match -// the tip of the source branch specified in your request. The pull request -// might have been updated. Make sure that you have the latest changes. -// -// * ErrCodeReferenceDoesNotExistException "ReferenceDoesNotExistException" -// The specified reference does not exist. You must provide a full commit ID. -// -// * ErrCodeInvalidCommitIdException "InvalidCommitIdException" -// The specified commit ID is not valid. -// -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/MergePullRequestByFastForward -func (c *CodeCommit) MergePullRequestByFastForward(input *MergePullRequestByFastForwardInput) (*MergePullRequestByFastForwardOutput, error) { - req, out := c.MergePullRequestByFastForwardRequest(input) - return out, req.Send() -} - -// MergePullRequestByFastForwardWithContext is the same as MergePullRequestByFastForward with the addition of -// the ability to pass a context and additional request options. -// -// See MergePullRequestByFastForward for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) MergePullRequestByFastForwardWithContext(ctx aws.Context, input *MergePullRequestByFastForwardInput, opts ...request.Option) (*MergePullRequestByFastForwardOutput, error) { - req, out := c.MergePullRequestByFastForwardRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPostCommentForComparedCommit = "PostCommentForComparedCommit" - -// PostCommentForComparedCommitRequest generates a "aws/request.Request" representing the -// client's request for the PostCommentForComparedCommit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PostCommentForComparedCommit for more information on using the PostCommentForComparedCommit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PostCommentForComparedCommitRequest method. -// req, resp := client.PostCommentForComparedCommitRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PostCommentForComparedCommit -func (c *CodeCommit) PostCommentForComparedCommitRequest(input *PostCommentForComparedCommitInput) (req *request.Request, output *PostCommentForComparedCommitOutput) { - op := &request.Operation{ - Name: opPostCommentForComparedCommit, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PostCommentForComparedCommitInput{} - } - - output = &PostCommentForComparedCommitOutput{} - req = c.newRequest(op, input, output) - return -} - -// PostCommentForComparedCommit API operation for AWS CodeCommit. -// -// Posts a comment on the comparison between two commits. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation PostCommentForComparedCommit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeClientRequestTokenRequiredException "ClientRequestTokenRequiredException" -// A client request token is required. A client request token is an unique, -// client-generated idempotency token that when provided in a request, ensures -// the request cannot be repeated with a changed parameter. If a request is -// received with the same parameters and a token is included, the request will -// return information about the initial request that used that token. -// -// * ErrCodeInvalidClientRequestTokenException "InvalidClientRequestTokenException" -// The client request token is not valid. -// -// * ErrCodeIdempotencyParameterMismatchException "IdempotencyParameterMismatchException" -// The client request token is not valid. Either the token is not in a valid -// format, or the token has been used in a previous request and cannot be re-used. -// -// * ErrCodeCommentContentRequiredException "CommentContentRequiredException" -// The comment is empty. You must provide some content for a comment. The content -// cannot be null. -// -// * ErrCodeCommentContentSizeLimitExceededException "CommentContentSizeLimitExceededException" -// The comment is too large. Comments are limited to 1,000 characters. -// -// * ErrCodeInvalidFileLocationException "InvalidFileLocationException" -// The location of the file is not valid. Make sure that you include the extension -// of the file as well as the file name. -// -// * ErrCodeInvalidRelativeFileVersionEnumException "InvalidRelativeFileVersionEnumException" -// Either the enum is not in a valid format, or the specified file version enum -// is not valid in respect to the current file version. -// -// * ErrCodePathRequiredException "PathRequiredException" -// The folderPath for a location cannot be null. -// -// * ErrCodeInvalidFilePositionException "InvalidFilePositionException" -// The position is not valid. Make sure that the line number exists in the version -// of the file you want to comment on. -// -// * ErrCodeCommitIdRequiredException "CommitIdRequiredException" -// A commit ID was not specified. -// -// * ErrCodeInvalidCommitIdException "InvalidCommitIdException" -// The specified commit ID is not valid. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// * ErrCodeBeforeCommitIdAndAfterCommitIdAreSameException "BeforeCommitIdAndAfterCommitIdAreSameException" -// The before commit ID and the after commit ID are the same, which is not valid. -// The before commit ID and the after commit ID must be different commit IDs. -// -// * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException" -// The specified commit does not exist or no commit was specified, and the specified -// repository has no default branch. -// -// * ErrCodeInvalidPathException "InvalidPathException" -// The specified path is not valid. -// -// * ErrCodePathDoesNotExistException "PathDoesNotExistException" -// The specified path does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PostCommentForComparedCommit -func (c *CodeCommit) PostCommentForComparedCommit(input *PostCommentForComparedCommitInput) (*PostCommentForComparedCommitOutput, error) { - req, out := c.PostCommentForComparedCommitRequest(input) - return out, req.Send() -} - -// PostCommentForComparedCommitWithContext is the same as PostCommentForComparedCommit with the addition of -// the ability to pass a context and additional request options. -// -// See PostCommentForComparedCommit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) PostCommentForComparedCommitWithContext(ctx aws.Context, input *PostCommentForComparedCommitInput, opts ...request.Option) (*PostCommentForComparedCommitOutput, error) { - req, out := c.PostCommentForComparedCommitRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPostCommentForPullRequest = "PostCommentForPullRequest" - -// PostCommentForPullRequestRequest generates a "aws/request.Request" representing the -// client's request for the PostCommentForPullRequest operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PostCommentForPullRequest for more information on using the PostCommentForPullRequest -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PostCommentForPullRequestRequest method. -// req, resp := client.PostCommentForPullRequestRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PostCommentForPullRequest -func (c *CodeCommit) PostCommentForPullRequestRequest(input *PostCommentForPullRequestInput) (req *request.Request, output *PostCommentForPullRequestOutput) { - op := &request.Operation{ - Name: opPostCommentForPullRequest, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PostCommentForPullRequestInput{} - } - - output = &PostCommentForPullRequestOutput{} - req = c.newRequest(op, input, output) - return -} - -// PostCommentForPullRequest API operation for AWS CodeCommit. -// -// Posts a comment on a pull request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation PostCommentForPullRequest for usage and error information. -// -// Returned Error Codes: -// * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException" -// The pull request ID could not be found. Make sure that you have specified -// the correct repository name and pull request ID, and then try again. -// -// * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException" -// The pull request ID is not valid. Make sure that you have provided the full -// ID and that the pull request is in the specified repository, and then try -// again. -// -// * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException" -// A pull request ID is required, but none was provided. -// -// * ErrCodeRepositoryNotAssociatedWithPullRequestException "RepositoryNotAssociatedWithPullRequestException" -// The repository does not contain any pull requests with that pull request -// ID. Check to make sure you have provided the correct repository name for -// the pull request. -// -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeClientRequestTokenRequiredException "ClientRequestTokenRequiredException" -// A client request token is required. A client request token is an unique, -// client-generated idempotency token that when provided in a request, ensures -// the request cannot be repeated with a changed parameter. If a request is -// received with the same parameters and a token is included, the request will -// return information about the initial request that used that token. -// -// * ErrCodeInvalidClientRequestTokenException "InvalidClientRequestTokenException" -// The client request token is not valid. -// -// * ErrCodeIdempotencyParameterMismatchException "IdempotencyParameterMismatchException" -// The client request token is not valid. Either the token is not in a valid -// format, or the token has been used in a previous request and cannot be re-used. -// -// * ErrCodeCommentContentRequiredException "CommentContentRequiredException" -// The comment is empty. You must provide some content for a comment. The content -// cannot be null. -// -// * ErrCodeCommentContentSizeLimitExceededException "CommentContentSizeLimitExceededException" -// The comment is too large. Comments are limited to 1,000 characters. -// -// * ErrCodeInvalidFileLocationException "InvalidFileLocationException" -// The location of the file is not valid. Make sure that you include the extension -// of the file as well as the file name. -// -// * ErrCodeInvalidRelativeFileVersionEnumException "InvalidRelativeFileVersionEnumException" -// Either the enum is not in a valid format, or the specified file version enum -// is not valid in respect to the current file version. -// -// * ErrCodePathRequiredException "PathRequiredException" -// The folderPath for a location cannot be null. -// -// * ErrCodeInvalidFilePositionException "InvalidFilePositionException" -// The position is not valid. Make sure that the line number exists in the version -// of the file you want to comment on. -// -// * ErrCodeCommitIdRequiredException "CommitIdRequiredException" -// A commit ID was not specified. -// -// * ErrCodeInvalidCommitIdException "InvalidCommitIdException" -// The specified commit ID is not valid. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException" -// The specified commit does not exist or no commit was specified, and the specified -// repository has no default branch. -// -// * ErrCodeInvalidPathException "InvalidPathException" -// The specified path is not valid. -// -// * ErrCodePathDoesNotExistException "PathDoesNotExistException" -// The specified path does not exist. -// -// * ErrCodePathRequiredException "PathRequiredException" -// The folderPath for a location cannot be null. -// -// * ErrCodeBeforeCommitIdAndAfterCommitIdAreSameException "BeforeCommitIdAndAfterCommitIdAreSameException" -// The before commit ID and the after commit ID are the same, which is not valid. -// The before commit ID and the after commit ID must be different commit IDs. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PostCommentForPullRequest -func (c *CodeCommit) PostCommentForPullRequest(input *PostCommentForPullRequestInput) (*PostCommentForPullRequestOutput, error) { - req, out := c.PostCommentForPullRequestRequest(input) - return out, req.Send() -} - -// PostCommentForPullRequestWithContext is the same as PostCommentForPullRequest with the addition of -// the ability to pass a context and additional request options. -// -// See PostCommentForPullRequest for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) PostCommentForPullRequestWithContext(ctx aws.Context, input *PostCommentForPullRequestInput, opts ...request.Option) (*PostCommentForPullRequestOutput, error) { - req, out := c.PostCommentForPullRequestRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPostCommentReply = "PostCommentReply" - -// PostCommentReplyRequest generates a "aws/request.Request" representing the -// client's request for the PostCommentReply operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PostCommentReply for more information on using the PostCommentReply -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PostCommentReplyRequest method. -// req, resp := client.PostCommentReplyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PostCommentReply -func (c *CodeCommit) PostCommentReplyRequest(input *PostCommentReplyInput) (req *request.Request, output *PostCommentReplyOutput) { - op := &request.Operation{ - Name: opPostCommentReply, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PostCommentReplyInput{} - } - - output = &PostCommentReplyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PostCommentReply API operation for AWS CodeCommit. -// -// Posts a comment in reply to an existing comment on a comparison between commits -// or a pull request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation PostCommentReply for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClientRequestTokenRequiredException "ClientRequestTokenRequiredException" -// A client request token is required. A client request token is an unique, -// client-generated idempotency token that when provided in a request, ensures -// the request cannot be repeated with a changed parameter. If a request is -// received with the same parameters and a token is included, the request will -// return information about the initial request that used that token. -// -// * ErrCodeInvalidClientRequestTokenException "InvalidClientRequestTokenException" -// The client request token is not valid. -// -// * ErrCodeIdempotencyParameterMismatchException "IdempotencyParameterMismatchException" -// The client request token is not valid. Either the token is not in a valid -// format, or the token has been used in a previous request and cannot be re-used. -// -// * ErrCodeCommentContentRequiredException "CommentContentRequiredException" -// The comment is empty. You must provide some content for a comment. The content -// cannot be null. -// -// * ErrCodeCommentContentSizeLimitExceededException "CommentContentSizeLimitExceededException" -// The comment is too large. Comments are limited to 1,000 characters. -// -// * ErrCodeCommentDoesNotExistException "CommentDoesNotExistException" -// No comment exists with the provided ID. Verify that you have provided the -// correct ID, and then try again. -// -// * ErrCodeCommentIdRequiredException "CommentIdRequiredException" -// The comment ID is missing or null. A comment ID is required. -// -// * ErrCodeInvalidCommentIdException "InvalidCommentIdException" -// The comment ID is not in a valid format. Make sure that you have provided -// the full comment ID. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PostCommentReply -func (c *CodeCommit) PostCommentReply(input *PostCommentReplyInput) (*PostCommentReplyOutput, error) { - req, out := c.PostCommentReplyRequest(input) - return out, req.Send() -} - -// PostCommentReplyWithContext is the same as PostCommentReply with the addition of -// the ability to pass a context and additional request options. -// -// See PostCommentReply for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) PostCommentReplyWithContext(ctx aws.Context, input *PostCommentReplyInput, opts ...request.Option) (*PostCommentReplyOutput, error) { - req, out := c.PostCommentReplyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutFile = "PutFile" - -// PutFileRequest generates a "aws/request.Request" representing the -// client's request for the PutFile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutFile for more information on using the PutFile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutFileRequest method. -// req, resp := client.PutFileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PutFile -func (c *CodeCommit) PutFileRequest(input *PutFileInput) (req *request.Request, output *PutFileOutput) { - op := &request.Operation{ - Name: opPutFile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutFileInput{} - } - - output = &PutFileOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutFile API operation for AWS CodeCommit. -// -// Adds or updates a file in a branch in an AWS CodeCommit repository, and generates -// a commit for the addition in the specified branch. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation PutFile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeParentCommitIdRequiredException "ParentCommitIdRequiredException" -// A parent commit ID is required. To view the full commit ID of a branch in -// a repository, use GetBranch or a Git command (for example, git pull or git -// log). -// -// * ErrCodeInvalidParentCommitIdException "InvalidParentCommitIdException" -// The parent commit ID is not valid. The commit ID cannot be empty, and must -// match the head commit ID for the branch of the repository where you want -// to add or update a file. -// -// * ErrCodeParentCommitDoesNotExistException "ParentCommitDoesNotExistException" -// The parent commit ID is not valid because it does not exist. The specified -// parent commit ID does not exist in the specified branch of the repository. -// -// * ErrCodeParentCommitIdOutdatedException "ParentCommitIdOutdatedException" -// The file could not be added because the provided parent commit ID is not -// the current tip of the specified branch. To view the full commit ID of the -// current head of the branch, use GetBranch. -// -// * ErrCodeFileContentRequiredException "FileContentRequiredException" -// The file cannot be added because it is empty. Empty files cannot be added -// to the repository with this API. -// -// * ErrCodeFileContentSizeLimitExceededException "FileContentSizeLimitExceededException" -// The file cannot be added because it is too large. The maximum file size that -// can be added using PutFile is 6 MB. For files larger than 6 MB but smaller -// than 2 GB, add them using a Git client. -// -// * ErrCodeFolderContentSizeLimitExceededException "FolderContentSizeLimitExceededException" -// The specified file is in a folder that exceeds the folder content size limit. -// Either save the file in a folder that has less content, or remove files or -// subfolders from the folder so it does not exceed the size limit. For more -// information about limits in AWS CodeCommit, see AWS CodeCommit User Guide -// (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). -// -// * ErrCodePathRequiredException "PathRequiredException" -// The folderPath for a location cannot be null. -// -// * ErrCodeInvalidPathException "InvalidPathException" -// The specified path is not valid. -// -// * ErrCodeBranchNameRequiredException "BranchNameRequiredException" -// A branch name is required but was not specified. -// -// * ErrCodeInvalidBranchNameException "InvalidBranchNameException" -// The specified reference name is not valid. -// -// * ErrCodeBranchDoesNotExistException "BranchDoesNotExistException" -// The specified branch does not exist. -// -// * ErrCodeBranchNameIsTagNameException "BranchNameIsTagNameException" -// The specified branch name is not valid because it is a tag name. Type the -// name of a current branch in the repository. For a list of valid branch names, -// use ListBranches. -// -// * ErrCodeInvalidFileModeException "InvalidFileModeException" -// The specified file mode permission is not valid. For a list of valid file -// mode permissions, see PutFile. -// -// * ErrCodeNameLengthExceededException "NameLengthExceededException" -// The user name is not valid because it has exceeded the character limit for -// file names. File names, including the path to the file, cannot exceed the -// character limit. -// -// * ErrCodeInvalidEmailException "InvalidEmailException" -// The specified email address either contains one or more characters that are -// not allowed, or it exceeds the maximum number of characters allowed for an -// email address. -// -// * ErrCodeCommitMessageLengthExceededException "CommitMessageLengthExceededException" -// The commit message is too long. Provide a shorter string. -// -// * ErrCodeInvalidDeletionParameterException "InvalidDeletionParameterException" -// The specified deletion parameter is not valid. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// * ErrCodeSameFileContentException "SameFileContentException" -// The file was not added or updated because the content of the file is exactly -// the same as the content of that file in the repository and branch that you -// specified. -// -// * ErrCodeFileNameConflictsWithDirectoryNameException "FileNameConflictsWithDirectoryNameException" -// A file cannot be added to the repository because the specified file name -// has the same name as a directory in this repository. Either provide another -// name for the file, or add the file in a directory that does not match the -// file name. -// -// * ErrCodeDirectoryNameConflictsWithFileNameException "DirectoryNameConflictsWithFileNameException" -// A file cannot be added to the repository because the specified path name -// has the same name as a file that already exists in this repository. Either -// provide a different name for the file, or specify a different path for the -// file. -// -// * ErrCodeFilePathConflictsWithSubmodulePathException "FilePathConflictsWithSubmodulePathException" -// The specified file path or folder has the same path as a submodule in this -// repository. Either provide a different name for the file, or save the file -// in a directory that does not conflict with the submodule path. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PutFile -func (c *CodeCommit) PutFile(input *PutFileInput) (*PutFileOutput, error) { - req, out := c.PutFileRequest(input) - return out, req.Send() -} - -// PutFileWithContext is the same as PutFile with the addition of -// the ability to pass a context and additional request options. -// -// See PutFile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) PutFileWithContext(ctx aws.Context, input *PutFileInput, opts ...request.Option) (*PutFileOutput, error) { - req, out := c.PutFileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutRepositoryTriggers = "PutRepositoryTriggers" - -// PutRepositoryTriggersRequest generates a "aws/request.Request" representing the -// client's request for the PutRepositoryTriggers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutRepositoryTriggers for more information on using the PutRepositoryTriggers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutRepositoryTriggersRequest method. -// req, resp := client.PutRepositoryTriggersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PutRepositoryTriggers -func (c *CodeCommit) PutRepositoryTriggersRequest(input *PutRepositoryTriggersInput) (req *request.Request, output *PutRepositoryTriggersOutput) { - op := &request.Operation{ - Name: opPutRepositoryTriggers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutRepositoryTriggersInput{} - } - - output = &PutRepositoryTriggersOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutRepositoryTriggers API operation for AWS CodeCommit. -// -// Replaces all triggers for a repository. This can be used to create or delete -// triggers. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation PutRepositoryTriggers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeRepositoryTriggersListRequiredException "RepositoryTriggersListRequiredException" -// The list of triggers for the repository is required but was not specified. -// -// * ErrCodeMaximumRepositoryTriggersExceededException "MaximumRepositoryTriggersExceededException" -// The number of triggers allowed for the repository was exceeded. -// -// * ErrCodeInvalidRepositoryTriggerNameException "InvalidRepositoryTriggerNameException" -// The name of the trigger is not valid. -// -// * ErrCodeInvalidRepositoryTriggerDestinationArnException "InvalidRepositoryTriggerDestinationArnException" -// The Amazon Resource Name (ARN) for the trigger is not valid for the specified -// destination. The most common reason for this error is that the ARN does not -// meet the requirements for the service type. -// -// * ErrCodeInvalidRepositoryTriggerRegionException "InvalidRepositoryTriggerRegionException" -// The region for the trigger target does not match the region for the repository. -// Triggers must be created in the same region as the target for the trigger. -// -// * ErrCodeInvalidRepositoryTriggerCustomDataException "InvalidRepositoryTriggerCustomDataException" -// The custom data provided for the trigger is not valid. -// -// * ErrCodeMaximumBranchesExceededException "MaximumBranchesExceededException" -// The number of branches for the trigger was exceeded. -// -// * ErrCodeInvalidRepositoryTriggerBranchNameException "InvalidRepositoryTriggerBranchNameException" -// One or more branch names specified for the trigger is not valid. -// -// * ErrCodeInvalidRepositoryTriggerEventsException "InvalidRepositoryTriggerEventsException" -// One or more events specified for the trigger is not valid. Check to make -// sure that all events specified match the requirements for allowed events. -// -// * ErrCodeRepositoryTriggerNameRequiredException "RepositoryTriggerNameRequiredException" -// A name for the trigger is required but was not specified. -// -// * ErrCodeRepositoryTriggerDestinationArnRequiredException "RepositoryTriggerDestinationArnRequiredException" -// A destination ARN for the target service for the trigger is required but -// was not specified. -// -// * ErrCodeRepositoryTriggerBranchNameListRequiredException "RepositoryTriggerBranchNameListRequiredException" -// At least one branch name is required but was not specified in the trigger -// configuration. -// -// * ErrCodeRepositoryTriggerEventsListRequiredException "RepositoryTriggerEventsListRequiredException" -// At least one event for the trigger is required but was not specified. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PutRepositoryTriggers -func (c *CodeCommit) PutRepositoryTriggers(input *PutRepositoryTriggersInput) (*PutRepositoryTriggersOutput, error) { - req, out := c.PutRepositoryTriggersRequest(input) - return out, req.Send() -} - -// PutRepositoryTriggersWithContext is the same as PutRepositoryTriggers with the addition of -// the ability to pass a context and additional request options. -// -// See PutRepositoryTriggers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) PutRepositoryTriggersWithContext(ctx aws.Context, input *PutRepositoryTriggersInput, opts ...request.Option) (*PutRepositoryTriggersOutput, error) { - req, out := c.PutRepositoryTriggersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTestRepositoryTriggers = "TestRepositoryTriggers" - -// TestRepositoryTriggersRequest generates a "aws/request.Request" representing the -// client's request for the TestRepositoryTriggers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TestRepositoryTriggers for more information on using the TestRepositoryTriggers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TestRepositoryTriggersRequest method. -// req, resp := client.TestRepositoryTriggersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/TestRepositoryTriggers -func (c *CodeCommit) TestRepositoryTriggersRequest(input *TestRepositoryTriggersInput) (req *request.Request, output *TestRepositoryTriggersOutput) { - op := &request.Operation{ - Name: opTestRepositoryTriggers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TestRepositoryTriggersInput{} - } - - output = &TestRepositoryTriggersOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestRepositoryTriggers API operation for AWS CodeCommit. -// -// Tests the functionality of repository triggers by sending information to -// the trigger target. If real data is available in the repository, the test -// will send data from the last commit. If no data is available, sample data -// will be generated. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation TestRepositoryTriggers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeRepositoryTriggersListRequiredException "RepositoryTriggersListRequiredException" -// The list of triggers for the repository is required but was not specified. -// -// * ErrCodeMaximumRepositoryTriggersExceededException "MaximumRepositoryTriggersExceededException" -// The number of triggers allowed for the repository was exceeded. -// -// * ErrCodeInvalidRepositoryTriggerNameException "InvalidRepositoryTriggerNameException" -// The name of the trigger is not valid. -// -// * ErrCodeInvalidRepositoryTriggerDestinationArnException "InvalidRepositoryTriggerDestinationArnException" -// The Amazon Resource Name (ARN) for the trigger is not valid for the specified -// destination. The most common reason for this error is that the ARN does not -// meet the requirements for the service type. -// -// * ErrCodeInvalidRepositoryTriggerRegionException "InvalidRepositoryTriggerRegionException" -// The region for the trigger target does not match the region for the repository. -// Triggers must be created in the same region as the target for the trigger. -// -// * ErrCodeInvalidRepositoryTriggerCustomDataException "InvalidRepositoryTriggerCustomDataException" -// The custom data provided for the trigger is not valid. -// -// * ErrCodeMaximumBranchesExceededException "MaximumBranchesExceededException" -// The number of branches for the trigger was exceeded. -// -// * ErrCodeInvalidRepositoryTriggerBranchNameException "InvalidRepositoryTriggerBranchNameException" -// One or more branch names specified for the trigger is not valid. -// -// * ErrCodeInvalidRepositoryTriggerEventsException "InvalidRepositoryTriggerEventsException" -// One or more events specified for the trigger is not valid. Check to make -// sure that all events specified match the requirements for allowed events. -// -// * ErrCodeRepositoryTriggerNameRequiredException "RepositoryTriggerNameRequiredException" -// A name for the trigger is required but was not specified. -// -// * ErrCodeRepositoryTriggerDestinationArnRequiredException "RepositoryTriggerDestinationArnRequiredException" -// A destination ARN for the target service for the trigger is required but -// was not specified. -// -// * ErrCodeRepositoryTriggerBranchNameListRequiredException "RepositoryTriggerBranchNameListRequiredException" -// At least one branch name is required but was not specified in the trigger -// configuration. -// -// * ErrCodeRepositoryTriggerEventsListRequiredException "RepositoryTriggerEventsListRequiredException" -// At least one event for the trigger is required but was not specified. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/TestRepositoryTriggers -func (c *CodeCommit) TestRepositoryTriggers(input *TestRepositoryTriggersInput) (*TestRepositoryTriggersOutput, error) { - req, out := c.TestRepositoryTriggersRequest(input) - return out, req.Send() -} - -// TestRepositoryTriggersWithContext is the same as TestRepositoryTriggers with the addition of -// the ability to pass a context and additional request options. -// -// See TestRepositoryTriggers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) TestRepositoryTriggersWithContext(ctx aws.Context, input *TestRepositoryTriggersInput, opts ...request.Option) (*TestRepositoryTriggersOutput, error) { - req, out := c.TestRepositoryTriggersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateComment = "UpdateComment" - -// UpdateCommentRequest generates a "aws/request.Request" representing the -// client's request for the UpdateComment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateComment for more information on using the UpdateComment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateCommentRequest method. -// req, resp := client.UpdateCommentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateComment -func (c *CodeCommit) UpdateCommentRequest(input *UpdateCommentInput) (req *request.Request, output *UpdateCommentOutput) { - op := &request.Operation{ - Name: opUpdateComment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateCommentInput{} - } - - output = &UpdateCommentOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateComment API operation for AWS CodeCommit. -// -// Replaces the contents of a comment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation UpdateComment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCommentContentRequiredException "CommentContentRequiredException" -// The comment is empty. You must provide some content for a comment. The content -// cannot be null. -// -// * ErrCodeCommentContentSizeLimitExceededException "CommentContentSizeLimitExceededException" -// The comment is too large. Comments are limited to 1,000 characters. -// -// * ErrCodeCommentDoesNotExistException "CommentDoesNotExistException" -// No comment exists with the provided ID. Verify that you have provided the -// correct ID, and then try again. -// -// * ErrCodeCommentIdRequiredException "CommentIdRequiredException" -// The comment ID is missing or null. A comment ID is required. -// -// * ErrCodeInvalidCommentIdException "InvalidCommentIdException" -// The comment ID is not in a valid format. Make sure that you have provided -// the full comment ID. -// -// * ErrCodeCommentNotCreatedByCallerException "CommentNotCreatedByCallerException" -// You cannot modify or delete this comment. Only comment authors can modify -// or delete their comments. -// -// * ErrCodeCommentDeletedException "CommentDeletedException" -// This comment has already been deleted. You cannot edit or delete a deleted -// comment. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateComment -func (c *CodeCommit) UpdateComment(input *UpdateCommentInput) (*UpdateCommentOutput, error) { - req, out := c.UpdateCommentRequest(input) - return out, req.Send() -} - -// UpdateCommentWithContext is the same as UpdateComment with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateComment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) UpdateCommentWithContext(ctx aws.Context, input *UpdateCommentInput, opts ...request.Option) (*UpdateCommentOutput, error) { - req, out := c.UpdateCommentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDefaultBranch = "UpdateDefaultBranch" - -// UpdateDefaultBranchRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDefaultBranch operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDefaultBranch for more information on using the UpdateDefaultBranch -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDefaultBranchRequest method. -// req, resp := client.UpdateDefaultBranchRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateDefaultBranch -func (c *CodeCommit) UpdateDefaultBranchRequest(input *UpdateDefaultBranchInput) (req *request.Request, output *UpdateDefaultBranchOutput) { - op := &request.Operation{ - Name: opUpdateDefaultBranch, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateDefaultBranchInput{} - } - - output = &UpdateDefaultBranchOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateDefaultBranch API operation for AWS CodeCommit. -// -// Sets or changes the default branch name for the specified repository. -// -// If you use this operation to change the default branch name to the current -// default branch name, a success message is returned even though the default -// branch did not change. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation UpdateDefaultBranch for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeBranchNameRequiredException "BranchNameRequiredException" -// A branch name is required but was not specified. -// -// * ErrCodeInvalidBranchNameException "InvalidBranchNameException" -// The specified reference name is not valid. -// -// * ErrCodeBranchDoesNotExistException "BranchDoesNotExistException" -// The specified branch does not exist. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateDefaultBranch -func (c *CodeCommit) UpdateDefaultBranch(input *UpdateDefaultBranchInput) (*UpdateDefaultBranchOutput, error) { - req, out := c.UpdateDefaultBranchRequest(input) - return out, req.Send() -} - -// UpdateDefaultBranchWithContext is the same as UpdateDefaultBranch with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDefaultBranch for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) UpdateDefaultBranchWithContext(ctx aws.Context, input *UpdateDefaultBranchInput, opts ...request.Option) (*UpdateDefaultBranchOutput, error) { - req, out := c.UpdateDefaultBranchRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdatePullRequestDescription = "UpdatePullRequestDescription" - -// UpdatePullRequestDescriptionRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePullRequestDescription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdatePullRequestDescription for more information on using the UpdatePullRequestDescription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdatePullRequestDescriptionRequest method. -// req, resp := client.UpdatePullRequestDescriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdatePullRequestDescription -func (c *CodeCommit) UpdatePullRequestDescriptionRequest(input *UpdatePullRequestDescriptionInput) (req *request.Request, output *UpdatePullRequestDescriptionOutput) { - op := &request.Operation{ - Name: opUpdatePullRequestDescription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdatePullRequestDescriptionInput{} - } - - output = &UpdatePullRequestDescriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdatePullRequestDescription API operation for AWS CodeCommit. -// -// Replaces the contents of the description of a pull request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation UpdatePullRequestDescription for usage and error information. -// -// Returned Error Codes: -// * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException" -// The pull request ID could not be found. Make sure that you have specified -// the correct repository name and pull request ID, and then try again. -// -// * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException" -// The pull request ID is not valid. Make sure that you have provided the full -// ID and that the pull request is in the specified repository, and then try -// again. -// -// * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException" -// A pull request ID is required, but none was provided. -// -// * ErrCodeInvalidDescriptionException "InvalidDescriptionException" -// The pull request description is not valid. Descriptions are limited to 1,000 -// characters in length. -// -// * ErrCodePullRequestAlreadyClosedException "PullRequestAlreadyClosedException" -// The pull request status cannot be updated because it is already closed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdatePullRequestDescription -func (c *CodeCommit) UpdatePullRequestDescription(input *UpdatePullRequestDescriptionInput) (*UpdatePullRequestDescriptionOutput, error) { - req, out := c.UpdatePullRequestDescriptionRequest(input) - return out, req.Send() -} - -// UpdatePullRequestDescriptionWithContext is the same as UpdatePullRequestDescription with the addition of -// the ability to pass a context and additional request options. -// -// See UpdatePullRequestDescription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) UpdatePullRequestDescriptionWithContext(ctx aws.Context, input *UpdatePullRequestDescriptionInput, opts ...request.Option) (*UpdatePullRequestDescriptionOutput, error) { - req, out := c.UpdatePullRequestDescriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdatePullRequestStatus = "UpdatePullRequestStatus" - -// UpdatePullRequestStatusRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePullRequestStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdatePullRequestStatus for more information on using the UpdatePullRequestStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdatePullRequestStatusRequest method. -// req, resp := client.UpdatePullRequestStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdatePullRequestStatus -func (c *CodeCommit) UpdatePullRequestStatusRequest(input *UpdatePullRequestStatusInput) (req *request.Request, output *UpdatePullRequestStatusOutput) { - op := &request.Operation{ - Name: opUpdatePullRequestStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdatePullRequestStatusInput{} - } - - output = &UpdatePullRequestStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdatePullRequestStatus API operation for AWS CodeCommit. -// -// Updates the status of a pull request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation UpdatePullRequestStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException" -// The pull request ID could not be found. Make sure that you have specified -// the correct repository name and pull request ID, and then try again. -// -// * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException" -// The pull request ID is not valid. Make sure that you have provided the full -// ID and that the pull request is in the specified repository, and then try -// again. -// -// * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException" -// A pull request ID is required, but none was provided. -// -// * ErrCodeInvalidPullRequestStatusUpdateException "InvalidPullRequestStatusUpdateException" -// The pull request status update is not valid. The only valid update is from -// OPEN to CLOSED. -// -// * ErrCodeInvalidPullRequestStatusException "InvalidPullRequestStatusException" -// The pull request status is not valid. The only valid values are OPEN and -// CLOSED. -// -// * ErrCodePullRequestStatusRequiredException "PullRequestStatusRequiredException" -// A pull request status is required, but none was provided. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdatePullRequestStatus -func (c *CodeCommit) UpdatePullRequestStatus(input *UpdatePullRequestStatusInput) (*UpdatePullRequestStatusOutput, error) { - req, out := c.UpdatePullRequestStatusRequest(input) - return out, req.Send() -} - -// UpdatePullRequestStatusWithContext is the same as UpdatePullRequestStatus with the addition of -// the ability to pass a context and additional request options. -// -// See UpdatePullRequestStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) UpdatePullRequestStatusWithContext(ctx aws.Context, input *UpdatePullRequestStatusInput, opts ...request.Option) (*UpdatePullRequestStatusOutput, error) { - req, out := c.UpdatePullRequestStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdatePullRequestTitle = "UpdatePullRequestTitle" - -// UpdatePullRequestTitleRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePullRequestTitle operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdatePullRequestTitle for more information on using the UpdatePullRequestTitle -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdatePullRequestTitleRequest method. -// req, resp := client.UpdatePullRequestTitleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdatePullRequestTitle -func (c *CodeCommit) UpdatePullRequestTitleRequest(input *UpdatePullRequestTitleInput) (req *request.Request, output *UpdatePullRequestTitleOutput) { - op := &request.Operation{ - Name: opUpdatePullRequestTitle, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdatePullRequestTitleInput{} - } - - output = &UpdatePullRequestTitleOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdatePullRequestTitle API operation for AWS CodeCommit. -// -// Replaces the title of a pull request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation UpdatePullRequestTitle for usage and error information. -// -// Returned Error Codes: -// * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException" -// The pull request ID could not be found. Make sure that you have specified -// the correct repository name and pull request ID, and then try again. -// -// * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException" -// The pull request ID is not valid. Make sure that you have provided the full -// ID and that the pull request is in the specified repository, and then try -// again. -// -// * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException" -// A pull request ID is required, but none was provided. -// -// * ErrCodeTitleRequiredException "TitleRequiredException" -// A pull request title is required. It cannot be empty or null. -// -// * ErrCodeInvalidTitleException "InvalidTitleException" -// The title of the pull request is not valid. Pull request titles cannot exceed -// 100 characters in length. -// -// * ErrCodePullRequestAlreadyClosedException "PullRequestAlreadyClosedException" -// The pull request status cannot be updated because it is already closed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdatePullRequestTitle -func (c *CodeCommit) UpdatePullRequestTitle(input *UpdatePullRequestTitleInput) (*UpdatePullRequestTitleOutput, error) { - req, out := c.UpdatePullRequestTitleRequest(input) - return out, req.Send() -} - -// UpdatePullRequestTitleWithContext is the same as UpdatePullRequestTitle with the addition of -// the ability to pass a context and additional request options. -// -// See UpdatePullRequestTitle for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) UpdatePullRequestTitleWithContext(ctx aws.Context, input *UpdatePullRequestTitleInput, opts ...request.Option) (*UpdatePullRequestTitleOutput, error) { - req, out := c.UpdatePullRequestTitleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRepositoryDescription = "UpdateRepositoryDescription" - -// UpdateRepositoryDescriptionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRepositoryDescription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRepositoryDescription for more information on using the UpdateRepositoryDescription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRepositoryDescriptionRequest method. -// req, resp := client.UpdateRepositoryDescriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateRepositoryDescription -func (c *CodeCommit) UpdateRepositoryDescriptionRequest(input *UpdateRepositoryDescriptionInput) (req *request.Request, output *UpdateRepositoryDescriptionOutput) { - op := &request.Operation{ - Name: opUpdateRepositoryDescription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRepositoryDescriptionInput{} - } - - output = &UpdateRepositoryDescriptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateRepositoryDescription API operation for AWS CodeCommit. -// -// Sets or changes the comment or description for a repository. -// -// The description field for a repository accepts all HTML characters and all -// valid Unicode characters. Applications that do not HTML-encode the description -// and display it in a web page could expose users to potentially malicious -// code. Make sure that you HTML-encode the description field in any application -// that uses this API to display the repository description on a web page. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation UpdateRepositoryDescription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// * ErrCodeInvalidRepositoryDescriptionException "InvalidRepositoryDescriptionException" -// The specified repository description is not valid. -// -// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" -// An encryption integrity check failed. -// -// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" -// An encryption key could not be accessed. -// -// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" -// The encryption key is disabled. -// -// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" -// No encryption key was found. -// -// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" -// The encryption key is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateRepositoryDescription -func (c *CodeCommit) UpdateRepositoryDescription(input *UpdateRepositoryDescriptionInput) (*UpdateRepositoryDescriptionOutput, error) { - req, out := c.UpdateRepositoryDescriptionRequest(input) - return out, req.Send() -} - -// UpdateRepositoryDescriptionWithContext is the same as UpdateRepositoryDescription with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRepositoryDescription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) UpdateRepositoryDescriptionWithContext(ctx aws.Context, input *UpdateRepositoryDescriptionInput, opts ...request.Option) (*UpdateRepositoryDescriptionOutput, error) { - req, out := c.UpdateRepositoryDescriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRepositoryName = "UpdateRepositoryName" - -// UpdateRepositoryNameRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRepositoryName operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRepositoryName for more information on using the UpdateRepositoryName -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRepositoryNameRequest method. -// req, resp := client.UpdateRepositoryNameRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateRepositoryName -func (c *CodeCommit) UpdateRepositoryNameRequest(input *UpdateRepositoryNameInput) (req *request.Request, output *UpdateRepositoryNameOutput) { - op := &request.Operation{ - Name: opUpdateRepositoryName, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRepositoryNameInput{} - } - - output = &UpdateRepositoryNameOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateRepositoryName API operation for AWS CodeCommit. -// -// Renames a repository. The repository name must be unique across the calling -// AWS account. In addition, repository names are limited to 100 alphanumeric, -// dash, and underscore characters, and cannot include certain characters. The -// suffix ".git" is prohibited. For a full description of the limits on repository -// names, see Limits (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html) -// in the AWS CodeCommit User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeCommit's -// API operation UpdateRepositoryName for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" -// The specified repository does not exist. -// -// * ErrCodeRepositoryNameExistsException "RepositoryNameExistsException" -// The specified repository name already exists. -// -// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" -// A repository name is required but was not specified. -// -// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" -// At least one specified repository name is not valid. -// -// This exception only occurs when a specified repository name is not valid. -// Other exceptions occur when a required repository parameter is missing, or -// when a specified repository does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateRepositoryName -func (c *CodeCommit) UpdateRepositoryName(input *UpdateRepositoryNameInput) (*UpdateRepositoryNameOutput, error) { - req, out := c.UpdateRepositoryNameRequest(input) - return out, req.Send() -} - -// UpdateRepositoryNameWithContext is the same as UpdateRepositoryName with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRepositoryName for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeCommit) UpdateRepositoryNameWithContext(ctx aws.Context, input *UpdateRepositoryNameInput, opts ...request.Option) (*UpdateRepositoryNameOutput, error) { - req, out := c.UpdateRepositoryNameRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Represents the input of a batch get repositories operation. -type BatchGetRepositoriesInput struct { - _ struct{} `type:"structure"` - - // The names of the repositories to get information about. - // - // RepositoryNames is a required field - RepositoryNames []*string `locationName:"repositoryNames" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchGetRepositoriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetRepositoriesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetRepositoriesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetRepositoriesInput"} - if s.RepositoryNames == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRepositoryNames sets the RepositoryNames field's value. -func (s *BatchGetRepositoriesInput) SetRepositoryNames(v []*string) *BatchGetRepositoriesInput { - s.RepositoryNames = v - return s -} - -// Represents the output of a batch get repositories operation. -type BatchGetRepositoriesOutput struct { - _ struct{} `type:"structure"` - - // A list of repositories returned by the batch get repositories operation. - Repositories []*RepositoryMetadata `locationName:"repositories" type:"list"` - - // Returns a list of repository names for which information could not be found. - RepositoriesNotFound []*string `locationName:"repositoriesNotFound" type:"list"` -} - -// String returns the string representation -func (s BatchGetRepositoriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetRepositoriesOutput) GoString() string { - return s.String() -} - -// SetRepositories sets the Repositories field's value. -func (s *BatchGetRepositoriesOutput) SetRepositories(v []*RepositoryMetadata) *BatchGetRepositoriesOutput { - s.Repositories = v - return s -} - -// SetRepositoriesNotFound sets the RepositoriesNotFound field's value. -func (s *BatchGetRepositoriesOutput) SetRepositoriesNotFound(v []*string) *BatchGetRepositoriesOutput { - s.RepositoriesNotFound = v - return s -} - -// Returns information about a specific Git blob object. -type BlobMetadata struct { - _ struct{} `type:"structure"` - - // The full ID of the blob. - BlobId *string `locationName:"blobId" type:"string"` - - // The file mode permissions of the blob. File mode permission codes include: - // - // * 100644 indicates read/write - // - // * 100755 indicates read/write/execute - // - // * 160000 indicates a submodule - // - // * 120000 indicates a symlink - Mode *string `locationName:"mode" type:"string"` - - // The path to the blob and any associated file name, if any. - Path *string `locationName:"path" type:"string"` -} - -// String returns the string representation -func (s BlobMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BlobMetadata) GoString() string { - return s.String() -} - -// SetBlobId sets the BlobId field's value. -func (s *BlobMetadata) SetBlobId(v string) *BlobMetadata { - s.BlobId = &v - return s -} - -// SetMode sets the Mode field's value. -func (s *BlobMetadata) SetMode(v string) *BlobMetadata { - s.Mode = &v - return s -} - -// SetPath sets the Path field's value. -func (s *BlobMetadata) SetPath(v string) *BlobMetadata { - s.Path = &v - return s -} - -// Returns information about a branch. -type BranchInfo struct { - _ struct{} `type:"structure"` - - // The name of the branch. - BranchName *string `locationName:"branchName" min:"1" type:"string"` - - // The ID of the last commit made to the branch. - CommitId *string `locationName:"commitId" type:"string"` -} - -// String returns the string representation -func (s BranchInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BranchInfo) GoString() string { - return s.String() -} - -// SetBranchName sets the BranchName field's value. -func (s *BranchInfo) SetBranchName(v string) *BranchInfo { - s.BranchName = &v - return s -} - -// SetCommitId sets the CommitId field's value. -func (s *BranchInfo) SetCommitId(v string) *BranchInfo { - s.CommitId = &v - return s -} - -// Returns information about a specific comment. -type Comment struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the person who posted the comment. - AuthorArn *string `locationName:"authorArn" type:"string"` - - // A unique, client-generated idempotency token that when provided in a request, - // ensures the request cannot be repeated with a changed parameter. If a request - // is received with the same parameters and a token is included, the request - // will return information about the initial request that used that token. - ClientRequestToken *string `locationName:"clientRequestToken" type:"string"` - - // The system-generated comment ID. - CommentId *string `locationName:"commentId" type:"string"` - - // The content of the comment. - Content *string `locationName:"content" type:"string"` - - // The date and time the comment was created, in timestamp format. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // A Boolean value indicating whether the comment has been deleted. - Deleted *bool `locationName:"deleted" type:"boolean"` - - // The ID of the comment for which this comment is a reply, if any. - InReplyTo *string `locationName:"inReplyTo" type:"string"` - - // The date and time the comment was most recently modified, in timestamp format. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` -} - -// String returns the string representation -func (s Comment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Comment) GoString() string { - return s.String() -} - -// SetAuthorArn sets the AuthorArn field's value. -func (s *Comment) SetAuthorArn(v string) *Comment { - s.AuthorArn = &v - return s -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *Comment) SetClientRequestToken(v string) *Comment { - s.ClientRequestToken = &v - return s -} - -// SetCommentId sets the CommentId field's value. -func (s *Comment) SetCommentId(v string) *Comment { - s.CommentId = &v - return s -} - -// SetContent sets the Content field's value. -func (s *Comment) SetContent(v string) *Comment { - s.Content = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *Comment) SetCreationDate(v time.Time) *Comment { - s.CreationDate = &v - return s -} - -// SetDeleted sets the Deleted field's value. -func (s *Comment) SetDeleted(v bool) *Comment { - s.Deleted = &v - return s -} - -// SetInReplyTo sets the InReplyTo field's value. -func (s *Comment) SetInReplyTo(v string) *Comment { - s.InReplyTo = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *Comment) SetLastModifiedDate(v time.Time) *Comment { - s.LastModifiedDate = &v - return s -} - -// Returns information about comments on the comparison between two commits. -type CommentsForComparedCommit struct { - _ struct{} `type:"structure"` - - // The full blob ID of the commit used to establish the 'after' of the comparison. - AfterBlobId *string `locationName:"afterBlobId" type:"string"` - - // The full commit ID of the commit used to establish the 'after' of the comparison. - AfterCommitId *string `locationName:"afterCommitId" type:"string"` - - // The full blob ID of the commit used to establish the 'before' of the comparison. - BeforeBlobId *string `locationName:"beforeBlobId" type:"string"` - - // The full commit ID of the commit used to establish the 'before' of the comparison. - BeforeCommitId *string `locationName:"beforeCommitId" type:"string"` - - // An array of comment objects. Each comment object contains information about - // a comment on the comparison between commits. - Comments []*Comment `locationName:"comments" type:"list"` - - // Location information about the comment on the comparison, including the file - // name, line number, and whether the version of the file where the comment - // was made is 'BEFORE' or 'AFTER'. - Location *Location `locationName:"location" type:"structure"` - - // The name of the repository that contains the compared commits. - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"` -} - -// String returns the string representation -func (s CommentsForComparedCommit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CommentsForComparedCommit) GoString() string { - return s.String() -} - -// SetAfterBlobId sets the AfterBlobId field's value. -func (s *CommentsForComparedCommit) SetAfterBlobId(v string) *CommentsForComparedCommit { - s.AfterBlobId = &v - return s -} - -// SetAfterCommitId sets the AfterCommitId field's value. -func (s *CommentsForComparedCommit) SetAfterCommitId(v string) *CommentsForComparedCommit { - s.AfterCommitId = &v - return s -} - -// SetBeforeBlobId sets the BeforeBlobId field's value. -func (s *CommentsForComparedCommit) SetBeforeBlobId(v string) *CommentsForComparedCommit { - s.BeforeBlobId = &v - return s -} - -// SetBeforeCommitId sets the BeforeCommitId field's value. -func (s *CommentsForComparedCommit) SetBeforeCommitId(v string) *CommentsForComparedCommit { - s.BeforeCommitId = &v - return s -} - -// SetComments sets the Comments field's value. -func (s *CommentsForComparedCommit) SetComments(v []*Comment) *CommentsForComparedCommit { - s.Comments = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CommentsForComparedCommit) SetLocation(v *Location) *CommentsForComparedCommit { - s.Location = v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *CommentsForComparedCommit) SetRepositoryName(v string) *CommentsForComparedCommit { - s.RepositoryName = &v - return s -} - -// Returns information about comments on a pull request. -type CommentsForPullRequest struct { - _ struct{} `type:"structure"` - - // The full blob ID of the file on which you want to comment on the source commit. - AfterBlobId *string `locationName:"afterBlobId" type:"string"` - - // he full commit ID of the commit that was the tip of the source branch at - // the time the comment was made. - AfterCommitId *string `locationName:"afterCommitId" type:"string"` - - // The full blob ID of the file on which you want to comment on the destination - // commit. - BeforeBlobId *string `locationName:"beforeBlobId" type:"string"` - - // The full commit ID of the commit that was the tip of the destination branch - // when the pull request was created. This commit will be superceded by the - // after commit in the source branch when and if you merge the source branch - // into the destination branch. - BeforeCommitId *string `locationName:"beforeCommitId" type:"string"` - - // An array of comment objects. Each comment object contains information about - // a comment on the pull request. - Comments []*Comment `locationName:"comments" type:"list"` - - // Location information about the comment on the pull request, including the - // file name, line number, and whether the version of the file where the comment - // was made is 'BEFORE' (destination branch) or 'AFTER' (source branch). - Location *Location `locationName:"location" type:"structure"` - - // The system-generated ID of the pull request. - PullRequestId *string `locationName:"pullRequestId" type:"string"` - - // The name of the repository that contains the pull request. - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"` -} - -// String returns the string representation -func (s CommentsForPullRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CommentsForPullRequest) GoString() string { - return s.String() -} - -// SetAfterBlobId sets the AfterBlobId field's value. -func (s *CommentsForPullRequest) SetAfterBlobId(v string) *CommentsForPullRequest { - s.AfterBlobId = &v - return s -} - -// SetAfterCommitId sets the AfterCommitId field's value. -func (s *CommentsForPullRequest) SetAfterCommitId(v string) *CommentsForPullRequest { - s.AfterCommitId = &v - return s -} - -// SetBeforeBlobId sets the BeforeBlobId field's value. -func (s *CommentsForPullRequest) SetBeforeBlobId(v string) *CommentsForPullRequest { - s.BeforeBlobId = &v - return s -} - -// SetBeforeCommitId sets the BeforeCommitId field's value. -func (s *CommentsForPullRequest) SetBeforeCommitId(v string) *CommentsForPullRequest { - s.BeforeCommitId = &v - return s -} - -// SetComments sets the Comments field's value. -func (s *CommentsForPullRequest) SetComments(v []*Comment) *CommentsForPullRequest { - s.Comments = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CommentsForPullRequest) SetLocation(v *Location) *CommentsForPullRequest { - s.Location = v - return s -} - -// SetPullRequestId sets the PullRequestId field's value. -func (s *CommentsForPullRequest) SetPullRequestId(v string) *CommentsForPullRequest { - s.PullRequestId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *CommentsForPullRequest) SetRepositoryName(v string) *CommentsForPullRequest { - s.RepositoryName = &v - return s -} - -// Returns information about a specific commit. -type Commit struct { - _ struct{} `type:"structure"` - - // Any additional data associated with the specified commit. - AdditionalData *string `locationName:"additionalData" type:"string"` - - // Information about the author of the specified commit. Information includes - // the date in timestamp format with GMT offset, the name of the author, and - // the email address for the author, as configured in Git. - Author *UserInfo `locationName:"author" type:"structure"` - - // The full SHA of the specified commit. - CommitId *string `locationName:"commitId" type:"string"` - - // Information about the person who committed the specified commit, also known - // as the committer. Information includes the date in timestamp format with - // GMT offset, the name of the committer, and the email address for the committer, - // as configured in Git. - // - // For more information about the difference between an author and a committer - // in Git, see Viewing the Commit History (http://git-scm.com/book/ch2-3.html) - // in Pro Git by Scott Chacon and Ben Straub. - Committer *UserInfo `locationName:"committer" type:"structure"` - - // The commit message associated with the specified commit. - Message *string `locationName:"message" type:"string"` - - // A list of parent commits for the specified commit. Each parent commit ID - // is the full commit ID. - Parents []*string `locationName:"parents" type:"list"` - - // Tree information for the specified commit. - TreeId *string `locationName:"treeId" type:"string"` -} - -// String returns the string representation -func (s Commit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Commit) GoString() string { - return s.String() -} - -// SetAdditionalData sets the AdditionalData field's value. -func (s *Commit) SetAdditionalData(v string) *Commit { - s.AdditionalData = &v - return s -} - -// SetAuthor sets the Author field's value. -func (s *Commit) SetAuthor(v *UserInfo) *Commit { - s.Author = v - return s -} - -// SetCommitId sets the CommitId field's value. -func (s *Commit) SetCommitId(v string) *Commit { - s.CommitId = &v - return s -} - -// SetCommitter sets the Committer field's value. -func (s *Commit) SetCommitter(v *UserInfo) *Commit { - s.Committer = v - return s -} - -// SetMessage sets the Message field's value. -func (s *Commit) SetMessage(v string) *Commit { - s.Message = &v - return s -} - -// SetParents sets the Parents field's value. -func (s *Commit) SetParents(v []*string) *Commit { - s.Parents = v - return s -} - -// SetTreeId sets the TreeId field's value. -func (s *Commit) SetTreeId(v string) *Commit { - s.TreeId = &v - return s -} - -// Represents the input of a create branch operation. -type CreateBranchInput struct { - _ struct{} `type:"structure"` - - // The name of the new branch to create. - // - // BranchName is a required field - BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"` - - // The ID of the commit to point the new branch to. - // - // CommitId is a required field - CommitId *string `locationName:"commitId" type:"string" required:"true"` - - // The name of the repository in which you want to create the new branch. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateBranchInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBranchInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateBranchInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateBranchInput"} - if s.BranchName == nil { - invalidParams.Add(request.NewErrParamRequired("BranchName")) - } - if s.BranchName != nil && len(*s.BranchName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BranchName", 1)) - } - if s.CommitId == nil { - invalidParams.Add(request.NewErrParamRequired("CommitId")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBranchName sets the BranchName field's value. -func (s *CreateBranchInput) SetBranchName(v string) *CreateBranchInput { - s.BranchName = &v - return s -} - -// SetCommitId sets the CommitId field's value. -func (s *CreateBranchInput) SetCommitId(v string) *CreateBranchInput { - s.CommitId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *CreateBranchInput) SetRepositoryName(v string) *CreateBranchInput { - s.RepositoryName = &v - return s -} - -type CreateBranchOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateBranchOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBranchOutput) GoString() string { - return s.String() -} - -type CreatePullRequestInput struct { - _ struct{} `type:"structure"` - - // A unique, client-generated idempotency token that when provided in a request, - // ensures the request cannot be repeated with a changed parameter. If a request - // is received with the same parameters and a token is included, the request - // will return information about the initial request that used that token. - // - // The AWS SDKs prepopulate client request tokens. If using an AWS SDK, you - // do not have to generate an idempotency token, as this will be done for you. - ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"` - - // A description of the pull request. - Description *string `locationName:"description" type:"string"` - - // The targets for the pull request, including the source of the code to be - // reviewed (the source branch), and the destination where the creator of the - // pull request intends the code to be merged after the pull request is closed - // (the destination branch). - // - // Targets is a required field - Targets []*Target `locationName:"targets" type:"list" required:"true"` - - // The title of the pull request. This title will be used to identify the pull - // request to other users in the repository. - // - // Title is a required field - Title *string `locationName:"title" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreatePullRequestInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePullRequestInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePullRequestInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePullRequestInput"} - if s.Targets == nil { - invalidParams.Add(request.NewErrParamRequired("Targets")) - } - if s.Title == nil { - invalidParams.Add(request.NewErrParamRequired("Title")) - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *CreatePullRequestInput) SetClientRequestToken(v string) *CreatePullRequestInput { - s.ClientRequestToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreatePullRequestInput) SetDescription(v string) *CreatePullRequestInput { - s.Description = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *CreatePullRequestInput) SetTargets(v []*Target) *CreatePullRequestInput { - s.Targets = v - return s -} - -// SetTitle sets the Title field's value. -func (s *CreatePullRequestInput) SetTitle(v string) *CreatePullRequestInput { - s.Title = &v - return s -} - -type CreatePullRequestOutput struct { - _ struct{} `type:"structure"` - - // Information about the newly created pull request. - // - // PullRequest is a required field - PullRequest *PullRequest `locationName:"pullRequest" type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreatePullRequestOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePullRequestOutput) GoString() string { - return s.String() -} - -// SetPullRequest sets the PullRequest field's value. -func (s *CreatePullRequestOutput) SetPullRequest(v *PullRequest) *CreatePullRequestOutput { - s.PullRequest = v - return s -} - -// Represents the input of a create repository operation. -type CreateRepositoryInput struct { - _ struct{} `type:"structure"` - - // A comment or description about the new repository. - // - // The description field for a repository accepts all HTML characters and all - // valid Unicode characters. Applications that do not HTML-encode the description - // and display it in a web page could expose users to potentially malicious - // code. Make sure that you HTML-encode the description field in any application - // that uses this API to display the repository description on a web page. - RepositoryDescription *string `locationName:"repositoryDescription" type:"string"` - - // The name of the new repository to be created. - // - // The repository name must be unique across the calling AWS account. In addition, - // repository names are limited to 100 alphanumeric, dash, and underscore characters, - // and cannot include certain characters. For a full description of the limits - // on repository names, see Limits (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html) - // in the AWS CodeCommit User Guide. The suffix ".git" is prohibited. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateRepositoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRepositoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRepositoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRepositoryInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRepositoryDescription sets the RepositoryDescription field's value. -func (s *CreateRepositoryInput) SetRepositoryDescription(v string) *CreateRepositoryInput { - s.RepositoryDescription = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *CreateRepositoryInput) SetRepositoryName(v string) *CreateRepositoryInput { - s.RepositoryName = &v - return s -} - -// Represents the output of a create repository operation. -type CreateRepositoryOutput struct { - _ struct{} `type:"structure"` - - // Information about the newly created repository. - RepositoryMetadata *RepositoryMetadata `locationName:"repositoryMetadata" type:"structure"` -} - -// String returns the string representation -func (s CreateRepositoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRepositoryOutput) GoString() string { - return s.String() -} - -// SetRepositoryMetadata sets the RepositoryMetadata field's value. -func (s *CreateRepositoryOutput) SetRepositoryMetadata(v *RepositoryMetadata) *CreateRepositoryOutput { - s.RepositoryMetadata = v - return s -} - -// Represents the input of a delete branch operation. -type DeleteBranchInput struct { - _ struct{} `type:"structure"` - - // The name of the branch to delete. - // - // BranchName is a required field - BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"` - - // The name of the repository that contains the branch to be deleted. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBranchInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBranchInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBranchInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBranchInput"} - if s.BranchName == nil { - invalidParams.Add(request.NewErrParamRequired("BranchName")) - } - if s.BranchName != nil && len(*s.BranchName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BranchName", 1)) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBranchName sets the BranchName field's value. -func (s *DeleteBranchInput) SetBranchName(v string) *DeleteBranchInput { - s.BranchName = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *DeleteBranchInput) SetRepositoryName(v string) *DeleteBranchInput { - s.RepositoryName = &v - return s -} - -// Represents the output of a delete branch operation. -type DeleteBranchOutput struct { - _ struct{} `type:"structure"` - - // Information about the branch deleted by the operation, including the branch - // name and the commit ID that was the tip of the branch. - DeletedBranch *BranchInfo `locationName:"deletedBranch" type:"structure"` -} - -// String returns the string representation -func (s DeleteBranchOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBranchOutput) GoString() string { - return s.String() -} - -// SetDeletedBranch sets the DeletedBranch field's value. -func (s *DeleteBranchOutput) SetDeletedBranch(v *BranchInfo) *DeleteBranchOutput { - s.DeletedBranch = v - return s -} - -type DeleteCommentContentInput struct { - _ struct{} `type:"structure"` - - // The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit - // or GetCommentsForPullRequest. - // - // CommentId is a required field - CommentId *string `locationName:"commentId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteCommentContentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCommentContentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCommentContentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCommentContentInput"} - if s.CommentId == nil { - invalidParams.Add(request.NewErrParamRequired("CommentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCommentId sets the CommentId field's value. -func (s *DeleteCommentContentInput) SetCommentId(v string) *DeleteCommentContentInput { - s.CommentId = &v - return s -} - -type DeleteCommentContentOutput struct { - _ struct{} `type:"structure"` - - // Information about the comment you just deleted. - Comment *Comment `locationName:"comment" type:"structure"` -} - -// String returns the string representation -func (s DeleteCommentContentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCommentContentOutput) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *DeleteCommentContentOutput) SetComment(v *Comment) *DeleteCommentContentOutput { - s.Comment = v - return s -} - -type DeleteFileInput struct { - _ struct{} `type:"structure"` - - // The name of the branch where the commit will be made deleting the file. - // - // BranchName is a required field - BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"` - - // The commit message you want to include as part of deleting the file. Commit - // messages are limited to 256 KB. If no message is specified, a default message - // will be used. - CommitMessage *string `locationName:"commitMessage" type:"string"` - - // The email address for the commit that deletes the file. If no email address - // is specified, the email address will be left blank. - Email *string `locationName:"email" type:"string"` - - // The fully-qualified path to the file that will be deleted, including the - // full name and extension of that file. For example, /examples/file.md is a - // fully qualified path to a file named file.md in a folder named examples. - // - // FilePath is a required field - FilePath *string `locationName:"filePath" type:"string" required:"true"` - - // Specifies whether to delete the folder or directory that contains the file - // you want to delete if that file is the only object in the folder or directory. - // By default, empty folders will be deleted. This includes empty folders that - // are part of the directory structure. For example, if the path to a file is - // dir1/dir2/dir3/dir4, and dir2 and dir3 are empty, deleting the last file - // in dir4 will also delete the empty folders dir4, dir3, and dir2. - KeepEmptyFolders *bool `locationName:"keepEmptyFolders" type:"boolean"` - - // The name of the author of the commit that deletes the file. If no name is - // specified, the user's ARN will be used as the author name and committer name. - Name *string `locationName:"name" type:"string"` - - // The ID of the commit that is the tip of the branch where you want to create - // the commit that will delete the file. This must be the HEAD commit for the - // branch. The commit that deletes the file will be created from this commit - // ID. - // - // ParentCommitId is a required field - ParentCommitId *string `locationName:"parentCommitId" type:"string" required:"true"` - - // The name of the repository that contains the file to delete. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteFileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFileInput"} - if s.BranchName == nil { - invalidParams.Add(request.NewErrParamRequired("BranchName")) - } - if s.BranchName != nil && len(*s.BranchName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BranchName", 1)) - } - if s.FilePath == nil { - invalidParams.Add(request.NewErrParamRequired("FilePath")) - } - if s.ParentCommitId == nil { - invalidParams.Add(request.NewErrParamRequired("ParentCommitId")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBranchName sets the BranchName field's value. -func (s *DeleteFileInput) SetBranchName(v string) *DeleteFileInput { - s.BranchName = &v - return s -} - -// SetCommitMessage sets the CommitMessage field's value. -func (s *DeleteFileInput) SetCommitMessage(v string) *DeleteFileInput { - s.CommitMessage = &v - return s -} - -// SetEmail sets the Email field's value. -func (s *DeleteFileInput) SetEmail(v string) *DeleteFileInput { - s.Email = &v - return s -} - -// SetFilePath sets the FilePath field's value. -func (s *DeleteFileInput) SetFilePath(v string) *DeleteFileInput { - s.FilePath = &v - return s -} - -// SetKeepEmptyFolders sets the KeepEmptyFolders field's value. -func (s *DeleteFileInput) SetKeepEmptyFolders(v bool) *DeleteFileInput { - s.KeepEmptyFolders = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteFileInput) SetName(v string) *DeleteFileInput { - s.Name = &v - return s -} - -// SetParentCommitId sets the ParentCommitId field's value. -func (s *DeleteFileInput) SetParentCommitId(v string) *DeleteFileInput { - s.ParentCommitId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *DeleteFileInput) SetRepositoryName(v string) *DeleteFileInput { - s.RepositoryName = &v - return s -} - -type DeleteFileOutput struct { - _ struct{} `type:"structure"` - - // The blob ID removed from the tree as part of deleting the file. - // - // BlobId is a required field - BlobId *string `locationName:"blobId" type:"string" required:"true"` - - // The full commit ID of the commit that contains the change that deletes the - // file. - // - // CommitId is a required field - CommitId *string `locationName:"commitId" type:"string" required:"true"` - - // The fully-qualified path to the file that will be deleted, including the - // full name and extension of that file. - // - // FilePath is a required field - FilePath *string `locationName:"filePath" type:"string" required:"true"` - - // The full SHA-1 pointer of the tree information for the commit that contains - // the delete file change. - // - // TreeId is a required field - TreeId *string `locationName:"treeId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteFileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFileOutput) GoString() string { - return s.String() -} - -// SetBlobId sets the BlobId field's value. -func (s *DeleteFileOutput) SetBlobId(v string) *DeleteFileOutput { - s.BlobId = &v - return s -} - -// SetCommitId sets the CommitId field's value. -func (s *DeleteFileOutput) SetCommitId(v string) *DeleteFileOutput { - s.CommitId = &v - return s -} - -// SetFilePath sets the FilePath field's value. -func (s *DeleteFileOutput) SetFilePath(v string) *DeleteFileOutput { - s.FilePath = &v - return s -} - -// SetTreeId sets the TreeId field's value. -func (s *DeleteFileOutput) SetTreeId(v string) *DeleteFileOutput { - s.TreeId = &v - return s -} - -// Represents the input of a delete repository operation. -type DeleteRepositoryInput struct { - _ struct{} `type:"structure"` - - // The name of the repository to delete. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRepositoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRepositoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRepositoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *DeleteRepositoryInput) SetRepositoryName(v string) *DeleteRepositoryInput { - s.RepositoryName = &v - return s -} - -// Represents the output of a delete repository operation. -type DeleteRepositoryOutput struct { - _ struct{} `type:"structure"` - - // The ID of the repository that was deleted. - RepositoryId *string `locationName:"repositoryId" type:"string"` -} - -// String returns the string representation -func (s DeleteRepositoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRepositoryOutput) GoString() string { - return s.String() -} - -// SetRepositoryId sets the RepositoryId field's value. -func (s *DeleteRepositoryOutput) SetRepositoryId(v string) *DeleteRepositoryOutput { - s.RepositoryId = &v - return s -} - -type DescribePullRequestEventsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the user whose actions resulted in the - // event. Examples include updating the pull request with additional commits - // or changing the status of a pull request. - ActorArn *string `locationName:"actorArn" type:"string"` - - // A non-negative integer used to limit the number of returned results. The - // default is 100 events, which is also the maximum number of events that can - // be returned in a result. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // An enumeration token that when provided in a request, returns the next batch - // of the results. - NextToken *string `locationName:"nextToken" type:"string"` - - // Optional. The pull request event type about which you want to return information. - PullRequestEventType *string `locationName:"pullRequestEventType" type:"string" enum:"PullRequestEventType"` - - // The system-generated ID of the pull request. To get this ID, use ListPullRequests. - // - // PullRequestId is a required field - PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribePullRequestEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePullRequestEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribePullRequestEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribePullRequestEventsInput"} - if s.PullRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("PullRequestId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActorArn sets the ActorArn field's value. -func (s *DescribePullRequestEventsInput) SetActorArn(v string) *DescribePullRequestEventsInput { - s.ActorArn = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribePullRequestEventsInput) SetMaxResults(v int64) *DescribePullRequestEventsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePullRequestEventsInput) SetNextToken(v string) *DescribePullRequestEventsInput { - s.NextToken = &v - return s -} - -// SetPullRequestEventType sets the PullRequestEventType field's value. -func (s *DescribePullRequestEventsInput) SetPullRequestEventType(v string) *DescribePullRequestEventsInput { - s.PullRequestEventType = &v - return s -} - -// SetPullRequestId sets the PullRequestId field's value. -func (s *DescribePullRequestEventsInput) SetPullRequestId(v string) *DescribePullRequestEventsInput { - s.PullRequestId = &v - return s -} - -type DescribePullRequestEventsOutput struct { - _ struct{} `type:"structure"` - - // An enumeration token that can be used in a request to return the next batch - // of the results. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the pull request events. - // - // PullRequestEvents is a required field - PullRequestEvents []*PullRequestEvent `locationName:"pullRequestEvents" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribePullRequestEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePullRequestEventsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePullRequestEventsOutput) SetNextToken(v string) *DescribePullRequestEventsOutput { - s.NextToken = &v - return s -} - -// SetPullRequestEvents sets the PullRequestEvents field's value. -func (s *DescribePullRequestEventsOutput) SetPullRequestEvents(v []*PullRequestEvent) *DescribePullRequestEventsOutput { - s.PullRequestEvents = v - return s -} - -// Returns information about a set of differences for a commit specifier. -type Difference struct { - _ struct{} `type:"structure"` - - // Information about an afterBlob data type object, including the ID, the file - // mode permission code, and the path. - AfterBlob *BlobMetadata `locationName:"afterBlob" type:"structure"` - - // Information about a beforeBlob data type object, including the ID, the file - // mode permission code, and the path. - BeforeBlob *BlobMetadata `locationName:"beforeBlob" type:"structure"` - - // Whether the change type of the difference is an addition (A), deletion (D), - // or modification (M). - ChangeType *string `locationName:"changeType" type:"string" enum:"ChangeTypeEnum"` -} - -// String returns the string representation -func (s Difference) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Difference) GoString() string { - return s.String() -} - -// SetAfterBlob sets the AfterBlob field's value. -func (s *Difference) SetAfterBlob(v *BlobMetadata) *Difference { - s.AfterBlob = v - return s -} - -// SetBeforeBlob sets the BeforeBlob field's value. -func (s *Difference) SetBeforeBlob(v *BlobMetadata) *Difference { - s.BeforeBlob = v - return s -} - -// SetChangeType sets the ChangeType field's value. -func (s *Difference) SetChangeType(v string) *Difference { - s.ChangeType = &v - return s -} - -// Returns information about a file in a repository. -type File struct { - _ struct{} `type:"structure"` - - // The fully-qualified path to the file in the repository. - AbsolutePath *string `locationName:"absolutePath" type:"string"` - - // The blob ID that contains the file information. - BlobId *string `locationName:"blobId" type:"string"` - - // The extrapolated file mode permissions for the file. Valid values include - // EXECUTABLE and NORMAL. - FileMode *string `locationName:"fileMode" type:"string" enum:"FileModeTypeEnum"` - - // The relative path of the file from the folder where the query originated. - RelativePath *string `locationName:"relativePath" type:"string"` -} - -// String returns the string representation -func (s File) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s File) GoString() string { - return s.String() -} - -// SetAbsolutePath sets the AbsolutePath field's value. -func (s *File) SetAbsolutePath(v string) *File { - s.AbsolutePath = &v - return s -} - -// SetBlobId sets the BlobId field's value. -func (s *File) SetBlobId(v string) *File { - s.BlobId = &v - return s -} - -// SetFileMode sets the FileMode field's value. -func (s *File) SetFileMode(v string) *File { - s.FileMode = &v - return s -} - -// SetRelativePath sets the RelativePath field's value. -func (s *File) SetRelativePath(v string) *File { - s.RelativePath = &v - return s -} - -// Returns information about a folder in a repository. -type Folder struct { - _ struct{} `type:"structure"` - - // The fully-qualified path of the folder in the repository. - AbsolutePath *string `locationName:"absolutePath" type:"string"` - - // The relative path of the specified folder from the folder where the query - // originated. - RelativePath *string `locationName:"relativePath" type:"string"` - - // The full SHA-1 pointer of the tree information for the commit that contains - // the folder. - TreeId *string `locationName:"treeId" type:"string"` -} - -// String returns the string representation -func (s Folder) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Folder) GoString() string { - return s.String() -} - -// SetAbsolutePath sets the AbsolutePath field's value. -func (s *Folder) SetAbsolutePath(v string) *Folder { - s.AbsolutePath = &v - return s -} - -// SetRelativePath sets the RelativePath field's value. -func (s *Folder) SetRelativePath(v string) *Folder { - s.RelativePath = &v - return s -} - -// SetTreeId sets the TreeId field's value. -func (s *Folder) SetTreeId(v string) *Folder { - s.TreeId = &v - return s -} - -// Represents the input of a get blob operation. -type GetBlobInput struct { - _ struct{} `type:"structure"` - - // The ID of the blob, which is its SHA-1 pointer. - // - // BlobId is a required field - BlobId *string `locationName:"blobId" type:"string" required:"true"` - - // The name of the repository that contains the blob. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetBlobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBlobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBlobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBlobInput"} - if s.BlobId == nil { - invalidParams.Add(request.NewErrParamRequired("BlobId")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBlobId sets the BlobId field's value. -func (s *GetBlobInput) SetBlobId(v string) *GetBlobInput { - s.BlobId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetBlobInput) SetRepositoryName(v string) *GetBlobInput { - s.RepositoryName = &v - return s -} - -// Represents the output of a get blob operation. -type GetBlobOutput struct { - _ struct{} `type:"structure"` - - // The content of the blob, usually a file. - // - // Content is automatically base64 encoded/decoded by the SDK. - // - // Content is a required field - Content []byte `locationName:"content" type:"blob" required:"true"` -} - -// String returns the string representation -func (s GetBlobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBlobOutput) GoString() string { - return s.String() -} - -// SetContent sets the Content field's value. -func (s *GetBlobOutput) SetContent(v []byte) *GetBlobOutput { - s.Content = v - return s -} - -// Represents the input of a get branch operation. -type GetBranchInput struct { - _ struct{} `type:"structure"` - - // The name of the branch for which you want to retrieve information. - BranchName *string `locationName:"branchName" min:"1" type:"string"` - - // The name of the repository that contains the branch for which you want to - // retrieve information. - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetBranchInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBranchInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBranchInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBranchInput"} - if s.BranchName != nil && len(*s.BranchName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BranchName", 1)) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBranchName sets the BranchName field's value. -func (s *GetBranchInput) SetBranchName(v string) *GetBranchInput { - s.BranchName = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetBranchInput) SetRepositoryName(v string) *GetBranchInput { - s.RepositoryName = &v - return s -} - -// Represents the output of a get branch operation. -type GetBranchOutput struct { - _ struct{} `type:"structure"` - - // The name of the branch. - Branch *BranchInfo `locationName:"branch" type:"structure"` -} - -// String returns the string representation -func (s GetBranchOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBranchOutput) GoString() string { - return s.String() -} - -// SetBranch sets the Branch field's value. -func (s *GetBranchOutput) SetBranch(v *BranchInfo) *GetBranchOutput { - s.Branch = v - return s -} - -type GetCommentInput struct { - _ struct{} `type:"structure"` - - // The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit - // or GetCommentsForPullRequest. - // - // CommentId is a required field - CommentId *string `locationName:"commentId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCommentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCommentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCommentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCommentInput"} - if s.CommentId == nil { - invalidParams.Add(request.NewErrParamRequired("CommentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCommentId sets the CommentId field's value. -func (s *GetCommentInput) SetCommentId(v string) *GetCommentInput { - s.CommentId = &v - return s -} - -type GetCommentOutput struct { - _ struct{} `type:"structure"` - - // The contents of the comment. - Comment *Comment `locationName:"comment" type:"structure"` -} - -// String returns the string representation -func (s GetCommentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCommentOutput) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *GetCommentOutput) SetComment(v *Comment) *GetCommentOutput { - s.Comment = v - return s -} - -type GetCommentsForComparedCommitInput struct { - _ struct{} `type:"structure"` - - // To establish the directionality of the comparison, the full commit ID of - // the 'after' commit. - // - // AfterCommitId is a required field - AfterCommitId *string `locationName:"afterCommitId" type:"string" required:"true"` - - // To establish the directionality of the comparison, the full commit ID of - // the 'before' commit. - BeforeCommitId *string `locationName:"beforeCommitId" type:"string"` - - // A non-negative integer used to limit the number of returned results. The - // default is 100 comments, and is configurable up to 500. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // An enumeration token that when provided in a request, returns the next batch - // of the results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The name of the repository where you want to compare commits. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCommentsForComparedCommitInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCommentsForComparedCommitInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCommentsForComparedCommitInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCommentsForComparedCommitInput"} - if s.AfterCommitId == nil { - invalidParams.Add(request.NewErrParamRequired("AfterCommitId")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAfterCommitId sets the AfterCommitId field's value. -func (s *GetCommentsForComparedCommitInput) SetAfterCommitId(v string) *GetCommentsForComparedCommitInput { - s.AfterCommitId = &v - return s -} - -// SetBeforeCommitId sets the BeforeCommitId field's value. -func (s *GetCommentsForComparedCommitInput) SetBeforeCommitId(v string) *GetCommentsForComparedCommitInput { - s.BeforeCommitId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetCommentsForComparedCommitInput) SetMaxResults(v int64) *GetCommentsForComparedCommitInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetCommentsForComparedCommitInput) SetNextToken(v string) *GetCommentsForComparedCommitInput { - s.NextToken = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetCommentsForComparedCommitInput) SetRepositoryName(v string) *GetCommentsForComparedCommitInput { - s.RepositoryName = &v - return s -} - -type GetCommentsForComparedCommitOutput struct { - _ struct{} `type:"structure"` - - // A list of comment objects on the compared commit. - CommentsForComparedCommitData []*CommentsForComparedCommit `locationName:"commentsForComparedCommitData" type:"list"` - - // An enumeration token that can be used in a request to return the next batch - // of the results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetCommentsForComparedCommitOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCommentsForComparedCommitOutput) GoString() string { - return s.String() -} - -// SetCommentsForComparedCommitData sets the CommentsForComparedCommitData field's value. -func (s *GetCommentsForComparedCommitOutput) SetCommentsForComparedCommitData(v []*CommentsForComparedCommit) *GetCommentsForComparedCommitOutput { - s.CommentsForComparedCommitData = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetCommentsForComparedCommitOutput) SetNextToken(v string) *GetCommentsForComparedCommitOutput { - s.NextToken = &v - return s -} - -type GetCommentsForPullRequestInput struct { - _ struct{} `type:"structure"` - - // The full commit ID of the commit in the source branch that was the tip of - // the branch at the time the comment was made. - AfterCommitId *string `locationName:"afterCommitId" type:"string"` - - // The full commit ID of the commit in the destination branch that was the tip - // of the branch at the time the pull request was created. - BeforeCommitId *string `locationName:"beforeCommitId" type:"string"` - - // A non-negative integer used to limit the number of returned results. The - // default is 100 comments. You can return up to 500 comments with a single - // request. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // An enumeration token that when provided in a request, returns the next batch - // of the results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The system-generated ID of the pull request. To get this ID, use ListPullRequests. - // - // PullRequestId is a required field - PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"` - - // The name of the repository that contains the pull request. - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetCommentsForPullRequestInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCommentsForPullRequestInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCommentsForPullRequestInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCommentsForPullRequestInput"} - if s.PullRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("PullRequestId")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAfterCommitId sets the AfterCommitId field's value. -func (s *GetCommentsForPullRequestInput) SetAfterCommitId(v string) *GetCommentsForPullRequestInput { - s.AfterCommitId = &v - return s -} - -// SetBeforeCommitId sets the BeforeCommitId field's value. -func (s *GetCommentsForPullRequestInput) SetBeforeCommitId(v string) *GetCommentsForPullRequestInput { - s.BeforeCommitId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetCommentsForPullRequestInput) SetMaxResults(v int64) *GetCommentsForPullRequestInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetCommentsForPullRequestInput) SetNextToken(v string) *GetCommentsForPullRequestInput { - s.NextToken = &v - return s -} - -// SetPullRequestId sets the PullRequestId field's value. -func (s *GetCommentsForPullRequestInput) SetPullRequestId(v string) *GetCommentsForPullRequestInput { - s.PullRequestId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetCommentsForPullRequestInput) SetRepositoryName(v string) *GetCommentsForPullRequestInput { - s.RepositoryName = &v - return s -} - -type GetCommentsForPullRequestOutput struct { - _ struct{} `type:"structure"` - - // An array of comment objects on the pull request. - CommentsForPullRequestData []*CommentsForPullRequest `locationName:"commentsForPullRequestData" type:"list"` - - // An enumeration token that can be used in a request to return the next batch - // of the results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetCommentsForPullRequestOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCommentsForPullRequestOutput) GoString() string { - return s.String() -} - -// SetCommentsForPullRequestData sets the CommentsForPullRequestData field's value. -func (s *GetCommentsForPullRequestOutput) SetCommentsForPullRequestData(v []*CommentsForPullRequest) *GetCommentsForPullRequestOutput { - s.CommentsForPullRequestData = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetCommentsForPullRequestOutput) SetNextToken(v string) *GetCommentsForPullRequestOutput { - s.NextToken = &v - return s -} - -// Represents the input of a get commit operation. -type GetCommitInput struct { - _ struct{} `type:"structure"` - - // The commit ID. Commit IDs are the full SHA of the commit. - // - // CommitId is a required field - CommitId *string `locationName:"commitId" type:"string" required:"true"` - - // The name of the repository to which the commit was made. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCommitInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCommitInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCommitInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCommitInput"} - if s.CommitId == nil { - invalidParams.Add(request.NewErrParamRequired("CommitId")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCommitId sets the CommitId field's value. -func (s *GetCommitInput) SetCommitId(v string) *GetCommitInput { - s.CommitId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetCommitInput) SetRepositoryName(v string) *GetCommitInput { - s.RepositoryName = &v - return s -} - -// Represents the output of a get commit operation. -type GetCommitOutput struct { - _ struct{} `type:"structure"` - - // A commit data type object that contains information about the specified commit. - // - // Commit is a required field - Commit *Commit `locationName:"commit" type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetCommitOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCommitOutput) GoString() string { - return s.String() -} - -// SetCommit sets the Commit field's value. -func (s *GetCommitOutput) SetCommit(v *Commit) *GetCommitOutput { - s.Commit = v - return s -} - -type GetDifferencesInput struct { - _ struct{} `type:"structure"` - - // The branch, tag, HEAD, or other fully qualified reference used to identify - // a commit. - // - // AfterCommitSpecifier is a required field - AfterCommitSpecifier *string `locationName:"afterCommitSpecifier" type:"string" required:"true"` - - // The file path in which to check differences. Limits the results to this path. - // Can also be used to specify the changed name of a directory or folder, if - // it has changed. If not specified, differences will be shown for all paths. - AfterPath *string `locationName:"afterPath" type:"string"` - - // The branch, tag, HEAD, or other fully qualified reference used to identify - // a commit. For example, the full commit ID. Optional. If not specified, all - // changes prior to the afterCommitSpecifier value will be shown. If you do - // not use beforeCommitSpecifier in your request, consider limiting the results - // with maxResults. - BeforeCommitSpecifier *string `locationName:"beforeCommitSpecifier" type:"string"` - - // The file path in which to check for differences. Limits the results to this - // path. Can also be used to specify the previous name of a directory or folder. - // If beforePath and afterPath are not specified, differences will be shown - // for all paths. - BeforePath *string `locationName:"beforePath" type:"string"` - - // A non-negative integer used to limit the number of returned results. - MaxResults *int64 `type:"integer"` - - // An enumeration token that when provided in a request, returns the next batch - // of the results. - NextToken *string `type:"string"` - - // The name of the repository where you want to get differences. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDifferencesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDifferencesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDifferencesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDifferencesInput"} - if s.AfterCommitSpecifier == nil { - invalidParams.Add(request.NewErrParamRequired("AfterCommitSpecifier")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAfterCommitSpecifier sets the AfterCommitSpecifier field's value. -func (s *GetDifferencesInput) SetAfterCommitSpecifier(v string) *GetDifferencesInput { - s.AfterCommitSpecifier = &v - return s -} - -// SetAfterPath sets the AfterPath field's value. -func (s *GetDifferencesInput) SetAfterPath(v string) *GetDifferencesInput { - s.AfterPath = &v - return s -} - -// SetBeforeCommitSpecifier sets the BeforeCommitSpecifier field's value. -func (s *GetDifferencesInput) SetBeforeCommitSpecifier(v string) *GetDifferencesInput { - s.BeforeCommitSpecifier = &v - return s -} - -// SetBeforePath sets the BeforePath field's value. -func (s *GetDifferencesInput) SetBeforePath(v string) *GetDifferencesInput { - s.BeforePath = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetDifferencesInput) SetMaxResults(v int64) *GetDifferencesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetDifferencesInput) SetNextToken(v string) *GetDifferencesInput { - s.NextToken = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetDifferencesInput) SetRepositoryName(v string) *GetDifferencesInput { - s.RepositoryName = &v - return s -} - -type GetDifferencesOutput struct { - _ struct{} `type:"structure"` - - // A differences data type object that contains information about the differences, - // including whether the difference is added, modified, or deleted (A, D, M). - Differences []*Difference `locationName:"differences" type:"list"` - - // An enumeration token that can be used in a request to return the next batch - // of the results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetDifferencesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDifferencesOutput) GoString() string { - return s.String() -} - -// SetDifferences sets the Differences field's value. -func (s *GetDifferencesOutput) SetDifferences(v []*Difference) *GetDifferencesOutput { - s.Differences = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetDifferencesOutput) SetNextToken(v string) *GetDifferencesOutput { - s.NextToken = &v - return s -} - -type GetFileInput struct { - _ struct{} `type:"structure"` - - // The fully-quaified reference that identifies the commit that contains the - // file. For example, you could specify a full commit ID, a tag, a branch name, - // or a reference such as refs/heads/master. If none is provided, then the head - // commit will be used. - CommitSpecifier *string `locationName:"commitSpecifier" type:"string"` - - // The fully-qualified path to the file, including the full name and extension - // of the file. For example, /examples/file.md is the fully-qualified path to - // a file named file.md in a folder named examples. - // - // FilePath is a required field - FilePath *string `locationName:"filePath" type:"string" required:"true"` - - // The name of the repository that contains the file. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetFileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFileInput"} - if s.FilePath == nil { - invalidParams.Add(request.NewErrParamRequired("FilePath")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCommitSpecifier sets the CommitSpecifier field's value. -func (s *GetFileInput) SetCommitSpecifier(v string) *GetFileInput { - s.CommitSpecifier = &v - return s -} - -// SetFilePath sets the FilePath field's value. -func (s *GetFileInput) SetFilePath(v string) *GetFileInput { - s.FilePath = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetFileInput) SetRepositoryName(v string) *GetFileInput { - s.RepositoryName = &v - return s -} - -type GetFileOutput struct { - _ struct{} `type:"structure"` - - // The blob ID of the object that represents the file content. - // - // BlobId is a required field - BlobId *string `locationName:"blobId" type:"string" required:"true"` - - // The full commit ID of the commit that contains the content returned by GetFile. - // - // CommitId is a required field - CommitId *string `locationName:"commitId" type:"string" required:"true"` - - // The base-64 encoded binary data object that represents the content of the - // file. - // - // FileContent is automatically base64 encoded/decoded by the SDK. - // - // FileContent is a required field - FileContent []byte `locationName:"fileContent" type:"blob" required:"true"` - - // The extrapolated file mode permissions of the blob. Valid values include - // strings such as EXECUTABLE and not numeric values. - // - // The file mode permissions returned by this API are not the standard file - // mode permission values, such as 100644, but rather extrapolated values. See - // below for a full list of supported return values. - // - // FileMode is a required field - FileMode *string `locationName:"fileMode" type:"string" required:"true" enum:"FileModeTypeEnum"` - - // The fully qualified path to the specified file. This returns the name and - // extension of the file. - // - // FilePath is a required field - FilePath *string `locationName:"filePath" type:"string" required:"true"` - - // The size of the contents of the file, in bytes. - // - // FileSize is a required field - FileSize *int64 `locationName:"fileSize" type:"long" required:"true"` -} - -// String returns the string representation -func (s GetFileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFileOutput) GoString() string { - return s.String() -} - -// SetBlobId sets the BlobId field's value. -func (s *GetFileOutput) SetBlobId(v string) *GetFileOutput { - s.BlobId = &v - return s -} - -// SetCommitId sets the CommitId field's value. -func (s *GetFileOutput) SetCommitId(v string) *GetFileOutput { - s.CommitId = &v - return s -} - -// SetFileContent sets the FileContent field's value. -func (s *GetFileOutput) SetFileContent(v []byte) *GetFileOutput { - s.FileContent = v - return s -} - -// SetFileMode sets the FileMode field's value. -func (s *GetFileOutput) SetFileMode(v string) *GetFileOutput { - s.FileMode = &v - return s -} - -// SetFilePath sets the FilePath field's value. -func (s *GetFileOutput) SetFilePath(v string) *GetFileOutput { - s.FilePath = &v - return s -} - -// SetFileSize sets the FileSize field's value. -func (s *GetFileOutput) SetFileSize(v int64) *GetFileOutput { - s.FileSize = &v - return s -} - -type GetFolderInput struct { - _ struct{} `type:"structure"` - - // A fully-qualified reference used to identify a commit that contains the version - // of the folder's content to return. A fully-qualified reference can be a commit - // ID, branch name, tag, or reference such as HEAD. If no specifier is provided, - // the folder content will be returned as it exists in the HEAD commit. - CommitSpecifier *string `locationName:"commitSpecifier" type:"string"` - - // The fully-qualified path to the folder whose contents will be returned, including - // the folder name. For example, /examples is a fully-qualified path to a folder - // named examples that was created off of the root directory (/) of a repository. - // - // FolderPath is a required field - FolderPath *string `locationName:"folderPath" type:"string" required:"true"` - - // The name of the repository. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetFolderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFolderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFolderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFolderInput"} - if s.FolderPath == nil { - invalidParams.Add(request.NewErrParamRequired("FolderPath")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCommitSpecifier sets the CommitSpecifier field's value. -func (s *GetFolderInput) SetCommitSpecifier(v string) *GetFolderInput { - s.CommitSpecifier = &v - return s -} - -// SetFolderPath sets the FolderPath field's value. -func (s *GetFolderInput) SetFolderPath(v string) *GetFolderInput { - s.FolderPath = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetFolderInput) SetRepositoryName(v string) *GetFolderInput { - s.RepositoryName = &v - return s -} - -type GetFolderOutput struct { - _ struct{} `type:"structure"` - - // The full commit ID used as a reference for which version of the folder content - // is returned. - // - // CommitId is a required field - CommitId *string `locationName:"commitId" type:"string" required:"true"` - - // The list of files that exist in the specified folder, if any. - Files []*File `locationName:"files" type:"list"` - - // The fully-qualified path of the folder whose contents are returned. - // - // FolderPath is a required field - FolderPath *string `locationName:"folderPath" type:"string" required:"true"` - - // The list of folders that exist beneath the specified folder, if any. - SubFolders []*Folder `locationName:"subFolders" type:"list"` - - // The list of submodules that exist in the specified folder, if any. - SubModules []*SubModule `locationName:"subModules" type:"list"` - - // The list of symbolic links to other files and folders that exist in the specified - // folder, if any. - SymbolicLinks []*SymbolicLink `locationName:"symbolicLinks" type:"list"` - - // The full SHA-1 pointer of the tree information for the commit that contains - // the folder. - TreeId *string `locationName:"treeId" type:"string"` -} - -// String returns the string representation -func (s GetFolderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFolderOutput) GoString() string { - return s.String() -} - -// SetCommitId sets the CommitId field's value. -func (s *GetFolderOutput) SetCommitId(v string) *GetFolderOutput { - s.CommitId = &v - return s -} - -// SetFiles sets the Files field's value. -func (s *GetFolderOutput) SetFiles(v []*File) *GetFolderOutput { - s.Files = v - return s -} - -// SetFolderPath sets the FolderPath field's value. -func (s *GetFolderOutput) SetFolderPath(v string) *GetFolderOutput { - s.FolderPath = &v - return s -} - -// SetSubFolders sets the SubFolders field's value. -func (s *GetFolderOutput) SetSubFolders(v []*Folder) *GetFolderOutput { - s.SubFolders = v - return s -} - -// SetSubModules sets the SubModules field's value. -func (s *GetFolderOutput) SetSubModules(v []*SubModule) *GetFolderOutput { - s.SubModules = v - return s -} - -// SetSymbolicLinks sets the SymbolicLinks field's value. -func (s *GetFolderOutput) SetSymbolicLinks(v []*SymbolicLink) *GetFolderOutput { - s.SymbolicLinks = v - return s -} - -// SetTreeId sets the TreeId field's value. -func (s *GetFolderOutput) SetTreeId(v string) *GetFolderOutput { - s.TreeId = &v - return s -} - -type GetMergeConflictsInput struct { - _ struct{} `type:"structure"` - - // The branch, tag, HEAD, or other fully qualified reference used to identify - // a commit. For example, a branch name or a full commit ID. - // - // DestinationCommitSpecifier is a required field - DestinationCommitSpecifier *string `locationName:"destinationCommitSpecifier" type:"string" required:"true"` - - // The merge option or strategy you want to use to merge the code. The only - // valid value is FAST_FORWARD_MERGE. - // - // MergeOption is a required field - MergeOption *string `locationName:"mergeOption" type:"string" required:"true" enum:"MergeOptionTypeEnum"` - - // The name of the repository where the pull request was created. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` - - // The branch, tag, HEAD, or other fully qualified reference used to identify - // a commit. For example, a branch name or a full commit ID. - // - // SourceCommitSpecifier is a required field - SourceCommitSpecifier *string `locationName:"sourceCommitSpecifier" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetMergeConflictsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMergeConflictsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMergeConflictsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMergeConflictsInput"} - if s.DestinationCommitSpecifier == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationCommitSpecifier")) - } - if s.MergeOption == nil { - invalidParams.Add(request.NewErrParamRequired("MergeOption")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - if s.SourceCommitSpecifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceCommitSpecifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationCommitSpecifier sets the DestinationCommitSpecifier field's value. -func (s *GetMergeConflictsInput) SetDestinationCommitSpecifier(v string) *GetMergeConflictsInput { - s.DestinationCommitSpecifier = &v - return s -} - -// SetMergeOption sets the MergeOption field's value. -func (s *GetMergeConflictsInput) SetMergeOption(v string) *GetMergeConflictsInput { - s.MergeOption = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetMergeConflictsInput) SetRepositoryName(v string) *GetMergeConflictsInput { - s.RepositoryName = &v - return s -} - -// SetSourceCommitSpecifier sets the SourceCommitSpecifier field's value. -func (s *GetMergeConflictsInput) SetSourceCommitSpecifier(v string) *GetMergeConflictsInput { - s.SourceCommitSpecifier = &v - return s -} - -type GetMergeConflictsOutput struct { - _ struct{} `type:"structure"` - - // The commit ID of the destination commit specifier that was used in the merge - // evaluation. - // - // DestinationCommitId is a required field - DestinationCommitId *string `locationName:"destinationCommitId" type:"string" required:"true"` - - // A Boolean value that indicates whether the code is mergable by the specified - // merge option. - // - // Mergeable is a required field - Mergeable *bool `locationName:"mergeable" type:"boolean" required:"true"` - - // The commit ID of the source commit specifier that was used in the merge evaluation. - // - // SourceCommitId is a required field - SourceCommitId *string `locationName:"sourceCommitId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetMergeConflictsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMergeConflictsOutput) GoString() string { - return s.String() -} - -// SetDestinationCommitId sets the DestinationCommitId field's value. -func (s *GetMergeConflictsOutput) SetDestinationCommitId(v string) *GetMergeConflictsOutput { - s.DestinationCommitId = &v - return s -} - -// SetMergeable sets the Mergeable field's value. -func (s *GetMergeConflictsOutput) SetMergeable(v bool) *GetMergeConflictsOutput { - s.Mergeable = &v - return s -} - -// SetSourceCommitId sets the SourceCommitId field's value. -func (s *GetMergeConflictsOutput) SetSourceCommitId(v string) *GetMergeConflictsOutput { - s.SourceCommitId = &v - return s -} - -type GetPullRequestInput struct { - _ struct{} `type:"structure"` - - // The system-generated ID of the pull request. To get this ID, use ListPullRequests. - // - // PullRequestId is a required field - PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPullRequestInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPullRequestInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPullRequestInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPullRequestInput"} - if s.PullRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("PullRequestId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPullRequestId sets the PullRequestId field's value. -func (s *GetPullRequestInput) SetPullRequestId(v string) *GetPullRequestInput { - s.PullRequestId = &v - return s -} - -type GetPullRequestOutput struct { - _ struct{} `type:"structure"` - - // Information about the specified pull request. - // - // PullRequest is a required field - PullRequest *PullRequest `locationName:"pullRequest" type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetPullRequestOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPullRequestOutput) GoString() string { - return s.String() -} - -// SetPullRequest sets the PullRequest field's value. -func (s *GetPullRequestOutput) SetPullRequest(v *PullRequest) *GetPullRequestOutput { - s.PullRequest = v - return s -} - -// Represents the input of a get repository operation. -type GetRepositoryInput struct { - _ struct{} `type:"structure"` - - // The name of the repository to get information about. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRepositoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRepositoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRepositoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRepositoryInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetRepositoryInput) SetRepositoryName(v string) *GetRepositoryInput { - s.RepositoryName = &v - return s -} - -// Represents the output of a get repository operation. -type GetRepositoryOutput struct { - _ struct{} `type:"structure"` - - // Information about the repository. - RepositoryMetadata *RepositoryMetadata `locationName:"repositoryMetadata" type:"structure"` -} - -// String returns the string representation -func (s GetRepositoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRepositoryOutput) GoString() string { - return s.String() -} - -// SetRepositoryMetadata sets the RepositoryMetadata field's value. -func (s *GetRepositoryOutput) SetRepositoryMetadata(v *RepositoryMetadata) *GetRepositoryOutput { - s.RepositoryMetadata = v - return s -} - -// Represents the input of a get repository triggers operation. -type GetRepositoryTriggersInput struct { - _ struct{} `type:"structure"` - - // The name of the repository for which the trigger is configured. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRepositoryTriggersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRepositoryTriggersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRepositoryTriggersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRepositoryTriggersInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetRepositoryTriggersInput) SetRepositoryName(v string) *GetRepositoryTriggersInput { - s.RepositoryName = &v - return s -} - -// Represents the output of a get repository triggers operation. -type GetRepositoryTriggersOutput struct { - _ struct{} `type:"structure"` - - // The system-generated unique ID for the trigger. - ConfigurationId *string `locationName:"configurationId" type:"string"` - - // The JSON block of configuration information for each trigger. - Triggers []*RepositoryTrigger `locationName:"triggers" type:"list"` -} - -// String returns the string representation -func (s GetRepositoryTriggersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRepositoryTriggersOutput) GoString() string { - return s.String() -} - -// SetConfigurationId sets the ConfigurationId field's value. -func (s *GetRepositoryTriggersOutput) SetConfigurationId(v string) *GetRepositoryTriggersOutput { - s.ConfigurationId = &v - return s -} - -// SetTriggers sets the Triggers field's value. -func (s *GetRepositoryTriggersOutput) SetTriggers(v []*RepositoryTrigger) *GetRepositoryTriggersOutput { - s.Triggers = v - return s -} - -// Represents the input of a list branches operation. -type ListBranchesInput struct { - _ struct{} `type:"structure"` - - // An enumeration token that allows the operation to batch the results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The name of the repository that contains the branches. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListBranchesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBranchesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBranchesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBranchesInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBranchesInput) SetNextToken(v string) *ListBranchesInput { - s.NextToken = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *ListBranchesInput) SetRepositoryName(v string) *ListBranchesInput { - s.RepositoryName = &v - return s -} - -// Represents the output of a list branches operation. -type ListBranchesOutput struct { - _ struct{} `type:"structure"` - - // The list of branch names. - Branches []*string `locationName:"branches" type:"list"` - - // An enumeration token that returns the batch of the results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListBranchesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBranchesOutput) GoString() string { - return s.String() -} - -// SetBranches sets the Branches field's value. -func (s *ListBranchesOutput) SetBranches(v []*string) *ListBranchesOutput { - s.Branches = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBranchesOutput) SetNextToken(v string) *ListBranchesOutput { - s.NextToken = &v - return s -} - -type ListPullRequestsInput struct { - _ struct{} `type:"structure"` - - // Optional. The Amazon Resource Name (ARN) of the user who created the pull - // request. If used, this filters the results to pull requests created by that - // user. - AuthorArn *string `locationName:"authorArn" type:"string"` - - // A non-negative integer used to limit the number of returned results. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // An enumeration token that when provided in a request, returns the next batch - // of the results. - NextToken *string `locationName:"nextToken" type:"string"` - - // Optional. The status of the pull request. If used, this refines the results - // to the pull requests that match the specified status. - PullRequestStatus *string `locationName:"pullRequestStatus" type:"string" enum:"PullRequestStatusEnum"` - - // The name of the repository for which you want to list pull requests. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListPullRequestsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPullRequestsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPullRequestsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPullRequestsInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthorArn sets the AuthorArn field's value. -func (s *ListPullRequestsInput) SetAuthorArn(v string) *ListPullRequestsInput { - s.AuthorArn = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListPullRequestsInput) SetMaxResults(v int64) *ListPullRequestsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPullRequestsInput) SetNextToken(v string) *ListPullRequestsInput { - s.NextToken = &v - return s -} - -// SetPullRequestStatus sets the PullRequestStatus field's value. -func (s *ListPullRequestsInput) SetPullRequestStatus(v string) *ListPullRequestsInput { - s.PullRequestStatus = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *ListPullRequestsInput) SetRepositoryName(v string) *ListPullRequestsInput { - s.RepositoryName = &v - return s -} - -type ListPullRequestsOutput struct { - _ struct{} `type:"structure"` - - // An enumeration token that when provided in a request, returns the next batch - // of the results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The system-generated IDs of the pull requests. - // - // PullRequestIds is a required field - PullRequestIds []*string `locationName:"pullRequestIds" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListPullRequestsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPullRequestsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPullRequestsOutput) SetNextToken(v string) *ListPullRequestsOutput { - s.NextToken = &v - return s -} - -// SetPullRequestIds sets the PullRequestIds field's value. -func (s *ListPullRequestsOutput) SetPullRequestIds(v []*string) *ListPullRequestsOutput { - s.PullRequestIds = v - return s -} - -// Represents the input of a list repositories operation. -type ListRepositoriesInput struct { - _ struct{} `type:"structure"` - - // An enumeration token that allows the operation to batch the results of the - // operation. Batch sizes are 1,000 for list repository operations. When the - // client sends the token back to AWS CodeCommit, another page of 1,000 records - // is retrieved. - NextToken *string `locationName:"nextToken" type:"string"` - - // The order in which to sort the results of a list repositories operation. - Order *string `locationName:"order" type:"string" enum:"OrderEnum"` - - // The criteria used to sort the results of a list repositories operation. - SortBy *string `locationName:"sortBy" type:"string" enum:"SortByEnum"` -} - -// String returns the string representation -func (s ListRepositoriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRepositoriesInput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRepositoriesInput) SetNextToken(v string) *ListRepositoriesInput { - s.NextToken = &v - return s -} - -// SetOrder sets the Order field's value. -func (s *ListRepositoriesInput) SetOrder(v string) *ListRepositoriesInput { - s.Order = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListRepositoriesInput) SetSortBy(v string) *ListRepositoriesInput { - s.SortBy = &v - return s -} - -// Represents the output of a list repositories operation. -type ListRepositoriesOutput struct { - _ struct{} `type:"structure"` - - // An enumeration token that allows the operation to batch the results of the - // operation. Batch sizes are 1,000 for list repository operations. When the - // client sends the token back to AWS CodeCommit, another page of 1,000 records - // is retrieved. - NextToken *string `locationName:"nextToken" type:"string"` - - // Lists the repositories called by the list repositories operation. - Repositories []*RepositoryNameIdPair `locationName:"repositories" type:"list"` -} - -// String returns the string representation -func (s ListRepositoriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRepositoriesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRepositoriesOutput) SetNextToken(v string) *ListRepositoriesOutput { - s.NextToken = &v - return s -} - -// SetRepositories sets the Repositories field's value. -func (s *ListRepositoriesOutput) SetRepositories(v []*RepositoryNameIdPair) *ListRepositoriesOutput { - s.Repositories = v - return s -} - -// Returns information about the location of a change or comment in the comparison -// between two commits or a pull request. -type Location struct { - _ struct{} `type:"structure"` - - // The name of the file being compared, including its extension and subdirectory, - // if any. - FilePath *string `locationName:"filePath" type:"string"` - - // The position of a change within a compared file, in line number format. - FilePosition *int64 `locationName:"filePosition" type:"long"` - - // In a comparison of commits or a pull request, whether the change is in the - // 'before' or 'after' of that comparison. - RelativeFileVersion *string `locationName:"relativeFileVersion" type:"string" enum:"RelativeFileVersionEnum"` -} - -// String returns the string representation -func (s Location) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Location) GoString() string { - return s.String() -} - -// SetFilePath sets the FilePath field's value. -func (s *Location) SetFilePath(v string) *Location { - s.FilePath = &v - return s -} - -// SetFilePosition sets the FilePosition field's value. -func (s *Location) SetFilePosition(v int64) *Location { - s.FilePosition = &v - return s -} - -// SetRelativeFileVersion sets the RelativeFileVersion field's value. -func (s *Location) SetRelativeFileVersion(v string) *Location { - s.RelativeFileVersion = &v - return s -} - -// Returns information about a merge or potential merge between a source reference -// and a destination reference in a pull request. -type MergeMetadata struct { - _ struct{} `type:"structure"` - - // A Boolean value indicating whether the merge has been made. - IsMerged *bool `locationName:"isMerged" type:"boolean"` - - // The Amazon Resource Name (ARN) of the user who merged the branches. - MergedBy *string `locationName:"mergedBy" type:"string"` -} - -// String returns the string representation -func (s MergeMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MergeMetadata) GoString() string { - return s.String() -} - -// SetIsMerged sets the IsMerged field's value. -func (s *MergeMetadata) SetIsMerged(v bool) *MergeMetadata { - s.IsMerged = &v - return s -} - -// SetMergedBy sets the MergedBy field's value. -func (s *MergeMetadata) SetMergedBy(v string) *MergeMetadata { - s.MergedBy = &v - return s -} - -type MergePullRequestByFastForwardInput struct { - _ struct{} `type:"structure"` - - // The system-generated ID of the pull request. To get this ID, use ListPullRequests. - // - // PullRequestId is a required field - PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"` - - // The name of the repository where the pull request was created. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` - - // The full commit ID of the original or updated commit in the pull request - // source branch. Pass this value if you want an exception thrown if the current - // commit ID of the tip of the source branch does not match this commit ID. - SourceCommitId *string `locationName:"sourceCommitId" type:"string"` -} - -// String returns the string representation -func (s MergePullRequestByFastForwardInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MergePullRequestByFastForwardInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MergePullRequestByFastForwardInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MergePullRequestByFastForwardInput"} - if s.PullRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("PullRequestId")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPullRequestId sets the PullRequestId field's value. -func (s *MergePullRequestByFastForwardInput) SetPullRequestId(v string) *MergePullRequestByFastForwardInput { - s.PullRequestId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *MergePullRequestByFastForwardInput) SetRepositoryName(v string) *MergePullRequestByFastForwardInput { - s.RepositoryName = &v - return s -} - -// SetSourceCommitId sets the SourceCommitId field's value. -func (s *MergePullRequestByFastForwardInput) SetSourceCommitId(v string) *MergePullRequestByFastForwardInput { - s.SourceCommitId = &v - return s -} - -type MergePullRequestByFastForwardOutput struct { - _ struct{} `type:"structure"` - - // Information about the specified pull request, including information about - // the merge. - PullRequest *PullRequest `locationName:"pullRequest" type:"structure"` -} - -// String returns the string representation -func (s MergePullRequestByFastForwardOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MergePullRequestByFastForwardOutput) GoString() string { - return s.String() -} - -// SetPullRequest sets the PullRequest field's value. -func (s *MergePullRequestByFastForwardOutput) SetPullRequest(v *PullRequest) *MergePullRequestByFastForwardOutput { - s.PullRequest = v - return s -} - -type PostCommentForComparedCommitInput struct { - _ struct{} `type:"structure"` - - // To establish the directionality of the comparison, the full commit ID of - // the 'after' commit. - // - // AfterCommitId is a required field - AfterCommitId *string `locationName:"afterCommitId" type:"string" required:"true"` - - // To establish the directionality of the comparison, the full commit ID of - // the 'before' commit. - BeforeCommitId *string `locationName:"beforeCommitId" type:"string"` - - // A unique, client-generated idempotency token that when provided in a request, - // ensures the request cannot be repeated with a changed parameter. If a request - // is received with the same parameters and a token is included, the request - // will return information about the initial request that used that token. - ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"` - - // The content of the comment you want to make. - // - // Content is a required field - Content *string `locationName:"content" type:"string" required:"true"` - - // The location of the comparison where you want to comment. - Location *Location `locationName:"location" type:"structure"` - - // The name of the repository where you want to post a comment on the comparison - // between commits. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PostCommentForComparedCommitInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PostCommentForComparedCommitInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PostCommentForComparedCommitInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PostCommentForComparedCommitInput"} - if s.AfterCommitId == nil { - invalidParams.Add(request.NewErrParamRequired("AfterCommitId")) - } - if s.Content == nil { - invalidParams.Add(request.NewErrParamRequired("Content")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAfterCommitId sets the AfterCommitId field's value. -func (s *PostCommentForComparedCommitInput) SetAfterCommitId(v string) *PostCommentForComparedCommitInput { - s.AfterCommitId = &v - return s -} - -// SetBeforeCommitId sets the BeforeCommitId field's value. -func (s *PostCommentForComparedCommitInput) SetBeforeCommitId(v string) *PostCommentForComparedCommitInput { - s.BeforeCommitId = &v - return s -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *PostCommentForComparedCommitInput) SetClientRequestToken(v string) *PostCommentForComparedCommitInput { - s.ClientRequestToken = &v - return s -} - -// SetContent sets the Content field's value. -func (s *PostCommentForComparedCommitInput) SetContent(v string) *PostCommentForComparedCommitInput { - s.Content = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *PostCommentForComparedCommitInput) SetLocation(v *Location) *PostCommentForComparedCommitInput { - s.Location = v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *PostCommentForComparedCommitInput) SetRepositoryName(v string) *PostCommentForComparedCommitInput { - s.RepositoryName = &v - return s -} - -type PostCommentForComparedCommitOutput struct { - _ struct{} `type:"structure"` - - // In the directionality you established, the blob ID of the 'after' blob. - AfterBlobId *string `locationName:"afterBlobId" type:"string"` - - // In the directionality you established, the full commit ID of the 'after' - // commit. - AfterCommitId *string `locationName:"afterCommitId" type:"string"` - - // In the directionality you established, the blob ID of the 'before' blob. - BeforeBlobId *string `locationName:"beforeBlobId" type:"string"` - - // In the directionality you established, the full commit ID of the 'before' - // commit. - BeforeCommitId *string `locationName:"beforeCommitId" type:"string"` - - // The content of the comment you posted. - Comment *Comment `locationName:"comment" type:"structure"` - - // The location of the comment in the comparison between the two commits. - Location *Location `locationName:"location" type:"structure"` - - // The name of the repository where you posted a comment on the comparison between - // commits. - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"` -} - -// String returns the string representation -func (s PostCommentForComparedCommitOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PostCommentForComparedCommitOutput) GoString() string { - return s.String() -} - -// SetAfterBlobId sets the AfterBlobId field's value. -func (s *PostCommentForComparedCommitOutput) SetAfterBlobId(v string) *PostCommentForComparedCommitOutput { - s.AfterBlobId = &v - return s -} - -// SetAfterCommitId sets the AfterCommitId field's value. -func (s *PostCommentForComparedCommitOutput) SetAfterCommitId(v string) *PostCommentForComparedCommitOutput { - s.AfterCommitId = &v - return s -} - -// SetBeforeBlobId sets the BeforeBlobId field's value. -func (s *PostCommentForComparedCommitOutput) SetBeforeBlobId(v string) *PostCommentForComparedCommitOutput { - s.BeforeBlobId = &v - return s -} - -// SetBeforeCommitId sets the BeforeCommitId field's value. -func (s *PostCommentForComparedCommitOutput) SetBeforeCommitId(v string) *PostCommentForComparedCommitOutput { - s.BeforeCommitId = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *PostCommentForComparedCommitOutput) SetComment(v *Comment) *PostCommentForComparedCommitOutput { - s.Comment = v - return s -} - -// SetLocation sets the Location field's value. -func (s *PostCommentForComparedCommitOutput) SetLocation(v *Location) *PostCommentForComparedCommitOutput { - s.Location = v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *PostCommentForComparedCommitOutput) SetRepositoryName(v string) *PostCommentForComparedCommitOutput { - s.RepositoryName = &v - return s -} - -type PostCommentForPullRequestInput struct { - _ struct{} `type:"structure"` - - // The full commit ID of the commit in the source branch that is the current - // tip of the branch for the pull request when you post the comment. - // - // AfterCommitId is a required field - AfterCommitId *string `locationName:"afterCommitId" type:"string" required:"true"` - - // The full commit ID of the commit in the destination branch that was the tip - // of the branch at the time the pull request was created. - // - // BeforeCommitId is a required field - BeforeCommitId *string `locationName:"beforeCommitId" type:"string" required:"true"` - - // A unique, client-generated idempotency token that when provided in a request, - // ensures the request cannot be repeated with a changed parameter. If a request - // is received with the same parameters and a token is included, the request - // will return information about the initial request that used that token. - ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"` - - // The content of your comment on the change. - // - // Content is a required field - Content *string `locationName:"content" type:"string" required:"true"` - - // The location of the change where you want to post your comment. If no location - // is provided, the comment will be posted as a general comment on the pull - // request difference between the before commit ID and the after commit ID. - Location *Location `locationName:"location" type:"structure"` - - // The system-generated ID of the pull request. To get this ID, use ListPullRequests. - // - // PullRequestId is a required field - PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"` - - // The name of the repository where you want to post a comment on a pull request. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PostCommentForPullRequestInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PostCommentForPullRequestInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PostCommentForPullRequestInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PostCommentForPullRequestInput"} - if s.AfterCommitId == nil { - invalidParams.Add(request.NewErrParamRequired("AfterCommitId")) - } - if s.BeforeCommitId == nil { - invalidParams.Add(request.NewErrParamRequired("BeforeCommitId")) - } - if s.Content == nil { - invalidParams.Add(request.NewErrParamRequired("Content")) - } - if s.PullRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("PullRequestId")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAfterCommitId sets the AfterCommitId field's value. -func (s *PostCommentForPullRequestInput) SetAfterCommitId(v string) *PostCommentForPullRequestInput { - s.AfterCommitId = &v - return s -} - -// SetBeforeCommitId sets the BeforeCommitId field's value. -func (s *PostCommentForPullRequestInput) SetBeforeCommitId(v string) *PostCommentForPullRequestInput { - s.BeforeCommitId = &v - return s -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *PostCommentForPullRequestInput) SetClientRequestToken(v string) *PostCommentForPullRequestInput { - s.ClientRequestToken = &v - return s -} - -// SetContent sets the Content field's value. -func (s *PostCommentForPullRequestInput) SetContent(v string) *PostCommentForPullRequestInput { - s.Content = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *PostCommentForPullRequestInput) SetLocation(v *Location) *PostCommentForPullRequestInput { - s.Location = v - return s -} - -// SetPullRequestId sets the PullRequestId field's value. -func (s *PostCommentForPullRequestInput) SetPullRequestId(v string) *PostCommentForPullRequestInput { - s.PullRequestId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *PostCommentForPullRequestInput) SetRepositoryName(v string) *PostCommentForPullRequestInput { - s.RepositoryName = &v - return s -} - -type PostCommentForPullRequestOutput struct { - _ struct{} `type:"structure"` - - // In the directionality of the pull request, the blob ID of the 'after' blob. - AfterBlobId *string `locationName:"afterBlobId" type:"string"` - - // The full commit ID of the commit in the destination branch where the pull - // request will be merged. - AfterCommitId *string `locationName:"afterCommitId" type:"string"` - - // In the directionality of the pull request, the blob ID of the 'before' blob. - BeforeBlobId *string `locationName:"beforeBlobId" type:"string"` - - // The full commit ID of the commit in the source branch used to create the - // pull request, or in the case of an updated pull request, the full commit - // ID of the commit used to update the pull request. - BeforeCommitId *string `locationName:"beforeCommitId" type:"string"` - - // The content of the comment you posted. - Comment *Comment `locationName:"comment" type:"structure"` - - // The location of the change where you posted your comment. - Location *Location `locationName:"location" type:"structure"` - - // The system-generated ID of the pull request. - PullRequestId *string `locationName:"pullRequestId" type:"string"` - - // The name of the repository where you posted a comment on a pull request. - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"` -} - -// String returns the string representation -func (s PostCommentForPullRequestOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PostCommentForPullRequestOutput) GoString() string { - return s.String() -} - -// SetAfterBlobId sets the AfterBlobId field's value. -func (s *PostCommentForPullRequestOutput) SetAfterBlobId(v string) *PostCommentForPullRequestOutput { - s.AfterBlobId = &v - return s -} - -// SetAfterCommitId sets the AfterCommitId field's value. -func (s *PostCommentForPullRequestOutput) SetAfterCommitId(v string) *PostCommentForPullRequestOutput { - s.AfterCommitId = &v - return s -} - -// SetBeforeBlobId sets the BeforeBlobId field's value. -func (s *PostCommentForPullRequestOutput) SetBeforeBlobId(v string) *PostCommentForPullRequestOutput { - s.BeforeBlobId = &v - return s -} - -// SetBeforeCommitId sets the BeforeCommitId field's value. -func (s *PostCommentForPullRequestOutput) SetBeforeCommitId(v string) *PostCommentForPullRequestOutput { - s.BeforeCommitId = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *PostCommentForPullRequestOutput) SetComment(v *Comment) *PostCommentForPullRequestOutput { - s.Comment = v - return s -} - -// SetLocation sets the Location field's value. -func (s *PostCommentForPullRequestOutput) SetLocation(v *Location) *PostCommentForPullRequestOutput { - s.Location = v - return s -} - -// SetPullRequestId sets the PullRequestId field's value. -func (s *PostCommentForPullRequestOutput) SetPullRequestId(v string) *PostCommentForPullRequestOutput { - s.PullRequestId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *PostCommentForPullRequestOutput) SetRepositoryName(v string) *PostCommentForPullRequestOutput { - s.RepositoryName = &v - return s -} - -type PostCommentReplyInput struct { - _ struct{} `type:"structure"` - - // A unique, client-generated idempotency token that when provided in a request, - // ensures the request cannot be repeated with a changed parameter. If a request - // is received with the same parameters and a token is included, the request - // will return information about the initial request that used that token. - ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"` - - // The contents of your reply to a comment. - // - // Content is a required field - Content *string `locationName:"content" type:"string" required:"true"` - - // The system-generated ID of the comment to which you want to reply. To get - // this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest. - // - // InReplyTo is a required field - InReplyTo *string `locationName:"inReplyTo" type:"string" required:"true"` -} - -// String returns the string representation -func (s PostCommentReplyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PostCommentReplyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PostCommentReplyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PostCommentReplyInput"} - if s.Content == nil { - invalidParams.Add(request.NewErrParamRequired("Content")) - } - if s.InReplyTo == nil { - invalidParams.Add(request.NewErrParamRequired("InReplyTo")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *PostCommentReplyInput) SetClientRequestToken(v string) *PostCommentReplyInput { - s.ClientRequestToken = &v - return s -} - -// SetContent sets the Content field's value. -func (s *PostCommentReplyInput) SetContent(v string) *PostCommentReplyInput { - s.Content = &v - return s -} - -// SetInReplyTo sets the InReplyTo field's value. -func (s *PostCommentReplyInput) SetInReplyTo(v string) *PostCommentReplyInput { - s.InReplyTo = &v - return s -} - -type PostCommentReplyOutput struct { - _ struct{} `type:"structure"` - - // Information about the reply to a comment. - Comment *Comment `locationName:"comment" type:"structure"` -} - -// String returns the string representation -func (s PostCommentReplyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PostCommentReplyOutput) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *PostCommentReplyOutput) SetComment(v *Comment) *PostCommentReplyOutput { - s.Comment = v - return s -} - -// Returns information about a pull request. -type PullRequest struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the user who created the pull request. - AuthorArn *string `locationName:"authorArn" type:"string"` - - // A unique, client-generated idempotency token that when provided in a request, - // ensures the request cannot be repeated with a changed parameter. If a request - // is received with the same parameters and a token is included, the request - // will return information about the initial request that used that token. - ClientRequestToken *string `locationName:"clientRequestToken" type:"string"` - - // The date and time the pull request was originally created, in timestamp format. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The user-defined description of the pull request. This description can be - // used to clarify what should be reviewed and other details of the request. - Description *string `locationName:"description" type:"string"` - - // The day and time of the last user or system activity on the pull request, - // in timestamp format. - LastActivityDate *time.Time `locationName:"lastActivityDate" type:"timestamp"` - - // The system-generated ID of the pull request. - PullRequestId *string `locationName:"pullRequestId" type:"string"` - - // The status of the pull request. Pull request status can only change from - // OPEN to CLOSED. - PullRequestStatus *string `locationName:"pullRequestStatus" type:"string" enum:"PullRequestStatusEnum"` - - // The targets of the pull request, including the source branch and destination - // branch for the pull request. - PullRequestTargets []*PullRequestTarget `locationName:"pullRequestTargets" type:"list"` - - // The user-defined title of the pull request. This title is displayed in the - // list of pull requests to other users of the repository. - Title *string `locationName:"title" type:"string"` -} - -// String returns the string representation -func (s PullRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PullRequest) GoString() string { - return s.String() -} - -// SetAuthorArn sets the AuthorArn field's value. -func (s *PullRequest) SetAuthorArn(v string) *PullRequest { - s.AuthorArn = &v - return s -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *PullRequest) SetClientRequestToken(v string) *PullRequest { - s.ClientRequestToken = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *PullRequest) SetCreationDate(v time.Time) *PullRequest { - s.CreationDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PullRequest) SetDescription(v string) *PullRequest { - s.Description = &v - return s -} - -// SetLastActivityDate sets the LastActivityDate field's value. -func (s *PullRequest) SetLastActivityDate(v time.Time) *PullRequest { - s.LastActivityDate = &v - return s -} - -// SetPullRequestId sets the PullRequestId field's value. -func (s *PullRequest) SetPullRequestId(v string) *PullRequest { - s.PullRequestId = &v - return s -} - -// SetPullRequestStatus sets the PullRequestStatus field's value. -func (s *PullRequest) SetPullRequestStatus(v string) *PullRequest { - s.PullRequestStatus = &v - return s -} - -// SetPullRequestTargets sets the PullRequestTargets field's value. -func (s *PullRequest) SetPullRequestTargets(v []*PullRequestTarget) *PullRequest { - s.PullRequestTargets = v - return s -} - -// SetTitle sets the Title field's value. -func (s *PullRequest) SetTitle(v string) *PullRequest { - s.Title = &v - return s -} - -// Metadata about the pull request that is used when comparing the pull request -// source with its destination. -type PullRequestCreatedEventMetadata struct { - _ struct{} `type:"structure"` - - // The commit ID of the tip of the branch specified as the destination branch - // when the pull request was created. - DestinationCommitId *string `locationName:"destinationCommitId" type:"string"` - - // The commit ID of the most recent commit that the source branch and the destination - // branch have in common. - MergeBase *string `locationName:"mergeBase" type:"string"` - - // The name of the repository where the pull request was created. - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"` - - // The commit ID on the source branch used when the pull request was created. - SourceCommitId *string `locationName:"sourceCommitId" type:"string"` -} - -// String returns the string representation -func (s PullRequestCreatedEventMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PullRequestCreatedEventMetadata) GoString() string { - return s.String() -} - -// SetDestinationCommitId sets the DestinationCommitId field's value. -func (s *PullRequestCreatedEventMetadata) SetDestinationCommitId(v string) *PullRequestCreatedEventMetadata { - s.DestinationCommitId = &v - return s -} - -// SetMergeBase sets the MergeBase field's value. -func (s *PullRequestCreatedEventMetadata) SetMergeBase(v string) *PullRequestCreatedEventMetadata { - s.MergeBase = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *PullRequestCreatedEventMetadata) SetRepositoryName(v string) *PullRequestCreatedEventMetadata { - s.RepositoryName = &v - return s -} - -// SetSourceCommitId sets the SourceCommitId field's value. -func (s *PullRequestCreatedEventMetadata) SetSourceCommitId(v string) *PullRequestCreatedEventMetadata { - s.SourceCommitId = &v - return s -} - -// Returns information about a pull request event. -type PullRequestEvent struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the user whose actions resulted in the - // event. Examples include updating the pull request with additional commits - // or changing the status of a pull request. - ActorArn *string `locationName:"actorArn" type:"string"` - - // The day and time of the pull request event, in timestamp format. - EventDate *time.Time `locationName:"eventDate" type:"timestamp"` - - // Information about the source and destination branches for the pull request. - PullRequestCreatedEventMetadata *PullRequestCreatedEventMetadata `locationName:"pullRequestCreatedEventMetadata" type:"structure"` - - // The type of the pull request event, for example a status change event (PULL_REQUEST_STATUS_CHANGED) - // or update event (PULL_REQUEST_SOURCE_REFERENCE_UPDATED). - PullRequestEventType *string `locationName:"pullRequestEventType" type:"string" enum:"PullRequestEventType"` - - // The system-generated ID of the pull request. - PullRequestId *string `locationName:"pullRequestId" type:"string"` - - // Information about the change in mergability state for the pull request event. - PullRequestMergedStateChangedEventMetadata *PullRequestMergedStateChangedEventMetadata `locationName:"pullRequestMergedStateChangedEventMetadata" type:"structure"` - - // Information about the updated source branch for the pull request event. - PullRequestSourceReferenceUpdatedEventMetadata *PullRequestSourceReferenceUpdatedEventMetadata `locationName:"pullRequestSourceReferenceUpdatedEventMetadata" type:"structure"` - - // Information about the change in status for the pull request event. - PullRequestStatusChangedEventMetadata *PullRequestStatusChangedEventMetadata `locationName:"pullRequestStatusChangedEventMetadata" type:"structure"` -} - -// String returns the string representation -func (s PullRequestEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PullRequestEvent) GoString() string { - return s.String() -} - -// SetActorArn sets the ActorArn field's value. -func (s *PullRequestEvent) SetActorArn(v string) *PullRequestEvent { - s.ActorArn = &v - return s -} - -// SetEventDate sets the EventDate field's value. -func (s *PullRequestEvent) SetEventDate(v time.Time) *PullRequestEvent { - s.EventDate = &v - return s -} - -// SetPullRequestCreatedEventMetadata sets the PullRequestCreatedEventMetadata field's value. -func (s *PullRequestEvent) SetPullRequestCreatedEventMetadata(v *PullRequestCreatedEventMetadata) *PullRequestEvent { - s.PullRequestCreatedEventMetadata = v - return s -} - -// SetPullRequestEventType sets the PullRequestEventType field's value. -func (s *PullRequestEvent) SetPullRequestEventType(v string) *PullRequestEvent { - s.PullRequestEventType = &v - return s -} - -// SetPullRequestId sets the PullRequestId field's value. -func (s *PullRequestEvent) SetPullRequestId(v string) *PullRequestEvent { - s.PullRequestId = &v - return s -} - -// SetPullRequestMergedStateChangedEventMetadata sets the PullRequestMergedStateChangedEventMetadata field's value. -func (s *PullRequestEvent) SetPullRequestMergedStateChangedEventMetadata(v *PullRequestMergedStateChangedEventMetadata) *PullRequestEvent { - s.PullRequestMergedStateChangedEventMetadata = v - return s -} - -// SetPullRequestSourceReferenceUpdatedEventMetadata sets the PullRequestSourceReferenceUpdatedEventMetadata field's value. -func (s *PullRequestEvent) SetPullRequestSourceReferenceUpdatedEventMetadata(v *PullRequestSourceReferenceUpdatedEventMetadata) *PullRequestEvent { - s.PullRequestSourceReferenceUpdatedEventMetadata = v - return s -} - -// SetPullRequestStatusChangedEventMetadata sets the PullRequestStatusChangedEventMetadata field's value. -func (s *PullRequestEvent) SetPullRequestStatusChangedEventMetadata(v *PullRequestStatusChangedEventMetadata) *PullRequestEvent { - s.PullRequestStatusChangedEventMetadata = v - return s -} - -// Returns information about the change in the merge state for a pull request -// event. -type PullRequestMergedStateChangedEventMetadata struct { - _ struct{} `type:"structure"` - - // The name of the branch that the pull request will be merged into. - DestinationReference *string `locationName:"destinationReference" type:"string"` - - // Information about the merge state change event. - MergeMetadata *MergeMetadata `locationName:"mergeMetadata" type:"structure"` - - // The name of the repository where the pull request was created. - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"` -} - -// String returns the string representation -func (s PullRequestMergedStateChangedEventMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PullRequestMergedStateChangedEventMetadata) GoString() string { - return s.String() -} - -// SetDestinationReference sets the DestinationReference field's value. -func (s *PullRequestMergedStateChangedEventMetadata) SetDestinationReference(v string) *PullRequestMergedStateChangedEventMetadata { - s.DestinationReference = &v - return s -} - -// SetMergeMetadata sets the MergeMetadata field's value. -func (s *PullRequestMergedStateChangedEventMetadata) SetMergeMetadata(v *MergeMetadata) *PullRequestMergedStateChangedEventMetadata { - s.MergeMetadata = v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *PullRequestMergedStateChangedEventMetadata) SetRepositoryName(v string) *PullRequestMergedStateChangedEventMetadata { - s.RepositoryName = &v - return s -} - -// Information about an update to the source branch of a pull request. -type PullRequestSourceReferenceUpdatedEventMetadata struct { - _ struct{} `type:"structure"` - - // The full commit ID of the commit in the source branch that was the tip of - // the branch at the time the pull request was updated. - AfterCommitId *string `locationName:"afterCommitId" type:"string"` - - // The full commit ID of the commit in the destination branch that was the tip - // of the branch at the time the pull request was updated. - BeforeCommitId *string `locationName:"beforeCommitId" type:"string"` - - // The commit ID of the most recent commit that the source branch and the destination - // branch have in common. - MergeBase *string `locationName:"mergeBase" type:"string"` - - // The name of the repository where the pull request was updated. - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"` -} - -// String returns the string representation -func (s PullRequestSourceReferenceUpdatedEventMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PullRequestSourceReferenceUpdatedEventMetadata) GoString() string { - return s.String() -} - -// SetAfterCommitId sets the AfterCommitId field's value. -func (s *PullRequestSourceReferenceUpdatedEventMetadata) SetAfterCommitId(v string) *PullRequestSourceReferenceUpdatedEventMetadata { - s.AfterCommitId = &v - return s -} - -// SetBeforeCommitId sets the BeforeCommitId field's value. -func (s *PullRequestSourceReferenceUpdatedEventMetadata) SetBeforeCommitId(v string) *PullRequestSourceReferenceUpdatedEventMetadata { - s.BeforeCommitId = &v - return s -} - -// SetMergeBase sets the MergeBase field's value. -func (s *PullRequestSourceReferenceUpdatedEventMetadata) SetMergeBase(v string) *PullRequestSourceReferenceUpdatedEventMetadata { - s.MergeBase = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *PullRequestSourceReferenceUpdatedEventMetadata) SetRepositoryName(v string) *PullRequestSourceReferenceUpdatedEventMetadata { - s.RepositoryName = &v - return s -} - -// Information about a change to the status of a pull request. -type PullRequestStatusChangedEventMetadata struct { - _ struct{} `type:"structure"` - - // The changed status of the pull request. - PullRequestStatus *string `locationName:"pullRequestStatus" type:"string" enum:"PullRequestStatusEnum"` -} - -// String returns the string representation -func (s PullRequestStatusChangedEventMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PullRequestStatusChangedEventMetadata) GoString() string { - return s.String() -} - -// SetPullRequestStatus sets the PullRequestStatus field's value. -func (s *PullRequestStatusChangedEventMetadata) SetPullRequestStatus(v string) *PullRequestStatusChangedEventMetadata { - s.PullRequestStatus = &v - return s -} - -// Returns information about a pull request target. -type PullRequestTarget struct { - _ struct{} `type:"structure"` - - // The full commit ID that is the tip of the destination branch. This is the - // commit where the pull request was or will be merged. - DestinationCommit *string `locationName:"destinationCommit" type:"string"` - - // The branch of the repository where the pull request changes will be merged - // into. Also known as the destination branch. - DestinationReference *string `locationName:"destinationReference" type:"string"` - - // The commit ID of the most recent commit that the source branch and the destination - // branch have in common. - MergeBase *string `locationName:"mergeBase" type:"string"` - - // Returns metadata about the state of the merge, including whether the merge - // has been made. - MergeMetadata *MergeMetadata `locationName:"mergeMetadata" type:"structure"` - - // The name of the repository that contains the pull request source and destination - // branches. - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"` - - // The full commit ID of the tip of the source branch used to create the pull - // request. If the pull request branch is updated by a push while the pull request - // is open, the commit ID will change to reflect the new tip of the branch. - SourceCommit *string `locationName:"sourceCommit" type:"string"` - - // The branch of the repository that contains the changes for the pull request. - // Also known as the source branch. - SourceReference *string `locationName:"sourceReference" type:"string"` -} - -// String returns the string representation -func (s PullRequestTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PullRequestTarget) GoString() string { - return s.String() -} - -// SetDestinationCommit sets the DestinationCommit field's value. -func (s *PullRequestTarget) SetDestinationCommit(v string) *PullRequestTarget { - s.DestinationCommit = &v - return s -} - -// SetDestinationReference sets the DestinationReference field's value. -func (s *PullRequestTarget) SetDestinationReference(v string) *PullRequestTarget { - s.DestinationReference = &v - return s -} - -// SetMergeBase sets the MergeBase field's value. -func (s *PullRequestTarget) SetMergeBase(v string) *PullRequestTarget { - s.MergeBase = &v - return s -} - -// SetMergeMetadata sets the MergeMetadata field's value. -func (s *PullRequestTarget) SetMergeMetadata(v *MergeMetadata) *PullRequestTarget { - s.MergeMetadata = v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *PullRequestTarget) SetRepositoryName(v string) *PullRequestTarget { - s.RepositoryName = &v - return s -} - -// SetSourceCommit sets the SourceCommit field's value. -func (s *PullRequestTarget) SetSourceCommit(v string) *PullRequestTarget { - s.SourceCommit = &v - return s -} - -// SetSourceReference sets the SourceReference field's value. -func (s *PullRequestTarget) SetSourceReference(v string) *PullRequestTarget { - s.SourceReference = &v - return s -} - -type PutFileInput struct { - _ struct{} `type:"structure"` - - // The name of the branch where you want to add or update the file. If this - // is an empty repository, this branch will be created. - // - // BranchName is a required field - BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"` - - // A message about why this file was added or updated. While optional, adding - // a message is strongly encouraged in order to provide a more useful commit - // history for your repository. - CommitMessage *string `locationName:"commitMessage" type:"string"` - - // An email address for the person adding or updating the file. - Email *string `locationName:"email" type:"string"` - - // The content of the file, in binary object format. - // - // FileContent is automatically base64 encoded/decoded by the SDK. - // - // FileContent is a required field - FileContent []byte `locationName:"fileContent" type:"blob" required:"true"` - - // The file mode permissions of the blob. Valid file mode permissions are listed - // below. - FileMode *string `locationName:"fileMode" type:"string" enum:"FileModeTypeEnum"` - - // The name of the file you want to add or update, including the relative path - // to the file in the repository. - // - // If the path does not currently exist in the repository, the path will be - // created as part of adding the file. - // - // FilePath is a required field - FilePath *string `locationName:"filePath" type:"string" required:"true"` - - // The name of the person adding or updating the file. While optional, adding - // a name is strongly encouraged in order to provide a more useful commit history - // for your repository. - Name *string `locationName:"name" type:"string"` - - // The full commit ID of the head commit in the branch where you want to add - // or update the file. If this is an empty repository, no commit ID is required. - // If this is not an empty repository, a commit ID is required. - // - // The commit ID must match the ID of the head commit at the time of the operation, - // or an error will occur, and the file will not be added or updated. - ParentCommitId *string `locationName:"parentCommitId" type:"string"` - - // The name of the repository where you want to add or update the file. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutFileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutFileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutFileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutFileInput"} - if s.BranchName == nil { - invalidParams.Add(request.NewErrParamRequired("BranchName")) - } - if s.BranchName != nil && len(*s.BranchName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BranchName", 1)) - } - if s.FileContent == nil { - invalidParams.Add(request.NewErrParamRequired("FileContent")) - } - if s.FilePath == nil { - invalidParams.Add(request.NewErrParamRequired("FilePath")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBranchName sets the BranchName field's value. -func (s *PutFileInput) SetBranchName(v string) *PutFileInput { - s.BranchName = &v - return s -} - -// SetCommitMessage sets the CommitMessage field's value. -func (s *PutFileInput) SetCommitMessage(v string) *PutFileInput { - s.CommitMessage = &v - return s -} - -// SetEmail sets the Email field's value. -func (s *PutFileInput) SetEmail(v string) *PutFileInput { - s.Email = &v - return s -} - -// SetFileContent sets the FileContent field's value. -func (s *PutFileInput) SetFileContent(v []byte) *PutFileInput { - s.FileContent = v - return s -} - -// SetFileMode sets the FileMode field's value. -func (s *PutFileInput) SetFileMode(v string) *PutFileInput { - s.FileMode = &v - return s -} - -// SetFilePath sets the FilePath field's value. -func (s *PutFileInput) SetFilePath(v string) *PutFileInput { - s.FilePath = &v - return s -} - -// SetName sets the Name field's value. -func (s *PutFileInput) SetName(v string) *PutFileInput { - s.Name = &v - return s -} - -// SetParentCommitId sets the ParentCommitId field's value. -func (s *PutFileInput) SetParentCommitId(v string) *PutFileInput { - s.ParentCommitId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *PutFileInput) SetRepositoryName(v string) *PutFileInput { - s.RepositoryName = &v - return s -} - -type PutFileOutput struct { - _ struct{} `type:"structure"` - - // The ID of the blob, which is its SHA-1 pointer. - // - // BlobId is a required field - BlobId *string `locationName:"blobId" type:"string" required:"true"` - - // The full SHA of the commit that contains this file change. - // - // CommitId is a required field - CommitId *string `locationName:"commitId" type:"string" required:"true"` - - // The full SHA-1 pointer of the tree information for the commit that contains - // this file change. - // - // TreeId is a required field - TreeId *string `locationName:"treeId" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutFileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutFileOutput) GoString() string { - return s.String() -} - -// SetBlobId sets the BlobId field's value. -func (s *PutFileOutput) SetBlobId(v string) *PutFileOutput { - s.BlobId = &v - return s -} - -// SetCommitId sets the CommitId field's value. -func (s *PutFileOutput) SetCommitId(v string) *PutFileOutput { - s.CommitId = &v - return s -} - -// SetTreeId sets the TreeId field's value. -func (s *PutFileOutput) SetTreeId(v string) *PutFileOutput { - s.TreeId = &v - return s -} - -// Represents the input ofa put repository triggers operation. -type PutRepositoryTriggersInput struct { - _ struct{} `type:"structure"` - - // The name of the repository where you want to create or update the trigger. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` - - // The JSON block of configuration information for each trigger. - // - // Triggers is a required field - Triggers []*RepositoryTrigger `locationName:"triggers" type:"list" required:"true"` -} - -// String returns the string representation -func (s PutRepositoryTriggersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRepositoryTriggersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutRepositoryTriggersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutRepositoryTriggersInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - if s.Triggers == nil { - invalidParams.Add(request.NewErrParamRequired("Triggers")) - } - if s.Triggers != nil { - for i, v := range s.Triggers { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Triggers", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *PutRepositoryTriggersInput) SetRepositoryName(v string) *PutRepositoryTriggersInput { - s.RepositoryName = &v - return s -} - -// SetTriggers sets the Triggers field's value. -func (s *PutRepositoryTriggersInput) SetTriggers(v []*RepositoryTrigger) *PutRepositoryTriggersInput { - s.Triggers = v - return s -} - -// Represents the output of a put repository triggers operation. -type PutRepositoryTriggersOutput struct { - _ struct{} `type:"structure"` - - // The system-generated unique ID for the create or update operation. - ConfigurationId *string `locationName:"configurationId" type:"string"` -} - -// String returns the string representation -func (s PutRepositoryTriggersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRepositoryTriggersOutput) GoString() string { - return s.String() -} - -// SetConfigurationId sets the ConfigurationId field's value. -func (s *PutRepositoryTriggersOutput) SetConfigurationId(v string) *PutRepositoryTriggersOutput { - s.ConfigurationId = &v - return s -} - -// Information about a repository. -type RepositoryMetadata struct { - _ struct{} `type:"structure"` - - // The ID of the AWS account associated with the repository. - AccountId *string `locationName:"accountId" type:"string"` - - // The Amazon Resource Name (ARN) of the repository. - Arn *string `type:"string"` - - // The URL to use for cloning the repository over HTTPS. - CloneUrlHttp *string `locationName:"cloneUrlHttp" type:"string"` - - // The URL to use for cloning the repository over SSH. - CloneUrlSsh *string `locationName:"cloneUrlSsh" type:"string"` - - // The date and time the repository was created, in timestamp format. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The repository's default branch name. - DefaultBranch *string `locationName:"defaultBranch" min:"1" type:"string"` - - // The date and time the repository was last modified, in timestamp format. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` - - // A comment or description about the repository. - RepositoryDescription *string `locationName:"repositoryDescription" type:"string"` - - // The ID of the repository. - RepositoryId *string `locationName:"repositoryId" type:"string"` - - // The repository's name. - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"` -} - -// String returns the string representation -func (s RepositoryMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RepositoryMetadata) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *RepositoryMetadata) SetAccountId(v string) *RepositoryMetadata { - s.AccountId = &v - return s -} - -// SetArn sets the Arn field's value. -func (s *RepositoryMetadata) SetArn(v string) *RepositoryMetadata { - s.Arn = &v - return s -} - -// SetCloneUrlHttp sets the CloneUrlHttp field's value. -func (s *RepositoryMetadata) SetCloneUrlHttp(v string) *RepositoryMetadata { - s.CloneUrlHttp = &v - return s -} - -// SetCloneUrlSsh sets the CloneUrlSsh field's value. -func (s *RepositoryMetadata) SetCloneUrlSsh(v string) *RepositoryMetadata { - s.CloneUrlSsh = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *RepositoryMetadata) SetCreationDate(v time.Time) *RepositoryMetadata { - s.CreationDate = &v - return s -} - -// SetDefaultBranch sets the DefaultBranch field's value. -func (s *RepositoryMetadata) SetDefaultBranch(v string) *RepositoryMetadata { - s.DefaultBranch = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *RepositoryMetadata) SetLastModifiedDate(v time.Time) *RepositoryMetadata { - s.LastModifiedDate = &v - return s -} - -// SetRepositoryDescription sets the RepositoryDescription field's value. -func (s *RepositoryMetadata) SetRepositoryDescription(v string) *RepositoryMetadata { - s.RepositoryDescription = &v - return s -} - -// SetRepositoryId sets the RepositoryId field's value. -func (s *RepositoryMetadata) SetRepositoryId(v string) *RepositoryMetadata { - s.RepositoryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *RepositoryMetadata) SetRepositoryName(v string) *RepositoryMetadata { - s.RepositoryName = &v - return s -} - -// Information about a repository name and ID. -type RepositoryNameIdPair struct { - _ struct{} `type:"structure"` - - // The ID associated with the repository. - RepositoryId *string `locationName:"repositoryId" type:"string"` - - // The name associated with the repository. - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"` -} - -// String returns the string representation -func (s RepositoryNameIdPair) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RepositoryNameIdPair) GoString() string { - return s.String() -} - -// SetRepositoryId sets the RepositoryId field's value. -func (s *RepositoryNameIdPair) SetRepositoryId(v string) *RepositoryNameIdPair { - s.RepositoryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *RepositoryNameIdPair) SetRepositoryName(v string) *RepositoryNameIdPair { - s.RepositoryName = &v - return s -} - -// Information about a trigger for a repository. -type RepositoryTrigger struct { - _ struct{} `type:"structure"` - - // The branches that will be included in the trigger configuration. If you specify - // an empty array, the trigger will apply to all branches. - // - // While no content is required in the array, you must include the array itself. - Branches []*string `locationName:"branches" type:"list"` - - // Any custom data associated with the trigger that will be included in the - // information sent to the target of the trigger. - CustomData *string `locationName:"customData" type:"string"` - - // The ARN of the resource that is the target for a trigger. For example, the - // ARN of a topic in Amazon Simple Notification Service (SNS). - // - // DestinationArn is a required field - DestinationArn *string `locationName:"destinationArn" type:"string" required:"true"` - - // The repository events that will cause the trigger to run actions in another - // service, such as sending a notification through Amazon Simple Notification - // Service (SNS). - // - // The valid value "all" cannot be used with any other values. - // - // Events is a required field - Events []*string `locationName:"events" type:"list" required:"true"` - - // The name of the trigger. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s RepositoryTrigger) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RepositoryTrigger) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RepositoryTrigger) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RepositoryTrigger"} - if s.DestinationArn == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationArn")) - } - if s.Events == nil { - invalidParams.Add(request.NewErrParamRequired("Events")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBranches sets the Branches field's value. -func (s *RepositoryTrigger) SetBranches(v []*string) *RepositoryTrigger { - s.Branches = v - return s -} - -// SetCustomData sets the CustomData field's value. -func (s *RepositoryTrigger) SetCustomData(v string) *RepositoryTrigger { - s.CustomData = &v - return s -} - -// SetDestinationArn sets the DestinationArn field's value. -func (s *RepositoryTrigger) SetDestinationArn(v string) *RepositoryTrigger { - s.DestinationArn = &v - return s -} - -// SetEvents sets the Events field's value. -func (s *RepositoryTrigger) SetEvents(v []*string) *RepositoryTrigger { - s.Events = v - return s -} - -// SetName sets the Name field's value. -func (s *RepositoryTrigger) SetName(v string) *RepositoryTrigger { - s.Name = &v - return s -} - -// A trigger failed to run. -type RepositoryTriggerExecutionFailure struct { - _ struct{} `type:"structure"` - - // Additional message information about the trigger that did not run. - FailureMessage *string `locationName:"failureMessage" type:"string"` - - // The name of the trigger that did not run. - Trigger *string `locationName:"trigger" type:"string"` -} - -// String returns the string representation -func (s RepositoryTriggerExecutionFailure) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RepositoryTriggerExecutionFailure) GoString() string { - return s.String() -} - -// SetFailureMessage sets the FailureMessage field's value. -func (s *RepositoryTriggerExecutionFailure) SetFailureMessage(v string) *RepositoryTriggerExecutionFailure { - s.FailureMessage = &v - return s -} - -// SetTrigger sets the Trigger field's value. -func (s *RepositoryTriggerExecutionFailure) SetTrigger(v string) *RepositoryTriggerExecutionFailure { - s.Trigger = &v - return s -} - -// Returns information about a submodule reference in a repository folder. -type SubModule struct { - _ struct{} `type:"structure"` - - // The fully qualified path to the folder that contains the reference to the - // submodule. - AbsolutePath *string `locationName:"absolutePath" type:"string"` - - // The commit ID that contains the reference to the submodule. - CommitId *string `locationName:"commitId" type:"string"` - - // The relative path of the submodule from the folder where the query originated. - RelativePath *string `locationName:"relativePath" type:"string"` -} - -// String returns the string representation -func (s SubModule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubModule) GoString() string { - return s.String() -} - -// SetAbsolutePath sets the AbsolutePath field's value. -func (s *SubModule) SetAbsolutePath(v string) *SubModule { - s.AbsolutePath = &v - return s -} - -// SetCommitId sets the CommitId field's value. -func (s *SubModule) SetCommitId(v string) *SubModule { - s.CommitId = &v - return s -} - -// SetRelativePath sets the RelativePath field's value. -func (s *SubModule) SetRelativePath(v string) *SubModule { - s.RelativePath = &v - return s -} - -// Returns information about a symbolic link in a repository folder. -type SymbolicLink struct { - _ struct{} `type:"structure"` - - // The fully-qualified path to the folder that contains the symbolic link. - AbsolutePath *string `locationName:"absolutePath" type:"string"` - - // The blob ID that contains the information about the symbolic link. - BlobId *string `locationName:"blobId" type:"string"` - - // The file mode permissions of the blob that cotains information about the - // symbolic link. - FileMode *string `locationName:"fileMode" type:"string" enum:"FileModeTypeEnum"` - - // The relative path of the symbolic link from the folder where the query originated. - RelativePath *string `locationName:"relativePath" type:"string"` -} - -// String returns the string representation -func (s SymbolicLink) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SymbolicLink) GoString() string { - return s.String() -} - -// SetAbsolutePath sets the AbsolutePath field's value. -func (s *SymbolicLink) SetAbsolutePath(v string) *SymbolicLink { - s.AbsolutePath = &v - return s -} - -// SetBlobId sets the BlobId field's value. -func (s *SymbolicLink) SetBlobId(v string) *SymbolicLink { - s.BlobId = &v - return s -} - -// SetFileMode sets the FileMode field's value. -func (s *SymbolicLink) SetFileMode(v string) *SymbolicLink { - s.FileMode = &v - return s -} - -// SetRelativePath sets the RelativePath field's value. -func (s *SymbolicLink) SetRelativePath(v string) *SymbolicLink { - s.RelativePath = &v - return s -} - -// Returns information about a target for a pull request. -type Target struct { - _ struct{} `type:"structure"` - - // The branch of the repository where the pull request changes will be merged - // into. Also known as the destination branch. - DestinationReference *string `locationName:"destinationReference" type:"string"` - - // The name of the repository that contains the pull request. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` - - // The branch of the repository that contains the changes for the pull request. - // Also known as the source branch. - // - // SourceReference is a required field - SourceReference *string `locationName:"sourceReference" type:"string" required:"true"` -} - -// String returns the string representation -func (s Target) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Target) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Target) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Target"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - if s.SourceReference == nil { - invalidParams.Add(request.NewErrParamRequired("SourceReference")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationReference sets the DestinationReference field's value. -func (s *Target) SetDestinationReference(v string) *Target { - s.DestinationReference = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *Target) SetRepositoryName(v string) *Target { - s.RepositoryName = &v - return s -} - -// SetSourceReference sets the SourceReference field's value. -func (s *Target) SetSourceReference(v string) *Target { - s.SourceReference = &v - return s -} - -// Represents the input of a test repository triggers operation. -type TestRepositoryTriggersInput struct { - _ struct{} `type:"structure"` - - // The name of the repository in which to test the triggers. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` - - // The list of triggers to test. - // - // Triggers is a required field - Triggers []*RepositoryTrigger `locationName:"triggers" type:"list" required:"true"` -} - -// String returns the string representation -func (s TestRepositoryTriggersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestRepositoryTriggersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TestRepositoryTriggersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TestRepositoryTriggersInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - if s.Triggers == nil { - invalidParams.Add(request.NewErrParamRequired("Triggers")) - } - if s.Triggers != nil { - for i, v := range s.Triggers { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Triggers", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *TestRepositoryTriggersInput) SetRepositoryName(v string) *TestRepositoryTriggersInput { - s.RepositoryName = &v - return s -} - -// SetTriggers sets the Triggers field's value. -func (s *TestRepositoryTriggersInput) SetTriggers(v []*RepositoryTrigger) *TestRepositoryTriggersInput { - s.Triggers = v - return s -} - -// Represents the output of a test repository triggers operation. -type TestRepositoryTriggersOutput struct { - _ struct{} `type:"structure"` - - // The list of triggers that were not able to be tested. This list provides - // the names of the triggers that could not be tested, separated by commas. - FailedExecutions []*RepositoryTriggerExecutionFailure `locationName:"failedExecutions" type:"list"` - - // The list of triggers that were successfully tested. This list provides the - // names of the triggers that were successfully tested, separated by commas. - SuccessfulExecutions []*string `locationName:"successfulExecutions" type:"list"` -} - -// String returns the string representation -func (s TestRepositoryTriggersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestRepositoryTriggersOutput) GoString() string { - return s.String() -} - -// SetFailedExecutions sets the FailedExecutions field's value. -func (s *TestRepositoryTriggersOutput) SetFailedExecutions(v []*RepositoryTriggerExecutionFailure) *TestRepositoryTriggersOutput { - s.FailedExecutions = v - return s -} - -// SetSuccessfulExecutions sets the SuccessfulExecutions field's value. -func (s *TestRepositoryTriggersOutput) SetSuccessfulExecutions(v []*string) *TestRepositoryTriggersOutput { - s.SuccessfulExecutions = v - return s -} - -type UpdateCommentInput struct { - _ struct{} `type:"structure"` - - // The system-generated ID of the comment you want to update. To get this ID, - // use GetCommentsForComparedCommit or GetCommentsForPullRequest. - // - // CommentId is a required field - CommentId *string `locationName:"commentId" type:"string" required:"true"` - - // The updated content with which you want to replace the existing content of - // the comment. - // - // Content is a required field - Content *string `locationName:"content" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateCommentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCommentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCommentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCommentInput"} - if s.CommentId == nil { - invalidParams.Add(request.NewErrParamRequired("CommentId")) - } - if s.Content == nil { - invalidParams.Add(request.NewErrParamRequired("Content")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCommentId sets the CommentId field's value. -func (s *UpdateCommentInput) SetCommentId(v string) *UpdateCommentInput { - s.CommentId = &v - return s -} - -// SetContent sets the Content field's value. -func (s *UpdateCommentInput) SetContent(v string) *UpdateCommentInput { - s.Content = &v - return s -} - -type UpdateCommentOutput struct { - _ struct{} `type:"structure"` - - // Information about the updated comment. - Comment *Comment `locationName:"comment" type:"structure"` -} - -// String returns the string representation -func (s UpdateCommentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCommentOutput) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *UpdateCommentOutput) SetComment(v *Comment) *UpdateCommentOutput { - s.Comment = v - return s -} - -// Represents the input of an update default branch operation. -type UpdateDefaultBranchInput struct { - _ struct{} `type:"structure"` - - // The name of the branch to set as the default. - // - // DefaultBranchName is a required field - DefaultBranchName *string `locationName:"defaultBranchName" min:"1" type:"string" required:"true"` - - // The name of the repository to set or change the default branch for. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateDefaultBranchInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDefaultBranchInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDefaultBranchInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDefaultBranchInput"} - if s.DefaultBranchName == nil { - invalidParams.Add(request.NewErrParamRequired("DefaultBranchName")) - } - if s.DefaultBranchName != nil && len(*s.DefaultBranchName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DefaultBranchName", 1)) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultBranchName sets the DefaultBranchName field's value. -func (s *UpdateDefaultBranchInput) SetDefaultBranchName(v string) *UpdateDefaultBranchInput { - s.DefaultBranchName = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *UpdateDefaultBranchInput) SetRepositoryName(v string) *UpdateDefaultBranchInput { - s.RepositoryName = &v - return s -} - -type UpdateDefaultBranchOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateDefaultBranchOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDefaultBranchOutput) GoString() string { - return s.String() -} - -type UpdatePullRequestDescriptionInput struct { - _ struct{} `type:"structure"` - - // The updated content of the description for the pull request. This content - // will replace the existing description. - // - // Description is a required field - Description *string `locationName:"description" type:"string" required:"true"` - - // The system-generated ID of the pull request. To get this ID, use ListPullRequests. - // - // PullRequestId is a required field - PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdatePullRequestDescriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePullRequestDescriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdatePullRequestDescriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdatePullRequestDescriptionInput"} - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - if s.PullRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("PullRequestId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdatePullRequestDescriptionInput) SetDescription(v string) *UpdatePullRequestDescriptionInput { - s.Description = &v - return s -} - -// SetPullRequestId sets the PullRequestId field's value. -func (s *UpdatePullRequestDescriptionInput) SetPullRequestId(v string) *UpdatePullRequestDescriptionInput { - s.PullRequestId = &v - return s -} - -type UpdatePullRequestDescriptionOutput struct { - _ struct{} `type:"structure"` - - // Information about the updated pull request. - // - // PullRequest is a required field - PullRequest *PullRequest `locationName:"pullRequest" type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdatePullRequestDescriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePullRequestDescriptionOutput) GoString() string { - return s.String() -} - -// SetPullRequest sets the PullRequest field's value. -func (s *UpdatePullRequestDescriptionOutput) SetPullRequest(v *PullRequest) *UpdatePullRequestDescriptionOutput { - s.PullRequest = v - return s -} - -type UpdatePullRequestStatusInput struct { - _ struct{} `type:"structure"` - - // The system-generated ID of the pull request. To get this ID, use ListPullRequests. - // - // PullRequestId is a required field - PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"` - - // The status of the pull request. The only valid operations are to update the - // status from OPEN to OPEN, OPEN to CLOSED or from from CLOSED to CLOSED. - // - // PullRequestStatus is a required field - PullRequestStatus *string `locationName:"pullRequestStatus" type:"string" required:"true" enum:"PullRequestStatusEnum"` -} - -// String returns the string representation -func (s UpdatePullRequestStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePullRequestStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdatePullRequestStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdatePullRequestStatusInput"} - if s.PullRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("PullRequestId")) - } - if s.PullRequestStatus == nil { - invalidParams.Add(request.NewErrParamRequired("PullRequestStatus")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPullRequestId sets the PullRequestId field's value. -func (s *UpdatePullRequestStatusInput) SetPullRequestId(v string) *UpdatePullRequestStatusInput { - s.PullRequestId = &v - return s -} - -// SetPullRequestStatus sets the PullRequestStatus field's value. -func (s *UpdatePullRequestStatusInput) SetPullRequestStatus(v string) *UpdatePullRequestStatusInput { - s.PullRequestStatus = &v - return s -} - -type UpdatePullRequestStatusOutput struct { - _ struct{} `type:"structure"` - - // Information about the pull request. - // - // PullRequest is a required field - PullRequest *PullRequest `locationName:"pullRequest" type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdatePullRequestStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePullRequestStatusOutput) GoString() string { - return s.String() -} - -// SetPullRequest sets the PullRequest field's value. -func (s *UpdatePullRequestStatusOutput) SetPullRequest(v *PullRequest) *UpdatePullRequestStatusOutput { - s.PullRequest = v - return s -} - -type UpdatePullRequestTitleInput struct { - _ struct{} `type:"structure"` - - // The system-generated ID of the pull request. To get this ID, use ListPullRequests. - // - // PullRequestId is a required field - PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"` - - // The updated title of the pull request. This will replace the existing title. - // - // Title is a required field - Title *string `locationName:"title" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdatePullRequestTitleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePullRequestTitleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdatePullRequestTitleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdatePullRequestTitleInput"} - if s.PullRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("PullRequestId")) - } - if s.Title == nil { - invalidParams.Add(request.NewErrParamRequired("Title")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPullRequestId sets the PullRequestId field's value. -func (s *UpdatePullRequestTitleInput) SetPullRequestId(v string) *UpdatePullRequestTitleInput { - s.PullRequestId = &v - return s -} - -// SetTitle sets the Title field's value. -func (s *UpdatePullRequestTitleInput) SetTitle(v string) *UpdatePullRequestTitleInput { - s.Title = &v - return s -} - -type UpdatePullRequestTitleOutput struct { - _ struct{} `type:"structure"` - - // Information about the updated pull request. - // - // PullRequest is a required field - PullRequest *PullRequest `locationName:"pullRequest" type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdatePullRequestTitleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePullRequestTitleOutput) GoString() string { - return s.String() -} - -// SetPullRequest sets the PullRequest field's value. -func (s *UpdatePullRequestTitleOutput) SetPullRequest(v *PullRequest) *UpdatePullRequestTitleOutput { - s.PullRequest = v - return s -} - -// Represents the input of an update repository description operation. -type UpdateRepositoryDescriptionInput struct { - _ struct{} `type:"structure"` - - // The new comment or description for the specified repository. Repository descriptions - // are limited to 1,000 characters. - RepositoryDescription *string `locationName:"repositoryDescription" type:"string"` - - // The name of the repository to set or change the comment or description for. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateRepositoryDescriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRepositoryDescriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRepositoryDescriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRepositoryDescriptionInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRepositoryDescription sets the RepositoryDescription field's value. -func (s *UpdateRepositoryDescriptionInput) SetRepositoryDescription(v string) *UpdateRepositoryDescriptionInput { - s.RepositoryDescription = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *UpdateRepositoryDescriptionInput) SetRepositoryName(v string) *UpdateRepositoryDescriptionInput { - s.RepositoryName = &v - return s -} - -type UpdateRepositoryDescriptionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateRepositoryDescriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRepositoryDescriptionOutput) GoString() string { - return s.String() -} - -// Represents the input of an update repository description operation. -type UpdateRepositoryNameInput struct { - _ struct{} `type:"structure"` - - // The new name for the repository. - // - // NewName is a required field - NewName *string `locationName:"newName" min:"1" type:"string" required:"true"` - - // The existing name of the repository. - // - // OldName is a required field - OldName *string `locationName:"oldName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateRepositoryNameInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRepositoryNameInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRepositoryNameInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRepositoryNameInput"} - if s.NewName == nil { - invalidParams.Add(request.NewErrParamRequired("NewName")) - } - if s.NewName != nil && len(*s.NewName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewName", 1)) - } - if s.OldName == nil { - invalidParams.Add(request.NewErrParamRequired("OldName")) - } - if s.OldName != nil && len(*s.OldName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OldName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNewName sets the NewName field's value. -func (s *UpdateRepositoryNameInput) SetNewName(v string) *UpdateRepositoryNameInput { - s.NewName = &v - return s -} - -// SetOldName sets the OldName field's value. -func (s *UpdateRepositoryNameInput) SetOldName(v string) *UpdateRepositoryNameInput { - s.OldName = &v - return s -} - -type UpdateRepositoryNameOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateRepositoryNameOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRepositoryNameOutput) GoString() string { - return s.String() -} - -// Information about the user who made a specified commit. -type UserInfo struct { - _ struct{} `type:"structure"` - - // The date when the specified commit was commited, in timestamp format with - // GMT offset. - Date *string `locationName:"date" type:"string"` - - // The email address associated with the user who made the commit, if any. - Email *string `locationName:"email" type:"string"` - - // The name of the user who made the specified commit. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s UserInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserInfo) GoString() string { - return s.String() -} - -// SetDate sets the Date field's value. -func (s *UserInfo) SetDate(v string) *UserInfo { - s.Date = &v - return s -} - -// SetEmail sets the Email field's value. -func (s *UserInfo) SetEmail(v string) *UserInfo { - s.Email = &v - return s -} - -// SetName sets the Name field's value. -func (s *UserInfo) SetName(v string) *UserInfo { - s.Name = &v - return s -} - -const ( - // ChangeTypeEnumA is a ChangeTypeEnum enum value - ChangeTypeEnumA = "A" - - // ChangeTypeEnumM is a ChangeTypeEnum enum value - ChangeTypeEnumM = "M" - - // ChangeTypeEnumD is a ChangeTypeEnum enum value - ChangeTypeEnumD = "D" -) - -const ( - // FileModeTypeEnumExecutable is a FileModeTypeEnum enum value - FileModeTypeEnumExecutable = "EXECUTABLE" - - // FileModeTypeEnumNormal is a FileModeTypeEnum enum value - FileModeTypeEnumNormal = "NORMAL" - - // FileModeTypeEnumSymlink is a FileModeTypeEnum enum value - FileModeTypeEnumSymlink = "SYMLINK" -) - -const ( - // MergeOptionTypeEnumFastForwardMerge is a MergeOptionTypeEnum enum value - MergeOptionTypeEnumFastForwardMerge = "FAST_FORWARD_MERGE" -) - -const ( - // OrderEnumAscending is a OrderEnum enum value - OrderEnumAscending = "ascending" - - // OrderEnumDescending is a OrderEnum enum value - OrderEnumDescending = "descending" -) - -const ( - // PullRequestEventTypePullRequestCreated is a PullRequestEventType enum value - PullRequestEventTypePullRequestCreated = "PULL_REQUEST_CREATED" - - // PullRequestEventTypePullRequestStatusChanged is a PullRequestEventType enum value - PullRequestEventTypePullRequestStatusChanged = "PULL_REQUEST_STATUS_CHANGED" - - // PullRequestEventTypePullRequestSourceReferenceUpdated is a PullRequestEventType enum value - PullRequestEventTypePullRequestSourceReferenceUpdated = "PULL_REQUEST_SOURCE_REFERENCE_UPDATED" - - // PullRequestEventTypePullRequestMergeStateChanged is a PullRequestEventType enum value - PullRequestEventTypePullRequestMergeStateChanged = "PULL_REQUEST_MERGE_STATE_CHANGED" -) - -const ( - // PullRequestStatusEnumOpen is a PullRequestStatusEnum enum value - PullRequestStatusEnumOpen = "OPEN" - - // PullRequestStatusEnumClosed is a PullRequestStatusEnum enum value - PullRequestStatusEnumClosed = "CLOSED" -) - -const ( - // RelativeFileVersionEnumBefore is a RelativeFileVersionEnum enum value - RelativeFileVersionEnumBefore = "BEFORE" - - // RelativeFileVersionEnumAfter is a RelativeFileVersionEnum enum value - RelativeFileVersionEnumAfter = "AFTER" -) - -const ( - // RepositoryTriggerEventEnumAll is a RepositoryTriggerEventEnum enum value - RepositoryTriggerEventEnumAll = "all" - - // RepositoryTriggerEventEnumUpdateReference is a RepositoryTriggerEventEnum enum value - RepositoryTriggerEventEnumUpdateReference = "updateReference" - - // RepositoryTriggerEventEnumCreateReference is a RepositoryTriggerEventEnum enum value - RepositoryTriggerEventEnumCreateReference = "createReference" - - // RepositoryTriggerEventEnumDeleteReference is a RepositoryTriggerEventEnum enum value - RepositoryTriggerEventEnumDeleteReference = "deleteReference" -) - -const ( - // SortByEnumRepositoryName is a SortByEnum enum value - SortByEnumRepositoryName = "repositoryName" - - // SortByEnumLastModifiedDate is a SortByEnum enum value - SortByEnumLastModifiedDate = "lastModifiedDate" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go deleted file mode 100644 index 604881e74..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package codecommit provides the client and types for making API -// requests to AWS CodeCommit. -// -// This is the AWS CodeCommit API Reference. This reference provides descriptions -// of the operations and data types for AWS CodeCommit API along with usage -// examples. -// -// You can use the AWS CodeCommit API to work with the following objects: -// -// Repositories, by calling the following: -// -// * BatchGetRepositories, which returns information about one or more repositories -// associated with your AWS account. -// -// * CreateRepository, which creates an AWS CodeCommit repository. -// -// * DeleteRepository, which deletes an AWS CodeCommit repository. -// -// * GetRepository, which returns information about a specified repository. -// -// * ListRepositories, which lists all AWS CodeCommit repositories associated -// with your AWS account. -// -// * UpdateRepositoryDescription, which sets or updates the description of -// the repository. -// -// * UpdateRepositoryName, which changes the name of the repository. If you -// change the name of a repository, no other users of that repository will -// be able to access it until you send them the new HTTPS or SSH URL to use. -// -// Branches, by calling the following: -// -// * CreateBranch, which creates a new branch in a specified repository. -// -// * DeleteBranch, which deletes the specified branch in a repository unless -// it is the default branch. -// -// * GetBranch, which returns information about a specified branch. -// -// * ListBranches, which lists all branches for a specified repository. -// -// * UpdateDefaultBranch, which changes the default branch for a repository. -// -// Files, by calling the following: -// -// * DeleteFile, which deletes the content of a specified file from a specified -// branch. -// -// * GetFile, which returns the base-64 encoded content of a specified file. -// -// * GetFolder, which returns the contents of a specified folder or directory. -// -// * PutFile, which adds or modifies a file in a specified repository and -// branch. -// -// Information about committed code in a repository, by calling the following: -// -// * GetBlob, which returns the base-64 encoded content of an individual -// Git blob object within a repository. -// -// * GetCommit, which returns information about a commit, including commit -// messages and author and committer information. -// -// * GetDifferences, which returns information about the differences in a -// valid commit specifier (such as a branch, tag, HEAD, commit ID or other -// fully qualified reference). -// -// Pull requests, by calling the following: -// -// * CreatePullRequest, which creates a pull request in a specified repository. -// -// * DescribePullRequestEvents, which returns information about one or more -// pull request events. -// -// * GetCommentsForPullRequest, which returns information about comments -// on a specified pull request. -// -// * GetMergeConflicts, which returns information about merge conflicts between -// the source and destination branch in a pull request. -// -// * GetPullRequest, which returns information about a specified pull request. -// -// * ListPullRequests, which lists all pull requests for a repository. -// -// * MergePullRequestByFastForward, which merges the source destination branch -// of a pull request into the specified destination branch for that pull -// request using the fast-forward merge option. -// -// * PostCommentForPullRequest, which posts a comment to a pull request at -// the specified line, file, or request. -// -// * UpdatePullRequestDescription, which updates the description of a pull -// request. -// -// * UpdatePullRequestStatus, which updates the status of a pull request. -// -// * UpdatePullRequestTitle, which updates the title of a pull request. -// -// Information about comments in a repository, by calling the following: -// -// * DeleteCommentContent, which deletes the content of a comment on a commit -// in a repository. -// -// * GetComment, which returns information about a comment on a commit. -// -// * GetCommentsForComparedCommit, which returns information about comments -// on the comparison between two commit specifiers in a repository. -// -// * PostCommentForComparedCommit, which creates a comment on the comparison -// between two commit specifiers in a repository. -// -// * PostCommentReply, which creates a reply to a comment. -// -// * UpdateComment, which updates the content of a comment on a commit in -// a repository. -// -// Triggers, by calling the following: -// -// * GetRepositoryTriggers, which returns information about triggers configured -// for a repository. -// -// * PutRepositoryTriggers, which replaces all triggers for a repository -// and can be used to create or delete triggers. -// -// * TestRepositoryTriggers, which tests the functionality of a repository -// trigger by sending data to the trigger target. -// -// For information about how to use AWS CodeCommit, see the AWS CodeCommit User -// Guide (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13 for more information on this service. -// -// See codecommit package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/codecommit/ -// -// Using the Client -// -// To contact AWS CodeCommit 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 CodeCommit client CodeCommit for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/codecommit/#New -package codecommit diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go deleted file mode 100644 index f0db5077f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go +++ /dev/null @@ -1,793 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package codecommit - -const ( - - // ErrCodeActorDoesNotExistException for service response error code - // "ActorDoesNotExistException". - // - // The specified Amazon Resource Name (ARN) does not exist in the AWS account. - ErrCodeActorDoesNotExistException = "ActorDoesNotExistException" - - // ErrCodeAuthorDoesNotExistException for service response error code - // "AuthorDoesNotExistException". - // - // The specified Amazon Resource Name (ARN) does not exist in the AWS account. - ErrCodeAuthorDoesNotExistException = "AuthorDoesNotExistException" - - // ErrCodeBeforeCommitIdAndAfterCommitIdAreSameException for service response error code - // "BeforeCommitIdAndAfterCommitIdAreSameException". - // - // The before commit ID and the after commit ID are the same, which is not valid. - // The before commit ID and the after commit ID must be different commit IDs. - ErrCodeBeforeCommitIdAndAfterCommitIdAreSameException = "BeforeCommitIdAndAfterCommitIdAreSameException" - - // ErrCodeBlobIdDoesNotExistException for service response error code - // "BlobIdDoesNotExistException". - // - // The specified blob does not exist. - ErrCodeBlobIdDoesNotExistException = "BlobIdDoesNotExistException" - - // ErrCodeBlobIdRequiredException for service response error code - // "BlobIdRequiredException". - // - // A blob ID is required but was not specified. - ErrCodeBlobIdRequiredException = "BlobIdRequiredException" - - // ErrCodeBranchDoesNotExistException for service response error code - // "BranchDoesNotExistException". - // - // The specified branch does not exist. - ErrCodeBranchDoesNotExistException = "BranchDoesNotExistException" - - // ErrCodeBranchNameExistsException for service response error code - // "BranchNameExistsException". - // - // The specified branch name already exists. - ErrCodeBranchNameExistsException = "BranchNameExistsException" - - // ErrCodeBranchNameIsTagNameException for service response error code - // "BranchNameIsTagNameException". - // - // The specified branch name is not valid because it is a tag name. Type the - // name of a current branch in the repository. For a list of valid branch names, - // use ListBranches. - ErrCodeBranchNameIsTagNameException = "BranchNameIsTagNameException" - - // ErrCodeBranchNameRequiredException for service response error code - // "BranchNameRequiredException". - // - // A branch name is required but was not specified. - ErrCodeBranchNameRequiredException = "BranchNameRequiredException" - - // ErrCodeClientRequestTokenRequiredException for service response error code - // "ClientRequestTokenRequiredException". - // - // A client request token is required. A client request token is an unique, - // client-generated idempotency token that when provided in a request, ensures - // the request cannot be repeated with a changed parameter. If a request is - // received with the same parameters and a token is included, the request will - // return information about the initial request that used that token. - ErrCodeClientRequestTokenRequiredException = "ClientRequestTokenRequiredException" - - // ErrCodeCommentContentRequiredException for service response error code - // "CommentContentRequiredException". - // - // The comment is empty. You must provide some content for a comment. The content - // cannot be null. - ErrCodeCommentContentRequiredException = "CommentContentRequiredException" - - // ErrCodeCommentContentSizeLimitExceededException for service response error code - // "CommentContentSizeLimitExceededException". - // - // The comment is too large. Comments are limited to 1,000 characters. - ErrCodeCommentContentSizeLimitExceededException = "CommentContentSizeLimitExceededException" - - // ErrCodeCommentDeletedException for service response error code - // "CommentDeletedException". - // - // This comment has already been deleted. You cannot edit or delete a deleted - // comment. - ErrCodeCommentDeletedException = "CommentDeletedException" - - // ErrCodeCommentDoesNotExistException for service response error code - // "CommentDoesNotExistException". - // - // No comment exists with the provided ID. Verify that you have provided the - // correct ID, and then try again. - ErrCodeCommentDoesNotExistException = "CommentDoesNotExistException" - - // ErrCodeCommentIdRequiredException for service response error code - // "CommentIdRequiredException". - // - // The comment ID is missing or null. A comment ID is required. - ErrCodeCommentIdRequiredException = "CommentIdRequiredException" - - // ErrCodeCommentNotCreatedByCallerException for service response error code - // "CommentNotCreatedByCallerException". - // - // You cannot modify or delete this comment. Only comment authors can modify - // or delete their comments. - ErrCodeCommentNotCreatedByCallerException = "CommentNotCreatedByCallerException" - - // ErrCodeCommitDoesNotExistException for service response error code - // "CommitDoesNotExistException". - // - // The specified commit does not exist or no commit was specified, and the specified - // repository has no default branch. - ErrCodeCommitDoesNotExistException = "CommitDoesNotExistException" - - // ErrCodeCommitIdDoesNotExistException for service response error code - // "CommitIdDoesNotExistException". - // - // The specified commit ID does not exist. - ErrCodeCommitIdDoesNotExistException = "CommitIdDoesNotExistException" - - // ErrCodeCommitIdRequiredException for service response error code - // "CommitIdRequiredException". - // - // A commit ID was not specified. - ErrCodeCommitIdRequiredException = "CommitIdRequiredException" - - // ErrCodeCommitMessageLengthExceededException for service response error code - // "CommitMessageLengthExceededException". - // - // The commit message is too long. Provide a shorter string. - ErrCodeCommitMessageLengthExceededException = "CommitMessageLengthExceededException" - - // ErrCodeCommitRequiredException for service response error code - // "CommitRequiredException". - // - // A commit was not specified. - ErrCodeCommitRequiredException = "CommitRequiredException" - - // ErrCodeDefaultBranchCannotBeDeletedException for service response error code - // "DefaultBranchCannotBeDeletedException". - // - // The specified branch is the default branch for the repository, and cannot - // be deleted. To delete this branch, you must first set another branch as the - // default branch. - ErrCodeDefaultBranchCannotBeDeletedException = "DefaultBranchCannotBeDeletedException" - - // ErrCodeDirectoryNameConflictsWithFileNameException for service response error code - // "DirectoryNameConflictsWithFileNameException". - // - // A file cannot be added to the repository because the specified path name - // has the same name as a file that already exists in this repository. Either - // provide a different name for the file, or specify a different path for the - // file. - ErrCodeDirectoryNameConflictsWithFileNameException = "DirectoryNameConflictsWithFileNameException" - - // ErrCodeEncryptionIntegrityChecksFailedException for service response error code - // "EncryptionIntegrityChecksFailedException". - // - // An encryption integrity check failed. - ErrCodeEncryptionIntegrityChecksFailedException = "EncryptionIntegrityChecksFailedException" - - // ErrCodeEncryptionKeyAccessDeniedException for service response error code - // "EncryptionKeyAccessDeniedException". - // - // An encryption key could not be accessed. - ErrCodeEncryptionKeyAccessDeniedException = "EncryptionKeyAccessDeniedException" - - // ErrCodeEncryptionKeyDisabledException for service response error code - // "EncryptionKeyDisabledException". - // - // The encryption key is disabled. - ErrCodeEncryptionKeyDisabledException = "EncryptionKeyDisabledException" - - // ErrCodeEncryptionKeyNotFoundException for service response error code - // "EncryptionKeyNotFoundException". - // - // No encryption key was found. - ErrCodeEncryptionKeyNotFoundException = "EncryptionKeyNotFoundException" - - // ErrCodeEncryptionKeyUnavailableException for service response error code - // "EncryptionKeyUnavailableException". - // - // The encryption key is not available. - ErrCodeEncryptionKeyUnavailableException = "EncryptionKeyUnavailableException" - - // ErrCodeFileContentRequiredException for service response error code - // "FileContentRequiredException". - // - // The file cannot be added because it is empty. Empty files cannot be added - // to the repository with this API. - ErrCodeFileContentRequiredException = "FileContentRequiredException" - - // ErrCodeFileContentSizeLimitExceededException for service response error code - // "FileContentSizeLimitExceededException". - // - // The file cannot be added because it is too large. The maximum file size that - // can be added using PutFile is 6 MB. For files larger than 6 MB but smaller - // than 2 GB, add them using a Git client. - ErrCodeFileContentSizeLimitExceededException = "FileContentSizeLimitExceededException" - - // ErrCodeFileDoesNotExistException for service response error code - // "FileDoesNotExistException". - // - // The specified file does not exist. Verify that you have provided the correct - // name of the file, including its full path and extension. - ErrCodeFileDoesNotExistException = "FileDoesNotExistException" - - // ErrCodeFileNameConflictsWithDirectoryNameException for service response error code - // "FileNameConflictsWithDirectoryNameException". - // - // A file cannot be added to the repository because the specified file name - // has the same name as a directory in this repository. Either provide another - // name for the file, or add the file in a directory that does not match the - // file name. - ErrCodeFileNameConflictsWithDirectoryNameException = "FileNameConflictsWithDirectoryNameException" - - // ErrCodeFilePathConflictsWithSubmodulePathException for service response error code - // "FilePathConflictsWithSubmodulePathException". - // - // The specified file path or folder has the same path as a submodule in this - // repository. Either provide a different name for the file, or save the file - // in a directory that does not conflict with the submodule path. - ErrCodeFilePathConflictsWithSubmodulePathException = "FilePathConflictsWithSubmodulePathException" - - // ErrCodeFileTooLargeException for service response error code - // "FileTooLargeException". - // - // The specified file exceeds the file size limit for AWS CodeCommit. For more - // information about limits in AWS CodeCommit, see AWS CodeCommit User Guide - // (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). - ErrCodeFileTooLargeException = "FileTooLargeException" - - // ErrCodeFolderContentSizeLimitExceededException for service response error code - // "FolderContentSizeLimitExceededException". - // - // The specified file is in a folder that exceeds the folder content size limit. - // Either save the file in a folder that has less content, or remove files or - // subfolders from the folder so it does not exceed the size limit. For more - // information about limits in AWS CodeCommit, see AWS CodeCommit User Guide - // (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). - ErrCodeFolderContentSizeLimitExceededException = "FolderContentSizeLimitExceededException" - - // ErrCodeFolderDoesNotExistException for service response error code - // "FolderDoesNotExistException". - // - // The specified folder does not exist. Either the folder name is not correct, - // or you did not provide the full path to the folder. - ErrCodeFolderDoesNotExistException = "FolderDoesNotExistException" - - // ErrCodeIdempotencyParameterMismatchException for service response error code - // "IdempotencyParameterMismatchException". - // - // The client request token is not valid. Either the token is not in a valid - // format, or the token has been used in a previous request and cannot be re-used. - ErrCodeIdempotencyParameterMismatchException = "IdempotencyParameterMismatchException" - - // ErrCodeInvalidActorArnException for service response error code - // "InvalidActorArnException". - // - // The Amazon Resource Name (ARN) is not valid. Make sure that you have provided - // the full ARN for the user who initiated the change for the pull request, - // and then try again. - ErrCodeInvalidActorArnException = "InvalidActorArnException" - - // ErrCodeInvalidAuthorArnException for service response error code - // "InvalidAuthorArnException". - // - // The Amazon Resource Name (ARN) is not valid. Make sure that you have provided - // the full ARN for the author of the pull request, and then try again. - ErrCodeInvalidAuthorArnException = "InvalidAuthorArnException" - - // ErrCodeInvalidBlobIdException for service response error code - // "InvalidBlobIdException". - // - // The specified blob is not valid. - ErrCodeInvalidBlobIdException = "InvalidBlobIdException" - - // ErrCodeInvalidBranchNameException for service response error code - // "InvalidBranchNameException". - // - // The specified reference name is not valid. - ErrCodeInvalidBranchNameException = "InvalidBranchNameException" - - // ErrCodeInvalidClientRequestTokenException for service response error code - // "InvalidClientRequestTokenException". - // - // The client request token is not valid. - ErrCodeInvalidClientRequestTokenException = "InvalidClientRequestTokenException" - - // ErrCodeInvalidCommentIdException for service response error code - // "InvalidCommentIdException". - // - // The comment ID is not in a valid format. Make sure that you have provided - // the full comment ID. - ErrCodeInvalidCommentIdException = "InvalidCommentIdException" - - // ErrCodeInvalidCommitException for service response error code - // "InvalidCommitException". - // - // The specified commit is not valid. - ErrCodeInvalidCommitException = "InvalidCommitException" - - // ErrCodeInvalidCommitIdException for service response error code - // "InvalidCommitIdException". - // - // The specified commit ID is not valid. - ErrCodeInvalidCommitIdException = "InvalidCommitIdException" - - // ErrCodeInvalidContinuationTokenException for service response error code - // "InvalidContinuationTokenException". - // - // The specified continuation token is not valid. - ErrCodeInvalidContinuationTokenException = "InvalidContinuationTokenException" - - // ErrCodeInvalidDeletionParameterException for service response error code - // "InvalidDeletionParameterException". - // - // The specified deletion parameter is not valid. - ErrCodeInvalidDeletionParameterException = "InvalidDeletionParameterException" - - // ErrCodeInvalidDescriptionException for service response error code - // "InvalidDescriptionException". - // - // The pull request description is not valid. Descriptions are limited to 1,000 - // characters in length. - ErrCodeInvalidDescriptionException = "InvalidDescriptionException" - - // ErrCodeInvalidDestinationCommitSpecifierException for service response error code - // "InvalidDestinationCommitSpecifierException". - // - // The destination commit specifier is not valid. You must provide a valid branch - // name, tag, or full commit ID. - ErrCodeInvalidDestinationCommitSpecifierException = "InvalidDestinationCommitSpecifierException" - - // ErrCodeInvalidEmailException for service response error code - // "InvalidEmailException". - // - // The specified email address either contains one or more characters that are - // not allowed, or it exceeds the maximum number of characters allowed for an - // email address. - ErrCodeInvalidEmailException = "InvalidEmailException" - - // ErrCodeInvalidFileLocationException for service response error code - // "InvalidFileLocationException". - // - // The location of the file is not valid. Make sure that you include the extension - // of the file as well as the file name. - ErrCodeInvalidFileLocationException = "InvalidFileLocationException" - - // ErrCodeInvalidFileModeException for service response error code - // "InvalidFileModeException". - // - // The specified file mode permission is not valid. For a list of valid file - // mode permissions, see PutFile. - ErrCodeInvalidFileModeException = "InvalidFileModeException" - - // ErrCodeInvalidFilePositionException for service response error code - // "InvalidFilePositionException". - // - // The position is not valid. Make sure that the line number exists in the version - // of the file you want to comment on. - ErrCodeInvalidFilePositionException = "InvalidFilePositionException" - - // ErrCodeInvalidMaxResultsException for service response error code - // "InvalidMaxResultsException". - // - // The specified number of maximum results is not valid. - ErrCodeInvalidMaxResultsException = "InvalidMaxResultsException" - - // ErrCodeInvalidMergeOptionException for service response error code - // "InvalidMergeOptionException". - // - // The specified merge option is not valid. The only valid value is FAST_FORWARD_MERGE. - ErrCodeInvalidMergeOptionException = "InvalidMergeOptionException" - - // ErrCodeInvalidOrderException for service response error code - // "InvalidOrderException". - // - // The specified sort order is not valid. - ErrCodeInvalidOrderException = "InvalidOrderException" - - // ErrCodeInvalidParentCommitIdException for service response error code - // "InvalidParentCommitIdException". - // - // The parent commit ID is not valid. The commit ID cannot be empty, and must - // match the head commit ID for the branch of the repository where you want - // to add or update a file. - ErrCodeInvalidParentCommitIdException = "InvalidParentCommitIdException" - - // ErrCodeInvalidPathException for service response error code - // "InvalidPathException". - // - // The specified path is not valid. - ErrCodeInvalidPathException = "InvalidPathException" - - // ErrCodeInvalidPullRequestEventTypeException for service response error code - // "InvalidPullRequestEventTypeException". - // - // The pull request event type is not valid. - ErrCodeInvalidPullRequestEventTypeException = "InvalidPullRequestEventTypeException" - - // ErrCodeInvalidPullRequestIdException for service response error code - // "InvalidPullRequestIdException". - // - // The pull request ID is not valid. Make sure that you have provided the full - // ID and that the pull request is in the specified repository, and then try - // again. - ErrCodeInvalidPullRequestIdException = "InvalidPullRequestIdException" - - // ErrCodeInvalidPullRequestStatusException for service response error code - // "InvalidPullRequestStatusException". - // - // The pull request status is not valid. The only valid values are OPEN and - // CLOSED. - ErrCodeInvalidPullRequestStatusException = "InvalidPullRequestStatusException" - - // ErrCodeInvalidPullRequestStatusUpdateException for service response error code - // "InvalidPullRequestStatusUpdateException". - // - // The pull request status update is not valid. The only valid update is from - // OPEN to CLOSED. - ErrCodeInvalidPullRequestStatusUpdateException = "InvalidPullRequestStatusUpdateException" - - // ErrCodeInvalidReferenceNameException for service response error code - // "InvalidReferenceNameException". - // - // The specified reference name format is not valid. Reference names must conform - // to the Git references format, for example refs/heads/master. For more information, - // see Git Internals - Git References (https://git-scm.com/book/en/v2/Git-Internals-Git-References) - // or consult your Git documentation. - ErrCodeInvalidReferenceNameException = "InvalidReferenceNameException" - - // ErrCodeInvalidRelativeFileVersionEnumException for service response error code - // "InvalidRelativeFileVersionEnumException". - // - // Either the enum is not in a valid format, or the specified file version enum - // is not valid in respect to the current file version. - ErrCodeInvalidRelativeFileVersionEnumException = "InvalidRelativeFileVersionEnumException" - - // ErrCodeInvalidRepositoryDescriptionException for service response error code - // "InvalidRepositoryDescriptionException". - // - // The specified repository description is not valid. - ErrCodeInvalidRepositoryDescriptionException = "InvalidRepositoryDescriptionException" - - // ErrCodeInvalidRepositoryNameException for service response error code - // "InvalidRepositoryNameException". - // - // At least one specified repository name is not valid. - // - // This exception only occurs when a specified repository name is not valid. - // Other exceptions occur when a required repository parameter is missing, or - // when a specified repository does not exist. - ErrCodeInvalidRepositoryNameException = "InvalidRepositoryNameException" - - // ErrCodeInvalidRepositoryTriggerBranchNameException for service response error code - // "InvalidRepositoryTriggerBranchNameException". - // - // One or more branch names specified for the trigger is not valid. - ErrCodeInvalidRepositoryTriggerBranchNameException = "InvalidRepositoryTriggerBranchNameException" - - // ErrCodeInvalidRepositoryTriggerCustomDataException for service response error code - // "InvalidRepositoryTriggerCustomDataException". - // - // The custom data provided for the trigger is not valid. - ErrCodeInvalidRepositoryTriggerCustomDataException = "InvalidRepositoryTriggerCustomDataException" - - // ErrCodeInvalidRepositoryTriggerDestinationArnException for service response error code - // "InvalidRepositoryTriggerDestinationArnException". - // - // The Amazon Resource Name (ARN) for the trigger is not valid for the specified - // destination. The most common reason for this error is that the ARN does not - // meet the requirements for the service type. - ErrCodeInvalidRepositoryTriggerDestinationArnException = "InvalidRepositoryTriggerDestinationArnException" - - // ErrCodeInvalidRepositoryTriggerEventsException for service response error code - // "InvalidRepositoryTriggerEventsException". - // - // One or more events specified for the trigger is not valid. Check to make - // sure that all events specified match the requirements for allowed events. - ErrCodeInvalidRepositoryTriggerEventsException = "InvalidRepositoryTriggerEventsException" - - // ErrCodeInvalidRepositoryTriggerNameException for service response error code - // "InvalidRepositoryTriggerNameException". - // - // The name of the trigger is not valid. - ErrCodeInvalidRepositoryTriggerNameException = "InvalidRepositoryTriggerNameException" - - // ErrCodeInvalidRepositoryTriggerRegionException for service response error code - // "InvalidRepositoryTriggerRegionException". - // - // The region for the trigger target does not match the region for the repository. - // Triggers must be created in the same region as the target for the trigger. - ErrCodeInvalidRepositoryTriggerRegionException = "InvalidRepositoryTriggerRegionException" - - // ErrCodeInvalidSortByException for service response error code - // "InvalidSortByException". - // - // The specified sort by value is not valid. - ErrCodeInvalidSortByException = "InvalidSortByException" - - // ErrCodeInvalidSourceCommitSpecifierException for service response error code - // "InvalidSourceCommitSpecifierException". - // - // The source commit specifier is not valid. You must provide a valid branch - // name, tag, or full commit ID. - ErrCodeInvalidSourceCommitSpecifierException = "InvalidSourceCommitSpecifierException" - - // ErrCodeInvalidTargetException for service response error code - // "InvalidTargetException". - // - // The target for the pull request is not valid. A target must contain the full - // values for the repository name, source branch, and destination branch for - // the pull request. - ErrCodeInvalidTargetException = "InvalidTargetException" - - // ErrCodeInvalidTargetsException for service response error code - // "InvalidTargetsException". - // - // The targets for the pull request is not valid or not in a valid format. Targets - // are a list of target objects. Each target object must contain the full values - // for the repository name, source branch, and destination branch for a pull - // request. - ErrCodeInvalidTargetsException = "InvalidTargetsException" - - // ErrCodeInvalidTitleException for service response error code - // "InvalidTitleException". - // - // The title of the pull request is not valid. Pull request titles cannot exceed - // 100 characters in length. - ErrCodeInvalidTitleException = "InvalidTitleException" - - // ErrCodeManualMergeRequiredException for service response error code - // "ManualMergeRequiredException". - // - // The pull request cannot be merged automatically into the destination branch. - // You must manually merge the branches and resolve any conflicts. - ErrCodeManualMergeRequiredException = "ManualMergeRequiredException" - - // ErrCodeMaximumBranchesExceededException for service response error code - // "MaximumBranchesExceededException". - // - // The number of branches for the trigger was exceeded. - ErrCodeMaximumBranchesExceededException = "MaximumBranchesExceededException" - - // ErrCodeMaximumOpenPullRequestsExceededException for service response error code - // "MaximumOpenPullRequestsExceededException". - // - // You cannot create the pull request because the repository has too many open - // pull requests. The maximum number of open pull requests for a repository - // is 1,000. Close one or more open pull requests, and then try again. - ErrCodeMaximumOpenPullRequestsExceededException = "MaximumOpenPullRequestsExceededException" - - // ErrCodeMaximumRepositoryNamesExceededException for service response error code - // "MaximumRepositoryNamesExceededException". - // - // The maximum number of allowed repository names was exceeded. Currently, this - // number is 25. - ErrCodeMaximumRepositoryNamesExceededException = "MaximumRepositoryNamesExceededException" - - // ErrCodeMaximumRepositoryTriggersExceededException for service response error code - // "MaximumRepositoryTriggersExceededException". - // - // The number of triggers allowed for the repository was exceeded. - ErrCodeMaximumRepositoryTriggersExceededException = "MaximumRepositoryTriggersExceededException" - - // ErrCodeMergeOptionRequiredException for service response error code - // "MergeOptionRequiredException". - // - // A merge option or stategy is required, and none was provided. - ErrCodeMergeOptionRequiredException = "MergeOptionRequiredException" - - // ErrCodeMultipleRepositoriesInPullRequestException for service response error code - // "MultipleRepositoriesInPullRequestException". - // - // You cannot include more than one repository in a pull request. Make sure - // you have specified only one repository name in your request, and then try - // again. - ErrCodeMultipleRepositoriesInPullRequestException = "MultipleRepositoriesInPullRequestException" - - // ErrCodeNameLengthExceededException for service response error code - // "NameLengthExceededException". - // - // The user name is not valid because it has exceeded the character limit for - // file names. File names, including the path to the file, cannot exceed the - // character limit. - ErrCodeNameLengthExceededException = "NameLengthExceededException" - - // ErrCodeParentCommitDoesNotExistException for service response error code - // "ParentCommitDoesNotExistException". - // - // The parent commit ID is not valid because it does not exist. The specified - // parent commit ID does not exist in the specified branch of the repository. - ErrCodeParentCommitDoesNotExistException = "ParentCommitDoesNotExistException" - - // ErrCodeParentCommitIdOutdatedException for service response error code - // "ParentCommitIdOutdatedException". - // - // The file could not be added because the provided parent commit ID is not - // the current tip of the specified branch. To view the full commit ID of the - // current head of the branch, use GetBranch. - ErrCodeParentCommitIdOutdatedException = "ParentCommitIdOutdatedException" - - // ErrCodeParentCommitIdRequiredException for service response error code - // "ParentCommitIdRequiredException". - // - // A parent commit ID is required. To view the full commit ID of a branch in - // a repository, use GetBranch or a Git command (for example, git pull or git - // log). - ErrCodeParentCommitIdRequiredException = "ParentCommitIdRequiredException" - - // ErrCodePathDoesNotExistException for service response error code - // "PathDoesNotExistException". - // - // The specified path does not exist. - ErrCodePathDoesNotExistException = "PathDoesNotExistException" - - // ErrCodePathRequiredException for service response error code - // "PathRequiredException". - // - // The folderPath for a location cannot be null. - ErrCodePathRequiredException = "PathRequiredException" - - // ErrCodePullRequestAlreadyClosedException for service response error code - // "PullRequestAlreadyClosedException". - // - // The pull request status cannot be updated because it is already closed. - ErrCodePullRequestAlreadyClosedException = "PullRequestAlreadyClosedException" - - // ErrCodePullRequestDoesNotExistException for service response error code - // "PullRequestDoesNotExistException". - // - // The pull request ID could not be found. Make sure that you have specified - // the correct repository name and pull request ID, and then try again. - ErrCodePullRequestDoesNotExistException = "PullRequestDoesNotExistException" - - // ErrCodePullRequestIdRequiredException for service response error code - // "PullRequestIdRequiredException". - // - // A pull request ID is required, but none was provided. - ErrCodePullRequestIdRequiredException = "PullRequestIdRequiredException" - - // ErrCodePullRequestStatusRequiredException for service response error code - // "PullRequestStatusRequiredException". - // - // A pull request status is required, but none was provided. - ErrCodePullRequestStatusRequiredException = "PullRequestStatusRequiredException" - - // ErrCodeReferenceDoesNotExistException for service response error code - // "ReferenceDoesNotExistException". - // - // The specified reference does not exist. You must provide a full commit ID. - ErrCodeReferenceDoesNotExistException = "ReferenceDoesNotExistException" - - // ErrCodeReferenceNameRequiredException for service response error code - // "ReferenceNameRequiredException". - // - // A reference name is required, but none was provided. - ErrCodeReferenceNameRequiredException = "ReferenceNameRequiredException" - - // ErrCodeReferenceTypeNotSupportedException for service response error code - // "ReferenceTypeNotSupportedException". - // - // The specified reference is not a supported type. - ErrCodeReferenceTypeNotSupportedException = "ReferenceTypeNotSupportedException" - - // ErrCodeRepositoryDoesNotExistException for service response error code - // "RepositoryDoesNotExistException". - // - // The specified repository does not exist. - ErrCodeRepositoryDoesNotExistException = "RepositoryDoesNotExistException" - - // ErrCodeRepositoryLimitExceededException for service response error code - // "RepositoryLimitExceededException". - // - // A repository resource limit was exceeded. - ErrCodeRepositoryLimitExceededException = "RepositoryLimitExceededException" - - // ErrCodeRepositoryNameExistsException for service response error code - // "RepositoryNameExistsException". - // - // The specified repository name already exists. - ErrCodeRepositoryNameExistsException = "RepositoryNameExistsException" - - // ErrCodeRepositoryNameRequiredException for service response error code - // "RepositoryNameRequiredException". - // - // A repository name is required but was not specified. - ErrCodeRepositoryNameRequiredException = "RepositoryNameRequiredException" - - // ErrCodeRepositoryNamesRequiredException for service response error code - // "RepositoryNamesRequiredException". - // - // A repository names object is required but was not specified. - ErrCodeRepositoryNamesRequiredException = "RepositoryNamesRequiredException" - - // ErrCodeRepositoryNotAssociatedWithPullRequestException for service response error code - // "RepositoryNotAssociatedWithPullRequestException". - // - // The repository does not contain any pull requests with that pull request - // ID. Check to make sure you have provided the correct repository name for - // the pull request. - ErrCodeRepositoryNotAssociatedWithPullRequestException = "RepositoryNotAssociatedWithPullRequestException" - - // ErrCodeRepositoryTriggerBranchNameListRequiredException for service response error code - // "RepositoryTriggerBranchNameListRequiredException". - // - // At least one branch name is required but was not specified in the trigger - // configuration. - ErrCodeRepositoryTriggerBranchNameListRequiredException = "RepositoryTriggerBranchNameListRequiredException" - - // ErrCodeRepositoryTriggerDestinationArnRequiredException for service response error code - // "RepositoryTriggerDestinationArnRequiredException". - // - // A destination ARN for the target service for the trigger is required but - // was not specified. - ErrCodeRepositoryTriggerDestinationArnRequiredException = "RepositoryTriggerDestinationArnRequiredException" - - // ErrCodeRepositoryTriggerEventsListRequiredException for service response error code - // "RepositoryTriggerEventsListRequiredException". - // - // At least one event for the trigger is required but was not specified. - ErrCodeRepositoryTriggerEventsListRequiredException = "RepositoryTriggerEventsListRequiredException" - - // ErrCodeRepositoryTriggerNameRequiredException for service response error code - // "RepositoryTriggerNameRequiredException". - // - // A name for the trigger is required but was not specified. - ErrCodeRepositoryTriggerNameRequiredException = "RepositoryTriggerNameRequiredException" - - // ErrCodeRepositoryTriggersListRequiredException for service response error code - // "RepositoryTriggersListRequiredException". - // - // The list of triggers for the repository is required but was not specified. - ErrCodeRepositoryTriggersListRequiredException = "RepositoryTriggersListRequiredException" - - // ErrCodeSameFileContentException for service response error code - // "SameFileContentException". - // - // The file was not added or updated because the content of the file is exactly - // the same as the content of that file in the repository and branch that you - // specified. - ErrCodeSameFileContentException = "SameFileContentException" - - // ErrCodeSourceAndDestinationAreSameException for service response error code - // "SourceAndDestinationAreSameException". - // - // The source branch and the destination branch for the pull request are the - // same. You must specify different branches for the source and destination. - ErrCodeSourceAndDestinationAreSameException = "SourceAndDestinationAreSameException" - - // ErrCodeTargetRequiredException for service response error code - // "TargetRequiredException". - // - // A pull request target is required. It cannot be empty or null. A pull request - // target must contain the full values for the repository name, source branch, - // and destination branch for the pull request. - ErrCodeTargetRequiredException = "TargetRequiredException" - - // ErrCodeTargetsRequiredException for service response error code - // "TargetsRequiredException". - // - // An array of target objects is required. It cannot be empty or null. - ErrCodeTargetsRequiredException = "TargetsRequiredException" - - // ErrCodeTipOfSourceReferenceIsDifferentException for service response error code - // "TipOfSourceReferenceIsDifferentException". - // - // The tip of the source branch in the destination repository does not match - // the tip of the source branch specified in your request. The pull request - // might have been updated. Make sure that you have the latest changes. - ErrCodeTipOfSourceReferenceIsDifferentException = "TipOfSourceReferenceIsDifferentException" - - // ErrCodeTipsDivergenceExceededException for service response error code - // "TipsDivergenceExceededException". - // - // The divergence between the tips of the provided commit specifiers is too - // great to determine whether there might be any merge conflicts. Locally compare - // the specifiers using git diff or a diff tool. - ErrCodeTipsDivergenceExceededException = "TipsDivergenceExceededException" - - // ErrCodeTitleRequiredException for service response error code - // "TitleRequiredException". - // - // A pull request title is required. It cannot be empty or null. - ErrCodeTitleRequiredException = "TitleRequiredException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/service.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/service.go deleted file mode 100644 index c8cad394a..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package codecommit - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// CodeCommit provides the API operation methods for making requests to -// AWS CodeCommit. See this package's package overview docs -// for details on the service. -// -// CodeCommit methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CodeCommit 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 = "codecommit" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "CodeCommit" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CodeCommit client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a CodeCommit client from just a session. -// svc := codecommit.New(mySession) -// -// // Create a CodeCommit client with additional configuration -// svc := codecommit.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CodeCommit { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CodeCommit { - svc := &CodeCommit{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-04-13", - JSONVersion: "1.1", - TargetPrefix: "CodeCommit_20150413", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CodeCommit operation and runs any -// custom request initialization. -func (c *CodeCommit) 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/codedeploy/api.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go deleted file mode 100644 index 8c469f5af..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go +++ /dev/null @@ -1,11902 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package codedeploy - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAddTagsToOnPremisesInstances = "AddTagsToOnPremisesInstances" - -// AddTagsToOnPremisesInstancesRequest generates a "aws/request.Request" representing the -// client's request for the AddTagsToOnPremisesInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTagsToOnPremisesInstances for more information on using the AddTagsToOnPremisesInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsToOnPremisesInstancesRequest method. -// req, resp := client.AddTagsToOnPremisesInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/AddTagsToOnPremisesInstances -func (c *CodeDeploy) AddTagsToOnPremisesInstancesRequest(input *AddTagsToOnPremisesInstancesInput) (req *request.Request, output *AddTagsToOnPremisesInstancesOutput) { - op := &request.Operation{ - Name: opAddTagsToOnPremisesInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsToOnPremisesInstancesInput{} - } - - output = &AddTagsToOnPremisesInstancesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTagsToOnPremisesInstances API operation for AWS CodeDeploy. -// -// Adds tags to on-premises instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation AddTagsToOnPremisesInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInstanceNameRequiredException "InstanceNameRequiredException" -// An on-premises instance name was not specified. -// -// * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The on-premises instance name was specified in an invalid format. -// -// * ErrCodeTagRequiredException "TagRequiredException" -// A tag was not specified. -// -// * ErrCodeInvalidTagException "InvalidTagException" -// The tag was specified in an invalid format. -// -// * ErrCodeTagLimitExceededException "TagLimitExceededException" -// The maximum allowed number of tags was exceeded. -// -// * ErrCodeInstanceLimitExceededException "InstanceLimitExceededException" -// The maximum number of allowed on-premises instances in a single call was -// exceeded. -// -// * ErrCodeInstanceNotRegisteredException "InstanceNotRegisteredException" -// The specified on-premises instance is not registered. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/AddTagsToOnPremisesInstances -func (c *CodeDeploy) AddTagsToOnPremisesInstances(input *AddTagsToOnPremisesInstancesInput) (*AddTagsToOnPremisesInstancesOutput, error) { - req, out := c.AddTagsToOnPremisesInstancesRequest(input) - return out, req.Send() -} - -// AddTagsToOnPremisesInstancesWithContext is the same as AddTagsToOnPremisesInstances with the addition of -// the ability to pass a context and additional request options. -// -// See AddTagsToOnPremisesInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) AddTagsToOnPremisesInstancesWithContext(ctx aws.Context, input *AddTagsToOnPremisesInstancesInput, opts ...request.Option) (*AddTagsToOnPremisesInstancesOutput, error) { - req, out := c.AddTagsToOnPremisesInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchGetApplicationRevisions = "BatchGetApplicationRevisions" - -// BatchGetApplicationRevisionsRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetApplicationRevisions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetApplicationRevisions for more information on using the BatchGetApplicationRevisions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetApplicationRevisionsRequest method. -// req, resp := client.BatchGetApplicationRevisionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetApplicationRevisions -func (c *CodeDeploy) BatchGetApplicationRevisionsRequest(input *BatchGetApplicationRevisionsInput) (req *request.Request, output *BatchGetApplicationRevisionsOutput) { - op := &request.Operation{ - Name: opBatchGetApplicationRevisions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetApplicationRevisionsInput{} - } - - output = &BatchGetApplicationRevisionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetApplicationRevisions API operation for AWS CodeDeploy. -// -// Gets information about one or more application revisions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation BatchGetApplicationRevisions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the IAM user or AWS account. -// -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeRevisionRequiredException "RevisionRequiredException" -// The revision ID was not specified. -// -// * ErrCodeInvalidRevisionException "InvalidRevisionException" -// The revision was specified in an invalid format. -// -// * ErrCodeBatchLimitExceededException "BatchLimitExceededException" -// The maximum number of names or IDs allowed for this request (100) was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetApplicationRevisions -func (c *CodeDeploy) BatchGetApplicationRevisions(input *BatchGetApplicationRevisionsInput) (*BatchGetApplicationRevisionsOutput, error) { - req, out := c.BatchGetApplicationRevisionsRequest(input) - return out, req.Send() -} - -// BatchGetApplicationRevisionsWithContext is the same as BatchGetApplicationRevisions with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetApplicationRevisions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) BatchGetApplicationRevisionsWithContext(ctx aws.Context, input *BatchGetApplicationRevisionsInput, opts ...request.Option) (*BatchGetApplicationRevisionsOutput, error) { - req, out := c.BatchGetApplicationRevisionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchGetApplications = "BatchGetApplications" - -// BatchGetApplicationsRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetApplications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetApplications for more information on using the BatchGetApplications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetApplicationsRequest method. -// req, resp := client.BatchGetApplicationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetApplications -func (c *CodeDeploy) BatchGetApplicationsRequest(input *BatchGetApplicationsInput) (req *request.Request, output *BatchGetApplicationsOutput) { - op := &request.Operation{ - Name: opBatchGetApplications, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetApplicationsInput{} - } - - output = &BatchGetApplicationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetApplications API operation for AWS CodeDeploy. -// -// Gets information about one or more applications. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation BatchGetApplications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the IAM user or AWS account. -// -// * ErrCodeBatchLimitExceededException "BatchLimitExceededException" -// The maximum number of names or IDs allowed for this request (100) was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetApplications -func (c *CodeDeploy) BatchGetApplications(input *BatchGetApplicationsInput) (*BatchGetApplicationsOutput, error) { - req, out := c.BatchGetApplicationsRequest(input) - return out, req.Send() -} - -// BatchGetApplicationsWithContext is the same as BatchGetApplications with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetApplications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) BatchGetApplicationsWithContext(ctx aws.Context, input *BatchGetApplicationsInput, opts ...request.Option) (*BatchGetApplicationsOutput, error) { - req, out := c.BatchGetApplicationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchGetDeploymentGroups = "BatchGetDeploymentGroups" - -// BatchGetDeploymentGroupsRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetDeploymentGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetDeploymentGroups for more information on using the BatchGetDeploymentGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetDeploymentGroupsRequest method. -// req, resp := client.BatchGetDeploymentGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeploymentGroups -func (c *CodeDeploy) BatchGetDeploymentGroupsRequest(input *BatchGetDeploymentGroupsInput) (req *request.Request, output *BatchGetDeploymentGroupsOutput) { - op := &request.Operation{ - Name: opBatchGetDeploymentGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetDeploymentGroupsInput{} - } - - output = &BatchGetDeploymentGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetDeploymentGroups API operation for AWS CodeDeploy. -// -// Gets information about one or more deployment 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 CodeDeploy's -// API operation BatchGetDeploymentGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the IAM user or AWS account. -// -// * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" -// The deployment group name was not specified. -// -// * ErrCodeInvalidDeploymentGroupNameException "InvalidDeploymentGroupNameException" -// The deployment group name was specified in an invalid format. -// -// * ErrCodeBatchLimitExceededException "BatchLimitExceededException" -// The maximum number of names or IDs allowed for this request (100) was exceeded. -// -// * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the IAM user or AWS account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeploymentGroups -func (c *CodeDeploy) BatchGetDeploymentGroups(input *BatchGetDeploymentGroupsInput) (*BatchGetDeploymentGroupsOutput, error) { - req, out := c.BatchGetDeploymentGroupsRequest(input) - return out, req.Send() -} - -// BatchGetDeploymentGroupsWithContext is the same as BatchGetDeploymentGroups with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetDeploymentGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) BatchGetDeploymentGroupsWithContext(ctx aws.Context, input *BatchGetDeploymentGroupsInput, opts ...request.Option) (*BatchGetDeploymentGroupsOutput, error) { - req, out := c.BatchGetDeploymentGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchGetDeploymentInstances = "BatchGetDeploymentInstances" - -// BatchGetDeploymentInstancesRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetDeploymentInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetDeploymentInstances for more information on using the BatchGetDeploymentInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetDeploymentInstancesRequest method. -// req, resp := client.BatchGetDeploymentInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeploymentInstances -// -// Deprecated: This operation is deprecated, use BatchGetDeploymentTargets instead. -func (c *CodeDeploy) BatchGetDeploymentInstancesRequest(input *BatchGetDeploymentInstancesInput) (req *request.Request, output *BatchGetDeploymentInstancesOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, BatchGetDeploymentInstances, has been deprecated") - } - op := &request.Operation{ - Name: opBatchGetDeploymentInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetDeploymentInstancesInput{} - } - - output = &BatchGetDeploymentInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetDeploymentInstances API operation for AWS CodeDeploy. -// -// This method works, but is deprecated. Use BatchGetDeploymentTargets instead. -// -// Returns an array of instances associated with a deployment. This method works -// with EC2/On-premises and AWS Lambda compute platforms. The newer BatchGetDeploymentTargets -// works with all compute platforms. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation BatchGetDeploymentInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" -// At least one deployment ID must be specified. -// -// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment with the IAM user or AWS account does not exist. -// -// * ErrCodeInstanceIdRequiredException "InstanceIdRequiredException" -// The instance ID was not specified. -// -// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" -// At least one of the deployment IDs was specified in an invalid format. -// -// * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The on-premises instance name was specified in an invalid format. -// -// * ErrCodeBatchLimitExceededException "BatchLimitExceededException" -// The maximum number of names or IDs allowed for this request (100) was exceeded. -// -// * ErrCodeInvalidComputePlatformException "InvalidComputePlatformException" -// The computePlatform is invalid. The computePlatform should be Lambda or Server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeploymentInstances -// -// Deprecated: This operation is deprecated, use BatchGetDeploymentTargets instead. -func (c *CodeDeploy) BatchGetDeploymentInstances(input *BatchGetDeploymentInstancesInput) (*BatchGetDeploymentInstancesOutput, error) { - req, out := c.BatchGetDeploymentInstancesRequest(input) - return out, req.Send() -} - -// BatchGetDeploymentInstancesWithContext is the same as BatchGetDeploymentInstances with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetDeploymentInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: This operation is deprecated, use BatchGetDeploymentTargets instead. -func (c *CodeDeploy) BatchGetDeploymentInstancesWithContext(ctx aws.Context, input *BatchGetDeploymentInstancesInput, opts ...request.Option) (*BatchGetDeploymentInstancesOutput, error) { - req, out := c.BatchGetDeploymentInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchGetDeploymentTargets = "BatchGetDeploymentTargets" - -// BatchGetDeploymentTargetsRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetDeploymentTargets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetDeploymentTargets for more information on using the BatchGetDeploymentTargets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetDeploymentTargetsRequest method. -// req, resp := client.BatchGetDeploymentTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeploymentTargets -func (c *CodeDeploy) BatchGetDeploymentTargetsRequest(input *BatchGetDeploymentTargetsInput) (req *request.Request, output *BatchGetDeploymentTargetsOutput) { - op := &request.Operation{ - Name: opBatchGetDeploymentTargets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetDeploymentTargetsInput{} - } - - output = &BatchGetDeploymentTargetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetDeploymentTargets API operation for AWS CodeDeploy. -// -// Returns an array of targets associated with a deployment. This method works -// with all compute types and should be used instead of the deprecated BatchGetDeploymentInstances. -// -// The type of targets returned depends on the deployment's compute platform: -// -// * EC2/On-premises: Information about EC2 instance targets. -// -// * AWS Lambda: Information about Lambda functions targets. -// -// * Amazon ECS: Information about Amazon ECS service targets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation BatchGetDeploymentTargets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" -// At least one of the deployment IDs was specified in an invalid format. -// -// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" -// At least one deployment ID must be specified. -// -// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment with the IAM user or AWS account does not exist. -// -// * ErrCodeDeploymentTargetIdRequiredException "DeploymentTargetIdRequiredException" -// A deployment target ID was not provided. -// -// * ErrCodeInvalidDeploymentTargetIdException "InvalidDeploymentTargetIdException" -// The target ID provided was not valid. -// -// * ErrCodeDeploymentTargetDoesNotExistException "DeploymentTargetDoesNotExistException" -// The provided target ID does not belong to the attempted deployment. -// -// * ErrCodeDeploymentTargetListSizeExceededException "DeploymentTargetListSizeExceededException" -// The maximum number of targets that can be associated with an Amazon ECS or -// AWS Lambda deployment was exceeded. The target list of both types of deployments -// must have exactly one item. This exception does not apply to EC2/On-premises -// deployments. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeploymentTargets -func (c *CodeDeploy) BatchGetDeploymentTargets(input *BatchGetDeploymentTargetsInput) (*BatchGetDeploymentTargetsOutput, error) { - req, out := c.BatchGetDeploymentTargetsRequest(input) - return out, req.Send() -} - -// BatchGetDeploymentTargetsWithContext is the same as BatchGetDeploymentTargets with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetDeploymentTargets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) BatchGetDeploymentTargetsWithContext(ctx aws.Context, input *BatchGetDeploymentTargetsInput, opts ...request.Option) (*BatchGetDeploymentTargetsOutput, error) { - req, out := c.BatchGetDeploymentTargetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchGetDeployments = "BatchGetDeployments" - -// BatchGetDeploymentsRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetDeployments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetDeployments for more information on using the BatchGetDeployments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetDeploymentsRequest method. -// req, resp := client.BatchGetDeploymentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeployments -func (c *CodeDeploy) BatchGetDeploymentsRequest(input *BatchGetDeploymentsInput) (req *request.Request, output *BatchGetDeploymentsOutput) { - op := &request.Operation{ - Name: opBatchGetDeployments, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetDeploymentsInput{} - } - - output = &BatchGetDeploymentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetDeployments API operation for AWS CodeDeploy. -// -// Gets information about one or more 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 CodeDeploy's -// API operation BatchGetDeployments for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" -// At least one deployment ID must be specified. -// -// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" -// At least one of the deployment IDs was specified in an invalid format. -// -// * ErrCodeBatchLimitExceededException "BatchLimitExceededException" -// The maximum number of names or IDs allowed for this request (100) was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeployments -func (c *CodeDeploy) BatchGetDeployments(input *BatchGetDeploymentsInput) (*BatchGetDeploymentsOutput, error) { - req, out := c.BatchGetDeploymentsRequest(input) - return out, req.Send() -} - -// BatchGetDeploymentsWithContext is the same as BatchGetDeployments with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetDeployments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) BatchGetDeploymentsWithContext(ctx aws.Context, input *BatchGetDeploymentsInput, opts ...request.Option) (*BatchGetDeploymentsOutput, error) { - req, out := c.BatchGetDeploymentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchGetOnPremisesInstances = "BatchGetOnPremisesInstances" - -// BatchGetOnPremisesInstancesRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetOnPremisesInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetOnPremisesInstances for more information on using the BatchGetOnPremisesInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetOnPremisesInstancesRequest method. -// req, resp := client.BatchGetOnPremisesInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetOnPremisesInstances -func (c *CodeDeploy) BatchGetOnPremisesInstancesRequest(input *BatchGetOnPremisesInstancesInput) (req *request.Request, output *BatchGetOnPremisesInstancesOutput) { - op := &request.Operation{ - Name: opBatchGetOnPremisesInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetOnPremisesInstancesInput{} - } - - output = &BatchGetOnPremisesInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetOnPremisesInstances API operation for AWS CodeDeploy. -// -// Gets information about one or more on-premises instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation BatchGetOnPremisesInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInstanceNameRequiredException "InstanceNameRequiredException" -// An on-premises instance name was not specified. -// -// * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The on-premises instance name was specified in an invalid format. -// -// * ErrCodeBatchLimitExceededException "BatchLimitExceededException" -// The maximum number of names or IDs allowed for this request (100) was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetOnPremisesInstances -func (c *CodeDeploy) BatchGetOnPremisesInstances(input *BatchGetOnPremisesInstancesInput) (*BatchGetOnPremisesInstancesOutput, error) { - req, out := c.BatchGetOnPremisesInstancesRequest(input) - return out, req.Send() -} - -// BatchGetOnPremisesInstancesWithContext is the same as BatchGetOnPremisesInstances with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetOnPremisesInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) BatchGetOnPremisesInstancesWithContext(ctx aws.Context, input *BatchGetOnPremisesInstancesInput, opts ...request.Option) (*BatchGetOnPremisesInstancesOutput, error) { - req, out := c.BatchGetOnPremisesInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opContinueDeployment = "ContinueDeployment" - -// ContinueDeploymentRequest generates a "aws/request.Request" representing the -// client's request for the ContinueDeployment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ContinueDeployment for more information on using the ContinueDeployment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ContinueDeploymentRequest method. -// req, resp := client.ContinueDeploymentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ContinueDeployment -func (c *CodeDeploy) ContinueDeploymentRequest(input *ContinueDeploymentInput) (req *request.Request, output *ContinueDeploymentOutput) { - op := &request.Operation{ - Name: opContinueDeployment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ContinueDeploymentInput{} - } - - output = &ContinueDeploymentOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ContinueDeployment API operation for AWS CodeDeploy. -// -// For a blue/green deployment, starts the process of rerouting traffic from -// instances in the original environment to instances in the replacement environment -// without waiting for a specified wait time to elapse. (Traffic rerouting, -// which is achieved by registering instances in the replacement environment -// with the load balancer, can start as soon as all instances have a status -// of Ready.) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation ContinueDeployment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" -// At least one deployment ID must be specified. -// -// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment with the IAM user or AWS account does not exist. -// -// * ErrCodeDeploymentAlreadyCompletedException "DeploymentAlreadyCompletedException" -// The deployment is already complete. -// -// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" -// At least one of the deployment IDs was specified in an invalid format. -// -// * ErrCodeDeploymentIsNotInReadyStateException "DeploymentIsNotInReadyStateException" -// The deployment does not have a status of Ready and can't continue yet. -// -// * ErrCodeUnsupportedActionForDeploymentTypeException "UnsupportedActionForDeploymentTypeException" -// A call was submitted that is not supported for the specified deployment type. -// -// * ErrCodeInvalidDeploymentWaitTypeException "InvalidDeploymentWaitTypeException" -// The wait type is invalid. -// -// * ErrCodeInvalidDeploymentStatusException "InvalidDeploymentStatusException" -// The specified deployment status doesn't exist or cannot be determined. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ContinueDeployment -func (c *CodeDeploy) ContinueDeployment(input *ContinueDeploymentInput) (*ContinueDeploymentOutput, error) { - req, out := c.ContinueDeploymentRequest(input) - return out, req.Send() -} - -// ContinueDeploymentWithContext is the same as ContinueDeployment with the addition of -// the ability to pass a context and additional request options. -// -// See ContinueDeployment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) ContinueDeploymentWithContext(ctx aws.Context, input *ContinueDeploymentInput, opts ...request.Option) (*ContinueDeploymentOutput, error) { - req, out := c.ContinueDeploymentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateApplication = "CreateApplication" - -// CreateApplicationRequest generates a "aws/request.Request" representing the -// client's request for the CreateApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateApplication for more information on using the CreateApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateApplicationRequest method. -// req, resp := client.CreateApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/CreateApplication -func (c *CodeDeploy) CreateApplicationRequest(input *CreateApplicationInput) (req *request.Request, output *CreateApplicationOutput) { - op := &request.Operation{ - Name: opCreateApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateApplicationInput{} - } - - output = &CreateApplicationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateApplication API operation for AWS CodeDeploy. -// -// Creates an application. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation CreateApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeApplicationAlreadyExistsException "ApplicationAlreadyExistsException" -// An application with the specified name with the IAM user or AWS account already -// exists. -// -// * ErrCodeApplicationLimitExceededException "ApplicationLimitExceededException" -// More applications were attempted to be created than are allowed. -// -// * ErrCodeInvalidComputePlatformException "InvalidComputePlatformException" -// The computePlatform is invalid. The computePlatform should be Lambda or Server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/CreateApplication -func (c *CodeDeploy) CreateApplication(input *CreateApplicationInput) (*CreateApplicationOutput, error) { - req, out := c.CreateApplicationRequest(input) - return out, req.Send() -} - -// CreateApplicationWithContext is the same as CreateApplication with the addition of -// the ability to pass a context and additional request options. -// -// See CreateApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) CreateApplicationWithContext(ctx aws.Context, input *CreateApplicationInput, opts ...request.Option) (*CreateApplicationOutput, error) { - req, out := c.CreateApplicationRequest(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/codedeploy-2014-10-06/CreateDeployment -func (c *CodeDeploy) CreateDeploymentRequest(input *CreateDeploymentInput) (req *request.Request, output *CreateDeploymentOutput) { - op := &request.Operation{ - Name: opCreateDeployment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDeploymentInput{} - } - - output = &CreateDeploymentOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDeployment API operation for AWS CodeDeploy. -// -// Deploys an application revision through the specified deployment 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 CodeDeploy's -// API operation CreateDeployment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the IAM user or AWS account. -// -// * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" -// The deployment group name was not specified. -// -// * ErrCodeInvalidDeploymentGroupNameException "InvalidDeploymentGroupNameException" -// The deployment group name was specified in an invalid format. -// -// * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" -// The named deployment group with the IAM user or AWS account does not exist. -// -// * ErrCodeRevisionRequiredException "RevisionRequiredException" -// The revision ID was not specified. -// -// * ErrCodeRevisionDoesNotExistException "RevisionDoesNotExistException" -// The named revision does not exist with the IAM user or AWS account. -// -// * ErrCodeInvalidRevisionException "InvalidRevisionException" -// The revision was specified in an invalid format. -// -// * ErrCodeInvalidDeploymentConfigNameException "InvalidDeploymentConfigNameException" -// The deployment configuration name was specified in an invalid format. -// -// * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the IAM user or AWS account. -// -// * ErrCodeDescriptionTooLongException "DescriptionTooLongException" -// The description is too long. -// -// * ErrCodeDeploymentLimitExceededException "DeploymentLimitExceededException" -// The number of allowed deployments was exceeded. -// -// * ErrCodeInvalidTargetInstancesException "InvalidTargetInstancesException" -// The target instance configuration is invalid. Possible causes include: -// -// * Configuration data for target instances was entered for an in-place -// deployment. -// -// * The limit of 10 tags for a tag type was exceeded. -// -// * The combined length of the tag names exceeded the limit. -// -// * A specified tag is not currently applied to any instances. -// -// * ErrCodeInvalidAutoRollbackConfigException "InvalidAutoRollbackConfigException" -// The automatic rollback configuration was specified in an invalid format. -// For example, automatic rollback is enabled, but an invalid triggering event -// type or no event types were listed. -// -// * ErrCodeInvalidLoadBalancerInfoException "InvalidLoadBalancerInfoException" -// An invalid load balancer name, or no load balancer name, was specified. -// -// * ErrCodeInvalidFileExistsBehaviorException "InvalidFileExistsBehaviorException" -// An invalid fileExistsBehavior option was specified to determine how AWS CodeDeploy -// handles files or directories that already exist in a deployment target location, -// but weren't part of the previous successful deployment. Valid values include -// "DISALLOW," "OVERWRITE," and "RETAIN." -// -// * ErrCodeInvalidRoleException "InvalidRoleException" -// The service role ARN was specified in an invalid format. Or, if an Auto Scaling -// group was specified, the specified service role does not grant the appropriate -// permissions to Amazon EC2 Auto Scaling. -// -// * ErrCodeInvalidAutoScalingGroupException "InvalidAutoScalingGroupException" -// The Auto Scaling group was specified in an invalid format or does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// An API function was called too frequently. -// -// * ErrCodeInvalidUpdateOutdatedInstancesOnlyValueException "InvalidUpdateOutdatedInstancesOnlyValueException" -// The UpdateOutdatedInstancesOnly value is invalid. For AWS Lambda deployments, -// false is expected. For EC2/On-premises deployments, true or false is expected. -// -// * ErrCodeInvalidIgnoreApplicationStopFailuresValueException "InvalidIgnoreApplicationStopFailuresValueException" -// The IgnoreApplicationStopFailures value is invalid. For AWS Lambda deployments, -// false is expected. For EC2/On-premises deployments, true or false is expected. -// -// * ErrCodeInvalidGitHubAccountTokenException "InvalidGitHubAccountTokenException" -// The GitHub token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/CreateDeployment -func (c *CodeDeploy) CreateDeployment(input *CreateDeploymentInput) (*CreateDeploymentOutput, error) { - req, out := c.CreateDeploymentRequest(input) - 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 *CodeDeploy) 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 opCreateDeploymentConfig = "CreateDeploymentConfig" - -// CreateDeploymentConfigRequest generates a "aws/request.Request" representing the -// client's request for the CreateDeploymentConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDeploymentConfig for more information on using the CreateDeploymentConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDeploymentConfigRequest method. -// req, resp := client.CreateDeploymentConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/CreateDeploymentConfig -func (c *CodeDeploy) CreateDeploymentConfigRequest(input *CreateDeploymentConfigInput) (req *request.Request, output *CreateDeploymentConfigOutput) { - op := &request.Operation{ - Name: opCreateDeploymentConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDeploymentConfigInput{} - } - - output = &CreateDeploymentConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDeploymentConfig API operation for AWS CodeDeploy. -// -// Creates a deployment configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation CreateDeploymentConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDeploymentConfigNameException "InvalidDeploymentConfigNameException" -// The deployment configuration name was specified in an invalid format. -// -// * ErrCodeDeploymentConfigNameRequiredException "DeploymentConfigNameRequiredException" -// The deployment configuration name was not specified. -// -// * ErrCodeDeploymentConfigAlreadyExistsException "DeploymentConfigAlreadyExistsException" -// A deployment configuration with the specified name with the IAM user or AWS -// account already exists . -// -// * ErrCodeInvalidMinimumHealthyHostValueException "InvalidMinimumHealthyHostValueException" -// The minimum healthy instance value was specified in an invalid format. -// -// * ErrCodeDeploymentConfigLimitExceededException "DeploymentConfigLimitExceededException" -// The deployment configurations limit was exceeded. -// -// * ErrCodeInvalidComputePlatformException "InvalidComputePlatformException" -// The computePlatform is invalid. The computePlatform should be Lambda or Server. -// -// * ErrCodeInvalidTrafficRoutingConfigurationException "InvalidTrafficRoutingConfigurationException" -// The configuration that specifies how traffic is routed during a deployment -// is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/CreateDeploymentConfig -func (c *CodeDeploy) CreateDeploymentConfig(input *CreateDeploymentConfigInput) (*CreateDeploymentConfigOutput, error) { - req, out := c.CreateDeploymentConfigRequest(input) - return out, req.Send() -} - -// CreateDeploymentConfigWithContext is the same as CreateDeploymentConfig with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDeploymentConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) CreateDeploymentConfigWithContext(ctx aws.Context, input *CreateDeploymentConfigInput, opts ...request.Option) (*CreateDeploymentConfigOutput, error) { - req, out := c.CreateDeploymentConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDeploymentGroup = "CreateDeploymentGroup" - -// CreateDeploymentGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateDeploymentGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDeploymentGroup for more information on using the CreateDeploymentGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDeploymentGroupRequest method. -// req, resp := client.CreateDeploymentGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/CreateDeploymentGroup -func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupInput) (req *request.Request, output *CreateDeploymentGroupOutput) { - op := &request.Operation{ - Name: opCreateDeploymentGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDeploymentGroupInput{} - } - - output = &CreateDeploymentGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDeploymentGroup API operation for AWS CodeDeploy. -// -// Creates a deployment group to which application revisions are deployed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation CreateDeploymentGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the IAM user or AWS account. -// -// * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" -// The deployment group name was not specified. -// -// * ErrCodeInvalidDeploymentGroupNameException "InvalidDeploymentGroupNameException" -// The deployment group name was specified in an invalid format. -// -// * ErrCodeDeploymentGroupAlreadyExistsException "DeploymentGroupAlreadyExistsException" -// A deployment group with the specified name with the IAM user or AWS account -// already exists. -// -// * ErrCodeInvalidEC2TagException "InvalidEC2TagException" -// The tag was specified in an invalid format. -// -// * ErrCodeInvalidTagException "InvalidTagException" -// The tag was specified in an invalid format. -// -// * ErrCodeInvalidAutoScalingGroupException "InvalidAutoScalingGroupException" -// The Auto Scaling group was specified in an invalid format or does not exist. -// -// * ErrCodeInvalidDeploymentConfigNameException "InvalidDeploymentConfigNameException" -// The deployment configuration name was specified in an invalid format. -// -// * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the IAM user or AWS account. -// -// * ErrCodeRoleRequiredException "RoleRequiredException" -// The role ID was not specified. -// -// * ErrCodeInvalidRoleException "InvalidRoleException" -// The service role ARN was specified in an invalid format. Or, if an Auto Scaling -// group was specified, the specified service role does not grant the appropriate -// permissions to Amazon EC2 Auto Scaling. -// -// * ErrCodeDeploymentGroupLimitExceededException "DeploymentGroupLimitExceededException" -// The deployment groups limit was exceeded. -// -// * ErrCodeLifecycleHookLimitExceededException "LifecycleHookLimitExceededException" -// The limit for lifecycle hooks was exceeded. -// -// * ErrCodeInvalidTriggerConfigException "InvalidTriggerConfigException" -// The trigger was specified in an invalid format. -// -// * ErrCodeTriggerTargetsLimitExceededException "TriggerTargetsLimitExceededException" -// The maximum allowed number of triggers was exceeded. -// -// * ErrCodeInvalidAlarmConfigException "InvalidAlarmConfigException" -// The format of the alarm configuration is invalid. Possible causes include: -// -// * The alarm list is null. -// -// * The alarm object is null. -// -// * The alarm name is empty or null or exceeds the limit of 255 characters. -// -// * Two alarms with the same name have been specified. -// -// * The alarm configuration is enabled, but the alarm list is empty. -// -// * ErrCodeAlarmsLimitExceededException "AlarmsLimitExceededException" -// The maximum number of alarms for a deployment group (10) was exceeded. -// -// * ErrCodeInvalidAutoRollbackConfigException "InvalidAutoRollbackConfigException" -// The automatic rollback configuration was specified in an invalid format. -// For example, automatic rollback is enabled, but an invalid triggering event -// type or no event types were listed. -// -// * ErrCodeInvalidLoadBalancerInfoException "InvalidLoadBalancerInfoException" -// An invalid load balancer name, or no load balancer name, was specified. -// -// * ErrCodeInvalidDeploymentStyleException "InvalidDeploymentStyleException" -// An invalid deployment style was specified. Valid deployment types include -// "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" -// and "WITHOUT_TRAFFIC_CONTROL." -// -// * ErrCodeInvalidBlueGreenDeploymentConfigurationException "InvalidBlueGreenDeploymentConfigurationException" -// The configuration for the blue/green deployment group was provided in an -// invalid format. For information about deployment configuration format, see -// CreateDeploymentConfig. -// -// * ErrCodeInvalidEC2TagCombinationException "InvalidEC2TagCombinationException" -// A call was submitted that specified both Ec2TagFilters and Ec2TagSet, but -// only one of these data types can be used in a single call. -// -// * ErrCodeInvalidOnPremisesTagCombinationException "InvalidOnPremisesTagCombinationException" -// A call was submitted that specified both OnPremisesTagFilters and OnPremisesTagSet, -// but only one of these data types can be used in a single call. -// -// * ErrCodeTagSetListLimitExceededException "TagSetListLimitExceededException" -// The number of tag groups included in the tag set list exceeded the maximum -// allowed limit of 3. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input was specified in an invalid format. -// -// * ErrCodeThrottlingException "ThrottlingException" -// An API function was called too frequently. -// -// * ErrCodeInvalidECSServiceException "InvalidECSServiceException" -// The Amazon ECS service identifier is not valid. -// -// * ErrCodeInvalidTargetGroupPairException "InvalidTargetGroupPairException" -// A target group pair associated with this deployment is not valid. -// -// * ErrCodeECSServiceMappingLimitExceededException "ECSServiceMappingLimitExceededException" -// The Amazon ECS service is associated with more than one deployment groups. -// An Amazon ECS service can be associated with only one deployment group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/CreateDeploymentGroup -func (c *CodeDeploy) CreateDeploymentGroup(input *CreateDeploymentGroupInput) (*CreateDeploymentGroupOutput, error) { - req, out := c.CreateDeploymentGroupRequest(input) - return out, req.Send() -} - -// CreateDeploymentGroupWithContext is the same as CreateDeploymentGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDeploymentGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) CreateDeploymentGroupWithContext(ctx aws.Context, input *CreateDeploymentGroupInput, opts ...request.Option) (*CreateDeploymentGroupOutput, error) { - req, out := c.CreateDeploymentGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApplication = "DeleteApplication" - -// DeleteApplicationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApplication for more information on using the DeleteApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApplicationRequest method. -// req, resp := client.DeleteApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeleteApplication -func (c *CodeDeploy) DeleteApplicationRequest(input *DeleteApplicationInput) (req *request.Request, output *DeleteApplicationOutput) { - op := &request.Operation{ - Name: opDeleteApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteApplicationInput{} - } - - output = &DeleteApplicationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteApplication API operation for AWS CodeDeploy. -// -// Deletes an application. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation DeleteApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeleteApplication -func (c *CodeDeploy) DeleteApplication(input *DeleteApplicationInput) (*DeleteApplicationOutput, error) { - req, out := c.DeleteApplicationRequest(input) - return out, req.Send() -} - -// DeleteApplicationWithContext is the same as DeleteApplication with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) DeleteApplicationWithContext(ctx aws.Context, input *DeleteApplicationInput, opts ...request.Option) (*DeleteApplicationOutput, error) { - req, out := c.DeleteApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDeploymentConfig = "DeleteDeploymentConfig" - -// DeleteDeploymentConfigRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDeploymentConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDeploymentConfig for more information on using the DeleteDeploymentConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDeploymentConfigRequest method. -// req, resp := client.DeleteDeploymentConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeleteDeploymentConfig -func (c *CodeDeploy) DeleteDeploymentConfigRequest(input *DeleteDeploymentConfigInput) (req *request.Request, output *DeleteDeploymentConfigOutput) { - op := &request.Operation{ - Name: opDeleteDeploymentConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDeploymentConfigInput{} - } - - output = &DeleteDeploymentConfigOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDeploymentConfig API operation for AWS CodeDeploy. -// -// Deletes a deployment configuration. -// -// A deployment configuration cannot be deleted if it is currently in use. Predefined -// configurations cannot be deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation DeleteDeploymentConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDeploymentConfigNameException "InvalidDeploymentConfigNameException" -// The deployment configuration name was specified in an invalid format. -// -// * ErrCodeDeploymentConfigNameRequiredException "DeploymentConfigNameRequiredException" -// The deployment configuration name was not specified. -// -// * ErrCodeDeploymentConfigInUseException "DeploymentConfigInUseException" -// The deployment configuration is still in use. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// An invalid operation was detected. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeleteDeploymentConfig -func (c *CodeDeploy) DeleteDeploymentConfig(input *DeleteDeploymentConfigInput) (*DeleteDeploymentConfigOutput, error) { - req, out := c.DeleteDeploymentConfigRequest(input) - return out, req.Send() -} - -// DeleteDeploymentConfigWithContext is the same as DeleteDeploymentConfig with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDeploymentConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) DeleteDeploymentConfigWithContext(ctx aws.Context, input *DeleteDeploymentConfigInput, opts ...request.Option) (*DeleteDeploymentConfigOutput, error) { - req, out := c.DeleteDeploymentConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDeploymentGroup = "DeleteDeploymentGroup" - -// DeleteDeploymentGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDeploymentGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDeploymentGroup for more information on using the DeleteDeploymentGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDeploymentGroupRequest method. -// req, resp := client.DeleteDeploymentGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeleteDeploymentGroup -func (c *CodeDeploy) DeleteDeploymentGroupRequest(input *DeleteDeploymentGroupInput) (req *request.Request, output *DeleteDeploymentGroupOutput) { - op := &request.Operation{ - Name: opDeleteDeploymentGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDeploymentGroupInput{} - } - - output = &DeleteDeploymentGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDeploymentGroup API operation for AWS CodeDeploy. -// -// Deletes a deployment 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 CodeDeploy's -// API operation DeleteDeploymentGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" -// The deployment group name was not specified. -// -// * ErrCodeInvalidDeploymentGroupNameException "InvalidDeploymentGroupNameException" -// The deployment group name was specified in an invalid format. -// -// * ErrCodeInvalidRoleException "InvalidRoleException" -// The service role ARN was specified in an invalid format. Or, if an Auto Scaling -// group was specified, the specified service role does not grant the appropriate -// permissions to Amazon EC2 Auto Scaling. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeleteDeploymentGroup -func (c *CodeDeploy) DeleteDeploymentGroup(input *DeleteDeploymentGroupInput) (*DeleteDeploymentGroupOutput, error) { - req, out := c.DeleteDeploymentGroupRequest(input) - return out, req.Send() -} - -// DeleteDeploymentGroupWithContext is the same as DeleteDeploymentGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDeploymentGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) DeleteDeploymentGroupWithContext(ctx aws.Context, input *DeleteDeploymentGroupInput, opts ...request.Option) (*DeleteDeploymentGroupOutput, error) { - req, out := c.DeleteDeploymentGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteGitHubAccountToken = "DeleteGitHubAccountToken" - -// DeleteGitHubAccountTokenRequest generates a "aws/request.Request" representing the -// client's request for the DeleteGitHubAccountToken operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteGitHubAccountToken for more information on using the DeleteGitHubAccountToken -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteGitHubAccountTokenRequest method. -// req, resp := client.DeleteGitHubAccountTokenRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeleteGitHubAccountToken -func (c *CodeDeploy) DeleteGitHubAccountTokenRequest(input *DeleteGitHubAccountTokenInput) (req *request.Request, output *DeleteGitHubAccountTokenOutput) { - op := &request.Operation{ - Name: opDeleteGitHubAccountToken, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteGitHubAccountTokenInput{} - } - - output = &DeleteGitHubAccountTokenOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteGitHubAccountToken API operation for AWS CodeDeploy. -// -// Deletes a GitHub account connection. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation DeleteGitHubAccountToken for usage and error information. -// -// Returned Error Codes: -// * ErrCodeGitHubAccountTokenNameRequiredException "GitHubAccountTokenNameRequiredException" -// The call is missing a required GitHub account connection name. -// -// * ErrCodeGitHubAccountTokenDoesNotExistException "GitHubAccountTokenDoesNotExistException" -// No GitHub account connection exists with the named specified in the call. -// -// * ErrCodeInvalidGitHubAccountTokenNameException "InvalidGitHubAccountTokenNameException" -// The format of the specified GitHub account connection name is invalid. -// -// * ErrCodeResourceValidationException "ResourceValidationException" -// The specified resource could not be validated. -// -// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" -// The API used does not support the deployment. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeleteGitHubAccountToken -func (c *CodeDeploy) DeleteGitHubAccountToken(input *DeleteGitHubAccountTokenInput) (*DeleteGitHubAccountTokenOutput, error) { - req, out := c.DeleteGitHubAccountTokenRequest(input) - return out, req.Send() -} - -// DeleteGitHubAccountTokenWithContext is the same as DeleteGitHubAccountToken with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteGitHubAccountToken for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) DeleteGitHubAccountTokenWithContext(ctx aws.Context, input *DeleteGitHubAccountTokenInput, opts ...request.Option) (*DeleteGitHubAccountTokenOutput, error) { - req, out := c.DeleteGitHubAccountTokenRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterOnPremisesInstance = "DeregisterOnPremisesInstance" - -// DeregisterOnPremisesInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterOnPremisesInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterOnPremisesInstance for more information on using the DeregisterOnPremisesInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterOnPremisesInstanceRequest method. -// req, resp := client.DeregisterOnPremisesInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeregisterOnPremisesInstance -func (c *CodeDeploy) DeregisterOnPremisesInstanceRequest(input *DeregisterOnPremisesInstanceInput) (req *request.Request, output *DeregisterOnPremisesInstanceOutput) { - op := &request.Operation{ - Name: opDeregisterOnPremisesInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterOnPremisesInstanceInput{} - } - - output = &DeregisterOnPremisesInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterOnPremisesInstance API operation for AWS CodeDeploy. -// -// Deregisters an on-premises instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation DeregisterOnPremisesInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInstanceNameRequiredException "InstanceNameRequiredException" -// An on-premises instance name was not specified. -// -// * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The on-premises instance name was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeregisterOnPremisesInstance -func (c *CodeDeploy) DeregisterOnPremisesInstance(input *DeregisterOnPremisesInstanceInput) (*DeregisterOnPremisesInstanceOutput, error) { - req, out := c.DeregisterOnPremisesInstanceRequest(input) - return out, req.Send() -} - -// DeregisterOnPremisesInstanceWithContext is the same as DeregisterOnPremisesInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterOnPremisesInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) DeregisterOnPremisesInstanceWithContext(ctx aws.Context, input *DeregisterOnPremisesInstanceInput, opts ...request.Option) (*DeregisterOnPremisesInstanceOutput, error) { - req, out := c.DeregisterOnPremisesInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApplication = "GetApplication" - -// GetApplicationRequest generates a "aws/request.Request" representing the -// client's request for the GetApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApplication for more information on using the GetApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApplicationRequest method. -// req, resp := client.GetApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetApplication -func (c *CodeDeploy) GetApplicationRequest(input *GetApplicationInput) (req *request.Request, output *GetApplicationOutput) { - op := &request.Operation{ - Name: opGetApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetApplicationInput{} - } - - output = &GetApplicationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApplication API operation for AWS CodeDeploy. -// -// Gets information about an application. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation GetApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the IAM user or AWS account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetApplication -func (c *CodeDeploy) GetApplication(input *GetApplicationInput) (*GetApplicationOutput, error) { - req, out := c.GetApplicationRequest(input) - return out, req.Send() -} - -// GetApplicationWithContext is the same as GetApplication with the addition of -// the ability to pass a context and additional request options. -// -// See GetApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) GetApplicationWithContext(ctx aws.Context, input *GetApplicationInput, opts ...request.Option) (*GetApplicationOutput, error) { - req, out := c.GetApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApplicationRevision = "GetApplicationRevision" - -// GetApplicationRevisionRequest generates a "aws/request.Request" representing the -// client's request for the GetApplicationRevision operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApplicationRevision for more information on using the GetApplicationRevision -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApplicationRevisionRequest method. -// req, resp := client.GetApplicationRevisionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetApplicationRevision -func (c *CodeDeploy) GetApplicationRevisionRequest(input *GetApplicationRevisionInput) (req *request.Request, output *GetApplicationRevisionOutput) { - op := &request.Operation{ - Name: opGetApplicationRevision, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetApplicationRevisionInput{} - } - - output = &GetApplicationRevisionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApplicationRevision API operation for AWS CodeDeploy. -// -// Gets information about an application revision. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation GetApplicationRevision for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the IAM user or AWS account. -// -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeRevisionDoesNotExistException "RevisionDoesNotExistException" -// The named revision does not exist with the IAM user or AWS account. -// -// * ErrCodeRevisionRequiredException "RevisionRequiredException" -// The revision ID was not specified. -// -// * ErrCodeInvalidRevisionException "InvalidRevisionException" -// The revision was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetApplicationRevision -func (c *CodeDeploy) GetApplicationRevision(input *GetApplicationRevisionInput) (*GetApplicationRevisionOutput, error) { - req, out := c.GetApplicationRevisionRequest(input) - return out, req.Send() -} - -// GetApplicationRevisionWithContext is the same as GetApplicationRevision with the addition of -// the ability to pass a context and additional request options. -// -// See GetApplicationRevision for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) GetApplicationRevisionWithContext(ctx aws.Context, input *GetApplicationRevisionInput, opts ...request.Option) (*GetApplicationRevisionOutput, error) { - req, out := c.GetApplicationRevisionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDeployment = "GetDeployment" - -// GetDeploymentRequest generates a "aws/request.Request" representing the -// client's request for the GetDeployment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDeployment for more information on using the GetDeployment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDeploymentRequest method. -// req, resp := client.GetDeploymentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeployment -func (c *CodeDeploy) GetDeploymentRequest(input *GetDeploymentInput) (req *request.Request, output *GetDeploymentOutput) { - op := &request.Operation{ - Name: opGetDeployment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDeploymentInput{} - } - - output = &GetDeploymentOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDeployment API operation for AWS CodeDeploy. -// -// Gets information about 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 CodeDeploy's -// API operation GetDeployment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" -// At least one deployment ID must be specified. -// -// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" -// At least one of the deployment IDs was specified in an invalid format. -// -// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment with the IAM user or AWS account does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeployment -func (c *CodeDeploy) GetDeployment(input *GetDeploymentInput) (*GetDeploymentOutput, error) { - req, out := c.GetDeploymentRequest(input) - return out, req.Send() -} - -// GetDeploymentWithContext is the same as GetDeployment with the addition of -// the ability to pass a context and additional request options. -// -// See GetDeployment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) GetDeploymentWithContext(ctx aws.Context, input *GetDeploymentInput, opts ...request.Option) (*GetDeploymentOutput, error) { - req, out := c.GetDeploymentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDeploymentConfig = "GetDeploymentConfig" - -// GetDeploymentConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetDeploymentConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDeploymentConfig for more information on using the GetDeploymentConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDeploymentConfigRequest method. -// req, resp := client.GetDeploymentConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentConfig -func (c *CodeDeploy) GetDeploymentConfigRequest(input *GetDeploymentConfigInput) (req *request.Request, output *GetDeploymentConfigOutput) { - op := &request.Operation{ - Name: opGetDeploymentConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDeploymentConfigInput{} - } - - output = &GetDeploymentConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDeploymentConfig API operation for AWS CodeDeploy. -// -// Gets information about a deployment configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation GetDeploymentConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDeploymentConfigNameException "InvalidDeploymentConfigNameException" -// The deployment configuration name was specified in an invalid format. -// -// * ErrCodeDeploymentConfigNameRequiredException "DeploymentConfigNameRequiredException" -// The deployment configuration name was not specified. -// -// * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the IAM user or AWS account. -// -// * ErrCodeInvalidComputePlatformException "InvalidComputePlatformException" -// The computePlatform is invalid. The computePlatform should be Lambda or Server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentConfig -func (c *CodeDeploy) GetDeploymentConfig(input *GetDeploymentConfigInput) (*GetDeploymentConfigOutput, error) { - req, out := c.GetDeploymentConfigRequest(input) - return out, req.Send() -} - -// GetDeploymentConfigWithContext is the same as GetDeploymentConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetDeploymentConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) GetDeploymentConfigWithContext(ctx aws.Context, input *GetDeploymentConfigInput, opts ...request.Option) (*GetDeploymentConfigOutput, error) { - req, out := c.GetDeploymentConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDeploymentGroup = "GetDeploymentGroup" - -// GetDeploymentGroupRequest generates a "aws/request.Request" representing the -// client's request for the GetDeploymentGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDeploymentGroup for more information on using the GetDeploymentGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDeploymentGroupRequest method. -// req, resp := client.GetDeploymentGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentGroup -func (c *CodeDeploy) GetDeploymentGroupRequest(input *GetDeploymentGroupInput) (req *request.Request, output *GetDeploymentGroupOutput) { - op := &request.Operation{ - Name: opGetDeploymentGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDeploymentGroupInput{} - } - - output = &GetDeploymentGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDeploymentGroup API operation for AWS CodeDeploy. -// -// Gets information about a deployment 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 CodeDeploy's -// API operation GetDeploymentGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the IAM user or AWS account. -// -// * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" -// The deployment group name was not specified. -// -// * ErrCodeInvalidDeploymentGroupNameException "InvalidDeploymentGroupNameException" -// The deployment group name was specified in an invalid format. -// -// * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" -// The named deployment group with the IAM user or AWS account does not exist. -// -// * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the IAM user or AWS account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentGroup -func (c *CodeDeploy) GetDeploymentGroup(input *GetDeploymentGroupInput) (*GetDeploymentGroupOutput, error) { - req, out := c.GetDeploymentGroupRequest(input) - return out, req.Send() -} - -// GetDeploymentGroupWithContext is the same as GetDeploymentGroup with the addition of -// the ability to pass a context and additional request options. -// -// See GetDeploymentGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) GetDeploymentGroupWithContext(ctx aws.Context, input *GetDeploymentGroupInput, opts ...request.Option) (*GetDeploymentGroupOutput, error) { - req, out := c.GetDeploymentGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDeploymentInstance = "GetDeploymentInstance" - -// GetDeploymentInstanceRequest generates a "aws/request.Request" representing the -// client's request for the GetDeploymentInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDeploymentInstance for more information on using the GetDeploymentInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDeploymentInstanceRequest method. -// req, resp := client.GetDeploymentInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentInstance -// -// Deprecated: This operation is deprecated, use GetDeploymentTarget instead. -func (c *CodeDeploy) GetDeploymentInstanceRequest(input *GetDeploymentInstanceInput) (req *request.Request, output *GetDeploymentInstanceOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, GetDeploymentInstance, has been deprecated") - } - op := &request.Operation{ - Name: opGetDeploymentInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDeploymentInstanceInput{} - } - - output = &GetDeploymentInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDeploymentInstance API operation for AWS CodeDeploy. -// -// Gets information about an instance as part 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 CodeDeploy's -// API operation GetDeploymentInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" -// At least one deployment ID must be specified. -// -// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment with the IAM user or AWS account does not exist. -// -// * ErrCodeInstanceIdRequiredException "InstanceIdRequiredException" -// The instance ID was not specified. -// -// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" -// At least one of the deployment IDs was specified in an invalid format. -// -// * ErrCodeInstanceDoesNotExistException "InstanceDoesNotExistException" -// The specified instance does not exist in the deployment group. -// -// * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The on-premises instance name was specified in an invalid format. -// -// * ErrCodeInvalidComputePlatformException "InvalidComputePlatformException" -// The computePlatform is invalid. The computePlatform should be Lambda or Server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentInstance -// -// Deprecated: This operation is deprecated, use GetDeploymentTarget instead. -func (c *CodeDeploy) GetDeploymentInstance(input *GetDeploymentInstanceInput) (*GetDeploymentInstanceOutput, error) { - req, out := c.GetDeploymentInstanceRequest(input) - return out, req.Send() -} - -// GetDeploymentInstanceWithContext is the same as GetDeploymentInstance with the addition of -// the ability to pass a context and additional request options. -// -// See GetDeploymentInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: This operation is deprecated, use GetDeploymentTarget instead. -func (c *CodeDeploy) GetDeploymentInstanceWithContext(ctx aws.Context, input *GetDeploymentInstanceInput, opts ...request.Option) (*GetDeploymentInstanceOutput, error) { - req, out := c.GetDeploymentInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDeploymentTarget = "GetDeploymentTarget" - -// GetDeploymentTargetRequest generates a "aws/request.Request" representing the -// client's request for the GetDeploymentTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDeploymentTarget for more information on using the GetDeploymentTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDeploymentTargetRequest method. -// req, resp := client.GetDeploymentTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentTarget -func (c *CodeDeploy) GetDeploymentTargetRequest(input *GetDeploymentTargetInput) (req *request.Request, output *GetDeploymentTargetOutput) { - op := &request.Operation{ - Name: opGetDeploymentTarget, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDeploymentTargetInput{} - } - - output = &GetDeploymentTargetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDeploymentTarget API operation for AWS CodeDeploy. -// -// Returns information about a deployment target. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation GetDeploymentTarget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" -// At least one of the deployment IDs was specified in an invalid format. -// -// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" -// At least one deployment ID must be specified. -// -// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment with the IAM user or AWS account does not exist. -// -// * ErrCodeDeploymentTargetIdRequiredException "DeploymentTargetIdRequiredException" -// A deployment target ID was not provided. -// -// * ErrCodeInvalidDeploymentTargetIdException "InvalidDeploymentTargetIdException" -// The target ID provided was not valid. -// -// * ErrCodeDeploymentTargetDoesNotExistException "DeploymentTargetDoesNotExistException" -// The provided target ID does not belong to the attempted deployment. -// -// * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The on-premises instance name was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentTarget -func (c *CodeDeploy) GetDeploymentTarget(input *GetDeploymentTargetInput) (*GetDeploymentTargetOutput, error) { - req, out := c.GetDeploymentTargetRequest(input) - return out, req.Send() -} - -// GetDeploymentTargetWithContext is the same as GetDeploymentTarget with the addition of -// the ability to pass a context and additional request options. -// -// See GetDeploymentTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) GetDeploymentTargetWithContext(ctx aws.Context, input *GetDeploymentTargetInput, opts ...request.Option) (*GetDeploymentTargetOutput, error) { - req, out := c.GetDeploymentTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOnPremisesInstance = "GetOnPremisesInstance" - -// GetOnPremisesInstanceRequest generates a "aws/request.Request" representing the -// client's request for the GetOnPremisesInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetOnPremisesInstance for more information on using the GetOnPremisesInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetOnPremisesInstanceRequest method. -// req, resp := client.GetOnPremisesInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetOnPremisesInstance -func (c *CodeDeploy) GetOnPremisesInstanceRequest(input *GetOnPremisesInstanceInput) (req *request.Request, output *GetOnPremisesInstanceOutput) { - op := &request.Operation{ - Name: opGetOnPremisesInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetOnPremisesInstanceInput{} - } - - output = &GetOnPremisesInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOnPremisesInstance API operation for AWS CodeDeploy. -// -// Gets information about an on-premises instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation GetOnPremisesInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInstanceNameRequiredException "InstanceNameRequiredException" -// An on-premises instance name was not specified. -// -// * ErrCodeInstanceNotRegisteredException "InstanceNotRegisteredException" -// The specified on-premises instance is not registered. -// -// * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The on-premises instance name was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetOnPremisesInstance -func (c *CodeDeploy) GetOnPremisesInstance(input *GetOnPremisesInstanceInput) (*GetOnPremisesInstanceOutput, error) { - req, out := c.GetOnPremisesInstanceRequest(input) - return out, req.Send() -} - -// GetOnPremisesInstanceWithContext is the same as GetOnPremisesInstance with the addition of -// the ability to pass a context and additional request options. -// -// See GetOnPremisesInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) GetOnPremisesInstanceWithContext(ctx aws.Context, input *GetOnPremisesInstanceInput, opts ...request.Option) (*GetOnPremisesInstanceOutput, error) { - req, out := c.GetOnPremisesInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListApplicationRevisions = "ListApplicationRevisions" - -// ListApplicationRevisionsRequest generates a "aws/request.Request" representing the -// client's request for the ListApplicationRevisions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListApplicationRevisions for more information on using the ListApplicationRevisions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListApplicationRevisionsRequest method. -// req, resp := client.ListApplicationRevisionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListApplicationRevisions -func (c *CodeDeploy) ListApplicationRevisionsRequest(input *ListApplicationRevisionsInput) (req *request.Request, output *ListApplicationRevisionsOutput) { - op := &request.Operation{ - Name: opListApplicationRevisions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListApplicationRevisionsInput{} - } - - output = &ListApplicationRevisionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListApplicationRevisions API operation for AWS CodeDeploy. -// -// Lists information about revisions for an application. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation ListApplicationRevisions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the IAM user or AWS account. -// -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeInvalidSortByException "InvalidSortByException" -// The column name to sort by is either not present or was specified in an invalid -// format. -// -// * ErrCodeInvalidSortOrderException "InvalidSortOrderException" -// The sort order was specified in an invalid format. -// -// * ErrCodeInvalidBucketNameFilterException "InvalidBucketNameFilterException" -// The bucket name either doesn't exist or was specified in an invalid format. -// -// * ErrCodeInvalidKeyPrefixFilterException "InvalidKeyPrefixFilterException" -// The specified key prefix filter was specified in an invalid format. -// -// * ErrCodeBucketNameFilterRequiredException "BucketNameFilterRequiredException" -// A bucket name is required, but was not provided. -// -// * ErrCodeInvalidDeployedStateFilterException "InvalidDeployedStateFilterException" -// The deployed state filter was specified in an invalid format. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListApplicationRevisions -func (c *CodeDeploy) ListApplicationRevisions(input *ListApplicationRevisionsInput) (*ListApplicationRevisionsOutput, error) { - req, out := c.ListApplicationRevisionsRequest(input) - return out, req.Send() -} - -// ListApplicationRevisionsWithContext is the same as ListApplicationRevisions with the addition of -// the ability to pass a context and additional request options. -// -// See ListApplicationRevisions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) ListApplicationRevisionsWithContext(ctx aws.Context, input *ListApplicationRevisionsInput, opts ...request.Option) (*ListApplicationRevisionsOutput, error) { - req, out := c.ListApplicationRevisionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListApplicationRevisionsPages iterates over the pages of a ListApplicationRevisions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListApplicationRevisions 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 ListApplicationRevisions operation. -// pageNum := 0 -// err := client.ListApplicationRevisionsPages(params, -// func(page *ListApplicationRevisionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CodeDeploy) ListApplicationRevisionsPages(input *ListApplicationRevisionsInput, fn func(*ListApplicationRevisionsOutput, bool) bool) error { - return c.ListApplicationRevisionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListApplicationRevisionsPagesWithContext same as ListApplicationRevisionsPages 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 *CodeDeploy) ListApplicationRevisionsPagesWithContext(ctx aws.Context, input *ListApplicationRevisionsInput, fn func(*ListApplicationRevisionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListApplicationRevisionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListApplicationRevisionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListApplicationRevisionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListApplications = "ListApplications" - -// ListApplicationsRequest generates a "aws/request.Request" representing the -// client's request for the ListApplications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListApplications for more information on using the ListApplications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListApplicationsRequest method. -// req, resp := client.ListApplicationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListApplications -func (c *CodeDeploy) ListApplicationsRequest(input *ListApplicationsInput) (req *request.Request, output *ListApplicationsOutput) { - op := &request.Operation{ - Name: opListApplications, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListApplicationsInput{} - } - - output = &ListApplicationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListApplications API operation for AWS CodeDeploy. -// -// Lists the applications registered with the IAM user or AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation ListApplications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListApplications -func (c *CodeDeploy) ListApplications(input *ListApplicationsInput) (*ListApplicationsOutput, error) { - req, out := c.ListApplicationsRequest(input) - return out, req.Send() -} - -// ListApplicationsWithContext is the same as ListApplications with the addition of -// the ability to pass a context and additional request options. -// -// See ListApplications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) ListApplicationsWithContext(ctx aws.Context, input *ListApplicationsInput, opts ...request.Option) (*ListApplicationsOutput, error) { - req, out := c.ListApplicationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListApplicationsPages iterates over the pages of a ListApplications operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListApplications 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 ListApplications operation. -// pageNum := 0 -// err := client.ListApplicationsPages(params, -// func(page *ListApplicationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CodeDeploy) ListApplicationsPages(input *ListApplicationsInput, fn func(*ListApplicationsOutput, bool) bool) error { - return c.ListApplicationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListApplicationsPagesWithContext same as ListApplicationsPages 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 *CodeDeploy) ListApplicationsPagesWithContext(ctx aws.Context, input *ListApplicationsInput, fn func(*ListApplicationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListApplicationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListApplicationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListApplicationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListDeploymentConfigs = "ListDeploymentConfigs" - -// ListDeploymentConfigsRequest generates a "aws/request.Request" representing the -// client's request for the ListDeploymentConfigs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDeploymentConfigs for more information on using the ListDeploymentConfigs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDeploymentConfigsRequest method. -// req, resp := client.ListDeploymentConfigsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeploymentConfigs -func (c *CodeDeploy) ListDeploymentConfigsRequest(input *ListDeploymentConfigsInput) (req *request.Request, output *ListDeploymentConfigsOutput) { - op := &request.Operation{ - Name: opListDeploymentConfigs, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListDeploymentConfigsInput{} - } - - output = &ListDeploymentConfigsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDeploymentConfigs API operation for AWS CodeDeploy. -// -// Lists the deployment configurations with the IAM user or AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation ListDeploymentConfigs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeploymentConfigs -func (c *CodeDeploy) ListDeploymentConfigs(input *ListDeploymentConfigsInput) (*ListDeploymentConfigsOutput, error) { - req, out := c.ListDeploymentConfigsRequest(input) - return out, req.Send() -} - -// ListDeploymentConfigsWithContext is the same as ListDeploymentConfigs with the addition of -// the ability to pass a context and additional request options. -// -// See ListDeploymentConfigs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) ListDeploymentConfigsWithContext(ctx aws.Context, input *ListDeploymentConfigsInput, opts ...request.Option) (*ListDeploymentConfigsOutput, error) { - req, out := c.ListDeploymentConfigsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListDeploymentConfigsPages iterates over the pages of a ListDeploymentConfigs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDeploymentConfigs 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 ListDeploymentConfigs operation. -// pageNum := 0 -// err := client.ListDeploymentConfigsPages(params, -// func(page *ListDeploymentConfigsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CodeDeploy) ListDeploymentConfigsPages(input *ListDeploymentConfigsInput, fn func(*ListDeploymentConfigsOutput, bool) bool) error { - return c.ListDeploymentConfigsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDeploymentConfigsPagesWithContext same as ListDeploymentConfigsPages 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 *CodeDeploy) ListDeploymentConfigsPagesWithContext(ctx aws.Context, input *ListDeploymentConfigsInput, fn func(*ListDeploymentConfigsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDeploymentConfigsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDeploymentConfigsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDeploymentConfigsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListDeploymentGroups = "ListDeploymentGroups" - -// ListDeploymentGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ListDeploymentGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDeploymentGroups for more information on using the ListDeploymentGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDeploymentGroupsRequest method. -// req, resp := client.ListDeploymentGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeploymentGroups -func (c *CodeDeploy) ListDeploymentGroupsRequest(input *ListDeploymentGroupsInput) (req *request.Request, output *ListDeploymentGroupsOutput) { - op := &request.Operation{ - Name: opListDeploymentGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListDeploymentGroupsInput{} - } - - output = &ListDeploymentGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDeploymentGroups API operation for AWS CodeDeploy. -// -// Lists the deployment groups for an application registered with the IAM user -// or AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation ListDeploymentGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the IAM user or AWS account. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeploymentGroups -func (c *CodeDeploy) ListDeploymentGroups(input *ListDeploymentGroupsInput) (*ListDeploymentGroupsOutput, error) { - req, out := c.ListDeploymentGroupsRequest(input) - return out, req.Send() -} - -// ListDeploymentGroupsWithContext is the same as ListDeploymentGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ListDeploymentGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) ListDeploymentGroupsWithContext(ctx aws.Context, input *ListDeploymentGroupsInput, opts ...request.Option) (*ListDeploymentGroupsOutput, error) { - req, out := c.ListDeploymentGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListDeploymentGroupsPages iterates over the pages of a ListDeploymentGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDeploymentGroups 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 ListDeploymentGroups operation. -// pageNum := 0 -// err := client.ListDeploymentGroupsPages(params, -// func(page *ListDeploymentGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CodeDeploy) ListDeploymentGroupsPages(input *ListDeploymentGroupsInput, fn func(*ListDeploymentGroupsOutput, bool) bool) error { - return c.ListDeploymentGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDeploymentGroupsPagesWithContext same as ListDeploymentGroupsPages 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 *CodeDeploy) ListDeploymentGroupsPagesWithContext(ctx aws.Context, input *ListDeploymentGroupsInput, fn func(*ListDeploymentGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDeploymentGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDeploymentGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDeploymentGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListDeploymentInstances = "ListDeploymentInstances" - -// ListDeploymentInstancesRequest generates a "aws/request.Request" representing the -// client's request for the ListDeploymentInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDeploymentInstances for more information on using the ListDeploymentInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDeploymentInstancesRequest method. -// req, resp := client.ListDeploymentInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeploymentInstances -// -// Deprecated: This operation is deprecated, use ListDeploymentTargets instead. -func (c *CodeDeploy) ListDeploymentInstancesRequest(input *ListDeploymentInstancesInput) (req *request.Request, output *ListDeploymentInstancesOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, ListDeploymentInstances, has been deprecated") - } - op := &request.Operation{ - Name: opListDeploymentInstances, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListDeploymentInstancesInput{} - } - - output = &ListDeploymentInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDeploymentInstances API operation for AWS CodeDeploy. -// -// The newer BatchGetDeploymentTargets should be used instead because it works -// with all compute types. ListDeploymentInstances throws an exception if it -// is used with a compute platform other than EC2/On-premises or AWS Lambda. -// -// Lists the instance for a deployment associated with the IAM user or AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation ListDeploymentInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" -// At least one deployment ID must be specified. -// -// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment with the IAM user or AWS account does not exist. -// -// * ErrCodeDeploymentNotStartedException "DeploymentNotStartedException" -// The specified deployment has not started. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token was specified in an invalid format. -// -// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" -// At least one of the deployment IDs was specified in an invalid format. -// -// * ErrCodeInvalidInstanceStatusException "InvalidInstanceStatusException" -// The specified instance status does not exist. -// -// * ErrCodeInvalidInstanceTypeException "InvalidInstanceTypeException" -// An invalid instance type was specified for instances in a blue/green deployment. -// Valid values include "Blue" for an original environment and "Green" for a -// replacement environment. -// -// * ErrCodeInvalidDeploymentInstanceTypeException "InvalidDeploymentInstanceTypeException" -// An instance type was specified for an in-place deployment. Instance types -// are supported for blue/green deployments only. -// -// * ErrCodeInvalidTargetFilterNameException "InvalidTargetFilterNameException" -// The target filter name is invalid. -// -// * ErrCodeInvalidComputePlatformException "InvalidComputePlatformException" -// The computePlatform is invalid. The computePlatform should be Lambda or Server. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeploymentInstances -// -// Deprecated: This operation is deprecated, use ListDeploymentTargets instead. -func (c *CodeDeploy) ListDeploymentInstances(input *ListDeploymentInstancesInput) (*ListDeploymentInstancesOutput, error) { - req, out := c.ListDeploymentInstancesRequest(input) - return out, req.Send() -} - -// ListDeploymentInstancesWithContext is the same as ListDeploymentInstances with the addition of -// the ability to pass a context and additional request options. -// -// See ListDeploymentInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: This operation is deprecated, use ListDeploymentTargets instead. -func (c *CodeDeploy) ListDeploymentInstancesWithContext(ctx aws.Context, input *ListDeploymentInstancesInput, opts ...request.Option) (*ListDeploymentInstancesOutput, error) { - req, out := c.ListDeploymentInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListDeploymentInstancesPages iterates over the pages of a ListDeploymentInstances operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDeploymentInstances 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 ListDeploymentInstances operation. -// pageNum := 0 -// err := client.ListDeploymentInstancesPages(params, -// func(page *ListDeploymentInstancesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -// -// Deprecated: This operation is deprecated, use ListDeploymentTargets instead. -func (c *CodeDeploy) ListDeploymentInstancesPages(input *ListDeploymentInstancesInput, fn func(*ListDeploymentInstancesOutput, bool) bool) error { - return c.ListDeploymentInstancesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDeploymentInstancesPagesWithContext same as ListDeploymentInstancesPages 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. -// -// Deprecated: This operation is deprecated, use ListDeploymentTargets instead. -func (c *CodeDeploy) ListDeploymentInstancesPagesWithContext(ctx aws.Context, input *ListDeploymentInstancesInput, fn func(*ListDeploymentInstancesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDeploymentInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDeploymentInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDeploymentInstancesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListDeploymentTargets = "ListDeploymentTargets" - -// ListDeploymentTargetsRequest generates a "aws/request.Request" representing the -// client's request for the ListDeploymentTargets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDeploymentTargets for more information on using the ListDeploymentTargets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDeploymentTargetsRequest method. -// req, resp := client.ListDeploymentTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeploymentTargets -func (c *CodeDeploy) ListDeploymentTargetsRequest(input *ListDeploymentTargetsInput) (req *request.Request, output *ListDeploymentTargetsOutput) { - op := &request.Operation{ - Name: opListDeploymentTargets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListDeploymentTargetsInput{} - } - - output = &ListDeploymentTargetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDeploymentTargets API operation for AWS CodeDeploy. -// -// Returns an array of target IDs that are associated 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 CodeDeploy's -// API operation ListDeploymentTargets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" -// At least one deployment ID must be specified. -// -// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment with the IAM user or AWS account does not exist. -// -// * ErrCodeDeploymentNotStartedException "DeploymentNotStartedException" -// The specified deployment has not started. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token was specified in an invalid format. -// -// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" -// At least one of the deployment IDs was specified in an invalid format. -// -// * ErrCodeInvalidInstanceStatusException "InvalidInstanceStatusException" -// The specified instance status does not exist. -// -// * ErrCodeInvalidInstanceTypeException "InvalidInstanceTypeException" -// An invalid instance type was specified for instances in a blue/green deployment. -// Valid values include "Blue" for an original environment and "Green" for a -// replacement environment. -// -// * ErrCodeInvalidDeploymentInstanceTypeException "InvalidDeploymentInstanceTypeException" -// An instance type was specified for an in-place deployment. Instance types -// are supported for blue/green deployments only. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeploymentTargets -func (c *CodeDeploy) ListDeploymentTargets(input *ListDeploymentTargetsInput) (*ListDeploymentTargetsOutput, error) { - req, out := c.ListDeploymentTargetsRequest(input) - return out, req.Send() -} - -// ListDeploymentTargetsWithContext is the same as ListDeploymentTargets with the addition of -// the ability to pass a context and additional request options. -// -// See ListDeploymentTargets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) ListDeploymentTargetsWithContext(ctx aws.Context, input *ListDeploymentTargetsInput, opts ...request.Option) (*ListDeploymentTargetsOutput, error) { - req, out := c.ListDeploymentTargetsRequest(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/codedeploy-2014-10-06/ListDeployments -func (c *CodeDeploy) ListDeploymentsRequest(input *ListDeploymentsInput) (req *request.Request, output *ListDeploymentsOutput) { - op := &request.Operation{ - Name: opListDeployments, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListDeploymentsInput{} - } - - output = &ListDeploymentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDeployments API operation for AWS CodeDeploy. -// -// Lists the deployments in a deployment group for an application registered -// with the IAM user or AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation ListDeployments for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the IAM user or AWS account. -// -// * ErrCodeInvalidDeploymentGroupNameException "InvalidDeploymentGroupNameException" -// The deployment group name was specified in an invalid format. -// -// * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" -// The named deployment group with the IAM user or AWS account does not exist. -// -// * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" -// The deployment group name was not specified. -// -// * ErrCodeInvalidTimeRangeException "InvalidTimeRangeException" -// The specified time range was specified in an invalid format. -// -// * ErrCodeInvalidDeploymentStatusException "InvalidDeploymentStatusException" -// The specified deployment status doesn't exist or cannot be determined. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeployments -func (c *CodeDeploy) ListDeployments(input *ListDeploymentsInput) (*ListDeploymentsOutput, error) { - req, out := c.ListDeploymentsRequest(input) - 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 *CodeDeploy) 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() -} - -// ListDeploymentsPages iterates over the pages of a ListDeployments operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDeployments 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 ListDeployments operation. -// pageNum := 0 -// err := client.ListDeploymentsPages(params, -// func(page *ListDeploymentsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CodeDeploy) ListDeploymentsPages(input *ListDeploymentsInput, fn func(*ListDeploymentsOutput, bool) bool) error { - return c.ListDeploymentsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDeploymentsPagesWithContext same as ListDeploymentsPages 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 *CodeDeploy) ListDeploymentsPagesWithContext(ctx aws.Context, input *ListDeploymentsInput, fn func(*ListDeploymentsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDeploymentsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDeploymentsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDeploymentsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListGitHubAccountTokenNames = "ListGitHubAccountTokenNames" - -// ListGitHubAccountTokenNamesRequest generates a "aws/request.Request" representing the -// client's request for the ListGitHubAccountTokenNames operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListGitHubAccountTokenNames for more information on using the ListGitHubAccountTokenNames -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListGitHubAccountTokenNamesRequest method. -// req, resp := client.ListGitHubAccountTokenNamesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListGitHubAccountTokenNames -func (c *CodeDeploy) ListGitHubAccountTokenNamesRequest(input *ListGitHubAccountTokenNamesInput) (req *request.Request, output *ListGitHubAccountTokenNamesOutput) { - op := &request.Operation{ - Name: opListGitHubAccountTokenNames, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListGitHubAccountTokenNamesInput{} - } - - output = &ListGitHubAccountTokenNamesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGitHubAccountTokenNames API operation for AWS CodeDeploy. -// -// Lists the names of stored connections to GitHub accounts. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation ListGitHubAccountTokenNames for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token was specified in an invalid format. -// -// * ErrCodeResourceValidationException "ResourceValidationException" -// The specified resource could not be validated. -// -// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" -// The API used does not support the deployment. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListGitHubAccountTokenNames -func (c *CodeDeploy) ListGitHubAccountTokenNames(input *ListGitHubAccountTokenNamesInput) (*ListGitHubAccountTokenNamesOutput, error) { - req, out := c.ListGitHubAccountTokenNamesRequest(input) - return out, req.Send() -} - -// ListGitHubAccountTokenNamesWithContext is the same as ListGitHubAccountTokenNames with the addition of -// the ability to pass a context and additional request options. -// -// See ListGitHubAccountTokenNames for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) ListGitHubAccountTokenNamesWithContext(ctx aws.Context, input *ListGitHubAccountTokenNamesInput, opts ...request.Option) (*ListGitHubAccountTokenNamesOutput, error) { - req, out := c.ListGitHubAccountTokenNamesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListOnPremisesInstances = "ListOnPremisesInstances" - -// ListOnPremisesInstancesRequest generates a "aws/request.Request" representing the -// client's request for the ListOnPremisesInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListOnPremisesInstances for more information on using the ListOnPremisesInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListOnPremisesInstancesRequest method. -// req, resp := client.ListOnPremisesInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListOnPremisesInstances -func (c *CodeDeploy) ListOnPremisesInstancesRequest(input *ListOnPremisesInstancesInput) (req *request.Request, output *ListOnPremisesInstancesOutput) { - op := &request.Operation{ - Name: opListOnPremisesInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListOnPremisesInstancesInput{} - } - - output = &ListOnPremisesInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOnPremisesInstances API operation for AWS CodeDeploy. -// -// Gets a list of names for one or more on-premises instances. -// -// Unless otherwise specified, both registered and deregistered on-premises -// instance names are listed. To list only registered or deregistered on-premises -// instance names, use the registration status parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation ListOnPremisesInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRegistrationStatusException "InvalidRegistrationStatusException" -// The registration status was specified in an invalid format. -// -// * ErrCodeInvalidTagFilterException "InvalidTagFilterException" -// The tag filter was specified in an invalid format. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListOnPremisesInstances -func (c *CodeDeploy) ListOnPremisesInstances(input *ListOnPremisesInstancesInput) (*ListOnPremisesInstancesOutput, error) { - req, out := c.ListOnPremisesInstancesRequest(input) - return out, req.Send() -} - -// ListOnPremisesInstancesWithContext is the same as ListOnPremisesInstances with the addition of -// the ability to pass a context and additional request options. -// -// See ListOnPremisesInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) ListOnPremisesInstancesWithContext(ctx aws.Context, input *ListOnPremisesInstancesInput, opts ...request.Option) (*ListOnPremisesInstancesOutput, error) { - req, out := c.ListOnPremisesInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutLifecycleEventHookExecutionStatus = "PutLifecycleEventHookExecutionStatus" - -// PutLifecycleEventHookExecutionStatusRequest generates a "aws/request.Request" representing the -// client's request for the PutLifecycleEventHookExecutionStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutLifecycleEventHookExecutionStatus for more information on using the PutLifecycleEventHookExecutionStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutLifecycleEventHookExecutionStatusRequest method. -// req, resp := client.PutLifecycleEventHookExecutionStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/PutLifecycleEventHookExecutionStatus -func (c *CodeDeploy) PutLifecycleEventHookExecutionStatusRequest(input *PutLifecycleEventHookExecutionStatusInput) (req *request.Request, output *PutLifecycleEventHookExecutionStatusOutput) { - op := &request.Operation{ - Name: opPutLifecycleEventHookExecutionStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutLifecycleEventHookExecutionStatusInput{} - } - - output = &PutLifecycleEventHookExecutionStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutLifecycleEventHookExecutionStatus API operation for AWS CodeDeploy. -// -// Sets the result of a Lambda validation function. The function validates one -// or both lifecycle events (BeforeAllowTraffic and AfterAllowTraffic) and returns -// Succeeded or Failed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation PutLifecycleEventHookExecutionStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidLifecycleEventHookExecutionStatusException "InvalidLifecycleEventHookExecutionStatusException" -// The result of a Lambda validation function that verifies a lifecycle event -// is invalid. It should return Succeeded or Failed. -// -// * ErrCodeInvalidLifecycleEventHookExecutionIdException "InvalidLifecycleEventHookExecutionIdException" -// A lifecycle event hook is invalid. Review the hooks section in your AppSpec -// file to ensure the lifecycle events and hooks functions are valid. -// -// * ErrCodeLifecycleEventAlreadyCompletedException "LifecycleEventAlreadyCompletedException" -// An attempt to return the status of an already completed lifecycle event occurred. -// -// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" -// At least one deployment ID must be specified. -// -// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment with the IAM user or AWS account does not exist. -// -// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" -// At least one of the deployment IDs was specified in an invalid format. -// -// * ErrCodeUnsupportedActionForDeploymentTypeException "UnsupportedActionForDeploymentTypeException" -// A call was submitted that is not supported for the specified deployment type. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/PutLifecycleEventHookExecutionStatus -func (c *CodeDeploy) PutLifecycleEventHookExecutionStatus(input *PutLifecycleEventHookExecutionStatusInput) (*PutLifecycleEventHookExecutionStatusOutput, error) { - req, out := c.PutLifecycleEventHookExecutionStatusRequest(input) - return out, req.Send() -} - -// PutLifecycleEventHookExecutionStatusWithContext is the same as PutLifecycleEventHookExecutionStatus with the addition of -// the ability to pass a context and additional request options. -// -// See PutLifecycleEventHookExecutionStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) PutLifecycleEventHookExecutionStatusWithContext(ctx aws.Context, input *PutLifecycleEventHookExecutionStatusInput, opts ...request.Option) (*PutLifecycleEventHookExecutionStatusOutput, error) { - req, out := c.PutLifecycleEventHookExecutionStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterApplicationRevision = "RegisterApplicationRevision" - -// RegisterApplicationRevisionRequest generates a "aws/request.Request" representing the -// client's request for the RegisterApplicationRevision operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterApplicationRevision for more information on using the RegisterApplicationRevision -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterApplicationRevisionRequest method. -// req, resp := client.RegisterApplicationRevisionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/RegisterApplicationRevision -func (c *CodeDeploy) RegisterApplicationRevisionRequest(input *RegisterApplicationRevisionInput) (req *request.Request, output *RegisterApplicationRevisionOutput) { - op := &request.Operation{ - Name: opRegisterApplicationRevision, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterApplicationRevisionInput{} - } - - output = &RegisterApplicationRevisionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RegisterApplicationRevision API operation for AWS CodeDeploy. -// -// Registers with AWS CodeDeploy a revision for the specified application. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation RegisterApplicationRevision for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the IAM user or AWS account. -// -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeDescriptionTooLongException "DescriptionTooLongException" -// The description is too long. -// -// * ErrCodeRevisionRequiredException "RevisionRequiredException" -// The revision ID was not specified. -// -// * ErrCodeInvalidRevisionException "InvalidRevisionException" -// The revision was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/RegisterApplicationRevision -func (c *CodeDeploy) RegisterApplicationRevision(input *RegisterApplicationRevisionInput) (*RegisterApplicationRevisionOutput, error) { - req, out := c.RegisterApplicationRevisionRequest(input) - return out, req.Send() -} - -// RegisterApplicationRevisionWithContext is the same as RegisterApplicationRevision with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterApplicationRevision for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) RegisterApplicationRevisionWithContext(ctx aws.Context, input *RegisterApplicationRevisionInput, opts ...request.Option) (*RegisterApplicationRevisionOutput, error) { - req, out := c.RegisterApplicationRevisionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterOnPremisesInstance = "RegisterOnPremisesInstance" - -// RegisterOnPremisesInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RegisterOnPremisesInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterOnPremisesInstance for more information on using the RegisterOnPremisesInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterOnPremisesInstanceRequest method. -// req, resp := client.RegisterOnPremisesInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/RegisterOnPremisesInstance -func (c *CodeDeploy) RegisterOnPremisesInstanceRequest(input *RegisterOnPremisesInstanceInput) (req *request.Request, output *RegisterOnPremisesInstanceOutput) { - op := &request.Operation{ - Name: opRegisterOnPremisesInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterOnPremisesInstanceInput{} - } - - output = &RegisterOnPremisesInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RegisterOnPremisesInstance API operation for AWS CodeDeploy. -// -// Registers an on-premises instance. -// -// Only one IAM ARN (an IAM session ARN or IAM user ARN) is supported in the -// request. You cannot use both. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation RegisterOnPremisesInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInstanceNameAlreadyRegisteredException "InstanceNameAlreadyRegisteredException" -// The specified on-premises instance name is already registered. -// -// * ErrCodeIamArnRequiredException "IamArnRequiredException" -// No IAM ARN was included in the request. You must use an IAM session ARN or -// IAM user ARN in the request. -// -// * ErrCodeIamSessionArnAlreadyRegisteredException "IamSessionArnAlreadyRegisteredException" -// The request included an IAM session ARN that has already been used to register -// a different instance. -// -// * ErrCodeIamUserArnAlreadyRegisteredException "IamUserArnAlreadyRegisteredException" -// The specified IAM user ARN is already registered with an on-premises instance. -// -// * ErrCodeInstanceNameRequiredException "InstanceNameRequiredException" -// An on-premises instance name was not specified. -// -// * ErrCodeIamUserArnRequiredException "IamUserArnRequiredException" -// An IAM user ARN was not specified. -// -// * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The on-premises instance name was specified in an invalid format. -// -// * ErrCodeInvalidIamSessionArnException "InvalidIamSessionArnException" -// The IAM session ARN was specified in an invalid format. -// -// * ErrCodeInvalidIamUserArnException "InvalidIamUserArnException" -// The IAM user ARN was specified in an invalid format. -// -// * ErrCodeMultipleIamArnsProvidedException "MultipleIamArnsProvidedException" -// Both an IAM user ARN and an IAM session ARN were included in the request. -// Use only one ARN type. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/RegisterOnPremisesInstance -func (c *CodeDeploy) RegisterOnPremisesInstance(input *RegisterOnPremisesInstanceInput) (*RegisterOnPremisesInstanceOutput, error) { - req, out := c.RegisterOnPremisesInstanceRequest(input) - return out, req.Send() -} - -// RegisterOnPremisesInstanceWithContext is the same as RegisterOnPremisesInstance with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterOnPremisesInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) RegisterOnPremisesInstanceWithContext(ctx aws.Context, input *RegisterOnPremisesInstanceInput, opts ...request.Option) (*RegisterOnPremisesInstanceOutput, error) { - req, out := c.RegisterOnPremisesInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTagsFromOnPremisesInstances = "RemoveTagsFromOnPremisesInstances" - -// RemoveTagsFromOnPremisesInstancesRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTagsFromOnPremisesInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTagsFromOnPremisesInstances for more information on using the RemoveTagsFromOnPremisesInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsFromOnPremisesInstancesRequest method. -// req, resp := client.RemoveTagsFromOnPremisesInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/RemoveTagsFromOnPremisesInstances -func (c *CodeDeploy) RemoveTagsFromOnPremisesInstancesRequest(input *RemoveTagsFromOnPremisesInstancesInput) (req *request.Request, output *RemoveTagsFromOnPremisesInstancesOutput) { - op := &request.Operation{ - Name: opRemoveTagsFromOnPremisesInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsFromOnPremisesInstancesInput{} - } - - output = &RemoveTagsFromOnPremisesInstancesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTagsFromOnPremisesInstances API operation for AWS CodeDeploy. -// -// Removes one or more tags from one or more on-premises instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation RemoveTagsFromOnPremisesInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInstanceNameRequiredException "InstanceNameRequiredException" -// An on-premises instance name was not specified. -// -// * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The on-premises instance name was specified in an invalid format. -// -// * ErrCodeTagRequiredException "TagRequiredException" -// A tag was not specified. -// -// * ErrCodeInvalidTagException "InvalidTagException" -// The tag was specified in an invalid format. -// -// * ErrCodeTagLimitExceededException "TagLimitExceededException" -// The maximum allowed number of tags was exceeded. -// -// * ErrCodeInstanceLimitExceededException "InstanceLimitExceededException" -// The maximum number of allowed on-premises instances in a single call was -// exceeded. -// -// * ErrCodeInstanceNotRegisteredException "InstanceNotRegisteredException" -// The specified on-premises instance is not registered. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/RemoveTagsFromOnPremisesInstances -func (c *CodeDeploy) RemoveTagsFromOnPremisesInstances(input *RemoveTagsFromOnPremisesInstancesInput) (*RemoveTagsFromOnPremisesInstancesOutput, error) { - req, out := c.RemoveTagsFromOnPremisesInstancesRequest(input) - return out, req.Send() -} - -// RemoveTagsFromOnPremisesInstancesWithContext is the same as RemoveTagsFromOnPremisesInstances with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTagsFromOnPremisesInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) RemoveTagsFromOnPremisesInstancesWithContext(ctx aws.Context, input *RemoveTagsFromOnPremisesInstancesInput, opts ...request.Option) (*RemoveTagsFromOnPremisesInstancesOutput, error) { - req, out := c.RemoveTagsFromOnPremisesInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSkipWaitTimeForInstanceTermination = "SkipWaitTimeForInstanceTermination" - -// SkipWaitTimeForInstanceTerminationRequest generates a "aws/request.Request" representing the -// client's request for the SkipWaitTimeForInstanceTermination operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SkipWaitTimeForInstanceTermination for more information on using the SkipWaitTimeForInstanceTermination -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SkipWaitTimeForInstanceTerminationRequest method. -// req, resp := client.SkipWaitTimeForInstanceTerminationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/SkipWaitTimeForInstanceTermination -// -// Deprecated: This operation is deprecated, use ContinueDeployment with DeploymentWaitType instead. -func (c *CodeDeploy) SkipWaitTimeForInstanceTerminationRequest(input *SkipWaitTimeForInstanceTerminationInput) (req *request.Request, output *SkipWaitTimeForInstanceTerminationOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, SkipWaitTimeForInstanceTermination, has been deprecated") - } - op := &request.Operation{ - Name: opSkipWaitTimeForInstanceTermination, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SkipWaitTimeForInstanceTerminationInput{} - } - - output = &SkipWaitTimeForInstanceTerminationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SkipWaitTimeForInstanceTermination API operation for AWS CodeDeploy. -// -// In a blue/green deployment, overrides any specified wait time and starts -// terminating instances immediately after the traffic routing is complete. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation SkipWaitTimeForInstanceTermination for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" -// At least one deployment ID must be specified. -// -// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment with the IAM user or AWS account does not exist. -// -// * ErrCodeDeploymentAlreadyCompletedException "DeploymentAlreadyCompletedException" -// The deployment is already complete. -// -// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" -// At least one of the deployment IDs was specified in an invalid format. -// -// * ErrCodeDeploymentNotStartedException "DeploymentNotStartedException" -// The specified deployment has not started. -// -// * ErrCodeUnsupportedActionForDeploymentTypeException "UnsupportedActionForDeploymentTypeException" -// A call was submitted that is not supported for the specified deployment type. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/SkipWaitTimeForInstanceTermination -// -// Deprecated: This operation is deprecated, use ContinueDeployment with DeploymentWaitType instead. -func (c *CodeDeploy) SkipWaitTimeForInstanceTermination(input *SkipWaitTimeForInstanceTerminationInput) (*SkipWaitTimeForInstanceTerminationOutput, error) { - req, out := c.SkipWaitTimeForInstanceTerminationRequest(input) - return out, req.Send() -} - -// SkipWaitTimeForInstanceTerminationWithContext is the same as SkipWaitTimeForInstanceTermination with the addition of -// the ability to pass a context and additional request options. -// -// See SkipWaitTimeForInstanceTermination for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: This operation is deprecated, use ContinueDeployment with DeploymentWaitType instead. -func (c *CodeDeploy) SkipWaitTimeForInstanceTerminationWithContext(ctx aws.Context, input *SkipWaitTimeForInstanceTerminationInput, opts ...request.Option) (*SkipWaitTimeForInstanceTerminationOutput, error) { - req, out := c.SkipWaitTimeForInstanceTerminationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopDeployment = "StopDeployment" - -// StopDeploymentRequest generates a "aws/request.Request" representing the -// client's request for the StopDeployment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopDeployment for more information on using the StopDeployment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopDeploymentRequest method. -// req, resp := client.StopDeploymentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/StopDeployment -func (c *CodeDeploy) StopDeploymentRequest(input *StopDeploymentInput) (req *request.Request, output *StopDeploymentOutput) { - op := &request.Operation{ - Name: opStopDeployment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopDeploymentInput{} - } - - output = &StopDeploymentOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopDeployment API operation for AWS CodeDeploy. -// -// Attempts to stop an ongoing 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 CodeDeploy's -// API operation StopDeployment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" -// At least one deployment ID must be specified. -// -// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment with the IAM user or AWS account does not exist. -// -// * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" -// The named deployment group with the IAM user or AWS account does not exist. -// -// * ErrCodeDeploymentAlreadyCompletedException "DeploymentAlreadyCompletedException" -// The deployment is already complete. -// -// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" -// At least one of the deployment IDs was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/StopDeployment -func (c *CodeDeploy) StopDeployment(input *StopDeploymentInput) (*StopDeploymentOutput, error) { - req, out := c.StopDeploymentRequest(input) - return out, req.Send() -} - -// StopDeploymentWithContext is the same as StopDeployment with the addition of -// the ability to pass a context and additional request options. -// -// See StopDeployment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) StopDeploymentWithContext(ctx aws.Context, input *StopDeploymentInput, opts ...request.Option) (*StopDeploymentOutput, error) { - req, out := c.StopDeploymentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApplication = "UpdateApplication" - -// UpdateApplicationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApplication for more information on using the UpdateApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApplicationRequest method. -// req, resp := client.UpdateApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/UpdateApplication -func (c *CodeDeploy) UpdateApplicationRequest(input *UpdateApplicationInput) (req *request.Request, output *UpdateApplicationOutput) { - op := &request.Operation{ - Name: opUpdateApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateApplicationInput{} - } - - output = &UpdateApplicationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateApplication API operation for AWS CodeDeploy. -// -// Changes the name of an application. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodeDeploy's -// API operation UpdateApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeApplicationAlreadyExistsException "ApplicationAlreadyExistsException" -// An application with the specified name with the IAM user or AWS account already -// exists. -// -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the IAM user or AWS account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/UpdateApplication -func (c *CodeDeploy) UpdateApplication(input *UpdateApplicationInput) (*UpdateApplicationOutput, error) { - req, out := c.UpdateApplicationRequest(input) - return out, req.Send() -} - -// UpdateApplicationWithContext is the same as UpdateApplication with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) UpdateApplicationWithContext(ctx aws.Context, input *UpdateApplicationInput, opts ...request.Option) (*UpdateApplicationOutput, error) { - req, out := c.UpdateApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDeploymentGroup = "UpdateDeploymentGroup" - -// UpdateDeploymentGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDeploymentGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDeploymentGroup for more information on using the UpdateDeploymentGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDeploymentGroupRequest method. -// req, resp := client.UpdateDeploymentGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/UpdateDeploymentGroup -func (c *CodeDeploy) UpdateDeploymentGroupRequest(input *UpdateDeploymentGroupInput) (req *request.Request, output *UpdateDeploymentGroupOutput) { - op := &request.Operation{ - Name: opUpdateDeploymentGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateDeploymentGroupInput{} - } - - output = &UpdateDeploymentGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDeploymentGroup API operation for AWS CodeDeploy. -// -// Changes information about a deployment 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 CodeDeploy's -// API operation UpdateDeploymentGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. -// -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the IAM user or AWS account. -// -// * ErrCodeInvalidDeploymentGroupNameException "InvalidDeploymentGroupNameException" -// The deployment group name was specified in an invalid format. -// -// * ErrCodeDeploymentGroupAlreadyExistsException "DeploymentGroupAlreadyExistsException" -// A deployment group with the specified name with the IAM user or AWS account -// already exists. -// -// * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" -// The deployment group name was not specified. -// -// * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" -// The named deployment group with the IAM user or AWS account does not exist. -// -// * ErrCodeInvalidEC2TagException "InvalidEC2TagException" -// The tag was specified in an invalid format. -// -// * ErrCodeInvalidTagException "InvalidTagException" -// The tag was specified in an invalid format. -// -// * ErrCodeInvalidAutoScalingGroupException "InvalidAutoScalingGroupException" -// The Auto Scaling group was specified in an invalid format or does not exist. -// -// * ErrCodeInvalidDeploymentConfigNameException "InvalidDeploymentConfigNameException" -// The deployment configuration name was specified in an invalid format. -// -// * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the IAM user or AWS account. -// -// * ErrCodeInvalidRoleException "InvalidRoleException" -// The service role ARN was specified in an invalid format. Or, if an Auto Scaling -// group was specified, the specified service role does not grant the appropriate -// permissions to Amazon EC2 Auto Scaling. -// -// * ErrCodeLifecycleHookLimitExceededException "LifecycleHookLimitExceededException" -// The limit for lifecycle hooks was exceeded. -// -// * ErrCodeInvalidTriggerConfigException "InvalidTriggerConfigException" -// The trigger was specified in an invalid format. -// -// * ErrCodeTriggerTargetsLimitExceededException "TriggerTargetsLimitExceededException" -// The maximum allowed number of triggers was exceeded. -// -// * ErrCodeInvalidAlarmConfigException "InvalidAlarmConfigException" -// The format of the alarm configuration is invalid. Possible causes include: -// -// * The alarm list is null. -// -// * The alarm object is null. -// -// * The alarm name is empty or null or exceeds the limit of 255 characters. -// -// * Two alarms with the same name have been specified. -// -// * The alarm configuration is enabled, but the alarm list is empty. -// -// * ErrCodeAlarmsLimitExceededException "AlarmsLimitExceededException" -// The maximum number of alarms for a deployment group (10) was exceeded. -// -// * ErrCodeInvalidAutoRollbackConfigException "InvalidAutoRollbackConfigException" -// The automatic rollback configuration was specified in an invalid format. -// For example, automatic rollback is enabled, but an invalid triggering event -// type or no event types were listed. -// -// * ErrCodeInvalidLoadBalancerInfoException "InvalidLoadBalancerInfoException" -// An invalid load balancer name, or no load balancer name, was specified. -// -// * ErrCodeInvalidDeploymentStyleException "InvalidDeploymentStyleException" -// An invalid deployment style was specified. Valid deployment types include -// "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" -// and "WITHOUT_TRAFFIC_CONTROL." -// -// * ErrCodeInvalidBlueGreenDeploymentConfigurationException "InvalidBlueGreenDeploymentConfigurationException" -// The configuration for the blue/green deployment group was provided in an -// invalid format. For information about deployment configuration format, see -// CreateDeploymentConfig. -// -// * ErrCodeInvalidEC2TagCombinationException "InvalidEC2TagCombinationException" -// A call was submitted that specified both Ec2TagFilters and Ec2TagSet, but -// only one of these data types can be used in a single call. -// -// * ErrCodeInvalidOnPremisesTagCombinationException "InvalidOnPremisesTagCombinationException" -// A call was submitted that specified both OnPremisesTagFilters and OnPremisesTagSet, -// but only one of these data types can be used in a single call. -// -// * ErrCodeTagSetListLimitExceededException "TagSetListLimitExceededException" -// The number of tag groups included in the tag set list exceeded the maximum -// allowed limit of 3. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input was specified in an invalid format. -// -// * ErrCodeThrottlingException "ThrottlingException" -// An API function was called too frequently. -// -// * ErrCodeInvalidECSServiceException "InvalidECSServiceException" -// The Amazon ECS service identifier is not valid. -// -// * ErrCodeInvalidTargetGroupPairException "InvalidTargetGroupPairException" -// A target group pair associated with this deployment is not valid. -// -// * ErrCodeECSServiceMappingLimitExceededException "ECSServiceMappingLimitExceededException" -// The Amazon ECS service is associated with more than one deployment groups. -// An Amazon ECS service can be associated with only one deployment group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/UpdateDeploymentGroup -func (c *CodeDeploy) UpdateDeploymentGroup(input *UpdateDeploymentGroupInput) (*UpdateDeploymentGroupOutput, error) { - req, out := c.UpdateDeploymentGroupRequest(input) - return out, req.Send() -} - -// UpdateDeploymentGroupWithContext is the same as UpdateDeploymentGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDeploymentGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) UpdateDeploymentGroupWithContext(ctx aws.Context, input *UpdateDeploymentGroupInput, opts ...request.Option) (*UpdateDeploymentGroupOutput, error) { - req, out := c.UpdateDeploymentGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Represents the input of, and adds tags to, an on-premises instance operation. -type AddTagsToOnPremisesInstancesInput struct { - _ struct{} `type:"structure"` - - // The names of the on-premises instances to which to add tags. - // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` - - // The tag key-value pairs to add to the on-premises instances. - // - // Keys and values are both required. Keys cannot be null or empty strings. - // Value-only tags are not allowed. - // - // Tags is a required field - Tags []*Tag `locationName:"tags" type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsToOnPremisesInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToOnPremisesInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsToOnPremisesInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsToOnPremisesInstancesInput"} - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceNames sets the InstanceNames field's value. -func (s *AddTagsToOnPremisesInstancesInput) SetInstanceNames(v []*string) *AddTagsToOnPremisesInstancesInput { - s.InstanceNames = v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsToOnPremisesInstancesInput) SetTags(v []*Tag) *AddTagsToOnPremisesInstancesInput { - s.Tags = v - return s -} - -type AddTagsToOnPremisesInstancesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsToOnPremisesInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToOnPremisesInstancesOutput) GoString() string { - return s.String() -} - -// Information about an alarm. -type Alarm struct { - _ struct{} `type:"structure"` - - // The name of the alarm. Maximum length is 255 characters. Each alarm name - // can be used only once in a list of alarms. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s Alarm) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Alarm) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *Alarm) SetName(v string) *Alarm { - s.Name = &v - return s -} - -// Information about alarms associated with the deployment group. -type AlarmConfiguration struct { - _ struct{} `type:"structure"` - - // A list of alarms configured for the deployment group. A maximum of 10 alarms - // can be added to a deployment group. - Alarms []*Alarm `locationName:"alarms" type:"list"` - - // Indicates whether the alarm configuration is enabled. - Enabled *bool `locationName:"enabled" type:"boolean"` - - // Indicates whether a deployment should continue if information about the current - // state of alarms cannot be retrieved from Amazon CloudWatch. The default value - // is false. - // - // * true: The deployment proceeds even if alarm status information can't - // be retrieved from Amazon CloudWatch. - // - // * false: The deployment stops if alarm status information can't be retrieved - // from Amazon CloudWatch. - IgnorePollAlarmFailure *bool `locationName:"ignorePollAlarmFailure" type:"boolean"` -} - -// String returns the string representation -func (s AlarmConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AlarmConfiguration) GoString() string { - return s.String() -} - -// SetAlarms sets the Alarms field's value. -func (s *AlarmConfiguration) SetAlarms(v []*Alarm) *AlarmConfiguration { - s.Alarms = v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *AlarmConfiguration) SetEnabled(v bool) *AlarmConfiguration { - s.Enabled = &v - return s -} - -// SetIgnorePollAlarmFailure sets the IgnorePollAlarmFailure field's value. -func (s *AlarmConfiguration) SetIgnorePollAlarmFailure(v bool) *AlarmConfiguration { - s.IgnorePollAlarmFailure = &v - return s -} - -// A revision for an AWS Lambda or Amazon ECS deployment that is a YAML-formatted -// or JSON-formatted string. For AWS Lambda and Amazon ECS deployments, the -// revision is the same as the AppSpec file. This method replaces the deprecated -// RawString data type. -type AppSpecContent struct { - _ struct{} `type:"structure"` - - // The YAML-formatted or JSON-formatted revision string. - // - // For an AWS Lambda deployment, the content includes a Lambda function name, - // the alias for its original version, and the alias for its replacement version. - // The deployment shifts traffic from the original version of the Lambda function - // to the replacement version. - // - // For an Amazon ECS deployment, the content includes the task name, information - // about the load balancer that serves traffic to the container, and more. - // - // For both types of deployments, the content can specify Lambda functions that - // run at specified hooks, such as BeforeInstall, during a deployment. - Content *string `locationName:"content" type:"string"` - - // The SHA256 hash value of the revision content. - Sha256 *string `locationName:"sha256" type:"string"` -} - -// String returns the string representation -func (s AppSpecContent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AppSpecContent) GoString() string { - return s.String() -} - -// SetContent sets the Content field's value. -func (s *AppSpecContent) SetContent(v string) *AppSpecContent { - s.Content = &v - return s -} - -// SetSha256 sets the Sha256 field's value. -func (s *AppSpecContent) SetSha256(v string) *AppSpecContent { - s.Sha256 = &v - return s -} - -// Information about an application. -type ApplicationInfo struct { - _ struct{} `type:"structure"` - - // The application ID. - ApplicationId *string `locationName:"applicationId" type:"string"` - - // The application name. - ApplicationName *string `locationName:"applicationName" min:"1" type:"string"` - - // The destination platform type for deployment of the application (Lambda or - // Server). - ComputePlatform *string `locationName:"computePlatform" type:"string" enum:"ComputePlatform"` - - // The time at which the application was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - - // The name for a connection to a GitHub account. - GitHubAccountName *string `locationName:"gitHubAccountName" type:"string"` - - // True if the user has authenticated with GitHub for the specified application. - // Otherwise, false. - LinkedToGitHub *bool `locationName:"linkedToGitHub" type:"boolean"` -} - -// String returns the string representation -func (s ApplicationInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationInfo) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *ApplicationInfo) SetApplicationId(v string) *ApplicationInfo { - s.ApplicationId = &v - return s -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *ApplicationInfo) SetApplicationName(v string) *ApplicationInfo { - s.ApplicationName = &v - return s -} - -// SetComputePlatform sets the ComputePlatform field's value. -func (s *ApplicationInfo) SetComputePlatform(v string) *ApplicationInfo { - s.ComputePlatform = &v - return s -} - -// SetCreateTime sets the CreateTime field's value. -func (s *ApplicationInfo) SetCreateTime(v time.Time) *ApplicationInfo { - s.CreateTime = &v - return s -} - -// SetGitHubAccountName sets the GitHubAccountName field's value. -func (s *ApplicationInfo) SetGitHubAccountName(v string) *ApplicationInfo { - s.GitHubAccountName = &v - return s -} - -// SetLinkedToGitHub sets the LinkedToGitHub field's value. -func (s *ApplicationInfo) SetLinkedToGitHub(v bool) *ApplicationInfo { - s.LinkedToGitHub = &v - return s -} - -// Information about a configuration for automatically rolling back to a previous -// version of an application revision when a deployment is not completed successfully. -type AutoRollbackConfiguration struct { - _ struct{} `type:"structure"` - - // Indicates whether a defined automatic rollback configuration is currently - // enabled. - Enabled *bool `locationName:"enabled" type:"boolean"` - - // The event type or types that trigger a rollback. - Events []*string `locationName:"events" type:"list"` -} - -// String returns the string representation -func (s AutoRollbackConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AutoRollbackConfiguration) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *AutoRollbackConfiguration) SetEnabled(v bool) *AutoRollbackConfiguration { - s.Enabled = &v - return s -} - -// SetEvents sets the Events field's value. -func (s *AutoRollbackConfiguration) SetEvents(v []*string) *AutoRollbackConfiguration { - s.Events = v - return s -} - -// Information about an Auto Scaling group. -type AutoScalingGroup struct { - _ struct{} `type:"structure"` - - // An Auto Scaling lifecycle event hook name. - Hook *string `locationName:"hook" type:"string"` - - // The Auto Scaling group name. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s AutoScalingGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AutoScalingGroup) GoString() string { - return s.String() -} - -// SetHook sets the Hook field's value. -func (s *AutoScalingGroup) SetHook(v string) *AutoScalingGroup { - s.Hook = &v - return s -} - -// SetName sets the Name field's value. -func (s *AutoScalingGroup) SetName(v string) *AutoScalingGroup { - s.Name = &v - return s -} - -// Represents the input of a BatchGetApplicationRevisions operation. -type BatchGetApplicationRevisionsInput struct { - _ struct{} `type:"structure"` - - // The name of an AWS CodeDeploy application about which to get revision information. - // - // ApplicationName is a required field - ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - - // Information to get about the application revisions, including type and location. - // - // Revisions is a required field - Revisions []*RevisionLocation `locationName:"revisions" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchGetApplicationRevisionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetApplicationRevisionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetApplicationRevisionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetApplicationRevisionsInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.Revisions == nil { - invalidParams.Add(request.NewErrParamRequired("Revisions")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *BatchGetApplicationRevisionsInput) SetApplicationName(v string) *BatchGetApplicationRevisionsInput { - s.ApplicationName = &v - return s -} - -// SetRevisions sets the Revisions field's value. -func (s *BatchGetApplicationRevisionsInput) SetRevisions(v []*RevisionLocation) *BatchGetApplicationRevisionsInput { - s.Revisions = v - return s -} - -// Represents the output of a BatchGetApplicationRevisions operation. -type BatchGetApplicationRevisionsOutput struct { - _ struct{} `type:"structure"` - - // The name of the application that corresponds to the revisions. - ApplicationName *string `locationName:"applicationName" min:"1" type:"string"` - - // Information about errors that might have occurred during the API call. - ErrorMessage *string `locationName:"errorMessage" type:"string"` - - // Additional information about the revisions, including the type and location. - Revisions []*RevisionInfo `locationName:"revisions" type:"list"` -} - -// String returns the string representation -func (s BatchGetApplicationRevisionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetApplicationRevisionsOutput) GoString() string { - return s.String() -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *BatchGetApplicationRevisionsOutput) SetApplicationName(v string) *BatchGetApplicationRevisionsOutput { - s.ApplicationName = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *BatchGetApplicationRevisionsOutput) SetErrorMessage(v string) *BatchGetApplicationRevisionsOutput { - s.ErrorMessage = &v - return s -} - -// SetRevisions sets the Revisions field's value. -func (s *BatchGetApplicationRevisionsOutput) SetRevisions(v []*RevisionInfo) *BatchGetApplicationRevisionsOutput { - s.Revisions = v - return s -} - -// Represents the input of a BatchGetApplications operation. -type BatchGetApplicationsInput struct { - _ struct{} `type:"structure"` - - // A list of application names separated by spaces. - // - // ApplicationNames is a required field - ApplicationNames []*string `locationName:"applicationNames" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchGetApplicationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetApplicationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetApplicationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetApplicationsInput"} - if s.ApplicationNames == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationNames sets the ApplicationNames field's value. -func (s *BatchGetApplicationsInput) SetApplicationNames(v []*string) *BatchGetApplicationsInput { - s.ApplicationNames = v - return s -} - -// Represents the output of a BatchGetApplications operation. -type BatchGetApplicationsOutput struct { - _ struct{} `type:"structure"` - - // Information about the applications. - ApplicationsInfo []*ApplicationInfo `locationName:"applicationsInfo" type:"list"` -} - -// String returns the string representation -func (s BatchGetApplicationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetApplicationsOutput) GoString() string { - return s.String() -} - -// SetApplicationsInfo sets the ApplicationsInfo field's value. -func (s *BatchGetApplicationsOutput) SetApplicationsInfo(v []*ApplicationInfo) *BatchGetApplicationsOutput { - s.ApplicationsInfo = v - return s -} - -// Represents the input of a BatchGetDeploymentGroups operation. -type BatchGetDeploymentGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. - // - // ApplicationName is a required field - ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - - // The names of the deployment groups. - // - // DeploymentGroupNames is a required field - DeploymentGroupNames []*string `locationName:"deploymentGroupNames" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchGetDeploymentGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetDeploymentGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetDeploymentGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetDeploymentGroupsInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.DeploymentGroupNames == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentGroupNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *BatchGetDeploymentGroupsInput) SetApplicationName(v string) *BatchGetDeploymentGroupsInput { - s.ApplicationName = &v - return s -} - -// SetDeploymentGroupNames sets the DeploymentGroupNames field's value. -func (s *BatchGetDeploymentGroupsInput) SetDeploymentGroupNames(v []*string) *BatchGetDeploymentGroupsInput { - s.DeploymentGroupNames = v - return s -} - -// Represents the output of a BatchGetDeploymentGroups operation. -type BatchGetDeploymentGroupsOutput struct { - _ struct{} `type:"structure"` - - // Information about the deployment groups. - DeploymentGroupsInfo []*DeploymentGroupInfo `locationName:"deploymentGroupsInfo" type:"list"` - - // Information about errors that might have occurred during the API call. - ErrorMessage *string `locationName:"errorMessage" type:"string"` -} - -// String returns the string representation -func (s BatchGetDeploymentGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetDeploymentGroupsOutput) GoString() string { - return s.String() -} - -// SetDeploymentGroupsInfo sets the DeploymentGroupsInfo field's value. -func (s *BatchGetDeploymentGroupsOutput) SetDeploymentGroupsInfo(v []*DeploymentGroupInfo) *BatchGetDeploymentGroupsOutput { - s.DeploymentGroupsInfo = v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *BatchGetDeploymentGroupsOutput) SetErrorMessage(v string) *BatchGetDeploymentGroupsOutput { - s.ErrorMessage = &v - return s -} - -// Represents the input of a BatchGetDeploymentInstances operation. -type BatchGetDeploymentInstancesInput struct { - _ struct{} `type:"structure"` - - // The unique ID of a deployment. - // - // DeploymentId is a required field - DeploymentId *string `locationName:"deploymentId" type:"string" required:"true"` - - // The unique IDs of instances used in the deployment. - // - // InstanceIds is a required field - InstanceIds []*string `locationName:"instanceIds" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchGetDeploymentInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetDeploymentInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetDeploymentInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetDeploymentInstancesInput"} - if s.DeploymentId == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentId")) - } - if s.InstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *BatchGetDeploymentInstancesInput) SetDeploymentId(v string) *BatchGetDeploymentInstancesInput { - s.DeploymentId = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *BatchGetDeploymentInstancesInput) SetInstanceIds(v []*string) *BatchGetDeploymentInstancesInput { - s.InstanceIds = v - return s -} - -// Represents the output of a BatchGetDeploymentInstances operation. -type BatchGetDeploymentInstancesOutput struct { - _ struct{} `type:"structure"` - - // Information about errors that might have occurred during the API call. - ErrorMessage *string `locationName:"errorMessage" type:"string"` - - // Information about the instance. - InstancesSummary []*InstanceSummary `locationName:"instancesSummary" type:"list"` -} - -// String returns the string representation -func (s BatchGetDeploymentInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetDeploymentInstancesOutput) GoString() string { - return s.String() -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *BatchGetDeploymentInstancesOutput) SetErrorMessage(v string) *BatchGetDeploymentInstancesOutput { - s.ErrorMessage = &v - return s -} - -// SetInstancesSummary sets the InstancesSummary field's value. -func (s *BatchGetDeploymentInstancesOutput) SetInstancesSummary(v []*InstanceSummary) *BatchGetDeploymentInstancesOutput { - s.InstancesSummary = v - return s -} - -type BatchGetDeploymentTargetsInput struct { - _ struct{} `type:"structure"` - - // The unique ID of a deployment. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // The unique IDs of the deployment targets. The compute platform of the deployment - // determines the type of the targets and their formats. - // - // * For deployments that use the EC2/On-premises compute platform, the - // target IDs are EC2 or on-premises instances IDs, and their target type - // is instanceTarget. - // - // * For deployments that use the AWS Lambda compute platform, the target - // IDs are the names of Lambda functions, and their target type is instanceTarget. - // - // - // * For deployments that use the Amazon ECS compute platform, the target - // IDs are pairs of Amazon ECS clusters and services specified using the - // format :. Their target type is ecsTarget. - TargetIds []*string `locationName:"targetIds" type:"list"` -} - -// String returns the string representation -func (s BatchGetDeploymentTargetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetDeploymentTargetsInput) GoString() string { - return s.String() -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *BatchGetDeploymentTargetsInput) SetDeploymentId(v string) *BatchGetDeploymentTargetsInput { - s.DeploymentId = &v - return s -} - -// SetTargetIds sets the TargetIds field's value. -func (s *BatchGetDeploymentTargetsInput) SetTargetIds(v []*string) *BatchGetDeploymentTargetsInput { - s.TargetIds = v - return s -} - -type BatchGetDeploymentTargetsOutput struct { - _ struct{} `type:"structure"` - - // A list of target objects for a deployment. Each target object contains details - // about the target, such as its status and lifecycle events. The type of the - // target objects depends on the deployment' compute platform. - // - // * EC2/On-premises: Each target object is an EC2 or on-premises instance. - // - // - // * AWS Lambda: The target object is a specific version of an AWS Lambda - // function. - // - // * Amazon ECS: The target object is an Amazon ECS service. - DeploymentTargets []*DeploymentTarget `locationName:"deploymentTargets" type:"list"` -} - -// String returns the string representation -func (s BatchGetDeploymentTargetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetDeploymentTargetsOutput) GoString() string { - return s.String() -} - -// SetDeploymentTargets sets the DeploymentTargets field's value. -func (s *BatchGetDeploymentTargetsOutput) SetDeploymentTargets(v []*DeploymentTarget) *BatchGetDeploymentTargetsOutput { - s.DeploymentTargets = v - return s -} - -// Represents the input of a BatchGetDeployments operation. -type BatchGetDeploymentsInput struct { - _ struct{} `type:"structure"` - - // A list of deployment IDs, separated by spaces. - // - // DeploymentIds is a required field - DeploymentIds []*string `locationName:"deploymentIds" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchGetDeploymentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetDeploymentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetDeploymentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetDeploymentsInput"} - if s.DeploymentIds == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeploymentIds sets the DeploymentIds field's value. -func (s *BatchGetDeploymentsInput) SetDeploymentIds(v []*string) *BatchGetDeploymentsInput { - s.DeploymentIds = v - return s -} - -// Represents the output of a BatchGetDeployments operation. -type BatchGetDeploymentsOutput struct { - _ struct{} `type:"structure"` - - // Information about the deployments. - DeploymentsInfo []*DeploymentInfo `locationName:"deploymentsInfo" type:"list"` -} - -// String returns the string representation -func (s BatchGetDeploymentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetDeploymentsOutput) GoString() string { - return s.String() -} - -// SetDeploymentsInfo sets the DeploymentsInfo field's value. -func (s *BatchGetDeploymentsOutput) SetDeploymentsInfo(v []*DeploymentInfo) *BatchGetDeploymentsOutput { - s.DeploymentsInfo = v - return s -} - -// Represents the input of a BatchGetOnPremisesInstances operation. -type BatchGetOnPremisesInstancesInput struct { - _ struct{} `type:"structure"` - - // The names of the on-premises instances about which to get information. - // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchGetOnPremisesInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetOnPremisesInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetOnPremisesInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetOnPremisesInstancesInput"} - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceNames sets the InstanceNames field's value. -func (s *BatchGetOnPremisesInstancesInput) SetInstanceNames(v []*string) *BatchGetOnPremisesInstancesInput { - s.InstanceNames = v - return s -} - -// Represents the output of a BatchGetOnPremisesInstances operation. -type BatchGetOnPremisesInstancesOutput struct { - _ struct{} `type:"structure"` - - // Information about the on-premises instances. - InstanceInfos []*InstanceInfo `locationName:"instanceInfos" type:"list"` -} - -// String returns the string representation -func (s BatchGetOnPremisesInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetOnPremisesInstancesOutput) GoString() string { - return s.String() -} - -// SetInstanceInfos sets the InstanceInfos field's value. -func (s *BatchGetOnPremisesInstancesOutput) SetInstanceInfos(v []*InstanceInfo) *BatchGetOnPremisesInstancesOutput { - s.InstanceInfos = v - return s -} - -// Information about blue/green deployment options for a deployment group. -type BlueGreenDeploymentConfiguration struct { - _ struct{} `type:"structure"` - - // Information about the action to take when newly provisioned instances are - // ready to receive traffic in a blue/green deployment. - DeploymentReadyOption *DeploymentReadyOption `locationName:"deploymentReadyOption" type:"structure"` - - // Information about how instances are provisioned for a replacement environment - // in a blue/green deployment. - GreenFleetProvisioningOption *GreenFleetProvisioningOption `locationName:"greenFleetProvisioningOption" type:"structure"` - - // Information about whether to terminate instances in the original fleet during - // a blue/green deployment. - TerminateBlueInstancesOnDeploymentSuccess *BlueInstanceTerminationOption `locationName:"terminateBlueInstancesOnDeploymentSuccess" type:"structure"` -} - -// String returns the string representation -func (s BlueGreenDeploymentConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BlueGreenDeploymentConfiguration) GoString() string { - return s.String() -} - -// SetDeploymentReadyOption sets the DeploymentReadyOption field's value. -func (s *BlueGreenDeploymentConfiguration) SetDeploymentReadyOption(v *DeploymentReadyOption) *BlueGreenDeploymentConfiguration { - s.DeploymentReadyOption = v - return s -} - -// SetGreenFleetProvisioningOption sets the GreenFleetProvisioningOption field's value. -func (s *BlueGreenDeploymentConfiguration) SetGreenFleetProvisioningOption(v *GreenFleetProvisioningOption) *BlueGreenDeploymentConfiguration { - s.GreenFleetProvisioningOption = v - return s -} - -// SetTerminateBlueInstancesOnDeploymentSuccess sets the TerminateBlueInstancesOnDeploymentSuccess field's value. -func (s *BlueGreenDeploymentConfiguration) SetTerminateBlueInstancesOnDeploymentSuccess(v *BlueInstanceTerminationOption) *BlueGreenDeploymentConfiguration { - s.TerminateBlueInstancesOnDeploymentSuccess = v - return s -} - -// Information about whether instances in the original environment are terminated -// when a blue/green deployment is successful. -type BlueInstanceTerminationOption struct { - _ struct{} `type:"structure"` - - // The action to take on instances in the original environment after a successful - // blue/green deployment. - // - // * TERMINATE: Instances are terminated after a specified wait time. - // - // * KEEP_ALIVE: Instances are left running after they are deregistered from - // the load balancer and removed from the deployment group. - Action *string `locationName:"action" type:"string" enum:"InstanceAction"` - - // The number of minutes to wait after a successful blue/green deployment before - // terminating instances from the original environment. The maximum setting - // is 2880 minutes (2 days). - TerminationWaitTimeInMinutes *int64 `locationName:"terminationWaitTimeInMinutes" type:"integer"` -} - -// String returns the string representation -func (s BlueInstanceTerminationOption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BlueInstanceTerminationOption) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *BlueInstanceTerminationOption) SetAction(v string) *BlueInstanceTerminationOption { - s.Action = &v - return s -} - -// SetTerminationWaitTimeInMinutes sets the TerminationWaitTimeInMinutes field's value. -func (s *BlueInstanceTerminationOption) SetTerminationWaitTimeInMinutes(v int64) *BlueInstanceTerminationOption { - s.TerminationWaitTimeInMinutes = &v - return s -} - -type ContinueDeploymentInput struct { - _ struct{} `type:"structure"` - - // The unique ID of a blue/green deployment for which you want to start rerouting - // traffic to the replacement environment. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // The status of the deployment's waiting period. READY_WAIT indicates the deployment - // is ready to start shifting traffic. TERMINATION_WAIT indicates the traffic - // is shifted, but the original target is not terminated. - DeploymentWaitType *string `locationName:"deploymentWaitType" type:"string" enum:"DeploymentWaitType"` -} - -// String returns the string representation -func (s ContinueDeploymentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContinueDeploymentInput) GoString() string { - return s.String() -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *ContinueDeploymentInput) SetDeploymentId(v string) *ContinueDeploymentInput { - s.DeploymentId = &v - return s -} - -// SetDeploymentWaitType sets the DeploymentWaitType field's value. -func (s *ContinueDeploymentInput) SetDeploymentWaitType(v string) *ContinueDeploymentInput { - s.DeploymentWaitType = &v - return s -} - -type ContinueDeploymentOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ContinueDeploymentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContinueDeploymentOutput) GoString() string { - return s.String() -} - -// Represents the input of a CreateApplication operation. -type CreateApplicationInput struct { - _ struct{} `type:"structure"` - - // The name of the application. This name must be unique with the applicable - // IAM user or AWS account. - // - // ApplicationName is a required field - ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - - // The destination platform type for the deployment (Lambda or Server). - ComputePlatform *string `locationName:"computePlatform" type:"string" enum:"ComputePlatform"` -} - -// String returns the string representation -func (s CreateApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateApplicationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *CreateApplicationInput) SetApplicationName(v string) *CreateApplicationInput { - s.ApplicationName = &v - return s -} - -// SetComputePlatform sets the ComputePlatform field's value. -func (s *CreateApplicationInput) SetComputePlatform(v string) *CreateApplicationInput { - s.ComputePlatform = &v - return s -} - -// Represents the output of a CreateApplication operation. -type CreateApplicationOutput struct { - _ struct{} `type:"structure"` - - // A unique application ID. - ApplicationId *string `locationName:"applicationId" type:"string"` -} - -// String returns the string representation -func (s CreateApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApplicationOutput) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *CreateApplicationOutput) SetApplicationId(v string) *CreateApplicationOutput { - s.ApplicationId = &v - return s -} - -// Represents the input of a CreateDeploymentConfig operation. -type CreateDeploymentConfigInput struct { - _ struct{} `type:"structure"` - - // The destination platform type for the deployment (Lambda or Server>). - ComputePlatform *string `locationName:"computePlatform" type:"string" enum:"ComputePlatform"` - - // The name of the deployment configuration to create. - // - // DeploymentConfigName is a required field - DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string" required:"true"` - - // The minimum number of healthy instances that should be available at any time - // during the deployment. There are two parameters expected in the input: type - // and value. - // - // The type parameter takes either of the following values: - // - // * HOST_COUNT: The value parameter represents the minimum number of healthy - // instances as an absolute value. - // - // * FLEET_PERCENT: The value parameter represents the minimum number of - // healthy instances as a percentage of the total number of instances in - // the deployment. If you specify FLEET_PERCENT, at the start of the deployment, - // AWS CodeDeploy converts the percentage to the equivalent number of instance - // and rounds up fractional instances. - // - // The value parameter takes an integer. - // - // For example, to set a minimum of 95% healthy instance, specify a type of - // FLEET_PERCENT and a value of 95. - MinimumHealthyHosts *MinimumHealthyHosts `locationName:"minimumHealthyHosts" type:"structure"` - - // The configuration that specifies how the deployment traffic is routed. - TrafficRoutingConfig *TrafficRoutingConfig `locationName:"trafficRoutingConfig" type:"structure"` -} - -// String returns the string representation -func (s CreateDeploymentConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDeploymentConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDeploymentConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDeploymentConfigInput"} - if s.DeploymentConfigName == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentConfigName")) - } - if s.DeploymentConfigName != nil && len(*s.DeploymentConfigName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeploymentConfigName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComputePlatform sets the ComputePlatform field's value. -func (s *CreateDeploymentConfigInput) SetComputePlatform(v string) *CreateDeploymentConfigInput { - s.ComputePlatform = &v - return s -} - -// SetDeploymentConfigName sets the DeploymentConfigName field's value. -func (s *CreateDeploymentConfigInput) SetDeploymentConfigName(v string) *CreateDeploymentConfigInput { - s.DeploymentConfigName = &v - return s -} - -// SetMinimumHealthyHosts sets the MinimumHealthyHosts field's value. -func (s *CreateDeploymentConfigInput) SetMinimumHealthyHosts(v *MinimumHealthyHosts) *CreateDeploymentConfigInput { - s.MinimumHealthyHosts = v - return s -} - -// SetTrafficRoutingConfig sets the TrafficRoutingConfig field's value. -func (s *CreateDeploymentConfigInput) SetTrafficRoutingConfig(v *TrafficRoutingConfig) *CreateDeploymentConfigInput { - s.TrafficRoutingConfig = v - return s -} - -// Represents the output of a CreateDeploymentConfig operation. -type CreateDeploymentConfigOutput struct { - _ struct{} `type:"structure"` - - // A unique deployment configuration ID. - DeploymentConfigId *string `locationName:"deploymentConfigId" type:"string"` -} - -// String returns the string representation -func (s CreateDeploymentConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDeploymentConfigOutput) GoString() string { - return s.String() -} - -// SetDeploymentConfigId sets the DeploymentConfigId field's value. -func (s *CreateDeploymentConfigOutput) SetDeploymentConfigId(v string) *CreateDeploymentConfigOutput { - s.DeploymentConfigId = &v - return s -} - -// Represents the input of a CreateDeploymentGroup operation. -type CreateDeploymentGroupInput struct { - _ struct{} `type:"structure"` - - // Information to add about Amazon CloudWatch alarms when the deployment group - // is created. - AlarmConfiguration *AlarmConfiguration `locationName:"alarmConfiguration" type:"structure"` - - // The name of an AWS CodeDeploy application associated with the IAM user or - // AWS account. - // - // ApplicationName is a required field - ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - - // Configuration information for an automatic rollback that is added when a - // deployment group is created. - AutoRollbackConfiguration *AutoRollbackConfiguration `locationName:"autoRollbackConfiguration" type:"structure"` - - // A list of associated Amazon EC2 Auto Scaling groups. - AutoScalingGroups []*string `locationName:"autoScalingGroups" type:"list"` - - // Information about blue/green deployment options for a deployment group. - BlueGreenDeploymentConfiguration *BlueGreenDeploymentConfiguration `locationName:"blueGreenDeploymentConfiguration" type:"structure"` - - // If specified, the deployment configuration name can be either one of the - // predefined configurations provided with AWS CodeDeploy or a custom deployment - // configuration that you create by calling the create deployment configuration - // operation. - // - // CodeDeployDefault.OneAtATime is the default deployment configuration. It - // is used if a configuration isn't specified for the deployment or deployment - // group. - // - // For more information about the predefined deployment configurations in AWS - // CodeDeploy, see Working with Deployment Groups in AWS CodeDeploy (http://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations.html) - // in the AWS CodeDeploy User Guide. - DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string"` - - // The name of a new deployment group for the specified application. - // - // DeploymentGroupName is a required field - DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string" required:"true"` - - // Information about the type of deployment, in-place or blue/green, that you - // want to run and whether to route deployment traffic behind a load balancer. - DeploymentStyle *DeploymentStyle `locationName:"deploymentStyle" type:"structure"` - - // The Amazon EC2 tags on which to filter. The deployment group includes EC2 - // instances with any of the specified tags. Cannot be used in the same call - // as ec2TagSet. - Ec2TagFilters []*EC2TagFilter `locationName:"ec2TagFilters" type:"list"` - - // Information about groups of tags applied to EC2 instances. The deployment - // group includes only EC2 instances identified by all the tag groups. Cannot - // be used in the same call as ec2TagFilters. - Ec2TagSet *EC2TagSet `locationName:"ec2TagSet" type:"structure"` - - // The target Amazon ECS services in the deployment group. This applies only - // to deployment groups that use the Amazon ECS compute platform. A target Amazon - // ECS service is specified as an Amazon ECS cluster and service name pair using - // the format :. - EcsServices []*ECSService `locationName:"ecsServices" type:"list"` - - // Information about the load balancer used in a deployment. - LoadBalancerInfo *LoadBalancerInfo `locationName:"loadBalancerInfo" type:"structure"` - - // The on-premises instance tags on which to filter. The deployment group includes - // on-premises instances with any of the specified tags. Cannot be used in the - // same call as OnPremisesTagSet. - OnPremisesInstanceTagFilters []*TagFilter `locationName:"onPremisesInstanceTagFilters" type:"list"` - - // Information about groups of tags applied to on-premises instances. The deployment - // group includes only on-premises instances identified by all of the tag groups. - // Cannot be used in the same call as onPremisesInstanceTagFilters. - OnPremisesTagSet *OnPremisesTagSet `locationName:"onPremisesTagSet" type:"structure"` - - // A service role ARN that allows AWS CodeDeploy to act on the user's behalf - // when interacting with AWS services. - // - // ServiceRoleArn is a required field - ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string" required:"true"` - - // Information about triggers to create when the deployment group is created. - // For examples, see Create a Trigger for an AWS CodeDeploy Event (http://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-sns.html) - // in the AWS CodeDeploy User Guide. - TriggerConfigurations []*TriggerConfig `locationName:"triggerConfigurations" type:"list"` -} - -// String returns the string representation -func (s CreateDeploymentGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDeploymentGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDeploymentGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDeploymentGroupInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.DeploymentConfigName != nil && len(*s.DeploymentConfigName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeploymentConfigName", 1)) - } - if s.DeploymentGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentGroupName")) - } - if s.DeploymentGroupName != nil && len(*s.DeploymentGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeploymentGroupName", 1)) - } - if s.ServiceRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceRoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlarmConfiguration sets the AlarmConfiguration field's value. -func (s *CreateDeploymentGroupInput) SetAlarmConfiguration(v *AlarmConfiguration) *CreateDeploymentGroupInput { - s.AlarmConfiguration = v - return s -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *CreateDeploymentGroupInput) SetApplicationName(v string) *CreateDeploymentGroupInput { - s.ApplicationName = &v - return s -} - -// SetAutoRollbackConfiguration sets the AutoRollbackConfiguration field's value. -func (s *CreateDeploymentGroupInput) SetAutoRollbackConfiguration(v *AutoRollbackConfiguration) *CreateDeploymentGroupInput { - s.AutoRollbackConfiguration = v - return s -} - -// SetAutoScalingGroups sets the AutoScalingGroups field's value. -func (s *CreateDeploymentGroupInput) SetAutoScalingGroups(v []*string) *CreateDeploymentGroupInput { - s.AutoScalingGroups = v - return s -} - -// SetBlueGreenDeploymentConfiguration sets the BlueGreenDeploymentConfiguration field's value. -func (s *CreateDeploymentGroupInput) SetBlueGreenDeploymentConfiguration(v *BlueGreenDeploymentConfiguration) *CreateDeploymentGroupInput { - s.BlueGreenDeploymentConfiguration = v - return s -} - -// SetDeploymentConfigName sets the DeploymentConfigName field's value. -func (s *CreateDeploymentGroupInput) SetDeploymentConfigName(v string) *CreateDeploymentGroupInput { - s.DeploymentConfigName = &v - return s -} - -// SetDeploymentGroupName sets the DeploymentGroupName field's value. -func (s *CreateDeploymentGroupInput) SetDeploymentGroupName(v string) *CreateDeploymentGroupInput { - s.DeploymentGroupName = &v - return s -} - -// SetDeploymentStyle sets the DeploymentStyle field's value. -func (s *CreateDeploymentGroupInput) SetDeploymentStyle(v *DeploymentStyle) *CreateDeploymentGroupInput { - s.DeploymentStyle = v - return s -} - -// SetEc2TagFilters sets the Ec2TagFilters field's value. -func (s *CreateDeploymentGroupInput) SetEc2TagFilters(v []*EC2TagFilter) *CreateDeploymentGroupInput { - s.Ec2TagFilters = v - return s -} - -// SetEc2TagSet sets the Ec2TagSet field's value. -func (s *CreateDeploymentGroupInput) SetEc2TagSet(v *EC2TagSet) *CreateDeploymentGroupInput { - s.Ec2TagSet = v - return s -} - -// SetEcsServices sets the EcsServices field's value. -func (s *CreateDeploymentGroupInput) SetEcsServices(v []*ECSService) *CreateDeploymentGroupInput { - s.EcsServices = v - return s -} - -// SetLoadBalancerInfo sets the LoadBalancerInfo field's value. -func (s *CreateDeploymentGroupInput) SetLoadBalancerInfo(v *LoadBalancerInfo) *CreateDeploymentGroupInput { - s.LoadBalancerInfo = v - return s -} - -// SetOnPremisesInstanceTagFilters sets the OnPremisesInstanceTagFilters field's value. -func (s *CreateDeploymentGroupInput) SetOnPremisesInstanceTagFilters(v []*TagFilter) *CreateDeploymentGroupInput { - s.OnPremisesInstanceTagFilters = v - return s -} - -// SetOnPremisesTagSet sets the OnPremisesTagSet field's value. -func (s *CreateDeploymentGroupInput) SetOnPremisesTagSet(v *OnPremisesTagSet) *CreateDeploymentGroupInput { - s.OnPremisesTagSet = v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *CreateDeploymentGroupInput) SetServiceRoleArn(v string) *CreateDeploymentGroupInput { - s.ServiceRoleArn = &v - return s -} - -// SetTriggerConfigurations sets the TriggerConfigurations field's value. -func (s *CreateDeploymentGroupInput) SetTriggerConfigurations(v []*TriggerConfig) *CreateDeploymentGroupInput { - s.TriggerConfigurations = v - return s -} - -// Represents the output of a CreateDeploymentGroup operation. -type CreateDeploymentGroupOutput struct { - _ struct{} `type:"structure"` - - // A unique deployment group ID. - DeploymentGroupId *string `locationName:"deploymentGroupId" type:"string"` -} - -// String returns the string representation -func (s CreateDeploymentGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDeploymentGroupOutput) GoString() string { - return s.String() -} - -// SetDeploymentGroupId sets the DeploymentGroupId field's value. -func (s *CreateDeploymentGroupOutput) SetDeploymentGroupId(v string) *CreateDeploymentGroupOutput { - s.DeploymentGroupId = &v - return s -} - -// Represents the input of a CreateDeployment operation. -type CreateDeploymentInput struct { - _ struct{} `type:"structure"` - - // The name of an AWS CodeDeploy application associated with the IAM user or - // AWS account. - // - // ApplicationName is a required field - ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - - // Configuration information for an automatic rollback that is added when a - // deployment is created. - AutoRollbackConfiguration *AutoRollbackConfiguration `locationName:"autoRollbackConfiguration" type:"structure"` - - // The name of a deployment configuration associated with the IAM user or AWS - // account. - // - // If not specified, the value configured in the deployment group is used as - // the default. If the deployment group does not have a deployment configuration - // associated with it, CodeDeployDefault.OneAtATime is used by default. - DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string"` - - // The name of the deployment group. - DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string"` - - // A comment about the deployment. - Description *string `locationName:"description" type:"string"` - - // Information about how AWS CodeDeploy handles files that already exist in - // a deployment target location but weren't part of the previous successful - // deployment. - // - // The fileExistsBehavior parameter takes any of the following values: - // - // * DISALLOW: The deployment fails. This is also the default behavior if - // no option is specified. - // - // * OVERWRITE: The version of the file from the application revision currently - // being deployed replaces the version already on the instance. - // - // * RETAIN: The version of the file already on the instance is kept and - // used as part of the new deployment. - FileExistsBehavior *string `locationName:"fileExistsBehavior" type:"string" enum:"FileExistsBehavior"` - - // If set to true, then if the deployment causes the ApplicationStop deployment - // lifecycle event to an instance to fail, the deployment to that instance is - // considered to have failed at that point and continues on to the BeforeInstall - // deployment lifecycle event. - // - // If set to false or not specified, then if the deployment causes the ApplicationStop - // deployment lifecycle event to fail to an instance, the deployment to that - // instance stops, and the deployment to that instance is considered to have - // failed. - IgnoreApplicationStopFailures *bool `locationName:"ignoreApplicationStopFailures" type:"boolean"` - - // The type and location of the revision to deploy. - Revision *RevisionLocation `locationName:"revision" type:"structure"` - - // Information about the instances that belong to the replacement environment - // in a blue/green deployment. - TargetInstances *TargetInstances `locationName:"targetInstances" type:"structure"` - - // Indicates whether to deploy to all instances or only to instances that are - // not running the latest application revision. - UpdateOutdatedInstancesOnly *bool `locationName:"updateOutdatedInstancesOnly" type:"boolean"` -} - -// 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.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.DeploymentConfigName != nil && len(*s.DeploymentConfigName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeploymentConfigName", 1)) - } - if s.DeploymentGroupName != nil && len(*s.DeploymentGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeploymentGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *CreateDeploymentInput) SetApplicationName(v string) *CreateDeploymentInput { - s.ApplicationName = &v - return s -} - -// SetAutoRollbackConfiguration sets the AutoRollbackConfiguration field's value. -func (s *CreateDeploymentInput) SetAutoRollbackConfiguration(v *AutoRollbackConfiguration) *CreateDeploymentInput { - s.AutoRollbackConfiguration = v - return s -} - -// SetDeploymentConfigName sets the DeploymentConfigName field's value. -func (s *CreateDeploymentInput) SetDeploymentConfigName(v string) *CreateDeploymentInput { - s.DeploymentConfigName = &v - return s -} - -// SetDeploymentGroupName sets the DeploymentGroupName field's value. -func (s *CreateDeploymentInput) SetDeploymentGroupName(v string) *CreateDeploymentInput { - s.DeploymentGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateDeploymentInput) SetDescription(v string) *CreateDeploymentInput { - s.Description = &v - return s -} - -// SetFileExistsBehavior sets the FileExistsBehavior field's value. -func (s *CreateDeploymentInput) SetFileExistsBehavior(v string) *CreateDeploymentInput { - s.FileExistsBehavior = &v - return s -} - -// SetIgnoreApplicationStopFailures sets the IgnoreApplicationStopFailures field's value. -func (s *CreateDeploymentInput) SetIgnoreApplicationStopFailures(v bool) *CreateDeploymentInput { - s.IgnoreApplicationStopFailures = &v - return s -} - -// SetRevision sets the Revision field's value. -func (s *CreateDeploymentInput) SetRevision(v *RevisionLocation) *CreateDeploymentInput { - s.Revision = v - return s -} - -// SetTargetInstances sets the TargetInstances field's value. -func (s *CreateDeploymentInput) SetTargetInstances(v *TargetInstances) *CreateDeploymentInput { - s.TargetInstances = v - return s -} - -// SetUpdateOutdatedInstancesOnly sets the UpdateOutdatedInstancesOnly field's value. -func (s *CreateDeploymentInput) SetUpdateOutdatedInstancesOnly(v bool) *CreateDeploymentInput { - s.UpdateOutdatedInstancesOnly = &v - return s -} - -// Represents the output of a CreateDeployment operation. -type CreateDeploymentOutput struct { - _ struct{} `type:"structure"` - - // The unique ID of a deployment. - DeploymentId *string `locationName:"deploymentId" 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() -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *CreateDeploymentOutput) SetDeploymentId(v string) *CreateDeploymentOutput { - s.DeploymentId = &v - return s -} - -// Represents the input of a DeleteApplication operation. -type DeleteApplicationInput struct { - _ struct{} `type:"structure"` - - // The name of an AWS CodeDeploy application associated with the IAM user or - // AWS account. - // - // ApplicationName is a required field - ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DeleteApplicationInput) SetApplicationName(v string) *DeleteApplicationInput { - s.ApplicationName = &v - return s -} - -type DeleteApplicationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationOutput) GoString() string { - return s.String() -} - -// Represents the input of a DeleteDeploymentConfig operation. -type DeleteDeploymentConfigInput struct { - _ struct{} `type:"structure"` - - // The name of a deployment configuration associated with the IAM user or AWS - // account. - // - // DeploymentConfigName is a required field - DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDeploymentConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDeploymentConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDeploymentConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDeploymentConfigInput"} - if s.DeploymentConfigName == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentConfigName")) - } - if s.DeploymentConfigName != nil && len(*s.DeploymentConfigName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeploymentConfigName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeploymentConfigName sets the DeploymentConfigName field's value. -func (s *DeleteDeploymentConfigInput) SetDeploymentConfigName(v string) *DeleteDeploymentConfigInput { - s.DeploymentConfigName = &v - return s -} - -type DeleteDeploymentConfigOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDeploymentConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDeploymentConfigOutput) GoString() string { - return s.String() -} - -// Represents the input of a DeleteDeploymentGroup operation. -type DeleteDeploymentGroupInput struct { - _ struct{} `type:"structure"` - - // The name of an AWS CodeDeploy application associated with the IAM user or - // AWS account. - // - // ApplicationName is a required field - ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - - // The name of a deployment group for the specified application. - // - // DeploymentGroupName is a required field - DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDeploymentGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDeploymentGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDeploymentGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDeploymentGroupInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.DeploymentGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentGroupName")) - } - if s.DeploymentGroupName != nil && len(*s.DeploymentGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeploymentGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DeleteDeploymentGroupInput) SetApplicationName(v string) *DeleteDeploymentGroupInput { - s.ApplicationName = &v - return s -} - -// SetDeploymentGroupName sets the DeploymentGroupName field's value. -func (s *DeleteDeploymentGroupInput) SetDeploymentGroupName(v string) *DeleteDeploymentGroupInput { - s.DeploymentGroupName = &v - return s -} - -// Represents the output of a DeleteDeploymentGroup operation. -type DeleteDeploymentGroupOutput struct { - _ struct{} `type:"structure"` - - // If the output contains no data, and the corresponding deployment group contained - // at least one Auto Scaling group, AWS CodeDeploy successfully removed all - // corresponding Auto Scaling lifecycle event hooks from the Amazon EC2 instances - // in the Auto Scaling group. If the output contains data, AWS CodeDeploy could - // not remove some Auto Scaling lifecycle event hooks from the Amazon EC2 instances - // in the Auto Scaling group. - HooksNotCleanedUp []*AutoScalingGroup `locationName:"hooksNotCleanedUp" type:"list"` -} - -// String returns the string representation -func (s DeleteDeploymentGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDeploymentGroupOutput) GoString() string { - return s.String() -} - -// SetHooksNotCleanedUp sets the HooksNotCleanedUp field's value. -func (s *DeleteDeploymentGroupOutput) SetHooksNotCleanedUp(v []*AutoScalingGroup) *DeleteDeploymentGroupOutput { - s.HooksNotCleanedUp = v - return s -} - -// Represents the input of a DeleteGitHubAccount operation. -type DeleteGitHubAccountTokenInput struct { - _ struct{} `type:"structure"` - - // The name of the GitHub account connection to delete. - TokenName *string `locationName:"tokenName" type:"string"` -} - -// String returns the string representation -func (s DeleteGitHubAccountTokenInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGitHubAccountTokenInput) GoString() string { - return s.String() -} - -// SetTokenName sets the TokenName field's value. -func (s *DeleteGitHubAccountTokenInput) SetTokenName(v string) *DeleteGitHubAccountTokenInput { - s.TokenName = &v - return s -} - -// Represents the output of a DeleteGitHubAccountToken operation. -type DeleteGitHubAccountTokenOutput struct { - _ struct{} `type:"structure"` - - // The name of the GitHub account connection that was deleted. - TokenName *string `locationName:"tokenName" type:"string"` -} - -// String returns the string representation -func (s DeleteGitHubAccountTokenOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGitHubAccountTokenOutput) GoString() string { - return s.String() -} - -// SetTokenName sets the TokenName field's value. -func (s *DeleteGitHubAccountTokenOutput) SetTokenName(v string) *DeleteGitHubAccountTokenOutput { - s.TokenName = &v - return s -} - -// Information about a deployment configuration. -type DeploymentConfigInfo struct { - _ struct{} `type:"structure"` - - // The destination platform type for the deployment (Lambda or Server). - ComputePlatform *string `locationName:"computePlatform" type:"string" enum:"ComputePlatform"` - - // The time at which the deployment configuration was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - - // The deployment configuration ID. - DeploymentConfigId *string `locationName:"deploymentConfigId" type:"string"` - - // The deployment configuration name. - DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string"` - - // Information about the number or percentage of minimum healthy instance. - MinimumHealthyHosts *MinimumHealthyHosts `locationName:"minimumHealthyHosts" type:"structure"` - - // The configuration that specifies how the deployment traffic is routed. Only - // deployments with a Lambda compute platform can specify this. - TrafficRoutingConfig *TrafficRoutingConfig `locationName:"trafficRoutingConfig" type:"structure"` -} - -// String returns the string representation -func (s DeploymentConfigInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeploymentConfigInfo) GoString() string { - return s.String() -} - -// SetComputePlatform sets the ComputePlatform field's value. -func (s *DeploymentConfigInfo) SetComputePlatform(v string) *DeploymentConfigInfo { - s.ComputePlatform = &v - return s -} - -// SetCreateTime sets the CreateTime field's value. -func (s *DeploymentConfigInfo) SetCreateTime(v time.Time) *DeploymentConfigInfo { - s.CreateTime = &v - return s -} - -// SetDeploymentConfigId sets the DeploymentConfigId field's value. -func (s *DeploymentConfigInfo) SetDeploymentConfigId(v string) *DeploymentConfigInfo { - s.DeploymentConfigId = &v - return s -} - -// SetDeploymentConfigName sets the DeploymentConfigName field's value. -func (s *DeploymentConfigInfo) SetDeploymentConfigName(v string) *DeploymentConfigInfo { - s.DeploymentConfigName = &v - return s -} - -// SetMinimumHealthyHosts sets the MinimumHealthyHosts field's value. -func (s *DeploymentConfigInfo) SetMinimumHealthyHosts(v *MinimumHealthyHosts) *DeploymentConfigInfo { - s.MinimumHealthyHosts = v - return s -} - -// SetTrafficRoutingConfig sets the TrafficRoutingConfig field's value. -func (s *DeploymentConfigInfo) SetTrafficRoutingConfig(v *TrafficRoutingConfig) *DeploymentConfigInfo { - s.TrafficRoutingConfig = v - return s -} - -// Information about a deployment group. -type DeploymentGroupInfo struct { - _ struct{} `type:"structure"` - - // A list of alarms associated with the deployment group. - AlarmConfiguration *AlarmConfiguration `locationName:"alarmConfiguration" type:"structure"` - - // The application name. - ApplicationName *string `locationName:"applicationName" min:"1" type:"string"` - - // Information about the automatic rollback configuration associated with the - // deployment group. - AutoRollbackConfiguration *AutoRollbackConfiguration `locationName:"autoRollbackConfiguration" type:"structure"` - - // A list of associated Auto Scaling groups. - AutoScalingGroups []*AutoScalingGroup `locationName:"autoScalingGroups" type:"list"` - - // Information about blue/green deployment options for a deployment group. - BlueGreenDeploymentConfiguration *BlueGreenDeploymentConfiguration `locationName:"blueGreenDeploymentConfiguration" type:"structure"` - - // The destination platform type for the deployment group (Lambda or Server). - ComputePlatform *string `locationName:"computePlatform" type:"string" enum:"ComputePlatform"` - - // The deployment configuration name. - DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string"` - - // The deployment group ID. - DeploymentGroupId *string `locationName:"deploymentGroupId" type:"string"` - - // The deployment group name. - DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string"` - - // Information about the type of deployment, either in-place or blue/green, - // you want to run and whether to route deployment traffic behind a load balancer. - DeploymentStyle *DeploymentStyle `locationName:"deploymentStyle" type:"structure"` - - // The Amazon EC2 tags on which to filter. The deployment group includes EC2 - // instances with any of the specified tags. - Ec2TagFilters []*EC2TagFilter `locationName:"ec2TagFilters" type:"list"` - - // Information about groups of tags applied to an EC2 instance. The deployment - // group includes only EC2 instances identified by all of the tag groups. Cannot - // be used in the same call as ec2TagFilters. - Ec2TagSet *EC2TagSet `locationName:"ec2TagSet" type:"structure"` - - // The target Amazon ECS services in the deployment group. This applies only - // to deployment groups that use the Amazon ECS compute platform. A target Amazon - // ECS service is specified as an Amazon ECS cluster and service name pair using - // the format :. - EcsServices []*ECSService `locationName:"ecsServices" type:"list"` - - // Information about the most recent attempted deployment to the deployment - // group. - LastAttemptedDeployment *LastDeploymentInfo `locationName:"lastAttemptedDeployment" type:"structure"` - - // Information about the most recent successful deployment to the deployment - // group. - LastSuccessfulDeployment *LastDeploymentInfo `locationName:"lastSuccessfulDeployment" type:"structure"` - - // Information about the load balancer to use in a deployment. - LoadBalancerInfo *LoadBalancerInfo `locationName:"loadBalancerInfo" type:"structure"` - - // The on-premises instance tags on which to filter. The deployment group includes - // on-premises instances with any of the specified tags. - OnPremisesInstanceTagFilters []*TagFilter `locationName:"onPremisesInstanceTagFilters" type:"list"` - - // Information about groups of tags applied to an on-premises instance. The - // deployment group includes only on-premises instances identified by all the - // tag groups. Cannot be used in the same call as onPremisesInstanceTagFilters. - OnPremisesTagSet *OnPremisesTagSet `locationName:"onPremisesTagSet" type:"structure"` - - // A service role ARN. - ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"` - - // Information about the deployment group's target revision, including type - // and location. - TargetRevision *RevisionLocation `locationName:"targetRevision" type:"structure"` - - // Information about triggers associated with the deployment group. - TriggerConfigurations []*TriggerConfig `locationName:"triggerConfigurations" type:"list"` -} - -// String returns the string representation -func (s DeploymentGroupInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeploymentGroupInfo) GoString() string { - return s.String() -} - -// SetAlarmConfiguration sets the AlarmConfiguration field's value. -func (s *DeploymentGroupInfo) SetAlarmConfiguration(v *AlarmConfiguration) *DeploymentGroupInfo { - s.AlarmConfiguration = v - return s -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DeploymentGroupInfo) SetApplicationName(v string) *DeploymentGroupInfo { - s.ApplicationName = &v - return s -} - -// SetAutoRollbackConfiguration sets the AutoRollbackConfiguration field's value. -func (s *DeploymentGroupInfo) SetAutoRollbackConfiguration(v *AutoRollbackConfiguration) *DeploymentGroupInfo { - s.AutoRollbackConfiguration = v - return s -} - -// SetAutoScalingGroups sets the AutoScalingGroups field's value. -func (s *DeploymentGroupInfo) SetAutoScalingGroups(v []*AutoScalingGroup) *DeploymentGroupInfo { - s.AutoScalingGroups = v - return s -} - -// SetBlueGreenDeploymentConfiguration sets the BlueGreenDeploymentConfiguration field's value. -func (s *DeploymentGroupInfo) SetBlueGreenDeploymentConfiguration(v *BlueGreenDeploymentConfiguration) *DeploymentGroupInfo { - s.BlueGreenDeploymentConfiguration = v - return s -} - -// SetComputePlatform sets the ComputePlatform field's value. -func (s *DeploymentGroupInfo) SetComputePlatform(v string) *DeploymentGroupInfo { - s.ComputePlatform = &v - return s -} - -// SetDeploymentConfigName sets the DeploymentConfigName field's value. -func (s *DeploymentGroupInfo) SetDeploymentConfigName(v string) *DeploymentGroupInfo { - s.DeploymentConfigName = &v - return s -} - -// SetDeploymentGroupId sets the DeploymentGroupId field's value. -func (s *DeploymentGroupInfo) SetDeploymentGroupId(v string) *DeploymentGroupInfo { - s.DeploymentGroupId = &v - return s -} - -// SetDeploymentGroupName sets the DeploymentGroupName field's value. -func (s *DeploymentGroupInfo) SetDeploymentGroupName(v string) *DeploymentGroupInfo { - s.DeploymentGroupName = &v - return s -} - -// SetDeploymentStyle sets the DeploymentStyle field's value. -func (s *DeploymentGroupInfo) SetDeploymentStyle(v *DeploymentStyle) *DeploymentGroupInfo { - s.DeploymentStyle = v - return s -} - -// SetEc2TagFilters sets the Ec2TagFilters field's value. -func (s *DeploymentGroupInfo) SetEc2TagFilters(v []*EC2TagFilter) *DeploymentGroupInfo { - s.Ec2TagFilters = v - return s -} - -// SetEc2TagSet sets the Ec2TagSet field's value. -func (s *DeploymentGroupInfo) SetEc2TagSet(v *EC2TagSet) *DeploymentGroupInfo { - s.Ec2TagSet = v - return s -} - -// SetEcsServices sets the EcsServices field's value. -func (s *DeploymentGroupInfo) SetEcsServices(v []*ECSService) *DeploymentGroupInfo { - s.EcsServices = v - return s -} - -// SetLastAttemptedDeployment sets the LastAttemptedDeployment field's value. -func (s *DeploymentGroupInfo) SetLastAttemptedDeployment(v *LastDeploymentInfo) *DeploymentGroupInfo { - s.LastAttemptedDeployment = v - return s -} - -// SetLastSuccessfulDeployment sets the LastSuccessfulDeployment field's value. -func (s *DeploymentGroupInfo) SetLastSuccessfulDeployment(v *LastDeploymentInfo) *DeploymentGroupInfo { - s.LastSuccessfulDeployment = v - return s -} - -// SetLoadBalancerInfo sets the LoadBalancerInfo field's value. -func (s *DeploymentGroupInfo) SetLoadBalancerInfo(v *LoadBalancerInfo) *DeploymentGroupInfo { - s.LoadBalancerInfo = v - return s -} - -// SetOnPremisesInstanceTagFilters sets the OnPremisesInstanceTagFilters field's value. -func (s *DeploymentGroupInfo) SetOnPremisesInstanceTagFilters(v []*TagFilter) *DeploymentGroupInfo { - s.OnPremisesInstanceTagFilters = v - return s -} - -// SetOnPremisesTagSet sets the OnPremisesTagSet field's value. -func (s *DeploymentGroupInfo) SetOnPremisesTagSet(v *OnPremisesTagSet) *DeploymentGroupInfo { - s.OnPremisesTagSet = v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *DeploymentGroupInfo) SetServiceRoleArn(v string) *DeploymentGroupInfo { - s.ServiceRoleArn = &v - return s -} - -// SetTargetRevision sets the TargetRevision field's value. -func (s *DeploymentGroupInfo) SetTargetRevision(v *RevisionLocation) *DeploymentGroupInfo { - s.TargetRevision = v - return s -} - -// SetTriggerConfigurations sets the TriggerConfigurations field's value. -func (s *DeploymentGroupInfo) SetTriggerConfigurations(v []*TriggerConfig) *DeploymentGroupInfo { - s.TriggerConfigurations = v - return s -} - -// Information about a deployment. -type DeploymentInfo struct { - _ struct{} `type:"structure"` - - // Provides information about the results of a deployment, such as whether instances - // in the original environment in a blue/green deployment were not terminated. - AdditionalDeploymentStatusInfo *string `locationName:"additionalDeploymentStatusInfo" deprecated:"true" type:"string"` - - // The application name. - ApplicationName *string `locationName:"applicationName" min:"1" type:"string"` - - // Information about the automatic rollback configuration associated with the - // deployment. - AutoRollbackConfiguration *AutoRollbackConfiguration `locationName:"autoRollbackConfiguration" type:"structure"` - - // Information about blue/green deployment options for this deployment. - BlueGreenDeploymentConfiguration *BlueGreenDeploymentConfiguration `locationName:"blueGreenDeploymentConfiguration" type:"structure"` - - // A timestamp that indicates when the deployment was complete. - CompleteTime *time.Time `locationName:"completeTime" type:"timestamp"` - - // The destination platform type for the deployment (Lambda or Server). - ComputePlatform *string `locationName:"computePlatform" type:"string" enum:"ComputePlatform"` - - // A timestamp that indicates when the deployment was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - - // The means by which the deployment was created: - // - // * user: A user created the deployment. - // - // * autoscaling: Amazon EC2 Auto Scaling created the deployment. - // - // * codeDeployRollback: A rollback process created the deployment. - Creator *string `locationName:"creator" type:"string" enum:"DeploymentCreator"` - - // The deployment configuration name. - DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string"` - - // The deployment group name. - DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string"` - - // The unique ID of a deployment. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // A summary of the deployment status of the instances in the deployment. - DeploymentOverview *DeploymentOverview `locationName:"deploymentOverview" type:"structure"` - - // Messages that contain information about the status of a deployment. - DeploymentStatusMessages []*string `locationName:"deploymentStatusMessages" type:"list"` - - // Information about the type of deployment, either in-place or blue/green, - // you want to run and whether to route deployment traffic behind a load balancer. - DeploymentStyle *DeploymentStyle `locationName:"deploymentStyle" type:"structure"` - - // A comment about the deployment. - Description *string `locationName:"description" type:"string"` - - // Information about any error associated with this deployment. - ErrorInformation *ErrorInformation `locationName:"errorInformation" type:"structure"` - - // Information about how AWS CodeDeploy handles files that already exist in - // a deployment target location but weren't part of the previous successful - // deployment. - // - // * DISALLOW: The deployment fails. This is also the default behavior if - // no option is specified. - // - // * OVERWRITE: The version of the file from the application revision currently - // being deployed replaces the version already on the instance. - // - // * RETAIN: The version of the file already on the instance is kept and - // used as part of the new deployment. - FileExistsBehavior *string `locationName:"fileExistsBehavior" type:"string" enum:"FileExistsBehavior"` - - // If true, then if the deployment causes the ApplicationStop deployment lifecycle - // event to an instance to fail, the deployment to that instance is not considered - // to have failed at that point and continues on to the BeforeInstall deployment - // lifecycle event. - // - // If false or not specified, then if the deployment causes the ApplicationStop - // deployment lifecycle event to an instance to fail, the deployment to that - // instance stops, and the deployment to that instance is considered to have - // failed. - IgnoreApplicationStopFailures *bool `locationName:"ignoreApplicationStopFailures" type:"boolean"` - - // Indicates whether the wait period set for the termination of instances in - // the original environment has started. Status is 'false' if the KEEP_ALIVE - // option is specified. Otherwise, 'true' as soon as the termination wait period - // starts. - InstanceTerminationWaitTimeStarted *bool `locationName:"instanceTerminationWaitTimeStarted" type:"boolean"` - - // Information about the load balancer used in the deployment. - LoadBalancerInfo *LoadBalancerInfo `locationName:"loadBalancerInfo" type:"structure"` - - // Information about the application revision that was deployed to the deployment - // group before the most recent successful deployment. - PreviousRevision *RevisionLocation `locationName:"previousRevision" type:"structure"` - - // Information about the location of stored application artifacts and the service - // from which to retrieve them. - Revision *RevisionLocation `locationName:"revision" type:"structure"` - - // Information about a deployment rollback. - RollbackInfo *RollbackInfo `locationName:"rollbackInfo" type:"structure"` - - // A timestamp that indicates when the deployment was deployed to the deployment - // group. - // - // In some cases, the reported value of the start time might be later than the - // complete time. This is due to differences in the clock settings of backend - // servers that participate in the deployment process. - StartTime *time.Time `locationName:"startTime" type:"timestamp"` - - // The current state of the deployment as a whole. - Status *string `locationName:"status" type:"string" enum:"DeploymentStatus"` - - // Information about the instances that belong to the replacement environment - // in a blue/green deployment. - TargetInstances *TargetInstances `locationName:"targetInstances" type:"structure"` - - // Indicates whether only instances that are not running the latest application - // revision are to be deployed to. - UpdateOutdatedInstancesOnly *bool `locationName:"updateOutdatedInstancesOnly" type:"boolean"` -} - -// String returns the string representation -func (s DeploymentInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeploymentInfo) GoString() string { - return s.String() -} - -// SetAdditionalDeploymentStatusInfo sets the AdditionalDeploymentStatusInfo field's value. -func (s *DeploymentInfo) SetAdditionalDeploymentStatusInfo(v string) *DeploymentInfo { - s.AdditionalDeploymentStatusInfo = &v - return s -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DeploymentInfo) SetApplicationName(v string) *DeploymentInfo { - s.ApplicationName = &v - return s -} - -// SetAutoRollbackConfiguration sets the AutoRollbackConfiguration field's value. -func (s *DeploymentInfo) SetAutoRollbackConfiguration(v *AutoRollbackConfiguration) *DeploymentInfo { - s.AutoRollbackConfiguration = v - return s -} - -// SetBlueGreenDeploymentConfiguration sets the BlueGreenDeploymentConfiguration field's value. -func (s *DeploymentInfo) SetBlueGreenDeploymentConfiguration(v *BlueGreenDeploymentConfiguration) *DeploymentInfo { - s.BlueGreenDeploymentConfiguration = v - return s -} - -// SetCompleteTime sets the CompleteTime field's value. -func (s *DeploymentInfo) SetCompleteTime(v time.Time) *DeploymentInfo { - s.CompleteTime = &v - return s -} - -// SetComputePlatform sets the ComputePlatform field's value. -func (s *DeploymentInfo) SetComputePlatform(v string) *DeploymentInfo { - s.ComputePlatform = &v - return s -} - -// SetCreateTime sets the CreateTime field's value. -func (s *DeploymentInfo) SetCreateTime(v time.Time) *DeploymentInfo { - s.CreateTime = &v - return s -} - -// SetCreator sets the Creator field's value. -func (s *DeploymentInfo) SetCreator(v string) *DeploymentInfo { - s.Creator = &v - return s -} - -// SetDeploymentConfigName sets the DeploymentConfigName field's value. -func (s *DeploymentInfo) SetDeploymentConfigName(v string) *DeploymentInfo { - s.DeploymentConfigName = &v - return s -} - -// SetDeploymentGroupName sets the DeploymentGroupName field's value. -func (s *DeploymentInfo) SetDeploymentGroupName(v string) *DeploymentInfo { - s.DeploymentGroupName = &v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *DeploymentInfo) SetDeploymentId(v string) *DeploymentInfo { - s.DeploymentId = &v - return s -} - -// SetDeploymentOverview sets the DeploymentOverview field's value. -func (s *DeploymentInfo) SetDeploymentOverview(v *DeploymentOverview) *DeploymentInfo { - s.DeploymentOverview = v - return s -} - -// SetDeploymentStatusMessages sets the DeploymentStatusMessages field's value. -func (s *DeploymentInfo) SetDeploymentStatusMessages(v []*string) *DeploymentInfo { - s.DeploymentStatusMessages = v - return s -} - -// SetDeploymentStyle sets the DeploymentStyle field's value. -func (s *DeploymentInfo) SetDeploymentStyle(v *DeploymentStyle) *DeploymentInfo { - s.DeploymentStyle = v - return s -} - -// SetDescription sets the Description field's value. -func (s *DeploymentInfo) SetDescription(v string) *DeploymentInfo { - s.Description = &v - return s -} - -// SetErrorInformation sets the ErrorInformation field's value. -func (s *DeploymentInfo) SetErrorInformation(v *ErrorInformation) *DeploymentInfo { - s.ErrorInformation = v - return s -} - -// SetFileExistsBehavior sets the FileExistsBehavior field's value. -func (s *DeploymentInfo) SetFileExistsBehavior(v string) *DeploymentInfo { - s.FileExistsBehavior = &v - return s -} - -// SetIgnoreApplicationStopFailures sets the IgnoreApplicationStopFailures field's value. -func (s *DeploymentInfo) SetIgnoreApplicationStopFailures(v bool) *DeploymentInfo { - s.IgnoreApplicationStopFailures = &v - return s -} - -// SetInstanceTerminationWaitTimeStarted sets the InstanceTerminationWaitTimeStarted field's value. -func (s *DeploymentInfo) SetInstanceTerminationWaitTimeStarted(v bool) *DeploymentInfo { - s.InstanceTerminationWaitTimeStarted = &v - return s -} - -// SetLoadBalancerInfo sets the LoadBalancerInfo field's value. -func (s *DeploymentInfo) SetLoadBalancerInfo(v *LoadBalancerInfo) *DeploymentInfo { - s.LoadBalancerInfo = v - return s -} - -// SetPreviousRevision sets the PreviousRevision field's value. -func (s *DeploymentInfo) SetPreviousRevision(v *RevisionLocation) *DeploymentInfo { - s.PreviousRevision = v - return s -} - -// SetRevision sets the Revision field's value. -func (s *DeploymentInfo) SetRevision(v *RevisionLocation) *DeploymentInfo { - s.Revision = v - return s -} - -// SetRollbackInfo sets the RollbackInfo field's value. -func (s *DeploymentInfo) SetRollbackInfo(v *RollbackInfo) *DeploymentInfo { - s.RollbackInfo = v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DeploymentInfo) SetStartTime(v time.Time) *DeploymentInfo { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DeploymentInfo) SetStatus(v string) *DeploymentInfo { - s.Status = &v - return s -} - -// SetTargetInstances sets the TargetInstances field's value. -func (s *DeploymentInfo) SetTargetInstances(v *TargetInstances) *DeploymentInfo { - s.TargetInstances = v - return s -} - -// SetUpdateOutdatedInstancesOnly sets the UpdateOutdatedInstancesOnly field's value. -func (s *DeploymentInfo) SetUpdateOutdatedInstancesOnly(v bool) *DeploymentInfo { - s.UpdateOutdatedInstancesOnly = &v - return s -} - -// Information about the deployment status of the instances in the deployment. -type DeploymentOverview struct { - _ struct{} `type:"structure"` - - // The number of instances in the deployment in a failed state. - Failed *int64 `type:"long"` - - // The number of instances in which the deployment is in progress. - InProgress *int64 `type:"long"` - - // The number of instances in the deployment in a pending state. - Pending *int64 `type:"long"` - - // The number of instances in a replacement environment ready to receive traffic - // in a blue/green deployment. - Ready *int64 `type:"long"` - - // The number of instances in the deployment in a skipped state. - Skipped *int64 `type:"long"` - - // The number of instances in the deployment to which revisions have been successfully - // deployed. - Succeeded *int64 `type:"long"` -} - -// String returns the string representation -func (s DeploymentOverview) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeploymentOverview) GoString() string { - return s.String() -} - -// SetFailed sets the Failed field's value. -func (s *DeploymentOverview) SetFailed(v int64) *DeploymentOverview { - s.Failed = &v - return s -} - -// SetInProgress sets the InProgress field's value. -func (s *DeploymentOverview) SetInProgress(v int64) *DeploymentOverview { - s.InProgress = &v - return s -} - -// SetPending sets the Pending field's value. -func (s *DeploymentOverview) SetPending(v int64) *DeploymentOverview { - s.Pending = &v - return s -} - -// SetReady sets the Ready field's value. -func (s *DeploymentOverview) SetReady(v int64) *DeploymentOverview { - s.Ready = &v - return s -} - -// SetSkipped sets the Skipped field's value. -func (s *DeploymentOverview) SetSkipped(v int64) *DeploymentOverview { - s.Skipped = &v - return s -} - -// SetSucceeded sets the Succeeded field's value. -func (s *DeploymentOverview) SetSucceeded(v int64) *DeploymentOverview { - s.Succeeded = &v - return s -} - -// Information about how traffic is rerouted to instances in a replacement environment -// in a blue/green deployment. -type DeploymentReadyOption struct { - _ struct{} `type:"structure"` - - // Information about when to reroute traffic from an original environment to - // a replacement environment in a blue/green deployment. - // - // * CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately - // after the new application revision is installed on the instances in the - // replacement environment. - // - // * STOP_DEPLOYMENT: Do not register new instances with a load balancer - // unless traffic rerouting is started using ContinueDeployment. If traffic - // rerouting is not started before the end of the specified wait period, - // the deployment status is changed to Stopped. - ActionOnTimeout *string `locationName:"actionOnTimeout" type:"string" enum:"DeploymentReadyAction"` - - // The number of minutes to wait before the status of a blue/green deployment - // is changed to Stopped if rerouting is not started manually. Applies only - // to the STOP_DEPLOYMENT option for actionOnTimeout - WaitTimeInMinutes *int64 `locationName:"waitTimeInMinutes" type:"integer"` -} - -// String returns the string representation -func (s DeploymentReadyOption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeploymentReadyOption) GoString() string { - return s.String() -} - -// SetActionOnTimeout sets the ActionOnTimeout field's value. -func (s *DeploymentReadyOption) SetActionOnTimeout(v string) *DeploymentReadyOption { - s.ActionOnTimeout = &v - return s -} - -// SetWaitTimeInMinutes sets the WaitTimeInMinutes field's value. -func (s *DeploymentReadyOption) SetWaitTimeInMinutes(v int64) *DeploymentReadyOption { - s.WaitTimeInMinutes = &v - return s -} - -// Information about the type of deployment, either in-place or blue/green, -// you want to run and whether to route deployment traffic behind a load balancer. -type DeploymentStyle struct { - _ struct{} `type:"structure"` - - // Indicates whether to route deployment traffic behind a load balancer. - DeploymentOption *string `locationName:"deploymentOption" type:"string" enum:"DeploymentOption"` - - // Indicates whether to run an in-place deployment or a blue/green deployment. - DeploymentType *string `locationName:"deploymentType" type:"string" enum:"DeploymentType"` -} - -// String returns the string representation -func (s DeploymentStyle) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeploymentStyle) GoString() string { - return s.String() -} - -// SetDeploymentOption sets the DeploymentOption field's value. -func (s *DeploymentStyle) SetDeploymentOption(v string) *DeploymentStyle { - s.DeploymentOption = &v - return s -} - -// SetDeploymentType sets the DeploymentType field's value. -func (s *DeploymentStyle) SetDeploymentType(v string) *DeploymentStyle { - s.DeploymentType = &v - return s -} - -// Information about the deployment target. -type DeploymentTarget struct { - _ struct{} `type:"structure"` - - // The deployment type that is specific to the deployment's compute platform. - DeploymentTargetType *string `locationName:"deploymentTargetType" type:"string" enum:"DeploymentTargetType"` - - // Information about the target for a deployment that uses the Amazon ECS compute - // platform. - EcsTarget *ECSTarget `locationName:"ecsTarget" type:"structure"` - - // Information about the target for a deployment that uses the EC2/On-premises - // compute platform. - InstanceTarget *InstanceTarget `locationName:"instanceTarget" type:"structure"` - - // Information about the target for a deployment that uses the AWS Lambda compute - // platform. - LambdaTarget *LambdaTarget `locationName:"lambdaTarget" type:"structure"` -} - -// String returns the string representation -func (s DeploymentTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeploymentTarget) GoString() string { - return s.String() -} - -// SetDeploymentTargetType sets the DeploymentTargetType field's value. -func (s *DeploymentTarget) SetDeploymentTargetType(v string) *DeploymentTarget { - s.DeploymentTargetType = &v - return s -} - -// SetEcsTarget sets the EcsTarget field's value. -func (s *DeploymentTarget) SetEcsTarget(v *ECSTarget) *DeploymentTarget { - s.EcsTarget = v - return s -} - -// SetInstanceTarget sets the InstanceTarget field's value. -func (s *DeploymentTarget) SetInstanceTarget(v *InstanceTarget) *DeploymentTarget { - s.InstanceTarget = v - return s -} - -// SetLambdaTarget sets the LambdaTarget field's value. -func (s *DeploymentTarget) SetLambdaTarget(v *LambdaTarget) *DeploymentTarget { - s.LambdaTarget = v - return s -} - -// Represents the input of a DeregisterOnPremisesInstance operation. -type DeregisterOnPremisesInstanceInput struct { - _ struct{} `type:"structure"` - - // The name of the on-premises instance to deregister. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterOnPremisesInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterOnPremisesInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterOnPremisesInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterOnPremisesInstanceInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *DeregisterOnPremisesInstanceInput) SetInstanceName(v string) *DeregisterOnPremisesInstanceInput { - s.InstanceName = &v - return s -} - -type DeregisterOnPremisesInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeregisterOnPremisesInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterOnPremisesInstanceOutput) GoString() string { - return s.String() -} - -// Diagnostic information about executable scripts that are part of a deployment. -type Diagnostics struct { - _ struct{} `type:"structure"` - - // The associated error code: - // - // * Success: The specified script ran. - // - // * ScriptMissing: The specified script was not found in the specified location. - // - // * ScriptNotExecutable: The specified script is not a recognized executable - // file type. - // - // * ScriptTimedOut: The specified script did not finish running in the specified - // time period. - // - // * ScriptFailed: The specified script failed to run as expected. - // - // * UnknownError: The specified script did not run for an unknown reason. - ErrorCode *string `locationName:"errorCode" type:"string" enum:"LifecycleErrorCode"` - - // The last portion of the diagnostic log. - // - // If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic - // log. - LogTail *string `locationName:"logTail" type:"string"` - - // The message associated with the error. - Message *string `locationName:"message" type:"string"` - - // The name of the script. - ScriptName *string `locationName:"scriptName" type:"string"` -} - -// String returns the string representation -func (s Diagnostics) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Diagnostics) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *Diagnostics) SetErrorCode(v string) *Diagnostics { - s.ErrorCode = &v - return s -} - -// SetLogTail sets the LogTail field's value. -func (s *Diagnostics) SetLogTail(v string) *Diagnostics { - s.LogTail = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *Diagnostics) SetMessage(v string) *Diagnostics { - s.Message = &v - return s -} - -// SetScriptName sets the ScriptName field's value. -func (s *Diagnostics) SetScriptName(v string) *Diagnostics { - s.ScriptName = &v - return s -} - -// Information about an EC2 tag filter. -type EC2TagFilter struct { - _ struct{} `type:"structure"` - - // The tag filter key. - Key *string `type:"string"` - - // The tag filter type: - // - // * KEY_ONLY: Key only. - // - // * VALUE_ONLY: Value only. - // - // * KEY_AND_VALUE: Key and value. - Type *string `type:"string" enum:"EC2TagFilterType"` - - // The tag filter value. - Value *string `type:"string"` -} - -// String returns the string representation -func (s EC2TagFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EC2TagFilter) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *EC2TagFilter) SetKey(v string) *EC2TagFilter { - s.Key = &v - return s -} - -// SetType sets the Type field's value. -func (s *EC2TagFilter) SetType(v string) *EC2TagFilter { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *EC2TagFilter) SetValue(v string) *EC2TagFilter { - s.Value = &v - return s -} - -// Information about groups of EC2 instance tags. -type EC2TagSet struct { - _ struct{} `type:"structure"` - - // A list that contains other lists of EC2 instance tag groups. For an instance - // to be included in the deployment group, it must be identified by all of the - // tag groups in the list. - Ec2TagSetList [][]*EC2TagFilter `locationName:"ec2TagSetList" type:"list"` -} - -// String returns the string representation -func (s EC2TagSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EC2TagSet) GoString() string { - return s.String() -} - -// SetEc2TagSetList sets the Ec2TagSetList field's value. -func (s *EC2TagSet) SetEc2TagSetList(v [][]*EC2TagFilter) *EC2TagSet { - s.Ec2TagSetList = v - return s -} - -// Contains the service and cluster names used to identify an Amazon ECS deployment's -// target. -type ECSService struct { - _ struct{} `type:"structure"` - - // The name of the cluster that the Amazon ECS service is associated with. - ClusterName *string `locationName:"clusterName" type:"string"` - - // The name of the target Amazon ECS service. - ServiceName *string `locationName:"serviceName" type:"string"` -} - -// String returns the string representation -func (s ECSService) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ECSService) GoString() string { - return s.String() -} - -// SetClusterName sets the ClusterName field's value. -func (s *ECSService) SetClusterName(v string) *ECSService { - s.ClusterName = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *ECSService) SetServiceName(v string) *ECSService { - s.ServiceName = &v - return s -} - -// Information about the target of an Amazon ECS deployment. -type ECSTarget struct { - _ struct{} `type:"structure"` - - // The unique ID of a deployment. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // The date and time when the target Amazon ECS application was updated by a - // deployment. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` - - // The lifecycle events of the deployment to this target Amazon ECS application. - LifecycleEvents []*LifecycleEvent `locationName:"lifecycleEvents" type:"list"` - - // The status an Amazon ECS deployment's target ECS application. - Status *string `locationName:"status" type:"string" enum:"TargetStatus"` - - // The ARN of the target. - TargetArn *string `locationName:"targetArn" type:"string"` - - // The unique ID of a deployment target that has a type of ecsTarget. - TargetId *string `locationName:"targetId" type:"string"` - - // The ECSTaskSet objects associated with the ECS target. - TaskSetsInfo []*ECSTaskSet `locationName:"taskSetsInfo" type:"list"` -} - -// String returns the string representation -func (s ECSTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ECSTarget) GoString() string { - return s.String() -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *ECSTarget) SetDeploymentId(v string) *ECSTarget { - s.DeploymentId = &v - return s -} - -// SetLastUpdatedAt sets the LastUpdatedAt field's value. -func (s *ECSTarget) SetLastUpdatedAt(v time.Time) *ECSTarget { - s.LastUpdatedAt = &v - return s -} - -// SetLifecycleEvents sets the LifecycleEvents field's value. -func (s *ECSTarget) SetLifecycleEvents(v []*LifecycleEvent) *ECSTarget { - s.LifecycleEvents = v - return s -} - -// SetStatus sets the Status field's value. -func (s *ECSTarget) SetStatus(v string) *ECSTarget { - s.Status = &v - return s -} - -// SetTargetArn sets the TargetArn field's value. -func (s *ECSTarget) SetTargetArn(v string) *ECSTarget { - s.TargetArn = &v - return s -} - -// SetTargetId sets the TargetId field's value. -func (s *ECSTarget) SetTargetId(v string) *ECSTarget { - s.TargetId = &v - return s -} - -// SetTaskSetsInfo sets the TaskSetsInfo field's value. -func (s *ECSTarget) SetTaskSetsInfo(v []*ECSTaskSet) *ECSTarget { - s.TaskSetsInfo = v - return s -} - -// Information about a set of Amazon ECS tasks in an AWS CodeDeploy deployment. -// An Amazon ECS task set includes details such as the desired number of tasks, -// how many tasks are running, and whether the task set serves production traffic. -// An AWS CodeDeploy application that uses the Amazon ECS compute platform deploys -// a containerized application in an Amazon ECS service as a task set. -type ECSTaskSet struct { - _ struct{} `type:"structure"` - - // The number of tasks in a task set. During a deployment that uses the Amazon - // ECS compute type, CodeDeploy instructs Amazon ECS to create a new task set - // and uses this value to determine how many tasks to create. After the updated - // task set is created, CodeDeploy shifts traffic to the new task set. - DesiredCount *int64 `locationName:"desiredCount" type:"long"` - - // A unique ID of an ECSTaskSet. - Identifer *string `locationName:"identifer" type:"string"` - - // The number of tasks in the task set that are in the PENDING status during - // an Amazon ECS deployment. A task in the PENDING state is preparing to enter - // the RUNNING state. A task set enters the PENDING status when it launches - // for the first time, or when it is restarted after being in the STOPPED state. - PendingCount *int64 `locationName:"pendingCount" type:"long"` - - // The number of tasks in the task set that are in the RUNNING status during - // an Amazon ECS deployment. A task in the RUNNING state is running and ready - // for use. - RunningCount *int64 `locationName:"runningCount" type:"long"` - - // The status of the task set. There are three valid task set statuses: - // - // * PRIMARY: Indicates the task set is serving production traffic. - // - // * ACTIVE: Indicates the task set is not serving production traffic. - // - // * DRAINING: Indicates the tasks in the task set are being stopped and - // their corresponding targets are being deregistered from their target group. - Status *string `locationName:"status" type:"string"` - - // The target group associated with the task set. The target group is used by - // AWS CodeDeploy to manage traffic to a task set. - TargetGroup *TargetGroupInfo `locationName:"targetGroup" type:"structure"` - - // A label that identifies whether the ECS task set is an original target (BLUE) - // or a replacement target (GREEN). - TaskSetLabel *string `locationName:"taskSetLabel" type:"string" enum:"TargetLabel"` - - // The percentage of traffic served by this task set. - TrafficWeight *float64 `locationName:"trafficWeight" type:"double"` -} - -// String returns the string representation -func (s ECSTaskSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ECSTaskSet) GoString() string { - return s.String() -} - -// SetDesiredCount sets the DesiredCount field's value. -func (s *ECSTaskSet) SetDesiredCount(v int64) *ECSTaskSet { - s.DesiredCount = &v - return s -} - -// SetIdentifer sets the Identifer field's value. -func (s *ECSTaskSet) SetIdentifer(v string) *ECSTaskSet { - s.Identifer = &v - return s -} - -// SetPendingCount sets the PendingCount field's value. -func (s *ECSTaskSet) SetPendingCount(v int64) *ECSTaskSet { - s.PendingCount = &v - return s -} - -// SetRunningCount sets the RunningCount field's value. -func (s *ECSTaskSet) SetRunningCount(v int64) *ECSTaskSet { - s.RunningCount = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ECSTaskSet) SetStatus(v string) *ECSTaskSet { - s.Status = &v - return s -} - -// SetTargetGroup sets the TargetGroup field's value. -func (s *ECSTaskSet) SetTargetGroup(v *TargetGroupInfo) *ECSTaskSet { - s.TargetGroup = v - return s -} - -// SetTaskSetLabel sets the TaskSetLabel field's value. -func (s *ECSTaskSet) SetTaskSetLabel(v string) *ECSTaskSet { - s.TaskSetLabel = &v - return s -} - -// SetTrafficWeight sets the TrafficWeight field's value. -func (s *ECSTaskSet) SetTrafficWeight(v float64) *ECSTaskSet { - s.TrafficWeight = &v - return s -} - -// Information about a load balancer in Elastic Load Balancing to use in a deployment. -// Instances are registered directly with a load balancer, and traffic is routed -// to the load balancer. -type ELBInfo struct { - _ struct{} `type:"structure"` - - // For blue/green deployments, the name of the load balancer that is used to - // route traffic from original instances to replacement instances in a blue/green - // deployment. For in-place deployments, the name of the load balancer that - // instances are deregistered from so they are not serving traffic during a - // deployment, and then re-registered with after the deployment is complete. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s ELBInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ELBInfo) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *ELBInfo) SetName(v string) *ELBInfo { - s.Name = &v - return s -} - -// Information about a deployment error. -type ErrorInformation struct { - _ struct{} `type:"structure"` - - // For more information, see Error Codes for AWS CodeDeploy (http://docs.aws.amazon.com/codedeploy/latest/userguide/error-codes.html) - // in the AWS CodeDeploy User Guide (http://docs.aws.amazon.com/codedeploy/latest/userguide). - // - // The error code: - // - // * APPLICATION_MISSING: The application was missing. This error code is - // most likely raised if the application is deleted after the deployment - // is created, but before it is started. - // - // * DEPLOYMENT_GROUP_MISSING: The deployment group was missing. This error - // code is most likely raised if the deployment group is deleted after the - // deployment is created, but before it is started. - // - // * HEALTH_CONSTRAINTS: The deployment failed on too many instances to be - // successfully deployed within the instance health constraints specified. - // - // * HEALTH_CONSTRAINTS_INVALID: The revision cannot be successfully deployed - // within the instance health constraints specified. - // - // * IAM_ROLE_MISSING: The service role cannot be accessed. - // - // * IAM_ROLE_PERMISSIONS: The service role does not have the correct permissions. - // - // * INTERNAL_ERROR: There was an internal error. - // - // * NO_EC2_SUBSCRIPTION: The calling account is not subscribed to Amazon - // EC2. - // - // * NO_INSTANCES: No instances were specified, or no instances can be found. - // - // * OVER_MAX_INSTANCES: The maximum number of instances was exceeded. - // - // * THROTTLED: The operation was throttled because the calling account exceeded - // the throttling limits of one or more AWS services. - // - // * TIMEOUT: The deployment has timed out. - // - // * REVISION_MISSING: The revision ID was missing. This error code is most - // likely raised if the revision is deleted after the deployment is created, - // but before it is started. - Code *string `locationName:"code" type:"string" enum:"ErrorCode"` - - // An accompanying error message. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s ErrorInformation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ErrorInformation) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *ErrorInformation) SetCode(v string) *ErrorInformation { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ErrorInformation) SetMessage(v string) *ErrorInformation { - s.Message = &v - return s -} - -// Information about an application revision. -type GenericRevisionInfo struct { - _ struct{} `type:"structure"` - - // The deployment groups for which this is the current target revision. - DeploymentGroups []*string `locationName:"deploymentGroups" type:"list"` - - // A comment about the revision. - Description *string `locationName:"description" type:"string"` - - // When the revision was first used by AWS CodeDeploy. - FirstUsedTime *time.Time `locationName:"firstUsedTime" type:"timestamp"` - - // When the revision was last used by AWS CodeDeploy. - LastUsedTime *time.Time `locationName:"lastUsedTime" type:"timestamp"` - - // When the revision was registered with AWS CodeDeploy. - RegisterTime *time.Time `locationName:"registerTime" type:"timestamp"` -} - -// String returns the string representation -func (s GenericRevisionInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GenericRevisionInfo) GoString() string { - return s.String() -} - -// SetDeploymentGroups sets the DeploymentGroups field's value. -func (s *GenericRevisionInfo) SetDeploymentGroups(v []*string) *GenericRevisionInfo { - s.DeploymentGroups = v - return s -} - -// SetDescription sets the Description field's value. -func (s *GenericRevisionInfo) SetDescription(v string) *GenericRevisionInfo { - s.Description = &v - return s -} - -// SetFirstUsedTime sets the FirstUsedTime field's value. -func (s *GenericRevisionInfo) SetFirstUsedTime(v time.Time) *GenericRevisionInfo { - s.FirstUsedTime = &v - return s -} - -// SetLastUsedTime sets the LastUsedTime field's value. -func (s *GenericRevisionInfo) SetLastUsedTime(v time.Time) *GenericRevisionInfo { - s.LastUsedTime = &v - return s -} - -// SetRegisterTime sets the RegisterTime field's value. -func (s *GenericRevisionInfo) SetRegisterTime(v time.Time) *GenericRevisionInfo { - s.RegisterTime = &v - return s -} - -// Represents the input of a GetApplication operation. -type GetApplicationInput struct { - _ struct{} `type:"structure"` - - // The name of an AWS CodeDeploy application associated with the IAM user or - // AWS account. - // - // ApplicationName is a required field - ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetApplicationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *GetApplicationInput) SetApplicationName(v string) *GetApplicationInput { - s.ApplicationName = &v - return s -} - -// Represents the output of a GetApplication operation. -type GetApplicationOutput struct { - _ struct{} `type:"structure"` - - // Information about the application. - Application *ApplicationInfo `locationName:"application" type:"structure"` -} - -// String returns the string representation -func (s GetApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApplicationOutput) GoString() string { - return s.String() -} - -// SetApplication sets the Application field's value. -func (s *GetApplicationOutput) SetApplication(v *ApplicationInfo) *GetApplicationOutput { - s.Application = v - return s -} - -// Represents the input of a GetApplicationRevision operation. -type GetApplicationRevisionInput struct { - _ struct{} `type:"structure"` - - // The name of the application that corresponds to the revision. - // - // ApplicationName is a required field - ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - - // Information about the application revision to get, including type and location. - // - // Revision is a required field - Revision *RevisionLocation `locationName:"revision" type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetApplicationRevisionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApplicationRevisionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetApplicationRevisionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetApplicationRevisionInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.Revision == nil { - invalidParams.Add(request.NewErrParamRequired("Revision")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *GetApplicationRevisionInput) SetApplicationName(v string) *GetApplicationRevisionInput { - s.ApplicationName = &v - return s -} - -// SetRevision sets the Revision field's value. -func (s *GetApplicationRevisionInput) SetRevision(v *RevisionLocation) *GetApplicationRevisionInput { - s.Revision = v - return s -} - -// Represents the output of a GetApplicationRevision operation. -type GetApplicationRevisionOutput struct { - _ struct{} `type:"structure"` - - // The name of the application that corresponds to the revision. - ApplicationName *string `locationName:"applicationName" min:"1" type:"string"` - - // Additional information about the revision, including type and location. - Revision *RevisionLocation `locationName:"revision" type:"structure"` - - // General information about the revision. - RevisionInfo *GenericRevisionInfo `locationName:"revisionInfo" type:"structure"` -} - -// String returns the string representation -func (s GetApplicationRevisionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApplicationRevisionOutput) GoString() string { - return s.String() -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *GetApplicationRevisionOutput) SetApplicationName(v string) *GetApplicationRevisionOutput { - s.ApplicationName = &v - return s -} - -// SetRevision sets the Revision field's value. -func (s *GetApplicationRevisionOutput) SetRevision(v *RevisionLocation) *GetApplicationRevisionOutput { - s.Revision = v - return s -} - -// SetRevisionInfo sets the RevisionInfo field's value. -func (s *GetApplicationRevisionOutput) SetRevisionInfo(v *GenericRevisionInfo) *GetApplicationRevisionOutput { - s.RevisionInfo = v - return s -} - -// Represents the input of a GetDeploymentConfig operation. -type GetDeploymentConfigInput struct { - _ struct{} `type:"structure"` - - // The name of a deployment configuration associated with the IAM user or AWS - // account. - // - // DeploymentConfigName is a required field - DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDeploymentConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeploymentConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeploymentConfigInput"} - if s.DeploymentConfigName == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentConfigName")) - } - if s.DeploymentConfigName != nil && len(*s.DeploymentConfigName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeploymentConfigName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeploymentConfigName sets the DeploymentConfigName field's value. -func (s *GetDeploymentConfigInput) SetDeploymentConfigName(v string) *GetDeploymentConfigInput { - s.DeploymentConfigName = &v - return s -} - -// Represents the output of a GetDeploymentConfig operation. -type GetDeploymentConfigOutput struct { - _ struct{} `type:"structure"` - - // Information about the deployment configuration. - DeploymentConfigInfo *DeploymentConfigInfo `locationName:"deploymentConfigInfo" type:"structure"` -} - -// String returns the string representation -func (s GetDeploymentConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentConfigOutput) GoString() string { - return s.String() -} - -// SetDeploymentConfigInfo sets the DeploymentConfigInfo field's value. -func (s *GetDeploymentConfigOutput) SetDeploymentConfigInfo(v *DeploymentConfigInfo) *GetDeploymentConfigOutput { - s.DeploymentConfigInfo = v - return s -} - -// Represents the input of a GetDeploymentGroup operation. -type GetDeploymentGroupInput struct { - _ struct{} `type:"structure"` - - // The name of an AWS CodeDeploy application associated with the IAM user or - // AWS account. - // - // ApplicationName is a required field - ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - - // The name of a deployment group for the specified application. - // - // DeploymentGroupName is a required field - DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDeploymentGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeploymentGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeploymentGroupInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.DeploymentGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentGroupName")) - } - if s.DeploymentGroupName != nil && len(*s.DeploymentGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeploymentGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *GetDeploymentGroupInput) SetApplicationName(v string) *GetDeploymentGroupInput { - s.ApplicationName = &v - return s -} - -// SetDeploymentGroupName sets the DeploymentGroupName field's value. -func (s *GetDeploymentGroupInput) SetDeploymentGroupName(v string) *GetDeploymentGroupInput { - s.DeploymentGroupName = &v - return s -} - -// Represents the output of a GetDeploymentGroup operation. -type GetDeploymentGroupOutput struct { - _ struct{} `type:"structure"` - - // Information about the deployment group. - DeploymentGroupInfo *DeploymentGroupInfo `locationName:"deploymentGroupInfo" type:"structure"` -} - -// String returns the string representation -func (s GetDeploymentGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentGroupOutput) GoString() string { - return s.String() -} - -// SetDeploymentGroupInfo sets the DeploymentGroupInfo field's value. -func (s *GetDeploymentGroupOutput) SetDeploymentGroupInfo(v *DeploymentGroupInfo) *GetDeploymentGroupOutput { - s.DeploymentGroupInfo = v - return s -} - -// Represents the input of a GetDeployment operation. -type GetDeploymentInput struct { - _ struct{} `type:"structure"` - - // The unique ID of a deployment associated with the IAM user or AWS account. - // - // DeploymentId is a required field - DeploymentId *string `locationName:"deploymentId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDeploymentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeploymentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeploymentInput"} - if s.DeploymentId == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *GetDeploymentInput) SetDeploymentId(v string) *GetDeploymentInput { - s.DeploymentId = &v - return s -} - -// Represents the input of a GetDeploymentInstance operation. -type GetDeploymentInstanceInput struct { - _ struct{} `type:"structure"` - - // The unique ID of a deployment. - // - // DeploymentId is a required field - DeploymentId *string `locationName:"deploymentId" type:"string" required:"true"` - - // The unique ID of an instance in the deployment group. - // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDeploymentInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeploymentInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeploymentInstanceInput"} - if s.DeploymentId == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentId")) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *GetDeploymentInstanceInput) SetDeploymentId(v string) *GetDeploymentInstanceInput { - s.DeploymentId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetDeploymentInstanceInput) SetInstanceId(v string) *GetDeploymentInstanceInput { - s.InstanceId = &v - return s -} - -// Represents the output of a GetDeploymentInstance operation. -type GetDeploymentInstanceOutput struct { - _ struct{} `type:"structure"` - - // Information about the instance. - InstanceSummary *InstanceSummary `locationName:"instanceSummary" deprecated:"true" type:"structure"` -} - -// String returns the string representation -func (s GetDeploymentInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentInstanceOutput) GoString() string { - return s.String() -} - -// SetInstanceSummary sets the InstanceSummary field's value. -func (s *GetDeploymentInstanceOutput) SetInstanceSummary(v *InstanceSummary) *GetDeploymentInstanceOutput { - s.InstanceSummary = v - return s -} - -// Represents the output of a GetDeployment operation. -type GetDeploymentOutput struct { - _ struct{} `type:"structure"` - - // Information about the deployment. - DeploymentInfo *DeploymentInfo `locationName:"deploymentInfo" type:"structure"` -} - -// String returns the string representation -func (s GetDeploymentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentOutput) GoString() string { - return s.String() -} - -// SetDeploymentInfo sets the DeploymentInfo field's value. -func (s *GetDeploymentOutput) SetDeploymentInfo(v *DeploymentInfo) *GetDeploymentOutput { - s.DeploymentInfo = v - return s -} - -type GetDeploymentTargetInput struct { - _ struct{} `type:"structure"` - - // The unique ID of a deployment. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // The unique ID of a deployment target. - TargetId *string `locationName:"targetId" type:"string"` -} - -// String returns the string representation -func (s GetDeploymentTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentTargetInput) GoString() string { - return s.String() -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *GetDeploymentTargetInput) SetDeploymentId(v string) *GetDeploymentTargetInput { - s.DeploymentId = &v - return s -} - -// SetTargetId sets the TargetId field's value. -func (s *GetDeploymentTargetInput) SetTargetId(v string) *GetDeploymentTargetInput { - s.TargetId = &v - return s -} - -type GetDeploymentTargetOutput struct { - _ struct{} `type:"structure"` - - // A deployment target that contains information about a deployment such as - // its status, lifecyle events, and when it was last updated. It also contains - // metadata about the deployment target. The deployment target metadata depends - // on the deployment target's type (instanceTarget, lambdaTarget, or ecsTarget). - DeploymentTarget *DeploymentTarget `locationName:"deploymentTarget" type:"structure"` -} - -// String returns the string representation -func (s GetDeploymentTargetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeploymentTargetOutput) GoString() string { - return s.String() -} - -// SetDeploymentTarget sets the DeploymentTarget field's value. -func (s *GetDeploymentTargetOutput) SetDeploymentTarget(v *DeploymentTarget) *GetDeploymentTargetOutput { - s.DeploymentTarget = v - return s -} - -// Represents the input of a GetOnPremisesInstance operation. -type GetOnPremisesInstanceInput struct { - _ struct{} `type:"structure"` - - // The name of the on-premises instance about which to get information. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetOnPremisesInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOnPremisesInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOnPremisesInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOnPremisesInstanceInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *GetOnPremisesInstanceInput) SetInstanceName(v string) *GetOnPremisesInstanceInput { - s.InstanceName = &v - return s -} - -// Represents the output of a GetOnPremisesInstance operation. -type GetOnPremisesInstanceOutput struct { - _ struct{} `type:"structure"` - - // Information about the on-premises instance. - InstanceInfo *InstanceInfo `locationName:"instanceInfo" type:"structure"` -} - -// String returns the string representation -func (s GetOnPremisesInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOnPremisesInstanceOutput) GoString() string { - return s.String() -} - -// SetInstanceInfo sets the InstanceInfo field's value. -func (s *GetOnPremisesInstanceOutput) SetInstanceInfo(v *InstanceInfo) *GetOnPremisesInstanceOutput { - s.InstanceInfo = v - return s -} - -// Information about the location of application artifacts stored in GitHub. -type GitHubLocation struct { - _ struct{} `type:"structure"` - - // The SHA1 commit ID of the GitHub commit that represents the bundled artifacts - // for the application revision. - CommitId *string `locationName:"commitId" type:"string"` - - // The GitHub account and repository pair that stores a reference to the commit - // that represents the bundled artifacts for the application revision. - // - // Specified as account/repository. - Repository *string `locationName:"repository" type:"string"` -} - -// String returns the string representation -func (s GitHubLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GitHubLocation) GoString() string { - return s.String() -} - -// SetCommitId sets the CommitId field's value. -func (s *GitHubLocation) SetCommitId(v string) *GitHubLocation { - s.CommitId = &v - return s -} - -// SetRepository sets the Repository field's value. -func (s *GitHubLocation) SetRepository(v string) *GitHubLocation { - s.Repository = &v - return s -} - -// Information about the instances that belong to the replacement environment -// in a blue/green deployment. -type GreenFleetProvisioningOption struct { - _ struct{} `type:"structure"` - - // The method used to add instances to a replacement environment. - // - // * DISCOVER_EXISTING: Use instances that already exist or will be created - // manually. - // - // * COPY_AUTO_SCALING_GROUP: Use settings from a specified Auto Scaling - // group to define and create instances in a new Auto Scaling group. - Action *string `locationName:"action" type:"string" enum:"GreenFleetProvisioningAction"` -} - -// String returns the string representation -func (s GreenFleetProvisioningOption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GreenFleetProvisioningOption) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *GreenFleetProvisioningOption) SetAction(v string) *GreenFleetProvisioningOption { - s.Action = &v - return s -} - -// Information about an on-premises instance. -type InstanceInfo struct { - _ struct{} `type:"structure"` - - // If the on-premises instance was deregistered, the time at which the on-premises - // instance was deregistered. - DeregisterTime *time.Time `locationName:"deregisterTime" type:"timestamp"` - - // The ARN of the IAM session associated with the on-premises instance. - IamSessionArn *string `locationName:"iamSessionArn" type:"string"` - - // The IAM user ARN associated with the on-premises instance. - IamUserArn *string `locationName:"iamUserArn" type:"string"` - - // The ARN of the on-premises instance. - InstanceArn *string `locationName:"instanceArn" type:"string"` - - // The name of the on-premises instance. - InstanceName *string `locationName:"instanceName" type:"string"` - - // The time at which the on-premises instance was registered. - RegisterTime *time.Time `locationName:"registerTime" type:"timestamp"` - - // The tags currently associated with the on-premises instance. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s InstanceInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceInfo) GoString() string { - return s.String() -} - -// SetDeregisterTime sets the DeregisterTime field's value. -func (s *InstanceInfo) SetDeregisterTime(v time.Time) *InstanceInfo { - s.DeregisterTime = &v - return s -} - -// SetIamSessionArn sets the IamSessionArn field's value. -func (s *InstanceInfo) SetIamSessionArn(v string) *InstanceInfo { - s.IamSessionArn = &v - return s -} - -// SetIamUserArn sets the IamUserArn field's value. -func (s *InstanceInfo) SetIamUserArn(v string) *InstanceInfo { - s.IamUserArn = &v - return s -} - -// SetInstanceArn sets the InstanceArn field's value. -func (s *InstanceInfo) SetInstanceArn(v string) *InstanceInfo { - s.InstanceArn = &v - return s -} - -// SetInstanceName sets the InstanceName field's value. -func (s *InstanceInfo) SetInstanceName(v string) *InstanceInfo { - s.InstanceName = &v - return s -} - -// SetRegisterTime sets the RegisterTime field's value. -func (s *InstanceInfo) SetRegisterTime(v time.Time) *InstanceInfo { - s.RegisterTime = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *InstanceInfo) SetTags(v []*Tag) *InstanceInfo { - s.Tags = v - return s -} - -// Information about an instance in a deployment. -// -// Deprecated: InstanceSummary is deprecated, use DeploymentTarget instead. -type InstanceSummary struct { - _ struct{} `deprecated:"true" type:"structure"` - - // The unique ID of a deployment. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // The instance ID. - InstanceId *string `locationName:"instanceId" type:"string"` - - // Information about which environment an instance belongs to in a blue/green - // deployment. - // - // * BLUE: The instance is part of the original environment. - // - // * GREEN: The instance is part of the replacement environment. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // A timestamp that indicaties when the instance information was last updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` - - // A list of lifecycle events for this instance. - LifecycleEvents []*LifecycleEvent `locationName:"lifecycleEvents" type:"list"` - - // The deployment status for this instance: - // - // * Pending: The deployment is pending for this instance. - // - // * In Progress: The deployment is in progress for this instance. - // - // * Succeeded: The deployment has succeeded for this instance. - // - // * Failed: The deployment has failed for this instance. - // - // * Skipped: The deployment has been skipped for this instance. - // - // * Unknown: The deployment status is unknown for this instance. - Status *string `locationName:"status" deprecated:"true" type:"string" enum:"InstanceStatus"` -} - -// String returns the string representation -func (s InstanceSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceSummary) GoString() string { - return s.String() -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *InstanceSummary) SetDeploymentId(v string) *InstanceSummary { - s.DeploymentId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceSummary) SetInstanceId(v string) *InstanceSummary { - s.InstanceId = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *InstanceSummary) SetInstanceType(v string) *InstanceSummary { - s.InstanceType = &v - return s -} - -// SetLastUpdatedAt sets the LastUpdatedAt field's value. -func (s *InstanceSummary) SetLastUpdatedAt(v time.Time) *InstanceSummary { - s.LastUpdatedAt = &v - return s -} - -// SetLifecycleEvents sets the LifecycleEvents field's value. -func (s *InstanceSummary) SetLifecycleEvents(v []*LifecycleEvent) *InstanceSummary { - s.LifecycleEvents = v - return s -} - -// SetStatus sets the Status field's value. -func (s *InstanceSummary) SetStatus(v string) *InstanceSummary { - s.Status = &v - return s -} - -// A target Amazon EC2 or on-premises instance during a deployment that uses -// the EC2/On-premises compute platform. -type InstanceTarget struct { - _ struct{} `type:"structure"` - - // The unique ID of a deployment. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // A label that identifies whether the instance is an original target (BLUE) - // or a replacement target (GREEN). - InstanceLabel *string `locationName:"instanceLabel" type:"string" enum:"TargetLabel"` - - // The date and time when the target instance was updated by a deployment. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` - - // The lifecycle events of the deployment to this target instance. - LifecycleEvents []*LifecycleEvent `locationName:"lifecycleEvents" type:"list"` - - // The status an EC2/On-premises deployment's target instance. - Status *string `locationName:"status" type:"string" enum:"TargetStatus"` - - // The ARN of the target. - TargetArn *string `locationName:"targetArn" type:"string"` - - // The unique ID of a deployment target that has a type of instanceTarget. - TargetId *string `locationName:"targetId" type:"string"` -} - -// String returns the string representation -func (s InstanceTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceTarget) GoString() string { - return s.String() -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *InstanceTarget) SetDeploymentId(v string) *InstanceTarget { - s.DeploymentId = &v - return s -} - -// SetInstanceLabel sets the InstanceLabel field's value. -func (s *InstanceTarget) SetInstanceLabel(v string) *InstanceTarget { - s.InstanceLabel = &v - return s -} - -// SetLastUpdatedAt sets the LastUpdatedAt field's value. -func (s *InstanceTarget) SetLastUpdatedAt(v time.Time) *InstanceTarget { - s.LastUpdatedAt = &v - return s -} - -// SetLifecycleEvents sets the LifecycleEvents field's value. -func (s *InstanceTarget) SetLifecycleEvents(v []*LifecycleEvent) *InstanceTarget { - s.LifecycleEvents = v - return s -} - -// SetStatus sets the Status field's value. -func (s *InstanceTarget) SetStatus(v string) *InstanceTarget { - s.Status = &v - return s -} - -// SetTargetArn sets the TargetArn field's value. -func (s *InstanceTarget) SetTargetArn(v string) *InstanceTarget { - s.TargetArn = &v - return s -} - -// SetTargetId sets the TargetId field's value. -func (s *InstanceTarget) SetTargetId(v string) *InstanceTarget { - s.TargetId = &v - return s -} - -// Information about the target AWS Lambda function during an AWS Lambda deployment. -type LambdaTarget struct { - _ struct{} `type:"structure"` - - // The unique ID of a deployment. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // The date and time when the target Lambda function was updated by a deployment. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` - - // The lifecycle events of the deployment to this target Lambda function. - LifecycleEvents []*LifecycleEvent `locationName:"lifecycleEvents" type:"list"` - - // The status an AWS Lambda deployment's target Lambda function. - Status *string `locationName:"status" type:"string" enum:"TargetStatus"` - - // The ARN of the target. - TargetArn *string `locationName:"targetArn" type:"string"` - - // The unique ID of a deployment target that has a type of lambdaTarget. - TargetId *string `locationName:"targetId" type:"string"` -} - -// String returns the string representation -func (s LambdaTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaTarget) GoString() string { - return s.String() -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *LambdaTarget) SetDeploymentId(v string) *LambdaTarget { - s.DeploymentId = &v - return s -} - -// SetLastUpdatedAt sets the LastUpdatedAt field's value. -func (s *LambdaTarget) SetLastUpdatedAt(v time.Time) *LambdaTarget { - s.LastUpdatedAt = &v - return s -} - -// SetLifecycleEvents sets the LifecycleEvents field's value. -func (s *LambdaTarget) SetLifecycleEvents(v []*LifecycleEvent) *LambdaTarget { - s.LifecycleEvents = v - return s -} - -// SetStatus sets the Status field's value. -func (s *LambdaTarget) SetStatus(v string) *LambdaTarget { - s.Status = &v - return s -} - -// SetTargetArn sets the TargetArn field's value. -func (s *LambdaTarget) SetTargetArn(v string) *LambdaTarget { - s.TargetArn = &v - return s -} - -// SetTargetId sets the TargetId field's value. -func (s *LambdaTarget) SetTargetId(v string) *LambdaTarget { - s.TargetId = &v - return s -} - -// Information about the most recent attempted or successful deployment to a -// deployment group. -type LastDeploymentInfo struct { - _ struct{} `type:"structure"` - - // A timestamp that indicates when the most recent deployment to the deployment - // group started. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - - // The unique ID of a deployment. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // A timestamp that indicates when the most recent deployment to the deployment - // group was complete. - EndTime *time.Time `locationName:"endTime" type:"timestamp"` - - // The status of the most recent deployment. - Status *string `locationName:"status" type:"string" enum:"DeploymentStatus"` -} - -// String returns the string representation -func (s LastDeploymentInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LastDeploymentInfo) GoString() string { - return s.String() -} - -// SetCreateTime sets the CreateTime field's value. -func (s *LastDeploymentInfo) SetCreateTime(v time.Time) *LastDeploymentInfo { - s.CreateTime = &v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *LastDeploymentInfo) SetDeploymentId(v string) *LastDeploymentInfo { - s.DeploymentId = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *LastDeploymentInfo) SetEndTime(v time.Time) *LastDeploymentInfo { - s.EndTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *LastDeploymentInfo) SetStatus(v string) *LastDeploymentInfo { - s.Status = &v - return s -} - -// Information about a deployment lifecycle event. -type LifecycleEvent struct { - _ struct{} `type:"structure"` - - // Diagnostic information about the deployment lifecycle event. - Diagnostics *Diagnostics `locationName:"diagnostics" type:"structure"` - - // A timestamp that indicates when the deployment lifecycle event ended. - EndTime *time.Time `locationName:"endTime" type:"timestamp"` - - // The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, - // AfterInstall, ApplicationStart, or ValidateService. - LifecycleEventName *string `locationName:"lifecycleEventName" type:"string"` - - // A timestamp that indicates when the deployment lifecycle event started. - StartTime *time.Time `locationName:"startTime" type:"timestamp"` - - // The deployment lifecycle event status: - // - // * Pending: The deployment lifecycle event is pending. - // - // * InProgress: The deployment lifecycle event is in progress. - // - // * Succeeded: The deployment lifecycle event ran successfully. - // - // * Failed: The deployment lifecycle event has failed. - // - // * Skipped: The deployment lifecycle event has been skipped. - // - // * Unknown: The deployment lifecycle event is unknown. - Status *string `locationName:"status" type:"string" enum:"LifecycleEventStatus"` -} - -// String returns the string representation -func (s LifecycleEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LifecycleEvent) GoString() string { - return s.String() -} - -// SetDiagnostics sets the Diagnostics field's value. -func (s *LifecycleEvent) SetDiagnostics(v *Diagnostics) *LifecycleEvent { - s.Diagnostics = v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *LifecycleEvent) SetEndTime(v time.Time) *LifecycleEvent { - s.EndTime = &v - return s -} - -// SetLifecycleEventName sets the LifecycleEventName field's value. -func (s *LifecycleEvent) SetLifecycleEventName(v string) *LifecycleEvent { - s.LifecycleEventName = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *LifecycleEvent) SetStartTime(v time.Time) *LifecycleEvent { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *LifecycleEvent) SetStatus(v string) *LifecycleEvent { - s.Status = &v - return s -} - -// Represents the input of a ListApplicationRevisions operation. -type ListApplicationRevisionsInput struct { - _ struct{} `type:"structure"` - - // The name of an AWS CodeDeploy application associated with the IAM user or - // AWS account. - // - // ApplicationName is a required field - ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - - // Whether to list revisions based on whether the revision is the target revision - // of an deployment group: - // - // * include: List revisions that are target revisions of a deployment group. - // - // * exclude: Do not list revisions that are target revisions of a deployment - // group. - // - // * ignore: List all revisions. - Deployed *string `locationName:"deployed" type:"string" enum:"ListStateFilterAction"` - - // An identifier returned from the previous ListApplicationRevisions call. It - // can be used to return the next set of applications in the list. - NextToken *string `locationName:"nextToken" type:"string"` - - // An Amazon S3 bucket name to limit the search for revisions. - // - // If set to null, all of the user's buckets are searched. - S3Bucket *string `locationName:"s3Bucket" type:"string"` - - // A key prefix for the set of Amazon S3 objects to limit the search for revisions. - S3KeyPrefix *string `locationName:"s3KeyPrefix" type:"string"` - - // The column name to use to sort the list results: - // - // * registerTime: Sort by the time the revisions were registered with AWS - // CodeDeploy. - // - // * firstUsedTime: Sort by the time the revisions were first used in a deployment. - // - // * lastUsedTime: Sort by the time the revisions were last used in a deployment. - // - // If not specified or set to null, the results are returned in an arbitrary - // order. - SortBy *string `locationName:"sortBy" type:"string" enum:"ApplicationRevisionSortBy"` - - // The order in which to sort the list results: - // - // * ascending: ascending order. - // - // * descending: descending order. - // - // If not specified, the results are sorted in ascending order. - // - // If set to null, the results are sorted in an arbitrary order. - SortOrder *string `locationName:"sortOrder" type:"string" enum:"SortOrder"` -} - -// String returns the string representation -func (s ListApplicationRevisionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListApplicationRevisionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListApplicationRevisionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListApplicationRevisionsInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *ListApplicationRevisionsInput) SetApplicationName(v string) *ListApplicationRevisionsInput { - s.ApplicationName = &v - return s -} - -// SetDeployed sets the Deployed field's value. -func (s *ListApplicationRevisionsInput) SetDeployed(v string) *ListApplicationRevisionsInput { - s.Deployed = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListApplicationRevisionsInput) SetNextToken(v string) *ListApplicationRevisionsInput { - s.NextToken = &v - return s -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *ListApplicationRevisionsInput) SetS3Bucket(v string) *ListApplicationRevisionsInput { - s.S3Bucket = &v - return s -} - -// SetS3KeyPrefix sets the S3KeyPrefix field's value. -func (s *ListApplicationRevisionsInput) SetS3KeyPrefix(v string) *ListApplicationRevisionsInput { - s.S3KeyPrefix = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListApplicationRevisionsInput) SetSortBy(v string) *ListApplicationRevisionsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListApplicationRevisionsInput) SetSortOrder(v string) *ListApplicationRevisionsInput { - s.SortOrder = &v - return s -} - -// Represents the output of a ListApplicationRevisions operation. -type ListApplicationRevisionsOutput struct { - _ struct{} `type:"structure"` - - // If a large amount of information is returned, an identifier is also returned. - // It can be used in a subsequent list application revisions call to return - // the next set of application revisions in the list. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of locations that contain the matching revisions. - Revisions []*RevisionLocation `locationName:"revisions" type:"list"` -} - -// String returns the string representation -func (s ListApplicationRevisionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListApplicationRevisionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListApplicationRevisionsOutput) SetNextToken(v string) *ListApplicationRevisionsOutput { - s.NextToken = &v - return s -} - -// SetRevisions sets the Revisions field's value. -func (s *ListApplicationRevisionsOutput) SetRevisions(v []*RevisionLocation) *ListApplicationRevisionsOutput { - s.Revisions = v - return s -} - -// Represents the input of a ListApplications operation. -type ListApplicationsInput struct { - _ struct{} `type:"structure"` - - // An identifier returned from the previous list applications call. It can be - // used to return the next set of applications in the list. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListApplicationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListApplicationsInput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListApplicationsInput) SetNextToken(v string) *ListApplicationsInput { - s.NextToken = &v - return s -} - -// Represents the output of a ListApplications operation. -type ListApplicationsOutput struct { - _ struct{} `type:"structure"` - - // A list of application names. - Applications []*string `locationName:"applications" type:"list"` - - // If a large amount of information is returned, an identifier is also returned. - // It can be used in a subsequent list applications call to return the next - // set of applications in the list. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListApplicationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListApplicationsOutput) GoString() string { - return s.String() -} - -// SetApplications sets the Applications field's value. -func (s *ListApplicationsOutput) SetApplications(v []*string) *ListApplicationsOutput { - s.Applications = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListApplicationsOutput) SetNextToken(v string) *ListApplicationsOutput { - s.NextToken = &v - return s -} - -// Represents the input of a ListDeploymentConfigs operation. -type ListDeploymentConfigsInput struct { - _ struct{} `type:"structure"` - - // An identifier returned from the previous ListDeploymentConfigs call. It can - // be used to return the next set of deployment configurations in the list. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListDeploymentConfigsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDeploymentConfigsInput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDeploymentConfigsInput) SetNextToken(v string) *ListDeploymentConfigsInput { - s.NextToken = &v - return s -} - -// Represents the output of a ListDeploymentConfigs operation. -type ListDeploymentConfigsOutput struct { - _ struct{} `type:"structure"` - - // A list of deployment configurations, including built-in configurations such - // as CodeDeployDefault.OneAtATime. - DeploymentConfigsList []*string `locationName:"deploymentConfigsList" type:"list"` - - // If a large amount of information is returned, an identifier is also returned. - // It can be used in a subsequent list deployment configurations call to return - // the next set of deployment configurations in the list. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListDeploymentConfigsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDeploymentConfigsOutput) GoString() string { - return s.String() -} - -// SetDeploymentConfigsList sets the DeploymentConfigsList field's value. -func (s *ListDeploymentConfigsOutput) SetDeploymentConfigsList(v []*string) *ListDeploymentConfigsOutput { - s.DeploymentConfigsList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDeploymentConfigsOutput) SetNextToken(v string) *ListDeploymentConfigsOutput { - s.NextToken = &v - return s -} - -// Represents the input of a ListDeploymentGroups operation. -type ListDeploymentGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of an AWS CodeDeploy application associated with the IAM user or - // AWS account. - // - // ApplicationName is a required field - ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - - // An identifier returned from the previous list deployment groups call. It - // can be used to return the next set of deployment groups in the list. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListDeploymentGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDeploymentGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDeploymentGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDeploymentGroupsInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *ListDeploymentGroupsInput) SetApplicationName(v string) *ListDeploymentGroupsInput { - s.ApplicationName = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDeploymentGroupsInput) SetNextToken(v string) *ListDeploymentGroupsInput { - s.NextToken = &v - return s -} - -// Represents the output of a ListDeploymentGroups operation. -type ListDeploymentGroupsOutput struct { - _ struct{} `type:"structure"` - - // The application name. - ApplicationName *string `locationName:"applicationName" min:"1" type:"string"` - - // A list of deployment group names. - DeploymentGroups []*string `locationName:"deploymentGroups" type:"list"` - - // If a large amount of information is returned, an identifier is also returned. - // It can be used in a subsequent list deployment groups call to return the - // next set of deployment groups in the list. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListDeploymentGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDeploymentGroupsOutput) GoString() string { - return s.String() -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *ListDeploymentGroupsOutput) SetApplicationName(v string) *ListDeploymentGroupsOutput { - s.ApplicationName = &v - return s -} - -// SetDeploymentGroups sets the DeploymentGroups field's value. -func (s *ListDeploymentGroupsOutput) SetDeploymentGroups(v []*string) *ListDeploymentGroupsOutput { - s.DeploymentGroups = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDeploymentGroupsOutput) SetNextToken(v string) *ListDeploymentGroupsOutput { - s.NextToken = &v - return s -} - -// Represents the input of a ListDeploymentInstances operation. -type ListDeploymentInstancesInput struct { - _ struct{} `type:"structure"` - - // The unique ID of a deployment. - // - // DeploymentId is a required field - DeploymentId *string `locationName:"deploymentId" type:"string" required:"true"` - - // A subset of instances to list by status: - // - // * Pending: Include those instances with pending deployments. - // - // * InProgress: Include those instances where deployments are still in progress. - // - // * Succeeded: Include those instances with successful deployments. - // - // * Failed: Include those instances with failed deployments. - // - // * Skipped: Include those instances with skipped deployments. - // - // * Unknown: Include those instances with deployments in an unknown state. - InstanceStatusFilter []*string `locationName:"instanceStatusFilter" type:"list"` - - // The set of instances in a blue/green deployment, either those in the original - // environment ("BLUE") or those in the replacement environment ("GREEN"), for - // which you want to view instance information. - InstanceTypeFilter []*string `locationName:"instanceTypeFilter" type:"list"` - - // An identifier returned from the previous list deployment instances call. - // It can be used to return the next set of deployment instances in the list. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListDeploymentInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDeploymentInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDeploymentInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDeploymentInstancesInput"} - if s.DeploymentId == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *ListDeploymentInstancesInput) SetDeploymentId(v string) *ListDeploymentInstancesInput { - s.DeploymentId = &v - return s -} - -// SetInstanceStatusFilter sets the InstanceStatusFilter field's value. -func (s *ListDeploymentInstancesInput) SetInstanceStatusFilter(v []*string) *ListDeploymentInstancesInput { - s.InstanceStatusFilter = v - return s -} - -// SetInstanceTypeFilter sets the InstanceTypeFilter field's value. -func (s *ListDeploymentInstancesInput) SetInstanceTypeFilter(v []*string) *ListDeploymentInstancesInput { - s.InstanceTypeFilter = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDeploymentInstancesInput) SetNextToken(v string) *ListDeploymentInstancesInput { - s.NextToken = &v - return s -} - -// Represents the output of a ListDeploymentInstances operation. -type ListDeploymentInstancesOutput struct { - _ struct{} `type:"structure"` - - // A list of instance IDs. - InstancesList []*string `locationName:"instancesList" type:"list"` - - // If a large amount of information is returned, an identifier is also returned. - // It can be used in a subsequent list deployment instances call to return the - // next set of deployment instances in the list. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListDeploymentInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDeploymentInstancesOutput) GoString() string { - return s.String() -} - -// SetInstancesList sets the InstancesList field's value. -func (s *ListDeploymentInstancesOutput) SetInstancesList(v []*string) *ListDeploymentInstancesOutput { - s.InstancesList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDeploymentInstancesOutput) SetNextToken(v string) *ListDeploymentInstancesOutput { - s.NextToken = &v - return s -} - -type ListDeploymentTargetsInput struct { - _ struct{} `type:"structure"` - - // The unique ID of a deployment. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // A token identifier returned from the previous ListDeploymentTargets call. - // It can be used to return the next set of deployment targets in the list. - NextToken *string `locationName:"nextToken" type:"string"` - - // A key used to filter the returned targets. - TargetFilters map[string][]*string `locationName:"targetFilters" type:"map"` -} - -// String returns the string representation -func (s ListDeploymentTargetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDeploymentTargetsInput) GoString() string { - return s.String() -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *ListDeploymentTargetsInput) SetDeploymentId(v string) *ListDeploymentTargetsInput { - s.DeploymentId = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDeploymentTargetsInput) SetNextToken(v string) *ListDeploymentTargetsInput { - s.NextToken = &v - return s -} - -// SetTargetFilters sets the TargetFilters field's value. -func (s *ListDeploymentTargetsInput) SetTargetFilters(v map[string][]*string) *ListDeploymentTargetsInput { - s.TargetFilters = v - return s -} - -type ListDeploymentTargetsOutput struct { - _ struct{} `type:"structure"` - - // If a large amount of information is returned, a token identifier is also - // returned. It can be used in a subsequent ListDeploymentTargets call to return - // the next set of deployment targets in the list. - NextToken *string `locationName:"nextToken" type:"string"` - - // The unique IDs of deployment targets. - TargetIds []*string `locationName:"targetIds" type:"list"` -} - -// String returns the string representation -func (s ListDeploymentTargetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDeploymentTargetsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDeploymentTargetsOutput) SetNextToken(v string) *ListDeploymentTargetsOutput { - s.NextToken = &v - return s -} - -// SetTargetIds sets the TargetIds field's value. -func (s *ListDeploymentTargetsOutput) SetTargetIds(v []*string) *ListDeploymentTargetsOutput { - s.TargetIds = v - return s -} - -// Represents the input of a ListDeployments operation. -type ListDeploymentsInput struct { - _ struct{} `type:"structure"` - - // The name of an AWS CodeDeploy application associated with the IAM user or - // AWS account. - ApplicationName *string `locationName:"applicationName" min:"1" type:"string"` - - // A time range (start and end) for returning a subset of the list of deployments. - CreateTimeRange *TimeRange `locationName:"createTimeRange" type:"structure"` - - // The name of a deployment group for the specified application. - DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string"` - - // A subset of deployments to list by status: - // - // * Created: Include created deployments in the resulting list. - // - // * Queued: Include queued deployments in the resulting list. - // - // * In Progress: Include in-progress deployments in the resulting list. - // - // * Succeeded: Include successful deployments in the resulting list. - // - // * Failed: Include failed deployments in the resulting list. - // - // * Stopped: Include stopped deployments in the resulting list. - IncludeOnlyStatuses []*string `locationName:"includeOnlyStatuses" type:"list"` - - // An identifier returned from the previous list deployments call. It can be - // used to return the next set of deployments in the list. - NextToken *string `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.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.DeploymentGroupName != nil && len(*s.DeploymentGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeploymentGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *ListDeploymentsInput) SetApplicationName(v string) *ListDeploymentsInput { - s.ApplicationName = &v - return s -} - -// SetCreateTimeRange sets the CreateTimeRange field's value. -func (s *ListDeploymentsInput) SetCreateTimeRange(v *TimeRange) *ListDeploymentsInput { - s.CreateTimeRange = v - return s -} - -// SetDeploymentGroupName sets the DeploymentGroupName field's value. -func (s *ListDeploymentsInput) SetDeploymentGroupName(v string) *ListDeploymentsInput { - s.DeploymentGroupName = &v - return s -} - -// SetIncludeOnlyStatuses sets the IncludeOnlyStatuses field's value. -func (s *ListDeploymentsInput) SetIncludeOnlyStatuses(v []*string) *ListDeploymentsInput { - s.IncludeOnlyStatuses = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDeploymentsInput) SetNextToken(v string) *ListDeploymentsInput { - s.NextToken = &v - return s -} - -// Represents the output of a ListDeployments operation. -type ListDeploymentsOutput struct { - _ struct{} `type:"structure"` - - // A list of deployment IDs. - Deployments []*string `locationName:"deployments" type:"list"` - - // If a large amount of information is returned, an identifier is also returned. - // It can be used in a subsequent list deployments call to return the next set - // of deployments in the list. - NextToken *string `locationName:"nextToken" 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 []*string) *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 -} - -// Represents the input of a ListGitHubAccountTokenNames operation. -type ListGitHubAccountTokenNamesInput struct { - _ struct{} `type:"structure"` - - // An identifier returned from the previous ListGitHubAccountTokenNames call. - // It can be used to return the next set of names in the list. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListGitHubAccountTokenNamesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListGitHubAccountTokenNamesInput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListGitHubAccountTokenNamesInput) SetNextToken(v string) *ListGitHubAccountTokenNamesInput { - s.NextToken = &v - return s -} - -// Represents the output of a ListGitHubAccountTokenNames operation. -type ListGitHubAccountTokenNamesOutput struct { - _ struct{} `type:"structure"` - - // If a large amount of information is returned, an identifier is also returned. - // It can be used in a subsequent ListGitHubAccountTokenNames call to return - // the next set of names in the list. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of names of connections to GitHub accounts. - TokenNameList []*string `locationName:"tokenNameList" type:"list"` -} - -// String returns the string representation -func (s ListGitHubAccountTokenNamesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListGitHubAccountTokenNamesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListGitHubAccountTokenNamesOutput) SetNextToken(v string) *ListGitHubAccountTokenNamesOutput { - s.NextToken = &v - return s -} - -// SetTokenNameList sets the TokenNameList field's value. -func (s *ListGitHubAccountTokenNamesOutput) SetTokenNameList(v []*string) *ListGitHubAccountTokenNamesOutput { - s.TokenNameList = v - return s -} - -// Represents the input of a ListOnPremisesInstances operation. -type ListOnPremisesInstancesInput struct { - _ struct{} `type:"structure"` - - // An identifier returned from the previous list on-premises instances call. - // It can be used to return the next set of on-premises instances in the list. - NextToken *string `locationName:"nextToken" type:"string"` - - // The registration status of the on-premises instances: - // - // * Deregistered: Include deregistered on-premises instances in the resulting - // list. - // - // * Registered: Include registered on-premises instances in the resulting - // list. - RegistrationStatus *string `locationName:"registrationStatus" type:"string" enum:"RegistrationStatus"` - - // The on-premises instance tags that are used to restrict the on-premises instance - // names returned. - TagFilters []*TagFilter `locationName:"tagFilters" type:"list"` -} - -// String returns the string representation -func (s ListOnPremisesInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOnPremisesInstancesInput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOnPremisesInstancesInput) SetNextToken(v string) *ListOnPremisesInstancesInput { - s.NextToken = &v - return s -} - -// SetRegistrationStatus sets the RegistrationStatus field's value. -func (s *ListOnPremisesInstancesInput) SetRegistrationStatus(v string) *ListOnPremisesInstancesInput { - s.RegistrationStatus = &v - return s -} - -// SetTagFilters sets the TagFilters field's value. -func (s *ListOnPremisesInstancesInput) SetTagFilters(v []*TagFilter) *ListOnPremisesInstancesInput { - s.TagFilters = v - return s -} - -// Represents the output of the list on-premises instances operation. -type ListOnPremisesInstancesOutput struct { - _ struct{} `type:"structure"` - - // The list of matching on-premises instance names. - InstanceNames []*string `locationName:"instanceNames" type:"list"` - - // If a large amount of information is returned, an identifier is also returned. - // It can be used in a subsequent list on-premises instances call to return - // the next set of on-premises instances in the list. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListOnPremisesInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOnPremisesInstancesOutput) GoString() string { - return s.String() -} - -// SetInstanceNames sets the InstanceNames field's value. -func (s *ListOnPremisesInstancesOutput) SetInstanceNames(v []*string) *ListOnPremisesInstancesOutput { - s.InstanceNames = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOnPremisesInstancesOutput) SetNextToken(v string) *ListOnPremisesInstancesOutput { - s.NextToken = &v - return s -} - -// Information about the Elastic Load Balancing load balancer or target group -// used in a deployment. -type LoadBalancerInfo struct { - _ struct{} `type:"structure"` - - // An array that contains information about the load balancer to use for load - // balancing in a deployment. In Elastic Load Balancing, load balancers are - // used with Classic Load Balancers. - // - // Adding more than one load balancer to the array is not supported. - ElbInfoList []*ELBInfo `locationName:"elbInfoList" type:"list"` - - // An array that contains information about the target group to use for load - // balancing in a deployment. In Elastic Load Balancing, target groups are used - // with Application Load Balancers. - // - // Adding more than one target group to the array is not supported. - TargetGroupInfoList []*TargetGroupInfo `locationName:"targetGroupInfoList" type:"list"` - - // The target group pair information. This is an array of TargeGroupPairInfo - // objects with a maximum size of one. - TargetGroupPairInfoList []*TargetGroupPairInfo `locationName:"targetGroupPairInfoList" type:"list"` -} - -// String returns the string representation -func (s LoadBalancerInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancerInfo) GoString() string { - return s.String() -} - -// SetElbInfoList sets the ElbInfoList field's value. -func (s *LoadBalancerInfo) SetElbInfoList(v []*ELBInfo) *LoadBalancerInfo { - s.ElbInfoList = v - return s -} - -// SetTargetGroupInfoList sets the TargetGroupInfoList field's value. -func (s *LoadBalancerInfo) SetTargetGroupInfoList(v []*TargetGroupInfo) *LoadBalancerInfo { - s.TargetGroupInfoList = v - return s -} - -// SetTargetGroupPairInfoList sets the TargetGroupPairInfoList field's value. -func (s *LoadBalancerInfo) SetTargetGroupPairInfoList(v []*TargetGroupPairInfo) *LoadBalancerInfo { - s.TargetGroupPairInfoList = v - return s -} - -// Information about minimum healthy instance. -type MinimumHealthyHosts struct { - _ struct{} `type:"structure"` - - // The minimum healthy instance type: - // - // * HOST_COUNT: The minimum number of healthy instance as an absolute value. - // - // * FLEET_PERCENT: The minimum number of healthy instance as a percentage - // of the total number of instance in the deployment. - // - // In an example of nine instance, if a HOST_COUNT of six is specified, deploy - // to up to three instances at a time. The deployment is successful if six or - // more instances are deployed to successfully. Otherwise, the deployment fails. - // If a FLEET_PERCENT of 40 is specified, deploy to up to five instance at a - // time. The deployment is successful if four or more instance are deployed - // to successfully. Otherwise, the deployment fails. - // - // In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime - // returns a minimum healthy instance type of MOST_CONCURRENCY and a value of - // 1. This means a deployment to only one instance at a time. (You cannot set - // the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, - // with CodeDeployDefault.OneAtATime, AWS CodeDeploy attempts to ensure that - // all instances but one are kept in a healthy state during the deployment. - // Although this allows one instance at a time to be taken offline for a new - // deployment, it also means that if the deployment to the last instance fails, - // the overall deployment is still successful. - // - // For more information, see AWS CodeDeploy Instance Health (http://docs.aws.amazon.com/codedeploy/latest/userguide/instances-health.html) - // in the AWS CodeDeploy User Guide. - Type *string `locationName:"type" type:"string" enum:"MinimumHealthyHostsType"` - - // The minimum healthy instance value. - Value *int64 `locationName:"value" type:"integer"` -} - -// String returns the string representation -func (s MinimumHealthyHosts) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MinimumHealthyHosts) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *MinimumHealthyHosts) SetType(v string) *MinimumHealthyHosts { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *MinimumHealthyHosts) SetValue(v int64) *MinimumHealthyHosts { - s.Value = &v - return s -} - -// Information about groups of on-premises instance tags. -type OnPremisesTagSet struct { - _ struct{} `type:"structure"` - - // A list that contains other lists of on-premises instance tag groups. For - // an instance to be included in the deployment group, it must be identified - // by all of the tag groups in the list. - OnPremisesTagSetList [][]*TagFilter `locationName:"onPremisesTagSetList" type:"list"` -} - -// String returns the string representation -func (s OnPremisesTagSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OnPremisesTagSet) GoString() string { - return s.String() -} - -// SetOnPremisesTagSetList sets the OnPremisesTagSetList field's value. -func (s *OnPremisesTagSet) SetOnPremisesTagSetList(v [][]*TagFilter) *OnPremisesTagSet { - s.OnPremisesTagSetList = v - return s -} - -type PutLifecycleEventHookExecutionStatusInput struct { - _ struct{} `type:"structure"` - - // The unique ID of a deployment. Pass this ID to a Lambda function that validates - // a deployment lifecycle event. - DeploymentId *string `locationName:"deploymentId" type:"string"` - - // The execution ID of a deployment's lifecycle hook. A deployment lifecycle - // hook is specified in the hooks section of the AppSpec file. - LifecycleEventHookExecutionId *string `locationName:"lifecycleEventHookExecutionId" type:"string"` - - // The result of a Lambda function that validates a deployment lifecycle event - // (Succeeded or Failed). - Status *string `locationName:"status" type:"string" enum:"LifecycleEventStatus"` -} - -// String returns the string representation -func (s PutLifecycleEventHookExecutionStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutLifecycleEventHookExecutionStatusInput) GoString() string { - return s.String() -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *PutLifecycleEventHookExecutionStatusInput) SetDeploymentId(v string) *PutLifecycleEventHookExecutionStatusInput { - s.DeploymentId = &v - return s -} - -// SetLifecycleEventHookExecutionId sets the LifecycleEventHookExecutionId field's value. -func (s *PutLifecycleEventHookExecutionStatusInput) SetLifecycleEventHookExecutionId(v string) *PutLifecycleEventHookExecutionStatusInput { - s.LifecycleEventHookExecutionId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *PutLifecycleEventHookExecutionStatusInput) SetStatus(v string) *PutLifecycleEventHookExecutionStatusInput { - s.Status = &v - return s -} - -type PutLifecycleEventHookExecutionStatusOutput struct { - _ struct{} `type:"structure"` - - // The execution ID of the lifecycle event hook. A hook is specified in the - // hooks section of the deployment's AppSpec file. - LifecycleEventHookExecutionId *string `locationName:"lifecycleEventHookExecutionId" type:"string"` -} - -// String returns the string representation -func (s PutLifecycleEventHookExecutionStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutLifecycleEventHookExecutionStatusOutput) GoString() string { - return s.String() -} - -// SetLifecycleEventHookExecutionId sets the LifecycleEventHookExecutionId field's value. -func (s *PutLifecycleEventHookExecutionStatusOutput) SetLifecycleEventHookExecutionId(v string) *PutLifecycleEventHookExecutionStatusOutput { - s.LifecycleEventHookExecutionId = &v - return s -} - -// A revision for an AWS Lambda deployment that is a YAML-formatted or JSON-formatted -// string. For AWS Lambda deployments, the revision is the same as the AppSpec -// file. -// -// Deprecated: RawString and String revision type are deprecated, use AppSpecContent type instead. -type RawString struct { - _ struct{} `deprecated:"true" type:"structure"` - - // The YAML-formatted or JSON-formatted revision string. It includes information - // about which Lambda function to update and optional Lambda functions that - // validate deployment lifecycle events. - Content *string `locationName:"content" type:"string"` - - // The SHA256 hash value of the revision content. - Sha256 *string `locationName:"sha256" type:"string"` -} - -// String returns the string representation -func (s RawString) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RawString) GoString() string { - return s.String() -} - -// SetContent sets the Content field's value. -func (s *RawString) SetContent(v string) *RawString { - s.Content = &v - return s -} - -// SetSha256 sets the Sha256 field's value. -func (s *RawString) SetSha256(v string) *RawString { - s.Sha256 = &v - return s -} - -// Represents the input of a RegisterApplicationRevision operation. -type RegisterApplicationRevisionInput struct { - _ struct{} `type:"structure"` - - // The name of an AWS CodeDeploy application associated with the IAM user or - // AWS account. - // - // ApplicationName is a required field - ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - - // A comment about the revision. - Description *string `locationName:"description" type:"string"` - - // Information about the application revision to register, including type and - // location. - // - // Revision is a required field - Revision *RevisionLocation `locationName:"revision" type:"structure" required:"true"` -} - -// String returns the string representation -func (s RegisterApplicationRevisionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterApplicationRevisionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterApplicationRevisionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterApplicationRevisionInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.Revision == nil { - invalidParams.Add(request.NewErrParamRequired("Revision")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *RegisterApplicationRevisionInput) SetApplicationName(v string) *RegisterApplicationRevisionInput { - s.ApplicationName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *RegisterApplicationRevisionInput) SetDescription(v string) *RegisterApplicationRevisionInput { - s.Description = &v - return s -} - -// SetRevision sets the Revision field's value. -func (s *RegisterApplicationRevisionInput) SetRevision(v *RevisionLocation) *RegisterApplicationRevisionInput { - s.Revision = v - return s -} - -type RegisterApplicationRevisionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RegisterApplicationRevisionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterApplicationRevisionOutput) GoString() string { - return s.String() -} - -// Represents the input of the register on-premises instance operation. -type RegisterOnPremisesInstanceInput struct { - _ struct{} `type:"structure"` - - // The ARN of the IAM session to associate with the on-premises instance. - IamSessionArn *string `locationName:"iamSessionArn" type:"string"` - - // The ARN of the IAM user to associate with the on-premises instance. - IamUserArn *string `locationName:"iamUserArn" type:"string"` - - // The name of the on-premises instance to register. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterOnPremisesInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterOnPremisesInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterOnPremisesInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterOnPremisesInstanceInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIamSessionArn sets the IamSessionArn field's value. -func (s *RegisterOnPremisesInstanceInput) SetIamSessionArn(v string) *RegisterOnPremisesInstanceInput { - s.IamSessionArn = &v - return s -} - -// SetIamUserArn sets the IamUserArn field's value. -func (s *RegisterOnPremisesInstanceInput) SetIamUserArn(v string) *RegisterOnPremisesInstanceInput { - s.IamUserArn = &v - return s -} - -// SetInstanceName sets the InstanceName field's value. -func (s *RegisterOnPremisesInstanceInput) SetInstanceName(v string) *RegisterOnPremisesInstanceInput { - s.InstanceName = &v - return s -} - -type RegisterOnPremisesInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RegisterOnPremisesInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterOnPremisesInstanceOutput) GoString() string { - return s.String() -} - -// Represents the input of a RemoveTagsFromOnPremisesInstances operation. -type RemoveTagsFromOnPremisesInstancesInput struct { - _ struct{} `type:"structure"` - - // The names of the on-premises instances from which to remove tags. - // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` - - // The tag key-value pairs to remove from the on-premises instances. - // - // Tags is a required field - Tags []*Tag `locationName:"tags" type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsFromOnPremisesInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromOnPremisesInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsFromOnPremisesInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromOnPremisesInstancesInput"} - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceNames sets the InstanceNames field's value. -func (s *RemoveTagsFromOnPremisesInstancesInput) SetInstanceNames(v []*string) *RemoveTagsFromOnPremisesInstancesInput { - s.InstanceNames = v - return s -} - -// SetTags sets the Tags field's value. -func (s *RemoveTagsFromOnPremisesInstancesInput) SetTags(v []*Tag) *RemoveTagsFromOnPremisesInstancesInput { - s.Tags = v - return s -} - -type RemoveTagsFromOnPremisesInstancesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsFromOnPremisesInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromOnPremisesInstancesOutput) GoString() string { - return s.String() -} - -// Information about an application revision. -type RevisionInfo struct { - _ struct{} `type:"structure"` - - // Information about an application revision, including usage details and associated - // deployment groups. - GenericRevisionInfo *GenericRevisionInfo `locationName:"genericRevisionInfo" type:"structure"` - - // Information about the location and type of an application revision. - RevisionLocation *RevisionLocation `locationName:"revisionLocation" type:"structure"` -} - -// String returns the string representation -func (s RevisionInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevisionInfo) GoString() string { - return s.String() -} - -// SetGenericRevisionInfo sets the GenericRevisionInfo field's value. -func (s *RevisionInfo) SetGenericRevisionInfo(v *GenericRevisionInfo) *RevisionInfo { - s.GenericRevisionInfo = v - return s -} - -// SetRevisionLocation sets the RevisionLocation field's value. -func (s *RevisionInfo) SetRevisionLocation(v *RevisionLocation) *RevisionInfo { - s.RevisionLocation = v - return s -} - -// Information about the location of an application revision. -type RevisionLocation struct { - _ struct{} `type:"structure"` - - // The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. - // The content is formatted as JSON or YAML and stored as a RawString. - AppSpecContent *AppSpecContent `locationName:"appSpecContent" type:"structure"` - - // Information about the location of application artifacts stored in GitHub. - GitHubLocation *GitHubLocation `locationName:"gitHubLocation" type:"structure"` - - // The type of application revision: - // - // * S3: An application revision stored in Amazon S3. - // - // * GitHub: An application revision stored in GitHub (EC2/On-premises deployments - // only). - // - // * String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments - // only). - RevisionType *string `locationName:"revisionType" type:"string" enum:"RevisionLocationType"` - - // Information about the location of a revision stored in Amazon S3. - S3Location *S3Location `locationName:"s3Location" type:"structure"` - - // Information about the location of an AWS Lambda deployment revision stored - // as a RawString. - String_ *RawString `locationName:"string" deprecated:"true" type:"structure"` -} - -// String returns the string representation -func (s RevisionLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevisionLocation) GoString() string { - return s.String() -} - -// SetAppSpecContent sets the AppSpecContent field's value. -func (s *RevisionLocation) SetAppSpecContent(v *AppSpecContent) *RevisionLocation { - s.AppSpecContent = v - return s -} - -// SetGitHubLocation sets the GitHubLocation field's value. -func (s *RevisionLocation) SetGitHubLocation(v *GitHubLocation) *RevisionLocation { - s.GitHubLocation = v - return s -} - -// SetRevisionType sets the RevisionType field's value. -func (s *RevisionLocation) SetRevisionType(v string) *RevisionLocation { - s.RevisionType = &v - return s -} - -// SetS3Location sets the S3Location field's value. -func (s *RevisionLocation) SetS3Location(v *S3Location) *RevisionLocation { - s.S3Location = v - return s -} - -// SetString_ sets the String_ field's value. -func (s *RevisionLocation) SetString_(v *RawString) *RevisionLocation { - s.String_ = v - return s -} - -// Information about a deployment rollback. -type RollbackInfo struct { - _ struct{} `type:"structure"` - - // The ID of the deployment rollback. - RollbackDeploymentId *string `locationName:"rollbackDeploymentId" type:"string"` - - // Information that describes the status of a deployment rollback (for example, - // whether the deployment can't be rolled back, is in progress, failed, or succeeded). - RollbackMessage *string `locationName:"rollbackMessage" type:"string"` - - // The deployment ID of the deployment that was underway and triggered a rollback - // deployment because it failed or was stopped. - RollbackTriggeringDeploymentId *string `locationName:"rollbackTriggeringDeploymentId" type:"string"` -} - -// String returns the string representation -func (s RollbackInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RollbackInfo) GoString() string { - return s.String() -} - -// SetRollbackDeploymentId sets the RollbackDeploymentId field's value. -func (s *RollbackInfo) SetRollbackDeploymentId(v string) *RollbackInfo { - s.RollbackDeploymentId = &v - return s -} - -// SetRollbackMessage sets the RollbackMessage field's value. -func (s *RollbackInfo) SetRollbackMessage(v string) *RollbackInfo { - s.RollbackMessage = &v - return s -} - -// SetRollbackTriggeringDeploymentId sets the RollbackTriggeringDeploymentId field's value. -func (s *RollbackInfo) SetRollbackTriggeringDeploymentId(v string) *RollbackInfo { - s.RollbackTriggeringDeploymentId = &v - return s -} - -// Information about the location of application artifacts stored in Amazon -// S3. -type S3Location struct { - _ struct{} `type:"structure"` - - // The name of the Amazon S3 bucket where the application revision is stored. - Bucket *string `locationName:"bucket" type:"string"` - - // The file type of the application revision. Must be one of the following: - // - // * tar: A tar archive file. - // - // * tgz: A compressed tar archive file. - // - // * zip: A zip archive file. - BundleType *string `locationName:"bundleType" type:"string" enum:"BundleType"` - - // The ETag of the Amazon S3 object that represents the bundled artifacts for - // the application revision. - // - // If the ETag is not specified as an input parameter, ETag validation of the - // object is skipped. - ETag *string `locationName:"eTag" type:"string"` - - // The name of the Amazon S3 object that represents the bundled artifacts for - // the application revision. - Key *string `locationName:"key" type:"string"` - - // A specific version of the Amazon S3 object that represents the bundled artifacts - // for the application revision. - // - // If the version is not specified, the system uses the most recent version - // by default. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s S3Location) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Location) GoString() string { - return s.String() -} - -// SetBucket sets the Bucket field's value. -func (s *S3Location) SetBucket(v string) *S3Location { - s.Bucket = &v - return s -} - -// SetBundleType sets the BundleType field's value. -func (s *S3Location) SetBundleType(v string) *S3Location { - s.BundleType = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *S3Location) SetETag(v string) *S3Location { - s.ETag = &v - return s -} - -// SetKey sets the Key field's value. -func (s *S3Location) SetKey(v string) *S3Location { - s.Key = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *S3Location) SetVersion(v string) *S3Location { - s.Version = &v - return s -} - -type SkipWaitTimeForInstanceTerminationInput struct { - _ struct{} `type:"structure"` - - // The unique ID of a blue/green deployment for which you want to skip the instance - // termination wait time. - DeploymentId *string `locationName:"deploymentId" type:"string"` -} - -// String returns the string representation -func (s SkipWaitTimeForInstanceTerminationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SkipWaitTimeForInstanceTerminationInput) GoString() string { - return s.String() -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *SkipWaitTimeForInstanceTerminationInput) SetDeploymentId(v string) *SkipWaitTimeForInstanceTerminationInput { - s.DeploymentId = &v - return s -} - -type SkipWaitTimeForInstanceTerminationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SkipWaitTimeForInstanceTerminationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SkipWaitTimeForInstanceTerminationOutput) GoString() string { - return s.String() -} - -// Represents the input of a StopDeployment operation. -type StopDeploymentInput struct { - _ struct{} `type:"structure"` - - // Indicates, when a deployment is stopped, whether instances that have been - // updated should be rolled back to the previous version of the application - // revision. - AutoRollbackEnabled *bool `locationName:"autoRollbackEnabled" type:"boolean"` - - // The unique ID of a deployment. - // - // DeploymentId is a required field - DeploymentId *string `locationName:"deploymentId" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopDeploymentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopDeploymentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopDeploymentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopDeploymentInput"} - if s.DeploymentId == nil { - invalidParams.Add(request.NewErrParamRequired("DeploymentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoRollbackEnabled sets the AutoRollbackEnabled field's value. -func (s *StopDeploymentInput) SetAutoRollbackEnabled(v bool) *StopDeploymentInput { - s.AutoRollbackEnabled = &v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *StopDeploymentInput) SetDeploymentId(v string) *StopDeploymentInput { - s.DeploymentId = &v - return s -} - -// Represents the output of a StopDeployment operation. -type StopDeploymentOutput struct { - _ struct{} `type:"structure"` - - // The status of the stop deployment operation: - // - // * Pending: The stop operation is pending. - // - // * Succeeded: The stop operation was successful. - Status *string `locationName:"status" type:"string" enum:"StopStatus"` - - // An accompanying status message. - StatusMessage *string `locationName:"statusMessage" type:"string"` -} - -// String returns the string representation -func (s StopDeploymentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopDeploymentOutput) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *StopDeploymentOutput) SetStatus(v string) *StopDeploymentOutput { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *StopDeploymentOutput) SetStatusMessage(v string) *StopDeploymentOutput { - s.StatusMessage = &v - return s -} - -// Information about a tag. -type Tag struct { - _ struct{} `type:"structure"` - - // The tag's key. - Key *string `type:"string"` - - // The tag's value. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Information about an on-premises instance tag filter. -type TagFilter struct { - _ struct{} `type:"structure"` - - // The on-premises instance tag filter key. - Key *string `type:"string"` - - // The on-premises instance tag filter type: - // - // * KEY_ONLY: Key only. - // - // * VALUE_ONLY: Value only. - // - // * KEY_AND_VALUE: Key and value. - Type *string `type:"string" enum:"TagFilterType"` - - // The on-premises instance tag filter value. - Value *string `type:"string"` -} - -// String returns the string representation -func (s TagFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagFilter) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *TagFilter) SetKey(v string) *TagFilter { - s.Key = &v - return s -} - -// SetType sets the Type field's value. -func (s *TagFilter) SetType(v string) *TagFilter { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *TagFilter) SetValue(v string) *TagFilter { - s.Value = &v - return s -} - -// Information about a target group in Elastic Load Balancing to use in a deployment. -// Instances are registered as targets in a target group, and traffic is routed -// to the target group. -type TargetGroupInfo struct { - _ struct{} `type:"structure"` - - // For blue/green deployments, the name of the target group that instances in - // the original environment are deregistered from, and instances in the replacement - // environment are registered with. For in-place deployments, the name of the - // target group that instances are deregistered from, so they are not serving - // traffic during a deployment, and then re-registered with after the deployment - // is complete. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s TargetGroupInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetGroupInfo) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *TargetGroupInfo) SetName(v string) *TargetGroupInfo { - s.Name = &v - return s -} - -// Information about two target groups and how traffic is routed during an Amazon -// ECS deployment. An optional test traffic route can be specified. -type TargetGroupPairInfo struct { - _ struct{} `type:"structure"` - - // The path used by a load balancer to route production traffic when an Amazon - // ECS deployment is complete. - ProdTrafficRoute *TrafficRoute `locationName:"prodTrafficRoute" type:"structure"` - - // One pair of target groups. One is associated with the original task set. - // The second is associated with the task set that serves traffic after the - // deployment is complete. - TargetGroups []*TargetGroupInfo `locationName:"targetGroups" type:"list"` - - // An optional path used by a load balancer to route test traffic after an Amazon - // ECS deployment. Validation can occur while test traffic is served during - // a deployment. - TestTrafficRoute *TrafficRoute `locationName:"testTrafficRoute" type:"structure"` -} - -// String returns the string representation -func (s TargetGroupPairInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetGroupPairInfo) GoString() string { - return s.String() -} - -// SetProdTrafficRoute sets the ProdTrafficRoute field's value. -func (s *TargetGroupPairInfo) SetProdTrafficRoute(v *TrafficRoute) *TargetGroupPairInfo { - s.ProdTrafficRoute = v - return s -} - -// SetTargetGroups sets the TargetGroups field's value. -func (s *TargetGroupPairInfo) SetTargetGroups(v []*TargetGroupInfo) *TargetGroupPairInfo { - s.TargetGroups = v - return s -} - -// SetTestTrafficRoute sets the TestTrafficRoute field's value. -func (s *TargetGroupPairInfo) SetTestTrafficRoute(v *TrafficRoute) *TargetGroupPairInfo { - s.TestTrafficRoute = v - return s -} - -// Information about the instances to be used in the replacement environment -// in a blue/green deployment. -type TargetInstances struct { - _ struct{} `type:"structure"` - - // The names of one or more Auto Scaling groups to identify a replacement environment - // for a blue/green deployment. - AutoScalingGroups []*string `locationName:"autoScalingGroups" type:"list"` - - // Information about the groups of EC2 instance tags that an instance must be - // identified by in order for it to be included in the replacement environment - // for a blue/green deployment. Cannot be used in the same call as tagFilters. - Ec2TagSet *EC2TagSet `locationName:"ec2TagSet" type:"structure"` - - // The tag filter key, type, and value used to identify Amazon EC2 instances - // in a replacement environment for a blue/green deployment. Cannot be used - // in the same call as ec2TagSet. - TagFilters []*EC2TagFilter `locationName:"tagFilters" type:"list"` -} - -// String returns the string representation -func (s TargetInstances) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetInstances) GoString() string { - return s.String() -} - -// SetAutoScalingGroups sets the AutoScalingGroups field's value. -func (s *TargetInstances) SetAutoScalingGroups(v []*string) *TargetInstances { - s.AutoScalingGroups = v - return s -} - -// SetEc2TagSet sets the Ec2TagSet field's value. -func (s *TargetInstances) SetEc2TagSet(v *EC2TagSet) *TargetInstances { - s.Ec2TagSet = v - return s -} - -// SetTagFilters sets the TagFilters field's value. -func (s *TargetInstances) SetTagFilters(v []*EC2TagFilter) *TargetInstances { - s.TagFilters = v - return s -} - -// A configuration that shifts traffic from one version of a Lambda function -// to another in two increments. The original and target Lambda function versions -// are specified in the deployment's AppSpec file. -type TimeBasedCanary struct { - _ struct{} `type:"structure"` - - // The number of minutes between the first and second traffic shifts of a TimeBasedCanary - // deployment. - CanaryInterval *int64 `locationName:"canaryInterval" type:"integer"` - - // The percentage of traffic to shift in the first increment of a TimeBasedCanary - // deployment. - CanaryPercentage *int64 `locationName:"canaryPercentage" type:"integer"` -} - -// String returns the string representation -func (s TimeBasedCanary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimeBasedCanary) GoString() string { - return s.String() -} - -// SetCanaryInterval sets the CanaryInterval field's value. -func (s *TimeBasedCanary) SetCanaryInterval(v int64) *TimeBasedCanary { - s.CanaryInterval = &v - return s -} - -// SetCanaryPercentage sets the CanaryPercentage field's value. -func (s *TimeBasedCanary) SetCanaryPercentage(v int64) *TimeBasedCanary { - s.CanaryPercentage = &v - return s -} - -// A configuration that shifts traffic from one version of a Lambda function -// to another in equal increments, with an equal number of minutes between each -// increment. The original and target Lambda function versions are specified -// in the deployment's AppSpec file. -type TimeBasedLinear struct { - _ struct{} `type:"structure"` - - // The number of minutes between each incremental traffic shift of a TimeBasedLinear - // deployment. - LinearInterval *int64 `locationName:"linearInterval" type:"integer"` - - // The percentage of traffic that is shifted at the start of each increment - // of a TimeBasedLinear deployment. - LinearPercentage *int64 `locationName:"linearPercentage" type:"integer"` -} - -// String returns the string representation -func (s TimeBasedLinear) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimeBasedLinear) GoString() string { - return s.String() -} - -// SetLinearInterval sets the LinearInterval field's value. -func (s *TimeBasedLinear) SetLinearInterval(v int64) *TimeBasedLinear { - s.LinearInterval = &v - return s -} - -// SetLinearPercentage sets the LinearPercentage field's value. -func (s *TimeBasedLinear) SetLinearPercentage(v int64) *TimeBasedLinear { - s.LinearPercentage = &v - return s -} - -// Information about a time range. -type TimeRange struct { - _ struct{} `type:"structure"` - - // The end time of the time range. - // - // Specify null to leave the end time open-ended. - End *time.Time `locationName:"end" type:"timestamp"` - - // The start time of the time range. - // - // Specify null to leave the start time open-ended. - Start *time.Time `locationName:"start" type:"timestamp"` -} - -// String returns the string representation -func (s TimeRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimeRange) GoString() string { - return s.String() -} - -// SetEnd sets the End field's value. -func (s *TimeRange) SetEnd(v time.Time) *TimeRange { - s.End = &v - return s -} - -// SetStart sets the Start field's value. -func (s *TimeRange) SetStart(v time.Time) *TimeRange { - s.Start = &v - return s -} - -// Information about a listener. The listener contains the path used to route -// traffic that is received from the load balancer to a target group. -type TrafficRoute struct { - _ struct{} `type:"structure"` - - // The ARN of one listener. The listener identifies the route between a target - // group and a load balancer. This is an array of strings with a maximum size - // of one. - ListenerArns []*string `locationName:"listenerArns" type:"list"` -} - -// String returns the string representation -func (s TrafficRoute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TrafficRoute) GoString() string { - return s.String() -} - -// SetListenerArns sets the ListenerArns field's value. -func (s *TrafficRoute) SetListenerArns(v []*string) *TrafficRoute { - s.ListenerArns = v - return s -} - -// The configuration that specifies how traffic is shifted from one version -// of a Lambda function to another version during an AWS Lambda deployment. -type TrafficRoutingConfig struct { - _ struct{} `type:"structure"` - - // A configuration that shifts traffic from one version of a Lambda function - // to another in two increments. The original and target Lambda function versions - // are specified in the deployment's AppSpec file. - TimeBasedCanary *TimeBasedCanary `locationName:"timeBasedCanary" type:"structure"` - - // A configuration that shifts traffic from one version of a Lambda function - // to another in equal increments, with an equal number of minutes between each - // increment. The original and target Lambda function versions are specified - // in the deployment's AppSpec file. - TimeBasedLinear *TimeBasedLinear `locationName:"timeBasedLinear" type:"structure"` - - // The type of traffic shifting (TimeBasedCanary or TimeBasedLinear) used by - // a deployment configuration . - Type *string `locationName:"type" type:"string" enum:"TrafficRoutingType"` -} - -// String returns the string representation -func (s TrafficRoutingConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TrafficRoutingConfig) GoString() string { - return s.String() -} - -// SetTimeBasedCanary sets the TimeBasedCanary field's value. -func (s *TrafficRoutingConfig) SetTimeBasedCanary(v *TimeBasedCanary) *TrafficRoutingConfig { - s.TimeBasedCanary = v - return s -} - -// SetTimeBasedLinear sets the TimeBasedLinear field's value. -func (s *TrafficRoutingConfig) SetTimeBasedLinear(v *TimeBasedLinear) *TrafficRoutingConfig { - s.TimeBasedLinear = v - return s -} - -// SetType sets the Type field's value. -func (s *TrafficRoutingConfig) SetType(v string) *TrafficRoutingConfig { - s.Type = &v - return s -} - -// Information about notification triggers for the deployment group. -type TriggerConfig struct { - _ struct{} `type:"structure"` - - // The event type or types for which notifications are triggered. - TriggerEvents []*string `locationName:"triggerEvents" type:"list"` - - // The name of the notification trigger. - TriggerName *string `locationName:"triggerName" type:"string"` - - // The ARN of the Amazon Simple Notification Service topic through which notifications - // about deployment or instance events are sent. - TriggerTargetArn *string `locationName:"triggerTargetArn" type:"string"` -} - -// String returns the string representation -func (s TriggerConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TriggerConfig) GoString() string { - return s.String() -} - -// SetTriggerEvents sets the TriggerEvents field's value. -func (s *TriggerConfig) SetTriggerEvents(v []*string) *TriggerConfig { - s.TriggerEvents = v - return s -} - -// SetTriggerName sets the TriggerName field's value. -func (s *TriggerConfig) SetTriggerName(v string) *TriggerConfig { - s.TriggerName = &v - return s -} - -// SetTriggerTargetArn sets the TriggerTargetArn field's value. -func (s *TriggerConfig) SetTriggerTargetArn(v string) *TriggerConfig { - s.TriggerTargetArn = &v - return s -} - -// Represents the input of an UpdateApplication operation. -type UpdateApplicationInput struct { - _ struct{} `type:"structure"` - - // The current name of the application you want to change. - ApplicationName *string `locationName:"applicationName" min:"1" type:"string"` - - // The new name to give the application. - NewApplicationName *string `locationName:"newApplicationName" min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationInput"} - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.NewApplicationName != nil && len(*s.NewApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewApplicationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *UpdateApplicationInput) SetApplicationName(v string) *UpdateApplicationInput { - s.ApplicationName = &v - return s -} - -// SetNewApplicationName sets the NewApplicationName field's value. -func (s *UpdateApplicationInput) SetNewApplicationName(v string) *UpdateApplicationInput { - s.NewApplicationName = &v - return s -} - -type UpdateApplicationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApplicationOutput) GoString() string { - return s.String() -} - -// Represents the input of an UpdateDeploymentGroup operation. -type UpdateDeploymentGroupInput struct { - _ struct{} `type:"structure"` - - // Information to add or change about Amazon CloudWatch alarms when the deployment - // group is updated. - AlarmConfiguration *AlarmConfiguration `locationName:"alarmConfiguration" type:"structure"` - - // The application name that corresponds to the deployment group to update. - // - // ApplicationName is a required field - ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - - // Information for an automatic rollback configuration that is added or changed - // when a deployment group is updated. - AutoRollbackConfiguration *AutoRollbackConfiguration `locationName:"autoRollbackConfiguration" type:"structure"` - - // The replacement list of Auto Scaling groups to be included in the deployment - // group, if you want to change them. To keep the Auto Scaling groups, enter - // their names. To remove Auto Scaling groups, do not enter any Auto Scaling - // group names. - AutoScalingGroups []*string `locationName:"autoScalingGroups" type:"list"` - - // Information about blue/green deployment options for a deployment group. - BlueGreenDeploymentConfiguration *BlueGreenDeploymentConfiguration `locationName:"blueGreenDeploymentConfiguration" type:"structure"` - - // The current name of the deployment group. - // - // CurrentDeploymentGroupName is a required field - CurrentDeploymentGroupName *string `locationName:"currentDeploymentGroupName" min:"1" type:"string" required:"true"` - - // The replacement deployment configuration name to use, if you want to change - // it. - DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string"` - - // Information about the type of deployment, either in-place or blue/green, - // you want to run and whether to route deployment traffic behind a load balancer. - DeploymentStyle *DeploymentStyle `locationName:"deploymentStyle" type:"structure"` - - // The replacement set of Amazon EC2 tags on which to filter, if you want to - // change them. To keep the existing tags, enter their names. To remove tags, - // do not enter any tag names. - Ec2TagFilters []*EC2TagFilter `locationName:"ec2TagFilters" type:"list"` - - // Information about groups of tags applied to on-premises instances. The deployment - // group includes only EC2 instances identified by all the tag groups. - Ec2TagSet *EC2TagSet `locationName:"ec2TagSet" type:"structure"` - - // The target Amazon ECS services in the deployment group. This applies only - // to deployment groups that use the Amazon ECS compute platform. A target Amazon - // ECS service is specified as an Amazon ECS cluster and service name pair using - // the format :. - EcsServices []*ECSService `locationName:"ecsServices" type:"list"` - - // Information about the load balancer used in a deployment. - LoadBalancerInfo *LoadBalancerInfo `locationName:"loadBalancerInfo" type:"structure"` - - // The new name of the deployment group, if you want to change it. - NewDeploymentGroupName *string `locationName:"newDeploymentGroupName" min:"1" type:"string"` - - // The replacement set of on-premises instance tags on which to filter, if you - // want to change them. To keep the existing tags, enter their names. To remove - // tags, do not enter any tag names. - OnPremisesInstanceTagFilters []*TagFilter `locationName:"onPremisesInstanceTagFilters" type:"list"` - - // Information about an on-premises instance tag set. The deployment group includes - // only on-premises instances identified by all the tag groups. - OnPremisesTagSet *OnPremisesTagSet `locationName:"onPremisesTagSet" type:"structure"` - - // A replacement ARN for the service role, if you want to change it. - ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"` - - // Information about triggers to change when the deployment group is updated. - // For examples, see Modify Triggers in an AWS CodeDeploy Deployment Group (http://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-edit.html) - // in the AWS CodeDeploy User Guide. - TriggerConfigurations []*TriggerConfig `locationName:"triggerConfigurations" type:"list"` -} - -// String returns the string representation -func (s UpdateDeploymentGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDeploymentGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDeploymentGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDeploymentGroupInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.CurrentDeploymentGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CurrentDeploymentGroupName")) - } - if s.CurrentDeploymentGroupName != nil && len(*s.CurrentDeploymentGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CurrentDeploymentGroupName", 1)) - } - if s.DeploymentConfigName != nil && len(*s.DeploymentConfigName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeploymentConfigName", 1)) - } - if s.NewDeploymentGroupName != nil && len(*s.NewDeploymentGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewDeploymentGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlarmConfiguration sets the AlarmConfiguration field's value. -func (s *UpdateDeploymentGroupInput) SetAlarmConfiguration(v *AlarmConfiguration) *UpdateDeploymentGroupInput { - s.AlarmConfiguration = v - return s -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *UpdateDeploymentGroupInput) SetApplicationName(v string) *UpdateDeploymentGroupInput { - s.ApplicationName = &v - return s -} - -// SetAutoRollbackConfiguration sets the AutoRollbackConfiguration field's value. -func (s *UpdateDeploymentGroupInput) SetAutoRollbackConfiguration(v *AutoRollbackConfiguration) *UpdateDeploymentGroupInput { - s.AutoRollbackConfiguration = v - return s -} - -// SetAutoScalingGroups sets the AutoScalingGroups field's value. -func (s *UpdateDeploymentGroupInput) SetAutoScalingGroups(v []*string) *UpdateDeploymentGroupInput { - s.AutoScalingGroups = v - return s -} - -// SetBlueGreenDeploymentConfiguration sets the BlueGreenDeploymentConfiguration field's value. -func (s *UpdateDeploymentGroupInput) SetBlueGreenDeploymentConfiguration(v *BlueGreenDeploymentConfiguration) *UpdateDeploymentGroupInput { - s.BlueGreenDeploymentConfiguration = v - return s -} - -// SetCurrentDeploymentGroupName sets the CurrentDeploymentGroupName field's value. -func (s *UpdateDeploymentGroupInput) SetCurrentDeploymentGroupName(v string) *UpdateDeploymentGroupInput { - s.CurrentDeploymentGroupName = &v - return s -} - -// SetDeploymentConfigName sets the DeploymentConfigName field's value. -func (s *UpdateDeploymentGroupInput) SetDeploymentConfigName(v string) *UpdateDeploymentGroupInput { - s.DeploymentConfigName = &v - return s -} - -// SetDeploymentStyle sets the DeploymentStyle field's value. -func (s *UpdateDeploymentGroupInput) SetDeploymentStyle(v *DeploymentStyle) *UpdateDeploymentGroupInput { - s.DeploymentStyle = v - return s -} - -// SetEc2TagFilters sets the Ec2TagFilters field's value. -func (s *UpdateDeploymentGroupInput) SetEc2TagFilters(v []*EC2TagFilter) *UpdateDeploymentGroupInput { - s.Ec2TagFilters = v - return s -} - -// SetEc2TagSet sets the Ec2TagSet field's value. -func (s *UpdateDeploymentGroupInput) SetEc2TagSet(v *EC2TagSet) *UpdateDeploymentGroupInput { - s.Ec2TagSet = v - return s -} - -// SetEcsServices sets the EcsServices field's value. -func (s *UpdateDeploymentGroupInput) SetEcsServices(v []*ECSService) *UpdateDeploymentGroupInput { - s.EcsServices = v - return s -} - -// SetLoadBalancerInfo sets the LoadBalancerInfo field's value. -func (s *UpdateDeploymentGroupInput) SetLoadBalancerInfo(v *LoadBalancerInfo) *UpdateDeploymentGroupInput { - s.LoadBalancerInfo = v - return s -} - -// SetNewDeploymentGroupName sets the NewDeploymentGroupName field's value. -func (s *UpdateDeploymentGroupInput) SetNewDeploymentGroupName(v string) *UpdateDeploymentGroupInput { - s.NewDeploymentGroupName = &v - return s -} - -// SetOnPremisesInstanceTagFilters sets the OnPremisesInstanceTagFilters field's value. -func (s *UpdateDeploymentGroupInput) SetOnPremisesInstanceTagFilters(v []*TagFilter) *UpdateDeploymentGroupInput { - s.OnPremisesInstanceTagFilters = v - return s -} - -// SetOnPremisesTagSet sets the OnPremisesTagSet field's value. -func (s *UpdateDeploymentGroupInput) SetOnPremisesTagSet(v *OnPremisesTagSet) *UpdateDeploymentGroupInput { - s.OnPremisesTagSet = v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *UpdateDeploymentGroupInput) SetServiceRoleArn(v string) *UpdateDeploymentGroupInput { - s.ServiceRoleArn = &v - return s -} - -// SetTriggerConfigurations sets the TriggerConfigurations field's value. -func (s *UpdateDeploymentGroupInput) SetTriggerConfigurations(v []*TriggerConfig) *UpdateDeploymentGroupInput { - s.TriggerConfigurations = v - return s -} - -// Represents the output of an UpdateDeploymentGroup operation. -type UpdateDeploymentGroupOutput struct { - _ struct{} `type:"structure"` - - // If the output contains no data, and the corresponding deployment group contained - // at least one Auto Scaling group, AWS CodeDeploy successfully removed all - // corresponding Auto Scaling lifecycle event hooks from the AWS account. If - // the output contains data, AWS CodeDeploy could not remove some Auto Scaling - // lifecycle event hooks from the AWS account. - HooksNotCleanedUp []*AutoScalingGroup `locationName:"hooksNotCleanedUp" type:"list"` -} - -// String returns the string representation -func (s UpdateDeploymentGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDeploymentGroupOutput) GoString() string { - return s.String() -} - -// SetHooksNotCleanedUp sets the HooksNotCleanedUp field's value. -func (s *UpdateDeploymentGroupOutput) SetHooksNotCleanedUp(v []*AutoScalingGroup) *UpdateDeploymentGroupOutput { - s.HooksNotCleanedUp = v - return s -} - -const ( - // ApplicationRevisionSortByRegisterTime is a ApplicationRevisionSortBy enum value - ApplicationRevisionSortByRegisterTime = "registerTime" - - // ApplicationRevisionSortByFirstUsedTime is a ApplicationRevisionSortBy enum value - ApplicationRevisionSortByFirstUsedTime = "firstUsedTime" - - // ApplicationRevisionSortByLastUsedTime is a ApplicationRevisionSortBy enum value - ApplicationRevisionSortByLastUsedTime = "lastUsedTime" -) - -const ( - // AutoRollbackEventDeploymentFailure is a AutoRollbackEvent enum value - AutoRollbackEventDeploymentFailure = "DEPLOYMENT_FAILURE" - - // AutoRollbackEventDeploymentStopOnAlarm is a AutoRollbackEvent enum value - AutoRollbackEventDeploymentStopOnAlarm = "DEPLOYMENT_STOP_ON_ALARM" - - // AutoRollbackEventDeploymentStopOnRequest is a AutoRollbackEvent enum value - AutoRollbackEventDeploymentStopOnRequest = "DEPLOYMENT_STOP_ON_REQUEST" -) - -const ( - // BundleTypeTar is a BundleType enum value - BundleTypeTar = "tar" - - // BundleTypeTgz is a BundleType enum value - BundleTypeTgz = "tgz" - - // BundleTypeZip is a BundleType enum value - BundleTypeZip = "zip" - - // BundleTypeYaml is a BundleType enum value - BundleTypeYaml = "YAML" - - // BundleTypeJson is a BundleType enum value - BundleTypeJson = "JSON" -) - -const ( - // ComputePlatformServer is a ComputePlatform enum value - ComputePlatformServer = "Server" - - // ComputePlatformLambda is a ComputePlatform enum value - ComputePlatformLambda = "Lambda" - - // ComputePlatformEcs is a ComputePlatform enum value - ComputePlatformEcs = "ECS" -) - -const ( - // DeploymentCreatorUser is a DeploymentCreator enum value - DeploymentCreatorUser = "user" - - // DeploymentCreatorAutoscaling is a DeploymentCreator enum value - DeploymentCreatorAutoscaling = "autoscaling" - - // DeploymentCreatorCodeDeployRollback is a DeploymentCreator enum value - DeploymentCreatorCodeDeployRollback = "codeDeployRollback" -) - -const ( - // DeploymentOptionWithTrafficControl is a DeploymentOption enum value - DeploymentOptionWithTrafficControl = "WITH_TRAFFIC_CONTROL" - - // DeploymentOptionWithoutTrafficControl is a DeploymentOption enum value - DeploymentOptionWithoutTrafficControl = "WITHOUT_TRAFFIC_CONTROL" -) - -const ( - // DeploymentReadyActionContinueDeployment is a DeploymentReadyAction enum value - DeploymentReadyActionContinueDeployment = "CONTINUE_DEPLOYMENT" - - // DeploymentReadyActionStopDeployment is a DeploymentReadyAction enum value - DeploymentReadyActionStopDeployment = "STOP_DEPLOYMENT" -) - -const ( - // DeploymentStatusCreated is a DeploymentStatus enum value - DeploymentStatusCreated = "Created" - - // DeploymentStatusQueued is a DeploymentStatus enum value - DeploymentStatusQueued = "Queued" - - // DeploymentStatusInProgress is a DeploymentStatus enum value - DeploymentStatusInProgress = "InProgress" - - // DeploymentStatusSucceeded is a DeploymentStatus enum value - DeploymentStatusSucceeded = "Succeeded" - - // DeploymentStatusFailed is a DeploymentStatus enum value - DeploymentStatusFailed = "Failed" - - // DeploymentStatusStopped is a DeploymentStatus enum value - DeploymentStatusStopped = "Stopped" - - // DeploymentStatusReady is a DeploymentStatus enum value - DeploymentStatusReady = "Ready" -) - -const ( - // DeploymentTargetTypeInstanceTarget is a DeploymentTargetType enum value - DeploymentTargetTypeInstanceTarget = "InstanceTarget" - - // DeploymentTargetTypeLambdaTarget is a DeploymentTargetType enum value - DeploymentTargetTypeLambdaTarget = "LambdaTarget" - - // DeploymentTargetTypeEcstarget is a DeploymentTargetType enum value - DeploymentTargetTypeEcstarget = "ECSTarget" -) - -const ( - // DeploymentTypeInPlace is a DeploymentType enum value - DeploymentTypeInPlace = "IN_PLACE" - - // DeploymentTypeBlueGreen is a DeploymentType enum value - DeploymentTypeBlueGreen = "BLUE_GREEN" -) - -const ( - // DeploymentWaitTypeReadyWait is a DeploymentWaitType enum value - DeploymentWaitTypeReadyWait = "READY_WAIT" - - // DeploymentWaitTypeTerminationWait is a DeploymentWaitType enum value - DeploymentWaitTypeTerminationWait = "TERMINATION_WAIT" -) - -const ( - // EC2TagFilterTypeKeyOnly is a EC2TagFilterType enum value - EC2TagFilterTypeKeyOnly = "KEY_ONLY" - - // EC2TagFilterTypeValueOnly is a EC2TagFilterType enum value - EC2TagFilterTypeValueOnly = "VALUE_ONLY" - - // EC2TagFilterTypeKeyAndValue is a EC2TagFilterType enum value - EC2TagFilterTypeKeyAndValue = "KEY_AND_VALUE" -) - -const ( - // ErrorCodeDeploymentGroupMissing is a ErrorCode enum value - ErrorCodeDeploymentGroupMissing = "DEPLOYMENT_GROUP_MISSING" - - // ErrorCodeApplicationMissing is a ErrorCode enum value - ErrorCodeApplicationMissing = "APPLICATION_MISSING" - - // ErrorCodeRevisionMissing is a ErrorCode enum value - ErrorCodeRevisionMissing = "REVISION_MISSING" - - // ErrorCodeIamRoleMissing is a ErrorCode enum value - ErrorCodeIamRoleMissing = "IAM_ROLE_MISSING" - - // ErrorCodeIamRolePermissions is a ErrorCode enum value - ErrorCodeIamRolePermissions = "IAM_ROLE_PERMISSIONS" - - // ErrorCodeNoEc2Subscription is a ErrorCode enum value - ErrorCodeNoEc2Subscription = "NO_EC2_SUBSCRIPTION" - - // ErrorCodeOverMaxInstances is a ErrorCode enum value - ErrorCodeOverMaxInstances = "OVER_MAX_INSTANCES" - - // ErrorCodeNoInstances is a ErrorCode enum value - ErrorCodeNoInstances = "NO_INSTANCES" - - // ErrorCodeTimeout is a ErrorCode enum value - ErrorCodeTimeout = "TIMEOUT" - - // ErrorCodeHealthConstraintsInvalid is a ErrorCode enum value - ErrorCodeHealthConstraintsInvalid = "HEALTH_CONSTRAINTS_INVALID" - - // ErrorCodeHealthConstraints is a ErrorCode enum value - ErrorCodeHealthConstraints = "HEALTH_CONSTRAINTS" - - // ErrorCodeInternalError is a ErrorCode enum value - ErrorCodeInternalError = "INTERNAL_ERROR" - - // ErrorCodeThrottled is a ErrorCode enum value - ErrorCodeThrottled = "THROTTLED" - - // ErrorCodeAlarmActive is a ErrorCode enum value - ErrorCodeAlarmActive = "ALARM_ACTIVE" - - // ErrorCodeAgentIssue is a ErrorCode enum value - ErrorCodeAgentIssue = "AGENT_ISSUE" - - // ErrorCodeAutoScalingIamRolePermissions is a ErrorCode enum value - ErrorCodeAutoScalingIamRolePermissions = "AUTO_SCALING_IAM_ROLE_PERMISSIONS" - - // ErrorCodeAutoScalingConfiguration is a ErrorCode enum value - ErrorCodeAutoScalingConfiguration = "AUTO_SCALING_CONFIGURATION" - - // ErrorCodeManualStop is a ErrorCode enum value - ErrorCodeManualStop = "MANUAL_STOP" - - // ErrorCodeMissingBlueGreenDeploymentConfiguration is a ErrorCode enum value - ErrorCodeMissingBlueGreenDeploymentConfiguration = "MISSING_BLUE_GREEN_DEPLOYMENT_CONFIGURATION" - - // ErrorCodeMissingElbInformation is a ErrorCode enum value - ErrorCodeMissingElbInformation = "MISSING_ELB_INFORMATION" - - // ErrorCodeMissingGithubToken is a ErrorCode enum value - ErrorCodeMissingGithubToken = "MISSING_GITHUB_TOKEN" - - // ErrorCodeElasticLoadBalancingInvalid is a ErrorCode enum value - ErrorCodeElasticLoadBalancingInvalid = "ELASTIC_LOAD_BALANCING_INVALID" - - // ErrorCodeElbInvalidInstance is a ErrorCode enum value - ErrorCodeElbInvalidInstance = "ELB_INVALID_INSTANCE" - - // ErrorCodeInvalidLambdaConfiguration is a ErrorCode enum value - ErrorCodeInvalidLambdaConfiguration = "INVALID_LAMBDA_CONFIGURATION" - - // ErrorCodeInvalidLambdaFunction is a ErrorCode enum value - ErrorCodeInvalidLambdaFunction = "INVALID_LAMBDA_FUNCTION" - - // ErrorCodeHookExecutionFailure is a ErrorCode enum value - ErrorCodeHookExecutionFailure = "HOOK_EXECUTION_FAILURE" - - // ErrorCodeAutoscalingValidationError is a ErrorCode enum value - ErrorCodeAutoscalingValidationError = "AUTOSCALING_VALIDATION_ERROR" - - // ErrorCodeInvalidEcsService is a ErrorCode enum value - ErrorCodeInvalidEcsService = "INVALID_ECS_SERVICE" - - // ErrorCodeEcsUpdateError is a ErrorCode enum value - ErrorCodeEcsUpdateError = "ECS_UPDATE_ERROR" - - // ErrorCodeInvalidRevision is a ErrorCode enum value - ErrorCodeInvalidRevision = "INVALID_REVISION" -) - -const ( - // FileExistsBehaviorDisallow is a FileExistsBehavior enum value - FileExistsBehaviorDisallow = "DISALLOW" - - // FileExistsBehaviorOverwrite is a FileExistsBehavior enum value - FileExistsBehaviorOverwrite = "OVERWRITE" - - // FileExistsBehaviorRetain is a FileExistsBehavior enum value - FileExistsBehaviorRetain = "RETAIN" -) - -const ( - // GreenFleetProvisioningActionDiscoverExisting is a GreenFleetProvisioningAction enum value - GreenFleetProvisioningActionDiscoverExisting = "DISCOVER_EXISTING" - - // GreenFleetProvisioningActionCopyAutoScalingGroup is a GreenFleetProvisioningAction enum value - GreenFleetProvisioningActionCopyAutoScalingGroup = "COPY_AUTO_SCALING_GROUP" -) - -const ( - // InstanceActionTerminate is a InstanceAction enum value - InstanceActionTerminate = "TERMINATE" - - // InstanceActionKeepAlive is a InstanceAction enum value - InstanceActionKeepAlive = "KEEP_ALIVE" -) - -const ( - // InstanceStatusPending is a InstanceStatus enum value - InstanceStatusPending = "Pending" - - // InstanceStatusInProgress is a InstanceStatus enum value - InstanceStatusInProgress = "InProgress" - - // InstanceStatusSucceeded is a InstanceStatus enum value - InstanceStatusSucceeded = "Succeeded" - - // InstanceStatusFailed is a InstanceStatus enum value - InstanceStatusFailed = "Failed" - - // InstanceStatusSkipped is a InstanceStatus enum value - InstanceStatusSkipped = "Skipped" - - // InstanceStatusUnknown is a InstanceStatus enum value - InstanceStatusUnknown = "Unknown" - - // InstanceStatusReady is a InstanceStatus enum value - InstanceStatusReady = "Ready" -) - -const ( - // InstanceTypeBlue is a InstanceType enum value - InstanceTypeBlue = "Blue" - - // InstanceTypeGreen is a InstanceType enum value - InstanceTypeGreen = "Green" -) - -const ( - // LifecycleErrorCodeSuccess is a LifecycleErrorCode enum value - LifecycleErrorCodeSuccess = "Success" - - // LifecycleErrorCodeScriptMissing is a LifecycleErrorCode enum value - LifecycleErrorCodeScriptMissing = "ScriptMissing" - - // LifecycleErrorCodeScriptNotExecutable is a LifecycleErrorCode enum value - LifecycleErrorCodeScriptNotExecutable = "ScriptNotExecutable" - - // LifecycleErrorCodeScriptTimedOut is a LifecycleErrorCode enum value - LifecycleErrorCodeScriptTimedOut = "ScriptTimedOut" - - // LifecycleErrorCodeScriptFailed is a LifecycleErrorCode enum value - LifecycleErrorCodeScriptFailed = "ScriptFailed" - - // LifecycleErrorCodeUnknownError is a LifecycleErrorCode enum value - LifecycleErrorCodeUnknownError = "UnknownError" -) - -const ( - // LifecycleEventStatusPending is a LifecycleEventStatus enum value - LifecycleEventStatusPending = "Pending" - - // LifecycleEventStatusInProgress is a LifecycleEventStatus enum value - LifecycleEventStatusInProgress = "InProgress" - - // LifecycleEventStatusSucceeded is a LifecycleEventStatus enum value - LifecycleEventStatusSucceeded = "Succeeded" - - // LifecycleEventStatusFailed is a LifecycleEventStatus enum value - LifecycleEventStatusFailed = "Failed" - - // LifecycleEventStatusSkipped is a LifecycleEventStatus enum value - LifecycleEventStatusSkipped = "Skipped" - - // LifecycleEventStatusUnknown is a LifecycleEventStatus enum value - LifecycleEventStatusUnknown = "Unknown" -) - -const ( - // ListStateFilterActionInclude is a ListStateFilterAction enum value - ListStateFilterActionInclude = "include" - - // ListStateFilterActionExclude is a ListStateFilterAction enum value - ListStateFilterActionExclude = "exclude" - - // ListStateFilterActionIgnore is a ListStateFilterAction enum value - ListStateFilterActionIgnore = "ignore" -) - -const ( - // MinimumHealthyHostsTypeHostCount is a MinimumHealthyHostsType enum value - MinimumHealthyHostsTypeHostCount = "HOST_COUNT" - - // MinimumHealthyHostsTypeFleetPercent is a MinimumHealthyHostsType enum value - MinimumHealthyHostsTypeFleetPercent = "FLEET_PERCENT" -) - -const ( - // RegistrationStatusRegistered is a RegistrationStatus enum value - RegistrationStatusRegistered = "Registered" - - // RegistrationStatusDeregistered is a RegistrationStatus enum value - RegistrationStatusDeregistered = "Deregistered" -) - -const ( - // RevisionLocationTypeS3 is a RevisionLocationType enum value - RevisionLocationTypeS3 = "S3" - - // RevisionLocationTypeGitHub is a RevisionLocationType enum value - RevisionLocationTypeGitHub = "GitHub" - - // RevisionLocationTypeString is a RevisionLocationType enum value - RevisionLocationTypeString = "String" - - // RevisionLocationTypeAppSpecContent is a RevisionLocationType enum value - RevisionLocationTypeAppSpecContent = "AppSpecContent" -) - -const ( - // SortOrderAscending is a SortOrder enum value - SortOrderAscending = "ascending" - - // SortOrderDescending is a SortOrder enum value - SortOrderDescending = "descending" -) - -const ( - // StopStatusPending is a StopStatus enum value - StopStatusPending = "Pending" - - // StopStatusSucceeded is a StopStatus enum value - StopStatusSucceeded = "Succeeded" -) - -const ( - // TagFilterTypeKeyOnly is a TagFilterType enum value - TagFilterTypeKeyOnly = "KEY_ONLY" - - // TagFilterTypeValueOnly is a TagFilterType enum value - TagFilterTypeValueOnly = "VALUE_ONLY" - - // TagFilterTypeKeyAndValue is a TagFilterType enum value - TagFilterTypeKeyAndValue = "KEY_AND_VALUE" -) - -const ( - // TargetFilterNameTargetStatus is a TargetFilterName enum value - TargetFilterNameTargetStatus = "TargetStatus" - - // TargetFilterNameServerInstanceLabel is a TargetFilterName enum value - TargetFilterNameServerInstanceLabel = "ServerInstanceLabel" -) - -const ( - // TargetLabelBlue is a TargetLabel enum value - TargetLabelBlue = "Blue" - - // TargetLabelGreen is a TargetLabel enum value - TargetLabelGreen = "Green" -) - -const ( - // TargetStatusPending is a TargetStatus enum value - TargetStatusPending = "Pending" - - // TargetStatusInProgress is a TargetStatus enum value - TargetStatusInProgress = "InProgress" - - // TargetStatusSucceeded is a TargetStatus enum value - TargetStatusSucceeded = "Succeeded" - - // TargetStatusFailed is a TargetStatus enum value - TargetStatusFailed = "Failed" - - // TargetStatusSkipped is a TargetStatus enum value - TargetStatusSkipped = "Skipped" - - // TargetStatusUnknown is a TargetStatus enum value - TargetStatusUnknown = "Unknown" - - // TargetStatusReady is a TargetStatus enum value - TargetStatusReady = "Ready" -) - -const ( - // TrafficRoutingTypeTimeBasedCanary is a TrafficRoutingType enum value - TrafficRoutingTypeTimeBasedCanary = "TimeBasedCanary" - - // TrafficRoutingTypeTimeBasedLinear is a TrafficRoutingType enum value - TrafficRoutingTypeTimeBasedLinear = "TimeBasedLinear" - - // TrafficRoutingTypeAllAtOnce is a TrafficRoutingType enum value - TrafficRoutingTypeAllAtOnce = "AllAtOnce" -) - -const ( - // TriggerEventTypeDeploymentStart is a TriggerEventType enum value - TriggerEventTypeDeploymentStart = "DeploymentStart" - - // TriggerEventTypeDeploymentSuccess is a TriggerEventType enum value - TriggerEventTypeDeploymentSuccess = "DeploymentSuccess" - - // TriggerEventTypeDeploymentFailure is a TriggerEventType enum value - TriggerEventTypeDeploymentFailure = "DeploymentFailure" - - // TriggerEventTypeDeploymentStop is a TriggerEventType enum value - TriggerEventTypeDeploymentStop = "DeploymentStop" - - // TriggerEventTypeDeploymentRollback is a TriggerEventType enum value - TriggerEventTypeDeploymentRollback = "DeploymentRollback" - - // TriggerEventTypeDeploymentReady is a TriggerEventType enum value - TriggerEventTypeDeploymentReady = "DeploymentReady" - - // TriggerEventTypeInstanceStart is a TriggerEventType enum value - TriggerEventTypeInstanceStart = "InstanceStart" - - // TriggerEventTypeInstanceSuccess is a TriggerEventType enum value - TriggerEventTypeInstanceSuccess = "InstanceSuccess" - - // TriggerEventTypeInstanceFailure is a TriggerEventType enum value - TriggerEventTypeInstanceFailure = "InstanceFailure" - - // TriggerEventTypeInstanceReady is a TriggerEventType enum value - TriggerEventTypeInstanceReady = "InstanceReady" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go deleted file mode 100644 index 472970920..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package codedeploy provides the client and types for making API -// requests to AWS CodeDeploy. -// -// AWS CodeDeploy is a deployment service that automates application deployments -// to Amazon EC2 instances, on-premises instances running in your own facility, -// serverless AWS Lambda functions, or applications in an Amazon ECS service. -// -// You can deploy a nearly unlimited variety of application content, such as -// an updated Lambda function, updated applications in an Amazon ECS service, -// code, web and configuration files, executables, packages, scripts, multimedia -// files, and so on. AWS CodeDeploy can deploy application content stored in -// Amazon S3 buckets, GitHub repositories, or Bitbucket repositories. You do -// not need to make changes to your existing code before you can use AWS CodeDeploy. -// -// AWS CodeDeploy makes it easier for you to rapidly release new features, helps -// you avoid downtime during application deployment, and handles the complexity -// of updating your applications, without many of the risks associated with -// error-prone manual deployments. -// -// AWS CodeDeploy Components -// -// Use the information in this guide to help you work with the following AWS -// CodeDeploy components: -// -// * Application: A name that uniquely identifies the application you want -// to deploy. AWS CodeDeploy uses this name, which functions as a container, -// to ensure the correct combination of revision, deployment configuration, -// and deployment group are referenced during a deployment. -// -// * Deployment group: A set of individual instances, CodeDeploy Lambda deployment -// configuration settings, or an Amazon ECS service and network details. -// A Lambda deployment group specifies how to route traffic to a new version -// of a Lambda function. An Amazon ECS deployment group specifies the service -// created in Amazon ECS to deploy, a load balancer, and a listener to reroute -// production traffic to an updated containerized application. An EC2/On-premises -// deployment group contains individually tagged instances, Amazon EC2 instances -// in Amazon EC2 Auto Scaling groups, or both. All deployment groups can -// specify optional trigger, alarm, and rollback settings. -// -// * Deployment configuration: A set of deployment rules and deployment success -// and failure conditions used by AWS CodeDeploy during a deployment. -// -// * Deployment: The process and the components used when updating a Lambda -// function, a containerized application in an Amazon ECS service, or of -// installing content on one or more instances. -// -// * Application revisions: For an AWS Lambda deployment, this is an AppSpec -// file that specifies the Lambda function to be updated and one or more -// functions to validate deployment lifecycle events. For an Amazon ECS deployment, -// this is an AppSpec file that specifies the Amazon ECS task definition, -// container, and port where production traffic is rerouted. For an EC2/On-premises -// deployment, this is an archive file that contains source content—source -// code, webpages, executable files, and deployment scripts—along with an -// AppSpec file. Revisions are stored in Amazon S3 buckets or GitHub repositories. -// For Amazon S3, a revision is uniquely identified by its Amazon S3 object -// key and its ETag, version, or both. For GitHub, a revision is uniquely -// identified by its commit ID. -// -// This guide also contains information to help you get details about the instances -// in your deployments, to make on-premises instances available for AWS CodeDeploy -// deployments, to get details about a Lambda function deployment, and to get -// details about Amazon ECS service deployments. -// -// AWS CodeDeploy Information Resources -// -// * AWS CodeDeploy User Guide (http://docs.aws.amazon.com/codedeploy/latest/userguide) -// -// * AWS CodeDeploy API Reference Guide (http://docs.aws.amazon.com/codedeploy/latest/APIReference/) -// -// * AWS CLI Reference for AWS CodeDeploy (http://docs.aws.amazon.com/cli/latest/reference/deploy/index.html) -// -// * AWS CodeDeploy Developer Forum (https://forums.aws.amazon.com/forum.jspa?forumID=179) -// -// See https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06 for more information on this service. -// -// See codedeploy package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/codedeploy/ -// -// Using the Client -// -// To contact AWS CodeDeploy 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 CodeDeploy client CodeDeploy for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/codedeploy/#New -package codedeploy diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go deleted file mode 100644 index 50cfb414f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go +++ /dev/null @@ -1,683 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package codedeploy - -const ( - - // ErrCodeAlarmsLimitExceededException for service response error code - // "AlarmsLimitExceededException". - // - // The maximum number of alarms for a deployment group (10) was exceeded. - ErrCodeAlarmsLimitExceededException = "AlarmsLimitExceededException" - - // ErrCodeApplicationAlreadyExistsException for service response error code - // "ApplicationAlreadyExistsException". - // - // An application with the specified name with the IAM user or AWS account already - // exists. - ErrCodeApplicationAlreadyExistsException = "ApplicationAlreadyExistsException" - - // ErrCodeApplicationDoesNotExistException for service response error code - // "ApplicationDoesNotExistException". - // - // The application does not exist with the IAM user or AWS account. - ErrCodeApplicationDoesNotExistException = "ApplicationDoesNotExistException" - - // ErrCodeApplicationLimitExceededException for service response error code - // "ApplicationLimitExceededException". - // - // More applications were attempted to be created than are allowed. - ErrCodeApplicationLimitExceededException = "ApplicationLimitExceededException" - - // ErrCodeApplicationNameRequiredException for service response error code - // "ApplicationNameRequiredException". - // - // The minimum number of required application names was not specified. - ErrCodeApplicationNameRequiredException = "ApplicationNameRequiredException" - - // ErrCodeBatchLimitExceededException for service response error code - // "BatchLimitExceededException". - // - // The maximum number of names or IDs allowed for this request (100) was exceeded. - ErrCodeBatchLimitExceededException = "BatchLimitExceededException" - - // ErrCodeBucketNameFilterRequiredException for service response error code - // "BucketNameFilterRequiredException". - // - // A bucket name is required, but was not provided. - ErrCodeBucketNameFilterRequiredException = "BucketNameFilterRequiredException" - - // ErrCodeDeploymentAlreadyCompletedException for service response error code - // "DeploymentAlreadyCompletedException". - // - // The deployment is already complete. - ErrCodeDeploymentAlreadyCompletedException = "DeploymentAlreadyCompletedException" - - // ErrCodeDeploymentConfigAlreadyExistsException for service response error code - // "DeploymentConfigAlreadyExistsException". - // - // A deployment configuration with the specified name with the IAM user or AWS - // account already exists . - ErrCodeDeploymentConfigAlreadyExistsException = "DeploymentConfigAlreadyExistsException" - - // ErrCodeDeploymentConfigDoesNotExistException for service response error code - // "DeploymentConfigDoesNotExistException". - // - // The deployment configuration does not exist with the IAM user or AWS account. - ErrCodeDeploymentConfigDoesNotExistException = "DeploymentConfigDoesNotExistException" - - // ErrCodeDeploymentConfigInUseException for service response error code - // "DeploymentConfigInUseException". - // - // The deployment configuration is still in use. - ErrCodeDeploymentConfigInUseException = "DeploymentConfigInUseException" - - // ErrCodeDeploymentConfigLimitExceededException for service response error code - // "DeploymentConfigLimitExceededException". - // - // The deployment configurations limit was exceeded. - ErrCodeDeploymentConfigLimitExceededException = "DeploymentConfigLimitExceededException" - - // ErrCodeDeploymentConfigNameRequiredException for service response error code - // "DeploymentConfigNameRequiredException". - // - // The deployment configuration name was not specified. - ErrCodeDeploymentConfigNameRequiredException = "DeploymentConfigNameRequiredException" - - // ErrCodeDeploymentDoesNotExistException for service response error code - // "DeploymentDoesNotExistException". - // - // The deployment with the IAM user or AWS account does not exist. - ErrCodeDeploymentDoesNotExistException = "DeploymentDoesNotExistException" - - // ErrCodeDeploymentGroupAlreadyExistsException for service response error code - // "DeploymentGroupAlreadyExistsException". - // - // A deployment group with the specified name with the IAM user or AWS account - // already exists. - ErrCodeDeploymentGroupAlreadyExistsException = "DeploymentGroupAlreadyExistsException" - - // ErrCodeDeploymentGroupDoesNotExistException for service response error code - // "DeploymentGroupDoesNotExistException". - // - // The named deployment group with the IAM user or AWS account does not exist. - ErrCodeDeploymentGroupDoesNotExistException = "DeploymentGroupDoesNotExistException" - - // ErrCodeDeploymentGroupLimitExceededException for service response error code - // "DeploymentGroupLimitExceededException". - // - // The deployment groups limit was exceeded. - ErrCodeDeploymentGroupLimitExceededException = "DeploymentGroupLimitExceededException" - - // ErrCodeDeploymentGroupNameRequiredException for service response error code - // "DeploymentGroupNameRequiredException". - // - // The deployment group name was not specified. - ErrCodeDeploymentGroupNameRequiredException = "DeploymentGroupNameRequiredException" - - // ErrCodeDeploymentIdRequiredException for service response error code - // "DeploymentIdRequiredException". - // - // At least one deployment ID must be specified. - ErrCodeDeploymentIdRequiredException = "DeploymentIdRequiredException" - - // ErrCodeDeploymentIsNotInReadyStateException for service response error code - // "DeploymentIsNotInReadyStateException". - // - // The deployment does not have a status of Ready and can't continue yet. - ErrCodeDeploymentIsNotInReadyStateException = "DeploymentIsNotInReadyStateException" - - // ErrCodeDeploymentLimitExceededException for service response error code - // "DeploymentLimitExceededException". - // - // The number of allowed deployments was exceeded. - ErrCodeDeploymentLimitExceededException = "DeploymentLimitExceededException" - - // ErrCodeDeploymentNotStartedException for service response error code - // "DeploymentNotStartedException". - // - // The specified deployment has not started. - ErrCodeDeploymentNotStartedException = "DeploymentNotStartedException" - - // ErrCodeDeploymentTargetDoesNotExistException for service response error code - // "DeploymentTargetDoesNotExistException". - // - // The provided target ID does not belong to the attempted deployment. - ErrCodeDeploymentTargetDoesNotExistException = "DeploymentTargetDoesNotExistException" - - // ErrCodeDeploymentTargetIdRequiredException for service response error code - // "DeploymentTargetIdRequiredException". - // - // A deployment target ID was not provided. - ErrCodeDeploymentTargetIdRequiredException = "DeploymentTargetIdRequiredException" - - // ErrCodeDeploymentTargetListSizeExceededException for service response error code - // "DeploymentTargetListSizeExceededException". - // - // The maximum number of targets that can be associated with an Amazon ECS or - // AWS Lambda deployment was exceeded. The target list of both types of deployments - // must have exactly one item. This exception does not apply to EC2/On-premises - // deployments. - ErrCodeDeploymentTargetListSizeExceededException = "DeploymentTargetListSizeExceededException" - - // ErrCodeDescriptionTooLongException for service response error code - // "DescriptionTooLongException". - // - // The description is too long. - ErrCodeDescriptionTooLongException = "DescriptionTooLongException" - - // ErrCodeECSServiceMappingLimitExceededException for service response error code - // "ECSServiceMappingLimitExceededException". - // - // The Amazon ECS service is associated with more than one deployment groups. - // An Amazon ECS service can be associated with only one deployment group. - ErrCodeECSServiceMappingLimitExceededException = "ECSServiceMappingLimitExceededException" - - // ErrCodeGitHubAccountTokenDoesNotExistException for service response error code - // "GitHubAccountTokenDoesNotExistException". - // - // No GitHub account connection exists with the named specified in the call. - ErrCodeGitHubAccountTokenDoesNotExistException = "GitHubAccountTokenDoesNotExistException" - - // ErrCodeGitHubAccountTokenNameRequiredException for service response error code - // "GitHubAccountTokenNameRequiredException". - // - // The call is missing a required GitHub account connection name. - ErrCodeGitHubAccountTokenNameRequiredException = "GitHubAccountTokenNameRequiredException" - - // ErrCodeIamArnRequiredException for service response error code - // "IamArnRequiredException". - // - // No IAM ARN was included in the request. You must use an IAM session ARN or - // IAM user ARN in the request. - ErrCodeIamArnRequiredException = "IamArnRequiredException" - - // ErrCodeIamSessionArnAlreadyRegisteredException for service response error code - // "IamSessionArnAlreadyRegisteredException". - // - // The request included an IAM session ARN that has already been used to register - // a different instance. - ErrCodeIamSessionArnAlreadyRegisteredException = "IamSessionArnAlreadyRegisteredException" - - // ErrCodeIamUserArnAlreadyRegisteredException for service response error code - // "IamUserArnAlreadyRegisteredException". - // - // The specified IAM user ARN is already registered with an on-premises instance. - ErrCodeIamUserArnAlreadyRegisteredException = "IamUserArnAlreadyRegisteredException" - - // ErrCodeIamUserArnRequiredException for service response error code - // "IamUserArnRequiredException". - // - // An IAM user ARN was not specified. - ErrCodeIamUserArnRequiredException = "IamUserArnRequiredException" - - // ErrCodeInstanceDoesNotExistException for service response error code - // "InstanceDoesNotExistException". - // - // The specified instance does not exist in the deployment group. - ErrCodeInstanceDoesNotExistException = "InstanceDoesNotExistException" - - // ErrCodeInstanceIdRequiredException for service response error code - // "InstanceIdRequiredException". - // - // The instance ID was not specified. - ErrCodeInstanceIdRequiredException = "InstanceIdRequiredException" - - // ErrCodeInstanceLimitExceededException for service response error code - // "InstanceLimitExceededException". - // - // The maximum number of allowed on-premises instances in a single call was - // exceeded. - ErrCodeInstanceLimitExceededException = "InstanceLimitExceededException" - - // ErrCodeInstanceNameAlreadyRegisteredException for service response error code - // "InstanceNameAlreadyRegisteredException". - // - // The specified on-premises instance name is already registered. - ErrCodeInstanceNameAlreadyRegisteredException = "InstanceNameAlreadyRegisteredException" - - // ErrCodeInstanceNameRequiredException for service response error code - // "InstanceNameRequiredException". - // - // An on-premises instance name was not specified. - ErrCodeInstanceNameRequiredException = "InstanceNameRequiredException" - - // ErrCodeInstanceNotRegisteredException for service response error code - // "InstanceNotRegisteredException". - // - // The specified on-premises instance is not registered. - ErrCodeInstanceNotRegisteredException = "InstanceNotRegisteredException" - - // ErrCodeInvalidAlarmConfigException for service response error code - // "InvalidAlarmConfigException". - // - // The format of the alarm configuration is invalid. Possible causes include: - // - // * The alarm list is null. - // - // * The alarm object is null. - // - // * The alarm name is empty or null or exceeds the limit of 255 characters. - // - // * Two alarms with the same name have been specified. - // - // * The alarm configuration is enabled, but the alarm list is empty. - ErrCodeInvalidAlarmConfigException = "InvalidAlarmConfigException" - - // ErrCodeInvalidApplicationNameException for service response error code - // "InvalidApplicationNameException". - // - // The application name was specified in an invalid format. - ErrCodeInvalidApplicationNameException = "InvalidApplicationNameException" - - // ErrCodeInvalidAutoRollbackConfigException for service response error code - // "InvalidAutoRollbackConfigException". - // - // The automatic rollback configuration was specified in an invalid format. - // For example, automatic rollback is enabled, but an invalid triggering event - // type or no event types were listed. - ErrCodeInvalidAutoRollbackConfigException = "InvalidAutoRollbackConfigException" - - // ErrCodeInvalidAutoScalingGroupException for service response error code - // "InvalidAutoScalingGroupException". - // - // The Auto Scaling group was specified in an invalid format or does not exist. - ErrCodeInvalidAutoScalingGroupException = "InvalidAutoScalingGroupException" - - // ErrCodeInvalidBlueGreenDeploymentConfigurationException for service response error code - // "InvalidBlueGreenDeploymentConfigurationException". - // - // The configuration for the blue/green deployment group was provided in an - // invalid format. For information about deployment configuration format, see - // CreateDeploymentConfig. - ErrCodeInvalidBlueGreenDeploymentConfigurationException = "InvalidBlueGreenDeploymentConfigurationException" - - // ErrCodeInvalidBucketNameFilterException for service response error code - // "InvalidBucketNameFilterException". - // - // The bucket name either doesn't exist or was specified in an invalid format. - ErrCodeInvalidBucketNameFilterException = "InvalidBucketNameFilterException" - - // ErrCodeInvalidComputePlatformException for service response error code - // "InvalidComputePlatformException". - // - // The computePlatform is invalid. The computePlatform should be Lambda or Server. - ErrCodeInvalidComputePlatformException = "InvalidComputePlatformException" - - // ErrCodeInvalidDeployedStateFilterException for service response error code - // "InvalidDeployedStateFilterException". - // - // The deployed state filter was specified in an invalid format. - ErrCodeInvalidDeployedStateFilterException = "InvalidDeployedStateFilterException" - - // ErrCodeInvalidDeploymentConfigNameException for service response error code - // "InvalidDeploymentConfigNameException". - // - // The deployment configuration name was specified in an invalid format. - ErrCodeInvalidDeploymentConfigNameException = "InvalidDeploymentConfigNameException" - - // ErrCodeInvalidDeploymentGroupNameException for service response error code - // "InvalidDeploymentGroupNameException". - // - // The deployment group name was specified in an invalid format. - ErrCodeInvalidDeploymentGroupNameException = "InvalidDeploymentGroupNameException" - - // ErrCodeInvalidDeploymentIdException for service response error code - // "InvalidDeploymentIdException". - // - // At least one of the deployment IDs was specified in an invalid format. - ErrCodeInvalidDeploymentIdException = "InvalidDeploymentIdException" - - // ErrCodeInvalidDeploymentInstanceTypeException for service response error code - // "InvalidDeploymentInstanceTypeException". - // - // An instance type was specified for an in-place deployment. Instance types - // are supported for blue/green deployments only. - ErrCodeInvalidDeploymentInstanceTypeException = "InvalidDeploymentInstanceTypeException" - - // ErrCodeInvalidDeploymentStatusException for service response error code - // "InvalidDeploymentStatusException". - // - // The specified deployment status doesn't exist or cannot be determined. - ErrCodeInvalidDeploymentStatusException = "InvalidDeploymentStatusException" - - // ErrCodeInvalidDeploymentStyleException for service response error code - // "InvalidDeploymentStyleException". - // - // An invalid deployment style was specified. Valid deployment types include - // "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" - // and "WITHOUT_TRAFFIC_CONTROL." - ErrCodeInvalidDeploymentStyleException = "InvalidDeploymentStyleException" - - // ErrCodeInvalidDeploymentTargetIdException for service response error code - // "InvalidDeploymentTargetIdException". - // - // The target ID provided was not valid. - ErrCodeInvalidDeploymentTargetIdException = "InvalidDeploymentTargetIdException" - - // ErrCodeInvalidDeploymentWaitTypeException for service response error code - // "InvalidDeploymentWaitTypeException". - // - // The wait type is invalid. - ErrCodeInvalidDeploymentWaitTypeException = "InvalidDeploymentWaitTypeException" - - // ErrCodeInvalidEC2TagCombinationException for service response error code - // "InvalidEC2TagCombinationException". - // - // A call was submitted that specified both Ec2TagFilters and Ec2TagSet, but - // only one of these data types can be used in a single call. - ErrCodeInvalidEC2TagCombinationException = "InvalidEC2TagCombinationException" - - // ErrCodeInvalidEC2TagException for service response error code - // "InvalidEC2TagException". - // - // The tag was specified in an invalid format. - ErrCodeInvalidEC2TagException = "InvalidEC2TagException" - - // ErrCodeInvalidECSServiceException for service response error code - // "InvalidECSServiceException". - // - // The Amazon ECS service identifier is not valid. - ErrCodeInvalidECSServiceException = "InvalidECSServiceException" - - // ErrCodeInvalidFileExistsBehaviorException for service response error code - // "InvalidFileExistsBehaviorException". - // - // An invalid fileExistsBehavior option was specified to determine how AWS CodeDeploy - // handles files or directories that already exist in a deployment target location, - // but weren't part of the previous successful deployment. Valid values include - // "DISALLOW," "OVERWRITE," and "RETAIN." - ErrCodeInvalidFileExistsBehaviorException = "InvalidFileExistsBehaviorException" - - // ErrCodeInvalidGitHubAccountTokenException for service response error code - // "InvalidGitHubAccountTokenException". - // - // The GitHub token is not valid. - ErrCodeInvalidGitHubAccountTokenException = "InvalidGitHubAccountTokenException" - - // ErrCodeInvalidGitHubAccountTokenNameException for service response error code - // "InvalidGitHubAccountTokenNameException". - // - // The format of the specified GitHub account connection name is invalid. - ErrCodeInvalidGitHubAccountTokenNameException = "InvalidGitHubAccountTokenNameException" - - // ErrCodeInvalidIamSessionArnException for service response error code - // "InvalidIamSessionArnException". - // - // The IAM session ARN was specified in an invalid format. - ErrCodeInvalidIamSessionArnException = "InvalidIamSessionArnException" - - // ErrCodeInvalidIamUserArnException for service response error code - // "InvalidIamUserArnException". - // - // The IAM user ARN was specified in an invalid format. - ErrCodeInvalidIamUserArnException = "InvalidIamUserArnException" - - // ErrCodeInvalidIgnoreApplicationStopFailuresValueException for service response error code - // "InvalidIgnoreApplicationStopFailuresValueException". - // - // The IgnoreApplicationStopFailures value is invalid. For AWS Lambda deployments, - // false is expected. For EC2/On-premises deployments, true or false is expected. - ErrCodeInvalidIgnoreApplicationStopFailuresValueException = "InvalidIgnoreApplicationStopFailuresValueException" - - // ErrCodeInvalidInputException for service response error code - // "InvalidInputException". - // - // The input was specified in an invalid format. - ErrCodeInvalidInputException = "InvalidInputException" - - // ErrCodeInvalidInstanceNameException for service response error code - // "InvalidInstanceNameException". - // - // The on-premises instance name was specified in an invalid format. - ErrCodeInvalidInstanceNameException = "InvalidInstanceNameException" - - // ErrCodeInvalidInstanceStatusException for service response error code - // "InvalidInstanceStatusException". - // - // The specified instance status does not exist. - ErrCodeInvalidInstanceStatusException = "InvalidInstanceStatusException" - - // ErrCodeInvalidInstanceTypeException for service response error code - // "InvalidInstanceTypeException". - // - // An invalid instance type was specified for instances in a blue/green deployment. - // Valid values include "Blue" for an original environment and "Green" for a - // replacement environment. - ErrCodeInvalidInstanceTypeException = "InvalidInstanceTypeException" - - // ErrCodeInvalidKeyPrefixFilterException for service response error code - // "InvalidKeyPrefixFilterException". - // - // The specified key prefix filter was specified in an invalid format. - ErrCodeInvalidKeyPrefixFilterException = "InvalidKeyPrefixFilterException" - - // ErrCodeInvalidLifecycleEventHookExecutionIdException for service response error code - // "InvalidLifecycleEventHookExecutionIdException". - // - // A lifecycle event hook is invalid. Review the hooks section in your AppSpec - // file to ensure the lifecycle events and hooks functions are valid. - ErrCodeInvalidLifecycleEventHookExecutionIdException = "InvalidLifecycleEventHookExecutionIdException" - - // ErrCodeInvalidLifecycleEventHookExecutionStatusException for service response error code - // "InvalidLifecycleEventHookExecutionStatusException". - // - // The result of a Lambda validation function that verifies a lifecycle event - // is invalid. It should return Succeeded or Failed. - ErrCodeInvalidLifecycleEventHookExecutionStatusException = "InvalidLifecycleEventHookExecutionStatusException" - - // ErrCodeInvalidLoadBalancerInfoException for service response error code - // "InvalidLoadBalancerInfoException". - // - // An invalid load balancer name, or no load balancer name, was specified. - ErrCodeInvalidLoadBalancerInfoException = "InvalidLoadBalancerInfoException" - - // ErrCodeInvalidMinimumHealthyHostValueException for service response error code - // "InvalidMinimumHealthyHostValueException". - // - // The minimum healthy instance value was specified in an invalid format. - ErrCodeInvalidMinimumHealthyHostValueException = "InvalidMinimumHealthyHostValueException" - - // ErrCodeInvalidNextTokenException for service response error code - // "InvalidNextTokenException". - // - // The next token was specified in an invalid format. - ErrCodeInvalidNextTokenException = "InvalidNextTokenException" - - // ErrCodeInvalidOnPremisesTagCombinationException for service response error code - // "InvalidOnPremisesTagCombinationException". - // - // A call was submitted that specified both OnPremisesTagFilters and OnPremisesTagSet, - // but only one of these data types can be used in a single call. - ErrCodeInvalidOnPremisesTagCombinationException = "InvalidOnPremisesTagCombinationException" - - // ErrCodeInvalidOperationException for service response error code - // "InvalidOperationException". - // - // An invalid operation was detected. - ErrCodeInvalidOperationException = "InvalidOperationException" - - // ErrCodeInvalidRegistrationStatusException for service response error code - // "InvalidRegistrationStatusException". - // - // The registration status was specified in an invalid format. - ErrCodeInvalidRegistrationStatusException = "InvalidRegistrationStatusException" - - // ErrCodeInvalidRevisionException for service response error code - // "InvalidRevisionException". - // - // The revision was specified in an invalid format. - ErrCodeInvalidRevisionException = "InvalidRevisionException" - - // ErrCodeInvalidRoleException for service response error code - // "InvalidRoleException". - // - // The service role ARN was specified in an invalid format. Or, if an Auto Scaling - // group was specified, the specified service role does not grant the appropriate - // permissions to Amazon EC2 Auto Scaling. - ErrCodeInvalidRoleException = "InvalidRoleException" - - // ErrCodeInvalidSortByException for service response error code - // "InvalidSortByException". - // - // The column name to sort by is either not present or was specified in an invalid - // format. - ErrCodeInvalidSortByException = "InvalidSortByException" - - // ErrCodeInvalidSortOrderException for service response error code - // "InvalidSortOrderException". - // - // The sort order was specified in an invalid format. - ErrCodeInvalidSortOrderException = "InvalidSortOrderException" - - // ErrCodeInvalidTagException for service response error code - // "InvalidTagException". - // - // The tag was specified in an invalid format. - ErrCodeInvalidTagException = "InvalidTagException" - - // ErrCodeInvalidTagFilterException for service response error code - // "InvalidTagFilterException". - // - // The tag filter was specified in an invalid format. - ErrCodeInvalidTagFilterException = "InvalidTagFilterException" - - // ErrCodeInvalidTargetFilterNameException for service response error code - // "InvalidTargetFilterNameException". - // - // The target filter name is invalid. - ErrCodeInvalidTargetFilterNameException = "InvalidTargetFilterNameException" - - // ErrCodeInvalidTargetGroupPairException for service response error code - // "InvalidTargetGroupPairException". - // - // A target group pair associated with this deployment is not valid. - ErrCodeInvalidTargetGroupPairException = "InvalidTargetGroupPairException" - - // ErrCodeInvalidTargetInstancesException for service response error code - // "InvalidTargetInstancesException". - // - // The target instance configuration is invalid. Possible causes include: - // - // * Configuration data for target instances was entered for an in-place - // deployment. - // - // * The limit of 10 tags for a tag type was exceeded. - // - // * The combined length of the tag names exceeded the limit. - // - // * A specified tag is not currently applied to any instances. - ErrCodeInvalidTargetInstancesException = "InvalidTargetInstancesException" - - // ErrCodeInvalidTimeRangeException for service response error code - // "InvalidTimeRangeException". - // - // The specified time range was specified in an invalid format. - ErrCodeInvalidTimeRangeException = "InvalidTimeRangeException" - - // ErrCodeInvalidTrafficRoutingConfigurationException for service response error code - // "InvalidTrafficRoutingConfigurationException". - // - // The configuration that specifies how traffic is routed during a deployment - // is invalid. - ErrCodeInvalidTrafficRoutingConfigurationException = "InvalidTrafficRoutingConfigurationException" - - // ErrCodeInvalidTriggerConfigException for service response error code - // "InvalidTriggerConfigException". - // - // The trigger was specified in an invalid format. - ErrCodeInvalidTriggerConfigException = "InvalidTriggerConfigException" - - // ErrCodeInvalidUpdateOutdatedInstancesOnlyValueException for service response error code - // "InvalidUpdateOutdatedInstancesOnlyValueException". - // - // The UpdateOutdatedInstancesOnly value is invalid. For AWS Lambda deployments, - // false is expected. For EC2/On-premises deployments, true or false is expected. - ErrCodeInvalidUpdateOutdatedInstancesOnlyValueException = "InvalidUpdateOutdatedInstancesOnlyValueException" - - // ErrCodeLifecycleEventAlreadyCompletedException for service response error code - // "LifecycleEventAlreadyCompletedException". - // - // An attempt to return the status of an already completed lifecycle event occurred. - ErrCodeLifecycleEventAlreadyCompletedException = "LifecycleEventAlreadyCompletedException" - - // ErrCodeLifecycleHookLimitExceededException for service response error code - // "LifecycleHookLimitExceededException". - // - // The limit for lifecycle hooks was exceeded. - ErrCodeLifecycleHookLimitExceededException = "LifecycleHookLimitExceededException" - - // ErrCodeMultipleIamArnsProvidedException for service response error code - // "MultipleIamArnsProvidedException". - // - // Both an IAM user ARN and an IAM session ARN were included in the request. - // Use only one ARN type. - ErrCodeMultipleIamArnsProvidedException = "MultipleIamArnsProvidedException" - - // ErrCodeOperationNotSupportedException for service response error code - // "OperationNotSupportedException". - // - // The API used does not support the deployment. - ErrCodeOperationNotSupportedException = "OperationNotSupportedException" - - // ErrCodeResourceValidationException for service response error code - // "ResourceValidationException". - // - // The specified resource could not be validated. - ErrCodeResourceValidationException = "ResourceValidationException" - - // ErrCodeRevisionDoesNotExistException for service response error code - // "RevisionDoesNotExistException". - // - // The named revision does not exist with the IAM user or AWS account. - ErrCodeRevisionDoesNotExistException = "RevisionDoesNotExistException" - - // ErrCodeRevisionRequiredException for service response error code - // "RevisionRequiredException". - // - // The revision ID was not specified. - ErrCodeRevisionRequiredException = "RevisionRequiredException" - - // ErrCodeRoleRequiredException for service response error code - // "RoleRequiredException". - // - // The role ID was not specified. - ErrCodeRoleRequiredException = "RoleRequiredException" - - // ErrCodeTagLimitExceededException for service response error code - // "TagLimitExceededException". - // - // The maximum allowed number of tags was exceeded. - ErrCodeTagLimitExceededException = "TagLimitExceededException" - - // ErrCodeTagRequiredException for service response error code - // "TagRequiredException". - // - // A tag was not specified. - ErrCodeTagRequiredException = "TagRequiredException" - - // ErrCodeTagSetListLimitExceededException for service response error code - // "TagSetListLimitExceededException". - // - // The number of tag groups included in the tag set list exceeded the maximum - // allowed limit of 3. - ErrCodeTagSetListLimitExceededException = "TagSetListLimitExceededException" - - // ErrCodeThrottlingException for service response error code - // "ThrottlingException". - // - // An API function was called too frequently. - ErrCodeThrottlingException = "ThrottlingException" - - // ErrCodeTriggerTargetsLimitExceededException for service response error code - // "TriggerTargetsLimitExceededException". - // - // The maximum allowed number of triggers was exceeded. - ErrCodeTriggerTargetsLimitExceededException = "TriggerTargetsLimitExceededException" - - // ErrCodeUnsupportedActionForDeploymentTypeException for service response error code - // "UnsupportedActionForDeploymentTypeException". - // - // A call was submitted that is not supported for the specified deployment type. - ErrCodeUnsupportedActionForDeploymentTypeException = "UnsupportedActionForDeploymentTypeException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/service.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/service.go deleted file mode 100644 index dd1eaf413..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package codedeploy - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// CodeDeploy provides the API operation methods for making requests to -// AWS CodeDeploy. See this package's package overview docs -// for details on the service. -// -// CodeDeploy methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CodeDeploy 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 = "codedeploy" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "CodeDeploy" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CodeDeploy client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a CodeDeploy client from just a session. -// svc := codedeploy.New(mySession) -// -// // Create a CodeDeploy client with additional configuration -// svc := codedeploy.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CodeDeploy { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CodeDeploy { - svc := &CodeDeploy{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-10-06", - JSONVersion: "1.1", - TargetPrefix: "CodeDeploy_20141006", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CodeDeploy operation and runs any -// custom request initialization. -func (c *CodeDeploy) 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/codedeploy/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/waiters.go deleted file mode 100644 index a6827f7b0..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/waiters.go +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package codedeploy - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilDeploymentSuccessful uses the CodeDeploy API operation -// GetDeployment to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *CodeDeploy) WaitUntilDeploymentSuccessful(input *GetDeploymentInput) error { - return c.WaitUntilDeploymentSuccessfulWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilDeploymentSuccessfulWithContext is an extended version of WaitUntilDeploymentSuccessful. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodeDeploy) WaitUntilDeploymentSuccessfulWithContext(ctx aws.Context, input *GetDeploymentInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilDeploymentSuccessful", - MaxAttempts: 120, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "deploymentInfo.status", - Expected: "Succeeded", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "deploymentInfo.status", - Expected: "Failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "deploymentInfo.status", - Expected: "Stopped", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetDeploymentInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetDeploymentRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go deleted file mode 100644 index 0d1d4f22e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go +++ /dev/null @@ -1,8983 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package codepipeline - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAcknowledgeJob = "AcknowledgeJob" - -// AcknowledgeJobRequest generates a "aws/request.Request" representing the -// client's request for the AcknowledgeJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcknowledgeJob for more information on using the AcknowledgeJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcknowledgeJobRequest method. -// req, resp := client.AcknowledgeJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/AcknowledgeJob -func (c *CodePipeline) AcknowledgeJobRequest(input *AcknowledgeJobInput) (req *request.Request, output *AcknowledgeJobOutput) { - op := &request.Operation{ - Name: opAcknowledgeJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AcknowledgeJobInput{} - } - - output = &AcknowledgeJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// AcknowledgeJob API operation for AWS CodePipeline. -// -// Returns information about a specified job and whether that job has been received -// by the job worker. Only used for custom actions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation AcknowledgeJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeInvalidNonceException "InvalidNonceException" -// The specified nonce was specified in an invalid format. -// -// * ErrCodeJobNotFoundException "JobNotFoundException" -// The specified job was specified in an invalid format or cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/AcknowledgeJob -func (c *CodePipeline) AcknowledgeJob(input *AcknowledgeJobInput) (*AcknowledgeJobOutput, error) { - req, out := c.AcknowledgeJobRequest(input) - return out, req.Send() -} - -// AcknowledgeJobWithContext is the same as AcknowledgeJob with the addition of -// the ability to pass a context and additional request options. -// -// See AcknowledgeJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) AcknowledgeJobWithContext(ctx aws.Context, input *AcknowledgeJobInput, opts ...request.Option) (*AcknowledgeJobOutput, error) { - req, out := c.AcknowledgeJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAcknowledgeThirdPartyJob = "AcknowledgeThirdPartyJob" - -// AcknowledgeThirdPartyJobRequest generates a "aws/request.Request" representing the -// client's request for the AcknowledgeThirdPartyJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcknowledgeThirdPartyJob for more information on using the AcknowledgeThirdPartyJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcknowledgeThirdPartyJobRequest method. -// req, resp := client.AcknowledgeThirdPartyJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/AcknowledgeThirdPartyJob -func (c *CodePipeline) AcknowledgeThirdPartyJobRequest(input *AcknowledgeThirdPartyJobInput) (req *request.Request, output *AcknowledgeThirdPartyJobOutput) { - op := &request.Operation{ - Name: opAcknowledgeThirdPartyJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AcknowledgeThirdPartyJobInput{} - } - - output = &AcknowledgeThirdPartyJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// AcknowledgeThirdPartyJob API operation for AWS CodePipeline. -// -// Confirms a job worker has received the specified job. Only used for partner -// actions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation AcknowledgeThirdPartyJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeInvalidNonceException "InvalidNonceException" -// The specified nonce was specified in an invalid format. -// -// * ErrCodeJobNotFoundException "JobNotFoundException" -// The specified job was specified in an invalid format or cannot be found. -// -// * ErrCodeInvalidClientTokenException "InvalidClientTokenException" -// The client token was specified in an invalid format -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/AcknowledgeThirdPartyJob -func (c *CodePipeline) AcknowledgeThirdPartyJob(input *AcknowledgeThirdPartyJobInput) (*AcknowledgeThirdPartyJobOutput, error) { - req, out := c.AcknowledgeThirdPartyJobRequest(input) - return out, req.Send() -} - -// AcknowledgeThirdPartyJobWithContext is the same as AcknowledgeThirdPartyJob with the addition of -// the ability to pass a context and additional request options. -// -// See AcknowledgeThirdPartyJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) AcknowledgeThirdPartyJobWithContext(ctx aws.Context, input *AcknowledgeThirdPartyJobInput, opts ...request.Option) (*AcknowledgeThirdPartyJobOutput, error) { - req, out := c.AcknowledgeThirdPartyJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCustomActionType = "CreateCustomActionType" - -// CreateCustomActionTypeRequest generates a "aws/request.Request" representing the -// client's request for the CreateCustomActionType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCustomActionType for more information on using the CreateCustomActionType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCustomActionTypeRequest method. -// req, resp := client.CreateCustomActionTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/CreateCustomActionType -func (c *CodePipeline) CreateCustomActionTypeRequest(input *CreateCustomActionTypeInput) (req *request.Request, output *CreateCustomActionTypeOutput) { - op := &request.Operation{ - Name: opCreateCustomActionType, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCustomActionTypeInput{} - } - - output = &CreateCustomActionTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCustomActionType API operation for AWS CodePipeline. -// -// Creates a new custom action that can be used in all pipelines associated -// with the AWS account. Only used for custom actions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation CreateCustomActionType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The number of pipelines associated with the AWS account has exceeded the -// limit allowed for the account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/CreateCustomActionType -func (c *CodePipeline) CreateCustomActionType(input *CreateCustomActionTypeInput) (*CreateCustomActionTypeOutput, error) { - req, out := c.CreateCustomActionTypeRequest(input) - return out, req.Send() -} - -// CreateCustomActionTypeWithContext is the same as CreateCustomActionType with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCustomActionType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) CreateCustomActionTypeWithContext(ctx aws.Context, input *CreateCustomActionTypeInput, opts ...request.Option) (*CreateCustomActionTypeOutput, error) { - req, out := c.CreateCustomActionTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePipeline = "CreatePipeline" - -// CreatePipelineRequest generates a "aws/request.Request" representing the -// client's request for the CreatePipeline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePipeline for more information on using the CreatePipeline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePipelineRequest method. -// req, resp := client.CreatePipelineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/CreatePipeline -func (c *CodePipeline) CreatePipelineRequest(input *CreatePipelineInput) (req *request.Request, output *CreatePipelineOutput) { - op := &request.Operation{ - Name: opCreatePipeline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePipelineInput{} - } - - output = &CreatePipelineOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePipeline API operation for AWS CodePipeline. -// -// Creates a pipeline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation CreatePipeline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodePipelineNameInUseException "PipelineNameInUseException" -// The specified pipeline name is already in use. -// -// * ErrCodeInvalidStageDeclarationException "InvalidStageDeclarationException" -// The specified stage declaration was specified in an invalid format. -// -// * ErrCodeInvalidActionDeclarationException "InvalidActionDeclarationException" -// The specified action declaration was specified in an invalid format. -// -// * ErrCodeInvalidBlockerDeclarationException "InvalidBlockerDeclarationException" -// Reserved for future use. -// -// * ErrCodeInvalidStructureException "InvalidStructureException" -// The specified structure was specified in an invalid format. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The number of pipelines associated with the AWS account has exceeded the -// limit allowed for the account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/CreatePipeline -func (c *CodePipeline) CreatePipeline(input *CreatePipelineInput) (*CreatePipelineOutput, error) { - req, out := c.CreatePipelineRequest(input) - return out, req.Send() -} - -// CreatePipelineWithContext is the same as CreatePipeline with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePipeline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) CreatePipelineWithContext(ctx aws.Context, input *CreatePipelineInput, opts ...request.Option) (*CreatePipelineOutput, error) { - req, out := c.CreatePipelineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCustomActionType = "DeleteCustomActionType" - -// DeleteCustomActionTypeRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCustomActionType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCustomActionType for more information on using the DeleteCustomActionType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCustomActionTypeRequest method. -// req, resp := client.DeleteCustomActionTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeleteCustomActionType -func (c *CodePipeline) DeleteCustomActionTypeRequest(input *DeleteCustomActionTypeInput) (req *request.Request, output *DeleteCustomActionTypeOutput) { - op := &request.Operation{ - Name: opDeleteCustomActionType, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCustomActionTypeInput{} - } - - output = &DeleteCustomActionTypeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCustomActionType API operation for AWS CodePipeline. -// -// Marks a custom action as deleted. PollForJobs for the custom action will -// fail after the action is marked for deletion. Only used for custom actions. -// -// To re-create a custom action after it has been deleted you must use a string -// in the version field that has never been used before. This string can be -// an incremented version number, for example. To restore a deleted custom action, -// use a JSON file that is identical to the deleted action, including the original -// string in the version field. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation DeleteCustomActionType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeleteCustomActionType -func (c *CodePipeline) DeleteCustomActionType(input *DeleteCustomActionTypeInput) (*DeleteCustomActionTypeOutput, error) { - req, out := c.DeleteCustomActionTypeRequest(input) - return out, req.Send() -} - -// DeleteCustomActionTypeWithContext is the same as DeleteCustomActionType with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCustomActionType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) DeleteCustomActionTypeWithContext(ctx aws.Context, input *DeleteCustomActionTypeInput, opts ...request.Option) (*DeleteCustomActionTypeOutput, error) { - req, out := c.DeleteCustomActionTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePipeline = "DeletePipeline" - -// DeletePipelineRequest generates a "aws/request.Request" representing the -// client's request for the DeletePipeline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePipeline for more information on using the DeletePipeline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePipelineRequest method. -// req, resp := client.DeletePipelineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeletePipeline -func (c *CodePipeline) DeletePipelineRequest(input *DeletePipelineInput) (req *request.Request, output *DeletePipelineOutput) { - op := &request.Operation{ - Name: opDeletePipeline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePipelineInput{} - } - - output = &DeletePipelineOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePipeline API operation for AWS CodePipeline. -// -// Deletes the specified pipeline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation DeletePipeline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeletePipeline -func (c *CodePipeline) DeletePipeline(input *DeletePipelineInput) (*DeletePipelineOutput, error) { - req, out := c.DeletePipelineRequest(input) - return out, req.Send() -} - -// DeletePipelineWithContext is the same as DeletePipeline with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePipeline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) DeletePipelineWithContext(ctx aws.Context, input *DeletePipelineInput, opts ...request.Option) (*DeletePipelineOutput, error) { - req, out := c.DeletePipelineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteWebhook = "DeleteWebhook" - -// DeleteWebhookRequest generates a "aws/request.Request" representing the -// client's request for the DeleteWebhook operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteWebhook for more information on using the DeleteWebhook -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteWebhookRequest method. -// req, resp := client.DeleteWebhookRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeleteWebhook -func (c *CodePipeline) DeleteWebhookRequest(input *DeleteWebhookInput) (req *request.Request, output *DeleteWebhookOutput) { - op := &request.Operation{ - Name: opDeleteWebhook, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteWebhookInput{} - } - - output = &DeleteWebhookOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteWebhook API operation for AWS CodePipeline. -// -// Deletes a previously created webhook by name. Deleting the webhook stops -// AWS CodePipeline from starting a pipeline every time an external event occurs. -// The API will return successfully when trying to delete a webhook that is -// already deleted. If a deleted webhook is re-created by calling PutWebhook -// with the same name, it will have a different URL. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation DeleteWebhook for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeleteWebhook -func (c *CodePipeline) DeleteWebhook(input *DeleteWebhookInput) (*DeleteWebhookOutput, error) { - req, out := c.DeleteWebhookRequest(input) - return out, req.Send() -} - -// DeleteWebhookWithContext is the same as DeleteWebhook with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteWebhook for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) DeleteWebhookWithContext(ctx aws.Context, input *DeleteWebhookInput, opts ...request.Option) (*DeleteWebhookOutput, error) { - req, out := c.DeleteWebhookRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterWebhookWithThirdParty = "DeregisterWebhookWithThirdParty" - -// DeregisterWebhookWithThirdPartyRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterWebhookWithThirdParty operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterWebhookWithThirdParty for more information on using the DeregisterWebhookWithThirdParty -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterWebhookWithThirdPartyRequest method. -// req, resp := client.DeregisterWebhookWithThirdPartyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeregisterWebhookWithThirdParty -func (c *CodePipeline) DeregisterWebhookWithThirdPartyRequest(input *DeregisterWebhookWithThirdPartyInput) (req *request.Request, output *DeregisterWebhookWithThirdPartyOutput) { - op := &request.Operation{ - Name: opDeregisterWebhookWithThirdParty, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterWebhookWithThirdPartyInput{} - } - - output = &DeregisterWebhookWithThirdPartyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterWebhookWithThirdParty API operation for AWS CodePipeline. -// -// Removes the connection between the webhook that was created by CodePipeline -// and the external tool with events to be detected. Currently only supported -// for webhooks that target an action type of GitHub. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation DeregisterWebhookWithThirdParty for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeWebhookNotFoundException "WebhookNotFoundException" -// The specified webhook was entered in an invalid format or cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeregisterWebhookWithThirdParty -func (c *CodePipeline) DeregisterWebhookWithThirdParty(input *DeregisterWebhookWithThirdPartyInput) (*DeregisterWebhookWithThirdPartyOutput, error) { - req, out := c.DeregisterWebhookWithThirdPartyRequest(input) - return out, req.Send() -} - -// DeregisterWebhookWithThirdPartyWithContext is the same as DeregisterWebhookWithThirdParty with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterWebhookWithThirdParty for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) DeregisterWebhookWithThirdPartyWithContext(ctx aws.Context, input *DeregisterWebhookWithThirdPartyInput, opts ...request.Option) (*DeregisterWebhookWithThirdPartyOutput, error) { - req, out := c.DeregisterWebhookWithThirdPartyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableStageTransition = "DisableStageTransition" - -// DisableStageTransitionRequest generates a "aws/request.Request" representing the -// client's request for the DisableStageTransition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableStageTransition for more information on using the DisableStageTransition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableStageTransitionRequest method. -// req, resp := client.DisableStageTransitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DisableStageTransition -func (c *CodePipeline) DisableStageTransitionRequest(input *DisableStageTransitionInput) (req *request.Request, output *DisableStageTransitionOutput) { - op := &request.Operation{ - Name: opDisableStageTransition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableStageTransitionInput{} - } - - output = &DisableStageTransitionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisableStageTransition API operation for AWS CodePipeline. -// -// Prevents artifacts in a pipeline from transitioning to the next stage in -// the pipeline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation DisableStageTransition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was specified in an invalid format or cannot be found. -// -// * ErrCodeStageNotFoundException "StageNotFoundException" -// The specified stage was specified in an invalid format or cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DisableStageTransition -func (c *CodePipeline) DisableStageTransition(input *DisableStageTransitionInput) (*DisableStageTransitionOutput, error) { - req, out := c.DisableStageTransitionRequest(input) - return out, req.Send() -} - -// DisableStageTransitionWithContext is the same as DisableStageTransition with the addition of -// the ability to pass a context and additional request options. -// -// See DisableStageTransition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) DisableStageTransitionWithContext(ctx aws.Context, input *DisableStageTransitionInput, opts ...request.Option) (*DisableStageTransitionOutput, error) { - req, out := c.DisableStageTransitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableStageTransition = "EnableStageTransition" - -// EnableStageTransitionRequest generates a "aws/request.Request" representing the -// client's request for the EnableStageTransition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableStageTransition for more information on using the EnableStageTransition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableStageTransitionRequest method. -// req, resp := client.EnableStageTransitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/EnableStageTransition -func (c *CodePipeline) EnableStageTransitionRequest(input *EnableStageTransitionInput) (req *request.Request, output *EnableStageTransitionOutput) { - op := &request.Operation{ - Name: opEnableStageTransition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableStageTransitionInput{} - } - - output = &EnableStageTransitionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableStageTransition API operation for AWS CodePipeline. -// -// Enables artifacts in a pipeline to transition to a stage in a pipeline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation EnableStageTransition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was specified in an invalid format or cannot be found. -// -// * ErrCodeStageNotFoundException "StageNotFoundException" -// The specified stage was specified in an invalid format or cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/EnableStageTransition -func (c *CodePipeline) EnableStageTransition(input *EnableStageTransitionInput) (*EnableStageTransitionOutput, error) { - req, out := c.EnableStageTransitionRequest(input) - return out, req.Send() -} - -// EnableStageTransitionWithContext is the same as EnableStageTransition with the addition of -// the ability to pass a context and additional request options. -// -// See EnableStageTransition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) EnableStageTransitionWithContext(ctx aws.Context, input *EnableStageTransitionInput, opts ...request.Option) (*EnableStageTransitionOutput, error) { - req, out := c.EnableStageTransitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetJobDetails = "GetJobDetails" - -// GetJobDetailsRequest generates a "aws/request.Request" representing the -// client's request for the GetJobDetails operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetJobDetails for more information on using the GetJobDetails -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetJobDetailsRequest method. -// req, resp := client.GetJobDetailsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetJobDetails -func (c *CodePipeline) GetJobDetailsRequest(input *GetJobDetailsInput) (req *request.Request, output *GetJobDetailsOutput) { - op := &request.Operation{ - Name: opGetJobDetails, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetJobDetailsInput{} - } - - output = &GetJobDetailsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetJobDetails API operation for AWS CodePipeline. -// -// Returns information about a job. Only used for custom actions. -// -// When this API is called, AWS CodePipeline returns temporary credentials for -// the Amazon S3 bucket used to store artifacts for the pipeline, if the action -// requires access to that Amazon S3 bucket for input or output artifacts. Additionally, -// this API returns any secret values defined for the action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation GetJobDetails for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeJobNotFoundException "JobNotFoundException" -// The specified job was specified in an invalid format or cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetJobDetails -func (c *CodePipeline) GetJobDetails(input *GetJobDetailsInput) (*GetJobDetailsOutput, error) { - req, out := c.GetJobDetailsRequest(input) - return out, req.Send() -} - -// GetJobDetailsWithContext is the same as GetJobDetails with the addition of -// the ability to pass a context and additional request options. -// -// See GetJobDetails for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) GetJobDetailsWithContext(ctx aws.Context, input *GetJobDetailsInput, opts ...request.Option) (*GetJobDetailsOutput, error) { - req, out := c.GetJobDetailsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPipeline = "GetPipeline" - -// GetPipelineRequest generates a "aws/request.Request" representing the -// client's request for the GetPipeline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPipeline for more information on using the GetPipeline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPipelineRequest method. -// req, resp := client.GetPipelineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipeline -func (c *CodePipeline) GetPipelineRequest(input *GetPipelineInput) (req *request.Request, output *GetPipelineOutput) { - op := &request.Operation{ - Name: opGetPipeline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPipelineInput{} - } - - output = &GetPipelineOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPipeline API operation for AWS CodePipeline. -// -// Returns the metadata, structure, stages, and actions of a pipeline. Can be -// used to return the entire structure of a pipeline in JSON format, which can -// then be modified and used to update the pipeline structure with UpdatePipeline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation GetPipeline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was specified in an invalid format or cannot be found. -// -// * ErrCodePipelineVersionNotFoundException "PipelineVersionNotFoundException" -// The specified pipeline version was specified in an invalid format or cannot -// be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipeline -func (c *CodePipeline) GetPipeline(input *GetPipelineInput) (*GetPipelineOutput, error) { - req, out := c.GetPipelineRequest(input) - return out, req.Send() -} - -// GetPipelineWithContext is the same as GetPipeline with the addition of -// the ability to pass a context and additional request options. -// -// See GetPipeline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) GetPipelineWithContext(ctx aws.Context, input *GetPipelineInput, opts ...request.Option) (*GetPipelineOutput, error) { - req, out := c.GetPipelineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPipelineExecution = "GetPipelineExecution" - -// GetPipelineExecutionRequest generates a "aws/request.Request" representing the -// client's request for the GetPipelineExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPipelineExecution for more information on using the GetPipelineExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPipelineExecutionRequest method. -// req, resp := client.GetPipelineExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineExecution -func (c *CodePipeline) GetPipelineExecutionRequest(input *GetPipelineExecutionInput) (req *request.Request, output *GetPipelineExecutionOutput) { - op := &request.Operation{ - Name: opGetPipelineExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPipelineExecutionInput{} - } - - output = &GetPipelineExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPipelineExecution API operation for AWS CodePipeline. -// -// Returns information about an execution of a pipeline, including details about -// artifacts, the pipeline execution ID, and the name, version, and status of -// the pipeline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation GetPipelineExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was specified in an invalid format or cannot be found. -// -// * ErrCodePipelineExecutionNotFoundException "PipelineExecutionNotFoundException" -// The pipeline execution was specified in an invalid format or cannot be found, -// or an execution ID does not belong to the specified pipeline. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineExecution -func (c *CodePipeline) GetPipelineExecution(input *GetPipelineExecutionInput) (*GetPipelineExecutionOutput, error) { - req, out := c.GetPipelineExecutionRequest(input) - return out, req.Send() -} - -// GetPipelineExecutionWithContext is the same as GetPipelineExecution with the addition of -// the ability to pass a context and additional request options. -// -// See GetPipelineExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) GetPipelineExecutionWithContext(ctx aws.Context, input *GetPipelineExecutionInput, opts ...request.Option) (*GetPipelineExecutionOutput, error) { - req, out := c.GetPipelineExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPipelineState = "GetPipelineState" - -// GetPipelineStateRequest generates a "aws/request.Request" representing the -// client's request for the GetPipelineState operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPipelineState for more information on using the GetPipelineState -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPipelineStateRequest method. -// req, resp := client.GetPipelineStateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineState -func (c *CodePipeline) GetPipelineStateRequest(input *GetPipelineStateInput) (req *request.Request, output *GetPipelineStateOutput) { - op := &request.Operation{ - Name: opGetPipelineState, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPipelineStateInput{} - } - - output = &GetPipelineStateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPipelineState API operation for AWS CodePipeline. -// -// Returns information about the state of a pipeline, including the stages and -// actions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation GetPipelineState for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was specified in an invalid format or cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineState -func (c *CodePipeline) GetPipelineState(input *GetPipelineStateInput) (*GetPipelineStateOutput, error) { - req, out := c.GetPipelineStateRequest(input) - return out, req.Send() -} - -// GetPipelineStateWithContext is the same as GetPipelineState with the addition of -// the ability to pass a context and additional request options. -// -// See GetPipelineState for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) GetPipelineStateWithContext(ctx aws.Context, input *GetPipelineStateInput, opts ...request.Option) (*GetPipelineStateOutput, error) { - req, out := c.GetPipelineStateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetThirdPartyJobDetails = "GetThirdPartyJobDetails" - -// GetThirdPartyJobDetailsRequest generates a "aws/request.Request" representing the -// client's request for the GetThirdPartyJobDetails operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetThirdPartyJobDetails for more information on using the GetThirdPartyJobDetails -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetThirdPartyJobDetailsRequest method. -// req, resp := client.GetThirdPartyJobDetailsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetThirdPartyJobDetails -func (c *CodePipeline) GetThirdPartyJobDetailsRequest(input *GetThirdPartyJobDetailsInput) (req *request.Request, output *GetThirdPartyJobDetailsOutput) { - op := &request.Operation{ - Name: opGetThirdPartyJobDetails, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetThirdPartyJobDetailsInput{} - } - - output = &GetThirdPartyJobDetailsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetThirdPartyJobDetails API operation for AWS CodePipeline. -// -// Requests the details of a job for a third party action. Only used for partner -// actions. -// -// When this API is called, AWS CodePipeline returns temporary credentials for -// the Amazon S3 bucket used to store artifacts for the pipeline, if the action -// requires access to that Amazon S3 bucket for input or output artifacts. Additionally, -// this API returns any secret values defined for the action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation GetThirdPartyJobDetails for usage and error information. -// -// Returned Error Codes: -// * ErrCodeJobNotFoundException "JobNotFoundException" -// The specified job was specified in an invalid format or cannot be found. -// -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeInvalidClientTokenException "InvalidClientTokenException" -// The client token was specified in an invalid format -// -// * ErrCodeInvalidJobException "InvalidJobException" -// The specified job was specified in an invalid format or cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetThirdPartyJobDetails -func (c *CodePipeline) GetThirdPartyJobDetails(input *GetThirdPartyJobDetailsInput) (*GetThirdPartyJobDetailsOutput, error) { - req, out := c.GetThirdPartyJobDetailsRequest(input) - return out, req.Send() -} - -// GetThirdPartyJobDetailsWithContext is the same as GetThirdPartyJobDetails with the addition of -// the ability to pass a context and additional request options. -// -// See GetThirdPartyJobDetails for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) GetThirdPartyJobDetailsWithContext(ctx aws.Context, input *GetThirdPartyJobDetailsInput, opts ...request.Option) (*GetThirdPartyJobDetailsOutput, error) { - req, out := c.GetThirdPartyJobDetailsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListActionTypes = "ListActionTypes" - -// ListActionTypesRequest generates a "aws/request.Request" representing the -// client's request for the ListActionTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListActionTypes for more information on using the ListActionTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListActionTypesRequest method. -// req, resp := client.ListActionTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListActionTypes -func (c *CodePipeline) ListActionTypesRequest(input *ListActionTypesInput) (req *request.Request, output *ListActionTypesOutput) { - op := &request.Operation{ - Name: opListActionTypes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListActionTypesInput{} - } - - output = &ListActionTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListActionTypes API operation for AWS CodePipeline. -// -// Gets a summary of all AWS CodePipeline action types associated with your -// account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation ListActionTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token was specified in an invalid format. Make sure that the next -// token you provided is the token returned by a previous call. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListActionTypes -func (c *CodePipeline) ListActionTypes(input *ListActionTypesInput) (*ListActionTypesOutput, error) { - req, out := c.ListActionTypesRequest(input) - return out, req.Send() -} - -// ListActionTypesWithContext is the same as ListActionTypes with the addition of -// the ability to pass a context and additional request options. -// -// See ListActionTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) ListActionTypesWithContext(ctx aws.Context, input *ListActionTypesInput, opts ...request.Option) (*ListActionTypesOutput, error) { - req, out := c.ListActionTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPipelineExecutions = "ListPipelineExecutions" - -// ListPipelineExecutionsRequest generates a "aws/request.Request" representing the -// client's request for the ListPipelineExecutions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPipelineExecutions for more information on using the ListPipelineExecutions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPipelineExecutionsRequest method. -// req, resp := client.ListPipelineExecutionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListPipelineExecutions -func (c *CodePipeline) ListPipelineExecutionsRequest(input *ListPipelineExecutionsInput) (req *request.Request, output *ListPipelineExecutionsOutput) { - op := &request.Operation{ - Name: opListPipelineExecutions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListPipelineExecutionsInput{} - } - - output = &ListPipelineExecutionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPipelineExecutions API operation for AWS CodePipeline. -// -// Gets a summary of the most recent executions for a pipeline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation ListPipelineExecutions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was specified in an invalid format or cannot be found. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token was specified in an invalid format. Make sure that the next -// token you provided is the token returned by a previous call. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListPipelineExecutions -func (c *CodePipeline) ListPipelineExecutions(input *ListPipelineExecutionsInput) (*ListPipelineExecutionsOutput, error) { - req, out := c.ListPipelineExecutionsRequest(input) - return out, req.Send() -} - -// ListPipelineExecutionsWithContext is the same as ListPipelineExecutions with the addition of -// the ability to pass a context and additional request options. -// -// See ListPipelineExecutions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) ListPipelineExecutionsWithContext(ctx aws.Context, input *ListPipelineExecutionsInput, opts ...request.Option) (*ListPipelineExecutionsOutput, error) { - req, out := c.ListPipelineExecutionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPipelines = "ListPipelines" - -// ListPipelinesRequest generates a "aws/request.Request" representing the -// client's request for the ListPipelines operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPipelines for more information on using the ListPipelines -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPipelinesRequest method. -// req, resp := client.ListPipelinesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListPipelines -func (c *CodePipeline) ListPipelinesRequest(input *ListPipelinesInput) (req *request.Request, output *ListPipelinesOutput) { - op := &request.Operation{ - Name: opListPipelines, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListPipelinesInput{} - } - - output = &ListPipelinesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPipelines API operation for AWS CodePipeline. -// -// Gets a summary of all of the pipelines associated with your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation ListPipelines for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token was specified in an invalid format. Make sure that the next -// token you provided is the token returned by a previous call. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListPipelines -func (c *CodePipeline) ListPipelines(input *ListPipelinesInput) (*ListPipelinesOutput, error) { - req, out := c.ListPipelinesRequest(input) - return out, req.Send() -} - -// ListPipelinesWithContext is the same as ListPipelines with the addition of -// the ability to pass a context and additional request options. -// -// See ListPipelines for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) ListPipelinesWithContext(ctx aws.Context, input *ListPipelinesInput, opts ...request.Option) (*ListPipelinesOutput, error) { - req, out := c.ListPipelinesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListWebhooks = "ListWebhooks" - -// ListWebhooksRequest generates a "aws/request.Request" representing the -// client's request for the ListWebhooks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListWebhooks for more information on using the ListWebhooks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListWebhooksRequest method. -// req, resp := client.ListWebhooksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListWebhooks -func (c *CodePipeline) ListWebhooksRequest(input *ListWebhooksInput) (req *request.Request, output *ListWebhooksOutput) { - op := &request.Operation{ - Name: opListWebhooks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListWebhooksInput{} - } - - output = &ListWebhooksOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListWebhooks API operation for AWS CodePipeline. -// -// Gets a listing of all the webhooks in this region for this account. The output -// lists all webhooks and includes the webhook URL and ARN, as well the configuration -// for each webhook. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation ListWebhooks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token was specified in an invalid format. Make sure that the next -// token you provided is the token returned by a previous call. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListWebhooks -func (c *CodePipeline) ListWebhooks(input *ListWebhooksInput) (*ListWebhooksOutput, error) { - req, out := c.ListWebhooksRequest(input) - return out, req.Send() -} - -// ListWebhooksWithContext is the same as ListWebhooks with the addition of -// the ability to pass a context and additional request options. -// -// See ListWebhooks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) ListWebhooksWithContext(ctx aws.Context, input *ListWebhooksInput, opts ...request.Option) (*ListWebhooksOutput, error) { - req, out := c.ListWebhooksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPollForJobs = "PollForJobs" - -// PollForJobsRequest generates a "aws/request.Request" representing the -// client's request for the PollForJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PollForJobs for more information on using the PollForJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PollForJobsRequest method. -// req, resp := client.PollForJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PollForJobs -func (c *CodePipeline) PollForJobsRequest(input *PollForJobsInput) (req *request.Request, output *PollForJobsOutput) { - op := &request.Operation{ - Name: opPollForJobs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PollForJobsInput{} - } - - output = &PollForJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// PollForJobs API operation for AWS CodePipeline. -// -// Returns information about any jobs for AWS CodePipeline to act upon. PollForJobs -// is only valid for action types with "Custom" in the owner field. If the action -// type contains "AWS" or "ThirdParty" in the owner field, the PollForJobs action -// returns an error. -// -// When this API is called, AWS CodePipeline returns temporary credentials for -// the Amazon S3 bucket used to store artifacts for the pipeline, if the action -// requires access to that Amazon S3 bucket for input or output artifacts. Additionally, -// this API returns any secret values defined for the action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation PollForJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeActionTypeNotFoundException "ActionTypeNotFoundException" -// The specified action type cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PollForJobs -func (c *CodePipeline) PollForJobs(input *PollForJobsInput) (*PollForJobsOutput, error) { - req, out := c.PollForJobsRequest(input) - return out, req.Send() -} - -// PollForJobsWithContext is the same as PollForJobs with the addition of -// the ability to pass a context and additional request options. -// -// See PollForJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) PollForJobsWithContext(ctx aws.Context, input *PollForJobsInput, opts ...request.Option) (*PollForJobsOutput, error) { - req, out := c.PollForJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPollForThirdPartyJobs = "PollForThirdPartyJobs" - -// PollForThirdPartyJobsRequest generates a "aws/request.Request" representing the -// client's request for the PollForThirdPartyJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PollForThirdPartyJobs for more information on using the PollForThirdPartyJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PollForThirdPartyJobsRequest method. -// req, resp := client.PollForThirdPartyJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PollForThirdPartyJobs -func (c *CodePipeline) PollForThirdPartyJobsRequest(input *PollForThirdPartyJobsInput) (req *request.Request, output *PollForThirdPartyJobsOutput) { - op := &request.Operation{ - Name: opPollForThirdPartyJobs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PollForThirdPartyJobsInput{} - } - - output = &PollForThirdPartyJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// PollForThirdPartyJobs API operation for AWS CodePipeline. -// -// Determines whether there are any third party jobs for a job worker to act -// on. Only used for partner actions. -// -// When this API is called, AWS CodePipeline returns temporary credentials for -// the Amazon S3 bucket used to store artifacts for the pipeline, if the action -// requires access to that Amazon S3 bucket for input or output artifacts. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation PollForThirdPartyJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeActionTypeNotFoundException "ActionTypeNotFoundException" -// The specified action type cannot be found. -// -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PollForThirdPartyJobs -func (c *CodePipeline) PollForThirdPartyJobs(input *PollForThirdPartyJobsInput) (*PollForThirdPartyJobsOutput, error) { - req, out := c.PollForThirdPartyJobsRequest(input) - return out, req.Send() -} - -// PollForThirdPartyJobsWithContext is the same as PollForThirdPartyJobs with the addition of -// the ability to pass a context and additional request options. -// -// See PollForThirdPartyJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) PollForThirdPartyJobsWithContext(ctx aws.Context, input *PollForThirdPartyJobsInput, opts ...request.Option) (*PollForThirdPartyJobsOutput, error) { - req, out := c.PollForThirdPartyJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutActionRevision = "PutActionRevision" - -// PutActionRevisionRequest generates a "aws/request.Request" representing the -// client's request for the PutActionRevision operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutActionRevision for more information on using the PutActionRevision -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutActionRevisionRequest method. -// req, resp := client.PutActionRevisionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutActionRevision -func (c *CodePipeline) PutActionRevisionRequest(input *PutActionRevisionInput) (req *request.Request, output *PutActionRevisionOutput) { - op := &request.Operation{ - Name: opPutActionRevision, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutActionRevisionInput{} - } - - output = &PutActionRevisionOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutActionRevision API operation for AWS CodePipeline. -// -// Provides information to AWS CodePipeline about new revisions to a source. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation PutActionRevision for usage and error information. -// -// Returned Error Codes: -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was specified in an invalid format or cannot be found. -// -// * ErrCodeStageNotFoundException "StageNotFoundException" -// The specified stage was specified in an invalid format or cannot be found. -// -// * ErrCodeActionNotFoundException "ActionNotFoundException" -// The specified action cannot be found. -// -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutActionRevision -func (c *CodePipeline) PutActionRevision(input *PutActionRevisionInput) (*PutActionRevisionOutput, error) { - req, out := c.PutActionRevisionRequest(input) - return out, req.Send() -} - -// PutActionRevisionWithContext is the same as PutActionRevision with the addition of -// the ability to pass a context and additional request options. -// -// See PutActionRevision for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) PutActionRevisionWithContext(ctx aws.Context, input *PutActionRevisionInput, opts ...request.Option) (*PutActionRevisionOutput, error) { - req, out := c.PutActionRevisionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutApprovalResult = "PutApprovalResult" - -// PutApprovalResultRequest generates a "aws/request.Request" representing the -// client's request for the PutApprovalResult operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutApprovalResult for more information on using the PutApprovalResult -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutApprovalResultRequest method. -// req, resp := client.PutApprovalResultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutApprovalResult -func (c *CodePipeline) PutApprovalResultRequest(input *PutApprovalResultInput) (req *request.Request, output *PutApprovalResultOutput) { - op := &request.Operation{ - Name: opPutApprovalResult, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutApprovalResultInput{} - } - - output = &PutApprovalResultOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutApprovalResult API operation for AWS CodePipeline. -// -// Provides the response to a manual approval request to AWS CodePipeline. Valid -// responses include Approved and Rejected. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation PutApprovalResult for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidApprovalTokenException "InvalidApprovalTokenException" -// The approval request already received a response or has expired. -// -// * ErrCodeApprovalAlreadyCompletedException "ApprovalAlreadyCompletedException" -// The approval action has already been approved or rejected. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was specified in an invalid format or cannot be found. -// -// * ErrCodeStageNotFoundException "StageNotFoundException" -// The specified stage was specified in an invalid format or cannot be found. -// -// * ErrCodeActionNotFoundException "ActionNotFoundException" -// The specified action cannot be found. -// -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutApprovalResult -func (c *CodePipeline) PutApprovalResult(input *PutApprovalResultInput) (*PutApprovalResultOutput, error) { - req, out := c.PutApprovalResultRequest(input) - return out, req.Send() -} - -// PutApprovalResultWithContext is the same as PutApprovalResult with the addition of -// the ability to pass a context and additional request options. -// -// See PutApprovalResult for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) PutApprovalResultWithContext(ctx aws.Context, input *PutApprovalResultInput, opts ...request.Option) (*PutApprovalResultOutput, error) { - req, out := c.PutApprovalResultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutJobFailureResult = "PutJobFailureResult" - -// PutJobFailureResultRequest generates a "aws/request.Request" representing the -// client's request for the PutJobFailureResult operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutJobFailureResult for more information on using the PutJobFailureResult -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutJobFailureResultRequest method. -// req, resp := client.PutJobFailureResultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutJobFailureResult -func (c *CodePipeline) PutJobFailureResultRequest(input *PutJobFailureResultInput) (req *request.Request, output *PutJobFailureResultOutput) { - op := &request.Operation{ - Name: opPutJobFailureResult, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutJobFailureResultInput{} - } - - output = &PutJobFailureResultOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutJobFailureResult API operation for AWS CodePipeline. -// -// Represents the failure of a job as returned to the pipeline by a job worker. -// Only used for custom actions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation PutJobFailureResult for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeJobNotFoundException "JobNotFoundException" -// The specified job was specified in an invalid format or cannot be found. -// -// * ErrCodeInvalidJobStateException "InvalidJobStateException" -// The specified job state was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutJobFailureResult -func (c *CodePipeline) PutJobFailureResult(input *PutJobFailureResultInput) (*PutJobFailureResultOutput, error) { - req, out := c.PutJobFailureResultRequest(input) - return out, req.Send() -} - -// PutJobFailureResultWithContext is the same as PutJobFailureResult with the addition of -// the ability to pass a context and additional request options. -// -// See PutJobFailureResult for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) PutJobFailureResultWithContext(ctx aws.Context, input *PutJobFailureResultInput, opts ...request.Option) (*PutJobFailureResultOutput, error) { - req, out := c.PutJobFailureResultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutJobSuccessResult = "PutJobSuccessResult" - -// PutJobSuccessResultRequest generates a "aws/request.Request" representing the -// client's request for the PutJobSuccessResult operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutJobSuccessResult for more information on using the PutJobSuccessResult -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutJobSuccessResultRequest method. -// req, resp := client.PutJobSuccessResultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutJobSuccessResult -func (c *CodePipeline) PutJobSuccessResultRequest(input *PutJobSuccessResultInput) (req *request.Request, output *PutJobSuccessResultOutput) { - op := &request.Operation{ - Name: opPutJobSuccessResult, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutJobSuccessResultInput{} - } - - output = &PutJobSuccessResultOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutJobSuccessResult API operation for AWS CodePipeline. -// -// Represents the success of a job as returned to the pipeline by a job worker. -// Only used for custom actions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation PutJobSuccessResult for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeJobNotFoundException "JobNotFoundException" -// The specified job was specified in an invalid format or cannot be found. -// -// * ErrCodeInvalidJobStateException "InvalidJobStateException" -// The specified job state was specified in an invalid format. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutJobSuccessResult -func (c *CodePipeline) PutJobSuccessResult(input *PutJobSuccessResultInput) (*PutJobSuccessResultOutput, error) { - req, out := c.PutJobSuccessResultRequest(input) - return out, req.Send() -} - -// PutJobSuccessResultWithContext is the same as PutJobSuccessResult with the addition of -// the ability to pass a context and additional request options. -// -// See PutJobSuccessResult for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) PutJobSuccessResultWithContext(ctx aws.Context, input *PutJobSuccessResultInput, opts ...request.Option) (*PutJobSuccessResultOutput, error) { - req, out := c.PutJobSuccessResultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutThirdPartyJobFailureResult = "PutThirdPartyJobFailureResult" - -// PutThirdPartyJobFailureResultRequest generates a "aws/request.Request" representing the -// client's request for the PutThirdPartyJobFailureResult operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutThirdPartyJobFailureResult for more information on using the PutThirdPartyJobFailureResult -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutThirdPartyJobFailureResultRequest method. -// req, resp := client.PutThirdPartyJobFailureResultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutThirdPartyJobFailureResult -func (c *CodePipeline) PutThirdPartyJobFailureResultRequest(input *PutThirdPartyJobFailureResultInput) (req *request.Request, output *PutThirdPartyJobFailureResultOutput) { - op := &request.Operation{ - Name: opPutThirdPartyJobFailureResult, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutThirdPartyJobFailureResultInput{} - } - - output = &PutThirdPartyJobFailureResultOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutThirdPartyJobFailureResult API operation for AWS CodePipeline. -// -// Represents the failure of a third party job as returned to the pipeline by -// a job worker. Only used for partner actions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation PutThirdPartyJobFailureResult for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeJobNotFoundException "JobNotFoundException" -// The specified job was specified in an invalid format or cannot be found. -// -// * ErrCodeInvalidJobStateException "InvalidJobStateException" -// The specified job state was specified in an invalid format. -// -// * ErrCodeInvalidClientTokenException "InvalidClientTokenException" -// The client token was specified in an invalid format -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutThirdPartyJobFailureResult -func (c *CodePipeline) PutThirdPartyJobFailureResult(input *PutThirdPartyJobFailureResultInput) (*PutThirdPartyJobFailureResultOutput, error) { - req, out := c.PutThirdPartyJobFailureResultRequest(input) - return out, req.Send() -} - -// PutThirdPartyJobFailureResultWithContext is the same as PutThirdPartyJobFailureResult with the addition of -// the ability to pass a context and additional request options. -// -// See PutThirdPartyJobFailureResult for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) PutThirdPartyJobFailureResultWithContext(ctx aws.Context, input *PutThirdPartyJobFailureResultInput, opts ...request.Option) (*PutThirdPartyJobFailureResultOutput, error) { - req, out := c.PutThirdPartyJobFailureResultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutThirdPartyJobSuccessResult = "PutThirdPartyJobSuccessResult" - -// PutThirdPartyJobSuccessResultRequest generates a "aws/request.Request" representing the -// client's request for the PutThirdPartyJobSuccessResult operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutThirdPartyJobSuccessResult for more information on using the PutThirdPartyJobSuccessResult -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutThirdPartyJobSuccessResultRequest method. -// req, resp := client.PutThirdPartyJobSuccessResultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutThirdPartyJobSuccessResult -func (c *CodePipeline) PutThirdPartyJobSuccessResultRequest(input *PutThirdPartyJobSuccessResultInput) (req *request.Request, output *PutThirdPartyJobSuccessResultOutput) { - op := &request.Operation{ - Name: opPutThirdPartyJobSuccessResult, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutThirdPartyJobSuccessResultInput{} - } - - output = &PutThirdPartyJobSuccessResultOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutThirdPartyJobSuccessResult API operation for AWS CodePipeline. -// -// Represents the success of a third party job as returned to the pipeline by -// a job worker. Only used for partner actions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation PutThirdPartyJobSuccessResult for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeJobNotFoundException "JobNotFoundException" -// The specified job was specified in an invalid format or cannot be found. -// -// * ErrCodeInvalidJobStateException "InvalidJobStateException" -// The specified job state was specified in an invalid format. -// -// * ErrCodeInvalidClientTokenException "InvalidClientTokenException" -// The client token was specified in an invalid format -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutThirdPartyJobSuccessResult -func (c *CodePipeline) PutThirdPartyJobSuccessResult(input *PutThirdPartyJobSuccessResultInput) (*PutThirdPartyJobSuccessResultOutput, error) { - req, out := c.PutThirdPartyJobSuccessResultRequest(input) - return out, req.Send() -} - -// PutThirdPartyJobSuccessResultWithContext is the same as PutThirdPartyJobSuccessResult with the addition of -// the ability to pass a context and additional request options. -// -// See PutThirdPartyJobSuccessResult for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) PutThirdPartyJobSuccessResultWithContext(ctx aws.Context, input *PutThirdPartyJobSuccessResultInput, opts ...request.Option) (*PutThirdPartyJobSuccessResultOutput, error) { - req, out := c.PutThirdPartyJobSuccessResultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutWebhook = "PutWebhook" - -// PutWebhookRequest generates a "aws/request.Request" representing the -// client's request for the PutWebhook operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutWebhook for more information on using the PutWebhook -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutWebhookRequest method. -// req, resp := client.PutWebhookRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutWebhook -func (c *CodePipeline) PutWebhookRequest(input *PutWebhookInput) (req *request.Request, output *PutWebhookOutput) { - op := &request.Operation{ - Name: opPutWebhook, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutWebhookInput{} - } - - output = &PutWebhookOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutWebhook API operation for AWS CodePipeline. -// -// Defines a webhook and returns a unique webhook URL generated by CodePipeline. -// This URL can be supplied to third party source hosting providers to call -// every time there's a code change. When CodePipeline receives a POST request -// on this URL, the pipeline defined in the webhook is started as long as the -// POST request satisfied the authentication and filtering requirements supplied -// when defining the webhook. RegisterWebhookWithThirdParty and DeregisterWebhookWithThirdParty -// APIs can be used to automatically configure supported third parties to call -// the generated webhook URL. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation PutWebhook for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The number of pipelines associated with the AWS account has exceeded the -// limit allowed for the account. -// -// * ErrCodeInvalidWebhookFilterPatternException "InvalidWebhookFilterPatternException" -// The specified event filter rule is in an invalid format. -// -// * ErrCodeInvalidWebhookAuthenticationParametersException "InvalidWebhookAuthenticationParametersException" -// The specified authentication type is in an invalid format. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was specified in an invalid format or cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutWebhook -func (c *CodePipeline) PutWebhook(input *PutWebhookInput) (*PutWebhookOutput, error) { - req, out := c.PutWebhookRequest(input) - return out, req.Send() -} - -// PutWebhookWithContext is the same as PutWebhook with the addition of -// the ability to pass a context and additional request options. -// -// See PutWebhook for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) PutWebhookWithContext(ctx aws.Context, input *PutWebhookInput, opts ...request.Option) (*PutWebhookOutput, error) { - req, out := c.PutWebhookRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterWebhookWithThirdParty = "RegisterWebhookWithThirdParty" - -// RegisterWebhookWithThirdPartyRequest generates a "aws/request.Request" representing the -// client's request for the RegisterWebhookWithThirdParty operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterWebhookWithThirdParty for more information on using the RegisterWebhookWithThirdParty -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterWebhookWithThirdPartyRequest method. -// req, resp := client.RegisterWebhookWithThirdPartyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RegisterWebhookWithThirdParty -func (c *CodePipeline) RegisterWebhookWithThirdPartyRequest(input *RegisterWebhookWithThirdPartyInput) (req *request.Request, output *RegisterWebhookWithThirdPartyOutput) { - op := &request.Operation{ - Name: opRegisterWebhookWithThirdParty, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterWebhookWithThirdPartyInput{} - } - - output = &RegisterWebhookWithThirdPartyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RegisterWebhookWithThirdParty API operation for AWS CodePipeline. -// -// Configures a connection between the webhook that was created and the external -// tool with events to be detected. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation RegisterWebhookWithThirdParty for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeWebhookNotFoundException "WebhookNotFoundException" -// The specified webhook was entered in an invalid format or cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RegisterWebhookWithThirdParty -func (c *CodePipeline) RegisterWebhookWithThirdParty(input *RegisterWebhookWithThirdPartyInput) (*RegisterWebhookWithThirdPartyOutput, error) { - req, out := c.RegisterWebhookWithThirdPartyRequest(input) - return out, req.Send() -} - -// RegisterWebhookWithThirdPartyWithContext is the same as RegisterWebhookWithThirdParty with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterWebhookWithThirdParty for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) RegisterWebhookWithThirdPartyWithContext(ctx aws.Context, input *RegisterWebhookWithThirdPartyInput, opts ...request.Option) (*RegisterWebhookWithThirdPartyOutput, error) { - req, out := c.RegisterWebhookWithThirdPartyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRetryStageExecution = "RetryStageExecution" - -// RetryStageExecutionRequest generates a "aws/request.Request" representing the -// client's request for the RetryStageExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RetryStageExecution for more information on using the RetryStageExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RetryStageExecutionRequest method. -// req, resp := client.RetryStageExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RetryStageExecution -func (c *CodePipeline) RetryStageExecutionRequest(input *RetryStageExecutionInput) (req *request.Request, output *RetryStageExecutionOutput) { - op := &request.Operation{ - Name: opRetryStageExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RetryStageExecutionInput{} - } - - output = &RetryStageExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// RetryStageExecution API operation for AWS CodePipeline. -// -// Resumes the pipeline execution by retrying the last failed actions in a stage. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation RetryStageExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was specified in an invalid format or cannot be found. -// -// * ErrCodeStageNotFoundException "StageNotFoundException" -// The specified stage was specified in an invalid format or cannot be found. -// -// * ErrCodeStageNotRetryableException "StageNotRetryableException" -// The specified stage can't be retried because the pipeline structure or stage -// state changed after the stage was not completed; the stage contains no failed -// actions; one or more actions are still in progress; or another retry attempt -// is already in progress. -// -// * ErrCodeNotLatestPipelineExecutionException "NotLatestPipelineExecutionException" -// The stage has failed in a later run of the pipeline and the pipelineExecutionId -// associated with the request is out of date. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RetryStageExecution -func (c *CodePipeline) RetryStageExecution(input *RetryStageExecutionInput) (*RetryStageExecutionOutput, error) { - req, out := c.RetryStageExecutionRequest(input) - return out, req.Send() -} - -// RetryStageExecutionWithContext is the same as RetryStageExecution with the addition of -// the ability to pass a context and additional request options. -// -// See RetryStageExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) RetryStageExecutionWithContext(ctx aws.Context, input *RetryStageExecutionInput, opts ...request.Option) (*RetryStageExecutionOutput, error) { - req, out := c.RetryStageExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartPipelineExecution = "StartPipelineExecution" - -// StartPipelineExecutionRequest generates a "aws/request.Request" representing the -// client's request for the StartPipelineExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartPipelineExecution for more information on using the StartPipelineExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartPipelineExecutionRequest method. -// req, resp := client.StartPipelineExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StartPipelineExecution -func (c *CodePipeline) StartPipelineExecutionRequest(input *StartPipelineExecutionInput) (req *request.Request, output *StartPipelineExecutionOutput) { - op := &request.Operation{ - Name: opStartPipelineExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartPipelineExecutionInput{} - } - - output = &StartPipelineExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartPipelineExecution API operation for AWS CodePipeline. -// -// Starts the specified pipeline. Specifically, it begins processing the latest -// commit to the source location specified as part of the pipeline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation StartPipelineExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was specified in an invalid format or cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StartPipelineExecution -func (c *CodePipeline) StartPipelineExecution(input *StartPipelineExecutionInput) (*StartPipelineExecutionOutput, error) { - req, out := c.StartPipelineExecutionRequest(input) - return out, req.Send() -} - -// StartPipelineExecutionWithContext is the same as StartPipelineExecution with the addition of -// the ability to pass a context and additional request options. -// -// See StartPipelineExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) StartPipelineExecutionWithContext(ctx aws.Context, input *StartPipelineExecutionInput, opts ...request.Option) (*StartPipelineExecutionOutput, error) { - req, out := c.StartPipelineExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdatePipeline = "UpdatePipeline" - -// UpdatePipelineRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePipeline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdatePipeline for more information on using the UpdatePipeline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdatePipelineRequest method. -// req, resp := client.UpdatePipelineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/UpdatePipeline -func (c *CodePipeline) UpdatePipelineRequest(input *UpdatePipelineInput) (req *request.Request, output *UpdatePipelineOutput) { - op := &request.Operation{ - Name: opUpdatePipeline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdatePipelineInput{} - } - - output = &UpdatePipelineOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdatePipeline API operation for AWS CodePipeline. -// -// Updates a specified pipeline with edits or changes to its structure. Use -// a JSON file with the pipeline structure in conjunction with UpdatePipeline -// to provide the full structure of the pipeline. Updating the pipeline increases -// the version number of the pipeline by 1. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS CodePipeline's -// API operation UpdatePipeline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The validation was specified in an invalid format. -// -// * ErrCodeInvalidStageDeclarationException "InvalidStageDeclarationException" -// The specified stage declaration was specified in an invalid format. -// -// * ErrCodeInvalidActionDeclarationException "InvalidActionDeclarationException" -// The specified action declaration was specified in an invalid format. -// -// * ErrCodeInvalidBlockerDeclarationException "InvalidBlockerDeclarationException" -// Reserved for future use. -// -// * ErrCodeInvalidStructureException "InvalidStructureException" -// The specified structure was specified in an invalid format. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The number of pipelines associated with the AWS account has exceeded the -// limit allowed for the account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/UpdatePipeline -func (c *CodePipeline) UpdatePipeline(input *UpdatePipelineInput) (*UpdatePipelineOutput, error) { - req, out := c.UpdatePipelineRequest(input) - return out, req.Send() -} - -// UpdatePipelineWithContext is the same as UpdatePipeline with the addition of -// the ability to pass a context and additional request options. -// -// See UpdatePipeline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CodePipeline) UpdatePipelineWithContext(ctx aws.Context, input *UpdatePipelineInput, opts ...request.Option) (*UpdatePipelineOutput, error) { - req, out := c.UpdatePipelineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Represents an AWS session credentials object. These credentials are temporary -// credentials that are issued by AWS Secure Token Service (STS). They can be -// used to access input and output artifacts in the Amazon S3 bucket used to -// store artifact for the pipeline in AWS CodePipeline. -type AWSSessionCredentials struct { - _ struct{} `type:"structure" sensitive:"true"` - - // The access key for the session. - // - // AccessKeyId is a required field - AccessKeyId *string `locationName:"accessKeyId" type:"string" required:"true"` - - // The secret access key for the session. - // - // SecretAccessKey is a required field - SecretAccessKey *string `locationName:"secretAccessKey" type:"string" required:"true"` - - // The token for the session. - // - // SessionToken is a required field - SessionToken *string `locationName:"sessionToken" type:"string" required:"true"` -} - -// String returns the string representation -func (s AWSSessionCredentials) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AWSSessionCredentials) GoString() string { - return s.String() -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *AWSSessionCredentials) SetAccessKeyId(v string) *AWSSessionCredentials { - s.AccessKeyId = &v - return s -} - -// SetSecretAccessKey sets the SecretAccessKey field's value. -func (s *AWSSessionCredentials) SetSecretAccessKey(v string) *AWSSessionCredentials { - s.SecretAccessKey = &v - return s -} - -// SetSessionToken sets the SessionToken field's value. -func (s *AWSSessionCredentials) SetSessionToken(v string) *AWSSessionCredentials { - s.SessionToken = &v - return s -} - -// Represents the input of an AcknowledgeJob action. -type AcknowledgeJobInput struct { - _ struct{} `type:"structure"` - - // The unique system-generated ID of the job for which you want to confirm receipt. - // - // JobId is a required field - JobId *string `locationName:"jobId" type:"string" required:"true"` - - // A system-generated random number that AWS CodePipeline uses to ensure that - // the job is being worked on by only one job worker. Get this number from the - // response of the PollForJobs request that returned this job. - // - // Nonce is a required field - Nonce *string `locationName:"nonce" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AcknowledgeJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcknowledgeJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AcknowledgeJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AcknowledgeJobInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.Nonce == nil { - invalidParams.Add(request.NewErrParamRequired("Nonce")) - } - if s.Nonce != nil && len(*s.Nonce) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Nonce", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobId sets the JobId field's value. -func (s *AcknowledgeJobInput) SetJobId(v string) *AcknowledgeJobInput { - s.JobId = &v - return s -} - -// SetNonce sets the Nonce field's value. -func (s *AcknowledgeJobInput) SetNonce(v string) *AcknowledgeJobInput { - s.Nonce = &v - return s -} - -// Represents the output of an AcknowledgeJob action. -type AcknowledgeJobOutput struct { - _ struct{} `type:"structure"` - - // Whether the job worker has received the specified job. - Status *string `locationName:"status" type:"string" enum:"JobStatus"` -} - -// String returns the string representation -func (s AcknowledgeJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcknowledgeJobOutput) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *AcknowledgeJobOutput) SetStatus(v string) *AcknowledgeJobOutput { - s.Status = &v - return s -} - -// Represents the input of an AcknowledgeThirdPartyJob action. -type AcknowledgeThirdPartyJobInput struct { - _ struct{} `type:"structure"` - - // The clientToken portion of the clientId and clientToken pair used to verify - // that the calling entity is allowed access to the job and its details. - // - // ClientToken is a required field - ClientToken *string `locationName:"clientToken" min:"1" type:"string" required:"true"` - - // The unique system-generated ID of the job. - // - // JobId is a required field - JobId *string `locationName:"jobId" min:"1" type:"string" required:"true"` - - // A system-generated random number that AWS CodePipeline uses to ensure that - // the job is being worked on by only one job worker. Get this number from the - // response to a GetThirdPartyJobDetails request. - // - // Nonce is a required field - Nonce *string `locationName:"nonce" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AcknowledgeThirdPartyJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcknowledgeThirdPartyJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AcknowledgeThirdPartyJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AcknowledgeThirdPartyJobInput"} - if s.ClientToken == nil { - invalidParams.Add(request.NewErrParamRequired("ClientToken")) - } - if s.ClientToken != nil && len(*s.ClientToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) - } - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - if s.Nonce == nil { - invalidParams.Add(request.NewErrParamRequired("Nonce")) - } - if s.Nonce != nil && len(*s.Nonce) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Nonce", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *AcknowledgeThirdPartyJobInput) SetClientToken(v string) *AcknowledgeThirdPartyJobInput { - s.ClientToken = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *AcknowledgeThirdPartyJobInput) SetJobId(v string) *AcknowledgeThirdPartyJobInput { - s.JobId = &v - return s -} - -// SetNonce sets the Nonce field's value. -func (s *AcknowledgeThirdPartyJobInput) SetNonce(v string) *AcknowledgeThirdPartyJobInput { - s.Nonce = &v - return s -} - -// Represents the output of an AcknowledgeThirdPartyJob action. -type AcknowledgeThirdPartyJobOutput struct { - _ struct{} `type:"structure"` - - // The status information for the third party job, if any. - Status *string `locationName:"status" type:"string" enum:"JobStatus"` -} - -// String returns the string representation -func (s AcknowledgeThirdPartyJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcknowledgeThirdPartyJobOutput) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *AcknowledgeThirdPartyJobOutput) SetStatus(v string) *AcknowledgeThirdPartyJobOutput { - s.Status = &v - return s -} - -// Represents information about an action configuration. -type ActionConfiguration struct { - _ struct{} `type:"structure"` - - // The configuration data for the action. - Configuration map[string]*string `locationName:"configuration" type:"map"` -} - -// String returns the string representation -func (s ActionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActionConfiguration) GoString() string { - return s.String() -} - -// SetConfiguration sets the Configuration field's value. -func (s *ActionConfiguration) SetConfiguration(v map[string]*string) *ActionConfiguration { - s.Configuration = v - return s -} - -// Represents information about an action configuration property. -type ActionConfigurationProperty struct { - _ struct{} `type:"structure"` - - // The description of the action configuration property that will be displayed - // to users. - Description *string `locationName:"description" min:"1" type:"string"` - - // Whether the configuration property is a key. - // - // Key is a required field - Key *bool `locationName:"key" type:"boolean" required:"true"` - - // The name of the action configuration property. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // Indicates that the property will be used in conjunction with PollForJobs. - // When creating a custom action, an action can have up to one queryable property. - // If it has one, that property must be both required and not secret. - // - // If you create a pipeline with a custom action type, and that custom action - // contains a queryable property, the value for that configuration property - // is subject to additional restrictions. The value must be less than or equal - // to twenty (20) characters. The value can contain only alphanumeric characters, - // underscores, and hyphens. - Queryable *bool `locationName:"queryable" type:"boolean"` - - // Whether the configuration property is a required value. - // - // Required is a required field - Required *bool `locationName:"required" type:"boolean" required:"true"` - - // Whether the configuration property is secret. Secrets are hidden from all - // calls except for GetJobDetails, GetThirdPartyJobDetails, PollForJobs, and - // PollForThirdPartyJobs. - // - // When updating a pipeline, passing * * * * * without changing any other values - // of the action will preserve the prior value of the secret. - // - // Secret is a required field - Secret *bool `locationName:"secret" type:"boolean" required:"true"` - - // The type of the configuration property. - Type *string `locationName:"type" type:"string" enum:"ActionConfigurationPropertyType"` -} - -// String returns the string representation -func (s ActionConfigurationProperty) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActionConfigurationProperty) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ActionConfigurationProperty) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ActionConfigurationProperty"} - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Required == nil { - invalidParams.Add(request.NewErrParamRequired("Required")) - } - if s.Secret == nil { - invalidParams.Add(request.NewErrParamRequired("Secret")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *ActionConfigurationProperty) SetDescription(v string) *ActionConfigurationProperty { - s.Description = &v - return s -} - -// SetKey sets the Key field's value. -func (s *ActionConfigurationProperty) SetKey(v bool) *ActionConfigurationProperty { - s.Key = &v - return s -} - -// SetName sets the Name field's value. -func (s *ActionConfigurationProperty) SetName(v string) *ActionConfigurationProperty { - s.Name = &v - return s -} - -// SetQueryable sets the Queryable field's value. -func (s *ActionConfigurationProperty) SetQueryable(v bool) *ActionConfigurationProperty { - s.Queryable = &v - return s -} - -// SetRequired sets the Required field's value. -func (s *ActionConfigurationProperty) SetRequired(v bool) *ActionConfigurationProperty { - s.Required = &v - return s -} - -// SetSecret sets the Secret field's value. -func (s *ActionConfigurationProperty) SetSecret(v bool) *ActionConfigurationProperty { - s.Secret = &v - return s -} - -// SetType sets the Type field's value. -func (s *ActionConfigurationProperty) SetType(v string) *ActionConfigurationProperty { - s.Type = &v - return s -} - -// Represents the context of an action within the stage of a pipeline to a job -// worker. -type ActionContext struct { - _ struct{} `type:"structure"` - - // The name of the action within the context of a job. - Name *string `locationName:"name" min:"1" type:"string"` -} - -// String returns the string representation -func (s ActionContext) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActionContext) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *ActionContext) SetName(v string) *ActionContext { - s.Name = &v - return s -} - -// Represents information about an action declaration. -type ActionDeclaration struct { - _ struct{} `type:"structure"` - - // The configuration information for the action type. - // - // ActionTypeId is a required field - ActionTypeId *ActionTypeId `locationName:"actionTypeId" type:"structure" required:"true"` - - // The action declaration's configuration. - Configuration map[string]*string `locationName:"configuration" type:"map"` - - // The name or ID of the artifact consumed by the action, such as a test or - // build artifact. - InputArtifacts []*InputArtifact `locationName:"inputArtifacts" type:"list"` - - // The action declaration's name. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The name or ID of the result of the action declaration, such as a test or - // build artifact. - OutputArtifacts []*OutputArtifact `locationName:"outputArtifacts" type:"list"` - - // The action declaration's AWS Region, such as us-east-1. - Region *string `locationName:"region" min:"4" type:"string"` - - // The ARN of the IAM service role that will perform the declared action. This - // is assumed through the roleArn for the pipeline. - RoleArn *string `locationName:"roleArn" type:"string"` - - // The order in which actions are run. - RunOrder *int64 `locationName:"runOrder" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ActionDeclaration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActionDeclaration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ActionDeclaration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ActionDeclaration"} - if s.ActionTypeId == nil { - invalidParams.Add(request.NewErrParamRequired("ActionTypeId")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Region != nil && len(*s.Region) < 4 { - invalidParams.Add(request.NewErrParamMinLen("Region", 4)) - } - if s.RunOrder != nil && *s.RunOrder < 1 { - invalidParams.Add(request.NewErrParamMinValue("RunOrder", 1)) - } - if s.ActionTypeId != nil { - if err := s.ActionTypeId.Validate(); err != nil { - invalidParams.AddNested("ActionTypeId", err.(request.ErrInvalidParams)) - } - } - if s.InputArtifacts != nil { - for i, v := range s.InputArtifacts { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputArtifacts", i), err.(request.ErrInvalidParams)) - } - } - } - if s.OutputArtifacts != nil { - for i, v := range s.OutputArtifacts { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OutputArtifacts", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionTypeId sets the ActionTypeId field's value. -func (s *ActionDeclaration) SetActionTypeId(v *ActionTypeId) *ActionDeclaration { - s.ActionTypeId = v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *ActionDeclaration) SetConfiguration(v map[string]*string) *ActionDeclaration { - s.Configuration = v - return s -} - -// SetInputArtifacts sets the InputArtifacts field's value. -func (s *ActionDeclaration) SetInputArtifacts(v []*InputArtifact) *ActionDeclaration { - s.InputArtifacts = v - return s -} - -// SetName sets the Name field's value. -func (s *ActionDeclaration) SetName(v string) *ActionDeclaration { - s.Name = &v - return s -} - -// SetOutputArtifacts sets the OutputArtifacts field's value. -func (s *ActionDeclaration) SetOutputArtifacts(v []*OutputArtifact) *ActionDeclaration { - s.OutputArtifacts = v - return s -} - -// SetRegion sets the Region field's value. -func (s *ActionDeclaration) SetRegion(v string) *ActionDeclaration { - s.Region = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *ActionDeclaration) SetRoleArn(v string) *ActionDeclaration { - s.RoleArn = &v - return s -} - -// SetRunOrder sets the RunOrder field's value. -func (s *ActionDeclaration) SetRunOrder(v int64) *ActionDeclaration { - s.RunOrder = &v - return s -} - -// Represents information about the run of an action. -type ActionExecution struct { - _ struct{} `type:"structure"` - - // The details of an error returned by a URL external to AWS. - ErrorDetails *ErrorDetails `locationName:"errorDetails" type:"structure"` - - // The external ID of the run of the action. - ExternalExecutionId *string `locationName:"externalExecutionId" min:"1" type:"string"` - - // The URL of a resource external to AWS that will be used when running the - // action, for example an external repository URL. - ExternalExecutionUrl *string `locationName:"externalExecutionUrl" min:"1" type:"string"` - - // The last status change of the action. - LastStatusChange *time.Time `locationName:"lastStatusChange" type:"timestamp"` - - // The ARN of the user who last changed the pipeline. - LastUpdatedBy *string `locationName:"lastUpdatedBy" type:"string"` - - // A percentage of completeness of the action as it runs. - PercentComplete *int64 `locationName:"percentComplete" type:"integer"` - - // The status of the action, or for a completed action, the last status of the - // action. - Status *string `locationName:"status" type:"string" enum:"ActionExecutionStatus"` - - // A summary of the run of the action. - Summary *string `locationName:"summary" min:"1" type:"string"` - - // The system-generated token used to identify a unique approval request. The - // token for each open approval request can be obtained using the GetPipelineState - // command and is used to validate that the approval request corresponding to - // this token is still valid. - Token *string `locationName:"token" type:"string"` -} - -// String returns the string representation -func (s ActionExecution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActionExecution) GoString() string { - return s.String() -} - -// SetErrorDetails sets the ErrorDetails field's value. -func (s *ActionExecution) SetErrorDetails(v *ErrorDetails) *ActionExecution { - s.ErrorDetails = v - return s -} - -// SetExternalExecutionId sets the ExternalExecutionId field's value. -func (s *ActionExecution) SetExternalExecutionId(v string) *ActionExecution { - s.ExternalExecutionId = &v - return s -} - -// SetExternalExecutionUrl sets the ExternalExecutionUrl field's value. -func (s *ActionExecution) SetExternalExecutionUrl(v string) *ActionExecution { - s.ExternalExecutionUrl = &v - return s -} - -// SetLastStatusChange sets the LastStatusChange field's value. -func (s *ActionExecution) SetLastStatusChange(v time.Time) *ActionExecution { - s.LastStatusChange = &v - return s -} - -// SetLastUpdatedBy sets the LastUpdatedBy field's value. -func (s *ActionExecution) SetLastUpdatedBy(v string) *ActionExecution { - s.LastUpdatedBy = &v - return s -} - -// SetPercentComplete sets the PercentComplete field's value. -func (s *ActionExecution) SetPercentComplete(v int64) *ActionExecution { - s.PercentComplete = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ActionExecution) SetStatus(v string) *ActionExecution { - s.Status = &v - return s -} - -// SetSummary sets the Summary field's value. -func (s *ActionExecution) SetSummary(v string) *ActionExecution { - s.Summary = &v - return s -} - -// SetToken sets the Token field's value. -func (s *ActionExecution) SetToken(v string) *ActionExecution { - s.Token = &v - return s -} - -// Represents information about the version (or revision) of an action. -type ActionRevision struct { - _ struct{} `type:"structure"` - - // The date and time when the most recent version of the action was created, - // in timestamp format. - // - // Created is a required field - Created *time.Time `locationName:"created" type:"timestamp" required:"true"` - - // The unique identifier of the change that set the state to this revision, - // for example a deployment ID or timestamp. - // - // RevisionChangeId is a required field - RevisionChangeId *string `locationName:"revisionChangeId" min:"1" type:"string" required:"true"` - - // The system-generated unique ID that identifies the revision number of the - // action. - // - // RevisionId is a required field - RevisionId *string `locationName:"revisionId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ActionRevision) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActionRevision) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ActionRevision) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ActionRevision"} - if s.Created == nil { - invalidParams.Add(request.NewErrParamRequired("Created")) - } - if s.RevisionChangeId == nil { - invalidParams.Add(request.NewErrParamRequired("RevisionChangeId")) - } - if s.RevisionChangeId != nil && len(*s.RevisionChangeId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RevisionChangeId", 1)) - } - if s.RevisionId == nil { - invalidParams.Add(request.NewErrParamRequired("RevisionId")) - } - if s.RevisionId != nil && len(*s.RevisionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RevisionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreated sets the Created field's value. -func (s *ActionRevision) SetCreated(v time.Time) *ActionRevision { - s.Created = &v - return s -} - -// SetRevisionChangeId sets the RevisionChangeId field's value. -func (s *ActionRevision) SetRevisionChangeId(v string) *ActionRevision { - s.RevisionChangeId = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *ActionRevision) SetRevisionId(v string) *ActionRevision { - s.RevisionId = &v - return s -} - -// Represents information about the state of an action. -type ActionState struct { - _ struct{} `type:"structure"` - - // The name of the action. - ActionName *string `locationName:"actionName" min:"1" type:"string"` - - // Represents information about the version (or revision) of an action. - CurrentRevision *ActionRevision `locationName:"currentRevision" type:"structure"` - - // A URL link for more information about the state of the action, such as a - // deployment group details page. - EntityUrl *string `locationName:"entityUrl" min:"1" type:"string"` - - // Represents information about the run of an action. - LatestExecution *ActionExecution `locationName:"latestExecution" type:"structure"` - - // A URL link for more information about the revision, such as a commit details - // page. - RevisionUrl *string `locationName:"revisionUrl" min:"1" type:"string"` -} - -// String returns the string representation -func (s ActionState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActionState) GoString() string { - return s.String() -} - -// SetActionName sets the ActionName field's value. -func (s *ActionState) SetActionName(v string) *ActionState { - s.ActionName = &v - return s -} - -// SetCurrentRevision sets the CurrentRevision field's value. -func (s *ActionState) SetCurrentRevision(v *ActionRevision) *ActionState { - s.CurrentRevision = v - return s -} - -// SetEntityUrl sets the EntityUrl field's value. -func (s *ActionState) SetEntityUrl(v string) *ActionState { - s.EntityUrl = &v - return s -} - -// SetLatestExecution sets the LatestExecution field's value. -func (s *ActionState) SetLatestExecution(v *ActionExecution) *ActionState { - s.LatestExecution = v - return s -} - -// SetRevisionUrl sets the RevisionUrl field's value. -func (s *ActionState) SetRevisionUrl(v string) *ActionState { - s.RevisionUrl = &v - return s -} - -// Returns information about the details of an action type. -type ActionType struct { - _ struct{} `type:"structure"` - - // The configuration properties for the action type. - ActionConfigurationProperties []*ActionConfigurationProperty `locationName:"actionConfigurationProperties" type:"list"` - - // Represents information about an action type. - // - // Id is a required field - Id *ActionTypeId `locationName:"id" type:"structure" required:"true"` - - // The details of the input artifact for the action, such as its commit ID. - // - // InputArtifactDetails is a required field - InputArtifactDetails *ArtifactDetails `locationName:"inputArtifactDetails" type:"structure" required:"true"` - - // The details of the output artifact of the action, such as its commit ID. - // - // OutputArtifactDetails is a required field - OutputArtifactDetails *ArtifactDetails `locationName:"outputArtifactDetails" type:"structure" required:"true"` - - // The settings for the action type. - Settings *ActionTypeSettings `locationName:"settings" type:"structure"` -} - -// String returns the string representation -func (s ActionType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActionType) GoString() string { - return s.String() -} - -// SetActionConfigurationProperties sets the ActionConfigurationProperties field's value. -func (s *ActionType) SetActionConfigurationProperties(v []*ActionConfigurationProperty) *ActionType { - s.ActionConfigurationProperties = v - return s -} - -// SetId sets the Id field's value. -func (s *ActionType) SetId(v *ActionTypeId) *ActionType { - s.Id = v - return s -} - -// SetInputArtifactDetails sets the InputArtifactDetails field's value. -func (s *ActionType) SetInputArtifactDetails(v *ArtifactDetails) *ActionType { - s.InputArtifactDetails = v - return s -} - -// SetOutputArtifactDetails sets the OutputArtifactDetails field's value. -func (s *ActionType) SetOutputArtifactDetails(v *ArtifactDetails) *ActionType { - s.OutputArtifactDetails = v - return s -} - -// SetSettings sets the Settings field's value. -func (s *ActionType) SetSettings(v *ActionTypeSettings) *ActionType { - s.Settings = v - return s -} - -// Represents information about an action type. -type ActionTypeId struct { - _ struct{} `type:"structure"` - - // A category defines what kind of action can be taken in the stage, and constrains - // the provider type for the action. Valid categories are limited to one of - // the values below. - // - // Category is a required field - Category *string `locationName:"category" type:"string" required:"true" enum:"ActionCategory"` - - // The creator of the action being called. - // - // Owner is a required field - Owner *string `locationName:"owner" type:"string" required:"true" enum:"ActionOwner"` - - // The provider of the service being called by the action. Valid providers are - // determined by the action category. For example, an action in the Deploy category - // type might have a provider of AWS CodeDeploy, which would be specified as - // CodeDeploy. - // - // Provider is a required field - Provider *string `locationName:"provider" min:"1" type:"string" required:"true"` - - // A string that describes the action version. - // - // Version is a required field - Version *string `locationName:"version" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ActionTypeId) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActionTypeId) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ActionTypeId) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ActionTypeId"} - if s.Category == nil { - invalidParams.Add(request.NewErrParamRequired("Category")) - } - if s.Owner == nil { - invalidParams.Add(request.NewErrParamRequired("Owner")) - } - if s.Provider == nil { - invalidParams.Add(request.NewErrParamRequired("Provider")) - } - if s.Provider != nil && len(*s.Provider) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Provider", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCategory sets the Category field's value. -func (s *ActionTypeId) SetCategory(v string) *ActionTypeId { - s.Category = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *ActionTypeId) SetOwner(v string) *ActionTypeId { - s.Owner = &v - return s -} - -// SetProvider sets the Provider field's value. -func (s *ActionTypeId) SetProvider(v string) *ActionTypeId { - s.Provider = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *ActionTypeId) SetVersion(v string) *ActionTypeId { - s.Version = &v - return s -} - -// Returns information about the settings for an action type. -type ActionTypeSettings struct { - _ struct{} `type:"structure"` - - // The URL returned to the AWS CodePipeline console that provides a deep link - // to the resources of the external system, such as the configuration page for - // an AWS CodeDeploy deployment group. This link is provided as part of the - // action display within the pipeline. - EntityUrlTemplate *string `locationName:"entityUrlTemplate" min:"1" type:"string"` - - // The URL returned to the AWS CodePipeline console that contains a link to - // the top-level landing page for the external system, such as console page - // for AWS CodeDeploy. This link is shown on the pipeline view page in the AWS - // CodePipeline console and provides a link to the execution entity of the external - // action. - ExecutionUrlTemplate *string `locationName:"executionUrlTemplate" min:"1" type:"string"` - - // The URL returned to the AWS CodePipeline console that contains a link to - // the page where customers can update or change the configuration of the external - // action. - RevisionUrlTemplate *string `locationName:"revisionUrlTemplate" min:"1" type:"string"` - - // The URL of a sign-up page where users can sign up for an external service - // and perform initial configuration of the action provided by that service. - ThirdPartyConfigurationUrl *string `locationName:"thirdPartyConfigurationUrl" min:"1" type:"string"` -} - -// String returns the string representation -func (s ActionTypeSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActionTypeSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ActionTypeSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ActionTypeSettings"} - if s.EntityUrlTemplate != nil && len(*s.EntityUrlTemplate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EntityUrlTemplate", 1)) - } - if s.ExecutionUrlTemplate != nil && len(*s.ExecutionUrlTemplate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExecutionUrlTemplate", 1)) - } - if s.RevisionUrlTemplate != nil && len(*s.RevisionUrlTemplate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RevisionUrlTemplate", 1)) - } - if s.ThirdPartyConfigurationUrl != nil && len(*s.ThirdPartyConfigurationUrl) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThirdPartyConfigurationUrl", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEntityUrlTemplate sets the EntityUrlTemplate field's value. -func (s *ActionTypeSettings) SetEntityUrlTemplate(v string) *ActionTypeSettings { - s.EntityUrlTemplate = &v - return s -} - -// SetExecutionUrlTemplate sets the ExecutionUrlTemplate field's value. -func (s *ActionTypeSettings) SetExecutionUrlTemplate(v string) *ActionTypeSettings { - s.ExecutionUrlTemplate = &v - return s -} - -// SetRevisionUrlTemplate sets the RevisionUrlTemplate field's value. -func (s *ActionTypeSettings) SetRevisionUrlTemplate(v string) *ActionTypeSettings { - s.RevisionUrlTemplate = &v - return s -} - -// SetThirdPartyConfigurationUrl sets the ThirdPartyConfigurationUrl field's value. -func (s *ActionTypeSettings) SetThirdPartyConfigurationUrl(v string) *ActionTypeSettings { - s.ThirdPartyConfigurationUrl = &v - return s -} - -// Represents information about the result of an approval request. -type ApprovalResult struct { - _ struct{} `type:"structure"` - - // The response submitted by a reviewer assigned to an approval action request. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"ApprovalStatus"` - - // The summary of the current status of the approval request. - // - // Summary is a required field - Summary *string `locationName:"summary" type:"string" required:"true"` -} - -// String returns the string representation -func (s ApprovalResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApprovalResult) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ApprovalResult) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ApprovalResult"} - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.Summary == nil { - invalidParams.Add(request.NewErrParamRequired("Summary")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStatus sets the Status field's value. -func (s *ApprovalResult) SetStatus(v string) *ApprovalResult { - s.Status = &v - return s -} - -// SetSummary sets the Summary field's value. -func (s *ApprovalResult) SetSummary(v string) *ApprovalResult { - s.Summary = &v - return s -} - -// Represents information about an artifact that will be worked upon by actions -// in the pipeline. -type Artifact struct { - _ struct{} `type:"structure"` - - // The location of an artifact. - Location *ArtifactLocation `locationName:"location" type:"structure"` - - // The artifact's name. - Name *string `locationName:"name" min:"1" type:"string"` - - // The artifact's revision ID. Depending on the type of object, this could be - // a commit ID (GitHub) or a revision ID (Amazon S3). - Revision *string `locationName:"revision" min:"1" type:"string"` -} - -// String returns the string representation -func (s Artifact) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Artifact) GoString() string { - return s.String() -} - -// SetLocation sets the Location field's value. -func (s *Artifact) SetLocation(v *ArtifactLocation) *Artifact { - s.Location = v - return s -} - -// SetName sets the Name field's value. -func (s *Artifact) SetName(v string) *Artifact { - s.Name = &v - return s -} - -// SetRevision sets the Revision field's value. -func (s *Artifact) SetRevision(v string) *Artifact { - s.Revision = &v - return s -} - -// Returns information about the details of an artifact. -type ArtifactDetails struct { - _ struct{} `type:"structure"` - - // The maximum number of artifacts allowed for the action type. - // - // MaximumCount is a required field - MaximumCount *int64 `locationName:"maximumCount" type:"integer" required:"true"` - - // The minimum number of artifacts allowed for the action type. - // - // MinimumCount is a required field - MinimumCount *int64 `locationName:"minimumCount" type:"integer" required:"true"` -} - -// String returns the string representation -func (s ArtifactDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ArtifactDetails) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ArtifactDetails) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ArtifactDetails"} - if s.MaximumCount == nil { - invalidParams.Add(request.NewErrParamRequired("MaximumCount")) - } - if s.MinimumCount == nil { - invalidParams.Add(request.NewErrParamRequired("MinimumCount")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaximumCount sets the MaximumCount field's value. -func (s *ArtifactDetails) SetMaximumCount(v int64) *ArtifactDetails { - s.MaximumCount = &v - return s -} - -// SetMinimumCount sets the MinimumCount field's value. -func (s *ArtifactDetails) SetMinimumCount(v int64) *ArtifactDetails { - s.MinimumCount = &v - return s -} - -// Represents information about the location of an artifact. -type ArtifactLocation struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket that contains the artifact. - S3Location *S3ArtifactLocation `locationName:"s3Location" type:"structure"` - - // The type of artifact in the location. - Type *string `locationName:"type" type:"string" enum:"ArtifactLocationType"` -} - -// String returns the string representation -func (s ArtifactLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ArtifactLocation) GoString() string { - return s.String() -} - -// SetS3Location sets the S3Location field's value. -func (s *ArtifactLocation) SetS3Location(v *S3ArtifactLocation) *ArtifactLocation { - s.S3Location = v - return s -} - -// SetType sets the Type field's value. -func (s *ArtifactLocation) SetType(v string) *ArtifactLocation { - s.Type = &v - return s -} - -// Represents revision details of an artifact. -type ArtifactRevision struct { - _ struct{} `type:"structure"` - - // The date and time when the most recent revision of the artifact was created, - // in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp"` - - // The name of an artifact. This name might be system-generated, such as "MyApp", - // or might be defined by the user when an action is created. - Name *string `locationName:"name" min:"1" type:"string"` - - // An additional identifier for a revision, such as a commit date or, for artifacts - // stored in Amazon S3 buckets, the ETag value. - RevisionChangeIdentifier *string `locationName:"revisionChangeIdentifier" min:"1" type:"string"` - - // The revision ID of the artifact. - RevisionId *string `locationName:"revisionId" min:"1" type:"string"` - - // Summary information about the most recent revision of the artifact. For GitHub - // and AWS CodeCommit repositories, the commit message. For Amazon S3 buckets - // or actions, the user-provided content of a codepipeline-artifact-revision-summary - // key specified in the object metadata. - RevisionSummary *string `locationName:"revisionSummary" min:"1" type:"string"` - - // The commit ID for the artifact revision. For artifacts stored in GitHub or - // AWS CodeCommit repositories, the commit ID is linked to a commit details - // page. - RevisionUrl *string `locationName:"revisionUrl" min:"1" type:"string"` -} - -// String returns the string representation -func (s ArtifactRevision) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ArtifactRevision) GoString() string { - return s.String() -} - -// SetCreated sets the Created field's value. -func (s *ArtifactRevision) SetCreated(v time.Time) *ArtifactRevision { - s.Created = &v - return s -} - -// SetName sets the Name field's value. -func (s *ArtifactRevision) SetName(v string) *ArtifactRevision { - s.Name = &v - return s -} - -// SetRevisionChangeIdentifier sets the RevisionChangeIdentifier field's value. -func (s *ArtifactRevision) SetRevisionChangeIdentifier(v string) *ArtifactRevision { - s.RevisionChangeIdentifier = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *ArtifactRevision) SetRevisionId(v string) *ArtifactRevision { - s.RevisionId = &v - return s -} - -// SetRevisionSummary sets the RevisionSummary field's value. -func (s *ArtifactRevision) SetRevisionSummary(v string) *ArtifactRevision { - s.RevisionSummary = &v - return s -} - -// SetRevisionUrl sets the RevisionUrl field's value. -func (s *ArtifactRevision) SetRevisionUrl(v string) *ArtifactRevision { - s.RevisionUrl = &v - return s -} - -// The Amazon S3 bucket where artifacts are stored for the pipeline. -type ArtifactStore struct { - _ struct{} `type:"structure"` - - // The encryption key used to encrypt the data in the artifact store, such as - // an AWS Key Management Service (AWS KMS) key. If this is undefined, the default - // key for Amazon S3 is used. - EncryptionKey *EncryptionKey `locationName:"encryptionKey" type:"structure"` - - // The Amazon S3 bucket used for storing the artifacts for a pipeline. You can - // specify the name of an S3 bucket but not a folder within the bucket. A folder - // to contain the pipeline artifacts is created for you based on the name of - // the pipeline. You can use any Amazon S3 bucket in the same AWS Region as - // the pipeline to store your pipeline artifacts. - // - // Location is a required field - Location *string `locationName:"location" min:"3" type:"string" required:"true"` - - // The type of the artifact store, such as S3. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"ArtifactStoreType"` -} - -// String returns the string representation -func (s ArtifactStore) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ArtifactStore) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ArtifactStore) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ArtifactStore"} - if s.Location == nil { - invalidParams.Add(request.NewErrParamRequired("Location")) - } - if s.Location != nil && len(*s.Location) < 3 { - invalidParams.Add(request.NewErrParamMinLen("Location", 3)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.EncryptionKey != nil { - if err := s.EncryptionKey.Validate(); err != nil { - invalidParams.AddNested("EncryptionKey", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryptionKey sets the EncryptionKey field's value. -func (s *ArtifactStore) SetEncryptionKey(v *EncryptionKey) *ArtifactStore { - s.EncryptionKey = v - return s -} - -// SetLocation sets the Location field's value. -func (s *ArtifactStore) SetLocation(v string) *ArtifactStore { - s.Location = &v - return s -} - -// SetType sets the Type field's value. -func (s *ArtifactStore) SetType(v string) *ArtifactStore { - s.Type = &v - return s -} - -// Reserved for future use. -type BlockerDeclaration struct { - _ struct{} `type:"structure"` - - // Reserved for future use. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // Reserved for future use. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"BlockerType"` -} - -// String returns the string representation -func (s BlockerDeclaration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BlockerDeclaration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BlockerDeclaration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BlockerDeclaration"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *BlockerDeclaration) SetName(v string) *BlockerDeclaration { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *BlockerDeclaration) SetType(v string) *BlockerDeclaration { - s.Type = &v - return s -} - -// Represents the input of a CreateCustomActionType operation. -type CreateCustomActionTypeInput struct { - _ struct{} `type:"structure"` - - // The category of the custom action, such as a build action or a test action. - // - // Although Source and Approval are listed as valid values, they are not currently - // functional. These values are reserved for future use. - // - // Category is a required field - Category *string `locationName:"category" type:"string" required:"true" enum:"ActionCategory"` - - // The configuration properties for the custom action. - // - // You can refer to a name in the configuration properties of the custom action - // within the URL templates by following the format of {Config:name}, as long - // as the configuration property is both required and not secret. For more information, - // see Create a Custom Action for a Pipeline (http://docs.aws.amazon.com/codepipeline/latest/userguide/how-to-create-custom-action.html). - ConfigurationProperties []*ActionConfigurationProperty `locationName:"configurationProperties" type:"list"` - - // The details of the input artifact for the action, such as its commit ID. - // - // InputArtifactDetails is a required field - InputArtifactDetails *ArtifactDetails `locationName:"inputArtifactDetails" type:"structure" required:"true"` - - // The details of the output artifact of the action, such as its commit ID. - // - // OutputArtifactDetails is a required field - OutputArtifactDetails *ArtifactDetails `locationName:"outputArtifactDetails" type:"structure" required:"true"` - - // The provider of the service used in the custom action, such as AWS CodeDeploy. - // - // Provider is a required field - Provider *string `locationName:"provider" min:"1" type:"string" required:"true"` - - // Returns information about the settings for an action type. - Settings *ActionTypeSettings `locationName:"settings" type:"structure"` - - // The version identifier of the custom action. - // - // Version is a required field - Version *string `locationName:"version" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateCustomActionTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCustomActionTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCustomActionTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCustomActionTypeInput"} - if s.Category == nil { - invalidParams.Add(request.NewErrParamRequired("Category")) - } - if s.InputArtifactDetails == nil { - invalidParams.Add(request.NewErrParamRequired("InputArtifactDetails")) - } - if s.OutputArtifactDetails == nil { - invalidParams.Add(request.NewErrParamRequired("OutputArtifactDetails")) - } - if s.Provider == nil { - invalidParams.Add(request.NewErrParamRequired("Provider")) - } - if s.Provider != nil && len(*s.Provider) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Provider", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - if s.ConfigurationProperties != nil { - for i, v := range s.ConfigurationProperties { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ConfigurationProperties", i), err.(request.ErrInvalidParams)) - } - } - } - if s.InputArtifactDetails != nil { - if err := s.InputArtifactDetails.Validate(); err != nil { - invalidParams.AddNested("InputArtifactDetails", err.(request.ErrInvalidParams)) - } - } - if s.OutputArtifactDetails != nil { - if err := s.OutputArtifactDetails.Validate(); err != nil { - invalidParams.AddNested("OutputArtifactDetails", err.(request.ErrInvalidParams)) - } - } - if s.Settings != nil { - if err := s.Settings.Validate(); err != nil { - invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCategory sets the Category field's value. -func (s *CreateCustomActionTypeInput) SetCategory(v string) *CreateCustomActionTypeInput { - s.Category = &v - return s -} - -// SetConfigurationProperties sets the ConfigurationProperties field's value. -func (s *CreateCustomActionTypeInput) SetConfigurationProperties(v []*ActionConfigurationProperty) *CreateCustomActionTypeInput { - s.ConfigurationProperties = v - return s -} - -// SetInputArtifactDetails sets the InputArtifactDetails field's value. -func (s *CreateCustomActionTypeInput) SetInputArtifactDetails(v *ArtifactDetails) *CreateCustomActionTypeInput { - s.InputArtifactDetails = v - return s -} - -// SetOutputArtifactDetails sets the OutputArtifactDetails field's value. -func (s *CreateCustomActionTypeInput) SetOutputArtifactDetails(v *ArtifactDetails) *CreateCustomActionTypeInput { - s.OutputArtifactDetails = v - return s -} - -// SetProvider sets the Provider field's value. -func (s *CreateCustomActionTypeInput) SetProvider(v string) *CreateCustomActionTypeInput { - s.Provider = &v - return s -} - -// SetSettings sets the Settings field's value. -func (s *CreateCustomActionTypeInput) SetSettings(v *ActionTypeSettings) *CreateCustomActionTypeInput { - s.Settings = v - return s -} - -// SetVersion sets the Version field's value. -func (s *CreateCustomActionTypeInput) SetVersion(v string) *CreateCustomActionTypeInput { - s.Version = &v - return s -} - -// Represents the output of a CreateCustomActionType operation. -type CreateCustomActionTypeOutput struct { - _ struct{} `type:"structure"` - - // Returns information about the details of an action type. - // - // ActionType is a required field - ActionType *ActionType `locationName:"actionType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateCustomActionTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCustomActionTypeOutput) GoString() string { - return s.String() -} - -// SetActionType sets the ActionType field's value. -func (s *CreateCustomActionTypeOutput) SetActionType(v *ActionType) *CreateCustomActionTypeOutput { - s.ActionType = v - return s -} - -// Represents the input of a CreatePipeline action. -type CreatePipelineInput struct { - _ struct{} `type:"structure"` - - // Represents the structure of actions and stages to be performed in the pipeline. - // - // Pipeline is a required field - Pipeline *PipelineDeclaration `locationName:"pipeline" type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreatePipelineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePipelineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePipelineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePipelineInput"} - if s.Pipeline == nil { - invalidParams.Add(request.NewErrParamRequired("Pipeline")) - } - if s.Pipeline != nil { - if err := s.Pipeline.Validate(); err != nil { - invalidParams.AddNested("Pipeline", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPipeline sets the Pipeline field's value. -func (s *CreatePipelineInput) SetPipeline(v *PipelineDeclaration) *CreatePipelineInput { - s.Pipeline = v - return s -} - -// Represents the output of a CreatePipeline action. -type CreatePipelineOutput struct { - _ struct{} `type:"structure"` - - // Represents the structure of actions and stages to be performed in the pipeline. - Pipeline *PipelineDeclaration `locationName:"pipeline" type:"structure"` -} - -// String returns the string representation -func (s CreatePipelineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePipelineOutput) GoString() string { - return s.String() -} - -// SetPipeline sets the Pipeline field's value. -func (s *CreatePipelineOutput) SetPipeline(v *PipelineDeclaration) *CreatePipelineOutput { - s.Pipeline = v - return s -} - -// Represents information about a current revision. -type CurrentRevision struct { - _ struct{} `type:"structure"` - - // The change identifier for the current revision. - // - // ChangeIdentifier is a required field - ChangeIdentifier *string `locationName:"changeIdentifier" min:"1" type:"string" required:"true"` - - // The date and time when the most recent revision of the artifact was created, - // in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp"` - - // The revision ID of the current version of an artifact. - // - // Revision is a required field - Revision *string `locationName:"revision" min:"1" type:"string" required:"true"` - - // The summary of the most recent revision of the artifact. - RevisionSummary *string `locationName:"revisionSummary" min:"1" type:"string"` -} - -// String returns the string representation -func (s CurrentRevision) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CurrentRevision) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CurrentRevision) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CurrentRevision"} - if s.ChangeIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeIdentifier")) - } - if s.ChangeIdentifier != nil && len(*s.ChangeIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeIdentifier", 1)) - } - if s.Revision == nil { - invalidParams.Add(request.NewErrParamRequired("Revision")) - } - if s.Revision != nil && len(*s.Revision) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Revision", 1)) - } - if s.RevisionSummary != nil && len(*s.RevisionSummary) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RevisionSummary", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeIdentifier sets the ChangeIdentifier field's value. -func (s *CurrentRevision) SetChangeIdentifier(v string) *CurrentRevision { - s.ChangeIdentifier = &v - return s -} - -// SetCreated sets the Created field's value. -func (s *CurrentRevision) SetCreated(v time.Time) *CurrentRevision { - s.Created = &v - return s -} - -// SetRevision sets the Revision field's value. -func (s *CurrentRevision) SetRevision(v string) *CurrentRevision { - s.Revision = &v - return s -} - -// SetRevisionSummary sets the RevisionSummary field's value. -func (s *CurrentRevision) SetRevisionSummary(v string) *CurrentRevision { - s.RevisionSummary = &v - return s -} - -// Represents the input of a DeleteCustomActionType operation. The custom action -// will be marked as deleted. -type DeleteCustomActionTypeInput struct { - _ struct{} `type:"structure"` - - // The category of the custom action that you want to delete, such as source - // or deploy. - // - // Category is a required field - Category *string `locationName:"category" type:"string" required:"true" enum:"ActionCategory"` - - // The provider of the service used in the custom action, such as AWS CodeDeploy. - // - // Provider is a required field - Provider *string `locationName:"provider" min:"1" type:"string" required:"true"` - - // The version of the custom action to delete. - // - // Version is a required field - Version *string `locationName:"version" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteCustomActionTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCustomActionTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCustomActionTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCustomActionTypeInput"} - if s.Category == nil { - invalidParams.Add(request.NewErrParamRequired("Category")) - } - if s.Provider == nil { - invalidParams.Add(request.NewErrParamRequired("Provider")) - } - if s.Provider != nil && len(*s.Provider) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Provider", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCategory sets the Category field's value. -func (s *DeleteCustomActionTypeInput) SetCategory(v string) *DeleteCustomActionTypeInput { - s.Category = &v - return s -} - -// SetProvider sets the Provider field's value. -func (s *DeleteCustomActionTypeInput) SetProvider(v string) *DeleteCustomActionTypeInput { - s.Provider = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *DeleteCustomActionTypeInput) SetVersion(v string) *DeleteCustomActionTypeInput { - s.Version = &v - return s -} - -type DeleteCustomActionTypeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCustomActionTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCustomActionTypeOutput) GoString() string { - return s.String() -} - -// Represents the input of a DeletePipeline action. -type DeletePipelineInput struct { - _ struct{} `type:"structure"` - - // The name of the pipeline to be deleted. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePipelineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePipelineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePipelineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePipelineInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeletePipelineInput) SetName(v string) *DeletePipelineInput { - s.Name = &v - return s -} - -type DeletePipelineOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePipelineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePipelineOutput) GoString() string { - return s.String() -} - -type DeleteWebhookInput struct { - _ struct{} `type:"structure"` - - // The name of the webhook you want to delete. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteWebhookInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteWebhookInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteWebhookInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteWebhookInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteWebhookInput) SetName(v string) *DeleteWebhookInput { - s.Name = &v - return s -} - -type DeleteWebhookOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteWebhookOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteWebhookOutput) GoString() string { - return s.String() -} - -type DeregisterWebhookWithThirdPartyInput struct { - _ struct{} `type:"structure"` - - // The name of the webhook you want to deregister. - WebhookName *string `locationName:"webhookName" min:"1" type:"string"` -} - -// String returns the string representation -func (s DeregisterWebhookWithThirdPartyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterWebhookWithThirdPartyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterWebhookWithThirdPartyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterWebhookWithThirdPartyInput"} - if s.WebhookName != nil && len(*s.WebhookName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WebhookName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWebhookName sets the WebhookName field's value. -func (s *DeregisterWebhookWithThirdPartyInput) SetWebhookName(v string) *DeregisterWebhookWithThirdPartyInput { - s.WebhookName = &v - return s -} - -type DeregisterWebhookWithThirdPartyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeregisterWebhookWithThirdPartyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterWebhookWithThirdPartyOutput) GoString() string { - return s.String() -} - -// Represents the input of a DisableStageTransition action. -type DisableStageTransitionInput struct { - _ struct{} `type:"structure"` - - // The name of the pipeline in which you want to disable the flow of artifacts - // from one stage to another. - // - // PipelineName is a required field - PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` - - // The reason given to the user why a stage is disabled, such as waiting for - // manual approval or manual tests. This message is displayed in the pipeline - // console UI. - // - // Reason is a required field - Reason *string `locationName:"reason" min:"1" type:"string" required:"true"` - - // The name of the stage where you want to disable the inbound or outbound transition - // of artifacts. - // - // StageName is a required field - StageName *string `locationName:"stageName" min:"1" type:"string" required:"true"` - - // Specifies whether artifacts will be prevented from transitioning into the - // stage and being processed by the actions in that stage (inbound), or prevented - // from transitioning from the stage after they have been processed by the actions - // in that stage (outbound). - // - // TransitionType is a required field - TransitionType *string `locationName:"transitionType" type:"string" required:"true" enum:"StageTransitionType"` -} - -// String returns the string representation -func (s DisableStageTransitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableStageTransitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableStageTransitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableStageTransitionInput"} - if s.PipelineName == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineName")) - } - if s.PipelineName != nil && len(*s.PipelineName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) - } - if s.Reason == nil { - invalidParams.Add(request.NewErrParamRequired("Reason")) - } - if s.Reason != nil && len(*s.Reason) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Reason", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - if s.TransitionType == nil { - invalidParams.Add(request.NewErrParamRequired("TransitionType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPipelineName sets the PipelineName field's value. -func (s *DisableStageTransitionInput) SetPipelineName(v string) *DisableStageTransitionInput { - s.PipelineName = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *DisableStageTransitionInput) SetReason(v string) *DisableStageTransitionInput { - s.Reason = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *DisableStageTransitionInput) SetStageName(v string) *DisableStageTransitionInput { - s.StageName = &v - return s -} - -// SetTransitionType sets the TransitionType field's value. -func (s *DisableStageTransitionInput) SetTransitionType(v string) *DisableStageTransitionInput { - s.TransitionType = &v - return s -} - -type DisableStageTransitionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableStageTransitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableStageTransitionOutput) GoString() string { - return s.String() -} - -// Represents the input of an EnableStageTransition action. -type EnableStageTransitionInput struct { - _ struct{} `type:"structure"` - - // The name of the pipeline in which you want to enable the flow of artifacts - // from one stage to another. - // - // PipelineName is a required field - PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` - - // The name of the stage where you want to enable the transition of artifacts, - // either into the stage (inbound) or from that stage to the next stage (outbound). - // - // StageName is a required field - StageName *string `locationName:"stageName" min:"1" type:"string" required:"true"` - - // Specifies whether artifacts will be allowed to enter the stage and be processed - // by the actions in that stage (inbound) or whether already-processed artifacts - // will be allowed to transition to the next stage (outbound). - // - // TransitionType is a required field - TransitionType *string `locationName:"transitionType" type:"string" required:"true" enum:"StageTransitionType"` -} - -// String returns the string representation -func (s EnableStageTransitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableStageTransitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableStageTransitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableStageTransitionInput"} - if s.PipelineName == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineName")) - } - if s.PipelineName != nil && len(*s.PipelineName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - if s.TransitionType == nil { - invalidParams.Add(request.NewErrParamRequired("TransitionType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPipelineName sets the PipelineName field's value. -func (s *EnableStageTransitionInput) SetPipelineName(v string) *EnableStageTransitionInput { - s.PipelineName = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *EnableStageTransitionInput) SetStageName(v string) *EnableStageTransitionInput { - s.StageName = &v - return s -} - -// SetTransitionType sets the TransitionType field's value. -func (s *EnableStageTransitionInput) SetTransitionType(v string) *EnableStageTransitionInput { - s.TransitionType = &v - return s -} - -type EnableStageTransitionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableStageTransitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableStageTransitionOutput) GoString() string { - return s.String() -} - -// Represents information about the key used to encrypt data in the artifact -// store, such as an AWS Key Management Service (AWS KMS) key. -type EncryptionKey struct { - _ struct{} `type:"structure"` - - // The ID used to identify the key. For an AWS KMS key, this is the key ID or - // key ARN. - // - // Id is a required field - Id *string `locationName:"id" min:"1" type:"string" required:"true"` - - // The type of encryption key, such as an AWS Key Management Service (AWS KMS) - // key. When creating or updating a pipeline, the value must be set to 'KMS'. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"EncryptionKeyType"` -} - -// String returns the string representation -func (s EncryptionKey) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EncryptionKey) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EncryptionKey) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EncryptionKey"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *EncryptionKey) SetId(v string) *EncryptionKey { - s.Id = &v - return s -} - -// SetType sets the Type field's value. -func (s *EncryptionKey) SetType(v string) *EncryptionKey { - s.Type = &v - return s -} - -// Represents information about an error in AWS CodePipeline. -type ErrorDetails struct { - _ struct{} `type:"structure"` - - // The system ID or error number code of the error. - Code *string `locationName:"code" type:"string"` - - // The text of the error message. - Message *string `locationName:"message" min:"1" type:"string"` -} - -// String returns the string representation -func (s ErrorDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ErrorDetails) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *ErrorDetails) SetCode(v string) *ErrorDetails { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ErrorDetails) SetMessage(v string) *ErrorDetails { - s.Message = &v - return s -} - -// The details of the actions taken and results produced on an artifact as it -// passes through stages in the pipeline. -type ExecutionDetails struct { - _ struct{} `type:"structure"` - - // The system-generated unique ID of this action used to identify this job worker - // in any external systems, such as AWS CodeDeploy. - ExternalExecutionId *string `locationName:"externalExecutionId" min:"1" type:"string"` - - // The percentage of work completed on the action, represented on a scale of - // zero to one hundred percent. - PercentComplete *int64 `locationName:"percentComplete" type:"integer"` - - // The summary of the current status of the actions. - Summary *string `locationName:"summary" min:"1" type:"string"` -} - -// String returns the string representation -func (s ExecutionDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecutionDetails) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExecutionDetails) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExecutionDetails"} - if s.ExternalExecutionId != nil && len(*s.ExternalExecutionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExternalExecutionId", 1)) - } - if s.Summary != nil && len(*s.Summary) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Summary", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExternalExecutionId sets the ExternalExecutionId field's value. -func (s *ExecutionDetails) SetExternalExecutionId(v string) *ExecutionDetails { - s.ExternalExecutionId = &v - return s -} - -// SetPercentComplete sets the PercentComplete field's value. -func (s *ExecutionDetails) SetPercentComplete(v int64) *ExecutionDetails { - s.PercentComplete = &v - return s -} - -// SetSummary sets the Summary field's value. -func (s *ExecutionDetails) SetSummary(v string) *ExecutionDetails { - s.Summary = &v - return s -} - -// Represents information about failure details. -type FailureDetails struct { - _ struct{} `type:"structure"` - - // The external ID of the run of the action that failed. - ExternalExecutionId *string `locationName:"externalExecutionId" min:"1" type:"string"` - - // The message about the failure. - // - // Message is a required field - Message *string `locationName:"message" min:"1" type:"string" required:"true"` - - // The type of the failure. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"FailureType"` -} - -// String returns the string representation -func (s FailureDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailureDetails) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FailureDetails) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FailureDetails"} - if s.ExternalExecutionId != nil && len(*s.ExternalExecutionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExternalExecutionId", 1)) - } - if s.Message == nil { - invalidParams.Add(request.NewErrParamRequired("Message")) - } - if s.Message != nil && len(*s.Message) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Message", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExternalExecutionId sets the ExternalExecutionId field's value. -func (s *FailureDetails) SetExternalExecutionId(v string) *FailureDetails { - s.ExternalExecutionId = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *FailureDetails) SetMessage(v string) *FailureDetails { - s.Message = &v - return s -} - -// SetType sets the Type field's value. -func (s *FailureDetails) SetType(v string) *FailureDetails { - s.Type = &v - return s -} - -// Represents the input of a GetJobDetails action. -type GetJobDetailsInput struct { - _ struct{} `type:"structure"` - - // The unique system-generated ID for the job. - // - // JobId is a required field - JobId *string `locationName:"jobId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetJobDetailsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobDetailsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetJobDetailsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetJobDetailsInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobId sets the JobId field's value. -func (s *GetJobDetailsInput) SetJobId(v string) *GetJobDetailsInput { - s.JobId = &v - return s -} - -// Represents the output of a GetJobDetails action. -type GetJobDetailsOutput struct { - _ struct{} `type:"structure"` - - // The details of the job. - // - // If AWSSessionCredentials is used, a long-running job can call GetJobDetails - // again to obtain new credentials. - JobDetails *JobDetails `locationName:"jobDetails" type:"structure"` -} - -// String returns the string representation -func (s GetJobDetailsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobDetailsOutput) GoString() string { - return s.String() -} - -// SetJobDetails sets the JobDetails field's value. -func (s *GetJobDetailsOutput) SetJobDetails(v *JobDetails) *GetJobDetailsOutput { - s.JobDetails = v - return s -} - -// Represents the input of a GetPipelineExecution action. -type GetPipelineExecutionInput struct { - _ struct{} `type:"structure"` - - // The ID of the pipeline execution about which you want to get execution details. - // - // PipelineExecutionId is a required field - PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string" required:"true"` - - // The name of the pipeline about which you want to get execution details. - // - // PipelineName is a required field - PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPipelineExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPipelineExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPipelineExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPipelineExecutionInput"} - if s.PipelineExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineExecutionId")) - } - if s.PipelineName == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineName")) - } - if s.PipelineName != nil && len(*s.PipelineName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPipelineExecutionId sets the PipelineExecutionId field's value. -func (s *GetPipelineExecutionInput) SetPipelineExecutionId(v string) *GetPipelineExecutionInput { - s.PipelineExecutionId = &v - return s -} - -// SetPipelineName sets the PipelineName field's value. -func (s *GetPipelineExecutionInput) SetPipelineName(v string) *GetPipelineExecutionInput { - s.PipelineName = &v - return s -} - -// Represents the output of a GetPipelineExecution action. -type GetPipelineExecutionOutput struct { - _ struct{} `type:"structure"` - - // Represents information about the execution of a pipeline. - PipelineExecution *PipelineExecution `locationName:"pipelineExecution" type:"structure"` -} - -// String returns the string representation -func (s GetPipelineExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPipelineExecutionOutput) GoString() string { - return s.String() -} - -// SetPipelineExecution sets the PipelineExecution field's value. -func (s *GetPipelineExecutionOutput) SetPipelineExecution(v *PipelineExecution) *GetPipelineExecutionOutput { - s.PipelineExecution = v - return s -} - -// Represents the input of a GetPipeline action. -type GetPipelineInput struct { - _ struct{} `type:"structure"` - - // The name of the pipeline for which you want to get information. Pipeline - // names must be unique under an Amazon Web Services (AWS) user account. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The version number of the pipeline. If you do not specify a version, defaults - // to the most current version. - Version *int64 `locationName:"version" min:"1" type:"integer"` -} - -// String returns the string representation -func (s GetPipelineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPipelineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPipelineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPipelineInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Version != nil && *s.Version < 1 { - invalidParams.Add(request.NewErrParamMinValue("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetPipelineInput) SetName(v string) *GetPipelineInput { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetPipelineInput) SetVersion(v int64) *GetPipelineInput { - s.Version = &v - return s -} - -// Represents the output of a GetPipeline action. -type GetPipelineOutput struct { - _ struct{} `type:"structure"` - - // Represents the pipeline metadata information returned as part of the output - // of a GetPipeline action. - Metadata *PipelineMetadata `locationName:"metadata" type:"structure"` - - // Represents the structure of actions and stages to be performed in the pipeline. - Pipeline *PipelineDeclaration `locationName:"pipeline" type:"structure"` -} - -// String returns the string representation -func (s GetPipelineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPipelineOutput) GoString() string { - return s.String() -} - -// SetMetadata sets the Metadata field's value. -func (s *GetPipelineOutput) SetMetadata(v *PipelineMetadata) *GetPipelineOutput { - s.Metadata = v - return s -} - -// SetPipeline sets the Pipeline field's value. -func (s *GetPipelineOutput) SetPipeline(v *PipelineDeclaration) *GetPipelineOutput { - s.Pipeline = v - return s -} - -// Represents the input of a GetPipelineState action. -type GetPipelineStateInput struct { - _ struct{} `type:"structure"` - - // The name of the pipeline about which you want to get information. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPipelineStateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPipelineStateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPipelineStateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPipelineStateInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetPipelineStateInput) SetName(v string) *GetPipelineStateInput { - s.Name = &v - return s -} - -// Represents the output of a GetPipelineState action. -type GetPipelineStateOutput struct { - _ struct{} `type:"structure"` - - // The date and time the pipeline was created, in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp"` - - // The name of the pipeline for which you want to get the state. - PipelineName *string `locationName:"pipelineName" min:"1" type:"string"` - - // The version number of the pipeline. - // - // A newly-created pipeline is always assigned a version number of 1. - PipelineVersion *int64 `locationName:"pipelineVersion" min:"1" type:"integer"` - - // A list of the pipeline stage output information, including stage name, state, - // most recent run details, whether the stage is disabled, and other data. - StageStates []*StageState `locationName:"stageStates" type:"list"` - - // The date and time the pipeline was last updated, in timestamp format. - Updated *time.Time `locationName:"updated" type:"timestamp"` -} - -// String returns the string representation -func (s GetPipelineStateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPipelineStateOutput) GoString() string { - return s.String() -} - -// SetCreated sets the Created field's value. -func (s *GetPipelineStateOutput) SetCreated(v time.Time) *GetPipelineStateOutput { - s.Created = &v - return s -} - -// SetPipelineName sets the PipelineName field's value. -func (s *GetPipelineStateOutput) SetPipelineName(v string) *GetPipelineStateOutput { - s.PipelineName = &v - return s -} - -// SetPipelineVersion sets the PipelineVersion field's value. -func (s *GetPipelineStateOutput) SetPipelineVersion(v int64) *GetPipelineStateOutput { - s.PipelineVersion = &v - return s -} - -// SetStageStates sets the StageStates field's value. -func (s *GetPipelineStateOutput) SetStageStates(v []*StageState) *GetPipelineStateOutput { - s.StageStates = v - return s -} - -// SetUpdated sets the Updated field's value. -func (s *GetPipelineStateOutput) SetUpdated(v time.Time) *GetPipelineStateOutput { - s.Updated = &v - return s -} - -// Represents the input of a GetThirdPartyJobDetails action. -type GetThirdPartyJobDetailsInput struct { - _ struct{} `type:"structure"` - - // The clientToken portion of the clientId and clientToken pair used to verify - // that the calling entity is allowed access to the job and its details. - // - // ClientToken is a required field - ClientToken *string `locationName:"clientToken" min:"1" type:"string" required:"true"` - - // The unique system-generated ID used for identifying the job. - // - // JobId is a required field - JobId *string `locationName:"jobId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetThirdPartyJobDetailsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetThirdPartyJobDetailsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetThirdPartyJobDetailsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetThirdPartyJobDetailsInput"} - if s.ClientToken == nil { - invalidParams.Add(request.NewErrParamRequired("ClientToken")) - } - if s.ClientToken != nil && len(*s.ClientToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) - } - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *GetThirdPartyJobDetailsInput) SetClientToken(v string) *GetThirdPartyJobDetailsInput { - s.ClientToken = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *GetThirdPartyJobDetailsInput) SetJobId(v string) *GetThirdPartyJobDetailsInput { - s.JobId = &v - return s -} - -// Represents the output of a GetThirdPartyJobDetails action. -type GetThirdPartyJobDetailsOutput struct { - _ struct{} `type:"structure"` - - // The details of the job, including any protected values defined for the job. - JobDetails *ThirdPartyJobDetails `locationName:"jobDetails" type:"structure"` -} - -// String returns the string representation -func (s GetThirdPartyJobDetailsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetThirdPartyJobDetailsOutput) GoString() string { - return s.String() -} - -// SetJobDetails sets the JobDetails field's value. -func (s *GetThirdPartyJobDetailsOutput) SetJobDetails(v *ThirdPartyJobDetails) *GetThirdPartyJobDetailsOutput { - s.JobDetails = v - return s -} - -// Represents information about an artifact to be worked on, such as a test -// or build artifact. -type InputArtifact struct { - _ struct{} `type:"structure"` - - // The name of the artifact to be worked on, for example, "My App". - // - // The input artifact of an action must exactly match the output artifact declared - // in a preceding action, but the input artifact does not have to be the next - // action in strict sequence from the action that provided the output artifact. - // Actions in parallel can declare different output artifacts, which are in - // turn consumed by different following actions. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s InputArtifact) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputArtifact) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputArtifact) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputArtifact"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *InputArtifact) SetName(v string) *InputArtifact { - s.Name = &v - return s -} - -// Represents information about a job. -type Job struct { - _ struct{} `type:"structure"` - - // The ID of the AWS account to use when performing the job. - AccountId *string `locationName:"accountId" type:"string"` - - // Additional data about a job. - Data *JobData `locationName:"data" type:"structure"` - - // The unique system-generated ID of the job. - Id *string `locationName:"id" type:"string"` - - // A system-generated random number that AWS CodePipeline uses to ensure that - // the job is being worked on by only one job worker. Use this number in an - // AcknowledgeJob request. - Nonce *string `locationName:"nonce" min:"1" type:"string"` -} - -// String returns the string representation -func (s Job) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Job) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *Job) SetAccountId(v string) *Job { - s.AccountId = &v - return s -} - -// SetData sets the Data field's value. -func (s *Job) SetData(v *JobData) *Job { - s.Data = v - return s -} - -// SetId sets the Id field's value. -func (s *Job) SetId(v string) *Job { - s.Id = &v - return s -} - -// SetNonce sets the Nonce field's value. -func (s *Job) SetNonce(v string) *Job { - s.Nonce = &v - return s -} - -// Represents additional information about a job required for a job worker to -// complete the job. -type JobData struct { - _ struct{} `type:"structure"` - - // Represents information about an action configuration. - ActionConfiguration *ActionConfiguration `locationName:"actionConfiguration" type:"structure"` - - // Represents information about an action type. - ActionTypeId *ActionTypeId `locationName:"actionTypeId" type:"structure"` - - // Represents an AWS session credentials object. These credentials are temporary - // credentials that are issued by AWS Secure Token Service (STS). They can be - // used to access input and output artifacts in the Amazon S3 bucket used to - // store artifact for the pipeline in AWS CodePipeline. - ArtifactCredentials *AWSSessionCredentials `locationName:"artifactCredentials" type:"structure" sensitive:"true"` - - // A system-generated token, such as a AWS CodeDeploy deployment ID, that a - // job requires in order to continue the job asynchronously. - ContinuationToken *string `locationName:"continuationToken" min:"1" type:"string"` - - // Represents information about the key used to encrypt data in the artifact - // store, such as an AWS Key Management Service (AWS KMS) key. - EncryptionKey *EncryptionKey `locationName:"encryptionKey" type:"structure"` - - // The artifact supplied to the job. - InputArtifacts []*Artifact `locationName:"inputArtifacts" type:"list"` - - // The output of the job. - OutputArtifacts []*Artifact `locationName:"outputArtifacts" type:"list"` - - // Represents information about a pipeline to a job worker. - PipelineContext *PipelineContext `locationName:"pipelineContext" type:"structure"` -} - -// String returns the string representation -func (s JobData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobData) GoString() string { - return s.String() -} - -// SetActionConfiguration sets the ActionConfiguration field's value. -func (s *JobData) SetActionConfiguration(v *ActionConfiguration) *JobData { - s.ActionConfiguration = v - return s -} - -// SetActionTypeId sets the ActionTypeId field's value. -func (s *JobData) SetActionTypeId(v *ActionTypeId) *JobData { - s.ActionTypeId = v - return s -} - -// SetArtifactCredentials sets the ArtifactCredentials field's value. -func (s *JobData) SetArtifactCredentials(v *AWSSessionCredentials) *JobData { - s.ArtifactCredentials = v - return s -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *JobData) SetContinuationToken(v string) *JobData { - s.ContinuationToken = &v - return s -} - -// SetEncryptionKey sets the EncryptionKey field's value. -func (s *JobData) SetEncryptionKey(v *EncryptionKey) *JobData { - s.EncryptionKey = v - return s -} - -// SetInputArtifacts sets the InputArtifacts field's value. -func (s *JobData) SetInputArtifacts(v []*Artifact) *JobData { - s.InputArtifacts = v - return s -} - -// SetOutputArtifacts sets the OutputArtifacts field's value. -func (s *JobData) SetOutputArtifacts(v []*Artifact) *JobData { - s.OutputArtifacts = v - return s -} - -// SetPipelineContext sets the PipelineContext field's value. -func (s *JobData) SetPipelineContext(v *PipelineContext) *JobData { - s.PipelineContext = v - return s -} - -// Represents information about the details of a job. -type JobDetails struct { - _ struct{} `type:"structure"` - - // The AWS account ID associated with the job. - AccountId *string `locationName:"accountId" type:"string"` - - // Represents additional information about a job required for a job worker to - // complete the job. - Data *JobData `locationName:"data" type:"structure"` - - // The unique system-generated ID of the job. - Id *string `locationName:"id" type:"string"` -} - -// String returns the string representation -func (s JobDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobDetails) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *JobDetails) SetAccountId(v string) *JobDetails { - s.AccountId = &v - return s -} - -// SetData sets the Data field's value. -func (s *JobDetails) SetData(v *JobData) *JobDetails { - s.Data = v - return s -} - -// SetId sets the Id field's value. -func (s *JobDetails) SetId(v string) *JobDetails { - s.Id = &v - return s -} - -// Represents the input of a ListActionTypes action. -type ListActionTypesInput struct { - _ struct{} `type:"structure"` - - // Filters the list of action types to those created by a specified entity. - ActionOwnerFilter *string `locationName:"actionOwnerFilter" type:"string" enum:"ActionOwner"` - - // An identifier that was returned from the previous list action types call, - // which can be used to return the next set of action types in the list. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListActionTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListActionTypesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListActionTypesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListActionTypesInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionOwnerFilter sets the ActionOwnerFilter field's value. -func (s *ListActionTypesInput) SetActionOwnerFilter(v string) *ListActionTypesInput { - s.ActionOwnerFilter = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListActionTypesInput) SetNextToken(v string) *ListActionTypesInput { - s.NextToken = &v - return s -} - -// Represents the output of a ListActionTypes action. -type ListActionTypesOutput struct { - _ struct{} `type:"structure"` - - // Provides details of the action types. - // - // ActionTypes is a required field - ActionTypes []*ActionType `locationName:"actionTypes" type:"list" required:"true"` - - // If the amount of returned information is significantly large, an identifier - // is also returned which can be used in a subsequent list action types call - // to return the next set of action types in the list. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListActionTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListActionTypesOutput) GoString() string { - return s.String() -} - -// SetActionTypes sets the ActionTypes field's value. -func (s *ListActionTypesOutput) SetActionTypes(v []*ActionType) *ListActionTypesOutput { - s.ActionTypes = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListActionTypesOutput) SetNextToken(v string) *ListActionTypesOutput { - s.NextToken = &v - return s -} - -// Represents the input of a ListPipelineExecutions action. -type ListPipelineExecutionsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. The - // available pipeline execution history is limited to the most recent 12 months, - // based on pipeline execution start times. Default value is 100. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // The token that was returned from the previous ListPipelineExecutions call, - // which can be used to return the next set of pipeline executions in the list. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The name of the pipeline for which you want to get execution summary information. - // - // PipelineName is a required field - PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListPipelineExecutionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPipelineExecutionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPipelineExecutionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPipelineExecutionsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.PipelineName == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineName")) - } - if s.PipelineName != nil && len(*s.PipelineName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListPipelineExecutionsInput) SetMaxResults(v int64) *ListPipelineExecutionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPipelineExecutionsInput) SetNextToken(v string) *ListPipelineExecutionsInput { - s.NextToken = &v - return s -} - -// SetPipelineName sets the PipelineName field's value. -func (s *ListPipelineExecutionsInput) SetPipelineName(v string) *ListPipelineExecutionsInput { - s.PipelineName = &v - return s -} - -// Represents the output of a ListPipelineExecutions action. -type ListPipelineExecutionsOutput struct { - _ struct{} `type:"structure"` - - // A token that can be used in the next ListPipelineExecutions call. To view - // all items in the list, continue to call this operation with each subsequent - // token until no more nextToken values are returned. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // A list of executions in the history of a pipeline. - PipelineExecutionSummaries []*PipelineExecutionSummary `locationName:"pipelineExecutionSummaries" type:"list"` -} - -// String returns the string representation -func (s ListPipelineExecutionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPipelineExecutionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPipelineExecutionsOutput) SetNextToken(v string) *ListPipelineExecutionsOutput { - s.NextToken = &v - return s -} - -// SetPipelineExecutionSummaries sets the PipelineExecutionSummaries field's value. -func (s *ListPipelineExecutionsOutput) SetPipelineExecutionSummaries(v []*PipelineExecutionSummary) *ListPipelineExecutionsOutput { - s.PipelineExecutionSummaries = v - return s -} - -// Represents the input of a ListPipelines action. -type ListPipelinesInput struct { - _ struct{} `type:"structure"` - - // An identifier that was returned from the previous list pipelines call, which - // can be used to return the next set of pipelines in the list. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListPipelinesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPipelinesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPipelinesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPipelinesInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPipelinesInput) SetNextToken(v string) *ListPipelinesInput { - s.NextToken = &v - return s -} - -// Represents the output of a ListPipelines action. -type ListPipelinesOutput struct { - _ struct{} `type:"structure"` - - // If the amount of returned information is significantly large, an identifier - // is also returned which can be used in a subsequent list pipelines call to - // return the next set of pipelines in the list. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The list of pipelines. - Pipelines []*PipelineSummary `locationName:"pipelines" type:"list"` -} - -// String returns the string representation -func (s ListPipelinesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPipelinesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPipelinesOutput) SetNextToken(v string) *ListPipelinesOutput { - s.NextToken = &v - return s -} - -// SetPipelines sets the Pipelines field's value. -func (s *ListPipelinesOutput) SetPipelines(v []*PipelineSummary) *ListPipelinesOutput { - s.Pipelines = v - return s -} - -// The detail returned for each webhook after listing webhooks, such as the -// webhook URL, the webhook name, and the webhook ARN. -type ListWebhookItem struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the webhook. - Arn *string `locationName:"arn" type:"string"` - - // The detail returned for each webhook, such as the webhook authentication - // type and filter rules. - // - // Definition is a required field - Definition *WebhookDefinition `locationName:"definition" type:"structure" required:"true"` - - // The number code of the error. - ErrorCode *string `locationName:"errorCode" type:"string"` - - // The text of the error message about the webhook. - ErrorMessage *string `locationName:"errorMessage" type:"string"` - - // The date and time a webhook was last successfully triggered, in timestamp - // format. - LastTriggered *time.Time `locationName:"lastTriggered" type:"timestamp"` - - // A unique URL generated by CodePipeline. When a POST request is made to this - // URL, the defined pipeline is started as long as the body of the post request - // satisfies the defined authentication and filtering conditions. Deleting and - // re-creating a webhook will make the old URL invalid and generate a new URL. - // - // Url is a required field - Url *string `locationName:"url" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListWebhookItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListWebhookItem) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ListWebhookItem) SetArn(v string) *ListWebhookItem { - s.Arn = &v - return s -} - -// SetDefinition sets the Definition field's value. -func (s *ListWebhookItem) SetDefinition(v *WebhookDefinition) *ListWebhookItem { - s.Definition = v - return s -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *ListWebhookItem) SetErrorCode(v string) *ListWebhookItem { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *ListWebhookItem) SetErrorMessage(v string) *ListWebhookItem { - s.ErrorMessage = &v - return s -} - -// SetLastTriggered sets the LastTriggered field's value. -func (s *ListWebhookItem) SetLastTriggered(v time.Time) *ListWebhookItem { - s.LastTriggered = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *ListWebhookItem) SetUrl(v string) *ListWebhookItem { - s.Url = &v - return s -} - -type ListWebhooksInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `min:"1" type:"integer"` - - // The token that was returned from the previous ListWebhooks call, which can - // be used to return the next set of webhooks in the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListWebhooksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListWebhooksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListWebhooksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListWebhooksInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListWebhooksInput) SetMaxResults(v int64) *ListWebhooksInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListWebhooksInput) SetNextToken(v string) *ListWebhooksInput { - s.NextToken = &v - return s -} - -type ListWebhooksOutput struct { - _ struct{} `type:"structure"` - - // If the amount of returned information is significantly large, an identifier - // is also returned and can be used in a subsequent ListWebhooks call to return - // the next set of webhooks in the list. - NextToken *string `min:"1" type:"string"` - - // The JSON detail returned for each webhook in the list output for the ListWebhooks - // call. - Webhooks []*ListWebhookItem `locationName:"webhooks" type:"list"` -} - -// String returns the string representation -func (s ListWebhooksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListWebhooksOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListWebhooksOutput) SetNextToken(v string) *ListWebhooksOutput { - s.NextToken = &v - return s -} - -// SetWebhooks sets the Webhooks field's value. -func (s *ListWebhooksOutput) SetWebhooks(v []*ListWebhookItem) *ListWebhooksOutput { - s.Webhooks = v - return s -} - -// Represents information about the output of an action. -type OutputArtifact struct { - _ struct{} `type:"structure"` - - // The name of the output of an artifact, such as "My App". - // - // The input artifact of an action must exactly match the output artifact declared - // in a preceding action, but the input artifact does not have to be the next - // action in strict sequence from the action that provided the output artifact. - // Actions in parallel can declare different output artifacts, which are in - // turn consumed by different following actions. - // - // Output artifact names must be unique within a pipeline. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s OutputArtifact) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputArtifact) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OutputArtifact) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OutputArtifact"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *OutputArtifact) SetName(v string) *OutputArtifact { - s.Name = &v - return s -} - -// Represents information about a pipeline to a job worker. -type PipelineContext struct { - _ struct{} `type:"structure"` - - // The context of an action to a job worker within the stage of a pipeline. - Action *ActionContext `locationName:"action" type:"structure"` - - // The name of the pipeline. This is a user-specified value. Pipeline names - // must be unique across all pipeline names under an Amazon Web Services account. - PipelineName *string `locationName:"pipelineName" min:"1" type:"string"` - - // The stage of the pipeline. - Stage *StageContext `locationName:"stage" type:"structure"` -} - -// String returns the string representation -func (s PipelineContext) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PipelineContext) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *PipelineContext) SetAction(v *ActionContext) *PipelineContext { - s.Action = v - return s -} - -// SetPipelineName sets the PipelineName field's value. -func (s *PipelineContext) SetPipelineName(v string) *PipelineContext { - s.PipelineName = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *PipelineContext) SetStage(v *StageContext) *PipelineContext { - s.Stage = v - return s -} - -// Represents the structure of actions and stages to be performed in the pipeline. -type PipelineDeclaration struct { - _ struct{} `type:"structure"` - - // Represents information about the Amazon S3 bucket where artifacts are stored - // for the pipeline. - ArtifactStore *ArtifactStore `locationName:"artifactStore" type:"structure"` - - // A mapping of artifactStore objects and their corresponding regions. There - // must be an artifact store for the pipeline region and for each cross-region - // action within the pipeline. You can only use either artifactStore or artifactStores, - // not both. - // - // If you create a cross-region action in your pipeline, you must use artifactStores. - ArtifactStores map[string]*ArtifactStore `locationName:"artifactStores" type:"map"` - - // The name of the action to be performed. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) for AWS CodePipeline to use to either perform - // actions with no actionRoleArn, or to use to assume roles for actions with - // an actionRoleArn. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` - - // The stage in which to perform the action. - // - // Stages is a required field - Stages []*StageDeclaration `locationName:"stages" type:"list" required:"true"` - - // The version number of the pipeline. A new pipeline always has a version number - // of 1. This number is automatically incremented when a pipeline is updated. - Version *int64 `locationName:"version" min:"1" type:"integer"` -} - -// String returns the string representation -func (s PipelineDeclaration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PipelineDeclaration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PipelineDeclaration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PipelineDeclaration"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.Stages == nil { - invalidParams.Add(request.NewErrParamRequired("Stages")) - } - if s.Version != nil && *s.Version < 1 { - invalidParams.Add(request.NewErrParamMinValue("Version", 1)) - } - if s.ArtifactStore != nil { - if err := s.ArtifactStore.Validate(); err != nil { - invalidParams.AddNested("ArtifactStore", err.(request.ErrInvalidParams)) - } - } - if s.ArtifactStores != nil { - for i, v := range s.ArtifactStores { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ArtifactStores", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Stages != nil { - for i, v := range s.Stages { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Stages", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArtifactStore sets the ArtifactStore field's value. -func (s *PipelineDeclaration) SetArtifactStore(v *ArtifactStore) *PipelineDeclaration { - s.ArtifactStore = v - return s -} - -// SetArtifactStores sets the ArtifactStores field's value. -func (s *PipelineDeclaration) SetArtifactStores(v map[string]*ArtifactStore) *PipelineDeclaration { - s.ArtifactStores = v - return s -} - -// SetName sets the Name field's value. -func (s *PipelineDeclaration) SetName(v string) *PipelineDeclaration { - s.Name = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *PipelineDeclaration) SetRoleArn(v string) *PipelineDeclaration { - s.RoleArn = &v - return s -} - -// SetStages sets the Stages field's value. -func (s *PipelineDeclaration) SetStages(v []*StageDeclaration) *PipelineDeclaration { - s.Stages = v - return s -} - -// SetVersion sets the Version field's value. -func (s *PipelineDeclaration) SetVersion(v int64) *PipelineDeclaration { - s.Version = &v - return s -} - -// Represents information about an execution of a pipeline. -type PipelineExecution struct { - _ struct{} `type:"structure"` - - // A list of ArtifactRevision objects included in a pipeline execution. - ArtifactRevisions []*ArtifactRevision `locationName:"artifactRevisions" type:"list"` - - // The ID of the pipeline execution. - PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string"` - - // The name of the pipeline that was executed. - PipelineName *string `locationName:"pipelineName" min:"1" type:"string"` - - // The version number of the pipeline that was executed. - PipelineVersion *int64 `locationName:"pipelineVersion" min:"1" type:"integer"` - - // The status of the pipeline execution. - // - // * InProgress: The pipeline execution is currently running. - // - // * Succeeded: The pipeline execution was completed successfully. - // - // * Superseded: While this pipeline execution was waiting for the next stage - // to be completed, a newer pipeline execution advanced and continued through - // the pipeline instead. - // - // * Failed: The pipeline execution was not completed successfully. - Status *string `locationName:"status" type:"string" enum:"PipelineExecutionStatus"` -} - -// String returns the string representation -func (s PipelineExecution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PipelineExecution) GoString() string { - return s.String() -} - -// SetArtifactRevisions sets the ArtifactRevisions field's value. -func (s *PipelineExecution) SetArtifactRevisions(v []*ArtifactRevision) *PipelineExecution { - s.ArtifactRevisions = v - return s -} - -// SetPipelineExecutionId sets the PipelineExecutionId field's value. -func (s *PipelineExecution) SetPipelineExecutionId(v string) *PipelineExecution { - s.PipelineExecutionId = &v - return s -} - -// SetPipelineName sets the PipelineName field's value. -func (s *PipelineExecution) SetPipelineName(v string) *PipelineExecution { - s.PipelineName = &v - return s -} - -// SetPipelineVersion sets the PipelineVersion field's value. -func (s *PipelineExecution) SetPipelineVersion(v int64) *PipelineExecution { - s.PipelineVersion = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *PipelineExecution) SetStatus(v string) *PipelineExecution { - s.Status = &v - return s -} - -// Summary information about a pipeline execution. -type PipelineExecutionSummary struct { - _ struct{} `type:"structure"` - - // The date and time of the last change to the pipeline execution, in timestamp - // format. - LastUpdateTime *time.Time `locationName:"lastUpdateTime" type:"timestamp"` - - // The ID of the pipeline execution. - PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string"` - - // A list of the source artifact revisions that initiated a pipeline execution. - SourceRevisions []*SourceRevision `locationName:"sourceRevisions" type:"list"` - - // The date and time when the pipeline execution began, in timestamp format. - StartTime *time.Time `locationName:"startTime" type:"timestamp"` - - // The status of the pipeline execution. - // - // * InProgress: The pipeline execution is currently running. - // - // * Succeeded: The pipeline execution was completed successfully. - // - // * Superseded: While this pipeline execution was waiting for the next stage - // to be completed, a newer pipeline execution advanced and continued through - // the pipeline instead. - // - // * Failed: The pipeline execution was not completed successfully. - Status *string `locationName:"status" type:"string" enum:"PipelineExecutionStatus"` -} - -// String returns the string representation -func (s PipelineExecutionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PipelineExecutionSummary) GoString() string { - return s.String() -} - -// SetLastUpdateTime sets the LastUpdateTime field's value. -func (s *PipelineExecutionSummary) SetLastUpdateTime(v time.Time) *PipelineExecutionSummary { - s.LastUpdateTime = &v - return s -} - -// SetPipelineExecutionId sets the PipelineExecutionId field's value. -func (s *PipelineExecutionSummary) SetPipelineExecutionId(v string) *PipelineExecutionSummary { - s.PipelineExecutionId = &v - return s -} - -// SetSourceRevisions sets the SourceRevisions field's value. -func (s *PipelineExecutionSummary) SetSourceRevisions(v []*SourceRevision) *PipelineExecutionSummary { - s.SourceRevisions = v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *PipelineExecutionSummary) SetStartTime(v time.Time) *PipelineExecutionSummary { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *PipelineExecutionSummary) SetStatus(v string) *PipelineExecutionSummary { - s.Status = &v - return s -} - -// Information about a pipeline. -type PipelineMetadata struct { - _ struct{} `type:"structure"` - - // The date and time the pipeline was created, in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp"` - - // The Amazon Resource Name (ARN) of the pipeline. - PipelineArn *string `locationName:"pipelineArn" type:"string"` - - // The date and time the pipeline was last updated, in timestamp format. - Updated *time.Time `locationName:"updated" type:"timestamp"` -} - -// String returns the string representation -func (s PipelineMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PipelineMetadata) GoString() string { - return s.String() -} - -// SetCreated sets the Created field's value. -func (s *PipelineMetadata) SetCreated(v time.Time) *PipelineMetadata { - s.Created = &v - return s -} - -// SetPipelineArn sets the PipelineArn field's value. -func (s *PipelineMetadata) SetPipelineArn(v string) *PipelineMetadata { - s.PipelineArn = &v - return s -} - -// SetUpdated sets the Updated field's value. -func (s *PipelineMetadata) SetUpdated(v time.Time) *PipelineMetadata { - s.Updated = &v - return s -} - -// Returns a summary of a pipeline. -type PipelineSummary struct { - _ struct{} `type:"structure"` - - // The date and time the pipeline was created, in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp"` - - // The name of the pipeline. - Name *string `locationName:"name" min:"1" type:"string"` - - // The date and time of the last update to the pipeline, in timestamp format. - Updated *time.Time `locationName:"updated" type:"timestamp"` - - // The version number of the pipeline. - Version *int64 `locationName:"version" min:"1" type:"integer"` -} - -// String returns the string representation -func (s PipelineSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PipelineSummary) GoString() string { - return s.String() -} - -// SetCreated sets the Created field's value. -func (s *PipelineSummary) SetCreated(v time.Time) *PipelineSummary { - s.Created = &v - return s -} - -// SetName sets the Name field's value. -func (s *PipelineSummary) SetName(v string) *PipelineSummary { - s.Name = &v - return s -} - -// SetUpdated sets the Updated field's value. -func (s *PipelineSummary) SetUpdated(v time.Time) *PipelineSummary { - s.Updated = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *PipelineSummary) SetVersion(v int64) *PipelineSummary { - s.Version = &v - return s -} - -// Represents the input of a PollForJobs action. -type PollForJobsInput struct { - _ struct{} `type:"structure"` - - // Represents information about an action type. - // - // ActionTypeId is a required field - ActionTypeId *ActionTypeId `locationName:"actionTypeId" type:"structure" required:"true"` - - // The maximum number of jobs to return in a poll for jobs call. - MaxBatchSize *int64 `locationName:"maxBatchSize" min:"1" type:"integer"` - - // A map of property names and values. For an action type with no queryable - // properties, this value must be null or an empty map. For an action type with - // a queryable property, you must supply that property as a key in the map. - // Only jobs whose action configuration matches the mapped value will be returned. - QueryParam map[string]*string `locationName:"queryParam" type:"map"` -} - -// String returns the string representation -func (s PollForJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PollForJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PollForJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PollForJobsInput"} - if s.ActionTypeId == nil { - invalidParams.Add(request.NewErrParamRequired("ActionTypeId")) - } - if s.MaxBatchSize != nil && *s.MaxBatchSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxBatchSize", 1)) - } - if s.ActionTypeId != nil { - if err := s.ActionTypeId.Validate(); err != nil { - invalidParams.AddNested("ActionTypeId", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionTypeId sets the ActionTypeId field's value. -func (s *PollForJobsInput) SetActionTypeId(v *ActionTypeId) *PollForJobsInput { - s.ActionTypeId = v - return s -} - -// SetMaxBatchSize sets the MaxBatchSize field's value. -func (s *PollForJobsInput) SetMaxBatchSize(v int64) *PollForJobsInput { - s.MaxBatchSize = &v - return s -} - -// SetQueryParam sets the QueryParam field's value. -func (s *PollForJobsInput) SetQueryParam(v map[string]*string) *PollForJobsInput { - s.QueryParam = v - return s -} - -// Represents the output of a PollForJobs action. -type PollForJobsOutput struct { - _ struct{} `type:"structure"` - - // Information about the jobs to take action on. - Jobs []*Job `locationName:"jobs" type:"list"` -} - -// String returns the string representation -func (s PollForJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PollForJobsOutput) GoString() string { - return s.String() -} - -// SetJobs sets the Jobs field's value. -func (s *PollForJobsOutput) SetJobs(v []*Job) *PollForJobsOutput { - s.Jobs = v - return s -} - -// Represents the input of a PollForThirdPartyJobs action. -type PollForThirdPartyJobsInput struct { - _ struct{} `type:"structure"` - - // Represents information about an action type. - // - // ActionTypeId is a required field - ActionTypeId *ActionTypeId `locationName:"actionTypeId" type:"structure" required:"true"` - - // The maximum number of jobs to return in a poll for jobs call. - MaxBatchSize *int64 `locationName:"maxBatchSize" min:"1" type:"integer"` -} - -// String returns the string representation -func (s PollForThirdPartyJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PollForThirdPartyJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PollForThirdPartyJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PollForThirdPartyJobsInput"} - if s.ActionTypeId == nil { - invalidParams.Add(request.NewErrParamRequired("ActionTypeId")) - } - if s.MaxBatchSize != nil && *s.MaxBatchSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxBatchSize", 1)) - } - if s.ActionTypeId != nil { - if err := s.ActionTypeId.Validate(); err != nil { - invalidParams.AddNested("ActionTypeId", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionTypeId sets the ActionTypeId field's value. -func (s *PollForThirdPartyJobsInput) SetActionTypeId(v *ActionTypeId) *PollForThirdPartyJobsInput { - s.ActionTypeId = v - return s -} - -// SetMaxBatchSize sets the MaxBatchSize field's value. -func (s *PollForThirdPartyJobsInput) SetMaxBatchSize(v int64) *PollForThirdPartyJobsInput { - s.MaxBatchSize = &v - return s -} - -// Represents the output of a PollForThirdPartyJobs action. -type PollForThirdPartyJobsOutput struct { - _ struct{} `type:"structure"` - - // Information about the jobs to take action on. - Jobs []*ThirdPartyJob `locationName:"jobs" type:"list"` -} - -// String returns the string representation -func (s PollForThirdPartyJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PollForThirdPartyJobsOutput) GoString() string { - return s.String() -} - -// SetJobs sets the Jobs field's value. -func (s *PollForThirdPartyJobsOutput) SetJobs(v []*ThirdPartyJob) *PollForThirdPartyJobsOutput { - s.Jobs = v - return s -} - -// Represents the input of a PutActionRevision action. -type PutActionRevisionInput struct { - _ struct{} `type:"structure"` - - // The name of the action that will process the revision. - // - // ActionName is a required field - ActionName *string `locationName:"actionName" min:"1" type:"string" required:"true"` - - // Represents information about the version (or revision) of an action. - // - // ActionRevision is a required field - ActionRevision *ActionRevision `locationName:"actionRevision" type:"structure" required:"true"` - - // The name of the pipeline that will start processing the revision to the source. - // - // PipelineName is a required field - PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` - - // The name of the stage that contains the action that will act upon the revision. - // - // StageName is a required field - StageName *string `locationName:"stageName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutActionRevisionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutActionRevisionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutActionRevisionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutActionRevisionInput"} - if s.ActionName == nil { - invalidParams.Add(request.NewErrParamRequired("ActionName")) - } - if s.ActionName != nil && len(*s.ActionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ActionName", 1)) - } - if s.ActionRevision == nil { - invalidParams.Add(request.NewErrParamRequired("ActionRevision")) - } - if s.PipelineName == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineName")) - } - if s.PipelineName != nil && len(*s.PipelineName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - if s.ActionRevision != nil { - if err := s.ActionRevision.Validate(); err != nil { - invalidParams.AddNested("ActionRevision", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionName sets the ActionName field's value. -func (s *PutActionRevisionInput) SetActionName(v string) *PutActionRevisionInput { - s.ActionName = &v - return s -} - -// SetActionRevision sets the ActionRevision field's value. -func (s *PutActionRevisionInput) SetActionRevision(v *ActionRevision) *PutActionRevisionInput { - s.ActionRevision = v - return s -} - -// SetPipelineName sets the PipelineName field's value. -func (s *PutActionRevisionInput) SetPipelineName(v string) *PutActionRevisionInput { - s.PipelineName = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *PutActionRevisionInput) SetStageName(v string) *PutActionRevisionInput { - s.StageName = &v - return s -} - -// Represents the output of a PutActionRevision action. -type PutActionRevisionOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether the artifact revision was previously used in an execution - // of the specified pipeline. - NewRevision *bool `locationName:"newRevision" type:"boolean"` - - // The ID of the current workflow state of the pipeline. - PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string"` -} - -// String returns the string representation -func (s PutActionRevisionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutActionRevisionOutput) GoString() string { - return s.String() -} - -// SetNewRevision sets the NewRevision field's value. -func (s *PutActionRevisionOutput) SetNewRevision(v bool) *PutActionRevisionOutput { - s.NewRevision = &v - return s -} - -// SetPipelineExecutionId sets the PipelineExecutionId field's value. -func (s *PutActionRevisionOutput) SetPipelineExecutionId(v string) *PutActionRevisionOutput { - s.PipelineExecutionId = &v - return s -} - -// Represents the input of a PutApprovalResult action. -type PutApprovalResultInput struct { - _ struct{} `type:"structure"` - - // The name of the action for which approval is requested. - // - // ActionName is a required field - ActionName *string `locationName:"actionName" min:"1" type:"string" required:"true"` - - // The name of the pipeline that contains the action. - // - // PipelineName is a required field - PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` - - // Represents information about the result of the approval request. - // - // Result is a required field - Result *ApprovalResult `locationName:"result" type:"structure" required:"true"` - - // The name of the stage that contains the action. - // - // StageName is a required field - StageName *string `locationName:"stageName" min:"1" type:"string" required:"true"` - - // The system-generated token used to identify a unique approval request. The - // token for each open approval request can be obtained using the GetPipelineState - // action and is used to validate that the approval request corresponding to - // this token is still valid. - // - // Token is a required field - Token *string `locationName:"token" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutApprovalResultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutApprovalResultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutApprovalResultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutApprovalResultInput"} - if s.ActionName == nil { - invalidParams.Add(request.NewErrParamRequired("ActionName")) - } - if s.ActionName != nil && len(*s.ActionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ActionName", 1)) - } - if s.PipelineName == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineName")) - } - if s.PipelineName != nil && len(*s.PipelineName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) - } - if s.Result == nil { - invalidParams.Add(request.NewErrParamRequired("Result")) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - if s.Token == nil { - invalidParams.Add(request.NewErrParamRequired("Token")) - } - if s.Result != nil { - if err := s.Result.Validate(); err != nil { - invalidParams.AddNested("Result", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionName sets the ActionName field's value. -func (s *PutApprovalResultInput) SetActionName(v string) *PutApprovalResultInput { - s.ActionName = &v - return s -} - -// SetPipelineName sets the PipelineName field's value. -func (s *PutApprovalResultInput) SetPipelineName(v string) *PutApprovalResultInput { - s.PipelineName = &v - return s -} - -// SetResult sets the Result field's value. -func (s *PutApprovalResultInput) SetResult(v *ApprovalResult) *PutApprovalResultInput { - s.Result = v - return s -} - -// SetStageName sets the StageName field's value. -func (s *PutApprovalResultInput) SetStageName(v string) *PutApprovalResultInput { - s.StageName = &v - return s -} - -// SetToken sets the Token field's value. -func (s *PutApprovalResultInput) SetToken(v string) *PutApprovalResultInput { - s.Token = &v - return s -} - -// Represents the output of a PutApprovalResult action. -type PutApprovalResultOutput struct { - _ struct{} `type:"structure"` - - // The timestamp showing when the approval or rejection was submitted. - ApprovedAt *time.Time `locationName:"approvedAt" type:"timestamp"` -} - -// String returns the string representation -func (s PutApprovalResultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutApprovalResultOutput) GoString() string { - return s.String() -} - -// SetApprovedAt sets the ApprovedAt field's value. -func (s *PutApprovalResultOutput) SetApprovedAt(v time.Time) *PutApprovalResultOutput { - s.ApprovedAt = &v - return s -} - -// Represents the input of a PutJobFailureResult action. -type PutJobFailureResultInput struct { - _ struct{} `type:"structure"` - - // The details about the failure of a job. - // - // FailureDetails is a required field - FailureDetails *FailureDetails `locationName:"failureDetails" type:"structure" required:"true"` - - // The unique system-generated ID of the job that failed. This is the same ID - // returned from PollForJobs. - // - // JobId is a required field - JobId *string `locationName:"jobId" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutJobFailureResultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutJobFailureResultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutJobFailureResultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutJobFailureResultInput"} - if s.FailureDetails == nil { - invalidParams.Add(request.NewErrParamRequired("FailureDetails")) - } - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.FailureDetails != nil { - if err := s.FailureDetails.Validate(); err != nil { - invalidParams.AddNested("FailureDetails", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFailureDetails sets the FailureDetails field's value. -func (s *PutJobFailureResultInput) SetFailureDetails(v *FailureDetails) *PutJobFailureResultInput { - s.FailureDetails = v - return s -} - -// SetJobId sets the JobId field's value. -func (s *PutJobFailureResultInput) SetJobId(v string) *PutJobFailureResultInput { - s.JobId = &v - return s -} - -type PutJobFailureResultOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutJobFailureResultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutJobFailureResultOutput) GoString() string { - return s.String() -} - -// Represents the input of a PutJobSuccessResult action. -type PutJobSuccessResultInput struct { - _ struct{} `type:"structure"` - - // A token generated by a job worker, such as an AWS CodeDeploy deployment ID, - // that a successful job provides to identify a custom action in progress. Future - // jobs will use this token in order to identify the running instance of the - // action. It can be reused to return additional information about the progress - // of the custom action. When the action is complete, no continuation token - // should be supplied. - ContinuationToken *string `locationName:"continuationToken" min:"1" type:"string"` - - // The ID of the current revision of the artifact successfully worked upon by - // the job. - CurrentRevision *CurrentRevision `locationName:"currentRevision" type:"structure"` - - // The execution details of the successful job, such as the actions taken by - // the job worker. - ExecutionDetails *ExecutionDetails `locationName:"executionDetails" type:"structure"` - - // The unique system-generated ID of the job that succeeded. This is the same - // ID returned from PollForJobs. - // - // JobId is a required field - JobId *string `locationName:"jobId" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutJobSuccessResultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutJobSuccessResultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutJobSuccessResultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutJobSuccessResultInput"} - if s.ContinuationToken != nil && len(*s.ContinuationToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ContinuationToken", 1)) - } - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.CurrentRevision != nil { - if err := s.CurrentRevision.Validate(); err != nil { - invalidParams.AddNested("CurrentRevision", err.(request.ErrInvalidParams)) - } - } - if s.ExecutionDetails != nil { - if err := s.ExecutionDetails.Validate(); err != nil { - invalidParams.AddNested("ExecutionDetails", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *PutJobSuccessResultInput) SetContinuationToken(v string) *PutJobSuccessResultInput { - s.ContinuationToken = &v - return s -} - -// SetCurrentRevision sets the CurrentRevision field's value. -func (s *PutJobSuccessResultInput) SetCurrentRevision(v *CurrentRevision) *PutJobSuccessResultInput { - s.CurrentRevision = v - return s -} - -// SetExecutionDetails sets the ExecutionDetails field's value. -func (s *PutJobSuccessResultInput) SetExecutionDetails(v *ExecutionDetails) *PutJobSuccessResultInput { - s.ExecutionDetails = v - return s -} - -// SetJobId sets the JobId field's value. -func (s *PutJobSuccessResultInput) SetJobId(v string) *PutJobSuccessResultInput { - s.JobId = &v - return s -} - -type PutJobSuccessResultOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutJobSuccessResultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutJobSuccessResultOutput) GoString() string { - return s.String() -} - -// Represents the input of a PutThirdPartyJobFailureResult action. -type PutThirdPartyJobFailureResultInput struct { - _ struct{} `type:"structure"` - - // The clientToken portion of the clientId and clientToken pair used to verify - // that the calling entity is allowed access to the job and its details. - // - // ClientToken is a required field - ClientToken *string `locationName:"clientToken" min:"1" type:"string" required:"true"` - - // Represents information about failure details. - // - // FailureDetails is a required field - FailureDetails *FailureDetails `locationName:"failureDetails" type:"structure" required:"true"` - - // The ID of the job that failed. This is the same ID returned from PollForThirdPartyJobs. - // - // JobId is a required field - JobId *string `locationName:"jobId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutThirdPartyJobFailureResultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutThirdPartyJobFailureResultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutThirdPartyJobFailureResultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutThirdPartyJobFailureResultInput"} - if s.ClientToken == nil { - invalidParams.Add(request.NewErrParamRequired("ClientToken")) - } - if s.ClientToken != nil && len(*s.ClientToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) - } - if s.FailureDetails == nil { - invalidParams.Add(request.NewErrParamRequired("FailureDetails")) - } - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - if s.FailureDetails != nil { - if err := s.FailureDetails.Validate(); err != nil { - invalidParams.AddNested("FailureDetails", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *PutThirdPartyJobFailureResultInput) SetClientToken(v string) *PutThirdPartyJobFailureResultInput { - s.ClientToken = &v - return s -} - -// SetFailureDetails sets the FailureDetails field's value. -func (s *PutThirdPartyJobFailureResultInput) SetFailureDetails(v *FailureDetails) *PutThirdPartyJobFailureResultInput { - s.FailureDetails = v - return s -} - -// SetJobId sets the JobId field's value. -func (s *PutThirdPartyJobFailureResultInput) SetJobId(v string) *PutThirdPartyJobFailureResultInput { - s.JobId = &v - return s -} - -type PutThirdPartyJobFailureResultOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutThirdPartyJobFailureResultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutThirdPartyJobFailureResultOutput) GoString() string { - return s.String() -} - -// Represents the input of a PutThirdPartyJobSuccessResult action. -type PutThirdPartyJobSuccessResultInput struct { - _ struct{} `type:"structure"` - - // The clientToken portion of the clientId and clientToken pair used to verify - // that the calling entity is allowed access to the job and its details. - // - // ClientToken is a required field - ClientToken *string `locationName:"clientToken" min:"1" type:"string" required:"true"` - - // A token generated by a job worker, such as an AWS CodeDeploy deployment ID, - // that a successful job provides to identify a partner action in progress. - // Future jobs will use this token in order to identify the running instance - // of the action. It can be reused to return additional information about the - // progress of the partner action. When the action is complete, no continuation - // token should be supplied. - ContinuationToken *string `locationName:"continuationToken" min:"1" type:"string"` - - // Represents information about a current revision. - CurrentRevision *CurrentRevision `locationName:"currentRevision" type:"structure"` - - // The details of the actions taken and results produced on an artifact as it - // passes through stages in the pipeline. - ExecutionDetails *ExecutionDetails `locationName:"executionDetails" type:"structure"` - - // The ID of the job that successfully completed. This is the same ID returned - // from PollForThirdPartyJobs. - // - // JobId is a required field - JobId *string `locationName:"jobId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutThirdPartyJobSuccessResultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutThirdPartyJobSuccessResultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutThirdPartyJobSuccessResultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutThirdPartyJobSuccessResultInput"} - if s.ClientToken == nil { - invalidParams.Add(request.NewErrParamRequired("ClientToken")) - } - if s.ClientToken != nil && len(*s.ClientToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) - } - if s.ContinuationToken != nil && len(*s.ContinuationToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ContinuationToken", 1)) - } - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - if s.CurrentRevision != nil { - if err := s.CurrentRevision.Validate(); err != nil { - invalidParams.AddNested("CurrentRevision", err.(request.ErrInvalidParams)) - } - } - if s.ExecutionDetails != nil { - if err := s.ExecutionDetails.Validate(); err != nil { - invalidParams.AddNested("ExecutionDetails", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *PutThirdPartyJobSuccessResultInput) SetClientToken(v string) *PutThirdPartyJobSuccessResultInput { - s.ClientToken = &v - return s -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *PutThirdPartyJobSuccessResultInput) SetContinuationToken(v string) *PutThirdPartyJobSuccessResultInput { - s.ContinuationToken = &v - return s -} - -// SetCurrentRevision sets the CurrentRevision field's value. -func (s *PutThirdPartyJobSuccessResultInput) SetCurrentRevision(v *CurrentRevision) *PutThirdPartyJobSuccessResultInput { - s.CurrentRevision = v - return s -} - -// SetExecutionDetails sets the ExecutionDetails field's value. -func (s *PutThirdPartyJobSuccessResultInput) SetExecutionDetails(v *ExecutionDetails) *PutThirdPartyJobSuccessResultInput { - s.ExecutionDetails = v - return s -} - -// SetJobId sets the JobId field's value. -func (s *PutThirdPartyJobSuccessResultInput) SetJobId(v string) *PutThirdPartyJobSuccessResultInput { - s.JobId = &v - return s -} - -type PutThirdPartyJobSuccessResultOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutThirdPartyJobSuccessResultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutThirdPartyJobSuccessResultOutput) GoString() string { - return s.String() -} - -type PutWebhookInput struct { - _ struct{} `type:"structure"` - - // The detail provided in an input file to create the webhook, such as the webhook - // name, the pipeline name, and the action name. Give the webhook a unique name - // which identifies the webhook being defined. You may choose to name the webhook - // after the pipeline and action it targets so that you can easily recognize - // what it's used for later. - // - // Webhook is a required field - Webhook *WebhookDefinition `locationName:"webhook" type:"structure" required:"true"` -} - -// String returns the string representation -func (s PutWebhookInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutWebhookInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutWebhookInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutWebhookInput"} - if s.Webhook == nil { - invalidParams.Add(request.NewErrParamRequired("Webhook")) - } - if s.Webhook != nil { - if err := s.Webhook.Validate(); err != nil { - invalidParams.AddNested("Webhook", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWebhook sets the Webhook field's value. -func (s *PutWebhookInput) SetWebhook(v *WebhookDefinition) *PutWebhookInput { - s.Webhook = v - return s -} - -type PutWebhookOutput struct { - _ struct{} `type:"structure"` - - // The detail returned from creating the webhook, such as the webhook name, - // webhook URL, and webhook ARN. - Webhook *ListWebhookItem `locationName:"webhook" type:"structure"` -} - -// String returns the string representation -func (s PutWebhookOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutWebhookOutput) GoString() string { - return s.String() -} - -// SetWebhook sets the Webhook field's value. -func (s *PutWebhookOutput) SetWebhook(v *ListWebhookItem) *PutWebhookOutput { - s.Webhook = v - return s -} - -type RegisterWebhookWithThirdPartyInput struct { - _ struct{} `type:"structure"` - - // The name of an existing webhook created with PutWebhook to register with - // a supported third party. - WebhookName *string `locationName:"webhookName" min:"1" type:"string"` -} - -// String returns the string representation -func (s RegisterWebhookWithThirdPartyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterWebhookWithThirdPartyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterWebhookWithThirdPartyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterWebhookWithThirdPartyInput"} - if s.WebhookName != nil && len(*s.WebhookName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WebhookName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWebhookName sets the WebhookName field's value. -func (s *RegisterWebhookWithThirdPartyInput) SetWebhookName(v string) *RegisterWebhookWithThirdPartyInput { - s.WebhookName = &v - return s -} - -type RegisterWebhookWithThirdPartyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RegisterWebhookWithThirdPartyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterWebhookWithThirdPartyOutput) GoString() string { - return s.String() -} - -// Represents the input of a RetryStageExecution action. -type RetryStageExecutionInput struct { - _ struct{} `type:"structure"` - - // The ID of the pipeline execution in the failed stage to be retried. Use the - // GetPipelineState action to retrieve the current pipelineExecutionId of the - // failed stage - // - // PipelineExecutionId is a required field - PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string" required:"true"` - - // The name of the pipeline that contains the failed stage. - // - // PipelineName is a required field - PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` - - // The scope of the retry attempt. Currently, the only supported value is FAILED_ACTIONS. - // - // RetryMode is a required field - RetryMode *string `locationName:"retryMode" type:"string" required:"true" enum:"StageRetryMode"` - - // The name of the failed stage to be retried. - // - // StageName is a required field - StageName *string `locationName:"stageName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RetryStageExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RetryStageExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RetryStageExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RetryStageExecutionInput"} - if s.PipelineExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineExecutionId")) - } - if s.PipelineName == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineName")) - } - if s.PipelineName != nil && len(*s.PipelineName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) - } - if s.RetryMode == nil { - invalidParams.Add(request.NewErrParamRequired("RetryMode")) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPipelineExecutionId sets the PipelineExecutionId field's value. -func (s *RetryStageExecutionInput) SetPipelineExecutionId(v string) *RetryStageExecutionInput { - s.PipelineExecutionId = &v - return s -} - -// SetPipelineName sets the PipelineName field's value. -func (s *RetryStageExecutionInput) SetPipelineName(v string) *RetryStageExecutionInput { - s.PipelineName = &v - return s -} - -// SetRetryMode sets the RetryMode field's value. -func (s *RetryStageExecutionInput) SetRetryMode(v string) *RetryStageExecutionInput { - s.RetryMode = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *RetryStageExecutionInput) SetStageName(v string) *RetryStageExecutionInput { - s.StageName = &v - return s -} - -// Represents the output of a RetryStageExecution action. -type RetryStageExecutionOutput struct { - _ struct{} `type:"structure"` - - // The ID of the current workflow execution in the failed stage. - PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string"` -} - -// String returns the string representation -func (s RetryStageExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RetryStageExecutionOutput) GoString() string { - return s.String() -} - -// SetPipelineExecutionId sets the PipelineExecutionId field's value. -func (s *RetryStageExecutionOutput) SetPipelineExecutionId(v string) *RetryStageExecutionOutput { - s.PipelineExecutionId = &v - return s -} - -// The location of the Amazon S3 bucket that contains a revision. -type S3ArtifactLocation struct { - _ struct{} `type:"structure"` - - // The name of the Amazon S3 bucket. - // - // BucketName is a required field - BucketName *string `locationName:"bucketName" type:"string" required:"true"` - - // The key of the object in the Amazon S3 bucket, which uniquely identifies - // the object in the bucket. - // - // ObjectKey is a required field - ObjectKey *string `locationName:"objectKey" type:"string" required:"true"` -} - -// String returns the string representation -func (s S3ArtifactLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3ArtifactLocation) GoString() string { - return s.String() -} - -// SetBucketName sets the BucketName field's value. -func (s *S3ArtifactLocation) SetBucketName(v string) *S3ArtifactLocation { - s.BucketName = &v - return s -} - -// SetObjectKey sets the ObjectKey field's value. -func (s *S3ArtifactLocation) SetObjectKey(v string) *S3ArtifactLocation { - s.ObjectKey = &v - return s -} - -// Information about the version (or revision) of a source artifact that initiated -// a pipeline execution. -type SourceRevision struct { - _ struct{} `type:"structure"` - - // The name of the action that processed the revision to the source artifact. - // - // ActionName is a required field - ActionName *string `locationName:"actionName" min:"1" type:"string" required:"true"` - - // The system-generated unique ID that identifies the revision number of the - // artifact. - RevisionId *string `locationName:"revisionId" min:"1" type:"string"` - - // Summary information about the most recent revision of the artifact. For GitHub - // and AWS CodeCommit repositories, the commit message. For Amazon S3 buckets - // or actions, the user-provided content of a codepipeline-artifact-revision-summary - // key specified in the object metadata. - RevisionSummary *string `locationName:"revisionSummary" min:"1" type:"string"` - - // The commit ID for the artifact revision. For artifacts stored in GitHub or - // AWS CodeCommit repositories, the commit ID is linked to a commit details - // page. - RevisionUrl *string `locationName:"revisionUrl" min:"1" type:"string"` -} - -// String returns the string representation -func (s SourceRevision) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SourceRevision) GoString() string { - return s.String() -} - -// SetActionName sets the ActionName field's value. -func (s *SourceRevision) SetActionName(v string) *SourceRevision { - s.ActionName = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *SourceRevision) SetRevisionId(v string) *SourceRevision { - s.RevisionId = &v - return s -} - -// SetRevisionSummary sets the RevisionSummary field's value. -func (s *SourceRevision) SetRevisionSummary(v string) *SourceRevision { - s.RevisionSummary = &v - return s -} - -// SetRevisionUrl sets the RevisionUrl field's value. -func (s *SourceRevision) SetRevisionUrl(v string) *SourceRevision { - s.RevisionUrl = &v - return s -} - -// Represents information about a stage to a job worker. -type StageContext struct { - _ struct{} `type:"structure"` - - // The name of the stage. - Name *string `locationName:"name" min:"1" type:"string"` -} - -// String returns the string representation -func (s StageContext) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StageContext) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *StageContext) SetName(v string) *StageContext { - s.Name = &v - return s -} - -// Represents information about a stage and its definition. -type StageDeclaration struct { - _ struct{} `type:"structure"` - - // The actions included in a stage. - // - // Actions is a required field - Actions []*ActionDeclaration `locationName:"actions" type:"list" required:"true"` - - // Reserved for future use. - Blockers []*BlockerDeclaration `locationName:"blockers" type:"list"` - - // The name of the stage. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StageDeclaration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StageDeclaration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StageDeclaration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StageDeclaration"} - if s.Actions == nil { - invalidParams.Add(request.NewErrParamRequired("Actions")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Actions != nil { - for i, v := range s.Actions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Actions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Blockers != nil { - for i, v := range s.Blockers { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Blockers", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActions sets the Actions field's value. -func (s *StageDeclaration) SetActions(v []*ActionDeclaration) *StageDeclaration { - s.Actions = v - return s -} - -// SetBlockers sets the Blockers field's value. -func (s *StageDeclaration) SetBlockers(v []*BlockerDeclaration) *StageDeclaration { - s.Blockers = v - return s -} - -// SetName sets the Name field's value. -func (s *StageDeclaration) SetName(v string) *StageDeclaration { - s.Name = &v - return s -} - -// Represents information about the run of a stage. -type StageExecution struct { - _ struct{} `type:"structure"` - - // The ID of the pipeline execution associated with the stage. - // - // PipelineExecutionId is a required field - PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string" required:"true"` - - // The status of the stage, or for a completed stage, the last status of the - // stage. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"StageExecutionStatus"` -} - -// String returns the string representation -func (s StageExecution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StageExecution) GoString() string { - return s.String() -} - -// SetPipelineExecutionId sets the PipelineExecutionId field's value. -func (s *StageExecution) SetPipelineExecutionId(v string) *StageExecution { - s.PipelineExecutionId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StageExecution) SetStatus(v string) *StageExecution { - s.Status = &v - return s -} - -// Represents information about the state of the stage. -type StageState struct { - _ struct{} `type:"structure"` - - // The state of the stage. - ActionStates []*ActionState `locationName:"actionStates" type:"list"` - - // The state of the inbound transition, which is either enabled or disabled. - InboundTransitionState *TransitionState `locationName:"inboundTransitionState" type:"structure"` - - // Information about the latest execution in the stage, including its ID and - // status. - LatestExecution *StageExecution `locationName:"latestExecution" type:"structure"` - - // The name of the stage. - StageName *string `locationName:"stageName" min:"1" type:"string"` -} - -// String returns the string representation -func (s StageState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StageState) GoString() string { - return s.String() -} - -// SetActionStates sets the ActionStates field's value. -func (s *StageState) SetActionStates(v []*ActionState) *StageState { - s.ActionStates = v - return s -} - -// SetInboundTransitionState sets the InboundTransitionState field's value. -func (s *StageState) SetInboundTransitionState(v *TransitionState) *StageState { - s.InboundTransitionState = v - return s -} - -// SetLatestExecution sets the LatestExecution field's value. -func (s *StageState) SetLatestExecution(v *StageExecution) *StageState { - s.LatestExecution = v - return s -} - -// SetStageName sets the StageName field's value. -func (s *StageState) SetStageName(v string) *StageState { - s.StageName = &v - return s -} - -// Represents the input of a StartPipelineExecution action. -type StartPipelineExecutionInput struct { - _ struct{} `type:"structure"` - - // The system-generated unique ID used to identify a unique execution request. - ClientRequestToken *string `locationName:"clientRequestToken" min:"1" type:"string" idempotencyToken:"true"` - - // The name of the pipeline to start. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartPipelineExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartPipelineExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartPipelineExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartPipelineExecutionInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *StartPipelineExecutionInput) SetClientRequestToken(v string) *StartPipelineExecutionInput { - s.ClientRequestToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *StartPipelineExecutionInput) SetName(v string) *StartPipelineExecutionInput { - s.Name = &v - return s -} - -// Represents the output of a StartPipelineExecution action. -type StartPipelineExecutionOutput struct { - _ struct{} `type:"structure"` - - // The unique system-generated ID of the pipeline execution that was started. - PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string"` -} - -// String returns the string representation -func (s StartPipelineExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartPipelineExecutionOutput) GoString() string { - return s.String() -} - -// SetPipelineExecutionId sets the PipelineExecutionId field's value. -func (s *StartPipelineExecutionOutput) SetPipelineExecutionId(v string) *StartPipelineExecutionOutput { - s.PipelineExecutionId = &v - return s -} - -// A response to a PollForThirdPartyJobs request returned by AWS CodePipeline -// when there is a job to be worked upon by a partner action. -type ThirdPartyJob struct { - _ struct{} `type:"structure"` - - // The clientToken portion of the clientId and clientToken pair used to verify - // that the calling entity is allowed access to the job and its details. - ClientId *string `locationName:"clientId" type:"string"` - - // The identifier used to identify the job in AWS CodePipeline. - JobId *string `locationName:"jobId" type:"string"` -} - -// String returns the string representation -func (s ThirdPartyJob) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThirdPartyJob) GoString() string { - return s.String() -} - -// SetClientId sets the ClientId field's value. -func (s *ThirdPartyJob) SetClientId(v string) *ThirdPartyJob { - s.ClientId = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *ThirdPartyJob) SetJobId(v string) *ThirdPartyJob { - s.JobId = &v - return s -} - -// Represents information about the job data for a partner action. -type ThirdPartyJobData struct { - _ struct{} `type:"structure"` - - // Represents information about an action configuration. - ActionConfiguration *ActionConfiguration `locationName:"actionConfiguration" type:"structure"` - - // Represents information about an action type. - ActionTypeId *ActionTypeId `locationName:"actionTypeId" type:"structure"` - - // Represents an AWS session credentials object. These credentials are temporary - // credentials that are issued by AWS Secure Token Service (STS). They can be - // used to access input and output artifacts in the Amazon S3 bucket used to - // store artifact for the pipeline in AWS CodePipeline. - ArtifactCredentials *AWSSessionCredentials `locationName:"artifactCredentials" type:"structure" sensitive:"true"` - - // A system-generated token, such as a AWS CodeDeploy deployment ID, that a - // job requires in order to continue the job asynchronously. - ContinuationToken *string `locationName:"continuationToken" min:"1" type:"string"` - - // The encryption key used to encrypt and decrypt data in the artifact store - // for the pipeline, such as an AWS Key Management Service (AWS KMS) key. This - // is optional and might not be present. - EncryptionKey *EncryptionKey `locationName:"encryptionKey" type:"structure"` - - // The name of the artifact that will be worked upon by the action, if any. - // This name might be system-generated, such as "MyApp", or might be defined - // by the user when the action is created. The input artifact name must match - // the name of an output artifact generated by an action in an earlier action - // or stage of the pipeline. - InputArtifacts []*Artifact `locationName:"inputArtifacts" type:"list"` - - // The name of the artifact that will be the result of the action, if any. This - // name might be system-generated, such as "MyBuiltApp", or might be defined - // by the user when the action is created. - OutputArtifacts []*Artifact `locationName:"outputArtifacts" type:"list"` - - // Represents information about a pipeline to a job worker. - PipelineContext *PipelineContext `locationName:"pipelineContext" type:"structure"` -} - -// String returns the string representation -func (s ThirdPartyJobData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThirdPartyJobData) GoString() string { - return s.String() -} - -// SetActionConfiguration sets the ActionConfiguration field's value. -func (s *ThirdPartyJobData) SetActionConfiguration(v *ActionConfiguration) *ThirdPartyJobData { - s.ActionConfiguration = v - return s -} - -// SetActionTypeId sets the ActionTypeId field's value. -func (s *ThirdPartyJobData) SetActionTypeId(v *ActionTypeId) *ThirdPartyJobData { - s.ActionTypeId = v - return s -} - -// SetArtifactCredentials sets the ArtifactCredentials field's value. -func (s *ThirdPartyJobData) SetArtifactCredentials(v *AWSSessionCredentials) *ThirdPartyJobData { - s.ArtifactCredentials = v - return s -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *ThirdPartyJobData) SetContinuationToken(v string) *ThirdPartyJobData { - s.ContinuationToken = &v - return s -} - -// SetEncryptionKey sets the EncryptionKey field's value. -func (s *ThirdPartyJobData) SetEncryptionKey(v *EncryptionKey) *ThirdPartyJobData { - s.EncryptionKey = v - return s -} - -// SetInputArtifacts sets the InputArtifacts field's value. -func (s *ThirdPartyJobData) SetInputArtifacts(v []*Artifact) *ThirdPartyJobData { - s.InputArtifacts = v - return s -} - -// SetOutputArtifacts sets the OutputArtifacts field's value. -func (s *ThirdPartyJobData) SetOutputArtifacts(v []*Artifact) *ThirdPartyJobData { - s.OutputArtifacts = v - return s -} - -// SetPipelineContext sets the PipelineContext field's value. -func (s *ThirdPartyJobData) SetPipelineContext(v *PipelineContext) *ThirdPartyJobData { - s.PipelineContext = v - return s -} - -// The details of a job sent in response to a GetThirdPartyJobDetails request. -type ThirdPartyJobDetails struct { - _ struct{} `type:"structure"` - - // The data to be returned by the third party job worker. - Data *ThirdPartyJobData `locationName:"data" type:"structure"` - - // The identifier used to identify the job details in AWS CodePipeline. - Id *string `locationName:"id" min:"1" type:"string"` - - // A system-generated random number that AWS CodePipeline uses to ensure that - // the job is being worked on by only one job worker. Use this number in an - // AcknowledgeThirdPartyJob request. - Nonce *string `locationName:"nonce" min:"1" type:"string"` -} - -// String returns the string representation -func (s ThirdPartyJobDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThirdPartyJobDetails) GoString() string { - return s.String() -} - -// SetData sets the Data field's value. -func (s *ThirdPartyJobDetails) SetData(v *ThirdPartyJobData) *ThirdPartyJobDetails { - s.Data = v - return s -} - -// SetId sets the Id field's value. -func (s *ThirdPartyJobDetails) SetId(v string) *ThirdPartyJobDetails { - s.Id = &v - return s -} - -// SetNonce sets the Nonce field's value. -func (s *ThirdPartyJobDetails) SetNonce(v string) *ThirdPartyJobDetails { - s.Nonce = &v - return s -} - -// Represents information about the state of transitions between one stage and -// another stage. -type TransitionState struct { - _ struct{} `type:"structure"` - - // The user-specified reason why the transition between two stages of a pipeline - // was disabled. - DisabledReason *string `locationName:"disabledReason" min:"1" type:"string"` - - // Whether the transition between stages is enabled (true) or disabled (false). - Enabled *bool `locationName:"enabled" type:"boolean"` - - // The timestamp when the transition state was last changed. - LastChangedAt *time.Time `locationName:"lastChangedAt" type:"timestamp"` - - // The ID of the user who last changed the transition state. - LastChangedBy *string `locationName:"lastChangedBy" type:"string"` -} - -// String returns the string representation -func (s TransitionState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitionState) GoString() string { - return s.String() -} - -// SetDisabledReason sets the DisabledReason field's value. -func (s *TransitionState) SetDisabledReason(v string) *TransitionState { - s.DisabledReason = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *TransitionState) SetEnabled(v bool) *TransitionState { - s.Enabled = &v - return s -} - -// SetLastChangedAt sets the LastChangedAt field's value. -func (s *TransitionState) SetLastChangedAt(v time.Time) *TransitionState { - s.LastChangedAt = &v - return s -} - -// SetLastChangedBy sets the LastChangedBy field's value. -func (s *TransitionState) SetLastChangedBy(v string) *TransitionState { - s.LastChangedBy = &v - return s -} - -// Represents the input of an UpdatePipeline action. -type UpdatePipelineInput struct { - _ struct{} `type:"structure"` - - // The name of the pipeline to be updated. - // - // Pipeline is a required field - Pipeline *PipelineDeclaration `locationName:"pipeline" type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdatePipelineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePipelineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdatePipelineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdatePipelineInput"} - if s.Pipeline == nil { - invalidParams.Add(request.NewErrParamRequired("Pipeline")) - } - if s.Pipeline != nil { - if err := s.Pipeline.Validate(); err != nil { - invalidParams.AddNested("Pipeline", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPipeline sets the Pipeline field's value. -func (s *UpdatePipelineInput) SetPipeline(v *PipelineDeclaration) *UpdatePipelineInput { - s.Pipeline = v - return s -} - -// Represents the output of an UpdatePipeline action. -type UpdatePipelineOutput struct { - _ struct{} `type:"structure"` - - // The structure of the updated pipeline. - Pipeline *PipelineDeclaration `locationName:"pipeline" type:"structure"` -} - -// String returns the string representation -func (s UpdatePipelineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePipelineOutput) GoString() string { - return s.String() -} - -// SetPipeline sets the Pipeline field's value. -func (s *UpdatePipelineOutput) SetPipeline(v *PipelineDeclaration) *UpdatePipelineOutput { - s.Pipeline = v - return s -} - -// The authentication applied to incoming webhook trigger requests. -type WebhookAuthConfiguration struct { - _ struct{} `type:"structure"` - - // The property used to configure acceptance of webhooks within a specific IP - // range. For IP, only the AllowedIPRange property must be set, and this property - // must be set to a valid CIDR range. - AllowedIPRange *string `min:"1" type:"string"` - - // The property used to configure GitHub authentication. For GITHUB_HMAC, only - // the SecretToken property must be set. - SecretToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s WebhookAuthConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WebhookAuthConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WebhookAuthConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WebhookAuthConfiguration"} - if s.AllowedIPRange != nil && len(*s.AllowedIPRange) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AllowedIPRange", 1)) - } - if s.SecretToken != nil && len(*s.SecretToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowedIPRange sets the AllowedIPRange field's value. -func (s *WebhookAuthConfiguration) SetAllowedIPRange(v string) *WebhookAuthConfiguration { - s.AllowedIPRange = &v - return s -} - -// SetSecretToken sets the SecretToken field's value. -func (s *WebhookAuthConfiguration) SetSecretToken(v string) *WebhookAuthConfiguration { - s.SecretToken = &v - return s -} - -// Represents information about a webhook and its definition. -type WebhookDefinition struct { - _ struct{} `type:"structure"` - - // Supported options are GITHUB_HMAC, IP and UNAUTHENTICATED. - // - // * GITHUB_HMAC implements the authentication scheme described here: https://developer.github.com/webhooks/securing/ - // - // * IP will reject webhooks trigger requests unless they originate from - // an IP within the IP range whitelisted in the authentication configuration. - // - // * UNAUTHENTICATED will accept all webhook trigger requests regardless - // of origin. - // - // Authentication is a required field - Authentication *string `locationName:"authentication" type:"string" required:"true" enum:"WebhookAuthenticationType"` - - // Properties that configure the authentication applied to incoming webhook - // trigger requests. The required properties depend on the authentication type. - // For GITHUB_HMAC, only the SecretToken property must be set. For IP, only - // the AllowedIPRange property must be set to a valid CIDR range. For UNAUTHENTICATED, - // no properties can be set. - // - // AuthenticationConfiguration is a required field - AuthenticationConfiguration *WebhookAuthConfiguration `locationName:"authenticationConfiguration" type:"structure" required:"true"` - - // A list of rules applied to the body/payload sent in the POST request to a - // webhook URL. All defined rules must pass for the request to be accepted and - // the pipeline started. - // - // Filters is a required field - Filters []*WebhookFilterRule `locationName:"filters" type:"list" required:"true"` - - // The name of the webhook. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The name of the action in a pipeline you want to connect to the webhook. - // The action must be from the source (first) stage of the pipeline. - // - // TargetAction is a required field - TargetAction *string `locationName:"targetAction" min:"1" type:"string" required:"true"` - - // The name of the pipeline you want to connect to the webhook. - // - // TargetPipeline is a required field - TargetPipeline *string `locationName:"targetPipeline" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s WebhookDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WebhookDefinition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WebhookDefinition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WebhookDefinition"} - if s.Authentication == nil { - invalidParams.Add(request.NewErrParamRequired("Authentication")) - } - if s.AuthenticationConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("AuthenticationConfiguration")) - } - if s.Filters == nil { - invalidParams.Add(request.NewErrParamRequired("Filters")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.TargetAction == nil { - invalidParams.Add(request.NewErrParamRequired("TargetAction")) - } - if s.TargetAction != nil && len(*s.TargetAction) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetAction", 1)) - } - if s.TargetPipeline == nil { - invalidParams.Add(request.NewErrParamRequired("TargetPipeline")) - } - if s.TargetPipeline != nil && len(*s.TargetPipeline) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetPipeline", 1)) - } - if s.AuthenticationConfiguration != nil { - if err := s.AuthenticationConfiguration.Validate(); err != nil { - invalidParams.AddNested("AuthenticationConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthentication sets the Authentication field's value. -func (s *WebhookDefinition) SetAuthentication(v string) *WebhookDefinition { - s.Authentication = &v - return s -} - -// SetAuthenticationConfiguration sets the AuthenticationConfiguration field's value. -func (s *WebhookDefinition) SetAuthenticationConfiguration(v *WebhookAuthConfiguration) *WebhookDefinition { - s.AuthenticationConfiguration = v - return s -} - -// SetFilters sets the Filters field's value. -func (s *WebhookDefinition) SetFilters(v []*WebhookFilterRule) *WebhookDefinition { - s.Filters = v - return s -} - -// SetName sets the Name field's value. -func (s *WebhookDefinition) SetName(v string) *WebhookDefinition { - s.Name = &v - return s -} - -// SetTargetAction sets the TargetAction field's value. -func (s *WebhookDefinition) SetTargetAction(v string) *WebhookDefinition { - s.TargetAction = &v - return s -} - -// SetTargetPipeline sets the TargetPipeline field's value. -func (s *WebhookDefinition) SetTargetPipeline(v string) *WebhookDefinition { - s.TargetPipeline = &v - return s -} - -// The event criteria that specify when a webhook notification is sent to your -// URL. -type WebhookFilterRule struct { - _ struct{} `type:"structure"` - - // A JsonPath expression that will be applied to the body/payload of the webhook. - // The value selected by JsonPath expression must match the value specified - // in the matchEquals field, otherwise the request will be ignored. More information - // on JsonPath expressions can be found here: https://github.com/json-path/JsonPath. - // - // JsonPath is a required field - JsonPath *string `locationName:"jsonPath" min:"1" type:"string" required:"true"` - - // The value selected by the JsonPath expression must match what is supplied - // in the MatchEquals field, otherwise the request will be ignored. Properties - // from the target action configuration can be included as placeholders in this - // value by surrounding the action configuration key with curly braces. For - // example, if the value supplied here is "refs/heads/{Branch}" and the target - // action has an action configuration property called "Branch" with a value - // of "master", the MatchEquals value will be evaluated as "refs/heads/master". - // A list of action configuration properties for built-in action types can be - // found here: Pipeline Structure Reference Action Requirements (http://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#action-requirements). - MatchEquals *string `locationName:"matchEquals" min:"1" type:"string"` -} - -// String returns the string representation -func (s WebhookFilterRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WebhookFilterRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WebhookFilterRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WebhookFilterRule"} - if s.JsonPath == nil { - invalidParams.Add(request.NewErrParamRequired("JsonPath")) - } - if s.JsonPath != nil && len(*s.JsonPath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JsonPath", 1)) - } - if s.MatchEquals != nil && len(*s.MatchEquals) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MatchEquals", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJsonPath sets the JsonPath field's value. -func (s *WebhookFilterRule) SetJsonPath(v string) *WebhookFilterRule { - s.JsonPath = &v - return s -} - -// SetMatchEquals sets the MatchEquals field's value. -func (s *WebhookFilterRule) SetMatchEquals(v string) *WebhookFilterRule { - s.MatchEquals = &v - return s -} - -const ( - // ActionCategorySource is a ActionCategory enum value - ActionCategorySource = "Source" - - // ActionCategoryBuild is a ActionCategory enum value - ActionCategoryBuild = "Build" - - // ActionCategoryDeploy is a ActionCategory enum value - ActionCategoryDeploy = "Deploy" - - // ActionCategoryTest is a ActionCategory enum value - ActionCategoryTest = "Test" - - // ActionCategoryInvoke is a ActionCategory enum value - ActionCategoryInvoke = "Invoke" - - // ActionCategoryApproval is a ActionCategory enum value - ActionCategoryApproval = "Approval" -) - -const ( - // ActionConfigurationPropertyTypeString is a ActionConfigurationPropertyType enum value - ActionConfigurationPropertyTypeString = "String" - - // ActionConfigurationPropertyTypeNumber is a ActionConfigurationPropertyType enum value - ActionConfigurationPropertyTypeNumber = "Number" - - // ActionConfigurationPropertyTypeBoolean is a ActionConfigurationPropertyType enum value - ActionConfigurationPropertyTypeBoolean = "Boolean" -) - -const ( - // ActionExecutionStatusInProgress is a ActionExecutionStatus enum value - ActionExecutionStatusInProgress = "InProgress" - - // ActionExecutionStatusSucceeded is a ActionExecutionStatus enum value - ActionExecutionStatusSucceeded = "Succeeded" - - // ActionExecutionStatusFailed is a ActionExecutionStatus enum value - ActionExecutionStatusFailed = "Failed" -) - -const ( - // ActionOwnerAws is a ActionOwner enum value - ActionOwnerAws = "AWS" - - // ActionOwnerThirdParty is a ActionOwner enum value - ActionOwnerThirdParty = "ThirdParty" - - // ActionOwnerCustom is a ActionOwner enum value - ActionOwnerCustom = "Custom" -) - -const ( - // ApprovalStatusApproved is a ApprovalStatus enum value - ApprovalStatusApproved = "Approved" - - // ApprovalStatusRejected is a ApprovalStatus enum value - ApprovalStatusRejected = "Rejected" -) - -const ( - // ArtifactLocationTypeS3 is a ArtifactLocationType enum value - ArtifactLocationTypeS3 = "S3" -) - -const ( - // ArtifactStoreTypeS3 is a ArtifactStoreType enum value - ArtifactStoreTypeS3 = "S3" -) - -const ( - // BlockerTypeSchedule is a BlockerType enum value - BlockerTypeSchedule = "Schedule" -) - -const ( - // EncryptionKeyTypeKms is a EncryptionKeyType enum value - EncryptionKeyTypeKms = "KMS" -) - -const ( - // FailureTypeJobFailed is a FailureType enum value - FailureTypeJobFailed = "JobFailed" - - // FailureTypeConfigurationError is a FailureType enum value - FailureTypeConfigurationError = "ConfigurationError" - - // FailureTypePermissionError is a FailureType enum value - FailureTypePermissionError = "PermissionError" - - // FailureTypeRevisionOutOfSync is a FailureType enum value - FailureTypeRevisionOutOfSync = "RevisionOutOfSync" - - // FailureTypeRevisionUnavailable is a FailureType enum value - FailureTypeRevisionUnavailable = "RevisionUnavailable" - - // FailureTypeSystemUnavailable is a FailureType enum value - FailureTypeSystemUnavailable = "SystemUnavailable" -) - -const ( - // JobStatusCreated is a JobStatus enum value - JobStatusCreated = "Created" - - // JobStatusQueued is a JobStatus enum value - JobStatusQueued = "Queued" - - // JobStatusDispatched is a JobStatus enum value - JobStatusDispatched = "Dispatched" - - // JobStatusInProgress is a JobStatus enum value - JobStatusInProgress = "InProgress" - - // JobStatusTimedOut is a JobStatus enum value - JobStatusTimedOut = "TimedOut" - - // JobStatusSucceeded is a JobStatus enum value - JobStatusSucceeded = "Succeeded" - - // JobStatusFailed is a JobStatus enum value - JobStatusFailed = "Failed" -) - -const ( - // PipelineExecutionStatusInProgress is a PipelineExecutionStatus enum value - PipelineExecutionStatusInProgress = "InProgress" - - // PipelineExecutionStatusSucceeded is a PipelineExecutionStatus enum value - PipelineExecutionStatusSucceeded = "Succeeded" - - // PipelineExecutionStatusSuperseded is a PipelineExecutionStatus enum value - PipelineExecutionStatusSuperseded = "Superseded" - - // PipelineExecutionStatusFailed is a PipelineExecutionStatus enum value - PipelineExecutionStatusFailed = "Failed" -) - -const ( - // StageExecutionStatusInProgress is a StageExecutionStatus enum value - StageExecutionStatusInProgress = "InProgress" - - // StageExecutionStatusFailed is a StageExecutionStatus enum value - StageExecutionStatusFailed = "Failed" - - // StageExecutionStatusSucceeded is a StageExecutionStatus enum value - StageExecutionStatusSucceeded = "Succeeded" -) - -const ( - // StageRetryModeFailedActions is a StageRetryMode enum value - StageRetryModeFailedActions = "FAILED_ACTIONS" -) - -const ( - // StageTransitionTypeInbound is a StageTransitionType enum value - StageTransitionTypeInbound = "Inbound" - - // StageTransitionTypeOutbound is a StageTransitionType enum value - StageTransitionTypeOutbound = "Outbound" -) - -const ( - // WebhookAuthenticationTypeGithubHmac is a WebhookAuthenticationType enum value - WebhookAuthenticationTypeGithubHmac = "GITHUB_HMAC" - - // WebhookAuthenticationTypeIp is a WebhookAuthenticationType enum value - WebhookAuthenticationTypeIp = "IP" - - // WebhookAuthenticationTypeUnauthenticated is a WebhookAuthenticationType enum value - WebhookAuthenticationTypeUnauthenticated = "UNAUTHENTICATED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go deleted file mode 100644 index ecb1cd862..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package codepipeline provides the client and types for making API -// requests to AWS CodePipeline. -// -// Overview -// -// This is the AWS CodePipeline API Reference. This guide provides descriptions -// of the actions and data types for AWS CodePipeline. Some functionality for -// your pipeline is only configurable through the API. For additional information, -// see the AWS CodePipeline User Guide (http://docs.aws.amazon.com/codepipeline/latest/userguide/welcome.html). -// -// You can use the AWS CodePipeline API to work with pipelines, stages, actions, -// and transitions, as described below. -// -// Pipelines are models of automated release processes. Each pipeline is uniquely -// named, and consists of stages, actions, and transitions. -// -// You can work with pipelines by calling: -// -// * CreatePipeline, which creates a uniquely-named pipeline. -// -// * DeletePipeline, which deletes the specified pipeline. -// -// * GetPipeline, which returns information about the pipeline structure -// and pipeline metadata, including the pipeline Amazon Resource Name (ARN). -// -// * GetPipelineExecution, which returns information about a specific execution -// of a pipeline. -// -// * GetPipelineState, which returns information about the current state -// of the stages and actions of a pipeline. -// -// * ListPipelines, which gets a summary of all of the pipelines associated -// with your account. -// -// * ListPipelineExecutions, which gets a summary of the most recent executions -// for a pipeline. -// -// * StartPipelineExecution, which runs the the most recent revision of an -// artifact through the pipeline. -// -// * UpdatePipeline, which updates a pipeline with edits or changes to the -// structure of the pipeline. -// -// Pipelines include stages. Each stage contains one or more actions that must -// complete before the next stage begins. A stage will result in success or -// failure. If a stage fails, then the pipeline stops at that stage and will -// remain stopped until either a new version of an artifact appears in the source -// location, or a user takes action to re-run the most recent artifact through -// the pipeline. You can call GetPipelineState, which displays the status of -// a pipeline, including the status of stages in the pipeline, or GetPipeline, -// which returns the entire structure of the pipeline, including the stages -// of that pipeline. For more information about the structure of stages and -// actions, also refer to the AWS CodePipeline Pipeline Structure Reference -// (http://docs.aws.amazon.com/codepipeline/latest/userguide/pipeline-structure.html). -// -// Pipeline stages include actions, which are categorized into categories such -// as source or build actions performed within a stage of a pipeline. For example, -// you can use a source action to import artifacts into a pipeline from a source -// such as Amazon S3. Like stages, you do not work with actions directly in -// most cases, but you do define and interact with actions when working with -// pipeline operations such as CreatePipeline and GetPipelineState. Valid action -// categories are: -// -// * Source -// -// * Build -// -// * Test -// -// * Deploy -// -// * Approval -// -// * Invoke -// -// Pipelines also include transitions, which allow the transition of artifacts -// from one stage to the next in a pipeline after the actions in one stage complete. -// -// You can work with transitions by calling: -// -// * DisableStageTransition, which prevents artifacts from transitioning -// to the next stage in a pipeline. -// -// * EnableStageTransition, which enables transition of artifacts between -// stages in a pipeline. -// -// Using the API to integrate with AWS CodePipeline -// -// For third-party integrators or developers who want to create their own integrations -// with AWS CodePipeline, the expected sequence varies from the standard API -// user. In order to integrate with AWS CodePipeline, developers will need to -// work with the following items: -// -// Jobs, which are instances of an action. For example, a job for a source action -// might import a revision of an artifact from a source. -// -// You can work with jobs by calling: -// -// * AcknowledgeJob, which confirms whether a job worker has received the -// specified job, -// -// * GetJobDetails, which returns the details of a job, -// -// * PollForJobs, which determines whether there are any jobs to act upon, -// -// -// * PutJobFailureResult, which provides details of a job failure, and -// -// * PutJobSuccessResult, which provides details of a job success. -// -// Third party jobs, which are instances of an action created by a partner action -// and integrated into AWS CodePipeline. Partner actions are created by members -// of the AWS Partner Network. -// -// You can work with third party jobs by calling: -// -// * AcknowledgeThirdPartyJob, which confirms whether a job worker has received -// the specified job, -// -// * GetThirdPartyJobDetails, which requests the details of a job for a partner -// action, -// -// * PollForThirdPartyJobs, which determines whether there are any jobs to -// act upon, -// -// * PutThirdPartyJobFailureResult, which provides details of a job failure, -// and -// -// * PutThirdPartyJobSuccessResult, which provides details of a job success. -// -// See https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09 for more information on this service. -// -// See codepipeline package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/codepipeline/ -// -// Using the Client -// -// To contact AWS CodePipeline 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 CodePipeline client CodePipeline for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/codepipeline/#New -package codepipeline diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go deleted file mode 100644 index dfdffa34c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package codepipeline - -const ( - - // ErrCodeActionNotFoundException for service response error code - // "ActionNotFoundException". - // - // The specified action cannot be found. - ErrCodeActionNotFoundException = "ActionNotFoundException" - - // ErrCodeActionTypeNotFoundException for service response error code - // "ActionTypeNotFoundException". - // - // The specified action type cannot be found. - ErrCodeActionTypeNotFoundException = "ActionTypeNotFoundException" - - // ErrCodeApprovalAlreadyCompletedException for service response error code - // "ApprovalAlreadyCompletedException". - // - // The approval action has already been approved or rejected. - ErrCodeApprovalAlreadyCompletedException = "ApprovalAlreadyCompletedException" - - // ErrCodeInvalidActionDeclarationException for service response error code - // "InvalidActionDeclarationException". - // - // The specified action declaration was specified in an invalid format. - ErrCodeInvalidActionDeclarationException = "InvalidActionDeclarationException" - - // ErrCodeInvalidApprovalTokenException for service response error code - // "InvalidApprovalTokenException". - // - // The approval request already received a response or has expired. - ErrCodeInvalidApprovalTokenException = "InvalidApprovalTokenException" - - // ErrCodeInvalidBlockerDeclarationException for service response error code - // "InvalidBlockerDeclarationException". - // - // Reserved for future use. - ErrCodeInvalidBlockerDeclarationException = "InvalidBlockerDeclarationException" - - // ErrCodeInvalidClientTokenException for service response error code - // "InvalidClientTokenException". - // - // The client token was specified in an invalid format - ErrCodeInvalidClientTokenException = "InvalidClientTokenException" - - // ErrCodeInvalidJobException for service response error code - // "InvalidJobException". - // - // The specified job was specified in an invalid format or cannot be found. - ErrCodeInvalidJobException = "InvalidJobException" - - // ErrCodeInvalidJobStateException for service response error code - // "InvalidJobStateException". - // - // The specified job state was specified in an invalid format. - ErrCodeInvalidJobStateException = "InvalidJobStateException" - - // ErrCodeInvalidNextTokenException for service response error code - // "InvalidNextTokenException". - // - // The next token was specified in an invalid format. Make sure that the next - // token you provided is the token returned by a previous call. - ErrCodeInvalidNextTokenException = "InvalidNextTokenException" - - // ErrCodeInvalidNonceException for service response error code - // "InvalidNonceException". - // - // The specified nonce was specified in an invalid format. - ErrCodeInvalidNonceException = "InvalidNonceException" - - // ErrCodeInvalidStageDeclarationException for service response error code - // "InvalidStageDeclarationException". - // - // The specified stage declaration was specified in an invalid format. - ErrCodeInvalidStageDeclarationException = "InvalidStageDeclarationException" - - // ErrCodeInvalidStructureException for service response error code - // "InvalidStructureException". - // - // The specified structure was specified in an invalid format. - ErrCodeInvalidStructureException = "InvalidStructureException" - - // ErrCodeInvalidWebhookAuthenticationParametersException for service response error code - // "InvalidWebhookAuthenticationParametersException". - // - // The specified authentication type is in an invalid format. - ErrCodeInvalidWebhookAuthenticationParametersException = "InvalidWebhookAuthenticationParametersException" - - // ErrCodeInvalidWebhookFilterPatternException for service response error code - // "InvalidWebhookFilterPatternException". - // - // The specified event filter rule is in an invalid format. - ErrCodeInvalidWebhookFilterPatternException = "InvalidWebhookFilterPatternException" - - // ErrCodeJobNotFoundException for service response error code - // "JobNotFoundException". - // - // The specified job was specified in an invalid format or cannot be found. - ErrCodeJobNotFoundException = "JobNotFoundException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The number of pipelines associated with the AWS account has exceeded the - // limit allowed for the account. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeNotLatestPipelineExecutionException for service response error code - // "NotLatestPipelineExecutionException". - // - // The stage has failed in a later run of the pipeline and the pipelineExecutionId - // associated with the request is out of date. - ErrCodeNotLatestPipelineExecutionException = "NotLatestPipelineExecutionException" - - // ErrCodePipelineExecutionNotFoundException for service response error code - // "PipelineExecutionNotFoundException". - // - // The pipeline execution was specified in an invalid format or cannot be found, - // or an execution ID does not belong to the specified pipeline. - ErrCodePipelineExecutionNotFoundException = "PipelineExecutionNotFoundException" - - // ErrCodePipelineNameInUseException for service response error code - // "PipelineNameInUseException". - // - // The specified pipeline name is already in use. - ErrCodePipelineNameInUseException = "PipelineNameInUseException" - - // ErrCodePipelineNotFoundException for service response error code - // "PipelineNotFoundException". - // - // The specified pipeline was specified in an invalid format or cannot be found. - ErrCodePipelineNotFoundException = "PipelineNotFoundException" - - // ErrCodePipelineVersionNotFoundException for service response error code - // "PipelineVersionNotFoundException". - // - // The specified pipeline version was specified in an invalid format or cannot - // be found. - ErrCodePipelineVersionNotFoundException = "PipelineVersionNotFoundException" - - // ErrCodeStageNotFoundException for service response error code - // "StageNotFoundException". - // - // The specified stage was specified in an invalid format or cannot be found. - ErrCodeStageNotFoundException = "StageNotFoundException" - - // ErrCodeStageNotRetryableException for service response error code - // "StageNotRetryableException". - // - // The specified stage can't be retried because the pipeline structure or stage - // state changed after the stage was not completed; the stage contains no failed - // actions; one or more actions are still in progress; or another retry attempt - // is already in progress. - ErrCodeStageNotRetryableException = "StageNotRetryableException" - - // ErrCodeValidationException for service response error code - // "ValidationException". - // - // The validation was specified in an invalid format. - ErrCodeValidationException = "ValidationException" - - // ErrCodeWebhookNotFoundException for service response error code - // "WebhookNotFoundException". - // - // The specified webhook was entered in an invalid format or cannot be found. - ErrCodeWebhookNotFoundException = "WebhookNotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go deleted file mode 100644 index 397a00f9e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package codepipeline - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// CodePipeline provides the API operation methods for making requests to -// AWS CodePipeline. See this package's package overview docs -// for details on the service. -// -// CodePipeline methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CodePipeline 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 = "codepipeline" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "CodePipeline" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CodePipeline client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a CodePipeline client from just a session. -// svc := codepipeline.New(mySession) -// -// // Create a CodePipeline client with additional configuration -// svc := codepipeline.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CodePipeline { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CodePipeline { - svc := &CodePipeline{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-07-09", - JSONVersion: "1.1", - TargetPrefix: "CodePipeline_20150709", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CodePipeline operation and runs any -// custom request initialization. -func (c *CodePipeline) 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/cognitoidentity/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go deleted file mode 100644 index 782226a7f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go +++ /dev/null @@ -1,4050 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cognitoidentity - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateIdentityPool = "CreateIdentityPool" - -// CreateIdentityPoolRequest generates a "aws/request.Request" representing the -// client's request for the CreateIdentityPool operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateIdentityPool for more information on using the CreateIdentityPool -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateIdentityPoolRequest method. -// req, resp := client.CreateIdentityPoolRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/CreateIdentityPool -func (c *CognitoIdentity) CreateIdentityPoolRequest(input *CreateIdentityPoolInput) (req *request.Request, output *IdentityPool) { - op := &request.Operation{ - Name: opCreateIdentityPool, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateIdentityPoolInput{} - } - - output = &IdentityPool{} - req = c.newRequest(op, input, output) - return -} - -// CreateIdentityPool API operation for Amazon Cognito Identity. -// -// Creates a new identity pool. The identity pool is a store of user identity -// information that is specific to your AWS account. The limit on identity pools -// is 60 per account. The keys for SupportedLoginProviders are as follows: -// -// * Facebook: graph.facebook.com -// -// * Google: accounts.google.com -// -// * Amazon: www.amazon.com -// -// * Twitter: api.twitter.com -// -// * Digits: www.digits.com -// -// You must use AWS Developer credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation CreateIdentityPool for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// Thrown when a user tries to use a login which is already linked to another -// account. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Thrown when the total number of user pools has exceeded a preset limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/CreateIdentityPool -func (c *CognitoIdentity) CreateIdentityPool(input *CreateIdentityPoolInput) (*IdentityPool, error) { - req, out := c.CreateIdentityPoolRequest(input) - return out, req.Send() -} - -// CreateIdentityPoolWithContext is the same as CreateIdentityPool with the addition of -// the ability to pass a context and additional request options. -// -// See CreateIdentityPool for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) CreateIdentityPoolWithContext(ctx aws.Context, input *CreateIdentityPoolInput, opts ...request.Option) (*IdentityPool, error) { - req, out := c.CreateIdentityPoolRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIdentities = "DeleteIdentities" - -// DeleteIdentitiesRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIdentities operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIdentities for more information on using the DeleteIdentities -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIdentitiesRequest method. -// req, resp := client.DeleteIdentitiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DeleteIdentities -func (c *CognitoIdentity) DeleteIdentitiesRequest(input *DeleteIdentitiesInput) (req *request.Request, output *DeleteIdentitiesOutput) { - op := &request.Operation{ - Name: opDeleteIdentities, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteIdentitiesInput{} - } - - output = &DeleteIdentitiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteIdentities API operation for Amazon Cognito Identity. -// -// Deletes identities from an identity pool. You can specify a list of 1-60 -// identities that you want to delete. -// -// You must use AWS Developer credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation DeleteIdentities for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DeleteIdentities -func (c *CognitoIdentity) DeleteIdentities(input *DeleteIdentitiesInput) (*DeleteIdentitiesOutput, error) { - req, out := c.DeleteIdentitiesRequest(input) - return out, req.Send() -} - -// DeleteIdentitiesWithContext is the same as DeleteIdentities with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIdentities for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) DeleteIdentitiesWithContext(ctx aws.Context, input *DeleteIdentitiesInput, opts ...request.Option) (*DeleteIdentitiesOutput, error) { - req, out := c.DeleteIdentitiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIdentityPool = "DeleteIdentityPool" - -// DeleteIdentityPoolRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIdentityPool operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIdentityPool for more information on using the DeleteIdentityPool -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIdentityPoolRequest method. -// req, resp := client.DeleteIdentityPoolRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DeleteIdentityPool -func (c *CognitoIdentity) DeleteIdentityPoolRequest(input *DeleteIdentityPoolInput) (req *request.Request, output *DeleteIdentityPoolOutput) { - op := &request.Operation{ - Name: opDeleteIdentityPool, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteIdentityPoolInput{} - } - - output = &DeleteIdentityPoolOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteIdentityPool API operation for Amazon Cognito Identity. -// -// Deletes a user pool. Once a pool is deleted, users will not be able to authenticate -// with the pool. -// -// You must use AWS Developer credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation DeleteIdentityPool for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DeleteIdentityPool -func (c *CognitoIdentity) DeleteIdentityPool(input *DeleteIdentityPoolInput) (*DeleteIdentityPoolOutput, error) { - req, out := c.DeleteIdentityPoolRequest(input) - return out, req.Send() -} - -// DeleteIdentityPoolWithContext is the same as DeleteIdentityPool with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIdentityPool for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) DeleteIdentityPoolWithContext(ctx aws.Context, input *DeleteIdentityPoolInput, opts ...request.Option) (*DeleteIdentityPoolOutput, error) { - req, out := c.DeleteIdentityPoolRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeIdentity = "DescribeIdentity" - -// DescribeIdentityRequest generates a "aws/request.Request" representing the -// client's request for the DescribeIdentity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeIdentity for more information on using the DescribeIdentity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeIdentityRequest method. -// req, resp := client.DescribeIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DescribeIdentity -func (c *CognitoIdentity) DescribeIdentityRequest(input *DescribeIdentityInput) (req *request.Request, output *IdentityDescription) { - op := &request.Operation{ - Name: opDescribeIdentity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeIdentityInput{} - } - - output = &IdentityDescription{} - req = c.newRequest(op, input, output) - return -} - -// DescribeIdentity API operation for Amazon Cognito Identity. -// -// Returns metadata related to the given identity, including when the identity -// was created and any associated linked logins. -// -// You must use AWS Developer credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation DescribeIdentity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DescribeIdentity -func (c *CognitoIdentity) DescribeIdentity(input *DescribeIdentityInput) (*IdentityDescription, error) { - req, out := c.DescribeIdentityRequest(input) - return out, req.Send() -} - -// DescribeIdentityWithContext is the same as DescribeIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeIdentity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) DescribeIdentityWithContext(ctx aws.Context, input *DescribeIdentityInput, opts ...request.Option) (*IdentityDescription, error) { - req, out := c.DescribeIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeIdentityPool = "DescribeIdentityPool" - -// DescribeIdentityPoolRequest generates a "aws/request.Request" representing the -// client's request for the DescribeIdentityPool operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeIdentityPool for more information on using the DescribeIdentityPool -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeIdentityPoolRequest method. -// req, resp := client.DescribeIdentityPoolRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DescribeIdentityPool -func (c *CognitoIdentity) DescribeIdentityPoolRequest(input *DescribeIdentityPoolInput) (req *request.Request, output *IdentityPool) { - op := &request.Operation{ - Name: opDescribeIdentityPool, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeIdentityPoolInput{} - } - - output = &IdentityPool{} - req = c.newRequest(op, input, output) - return -} - -// DescribeIdentityPool API operation for Amazon Cognito Identity. -// -// Gets details about a particular identity pool, including the pool name, ID -// description, creation date, and current number of users. -// -// You must use AWS Developer credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation DescribeIdentityPool for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/DescribeIdentityPool -func (c *CognitoIdentity) DescribeIdentityPool(input *DescribeIdentityPoolInput) (*IdentityPool, error) { - req, out := c.DescribeIdentityPoolRequest(input) - return out, req.Send() -} - -// DescribeIdentityPoolWithContext is the same as DescribeIdentityPool with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeIdentityPool for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) DescribeIdentityPoolWithContext(ctx aws.Context, input *DescribeIdentityPoolInput, opts ...request.Option) (*IdentityPool, error) { - req, out := c.DescribeIdentityPoolRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCredentialsForIdentity = "GetCredentialsForIdentity" - -// GetCredentialsForIdentityRequest generates a "aws/request.Request" representing the -// client's request for the GetCredentialsForIdentity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCredentialsForIdentity for more information on using the GetCredentialsForIdentity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCredentialsForIdentityRequest method. -// req, resp := client.GetCredentialsForIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetCredentialsForIdentity -func (c *CognitoIdentity) GetCredentialsForIdentityRequest(input *GetCredentialsForIdentityInput) (req *request.Request, output *GetCredentialsForIdentityOutput) { - op := &request.Operation{ - Name: opGetCredentialsForIdentity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCredentialsForIdentityInput{} - } - - output = &GetCredentialsForIdentityOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCredentialsForIdentity API operation for Amazon Cognito Identity. -// -// Returns credentials for the provided identity ID. Any provided logins will -// be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, -// it will be passed through to AWS Security Token Service with the appropriate -// role for the token. -// -// This is a public API. You do not need any credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation GetCredentialsForIdentity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// Thrown when a user tries to use a login which is already linked to another -// account. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInvalidIdentityPoolConfigurationException "InvalidIdentityPoolConfigurationException" -// Thrown if the identity pool has no role associated for the given auth type -// (auth/unauth) or if the AssumeRole fails. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// * ErrCodeExternalServiceException "ExternalServiceException" -// An exception thrown when a dependent service such as Facebook or Twitter -// is not responding -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetCredentialsForIdentity -func (c *CognitoIdentity) GetCredentialsForIdentity(input *GetCredentialsForIdentityInput) (*GetCredentialsForIdentityOutput, error) { - req, out := c.GetCredentialsForIdentityRequest(input) - return out, req.Send() -} - -// GetCredentialsForIdentityWithContext is the same as GetCredentialsForIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See GetCredentialsForIdentity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) GetCredentialsForIdentityWithContext(ctx aws.Context, input *GetCredentialsForIdentityInput, opts ...request.Option) (*GetCredentialsForIdentityOutput, error) { - req, out := c.GetCredentialsForIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetId = "GetId" - -// GetIdRequest generates a "aws/request.Request" representing the -// client's request for the GetId operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetId for more information on using the GetId -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIdRequest method. -// req, resp := client.GetIdRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetId -func (c *CognitoIdentity) GetIdRequest(input *GetIdInput) (req *request.Request, output *GetIdOutput) { - op := &request.Operation{ - Name: opGetId, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetIdInput{} - } - - output = &GetIdOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetId API operation for Amazon Cognito Identity. -// -// Generates (or retrieves) a Cognito ID. Supplying multiple logins will create -// an implicit linked account. -// -// This is a public API. You do not need any credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation GetId for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// Thrown when a user tries to use a login which is already linked to another -// account. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Thrown when the total number of user pools has exceeded a preset limit. -// -// * ErrCodeExternalServiceException "ExternalServiceException" -// An exception thrown when a dependent service such as Facebook or Twitter -// is not responding -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetId -func (c *CognitoIdentity) GetId(input *GetIdInput) (*GetIdOutput, error) { - req, out := c.GetIdRequest(input) - return out, req.Send() -} - -// GetIdWithContext is the same as GetId with the addition of -// the ability to pass a context and additional request options. -// -// See GetId for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) GetIdWithContext(ctx aws.Context, input *GetIdInput, opts ...request.Option) (*GetIdOutput, error) { - req, out := c.GetIdRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIdentityPoolRoles = "GetIdentityPoolRoles" - -// GetIdentityPoolRolesRequest generates a "aws/request.Request" representing the -// client's request for the GetIdentityPoolRoles operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIdentityPoolRoles for more information on using the GetIdentityPoolRoles -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIdentityPoolRolesRequest method. -// req, resp := client.GetIdentityPoolRolesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetIdentityPoolRoles -func (c *CognitoIdentity) GetIdentityPoolRolesRequest(input *GetIdentityPoolRolesInput) (req *request.Request, output *GetIdentityPoolRolesOutput) { - op := &request.Operation{ - Name: opGetIdentityPoolRoles, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetIdentityPoolRolesInput{} - } - - output = &GetIdentityPoolRolesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIdentityPoolRoles API operation for Amazon Cognito Identity. -// -// Gets the roles for an identity pool. -// -// You must use AWS Developer credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation GetIdentityPoolRoles for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// Thrown when a user tries to use a login which is already linked to another -// account. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetIdentityPoolRoles -func (c *CognitoIdentity) GetIdentityPoolRoles(input *GetIdentityPoolRolesInput) (*GetIdentityPoolRolesOutput, error) { - req, out := c.GetIdentityPoolRolesRequest(input) - return out, req.Send() -} - -// GetIdentityPoolRolesWithContext is the same as GetIdentityPoolRoles with the addition of -// the ability to pass a context and additional request options. -// -// See GetIdentityPoolRoles for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) GetIdentityPoolRolesWithContext(ctx aws.Context, input *GetIdentityPoolRolesInput, opts ...request.Option) (*GetIdentityPoolRolesOutput, error) { - req, out := c.GetIdentityPoolRolesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOpenIdToken = "GetOpenIdToken" - -// GetOpenIdTokenRequest generates a "aws/request.Request" representing the -// client's request for the GetOpenIdToken operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetOpenIdToken for more information on using the GetOpenIdToken -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetOpenIdTokenRequest method. -// req, resp := client.GetOpenIdTokenRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetOpenIdToken -func (c *CognitoIdentity) GetOpenIdTokenRequest(input *GetOpenIdTokenInput) (req *request.Request, output *GetOpenIdTokenOutput) { - op := &request.Operation{ - Name: opGetOpenIdToken, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetOpenIdTokenInput{} - } - - output = &GetOpenIdTokenOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOpenIdToken API operation for Amazon Cognito Identity. -// -// Gets an OpenID token, using a known Cognito ID. This known Cognito ID is -// returned by GetId. You can optionally add additional logins for the identity. -// Supplying multiple logins creates an implicit link. -// -// The OpenId token is valid for 15 minutes. -// -// This is a public API. You do not need any credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation GetOpenIdToken for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// Thrown when a user tries to use a login which is already linked to another -// account. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// * ErrCodeExternalServiceException "ExternalServiceException" -// An exception thrown when a dependent service such as Facebook or Twitter -// is not responding -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetOpenIdToken -func (c *CognitoIdentity) GetOpenIdToken(input *GetOpenIdTokenInput) (*GetOpenIdTokenOutput, error) { - req, out := c.GetOpenIdTokenRequest(input) - return out, req.Send() -} - -// GetOpenIdTokenWithContext is the same as GetOpenIdToken with the addition of -// the ability to pass a context and additional request options. -// -// See GetOpenIdToken for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) GetOpenIdTokenWithContext(ctx aws.Context, input *GetOpenIdTokenInput, opts ...request.Option) (*GetOpenIdTokenOutput, error) { - req, out := c.GetOpenIdTokenRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOpenIdTokenForDeveloperIdentity = "GetOpenIdTokenForDeveloperIdentity" - -// GetOpenIdTokenForDeveloperIdentityRequest generates a "aws/request.Request" representing the -// client's request for the GetOpenIdTokenForDeveloperIdentity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetOpenIdTokenForDeveloperIdentity for more information on using the GetOpenIdTokenForDeveloperIdentity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetOpenIdTokenForDeveloperIdentityRequest method. -// req, resp := client.GetOpenIdTokenForDeveloperIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetOpenIdTokenForDeveloperIdentity -func (c *CognitoIdentity) GetOpenIdTokenForDeveloperIdentityRequest(input *GetOpenIdTokenForDeveloperIdentityInput) (req *request.Request, output *GetOpenIdTokenForDeveloperIdentityOutput) { - op := &request.Operation{ - Name: opGetOpenIdTokenForDeveloperIdentity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetOpenIdTokenForDeveloperIdentityInput{} - } - - output = &GetOpenIdTokenForDeveloperIdentityOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOpenIdTokenForDeveloperIdentity API operation for Amazon Cognito Identity. -// -// Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token -// for a user authenticated by your backend authentication process. Supplying -// multiple logins will create an implicit linked account. You can only specify -// one developer provider as part of the Logins map, which is linked to the -// identity pool. The developer provider is the "domain" by which Cognito will -// refer to your users. -// -// You can use GetOpenIdTokenForDeveloperIdentity to create a new identity and -// to link new logins (that is, user credentials issued by a public provider -// or developer provider) to an existing identity. When you want to create a -// new identity, the IdentityId should be null. When you want to associate a -// new login with an existing authenticated/unauthenticated identity, you can -// do so by providing the existing IdentityId. This API will create the identity -// in the specified IdentityPoolId. -// -// You must use AWS Developer credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation GetOpenIdTokenForDeveloperIdentity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// Thrown when a user tries to use a login which is already linked to another -// account. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// * ErrCodeDeveloperUserAlreadyRegisteredException "DeveloperUserAlreadyRegisteredException" -// The provided developer user identifier is already registered with Cognito -// under a different identity ID. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetOpenIdTokenForDeveloperIdentity -func (c *CognitoIdentity) GetOpenIdTokenForDeveloperIdentity(input *GetOpenIdTokenForDeveloperIdentityInput) (*GetOpenIdTokenForDeveloperIdentityOutput, error) { - req, out := c.GetOpenIdTokenForDeveloperIdentityRequest(input) - return out, req.Send() -} - -// GetOpenIdTokenForDeveloperIdentityWithContext is the same as GetOpenIdTokenForDeveloperIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See GetOpenIdTokenForDeveloperIdentity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) GetOpenIdTokenForDeveloperIdentityWithContext(ctx aws.Context, input *GetOpenIdTokenForDeveloperIdentityInput, opts ...request.Option) (*GetOpenIdTokenForDeveloperIdentityOutput, error) { - req, out := c.GetOpenIdTokenForDeveloperIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListIdentities = "ListIdentities" - -// ListIdentitiesRequest generates a "aws/request.Request" representing the -// client's request for the ListIdentities operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListIdentities for more information on using the ListIdentities -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListIdentitiesRequest method. -// req, resp := client.ListIdentitiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/ListIdentities -func (c *CognitoIdentity) ListIdentitiesRequest(input *ListIdentitiesInput) (req *request.Request, output *ListIdentitiesOutput) { - op := &request.Operation{ - Name: opListIdentities, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListIdentitiesInput{} - } - - output = &ListIdentitiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListIdentities API operation for Amazon Cognito Identity. -// -// Lists the identities in a pool. -// -// You must use AWS Developer credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation ListIdentities for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/ListIdentities -func (c *CognitoIdentity) ListIdentities(input *ListIdentitiesInput) (*ListIdentitiesOutput, error) { - req, out := c.ListIdentitiesRequest(input) - return out, req.Send() -} - -// ListIdentitiesWithContext is the same as ListIdentities with the addition of -// the ability to pass a context and additional request options. -// -// See ListIdentities for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) ListIdentitiesWithContext(ctx aws.Context, input *ListIdentitiesInput, opts ...request.Option) (*ListIdentitiesOutput, error) { - req, out := c.ListIdentitiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListIdentityPools = "ListIdentityPools" - -// ListIdentityPoolsRequest generates a "aws/request.Request" representing the -// client's request for the ListIdentityPools operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListIdentityPools for more information on using the ListIdentityPools -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListIdentityPoolsRequest method. -// req, resp := client.ListIdentityPoolsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/ListIdentityPools -func (c *CognitoIdentity) ListIdentityPoolsRequest(input *ListIdentityPoolsInput) (req *request.Request, output *ListIdentityPoolsOutput) { - op := &request.Operation{ - Name: opListIdentityPools, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListIdentityPoolsInput{} - } - - output = &ListIdentityPoolsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListIdentityPools API operation for Amazon Cognito Identity. -// -// Lists all of the Cognito identity pools registered for your account. -// -// You must use AWS Developer credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation ListIdentityPools for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/ListIdentityPools -func (c *CognitoIdentity) ListIdentityPools(input *ListIdentityPoolsInput) (*ListIdentityPoolsOutput, error) { - req, out := c.ListIdentityPoolsRequest(input) - return out, req.Send() -} - -// ListIdentityPoolsWithContext is the same as ListIdentityPools with the addition of -// the ability to pass a context and additional request options. -// -// See ListIdentityPools for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) ListIdentityPoolsWithContext(ctx aws.Context, input *ListIdentityPoolsInput, opts ...request.Option) (*ListIdentityPoolsOutput, error) { - req, out := c.ListIdentityPoolsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opLookupDeveloperIdentity = "LookupDeveloperIdentity" - -// LookupDeveloperIdentityRequest generates a "aws/request.Request" representing the -// client's request for the LookupDeveloperIdentity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See LookupDeveloperIdentity for more information on using the LookupDeveloperIdentity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the LookupDeveloperIdentityRequest method. -// req, resp := client.LookupDeveloperIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/LookupDeveloperIdentity -func (c *CognitoIdentity) LookupDeveloperIdentityRequest(input *LookupDeveloperIdentityInput) (req *request.Request, output *LookupDeveloperIdentityOutput) { - op := &request.Operation{ - Name: opLookupDeveloperIdentity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &LookupDeveloperIdentityInput{} - } - - output = &LookupDeveloperIdentityOutput{} - req = c.newRequest(op, input, output) - return -} - -// LookupDeveloperIdentity API operation for Amazon Cognito Identity. -// -// Retrieves the IdentityID associated with a DeveloperUserIdentifier or the -// list of DeveloperUserIdentifiers associated with an IdentityId for an existing -// identity. Either IdentityID or DeveloperUserIdentifier must not be null. -// If you supply only one of these values, the other value will be searched -// in the database and returned as a part of the response. If you supply both, -// DeveloperUserIdentifier will be matched against IdentityID. If the values -// are verified against the database, the response returns both values and is -// the same as the request. Otherwise a ResourceConflictException is thrown. -// -// You must use AWS Developer credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation LookupDeveloperIdentity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// Thrown when a user tries to use a login which is already linked to another -// account. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/LookupDeveloperIdentity -func (c *CognitoIdentity) LookupDeveloperIdentity(input *LookupDeveloperIdentityInput) (*LookupDeveloperIdentityOutput, error) { - req, out := c.LookupDeveloperIdentityRequest(input) - return out, req.Send() -} - -// LookupDeveloperIdentityWithContext is the same as LookupDeveloperIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See LookupDeveloperIdentity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) LookupDeveloperIdentityWithContext(ctx aws.Context, input *LookupDeveloperIdentityInput, opts ...request.Option) (*LookupDeveloperIdentityOutput, error) { - req, out := c.LookupDeveloperIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opMergeDeveloperIdentities = "MergeDeveloperIdentities" - -// MergeDeveloperIdentitiesRequest generates a "aws/request.Request" representing the -// client's request for the MergeDeveloperIdentities operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See MergeDeveloperIdentities for more information on using the MergeDeveloperIdentities -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the MergeDeveloperIdentitiesRequest method. -// req, resp := client.MergeDeveloperIdentitiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/MergeDeveloperIdentities -func (c *CognitoIdentity) MergeDeveloperIdentitiesRequest(input *MergeDeveloperIdentitiesInput) (req *request.Request, output *MergeDeveloperIdentitiesOutput) { - op := &request.Operation{ - Name: opMergeDeveloperIdentities, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &MergeDeveloperIdentitiesInput{} - } - - output = &MergeDeveloperIdentitiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// MergeDeveloperIdentities API operation for Amazon Cognito Identity. -// -// Merges two users having different IdentityIds, existing in the same identity -// pool, and identified by the same developer provider. You can use this action -// to request that discrete users be merged and identified as a single user -// in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier) -// with the IdentityId of the DestinationUserIdentifier. Only developer-authenticated -// users can be merged. If the users to be merged are associated with the same -// public provider, but as two different users, an exception will be thrown. -// -// You must use AWS Developer credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation MergeDeveloperIdentities for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// Thrown when a user tries to use a login which is already linked to another -// account. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/MergeDeveloperIdentities -func (c *CognitoIdentity) MergeDeveloperIdentities(input *MergeDeveloperIdentitiesInput) (*MergeDeveloperIdentitiesOutput, error) { - req, out := c.MergeDeveloperIdentitiesRequest(input) - return out, req.Send() -} - -// MergeDeveloperIdentitiesWithContext is the same as MergeDeveloperIdentities with the addition of -// the ability to pass a context and additional request options. -// -// See MergeDeveloperIdentities for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) MergeDeveloperIdentitiesWithContext(ctx aws.Context, input *MergeDeveloperIdentitiesInput, opts ...request.Option) (*MergeDeveloperIdentitiesOutput, error) { - req, out := c.MergeDeveloperIdentitiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetIdentityPoolRoles = "SetIdentityPoolRoles" - -// SetIdentityPoolRolesRequest generates a "aws/request.Request" representing the -// client's request for the SetIdentityPoolRoles operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetIdentityPoolRoles for more information on using the SetIdentityPoolRoles -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetIdentityPoolRolesRequest method. -// req, resp := client.SetIdentityPoolRolesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/SetIdentityPoolRoles -func (c *CognitoIdentity) SetIdentityPoolRolesRequest(input *SetIdentityPoolRolesInput) (req *request.Request, output *SetIdentityPoolRolesOutput) { - op := &request.Operation{ - Name: opSetIdentityPoolRoles, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetIdentityPoolRolesInput{} - } - - output = &SetIdentityPoolRolesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetIdentityPoolRoles API operation for Amazon Cognito Identity. -// -// Sets the roles for an identity pool. These roles are used when making calls -// to GetCredentialsForIdentity action. -// -// You must use AWS Developer credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation SetIdentityPoolRoles for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// Thrown when a user tries to use a login which is already linked to another -// account. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Thrown if there are parallel requests to modify a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/SetIdentityPoolRoles -func (c *CognitoIdentity) SetIdentityPoolRoles(input *SetIdentityPoolRolesInput) (*SetIdentityPoolRolesOutput, error) { - req, out := c.SetIdentityPoolRolesRequest(input) - return out, req.Send() -} - -// SetIdentityPoolRolesWithContext is the same as SetIdentityPoolRoles with the addition of -// the ability to pass a context and additional request options. -// -// See SetIdentityPoolRoles for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) SetIdentityPoolRolesWithContext(ctx aws.Context, input *SetIdentityPoolRolesInput, opts ...request.Option) (*SetIdentityPoolRolesOutput, error) { - req, out := c.SetIdentityPoolRolesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUnlinkDeveloperIdentity = "UnlinkDeveloperIdentity" - -// UnlinkDeveloperIdentityRequest generates a "aws/request.Request" representing the -// client's request for the UnlinkDeveloperIdentity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UnlinkDeveloperIdentity for more information on using the UnlinkDeveloperIdentity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UnlinkDeveloperIdentityRequest method. -// req, resp := client.UnlinkDeveloperIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/UnlinkDeveloperIdentity -func (c *CognitoIdentity) UnlinkDeveloperIdentityRequest(input *UnlinkDeveloperIdentityInput) (req *request.Request, output *UnlinkDeveloperIdentityOutput) { - op := &request.Operation{ - Name: opUnlinkDeveloperIdentity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UnlinkDeveloperIdentityInput{} - } - - output = &UnlinkDeveloperIdentityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UnlinkDeveloperIdentity API operation for Amazon Cognito Identity. -// -// Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked developer -// users will be considered new identities next time they are seen. If, for -// a given Cognito identity, you remove all federated identities as well as -// the developer user identifier, the Cognito identity becomes inaccessible. -// -// You must use AWS Developer credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation UnlinkDeveloperIdentity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// Thrown when a user tries to use a login which is already linked to another -// account. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/UnlinkDeveloperIdentity -func (c *CognitoIdentity) UnlinkDeveloperIdentity(input *UnlinkDeveloperIdentityInput) (*UnlinkDeveloperIdentityOutput, error) { - req, out := c.UnlinkDeveloperIdentityRequest(input) - return out, req.Send() -} - -// UnlinkDeveloperIdentityWithContext is the same as UnlinkDeveloperIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See UnlinkDeveloperIdentity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) UnlinkDeveloperIdentityWithContext(ctx aws.Context, input *UnlinkDeveloperIdentityInput, opts ...request.Option) (*UnlinkDeveloperIdentityOutput, error) { - req, out := c.UnlinkDeveloperIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUnlinkIdentity = "UnlinkIdentity" - -// UnlinkIdentityRequest generates a "aws/request.Request" representing the -// client's request for the UnlinkIdentity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UnlinkIdentity for more information on using the UnlinkIdentity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UnlinkIdentityRequest method. -// req, resp := client.UnlinkIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/UnlinkIdentity -func (c *CognitoIdentity) UnlinkIdentityRequest(input *UnlinkIdentityInput) (req *request.Request, output *UnlinkIdentityOutput) { - op := &request.Operation{ - Name: opUnlinkIdentity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UnlinkIdentityInput{} - } - - output = &UnlinkIdentityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UnlinkIdentity API operation for Amazon Cognito Identity. -// -// Unlinks a federated identity from an existing account. Unlinked logins will -// be considered new identities next time they are seen. Removing the last linked -// login will make this identity inaccessible. -// -// This is a public API. You do not need any credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation UnlinkIdentity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// Thrown when a user tries to use a login which is already linked to another -// account. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// * ErrCodeExternalServiceException "ExternalServiceException" -// An exception thrown when a dependent service such as Facebook or Twitter -// is not responding -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/UnlinkIdentity -func (c *CognitoIdentity) UnlinkIdentity(input *UnlinkIdentityInput) (*UnlinkIdentityOutput, error) { - req, out := c.UnlinkIdentityRequest(input) - return out, req.Send() -} - -// UnlinkIdentityWithContext is the same as UnlinkIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See UnlinkIdentity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) UnlinkIdentityWithContext(ctx aws.Context, input *UnlinkIdentityInput, opts ...request.Option) (*UnlinkIdentityOutput, error) { - req, out := c.UnlinkIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateIdentityPool = "UpdateIdentityPool" - -// UpdateIdentityPoolRequest generates a "aws/request.Request" representing the -// client's request for the UpdateIdentityPool operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateIdentityPool for more information on using the UpdateIdentityPool -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateIdentityPoolRequest method. -// req, resp := client.UpdateIdentityPoolRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/UpdateIdentityPool -func (c *CognitoIdentity) UpdateIdentityPoolRequest(input *IdentityPool) (req *request.Request, output *IdentityPool) { - op := &request.Operation{ - Name: opUpdateIdentityPool, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &IdentityPool{} - } - - output = &IdentityPool{} - req = c.newRequest(op, input, output) - return -} - -// UpdateIdentityPool API operation for Amazon Cognito Identity. -// -// Updates a user pool. -// -// You must use AWS Developer credentials to call this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity's -// API operation UpdateIdentityPool for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// Thrown for missing or bad input parameter(s). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Thrown when the requested resource (for example, a dataset or record) does -// not exist. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Thrown when a user is not authorized to access the requested resource. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// Thrown when a user tries to use a login which is already linked to another -// account. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Thrown when a request is throttled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// Thrown when the service encounters an error during processing the request. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Thrown if there are parallel requests to modify a resource. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Thrown when the total number of user pools has exceeded a preset limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/UpdateIdentityPool -func (c *CognitoIdentity) UpdateIdentityPool(input *IdentityPool) (*IdentityPool, error) { - req, out := c.UpdateIdentityPoolRequest(input) - return out, req.Send() -} - -// UpdateIdentityPoolWithContext is the same as UpdateIdentityPool with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateIdentityPool for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentity) UpdateIdentityPoolWithContext(ctx aws.Context, input *IdentityPool, opts ...request.Option) (*IdentityPool, error) { - req, out := c.UpdateIdentityPoolRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Input to the CreateIdentityPool action. -type CreateIdentityPoolInput struct { - _ struct{} `type:"structure"` - - // TRUE if the identity pool supports unauthenticated logins. - // - // AllowUnauthenticatedIdentities is a required field - AllowUnauthenticatedIdentities *bool `type:"boolean" required:"true"` - - // An array of Amazon Cognito Identity user pools and their client IDs. - CognitoIdentityProviders []*Provider `type:"list"` - - // The "domain" by which Cognito will refer to your users. This name acts as - // a placeholder that allows your backend and the Cognito service to communicate - // about the developer provider. For the DeveloperProviderName, you can use - // letters as well as period (.), underscore (_), and dash (-). - // - // Once you have set a developer provider name, you cannot change it. Please - // take care in setting this parameter. - DeveloperProviderName *string `min:"1" type:"string"` - - // A string that you provide. - // - // IdentityPoolName is a required field - IdentityPoolName *string `min:"1" type:"string" required:"true"` - - // A list of OpendID Connect provider ARNs. - OpenIdConnectProviderARNs []*string `type:"list"` - - // An array of Amazon Resource Names (ARNs) of the SAML provider for your identity - // pool. - SamlProviderARNs []*string `type:"list"` - - // Optional key:value pairs mapping provider names to provider app IDs. - SupportedLoginProviders map[string]*string `type:"map"` -} - -// String returns the string representation -func (s CreateIdentityPoolInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIdentityPoolInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateIdentityPoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateIdentityPoolInput"} - if s.AllowUnauthenticatedIdentities == nil { - invalidParams.Add(request.NewErrParamRequired("AllowUnauthenticatedIdentities")) - } - if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1)) - } - if s.IdentityPoolName == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityPoolName")) - } - if s.IdentityPoolName != nil && len(*s.IdentityPoolName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityPoolName", 1)) - } - if s.CognitoIdentityProviders != nil { - for i, v := range s.CognitoIdentityProviders { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CognitoIdentityProviders", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowUnauthenticatedIdentities sets the AllowUnauthenticatedIdentities field's value. -func (s *CreateIdentityPoolInput) SetAllowUnauthenticatedIdentities(v bool) *CreateIdentityPoolInput { - s.AllowUnauthenticatedIdentities = &v - return s -} - -// SetCognitoIdentityProviders sets the CognitoIdentityProviders field's value. -func (s *CreateIdentityPoolInput) SetCognitoIdentityProviders(v []*Provider) *CreateIdentityPoolInput { - s.CognitoIdentityProviders = v - return s -} - -// SetDeveloperProviderName sets the DeveloperProviderName field's value. -func (s *CreateIdentityPoolInput) SetDeveloperProviderName(v string) *CreateIdentityPoolInput { - s.DeveloperProviderName = &v - return s -} - -// SetIdentityPoolName sets the IdentityPoolName field's value. -func (s *CreateIdentityPoolInput) SetIdentityPoolName(v string) *CreateIdentityPoolInput { - s.IdentityPoolName = &v - return s -} - -// SetOpenIdConnectProviderARNs sets the OpenIdConnectProviderARNs field's value. -func (s *CreateIdentityPoolInput) SetOpenIdConnectProviderARNs(v []*string) *CreateIdentityPoolInput { - s.OpenIdConnectProviderARNs = v - return s -} - -// SetSamlProviderARNs sets the SamlProviderARNs field's value. -func (s *CreateIdentityPoolInput) SetSamlProviderARNs(v []*string) *CreateIdentityPoolInput { - s.SamlProviderARNs = v - return s -} - -// SetSupportedLoginProviders sets the SupportedLoginProviders field's value. -func (s *CreateIdentityPoolInput) SetSupportedLoginProviders(v map[string]*string) *CreateIdentityPoolInput { - s.SupportedLoginProviders = v - return s -} - -// Credentials for the provided identity ID. -type Credentials struct { - _ struct{} `type:"structure"` - - // The Access Key portion of the credentials. - AccessKeyId *string `type:"string"` - - // The date at which these credentials will expire. - Expiration *time.Time `type:"timestamp"` - - // The Secret Access Key portion of the credentials - SecretKey *string `type:"string"` - - // The Session Token portion of the credentials - SessionToken *string `type:"string"` -} - -// String returns the string representation -func (s Credentials) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Credentials) GoString() string { - return s.String() -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *Credentials) SetAccessKeyId(v string) *Credentials { - s.AccessKeyId = &v - return s -} - -// SetExpiration sets the Expiration field's value. -func (s *Credentials) SetExpiration(v time.Time) *Credentials { - s.Expiration = &v - return s -} - -// SetSecretKey sets the SecretKey field's value. -func (s *Credentials) SetSecretKey(v string) *Credentials { - s.SecretKey = &v - return s -} - -// SetSessionToken sets the SessionToken field's value. -func (s *Credentials) SetSessionToken(v string) *Credentials { - s.SessionToken = &v - return s -} - -// Input to the DeleteIdentities action. -type DeleteIdentitiesInput struct { - _ struct{} `type:"structure"` - - // A list of 1-60 identities that you want to delete. - // - // IdentityIdsToDelete is a required field - IdentityIdsToDelete []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteIdentitiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIdentitiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIdentitiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIdentitiesInput"} - if s.IdentityIdsToDelete == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityIdsToDelete")) - } - if s.IdentityIdsToDelete != nil && len(s.IdentityIdsToDelete) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityIdsToDelete", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentityIdsToDelete sets the IdentityIdsToDelete field's value. -func (s *DeleteIdentitiesInput) SetIdentityIdsToDelete(v []*string) *DeleteIdentitiesInput { - s.IdentityIdsToDelete = v - return s -} - -// Returned in response to a successful DeleteIdentities operation. -type DeleteIdentitiesOutput struct { - _ struct{} `type:"structure"` - - // An array of UnprocessedIdentityId objects, each of which contains an ErrorCode - // and IdentityId. - UnprocessedIdentityIds []*UnprocessedIdentityId `type:"list"` -} - -// String returns the string representation -func (s DeleteIdentitiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIdentitiesOutput) GoString() string { - return s.String() -} - -// SetUnprocessedIdentityIds sets the UnprocessedIdentityIds field's value. -func (s *DeleteIdentitiesOutput) SetUnprocessedIdentityIds(v []*UnprocessedIdentityId) *DeleteIdentitiesOutput { - s.UnprocessedIdentityIds = v - return s -} - -// Input to the DeleteIdentityPool action. -type DeleteIdentityPoolInput struct { - _ struct{} `type:"structure"` - - // An identity pool ID in the format REGION:GUID. - // - // IdentityPoolId is a required field - IdentityPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteIdentityPoolInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIdentityPoolInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIdentityPoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIdentityPoolInput"} - if s.IdentityPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) - } - if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *DeleteIdentityPoolInput) SetIdentityPoolId(v string) *DeleteIdentityPoolInput { - s.IdentityPoolId = &v - return s -} - -type DeleteIdentityPoolOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteIdentityPoolOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIdentityPoolOutput) GoString() string { - return s.String() -} - -// Input to the DescribeIdentity action. -type DescribeIdentityInput struct { - _ struct{} `type:"structure"` - - // A unique identifier in the format REGION:GUID. - // - // IdentityId is a required field - IdentityId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityInput"} - if s.IdentityId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityId")) - } - if s.IdentityId != nil && len(*s.IdentityId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentityId sets the IdentityId field's value. -func (s *DescribeIdentityInput) SetIdentityId(v string) *DescribeIdentityInput { - s.IdentityId = &v - return s -} - -// Input to the DescribeIdentityPool action. -type DescribeIdentityPoolInput struct { - _ struct{} `type:"structure"` - - // An identity pool ID in the format REGION:GUID. - // - // IdentityPoolId is a required field - IdentityPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeIdentityPoolInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIdentityPoolInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeIdentityPoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityPoolInput"} - if s.IdentityPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) - } - if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *DescribeIdentityPoolInput) SetIdentityPoolId(v string) *DescribeIdentityPoolInput { - s.IdentityPoolId = &v - return s -} - -// Input to the GetCredentialsForIdentity action. -type GetCredentialsForIdentityInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the role to be assumed when multiple roles - // were received in the token from the identity provider. For example, a SAML-based - // identity provider. This parameter is optional for identity providers that - // do not support role customization. - CustomRoleArn *string `min:"20" type:"string"` - - // A unique identifier in the format REGION:GUID. - // - // IdentityId is a required field - IdentityId *string `min:"1" type:"string" required:"true"` - - // A set of optional name-value pairs that map provider names to provider tokens. - Logins map[string]*string `type:"map"` -} - -// String returns the string representation -func (s GetCredentialsForIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCredentialsForIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCredentialsForIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCredentialsForIdentityInput"} - if s.CustomRoleArn != nil && len(*s.CustomRoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CustomRoleArn", 20)) - } - if s.IdentityId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityId")) - } - if s.IdentityId != nil && len(*s.IdentityId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomRoleArn sets the CustomRoleArn field's value. -func (s *GetCredentialsForIdentityInput) SetCustomRoleArn(v string) *GetCredentialsForIdentityInput { - s.CustomRoleArn = &v - return s -} - -// SetIdentityId sets the IdentityId field's value. -func (s *GetCredentialsForIdentityInput) SetIdentityId(v string) *GetCredentialsForIdentityInput { - s.IdentityId = &v - return s -} - -// SetLogins sets the Logins field's value. -func (s *GetCredentialsForIdentityInput) SetLogins(v map[string]*string) *GetCredentialsForIdentityInput { - s.Logins = v - return s -} - -// Returned in response to a successful GetCredentialsForIdentity operation. -type GetCredentialsForIdentityOutput struct { - _ struct{} `type:"structure"` - - // Credentials for the provided identity ID. - Credentials *Credentials `type:"structure"` - - // A unique identifier in the format REGION:GUID. - IdentityId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetCredentialsForIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCredentialsForIdentityOutput) GoString() string { - return s.String() -} - -// SetCredentials sets the Credentials field's value. -func (s *GetCredentialsForIdentityOutput) SetCredentials(v *Credentials) *GetCredentialsForIdentityOutput { - s.Credentials = v - return s -} - -// SetIdentityId sets the IdentityId field's value. -func (s *GetCredentialsForIdentityOutput) SetIdentityId(v string) *GetCredentialsForIdentityOutput { - s.IdentityId = &v - return s -} - -// Input to the GetId action. -type GetIdInput struct { - _ struct{} `type:"structure"` - - // A standard AWS account ID (9+ digits). - AccountId *string `min:"1" type:"string"` - - // An identity pool ID in the format REGION:GUID. - // - // IdentityPoolId is a required field - IdentityPoolId *string `min:"1" type:"string" required:"true"` - - // A set of optional name-value pairs that map provider names to provider tokens. - // The available provider names for Logins are as follows: - // - // * Facebook: graph.facebook.com - // - // * Amazon Cognito Identity Provider: cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789 - // - // * Google: accounts.google.com - // - // * Amazon: www.amazon.com - // - // * Twitter: api.twitter.com - // - // * Digits: www.digits.com - Logins map[string]*string `type:"map"` -} - -// String returns the string representation -func (s GetIdInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIdInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIdInput"} - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.IdentityPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) - } - if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *GetIdInput) SetAccountId(v string) *GetIdInput { - s.AccountId = &v - return s -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *GetIdInput) SetIdentityPoolId(v string) *GetIdInput { - s.IdentityPoolId = &v - return s -} - -// SetLogins sets the Logins field's value. -func (s *GetIdInput) SetLogins(v map[string]*string) *GetIdInput { - s.Logins = v - return s -} - -// Returned in response to a GetId request. -type GetIdOutput struct { - _ struct{} `type:"structure"` - - // A unique identifier in the format REGION:GUID. - IdentityId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetIdOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdOutput) GoString() string { - return s.String() -} - -// SetIdentityId sets the IdentityId field's value. -func (s *GetIdOutput) SetIdentityId(v string) *GetIdOutput { - s.IdentityId = &v - return s -} - -// Input to the GetIdentityPoolRoles action. -type GetIdentityPoolRolesInput struct { - _ struct{} `type:"structure"` - - // An identity pool ID in the format REGION:GUID. - // - // IdentityPoolId is a required field - IdentityPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetIdentityPoolRolesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdentityPoolRolesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIdentityPoolRolesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIdentityPoolRolesInput"} - if s.IdentityPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) - } - if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *GetIdentityPoolRolesInput) SetIdentityPoolId(v string) *GetIdentityPoolRolesInput { - s.IdentityPoolId = &v - return s -} - -// Returned in response to a successful GetIdentityPoolRoles operation. -type GetIdentityPoolRolesOutput struct { - _ struct{} `type:"structure"` - - // An identity pool ID in the format REGION:GUID. - IdentityPoolId *string `min:"1" type:"string"` - - // How users for a specific identity provider are to mapped to roles. This is - // a String-to-RoleMapping object map. The string identifies the identity provider, - // for example, "graph.facebook.com" or "cognito-idp-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id". - RoleMappings map[string]*RoleMapping `type:"map"` - - // The map of roles associated with this pool. Currently only authenticated - // and unauthenticated roles are supported. - Roles map[string]*string `type:"map"` -} - -// String returns the string representation -func (s GetIdentityPoolRolesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdentityPoolRolesOutput) GoString() string { - return s.String() -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *GetIdentityPoolRolesOutput) SetIdentityPoolId(v string) *GetIdentityPoolRolesOutput { - s.IdentityPoolId = &v - return s -} - -// SetRoleMappings sets the RoleMappings field's value. -func (s *GetIdentityPoolRolesOutput) SetRoleMappings(v map[string]*RoleMapping) *GetIdentityPoolRolesOutput { - s.RoleMappings = v - return s -} - -// SetRoles sets the Roles field's value. -func (s *GetIdentityPoolRolesOutput) SetRoles(v map[string]*string) *GetIdentityPoolRolesOutput { - s.Roles = v - return s -} - -// Input to the GetOpenIdTokenForDeveloperIdentity action. -type GetOpenIdTokenForDeveloperIdentityInput struct { - _ struct{} `type:"structure"` - - // A unique identifier in the format REGION:GUID. - IdentityId *string `min:"1" type:"string"` - - // An identity pool ID in the format REGION:GUID. - // - // IdentityPoolId is a required field - IdentityPoolId *string `min:"1" type:"string" required:"true"` - - // A set of optional name-value pairs that map provider names to provider tokens. - // Each name-value pair represents a user from a public provider or developer - // provider. If the user is from a developer provider, the name-value pair will - // follow the syntax "developer_provider_name": "developer_user_identifier". - // The developer provider is the "domain" by which Cognito will refer to your - // users; you provided this domain while creating/updating the identity pool. - // The developer user identifier is an identifier from your backend that uniquely - // identifies a user. When you create an identity pool, you can specify the - // supported logins. - // - // Logins is a required field - Logins map[string]*string `type:"map" required:"true"` - - // The expiration time of the token, in seconds. You can specify a custom expiration - // time for the token so that you can cache it. If you don't provide an expiration - // time, the token is valid for 15 minutes. You can exchange the token with - // Amazon STS for temporary AWS credentials, which are valid for a maximum of - // one hour. The maximum token duration you can set is 24 hours. You should - // take care in setting the expiration time for a token, as there are significant - // security implications: an attacker could use a leaked token to access your - // AWS resources for the token's duration. - TokenDuration *int64 `min:"1" type:"long"` -} - -// String returns the string representation -func (s GetOpenIdTokenForDeveloperIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOpenIdTokenForDeveloperIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOpenIdTokenForDeveloperIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOpenIdTokenForDeveloperIdentityInput"} - if s.IdentityId != nil && len(*s.IdentityId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) - } - if s.IdentityPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) - } - if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) - } - if s.Logins == nil { - invalidParams.Add(request.NewErrParamRequired("Logins")) - } - if s.TokenDuration != nil && *s.TokenDuration < 1 { - invalidParams.Add(request.NewErrParamMinValue("TokenDuration", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentityId sets the IdentityId field's value. -func (s *GetOpenIdTokenForDeveloperIdentityInput) SetIdentityId(v string) *GetOpenIdTokenForDeveloperIdentityInput { - s.IdentityId = &v - return s -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *GetOpenIdTokenForDeveloperIdentityInput) SetIdentityPoolId(v string) *GetOpenIdTokenForDeveloperIdentityInput { - s.IdentityPoolId = &v - return s -} - -// SetLogins sets the Logins field's value. -func (s *GetOpenIdTokenForDeveloperIdentityInput) SetLogins(v map[string]*string) *GetOpenIdTokenForDeveloperIdentityInput { - s.Logins = v - return s -} - -// SetTokenDuration sets the TokenDuration field's value. -func (s *GetOpenIdTokenForDeveloperIdentityInput) SetTokenDuration(v int64) *GetOpenIdTokenForDeveloperIdentityInput { - s.TokenDuration = &v - return s -} - -// Returned in response to a successful GetOpenIdTokenForDeveloperIdentity request. -type GetOpenIdTokenForDeveloperIdentityOutput struct { - _ struct{} `type:"structure"` - - // A unique identifier in the format REGION:GUID. - IdentityId *string `min:"1" type:"string"` - - // An OpenID token. - Token *string `type:"string"` -} - -// String returns the string representation -func (s GetOpenIdTokenForDeveloperIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOpenIdTokenForDeveloperIdentityOutput) GoString() string { - return s.String() -} - -// SetIdentityId sets the IdentityId field's value. -func (s *GetOpenIdTokenForDeveloperIdentityOutput) SetIdentityId(v string) *GetOpenIdTokenForDeveloperIdentityOutput { - s.IdentityId = &v - return s -} - -// SetToken sets the Token field's value. -func (s *GetOpenIdTokenForDeveloperIdentityOutput) SetToken(v string) *GetOpenIdTokenForDeveloperIdentityOutput { - s.Token = &v - return s -} - -// Input to the GetOpenIdToken action. -type GetOpenIdTokenInput struct { - _ struct{} `type:"structure"` - - // A unique identifier in the format REGION:GUID. - // - // IdentityId is a required field - IdentityId *string `min:"1" type:"string" required:"true"` - - // A set of optional name-value pairs that map provider names to provider tokens. - // When using graph.facebook.com and www.amazon.com, supply the access_token - // returned from the provider's authflow. For accounts.google.com, an Amazon - // Cognito Identity Provider, or any other OpenId Connect provider, always include - // the id_token. - Logins map[string]*string `type:"map"` -} - -// String returns the string representation -func (s GetOpenIdTokenInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOpenIdTokenInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOpenIdTokenInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOpenIdTokenInput"} - if s.IdentityId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityId")) - } - if s.IdentityId != nil && len(*s.IdentityId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentityId sets the IdentityId field's value. -func (s *GetOpenIdTokenInput) SetIdentityId(v string) *GetOpenIdTokenInput { - s.IdentityId = &v - return s -} - -// SetLogins sets the Logins field's value. -func (s *GetOpenIdTokenInput) SetLogins(v map[string]*string) *GetOpenIdTokenInput { - s.Logins = v - return s -} - -// Returned in response to a successful GetOpenIdToken request. -type GetOpenIdTokenOutput struct { - _ struct{} `type:"structure"` - - // A unique identifier in the format REGION:GUID. Note that the IdentityId returned - // may not match the one passed on input. - IdentityId *string `min:"1" type:"string"` - - // An OpenID token, valid for 15 minutes. - Token *string `type:"string"` -} - -// String returns the string representation -func (s GetOpenIdTokenOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOpenIdTokenOutput) GoString() string { - return s.String() -} - -// SetIdentityId sets the IdentityId field's value. -func (s *GetOpenIdTokenOutput) SetIdentityId(v string) *GetOpenIdTokenOutput { - s.IdentityId = &v - return s -} - -// SetToken sets the Token field's value. -func (s *GetOpenIdTokenOutput) SetToken(v string) *GetOpenIdTokenOutput { - s.Token = &v - return s -} - -// A description of the identity. -type IdentityDescription struct { - _ struct{} `type:"structure"` - - // Date on which the identity was created. - CreationDate *time.Time `type:"timestamp"` - - // A unique identifier in the format REGION:GUID. - IdentityId *string `min:"1" type:"string"` - - // Date on which the identity was last modified. - LastModifiedDate *time.Time `type:"timestamp"` - - // A set of optional name-value pairs that map provider names to provider tokens. - Logins []*string `type:"list"` -} - -// String returns the string representation -func (s IdentityDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IdentityDescription) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *IdentityDescription) SetCreationDate(v time.Time) *IdentityDescription { - s.CreationDate = &v - return s -} - -// SetIdentityId sets the IdentityId field's value. -func (s *IdentityDescription) SetIdentityId(v string) *IdentityDescription { - s.IdentityId = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *IdentityDescription) SetLastModifiedDate(v time.Time) *IdentityDescription { - s.LastModifiedDate = &v - return s -} - -// SetLogins sets the Logins field's value. -func (s *IdentityDescription) SetLogins(v []*string) *IdentityDescription { - s.Logins = v - return s -} - -// An object representing an Amazon Cognito identity pool. -type IdentityPool struct { - _ struct{} `type:"structure"` - - // TRUE if the identity pool supports unauthenticated logins. - // - // AllowUnauthenticatedIdentities is a required field - AllowUnauthenticatedIdentities *bool `type:"boolean" required:"true"` - - // A list representing an Amazon Cognito Identity User Pool and its client ID. - CognitoIdentityProviders []*Provider `type:"list"` - - // The "domain" by which Cognito will refer to your users. - DeveloperProviderName *string `min:"1" type:"string"` - - // An identity pool ID in the format REGION:GUID. - // - // IdentityPoolId is a required field - IdentityPoolId *string `min:"1" type:"string" required:"true"` - - // A string that you provide. - // - // IdentityPoolName is a required field - IdentityPoolName *string `min:"1" type:"string" required:"true"` - - // A list of OpendID Connect provider ARNs. - OpenIdConnectProviderARNs []*string `type:"list"` - - // An array of Amazon Resource Names (ARNs) of the SAML provider for your identity - // pool. - SamlProviderARNs []*string `type:"list"` - - // Optional key:value pairs mapping provider names to provider app IDs. - SupportedLoginProviders map[string]*string `type:"map"` -} - -// String returns the string representation -func (s IdentityPool) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IdentityPool) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IdentityPool) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IdentityPool"} - if s.AllowUnauthenticatedIdentities == nil { - invalidParams.Add(request.NewErrParamRequired("AllowUnauthenticatedIdentities")) - } - if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1)) - } - if s.IdentityPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) - } - if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) - } - if s.IdentityPoolName == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityPoolName")) - } - if s.IdentityPoolName != nil && len(*s.IdentityPoolName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityPoolName", 1)) - } - if s.CognitoIdentityProviders != nil { - for i, v := range s.CognitoIdentityProviders { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CognitoIdentityProviders", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowUnauthenticatedIdentities sets the AllowUnauthenticatedIdentities field's value. -func (s *IdentityPool) SetAllowUnauthenticatedIdentities(v bool) *IdentityPool { - s.AllowUnauthenticatedIdentities = &v - return s -} - -// SetCognitoIdentityProviders sets the CognitoIdentityProviders field's value. -func (s *IdentityPool) SetCognitoIdentityProviders(v []*Provider) *IdentityPool { - s.CognitoIdentityProviders = v - return s -} - -// SetDeveloperProviderName sets the DeveloperProviderName field's value. -func (s *IdentityPool) SetDeveloperProviderName(v string) *IdentityPool { - s.DeveloperProviderName = &v - return s -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *IdentityPool) SetIdentityPoolId(v string) *IdentityPool { - s.IdentityPoolId = &v - return s -} - -// SetIdentityPoolName sets the IdentityPoolName field's value. -func (s *IdentityPool) SetIdentityPoolName(v string) *IdentityPool { - s.IdentityPoolName = &v - return s -} - -// SetOpenIdConnectProviderARNs sets the OpenIdConnectProviderARNs field's value. -func (s *IdentityPool) SetOpenIdConnectProviderARNs(v []*string) *IdentityPool { - s.OpenIdConnectProviderARNs = v - return s -} - -// SetSamlProviderARNs sets the SamlProviderARNs field's value. -func (s *IdentityPool) SetSamlProviderARNs(v []*string) *IdentityPool { - s.SamlProviderARNs = v - return s -} - -// SetSupportedLoginProviders sets the SupportedLoginProviders field's value. -func (s *IdentityPool) SetSupportedLoginProviders(v map[string]*string) *IdentityPool { - s.SupportedLoginProviders = v - return s -} - -// A description of the identity pool. -type IdentityPoolShortDescription struct { - _ struct{} `type:"structure"` - - // An identity pool ID in the format REGION:GUID. - IdentityPoolId *string `min:"1" type:"string"` - - // A string that you provide. - IdentityPoolName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s IdentityPoolShortDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IdentityPoolShortDescription) GoString() string { - return s.String() -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *IdentityPoolShortDescription) SetIdentityPoolId(v string) *IdentityPoolShortDescription { - s.IdentityPoolId = &v - return s -} - -// SetIdentityPoolName sets the IdentityPoolName field's value. -func (s *IdentityPoolShortDescription) SetIdentityPoolName(v string) *IdentityPoolShortDescription { - s.IdentityPoolName = &v - return s -} - -// Input to the ListIdentities action. -type ListIdentitiesInput struct { - _ struct{} `type:"structure"` - - // An optional boolean parameter that allows you to hide disabled identities. - // If omitted, the ListIdentities API will include disabled identities in the - // response. - HideDisabled *bool `type:"boolean"` - - // An identity pool ID in the format REGION:GUID. - // - // IdentityPoolId is a required field - IdentityPoolId *string `min:"1" type:"string" required:"true"` - - // The maximum number of identities to return. - // - // MaxResults is a required field - MaxResults *int64 `min:"1" type:"integer" required:"true"` - - // A pagination token. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListIdentitiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIdentitiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListIdentitiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListIdentitiesInput"} - if s.IdentityPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) - } - if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) - } - if s.MaxResults == nil { - invalidParams.Add(request.NewErrParamRequired("MaxResults")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHideDisabled sets the HideDisabled field's value. -func (s *ListIdentitiesInput) SetHideDisabled(v bool) *ListIdentitiesInput { - s.HideDisabled = &v - return s -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *ListIdentitiesInput) SetIdentityPoolId(v string) *ListIdentitiesInput { - s.IdentityPoolId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListIdentitiesInput) SetMaxResults(v int64) *ListIdentitiesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListIdentitiesInput) SetNextToken(v string) *ListIdentitiesInput { - s.NextToken = &v - return s -} - -// The response to a ListIdentities request. -type ListIdentitiesOutput struct { - _ struct{} `type:"structure"` - - // An object containing a set of identities and associated mappings. - Identities []*IdentityDescription `type:"list"` - - // An identity pool ID in the format REGION:GUID. - IdentityPoolId *string `min:"1" type:"string"` - - // A pagination token. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListIdentitiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIdentitiesOutput) GoString() string { - return s.String() -} - -// SetIdentities sets the Identities field's value. -func (s *ListIdentitiesOutput) SetIdentities(v []*IdentityDescription) *ListIdentitiesOutput { - s.Identities = v - return s -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *ListIdentitiesOutput) SetIdentityPoolId(v string) *ListIdentitiesOutput { - s.IdentityPoolId = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListIdentitiesOutput) SetNextToken(v string) *ListIdentitiesOutput { - s.NextToken = &v - return s -} - -// Input to the ListIdentityPools action. -type ListIdentityPoolsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of identities to return. - // - // MaxResults is a required field - MaxResults *int64 `min:"1" type:"integer" required:"true"` - - // A pagination token. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListIdentityPoolsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIdentityPoolsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListIdentityPoolsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListIdentityPoolsInput"} - if s.MaxResults == nil { - invalidParams.Add(request.NewErrParamRequired("MaxResults")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListIdentityPoolsInput) SetMaxResults(v int64) *ListIdentityPoolsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListIdentityPoolsInput) SetNextToken(v string) *ListIdentityPoolsInput { - s.NextToken = &v - return s -} - -// The result of a successful ListIdentityPools action. -type ListIdentityPoolsOutput struct { - _ struct{} `type:"structure"` - - // The identity pools returned by the ListIdentityPools action. - IdentityPools []*IdentityPoolShortDescription `type:"list"` - - // A pagination token. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListIdentityPoolsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIdentityPoolsOutput) GoString() string { - return s.String() -} - -// SetIdentityPools sets the IdentityPools field's value. -func (s *ListIdentityPoolsOutput) SetIdentityPools(v []*IdentityPoolShortDescription) *ListIdentityPoolsOutput { - s.IdentityPools = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListIdentityPoolsOutput) SetNextToken(v string) *ListIdentityPoolsOutput { - s.NextToken = &v - return s -} - -// Input to the LookupDeveloperIdentityInput action. -type LookupDeveloperIdentityInput struct { - _ struct{} `type:"structure"` - - // A unique ID used by your backend authentication process to identify a user. - // Typically, a developer identity provider would issue many developer user - // identifiers, in keeping with the number of users. - DeveloperUserIdentifier *string `min:"1" type:"string"` - - // A unique identifier in the format REGION:GUID. - IdentityId *string `min:"1" type:"string"` - - // An identity pool ID in the format REGION:GUID. - // - // IdentityPoolId is a required field - IdentityPoolId *string `min:"1" type:"string" required:"true"` - - // The maximum number of identities to return. - MaxResults *int64 `min:"1" type:"integer"` - - // A pagination token. The first call you make will have NextToken set to null. - // After that the service will return NextToken values as needed. For example, - // let's say you make a request with MaxResults set to 10, and there are 20 - // matches in the database. The service will return a pagination token as a - // part of the response. This token can be used to call the API again and get - // results starting from the 11th match. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s LookupDeveloperIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LookupDeveloperIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LookupDeveloperIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LookupDeveloperIdentityInput"} - if s.DeveloperUserIdentifier != nil && len(*s.DeveloperUserIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeveloperUserIdentifier", 1)) - } - if s.IdentityId != nil && len(*s.IdentityId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) - } - if s.IdentityPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) - } - if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeveloperUserIdentifier sets the DeveloperUserIdentifier field's value. -func (s *LookupDeveloperIdentityInput) SetDeveloperUserIdentifier(v string) *LookupDeveloperIdentityInput { - s.DeveloperUserIdentifier = &v - return s -} - -// SetIdentityId sets the IdentityId field's value. -func (s *LookupDeveloperIdentityInput) SetIdentityId(v string) *LookupDeveloperIdentityInput { - s.IdentityId = &v - return s -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *LookupDeveloperIdentityInput) SetIdentityPoolId(v string) *LookupDeveloperIdentityInput { - s.IdentityPoolId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *LookupDeveloperIdentityInput) SetMaxResults(v int64) *LookupDeveloperIdentityInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *LookupDeveloperIdentityInput) SetNextToken(v string) *LookupDeveloperIdentityInput { - s.NextToken = &v - return s -} - -// Returned in response to a successful LookupDeveloperIdentity action. -type LookupDeveloperIdentityOutput struct { - _ struct{} `type:"structure"` - - // This is the list of developer user identifiers associated with an identity - // ID. Cognito supports the association of multiple developer user identifiers - // with an identity ID. - DeveloperUserIdentifierList []*string `type:"list"` - - // A unique identifier in the format REGION:GUID. - IdentityId *string `min:"1" type:"string"` - - // A pagination token. The first call you make will have NextToken set to null. - // After that the service will return NextToken values as needed. For example, - // let's say you make a request with MaxResults set to 10, and there are 20 - // matches in the database. The service will return a pagination token as a - // part of the response. This token can be used to call the API again and get - // results starting from the 11th match. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s LookupDeveloperIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LookupDeveloperIdentityOutput) GoString() string { - return s.String() -} - -// SetDeveloperUserIdentifierList sets the DeveloperUserIdentifierList field's value. -func (s *LookupDeveloperIdentityOutput) SetDeveloperUserIdentifierList(v []*string) *LookupDeveloperIdentityOutput { - s.DeveloperUserIdentifierList = v - return s -} - -// SetIdentityId sets the IdentityId field's value. -func (s *LookupDeveloperIdentityOutput) SetIdentityId(v string) *LookupDeveloperIdentityOutput { - s.IdentityId = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *LookupDeveloperIdentityOutput) SetNextToken(v string) *LookupDeveloperIdentityOutput { - s.NextToken = &v - return s -} - -// A rule that maps a claim name, a claim value, and a match type to a role -// ARN. -type MappingRule struct { - _ struct{} `type:"structure"` - - // The claim name that must be present in the token, for example, "isAdmin" - // or "paid". - // - // Claim is a required field - Claim *string `min:"1" type:"string" required:"true"` - - // The match condition that specifies how closely the claim value in the IdP - // token must match Value. - // - // MatchType is a required field - MatchType *string `type:"string" required:"true" enum:"MappingRuleMatchType"` - - // The role ARN. - // - // RoleARN is a required field - RoleARN *string `min:"20" type:"string" required:"true"` - - // A brief string that the claim must match, for example, "paid" or "yes". - // - // Value is a required field - Value *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s MappingRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MappingRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MappingRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MappingRule"} - if s.Claim == nil { - invalidParams.Add(request.NewErrParamRequired("Claim")) - } - if s.Claim != nil && len(*s.Claim) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Claim", 1)) - } - if s.MatchType == nil { - invalidParams.Add(request.NewErrParamRequired("MatchType")) - } - if s.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.RoleARN != nil && len(*s.RoleARN) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 20)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClaim sets the Claim field's value. -func (s *MappingRule) SetClaim(v string) *MappingRule { - s.Claim = &v - return s -} - -// SetMatchType sets the MatchType field's value. -func (s *MappingRule) SetMatchType(v string) *MappingRule { - s.MatchType = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *MappingRule) SetRoleARN(v string) *MappingRule { - s.RoleARN = &v - return s -} - -// SetValue sets the Value field's value. -func (s *MappingRule) SetValue(v string) *MappingRule { - s.Value = &v - return s -} - -// Input to the MergeDeveloperIdentities action. -type MergeDeveloperIdentitiesInput struct { - _ struct{} `type:"structure"` - - // User identifier for the destination user. The value should be a DeveloperUserIdentifier. - // - // DestinationUserIdentifier is a required field - DestinationUserIdentifier *string `min:"1" type:"string" required:"true"` - - // The "domain" by which Cognito will refer to your users. This is a (pseudo) - // domain name that you provide while creating an identity pool. This name acts - // as a placeholder that allows your backend and the Cognito service to communicate - // about the developer provider. For the DeveloperProviderName, you can use - // letters as well as period (.), underscore (_), and dash (-). - // - // DeveloperProviderName is a required field - DeveloperProviderName *string `min:"1" type:"string" required:"true"` - - // An identity pool ID in the format REGION:GUID. - // - // IdentityPoolId is a required field - IdentityPoolId *string `min:"1" type:"string" required:"true"` - - // User identifier for the source user. The value should be a DeveloperUserIdentifier. - // - // SourceUserIdentifier is a required field - SourceUserIdentifier *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s MergeDeveloperIdentitiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MergeDeveloperIdentitiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MergeDeveloperIdentitiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MergeDeveloperIdentitiesInput"} - if s.DestinationUserIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationUserIdentifier")) - } - if s.DestinationUserIdentifier != nil && len(*s.DestinationUserIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DestinationUserIdentifier", 1)) - } - if s.DeveloperProviderName == nil { - invalidParams.Add(request.NewErrParamRequired("DeveloperProviderName")) - } - if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1)) - } - if s.IdentityPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) - } - if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) - } - if s.SourceUserIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceUserIdentifier")) - } - if s.SourceUserIdentifier != nil && len(*s.SourceUserIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceUserIdentifier", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationUserIdentifier sets the DestinationUserIdentifier field's value. -func (s *MergeDeveloperIdentitiesInput) SetDestinationUserIdentifier(v string) *MergeDeveloperIdentitiesInput { - s.DestinationUserIdentifier = &v - return s -} - -// SetDeveloperProviderName sets the DeveloperProviderName field's value. -func (s *MergeDeveloperIdentitiesInput) SetDeveloperProviderName(v string) *MergeDeveloperIdentitiesInput { - s.DeveloperProviderName = &v - return s -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *MergeDeveloperIdentitiesInput) SetIdentityPoolId(v string) *MergeDeveloperIdentitiesInput { - s.IdentityPoolId = &v - return s -} - -// SetSourceUserIdentifier sets the SourceUserIdentifier field's value. -func (s *MergeDeveloperIdentitiesInput) SetSourceUserIdentifier(v string) *MergeDeveloperIdentitiesInput { - s.SourceUserIdentifier = &v - return s -} - -// Returned in response to a successful MergeDeveloperIdentities action. -type MergeDeveloperIdentitiesOutput struct { - _ struct{} `type:"structure"` - - // A unique identifier in the format REGION:GUID. - IdentityId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s MergeDeveloperIdentitiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MergeDeveloperIdentitiesOutput) GoString() string { - return s.String() -} - -// SetIdentityId sets the IdentityId field's value. -func (s *MergeDeveloperIdentitiesOutput) SetIdentityId(v string) *MergeDeveloperIdentitiesOutput { - s.IdentityId = &v - return s -} - -// A provider representing an Amazon Cognito Identity User Pool and its client -// ID. -type Provider struct { - _ struct{} `type:"structure"` - - // The client ID for the Amazon Cognito Identity User Pool. - ClientId *string `min:"1" type:"string"` - - // The provider name for an Amazon Cognito Identity User Pool. For example, - // cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789. - ProviderName *string `min:"1" type:"string"` - - // TRUE if server-side token validation is enabled for the identity provider’s - // token. - ServerSideTokenCheck *bool `type:"boolean"` -} - -// String returns the string representation -func (s Provider) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Provider) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Provider) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Provider"} - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.ProviderName != nil && len(*s.ProviderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProviderName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientId sets the ClientId field's value. -func (s *Provider) SetClientId(v string) *Provider { - s.ClientId = &v - return s -} - -// SetProviderName sets the ProviderName field's value. -func (s *Provider) SetProviderName(v string) *Provider { - s.ProviderName = &v - return s -} - -// SetServerSideTokenCheck sets the ServerSideTokenCheck field's value. -func (s *Provider) SetServerSideTokenCheck(v bool) *Provider { - s.ServerSideTokenCheck = &v - return s -} - -// A role mapping. -type RoleMapping struct { - _ struct{} `type:"structure"` - - // If you specify Token or Rules as the Type, AmbiguousRoleResolution is required. - // - // Specifies the action to be taken if either no rules match the claim value - // for the Rules type, or there is no cognito:preferred_role claim and there - // are multiple cognito:roles matches for the Token type. - AmbiguousRoleResolution *string `type:"string" enum:"AmbiguousRoleResolutionType"` - - // The rules to be used for mapping users to roles. - // - // If you specify Rules as the role mapping type, RulesConfiguration is required. - RulesConfiguration *RulesConfigurationType `type:"structure"` - - // The role mapping type. Token will use cognito:roles and cognito:preferred_role - // claims from the Cognito identity provider token to map groups to roles. Rules - // will attempt to match claims from the token to map to a role. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"RoleMappingType"` -} - -// String returns the string representation -func (s RoleMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RoleMapping) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RoleMapping) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RoleMapping"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.RulesConfiguration != nil { - if err := s.RulesConfiguration.Validate(); err != nil { - invalidParams.AddNested("RulesConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAmbiguousRoleResolution sets the AmbiguousRoleResolution field's value. -func (s *RoleMapping) SetAmbiguousRoleResolution(v string) *RoleMapping { - s.AmbiguousRoleResolution = &v - return s -} - -// SetRulesConfiguration sets the RulesConfiguration field's value. -func (s *RoleMapping) SetRulesConfiguration(v *RulesConfigurationType) *RoleMapping { - s.RulesConfiguration = v - return s -} - -// SetType sets the Type field's value. -func (s *RoleMapping) SetType(v string) *RoleMapping { - s.Type = &v - return s -} - -// A container for rules. -type RulesConfigurationType struct { - _ struct{} `type:"structure"` - - // An array of rules. You can specify up to 25 rules per identity provider. - // - // Rules are evaluated in order. The first one to match specifies the role. - // - // Rules is a required field - Rules []*MappingRule `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s RulesConfigurationType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RulesConfigurationType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RulesConfigurationType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RulesConfigurationType"} - if s.Rules == nil { - invalidParams.Add(request.NewErrParamRequired("Rules")) - } - if s.Rules != nil && len(s.Rules) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Rules", 1)) - } - if s.Rules != nil { - for i, v := range s.Rules { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRules sets the Rules field's value. -func (s *RulesConfigurationType) SetRules(v []*MappingRule) *RulesConfigurationType { - s.Rules = v - return s -} - -// Input to the SetIdentityPoolRoles action. -type SetIdentityPoolRolesInput struct { - _ struct{} `type:"structure"` - - // An identity pool ID in the format REGION:GUID. - // - // IdentityPoolId is a required field - IdentityPoolId *string `min:"1" type:"string" required:"true"` - - // How users for a specific identity provider are to mapped to roles. This is - // a string to RoleMapping object map. The string identifies the identity provider, - // for example, "graph.facebook.com" or "cognito-idp-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id". - // - // Up to 25 rules can be specified per identity provider. - RoleMappings map[string]*RoleMapping `type:"map"` - - // The map of roles associated with this pool. For a given role, the key will - // be either "authenticated" or "unauthenticated" and the value will be the - // Role ARN. - // - // Roles is a required field - Roles map[string]*string `type:"map" required:"true"` -} - -// String returns the string representation -func (s SetIdentityPoolRolesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetIdentityPoolRolesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetIdentityPoolRolesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetIdentityPoolRolesInput"} - if s.IdentityPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) - } - if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) - } - if s.Roles == nil { - invalidParams.Add(request.NewErrParamRequired("Roles")) - } - if s.RoleMappings != nil { - for i, v := range s.RoleMappings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoleMappings", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *SetIdentityPoolRolesInput) SetIdentityPoolId(v string) *SetIdentityPoolRolesInput { - s.IdentityPoolId = &v - return s -} - -// SetRoleMappings sets the RoleMappings field's value. -func (s *SetIdentityPoolRolesInput) SetRoleMappings(v map[string]*RoleMapping) *SetIdentityPoolRolesInput { - s.RoleMappings = v - return s -} - -// SetRoles sets the Roles field's value. -func (s *SetIdentityPoolRolesInput) SetRoles(v map[string]*string) *SetIdentityPoolRolesInput { - s.Roles = v - return s -} - -type SetIdentityPoolRolesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetIdentityPoolRolesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetIdentityPoolRolesOutput) GoString() string { - return s.String() -} - -// Input to the UnlinkDeveloperIdentity action. -type UnlinkDeveloperIdentityInput struct { - _ struct{} `type:"structure"` - - // The "domain" by which Cognito will refer to your users. - // - // DeveloperProviderName is a required field - DeveloperProviderName *string `min:"1" type:"string" required:"true"` - - // A unique ID used by your backend authentication process to identify a user. - // - // DeveloperUserIdentifier is a required field - DeveloperUserIdentifier *string `min:"1" type:"string" required:"true"` - - // A unique identifier in the format REGION:GUID. - // - // IdentityId is a required field - IdentityId *string `min:"1" type:"string" required:"true"` - - // An identity pool ID in the format REGION:GUID. - // - // IdentityPoolId is a required field - IdentityPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UnlinkDeveloperIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnlinkDeveloperIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UnlinkDeveloperIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UnlinkDeveloperIdentityInput"} - if s.DeveloperProviderName == nil { - invalidParams.Add(request.NewErrParamRequired("DeveloperProviderName")) - } - if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1)) - } - if s.DeveloperUserIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DeveloperUserIdentifier")) - } - if s.DeveloperUserIdentifier != nil && len(*s.DeveloperUserIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeveloperUserIdentifier", 1)) - } - if s.IdentityId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityId")) - } - if s.IdentityId != nil && len(*s.IdentityId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) - } - if s.IdentityPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) - } - if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeveloperProviderName sets the DeveloperProviderName field's value. -func (s *UnlinkDeveloperIdentityInput) SetDeveloperProviderName(v string) *UnlinkDeveloperIdentityInput { - s.DeveloperProviderName = &v - return s -} - -// SetDeveloperUserIdentifier sets the DeveloperUserIdentifier field's value. -func (s *UnlinkDeveloperIdentityInput) SetDeveloperUserIdentifier(v string) *UnlinkDeveloperIdentityInput { - s.DeveloperUserIdentifier = &v - return s -} - -// SetIdentityId sets the IdentityId field's value. -func (s *UnlinkDeveloperIdentityInput) SetIdentityId(v string) *UnlinkDeveloperIdentityInput { - s.IdentityId = &v - return s -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *UnlinkDeveloperIdentityInput) SetIdentityPoolId(v string) *UnlinkDeveloperIdentityInput { - s.IdentityPoolId = &v - return s -} - -type UnlinkDeveloperIdentityOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UnlinkDeveloperIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnlinkDeveloperIdentityOutput) GoString() string { - return s.String() -} - -// Input to the UnlinkIdentity action. -type UnlinkIdentityInput struct { - _ struct{} `type:"structure"` - - // A unique identifier in the format REGION:GUID. - // - // IdentityId is a required field - IdentityId *string `min:"1" type:"string" required:"true"` - - // A set of optional name-value pairs that map provider names to provider tokens. - // - // Logins is a required field - Logins map[string]*string `type:"map" required:"true"` - - // Provider names to unlink from this identity. - // - // LoginsToRemove is a required field - LoginsToRemove []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s UnlinkIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnlinkIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UnlinkIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UnlinkIdentityInput"} - if s.IdentityId == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityId")) - } - if s.IdentityId != nil && len(*s.IdentityId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) - } - if s.Logins == nil { - invalidParams.Add(request.NewErrParamRequired("Logins")) - } - if s.LoginsToRemove == nil { - invalidParams.Add(request.NewErrParamRequired("LoginsToRemove")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentityId sets the IdentityId field's value. -func (s *UnlinkIdentityInput) SetIdentityId(v string) *UnlinkIdentityInput { - s.IdentityId = &v - return s -} - -// SetLogins sets the Logins field's value. -func (s *UnlinkIdentityInput) SetLogins(v map[string]*string) *UnlinkIdentityInput { - s.Logins = v - return s -} - -// SetLoginsToRemove sets the LoginsToRemove field's value. -func (s *UnlinkIdentityInput) SetLoginsToRemove(v []*string) *UnlinkIdentityInput { - s.LoginsToRemove = v - return s -} - -type UnlinkIdentityOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UnlinkIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnlinkIdentityOutput) GoString() string { - return s.String() -} - -// An array of UnprocessedIdentityId objects, each of which contains an ErrorCode -// and IdentityId. -type UnprocessedIdentityId struct { - _ struct{} `type:"structure"` - - // The error code indicating the type of error that occurred. - ErrorCode *string `type:"string" enum:"ErrorCode"` - - // A unique identifier in the format REGION:GUID. - IdentityId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UnprocessedIdentityId) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnprocessedIdentityId) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *UnprocessedIdentityId) SetErrorCode(v string) *UnprocessedIdentityId { - s.ErrorCode = &v - return s -} - -// SetIdentityId sets the IdentityId field's value. -func (s *UnprocessedIdentityId) SetIdentityId(v string) *UnprocessedIdentityId { - s.IdentityId = &v - return s -} - -const ( - // AmbiguousRoleResolutionTypeAuthenticatedRole is a AmbiguousRoleResolutionType enum value - AmbiguousRoleResolutionTypeAuthenticatedRole = "AuthenticatedRole" - - // AmbiguousRoleResolutionTypeDeny is a AmbiguousRoleResolutionType enum value - AmbiguousRoleResolutionTypeDeny = "Deny" -) - -const ( - // ErrorCodeAccessDenied is a ErrorCode enum value - ErrorCodeAccessDenied = "AccessDenied" - - // ErrorCodeInternalServerError is a ErrorCode enum value - ErrorCodeInternalServerError = "InternalServerError" -) - -const ( - // MappingRuleMatchTypeEquals is a MappingRuleMatchType enum value - MappingRuleMatchTypeEquals = "Equals" - - // MappingRuleMatchTypeContains is a MappingRuleMatchType enum value - MappingRuleMatchTypeContains = "Contains" - - // MappingRuleMatchTypeStartsWith is a MappingRuleMatchType enum value - MappingRuleMatchTypeStartsWith = "StartsWith" - - // MappingRuleMatchTypeNotEqual is a MappingRuleMatchType enum value - MappingRuleMatchTypeNotEqual = "NotEqual" -) - -const ( - // RoleMappingTypeToken is a RoleMappingType enum value - RoleMappingTypeToken = "Token" - - // RoleMappingTypeRules is a RoleMappingType enum value - RoleMappingTypeRules = "Rules" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/customizations.go deleted file mode 100644 index 4bf243c35..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/customizations.go +++ /dev/null @@ -1,12 +0,0 @@ -package cognitoidentity - -import "github.com/aws/aws-sdk-go/aws/request" - -func init() { - initRequest = func(r *request.Request) { - switch r.Operation.Name { - case opGetOpenIdToken, opGetId, opGetCredentialsForIdentity: - r.Handlers.Sign.Clear() // these operations are unsigned - } - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/doc.go deleted file mode 100644 index 8060d833a..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/doc.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package cognitoidentity provides the client and types for making API -// requests to Amazon Cognito Identity. -// -// Amazon Cognito is a web service that delivers scoped temporary credentials -// to mobile devices and other untrusted environments. Amazon Cognito uniquely -// identifies a device and supplies the user with a consistent identity over -// the lifetime of an application. -// -// Using Amazon Cognito, you can enable authentication with one or more third-party -// identity providers (Facebook, Google, or Login with Amazon), and you can -// also choose to support unauthenticated access from your app. Cognito delivers -// a unique identifier for each user and acts as an OpenID token provider trusted -// by AWS Security Token Service (STS) to access temporary, limited-privilege -// AWS credentials. -// -// To provide end-user credentials, first make an unsigned call to GetId. If -// the end user is authenticated with one of the supported identity providers, -// set the Logins map with the identity provider token. GetId returns a unique -// identifier for the user. -// -// Next, make an unsigned call to GetCredentialsForIdentity. This call expects -// the same Logins map as the GetId call, as well as the IdentityID originally -// returned by GetId. Assuming your identity pool has been configured via the -// SetIdentityPoolRoles operation, GetCredentialsForIdentity will return AWS -// credentials for your use. If your pool has not been configured with SetIdentityPoolRoles, -// or if you want to follow legacy flow, make an unsigned call to GetOpenIdToken, -// which returns the OpenID token necessary to call STS and retrieve AWS credentials. -// This call expects the same Logins map as the GetId call, as well as the IdentityID -// originally returned by GetId. The token returned by GetOpenIdToken can be -// passed to the STS operation AssumeRoleWithWebIdentity (http://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html) -// to retrieve AWS credentials. -// -// If you want to use Amazon Cognito in an Android, iOS, or Unity application, -// you will probably want to make API calls via the AWS Mobile SDK. To learn -// more, see the AWS Mobile SDK Developer Guide (http://docs.aws.amazon.com/mobile/index.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30 for more information on this service. -// -// See cognitoidentity package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cognitoidentity/ -// -// Using the Client -// -// To contact Amazon Cognito Identity with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Cognito Identity client CognitoIdentity for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cognitoidentity/#New -package cognitoidentity diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/errors.go deleted file mode 100644 index 9094d135b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/errors.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cognitoidentity - -const ( - - // ErrCodeConcurrentModificationException for service response error code - // "ConcurrentModificationException". - // - // Thrown if there are parallel requests to modify a resource. - ErrCodeConcurrentModificationException = "ConcurrentModificationException" - - // ErrCodeDeveloperUserAlreadyRegisteredException for service response error code - // "DeveloperUserAlreadyRegisteredException". - // - // The provided developer user identifier is already registered with Cognito - // under a different identity ID. - ErrCodeDeveloperUserAlreadyRegisteredException = "DeveloperUserAlreadyRegisteredException" - - // ErrCodeExternalServiceException for service response error code - // "ExternalServiceException". - // - // An exception thrown when a dependent service such as Facebook or Twitter - // is not responding - ErrCodeExternalServiceException = "ExternalServiceException" - - // ErrCodeInternalErrorException for service response error code - // "InternalErrorException". - // - // Thrown when the service encounters an error during processing the request. - ErrCodeInternalErrorException = "InternalErrorException" - - // ErrCodeInvalidIdentityPoolConfigurationException for service response error code - // "InvalidIdentityPoolConfigurationException". - // - // Thrown if the identity pool has no role associated for the given auth type - // (auth/unauth) or if the AssumeRole fails. - ErrCodeInvalidIdentityPoolConfigurationException = "InvalidIdentityPoolConfigurationException" - - // ErrCodeInvalidParameterException for service response error code - // "InvalidParameterException". - // - // Thrown for missing or bad input parameter(s). - ErrCodeInvalidParameterException = "InvalidParameterException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // Thrown when the total number of user pools has exceeded a preset limit. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeNotAuthorizedException for service response error code - // "NotAuthorizedException". - // - // Thrown when a user is not authorized to access the requested resource. - ErrCodeNotAuthorizedException = "NotAuthorizedException" - - // ErrCodeResourceConflictException for service response error code - // "ResourceConflictException". - // - // Thrown when a user tries to use a login which is already linked to another - // account. - ErrCodeResourceConflictException = "ResourceConflictException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // Thrown when the requested resource (for example, a dataset or record) does - // not exist. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // Thrown when a request is throttled. - ErrCodeTooManyRequestsException = "TooManyRequestsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/service.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/service.go deleted file mode 100644 index 9ebae103f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cognitoidentity - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// CognitoIdentity provides the API operation methods for making requests to -// Amazon Cognito Identity. See this package's package overview docs -// for details on the service. -// -// CognitoIdentity methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CognitoIdentity 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 = "cognito-identity" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Cognito Identity" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CognitoIdentity client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a CognitoIdentity client from just a session. -// svc := cognitoidentity.New(mySession) -// -// // Create a CognitoIdentity client with additional configuration -// svc := cognitoidentity.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CognitoIdentity { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CognitoIdentity { - svc := &CognitoIdentity{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-06-30", - JSONVersion: "1.1", - TargetPrefix: "AWSCognitoIdentityService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CognitoIdentity operation and runs any -// custom request initialization. -func (c *CognitoIdentity) 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/cognitoidentityprovider/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go deleted file mode 100644 index 61c48ee21..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go +++ /dev/null @@ -1,24839 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cognitoidentityprovider - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAddCustomAttributes = "AddCustomAttributes" - -// AddCustomAttributesRequest generates a "aws/request.Request" representing the -// client's request for the AddCustomAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddCustomAttributes for more information on using the AddCustomAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddCustomAttributesRequest method. -// req, resp := client.AddCustomAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AddCustomAttributes -func (c *CognitoIdentityProvider) AddCustomAttributesRequest(input *AddCustomAttributesInput) (req *request.Request, output *AddCustomAttributesOutput) { - op := &request.Operation{ - Name: opAddCustomAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddCustomAttributesInput{} - } - - output = &AddCustomAttributesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddCustomAttributes API operation for Amazon Cognito Identity Provider. -// -// Adds additional user attributes to the user pool schema. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AddCustomAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserImportInProgressException "UserImportInProgressException" -// This exception is thrown when you are trying to modify a user pool while -// a user import job is in progress for that pool. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AddCustomAttributes -func (c *CognitoIdentityProvider) AddCustomAttributes(input *AddCustomAttributesInput) (*AddCustomAttributesOutput, error) { - req, out := c.AddCustomAttributesRequest(input) - return out, req.Send() -} - -// AddCustomAttributesWithContext is the same as AddCustomAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See AddCustomAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AddCustomAttributesWithContext(ctx aws.Context, input *AddCustomAttributesInput, opts ...request.Option) (*AddCustomAttributesOutput, error) { - req, out := c.AddCustomAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminAddUserToGroup = "AdminAddUserToGroup" - -// AdminAddUserToGroupRequest generates a "aws/request.Request" representing the -// client's request for the AdminAddUserToGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminAddUserToGroup for more information on using the AdminAddUserToGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminAddUserToGroupRequest method. -// req, resp := client.AdminAddUserToGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminAddUserToGroup -func (c *CognitoIdentityProvider) AdminAddUserToGroupRequest(input *AdminAddUserToGroupInput) (req *request.Request, output *AdminAddUserToGroupOutput) { - op := &request.Operation{ - Name: opAdminAddUserToGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminAddUserToGroupInput{} - } - - output = &AdminAddUserToGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminAddUserToGroup API operation for Amazon Cognito Identity Provider. -// -// Adds the specified user to the specified group. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminAddUserToGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminAddUserToGroup -func (c *CognitoIdentityProvider) AdminAddUserToGroup(input *AdminAddUserToGroupInput) (*AdminAddUserToGroupOutput, error) { - req, out := c.AdminAddUserToGroupRequest(input) - return out, req.Send() -} - -// AdminAddUserToGroupWithContext is the same as AdminAddUserToGroup with the addition of -// the ability to pass a context and additional request options. -// -// See AdminAddUserToGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminAddUserToGroupWithContext(ctx aws.Context, input *AdminAddUserToGroupInput, opts ...request.Option) (*AdminAddUserToGroupOutput, error) { - req, out := c.AdminAddUserToGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminConfirmSignUp = "AdminConfirmSignUp" - -// AdminConfirmSignUpRequest generates a "aws/request.Request" representing the -// client's request for the AdminConfirmSignUp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminConfirmSignUp for more information on using the AdminConfirmSignUp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminConfirmSignUpRequest method. -// req, resp := client.AdminConfirmSignUpRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminConfirmSignUp -func (c *CognitoIdentityProvider) AdminConfirmSignUpRequest(input *AdminConfirmSignUpInput) (req *request.Request, output *AdminConfirmSignUpOutput) { - op := &request.Operation{ - Name: opAdminConfirmSignUp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminConfirmSignUpInput{} - } - - output = &AdminConfirmSignUpOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminConfirmSignUp API operation for Amazon Cognito Identity Provider. -// -// Confirms user registration as an admin without using a confirmation code. -// Works on any user. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminConfirmSignUp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyFailedAttemptsException "TooManyFailedAttemptsException" -// This exception is thrown when the user has made too many failed attempts -// for a given action (e.g., sign in). -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminConfirmSignUp -func (c *CognitoIdentityProvider) AdminConfirmSignUp(input *AdminConfirmSignUpInput) (*AdminConfirmSignUpOutput, error) { - req, out := c.AdminConfirmSignUpRequest(input) - return out, req.Send() -} - -// AdminConfirmSignUpWithContext is the same as AdminConfirmSignUp with the addition of -// the ability to pass a context and additional request options. -// -// See AdminConfirmSignUp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminConfirmSignUpWithContext(ctx aws.Context, input *AdminConfirmSignUpInput, opts ...request.Option) (*AdminConfirmSignUpOutput, error) { - req, out := c.AdminConfirmSignUpRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminCreateUser = "AdminCreateUser" - -// AdminCreateUserRequest generates a "aws/request.Request" representing the -// client's request for the AdminCreateUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminCreateUser for more information on using the AdminCreateUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminCreateUserRequest method. -// req, resp := client.AdminCreateUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminCreateUser -func (c *CognitoIdentityProvider) AdminCreateUserRequest(input *AdminCreateUserInput) (req *request.Request, output *AdminCreateUserOutput) { - op := &request.Operation{ - Name: opAdminCreateUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminCreateUserInput{} - } - - output = &AdminCreateUserOutput{} - req = c.newRequest(op, input, output) - return -} - -// AdminCreateUser API operation for Amazon Cognito Identity Provider. -// -// Creates a new user in the specified user pool. -// -// If MessageAction is not set, the default is to send a welcome message via -// email or phone (SMS). -// -// This message is based on a template that you configured in your call to or -// . This template includes your custom sign-up instructions and placeholders -// for user name and temporary password. -// -// Alternatively, you can call AdminCreateUser with “SUPPRESS” for the MessageAction -// parameter, and Amazon Cognito will not send any email. -// -// In either case, the user will be in the FORCE_CHANGE_PASSWORD state until -// they sign in and change their password. -// -// AdminCreateUser requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminCreateUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUsernameExistsException "UsernameExistsException" -// This exception is thrown when Amazon Cognito encounters a user name that -// already exists in the user pool. -// -// * ErrCodeInvalidPasswordException "InvalidPasswordException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// password. -// -// * ErrCodeCodeDeliveryFailureException "CodeDeliveryFailureException" -// This exception is thrown when a verification code fails to deliver successfully. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodePreconditionNotMetException "PreconditionNotMetException" -// This exception is thrown when a precondition is not met. -// -// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException" -// This exception is returned when the role provided for SMS configuration does -// not have permission to publish using Amazon SNS. -// -// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException" -// This exception is thrown when the trust relationship is invalid for the role -// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com -// or the external ID provided in the role does not match what is provided in -// the SMS configuration for the user pool. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUnsupportedUserStateException "UnsupportedUserStateException" -// The request failed because the user is in an unsupported state. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminCreateUser -func (c *CognitoIdentityProvider) AdminCreateUser(input *AdminCreateUserInput) (*AdminCreateUserOutput, error) { - req, out := c.AdminCreateUserRequest(input) - return out, req.Send() -} - -// AdminCreateUserWithContext is the same as AdminCreateUser with the addition of -// the ability to pass a context and additional request options. -// -// See AdminCreateUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminCreateUserWithContext(ctx aws.Context, input *AdminCreateUserInput, opts ...request.Option) (*AdminCreateUserOutput, error) { - req, out := c.AdminCreateUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminDeleteUser = "AdminDeleteUser" - -// AdminDeleteUserRequest generates a "aws/request.Request" representing the -// client's request for the AdminDeleteUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminDeleteUser for more information on using the AdminDeleteUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminDeleteUserRequest method. -// req, resp := client.AdminDeleteUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDeleteUser -func (c *CognitoIdentityProvider) AdminDeleteUserRequest(input *AdminDeleteUserInput) (req *request.Request, output *AdminDeleteUserOutput) { - op := &request.Operation{ - Name: opAdminDeleteUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminDeleteUserInput{} - } - - output = &AdminDeleteUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminDeleteUser API operation for Amazon Cognito Identity Provider. -// -// Deletes a user as an administrator. Works on any user. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminDeleteUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDeleteUser -func (c *CognitoIdentityProvider) AdminDeleteUser(input *AdminDeleteUserInput) (*AdminDeleteUserOutput, error) { - req, out := c.AdminDeleteUserRequest(input) - return out, req.Send() -} - -// AdminDeleteUserWithContext is the same as AdminDeleteUser with the addition of -// the ability to pass a context and additional request options. -// -// See AdminDeleteUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminDeleteUserWithContext(ctx aws.Context, input *AdminDeleteUserInput, opts ...request.Option) (*AdminDeleteUserOutput, error) { - req, out := c.AdminDeleteUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminDeleteUserAttributes = "AdminDeleteUserAttributes" - -// AdminDeleteUserAttributesRequest generates a "aws/request.Request" representing the -// client's request for the AdminDeleteUserAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminDeleteUserAttributes for more information on using the AdminDeleteUserAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminDeleteUserAttributesRequest method. -// req, resp := client.AdminDeleteUserAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDeleteUserAttributes -func (c *CognitoIdentityProvider) AdminDeleteUserAttributesRequest(input *AdminDeleteUserAttributesInput) (req *request.Request, output *AdminDeleteUserAttributesOutput) { - op := &request.Operation{ - Name: opAdminDeleteUserAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminDeleteUserAttributesInput{} - } - - output = &AdminDeleteUserAttributesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminDeleteUserAttributes API operation for Amazon Cognito Identity Provider. -// -// Deletes the user attributes in a user pool as an administrator. Works on -// any user. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminDeleteUserAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDeleteUserAttributes -func (c *CognitoIdentityProvider) AdminDeleteUserAttributes(input *AdminDeleteUserAttributesInput) (*AdminDeleteUserAttributesOutput, error) { - req, out := c.AdminDeleteUserAttributesRequest(input) - return out, req.Send() -} - -// AdminDeleteUserAttributesWithContext is the same as AdminDeleteUserAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See AdminDeleteUserAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminDeleteUserAttributesWithContext(ctx aws.Context, input *AdminDeleteUserAttributesInput, opts ...request.Option) (*AdminDeleteUserAttributesOutput, error) { - req, out := c.AdminDeleteUserAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminDisableProviderForUser = "AdminDisableProviderForUser" - -// AdminDisableProviderForUserRequest generates a "aws/request.Request" representing the -// client's request for the AdminDisableProviderForUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminDisableProviderForUser for more information on using the AdminDisableProviderForUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminDisableProviderForUserRequest method. -// req, resp := client.AdminDisableProviderForUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDisableProviderForUser -func (c *CognitoIdentityProvider) AdminDisableProviderForUserRequest(input *AdminDisableProviderForUserInput) (req *request.Request, output *AdminDisableProviderForUserOutput) { - op := &request.Operation{ - Name: opAdminDisableProviderForUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminDisableProviderForUserInput{} - } - - output = &AdminDisableProviderForUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminDisableProviderForUser API operation for Amazon Cognito Identity Provider. -// -// Disables the user from signing in with the specified external (SAML or social) -// identity provider. If the user to disable is a Cognito User Pools native -// username + password user, they are not permitted to use their password to -// sign-in. If the user to disable is a linked external IdP user, any link between -// that user and an existing user is removed. The next time the external user -// (no longer attached to the previously linked DestinationUser) signs in, they -// must create a new user account. See . -// -// This action is enabled only for admin access and requires developer credentials. -// -// The ProviderName must match the value specified when creating an IdP for -// the pool. -// -// To disable a native username + password user, the ProviderName value must -// be Cognito and the ProviderAttributeName must be Cognito_Subject, with the -// ProviderAttributeValue being the name that is used in the user pool for the -// user. -// -// The ProviderAttributeName must always be Cognito_Subject for social identity -// providers. The ProviderAttributeValue must always be the exact subject that -// was used when the user was originally linked as a source user. -// -// For de-linking a SAML identity, there are two scenarios. If the linked identity -// has not yet been used to sign-in, the ProviderAttributeName and ProviderAttributeValue -// must be the same values that were used for the SourceUser when the identities -// were originally linked in the call. (If the linking was done with ProviderAttributeName -// set to Cognito_Subject, the same applies here). However, if the user has -// already signed in, the ProviderAttributeName must be Cognito_Subject and -// ProviderAttributeValue must be the subject of the SAML assertion. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminDisableProviderForUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeAliasExistsException "AliasExistsException" -// This exception is thrown when a user tries to confirm the account with an -// email or phone number that has already been supplied as an alias from a different -// account. This exception tells user that an account with this email or phone -// already exists. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDisableProviderForUser -func (c *CognitoIdentityProvider) AdminDisableProviderForUser(input *AdminDisableProviderForUserInput) (*AdminDisableProviderForUserOutput, error) { - req, out := c.AdminDisableProviderForUserRequest(input) - return out, req.Send() -} - -// AdminDisableProviderForUserWithContext is the same as AdminDisableProviderForUser with the addition of -// the ability to pass a context and additional request options. -// -// See AdminDisableProviderForUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminDisableProviderForUserWithContext(ctx aws.Context, input *AdminDisableProviderForUserInput, opts ...request.Option) (*AdminDisableProviderForUserOutput, error) { - req, out := c.AdminDisableProviderForUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminDisableUser = "AdminDisableUser" - -// AdminDisableUserRequest generates a "aws/request.Request" representing the -// client's request for the AdminDisableUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminDisableUser for more information on using the AdminDisableUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminDisableUserRequest method. -// req, resp := client.AdminDisableUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDisableUser -func (c *CognitoIdentityProvider) AdminDisableUserRequest(input *AdminDisableUserInput) (req *request.Request, output *AdminDisableUserOutput) { - op := &request.Operation{ - Name: opAdminDisableUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminDisableUserInput{} - } - - output = &AdminDisableUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminDisableUser API operation for Amazon Cognito Identity Provider. -// -// Disables the specified user as an administrator. Works on any user. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminDisableUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDisableUser -func (c *CognitoIdentityProvider) AdminDisableUser(input *AdminDisableUserInput) (*AdminDisableUserOutput, error) { - req, out := c.AdminDisableUserRequest(input) - return out, req.Send() -} - -// AdminDisableUserWithContext is the same as AdminDisableUser with the addition of -// the ability to pass a context and additional request options. -// -// See AdminDisableUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminDisableUserWithContext(ctx aws.Context, input *AdminDisableUserInput, opts ...request.Option) (*AdminDisableUserOutput, error) { - req, out := c.AdminDisableUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminEnableUser = "AdminEnableUser" - -// AdminEnableUserRequest generates a "aws/request.Request" representing the -// client's request for the AdminEnableUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminEnableUser for more information on using the AdminEnableUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminEnableUserRequest method. -// req, resp := client.AdminEnableUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminEnableUser -func (c *CognitoIdentityProvider) AdminEnableUserRequest(input *AdminEnableUserInput) (req *request.Request, output *AdminEnableUserOutput) { - op := &request.Operation{ - Name: opAdminEnableUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminEnableUserInput{} - } - - output = &AdminEnableUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminEnableUser API operation for Amazon Cognito Identity Provider. -// -// Enables the specified user as an administrator. Works on any user. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminEnableUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminEnableUser -func (c *CognitoIdentityProvider) AdminEnableUser(input *AdminEnableUserInput) (*AdminEnableUserOutput, error) { - req, out := c.AdminEnableUserRequest(input) - return out, req.Send() -} - -// AdminEnableUserWithContext is the same as AdminEnableUser with the addition of -// the ability to pass a context and additional request options. -// -// See AdminEnableUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminEnableUserWithContext(ctx aws.Context, input *AdminEnableUserInput, opts ...request.Option) (*AdminEnableUserOutput, error) { - req, out := c.AdminEnableUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminForgetDevice = "AdminForgetDevice" - -// AdminForgetDeviceRequest generates a "aws/request.Request" representing the -// client's request for the AdminForgetDevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminForgetDevice for more information on using the AdminForgetDevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminForgetDeviceRequest method. -// req, resp := client.AdminForgetDeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminForgetDevice -func (c *CognitoIdentityProvider) AdminForgetDeviceRequest(input *AdminForgetDeviceInput) (req *request.Request, output *AdminForgetDeviceOutput) { - op := &request.Operation{ - Name: opAdminForgetDevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminForgetDeviceInput{} - } - - output = &AdminForgetDeviceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminForgetDevice API operation for Amazon Cognito Identity Provider. -// -// Forgets the device, as an administrator. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminForgetDevice for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException" -// This exception is thrown when the user pool configuration is invalid. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminForgetDevice -func (c *CognitoIdentityProvider) AdminForgetDevice(input *AdminForgetDeviceInput) (*AdminForgetDeviceOutput, error) { - req, out := c.AdminForgetDeviceRequest(input) - return out, req.Send() -} - -// AdminForgetDeviceWithContext is the same as AdminForgetDevice with the addition of -// the ability to pass a context and additional request options. -// -// See AdminForgetDevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminForgetDeviceWithContext(ctx aws.Context, input *AdminForgetDeviceInput, opts ...request.Option) (*AdminForgetDeviceOutput, error) { - req, out := c.AdminForgetDeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminGetDevice = "AdminGetDevice" - -// AdminGetDeviceRequest generates a "aws/request.Request" representing the -// client's request for the AdminGetDevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminGetDevice for more information on using the AdminGetDevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminGetDeviceRequest method. -// req, resp := client.AdminGetDeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminGetDevice -func (c *CognitoIdentityProvider) AdminGetDeviceRequest(input *AdminGetDeviceInput) (req *request.Request, output *AdminGetDeviceOutput) { - op := &request.Operation{ - Name: opAdminGetDevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminGetDeviceInput{} - } - - output = &AdminGetDeviceOutput{} - req = c.newRequest(op, input, output) - return -} - -// AdminGetDevice API operation for Amazon Cognito Identity Provider. -// -// Gets the device, as an administrator. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminGetDevice for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException" -// This exception is thrown when the user pool configuration is invalid. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminGetDevice -func (c *CognitoIdentityProvider) AdminGetDevice(input *AdminGetDeviceInput) (*AdminGetDeviceOutput, error) { - req, out := c.AdminGetDeviceRequest(input) - return out, req.Send() -} - -// AdminGetDeviceWithContext is the same as AdminGetDevice with the addition of -// the ability to pass a context and additional request options. -// -// See AdminGetDevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminGetDeviceWithContext(ctx aws.Context, input *AdminGetDeviceInput, opts ...request.Option) (*AdminGetDeviceOutput, error) { - req, out := c.AdminGetDeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminGetUser = "AdminGetUser" - -// AdminGetUserRequest generates a "aws/request.Request" representing the -// client's request for the AdminGetUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminGetUser for more information on using the AdminGetUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminGetUserRequest method. -// req, resp := client.AdminGetUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminGetUser -func (c *CognitoIdentityProvider) AdminGetUserRequest(input *AdminGetUserInput) (req *request.Request, output *AdminGetUserOutput) { - op := &request.Operation{ - Name: opAdminGetUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminGetUserInput{} - } - - output = &AdminGetUserOutput{} - req = c.newRequest(op, input, output) - return -} - -// AdminGetUser API operation for Amazon Cognito Identity Provider. -// -// Gets the specified user by user name in a user pool as an administrator. -// Works on any user. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminGetUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminGetUser -func (c *CognitoIdentityProvider) AdminGetUser(input *AdminGetUserInput) (*AdminGetUserOutput, error) { - req, out := c.AdminGetUserRequest(input) - return out, req.Send() -} - -// AdminGetUserWithContext is the same as AdminGetUser with the addition of -// the ability to pass a context and additional request options. -// -// See AdminGetUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminGetUserWithContext(ctx aws.Context, input *AdminGetUserInput, opts ...request.Option) (*AdminGetUserOutput, error) { - req, out := c.AdminGetUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminInitiateAuth = "AdminInitiateAuth" - -// AdminInitiateAuthRequest generates a "aws/request.Request" representing the -// client's request for the AdminInitiateAuth operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminInitiateAuth for more information on using the AdminInitiateAuth -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminInitiateAuthRequest method. -// req, resp := client.AdminInitiateAuthRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminInitiateAuth -func (c *CognitoIdentityProvider) AdminInitiateAuthRequest(input *AdminInitiateAuthInput) (req *request.Request, output *AdminInitiateAuthOutput) { - op := &request.Operation{ - Name: opAdminInitiateAuth, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminInitiateAuthInput{} - } - - output = &AdminInitiateAuthOutput{} - req = c.newRequest(op, input, output) - return -} - -// AdminInitiateAuth API operation for Amazon Cognito Identity Provider. -// -// Initiates the authentication flow, as an administrator. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminInitiateAuth for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException" -// This exception is thrown when the user pool configuration is invalid. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodeMFAMethodNotFoundException "MFAMethodNotFoundException" -// This exception is thrown when Amazon Cognito cannot find a multi-factor authentication -// (MFA) method. -// -// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException" -// This exception is returned when the role provided for SMS configuration does -// not have permission to publish using Amazon SNS. -// -// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException" -// This exception is thrown when the trust relationship is invalid for the role -// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com -// or the external ID provided in the role does not match what is provided in -// the SMS configuration for the user pool. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminInitiateAuth -func (c *CognitoIdentityProvider) AdminInitiateAuth(input *AdminInitiateAuthInput) (*AdminInitiateAuthOutput, error) { - req, out := c.AdminInitiateAuthRequest(input) - return out, req.Send() -} - -// AdminInitiateAuthWithContext is the same as AdminInitiateAuth with the addition of -// the ability to pass a context and additional request options. -// -// See AdminInitiateAuth for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminInitiateAuthWithContext(ctx aws.Context, input *AdminInitiateAuthInput, opts ...request.Option) (*AdminInitiateAuthOutput, error) { - req, out := c.AdminInitiateAuthRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminLinkProviderForUser = "AdminLinkProviderForUser" - -// AdminLinkProviderForUserRequest generates a "aws/request.Request" representing the -// client's request for the AdminLinkProviderForUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminLinkProviderForUser for more information on using the AdminLinkProviderForUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminLinkProviderForUserRequest method. -// req, resp := client.AdminLinkProviderForUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminLinkProviderForUser -func (c *CognitoIdentityProvider) AdminLinkProviderForUserRequest(input *AdminLinkProviderForUserInput) (req *request.Request, output *AdminLinkProviderForUserOutput) { - op := &request.Operation{ - Name: opAdminLinkProviderForUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminLinkProviderForUserInput{} - } - - output = &AdminLinkProviderForUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminLinkProviderForUser API operation for Amazon Cognito Identity Provider. -// -// Links an existing user account in a user pool (DestinationUser) to an identity -// from an external identity provider (SourceUser) based on a specified attribute -// name and value from the external identity provider. This allows you to create -// a link from the existing user account to an external federated user identity -// that has not yet been used to sign in, so that the federated user identity -// can be used to sign in as the existing user account. -// -// For example, if there is an existing user with a username and password, this -// API links that user to a federated user identity, so that when the federated -// user identity is used, the user signs in as the existing user account. -// -// Because this API allows a user with an external federated identity to sign -// in as an existing user in the user pool, it is critical that it only be used -// with external identity providers and provider attributes that have been trusted -// by the application owner. -// -// See also . -// -// This action is enabled only for admin access and requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminLinkProviderForUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeAliasExistsException "AliasExistsException" -// This exception is thrown when a user tries to confirm the account with an -// email or phone number that has already been supplied as an alias from a different -// account. This exception tells user that an account with this email or phone -// already exists. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminLinkProviderForUser -func (c *CognitoIdentityProvider) AdminLinkProviderForUser(input *AdminLinkProviderForUserInput) (*AdminLinkProviderForUserOutput, error) { - req, out := c.AdminLinkProviderForUserRequest(input) - return out, req.Send() -} - -// AdminLinkProviderForUserWithContext is the same as AdminLinkProviderForUser with the addition of -// the ability to pass a context and additional request options. -// -// See AdminLinkProviderForUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminLinkProviderForUserWithContext(ctx aws.Context, input *AdminLinkProviderForUserInput, opts ...request.Option) (*AdminLinkProviderForUserOutput, error) { - req, out := c.AdminLinkProviderForUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminListDevices = "AdminListDevices" - -// AdminListDevicesRequest generates a "aws/request.Request" representing the -// client's request for the AdminListDevices operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminListDevices for more information on using the AdminListDevices -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminListDevicesRequest method. -// req, resp := client.AdminListDevicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminListDevices -func (c *CognitoIdentityProvider) AdminListDevicesRequest(input *AdminListDevicesInput) (req *request.Request, output *AdminListDevicesOutput) { - op := &request.Operation{ - Name: opAdminListDevices, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminListDevicesInput{} - } - - output = &AdminListDevicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// AdminListDevices API operation for Amazon Cognito Identity Provider. -// -// Lists devices, as an administrator. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminListDevices for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException" -// This exception is thrown when the user pool configuration is invalid. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminListDevices -func (c *CognitoIdentityProvider) AdminListDevices(input *AdminListDevicesInput) (*AdminListDevicesOutput, error) { - req, out := c.AdminListDevicesRequest(input) - return out, req.Send() -} - -// AdminListDevicesWithContext is the same as AdminListDevices with the addition of -// the ability to pass a context and additional request options. -// -// See AdminListDevices for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminListDevicesWithContext(ctx aws.Context, input *AdminListDevicesInput, opts ...request.Option) (*AdminListDevicesOutput, error) { - req, out := c.AdminListDevicesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminListGroupsForUser = "AdminListGroupsForUser" - -// AdminListGroupsForUserRequest generates a "aws/request.Request" representing the -// client's request for the AdminListGroupsForUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminListGroupsForUser for more information on using the AdminListGroupsForUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminListGroupsForUserRequest method. -// req, resp := client.AdminListGroupsForUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminListGroupsForUser -func (c *CognitoIdentityProvider) AdminListGroupsForUserRequest(input *AdminListGroupsForUserInput) (req *request.Request, output *AdminListGroupsForUserOutput) { - op := &request.Operation{ - Name: opAdminListGroupsForUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminListGroupsForUserInput{} - } - - output = &AdminListGroupsForUserOutput{} - req = c.newRequest(op, input, output) - return -} - -// AdminListGroupsForUser API operation for Amazon Cognito Identity Provider. -// -// Lists the groups that the user belongs to. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminListGroupsForUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminListGroupsForUser -func (c *CognitoIdentityProvider) AdminListGroupsForUser(input *AdminListGroupsForUserInput) (*AdminListGroupsForUserOutput, error) { - req, out := c.AdminListGroupsForUserRequest(input) - return out, req.Send() -} - -// AdminListGroupsForUserWithContext is the same as AdminListGroupsForUser with the addition of -// the ability to pass a context and additional request options. -// -// See AdminListGroupsForUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminListGroupsForUserWithContext(ctx aws.Context, input *AdminListGroupsForUserInput, opts ...request.Option) (*AdminListGroupsForUserOutput, error) { - req, out := c.AdminListGroupsForUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminListUserAuthEvents = "AdminListUserAuthEvents" - -// AdminListUserAuthEventsRequest generates a "aws/request.Request" representing the -// client's request for the AdminListUserAuthEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminListUserAuthEvents for more information on using the AdminListUserAuthEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminListUserAuthEventsRequest method. -// req, resp := client.AdminListUserAuthEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminListUserAuthEvents -func (c *CognitoIdentityProvider) AdminListUserAuthEventsRequest(input *AdminListUserAuthEventsInput) (req *request.Request, output *AdminListUserAuthEventsOutput) { - op := &request.Operation{ - Name: opAdminListUserAuthEvents, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminListUserAuthEventsInput{} - } - - output = &AdminListUserAuthEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// AdminListUserAuthEvents API operation for Amazon Cognito Identity Provider. -// -// Lists a history of user activity and any risks detected as part of Amazon -// Cognito advanced security. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminListUserAuthEvents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserPoolAddOnNotEnabledException "UserPoolAddOnNotEnabledException" -// This exception is thrown when user pool add-ons are not enabled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminListUserAuthEvents -func (c *CognitoIdentityProvider) AdminListUserAuthEvents(input *AdminListUserAuthEventsInput) (*AdminListUserAuthEventsOutput, error) { - req, out := c.AdminListUserAuthEventsRequest(input) - return out, req.Send() -} - -// AdminListUserAuthEventsWithContext is the same as AdminListUserAuthEvents with the addition of -// the ability to pass a context and additional request options. -// -// See AdminListUserAuthEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminListUserAuthEventsWithContext(ctx aws.Context, input *AdminListUserAuthEventsInput, opts ...request.Option) (*AdminListUserAuthEventsOutput, error) { - req, out := c.AdminListUserAuthEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminRemoveUserFromGroup = "AdminRemoveUserFromGroup" - -// AdminRemoveUserFromGroupRequest generates a "aws/request.Request" representing the -// client's request for the AdminRemoveUserFromGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminRemoveUserFromGroup for more information on using the AdminRemoveUserFromGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminRemoveUserFromGroupRequest method. -// req, resp := client.AdminRemoveUserFromGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminRemoveUserFromGroup -func (c *CognitoIdentityProvider) AdminRemoveUserFromGroupRequest(input *AdminRemoveUserFromGroupInput) (req *request.Request, output *AdminRemoveUserFromGroupOutput) { - op := &request.Operation{ - Name: opAdminRemoveUserFromGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminRemoveUserFromGroupInput{} - } - - output = &AdminRemoveUserFromGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminRemoveUserFromGroup API operation for Amazon Cognito Identity Provider. -// -// Removes the specified user from the specified group. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminRemoveUserFromGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminRemoveUserFromGroup -func (c *CognitoIdentityProvider) AdminRemoveUserFromGroup(input *AdminRemoveUserFromGroupInput) (*AdminRemoveUserFromGroupOutput, error) { - req, out := c.AdminRemoveUserFromGroupRequest(input) - return out, req.Send() -} - -// AdminRemoveUserFromGroupWithContext is the same as AdminRemoveUserFromGroup with the addition of -// the ability to pass a context and additional request options. -// -// See AdminRemoveUserFromGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminRemoveUserFromGroupWithContext(ctx aws.Context, input *AdminRemoveUserFromGroupInput, opts ...request.Option) (*AdminRemoveUserFromGroupOutput, error) { - req, out := c.AdminRemoveUserFromGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminResetUserPassword = "AdminResetUserPassword" - -// AdminResetUserPasswordRequest generates a "aws/request.Request" representing the -// client's request for the AdminResetUserPassword operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminResetUserPassword for more information on using the AdminResetUserPassword -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminResetUserPasswordRequest method. -// req, resp := client.AdminResetUserPasswordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminResetUserPassword -func (c *CognitoIdentityProvider) AdminResetUserPasswordRequest(input *AdminResetUserPasswordInput) (req *request.Request, output *AdminResetUserPasswordOutput) { - op := &request.Operation{ - Name: opAdminResetUserPassword, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminResetUserPasswordInput{} - } - - output = &AdminResetUserPasswordOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminResetUserPassword API operation for Amazon Cognito Identity Provider. -// -// Resets the specified user's password in a user pool as an administrator. -// Works on any user. -// -// When a developer calls this API, the current password is invalidated, so -// it must be changed. If a user tries to sign in after the API is called, the -// app will get a PasswordResetRequiredException exception back and should direct -// the user down the flow to reset the password, which is the same as the forgot -// password flow. In addition, if the user pool has phone verification selected -// and a verified phone number exists for the user, or if email verification -// is selected and a verified email exists for the user, calling this API will -// also result in sending a message to the end user with the code to change -// their password. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminResetUserPassword for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException" -// This exception is returned when the role provided for SMS configuration does -// not have permission to publish using Amazon SNS. -// -// * ErrCodeInvalidEmailRoleAccessPolicyException "InvalidEmailRoleAccessPolicyException" -// This exception is thrown when Amazon Cognito is not allowed to use your email -// identity. HTTP status code: 400. -// -// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException" -// This exception is thrown when the trust relationship is invalid for the role -// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com -// or the external ID provided in the role does not match what is provided in -// the SMS configuration for the user pool. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminResetUserPassword -func (c *CognitoIdentityProvider) AdminResetUserPassword(input *AdminResetUserPasswordInput) (*AdminResetUserPasswordOutput, error) { - req, out := c.AdminResetUserPasswordRequest(input) - return out, req.Send() -} - -// AdminResetUserPasswordWithContext is the same as AdminResetUserPassword with the addition of -// the ability to pass a context and additional request options. -// -// See AdminResetUserPassword for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminResetUserPasswordWithContext(ctx aws.Context, input *AdminResetUserPasswordInput, opts ...request.Option) (*AdminResetUserPasswordOutput, error) { - req, out := c.AdminResetUserPasswordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminRespondToAuthChallenge = "AdminRespondToAuthChallenge" - -// AdminRespondToAuthChallengeRequest generates a "aws/request.Request" representing the -// client's request for the AdminRespondToAuthChallenge operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminRespondToAuthChallenge for more information on using the AdminRespondToAuthChallenge -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminRespondToAuthChallengeRequest method. -// req, resp := client.AdminRespondToAuthChallengeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminRespondToAuthChallenge -func (c *CognitoIdentityProvider) AdminRespondToAuthChallengeRequest(input *AdminRespondToAuthChallengeInput) (req *request.Request, output *AdminRespondToAuthChallengeOutput) { - op := &request.Operation{ - Name: opAdminRespondToAuthChallenge, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminRespondToAuthChallengeInput{} - } - - output = &AdminRespondToAuthChallengeOutput{} - req = c.newRequest(op, input, output) - return -} - -// AdminRespondToAuthChallenge API operation for Amazon Cognito Identity Provider. -// -// Responds to an authentication challenge, as an administrator. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminRespondToAuthChallenge for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeCodeMismatchException "CodeMismatchException" -// This exception is thrown if the provided code does not match what the server -// was expecting. -// -// * ErrCodeExpiredCodeException "ExpiredCodeException" -// This exception is thrown if a code has expired. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeInvalidPasswordException "InvalidPasswordException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// password. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException" -// This exception is thrown when the user pool configuration is invalid. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// * ErrCodeMFAMethodNotFoundException "MFAMethodNotFoundException" -// This exception is thrown when Amazon Cognito cannot find a multi-factor authentication -// (MFA) method. -// -// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException" -// This exception is returned when the role provided for SMS configuration does -// not have permission to publish using Amazon SNS. -// -// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException" -// This exception is thrown when the trust relationship is invalid for the role -// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com -// or the external ID provided in the role does not match what is provided in -// the SMS configuration for the user pool. -// -// * ErrCodeAliasExistsException "AliasExistsException" -// This exception is thrown when a user tries to confirm the account with an -// email or phone number that has already been supplied as an alias from a different -// account. This exception tells user that an account with this email or phone -// already exists. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeSoftwareTokenMFANotFoundException "SoftwareTokenMFANotFoundException" -// This exception is thrown when the software token TOTP multi-factor authentication -// (MFA) is not enabled for the user pool. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminRespondToAuthChallenge -func (c *CognitoIdentityProvider) AdminRespondToAuthChallenge(input *AdminRespondToAuthChallengeInput) (*AdminRespondToAuthChallengeOutput, error) { - req, out := c.AdminRespondToAuthChallengeRequest(input) - return out, req.Send() -} - -// AdminRespondToAuthChallengeWithContext is the same as AdminRespondToAuthChallenge with the addition of -// the ability to pass a context and additional request options. -// -// See AdminRespondToAuthChallenge for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminRespondToAuthChallengeWithContext(ctx aws.Context, input *AdminRespondToAuthChallengeInput, opts ...request.Option) (*AdminRespondToAuthChallengeOutput, error) { - req, out := c.AdminRespondToAuthChallengeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminSetUserMFAPreference = "AdminSetUserMFAPreference" - -// AdminSetUserMFAPreferenceRequest generates a "aws/request.Request" representing the -// client's request for the AdminSetUserMFAPreference operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminSetUserMFAPreference for more information on using the AdminSetUserMFAPreference -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminSetUserMFAPreferenceRequest method. -// req, resp := client.AdminSetUserMFAPreferenceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminSetUserMFAPreference -func (c *CognitoIdentityProvider) AdminSetUserMFAPreferenceRequest(input *AdminSetUserMFAPreferenceInput) (req *request.Request, output *AdminSetUserMFAPreferenceOutput) { - op := &request.Operation{ - Name: opAdminSetUserMFAPreference, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminSetUserMFAPreferenceInput{} - } - - output = &AdminSetUserMFAPreferenceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminSetUserMFAPreference API operation for Amazon Cognito Identity Provider. -// -// Sets the user's multi-factor authentication (MFA) preference. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminSetUserMFAPreference for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminSetUserMFAPreference -func (c *CognitoIdentityProvider) AdminSetUserMFAPreference(input *AdminSetUserMFAPreferenceInput) (*AdminSetUserMFAPreferenceOutput, error) { - req, out := c.AdminSetUserMFAPreferenceRequest(input) - return out, req.Send() -} - -// AdminSetUserMFAPreferenceWithContext is the same as AdminSetUserMFAPreference with the addition of -// the ability to pass a context and additional request options. -// -// See AdminSetUserMFAPreference for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminSetUserMFAPreferenceWithContext(ctx aws.Context, input *AdminSetUserMFAPreferenceInput, opts ...request.Option) (*AdminSetUserMFAPreferenceOutput, error) { - req, out := c.AdminSetUserMFAPreferenceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminSetUserSettings = "AdminSetUserSettings" - -// AdminSetUserSettingsRequest generates a "aws/request.Request" representing the -// client's request for the AdminSetUserSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminSetUserSettings for more information on using the AdminSetUserSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminSetUserSettingsRequest method. -// req, resp := client.AdminSetUserSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminSetUserSettings -func (c *CognitoIdentityProvider) AdminSetUserSettingsRequest(input *AdminSetUserSettingsInput) (req *request.Request, output *AdminSetUserSettingsOutput) { - op := &request.Operation{ - Name: opAdminSetUserSettings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminSetUserSettingsInput{} - } - - output = &AdminSetUserSettingsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminSetUserSettings API operation for Amazon Cognito Identity Provider. -// -// Sets all the user settings for a specified user name. Works on any user. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminSetUserSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminSetUserSettings -func (c *CognitoIdentityProvider) AdminSetUserSettings(input *AdminSetUserSettingsInput) (*AdminSetUserSettingsOutput, error) { - req, out := c.AdminSetUserSettingsRequest(input) - return out, req.Send() -} - -// AdminSetUserSettingsWithContext is the same as AdminSetUserSettings with the addition of -// the ability to pass a context and additional request options. -// -// See AdminSetUserSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminSetUserSettingsWithContext(ctx aws.Context, input *AdminSetUserSettingsInput, opts ...request.Option) (*AdminSetUserSettingsOutput, error) { - req, out := c.AdminSetUserSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminUpdateAuthEventFeedback = "AdminUpdateAuthEventFeedback" - -// AdminUpdateAuthEventFeedbackRequest generates a "aws/request.Request" representing the -// client's request for the AdminUpdateAuthEventFeedback operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminUpdateAuthEventFeedback for more information on using the AdminUpdateAuthEventFeedback -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminUpdateAuthEventFeedbackRequest method. -// req, resp := client.AdminUpdateAuthEventFeedbackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUpdateAuthEventFeedback -func (c *CognitoIdentityProvider) AdminUpdateAuthEventFeedbackRequest(input *AdminUpdateAuthEventFeedbackInput) (req *request.Request, output *AdminUpdateAuthEventFeedbackOutput) { - op := &request.Operation{ - Name: opAdminUpdateAuthEventFeedback, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminUpdateAuthEventFeedbackInput{} - } - - output = &AdminUpdateAuthEventFeedbackOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminUpdateAuthEventFeedback API operation for Amazon Cognito Identity Provider. -// -// Provides feedback for an authentication event as to whether it was from a -// valid user. This feedback is used for improving the risk evaluation decision -// for the user pool as part of Amazon Cognito advanced security. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminUpdateAuthEventFeedback for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserPoolAddOnNotEnabledException "UserPoolAddOnNotEnabledException" -// This exception is thrown when user pool add-ons are not enabled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUpdateAuthEventFeedback -func (c *CognitoIdentityProvider) AdminUpdateAuthEventFeedback(input *AdminUpdateAuthEventFeedbackInput) (*AdminUpdateAuthEventFeedbackOutput, error) { - req, out := c.AdminUpdateAuthEventFeedbackRequest(input) - return out, req.Send() -} - -// AdminUpdateAuthEventFeedbackWithContext is the same as AdminUpdateAuthEventFeedback with the addition of -// the ability to pass a context and additional request options. -// -// See AdminUpdateAuthEventFeedback for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminUpdateAuthEventFeedbackWithContext(ctx aws.Context, input *AdminUpdateAuthEventFeedbackInput, opts ...request.Option) (*AdminUpdateAuthEventFeedbackOutput, error) { - req, out := c.AdminUpdateAuthEventFeedbackRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminUpdateDeviceStatus = "AdminUpdateDeviceStatus" - -// AdminUpdateDeviceStatusRequest generates a "aws/request.Request" representing the -// client's request for the AdminUpdateDeviceStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminUpdateDeviceStatus for more information on using the AdminUpdateDeviceStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminUpdateDeviceStatusRequest method. -// req, resp := client.AdminUpdateDeviceStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUpdateDeviceStatus -func (c *CognitoIdentityProvider) AdminUpdateDeviceStatusRequest(input *AdminUpdateDeviceStatusInput) (req *request.Request, output *AdminUpdateDeviceStatusOutput) { - op := &request.Operation{ - Name: opAdminUpdateDeviceStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminUpdateDeviceStatusInput{} - } - - output = &AdminUpdateDeviceStatusOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminUpdateDeviceStatus API operation for Amazon Cognito Identity Provider. -// -// Updates the device status as an administrator. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminUpdateDeviceStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException" -// This exception is thrown when the user pool configuration is invalid. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUpdateDeviceStatus -func (c *CognitoIdentityProvider) AdminUpdateDeviceStatus(input *AdminUpdateDeviceStatusInput) (*AdminUpdateDeviceStatusOutput, error) { - req, out := c.AdminUpdateDeviceStatusRequest(input) - return out, req.Send() -} - -// AdminUpdateDeviceStatusWithContext is the same as AdminUpdateDeviceStatus with the addition of -// the ability to pass a context and additional request options. -// -// See AdminUpdateDeviceStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminUpdateDeviceStatusWithContext(ctx aws.Context, input *AdminUpdateDeviceStatusInput, opts ...request.Option) (*AdminUpdateDeviceStatusOutput, error) { - req, out := c.AdminUpdateDeviceStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminUpdateUserAttributes = "AdminUpdateUserAttributes" - -// AdminUpdateUserAttributesRequest generates a "aws/request.Request" representing the -// client's request for the AdminUpdateUserAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminUpdateUserAttributes for more information on using the AdminUpdateUserAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminUpdateUserAttributesRequest method. -// req, resp := client.AdminUpdateUserAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUpdateUserAttributes -func (c *CognitoIdentityProvider) AdminUpdateUserAttributesRequest(input *AdminUpdateUserAttributesInput) (req *request.Request, output *AdminUpdateUserAttributesOutput) { - op := &request.Operation{ - Name: opAdminUpdateUserAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminUpdateUserAttributesInput{} - } - - output = &AdminUpdateUserAttributesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminUpdateUserAttributes API operation for Amazon Cognito Identity Provider. -// -// Updates the specified user's attributes, including developer attributes, -// as an administrator. Works on any user. -// -// For custom attributes, you must prepend the custom: prefix to the attribute -// name. -// -// In addition to updating user attributes, this API can also be used to mark -// phone and email as verified. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminUpdateUserAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodeAliasExistsException "AliasExistsException" -// This exception is thrown when a user tries to confirm the account with an -// email or phone number that has already been supplied as an alias from a different -// account. This exception tells user that an account with this email or phone -// already exists. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUpdateUserAttributes -func (c *CognitoIdentityProvider) AdminUpdateUserAttributes(input *AdminUpdateUserAttributesInput) (*AdminUpdateUserAttributesOutput, error) { - req, out := c.AdminUpdateUserAttributesRequest(input) - return out, req.Send() -} - -// AdminUpdateUserAttributesWithContext is the same as AdminUpdateUserAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See AdminUpdateUserAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminUpdateUserAttributesWithContext(ctx aws.Context, input *AdminUpdateUserAttributesInput, opts ...request.Option) (*AdminUpdateUserAttributesOutput, error) { - req, out := c.AdminUpdateUserAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdminUserGlobalSignOut = "AdminUserGlobalSignOut" - -// AdminUserGlobalSignOutRequest generates a "aws/request.Request" representing the -// client's request for the AdminUserGlobalSignOut operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdminUserGlobalSignOut for more information on using the AdminUserGlobalSignOut -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdminUserGlobalSignOutRequest method. -// req, resp := client.AdminUserGlobalSignOutRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUserGlobalSignOut -func (c *CognitoIdentityProvider) AdminUserGlobalSignOutRequest(input *AdminUserGlobalSignOutInput) (req *request.Request, output *AdminUserGlobalSignOutOutput) { - op := &request.Operation{ - Name: opAdminUserGlobalSignOut, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdminUserGlobalSignOutInput{} - } - - output = &AdminUserGlobalSignOutOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AdminUserGlobalSignOut API operation for Amazon Cognito Identity Provider. -// -// Signs out users from all devices, as an administrator. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AdminUserGlobalSignOut for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUserGlobalSignOut -func (c *CognitoIdentityProvider) AdminUserGlobalSignOut(input *AdminUserGlobalSignOutInput) (*AdminUserGlobalSignOutOutput, error) { - req, out := c.AdminUserGlobalSignOutRequest(input) - return out, req.Send() -} - -// AdminUserGlobalSignOutWithContext is the same as AdminUserGlobalSignOut with the addition of -// the ability to pass a context and additional request options. -// -// See AdminUserGlobalSignOut for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AdminUserGlobalSignOutWithContext(ctx aws.Context, input *AdminUserGlobalSignOutInput, opts ...request.Option) (*AdminUserGlobalSignOutOutput, error) { - req, out := c.AdminUserGlobalSignOutRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateSoftwareToken = "AssociateSoftwareToken" - -// AssociateSoftwareTokenRequest generates a "aws/request.Request" representing the -// client's request for the AssociateSoftwareToken operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateSoftwareToken for more information on using the AssociateSoftwareToken -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateSoftwareTokenRequest method. -// req, resp := client.AssociateSoftwareTokenRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AssociateSoftwareToken -func (c *CognitoIdentityProvider) AssociateSoftwareTokenRequest(input *AssociateSoftwareTokenInput) (req *request.Request, output *AssociateSoftwareTokenOutput) { - op := &request.Operation{ - Name: opAssociateSoftwareToken, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateSoftwareTokenInput{} - } - - output = &AssociateSoftwareTokenOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateSoftwareToken API operation for Amazon Cognito Identity Provider. -// -// Returns a unique generated shared secret key code for the user account. The -// request takes an access token or a session string, but not both. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation AssociateSoftwareToken for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// * ErrCodeSoftwareTokenMFANotFoundException "SoftwareTokenMFANotFoundException" -// This exception is thrown when the software token TOTP multi-factor authentication -// (MFA) is not enabled for the user pool. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AssociateSoftwareToken -func (c *CognitoIdentityProvider) AssociateSoftwareToken(input *AssociateSoftwareTokenInput) (*AssociateSoftwareTokenOutput, error) { - req, out := c.AssociateSoftwareTokenRequest(input) - return out, req.Send() -} - -// AssociateSoftwareTokenWithContext is the same as AssociateSoftwareToken with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateSoftwareToken for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) AssociateSoftwareTokenWithContext(ctx aws.Context, input *AssociateSoftwareTokenInput, opts ...request.Option) (*AssociateSoftwareTokenOutput, error) { - req, out := c.AssociateSoftwareTokenRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opChangePassword = "ChangePassword" - -// ChangePasswordRequest generates a "aws/request.Request" representing the -// client's request for the ChangePassword operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ChangePassword for more information on using the ChangePassword -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ChangePasswordRequest method. -// req, resp := client.ChangePasswordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ChangePassword -func (c *CognitoIdentityProvider) ChangePasswordRequest(input *ChangePasswordInput) (req *request.Request, output *ChangePasswordOutput) { - op := &request.Operation{ - Name: opChangePassword, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ChangePasswordInput{} - } - - output = &ChangePasswordOutput{} - req = c.newRequest(op, input, output) - req.Config.Credentials = credentials.AnonymousCredentials - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ChangePassword API operation for Amazon Cognito Identity Provider. -// -// Changes the password for a specified user in a user pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ChangePassword for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeInvalidPasswordException "InvalidPasswordException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// password. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ChangePassword -func (c *CognitoIdentityProvider) ChangePassword(input *ChangePasswordInput) (*ChangePasswordOutput, error) { - req, out := c.ChangePasswordRequest(input) - return out, req.Send() -} - -// ChangePasswordWithContext is the same as ChangePassword with the addition of -// the ability to pass a context and additional request options. -// -// See ChangePassword for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ChangePasswordWithContext(ctx aws.Context, input *ChangePasswordInput, opts ...request.Option) (*ChangePasswordOutput, error) { - req, out := c.ChangePasswordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opConfirmDevice = "ConfirmDevice" - -// ConfirmDeviceRequest generates a "aws/request.Request" representing the -// client's request for the ConfirmDevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ConfirmDevice for more information on using the ConfirmDevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ConfirmDeviceRequest method. -// req, resp := client.ConfirmDeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ConfirmDevice -func (c *CognitoIdentityProvider) ConfirmDeviceRequest(input *ConfirmDeviceInput) (req *request.Request, output *ConfirmDeviceOutput) { - op := &request.Operation{ - Name: opConfirmDevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ConfirmDeviceInput{} - } - - output = &ConfirmDeviceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ConfirmDevice API operation for Amazon Cognito Identity Provider. -// -// Confirms tracking of the device. This API call is the call that begins device -// tracking. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ConfirmDevice for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInvalidPasswordException "InvalidPasswordException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// password. -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodeUsernameExistsException "UsernameExistsException" -// This exception is thrown when Amazon Cognito encounters a user name that -// already exists in the user pool. -// -// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException" -// This exception is thrown when the user pool configuration is invalid. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ConfirmDevice -func (c *CognitoIdentityProvider) ConfirmDevice(input *ConfirmDeviceInput) (*ConfirmDeviceOutput, error) { - req, out := c.ConfirmDeviceRequest(input) - return out, req.Send() -} - -// ConfirmDeviceWithContext is the same as ConfirmDevice with the addition of -// the ability to pass a context and additional request options. -// -// See ConfirmDevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ConfirmDeviceWithContext(ctx aws.Context, input *ConfirmDeviceInput, opts ...request.Option) (*ConfirmDeviceOutput, error) { - req, out := c.ConfirmDeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opConfirmForgotPassword = "ConfirmForgotPassword" - -// ConfirmForgotPasswordRequest generates a "aws/request.Request" representing the -// client's request for the ConfirmForgotPassword operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ConfirmForgotPassword for more information on using the ConfirmForgotPassword -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ConfirmForgotPasswordRequest method. -// req, resp := client.ConfirmForgotPasswordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ConfirmForgotPassword -func (c *CognitoIdentityProvider) ConfirmForgotPasswordRequest(input *ConfirmForgotPasswordInput) (req *request.Request, output *ConfirmForgotPasswordOutput) { - op := &request.Operation{ - Name: opConfirmForgotPassword, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ConfirmForgotPasswordInput{} - } - - output = &ConfirmForgotPasswordOutput{} - req = c.newRequest(op, input, output) - req.Config.Credentials = credentials.AnonymousCredentials - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ConfirmForgotPassword API operation for Amazon Cognito Identity Provider. -// -// Allows a user to enter a confirmation code to reset a forgotten password. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ConfirmForgotPassword for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeInvalidPasswordException "InvalidPasswordException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// password. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeCodeMismatchException "CodeMismatchException" -// This exception is thrown if the provided code does not match what the server -// was expecting. -// -// * ErrCodeExpiredCodeException "ExpiredCodeException" -// This exception is thrown if a code has expired. -// -// * ErrCodeTooManyFailedAttemptsException "TooManyFailedAttemptsException" -// This exception is thrown when the user has made too many failed attempts -// for a given action (e.g., sign in). -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ConfirmForgotPassword -func (c *CognitoIdentityProvider) ConfirmForgotPassword(input *ConfirmForgotPasswordInput) (*ConfirmForgotPasswordOutput, error) { - req, out := c.ConfirmForgotPasswordRequest(input) - return out, req.Send() -} - -// ConfirmForgotPasswordWithContext is the same as ConfirmForgotPassword with the addition of -// the ability to pass a context and additional request options. -// -// See ConfirmForgotPassword for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ConfirmForgotPasswordWithContext(ctx aws.Context, input *ConfirmForgotPasswordInput, opts ...request.Option) (*ConfirmForgotPasswordOutput, error) { - req, out := c.ConfirmForgotPasswordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opConfirmSignUp = "ConfirmSignUp" - -// ConfirmSignUpRequest generates a "aws/request.Request" representing the -// client's request for the ConfirmSignUp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ConfirmSignUp for more information on using the ConfirmSignUp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ConfirmSignUpRequest method. -// req, resp := client.ConfirmSignUpRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ConfirmSignUp -func (c *CognitoIdentityProvider) ConfirmSignUpRequest(input *ConfirmSignUpInput) (req *request.Request, output *ConfirmSignUpOutput) { - op := &request.Operation{ - Name: opConfirmSignUp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ConfirmSignUpInput{} - } - - output = &ConfirmSignUpOutput{} - req = c.newRequest(op, input, output) - req.Config.Credentials = credentials.AnonymousCredentials - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ConfirmSignUp API operation for Amazon Cognito Identity Provider. -// -// Confirms registration of a user and handles the existing alias from a previous -// user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ConfirmSignUp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyFailedAttemptsException "TooManyFailedAttemptsException" -// This exception is thrown when the user has made too many failed attempts -// for a given action (e.g., sign in). -// -// * ErrCodeCodeMismatchException "CodeMismatchException" -// This exception is thrown if the provided code does not match what the server -// was expecting. -// -// * ErrCodeExpiredCodeException "ExpiredCodeException" -// This exception is thrown if a code has expired. -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodeAliasExistsException "AliasExistsException" -// This exception is thrown when a user tries to confirm the account with an -// email or phone number that has already been supplied as an alias from a different -// account. This exception tells user that an account with this email or phone -// already exists. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ConfirmSignUp -func (c *CognitoIdentityProvider) ConfirmSignUp(input *ConfirmSignUpInput) (*ConfirmSignUpOutput, error) { - req, out := c.ConfirmSignUpRequest(input) - return out, req.Send() -} - -// ConfirmSignUpWithContext is the same as ConfirmSignUp with the addition of -// the ability to pass a context and additional request options. -// -// See ConfirmSignUp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ConfirmSignUpWithContext(ctx aws.Context, input *ConfirmSignUpInput, opts ...request.Option) (*ConfirmSignUpOutput, error) { - req, out := c.ConfirmSignUpRequest(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/cognito-idp-2016-04-18/CreateGroup -func (c *CognitoIdentityProvider) CreateGroupRequest(input *CreateGroupInput) (req *request.Request, output *CreateGroupOutput) { - op := &request.Operation{ - Name: opCreateGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateGroupInput{} - } - - output = &CreateGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateGroup API operation for Amazon Cognito Identity Provider. -// -// Creates a new group in the specified user pool. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation CreateGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeGroupExistsException "GroupExistsException" -// This exception is thrown when Amazon Cognito encounters a group that already -// exists in the user pool. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateGroup -func (c *CognitoIdentityProvider) 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 *CognitoIdentityProvider) 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 opCreateIdentityProvider = "CreateIdentityProvider" - -// CreateIdentityProviderRequest generates a "aws/request.Request" representing the -// client's request for the CreateIdentityProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateIdentityProvider for more information on using the CreateIdentityProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateIdentityProviderRequest method. -// req, resp := client.CreateIdentityProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateIdentityProvider -func (c *CognitoIdentityProvider) CreateIdentityProviderRequest(input *CreateIdentityProviderInput) (req *request.Request, output *CreateIdentityProviderOutput) { - op := &request.Operation{ - Name: opCreateIdentityProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateIdentityProviderInput{} - } - - output = &CreateIdentityProviderOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateIdentityProvider API operation for Amazon Cognito Identity Provider. -// -// Creates an identity provider for a user pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation CreateIdentityProvider for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeDuplicateProviderException "DuplicateProviderException" -// This exception is thrown when the provider is already supported by the user -// pool. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateIdentityProvider -func (c *CognitoIdentityProvider) CreateIdentityProvider(input *CreateIdentityProviderInput) (*CreateIdentityProviderOutput, error) { - req, out := c.CreateIdentityProviderRequest(input) - return out, req.Send() -} - -// CreateIdentityProviderWithContext is the same as CreateIdentityProvider with the addition of -// the ability to pass a context and additional request options. -// -// See CreateIdentityProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) CreateIdentityProviderWithContext(ctx aws.Context, input *CreateIdentityProviderInput, opts ...request.Option) (*CreateIdentityProviderOutput, error) { - req, out := c.CreateIdentityProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateResourceServer = "CreateResourceServer" - -// CreateResourceServerRequest generates a "aws/request.Request" representing the -// client's request for the CreateResourceServer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateResourceServer for more information on using the CreateResourceServer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateResourceServerRequest method. -// req, resp := client.CreateResourceServerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateResourceServer -func (c *CognitoIdentityProvider) CreateResourceServerRequest(input *CreateResourceServerInput) (req *request.Request, output *CreateResourceServerOutput) { - op := &request.Operation{ - Name: opCreateResourceServer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateResourceServerInput{} - } - - output = &CreateResourceServerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateResourceServer API operation for Amazon Cognito Identity Provider. -// -// Creates a new OAuth2.0 resource server and defines custom scopes in 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 Amazon Cognito Identity Provider's -// API operation CreateResourceServer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateResourceServer -func (c *CognitoIdentityProvider) CreateResourceServer(input *CreateResourceServerInput) (*CreateResourceServerOutput, error) { - req, out := c.CreateResourceServerRequest(input) - return out, req.Send() -} - -// CreateResourceServerWithContext is the same as CreateResourceServer with the addition of -// the ability to pass a context and additional request options. -// -// See CreateResourceServer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) CreateResourceServerWithContext(ctx aws.Context, input *CreateResourceServerInput, opts ...request.Option) (*CreateResourceServerOutput, error) { - req, out := c.CreateResourceServerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateUserImportJob = "CreateUserImportJob" - -// CreateUserImportJobRequest generates a "aws/request.Request" representing the -// client's request for the CreateUserImportJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateUserImportJob for more information on using the CreateUserImportJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateUserImportJobRequest method. -// req, resp := client.CreateUserImportJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateUserImportJob -func (c *CognitoIdentityProvider) CreateUserImportJobRequest(input *CreateUserImportJobInput) (req *request.Request, output *CreateUserImportJobOutput) { - op := &request.Operation{ - Name: opCreateUserImportJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateUserImportJobInput{} - } - - output = &CreateUserImportJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateUserImportJob API operation for Amazon Cognito Identity Provider. -// -// Creates the user import job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation CreateUserImportJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodePreconditionNotMetException "PreconditionNotMetException" -// This exception is thrown when a precondition is not met. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateUserImportJob -func (c *CognitoIdentityProvider) CreateUserImportJob(input *CreateUserImportJobInput) (*CreateUserImportJobOutput, error) { - req, out := c.CreateUserImportJobRequest(input) - return out, req.Send() -} - -// CreateUserImportJobWithContext is the same as CreateUserImportJob with the addition of -// the ability to pass a context and additional request options. -// -// See CreateUserImportJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) CreateUserImportJobWithContext(ctx aws.Context, input *CreateUserImportJobInput, opts ...request.Option) (*CreateUserImportJobOutput, error) { - req, out := c.CreateUserImportJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateUserPool = "CreateUserPool" - -// CreateUserPoolRequest generates a "aws/request.Request" representing the -// client's request for the CreateUserPool operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateUserPool for more information on using the CreateUserPool -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateUserPoolRequest method. -// req, resp := client.CreateUserPoolRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateUserPool -func (c *CognitoIdentityProvider) CreateUserPoolRequest(input *CreateUserPoolInput) (req *request.Request, output *CreateUserPoolOutput) { - op := &request.Operation{ - Name: opCreateUserPool, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateUserPoolInput{} - } - - output = &CreateUserPoolOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateUserPool API operation for Amazon Cognito Identity Provider. -// -// Creates a new Amazon Cognito user pool and sets the password policy for the -// pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation CreateUserPool for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException" -// This exception is returned when the role provided for SMS configuration does -// not have permission to publish using Amazon SNS. -// -// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException" -// This exception is thrown when the trust relationship is invalid for the role -// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com -// or the external ID provided in the role does not match what is provided in -// the SMS configuration for the user pool. -// -// * ErrCodeInvalidEmailRoleAccessPolicyException "InvalidEmailRoleAccessPolicyException" -// This exception is thrown when Amazon Cognito is not allowed to use your email -// identity. HTTP status code: 400. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserPoolTaggingException "UserPoolTaggingException" -// This exception is thrown when a user pool tag cannot be set or updated. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateUserPool -func (c *CognitoIdentityProvider) CreateUserPool(input *CreateUserPoolInput) (*CreateUserPoolOutput, error) { - req, out := c.CreateUserPoolRequest(input) - return out, req.Send() -} - -// CreateUserPoolWithContext is the same as CreateUserPool with the addition of -// the ability to pass a context and additional request options. -// -// See CreateUserPool for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) CreateUserPoolWithContext(ctx aws.Context, input *CreateUserPoolInput, opts ...request.Option) (*CreateUserPoolOutput, error) { - req, out := c.CreateUserPoolRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateUserPoolClient = "CreateUserPoolClient" - -// CreateUserPoolClientRequest generates a "aws/request.Request" representing the -// client's request for the CreateUserPoolClient operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateUserPoolClient for more information on using the CreateUserPoolClient -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateUserPoolClientRequest method. -// req, resp := client.CreateUserPoolClientRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateUserPoolClient -func (c *CognitoIdentityProvider) CreateUserPoolClientRequest(input *CreateUserPoolClientInput) (req *request.Request, output *CreateUserPoolClientOutput) { - op := &request.Operation{ - Name: opCreateUserPoolClient, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateUserPoolClientInput{} - } - - output = &CreateUserPoolClientOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateUserPoolClient API operation for Amazon Cognito Identity Provider. -// -// Creates the user pool client. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation CreateUserPoolClient for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeScopeDoesNotExistException "ScopeDoesNotExistException" -// This exception is thrown when the specified scope does not exist. -// -// * ErrCodeInvalidOAuthFlowException "InvalidOAuthFlowException" -// This exception is thrown when the specified OAuth flow is invalid. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateUserPoolClient -func (c *CognitoIdentityProvider) CreateUserPoolClient(input *CreateUserPoolClientInput) (*CreateUserPoolClientOutput, error) { - req, out := c.CreateUserPoolClientRequest(input) - return out, req.Send() -} - -// CreateUserPoolClientWithContext is the same as CreateUserPoolClient with the addition of -// the ability to pass a context and additional request options. -// -// See CreateUserPoolClient for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) CreateUserPoolClientWithContext(ctx aws.Context, input *CreateUserPoolClientInput, opts ...request.Option) (*CreateUserPoolClientOutput, error) { - req, out := c.CreateUserPoolClientRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateUserPoolDomain = "CreateUserPoolDomain" - -// CreateUserPoolDomainRequest generates a "aws/request.Request" representing the -// client's request for the CreateUserPoolDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateUserPoolDomain for more information on using the CreateUserPoolDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateUserPoolDomainRequest method. -// req, resp := client.CreateUserPoolDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateUserPoolDomain -func (c *CognitoIdentityProvider) CreateUserPoolDomainRequest(input *CreateUserPoolDomainInput) (req *request.Request, output *CreateUserPoolDomainOutput) { - op := &request.Operation{ - Name: opCreateUserPoolDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateUserPoolDomainInput{} - } - - output = &CreateUserPoolDomainOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateUserPoolDomain API operation for Amazon Cognito Identity Provider. -// -// Creates a new domain for a user pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation CreateUserPoolDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateUserPoolDomain -func (c *CognitoIdentityProvider) CreateUserPoolDomain(input *CreateUserPoolDomainInput) (*CreateUserPoolDomainOutput, error) { - req, out := c.CreateUserPoolDomainRequest(input) - return out, req.Send() -} - -// CreateUserPoolDomainWithContext is the same as CreateUserPoolDomain with the addition of -// the ability to pass a context and additional request options. -// -// See CreateUserPoolDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) CreateUserPoolDomainWithContext(ctx aws.Context, input *CreateUserPoolDomainInput, opts ...request.Option) (*CreateUserPoolDomainOutput, error) { - req, out := c.CreateUserPoolDomainRequest(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/cognito-idp-2016-04-18/DeleteGroup -func (c *CognitoIdentityProvider) DeleteGroupRequest(input *DeleteGroupInput) (req *request.Request, output *DeleteGroupOutput) { - op := &request.Operation{ - Name: opDeleteGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteGroupInput{} - } - - output = &DeleteGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteGroup API operation for Amazon Cognito Identity Provider. -// -// Deletes a group. Currently only groups with no members can be deleted. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DeleteGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteGroup -func (c *CognitoIdentityProvider) 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 *CognitoIdentityProvider) 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 opDeleteIdentityProvider = "DeleteIdentityProvider" - -// DeleteIdentityProviderRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIdentityProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIdentityProvider for more information on using the DeleteIdentityProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIdentityProviderRequest method. -// req, resp := client.DeleteIdentityProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteIdentityProvider -func (c *CognitoIdentityProvider) DeleteIdentityProviderRequest(input *DeleteIdentityProviderInput) (req *request.Request, output *DeleteIdentityProviderOutput) { - op := &request.Operation{ - Name: opDeleteIdentityProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteIdentityProviderInput{} - } - - output = &DeleteIdentityProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteIdentityProvider API operation for Amazon Cognito Identity Provider. -// -// Deletes an identity provider for a user pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DeleteIdentityProvider for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeUnsupportedIdentityProviderException "UnsupportedIdentityProviderException" -// This exception is thrown when the specified identifier is not supported. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteIdentityProvider -func (c *CognitoIdentityProvider) DeleteIdentityProvider(input *DeleteIdentityProviderInput) (*DeleteIdentityProviderOutput, error) { - req, out := c.DeleteIdentityProviderRequest(input) - return out, req.Send() -} - -// DeleteIdentityProviderWithContext is the same as DeleteIdentityProvider with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIdentityProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) DeleteIdentityProviderWithContext(ctx aws.Context, input *DeleteIdentityProviderInput, opts ...request.Option) (*DeleteIdentityProviderOutput, error) { - req, out := c.DeleteIdentityProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteResourceServer = "DeleteResourceServer" - -// DeleteResourceServerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteResourceServer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteResourceServer for more information on using the DeleteResourceServer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteResourceServerRequest method. -// req, resp := client.DeleteResourceServerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteResourceServer -func (c *CognitoIdentityProvider) DeleteResourceServerRequest(input *DeleteResourceServerInput) (req *request.Request, output *DeleteResourceServerOutput) { - op := &request.Operation{ - Name: opDeleteResourceServer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteResourceServerInput{} - } - - output = &DeleteResourceServerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteResourceServer API operation for Amazon Cognito Identity Provider. -// -// Deletes a resource server. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DeleteResourceServer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteResourceServer -func (c *CognitoIdentityProvider) DeleteResourceServer(input *DeleteResourceServerInput) (*DeleteResourceServerOutput, error) { - req, out := c.DeleteResourceServerRequest(input) - return out, req.Send() -} - -// DeleteResourceServerWithContext is the same as DeleteResourceServer with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteResourceServer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) DeleteResourceServerWithContext(ctx aws.Context, input *DeleteResourceServerInput, opts ...request.Option) (*DeleteResourceServerOutput, error) { - req, out := c.DeleteResourceServerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUser = "DeleteUser" - -// DeleteUserRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUser for more information on using the DeleteUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteUserRequest method. -// req, resp := client.DeleteUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteUser -func (c *CognitoIdentityProvider) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, output *DeleteUserOutput) { - op := &request.Operation{ - Name: opDeleteUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUserInput{} - } - - output = &DeleteUserOutput{} - req = c.newRequest(op, input, output) - req.Config.Credentials = credentials.AnonymousCredentials - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUser API operation for Amazon Cognito Identity Provider. -// -// Allows a user to delete himself or herself. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DeleteUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteUser -func (c *CognitoIdentityProvider) DeleteUser(input *DeleteUserInput) (*DeleteUserOutput, error) { - req, out := c.DeleteUserRequest(input) - return out, req.Send() -} - -// DeleteUserWithContext is the same as DeleteUser with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opts ...request.Option) (*DeleteUserOutput, error) { - req, out := c.DeleteUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUserAttributes = "DeleteUserAttributes" - -// DeleteUserAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUserAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUserAttributes for more information on using the DeleteUserAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteUserAttributesRequest method. -// req, resp := client.DeleteUserAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteUserAttributes -func (c *CognitoIdentityProvider) DeleteUserAttributesRequest(input *DeleteUserAttributesInput) (req *request.Request, output *DeleteUserAttributesOutput) { - op := &request.Operation{ - Name: opDeleteUserAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUserAttributesInput{} - } - - output = &DeleteUserAttributesOutput{} - req = c.newRequest(op, input, output) - req.Config.Credentials = credentials.AnonymousCredentials - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUserAttributes API operation for Amazon Cognito Identity Provider. -// -// Deletes the attributes for a user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DeleteUserAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteUserAttributes -func (c *CognitoIdentityProvider) DeleteUserAttributes(input *DeleteUserAttributesInput) (*DeleteUserAttributesOutput, error) { - req, out := c.DeleteUserAttributesRequest(input) - return out, req.Send() -} - -// DeleteUserAttributesWithContext is the same as DeleteUserAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUserAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) DeleteUserAttributesWithContext(ctx aws.Context, input *DeleteUserAttributesInput, opts ...request.Option) (*DeleteUserAttributesOutput, error) { - req, out := c.DeleteUserAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUserPool = "DeleteUserPool" - -// DeleteUserPoolRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUserPool operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUserPool for more information on using the DeleteUserPool -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteUserPoolRequest method. -// req, resp := client.DeleteUserPoolRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteUserPool -func (c *CognitoIdentityProvider) DeleteUserPoolRequest(input *DeleteUserPoolInput) (req *request.Request, output *DeleteUserPoolOutput) { - op := &request.Operation{ - Name: opDeleteUserPool, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUserPoolInput{} - } - - output = &DeleteUserPoolOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUserPool API operation for Amazon Cognito Identity Provider. -// -// Deletes the specified Amazon Cognito user pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DeleteUserPool for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserImportInProgressException "UserImportInProgressException" -// This exception is thrown when you are trying to modify a user pool while -// a user import job is in progress for that pool. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteUserPool -func (c *CognitoIdentityProvider) DeleteUserPool(input *DeleteUserPoolInput) (*DeleteUserPoolOutput, error) { - req, out := c.DeleteUserPoolRequest(input) - return out, req.Send() -} - -// DeleteUserPoolWithContext is the same as DeleteUserPool with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUserPool for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) DeleteUserPoolWithContext(ctx aws.Context, input *DeleteUserPoolInput, opts ...request.Option) (*DeleteUserPoolOutput, error) { - req, out := c.DeleteUserPoolRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUserPoolClient = "DeleteUserPoolClient" - -// DeleteUserPoolClientRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUserPoolClient operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUserPoolClient for more information on using the DeleteUserPoolClient -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteUserPoolClientRequest method. -// req, resp := client.DeleteUserPoolClientRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteUserPoolClient -func (c *CognitoIdentityProvider) DeleteUserPoolClientRequest(input *DeleteUserPoolClientInput) (req *request.Request, output *DeleteUserPoolClientOutput) { - op := &request.Operation{ - Name: opDeleteUserPoolClient, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUserPoolClientInput{} - } - - output = &DeleteUserPoolClientOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUserPoolClient API operation for Amazon Cognito Identity Provider. -// -// Allows the developer to delete the user pool client. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DeleteUserPoolClient for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteUserPoolClient -func (c *CognitoIdentityProvider) DeleteUserPoolClient(input *DeleteUserPoolClientInput) (*DeleteUserPoolClientOutput, error) { - req, out := c.DeleteUserPoolClientRequest(input) - return out, req.Send() -} - -// DeleteUserPoolClientWithContext is the same as DeleteUserPoolClient with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUserPoolClient for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) DeleteUserPoolClientWithContext(ctx aws.Context, input *DeleteUserPoolClientInput, opts ...request.Option) (*DeleteUserPoolClientOutput, error) { - req, out := c.DeleteUserPoolClientRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUserPoolDomain = "DeleteUserPoolDomain" - -// DeleteUserPoolDomainRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUserPoolDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUserPoolDomain for more information on using the DeleteUserPoolDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteUserPoolDomainRequest method. -// req, resp := client.DeleteUserPoolDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteUserPoolDomain -func (c *CognitoIdentityProvider) DeleteUserPoolDomainRequest(input *DeleteUserPoolDomainInput) (req *request.Request, output *DeleteUserPoolDomainOutput) { - op := &request.Operation{ - Name: opDeleteUserPoolDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUserPoolDomainInput{} - } - - output = &DeleteUserPoolDomainOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUserPoolDomain API operation for Amazon Cognito Identity Provider. -// -// Deletes a domain for a user pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DeleteUserPoolDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DeleteUserPoolDomain -func (c *CognitoIdentityProvider) DeleteUserPoolDomain(input *DeleteUserPoolDomainInput) (*DeleteUserPoolDomainOutput, error) { - req, out := c.DeleteUserPoolDomainRequest(input) - return out, req.Send() -} - -// DeleteUserPoolDomainWithContext is the same as DeleteUserPoolDomain with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUserPoolDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) DeleteUserPoolDomainWithContext(ctx aws.Context, input *DeleteUserPoolDomainInput, opts ...request.Option) (*DeleteUserPoolDomainOutput, error) { - req, out := c.DeleteUserPoolDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeIdentityProvider = "DescribeIdentityProvider" - -// DescribeIdentityProviderRequest generates a "aws/request.Request" representing the -// client's request for the DescribeIdentityProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeIdentityProvider for more information on using the DescribeIdentityProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeIdentityProviderRequest method. -// req, resp := client.DescribeIdentityProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeIdentityProvider -func (c *CognitoIdentityProvider) DescribeIdentityProviderRequest(input *DescribeIdentityProviderInput) (req *request.Request, output *DescribeIdentityProviderOutput) { - op := &request.Operation{ - Name: opDescribeIdentityProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeIdentityProviderInput{} - } - - output = &DescribeIdentityProviderOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeIdentityProvider API operation for Amazon Cognito Identity Provider. -// -// Gets information about a specific identity provider. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DescribeIdentityProvider for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeIdentityProvider -func (c *CognitoIdentityProvider) DescribeIdentityProvider(input *DescribeIdentityProviderInput) (*DescribeIdentityProviderOutput, error) { - req, out := c.DescribeIdentityProviderRequest(input) - return out, req.Send() -} - -// DescribeIdentityProviderWithContext is the same as DescribeIdentityProvider with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeIdentityProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) DescribeIdentityProviderWithContext(ctx aws.Context, input *DescribeIdentityProviderInput, opts ...request.Option) (*DescribeIdentityProviderOutput, error) { - req, out := c.DescribeIdentityProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeResourceServer = "DescribeResourceServer" - -// DescribeResourceServerRequest generates a "aws/request.Request" representing the -// client's request for the DescribeResourceServer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeResourceServer for more information on using the DescribeResourceServer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeResourceServerRequest method. -// req, resp := client.DescribeResourceServerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeResourceServer -func (c *CognitoIdentityProvider) DescribeResourceServerRequest(input *DescribeResourceServerInput) (req *request.Request, output *DescribeResourceServerOutput) { - op := &request.Operation{ - Name: opDescribeResourceServer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeResourceServerInput{} - } - - output = &DescribeResourceServerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeResourceServer API operation for Amazon Cognito Identity Provider. -// -// Describes a resource server. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DescribeResourceServer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeResourceServer -func (c *CognitoIdentityProvider) DescribeResourceServer(input *DescribeResourceServerInput) (*DescribeResourceServerOutput, error) { - req, out := c.DescribeResourceServerRequest(input) - return out, req.Send() -} - -// DescribeResourceServerWithContext is the same as DescribeResourceServer with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeResourceServer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) DescribeResourceServerWithContext(ctx aws.Context, input *DescribeResourceServerInput, opts ...request.Option) (*DescribeResourceServerOutput, error) { - req, out := c.DescribeResourceServerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeRiskConfiguration = "DescribeRiskConfiguration" - -// DescribeRiskConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRiskConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRiskConfiguration for more information on using the DescribeRiskConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRiskConfigurationRequest method. -// req, resp := client.DescribeRiskConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeRiskConfiguration -func (c *CognitoIdentityProvider) DescribeRiskConfigurationRequest(input *DescribeRiskConfigurationInput) (req *request.Request, output *DescribeRiskConfigurationOutput) { - op := &request.Operation{ - Name: opDescribeRiskConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeRiskConfigurationInput{} - } - - output = &DescribeRiskConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRiskConfiguration API operation for Amazon Cognito Identity Provider. -// -// Describes the risk configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DescribeRiskConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserPoolAddOnNotEnabledException "UserPoolAddOnNotEnabledException" -// This exception is thrown when user pool add-ons are not enabled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeRiskConfiguration -func (c *CognitoIdentityProvider) DescribeRiskConfiguration(input *DescribeRiskConfigurationInput) (*DescribeRiskConfigurationOutput, error) { - req, out := c.DescribeRiskConfigurationRequest(input) - return out, req.Send() -} - -// DescribeRiskConfigurationWithContext is the same as DescribeRiskConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRiskConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) DescribeRiskConfigurationWithContext(ctx aws.Context, input *DescribeRiskConfigurationInput, opts ...request.Option) (*DescribeRiskConfigurationOutput, error) { - req, out := c.DescribeRiskConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeUserImportJob = "DescribeUserImportJob" - -// DescribeUserImportJobRequest generates a "aws/request.Request" representing the -// client's request for the DescribeUserImportJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeUserImportJob for more information on using the DescribeUserImportJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeUserImportJobRequest method. -// req, resp := client.DescribeUserImportJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeUserImportJob -func (c *CognitoIdentityProvider) DescribeUserImportJobRequest(input *DescribeUserImportJobInput) (req *request.Request, output *DescribeUserImportJobOutput) { - op := &request.Operation{ - Name: opDescribeUserImportJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeUserImportJobInput{} - } - - output = &DescribeUserImportJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeUserImportJob API operation for Amazon Cognito Identity Provider. -// -// Describes the user import job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DescribeUserImportJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeUserImportJob -func (c *CognitoIdentityProvider) DescribeUserImportJob(input *DescribeUserImportJobInput) (*DescribeUserImportJobOutput, error) { - req, out := c.DescribeUserImportJobRequest(input) - return out, req.Send() -} - -// DescribeUserImportJobWithContext is the same as DescribeUserImportJob with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeUserImportJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) DescribeUserImportJobWithContext(ctx aws.Context, input *DescribeUserImportJobInput, opts ...request.Option) (*DescribeUserImportJobOutput, error) { - req, out := c.DescribeUserImportJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeUserPool = "DescribeUserPool" - -// DescribeUserPoolRequest generates a "aws/request.Request" representing the -// client's request for the DescribeUserPool operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeUserPool for more information on using the DescribeUserPool -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeUserPoolRequest method. -// req, resp := client.DescribeUserPoolRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeUserPool -func (c *CognitoIdentityProvider) DescribeUserPoolRequest(input *DescribeUserPoolInput) (req *request.Request, output *DescribeUserPoolOutput) { - op := &request.Operation{ - Name: opDescribeUserPool, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeUserPoolInput{} - } - - output = &DescribeUserPoolOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeUserPool API operation for Amazon Cognito Identity Provider. -// -// Returns the configuration information and metadata of the specified user -// pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DescribeUserPool for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserPoolTaggingException "UserPoolTaggingException" -// This exception is thrown when a user pool tag cannot be set or updated. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeUserPool -func (c *CognitoIdentityProvider) DescribeUserPool(input *DescribeUserPoolInput) (*DescribeUserPoolOutput, error) { - req, out := c.DescribeUserPoolRequest(input) - return out, req.Send() -} - -// DescribeUserPoolWithContext is the same as DescribeUserPool with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeUserPool for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) DescribeUserPoolWithContext(ctx aws.Context, input *DescribeUserPoolInput, opts ...request.Option) (*DescribeUserPoolOutput, error) { - req, out := c.DescribeUserPoolRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeUserPoolClient = "DescribeUserPoolClient" - -// DescribeUserPoolClientRequest generates a "aws/request.Request" representing the -// client's request for the DescribeUserPoolClient operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeUserPoolClient for more information on using the DescribeUserPoolClient -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeUserPoolClientRequest method. -// req, resp := client.DescribeUserPoolClientRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeUserPoolClient -func (c *CognitoIdentityProvider) DescribeUserPoolClientRequest(input *DescribeUserPoolClientInput) (req *request.Request, output *DescribeUserPoolClientOutput) { - op := &request.Operation{ - Name: opDescribeUserPoolClient, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeUserPoolClientInput{} - } - - output = &DescribeUserPoolClientOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeUserPoolClient API operation for Amazon Cognito Identity Provider. -// -// Client method for returning the configuration information and metadata of -// the specified user pool app client. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DescribeUserPoolClient for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeUserPoolClient -func (c *CognitoIdentityProvider) DescribeUserPoolClient(input *DescribeUserPoolClientInput) (*DescribeUserPoolClientOutput, error) { - req, out := c.DescribeUserPoolClientRequest(input) - return out, req.Send() -} - -// DescribeUserPoolClientWithContext is the same as DescribeUserPoolClient with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeUserPoolClient for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) DescribeUserPoolClientWithContext(ctx aws.Context, input *DescribeUserPoolClientInput, opts ...request.Option) (*DescribeUserPoolClientOutput, error) { - req, out := c.DescribeUserPoolClientRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeUserPoolDomain = "DescribeUserPoolDomain" - -// DescribeUserPoolDomainRequest generates a "aws/request.Request" representing the -// client's request for the DescribeUserPoolDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeUserPoolDomain for more information on using the DescribeUserPoolDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeUserPoolDomainRequest method. -// req, resp := client.DescribeUserPoolDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeUserPoolDomain -func (c *CognitoIdentityProvider) DescribeUserPoolDomainRequest(input *DescribeUserPoolDomainInput) (req *request.Request, output *DescribeUserPoolDomainOutput) { - op := &request.Operation{ - Name: opDescribeUserPoolDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeUserPoolDomainInput{} - } - - output = &DescribeUserPoolDomainOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeUserPoolDomain API operation for Amazon Cognito Identity Provider. -// -// Gets information about a domain. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation DescribeUserPoolDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeUserPoolDomain -func (c *CognitoIdentityProvider) DescribeUserPoolDomain(input *DescribeUserPoolDomainInput) (*DescribeUserPoolDomainOutput, error) { - req, out := c.DescribeUserPoolDomainRequest(input) - return out, req.Send() -} - -// DescribeUserPoolDomainWithContext is the same as DescribeUserPoolDomain with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeUserPoolDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) DescribeUserPoolDomainWithContext(ctx aws.Context, input *DescribeUserPoolDomainInput, opts ...request.Option) (*DescribeUserPoolDomainOutput, error) { - req, out := c.DescribeUserPoolDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opForgetDevice = "ForgetDevice" - -// ForgetDeviceRequest generates a "aws/request.Request" representing the -// client's request for the ForgetDevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ForgetDevice for more information on using the ForgetDevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ForgetDeviceRequest method. -// req, resp := client.ForgetDeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ForgetDevice -func (c *CognitoIdentityProvider) ForgetDeviceRequest(input *ForgetDeviceInput) (req *request.Request, output *ForgetDeviceOutput) { - op := &request.Operation{ - Name: opForgetDevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ForgetDeviceInput{} - } - - output = &ForgetDeviceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ForgetDevice API operation for Amazon Cognito Identity Provider. -// -// Forgets the specified device. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ForgetDevice for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException" -// This exception is thrown when the user pool configuration is invalid. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ForgetDevice -func (c *CognitoIdentityProvider) ForgetDevice(input *ForgetDeviceInput) (*ForgetDeviceOutput, error) { - req, out := c.ForgetDeviceRequest(input) - return out, req.Send() -} - -// ForgetDeviceWithContext is the same as ForgetDevice with the addition of -// the ability to pass a context and additional request options. -// -// See ForgetDevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ForgetDeviceWithContext(ctx aws.Context, input *ForgetDeviceInput, opts ...request.Option) (*ForgetDeviceOutput, error) { - req, out := c.ForgetDeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opForgotPassword = "ForgotPassword" - -// ForgotPasswordRequest generates a "aws/request.Request" representing the -// client's request for the ForgotPassword operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ForgotPassword for more information on using the ForgotPassword -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ForgotPasswordRequest method. -// req, resp := client.ForgotPasswordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ForgotPassword -func (c *CognitoIdentityProvider) ForgotPasswordRequest(input *ForgotPasswordInput) (req *request.Request, output *ForgotPasswordOutput) { - op := &request.Operation{ - Name: opForgotPassword, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ForgotPasswordInput{} - } - - output = &ForgotPasswordOutput{} - req = c.newRequest(op, input, output) - req.Config.Credentials = credentials.AnonymousCredentials - return -} - -// ForgotPassword API operation for Amazon Cognito Identity Provider. -// -// Calling this API causes a message to be sent to the end user with a confirmation -// code that is required to change the user's password. For the Username parameter, -// you can use the username or user alias. If a verified phone number exists -// for the user, the confirmation code is sent to the phone number. Otherwise, -// if a verified email exists, the confirmation code is sent to the email. If -// neither a verified phone number nor a verified email exists, InvalidParameterException -// is thrown. To use the confirmation code for resetting the password, call -// . -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ForgotPassword for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException" -// This exception is returned when the role provided for SMS configuration does -// not have permission to publish using Amazon SNS. -// -// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException" -// This exception is thrown when the trust relationship is invalid for the role -// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com -// or the external ID provided in the role does not match what is provided in -// the SMS configuration for the user pool. -// -// * ErrCodeInvalidEmailRoleAccessPolicyException "InvalidEmailRoleAccessPolicyException" -// This exception is thrown when Amazon Cognito is not allowed to use your email -// identity. HTTP status code: 400. -// -// * ErrCodeCodeDeliveryFailureException "CodeDeliveryFailureException" -// This exception is thrown when a verification code fails to deliver successfully. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ForgotPassword -func (c *CognitoIdentityProvider) ForgotPassword(input *ForgotPasswordInput) (*ForgotPasswordOutput, error) { - req, out := c.ForgotPasswordRequest(input) - return out, req.Send() -} - -// ForgotPasswordWithContext is the same as ForgotPassword with the addition of -// the ability to pass a context and additional request options. -// -// See ForgotPassword for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ForgotPasswordWithContext(ctx aws.Context, input *ForgotPasswordInput, opts ...request.Option) (*ForgotPasswordOutput, error) { - req, out := c.ForgotPasswordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCSVHeader = "GetCSVHeader" - -// GetCSVHeaderRequest generates a "aws/request.Request" representing the -// client's request for the GetCSVHeader operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCSVHeader for more information on using the GetCSVHeader -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCSVHeaderRequest method. -// req, resp := client.GetCSVHeaderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetCSVHeader -func (c *CognitoIdentityProvider) GetCSVHeaderRequest(input *GetCSVHeaderInput) (req *request.Request, output *GetCSVHeaderOutput) { - op := &request.Operation{ - Name: opGetCSVHeader, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCSVHeaderInput{} - } - - output = &GetCSVHeaderOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCSVHeader API operation for Amazon Cognito Identity Provider. -// -// Gets the header information for the .csv file to be used as input for the -// user import job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation GetCSVHeader for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetCSVHeader -func (c *CognitoIdentityProvider) GetCSVHeader(input *GetCSVHeaderInput) (*GetCSVHeaderOutput, error) { - req, out := c.GetCSVHeaderRequest(input) - return out, req.Send() -} - -// GetCSVHeaderWithContext is the same as GetCSVHeader with the addition of -// the ability to pass a context and additional request options. -// -// See GetCSVHeader for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) GetCSVHeaderWithContext(ctx aws.Context, input *GetCSVHeaderInput, opts ...request.Option) (*GetCSVHeaderOutput, error) { - req, out := c.GetCSVHeaderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDevice = "GetDevice" - -// GetDeviceRequest generates a "aws/request.Request" representing the -// client's request for the GetDevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDevice for more information on using the GetDevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDeviceRequest method. -// req, resp := client.GetDeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetDevice -func (c *CognitoIdentityProvider) GetDeviceRequest(input *GetDeviceInput) (req *request.Request, output *GetDeviceOutput) { - op := &request.Operation{ - Name: opGetDevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDeviceInput{} - } - - output = &GetDeviceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDevice API operation for Amazon Cognito Identity Provider. -// -// Gets the device. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation GetDevice for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException" -// This exception is thrown when the user pool configuration is invalid. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetDevice -func (c *CognitoIdentityProvider) GetDevice(input *GetDeviceInput) (*GetDeviceOutput, error) { - req, out := c.GetDeviceRequest(input) - return out, req.Send() -} - -// GetDeviceWithContext is the same as GetDevice with the addition of -// the ability to pass a context and additional request options. -// -// See GetDevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) GetDeviceWithContext(ctx aws.Context, input *GetDeviceInput, opts ...request.Option) (*GetDeviceOutput, error) { - req, out := c.GetDeviceRequest(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/cognito-idp-2016-04-18/GetGroup -func (c *CognitoIdentityProvider) GetGroupRequest(input *GetGroupInput) (req *request.Request, output *GetGroupOutput) { - op := &request.Operation{ - Name: opGetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetGroupInput{} - } - - output = &GetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGroup API operation for Amazon Cognito Identity Provider. -// -// Gets a group. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation GetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetGroup -func (c *CognitoIdentityProvider) 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 *CognitoIdentityProvider) 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 opGetIdentityProviderByIdentifier = "GetIdentityProviderByIdentifier" - -// GetIdentityProviderByIdentifierRequest generates a "aws/request.Request" representing the -// client's request for the GetIdentityProviderByIdentifier operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIdentityProviderByIdentifier for more information on using the GetIdentityProviderByIdentifier -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIdentityProviderByIdentifierRequest method. -// req, resp := client.GetIdentityProviderByIdentifierRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetIdentityProviderByIdentifier -func (c *CognitoIdentityProvider) GetIdentityProviderByIdentifierRequest(input *GetIdentityProviderByIdentifierInput) (req *request.Request, output *GetIdentityProviderByIdentifierOutput) { - op := &request.Operation{ - Name: opGetIdentityProviderByIdentifier, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetIdentityProviderByIdentifierInput{} - } - - output = &GetIdentityProviderByIdentifierOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIdentityProviderByIdentifier API operation for Amazon Cognito Identity Provider. -// -// Gets the specified identity provider. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation GetIdentityProviderByIdentifier for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetIdentityProviderByIdentifier -func (c *CognitoIdentityProvider) GetIdentityProviderByIdentifier(input *GetIdentityProviderByIdentifierInput) (*GetIdentityProviderByIdentifierOutput, error) { - req, out := c.GetIdentityProviderByIdentifierRequest(input) - return out, req.Send() -} - -// GetIdentityProviderByIdentifierWithContext is the same as GetIdentityProviderByIdentifier with the addition of -// the ability to pass a context and additional request options. -// -// See GetIdentityProviderByIdentifier for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) GetIdentityProviderByIdentifierWithContext(ctx aws.Context, input *GetIdentityProviderByIdentifierInput, opts ...request.Option) (*GetIdentityProviderByIdentifierOutput, error) { - req, out := c.GetIdentityProviderByIdentifierRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSigningCertificate = "GetSigningCertificate" - -// GetSigningCertificateRequest generates a "aws/request.Request" representing the -// client's request for the GetSigningCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSigningCertificate for more information on using the GetSigningCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSigningCertificateRequest method. -// req, resp := client.GetSigningCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetSigningCertificate -func (c *CognitoIdentityProvider) GetSigningCertificateRequest(input *GetSigningCertificateInput) (req *request.Request, output *GetSigningCertificateOutput) { - op := &request.Operation{ - Name: opGetSigningCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSigningCertificateInput{} - } - - output = &GetSigningCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSigningCertificate API operation for Amazon Cognito Identity Provider. -// -// This method takes a user pool ID, and returns the signing certificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation GetSigningCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetSigningCertificate -func (c *CognitoIdentityProvider) GetSigningCertificate(input *GetSigningCertificateInput) (*GetSigningCertificateOutput, error) { - req, out := c.GetSigningCertificateRequest(input) - return out, req.Send() -} - -// GetSigningCertificateWithContext is the same as GetSigningCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See GetSigningCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) GetSigningCertificateWithContext(ctx aws.Context, input *GetSigningCertificateInput, opts ...request.Option) (*GetSigningCertificateOutput, error) { - req, out := c.GetSigningCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUICustomization = "GetUICustomization" - -// GetUICustomizationRequest generates a "aws/request.Request" representing the -// client's request for the GetUICustomization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUICustomization for more information on using the GetUICustomization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUICustomizationRequest method. -// req, resp := client.GetUICustomizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetUICustomization -func (c *CognitoIdentityProvider) GetUICustomizationRequest(input *GetUICustomizationInput) (req *request.Request, output *GetUICustomizationOutput) { - op := &request.Operation{ - Name: opGetUICustomization, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetUICustomizationInput{} - } - - output = &GetUICustomizationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUICustomization API operation for Amazon Cognito Identity Provider. -// -// Gets the UI Customization information for a particular app client's app UI, -// if there is something set. If nothing is set for the particular client, but -// there is an existing pool level customization (app clientId will be ALL), -// then that is returned. If nothing is present, then an empty shape is returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation GetUICustomization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetUICustomization -func (c *CognitoIdentityProvider) GetUICustomization(input *GetUICustomizationInput) (*GetUICustomizationOutput, error) { - req, out := c.GetUICustomizationRequest(input) - return out, req.Send() -} - -// GetUICustomizationWithContext is the same as GetUICustomization with the addition of -// the ability to pass a context and additional request options. -// -// See GetUICustomization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) GetUICustomizationWithContext(ctx aws.Context, input *GetUICustomizationInput, opts ...request.Option) (*GetUICustomizationOutput, error) { - req, out := c.GetUICustomizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUser = "GetUser" - -// GetUserRequest generates a "aws/request.Request" representing the -// client's request for the GetUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUser for more information on using the GetUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUserRequest method. -// req, resp := client.GetUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetUser -func (c *CognitoIdentityProvider) GetUserRequest(input *GetUserInput) (req *request.Request, output *GetUserOutput) { - op := &request.Operation{ - Name: opGetUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetUserInput{} - } - - output = &GetUserOutput{} - req = c.newRequest(op, input, output) - req.Config.Credentials = credentials.AnonymousCredentials - return -} - -// GetUser API operation for Amazon Cognito Identity Provider. -// -// Gets the user attributes and metadata for a user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation GetUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetUser -func (c *CognitoIdentityProvider) GetUser(input *GetUserInput) (*GetUserOutput, error) { - req, out := c.GetUserRequest(input) - return out, req.Send() -} - -// GetUserWithContext is the same as GetUser with the addition of -// the ability to pass a context and additional request options. -// -// See GetUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) GetUserWithContext(ctx aws.Context, input *GetUserInput, opts ...request.Option) (*GetUserOutput, error) { - req, out := c.GetUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUserAttributeVerificationCode = "GetUserAttributeVerificationCode" - -// GetUserAttributeVerificationCodeRequest generates a "aws/request.Request" representing the -// client's request for the GetUserAttributeVerificationCode operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUserAttributeVerificationCode for more information on using the GetUserAttributeVerificationCode -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUserAttributeVerificationCodeRequest method. -// req, resp := client.GetUserAttributeVerificationCodeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetUserAttributeVerificationCode -func (c *CognitoIdentityProvider) GetUserAttributeVerificationCodeRequest(input *GetUserAttributeVerificationCodeInput) (req *request.Request, output *GetUserAttributeVerificationCodeOutput) { - op := &request.Operation{ - Name: opGetUserAttributeVerificationCode, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetUserAttributeVerificationCodeInput{} - } - - output = &GetUserAttributeVerificationCodeOutput{} - req = c.newRequest(op, input, output) - req.Config.Credentials = credentials.AnonymousCredentials - return -} - -// GetUserAttributeVerificationCode API operation for Amazon Cognito Identity Provider. -// -// Gets the user attribute verification code for the specified attribute name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation GetUserAttributeVerificationCode for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException" -// This exception is returned when the role provided for SMS configuration does -// not have permission to publish using Amazon SNS. -// -// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException" -// This exception is thrown when the trust relationship is invalid for the role -// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com -// or the external ID provided in the role does not match what is provided in -// the SMS configuration for the user pool. -// -// * ErrCodeInvalidEmailRoleAccessPolicyException "InvalidEmailRoleAccessPolicyException" -// This exception is thrown when Amazon Cognito is not allowed to use your email -// identity. HTTP status code: 400. -// -// * ErrCodeCodeDeliveryFailureException "CodeDeliveryFailureException" -// This exception is thrown when a verification code fails to deliver successfully. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetUserAttributeVerificationCode -func (c *CognitoIdentityProvider) GetUserAttributeVerificationCode(input *GetUserAttributeVerificationCodeInput) (*GetUserAttributeVerificationCodeOutput, error) { - req, out := c.GetUserAttributeVerificationCodeRequest(input) - return out, req.Send() -} - -// GetUserAttributeVerificationCodeWithContext is the same as GetUserAttributeVerificationCode with the addition of -// the ability to pass a context and additional request options. -// -// See GetUserAttributeVerificationCode for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) GetUserAttributeVerificationCodeWithContext(ctx aws.Context, input *GetUserAttributeVerificationCodeInput, opts ...request.Option) (*GetUserAttributeVerificationCodeOutput, error) { - req, out := c.GetUserAttributeVerificationCodeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUserPoolMfaConfig = "GetUserPoolMfaConfig" - -// GetUserPoolMfaConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetUserPoolMfaConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUserPoolMfaConfig for more information on using the GetUserPoolMfaConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUserPoolMfaConfigRequest method. -// req, resp := client.GetUserPoolMfaConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetUserPoolMfaConfig -func (c *CognitoIdentityProvider) GetUserPoolMfaConfigRequest(input *GetUserPoolMfaConfigInput) (req *request.Request, output *GetUserPoolMfaConfigOutput) { - op := &request.Operation{ - Name: opGetUserPoolMfaConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetUserPoolMfaConfigInput{} - } - - output = &GetUserPoolMfaConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUserPoolMfaConfig API operation for Amazon Cognito Identity Provider. -// -// Gets the user pool multi-factor authentication (MFA) configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation GetUserPoolMfaConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetUserPoolMfaConfig -func (c *CognitoIdentityProvider) GetUserPoolMfaConfig(input *GetUserPoolMfaConfigInput) (*GetUserPoolMfaConfigOutput, error) { - req, out := c.GetUserPoolMfaConfigRequest(input) - return out, req.Send() -} - -// GetUserPoolMfaConfigWithContext is the same as GetUserPoolMfaConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetUserPoolMfaConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) GetUserPoolMfaConfigWithContext(ctx aws.Context, input *GetUserPoolMfaConfigInput, opts ...request.Option) (*GetUserPoolMfaConfigOutput, error) { - req, out := c.GetUserPoolMfaConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGlobalSignOut = "GlobalSignOut" - -// GlobalSignOutRequest generates a "aws/request.Request" representing the -// client's request for the GlobalSignOut operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GlobalSignOut for more information on using the GlobalSignOut -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GlobalSignOutRequest method. -// req, resp := client.GlobalSignOutRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GlobalSignOut -func (c *CognitoIdentityProvider) GlobalSignOutRequest(input *GlobalSignOutInput) (req *request.Request, output *GlobalSignOutOutput) { - op := &request.Operation{ - Name: opGlobalSignOut, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GlobalSignOutInput{} - } - - output = &GlobalSignOutOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// GlobalSignOut API operation for Amazon Cognito Identity Provider. -// -// Signs out users from all devices. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation GlobalSignOut for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GlobalSignOut -func (c *CognitoIdentityProvider) GlobalSignOut(input *GlobalSignOutInput) (*GlobalSignOutOutput, error) { - req, out := c.GlobalSignOutRequest(input) - return out, req.Send() -} - -// GlobalSignOutWithContext is the same as GlobalSignOut with the addition of -// the ability to pass a context and additional request options. -// -// See GlobalSignOut for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) GlobalSignOutWithContext(ctx aws.Context, input *GlobalSignOutInput, opts ...request.Option) (*GlobalSignOutOutput, error) { - req, out := c.GlobalSignOutRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInitiateAuth = "InitiateAuth" - -// InitiateAuthRequest generates a "aws/request.Request" representing the -// client's request for the InitiateAuth operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See InitiateAuth for more information on using the InitiateAuth -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the InitiateAuthRequest method. -// req, resp := client.InitiateAuthRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/InitiateAuth -func (c *CognitoIdentityProvider) InitiateAuthRequest(input *InitiateAuthInput) (req *request.Request, output *InitiateAuthOutput) { - op := &request.Operation{ - Name: opInitiateAuth, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InitiateAuthInput{} - } - - output = &InitiateAuthOutput{} - req = c.newRequest(op, input, output) - return -} - -// InitiateAuth API operation for Amazon Cognito Identity Provider. -// -// Initiates the authentication flow. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation InitiateAuth for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException" -// This exception is thrown when the user pool configuration is invalid. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/InitiateAuth -func (c *CognitoIdentityProvider) InitiateAuth(input *InitiateAuthInput) (*InitiateAuthOutput, error) { - req, out := c.InitiateAuthRequest(input) - return out, req.Send() -} - -// InitiateAuthWithContext is the same as InitiateAuth with the addition of -// the ability to pass a context and additional request options. -// -// See InitiateAuth for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) InitiateAuthWithContext(ctx aws.Context, input *InitiateAuthInput, opts ...request.Option) (*InitiateAuthOutput, error) { - req, out := c.InitiateAuthRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDevices = "ListDevices" - -// ListDevicesRequest generates a "aws/request.Request" representing the -// client's request for the ListDevices operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDevices for more information on using the ListDevices -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDevicesRequest method. -// req, resp := client.ListDevicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListDevices -func (c *CognitoIdentityProvider) ListDevicesRequest(input *ListDevicesInput) (req *request.Request, output *ListDevicesOutput) { - op := &request.Operation{ - Name: opListDevices, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListDevicesInput{} - } - - output = &ListDevicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDevices API operation for Amazon Cognito Identity Provider. -// -// Lists the devices. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ListDevices for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException" -// This exception is thrown when the user pool configuration is invalid. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListDevices -func (c *CognitoIdentityProvider) ListDevices(input *ListDevicesInput) (*ListDevicesOutput, error) { - req, out := c.ListDevicesRequest(input) - return out, req.Send() -} - -// ListDevicesWithContext is the same as ListDevices with the addition of -// the ability to pass a context and additional request options. -// -// See ListDevices for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ListDevicesWithContext(ctx aws.Context, input *ListDevicesInput, opts ...request.Option) (*ListDevicesOutput, error) { - req, out := c.ListDevicesRequest(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/cognito-idp-2016-04-18/ListGroups -func (c *CognitoIdentityProvider) ListGroupsRequest(input *ListGroupsInput) (req *request.Request, output *ListGroupsOutput) { - op := &request.Operation{ - Name: opListGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListGroupsInput{} - } - - output = &ListGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGroups API operation for Amazon Cognito Identity Provider. -// -// Lists the groups associated with a user pool. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ListGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListGroups -func (c *CognitoIdentityProvider) 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 *CognitoIdentityProvider) 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 opListIdentityProviders = "ListIdentityProviders" - -// ListIdentityProvidersRequest generates a "aws/request.Request" representing the -// client's request for the ListIdentityProviders operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListIdentityProviders for more information on using the ListIdentityProviders -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListIdentityProvidersRequest method. -// req, resp := client.ListIdentityProvidersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListIdentityProviders -func (c *CognitoIdentityProvider) ListIdentityProvidersRequest(input *ListIdentityProvidersInput) (req *request.Request, output *ListIdentityProvidersOutput) { - op := &request.Operation{ - Name: opListIdentityProviders, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListIdentityProvidersInput{} - } - - output = &ListIdentityProvidersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListIdentityProviders API operation for Amazon Cognito Identity Provider. -// -// Lists information about all identity providers for a user pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ListIdentityProviders for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListIdentityProviders -func (c *CognitoIdentityProvider) ListIdentityProviders(input *ListIdentityProvidersInput) (*ListIdentityProvidersOutput, error) { - req, out := c.ListIdentityProvidersRequest(input) - return out, req.Send() -} - -// ListIdentityProvidersWithContext is the same as ListIdentityProviders with the addition of -// the ability to pass a context and additional request options. -// -// See ListIdentityProviders for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ListIdentityProvidersWithContext(ctx aws.Context, input *ListIdentityProvidersInput, opts ...request.Option) (*ListIdentityProvidersOutput, error) { - req, out := c.ListIdentityProvidersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListResourceServers = "ListResourceServers" - -// ListResourceServersRequest generates a "aws/request.Request" representing the -// client's request for the ListResourceServers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResourceServers for more information on using the ListResourceServers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResourceServersRequest method. -// req, resp := client.ListResourceServersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListResourceServers -func (c *CognitoIdentityProvider) ListResourceServersRequest(input *ListResourceServersInput) (req *request.Request, output *ListResourceServersOutput) { - op := &request.Operation{ - Name: opListResourceServers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListResourceServersInput{} - } - - output = &ListResourceServersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResourceServers API operation for Amazon Cognito Identity Provider. -// -// Lists the resource servers for a user pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ListResourceServers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListResourceServers -func (c *CognitoIdentityProvider) ListResourceServers(input *ListResourceServersInput) (*ListResourceServersOutput, error) { - req, out := c.ListResourceServersRequest(input) - return out, req.Send() -} - -// ListResourceServersWithContext is the same as ListResourceServers with the addition of -// the ability to pass a context and additional request options. -// -// See ListResourceServers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ListResourceServersWithContext(ctx aws.Context, input *ListResourceServersInput, opts ...request.Option) (*ListResourceServersOutput, error) { - req, out := c.ListResourceServersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListUserImportJobs = "ListUserImportJobs" - -// ListUserImportJobsRequest generates a "aws/request.Request" representing the -// client's request for the ListUserImportJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListUserImportJobs for more information on using the ListUserImportJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListUserImportJobsRequest method. -// req, resp := client.ListUserImportJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListUserImportJobs -func (c *CognitoIdentityProvider) ListUserImportJobsRequest(input *ListUserImportJobsInput) (req *request.Request, output *ListUserImportJobsOutput) { - op := &request.Operation{ - Name: opListUserImportJobs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListUserImportJobsInput{} - } - - output = &ListUserImportJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUserImportJobs API operation for Amazon Cognito Identity Provider. -// -// Lists the user import jobs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ListUserImportJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListUserImportJobs -func (c *CognitoIdentityProvider) ListUserImportJobs(input *ListUserImportJobsInput) (*ListUserImportJobsOutput, error) { - req, out := c.ListUserImportJobsRequest(input) - return out, req.Send() -} - -// ListUserImportJobsWithContext is the same as ListUserImportJobs with the addition of -// the ability to pass a context and additional request options. -// -// See ListUserImportJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ListUserImportJobsWithContext(ctx aws.Context, input *ListUserImportJobsInput, opts ...request.Option) (*ListUserImportJobsOutput, error) { - req, out := c.ListUserImportJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListUserPoolClients = "ListUserPoolClients" - -// ListUserPoolClientsRequest generates a "aws/request.Request" representing the -// client's request for the ListUserPoolClients operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListUserPoolClients for more information on using the ListUserPoolClients -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListUserPoolClientsRequest method. -// req, resp := client.ListUserPoolClientsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListUserPoolClients -func (c *CognitoIdentityProvider) ListUserPoolClientsRequest(input *ListUserPoolClientsInput) (req *request.Request, output *ListUserPoolClientsOutput) { - op := &request.Operation{ - Name: opListUserPoolClients, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListUserPoolClientsInput{} - } - - output = &ListUserPoolClientsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUserPoolClients API operation for Amazon Cognito Identity Provider. -// -// Lists the clients that have been created for the specified user pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ListUserPoolClients for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListUserPoolClients -func (c *CognitoIdentityProvider) ListUserPoolClients(input *ListUserPoolClientsInput) (*ListUserPoolClientsOutput, error) { - req, out := c.ListUserPoolClientsRequest(input) - return out, req.Send() -} - -// ListUserPoolClientsWithContext is the same as ListUserPoolClients with the addition of -// the ability to pass a context and additional request options. -// -// See ListUserPoolClients for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ListUserPoolClientsWithContext(ctx aws.Context, input *ListUserPoolClientsInput, opts ...request.Option) (*ListUserPoolClientsOutput, error) { - req, out := c.ListUserPoolClientsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListUserPools = "ListUserPools" - -// ListUserPoolsRequest generates a "aws/request.Request" representing the -// client's request for the ListUserPools operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListUserPools for more information on using the ListUserPools -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListUserPoolsRequest method. -// req, resp := client.ListUserPoolsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListUserPools -func (c *CognitoIdentityProvider) ListUserPoolsRequest(input *ListUserPoolsInput) (req *request.Request, output *ListUserPoolsOutput) { - op := &request.Operation{ - Name: opListUserPools, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListUserPoolsInput{} - } - - output = &ListUserPoolsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUserPools API operation for Amazon Cognito Identity Provider. -// -// Lists the user pools associated with an AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ListUserPools for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListUserPools -func (c *CognitoIdentityProvider) ListUserPools(input *ListUserPoolsInput) (*ListUserPoolsOutput, error) { - req, out := c.ListUserPoolsRequest(input) - return out, req.Send() -} - -// ListUserPoolsWithContext is the same as ListUserPools with the addition of -// the ability to pass a context and additional request options. -// -// See ListUserPools for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ListUserPoolsWithContext(ctx aws.Context, input *ListUserPoolsInput, opts ...request.Option) (*ListUserPoolsOutput, error) { - req, out := c.ListUserPoolsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListUsers = "ListUsers" - -// ListUsersRequest generates a "aws/request.Request" representing the -// client's request for the ListUsers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListUsers for more information on using the ListUsers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListUsersRequest method. -// req, resp := client.ListUsersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListUsers -func (c *CognitoIdentityProvider) ListUsersRequest(input *ListUsersInput) (req *request.Request, output *ListUsersOutput) { - op := &request.Operation{ - Name: opListUsers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListUsersInput{} - } - - output = &ListUsersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUsers API operation for Amazon Cognito Identity Provider. -// -// Lists the users in the Amazon Cognito user pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ListUsers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListUsers -func (c *CognitoIdentityProvider) ListUsers(input *ListUsersInput) (*ListUsersOutput, error) { - req, out := c.ListUsersRequest(input) - return out, req.Send() -} - -// ListUsersWithContext is the same as ListUsers with the addition of -// the ability to pass a context and additional request options. -// -// See ListUsers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ListUsersWithContext(ctx aws.Context, input *ListUsersInput, opts ...request.Option) (*ListUsersOutput, error) { - req, out := c.ListUsersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListUsersInGroup = "ListUsersInGroup" - -// ListUsersInGroupRequest generates a "aws/request.Request" representing the -// client's request for the ListUsersInGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListUsersInGroup for more information on using the ListUsersInGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListUsersInGroupRequest method. -// req, resp := client.ListUsersInGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListUsersInGroup -func (c *CognitoIdentityProvider) ListUsersInGroupRequest(input *ListUsersInGroupInput) (req *request.Request, output *ListUsersInGroupOutput) { - op := &request.Operation{ - Name: opListUsersInGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListUsersInGroupInput{} - } - - output = &ListUsersInGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUsersInGroup API operation for Amazon Cognito Identity Provider. -// -// Lists the users in the specified group. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ListUsersInGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ListUsersInGroup -func (c *CognitoIdentityProvider) ListUsersInGroup(input *ListUsersInGroupInput) (*ListUsersInGroupOutput, error) { - req, out := c.ListUsersInGroupRequest(input) - return out, req.Send() -} - -// ListUsersInGroupWithContext is the same as ListUsersInGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ListUsersInGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ListUsersInGroupWithContext(ctx aws.Context, input *ListUsersInGroupInput, opts ...request.Option) (*ListUsersInGroupOutput, error) { - req, out := c.ListUsersInGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResendConfirmationCode = "ResendConfirmationCode" - -// ResendConfirmationCodeRequest generates a "aws/request.Request" representing the -// client's request for the ResendConfirmationCode operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResendConfirmationCode for more information on using the ResendConfirmationCode -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResendConfirmationCodeRequest method. -// req, resp := client.ResendConfirmationCodeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ResendConfirmationCode -func (c *CognitoIdentityProvider) ResendConfirmationCodeRequest(input *ResendConfirmationCodeInput) (req *request.Request, output *ResendConfirmationCodeOutput) { - op := &request.Operation{ - Name: opResendConfirmationCode, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResendConfirmationCodeInput{} - } - - output = &ResendConfirmationCodeOutput{} - req = c.newRequest(op, input, output) - req.Config.Credentials = credentials.AnonymousCredentials - return -} - -// ResendConfirmationCode API operation for Amazon Cognito Identity Provider. -// -// Resends the confirmation (for confirmation of registration) to a specific -// user in the user pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation ResendConfirmationCode for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException" -// This exception is returned when the role provided for SMS configuration does -// not have permission to publish using Amazon SNS. -// -// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException" -// This exception is thrown when the trust relationship is invalid for the role -// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com -// or the external ID provided in the role does not match what is provided in -// the SMS configuration for the user pool. -// -// * ErrCodeInvalidEmailRoleAccessPolicyException "InvalidEmailRoleAccessPolicyException" -// This exception is thrown when Amazon Cognito is not allowed to use your email -// identity. HTTP status code: 400. -// -// * ErrCodeCodeDeliveryFailureException "CodeDeliveryFailureException" -// This exception is thrown when a verification code fails to deliver successfully. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ResendConfirmationCode -func (c *CognitoIdentityProvider) ResendConfirmationCode(input *ResendConfirmationCodeInput) (*ResendConfirmationCodeOutput, error) { - req, out := c.ResendConfirmationCodeRequest(input) - return out, req.Send() -} - -// ResendConfirmationCodeWithContext is the same as ResendConfirmationCode with the addition of -// the ability to pass a context and additional request options. -// -// See ResendConfirmationCode for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) ResendConfirmationCodeWithContext(ctx aws.Context, input *ResendConfirmationCodeInput, opts ...request.Option) (*ResendConfirmationCodeOutput, error) { - req, out := c.ResendConfirmationCodeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRespondToAuthChallenge = "RespondToAuthChallenge" - -// RespondToAuthChallengeRequest generates a "aws/request.Request" representing the -// client's request for the RespondToAuthChallenge operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RespondToAuthChallenge for more information on using the RespondToAuthChallenge -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RespondToAuthChallengeRequest method. -// req, resp := client.RespondToAuthChallengeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/RespondToAuthChallenge -func (c *CognitoIdentityProvider) RespondToAuthChallengeRequest(input *RespondToAuthChallengeInput) (req *request.Request, output *RespondToAuthChallengeOutput) { - op := &request.Operation{ - Name: opRespondToAuthChallenge, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RespondToAuthChallengeInput{} - } - - output = &RespondToAuthChallengeOutput{} - req = c.newRequest(op, input, output) - return -} - -// RespondToAuthChallenge API operation for Amazon Cognito Identity Provider. -// -// Responds to the authentication challenge. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation RespondToAuthChallenge for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeCodeMismatchException "CodeMismatchException" -// This exception is thrown if the provided code does not match what the server -// was expecting. -// -// * ErrCodeExpiredCodeException "ExpiredCodeException" -// This exception is thrown if a code has expired. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeInvalidPasswordException "InvalidPasswordException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// password. -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException" -// This exception is thrown when the user pool configuration is invalid. -// -// * ErrCodeMFAMethodNotFoundException "MFAMethodNotFoundException" -// This exception is thrown when Amazon Cognito cannot find a multi-factor authentication -// (MFA) method. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException" -// This exception is returned when the role provided for SMS configuration does -// not have permission to publish using Amazon SNS. -// -// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException" -// This exception is thrown when the trust relationship is invalid for the role -// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com -// or the external ID provided in the role does not match what is provided in -// the SMS configuration for the user pool. -// -// * ErrCodeAliasExistsException "AliasExistsException" -// This exception is thrown when a user tries to confirm the account with an -// email or phone number that has already been supplied as an alias from a different -// account. This exception tells user that an account with this email or phone -// already exists. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// * ErrCodeSoftwareTokenMFANotFoundException "SoftwareTokenMFANotFoundException" -// This exception is thrown when the software token TOTP multi-factor authentication -// (MFA) is not enabled for the user pool. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/RespondToAuthChallenge -func (c *CognitoIdentityProvider) RespondToAuthChallenge(input *RespondToAuthChallengeInput) (*RespondToAuthChallengeOutput, error) { - req, out := c.RespondToAuthChallengeRequest(input) - return out, req.Send() -} - -// RespondToAuthChallengeWithContext is the same as RespondToAuthChallenge with the addition of -// the ability to pass a context and additional request options. -// -// See RespondToAuthChallenge for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) RespondToAuthChallengeWithContext(ctx aws.Context, input *RespondToAuthChallengeInput, opts ...request.Option) (*RespondToAuthChallengeOutput, error) { - req, out := c.RespondToAuthChallengeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetRiskConfiguration = "SetRiskConfiguration" - -// SetRiskConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the SetRiskConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetRiskConfiguration for more information on using the SetRiskConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetRiskConfigurationRequest method. -// req, resp := client.SetRiskConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/SetRiskConfiguration -func (c *CognitoIdentityProvider) SetRiskConfigurationRequest(input *SetRiskConfigurationInput) (req *request.Request, output *SetRiskConfigurationOutput) { - op := &request.Operation{ - Name: opSetRiskConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetRiskConfigurationInput{} - } - - output = &SetRiskConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetRiskConfiguration API operation for Amazon Cognito Identity Provider. -// -// Configures actions on detected risks. To delete the risk configuration for -// UserPoolId or ClientId, pass null values for all four configuration types. -// -// To enable Amazon Cognito advanced security features, update the user pool -// to include the UserPoolAddOns keyAdvancedSecurityMode. -// -// See . -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation SetRiskConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserPoolAddOnNotEnabledException "UserPoolAddOnNotEnabledException" -// This exception is thrown when user pool add-ons are not enabled. -// -// * ErrCodeCodeDeliveryFailureException "CodeDeliveryFailureException" -// This exception is thrown when a verification code fails to deliver successfully. -// -// * ErrCodeInvalidEmailRoleAccessPolicyException "InvalidEmailRoleAccessPolicyException" -// This exception is thrown when Amazon Cognito is not allowed to use your email -// identity. HTTP status code: 400. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/SetRiskConfiguration -func (c *CognitoIdentityProvider) SetRiskConfiguration(input *SetRiskConfigurationInput) (*SetRiskConfigurationOutput, error) { - req, out := c.SetRiskConfigurationRequest(input) - return out, req.Send() -} - -// SetRiskConfigurationWithContext is the same as SetRiskConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See SetRiskConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) SetRiskConfigurationWithContext(ctx aws.Context, input *SetRiskConfigurationInput, opts ...request.Option) (*SetRiskConfigurationOutput, error) { - req, out := c.SetRiskConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetUICustomization = "SetUICustomization" - -// SetUICustomizationRequest generates a "aws/request.Request" representing the -// client's request for the SetUICustomization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetUICustomization for more information on using the SetUICustomization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetUICustomizationRequest method. -// req, resp := client.SetUICustomizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/SetUICustomization -func (c *CognitoIdentityProvider) SetUICustomizationRequest(input *SetUICustomizationInput) (req *request.Request, output *SetUICustomizationOutput) { - op := &request.Operation{ - Name: opSetUICustomization, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetUICustomizationInput{} - } - - output = &SetUICustomizationOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetUICustomization API operation for Amazon Cognito Identity Provider. -// -// Sets the UI customization information for a user pool's built-in app UI. -// -// You can specify app UI customization settings for a single client (with a -// specific clientId) or for all clients (by setting the clientId to ALL). If -// you specify ALL, the default configuration will be used for every client -// that has no UI customization set previously. If you specify UI customization -// settings for a particular client, it will no longer fall back to the ALL -// configuration. -// -// To use this API, your user pool must have a domain associated with it. Otherwise, -// there is no place to host the app's pages, and the service will throw an -// error. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation SetUICustomization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/SetUICustomization -func (c *CognitoIdentityProvider) SetUICustomization(input *SetUICustomizationInput) (*SetUICustomizationOutput, error) { - req, out := c.SetUICustomizationRequest(input) - return out, req.Send() -} - -// SetUICustomizationWithContext is the same as SetUICustomization with the addition of -// the ability to pass a context and additional request options. -// -// See SetUICustomization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) SetUICustomizationWithContext(ctx aws.Context, input *SetUICustomizationInput, opts ...request.Option) (*SetUICustomizationOutput, error) { - req, out := c.SetUICustomizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetUserMFAPreference = "SetUserMFAPreference" - -// SetUserMFAPreferenceRequest generates a "aws/request.Request" representing the -// client's request for the SetUserMFAPreference operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetUserMFAPreference for more information on using the SetUserMFAPreference -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetUserMFAPreferenceRequest method. -// req, resp := client.SetUserMFAPreferenceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/SetUserMFAPreference -func (c *CognitoIdentityProvider) SetUserMFAPreferenceRequest(input *SetUserMFAPreferenceInput) (req *request.Request, output *SetUserMFAPreferenceOutput) { - op := &request.Operation{ - Name: opSetUserMFAPreference, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetUserMFAPreferenceInput{} - } - - output = &SetUserMFAPreferenceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetUserMFAPreference API operation for Amazon Cognito Identity Provider. -// -// Set the user's multi-factor authentication (MFA) method preference. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation SetUserMFAPreference for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/SetUserMFAPreference -func (c *CognitoIdentityProvider) SetUserMFAPreference(input *SetUserMFAPreferenceInput) (*SetUserMFAPreferenceOutput, error) { - req, out := c.SetUserMFAPreferenceRequest(input) - return out, req.Send() -} - -// SetUserMFAPreferenceWithContext is the same as SetUserMFAPreference with the addition of -// the ability to pass a context and additional request options. -// -// See SetUserMFAPreference for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) SetUserMFAPreferenceWithContext(ctx aws.Context, input *SetUserMFAPreferenceInput, opts ...request.Option) (*SetUserMFAPreferenceOutput, error) { - req, out := c.SetUserMFAPreferenceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetUserPoolMfaConfig = "SetUserPoolMfaConfig" - -// SetUserPoolMfaConfigRequest generates a "aws/request.Request" representing the -// client's request for the SetUserPoolMfaConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetUserPoolMfaConfig for more information on using the SetUserPoolMfaConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetUserPoolMfaConfigRequest method. -// req, resp := client.SetUserPoolMfaConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/SetUserPoolMfaConfig -func (c *CognitoIdentityProvider) SetUserPoolMfaConfigRequest(input *SetUserPoolMfaConfigInput) (req *request.Request, output *SetUserPoolMfaConfigOutput) { - op := &request.Operation{ - Name: opSetUserPoolMfaConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetUserPoolMfaConfigInput{} - } - - output = &SetUserPoolMfaConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetUserPoolMfaConfig API operation for Amazon Cognito Identity Provider. -// -// Set the user pool MFA configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation SetUserPoolMfaConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException" -// This exception is returned when the role provided for SMS configuration does -// not have permission to publish using Amazon SNS. -// -// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException" -// This exception is thrown when the trust relationship is invalid for the role -// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com -// or the external ID provided in the role does not match what is provided in -// the SMS configuration for the user pool. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/SetUserPoolMfaConfig -func (c *CognitoIdentityProvider) SetUserPoolMfaConfig(input *SetUserPoolMfaConfigInput) (*SetUserPoolMfaConfigOutput, error) { - req, out := c.SetUserPoolMfaConfigRequest(input) - return out, req.Send() -} - -// SetUserPoolMfaConfigWithContext is the same as SetUserPoolMfaConfig with the addition of -// the ability to pass a context and additional request options. -// -// See SetUserPoolMfaConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) SetUserPoolMfaConfigWithContext(ctx aws.Context, input *SetUserPoolMfaConfigInput, opts ...request.Option) (*SetUserPoolMfaConfigOutput, error) { - req, out := c.SetUserPoolMfaConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetUserSettings = "SetUserSettings" - -// SetUserSettingsRequest generates a "aws/request.Request" representing the -// client's request for the SetUserSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetUserSettings for more information on using the SetUserSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetUserSettingsRequest method. -// req, resp := client.SetUserSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/SetUserSettings -func (c *CognitoIdentityProvider) SetUserSettingsRequest(input *SetUserSettingsInput) (req *request.Request, output *SetUserSettingsOutput) { - op := &request.Operation{ - Name: opSetUserSettings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetUserSettingsInput{} - } - - output = &SetUserSettingsOutput{} - req = c.newRequest(op, input, output) - req.Config.Credentials = credentials.AnonymousCredentials - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetUserSettings API operation for Amazon Cognito Identity Provider. -// -// Sets the user settings like multi-factor authentication (MFA). If MFA is -// to be removed for a particular attribute pass the attribute with code delivery -// as null. If null list is passed, all MFA options are removed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation SetUserSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/SetUserSettings -func (c *CognitoIdentityProvider) SetUserSettings(input *SetUserSettingsInput) (*SetUserSettingsOutput, error) { - req, out := c.SetUserSettingsRequest(input) - return out, req.Send() -} - -// SetUserSettingsWithContext is the same as SetUserSettings with the addition of -// the ability to pass a context and additional request options. -// -// See SetUserSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) SetUserSettingsWithContext(ctx aws.Context, input *SetUserSettingsInput, opts ...request.Option) (*SetUserSettingsOutput, error) { - req, out := c.SetUserSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSignUp = "SignUp" - -// SignUpRequest generates a "aws/request.Request" representing the -// client's request for the SignUp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SignUp for more information on using the SignUp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SignUpRequest method. -// req, resp := client.SignUpRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/SignUp -func (c *CognitoIdentityProvider) SignUpRequest(input *SignUpInput) (req *request.Request, output *SignUpOutput) { - op := &request.Operation{ - Name: opSignUp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SignUpInput{} - } - - output = &SignUpOutput{} - req = c.newRequest(op, input, output) - req.Config.Credentials = credentials.AnonymousCredentials - return -} - -// SignUp API operation for Amazon Cognito Identity Provider. -// -// Registers the user in the specified user pool and creates a user name, password, -// and user attributes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation SignUp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInvalidPasswordException "InvalidPasswordException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// password. -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodeUsernameExistsException "UsernameExistsException" -// This exception is thrown when Amazon Cognito encounters a user name that -// already exists in the user pool. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException" -// This exception is returned when the role provided for SMS configuration does -// not have permission to publish using Amazon SNS. -// -// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException" -// This exception is thrown when the trust relationship is invalid for the role -// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com -// or the external ID provided in the role does not match what is provided in -// the SMS configuration for the user pool. -// -// * ErrCodeInvalidEmailRoleAccessPolicyException "InvalidEmailRoleAccessPolicyException" -// This exception is thrown when Amazon Cognito is not allowed to use your email -// identity. HTTP status code: 400. -// -// * ErrCodeCodeDeliveryFailureException "CodeDeliveryFailureException" -// This exception is thrown when a verification code fails to deliver successfully. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/SignUp -func (c *CognitoIdentityProvider) SignUp(input *SignUpInput) (*SignUpOutput, error) { - req, out := c.SignUpRequest(input) - return out, req.Send() -} - -// SignUpWithContext is the same as SignUp with the addition of -// the ability to pass a context and additional request options. -// -// See SignUp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) SignUpWithContext(ctx aws.Context, input *SignUpInput, opts ...request.Option) (*SignUpOutput, error) { - req, out := c.SignUpRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartUserImportJob = "StartUserImportJob" - -// StartUserImportJobRequest generates a "aws/request.Request" representing the -// client's request for the StartUserImportJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartUserImportJob for more information on using the StartUserImportJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartUserImportJobRequest method. -// req, resp := client.StartUserImportJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/StartUserImportJob -func (c *CognitoIdentityProvider) StartUserImportJobRequest(input *StartUserImportJobInput) (req *request.Request, output *StartUserImportJobOutput) { - op := &request.Operation{ - Name: opStartUserImportJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartUserImportJobInput{} - } - - output = &StartUserImportJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartUserImportJob API operation for Amazon Cognito Identity Provider. -// -// Starts the user import. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation StartUserImportJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// * ErrCodePreconditionNotMetException "PreconditionNotMetException" -// This exception is thrown when a precondition is not met. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/StartUserImportJob -func (c *CognitoIdentityProvider) StartUserImportJob(input *StartUserImportJobInput) (*StartUserImportJobOutput, error) { - req, out := c.StartUserImportJobRequest(input) - return out, req.Send() -} - -// StartUserImportJobWithContext is the same as StartUserImportJob with the addition of -// the ability to pass a context and additional request options. -// -// See StartUserImportJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) StartUserImportJobWithContext(ctx aws.Context, input *StartUserImportJobInput, opts ...request.Option) (*StartUserImportJobOutput, error) { - req, out := c.StartUserImportJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopUserImportJob = "StopUserImportJob" - -// StopUserImportJobRequest generates a "aws/request.Request" representing the -// client's request for the StopUserImportJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopUserImportJob for more information on using the StopUserImportJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopUserImportJobRequest method. -// req, resp := client.StopUserImportJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/StopUserImportJob -func (c *CognitoIdentityProvider) StopUserImportJobRequest(input *StopUserImportJobInput) (req *request.Request, output *StopUserImportJobOutput) { - op := &request.Operation{ - Name: opStopUserImportJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopUserImportJobInput{} - } - - output = &StopUserImportJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopUserImportJob API operation for Amazon Cognito Identity Provider. -// -// Stops the user import job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation StopUserImportJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// * ErrCodePreconditionNotMetException "PreconditionNotMetException" -// This exception is thrown when a precondition is not met. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/StopUserImportJob -func (c *CognitoIdentityProvider) StopUserImportJob(input *StopUserImportJobInput) (*StopUserImportJobOutput, error) { - req, out := c.StopUserImportJobRequest(input) - return out, req.Send() -} - -// StopUserImportJobWithContext is the same as StopUserImportJob with the addition of -// the ability to pass a context and additional request options. -// -// See StopUserImportJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) StopUserImportJobWithContext(ctx aws.Context, input *StopUserImportJobInput, opts ...request.Option) (*StopUserImportJobOutput, error) { - req, out := c.StopUserImportJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAuthEventFeedback = "UpdateAuthEventFeedback" - -// UpdateAuthEventFeedbackRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAuthEventFeedback operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAuthEventFeedback for more information on using the UpdateAuthEventFeedback -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAuthEventFeedbackRequest method. -// req, resp := client.UpdateAuthEventFeedbackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateAuthEventFeedback -func (c *CognitoIdentityProvider) UpdateAuthEventFeedbackRequest(input *UpdateAuthEventFeedbackInput) (req *request.Request, output *UpdateAuthEventFeedbackOutput) { - op := &request.Operation{ - Name: opUpdateAuthEventFeedback, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAuthEventFeedbackInput{} - } - - output = &UpdateAuthEventFeedbackOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateAuthEventFeedback API operation for Amazon Cognito Identity Provider. -// -// Provides the feedback for an authentication event whether it was from a valid -// user or not. This feedback is used for improving the risk evaluation decision -// for the user pool as part of Amazon Cognito advanced security. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation UpdateAuthEventFeedback for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserPoolAddOnNotEnabledException "UserPoolAddOnNotEnabledException" -// This exception is thrown when user pool add-ons are not enabled. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateAuthEventFeedback -func (c *CognitoIdentityProvider) UpdateAuthEventFeedback(input *UpdateAuthEventFeedbackInput) (*UpdateAuthEventFeedbackOutput, error) { - req, out := c.UpdateAuthEventFeedbackRequest(input) - return out, req.Send() -} - -// UpdateAuthEventFeedbackWithContext is the same as UpdateAuthEventFeedback with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAuthEventFeedback for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) UpdateAuthEventFeedbackWithContext(ctx aws.Context, input *UpdateAuthEventFeedbackInput, opts ...request.Option) (*UpdateAuthEventFeedbackOutput, error) { - req, out := c.UpdateAuthEventFeedbackRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDeviceStatus = "UpdateDeviceStatus" - -// UpdateDeviceStatusRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDeviceStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDeviceStatus for more information on using the UpdateDeviceStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDeviceStatusRequest method. -// req, resp := client.UpdateDeviceStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateDeviceStatus -func (c *CognitoIdentityProvider) UpdateDeviceStatusRequest(input *UpdateDeviceStatusInput) (req *request.Request, output *UpdateDeviceStatusOutput) { - op := &request.Operation{ - Name: opUpdateDeviceStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateDeviceStatusInput{} - } - - output = &UpdateDeviceStatusOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateDeviceStatus API operation for Amazon Cognito Identity Provider. -// -// Updates the device 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 Amazon Cognito Identity Provider's -// API operation UpdateDeviceStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException" -// This exception is thrown when the user pool configuration is invalid. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateDeviceStatus -func (c *CognitoIdentityProvider) UpdateDeviceStatus(input *UpdateDeviceStatusInput) (*UpdateDeviceStatusOutput, error) { - req, out := c.UpdateDeviceStatusRequest(input) - return out, req.Send() -} - -// UpdateDeviceStatusWithContext is the same as UpdateDeviceStatus with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDeviceStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) UpdateDeviceStatusWithContext(ctx aws.Context, input *UpdateDeviceStatusInput, opts ...request.Option) (*UpdateDeviceStatusOutput, error) { - req, out := c.UpdateDeviceStatusRequest(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/cognito-idp-2016-04-18/UpdateGroup -func (c *CognitoIdentityProvider) UpdateGroupRequest(input *UpdateGroupInput) (req *request.Request, output *UpdateGroupOutput) { - op := &request.Operation{ - Name: opUpdateGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateGroupInput{} - } - - output = &UpdateGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateGroup API operation for Amazon Cognito Identity Provider. -// -// Updates the specified group with the specified attributes. -// -// Requires developer credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation UpdateGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateGroup -func (c *CognitoIdentityProvider) 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 *CognitoIdentityProvider) 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 opUpdateIdentityProvider = "UpdateIdentityProvider" - -// UpdateIdentityProviderRequest generates a "aws/request.Request" representing the -// client's request for the UpdateIdentityProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateIdentityProvider for more information on using the UpdateIdentityProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateIdentityProviderRequest method. -// req, resp := client.UpdateIdentityProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateIdentityProvider -func (c *CognitoIdentityProvider) UpdateIdentityProviderRequest(input *UpdateIdentityProviderInput) (req *request.Request, output *UpdateIdentityProviderOutput) { - op := &request.Operation{ - Name: opUpdateIdentityProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateIdentityProviderInput{} - } - - output = &UpdateIdentityProviderOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateIdentityProvider API operation for Amazon Cognito Identity Provider. -// -// Updates identity provider information for a user pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation UpdateIdentityProvider for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeUnsupportedIdentityProviderException "UnsupportedIdentityProviderException" -// This exception is thrown when the specified identifier is not supported. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateIdentityProvider -func (c *CognitoIdentityProvider) UpdateIdentityProvider(input *UpdateIdentityProviderInput) (*UpdateIdentityProviderOutput, error) { - req, out := c.UpdateIdentityProviderRequest(input) - return out, req.Send() -} - -// UpdateIdentityProviderWithContext is the same as UpdateIdentityProvider with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateIdentityProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) UpdateIdentityProviderWithContext(ctx aws.Context, input *UpdateIdentityProviderInput, opts ...request.Option) (*UpdateIdentityProviderOutput, error) { - req, out := c.UpdateIdentityProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateResourceServer = "UpdateResourceServer" - -// UpdateResourceServerRequest generates a "aws/request.Request" representing the -// client's request for the UpdateResourceServer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateResourceServer for more information on using the UpdateResourceServer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateResourceServerRequest method. -// req, resp := client.UpdateResourceServerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateResourceServer -func (c *CognitoIdentityProvider) UpdateResourceServerRequest(input *UpdateResourceServerInput) (req *request.Request, output *UpdateResourceServerOutput) { - op := &request.Operation{ - Name: opUpdateResourceServer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateResourceServerInput{} - } - - output = &UpdateResourceServerOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateResourceServer API operation for Amazon Cognito Identity Provider. -// -// Updates the name and scopes of resource server. All other fields are read-only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation UpdateResourceServer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateResourceServer -func (c *CognitoIdentityProvider) UpdateResourceServer(input *UpdateResourceServerInput) (*UpdateResourceServerOutput, error) { - req, out := c.UpdateResourceServerRequest(input) - return out, req.Send() -} - -// UpdateResourceServerWithContext is the same as UpdateResourceServer with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateResourceServer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) UpdateResourceServerWithContext(ctx aws.Context, input *UpdateResourceServerInput, opts ...request.Option) (*UpdateResourceServerOutput, error) { - req, out := c.UpdateResourceServerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateUserAttributes = "UpdateUserAttributes" - -// UpdateUserAttributesRequest generates a "aws/request.Request" representing the -// client's request for the UpdateUserAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateUserAttributes for more information on using the UpdateUserAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateUserAttributesRequest method. -// req, resp := client.UpdateUserAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateUserAttributes -func (c *CognitoIdentityProvider) UpdateUserAttributesRequest(input *UpdateUserAttributesInput) (req *request.Request, output *UpdateUserAttributesOutput) { - op := &request.Operation{ - Name: opUpdateUserAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateUserAttributesInput{} - } - - output = &UpdateUserAttributesOutput{} - req = c.newRequest(op, input, output) - req.Config.Credentials = credentials.AnonymousCredentials - return -} - -// UpdateUserAttributes API operation for Amazon Cognito Identity Provider. -// -// Allows a user to update a specific attribute (one at a time). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation UpdateUserAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeCodeMismatchException "CodeMismatchException" -// This exception is thrown if the provided code does not match what the server -// was expecting. -// -// * ErrCodeExpiredCodeException "ExpiredCodeException" -// This exception is thrown if a code has expired. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException" -// This exception is thrown when the Amazon Cognito service encounters an unexpected -// exception with the AWS Lambda service. -// -// * ErrCodeUserLambdaValidationException "UserLambdaValidationException" -// This exception is thrown when the Amazon Cognito service encounters a user -// validation exception with the AWS Lambda service. -// -// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// AWS Lambda response. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeAliasExistsException "AliasExistsException" -// This exception is thrown when a user tries to confirm the account with an -// email or phone number that has already been supplied as an alias from a different -// account. This exception tells user that an account with this email or phone -// already exists. -// -// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException" -// This exception is returned when the role provided for SMS configuration does -// not have permission to publish using Amazon SNS. -// -// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException" -// This exception is thrown when the trust relationship is invalid for the role -// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com -// or the external ID provided in the role does not match what is provided in -// the SMS configuration for the user pool. -// -// * ErrCodeInvalidEmailRoleAccessPolicyException "InvalidEmailRoleAccessPolicyException" -// This exception is thrown when Amazon Cognito is not allowed to use your email -// identity. HTTP status code: 400. -// -// * ErrCodeCodeDeliveryFailureException "CodeDeliveryFailureException" -// This exception is thrown when a verification code fails to deliver successfully. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateUserAttributes -func (c *CognitoIdentityProvider) UpdateUserAttributes(input *UpdateUserAttributesInput) (*UpdateUserAttributesOutput, error) { - req, out := c.UpdateUserAttributesRequest(input) - return out, req.Send() -} - -// UpdateUserAttributesWithContext is the same as UpdateUserAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateUserAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) UpdateUserAttributesWithContext(ctx aws.Context, input *UpdateUserAttributesInput, opts ...request.Option) (*UpdateUserAttributesOutput, error) { - req, out := c.UpdateUserAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateUserPool = "UpdateUserPool" - -// UpdateUserPoolRequest generates a "aws/request.Request" representing the -// client's request for the UpdateUserPool operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateUserPool for more information on using the UpdateUserPool -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateUserPoolRequest method. -// req, resp := client.UpdateUserPoolRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateUserPool -func (c *CognitoIdentityProvider) UpdateUserPoolRequest(input *UpdateUserPoolInput) (req *request.Request, output *UpdateUserPoolOutput) { - op := &request.Operation{ - Name: opUpdateUserPool, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateUserPoolInput{} - } - - output = &UpdateUserPoolOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// 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 . -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation UpdateUserPool for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// This exception is thrown if two or more modifications are happening concurrently. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeUserImportInProgressException "UserImportInProgressException" -// This exception is thrown when you are trying to modify a user pool while -// a user import job is in progress for that pool. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException" -// This exception is returned when the role provided for SMS configuration does -// not have permission to publish using Amazon SNS. -// -// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException" -// This exception is thrown when the trust relationship is invalid for the role -// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com -// or the external ID provided in the role does not match what is provided in -// the SMS configuration for the user pool. -// -// * ErrCodeUserPoolTaggingException "UserPoolTaggingException" -// This exception is thrown when a user pool tag cannot be set or updated. -// -// * ErrCodeInvalidEmailRoleAccessPolicyException "InvalidEmailRoleAccessPolicyException" -// This exception is thrown when Amazon Cognito is not allowed to use your email -// identity. HTTP status code: 400. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateUserPool -func (c *CognitoIdentityProvider) UpdateUserPool(input *UpdateUserPoolInput) (*UpdateUserPoolOutput, error) { - req, out := c.UpdateUserPoolRequest(input) - return out, req.Send() -} - -// UpdateUserPoolWithContext is the same as UpdateUserPool with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateUserPool for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) UpdateUserPoolWithContext(ctx aws.Context, input *UpdateUserPoolInput, opts ...request.Option) (*UpdateUserPoolOutput, error) { - req, out := c.UpdateUserPoolRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateUserPoolClient = "UpdateUserPoolClient" - -// UpdateUserPoolClientRequest generates a "aws/request.Request" representing the -// client's request for the UpdateUserPoolClient operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateUserPoolClient for more information on using the UpdateUserPoolClient -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateUserPoolClientRequest method. -// req, resp := client.UpdateUserPoolClientRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateUserPoolClient -func (c *CognitoIdentityProvider) UpdateUserPoolClientRequest(input *UpdateUserPoolClientInput) (req *request.Request, output *UpdateUserPoolClientOutput) { - op := &request.Operation{ - Name: opUpdateUserPoolClient, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateUserPoolClientInput{} - } - - output = &UpdateUserPoolClientOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateUserPoolClient API operation for Amazon Cognito Identity Provider. -// -// Updates the specified user pool app client 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 app client settings with -// . -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation UpdateUserPoolClient for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// This exception is thrown if two or more modifications are happening concurrently. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeScopeDoesNotExistException "ScopeDoesNotExistException" -// This exception is thrown when the specified scope does not exist. -// -// * ErrCodeInvalidOAuthFlowException "InvalidOAuthFlowException" -// This exception is thrown when the specified OAuth flow is invalid. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateUserPoolClient -func (c *CognitoIdentityProvider) UpdateUserPoolClient(input *UpdateUserPoolClientInput) (*UpdateUserPoolClientOutput, error) { - req, out := c.UpdateUserPoolClientRequest(input) - return out, req.Send() -} - -// UpdateUserPoolClientWithContext is the same as UpdateUserPoolClient with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateUserPoolClient for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) UpdateUserPoolClientWithContext(ctx aws.Context, input *UpdateUserPoolClientInput, opts ...request.Option) (*UpdateUserPoolClientOutput, error) { - req, out := c.UpdateUserPoolClientRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateUserPoolDomain = "UpdateUserPoolDomain" - -// UpdateUserPoolDomainRequest generates a "aws/request.Request" representing the -// client's request for the UpdateUserPoolDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateUserPoolDomain for more information on using the UpdateUserPoolDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateUserPoolDomainRequest method. -// req, resp := client.UpdateUserPoolDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateUserPoolDomain -func (c *CognitoIdentityProvider) UpdateUserPoolDomainRequest(input *UpdateUserPoolDomainInput) (req *request.Request, output *UpdateUserPoolDomainOutput) { - op := &request.Operation{ - Name: opUpdateUserPoolDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateUserPoolDomainInput{} - } - - output = &UpdateUserPoolDomainOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateUserPoolDomain API operation for Amazon Cognito Identity Provider. -// -// Updates the Secure Sockets Layer (SSL) certificate for the custom domain -// for your user pool. -// -// You can use this operation to provide the Amazon Resource Name (ARN) of a -// new certificate to Amazon Cognito. You cannot use it to change the domain -// for a user pool. -// -// A custom domain is used to host the Amazon Cognito hosted UI, which provides -// sign-up and sign-in pages for your application. When you set up a custom -// domain, you provide a certificate that you manage with AWS Certificate Manager -// (ACM). When necessary, you can use this operation to change the certificate -// that you applied to your custom domain. -// -// Usually, this is unnecessary following routine certificate renewal with ACM. -// When you renew your existing certificate in ACM, the ARN for your certificate -// remains the same, and your custom domain uses the new certificate automatically. -// -// However, if you replace your existing certificate with a new one, ACM gives -// the new certificate a new ARN. To apply the new certificate to your custom -// domain, you must provide this ARN to Amazon Cognito. -// -// When you add your new certificate in ACM, you must choose US East (N. Virginia) -// as the AWS Region. -// -// After you submit your request, Amazon Cognito requires up to 1 hour to distribute -// your new certificate to your custom domain. -// -// For more information about adding a custom domain to your user pool, see -// Using Your Own Domain for the Hosted UI (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation UpdateUserPoolDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateUserPoolDomain -func (c *CognitoIdentityProvider) UpdateUserPoolDomain(input *UpdateUserPoolDomainInput) (*UpdateUserPoolDomainOutput, error) { - req, out := c.UpdateUserPoolDomainRequest(input) - return out, req.Send() -} - -// UpdateUserPoolDomainWithContext is the same as UpdateUserPoolDomain with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateUserPoolDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) UpdateUserPoolDomainWithContext(ctx aws.Context, input *UpdateUserPoolDomainInput, opts ...request.Option) (*UpdateUserPoolDomainOutput, error) { - req, out := c.UpdateUserPoolDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opVerifySoftwareToken = "VerifySoftwareToken" - -// VerifySoftwareTokenRequest generates a "aws/request.Request" representing the -// client's request for the VerifySoftwareToken operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See VerifySoftwareToken for more information on using the VerifySoftwareToken -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the VerifySoftwareTokenRequest method. -// req, resp := client.VerifySoftwareTokenRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/VerifySoftwareToken -func (c *CognitoIdentityProvider) VerifySoftwareTokenRequest(input *VerifySoftwareTokenInput) (req *request.Request, output *VerifySoftwareTokenOutput) { - op := &request.Operation{ - Name: opVerifySoftwareToken, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &VerifySoftwareTokenInput{} - } - - output = &VerifySoftwareTokenOutput{} - req = c.newRequest(op, input, output) - return -} - -// VerifySoftwareToken API operation for Amazon Cognito Identity Provider. -// -// Use this API to register a user's entered TOTP code and mark the user's software -// token MFA status as "verified" if successful. The request takes an access -// token or a session string, but not both. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation VerifySoftwareToken for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException" -// This exception is thrown when the user pool configuration is invalid. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// * ErrCodeEnableSoftwareTokenMFAException "EnableSoftwareTokenMFAException" -// This exception is thrown when there is a code mismatch and the service fails -// to configure the software token TOTP multi-factor authentication (MFA). -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeSoftwareTokenMFANotFoundException "SoftwareTokenMFANotFoundException" -// This exception is thrown when the software token TOTP multi-factor authentication -// (MFA) is not enabled for the user pool. -// -// * ErrCodeCodeMismatchException "CodeMismatchException" -// This exception is thrown if the provided code does not match what the server -// was expecting. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/VerifySoftwareToken -func (c *CognitoIdentityProvider) VerifySoftwareToken(input *VerifySoftwareTokenInput) (*VerifySoftwareTokenOutput, error) { - req, out := c.VerifySoftwareTokenRequest(input) - return out, req.Send() -} - -// VerifySoftwareTokenWithContext is the same as VerifySoftwareToken with the addition of -// the ability to pass a context and additional request options. -// -// See VerifySoftwareToken for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) VerifySoftwareTokenWithContext(ctx aws.Context, input *VerifySoftwareTokenInput, opts ...request.Option) (*VerifySoftwareTokenOutput, error) { - req, out := c.VerifySoftwareTokenRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opVerifyUserAttribute = "VerifyUserAttribute" - -// VerifyUserAttributeRequest generates a "aws/request.Request" representing the -// client's request for the VerifyUserAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See VerifyUserAttribute for more information on using the VerifyUserAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the VerifyUserAttributeRequest method. -// req, resp := client.VerifyUserAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/VerifyUserAttribute -func (c *CognitoIdentityProvider) VerifyUserAttributeRequest(input *VerifyUserAttributeInput) (req *request.Request, output *VerifyUserAttributeOutput) { - op := &request.Operation{ - Name: opVerifyUserAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &VerifyUserAttributeInput{} - } - - output = &VerifyUserAttributeOutput{} - req = c.newRequest(op, input, output) - req.Config.Credentials = credentials.AnonymousCredentials - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// VerifyUserAttribute API operation for Amazon Cognito Identity Provider. -// -// Verifies the specified user attributes in the user pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Cognito Identity Provider's -// API operation VerifyUserAttribute for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when the Amazon Cognito service cannot find the -// requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// This exception is thrown when the Amazon Cognito service encounters an invalid -// parameter. -// -// * ErrCodeCodeMismatchException "CodeMismatchException" -// This exception is thrown if the provided code does not match what the server -// was expecting. -// -// * ErrCodeExpiredCodeException "ExpiredCodeException" -// This exception is thrown if a code has expired. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// This exception is thrown when a user is not authorized. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// This exception is thrown when the user has made too many requests for a given -// operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// This exception is thrown when a user exceeds the limit for a requested AWS -// resource. -// -// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException" -// This exception is thrown when a password reset is required. -// -// * ErrCodeUserNotFoundException "UserNotFoundException" -// This exception is thrown when a user is not found. -// -// * ErrCodeUserNotConfirmedException "UserNotConfirmedException" -// This exception is thrown when a user is not confirmed successfully. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown when Amazon Cognito encounters an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/VerifyUserAttribute -func (c *CognitoIdentityProvider) VerifyUserAttribute(input *VerifyUserAttributeInput) (*VerifyUserAttributeOutput, error) { - req, out := c.VerifyUserAttributeRequest(input) - return out, req.Send() -} - -// VerifyUserAttributeWithContext is the same as VerifyUserAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See VerifyUserAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CognitoIdentityProvider) VerifyUserAttributeWithContext(ctx aws.Context, input *VerifyUserAttributeInput, opts ...request.Option) (*VerifyUserAttributeOutput, error) { - req, out := c.VerifyUserAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Account takeover action type. -type AccountTakeoverActionType struct { - _ struct{} `type:"structure"` - - // The event action. - // - // * BLOCK Choosing this action will block the request. - // - // * MFA_IF_CONFIGURED Throw MFA challenge if user has configured it, else - // allow the request. - // - // * MFA_REQUIRED Throw MFA challenge if user has configured it, else block - // the request. - // - // * NO_ACTION Allow the user sign-in. - // - // EventAction is a required field - EventAction *string `type:"string" required:"true" enum:"AccountTakeoverEventActionType"` - - // Flag specifying whether to send a notification. - // - // Notify is a required field - Notify *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s AccountTakeoverActionType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountTakeoverActionType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AccountTakeoverActionType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AccountTakeoverActionType"} - if s.EventAction == nil { - invalidParams.Add(request.NewErrParamRequired("EventAction")) - } - if s.Notify == nil { - invalidParams.Add(request.NewErrParamRequired("Notify")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEventAction sets the EventAction field's value. -func (s *AccountTakeoverActionType) SetEventAction(v string) *AccountTakeoverActionType { - s.EventAction = &v - return s -} - -// SetNotify sets the Notify field's value. -func (s *AccountTakeoverActionType) SetNotify(v bool) *AccountTakeoverActionType { - s.Notify = &v - return s -} - -// Account takeover actions type. -type AccountTakeoverActionsType struct { - _ struct{} `type:"structure"` - - // Action to take for a high risk. - HighAction *AccountTakeoverActionType `type:"structure"` - - // Action to take for a low risk. - LowAction *AccountTakeoverActionType `type:"structure"` - - // Action to take for a medium risk. - MediumAction *AccountTakeoverActionType `type:"structure"` -} - -// String returns the string representation -func (s AccountTakeoverActionsType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountTakeoverActionsType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AccountTakeoverActionsType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AccountTakeoverActionsType"} - if s.HighAction != nil { - if err := s.HighAction.Validate(); err != nil { - invalidParams.AddNested("HighAction", err.(request.ErrInvalidParams)) - } - } - if s.LowAction != nil { - if err := s.LowAction.Validate(); err != nil { - invalidParams.AddNested("LowAction", err.(request.ErrInvalidParams)) - } - } - if s.MediumAction != nil { - if err := s.MediumAction.Validate(); err != nil { - invalidParams.AddNested("MediumAction", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHighAction sets the HighAction field's value. -func (s *AccountTakeoverActionsType) SetHighAction(v *AccountTakeoverActionType) *AccountTakeoverActionsType { - s.HighAction = v - return s -} - -// SetLowAction sets the LowAction field's value. -func (s *AccountTakeoverActionsType) SetLowAction(v *AccountTakeoverActionType) *AccountTakeoverActionsType { - s.LowAction = v - return s -} - -// SetMediumAction sets the MediumAction field's value. -func (s *AccountTakeoverActionsType) SetMediumAction(v *AccountTakeoverActionType) *AccountTakeoverActionsType { - s.MediumAction = v - return s -} - -// Configuration for mitigation actions and notification for different levels -// of risk detected for a potential account takeover. -type AccountTakeoverRiskConfigurationType struct { - _ struct{} `type:"structure"` - - // Account takeover risk configuration actions - // - // Actions is a required field - Actions *AccountTakeoverActionsType `type:"structure" required:"true"` - - // The notify configuration used to construct email notifications. - NotifyConfiguration *NotifyConfigurationType `type:"structure"` -} - -// String returns the string representation -func (s AccountTakeoverRiskConfigurationType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountTakeoverRiskConfigurationType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AccountTakeoverRiskConfigurationType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AccountTakeoverRiskConfigurationType"} - if s.Actions == nil { - invalidParams.Add(request.NewErrParamRequired("Actions")) - } - if s.Actions != nil { - if err := s.Actions.Validate(); err != nil { - invalidParams.AddNested("Actions", err.(request.ErrInvalidParams)) - } - } - if s.NotifyConfiguration != nil { - if err := s.NotifyConfiguration.Validate(); err != nil { - invalidParams.AddNested("NotifyConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActions sets the Actions field's value. -func (s *AccountTakeoverRiskConfigurationType) SetActions(v *AccountTakeoverActionsType) *AccountTakeoverRiskConfigurationType { - s.Actions = v - return s -} - -// SetNotifyConfiguration sets the NotifyConfiguration field's value. -func (s *AccountTakeoverRiskConfigurationType) SetNotifyConfiguration(v *NotifyConfigurationType) *AccountTakeoverRiskConfigurationType { - s.NotifyConfiguration = v - return s -} - -// Represents the request to add custom attributes. -type AddCustomAttributesInput struct { - _ struct{} `type:"structure"` - - // An array of custom attributes, such as Mutable and Name. - // - // CustomAttributes is a required field - CustomAttributes []*SchemaAttributeType `min:"1" type:"list" required:"true"` - - // The user pool ID for the user pool where you want to add custom attributes. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AddCustomAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddCustomAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddCustomAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddCustomAttributesInput"} - if s.CustomAttributes == nil { - invalidParams.Add(request.NewErrParamRequired("CustomAttributes")) - } - if s.CustomAttributes != nil && len(s.CustomAttributes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CustomAttributes", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.CustomAttributes != nil { - for i, v := range s.CustomAttributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CustomAttributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomAttributes sets the CustomAttributes field's value. -func (s *AddCustomAttributesInput) SetCustomAttributes(v []*SchemaAttributeType) *AddCustomAttributesInput { - s.CustomAttributes = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AddCustomAttributesInput) SetUserPoolId(v string) *AddCustomAttributesInput { - s.UserPoolId = &v - return s -} - -// Represents the response from the server for the request to add custom attributes. -type AddCustomAttributesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddCustomAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddCustomAttributesOutput) GoString() string { - return s.String() -} - -type AdminAddUserToGroupInput struct { - _ struct{} `type:"structure"` - - // The group name. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The username for the user. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminAddUserToGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminAddUserToGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminAddUserToGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminAddUserToGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *AdminAddUserToGroupInput) SetGroupName(v string) *AdminAddUserToGroupInput { - s.GroupName = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminAddUserToGroupInput) SetUserPoolId(v string) *AdminAddUserToGroupInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminAddUserToGroupInput) SetUsername(v string) *AdminAddUserToGroupInput { - s.Username = &v - return s -} - -type AdminAddUserToGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminAddUserToGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminAddUserToGroupOutput) GoString() string { - return s.String() -} - -// Represents the request to confirm user registration. -type AdminConfirmSignUpInput struct { - _ struct{} `type:"structure"` - - // The user pool ID for which you want to confirm user registration. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user name for which you want to confirm user registration. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminConfirmSignUpInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminConfirmSignUpInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminConfirmSignUpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminConfirmSignUpInput"} - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminConfirmSignUpInput) SetUserPoolId(v string) *AdminConfirmSignUpInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminConfirmSignUpInput) SetUsername(v string) *AdminConfirmSignUpInput { - s.Username = &v - return s -} - -// Represents the response from the server for the request to confirm registration. -type AdminConfirmSignUpOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminConfirmSignUpOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminConfirmSignUpOutput) GoString() string { - return s.String() -} - -// The configuration for creating a new user profile. -type AdminCreateUserConfigType struct { - _ struct{} `type:"structure"` - - // Set to True if only the administrator is allowed to create user profiles. - // Set to False if users can sign themselves up via an app. - AllowAdminCreateUserOnly *bool `type:"boolean"` - - // The message template to be used for the welcome message to new users. - // - // See also Customizing User Invitation Messages (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-message-customizations.html#cognito-user-pool-settings-user-invitation-message-customization). - InviteMessageTemplate *MessageTemplateType `type:"structure"` - - // The user account expiration limit, in days, after which the account is no - // longer usable. To reset the account after that time limit, you must call - // AdminCreateUser again, specifying "RESEND" for the MessageAction parameter. - // The default value for this parameter is 7. - UnusedAccountValidityDays *int64 `type:"integer"` -} - -// String returns the string representation -func (s AdminCreateUserConfigType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminCreateUserConfigType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminCreateUserConfigType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminCreateUserConfigType"} - if s.InviteMessageTemplate != nil { - if err := s.InviteMessageTemplate.Validate(); err != nil { - invalidParams.AddNested("InviteMessageTemplate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowAdminCreateUserOnly sets the AllowAdminCreateUserOnly field's value. -func (s *AdminCreateUserConfigType) SetAllowAdminCreateUserOnly(v bool) *AdminCreateUserConfigType { - s.AllowAdminCreateUserOnly = &v - return s -} - -// SetInviteMessageTemplate sets the InviteMessageTemplate field's value. -func (s *AdminCreateUserConfigType) SetInviteMessageTemplate(v *MessageTemplateType) *AdminCreateUserConfigType { - s.InviteMessageTemplate = v - return s -} - -// SetUnusedAccountValidityDays sets the UnusedAccountValidityDays field's value. -func (s *AdminCreateUserConfigType) SetUnusedAccountValidityDays(v int64) *AdminCreateUserConfigType { - s.UnusedAccountValidityDays = &v - return s -} - -// Represents the request to create a user in the specified user pool. -type AdminCreateUserInput struct { - _ struct{} `type:"structure"` - - // Specify "EMAIL" if email will be used to send the welcome message. Specify - // "SMS" if the phone number will be used. The default value is "SMS". More - // than one value can be specified. - DesiredDeliveryMediums []*string `type:"list"` - - // This parameter is only used if the phone_number_verified or email_verified - // attribute is set to True. Otherwise, it is ignored. - // - // If this parameter is set to True and the phone number or email address specified - // in the UserAttributes parameter already exists as an alias with a different - // user, the API call will migrate the alias from the previous user to the newly - // created user. The previous user will no longer be able to log in using that - // alias. - // - // If this parameter is set to False, the API throws an AliasExistsException - // error if the alias already exists. The default value is False. - ForceAliasCreation *bool `type:"boolean"` - - // Set to "RESEND" to resend the invitation message to a user that already exists - // and reset the expiration limit on the user's account. Set to "SUPPRESS" to - // suppress sending the message. Only one value can be specified. - MessageAction *string `type:"string" enum:"MessageActionType"` - - // The user's temporary password. This password must conform to the password - // policy that you specified when you created the user pool. - // - // The temporary password is valid only once. To complete the Admin Create User - // flow, the user must enter the temporary password in the sign-in page along - // with a new password to be used in all future sign-ins. - // - // This parameter is not required. If you do not specify a value, Amazon Cognito - // generates one for you. - // - // The temporary password can only be used until the user account expiration - // limit that you specified when you created the user pool. To reset the account - // after that time limit, you must call AdminCreateUser again, specifying "RESEND" - // for the MessageAction parameter. - TemporaryPassword *string `min:"6" type:"string" sensitive:"true"` - - // An array of name-value pairs that contain user attributes and attribute values - // to be set for the user to be created. You can create a user without specifying - // any attributes other than Username. However, any attributes that you specify - // as required (in or in the Attributes tab of the console) must be supplied - // either by you (in your call to AdminCreateUser) or by the user (when he or - // she signs up in response to your welcome message). - // - // For custom attributes, you must prepend the custom: prefix to the attribute - // name. - // - // To send a message inviting the user to sign up, you must specify the user's - // email address or phone number. This can be done in your call to AdminCreateUser - // or in the Users tab of the Amazon Cognito console for managing your user - // pools. - // - // In your call to AdminCreateUser, you can set the email_verified attribute - // to True, and you can set the phone_number_verified attribute to True. (You - // can also do this by calling .) - // - // * email: The email address of the user to whom the message that contains - // the code and username will be sent. Required if the email_verified attribute - // is set to True, or if "EMAIL" is specified in the DesiredDeliveryMediums - // parameter. - // - // * phone_number: The phone number of the user to whom the message that - // contains the code and username will be sent. Required if the phone_number_verified - // attribute is set to True, or if "SMS" is specified in the DesiredDeliveryMediums - // parameter. - UserAttributes []*AttributeType `type:"list"` - - // The user pool ID for the user pool where the user will be created. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The username for the user. Must be unique within the user pool. Must be a - // UTF-8 string between 1 and 128 characters. After the user is created, the - // username cannot be changed. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The user's validation data. This is an array of name-value pairs that contain - // user attributes and attribute values that you can use for custom validation, - // such as restricting the types of user accounts that can be registered. For - // example, you might choose to allow or disallow user sign-up based on the - // user's domain. - // - // To configure custom validation, you must create a Pre Sign-up Lambda trigger - // for the user pool as described in the Amazon Cognito Developer Guide. The - // Lambda trigger receives the validation data and uses it in the validation - // process. - // - // The user's validation data is not persisted. - ValidationData []*AttributeType `type:"list"` -} - -// String returns the string representation -func (s AdminCreateUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminCreateUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminCreateUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminCreateUserInput"} - if s.TemporaryPassword != nil && len(*s.TemporaryPassword) < 6 { - invalidParams.Add(request.NewErrParamMinLen("TemporaryPassword", 6)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - if s.UserAttributes != nil { - for i, v := range s.UserAttributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "UserAttributes", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ValidationData != nil { - for i, v := range s.ValidationData { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ValidationData", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDesiredDeliveryMediums sets the DesiredDeliveryMediums field's value. -func (s *AdminCreateUserInput) SetDesiredDeliveryMediums(v []*string) *AdminCreateUserInput { - s.DesiredDeliveryMediums = v - return s -} - -// SetForceAliasCreation sets the ForceAliasCreation field's value. -func (s *AdminCreateUserInput) SetForceAliasCreation(v bool) *AdminCreateUserInput { - s.ForceAliasCreation = &v - return s -} - -// SetMessageAction sets the MessageAction field's value. -func (s *AdminCreateUserInput) SetMessageAction(v string) *AdminCreateUserInput { - s.MessageAction = &v - return s -} - -// SetTemporaryPassword sets the TemporaryPassword field's value. -func (s *AdminCreateUserInput) SetTemporaryPassword(v string) *AdminCreateUserInput { - s.TemporaryPassword = &v - return s -} - -// SetUserAttributes sets the UserAttributes field's value. -func (s *AdminCreateUserInput) SetUserAttributes(v []*AttributeType) *AdminCreateUserInput { - s.UserAttributes = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminCreateUserInput) SetUserPoolId(v string) *AdminCreateUserInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminCreateUserInput) SetUsername(v string) *AdminCreateUserInput { - s.Username = &v - return s -} - -// SetValidationData sets the ValidationData field's value. -func (s *AdminCreateUserInput) SetValidationData(v []*AttributeType) *AdminCreateUserInput { - s.ValidationData = v - return s -} - -// Represents the response from the server to the request to create the user. -type AdminCreateUserOutput struct { - _ struct{} `type:"structure"` - - // The newly created user. - User *UserType `type:"structure"` -} - -// String returns the string representation -func (s AdminCreateUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminCreateUserOutput) GoString() string { - return s.String() -} - -// SetUser sets the User field's value. -func (s *AdminCreateUserOutput) SetUser(v *UserType) *AdminCreateUserOutput { - s.User = v - return s -} - -// Represents the request to delete user attributes as an administrator. -type AdminDeleteUserAttributesInput struct { - _ struct{} `type:"structure"` - - // An array of strings representing the user attribute names you wish to delete. - // - // For custom attributes, you must prepend the custom: prefix to the attribute - // name. - // - // UserAttributeNames is a required field - UserAttributeNames []*string `type:"list" required:"true"` - - // The user pool ID for the user pool where you want to delete user attributes. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user name of the user from which you would like to delete attributes. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminDeleteUserAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminDeleteUserAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminDeleteUserAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminDeleteUserAttributesInput"} - if s.UserAttributeNames == nil { - invalidParams.Add(request.NewErrParamRequired("UserAttributeNames")) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserAttributeNames sets the UserAttributeNames field's value. -func (s *AdminDeleteUserAttributesInput) SetUserAttributeNames(v []*string) *AdminDeleteUserAttributesInput { - s.UserAttributeNames = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminDeleteUserAttributesInput) SetUserPoolId(v string) *AdminDeleteUserAttributesInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminDeleteUserAttributesInput) SetUsername(v string) *AdminDeleteUserAttributesInput { - s.Username = &v - return s -} - -// Represents the response received from the server for a request to delete -// user attributes. -type AdminDeleteUserAttributesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminDeleteUserAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminDeleteUserAttributesOutput) GoString() string { - return s.String() -} - -// Represents the request to delete a user as an administrator. -type AdminDeleteUserInput struct { - _ struct{} `type:"structure"` - - // The user pool ID for the user pool where you want to delete the user. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user name of the user you wish to delete. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminDeleteUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminDeleteUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminDeleteUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminDeleteUserInput"} - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminDeleteUserInput) SetUserPoolId(v string) *AdminDeleteUserInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminDeleteUserInput) SetUsername(v string) *AdminDeleteUserInput { - s.Username = &v - return s -} - -type AdminDeleteUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminDeleteUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminDeleteUserOutput) GoString() string { - return s.String() -} - -type AdminDisableProviderForUserInput struct { - _ struct{} `type:"structure"` - - // The user to be disabled. - // - // User is a required field - User *ProviderUserIdentifierType `type:"structure" required:"true"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AdminDisableProviderForUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminDisableProviderForUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminDisableProviderForUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminDisableProviderForUserInput"} - if s.User == nil { - invalidParams.Add(request.NewErrParamRequired("User")) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.User != nil { - if err := s.User.Validate(); err != nil { - invalidParams.AddNested("User", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUser sets the User field's value. -func (s *AdminDisableProviderForUserInput) SetUser(v *ProviderUserIdentifierType) *AdminDisableProviderForUserInput { - s.User = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminDisableProviderForUserInput) SetUserPoolId(v string) *AdminDisableProviderForUserInput { - s.UserPoolId = &v - return s -} - -type AdminDisableProviderForUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminDisableProviderForUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminDisableProviderForUserOutput) GoString() string { - return s.String() -} - -// Represents the request to disable any user as an administrator. -type AdminDisableUserInput struct { - _ struct{} `type:"structure"` - - // The user pool ID for the user pool where you want to disable the user. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user name of the user you wish to disable. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminDisableUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminDisableUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminDisableUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminDisableUserInput"} - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminDisableUserInput) SetUserPoolId(v string) *AdminDisableUserInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminDisableUserInput) SetUsername(v string) *AdminDisableUserInput { - s.Username = &v - return s -} - -// Represents the response received from the server to disable the user as an -// administrator. -type AdminDisableUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminDisableUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminDisableUserOutput) GoString() string { - return s.String() -} - -// Represents the request that enables the user as an administrator. -type AdminEnableUserInput struct { - _ struct{} `type:"structure"` - - // The user pool ID for the user pool where you want to enable the user. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user name of the user you wish to enable. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminEnableUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminEnableUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminEnableUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminEnableUserInput"} - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminEnableUserInput) SetUserPoolId(v string) *AdminEnableUserInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminEnableUserInput) SetUsername(v string) *AdminEnableUserInput { - s.Username = &v - return s -} - -// Represents the response from the server for the request to enable a user -// as an administrator. -type AdminEnableUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminEnableUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminEnableUserOutput) GoString() string { - return s.String() -} - -// Sends the forgot device request, as an administrator. -type AdminForgetDeviceInput struct { - _ struct{} `type:"structure"` - - // The device key. - // - // DeviceKey is a required field - DeviceKey *string `min:"1" type:"string" required:"true"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user name. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminForgetDeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminForgetDeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminForgetDeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminForgetDeviceInput"} - if s.DeviceKey == nil { - invalidParams.Add(request.NewErrParamRequired("DeviceKey")) - } - if s.DeviceKey != nil && len(*s.DeviceKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeviceKey", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeviceKey sets the DeviceKey field's value. -func (s *AdminForgetDeviceInput) SetDeviceKey(v string) *AdminForgetDeviceInput { - s.DeviceKey = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminForgetDeviceInput) SetUserPoolId(v string) *AdminForgetDeviceInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminForgetDeviceInput) SetUsername(v string) *AdminForgetDeviceInput { - s.Username = &v - return s -} - -type AdminForgetDeviceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminForgetDeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminForgetDeviceOutput) GoString() string { - return s.String() -} - -// Represents the request to get the device, as an administrator. -type AdminGetDeviceInput struct { - _ struct{} `type:"structure"` - - // The device key. - // - // DeviceKey is a required field - DeviceKey *string `min:"1" type:"string" required:"true"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user name. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminGetDeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminGetDeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminGetDeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminGetDeviceInput"} - if s.DeviceKey == nil { - invalidParams.Add(request.NewErrParamRequired("DeviceKey")) - } - if s.DeviceKey != nil && len(*s.DeviceKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeviceKey", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeviceKey sets the DeviceKey field's value. -func (s *AdminGetDeviceInput) SetDeviceKey(v string) *AdminGetDeviceInput { - s.DeviceKey = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminGetDeviceInput) SetUserPoolId(v string) *AdminGetDeviceInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminGetDeviceInput) SetUsername(v string) *AdminGetDeviceInput { - s.Username = &v - return s -} - -// Gets the device response, as an administrator. -type AdminGetDeviceOutput struct { - _ struct{} `type:"structure"` - - // The device. - // - // Device is a required field - Device *DeviceType `type:"structure" required:"true"` -} - -// String returns the string representation -func (s AdminGetDeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminGetDeviceOutput) GoString() string { - return s.String() -} - -// SetDevice sets the Device field's value. -func (s *AdminGetDeviceOutput) SetDevice(v *DeviceType) *AdminGetDeviceOutput { - s.Device = v - return s -} - -// Represents the request to get the specified user as an administrator. -type AdminGetUserInput struct { - _ struct{} `type:"structure"` - - // The user pool ID for the user pool where you want to get information about - // the user. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user name of the user you wish to retrieve. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminGetUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminGetUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminGetUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminGetUserInput"} - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminGetUserInput) SetUserPoolId(v string) *AdminGetUserInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminGetUserInput) SetUsername(v string) *AdminGetUserInput { - s.Username = &v - return s -} - -// Represents the response from the server from the request to get the specified -// user as an administrator. -type AdminGetUserOutput struct { - _ struct{} `type:"structure"` - - // Indicates that the status is enabled. - Enabled *bool `type:"boolean"` - - // Specifies the options for MFA (e.g., email or phone number). - MFAOptions []*MFAOptionType `type:"list"` - - // The user's preferred MFA setting. - PreferredMfaSetting *string `type:"string"` - - // An array of name-value pairs representing user attributes. - UserAttributes []*AttributeType `type:"list"` - - // The date the user was created. - UserCreateDate *time.Time `type:"timestamp"` - - // The date the user was last modified. - UserLastModifiedDate *time.Time `type:"timestamp"` - - // The list of the user's MFA settings. - UserMFASettingList []*string `type:"list"` - - // The user status. Can be one of the following: - // - // * UNCONFIRMED - User has been created but not confirmed. - // - // * CONFIRMED - User has been confirmed. - // - // * ARCHIVED - User is no longer active. - // - // * COMPROMISED - User is disabled due to a potential security threat. - // - // * UNKNOWN - User status is not known. - UserStatus *string `type:"string" enum:"UserStatusType"` - - // The user name of the user about whom you are receiving information. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminGetUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminGetUserOutput) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *AdminGetUserOutput) SetEnabled(v bool) *AdminGetUserOutput { - s.Enabled = &v - return s -} - -// SetMFAOptions sets the MFAOptions field's value. -func (s *AdminGetUserOutput) SetMFAOptions(v []*MFAOptionType) *AdminGetUserOutput { - s.MFAOptions = v - return s -} - -// SetPreferredMfaSetting sets the PreferredMfaSetting field's value. -func (s *AdminGetUserOutput) SetPreferredMfaSetting(v string) *AdminGetUserOutput { - s.PreferredMfaSetting = &v - return s -} - -// SetUserAttributes sets the UserAttributes field's value. -func (s *AdminGetUserOutput) SetUserAttributes(v []*AttributeType) *AdminGetUserOutput { - s.UserAttributes = v - return s -} - -// SetUserCreateDate sets the UserCreateDate field's value. -func (s *AdminGetUserOutput) SetUserCreateDate(v time.Time) *AdminGetUserOutput { - s.UserCreateDate = &v - return s -} - -// SetUserLastModifiedDate sets the UserLastModifiedDate field's value. -func (s *AdminGetUserOutput) SetUserLastModifiedDate(v time.Time) *AdminGetUserOutput { - s.UserLastModifiedDate = &v - return s -} - -// SetUserMFASettingList sets the UserMFASettingList field's value. -func (s *AdminGetUserOutput) SetUserMFASettingList(v []*string) *AdminGetUserOutput { - s.UserMFASettingList = v - return s -} - -// SetUserStatus sets the UserStatus field's value. -func (s *AdminGetUserOutput) SetUserStatus(v string) *AdminGetUserOutput { - s.UserStatus = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminGetUserOutput) SetUsername(v string) *AdminGetUserOutput { - s.Username = &v - return s -} - -// Initiates the authorization request, as an administrator. -type AdminInitiateAuthInput struct { - _ struct{} `type:"structure"` - - // The analytics metadata for collecting Amazon Pinpoint metrics for AdminInitiateAuth - // calls. - AnalyticsMetadata *AnalyticsMetadataType `type:"structure"` - - // The authentication flow for this call to execute. The API action will depend - // on this value. For example: - // - // * REFRESH_TOKEN_AUTH will take in a valid refresh token and return new - // tokens. - // - // * USER_SRP_AUTH will take in USERNAME and SRP_A and return the SRP variables - // to be used for next challenge execution. - // - // * USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the - // next challenge or tokens. - // - // Valid values include: - // - // * USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) - // protocol. - // - // * REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing - // the access token and ID token by supplying a valid refresh token. - // - // * CUSTOM_AUTH: Custom authentication flow. - // - // * ADMIN_NO_SRP_AUTH: Non-SRP authentication flow; you can pass in the - // USERNAME and PASSWORD directly if the flow is enabled for calling the - // app client. - // - // * USER_PASSWORD_AUTH: Non-SRP authentication flow; USERNAME and PASSWORD - // are passed directly. If a user migration Lambda trigger is set, this flow - // will invoke the user migration Lambda if the USERNAME is not found in - // the user pool. - // - // AuthFlow is a required field - AuthFlow *string `type:"string" required:"true" enum:"AuthFlowType"` - - // The authentication parameters. These are inputs corresponding to the AuthFlow - // that you are invoking. The required values depend on the value of AuthFlow: - // - // * For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH - // (required if the app client is configured with a client secret), DEVICE_KEY - // - // * For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH - // (required if the app client is configured with a client secret), DEVICE_KEY - // - // * For ADMIN_NO_SRP_AUTH: USERNAME (required), SECRET_HASH (if app client - // is configured with client secret), PASSWORD (required), DEVICE_KEY - // - // * For CUSTOM_AUTH: USERNAME (required), SECRET_HASH (if app client is - // configured with client secret), DEVICE_KEY - AuthParameters map[string]*string `type:"map"` - - // The app client ID. - // - // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // This is a random key-value pair map which can contain any key and will be - // passed to your PreAuthentication Lambda trigger as-is. It can be used to - // implement additional validations around authentication. - ClientMetadata map[string]*string `type:"map"` - - // Contextual data such as the user's device fingerprint, IP address, or location - // used for evaluating the risk of an unexpected event by Amazon Cognito advanced - // security. - ContextData *ContextDataType `type:"structure"` - - // The ID of the Amazon Cognito user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AdminInitiateAuthInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminInitiateAuthInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminInitiateAuthInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminInitiateAuthInput"} - if s.AuthFlow == nil { - invalidParams.Add(request.NewErrParamRequired("AuthFlow")) - } - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.ContextData != nil { - if err := s.ContextData.Validate(); err != nil { - invalidParams.AddNested("ContextData", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalyticsMetadata sets the AnalyticsMetadata field's value. -func (s *AdminInitiateAuthInput) SetAnalyticsMetadata(v *AnalyticsMetadataType) *AdminInitiateAuthInput { - s.AnalyticsMetadata = v - return s -} - -// SetAuthFlow sets the AuthFlow field's value. -func (s *AdminInitiateAuthInput) SetAuthFlow(v string) *AdminInitiateAuthInput { - s.AuthFlow = &v - return s -} - -// SetAuthParameters sets the AuthParameters field's value. -func (s *AdminInitiateAuthInput) SetAuthParameters(v map[string]*string) *AdminInitiateAuthInput { - s.AuthParameters = v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *AdminInitiateAuthInput) SetClientId(v string) *AdminInitiateAuthInput { - s.ClientId = &v - return s -} - -// SetClientMetadata sets the ClientMetadata field's value. -func (s *AdminInitiateAuthInput) SetClientMetadata(v map[string]*string) *AdminInitiateAuthInput { - s.ClientMetadata = v - return s -} - -// SetContextData sets the ContextData field's value. -func (s *AdminInitiateAuthInput) SetContextData(v *ContextDataType) *AdminInitiateAuthInput { - s.ContextData = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminInitiateAuthInput) SetUserPoolId(v string) *AdminInitiateAuthInput { - s.UserPoolId = &v - return s -} - -// Initiates the authentication response, as an administrator. -type AdminInitiateAuthOutput struct { - _ struct{} `type:"structure"` - - // The result of the authentication response. This is only returned if the caller - // does not need to pass another challenge. If the caller does need to pass - // another challenge before it gets tokens, ChallengeName, ChallengeParameters, - // and Session are returned. - AuthenticationResult *AuthenticationResultType `type:"structure"` - - // The name of the challenge which you are responding to with this call. This - // is returned to you in the AdminInitiateAuth response if you need to pass - // another challenge. - // - // * MFA_SETUP: If MFA is required, users who do not have at least one of - // the MFA methods set up are presented with an MFA_SETUP challenge. The - // user must set up at least one MFA type to continue to authenticate. - // - // * SELECT_MFA_TYPE: Selects the MFA type. Valid MFA options are SMS_MFA - // for text SMS MFA, and SOFTWARE_TOKEN_MFA for TOTP software token MFA. - // - // * SMS_MFA: Next challenge is to supply an SMS_MFA_CODE, delivered via - // SMS. - // - // * PASSWORD_VERIFIER: Next challenge is to supply PASSWORD_CLAIM_SIGNATURE, - // PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after the client-side SRP calculations. - // - // * CUSTOM_CHALLENGE: This is returned if your custom authentication flow - // determines that the user should pass another challenge before tokens are - // issued. - // - // * DEVICE_SRP_AUTH: If device tracking was enabled on your user pool and - // the previous challenges were passed, this challenge is returned so that - // Amazon Cognito can start tracking this device. - // - // * DEVICE_PASSWORD_VERIFIER: Similar to PASSWORD_VERIFIER, but for devices - // only. - // - // * ADMIN_NO_SRP_AUTH: This is returned if you need to authenticate with - // USERNAME and PASSWORD directly. An app client must be enabled to use this - // flow. - // - // * NEW_PASSWORD_REQUIRED: For users which are required to change their - // passwords after successful first login. This challenge should be passed - // with NEW_PASSWORD and any other required attributes. - ChallengeName *string `type:"string" enum:"ChallengeNameType"` - - // The challenge parameters. These are returned to you in the AdminInitiateAuth - // response if you need to pass another challenge. The responses in this parameter - // should be used to compute inputs to the next call (AdminRespondToAuthChallenge). - // - // All challenges require USERNAME and SECRET_HASH (if applicable). - // - // The value of the USER_ID_FOR_SRP attribute will be the user's actual username, - // not an alias (such as email address or phone number), even if you specified - // an alias in your call to AdminInitiateAuth. This is because, in the AdminRespondToAuthChallenge - // API ChallengeResponses, the USERNAME attribute cannot be an alias. - ChallengeParameters map[string]*string `type:"map"` - - // The session which should be passed both ways in challenge-response calls - // to the service. If AdminInitiateAuth or AdminRespondToAuthChallenge API call - // determines that the caller needs to go through another challenge, they return - // a session with other challenge parameters. This session should be passed - // as it is to the next AdminRespondToAuthChallenge API call. - Session *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s AdminInitiateAuthOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminInitiateAuthOutput) GoString() string { - return s.String() -} - -// SetAuthenticationResult sets the AuthenticationResult field's value. -func (s *AdminInitiateAuthOutput) SetAuthenticationResult(v *AuthenticationResultType) *AdminInitiateAuthOutput { - s.AuthenticationResult = v - return s -} - -// SetChallengeName sets the ChallengeName field's value. -func (s *AdminInitiateAuthOutput) SetChallengeName(v string) *AdminInitiateAuthOutput { - s.ChallengeName = &v - return s -} - -// SetChallengeParameters sets the ChallengeParameters field's value. -func (s *AdminInitiateAuthOutput) SetChallengeParameters(v map[string]*string) *AdminInitiateAuthOutput { - s.ChallengeParameters = v - return s -} - -// SetSession sets the Session field's value. -func (s *AdminInitiateAuthOutput) SetSession(v string) *AdminInitiateAuthOutput { - s.Session = &v - return s -} - -type AdminLinkProviderForUserInput struct { - _ struct{} `type:"structure"` - - // The existing user in the user pool to be linked to the external identity - // provider user account. Can be a native (Username + Password) Cognito User - // Pools user or a federated user (for example, a SAML or Facebook user). If - // the user doesn't exist, an exception is thrown. This is the user that is - // returned when the new user (with the linked identity provider attribute) - // signs in. - // - // For a native username + password user, the ProviderAttributeValue for the - // DestinationUser should be the username in the user pool. For a federated - // user, it should be the provider-specific user_id. - // - // The ProviderAttributeName of the DestinationUser is ignored. - // - // The ProviderName should be set to Cognito for users in Cognito user pools. - // - // DestinationUser is a required field - DestinationUser *ProviderUserIdentifierType `type:"structure" required:"true"` - - // An external identity provider account for a user who does not currently exist - // yet in the user pool. This user must be a federated user (for example, a - // SAML or Facebook user), not another native user. - // - // If the SourceUser is a federated social identity provider user (Facebook, - // Google, or Login with Amazon), you must set the ProviderAttributeName to - // Cognito_Subject. For social identity providers, the ProviderName will be - // Facebook, Google, or LoginWithAmazon, and Cognito will automatically parse - // the Facebook, Google, and Login with Amazon tokens for id, sub, and user_id, - // respectively. The ProviderAttributeValue for the user must be the same value - // as the id, sub, or user_id value found in the social identity provider token. - // - // For SAML, the ProviderAttributeNamecan be any value that matches a claim in the SAML assertion. If you wish - // to link SAML users based on the subject of the SAML assertion, you should - // map the subject to a claim through the SAML identity provider and submit - // that claim name as the ProviderAttributeName. If you set ProviderAttributeNameto Cognito_Subject - // - // SourceUser is a required field - SourceUser *ProviderUserIdentifierType `type:"structure" required:"true"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AdminLinkProviderForUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminLinkProviderForUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminLinkProviderForUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminLinkProviderForUserInput"} - if s.DestinationUser == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationUser")) - } - if s.SourceUser == nil { - invalidParams.Add(request.NewErrParamRequired("SourceUser")) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.DestinationUser != nil { - if err := s.DestinationUser.Validate(); err != nil { - invalidParams.AddNested("DestinationUser", err.(request.ErrInvalidParams)) - } - } - if s.SourceUser != nil { - if err := s.SourceUser.Validate(); err != nil { - invalidParams.AddNested("SourceUser", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationUser sets the DestinationUser field's value. -func (s *AdminLinkProviderForUserInput) SetDestinationUser(v *ProviderUserIdentifierType) *AdminLinkProviderForUserInput { - s.DestinationUser = v - return s -} - -// SetSourceUser sets the SourceUser field's value. -func (s *AdminLinkProviderForUserInput) SetSourceUser(v *ProviderUserIdentifierType) *AdminLinkProviderForUserInput { - s.SourceUser = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminLinkProviderForUserInput) SetUserPoolId(v string) *AdminLinkProviderForUserInput { - s.UserPoolId = &v - return s -} - -type AdminLinkProviderForUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminLinkProviderForUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminLinkProviderForUserOutput) GoString() string { - return s.String() -} - -// Represents the request to list devices, as an administrator. -type AdminListDevicesInput struct { - _ struct{} `type:"structure"` - - // The limit of the devices request. - Limit *int64 `type:"integer"` - - // The pagination token. - PaginationToken *string `min:"1" type:"string"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user name. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminListDevicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminListDevicesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminListDevicesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminListDevicesInput"} - if s.PaginationToken != nil && len(*s.PaginationToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PaginationToken", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *AdminListDevicesInput) SetLimit(v int64) *AdminListDevicesInput { - s.Limit = &v - return s -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *AdminListDevicesInput) SetPaginationToken(v string) *AdminListDevicesInput { - s.PaginationToken = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminListDevicesInput) SetUserPoolId(v string) *AdminListDevicesInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminListDevicesInput) SetUsername(v string) *AdminListDevicesInput { - s.Username = &v - return s -} - -// Lists the device's response, as an administrator. -type AdminListDevicesOutput struct { - _ struct{} `type:"structure"` - - // The devices in the list of devices response. - Devices []*DeviceType `type:"list"` - - // The pagination token. - PaginationToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s AdminListDevicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminListDevicesOutput) GoString() string { - return s.String() -} - -// SetDevices sets the Devices field's value. -func (s *AdminListDevicesOutput) SetDevices(v []*DeviceType) *AdminListDevicesOutput { - s.Devices = v - return s -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *AdminListDevicesOutput) SetPaginationToken(v string) *AdminListDevicesOutput { - s.PaginationToken = &v - return s -} - -type AdminListGroupsForUserInput struct { - _ struct{} `type:"structure"` - - // The limit of the request to list groups. - Limit *int64 `type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `min:"1" type:"string"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The username for the user. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminListGroupsForUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminListGroupsForUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminListGroupsForUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminListGroupsForUserInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *AdminListGroupsForUserInput) SetLimit(v int64) *AdminListGroupsForUserInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *AdminListGroupsForUserInput) SetNextToken(v string) *AdminListGroupsForUserInput { - s.NextToken = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminListGroupsForUserInput) SetUserPoolId(v string) *AdminListGroupsForUserInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminListGroupsForUserInput) SetUsername(v string) *AdminListGroupsForUserInput { - s.Username = &v - return s -} - -type AdminListGroupsForUserOutput struct { - _ struct{} `type:"structure"` - - // The groups that the user belongs to. - Groups []*GroupType `type:"list"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s AdminListGroupsForUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminListGroupsForUserOutput) GoString() string { - return s.String() -} - -// SetGroups sets the Groups field's value. -func (s *AdminListGroupsForUserOutput) SetGroups(v []*GroupType) *AdminListGroupsForUserOutput { - s.Groups = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *AdminListGroupsForUserOutput) SetNextToken(v string) *AdminListGroupsForUserOutput { - s.NextToken = &v - return s -} - -type AdminListUserAuthEventsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of authentication events to return. - MaxResults *int64 `type:"integer"` - - // A pagination token. - NextToken *string `min:"1" type:"string"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user pool username or an alias. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminListUserAuthEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminListUserAuthEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminListUserAuthEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminListUserAuthEventsInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *AdminListUserAuthEventsInput) SetMaxResults(v int64) *AdminListUserAuthEventsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *AdminListUserAuthEventsInput) SetNextToken(v string) *AdminListUserAuthEventsInput { - s.NextToken = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminListUserAuthEventsInput) SetUserPoolId(v string) *AdminListUserAuthEventsInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminListUserAuthEventsInput) SetUsername(v string) *AdminListUserAuthEventsInput { - s.Username = &v - return s -} - -type AdminListUserAuthEventsOutput struct { - _ struct{} `type:"structure"` - - // The response object. It includes the EventID, EventType, CreationDate, EventRisk, - // and EventResponse. - AuthEvents []*AuthEventType `type:"list"` - - // A pagination token. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s AdminListUserAuthEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminListUserAuthEventsOutput) GoString() string { - return s.String() -} - -// SetAuthEvents sets the AuthEvents field's value. -func (s *AdminListUserAuthEventsOutput) SetAuthEvents(v []*AuthEventType) *AdminListUserAuthEventsOutput { - s.AuthEvents = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *AdminListUserAuthEventsOutput) SetNextToken(v string) *AdminListUserAuthEventsOutput { - s.NextToken = &v - return s -} - -type AdminRemoveUserFromGroupInput struct { - _ struct{} `type:"structure"` - - // The group name. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The username for the user. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminRemoveUserFromGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminRemoveUserFromGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminRemoveUserFromGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminRemoveUserFromGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *AdminRemoveUserFromGroupInput) SetGroupName(v string) *AdminRemoveUserFromGroupInput { - s.GroupName = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminRemoveUserFromGroupInput) SetUserPoolId(v string) *AdminRemoveUserFromGroupInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminRemoveUserFromGroupInput) SetUsername(v string) *AdminRemoveUserFromGroupInput { - s.Username = &v - return s -} - -type AdminRemoveUserFromGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminRemoveUserFromGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminRemoveUserFromGroupOutput) GoString() string { - return s.String() -} - -// Represents the request to reset a user's password as an administrator. -type AdminResetUserPasswordInput struct { - _ struct{} `type:"structure"` - - // The user pool ID for the user pool where you want to reset the user's password. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user name of the user whose password you wish to reset. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminResetUserPasswordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminResetUserPasswordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminResetUserPasswordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminResetUserPasswordInput"} - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminResetUserPasswordInput) SetUserPoolId(v string) *AdminResetUserPasswordInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminResetUserPasswordInput) SetUsername(v string) *AdminResetUserPasswordInput { - s.Username = &v - return s -} - -// Represents the response from the server to reset a user password as an administrator. -type AdminResetUserPasswordOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminResetUserPasswordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminResetUserPasswordOutput) GoString() string { - return s.String() -} - -// The request to respond to the authentication challenge, as an administrator. -type AdminRespondToAuthChallengeInput struct { - _ struct{} `type:"structure"` - - // The analytics metadata for collecting Amazon Pinpoint metrics for AdminRespondToAuthChallenge - // calls. - AnalyticsMetadata *AnalyticsMetadataType `type:"structure"` - - // The challenge name. For more information, see . - // - // ChallengeName is a required field - ChallengeName *string `type:"string" required:"true" enum:"ChallengeNameType"` - - // The challenge responses. These are inputs corresponding to the value of ChallengeName, - // for example: - // - // * SMS_MFA: SMS_MFA_CODE, USERNAME, SECRET_HASH (if app client is configured - // with client secret). - // - // * PASSWORD_VERIFIER: PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, - // TIMESTAMP, USERNAME, SECRET_HASH (if app client is configured with client - // secret). - // - // * ADMIN_NO_SRP_AUTH: PASSWORD, USERNAME, SECRET_HASH (if app client is - // configured with client secret). - // - // * NEW_PASSWORD_REQUIRED: NEW_PASSWORD, any other required attributes, - // USERNAME, SECRET_HASH (if app client is configured with client secret). - // - // - // The value of the USERNAME attribute must be the user's actual username, not - // an alias (such as email address or phone number). To make this easier, the - // AdminInitiateAuth response includes the actual username value in the USERNAMEUSER_ID_FOR_SRP - // attribute, even if you specified an alias in your call to AdminInitiateAuth. - ChallengeResponses map[string]*string `type:"map"` - - // The app client ID. - // - // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // Contextual data such as the user's device fingerprint, IP address, or location - // used for evaluating the risk of an unexpected event by Amazon Cognito advanced - // security. - ContextData *ContextDataType `type:"structure"` - - // The session which should be passed both ways in challenge-response calls - // to the service. If InitiateAuth or RespondToAuthChallenge API call determines - // that the caller needs to go through another challenge, they return a session - // with other challenge parameters. This session should be passed as it is to - // the next RespondToAuthChallenge API call. - Session *string `min:"20" type:"string"` - - // The ID of the Amazon Cognito user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AdminRespondToAuthChallengeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminRespondToAuthChallengeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminRespondToAuthChallengeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminRespondToAuthChallengeInput"} - if s.ChallengeName == nil { - invalidParams.Add(request.NewErrParamRequired("ChallengeName")) - } - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.Session != nil && len(*s.Session) < 20 { - invalidParams.Add(request.NewErrParamMinLen("Session", 20)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.ContextData != nil { - if err := s.ContextData.Validate(); err != nil { - invalidParams.AddNested("ContextData", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalyticsMetadata sets the AnalyticsMetadata field's value. -func (s *AdminRespondToAuthChallengeInput) SetAnalyticsMetadata(v *AnalyticsMetadataType) *AdminRespondToAuthChallengeInput { - s.AnalyticsMetadata = v - return s -} - -// SetChallengeName sets the ChallengeName field's value. -func (s *AdminRespondToAuthChallengeInput) SetChallengeName(v string) *AdminRespondToAuthChallengeInput { - s.ChallengeName = &v - return s -} - -// SetChallengeResponses sets the ChallengeResponses field's value. -func (s *AdminRespondToAuthChallengeInput) SetChallengeResponses(v map[string]*string) *AdminRespondToAuthChallengeInput { - s.ChallengeResponses = v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *AdminRespondToAuthChallengeInput) SetClientId(v string) *AdminRespondToAuthChallengeInput { - s.ClientId = &v - return s -} - -// SetContextData sets the ContextData field's value. -func (s *AdminRespondToAuthChallengeInput) SetContextData(v *ContextDataType) *AdminRespondToAuthChallengeInput { - s.ContextData = v - return s -} - -// SetSession sets the Session field's value. -func (s *AdminRespondToAuthChallengeInput) SetSession(v string) *AdminRespondToAuthChallengeInput { - s.Session = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminRespondToAuthChallengeInput) SetUserPoolId(v string) *AdminRespondToAuthChallengeInput { - s.UserPoolId = &v - return s -} - -// Responds to the authentication challenge, as an administrator. -type AdminRespondToAuthChallengeOutput struct { - _ struct{} `type:"structure"` - - // The result returned by the server in response to the authentication request. - AuthenticationResult *AuthenticationResultType `type:"structure"` - - // The name of the challenge. For more information, see . - ChallengeName *string `type:"string" enum:"ChallengeNameType"` - - // The challenge parameters. For more information, see . - ChallengeParameters map[string]*string `type:"map"` - - // The session which should be passed both ways in challenge-response calls - // to the service. If the or API call determines that the caller needs to go - // through another challenge, they return a session with other challenge parameters. - // This session should be passed as it is to the next RespondToAuthChallenge - // API call. - Session *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s AdminRespondToAuthChallengeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminRespondToAuthChallengeOutput) GoString() string { - return s.String() -} - -// SetAuthenticationResult sets the AuthenticationResult field's value. -func (s *AdminRespondToAuthChallengeOutput) SetAuthenticationResult(v *AuthenticationResultType) *AdminRespondToAuthChallengeOutput { - s.AuthenticationResult = v - return s -} - -// SetChallengeName sets the ChallengeName field's value. -func (s *AdminRespondToAuthChallengeOutput) SetChallengeName(v string) *AdminRespondToAuthChallengeOutput { - s.ChallengeName = &v - return s -} - -// SetChallengeParameters sets the ChallengeParameters field's value. -func (s *AdminRespondToAuthChallengeOutput) SetChallengeParameters(v map[string]*string) *AdminRespondToAuthChallengeOutput { - s.ChallengeParameters = v - return s -} - -// SetSession sets the Session field's value. -func (s *AdminRespondToAuthChallengeOutput) SetSession(v string) *AdminRespondToAuthChallengeOutput { - s.Session = &v - return s -} - -type AdminSetUserMFAPreferenceInput struct { - _ struct{} `type:"structure"` - - // The SMS text message MFA settings. - SMSMfaSettings *SMSMfaSettingsType `type:"structure"` - - // The time-based one-time password software token MFA settings. - SoftwareTokenMfaSettings *SoftwareTokenMfaSettingsType `type:"structure"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user pool username or alias. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminSetUserMFAPreferenceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminSetUserMFAPreferenceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminSetUserMFAPreferenceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminSetUserMFAPreferenceInput"} - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSMSMfaSettings sets the SMSMfaSettings field's value. -func (s *AdminSetUserMFAPreferenceInput) SetSMSMfaSettings(v *SMSMfaSettingsType) *AdminSetUserMFAPreferenceInput { - s.SMSMfaSettings = v - return s -} - -// SetSoftwareTokenMfaSettings sets the SoftwareTokenMfaSettings field's value. -func (s *AdminSetUserMFAPreferenceInput) SetSoftwareTokenMfaSettings(v *SoftwareTokenMfaSettingsType) *AdminSetUserMFAPreferenceInput { - s.SoftwareTokenMfaSettings = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminSetUserMFAPreferenceInput) SetUserPoolId(v string) *AdminSetUserMFAPreferenceInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminSetUserMFAPreferenceInput) SetUsername(v string) *AdminSetUserMFAPreferenceInput { - s.Username = &v - return s -} - -type AdminSetUserMFAPreferenceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminSetUserMFAPreferenceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminSetUserMFAPreferenceOutput) GoString() string { - return s.String() -} - -// Represents the request to set user settings as an administrator. -type AdminSetUserSettingsInput struct { - _ struct{} `type:"structure"` - - // Specifies the options for MFA (e.g., email or phone number). - // - // MFAOptions is a required field - MFAOptions []*MFAOptionType `type:"list" required:"true"` - - // The user pool ID for the user pool where you want to set the user's settings, - // such as MFA options. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user name of the user for whom you wish to set user settings. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminSetUserSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminSetUserSettingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminSetUserSettingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminSetUserSettingsInput"} - if s.MFAOptions == nil { - invalidParams.Add(request.NewErrParamRequired("MFAOptions")) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - if s.MFAOptions != nil { - for i, v := range s.MFAOptions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MFAOptions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMFAOptions sets the MFAOptions field's value. -func (s *AdminSetUserSettingsInput) SetMFAOptions(v []*MFAOptionType) *AdminSetUserSettingsInput { - s.MFAOptions = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminSetUserSettingsInput) SetUserPoolId(v string) *AdminSetUserSettingsInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminSetUserSettingsInput) SetUsername(v string) *AdminSetUserSettingsInput { - s.Username = &v - return s -} - -// Represents the response from the server to set user settings as an administrator. -type AdminSetUserSettingsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminSetUserSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminSetUserSettingsOutput) GoString() string { - return s.String() -} - -type AdminUpdateAuthEventFeedbackInput struct { - _ struct{} `type:"structure"` - - // The authentication event ID. - // - // EventId is a required field - EventId *string `min:"1" type:"string" required:"true"` - - // The authentication event feedback value. - // - // FeedbackValue is a required field - FeedbackValue *string `type:"string" required:"true" enum:"FeedbackValueType"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user pool username. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminUpdateAuthEventFeedbackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminUpdateAuthEventFeedbackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminUpdateAuthEventFeedbackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminUpdateAuthEventFeedbackInput"} - if s.EventId == nil { - invalidParams.Add(request.NewErrParamRequired("EventId")) - } - if s.EventId != nil && len(*s.EventId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EventId", 1)) - } - if s.FeedbackValue == nil { - invalidParams.Add(request.NewErrParamRequired("FeedbackValue")) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEventId sets the EventId field's value. -func (s *AdminUpdateAuthEventFeedbackInput) SetEventId(v string) *AdminUpdateAuthEventFeedbackInput { - s.EventId = &v - return s -} - -// SetFeedbackValue sets the FeedbackValue field's value. -func (s *AdminUpdateAuthEventFeedbackInput) SetFeedbackValue(v string) *AdminUpdateAuthEventFeedbackInput { - s.FeedbackValue = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminUpdateAuthEventFeedbackInput) SetUserPoolId(v string) *AdminUpdateAuthEventFeedbackInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminUpdateAuthEventFeedbackInput) SetUsername(v string) *AdminUpdateAuthEventFeedbackInput { - s.Username = &v - return s -} - -type AdminUpdateAuthEventFeedbackOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminUpdateAuthEventFeedbackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminUpdateAuthEventFeedbackOutput) GoString() string { - return s.String() -} - -// The request to update the device status, as an administrator. -type AdminUpdateDeviceStatusInput struct { - _ struct{} `type:"structure"` - - // The device key. - // - // DeviceKey is a required field - DeviceKey *string `min:"1" type:"string" required:"true"` - - // The status indicating whether a device has been remembered or not. - DeviceRememberedStatus *string `type:"string" enum:"DeviceRememberedStatusType"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user name. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminUpdateDeviceStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminUpdateDeviceStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminUpdateDeviceStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminUpdateDeviceStatusInput"} - if s.DeviceKey == nil { - invalidParams.Add(request.NewErrParamRequired("DeviceKey")) - } - if s.DeviceKey != nil && len(*s.DeviceKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeviceKey", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeviceKey sets the DeviceKey field's value. -func (s *AdminUpdateDeviceStatusInput) SetDeviceKey(v string) *AdminUpdateDeviceStatusInput { - s.DeviceKey = &v - return s -} - -// SetDeviceRememberedStatus sets the DeviceRememberedStatus field's value. -func (s *AdminUpdateDeviceStatusInput) SetDeviceRememberedStatus(v string) *AdminUpdateDeviceStatusInput { - s.DeviceRememberedStatus = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminUpdateDeviceStatusInput) SetUserPoolId(v string) *AdminUpdateDeviceStatusInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminUpdateDeviceStatusInput) SetUsername(v string) *AdminUpdateDeviceStatusInput { - s.Username = &v - return s -} - -// The status response from the request to update the device, as an administrator. -type AdminUpdateDeviceStatusOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminUpdateDeviceStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminUpdateDeviceStatusOutput) GoString() string { - return s.String() -} - -// Represents the request to update the user's attributes as an administrator. -type AdminUpdateUserAttributesInput struct { - _ struct{} `type:"structure"` - - // An array of name-value pairs representing user attributes. - // - // For custom attributes, you must prepend the custom: prefix to the attribute - // name. - // - // UserAttributes is a required field - UserAttributes []*AttributeType `type:"list" required:"true"` - - // The user pool ID for the user pool where you want to update user attributes. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user name of the user for whom you want to update user attributes. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminUpdateUserAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminUpdateUserAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminUpdateUserAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminUpdateUserAttributesInput"} - if s.UserAttributes == nil { - invalidParams.Add(request.NewErrParamRequired("UserAttributes")) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - if s.UserAttributes != nil { - for i, v := range s.UserAttributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "UserAttributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserAttributes sets the UserAttributes field's value. -func (s *AdminUpdateUserAttributesInput) SetUserAttributes(v []*AttributeType) *AdminUpdateUserAttributesInput { - s.UserAttributes = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminUpdateUserAttributesInput) SetUserPoolId(v string) *AdminUpdateUserAttributesInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminUpdateUserAttributesInput) SetUsername(v string) *AdminUpdateUserAttributesInput { - s.Username = &v - return s -} - -// Represents the response from the server for the request to update user attributes -// as an administrator. -type AdminUpdateUserAttributesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminUpdateUserAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminUpdateUserAttributesOutput) GoString() string { - return s.String() -} - -// The request to sign out of all devices, as an administrator. -type AdminUserGlobalSignOutInput struct { - _ struct{} `type:"structure"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user name. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s AdminUserGlobalSignOutInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminUserGlobalSignOutInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdminUserGlobalSignOutInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdminUserGlobalSignOutInput"} - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *AdminUserGlobalSignOutInput) SetUserPoolId(v string) *AdminUserGlobalSignOutInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *AdminUserGlobalSignOutInput) SetUsername(v string) *AdminUserGlobalSignOutInput { - s.Username = &v - return s -} - -// The global sign-out response, as an administrator. -type AdminUserGlobalSignOutOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AdminUserGlobalSignOutOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdminUserGlobalSignOutOutput) GoString() string { - return s.String() -} - -// The Amazon Pinpoint analytics configuration for collecting metrics for a -// user pool. -type AnalyticsConfigurationType struct { - _ struct{} `type:"structure"` - - // The application ID for an Amazon Pinpoint application. - // - // ApplicationId is a required field - ApplicationId *string `type:"string" required:"true"` - - // The external ID. - // - // ExternalId is a required field - ExternalId *string `type:"string" required:"true"` - - // The ARN of an IAM role that authorizes Amazon Cognito to publish events to - // Amazon Pinpoint analytics. - // - // RoleArn is a required field - RoleArn *string `min:"20" type:"string" required:"true"` - - // If UserDataShared is true, Amazon Cognito will include user data in the events - // it publishes to Amazon Pinpoint analytics. - UserDataShared *bool `type:"boolean"` -} - -// String returns the string representation -func (s AnalyticsConfigurationType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AnalyticsConfigurationType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AnalyticsConfigurationType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AnalyticsConfigurationType"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ExternalId == nil { - invalidParams.Add(request.NewErrParamRequired("ExternalId")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *AnalyticsConfigurationType) SetApplicationId(v string) *AnalyticsConfigurationType { - s.ApplicationId = &v - return s -} - -// SetExternalId sets the ExternalId field's value. -func (s *AnalyticsConfigurationType) SetExternalId(v string) *AnalyticsConfigurationType { - s.ExternalId = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *AnalyticsConfigurationType) SetRoleArn(v string) *AnalyticsConfigurationType { - s.RoleArn = &v - return s -} - -// SetUserDataShared sets the UserDataShared field's value. -func (s *AnalyticsConfigurationType) SetUserDataShared(v bool) *AnalyticsConfigurationType { - s.UserDataShared = &v - return s -} - -// An Amazon Pinpoint analytics endpoint. -// -// An endpoint uniquely identifies a mobile device, email address, or phone -// number that can receive messages from Amazon Pinpoint analytics. -type AnalyticsMetadataType struct { - _ struct{} `type:"structure"` - - // The endpoint ID. - AnalyticsEndpointId *string `type:"string"` -} - -// String returns the string representation -func (s AnalyticsMetadataType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AnalyticsMetadataType) GoString() string { - return s.String() -} - -// SetAnalyticsEndpointId sets the AnalyticsEndpointId field's value. -func (s *AnalyticsMetadataType) SetAnalyticsEndpointId(v string) *AnalyticsMetadataType { - s.AnalyticsEndpointId = &v - return s -} - -type AssociateSoftwareTokenInput struct { - _ struct{} `type:"structure"` - - // The access token. - AccessToken *string `type:"string" sensitive:"true"` - - // The session which should be passed both ways in challenge-response calls - // to the service. This allows authentication of the user as part of the MFA - // setup process. - Session *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s AssociateSoftwareTokenInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateSoftwareTokenInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateSoftwareTokenInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateSoftwareTokenInput"} - if s.Session != nil && len(*s.Session) < 20 { - invalidParams.Add(request.NewErrParamMinLen("Session", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *AssociateSoftwareTokenInput) SetAccessToken(v string) *AssociateSoftwareTokenInput { - s.AccessToken = &v - return s -} - -// SetSession sets the Session field's value. -func (s *AssociateSoftwareTokenInput) SetSession(v string) *AssociateSoftwareTokenInput { - s.Session = &v - return s -} - -type AssociateSoftwareTokenOutput struct { - _ struct{} `type:"structure"` - - // A unique generated shared secret code that is used in the TOTP algorithm - // to generate a one time code. - SecretCode *string `min:"16" type:"string" sensitive:"true"` - - // The session which should be passed both ways in challenge-response calls - // to the service. This allows authentication of the user as part of the MFA - // setup process. - Session *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s AssociateSoftwareTokenOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateSoftwareTokenOutput) GoString() string { - return s.String() -} - -// SetSecretCode sets the SecretCode field's value. -func (s *AssociateSoftwareTokenOutput) SetSecretCode(v string) *AssociateSoftwareTokenOutput { - s.SecretCode = &v - return s -} - -// SetSession sets the Session field's value. -func (s *AssociateSoftwareTokenOutput) SetSession(v string) *AssociateSoftwareTokenOutput { - s.Session = &v - return s -} - -// Specifies whether the attribute is standard or custom. -type AttributeType struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The value of the attribute. - Value *string `type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s AttributeType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttributeType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttributeType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttributeType"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *AttributeType) SetName(v string) *AttributeType { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *AttributeType) SetValue(v string) *AttributeType { - s.Value = &v - return s -} - -// The authentication event type. -type AuthEventType struct { - _ struct{} `type:"structure"` - - // The challenge responses. - ChallengeResponses []*ChallengeResponseType `type:"list"` - - // The creation date - CreationDate *time.Time `type:"timestamp"` - - // The user context data captured at the time of an event request. It provides - // additional information about the client from which event the request is received. - EventContextData *EventContextDataType `type:"structure"` - - // A flag specifying the user feedback captured at the time of an event request - // is good or bad. - EventFeedback *EventFeedbackType `type:"structure"` - - // The event ID. - EventId *string `type:"string"` - - // The event response. - EventResponse *string `type:"string" enum:"EventResponseType"` - - // The event risk. - EventRisk *EventRiskType `type:"structure"` - - // The event type. - EventType *string `type:"string" enum:"EventType"` -} - -// String returns the string representation -func (s AuthEventType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthEventType) GoString() string { - return s.String() -} - -// SetChallengeResponses sets the ChallengeResponses field's value. -func (s *AuthEventType) SetChallengeResponses(v []*ChallengeResponseType) *AuthEventType { - s.ChallengeResponses = v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *AuthEventType) SetCreationDate(v time.Time) *AuthEventType { - s.CreationDate = &v - return s -} - -// SetEventContextData sets the EventContextData field's value. -func (s *AuthEventType) SetEventContextData(v *EventContextDataType) *AuthEventType { - s.EventContextData = v - return s -} - -// SetEventFeedback sets the EventFeedback field's value. -func (s *AuthEventType) SetEventFeedback(v *EventFeedbackType) *AuthEventType { - s.EventFeedback = v - return s -} - -// SetEventId sets the EventId field's value. -func (s *AuthEventType) SetEventId(v string) *AuthEventType { - s.EventId = &v - return s -} - -// SetEventResponse sets the EventResponse field's value. -func (s *AuthEventType) SetEventResponse(v string) *AuthEventType { - s.EventResponse = &v - return s -} - -// SetEventRisk sets the EventRisk field's value. -func (s *AuthEventType) SetEventRisk(v *EventRiskType) *AuthEventType { - s.EventRisk = v - return s -} - -// SetEventType sets the EventType field's value. -func (s *AuthEventType) SetEventType(v string) *AuthEventType { - s.EventType = &v - return s -} - -// The authentication result. -type AuthenticationResultType struct { - _ struct{} `type:"structure"` - - // The access token. - AccessToken *string `type:"string" sensitive:"true"` - - // The expiration period of the authentication result in seconds. - ExpiresIn *int64 `type:"integer"` - - // The ID token. - IdToken *string `type:"string" sensitive:"true"` - - // The new device metadata from an authentication result. - NewDeviceMetadata *NewDeviceMetadataType `type:"structure"` - - // The refresh token. - RefreshToken *string `type:"string" sensitive:"true"` - - // The token type. - TokenType *string `type:"string"` -} - -// String returns the string representation -func (s AuthenticationResultType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthenticationResultType) GoString() string { - return s.String() -} - -// SetAccessToken sets the AccessToken field's value. -func (s *AuthenticationResultType) SetAccessToken(v string) *AuthenticationResultType { - s.AccessToken = &v - return s -} - -// SetExpiresIn sets the ExpiresIn field's value. -func (s *AuthenticationResultType) SetExpiresIn(v int64) *AuthenticationResultType { - s.ExpiresIn = &v - return s -} - -// SetIdToken sets the IdToken field's value. -func (s *AuthenticationResultType) SetIdToken(v string) *AuthenticationResultType { - s.IdToken = &v - return s -} - -// SetNewDeviceMetadata sets the NewDeviceMetadata field's value. -func (s *AuthenticationResultType) SetNewDeviceMetadata(v *NewDeviceMetadataType) *AuthenticationResultType { - s.NewDeviceMetadata = v - return s -} - -// SetRefreshToken sets the RefreshToken field's value. -func (s *AuthenticationResultType) SetRefreshToken(v string) *AuthenticationResultType { - s.RefreshToken = &v - return s -} - -// SetTokenType sets the TokenType field's value. -func (s *AuthenticationResultType) SetTokenType(v string) *AuthenticationResultType { - s.TokenType = &v - return s -} - -// The challenge response type. -type ChallengeResponseType struct { - _ struct{} `type:"structure"` - - // The challenge name - ChallengeName *string `type:"string" enum:"ChallengeName"` - - // The challenge response. - ChallengeResponse *string `type:"string" enum:"ChallengeResponse"` -} - -// String returns the string representation -func (s ChallengeResponseType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChallengeResponseType) GoString() string { - return s.String() -} - -// SetChallengeName sets the ChallengeName field's value. -func (s *ChallengeResponseType) SetChallengeName(v string) *ChallengeResponseType { - s.ChallengeName = &v - return s -} - -// SetChallengeResponse sets the ChallengeResponse field's value. -func (s *ChallengeResponseType) SetChallengeResponse(v string) *ChallengeResponseType { - s.ChallengeResponse = &v - return s -} - -// Represents the request to change a user password. -type ChangePasswordInput struct { - _ struct{} `type:"structure"` - - // The access token. - // - // AccessToken is a required field - AccessToken *string `type:"string" required:"true" sensitive:"true"` - - // The old password. - // - // PreviousPassword is a required field - PreviousPassword *string `min:"6" type:"string" required:"true" sensitive:"true"` - - // The new password. - // - // ProposedPassword is a required field - ProposedPassword *string `min:"6" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s ChangePasswordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangePasswordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ChangePasswordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ChangePasswordInput"} - if s.AccessToken == nil { - invalidParams.Add(request.NewErrParamRequired("AccessToken")) - } - if s.PreviousPassword == nil { - invalidParams.Add(request.NewErrParamRequired("PreviousPassword")) - } - if s.PreviousPassword != nil && len(*s.PreviousPassword) < 6 { - invalidParams.Add(request.NewErrParamMinLen("PreviousPassword", 6)) - } - if s.ProposedPassword == nil { - invalidParams.Add(request.NewErrParamRequired("ProposedPassword")) - } - if s.ProposedPassword != nil && len(*s.ProposedPassword) < 6 { - invalidParams.Add(request.NewErrParamMinLen("ProposedPassword", 6)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *ChangePasswordInput) SetAccessToken(v string) *ChangePasswordInput { - s.AccessToken = &v - return s -} - -// SetPreviousPassword sets the PreviousPassword field's value. -func (s *ChangePasswordInput) SetPreviousPassword(v string) *ChangePasswordInput { - s.PreviousPassword = &v - return s -} - -// SetProposedPassword sets the ProposedPassword field's value. -func (s *ChangePasswordInput) SetProposedPassword(v string) *ChangePasswordInput { - s.ProposedPassword = &v - return s -} - -// The response from the server to the change password request. -type ChangePasswordOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ChangePasswordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangePasswordOutput) GoString() string { - return s.String() -} - -// The code delivery details being returned from the server. -type CodeDeliveryDetailsType struct { - _ struct{} `type:"structure"` - - // The attribute name. - AttributeName *string `min:"1" type:"string"` - - // The delivery medium (email message or phone number). - DeliveryMedium *string `type:"string" enum:"DeliveryMediumType"` - - // The destination for the code delivery details. - Destination *string `type:"string"` -} - -// String returns the string representation -func (s CodeDeliveryDetailsType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CodeDeliveryDetailsType) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *CodeDeliveryDetailsType) SetAttributeName(v string) *CodeDeliveryDetailsType { - s.AttributeName = &v - return s -} - -// SetDeliveryMedium sets the DeliveryMedium field's value. -func (s *CodeDeliveryDetailsType) SetDeliveryMedium(v string) *CodeDeliveryDetailsType { - s.DeliveryMedium = &v - return s -} - -// SetDestination sets the Destination field's value. -func (s *CodeDeliveryDetailsType) SetDestination(v string) *CodeDeliveryDetailsType { - s.Destination = &v - return s -} - -// The compromised credentials actions type -type CompromisedCredentialsActionsType struct { - _ struct{} `type:"structure"` - - // The event action. - // - // EventAction is a required field - EventAction *string `type:"string" required:"true" enum:"CompromisedCredentialsEventActionType"` -} - -// String returns the string representation -func (s CompromisedCredentialsActionsType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CompromisedCredentialsActionsType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CompromisedCredentialsActionsType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CompromisedCredentialsActionsType"} - if s.EventAction == nil { - invalidParams.Add(request.NewErrParamRequired("EventAction")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEventAction sets the EventAction field's value. -func (s *CompromisedCredentialsActionsType) SetEventAction(v string) *CompromisedCredentialsActionsType { - s.EventAction = &v - return s -} - -// The compromised credentials risk configuration type. -type CompromisedCredentialsRiskConfigurationType struct { - _ struct{} `type:"structure"` - - // The compromised credentials risk configuration actions. - // - // Actions is a required field - Actions *CompromisedCredentialsActionsType `type:"structure" required:"true"` - - // Perform the action for these events. The default is to perform all events - // if no event filter is specified. - EventFilter []*string `type:"list"` -} - -// String returns the string representation -func (s CompromisedCredentialsRiskConfigurationType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CompromisedCredentialsRiskConfigurationType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CompromisedCredentialsRiskConfigurationType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CompromisedCredentialsRiskConfigurationType"} - if s.Actions == nil { - invalidParams.Add(request.NewErrParamRequired("Actions")) - } - if s.Actions != nil { - if err := s.Actions.Validate(); err != nil { - invalidParams.AddNested("Actions", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActions sets the Actions field's value. -func (s *CompromisedCredentialsRiskConfigurationType) SetActions(v *CompromisedCredentialsActionsType) *CompromisedCredentialsRiskConfigurationType { - s.Actions = v - return s -} - -// SetEventFilter sets the EventFilter field's value. -func (s *CompromisedCredentialsRiskConfigurationType) SetEventFilter(v []*string) *CompromisedCredentialsRiskConfigurationType { - s.EventFilter = v - return s -} - -// Confirms the device request. -type ConfirmDeviceInput struct { - _ struct{} `type:"structure"` - - // The access token. - // - // AccessToken is a required field - AccessToken *string `type:"string" required:"true" sensitive:"true"` - - // The device key. - // - // DeviceKey is a required field - DeviceKey *string `min:"1" type:"string" required:"true"` - - // The device name. - DeviceName *string `min:"1" type:"string"` - - // The configuration of the device secret verifier. - DeviceSecretVerifierConfig *DeviceSecretVerifierConfigType `type:"structure"` -} - -// String returns the string representation -func (s ConfirmDeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmDeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfirmDeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfirmDeviceInput"} - if s.AccessToken == nil { - invalidParams.Add(request.NewErrParamRequired("AccessToken")) - } - if s.DeviceKey == nil { - invalidParams.Add(request.NewErrParamRequired("DeviceKey")) - } - if s.DeviceKey != nil && len(*s.DeviceKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeviceKey", 1)) - } - if s.DeviceName != nil && len(*s.DeviceName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeviceName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *ConfirmDeviceInput) SetAccessToken(v string) *ConfirmDeviceInput { - s.AccessToken = &v - return s -} - -// SetDeviceKey sets the DeviceKey field's value. -func (s *ConfirmDeviceInput) SetDeviceKey(v string) *ConfirmDeviceInput { - s.DeviceKey = &v - return s -} - -// SetDeviceName sets the DeviceName field's value. -func (s *ConfirmDeviceInput) SetDeviceName(v string) *ConfirmDeviceInput { - s.DeviceName = &v - return s -} - -// SetDeviceSecretVerifierConfig sets the DeviceSecretVerifierConfig field's value. -func (s *ConfirmDeviceInput) SetDeviceSecretVerifierConfig(v *DeviceSecretVerifierConfigType) *ConfirmDeviceInput { - s.DeviceSecretVerifierConfig = v - return s -} - -// Confirms the device response. -type ConfirmDeviceOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether the user confirmation is necessary to confirm the device - // response. - UserConfirmationNecessary *bool `type:"boolean"` -} - -// String returns the string representation -func (s ConfirmDeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmDeviceOutput) GoString() string { - return s.String() -} - -// SetUserConfirmationNecessary sets the UserConfirmationNecessary field's value. -func (s *ConfirmDeviceOutput) SetUserConfirmationNecessary(v bool) *ConfirmDeviceOutput { - s.UserConfirmationNecessary = &v - return s -} - -// The request representing the confirmation for a password reset. -type ConfirmForgotPasswordInput struct { - _ struct{} `type:"structure"` - - // The Amazon Pinpoint analytics metadata for collecting metrics for ConfirmForgotPassword - // calls. - AnalyticsMetadata *AnalyticsMetadataType `type:"structure"` - - // The app client ID of the app associated with the user pool. - // - // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The confirmation code sent by a user's request to retrieve a forgotten password. - // For more information, see - // - // ConfirmationCode is a required field - ConfirmationCode *string `min:"1" type:"string" required:"true"` - - // The password sent by a user's request to retrieve a forgotten password. - // - // Password is a required field - Password *string `min:"6" type:"string" required:"true" sensitive:"true"` - - // A keyed-hash message authentication code (HMAC) calculated using the secret - // key of a user pool client and username plus the client ID in the message. - SecretHash *string `min:"1" type:"string" sensitive:"true"` - - // Contextual data such as the user's device fingerprint, IP address, or location - // used for evaluating the risk of an unexpected event by Amazon Cognito advanced - // security. - UserContextData *UserContextDataType `type:"structure"` - - // The user name of the user for whom you want to enter a code to retrieve a - // forgotten password. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s ConfirmForgotPasswordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmForgotPasswordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfirmForgotPasswordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfirmForgotPasswordInput"} - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.ConfirmationCode == nil { - invalidParams.Add(request.NewErrParamRequired("ConfirmationCode")) - } - if s.ConfirmationCode != nil && len(*s.ConfirmationCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfirmationCode", 1)) - } - if s.Password == nil { - invalidParams.Add(request.NewErrParamRequired("Password")) - } - if s.Password != nil && len(*s.Password) < 6 { - invalidParams.Add(request.NewErrParamMinLen("Password", 6)) - } - if s.SecretHash != nil && len(*s.SecretHash) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretHash", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalyticsMetadata sets the AnalyticsMetadata field's value. -func (s *ConfirmForgotPasswordInput) SetAnalyticsMetadata(v *AnalyticsMetadataType) *ConfirmForgotPasswordInput { - s.AnalyticsMetadata = v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *ConfirmForgotPasswordInput) SetClientId(v string) *ConfirmForgotPasswordInput { - s.ClientId = &v - return s -} - -// SetConfirmationCode sets the ConfirmationCode field's value. -func (s *ConfirmForgotPasswordInput) SetConfirmationCode(v string) *ConfirmForgotPasswordInput { - s.ConfirmationCode = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *ConfirmForgotPasswordInput) SetPassword(v string) *ConfirmForgotPasswordInput { - s.Password = &v - return s -} - -// SetSecretHash sets the SecretHash field's value. -func (s *ConfirmForgotPasswordInput) SetSecretHash(v string) *ConfirmForgotPasswordInput { - s.SecretHash = &v - return s -} - -// SetUserContextData sets the UserContextData field's value. -func (s *ConfirmForgotPasswordInput) SetUserContextData(v *UserContextDataType) *ConfirmForgotPasswordInput { - s.UserContextData = v - return s -} - -// SetUsername sets the Username field's value. -func (s *ConfirmForgotPasswordInput) SetUsername(v string) *ConfirmForgotPasswordInput { - s.Username = &v - return s -} - -// The response from the server that results from a user's request to retrieve -// a forgotten password. -type ConfirmForgotPasswordOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ConfirmForgotPasswordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmForgotPasswordOutput) GoString() string { - return s.String() -} - -// Represents the request to confirm registration of a user. -type ConfirmSignUpInput struct { - _ struct{} `type:"structure"` - - // The Amazon Pinpoint analytics metadata for collecting metrics for ConfirmSignUp - // calls. - AnalyticsMetadata *AnalyticsMetadataType `type:"structure"` - - // The ID of the app client associated with the user pool. - // - // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The confirmation code sent by a user's request to confirm registration. - // - // ConfirmationCode is a required field - ConfirmationCode *string `min:"1" type:"string" required:"true"` - - // Boolean to be specified to force user confirmation irrespective of existing - // alias. By default set to False. If this parameter is set to True and the - // phone number/email used for sign up confirmation already exists as an alias - // with a different user, the API call will migrate the alias from the previous - // user to the newly created user being confirmed. If set to False, the API - // will throw an AliasExistsException error. - ForceAliasCreation *bool `type:"boolean"` - - // A keyed-hash message authentication code (HMAC) calculated using the secret - // key of a user pool client and username plus the client ID in the message. - SecretHash *string `min:"1" type:"string" sensitive:"true"` - - // Contextual data such as the user's device fingerprint, IP address, or location - // used for evaluating the risk of an unexpected event by Amazon Cognito advanced - // security. - UserContextData *UserContextDataType `type:"structure"` - - // The user name of the user whose registration you wish to confirm. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s ConfirmSignUpInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmSignUpInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfirmSignUpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfirmSignUpInput"} - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.ConfirmationCode == nil { - invalidParams.Add(request.NewErrParamRequired("ConfirmationCode")) - } - if s.ConfirmationCode != nil && len(*s.ConfirmationCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfirmationCode", 1)) - } - if s.SecretHash != nil && len(*s.SecretHash) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretHash", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalyticsMetadata sets the AnalyticsMetadata field's value. -func (s *ConfirmSignUpInput) SetAnalyticsMetadata(v *AnalyticsMetadataType) *ConfirmSignUpInput { - s.AnalyticsMetadata = v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *ConfirmSignUpInput) SetClientId(v string) *ConfirmSignUpInput { - s.ClientId = &v - return s -} - -// SetConfirmationCode sets the ConfirmationCode field's value. -func (s *ConfirmSignUpInput) SetConfirmationCode(v string) *ConfirmSignUpInput { - s.ConfirmationCode = &v - return s -} - -// SetForceAliasCreation sets the ForceAliasCreation field's value. -func (s *ConfirmSignUpInput) SetForceAliasCreation(v bool) *ConfirmSignUpInput { - s.ForceAliasCreation = &v - return s -} - -// SetSecretHash sets the SecretHash field's value. -func (s *ConfirmSignUpInput) SetSecretHash(v string) *ConfirmSignUpInput { - s.SecretHash = &v - return s -} - -// SetUserContextData sets the UserContextData field's value. -func (s *ConfirmSignUpInput) SetUserContextData(v *UserContextDataType) *ConfirmSignUpInput { - s.UserContextData = v - return s -} - -// SetUsername sets the Username field's value. -func (s *ConfirmSignUpInput) SetUsername(v string) *ConfirmSignUpInput { - s.Username = &v - return s -} - -// Represents the response from the server for the registration confirmation. -type ConfirmSignUpOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ConfirmSignUpOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmSignUpOutput) GoString() string { - return s.String() -} - -// Contextual user data type used for evaluating the risk of an unexpected event -// by Amazon Cognito advanced security. -type ContextDataType struct { - _ struct{} `type:"structure"` - - // Encoded data containing device fingerprinting details, collected using the - // Amazon Cognito context data collection library. - EncodedData *string `type:"string"` - - // HttpHeaders received on your server in same order. - // - // HttpHeaders is a required field - HttpHeaders []*HttpHeader `type:"list" required:"true"` - - // Source IP address of your user. - // - // IpAddress is a required field - IpAddress *string `type:"string" required:"true"` - - // Your server endpoint where this API is invoked. - // - // ServerName is a required field - ServerName *string `type:"string" required:"true"` - - // Your server path where this API is invoked. - // - // ServerPath is a required field - ServerPath *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ContextDataType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContextDataType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContextDataType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContextDataType"} - if s.HttpHeaders == nil { - invalidParams.Add(request.NewErrParamRequired("HttpHeaders")) - } - if s.IpAddress == nil { - invalidParams.Add(request.NewErrParamRequired("IpAddress")) - } - if s.ServerName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerName")) - } - if s.ServerPath == nil { - invalidParams.Add(request.NewErrParamRequired("ServerPath")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncodedData sets the EncodedData field's value. -func (s *ContextDataType) SetEncodedData(v string) *ContextDataType { - s.EncodedData = &v - return s -} - -// SetHttpHeaders sets the HttpHeaders field's value. -func (s *ContextDataType) SetHttpHeaders(v []*HttpHeader) *ContextDataType { - s.HttpHeaders = v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *ContextDataType) SetIpAddress(v string) *ContextDataType { - s.IpAddress = &v - return s -} - -// SetServerName sets the ServerName field's value. -func (s *ContextDataType) SetServerName(v string) *ContextDataType { - s.ServerName = &v - return s -} - -// SetServerPath sets the ServerPath field's value. -func (s *ContextDataType) SetServerPath(v string) *ContextDataType { - s.ServerPath = &v - return s -} - -type CreateGroupInput struct { - _ struct{} `type:"structure"` - - // A string containing the description of the group. - Description *string `type:"string"` - - // The name of the group. Must be unique. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // A nonnegative integer value that specifies the precedence of this group relative - // to the other groups that a user can belong to in the user pool. Zero is the - // highest precedence value. Groups with lower Precedence values take precedence - // over groups with higher or null Precedence values. If a user belongs to two - // or more groups, it is the group with the lowest precedence value whose role - // ARN will be used in the cognito:roles and cognito:preferred_role claims in - // the user's tokens. - // - // Two groups can have the same Precedence value. If this happens, neither group - // takes precedence over the other. If two groups with the same Precedence have - // the same role ARN, that role is used in the cognito:preferred_role claim - // in tokens for users in each group. If the two groups have different role - // ARNs, the cognito:preferred_role claim is not set in users' tokens. - // - // The default Precedence value is null. - Precedence *int64 `type:"integer"` - - // The role ARN for the group. - RoleArn *string `min:"20" type:"string"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// 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() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateGroupInput) SetDescription(v string) *CreateGroupInput { - s.Description = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *CreateGroupInput) SetGroupName(v string) *CreateGroupInput { - s.GroupName = &v - return s -} - -// SetPrecedence sets the Precedence field's value. -func (s *CreateGroupInput) SetPrecedence(v int64) *CreateGroupInput { - s.Precedence = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CreateGroupInput) SetRoleArn(v string) *CreateGroupInput { - s.RoleArn = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *CreateGroupInput) SetUserPoolId(v string) *CreateGroupInput { - s.UserPoolId = &v - return s -} - -type CreateGroupOutput struct { - _ struct{} `type:"structure"` - - // The group object for the group. - Group *GroupType `type:"structure"` -} - -// 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() -} - -// SetGroup sets the Group field's value. -func (s *CreateGroupOutput) SetGroup(v *GroupType) *CreateGroupOutput { - s.Group = v - return s -} - -type CreateIdentityProviderInput struct { - _ struct{} `type:"structure"` - - // A mapping of identity provider attributes to standard and custom user pool - // attributes. - AttributeMapping map[string]*string `type:"map"` - - // A list of identity provider identifiers. - IdpIdentifiers []*string `type:"list"` - - // The identity provider details, such as MetadataURL and MetadataFile. - // - // ProviderDetails is a required field - ProviderDetails map[string]*string `type:"map" required:"true"` - - // The identity provider name. - // - // ProviderName is a required field - ProviderName *string `min:"1" type:"string" required:"true"` - - // The identity provider type. - // - // ProviderType is a required field - ProviderType *string `type:"string" required:"true" enum:"IdentityProviderTypeType"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateIdentityProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIdentityProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateIdentityProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateIdentityProviderInput"} - if s.ProviderDetails == nil { - invalidParams.Add(request.NewErrParamRequired("ProviderDetails")) - } - if s.ProviderName == nil { - invalidParams.Add(request.NewErrParamRequired("ProviderName")) - } - if s.ProviderName != nil && len(*s.ProviderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProviderName", 1)) - } - if s.ProviderType == nil { - invalidParams.Add(request.NewErrParamRequired("ProviderType")) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeMapping sets the AttributeMapping field's value. -func (s *CreateIdentityProviderInput) SetAttributeMapping(v map[string]*string) *CreateIdentityProviderInput { - s.AttributeMapping = v - return s -} - -// SetIdpIdentifiers sets the IdpIdentifiers field's value. -func (s *CreateIdentityProviderInput) SetIdpIdentifiers(v []*string) *CreateIdentityProviderInput { - s.IdpIdentifiers = v - return s -} - -// SetProviderDetails sets the ProviderDetails field's value. -func (s *CreateIdentityProviderInput) SetProviderDetails(v map[string]*string) *CreateIdentityProviderInput { - s.ProviderDetails = v - return s -} - -// SetProviderName sets the ProviderName field's value. -func (s *CreateIdentityProviderInput) SetProviderName(v string) *CreateIdentityProviderInput { - s.ProviderName = &v - return s -} - -// SetProviderType sets the ProviderType field's value. -func (s *CreateIdentityProviderInput) SetProviderType(v string) *CreateIdentityProviderInput { - s.ProviderType = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *CreateIdentityProviderInput) SetUserPoolId(v string) *CreateIdentityProviderInput { - s.UserPoolId = &v - return s -} - -type CreateIdentityProviderOutput struct { - _ struct{} `type:"structure"` - - // The newly created identity provider object. - // - // IdentityProvider is a required field - IdentityProvider *IdentityProviderType `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateIdentityProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIdentityProviderOutput) GoString() string { - return s.String() -} - -// SetIdentityProvider sets the IdentityProvider field's value. -func (s *CreateIdentityProviderOutput) SetIdentityProvider(v *IdentityProviderType) *CreateIdentityProviderOutput { - s.IdentityProvider = v - return s -} - -type CreateResourceServerInput struct { - _ struct{} `type:"structure"` - - // A unique resource server identifier for the resource server. This could be - // an HTTPS endpoint where the resource server is located. For example, https://my-weather-api.example.com. - // - // Identifier is a required field - Identifier *string `min:"1" type:"string" required:"true"` - - // A friendly name for the resource server. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // A list of scopes. Each scope is map, where the keys are name and description. - Scopes []*ResourceServerScopeType `type:"list"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateResourceServerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResourceServerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateResourceServerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateResourceServerInput"} - if s.Identifier == nil { - invalidParams.Add(request.NewErrParamRequired("Identifier")) - } - if s.Identifier != nil && len(*s.Identifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Identifier", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Scopes != nil { - for i, v := range s.Scopes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Scopes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentifier sets the Identifier field's value. -func (s *CreateResourceServerInput) SetIdentifier(v string) *CreateResourceServerInput { - s.Identifier = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateResourceServerInput) SetName(v string) *CreateResourceServerInput { - s.Name = &v - return s -} - -// SetScopes sets the Scopes field's value. -func (s *CreateResourceServerInput) SetScopes(v []*ResourceServerScopeType) *CreateResourceServerInput { - s.Scopes = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *CreateResourceServerInput) SetUserPoolId(v string) *CreateResourceServerInput { - s.UserPoolId = &v - return s -} - -type CreateResourceServerOutput struct { - _ struct{} `type:"structure"` - - // The newly created resource server. - // - // ResourceServer is a required field - ResourceServer *ResourceServerType `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateResourceServerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResourceServerOutput) GoString() string { - return s.String() -} - -// SetResourceServer sets the ResourceServer field's value. -func (s *CreateResourceServerOutput) SetResourceServer(v *ResourceServerType) *CreateResourceServerOutput { - s.ResourceServer = v - return s -} - -// Represents the request to create the user import job. -type CreateUserImportJobInput struct { - _ struct{} `type:"structure"` - - // The role ARN for the Amazon CloudWatch Logging role for the user import job. - // - // CloudWatchLogsRoleArn is a required field - CloudWatchLogsRoleArn *string `min:"20" type:"string" required:"true"` - - // The job name for the user import job. - // - // JobName is a required field - JobName *string `min:"1" type:"string" required:"true"` - - // The user pool ID for the user pool that the users are being imported into. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateUserImportJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserImportJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateUserImportJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateUserImportJobInput"} - if s.CloudWatchLogsRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("CloudWatchLogsRoleArn")) - } - if s.CloudWatchLogsRoleArn != nil && len(*s.CloudWatchLogsRoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CloudWatchLogsRoleArn", 20)) - } - 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.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value. -func (s *CreateUserImportJobInput) SetCloudWatchLogsRoleArn(v string) *CreateUserImportJobInput { - s.CloudWatchLogsRoleArn = &v - return s -} - -// SetJobName sets the JobName field's value. -func (s *CreateUserImportJobInput) SetJobName(v string) *CreateUserImportJobInput { - s.JobName = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *CreateUserImportJobInput) SetUserPoolId(v string) *CreateUserImportJobInput { - s.UserPoolId = &v - return s -} - -// Represents the response from the server to the request to create the user -// import job. -type CreateUserImportJobOutput struct { - _ struct{} `type:"structure"` - - // The job object that represents the user import job. - UserImportJob *UserImportJobType `type:"structure"` -} - -// String returns the string representation -func (s CreateUserImportJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserImportJobOutput) GoString() string { - return s.String() -} - -// SetUserImportJob sets the UserImportJob field's value. -func (s *CreateUserImportJobOutput) SetUserImportJob(v *UserImportJobType) *CreateUserImportJobOutput { - s.UserImportJob = v - return s -} - -// Represents the request to create a user pool client. -type CreateUserPoolClientInput struct { - _ struct{} `type:"structure"` - - // Set to code to initiate a code grant flow, which provides an authorization - // code as the response. This code can be exchanged for access tokens with the - // token endpoint. - // - // Set to token to specify that the client should get the access token (and, - // optionally, ID token, based on scopes) directly. - AllowedOAuthFlows []*string `type:"list"` - - // Set to True if the client is allowed to follow the OAuth protocol when interacting - // with Cognito user pools. - AllowedOAuthFlowsUserPoolClient *bool `type:"boolean"` - - // A list of allowed OAuth scopes. Currently supported values are "phone", "email", - // "openid", and "Cognito". - AllowedOAuthScopes []*string `type:"list"` - - // The Amazon Pinpoint analytics configuration for collecting metrics for this - // user pool. - AnalyticsConfiguration *AnalyticsConfigurationType `type:"structure"` - - // A list of allowed redirect (callback) URLs for the identity providers. - // - // A redirect URI must: - // - // * Be an absolute URI. - // - // * Be registered with the authorization server. - // - // * Not include a fragment component. - // - // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). - // - // Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing - // purposes only. - // - // App callback URLs such as myapp://example are also supported. - CallbackURLs []*string `type:"list"` - - // The client name for the user pool client you would like to create. - // - // ClientName is a required field - ClientName *string `min:"1" type:"string" required:"true"` - - // The default redirect URI. Must be in the CallbackURLs list. - // - // A redirect URI must: - // - // * Be an absolute URI. - // - // * Be registered with the authorization server. - // - // * Not include a fragment component. - // - // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). - // - // Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing - // purposes only. - // - // App callback URLs such as myapp://example are also supported. - DefaultRedirectURI *string `min:"1" type:"string"` - - // The explicit authentication flows. - ExplicitAuthFlows []*string `type:"list"` - - // Boolean to specify whether you want to generate a secret for the user pool - // client being created. - GenerateSecret *bool `type:"boolean"` - - // A list of allowed logout URLs for the identity providers. - LogoutURLs []*string `type:"list"` - - // The read attributes. - ReadAttributes []*string `type:"list"` - - // The time limit, in days, after which the refresh token is no longer valid - // and cannot be used. - RefreshTokenValidity *int64 `type:"integer"` - - // A list of provider names for the identity providers that are supported on - // this client. - SupportedIdentityProviders []*string `type:"list"` - - // The user pool ID for the user pool where you want to create a user pool client. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user pool attributes that the app client can write to. - // - // If your app client allows users to sign in through an identity provider, - // this array must include all attributes that are mapped to identity provider - // attributes. Amazon Cognito updates mapped attributes when users sign in to - // your application through an identity provider. If your app client lacks write - // access to a mapped attribute, Amazon Cognito throws an error when it attempts - // to update the attribute. For more information, see Specifying Identity Provider - // Attribute Mappings for Your User Pool (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html). - WriteAttributes []*string `type:"list"` -} - -// String returns the string representation -func (s CreateUserPoolClientInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserPoolClientInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateUserPoolClientInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateUserPoolClientInput"} - if s.ClientName == nil { - invalidParams.Add(request.NewErrParamRequired("ClientName")) - } - if s.ClientName != nil && len(*s.ClientName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientName", 1)) - } - if s.DefaultRedirectURI != nil && len(*s.DefaultRedirectURI) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DefaultRedirectURI", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.AnalyticsConfiguration != nil { - if err := s.AnalyticsConfiguration.Validate(); err != nil { - invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowedOAuthFlows sets the AllowedOAuthFlows field's value. -func (s *CreateUserPoolClientInput) SetAllowedOAuthFlows(v []*string) *CreateUserPoolClientInput { - s.AllowedOAuthFlows = v - return s -} - -// SetAllowedOAuthFlowsUserPoolClient sets the AllowedOAuthFlowsUserPoolClient field's value. -func (s *CreateUserPoolClientInput) SetAllowedOAuthFlowsUserPoolClient(v bool) *CreateUserPoolClientInput { - s.AllowedOAuthFlowsUserPoolClient = &v - return s -} - -// SetAllowedOAuthScopes sets the AllowedOAuthScopes field's value. -func (s *CreateUserPoolClientInput) SetAllowedOAuthScopes(v []*string) *CreateUserPoolClientInput { - s.AllowedOAuthScopes = v - return s -} - -// SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value. -func (s *CreateUserPoolClientInput) SetAnalyticsConfiguration(v *AnalyticsConfigurationType) *CreateUserPoolClientInput { - s.AnalyticsConfiguration = v - return s -} - -// SetCallbackURLs sets the CallbackURLs field's value. -func (s *CreateUserPoolClientInput) SetCallbackURLs(v []*string) *CreateUserPoolClientInput { - s.CallbackURLs = v - return s -} - -// SetClientName sets the ClientName field's value. -func (s *CreateUserPoolClientInput) SetClientName(v string) *CreateUserPoolClientInput { - s.ClientName = &v - return s -} - -// SetDefaultRedirectURI sets the DefaultRedirectURI field's value. -func (s *CreateUserPoolClientInput) SetDefaultRedirectURI(v string) *CreateUserPoolClientInput { - s.DefaultRedirectURI = &v - return s -} - -// SetExplicitAuthFlows sets the ExplicitAuthFlows field's value. -func (s *CreateUserPoolClientInput) SetExplicitAuthFlows(v []*string) *CreateUserPoolClientInput { - s.ExplicitAuthFlows = v - return s -} - -// SetGenerateSecret sets the GenerateSecret field's value. -func (s *CreateUserPoolClientInput) SetGenerateSecret(v bool) *CreateUserPoolClientInput { - s.GenerateSecret = &v - return s -} - -// SetLogoutURLs sets the LogoutURLs field's value. -func (s *CreateUserPoolClientInput) SetLogoutURLs(v []*string) *CreateUserPoolClientInput { - s.LogoutURLs = v - return s -} - -// SetReadAttributes sets the ReadAttributes field's value. -func (s *CreateUserPoolClientInput) SetReadAttributes(v []*string) *CreateUserPoolClientInput { - s.ReadAttributes = v - return s -} - -// SetRefreshTokenValidity sets the RefreshTokenValidity field's value. -func (s *CreateUserPoolClientInput) SetRefreshTokenValidity(v int64) *CreateUserPoolClientInput { - s.RefreshTokenValidity = &v - return s -} - -// SetSupportedIdentityProviders sets the SupportedIdentityProviders field's value. -func (s *CreateUserPoolClientInput) SetSupportedIdentityProviders(v []*string) *CreateUserPoolClientInput { - s.SupportedIdentityProviders = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *CreateUserPoolClientInput) SetUserPoolId(v string) *CreateUserPoolClientInput { - s.UserPoolId = &v - return s -} - -// SetWriteAttributes sets the WriteAttributes field's value. -func (s *CreateUserPoolClientInput) SetWriteAttributes(v []*string) *CreateUserPoolClientInput { - s.WriteAttributes = v - return s -} - -// Represents the response from the server to create a user pool client. -type CreateUserPoolClientOutput struct { - _ struct{} `type:"structure"` - - // The user pool client that was just created. - UserPoolClient *UserPoolClientType `type:"structure"` -} - -// String returns the string representation -func (s CreateUserPoolClientOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserPoolClientOutput) GoString() string { - return s.String() -} - -// SetUserPoolClient sets the UserPoolClient field's value. -func (s *CreateUserPoolClientOutput) SetUserPoolClient(v *UserPoolClientType) *CreateUserPoolClientOutput { - s.UserPoolClient = v - return s -} - -type CreateUserPoolDomainInput struct { - _ struct{} `type:"structure"` - - // The configuration for a custom domain that hosts the sign-up and sign-in - // webpages for your application. - // - // Provide this parameter only if you want to use a custom domain for your user - // pool. Otherwise, you can exclude this parameter and use the Amazon Cognito - // hosted domain instead. - // - // For more information about the hosted domain and custom domains, see Configuring - // a User Pool Domain (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-assign-domain.html). - CustomDomainConfig *CustomDomainConfigType `type:"structure"` - - // The domain string. - // - // Domain is a required field - Domain *string `min:"1" type:"string" required:"true"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateUserPoolDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserPoolDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateUserPoolDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateUserPoolDomainInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.CustomDomainConfig != nil { - if err := s.CustomDomainConfig.Validate(); err != nil { - invalidParams.AddNested("CustomDomainConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomDomainConfig sets the CustomDomainConfig field's value. -func (s *CreateUserPoolDomainInput) SetCustomDomainConfig(v *CustomDomainConfigType) *CreateUserPoolDomainInput { - s.CustomDomainConfig = v - return s -} - -// SetDomain sets the Domain field's value. -func (s *CreateUserPoolDomainInput) SetDomain(v string) *CreateUserPoolDomainInput { - s.Domain = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *CreateUserPoolDomainInput) SetUserPoolId(v string) *CreateUserPoolDomainInput { - s.UserPoolId = &v - return s -} - -type CreateUserPoolDomainOutput struct { - _ struct{} `type:"structure"` - - // The Amazon CloudFront endpoint that you use as the target of the alias that - // you set up with your Domain Name Service (DNS) provider. - CloudFrontDomain *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateUserPoolDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserPoolDomainOutput) GoString() string { - return s.String() -} - -// SetCloudFrontDomain sets the CloudFrontDomain field's value. -func (s *CreateUserPoolDomainOutput) SetCloudFrontDomain(v string) *CreateUserPoolDomainOutput { - s.CloudFrontDomain = &v - return s -} - -// Represents the request to create a user pool. -type CreateUserPoolInput struct { - _ struct{} `type:"structure"` - - // The configuration for AdminCreateUser requests. - AdminCreateUserConfig *AdminCreateUserConfigType `type:"structure"` - - // Attributes supported as an alias for this user pool. Possible values: phone_number, - // email, or preferred_username. - AliasAttributes []*string `type:"list"` - - // The attributes to be auto-verified. Possible values: email, phone_number. - AutoVerifiedAttributes []*string `type:"list"` - - // The device configuration. - DeviceConfiguration *DeviceConfigurationType `type:"structure"` - - // The email configuration. - EmailConfiguration *EmailConfigurationType `type:"structure"` - - // A string representing the email verification message. - EmailVerificationMessage *string `min:"6" type:"string"` - - // A string representing the email verification subject. - EmailVerificationSubject *string `min:"1" type:"string"` - - // The Lambda trigger configuration information for the new user pool. - // - // In a push model, event sources (such as Amazon S3 and custom applications) - // need permission to invoke a function. So you will need to make an extra call - // to add permission for these event sources to invoke your Lambda function. - // - // For more information on using the Lambda API to add permission, see AddPermission - // (https://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html). - // - // For adding permission using the AWS CLI, see add-permission (https://docs.aws.amazon.com/cli/latest/reference/lambda/add-permission.html). - LambdaConfig *LambdaConfigType `type:"structure"` - - // Specifies MFA configuration details. - MfaConfiguration *string `type:"string" enum:"UserPoolMfaType"` - - // The policies associated with the new user pool. - Policies *UserPoolPolicyType `type:"structure"` - - // A string used to name the user pool. - // - // PoolName is a required field - PoolName *string `min:"1" type:"string" required:"true"` - - // An array of schema attributes for the new user pool. These attributes can - // be standard or custom attributes. - Schema []*SchemaAttributeType `min:"1" type:"list"` - - // A string representing the SMS authentication message. - SmsAuthenticationMessage *string `min:"6" type:"string"` - - // The SMS configuration. - SmsConfiguration *SmsConfigurationType `type:"structure"` - - // A string representing the SMS verification message. - SmsVerificationMessage *string `min:"6" type:"string"` - - // Used to enable advanced security risk detection. Set the key AdvancedSecurityMode - // to the value "AUDIT". - UserPoolAddOns *UserPoolAddOnsType `type:"structure"` - - // The cost allocation tags for the user pool. For more information, see Adding - // Cost Allocation Tags to Your User Pool (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-cost-allocation-tagging.html) - UserPoolTags map[string]*string `type:"map"` - - // Specifies whether email addresses or phone numbers can be specified as usernames - // when a user signs up. - UsernameAttributes []*string `type:"list"` - - // The template for the verification message that the user sees when the app - // requests permission to access the user's information. - VerificationMessageTemplate *VerificationMessageTemplateType `type:"structure"` -} - -// String returns the string representation -func (s CreateUserPoolInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserPoolInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateUserPoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateUserPoolInput"} - if s.EmailVerificationMessage != nil && len(*s.EmailVerificationMessage) < 6 { - invalidParams.Add(request.NewErrParamMinLen("EmailVerificationMessage", 6)) - } - if s.EmailVerificationSubject != nil && len(*s.EmailVerificationSubject) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EmailVerificationSubject", 1)) - } - if s.PoolName == nil { - invalidParams.Add(request.NewErrParamRequired("PoolName")) - } - if s.PoolName != nil && len(*s.PoolName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PoolName", 1)) - } - if s.Schema != nil && len(s.Schema) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Schema", 1)) - } - if s.SmsAuthenticationMessage != nil && len(*s.SmsAuthenticationMessage) < 6 { - invalidParams.Add(request.NewErrParamMinLen("SmsAuthenticationMessage", 6)) - } - if s.SmsVerificationMessage != nil && len(*s.SmsVerificationMessage) < 6 { - invalidParams.Add(request.NewErrParamMinLen("SmsVerificationMessage", 6)) - } - if s.AdminCreateUserConfig != nil { - if err := s.AdminCreateUserConfig.Validate(); err != nil { - invalidParams.AddNested("AdminCreateUserConfig", err.(request.ErrInvalidParams)) - } - } - if s.EmailConfiguration != nil { - if err := s.EmailConfiguration.Validate(); err != nil { - invalidParams.AddNested("EmailConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.LambdaConfig != nil { - if err := s.LambdaConfig.Validate(); err != nil { - invalidParams.AddNested("LambdaConfig", err.(request.ErrInvalidParams)) - } - } - if s.Policies != nil { - if err := s.Policies.Validate(); err != nil { - invalidParams.AddNested("Policies", err.(request.ErrInvalidParams)) - } - } - if s.Schema != nil { - for i, v := range s.Schema { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Schema", i), err.(request.ErrInvalidParams)) - } - } - } - if s.SmsConfiguration != nil { - if err := s.SmsConfiguration.Validate(); err != nil { - invalidParams.AddNested("SmsConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.UserPoolAddOns != nil { - if err := s.UserPoolAddOns.Validate(); err != nil { - invalidParams.AddNested("UserPoolAddOns", err.(request.ErrInvalidParams)) - } - } - if s.VerificationMessageTemplate != nil { - if err := s.VerificationMessageTemplate.Validate(); err != nil { - invalidParams.AddNested("VerificationMessageTemplate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdminCreateUserConfig sets the AdminCreateUserConfig field's value. -func (s *CreateUserPoolInput) SetAdminCreateUserConfig(v *AdminCreateUserConfigType) *CreateUserPoolInput { - s.AdminCreateUserConfig = v - return s -} - -// SetAliasAttributes sets the AliasAttributes field's value. -func (s *CreateUserPoolInput) SetAliasAttributes(v []*string) *CreateUserPoolInput { - s.AliasAttributes = v - return s -} - -// SetAutoVerifiedAttributes sets the AutoVerifiedAttributes field's value. -func (s *CreateUserPoolInput) SetAutoVerifiedAttributes(v []*string) *CreateUserPoolInput { - s.AutoVerifiedAttributes = v - return s -} - -// SetDeviceConfiguration sets the DeviceConfiguration field's value. -func (s *CreateUserPoolInput) SetDeviceConfiguration(v *DeviceConfigurationType) *CreateUserPoolInput { - s.DeviceConfiguration = v - return s -} - -// SetEmailConfiguration sets the EmailConfiguration field's value. -func (s *CreateUserPoolInput) SetEmailConfiguration(v *EmailConfigurationType) *CreateUserPoolInput { - s.EmailConfiguration = v - return s -} - -// SetEmailVerificationMessage sets the EmailVerificationMessage field's value. -func (s *CreateUserPoolInput) SetEmailVerificationMessage(v string) *CreateUserPoolInput { - s.EmailVerificationMessage = &v - return s -} - -// SetEmailVerificationSubject sets the EmailVerificationSubject field's value. -func (s *CreateUserPoolInput) SetEmailVerificationSubject(v string) *CreateUserPoolInput { - s.EmailVerificationSubject = &v - return s -} - -// SetLambdaConfig sets the LambdaConfig field's value. -func (s *CreateUserPoolInput) SetLambdaConfig(v *LambdaConfigType) *CreateUserPoolInput { - s.LambdaConfig = v - return s -} - -// SetMfaConfiguration sets the MfaConfiguration field's value. -func (s *CreateUserPoolInput) SetMfaConfiguration(v string) *CreateUserPoolInput { - s.MfaConfiguration = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *CreateUserPoolInput) SetPolicies(v *UserPoolPolicyType) *CreateUserPoolInput { - s.Policies = v - return s -} - -// SetPoolName sets the PoolName field's value. -func (s *CreateUserPoolInput) SetPoolName(v string) *CreateUserPoolInput { - s.PoolName = &v - return s -} - -// SetSchema sets the Schema field's value. -func (s *CreateUserPoolInput) SetSchema(v []*SchemaAttributeType) *CreateUserPoolInput { - s.Schema = v - return s -} - -// SetSmsAuthenticationMessage sets the SmsAuthenticationMessage field's value. -func (s *CreateUserPoolInput) SetSmsAuthenticationMessage(v string) *CreateUserPoolInput { - s.SmsAuthenticationMessage = &v - return s -} - -// SetSmsConfiguration sets the SmsConfiguration field's value. -func (s *CreateUserPoolInput) SetSmsConfiguration(v *SmsConfigurationType) *CreateUserPoolInput { - s.SmsConfiguration = v - return s -} - -// SetSmsVerificationMessage sets the SmsVerificationMessage field's value. -func (s *CreateUserPoolInput) SetSmsVerificationMessage(v string) *CreateUserPoolInput { - s.SmsVerificationMessage = &v - return s -} - -// SetUserPoolAddOns sets the UserPoolAddOns field's value. -func (s *CreateUserPoolInput) SetUserPoolAddOns(v *UserPoolAddOnsType) *CreateUserPoolInput { - s.UserPoolAddOns = v - return s -} - -// SetUserPoolTags sets the UserPoolTags field's value. -func (s *CreateUserPoolInput) SetUserPoolTags(v map[string]*string) *CreateUserPoolInput { - s.UserPoolTags = v - return s -} - -// SetUsernameAttributes sets the UsernameAttributes field's value. -func (s *CreateUserPoolInput) SetUsernameAttributes(v []*string) *CreateUserPoolInput { - s.UsernameAttributes = v - return s -} - -// SetVerificationMessageTemplate sets the VerificationMessageTemplate field's value. -func (s *CreateUserPoolInput) SetVerificationMessageTemplate(v *VerificationMessageTemplateType) *CreateUserPoolInput { - s.VerificationMessageTemplate = v - return s -} - -// Represents the response from the server for the request to create a user -// pool. -type CreateUserPoolOutput struct { - _ struct{} `type:"structure"` - - // A container for the user pool details. - UserPool *UserPoolType `type:"structure"` -} - -// String returns the string representation -func (s CreateUserPoolOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserPoolOutput) GoString() string { - return s.String() -} - -// SetUserPool sets the UserPool field's value. -func (s *CreateUserPoolOutput) SetUserPool(v *UserPoolType) *CreateUserPoolOutput { - s.UserPool = v - return s -} - -// The configuration for a custom domain that hosts the sign-up and sign-in -// webpages for your application. -type CustomDomainConfigType struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of an AWS Certificate Manager SSL certificate. - // You use this certificate for the subdomain of your custom domain. - // - // CertificateArn is a required field - CertificateArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s CustomDomainConfigType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CustomDomainConfigType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomDomainConfigType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomDomainConfigType"} - if s.CertificateArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateArn")) - } - if s.CertificateArn != nil && len(*s.CertificateArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *CustomDomainConfigType) SetCertificateArn(v string) *CustomDomainConfigType { - s.CertificateArn = &v - return s -} - -type DeleteGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the group. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" 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.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *DeleteGroupInput) SetGroupName(v string) *DeleteGroupInput { - s.GroupName = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *DeleteGroupInput) SetUserPoolId(v string) *DeleteGroupInput { - s.UserPoolId = &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 DeleteIdentityProviderInput struct { - _ struct{} `type:"structure"` - - // The identity provider name. - // - // ProviderName is a required field - ProviderName *string `min:"1" type:"string" required:"true"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteIdentityProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIdentityProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIdentityProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIdentityProviderInput"} - if s.ProviderName == nil { - invalidParams.Add(request.NewErrParamRequired("ProviderName")) - } - if s.ProviderName != nil && len(*s.ProviderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProviderName", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetProviderName sets the ProviderName field's value. -func (s *DeleteIdentityProviderInput) SetProviderName(v string) *DeleteIdentityProviderInput { - s.ProviderName = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *DeleteIdentityProviderInput) SetUserPoolId(v string) *DeleteIdentityProviderInput { - s.UserPoolId = &v - return s -} - -type DeleteIdentityProviderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteIdentityProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIdentityProviderOutput) GoString() string { - return s.String() -} - -type DeleteResourceServerInput struct { - _ struct{} `type:"structure"` - - // The identifier for the resource server. - // - // Identifier is a required field - Identifier *string `min:"1" type:"string" required:"true"` - - // The user pool ID for the user pool that hosts the resource server. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteResourceServerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResourceServerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteResourceServerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteResourceServerInput"} - if s.Identifier == nil { - invalidParams.Add(request.NewErrParamRequired("Identifier")) - } - if s.Identifier != nil && len(*s.Identifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Identifier", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentifier sets the Identifier field's value. -func (s *DeleteResourceServerInput) SetIdentifier(v string) *DeleteResourceServerInput { - s.Identifier = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *DeleteResourceServerInput) SetUserPoolId(v string) *DeleteResourceServerInput { - s.UserPoolId = &v - return s -} - -type DeleteResourceServerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteResourceServerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResourceServerOutput) GoString() string { - return s.String() -} - -// Represents the request to delete user attributes. -type DeleteUserAttributesInput struct { - _ struct{} `type:"structure"` - - // The access token used in the request to delete user attributes. - // - // AccessToken is a required field - AccessToken *string `type:"string" required:"true" sensitive:"true"` - - // An array of strings representing the user attribute names you wish to delete. - // - // For custom attributes, you must prepend the custom: prefix to the attribute - // name. - // - // UserAttributeNames is a required field - UserAttributeNames []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteUserAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserAttributesInput"} - if s.AccessToken == nil { - invalidParams.Add(request.NewErrParamRequired("AccessToken")) - } - if s.UserAttributeNames == nil { - invalidParams.Add(request.NewErrParamRequired("UserAttributeNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *DeleteUserAttributesInput) SetAccessToken(v string) *DeleteUserAttributesInput { - s.AccessToken = &v - return s -} - -// SetUserAttributeNames sets the UserAttributeNames field's value. -func (s *DeleteUserAttributesInput) SetUserAttributeNames(v []*string) *DeleteUserAttributesInput { - s.UserAttributeNames = v - return s -} - -// Represents the response from the server to delete user attributes. -type DeleteUserAttributesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteUserAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserAttributesOutput) GoString() string { - return s.String() -} - -// Represents the request to delete a user. -type DeleteUserInput struct { - _ struct{} `type:"structure"` - - // The access token from a request to delete a user. - // - // AccessToken is a required field - AccessToken *string `type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s DeleteUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserInput"} - if s.AccessToken == nil { - invalidParams.Add(request.NewErrParamRequired("AccessToken")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *DeleteUserInput) SetAccessToken(v string) *DeleteUserInput { - s.AccessToken = &v - return s -} - -type DeleteUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserOutput) GoString() string { - return s.String() -} - -// Represents the request to delete a user pool client. -type DeleteUserPoolClientInput struct { - _ struct{} `type:"structure"` - - // The app client ID of the app associated with the user pool. - // - // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The user pool ID for the user pool where you want to delete the client. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteUserPoolClientInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserPoolClientInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserPoolClientInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserPoolClientInput"} - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientId sets the ClientId field's value. -func (s *DeleteUserPoolClientInput) SetClientId(v string) *DeleteUserPoolClientInput { - s.ClientId = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *DeleteUserPoolClientInput) SetUserPoolId(v string) *DeleteUserPoolClientInput { - s.UserPoolId = &v - return s -} - -type DeleteUserPoolClientOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteUserPoolClientOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserPoolClientOutput) GoString() string { - return s.String() -} - -type DeleteUserPoolDomainInput struct { - _ struct{} `type:"structure"` - - // The domain string. - // - // Domain is a required field - Domain *string `min:"1" type:"string" required:"true"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteUserPoolDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserPoolDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserPoolDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserPoolDomainInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *DeleteUserPoolDomainInput) SetDomain(v string) *DeleteUserPoolDomainInput { - s.Domain = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *DeleteUserPoolDomainInput) SetUserPoolId(v string) *DeleteUserPoolDomainInput { - s.UserPoolId = &v - return s -} - -type DeleteUserPoolDomainOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteUserPoolDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserPoolDomainOutput) GoString() string { - return s.String() -} - -// Represents the request to delete a user pool. -type DeleteUserPoolInput struct { - _ struct{} `type:"structure"` - - // The user pool ID for the user pool you want to delete. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteUserPoolInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserPoolInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserPoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserPoolInput"} - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *DeleteUserPoolInput) SetUserPoolId(v string) *DeleteUserPoolInput { - s.UserPoolId = &v - return s -} - -type DeleteUserPoolOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteUserPoolOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserPoolOutput) GoString() string { - return s.String() -} - -type DescribeIdentityProviderInput struct { - _ struct{} `type:"structure"` - - // The identity provider name. - // - // ProviderName is a required field - ProviderName *string `min:"1" type:"string" required:"true"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeIdentityProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIdentityProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeIdentityProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityProviderInput"} - if s.ProviderName == nil { - invalidParams.Add(request.NewErrParamRequired("ProviderName")) - } - if s.ProviderName != nil && len(*s.ProviderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProviderName", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetProviderName sets the ProviderName field's value. -func (s *DescribeIdentityProviderInput) SetProviderName(v string) *DescribeIdentityProviderInput { - s.ProviderName = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *DescribeIdentityProviderInput) SetUserPoolId(v string) *DescribeIdentityProviderInput { - s.UserPoolId = &v - return s -} - -type DescribeIdentityProviderOutput struct { - _ struct{} `type:"structure"` - - // The identity provider that was deleted. - // - // IdentityProvider is a required field - IdentityProvider *IdentityProviderType `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeIdentityProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIdentityProviderOutput) GoString() string { - return s.String() -} - -// SetIdentityProvider sets the IdentityProvider field's value. -func (s *DescribeIdentityProviderOutput) SetIdentityProvider(v *IdentityProviderType) *DescribeIdentityProviderOutput { - s.IdentityProvider = v - return s -} - -type DescribeResourceServerInput struct { - _ struct{} `type:"structure"` - - // The identifier for the resource server - // - // Identifier is a required field - Identifier *string `min:"1" type:"string" required:"true"` - - // The user pool ID for the user pool that hosts the resource server. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeResourceServerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeResourceServerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeResourceServerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeResourceServerInput"} - if s.Identifier == nil { - invalidParams.Add(request.NewErrParamRequired("Identifier")) - } - if s.Identifier != nil && len(*s.Identifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Identifier", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentifier sets the Identifier field's value. -func (s *DescribeResourceServerInput) SetIdentifier(v string) *DescribeResourceServerInput { - s.Identifier = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *DescribeResourceServerInput) SetUserPoolId(v string) *DescribeResourceServerInput { - s.UserPoolId = &v - return s -} - -type DescribeResourceServerOutput struct { - _ struct{} `type:"structure"` - - // The resource server. - // - // ResourceServer is a required field - ResourceServer *ResourceServerType `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeResourceServerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeResourceServerOutput) GoString() string { - return s.String() -} - -// SetResourceServer sets the ResourceServer field's value. -func (s *DescribeResourceServerOutput) SetResourceServer(v *ResourceServerType) *DescribeResourceServerOutput { - s.ResourceServer = v - return s -} - -type DescribeRiskConfigurationInput struct { - _ struct{} `type:"structure"` - - // The app client ID. - ClientId *string `min:"1" type:"string" sensitive:"true"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeRiskConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRiskConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRiskConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRiskConfigurationInput"} - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientId sets the ClientId field's value. -func (s *DescribeRiskConfigurationInput) SetClientId(v string) *DescribeRiskConfigurationInput { - s.ClientId = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *DescribeRiskConfigurationInput) SetUserPoolId(v string) *DescribeRiskConfigurationInput { - s.UserPoolId = &v - return s -} - -type DescribeRiskConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The risk configuration. - // - // RiskConfiguration is a required field - RiskConfiguration *RiskConfigurationType `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeRiskConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRiskConfigurationOutput) GoString() string { - return s.String() -} - -// SetRiskConfiguration sets the RiskConfiguration field's value. -func (s *DescribeRiskConfigurationOutput) SetRiskConfiguration(v *RiskConfigurationType) *DescribeRiskConfigurationOutput { - s.RiskConfiguration = v - return s -} - -// Represents the request to describe the user import job. -type DescribeUserImportJobInput struct { - _ struct{} `type:"structure"` - - // The job ID for the user import job. - // - // JobId is a required field - JobId *string `min:"1" type:"string" required:"true"` - - // The user pool ID for the user pool that the users are being imported into. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeUserImportJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUserImportJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeUserImportJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeUserImportJobInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobId sets the JobId field's value. -func (s *DescribeUserImportJobInput) SetJobId(v string) *DescribeUserImportJobInput { - s.JobId = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *DescribeUserImportJobInput) SetUserPoolId(v string) *DescribeUserImportJobInput { - s.UserPoolId = &v - return s -} - -// Represents the response from the server to the request to describe the user -// import job. -type DescribeUserImportJobOutput struct { - _ struct{} `type:"structure"` - - // The job object that represents the user import job. - UserImportJob *UserImportJobType `type:"structure"` -} - -// String returns the string representation -func (s DescribeUserImportJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUserImportJobOutput) GoString() string { - return s.String() -} - -// SetUserImportJob sets the UserImportJob field's value. -func (s *DescribeUserImportJobOutput) SetUserImportJob(v *UserImportJobType) *DescribeUserImportJobOutput { - s.UserImportJob = v - return s -} - -// Represents the request to describe a user pool client. -type DescribeUserPoolClientInput struct { - _ struct{} `type:"structure"` - - // The app client ID of the app associated with the user pool. - // - // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The user pool ID for the user pool you want to describe. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeUserPoolClientInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUserPoolClientInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeUserPoolClientInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeUserPoolClientInput"} - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientId sets the ClientId field's value. -func (s *DescribeUserPoolClientInput) SetClientId(v string) *DescribeUserPoolClientInput { - s.ClientId = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *DescribeUserPoolClientInput) SetUserPoolId(v string) *DescribeUserPoolClientInput { - s.UserPoolId = &v - return s -} - -// Represents the response from the server from a request to describe the user -// pool client. -type DescribeUserPoolClientOutput struct { - _ struct{} `type:"structure"` - - // The user pool client from a server response to describe the user pool client. - UserPoolClient *UserPoolClientType `type:"structure"` -} - -// String returns the string representation -func (s DescribeUserPoolClientOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUserPoolClientOutput) GoString() string { - return s.String() -} - -// SetUserPoolClient sets the UserPoolClient field's value. -func (s *DescribeUserPoolClientOutput) SetUserPoolClient(v *UserPoolClientType) *DescribeUserPoolClientOutput { - s.UserPoolClient = v - return s -} - -type DescribeUserPoolDomainInput struct { - _ struct{} `type:"structure"` - - // The domain string. - // - // Domain is a required field - Domain *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeUserPoolDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUserPoolDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeUserPoolDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeUserPoolDomainInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *DescribeUserPoolDomainInput) SetDomain(v string) *DescribeUserPoolDomainInput { - s.Domain = &v - return s -} - -type DescribeUserPoolDomainOutput struct { - _ struct{} `type:"structure"` - - // A domain description object containing information about the domain. - DomainDescription *DomainDescriptionType `type:"structure"` -} - -// String returns the string representation -func (s DescribeUserPoolDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUserPoolDomainOutput) GoString() string { - return s.String() -} - -// SetDomainDescription sets the DomainDescription field's value. -func (s *DescribeUserPoolDomainOutput) SetDomainDescription(v *DomainDescriptionType) *DescribeUserPoolDomainOutput { - s.DomainDescription = v - return s -} - -// Represents the request to describe the user pool. -type DescribeUserPoolInput struct { - _ struct{} `type:"structure"` - - // The user pool ID for the user pool you want to describe. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeUserPoolInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUserPoolInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeUserPoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeUserPoolInput"} - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *DescribeUserPoolInput) SetUserPoolId(v string) *DescribeUserPoolInput { - s.UserPoolId = &v - return s -} - -// Represents the response to describe the user pool. -type DescribeUserPoolOutput struct { - _ struct{} `type:"structure"` - - // The container of metadata returned by the server to describe the pool. - UserPool *UserPoolType `type:"structure"` -} - -// String returns the string representation -func (s DescribeUserPoolOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUserPoolOutput) GoString() string { - return s.String() -} - -// SetUserPool sets the UserPool field's value. -func (s *DescribeUserPoolOutput) SetUserPool(v *UserPoolType) *DescribeUserPoolOutput { - s.UserPool = v - return s -} - -// The configuration for the user pool's device tracking. -type DeviceConfigurationType struct { - _ struct{} `type:"structure"` - - // Indicates whether a challenge is required on a new device. Only applicable - // to a new device. - ChallengeRequiredOnNewDevice *bool `type:"boolean"` - - // If true, a device is only remembered on user prompt. - DeviceOnlyRememberedOnUserPrompt *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeviceConfigurationType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeviceConfigurationType) GoString() string { - return s.String() -} - -// SetChallengeRequiredOnNewDevice sets the ChallengeRequiredOnNewDevice field's value. -func (s *DeviceConfigurationType) SetChallengeRequiredOnNewDevice(v bool) *DeviceConfigurationType { - s.ChallengeRequiredOnNewDevice = &v - return s -} - -// SetDeviceOnlyRememberedOnUserPrompt sets the DeviceOnlyRememberedOnUserPrompt field's value. -func (s *DeviceConfigurationType) SetDeviceOnlyRememberedOnUserPrompt(v bool) *DeviceConfigurationType { - s.DeviceOnlyRememberedOnUserPrompt = &v - return s -} - -// The device verifier against which it will be authenticated. -type DeviceSecretVerifierConfigType struct { - _ struct{} `type:"structure"` - - // The password verifier. - PasswordVerifier *string `type:"string"` - - // The salt. - Salt *string `type:"string"` -} - -// String returns the string representation -func (s DeviceSecretVerifierConfigType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeviceSecretVerifierConfigType) GoString() string { - return s.String() -} - -// SetPasswordVerifier sets the PasswordVerifier field's value. -func (s *DeviceSecretVerifierConfigType) SetPasswordVerifier(v string) *DeviceSecretVerifierConfigType { - s.PasswordVerifier = &v - return s -} - -// SetSalt sets the Salt field's value. -func (s *DeviceSecretVerifierConfigType) SetSalt(v string) *DeviceSecretVerifierConfigType { - s.Salt = &v - return s -} - -// The device type. -type DeviceType struct { - _ struct{} `type:"structure"` - - // The device attributes. - DeviceAttributes []*AttributeType `type:"list"` - - // The creation date of the device. - DeviceCreateDate *time.Time `type:"timestamp"` - - // The device key. - DeviceKey *string `min:"1" type:"string"` - - // The date in which the device was last authenticated. - DeviceLastAuthenticatedDate *time.Time `type:"timestamp"` - - // The last modified date of the device. - DeviceLastModifiedDate *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s DeviceType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeviceType) GoString() string { - return s.String() -} - -// SetDeviceAttributes sets the DeviceAttributes field's value. -func (s *DeviceType) SetDeviceAttributes(v []*AttributeType) *DeviceType { - s.DeviceAttributes = v - return s -} - -// SetDeviceCreateDate sets the DeviceCreateDate field's value. -func (s *DeviceType) SetDeviceCreateDate(v time.Time) *DeviceType { - s.DeviceCreateDate = &v - return s -} - -// SetDeviceKey sets the DeviceKey field's value. -func (s *DeviceType) SetDeviceKey(v string) *DeviceType { - s.DeviceKey = &v - return s -} - -// SetDeviceLastAuthenticatedDate sets the DeviceLastAuthenticatedDate field's value. -func (s *DeviceType) SetDeviceLastAuthenticatedDate(v time.Time) *DeviceType { - s.DeviceLastAuthenticatedDate = &v - return s -} - -// SetDeviceLastModifiedDate sets the DeviceLastModifiedDate field's value. -func (s *DeviceType) SetDeviceLastModifiedDate(v time.Time) *DeviceType { - s.DeviceLastModifiedDate = &v - return s -} - -// A container for information about a domain. -type DomainDescriptionType struct { - _ struct{} `type:"structure"` - - // The AWS account ID for the user pool owner. - AWSAccountId *string `type:"string"` - - // The ARN of the CloudFront distribution. - CloudFrontDistribution *string `type:"string"` - - // The configuration for a custom domain that hosts the sign-up and sign-in - // webpages for your application. - CustomDomainConfig *CustomDomainConfigType `type:"structure"` - - // The domain string. - Domain *string `min:"1" type:"string"` - - // The S3 bucket where the static files for this domain are stored. - S3Bucket *string `min:"3" type:"string"` - - // The domain status. - Status *string `type:"string" enum:"DomainStatusType"` - - // The user pool ID. - UserPoolId *string `min:"1" type:"string"` - - // The app version. - Version *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DomainDescriptionType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainDescriptionType) GoString() string { - return s.String() -} - -// SetAWSAccountId sets the AWSAccountId field's value. -func (s *DomainDescriptionType) SetAWSAccountId(v string) *DomainDescriptionType { - s.AWSAccountId = &v - return s -} - -// SetCloudFrontDistribution sets the CloudFrontDistribution field's value. -func (s *DomainDescriptionType) SetCloudFrontDistribution(v string) *DomainDescriptionType { - s.CloudFrontDistribution = &v - return s -} - -// SetCustomDomainConfig sets the CustomDomainConfig field's value. -func (s *DomainDescriptionType) SetCustomDomainConfig(v *CustomDomainConfigType) *DomainDescriptionType { - s.CustomDomainConfig = v - return s -} - -// SetDomain sets the Domain field's value. -func (s *DomainDescriptionType) SetDomain(v string) *DomainDescriptionType { - s.Domain = &v - return s -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *DomainDescriptionType) SetS3Bucket(v string) *DomainDescriptionType { - s.S3Bucket = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DomainDescriptionType) SetStatus(v string) *DomainDescriptionType { - s.Status = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *DomainDescriptionType) SetUserPoolId(v string) *DomainDescriptionType { - s.UserPoolId = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *DomainDescriptionType) SetVersion(v string) *DomainDescriptionType { - s.Version = &v - return s -} - -// The email configuration type. -type EmailConfigurationType struct { - _ struct{} `type:"structure"` - - // The destination to which the receiver of the email should reply to. - ReplyToEmailAddress *string `type:"string"` - - // The Amazon Resource Name (ARN) of the email source. - SourceArn *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s EmailConfigurationType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EmailConfigurationType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EmailConfigurationType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EmailConfigurationType"} - if s.SourceArn != nil && len(*s.SourceArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SourceArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReplyToEmailAddress sets the ReplyToEmailAddress field's value. -func (s *EmailConfigurationType) SetReplyToEmailAddress(v string) *EmailConfigurationType { - s.ReplyToEmailAddress = &v - return s -} - -// SetSourceArn sets the SourceArn field's value. -func (s *EmailConfigurationType) SetSourceArn(v string) *EmailConfigurationType { - s.SourceArn = &v - return s -} - -// Specifies the user context data captured at the time of an event request. -type EventContextDataType struct { - _ struct{} `type:"structure"` - - // The user's city. - City *string `type:"string"` - - // The user's country. - Country *string `type:"string"` - - // The user's device name. - DeviceName *string `type:"string"` - - // The user's IP address. - IpAddress *string `type:"string"` - - // The user's time zone. - Timezone *string `type:"string"` -} - -// String returns the string representation -func (s EventContextDataType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventContextDataType) GoString() string { - return s.String() -} - -// SetCity sets the City field's value. -func (s *EventContextDataType) SetCity(v string) *EventContextDataType { - s.City = &v - return s -} - -// SetCountry sets the Country field's value. -func (s *EventContextDataType) SetCountry(v string) *EventContextDataType { - s.Country = &v - return s -} - -// SetDeviceName sets the DeviceName field's value. -func (s *EventContextDataType) SetDeviceName(v string) *EventContextDataType { - s.DeviceName = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *EventContextDataType) SetIpAddress(v string) *EventContextDataType { - s.IpAddress = &v - return s -} - -// SetTimezone sets the Timezone field's value. -func (s *EventContextDataType) SetTimezone(v string) *EventContextDataType { - s.Timezone = &v - return s -} - -// Specifies the event feedback type. -type EventFeedbackType struct { - _ struct{} `type:"structure"` - - // The event feedback date. - FeedbackDate *time.Time `type:"timestamp"` - - // The event feedback value. - // - // FeedbackValue is a required field - FeedbackValue *string `type:"string" required:"true" enum:"FeedbackValueType"` - - // The provider. - // - // Provider is a required field - Provider *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s EventFeedbackType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventFeedbackType) GoString() string { - return s.String() -} - -// SetFeedbackDate sets the FeedbackDate field's value. -func (s *EventFeedbackType) SetFeedbackDate(v time.Time) *EventFeedbackType { - s.FeedbackDate = &v - return s -} - -// SetFeedbackValue sets the FeedbackValue field's value. -func (s *EventFeedbackType) SetFeedbackValue(v string) *EventFeedbackType { - s.FeedbackValue = &v - return s -} - -// SetProvider sets the Provider field's value. -func (s *EventFeedbackType) SetProvider(v string) *EventFeedbackType { - s.Provider = &v - return s -} - -// The event risk type. -type EventRiskType struct { - _ struct{} `type:"structure"` - - // The risk decision. - RiskDecision *string `type:"string" enum:"RiskDecisionType"` - - // The risk level. - RiskLevel *string `type:"string" enum:"RiskLevelType"` -} - -// String returns the string representation -func (s EventRiskType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventRiskType) GoString() string { - return s.String() -} - -// SetRiskDecision sets the RiskDecision field's value. -func (s *EventRiskType) SetRiskDecision(v string) *EventRiskType { - s.RiskDecision = &v - return s -} - -// SetRiskLevel sets the RiskLevel field's value. -func (s *EventRiskType) SetRiskLevel(v string) *EventRiskType { - s.RiskLevel = &v - return s -} - -// Represents the request to forget the device. -type ForgetDeviceInput struct { - _ struct{} `type:"structure"` - - // The access token for the forgotten device request. - AccessToken *string `type:"string" sensitive:"true"` - - // The device key. - // - // DeviceKey is a required field - DeviceKey *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ForgetDeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ForgetDeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ForgetDeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ForgetDeviceInput"} - if s.DeviceKey == nil { - invalidParams.Add(request.NewErrParamRequired("DeviceKey")) - } - if s.DeviceKey != nil && len(*s.DeviceKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeviceKey", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *ForgetDeviceInput) SetAccessToken(v string) *ForgetDeviceInput { - s.AccessToken = &v - return s -} - -// SetDeviceKey sets the DeviceKey field's value. -func (s *ForgetDeviceInput) SetDeviceKey(v string) *ForgetDeviceInput { - s.DeviceKey = &v - return s -} - -type ForgetDeviceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ForgetDeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ForgetDeviceOutput) GoString() string { - return s.String() -} - -// Represents the request to reset a user's password. -type ForgotPasswordInput struct { - _ struct{} `type:"structure"` - - // The Amazon Pinpoint analytics metadata for collecting metrics for ForgotPassword - // calls. - AnalyticsMetadata *AnalyticsMetadataType `type:"structure"` - - // The ID of the client associated with the user pool. - // - // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // A keyed-hash message authentication code (HMAC) calculated using the secret - // key of a user pool client and username plus the client ID in the message. - SecretHash *string `min:"1" type:"string" sensitive:"true"` - - // Contextual data such as the user's device fingerprint, IP address, or location - // used for evaluating the risk of an unexpected event by Amazon Cognito advanced - // security. - UserContextData *UserContextDataType `type:"structure"` - - // The user name of the user for whom you want to enter a code to reset a forgotten - // password. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s ForgotPasswordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ForgotPasswordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ForgotPasswordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ForgotPasswordInput"} - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.SecretHash != nil && len(*s.SecretHash) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretHash", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalyticsMetadata sets the AnalyticsMetadata field's value. -func (s *ForgotPasswordInput) SetAnalyticsMetadata(v *AnalyticsMetadataType) *ForgotPasswordInput { - s.AnalyticsMetadata = v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *ForgotPasswordInput) SetClientId(v string) *ForgotPasswordInput { - s.ClientId = &v - return s -} - -// SetSecretHash sets the SecretHash field's value. -func (s *ForgotPasswordInput) SetSecretHash(v string) *ForgotPasswordInput { - s.SecretHash = &v - return s -} - -// SetUserContextData sets the UserContextData field's value. -func (s *ForgotPasswordInput) SetUserContextData(v *UserContextDataType) *ForgotPasswordInput { - s.UserContextData = v - return s -} - -// SetUsername sets the Username field's value. -func (s *ForgotPasswordInput) SetUsername(v string) *ForgotPasswordInput { - s.Username = &v - return s -} - -// Respresents the response from the server regarding the request to reset a -// password. -type ForgotPasswordOutput struct { - _ struct{} `type:"structure"` - - // The code delivery details returned by the server in response to the request - // to reset a password. - CodeDeliveryDetails *CodeDeliveryDetailsType `type:"structure"` -} - -// String returns the string representation -func (s ForgotPasswordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ForgotPasswordOutput) GoString() string { - return s.String() -} - -// SetCodeDeliveryDetails sets the CodeDeliveryDetails field's value. -func (s *ForgotPasswordOutput) SetCodeDeliveryDetails(v *CodeDeliveryDetailsType) *ForgotPasswordOutput { - s.CodeDeliveryDetails = v - return s -} - -// Represents the request to get the header information for the .csv file for -// the user import job. -type GetCSVHeaderInput struct { - _ struct{} `type:"structure"` - - // The user pool ID for the user pool that the users are to be imported into. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCSVHeaderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCSVHeaderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCSVHeaderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCSVHeaderInput"} - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *GetCSVHeaderInput) SetUserPoolId(v string) *GetCSVHeaderInput { - s.UserPoolId = &v - return s -} - -// Represents the response from the server to the request to get the header -// information for the .csv file for the user import job. -type GetCSVHeaderOutput struct { - _ struct{} `type:"structure"` - - // The header information for the .csv file for the user import job. - CSVHeader []*string `type:"list"` - - // The user pool ID for the user pool that the users are to be imported into. - UserPoolId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetCSVHeaderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCSVHeaderOutput) GoString() string { - return s.String() -} - -// SetCSVHeader sets the CSVHeader field's value. -func (s *GetCSVHeaderOutput) SetCSVHeader(v []*string) *GetCSVHeaderOutput { - s.CSVHeader = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *GetCSVHeaderOutput) SetUserPoolId(v string) *GetCSVHeaderOutput { - s.UserPoolId = &v - return s -} - -// Represents the request to get the device. -type GetDeviceInput struct { - _ struct{} `type:"structure"` - - // The access token. - AccessToken *string `type:"string" sensitive:"true"` - - // The device key. - // - // DeviceKey is a required field - DeviceKey *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeviceInput"} - if s.DeviceKey == nil { - invalidParams.Add(request.NewErrParamRequired("DeviceKey")) - } - if s.DeviceKey != nil && len(*s.DeviceKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeviceKey", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *GetDeviceInput) SetAccessToken(v string) *GetDeviceInput { - s.AccessToken = &v - return s -} - -// SetDeviceKey sets the DeviceKey field's value. -func (s *GetDeviceInput) SetDeviceKey(v string) *GetDeviceInput { - s.DeviceKey = &v - return s -} - -// Gets the device response. -type GetDeviceOutput struct { - _ struct{} `type:"structure"` - - // The device. - // - // Device is a required field - Device *DeviceType `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetDeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeviceOutput) GoString() string { - return s.String() -} - -// SetDevice sets the Device field's value. -func (s *GetDeviceOutput) SetDevice(v *DeviceType) *GetDeviceOutput { - s.Device = v - return s -} - -type GetGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the group. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" 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.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *GetGroupInput) SetGroupName(v string) *GetGroupInput { - s.GroupName = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *GetGroupInput) SetUserPoolId(v string) *GetGroupInput { - s.UserPoolId = &v - return s -} - -type GetGroupOutput struct { - _ struct{} `type:"structure"` - - // The group object for the group. - Group *GroupType `type:"structure"` -} - -// 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() -} - -// SetGroup sets the Group field's value. -func (s *GetGroupOutput) SetGroup(v *GroupType) *GetGroupOutput { - s.Group = v - return s -} - -type GetIdentityProviderByIdentifierInput struct { - _ struct{} `type:"structure"` - - // The identity provider ID. - // - // IdpIdentifier is a required field - IdpIdentifier *string `min:"1" type:"string" required:"true"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetIdentityProviderByIdentifierInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdentityProviderByIdentifierInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIdentityProviderByIdentifierInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIdentityProviderByIdentifierInput"} - if s.IdpIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("IdpIdentifier")) - } - if s.IdpIdentifier != nil && len(*s.IdpIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdpIdentifier", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdpIdentifier sets the IdpIdentifier field's value. -func (s *GetIdentityProviderByIdentifierInput) SetIdpIdentifier(v string) *GetIdentityProviderByIdentifierInput { - s.IdpIdentifier = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *GetIdentityProviderByIdentifierInput) SetUserPoolId(v string) *GetIdentityProviderByIdentifierInput { - s.UserPoolId = &v - return s -} - -type GetIdentityProviderByIdentifierOutput struct { - _ struct{} `type:"structure"` - - // The identity provider object. - // - // IdentityProvider is a required field - IdentityProvider *IdentityProviderType `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetIdentityProviderByIdentifierOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdentityProviderByIdentifierOutput) GoString() string { - return s.String() -} - -// SetIdentityProvider sets the IdentityProvider field's value. -func (s *GetIdentityProviderByIdentifierOutput) SetIdentityProvider(v *IdentityProviderType) *GetIdentityProviderByIdentifierOutput { - s.IdentityProvider = v - return s -} - -// Request to get a signing certificate from Cognito. -type GetSigningCertificateInput struct { - _ struct{} `type:"structure"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSigningCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSigningCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSigningCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSigningCertificateInput"} - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *GetSigningCertificateInput) SetUserPoolId(v string) *GetSigningCertificateInput { - s.UserPoolId = &v - return s -} - -// Response from Cognito for a signing certificate request. -type GetSigningCertificateOutput struct { - _ struct{} `type:"structure"` - - // The signing certificate. - Certificate *string `type:"string"` -} - -// String returns the string representation -func (s GetSigningCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSigningCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificate sets the Certificate field's value. -func (s *GetSigningCertificateOutput) SetCertificate(v string) *GetSigningCertificateOutput { - s.Certificate = &v - return s -} - -type GetUICustomizationInput struct { - _ struct{} `type:"structure"` - - // The client ID for the client app. - ClientId *string `min:"1" type:"string" sensitive:"true"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetUICustomizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUICustomizationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUICustomizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUICustomizationInput"} - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientId sets the ClientId field's value. -func (s *GetUICustomizationInput) SetClientId(v string) *GetUICustomizationInput { - s.ClientId = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *GetUICustomizationInput) SetUserPoolId(v string) *GetUICustomizationInput { - s.UserPoolId = &v - return s -} - -type GetUICustomizationOutput struct { - _ struct{} `type:"structure"` - - // The UI customization information. - // - // UICustomization is a required field - UICustomization *UICustomizationType `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetUICustomizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUICustomizationOutput) GoString() string { - return s.String() -} - -// SetUICustomization sets the UICustomization field's value. -func (s *GetUICustomizationOutput) SetUICustomization(v *UICustomizationType) *GetUICustomizationOutput { - s.UICustomization = v - return s -} - -// Represents the request to get user attribute verification. -type GetUserAttributeVerificationCodeInput struct { - _ struct{} `type:"structure"` - - // The access token returned by the server response to get the user attribute - // verification code. - // - // AccessToken is a required field - AccessToken *string `type:"string" required:"true" sensitive:"true"` - - // The attribute name returned by the server response to get the user attribute - // verification code. - // - // AttributeName is a required field - AttributeName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetUserAttributeVerificationCodeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUserAttributeVerificationCodeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUserAttributeVerificationCodeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUserAttributeVerificationCodeInput"} - if s.AccessToken == nil { - invalidParams.Add(request.NewErrParamRequired("AccessToken")) - } - if s.AttributeName == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeName")) - } - if s.AttributeName != nil && len(*s.AttributeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *GetUserAttributeVerificationCodeInput) SetAccessToken(v string) *GetUserAttributeVerificationCodeInput { - s.AccessToken = &v - return s -} - -// SetAttributeName sets the AttributeName field's value. -func (s *GetUserAttributeVerificationCodeInput) SetAttributeName(v string) *GetUserAttributeVerificationCodeInput { - s.AttributeName = &v - return s -} - -// The verification code response returned by the server response to get the -// user attribute verification code. -type GetUserAttributeVerificationCodeOutput struct { - _ struct{} `type:"structure"` - - // The code delivery details returned by the server in response to the request - // to get the user attribute verification code. - CodeDeliveryDetails *CodeDeliveryDetailsType `type:"structure"` -} - -// String returns the string representation -func (s GetUserAttributeVerificationCodeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUserAttributeVerificationCodeOutput) GoString() string { - return s.String() -} - -// SetCodeDeliveryDetails sets the CodeDeliveryDetails field's value. -func (s *GetUserAttributeVerificationCodeOutput) SetCodeDeliveryDetails(v *CodeDeliveryDetailsType) *GetUserAttributeVerificationCodeOutput { - s.CodeDeliveryDetails = v - return s -} - -// Represents the request to get information about the user. -type GetUserInput struct { - _ struct{} `type:"structure"` - - // The access token returned by the server response to get information about - // the user. - // - // AccessToken is a required field - AccessToken *string `type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s GetUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUserInput"} - if s.AccessToken == nil { - invalidParams.Add(request.NewErrParamRequired("AccessToken")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *GetUserInput) SetAccessToken(v string) *GetUserInput { - s.AccessToken = &v - return s -} - -// Represents the response from the server from the request to get information -// about the user. -type GetUserOutput struct { - _ struct{} `type:"structure"` - - // Specifies the options for MFA (e.g., email or phone number). - MFAOptions []*MFAOptionType `type:"list"` - - // The user's preferred MFA setting. - PreferredMfaSetting *string `type:"string"` - - // An array of name-value pairs representing user attributes. - // - // For custom attributes, you must prepend the custom: prefix to the attribute - // name. - // - // UserAttributes is a required field - UserAttributes []*AttributeType `type:"list" required:"true"` - - // The list of the user's MFA settings. - UserMFASettingList []*string `type:"list"` - - // The user name of the user you wish to retrieve from the get user request. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s GetUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUserOutput) GoString() string { - return s.String() -} - -// SetMFAOptions sets the MFAOptions field's value. -func (s *GetUserOutput) SetMFAOptions(v []*MFAOptionType) *GetUserOutput { - s.MFAOptions = v - return s -} - -// SetPreferredMfaSetting sets the PreferredMfaSetting field's value. -func (s *GetUserOutput) SetPreferredMfaSetting(v string) *GetUserOutput { - s.PreferredMfaSetting = &v - return s -} - -// SetUserAttributes sets the UserAttributes field's value. -func (s *GetUserOutput) SetUserAttributes(v []*AttributeType) *GetUserOutput { - s.UserAttributes = v - return s -} - -// SetUserMFASettingList sets the UserMFASettingList field's value. -func (s *GetUserOutput) SetUserMFASettingList(v []*string) *GetUserOutput { - s.UserMFASettingList = v - return s -} - -// SetUsername sets the Username field's value. -func (s *GetUserOutput) SetUsername(v string) *GetUserOutput { - s.Username = &v - return s -} - -type GetUserPoolMfaConfigInput struct { - _ struct{} `type:"structure"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetUserPoolMfaConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUserPoolMfaConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUserPoolMfaConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUserPoolMfaConfigInput"} - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *GetUserPoolMfaConfigInput) SetUserPoolId(v string) *GetUserPoolMfaConfigInput { - s.UserPoolId = &v - return s -} - -type GetUserPoolMfaConfigOutput struct { - _ struct{} `type:"structure"` - - // The multi-factor (MFA) configuration. - MfaConfiguration *string `type:"string" enum:"UserPoolMfaType"` - - // The SMS text message multi-factor (MFA) configuration. - SmsMfaConfiguration *SmsMfaConfigType `type:"structure"` - - // The software token multi-factor (MFA) configuration. - SoftwareTokenMfaConfiguration *SoftwareTokenMfaConfigType `type:"structure"` -} - -// String returns the string representation -func (s GetUserPoolMfaConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUserPoolMfaConfigOutput) GoString() string { - return s.String() -} - -// SetMfaConfiguration sets the MfaConfiguration field's value. -func (s *GetUserPoolMfaConfigOutput) SetMfaConfiguration(v string) *GetUserPoolMfaConfigOutput { - s.MfaConfiguration = &v - return s -} - -// SetSmsMfaConfiguration sets the SmsMfaConfiguration field's value. -func (s *GetUserPoolMfaConfigOutput) SetSmsMfaConfiguration(v *SmsMfaConfigType) *GetUserPoolMfaConfigOutput { - s.SmsMfaConfiguration = v - return s -} - -// SetSoftwareTokenMfaConfiguration sets the SoftwareTokenMfaConfiguration field's value. -func (s *GetUserPoolMfaConfigOutput) SetSoftwareTokenMfaConfiguration(v *SoftwareTokenMfaConfigType) *GetUserPoolMfaConfigOutput { - s.SoftwareTokenMfaConfiguration = v - return s -} - -// Represents the request to sign out all devices. -type GlobalSignOutInput struct { - _ struct{} `type:"structure"` - - // The access token. - // - // AccessToken is a required field - AccessToken *string `type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s GlobalSignOutInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GlobalSignOutInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GlobalSignOutInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GlobalSignOutInput"} - if s.AccessToken == nil { - invalidParams.Add(request.NewErrParamRequired("AccessToken")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *GlobalSignOutInput) SetAccessToken(v string) *GlobalSignOutInput { - s.AccessToken = &v - return s -} - -// The response to the request to sign out all devices. -type GlobalSignOutOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GlobalSignOutOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GlobalSignOutOutput) GoString() string { - return s.String() -} - -// The group type. -type GroupType struct { - _ struct{} `type:"structure"` - - // The date the group was created. - CreationDate *time.Time `type:"timestamp"` - - // A string containing the description of the group. - Description *string `type:"string"` - - // The name of the group. - GroupName *string `min:"1" type:"string"` - - // The date the group was last modified. - LastModifiedDate *time.Time `type:"timestamp"` - - // A nonnegative integer value that specifies the precedence of this group relative - // to the other groups that a user can belong to in the user pool. If a user - // belongs to two or more groups, it is the group with the highest precedence - // whose role ARN will be used in the cognito:roles and cognito:preferred_role - // claims in the user's tokens. Groups with higher Precedence values take precedence - // over groups with lower Precedence values or with null Precedence values. - // - // Two groups can have the same Precedence value. If this happens, neither group - // takes precedence over the other. If two groups with the same Precedence have - // the same role ARN, that role is used in the cognito:preferred_role claim - // in tokens for users in each group. If the two groups have different role - // ARNs, the cognito:preferred_role claim is not set in users' tokens. - // - // The default Precedence value is null. - Precedence *int64 `type:"integer"` - - // The role ARN for the group. - RoleArn *string `min:"20" type:"string"` - - // The user pool ID for the user pool. - UserPoolId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GroupType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GroupType) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *GroupType) SetCreationDate(v time.Time) *GroupType { - s.CreationDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GroupType) SetDescription(v string) *GroupType { - s.Description = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *GroupType) SetGroupName(v string) *GroupType { - s.GroupName = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *GroupType) SetLastModifiedDate(v time.Time) *GroupType { - s.LastModifiedDate = &v - return s -} - -// SetPrecedence sets the Precedence field's value. -func (s *GroupType) SetPrecedence(v int64) *GroupType { - s.Precedence = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *GroupType) SetRoleArn(v string) *GroupType { - s.RoleArn = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *GroupType) SetUserPoolId(v string) *GroupType { - s.UserPoolId = &v - return s -} - -// The HTTP header. -type HttpHeader struct { - _ struct{} `type:"structure"` - - // The header name - HeaderName *string `locationName:"headerName" type:"string"` - - // The header value. - HeaderValue *string `locationName:"headerValue" type:"string"` -} - -// String returns the string representation -func (s HttpHeader) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HttpHeader) GoString() string { - return s.String() -} - -// SetHeaderName sets the HeaderName field's value. -func (s *HttpHeader) SetHeaderName(v string) *HttpHeader { - s.HeaderName = &v - return s -} - -// SetHeaderValue sets the HeaderValue field's value. -func (s *HttpHeader) SetHeaderValue(v string) *HttpHeader { - s.HeaderValue = &v - return s -} - -// A container for information about an identity provider. -type IdentityProviderType struct { - _ struct{} `type:"structure"` - - // A mapping of identity provider attributes to standard and custom user pool - // attributes. - AttributeMapping map[string]*string `type:"map"` - - // The date the identity provider was created. - CreationDate *time.Time `type:"timestamp"` - - // A list of identity provider identifiers. - IdpIdentifiers []*string `type:"list"` - - // The date the identity provider was last modified. - LastModifiedDate *time.Time `type:"timestamp"` - - // The identity provider details, such as MetadataURL and MetadataFile. - ProviderDetails map[string]*string `type:"map"` - - // The identity provider name. - ProviderName *string `min:"1" type:"string"` - - // The identity provider type. - ProviderType *string `type:"string" enum:"IdentityProviderTypeType"` - - // The user pool ID. - UserPoolId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s IdentityProviderType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IdentityProviderType) GoString() string { - return s.String() -} - -// SetAttributeMapping sets the AttributeMapping field's value. -func (s *IdentityProviderType) SetAttributeMapping(v map[string]*string) *IdentityProviderType { - s.AttributeMapping = v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *IdentityProviderType) SetCreationDate(v time.Time) *IdentityProviderType { - s.CreationDate = &v - return s -} - -// SetIdpIdentifiers sets the IdpIdentifiers field's value. -func (s *IdentityProviderType) SetIdpIdentifiers(v []*string) *IdentityProviderType { - s.IdpIdentifiers = v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *IdentityProviderType) SetLastModifiedDate(v time.Time) *IdentityProviderType { - s.LastModifiedDate = &v - return s -} - -// SetProviderDetails sets the ProviderDetails field's value. -func (s *IdentityProviderType) SetProviderDetails(v map[string]*string) *IdentityProviderType { - s.ProviderDetails = v - return s -} - -// SetProviderName sets the ProviderName field's value. -func (s *IdentityProviderType) SetProviderName(v string) *IdentityProviderType { - s.ProviderName = &v - return s -} - -// SetProviderType sets the ProviderType field's value. -func (s *IdentityProviderType) SetProviderType(v string) *IdentityProviderType { - s.ProviderType = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *IdentityProviderType) SetUserPoolId(v string) *IdentityProviderType { - s.UserPoolId = &v - return s -} - -// Initiates the authentication request. -type InitiateAuthInput struct { - _ struct{} `type:"structure"` - - // The Amazon Pinpoint analytics metadata for collecting metrics for InitiateAuth - // calls. - AnalyticsMetadata *AnalyticsMetadataType `type:"structure"` - - // The authentication flow for this call to execute. The API action will depend - // on this value. For example: - // - // * REFRESH_TOKEN_AUTH will take in a valid refresh token and return new - // tokens. - // - // * USER_SRP_AUTH will take in USERNAME and SRP_A and return the SRP variables - // to be used for next challenge execution. - // - // * USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the - // next challenge or tokens. - // - // Valid values include: - // - // * USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) - // protocol. - // - // * REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing - // the access token and ID token by supplying a valid refresh token. - // - // * CUSTOM_AUTH: Custom authentication flow. - // - // * USER_PASSWORD_AUTH: Non-SRP authentication flow; USERNAME and PASSWORD - // are passed directly. If a user migration Lambda trigger is set, this flow - // will invoke the user migration Lambda if the USERNAME is not found in - // the user pool. - // - // ADMIN_NO_SRP_AUTH is not a valid value. - // - // AuthFlow is a required field - AuthFlow *string `type:"string" required:"true" enum:"AuthFlowType"` - - // The authentication parameters. These are inputs corresponding to the AuthFlow - // that you are invoking. The required values depend on the value of AuthFlow: - // - // * For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH - // (required if the app client is configured with a client secret), DEVICE_KEY - // - // * For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH - // (required if the app client is configured with a client secret), DEVICE_KEY - // - // * For CUSTOM_AUTH: USERNAME (required), SECRET_HASH (if app client is - // configured with client secret), DEVICE_KEY - AuthParameters map[string]*string `type:"map"` - - // The app client ID. - // - // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // This is a random key-value pair map which can contain any key and will be - // passed to your PreAuthentication Lambda trigger as-is. It can be used to - // implement additional validations around authentication. - ClientMetadata map[string]*string `type:"map"` - - // Contextual data such as the user's device fingerprint, IP address, or location - // used for evaluating the risk of an unexpected event by Amazon Cognito advanced - // security. - UserContextData *UserContextDataType `type:"structure"` -} - -// String returns the string representation -func (s InitiateAuthInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InitiateAuthInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InitiateAuthInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InitiateAuthInput"} - if s.AuthFlow == nil { - invalidParams.Add(request.NewErrParamRequired("AuthFlow")) - } - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalyticsMetadata sets the AnalyticsMetadata field's value. -func (s *InitiateAuthInput) SetAnalyticsMetadata(v *AnalyticsMetadataType) *InitiateAuthInput { - s.AnalyticsMetadata = v - return s -} - -// SetAuthFlow sets the AuthFlow field's value. -func (s *InitiateAuthInput) SetAuthFlow(v string) *InitiateAuthInput { - s.AuthFlow = &v - return s -} - -// SetAuthParameters sets the AuthParameters field's value. -func (s *InitiateAuthInput) SetAuthParameters(v map[string]*string) *InitiateAuthInput { - s.AuthParameters = v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *InitiateAuthInput) SetClientId(v string) *InitiateAuthInput { - s.ClientId = &v - return s -} - -// SetClientMetadata sets the ClientMetadata field's value. -func (s *InitiateAuthInput) SetClientMetadata(v map[string]*string) *InitiateAuthInput { - s.ClientMetadata = v - return s -} - -// SetUserContextData sets the UserContextData field's value. -func (s *InitiateAuthInput) SetUserContextData(v *UserContextDataType) *InitiateAuthInput { - s.UserContextData = v - return s -} - -// Initiates the authentication response. -type InitiateAuthOutput struct { - _ struct{} `type:"structure"` - - // The result of the authentication response. This is only returned if the caller - // does not need to pass another challenge. If the caller does need to pass - // another challenge before it gets tokens, ChallengeName, ChallengeParameters, - // and Session are returned. - AuthenticationResult *AuthenticationResultType `type:"structure"` - - // The name of the challenge which you are responding to with this call. This - // is returned to you in the AdminInitiateAuth response if you need to pass - // another challenge. - // - // Valid values include the following. Note that all of these challenges require - // USERNAME and SECRET_HASH (if applicable) in the parameters. - // - // * SMS_MFA: Next challenge is to supply an SMS_MFA_CODE, delivered via - // SMS. - // - // * PASSWORD_VERIFIER: Next challenge is to supply PASSWORD_CLAIM_SIGNATURE, - // PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after the client-side SRP calculations. - // - // * CUSTOM_CHALLENGE: This is returned if your custom authentication flow - // determines that the user should pass another challenge before tokens are - // issued. - // - // * DEVICE_SRP_AUTH: If device tracking was enabled on your user pool and - // the previous challenges were passed, this challenge is returned so that - // Amazon Cognito can start tracking this device. - // - // * DEVICE_PASSWORD_VERIFIER: Similar to PASSWORD_VERIFIER, but for devices - // only. - // - // * NEW_PASSWORD_REQUIRED: For users which are required to change their - // passwords after successful first login. This challenge should be passed - // with NEW_PASSWORD and any other required attributes. - ChallengeName *string `type:"string" enum:"ChallengeNameType"` - - // The challenge parameters. These are returned to you in the InitiateAuth response - // if you need to pass another challenge. The responses in this parameter should - // be used to compute inputs to the next call (RespondToAuthChallenge). - // - // All challenges require USERNAME and SECRET_HASH (if applicable). - ChallengeParameters map[string]*string `type:"map"` - - // The session which should be passed both ways in challenge-response calls - // to the service. If the or API call determines that the caller needs to go - // through another challenge, they return a session with other challenge parameters. - // This session should be passed as it is to the next RespondToAuthChallenge - // API call. - Session *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s InitiateAuthOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InitiateAuthOutput) GoString() string { - return s.String() -} - -// SetAuthenticationResult sets the AuthenticationResult field's value. -func (s *InitiateAuthOutput) SetAuthenticationResult(v *AuthenticationResultType) *InitiateAuthOutput { - s.AuthenticationResult = v - return s -} - -// SetChallengeName sets the ChallengeName field's value. -func (s *InitiateAuthOutput) SetChallengeName(v string) *InitiateAuthOutput { - s.ChallengeName = &v - return s -} - -// SetChallengeParameters sets the ChallengeParameters field's value. -func (s *InitiateAuthOutput) SetChallengeParameters(v map[string]*string) *InitiateAuthOutput { - s.ChallengeParameters = v - return s -} - -// SetSession sets the Session field's value. -func (s *InitiateAuthOutput) SetSession(v string) *InitiateAuthOutput { - s.Session = &v - return s -} - -// Specifies the configuration for AWS Lambda triggers. -type LambdaConfigType struct { - _ struct{} `type:"structure"` - - // Creates an authentication challenge. - CreateAuthChallenge *string `min:"20" type:"string"` - - // A custom Message AWS Lambda trigger. - CustomMessage *string `min:"20" type:"string"` - - // Defines the authentication challenge. - DefineAuthChallenge *string `min:"20" type:"string"` - - // A post-authentication AWS Lambda trigger. - PostAuthentication *string `min:"20" type:"string"` - - // A post-confirmation AWS Lambda trigger. - PostConfirmation *string `min:"20" type:"string"` - - // A pre-authentication AWS Lambda trigger. - PreAuthentication *string `min:"20" type:"string"` - - // A pre-registration AWS Lambda trigger. - PreSignUp *string `min:"20" type:"string"` - - // A Lambda trigger that is invoked before token generation. - PreTokenGeneration *string `min:"20" type:"string"` - - // The user migration Lambda config type. - UserMigration *string `min:"20" type:"string"` - - // Verifies the authentication challenge response. - VerifyAuthChallengeResponse *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s LambdaConfigType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaConfigType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LambdaConfigType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LambdaConfigType"} - if s.CreateAuthChallenge != nil && len(*s.CreateAuthChallenge) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CreateAuthChallenge", 20)) - } - if s.CustomMessage != nil && len(*s.CustomMessage) < 20 { - invalidParams.Add(request.NewErrParamMinLen("CustomMessage", 20)) - } - if s.DefineAuthChallenge != nil && len(*s.DefineAuthChallenge) < 20 { - invalidParams.Add(request.NewErrParamMinLen("DefineAuthChallenge", 20)) - } - if s.PostAuthentication != nil && len(*s.PostAuthentication) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PostAuthentication", 20)) - } - if s.PostConfirmation != nil && len(*s.PostConfirmation) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PostConfirmation", 20)) - } - if s.PreAuthentication != nil && len(*s.PreAuthentication) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PreAuthentication", 20)) - } - if s.PreSignUp != nil && len(*s.PreSignUp) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PreSignUp", 20)) - } - if s.PreTokenGeneration != nil && len(*s.PreTokenGeneration) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PreTokenGeneration", 20)) - } - if s.UserMigration != nil && len(*s.UserMigration) < 20 { - invalidParams.Add(request.NewErrParamMinLen("UserMigration", 20)) - } - if s.VerifyAuthChallengeResponse != nil && len(*s.VerifyAuthChallengeResponse) < 20 { - invalidParams.Add(request.NewErrParamMinLen("VerifyAuthChallengeResponse", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreateAuthChallenge sets the CreateAuthChallenge field's value. -func (s *LambdaConfigType) SetCreateAuthChallenge(v string) *LambdaConfigType { - s.CreateAuthChallenge = &v - return s -} - -// SetCustomMessage sets the CustomMessage field's value. -func (s *LambdaConfigType) SetCustomMessage(v string) *LambdaConfigType { - s.CustomMessage = &v - return s -} - -// SetDefineAuthChallenge sets the DefineAuthChallenge field's value. -func (s *LambdaConfigType) SetDefineAuthChallenge(v string) *LambdaConfigType { - s.DefineAuthChallenge = &v - return s -} - -// SetPostAuthentication sets the PostAuthentication field's value. -func (s *LambdaConfigType) SetPostAuthentication(v string) *LambdaConfigType { - s.PostAuthentication = &v - return s -} - -// SetPostConfirmation sets the PostConfirmation field's value. -func (s *LambdaConfigType) SetPostConfirmation(v string) *LambdaConfigType { - s.PostConfirmation = &v - return s -} - -// SetPreAuthentication sets the PreAuthentication field's value. -func (s *LambdaConfigType) SetPreAuthentication(v string) *LambdaConfigType { - s.PreAuthentication = &v - return s -} - -// SetPreSignUp sets the PreSignUp field's value. -func (s *LambdaConfigType) SetPreSignUp(v string) *LambdaConfigType { - s.PreSignUp = &v - return s -} - -// SetPreTokenGeneration sets the PreTokenGeneration field's value. -func (s *LambdaConfigType) SetPreTokenGeneration(v string) *LambdaConfigType { - s.PreTokenGeneration = &v - return s -} - -// SetUserMigration sets the UserMigration field's value. -func (s *LambdaConfigType) SetUserMigration(v string) *LambdaConfigType { - s.UserMigration = &v - return s -} - -// SetVerifyAuthChallengeResponse sets the VerifyAuthChallengeResponse field's value. -func (s *LambdaConfigType) SetVerifyAuthChallengeResponse(v string) *LambdaConfigType { - s.VerifyAuthChallengeResponse = &v - return s -} - -// Represents the request to list the devices. -type ListDevicesInput struct { - _ struct{} `type:"structure"` - - // The access tokens for the request to list devices. - // - // AccessToken is a required field - AccessToken *string `type:"string" required:"true" sensitive:"true"` - - // The limit of the device request. - Limit *int64 `type:"integer"` - - // The pagination token for the list request. - PaginationToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListDevicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDevicesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDevicesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDevicesInput"} - if s.AccessToken == nil { - invalidParams.Add(request.NewErrParamRequired("AccessToken")) - } - if s.PaginationToken != nil && len(*s.PaginationToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PaginationToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *ListDevicesInput) SetAccessToken(v string) *ListDevicesInput { - s.AccessToken = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListDevicesInput) SetLimit(v int64) *ListDevicesInput { - s.Limit = &v - return s -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *ListDevicesInput) SetPaginationToken(v string) *ListDevicesInput { - s.PaginationToken = &v - return s -} - -// Represents the response to list devices. -type ListDevicesOutput struct { - _ struct{} `type:"structure"` - - // The devices returned in the list devices response. - Devices []*DeviceType `type:"list"` - - // The pagination token for the list device response. - PaginationToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListDevicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDevicesOutput) GoString() string { - return s.String() -} - -// SetDevices sets the Devices field's value. -func (s *ListDevicesOutput) SetDevices(v []*DeviceType) *ListDevicesOutput { - s.Devices = v - return s -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *ListDevicesOutput) SetPaginationToken(v string) *ListDevicesOutput { - s.PaginationToken = &v - return s -} - -type ListGroupsInput struct { - _ struct{} `type:"structure"` - - // The limit of the request to list groups. - Limit *int64 `type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `min:"1" type:"string"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// 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() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListGroupsInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListGroupsInput) SetLimit(v int64) *ListGroupsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListGroupsInput) SetNextToken(v string) *ListGroupsInput { - s.NextToken = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *ListGroupsInput) SetUserPoolId(v string) *ListGroupsInput { - s.UserPoolId = &v - return s -} - -type ListGroupsOutput struct { - _ struct{} `type:"structure"` - - // The group objects for the groups. - Groups []*GroupType `type:"list"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `min:"1" 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 []*GroupType) *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 ListIdentityProvidersInput struct { - _ struct{} `type:"structure"` - - // The maximum number of identity providers to return. - MaxResults *int64 `min:"1" type:"integer"` - - // A pagination token. - NextToken *string `min:"1" type:"string"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListIdentityProvidersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIdentityProvidersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListIdentityProvidersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListIdentityProvidersInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListIdentityProvidersInput) SetMaxResults(v int64) *ListIdentityProvidersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListIdentityProvidersInput) SetNextToken(v string) *ListIdentityProvidersInput { - s.NextToken = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *ListIdentityProvidersInput) SetUserPoolId(v string) *ListIdentityProvidersInput { - s.UserPoolId = &v - return s -} - -type ListIdentityProvidersOutput struct { - _ struct{} `type:"structure"` - - // A pagination token. - NextToken *string `min:"1" type:"string"` - - // A list of identity provider objects. - // - // Providers is a required field - Providers []*ProviderDescription `type:"list" required:"true"` -} - -// String returns the string representation -func (s ListIdentityProvidersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIdentityProvidersOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListIdentityProvidersOutput) SetNextToken(v string) *ListIdentityProvidersOutput { - s.NextToken = &v - return s -} - -// SetProviders sets the Providers field's value. -func (s *ListIdentityProvidersOutput) SetProviders(v []*ProviderDescription) *ListIdentityProvidersOutput { - s.Providers = v - return s -} - -type ListResourceServersInput struct { - _ struct{} `type:"structure"` - - // The maximum number of resource servers to return. - MaxResults *int64 `min:"1" type:"integer"` - - // A pagination token. - NextToken *string `min:"1" type:"string"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListResourceServersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourceServersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResourceServersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResourceServersInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListResourceServersInput) SetMaxResults(v int64) *ListResourceServersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResourceServersInput) SetNextToken(v string) *ListResourceServersInput { - s.NextToken = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *ListResourceServersInput) SetUserPoolId(v string) *ListResourceServersInput { - s.UserPoolId = &v - return s -} - -type ListResourceServersOutput struct { - _ struct{} `type:"structure"` - - // A pagination token. - NextToken *string `min:"1" type:"string"` - - // The resource servers. - // - // ResourceServers is a required field - ResourceServers []*ResourceServerType `type:"list" required:"true"` -} - -// String returns the string representation -func (s ListResourceServersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourceServersOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResourceServersOutput) SetNextToken(v string) *ListResourceServersOutput { - s.NextToken = &v - return s -} - -// SetResourceServers sets the ResourceServers field's value. -func (s *ListResourceServersOutput) SetResourceServers(v []*ResourceServerType) *ListResourceServersOutput { - s.ResourceServers = v - return s -} - -// Represents the request to list the user import jobs. -type ListUserImportJobsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of import jobs you want the request to return. - // - // MaxResults is a required field - MaxResults *int64 `min:"1" type:"integer" required:"true"` - - // An identifier that was returned from the previous call to ListUserImportJobs, - // which can be used to return the next set of import jobs in the list. - PaginationToken *string `min:"1" type:"string"` - - // The user pool ID for the user pool that the users are being imported into. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListUserImportJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUserImportJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUserImportJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUserImportJobsInput"} - if s.MaxResults == nil { - invalidParams.Add(request.NewErrParamRequired("MaxResults")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.PaginationToken != nil && len(*s.PaginationToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PaginationToken", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListUserImportJobsInput) SetMaxResults(v int64) *ListUserImportJobsInput { - s.MaxResults = &v - return s -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *ListUserImportJobsInput) SetPaginationToken(v string) *ListUserImportJobsInput { - s.PaginationToken = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *ListUserImportJobsInput) SetUserPoolId(v string) *ListUserImportJobsInput { - s.UserPoolId = &v - return s -} - -// Represents the response from the server to the request to list the user import -// jobs. -type ListUserImportJobsOutput struct { - _ struct{} `type:"structure"` - - // An identifier that can be used to return the next set of user import jobs - // in the list. - PaginationToken *string `min:"1" type:"string"` - - // The user import jobs. - UserImportJobs []*UserImportJobType `min:"1" type:"list"` -} - -// String returns the string representation -func (s ListUserImportJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUserImportJobsOutput) GoString() string { - return s.String() -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *ListUserImportJobsOutput) SetPaginationToken(v string) *ListUserImportJobsOutput { - s.PaginationToken = &v - return s -} - -// SetUserImportJobs sets the UserImportJobs field's value. -func (s *ListUserImportJobsOutput) SetUserImportJobs(v []*UserImportJobType) *ListUserImportJobsOutput { - s.UserImportJobs = v - return s -} - -// Represents the request to list the user pool clients. -type ListUserPoolClientsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results you want the request to return when listing - // the user pool clients. - MaxResults *int64 `min:"1" type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `min:"1" type:"string"` - - // The user pool ID for the user pool where you want to list user pool clients. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListUserPoolClientsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUserPoolClientsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUserPoolClientsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUserPoolClientsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListUserPoolClientsInput) SetMaxResults(v int64) *ListUserPoolClientsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUserPoolClientsInput) SetNextToken(v string) *ListUserPoolClientsInput { - s.NextToken = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *ListUserPoolClientsInput) SetUserPoolId(v string) *ListUserPoolClientsInput { - s.UserPoolId = &v - return s -} - -// Represents the response from the server that lists user pool clients. -type ListUserPoolClientsOutput struct { - _ struct{} `type:"structure"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `min:"1" type:"string"` - - // The user pool clients in the response that lists user pool clients. - UserPoolClients []*UserPoolClientDescription `type:"list"` -} - -// String returns the string representation -func (s ListUserPoolClientsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUserPoolClientsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUserPoolClientsOutput) SetNextToken(v string) *ListUserPoolClientsOutput { - s.NextToken = &v - return s -} - -// SetUserPoolClients sets the UserPoolClients field's value. -func (s *ListUserPoolClientsOutput) SetUserPoolClients(v []*UserPoolClientDescription) *ListUserPoolClientsOutput { - s.UserPoolClients = v - return s -} - -// Represents the request to list user pools. -type ListUserPoolsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results you want the request to return when listing - // the user pools. - // - // MaxResults is a required field - MaxResults *int64 `min:"1" type:"integer" required:"true"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListUserPoolsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUserPoolsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUserPoolsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUserPoolsInput"} - if s.MaxResults == nil { - invalidParams.Add(request.NewErrParamRequired("MaxResults")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListUserPoolsInput) SetMaxResults(v int64) *ListUserPoolsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUserPoolsInput) SetNextToken(v string) *ListUserPoolsInput { - s.NextToken = &v - return s -} - -// Represents the response to list user pools. -type ListUserPoolsOutput struct { - _ struct{} `type:"structure"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `min:"1" type:"string"` - - // The user pools from the response to list users. - UserPools []*UserPoolDescriptionType `type:"list"` -} - -// String returns the string representation -func (s ListUserPoolsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUserPoolsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUserPoolsOutput) SetNextToken(v string) *ListUserPoolsOutput { - s.NextToken = &v - return s -} - -// SetUserPools sets the UserPools field's value. -func (s *ListUserPoolsOutput) SetUserPools(v []*UserPoolDescriptionType) *ListUserPoolsOutput { - s.UserPools = v - return s -} - -type ListUsersInGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the group. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The limit of the request to list users. - Limit *int64 `type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `min:"1" type:"string"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListUsersInGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUsersInGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUsersInGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUsersInGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *ListUsersInGroupInput) SetGroupName(v string) *ListUsersInGroupInput { - s.GroupName = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListUsersInGroupInput) SetLimit(v int64) *ListUsersInGroupInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUsersInGroupInput) SetNextToken(v string) *ListUsersInGroupInput { - s.NextToken = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *ListUsersInGroupInput) SetUserPoolId(v string) *ListUsersInGroupInput { - s.UserPoolId = &v - return s -} - -type ListUsersInGroupOutput struct { - _ struct{} `type:"structure"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `min:"1" type:"string"` - - // The users returned in the request to list users. - Users []*UserType `type:"list"` -} - -// String returns the string representation -func (s ListUsersInGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUsersInGroupOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUsersInGroupOutput) SetNextToken(v string) *ListUsersInGroupOutput { - s.NextToken = &v - return s -} - -// SetUsers sets the Users field's value. -func (s *ListUsersInGroupOutput) SetUsers(v []*UserType) *ListUsersInGroupOutput { - s.Users = v - return s -} - -// Represents the request to list users. -type ListUsersInput struct { - _ struct{} `type:"structure"` - - // An array of strings, where each string is the name of a user attribute to - // be returned for each user in the search results. If the array is null, all - // attributes are returned. - AttributesToGet []*string `type:"list"` - - // A filter string of the form "AttributeNameFilter-Type "AttributeValue"". - // Quotation marks within the filter string must be escaped using the backslash - // (\) character. For example, "family_name = \"Reddy\"". - // - // * AttributeName: The name of the attribute to search for. You can only - // search for one attribute at a time. - // - // * Filter-Type: For an exact match, use =, for example, "given_name = \"Jon\"". - // For a prefix ("starts with") match, use ^=, for example, "given_name ^= - // \"Jon\"". - // - // * AttributeValue: The attribute value that must be matched for each user. - // - // If the filter string is empty, ListUsers returns all users in the user pool. - // - // You can only search for the following standard attributes: - // - // * username (case-sensitive) - // - // * email - // - // * phone_number - // - // * name - // - // * given_name - // - // * family_name - // - // * preferred_username - // - // * cognito:user_status (called Status in the Console) (case-insensitive) - // - // * status (called Enabled in the Console) (case-sensitive) - // - // * sub - // - // Custom attributes are not searchable. - // - // For more information, see Searching for Users Using the ListUsers API (http://docs.aws.amazon.com/cognito/latest/developerguide/how-to-manage-user-accounts.html#cognito-user-pools-searching-for-users-using-listusers-api) - // and Examples of Using the ListUsers API (http://docs.aws.amazon.com/cognito/latest/developerguide/how-to-manage-user-accounts.html#cognito-user-pools-searching-for-users-listusers-api-examples) - // in the Amazon Cognito Developer Guide. - Filter *string `type:"string"` - - // Maximum number of users to be returned. - Limit *int64 `type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - PaginationToken *string `min:"1" type:"string"` - - // The user pool ID for the user pool on which the search should be performed. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListUsersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUsersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUsersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUsersInput"} - if s.PaginationToken != nil && len(*s.PaginationToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PaginationToken", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributesToGet sets the AttributesToGet field's value. -func (s *ListUsersInput) SetAttributesToGet(v []*string) *ListUsersInput { - s.AttributesToGet = v - return s -} - -// SetFilter sets the Filter field's value. -func (s *ListUsersInput) SetFilter(v string) *ListUsersInput { - s.Filter = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListUsersInput) SetLimit(v int64) *ListUsersInput { - s.Limit = &v - return s -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *ListUsersInput) SetPaginationToken(v string) *ListUsersInput { - s.PaginationToken = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *ListUsersInput) SetUserPoolId(v string) *ListUsersInput { - s.UserPoolId = &v - return s -} - -// The response from the request to list users. -type ListUsersOutput struct { - _ struct{} `type:"structure"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - PaginationToken *string `min:"1" type:"string"` - - // The users returned in the request to list users. - Users []*UserType `type:"list"` -} - -// String returns the string representation -func (s ListUsersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUsersOutput) GoString() string { - return s.String() -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *ListUsersOutput) SetPaginationToken(v string) *ListUsersOutput { - s.PaginationToken = &v - return s -} - -// SetUsers sets the Users field's value. -func (s *ListUsersOutput) SetUsers(v []*UserType) *ListUsersOutput { - s.Users = v - return s -} - -// Specifies the different settings for multi-factor authentication (MFA). -type MFAOptionType struct { - _ struct{} `type:"structure"` - - // The attribute name of the MFA option type. - AttributeName *string `min:"1" type:"string"` - - // The delivery medium (email message or SMS message) to send the MFA code. - DeliveryMedium *string `type:"string" enum:"DeliveryMediumType"` -} - -// String returns the string representation -func (s MFAOptionType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MFAOptionType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MFAOptionType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MFAOptionType"} - if s.AttributeName != nil && len(*s.AttributeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeName sets the AttributeName field's value. -func (s *MFAOptionType) SetAttributeName(v string) *MFAOptionType { - s.AttributeName = &v - return s -} - -// SetDeliveryMedium sets the DeliveryMedium field's value. -func (s *MFAOptionType) SetDeliveryMedium(v string) *MFAOptionType { - s.DeliveryMedium = &v - return s -} - -// The message template structure. -type MessageTemplateType struct { - _ struct{} `type:"structure"` - - // The message template for email messages. - EmailMessage *string `min:"6" type:"string"` - - // The subject line for email messages. - EmailSubject *string `min:"1" type:"string"` - - // The message template for SMS messages. - SMSMessage *string `min:"6" type:"string"` -} - -// String returns the string representation -func (s MessageTemplateType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MessageTemplateType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MessageTemplateType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MessageTemplateType"} - if s.EmailMessage != nil && len(*s.EmailMessage) < 6 { - invalidParams.Add(request.NewErrParamMinLen("EmailMessage", 6)) - } - if s.EmailSubject != nil && len(*s.EmailSubject) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EmailSubject", 1)) - } - if s.SMSMessage != nil && len(*s.SMSMessage) < 6 { - invalidParams.Add(request.NewErrParamMinLen("SMSMessage", 6)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEmailMessage sets the EmailMessage field's value. -func (s *MessageTemplateType) SetEmailMessage(v string) *MessageTemplateType { - s.EmailMessage = &v - return s -} - -// SetEmailSubject sets the EmailSubject field's value. -func (s *MessageTemplateType) SetEmailSubject(v string) *MessageTemplateType { - s.EmailSubject = &v - return s -} - -// SetSMSMessage sets the SMSMessage field's value. -func (s *MessageTemplateType) SetSMSMessage(v string) *MessageTemplateType { - s.SMSMessage = &v - return s -} - -// The new device metadata type. -type NewDeviceMetadataType struct { - _ struct{} `type:"structure"` - - // The device group key. - DeviceGroupKey *string `type:"string"` - - // The device key. - DeviceKey *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s NewDeviceMetadataType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NewDeviceMetadataType) GoString() string { - return s.String() -} - -// SetDeviceGroupKey sets the DeviceGroupKey field's value. -func (s *NewDeviceMetadataType) SetDeviceGroupKey(v string) *NewDeviceMetadataType { - s.DeviceGroupKey = &v - return s -} - -// SetDeviceKey sets the DeviceKey field's value. -func (s *NewDeviceMetadataType) SetDeviceKey(v string) *NewDeviceMetadataType { - s.DeviceKey = &v - return s -} - -// The notify configuration type. -type NotifyConfigurationType struct { - _ struct{} `type:"structure"` - - // Email template used when a detected risk event is blocked. - BlockEmail *NotifyEmailType `type:"structure"` - - // The email address that is sending the email. It must be either individually - // verified with Amazon SES, or from a domain that has been verified with Amazon - // SES. - From *string `type:"string"` - - // The MFA email template used when MFA is challenged as part of a detected - // risk. - MfaEmail *NotifyEmailType `type:"structure"` - - // The email template used when a detected risk event is allowed. - NoActionEmail *NotifyEmailType `type:"structure"` - - // The destination to which the receiver of an email should reply to. - ReplyTo *string `type:"string"` - - // The Amazon Resource Name (ARN) of the identity that is associated with the - // sending authorization policy. It permits Amazon Cognito to send for the email - // address specified in the From parameter. - // - // SourceArn is a required field - SourceArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s NotifyConfigurationType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NotifyConfigurationType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NotifyConfigurationType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NotifyConfigurationType"} - if s.SourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("SourceArn")) - } - if s.SourceArn != nil && len(*s.SourceArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SourceArn", 20)) - } - if s.BlockEmail != nil { - if err := s.BlockEmail.Validate(); err != nil { - invalidParams.AddNested("BlockEmail", err.(request.ErrInvalidParams)) - } - } - if s.MfaEmail != nil { - if err := s.MfaEmail.Validate(); err != nil { - invalidParams.AddNested("MfaEmail", err.(request.ErrInvalidParams)) - } - } - if s.NoActionEmail != nil { - if err := s.NoActionEmail.Validate(); err != nil { - invalidParams.AddNested("NoActionEmail", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBlockEmail sets the BlockEmail field's value. -func (s *NotifyConfigurationType) SetBlockEmail(v *NotifyEmailType) *NotifyConfigurationType { - s.BlockEmail = v - return s -} - -// SetFrom sets the From field's value. -func (s *NotifyConfigurationType) SetFrom(v string) *NotifyConfigurationType { - s.From = &v - return s -} - -// SetMfaEmail sets the MfaEmail field's value. -func (s *NotifyConfigurationType) SetMfaEmail(v *NotifyEmailType) *NotifyConfigurationType { - s.MfaEmail = v - return s -} - -// SetNoActionEmail sets the NoActionEmail field's value. -func (s *NotifyConfigurationType) SetNoActionEmail(v *NotifyEmailType) *NotifyConfigurationType { - s.NoActionEmail = v - return s -} - -// SetReplyTo sets the ReplyTo field's value. -func (s *NotifyConfigurationType) SetReplyTo(v string) *NotifyConfigurationType { - s.ReplyTo = &v - return s -} - -// SetSourceArn sets the SourceArn field's value. -func (s *NotifyConfigurationType) SetSourceArn(v string) *NotifyConfigurationType { - s.SourceArn = &v - return s -} - -// The notify email type. -type NotifyEmailType struct { - _ struct{} `type:"structure"` - - // The HTML body. - HtmlBody *string `min:"6" type:"string"` - - // The subject. - // - // Subject is a required field - Subject *string `min:"1" type:"string" required:"true"` - - // The text body. - TextBody *string `min:"6" type:"string"` -} - -// String returns the string representation -func (s NotifyEmailType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NotifyEmailType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NotifyEmailType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NotifyEmailType"} - if s.HtmlBody != nil && len(*s.HtmlBody) < 6 { - invalidParams.Add(request.NewErrParamMinLen("HtmlBody", 6)) - } - if s.Subject == nil { - invalidParams.Add(request.NewErrParamRequired("Subject")) - } - if s.Subject != nil && len(*s.Subject) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Subject", 1)) - } - if s.TextBody != nil && len(*s.TextBody) < 6 { - invalidParams.Add(request.NewErrParamMinLen("TextBody", 6)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHtmlBody sets the HtmlBody field's value. -func (s *NotifyEmailType) SetHtmlBody(v string) *NotifyEmailType { - s.HtmlBody = &v - return s -} - -// SetSubject sets the Subject field's value. -func (s *NotifyEmailType) SetSubject(v string) *NotifyEmailType { - s.Subject = &v - return s -} - -// SetTextBody sets the TextBody field's value. -func (s *NotifyEmailType) SetTextBody(v string) *NotifyEmailType { - s.TextBody = &v - return s -} - -// The minimum and maximum value of an attribute that is of the number data -// type. -type NumberAttributeConstraintsType struct { - _ struct{} `type:"structure"` - - // The maximum value of an attribute that is of the number data type. - MaxValue *string `type:"string"` - - // The minimum value of an attribute that is of the number data type. - MinValue *string `type:"string"` -} - -// String returns the string representation -func (s NumberAttributeConstraintsType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NumberAttributeConstraintsType) GoString() string { - return s.String() -} - -// SetMaxValue sets the MaxValue field's value. -func (s *NumberAttributeConstraintsType) SetMaxValue(v string) *NumberAttributeConstraintsType { - s.MaxValue = &v - return s -} - -// SetMinValue sets the MinValue field's value. -func (s *NumberAttributeConstraintsType) SetMinValue(v string) *NumberAttributeConstraintsType { - s.MinValue = &v - return s -} - -// The password policy type. -type PasswordPolicyType struct { - _ struct{} `type:"structure"` - - // The minimum length of the password policy that you have set. Cannot be less - // than 6. - MinimumLength *int64 `min:"6" type:"integer"` - - // In the password policy that you have set, refers to whether you have required - // users to use at least one lowercase letter in their password. - RequireLowercase *bool `type:"boolean"` - - // In the password policy that you have set, refers to whether you have required - // users to use at least one number in their password. - RequireNumbers *bool `type:"boolean"` - - // In the password policy that you have set, refers to whether you have required - // users to use at least one symbol in their password. - RequireSymbols *bool `type:"boolean"` - - // In the password policy that you have set, refers to whether you have required - // users to use at least one uppercase letter in their password. - RequireUppercase *bool `type:"boolean"` -} - -// String returns the string representation -func (s PasswordPolicyType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PasswordPolicyType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PasswordPolicyType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PasswordPolicyType"} - if s.MinimumLength != nil && *s.MinimumLength < 6 { - invalidParams.Add(request.NewErrParamMinValue("MinimumLength", 6)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMinimumLength sets the MinimumLength field's value. -func (s *PasswordPolicyType) SetMinimumLength(v int64) *PasswordPolicyType { - s.MinimumLength = &v - return s -} - -// SetRequireLowercase sets the RequireLowercase field's value. -func (s *PasswordPolicyType) SetRequireLowercase(v bool) *PasswordPolicyType { - s.RequireLowercase = &v - return s -} - -// SetRequireNumbers sets the RequireNumbers field's value. -func (s *PasswordPolicyType) SetRequireNumbers(v bool) *PasswordPolicyType { - s.RequireNumbers = &v - return s -} - -// SetRequireSymbols sets the RequireSymbols field's value. -func (s *PasswordPolicyType) SetRequireSymbols(v bool) *PasswordPolicyType { - s.RequireSymbols = &v - return s -} - -// SetRequireUppercase sets the RequireUppercase field's value. -func (s *PasswordPolicyType) SetRequireUppercase(v bool) *PasswordPolicyType { - s.RequireUppercase = &v - return s -} - -// A container for identity provider details. -type ProviderDescription struct { - _ struct{} `type:"structure"` - - // The date the provider was added to the user pool. - CreationDate *time.Time `type:"timestamp"` - - // The date the provider was last modified. - LastModifiedDate *time.Time `type:"timestamp"` - - // The identity provider name. - ProviderName *string `min:"1" type:"string"` - - // The identity provider type. - ProviderType *string `type:"string" enum:"IdentityProviderTypeType"` -} - -// String returns the string representation -func (s ProviderDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProviderDescription) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *ProviderDescription) SetCreationDate(v time.Time) *ProviderDescription { - s.CreationDate = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *ProviderDescription) SetLastModifiedDate(v time.Time) *ProviderDescription { - s.LastModifiedDate = &v - return s -} - -// SetProviderName sets the ProviderName field's value. -func (s *ProviderDescription) SetProviderName(v string) *ProviderDescription { - s.ProviderName = &v - return s -} - -// SetProviderType sets the ProviderType field's value. -func (s *ProviderDescription) SetProviderType(v string) *ProviderDescription { - s.ProviderType = &v - return s -} - -// A container for information about an identity provider for a user pool. -type ProviderUserIdentifierType struct { - _ struct{} `type:"structure"` - - // The name of the provider attribute to link to, for example, NameID. - ProviderAttributeName *string `type:"string"` - - // The value of the provider attribute to link to, for example, xxxxx_account. - ProviderAttributeValue *string `type:"string"` - - // The name of the provider, for example, Facebook, Google, or Login with Amazon. - ProviderName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ProviderUserIdentifierType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProviderUserIdentifierType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProviderUserIdentifierType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProviderUserIdentifierType"} - if s.ProviderName != nil && len(*s.ProviderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProviderName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetProviderAttributeName sets the ProviderAttributeName field's value. -func (s *ProviderUserIdentifierType) SetProviderAttributeName(v string) *ProviderUserIdentifierType { - s.ProviderAttributeName = &v - return s -} - -// SetProviderAttributeValue sets the ProviderAttributeValue field's value. -func (s *ProviderUserIdentifierType) SetProviderAttributeValue(v string) *ProviderUserIdentifierType { - s.ProviderAttributeValue = &v - return s -} - -// SetProviderName sets the ProviderName field's value. -func (s *ProviderUserIdentifierType) SetProviderName(v string) *ProviderUserIdentifierType { - s.ProviderName = &v - return s -} - -// Represents the request to resend the confirmation code. -type ResendConfirmationCodeInput struct { - _ struct{} `type:"structure"` - - // The Amazon Pinpoint analytics metadata for collecting metrics for ResendConfirmationCode - // calls. - AnalyticsMetadata *AnalyticsMetadataType `type:"structure"` - - // The ID of the client associated with the user pool. - // - // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // A keyed-hash message authentication code (HMAC) calculated using the secret - // key of a user pool client and username plus the client ID in the message. - SecretHash *string `min:"1" type:"string" sensitive:"true"` - - // Contextual data such as the user's device fingerprint, IP address, or location - // used for evaluating the risk of an unexpected event by Amazon Cognito advanced - // security. - UserContextData *UserContextDataType `type:"structure"` - - // The user name of the user to whom you wish to resend a confirmation code. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s ResendConfirmationCodeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResendConfirmationCodeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResendConfirmationCodeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResendConfirmationCodeInput"} - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.SecretHash != nil && len(*s.SecretHash) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretHash", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalyticsMetadata sets the AnalyticsMetadata field's value. -func (s *ResendConfirmationCodeInput) SetAnalyticsMetadata(v *AnalyticsMetadataType) *ResendConfirmationCodeInput { - s.AnalyticsMetadata = v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *ResendConfirmationCodeInput) SetClientId(v string) *ResendConfirmationCodeInput { - s.ClientId = &v - return s -} - -// SetSecretHash sets the SecretHash field's value. -func (s *ResendConfirmationCodeInput) SetSecretHash(v string) *ResendConfirmationCodeInput { - s.SecretHash = &v - return s -} - -// SetUserContextData sets the UserContextData field's value. -func (s *ResendConfirmationCodeInput) SetUserContextData(v *UserContextDataType) *ResendConfirmationCodeInput { - s.UserContextData = v - return s -} - -// SetUsername sets the Username field's value. -func (s *ResendConfirmationCodeInput) SetUsername(v string) *ResendConfirmationCodeInput { - s.Username = &v - return s -} - -// The response from the server when the Amazon Cognito Your User Pools service -// makes the request to resend a confirmation code. -type ResendConfirmationCodeOutput struct { - _ struct{} `type:"structure"` - - // The code delivery details returned by the server in response to the request - // to resend the confirmation code. - CodeDeliveryDetails *CodeDeliveryDetailsType `type:"structure"` -} - -// String returns the string representation -func (s ResendConfirmationCodeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResendConfirmationCodeOutput) GoString() string { - return s.String() -} - -// SetCodeDeliveryDetails sets the CodeDeliveryDetails field's value. -func (s *ResendConfirmationCodeOutput) SetCodeDeliveryDetails(v *CodeDeliveryDetailsType) *ResendConfirmationCodeOutput { - s.CodeDeliveryDetails = v - return s -} - -// A resource server scope. -type ResourceServerScopeType struct { - _ struct{} `type:"structure"` - - // A description of the scope. - // - // ScopeDescription is a required field - ScopeDescription *string `min:"1" type:"string" required:"true"` - - // The name of the scope. - // - // ScopeName is a required field - ScopeName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ResourceServerScopeType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceServerScopeType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceServerScopeType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceServerScopeType"} - if s.ScopeDescription == nil { - invalidParams.Add(request.NewErrParamRequired("ScopeDescription")) - } - if s.ScopeDescription != nil && len(*s.ScopeDescription) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScopeDescription", 1)) - } - if s.ScopeName == nil { - invalidParams.Add(request.NewErrParamRequired("ScopeName")) - } - if s.ScopeName != nil && len(*s.ScopeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScopeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetScopeDescription sets the ScopeDescription field's value. -func (s *ResourceServerScopeType) SetScopeDescription(v string) *ResourceServerScopeType { - s.ScopeDescription = &v - return s -} - -// SetScopeName sets the ScopeName field's value. -func (s *ResourceServerScopeType) SetScopeName(v string) *ResourceServerScopeType { - s.ScopeName = &v - return s -} - -// A container for information about a resource server for a user pool. -type ResourceServerType struct { - _ struct{} `type:"structure"` - - // The identifier for the resource server. - Identifier *string `min:"1" type:"string"` - - // The name of the resource server. - Name *string `min:"1" type:"string"` - - // A list of scopes that are defined for the resource server. - Scopes []*ResourceServerScopeType `type:"list"` - - // The user pool ID for the user pool that hosts the resource server. - UserPoolId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ResourceServerType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceServerType) GoString() string { - return s.String() -} - -// SetIdentifier sets the Identifier field's value. -func (s *ResourceServerType) SetIdentifier(v string) *ResourceServerType { - s.Identifier = &v - return s -} - -// SetName sets the Name field's value. -func (s *ResourceServerType) SetName(v string) *ResourceServerType { - s.Name = &v - return s -} - -// SetScopes sets the Scopes field's value. -func (s *ResourceServerType) SetScopes(v []*ResourceServerScopeType) *ResourceServerType { - s.Scopes = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *ResourceServerType) SetUserPoolId(v string) *ResourceServerType { - s.UserPoolId = &v - return s -} - -// The request to respond to an authentication challenge. -type RespondToAuthChallengeInput struct { - _ struct{} `type:"structure"` - - // The Amazon Pinpoint analytics metadata for collecting metrics for RespondToAuthChallenge - // calls. - AnalyticsMetadata *AnalyticsMetadataType `type:"structure"` - - // The challenge name. For more information, see . - // - // ADMIN_NO_SRP_AUTH is not a valid value. - // - // ChallengeName is a required field - ChallengeName *string `type:"string" required:"true" enum:"ChallengeNameType"` - - // The challenge responses. These are inputs corresponding to the value of ChallengeName, - // for example: - // - // * SMS_MFA: SMS_MFA_CODE, USERNAME, SECRET_HASH (if app client is configured - // with client secret). - // - // * PASSWORD_VERIFIER: PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, - // TIMESTAMP, USERNAME, SECRET_HASH (if app client is configured with client - // secret). - // - // * NEW_PASSWORD_REQUIRED: NEW_PASSWORD, any other required attributes, - // USERNAME, SECRET_HASH (if app client is configured with client secret). - ChallengeResponses map[string]*string `type:"map"` - - // The app client ID. - // - // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The session which should be passed both ways in challenge-response calls - // to the service. If InitiateAuth or RespondToAuthChallenge API call determines - // that the caller needs to go through another challenge, they return a session - // with other challenge parameters. This session should be passed as it is to - // the next RespondToAuthChallenge API call. - Session *string `min:"20" type:"string"` - - // Contextual data such as the user's device fingerprint, IP address, or location - // used for evaluating the risk of an unexpected event by Amazon Cognito advanced - // security. - UserContextData *UserContextDataType `type:"structure"` -} - -// String returns the string representation -func (s RespondToAuthChallengeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RespondToAuthChallengeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RespondToAuthChallengeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RespondToAuthChallengeInput"} - if s.ChallengeName == nil { - invalidParams.Add(request.NewErrParamRequired("ChallengeName")) - } - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.Session != nil && len(*s.Session) < 20 { - invalidParams.Add(request.NewErrParamMinLen("Session", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalyticsMetadata sets the AnalyticsMetadata field's value. -func (s *RespondToAuthChallengeInput) SetAnalyticsMetadata(v *AnalyticsMetadataType) *RespondToAuthChallengeInput { - s.AnalyticsMetadata = v - return s -} - -// SetChallengeName sets the ChallengeName field's value. -func (s *RespondToAuthChallengeInput) SetChallengeName(v string) *RespondToAuthChallengeInput { - s.ChallengeName = &v - return s -} - -// SetChallengeResponses sets the ChallengeResponses field's value. -func (s *RespondToAuthChallengeInput) SetChallengeResponses(v map[string]*string) *RespondToAuthChallengeInput { - s.ChallengeResponses = v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *RespondToAuthChallengeInput) SetClientId(v string) *RespondToAuthChallengeInput { - s.ClientId = &v - return s -} - -// SetSession sets the Session field's value. -func (s *RespondToAuthChallengeInput) SetSession(v string) *RespondToAuthChallengeInput { - s.Session = &v - return s -} - -// SetUserContextData sets the UserContextData field's value. -func (s *RespondToAuthChallengeInput) SetUserContextData(v *UserContextDataType) *RespondToAuthChallengeInput { - s.UserContextData = v - return s -} - -// The response to respond to the authentication challenge. -type RespondToAuthChallengeOutput struct { - _ struct{} `type:"structure"` - - // The result returned by the server in response to the request to respond to - // the authentication challenge. - AuthenticationResult *AuthenticationResultType `type:"structure"` - - // The challenge name. For more information, see . - ChallengeName *string `type:"string" enum:"ChallengeNameType"` - - // The challenge parameters. For more information, see . - ChallengeParameters map[string]*string `type:"map"` - - // The session which should be passed both ways in challenge-response calls - // to the service. If the or API call determines that the caller needs to go - // through another challenge, they return a session with other challenge parameters. - // This session should be passed as it is to the next RespondToAuthChallenge - // API call. - Session *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s RespondToAuthChallengeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RespondToAuthChallengeOutput) GoString() string { - return s.String() -} - -// SetAuthenticationResult sets the AuthenticationResult field's value. -func (s *RespondToAuthChallengeOutput) SetAuthenticationResult(v *AuthenticationResultType) *RespondToAuthChallengeOutput { - s.AuthenticationResult = v - return s -} - -// SetChallengeName sets the ChallengeName field's value. -func (s *RespondToAuthChallengeOutput) SetChallengeName(v string) *RespondToAuthChallengeOutput { - s.ChallengeName = &v - return s -} - -// SetChallengeParameters sets the ChallengeParameters field's value. -func (s *RespondToAuthChallengeOutput) SetChallengeParameters(v map[string]*string) *RespondToAuthChallengeOutput { - s.ChallengeParameters = v - return s -} - -// SetSession sets the Session field's value. -func (s *RespondToAuthChallengeOutput) SetSession(v string) *RespondToAuthChallengeOutput { - s.Session = &v - return s -} - -// The risk configuration type. -type RiskConfigurationType struct { - _ struct{} `type:"structure"` - - // The account takeover risk configuration object including the NotifyConfiguration - // object and Actions to take in the case of an account takeover. - AccountTakeoverRiskConfiguration *AccountTakeoverRiskConfigurationType `type:"structure"` - - // The app client ID. - ClientId *string `min:"1" type:"string" sensitive:"true"` - - // The compromised credentials risk configuration object including the EventFilter - // and the EventAction - CompromisedCredentialsRiskConfiguration *CompromisedCredentialsRiskConfigurationType `type:"structure"` - - // The last modified date. - LastModifiedDate *time.Time `type:"timestamp"` - - // The configuration to override the risk decision. - RiskExceptionConfiguration *RiskExceptionConfigurationType `type:"structure"` - - // The user pool ID. - UserPoolId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s RiskConfigurationType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RiskConfigurationType) GoString() string { - return s.String() -} - -// SetAccountTakeoverRiskConfiguration sets the AccountTakeoverRiskConfiguration field's value. -func (s *RiskConfigurationType) SetAccountTakeoverRiskConfiguration(v *AccountTakeoverRiskConfigurationType) *RiskConfigurationType { - s.AccountTakeoverRiskConfiguration = v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *RiskConfigurationType) SetClientId(v string) *RiskConfigurationType { - s.ClientId = &v - return s -} - -// SetCompromisedCredentialsRiskConfiguration sets the CompromisedCredentialsRiskConfiguration field's value. -func (s *RiskConfigurationType) SetCompromisedCredentialsRiskConfiguration(v *CompromisedCredentialsRiskConfigurationType) *RiskConfigurationType { - s.CompromisedCredentialsRiskConfiguration = v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *RiskConfigurationType) SetLastModifiedDate(v time.Time) *RiskConfigurationType { - s.LastModifiedDate = &v - return s -} - -// SetRiskExceptionConfiguration sets the RiskExceptionConfiguration field's value. -func (s *RiskConfigurationType) SetRiskExceptionConfiguration(v *RiskExceptionConfigurationType) *RiskConfigurationType { - s.RiskExceptionConfiguration = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *RiskConfigurationType) SetUserPoolId(v string) *RiskConfigurationType { - s.UserPoolId = &v - return s -} - -// The type of the configuration to override the risk decision. -type RiskExceptionConfigurationType struct { - _ struct{} `type:"structure"` - - // Overrides the risk decision to always block the pre-authentication requests. - // The IP range is in CIDR notation: a compact representation of an IP address - // and its associated routing prefix. - BlockedIPRangeList []*string `type:"list"` - - // Risk detection is not performed on the IP addresses in the range list. The - // IP range is in CIDR notation. - SkippedIPRangeList []*string `type:"list"` -} - -// String returns the string representation -func (s RiskExceptionConfigurationType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RiskExceptionConfigurationType) GoString() string { - return s.String() -} - -// SetBlockedIPRangeList sets the BlockedIPRangeList field's value. -func (s *RiskExceptionConfigurationType) SetBlockedIPRangeList(v []*string) *RiskExceptionConfigurationType { - s.BlockedIPRangeList = v - return s -} - -// SetSkippedIPRangeList sets the SkippedIPRangeList field's value. -func (s *RiskExceptionConfigurationType) SetSkippedIPRangeList(v []*string) *RiskExceptionConfigurationType { - s.SkippedIPRangeList = v - return s -} - -// The SMS multi-factor authentication (MFA) settings type. -type SMSMfaSettingsType struct { - _ struct{} `type:"structure"` - - // Specifies whether SMS text message MFA is enabled. - Enabled *bool `type:"boolean"` - - // The preferred MFA method. - PreferredMfa *bool `type:"boolean"` -} - -// String returns the string representation -func (s SMSMfaSettingsType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SMSMfaSettingsType) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *SMSMfaSettingsType) SetEnabled(v bool) *SMSMfaSettingsType { - s.Enabled = &v - return s -} - -// SetPreferredMfa sets the PreferredMfa field's value. -func (s *SMSMfaSettingsType) SetPreferredMfa(v bool) *SMSMfaSettingsType { - s.PreferredMfa = &v - return s -} - -// Contains information about the schema attribute. -type SchemaAttributeType struct { - _ struct{} `type:"structure"` - - // The attribute data type. - AttributeDataType *string `type:"string" enum:"AttributeDataType"` - - // Specifies whether the attribute type is developer only. - DeveloperOnlyAttribute *bool `type:"boolean"` - - // Specifies whether the value of the attribute can be changed. - // - // For any user pool attribute that's mapped to an identity provider attribute, - // you must set this parameter to true. Amazon Cognito updates mapped attributes - // when users sign in to your application through an identity provider. If an - // attribute is immutable, Amazon Cognito throws an error when it attempts to - // update the attribute. For more information, see Specifying Identity Provider - // Attribute Mappings for Your User Pool (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html). - Mutable *bool `type:"boolean"` - - // A schema attribute of the name type. - Name *string `min:"1" type:"string"` - - // Specifies the constraints for an attribute of the number type. - NumberAttributeConstraints *NumberAttributeConstraintsType `type:"structure"` - - // Specifies whether a user pool attribute is required. If the attribute is - // required and the user does not provide a value, registration or sign-in will - // fail. - Required *bool `type:"boolean"` - - // Specifies the constraints for an attribute of the string type. - StringAttributeConstraints *StringAttributeConstraintsType `type:"structure"` -} - -// String returns the string representation -func (s SchemaAttributeType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SchemaAttributeType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SchemaAttributeType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SchemaAttributeType"} - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeDataType sets the AttributeDataType field's value. -func (s *SchemaAttributeType) SetAttributeDataType(v string) *SchemaAttributeType { - s.AttributeDataType = &v - return s -} - -// SetDeveloperOnlyAttribute sets the DeveloperOnlyAttribute field's value. -func (s *SchemaAttributeType) SetDeveloperOnlyAttribute(v bool) *SchemaAttributeType { - s.DeveloperOnlyAttribute = &v - return s -} - -// SetMutable sets the Mutable field's value. -func (s *SchemaAttributeType) SetMutable(v bool) *SchemaAttributeType { - s.Mutable = &v - return s -} - -// SetName sets the Name field's value. -func (s *SchemaAttributeType) SetName(v string) *SchemaAttributeType { - s.Name = &v - return s -} - -// SetNumberAttributeConstraints sets the NumberAttributeConstraints field's value. -func (s *SchemaAttributeType) SetNumberAttributeConstraints(v *NumberAttributeConstraintsType) *SchemaAttributeType { - s.NumberAttributeConstraints = v - return s -} - -// SetRequired sets the Required field's value. -func (s *SchemaAttributeType) SetRequired(v bool) *SchemaAttributeType { - s.Required = &v - return s -} - -// SetStringAttributeConstraints sets the StringAttributeConstraints field's value. -func (s *SchemaAttributeType) SetStringAttributeConstraints(v *StringAttributeConstraintsType) *SchemaAttributeType { - s.StringAttributeConstraints = v - return s -} - -type SetRiskConfigurationInput struct { - _ struct{} `type:"structure"` - - // The account takeover risk configuration. - AccountTakeoverRiskConfiguration *AccountTakeoverRiskConfigurationType `type:"structure"` - - // The app client ID. If ClientId is null, then the risk configuration is mapped - // to userPoolId. When the client ID is null, the same risk configuration is - // applied to all the clients in the userPool. - // - // Otherwise, ClientId is mapped to the client. When the client ID is not null, - // the user pool configuration is overridden and the risk configuration for - // the client is used instead. - ClientId *string `min:"1" type:"string" sensitive:"true"` - - // The compromised credentials risk configuration. - CompromisedCredentialsRiskConfiguration *CompromisedCredentialsRiskConfigurationType `type:"structure"` - - // The configuration to override the risk decision. - RiskExceptionConfiguration *RiskExceptionConfigurationType `type:"structure"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SetRiskConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetRiskConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetRiskConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetRiskConfigurationInput"} - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.AccountTakeoverRiskConfiguration != nil { - if err := s.AccountTakeoverRiskConfiguration.Validate(); err != nil { - invalidParams.AddNested("AccountTakeoverRiskConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.CompromisedCredentialsRiskConfiguration != nil { - if err := s.CompromisedCredentialsRiskConfiguration.Validate(); err != nil { - invalidParams.AddNested("CompromisedCredentialsRiskConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountTakeoverRiskConfiguration sets the AccountTakeoverRiskConfiguration field's value. -func (s *SetRiskConfigurationInput) SetAccountTakeoverRiskConfiguration(v *AccountTakeoverRiskConfigurationType) *SetRiskConfigurationInput { - s.AccountTakeoverRiskConfiguration = v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *SetRiskConfigurationInput) SetClientId(v string) *SetRiskConfigurationInput { - s.ClientId = &v - return s -} - -// SetCompromisedCredentialsRiskConfiguration sets the CompromisedCredentialsRiskConfiguration field's value. -func (s *SetRiskConfigurationInput) SetCompromisedCredentialsRiskConfiguration(v *CompromisedCredentialsRiskConfigurationType) *SetRiskConfigurationInput { - s.CompromisedCredentialsRiskConfiguration = v - return s -} - -// SetRiskExceptionConfiguration sets the RiskExceptionConfiguration field's value. -func (s *SetRiskConfigurationInput) SetRiskExceptionConfiguration(v *RiskExceptionConfigurationType) *SetRiskConfigurationInput { - s.RiskExceptionConfiguration = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *SetRiskConfigurationInput) SetUserPoolId(v string) *SetRiskConfigurationInput { - s.UserPoolId = &v - return s -} - -type SetRiskConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The risk configuration. - // - // RiskConfiguration is a required field - RiskConfiguration *RiskConfigurationType `type:"structure" required:"true"` -} - -// String returns the string representation -func (s SetRiskConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetRiskConfigurationOutput) GoString() string { - return s.String() -} - -// SetRiskConfiguration sets the RiskConfiguration field's value. -func (s *SetRiskConfigurationOutput) SetRiskConfiguration(v *RiskConfigurationType) *SetRiskConfigurationOutput { - s.RiskConfiguration = v - return s -} - -type SetUICustomizationInput struct { - _ struct{} `type:"structure"` - - // The CSS values in the UI customization. - CSS *string `type:"string"` - - // The client ID for the client app. - ClientId *string `min:"1" type:"string" sensitive:"true"` - - // The uploaded logo image for the UI customization. - // - // ImageFile is automatically base64 encoded/decoded by the SDK. - ImageFile []byte `type:"blob"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SetUICustomizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetUICustomizationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetUICustomizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetUICustomizationInput"} - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCSS sets the CSS field's value. -func (s *SetUICustomizationInput) SetCSS(v string) *SetUICustomizationInput { - s.CSS = &v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *SetUICustomizationInput) SetClientId(v string) *SetUICustomizationInput { - s.ClientId = &v - return s -} - -// SetImageFile sets the ImageFile field's value. -func (s *SetUICustomizationInput) SetImageFile(v []byte) *SetUICustomizationInput { - s.ImageFile = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *SetUICustomizationInput) SetUserPoolId(v string) *SetUICustomizationInput { - s.UserPoolId = &v - return s -} - -type SetUICustomizationOutput struct { - _ struct{} `type:"structure"` - - // The UI customization information. - // - // UICustomization is a required field - UICustomization *UICustomizationType `type:"structure" required:"true"` -} - -// String returns the string representation -func (s SetUICustomizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetUICustomizationOutput) GoString() string { - return s.String() -} - -// SetUICustomization sets the UICustomization field's value. -func (s *SetUICustomizationOutput) SetUICustomization(v *UICustomizationType) *SetUICustomizationOutput { - s.UICustomization = v - return s -} - -type SetUserMFAPreferenceInput struct { - _ struct{} `type:"structure"` - - // The access token. - // - // AccessToken is a required field - AccessToken *string `type:"string" required:"true" sensitive:"true"` - - // The SMS text message multi-factor authentication (MFA) settings. - SMSMfaSettings *SMSMfaSettingsType `type:"structure"` - - // The time-based one-time password software token MFA settings. - SoftwareTokenMfaSettings *SoftwareTokenMfaSettingsType `type:"structure"` -} - -// String returns the string representation -func (s SetUserMFAPreferenceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetUserMFAPreferenceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetUserMFAPreferenceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetUserMFAPreferenceInput"} - if s.AccessToken == nil { - invalidParams.Add(request.NewErrParamRequired("AccessToken")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *SetUserMFAPreferenceInput) SetAccessToken(v string) *SetUserMFAPreferenceInput { - s.AccessToken = &v - return s -} - -// SetSMSMfaSettings sets the SMSMfaSettings field's value. -func (s *SetUserMFAPreferenceInput) SetSMSMfaSettings(v *SMSMfaSettingsType) *SetUserMFAPreferenceInput { - s.SMSMfaSettings = v - return s -} - -// SetSoftwareTokenMfaSettings sets the SoftwareTokenMfaSettings field's value. -func (s *SetUserMFAPreferenceInput) SetSoftwareTokenMfaSettings(v *SoftwareTokenMfaSettingsType) *SetUserMFAPreferenceInput { - s.SoftwareTokenMfaSettings = v - return s -} - -type SetUserMFAPreferenceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetUserMFAPreferenceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetUserMFAPreferenceOutput) GoString() string { - return s.String() -} - -type SetUserPoolMfaConfigInput struct { - _ struct{} `type:"structure"` - - // The MFA configuration. - MfaConfiguration *string `type:"string" enum:"UserPoolMfaType"` - - // The SMS text message MFA configuration. - SmsMfaConfiguration *SmsMfaConfigType `type:"structure"` - - // The software token MFA configuration. - SoftwareTokenMfaConfiguration *SoftwareTokenMfaConfigType `type:"structure"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SetUserPoolMfaConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetUserPoolMfaConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetUserPoolMfaConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetUserPoolMfaConfigInput"} - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.SmsMfaConfiguration != nil { - if err := s.SmsMfaConfiguration.Validate(); err != nil { - invalidParams.AddNested("SmsMfaConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMfaConfiguration sets the MfaConfiguration field's value. -func (s *SetUserPoolMfaConfigInput) SetMfaConfiguration(v string) *SetUserPoolMfaConfigInput { - s.MfaConfiguration = &v - return s -} - -// SetSmsMfaConfiguration sets the SmsMfaConfiguration field's value. -func (s *SetUserPoolMfaConfigInput) SetSmsMfaConfiguration(v *SmsMfaConfigType) *SetUserPoolMfaConfigInput { - s.SmsMfaConfiguration = v - return s -} - -// SetSoftwareTokenMfaConfiguration sets the SoftwareTokenMfaConfiguration field's value. -func (s *SetUserPoolMfaConfigInput) SetSoftwareTokenMfaConfiguration(v *SoftwareTokenMfaConfigType) *SetUserPoolMfaConfigInput { - s.SoftwareTokenMfaConfiguration = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *SetUserPoolMfaConfigInput) SetUserPoolId(v string) *SetUserPoolMfaConfigInput { - s.UserPoolId = &v - return s -} - -type SetUserPoolMfaConfigOutput struct { - _ struct{} `type:"structure"` - - // The MFA configuration. - MfaConfiguration *string `type:"string" enum:"UserPoolMfaType"` - - // The SMS text message MFA configuration. - SmsMfaConfiguration *SmsMfaConfigType `type:"structure"` - - // The software token MFA configuration. - SoftwareTokenMfaConfiguration *SoftwareTokenMfaConfigType `type:"structure"` -} - -// String returns the string representation -func (s SetUserPoolMfaConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetUserPoolMfaConfigOutput) GoString() string { - return s.String() -} - -// SetMfaConfiguration sets the MfaConfiguration field's value. -func (s *SetUserPoolMfaConfigOutput) SetMfaConfiguration(v string) *SetUserPoolMfaConfigOutput { - s.MfaConfiguration = &v - return s -} - -// SetSmsMfaConfiguration sets the SmsMfaConfiguration field's value. -func (s *SetUserPoolMfaConfigOutput) SetSmsMfaConfiguration(v *SmsMfaConfigType) *SetUserPoolMfaConfigOutput { - s.SmsMfaConfiguration = v - return s -} - -// SetSoftwareTokenMfaConfiguration sets the SoftwareTokenMfaConfiguration field's value. -func (s *SetUserPoolMfaConfigOutput) SetSoftwareTokenMfaConfiguration(v *SoftwareTokenMfaConfigType) *SetUserPoolMfaConfigOutput { - s.SoftwareTokenMfaConfiguration = v - return s -} - -// Represents the request to set user settings. -type SetUserSettingsInput struct { - _ struct{} `type:"structure"` - - // The access token for the set user settings request. - // - // AccessToken is a required field - AccessToken *string `type:"string" required:"true" sensitive:"true"` - - // Specifies the options for MFA (e.g., email or phone number). - // - // MFAOptions is a required field - MFAOptions []*MFAOptionType `type:"list" required:"true"` -} - -// String returns the string representation -func (s SetUserSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetUserSettingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetUserSettingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetUserSettingsInput"} - if s.AccessToken == nil { - invalidParams.Add(request.NewErrParamRequired("AccessToken")) - } - if s.MFAOptions == nil { - invalidParams.Add(request.NewErrParamRequired("MFAOptions")) - } - if s.MFAOptions != nil { - for i, v := range s.MFAOptions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MFAOptions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *SetUserSettingsInput) SetAccessToken(v string) *SetUserSettingsInput { - s.AccessToken = &v - return s -} - -// SetMFAOptions sets the MFAOptions field's value. -func (s *SetUserSettingsInput) SetMFAOptions(v []*MFAOptionType) *SetUserSettingsInput { - s.MFAOptions = v - return s -} - -// The response from the server for a set user settings request. -type SetUserSettingsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetUserSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetUserSettingsOutput) GoString() string { - return s.String() -} - -// Represents the request to register a user. -type SignUpInput struct { - _ struct{} `type:"structure"` - - // The Amazon Pinpoint analytics metadata for collecting metrics for SignUp - // calls. - AnalyticsMetadata *AnalyticsMetadataType `type:"structure"` - - // The ID of the client associated with the user pool. - // - // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The password of the user you wish to register. - // - // Password is a required field - Password *string `min:"6" type:"string" required:"true" sensitive:"true"` - - // A keyed-hash message authentication code (HMAC) calculated using the secret - // key of a user pool client and username plus the client ID in the message. - SecretHash *string `min:"1" type:"string" sensitive:"true"` - - // An array of name-value pairs representing user attributes. - // - // For custom attributes, you must prepend the custom: prefix to the attribute - // name. - UserAttributes []*AttributeType `type:"list"` - - // Contextual data such as the user's device fingerprint, IP address, or location - // used for evaluating the risk of an unexpected event by Amazon Cognito advanced - // security. - UserContextData *UserContextDataType `type:"structure"` - - // The user name of the user you wish to register. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The validation data in the request to register a user. - ValidationData []*AttributeType `type:"list"` -} - -// String returns the string representation -func (s SignUpInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SignUpInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SignUpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SignUpInput"} - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.Password == nil { - invalidParams.Add(request.NewErrParamRequired("Password")) - } - if s.Password != nil && len(*s.Password) < 6 { - invalidParams.Add(request.NewErrParamMinLen("Password", 6)) - } - if s.SecretHash != nil && len(*s.SecretHash) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretHash", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - if s.UserAttributes != nil { - for i, v := range s.UserAttributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "UserAttributes", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ValidationData != nil { - for i, v := range s.ValidationData { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ValidationData", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalyticsMetadata sets the AnalyticsMetadata field's value. -func (s *SignUpInput) SetAnalyticsMetadata(v *AnalyticsMetadataType) *SignUpInput { - s.AnalyticsMetadata = v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *SignUpInput) SetClientId(v string) *SignUpInput { - s.ClientId = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *SignUpInput) SetPassword(v string) *SignUpInput { - s.Password = &v - return s -} - -// SetSecretHash sets the SecretHash field's value. -func (s *SignUpInput) SetSecretHash(v string) *SignUpInput { - s.SecretHash = &v - return s -} - -// SetUserAttributes sets the UserAttributes field's value. -func (s *SignUpInput) SetUserAttributes(v []*AttributeType) *SignUpInput { - s.UserAttributes = v - return s -} - -// SetUserContextData sets the UserContextData field's value. -func (s *SignUpInput) SetUserContextData(v *UserContextDataType) *SignUpInput { - s.UserContextData = v - return s -} - -// SetUsername sets the Username field's value. -func (s *SignUpInput) SetUsername(v string) *SignUpInput { - s.Username = &v - return s -} - -// SetValidationData sets the ValidationData field's value. -func (s *SignUpInput) SetValidationData(v []*AttributeType) *SignUpInput { - s.ValidationData = v - return s -} - -// The response from the server for a registration request. -type SignUpOutput struct { - _ struct{} `type:"structure"` - - // The code delivery details returned by the server response to the user registration - // request. - CodeDeliveryDetails *CodeDeliveryDetailsType `type:"structure"` - - // A response from the server indicating that a user registration has been confirmed. - // - // UserConfirmed is a required field - UserConfirmed *bool `type:"boolean" required:"true"` - - // The UUID of the authenticated user. This is not the same as username. - // - // UserSub is a required field - UserSub *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SignUpOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SignUpOutput) GoString() string { - return s.String() -} - -// SetCodeDeliveryDetails sets the CodeDeliveryDetails field's value. -func (s *SignUpOutput) SetCodeDeliveryDetails(v *CodeDeliveryDetailsType) *SignUpOutput { - s.CodeDeliveryDetails = v - return s -} - -// SetUserConfirmed sets the UserConfirmed field's value. -func (s *SignUpOutput) SetUserConfirmed(v bool) *SignUpOutput { - s.UserConfirmed = &v - return s -} - -// SetUserSub sets the UserSub field's value. -func (s *SignUpOutput) SetUserSub(v string) *SignUpOutput { - s.UserSub = &v - return s -} - -// The SMS configuration type. -type SmsConfigurationType struct { - _ struct{} `type:"structure"` - - // The external ID. - ExternalId *string `type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service - // (SNS) caller. - // - // SnsCallerArn is a required field - SnsCallerArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s SmsConfigurationType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SmsConfigurationType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SmsConfigurationType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SmsConfigurationType"} - if s.SnsCallerArn == nil { - invalidParams.Add(request.NewErrParamRequired("SnsCallerArn")) - } - if s.SnsCallerArn != nil && len(*s.SnsCallerArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SnsCallerArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExternalId sets the ExternalId field's value. -func (s *SmsConfigurationType) SetExternalId(v string) *SmsConfigurationType { - s.ExternalId = &v - return s -} - -// SetSnsCallerArn sets the SnsCallerArn field's value. -func (s *SmsConfigurationType) SetSnsCallerArn(v string) *SmsConfigurationType { - s.SnsCallerArn = &v - return s -} - -// The SMS text message multi-factor authentication (MFA) configuration type. -type SmsMfaConfigType struct { - _ struct{} `type:"structure"` - - // The SMS authentication message. - SmsAuthenticationMessage *string `min:"6" type:"string"` - - // The SMS configuration. - SmsConfiguration *SmsConfigurationType `type:"structure"` -} - -// String returns the string representation -func (s SmsMfaConfigType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SmsMfaConfigType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SmsMfaConfigType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SmsMfaConfigType"} - if s.SmsAuthenticationMessage != nil && len(*s.SmsAuthenticationMessage) < 6 { - invalidParams.Add(request.NewErrParamMinLen("SmsAuthenticationMessage", 6)) - } - if s.SmsConfiguration != nil { - if err := s.SmsConfiguration.Validate(); err != nil { - invalidParams.AddNested("SmsConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSmsAuthenticationMessage sets the SmsAuthenticationMessage field's value. -func (s *SmsMfaConfigType) SetSmsAuthenticationMessage(v string) *SmsMfaConfigType { - s.SmsAuthenticationMessage = &v - return s -} - -// SetSmsConfiguration sets the SmsConfiguration field's value. -func (s *SmsMfaConfigType) SetSmsConfiguration(v *SmsConfigurationType) *SmsMfaConfigType { - s.SmsConfiguration = v - return s -} - -// The type used for enabling software token MFA at the user pool level. -type SoftwareTokenMfaConfigType struct { - _ struct{} `type:"structure"` - - // Specifies whether software token MFA is enabled. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s SoftwareTokenMfaConfigType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SoftwareTokenMfaConfigType) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *SoftwareTokenMfaConfigType) SetEnabled(v bool) *SoftwareTokenMfaConfigType { - s.Enabled = &v - return s -} - -// The type used for enabling software token MFA at the user level. -type SoftwareTokenMfaSettingsType struct { - _ struct{} `type:"structure"` - - // Specifies whether software token MFA is enabled. - Enabled *bool `type:"boolean"` - - // The preferred MFA method. - PreferredMfa *bool `type:"boolean"` -} - -// String returns the string representation -func (s SoftwareTokenMfaSettingsType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SoftwareTokenMfaSettingsType) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *SoftwareTokenMfaSettingsType) SetEnabled(v bool) *SoftwareTokenMfaSettingsType { - s.Enabled = &v - return s -} - -// SetPreferredMfa sets the PreferredMfa field's value. -func (s *SoftwareTokenMfaSettingsType) SetPreferredMfa(v bool) *SoftwareTokenMfaSettingsType { - s.PreferredMfa = &v - return s -} - -// Represents the request to start the user import job. -type StartUserImportJobInput struct { - _ struct{} `type:"structure"` - - // The job ID for the user import job. - // - // JobId is a required field - JobId *string `min:"1" type:"string" required:"true"` - - // The user pool ID for the user pool that the users are being imported into. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartUserImportJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartUserImportJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartUserImportJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartUserImportJobInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobId sets the JobId field's value. -func (s *StartUserImportJobInput) SetJobId(v string) *StartUserImportJobInput { - s.JobId = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *StartUserImportJobInput) SetUserPoolId(v string) *StartUserImportJobInput { - s.UserPoolId = &v - return s -} - -// Represents the response from the server to the request to start the user -// import job. -type StartUserImportJobOutput struct { - _ struct{} `type:"structure"` - - // The job object that represents the user import job. - UserImportJob *UserImportJobType `type:"structure"` -} - -// String returns the string representation -func (s StartUserImportJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartUserImportJobOutput) GoString() string { - return s.String() -} - -// SetUserImportJob sets the UserImportJob field's value. -func (s *StartUserImportJobOutput) SetUserImportJob(v *UserImportJobType) *StartUserImportJobOutput { - s.UserImportJob = v - return s -} - -// Represents the request to stop the user import job. -type StopUserImportJobInput struct { - _ struct{} `type:"structure"` - - // The job ID for the user import job. - // - // JobId is a required field - JobId *string `min:"1" type:"string" required:"true"` - - // The user pool ID for the user pool that the users are being imported into. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopUserImportJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopUserImportJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopUserImportJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopUserImportJobInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobId sets the JobId field's value. -func (s *StopUserImportJobInput) SetJobId(v string) *StopUserImportJobInput { - s.JobId = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *StopUserImportJobInput) SetUserPoolId(v string) *StopUserImportJobInput { - s.UserPoolId = &v - return s -} - -// Represents the response from the server to the request to stop the user import -// job. -type StopUserImportJobOutput struct { - _ struct{} `type:"structure"` - - // The job object that represents the user import job. - UserImportJob *UserImportJobType `type:"structure"` -} - -// String returns the string representation -func (s StopUserImportJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopUserImportJobOutput) GoString() string { - return s.String() -} - -// SetUserImportJob sets the UserImportJob field's value. -func (s *StopUserImportJobOutput) SetUserImportJob(v *UserImportJobType) *StopUserImportJobOutput { - s.UserImportJob = v - return s -} - -// The constraints associated with a string attribute. -type StringAttributeConstraintsType struct { - _ struct{} `type:"structure"` - - // The maximum length. - MaxLength *string `type:"string"` - - // The minimum length. - MinLength *string `type:"string"` -} - -// String returns the string representation -func (s StringAttributeConstraintsType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StringAttributeConstraintsType) GoString() string { - return s.String() -} - -// SetMaxLength sets the MaxLength field's value. -func (s *StringAttributeConstraintsType) SetMaxLength(v string) *StringAttributeConstraintsType { - s.MaxLength = &v - return s -} - -// SetMinLength sets the MinLength field's value. -func (s *StringAttributeConstraintsType) SetMinLength(v string) *StringAttributeConstraintsType { - s.MinLength = &v - return s -} - -// A container for the UI customization information for a user pool's built-in -// app UI. -type UICustomizationType struct { - _ struct{} `type:"structure"` - - // The CSS values in the UI customization. - CSS *string `type:"string"` - - // The CSS version number. - CSSVersion *string `type:"string"` - - // The client ID for the client app. - ClientId *string `min:"1" type:"string" sensitive:"true"` - - // The creation date for the UI customization. - CreationDate *time.Time `type:"timestamp"` - - // The logo image for the UI customization. - ImageUrl *string `type:"string"` - - // The last-modified date for the UI customization. - LastModifiedDate *time.Time `type:"timestamp"` - - // The user pool ID for the user pool. - UserPoolId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UICustomizationType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UICustomizationType) GoString() string { - return s.String() -} - -// SetCSS sets the CSS field's value. -func (s *UICustomizationType) SetCSS(v string) *UICustomizationType { - s.CSS = &v - return s -} - -// SetCSSVersion sets the CSSVersion field's value. -func (s *UICustomizationType) SetCSSVersion(v string) *UICustomizationType { - s.CSSVersion = &v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *UICustomizationType) SetClientId(v string) *UICustomizationType { - s.ClientId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *UICustomizationType) SetCreationDate(v time.Time) *UICustomizationType { - s.CreationDate = &v - return s -} - -// SetImageUrl sets the ImageUrl field's value. -func (s *UICustomizationType) SetImageUrl(v string) *UICustomizationType { - s.ImageUrl = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *UICustomizationType) SetLastModifiedDate(v time.Time) *UICustomizationType { - s.LastModifiedDate = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *UICustomizationType) SetUserPoolId(v string) *UICustomizationType { - s.UserPoolId = &v - return s -} - -type UpdateAuthEventFeedbackInput struct { - _ struct{} `type:"structure"` - - // The event ID. - // - // EventId is a required field - EventId *string `min:"1" type:"string" required:"true"` - - // The feedback token. - // - // FeedbackToken is a required field - FeedbackToken *string `type:"string" required:"true" sensitive:"true"` - - // The authentication event feedback value. - // - // FeedbackValue is a required field - FeedbackValue *string `type:"string" required:"true" enum:"FeedbackValueType"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The user pool username. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s UpdateAuthEventFeedbackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAuthEventFeedbackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAuthEventFeedbackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAuthEventFeedbackInput"} - if s.EventId == nil { - invalidParams.Add(request.NewErrParamRequired("EventId")) - } - if s.EventId != nil && len(*s.EventId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EventId", 1)) - } - if s.FeedbackToken == nil { - invalidParams.Add(request.NewErrParamRequired("FeedbackToken")) - } - if s.FeedbackValue == nil { - invalidParams.Add(request.NewErrParamRequired("FeedbackValue")) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEventId sets the EventId field's value. -func (s *UpdateAuthEventFeedbackInput) SetEventId(v string) *UpdateAuthEventFeedbackInput { - s.EventId = &v - return s -} - -// SetFeedbackToken sets the FeedbackToken field's value. -func (s *UpdateAuthEventFeedbackInput) SetFeedbackToken(v string) *UpdateAuthEventFeedbackInput { - s.FeedbackToken = &v - return s -} - -// SetFeedbackValue sets the FeedbackValue field's value. -func (s *UpdateAuthEventFeedbackInput) SetFeedbackValue(v string) *UpdateAuthEventFeedbackInput { - s.FeedbackValue = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *UpdateAuthEventFeedbackInput) SetUserPoolId(v string) *UpdateAuthEventFeedbackInput { - s.UserPoolId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *UpdateAuthEventFeedbackInput) SetUsername(v string) *UpdateAuthEventFeedbackInput { - s.Username = &v - return s -} - -type UpdateAuthEventFeedbackOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateAuthEventFeedbackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAuthEventFeedbackOutput) GoString() string { - return s.String() -} - -// Represents the request to update the device status. -type UpdateDeviceStatusInput struct { - _ struct{} `type:"structure"` - - // The access token. - // - // AccessToken is a required field - AccessToken *string `type:"string" required:"true" sensitive:"true"` - - // The device key. - // - // DeviceKey is a required field - DeviceKey *string `min:"1" type:"string" required:"true"` - - // The status of whether a device is remembered. - DeviceRememberedStatus *string `type:"string" enum:"DeviceRememberedStatusType"` -} - -// String returns the string representation -func (s UpdateDeviceStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDeviceStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDeviceStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDeviceStatusInput"} - if s.AccessToken == nil { - invalidParams.Add(request.NewErrParamRequired("AccessToken")) - } - if s.DeviceKey == nil { - invalidParams.Add(request.NewErrParamRequired("DeviceKey")) - } - if s.DeviceKey != nil && len(*s.DeviceKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeviceKey", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *UpdateDeviceStatusInput) SetAccessToken(v string) *UpdateDeviceStatusInput { - s.AccessToken = &v - return s -} - -// SetDeviceKey sets the DeviceKey field's value. -func (s *UpdateDeviceStatusInput) SetDeviceKey(v string) *UpdateDeviceStatusInput { - s.DeviceKey = &v - return s -} - -// SetDeviceRememberedStatus sets the DeviceRememberedStatus field's value. -func (s *UpdateDeviceStatusInput) SetDeviceRememberedStatus(v string) *UpdateDeviceStatusInput { - s.DeviceRememberedStatus = &v - return s -} - -// The response to the request to update the device status. -type UpdateDeviceStatusOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateDeviceStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDeviceStatusOutput) GoString() string { - return s.String() -} - -type UpdateGroupInput struct { - _ struct{} `type:"structure"` - - // A string containing the new description of the group. - Description *string `type:"string"` - - // The name of the group. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The new precedence value for the group. For more information about this parameter, - // see . - Precedence *int64 `type:"integer"` - - // The new role ARN for the group. This is used for setting the cognito:roles - // and cognito:preferred_role claims in the token. - RoleArn *string `min:"20" type:"string"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// 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.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateGroupInput) SetDescription(v string) *UpdateGroupInput { - s.Description = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *UpdateGroupInput) SetGroupName(v string) *UpdateGroupInput { - s.GroupName = &v - return s -} - -// SetPrecedence sets the Precedence field's value. -func (s *UpdateGroupInput) SetPrecedence(v int64) *UpdateGroupInput { - s.Precedence = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *UpdateGroupInput) SetRoleArn(v string) *UpdateGroupInput { - s.RoleArn = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *UpdateGroupInput) SetUserPoolId(v string) *UpdateGroupInput { - s.UserPoolId = &v - return s -} - -type UpdateGroupOutput struct { - _ struct{} `type:"structure"` - - // The group object for the group. - Group *GroupType `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() -} - -// SetGroup sets the Group field's value. -func (s *UpdateGroupOutput) SetGroup(v *GroupType) *UpdateGroupOutput { - s.Group = v - return s -} - -type UpdateIdentityProviderInput struct { - _ struct{} `type:"structure"` - - // The identity provider attribute mapping to be changed. - AttributeMapping map[string]*string `type:"map"` - - // A list of identity provider identifiers. - IdpIdentifiers []*string `type:"list"` - - // The identity provider details to be updated, such as MetadataURL and MetadataFile. - ProviderDetails map[string]*string `type:"map"` - - // The identity provider name. - // - // ProviderName is a required field - ProviderName *string `min:"1" type:"string" required:"true"` - - // The user pool ID. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateIdentityProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIdentityProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateIdentityProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateIdentityProviderInput"} - if s.ProviderName == nil { - invalidParams.Add(request.NewErrParamRequired("ProviderName")) - } - if s.ProviderName != nil && len(*s.ProviderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProviderName", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeMapping sets the AttributeMapping field's value. -func (s *UpdateIdentityProviderInput) SetAttributeMapping(v map[string]*string) *UpdateIdentityProviderInput { - s.AttributeMapping = v - return s -} - -// SetIdpIdentifiers sets the IdpIdentifiers field's value. -func (s *UpdateIdentityProviderInput) SetIdpIdentifiers(v []*string) *UpdateIdentityProviderInput { - s.IdpIdentifiers = v - return s -} - -// SetProviderDetails sets the ProviderDetails field's value. -func (s *UpdateIdentityProviderInput) SetProviderDetails(v map[string]*string) *UpdateIdentityProviderInput { - s.ProviderDetails = v - return s -} - -// SetProviderName sets the ProviderName field's value. -func (s *UpdateIdentityProviderInput) SetProviderName(v string) *UpdateIdentityProviderInput { - s.ProviderName = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *UpdateIdentityProviderInput) SetUserPoolId(v string) *UpdateIdentityProviderInput { - s.UserPoolId = &v - return s -} - -type UpdateIdentityProviderOutput struct { - _ struct{} `type:"structure"` - - // The identity provider object. - // - // IdentityProvider is a required field - IdentityProvider *IdentityProviderType `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateIdentityProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIdentityProviderOutput) GoString() string { - return s.String() -} - -// SetIdentityProvider sets the IdentityProvider field's value. -func (s *UpdateIdentityProviderOutput) SetIdentityProvider(v *IdentityProviderType) *UpdateIdentityProviderOutput { - s.IdentityProvider = v - return s -} - -type UpdateResourceServerInput struct { - _ struct{} `type:"structure"` - - // The identifier for the resource server. - // - // Identifier is a required field - Identifier *string `min:"1" type:"string" required:"true"` - - // The name of the resource server. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The scope values to be set for the resource server. - Scopes []*ResourceServerScopeType `type:"list"` - - // The user pool ID for the user pool. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateResourceServerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateResourceServerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateResourceServerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateResourceServerInput"} - if s.Identifier == nil { - invalidParams.Add(request.NewErrParamRequired("Identifier")) - } - if s.Identifier != nil && len(*s.Identifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Identifier", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.Scopes != nil { - for i, v := range s.Scopes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Scopes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentifier sets the Identifier field's value. -func (s *UpdateResourceServerInput) SetIdentifier(v string) *UpdateResourceServerInput { - s.Identifier = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateResourceServerInput) SetName(v string) *UpdateResourceServerInput { - s.Name = &v - return s -} - -// SetScopes sets the Scopes field's value. -func (s *UpdateResourceServerInput) SetScopes(v []*ResourceServerScopeType) *UpdateResourceServerInput { - s.Scopes = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *UpdateResourceServerInput) SetUserPoolId(v string) *UpdateResourceServerInput { - s.UserPoolId = &v - return s -} - -type UpdateResourceServerOutput struct { - _ struct{} `type:"structure"` - - // The resource server. - // - // ResourceServer is a required field - ResourceServer *ResourceServerType `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateResourceServerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateResourceServerOutput) GoString() string { - return s.String() -} - -// SetResourceServer sets the ResourceServer field's value. -func (s *UpdateResourceServerOutput) SetResourceServer(v *ResourceServerType) *UpdateResourceServerOutput { - s.ResourceServer = v - return s -} - -// Represents the request to update user attributes. -type UpdateUserAttributesInput struct { - _ struct{} `type:"structure"` - - // The access token for the request to update user attributes. - // - // AccessToken is a required field - AccessToken *string `type:"string" required:"true" sensitive:"true"` - - // An array of name-value pairs representing user attributes. - // - // For custom attributes, you must prepend the custom: prefix to the attribute - // name. - // - // UserAttributes is a required field - UserAttributes []*AttributeType `type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateUserAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateUserAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateUserAttributesInput"} - if s.AccessToken == nil { - invalidParams.Add(request.NewErrParamRequired("AccessToken")) - } - if s.UserAttributes == nil { - invalidParams.Add(request.NewErrParamRequired("UserAttributes")) - } - if s.UserAttributes != nil { - for i, v := range s.UserAttributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "UserAttributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *UpdateUserAttributesInput) SetAccessToken(v string) *UpdateUserAttributesInput { - s.AccessToken = &v - return s -} - -// SetUserAttributes sets the UserAttributes field's value. -func (s *UpdateUserAttributesInput) SetUserAttributes(v []*AttributeType) *UpdateUserAttributesInput { - s.UserAttributes = v - return s -} - -// Represents the response from the server for the request to update user attributes. -type UpdateUserAttributesOutput struct { - _ struct{} `type:"structure"` - - // The code delivery details list from the server for the request to update - // user attributes. - CodeDeliveryDetailsList []*CodeDeliveryDetailsType `type:"list"` -} - -// String returns the string representation -func (s UpdateUserAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserAttributesOutput) GoString() string { - return s.String() -} - -// SetCodeDeliveryDetailsList sets the CodeDeliveryDetailsList field's value. -func (s *UpdateUserAttributesOutput) SetCodeDeliveryDetailsList(v []*CodeDeliveryDetailsType) *UpdateUserAttributesOutput { - s.CodeDeliveryDetailsList = v - return s -} - -// Represents the request to update the user pool client. -type UpdateUserPoolClientInput struct { - _ struct{} `type:"structure"` - - // Set to code to initiate a code grant flow, which provides an authorization - // code as the response. This code can be exchanged for access tokens with the - // token endpoint. - // - // Set to token to specify that the client should get the access token (and, - // optionally, ID token, based on scopes) directly. - AllowedOAuthFlows []*string `type:"list"` - - // Set to TRUE if the client is allowed to follow the OAuth protocol when interacting - // with Cognito user pools. - AllowedOAuthFlowsUserPoolClient *bool `type:"boolean"` - - // A list of allowed OAuth scopes. Currently supported values are "phone", "email", - // "openid", and "Cognito". - AllowedOAuthScopes []*string `type:"list"` - - // The Amazon Pinpoint analytics configuration for collecting metrics for this - // user pool. - AnalyticsConfiguration *AnalyticsConfigurationType `type:"structure"` - - // A list of allowed redirect (callback) URLs for the identity providers. - // - // A redirect URI must: - // - // * Be an absolute URI. - // - // * Be registered with the authorization server. - // - // * Not include a fragment component. - // - // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). - // - // Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing - // purposes only. - // - // App callback URLs such as myapp://example are also supported. - CallbackURLs []*string `type:"list"` - - // The ID of the client associated with the user pool. - // - // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The client name from the update user pool client request. - ClientName *string `min:"1" type:"string"` - - // The default redirect URI. Must be in the CallbackURLs list. - // - // A redirect URI must: - // - // * Be an absolute URI. - // - // * Be registered with the authorization server. - // - // * Not include a fragment component. - // - // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). - // - // Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing - // purposes only. - // - // App callback URLs such as myapp://example are also supported. - DefaultRedirectURI *string `min:"1" type:"string"` - - // Explicit authentication flows. - ExplicitAuthFlows []*string `type:"list"` - - // A list of allowed logout URLs for the identity providers. - LogoutURLs []*string `type:"list"` - - // The read-only attributes of the user pool. - ReadAttributes []*string `type:"list"` - - // The time limit, in days, after which the refresh token is no longer valid - // and cannot be used. - RefreshTokenValidity *int64 `type:"integer"` - - // A list of provider names for the identity providers that are supported on - // this client. - SupportedIdentityProviders []*string `type:"list"` - - // The user pool ID for the user pool where you want to update the user pool - // client. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The writeable attributes of the user pool. - WriteAttributes []*string `type:"list"` -} - -// String returns the string representation -func (s UpdateUserPoolClientInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserPoolClientInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateUserPoolClientInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateUserPoolClientInput"} - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.ClientName != nil && len(*s.ClientName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientName", 1)) - } - if s.DefaultRedirectURI != nil && len(*s.DefaultRedirectURI) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DefaultRedirectURI", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.AnalyticsConfiguration != nil { - if err := s.AnalyticsConfiguration.Validate(); err != nil { - invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowedOAuthFlows sets the AllowedOAuthFlows field's value. -func (s *UpdateUserPoolClientInput) SetAllowedOAuthFlows(v []*string) *UpdateUserPoolClientInput { - s.AllowedOAuthFlows = v - return s -} - -// SetAllowedOAuthFlowsUserPoolClient sets the AllowedOAuthFlowsUserPoolClient field's value. -func (s *UpdateUserPoolClientInput) SetAllowedOAuthFlowsUserPoolClient(v bool) *UpdateUserPoolClientInput { - s.AllowedOAuthFlowsUserPoolClient = &v - return s -} - -// SetAllowedOAuthScopes sets the AllowedOAuthScopes field's value. -func (s *UpdateUserPoolClientInput) SetAllowedOAuthScopes(v []*string) *UpdateUserPoolClientInput { - s.AllowedOAuthScopes = v - return s -} - -// SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value. -func (s *UpdateUserPoolClientInput) SetAnalyticsConfiguration(v *AnalyticsConfigurationType) *UpdateUserPoolClientInput { - s.AnalyticsConfiguration = v - return s -} - -// SetCallbackURLs sets the CallbackURLs field's value. -func (s *UpdateUserPoolClientInput) SetCallbackURLs(v []*string) *UpdateUserPoolClientInput { - s.CallbackURLs = v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *UpdateUserPoolClientInput) SetClientId(v string) *UpdateUserPoolClientInput { - s.ClientId = &v - return s -} - -// SetClientName sets the ClientName field's value. -func (s *UpdateUserPoolClientInput) SetClientName(v string) *UpdateUserPoolClientInput { - s.ClientName = &v - return s -} - -// SetDefaultRedirectURI sets the DefaultRedirectURI field's value. -func (s *UpdateUserPoolClientInput) SetDefaultRedirectURI(v string) *UpdateUserPoolClientInput { - s.DefaultRedirectURI = &v - return s -} - -// SetExplicitAuthFlows sets the ExplicitAuthFlows field's value. -func (s *UpdateUserPoolClientInput) SetExplicitAuthFlows(v []*string) *UpdateUserPoolClientInput { - s.ExplicitAuthFlows = v - return s -} - -// SetLogoutURLs sets the LogoutURLs field's value. -func (s *UpdateUserPoolClientInput) SetLogoutURLs(v []*string) *UpdateUserPoolClientInput { - s.LogoutURLs = v - return s -} - -// SetReadAttributes sets the ReadAttributes field's value. -func (s *UpdateUserPoolClientInput) SetReadAttributes(v []*string) *UpdateUserPoolClientInput { - s.ReadAttributes = v - return s -} - -// SetRefreshTokenValidity sets the RefreshTokenValidity field's value. -func (s *UpdateUserPoolClientInput) SetRefreshTokenValidity(v int64) *UpdateUserPoolClientInput { - s.RefreshTokenValidity = &v - return s -} - -// SetSupportedIdentityProviders sets the SupportedIdentityProviders field's value. -func (s *UpdateUserPoolClientInput) SetSupportedIdentityProviders(v []*string) *UpdateUserPoolClientInput { - s.SupportedIdentityProviders = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *UpdateUserPoolClientInput) SetUserPoolId(v string) *UpdateUserPoolClientInput { - s.UserPoolId = &v - return s -} - -// SetWriteAttributes sets the WriteAttributes field's value. -func (s *UpdateUserPoolClientInput) SetWriteAttributes(v []*string) *UpdateUserPoolClientInput { - s.WriteAttributes = v - return s -} - -// Represents the response from the server to the request to update the user -// pool client. -type UpdateUserPoolClientOutput struct { - _ struct{} `type:"structure"` - - // The user pool client value from the response from the server when an update - // user pool client request is made. - UserPoolClient *UserPoolClientType `type:"structure"` -} - -// String returns the string representation -func (s UpdateUserPoolClientOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserPoolClientOutput) GoString() string { - return s.String() -} - -// SetUserPoolClient sets the UserPoolClient field's value. -func (s *UpdateUserPoolClientOutput) SetUserPoolClient(v *UserPoolClientType) *UpdateUserPoolClientOutput { - s.UserPoolClient = v - return s -} - -// The UpdateUserPoolDomain request input. -type UpdateUserPoolDomainInput struct { - _ struct{} `type:"structure"` - - // The configuration for a custom domain that hosts the sign-up and sign-in - // pages for your application. Use this object to specify an SSL certificate - // that is managed by ACM. - // - // CustomDomainConfig is a required field - CustomDomainConfig *CustomDomainConfigType `type:"structure" required:"true"` - - // The domain name for the custom domain that hosts the sign-up and sign-in - // pages for your application. For example: auth.example.com. - // - // This string can include only lowercase letters, numbers, and hyphens. Do - // not use a hyphen for the first or last character. Use periods to separate - // subdomain names. - // - // Domain is a required field - Domain *string `min:"1" type:"string" required:"true"` - - // The ID of the user pool that is associated with the custom domain that you - // are updating the certificate for. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateUserPoolDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserPoolDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateUserPoolDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateUserPoolDomainInput"} - if s.CustomDomainConfig == nil { - invalidParams.Add(request.NewErrParamRequired("CustomDomainConfig")) - } - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.CustomDomainConfig != nil { - if err := s.CustomDomainConfig.Validate(); err != nil { - invalidParams.AddNested("CustomDomainConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomDomainConfig sets the CustomDomainConfig field's value. -func (s *UpdateUserPoolDomainInput) SetCustomDomainConfig(v *CustomDomainConfigType) *UpdateUserPoolDomainInput { - s.CustomDomainConfig = v - return s -} - -// SetDomain sets the Domain field's value. -func (s *UpdateUserPoolDomainInput) SetDomain(v string) *UpdateUserPoolDomainInput { - s.Domain = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *UpdateUserPoolDomainInput) SetUserPoolId(v string) *UpdateUserPoolDomainInput { - s.UserPoolId = &v - return s -} - -// The UpdateUserPoolDomain response output. -type UpdateUserPoolDomainOutput struct { - _ struct{} `type:"structure"` - - // The Amazon CloudFront endpoint that Amazon Cognito set up when you added - // the custom domain to your user pool. - CloudFrontDomain *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateUserPoolDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserPoolDomainOutput) GoString() string { - return s.String() -} - -// SetCloudFrontDomain sets the CloudFrontDomain field's value. -func (s *UpdateUserPoolDomainOutput) SetCloudFrontDomain(v string) *UpdateUserPoolDomainOutput { - s.CloudFrontDomain = &v - return s -} - -// Represents the request to update the user pool. -type UpdateUserPoolInput struct { - _ struct{} `type:"structure"` - - // The configuration for AdminCreateUser requests. - AdminCreateUserConfig *AdminCreateUserConfigType `type:"structure"` - - // The attributes that are automatically verified when the Amazon Cognito service - // makes a request to update user pools. - AutoVerifiedAttributes []*string `type:"list"` - - // Device configuration. - DeviceConfiguration *DeviceConfigurationType `type:"structure"` - - // Email configuration. - EmailConfiguration *EmailConfigurationType `type:"structure"` - - // The contents of the email verification message. - EmailVerificationMessage *string `min:"6" type:"string"` - - // The subject of the email verification message. - EmailVerificationSubject *string `min:"1" type:"string"` - - // The AWS Lambda configuration information from the request to update the user - // pool. - LambdaConfig *LambdaConfigType `type:"structure"` - - // Can be one of the following values: - // - // * OFF - MFA tokens are not required and cannot be specified during user - // registration. - // - // * ON - MFA tokens are required for all user registrations. You can only - // specify required when you are initially creating a user pool. - // - // * OPTIONAL - Users have the option when registering to create an MFA token. - MfaConfiguration *string `type:"string" enum:"UserPoolMfaType"` - - // A container with the policies you wish to update in a user pool. - Policies *UserPoolPolicyType `type:"structure"` - - // The contents of the SMS authentication message. - SmsAuthenticationMessage *string `min:"6" type:"string"` - - // SMS configuration. - SmsConfiguration *SmsConfigurationType `type:"structure"` - - // A container with information about the SMS verification message. - SmsVerificationMessage *string `min:"6" type:"string"` - - // Used to enable advanced security risk detection. Set the key AdvancedSecurityMode - // to the value "AUDIT". - UserPoolAddOns *UserPoolAddOnsType `type:"structure"` - - // The user pool ID for the user pool you want to update. - // - // UserPoolId is a required field - UserPoolId *string `min:"1" type:"string" required:"true"` - - // The cost allocation tags for the user pool. For more information, see Adding - // Cost Allocation Tags to Your User Pool (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-cost-allocation-tagging.html) - UserPoolTags map[string]*string `type:"map"` - - // The template for verification messages. - VerificationMessageTemplate *VerificationMessageTemplateType `type:"structure"` -} - -// String returns the string representation -func (s UpdateUserPoolInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserPoolInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateUserPoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateUserPoolInput"} - if s.EmailVerificationMessage != nil && len(*s.EmailVerificationMessage) < 6 { - invalidParams.Add(request.NewErrParamMinLen("EmailVerificationMessage", 6)) - } - if s.EmailVerificationSubject != nil && len(*s.EmailVerificationSubject) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EmailVerificationSubject", 1)) - } - if s.SmsAuthenticationMessage != nil && len(*s.SmsAuthenticationMessage) < 6 { - invalidParams.Add(request.NewErrParamMinLen("SmsAuthenticationMessage", 6)) - } - if s.SmsVerificationMessage != nil && len(*s.SmsVerificationMessage) < 6 { - invalidParams.Add(request.NewErrParamMinLen("SmsVerificationMessage", 6)) - } - if s.UserPoolId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolId")) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - if s.AdminCreateUserConfig != nil { - if err := s.AdminCreateUserConfig.Validate(); err != nil { - invalidParams.AddNested("AdminCreateUserConfig", err.(request.ErrInvalidParams)) - } - } - if s.EmailConfiguration != nil { - if err := s.EmailConfiguration.Validate(); err != nil { - invalidParams.AddNested("EmailConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.LambdaConfig != nil { - if err := s.LambdaConfig.Validate(); err != nil { - invalidParams.AddNested("LambdaConfig", err.(request.ErrInvalidParams)) - } - } - if s.Policies != nil { - if err := s.Policies.Validate(); err != nil { - invalidParams.AddNested("Policies", err.(request.ErrInvalidParams)) - } - } - if s.SmsConfiguration != nil { - if err := s.SmsConfiguration.Validate(); err != nil { - invalidParams.AddNested("SmsConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.UserPoolAddOns != nil { - if err := s.UserPoolAddOns.Validate(); err != nil { - invalidParams.AddNested("UserPoolAddOns", err.(request.ErrInvalidParams)) - } - } - if s.VerificationMessageTemplate != nil { - if err := s.VerificationMessageTemplate.Validate(); err != nil { - invalidParams.AddNested("VerificationMessageTemplate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdminCreateUserConfig sets the AdminCreateUserConfig field's value. -func (s *UpdateUserPoolInput) SetAdminCreateUserConfig(v *AdminCreateUserConfigType) *UpdateUserPoolInput { - s.AdminCreateUserConfig = v - return s -} - -// SetAutoVerifiedAttributes sets the AutoVerifiedAttributes field's value. -func (s *UpdateUserPoolInput) SetAutoVerifiedAttributes(v []*string) *UpdateUserPoolInput { - s.AutoVerifiedAttributes = v - return s -} - -// SetDeviceConfiguration sets the DeviceConfiguration field's value. -func (s *UpdateUserPoolInput) SetDeviceConfiguration(v *DeviceConfigurationType) *UpdateUserPoolInput { - s.DeviceConfiguration = v - return s -} - -// SetEmailConfiguration sets the EmailConfiguration field's value. -func (s *UpdateUserPoolInput) SetEmailConfiguration(v *EmailConfigurationType) *UpdateUserPoolInput { - s.EmailConfiguration = v - return s -} - -// SetEmailVerificationMessage sets the EmailVerificationMessage field's value. -func (s *UpdateUserPoolInput) SetEmailVerificationMessage(v string) *UpdateUserPoolInput { - s.EmailVerificationMessage = &v - return s -} - -// SetEmailVerificationSubject sets the EmailVerificationSubject field's value. -func (s *UpdateUserPoolInput) SetEmailVerificationSubject(v string) *UpdateUserPoolInput { - s.EmailVerificationSubject = &v - return s -} - -// SetLambdaConfig sets the LambdaConfig field's value. -func (s *UpdateUserPoolInput) SetLambdaConfig(v *LambdaConfigType) *UpdateUserPoolInput { - s.LambdaConfig = v - return s -} - -// SetMfaConfiguration sets the MfaConfiguration field's value. -func (s *UpdateUserPoolInput) SetMfaConfiguration(v string) *UpdateUserPoolInput { - s.MfaConfiguration = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *UpdateUserPoolInput) SetPolicies(v *UserPoolPolicyType) *UpdateUserPoolInput { - s.Policies = v - return s -} - -// SetSmsAuthenticationMessage sets the SmsAuthenticationMessage field's value. -func (s *UpdateUserPoolInput) SetSmsAuthenticationMessage(v string) *UpdateUserPoolInput { - s.SmsAuthenticationMessage = &v - return s -} - -// SetSmsConfiguration sets the SmsConfiguration field's value. -func (s *UpdateUserPoolInput) SetSmsConfiguration(v *SmsConfigurationType) *UpdateUserPoolInput { - s.SmsConfiguration = v - return s -} - -// SetSmsVerificationMessage sets the SmsVerificationMessage field's value. -func (s *UpdateUserPoolInput) SetSmsVerificationMessage(v string) *UpdateUserPoolInput { - s.SmsVerificationMessage = &v - return s -} - -// SetUserPoolAddOns sets the UserPoolAddOns field's value. -func (s *UpdateUserPoolInput) SetUserPoolAddOns(v *UserPoolAddOnsType) *UpdateUserPoolInput { - s.UserPoolAddOns = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *UpdateUserPoolInput) SetUserPoolId(v string) *UpdateUserPoolInput { - s.UserPoolId = &v - return s -} - -// SetUserPoolTags sets the UserPoolTags field's value. -func (s *UpdateUserPoolInput) SetUserPoolTags(v map[string]*string) *UpdateUserPoolInput { - s.UserPoolTags = v - return s -} - -// SetVerificationMessageTemplate sets the VerificationMessageTemplate field's value. -func (s *UpdateUserPoolInput) SetVerificationMessageTemplate(v *VerificationMessageTemplateType) *UpdateUserPoolInput { - s.VerificationMessageTemplate = v - return s -} - -// Represents the response from the server when you make a request to update -// the user pool. -type UpdateUserPoolOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateUserPoolOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserPoolOutput) GoString() string { - return s.String() -} - -// Contextual data such as the user's device fingerprint, IP address, or location -// used for evaluating the risk of an unexpected event by Amazon Cognito advanced -// security. -type UserContextDataType struct { - _ struct{} `type:"structure"` - - // Contextual data such as the user's device fingerprint, IP address, or location - // used for evaluating the risk of an unexpected event by Amazon Cognito advanced - // security. - EncodedData *string `type:"string"` -} - -// String returns the string representation -func (s UserContextDataType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserContextDataType) GoString() string { - return s.String() -} - -// SetEncodedData sets the EncodedData field's value. -func (s *UserContextDataType) SetEncodedData(v string) *UserContextDataType { - s.EncodedData = &v - return s -} - -// The user import job type. -type UserImportJobType struct { - _ struct{} `type:"structure"` - - // The role ARN for the Amazon CloudWatch Logging role for the user import job. - // For more information, see "Creating the CloudWatch Logs IAM Role" in the - // Amazon Cognito Developer Guide. - CloudWatchLogsRoleArn *string `min:"20" type:"string"` - - // The date when the user import job was completed. - CompletionDate *time.Time `type:"timestamp"` - - // The message returned when the user import job is completed. - CompletionMessage *string `min:"1" type:"string"` - - // The date the user import job was created. - CreationDate *time.Time `type:"timestamp"` - - // The number of users that could not be imported. - FailedUsers *int64 `type:"long"` - - // The number of users that were successfully imported. - ImportedUsers *int64 `type:"long"` - - // The job ID for the user import job. - JobId *string `min:"1" type:"string"` - - // The job name for the user import job. - JobName *string `min:"1" type:"string"` - - // The pre-signed URL to be used to upload the .csv file. - PreSignedUrl *string `type:"string"` - - // The number of users that were skipped. - SkippedUsers *int64 `type:"long"` - - // The date when the user import job was started. - StartDate *time.Time `type:"timestamp"` - - // The status of the user import job. One of the following: - // - // * Created - The job was created but not started. - // - // * Pending - A transition state. You have started the job, but it has not - // begun importing users yet. - // - // * InProgress - The job has started, and users are being imported. - // - // * Stopping - You have stopped the job, but the job has not stopped importing - // users yet. - // - // * Stopped - You have stopped the job, and the job has stopped importing - // users. - // - // * Succeeded - The job has completed successfully. - // - // * Failed - The job has stopped due to an error. - // - // * Expired - You created a job, but did not start the job within 24-48 - // hours. All data associated with the job was deleted, and the job cannot - // be started. - Status *string `type:"string" enum:"UserImportJobStatusType"` - - // The user pool ID for the user pool that the users are being imported into. - UserPoolId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UserImportJobType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserImportJobType) GoString() string { - return s.String() -} - -// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value. -func (s *UserImportJobType) SetCloudWatchLogsRoleArn(v string) *UserImportJobType { - s.CloudWatchLogsRoleArn = &v - return s -} - -// SetCompletionDate sets the CompletionDate field's value. -func (s *UserImportJobType) SetCompletionDate(v time.Time) *UserImportJobType { - s.CompletionDate = &v - return s -} - -// SetCompletionMessage sets the CompletionMessage field's value. -func (s *UserImportJobType) SetCompletionMessage(v string) *UserImportJobType { - s.CompletionMessage = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *UserImportJobType) SetCreationDate(v time.Time) *UserImportJobType { - s.CreationDate = &v - return s -} - -// SetFailedUsers sets the FailedUsers field's value. -func (s *UserImportJobType) SetFailedUsers(v int64) *UserImportJobType { - s.FailedUsers = &v - return s -} - -// SetImportedUsers sets the ImportedUsers field's value. -func (s *UserImportJobType) SetImportedUsers(v int64) *UserImportJobType { - s.ImportedUsers = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *UserImportJobType) SetJobId(v string) *UserImportJobType { - s.JobId = &v - return s -} - -// SetJobName sets the JobName field's value. -func (s *UserImportJobType) SetJobName(v string) *UserImportJobType { - s.JobName = &v - return s -} - -// SetPreSignedUrl sets the PreSignedUrl field's value. -func (s *UserImportJobType) SetPreSignedUrl(v string) *UserImportJobType { - s.PreSignedUrl = &v - return s -} - -// SetSkippedUsers sets the SkippedUsers field's value. -func (s *UserImportJobType) SetSkippedUsers(v int64) *UserImportJobType { - s.SkippedUsers = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *UserImportJobType) SetStartDate(v time.Time) *UserImportJobType { - s.StartDate = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UserImportJobType) SetStatus(v string) *UserImportJobType { - s.Status = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *UserImportJobType) SetUserPoolId(v string) *UserImportJobType { - s.UserPoolId = &v - return s -} - -// The user pool add-ons type. -type UserPoolAddOnsType struct { - _ struct{} `type:"structure"` - - // The advanced security mode. - // - // AdvancedSecurityMode is a required field - AdvancedSecurityMode *string `type:"string" required:"true" enum:"AdvancedSecurityModeType"` -} - -// String returns the string representation -func (s UserPoolAddOnsType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserPoolAddOnsType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UserPoolAddOnsType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UserPoolAddOnsType"} - if s.AdvancedSecurityMode == nil { - invalidParams.Add(request.NewErrParamRequired("AdvancedSecurityMode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdvancedSecurityMode sets the AdvancedSecurityMode field's value. -func (s *UserPoolAddOnsType) SetAdvancedSecurityMode(v string) *UserPoolAddOnsType { - s.AdvancedSecurityMode = &v - return s -} - -// The description of the user pool client. -type UserPoolClientDescription struct { - _ struct{} `type:"structure"` - - // The ID of the client associated with the user pool. - ClientId *string `min:"1" type:"string" sensitive:"true"` - - // The client name from the user pool client description. - ClientName *string `min:"1" type:"string"` - - // The user pool ID for the user pool where you want to describe the user pool - // client. - UserPoolId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UserPoolClientDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserPoolClientDescription) GoString() string { - return s.String() -} - -// SetClientId sets the ClientId field's value. -func (s *UserPoolClientDescription) SetClientId(v string) *UserPoolClientDescription { - s.ClientId = &v - return s -} - -// SetClientName sets the ClientName field's value. -func (s *UserPoolClientDescription) SetClientName(v string) *UserPoolClientDescription { - s.ClientName = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *UserPoolClientDescription) SetUserPoolId(v string) *UserPoolClientDescription { - s.UserPoolId = &v - return s -} - -// Contains information about a user pool client. -type UserPoolClientType struct { - _ struct{} `type:"structure"` - - // Set to code to initiate a code grant flow, which provides an authorization - // code as the response. This code can be exchanged for access tokens with the - // token endpoint. - // - // Set to token to specify that the client should get the access token (and, - // optionally, ID token, based on scopes) directly. - AllowedOAuthFlows []*string `type:"list"` - - // Set to TRUE if the client is allowed to follow the OAuth protocol when interacting - // with Cognito user pools. - AllowedOAuthFlowsUserPoolClient *bool `type:"boolean"` - - // A list of allowed OAuth scopes. Currently supported values are "phone", "email", - // "openid", and "Cognito". - AllowedOAuthScopes []*string `type:"list"` - - // The Amazon Pinpoint analytics configuration for the user pool client. - AnalyticsConfiguration *AnalyticsConfigurationType `type:"structure"` - - // A list of allowed redirect (callback) URLs for the identity providers. - // - // A redirect URI must: - // - // * Be an absolute URI. - // - // * Be registered with the authorization server. - // - // * Not include a fragment component. - // - // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). - // - // Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing - // purposes only. - // - // App callback URLs such as myapp://example are also supported. - CallbackURLs []*string `type:"list"` - - // The ID of the client associated with the user pool. - ClientId *string `min:"1" type:"string" sensitive:"true"` - - // The client name from the user pool request of the client type. - ClientName *string `min:"1" type:"string"` - - // The client secret from the user pool request of the client type. - ClientSecret *string `min:"1" type:"string" sensitive:"true"` - - // The date the user pool client was created. - CreationDate *time.Time `type:"timestamp"` - - // The default redirect URI. Must be in the CallbackURLs list. - // - // A redirect URI must: - // - // * Be an absolute URI. - // - // * Be registered with the authorization server. - // - // * Not include a fragment component. - // - // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). - // - // Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing - // purposes only. - // - // App callback URLs such as myapp://example are also supported. - DefaultRedirectURI *string `min:"1" type:"string"` - - // The explicit authentication flows. - ExplicitAuthFlows []*string `type:"list"` - - // The date the user pool client was last modified. - LastModifiedDate *time.Time `type:"timestamp"` - - // A list of allowed logout URLs for the identity providers. - LogoutURLs []*string `type:"list"` - - // The Read-only attributes. - ReadAttributes []*string `type:"list"` - - // The time limit, in days, after which the refresh token is no longer valid - // and cannot be used. - RefreshTokenValidity *int64 `type:"integer"` - - // A list of provider names for the identity providers that are supported on - // this client. - SupportedIdentityProviders []*string `type:"list"` - - // The user pool ID for the user pool client. - UserPoolId *string `min:"1" type:"string"` - - // The writeable attributes. - WriteAttributes []*string `type:"list"` -} - -// String returns the string representation -func (s UserPoolClientType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserPoolClientType) GoString() string { - return s.String() -} - -// SetAllowedOAuthFlows sets the AllowedOAuthFlows field's value. -func (s *UserPoolClientType) SetAllowedOAuthFlows(v []*string) *UserPoolClientType { - s.AllowedOAuthFlows = v - return s -} - -// SetAllowedOAuthFlowsUserPoolClient sets the AllowedOAuthFlowsUserPoolClient field's value. -func (s *UserPoolClientType) SetAllowedOAuthFlowsUserPoolClient(v bool) *UserPoolClientType { - s.AllowedOAuthFlowsUserPoolClient = &v - return s -} - -// SetAllowedOAuthScopes sets the AllowedOAuthScopes field's value. -func (s *UserPoolClientType) SetAllowedOAuthScopes(v []*string) *UserPoolClientType { - s.AllowedOAuthScopes = v - return s -} - -// SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value. -func (s *UserPoolClientType) SetAnalyticsConfiguration(v *AnalyticsConfigurationType) *UserPoolClientType { - s.AnalyticsConfiguration = v - return s -} - -// SetCallbackURLs sets the CallbackURLs field's value. -func (s *UserPoolClientType) SetCallbackURLs(v []*string) *UserPoolClientType { - s.CallbackURLs = v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *UserPoolClientType) SetClientId(v string) *UserPoolClientType { - s.ClientId = &v - return s -} - -// SetClientName sets the ClientName field's value. -func (s *UserPoolClientType) SetClientName(v string) *UserPoolClientType { - s.ClientName = &v - return s -} - -// SetClientSecret sets the ClientSecret field's value. -func (s *UserPoolClientType) SetClientSecret(v string) *UserPoolClientType { - s.ClientSecret = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *UserPoolClientType) SetCreationDate(v time.Time) *UserPoolClientType { - s.CreationDate = &v - return s -} - -// SetDefaultRedirectURI sets the DefaultRedirectURI field's value. -func (s *UserPoolClientType) SetDefaultRedirectURI(v string) *UserPoolClientType { - s.DefaultRedirectURI = &v - return s -} - -// SetExplicitAuthFlows sets the ExplicitAuthFlows field's value. -func (s *UserPoolClientType) SetExplicitAuthFlows(v []*string) *UserPoolClientType { - s.ExplicitAuthFlows = v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *UserPoolClientType) SetLastModifiedDate(v time.Time) *UserPoolClientType { - s.LastModifiedDate = &v - return s -} - -// SetLogoutURLs sets the LogoutURLs field's value. -func (s *UserPoolClientType) SetLogoutURLs(v []*string) *UserPoolClientType { - s.LogoutURLs = v - return s -} - -// SetReadAttributes sets the ReadAttributes field's value. -func (s *UserPoolClientType) SetReadAttributes(v []*string) *UserPoolClientType { - s.ReadAttributes = v - return s -} - -// SetRefreshTokenValidity sets the RefreshTokenValidity field's value. -func (s *UserPoolClientType) SetRefreshTokenValidity(v int64) *UserPoolClientType { - s.RefreshTokenValidity = &v - return s -} - -// SetSupportedIdentityProviders sets the SupportedIdentityProviders field's value. -func (s *UserPoolClientType) SetSupportedIdentityProviders(v []*string) *UserPoolClientType { - s.SupportedIdentityProviders = v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *UserPoolClientType) SetUserPoolId(v string) *UserPoolClientType { - s.UserPoolId = &v - return s -} - -// SetWriteAttributes sets the WriteAttributes field's value. -func (s *UserPoolClientType) SetWriteAttributes(v []*string) *UserPoolClientType { - s.WriteAttributes = v - return s -} - -// A user pool description. -type UserPoolDescriptionType struct { - _ struct{} `type:"structure"` - - // The date the user pool description was created. - CreationDate *time.Time `type:"timestamp"` - - // The ID in a user pool description. - Id *string `min:"1" type:"string"` - - // The AWS Lambda configuration information in a user pool description. - LambdaConfig *LambdaConfigType `type:"structure"` - - // The date the user pool description was last modified. - LastModifiedDate *time.Time `type:"timestamp"` - - // The name in a user pool description. - Name *string `min:"1" type:"string"` - - // The user pool status in a user pool description. - Status *string `type:"string" enum:"StatusType"` -} - -// String returns the string representation -func (s UserPoolDescriptionType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserPoolDescriptionType) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *UserPoolDescriptionType) SetCreationDate(v time.Time) *UserPoolDescriptionType { - s.CreationDate = &v - return s -} - -// SetId sets the Id field's value. -func (s *UserPoolDescriptionType) SetId(v string) *UserPoolDescriptionType { - s.Id = &v - return s -} - -// SetLambdaConfig sets the LambdaConfig field's value. -func (s *UserPoolDescriptionType) SetLambdaConfig(v *LambdaConfigType) *UserPoolDescriptionType { - s.LambdaConfig = v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *UserPoolDescriptionType) SetLastModifiedDate(v time.Time) *UserPoolDescriptionType { - s.LastModifiedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *UserPoolDescriptionType) SetName(v string) *UserPoolDescriptionType { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UserPoolDescriptionType) SetStatus(v string) *UserPoolDescriptionType { - s.Status = &v - return s -} - -// The policy associated with a user pool. -type UserPoolPolicyType struct { - _ struct{} `type:"structure"` - - // The password policy. - PasswordPolicy *PasswordPolicyType `type:"structure"` -} - -// String returns the string representation -func (s UserPoolPolicyType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserPoolPolicyType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UserPoolPolicyType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UserPoolPolicyType"} - if s.PasswordPolicy != nil { - if err := s.PasswordPolicy.Validate(); err != nil { - invalidParams.AddNested("PasswordPolicy", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPasswordPolicy sets the PasswordPolicy field's value. -func (s *UserPoolPolicyType) SetPasswordPolicy(v *PasswordPolicyType) *UserPoolPolicyType { - s.PasswordPolicy = v - return s -} - -// A container for information about the user pool. -type UserPoolType struct { - _ struct{} `type:"structure"` - - // The configuration for AdminCreateUser requests. - AdminCreateUserConfig *AdminCreateUserConfigType `type:"structure"` - - // Specifies the attributes that are aliased in a user pool. - AliasAttributes []*string `type:"list"` - - // The Amazon Resource Name (ARN) for the user pool. - Arn *string `min:"20" type:"string"` - - // Specifies the attributes that are auto-verified in a user pool. - AutoVerifiedAttributes []*string `type:"list"` - - // The date the user pool was created. - CreationDate *time.Time `type:"timestamp"` - - CustomDomain *string `min:"1" type:"string"` - - // The device configuration. - DeviceConfiguration *DeviceConfigurationType `type:"structure"` - - // Holds the domain prefix if the user pool has a domain associated with it. - Domain *string `min:"1" type:"string"` - - // The email configuration. - EmailConfiguration *EmailConfigurationType `type:"structure"` - - // The reason why the email configuration cannot send the messages to your users. - EmailConfigurationFailure *string `type:"string"` - - // The contents of the email verification message. - EmailVerificationMessage *string `min:"6" type:"string"` - - // The subject of the email verification message. - EmailVerificationSubject *string `min:"1" type:"string"` - - // A number estimating the size of the user pool. - EstimatedNumberOfUsers *int64 `type:"integer"` - - // The ID of the user pool. - Id *string `min:"1" type:"string"` - - // The AWS Lambda triggers associated with the user pool. - LambdaConfig *LambdaConfigType `type:"structure"` - - // The date the user pool was last modified. - LastModifiedDate *time.Time `type:"timestamp"` - - // Can be one of the following values: - // - // * OFF - MFA tokens are not required and cannot be specified during user - // registration. - // - // * ON - MFA tokens are required for all user registrations. You can only - // specify required when you are initially creating a user pool. - // - // * OPTIONAL - Users have the option when registering to create an MFA token. - MfaConfiguration *string `type:"string" enum:"UserPoolMfaType"` - - // The name of the user pool. - Name *string `min:"1" type:"string"` - - // The policies associated with the user pool. - Policies *UserPoolPolicyType `type:"structure"` - - // A container with the schema attributes of a user pool. - SchemaAttributes []*SchemaAttributeType `min:"1" type:"list"` - - // The contents of the SMS authentication message. - SmsAuthenticationMessage *string `min:"6" type:"string"` - - // The SMS configuration. - SmsConfiguration *SmsConfigurationType `type:"structure"` - - // The reason why the SMS configuration cannot send the messages to your users. - SmsConfigurationFailure *string `type:"string"` - - // The contents of the SMS verification message. - SmsVerificationMessage *string `min:"6" type:"string"` - - // The status of a user pool. - Status *string `type:"string" enum:"StatusType"` - - // The user pool add-ons. - UserPoolAddOns *UserPoolAddOnsType `type:"structure"` - - // The cost allocation tags for the user pool. For more information, see Adding - // Cost Allocation Tags to Your User Pool (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-cost-allocation-tagging.html) - UserPoolTags map[string]*string `type:"map"` - - // Specifies whether email addresses or phone numbers can be specified as usernames - // when a user signs up. - UsernameAttributes []*string `type:"list"` - - // The template for verification messages. - VerificationMessageTemplate *VerificationMessageTemplateType `type:"structure"` -} - -// String returns the string representation -func (s UserPoolType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserPoolType) GoString() string { - return s.String() -} - -// SetAdminCreateUserConfig sets the AdminCreateUserConfig field's value. -func (s *UserPoolType) SetAdminCreateUserConfig(v *AdminCreateUserConfigType) *UserPoolType { - s.AdminCreateUserConfig = v - return s -} - -// SetAliasAttributes sets the AliasAttributes field's value. -func (s *UserPoolType) SetAliasAttributes(v []*string) *UserPoolType { - s.AliasAttributes = v - return s -} - -// SetArn sets the Arn field's value. -func (s *UserPoolType) SetArn(v string) *UserPoolType { - s.Arn = &v - return s -} - -// SetAutoVerifiedAttributes sets the AutoVerifiedAttributes field's value. -func (s *UserPoolType) SetAutoVerifiedAttributes(v []*string) *UserPoolType { - s.AutoVerifiedAttributes = v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *UserPoolType) SetCreationDate(v time.Time) *UserPoolType { - s.CreationDate = &v - return s -} - -// SetCustomDomain sets the CustomDomain field's value. -func (s *UserPoolType) SetCustomDomain(v string) *UserPoolType { - s.CustomDomain = &v - return s -} - -// SetDeviceConfiguration sets the DeviceConfiguration field's value. -func (s *UserPoolType) SetDeviceConfiguration(v *DeviceConfigurationType) *UserPoolType { - s.DeviceConfiguration = v - return s -} - -// SetDomain sets the Domain field's value. -func (s *UserPoolType) SetDomain(v string) *UserPoolType { - s.Domain = &v - return s -} - -// SetEmailConfiguration sets the EmailConfiguration field's value. -func (s *UserPoolType) SetEmailConfiguration(v *EmailConfigurationType) *UserPoolType { - s.EmailConfiguration = v - return s -} - -// SetEmailConfigurationFailure sets the EmailConfigurationFailure field's value. -func (s *UserPoolType) SetEmailConfigurationFailure(v string) *UserPoolType { - s.EmailConfigurationFailure = &v - return s -} - -// SetEmailVerificationMessage sets the EmailVerificationMessage field's value. -func (s *UserPoolType) SetEmailVerificationMessage(v string) *UserPoolType { - s.EmailVerificationMessage = &v - return s -} - -// SetEmailVerificationSubject sets the EmailVerificationSubject field's value. -func (s *UserPoolType) SetEmailVerificationSubject(v string) *UserPoolType { - s.EmailVerificationSubject = &v - return s -} - -// SetEstimatedNumberOfUsers sets the EstimatedNumberOfUsers field's value. -func (s *UserPoolType) SetEstimatedNumberOfUsers(v int64) *UserPoolType { - s.EstimatedNumberOfUsers = &v - return s -} - -// SetId sets the Id field's value. -func (s *UserPoolType) SetId(v string) *UserPoolType { - s.Id = &v - return s -} - -// SetLambdaConfig sets the LambdaConfig field's value. -func (s *UserPoolType) SetLambdaConfig(v *LambdaConfigType) *UserPoolType { - s.LambdaConfig = v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *UserPoolType) SetLastModifiedDate(v time.Time) *UserPoolType { - s.LastModifiedDate = &v - return s -} - -// SetMfaConfiguration sets the MfaConfiguration field's value. -func (s *UserPoolType) SetMfaConfiguration(v string) *UserPoolType { - s.MfaConfiguration = &v - return s -} - -// SetName sets the Name field's value. -func (s *UserPoolType) SetName(v string) *UserPoolType { - s.Name = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *UserPoolType) SetPolicies(v *UserPoolPolicyType) *UserPoolType { - s.Policies = v - return s -} - -// SetSchemaAttributes sets the SchemaAttributes field's value. -func (s *UserPoolType) SetSchemaAttributes(v []*SchemaAttributeType) *UserPoolType { - s.SchemaAttributes = v - return s -} - -// SetSmsAuthenticationMessage sets the SmsAuthenticationMessage field's value. -func (s *UserPoolType) SetSmsAuthenticationMessage(v string) *UserPoolType { - s.SmsAuthenticationMessage = &v - return s -} - -// SetSmsConfiguration sets the SmsConfiguration field's value. -func (s *UserPoolType) SetSmsConfiguration(v *SmsConfigurationType) *UserPoolType { - s.SmsConfiguration = v - return s -} - -// SetSmsConfigurationFailure sets the SmsConfigurationFailure field's value. -func (s *UserPoolType) SetSmsConfigurationFailure(v string) *UserPoolType { - s.SmsConfigurationFailure = &v - return s -} - -// SetSmsVerificationMessage sets the SmsVerificationMessage field's value. -func (s *UserPoolType) SetSmsVerificationMessage(v string) *UserPoolType { - s.SmsVerificationMessage = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UserPoolType) SetStatus(v string) *UserPoolType { - s.Status = &v - return s -} - -// SetUserPoolAddOns sets the UserPoolAddOns field's value. -func (s *UserPoolType) SetUserPoolAddOns(v *UserPoolAddOnsType) *UserPoolType { - s.UserPoolAddOns = v - return s -} - -// SetUserPoolTags sets the UserPoolTags field's value. -func (s *UserPoolType) SetUserPoolTags(v map[string]*string) *UserPoolType { - s.UserPoolTags = v - return s -} - -// SetUsernameAttributes sets the UsernameAttributes field's value. -func (s *UserPoolType) SetUsernameAttributes(v []*string) *UserPoolType { - s.UsernameAttributes = v - return s -} - -// SetVerificationMessageTemplate sets the VerificationMessageTemplate field's value. -func (s *UserPoolType) SetVerificationMessageTemplate(v *VerificationMessageTemplateType) *UserPoolType { - s.VerificationMessageTemplate = v - return s -} - -// The user type. -type UserType struct { - _ struct{} `type:"structure"` - - // A container with information about the user type attributes. - Attributes []*AttributeType `type:"list"` - - // Specifies whether the user is enabled. - Enabled *bool `type:"boolean"` - - // The MFA options for the user. - MFAOptions []*MFAOptionType `type:"list"` - - // The creation date of the user. - UserCreateDate *time.Time `type:"timestamp"` - - // The last modified date of the user. - UserLastModifiedDate *time.Time `type:"timestamp"` - - // The user status. Can be one of the following: - // - // * UNCONFIRMED - User has been created but not confirmed. - // - // * CONFIRMED - User has been confirmed. - // - // * ARCHIVED - User is no longer active. - // - // * COMPROMISED - User is disabled due to a potential security threat. - // - // * UNKNOWN - User status is not known. - UserStatus *string `type:"string" enum:"UserStatusType"` - - // The user name of the user you wish to describe. - Username *string `min:"1" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s UserType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserType) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *UserType) SetAttributes(v []*AttributeType) *UserType { - s.Attributes = v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *UserType) SetEnabled(v bool) *UserType { - s.Enabled = &v - return s -} - -// SetMFAOptions sets the MFAOptions field's value. -func (s *UserType) SetMFAOptions(v []*MFAOptionType) *UserType { - s.MFAOptions = v - return s -} - -// SetUserCreateDate sets the UserCreateDate field's value. -func (s *UserType) SetUserCreateDate(v time.Time) *UserType { - s.UserCreateDate = &v - return s -} - -// SetUserLastModifiedDate sets the UserLastModifiedDate field's value. -func (s *UserType) SetUserLastModifiedDate(v time.Time) *UserType { - s.UserLastModifiedDate = &v - return s -} - -// SetUserStatus sets the UserStatus field's value. -func (s *UserType) SetUserStatus(v string) *UserType { - s.UserStatus = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *UserType) SetUsername(v string) *UserType { - s.Username = &v - return s -} - -// The template for verification messages. -type VerificationMessageTemplateType struct { - _ struct{} `type:"structure"` - - // The default email option. - DefaultEmailOption *string `type:"string" enum:"DefaultEmailOptionType"` - - // The email message template. - EmailMessage *string `min:"6" type:"string"` - - // The email message template for sending a confirmation link to the user. - EmailMessageByLink *string `min:"6" type:"string"` - - // The subject line for the email message template. - EmailSubject *string `min:"1" type:"string"` - - // The subject line for the email message template for sending a confirmation - // link to the user. - EmailSubjectByLink *string `min:"1" type:"string"` - - // The SMS message template. - SmsMessage *string `min:"6" type:"string"` -} - -// String returns the string representation -func (s VerificationMessageTemplateType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerificationMessageTemplateType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VerificationMessageTemplateType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VerificationMessageTemplateType"} - if s.EmailMessage != nil && len(*s.EmailMessage) < 6 { - invalidParams.Add(request.NewErrParamMinLen("EmailMessage", 6)) - } - if s.EmailMessageByLink != nil && len(*s.EmailMessageByLink) < 6 { - invalidParams.Add(request.NewErrParamMinLen("EmailMessageByLink", 6)) - } - if s.EmailSubject != nil && len(*s.EmailSubject) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EmailSubject", 1)) - } - if s.EmailSubjectByLink != nil && len(*s.EmailSubjectByLink) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EmailSubjectByLink", 1)) - } - if s.SmsMessage != nil && len(*s.SmsMessage) < 6 { - invalidParams.Add(request.NewErrParamMinLen("SmsMessage", 6)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultEmailOption sets the DefaultEmailOption field's value. -func (s *VerificationMessageTemplateType) SetDefaultEmailOption(v string) *VerificationMessageTemplateType { - s.DefaultEmailOption = &v - return s -} - -// SetEmailMessage sets the EmailMessage field's value. -func (s *VerificationMessageTemplateType) SetEmailMessage(v string) *VerificationMessageTemplateType { - s.EmailMessage = &v - return s -} - -// SetEmailMessageByLink sets the EmailMessageByLink field's value. -func (s *VerificationMessageTemplateType) SetEmailMessageByLink(v string) *VerificationMessageTemplateType { - s.EmailMessageByLink = &v - return s -} - -// SetEmailSubject sets the EmailSubject field's value. -func (s *VerificationMessageTemplateType) SetEmailSubject(v string) *VerificationMessageTemplateType { - s.EmailSubject = &v - return s -} - -// SetEmailSubjectByLink sets the EmailSubjectByLink field's value. -func (s *VerificationMessageTemplateType) SetEmailSubjectByLink(v string) *VerificationMessageTemplateType { - s.EmailSubjectByLink = &v - return s -} - -// SetSmsMessage sets the SmsMessage field's value. -func (s *VerificationMessageTemplateType) SetSmsMessage(v string) *VerificationMessageTemplateType { - s.SmsMessage = &v - return s -} - -type VerifySoftwareTokenInput struct { - _ struct{} `type:"structure"` - - // The access token. - AccessToken *string `type:"string" sensitive:"true"` - - // The friendly device name. - FriendlyDeviceName *string `type:"string"` - - // The session which should be passed both ways in challenge-response calls - // to the service. - Session *string `min:"20" type:"string"` - - // The one time password computed using the secret code returned by - // - // UserCode is a required field - UserCode *string `min:"6" type:"string" required:"true"` -} - -// String returns the string representation -func (s VerifySoftwareTokenInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerifySoftwareTokenInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VerifySoftwareTokenInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VerifySoftwareTokenInput"} - if s.Session != nil && len(*s.Session) < 20 { - invalidParams.Add(request.NewErrParamMinLen("Session", 20)) - } - if s.UserCode == nil { - invalidParams.Add(request.NewErrParamRequired("UserCode")) - } - if s.UserCode != nil && len(*s.UserCode) < 6 { - invalidParams.Add(request.NewErrParamMinLen("UserCode", 6)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *VerifySoftwareTokenInput) SetAccessToken(v string) *VerifySoftwareTokenInput { - s.AccessToken = &v - return s -} - -// SetFriendlyDeviceName sets the FriendlyDeviceName field's value. -func (s *VerifySoftwareTokenInput) SetFriendlyDeviceName(v string) *VerifySoftwareTokenInput { - s.FriendlyDeviceName = &v - return s -} - -// SetSession sets the Session field's value. -func (s *VerifySoftwareTokenInput) SetSession(v string) *VerifySoftwareTokenInput { - s.Session = &v - return s -} - -// SetUserCode sets the UserCode field's value. -func (s *VerifySoftwareTokenInput) SetUserCode(v string) *VerifySoftwareTokenInput { - s.UserCode = &v - return s -} - -type VerifySoftwareTokenOutput struct { - _ struct{} `type:"structure"` - - // The session which should be passed both ways in challenge-response calls - // to the service. - Session *string `min:"20" type:"string"` - - // The status of the verify software token. - Status *string `type:"string" enum:"VerifySoftwareTokenResponseType"` -} - -// String returns the string representation -func (s VerifySoftwareTokenOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerifySoftwareTokenOutput) GoString() string { - return s.String() -} - -// SetSession sets the Session field's value. -func (s *VerifySoftwareTokenOutput) SetSession(v string) *VerifySoftwareTokenOutput { - s.Session = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *VerifySoftwareTokenOutput) SetStatus(v string) *VerifySoftwareTokenOutput { - s.Status = &v - return s -} - -// Represents the request to verify user attributes. -type VerifyUserAttributeInput struct { - _ struct{} `type:"structure"` - - // Represents the access token of the request to verify user attributes. - // - // AccessToken is a required field - AccessToken *string `type:"string" required:"true" sensitive:"true"` - - // The attribute name in the request to verify user attributes. - // - // AttributeName is a required field - AttributeName *string `min:"1" type:"string" required:"true"` - - // The verification code in the request to verify user attributes. - // - // Code is a required field - Code *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s VerifyUserAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerifyUserAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VerifyUserAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VerifyUserAttributeInput"} - if s.AccessToken == nil { - invalidParams.Add(request.NewErrParamRequired("AccessToken")) - } - if s.AttributeName == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeName")) - } - if s.AttributeName != nil && len(*s.AttributeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1)) - } - if s.Code == nil { - invalidParams.Add(request.NewErrParamRequired("Code")) - } - if s.Code != nil && len(*s.Code) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Code", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessToken sets the AccessToken field's value. -func (s *VerifyUserAttributeInput) SetAccessToken(v string) *VerifyUserAttributeInput { - s.AccessToken = &v - return s -} - -// SetAttributeName sets the AttributeName field's value. -func (s *VerifyUserAttributeInput) SetAttributeName(v string) *VerifyUserAttributeInput { - s.AttributeName = &v - return s -} - -// SetCode sets the Code field's value. -func (s *VerifyUserAttributeInput) SetCode(v string) *VerifyUserAttributeInput { - s.Code = &v - return s -} - -// A container representing the response from the server from the request to -// verify user attributes. -type VerifyUserAttributeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s VerifyUserAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerifyUserAttributeOutput) GoString() string { - return s.String() -} - -const ( - // AccountTakeoverEventActionTypeBlock is a AccountTakeoverEventActionType enum value - AccountTakeoverEventActionTypeBlock = "BLOCK" - - // AccountTakeoverEventActionTypeMfaIfConfigured is a AccountTakeoverEventActionType enum value - AccountTakeoverEventActionTypeMfaIfConfigured = "MFA_IF_CONFIGURED" - - // AccountTakeoverEventActionTypeMfaRequired is a AccountTakeoverEventActionType enum value - AccountTakeoverEventActionTypeMfaRequired = "MFA_REQUIRED" - - // AccountTakeoverEventActionTypeNoAction is a AccountTakeoverEventActionType enum value - AccountTakeoverEventActionTypeNoAction = "NO_ACTION" -) - -const ( - // AdvancedSecurityModeTypeOff is a AdvancedSecurityModeType enum value - AdvancedSecurityModeTypeOff = "OFF" - - // AdvancedSecurityModeTypeAudit is a AdvancedSecurityModeType enum value - AdvancedSecurityModeTypeAudit = "AUDIT" - - // AdvancedSecurityModeTypeEnforced is a AdvancedSecurityModeType enum value - AdvancedSecurityModeTypeEnforced = "ENFORCED" -) - -const ( - // AliasAttributeTypePhoneNumber is a AliasAttributeType enum value - AliasAttributeTypePhoneNumber = "phone_number" - - // AliasAttributeTypeEmail is a AliasAttributeType enum value - AliasAttributeTypeEmail = "email" - - // AliasAttributeTypePreferredUsername is a AliasAttributeType enum value - AliasAttributeTypePreferredUsername = "preferred_username" -) - -const ( - // AttributeDataTypeString is a AttributeDataType enum value - AttributeDataTypeString = "String" - - // AttributeDataTypeNumber is a AttributeDataType enum value - AttributeDataTypeNumber = "Number" - - // AttributeDataTypeDateTime is a AttributeDataType enum value - AttributeDataTypeDateTime = "DateTime" - - // AttributeDataTypeBoolean is a AttributeDataType enum value - AttributeDataTypeBoolean = "Boolean" -) - -const ( - // AuthFlowTypeUserSrpAuth is a AuthFlowType enum value - AuthFlowTypeUserSrpAuth = "USER_SRP_AUTH" - - // AuthFlowTypeRefreshTokenAuth is a AuthFlowType enum value - AuthFlowTypeRefreshTokenAuth = "REFRESH_TOKEN_AUTH" - - // AuthFlowTypeRefreshToken is a AuthFlowType enum value - AuthFlowTypeRefreshToken = "REFRESH_TOKEN" - - // AuthFlowTypeCustomAuth is a AuthFlowType enum value - AuthFlowTypeCustomAuth = "CUSTOM_AUTH" - - // AuthFlowTypeAdminNoSrpAuth is a AuthFlowType enum value - AuthFlowTypeAdminNoSrpAuth = "ADMIN_NO_SRP_AUTH" - - // AuthFlowTypeUserPasswordAuth is a AuthFlowType enum value - AuthFlowTypeUserPasswordAuth = "USER_PASSWORD_AUTH" -) - -const ( - // ChallengeNamePassword is a ChallengeName enum value - ChallengeNamePassword = "Password" - - // ChallengeNameMfa is a ChallengeName enum value - ChallengeNameMfa = "Mfa" -) - -const ( - // ChallengeNameTypeSmsMfa is a ChallengeNameType enum value - ChallengeNameTypeSmsMfa = "SMS_MFA" - - // ChallengeNameTypeSoftwareTokenMfa is a ChallengeNameType enum value - ChallengeNameTypeSoftwareTokenMfa = "SOFTWARE_TOKEN_MFA" - - // ChallengeNameTypeSelectMfaType is a ChallengeNameType enum value - ChallengeNameTypeSelectMfaType = "SELECT_MFA_TYPE" - - // ChallengeNameTypeMfaSetup is a ChallengeNameType enum value - ChallengeNameTypeMfaSetup = "MFA_SETUP" - - // ChallengeNameTypePasswordVerifier is a ChallengeNameType enum value - ChallengeNameTypePasswordVerifier = "PASSWORD_VERIFIER" - - // ChallengeNameTypeCustomChallenge is a ChallengeNameType enum value - ChallengeNameTypeCustomChallenge = "CUSTOM_CHALLENGE" - - // ChallengeNameTypeDeviceSrpAuth is a ChallengeNameType enum value - ChallengeNameTypeDeviceSrpAuth = "DEVICE_SRP_AUTH" - - // ChallengeNameTypeDevicePasswordVerifier is a ChallengeNameType enum value - ChallengeNameTypeDevicePasswordVerifier = "DEVICE_PASSWORD_VERIFIER" - - // ChallengeNameTypeAdminNoSrpAuth is a ChallengeNameType enum value - ChallengeNameTypeAdminNoSrpAuth = "ADMIN_NO_SRP_AUTH" - - // ChallengeNameTypeNewPasswordRequired is a ChallengeNameType enum value - ChallengeNameTypeNewPasswordRequired = "NEW_PASSWORD_REQUIRED" -) - -const ( - // ChallengeResponseSuccess is a ChallengeResponse enum value - ChallengeResponseSuccess = "Success" - - // ChallengeResponseFailure is a ChallengeResponse enum value - ChallengeResponseFailure = "Failure" -) - -const ( - // CompromisedCredentialsEventActionTypeBlock is a CompromisedCredentialsEventActionType enum value - CompromisedCredentialsEventActionTypeBlock = "BLOCK" - - // CompromisedCredentialsEventActionTypeNoAction is a CompromisedCredentialsEventActionType enum value - CompromisedCredentialsEventActionTypeNoAction = "NO_ACTION" -) - -const ( - // DefaultEmailOptionTypeConfirmWithLink is a DefaultEmailOptionType enum value - DefaultEmailOptionTypeConfirmWithLink = "CONFIRM_WITH_LINK" - - // DefaultEmailOptionTypeConfirmWithCode is a DefaultEmailOptionType enum value - DefaultEmailOptionTypeConfirmWithCode = "CONFIRM_WITH_CODE" -) - -const ( - // DeliveryMediumTypeSms is a DeliveryMediumType enum value - DeliveryMediumTypeSms = "SMS" - - // DeliveryMediumTypeEmail is a DeliveryMediumType enum value - DeliveryMediumTypeEmail = "EMAIL" -) - -const ( - // DeviceRememberedStatusTypeRemembered is a DeviceRememberedStatusType enum value - DeviceRememberedStatusTypeRemembered = "remembered" - - // DeviceRememberedStatusTypeNotRemembered is a DeviceRememberedStatusType enum value - DeviceRememberedStatusTypeNotRemembered = "not_remembered" -) - -const ( - // DomainStatusTypeCreating is a DomainStatusType enum value - DomainStatusTypeCreating = "CREATING" - - // DomainStatusTypeDeleting is a DomainStatusType enum value - DomainStatusTypeDeleting = "DELETING" - - // DomainStatusTypeUpdating is a DomainStatusType enum value - DomainStatusTypeUpdating = "UPDATING" - - // DomainStatusTypeActive is a DomainStatusType enum value - DomainStatusTypeActive = "ACTIVE" - - // DomainStatusTypeFailed is a DomainStatusType enum value - DomainStatusTypeFailed = "FAILED" -) - -const ( - // EventFilterTypeSignIn is a EventFilterType enum value - EventFilterTypeSignIn = "SIGN_IN" - - // EventFilterTypePasswordChange is a EventFilterType enum value - EventFilterTypePasswordChange = "PASSWORD_CHANGE" - - // EventFilterTypeSignUp is a EventFilterType enum value - EventFilterTypeSignUp = "SIGN_UP" -) - -const ( - // EventResponseTypeSuccess is a EventResponseType enum value - EventResponseTypeSuccess = "Success" - - // EventResponseTypeFailure is a EventResponseType enum value - EventResponseTypeFailure = "Failure" -) - -const ( - // EventTypeSignIn is a EventType enum value - EventTypeSignIn = "SignIn" - - // EventTypeSignUp is a EventType enum value - EventTypeSignUp = "SignUp" - - // EventTypeForgotPassword is a EventType enum value - EventTypeForgotPassword = "ForgotPassword" -) - -const ( - // ExplicitAuthFlowsTypeAdminNoSrpAuth is a ExplicitAuthFlowsType enum value - ExplicitAuthFlowsTypeAdminNoSrpAuth = "ADMIN_NO_SRP_AUTH" - - // ExplicitAuthFlowsTypeCustomAuthFlowOnly is a ExplicitAuthFlowsType enum value - ExplicitAuthFlowsTypeCustomAuthFlowOnly = "CUSTOM_AUTH_FLOW_ONLY" - - // ExplicitAuthFlowsTypeUserPasswordAuth is a ExplicitAuthFlowsType enum value - ExplicitAuthFlowsTypeUserPasswordAuth = "USER_PASSWORD_AUTH" -) - -const ( - // FeedbackValueTypeValid is a FeedbackValueType enum value - FeedbackValueTypeValid = "Valid" - - // FeedbackValueTypeInvalid is a FeedbackValueType enum value - FeedbackValueTypeInvalid = "Invalid" -) - -const ( - // IdentityProviderTypeTypeSaml is a IdentityProviderTypeType enum value - IdentityProviderTypeTypeSaml = "SAML" - - // IdentityProviderTypeTypeFacebook is a IdentityProviderTypeType enum value - IdentityProviderTypeTypeFacebook = "Facebook" - - // IdentityProviderTypeTypeGoogle is a IdentityProviderTypeType enum value - IdentityProviderTypeTypeGoogle = "Google" - - // IdentityProviderTypeTypeLoginWithAmazon is a IdentityProviderTypeType enum value - IdentityProviderTypeTypeLoginWithAmazon = "LoginWithAmazon" - - // IdentityProviderTypeTypeOidc is a IdentityProviderTypeType enum value - IdentityProviderTypeTypeOidc = "OIDC" -) - -const ( - // MessageActionTypeResend is a MessageActionType enum value - MessageActionTypeResend = "RESEND" - - // MessageActionTypeSuppress is a MessageActionType enum value - MessageActionTypeSuppress = "SUPPRESS" -) - -const ( - // OAuthFlowTypeCode is a OAuthFlowType enum value - OAuthFlowTypeCode = "code" - - // OAuthFlowTypeImplicit is a OAuthFlowType enum value - OAuthFlowTypeImplicit = "implicit" - - // OAuthFlowTypeClientCredentials is a OAuthFlowType enum value - OAuthFlowTypeClientCredentials = "client_credentials" -) - -const ( - // RiskDecisionTypeNoRisk is a RiskDecisionType enum value - RiskDecisionTypeNoRisk = "NoRisk" - - // RiskDecisionTypeAccountTakeover is a RiskDecisionType enum value - RiskDecisionTypeAccountTakeover = "AccountTakeover" - - // RiskDecisionTypeBlock is a RiskDecisionType enum value - RiskDecisionTypeBlock = "Block" -) - -const ( - // RiskLevelTypeLow is a RiskLevelType enum value - RiskLevelTypeLow = "Low" - - // RiskLevelTypeMedium is a RiskLevelType enum value - RiskLevelTypeMedium = "Medium" - - // RiskLevelTypeHigh is a RiskLevelType enum value - RiskLevelTypeHigh = "High" -) - -const ( - // StatusTypeEnabled is a StatusType enum value - StatusTypeEnabled = "Enabled" - - // StatusTypeDisabled is a StatusType enum value - StatusTypeDisabled = "Disabled" -) - -const ( - // UserImportJobStatusTypeCreated is a UserImportJobStatusType enum value - UserImportJobStatusTypeCreated = "Created" - - // UserImportJobStatusTypePending is a UserImportJobStatusType enum value - UserImportJobStatusTypePending = "Pending" - - // UserImportJobStatusTypeInProgress is a UserImportJobStatusType enum value - UserImportJobStatusTypeInProgress = "InProgress" - - // UserImportJobStatusTypeStopping is a UserImportJobStatusType enum value - UserImportJobStatusTypeStopping = "Stopping" - - // UserImportJobStatusTypeExpired is a UserImportJobStatusType enum value - UserImportJobStatusTypeExpired = "Expired" - - // UserImportJobStatusTypeStopped is a UserImportJobStatusType enum value - UserImportJobStatusTypeStopped = "Stopped" - - // UserImportJobStatusTypeFailed is a UserImportJobStatusType enum value - UserImportJobStatusTypeFailed = "Failed" - - // UserImportJobStatusTypeSucceeded is a UserImportJobStatusType enum value - UserImportJobStatusTypeSucceeded = "Succeeded" -) - -const ( - // UserPoolMfaTypeOff is a UserPoolMfaType enum value - UserPoolMfaTypeOff = "OFF" - - // UserPoolMfaTypeOn is a UserPoolMfaType enum value - UserPoolMfaTypeOn = "ON" - - // UserPoolMfaTypeOptional is a UserPoolMfaType enum value - UserPoolMfaTypeOptional = "OPTIONAL" -) - -const ( - // UserStatusTypeUnconfirmed is a UserStatusType enum value - UserStatusTypeUnconfirmed = "UNCONFIRMED" - - // UserStatusTypeConfirmed is a UserStatusType enum value - UserStatusTypeConfirmed = "CONFIRMED" - - // UserStatusTypeArchived is a UserStatusType enum value - UserStatusTypeArchived = "ARCHIVED" - - // UserStatusTypeCompromised is a UserStatusType enum value - UserStatusTypeCompromised = "COMPROMISED" - - // UserStatusTypeUnknown is a UserStatusType enum value - UserStatusTypeUnknown = "UNKNOWN" - - // UserStatusTypeResetRequired is a UserStatusType enum value - UserStatusTypeResetRequired = "RESET_REQUIRED" - - // UserStatusTypeForceChangePassword is a UserStatusType enum value - UserStatusTypeForceChangePassword = "FORCE_CHANGE_PASSWORD" -) - -const ( - // UsernameAttributeTypePhoneNumber is a UsernameAttributeType enum value - UsernameAttributeTypePhoneNumber = "phone_number" - - // UsernameAttributeTypeEmail is a UsernameAttributeType enum value - UsernameAttributeTypeEmail = "email" -) - -const ( - // VerifiedAttributeTypePhoneNumber is a VerifiedAttributeType enum value - VerifiedAttributeTypePhoneNumber = "phone_number" - - // VerifiedAttributeTypeEmail is a VerifiedAttributeType enum value - VerifiedAttributeTypeEmail = "email" -) - -const ( - // VerifySoftwareTokenResponseTypeSuccess is a VerifySoftwareTokenResponseType enum value - VerifySoftwareTokenResponseTypeSuccess = "SUCCESS" - - // VerifySoftwareTokenResponseTypeError is a VerifySoftwareTokenResponseType enum value - VerifySoftwareTokenResponseTypeError = "ERROR" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/doc.go deleted file mode 100644 index b25b59fb2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/doc.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package cognitoidentityprovider provides the client and types for making API -// requests to Amazon Cognito Identity Provider. -// -// Using the Amazon Cognito User Pools API, you can create a user pool to manage -// directories and users. You can authenticate a user to obtain tokens related -// to user identity and access policies. -// -// This API reference provides information about user pools in Amazon Cognito -// User Pools. -// -// For more information, see the Amazon Cognito Documentation. -// -// See https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18 for more information on this service. -// -// See cognitoidentityprovider package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cognitoidentityprovider/ -// -// Using the Client -// -// To contact Amazon Cognito Identity Provider with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Cognito Identity Provider client CognitoIdentityProvider for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cognitoidentityprovider/#New -package cognitoidentityprovider diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/errors.go deleted file mode 100644 index 302ec049a..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/errors.go +++ /dev/null @@ -1,253 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cognitoidentityprovider - -const ( - - // ErrCodeAliasExistsException for service response error code - // "AliasExistsException". - // - // This exception is thrown when a user tries to confirm the account with an - // email or phone number that has already been supplied as an alias from a different - // account. This exception tells user that an account with this email or phone - // already exists. - ErrCodeAliasExistsException = "AliasExistsException" - - // ErrCodeCodeDeliveryFailureException for service response error code - // "CodeDeliveryFailureException". - // - // This exception is thrown when a verification code fails to deliver successfully. - ErrCodeCodeDeliveryFailureException = "CodeDeliveryFailureException" - - // ErrCodeCodeMismatchException for service response error code - // "CodeMismatchException". - // - // This exception is thrown if the provided code does not match what the server - // was expecting. - ErrCodeCodeMismatchException = "CodeMismatchException" - - // ErrCodeConcurrentModificationException for service response error code - // "ConcurrentModificationException". - // - // This exception is thrown if two or more modifications are happening concurrently. - ErrCodeConcurrentModificationException = "ConcurrentModificationException" - - // ErrCodeDuplicateProviderException for service response error code - // "DuplicateProviderException". - // - // This exception is thrown when the provider is already supported by the user - // pool. - ErrCodeDuplicateProviderException = "DuplicateProviderException" - - // ErrCodeEnableSoftwareTokenMFAException for service response error code - // "EnableSoftwareTokenMFAException". - // - // This exception is thrown when there is a code mismatch and the service fails - // to configure the software token TOTP multi-factor authentication (MFA). - ErrCodeEnableSoftwareTokenMFAException = "EnableSoftwareTokenMFAException" - - // ErrCodeExpiredCodeException for service response error code - // "ExpiredCodeException". - // - // This exception is thrown if a code has expired. - ErrCodeExpiredCodeException = "ExpiredCodeException" - - // ErrCodeGroupExistsException for service response error code - // "GroupExistsException". - // - // This exception is thrown when Amazon Cognito encounters a group that already - // exists in the user pool. - ErrCodeGroupExistsException = "GroupExistsException" - - // ErrCodeInternalErrorException for service response error code - // "InternalErrorException". - // - // This exception is thrown when Amazon Cognito encounters an internal error. - ErrCodeInternalErrorException = "InternalErrorException" - - // ErrCodeInvalidEmailRoleAccessPolicyException for service response error code - // "InvalidEmailRoleAccessPolicyException". - // - // This exception is thrown when Amazon Cognito is not allowed to use your email - // identity. HTTP status code: 400. - ErrCodeInvalidEmailRoleAccessPolicyException = "InvalidEmailRoleAccessPolicyException" - - // ErrCodeInvalidLambdaResponseException for service response error code - // "InvalidLambdaResponseException". - // - // This exception is thrown when the Amazon Cognito service encounters an invalid - // AWS Lambda response. - ErrCodeInvalidLambdaResponseException = "InvalidLambdaResponseException" - - // ErrCodeInvalidOAuthFlowException for service response error code - // "InvalidOAuthFlowException". - // - // This exception is thrown when the specified OAuth flow is invalid. - ErrCodeInvalidOAuthFlowException = "InvalidOAuthFlowException" - - // ErrCodeInvalidParameterException for service response error code - // "InvalidParameterException". - // - // This exception is thrown when the Amazon Cognito service encounters an invalid - // parameter. - ErrCodeInvalidParameterException = "InvalidParameterException" - - // ErrCodeInvalidPasswordException for service response error code - // "InvalidPasswordException". - // - // This exception is thrown when the Amazon Cognito service encounters an invalid - // password. - ErrCodeInvalidPasswordException = "InvalidPasswordException" - - // ErrCodeInvalidSmsRoleAccessPolicyException for service response error code - // "InvalidSmsRoleAccessPolicyException". - // - // This exception is returned when the role provided for SMS configuration does - // not have permission to publish using Amazon SNS. - ErrCodeInvalidSmsRoleAccessPolicyException = "InvalidSmsRoleAccessPolicyException" - - // ErrCodeInvalidSmsRoleTrustRelationshipException for service response error code - // "InvalidSmsRoleTrustRelationshipException". - // - // This exception is thrown when the trust relationship is invalid for the role - // provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com - // or the external ID provided in the role does not match what is provided in - // the SMS configuration for the user pool. - ErrCodeInvalidSmsRoleTrustRelationshipException = "InvalidSmsRoleTrustRelationshipException" - - // ErrCodeInvalidUserPoolConfigurationException for service response error code - // "InvalidUserPoolConfigurationException". - // - // This exception is thrown when the user pool configuration is invalid. - ErrCodeInvalidUserPoolConfigurationException = "InvalidUserPoolConfigurationException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // This exception is thrown when a user exceeds the limit for a requested AWS - // resource. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeMFAMethodNotFoundException for service response error code - // "MFAMethodNotFoundException". - // - // This exception is thrown when Amazon Cognito cannot find a multi-factor authentication - // (MFA) method. - ErrCodeMFAMethodNotFoundException = "MFAMethodNotFoundException" - - // ErrCodeNotAuthorizedException for service response error code - // "NotAuthorizedException". - // - // This exception is thrown when a user is not authorized. - ErrCodeNotAuthorizedException = "NotAuthorizedException" - - // ErrCodePasswordResetRequiredException for service response error code - // "PasswordResetRequiredException". - // - // This exception is thrown when a password reset is required. - ErrCodePasswordResetRequiredException = "PasswordResetRequiredException" - - // ErrCodePreconditionNotMetException for service response error code - // "PreconditionNotMetException". - // - // This exception is thrown when a precondition is not met. - ErrCodePreconditionNotMetException = "PreconditionNotMetException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // This exception is thrown when the Amazon Cognito service cannot find the - // requested resource. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeScopeDoesNotExistException for service response error code - // "ScopeDoesNotExistException". - // - // This exception is thrown when the specified scope does not exist. - ErrCodeScopeDoesNotExistException = "ScopeDoesNotExistException" - - // ErrCodeSoftwareTokenMFANotFoundException for service response error code - // "SoftwareTokenMFANotFoundException". - // - // This exception is thrown when the software token TOTP multi-factor authentication - // (MFA) is not enabled for the user pool. - ErrCodeSoftwareTokenMFANotFoundException = "SoftwareTokenMFANotFoundException" - - // ErrCodeTooManyFailedAttemptsException for service response error code - // "TooManyFailedAttemptsException". - // - // This exception is thrown when the user has made too many failed attempts - // for a given action (e.g., sign in). - ErrCodeTooManyFailedAttemptsException = "TooManyFailedAttemptsException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // This exception is thrown when the user has made too many requests for a given - // operation. - ErrCodeTooManyRequestsException = "TooManyRequestsException" - - // ErrCodeUnexpectedLambdaException for service response error code - // "UnexpectedLambdaException". - // - // This exception is thrown when the Amazon Cognito service encounters an unexpected - // exception with the AWS Lambda service. - ErrCodeUnexpectedLambdaException = "UnexpectedLambdaException" - - // ErrCodeUnsupportedIdentityProviderException for service response error code - // "UnsupportedIdentityProviderException". - // - // This exception is thrown when the specified identifier is not supported. - ErrCodeUnsupportedIdentityProviderException = "UnsupportedIdentityProviderException" - - // ErrCodeUnsupportedUserStateException for service response error code - // "UnsupportedUserStateException". - // - // The request failed because the user is in an unsupported state. - ErrCodeUnsupportedUserStateException = "UnsupportedUserStateException" - - // ErrCodeUserImportInProgressException for service response error code - // "UserImportInProgressException". - // - // This exception is thrown when you are trying to modify a user pool while - // a user import job is in progress for that pool. - ErrCodeUserImportInProgressException = "UserImportInProgressException" - - // ErrCodeUserLambdaValidationException for service response error code - // "UserLambdaValidationException". - // - // This exception is thrown when the Amazon Cognito service encounters a user - // validation exception with the AWS Lambda service. - ErrCodeUserLambdaValidationException = "UserLambdaValidationException" - - // ErrCodeUserNotConfirmedException for service response error code - // "UserNotConfirmedException". - // - // This exception is thrown when a user is not confirmed successfully. - ErrCodeUserNotConfirmedException = "UserNotConfirmedException" - - // ErrCodeUserNotFoundException for service response error code - // "UserNotFoundException". - // - // This exception is thrown when a user is not found. - ErrCodeUserNotFoundException = "UserNotFoundException" - - // ErrCodeUserPoolAddOnNotEnabledException for service response error code - // "UserPoolAddOnNotEnabledException". - // - // This exception is thrown when user pool add-ons are not enabled. - ErrCodeUserPoolAddOnNotEnabledException = "UserPoolAddOnNotEnabledException" - - // ErrCodeUserPoolTaggingException for service response error code - // "UserPoolTaggingException". - // - // This exception is thrown when a user pool tag cannot be set or updated. - ErrCodeUserPoolTaggingException = "UserPoolTaggingException" - - // ErrCodeUsernameExistsException for service response error code - // "UsernameExistsException". - // - // This exception is thrown when Amazon Cognito encounters a user name that - // already exists in the user pool. - ErrCodeUsernameExistsException = "UsernameExistsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/service.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/service.go deleted file mode 100644 index 68efbd80b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cognitoidentityprovider - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// CognitoIdentityProvider provides the API operation methods for making requests to -// Amazon Cognito Identity Provider. See this package's package overview docs -// for details on the service. -// -// CognitoIdentityProvider methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CognitoIdentityProvider 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 = "cognito-idp" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Cognito Identity Provider" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CognitoIdentityProvider client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a CognitoIdentityProvider client from just a session. -// svc := cognitoidentityprovider.New(mySession) -// -// // Create a CognitoIdentityProvider client with additional configuration -// svc := cognitoidentityprovider.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CognitoIdentityProvider { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CognitoIdentityProvider { - svc := &CognitoIdentityProvider{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2016-04-18", - JSONVersion: "1.1", - TargetPrefix: "AWSCognitoIdentityProviderService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CognitoIdentityProvider operation and runs any -// custom request initialization. -func (c *CognitoIdentityProvider) 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/configservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go deleted file mode 100644 index bf62e4031..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go +++ /dev/null @@ -1,11699 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package configservice - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opBatchGetAggregateResourceConfig = "BatchGetAggregateResourceConfig" - -// BatchGetAggregateResourceConfigRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetAggregateResourceConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetAggregateResourceConfig for more information on using the BatchGetAggregateResourceConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetAggregateResourceConfigRequest method. -// req, resp := client.BatchGetAggregateResourceConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/BatchGetAggregateResourceConfig -func (c *ConfigService) BatchGetAggregateResourceConfigRequest(input *BatchGetAggregateResourceConfigInput) (req *request.Request, output *BatchGetAggregateResourceConfigOutput) { - op := &request.Operation{ - Name: opBatchGetAggregateResourceConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetAggregateResourceConfigInput{} - } - - output = &BatchGetAggregateResourceConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetAggregateResourceConfig API operation for AWS Config. -// -// Returns the current configuration items for resources that are present in -// your AWS Config aggregator. The operation also returns a list of resources -// that are not processed in the current request. If there are no unprocessed -// resources, the operation returns an empty unprocessedResourceIdentifiers -// list. -// -// The API does not return results for deleted resources. -// -// The API does not return tags and relationships. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation BatchGetAggregateResourceConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The requested action is not valid. -// -// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" -// You have specified a configuration aggregator that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/BatchGetAggregateResourceConfig -func (c *ConfigService) BatchGetAggregateResourceConfig(input *BatchGetAggregateResourceConfigInput) (*BatchGetAggregateResourceConfigOutput, error) { - req, out := c.BatchGetAggregateResourceConfigRequest(input) - return out, req.Send() -} - -// BatchGetAggregateResourceConfigWithContext is the same as BatchGetAggregateResourceConfig with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetAggregateResourceConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) BatchGetAggregateResourceConfigWithContext(ctx aws.Context, input *BatchGetAggregateResourceConfigInput, opts ...request.Option) (*BatchGetAggregateResourceConfigOutput, error) { - req, out := c.BatchGetAggregateResourceConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchGetResourceConfig = "BatchGetResourceConfig" - -// BatchGetResourceConfigRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetResourceConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetResourceConfig for more information on using the BatchGetResourceConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetResourceConfigRequest method. -// req, resp := client.BatchGetResourceConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/BatchGetResourceConfig -func (c *ConfigService) BatchGetResourceConfigRequest(input *BatchGetResourceConfigInput) (req *request.Request, output *BatchGetResourceConfigOutput) { - op := &request.Operation{ - Name: opBatchGetResourceConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetResourceConfigInput{} - } - - output = &BatchGetResourceConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetResourceConfig API operation for AWS Config. -// -// Returns the current configuration for one or more requested resources. The -// operation also returns a list of resources that are not processed in the -// current request. If there are no unprocessed resources, the operation returns -// an empty unprocessedResourceKeys list. -// -// The API does not return results for deleted resources. -// -// The API does not return any tags for the requested resources. This information -// is filtered out of the supplementaryConfiguration section of the API response. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation BatchGetResourceConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The requested action is not valid. -// -// * ErrCodeNoAvailableConfigurationRecorderException "NoAvailableConfigurationRecorderException" -// There are no configuration recorders available to provide the role needed -// to describe your resources. Create a configuration recorder. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/BatchGetResourceConfig -func (c *ConfigService) BatchGetResourceConfig(input *BatchGetResourceConfigInput) (*BatchGetResourceConfigOutput, error) { - req, out := c.BatchGetResourceConfigRequest(input) - return out, req.Send() -} - -// BatchGetResourceConfigWithContext is the same as BatchGetResourceConfig with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetResourceConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) BatchGetResourceConfigWithContext(ctx aws.Context, input *BatchGetResourceConfigInput, opts ...request.Option) (*BatchGetResourceConfigOutput, error) { - req, out := c.BatchGetResourceConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAggregationAuthorization = "DeleteAggregationAuthorization" - -// DeleteAggregationAuthorizationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAggregationAuthorization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAggregationAuthorization for more information on using the DeleteAggregationAuthorization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAggregationAuthorizationRequest method. -// req, resp := client.DeleteAggregationAuthorizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteAggregationAuthorization -func (c *ConfigService) DeleteAggregationAuthorizationRequest(input *DeleteAggregationAuthorizationInput) (req *request.Request, output *DeleteAggregationAuthorizationOutput) { - op := &request.Operation{ - Name: opDeleteAggregationAuthorization, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAggregationAuthorizationInput{} - } - - output = &DeleteAggregationAuthorizationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAggregationAuthorization API operation for AWS Config. -// -// Deletes the authorization granted to the specified configuration aggregator -// account in a specified region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DeleteAggregationAuthorization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteAggregationAuthorization -func (c *ConfigService) DeleteAggregationAuthorization(input *DeleteAggregationAuthorizationInput) (*DeleteAggregationAuthorizationOutput, error) { - req, out := c.DeleteAggregationAuthorizationRequest(input) - return out, req.Send() -} - -// DeleteAggregationAuthorizationWithContext is the same as DeleteAggregationAuthorization with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAggregationAuthorization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DeleteAggregationAuthorizationWithContext(ctx aws.Context, input *DeleteAggregationAuthorizationInput, opts ...request.Option) (*DeleteAggregationAuthorizationOutput, error) { - req, out := c.DeleteAggregationAuthorizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteConfigRule = "DeleteConfigRule" - -// DeleteConfigRuleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteConfigRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteConfigRule for more information on using the DeleteConfigRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteConfigRuleRequest method. -// req, resp := client.DeleteConfigRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConfigRule -func (c *ConfigService) DeleteConfigRuleRequest(input *DeleteConfigRuleInput) (req *request.Request, output *DeleteConfigRuleOutput) { - op := &request.Operation{ - Name: opDeleteConfigRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteConfigRuleInput{} - } - - output = &DeleteConfigRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteConfigRule API operation for AWS Config. -// -// Deletes the specified AWS Config rule and all of its evaluation results. -// -// AWS Config sets the state of a rule to DELETING until the deletion is complete. -// You cannot update a rule while it is in this state. If you make a PutConfigRule -// or DeleteConfigRule request for the rule, you will receive a ResourceInUseException. -// -// You can check the state of a rule by using the DescribeConfigRules request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DeleteConfigRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchConfigRuleException "NoSuchConfigRuleException" -// One or more AWS Config rules in the request are invalid. Verify that the -// rule names are correct and try again. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The rule is currently being deleted or the rule is deleting your evaluation -// results. Try your request again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConfigRule -func (c *ConfigService) DeleteConfigRule(input *DeleteConfigRuleInput) (*DeleteConfigRuleOutput, error) { - req, out := c.DeleteConfigRuleRequest(input) - return out, req.Send() -} - -// DeleteConfigRuleWithContext is the same as DeleteConfigRule with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteConfigRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DeleteConfigRuleWithContext(ctx aws.Context, input *DeleteConfigRuleInput, opts ...request.Option) (*DeleteConfigRuleOutput, error) { - req, out := c.DeleteConfigRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteConfigurationAggregator = "DeleteConfigurationAggregator" - -// DeleteConfigurationAggregatorRequest generates a "aws/request.Request" representing the -// client's request for the DeleteConfigurationAggregator operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteConfigurationAggregator for more information on using the DeleteConfigurationAggregator -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteConfigurationAggregatorRequest method. -// req, resp := client.DeleteConfigurationAggregatorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConfigurationAggregator -func (c *ConfigService) DeleteConfigurationAggregatorRequest(input *DeleteConfigurationAggregatorInput) (req *request.Request, output *DeleteConfigurationAggregatorOutput) { - op := &request.Operation{ - Name: opDeleteConfigurationAggregator, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteConfigurationAggregatorInput{} - } - - output = &DeleteConfigurationAggregatorOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteConfigurationAggregator API operation for AWS Config. -// -// Deletes the specified configuration aggregator and the aggregated data associated -// with the aggregator. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DeleteConfigurationAggregator for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" -// You have specified a configuration aggregator that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConfigurationAggregator -func (c *ConfigService) DeleteConfigurationAggregator(input *DeleteConfigurationAggregatorInput) (*DeleteConfigurationAggregatorOutput, error) { - req, out := c.DeleteConfigurationAggregatorRequest(input) - return out, req.Send() -} - -// DeleteConfigurationAggregatorWithContext is the same as DeleteConfigurationAggregator with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteConfigurationAggregator for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DeleteConfigurationAggregatorWithContext(ctx aws.Context, input *DeleteConfigurationAggregatorInput, opts ...request.Option) (*DeleteConfigurationAggregatorOutput, error) { - req, out := c.DeleteConfigurationAggregatorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteConfigurationRecorder = "DeleteConfigurationRecorder" - -// DeleteConfigurationRecorderRequest generates a "aws/request.Request" representing the -// client's request for the DeleteConfigurationRecorder operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteConfigurationRecorder for more information on using the DeleteConfigurationRecorder -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteConfigurationRecorderRequest method. -// req, resp := client.DeleteConfigurationRecorderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConfigurationRecorder -func (c *ConfigService) DeleteConfigurationRecorderRequest(input *DeleteConfigurationRecorderInput) (req *request.Request, output *DeleteConfigurationRecorderOutput) { - op := &request.Operation{ - Name: opDeleteConfigurationRecorder, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteConfigurationRecorderInput{} - } - - output = &DeleteConfigurationRecorderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteConfigurationRecorder API operation for AWS Config. -// -// Deletes the configuration recorder. -// -// After the configuration recorder is deleted, AWS Config will not record resource -// configuration changes until you create a new configuration recorder. -// -// This action does not delete the configuration information that was previously -// recorded. You will be able to access the previously recorded information -// by using the GetResourceConfigHistory action, but you will not be able to -// access this information in the AWS Config console until you create a new -// configuration recorder. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DeleteConfigurationRecorder for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchConfigurationRecorderException "NoSuchConfigurationRecorderException" -// You have specified a configuration recorder that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConfigurationRecorder -func (c *ConfigService) DeleteConfigurationRecorder(input *DeleteConfigurationRecorderInput) (*DeleteConfigurationRecorderOutput, error) { - req, out := c.DeleteConfigurationRecorderRequest(input) - return out, req.Send() -} - -// DeleteConfigurationRecorderWithContext is the same as DeleteConfigurationRecorder with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteConfigurationRecorder for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DeleteConfigurationRecorderWithContext(ctx aws.Context, input *DeleteConfigurationRecorderInput, opts ...request.Option) (*DeleteConfigurationRecorderOutput, error) { - req, out := c.DeleteConfigurationRecorderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDeliveryChannel = "DeleteDeliveryChannel" - -// DeleteDeliveryChannelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDeliveryChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDeliveryChannel for more information on using the DeleteDeliveryChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDeliveryChannelRequest method. -// req, resp := client.DeleteDeliveryChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteDeliveryChannel -func (c *ConfigService) DeleteDeliveryChannelRequest(input *DeleteDeliveryChannelInput) (req *request.Request, output *DeleteDeliveryChannelOutput) { - op := &request.Operation{ - Name: opDeleteDeliveryChannel, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDeliveryChannelInput{} - } - - output = &DeleteDeliveryChannelOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDeliveryChannel API operation for AWS Config. -// -// Deletes the delivery channel. -// -// Before you can delete the delivery channel, you must stop the configuration -// recorder by using the StopConfigurationRecorder action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DeleteDeliveryChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchDeliveryChannelException "NoSuchDeliveryChannelException" -// You have specified a delivery channel that does not exist. -// -// * ErrCodeLastDeliveryChannelDeleteFailedException "LastDeliveryChannelDeleteFailedException" -// You cannot delete the delivery channel you specified because the configuration -// recorder is running. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteDeliveryChannel -func (c *ConfigService) DeleteDeliveryChannel(input *DeleteDeliveryChannelInput) (*DeleteDeliveryChannelOutput, error) { - req, out := c.DeleteDeliveryChannelRequest(input) - return out, req.Send() -} - -// DeleteDeliveryChannelWithContext is the same as DeleteDeliveryChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDeliveryChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DeleteDeliveryChannelWithContext(ctx aws.Context, input *DeleteDeliveryChannelInput, opts ...request.Option) (*DeleteDeliveryChannelOutput, error) { - req, out := c.DeleteDeliveryChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEvaluationResults = "DeleteEvaluationResults" - -// DeleteEvaluationResultsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEvaluationResults operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEvaluationResults for more information on using the DeleteEvaluationResults -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEvaluationResultsRequest method. -// req, resp := client.DeleteEvaluationResultsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteEvaluationResults -func (c *ConfigService) DeleteEvaluationResultsRequest(input *DeleteEvaluationResultsInput) (req *request.Request, output *DeleteEvaluationResultsOutput) { - op := &request.Operation{ - Name: opDeleteEvaluationResults, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteEvaluationResultsInput{} - } - - output = &DeleteEvaluationResultsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteEvaluationResults API operation for AWS Config. -// -// Deletes the evaluation results for the specified AWS Config rule. You can -// specify one AWS Config rule per request. After you delete the evaluation -// results, you can call the StartConfigRulesEvaluation API to start evaluating -// your AWS resources against the rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DeleteEvaluationResults for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchConfigRuleException "NoSuchConfigRuleException" -// One or more AWS Config rules in the request are invalid. Verify that the -// rule names are correct and try again. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The rule is currently being deleted or the rule is deleting your evaluation -// results. Try your request again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteEvaluationResults -func (c *ConfigService) DeleteEvaluationResults(input *DeleteEvaluationResultsInput) (*DeleteEvaluationResultsOutput, error) { - req, out := c.DeleteEvaluationResultsRequest(input) - return out, req.Send() -} - -// DeleteEvaluationResultsWithContext is the same as DeleteEvaluationResults with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEvaluationResults for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DeleteEvaluationResultsWithContext(ctx aws.Context, input *DeleteEvaluationResultsInput, opts ...request.Option) (*DeleteEvaluationResultsOutput, error) { - req, out := c.DeleteEvaluationResultsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePendingAggregationRequest = "DeletePendingAggregationRequest" - -// DeletePendingAggregationRequestRequest generates a "aws/request.Request" representing the -// client's request for the DeletePendingAggregationRequest operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePendingAggregationRequest for more information on using the DeletePendingAggregationRequest -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePendingAggregationRequestRequest method. -// req, resp := client.DeletePendingAggregationRequestRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeletePendingAggregationRequest -func (c *ConfigService) DeletePendingAggregationRequestRequest(input *DeletePendingAggregationRequestInput) (req *request.Request, output *DeletePendingAggregationRequestOutput) { - op := &request.Operation{ - Name: opDeletePendingAggregationRequest, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePendingAggregationRequestInput{} - } - - output = &DeletePendingAggregationRequestOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePendingAggregationRequest API operation for AWS Config. -// -// Deletes pending authorization requests for a specified aggregator account -// in a specified region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DeletePendingAggregationRequest for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeletePendingAggregationRequest -func (c *ConfigService) DeletePendingAggregationRequest(input *DeletePendingAggregationRequestInput) (*DeletePendingAggregationRequestOutput, error) { - req, out := c.DeletePendingAggregationRequestRequest(input) - return out, req.Send() -} - -// DeletePendingAggregationRequestWithContext is the same as DeletePendingAggregationRequest with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePendingAggregationRequest for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DeletePendingAggregationRequestWithContext(ctx aws.Context, input *DeletePendingAggregationRequestInput, opts ...request.Option) (*DeletePendingAggregationRequestOutput, error) { - req, out := c.DeletePendingAggregationRequestRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRetentionConfiguration = "DeleteRetentionConfiguration" - -// DeleteRetentionConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRetentionConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRetentionConfiguration for more information on using the DeleteRetentionConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRetentionConfigurationRequest method. -// req, resp := client.DeleteRetentionConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteRetentionConfiguration -func (c *ConfigService) DeleteRetentionConfigurationRequest(input *DeleteRetentionConfigurationInput) (req *request.Request, output *DeleteRetentionConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteRetentionConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRetentionConfigurationInput{} - } - - output = &DeleteRetentionConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRetentionConfiguration API operation for AWS Config. -// -// Deletes the retention configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DeleteRetentionConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// * ErrCodeNoSuchRetentionConfigurationException "NoSuchRetentionConfigurationException" -// You have specified a retention configuration that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteRetentionConfiguration -func (c *ConfigService) DeleteRetentionConfiguration(input *DeleteRetentionConfigurationInput) (*DeleteRetentionConfigurationOutput, error) { - req, out := c.DeleteRetentionConfigurationRequest(input) - return out, req.Send() -} - -// DeleteRetentionConfigurationWithContext is the same as DeleteRetentionConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRetentionConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DeleteRetentionConfigurationWithContext(ctx aws.Context, input *DeleteRetentionConfigurationInput, opts ...request.Option) (*DeleteRetentionConfigurationOutput, error) { - req, out := c.DeleteRetentionConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeliverConfigSnapshot = "DeliverConfigSnapshot" - -// DeliverConfigSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the DeliverConfigSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeliverConfigSnapshot for more information on using the DeliverConfigSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeliverConfigSnapshotRequest method. -// req, resp := client.DeliverConfigSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeliverConfigSnapshot -func (c *ConfigService) DeliverConfigSnapshotRequest(input *DeliverConfigSnapshotInput) (req *request.Request, output *DeliverConfigSnapshotOutput) { - op := &request.Operation{ - Name: opDeliverConfigSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeliverConfigSnapshotInput{} - } - - output = &DeliverConfigSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeliverConfigSnapshot API operation for AWS Config. -// -// Schedules delivery of a configuration snapshot to the Amazon S3 bucket in -// the specified delivery channel. After the delivery has started, AWS Config -// sends the following notifications using an Amazon SNS topic that you have -// specified. -// -// * Notification of the start of the delivery. -// -// * Notification of the completion of the delivery, if the delivery was -// successfully completed. -// -// * Notification of delivery failure, if the delivery failed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DeliverConfigSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchDeliveryChannelException "NoSuchDeliveryChannelException" -// You have specified a delivery channel that does not exist. -// -// * ErrCodeNoAvailableConfigurationRecorderException "NoAvailableConfigurationRecorderException" -// There are no configuration recorders available to provide the role needed -// to describe your resources. Create a configuration recorder. -// -// * ErrCodeNoRunningConfigurationRecorderException "NoRunningConfigurationRecorderException" -// There is no configuration recorder running. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeliverConfigSnapshot -func (c *ConfigService) DeliverConfigSnapshot(input *DeliverConfigSnapshotInput) (*DeliverConfigSnapshotOutput, error) { - req, out := c.DeliverConfigSnapshotRequest(input) - return out, req.Send() -} - -// DeliverConfigSnapshotWithContext is the same as DeliverConfigSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See DeliverConfigSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DeliverConfigSnapshotWithContext(ctx aws.Context, input *DeliverConfigSnapshotInput, opts ...request.Option) (*DeliverConfigSnapshotOutput, error) { - req, out := c.DeliverConfigSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAggregateComplianceByConfigRules = "DescribeAggregateComplianceByConfigRules" - -// DescribeAggregateComplianceByConfigRulesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAggregateComplianceByConfigRules operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAggregateComplianceByConfigRules for more information on using the DescribeAggregateComplianceByConfigRules -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAggregateComplianceByConfigRulesRequest method. -// req, resp := client.DescribeAggregateComplianceByConfigRulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeAggregateComplianceByConfigRules -func (c *ConfigService) DescribeAggregateComplianceByConfigRulesRequest(input *DescribeAggregateComplianceByConfigRulesInput) (req *request.Request, output *DescribeAggregateComplianceByConfigRulesOutput) { - op := &request.Operation{ - Name: opDescribeAggregateComplianceByConfigRules, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAggregateComplianceByConfigRulesInput{} - } - - output = &DescribeAggregateComplianceByConfigRulesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAggregateComplianceByConfigRules API operation for AWS Config. -// -// Returns a list of compliant and noncompliant rules with the number of resources -// for compliant and noncompliant rules. -// -// The results can return an empty result page, but if you have a nextToken, -// the results are displayed on the next page. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DescribeAggregateComplianceByConfigRules for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The requested action is not valid. -// -// * ErrCodeInvalidLimitException "InvalidLimitException" -// The specified limit is outside the allowable range. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" -// You have specified a configuration aggregator that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeAggregateComplianceByConfigRules -func (c *ConfigService) DescribeAggregateComplianceByConfigRules(input *DescribeAggregateComplianceByConfigRulesInput) (*DescribeAggregateComplianceByConfigRulesOutput, error) { - req, out := c.DescribeAggregateComplianceByConfigRulesRequest(input) - return out, req.Send() -} - -// DescribeAggregateComplianceByConfigRulesWithContext is the same as DescribeAggregateComplianceByConfigRules with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAggregateComplianceByConfigRules for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DescribeAggregateComplianceByConfigRulesWithContext(ctx aws.Context, input *DescribeAggregateComplianceByConfigRulesInput, opts ...request.Option) (*DescribeAggregateComplianceByConfigRulesOutput, error) { - req, out := c.DescribeAggregateComplianceByConfigRulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAggregationAuthorizations = "DescribeAggregationAuthorizations" - -// DescribeAggregationAuthorizationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAggregationAuthorizations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAggregationAuthorizations for more information on using the DescribeAggregationAuthorizations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAggregationAuthorizationsRequest method. -// req, resp := client.DescribeAggregationAuthorizationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeAggregationAuthorizations -func (c *ConfigService) DescribeAggregationAuthorizationsRequest(input *DescribeAggregationAuthorizationsInput) (req *request.Request, output *DescribeAggregationAuthorizationsOutput) { - op := &request.Operation{ - Name: opDescribeAggregationAuthorizations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAggregationAuthorizationsInput{} - } - - output = &DescribeAggregationAuthorizationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAggregationAuthorizations API operation for AWS Config. -// -// Returns a list of authorizations granted to various aggregator accounts and -// regions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DescribeAggregationAuthorizations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// * ErrCodeInvalidLimitException "InvalidLimitException" -// The specified limit is outside the allowable range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeAggregationAuthorizations -func (c *ConfigService) DescribeAggregationAuthorizations(input *DescribeAggregationAuthorizationsInput) (*DescribeAggregationAuthorizationsOutput, error) { - req, out := c.DescribeAggregationAuthorizationsRequest(input) - return out, req.Send() -} - -// DescribeAggregationAuthorizationsWithContext is the same as DescribeAggregationAuthorizations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAggregationAuthorizations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DescribeAggregationAuthorizationsWithContext(ctx aws.Context, input *DescribeAggregationAuthorizationsInput, opts ...request.Option) (*DescribeAggregationAuthorizationsOutput, error) { - req, out := c.DescribeAggregationAuthorizationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeComplianceByConfigRule = "DescribeComplianceByConfigRule" - -// DescribeComplianceByConfigRuleRequest generates a "aws/request.Request" representing the -// client's request for the DescribeComplianceByConfigRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeComplianceByConfigRule for more information on using the DescribeComplianceByConfigRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeComplianceByConfigRuleRequest method. -// req, resp := client.DescribeComplianceByConfigRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByConfigRule -func (c *ConfigService) DescribeComplianceByConfigRuleRequest(input *DescribeComplianceByConfigRuleInput) (req *request.Request, output *DescribeComplianceByConfigRuleOutput) { - op := &request.Operation{ - Name: opDescribeComplianceByConfigRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeComplianceByConfigRuleInput{} - } - - output = &DescribeComplianceByConfigRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeComplianceByConfigRule API operation for AWS Config. -// -// Indicates whether the specified AWS Config rules are compliant. If a rule -// is noncompliant, this action returns the number of AWS resources that do -// not comply with the rule. -// -// A rule is compliant if all of the evaluated resources comply with it. It -// is noncompliant if any of these resources do not comply. -// -// If AWS Config has no current evaluation results for the rule, it returns -// INSUFFICIENT_DATA. This result might indicate one of the following conditions: -// -// * AWS Config has never invoked an evaluation for the rule. To check whether -// it has, use the DescribeConfigRuleEvaluationStatus action to get the LastSuccessfulInvocationTime -// and LastFailedInvocationTime. -// -// * The rule's AWS Lambda function is failing to send evaluation results -// to AWS Config. Verify that the role you assigned to your configuration -// recorder includes the config:PutEvaluations permission. If the rule is -// a custom rule, verify that the AWS Lambda execution role includes the -// config:PutEvaluations permission. -// -// * The rule's AWS Lambda function has returned NOT_APPLICABLE for all evaluation -// results. This can occur if the resources were deleted or removed from -// the rule's scope. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DescribeComplianceByConfigRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// * ErrCodeNoSuchConfigRuleException "NoSuchConfigRuleException" -// One or more AWS Config rules in the request are invalid. Verify that the -// rule names are correct and try again. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByConfigRule -func (c *ConfigService) DescribeComplianceByConfigRule(input *DescribeComplianceByConfigRuleInput) (*DescribeComplianceByConfigRuleOutput, error) { - req, out := c.DescribeComplianceByConfigRuleRequest(input) - return out, req.Send() -} - -// DescribeComplianceByConfigRuleWithContext is the same as DescribeComplianceByConfigRule with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeComplianceByConfigRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DescribeComplianceByConfigRuleWithContext(ctx aws.Context, input *DescribeComplianceByConfigRuleInput, opts ...request.Option) (*DescribeComplianceByConfigRuleOutput, error) { - req, out := c.DescribeComplianceByConfigRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeComplianceByResource = "DescribeComplianceByResource" - -// DescribeComplianceByResourceRequest generates a "aws/request.Request" representing the -// client's request for the DescribeComplianceByResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeComplianceByResource for more information on using the DescribeComplianceByResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeComplianceByResourceRequest method. -// req, resp := client.DescribeComplianceByResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByResource -func (c *ConfigService) DescribeComplianceByResourceRequest(input *DescribeComplianceByResourceInput) (req *request.Request, output *DescribeComplianceByResourceOutput) { - op := &request.Operation{ - Name: opDescribeComplianceByResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeComplianceByResourceInput{} - } - - output = &DescribeComplianceByResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeComplianceByResource API operation for AWS Config. -// -// Indicates whether the specified AWS resources are compliant. If a resource -// is noncompliant, this action returns the number of AWS Config rules that -// the resource does not comply with. -// -// A resource is compliant if it complies with all the AWS Config rules that -// evaluate it. It is noncompliant if it does not comply with one or more of -// these rules. -// -// If AWS Config has no current evaluation results for the resource, it returns -// INSUFFICIENT_DATA. This result might indicate one of the following conditions -// about the rules that evaluate the resource: -// -// * AWS Config has never invoked an evaluation for the rule. To check whether -// it has, use the DescribeConfigRuleEvaluationStatus action to get the LastSuccessfulInvocationTime -// and LastFailedInvocationTime. -// -// * The rule's AWS Lambda function is failing to send evaluation results -// to AWS Config. Verify that the role that you assigned to your configuration -// recorder includes the config:PutEvaluations permission. If the rule is -// a custom rule, verify that the AWS Lambda execution role includes the -// config:PutEvaluations permission. -// -// * The rule's AWS Lambda function has returned NOT_APPLICABLE for all evaluation -// results. This can occur if the resources were deleted or removed from -// the rule's scope. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DescribeComplianceByResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByResource -func (c *ConfigService) DescribeComplianceByResource(input *DescribeComplianceByResourceInput) (*DescribeComplianceByResourceOutput, error) { - req, out := c.DescribeComplianceByResourceRequest(input) - return out, req.Send() -} - -// DescribeComplianceByResourceWithContext is the same as DescribeComplianceByResource with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeComplianceByResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DescribeComplianceByResourceWithContext(ctx aws.Context, input *DescribeComplianceByResourceInput, opts ...request.Option) (*DescribeComplianceByResourceOutput, error) { - req, out := c.DescribeComplianceByResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConfigRuleEvaluationStatus = "DescribeConfigRuleEvaluationStatus" - -// DescribeConfigRuleEvaluationStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConfigRuleEvaluationStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConfigRuleEvaluationStatus for more information on using the DescribeConfigRuleEvaluationStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConfigRuleEvaluationStatusRequest method. -// req, resp := client.DescribeConfigRuleEvaluationStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigRuleEvaluationStatus -func (c *ConfigService) DescribeConfigRuleEvaluationStatusRequest(input *DescribeConfigRuleEvaluationStatusInput) (req *request.Request, output *DescribeConfigRuleEvaluationStatusOutput) { - op := &request.Operation{ - Name: opDescribeConfigRuleEvaluationStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConfigRuleEvaluationStatusInput{} - } - - output = &DescribeConfigRuleEvaluationStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConfigRuleEvaluationStatus API operation for AWS Config. -// -// Returns status information for each of your AWS managed Config rules. The -// status includes information such as the last time AWS Config invoked the -// rule, the last time AWS Config failed to invoke the rule, and the related -// error for the last failure. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DescribeConfigRuleEvaluationStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchConfigRuleException "NoSuchConfigRuleException" -// One or more AWS Config rules in the request are invalid. Verify that the -// rule names are correct and try again. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigRuleEvaluationStatus -func (c *ConfigService) DescribeConfigRuleEvaluationStatus(input *DescribeConfigRuleEvaluationStatusInput) (*DescribeConfigRuleEvaluationStatusOutput, error) { - req, out := c.DescribeConfigRuleEvaluationStatusRequest(input) - return out, req.Send() -} - -// DescribeConfigRuleEvaluationStatusWithContext is the same as DescribeConfigRuleEvaluationStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConfigRuleEvaluationStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DescribeConfigRuleEvaluationStatusWithContext(ctx aws.Context, input *DescribeConfigRuleEvaluationStatusInput, opts ...request.Option) (*DescribeConfigRuleEvaluationStatusOutput, error) { - req, out := c.DescribeConfigRuleEvaluationStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConfigRules = "DescribeConfigRules" - -// DescribeConfigRulesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConfigRules operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConfigRules for more information on using the DescribeConfigRules -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConfigRulesRequest method. -// req, resp := client.DescribeConfigRulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigRules -func (c *ConfigService) DescribeConfigRulesRequest(input *DescribeConfigRulesInput) (req *request.Request, output *DescribeConfigRulesOutput) { - op := &request.Operation{ - Name: opDescribeConfigRules, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConfigRulesInput{} - } - - output = &DescribeConfigRulesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConfigRules API operation for AWS Config. -// -// Returns details about your AWS Config rules. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DescribeConfigRules for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchConfigRuleException "NoSuchConfigRuleException" -// One or more AWS Config rules in the request are invalid. Verify that the -// rule names are correct and try again. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigRules -func (c *ConfigService) DescribeConfigRules(input *DescribeConfigRulesInput) (*DescribeConfigRulesOutput, error) { - req, out := c.DescribeConfigRulesRequest(input) - return out, req.Send() -} - -// DescribeConfigRulesWithContext is the same as DescribeConfigRules with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConfigRules for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DescribeConfigRulesWithContext(ctx aws.Context, input *DescribeConfigRulesInput, opts ...request.Option) (*DescribeConfigRulesOutput, error) { - req, out := c.DescribeConfigRulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConfigurationAggregatorSourcesStatus = "DescribeConfigurationAggregatorSourcesStatus" - -// DescribeConfigurationAggregatorSourcesStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConfigurationAggregatorSourcesStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConfigurationAggregatorSourcesStatus for more information on using the DescribeConfigurationAggregatorSourcesStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConfigurationAggregatorSourcesStatusRequest method. -// req, resp := client.DescribeConfigurationAggregatorSourcesStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationAggregatorSourcesStatus -func (c *ConfigService) DescribeConfigurationAggregatorSourcesStatusRequest(input *DescribeConfigurationAggregatorSourcesStatusInput) (req *request.Request, output *DescribeConfigurationAggregatorSourcesStatusOutput) { - op := &request.Operation{ - Name: opDescribeConfigurationAggregatorSourcesStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConfigurationAggregatorSourcesStatusInput{} - } - - output = &DescribeConfigurationAggregatorSourcesStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConfigurationAggregatorSourcesStatus API operation for AWS Config. -// -// Returns status information for sources within an aggregator. The status includes -// information about the last time AWS Config aggregated data from source accounts -// or AWS Config failed to aggregate data from source accounts with the related -// error code or message. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DescribeConfigurationAggregatorSourcesStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" -// You have specified a configuration aggregator that does not exist. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// * ErrCodeInvalidLimitException "InvalidLimitException" -// The specified limit is outside the allowable range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationAggregatorSourcesStatus -func (c *ConfigService) DescribeConfigurationAggregatorSourcesStatus(input *DescribeConfigurationAggregatorSourcesStatusInput) (*DescribeConfigurationAggregatorSourcesStatusOutput, error) { - req, out := c.DescribeConfigurationAggregatorSourcesStatusRequest(input) - return out, req.Send() -} - -// DescribeConfigurationAggregatorSourcesStatusWithContext is the same as DescribeConfigurationAggregatorSourcesStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConfigurationAggregatorSourcesStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DescribeConfigurationAggregatorSourcesStatusWithContext(ctx aws.Context, input *DescribeConfigurationAggregatorSourcesStatusInput, opts ...request.Option) (*DescribeConfigurationAggregatorSourcesStatusOutput, error) { - req, out := c.DescribeConfigurationAggregatorSourcesStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConfigurationAggregators = "DescribeConfigurationAggregators" - -// DescribeConfigurationAggregatorsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConfigurationAggregators operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConfigurationAggregators for more information on using the DescribeConfigurationAggregators -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConfigurationAggregatorsRequest method. -// req, resp := client.DescribeConfigurationAggregatorsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationAggregators -func (c *ConfigService) DescribeConfigurationAggregatorsRequest(input *DescribeConfigurationAggregatorsInput) (req *request.Request, output *DescribeConfigurationAggregatorsOutput) { - op := &request.Operation{ - Name: opDescribeConfigurationAggregators, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConfigurationAggregatorsInput{} - } - - output = &DescribeConfigurationAggregatorsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConfigurationAggregators API operation for AWS Config. -// -// Returns the details of one or more configuration aggregators. If the configuration -// aggregator is not specified, this action returns the details for all the -// configuration aggregators associated with the account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DescribeConfigurationAggregators for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" -// You have specified a configuration aggregator that does not exist. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// * ErrCodeInvalidLimitException "InvalidLimitException" -// The specified limit is outside the allowable range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationAggregators -func (c *ConfigService) DescribeConfigurationAggregators(input *DescribeConfigurationAggregatorsInput) (*DescribeConfigurationAggregatorsOutput, error) { - req, out := c.DescribeConfigurationAggregatorsRequest(input) - return out, req.Send() -} - -// DescribeConfigurationAggregatorsWithContext is the same as DescribeConfigurationAggregators with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConfigurationAggregators for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DescribeConfigurationAggregatorsWithContext(ctx aws.Context, input *DescribeConfigurationAggregatorsInput, opts ...request.Option) (*DescribeConfigurationAggregatorsOutput, error) { - req, out := c.DescribeConfigurationAggregatorsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConfigurationRecorderStatus = "DescribeConfigurationRecorderStatus" - -// DescribeConfigurationRecorderStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConfigurationRecorderStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConfigurationRecorderStatus for more information on using the DescribeConfigurationRecorderStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConfigurationRecorderStatusRequest method. -// req, resp := client.DescribeConfigurationRecorderStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorderStatus -func (c *ConfigService) DescribeConfigurationRecorderStatusRequest(input *DescribeConfigurationRecorderStatusInput) (req *request.Request, output *DescribeConfigurationRecorderStatusOutput) { - op := &request.Operation{ - Name: opDescribeConfigurationRecorderStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConfigurationRecorderStatusInput{} - } - - output = &DescribeConfigurationRecorderStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConfigurationRecorderStatus API operation for AWS Config. -// -// Returns the current status of the specified configuration recorder. If a -// configuration recorder is not specified, this action returns the status of -// all configuration recorders associated with the account. -// -// Currently, you can specify only one configuration recorder per region in -// your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DescribeConfigurationRecorderStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchConfigurationRecorderException "NoSuchConfigurationRecorderException" -// You have specified a configuration recorder that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorderStatus -func (c *ConfigService) DescribeConfigurationRecorderStatus(input *DescribeConfigurationRecorderStatusInput) (*DescribeConfigurationRecorderStatusOutput, error) { - req, out := c.DescribeConfigurationRecorderStatusRequest(input) - return out, req.Send() -} - -// DescribeConfigurationRecorderStatusWithContext is the same as DescribeConfigurationRecorderStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConfigurationRecorderStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DescribeConfigurationRecorderStatusWithContext(ctx aws.Context, input *DescribeConfigurationRecorderStatusInput, opts ...request.Option) (*DescribeConfigurationRecorderStatusOutput, error) { - req, out := c.DescribeConfigurationRecorderStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConfigurationRecorders = "DescribeConfigurationRecorders" - -// DescribeConfigurationRecordersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConfigurationRecorders operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConfigurationRecorders for more information on using the DescribeConfigurationRecorders -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConfigurationRecordersRequest method. -// req, resp := client.DescribeConfigurationRecordersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorders -func (c *ConfigService) DescribeConfigurationRecordersRequest(input *DescribeConfigurationRecordersInput) (req *request.Request, output *DescribeConfigurationRecordersOutput) { - op := &request.Operation{ - Name: opDescribeConfigurationRecorders, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConfigurationRecordersInput{} - } - - output = &DescribeConfigurationRecordersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConfigurationRecorders API operation for AWS Config. -// -// Returns the details for the specified configuration recorders. If the configuration -// recorder is not specified, this action returns the details for all configuration -// recorders associated with the account. -// -// Currently, you can specify only one configuration recorder per region in -// your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DescribeConfigurationRecorders for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchConfigurationRecorderException "NoSuchConfigurationRecorderException" -// You have specified a configuration recorder that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorders -func (c *ConfigService) DescribeConfigurationRecorders(input *DescribeConfigurationRecordersInput) (*DescribeConfigurationRecordersOutput, error) { - req, out := c.DescribeConfigurationRecordersRequest(input) - return out, req.Send() -} - -// DescribeConfigurationRecordersWithContext is the same as DescribeConfigurationRecorders with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConfigurationRecorders for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DescribeConfigurationRecordersWithContext(ctx aws.Context, input *DescribeConfigurationRecordersInput, opts ...request.Option) (*DescribeConfigurationRecordersOutput, error) { - req, out := c.DescribeConfigurationRecordersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDeliveryChannelStatus = "DescribeDeliveryChannelStatus" - -// DescribeDeliveryChannelStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDeliveryChannelStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDeliveryChannelStatus for more information on using the DescribeDeliveryChannelStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDeliveryChannelStatusRequest method. -// req, resp := client.DescribeDeliveryChannelStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeDeliveryChannelStatus -func (c *ConfigService) DescribeDeliveryChannelStatusRequest(input *DescribeDeliveryChannelStatusInput) (req *request.Request, output *DescribeDeliveryChannelStatusOutput) { - op := &request.Operation{ - Name: opDescribeDeliveryChannelStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDeliveryChannelStatusInput{} - } - - output = &DescribeDeliveryChannelStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDeliveryChannelStatus API operation for AWS Config. -// -// Returns the current status of the specified delivery channel. If a delivery -// channel is not specified, this action returns the current status of all delivery -// channels associated with the account. -// -// Currently, you can specify only one delivery channel per region in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DescribeDeliveryChannelStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchDeliveryChannelException "NoSuchDeliveryChannelException" -// You have specified a delivery channel that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeDeliveryChannelStatus -func (c *ConfigService) DescribeDeliveryChannelStatus(input *DescribeDeliveryChannelStatusInput) (*DescribeDeliveryChannelStatusOutput, error) { - req, out := c.DescribeDeliveryChannelStatusRequest(input) - return out, req.Send() -} - -// DescribeDeliveryChannelStatusWithContext is the same as DescribeDeliveryChannelStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDeliveryChannelStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DescribeDeliveryChannelStatusWithContext(ctx aws.Context, input *DescribeDeliveryChannelStatusInput, opts ...request.Option) (*DescribeDeliveryChannelStatusOutput, error) { - req, out := c.DescribeDeliveryChannelStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDeliveryChannels = "DescribeDeliveryChannels" - -// DescribeDeliveryChannelsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDeliveryChannels operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDeliveryChannels for more information on using the DescribeDeliveryChannels -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDeliveryChannelsRequest method. -// req, resp := client.DescribeDeliveryChannelsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeDeliveryChannels -func (c *ConfigService) DescribeDeliveryChannelsRequest(input *DescribeDeliveryChannelsInput) (req *request.Request, output *DescribeDeliveryChannelsOutput) { - op := &request.Operation{ - Name: opDescribeDeliveryChannels, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDeliveryChannelsInput{} - } - - output = &DescribeDeliveryChannelsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDeliveryChannels API operation for AWS Config. -// -// Returns details about the specified delivery channel. If a delivery channel -// is not specified, this action returns the details of all delivery channels -// associated with the account. -// -// Currently, you can specify only one delivery channel per region in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DescribeDeliveryChannels for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchDeliveryChannelException "NoSuchDeliveryChannelException" -// You have specified a delivery channel that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeDeliveryChannels -func (c *ConfigService) DescribeDeliveryChannels(input *DescribeDeliveryChannelsInput) (*DescribeDeliveryChannelsOutput, error) { - req, out := c.DescribeDeliveryChannelsRequest(input) - return out, req.Send() -} - -// DescribeDeliveryChannelsWithContext is the same as DescribeDeliveryChannels with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDeliveryChannels for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DescribeDeliveryChannelsWithContext(ctx aws.Context, input *DescribeDeliveryChannelsInput, opts ...request.Option) (*DescribeDeliveryChannelsOutput, error) { - req, out := c.DescribeDeliveryChannelsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribePendingAggregationRequests = "DescribePendingAggregationRequests" - -// DescribePendingAggregationRequestsRequest generates a "aws/request.Request" representing the -// client's request for the DescribePendingAggregationRequests operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePendingAggregationRequests for more information on using the DescribePendingAggregationRequests -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePendingAggregationRequestsRequest method. -// req, resp := client.DescribePendingAggregationRequestsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribePendingAggregationRequests -func (c *ConfigService) DescribePendingAggregationRequestsRequest(input *DescribePendingAggregationRequestsInput) (req *request.Request, output *DescribePendingAggregationRequestsOutput) { - op := &request.Operation{ - Name: opDescribePendingAggregationRequests, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePendingAggregationRequestsInput{} - } - - output = &DescribePendingAggregationRequestsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePendingAggregationRequests API operation for AWS Config. -// -// Returns a list of all pending aggregation requests. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DescribePendingAggregationRequests for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// * ErrCodeInvalidLimitException "InvalidLimitException" -// The specified limit is outside the allowable range. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribePendingAggregationRequests -func (c *ConfigService) DescribePendingAggregationRequests(input *DescribePendingAggregationRequestsInput) (*DescribePendingAggregationRequestsOutput, error) { - req, out := c.DescribePendingAggregationRequestsRequest(input) - return out, req.Send() -} - -// DescribePendingAggregationRequestsWithContext is the same as DescribePendingAggregationRequests with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePendingAggregationRequests for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DescribePendingAggregationRequestsWithContext(ctx aws.Context, input *DescribePendingAggregationRequestsInput, opts ...request.Option) (*DescribePendingAggregationRequestsOutput, error) { - req, out := c.DescribePendingAggregationRequestsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeRetentionConfigurations = "DescribeRetentionConfigurations" - -// DescribeRetentionConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRetentionConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRetentionConfigurations for more information on using the DescribeRetentionConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRetentionConfigurationsRequest method. -// req, resp := client.DescribeRetentionConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeRetentionConfigurations -func (c *ConfigService) DescribeRetentionConfigurationsRequest(input *DescribeRetentionConfigurationsInput) (req *request.Request, output *DescribeRetentionConfigurationsOutput) { - op := &request.Operation{ - Name: opDescribeRetentionConfigurations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeRetentionConfigurationsInput{} - } - - output = &DescribeRetentionConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRetentionConfigurations API operation for AWS Config. -// -// Returns the details of one or more retention configurations. If the retention -// configuration name is not specified, this action returns the details for -// all the retention configurations for that account. -// -// Currently, AWS Config supports only one retention configuration per region -// in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation DescribeRetentionConfigurations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// * ErrCodeNoSuchRetentionConfigurationException "NoSuchRetentionConfigurationException" -// You have specified a retention configuration that does not exist. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeRetentionConfigurations -func (c *ConfigService) DescribeRetentionConfigurations(input *DescribeRetentionConfigurationsInput) (*DescribeRetentionConfigurationsOutput, error) { - req, out := c.DescribeRetentionConfigurationsRequest(input) - return out, req.Send() -} - -// DescribeRetentionConfigurationsWithContext is the same as DescribeRetentionConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRetentionConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) DescribeRetentionConfigurationsWithContext(ctx aws.Context, input *DescribeRetentionConfigurationsInput, opts ...request.Option) (*DescribeRetentionConfigurationsOutput, error) { - req, out := c.DescribeRetentionConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAggregateComplianceDetailsByConfigRule = "GetAggregateComplianceDetailsByConfigRule" - -// GetAggregateComplianceDetailsByConfigRuleRequest generates a "aws/request.Request" representing the -// client's request for the GetAggregateComplianceDetailsByConfigRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAggregateComplianceDetailsByConfigRule for more information on using the GetAggregateComplianceDetailsByConfigRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAggregateComplianceDetailsByConfigRuleRequest method. -// req, resp := client.GetAggregateComplianceDetailsByConfigRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateComplianceDetailsByConfigRule -func (c *ConfigService) GetAggregateComplianceDetailsByConfigRuleRequest(input *GetAggregateComplianceDetailsByConfigRuleInput) (req *request.Request, output *GetAggregateComplianceDetailsByConfigRuleOutput) { - op := &request.Operation{ - Name: opGetAggregateComplianceDetailsByConfigRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAggregateComplianceDetailsByConfigRuleInput{} - } - - output = &GetAggregateComplianceDetailsByConfigRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAggregateComplianceDetailsByConfigRule API operation for AWS Config. -// -// Returns the evaluation results for the specified AWS Config rule for a specific -// resource in a rule. The results indicate which AWS resources were evaluated -// by the rule, when each resource was last evaluated, and whether each resource -// complies with the rule. -// -// The results can return an empty result page. But if you have a nextToken, -// the results are displayed on the next page. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation GetAggregateComplianceDetailsByConfigRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The requested action is not valid. -// -// * ErrCodeInvalidLimitException "InvalidLimitException" -// The specified limit is outside the allowable range. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" -// You have specified a configuration aggregator that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateComplianceDetailsByConfigRule -func (c *ConfigService) GetAggregateComplianceDetailsByConfigRule(input *GetAggregateComplianceDetailsByConfigRuleInput) (*GetAggregateComplianceDetailsByConfigRuleOutput, error) { - req, out := c.GetAggregateComplianceDetailsByConfigRuleRequest(input) - return out, req.Send() -} - -// GetAggregateComplianceDetailsByConfigRuleWithContext is the same as GetAggregateComplianceDetailsByConfigRule with the addition of -// the ability to pass a context and additional request options. -// -// See GetAggregateComplianceDetailsByConfigRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) GetAggregateComplianceDetailsByConfigRuleWithContext(ctx aws.Context, input *GetAggregateComplianceDetailsByConfigRuleInput, opts ...request.Option) (*GetAggregateComplianceDetailsByConfigRuleOutput, error) { - req, out := c.GetAggregateComplianceDetailsByConfigRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAggregateConfigRuleComplianceSummary = "GetAggregateConfigRuleComplianceSummary" - -// GetAggregateConfigRuleComplianceSummaryRequest generates a "aws/request.Request" representing the -// client's request for the GetAggregateConfigRuleComplianceSummary operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAggregateConfigRuleComplianceSummary for more information on using the GetAggregateConfigRuleComplianceSummary -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAggregateConfigRuleComplianceSummaryRequest method. -// req, resp := client.GetAggregateConfigRuleComplianceSummaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateConfigRuleComplianceSummary -func (c *ConfigService) GetAggregateConfigRuleComplianceSummaryRequest(input *GetAggregateConfigRuleComplianceSummaryInput) (req *request.Request, output *GetAggregateConfigRuleComplianceSummaryOutput) { - op := &request.Operation{ - Name: opGetAggregateConfigRuleComplianceSummary, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAggregateConfigRuleComplianceSummaryInput{} - } - - output = &GetAggregateConfigRuleComplianceSummaryOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAggregateConfigRuleComplianceSummary API operation for AWS Config. -// -// Returns the number of compliant and noncompliant rules for one or more accounts -// and regions in an aggregator. -// -// The results can return an empty result page, but if you have a nextToken, -// the results are displayed on the next page. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation GetAggregateConfigRuleComplianceSummary for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The requested action is not valid. -// -// * ErrCodeInvalidLimitException "InvalidLimitException" -// The specified limit is outside the allowable range. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" -// You have specified a configuration aggregator that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateConfigRuleComplianceSummary -func (c *ConfigService) GetAggregateConfigRuleComplianceSummary(input *GetAggregateConfigRuleComplianceSummaryInput) (*GetAggregateConfigRuleComplianceSummaryOutput, error) { - req, out := c.GetAggregateConfigRuleComplianceSummaryRequest(input) - return out, req.Send() -} - -// GetAggregateConfigRuleComplianceSummaryWithContext is the same as GetAggregateConfigRuleComplianceSummary with the addition of -// the ability to pass a context and additional request options. -// -// See GetAggregateConfigRuleComplianceSummary for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) GetAggregateConfigRuleComplianceSummaryWithContext(ctx aws.Context, input *GetAggregateConfigRuleComplianceSummaryInput, opts ...request.Option) (*GetAggregateConfigRuleComplianceSummaryOutput, error) { - req, out := c.GetAggregateConfigRuleComplianceSummaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAggregateDiscoveredResourceCounts = "GetAggregateDiscoveredResourceCounts" - -// GetAggregateDiscoveredResourceCountsRequest generates a "aws/request.Request" representing the -// client's request for the GetAggregateDiscoveredResourceCounts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAggregateDiscoveredResourceCounts for more information on using the GetAggregateDiscoveredResourceCounts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAggregateDiscoveredResourceCountsRequest method. -// req, resp := client.GetAggregateDiscoveredResourceCountsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateDiscoveredResourceCounts -func (c *ConfigService) GetAggregateDiscoveredResourceCountsRequest(input *GetAggregateDiscoveredResourceCountsInput) (req *request.Request, output *GetAggregateDiscoveredResourceCountsOutput) { - op := &request.Operation{ - Name: opGetAggregateDiscoveredResourceCounts, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAggregateDiscoveredResourceCountsInput{} - } - - output = &GetAggregateDiscoveredResourceCountsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAggregateDiscoveredResourceCounts API operation for AWS Config. -// -// Returns the resource counts across accounts and regions that are present -// in your AWS Config aggregator. You can request the resource counts by providing -// filters and GroupByKey. -// -// For example, if the input contains accountID 12345678910 and region us-east-1 -// in filters, the API returns the count of resources in account ID 12345678910 -// and region us-east-1. If the input contains ACCOUNT_ID as a GroupByKey, the -// API returns resource counts for all source accounts that are present in your -// aggregator. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation GetAggregateDiscoveredResourceCounts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The requested action is not valid. -// -// * ErrCodeInvalidLimitException "InvalidLimitException" -// The specified limit is outside the allowable range. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" -// You have specified a configuration aggregator that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateDiscoveredResourceCounts -func (c *ConfigService) GetAggregateDiscoveredResourceCounts(input *GetAggregateDiscoveredResourceCountsInput) (*GetAggregateDiscoveredResourceCountsOutput, error) { - req, out := c.GetAggregateDiscoveredResourceCountsRequest(input) - return out, req.Send() -} - -// GetAggregateDiscoveredResourceCountsWithContext is the same as GetAggregateDiscoveredResourceCounts with the addition of -// the ability to pass a context and additional request options. -// -// See GetAggregateDiscoveredResourceCounts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) GetAggregateDiscoveredResourceCountsWithContext(ctx aws.Context, input *GetAggregateDiscoveredResourceCountsInput, opts ...request.Option) (*GetAggregateDiscoveredResourceCountsOutput, error) { - req, out := c.GetAggregateDiscoveredResourceCountsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAggregateResourceConfig = "GetAggregateResourceConfig" - -// GetAggregateResourceConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetAggregateResourceConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAggregateResourceConfig for more information on using the GetAggregateResourceConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAggregateResourceConfigRequest method. -// req, resp := client.GetAggregateResourceConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateResourceConfig -func (c *ConfigService) GetAggregateResourceConfigRequest(input *GetAggregateResourceConfigInput) (req *request.Request, output *GetAggregateResourceConfigOutput) { - op := &request.Operation{ - Name: opGetAggregateResourceConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAggregateResourceConfigInput{} - } - - output = &GetAggregateResourceConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAggregateResourceConfig API operation for AWS Config. -// -// Returns configuration item that is aggregated for your specific resource -// in a specific source account and region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation GetAggregateResourceConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The requested action is not valid. -// -// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" -// You have specified a configuration aggregator that does not exist. -// -// * ErrCodeOversizedConfigurationItemException "OversizedConfigurationItemException" -// The configuration item size is outside the allowable range. -// -// * ErrCodeResourceNotDiscoveredException "ResourceNotDiscoveredException" -// You have specified a resource that is either unknown or has not been discovered. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateResourceConfig -func (c *ConfigService) GetAggregateResourceConfig(input *GetAggregateResourceConfigInput) (*GetAggregateResourceConfigOutput, error) { - req, out := c.GetAggregateResourceConfigRequest(input) - return out, req.Send() -} - -// GetAggregateResourceConfigWithContext is the same as GetAggregateResourceConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetAggregateResourceConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) GetAggregateResourceConfigWithContext(ctx aws.Context, input *GetAggregateResourceConfigInput, opts ...request.Option) (*GetAggregateResourceConfigOutput, error) { - req, out := c.GetAggregateResourceConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetComplianceDetailsByConfigRule = "GetComplianceDetailsByConfigRule" - -// GetComplianceDetailsByConfigRuleRequest generates a "aws/request.Request" representing the -// client's request for the GetComplianceDetailsByConfigRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetComplianceDetailsByConfigRule for more information on using the GetComplianceDetailsByConfigRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetComplianceDetailsByConfigRuleRequest method. -// req, resp := client.GetComplianceDetailsByConfigRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByConfigRule -func (c *ConfigService) GetComplianceDetailsByConfigRuleRequest(input *GetComplianceDetailsByConfigRuleInput) (req *request.Request, output *GetComplianceDetailsByConfigRuleOutput) { - op := &request.Operation{ - Name: opGetComplianceDetailsByConfigRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetComplianceDetailsByConfigRuleInput{} - } - - output = &GetComplianceDetailsByConfigRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetComplianceDetailsByConfigRule API operation for AWS Config. -// -// Returns the evaluation results for the specified AWS Config rule. The results -// indicate which AWS resources were evaluated by the rule, when each resource -// was last evaluated, and whether each resource complies with the rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation GetComplianceDetailsByConfigRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// * ErrCodeNoSuchConfigRuleException "NoSuchConfigRuleException" -// One or more AWS Config rules in the request are invalid. Verify that the -// rule names are correct and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByConfigRule -func (c *ConfigService) GetComplianceDetailsByConfigRule(input *GetComplianceDetailsByConfigRuleInput) (*GetComplianceDetailsByConfigRuleOutput, error) { - req, out := c.GetComplianceDetailsByConfigRuleRequest(input) - return out, req.Send() -} - -// GetComplianceDetailsByConfigRuleWithContext is the same as GetComplianceDetailsByConfigRule with the addition of -// the ability to pass a context and additional request options. -// -// See GetComplianceDetailsByConfigRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) GetComplianceDetailsByConfigRuleWithContext(ctx aws.Context, input *GetComplianceDetailsByConfigRuleInput, opts ...request.Option) (*GetComplianceDetailsByConfigRuleOutput, error) { - req, out := c.GetComplianceDetailsByConfigRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetComplianceDetailsByResource = "GetComplianceDetailsByResource" - -// GetComplianceDetailsByResourceRequest generates a "aws/request.Request" representing the -// client's request for the GetComplianceDetailsByResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetComplianceDetailsByResource for more information on using the GetComplianceDetailsByResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetComplianceDetailsByResourceRequest method. -// req, resp := client.GetComplianceDetailsByResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByResource -func (c *ConfigService) GetComplianceDetailsByResourceRequest(input *GetComplianceDetailsByResourceInput) (req *request.Request, output *GetComplianceDetailsByResourceOutput) { - op := &request.Operation{ - Name: opGetComplianceDetailsByResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetComplianceDetailsByResourceInput{} - } - - output = &GetComplianceDetailsByResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetComplianceDetailsByResource API operation for AWS Config. -// -// Returns the evaluation results for the specified AWS resource. The results -// indicate which AWS Config rules were used to evaluate the resource, when -// each rule was last used, and whether the resource complies with each rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation GetComplianceDetailsByResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByResource -func (c *ConfigService) GetComplianceDetailsByResource(input *GetComplianceDetailsByResourceInput) (*GetComplianceDetailsByResourceOutput, error) { - req, out := c.GetComplianceDetailsByResourceRequest(input) - return out, req.Send() -} - -// GetComplianceDetailsByResourceWithContext is the same as GetComplianceDetailsByResource with the addition of -// the ability to pass a context and additional request options. -// -// See GetComplianceDetailsByResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) GetComplianceDetailsByResourceWithContext(ctx aws.Context, input *GetComplianceDetailsByResourceInput, opts ...request.Option) (*GetComplianceDetailsByResourceOutput, error) { - req, out := c.GetComplianceDetailsByResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetComplianceSummaryByConfigRule = "GetComplianceSummaryByConfigRule" - -// GetComplianceSummaryByConfigRuleRequest generates a "aws/request.Request" representing the -// client's request for the GetComplianceSummaryByConfigRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetComplianceSummaryByConfigRule for more information on using the GetComplianceSummaryByConfigRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetComplianceSummaryByConfigRuleRequest method. -// req, resp := client.GetComplianceSummaryByConfigRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceSummaryByConfigRule -func (c *ConfigService) GetComplianceSummaryByConfigRuleRequest(input *GetComplianceSummaryByConfigRuleInput) (req *request.Request, output *GetComplianceSummaryByConfigRuleOutput) { - op := &request.Operation{ - Name: opGetComplianceSummaryByConfigRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetComplianceSummaryByConfigRuleInput{} - } - - output = &GetComplianceSummaryByConfigRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetComplianceSummaryByConfigRule API operation for AWS Config. -// -// Returns the number of AWS Config rules that are compliant and noncompliant, -// up to a maximum of 25 for each. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation GetComplianceSummaryByConfigRule for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceSummaryByConfigRule -func (c *ConfigService) GetComplianceSummaryByConfigRule(input *GetComplianceSummaryByConfigRuleInput) (*GetComplianceSummaryByConfigRuleOutput, error) { - req, out := c.GetComplianceSummaryByConfigRuleRequest(input) - return out, req.Send() -} - -// GetComplianceSummaryByConfigRuleWithContext is the same as GetComplianceSummaryByConfigRule with the addition of -// the ability to pass a context and additional request options. -// -// See GetComplianceSummaryByConfigRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) GetComplianceSummaryByConfigRuleWithContext(ctx aws.Context, input *GetComplianceSummaryByConfigRuleInput, opts ...request.Option) (*GetComplianceSummaryByConfigRuleOutput, error) { - req, out := c.GetComplianceSummaryByConfigRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetComplianceSummaryByResourceType = "GetComplianceSummaryByResourceType" - -// GetComplianceSummaryByResourceTypeRequest generates a "aws/request.Request" representing the -// client's request for the GetComplianceSummaryByResourceType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetComplianceSummaryByResourceType for more information on using the GetComplianceSummaryByResourceType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetComplianceSummaryByResourceTypeRequest method. -// req, resp := client.GetComplianceSummaryByResourceTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceSummaryByResourceType -func (c *ConfigService) GetComplianceSummaryByResourceTypeRequest(input *GetComplianceSummaryByResourceTypeInput) (req *request.Request, output *GetComplianceSummaryByResourceTypeOutput) { - op := &request.Operation{ - Name: opGetComplianceSummaryByResourceType, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetComplianceSummaryByResourceTypeInput{} - } - - output = &GetComplianceSummaryByResourceTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetComplianceSummaryByResourceType API operation for AWS Config. -// -// Returns the number of resources that are compliant and the number that are -// noncompliant. You can specify one or more resource types to get these numbers -// for each resource type. The maximum number returned is 100. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation GetComplianceSummaryByResourceType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceSummaryByResourceType -func (c *ConfigService) GetComplianceSummaryByResourceType(input *GetComplianceSummaryByResourceTypeInput) (*GetComplianceSummaryByResourceTypeOutput, error) { - req, out := c.GetComplianceSummaryByResourceTypeRequest(input) - return out, req.Send() -} - -// GetComplianceSummaryByResourceTypeWithContext is the same as GetComplianceSummaryByResourceType with the addition of -// the ability to pass a context and additional request options. -// -// See GetComplianceSummaryByResourceType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) GetComplianceSummaryByResourceTypeWithContext(ctx aws.Context, input *GetComplianceSummaryByResourceTypeInput, opts ...request.Option) (*GetComplianceSummaryByResourceTypeOutput, error) { - req, out := c.GetComplianceSummaryByResourceTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDiscoveredResourceCounts = "GetDiscoveredResourceCounts" - -// GetDiscoveredResourceCountsRequest generates a "aws/request.Request" representing the -// client's request for the GetDiscoveredResourceCounts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDiscoveredResourceCounts for more information on using the GetDiscoveredResourceCounts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDiscoveredResourceCountsRequest method. -// req, resp := client.GetDiscoveredResourceCountsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetDiscoveredResourceCounts -func (c *ConfigService) GetDiscoveredResourceCountsRequest(input *GetDiscoveredResourceCountsInput) (req *request.Request, output *GetDiscoveredResourceCountsOutput) { - op := &request.Operation{ - Name: opGetDiscoveredResourceCounts, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDiscoveredResourceCountsInput{} - } - - output = &GetDiscoveredResourceCountsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDiscoveredResourceCounts API operation for AWS Config. -// -// Returns the resource types, the number of each resource type, and the total -// number of resources that AWS Config is recording in this region for your -// AWS account. -// -// Example -// -// AWS Config is recording three resource types in the US East (Ohio) Region -// for your account: 25 EC2 instances, 20 IAM users, and 15 S3 buckets. -// -// You make a call to the GetDiscoveredResourceCounts action and specify that -// you want all resource types. -// -// AWS Config returns the following: -// -// The resource types (EC2 instances, IAM users, and S3 buckets). -// -// The number of each resource type (25, 20, and 15). -// -// The total number of all resources (60). -// -// The response is paginated. By default, AWS Config lists 100 ResourceCount -// objects on each page. You can customize this number with the limit parameter. -// The response includes a nextToken string. To get the next page of results, -// run the request again and specify the string for the nextToken parameter. -// -// If you make a call to the GetDiscoveredResourceCounts action, you might not -// immediately receive resource counts in the following situations: -// -// You are a new AWS Config customer. -// -// You just enabled resource recording. -// -// It might take a few minutes for AWS Config to record and count your resources. -// Wait a few minutes and then retry the GetDiscoveredResourceCounts action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation GetDiscoveredResourceCounts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The requested action is not valid. -// -// * ErrCodeInvalidLimitException "InvalidLimitException" -// The specified limit is outside the allowable range. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetDiscoveredResourceCounts -func (c *ConfigService) GetDiscoveredResourceCounts(input *GetDiscoveredResourceCountsInput) (*GetDiscoveredResourceCountsOutput, error) { - req, out := c.GetDiscoveredResourceCountsRequest(input) - return out, req.Send() -} - -// GetDiscoveredResourceCountsWithContext is the same as GetDiscoveredResourceCounts with the addition of -// the ability to pass a context and additional request options. -// -// See GetDiscoveredResourceCounts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) GetDiscoveredResourceCountsWithContext(ctx aws.Context, input *GetDiscoveredResourceCountsInput, opts ...request.Option) (*GetDiscoveredResourceCountsOutput, error) { - req, out := c.GetDiscoveredResourceCountsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetResourceConfigHistory = "GetResourceConfigHistory" - -// GetResourceConfigHistoryRequest generates a "aws/request.Request" representing the -// client's request for the GetResourceConfigHistory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResourceConfigHistory for more information on using the GetResourceConfigHistory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetResourceConfigHistoryRequest method. -// req, resp := client.GetResourceConfigHistoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetResourceConfigHistory -func (c *ConfigService) GetResourceConfigHistoryRequest(input *GetResourceConfigHistoryInput) (req *request.Request, output *GetResourceConfigHistoryOutput) { - op := &request.Operation{ - Name: opGetResourceConfigHistory, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetResourceConfigHistoryInput{} - } - - output = &GetResourceConfigHistoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResourceConfigHistory API operation for AWS Config. -// -// Returns a list of configuration items for the specified resource. The list -// contains details about each state of the resource during the specified time -// interval. If you specified a retention period to retain your ConfigurationItems -// between a minimum of 30 days and a maximum of 7 years (2557 days), AWS Config -// returns the ConfigurationItems for the specified retention period. -// -// The response is paginated. By default, AWS Config returns a limit of 10 configuration -// items per page. You can customize this number with the limit parameter. The -// response includes a nextToken string. To get the next page of results, run -// the request again and specify the string for the nextToken parameter. -// -// Each call to the API is limited to span a duration of seven days. It is likely -// that the number of records returned is smaller than the specified limit. -// In such cases, you can make another call, using the nextToken. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation GetResourceConfigHistory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The requested action is not valid. -// -// * ErrCodeInvalidTimeRangeException "InvalidTimeRangeException" -// The specified time range is not valid. The earlier time is not chronologically -// before the later time. -// -// * ErrCodeInvalidLimitException "InvalidLimitException" -// The specified limit is outside the allowable range. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// * ErrCodeNoAvailableConfigurationRecorderException "NoAvailableConfigurationRecorderException" -// There are no configuration recorders available to provide the role needed -// to describe your resources. Create a configuration recorder. -// -// * ErrCodeResourceNotDiscoveredException "ResourceNotDiscoveredException" -// You have specified a resource that is either unknown or has not been discovered. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetResourceConfigHistory -func (c *ConfigService) GetResourceConfigHistory(input *GetResourceConfigHistoryInput) (*GetResourceConfigHistoryOutput, error) { - req, out := c.GetResourceConfigHistoryRequest(input) - return out, req.Send() -} - -// GetResourceConfigHistoryWithContext is the same as GetResourceConfigHistory with the addition of -// the ability to pass a context and additional request options. -// -// See GetResourceConfigHistory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) GetResourceConfigHistoryWithContext(ctx aws.Context, input *GetResourceConfigHistoryInput, opts ...request.Option) (*GetResourceConfigHistoryOutput, error) { - req, out := c.GetResourceConfigHistoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetResourceConfigHistoryPages iterates over the pages of a GetResourceConfigHistory operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetResourceConfigHistory 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 GetResourceConfigHistory operation. -// pageNum := 0 -// err := client.GetResourceConfigHistoryPages(params, -// func(page *GetResourceConfigHistoryOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ConfigService) GetResourceConfigHistoryPages(input *GetResourceConfigHistoryInput, fn func(*GetResourceConfigHistoryOutput, bool) bool) error { - return c.GetResourceConfigHistoryPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetResourceConfigHistoryPagesWithContext same as GetResourceConfigHistoryPages 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 *ConfigService) GetResourceConfigHistoryPagesWithContext(ctx aws.Context, input *GetResourceConfigHistoryInput, fn func(*GetResourceConfigHistoryOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetResourceConfigHistoryInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetResourceConfigHistoryRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetResourceConfigHistoryOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListAggregateDiscoveredResources = "ListAggregateDiscoveredResources" - -// ListAggregateDiscoveredResourcesRequest generates a "aws/request.Request" representing the -// client's request for the ListAggregateDiscoveredResources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAggregateDiscoveredResources for more information on using the ListAggregateDiscoveredResources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAggregateDiscoveredResourcesRequest method. -// req, resp := client.ListAggregateDiscoveredResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListAggregateDiscoveredResources -func (c *ConfigService) ListAggregateDiscoveredResourcesRequest(input *ListAggregateDiscoveredResourcesInput) (req *request.Request, output *ListAggregateDiscoveredResourcesOutput) { - op := &request.Operation{ - Name: opListAggregateDiscoveredResources, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListAggregateDiscoveredResourcesInput{} - } - - output = &ListAggregateDiscoveredResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAggregateDiscoveredResources API operation for AWS Config. -// -// Accepts a resource type and returns a list of resource identifiers that are -// aggregated for a specific resource type across accounts and regions. A resource -// identifier includes the resource type, ID, (if available) the custom resource -// name, source account, and source region. You can narrow the results to include -// only resources that have specific resource IDs, or a resource name, or source -// account ID, or source region. -// -// For example, if the input consists of accountID 12345678910 and the region -// is us-east-1 for resource type AWS::EC2::Instance then the API returns all -// the EC2 instance identifiers of accountID 12345678910 and region us-east-1. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation ListAggregateDiscoveredResources for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The requested action is not valid. -// -// * ErrCodeInvalidLimitException "InvalidLimitException" -// The specified limit is outside the allowable range. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" -// You have specified a configuration aggregator that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListAggregateDiscoveredResources -func (c *ConfigService) ListAggregateDiscoveredResources(input *ListAggregateDiscoveredResourcesInput) (*ListAggregateDiscoveredResourcesOutput, error) { - req, out := c.ListAggregateDiscoveredResourcesRequest(input) - return out, req.Send() -} - -// ListAggregateDiscoveredResourcesWithContext is the same as ListAggregateDiscoveredResources with the addition of -// the ability to pass a context and additional request options. -// -// See ListAggregateDiscoveredResources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) ListAggregateDiscoveredResourcesWithContext(ctx aws.Context, input *ListAggregateDiscoveredResourcesInput, opts ...request.Option) (*ListAggregateDiscoveredResourcesOutput, error) { - req, out := c.ListAggregateDiscoveredResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDiscoveredResources = "ListDiscoveredResources" - -// ListDiscoveredResourcesRequest generates a "aws/request.Request" representing the -// client's request for the ListDiscoveredResources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDiscoveredResources for more information on using the ListDiscoveredResources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDiscoveredResourcesRequest method. -// req, resp := client.ListDiscoveredResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListDiscoveredResources -func (c *ConfigService) ListDiscoveredResourcesRequest(input *ListDiscoveredResourcesInput) (req *request.Request, output *ListDiscoveredResourcesOutput) { - op := &request.Operation{ - Name: opListDiscoveredResources, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListDiscoveredResourcesInput{} - } - - output = &ListDiscoveredResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDiscoveredResources API operation for AWS Config. -// -// Accepts a resource type and returns a list of resource identifiers for the -// resources of that type. A resource identifier includes the resource type, -// ID, and (if available) the custom resource name. The results consist of resources -// that AWS Config has discovered, including those that AWS Config is not currently -// recording. You can narrow the results to include only resources that have -// specific resource IDs or a resource name. -// -// You can specify either resource IDs or a resource name, but not both, in -// the same request. -// -// The response is paginated. By default, AWS Config lists 100 resource identifiers -// on each page. You can customize this number with the limit parameter. The -// response includes a nextToken string. To get the next page of results, run -// the request again and specify the string for the nextToken parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation ListDiscoveredResources for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// The requested action is not valid. -// -// * ErrCodeInvalidLimitException "InvalidLimitException" -// The specified limit is outside the allowable range. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the nextToken string that was -// returned in the previous response to get the next page of results. -// -// * ErrCodeNoAvailableConfigurationRecorderException "NoAvailableConfigurationRecorderException" -// There are no configuration recorders available to provide the role needed -// to describe your resources. Create a configuration recorder. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListDiscoveredResources -func (c *ConfigService) ListDiscoveredResources(input *ListDiscoveredResourcesInput) (*ListDiscoveredResourcesOutput, error) { - req, out := c.ListDiscoveredResourcesRequest(input) - return out, req.Send() -} - -// ListDiscoveredResourcesWithContext is the same as ListDiscoveredResources with the addition of -// the ability to pass a context and additional request options. -// -// See ListDiscoveredResources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) ListDiscoveredResourcesWithContext(ctx aws.Context, input *ListDiscoveredResourcesInput, opts ...request.Option) (*ListDiscoveredResourcesOutput, error) { - req, out := c.ListDiscoveredResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutAggregationAuthorization = "PutAggregationAuthorization" - -// PutAggregationAuthorizationRequest generates a "aws/request.Request" representing the -// client's request for the PutAggregationAuthorization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutAggregationAuthorization for more information on using the PutAggregationAuthorization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutAggregationAuthorizationRequest method. -// req, resp := client.PutAggregationAuthorizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutAggregationAuthorization -func (c *ConfigService) PutAggregationAuthorizationRequest(input *PutAggregationAuthorizationInput) (req *request.Request, output *PutAggregationAuthorizationOutput) { - op := &request.Operation{ - Name: opPutAggregationAuthorization, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutAggregationAuthorizationInput{} - } - - output = &PutAggregationAuthorizationOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutAggregationAuthorization API operation for AWS Config. -// -// Authorizes the aggregator account and region to collect data from the source -// account and region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation PutAggregationAuthorization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutAggregationAuthorization -func (c *ConfigService) PutAggregationAuthorization(input *PutAggregationAuthorizationInput) (*PutAggregationAuthorizationOutput, error) { - req, out := c.PutAggregationAuthorizationRequest(input) - return out, req.Send() -} - -// PutAggregationAuthorizationWithContext is the same as PutAggregationAuthorization with the addition of -// the ability to pass a context and additional request options. -// -// See PutAggregationAuthorization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) PutAggregationAuthorizationWithContext(ctx aws.Context, input *PutAggregationAuthorizationInput, opts ...request.Option) (*PutAggregationAuthorizationOutput, error) { - req, out := c.PutAggregationAuthorizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutConfigRule = "PutConfigRule" - -// PutConfigRuleRequest generates a "aws/request.Request" representing the -// client's request for the PutConfigRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutConfigRule for more information on using the PutConfigRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutConfigRuleRequest method. -// req, resp := client.PutConfigRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigRule -func (c *ConfigService) PutConfigRuleRequest(input *PutConfigRuleInput) (req *request.Request, output *PutConfigRuleOutput) { - op := &request.Operation{ - Name: opPutConfigRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutConfigRuleInput{} - } - - output = &PutConfigRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutConfigRule API operation for AWS Config. -// -// Adds or updates an AWS Config rule for evaluating whether your AWS resources -// comply with your desired configurations. -// -// You can use this action for custom AWS Config rules and AWS managed Config -// rules. A custom AWS Config rule is a rule that you develop and maintain. -// An AWS managed Config rule is a customizable, predefined rule that AWS Config -// provides. -// -// If you are adding a new custom AWS Config rule, you must first create the -// AWS Lambda function that the rule invokes to evaluate your resources. When -// you use the PutConfigRule action to add the rule to AWS Config, you must -// specify the Amazon Resource Name (ARN) that AWS Lambda assigns to the function. -// Specify the ARN for the SourceIdentifier key. This key is part of the Source -// object, which is part of the ConfigRule object. -// -// If you are adding an AWS managed Config rule, specify the rule's identifier -// for the SourceIdentifier key. To reference AWS managed Config rule identifiers, -// see About AWS Managed Config Rules (http://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html). -// -// For any new rule that you add, specify the ConfigRuleName in the ConfigRule -// object. Do not specify the ConfigRuleArn or the ConfigRuleId. These values -// are generated by AWS Config for new rules. -// -// If you are updating a rule that you added previously, you can specify the -// rule by ConfigRuleName, ConfigRuleId, or ConfigRuleArn in the ConfigRule -// data type that you use in this request. -// -// The maximum number of rules that AWS Config supports is 50. -// -// For information about requesting a rule limit increase, see AWS Config Limits -// (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_config) -// in the AWS General Reference Guide. -// -// For more information about developing and using AWS Config rules, see Evaluating -// AWS Resource Configurations with AWS Config (http://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html) -// in the AWS Config Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation PutConfigRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// * ErrCodeMaxNumberOfConfigRulesExceededException "MaxNumberOfConfigRulesExceededException" -// Failed to add the AWS Config rule because the account already contains the -// maximum number of 50 rules. Consider deleting any deactivated rules before -// you add new rules. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The rule is currently being deleted or the rule is deleting your evaluation -// results. Try your request again later. -// -// * ErrCodeInsufficientPermissionsException "InsufficientPermissionsException" -// Indicates one of the following errors: -// -// * The rule cannot be created because the IAM role assigned to AWS Config -// lacks permissions to perform the config:Put* action. -// -// * The AWS Lambda function cannot be invoked. Check the function ARN, and -// check the function's permissions. -// -// * ErrCodeNoAvailableConfigurationRecorderException "NoAvailableConfigurationRecorderException" -// There are no configuration recorders available to provide the role needed -// to describe your resources. Create a configuration recorder. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigRule -func (c *ConfigService) PutConfigRule(input *PutConfigRuleInput) (*PutConfigRuleOutput, error) { - req, out := c.PutConfigRuleRequest(input) - return out, req.Send() -} - -// PutConfigRuleWithContext is the same as PutConfigRule with the addition of -// the ability to pass a context and additional request options. -// -// See PutConfigRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) PutConfigRuleWithContext(ctx aws.Context, input *PutConfigRuleInput, opts ...request.Option) (*PutConfigRuleOutput, error) { - req, out := c.PutConfigRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutConfigurationAggregator = "PutConfigurationAggregator" - -// PutConfigurationAggregatorRequest generates a "aws/request.Request" representing the -// client's request for the PutConfigurationAggregator operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutConfigurationAggregator for more information on using the PutConfigurationAggregator -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutConfigurationAggregatorRequest method. -// req, resp := client.PutConfigurationAggregatorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigurationAggregator -func (c *ConfigService) PutConfigurationAggregatorRequest(input *PutConfigurationAggregatorInput) (req *request.Request, output *PutConfigurationAggregatorOutput) { - op := &request.Operation{ - Name: opPutConfigurationAggregator, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutConfigurationAggregatorInput{} - } - - output = &PutConfigurationAggregatorOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutConfigurationAggregator API operation for AWS Config. -// -// Creates and updates the configuration aggregator with the selected source -// accounts and regions. The source account can be individual account(s) or -// an organization. -// -// AWS Config should be enabled in source accounts and regions you want to aggregate. -// -// If your source type is an organization, you must be signed in to the master -// account and all features must be enabled in your organization. AWS Config -// calls EnableAwsServiceAccess API to enable integration between AWS Config -// and AWS Organizations. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation PutConfigurationAggregator for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// For StartConfigRulesEvaluation API, this exception is thrown if an evaluation -// is in progress or if you call the StartConfigRulesEvaluation API more than -// once per minute. -// -// For PutConfigurationAggregator API, this exception is thrown if the number -// of accounts and aggregators exceeds the limit. -// -// * ErrCodeInvalidRoleException "InvalidRoleException" -// You have provided a null or empty role ARN. -// -// * ErrCodeOrganizationAccessDeniedException "OrganizationAccessDeniedException" -// No permission to call the EnableAWSServiceAccess API. -// -// * ErrCodeNoAvailableOrganizationException "NoAvailableOrganizationException" -// Organization does is no longer available. -// -// * ErrCodeOrganizationAllFeaturesNotEnabledException "OrganizationAllFeaturesNotEnabledException" -// The configuration aggregator cannot be created because organization does -// not have all features enabled. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigurationAggregator -func (c *ConfigService) PutConfigurationAggregator(input *PutConfigurationAggregatorInput) (*PutConfigurationAggregatorOutput, error) { - req, out := c.PutConfigurationAggregatorRequest(input) - return out, req.Send() -} - -// PutConfigurationAggregatorWithContext is the same as PutConfigurationAggregator with the addition of -// the ability to pass a context and additional request options. -// -// See PutConfigurationAggregator for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) PutConfigurationAggregatorWithContext(ctx aws.Context, input *PutConfigurationAggregatorInput, opts ...request.Option) (*PutConfigurationAggregatorOutput, error) { - req, out := c.PutConfigurationAggregatorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutConfigurationRecorder = "PutConfigurationRecorder" - -// PutConfigurationRecorderRequest generates a "aws/request.Request" representing the -// client's request for the PutConfigurationRecorder operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutConfigurationRecorder for more information on using the PutConfigurationRecorder -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutConfigurationRecorderRequest method. -// req, resp := client.PutConfigurationRecorderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigurationRecorder -func (c *ConfigService) PutConfigurationRecorderRequest(input *PutConfigurationRecorderInput) (req *request.Request, output *PutConfigurationRecorderOutput) { - op := &request.Operation{ - Name: opPutConfigurationRecorder, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutConfigurationRecorderInput{} - } - - output = &PutConfigurationRecorderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutConfigurationRecorder API operation for AWS Config. -// -// Creates a new configuration recorder to record the selected resource configurations. -// -// You can use this action to change the role roleARN or the recordingGroup -// of an existing recorder. To change the role, call the action on the existing -// configuration recorder and specify a role. -// -// Currently, you can specify only one configuration recorder per region in -// your account. -// -// If ConfigurationRecorder does not have the recordingGroup parameter specified, -// the default is to record all supported resource types. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation PutConfigurationRecorder for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMaxNumberOfConfigurationRecordersExceededException "MaxNumberOfConfigurationRecordersExceededException" -// You have reached the limit of the number of recorders you can create. -// -// * ErrCodeInvalidConfigurationRecorderNameException "InvalidConfigurationRecorderNameException" -// You have provided a configuration recorder name that is not valid. -// -// * ErrCodeInvalidRoleException "InvalidRoleException" -// You have provided a null or empty role ARN. -// -// * ErrCodeInvalidRecordingGroupException "InvalidRecordingGroupException" -// AWS Config throws an exception if the recording group does not contain a -// valid list of resource types. Invalid values might also be incorrectly formatted. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigurationRecorder -func (c *ConfigService) PutConfigurationRecorder(input *PutConfigurationRecorderInput) (*PutConfigurationRecorderOutput, error) { - req, out := c.PutConfigurationRecorderRequest(input) - return out, req.Send() -} - -// PutConfigurationRecorderWithContext is the same as PutConfigurationRecorder with the addition of -// the ability to pass a context and additional request options. -// -// See PutConfigurationRecorder for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) PutConfigurationRecorderWithContext(ctx aws.Context, input *PutConfigurationRecorderInput, opts ...request.Option) (*PutConfigurationRecorderOutput, error) { - req, out := c.PutConfigurationRecorderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutDeliveryChannel = "PutDeliveryChannel" - -// PutDeliveryChannelRequest generates a "aws/request.Request" representing the -// client's request for the PutDeliveryChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutDeliveryChannel for more information on using the PutDeliveryChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutDeliveryChannelRequest method. -// req, resp := client.PutDeliveryChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutDeliveryChannel -func (c *ConfigService) PutDeliveryChannelRequest(input *PutDeliveryChannelInput) (req *request.Request, output *PutDeliveryChannelOutput) { - op := &request.Operation{ - Name: opPutDeliveryChannel, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutDeliveryChannelInput{} - } - - output = &PutDeliveryChannelOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutDeliveryChannel API operation for AWS Config. -// -// Creates a delivery channel object to deliver configuration information to -// an Amazon S3 bucket and Amazon SNS topic. -// -// Before you can create a delivery channel, you must create a configuration -// recorder. -// -// You can use this action to change the Amazon S3 bucket or an Amazon SNS topic -// of the existing delivery channel. To change the Amazon S3 bucket or an Amazon -// SNS topic, call this action and specify the changed values for the S3 bucket -// and the SNS topic. If you specify a different value for either the S3 bucket -// or the SNS topic, this action will keep the existing value for the parameter -// that is not changed. -// -// You can have only one delivery channel per region in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation PutDeliveryChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMaxNumberOfDeliveryChannelsExceededException "MaxNumberOfDeliveryChannelsExceededException" -// You have reached the limit of the number of delivery channels you can create. -// -// * ErrCodeNoAvailableConfigurationRecorderException "NoAvailableConfigurationRecorderException" -// There are no configuration recorders available to provide the role needed -// to describe your resources. Create a configuration recorder. -// -// * ErrCodeInvalidDeliveryChannelNameException "InvalidDeliveryChannelNameException" -// The specified delivery channel name is not valid. -// -// * ErrCodeNoSuchBucketException "NoSuchBucketException" -// The specified Amazon S3 bucket does not exist. -// -// * ErrCodeInvalidS3KeyPrefixException "InvalidS3KeyPrefixException" -// The specified Amazon S3 key prefix is not valid. -// -// * ErrCodeInvalidSNSTopicARNException "InvalidSNSTopicARNException" -// The specified Amazon SNS topic does not exist. -// -// * ErrCodeInsufficientDeliveryPolicyException "InsufficientDeliveryPolicyException" -// Your Amazon S3 bucket policy does not permit AWS Config to write to it. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutDeliveryChannel -func (c *ConfigService) PutDeliveryChannel(input *PutDeliveryChannelInput) (*PutDeliveryChannelOutput, error) { - req, out := c.PutDeliveryChannelRequest(input) - return out, req.Send() -} - -// PutDeliveryChannelWithContext is the same as PutDeliveryChannel with the addition of -// the ability to pass a context and additional request options. -// -// See PutDeliveryChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) PutDeliveryChannelWithContext(ctx aws.Context, input *PutDeliveryChannelInput, opts ...request.Option) (*PutDeliveryChannelOutput, error) { - req, out := c.PutDeliveryChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutEvaluations = "PutEvaluations" - -// PutEvaluationsRequest generates a "aws/request.Request" representing the -// client's request for the PutEvaluations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutEvaluations for more information on using the PutEvaluations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutEvaluationsRequest method. -// req, resp := client.PutEvaluationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutEvaluations -func (c *ConfigService) PutEvaluationsRequest(input *PutEvaluationsInput) (req *request.Request, output *PutEvaluationsOutput) { - op := &request.Operation{ - Name: opPutEvaluations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutEvaluationsInput{} - } - - output = &PutEvaluationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutEvaluations API operation for AWS Config. -// -// Used by an AWS Lambda function to deliver evaluation results to AWS Config. -// This action is required in every AWS Lambda function that is invoked by an -// AWS Config rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation PutEvaluations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// * ErrCodeInvalidResultTokenException "InvalidResultTokenException" -// The specified ResultToken is invalid. -// -// * ErrCodeNoSuchConfigRuleException "NoSuchConfigRuleException" -// One or more AWS Config rules in the request are invalid. Verify that the -// rule names are correct and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutEvaluations -func (c *ConfigService) PutEvaluations(input *PutEvaluationsInput) (*PutEvaluationsOutput, error) { - req, out := c.PutEvaluationsRequest(input) - return out, req.Send() -} - -// PutEvaluationsWithContext is the same as PutEvaluations with the addition of -// the ability to pass a context and additional request options. -// -// See PutEvaluations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) PutEvaluationsWithContext(ctx aws.Context, input *PutEvaluationsInput, opts ...request.Option) (*PutEvaluationsOutput, error) { - req, out := c.PutEvaluationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutRetentionConfiguration = "PutRetentionConfiguration" - -// PutRetentionConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the PutRetentionConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutRetentionConfiguration for more information on using the PutRetentionConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutRetentionConfigurationRequest method. -// req, resp := client.PutRetentionConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutRetentionConfiguration -func (c *ConfigService) PutRetentionConfigurationRequest(input *PutRetentionConfigurationInput) (req *request.Request, output *PutRetentionConfigurationOutput) { - op := &request.Operation{ - Name: opPutRetentionConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutRetentionConfigurationInput{} - } - - output = &PutRetentionConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutRetentionConfiguration API operation for AWS Config. -// -// Creates and updates the retention configuration with details about retention -// period (number of days) that AWS Config stores your historical information. -// The API creates the RetentionConfiguration object and names the object as -// default. When you have a RetentionConfiguration object named default, calling -// the API modifies the default object. -// -// Currently, AWS Config supports only one retention configuration per region -// in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation PutRetentionConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// * ErrCodeMaxNumberOfRetentionConfigurationsExceededException "MaxNumberOfRetentionConfigurationsExceededException" -// Failed to add the retention configuration because a retention configuration -// with that name already exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutRetentionConfiguration -func (c *ConfigService) PutRetentionConfiguration(input *PutRetentionConfigurationInput) (*PutRetentionConfigurationOutput, error) { - req, out := c.PutRetentionConfigurationRequest(input) - return out, req.Send() -} - -// PutRetentionConfigurationWithContext is the same as PutRetentionConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See PutRetentionConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) PutRetentionConfigurationWithContext(ctx aws.Context, input *PutRetentionConfigurationInput, opts ...request.Option) (*PutRetentionConfigurationOutput, error) { - req, out := c.PutRetentionConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartConfigRulesEvaluation = "StartConfigRulesEvaluation" - -// StartConfigRulesEvaluationRequest generates a "aws/request.Request" representing the -// client's request for the StartConfigRulesEvaluation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartConfigRulesEvaluation for more information on using the StartConfigRulesEvaluation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartConfigRulesEvaluationRequest method. -// req, resp := client.StartConfigRulesEvaluationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StartConfigRulesEvaluation -func (c *ConfigService) StartConfigRulesEvaluationRequest(input *StartConfigRulesEvaluationInput) (req *request.Request, output *StartConfigRulesEvaluationOutput) { - op := &request.Operation{ - Name: opStartConfigRulesEvaluation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartConfigRulesEvaluationInput{} - } - - output = &StartConfigRulesEvaluationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartConfigRulesEvaluation API operation for AWS Config. -// -// Runs an on-demand evaluation for the specified AWS Config rules against the -// last known configuration state of the resources. Use StartConfigRulesEvaluation -// when you want to test that a rule you updated is working as expected. StartConfigRulesEvaluation -// does not re-record the latest configuration state for your resources. It -// re-runs an evaluation against the last known state of your resources. -// -// You can specify up to 25 AWS Config rules per request. -// -// An existing StartConfigRulesEvaluation call for the specified rules must -// complete before you can call the API again. If you chose to have AWS Config -// stream to an Amazon SNS topic, you will receive a ConfigRuleEvaluationStarted -// notification when the evaluation starts. -// -// You don't need to call the StartConfigRulesEvaluation API to run an evaluation -// for a new rule. When you create a rule, AWS Config evaluates your resources -// against the rule automatically. -// -// The StartConfigRulesEvaluation API is useful if you want to run on-demand -// evaluations, such as the following example: -// -// You have a custom rule that evaluates your IAM resources every 24 hours. -// -// You update your Lambda function to add additional conditions to your rule. -// -// Instead of waiting for the next periodic evaluation, you call the StartConfigRulesEvaluation -// API. -// -// AWS Config invokes your Lambda function and evaluates your IAM resources. -// -// Your custom rule will still run periodic evaluations every 24 hours. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation StartConfigRulesEvaluation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchConfigRuleException "NoSuchConfigRuleException" -// One or more AWS Config rules in the request are invalid. Verify that the -// rule names are correct and try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// For StartConfigRulesEvaluation API, this exception is thrown if an evaluation -// is in progress or if you call the StartConfigRulesEvaluation API more than -// once per minute. -// -// For PutConfigurationAggregator API, this exception is thrown if the number -// of accounts and aggregators exceeds the limit. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The rule is currently being deleted or the rule is deleting your evaluation -// results. Try your request again later. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StartConfigRulesEvaluation -func (c *ConfigService) StartConfigRulesEvaluation(input *StartConfigRulesEvaluationInput) (*StartConfigRulesEvaluationOutput, error) { - req, out := c.StartConfigRulesEvaluationRequest(input) - return out, req.Send() -} - -// StartConfigRulesEvaluationWithContext is the same as StartConfigRulesEvaluation with the addition of -// the ability to pass a context and additional request options. -// -// See StartConfigRulesEvaluation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) StartConfigRulesEvaluationWithContext(ctx aws.Context, input *StartConfigRulesEvaluationInput, opts ...request.Option) (*StartConfigRulesEvaluationOutput, error) { - req, out := c.StartConfigRulesEvaluationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartConfigurationRecorder = "StartConfigurationRecorder" - -// StartConfigurationRecorderRequest generates a "aws/request.Request" representing the -// client's request for the StartConfigurationRecorder operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartConfigurationRecorder for more information on using the StartConfigurationRecorder -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartConfigurationRecorderRequest method. -// req, resp := client.StartConfigurationRecorderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StartConfigurationRecorder -func (c *ConfigService) StartConfigurationRecorderRequest(input *StartConfigurationRecorderInput) (req *request.Request, output *StartConfigurationRecorderOutput) { - op := &request.Operation{ - Name: opStartConfigurationRecorder, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartConfigurationRecorderInput{} - } - - output = &StartConfigurationRecorderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartConfigurationRecorder API operation for AWS Config. -// -// Starts recording configurations of the AWS resources you have selected to -// record in your AWS account. -// -// You must have created at least one delivery channel to successfully start -// the configuration recorder. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation StartConfigurationRecorder for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchConfigurationRecorderException "NoSuchConfigurationRecorderException" -// You have specified a configuration recorder that does not exist. -// -// * ErrCodeNoAvailableDeliveryChannelException "NoAvailableDeliveryChannelException" -// There is no delivery channel available to record configurations. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StartConfigurationRecorder -func (c *ConfigService) StartConfigurationRecorder(input *StartConfigurationRecorderInput) (*StartConfigurationRecorderOutput, error) { - req, out := c.StartConfigurationRecorderRequest(input) - return out, req.Send() -} - -// StartConfigurationRecorderWithContext is the same as StartConfigurationRecorder with the addition of -// the ability to pass a context and additional request options. -// -// See StartConfigurationRecorder for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) StartConfigurationRecorderWithContext(ctx aws.Context, input *StartConfigurationRecorderInput, opts ...request.Option) (*StartConfigurationRecorderOutput, error) { - req, out := c.StartConfigurationRecorderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopConfigurationRecorder = "StopConfigurationRecorder" - -// StopConfigurationRecorderRequest generates a "aws/request.Request" representing the -// client's request for the StopConfigurationRecorder operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopConfigurationRecorder for more information on using the StopConfigurationRecorder -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopConfigurationRecorderRequest method. -// req, resp := client.StopConfigurationRecorderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StopConfigurationRecorder -func (c *ConfigService) StopConfigurationRecorderRequest(input *StopConfigurationRecorderInput) (req *request.Request, output *StopConfigurationRecorderOutput) { - op := &request.Operation{ - Name: opStopConfigurationRecorder, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopConfigurationRecorderInput{} - } - - output = &StopConfigurationRecorderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopConfigurationRecorder API operation for AWS Config. -// -// Stops recording configurations of the AWS resources you have selected to -// record in your AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation StopConfigurationRecorder for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchConfigurationRecorderException "NoSuchConfigurationRecorderException" -// You have specified a configuration recorder that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StopConfigurationRecorder -func (c *ConfigService) StopConfigurationRecorder(input *StopConfigurationRecorderInput) (*StopConfigurationRecorderOutput, error) { - req, out := c.StopConfigurationRecorderRequest(input) - return out, req.Send() -} - -// StopConfigurationRecorderWithContext is the same as StopConfigurationRecorder with the addition of -// the ability to pass a context and additional request options. -// -// See StopConfigurationRecorder for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) StopConfigurationRecorderWithContext(ctx aws.Context, input *StopConfigurationRecorderInput, opts ...request.Option) (*StopConfigurationRecorderOutput, error) { - req, out := c.StopConfigurationRecorderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// A collection of accounts and regions. -type AccountAggregationSource struct { - _ struct{} `type:"structure"` - - // The 12-digit account ID of the account being aggregated. - // - // AccountIds is a required field - AccountIds []*string `min:"1" type:"list" required:"true"` - - // If true, aggregate existing AWS Config regions and future regions. - AllAwsRegions *bool `type:"boolean"` - - // The source regions being aggregated. - AwsRegions []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s AccountAggregationSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountAggregationSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AccountAggregationSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AccountAggregationSource"} - if s.AccountIds == nil { - invalidParams.Add(request.NewErrParamRequired("AccountIds")) - } - if s.AccountIds != nil && len(s.AccountIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountIds", 1)) - } - if s.AwsRegions != nil && len(s.AwsRegions) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AwsRegions", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountIds sets the AccountIds field's value. -func (s *AccountAggregationSource) SetAccountIds(v []*string) *AccountAggregationSource { - s.AccountIds = v - return s -} - -// SetAllAwsRegions sets the AllAwsRegions field's value. -func (s *AccountAggregationSource) SetAllAwsRegions(v bool) *AccountAggregationSource { - s.AllAwsRegions = &v - return s -} - -// SetAwsRegions sets the AwsRegions field's value. -func (s *AccountAggregationSource) SetAwsRegions(v []*string) *AccountAggregationSource { - s.AwsRegions = v - return s -} - -// Indicates whether an AWS Config rule is compliant based on account ID, region, -// compliance, and rule name. -// -// A rule is compliant if all of the resources that the rule evaluated comply -// with it. It is noncompliant if any of these resources do not comply. -type AggregateComplianceByConfigRule struct { - _ struct{} `type:"structure"` - - // The 12-digit account ID of the source account. - AccountId *string `type:"string"` - - // The source region from where the data is aggregated. - AwsRegion *string `min:"1" type:"string"` - - // Indicates whether an AWS resource or AWS Config rule is compliant and provides - // the number of contributors that affect the compliance. - Compliance *Compliance `type:"structure"` - - // The name of the AWS Config rule. - ConfigRuleName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s AggregateComplianceByConfigRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AggregateComplianceByConfigRule) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *AggregateComplianceByConfigRule) SetAccountId(v string) *AggregateComplianceByConfigRule { - s.AccountId = &v - return s -} - -// SetAwsRegion sets the AwsRegion field's value. -func (s *AggregateComplianceByConfigRule) SetAwsRegion(v string) *AggregateComplianceByConfigRule { - s.AwsRegion = &v - return s -} - -// SetCompliance sets the Compliance field's value. -func (s *AggregateComplianceByConfigRule) SetCompliance(v *Compliance) *AggregateComplianceByConfigRule { - s.Compliance = v - return s -} - -// SetConfigRuleName sets the ConfigRuleName field's value. -func (s *AggregateComplianceByConfigRule) SetConfigRuleName(v string) *AggregateComplianceByConfigRule { - s.ConfigRuleName = &v - return s -} - -// Returns the number of compliant and noncompliant rules for one or more accounts -// and regions in an aggregator. -type AggregateComplianceCount struct { - _ struct{} `type:"structure"` - - // The number of compliant and noncompliant AWS Config rules. - ComplianceSummary *ComplianceSummary `type:"structure"` - - // The 12-digit account ID or region based on the GroupByKey value. - GroupName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s AggregateComplianceCount) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AggregateComplianceCount) GoString() string { - return s.String() -} - -// SetComplianceSummary sets the ComplianceSummary field's value. -func (s *AggregateComplianceCount) SetComplianceSummary(v *ComplianceSummary) *AggregateComplianceCount { - s.ComplianceSummary = v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *AggregateComplianceCount) SetGroupName(v string) *AggregateComplianceCount { - s.GroupName = &v - return s -} - -// The details of an AWS Config evaluation for an account ID and region in an -// aggregator. Provides the AWS resource that was evaluated, the compliance -// of the resource, related time stamps, and supplementary information. -type AggregateEvaluationResult struct { - _ struct{} `type:"structure"` - - // The 12-digit account ID of the source account. - AccountId *string `type:"string"` - - // Supplementary information about how the agrregate evaluation determined the - // compliance. - Annotation *string `min:"1" type:"string"` - - // The source region from where the data is aggregated. - AwsRegion *string `min:"1" type:"string"` - - // The resource compliance status. - // - // For the AggregationEvaluationResult data type, AWS Config supports only the - // COMPLIANT and NON_COMPLIANT. AWS Config does not support the NOT_APPLICABLE - // and INSUFFICIENT_DATA value. - ComplianceType *string `type:"string" enum:"ComplianceType"` - - // The time when the AWS Config rule evaluated the AWS resource. - ConfigRuleInvokedTime *time.Time `type:"timestamp"` - - // Uniquely identifies the evaluation result. - EvaluationResultIdentifier *EvaluationResultIdentifier `type:"structure"` - - // The time when AWS Config recorded the aggregate evaluation result. - ResultRecordedTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s AggregateEvaluationResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AggregateEvaluationResult) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *AggregateEvaluationResult) SetAccountId(v string) *AggregateEvaluationResult { - s.AccountId = &v - return s -} - -// SetAnnotation sets the Annotation field's value. -func (s *AggregateEvaluationResult) SetAnnotation(v string) *AggregateEvaluationResult { - s.Annotation = &v - return s -} - -// SetAwsRegion sets the AwsRegion field's value. -func (s *AggregateEvaluationResult) SetAwsRegion(v string) *AggregateEvaluationResult { - s.AwsRegion = &v - return s -} - -// SetComplianceType sets the ComplianceType field's value. -func (s *AggregateEvaluationResult) SetComplianceType(v string) *AggregateEvaluationResult { - s.ComplianceType = &v - return s -} - -// SetConfigRuleInvokedTime sets the ConfigRuleInvokedTime field's value. -func (s *AggregateEvaluationResult) SetConfigRuleInvokedTime(v time.Time) *AggregateEvaluationResult { - s.ConfigRuleInvokedTime = &v - return s -} - -// SetEvaluationResultIdentifier sets the EvaluationResultIdentifier field's value. -func (s *AggregateEvaluationResult) SetEvaluationResultIdentifier(v *EvaluationResultIdentifier) *AggregateEvaluationResult { - s.EvaluationResultIdentifier = v - return s -} - -// SetResultRecordedTime sets the ResultRecordedTime field's value. -func (s *AggregateEvaluationResult) SetResultRecordedTime(v time.Time) *AggregateEvaluationResult { - s.ResultRecordedTime = &v - return s -} - -// The details that identify a resource that is collected by AWS Config aggregator, -// including the resource type, ID, (if available) the custom resource name, -// the source account, and source region. -type AggregateResourceIdentifier struct { - _ struct{} `type:"structure"` - - // The ID of the AWS resource. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // The name of the AWS resource. - ResourceName *string `type:"string"` - - // The type of the AWS resource. - // - // ResourceType is a required field - ResourceType *string `type:"string" required:"true" enum:"ResourceType"` - - // The 12-digit account ID of the source account. - // - // SourceAccountId is a required field - SourceAccountId *string `type:"string" required:"true"` - - // The source region where data is aggregated. - // - // SourceRegion is a required field - SourceRegion *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AggregateResourceIdentifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AggregateResourceIdentifier) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AggregateResourceIdentifier) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AggregateResourceIdentifier"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - if s.SourceAccountId == nil { - invalidParams.Add(request.NewErrParamRequired("SourceAccountId")) - } - if s.SourceRegion == nil { - invalidParams.Add(request.NewErrParamRequired("SourceRegion")) - } - if s.SourceRegion != nil && len(*s.SourceRegion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceRegion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *AggregateResourceIdentifier) SetResourceId(v string) *AggregateResourceIdentifier { - s.ResourceId = &v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *AggregateResourceIdentifier) SetResourceName(v string) *AggregateResourceIdentifier { - s.ResourceName = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *AggregateResourceIdentifier) SetResourceType(v string) *AggregateResourceIdentifier { - s.ResourceType = &v - return s -} - -// SetSourceAccountId sets the SourceAccountId field's value. -func (s *AggregateResourceIdentifier) SetSourceAccountId(v string) *AggregateResourceIdentifier { - s.SourceAccountId = &v - return s -} - -// SetSourceRegion sets the SourceRegion field's value. -func (s *AggregateResourceIdentifier) SetSourceRegion(v string) *AggregateResourceIdentifier { - s.SourceRegion = &v - return s -} - -// The current sync status between the source and the aggregator account. -type AggregatedSourceStatus struct { - _ struct{} `type:"structure"` - - // The region authorized to collect aggregated data. - AwsRegion *string `min:"1" type:"string"` - - // The error code that AWS Config returned when the source account aggregation - // last failed. - LastErrorCode *string `type:"string"` - - // The message indicating that the source account aggregation failed due to - // an error. - LastErrorMessage *string `type:"string"` - - // Filters the last updated status type. - // - // * Valid value FAILED indicates errors while moving data. - // - // * Valid value SUCCEEDED indicates the data was successfully moved. - // - // * Valid value OUTDATED indicates the data is not the most recent. - LastUpdateStatus *string `type:"string" enum:"AggregatedSourceStatusType"` - - // The time of the last update. - LastUpdateTime *time.Time `type:"timestamp"` - - // The source account ID or an organization. - SourceId *string `type:"string"` - - // The source account or an organization. - SourceType *string `type:"string" enum:"AggregatedSourceType"` -} - -// String returns the string representation -func (s AggregatedSourceStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AggregatedSourceStatus) GoString() string { - return s.String() -} - -// SetAwsRegion sets the AwsRegion field's value. -func (s *AggregatedSourceStatus) SetAwsRegion(v string) *AggregatedSourceStatus { - s.AwsRegion = &v - return s -} - -// SetLastErrorCode sets the LastErrorCode field's value. -func (s *AggregatedSourceStatus) SetLastErrorCode(v string) *AggregatedSourceStatus { - s.LastErrorCode = &v - return s -} - -// SetLastErrorMessage sets the LastErrorMessage field's value. -func (s *AggregatedSourceStatus) SetLastErrorMessage(v string) *AggregatedSourceStatus { - s.LastErrorMessage = &v - return s -} - -// SetLastUpdateStatus sets the LastUpdateStatus field's value. -func (s *AggregatedSourceStatus) SetLastUpdateStatus(v string) *AggregatedSourceStatus { - s.LastUpdateStatus = &v - return s -} - -// SetLastUpdateTime sets the LastUpdateTime field's value. -func (s *AggregatedSourceStatus) SetLastUpdateTime(v time.Time) *AggregatedSourceStatus { - s.LastUpdateTime = &v - return s -} - -// SetSourceId sets the SourceId field's value. -func (s *AggregatedSourceStatus) SetSourceId(v string) *AggregatedSourceStatus { - s.SourceId = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *AggregatedSourceStatus) SetSourceType(v string) *AggregatedSourceStatus { - s.SourceType = &v - return s -} - -// An object that represents the authorizations granted to aggregator accounts -// and regions. -type AggregationAuthorization struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the aggregation object. - AggregationAuthorizationArn *string `type:"string"` - - // The 12-digit account ID of the account authorized to aggregate data. - AuthorizedAccountId *string `type:"string"` - - // The region authorized to collect aggregated data. - AuthorizedAwsRegion *string `min:"1" type:"string"` - - // The time stamp when the aggregation authorization was created. - CreationTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s AggregationAuthorization) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AggregationAuthorization) GoString() string { - return s.String() -} - -// SetAggregationAuthorizationArn sets the AggregationAuthorizationArn field's value. -func (s *AggregationAuthorization) SetAggregationAuthorizationArn(v string) *AggregationAuthorization { - s.AggregationAuthorizationArn = &v - return s -} - -// SetAuthorizedAccountId sets the AuthorizedAccountId field's value. -func (s *AggregationAuthorization) SetAuthorizedAccountId(v string) *AggregationAuthorization { - s.AuthorizedAccountId = &v - return s -} - -// SetAuthorizedAwsRegion sets the AuthorizedAwsRegion field's value. -func (s *AggregationAuthorization) SetAuthorizedAwsRegion(v string) *AggregationAuthorization { - s.AuthorizedAwsRegion = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *AggregationAuthorization) SetCreationTime(v time.Time) *AggregationAuthorization { - s.CreationTime = &v - return s -} - -// The detailed configuration of a specified resource. -type BaseConfigurationItem struct { - _ struct{} `type:"structure"` - - // The 12-digit AWS account ID associated with the resource. - AccountId *string `locationName:"accountId" type:"string"` - - // The Amazon Resource Name (ARN) of the resource. - Arn *string `locationName:"arn" type:"string"` - - // The Availability Zone associated with the resource. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The region where the resource resides. - AwsRegion *string `locationName:"awsRegion" min:"1" type:"string"` - - // The description of the resource configuration. - Configuration *string `locationName:"configuration" type:"string"` - - // The time when the configuration recording was initiated. - ConfigurationItemCaptureTime *time.Time `locationName:"configurationItemCaptureTime" type:"timestamp"` - - // The configuration item status. - ConfigurationItemStatus *string `locationName:"configurationItemStatus" type:"string" enum:"ConfigurationItemStatus"` - - // An identifier that indicates the ordering of the configuration items of a - // resource. - ConfigurationStateId *string `locationName:"configurationStateId" type:"string"` - - // The time stamp when the resource was created. - ResourceCreationTime *time.Time `locationName:"resourceCreationTime" type:"timestamp"` - - // The ID of the resource (for example., sg-xxxxxx). - ResourceId *string `locationName:"resourceId" min:"1" type:"string"` - - // The custom name of the resource, if available. - ResourceName *string `locationName:"resourceName" type:"string"` - - // The type of AWS resource. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // Configuration attributes that AWS Config returns for certain resource types - // to supplement the information returned for the configuration parameter. - SupplementaryConfiguration map[string]*string `locationName:"supplementaryConfiguration" type:"map"` - - // The version number of the resource configuration. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s BaseConfigurationItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BaseConfigurationItem) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *BaseConfigurationItem) SetAccountId(v string) *BaseConfigurationItem { - s.AccountId = &v - return s -} - -// SetArn sets the Arn field's value. -func (s *BaseConfigurationItem) SetArn(v string) *BaseConfigurationItem { - s.Arn = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *BaseConfigurationItem) SetAvailabilityZone(v string) *BaseConfigurationItem { - s.AvailabilityZone = &v - return s -} - -// SetAwsRegion sets the AwsRegion field's value. -func (s *BaseConfigurationItem) SetAwsRegion(v string) *BaseConfigurationItem { - s.AwsRegion = &v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *BaseConfigurationItem) SetConfiguration(v string) *BaseConfigurationItem { - s.Configuration = &v - return s -} - -// SetConfigurationItemCaptureTime sets the ConfigurationItemCaptureTime field's value. -func (s *BaseConfigurationItem) SetConfigurationItemCaptureTime(v time.Time) *BaseConfigurationItem { - s.ConfigurationItemCaptureTime = &v - return s -} - -// SetConfigurationItemStatus sets the ConfigurationItemStatus field's value. -func (s *BaseConfigurationItem) SetConfigurationItemStatus(v string) *BaseConfigurationItem { - s.ConfigurationItemStatus = &v - return s -} - -// SetConfigurationStateId sets the ConfigurationStateId field's value. -func (s *BaseConfigurationItem) SetConfigurationStateId(v string) *BaseConfigurationItem { - s.ConfigurationStateId = &v - return s -} - -// SetResourceCreationTime sets the ResourceCreationTime field's value. -func (s *BaseConfigurationItem) SetResourceCreationTime(v time.Time) *BaseConfigurationItem { - s.ResourceCreationTime = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *BaseConfigurationItem) SetResourceId(v string) *BaseConfigurationItem { - s.ResourceId = &v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *BaseConfigurationItem) SetResourceName(v string) *BaseConfigurationItem { - s.ResourceName = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *BaseConfigurationItem) SetResourceType(v string) *BaseConfigurationItem { - s.ResourceType = &v - return s -} - -// SetSupplementaryConfiguration sets the SupplementaryConfiguration field's value. -func (s *BaseConfigurationItem) SetSupplementaryConfiguration(v map[string]*string) *BaseConfigurationItem { - s.SupplementaryConfiguration = v - return s -} - -// SetVersion sets the Version field's value. -func (s *BaseConfigurationItem) SetVersion(v string) *BaseConfigurationItem { - s.Version = &v - return s -} - -type BatchGetAggregateResourceConfigInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration aggregator. - // - // ConfigurationAggregatorName is a required field - ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` - - // A list of aggregate ResourceIdentifiers objects. - // - // ResourceIdentifiers is a required field - ResourceIdentifiers []*AggregateResourceIdentifier `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchGetAggregateResourceConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetAggregateResourceConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetAggregateResourceConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetAggregateResourceConfigInput"} - if s.ConfigurationAggregatorName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) - } - if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) - } - if s.ResourceIdentifiers == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceIdentifiers")) - } - if s.ResourceIdentifiers != nil && len(s.ResourceIdentifiers) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceIdentifiers", 1)) - } - if s.ResourceIdentifiers != nil { - for i, v := range s.ResourceIdentifiers { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceIdentifiers", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. -func (s *BatchGetAggregateResourceConfigInput) SetConfigurationAggregatorName(v string) *BatchGetAggregateResourceConfigInput { - s.ConfigurationAggregatorName = &v - return s -} - -// SetResourceIdentifiers sets the ResourceIdentifiers field's value. -func (s *BatchGetAggregateResourceConfigInput) SetResourceIdentifiers(v []*AggregateResourceIdentifier) *BatchGetAggregateResourceConfigInput { - s.ResourceIdentifiers = v - return s -} - -type BatchGetAggregateResourceConfigOutput struct { - _ struct{} `type:"structure"` - - // A list that contains the current configuration of one or more resources. - BaseConfigurationItems []*BaseConfigurationItem `type:"list"` - - // A list of resource identifiers that were not processed with current scope. - // The list is empty if all the resources are processed. - UnprocessedResourceIdentifiers []*AggregateResourceIdentifier `type:"list"` -} - -// String returns the string representation -func (s BatchGetAggregateResourceConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetAggregateResourceConfigOutput) GoString() string { - return s.String() -} - -// SetBaseConfigurationItems sets the BaseConfigurationItems field's value. -func (s *BatchGetAggregateResourceConfigOutput) SetBaseConfigurationItems(v []*BaseConfigurationItem) *BatchGetAggregateResourceConfigOutput { - s.BaseConfigurationItems = v - return s -} - -// SetUnprocessedResourceIdentifiers sets the UnprocessedResourceIdentifiers field's value. -func (s *BatchGetAggregateResourceConfigOutput) SetUnprocessedResourceIdentifiers(v []*AggregateResourceIdentifier) *BatchGetAggregateResourceConfigOutput { - s.UnprocessedResourceIdentifiers = v - return s -} - -type BatchGetResourceConfigInput struct { - _ struct{} `type:"structure"` - - // A list of resource keys to be processed with the current request. Each element - // in the list consists of the resource type and resource ID. - // - // ResourceKeys is a required field - ResourceKeys []*ResourceKey `locationName:"resourceKeys" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchGetResourceConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetResourceConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetResourceConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetResourceConfigInput"} - if s.ResourceKeys == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceKeys")) - } - if s.ResourceKeys != nil && len(s.ResourceKeys) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceKeys", 1)) - } - if s.ResourceKeys != nil { - for i, v := range s.ResourceKeys { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceKeys", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceKeys sets the ResourceKeys field's value. -func (s *BatchGetResourceConfigInput) SetResourceKeys(v []*ResourceKey) *BatchGetResourceConfigInput { - s.ResourceKeys = v - return s -} - -type BatchGetResourceConfigOutput struct { - _ struct{} `type:"structure"` - - // A list that contains the current configuration of one or more resources. - BaseConfigurationItems []*BaseConfigurationItem `locationName:"baseConfigurationItems" type:"list"` - - // A list of resource keys that were not processed with the current response. - // The unprocessesResourceKeys value is in the same form as ResourceKeys, so - // the value can be directly provided to a subsequent BatchGetResourceConfig - // operation. If there are no unprocessed resource keys, the response contains - // an empty unprocessedResourceKeys list. - UnprocessedResourceKeys []*ResourceKey `locationName:"unprocessedResourceKeys" min:"1" type:"list"` -} - -// String returns the string representation -func (s BatchGetResourceConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetResourceConfigOutput) GoString() string { - return s.String() -} - -// SetBaseConfigurationItems sets the BaseConfigurationItems field's value. -func (s *BatchGetResourceConfigOutput) SetBaseConfigurationItems(v []*BaseConfigurationItem) *BatchGetResourceConfigOutput { - s.BaseConfigurationItems = v - return s -} - -// SetUnprocessedResourceKeys sets the UnprocessedResourceKeys field's value. -func (s *BatchGetResourceConfigOutput) SetUnprocessedResourceKeys(v []*ResourceKey) *BatchGetResourceConfigOutput { - s.UnprocessedResourceKeys = v - return s -} - -// Indicates whether an AWS resource or AWS Config rule is compliant and provides -// the number of contributors that affect the compliance. -type Compliance struct { - _ struct{} `type:"structure"` - - // The number of AWS resources or AWS Config rules that cause a result of NON_COMPLIANT, - // up to a maximum number. - ComplianceContributorCount *ComplianceContributorCount `type:"structure"` - - // Indicates whether an AWS resource or AWS Config rule is compliant. - // - // A resource is compliant if it complies with all of the AWS Config rules that - // evaluate it. A resource is noncompliant if it does not comply with one or - // more of these rules. - // - // A rule is compliant if all of the resources that the rule evaluates comply - // with it. A rule is noncompliant if any of these resources do not comply. - // - // AWS Config returns the INSUFFICIENT_DATA value when no evaluation results - // are available for the AWS resource or AWS Config rule. - // - // For the Compliance data type, AWS Config supports only COMPLIANT, NON_COMPLIANT, - // and INSUFFICIENT_DATA values. AWS Config does not support the NOT_APPLICABLE - // value for the Compliance data type. - ComplianceType *string `type:"string" enum:"ComplianceType"` -} - -// String returns the string representation -func (s Compliance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Compliance) GoString() string { - return s.String() -} - -// SetComplianceContributorCount sets the ComplianceContributorCount field's value. -func (s *Compliance) SetComplianceContributorCount(v *ComplianceContributorCount) *Compliance { - s.ComplianceContributorCount = v - return s -} - -// SetComplianceType sets the ComplianceType field's value. -func (s *Compliance) SetComplianceType(v string) *Compliance { - s.ComplianceType = &v - return s -} - -// Indicates whether an AWS Config rule is compliant. A rule is compliant if -// all of the resources that the rule evaluated comply with it. A rule is noncompliant -// if any of these resources do not comply. -type ComplianceByConfigRule struct { - _ struct{} `type:"structure"` - - // Indicates whether the AWS Config rule is compliant. - Compliance *Compliance `type:"structure"` - - // The name of the AWS Config rule. - ConfigRuleName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ComplianceByConfigRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComplianceByConfigRule) GoString() string { - return s.String() -} - -// SetCompliance sets the Compliance field's value. -func (s *ComplianceByConfigRule) SetCompliance(v *Compliance) *ComplianceByConfigRule { - s.Compliance = v - return s -} - -// SetConfigRuleName sets the ConfigRuleName field's value. -func (s *ComplianceByConfigRule) SetConfigRuleName(v string) *ComplianceByConfigRule { - s.ConfigRuleName = &v - return s -} - -// Indicates whether an AWS resource that is evaluated according to one or more -// AWS Config rules is compliant. A resource is compliant if it complies with -// all of the rules that evaluate it. A resource is noncompliant if it does -// not comply with one or more of these rules. -type ComplianceByResource struct { - _ struct{} `type:"structure"` - - // Indicates whether the AWS resource complies with all of the AWS Config rules - // that evaluated it. - Compliance *Compliance `type:"structure"` - - // The ID of the AWS resource that was evaluated. - ResourceId *string `min:"1" type:"string"` - - // The type of the AWS resource that was evaluated. - ResourceType *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ComplianceByResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComplianceByResource) GoString() string { - return s.String() -} - -// SetCompliance sets the Compliance field's value. -func (s *ComplianceByResource) SetCompliance(v *Compliance) *ComplianceByResource { - s.Compliance = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ComplianceByResource) SetResourceId(v string) *ComplianceByResource { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ComplianceByResource) SetResourceType(v string) *ComplianceByResource { - s.ResourceType = &v - return s -} - -// The number of AWS resources or AWS Config rules responsible for the current -// compliance of the item, up to a maximum number. -type ComplianceContributorCount struct { - _ struct{} `type:"structure"` - - // Indicates whether the maximum count is reached. - CapExceeded *bool `type:"boolean"` - - // The number of AWS resources or AWS Config rules responsible for the current - // compliance of the item. - CappedCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s ComplianceContributorCount) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComplianceContributorCount) GoString() string { - return s.String() -} - -// SetCapExceeded sets the CapExceeded field's value. -func (s *ComplianceContributorCount) SetCapExceeded(v bool) *ComplianceContributorCount { - s.CapExceeded = &v - return s -} - -// SetCappedCount sets the CappedCount field's value. -func (s *ComplianceContributorCount) SetCappedCount(v int64) *ComplianceContributorCount { - s.CappedCount = &v - return s -} - -// The number of AWS Config rules or AWS resources that are compliant and noncompliant. -type ComplianceSummary struct { - _ struct{} `type:"structure"` - - // The time that AWS Config created the compliance summary. - ComplianceSummaryTimestamp *time.Time `type:"timestamp"` - - // The number of AWS Config rules or AWS resources that are compliant, up to - // a maximum of 25 for rules and 100 for resources. - CompliantResourceCount *ComplianceContributorCount `type:"structure"` - - // The number of AWS Config rules or AWS resources that are noncompliant, up - // to a maximum of 25 for rules and 100 for resources. - NonCompliantResourceCount *ComplianceContributorCount `type:"structure"` -} - -// String returns the string representation -func (s ComplianceSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComplianceSummary) GoString() string { - return s.String() -} - -// SetComplianceSummaryTimestamp sets the ComplianceSummaryTimestamp field's value. -func (s *ComplianceSummary) SetComplianceSummaryTimestamp(v time.Time) *ComplianceSummary { - s.ComplianceSummaryTimestamp = &v - return s -} - -// SetCompliantResourceCount sets the CompliantResourceCount field's value. -func (s *ComplianceSummary) SetCompliantResourceCount(v *ComplianceContributorCount) *ComplianceSummary { - s.CompliantResourceCount = v - return s -} - -// SetNonCompliantResourceCount sets the NonCompliantResourceCount field's value. -func (s *ComplianceSummary) SetNonCompliantResourceCount(v *ComplianceContributorCount) *ComplianceSummary { - s.NonCompliantResourceCount = v - return s -} - -// The number of AWS resources of a specific type that are compliant or noncompliant, -// up to a maximum of 100 for each. -type ComplianceSummaryByResourceType struct { - _ struct{} `type:"structure"` - - // The number of AWS resources that are compliant or noncompliant, up to a maximum - // of 100 for each. - ComplianceSummary *ComplianceSummary `type:"structure"` - - // The type of AWS resource. - ResourceType *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ComplianceSummaryByResourceType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComplianceSummaryByResourceType) GoString() string { - return s.String() -} - -// SetComplianceSummary sets the ComplianceSummary field's value. -func (s *ComplianceSummaryByResourceType) SetComplianceSummary(v *ComplianceSummary) *ComplianceSummaryByResourceType { - s.ComplianceSummary = v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ComplianceSummaryByResourceType) SetResourceType(v string) *ComplianceSummaryByResourceType { - s.ResourceType = &v - return s -} - -// Provides status of the delivery of the snapshot or the configuration history -// to the specified Amazon S3 bucket. Also provides the status of notifications -// about the Amazon S3 delivery to the specified Amazon SNS topic. -type ConfigExportDeliveryInfo struct { - _ struct{} `type:"structure"` - - // The time of the last attempted delivery. - LastAttemptTime *time.Time `locationName:"lastAttemptTime" type:"timestamp"` - - // The error code from the last attempted delivery. - LastErrorCode *string `locationName:"lastErrorCode" type:"string"` - - // The error message from the last attempted delivery. - LastErrorMessage *string `locationName:"lastErrorMessage" type:"string"` - - // Status of the last attempted delivery. - LastStatus *string `locationName:"lastStatus" type:"string" enum:"DeliveryStatus"` - - // The time of the last successful delivery. - LastSuccessfulTime *time.Time `locationName:"lastSuccessfulTime" type:"timestamp"` - - // The time that the next delivery occurs. - NextDeliveryTime *time.Time `locationName:"nextDeliveryTime" type:"timestamp"` -} - -// String returns the string representation -func (s ConfigExportDeliveryInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigExportDeliveryInfo) GoString() string { - return s.String() -} - -// SetLastAttemptTime sets the LastAttemptTime field's value. -func (s *ConfigExportDeliveryInfo) SetLastAttemptTime(v time.Time) *ConfigExportDeliveryInfo { - s.LastAttemptTime = &v - return s -} - -// SetLastErrorCode sets the LastErrorCode field's value. -func (s *ConfigExportDeliveryInfo) SetLastErrorCode(v string) *ConfigExportDeliveryInfo { - s.LastErrorCode = &v - return s -} - -// SetLastErrorMessage sets the LastErrorMessage field's value. -func (s *ConfigExportDeliveryInfo) SetLastErrorMessage(v string) *ConfigExportDeliveryInfo { - s.LastErrorMessage = &v - return s -} - -// SetLastStatus sets the LastStatus field's value. -func (s *ConfigExportDeliveryInfo) SetLastStatus(v string) *ConfigExportDeliveryInfo { - s.LastStatus = &v - return s -} - -// SetLastSuccessfulTime sets the LastSuccessfulTime field's value. -func (s *ConfigExportDeliveryInfo) SetLastSuccessfulTime(v time.Time) *ConfigExportDeliveryInfo { - s.LastSuccessfulTime = &v - return s -} - -// SetNextDeliveryTime sets the NextDeliveryTime field's value. -func (s *ConfigExportDeliveryInfo) SetNextDeliveryTime(v time.Time) *ConfigExportDeliveryInfo { - s.NextDeliveryTime = &v - return s -} - -// An AWS Config rule represents an AWS Lambda function that you create for -// a custom rule or a predefined function for an AWS managed rule. The function -// evaluates configuration items to assess whether your AWS resources comply -// with your desired configurations. This function can run when AWS Config detects -// a configuration change to an AWS resource and at a periodic frequency that -// you choose (for example, every 24 hours). -// -// You can use the AWS CLI and AWS SDKs if you want to create a rule that triggers -// evaluations for your resources when AWS Config delivers the configuration -// snapshot. For more information, see ConfigSnapshotDeliveryProperties. -// -// For more information about developing and using AWS Config rules, see Evaluating -// AWS Resource Configurations with AWS Config (http://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html) -// in the AWS Config Developer Guide. -type ConfigRule struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the AWS Config rule. - ConfigRuleArn *string `type:"string"` - - // The ID of the AWS Config rule. - ConfigRuleId *string `type:"string"` - - // The name that you assign to the AWS Config rule. The name is required if - // you are adding a new rule. - ConfigRuleName *string `min:"1" type:"string"` - - // Indicates whether the AWS Config rule is active or is currently being deleted - // by AWS Config. It can also indicate the evaluation status for the AWS Config - // rule. - // - // AWS Config sets the state of the rule to EVALUATING temporarily after you - // use the StartConfigRulesEvaluation request to evaluate your resources against - // the AWS Config rule. - // - // AWS Config sets the state of the rule to DELETING_RESULTS temporarily after - // you use the DeleteEvaluationResults request to delete the current evaluation - // results for the AWS Config rule. - // - // AWS Config temporarily sets the state of a rule to DELETING after you use - // the DeleteConfigRule request to delete the rule. After AWS Config deletes - // the rule, the rule and all of its evaluations are erased and are no longer - // available. - ConfigRuleState *string `type:"string" enum:"ConfigRuleState"` - - // Service principal name of the service that created the rule. - // - // The field is populated only if the service linked rule is created by a service. - // The field is empty if you create your own rule. - CreatedBy *string `min:"1" type:"string"` - - // The description that you provide for the AWS Config rule. - Description *string `type:"string"` - - // A string, in JSON format, that is passed to the AWS Config rule Lambda function. - InputParameters *string `min:"1" type:"string"` - - // The maximum frequency with which AWS Config runs evaluations for a rule. - // You can specify a value for MaximumExecutionFrequency when: - // - // * You are using an AWS managed rule that is triggered at a periodic frequency. - // - // * Your custom rule is triggered when AWS Config delivers the configuration - // snapshot. For more information, see ConfigSnapshotDeliveryProperties. - // - // By default, rules with a periodic trigger are evaluated every 24 hours. To - // change the frequency, specify a valid value for the MaximumExecutionFrequency - // parameter. - MaximumExecutionFrequency *string `type:"string" enum:"MaximumExecutionFrequency"` - - // Defines which resources can trigger an evaluation for the rule. The scope - // can include one or more resource types, a combination of one resource type - // and one resource ID, or a combination of a tag key and value. Specify a scope - // to constrain the resources that can trigger an evaluation for the rule. If - // you do not specify a scope, evaluations are triggered when any resource in - // the recording group changes. - Scope *Scope `type:"structure"` - - // Provides the rule owner (AWS or customer), the rule identifier, and the notifications - // that cause the function to evaluate your AWS resources. - // - // Source is a required field - Source *Source `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ConfigRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfigRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfigRule"} - if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) - } - if s.CreatedBy != nil && len(*s.CreatedBy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CreatedBy", 1)) - } - if s.InputParameters != nil && len(*s.InputParameters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputParameters", 1)) - } - if s.Source == nil { - invalidParams.Add(request.NewErrParamRequired("Source")) - } - if s.Scope != nil { - if err := s.Scope.Validate(); err != nil { - invalidParams.AddNested("Scope", err.(request.ErrInvalidParams)) - } - } - if s.Source != nil { - if err := s.Source.Validate(); err != nil { - invalidParams.AddNested("Source", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigRuleArn sets the ConfigRuleArn field's value. -func (s *ConfigRule) SetConfigRuleArn(v string) *ConfigRule { - s.ConfigRuleArn = &v - return s -} - -// SetConfigRuleId sets the ConfigRuleId field's value. -func (s *ConfigRule) SetConfigRuleId(v string) *ConfigRule { - s.ConfigRuleId = &v - return s -} - -// SetConfigRuleName sets the ConfigRuleName field's value. -func (s *ConfigRule) SetConfigRuleName(v string) *ConfigRule { - s.ConfigRuleName = &v - return s -} - -// SetConfigRuleState sets the ConfigRuleState field's value. -func (s *ConfigRule) SetConfigRuleState(v string) *ConfigRule { - s.ConfigRuleState = &v - return s -} - -// SetCreatedBy sets the CreatedBy field's value. -func (s *ConfigRule) SetCreatedBy(v string) *ConfigRule { - s.CreatedBy = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ConfigRule) SetDescription(v string) *ConfigRule { - s.Description = &v - return s -} - -// SetInputParameters sets the InputParameters field's value. -func (s *ConfigRule) SetInputParameters(v string) *ConfigRule { - s.InputParameters = &v - return s -} - -// SetMaximumExecutionFrequency sets the MaximumExecutionFrequency field's value. -func (s *ConfigRule) SetMaximumExecutionFrequency(v string) *ConfigRule { - s.MaximumExecutionFrequency = &v - return s -} - -// SetScope sets the Scope field's value. -func (s *ConfigRule) SetScope(v *Scope) *ConfigRule { - s.Scope = v - return s -} - -// SetSource sets the Source field's value. -func (s *ConfigRule) SetSource(v *Source) *ConfigRule { - s.Source = v - return s -} - -// Filters the compliance results based on account ID, region, compliance type, -// and rule name. -type ConfigRuleComplianceFilters struct { - _ struct{} `type:"structure"` - - // The 12-digit account ID of the source account. - AccountId *string `type:"string"` - - // The source region where the data is aggregated. - AwsRegion *string `min:"1" type:"string"` - - // The rule compliance status. - // - // For the ConfigRuleComplianceFilters data type, AWS Config supports only COMPLIANT - // and NON_COMPLIANT. AWS Config does not support the NOT_APPLICABLE and the - // INSUFFICIENT_DATA values. - ComplianceType *string `type:"string" enum:"ComplianceType"` - - // The name of the AWS Config rule. - ConfigRuleName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ConfigRuleComplianceFilters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigRuleComplianceFilters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfigRuleComplianceFilters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfigRuleComplianceFilters"} - if s.AwsRegion != nil && len(*s.AwsRegion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AwsRegion", 1)) - } - if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *ConfigRuleComplianceFilters) SetAccountId(v string) *ConfigRuleComplianceFilters { - s.AccountId = &v - return s -} - -// SetAwsRegion sets the AwsRegion field's value. -func (s *ConfigRuleComplianceFilters) SetAwsRegion(v string) *ConfigRuleComplianceFilters { - s.AwsRegion = &v - return s -} - -// SetComplianceType sets the ComplianceType field's value. -func (s *ConfigRuleComplianceFilters) SetComplianceType(v string) *ConfigRuleComplianceFilters { - s.ComplianceType = &v - return s -} - -// SetConfigRuleName sets the ConfigRuleName field's value. -func (s *ConfigRuleComplianceFilters) SetConfigRuleName(v string) *ConfigRuleComplianceFilters { - s.ConfigRuleName = &v - return s -} - -// Filters the results based on the account IDs and regions. -type ConfigRuleComplianceSummaryFilters struct { - _ struct{} `type:"structure"` - - // The 12-digit account ID of the source account. - AccountId *string `type:"string"` - - // The source region where the data is aggregated. - AwsRegion *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ConfigRuleComplianceSummaryFilters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigRuleComplianceSummaryFilters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfigRuleComplianceSummaryFilters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfigRuleComplianceSummaryFilters"} - if s.AwsRegion != nil && len(*s.AwsRegion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AwsRegion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *ConfigRuleComplianceSummaryFilters) SetAccountId(v string) *ConfigRuleComplianceSummaryFilters { - s.AccountId = &v - return s -} - -// SetAwsRegion sets the AwsRegion field's value. -func (s *ConfigRuleComplianceSummaryFilters) SetAwsRegion(v string) *ConfigRuleComplianceSummaryFilters { - s.AwsRegion = &v - return s -} - -// Status information for your AWS managed Config rules. The status includes -// information such as the last time the rule ran, the last time it failed, -// and the related error for the last failure. -// -// This action does not return status information about custom AWS Config rules. -type ConfigRuleEvaluationStatus struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the AWS Config rule. - ConfigRuleArn *string `type:"string"` - - // The ID of the AWS Config rule. - ConfigRuleId *string `type:"string"` - - // The name of the AWS Config rule. - ConfigRuleName *string `min:"1" type:"string"` - - // The time that you first activated the AWS Config rule. - FirstActivatedTime *time.Time `type:"timestamp"` - - // Indicates whether AWS Config has evaluated your resources against the rule - // at least once. - // - // * true - AWS Config has evaluated your AWS resources against the rule - // at least once. - // - // * false - AWS Config has not once finished evaluating your AWS resources - // against the rule. - FirstEvaluationStarted *bool `type:"boolean"` - - // The error code that AWS Config returned when the rule last failed. - LastErrorCode *string `type:"string"` - - // The error message that AWS Config returned when the rule last failed. - LastErrorMessage *string `type:"string"` - - // The time that AWS Config last failed to evaluate your AWS resources against - // the rule. - LastFailedEvaluationTime *time.Time `type:"timestamp"` - - // The time that AWS Config last failed to invoke the AWS Config rule to evaluate - // your AWS resources. - LastFailedInvocationTime *time.Time `type:"timestamp"` - - // The time that AWS Config last successfully evaluated your AWS resources against - // the rule. - LastSuccessfulEvaluationTime *time.Time `type:"timestamp"` - - // The time that AWS Config last successfully invoked the AWS Config rule to - // evaluate your AWS resources. - LastSuccessfulInvocationTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s ConfigRuleEvaluationStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigRuleEvaluationStatus) GoString() string { - return s.String() -} - -// SetConfigRuleArn sets the ConfigRuleArn field's value. -func (s *ConfigRuleEvaluationStatus) SetConfigRuleArn(v string) *ConfigRuleEvaluationStatus { - s.ConfigRuleArn = &v - return s -} - -// SetConfigRuleId sets the ConfigRuleId field's value. -func (s *ConfigRuleEvaluationStatus) SetConfigRuleId(v string) *ConfigRuleEvaluationStatus { - s.ConfigRuleId = &v - return s -} - -// SetConfigRuleName sets the ConfigRuleName field's value. -func (s *ConfigRuleEvaluationStatus) SetConfigRuleName(v string) *ConfigRuleEvaluationStatus { - s.ConfigRuleName = &v - return s -} - -// SetFirstActivatedTime sets the FirstActivatedTime field's value. -func (s *ConfigRuleEvaluationStatus) SetFirstActivatedTime(v time.Time) *ConfigRuleEvaluationStatus { - s.FirstActivatedTime = &v - return s -} - -// SetFirstEvaluationStarted sets the FirstEvaluationStarted field's value. -func (s *ConfigRuleEvaluationStatus) SetFirstEvaluationStarted(v bool) *ConfigRuleEvaluationStatus { - s.FirstEvaluationStarted = &v - return s -} - -// SetLastErrorCode sets the LastErrorCode field's value. -func (s *ConfigRuleEvaluationStatus) SetLastErrorCode(v string) *ConfigRuleEvaluationStatus { - s.LastErrorCode = &v - return s -} - -// SetLastErrorMessage sets the LastErrorMessage field's value. -func (s *ConfigRuleEvaluationStatus) SetLastErrorMessage(v string) *ConfigRuleEvaluationStatus { - s.LastErrorMessage = &v - return s -} - -// SetLastFailedEvaluationTime sets the LastFailedEvaluationTime field's value. -func (s *ConfigRuleEvaluationStatus) SetLastFailedEvaluationTime(v time.Time) *ConfigRuleEvaluationStatus { - s.LastFailedEvaluationTime = &v - return s -} - -// SetLastFailedInvocationTime sets the LastFailedInvocationTime field's value. -func (s *ConfigRuleEvaluationStatus) SetLastFailedInvocationTime(v time.Time) *ConfigRuleEvaluationStatus { - s.LastFailedInvocationTime = &v - return s -} - -// SetLastSuccessfulEvaluationTime sets the LastSuccessfulEvaluationTime field's value. -func (s *ConfigRuleEvaluationStatus) SetLastSuccessfulEvaluationTime(v time.Time) *ConfigRuleEvaluationStatus { - s.LastSuccessfulEvaluationTime = &v - return s -} - -// SetLastSuccessfulInvocationTime sets the LastSuccessfulInvocationTime field's value. -func (s *ConfigRuleEvaluationStatus) SetLastSuccessfulInvocationTime(v time.Time) *ConfigRuleEvaluationStatus { - s.LastSuccessfulInvocationTime = &v - return s -} - -// Provides options for how often AWS Config delivers configuration snapshots -// to the Amazon S3 bucket in your delivery channel. -// -// If you want to create a rule that triggers evaluations for your resources -// when AWS Config delivers the configuration snapshot, see the following: -// -// The frequency for a rule that triggers evaluations for your resources when -// AWS Config delivers the configuration snapshot is set by one of two values, -// depending on which is less frequent: -// -// * The value for the deliveryFrequency parameter within the delivery channel -// configuration, which sets how often AWS Config delivers configuration -// snapshots. This value also sets how often AWS Config invokes evaluations -// for AWS Config rules. -// -// * The value for the MaximumExecutionFrequency parameter, which sets the -// maximum frequency with which AWS Config invokes evaluations for the rule. -// For more information, see ConfigRule. -// -// If the deliveryFrequency value is less frequent than the MaximumExecutionFrequency -// value for a rule, AWS Config invokes the rule only as often as the deliveryFrequency -// value. -// -// For example, you want your rule to run evaluations when AWS Config delivers -// the configuration snapshot. -// -// You specify the MaximumExecutionFrequency value for Six_Hours. -// -// You then specify the delivery channel deliveryFrequency value for TwentyFour_Hours. -// -// Because the value for deliveryFrequency is less frequent than MaximumExecutionFrequency, -// AWS Config invokes evaluations for the rule every 24 hours. -// -// You should set the MaximumExecutionFrequency value to be at least as frequent -// as the deliveryFrequency value. You can view the deliveryFrequency value -// by using the DescribeDeliveryChannnels action. -// -// To update the deliveryFrequency with which AWS Config delivers your configuration -// snapshots, use the PutDeliveryChannel action. -type ConfigSnapshotDeliveryProperties struct { - _ struct{} `type:"structure"` - - // The frequency with which AWS Config delivers configuration snapshots. - DeliveryFrequency *string `locationName:"deliveryFrequency" type:"string" enum:"MaximumExecutionFrequency"` -} - -// String returns the string representation -func (s ConfigSnapshotDeliveryProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigSnapshotDeliveryProperties) GoString() string { - return s.String() -} - -// SetDeliveryFrequency sets the DeliveryFrequency field's value. -func (s *ConfigSnapshotDeliveryProperties) SetDeliveryFrequency(v string) *ConfigSnapshotDeliveryProperties { - s.DeliveryFrequency = &v - return s -} - -// A list that contains the status of the delivery of the configuration stream -// notification to the Amazon SNS topic. -type ConfigStreamDeliveryInfo struct { - _ struct{} `type:"structure"` - - // The error code from the last attempted delivery. - LastErrorCode *string `locationName:"lastErrorCode" type:"string"` - - // The error message from the last attempted delivery. - LastErrorMessage *string `locationName:"lastErrorMessage" type:"string"` - - // Status of the last attempted delivery. - // - // Note Providing an SNS topic on a DeliveryChannel (http://docs.aws.amazon.com/config/latest/APIReference/API_DeliveryChannel.html) - // for AWS Config is optional. If the SNS delivery is turned off, the last status - // will be Not_Applicable. - LastStatus *string `locationName:"lastStatus" type:"string" enum:"DeliveryStatus"` - - // The time from the last status change. - LastStatusChangeTime *time.Time `locationName:"lastStatusChangeTime" type:"timestamp"` -} - -// String returns the string representation -func (s ConfigStreamDeliveryInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigStreamDeliveryInfo) GoString() string { - return s.String() -} - -// SetLastErrorCode sets the LastErrorCode field's value. -func (s *ConfigStreamDeliveryInfo) SetLastErrorCode(v string) *ConfigStreamDeliveryInfo { - s.LastErrorCode = &v - return s -} - -// SetLastErrorMessage sets the LastErrorMessage field's value. -func (s *ConfigStreamDeliveryInfo) SetLastErrorMessage(v string) *ConfigStreamDeliveryInfo { - s.LastErrorMessage = &v - return s -} - -// SetLastStatus sets the LastStatus field's value. -func (s *ConfigStreamDeliveryInfo) SetLastStatus(v string) *ConfigStreamDeliveryInfo { - s.LastStatus = &v - return s -} - -// SetLastStatusChangeTime sets the LastStatusChangeTime field's value. -func (s *ConfigStreamDeliveryInfo) SetLastStatusChangeTime(v time.Time) *ConfigStreamDeliveryInfo { - s.LastStatusChangeTime = &v - return s -} - -// The details about the configuration aggregator, including information about -// source accounts, regions, and metadata of the aggregator. -type ConfigurationAggregator struct { - _ struct{} `type:"structure"` - - // Provides a list of source accounts and regions to be aggregated. - AccountAggregationSources []*AccountAggregationSource `type:"list"` - - // The Amazon Resource Name (ARN) of the aggregator. - ConfigurationAggregatorArn *string `type:"string"` - - // The name of the aggregator. - ConfigurationAggregatorName *string `min:"1" type:"string"` - - // The time stamp when the configuration aggregator was created. - CreationTime *time.Time `type:"timestamp"` - - // The time of the last update. - LastUpdatedTime *time.Time `type:"timestamp"` - - // Provides an organization and list of regions to be aggregated. - OrganizationAggregationSource *OrganizationAggregationSource `type:"structure"` -} - -// String returns the string representation -func (s ConfigurationAggregator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigurationAggregator) GoString() string { - return s.String() -} - -// SetAccountAggregationSources sets the AccountAggregationSources field's value. -func (s *ConfigurationAggregator) SetAccountAggregationSources(v []*AccountAggregationSource) *ConfigurationAggregator { - s.AccountAggregationSources = v - return s -} - -// SetConfigurationAggregatorArn sets the ConfigurationAggregatorArn field's value. -func (s *ConfigurationAggregator) SetConfigurationAggregatorArn(v string) *ConfigurationAggregator { - s.ConfigurationAggregatorArn = &v - return s -} - -// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. -func (s *ConfigurationAggregator) SetConfigurationAggregatorName(v string) *ConfigurationAggregator { - s.ConfigurationAggregatorName = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ConfigurationAggregator) SetCreationTime(v time.Time) *ConfigurationAggregator { - s.CreationTime = &v - return s -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *ConfigurationAggregator) SetLastUpdatedTime(v time.Time) *ConfigurationAggregator { - s.LastUpdatedTime = &v - return s -} - -// SetOrganizationAggregationSource sets the OrganizationAggregationSource field's value. -func (s *ConfigurationAggregator) SetOrganizationAggregationSource(v *OrganizationAggregationSource) *ConfigurationAggregator { - s.OrganizationAggregationSource = v - return s -} - -// A list that contains detailed configurations of a specified resource. -type ConfigurationItem struct { - _ struct{} `type:"structure"` - - // The 12-digit AWS account ID associated with the resource. - AccountId *string `locationName:"accountId" type:"string"` - - // The Amazon Resource Name (ARN) of the resource. - Arn *string `locationName:"arn" type:"string"` - - // The Availability Zone associated with the resource. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The region where the resource resides. - AwsRegion *string `locationName:"awsRegion" min:"1" type:"string"` - - // The description of the resource configuration. - Configuration *string `locationName:"configuration" type:"string"` - - // The time when the configuration recording was initiated. - ConfigurationItemCaptureTime *time.Time `locationName:"configurationItemCaptureTime" type:"timestamp"` - - // Unique MD5 hash that represents the configuration item's state. - // - // You can use MD5 hash to compare the states of two or more configuration items - // that are associated with the same resource. - ConfigurationItemMD5Hash *string `locationName:"configurationItemMD5Hash" type:"string"` - - // The configuration item status. - ConfigurationItemStatus *string `locationName:"configurationItemStatus" type:"string" enum:"ConfigurationItemStatus"` - - // An identifier that indicates the ordering of the configuration items of a - // resource. - ConfigurationStateId *string `locationName:"configurationStateId" type:"string"` - - // A list of CloudTrail event IDs. - // - // A populated field indicates that the current configuration was initiated - // by the events recorded in the CloudTrail log. For more information about - // CloudTrail, see What Is AWS CloudTrail (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). - // - // An empty field indicates that the current configuration was not initiated - // by any event. - RelatedEvents []*string `locationName:"relatedEvents" type:"list"` - - // A list of related AWS resources. - Relationships []*Relationship `locationName:"relationships" type:"list"` - - // The time stamp when the resource was created. - ResourceCreationTime *time.Time `locationName:"resourceCreationTime" type:"timestamp"` - - // The ID of the resource (for example, sg-xxxxxx). - ResourceId *string `locationName:"resourceId" min:"1" type:"string"` - - // The custom name of the resource, if available. - ResourceName *string `locationName:"resourceName" type:"string"` - - // The type of AWS resource. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // Configuration attributes that AWS Config returns for certain resource types - // to supplement the information returned for the configuration parameter. - SupplementaryConfiguration map[string]*string `locationName:"supplementaryConfiguration" type:"map"` - - // A mapping of key value tags associated with the resource. - Tags map[string]*string `locationName:"tags" type:"map"` - - // The version number of the resource configuration. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s ConfigurationItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigurationItem) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *ConfigurationItem) SetAccountId(v string) *ConfigurationItem { - s.AccountId = &v - return s -} - -// SetArn sets the Arn field's value. -func (s *ConfigurationItem) SetArn(v string) *ConfigurationItem { - s.Arn = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ConfigurationItem) SetAvailabilityZone(v string) *ConfigurationItem { - s.AvailabilityZone = &v - return s -} - -// SetAwsRegion sets the AwsRegion field's value. -func (s *ConfigurationItem) SetAwsRegion(v string) *ConfigurationItem { - s.AwsRegion = &v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *ConfigurationItem) SetConfiguration(v string) *ConfigurationItem { - s.Configuration = &v - return s -} - -// SetConfigurationItemCaptureTime sets the ConfigurationItemCaptureTime field's value. -func (s *ConfigurationItem) SetConfigurationItemCaptureTime(v time.Time) *ConfigurationItem { - s.ConfigurationItemCaptureTime = &v - return s -} - -// SetConfigurationItemMD5Hash sets the ConfigurationItemMD5Hash field's value. -func (s *ConfigurationItem) SetConfigurationItemMD5Hash(v string) *ConfigurationItem { - s.ConfigurationItemMD5Hash = &v - return s -} - -// SetConfigurationItemStatus sets the ConfigurationItemStatus field's value. -func (s *ConfigurationItem) SetConfigurationItemStatus(v string) *ConfigurationItem { - s.ConfigurationItemStatus = &v - return s -} - -// SetConfigurationStateId sets the ConfigurationStateId field's value. -func (s *ConfigurationItem) SetConfigurationStateId(v string) *ConfigurationItem { - s.ConfigurationStateId = &v - return s -} - -// SetRelatedEvents sets the RelatedEvents field's value. -func (s *ConfigurationItem) SetRelatedEvents(v []*string) *ConfigurationItem { - s.RelatedEvents = v - return s -} - -// SetRelationships sets the Relationships field's value. -func (s *ConfigurationItem) SetRelationships(v []*Relationship) *ConfigurationItem { - s.Relationships = v - return s -} - -// SetResourceCreationTime sets the ResourceCreationTime field's value. -func (s *ConfigurationItem) SetResourceCreationTime(v time.Time) *ConfigurationItem { - s.ResourceCreationTime = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ConfigurationItem) SetResourceId(v string) *ConfigurationItem { - s.ResourceId = &v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *ConfigurationItem) SetResourceName(v string) *ConfigurationItem { - s.ResourceName = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ConfigurationItem) SetResourceType(v string) *ConfigurationItem { - s.ResourceType = &v - return s -} - -// SetSupplementaryConfiguration sets the SupplementaryConfiguration field's value. -func (s *ConfigurationItem) SetSupplementaryConfiguration(v map[string]*string) *ConfigurationItem { - s.SupplementaryConfiguration = v - return s -} - -// SetTags sets the Tags field's value. -func (s *ConfigurationItem) SetTags(v map[string]*string) *ConfigurationItem { - s.Tags = v - return s -} - -// SetVersion sets the Version field's value. -func (s *ConfigurationItem) SetVersion(v string) *ConfigurationItem { - s.Version = &v - return s -} - -// An object that represents the recording of configuration changes of an AWS -// resource. -type ConfigurationRecorder struct { - _ struct{} `type:"structure"` - - // The name of the recorder. By default, AWS Config automatically assigns the - // name "default" when creating the configuration recorder. You cannot change - // the assigned name. - Name *string `locationName:"name" min:"1" type:"string"` - - // Specifies the types of AWS resources for which AWS Config records configuration - // changes. - RecordingGroup *RecordingGroup `locationName:"recordingGroup" type:"structure"` - - // Amazon Resource Name (ARN) of the IAM role used to describe the AWS resources - // associated with the account. - RoleARN *string `locationName:"roleARN" type:"string"` -} - -// String returns the string representation -func (s ConfigurationRecorder) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigurationRecorder) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfigurationRecorder) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfigurationRecorder"} - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *ConfigurationRecorder) SetName(v string) *ConfigurationRecorder { - s.Name = &v - return s -} - -// SetRecordingGroup sets the RecordingGroup field's value. -func (s *ConfigurationRecorder) SetRecordingGroup(v *RecordingGroup) *ConfigurationRecorder { - s.RecordingGroup = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *ConfigurationRecorder) SetRoleARN(v string) *ConfigurationRecorder { - s.RoleARN = &v - return s -} - -// The current status of the configuration recorder. -type ConfigurationRecorderStatus struct { - _ struct{} `type:"structure"` - - // The error code indicating that the recording failed. - LastErrorCode *string `locationName:"lastErrorCode" type:"string"` - - // The message indicating that the recording failed due to an error. - LastErrorMessage *string `locationName:"lastErrorMessage" type:"string"` - - // The time the recorder was last started. - LastStartTime *time.Time `locationName:"lastStartTime" type:"timestamp"` - - // The last (previous) status of the recorder. - LastStatus *string `locationName:"lastStatus" type:"string" enum:"RecorderStatus"` - - // The time when the status was last changed. - LastStatusChangeTime *time.Time `locationName:"lastStatusChangeTime" type:"timestamp"` - - // The time the recorder was last stopped. - LastStopTime *time.Time `locationName:"lastStopTime" type:"timestamp"` - - // The name of the configuration recorder. - Name *string `locationName:"name" type:"string"` - - // Specifies whether or not the recorder is currently recording. - Recording *bool `locationName:"recording" type:"boolean"` -} - -// String returns the string representation -func (s ConfigurationRecorderStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigurationRecorderStatus) GoString() string { - return s.String() -} - -// SetLastErrorCode sets the LastErrorCode field's value. -func (s *ConfigurationRecorderStatus) SetLastErrorCode(v string) *ConfigurationRecorderStatus { - s.LastErrorCode = &v - return s -} - -// SetLastErrorMessage sets the LastErrorMessage field's value. -func (s *ConfigurationRecorderStatus) SetLastErrorMessage(v string) *ConfigurationRecorderStatus { - s.LastErrorMessage = &v - return s -} - -// SetLastStartTime sets the LastStartTime field's value. -func (s *ConfigurationRecorderStatus) SetLastStartTime(v time.Time) *ConfigurationRecorderStatus { - s.LastStartTime = &v - return s -} - -// SetLastStatus sets the LastStatus field's value. -func (s *ConfigurationRecorderStatus) SetLastStatus(v string) *ConfigurationRecorderStatus { - s.LastStatus = &v - return s -} - -// SetLastStatusChangeTime sets the LastStatusChangeTime field's value. -func (s *ConfigurationRecorderStatus) SetLastStatusChangeTime(v time.Time) *ConfigurationRecorderStatus { - s.LastStatusChangeTime = &v - return s -} - -// SetLastStopTime sets the LastStopTime field's value. -func (s *ConfigurationRecorderStatus) SetLastStopTime(v time.Time) *ConfigurationRecorderStatus { - s.LastStopTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *ConfigurationRecorderStatus) SetName(v string) *ConfigurationRecorderStatus { - s.Name = &v - return s -} - -// SetRecording sets the Recording field's value. -func (s *ConfigurationRecorderStatus) SetRecording(v bool) *ConfigurationRecorderStatus { - s.Recording = &v - return s -} - -type DeleteAggregationAuthorizationInput struct { - _ struct{} `type:"structure"` - - // The 12-digit account ID of the account authorized to aggregate data. - // - // AuthorizedAccountId is a required field - AuthorizedAccountId *string `type:"string" required:"true"` - - // The region authorized to collect aggregated data. - // - // AuthorizedAwsRegion is a required field - AuthorizedAwsRegion *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAggregationAuthorizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAggregationAuthorizationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAggregationAuthorizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAggregationAuthorizationInput"} - if s.AuthorizedAccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizedAccountId")) - } - if s.AuthorizedAwsRegion == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizedAwsRegion")) - } - if s.AuthorizedAwsRegion != nil && len(*s.AuthorizedAwsRegion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizedAwsRegion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthorizedAccountId sets the AuthorizedAccountId field's value. -func (s *DeleteAggregationAuthorizationInput) SetAuthorizedAccountId(v string) *DeleteAggregationAuthorizationInput { - s.AuthorizedAccountId = &v - return s -} - -// SetAuthorizedAwsRegion sets the AuthorizedAwsRegion field's value. -func (s *DeleteAggregationAuthorizationInput) SetAuthorizedAwsRegion(v string) *DeleteAggregationAuthorizationInput { - s.AuthorizedAwsRegion = &v - return s -} - -type DeleteAggregationAuthorizationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAggregationAuthorizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAggregationAuthorizationOutput) GoString() string { - return s.String() -} - -type DeleteConfigRuleInput struct { - _ struct{} `type:"structure"` - - // The name of the AWS Config rule that you want to delete. - // - // ConfigRuleName is a required field - ConfigRuleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteConfigRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConfigRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteConfigRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteConfigRuleInput"} - if s.ConfigRuleName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) - } - if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigRuleName sets the ConfigRuleName field's value. -func (s *DeleteConfigRuleInput) SetConfigRuleName(v string) *DeleteConfigRuleInput { - s.ConfigRuleName = &v - return s -} - -type DeleteConfigRuleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteConfigRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConfigRuleOutput) GoString() string { - return s.String() -} - -type DeleteConfigurationAggregatorInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration aggregator. - // - // ConfigurationAggregatorName is a required field - ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteConfigurationAggregatorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConfigurationAggregatorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteConfigurationAggregatorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteConfigurationAggregatorInput"} - if s.ConfigurationAggregatorName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) - } - if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. -func (s *DeleteConfigurationAggregatorInput) SetConfigurationAggregatorName(v string) *DeleteConfigurationAggregatorInput { - s.ConfigurationAggregatorName = &v - return s -} - -type DeleteConfigurationAggregatorOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteConfigurationAggregatorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConfigurationAggregatorOutput) GoString() string { - return s.String() -} - -// The request object for the DeleteConfigurationRecorder action. -type DeleteConfigurationRecorderInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration recorder to be deleted. You can retrieve the - // name of your configuration recorder by using the DescribeConfigurationRecorders - // action. - // - // ConfigurationRecorderName is a required field - ConfigurationRecorderName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteConfigurationRecorderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConfigurationRecorderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteConfigurationRecorderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteConfigurationRecorderInput"} - if s.ConfigurationRecorderName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationRecorderName")) - } - if s.ConfigurationRecorderName != nil && len(*s.ConfigurationRecorderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationRecorderName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationRecorderName sets the ConfigurationRecorderName field's value. -func (s *DeleteConfigurationRecorderInput) SetConfigurationRecorderName(v string) *DeleteConfigurationRecorderInput { - s.ConfigurationRecorderName = &v - return s -} - -type DeleteConfigurationRecorderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteConfigurationRecorderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConfigurationRecorderOutput) GoString() string { - return s.String() -} - -// The input for the DeleteDeliveryChannel action. The action accepts the following -// data, in JSON format. -type DeleteDeliveryChannelInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery channel to delete. - // - // DeliveryChannelName is a required field - DeliveryChannelName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDeliveryChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDeliveryChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDeliveryChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDeliveryChannelInput"} - if s.DeliveryChannelName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryChannelName")) - } - if s.DeliveryChannelName != nil && len(*s.DeliveryChannelName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryChannelName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryChannelName sets the DeliveryChannelName field's value. -func (s *DeleteDeliveryChannelInput) SetDeliveryChannelName(v string) *DeleteDeliveryChannelInput { - s.DeliveryChannelName = &v - return s -} - -type DeleteDeliveryChannelOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDeliveryChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDeliveryChannelOutput) GoString() string { - return s.String() -} - -type DeleteEvaluationResultsInput struct { - _ struct{} `type:"structure"` - - // The name of the AWS Config rule for which you want to delete the evaluation - // results. - // - // ConfigRuleName is a required field - ConfigRuleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEvaluationResultsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEvaluationResultsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEvaluationResultsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEvaluationResultsInput"} - if s.ConfigRuleName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) - } - if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigRuleName sets the ConfigRuleName field's value. -func (s *DeleteEvaluationResultsInput) SetConfigRuleName(v string) *DeleteEvaluationResultsInput { - s.ConfigRuleName = &v - return s -} - -// The output when you delete the evaluation results for the specified AWS Config -// rule. -type DeleteEvaluationResultsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteEvaluationResultsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEvaluationResultsOutput) GoString() string { - return s.String() -} - -type DeletePendingAggregationRequestInput struct { - _ struct{} `type:"structure"` - - // The 12-digit account ID of the account requesting to aggregate data. - // - // RequesterAccountId is a required field - RequesterAccountId *string `type:"string" required:"true"` - - // The region requesting to aggregate data. - // - // RequesterAwsRegion is a required field - RequesterAwsRegion *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePendingAggregationRequestInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePendingAggregationRequestInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePendingAggregationRequestInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePendingAggregationRequestInput"} - if s.RequesterAccountId == nil { - invalidParams.Add(request.NewErrParamRequired("RequesterAccountId")) - } - if s.RequesterAwsRegion == nil { - invalidParams.Add(request.NewErrParamRequired("RequesterAwsRegion")) - } - if s.RequesterAwsRegion != nil && len(*s.RequesterAwsRegion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RequesterAwsRegion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRequesterAccountId sets the RequesterAccountId field's value. -func (s *DeletePendingAggregationRequestInput) SetRequesterAccountId(v string) *DeletePendingAggregationRequestInput { - s.RequesterAccountId = &v - return s -} - -// SetRequesterAwsRegion sets the RequesterAwsRegion field's value. -func (s *DeletePendingAggregationRequestInput) SetRequesterAwsRegion(v string) *DeletePendingAggregationRequestInput { - s.RequesterAwsRegion = &v - return s -} - -type DeletePendingAggregationRequestOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePendingAggregationRequestOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePendingAggregationRequestOutput) GoString() string { - return s.String() -} - -type DeleteRetentionConfigurationInput struct { - _ struct{} `type:"structure"` - - // The name of the retention configuration to delete. - // - // RetentionConfigurationName is a required field - RetentionConfigurationName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRetentionConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRetentionConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRetentionConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRetentionConfigurationInput"} - if s.RetentionConfigurationName == nil { - invalidParams.Add(request.NewErrParamRequired("RetentionConfigurationName")) - } - if s.RetentionConfigurationName != nil && len(*s.RetentionConfigurationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RetentionConfigurationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRetentionConfigurationName sets the RetentionConfigurationName field's value. -func (s *DeleteRetentionConfigurationInput) SetRetentionConfigurationName(v string) *DeleteRetentionConfigurationInput { - s.RetentionConfigurationName = &v - return s -} - -type DeleteRetentionConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRetentionConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRetentionConfigurationOutput) GoString() string { - return s.String() -} - -// The input for the DeliverConfigSnapshot action. -type DeliverConfigSnapshotInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery channel through which the snapshot is delivered. - // - // DeliveryChannelName is a required field - DeliveryChannelName *string `locationName:"deliveryChannelName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeliverConfigSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeliverConfigSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeliverConfigSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeliverConfigSnapshotInput"} - if s.DeliveryChannelName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryChannelName")) - } - if s.DeliveryChannelName != nil && len(*s.DeliveryChannelName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryChannelName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryChannelName sets the DeliveryChannelName field's value. -func (s *DeliverConfigSnapshotInput) SetDeliveryChannelName(v string) *DeliverConfigSnapshotInput { - s.DeliveryChannelName = &v - return s -} - -// The output for the DeliverConfigSnapshot action, in JSON format. -type DeliverConfigSnapshotOutput struct { - _ struct{} `type:"structure"` - - // The ID of the snapshot that is being created. - ConfigSnapshotId *string `locationName:"configSnapshotId" type:"string"` -} - -// String returns the string representation -func (s DeliverConfigSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeliverConfigSnapshotOutput) GoString() string { - return s.String() -} - -// SetConfigSnapshotId sets the ConfigSnapshotId field's value. -func (s *DeliverConfigSnapshotOutput) SetConfigSnapshotId(v string) *DeliverConfigSnapshotOutput { - s.ConfigSnapshotId = &v - return s -} - -// The channel through which AWS Config delivers notifications and updated configuration -// states. -type DeliveryChannel struct { - _ struct{} `type:"structure"` - - // The options for how often AWS Config delivers configuration snapshots to - // the Amazon S3 bucket. - ConfigSnapshotDeliveryProperties *ConfigSnapshotDeliveryProperties `locationName:"configSnapshotDeliveryProperties" type:"structure"` - - // The name of the delivery channel. By default, AWS Config assigns the name - // "default" when creating the delivery channel. To change the delivery channel - // name, you must use the DeleteDeliveryChannel action to delete your current - // delivery channel, and then you must use the PutDeliveryChannel command to - // create a delivery channel that has the desired name. - Name *string `locationName:"name" min:"1" type:"string"` - - // The name of the Amazon S3 bucket to which AWS Config delivers configuration - // snapshots and configuration history files. - // - // If you specify a bucket that belongs to another AWS account, that bucket - // must have policies that grant access permissions to AWS Config. For more - // information, see Permissions for the Amazon S3 Bucket (http://docs.aws.amazon.com/config/latest/developerguide/s3-bucket-policy.html) - // in the AWS Config Developer Guide. - S3BucketName *string `locationName:"s3BucketName" type:"string"` - - // The prefix for the specified Amazon S3 bucket. - S3KeyPrefix *string `locationName:"s3KeyPrefix" type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic to which AWS Config - // sends notifications about configuration changes. - // - // If you choose a topic from another account, the topic must have policies - // that grant access permissions to AWS Config. For more information, see Permissions - // for the Amazon SNS Topic (http://docs.aws.amazon.com/config/latest/developerguide/sns-topic-policy.html) - // in the AWS Config Developer Guide. - SnsTopicARN *string `locationName:"snsTopicARN" type:"string"` -} - -// String returns the string representation -func (s DeliveryChannel) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeliveryChannel) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeliveryChannel) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeliveryChannel"} - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigSnapshotDeliveryProperties sets the ConfigSnapshotDeliveryProperties field's value. -func (s *DeliveryChannel) SetConfigSnapshotDeliveryProperties(v *ConfigSnapshotDeliveryProperties) *DeliveryChannel { - s.ConfigSnapshotDeliveryProperties = v - return s -} - -// SetName sets the Name field's value. -func (s *DeliveryChannel) SetName(v string) *DeliveryChannel { - s.Name = &v - return s -} - -// SetS3BucketName sets the S3BucketName field's value. -func (s *DeliveryChannel) SetS3BucketName(v string) *DeliveryChannel { - s.S3BucketName = &v - return s -} - -// SetS3KeyPrefix sets the S3KeyPrefix field's value. -func (s *DeliveryChannel) SetS3KeyPrefix(v string) *DeliveryChannel { - s.S3KeyPrefix = &v - return s -} - -// SetSnsTopicARN sets the SnsTopicARN field's value. -func (s *DeliveryChannel) SetSnsTopicARN(v string) *DeliveryChannel { - s.SnsTopicARN = &v - return s -} - -// The status of a specified delivery channel. -// -// Valid values: Success | Failure -type DeliveryChannelStatus struct { - _ struct{} `type:"structure"` - - // A list that contains the status of the delivery of the configuration history - // to the specified Amazon S3 bucket. - ConfigHistoryDeliveryInfo *ConfigExportDeliveryInfo `locationName:"configHistoryDeliveryInfo" type:"structure"` - - // A list containing the status of the delivery of the snapshot to the specified - // Amazon S3 bucket. - ConfigSnapshotDeliveryInfo *ConfigExportDeliveryInfo `locationName:"configSnapshotDeliveryInfo" type:"structure"` - - // A list containing the status of the delivery of the configuration stream - // notification to the specified Amazon SNS topic. - ConfigStreamDeliveryInfo *ConfigStreamDeliveryInfo `locationName:"configStreamDeliveryInfo" type:"structure"` - - // The name of the delivery channel. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s DeliveryChannelStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeliveryChannelStatus) GoString() string { - return s.String() -} - -// SetConfigHistoryDeliveryInfo sets the ConfigHistoryDeliveryInfo field's value. -func (s *DeliveryChannelStatus) SetConfigHistoryDeliveryInfo(v *ConfigExportDeliveryInfo) *DeliveryChannelStatus { - s.ConfigHistoryDeliveryInfo = v - return s -} - -// SetConfigSnapshotDeliveryInfo sets the ConfigSnapshotDeliveryInfo field's value. -func (s *DeliveryChannelStatus) SetConfigSnapshotDeliveryInfo(v *ConfigExportDeliveryInfo) *DeliveryChannelStatus { - s.ConfigSnapshotDeliveryInfo = v - return s -} - -// SetConfigStreamDeliveryInfo sets the ConfigStreamDeliveryInfo field's value. -func (s *DeliveryChannelStatus) SetConfigStreamDeliveryInfo(v *ConfigStreamDeliveryInfo) *DeliveryChannelStatus { - s.ConfigStreamDeliveryInfo = v - return s -} - -// SetName sets the Name field's value. -func (s *DeliveryChannelStatus) SetName(v string) *DeliveryChannelStatus { - s.Name = &v - return s -} - -type DescribeAggregateComplianceByConfigRulesInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration aggregator. - // - // ConfigurationAggregatorName is a required field - ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` - - // Filters the results by ConfigRuleComplianceFilters object. - Filters *ConfigRuleComplianceFilters `type:"structure"` - - // The maximum number of evaluation results returned on each page. The default - // is maximum. If you specify 0, AWS Config uses the default. - Limit *int64 `type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAggregateComplianceByConfigRulesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAggregateComplianceByConfigRulesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAggregateComplianceByConfigRulesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAggregateComplianceByConfigRulesInput"} - if s.ConfigurationAggregatorName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) - } - if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) - } - if s.Filters != nil { - if err := s.Filters.Validate(); err != nil { - invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. -func (s *DescribeAggregateComplianceByConfigRulesInput) SetConfigurationAggregatorName(v string) *DescribeAggregateComplianceByConfigRulesInput { - s.ConfigurationAggregatorName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeAggregateComplianceByConfigRulesInput) SetFilters(v *ConfigRuleComplianceFilters) *DescribeAggregateComplianceByConfigRulesInput { - s.Filters = v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeAggregateComplianceByConfigRulesInput) SetLimit(v int64) *DescribeAggregateComplianceByConfigRulesInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAggregateComplianceByConfigRulesInput) SetNextToken(v string) *DescribeAggregateComplianceByConfigRulesInput { - s.NextToken = &v - return s -} - -type DescribeAggregateComplianceByConfigRulesOutput struct { - _ struct{} `type:"structure"` - - // Returns a list of AggregateComplianceByConfigRule object. - AggregateComplianceByConfigRules []*AggregateComplianceByConfigRule `type:"list"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAggregateComplianceByConfigRulesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAggregateComplianceByConfigRulesOutput) GoString() string { - return s.String() -} - -// SetAggregateComplianceByConfigRules sets the AggregateComplianceByConfigRules field's value. -func (s *DescribeAggregateComplianceByConfigRulesOutput) SetAggregateComplianceByConfigRules(v []*AggregateComplianceByConfigRule) *DescribeAggregateComplianceByConfigRulesOutput { - s.AggregateComplianceByConfigRules = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAggregateComplianceByConfigRulesOutput) SetNextToken(v string) *DescribeAggregateComplianceByConfigRulesOutput { - s.NextToken = &v - return s -} - -type DescribeAggregationAuthorizationsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of AggregationAuthorizations returned on each page. The - // default is maximum. If you specify 0, AWS Config uses the default. - Limit *int64 `type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAggregationAuthorizationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAggregationAuthorizationsInput) GoString() string { - return s.String() -} - -// SetLimit sets the Limit field's value. -func (s *DescribeAggregationAuthorizationsInput) SetLimit(v int64) *DescribeAggregationAuthorizationsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAggregationAuthorizationsInput) SetNextToken(v string) *DescribeAggregationAuthorizationsInput { - s.NextToken = &v - return s -} - -type DescribeAggregationAuthorizationsOutput struct { - _ struct{} `type:"structure"` - - // Returns a list of authorizations granted to various aggregator accounts and - // regions. - AggregationAuthorizations []*AggregationAuthorization `type:"list"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAggregationAuthorizationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAggregationAuthorizationsOutput) GoString() string { - return s.String() -} - -// SetAggregationAuthorizations sets the AggregationAuthorizations field's value. -func (s *DescribeAggregationAuthorizationsOutput) SetAggregationAuthorizations(v []*AggregationAuthorization) *DescribeAggregationAuthorizationsOutput { - s.AggregationAuthorizations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAggregationAuthorizationsOutput) SetNextToken(v string) *DescribeAggregationAuthorizationsOutput { - s.NextToken = &v - return s -} - -type DescribeComplianceByConfigRuleInput struct { - _ struct{} `type:"structure"` - - // Filters the results by compliance. - // - // The allowed values are COMPLIANT, NON_COMPLIANT, and INSUFFICIENT_DATA. - ComplianceTypes []*string `type:"list"` - - // Specify one or more AWS Config rule names to filter the results by rule. - ConfigRuleNames []*string `type:"list"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeComplianceByConfigRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeComplianceByConfigRuleInput) GoString() string { - return s.String() -} - -// SetComplianceTypes sets the ComplianceTypes field's value. -func (s *DescribeComplianceByConfigRuleInput) SetComplianceTypes(v []*string) *DescribeComplianceByConfigRuleInput { - s.ComplianceTypes = v - return s -} - -// SetConfigRuleNames sets the ConfigRuleNames field's value. -func (s *DescribeComplianceByConfigRuleInput) SetConfigRuleNames(v []*string) *DescribeComplianceByConfigRuleInput { - s.ConfigRuleNames = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeComplianceByConfigRuleInput) SetNextToken(v string) *DescribeComplianceByConfigRuleInput { - s.NextToken = &v - return s -} - -type DescribeComplianceByConfigRuleOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether each of the specified AWS Config rules is compliant. - ComplianceByConfigRules []*ComplianceByConfigRule `type:"list"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeComplianceByConfigRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeComplianceByConfigRuleOutput) GoString() string { - return s.String() -} - -// SetComplianceByConfigRules sets the ComplianceByConfigRules field's value. -func (s *DescribeComplianceByConfigRuleOutput) SetComplianceByConfigRules(v []*ComplianceByConfigRule) *DescribeComplianceByConfigRuleOutput { - s.ComplianceByConfigRules = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeComplianceByConfigRuleOutput) SetNextToken(v string) *DescribeComplianceByConfigRuleOutput { - s.NextToken = &v - return s -} - -type DescribeComplianceByResourceInput struct { - _ struct{} `type:"structure"` - - // Filters the results by compliance. - // - // The allowed values are COMPLIANT and NON_COMPLIANT. - ComplianceTypes []*string `type:"list"` - - // The maximum number of evaluation results returned on each page. The default - // is 10. You cannot specify a number greater than 100. If you specify 0, AWS - // Config uses the default. - Limit *int64 `type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` - - // The ID of the AWS resource for which you want compliance information. You - // can specify only one resource ID. If you specify a resource ID, you must - // also specify a type for ResourceType. - ResourceId *string `min:"1" type:"string"` - - // The types of AWS resources for which you want compliance information (for - // example, AWS::EC2::Instance). For this action, you can specify that the resource - // type is an AWS account by specifying AWS::::Account. - ResourceType *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeComplianceByResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeComplianceByResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeComplianceByResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeComplianceByResourceInput"} - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ResourceType != nil && len(*s.ResourceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComplianceTypes sets the ComplianceTypes field's value. -func (s *DescribeComplianceByResourceInput) SetComplianceTypes(v []*string) *DescribeComplianceByResourceInput { - s.ComplianceTypes = v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeComplianceByResourceInput) SetLimit(v int64) *DescribeComplianceByResourceInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeComplianceByResourceInput) SetNextToken(v string) *DescribeComplianceByResourceInput { - s.NextToken = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *DescribeComplianceByResourceInput) SetResourceId(v string) *DescribeComplianceByResourceInput { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *DescribeComplianceByResourceInput) SetResourceType(v string) *DescribeComplianceByResourceInput { - s.ResourceType = &v - return s -} - -type DescribeComplianceByResourceOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether the specified AWS resource complies with all of the AWS - // Config rules that evaluate it. - ComplianceByResources []*ComplianceByResource `type:"list"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeComplianceByResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeComplianceByResourceOutput) GoString() string { - return s.String() -} - -// SetComplianceByResources sets the ComplianceByResources field's value. -func (s *DescribeComplianceByResourceOutput) SetComplianceByResources(v []*ComplianceByResource) *DescribeComplianceByResourceOutput { - s.ComplianceByResources = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeComplianceByResourceOutput) SetNextToken(v string) *DescribeComplianceByResourceOutput { - s.NextToken = &v - return s -} - -type DescribeConfigRuleEvaluationStatusInput struct { - _ struct{} `type:"structure"` - - // The name of the AWS managed Config rules for which you want status information. - // If you do not specify any names, AWS Config returns status information for - // all AWS managed Config rules that you use. - ConfigRuleNames []*string `type:"list"` - - // The number of rule evaluation results that you want returned. - // - // This parameter is required if the rule limit for your account is more than - // the default of 50 rules. - // - // For information about requesting a rule limit increase, see AWS Config Limits - // (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_config) - // in the AWS General Reference Guide. - Limit *int64 `type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeConfigRuleEvaluationStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigRuleEvaluationStatusInput) GoString() string { - return s.String() -} - -// SetConfigRuleNames sets the ConfigRuleNames field's value. -func (s *DescribeConfigRuleEvaluationStatusInput) SetConfigRuleNames(v []*string) *DescribeConfigRuleEvaluationStatusInput { - s.ConfigRuleNames = v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeConfigRuleEvaluationStatusInput) SetLimit(v int64) *DescribeConfigRuleEvaluationStatusInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeConfigRuleEvaluationStatusInput) SetNextToken(v string) *DescribeConfigRuleEvaluationStatusInput { - s.NextToken = &v - return s -} - -type DescribeConfigRuleEvaluationStatusOutput struct { - _ struct{} `type:"structure"` - - // Status information about your AWS managed Config rules. - ConfigRulesEvaluationStatus []*ConfigRuleEvaluationStatus `type:"list"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeConfigRuleEvaluationStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigRuleEvaluationStatusOutput) GoString() string { - return s.String() -} - -// SetConfigRulesEvaluationStatus sets the ConfigRulesEvaluationStatus field's value. -func (s *DescribeConfigRuleEvaluationStatusOutput) SetConfigRulesEvaluationStatus(v []*ConfigRuleEvaluationStatus) *DescribeConfigRuleEvaluationStatusOutput { - s.ConfigRulesEvaluationStatus = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeConfigRuleEvaluationStatusOutput) SetNextToken(v string) *DescribeConfigRuleEvaluationStatusOutput { - s.NextToken = &v - return s -} - -type DescribeConfigRulesInput struct { - _ struct{} `type:"structure"` - - // The names of the AWS Config rules for which you want details. If you do not - // specify any names, AWS Config returns details for all your rules. - ConfigRuleNames []*string `type:"list"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeConfigRulesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigRulesInput) GoString() string { - return s.String() -} - -// SetConfigRuleNames sets the ConfigRuleNames field's value. -func (s *DescribeConfigRulesInput) SetConfigRuleNames(v []*string) *DescribeConfigRulesInput { - s.ConfigRuleNames = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeConfigRulesInput) SetNextToken(v string) *DescribeConfigRulesInput { - s.NextToken = &v - return s -} - -type DescribeConfigRulesOutput struct { - _ struct{} `type:"structure"` - - // The details about your AWS Config rules. - ConfigRules []*ConfigRule `type:"list"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeConfigRulesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigRulesOutput) GoString() string { - return s.String() -} - -// SetConfigRules sets the ConfigRules field's value. -func (s *DescribeConfigRulesOutput) SetConfigRules(v []*ConfigRule) *DescribeConfigRulesOutput { - s.ConfigRules = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeConfigRulesOutput) SetNextToken(v string) *DescribeConfigRulesOutput { - s.NextToken = &v - return s -} - -type DescribeConfigurationAggregatorSourcesStatusInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration aggregator. - // - // ConfigurationAggregatorName is a required field - ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` - - // The maximum number of AggregatorSourceStatus returned on each page. The default - // is maximum. If you specify 0, AWS Config uses the default. - Limit *int64 `type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` - - // Filters the status type. - // - // * Valid value FAILED indicates errors while moving data. - // - // * Valid value SUCCEEDED indicates the data was successfully moved. - // - // * Valid value OUTDATED indicates the data is not the most recent. - UpdateStatus []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s DescribeConfigurationAggregatorSourcesStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationAggregatorSourcesStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeConfigurationAggregatorSourcesStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeConfigurationAggregatorSourcesStatusInput"} - if s.ConfigurationAggregatorName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) - } - if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) - } - if s.UpdateStatus != nil && len(s.UpdateStatus) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UpdateStatus", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. -func (s *DescribeConfigurationAggregatorSourcesStatusInput) SetConfigurationAggregatorName(v string) *DescribeConfigurationAggregatorSourcesStatusInput { - s.ConfigurationAggregatorName = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeConfigurationAggregatorSourcesStatusInput) SetLimit(v int64) *DescribeConfigurationAggregatorSourcesStatusInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeConfigurationAggregatorSourcesStatusInput) SetNextToken(v string) *DescribeConfigurationAggregatorSourcesStatusInput { - s.NextToken = &v - return s -} - -// SetUpdateStatus sets the UpdateStatus field's value. -func (s *DescribeConfigurationAggregatorSourcesStatusInput) SetUpdateStatus(v []*string) *DescribeConfigurationAggregatorSourcesStatusInput { - s.UpdateStatus = v - return s -} - -type DescribeConfigurationAggregatorSourcesStatusOutput struct { - _ struct{} `type:"structure"` - - // Returns an AggregatedSourceStatus object. - AggregatedSourceStatusList []*AggregatedSourceStatus `type:"list"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeConfigurationAggregatorSourcesStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationAggregatorSourcesStatusOutput) GoString() string { - return s.String() -} - -// SetAggregatedSourceStatusList sets the AggregatedSourceStatusList field's value. -func (s *DescribeConfigurationAggregatorSourcesStatusOutput) SetAggregatedSourceStatusList(v []*AggregatedSourceStatus) *DescribeConfigurationAggregatorSourcesStatusOutput { - s.AggregatedSourceStatusList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeConfigurationAggregatorSourcesStatusOutput) SetNextToken(v string) *DescribeConfigurationAggregatorSourcesStatusOutput { - s.NextToken = &v - return s -} - -type DescribeConfigurationAggregatorsInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration aggregators. - ConfigurationAggregatorNames []*string `type:"list"` - - // The maximum number of configuration aggregators returned on each page. The - // default is maximum. If you specify 0, AWS Config uses the default. - Limit *int64 `type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeConfigurationAggregatorsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationAggregatorsInput) GoString() string { - return s.String() -} - -// SetConfigurationAggregatorNames sets the ConfigurationAggregatorNames field's value. -func (s *DescribeConfigurationAggregatorsInput) SetConfigurationAggregatorNames(v []*string) *DescribeConfigurationAggregatorsInput { - s.ConfigurationAggregatorNames = v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeConfigurationAggregatorsInput) SetLimit(v int64) *DescribeConfigurationAggregatorsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeConfigurationAggregatorsInput) SetNextToken(v string) *DescribeConfigurationAggregatorsInput { - s.NextToken = &v - return s -} - -type DescribeConfigurationAggregatorsOutput struct { - _ struct{} `type:"structure"` - - // Returns a ConfigurationAggregators object. - ConfigurationAggregators []*ConfigurationAggregator `type:"list"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeConfigurationAggregatorsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationAggregatorsOutput) GoString() string { - return s.String() -} - -// SetConfigurationAggregators sets the ConfigurationAggregators field's value. -func (s *DescribeConfigurationAggregatorsOutput) SetConfigurationAggregators(v []*ConfigurationAggregator) *DescribeConfigurationAggregatorsOutput { - s.ConfigurationAggregators = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeConfigurationAggregatorsOutput) SetNextToken(v string) *DescribeConfigurationAggregatorsOutput { - s.NextToken = &v - return s -} - -// The input for the DescribeConfigurationRecorderStatus action. -type DescribeConfigurationRecorderStatusInput struct { - _ struct{} `type:"structure"` - - // The name(s) of the configuration recorder. If the name is not specified, - // the action returns the current status of all the configuration recorders - // associated with the account. - ConfigurationRecorderNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeConfigurationRecorderStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationRecorderStatusInput) GoString() string { - return s.String() -} - -// SetConfigurationRecorderNames sets the ConfigurationRecorderNames field's value. -func (s *DescribeConfigurationRecorderStatusInput) SetConfigurationRecorderNames(v []*string) *DescribeConfigurationRecorderStatusInput { - s.ConfigurationRecorderNames = v - return s -} - -// The output for the DescribeConfigurationRecorderStatus action, in JSON format. -type DescribeConfigurationRecorderStatusOutput struct { - _ struct{} `type:"structure"` - - // A list that contains status of the specified recorders. - ConfigurationRecordersStatus []*ConfigurationRecorderStatus `type:"list"` -} - -// String returns the string representation -func (s DescribeConfigurationRecorderStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationRecorderStatusOutput) GoString() string { - return s.String() -} - -// SetConfigurationRecordersStatus sets the ConfigurationRecordersStatus field's value. -func (s *DescribeConfigurationRecorderStatusOutput) SetConfigurationRecordersStatus(v []*ConfigurationRecorderStatus) *DescribeConfigurationRecorderStatusOutput { - s.ConfigurationRecordersStatus = v - return s -} - -// The input for the DescribeConfigurationRecorders action. -type DescribeConfigurationRecordersInput struct { - _ struct{} `type:"structure"` - - // A list of configuration recorder names. - ConfigurationRecorderNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeConfigurationRecordersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationRecordersInput) GoString() string { - return s.String() -} - -// SetConfigurationRecorderNames sets the ConfigurationRecorderNames field's value. -func (s *DescribeConfigurationRecordersInput) SetConfigurationRecorderNames(v []*string) *DescribeConfigurationRecordersInput { - s.ConfigurationRecorderNames = v - return s -} - -// The output for the DescribeConfigurationRecorders action. -type DescribeConfigurationRecordersOutput struct { - _ struct{} `type:"structure"` - - // A list that contains the descriptions of the specified configuration recorders. - ConfigurationRecorders []*ConfigurationRecorder `type:"list"` -} - -// String returns the string representation -func (s DescribeConfigurationRecordersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationRecordersOutput) GoString() string { - return s.String() -} - -// SetConfigurationRecorders sets the ConfigurationRecorders field's value. -func (s *DescribeConfigurationRecordersOutput) SetConfigurationRecorders(v []*ConfigurationRecorder) *DescribeConfigurationRecordersOutput { - s.ConfigurationRecorders = v - return s -} - -// The input for the DeliveryChannelStatus action. -type DescribeDeliveryChannelStatusInput struct { - _ struct{} `type:"structure"` - - // A list of delivery channel names. - DeliveryChannelNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeDeliveryChannelStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDeliveryChannelStatusInput) GoString() string { - return s.String() -} - -// SetDeliveryChannelNames sets the DeliveryChannelNames field's value. -func (s *DescribeDeliveryChannelStatusInput) SetDeliveryChannelNames(v []*string) *DescribeDeliveryChannelStatusInput { - s.DeliveryChannelNames = v - return s -} - -// The output for the DescribeDeliveryChannelStatus action. -type DescribeDeliveryChannelStatusOutput struct { - _ struct{} `type:"structure"` - - // A list that contains the status of a specified delivery channel. - DeliveryChannelsStatus []*DeliveryChannelStatus `type:"list"` -} - -// String returns the string representation -func (s DescribeDeliveryChannelStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDeliveryChannelStatusOutput) GoString() string { - return s.String() -} - -// SetDeliveryChannelsStatus sets the DeliveryChannelsStatus field's value. -func (s *DescribeDeliveryChannelStatusOutput) SetDeliveryChannelsStatus(v []*DeliveryChannelStatus) *DescribeDeliveryChannelStatusOutput { - s.DeliveryChannelsStatus = v - return s -} - -// The input for the DescribeDeliveryChannels action. -type DescribeDeliveryChannelsInput struct { - _ struct{} `type:"structure"` - - // A list of delivery channel names. - DeliveryChannelNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeDeliveryChannelsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDeliveryChannelsInput) GoString() string { - return s.String() -} - -// SetDeliveryChannelNames sets the DeliveryChannelNames field's value. -func (s *DescribeDeliveryChannelsInput) SetDeliveryChannelNames(v []*string) *DescribeDeliveryChannelsInput { - s.DeliveryChannelNames = v - return s -} - -// The output for the DescribeDeliveryChannels action. -type DescribeDeliveryChannelsOutput struct { - _ struct{} `type:"structure"` - - // A list that contains the descriptions of the specified delivery channel. - DeliveryChannels []*DeliveryChannel `type:"list"` -} - -// String returns the string representation -func (s DescribeDeliveryChannelsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDeliveryChannelsOutput) GoString() string { - return s.String() -} - -// SetDeliveryChannels sets the DeliveryChannels field's value. -func (s *DescribeDeliveryChannelsOutput) SetDeliveryChannels(v []*DeliveryChannel) *DescribeDeliveryChannelsOutput { - s.DeliveryChannels = v - return s -} - -type DescribePendingAggregationRequestsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of evaluation results returned on each page. The default - // is maximum. If you specify 0, AWS Config uses the default. - Limit *int64 `type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribePendingAggregationRequestsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePendingAggregationRequestsInput) GoString() string { - return s.String() -} - -// SetLimit sets the Limit field's value. -func (s *DescribePendingAggregationRequestsInput) SetLimit(v int64) *DescribePendingAggregationRequestsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePendingAggregationRequestsInput) SetNextToken(v string) *DescribePendingAggregationRequestsInput { - s.NextToken = &v - return s -} - -type DescribePendingAggregationRequestsOutput struct { - _ struct{} `type:"structure"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` - - // Returns a PendingAggregationRequests object. - PendingAggregationRequests []*PendingAggregationRequest `type:"list"` -} - -// String returns the string representation -func (s DescribePendingAggregationRequestsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePendingAggregationRequestsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePendingAggregationRequestsOutput) SetNextToken(v string) *DescribePendingAggregationRequestsOutput { - s.NextToken = &v - return s -} - -// SetPendingAggregationRequests sets the PendingAggregationRequests field's value. -func (s *DescribePendingAggregationRequestsOutput) SetPendingAggregationRequests(v []*PendingAggregationRequest) *DescribePendingAggregationRequestsOutput { - s.PendingAggregationRequests = v - return s -} - -type DescribeRetentionConfigurationsInput struct { - _ struct{} `type:"structure"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` - - // A list of names of retention configurations for which you want details. If - // you do not specify a name, AWS Config returns details for all the retention - // configurations for that account. - // - // Currently, AWS Config supports only one retention configuration per region - // in your account. - RetentionConfigurationNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeRetentionConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRetentionConfigurationsInput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeRetentionConfigurationsInput) SetNextToken(v string) *DescribeRetentionConfigurationsInput { - s.NextToken = &v - return s -} - -// SetRetentionConfigurationNames sets the RetentionConfigurationNames field's value. -func (s *DescribeRetentionConfigurationsInput) SetRetentionConfigurationNames(v []*string) *DescribeRetentionConfigurationsInput { - s.RetentionConfigurationNames = v - return s -} - -type DescribeRetentionConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` - - // Returns a retention configuration object. - RetentionConfigurations []*RetentionConfiguration `type:"list"` -} - -// String returns the string representation -func (s DescribeRetentionConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRetentionConfigurationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeRetentionConfigurationsOutput) SetNextToken(v string) *DescribeRetentionConfigurationsOutput { - s.NextToken = &v - return s -} - -// SetRetentionConfigurations sets the RetentionConfigurations field's value. -func (s *DescribeRetentionConfigurationsOutput) SetRetentionConfigurations(v []*RetentionConfiguration) *DescribeRetentionConfigurationsOutput { - s.RetentionConfigurations = v - return s -} - -// Identifies an AWS resource and indicates whether it complies with the AWS -// Config rule that it was evaluated against. -type Evaluation struct { - _ struct{} `type:"structure"` - - // Supplementary information about how the evaluation determined the compliance. - Annotation *string `min:"1" type:"string"` - - // The ID of the AWS resource that was evaluated. - // - // ComplianceResourceId is a required field - ComplianceResourceId *string `min:"1" type:"string" required:"true"` - - // The type of AWS resource that was evaluated. - // - // ComplianceResourceType is a required field - ComplianceResourceType *string `min:"1" type:"string" required:"true"` - - // Indicates whether the AWS resource complies with the AWS Config rule that - // it was evaluated against. - // - // For the Evaluation data type, AWS Config supports only the COMPLIANT, NON_COMPLIANT, - // and NOT_APPLICABLE values. AWS Config does not support the INSUFFICIENT_DATA - // value for this data type. - // - // Similarly, AWS Config does not accept INSUFFICIENT_DATA as the value for - // ComplianceType from a PutEvaluations request. For example, an AWS Lambda - // function for a custom AWS Config rule cannot pass an INSUFFICIENT_DATA value - // to AWS Config. - // - // ComplianceType is a required field - ComplianceType *string `type:"string" required:"true" enum:"ComplianceType"` - - // The time of the event in AWS Config that triggered the evaluation. For event-based - // evaluations, the time indicates when AWS Config created the configuration - // item that triggered the evaluation. For periodic evaluations, the time indicates - // when AWS Config triggered the evaluation at the frequency that you specified - // (for example, every 24 hours). - // - // OrderingTimestamp is a required field - OrderingTimestamp *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s Evaluation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Evaluation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Evaluation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Evaluation"} - if s.Annotation != nil && len(*s.Annotation) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Annotation", 1)) - } - if s.ComplianceResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ComplianceResourceId")) - } - if s.ComplianceResourceId != nil && len(*s.ComplianceResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ComplianceResourceId", 1)) - } - if s.ComplianceResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ComplianceResourceType")) - } - if s.ComplianceResourceType != nil && len(*s.ComplianceResourceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ComplianceResourceType", 1)) - } - if s.ComplianceType == nil { - invalidParams.Add(request.NewErrParamRequired("ComplianceType")) - } - if s.OrderingTimestamp == nil { - invalidParams.Add(request.NewErrParamRequired("OrderingTimestamp")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnnotation sets the Annotation field's value. -func (s *Evaluation) SetAnnotation(v string) *Evaluation { - s.Annotation = &v - return s -} - -// SetComplianceResourceId sets the ComplianceResourceId field's value. -func (s *Evaluation) SetComplianceResourceId(v string) *Evaluation { - s.ComplianceResourceId = &v - return s -} - -// SetComplianceResourceType sets the ComplianceResourceType field's value. -func (s *Evaluation) SetComplianceResourceType(v string) *Evaluation { - s.ComplianceResourceType = &v - return s -} - -// SetComplianceType sets the ComplianceType field's value. -func (s *Evaluation) SetComplianceType(v string) *Evaluation { - s.ComplianceType = &v - return s -} - -// SetOrderingTimestamp sets the OrderingTimestamp field's value. -func (s *Evaluation) SetOrderingTimestamp(v time.Time) *Evaluation { - s.OrderingTimestamp = &v - return s -} - -// The details of an AWS Config evaluation. Provides the AWS resource that was -// evaluated, the compliance of the resource, related time stamps, and supplementary -// information. -type EvaluationResult struct { - _ struct{} `type:"structure"` - - // Supplementary information about how the evaluation determined the compliance. - Annotation *string `min:"1" type:"string"` - - // Indicates whether the AWS resource complies with the AWS Config rule that - // evaluated it. - // - // For the EvaluationResult data type, AWS Config supports only the COMPLIANT, - // NON_COMPLIANT, and NOT_APPLICABLE values. AWS Config does not support the - // INSUFFICIENT_DATA value for the EvaluationResult data type. - ComplianceType *string `type:"string" enum:"ComplianceType"` - - // The time when the AWS Config rule evaluated the AWS resource. - ConfigRuleInvokedTime *time.Time `type:"timestamp"` - - // Uniquely identifies the evaluation result. - EvaluationResultIdentifier *EvaluationResultIdentifier `type:"structure"` - - // The time when AWS Config recorded the evaluation result. - ResultRecordedTime *time.Time `type:"timestamp"` - - // An encrypted token that associates an evaluation with an AWS Config rule. - // The token identifies the rule, the AWS resource being evaluated, and the - // event that triggered the evaluation. - ResultToken *string `type:"string"` -} - -// String returns the string representation -func (s EvaluationResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EvaluationResult) GoString() string { - return s.String() -} - -// SetAnnotation sets the Annotation field's value. -func (s *EvaluationResult) SetAnnotation(v string) *EvaluationResult { - s.Annotation = &v - return s -} - -// SetComplianceType sets the ComplianceType field's value. -func (s *EvaluationResult) SetComplianceType(v string) *EvaluationResult { - s.ComplianceType = &v - return s -} - -// SetConfigRuleInvokedTime sets the ConfigRuleInvokedTime field's value. -func (s *EvaluationResult) SetConfigRuleInvokedTime(v time.Time) *EvaluationResult { - s.ConfigRuleInvokedTime = &v - return s -} - -// SetEvaluationResultIdentifier sets the EvaluationResultIdentifier field's value. -func (s *EvaluationResult) SetEvaluationResultIdentifier(v *EvaluationResultIdentifier) *EvaluationResult { - s.EvaluationResultIdentifier = v - return s -} - -// SetResultRecordedTime sets the ResultRecordedTime field's value. -func (s *EvaluationResult) SetResultRecordedTime(v time.Time) *EvaluationResult { - s.ResultRecordedTime = &v - return s -} - -// SetResultToken sets the ResultToken field's value. -func (s *EvaluationResult) SetResultToken(v string) *EvaluationResult { - s.ResultToken = &v - return s -} - -// Uniquely identifies an evaluation result. -type EvaluationResultIdentifier struct { - _ struct{} `type:"structure"` - - // Identifies an AWS Config rule used to evaluate an AWS resource, and provides - // the type and ID of the evaluated resource. - EvaluationResultQualifier *EvaluationResultQualifier `type:"structure"` - - // The time of the event that triggered the evaluation of your AWS resources. - // The time can indicate when AWS Config delivered a configuration item change - // notification, or it can indicate when AWS Config delivered the configuration - // snapshot, depending on which event triggered the evaluation. - OrderingTimestamp *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s EvaluationResultIdentifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EvaluationResultIdentifier) GoString() string { - return s.String() -} - -// SetEvaluationResultQualifier sets the EvaluationResultQualifier field's value. -func (s *EvaluationResultIdentifier) SetEvaluationResultQualifier(v *EvaluationResultQualifier) *EvaluationResultIdentifier { - s.EvaluationResultQualifier = v - return s -} - -// SetOrderingTimestamp sets the OrderingTimestamp field's value. -func (s *EvaluationResultIdentifier) SetOrderingTimestamp(v time.Time) *EvaluationResultIdentifier { - s.OrderingTimestamp = &v - return s -} - -// Identifies an AWS Config rule that evaluated an AWS resource, and provides -// the type and ID of the resource that the rule evaluated. -type EvaluationResultQualifier struct { - _ struct{} `type:"structure"` - - // The name of the AWS Config rule that was used in the evaluation. - ConfigRuleName *string `min:"1" type:"string"` - - // The ID of the evaluated AWS resource. - ResourceId *string `min:"1" type:"string"` - - // The type of AWS resource that was evaluated. - ResourceType *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s EvaluationResultQualifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EvaluationResultQualifier) GoString() string { - return s.String() -} - -// SetConfigRuleName sets the ConfigRuleName field's value. -func (s *EvaluationResultQualifier) SetConfigRuleName(v string) *EvaluationResultQualifier { - s.ConfigRuleName = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *EvaluationResultQualifier) SetResourceId(v string) *EvaluationResultQualifier { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *EvaluationResultQualifier) SetResourceType(v string) *EvaluationResultQualifier { - s.ResourceType = &v - return s -} - -type GetAggregateComplianceDetailsByConfigRuleInput struct { - _ struct{} `type:"structure"` - - // The 12-digit account ID of the source account. - // - // AccountId is a required field - AccountId *string `type:"string" required:"true"` - - // The source region from where the data is aggregated. - // - // AwsRegion is a required field - AwsRegion *string `min:"1" type:"string" required:"true"` - - // The resource compliance status. - // - // For the GetAggregateComplianceDetailsByConfigRuleRequest data type, AWS Config - // supports only the COMPLIANT and NON_COMPLIANT. AWS Config does not support - // the NOT_APPLICABLE and INSUFFICIENT_DATA values. - ComplianceType *string `type:"string" enum:"ComplianceType"` - - // The name of the AWS Config rule for which you want compliance information. - // - // ConfigRuleName is a required field - ConfigRuleName *string `min:"1" type:"string" required:"true"` - - // The name of the configuration aggregator. - // - // ConfigurationAggregatorName is a required field - ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` - - // The maximum number of evaluation results returned on each page. The default - // is 50. You cannot specify a number greater than 100. If you specify 0, AWS - // Config uses the default. - Limit *int64 `type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetAggregateComplianceDetailsByConfigRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAggregateComplianceDetailsByConfigRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAggregateComplianceDetailsByConfigRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAggregateComplianceDetailsByConfigRuleInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AwsRegion == nil { - invalidParams.Add(request.NewErrParamRequired("AwsRegion")) - } - if s.AwsRegion != nil && len(*s.AwsRegion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AwsRegion", 1)) - } - if s.ConfigRuleName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) - } - if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) - } - if s.ConfigurationAggregatorName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) - } - if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetAccountId(v string) *GetAggregateComplianceDetailsByConfigRuleInput { - s.AccountId = &v - return s -} - -// SetAwsRegion sets the AwsRegion field's value. -func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetAwsRegion(v string) *GetAggregateComplianceDetailsByConfigRuleInput { - s.AwsRegion = &v - return s -} - -// SetComplianceType sets the ComplianceType field's value. -func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetComplianceType(v string) *GetAggregateComplianceDetailsByConfigRuleInput { - s.ComplianceType = &v - return s -} - -// SetConfigRuleName sets the ConfigRuleName field's value. -func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetConfigRuleName(v string) *GetAggregateComplianceDetailsByConfigRuleInput { - s.ConfigRuleName = &v - return s -} - -// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. -func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetConfigurationAggregatorName(v string) *GetAggregateComplianceDetailsByConfigRuleInput { - s.ConfigurationAggregatorName = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetLimit(v int64) *GetAggregateComplianceDetailsByConfigRuleInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetNextToken(v string) *GetAggregateComplianceDetailsByConfigRuleInput { - s.NextToken = &v - return s -} - -type GetAggregateComplianceDetailsByConfigRuleOutput struct { - _ struct{} `type:"structure"` - - // Returns an AggregateEvaluationResults object. - AggregateEvaluationResults []*AggregateEvaluationResult `type:"list"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetAggregateComplianceDetailsByConfigRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAggregateComplianceDetailsByConfigRuleOutput) GoString() string { - return s.String() -} - -// SetAggregateEvaluationResults sets the AggregateEvaluationResults field's value. -func (s *GetAggregateComplianceDetailsByConfigRuleOutput) SetAggregateEvaluationResults(v []*AggregateEvaluationResult) *GetAggregateComplianceDetailsByConfigRuleOutput { - s.AggregateEvaluationResults = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetAggregateComplianceDetailsByConfigRuleOutput) SetNextToken(v string) *GetAggregateComplianceDetailsByConfigRuleOutput { - s.NextToken = &v - return s -} - -type GetAggregateConfigRuleComplianceSummaryInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration aggregator. - // - // ConfigurationAggregatorName is a required field - ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` - - // Filters the results based on the ConfigRuleComplianceSummaryFilters object. - Filters *ConfigRuleComplianceSummaryFilters `type:"structure"` - - // Groups the result based on ACCOUNT_ID or AWS_REGION. - GroupByKey *string `type:"string" enum:"ConfigRuleComplianceSummaryGroupKey"` - - // The maximum number of evaluation results returned on each page. The default - // is 1000. You cannot specify a number greater than 1000. If you specify 0, - // AWS Config uses the default. - Limit *int64 `type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetAggregateConfigRuleComplianceSummaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAggregateConfigRuleComplianceSummaryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAggregateConfigRuleComplianceSummaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAggregateConfigRuleComplianceSummaryInput"} - if s.ConfigurationAggregatorName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) - } - if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) - } - if s.Filters != nil { - if err := s.Filters.Validate(); err != nil { - invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. -func (s *GetAggregateConfigRuleComplianceSummaryInput) SetConfigurationAggregatorName(v string) *GetAggregateConfigRuleComplianceSummaryInput { - s.ConfigurationAggregatorName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *GetAggregateConfigRuleComplianceSummaryInput) SetFilters(v *ConfigRuleComplianceSummaryFilters) *GetAggregateConfigRuleComplianceSummaryInput { - s.Filters = v - return s -} - -// SetGroupByKey sets the GroupByKey field's value. -func (s *GetAggregateConfigRuleComplianceSummaryInput) SetGroupByKey(v string) *GetAggregateConfigRuleComplianceSummaryInput { - s.GroupByKey = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *GetAggregateConfigRuleComplianceSummaryInput) SetLimit(v int64) *GetAggregateConfigRuleComplianceSummaryInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetAggregateConfigRuleComplianceSummaryInput) SetNextToken(v string) *GetAggregateConfigRuleComplianceSummaryInput { - s.NextToken = &v - return s -} - -type GetAggregateConfigRuleComplianceSummaryOutput struct { - _ struct{} `type:"structure"` - - // Returns a list of AggregateComplianceCounts object. - AggregateComplianceCounts []*AggregateComplianceCount `type:"list"` - - // Groups the result based on ACCOUNT_ID or AWS_REGION. - GroupByKey *string `min:"1" type:"string"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetAggregateConfigRuleComplianceSummaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAggregateConfigRuleComplianceSummaryOutput) GoString() string { - return s.String() -} - -// SetAggregateComplianceCounts sets the AggregateComplianceCounts field's value. -func (s *GetAggregateConfigRuleComplianceSummaryOutput) SetAggregateComplianceCounts(v []*AggregateComplianceCount) *GetAggregateConfigRuleComplianceSummaryOutput { - s.AggregateComplianceCounts = v - return s -} - -// SetGroupByKey sets the GroupByKey field's value. -func (s *GetAggregateConfigRuleComplianceSummaryOutput) SetGroupByKey(v string) *GetAggregateConfigRuleComplianceSummaryOutput { - s.GroupByKey = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetAggregateConfigRuleComplianceSummaryOutput) SetNextToken(v string) *GetAggregateConfigRuleComplianceSummaryOutput { - s.NextToken = &v - return s -} - -type GetAggregateDiscoveredResourceCountsInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration aggregator. - // - // ConfigurationAggregatorName is a required field - ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` - - // Filters the results based on the ResourceCountFilters object. - Filters *ResourceCountFilters `type:"structure"` - - // The key to group the resource counts. - GroupByKey *string `type:"string" enum:"ResourceCountGroupKey"` - - // The maximum number of GroupedResourceCount objects returned on each page. - // The default is 1000. You cannot specify a number greater than 1000. If you - // specify 0, AWS Config uses the default. - Limit *int64 `type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetAggregateDiscoveredResourceCountsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAggregateDiscoveredResourceCountsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAggregateDiscoveredResourceCountsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAggregateDiscoveredResourceCountsInput"} - if s.ConfigurationAggregatorName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) - } - if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) - } - if s.Filters != nil { - if err := s.Filters.Validate(); err != nil { - invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. -func (s *GetAggregateDiscoveredResourceCountsInput) SetConfigurationAggregatorName(v string) *GetAggregateDiscoveredResourceCountsInput { - s.ConfigurationAggregatorName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *GetAggregateDiscoveredResourceCountsInput) SetFilters(v *ResourceCountFilters) *GetAggregateDiscoveredResourceCountsInput { - s.Filters = v - return s -} - -// SetGroupByKey sets the GroupByKey field's value. -func (s *GetAggregateDiscoveredResourceCountsInput) SetGroupByKey(v string) *GetAggregateDiscoveredResourceCountsInput { - s.GroupByKey = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *GetAggregateDiscoveredResourceCountsInput) SetLimit(v int64) *GetAggregateDiscoveredResourceCountsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetAggregateDiscoveredResourceCountsInput) SetNextToken(v string) *GetAggregateDiscoveredResourceCountsInput { - s.NextToken = &v - return s -} - -type GetAggregateDiscoveredResourceCountsOutput struct { - _ struct{} `type:"structure"` - - // The key passed into the request object. If GroupByKey is not provided, the - // result will be empty. - GroupByKey *string `min:"1" type:"string"` - - // Returns a list of GroupedResourceCount objects. - GroupedResourceCounts []*GroupedResourceCount `type:"list"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` - - // The total number of resources that are present in an aggregator with the - // filters that you provide. - // - // TotalDiscoveredResources is a required field - TotalDiscoveredResources *int64 `type:"long" required:"true"` -} - -// String returns the string representation -func (s GetAggregateDiscoveredResourceCountsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAggregateDiscoveredResourceCountsOutput) GoString() string { - return s.String() -} - -// SetGroupByKey sets the GroupByKey field's value. -func (s *GetAggregateDiscoveredResourceCountsOutput) SetGroupByKey(v string) *GetAggregateDiscoveredResourceCountsOutput { - s.GroupByKey = &v - return s -} - -// SetGroupedResourceCounts sets the GroupedResourceCounts field's value. -func (s *GetAggregateDiscoveredResourceCountsOutput) SetGroupedResourceCounts(v []*GroupedResourceCount) *GetAggregateDiscoveredResourceCountsOutput { - s.GroupedResourceCounts = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetAggregateDiscoveredResourceCountsOutput) SetNextToken(v string) *GetAggregateDiscoveredResourceCountsOutput { - s.NextToken = &v - return s -} - -// SetTotalDiscoveredResources sets the TotalDiscoveredResources field's value. -func (s *GetAggregateDiscoveredResourceCountsOutput) SetTotalDiscoveredResources(v int64) *GetAggregateDiscoveredResourceCountsOutput { - s.TotalDiscoveredResources = &v - return s -} - -type GetAggregateResourceConfigInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration aggregator. - // - // ConfigurationAggregatorName is a required field - ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` - - // An object that identifies aggregate resource. - // - // ResourceIdentifier is a required field - ResourceIdentifier *AggregateResourceIdentifier `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetAggregateResourceConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAggregateResourceConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAggregateResourceConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAggregateResourceConfigInput"} - if s.ConfigurationAggregatorName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) - } - if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) - } - if s.ResourceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceIdentifier")) - } - if s.ResourceIdentifier != nil { - if err := s.ResourceIdentifier.Validate(); err != nil { - invalidParams.AddNested("ResourceIdentifier", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. -func (s *GetAggregateResourceConfigInput) SetConfigurationAggregatorName(v string) *GetAggregateResourceConfigInput { - s.ConfigurationAggregatorName = &v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *GetAggregateResourceConfigInput) SetResourceIdentifier(v *AggregateResourceIdentifier) *GetAggregateResourceConfigInput { - s.ResourceIdentifier = v - return s -} - -type GetAggregateResourceConfigOutput struct { - _ struct{} `type:"structure"` - - // Returns a ConfigurationItem object. - ConfigurationItem *ConfigurationItem `type:"structure"` -} - -// String returns the string representation -func (s GetAggregateResourceConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAggregateResourceConfigOutput) GoString() string { - return s.String() -} - -// SetConfigurationItem sets the ConfigurationItem field's value. -func (s *GetAggregateResourceConfigOutput) SetConfigurationItem(v *ConfigurationItem) *GetAggregateResourceConfigOutput { - s.ConfigurationItem = v - return s -} - -type GetComplianceDetailsByConfigRuleInput struct { - _ struct{} `type:"structure"` - - // Filters the results by compliance. - // - // The allowed values are COMPLIANT, NON_COMPLIANT, and NOT_APPLICABLE. - ComplianceTypes []*string `type:"list"` - - // The name of the AWS Config rule for which you want compliance information. - // - // ConfigRuleName is a required field - ConfigRuleName *string `min:"1" type:"string" required:"true"` - - // The maximum number of evaluation results returned on each page. The default - // is 10. You cannot specify a number greater than 100. If you specify 0, AWS - // Config uses the default. - Limit *int64 `type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetComplianceDetailsByConfigRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetComplianceDetailsByConfigRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetComplianceDetailsByConfigRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetComplianceDetailsByConfigRuleInput"} - if s.ConfigRuleName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) - } - if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComplianceTypes sets the ComplianceTypes field's value. -func (s *GetComplianceDetailsByConfigRuleInput) SetComplianceTypes(v []*string) *GetComplianceDetailsByConfigRuleInput { - s.ComplianceTypes = v - return s -} - -// SetConfigRuleName sets the ConfigRuleName field's value. -func (s *GetComplianceDetailsByConfigRuleInput) SetConfigRuleName(v string) *GetComplianceDetailsByConfigRuleInput { - s.ConfigRuleName = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *GetComplianceDetailsByConfigRuleInput) SetLimit(v int64) *GetComplianceDetailsByConfigRuleInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetComplianceDetailsByConfigRuleInput) SetNextToken(v string) *GetComplianceDetailsByConfigRuleInput { - s.NextToken = &v - return s -} - -type GetComplianceDetailsByConfigRuleOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether the AWS resource complies with the specified AWS Config - // rule. - EvaluationResults []*EvaluationResult `type:"list"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetComplianceDetailsByConfigRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetComplianceDetailsByConfigRuleOutput) GoString() string { - return s.String() -} - -// SetEvaluationResults sets the EvaluationResults field's value. -func (s *GetComplianceDetailsByConfigRuleOutput) SetEvaluationResults(v []*EvaluationResult) *GetComplianceDetailsByConfigRuleOutput { - s.EvaluationResults = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetComplianceDetailsByConfigRuleOutput) SetNextToken(v string) *GetComplianceDetailsByConfigRuleOutput { - s.NextToken = &v - return s -} - -type GetComplianceDetailsByResourceInput struct { - _ struct{} `type:"structure"` - - // Filters the results by compliance. - // - // The allowed values are COMPLIANT, NON_COMPLIANT, and NOT_APPLICABLE. - ComplianceTypes []*string `type:"list"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` - - // The ID of the AWS resource for which you want compliance information. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // The type of the AWS resource for which you want compliance information. - // - // ResourceType is a required field - ResourceType *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetComplianceDetailsByResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetComplianceDetailsByResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetComplianceDetailsByResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetComplianceDetailsByResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - if s.ResourceType != nil && len(*s.ResourceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComplianceTypes sets the ComplianceTypes field's value. -func (s *GetComplianceDetailsByResourceInput) SetComplianceTypes(v []*string) *GetComplianceDetailsByResourceInput { - s.ComplianceTypes = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetComplianceDetailsByResourceInput) SetNextToken(v string) *GetComplianceDetailsByResourceInput { - s.NextToken = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *GetComplianceDetailsByResourceInput) SetResourceId(v string) *GetComplianceDetailsByResourceInput { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *GetComplianceDetailsByResourceInput) SetResourceType(v string) *GetComplianceDetailsByResourceInput { - s.ResourceType = &v - return s -} - -type GetComplianceDetailsByResourceOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether the specified AWS resource complies each AWS Config rule. - EvaluationResults []*EvaluationResult `type:"list"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetComplianceDetailsByResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetComplianceDetailsByResourceOutput) GoString() string { - return s.String() -} - -// SetEvaluationResults sets the EvaluationResults field's value. -func (s *GetComplianceDetailsByResourceOutput) SetEvaluationResults(v []*EvaluationResult) *GetComplianceDetailsByResourceOutput { - s.EvaluationResults = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetComplianceDetailsByResourceOutput) SetNextToken(v string) *GetComplianceDetailsByResourceOutput { - s.NextToken = &v - return s -} - -type GetComplianceSummaryByConfigRuleInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetComplianceSummaryByConfigRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetComplianceSummaryByConfigRuleInput) GoString() string { - return s.String() -} - -type GetComplianceSummaryByConfigRuleOutput struct { - _ struct{} `type:"structure"` - - // The number of AWS Config rules that are compliant and the number that are - // noncompliant, up to a maximum of 25 for each. - ComplianceSummary *ComplianceSummary `type:"structure"` -} - -// String returns the string representation -func (s GetComplianceSummaryByConfigRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetComplianceSummaryByConfigRuleOutput) GoString() string { - return s.String() -} - -// SetComplianceSummary sets the ComplianceSummary field's value. -func (s *GetComplianceSummaryByConfigRuleOutput) SetComplianceSummary(v *ComplianceSummary) *GetComplianceSummaryByConfigRuleOutput { - s.ComplianceSummary = v - return s -} - -type GetComplianceSummaryByResourceTypeInput struct { - _ struct{} `type:"structure"` - - // Specify one or more resource types to get the number of resources that are - // compliant and the number that are noncompliant for each resource type. - // - // For this request, you can specify an AWS resource type such as AWS::EC2::Instance. - // You can specify that the resource type is an AWS account by specifying AWS::::Account. - ResourceTypes []*string `type:"list"` -} - -// String returns the string representation -func (s GetComplianceSummaryByResourceTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetComplianceSummaryByResourceTypeInput) GoString() string { - return s.String() -} - -// SetResourceTypes sets the ResourceTypes field's value. -func (s *GetComplianceSummaryByResourceTypeInput) SetResourceTypes(v []*string) *GetComplianceSummaryByResourceTypeInput { - s.ResourceTypes = v - return s -} - -type GetComplianceSummaryByResourceTypeOutput struct { - _ struct{} `type:"structure"` - - // The number of resources that are compliant and the number that are noncompliant. - // If one or more resource types were provided with the request, the numbers - // are returned for each resource type. The maximum number returned is 100. - ComplianceSummariesByResourceType []*ComplianceSummaryByResourceType `type:"list"` -} - -// String returns the string representation -func (s GetComplianceSummaryByResourceTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetComplianceSummaryByResourceTypeOutput) GoString() string { - return s.String() -} - -// SetComplianceSummariesByResourceType sets the ComplianceSummariesByResourceType field's value. -func (s *GetComplianceSummaryByResourceTypeOutput) SetComplianceSummariesByResourceType(v []*ComplianceSummaryByResourceType) *GetComplianceSummaryByResourceTypeOutput { - s.ComplianceSummariesByResourceType = v - return s -} - -type GetDiscoveredResourceCountsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of ResourceCount objects returned on each page. The default - // is 100. You cannot specify a number greater than 100. If you specify 0, AWS - // Config uses the default. - Limit *int64 `locationName:"limit" type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `locationName:"nextToken" type:"string"` - - // The comma-separated list that specifies the resource types that you want - // AWS Config to return (for example, "AWS::EC2::Instance", "AWS::IAM::User"). - // - // If a value for resourceTypes is not specified, AWS Config returns all resource - // types that AWS Config is recording in the region for your account. - // - // If the configuration recorder is turned off, AWS Config returns an empty - // list of ResourceCount objects. If the configuration recorder is not recording - // a specific resource type (for example, S3 buckets), that resource type is - // not returned in the list of ResourceCount objects. - ResourceTypes []*string `locationName:"resourceTypes" type:"list"` -} - -// String returns the string representation -func (s GetDiscoveredResourceCountsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDiscoveredResourceCountsInput) GoString() string { - return s.String() -} - -// SetLimit sets the Limit field's value. -func (s *GetDiscoveredResourceCountsInput) SetLimit(v int64) *GetDiscoveredResourceCountsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetDiscoveredResourceCountsInput) SetNextToken(v string) *GetDiscoveredResourceCountsInput { - s.NextToken = &v - return s -} - -// SetResourceTypes sets the ResourceTypes field's value. -func (s *GetDiscoveredResourceCountsInput) SetResourceTypes(v []*string) *GetDiscoveredResourceCountsInput { - s.ResourceTypes = v - return s -} - -type GetDiscoveredResourceCountsOutput struct { - _ struct{} `type:"structure"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `locationName:"nextToken" type:"string"` - - // The list of ResourceCount objects. Each object is listed in descending order - // by the number of resources. - ResourceCounts []*ResourceCount `locationName:"resourceCounts" type:"list"` - - // The total number of resources that AWS Config is recording in the region - // for your account. If you specify resource types in the request, AWS Config - // returns only the total number of resources for those resource types. - // - // Example - // - // AWS Config is recording three resource types in the US East (Ohio) Region - // for your account: 25 EC2 instances, 20 IAM users, and 15 S3 buckets, for - // a total of 60 resources. - // - // You make a call to the GetDiscoveredResourceCounts action and specify the - // resource type, "AWS::EC2::Instances", in the request. - // - // AWS Config returns 25 for totalDiscoveredResources. - TotalDiscoveredResources *int64 `locationName:"totalDiscoveredResources" type:"long"` -} - -// String returns the string representation -func (s GetDiscoveredResourceCountsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDiscoveredResourceCountsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetDiscoveredResourceCountsOutput) SetNextToken(v string) *GetDiscoveredResourceCountsOutput { - s.NextToken = &v - return s -} - -// SetResourceCounts sets the ResourceCounts field's value. -func (s *GetDiscoveredResourceCountsOutput) SetResourceCounts(v []*ResourceCount) *GetDiscoveredResourceCountsOutput { - s.ResourceCounts = v - return s -} - -// SetTotalDiscoveredResources sets the TotalDiscoveredResources field's value. -func (s *GetDiscoveredResourceCountsOutput) SetTotalDiscoveredResources(v int64) *GetDiscoveredResourceCountsOutput { - s.TotalDiscoveredResources = &v - return s -} - -// The input for the GetResourceConfigHistory action. -type GetResourceConfigHistoryInput struct { - _ struct{} `type:"structure"` - - // The chronological order for configuration items listed. By default, the results - // are listed in reverse chronological order. - ChronologicalOrder *string `locationName:"chronologicalOrder" type:"string" enum:"ChronologicalOrder"` - - // The time stamp that indicates an earlier time. If not specified, the action - // returns paginated results that contain configuration items that start when - // the first configuration item was recorded. - EarlierTime *time.Time `locationName:"earlierTime" type:"timestamp"` - - // The time stamp that indicates a later time. If not specified, current time - // is taken. - LaterTime *time.Time `locationName:"laterTime" type:"timestamp"` - - // The maximum number of configuration items returned on each page. The default - // is 10. You cannot specify a number greater than 100. If you specify 0, AWS - // Config uses the default. - Limit *int64 `locationName:"limit" type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `locationName:"nextToken" type:"string"` - - // The ID of the resource (for example., sg-xxxxxx). - // - // ResourceId is a required field - ResourceId *string `locationName:"resourceId" min:"1" type:"string" required:"true"` - - // The resource type. - // - // ResourceType is a required field - ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` -} - -// String returns the string representation -func (s GetResourceConfigHistoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourceConfigHistoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResourceConfigHistoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResourceConfigHistoryInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChronologicalOrder sets the ChronologicalOrder field's value. -func (s *GetResourceConfigHistoryInput) SetChronologicalOrder(v string) *GetResourceConfigHistoryInput { - s.ChronologicalOrder = &v - return s -} - -// SetEarlierTime sets the EarlierTime field's value. -func (s *GetResourceConfigHistoryInput) SetEarlierTime(v time.Time) *GetResourceConfigHistoryInput { - s.EarlierTime = &v - return s -} - -// SetLaterTime sets the LaterTime field's value. -func (s *GetResourceConfigHistoryInput) SetLaterTime(v time.Time) *GetResourceConfigHistoryInput { - s.LaterTime = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *GetResourceConfigHistoryInput) SetLimit(v int64) *GetResourceConfigHistoryInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetResourceConfigHistoryInput) SetNextToken(v string) *GetResourceConfigHistoryInput { - s.NextToken = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *GetResourceConfigHistoryInput) SetResourceId(v string) *GetResourceConfigHistoryInput { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *GetResourceConfigHistoryInput) SetResourceType(v string) *GetResourceConfigHistoryInput { - s.ResourceType = &v - return s -} - -// The output for the GetResourceConfigHistory action. -type GetResourceConfigHistoryOutput struct { - _ struct{} `type:"structure"` - - // A list that contains the configuration history of one or more resources. - ConfigurationItems []*ConfigurationItem `locationName:"configurationItems" type:"list"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetResourceConfigHistoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourceConfigHistoryOutput) GoString() string { - return s.String() -} - -// SetConfigurationItems sets the ConfigurationItems field's value. -func (s *GetResourceConfigHistoryOutput) SetConfigurationItems(v []*ConfigurationItem) *GetResourceConfigHistoryOutput { - s.ConfigurationItems = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetResourceConfigHistoryOutput) SetNextToken(v string) *GetResourceConfigHistoryOutput { - s.NextToken = &v - return s -} - -// The count of resources that are grouped by the group name. -type GroupedResourceCount struct { - _ struct{} `type:"structure"` - - // The name of the group that can be region, account ID, or resource type. For - // example, region1, region2 if the region was chosen as GroupByKey. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The number of resources in the group. - // - // ResourceCount is a required field - ResourceCount *int64 `type:"long" required:"true"` -} - -// String returns the string representation -func (s GroupedResourceCount) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GroupedResourceCount) GoString() string { - return s.String() -} - -// SetGroupName sets the GroupName field's value. -func (s *GroupedResourceCount) SetGroupName(v string) *GroupedResourceCount { - s.GroupName = &v - return s -} - -// SetResourceCount sets the ResourceCount field's value. -func (s *GroupedResourceCount) SetResourceCount(v int64) *GroupedResourceCount { - s.ResourceCount = &v - return s -} - -type ListAggregateDiscoveredResourcesInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration aggregator. - // - // ConfigurationAggregatorName is a required field - ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` - - // Filters the results based on the ResourceFilters object. - Filters *ResourceFilters `type:"structure"` - - // The maximum number of resource identifiers returned on each page. The default - // is 100. You cannot specify a number greater than 100. If you specify 0, AWS - // Config uses the default. - Limit *int64 `type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` - - // The type of resources that you want AWS Config to list in the response. - // - // ResourceType is a required field - ResourceType *string `type:"string" required:"true" enum:"ResourceType"` -} - -// String returns the string representation -func (s ListAggregateDiscoveredResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAggregateDiscoveredResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAggregateDiscoveredResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAggregateDiscoveredResourcesInput"} - if s.ConfigurationAggregatorName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) - } - if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - if s.Filters != nil { - if err := s.Filters.Validate(); err != nil { - invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. -func (s *ListAggregateDiscoveredResourcesInput) SetConfigurationAggregatorName(v string) *ListAggregateDiscoveredResourcesInput { - s.ConfigurationAggregatorName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *ListAggregateDiscoveredResourcesInput) SetFilters(v *ResourceFilters) *ListAggregateDiscoveredResourcesInput { - s.Filters = v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListAggregateDiscoveredResourcesInput) SetLimit(v int64) *ListAggregateDiscoveredResourcesInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAggregateDiscoveredResourcesInput) SetNextToken(v string) *ListAggregateDiscoveredResourcesInput { - s.NextToken = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ListAggregateDiscoveredResourcesInput) SetResourceType(v string) *ListAggregateDiscoveredResourcesInput { - s.ResourceType = &v - return s -} - -type ListAggregateDiscoveredResourcesOutput struct { - _ struct{} `type:"structure"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `type:"string"` - - // Returns a list of ResourceIdentifiers objects. - ResourceIdentifiers []*AggregateResourceIdentifier `type:"list"` -} - -// String returns the string representation -func (s ListAggregateDiscoveredResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAggregateDiscoveredResourcesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAggregateDiscoveredResourcesOutput) SetNextToken(v string) *ListAggregateDiscoveredResourcesOutput { - s.NextToken = &v - return s -} - -// SetResourceIdentifiers sets the ResourceIdentifiers field's value. -func (s *ListAggregateDiscoveredResourcesOutput) SetResourceIdentifiers(v []*AggregateResourceIdentifier) *ListAggregateDiscoveredResourcesOutput { - s.ResourceIdentifiers = v - return s -} - -type ListDiscoveredResourcesInput struct { - _ struct{} `type:"structure"` - - // Specifies whether AWS Config includes deleted resources in the results. By - // default, deleted resources are not included. - IncludeDeletedResources *bool `locationName:"includeDeletedResources" type:"boolean"` - - // The maximum number of resource identifiers returned on each page. The default - // is 100. You cannot specify a number greater than 100. If you specify 0, AWS - // Config uses the default. - Limit *int64 `locationName:"limit" type:"integer"` - - // The nextToken string returned on a previous page that you use to get the - // next page of results in a paginated response. - NextToken *string `locationName:"nextToken" type:"string"` - - // The IDs of only those resources that you want AWS Config to list in the response. - // If you do not specify this parameter, AWS Config lists all resources of the - // specified type that it has discovered. - ResourceIds []*string `locationName:"resourceIds" type:"list"` - - // The custom name of only those resources that you want AWS Config to list - // in the response. If you do not specify this parameter, AWS Config lists all - // resources of the specified type that it has discovered. - ResourceName *string `locationName:"resourceName" type:"string"` - - // The type of resources that you want AWS Config to list in the response. - // - // ResourceType is a required field - ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` -} - -// String returns the string representation -func (s ListDiscoveredResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDiscoveredResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDiscoveredResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDiscoveredResourcesInput"} - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIncludeDeletedResources sets the IncludeDeletedResources field's value. -func (s *ListDiscoveredResourcesInput) SetIncludeDeletedResources(v bool) *ListDiscoveredResourcesInput { - s.IncludeDeletedResources = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListDiscoveredResourcesInput) SetLimit(v int64) *ListDiscoveredResourcesInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDiscoveredResourcesInput) SetNextToken(v string) *ListDiscoveredResourcesInput { - s.NextToken = &v - return s -} - -// SetResourceIds sets the ResourceIds field's value. -func (s *ListDiscoveredResourcesInput) SetResourceIds(v []*string) *ListDiscoveredResourcesInput { - s.ResourceIds = v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *ListDiscoveredResourcesInput) SetResourceName(v string) *ListDiscoveredResourcesInput { - s.ResourceName = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ListDiscoveredResourcesInput) SetResourceType(v string) *ListDiscoveredResourcesInput { - s.ResourceType = &v - return s -} - -type ListDiscoveredResourcesOutput struct { - _ struct{} `type:"structure"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `locationName:"nextToken" type:"string"` - - // The details that identify a resource that is discovered by AWS Config, including - // the resource type, ID, and (if available) the custom resource name. - ResourceIdentifiers []*ResourceIdentifier `locationName:"resourceIdentifiers" type:"list"` -} - -// String returns the string representation -func (s ListDiscoveredResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDiscoveredResourcesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDiscoveredResourcesOutput) SetNextToken(v string) *ListDiscoveredResourcesOutput { - s.NextToken = &v - return s -} - -// SetResourceIdentifiers sets the ResourceIdentifiers field's value. -func (s *ListDiscoveredResourcesOutput) SetResourceIdentifiers(v []*ResourceIdentifier) *ListDiscoveredResourcesOutput { - s.ResourceIdentifiers = v - return s -} - -// This object contains regions to setup the aggregator and an IAM role to retrieve -// organization details. -type OrganizationAggregationSource struct { - _ struct{} `type:"structure"` - - // If true, aggregate existing AWS Config regions and future regions. - AllAwsRegions *bool `type:"boolean"` - - // The source regions being aggregated. - AwsRegions []*string `min:"1" type:"list"` - - // ARN of the IAM role used to retreive AWS Organization details associated - // with the aggregator account. - // - // RoleArn is a required field - RoleArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s OrganizationAggregationSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OrganizationAggregationSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OrganizationAggregationSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OrganizationAggregationSource"} - if s.AwsRegions != nil && len(s.AwsRegions) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AwsRegions", 1)) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllAwsRegions sets the AllAwsRegions field's value. -func (s *OrganizationAggregationSource) SetAllAwsRegions(v bool) *OrganizationAggregationSource { - s.AllAwsRegions = &v - return s -} - -// SetAwsRegions sets the AwsRegions field's value. -func (s *OrganizationAggregationSource) SetAwsRegions(v []*string) *OrganizationAggregationSource { - s.AwsRegions = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *OrganizationAggregationSource) SetRoleArn(v string) *OrganizationAggregationSource { - s.RoleArn = &v - return s -} - -// An object that represents the account ID and region of an aggregator account -// that is requesting authorization but is not yet authorized. -type PendingAggregationRequest struct { - _ struct{} `type:"structure"` - - // The 12-digit account ID of the account requesting to aggregate data. - RequesterAccountId *string `type:"string"` - - // The region requesting to aggregate data. - RequesterAwsRegion *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PendingAggregationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingAggregationRequest) GoString() string { - return s.String() -} - -// SetRequesterAccountId sets the RequesterAccountId field's value. -func (s *PendingAggregationRequest) SetRequesterAccountId(v string) *PendingAggregationRequest { - s.RequesterAccountId = &v - return s -} - -// SetRequesterAwsRegion sets the RequesterAwsRegion field's value. -func (s *PendingAggregationRequest) SetRequesterAwsRegion(v string) *PendingAggregationRequest { - s.RequesterAwsRegion = &v - return s -} - -type PutAggregationAuthorizationInput struct { - _ struct{} `type:"structure"` - - // The 12-digit account ID of the account authorized to aggregate data. - // - // AuthorizedAccountId is a required field - AuthorizedAccountId *string `type:"string" required:"true"` - - // The region authorized to collect aggregated data. - // - // AuthorizedAwsRegion is a required field - AuthorizedAwsRegion *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutAggregationAuthorizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutAggregationAuthorizationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutAggregationAuthorizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutAggregationAuthorizationInput"} - if s.AuthorizedAccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizedAccountId")) - } - if s.AuthorizedAwsRegion == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizedAwsRegion")) - } - if s.AuthorizedAwsRegion != nil && len(*s.AuthorizedAwsRegion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizedAwsRegion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthorizedAccountId sets the AuthorizedAccountId field's value. -func (s *PutAggregationAuthorizationInput) SetAuthorizedAccountId(v string) *PutAggregationAuthorizationInput { - s.AuthorizedAccountId = &v - return s -} - -// SetAuthorizedAwsRegion sets the AuthorizedAwsRegion field's value. -func (s *PutAggregationAuthorizationInput) SetAuthorizedAwsRegion(v string) *PutAggregationAuthorizationInput { - s.AuthorizedAwsRegion = &v - return s -} - -type PutAggregationAuthorizationOutput struct { - _ struct{} `type:"structure"` - - // Returns an AggregationAuthorization object. - AggregationAuthorization *AggregationAuthorization `type:"structure"` -} - -// String returns the string representation -func (s PutAggregationAuthorizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutAggregationAuthorizationOutput) GoString() string { - return s.String() -} - -// SetAggregationAuthorization sets the AggregationAuthorization field's value. -func (s *PutAggregationAuthorizationOutput) SetAggregationAuthorization(v *AggregationAuthorization) *PutAggregationAuthorizationOutput { - s.AggregationAuthorization = v - return s -} - -type PutConfigRuleInput struct { - _ struct{} `type:"structure"` - - // The rule that you want to add to your account. - // - // ConfigRule is a required field - ConfigRule *ConfigRule `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PutConfigRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutConfigRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutConfigRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutConfigRuleInput"} - if s.ConfigRule == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigRule")) - } - if s.ConfigRule != nil { - if err := s.ConfigRule.Validate(); err != nil { - invalidParams.AddNested("ConfigRule", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigRule sets the ConfigRule field's value. -func (s *PutConfigRuleInput) SetConfigRule(v *ConfigRule) *PutConfigRuleInput { - s.ConfigRule = v - return s -} - -type PutConfigRuleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutConfigRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutConfigRuleOutput) GoString() string { - return s.String() -} - -type PutConfigurationAggregatorInput struct { - _ struct{} `type:"structure"` - - // A list of AccountAggregationSource object. - AccountAggregationSources []*AccountAggregationSource `type:"list"` - - // The name of the configuration aggregator. - // - // ConfigurationAggregatorName is a required field - ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` - - // An OrganizationAggregationSource object. - OrganizationAggregationSource *OrganizationAggregationSource `type:"structure"` -} - -// String returns the string representation -func (s PutConfigurationAggregatorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutConfigurationAggregatorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutConfigurationAggregatorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutConfigurationAggregatorInput"} - if s.ConfigurationAggregatorName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) - } - if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) - } - if s.AccountAggregationSources != nil { - for i, v := range s.AccountAggregationSources { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccountAggregationSources", i), err.(request.ErrInvalidParams)) - } - } - } - if s.OrganizationAggregationSource != nil { - if err := s.OrganizationAggregationSource.Validate(); err != nil { - invalidParams.AddNested("OrganizationAggregationSource", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountAggregationSources sets the AccountAggregationSources field's value. -func (s *PutConfigurationAggregatorInput) SetAccountAggregationSources(v []*AccountAggregationSource) *PutConfigurationAggregatorInput { - s.AccountAggregationSources = v - return s -} - -// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. -func (s *PutConfigurationAggregatorInput) SetConfigurationAggregatorName(v string) *PutConfigurationAggregatorInput { - s.ConfigurationAggregatorName = &v - return s -} - -// SetOrganizationAggregationSource sets the OrganizationAggregationSource field's value. -func (s *PutConfigurationAggregatorInput) SetOrganizationAggregationSource(v *OrganizationAggregationSource) *PutConfigurationAggregatorInput { - s.OrganizationAggregationSource = v - return s -} - -type PutConfigurationAggregatorOutput struct { - _ struct{} `type:"structure"` - - // Returns a ConfigurationAggregator object. - ConfigurationAggregator *ConfigurationAggregator `type:"structure"` -} - -// String returns the string representation -func (s PutConfigurationAggregatorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutConfigurationAggregatorOutput) GoString() string { - return s.String() -} - -// SetConfigurationAggregator sets the ConfigurationAggregator field's value. -func (s *PutConfigurationAggregatorOutput) SetConfigurationAggregator(v *ConfigurationAggregator) *PutConfigurationAggregatorOutput { - s.ConfigurationAggregator = v - return s -} - -// The input for the PutConfigurationRecorder action. -type PutConfigurationRecorderInput struct { - _ struct{} `type:"structure"` - - // The configuration recorder object that records each configuration change - // made to the resources. - // - // ConfigurationRecorder is a required field - ConfigurationRecorder *ConfigurationRecorder `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PutConfigurationRecorderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutConfigurationRecorderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutConfigurationRecorderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutConfigurationRecorderInput"} - if s.ConfigurationRecorder == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationRecorder")) - } - if s.ConfigurationRecorder != nil { - if err := s.ConfigurationRecorder.Validate(); err != nil { - invalidParams.AddNested("ConfigurationRecorder", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationRecorder sets the ConfigurationRecorder field's value. -func (s *PutConfigurationRecorderInput) SetConfigurationRecorder(v *ConfigurationRecorder) *PutConfigurationRecorderInput { - s.ConfigurationRecorder = v - return s -} - -type PutConfigurationRecorderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutConfigurationRecorderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutConfigurationRecorderOutput) GoString() string { - return s.String() -} - -// The input for the PutDeliveryChannel action. -type PutDeliveryChannelInput struct { - _ struct{} `type:"structure"` - - // The configuration delivery channel object that delivers the configuration - // information to an Amazon S3 bucket and to an Amazon SNS topic. - // - // DeliveryChannel is a required field - DeliveryChannel *DeliveryChannel `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PutDeliveryChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutDeliveryChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutDeliveryChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutDeliveryChannelInput"} - if s.DeliveryChannel == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryChannel")) - } - if s.DeliveryChannel != nil { - if err := s.DeliveryChannel.Validate(); err != nil { - invalidParams.AddNested("DeliveryChannel", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryChannel sets the DeliveryChannel field's value. -func (s *PutDeliveryChannelInput) SetDeliveryChannel(v *DeliveryChannel) *PutDeliveryChannelInput { - s.DeliveryChannel = v - return s -} - -type PutDeliveryChannelOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutDeliveryChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutDeliveryChannelOutput) GoString() string { - return s.String() -} - -type PutEvaluationsInput struct { - _ struct{} `type:"structure"` - - // The assessments that the AWS Lambda function performs. Each evaluation identifies - // an AWS resource and indicates whether it complies with the AWS Config rule - // that invokes the AWS Lambda function. - Evaluations []*Evaluation `type:"list"` - - // An encrypted token that associates an evaluation with an AWS Config rule. - // Identifies the rule and the event that triggered the evaluation. - // - // ResultToken is a required field - ResultToken *string `type:"string" required:"true"` - - // Use this parameter to specify a test run for PutEvaluations. You can verify - // whether your AWS Lambda function will deliver evaluation results to AWS Config. - // No updates occur to your existing evaluations, and evaluation results are - // not sent to AWS Config. - // - // When TestMode is true, PutEvaluations doesn't require a valid value for the - // ResultToken parameter, but the value cannot be null. - TestMode *bool `type:"boolean"` -} - -// String returns the string representation -func (s PutEvaluationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutEvaluationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutEvaluationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutEvaluationsInput"} - if s.ResultToken == nil { - invalidParams.Add(request.NewErrParamRequired("ResultToken")) - } - if s.Evaluations != nil { - for i, v := range s.Evaluations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Evaluations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEvaluations sets the Evaluations field's value. -func (s *PutEvaluationsInput) SetEvaluations(v []*Evaluation) *PutEvaluationsInput { - s.Evaluations = v - return s -} - -// SetResultToken sets the ResultToken field's value. -func (s *PutEvaluationsInput) SetResultToken(v string) *PutEvaluationsInput { - s.ResultToken = &v - return s -} - -// SetTestMode sets the TestMode field's value. -func (s *PutEvaluationsInput) SetTestMode(v bool) *PutEvaluationsInput { - s.TestMode = &v - return s -} - -type PutEvaluationsOutput struct { - _ struct{} `type:"structure"` - - // Requests that failed because of a client or server error. - FailedEvaluations []*Evaluation `type:"list"` -} - -// String returns the string representation -func (s PutEvaluationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutEvaluationsOutput) GoString() string { - return s.String() -} - -// SetFailedEvaluations sets the FailedEvaluations field's value. -func (s *PutEvaluationsOutput) SetFailedEvaluations(v []*Evaluation) *PutEvaluationsOutput { - s.FailedEvaluations = v - return s -} - -type PutRetentionConfigurationInput struct { - _ struct{} `type:"structure"` - - // Number of days AWS Config stores your historical information. - // - // Currently, only applicable to the configuration item history. - // - // RetentionPeriodInDays is a required field - RetentionPeriodInDays *int64 `min:"30" type:"integer" required:"true"` -} - -// String returns the string representation -func (s PutRetentionConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRetentionConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutRetentionConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutRetentionConfigurationInput"} - if s.RetentionPeriodInDays == nil { - invalidParams.Add(request.NewErrParamRequired("RetentionPeriodInDays")) - } - if s.RetentionPeriodInDays != nil && *s.RetentionPeriodInDays < 30 { - invalidParams.Add(request.NewErrParamMinValue("RetentionPeriodInDays", 30)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRetentionPeriodInDays sets the RetentionPeriodInDays field's value. -func (s *PutRetentionConfigurationInput) SetRetentionPeriodInDays(v int64) *PutRetentionConfigurationInput { - s.RetentionPeriodInDays = &v - return s -} - -type PutRetentionConfigurationOutput struct { - _ struct{} `type:"structure"` - - // Returns a retention configuration object. - RetentionConfiguration *RetentionConfiguration `type:"structure"` -} - -// String returns the string representation -func (s PutRetentionConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRetentionConfigurationOutput) GoString() string { - return s.String() -} - -// SetRetentionConfiguration sets the RetentionConfiguration field's value. -func (s *PutRetentionConfigurationOutput) SetRetentionConfiguration(v *RetentionConfiguration) *PutRetentionConfigurationOutput { - s.RetentionConfiguration = v - return s -} - -// Specifies the types of AWS resource for which AWS Config records configuration -// changes. -// -// In the recording group, you specify whether all supported types or specific -// types of resources are recorded. -// -// By default, AWS Config records configuration changes for all supported types -// of regional resources that AWS Config discovers in the region in which it -// is running. Regional resources are tied to a region and can be used only -// in that region. Examples of regional resources are EC2 instances and EBS -// volumes. -// -// You can also have AWS Config record configuration changes for supported types -// of global resources (for example, IAM resources). Global resources are not -// tied to an individual region and can be used in all regions. -// -// The configuration details for any global resource are the same in all regions. -// If you customize AWS Config in multiple regions to record global resources, -// it will create multiple configuration items each time a global resource changes: -// one configuration item for each region. These configuration items will contain -// identical data. To prevent duplicate configuration items, you should consider -// customizing AWS Config in only one region to record global resources, unless -// you want the configuration items to be available in multiple regions. -// -// If you don't want AWS Config to record all resources, you can specify which -// types of resources it will record with the resourceTypes parameter. -// -// For a list of supported resource types, see Supported Resource Types (http://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html#supported-resources). -// -// For more information, see Selecting Which Resources AWS Config Records (http://docs.aws.amazon.com/config/latest/developerguide/select-resources.html). -type RecordingGroup struct { - _ struct{} `type:"structure"` - - // Specifies whether AWS Config records configuration changes for every supported - // type of regional resource. - // - // If you set this option to true, when AWS Config adds support for a new type - // of regional resource, it starts recording resources of that type automatically. - // - // If you set this option to true, you cannot enumerate a list of resourceTypes. - AllSupported *bool `locationName:"allSupported" type:"boolean"` - - // Specifies whether AWS Config includes all supported types of global resources - // (for example, IAM resources) with the resources that it records. - // - // Before you can set this option to true, you must set the allSupported option - // to true. - // - // If you set this option to true, when AWS Config adds support for a new type - // of global resource, it starts recording resources of that type automatically. - // - // The configuration details for any global resource are the same in all regions. - // To prevent duplicate configuration items, you should consider customizing - // AWS Config in only one region to record global resources. - IncludeGlobalResourceTypes *bool `locationName:"includeGlobalResourceTypes" type:"boolean"` - - // A comma-separated list that specifies the types of AWS resources for which - // AWS Config records configuration changes (for example, AWS::EC2::Instance - // or AWS::CloudTrail::Trail). - // - // Before you can set this option to true, you must set the allSupported option - // to false. - // - // If you set this option to true, when AWS Config adds support for a new type - // of resource, it will not record resources of that type unless you manually - // add that type to your recording group. - // - // For a list of valid resourceTypes values, see the resourceType Value column - // in Supported AWS Resource Types (http://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html#supported-resources). - ResourceTypes []*string `locationName:"resourceTypes" type:"list"` -} - -// String returns the string representation -func (s RecordingGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecordingGroup) GoString() string { - return s.String() -} - -// SetAllSupported sets the AllSupported field's value. -func (s *RecordingGroup) SetAllSupported(v bool) *RecordingGroup { - s.AllSupported = &v - return s -} - -// SetIncludeGlobalResourceTypes sets the IncludeGlobalResourceTypes field's value. -func (s *RecordingGroup) SetIncludeGlobalResourceTypes(v bool) *RecordingGroup { - s.IncludeGlobalResourceTypes = &v - return s -} - -// SetResourceTypes sets the ResourceTypes field's value. -func (s *RecordingGroup) SetResourceTypes(v []*string) *RecordingGroup { - s.ResourceTypes = v - return s -} - -// The relationship of the related resource to the main resource. -type Relationship struct { - _ struct{} `type:"structure"` - - // The type of relationship with the related resource. - RelationshipName *string `locationName:"relationshipName" type:"string"` - - // The ID of the related resource (for example, sg-xxxxxx). - ResourceId *string `locationName:"resourceId" min:"1" type:"string"` - - // The custom name of the related resource, if available. - ResourceName *string `locationName:"resourceName" type:"string"` - - // The resource type of the related resource. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` -} - -// String returns the string representation -func (s Relationship) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Relationship) GoString() string { - return s.String() -} - -// SetRelationshipName sets the RelationshipName field's value. -func (s *Relationship) SetRelationshipName(v string) *Relationship { - s.RelationshipName = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *Relationship) SetResourceId(v string) *Relationship { - s.ResourceId = &v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *Relationship) SetResourceName(v string) *Relationship { - s.ResourceName = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *Relationship) SetResourceType(v string) *Relationship { - s.ResourceType = &v - return s -} - -// An object that contains the resource type and the number of resources. -type ResourceCount struct { - _ struct{} `type:"structure"` - - // The number of resources. - Count *int64 `locationName:"count" type:"long"` - - // The resource type (for example, "AWS::EC2::Instance"). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` -} - -// String returns the string representation -func (s ResourceCount) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceCount) GoString() string { - return s.String() -} - -// SetCount sets the Count field's value. -func (s *ResourceCount) SetCount(v int64) *ResourceCount { - s.Count = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ResourceCount) SetResourceType(v string) *ResourceCount { - s.ResourceType = &v - return s -} - -// Filters the resource count based on account ID, region, and resource type. -type ResourceCountFilters struct { - _ struct{} `type:"structure"` - - // The 12-digit ID of the account. - AccountId *string `type:"string"` - - // The region where the account is located. - Region *string `min:"1" type:"string"` - - // The type of the AWS resource. - ResourceType *string `type:"string" enum:"ResourceType"` -} - -// String returns the string representation -func (s ResourceCountFilters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceCountFilters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceCountFilters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceCountFilters"} - if s.Region != nil && len(*s.Region) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Region", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *ResourceCountFilters) SetAccountId(v string) *ResourceCountFilters { - s.AccountId = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *ResourceCountFilters) SetRegion(v string) *ResourceCountFilters { - s.Region = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ResourceCountFilters) SetResourceType(v string) *ResourceCountFilters { - s.ResourceType = &v - return s -} - -// Filters the results by resource account ID, region, resource ID, and resource -// name. -type ResourceFilters struct { - _ struct{} `type:"structure"` - - // The 12-digit source account ID. - AccountId *string `type:"string"` - - // The source region. - Region *string `min:"1" type:"string"` - - // The ID of the resource. - ResourceId *string `min:"1" type:"string"` - - // The name of the resource. - ResourceName *string `type:"string"` -} - -// String returns the string representation -func (s ResourceFilters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceFilters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceFilters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceFilters"} - if s.Region != nil && len(*s.Region) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Region", 1)) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *ResourceFilters) SetAccountId(v string) *ResourceFilters { - s.AccountId = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *ResourceFilters) SetRegion(v string) *ResourceFilters { - s.Region = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ResourceFilters) SetResourceId(v string) *ResourceFilters { - s.ResourceId = &v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *ResourceFilters) SetResourceName(v string) *ResourceFilters { - s.ResourceName = &v - return s -} - -// The details that identify a resource that is discovered by AWS Config, including -// the resource type, ID, and (if available) the custom resource name. -type ResourceIdentifier struct { - _ struct{} `type:"structure"` - - // The time that the resource was deleted. - ResourceDeletionTime *time.Time `locationName:"resourceDeletionTime" type:"timestamp"` - - // The ID of the resource (for example, sg-xxxxxx). - ResourceId *string `locationName:"resourceId" min:"1" type:"string"` - - // The custom name of the resource (if available). - ResourceName *string `locationName:"resourceName" type:"string"` - - // The type of resource. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` -} - -// String returns the string representation -func (s ResourceIdentifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceIdentifier) GoString() string { - return s.String() -} - -// SetResourceDeletionTime sets the ResourceDeletionTime field's value. -func (s *ResourceIdentifier) SetResourceDeletionTime(v time.Time) *ResourceIdentifier { - s.ResourceDeletionTime = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ResourceIdentifier) SetResourceId(v string) *ResourceIdentifier { - s.ResourceId = &v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *ResourceIdentifier) SetResourceName(v string) *ResourceIdentifier { - s.ResourceName = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ResourceIdentifier) SetResourceType(v string) *ResourceIdentifier { - s.ResourceType = &v - return s -} - -// The details that identify a resource within AWS Config, including the resource -// type and resource ID. -type ResourceKey struct { - _ struct{} `type:"structure"` - - // The ID of the resource (for example., sg-xxxxxx). - // - // ResourceId is a required field - ResourceId *string `locationName:"resourceId" min:"1" type:"string" required:"true"` - - // The resource type. - // - // ResourceType is a required field - ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` -} - -// String returns the string representation -func (s ResourceKey) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceKey) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceKey) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceKey"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *ResourceKey) SetResourceId(v string) *ResourceKey { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ResourceKey) SetResourceType(v string) *ResourceKey { - s.ResourceType = &v - return s -} - -// An object with the name of the retention configuration and the retention -// period in days. The object stores the configuration for data retention in -// AWS Config. -type RetentionConfiguration struct { - _ struct{} `type:"structure"` - - // The name of the retention configuration object. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // Number of days AWS Config stores your historical information. - // - // Currently, only applicable to the configuration item history. - // - // RetentionPeriodInDays is a required field - RetentionPeriodInDays *int64 `min:"30" type:"integer" required:"true"` -} - -// String returns the string representation -func (s RetentionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RetentionConfiguration) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *RetentionConfiguration) SetName(v string) *RetentionConfiguration { - s.Name = &v - return s -} - -// SetRetentionPeriodInDays sets the RetentionPeriodInDays field's value. -func (s *RetentionConfiguration) SetRetentionPeriodInDays(v int64) *RetentionConfiguration { - s.RetentionPeriodInDays = &v - return s -} - -// Defines which resources trigger an evaluation for an AWS Config rule. The -// scope can include one or more resource types, a combination of a tag key -// and value, or a combination of one resource type and one resource ID. Specify -// a scope to constrain which resources trigger an evaluation for a rule. Otherwise, -// evaluations for the rule are triggered when any resource in your recording -// group changes in configuration. -type Scope struct { - _ struct{} `type:"structure"` - - // The ID of the only AWS resource that you want to trigger an evaluation for - // the rule. If you specify a resource ID, you must specify one resource type - // for ComplianceResourceTypes. - ComplianceResourceId *string `min:"1" type:"string"` - - // The resource types of only those AWS resources that you want to trigger an - // evaluation for the rule. You can only specify one type if you also specify - // a resource ID for ComplianceResourceId. - ComplianceResourceTypes []*string `type:"list"` - - // The tag key that is applied to only those AWS resources that you want to - // trigger an evaluation for the rule. - TagKey *string `min:"1" type:"string"` - - // The tag value applied to only those AWS resources that you want to trigger - // an evaluation for the rule. If you specify a value for TagValue, you must - // also specify a value for TagKey. - TagValue *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s Scope) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scope) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Scope) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Scope"} - if s.ComplianceResourceId != nil && len(*s.ComplianceResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ComplianceResourceId", 1)) - } - if s.TagKey != nil && len(*s.TagKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagKey", 1)) - } - if s.TagValue != nil && len(*s.TagValue) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagValue", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComplianceResourceId sets the ComplianceResourceId field's value. -func (s *Scope) SetComplianceResourceId(v string) *Scope { - s.ComplianceResourceId = &v - return s -} - -// SetComplianceResourceTypes sets the ComplianceResourceTypes field's value. -func (s *Scope) SetComplianceResourceTypes(v []*string) *Scope { - s.ComplianceResourceTypes = v - return s -} - -// SetTagKey sets the TagKey field's value. -func (s *Scope) SetTagKey(v string) *Scope { - s.TagKey = &v - return s -} - -// SetTagValue sets the TagValue field's value. -func (s *Scope) SetTagValue(v string) *Scope { - s.TagValue = &v - return s -} - -// Provides the AWS Config rule owner (AWS or customer), the rule identifier, -// and the events that trigger the evaluation of your AWS resources. -type Source struct { - _ struct{} `type:"structure"` - - // Indicates whether AWS or the customer owns and manages the AWS Config rule. - // - // Owner is a required field - Owner *string `type:"string" required:"true" enum:"Owner"` - - // Provides the source and type of the event that causes AWS Config to evaluate - // your AWS resources. - SourceDetails []*SourceDetail `type:"list"` - - // For AWS Config managed rules, a predefined identifier from a list. For example, - // IAM_PASSWORD_POLICY is a managed rule. To reference a managed rule, see Using - // AWS Managed Config Rules (http://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html). - // - // For custom rules, the identifier is the Amazon Resource Name (ARN) of the - // rule's AWS Lambda function, such as arn:aws:lambda:us-east-2:123456789012:function:custom_rule_name. - // - // SourceIdentifier is a required field - SourceIdentifier *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Source) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Source) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Source) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Source"} - if s.Owner == nil { - invalidParams.Add(request.NewErrParamRequired("Owner")) - } - if s.SourceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceIdentifier")) - } - if s.SourceIdentifier != nil && len(*s.SourceIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceIdentifier", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOwner sets the Owner field's value. -func (s *Source) SetOwner(v string) *Source { - s.Owner = &v - return s -} - -// SetSourceDetails sets the SourceDetails field's value. -func (s *Source) SetSourceDetails(v []*SourceDetail) *Source { - s.SourceDetails = v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *Source) SetSourceIdentifier(v string) *Source { - s.SourceIdentifier = &v - return s -} - -// Provides the source and the message types that trigger AWS Config to evaluate -// your AWS resources against a rule. It also provides the frequency with which -// you want AWS Config to run evaluations for the rule if the trigger type is -// periodic. You can specify the parameter values for SourceDetail only for -// custom rules. -type SourceDetail struct { - _ struct{} `type:"structure"` - - // The source of the event, such as an AWS service, that triggers AWS Config - // to evaluate your AWS resources. - EventSource *string `type:"string" enum:"EventSource"` - - // The frequency at which you want AWS Config to run evaluations for a custom - // rule with a periodic trigger. If you specify a value for MaximumExecutionFrequency, - // then MessageType must use the ScheduledNotification value. - // - // By default, rules with a periodic trigger are evaluated every 24 hours. To - // change the frequency, specify a valid value for the MaximumExecutionFrequency - // parameter. - // - // Based on the valid value you choose, AWS Config runs evaluations once for - // each valid value. For example, if you choose Three_Hours, AWS Config runs - // evaluations once every three hours. In this case, Three_Hours is the frequency - // of this rule. - MaximumExecutionFrequency *string `type:"string" enum:"MaximumExecutionFrequency"` - - // The type of notification that triggers AWS Config to run an evaluation for - // a rule. You can specify the following notification types: - // - // * ConfigurationItemChangeNotification - Triggers an evaluation when AWS - // Config delivers a configuration item as a result of a resource change. - // - // * OversizedConfigurationItemChangeNotification - Triggers an evaluation - // when AWS Config delivers an oversized configuration item. AWS Config may - // generate this notification type when a resource changes and the notification - // exceeds the maximum size allowed by Amazon SNS. - // - // * ScheduledNotification - Triggers a periodic evaluation at the frequency - // specified for MaximumExecutionFrequency. - // - // * ConfigurationSnapshotDeliveryCompleted - Triggers a periodic evaluation - // when AWS Config delivers a configuration snapshot. - // - // If you want your custom rule to be triggered by configuration changes, specify - // two SourceDetail objects, one for ConfigurationItemChangeNotification and - // one for OversizedConfigurationItemChangeNotification. - MessageType *string `type:"string" enum:"MessageType"` -} - -// String returns the string representation -func (s SourceDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SourceDetail) GoString() string { - return s.String() -} - -// SetEventSource sets the EventSource field's value. -func (s *SourceDetail) SetEventSource(v string) *SourceDetail { - s.EventSource = &v - return s -} - -// SetMaximumExecutionFrequency sets the MaximumExecutionFrequency field's value. -func (s *SourceDetail) SetMaximumExecutionFrequency(v string) *SourceDetail { - s.MaximumExecutionFrequency = &v - return s -} - -// SetMessageType sets the MessageType field's value. -func (s *SourceDetail) SetMessageType(v string) *SourceDetail { - s.MessageType = &v - return s -} - -type StartConfigRulesEvaluationInput struct { - _ struct{} `type:"structure"` - - // The list of names of AWS Config rules that you want to run evaluations for. - ConfigRuleNames []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s StartConfigRulesEvaluationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartConfigRulesEvaluationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartConfigRulesEvaluationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartConfigRulesEvaluationInput"} - if s.ConfigRuleNames != nil && len(s.ConfigRuleNames) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigRuleNames", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigRuleNames sets the ConfigRuleNames field's value. -func (s *StartConfigRulesEvaluationInput) SetConfigRuleNames(v []*string) *StartConfigRulesEvaluationInput { - s.ConfigRuleNames = v - return s -} - -// The output when you start the evaluation for the specified AWS Config rule. -type StartConfigRulesEvaluationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StartConfigRulesEvaluationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartConfigRulesEvaluationOutput) GoString() string { - return s.String() -} - -// The input for the StartConfigurationRecorder action. -type StartConfigurationRecorderInput struct { - _ struct{} `type:"structure"` - - // The name of the recorder object that records each configuration change made - // to the resources. - // - // ConfigurationRecorderName is a required field - ConfigurationRecorderName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartConfigurationRecorderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartConfigurationRecorderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartConfigurationRecorderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartConfigurationRecorderInput"} - if s.ConfigurationRecorderName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationRecorderName")) - } - if s.ConfigurationRecorderName != nil && len(*s.ConfigurationRecorderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationRecorderName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationRecorderName sets the ConfigurationRecorderName field's value. -func (s *StartConfigurationRecorderInput) SetConfigurationRecorderName(v string) *StartConfigurationRecorderInput { - s.ConfigurationRecorderName = &v - return s -} - -type StartConfigurationRecorderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StartConfigurationRecorderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartConfigurationRecorderOutput) GoString() string { - return s.String() -} - -// The input for the StopConfigurationRecorder action. -type StopConfigurationRecorderInput struct { - _ struct{} `type:"structure"` - - // The name of the recorder object that records each configuration change made - // to the resources. - // - // ConfigurationRecorderName is a required field - ConfigurationRecorderName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopConfigurationRecorderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopConfigurationRecorderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopConfigurationRecorderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopConfigurationRecorderInput"} - if s.ConfigurationRecorderName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationRecorderName")) - } - if s.ConfigurationRecorderName != nil && len(*s.ConfigurationRecorderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationRecorderName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationRecorderName sets the ConfigurationRecorderName field's value. -func (s *StopConfigurationRecorderInput) SetConfigurationRecorderName(v string) *StopConfigurationRecorderInput { - s.ConfigurationRecorderName = &v - return s -} - -type StopConfigurationRecorderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopConfigurationRecorderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopConfigurationRecorderOutput) GoString() string { - return s.String() -} - -const ( - // AggregatedSourceStatusTypeFailed is a AggregatedSourceStatusType enum value - AggregatedSourceStatusTypeFailed = "FAILED" - - // AggregatedSourceStatusTypeSucceeded is a AggregatedSourceStatusType enum value - AggregatedSourceStatusTypeSucceeded = "SUCCEEDED" - - // AggregatedSourceStatusTypeOutdated is a AggregatedSourceStatusType enum value - AggregatedSourceStatusTypeOutdated = "OUTDATED" -) - -const ( - // AggregatedSourceTypeAccount is a AggregatedSourceType enum value - AggregatedSourceTypeAccount = "ACCOUNT" - - // AggregatedSourceTypeOrganization is a AggregatedSourceType enum value - AggregatedSourceTypeOrganization = "ORGANIZATION" -) - -const ( - // ChronologicalOrderReverse is a ChronologicalOrder enum value - ChronologicalOrderReverse = "Reverse" - - // ChronologicalOrderForward is a ChronologicalOrder enum value - ChronologicalOrderForward = "Forward" -) - -const ( - // ComplianceTypeCompliant is a ComplianceType enum value - ComplianceTypeCompliant = "COMPLIANT" - - // ComplianceTypeNonCompliant is a ComplianceType enum value - ComplianceTypeNonCompliant = "NON_COMPLIANT" - - // ComplianceTypeNotApplicable is a ComplianceType enum value - ComplianceTypeNotApplicable = "NOT_APPLICABLE" - - // ComplianceTypeInsufficientData is a ComplianceType enum value - ComplianceTypeInsufficientData = "INSUFFICIENT_DATA" -) - -const ( - // ConfigRuleComplianceSummaryGroupKeyAccountId is a ConfigRuleComplianceSummaryGroupKey enum value - ConfigRuleComplianceSummaryGroupKeyAccountId = "ACCOUNT_ID" - - // ConfigRuleComplianceSummaryGroupKeyAwsRegion is a ConfigRuleComplianceSummaryGroupKey enum value - ConfigRuleComplianceSummaryGroupKeyAwsRegion = "AWS_REGION" -) - -const ( - // ConfigRuleStateActive is a ConfigRuleState enum value - ConfigRuleStateActive = "ACTIVE" - - // ConfigRuleStateDeleting is a ConfigRuleState enum value - ConfigRuleStateDeleting = "DELETING" - - // ConfigRuleStateDeletingResults is a ConfigRuleState enum value - ConfigRuleStateDeletingResults = "DELETING_RESULTS" - - // ConfigRuleStateEvaluating is a ConfigRuleState enum value - ConfigRuleStateEvaluating = "EVALUATING" -) - -const ( - // ConfigurationItemStatusOk is a ConfigurationItemStatus enum value - ConfigurationItemStatusOk = "OK" - - // ConfigurationItemStatusResourceDiscovered is a ConfigurationItemStatus enum value - ConfigurationItemStatusResourceDiscovered = "ResourceDiscovered" - - // ConfigurationItemStatusResourceNotRecorded is a ConfigurationItemStatus enum value - ConfigurationItemStatusResourceNotRecorded = "ResourceNotRecorded" - - // ConfigurationItemStatusResourceDeleted is a ConfigurationItemStatus enum value - ConfigurationItemStatusResourceDeleted = "ResourceDeleted" - - // ConfigurationItemStatusResourceDeletedNotRecorded is a ConfigurationItemStatus enum value - ConfigurationItemStatusResourceDeletedNotRecorded = "ResourceDeletedNotRecorded" -) - -const ( - // DeliveryStatusSuccess is a DeliveryStatus enum value - DeliveryStatusSuccess = "Success" - - // DeliveryStatusFailure is a DeliveryStatus enum value - DeliveryStatusFailure = "Failure" - - // DeliveryStatusNotApplicable is a DeliveryStatus enum value - DeliveryStatusNotApplicable = "Not_Applicable" -) - -const ( - // EventSourceAwsConfig is a EventSource enum value - EventSourceAwsConfig = "aws.config" -) - -const ( - // MaximumExecutionFrequencyOneHour is a MaximumExecutionFrequency enum value - MaximumExecutionFrequencyOneHour = "One_Hour" - - // MaximumExecutionFrequencyThreeHours is a MaximumExecutionFrequency enum value - MaximumExecutionFrequencyThreeHours = "Three_Hours" - - // MaximumExecutionFrequencySixHours is a MaximumExecutionFrequency enum value - MaximumExecutionFrequencySixHours = "Six_Hours" - - // MaximumExecutionFrequencyTwelveHours is a MaximumExecutionFrequency enum value - MaximumExecutionFrequencyTwelveHours = "Twelve_Hours" - - // MaximumExecutionFrequencyTwentyFourHours is a MaximumExecutionFrequency enum value - MaximumExecutionFrequencyTwentyFourHours = "TwentyFour_Hours" -) - -const ( - // MessageTypeConfigurationItemChangeNotification is a MessageType enum value - MessageTypeConfigurationItemChangeNotification = "ConfigurationItemChangeNotification" - - // MessageTypeConfigurationSnapshotDeliveryCompleted is a MessageType enum value - MessageTypeConfigurationSnapshotDeliveryCompleted = "ConfigurationSnapshotDeliveryCompleted" - - // MessageTypeScheduledNotification is a MessageType enum value - MessageTypeScheduledNotification = "ScheduledNotification" - - // MessageTypeOversizedConfigurationItemChangeNotification is a MessageType enum value - MessageTypeOversizedConfigurationItemChangeNotification = "OversizedConfigurationItemChangeNotification" -) - -const ( - // OwnerCustomLambda is a Owner enum value - OwnerCustomLambda = "CUSTOM_LAMBDA" - - // OwnerAws is a Owner enum value - OwnerAws = "AWS" -) - -const ( - // RecorderStatusPending is a RecorderStatus enum value - RecorderStatusPending = "Pending" - - // RecorderStatusSuccess is a RecorderStatus enum value - RecorderStatusSuccess = "Success" - - // RecorderStatusFailure is a RecorderStatus enum value - RecorderStatusFailure = "Failure" -) - -const ( - // ResourceCountGroupKeyResourceType is a ResourceCountGroupKey enum value - ResourceCountGroupKeyResourceType = "RESOURCE_TYPE" - - // ResourceCountGroupKeyAccountId is a ResourceCountGroupKey enum value - ResourceCountGroupKeyAccountId = "ACCOUNT_ID" - - // ResourceCountGroupKeyAwsRegion is a ResourceCountGroupKey enum value - ResourceCountGroupKeyAwsRegion = "AWS_REGION" -) - -const ( - // ResourceTypeAwsEc2CustomerGateway is a ResourceType enum value - ResourceTypeAwsEc2CustomerGateway = "AWS::EC2::CustomerGateway" - - // ResourceTypeAwsEc2Eip is a ResourceType enum value - ResourceTypeAwsEc2Eip = "AWS::EC2::EIP" - - // ResourceTypeAwsEc2Host is a ResourceType enum value - ResourceTypeAwsEc2Host = "AWS::EC2::Host" - - // ResourceTypeAwsEc2Instance is a ResourceType enum value - ResourceTypeAwsEc2Instance = "AWS::EC2::Instance" - - // ResourceTypeAwsEc2InternetGateway is a ResourceType enum value - ResourceTypeAwsEc2InternetGateway = "AWS::EC2::InternetGateway" - - // ResourceTypeAwsEc2NetworkAcl is a ResourceType enum value - ResourceTypeAwsEc2NetworkAcl = "AWS::EC2::NetworkAcl" - - // ResourceTypeAwsEc2NetworkInterface is a ResourceType enum value - ResourceTypeAwsEc2NetworkInterface = "AWS::EC2::NetworkInterface" - - // ResourceTypeAwsEc2RouteTable is a ResourceType enum value - ResourceTypeAwsEc2RouteTable = "AWS::EC2::RouteTable" - - // ResourceTypeAwsEc2SecurityGroup is a ResourceType enum value - ResourceTypeAwsEc2SecurityGroup = "AWS::EC2::SecurityGroup" - - // ResourceTypeAwsEc2Subnet is a ResourceType enum value - ResourceTypeAwsEc2Subnet = "AWS::EC2::Subnet" - - // ResourceTypeAwsCloudTrailTrail is a ResourceType enum value - ResourceTypeAwsCloudTrailTrail = "AWS::CloudTrail::Trail" - - // ResourceTypeAwsEc2Volume is a ResourceType enum value - ResourceTypeAwsEc2Volume = "AWS::EC2::Volume" - - // ResourceTypeAwsEc2Vpc is a ResourceType enum value - ResourceTypeAwsEc2Vpc = "AWS::EC2::VPC" - - // ResourceTypeAwsEc2Vpnconnection is a ResourceType enum value - ResourceTypeAwsEc2Vpnconnection = "AWS::EC2::VPNConnection" - - // ResourceTypeAwsEc2Vpngateway is a ResourceType enum value - ResourceTypeAwsEc2Vpngateway = "AWS::EC2::VPNGateway" - - // ResourceTypeAwsIamGroup is a ResourceType enum value - ResourceTypeAwsIamGroup = "AWS::IAM::Group" - - // ResourceTypeAwsIamPolicy is a ResourceType enum value - ResourceTypeAwsIamPolicy = "AWS::IAM::Policy" - - // ResourceTypeAwsIamRole is a ResourceType enum value - ResourceTypeAwsIamRole = "AWS::IAM::Role" - - // ResourceTypeAwsIamUser is a ResourceType enum value - ResourceTypeAwsIamUser = "AWS::IAM::User" - - // ResourceTypeAwsAcmCertificate is a ResourceType enum value - ResourceTypeAwsAcmCertificate = "AWS::ACM::Certificate" - - // ResourceTypeAwsRdsDbinstance is a ResourceType enum value - ResourceTypeAwsRdsDbinstance = "AWS::RDS::DBInstance" - - // ResourceTypeAwsRdsDbsubnetGroup is a ResourceType enum value - ResourceTypeAwsRdsDbsubnetGroup = "AWS::RDS::DBSubnetGroup" - - // ResourceTypeAwsRdsDbsecurityGroup is a ResourceType enum value - ResourceTypeAwsRdsDbsecurityGroup = "AWS::RDS::DBSecurityGroup" - - // ResourceTypeAwsRdsDbsnapshot is a ResourceType enum value - ResourceTypeAwsRdsDbsnapshot = "AWS::RDS::DBSnapshot" - - // ResourceTypeAwsRdsEventSubscription is a ResourceType enum value - ResourceTypeAwsRdsEventSubscription = "AWS::RDS::EventSubscription" - - // ResourceTypeAwsElasticLoadBalancingV2LoadBalancer is a ResourceType enum value - ResourceTypeAwsElasticLoadBalancingV2LoadBalancer = "AWS::ElasticLoadBalancingV2::LoadBalancer" - - // ResourceTypeAwsS3Bucket is a ResourceType enum value - ResourceTypeAwsS3Bucket = "AWS::S3::Bucket" - - // ResourceTypeAwsSsmManagedInstanceInventory is a ResourceType enum value - ResourceTypeAwsSsmManagedInstanceInventory = "AWS::SSM::ManagedInstanceInventory" - - // ResourceTypeAwsRedshiftCluster is a ResourceType enum value - ResourceTypeAwsRedshiftCluster = "AWS::Redshift::Cluster" - - // ResourceTypeAwsRedshiftClusterSnapshot is a ResourceType enum value - ResourceTypeAwsRedshiftClusterSnapshot = "AWS::Redshift::ClusterSnapshot" - - // ResourceTypeAwsRedshiftClusterParameterGroup is a ResourceType enum value - ResourceTypeAwsRedshiftClusterParameterGroup = "AWS::Redshift::ClusterParameterGroup" - - // ResourceTypeAwsRedshiftClusterSecurityGroup is a ResourceType enum value - ResourceTypeAwsRedshiftClusterSecurityGroup = "AWS::Redshift::ClusterSecurityGroup" - - // ResourceTypeAwsRedshiftClusterSubnetGroup is a ResourceType enum value - ResourceTypeAwsRedshiftClusterSubnetGroup = "AWS::Redshift::ClusterSubnetGroup" - - // ResourceTypeAwsRedshiftEventSubscription is a ResourceType enum value - ResourceTypeAwsRedshiftEventSubscription = "AWS::Redshift::EventSubscription" - - // ResourceTypeAwsCloudWatchAlarm is a ResourceType enum value - ResourceTypeAwsCloudWatchAlarm = "AWS::CloudWatch::Alarm" - - // ResourceTypeAwsCloudFormationStack is a ResourceType enum value - ResourceTypeAwsCloudFormationStack = "AWS::CloudFormation::Stack" - - // ResourceTypeAwsDynamoDbTable is a ResourceType enum value - ResourceTypeAwsDynamoDbTable = "AWS::DynamoDB::Table" - - // ResourceTypeAwsAutoScalingAutoScalingGroup is a ResourceType enum value - ResourceTypeAwsAutoScalingAutoScalingGroup = "AWS::AutoScaling::AutoScalingGroup" - - // ResourceTypeAwsAutoScalingLaunchConfiguration is a ResourceType enum value - ResourceTypeAwsAutoScalingLaunchConfiguration = "AWS::AutoScaling::LaunchConfiguration" - - // ResourceTypeAwsAutoScalingScalingPolicy is a ResourceType enum value - ResourceTypeAwsAutoScalingScalingPolicy = "AWS::AutoScaling::ScalingPolicy" - - // ResourceTypeAwsAutoScalingScheduledAction is a ResourceType enum value - ResourceTypeAwsAutoScalingScheduledAction = "AWS::AutoScaling::ScheduledAction" - - // ResourceTypeAwsCodeBuildProject is a ResourceType enum value - ResourceTypeAwsCodeBuildProject = "AWS::CodeBuild::Project" - - // ResourceTypeAwsWafRateBasedRule is a ResourceType enum value - ResourceTypeAwsWafRateBasedRule = "AWS::WAF::RateBasedRule" - - // ResourceTypeAwsWafRule is a ResourceType enum value - ResourceTypeAwsWafRule = "AWS::WAF::Rule" - - // ResourceTypeAwsWafWebAcl is a ResourceType enum value - ResourceTypeAwsWafWebAcl = "AWS::WAF::WebACL" - - // ResourceTypeAwsWafregionalRateBasedRule is a ResourceType enum value - ResourceTypeAwsWafregionalRateBasedRule = "AWS::WAFRegional::RateBasedRule" - - // ResourceTypeAwsWafregionalRule is a ResourceType enum value - ResourceTypeAwsWafregionalRule = "AWS::WAFRegional::Rule" - - // ResourceTypeAwsWafregionalWebAcl is a ResourceType enum value - ResourceTypeAwsWafregionalWebAcl = "AWS::WAFRegional::WebACL" - - // ResourceTypeAwsCloudFrontDistribution is a ResourceType enum value - ResourceTypeAwsCloudFrontDistribution = "AWS::CloudFront::Distribution" - - // ResourceTypeAwsCloudFrontStreamingDistribution is a ResourceType enum value - ResourceTypeAwsCloudFrontStreamingDistribution = "AWS::CloudFront::StreamingDistribution" - - // ResourceTypeAwsWafRuleGroup is a ResourceType enum value - ResourceTypeAwsWafRuleGroup = "AWS::WAF::RuleGroup" - - // ResourceTypeAwsWafregionalRuleGroup is a ResourceType enum value - ResourceTypeAwsWafregionalRuleGroup = "AWS::WAFRegional::RuleGroup" - - // ResourceTypeAwsLambdaFunction is a ResourceType enum value - ResourceTypeAwsLambdaFunction = "AWS::Lambda::Function" - - // ResourceTypeAwsElasticBeanstalkApplication is a ResourceType enum value - ResourceTypeAwsElasticBeanstalkApplication = "AWS::ElasticBeanstalk::Application" - - // ResourceTypeAwsElasticBeanstalkApplicationVersion is a ResourceType enum value - ResourceTypeAwsElasticBeanstalkApplicationVersion = "AWS::ElasticBeanstalk::ApplicationVersion" - - // ResourceTypeAwsElasticBeanstalkEnvironment is a ResourceType enum value - ResourceTypeAwsElasticBeanstalkEnvironment = "AWS::ElasticBeanstalk::Environment" - - // ResourceTypeAwsElasticLoadBalancingLoadBalancer is a ResourceType enum value - ResourceTypeAwsElasticLoadBalancingLoadBalancer = "AWS::ElasticLoadBalancing::LoadBalancer" - - // ResourceTypeAwsXrayEncryptionConfig is a ResourceType enum value - ResourceTypeAwsXrayEncryptionConfig = "AWS::XRay::EncryptionConfig" - - // ResourceTypeAwsSsmAssociationCompliance is a ResourceType enum value - ResourceTypeAwsSsmAssociationCompliance = "AWS::SSM::AssociationCompliance" - - // ResourceTypeAwsSsmPatchCompliance is a ResourceType enum value - ResourceTypeAwsSsmPatchCompliance = "AWS::SSM::PatchCompliance" - - // ResourceTypeAwsShieldProtection is a ResourceType enum value - ResourceTypeAwsShieldProtection = "AWS::Shield::Protection" - - // ResourceTypeAwsShieldRegionalProtection is a ResourceType enum value - ResourceTypeAwsShieldRegionalProtection = "AWS::ShieldRegional::Protection" - - // ResourceTypeAwsConfigResourceCompliance is a ResourceType enum value - ResourceTypeAwsConfigResourceCompliance = "AWS::Config::ResourceCompliance" - - // ResourceTypeAwsCodePipelinePipeline is a ResourceType enum value - ResourceTypeAwsCodePipelinePipeline = "AWS::CodePipeline::Pipeline" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/doc.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/doc.go deleted file mode 100644 index 853be2267..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/doc.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package configservice provides the client and types for making API -// requests to AWS Config. -// -// AWS Config provides a way to keep track of the configurations of all the -// AWS resources associated with your AWS account. You can use AWS Config to -// get the current and historical configurations of each AWS resource and also -// to get information about the relationship between the resources. An AWS resource -// can be an Amazon Compute Cloud (Amazon EC2) instance, an Elastic Block Store -// (EBS) volume, an elastic network Interface (ENI), or a security group. For -// a complete list of resources currently supported by AWS Config, see Supported -// AWS Resources (http://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html#supported-resources). -// -// You can access and manage AWS Config through the AWS Management Console, -// the AWS Command Line Interface (AWS CLI), the AWS Config API, or the AWS -// SDKs for AWS Config. This reference guide contains documentation for the -// AWS Config API and the AWS CLI commands that you can use to manage AWS Config. -// The AWS Config API uses the Signature Version 4 protocol for signing requests. -// For more information about how to sign a request with this protocol, see -// Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). -// For detailed information about AWS Config features and their associated actions -// or commands, as well as how to work with AWS Management Console, see What -// Is AWS Config (http://docs.aws.amazon.com/config/latest/developerguide/WhatIsConfig.html) -// in the AWS Config Developer Guide. -// -// See https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12 for more information on this service. -// -// See configservice package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/configservice/ -// -// Using the Client -// -// To contact AWS Config 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 Config client ConfigService for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/configservice/#New -package configservice diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go deleted file mode 100644 index 4ffa6dbdc..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go +++ /dev/null @@ -1,239 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package configservice - -const ( - - // ErrCodeInsufficientDeliveryPolicyException for service response error code - // "InsufficientDeliveryPolicyException". - // - // Your Amazon S3 bucket policy does not permit AWS Config to write to it. - ErrCodeInsufficientDeliveryPolicyException = "InsufficientDeliveryPolicyException" - - // ErrCodeInsufficientPermissionsException for service response error code - // "InsufficientPermissionsException". - // - // Indicates one of the following errors: - // - // * The rule cannot be created because the IAM role assigned to AWS Config - // lacks permissions to perform the config:Put* action. - // - // * The AWS Lambda function cannot be invoked. Check the function ARN, and - // check the function's permissions. - ErrCodeInsufficientPermissionsException = "InsufficientPermissionsException" - - // ErrCodeInvalidConfigurationRecorderNameException for service response error code - // "InvalidConfigurationRecorderNameException". - // - // You have provided a configuration recorder name that is not valid. - ErrCodeInvalidConfigurationRecorderNameException = "InvalidConfigurationRecorderNameException" - - // ErrCodeInvalidDeliveryChannelNameException for service response error code - // "InvalidDeliveryChannelNameException". - // - // The specified delivery channel name is not valid. - ErrCodeInvalidDeliveryChannelNameException = "InvalidDeliveryChannelNameException" - - // ErrCodeInvalidLimitException for service response error code - // "InvalidLimitException". - // - // The specified limit is outside the allowable range. - ErrCodeInvalidLimitException = "InvalidLimitException" - - // ErrCodeInvalidNextTokenException for service response error code - // "InvalidNextTokenException". - // - // The specified next token is invalid. Specify the nextToken string that was - // returned in the previous response to get the next page of results. - ErrCodeInvalidNextTokenException = "InvalidNextTokenException" - - // ErrCodeInvalidParameterValueException for service response error code - // "InvalidParameterValueException". - // - // One or more of the specified parameters are invalid. Verify that your parameters - // are valid and try again. - ErrCodeInvalidParameterValueException = "InvalidParameterValueException" - - // ErrCodeInvalidRecordingGroupException for service response error code - // "InvalidRecordingGroupException". - // - // AWS Config throws an exception if the recording group does not contain a - // valid list of resource types. Invalid values might also be incorrectly formatted. - ErrCodeInvalidRecordingGroupException = "InvalidRecordingGroupException" - - // ErrCodeInvalidResultTokenException for service response error code - // "InvalidResultTokenException". - // - // The specified ResultToken is invalid. - ErrCodeInvalidResultTokenException = "InvalidResultTokenException" - - // ErrCodeInvalidRoleException for service response error code - // "InvalidRoleException". - // - // You have provided a null or empty role ARN. - ErrCodeInvalidRoleException = "InvalidRoleException" - - // ErrCodeInvalidS3KeyPrefixException for service response error code - // "InvalidS3KeyPrefixException". - // - // The specified Amazon S3 key prefix is not valid. - ErrCodeInvalidS3KeyPrefixException = "InvalidS3KeyPrefixException" - - // ErrCodeInvalidSNSTopicARNException for service response error code - // "InvalidSNSTopicARNException". - // - // The specified Amazon SNS topic does not exist. - ErrCodeInvalidSNSTopicARNException = "InvalidSNSTopicARNException" - - // ErrCodeInvalidTimeRangeException for service response error code - // "InvalidTimeRangeException". - // - // The specified time range is not valid. The earlier time is not chronologically - // before the later time. - ErrCodeInvalidTimeRangeException = "InvalidTimeRangeException" - - // ErrCodeLastDeliveryChannelDeleteFailedException for service response error code - // "LastDeliveryChannelDeleteFailedException". - // - // You cannot delete the delivery channel you specified because the configuration - // recorder is running. - ErrCodeLastDeliveryChannelDeleteFailedException = "LastDeliveryChannelDeleteFailedException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // For StartConfigRulesEvaluation API, this exception is thrown if an evaluation - // is in progress or if you call the StartConfigRulesEvaluation API more than - // once per minute. - // - // For PutConfigurationAggregator API, this exception is thrown if the number - // of accounts and aggregators exceeds the limit. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeMaxNumberOfConfigRulesExceededException for service response error code - // "MaxNumberOfConfigRulesExceededException". - // - // Failed to add the AWS Config rule because the account already contains the - // maximum number of 50 rules. Consider deleting any deactivated rules before - // you add new rules. - ErrCodeMaxNumberOfConfigRulesExceededException = "MaxNumberOfConfigRulesExceededException" - - // ErrCodeMaxNumberOfConfigurationRecordersExceededException for service response error code - // "MaxNumberOfConfigurationRecordersExceededException". - // - // You have reached the limit of the number of recorders you can create. - ErrCodeMaxNumberOfConfigurationRecordersExceededException = "MaxNumberOfConfigurationRecordersExceededException" - - // ErrCodeMaxNumberOfDeliveryChannelsExceededException for service response error code - // "MaxNumberOfDeliveryChannelsExceededException". - // - // You have reached the limit of the number of delivery channels you can create. - ErrCodeMaxNumberOfDeliveryChannelsExceededException = "MaxNumberOfDeliveryChannelsExceededException" - - // ErrCodeMaxNumberOfRetentionConfigurationsExceededException for service response error code - // "MaxNumberOfRetentionConfigurationsExceededException". - // - // Failed to add the retention configuration because a retention configuration - // with that name already exists. - ErrCodeMaxNumberOfRetentionConfigurationsExceededException = "MaxNumberOfRetentionConfigurationsExceededException" - - // ErrCodeNoAvailableConfigurationRecorderException for service response error code - // "NoAvailableConfigurationRecorderException". - // - // There are no configuration recorders available to provide the role needed - // to describe your resources. Create a configuration recorder. - ErrCodeNoAvailableConfigurationRecorderException = "NoAvailableConfigurationRecorderException" - - // ErrCodeNoAvailableDeliveryChannelException for service response error code - // "NoAvailableDeliveryChannelException". - // - // There is no delivery channel available to record configurations. - ErrCodeNoAvailableDeliveryChannelException = "NoAvailableDeliveryChannelException" - - // ErrCodeNoAvailableOrganizationException for service response error code - // "NoAvailableOrganizationException". - // - // Organization does is no longer available. - ErrCodeNoAvailableOrganizationException = "NoAvailableOrganizationException" - - // ErrCodeNoRunningConfigurationRecorderException for service response error code - // "NoRunningConfigurationRecorderException". - // - // There is no configuration recorder running. - ErrCodeNoRunningConfigurationRecorderException = "NoRunningConfigurationRecorderException" - - // ErrCodeNoSuchBucketException for service response error code - // "NoSuchBucketException". - // - // The specified Amazon S3 bucket does not exist. - ErrCodeNoSuchBucketException = "NoSuchBucketException" - - // ErrCodeNoSuchConfigRuleException for service response error code - // "NoSuchConfigRuleException". - // - // One or more AWS Config rules in the request are invalid. Verify that the - // rule names are correct and try again. - ErrCodeNoSuchConfigRuleException = "NoSuchConfigRuleException" - - // ErrCodeNoSuchConfigurationAggregatorException for service response error code - // "NoSuchConfigurationAggregatorException". - // - // You have specified a configuration aggregator that does not exist. - ErrCodeNoSuchConfigurationAggregatorException = "NoSuchConfigurationAggregatorException" - - // ErrCodeNoSuchConfigurationRecorderException for service response error code - // "NoSuchConfigurationRecorderException". - // - // You have specified a configuration recorder that does not exist. - ErrCodeNoSuchConfigurationRecorderException = "NoSuchConfigurationRecorderException" - - // ErrCodeNoSuchDeliveryChannelException for service response error code - // "NoSuchDeliveryChannelException". - // - // You have specified a delivery channel that does not exist. - ErrCodeNoSuchDeliveryChannelException = "NoSuchDeliveryChannelException" - - // ErrCodeNoSuchRetentionConfigurationException for service response error code - // "NoSuchRetentionConfigurationException". - // - // You have specified a retention configuration that does not exist. - ErrCodeNoSuchRetentionConfigurationException = "NoSuchRetentionConfigurationException" - - // ErrCodeOrganizationAccessDeniedException for service response error code - // "OrganizationAccessDeniedException". - // - // No permission to call the EnableAWSServiceAccess API. - ErrCodeOrganizationAccessDeniedException = "OrganizationAccessDeniedException" - - // ErrCodeOrganizationAllFeaturesNotEnabledException for service response error code - // "OrganizationAllFeaturesNotEnabledException". - // - // The configuration aggregator cannot be created because organization does - // not have all features enabled. - ErrCodeOrganizationAllFeaturesNotEnabledException = "OrganizationAllFeaturesNotEnabledException" - - // ErrCodeOversizedConfigurationItemException for service response error code - // "OversizedConfigurationItemException". - // - // The configuration item size is outside the allowable range. - ErrCodeOversizedConfigurationItemException = "OversizedConfigurationItemException" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUseException". - // - // The rule is currently being deleted or the rule is deleting your evaluation - // results. Try your request again later. - ErrCodeResourceInUseException = "ResourceInUseException" - - // ErrCodeResourceNotDiscoveredException for service response error code - // "ResourceNotDiscoveredException". - // - // You have specified a resource that is either unknown or has not been discovered. - ErrCodeResourceNotDiscoveredException = "ResourceNotDiscoveredException" - - // ErrCodeValidationException for service response error code - // "ValidationException". - // - // The requested action is not valid. - ErrCodeValidationException = "ValidationException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/service.go deleted file mode 100644 index 2fdea9556..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package configservice - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// ConfigService provides the API operation methods for making requests to -// AWS Config. See this package's package overview docs -// for details on the service. -// -// ConfigService methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ConfigService 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 = "config" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Config Service" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ConfigService client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a ConfigService client from just a session. -// svc := configservice.New(mySession) -// -// // Create a ConfigService client with additional configuration -// svc := configservice.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ConfigService { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ConfigService { - svc := &ConfigService{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-11-12", - JSONVersion: "1.1", - TargetPrefix: "StarlingDoveService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ConfigService operation and runs any -// custom request initialization. -func (c *ConfigService) 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/costandusagereportservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/api.go deleted file mode 100644 index a8e52b677..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/api.go +++ /dev/null @@ -1,728 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package costandusagereportservice - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opDeleteReportDefinition = "DeleteReportDefinition" - -// DeleteReportDefinitionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteReportDefinition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteReportDefinition for more information on using the DeleteReportDefinition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteReportDefinitionRequest method. -// req, resp := client.DeleteReportDefinitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinition -func (c *CostandUsageReportService) DeleteReportDefinitionRequest(input *DeleteReportDefinitionInput) (req *request.Request, output *DeleteReportDefinitionOutput) { - op := &request.Operation{ - Name: opDeleteReportDefinition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteReportDefinitionInput{} - } - - output = &DeleteReportDefinitionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteReportDefinition API operation for AWS Cost and Usage Report Service. -// -// Delete a specified report 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 Cost and Usage Report Service's -// API operation DeleteReportDefinition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown on a known dependency failure. -// -// * ErrCodeValidationException "ValidationException" -// This exception is thrown when providing an invalid input. eg. Put a report -// preference with an invalid report name, or Delete a report preference with -// an empty report name. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinition -func (c *CostandUsageReportService) DeleteReportDefinition(input *DeleteReportDefinitionInput) (*DeleteReportDefinitionOutput, error) { - req, out := c.DeleteReportDefinitionRequest(input) - return out, req.Send() -} - -// DeleteReportDefinitionWithContext is the same as DeleteReportDefinition with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteReportDefinition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CostandUsageReportService) DeleteReportDefinitionWithContext(ctx aws.Context, input *DeleteReportDefinitionInput, opts ...request.Option) (*DeleteReportDefinitionOutput, error) { - req, out := c.DeleteReportDefinitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeReportDefinitions = "DescribeReportDefinitions" - -// DescribeReportDefinitionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReportDefinitions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReportDefinitions for more information on using the DescribeReportDefinitions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReportDefinitionsRequest method. -// req, resp := client.DescribeReportDefinitionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions -func (c *CostandUsageReportService) DescribeReportDefinitionsRequest(input *DescribeReportDefinitionsInput) (req *request.Request, output *DescribeReportDefinitionsOutput) { - op := &request.Operation{ - Name: opDescribeReportDefinitions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReportDefinitionsInput{} - } - - output = &DescribeReportDefinitionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReportDefinitions API operation for AWS Cost and Usage Report Service. -// -// Describe a list of report definitions owned by the account -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cost and Usage Report Service's -// API operation DescribeReportDefinitions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown on a known dependency failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions -func (c *CostandUsageReportService) DescribeReportDefinitions(input *DescribeReportDefinitionsInput) (*DescribeReportDefinitionsOutput, error) { - req, out := c.DescribeReportDefinitionsRequest(input) - return out, req.Send() -} - -// DescribeReportDefinitionsWithContext is the same as DescribeReportDefinitions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReportDefinitions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CostandUsageReportService) DescribeReportDefinitionsWithContext(ctx aws.Context, input *DescribeReportDefinitionsInput, opts ...request.Option) (*DescribeReportDefinitionsOutput, error) { - req, out := c.DescribeReportDefinitionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReportDefinitionsPages iterates over the pages of a DescribeReportDefinitions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReportDefinitions 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 DescribeReportDefinitions operation. -// pageNum := 0 -// err := client.DescribeReportDefinitionsPages(params, -// func(page *DescribeReportDefinitionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CostandUsageReportService) DescribeReportDefinitionsPages(input *DescribeReportDefinitionsInput, fn func(*DescribeReportDefinitionsOutput, bool) bool) error { - return c.DescribeReportDefinitionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReportDefinitionsPagesWithContext same as DescribeReportDefinitionsPages 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 *CostandUsageReportService) DescribeReportDefinitionsPagesWithContext(ctx aws.Context, input *DescribeReportDefinitionsInput, fn func(*DescribeReportDefinitionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReportDefinitionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReportDefinitionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReportDefinitionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opPutReportDefinition = "PutReportDefinition" - -// PutReportDefinitionRequest generates a "aws/request.Request" representing the -// client's request for the PutReportDefinition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutReportDefinition for more information on using the PutReportDefinition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutReportDefinitionRequest method. -// req, resp := client.PutReportDefinitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinition -func (c *CostandUsageReportService) PutReportDefinitionRequest(input *PutReportDefinitionInput) (req *request.Request, output *PutReportDefinitionOutput) { - op := &request.Operation{ - Name: opPutReportDefinition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutReportDefinitionInput{} - } - - output = &PutReportDefinitionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutReportDefinition API operation for AWS Cost and Usage Report Service. -// -// Create a new report 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 Cost and Usage Report Service's -// API operation PutReportDefinition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDuplicateReportNameException "DuplicateReportNameException" -// This exception is thrown when putting a report preference with a name that -// already exists. -// -// * ErrCodeReportLimitReachedException "ReportLimitReachedException" -// This exception is thrown when the number of report preference reaches max -// limit. The max number is 5. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// This exception is thrown on a known dependency failure. -// -// * ErrCodeValidationException "ValidationException" -// This exception is thrown when providing an invalid input. eg. Put a report -// preference with an invalid report name, or Delete a report preference with -// an empty report name. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinition -func (c *CostandUsageReportService) PutReportDefinition(input *PutReportDefinitionInput) (*PutReportDefinitionOutput, error) { - req, out := c.PutReportDefinitionRequest(input) - return out, req.Send() -} - -// PutReportDefinitionWithContext is the same as PutReportDefinition with the addition of -// the ability to pass a context and additional request options. -// -// See PutReportDefinition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CostandUsageReportService) PutReportDefinitionWithContext(ctx aws.Context, input *PutReportDefinitionInput, opts ...request.Option) (*PutReportDefinitionOutput, error) { - req, out := c.PutReportDefinitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Request of DeleteReportDefinition -type DeleteReportDefinitionInput struct { - _ struct{} `type:"structure"` - - // Preferred name for a report, it has to be unique. Must starts with a number/letter, - // case sensitive. Limited to 256 characters. - ReportName *string `type:"string"` -} - -// String returns the string representation -func (s DeleteReportDefinitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReportDefinitionInput) GoString() string { - return s.String() -} - -// SetReportName sets the ReportName field's value. -func (s *DeleteReportDefinitionInput) SetReportName(v string) *DeleteReportDefinitionInput { - s.ReportName = &v - return s -} - -// Response of DeleteReportDefinition -type DeleteReportDefinitionOutput struct { - _ struct{} `type:"structure"` - - // A message indicates if the deletion is successful. - ResponseMessage *string `type:"string"` -} - -// String returns the string representation -func (s DeleteReportDefinitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReportDefinitionOutput) GoString() string { - return s.String() -} - -// SetResponseMessage sets the ResponseMessage field's value. -func (s *DeleteReportDefinitionOutput) SetResponseMessage(v string) *DeleteReportDefinitionOutput { - s.ResponseMessage = &v - return s -} - -// Request of DescribeReportDefinitions -type DescribeReportDefinitionsInput struct { - _ struct{} `type:"structure"` - - // The max number of results returned by the operation. - MaxResults *int64 `min:"5" type:"integer"` - - // A generic string. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeReportDefinitionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReportDefinitionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeReportDefinitionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeReportDefinitionsInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeReportDefinitionsInput) SetMaxResults(v int64) *DescribeReportDefinitionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeReportDefinitionsInput) SetNextToken(v string) *DescribeReportDefinitionsInput { - s.NextToken = &v - return s -} - -// Response of DescribeReportDefinitions -type DescribeReportDefinitionsOutput struct { - _ struct{} `type:"structure"` - - // A generic string. - NextToken *string `type:"string"` - - // A list of report definitions. - ReportDefinitions []*ReportDefinition `type:"list"` -} - -// String returns the string representation -func (s DescribeReportDefinitionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReportDefinitionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeReportDefinitionsOutput) SetNextToken(v string) *DescribeReportDefinitionsOutput { - s.NextToken = &v - return s -} - -// SetReportDefinitions sets the ReportDefinitions field's value. -func (s *DescribeReportDefinitionsOutput) SetReportDefinitions(v []*ReportDefinition) *DescribeReportDefinitionsOutput { - s.ReportDefinitions = v - return s -} - -// Request of PutReportDefinition -type PutReportDefinitionInput struct { - _ struct{} `type:"structure"` - - // The definition of AWS Cost and Usage Report. Customer can specify the report - // name, time unit, report format, compression format, S3 bucket and additional - // artifacts and schema elements in the definition. - // - // ReportDefinition is a required field - ReportDefinition *ReportDefinition `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PutReportDefinitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutReportDefinitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutReportDefinitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutReportDefinitionInput"} - if s.ReportDefinition == nil { - invalidParams.Add(request.NewErrParamRequired("ReportDefinition")) - } - if s.ReportDefinition != nil { - if err := s.ReportDefinition.Validate(); err != nil { - invalidParams.AddNested("ReportDefinition", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReportDefinition sets the ReportDefinition field's value. -func (s *PutReportDefinitionInput) SetReportDefinition(v *ReportDefinition) *PutReportDefinitionInput { - s.ReportDefinition = v - return s -} - -// Response of PutReportDefinition -type PutReportDefinitionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutReportDefinitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutReportDefinitionOutput) GoString() string { - return s.String() -} - -// The definition of AWS Cost and Usage Report. Customer can specify the report -// name, time unit, report format, compression format, S3 bucket and additional -// artifacts and schema elements in the definition. -type ReportDefinition struct { - _ struct{} `type:"structure"` - - // A list of additional artifacts. - AdditionalArtifacts []*string `type:"list"` - - // A list of schema elements. - // - // AdditionalSchemaElements is a required field - AdditionalSchemaElements []*string `type:"list" required:"true"` - - // Preferred compression format for report. - // - // Compression is a required field - Compression *string `type:"string" required:"true" enum:"CompressionFormat"` - - // Preferred format for report. - // - // Format is a required field - Format *string `type:"string" required:"true" enum:"ReportFormat"` - - // Preferred name for a report, it has to be unique. Must starts with a number/letter, - // case sensitive. Limited to 256 characters. - // - // ReportName is a required field - ReportName *string `type:"string" required:"true"` - - // Name of customer S3 bucket. - // - // S3Bucket is a required field - S3Bucket *string `type:"string" required:"true"` - - // Preferred report path prefix. Limited to 256 characters. - // - // S3Prefix is a required field - S3Prefix *string `type:"string" required:"true"` - - // Region of customer S3 bucket. - // - // S3Region is a required field - S3Region *string `type:"string" required:"true" enum:"AWSRegion"` - - // The frequency on which report data are measured and displayed. - // - // TimeUnit is a required field - TimeUnit *string `type:"string" required:"true" enum:"TimeUnit"` -} - -// String returns the string representation -func (s ReportDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReportDefinition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReportDefinition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReportDefinition"} - if s.AdditionalSchemaElements == nil { - invalidParams.Add(request.NewErrParamRequired("AdditionalSchemaElements")) - } - if s.Compression == nil { - invalidParams.Add(request.NewErrParamRequired("Compression")) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) - } - if s.ReportName == nil { - invalidParams.Add(request.NewErrParamRequired("ReportName")) - } - if s.S3Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("S3Bucket")) - } - if s.S3Prefix == nil { - invalidParams.Add(request.NewErrParamRequired("S3Prefix")) - } - if s.S3Region == nil { - invalidParams.Add(request.NewErrParamRequired("S3Region")) - } - if s.TimeUnit == nil { - invalidParams.Add(request.NewErrParamRequired("TimeUnit")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdditionalArtifacts sets the AdditionalArtifacts field's value. -func (s *ReportDefinition) SetAdditionalArtifacts(v []*string) *ReportDefinition { - s.AdditionalArtifacts = v - return s -} - -// SetAdditionalSchemaElements sets the AdditionalSchemaElements field's value. -func (s *ReportDefinition) SetAdditionalSchemaElements(v []*string) *ReportDefinition { - s.AdditionalSchemaElements = v - return s -} - -// SetCompression sets the Compression field's value. -func (s *ReportDefinition) SetCompression(v string) *ReportDefinition { - s.Compression = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *ReportDefinition) SetFormat(v string) *ReportDefinition { - s.Format = &v - return s -} - -// SetReportName sets the ReportName field's value. -func (s *ReportDefinition) SetReportName(v string) *ReportDefinition { - s.ReportName = &v - return s -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *ReportDefinition) SetS3Bucket(v string) *ReportDefinition { - s.S3Bucket = &v - return s -} - -// SetS3Prefix sets the S3Prefix field's value. -func (s *ReportDefinition) SetS3Prefix(v string) *ReportDefinition { - s.S3Prefix = &v - return s -} - -// SetS3Region sets the S3Region field's value. -func (s *ReportDefinition) SetS3Region(v string) *ReportDefinition { - s.S3Region = &v - return s -} - -// SetTimeUnit sets the TimeUnit field's value. -func (s *ReportDefinition) SetTimeUnit(v string) *ReportDefinition { - s.TimeUnit = &v - return s -} - -// Region of customer S3 bucket. -const ( - // AWSRegionUsEast1 is a AWSRegion enum value - AWSRegionUsEast1 = "us-east-1" - - // AWSRegionUsWest1 is a AWSRegion enum value - AWSRegionUsWest1 = "us-west-1" - - // AWSRegionUsWest2 is a AWSRegion enum value - AWSRegionUsWest2 = "us-west-2" - - // AWSRegionEuCentral1 is a AWSRegion enum value - AWSRegionEuCentral1 = "eu-central-1" - - // AWSRegionEuWest1 is a AWSRegion enum value - AWSRegionEuWest1 = "eu-west-1" - - // AWSRegionApSoutheast1 is a AWSRegion enum value - AWSRegionApSoutheast1 = "ap-southeast-1" - - // AWSRegionApSoutheast2 is a AWSRegion enum value - AWSRegionApSoutheast2 = "ap-southeast-2" - - // AWSRegionApNortheast1 is a AWSRegion enum value - AWSRegionApNortheast1 = "ap-northeast-1" -) - -// Enable support for Redshift and/or QuickSight. -const ( - // AdditionalArtifactRedshift is a AdditionalArtifact enum value - AdditionalArtifactRedshift = "REDSHIFT" - - // AdditionalArtifactQuicksight is a AdditionalArtifact enum value - AdditionalArtifactQuicksight = "QUICKSIGHT" -) - -// Preferred compression format for report. -const ( - // CompressionFormatZip is a CompressionFormat enum value - CompressionFormatZip = "ZIP" - - // CompressionFormatGzip is a CompressionFormat enum value - CompressionFormatGzip = "GZIP" -) - -// Preferred format for report. -const ( - // ReportFormatTextOrcsv is a ReportFormat enum value - ReportFormatTextOrcsv = "textORcsv" -) - -// Preference of including Resource IDs. You can include additional details -// about individual resource IDs in your report. -const ( - // SchemaElementResources is a SchemaElement enum value - SchemaElementResources = "RESOURCES" -) - -// The frequency on which report data are measured and displayed. -const ( - // TimeUnitHourly is a TimeUnit enum value - TimeUnitHourly = "HOURLY" - - // TimeUnitDaily is a TimeUnit enum value - TimeUnitDaily = "DAILY" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/doc.go b/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/doc.go deleted file mode 100644 index 5a3a46098..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package costandusagereportservice provides the client and types for making API -// requests to AWS Cost and Usage Report Service. -// -// All public APIs for AWS Cost and Usage Report service -// -// See https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06 for more information on this service. -// -// See costandusagereportservice package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/costandusagereportservice/ -// -// Using the Client -// -// To contact AWS Cost and Usage Report Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS Cost and Usage Report Service client CostandUsageReportService for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/costandusagereportservice/#New -package costandusagereportservice diff --git a/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/errors.go deleted file mode 100644 index 11a8d5209..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/errors.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package costandusagereportservice - -const ( - - // ErrCodeDuplicateReportNameException for service response error code - // "DuplicateReportNameException". - // - // This exception is thrown when putting a report preference with a name that - // already exists. - ErrCodeDuplicateReportNameException = "DuplicateReportNameException" - - // ErrCodeInternalErrorException for service response error code - // "InternalErrorException". - // - // This exception is thrown on a known dependency failure. - ErrCodeInternalErrorException = "InternalErrorException" - - // ErrCodeReportLimitReachedException for service response error code - // "ReportLimitReachedException". - // - // This exception is thrown when the number of report preference reaches max - // limit. The max number is 5. - ErrCodeReportLimitReachedException = "ReportLimitReachedException" - - // ErrCodeValidationException for service response error code - // "ValidationException". - // - // This exception is thrown when providing an invalid input. eg. Put a report - // preference with an invalid report name, or Delete a report preference with - // an empty report name. - ErrCodeValidationException = "ValidationException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/service.go deleted file mode 100644 index 39e3cedfe..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/service.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package costandusagereportservice - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// CostandUsageReportService provides the API operation methods for making requests to -// AWS Cost and Usage Report Service. See this package's package overview docs -// for details on the service. -// -// CostandUsageReportService methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CostandUsageReportService 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 = "cur" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Cost and Usage Report Service" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the CostandUsageReportService 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 CostandUsageReportService client from just a session. -// svc := costandusagereportservice.New(mySession) -// -// // Create a CostandUsageReportService client with additional configuration -// svc := costandusagereportservice.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CostandUsageReportService { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "cur" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CostandUsageReportService { - svc := &CostandUsageReportService{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-01-06", - JSONVersion: "1.1", - TargetPrefix: "AWSOrigamiServiceGatewayService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CostandUsageReportService operation and runs any -// custom request initialization. -func (c *CostandUsageReportService) 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/databasemigrationservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go deleted file mode 100644 index 831d8d4bd..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go +++ /dev/null @@ -1,11803 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package databasemigrationservice - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAddTagsToResource = "AddTagsToResource" - -// AddTagsToResourceRequest generates a "aws/request.Request" representing the -// client's request for the AddTagsToResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTagsToResource for more information on using the AddTagsToResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsToResourceRequest method. -// req, resp := client.AddTagsToResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/AddTagsToResource -func (c *DatabaseMigrationService) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *request.Request, output *AddTagsToResourceOutput) { - op := &request.Operation{ - Name: opAddTagsToResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsToResourceInput{} - } - - output = &AddTagsToResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTagsToResource API operation for AWS Database Migration Service. -// -// Adds metadata tags to an AWS DMS resource, including replication instance, -// endpoint, security group, and migration task. These tags can also be used -// with cost allocation reporting to track cost associated with DMS resources, -// or used in a Condition statement in an IAM policy for DMS. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation AddTagsToResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/AddTagsToResource -func (c *DatabaseMigrationService) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { - req, out := c.AddTagsToResourceRequest(input) - return out, req.Send() -} - -// AddTagsToResourceWithContext is the same as AddTagsToResource with the addition of -// the ability to pass a context and additional request options. -// -// See AddTagsToResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) AddTagsToResourceWithContext(ctx aws.Context, input *AddTagsToResourceInput, opts ...request.Option) (*AddTagsToResourceOutput, error) { - req, out := c.AddTagsToResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateEndpoint = "CreateEndpoint" - -// CreateEndpointRequest generates a "aws/request.Request" representing the -// client's request for the CreateEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateEndpoint for more information on using the CreateEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateEndpointRequest method. -// req, resp := client.CreateEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/CreateEndpoint -func (c *DatabaseMigrationService) CreateEndpointRequest(input *CreateEndpointInput) (req *request.Request, output *CreateEndpointOutput) { - op := &request.Operation{ - Name: opCreateEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateEndpointInput{} - } - - output = &CreateEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateEndpoint API operation for AWS Database Migration Service. -// -// Creates an endpoint using the provided settings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation CreateEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// AWS DMS cannot access the KMS key. -// -// * ErrCodeResourceAlreadyExistsFault "ResourceAlreadyExistsFault" -// The resource you are attempting to create already exists. -// -// * ErrCodeResourceQuotaExceededFault "ResourceQuotaExceededFault" -// The quota for this resource quota has been exceeded. -// -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeAccessDeniedFault "AccessDeniedFault" -// AWS DMS was denied access to the endpoint. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/CreateEndpoint -func (c *DatabaseMigrationService) CreateEndpoint(input *CreateEndpointInput) (*CreateEndpointOutput, error) { - req, out := c.CreateEndpointRequest(input) - return out, req.Send() -} - -// CreateEndpointWithContext is the same as CreateEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See CreateEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) CreateEndpointWithContext(ctx aws.Context, input *CreateEndpointInput, opts ...request.Option) (*CreateEndpointOutput, error) { - req, out := c.CreateEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateEventSubscription = "CreateEventSubscription" - -// CreateEventSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the CreateEventSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateEventSubscription for more information on using the CreateEventSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateEventSubscriptionRequest method. -// req, resp := client.CreateEventSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/CreateEventSubscription -func (c *DatabaseMigrationService) CreateEventSubscriptionRequest(input *CreateEventSubscriptionInput) (req *request.Request, output *CreateEventSubscriptionOutput) { - op := &request.Operation{ - Name: opCreateEventSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateEventSubscriptionInput{} - } - - output = &CreateEventSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateEventSubscription API operation for AWS Database Migration Service. -// -// Creates an AWS DMS event notification subscription. -// -// You can specify the type of source (SourceType) you want to be notified of, -// provide a list of AWS DMS source IDs (SourceIds) that triggers the events, -// and provide a list of event categories (EventCategories) for events you want -// to be notified of. If you specify both the SourceType and SourceIds, such -// as SourceType = replication-instance and SourceIdentifier = my-replinstance, -// you will be notified of all the replication instance events for the specified -// source. If you specify a SourceType but don't specify a SourceIdentifier, -// you receive notice of the events for that source type for all your AWS DMS -// sources. If you don't specify either SourceType nor SourceIdentifier, you -// will be notified of events generated from all AWS DMS sources belonging to -// your customer account. -// -// For more information about AWS DMS events, see Working with Events and Notifications -// (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Events.html) in the -// AWS Database Migration Service User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation CreateEventSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceQuotaExceededFault "ResourceQuotaExceededFault" -// The quota for this resource quota has been exceeded. -// -// * ErrCodeResourceAlreadyExistsFault "ResourceAlreadyExistsFault" -// The resource you are attempting to create already exists. -// -// * ErrCodeSNSInvalidTopicFault "SNSInvalidTopicFault" -// The SNS topic is invalid. -// -// * ErrCodeSNSNoAuthorizationFault "SNSNoAuthorizationFault" -// You are not authorized for the SNS subscription. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/CreateEventSubscription -func (c *DatabaseMigrationService) CreateEventSubscription(input *CreateEventSubscriptionInput) (*CreateEventSubscriptionOutput, error) { - req, out := c.CreateEventSubscriptionRequest(input) - return out, req.Send() -} - -// CreateEventSubscriptionWithContext is the same as CreateEventSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See CreateEventSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) CreateEventSubscriptionWithContext(ctx aws.Context, input *CreateEventSubscriptionInput, opts ...request.Option) (*CreateEventSubscriptionOutput, error) { - req, out := c.CreateEventSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateReplicationInstance = "CreateReplicationInstance" - -// CreateReplicationInstanceRequest generates a "aws/request.Request" representing the -// client's request for the CreateReplicationInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateReplicationInstance for more information on using the CreateReplicationInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateReplicationInstanceRequest method. -// req, resp := client.CreateReplicationInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/CreateReplicationInstance -func (c *DatabaseMigrationService) CreateReplicationInstanceRequest(input *CreateReplicationInstanceInput) (req *request.Request, output *CreateReplicationInstanceOutput) { - op := &request.Operation{ - Name: opCreateReplicationInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateReplicationInstanceInput{} - } - - output = &CreateReplicationInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateReplicationInstance API operation for AWS Database Migration Service. -// -// Creates the replication instance using the specified 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 Database Migration Service's -// API operation CreateReplicationInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedFault "AccessDeniedFault" -// AWS DMS was denied access to the endpoint. -// -// * ErrCodeResourceAlreadyExistsFault "ResourceAlreadyExistsFault" -// The resource you are attempting to create already exists. -// -// * ErrCodeInsufficientResourceCapacityFault "InsufficientResourceCapacityFault" -// There are not enough resources allocated to the database migration. -// -// * ErrCodeResourceQuotaExceededFault "ResourceQuotaExceededFault" -// The quota for this resource quota has been exceeded. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceededFault" -// The storage quota has been exceeded. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeReplicationSubnetGroupDoesNotCoverEnoughAZs "ReplicationSubnetGroupDoesNotCoverEnoughAZs" -// The replication subnet group does not cover enough Availability Zones (AZs). -// Edit the replication subnet group and add more AZs. -// -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The subnet provided is invalid. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// AWS DMS cannot access the KMS key. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/CreateReplicationInstance -func (c *DatabaseMigrationService) CreateReplicationInstance(input *CreateReplicationInstanceInput) (*CreateReplicationInstanceOutput, error) { - req, out := c.CreateReplicationInstanceRequest(input) - return out, req.Send() -} - -// CreateReplicationInstanceWithContext is the same as CreateReplicationInstance with the addition of -// the ability to pass a context and additional request options. -// -// See CreateReplicationInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) CreateReplicationInstanceWithContext(ctx aws.Context, input *CreateReplicationInstanceInput, opts ...request.Option) (*CreateReplicationInstanceOutput, error) { - req, out := c.CreateReplicationInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateReplicationSubnetGroup = "CreateReplicationSubnetGroup" - -// CreateReplicationSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateReplicationSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateReplicationSubnetGroup for more information on using the CreateReplicationSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateReplicationSubnetGroupRequest method. -// req, resp := client.CreateReplicationSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/CreateReplicationSubnetGroup -func (c *DatabaseMigrationService) CreateReplicationSubnetGroupRequest(input *CreateReplicationSubnetGroupInput) (req *request.Request, output *CreateReplicationSubnetGroupOutput) { - op := &request.Operation{ - Name: opCreateReplicationSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateReplicationSubnetGroupInput{} - } - - output = &CreateReplicationSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateReplicationSubnetGroup API operation for AWS Database Migration Service. -// -// Creates a replication subnet group given a list of the subnet IDs in a VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation CreateReplicationSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedFault "AccessDeniedFault" -// AWS DMS was denied access to the endpoint. -// -// * ErrCodeResourceAlreadyExistsFault "ResourceAlreadyExistsFault" -// The resource you are attempting to create already exists. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeResourceQuotaExceededFault "ResourceQuotaExceededFault" -// The quota for this resource quota has been exceeded. -// -// * ErrCodeReplicationSubnetGroupDoesNotCoverEnoughAZs "ReplicationSubnetGroupDoesNotCoverEnoughAZs" -// The replication subnet group does not cover enough Availability Zones (AZs). -// Edit the replication subnet group and add more AZs. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The subnet provided is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/CreateReplicationSubnetGroup -func (c *DatabaseMigrationService) CreateReplicationSubnetGroup(input *CreateReplicationSubnetGroupInput) (*CreateReplicationSubnetGroupOutput, error) { - req, out := c.CreateReplicationSubnetGroupRequest(input) - return out, req.Send() -} - -// CreateReplicationSubnetGroupWithContext is the same as CreateReplicationSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateReplicationSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) CreateReplicationSubnetGroupWithContext(ctx aws.Context, input *CreateReplicationSubnetGroupInput, opts ...request.Option) (*CreateReplicationSubnetGroupOutput, error) { - req, out := c.CreateReplicationSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateReplicationTask = "CreateReplicationTask" - -// CreateReplicationTaskRequest generates a "aws/request.Request" representing the -// client's request for the CreateReplicationTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateReplicationTask for more information on using the CreateReplicationTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateReplicationTaskRequest method. -// req, resp := client.CreateReplicationTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/CreateReplicationTask -func (c *DatabaseMigrationService) CreateReplicationTaskRequest(input *CreateReplicationTaskInput) (req *request.Request, output *CreateReplicationTaskOutput) { - op := &request.Operation{ - Name: opCreateReplicationTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateReplicationTaskInput{} - } - - output = &CreateReplicationTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateReplicationTask API operation for AWS Database Migration Service. -// -// Creates a replication task using the specified 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 Database Migration Service's -// API operation CreateReplicationTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedFault "AccessDeniedFault" -// AWS DMS was denied access to the endpoint. -// -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// * ErrCodeResourceAlreadyExistsFault "ResourceAlreadyExistsFault" -// The resource you are attempting to create already exists. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// AWS DMS cannot access the KMS key. -// -// * ErrCodeResourceQuotaExceededFault "ResourceQuotaExceededFault" -// The quota for this resource quota has been exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/CreateReplicationTask -func (c *DatabaseMigrationService) CreateReplicationTask(input *CreateReplicationTaskInput) (*CreateReplicationTaskOutput, error) { - req, out := c.CreateReplicationTaskRequest(input) - return out, req.Send() -} - -// CreateReplicationTaskWithContext is the same as CreateReplicationTask with the addition of -// the ability to pass a context and additional request options. -// -// See CreateReplicationTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) CreateReplicationTaskWithContext(ctx aws.Context, input *CreateReplicationTaskInput, opts ...request.Option) (*CreateReplicationTaskOutput, error) { - req, out := c.CreateReplicationTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCertificate = "DeleteCertificate" - -// DeleteCertificateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCertificate for more information on using the DeleteCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCertificateRequest method. -// req, resp := client.DeleteCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DeleteCertificate -func (c *DatabaseMigrationService) DeleteCertificateRequest(input *DeleteCertificateInput) (req *request.Request, output *DeleteCertificateOutput) { - op := &request.Operation{ - Name: opDeleteCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCertificateInput{} - } - - output = &DeleteCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteCertificate API operation for AWS Database Migration Service. -// -// Deletes the specified certificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DeleteCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DeleteCertificate -func (c *DatabaseMigrationService) DeleteCertificate(input *DeleteCertificateInput) (*DeleteCertificateOutput, error) { - req, out := c.DeleteCertificateRequest(input) - return out, req.Send() -} - -// DeleteCertificateWithContext is the same as DeleteCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DeleteCertificateWithContext(ctx aws.Context, input *DeleteCertificateInput, opts ...request.Option) (*DeleteCertificateOutput, error) { - req, out := c.DeleteCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEndpoint = "DeleteEndpoint" - -// DeleteEndpointRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEndpoint for more information on using the DeleteEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEndpointRequest method. -// req, resp := client.DeleteEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DeleteEndpoint -func (c *DatabaseMigrationService) DeleteEndpointRequest(input *DeleteEndpointInput) (req *request.Request, output *DeleteEndpointOutput) { - op := &request.Operation{ - Name: opDeleteEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteEndpointInput{} - } - - output = &DeleteEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteEndpoint API operation for AWS Database Migration Service. -// -// Deletes the specified endpoint. -// -// All tasks associated with the endpoint must be deleted before you can delete -// the endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DeleteEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DeleteEndpoint -func (c *DatabaseMigrationService) DeleteEndpoint(input *DeleteEndpointInput) (*DeleteEndpointOutput, error) { - req, out := c.DeleteEndpointRequest(input) - return out, req.Send() -} - -// DeleteEndpointWithContext is the same as DeleteEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DeleteEndpointWithContext(ctx aws.Context, input *DeleteEndpointInput, opts ...request.Option) (*DeleteEndpointOutput, error) { - req, out := c.DeleteEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEventSubscription = "DeleteEventSubscription" - -// DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEventSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEventSubscription for more information on using the DeleteEventSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEventSubscriptionRequest method. -// req, resp := client.DeleteEventSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DeleteEventSubscription -func (c *DatabaseMigrationService) DeleteEventSubscriptionRequest(input *DeleteEventSubscriptionInput) (req *request.Request, output *DeleteEventSubscriptionOutput) { - op := &request.Operation{ - Name: opDeleteEventSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteEventSubscriptionInput{} - } - - output = &DeleteEventSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteEventSubscription API operation for AWS Database Migration Service. -// -// Deletes an AWS DMS event subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DeleteEventSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DeleteEventSubscription -func (c *DatabaseMigrationService) DeleteEventSubscription(input *DeleteEventSubscriptionInput) (*DeleteEventSubscriptionOutput, error) { - req, out := c.DeleteEventSubscriptionRequest(input) - return out, req.Send() -} - -// DeleteEventSubscriptionWithContext is the same as DeleteEventSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEventSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DeleteEventSubscriptionWithContext(ctx aws.Context, input *DeleteEventSubscriptionInput, opts ...request.Option) (*DeleteEventSubscriptionOutput, error) { - req, out := c.DeleteEventSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteReplicationInstance = "DeleteReplicationInstance" - -// DeleteReplicationInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteReplicationInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteReplicationInstance for more information on using the DeleteReplicationInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteReplicationInstanceRequest method. -// req, resp := client.DeleteReplicationInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DeleteReplicationInstance -func (c *DatabaseMigrationService) DeleteReplicationInstanceRequest(input *DeleteReplicationInstanceInput) (req *request.Request, output *DeleteReplicationInstanceOutput) { - op := &request.Operation{ - Name: opDeleteReplicationInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteReplicationInstanceInput{} - } - - output = &DeleteReplicationInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteReplicationInstance API operation for AWS Database Migration Service. -// -// Deletes the specified replication instance. -// -// You must delete any migration tasks that are associated with the replication -// instance before you can delete 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 Database Migration Service's -// API operation DeleteReplicationInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DeleteReplicationInstance -func (c *DatabaseMigrationService) DeleteReplicationInstance(input *DeleteReplicationInstanceInput) (*DeleteReplicationInstanceOutput, error) { - req, out := c.DeleteReplicationInstanceRequest(input) - return out, req.Send() -} - -// DeleteReplicationInstanceWithContext is the same as DeleteReplicationInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteReplicationInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DeleteReplicationInstanceWithContext(ctx aws.Context, input *DeleteReplicationInstanceInput, opts ...request.Option) (*DeleteReplicationInstanceOutput, error) { - req, out := c.DeleteReplicationInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteReplicationSubnetGroup = "DeleteReplicationSubnetGroup" - -// DeleteReplicationSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteReplicationSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteReplicationSubnetGroup for more information on using the DeleteReplicationSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteReplicationSubnetGroupRequest method. -// req, resp := client.DeleteReplicationSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DeleteReplicationSubnetGroup -func (c *DatabaseMigrationService) DeleteReplicationSubnetGroupRequest(input *DeleteReplicationSubnetGroupInput) (req *request.Request, output *DeleteReplicationSubnetGroupOutput) { - op := &request.Operation{ - Name: opDeleteReplicationSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteReplicationSubnetGroupInput{} - } - - output = &DeleteReplicationSubnetGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteReplicationSubnetGroup API operation for AWS Database Migration Service. -// -// Deletes a subnet group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DeleteReplicationSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DeleteReplicationSubnetGroup -func (c *DatabaseMigrationService) DeleteReplicationSubnetGroup(input *DeleteReplicationSubnetGroupInput) (*DeleteReplicationSubnetGroupOutput, error) { - req, out := c.DeleteReplicationSubnetGroupRequest(input) - return out, req.Send() -} - -// DeleteReplicationSubnetGroupWithContext is the same as DeleteReplicationSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteReplicationSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DeleteReplicationSubnetGroupWithContext(ctx aws.Context, input *DeleteReplicationSubnetGroupInput, opts ...request.Option) (*DeleteReplicationSubnetGroupOutput, error) { - req, out := c.DeleteReplicationSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteReplicationTask = "DeleteReplicationTask" - -// DeleteReplicationTaskRequest generates a "aws/request.Request" representing the -// client's request for the DeleteReplicationTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteReplicationTask for more information on using the DeleteReplicationTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteReplicationTaskRequest method. -// req, resp := client.DeleteReplicationTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DeleteReplicationTask -func (c *DatabaseMigrationService) DeleteReplicationTaskRequest(input *DeleteReplicationTaskInput) (req *request.Request, output *DeleteReplicationTaskOutput) { - op := &request.Operation{ - Name: opDeleteReplicationTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteReplicationTaskInput{} - } - - output = &DeleteReplicationTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteReplicationTask API operation for AWS Database Migration Service. -// -// Deletes the specified replication task. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DeleteReplicationTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DeleteReplicationTask -func (c *DatabaseMigrationService) DeleteReplicationTask(input *DeleteReplicationTaskInput) (*DeleteReplicationTaskOutput, error) { - req, out := c.DeleteReplicationTaskRequest(input) - return out, req.Send() -} - -// DeleteReplicationTaskWithContext is the same as DeleteReplicationTask with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteReplicationTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DeleteReplicationTaskWithContext(ctx aws.Context, input *DeleteReplicationTaskInput, opts ...request.Option) (*DeleteReplicationTaskOutput, error) { - req, out := c.DeleteReplicationTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccountAttributes = "DescribeAccountAttributes" - -// DescribeAccountAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccountAttributes for more information on using the DescribeAccountAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAccountAttributesRequest method. -// req, resp := client.DescribeAccountAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeAccountAttributes -func (c *DatabaseMigrationService) DescribeAccountAttributesRequest(input *DescribeAccountAttributesInput) (req *request.Request, output *DescribeAccountAttributesOutput) { - op := &request.Operation{ - Name: opDescribeAccountAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAccountAttributesInput{} - } - - output = &DescribeAccountAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccountAttributes API operation for AWS Database Migration Service. -// -// Lists all of the AWS DMS attributes for a customer account. The attributes -// include AWS DMS quotas for the account, such as the number of replication -// instances allowed. The description for a quota includes the quota name, current -// usage toward that quota, and the quota's maximum value. -// -// This command does not take any 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 Database Migration Service's -// API operation DescribeAccountAttributes for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeAccountAttributes -func (c *DatabaseMigrationService) DescribeAccountAttributes(input *DescribeAccountAttributesInput) (*DescribeAccountAttributesOutput, error) { - req, out := c.DescribeAccountAttributesRequest(input) - return out, req.Send() -} - -// DescribeAccountAttributesWithContext is the same as DescribeAccountAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeAccountAttributesWithContext(ctx aws.Context, input *DescribeAccountAttributesInput, opts ...request.Option) (*DescribeAccountAttributesOutput, error) { - req, out := c.DescribeAccountAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCertificates = "DescribeCertificates" - -// DescribeCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCertificates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCertificates for more information on using the DescribeCertificates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCertificatesRequest method. -// req, resp := client.DescribeCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeCertificates -func (c *DatabaseMigrationService) DescribeCertificatesRequest(input *DescribeCertificatesInput) (req *request.Request, output *DescribeCertificatesOutput) { - op := &request.Operation{ - Name: opDescribeCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeCertificatesInput{} - } - - output = &DescribeCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCertificates API operation for AWS Database Migration Service. -// -// Provides a description of the certificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeCertificates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeCertificates -func (c *DatabaseMigrationService) DescribeCertificates(input *DescribeCertificatesInput) (*DescribeCertificatesOutput, error) { - req, out := c.DescribeCertificatesRequest(input) - return out, req.Send() -} - -// DescribeCertificatesWithContext is the same as DescribeCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCertificates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeCertificatesWithContext(ctx aws.Context, input *DescribeCertificatesInput, opts ...request.Option) (*DescribeCertificatesOutput, error) { - req, out := c.DescribeCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeCertificatesPages iterates over the pages of a DescribeCertificates operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeCertificates 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 DescribeCertificates operation. -// pageNum := 0 -// err := client.DescribeCertificatesPages(params, -// func(page *DescribeCertificatesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DatabaseMigrationService) DescribeCertificatesPages(input *DescribeCertificatesInput, fn func(*DescribeCertificatesOutput, bool) bool) error { - return c.DescribeCertificatesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeCertificatesPagesWithContext same as DescribeCertificatesPages 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 *DatabaseMigrationService) DescribeCertificatesPagesWithContext(ctx aws.Context, input *DescribeCertificatesInput, fn func(*DescribeCertificatesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeCertificatesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeCertificatesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCertificatesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeConnections = "DescribeConnections" - -// DescribeConnectionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConnections operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConnections for more information on using the DescribeConnections -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConnectionsRequest method. -// req, resp := client.DescribeConnectionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeConnections -func (c *DatabaseMigrationService) DescribeConnectionsRequest(input *DescribeConnectionsInput) (req *request.Request, output *DescribeConnectionsOutput) { - op := &request.Operation{ - Name: opDescribeConnections, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeConnectionsInput{} - } - - output = &DescribeConnectionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConnections API operation for AWS Database Migration Service. -// -// Describes the status of the connections that have been made between the replication -// instance and an endpoint. Connections are created when you test an endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeConnections for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeConnections -func (c *DatabaseMigrationService) DescribeConnections(input *DescribeConnectionsInput) (*DescribeConnectionsOutput, error) { - req, out := c.DescribeConnectionsRequest(input) - return out, req.Send() -} - -// DescribeConnectionsWithContext is the same as DescribeConnections with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConnections for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeConnectionsWithContext(ctx aws.Context, input *DescribeConnectionsInput, opts ...request.Option) (*DescribeConnectionsOutput, error) { - req, out := c.DescribeConnectionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeConnectionsPages iterates over the pages of a DescribeConnections operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeConnections 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 DescribeConnections operation. -// pageNum := 0 -// err := client.DescribeConnectionsPages(params, -// func(page *DescribeConnectionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DatabaseMigrationService) DescribeConnectionsPages(input *DescribeConnectionsInput, fn func(*DescribeConnectionsOutput, bool) bool) error { - return c.DescribeConnectionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeConnectionsPagesWithContext same as DescribeConnectionsPages 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 *DatabaseMigrationService) DescribeConnectionsPagesWithContext(ctx aws.Context, input *DescribeConnectionsInput, fn func(*DescribeConnectionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeConnectionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeConnectionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeConnectionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEndpointTypes = "DescribeEndpointTypes" - -// DescribeEndpointTypesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEndpointTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEndpointTypes for more information on using the DescribeEndpointTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEndpointTypesRequest method. -// req, resp := client.DescribeEndpointTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeEndpointTypes -func (c *DatabaseMigrationService) DescribeEndpointTypesRequest(input *DescribeEndpointTypesInput) (req *request.Request, output *DescribeEndpointTypesOutput) { - op := &request.Operation{ - Name: opDescribeEndpointTypes, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEndpointTypesInput{} - } - - output = &DescribeEndpointTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEndpointTypes API operation for AWS Database Migration Service. -// -// Returns information about the type of endpoints available. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeEndpointTypes for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeEndpointTypes -func (c *DatabaseMigrationService) DescribeEndpointTypes(input *DescribeEndpointTypesInput) (*DescribeEndpointTypesOutput, error) { - req, out := c.DescribeEndpointTypesRequest(input) - return out, req.Send() -} - -// DescribeEndpointTypesWithContext is the same as DescribeEndpointTypes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEndpointTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeEndpointTypesWithContext(ctx aws.Context, input *DescribeEndpointTypesInput, opts ...request.Option) (*DescribeEndpointTypesOutput, error) { - req, out := c.DescribeEndpointTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEndpointTypesPages iterates over the pages of a DescribeEndpointTypes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEndpointTypes 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 DescribeEndpointTypes operation. -// pageNum := 0 -// err := client.DescribeEndpointTypesPages(params, -// func(page *DescribeEndpointTypesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DatabaseMigrationService) DescribeEndpointTypesPages(input *DescribeEndpointTypesInput, fn func(*DescribeEndpointTypesOutput, bool) bool) error { - return c.DescribeEndpointTypesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEndpointTypesPagesWithContext same as DescribeEndpointTypesPages 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 *DatabaseMigrationService) DescribeEndpointTypesPagesWithContext(ctx aws.Context, input *DescribeEndpointTypesInput, fn func(*DescribeEndpointTypesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEndpointTypesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEndpointTypesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEndpointTypesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEndpoints = "DescribeEndpoints" - -// DescribeEndpointsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEndpoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEndpoints for more information on using the DescribeEndpoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEndpointsRequest method. -// req, resp := client.DescribeEndpointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeEndpoints -func (c *DatabaseMigrationService) DescribeEndpointsRequest(input *DescribeEndpointsInput) (req *request.Request, output *DescribeEndpointsOutput) { - op := &request.Operation{ - Name: opDescribeEndpoints, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEndpointsInput{} - } - - output = &DescribeEndpointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEndpoints API operation for AWS Database Migration Service. -// -// Returns information about the endpoints for your account in the current region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeEndpoints for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeEndpoints -func (c *DatabaseMigrationService) DescribeEndpoints(input *DescribeEndpointsInput) (*DescribeEndpointsOutput, error) { - req, out := c.DescribeEndpointsRequest(input) - return out, req.Send() -} - -// DescribeEndpointsWithContext is the same as DescribeEndpoints with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEndpoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeEndpointsWithContext(ctx aws.Context, input *DescribeEndpointsInput, opts ...request.Option) (*DescribeEndpointsOutput, error) { - req, out := c.DescribeEndpointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEndpointsPages iterates over the pages of a DescribeEndpoints operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEndpoints method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeEndpoints operation. -// pageNum := 0 -// err := client.DescribeEndpointsPages(params, -// func(page *DescribeEndpointsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DatabaseMigrationService) DescribeEndpointsPages(input *DescribeEndpointsInput, fn func(*DescribeEndpointsOutput, bool) bool) error { - return c.DescribeEndpointsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEndpointsPagesWithContext same as DescribeEndpointsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeEndpointsPagesWithContext(ctx aws.Context, input *DescribeEndpointsInput, fn func(*DescribeEndpointsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEndpointsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEndpointsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEndpointsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEventCategories = "DescribeEventCategories" - -// DescribeEventCategoriesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEventCategories operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEventCategories for more information on using the DescribeEventCategories -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventCategoriesRequest method. -// req, resp := client.DescribeEventCategoriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeEventCategories -func (c *DatabaseMigrationService) DescribeEventCategoriesRequest(input *DescribeEventCategoriesInput) (req *request.Request, output *DescribeEventCategoriesOutput) { - op := &request.Operation{ - Name: opDescribeEventCategories, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEventCategoriesInput{} - } - - output = &DescribeEventCategoriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEventCategories API operation for AWS Database Migration Service. -// -// Lists categories for all event source types, or, if specified, for a specified -// source type. You can see a list of the event categories and source types -// in Working with Events and Notifications (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Events.html) -// in the AWS Database Migration Service User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeEventCategories for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeEventCategories -func (c *DatabaseMigrationService) DescribeEventCategories(input *DescribeEventCategoriesInput) (*DescribeEventCategoriesOutput, error) { - req, out := c.DescribeEventCategoriesRequest(input) - return out, req.Send() -} - -// DescribeEventCategoriesWithContext is the same as DescribeEventCategories with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEventCategories for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeEventCategoriesWithContext(ctx aws.Context, input *DescribeEventCategoriesInput, opts ...request.Option) (*DescribeEventCategoriesOutput, error) { - req, out := c.DescribeEventCategoriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEventSubscriptions = "DescribeEventSubscriptions" - -// DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEventSubscriptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEventSubscriptions for more information on using the DescribeEventSubscriptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventSubscriptionsRequest method. -// req, resp := client.DescribeEventSubscriptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeEventSubscriptions -func (c *DatabaseMigrationService) DescribeEventSubscriptionsRequest(input *DescribeEventSubscriptionsInput) (req *request.Request, output *DescribeEventSubscriptionsOutput) { - op := &request.Operation{ - Name: opDescribeEventSubscriptions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEventSubscriptionsInput{} - } - - output = &DescribeEventSubscriptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEventSubscriptions API operation for AWS Database Migration Service. -// -// Lists all the event subscriptions for a customer account. The description -// of a subscription includes SubscriptionName, SNSTopicARN, CustomerID, SourceType, -// SourceID, CreationTime, and Status. -// -// If you specify SubscriptionName, this action lists the description for that -// subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeEventSubscriptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeEventSubscriptions -func (c *DatabaseMigrationService) DescribeEventSubscriptions(input *DescribeEventSubscriptionsInput) (*DescribeEventSubscriptionsOutput, error) { - req, out := c.DescribeEventSubscriptionsRequest(input) - return out, req.Send() -} - -// DescribeEventSubscriptionsWithContext is the same as DescribeEventSubscriptions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEventSubscriptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeEventSubscriptionsWithContext(ctx aws.Context, input *DescribeEventSubscriptionsInput, opts ...request.Option) (*DescribeEventSubscriptionsOutput, error) { - req, out := c.DescribeEventSubscriptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEventSubscriptionsPages iterates over the pages of a DescribeEventSubscriptions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEventSubscriptions 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 DescribeEventSubscriptions operation. -// pageNum := 0 -// err := client.DescribeEventSubscriptionsPages(params, -// func(page *DescribeEventSubscriptionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DatabaseMigrationService) DescribeEventSubscriptionsPages(input *DescribeEventSubscriptionsInput, fn func(*DescribeEventSubscriptionsOutput, bool) bool) error { - return c.DescribeEventSubscriptionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEventSubscriptionsPagesWithContext same as DescribeEventSubscriptionsPages 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 *DatabaseMigrationService) DescribeEventSubscriptionsPagesWithContext(ctx aws.Context, input *DescribeEventSubscriptionsInput, fn func(*DescribeEventSubscriptionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEventSubscriptionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEventSubscriptionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventSubscriptionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEvents = "DescribeEvents" - -// DescribeEventsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEvents for more information on using the DescribeEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventsRequest method. -// req, resp := client.DescribeEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeEvents -func (c *DatabaseMigrationService) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Request, output *DescribeEventsOutput) { - op := &request.Operation{ - Name: opDescribeEvents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEventsInput{} - } - - output = &DescribeEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEvents API operation for AWS Database Migration Service. -// -// Lists events for a given source identifier and source type. You can also -// specify a start and end time. For more information on AWS DMS events, see -// Working with Events and Notifications (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Events.html) -// in the AWS Database Migration User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeEvents for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeEvents -func (c *DatabaseMigrationService) DescribeEvents(input *DescribeEventsInput) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - return out, req.Send() -} - -// DescribeEventsWithContext is the same as DescribeEvents with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeEventsWithContext(ctx aws.Context, input *DescribeEventsInput, opts ...request.Option) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEventsPages iterates over the pages of a DescribeEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEvents 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 DescribeEvents operation. -// pageNum := 0 -// err := client.DescribeEventsPages(params, -// func(page *DescribeEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DatabaseMigrationService) DescribeEventsPages(input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool) error { - return c.DescribeEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEventsPagesWithContext same as DescribeEventsPages 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 *DatabaseMigrationService) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeOrderableReplicationInstances = "DescribeOrderableReplicationInstances" - -// DescribeOrderableReplicationInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeOrderableReplicationInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeOrderableReplicationInstances for more information on using the DescribeOrderableReplicationInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeOrderableReplicationInstancesRequest method. -// req, resp := client.DescribeOrderableReplicationInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeOrderableReplicationInstances -func (c *DatabaseMigrationService) DescribeOrderableReplicationInstancesRequest(input *DescribeOrderableReplicationInstancesInput) (req *request.Request, output *DescribeOrderableReplicationInstancesOutput) { - op := &request.Operation{ - Name: opDescribeOrderableReplicationInstances, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeOrderableReplicationInstancesInput{} - } - - output = &DescribeOrderableReplicationInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeOrderableReplicationInstances API operation for AWS Database Migration Service. -// -// Returns information about the replication instance types that can be created -// in the specified region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeOrderableReplicationInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeOrderableReplicationInstances -func (c *DatabaseMigrationService) DescribeOrderableReplicationInstances(input *DescribeOrderableReplicationInstancesInput) (*DescribeOrderableReplicationInstancesOutput, error) { - req, out := c.DescribeOrderableReplicationInstancesRequest(input) - return out, req.Send() -} - -// DescribeOrderableReplicationInstancesWithContext is the same as DescribeOrderableReplicationInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeOrderableReplicationInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeOrderableReplicationInstancesWithContext(ctx aws.Context, input *DescribeOrderableReplicationInstancesInput, opts ...request.Option) (*DescribeOrderableReplicationInstancesOutput, error) { - req, out := c.DescribeOrderableReplicationInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeOrderableReplicationInstancesPages iterates over the pages of a DescribeOrderableReplicationInstances operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeOrderableReplicationInstances 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 DescribeOrderableReplicationInstances operation. -// pageNum := 0 -// err := client.DescribeOrderableReplicationInstancesPages(params, -// func(page *DescribeOrderableReplicationInstancesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DatabaseMigrationService) DescribeOrderableReplicationInstancesPages(input *DescribeOrderableReplicationInstancesInput, fn func(*DescribeOrderableReplicationInstancesOutput, bool) bool) error { - return c.DescribeOrderableReplicationInstancesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeOrderableReplicationInstancesPagesWithContext same as DescribeOrderableReplicationInstancesPages 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 *DatabaseMigrationService) DescribeOrderableReplicationInstancesPagesWithContext(ctx aws.Context, input *DescribeOrderableReplicationInstancesInput, fn func(*DescribeOrderableReplicationInstancesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeOrderableReplicationInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeOrderableReplicationInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeOrderableReplicationInstancesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeRefreshSchemasStatus = "DescribeRefreshSchemasStatus" - -// DescribeRefreshSchemasStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRefreshSchemasStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRefreshSchemasStatus for more information on using the DescribeRefreshSchemasStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRefreshSchemasStatusRequest method. -// req, resp := client.DescribeRefreshSchemasStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeRefreshSchemasStatus -func (c *DatabaseMigrationService) DescribeRefreshSchemasStatusRequest(input *DescribeRefreshSchemasStatusInput) (req *request.Request, output *DescribeRefreshSchemasStatusOutput) { - op := &request.Operation{ - Name: opDescribeRefreshSchemasStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeRefreshSchemasStatusInput{} - } - - output = &DescribeRefreshSchemasStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRefreshSchemasStatus API operation for AWS Database Migration Service. -// -// Returns the status of the RefreshSchemas operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeRefreshSchemasStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeRefreshSchemasStatus -func (c *DatabaseMigrationService) DescribeRefreshSchemasStatus(input *DescribeRefreshSchemasStatusInput) (*DescribeRefreshSchemasStatusOutput, error) { - req, out := c.DescribeRefreshSchemasStatusRequest(input) - return out, req.Send() -} - -// DescribeRefreshSchemasStatusWithContext is the same as DescribeRefreshSchemasStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRefreshSchemasStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeRefreshSchemasStatusWithContext(ctx aws.Context, input *DescribeRefreshSchemasStatusInput, opts ...request.Option) (*DescribeRefreshSchemasStatusOutput, error) { - req, out := c.DescribeRefreshSchemasStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeReplicationInstanceTaskLogs = "DescribeReplicationInstanceTaskLogs" - -// DescribeReplicationInstanceTaskLogsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReplicationInstanceTaskLogs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReplicationInstanceTaskLogs for more information on using the DescribeReplicationInstanceTaskLogs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReplicationInstanceTaskLogsRequest method. -// req, resp := client.DescribeReplicationInstanceTaskLogsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeReplicationInstanceTaskLogs -func (c *DatabaseMigrationService) DescribeReplicationInstanceTaskLogsRequest(input *DescribeReplicationInstanceTaskLogsInput) (req *request.Request, output *DescribeReplicationInstanceTaskLogsOutput) { - op := &request.Operation{ - Name: opDescribeReplicationInstanceTaskLogs, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReplicationInstanceTaskLogsInput{} - } - - output = &DescribeReplicationInstanceTaskLogsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReplicationInstanceTaskLogs API operation for AWS Database Migration Service. -// -// Returns information about the task logs for the specified task. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeReplicationInstanceTaskLogs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeReplicationInstanceTaskLogs -func (c *DatabaseMigrationService) DescribeReplicationInstanceTaskLogs(input *DescribeReplicationInstanceTaskLogsInput) (*DescribeReplicationInstanceTaskLogsOutput, error) { - req, out := c.DescribeReplicationInstanceTaskLogsRequest(input) - return out, req.Send() -} - -// DescribeReplicationInstanceTaskLogsWithContext is the same as DescribeReplicationInstanceTaskLogs with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReplicationInstanceTaskLogs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeReplicationInstanceTaskLogsWithContext(ctx aws.Context, input *DescribeReplicationInstanceTaskLogsInput, opts ...request.Option) (*DescribeReplicationInstanceTaskLogsOutput, error) { - req, out := c.DescribeReplicationInstanceTaskLogsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReplicationInstanceTaskLogsPages iterates over the pages of a DescribeReplicationInstanceTaskLogs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReplicationInstanceTaskLogs 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 DescribeReplicationInstanceTaskLogs operation. -// pageNum := 0 -// err := client.DescribeReplicationInstanceTaskLogsPages(params, -// func(page *DescribeReplicationInstanceTaskLogsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DatabaseMigrationService) DescribeReplicationInstanceTaskLogsPages(input *DescribeReplicationInstanceTaskLogsInput, fn func(*DescribeReplicationInstanceTaskLogsOutput, bool) bool) error { - return c.DescribeReplicationInstanceTaskLogsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReplicationInstanceTaskLogsPagesWithContext same as DescribeReplicationInstanceTaskLogsPages 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 *DatabaseMigrationService) DescribeReplicationInstanceTaskLogsPagesWithContext(ctx aws.Context, input *DescribeReplicationInstanceTaskLogsInput, fn func(*DescribeReplicationInstanceTaskLogsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReplicationInstanceTaskLogsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationInstanceTaskLogsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReplicationInstanceTaskLogsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeReplicationInstances = "DescribeReplicationInstances" - -// DescribeReplicationInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReplicationInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReplicationInstances for more information on using the DescribeReplicationInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReplicationInstancesRequest method. -// req, resp := client.DescribeReplicationInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeReplicationInstances -func (c *DatabaseMigrationService) DescribeReplicationInstancesRequest(input *DescribeReplicationInstancesInput) (req *request.Request, output *DescribeReplicationInstancesOutput) { - op := &request.Operation{ - Name: opDescribeReplicationInstances, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReplicationInstancesInput{} - } - - output = &DescribeReplicationInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReplicationInstances API operation for AWS Database Migration Service. -// -// Returns information about replication instances for your account in the current -// region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeReplicationInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeReplicationInstances -func (c *DatabaseMigrationService) DescribeReplicationInstances(input *DescribeReplicationInstancesInput) (*DescribeReplicationInstancesOutput, error) { - req, out := c.DescribeReplicationInstancesRequest(input) - return out, req.Send() -} - -// DescribeReplicationInstancesWithContext is the same as DescribeReplicationInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReplicationInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeReplicationInstancesWithContext(ctx aws.Context, input *DescribeReplicationInstancesInput, opts ...request.Option) (*DescribeReplicationInstancesOutput, error) { - req, out := c.DescribeReplicationInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReplicationInstancesPages iterates over the pages of a DescribeReplicationInstances operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReplicationInstances 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 DescribeReplicationInstances operation. -// pageNum := 0 -// err := client.DescribeReplicationInstancesPages(params, -// func(page *DescribeReplicationInstancesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DatabaseMigrationService) DescribeReplicationInstancesPages(input *DescribeReplicationInstancesInput, fn func(*DescribeReplicationInstancesOutput, bool) bool) error { - return c.DescribeReplicationInstancesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReplicationInstancesPagesWithContext same as DescribeReplicationInstancesPages 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 *DatabaseMigrationService) DescribeReplicationInstancesPagesWithContext(ctx aws.Context, input *DescribeReplicationInstancesInput, fn func(*DescribeReplicationInstancesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReplicationInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReplicationInstancesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeReplicationSubnetGroups = "DescribeReplicationSubnetGroups" - -// DescribeReplicationSubnetGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReplicationSubnetGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReplicationSubnetGroups for more information on using the DescribeReplicationSubnetGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReplicationSubnetGroupsRequest method. -// req, resp := client.DescribeReplicationSubnetGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeReplicationSubnetGroups -func (c *DatabaseMigrationService) DescribeReplicationSubnetGroupsRequest(input *DescribeReplicationSubnetGroupsInput) (req *request.Request, output *DescribeReplicationSubnetGroupsOutput) { - op := &request.Operation{ - Name: opDescribeReplicationSubnetGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReplicationSubnetGroupsInput{} - } - - output = &DescribeReplicationSubnetGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReplicationSubnetGroups API operation for AWS Database Migration Service. -// -// Returns information about the replication subnet 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 Database Migration Service's -// API operation DescribeReplicationSubnetGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeReplicationSubnetGroups -func (c *DatabaseMigrationService) DescribeReplicationSubnetGroups(input *DescribeReplicationSubnetGroupsInput) (*DescribeReplicationSubnetGroupsOutput, error) { - req, out := c.DescribeReplicationSubnetGroupsRequest(input) - return out, req.Send() -} - -// DescribeReplicationSubnetGroupsWithContext is the same as DescribeReplicationSubnetGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReplicationSubnetGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeReplicationSubnetGroupsWithContext(ctx aws.Context, input *DescribeReplicationSubnetGroupsInput, opts ...request.Option) (*DescribeReplicationSubnetGroupsOutput, error) { - req, out := c.DescribeReplicationSubnetGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReplicationSubnetGroupsPages iterates over the pages of a DescribeReplicationSubnetGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReplicationSubnetGroups 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 DescribeReplicationSubnetGroups operation. -// pageNum := 0 -// err := client.DescribeReplicationSubnetGroupsPages(params, -// func(page *DescribeReplicationSubnetGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DatabaseMigrationService) DescribeReplicationSubnetGroupsPages(input *DescribeReplicationSubnetGroupsInput, fn func(*DescribeReplicationSubnetGroupsOutput, bool) bool) error { - return c.DescribeReplicationSubnetGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReplicationSubnetGroupsPagesWithContext same as DescribeReplicationSubnetGroupsPages 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 *DatabaseMigrationService) DescribeReplicationSubnetGroupsPagesWithContext(ctx aws.Context, input *DescribeReplicationSubnetGroupsInput, fn func(*DescribeReplicationSubnetGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReplicationSubnetGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationSubnetGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReplicationSubnetGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeReplicationTaskAssessmentResults = "DescribeReplicationTaskAssessmentResults" - -// DescribeReplicationTaskAssessmentResultsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReplicationTaskAssessmentResults operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReplicationTaskAssessmentResults for more information on using the DescribeReplicationTaskAssessmentResults -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReplicationTaskAssessmentResultsRequest method. -// req, resp := client.DescribeReplicationTaskAssessmentResultsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeReplicationTaskAssessmentResults -func (c *DatabaseMigrationService) DescribeReplicationTaskAssessmentResultsRequest(input *DescribeReplicationTaskAssessmentResultsInput) (req *request.Request, output *DescribeReplicationTaskAssessmentResultsOutput) { - op := &request.Operation{ - Name: opDescribeReplicationTaskAssessmentResults, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReplicationTaskAssessmentResultsInput{} - } - - output = &DescribeReplicationTaskAssessmentResultsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReplicationTaskAssessmentResults API operation for AWS Database Migration Service. -// -// Returns the task assessment results from Amazon S3. This action always returns -// the latest results. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeReplicationTaskAssessmentResults for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeReplicationTaskAssessmentResults -func (c *DatabaseMigrationService) DescribeReplicationTaskAssessmentResults(input *DescribeReplicationTaskAssessmentResultsInput) (*DescribeReplicationTaskAssessmentResultsOutput, error) { - req, out := c.DescribeReplicationTaskAssessmentResultsRequest(input) - return out, req.Send() -} - -// DescribeReplicationTaskAssessmentResultsWithContext is the same as DescribeReplicationTaskAssessmentResults with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReplicationTaskAssessmentResults for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeReplicationTaskAssessmentResultsWithContext(ctx aws.Context, input *DescribeReplicationTaskAssessmentResultsInput, opts ...request.Option) (*DescribeReplicationTaskAssessmentResultsOutput, error) { - req, out := c.DescribeReplicationTaskAssessmentResultsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReplicationTaskAssessmentResultsPages iterates over the pages of a DescribeReplicationTaskAssessmentResults operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReplicationTaskAssessmentResults 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 DescribeReplicationTaskAssessmentResults operation. -// pageNum := 0 -// err := client.DescribeReplicationTaskAssessmentResultsPages(params, -// func(page *DescribeReplicationTaskAssessmentResultsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DatabaseMigrationService) DescribeReplicationTaskAssessmentResultsPages(input *DescribeReplicationTaskAssessmentResultsInput, fn func(*DescribeReplicationTaskAssessmentResultsOutput, bool) bool) error { - return c.DescribeReplicationTaskAssessmentResultsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReplicationTaskAssessmentResultsPagesWithContext same as DescribeReplicationTaskAssessmentResultsPages 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 *DatabaseMigrationService) DescribeReplicationTaskAssessmentResultsPagesWithContext(ctx aws.Context, input *DescribeReplicationTaskAssessmentResultsInput, fn func(*DescribeReplicationTaskAssessmentResultsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReplicationTaskAssessmentResultsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationTaskAssessmentResultsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReplicationTaskAssessmentResultsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeReplicationTasks = "DescribeReplicationTasks" - -// DescribeReplicationTasksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReplicationTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReplicationTasks for more information on using the DescribeReplicationTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReplicationTasksRequest method. -// req, resp := client.DescribeReplicationTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeReplicationTasks -func (c *DatabaseMigrationService) DescribeReplicationTasksRequest(input *DescribeReplicationTasksInput) (req *request.Request, output *DescribeReplicationTasksOutput) { - op := &request.Operation{ - Name: opDescribeReplicationTasks, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReplicationTasksInput{} - } - - output = &DescribeReplicationTasksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReplicationTasks API operation for AWS Database Migration Service. -// -// Returns information about replication tasks for your account in the current -// region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeReplicationTasks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeReplicationTasks -func (c *DatabaseMigrationService) DescribeReplicationTasks(input *DescribeReplicationTasksInput) (*DescribeReplicationTasksOutput, error) { - req, out := c.DescribeReplicationTasksRequest(input) - return out, req.Send() -} - -// DescribeReplicationTasksWithContext is the same as DescribeReplicationTasks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReplicationTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeReplicationTasksWithContext(ctx aws.Context, input *DescribeReplicationTasksInput, opts ...request.Option) (*DescribeReplicationTasksOutput, error) { - req, out := c.DescribeReplicationTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReplicationTasksPages iterates over the pages of a DescribeReplicationTasks operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReplicationTasks 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 DescribeReplicationTasks operation. -// pageNum := 0 -// err := client.DescribeReplicationTasksPages(params, -// func(page *DescribeReplicationTasksOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DatabaseMigrationService) DescribeReplicationTasksPages(input *DescribeReplicationTasksInput, fn func(*DescribeReplicationTasksOutput, bool) bool) error { - return c.DescribeReplicationTasksPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReplicationTasksPagesWithContext same as DescribeReplicationTasksPages 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 *DatabaseMigrationService) DescribeReplicationTasksPagesWithContext(ctx aws.Context, input *DescribeReplicationTasksInput, fn func(*DescribeReplicationTasksOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReplicationTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReplicationTasksOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeSchemas = "DescribeSchemas" - -// DescribeSchemasRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSchemas operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSchemas for more information on using the DescribeSchemas -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSchemasRequest method. -// req, resp := client.DescribeSchemasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeSchemas -func (c *DatabaseMigrationService) DescribeSchemasRequest(input *DescribeSchemasInput) (req *request.Request, output *DescribeSchemasOutput) { - op := &request.Operation{ - Name: opDescribeSchemas, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeSchemasInput{} - } - - output = &DescribeSchemasOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSchemas API operation for AWS Database Migration Service. -// -// Returns information about the schema for the specified endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeSchemas for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeSchemas -func (c *DatabaseMigrationService) DescribeSchemas(input *DescribeSchemasInput) (*DescribeSchemasOutput, error) { - req, out := c.DescribeSchemasRequest(input) - return out, req.Send() -} - -// DescribeSchemasWithContext is the same as DescribeSchemas with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSchemas for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeSchemasWithContext(ctx aws.Context, input *DescribeSchemasInput, opts ...request.Option) (*DescribeSchemasOutput, error) { - req, out := c.DescribeSchemasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeSchemasPages iterates over the pages of a DescribeSchemas operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeSchemas 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 DescribeSchemas operation. -// pageNum := 0 -// err := client.DescribeSchemasPages(params, -// func(page *DescribeSchemasOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DatabaseMigrationService) DescribeSchemasPages(input *DescribeSchemasInput, fn func(*DescribeSchemasOutput, bool) bool) error { - return c.DescribeSchemasPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeSchemasPagesWithContext same as DescribeSchemasPages 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 *DatabaseMigrationService) DescribeSchemasPagesWithContext(ctx aws.Context, input *DescribeSchemasInput, fn func(*DescribeSchemasOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeSchemasInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeSchemasRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSchemasOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeTableStatistics = "DescribeTableStatistics" - -// DescribeTableStatisticsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTableStatistics operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTableStatistics for more information on using the DescribeTableStatistics -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTableStatisticsRequest method. -// req, resp := client.DescribeTableStatisticsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeTableStatistics -func (c *DatabaseMigrationService) DescribeTableStatisticsRequest(input *DescribeTableStatisticsInput) (req *request.Request, output *DescribeTableStatisticsOutput) { - op := &request.Operation{ - Name: opDescribeTableStatistics, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeTableStatisticsInput{} - } - - output = &DescribeTableStatisticsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTableStatistics API operation for AWS Database Migration Service. -// -// Returns table statistics on the database migration task, including table -// name, rows inserted, rows updated, and rows deleted. -// -// Note that the "last updated" column the DMS console only indicates the time -// that AWS DMS last updated the table statistics record for a table. It does -// not indicate the time of the last update to the table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation DescribeTableStatistics for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeTableStatistics -func (c *DatabaseMigrationService) DescribeTableStatistics(input *DescribeTableStatisticsInput) (*DescribeTableStatisticsOutput, error) { - req, out := c.DescribeTableStatisticsRequest(input) - return out, req.Send() -} - -// DescribeTableStatisticsWithContext is the same as DescribeTableStatistics with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTableStatistics for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) DescribeTableStatisticsWithContext(ctx aws.Context, input *DescribeTableStatisticsInput, opts ...request.Option) (*DescribeTableStatisticsOutput, error) { - req, out := c.DescribeTableStatisticsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeTableStatisticsPages iterates over the pages of a DescribeTableStatistics operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeTableStatistics 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 DescribeTableStatistics operation. -// pageNum := 0 -// err := client.DescribeTableStatisticsPages(params, -// func(page *DescribeTableStatisticsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DatabaseMigrationService) DescribeTableStatisticsPages(input *DescribeTableStatisticsInput, fn func(*DescribeTableStatisticsOutput, bool) bool) error { - return c.DescribeTableStatisticsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeTableStatisticsPagesWithContext same as DescribeTableStatisticsPages 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 *DatabaseMigrationService) DescribeTableStatisticsPagesWithContext(ctx aws.Context, input *DescribeTableStatisticsInput, fn func(*DescribeTableStatisticsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeTableStatisticsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTableStatisticsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTableStatisticsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opImportCertificate = "ImportCertificate" - -// ImportCertificateRequest generates a "aws/request.Request" representing the -// client's request for the ImportCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportCertificate for more information on using the ImportCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportCertificateRequest method. -// req, resp := client.ImportCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ImportCertificate -func (c *DatabaseMigrationService) ImportCertificateRequest(input *ImportCertificateInput) (req *request.Request, output *ImportCertificateOutput) { - op := &request.Operation{ - Name: opImportCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportCertificateInput{} - } - - output = &ImportCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// ImportCertificate API operation for AWS Database Migration Service. -// -// Uploads the specified certificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation ImportCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceAlreadyExistsFault "ResourceAlreadyExistsFault" -// The resource you are attempting to create already exists. -// -// * ErrCodeInvalidCertificateFault "InvalidCertificateFault" -// The certificate was not valid. -// -// * ErrCodeResourceQuotaExceededFault "ResourceQuotaExceededFault" -// The quota for this resource quota has been exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ImportCertificate -func (c *DatabaseMigrationService) ImportCertificate(input *ImportCertificateInput) (*ImportCertificateOutput, error) { - req, out := c.ImportCertificateRequest(input) - return out, req.Send() -} - -// ImportCertificateWithContext is the same as ImportCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See ImportCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) ImportCertificateWithContext(ctx aws.Context, input *ImportCertificateInput, opts ...request.Option) (*ImportCertificateOutput, error) { - req, out := c.ImportCertificateRequest(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/dms-2016-01-01/ListTagsForResource -func (c *DatabaseMigrationService) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for AWS Database Migration Service. -// -// Lists all tags for an AWS DMS 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 Database Migration Service's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ListTagsForResource -func (c *DatabaseMigrationService) 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 *DatabaseMigrationService) 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 opModifyEndpoint = "ModifyEndpoint" - -// ModifyEndpointRequest generates a "aws/request.Request" representing the -// client's request for the ModifyEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyEndpoint for more information on using the ModifyEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyEndpointRequest method. -// req, resp := client.ModifyEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ModifyEndpoint -func (c *DatabaseMigrationService) ModifyEndpointRequest(input *ModifyEndpointInput) (req *request.Request, output *ModifyEndpointOutput) { - op := &request.Operation{ - Name: opModifyEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyEndpointInput{} - } - - output = &ModifyEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyEndpoint API operation for AWS Database Migration Service. -// -// Modifies the specified endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation ModifyEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeResourceAlreadyExistsFault "ResourceAlreadyExistsFault" -// The resource you are attempting to create already exists. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// AWS DMS cannot access the KMS key. -// -// * ErrCodeAccessDeniedFault "AccessDeniedFault" -// AWS DMS was denied access to the endpoint. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ModifyEndpoint -func (c *DatabaseMigrationService) ModifyEndpoint(input *ModifyEndpointInput) (*ModifyEndpointOutput, error) { - req, out := c.ModifyEndpointRequest(input) - return out, req.Send() -} - -// ModifyEndpointWithContext is the same as ModifyEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) ModifyEndpointWithContext(ctx aws.Context, input *ModifyEndpointInput, opts ...request.Option) (*ModifyEndpointOutput, error) { - req, out := c.ModifyEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyEventSubscription = "ModifyEventSubscription" - -// ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the ModifyEventSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyEventSubscription for more information on using the ModifyEventSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyEventSubscriptionRequest method. -// req, resp := client.ModifyEventSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ModifyEventSubscription -func (c *DatabaseMigrationService) ModifyEventSubscriptionRequest(input *ModifyEventSubscriptionInput) (req *request.Request, output *ModifyEventSubscriptionOutput) { - op := &request.Operation{ - Name: opModifyEventSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyEventSubscriptionInput{} - } - - output = &ModifyEventSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyEventSubscription API operation for AWS Database Migration Service. -// -// Modifies an existing AWS DMS event notification subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation ModifyEventSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceQuotaExceededFault "ResourceQuotaExceededFault" -// The quota for this resource quota has been exceeded. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeSNSInvalidTopicFault "SNSInvalidTopicFault" -// The SNS topic is invalid. -// -// * ErrCodeSNSNoAuthorizationFault "SNSNoAuthorizationFault" -// You are not authorized for the SNS subscription. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ModifyEventSubscription -func (c *DatabaseMigrationService) ModifyEventSubscription(input *ModifyEventSubscriptionInput) (*ModifyEventSubscriptionOutput, error) { - req, out := c.ModifyEventSubscriptionRequest(input) - return out, req.Send() -} - -// ModifyEventSubscriptionWithContext is the same as ModifyEventSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyEventSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) ModifyEventSubscriptionWithContext(ctx aws.Context, input *ModifyEventSubscriptionInput, opts ...request.Option) (*ModifyEventSubscriptionOutput, error) { - req, out := c.ModifyEventSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyReplicationInstance = "ModifyReplicationInstance" - -// ModifyReplicationInstanceRequest generates a "aws/request.Request" representing the -// client's request for the ModifyReplicationInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyReplicationInstance for more information on using the ModifyReplicationInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyReplicationInstanceRequest method. -// req, resp := client.ModifyReplicationInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ModifyReplicationInstance -func (c *DatabaseMigrationService) ModifyReplicationInstanceRequest(input *ModifyReplicationInstanceInput) (req *request.Request, output *ModifyReplicationInstanceOutput) { - op := &request.Operation{ - Name: opModifyReplicationInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyReplicationInstanceInput{} - } - - output = &ModifyReplicationInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyReplicationInstance API operation for AWS Database Migration Service. -// -// Modifies the replication instance to apply new settings. You can change one -// or more parameters by specifying these parameters and the new values in the -// request. -// -// Some settings are applied during the maintenance window. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation ModifyReplicationInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// * ErrCodeResourceAlreadyExistsFault "ResourceAlreadyExistsFault" -// The resource you are attempting to create already exists. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInsufficientResourceCapacityFault "InsufficientResourceCapacityFault" -// There are not enough resources allocated to the database migration. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceededFault" -// The storage quota has been exceeded. -// -// * ErrCodeUpgradeDependencyFailureFault "UpgradeDependencyFailureFault" -// An upgrade dependency is preventing the database migration. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ModifyReplicationInstance -func (c *DatabaseMigrationService) ModifyReplicationInstance(input *ModifyReplicationInstanceInput) (*ModifyReplicationInstanceOutput, error) { - req, out := c.ModifyReplicationInstanceRequest(input) - return out, req.Send() -} - -// ModifyReplicationInstanceWithContext is the same as ModifyReplicationInstance with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyReplicationInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) ModifyReplicationInstanceWithContext(ctx aws.Context, input *ModifyReplicationInstanceInput, opts ...request.Option) (*ModifyReplicationInstanceOutput, error) { - req, out := c.ModifyReplicationInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyReplicationSubnetGroup = "ModifyReplicationSubnetGroup" - -// ModifyReplicationSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyReplicationSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyReplicationSubnetGroup for more information on using the ModifyReplicationSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyReplicationSubnetGroupRequest method. -// req, resp := client.ModifyReplicationSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ModifyReplicationSubnetGroup -func (c *DatabaseMigrationService) ModifyReplicationSubnetGroupRequest(input *ModifyReplicationSubnetGroupInput) (req *request.Request, output *ModifyReplicationSubnetGroupOutput) { - op := &request.Operation{ - Name: opModifyReplicationSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyReplicationSubnetGroupInput{} - } - - output = &ModifyReplicationSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyReplicationSubnetGroup API operation for AWS Database Migration Service. -// -// Modifies the settings for the specified replication subnet group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation ModifyReplicationSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedFault "AccessDeniedFault" -// AWS DMS was denied access to the endpoint. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeResourceQuotaExceededFault "ResourceQuotaExceededFault" -// The quota for this resource quota has been exceeded. -// -// * ErrCodeSubnetAlreadyInUse "SubnetAlreadyInUse" -// The specified subnet is already in use. -// -// * ErrCodeReplicationSubnetGroupDoesNotCoverEnoughAZs "ReplicationSubnetGroupDoesNotCoverEnoughAZs" -// The replication subnet group does not cover enough Availability Zones (AZs). -// Edit the replication subnet group and add more AZs. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The subnet provided is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ModifyReplicationSubnetGroup -func (c *DatabaseMigrationService) ModifyReplicationSubnetGroup(input *ModifyReplicationSubnetGroupInput) (*ModifyReplicationSubnetGroupOutput, error) { - req, out := c.ModifyReplicationSubnetGroupRequest(input) - return out, req.Send() -} - -// ModifyReplicationSubnetGroupWithContext is the same as ModifyReplicationSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyReplicationSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) ModifyReplicationSubnetGroupWithContext(ctx aws.Context, input *ModifyReplicationSubnetGroupInput, opts ...request.Option) (*ModifyReplicationSubnetGroupOutput, error) { - req, out := c.ModifyReplicationSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyReplicationTask = "ModifyReplicationTask" - -// ModifyReplicationTaskRequest generates a "aws/request.Request" representing the -// client's request for the ModifyReplicationTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyReplicationTask for more information on using the ModifyReplicationTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyReplicationTaskRequest method. -// req, resp := client.ModifyReplicationTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ModifyReplicationTask -func (c *DatabaseMigrationService) ModifyReplicationTaskRequest(input *ModifyReplicationTaskInput) (req *request.Request, output *ModifyReplicationTaskOutput) { - op := &request.Operation{ - Name: opModifyReplicationTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyReplicationTaskInput{} - } - - output = &ModifyReplicationTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyReplicationTask API operation for AWS Database Migration Service. -// -// Modifies the specified replication task. -// -// You can't modify the task endpoints. The task must be stopped before you -// can modify it. -// -// For more information about AWS DMS tasks, see Working with Migration Tasks -// (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.html) in the -// AWS Database Migration Service User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation ModifyReplicationTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeResourceAlreadyExistsFault "ResourceAlreadyExistsFault" -// The resource you are attempting to create already exists. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// AWS DMS cannot access the KMS key. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ModifyReplicationTask -func (c *DatabaseMigrationService) ModifyReplicationTask(input *ModifyReplicationTaskInput) (*ModifyReplicationTaskOutput, error) { - req, out := c.ModifyReplicationTaskRequest(input) - return out, req.Send() -} - -// ModifyReplicationTaskWithContext is the same as ModifyReplicationTask with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyReplicationTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) ModifyReplicationTaskWithContext(ctx aws.Context, input *ModifyReplicationTaskInput, opts ...request.Option) (*ModifyReplicationTaskOutput, error) { - req, out := c.ModifyReplicationTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRebootReplicationInstance = "RebootReplicationInstance" - -// RebootReplicationInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RebootReplicationInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebootReplicationInstance for more information on using the RebootReplicationInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebootReplicationInstanceRequest method. -// req, resp := client.RebootReplicationInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/RebootReplicationInstance -func (c *DatabaseMigrationService) RebootReplicationInstanceRequest(input *RebootReplicationInstanceInput) (req *request.Request, output *RebootReplicationInstanceOutput) { - op := &request.Operation{ - Name: opRebootReplicationInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RebootReplicationInstanceInput{} - } - - output = &RebootReplicationInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// RebootReplicationInstance API operation for AWS Database Migration Service. -// -// Reboots a replication instance. Rebooting results in a momentary outage, -// until the replication instance becomes available again. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation RebootReplicationInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/RebootReplicationInstance -func (c *DatabaseMigrationService) RebootReplicationInstance(input *RebootReplicationInstanceInput) (*RebootReplicationInstanceOutput, error) { - req, out := c.RebootReplicationInstanceRequest(input) - return out, req.Send() -} - -// RebootReplicationInstanceWithContext is the same as RebootReplicationInstance with the addition of -// the ability to pass a context and additional request options. -// -// See RebootReplicationInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) RebootReplicationInstanceWithContext(ctx aws.Context, input *RebootReplicationInstanceInput, opts ...request.Option) (*RebootReplicationInstanceOutput, error) { - req, out := c.RebootReplicationInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRefreshSchemas = "RefreshSchemas" - -// RefreshSchemasRequest generates a "aws/request.Request" representing the -// client's request for the RefreshSchemas operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RefreshSchemas for more information on using the RefreshSchemas -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RefreshSchemasRequest method. -// req, resp := client.RefreshSchemasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/RefreshSchemas -func (c *DatabaseMigrationService) RefreshSchemasRequest(input *RefreshSchemasInput) (req *request.Request, output *RefreshSchemasOutput) { - op := &request.Operation{ - Name: opRefreshSchemas, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RefreshSchemasInput{} - } - - output = &RefreshSchemasOutput{} - req = c.newRequest(op, input, output) - return -} - -// RefreshSchemas API operation for AWS Database Migration Service. -// -// Populates the schema for the specified endpoint. This is an asynchronous -// operation and can take several minutes. You can check the status of this -// operation by calling the DescribeRefreshSchemasStatus operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation RefreshSchemas for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// AWS DMS cannot access the KMS key. -// -// * ErrCodeResourceQuotaExceededFault "ResourceQuotaExceededFault" -// The quota for this resource quota has been exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/RefreshSchemas -func (c *DatabaseMigrationService) RefreshSchemas(input *RefreshSchemasInput) (*RefreshSchemasOutput, error) { - req, out := c.RefreshSchemasRequest(input) - return out, req.Send() -} - -// RefreshSchemasWithContext is the same as RefreshSchemas with the addition of -// the ability to pass a context and additional request options. -// -// See RefreshSchemas for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) RefreshSchemasWithContext(ctx aws.Context, input *RefreshSchemasInput, opts ...request.Option) (*RefreshSchemasOutput, error) { - req, out := c.RefreshSchemasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReloadTables = "ReloadTables" - -// ReloadTablesRequest generates a "aws/request.Request" representing the -// client's request for the ReloadTables operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReloadTables for more information on using the ReloadTables -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReloadTablesRequest method. -// req, resp := client.ReloadTablesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ReloadTables -func (c *DatabaseMigrationService) ReloadTablesRequest(input *ReloadTablesInput) (req *request.Request, output *ReloadTablesOutput) { - op := &request.Operation{ - Name: opReloadTables, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReloadTablesInput{} - } - - output = &ReloadTablesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ReloadTables API operation for AWS Database Migration Service. -// -// Reloads the target database table with the source data. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation ReloadTables for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ReloadTables -func (c *DatabaseMigrationService) ReloadTables(input *ReloadTablesInput) (*ReloadTablesOutput, error) { - req, out := c.ReloadTablesRequest(input) - return out, req.Send() -} - -// ReloadTablesWithContext is the same as ReloadTables with the addition of -// the ability to pass a context and additional request options. -// -// See ReloadTables for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) ReloadTablesWithContext(ctx aws.Context, input *ReloadTablesInput, opts ...request.Option) (*ReloadTablesOutput, error) { - req, out := c.ReloadTablesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTagsFromResource = "RemoveTagsFromResource" - -// RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTagsFromResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTagsFromResource for more information on using the RemoveTagsFromResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsFromResourceRequest method. -// req, resp := client.RemoveTagsFromResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/RemoveTagsFromResource -func (c *DatabaseMigrationService) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *RemoveTagsFromResourceOutput) { - op := &request.Operation{ - Name: opRemoveTagsFromResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsFromResourceInput{} - } - - output = &RemoveTagsFromResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTagsFromResource API operation for AWS Database Migration Service. -// -// Removes metadata tags from a DMS 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 Database Migration Service's -// API operation RemoveTagsFromResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/RemoveTagsFromResource -func (c *DatabaseMigrationService) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - return out, req.Send() -} - -// RemoveTagsFromResourceWithContext is the same as RemoveTagsFromResource with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTagsFromResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*RemoveTagsFromResourceOutput, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartReplicationTask = "StartReplicationTask" - -// StartReplicationTaskRequest generates a "aws/request.Request" representing the -// client's request for the StartReplicationTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartReplicationTask for more information on using the StartReplicationTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartReplicationTaskRequest method. -// req, resp := client.StartReplicationTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/StartReplicationTask -func (c *DatabaseMigrationService) StartReplicationTaskRequest(input *StartReplicationTaskInput) (req *request.Request, output *StartReplicationTaskOutput) { - op := &request.Operation{ - Name: opStartReplicationTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartReplicationTaskInput{} - } - - output = &StartReplicationTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartReplicationTask API operation for AWS Database Migration Service. -// -// Starts the replication task. -// -// For more information about AWS DMS tasks, see Working with Migration Tasks -// (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.html) in the -// AWS Database Migration Service User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation StartReplicationTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// * ErrCodeAccessDeniedFault "AccessDeniedFault" -// AWS DMS was denied access to the endpoint. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/StartReplicationTask -func (c *DatabaseMigrationService) StartReplicationTask(input *StartReplicationTaskInput) (*StartReplicationTaskOutput, error) { - req, out := c.StartReplicationTaskRequest(input) - return out, req.Send() -} - -// StartReplicationTaskWithContext is the same as StartReplicationTask with the addition of -// the ability to pass a context and additional request options. -// -// See StartReplicationTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) StartReplicationTaskWithContext(ctx aws.Context, input *StartReplicationTaskInput, opts ...request.Option) (*StartReplicationTaskOutput, error) { - req, out := c.StartReplicationTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartReplicationTaskAssessment = "StartReplicationTaskAssessment" - -// StartReplicationTaskAssessmentRequest generates a "aws/request.Request" representing the -// client's request for the StartReplicationTaskAssessment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartReplicationTaskAssessment for more information on using the StartReplicationTaskAssessment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartReplicationTaskAssessmentRequest method. -// req, resp := client.StartReplicationTaskAssessmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/StartReplicationTaskAssessment -func (c *DatabaseMigrationService) StartReplicationTaskAssessmentRequest(input *StartReplicationTaskAssessmentInput) (req *request.Request, output *StartReplicationTaskAssessmentOutput) { - op := &request.Operation{ - Name: opStartReplicationTaskAssessment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartReplicationTaskAssessmentInput{} - } - - output = &StartReplicationTaskAssessmentOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartReplicationTaskAssessment API operation for AWS Database Migration Service. -// -// Starts the replication task assessment for unsupported data types in the -// source database. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation StartReplicationTaskAssessment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/StartReplicationTaskAssessment -func (c *DatabaseMigrationService) StartReplicationTaskAssessment(input *StartReplicationTaskAssessmentInput) (*StartReplicationTaskAssessmentOutput, error) { - req, out := c.StartReplicationTaskAssessmentRequest(input) - return out, req.Send() -} - -// StartReplicationTaskAssessmentWithContext is the same as StartReplicationTaskAssessment with the addition of -// the ability to pass a context and additional request options. -// -// See StartReplicationTaskAssessment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) StartReplicationTaskAssessmentWithContext(ctx aws.Context, input *StartReplicationTaskAssessmentInput, opts ...request.Option) (*StartReplicationTaskAssessmentOutput, error) { - req, out := c.StartReplicationTaskAssessmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopReplicationTask = "StopReplicationTask" - -// StopReplicationTaskRequest generates a "aws/request.Request" representing the -// client's request for the StopReplicationTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopReplicationTask for more information on using the StopReplicationTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopReplicationTaskRequest method. -// req, resp := client.StopReplicationTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/StopReplicationTask -func (c *DatabaseMigrationService) StopReplicationTaskRequest(input *StopReplicationTaskInput) (req *request.Request, output *StopReplicationTaskOutput) { - op := &request.Operation{ - Name: opStopReplicationTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopReplicationTaskInput{} - } - - output = &StopReplicationTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopReplicationTask API operation for AWS Database Migration Service. -// -// Stops the replication task. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation StopReplicationTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/StopReplicationTask -func (c *DatabaseMigrationService) StopReplicationTask(input *StopReplicationTaskInput) (*StopReplicationTaskOutput, error) { - req, out := c.StopReplicationTaskRequest(input) - return out, req.Send() -} - -// StopReplicationTaskWithContext is the same as StopReplicationTask with the addition of -// the ability to pass a context and additional request options. -// -// See StopReplicationTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) StopReplicationTaskWithContext(ctx aws.Context, input *StopReplicationTaskInput, opts ...request.Option) (*StopReplicationTaskOutput, error) { - req, out := c.StopReplicationTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTestConnection = "TestConnection" - -// TestConnectionRequest generates a "aws/request.Request" representing the -// client's request for the TestConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TestConnection for more information on using the TestConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TestConnectionRequest method. -// req, resp := client.TestConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/TestConnection -func (c *DatabaseMigrationService) TestConnectionRequest(input *TestConnectionInput) (req *request.Request, output *TestConnectionOutput) { - op := &request.Operation{ - Name: opTestConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TestConnectionInput{} - } - - output = &TestConnectionOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestConnection API operation for AWS Database Migration Service. -// -// Tests the connection between the replication instance and the endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Database Migration Service's -// API operation TestConnection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInvalidResourceStateFault "InvalidResourceStateFault" -// The resource is in a state that prevents it from being used for database -// migration. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// AWS DMS cannot access the KMS key. -// -// * ErrCodeResourceQuotaExceededFault "ResourceQuotaExceededFault" -// The quota for this resource quota has been exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/TestConnection -func (c *DatabaseMigrationService) TestConnection(input *TestConnectionInput) (*TestConnectionOutput, error) { - req, out := c.TestConnectionRequest(input) - return out, req.Send() -} - -// TestConnectionWithContext is the same as TestConnection with the addition of -// the ability to pass a context and additional request options. -// -// See TestConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) TestConnectionWithContext(ctx aws.Context, input *TestConnectionInput, opts ...request.Option) (*TestConnectionOutput, error) { - req, out := c.TestConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Describes a quota for an AWS account, for example, the number of replication -// instances allowed. -type AccountQuota struct { - _ struct{} `type:"structure"` - - // The name of the AWS DMS quota for this AWS account. - AccountQuotaName *string `type:"string"` - - // The maximum allowed value for the quota. - Max *int64 `type:"long"` - - // The amount currently used toward the quota maximum. - Used *int64 `type:"long"` -} - -// String returns the string representation -func (s AccountQuota) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountQuota) GoString() string { - return s.String() -} - -// SetAccountQuotaName sets the AccountQuotaName field's value. -func (s *AccountQuota) SetAccountQuotaName(v string) *AccountQuota { - s.AccountQuotaName = &v - return s -} - -// SetMax sets the Max field's value. -func (s *AccountQuota) SetMax(v int64) *AccountQuota { - s.Max = &v - return s -} - -// SetUsed sets the Used field's value. -func (s *AccountQuota) SetUsed(v int64) *AccountQuota { - s.Used = &v - return s -} - -type AddTagsToResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the AWS DMS resource the tag is to be added - // to. AWS DMS resources include a replication instance, endpoint, and a replication - // task. - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` - - // The tag to be assigned to the DMS resource. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsToResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsToResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *AddTagsToResourceInput) SetResourceArn(v string) *AddTagsToResourceInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { - s.Tags = v - return s -} - -type AddTagsToResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsToResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceOutput) GoString() string { - return s.String() -} - -type AvailabilityZone struct { - _ struct{} `type:"structure"` - - // The name of the availability zone. - Name *string `type:"string"` -} - -// String returns the string representation -func (s AvailabilityZone) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailabilityZone) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { - s.Name = &v - return s -} - -// The SSL certificate that can be used to encrypt connections between the endpoints -// and the replication instance. -type Certificate struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the certificate. - CertificateArn *string `type:"string"` - - // The date that the certificate was created. - CertificateCreationDate *time.Time `type:"timestamp"` - - // The customer-assigned name of the certificate. Valid characters are A-z and - // 0-9. - CertificateIdentifier *string `type:"string"` - - // The owner of the certificate. - CertificateOwner *string `type:"string"` - - // The contents of the .pem X.509 certificate file for the certificate. - CertificatePem *string `type:"string"` - - // The location of the imported Oracle Wallet certificate for use with SSL. - // - // CertificateWallet is automatically base64 encoded/decoded by the SDK. - CertificateWallet []byte `type:"blob"` - - // The key length of the cryptographic algorithm being used. - KeyLength *int64 `type:"integer"` - - // The signing algorithm for the certificate. - SigningAlgorithm *string `type:"string"` - - // The beginning date that the certificate is valid. - ValidFromDate *time.Time `type:"timestamp"` - - // The final date that the certificate is valid. - ValidToDate *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s Certificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Certificate) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *Certificate) SetCertificateArn(v string) *Certificate { - s.CertificateArn = &v - return s -} - -// SetCertificateCreationDate sets the CertificateCreationDate field's value. -func (s *Certificate) SetCertificateCreationDate(v time.Time) *Certificate { - s.CertificateCreationDate = &v - return s -} - -// SetCertificateIdentifier sets the CertificateIdentifier field's value. -func (s *Certificate) SetCertificateIdentifier(v string) *Certificate { - s.CertificateIdentifier = &v - return s -} - -// SetCertificateOwner sets the CertificateOwner field's value. -func (s *Certificate) SetCertificateOwner(v string) *Certificate { - s.CertificateOwner = &v - return s -} - -// SetCertificatePem sets the CertificatePem field's value. -func (s *Certificate) SetCertificatePem(v string) *Certificate { - s.CertificatePem = &v - return s -} - -// SetCertificateWallet sets the CertificateWallet field's value. -func (s *Certificate) SetCertificateWallet(v []byte) *Certificate { - s.CertificateWallet = v - return s -} - -// SetKeyLength sets the KeyLength field's value. -func (s *Certificate) SetKeyLength(v int64) *Certificate { - s.KeyLength = &v - return s -} - -// SetSigningAlgorithm sets the SigningAlgorithm field's value. -func (s *Certificate) SetSigningAlgorithm(v string) *Certificate { - s.SigningAlgorithm = &v - return s -} - -// SetValidFromDate sets the ValidFromDate field's value. -func (s *Certificate) SetValidFromDate(v time.Time) *Certificate { - s.ValidFromDate = &v - return s -} - -// SetValidToDate sets the ValidToDate field's value. -func (s *Certificate) SetValidToDate(v time.Time) *Certificate { - s.ValidToDate = &v - return s -} - -type Connection struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. - EndpointArn *string `type:"string"` - - // The identifier of the endpoint. Identifiers must begin with a letter; must - // contain only ASCII letters, digits, and hyphens; and must not end with a - // hyphen or contain two consecutive hyphens. - EndpointIdentifier *string `type:"string"` - - // The error message when the connection last failed. - LastFailureMessage *string `type:"string"` - - // The Amazon Resource Name (ARN) of the replication instance. - ReplicationInstanceArn *string `type:"string"` - - // The replication instance identifier. This parameter is stored as a lowercase - // string. - ReplicationInstanceIdentifier *string `type:"string"` - - // The connection status. - Status *string `type:"string"` -} - -// String returns the string representation -func (s Connection) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Connection) GoString() string { - return s.String() -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *Connection) SetEndpointArn(v string) *Connection { - s.EndpointArn = &v - return s -} - -// SetEndpointIdentifier sets the EndpointIdentifier field's value. -func (s *Connection) SetEndpointIdentifier(v string) *Connection { - s.EndpointIdentifier = &v - return s -} - -// SetLastFailureMessage sets the LastFailureMessage field's value. -func (s *Connection) SetLastFailureMessage(v string) *Connection { - s.LastFailureMessage = &v - return s -} - -// SetReplicationInstanceArn sets the ReplicationInstanceArn field's value. -func (s *Connection) SetReplicationInstanceArn(v string) *Connection { - s.ReplicationInstanceArn = &v - return s -} - -// SetReplicationInstanceIdentifier sets the ReplicationInstanceIdentifier field's value. -func (s *Connection) SetReplicationInstanceIdentifier(v string) *Connection { - s.ReplicationInstanceIdentifier = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Connection) SetStatus(v string) *Connection { - s.Status = &v - return s -} - -type CreateEndpointInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the certificate. - CertificateArn *string `type:"string"` - - // The name of the endpoint database. - DatabaseName *string `type:"string"` - - // The settings in JSON format for the DMS transfer type of source endpoint. - // - // Possible attributes include the following: - // - // * serviceAccessRoleArn - The IAM role that has permission to access the - // Amazon S3 bucket. - // - // * bucketName - The name of the S3 bucket to use. - // - // * compressionType - An optional parameter to use GZIP to compress the - // target files. To use GZIP, set this value to NONE (the default). To keep - // the files uncompressed, don't use this value. - // - // Shorthand syntax for these attributes is as follows: ServiceAccessRoleArn=string,BucketName=string,CompressionType=string - // - // JSON syntax for these attributes is as follows: { "ServiceAccessRoleArn": - // "string", "BucketName": "string", "CompressionType": "none"|"gzip" } - DmsTransferSettings *DmsTransferSettings `type:"structure"` - - // Settings in JSON format for the target Amazon DynamoDB endpoint. For more - // information about the available settings, see Using Object Mapping to Migrate - // Data to DynamoDB (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.DynamoDB.html) - // in the AWS Database Migration Service User Guide. - DynamoDbSettings *DynamoDbSettings `type:"structure"` - - // Settings in JSON format for the target Elasticsearch endpoint. For more information - // about the available settings, see Extra Connection Attributes When Using - // Elasticsearch as a Target for AWS DMS (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Elasticsearch.html#CHAP_Target.Elasticsearch.Configuration) - // in the AWS Database Migration User Guide. - ElasticsearchSettings *ElasticsearchSettings `type:"structure"` - - // The database endpoint identifier. Identifiers must begin with a letter; must - // contain only ASCII letters, digits, and hyphens; and must not end with a - // hyphen or contain two consecutive hyphens. - // - // EndpointIdentifier is a required field - EndpointIdentifier *string `type:"string" required:"true"` - - // The type of endpoint. - // - // EndpointType is a required field - EndpointType *string `type:"string" required:"true" enum:"ReplicationEndpointTypeValue"` - - // The type of engine for the endpoint. Valid values, depending on the EndPointType - // value, include mysql, oracle, postgres, mariadb, aurora, aurora-postgresql, - // redshift, s3, db2, azuredb, sybase, dynamodb, mongodb, and sqlserver. - // - // EngineName is a required field - EngineName *string `type:"string" required:"true"` - - // The external table definition. - ExternalTableDefinition *string `type:"string"` - - // Additional attributes associated with the connection. - ExtraConnectionAttributes *string `type:"string"` - - // Settings in JSON format for the target Amazon Kinesis Data Streams endpoint. - // For more information about the available settings, see Using Object Mapping - // to Migrate Data to a Kinesis Data Stream (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kinesis.html#CHAP_Target.Kinesis.ObjectMapping - // ) in the AWS Database Migration User Guide. - KinesisSettings *KinesisSettings `type:"structure"` - - // The AWS KMS key identifier to use to encrypt the connection parameters. If - // you don't specify a value for the KmsKeyId parameter, then AWS DMS uses your - // default encryption key. AWS KMS creates the default encryption key for your - // AWS account. Your AWS account has a different default encryption key for - // each AWS Region. - KmsKeyId *string `type:"string"` - - // Settings in JSON format for the source MongoDB endpoint. For more information - // about the available settings, see the configuration properties section in - // Using MongoDB as a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html) - // in the AWS Database Migration Service User Guide. - MongoDbSettings *MongoDbSettings `type:"structure"` - - // The password to be used to log in to the endpoint database. - Password *string `type:"string" sensitive:"true"` - - // The port used by the endpoint database. - Port *int64 `type:"integer"` - - // Settings in JSON format for the target Amazon S3 endpoint. For more information - // about the available settings, see Extra Connection Attributes When Using - // Amazon S3 as a Target for AWS DMS (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html#CHAP_Target.S3.Configuring) - // in the AWS Database Migration Service User Guide. - S3Settings *S3Settings `type:"structure"` - - // The name of the server where the endpoint database resides. - ServerName *string `type:"string"` - - // The Amazon Resource Name (ARN) for the service access role that you want - // to use to create the endpoint. - ServiceAccessRoleArn *string `type:"string"` - - // The Secure Sockets Layer (SSL) mode to use for the SSL connection. The SSL - // mode can be one of four values: none, require, verify-ca, verify-full. The - // default value is none. - SslMode *string `type:"string" enum:"DmsSslModeValue"` - - // Tags to be added to the endpoint. - Tags []*Tag `type:"list"` - - // The user name to be used to log in to the endpoint database. - Username *string `type:"string"` -} - -// String returns the string representation -func (s CreateEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateEndpointInput"} - if s.EndpointIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointIdentifier")) - } - if s.EndpointType == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointType")) - } - if s.EngineName == nil { - invalidParams.Add(request.NewErrParamRequired("EngineName")) - } - if s.DynamoDbSettings != nil { - if err := s.DynamoDbSettings.Validate(); err != nil { - invalidParams.AddNested("DynamoDbSettings", err.(request.ErrInvalidParams)) - } - } - if s.ElasticsearchSettings != nil { - if err := s.ElasticsearchSettings.Validate(); err != nil { - invalidParams.AddNested("ElasticsearchSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *CreateEndpointInput) SetCertificateArn(v string) *CreateEndpointInput { - s.CertificateArn = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *CreateEndpointInput) SetDatabaseName(v string) *CreateEndpointInput { - s.DatabaseName = &v - return s -} - -// SetDmsTransferSettings sets the DmsTransferSettings field's value. -func (s *CreateEndpointInput) SetDmsTransferSettings(v *DmsTransferSettings) *CreateEndpointInput { - s.DmsTransferSettings = v - return s -} - -// SetDynamoDbSettings sets the DynamoDbSettings field's value. -func (s *CreateEndpointInput) SetDynamoDbSettings(v *DynamoDbSettings) *CreateEndpointInput { - s.DynamoDbSettings = v - return s -} - -// SetElasticsearchSettings sets the ElasticsearchSettings field's value. -func (s *CreateEndpointInput) SetElasticsearchSettings(v *ElasticsearchSettings) *CreateEndpointInput { - s.ElasticsearchSettings = v - return s -} - -// SetEndpointIdentifier sets the EndpointIdentifier field's value. -func (s *CreateEndpointInput) SetEndpointIdentifier(v string) *CreateEndpointInput { - s.EndpointIdentifier = &v - return s -} - -// SetEndpointType sets the EndpointType field's value. -func (s *CreateEndpointInput) SetEndpointType(v string) *CreateEndpointInput { - s.EndpointType = &v - return s -} - -// SetEngineName sets the EngineName field's value. -func (s *CreateEndpointInput) SetEngineName(v string) *CreateEndpointInput { - s.EngineName = &v - return s -} - -// SetExternalTableDefinition sets the ExternalTableDefinition field's value. -func (s *CreateEndpointInput) SetExternalTableDefinition(v string) *CreateEndpointInput { - s.ExternalTableDefinition = &v - return s -} - -// SetExtraConnectionAttributes sets the ExtraConnectionAttributes field's value. -func (s *CreateEndpointInput) SetExtraConnectionAttributes(v string) *CreateEndpointInput { - s.ExtraConnectionAttributes = &v - return s -} - -// SetKinesisSettings sets the KinesisSettings field's value. -func (s *CreateEndpointInput) SetKinesisSettings(v *KinesisSettings) *CreateEndpointInput { - s.KinesisSettings = v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateEndpointInput) SetKmsKeyId(v string) *CreateEndpointInput { - s.KmsKeyId = &v - return s -} - -// SetMongoDbSettings sets the MongoDbSettings field's value. -func (s *CreateEndpointInput) SetMongoDbSettings(v *MongoDbSettings) *CreateEndpointInput { - s.MongoDbSettings = v - return s -} - -// SetPassword sets the Password field's value. -func (s *CreateEndpointInput) SetPassword(v string) *CreateEndpointInput { - s.Password = &v - return s -} - -// SetPort sets the Port field's value. -func (s *CreateEndpointInput) SetPort(v int64) *CreateEndpointInput { - s.Port = &v - return s -} - -// SetS3Settings sets the S3Settings field's value. -func (s *CreateEndpointInput) SetS3Settings(v *S3Settings) *CreateEndpointInput { - s.S3Settings = v - return s -} - -// SetServerName sets the ServerName field's value. -func (s *CreateEndpointInput) SetServerName(v string) *CreateEndpointInput { - s.ServerName = &v - return s -} - -// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. -func (s *CreateEndpointInput) SetServiceAccessRoleArn(v string) *CreateEndpointInput { - s.ServiceAccessRoleArn = &v - return s -} - -// SetSslMode sets the SslMode field's value. -func (s *CreateEndpointInput) SetSslMode(v string) *CreateEndpointInput { - s.SslMode = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateEndpointInput) SetTags(v []*Tag) *CreateEndpointInput { - s.Tags = v - return s -} - -// SetUsername sets the Username field's value. -func (s *CreateEndpointInput) SetUsername(v string) *CreateEndpointInput { - s.Username = &v - return s -} - -type CreateEndpointOutput struct { - _ struct{} `type:"structure"` - - // The endpoint that was created. - Endpoint *Endpoint `type:"structure"` -} - -// String returns the string representation -func (s CreateEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEndpointOutput) GoString() string { - return s.String() -} - -// SetEndpoint sets the Endpoint field's value. -func (s *CreateEndpointOutput) SetEndpoint(v *Endpoint) *CreateEndpointOutput { - s.Endpoint = v - return s -} - -type CreateEventSubscriptionInput struct { - _ struct{} `type:"structure"` - - // A Boolean value; set to true to activate the subscription, or set to false - // to create the subscription but not activate it. - Enabled *bool `type:"boolean"` - - // A list of event categories for a source type that you want to subscribe to. - // You can see a list of the categories for a given source type by calling the - // DescribeEventCategories action or in the topic Working with Events and Notifications - // (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Events.html) in the - // AWS Database Migration Service User Guide. - EventCategories []*string `type:"list"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic created for event - // notification. The ARN is created by Amazon SNS when you create a topic and - // subscribe to it. - // - // SnsTopicArn is a required field - SnsTopicArn *string `type:"string" required:"true"` - - // The list of identifiers of the event sources for which events will be returned. - // If not specified, then all sources are included in the response. An identifier - // must begin with a letter and must contain only ASCII letters, digits, and - // hyphens; it cannot end with a hyphen or contain two consecutive hyphens. - SourceIds []*string `type:"list"` - - // The type of AWS DMS resource that generates the events. For example, if you - // want to be notified of events generated by a replication instance, you set - // this parameter to replication-instance. If this value is not specified, all - // events are returned. - // - // Valid values: replication-instance | migration-task - SourceType *string `type:"string"` - - // The name of the AWS DMS event notification subscription. - // - // Constraints: The name must be less than 255 characters. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` - - // A tag to be attached to the event subscription. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreateEventSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEventSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateEventSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateEventSubscriptionInput"} - if s.SnsTopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("SnsTopicArn")) - } - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *CreateEventSubscriptionInput) SetEnabled(v bool) *CreateEventSubscriptionInput { - s.Enabled = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *CreateEventSubscriptionInput) SetEventCategories(v []*string) *CreateEventSubscriptionInput { - s.EventCategories = v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *CreateEventSubscriptionInput) SetSnsTopicArn(v string) *CreateEventSubscriptionInput { - s.SnsTopicArn = &v - return s -} - -// SetSourceIds sets the SourceIds field's value. -func (s *CreateEventSubscriptionInput) SetSourceIds(v []*string) *CreateEventSubscriptionInput { - s.SourceIds = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *CreateEventSubscriptionInput) SetSourceType(v string) *CreateEventSubscriptionInput { - s.SourceType = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *CreateEventSubscriptionInput) SetSubscriptionName(v string) *CreateEventSubscriptionInput { - s.SubscriptionName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateEventSubscriptionInput) SetTags(v []*Tag) *CreateEventSubscriptionInput { - s.Tags = v - return s -} - -type CreateEventSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // The event subscription that was created. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s CreateEventSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEventSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *CreateEventSubscriptionOutput) SetEventSubscription(v *EventSubscription) *CreateEventSubscriptionOutput { - s.EventSubscription = v - return s -} - -type CreateReplicationInstanceInput struct { - _ struct{} `type:"structure"` - - // The amount of storage (in gigabytes) to be initially allocated for the replication - // instance. - AllocatedStorage *int64 `type:"integer"` - - // Indicates that minor engine upgrades will be applied automatically to the - // replication instance during the maintenance window. - // - // Default: true - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The EC2 Availability Zone that the replication instance will be created in. - // - // Default: A random, system-chosen Availability Zone in the endpoint's region. - // - // Example: us-east-1d - AvailabilityZone *string `type:"string"` - - // A list of DNS name servers supported for the replication instance. - DnsNameServers *string `type:"string"` - - // The engine version number of the replication instance. - EngineVersion *string `type:"string"` - - // The AWS KMS key identifier that is used to encrypt the content on the replication - // instance. If you don't specify a value for the KmsKeyId parameter, then AWS - // DMS uses your default encryption key. AWS KMS creates the default encryption - // key for your AWS account. Your AWS account has a different default encryption - // key for each AWS Region. - KmsKeyId *string `type:"string"` - - // Specifies if the replication instance is a Multi-AZ deployment. You cannot - // set the AvailabilityZone parameter if the Multi-AZ parameter is set to true. - MultiAZ *bool `type:"boolean"` - - // The weekly time range during which system maintenance can occur, in Universal - // Coordinated Time (UTC). - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // Default: A 30-minute window selected at random from an 8-hour block of time - // per region, occurring on a random day of the week. - // - // Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun - // - // Constraints: Minimum 30-minute window. - PreferredMaintenanceWindow *string `type:"string"` - - // Specifies the accessibility options for the replication instance. A value - // of true represents an instance with a public IP address. A value of false - // represents an instance with a private IP address. The default value is true. - PubliclyAccessible *bool `type:"boolean"` - - // The compute and memory capacity of the replication instance as specified - // by the replication instance class. - // - // Valid Values: dms.t2.micro | dms.t2.small | dms.t2.medium | dms.t2.large - // | dms.c4.large | dms.c4.xlarge | dms.c4.2xlarge | dms.c4.4xlarge - // - // ReplicationInstanceClass is a required field - ReplicationInstanceClass *string `type:"string" required:"true"` - - // The replication instance identifier. This parameter is stored as a lowercase - // string. - // - // Constraints: - // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: myrepinstance - // - // ReplicationInstanceIdentifier is a required field - ReplicationInstanceIdentifier *string `type:"string" required:"true"` - - // A subnet group to associate with the replication instance. - ReplicationSubnetGroupIdentifier *string `type:"string"` - - // Tags to be associated with the replication instance. - Tags []*Tag `type:"list"` - - // Specifies the VPC security group to be used with the replication instance. - // The VPC security group must work with the VPC containing the replication - // instance. - VpcSecurityGroupIds []*string `type:"list"` -} - -// String returns the string representation -func (s CreateReplicationInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReplicationInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateReplicationInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateReplicationInstanceInput"} - if s.ReplicationInstanceClass == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationInstanceClass")) - } - if s.ReplicationInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *CreateReplicationInstanceInput) SetAllocatedStorage(v int64) *CreateReplicationInstanceInput { - s.AllocatedStorage = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *CreateReplicationInstanceInput) SetAutoMinorVersionUpgrade(v bool) *CreateReplicationInstanceInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateReplicationInstanceInput) SetAvailabilityZone(v string) *CreateReplicationInstanceInput { - s.AvailabilityZone = &v - return s -} - -// SetDnsNameServers sets the DnsNameServers field's value. -func (s *CreateReplicationInstanceInput) SetDnsNameServers(v string) *CreateReplicationInstanceInput { - s.DnsNameServers = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *CreateReplicationInstanceInput) SetEngineVersion(v string) *CreateReplicationInstanceInput { - s.EngineVersion = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateReplicationInstanceInput) SetKmsKeyId(v string) *CreateReplicationInstanceInput { - s.KmsKeyId = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *CreateReplicationInstanceInput) SetMultiAZ(v bool) *CreateReplicationInstanceInput { - s.MultiAZ = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CreateReplicationInstanceInput) SetPreferredMaintenanceWindow(v string) *CreateReplicationInstanceInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *CreateReplicationInstanceInput) SetPubliclyAccessible(v bool) *CreateReplicationInstanceInput { - s.PubliclyAccessible = &v - return s -} - -// SetReplicationInstanceClass sets the ReplicationInstanceClass field's value. -func (s *CreateReplicationInstanceInput) SetReplicationInstanceClass(v string) *CreateReplicationInstanceInput { - s.ReplicationInstanceClass = &v - return s -} - -// SetReplicationInstanceIdentifier sets the ReplicationInstanceIdentifier field's value. -func (s *CreateReplicationInstanceInput) SetReplicationInstanceIdentifier(v string) *CreateReplicationInstanceInput { - s.ReplicationInstanceIdentifier = &v - return s -} - -// SetReplicationSubnetGroupIdentifier sets the ReplicationSubnetGroupIdentifier field's value. -func (s *CreateReplicationInstanceInput) SetReplicationSubnetGroupIdentifier(v string) *CreateReplicationInstanceInput { - s.ReplicationSubnetGroupIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateReplicationInstanceInput) SetTags(v []*Tag) *CreateReplicationInstanceInput { - s.Tags = v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *CreateReplicationInstanceInput) SetVpcSecurityGroupIds(v []*string) *CreateReplicationInstanceInput { - s.VpcSecurityGroupIds = v - return s -} - -type CreateReplicationInstanceOutput struct { - _ struct{} `type:"structure"` - - // The replication instance that was created. - ReplicationInstance *ReplicationInstance `type:"structure"` -} - -// String returns the string representation -func (s CreateReplicationInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReplicationInstanceOutput) GoString() string { - return s.String() -} - -// SetReplicationInstance sets the ReplicationInstance field's value. -func (s *CreateReplicationInstanceOutput) SetReplicationInstance(v *ReplicationInstance) *CreateReplicationInstanceOutput { - s.ReplicationInstance = v - return s -} - -type CreateReplicationSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The description for the subnet group. - // - // ReplicationSubnetGroupDescription is a required field - ReplicationSubnetGroupDescription *string `type:"string" required:"true"` - - // The name for the replication subnet group. This value is stored as a lowercase - // string. - // - // Constraints: Must contain no more than 255 alphanumeric characters, periods, - // spaces, underscores, or hyphens. Must not be "default". - // - // Example: mySubnetgroup - // - // ReplicationSubnetGroupIdentifier is a required field - ReplicationSubnetGroupIdentifier *string `type:"string" required:"true"` - - // The EC2 subnet IDs for the subnet group. - // - // SubnetIds is a required field - SubnetIds []*string `type:"list" required:"true"` - - // The tag to be assigned to the subnet group. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreateReplicationSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReplicationSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateReplicationSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateReplicationSubnetGroupInput"} - if s.ReplicationSubnetGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationSubnetGroupDescription")) - } - if s.ReplicationSubnetGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationSubnetGroupIdentifier")) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReplicationSubnetGroupDescription sets the ReplicationSubnetGroupDescription field's value. -func (s *CreateReplicationSubnetGroupInput) SetReplicationSubnetGroupDescription(v string) *CreateReplicationSubnetGroupInput { - s.ReplicationSubnetGroupDescription = &v - return s -} - -// SetReplicationSubnetGroupIdentifier sets the ReplicationSubnetGroupIdentifier field's value. -func (s *CreateReplicationSubnetGroupInput) SetReplicationSubnetGroupIdentifier(v string) *CreateReplicationSubnetGroupInput { - s.ReplicationSubnetGroupIdentifier = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateReplicationSubnetGroupInput) SetSubnetIds(v []*string) *CreateReplicationSubnetGroupInput { - s.SubnetIds = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateReplicationSubnetGroupInput) SetTags(v []*Tag) *CreateReplicationSubnetGroupInput { - s.Tags = v - return s -} - -type CreateReplicationSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // The replication subnet group that was created. - ReplicationSubnetGroup *ReplicationSubnetGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateReplicationSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReplicationSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetReplicationSubnetGroup sets the ReplicationSubnetGroup field's value. -func (s *CreateReplicationSubnetGroupOutput) SetReplicationSubnetGroup(v *ReplicationSubnetGroup) *CreateReplicationSubnetGroupOutput { - s.ReplicationSubnetGroup = v - return s -} - -type CreateReplicationTaskInput struct { - _ struct{} `type:"structure"` - - // Indicates when you want a change data capture (CDC) operation to start. Use - // either CdcStartPosition or CdcStartTime to specify when you want a CDC operation - // to start. Specifying both values results in an error. - // - // The value can be in date, checkpoint, or LSN/SCN format. - // - // Date Example: --cdc-start-position “2018-03-08T12:12:12” - // - // Checkpoint Example: --cdc-start-position "checkpoint:V1#27#mysql-bin-changelog.157832:1975:-1:2002:677883278264080:mysql-bin-changelog.157832:1876#0#0#*#0#93" - // - // LSN Example: --cdc-start-position “mysql-bin-changelog.000024:373” - CdcStartPosition *string `type:"string"` - - // Indicates the start time for a change data capture (CDC) operation. Use either - // CdcStartTime or CdcStartPosition to specify when you want a CDC operation - // to start. Specifying both values results in an error. - // - // Timestamp Example: --cdc-start-time “2018-03-08T12:12:12” - CdcStartTime *time.Time `type:"timestamp"` - - // Indicates when you want a change data capture (CDC) operation to stop. The - // value can be either server time or commit time. - // - // Server time example: --cdc-stop-position “server_time:3018-02-09T12:12:12” - // - // Commit time example: --cdc-stop-position “commit_time: 3018-02-09T12:12:12 - // “ - CdcStopPosition *string `type:"string"` - - // The migration type. - // - // MigrationType is a required field - MigrationType *string `type:"string" required:"true" enum:"MigrationTypeValue"` - - // The Amazon Resource Name (ARN) of the replication instance. - // - // ReplicationInstanceArn is a required field - ReplicationInstanceArn *string `type:"string" required:"true"` - - // The replication task identifier. - // - // Constraints: - // - // * Must contain from 1 to 255 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // ReplicationTaskIdentifier is a required field - ReplicationTaskIdentifier *string `type:"string" required:"true"` - - // Settings for the task, such as target metadata settings. For a complete list - // of task settings, see Task Settings for AWS Database Migration Service Tasks - // (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.html) - // in the AWS Database Migration User Guide. - ReplicationTaskSettings *string `type:"string"` - - // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. - // - // SourceEndpointArn is a required field - SourceEndpointArn *string `type:"string" required:"true"` - - // When using the AWS CLI or boto3, provide the path of the JSON file that contains - // the table mappings. Precede the path with "file://". When working with the - // DMS API, provide the JSON as the parameter value. - // - // For example, --table-mappings file://mappingfile.json - // - // TableMappings is a required field - TableMappings *string `type:"string" required:"true"` - - // Tags to be added to the replication instance. - Tags []*Tag `type:"list"` - - // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. - // - // TargetEndpointArn is a required field - TargetEndpointArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateReplicationTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReplicationTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateReplicationTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateReplicationTaskInput"} - if s.MigrationType == nil { - invalidParams.Add(request.NewErrParamRequired("MigrationType")) - } - if s.ReplicationInstanceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationInstanceArn")) - } - if s.ReplicationTaskIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationTaskIdentifier")) - } - if s.SourceEndpointArn == nil { - invalidParams.Add(request.NewErrParamRequired("SourceEndpointArn")) - } - if s.TableMappings == nil { - invalidParams.Add(request.NewErrParamRequired("TableMappings")) - } - if s.TargetEndpointArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetEndpointArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCdcStartPosition sets the CdcStartPosition field's value. -func (s *CreateReplicationTaskInput) SetCdcStartPosition(v string) *CreateReplicationTaskInput { - s.CdcStartPosition = &v - return s -} - -// SetCdcStartTime sets the CdcStartTime field's value. -func (s *CreateReplicationTaskInput) SetCdcStartTime(v time.Time) *CreateReplicationTaskInput { - s.CdcStartTime = &v - return s -} - -// SetCdcStopPosition sets the CdcStopPosition field's value. -func (s *CreateReplicationTaskInput) SetCdcStopPosition(v string) *CreateReplicationTaskInput { - s.CdcStopPosition = &v - return s -} - -// SetMigrationType sets the MigrationType field's value. -func (s *CreateReplicationTaskInput) SetMigrationType(v string) *CreateReplicationTaskInput { - s.MigrationType = &v - return s -} - -// SetReplicationInstanceArn sets the ReplicationInstanceArn field's value. -func (s *CreateReplicationTaskInput) SetReplicationInstanceArn(v string) *CreateReplicationTaskInput { - s.ReplicationInstanceArn = &v - return s -} - -// SetReplicationTaskIdentifier sets the ReplicationTaskIdentifier field's value. -func (s *CreateReplicationTaskInput) SetReplicationTaskIdentifier(v string) *CreateReplicationTaskInput { - s.ReplicationTaskIdentifier = &v - return s -} - -// SetReplicationTaskSettings sets the ReplicationTaskSettings field's value. -func (s *CreateReplicationTaskInput) SetReplicationTaskSettings(v string) *CreateReplicationTaskInput { - s.ReplicationTaskSettings = &v - return s -} - -// SetSourceEndpointArn sets the SourceEndpointArn field's value. -func (s *CreateReplicationTaskInput) SetSourceEndpointArn(v string) *CreateReplicationTaskInput { - s.SourceEndpointArn = &v - return s -} - -// SetTableMappings sets the TableMappings field's value. -func (s *CreateReplicationTaskInput) SetTableMappings(v string) *CreateReplicationTaskInput { - s.TableMappings = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateReplicationTaskInput) SetTags(v []*Tag) *CreateReplicationTaskInput { - s.Tags = v - return s -} - -// SetTargetEndpointArn sets the TargetEndpointArn field's value. -func (s *CreateReplicationTaskInput) SetTargetEndpointArn(v string) *CreateReplicationTaskInput { - s.TargetEndpointArn = &v - return s -} - -type CreateReplicationTaskOutput struct { - _ struct{} `type:"structure"` - - // The replication task that was created. - ReplicationTask *ReplicationTask `type:"structure"` -} - -// String returns the string representation -func (s CreateReplicationTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReplicationTaskOutput) GoString() string { - return s.String() -} - -// SetReplicationTask sets the ReplicationTask field's value. -func (s *CreateReplicationTaskOutput) SetReplicationTask(v *ReplicationTask) *CreateReplicationTaskOutput { - s.ReplicationTask = v - return s -} - -type DeleteCertificateInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the deleted certificate. - // - // CertificateArn is a required field - CertificateArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCertificateInput"} - if s.CertificateArn == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *DeleteCertificateInput) SetCertificateArn(v string) *DeleteCertificateInput { - s.CertificateArn = &v - return s -} - -type DeleteCertificateOutput struct { - _ struct{} `type:"structure"` - - // The Secure Sockets Layer (SSL) certificate. - Certificate *Certificate `type:"structure"` -} - -// String returns the string representation -func (s DeleteCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificate sets the Certificate field's value. -func (s *DeleteCertificateOutput) SetCertificate(v *Certificate) *DeleteCertificateOutput { - s.Certificate = v - return s -} - -type DeleteEndpointInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. - // - // EndpointArn is a required field - EndpointArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointInput"} - if s.EndpointArn == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *DeleteEndpointInput) SetEndpointArn(v string) *DeleteEndpointInput { - s.EndpointArn = &v - return s -} - -type DeleteEndpointOutput struct { - _ struct{} `type:"structure"` - - // The endpoint that was deleted. - Endpoint *Endpoint `type:"structure"` -} - -// String returns the string representation -func (s DeleteEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEndpointOutput) GoString() string { - return s.String() -} - -// SetEndpoint sets the Endpoint field's value. -func (s *DeleteEndpointOutput) SetEndpoint(v *Endpoint) *DeleteEndpointOutput { - s.Endpoint = v - return s -} - -type DeleteEventSubscriptionInput struct { - _ struct{} `type:"structure"` - - // The name of the DMS event notification subscription to be deleted. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEventSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEventSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEventSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEventSubscriptionInput"} - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *DeleteEventSubscriptionInput) SetSubscriptionName(v string) *DeleteEventSubscriptionInput { - s.SubscriptionName = &v - return s -} - -type DeleteEventSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // The event subscription that was deleted. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s DeleteEventSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEventSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *DeleteEventSubscriptionOutput) SetEventSubscription(v *EventSubscription) *DeleteEventSubscriptionOutput { - s.EventSubscription = v - return s -} - -type DeleteReplicationInstanceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the replication instance to be deleted. - // - // ReplicationInstanceArn is a required field - ReplicationInstanceArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteReplicationInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReplicationInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteReplicationInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteReplicationInstanceInput"} - if s.ReplicationInstanceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationInstanceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReplicationInstanceArn sets the ReplicationInstanceArn field's value. -func (s *DeleteReplicationInstanceInput) SetReplicationInstanceArn(v string) *DeleteReplicationInstanceInput { - s.ReplicationInstanceArn = &v - return s -} - -type DeleteReplicationInstanceOutput struct { - _ struct{} `type:"structure"` - - // The replication instance that was deleted. - ReplicationInstance *ReplicationInstance `type:"structure"` -} - -// String returns the string representation -func (s DeleteReplicationInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReplicationInstanceOutput) GoString() string { - return s.String() -} - -// SetReplicationInstance sets the ReplicationInstance field's value. -func (s *DeleteReplicationInstanceOutput) SetReplicationInstance(v *ReplicationInstance) *DeleteReplicationInstanceOutput { - s.ReplicationInstance = v - return s -} - -type DeleteReplicationSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The subnet group name of the replication instance. - // - // ReplicationSubnetGroupIdentifier is a required field - ReplicationSubnetGroupIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteReplicationSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReplicationSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteReplicationSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteReplicationSubnetGroupInput"} - if s.ReplicationSubnetGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationSubnetGroupIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReplicationSubnetGroupIdentifier sets the ReplicationSubnetGroupIdentifier field's value. -func (s *DeleteReplicationSubnetGroupInput) SetReplicationSubnetGroupIdentifier(v string) *DeleteReplicationSubnetGroupInput { - s.ReplicationSubnetGroupIdentifier = &v - return s -} - -type DeleteReplicationSubnetGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteReplicationSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReplicationSubnetGroupOutput) GoString() string { - return s.String() -} - -type DeleteReplicationTaskInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the replication task to be deleted. - // - // ReplicationTaskArn is a required field - ReplicationTaskArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteReplicationTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReplicationTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteReplicationTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteReplicationTaskInput"} - if s.ReplicationTaskArn == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationTaskArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReplicationTaskArn sets the ReplicationTaskArn field's value. -func (s *DeleteReplicationTaskInput) SetReplicationTaskArn(v string) *DeleteReplicationTaskInput { - s.ReplicationTaskArn = &v - return s -} - -type DeleteReplicationTaskOutput struct { - _ struct{} `type:"structure"` - - // The deleted replication task. - ReplicationTask *ReplicationTask `type:"structure"` -} - -// String returns the string representation -func (s DeleteReplicationTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReplicationTaskOutput) GoString() string { - return s.String() -} - -// SetReplicationTask sets the ReplicationTask field's value. -func (s *DeleteReplicationTaskOutput) SetReplicationTask(v *ReplicationTask) *DeleteReplicationTaskOutput { - s.ReplicationTask = v - return s -} - -type DescribeAccountAttributesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeAccountAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountAttributesInput) GoString() string { - return s.String() -} - -type DescribeAccountAttributesOutput struct { - _ struct{} `type:"structure"` - - // Account quota information. - AccountQuotas []*AccountQuota `type:"list"` -} - -// String returns the string representation -func (s DescribeAccountAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountAttributesOutput) GoString() string { - return s.String() -} - -// SetAccountQuotas sets the AccountQuotas field's value. -func (s *DescribeAccountAttributesOutput) SetAccountQuotas(v []*AccountQuota) *DescribeAccountAttributesOutput { - s.AccountQuotas = v - return s -} - -type DescribeCertificatesInput struct { - _ struct{} `type:"structure"` - - // Filters applied to the certificate described in the form of key-value pairs. - Filters []*Filter `type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 10 - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCertificatesInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeCertificatesInput) SetFilters(v []*Filter) *DescribeCertificatesInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCertificatesInput) SetMarker(v string) *DescribeCertificatesInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeCertificatesInput) SetMaxRecords(v int64) *DescribeCertificatesInput { - s.MaxRecords = &v - return s -} - -type DescribeCertificatesOutput struct { - _ struct{} `type:"structure"` - - // The Secure Sockets Layer (SSL) certificates associated with the replication - // instance. - Certificates []*Certificate `type:"list"` - - // The pagination token. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCertificatesOutput) GoString() string { - return s.String() -} - -// SetCertificates sets the Certificates field's value. -func (s *DescribeCertificatesOutput) SetCertificates(v []*Certificate) *DescribeCertificatesOutput { - s.Certificates = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCertificatesOutput) SetMarker(v string) *DescribeCertificatesOutput { - s.Marker = &v - return s -} - -type DescribeConnectionsInput struct { - _ struct{} `type:"structure"` - - // The filters applied to the connection. - // - // Valid filter names: endpoint-arn | replication-instance-arn - Filters []*Filter `type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeConnectionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConnectionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeConnectionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeConnectionsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeConnectionsInput) SetFilters(v []*Filter) *DescribeConnectionsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeConnectionsInput) SetMarker(v string) *DescribeConnectionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeConnectionsInput) SetMaxRecords(v int64) *DescribeConnectionsInput { - s.MaxRecords = &v - return s -} - -type DescribeConnectionsOutput struct { - _ struct{} `type:"structure"` - - // A description of the connections. - Connections []*Connection `type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeConnectionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConnectionsOutput) GoString() string { - return s.String() -} - -// SetConnections sets the Connections field's value. -func (s *DescribeConnectionsOutput) SetConnections(v []*Connection) *DescribeConnectionsOutput { - s.Connections = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeConnectionsOutput) SetMarker(v string) *DescribeConnectionsOutput { - s.Marker = &v - return s -} - -type DescribeEndpointTypesInput struct { - _ struct{} `type:"structure"` - - // Filters applied to the describe action. - // - // Valid filter names: engine-name | endpoint-type - Filters []*Filter `type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeEndpointTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEndpointTypesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEndpointTypesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEndpointTypesInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEndpointTypesInput) SetFilters(v []*Filter) *DescribeEndpointTypesInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEndpointTypesInput) SetMarker(v string) *DescribeEndpointTypesInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEndpointTypesInput) SetMaxRecords(v int64) *DescribeEndpointTypesInput { - s.MaxRecords = &v - return s -} - -type DescribeEndpointTypesOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The type of endpoints that are supported. - SupportedEndpointTypes []*SupportedEndpointType `type:"list"` -} - -// String returns the string representation -func (s DescribeEndpointTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEndpointTypesOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEndpointTypesOutput) SetMarker(v string) *DescribeEndpointTypesOutput { - s.Marker = &v - return s -} - -// SetSupportedEndpointTypes sets the SupportedEndpointTypes field's value. -func (s *DescribeEndpointTypesOutput) SetSupportedEndpointTypes(v []*SupportedEndpointType) *DescribeEndpointTypesOutput { - s.SupportedEndpointTypes = v - return s -} - -type DescribeEndpointsInput struct { - _ struct{} `type:"structure"` - - // Filters applied to the describe action. - // - // Valid filter names: endpoint-arn | endpoint-type | endpoint-id | engine-name - Filters []*Filter `type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeEndpointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEndpointsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEndpointsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEndpointsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEndpointsInput) SetFilters(v []*Filter) *DescribeEndpointsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEndpointsInput) SetMarker(v string) *DescribeEndpointsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEndpointsInput) SetMaxRecords(v int64) *DescribeEndpointsInput { - s.MaxRecords = &v - return s -} - -type DescribeEndpointsOutput struct { - _ struct{} `type:"structure"` - - // Endpoint description. - Endpoints []*Endpoint `type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEndpointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEndpointsOutput) GoString() string { - return s.String() -} - -// SetEndpoints sets the Endpoints field's value. -func (s *DescribeEndpointsOutput) SetEndpoints(v []*Endpoint) *DescribeEndpointsOutput { - s.Endpoints = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEndpointsOutput) SetMarker(v string) *DescribeEndpointsOutput { - s.Marker = &v - return s -} - -type DescribeEventCategoriesInput struct { - _ struct{} `type:"structure"` - - // Filters applied to the action. - Filters []*Filter `type:"list"` - - // The type of AWS DMS resource that generates events. - // - // Valid values: replication-instance | migration-task - SourceType *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventCategoriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventCategoriesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventCategoriesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventCategoriesInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEventCategoriesInput) SetFilters(v []*Filter) *DescribeEventCategoriesInput { - s.Filters = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *DescribeEventCategoriesInput) SetSourceType(v string) *DescribeEventCategoriesInput { - s.SourceType = &v - return s -} - -type DescribeEventCategoriesOutput struct { - _ struct{} `type:"structure"` - - // A list of event categories. - EventCategoryGroupList []*EventCategoryGroup `type:"list"` -} - -// String returns the string representation -func (s DescribeEventCategoriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventCategoriesOutput) GoString() string { - return s.String() -} - -// SetEventCategoryGroupList sets the EventCategoryGroupList field's value. -func (s *DescribeEventCategoriesOutput) SetEventCategoryGroupList(v []*EventCategoryGroup) *DescribeEventCategoriesOutput { - s.EventCategoryGroupList = v - return s -} - -type DescribeEventSubscriptionsInput struct { - _ struct{} `type:"structure"` - - // Filters applied to the action. - Filters []*Filter `type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The name of the AWS DMS event subscription to be described. - SubscriptionName *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventSubscriptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventSubscriptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventSubscriptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventSubscriptionsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEventSubscriptionsInput) SetFilters(v []*Filter) *DescribeEventSubscriptionsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventSubscriptionsInput) SetMarker(v string) *DescribeEventSubscriptionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEventSubscriptionsInput) SetMaxRecords(v int64) *DescribeEventSubscriptionsInput { - s.MaxRecords = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *DescribeEventSubscriptionsInput) SetSubscriptionName(v string) *DescribeEventSubscriptionsInput { - s.SubscriptionName = &v - return s -} - -type DescribeEventSubscriptionsOutput struct { - _ struct{} `type:"structure"` - - // A list of event subscriptions. - EventSubscriptionsList []*EventSubscription `type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventSubscriptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventSubscriptionsOutput) GoString() string { - return s.String() -} - -// SetEventSubscriptionsList sets the EventSubscriptionsList field's value. -func (s *DescribeEventSubscriptionsOutput) SetEventSubscriptionsList(v []*EventSubscription) *DescribeEventSubscriptionsOutput { - s.EventSubscriptionsList = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventSubscriptionsOutput) SetMarker(v string) *DescribeEventSubscriptionsOutput { - s.Marker = &v - return s -} - -type DescribeEventsInput struct { - _ struct{} `type:"structure"` - - // The duration of the events to be listed. - Duration *int64 `type:"integer"` - - // The end time for the events to be listed. - EndTime *time.Time `type:"timestamp"` - - // A list of event categories for a source type that you want to subscribe to. - EventCategories []*string `type:"list"` - - // Filters applied to the action. - Filters []*Filter `type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The identifier of the event source. An identifier must begin with a letter - // and must contain only ASCII letters, digits, and hyphens. It cannot end with - // a hyphen or contain two consecutive hyphens. - SourceIdentifier *string `type:"string"` - - // The type of AWS DMS resource that generates events. - // - // Valid values: replication-instance | migration-task - SourceType *string `type:"string" enum:"SourceType"` - - // The start time for the events to be listed. - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s DescribeEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDuration sets the Duration field's value. -func (s *DescribeEventsInput) SetDuration(v int64) *DescribeEventsInput { - s.Duration = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *DescribeEventsInput) SetEndTime(v time.Time) *DescribeEventsInput { - s.EndTime = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *DescribeEventsInput) SetEventCategories(v []*string) *DescribeEventsInput { - s.EventCategories = v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEventsInput) SetFilters(v []*Filter) *DescribeEventsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventsInput) SetMarker(v string) *DescribeEventsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEventsInput) SetMaxRecords(v int64) *DescribeEventsInput { - s.MaxRecords = &v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *DescribeEventsInput) SetSourceIdentifier(v string) *DescribeEventsInput { - s.SourceIdentifier = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *DescribeEventsInput) SetSourceType(v string) *DescribeEventsInput { - s.SourceType = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeEventsInput) SetStartTime(v time.Time) *DescribeEventsInput { - s.StartTime = &v - return s -} - -type DescribeEventsOutput struct { - _ struct{} `type:"structure"` - - // The events described. - Events []*Event `type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { - s.Events = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventsOutput) SetMarker(v string) *DescribeEventsOutput { - s.Marker = &v - return s -} - -type DescribeOrderableReplicationInstancesInput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeOrderableReplicationInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOrderableReplicationInstancesInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeOrderableReplicationInstancesInput) SetMarker(v string) *DescribeOrderableReplicationInstancesInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeOrderableReplicationInstancesInput) SetMaxRecords(v int64) *DescribeOrderableReplicationInstancesInput { - s.MaxRecords = &v - return s -} - -type DescribeOrderableReplicationInstancesOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The order-able replication instances available. - OrderableReplicationInstances []*OrderableReplicationInstance `type:"list"` -} - -// String returns the string representation -func (s DescribeOrderableReplicationInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOrderableReplicationInstancesOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeOrderableReplicationInstancesOutput) SetMarker(v string) *DescribeOrderableReplicationInstancesOutput { - s.Marker = &v - return s -} - -// SetOrderableReplicationInstances sets the OrderableReplicationInstances field's value. -func (s *DescribeOrderableReplicationInstancesOutput) SetOrderableReplicationInstances(v []*OrderableReplicationInstance) *DescribeOrderableReplicationInstancesOutput { - s.OrderableReplicationInstances = v - return s -} - -type DescribeRefreshSchemasStatusInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. - // - // EndpointArn is a required field - EndpointArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeRefreshSchemasStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRefreshSchemasStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRefreshSchemasStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRefreshSchemasStatusInput"} - if s.EndpointArn == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *DescribeRefreshSchemasStatusInput) SetEndpointArn(v string) *DescribeRefreshSchemasStatusInput { - s.EndpointArn = &v - return s -} - -type DescribeRefreshSchemasStatusOutput struct { - _ struct{} `type:"structure"` - - // The status of the schema. - RefreshSchemasStatus *RefreshSchemasStatus `type:"structure"` -} - -// String returns the string representation -func (s DescribeRefreshSchemasStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRefreshSchemasStatusOutput) GoString() string { - return s.String() -} - -// SetRefreshSchemasStatus sets the RefreshSchemasStatus field's value. -func (s *DescribeRefreshSchemasStatusOutput) SetRefreshSchemasStatus(v *RefreshSchemasStatus) *DescribeRefreshSchemasStatusOutput { - s.RefreshSchemasStatus = v - return s -} - -type DescribeReplicationInstanceTaskLogsInput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The Amazon Resource Name (ARN) of the replication instance. - // - // ReplicationInstanceArn is a required field - ReplicationInstanceArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeReplicationInstanceTaskLogsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReplicationInstanceTaskLogsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeReplicationInstanceTaskLogsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeReplicationInstanceTaskLogsInput"} - if s.ReplicationInstanceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationInstanceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReplicationInstanceTaskLogsInput) SetMarker(v string) *DescribeReplicationInstanceTaskLogsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReplicationInstanceTaskLogsInput) SetMaxRecords(v int64) *DescribeReplicationInstanceTaskLogsInput { - s.MaxRecords = &v - return s -} - -// SetReplicationInstanceArn sets the ReplicationInstanceArn field's value. -func (s *DescribeReplicationInstanceTaskLogsInput) SetReplicationInstanceArn(v string) *DescribeReplicationInstanceTaskLogsInput { - s.ReplicationInstanceArn = &v - return s -} - -type DescribeReplicationInstanceTaskLogsOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The Amazon Resource Name (ARN) of the replication instance. - ReplicationInstanceArn *string `type:"string"` - - // An array of replication task log metadata. Each member of the array contains - // the replication task name, ARN, and task log size (in bytes). - ReplicationInstanceTaskLogs []*ReplicationInstanceTaskLog `type:"list"` -} - -// String returns the string representation -func (s DescribeReplicationInstanceTaskLogsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReplicationInstanceTaskLogsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReplicationInstanceTaskLogsOutput) SetMarker(v string) *DescribeReplicationInstanceTaskLogsOutput { - s.Marker = &v - return s -} - -// SetReplicationInstanceArn sets the ReplicationInstanceArn field's value. -func (s *DescribeReplicationInstanceTaskLogsOutput) SetReplicationInstanceArn(v string) *DescribeReplicationInstanceTaskLogsOutput { - s.ReplicationInstanceArn = &v - return s -} - -// SetReplicationInstanceTaskLogs sets the ReplicationInstanceTaskLogs field's value. -func (s *DescribeReplicationInstanceTaskLogsOutput) SetReplicationInstanceTaskLogs(v []*ReplicationInstanceTaskLog) *DescribeReplicationInstanceTaskLogsOutput { - s.ReplicationInstanceTaskLogs = v - return s -} - -type DescribeReplicationInstancesInput struct { - _ struct{} `type:"structure"` - - // Filters applied to the describe action. - // - // Valid filter names: replication-instance-arn | replication-instance-id | - // replication-instance-class | engine-version - Filters []*Filter `type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeReplicationInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReplicationInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeReplicationInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeReplicationInstancesInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeReplicationInstancesInput) SetFilters(v []*Filter) *DescribeReplicationInstancesInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReplicationInstancesInput) SetMarker(v string) *DescribeReplicationInstancesInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReplicationInstancesInput) SetMaxRecords(v int64) *DescribeReplicationInstancesInput { - s.MaxRecords = &v - return s -} - -type DescribeReplicationInstancesOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The replication instances described. - ReplicationInstances []*ReplicationInstance `type:"list"` -} - -// String returns the string representation -func (s DescribeReplicationInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReplicationInstancesOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReplicationInstancesOutput) SetMarker(v string) *DescribeReplicationInstancesOutput { - s.Marker = &v - return s -} - -// SetReplicationInstances sets the ReplicationInstances field's value. -func (s *DescribeReplicationInstancesOutput) SetReplicationInstances(v []*ReplicationInstance) *DescribeReplicationInstancesOutput { - s.ReplicationInstances = v - return s -} - -type DescribeReplicationSubnetGroupsInput struct { - _ struct{} `type:"structure"` - - // Filters applied to the describe action. - Filters []*Filter `type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeReplicationSubnetGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReplicationSubnetGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeReplicationSubnetGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeReplicationSubnetGroupsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeReplicationSubnetGroupsInput) SetFilters(v []*Filter) *DescribeReplicationSubnetGroupsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReplicationSubnetGroupsInput) SetMarker(v string) *DescribeReplicationSubnetGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReplicationSubnetGroupsInput) SetMaxRecords(v int64) *DescribeReplicationSubnetGroupsInput { - s.MaxRecords = &v - return s -} - -type DescribeReplicationSubnetGroupsOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // A description of the replication subnet groups. - ReplicationSubnetGroups []*ReplicationSubnetGroup `type:"list"` -} - -// String returns the string representation -func (s DescribeReplicationSubnetGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReplicationSubnetGroupsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReplicationSubnetGroupsOutput) SetMarker(v string) *DescribeReplicationSubnetGroupsOutput { - s.Marker = &v - return s -} - -// SetReplicationSubnetGroups sets the ReplicationSubnetGroups field's value. -func (s *DescribeReplicationSubnetGroupsOutput) SetReplicationSubnetGroups(v []*ReplicationSubnetGroup) *DescribeReplicationSubnetGroupsOutput { - s.ReplicationSubnetGroups = v - return s -} - -type DescribeReplicationTaskAssessmentResultsInput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // - The Amazon Resource Name (ARN) string that uniquely identifies the task. - // When this input parameter is specified the API will return only one result - // and ignore the values of the max-records and marker parameters. - ReplicationTaskArn *string `type:"string"` -} - -// String returns the string representation -func (s DescribeReplicationTaskAssessmentResultsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReplicationTaskAssessmentResultsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReplicationTaskAssessmentResultsInput) SetMarker(v string) *DescribeReplicationTaskAssessmentResultsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReplicationTaskAssessmentResultsInput) SetMaxRecords(v int64) *DescribeReplicationTaskAssessmentResultsInput { - s.MaxRecords = &v - return s -} - -// SetReplicationTaskArn sets the ReplicationTaskArn field's value. -func (s *DescribeReplicationTaskAssessmentResultsInput) SetReplicationTaskArn(v string) *DescribeReplicationTaskAssessmentResultsInput { - s.ReplicationTaskArn = &v - return s -} - -type DescribeReplicationTaskAssessmentResultsOutput struct { - _ struct{} `type:"structure"` - - // - The Amazon S3 bucket where the task assessment report is located. - BucketName *string `type:"string"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The task assessment report. - ReplicationTaskAssessmentResults []*ReplicationTaskAssessmentResult `type:"list"` -} - -// String returns the string representation -func (s DescribeReplicationTaskAssessmentResultsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReplicationTaskAssessmentResultsOutput) GoString() string { - return s.String() -} - -// SetBucketName sets the BucketName field's value. -func (s *DescribeReplicationTaskAssessmentResultsOutput) SetBucketName(v string) *DescribeReplicationTaskAssessmentResultsOutput { - s.BucketName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReplicationTaskAssessmentResultsOutput) SetMarker(v string) *DescribeReplicationTaskAssessmentResultsOutput { - s.Marker = &v - return s -} - -// SetReplicationTaskAssessmentResults sets the ReplicationTaskAssessmentResults field's value. -func (s *DescribeReplicationTaskAssessmentResultsOutput) SetReplicationTaskAssessmentResults(v []*ReplicationTaskAssessmentResult) *DescribeReplicationTaskAssessmentResultsOutput { - s.ReplicationTaskAssessmentResults = v - return s -} - -type DescribeReplicationTasksInput struct { - _ struct{} `type:"structure"` - - // Filters applied to the describe action. - // - // Valid filter names: replication-task-arn | replication-task-id | migration-type - // | endpoint-arn | replication-instance-arn - Filters []*Filter `type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeReplicationTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReplicationTasksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeReplicationTasksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeReplicationTasksInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeReplicationTasksInput) SetFilters(v []*Filter) *DescribeReplicationTasksInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReplicationTasksInput) SetMarker(v string) *DescribeReplicationTasksInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReplicationTasksInput) SetMaxRecords(v int64) *DescribeReplicationTasksInput { - s.MaxRecords = &v - return s -} - -type DescribeReplicationTasksOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // A description of the replication tasks. - ReplicationTasks []*ReplicationTask `type:"list"` -} - -// String returns the string representation -func (s DescribeReplicationTasksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReplicationTasksOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReplicationTasksOutput) SetMarker(v string) *DescribeReplicationTasksOutput { - s.Marker = &v - return s -} - -// SetReplicationTasks sets the ReplicationTasks field's value. -func (s *DescribeReplicationTasksOutput) SetReplicationTasks(v []*ReplicationTask) *DescribeReplicationTasksOutput { - s.ReplicationTasks = v - return s -} - -type DescribeSchemasInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. - // - // EndpointArn is a required field - EndpointArn *string `type:"string" required:"true"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeSchemasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSchemasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSchemasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSchemasInput"} - if s.EndpointArn == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *DescribeSchemasInput) SetEndpointArn(v string) *DescribeSchemasInput { - s.EndpointArn = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeSchemasInput) SetMarker(v string) *DescribeSchemasInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeSchemasInput) SetMaxRecords(v int64) *DescribeSchemasInput { - s.MaxRecords = &v - return s -} - -type DescribeSchemasOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The described schema. - Schemas []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeSchemasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSchemasOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeSchemasOutput) SetMarker(v string) *DescribeSchemasOutput { - s.Marker = &v - return s -} - -// SetSchemas sets the Schemas field's value. -func (s *DescribeSchemasOutput) SetSchemas(v []*string) *DescribeSchemasOutput { - s.Schemas = v - return s -} - -type DescribeTableStatisticsInput struct { - _ struct{} `type:"structure"` - - // Filters applied to the describe table statistics action. - // - // Valid filter names: schema-name | table-name | table-state - // - // A combination of filters creates an AND condition where each record matches - // all specified filters. - Filters []*Filter `type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 500. - MaxRecords *int64 `type:"integer"` - - // The Amazon Resource Name (ARN) of the replication task. - // - // ReplicationTaskArn is a required field - ReplicationTaskArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeTableStatisticsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTableStatisticsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTableStatisticsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTableStatisticsInput"} - if s.ReplicationTaskArn == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationTaskArn")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeTableStatisticsInput) SetFilters(v []*Filter) *DescribeTableStatisticsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTableStatisticsInput) SetMarker(v string) *DescribeTableStatisticsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeTableStatisticsInput) SetMaxRecords(v int64) *DescribeTableStatisticsInput { - s.MaxRecords = &v - return s -} - -// SetReplicationTaskArn sets the ReplicationTaskArn field's value. -func (s *DescribeTableStatisticsInput) SetReplicationTaskArn(v string) *DescribeTableStatisticsInput { - s.ReplicationTaskArn = &v - return s -} - -type DescribeTableStatisticsOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The Amazon Resource Name (ARN) of the replication task. - ReplicationTaskArn *string `type:"string"` - - // The table statistics. - TableStatistics []*TableStatistics `type:"list"` -} - -// String returns the string representation -func (s DescribeTableStatisticsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTableStatisticsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTableStatisticsOutput) SetMarker(v string) *DescribeTableStatisticsOutput { - s.Marker = &v - return s -} - -// SetReplicationTaskArn sets the ReplicationTaskArn field's value. -func (s *DescribeTableStatisticsOutput) SetReplicationTaskArn(v string) *DescribeTableStatisticsOutput { - s.ReplicationTaskArn = &v - return s -} - -// SetTableStatistics sets the TableStatistics field's value. -func (s *DescribeTableStatisticsOutput) SetTableStatistics(v []*TableStatistics) *DescribeTableStatisticsOutput { - s.TableStatistics = v - return s -} - -// The settings in JSON format for the DMS Transfer type source endpoint. -type DmsTransferSettings struct { - _ struct{} `type:"structure"` - - // The name of the S3 bucket to use. - BucketName *string `type:"string"` - - // The IAM role that has permission to access the Amazon S3 bucket. - ServiceAccessRoleArn *string `type:"string"` -} - -// String returns the string representation -func (s DmsTransferSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DmsTransferSettings) GoString() string { - return s.String() -} - -// SetBucketName sets the BucketName field's value. -func (s *DmsTransferSettings) SetBucketName(v string) *DmsTransferSettings { - s.BucketName = &v - return s -} - -// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. -func (s *DmsTransferSettings) SetServiceAccessRoleArn(v string) *DmsTransferSettings { - s.ServiceAccessRoleArn = &v - return s -} - -type DynamoDbSettings struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) used by the service access IAM role. - // - // ServiceAccessRoleArn is a required field - ServiceAccessRoleArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DynamoDbSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DynamoDbSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DynamoDbSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DynamoDbSettings"} - if s.ServiceAccessRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceAccessRoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. -func (s *DynamoDbSettings) SetServiceAccessRoleArn(v string) *DynamoDbSettings { - s.ServiceAccessRoleArn = &v - return s -} - -type ElasticsearchSettings struct { - _ struct{} `type:"structure"` - - // The endpoint for the ElasticSearch cluster. - // - // EndpointUri is a required field - EndpointUri *string `type:"string" required:"true"` - - // The maximum number of seconds that DMS retries failed API requests to the - // Elasticsearch cluster. - ErrorRetryDuration *int64 `type:"integer"` - - // The maximum percentage of records that can fail to be written before a full - // load operation stops. - FullLoadErrorPercentage *int64 `type:"integer"` - - // The Amazon Resource Name (ARN) used by service to access the IAM role. - // - // ServiceAccessRoleArn is a required field - ServiceAccessRoleArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ElasticsearchSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticsearchSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ElasticsearchSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ElasticsearchSettings"} - if s.EndpointUri == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointUri")) - } - if s.ServiceAccessRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceAccessRoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointUri sets the EndpointUri field's value. -func (s *ElasticsearchSettings) SetEndpointUri(v string) *ElasticsearchSettings { - s.EndpointUri = &v - return s -} - -// SetErrorRetryDuration sets the ErrorRetryDuration field's value. -func (s *ElasticsearchSettings) SetErrorRetryDuration(v int64) *ElasticsearchSettings { - s.ErrorRetryDuration = &v - return s -} - -// SetFullLoadErrorPercentage sets the FullLoadErrorPercentage field's value. -func (s *ElasticsearchSettings) SetFullLoadErrorPercentage(v int64) *ElasticsearchSettings { - s.FullLoadErrorPercentage = &v - return s -} - -// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. -func (s *ElasticsearchSettings) SetServiceAccessRoleArn(v string) *ElasticsearchSettings { - s.ServiceAccessRoleArn = &v - return s -} - -type Endpoint struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) used for SSL connection to the endpoint. - CertificateArn *string `type:"string"` - - // The name of the database at the endpoint. - DatabaseName *string `type:"string"` - - // The settings in JSON format for the DMS transfer type of source endpoint. - // - // Possible attributes include the following: - // - // * serviceAccessRoleArn - The IAM role that has permission to access the - // Amazon S3 bucket. - // - // * bucketName - The name of the S3 bucket to use. - // - // * compressionType - An optional parameter to use GZIP to compress the - // target files. To use GZIP, set this value to NONE (the default). To keep - // the files uncompressed, don't use this value. - // - // Shorthand syntax for these attributes is as follows: ServiceAccessRoleArn=string,BucketName=string,CompressionType=string - // - // JSON syntax for these attributes is as follows: { "ServiceAccessRoleArn": - // "string", "BucketName": "string", "CompressionType": "none"|"gzip" } - DmsTransferSettings *DmsTransferSettings `type:"structure"` - - // The settings for the target DynamoDB database. For more information, see - // the DynamoDBSettings structure. - DynamoDbSettings *DynamoDbSettings `type:"structure"` - - // The settings for the Elasticsearch source endpoint. For more information, - // see the ElasticsearchSettings structure. - ElasticsearchSettings *ElasticsearchSettings `type:"structure"` - - // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. - EndpointArn *string `type:"string"` - - // The database endpoint identifier. Identifiers must begin with a letter; must - // contain only ASCII letters, digits, and hyphens; and must not end with a - // hyphen or contain two consecutive hyphens. - EndpointIdentifier *string `type:"string"` - - // The type of endpoint. - EndpointType *string `type:"string" enum:"ReplicationEndpointTypeValue"` - - // The expanded name for the engine name. For example, if the EngineName parameter - // is "aurora," this value would be "Amazon Aurora MySQL." - EngineDisplayName *string `type:"string"` - - // The database engine name. Valid values, depending on the EndPointType, include - // mysql, oracle, postgres, mariadb, aurora, aurora-postgresql, redshift, s3, - // db2, azuredb, sybase, sybase, dynamodb, mongodb, and sqlserver. - EngineName *string `type:"string"` - - // Value returned by a call to CreateEndpoint that can be used for cross-account - // validation. Use it on a subsequent call to CreateEndpoint to create the endpoint - // with a cross-account. - ExternalId *string `type:"string"` - - // The external table definition. - ExternalTableDefinition *string `type:"string"` - - // Additional connection attributes used to connect to the endpoint. - ExtraConnectionAttributes *string `type:"string"` - - // The settings for the Amazon Kinesis source endpoint. For more information, - // see the KinesisSettings structure. - KinesisSettings *KinesisSettings `type:"structure"` - - // The AWS KMS key identifier that is used to encrypt the content on the replication - // instance. If you don't specify a value for the KmsKeyId parameter, then AWS - // DMS uses your default encryption key. AWS KMS creates the default encryption - // key for your AWS account. Your AWS account has a different default encryption - // key for each AWS Region. - KmsKeyId *string `type:"string"` - - // The settings for the MongoDB source endpoint. For more information, see the - // MongoDbSettings structure. - MongoDbSettings *MongoDbSettings `type:"structure"` - - // The port value used to access the endpoint. - Port *int64 `type:"integer"` - - // The settings for the S3 target endpoint. For more information, see the S3Settings - // structure. - S3Settings *S3Settings `type:"structure"` - - // The name of the server at the endpoint. - ServerName *string `type:"string"` - - // The Amazon Resource Name (ARN) used by the service access IAM role. - ServiceAccessRoleArn *string `type:"string"` - - // The SSL mode used to connect to the endpoint. - // - // SSL mode can be one of four values: none, require, verify-ca, verify-full. - // - // The default value is none. - SslMode *string `type:"string" enum:"DmsSslModeValue"` - - // The status of the endpoint. - Status *string `type:"string"` - - // The user name used to connect to the endpoint. - Username *string `type:"string"` -} - -// String returns the string representation -func (s Endpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Endpoint) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *Endpoint) SetCertificateArn(v string) *Endpoint { - s.CertificateArn = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *Endpoint) SetDatabaseName(v string) *Endpoint { - s.DatabaseName = &v - return s -} - -// SetDmsTransferSettings sets the DmsTransferSettings field's value. -func (s *Endpoint) SetDmsTransferSettings(v *DmsTransferSettings) *Endpoint { - s.DmsTransferSettings = v - return s -} - -// SetDynamoDbSettings sets the DynamoDbSettings field's value. -func (s *Endpoint) SetDynamoDbSettings(v *DynamoDbSettings) *Endpoint { - s.DynamoDbSettings = v - return s -} - -// SetElasticsearchSettings sets the ElasticsearchSettings field's value. -func (s *Endpoint) SetElasticsearchSettings(v *ElasticsearchSettings) *Endpoint { - s.ElasticsearchSettings = v - return s -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *Endpoint) SetEndpointArn(v string) *Endpoint { - s.EndpointArn = &v - return s -} - -// SetEndpointIdentifier sets the EndpointIdentifier field's value. -func (s *Endpoint) SetEndpointIdentifier(v string) *Endpoint { - s.EndpointIdentifier = &v - return s -} - -// SetEndpointType sets the EndpointType field's value. -func (s *Endpoint) SetEndpointType(v string) *Endpoint { - s.EndpointType = &v - return s -} - -// SetEngineDisplayName sets the EngineDisplayName field's value. -func (s *Endpoint) SetEngineDisplayName(v string) *Endpoint { - s.EngineDisplayName = &v - return s -} - -// SetEngineName sets the EngineName field's value. -func (s *Endpoint) SetEngineName(v string) *Endpoint { - s.EngineName = &v - return s -} - -// SetExternalId sets the ExternalId field's value. -func (s *Endpoint) SetExternalId(v string) *Endpoint { - s.ExternalId = &v - return s -} - -// SetExternalTableDefinition sets the ExternalTableDefinition field's value. -func (s *Endpoint) SetExternalTableDefinition(v string) *Endpoint { - s.ExternalTableDefinition = &v - return s -} - -// SetExtraConnectionAttributes sets the ExtraConnectionAttributes field's value. -func (s *Endpoint) SetExtraConnectionAttributes(v string) *Endpoint { - s.ExtraConnectionAttributes = &v - return s -} - -// SetKinesisSettings sets the KinesisSettings field's value. -func (s *Endpoint) SetKinesisSettings(v *KinesisSettings) *Endpoint { - s.KinesisSettings = v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *Endpoint) SetKmsKeyId(v string) *Endpoint { - s.KmsKeyId = &v - return s -} - -// SetMongoDbSettings sets the MongoDbSettings field's value. -func (s *Endpoint) SetMongoDbSettings(v *MongoDbSettings) *Endpoint { - s.MongoDbSettings = v - return s -} - -// SetPort sets the Port field's value. -func (s *Endpoint) SetPort(v int64) *Endpoint { - s.Port = &v - return s -} - -// SetS3Settings sets the S3Settings field's value. -func (s *Endpoint) SetS3Settings(v *S3Settings) *Endpoint { - s.S3Settings = v - return s -} - -// SetServerName sets the ServerName field's value. -func (s *Endpoint) SetServerName(v string) *Endpoint { - s.ServerName = &v - return s -} - -// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. -func (s *Endpoint) SetServiceAccessRoleArn(v string) *Endpoint { - s.ServiceAccessRoleArn = &v - return s -} - -// SetSslMode sets the SslMode field's value. -func (s *Endpoint) SetSslMode(v string) *Endpoint { - s.SslMode = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Endpoint) SetStatus(v string) *Endpoint { - s.Status = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *Endpoint) SetUsername(v string) *Endpoint { - s.Username = &v - return s -} - -type Event struct { - _ struct{} `type:"structure"` - - // The date of the event. - Date *time.Time `type:"timestamp"` - - // The event categories available for the specified source type. - EventCategories []*string `type:"list"` - - // The event message. - Message *string `type:"string"` - - // The identifier of the event source. An identifier must begin with a letter - // and must contain only ASCII letters, digits, and hyphens; it cannot end with - // a hyphen or contain two consecutive hyphens. - // - // Constraints:replication instance, endpoint, migration task - SourceIdentifier *string `type:"string"` - - // The type of AWS DMS resource that generates events. - // - // Valid values: replication-instance | endpoint | migration-task - SourceType *string `type:"string" enum:"SourceType"` -} - -// String returns the string representation -func (s Event) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Event) GoString() string { - return s.String() -} - -// SetDate sets the Date field's value. -func (s *Event) SetDate(v time.Time) *Event { - s.Date = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *Event) SetEventCategories(v []*string) *Event { - s.EventCategories = v - return s -} - -// SetMessage sets the Message field's value. -func (s *Event) SetMessage(v string) *Event { - s.Message = &v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *Event) SetSourceIdentifier(v string) *Event { - s.SourceIdentifier = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *Event) SetSourceType(v string) *Event { - s.SourceType = &v - return s -} - -type EventCategoryGroup struct { - _ struct{} `type:"structure"` - - // A list of event categories for a SourceType that you want to subscribe to. - EventCategories []*string `type:"list"` - - // The type of AWS DMS resource that generates events. - // - // Valid values: replication-instance | replication-server | security-group - // | migration-task - SourceType *string `type:"string"` -} - -// String returns the string representation -func (s EventCategoryGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventCategoryGroup) GoString() string { - return s.String() -} - -// SetEventCategories sets the EventCategories field's value. -func (s *EventCategoryGroup) SetEventCategories(v []*string) *EventCategoryGroup { - s.EventCategories = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *EventCategoryGroup) SetSourceType(v string) *EventCategoryGroup { - s.SourceType = &v - return s -} - -type EventSubscription struct { - _ struct{} `type:"structure"` - - // The AWS DMS event notification subscription Id. - CustSubscriptionId *string `type:"string"` - - // The AWS customer account associated with the AWS DMS event notification subscription. - CustomerAwsId *string `type:"string"` - - // Boolean value that indicates if the event subscription is enabled. - Enabled *bool `type:"boolean"` - - // A lists of event categories. - EventCategoriesList []*string `type:"list"` - - // The topic ARN of the AWS DMS event notification subscription. - SnsTopicArn *string `type:"string"` - - // A list of source Ids for the event subscription. - SourceIdsList []*string `type:"list"` - - // The type of AWS DMS resource that generates events. - // - // Valid values: replication-instance | replication-server | security-group - // | migration-task - SourceType *string `type:"string"` - - // The status of the AWS DMS event notification subscription. - // - // Constraints: - // - // Can be one of the following: creating | modifying | deleting | active | no-permission - // | topic-not-exist - // - // The status "no-permission" indicates that AWS DMS no longer has permission - // to post to the SNS topic. The status "topic-not-exist" indicates that the - // topic was deleted after the subscription was created. - Status *string `type:"string"` - - // The time the RDS event notification subscription was created. - SubscriptionCreationTime *string `type:"string"` -} - -// String returns the string representation -func (s EventSubscription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventSubscription) GoString() string { - return s.String() -} - -// SetCustSubscriptionId sets the CustSubscriptionId field's value. -func (s *EventSubscription) SetCustSubscriptionId(v string) *EventSubscription { - s.CustSubscriptionId = &v - return s -} - -// SetCustomerAwsId sets the CustomerAwsId field's value. -func (s *EventSubscription) SetCustomerAwsId(v string) *EventSubscription { - s.CustomerAwsId = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *EventSubscription) SetEnabled(v bool) *EventSubscription { - s.Enabled = &v - return s -} - -// SetEventCategoriesList sets the EventCategoriesList field's value. -func (s *EventSubscription) SetEventCategoriesList(v []*string) *EventSubscription { - s.EventCategoriesList = v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *EventSubscription) SetSnsTopicArn(v string) *EventSubscription { - s.SnsTopicArn = &v - return s -} - -// SetSourceIdsList sets the SourceIdsList field's value. -func (s *EventSubscription) SetSourceIdsList(v []*string) *EventSubscription { - s.SourceIdsList = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *EventSubscription) SetSourceType(v string) *EventSubscription { - s.SourceType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *EventSubscription) SetStatus(v string) *EventSubscription { - s.Status = &v - return s -} - -// SetSubscriptionCreationTime sets the SubscriptionCreationTime field's value. -func (s *EventSubscription) SetSubscriptionCreationTime(v string) *EventSubscription { - s.SubscriptionCreationTime = &v - return s -} - -type Filter struct { - _ struct{} `type:"structure"` - - // The name of the filter. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The filter value. - // - // Values is a required field - Values []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s Filter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Filter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Filter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Filter"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *Filter) SetName(v string) *Filter { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *Filter) SetValues(v []*string) *Filter { - s.Values = v - return s -} - -type ImportCertificateInput struct { - _ struct{} `type:"structure"` - - // The customer-assigned name of the certificate. Valid characters are A-z and - // 0-9. - // - // CertificateIdentifier is a required field - CertificateIdentifier *string `type:"string" required:"true"` - - // The contents of the .pem X.509 certificate file for the certificate. - CertificatePem *string `type:"string"` - - // The location of the imported Oracle Wallet certificate for use with SSL. - // - // CertificateWallet is automatically base64 encoded/decoded by the SDK. - CertificateWallet []byte `type:"blob"` - - // The tags associated with the certificate. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s ImportCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportCertificateInput"} - if s.CertificateIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateIdentifier sets the CertificateIdentifier field's value. -func (s *ImportCertificateInput) SetCertificateIdentifier(v string) *ImportCertificateInput { - s.CertificateIdentifier = &v - return s -} - -// SetCertificatePem sets the CertificatePem field's value. -func (s *ImportCertificateInput) SetCertificatePem(v string) *ImportCertificateInput { - s.CertificatePem = &v - return s -} - -// SetCertificateWallet sets the CertificateWallet field's value. -func (s *ImportCertificateInput) SetCertificateWallet(v []byte) *ImportCertificateInput { - s.CertificateWallet = v - return s -} - -// SetTags sets the Tags field's value. -func (s *ImportCertificateInput) SetTags(v []*Tag) *ImportCertificateInput { - s.Tags = v - return s -} - -type ImportCertificateOutput struct { - _ struct{} `type:"structure"` - - // The certificate to be uploaded. - Certificate *Certificate `type:"structure"` -} - -// String returns the string representation -func (s ImportCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificate sets the Certificate field's value. -func (s *ImportCertificateOutput) SetCertificate(v *Certificate) *ImportCertificateOutput { - s.Certificate = v - return s -} - -type KinesisSettings struct { - _ struct{} `type:"structure"` - - // The output format for the records created on the endpoint. The message format - // is JSON. - MessageFormat *string `type:"string" enum:"MessageFormatValue"` - - // The Amazon Resource Name (ARN) for the IAM role that DMS uses to write to - // the Amazon Kinesis data stream. - ServiceAccessRoleArn *string `type:"string"` - - // The Amazon Resource Name (ARN) for the Amazon Kinesis Data Streams endpoint. - StreamArn *string `type:"string"` -} - -// String returns the string representation -func (s KinesisSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisSettings) GoString() string { - return s.String() -} - -// SetMessageFormat sets the MessageFormat field's value. -func (s *KinesisSettings) SetMessageFormat(v string) *KinesisSettings { - s.MessageFormat = &v - return s -} - -// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. -func (s *KinesisSettings) SetServiceAccessRoleArn(v string) *KinesisSettings { - s.ServiceAccessRoleArn = &v - return s -} - -// SetStreamArn sets the StreamArn field's value. -func (s *KinesisSettings) SetStreamArn(v string) *KinesisSettings { - s.StreamArn = &v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) string that uniquely identifies the AWS DMS - // resource. - // - // ResourceArn is a required field - ResourceArn *string `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 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"` - - // A list of tags for the resource. - TagList []*Tag `type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetTagList sets the TagList field's value. -func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOutput { - s.TagList = v - return s -} - -type ModifyEndpointInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the certificate used for SSL connection. - CertificateArn *string `type:"string"` - - // The name of the endpoint database. - DatabaseName *string `type:"string"` - - // The settings in JSON format for the DMS transfer type of source endpoint. - // - // Attributes include the following: - // - // * serviceAccessRoleArn - The IAM role that has permission to access the - // Amazon S3 bucket. - // - // * BucketName - The name of the S3 bucket to use. - // - // * compressionType - An optional parameter to use GZIP to compress the - // target files. Set to NONE (the default) or do not use to leave the files - // uncompressed. - // - // Shorthand syntax: ServiceAccessRoleArn=string ,BucketName=string,CompressionType=string - // - // JSON syntax: - // - // { "ServiceAccessRoleArn": "string", "BucketName": "string", "CompressionType": - // "none"|"gzip" } - DmsTransferSettings *DmsTransferSettings `type:"structure"` - - // Settings in JSON format for the target Amazon DynamoDB endpoint. For more - // information about the available settings, see Using Object Mapping to Migrate - // Data to DynamoDB (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.DynamoDB.html) - // in the AWS Database Migration Service User Guide. - DynamoDbSettings *DynamoDbSettings `type:"structure"` - - // Settings in JSON format for the target Elasticsearch endpoint. For more information - // about the available settings, see Extra Connection Attributes When Using - // Elasticsearch as a Target for AWS DMS (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Elasticsearch.html#CHAP_Target.Elasticsearch.Configuration) - // in the AWS Database Migration User Guide. - ElasticsearchSettings *ElasticsearchSettings `type:"structure"` - - // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. - // - // EndpointArn is a required field - EndpointArn *string `type:"string" required:"true"` - - // The database endpoint identifier. Identifiers must begin with a letter; must - // contain only ASCII letters, digits, and hyphens; and must not end with a - // hyphen or contain two consecutive hyphens. - EndpointIdentifier *string `type:"string"` - - // The type of endpoint. - EndpointType *string `type:"string" enum:"ReplicationEndpointTypeValue"` - - // The type of engine for the endpoint. Valid values, depending on the EndPointType, - // include mysql, oracle, postgres, mariadb, aurora, aurora-postgresql, redshift, - // s3, db2, azuredb, sybase, sybase, dynamodb, mongodb, and sqlserver. - EngineName *string `type:"string"` - - // The external table definition. - ExternalTableDefinition *string `type:"string"` - - // Additional attributes associated with the connection. To reset this parameter, - // pass the empty string ("") as an argument. - ExtraConnectionAttributes *string `type:"string"` - - // Settings in JSON format for the target Amazon Kinesis Data Streams endpoint. - // For more information about the available settings, see Using Object Mapping - // to Migrate Data to a Kinesis Data Stream (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kinesis.html#CHAP_Target.Kinesis.ObjectMapping - // ) in the AWS Database Migration User Guide. - KinesisSettings *KinesisSettings `type:"structure"` - - // Settings in JSON format for the source MongoDB endpoint. For more information - // about the available settings, see the configuration properties section in - // Using MongoDB as a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html) - // in the AWS Database Migration Service User Guide. - MongoDbSettings *MongoDbSettings `type:"structure"` - - // The password to be used to login to the endpoint database. - Password *string `type:"string" sensitive:"true"` - - // The port used by the endpoint database. - Port *int64 `type:"integer"` - - // Settings in JSON format for the target Amazon S3 endpoint. For more information - // about the available settings, see Extra Connection Attributes When Using - // Amazon S3 as a Target for AWS DMS (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html#CHAP_Target.S3.Configuring) - // in the AWS Database Migration Service User Guide. - S3Settings *S3Settings `type:"structure"` - - // The name of the server where the endpoint database resides. - ServerName *string `type:"string"` - - // The Amazon Resource Name (ARN) for the service access role you want to use - // to modify the endpoint. - ServiceAccessRoleArn *string `type:"string"` - - // The SSL mode to be used. - // - // SSL mode can be one of four values: none, require, verify-ca, verify-full. - // - // The default value is none. - SslMode *string `type:"string" enum:"DmsSslModeValue"` - - // The user name to be used to login to the endpoint database. - Username *string `type:"string"` -} - -// String returns the string representation -func (s ModifyEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyEndpointInput"} - if s.EndpointArn == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointArn")) - } - if s.DynamoDbSettings != nil { - if err := s.DynamoDbSettings.Validate(); err != nil { - invalidParams.AddNested("DynamoDbSettings", err.(request.ErrInvalidParams)) - } - } - if s.ElasticsearchSettings != nil { - if err := s.ElasticsearchSettings.Validate(); err != nil { - invalidParams.AddNested("ElasticsearchSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *ModifyEndpointInput) SetCertificateArn(v string) *ModifyEndpointInput { - s.CertificateArn = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *ModifyEndpointInput) SetDatabaseName(v string) *ModifyEndpointInput { - s.DatabaseName = &v - return s -} - -// SetDmsTransferSettings sets the DmsTransferSettings field's value. -func (s *ModifyEndpointInput) SetDmsTransferSettings(v *DmsTransferSettings) *ModifyEndpointInput { - s.DmsTransferSettings = v - return s -} - -// SetDynamoDbSettings sets the DynamoDbSettings field's value. -func (s *ModifyEndpointInput) SetDynamoDbSettings(v *DynamoDbSettings) *ModifyEndpointInput { - s.DynamoDbSettings = v - return s -} - -// SetElasticsearchSettings sets the ElasticsearchSettings field's value. -func (s *ModifyEndpointInput) SetElasticsearchSettings(v *ElasticsearchSettings) *ModifyEndpointInput { - s.ElasticsearchSettings = v - return s -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *ModifyEndpointInput) SetEndpointArn(v string) *ModifyEndpointInput { - s.EndpointArn = &v - return s -} - -// SetEndpointIdentifier sets the EndpointIdentifier field's value. -func (s *ModifyEndpointInput) SetEndpointIdentifier(v string) *ModifyEndpointInput { - s.EndpointIdentifier = &v - return s -} - -// SetEndpointType sets the EndpointType field's value. -func (s *ModifyEndpointInput) SetEndpointType(v string) *ModifyEndpointInput { - s.EndpointType = &v - return s -} - -// SetEngineName sets the EngineName field's value. -func (s *ModifyEndpointInput) SetEngineName(v string) *ModifyEndpointInput { - s.EngineName = &v - return s -} - -// SetExternalTableDefinition sets the ExternalTableDefinition field's value. -func (s *ModifyEndpointInput) SetExternalTableDefinition(v string) *ModifyEndpointInput { - s.ExternalTableDefinition = &v - return s -} - -// SetExtraConnectionAttributes sets the ExtraConnectionAttributes field's value. -func (s *ModifyEndpointInput) SetExtraConnectionAttributes(v string) *ModifyEndpointInput { - s.ExtraConnectionAttributes = &v - return s -} - -// SetKinesisSettings sets the KinesisSettings field's value. -func (s *ModifyEndpointInput) SetKinesisSettings(v *KinesisSettings) *ModifyEndpointInput { - s.KinesisSettings = v - return s -} - -// SetMongoDbSettings sets the MongoDbSettings field's value. -func (s *ModifyEndpointInput) SetMongoDbSettings(v *MongoDbSettings) *ModifyEndpointInput { - s.MongoDbSettings = v - return s -} - -// SetPassword sets the Password field's value. -func (s *ModifyEndpointInput) SetPassword(v string) *ModifyEndpointInput { - s.Password = &v - return s -} - -// SetPort sets the Port field's value. -func (s *ModifyEndpointInput) SetPort(v int64) *ModifyEndpointInput { - s.Port = &v - return s -} - -// SetS3Settings sets the S3Settings field's value. -func (s *ModifyEndpointInput) SetS3Settings(v *S3Settings) *ModifyEndpointInput { - s.S3Settings = v - return s -} - -// SetServerName sets the ServerName field's value. -func (s *ModifyEndpointInput) SetServerName(v string) *ModifyEndpointInput { - s.ServerName = &v - return s -} - -// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. -func (s *ModifyEndpointInput) SetServiceAccessRoleArn(v string) *ModifyEndpointInput { - s.ServiceAccessRoleArn = &v - return s -} - -// SetSslMode sets the SslMode field's value. -func (s *ModifyEndpointInput) SetSslMode(v string) *ModifyEndpointInput { - s.SslMode = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *ModifyEndpointInput) SetUsername(v string) *ModifyEndpointInput { - s.Username = &v - return s -} - -type ModifyEndpointOutput struct { - _ struct{} `type:"structure"` - - // The modified endpoint. - Endpoint *Endpoint `type:"structure"` -} - -// String returns the string representation -func (s ModifyEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyEndpointOutput) GoString() string { - return s.String() -} - -// SetEndpoint sets the Endpoint field's value. -func (s *ModifyEndpointOutput) SetEndpoint(v *Endpoint) *ModifyEndpointOutput { - s.Endpoint = v - return s -} - -type ModifyEventSubscriptionInput struct { - _ struct{} `type:"structure"` - - // A Boolean value; set to true to activate the subscription. - Enabled *bool `type:"boolean"` - - // A list of event categories for a source type that you want to subscribe to. - // Use the DescribeEventCategories action to see a list of event categories. - EventCategories []*string `type:"list"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic created for event - // notification. The ARN is created by Amazon SNS when you create a topic and - // subscribe to it. - SnsTopicArn *string `type:"string"` - - // The type of AWS DMS resource that generates the events you want to subscribe - // to. - // - // Valid values: replication-instance | migration-task - SourceType *string `type:"string"` - - // The name of the AWS DMS event notification subscription to be modified. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyEventSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyEventSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyEventSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyEventSubscriptionInput"} - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *ModifyEventSubscriptionInput) SetEnabled(v bool) *ModifyEventSubscriptionInput { - s.Enabled = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *ModifyEventSubscriptionInput) SetEventCategories(v []*string) *ModifyEventSubscriptionInput { - s.EventCategories = v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *ModifyEventSubscriptionInput) SetSnsTopicArn(v string) *ModifyEventSubscriptionInput { - s.SnsTopicArn = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *ModifyEventSubscriptionInput) SetSourceType(v string) *ModifyEventSubscriptionInput { - s.SourceType = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *ModifyEventSubscriptionInput) SetSubscriptionName(v string) *ModifyEventSubscriptionInput { - s.SubscriptionName = &v - return s -} - -type ModifyEventSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // The modified event subscription. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s ModifyEventSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyEventSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *ModifyEventSubscriptionOutput) SetEventSubscription(v *EventSubscription) *ModifyEventSubscriptionOutput { - s.EventSubscription = v - return s -} - -type ModifyReplicationInstanceInput struct { - _ struct{} `type:"structure"` - - // The amount of storage (in gigabytes) to be allocated for the replication - // instance. - AllocatedStorage *int64 `type:"integer"` - - // Indicates that major version upgrades are allowed. Changing this parameter - // does not result in an outage and the change is asynchronously applied as - // soon as possible. - // - // Constraints: This parameter must be set to true when specifying a value for - // the EngineVersion parameter that is a different major version than the replication - // instance's current version. - AllowMajorVersionUpgrade *bool `type:"boolean"` - - // Indicates whether the changes should be applied immediately or during the - // next maintenance window. - ApplyImmediately *bool `type:"boolean"` - - // Indicates that minor version upgrades will be applied automatically to the - // replication instance during the maintenance window. Changing this parameter - // does not result in an outage except in the following case and the change - // is asynchronously applied as soon as possible. An outage will result if this - // parameter is set to true during the maintenance window, and a newer minor - // version is available, and AWS DMS has enabled auto patching for that engine - // version. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The engine version number of the replication instance. - EngineVersion *string `type:"string"` - - // Specifies if the replication instance is a Multi-AZ deployment. You cannot - // set the AvailabilityZone parameter if the Multi-AZ parameter is set to true. - MultiAZ *bool `type:"boolean"` - - // The weekly time range (in UTC) during which system maintenance can occur, - // which might result in an outage. Changing this parameter does not result - // in an outage, except in the following situation, and the change is asynchronously - // applied as soon as possible. If moving this window to the current time, there - // must be at least 30 minutes between the current time and end of the window - // to ensure pending changes are applied. - // - // Default: Uses existing setting - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun - // - // Constraints: Must be at least 30 minutes - PreferredMaintenanceWindow *string `type:"string"` - - // The Amazon Resource Name (ARN) of the replication instance. - // - // ReplicationInstanceArn is a required field - ReplicationInstanceArn *string `type:"string" required:"true"` - - // The compute and memory capacity of the replication instance. - // - // Valid Values: dms.t2.micro | dms.t2.small | dms.t2.medium | dms.t2.large - // | dms.c4.large | dms.c4.xlarge | dms.c4.2xlarge | dms.c4.4xlarge - ReplicationInstanceClass *string `type:"string"` - - // The replication instance identifier. This parameter is stored as a lowercase - // string. - ReplicationInstanceIdentifier *string `type:"string"` - - // Specifies the VPC security group to be used with the replication instance. - // The VPC security group must work with the VPC containing the replication - // instance. - VpcSecurityGroupIds []*string `type:"list"` -} - -// String returns the string representation -func (s ModifyReplicationInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyReplicationInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyReplicationInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyReplicationInstanceInput"} - if s.ReplicationInstanceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationInstanceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *ModifyReplicationInstanceInput) SetAllocatedStorage(v int64) *ModifyReplicationInstanceInput { - s.AllocatedStorage = &v - return s -} - -// SetAllowMajorVersionUpgrade sets the AllowMajorVersionUpgrade field's value. -func (s *ModifyReplicationInstanceInput) SetAllowMajorVersionUpgrade(v bool) *ModifyReplicationInstanceInput { - s.AllowMajorVersionUpgrade = &v - return s -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *ModifyReplicationInstanceInput) SetApplyImmediately(v bool) *ModifyReplicationInstanceInput { - s.ApplyImmediately = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *ModifyReplicationInstanceInput) SetAutoMinorVersionUpgrade(v bool) *ModifyReplicationInstanceInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *ModifyReplicationInstanceInput) SetEngineVersion(v string) *ModifyReplicationInstanceInput { - s.EngineVersion = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *ModifyReplicationInstanceInput) SetMultiAZ(v bool) *ModifyReplicationInstanceInput { - s.MultiAZ = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *ModifyReplicationInstanceInput) SetPreferredMaintenanceWindow(v string) *ModifyReplicationInstanceInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetReplicationInstanceArn sets the ReplicationInstanceArn field's value. -func (s *ModifyReplicationInstanceInput) SetReplicationInstanceArn(v string) *ModifyReplicationInstanceInput { - s.ReplicationInstanceArn = &v - return s -} - -// SetReplicationInstanceClass sets the ReplicationInstanceClass field's value. -func (s *ModifyReplicationInstanceInput) SetReplicationInstanceClass(v string) *ModifyReplicationInstanceInput { - s.ReplicationInstanceClass = &v - return s -} - -// SetReplicationInstanceIdentifier sets the ReplicationInstanceIdentifier field's value. -func (s *ModifyReplicationInstanceInput) SetReplicationInstanceIdentifier(v string) *ModifyReplicationInstanceInput { - s.ReplicationInstanceIdentifier = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *ModifyReplicationInstanceInput) SetVpcSecurityGroupIds(v []*string) *ModifyReplicationInstanceInput { - s.VpcSecurityGroupIds = v - return s -} - -type ModifyReplicationInstanceOutput struct { - _ struct{} `type:"structure"` - - // The modified replication instance. - ReplicationInstance *ReplicationInstance `type:"structure"` -} - -// String returns the string representation -func (s ModifyReplicationInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyReplicationInstanceOutput) GoString() string { - return s.String() -} - -// SetReplicationInstance sets the ReplicationInstance field's value. -func (s *ModifyReplicationInstanceOutput) SetReplicationInstance(v *ReplicationInstance) *ModifyReplicationInstanceOutput { - s.ReplicationInstance = v - return s -} - -type ModifyReplicationSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The description of the replication instance subnet group. - ReplicationSubnetGroupDescription *string `type:"string"` - - // The name of the replication instance subnet group. - // - // ReplicationSubnetGroupIdentifier is a required field - ReplicationSubnetGroupIdentifier *string `type:"string" required:"true"` - - // A list of subnet IDs. - // - // SubnetIds is a required field - SubnetIds []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyReplicationSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyReplicationSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyReplicationSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyReplicationSubnetGroupInput"} - if s.ReplicationSubnetGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationSubnetGroupIdentifier")) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReplicationSubnetGroupDescription sets the ReplicationSubnetGroupDescription field's value. -func (s *ModifyReplicationSubnetGroupInput) SetReplicationSubnetGroupDescription(v string) *ModifyReplicationSubnetGroupInput { - s.ReplicationSubnetGroupDescription = &v - return s -} - -// SetReplicationSubnetGroupIdentifier sets the ReplicationSubnetGroupIdentifier field's value. -func (s *ModifyReplicationSubnetGroupInput) SetReplicationSubnetGroupIdentifier(v string) *ModifyReplicationSubnetGroupInput { - s.ReplicationSubnetGroupIdentifier = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *ModifyReplicationSubnetGroupInput) SetSubnetIds(v []*string) *ModifyReplicationSubnetGroupInput { - s.SubnetIds = v - return s -} - -type ModifyReplicationSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // The modified replication subnet group. - ReplicationSubnetGroup *ReplicationSubnetGroup `type:"structure"` -} - -// String returns the string representation -func (s ModifyReplicationSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyReplicationSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetReplicationSubnetGroup sets the ReplicationSubnetGroup field's value. -func (s *ModifyReplicationSubnetGroupOutput) SetReplicationSubnetGroup(v *ReplicationSubnetGroup) *ModifyReplicationSubnetGroupOutput { - s.ReplicationSubnetGroup = v - return s -} - -type ModifyReplicationTaskInput struct { - _ struct{} `type:"structure"` - - // Indicates when you want a change data capture (CDC) operation to start. Use - // either CdcStartPosition or CdcStartTime to specify when you want a CDC operation - // to start. Specifying both values results in an error. - // - // The value can be in date, checkpoint, or LSN/SCN format. - // - // Date Example: --cdc-start-position “2018-03-08T12:12:12” - // - // Checkpoint Example: --cdc-start-position "checkpoint:V1#27#mysql-bin-changelog.157832:1975:-1:2002:677883278264080:mysql-bin-changelog.157832:1876#0#0#*#0#93" - // - // LSN Example: --cdc-start-position “mysql-bin-changelog.000024:373” - CdcStartPosition *string `type:"string"` - - // Indicates the start time for a change data capture (CDC) operation. Use either - // CdcStartTime or CdcStartPosition to specify when you want a CDC operation - // to start. Specifying both values results in an error. - // - // Timestamp Example: --cdc-start-time “2018-03-08T12:12:12” - CdcStartTime *time.Time `type:"timestamp"` - - // Indicates when you want a change data capture (CDC) operation to stop. The - // value can be either server time or commit time. - // - // Server time example: --cdc-stop-position “server_time:3018-02-09T12:12:12” - // - // Commit time example: --cdc-stop-position “commit_time: 3018-02-09T12:12:12 - // “ - CdcStopPosition *string `type:"string"` - - // The migration type. - // - // Valid values: full-load | cdc | full-load-and-cdc - MigrationType *string `type:"string" enum:"MigrationTypeValue"` - - // The Amazon Resource Name (ARN) of the replication task. - // - // ReplicationTaskArn is a required field - ReplicationTaskArn *string `type:"string" required:"true"` - - // The replication task identifier. - // - // Constraints: - // - // * Must contain from 1 to 255 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - ReplicationTaskIdentifier *string `type:"string"` - - // JSON file that contains settings for the task, such as target metadata settings. - ReplicationTaskSettings *string `type:"string"` - - // When using the AWS CLI or boto3, provide the path of the JSON file that contains - // the table mappings. Precede the path with "file://". When working with the - // DMS API, provide the JSON as the parameter value. - // - // For example, --table-mappings file://mappingfile.json - TableMappings *string `type:"string"` -} - -// String returns the string representation -func (s ModifyReplicationTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyReplicationTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyReplicationTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyReplicationTaskInput"} - if s.ReplicationTaskArn == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationTaskArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCdcStartPosition sets the CdcStartPosition field's value. -func (s *ModifyReplicationTaskInput) SetCdcStartPosition(v string) *ModifyReplicationTaskInput { - s.CdcStartPosition = &v - return s -} - -// SetCdcStartTime sets the CdcStartTime field's value. -func (s *ModifyReplicationTaskInput) SetCdcStartTime(v time.Time) *ModifyReplicationTaskInput { - s.CdcStartTime = &v - return s -} - -// SetCdcStopPosition sets the CdcStopPosition field's value. -func (s *ModifyReplicationTaskInput) SetCdcStopPosition(v string) *ModifyReplicationTaskInput { - s.CdcStopPosition = &v - return s -} - -// SetMigrationType sets the MigrationType field's value. -func (s *ModifyReplicationTaskInput) SetMigrationType(v string) *ModifyReplicationTaskInput { - s.MigrationType = &v - return s -} - -// SetReplicationTaskArn sets the ReplicationTaskArn field's value. -func (s *ModifyReplicationTaskInput) SetReplicationTaskArn(v string) *ModifyReplicationTaskInput { - s.ReplicationTaskArn = &v - return s -} - -// SetReplicationTaskIdentifier sets the ReplicationTaskIdentifier field's value. -func (s *ModifyReplicationTaskInput) SetReplicationTaskIdentifier(v string) *ModifyReplicationTaskInput { - s.ReplicationTaskIdentifier = &v - return s -} - -// SetReplicationTaskSettings sets the ReplicationTaskSettings field's value. -func (s *ModifyReplicationTaskInput) SetReplicationTaskSettings(v string) *ModifyReplicationTaskInput { - s.ReplicationTaskSettings = &v - return s -} - -// SetTableMappings sets the TableMappings field's value. -func (s *ModifyReplicationTaskInput) SetTableMappings(v string) *ModifyReplicationTaskInput { - s.TableMappings = &v - return s -} - -type ModifyReplicationTaskOutput struct { - _ struct{} `type:"structure"` - - // The replication task that was modified. - ReplicationTask *ReplicationTask `type:"structure"` -} - -// String returns the string representation -func (s ModifyReplicationTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyReplicationTaskOutput) GoString() string { - return s.String() -} - -// SetReplicationTask sets the ReplicationTask field's value. -func (s *ModifyReplicationTaskOutput) SetReplicationTask(v *ReplicationTask) *ModifyReplicationTaskOutput { - s.ReplicationTask = v - return s -} - -type MongoDbSettings struct { - _ struct{} `type:"structure"` - - // The authentication mechanism you use to access the MongoDB source endpoint. - // - // Valid values: DEFAULT, MONGODB_CR, SCRAM_SHA_1 - // - // DEFAULT – For MongoDB version 2.x, use MONGODB_CR. For MongoDB version 3.x, - // use SCRAM_SHA_1. This attribute is not used when authType=No. - AuthMechanism *string `type:"string" enum:"AuthMechanismValue"` - - // The MongoDB database name. This attribute is not used when authType=NO. - // - // The default is admin. - AuthSource *string `type:"string"` - - // The authentication type you use to access the MongoDB source endpoint. - // - // Valid values: NO, PASSWORD - // - // When NO is selected, user name and password parameters are not used and can - // be empty. - AuthType *string `type:"string" enum:"AuthTypeValue"` - - // The database name on the MongoDB source endpoint. - DatabaseName *string `type:"string"` - - // Indicates the number of documents to preview to determine the document organization. - // Use this attribute when NestingLevel is set to ONE. - // - // Must be a positive value greater than 0. Default value is 1000. - DocsToInvestigate *string `type:"string"` - - // Specifies the document ID. Use this attribute when NestingLevel is set to - // NONE. - // - // Default value is false. - ExtractDocId *string `type:"string"` - - // The AWS KMS key identifier that is used to encrypt the content on the replication - // instance. If you don't specify a value for the KmsKeyId parameter, then AWS - // DMS uses your default encryption key. AWS KMS creates the default encryption - // key for your AWS account. Your AWS account has a different default encryption - // key for each AWS Region. - KmsKeyId *string `type:"string"` - - // Specifies either document or table mode. - // - // Valid values: NONE, ONE - // - // Default value is NONE. Specify NONE to use document mode. Specify ONE to - // use table mode. - NestingLevel *string `type:"string" enum:"NestingLevelValue"` - - // The password for the user account you use to access the MongoDB source endpoint. - Password *string `type:"string" sensitive:"true"` - - // The port value for the MongoDB source endpoint. - Port *int64 `type:"integer"` - - // The name of the server on the MongoDB source endpoint. - ServerName *string `type:"string"` - - // The user name you use to access the MongoDB source endpoint. - Username *string `type:"string"` -} - -// String returns the string representation -func (s MongoDbSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MongoDbSettings) GoString() string { - return s.String() -} - -// SetAuthMechanism sets the AuthMechanism field's value. -func (s *MongoDbSettings) SetAuthMechanism(v string) *MongoDbSettings { - s.AuthMechanism = &v - return s -} - -// SetAuthSource sets the AuthSource field's value. -func (s *MongoDbSettings) SetAuthSource(v string) *MongoDbSettings { - s.AuthSource = &v - return s -} - -// SetAuthType sets the AuthType field's value. -func (s *MongoDbSettings) SetAuthType(v string) *MongoDbSettings { - s.AuthType = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *MongoDbSettings) SetDatabaseName(v string) *MongoDbSettings { - s.DatabaseName = &v - return s -} - -// SetDocsToInvestigate sets the DocsToInvestigate field's value. -func (s *MongoDbSettings) SetDocsToInvestigate(v string) *MongoDbSettings { - s.DocsToInvestigate = &v - return s -} - -// SetExtractDocId sets the ExtractDocId field's value. -func (s *MongoDbSettings) SetExtractDocId(v string) *MongoDbSettings { - s.ExtractDocId = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *MongoDbSettings) SetKmsKeyId(v string) *MongoDbSettings { - s.KmsKeyId = &v - return s -} - -// SetNestingLevel sets the NestingLevel field's value. -func (s *MongoDbSettings) SetNestingLevel(v string) *MongoDbSettings { - s.NestingLevel = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *MongoDbSettings) SetPassword(v string) *MongoDbSettings { - s.Password = &v - return s -} - -// SetPort sets the Port field's value. -func (s *MongoDbSettings) SetPort(v int64) *MongoDbSettings { - s.Port = &v - return s -} - -// SetServerName sets the ServerName field's value. -func (s *MongoDbSettings) SetServerName(v string) *MongoDbSettings { - s.ServerName = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *MongoDbSettings) SetUsername(v string) *MongoDbSettings { - s.Username = &v - return s -} - -type OrderableReplicationInstance struct { - _ struct{} `type:"structure"` - - // The default amount of storage (in gigabytes) that is allocated for the replication - // instance. - DefaultAllocatedStorage *int64 `type:"integer"` - - // The version of the replication engine. - EngineVersion *string `type:"string"` - - // The amount of storage (in gigabytes) that is allocated for the replication - // instance. - IncludedAllocatedStorage *int64 `type:"integer"` - - // The minimum amount of storage (in gigabytes) that can be allocated for the - // replication instance. - MaxAllocatedStorage *int64 `type:"integer"` - - // The minimum amount of storage (in gigabytes) that can be allocated for the - // replication instance. - MinAllocatedStorage *int64 `type:"integer"` - - // The compute and memory capacity of the replication instance. - // - // Valid Values: dms.t2.micro | dms.t2.small | dms.t2.medium | dms.t2.large - // | dms.c4.large | dms.c4.xlarge | dms.c4.2xlarge | dms.c4.4xlarge - ReplicationInstanceClass *string `type:"string"` - - // The type of storage used by the replication instance. - StorageType *string `type:"string"` -} - -// String returns the string representation -func (s OrderableReplicationInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OrderableReplicationInstance) GoString() string { - return s.String() -} - -// SetDefaultAllocatedStorage sets the DefaultAllocatedStorage field's value. -func (s *OrderableReplicationInstance) SetDefaultAllocatedStorage(v int64) *OrderableReplicationInstance { - s.DefaultAllocatedStorage = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *OrderableReplicationInstance) SetEngineVersion(v string) *OrderableReplicationInstance { - s.EngineVersion = &v - return s -} - -// SetIncludedAllocatedStorage sets the IncludedAllocatedStorage field's value. -func (s *OrderableReplicationInstance) SetIncludedAllocatedStorage(v int64) *OrderableReplicationInstance { - s.IncludedAllocatedStorage = &v - return s -} - -// SetMaxAllocatedStorage sets the MaxAllocatedStorage field's value. -func (s *OrderableReplicationInstance) SetMaxAllocatedStorage(v int64) *OrderableReplicationInstance { - s.MaxAllocatedStorage = &v - return s -} - -// SetMinAllocatedStorage sets the MinAllocatedStorage field's value. -func (s *OrderableReplicationInstance) SetMinAllocatedStorage(v int64) *OrderableReplicationInstance { - s.MinAllocatedStorage = &v - return s -} - -// SetReplicationInstanceClass sets the ReplicationInstanceClass field's value. -func (s *OrderableReplicationInstance) SetReplicationInstanceClass(v string) *OrderableReplicationInstance { - s.ReplicationInstanceClass = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *OrderableReplicationInstance) SetStorageType(v string) *OrderableReplicationInstance { - s.StorageType = &v - return s -} - -type RebootReplicationInstanceInput struct { - _ struct{} `type:"structure"` - - // If this parameter is true, the reboot is conducted through a Multi-AZ failover. - // (If the instance isn't configured for Multi-AZ, then you can't specify true.) - ForceFailover *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the replication instance. - // - // ReplicationInstanceArn is a required field - ReplicationInstanceArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RebootReplicationInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootReplicationInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootReplicationInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootReplicationInstanceInput"} - if s.ReplicationInstanceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationInstanceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForceFailover sets the ForceFailover field's value. -func (s *RebootReplicationInstanceInput) SetForceFailover(v bool) *RebootReplicationInstanceInput { - s.ForceFailover = &v - return s -} - -// SetReplicationInstanceArn sets the ReplicationInstanceArn field's value. -func (s *RebootReplicationInstanceInput) SetReplicationInstanceArn(v string) *RebootReplicationInstanceInput { - s.ReplicationInstanceArn = &v - return s -} - -type RebootReplicationInstanceOutput struct { - _ struct{} `type:"structure"` - - // The replication instance that is being rebooted. - ReplicationInstance *ReplicationInstance `type:"structure"` -} - -// String returns the string representation -func (s RebootReplicationInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootReplicationInstanceOutput) GoString() string { - return s.String() -} - -// SetReplicationInstance sets the ReplicationInstance field's value. -func (s *RebootReplicationInstanceOutput) SetReplicationInstance(v *ReplicationInstance) *RebootReplicationInstanceOutput { - s.ReplicationInstance = v - return s -} - -type RefreshSchemasInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. - // - // EndpointArn is a required field - EndpointArn *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the replication instance. - // - // ReplicationInstanceArn is a required field - ReplicationInstanceArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RefreshSchemasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RefreshSchemasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RefreshSchemasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RefreshSchemasInput"} - if s.EndpointArn == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointArn")) - } - if s.ReplicationInstanceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationInstanceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *RefreshSchemasInput) SetEndpointArn(v string) *RefreshSchemasInput { - s.EndpointArn = &v - return s -} - -// SetReplicationInstanceArn sets the ReplicationInstanceArn field's value. -func (s *RefreshSchemasInput) SetReplicationInstanceArn(v string) *RefreshSchemasInput { - s.ReplicationInstanceArn = &v - return s -} - -type RefreshSchemasOutput struct { - _ struct{} `type:"structure"` - - // The status of the refreshed schema. - RefreshSchemasStatus *RefreshSchemasStatus `type:"structure"` -} - -// String returns the string representation -func (s RefreshSchemasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RefreshSchemasOutput) GoString() string { - return s.String() -} - -// SetRefreshSchemasStatus sets the RefreshSchemasStatus field's value. -func (s *RefreshSchemasOutput) SetRefreshSchemasStatus(v *RefreshSchemasStatus) *RefreshSchemasOutput { - s.RefreshSchemasStatus = v - return s -} - -type RefreshSchemasStatus struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. - EndpointArn *string `type:"string"` - - // The last failure message for the schema. - LastFailureMessage *string `type:"string"` - - // The date the schema was last refreshed. - LastRefreshDate *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the replication instance. - ReplicationInstanceArn *string `type:"string"` - - // The status of the schema. - Status *string `type:"string" enum:"RefreshSchemasStatusTypeValue"` -} - -// String returns the string representation -func (s RefreshSchemasStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RefreshSchemasStatus) GoString() string { - return s.String() -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *RefreshSchemasStatus) SetEndpointArn(v string) *RefreshSchemasStatus { - s.EndpointArn = &v - return s -} - -// SetLastFailureMessage sets the LastFailureMessage field's value. -func (s *RefreshSchemasStatus) SetLastFailureMessage(v string) *RefreshSchemasStatus { - s.LastFailureMessage = &v - return s -} - -// SetLastRefreshDate sets the LastRefreshDate field's value. -func (s *RefreshSchemasStatus) SetLastRefreshDate(v time.Time) *RefreshSchemasStatus { - s.LastRefreshDate = &v - return s -} - -// SetReplicationInstanceArn sets the ReplicationInstanceArn field's value. -func (s *RefreshSchemasStatus) SetReplicationInstanceArn(v string) *RefreshSchemasStatus { - s.ReplicationInstanceArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *RefreshSchemasStatus) SetStatus(v string) *RefreshSchemasStatus { - s.Status = &v - return s -} - -type ReloadTablesInput struct { - _ struct{} `type:"structure"` - - // Options for reload. Specify data-reload to reload the data and re-validate - // it if validation is enabled. Specify validate-only to re-validate the table. - // This option applies only when validation is enabled for the task. - // - // Valid values: data-reload, validate-only - // - // Default value is data-reload. - ReloadOption *string `type:"string" enum:"ReloadOptionValue"` - - // The Amazon Resource Name (ARN) of the replication task. - // - // ReplicationTaskArn is a required field - ReplicationTaskArn *string `type:"string" required:"true"` - - // The name and schema of the table to be reloaded. - // - // TablesToReload is a required field - TablesToReload []*TableToReload `type:"list" required:"true"` -} - -// String returns the string representation -func (s ReloadTablesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReloadTablesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReloadTablesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReloadTablesInput"} - if s.ReplicationTaskArn == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationTaskArn")) - } - if s.TablesToReload == nil { - invalidParams.Add(request.NewErrParamRequired("TablesToReload")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReloadOption sets the ReloadOption field's value. -func (s *ReloadTablesInput) SetReloadOption(v string) *ReloadTablesInput { - s.ReloadOption = &v - return s -} - -// SetReplicationTaskArn sets the ReplicationTaskArn field's value. -func (s *ReloadTablesInput) SetReplicationTaskArn(v string) *ReloadTablesInput { - s.ReplicationTaskArn = &v - return s -} - -// SetTablesToReload sets the TablesToReload field's value. -func (s *ReloadTablesInput) SetTablesToReload(v []*TableToReload) *ReloadTablesInput { - s.TablesToReload = v - return s -} - -type ReloadTablesOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the replication task. - ReplicationTaskArn *string `type:"string"` -} - -// String returns the string representation -func (s ReloadTablesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReloadTablesOutput) GoString() string { - return s.String() -} - -// SetReplicationTaskArn sets the ReplicationTaskArn field's value. -func (s *ReloadTablesOutput) SetReplicationTaskArn(v string) *ReloadTablesOutput { - s.ReplicationTaskArn = &v - return s -} - -type RemoveTagsFromResourceInput struct { - _ struct{} `type:"structure"` - - // >The Amazon Resource Name (ARN) of the AWS DMS resource the tag is to be - // removed from. - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` - - // The tag key (name) of the tag to be removed. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsFromResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *RemoveTagsFromResourceInput) SetResourceArn(v string) *RemoveTagsFromResourceInput { - s.ResourceArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsFromResourceInput) SetTagKeys(v []*string) *RemoveTagsFromResourceInput { - s.TagKeys = v - return s -} - -type RemoveTagsFromResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceOutput) GoString() string { - return s.String() -} - -type ReplicationInstance struct { - _ struct{} `type:"structure"` - - // The amount of storage (in gigabytes) that is allocated for the replication - // instance. - AllocatedStorage *int64 `type:"integer"` - - // Boolean value indicating if minor version upgrades will be automatically - // applied to the instance. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The Availability Zone for the instance. - AvailabilityZone *string `type:"string"` - - // The DNS name servers for the replication instance. - DnsNameServers *string `type:"string"` - - // The engine version number of the replication instance. - EngineVersion *string `type:"string"` - - // The expiration date of the free replication instance that is part of the - // Free DMS program. - FreeUntil *time.Time `type:"timestamp"` - - // The time the replication instance was created. - InstanceCreateTime *time.Time `type:"timestamp"` - - // The AWS KMS key identifier that is used to encrypt the content on the replication - // instance. If you don't specify a value for the KmsKeyId parameter, then AWS - // DMS uses your default encryption key. AWS KMS creates the default encryption - // key for your AWS account. Your AWS account has a different default encryption - // key for each AWS Region. - KmsKeyId *string `type:"string"` - - // Specifies if the replication instance is a Multi-AZ deployment. You cannot - // set the AvailabilityZone parameter if the Multi-AZ parameter is set to true. - MultiAZ *bool `type:"boolean"` - - // The pending modification values. - PendingModifiedValues *ReplicationPendingModifiedValues `type:"structure"` - - // The maintenance window times for the replication instance. - PreferredMaintenanceWindow *string `type:"string"` - - // Specifies the accessibility options for the replication instance. A value - // of true represents an instance with a public IP address. A value of false - // represents an instance with a private IP address. The default value is true. - PubliclyAccessible *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the replication instance. - ReplicationInstanceArn *string `type:"string"` - - // The compute and memory capacity of the replication instance. - // - // Valid Values: dms.t2.micro | dms.t2.small | dms.t2.medium | dms.t2.large - // | dms.c4.large | dms.c4.xlarge | dms.c4.2xlarge | dms.c4.4xlarge - ReplicationInstanceClass *string `type:"string"` - - // The replication instance identifier. This parameter is stored as a lowercase - // string. - // - // Constraints: - // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: myrepinstance - ReplicationInstanceIdentifier *string `type:"string"` - - // The private IP address of the replication instance. - // - // Deprecated: ReplicationInstancePrivateIpAddress has been deprecated - ReplicationInstancePrivateIpAddress *string `deprecated:"true" type:"string"` - - // The private IP address of the replication instance. - ReplicationInstancePrivateIpAddresses []*string `type:"list"` - - // The public IP address of the replication instance. - // - // Deprecated: ReplicationInstancePublicIpAddress has been deprecated - ReplicationInstancePublicIpAddress *string `deprecated:"true" type:"string"` - - // The public IP address of the replication instance. - ReplicationInstancePublicIpAddresses []*string `type:"list"` - - // The status of the replication instance. - ReplicationInstanceStatus *string `type:"string"` - - // The subnet group for the replication instance. - ReplicationSubnetGroup *ReplicationSubnetGroup `type:"structure"` - - // The availability zone of the standby replication instance in a Multi-AZ deployment. - SecondaryAvailabilityZone *string `type:"string"` - - // The VPC security group for the instance. - VpcSecurityGroups []*VpcSecurityGroupMembership `type:"list"` -} - -// String returns the string representation -func (s ReplicationInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplicationInstance) GoString() string { - return s.String() -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *ReplicationInstance) SetAllocatedStorage(v int64) *ReplicationInstance { - s.AllocatedStorage = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *ReplicationInstance) SetAutoMinorVersionUpgrade(v bool) *ReplicationInstance { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ReplicationInstance) SetAvailabilityZone(v string) *ReplicationInstance { - s.AvailabilityZone = &v - return s -} - -// SetDnsNameServers sets the DnsNameServers field's value. -func (s *ReplicationInstance) SetDnsNameServers(v string) *ReplicationInstance { - s.DnsNameServers = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *ReplicationInstance) SetEngineVersion(v string) *ReplicationInstance { - s.EngineVersion = &v - return s -} - -// SetFreeUntil sets the FreeUntil field's value. -func (s *ReplicationInstance) SetFreeUntil(v time.Time) *ReplicationInstance { - s.FreeUntil = &v - return s -} - -// SetInstanceCreateTime sets the InstanceCreateTime field's value. -func (s *ReplicationInstance) SetInstanceCreateTime(v time.Time) *ReplicationInstance { - s.InstanceCreateTime = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *ReplicationInstance) SetKmsKeyId(v string) *ReplicationInstance { - s.KmsKeyId = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *ReplicationInstance) SetMultiAZ(v bool) *ReplicationInstance { - s.MultiAZ = &v - return s -} - -// SetPendingModifiedValues sets the PendingModifiedValues field's value. -func (s *ReplicationInstance) SetPendingModifiedValues(v *ReplicationPendingModifiedValues) *ReplicationInstance { - s.PendingModifiedValues = v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *ReplicationInstance) SetPreferredMaintenanceWindow(v string) *ReplicationInstance { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *ReplicationInstance) SetPubliclyAccessible(v bool) *ReplicationInstance { - s.PubliclyAccessible = &v - return s -} - -// SetReplicationInstanceArn sets the ReplicationInstanceArn field's value. -func (s *ReplicationInstance) SetReplicationInstanceArn(v string) *ReplicationInstance { - s.ReplicationInstanceArn = &v - return s -} - -// SetReplicationInstanceClass sets the ReplicationInstanceClass field's value. -func (s *ReplicationInstance) SetReplicationInstanceClass(v string) *ReplicationInstance { - s.ReplicationInstanceClass = &v - return s -} - -// SetReplicationInstanceIdentifier sets the ReplicationInstanceIdentifier field's value. -func (s *ReplicationInstance) SetReplicationInstanceIdentifier(v string) *ReplicationInstance { - s.ReplicationInstanceIdentifier = &v - return s -} - -// SetReplicationInstancePrivateIpAddress sets the ReplicationInstancePrivateIpAddress field's value. -func (s *ReplicationInstance) SetReplicationInstancePrivateIpAddress(v string) *ReplicationInstance { - s.ReplicationInstancePrivateIpAddress = &v - return s -} - -// SetReplicationInstancePrivateIpAddresses sets the ReplicationInstancePrivateIpAddresses field's value. -func (s *ReplicationInstance) SetReplicationInstancePrivateIpAddresses(v []*string) *ReplicationInstance { - s.ReplicationInstancePrivateIpAddresses = v - return s -} - -// SetReplicationInstancePublicIpAddress sets the ReplicationInstancePublicIpAddress field's value. -func (s *ReplicationInstance) SetReplicationInstancePublicIpAddress(v string) *ReplicationInstance { - s.ReplicationInstancePublicIpAddress = &v - return s -} - -// SetReplicationInstancePublicIpAddresses sets the ReplicationInstancePublicIpAddresses field's value. -func (s *ReplicationInstance) SetReplicationInstancePublicIpAddresses(v []*string) *ReplicationInstance { - s.ReplicationInstancePublicIpAddresses = v - return s -} - -// SetReplicationInstanceStatus sets the ReplicationInstanceStatus field's value. -func (s *ReplicationInstance) SetReplicationInstanceStatus(v string) *ReplicationInstance { - s.ReplicationInstanceStatus = &v - return s -} - -// SetReplicationSubnetGroup sets the ReplicationSubnetGroup field's value. -func (s *ReplicationInstance) SetReplicationSubnetGroup(v *ReplicationSubnetGroup) *ReplicationInstance { - s.ReplicationSubnetGroup = v - return s -} - -// SetSecondaryAvailabilityZone sets the SecondaryAvailabilityZone field's value. -func (s *ReplicationInstance) SetSecondaryAvailabilityZone(v string) *ReplicationInstance { - s.SecondaryAvailabilityZone = &v - return s -} - -// SetVpcSecurityGroups sets the VpcSecurityGroups field's value. -func (s *ReplicationInstance) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *ReplicationInstance { - s.VpcSecurityGroups = v - return s -} - -// Contains metadata for a replication instance task log. -type ReplicationInstanceTaskLog struct { - _ struct{} `type:"structure"` - - // The size, in bytes, of the replication task log. - ReplicationInstanceTaskLogSize *int64 `type:"long"` - - // The Amazon Resource Name (ARN) of the replication task. - ReplicationTaskArn *string `type:"string"` - - // The name of the replication task. - ReplicationTaskName *string `type:"string"` -} - -// String returns the string representation -func (s ReplicationInstanceTaskLog) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplicationInstanceTaskLog) GoString() string { - return s.String() -} - -// SetReplicationInstanceTaskLogSize sets the ReplicationInstanceTaskLogSize field's value. -func (s *ReplicationInstanceTaskLog) SetReplicationInstanceTaskLogSize(v int64) *ReplicationInstanceTaskLog { - s.ReplicationInstanceTaskLogSize = &v - return s -} - -// SetReplicationTaskArn sets the ReplicationTaskArn field's value. -func (s *ReplicationInstanceTaskLog) SetReplicationTaskArn(v string) *ReplicationInstanceTaskLog { - s.ReplicationTaskArn = &v - return s -} - -// SetReplicationTaskName sets the ReplicationTaskName field's value. -func (s *ReplicationInstanceTaskLog) SetReplicationTaskName(v string) *ReplicationInstanceTaskLog { - s.ReplicationTaskName = &v - return s -} - -type ReplicationPendingModifiedValues struct { - _ struct{} `type:"structure"` - - // The amount of storage (in gigabytes) that is allocated for the replication - // instance. - AllocatedStorage *int64 `type:"integer"` - - // The engine version number of the replication instance. - EngineVersion *string `type:"string"` - - // Specifies if the replication instance is a Multi-AZ deployment. You cannot - // set the AvailabilityZone parameter if the Multi-AZ parameter is set to true. - MultiAZ *bool `type:"boolean"` - - // The compute and memory capacity of the replication instance. - // - // Valid Values: dms.t2.micro | dms.t2.small | dms.t2.medium | dms.t2.large - // | dms.c4.large | dms.c4.xlarge | dms.c4.2xlarge | dms.c4.4xlarge - ReplicationInstanceClass *string `type:"string"` -} - -// String returns the string representation -func (s ReplicationPendingModifiedValues) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplicationPendingModifiedValues) GoString() string { - return s.String() -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *ReplicationPendingModifiedValues) SetAllocatedStorage(v int64) *ReplicationPendingModifiedValues { - s.AllocatedStorage = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *ReplicationPendingModifiedValues) SetEngineVersion(v string) *ReplicationPendingModifiedValues { - s.EngineVersion = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *ReplicationPendingModifiedValues) SetMultiAZ(v bool) *ReplicationPendingModifiedValues { - s.MultiAZ = &v - return s -} - -// SetReplicationInstanceClass sets the ReplicationInstanceClass field's value. -func (s *ReplicationPendingModifiedValues) SetReplicationInstanceClass(v string) *ReplicationPendingModifiedValues { - s.ReplicationInstanceClass = &v - return s -} - -type ReplicationSubnetGroup struct { - _ struct{} `type:"structure"` - - // The description of the replication subnet group. - ReplicationSubnetGroupDescription *string `type:"string"` - - // The identifier of the replication instance subnet group. - ReplicationSubnetGroupIdentifier *string `type:"string"` - - // The status of the subnet group. - SubnetGroupStatus *string `type:"string"` - - // The subnets that are in the subnet group. - Subnets []*Subnet `type:"list"` - - // The ID of the VPC. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s ReplicationSubnetGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplicationSubnetGroup) GoString() string { - return s.String() -} - -// SetReplicationSubnetGroupDescription sets the ReplicationSubnetGroupDescription field's value. -func (s *ReplicationSubnetGroup) SetReplicationSubnetGroupDescription(v string) *ReplicationSubnetGroup { - s.ReplicationSubnetGroupDescription = &v - return s -} - -// SetReplicationSubnetGroupIdentifier sets the ReplicationSubnetGroupIdentifier field's value. -func (s *ReplicationSubnetGroup) SetReplicationSubnetGroupIdentifier(v string) *ReplicationSubnetGroup { - s.ReplicationSubnetGroupIdentifier = &v - return s -} - -// SetSubnetGroupStatus sets the SubnetGroupStatus field's value. -func (s *ReplicationSubnetGroup) SetSubnetGroupStatus(v string) *ReplicationSubnetGroup { - s.SubnetGroupStatus = &v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *ReplicationSubnetGroup) SetSubnets(v []*Subnet) *ReplicationSubnetGroup { - s.Subnets = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *ReplicationSubnetGroup) SetVpcId(v string) *ReplicationSubnetGroup { - s.VpcId = &v - return s -} - -type ReplicationTask struct { - _ struct{} `type:"structure"` - - // Indicates when you want a change data capture (CDC) operation to start. Use - // either CdcStartPosition or CdcStartTime to specify when you want a CDC operation - // to start. Specifying both values results in an error. - // - // The value can be in date, checkpoint, or LSN/SCN format. - // - // Date Example: --cdc-start-position “2018-03-08T12:12:12” - // - // Checkpoint Example: --cdc-start-position "checkpoint:V1#27#mysql-bin-changelog.157832:1975:-1:2002:677883278264080:mysql-bin-changelog.157832:1876#0#0#*#0#93" - // - // LSN Example: --cdc-start-position “mysql-bin-changelog.000024:373” - CdcStartPosition *string `type:"string"` - - // Indicates when you want a change data capture (CDC) operation to stop. The - // value can be either server time or commit time. - // - // Server time example: --cdc-stop-position “server_time:3018-02-09T12:12:12” - // - // Commit time example: --cdc-stop-position “commit_time: 3018-02-09T12:12:12 - // “ - CdcStopPosition *string `type:"string"` - - // The last error (failure) message generated for the replication instance. - LastFailureMessage *string `type:"string"` - - // The type of migration. - MigrationType *string `type:"string" enum:"MigrationTypeValue"` - - // Indicates the last checkpoint that occurred during a change data capture - // (CDC) operation. You can provide this value to the CdcStartPosition parameter - // to start a CDC operation that begins at that checkpoint. - RecoveryCheckpoint *string `type:"string"` - - // The Amazon Resource Name (ARN) of the replication instance. - ReplicationInstanceArn *string `type:"string"` - - // The Amazon Resource Name (ARN) of the replication task. - ReplicationTaskArn *string `type:"string"` - - // The date the replication task was created. - ReplicationTaskCreationDate *time.Time `type:"timestamp"` - - // The user-assigned replication task identifier or name. - // - // Constraints: - // - // * Must contain from 1 to 255 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - ReplicationTaskIdentifier *string `type:"string"` - - // The settings for the replication task. - ReplicationTaskSettings *string `type:"string"` - - // The date the replication task is scheduled to start. - ReplicationTaskStartDate *time.Time `type:"timestamp"` - - // The statistics for the task, including elapsed time, tables loaded, and table - // errors. - ReplicationTaskStats *ReplicationTaskStats `type:"structure"` - - // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. - SourceEndpointArn *string `type:"string"` - - // The status of the replication task. - Status *string `type:"string"` - - // The reason the replication task was stopped. - StopReason *string `type:"string"` - - // Table mappings specified in the task. - TableMappings *string `type:"string"` - - // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. - TargetEndpointArn *string `type:"string"` -} - -// String returns the string representation -func (s ReplicationTask) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplicationTask) GoString() string { - return s.String() -} - -// SetCdcStartPosition sets the CdcStartPosition field's value. -func (s *ReplicationTask) SetCdcStartPosition(v string) *ReplicationTask { - s.CdcStartPosition = &v - return s -} - -// SetCdcStopPosition sets the CdcStopPosition field's value. -func (s *ReplicationTask) SetCdcStopPosition(v string) *ReplicationTask { - s.CdcStopPosition = &v - return s -} - -// SetLastFailureMessage sets the LastFailureMessage field's value. -func (s *ReplicationTask) SetLastFailureMessage(v string) *ReplicationTask { - s.LastFailureMessage = &v - return s -} - -// SetMigrationType sets the MigrationType field's value. -func (s *ReplicationTask) SetMigrationType(v string) *ReplicationTask { - s.MigrationType = &v - return s -} - -// SetRecoveryCheckpoint sets the RecoveryCheckpoint field's value. -func (s *ReplicationTask) SetRecoveryCheckpoint(v string) *ReplicationTask { - s.RecoveryCheckpoint = &v - return s -} - -// SetReplicationInstanceArn sets the ReplicationInstanceArn field's value. -func (s *ReplicationTask) SetReplicationInstanceArn(v string) *ReplicationTask { - s.ReplicationInstanceArn = &v - return s -} - -// SetReplicationTaskArn sets the ReplicationTaskArn field's value. -func (s *ReplicationTask) SetReplicationTaskArn(v string) *ReplicationTask { - s.ReplicationTaskArn = &v - return s -} - -// SetReplicationTaskCreationDate sets the ReplicationTaskCreationDate field's value. -func (s *ReplicationTask) SetReplicationTaskCreationDate(v time.Time) *ReplicationTask { - s.ReplicationTaskCreationDate = &v - return s -} - -// SetReplicationTaskIdentifier sets the ReplicationTaskIdentifier field's value. -func (s *ReplicationTask) SetReplicationTaskIdentifier(v string) *ReplicationTask { - s.ReplicationTaskIdentifier = &v - return s -} - -// SetReplicationTaskSettings sets the ReplicationTaskSettings field's value. -func (s *ReplicationTask) SetReplicationTaskSettings(v string) *ReplicationTask { - s.ReplicationTaskSettings = &v - return s -} - -// SetReplicationTaskStartDate sets the ReplicationTaskStartDate field's value. -func (s *ReplicationTask) SetReplicationTaskStartDate(v time.Time) *ReplicationTask { - s.ReplicationTaskStartDate = &v - return s -} - -// SetReplicationTaskStats sets the ReplicationTaskStats field's value. -func (s *ReplicationTask) SetReplicationTaskStats(v *ReplicationTaskStats) *ReplicationTask { - s.ReplicationTaskStats = v - return s -} - -// SetSourceEndpointArn sets the SourceEndpointArn field's value. -func (s *ReplicationTask) SetSourceEndpointArn(v string) *ReplicationTask { - s.SourceEndpointArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ReplicationTask) SetStatus(v string) *ReplicationTask { - s.Status = &v - return s -} - -// SetStopReason sets the StopReason field's value. -func (s *ReplicationTask) SetStopReason(v string) *ReplicationTask { - s.StopReason = &v - return s -} - -// SetTableMappings sets the TableMappings field's value. -func (s *ReplicationTask) SetTableMappings(v string) *ReplicationTask { - s.TableMappings = &v - return s -} - -// SetTargetEndpointArn sets the TargetEndpointArn field's value. -func (s *ReplicationTask) SetTargetEndpointArn(v string) *ReplicationTask { - s.TargetEndpointArn = &v - return s -} - -// The task assessment report in JSON format. -type ReplicationTaskAssessmentResult struct { - _ struct{} `type:"structure"` - - // The task assessment results in JSON format. - AssessmentResults *string `type:"string"` - - // The file containing the results of the task assessment. - AssessmentResultsFile *string `type:"string"` - - // The status of the task assessment. - AssessmentStatus *string `type:"string"` - - // The Amazon Resource Name (ARN) of the replication task. - ReplicationTaskArn *string `type:"string"` - - // The replication task identifier of the task on which the task assessment - // was run. - ReplicationTaskIdentifier *string `type:"string"` - - // The date the task assessment was completed. - ReplicationTaskLastAssessmentDate *time.Time `type:"timestamp"` - - // The URL of the S3 object containing the task assessment results. - S3ObjectUrl *string `type:"string"` -} - -// String returns the string representation -func (s ReplicationTaskAssessmentResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplicationTaskAssessmentResult) GoString() string { - return s.String() -} - -// SetAssessmentResults sets the AssessmentResults field's value. -func (s *ReplicationTaskAssessmentResult) SetAssessmentResults(v string) *ReplicationTaskAssessmentResult { - s.AssessmentResults = &v - return s -} - -// SetAssessmentResultsFile sets the AssessmentResultsFile field's value. -func (s *ReplicationTaskAssessmentResult) SetAssessmentResultsFile(v string) *ReplicationTaskAssessmentResult { - s.AssessmentResultsFile = &v - return s -} - -// SetAssessmentStatus sets the AssessmentStatus field's value. -func (s *ReplicationTaskAssessmentResult) SetAssessmentStatus(v string) *ReplicationTaskAssessmentResult { - s.AssessmentStatus = &v - return s -} - -// SetReplicationTaskArn sets the ReplicationTaskArn field's value. -func (s *ReplicationTaskAssessmentResult) SetReplicationTaskArn(v string) *ReplicationTaskAssessmentResult { - s.ReplicationTaskArn = &v - return s -} - -// SetReplicationTaskIdentifier sets the ReplicationTaskIdentifier field's value. -func (s *ReplicationTaskAssessmentResult) SetReplicationTaskIdentifier(v string) *ReplicationTaskAssessmentResult { - s.ReplicationTaskIdentifier = &v - return s -} - -// SetReplicationTaskLastAssessmentDate sets the ReplicationTaskLastAssessmentDate field's value. -func (s *ReplicationTaskAssessmentResult) SetReplicationTaskLastAssessmentDate(v time.Time) *ReplicationTaskAssessmentResult { - s.ReplicationTaskLastAssessmentDate = &v - return s -} - -// SetS3ObjectUrl sets the S3ObjectUrl field's value. -func (s *ReplicationTaskAssessmentResult) SetS3ObjectUrl(v string) *ReplicationTaskAssessmentResult { - s.S3ObjectUrl = &v - return s -} - -type ReplicationTaskStats struct { - _ struct{} `type:"structure"` - - // The elapsed time of the task, in milliseconds. - ElapsedTimeMillis *int64 `type:"long"` - - // The percent complete for the full load migration task. - FullLoadProgressPercent *int64 `type:"integer"` - - // The number of errors that have occurred during this task. - TablesErrored *int64 `type:"integer"` - - // The number of tables loaded for this task. - TablesLoaded *int64 `type:"integer"` - - // The number of tables currently loading for this task. - TablesLoading *int64 `type:"integer"` - - // The number of tables queued for this task. - TablesQueued *int64 `type:"integer"` -} - -// String returns the string representation -func (s ReplicationTaskStats) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplicationTaskStats) GoString() string { - return s.String() -} - -// SetElapsedTimeMillis sets the ElapsedTimeMillis field's value. -func (s *ReplicationTaskStats) SetElapsedTimeMillis(v int64) *ReplicationTaskStats { - s.ElapsedTimeMillis = &v - return s -} - -// SetFullLoadProgressPercent sets the FullLoadProgressPercent field's value. -func (s *ReplicationTaskStats) SetFullLoadProgressPercent(v int64) *ReplicationTaskStats { - s.FullLoadProgressPercent = &v - return s -} - -// SetTablesErrored sets the TablesErrored field's value. -func (s *ReplicationTaskStats) SetTablesErrored(v int64) *ReplicationTaskStats { - s.TablesErrored = &v - return s -} - -// SetTablesLoaded sets the TablesLoaded field's value. -func (s *ReplicationTaskStats) SetTablesLoaded(v int64) *ReplicationTaskStats { - s.TablesLoaded = &v - return s -} - -// SetTablesLoading sets the TablesLoading field's value. -func (s *ReplicationTaskStats) SetTablesLoading(v int64) *ReplicationTaskStats { - s.TablesLoading = &v - return s -} - -// SetTablesQueued sets the TablesQueued field's value. -func (s *ReplicationTaskStats) SetTablesQueued(v int64) *ReplicationTaskStats { - s.TablesQueued = &v - return s -} - -type S3Settings struct { - _ struct{} `type:"structure"` - - // An optional parameter to set a folder name in the S3 bucket. If provided, - // tables are created in the path ///. - // If this parameter is not specified, then the path used is //. - BucketFolder *string `type:"string"` - - // The name of the S3 bucket. - BucketName *string `type:"string"` - - // An optional parameter to use GZIP to compress the target files. Set to GZIP - // to compress the target files. Set to NONE (the default) or do not use to - // leave the files uncompressed. - CompressionType *string `type:"string" enum:"CompressionTypeValue"` - - // The delimiter used to separate columns in the source files. The default is - // a comma. - CsvDelimiter *string `type:"string"` - - // The delimiter used to separate rows in the source files. The default is a - // carriage return (\n). - CsvRowDelimiter *string `type:"string"` - - // The external table definition. - ExternalTableDefinition *string `type:"string"` - - // The Amazon Resource Name (ARN) used by the service access IAM role. - ServiceAccessRoleArn *string `type:"string"` -} - -// String returns the string representation -func (s S3Settings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Settings) GoString() string { - return s.String() -} - -// SetBucketFolder sets the BucketFolder field's value. -func (s *S3Settings) SetBucketFolder(v string) *S3Settings { - s.BucketFolder = &v - return s -} - -// SetBucketName sets the BucketName field's value. -func (s *S3Settings) SetBucketName(v string) *S3Settings { - s.BucketName = &v - return s -} - -// SetCompressionType sets the CompressionType field's value. -func (s *S3Settings) SetCompressionType(v string) *S3Settings { - s.CompressionType = &v - return s -} - -// SetCsvDelimiter sets the CsvDelimiter field's value. -func (s *S3Settings) SetCsvDelimiter(v string) *S3Settings { - s.CsvDelimiter = &v - return s -} - -// SetCsvRowDelimiter sets the CsvRowDelimiter field's value. -func (s *S3Settings) SetCsvRowDelimiter(v string) *S3Settings { - s.CsvRowDelimiter = &v - return s -} - -// SetExternalTableDefinition sets the ExternalTableDefinition field's value. -func (s *S3Settings) SetExternalTableDefinition(v string) *S3Settings { - s.ExternalTableDefinition = &v - return s -} - -// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. -func (s *S3Settings) SetServiceAccessRoleArn(v string) *S3Settings { - s.ServiceAccessRoleArn = &v - return s -} - -type StartReplicationTaskAssessmentInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the replication task. - // - // ReplicationTaskArn is a required field - ReplicationTaskArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StartReplicationTaskAssessmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartReplicationTaskAssessmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartReplicationTaskAssessmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartReplicationTaskAssessmentInput"} - if s.ReplicationTaskArn == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationTaskArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReplicationTaskArn sets the ReplicationTaskArn field's value. -func (s *StartReplicationTaskAssessmentInput) SetReplicationTaskArn(v string) *StartReplicationTaskAssessmentInput { - s.ReplicationTaskArn = &v - return s -} - -type StartReplicationTaskAssessmentOutput struct { - _ struct{} `type:"structure"` - - // The assessed replication task. - ReplicationTask *ReplicationTask `type:"structure"` -} - -// String returns the string representation -func (s StartReplicationTaskAssessmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartReplicationTaskAssessmentOutput) GoString() string { - return s.String() -} - -// SetReplicationTask sets the ReplicationTask field's value. -func (s *StartReplicationTaskAssessmentOutput) SetReplicationTask(v *ReplicationTask) *StartReplicationTaskAssessmentOutput { - s.ReplicationTask = v - return s -} - -type StartReplicationTaskInput struct { - _ struct{} `type:"structure"` - - // Indicates when you want a change data capture (CDC) operation to start. Use - // either CdcStartPosition or CdcStartTime to specify when you want a CDC operation - // to start. Specifying both values results in an error. - // - // The value can be in date, checkpoint, or LSN/SCN format. - // - // Date Example: --cdc-start-position “2018-03-08T12:12:12” - // - // Checkpoint Example: --cdc-start-position "checkpoint:V1#27#mysql-bin-changelog.157832:1975:-1:2002:677883278264080:mysql-bin-changelog.157832:1876#0#0#*#0#93" - // - // LSN Example: --cdc-start-position “mysql-bin-changelog.000024:373” - CdcStartPosition *string `type:"string"` - - // Indicates the start time for a change data capture (CDC) operation. Use either - // CdcStartTime or CdcStartPosition to specify when you want a CDC operation - // to start. Specifying both values results in an error. - // - // Timestamp Example: --cdc-start-time “2018-03-08T12:12:12” - CdcStartTime *time.Time `type:"timestamp"` - - // Indicates when you want a change data capture (CDC) operation to stop. The - // value can be either server time or commit time. - // - // Server time example: --cdc-stop-position “server_time:3018-02-09T12:12:12” - // - // Commit time example: --cdc-stop-position “commit_time: 3018-02-09T12:12:12 - // “ - CdcStopPosition *string `type:"string"` - - // The Amazon Resource Name (ARN) of the replication task to be started. - // - // ReplicationTaskArn is a required field - ReplicationTaskArn *string `type:"string" required:"true"` - - // The type of replication task. - // - // StartReplicationTaskType is a required field - StartReplicationTaskType *string `type:"string" required:"true" enum:"StartReplicationTaskTypeValue"` -} - -// String returns the string representation -func (s StartReplicationTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartReplicationTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartReplicationTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartReplicationTaskInput"} - if s.ReplicationTaskArn == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationTaskArn")) - } - if s.StartReplicationTaskType == nil { - invalidParams.Add(request.NewErrParamRequired("StartReplicationTaskType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCdcStartPosition sets the CdcStartPosition field's value. -func (s *StartReplicationTaskInput) SetCdcStartPosition(v string) *StartReplicationTaskInput { - s.CdcStartPosition = &v - return s -} - -// SetCdcStartTime sets the CdcStartTime field's value. -func (s *StartReplicationTaskInput) SetCdcStartTime(v time.Time) *StartReplicationTaskInput { - s.CdcStartTime = &v - return s -} - -// SetCdcStopPosition sets the CdcStopPosition field's value. -func (s *StartReplicationTaskInput) SetCdcStopPosition(v string) *StartReplicationTaskInput { - s.CdcStopPosition = &v - return s -} - -// SetReplicationTaskArn sets the ReplicationTaskArn field's value. -func (s *StartReplicationTaskInput) SetReplicationTaskArn(v string) *StartReplicationTaskInput { - s.ReplicationTaskArn = &v - return s -} - -// SetStartReplicationTaskType sets the StartReplicationTaskType field's value. -func (s *StartReplicationTaskInput) SetStartReplicationTaskType(v string) *StartReplicationTaskInput { - s.StartReplicationTaskType = &v - return s -} - -type StartReplicationTaskOutput struct { - _ struct{} `type:"structure"` - - // The replication task started. - ReplicationTask *ReplicationTask `type:"structure"` -} - -// String returns the string representation -func (s StartReplicationTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartReplicationTaskOutput) GoString() string { - return s.String() -} - -// SetReplicationTask sets the ReplicationTask field's value. -func (s *StartReplicationTaskOutput) SetReplicationTask(v *ReplicationTask) *StartReplicationTaskOutput { - s.ReplicationTask = v - return s -} - -type StopReplicationTaskInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name(ARN) of the replication task to be stopped. - // - // ReplicationTaskArn is a required field - ReplicationTaskArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StopReplicationTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopReplicationTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopReplicationTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopReplicationTaskInput"} - if s.ReplicationTaskArn == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationTaskArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReplicationTaskArn sets the ReplicationTaskArn field's value. -func (s *StopReplicationTaskInput) SetReplicationTaskArn(v string) *StopReplicationTaskInput { - s.ReplicationTaskArn = &v - return s -} - -type StopReplicationTaskOutput struct { - _ struct{} `type:"structure"` - - // The replication task stopped. - ReplicationTask *ReplicationTask `type:"structure"` -} - -// String returns the string representation -func (s StopReplicationTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopReplicationTaskOutput) GoString() string { - return s.String() -} - -// SetReplicationTask sets the ReplicationTask field's value. -func (s *StopReplicationTaskOutput) SetReplicationTask(v *ReplicationTask) *StopReplicationTaskOutput { - s.ReplicationTask = v - return s -} - -type Subnet struct { - _ struct{} `type:"structure"` - - // The Availability Zone of the subnet. - SubnetAvailabilityZone *AvailabilityZone `type:"structure"` - - // The subnet identifier. - SubnetIdentifier *string `type:"string"` - - // The status of the subnet. - SubnetStatus *string `type:"string"` -} - -// String returns the string representation -func (s Subnet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Subnet) GoString() string { - return s.String() -} - -// SetSubnetAvailabilityZone sets the SubnetAvailabilityZone field's value. -func (s *Subnet) SetSubnetAvailabilityZone(v *AvailabilityZone) *Subnet { - s.SubnetAvailabilityZone = v - return s -} - -// SetSubnetIdentifier sets the SubnetIdentifier field's value. -func (s *Subnet) SetSubnetIdentifier(v string) *Subnet { - s.SubnetIdentifier = &v - return s -} - -// SetSubnetStatus sets the SubnetStatus field's value. -func (s *Subnet) SetSubnetStatus(v string) *Subnet { - s.SubnetStatus = &v - return s -} - -type SupportedEndpointType struct { - _ struct{} `type:"structure"` - - // The type of endpoint. - EndpointType *string `type:"string" enum:"ReplicationEndpointTypeValue"` - - // The expanded name for the engine name. For example, if the EngineName parameter - // is "aurora," this value would be "Amazon Aurora MySQL." - EngineDisplayName *string `type:"string"` - - // The database engine name. Valid values, depending on the EndPointType, include - // mysql, oracle, postgres, mariadb, aurora, aurora-postgresql, redshift, s3, - // db2, azuredb, sybase, sybase, dynamodb, mongodb, and sqlserver. - EngineName *string `type:"string"` - - // Indicates if Change Data Capture (CDC) is supported. - SupportsCDC *bool `type:"boolean"` -} - -// String returns the string representation -func (s SupportedEndpointType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SupportedEndpointType) GoString() string { - return s.String() -} - -// SetEndpointType sets the EndpointType field's value. -func (s *SupportedEndpointType) SetEndpointType(v string) *SupportedEndpointType { - s.EndpointType = &v - return s -} - -// SetEngineDisplayName sets the EngineDisplayName field's value. -func (s *SupportedEndpointType) SetEngineDisplayName(v string) *SupportedEndpointType { - s.EngineDisplayName = &v - return s -} - -// SetEngineName sets the EngineName field's value. -func (s *SupportedEndpointType) SetEngineName(v string) *SupportedEndpointType { - s.EngineName = &v - return s -} - -// SetSupportsCDC sets the SupportsCDC field's value. -func (s *SupportedEndpointType) SetSupportsCDC(v bool) *SupportedEndpointType { - s.SupportsCDC = &v - return s -} - -type TableStatistics struct { - _ struct{} `type:"structure"` - - // The Data Definition Language (DDL) used to build and modify the structure - // of your tables. - Ddls *int64 `type:"long"` - - // The number of delete actions performed on a table. - Deletes *int64 `type:"long"` - - // The number of rows that failed conditional checks during the Full Load operation - // (valid only for DynamoDB as a target migrations). - FullLoadCondtnlChkFailedRows *int64 `type:"long"` - - // The number of rows that failed to load during the Full Load operation (valid - // only for DynamoDB as a target migrations). - FullLoadErrorRows *int64 `type:"long"` - - // The number of rows added during the Full Load operation. - FullLoadRows *int64 `type:"long"` - - // The number of insert actions performed on a table. - Inserts *int64 `type:"long"` - - // The last time the table was updated. - LastUpdateTime *time.Time `type:"timestamp"` - - // The schema name. - SchemaName *string `type:"string"` - - // The name of the table. - TableName *string `type:"string"` - - // The state of the tables described. - // - // Valid states: Table does not exist | Before load | Full load | Table completed - // | Table cancelled | Table error | Table all | Table updates | Table is being - // reloaded - TableState *string `type:"string"` - - // The number of update actions performed on a table. - Updates *int64 `type:"long"` - - // The number of records that failed validation. - ValidationFailedRecords *int64 `type:"long"` - - // The number of records that have yet to be validated. - ValidationPendingRecords *int64 `type:"long"` - - // The validation state of the table. - // - // The parameter can have the following values - // - // * Not enabled—Validation is not enabled for the table in the migration - // task. - // - // * Pending records—Some records in the table are waiting for validation. - // - // * Mismatched records—Some records in the table do not match between the - // source and target. - // - // * Suspended records—Some records in the table could not be validated. - // - // * No primary key—The table could not be validated because it had no primary - // key. - // - // * Table error—The table was not validated because it was in an error state - // and some data was not migrated. - // - // * Validated—All rows in the table were validated. If the table is updated, - // the status can change from Validated. - // - // * Error—The table could not be validated because of an unexpected error. - ValidationState *string `type:"string"` - - // Additional details about the state of validation. - ValidationStateDetails *string `type:"string"` - - // The number of records that could not be validated. - ValidationSuspendedRecords *int64 `type:"long"` -} - -// String returns the string representation -func (s TableStatistics) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TableStatistics) GoString() string { - return s.String() -} - -// SetDdls sets the Ddls field's value. -func (s *TableStatistics) SetDdls(v int64) *TableStatistics { - s.Ddls = &v - return s -} - -// SetDeletes sets the Deletes field's value. -func (s *TableStatistics) SetDeletes(v int64) *TableStatistics { - s.Deletes = &v - return s -} - -// SetFullLoadCondtnlChkFailedRows sets the FullLoadCondtnlChkFailedRows field's value. -func (s *TableStatistics) SetFullLoadCondtnlChkFailedRows(v int64) *TableStatistics { - s.FullLoadCondtnlChkFailedRows = &v - return s -} - -// SetFullLoadErrorRows sets the FullLoadErrorRows field's value. -func (s *TableStatistics) SetFullLoadErrorRows(v int64) *TableStatistics { - s.FullLoadErrorRows = &v - return s -} - -// SetFullLoadRows sets the FullLoadRows field's value. -func (s *TableStatistics) SetFullLoadRows(v int64) *TableStatistics { - s.FullLoadRows = &v - return s -} - -// SetInserts sets the Inserts field's value. -func (s *TableStatistics) SetInserts(v int64) *TableStatistics { - s.Inserts = &v - return s -} - -// SetLastUpdateTime sets the LastUpdateTime field's value. -func (s *TableStatistics) SetLastUpdateTime(v time.Time) *TableStatistics { - s.LastUpdateTime = &v - return s -} - -// SetSchemaName sets the SchemaName field's value. -func (s *TableStatistics) SetSchemaName(v string) *TableStatistics { - s.SchemaName = &v - return s -} - -// SetTableName sets the TableName field's value. -func (s *TableStatistics) SetTableName(v string) *TableStatistics { - s.TableName = &v - return s -} - -// SetTableState sets the TableState field's value. -func (s *TableStatistics) SetTableState(v string) *TableStatistics { - s.TableState = &v - return s -} - -// SetUpdates sets the Updates field's value. -func (s *TableStatistics) SetUpdates(v int64) *TableStatistics { - s.Updates = &v - return s -} - -// SetValidationFailedRecords sets the ValidationFailedRecords field's value. -func (s *TableStatistics) SetValidationFailedRecords(v int64) *TableStatistics { - s.ValidationFailedRecords = &v - return s -} - -// SetValidationPendingRecords sets the ValidationPendingRecords field's value. -func (s *TableStatistics) SetValidationPendingRecords(v int64) *TableStatistics { - s.ValidationPendingRecords = &v - return s -} - -// SetValidationState sets the ValidationState field's value. -func (s *TableStatistics) SetValidationState(v string) *TableStatistics { - s.ValidationState = &v - return s -} - -// SetValidationStateDetails sets the ValidationStateDetails field's value. -func (s *TableStatistics) SetValidationStateDetails(v string) *TableStatistics { - s.ValidationStateDetails = &v - return s -} - -// SetValidationSuspendedRecords sets the ValidationSuspendedRecords field's value. -func (s *TableStatistics) SetValidationSuspendedRecords(v int64) *TableStatistics { - s.ValidationSuspendedRecords = &v - return s -} - -type TableToReload struct { - _ struct{} `type:"structure"` - - // The schema name of the table to be reloaded. - SchemaName *string `type:"string"` - - // The table name of the table to be reloaded. - TableName *string `type:"string"` -} - -// String returns the string representation -func (s TableToReload) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TableToReload) GoString() string { - return s.String() -} - -// SetSchemaName sets the SchemaName field's value. -func (s *TableToReload) SetSchemaName(v string) *TableToReload { - s.SchemaName = &v - return s -} - -// SetTableName sets the TableName field's value. -func (s *TableToReload) SetTableName(v string) *TableToReload { - s.TableName = &v - return s -} - -type Tag struct { - _ struct{} `type:"structure"` - - // A key is the required name of the tag. The string value can be from 1 to - // 128 Unicode characters in length and cannot be prefixed with "aws:" or "dms:". - // The string can only contain only the set of Unicode letters, digits, white-space, - // '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). - Key *string `type:"string"` - - // A value is the optional value of the tag. The string value can be from 1 - // to 256 Unicode characters in length and cannot be prefixed with "aws:" or - // "dms:". The string can only contain only the set of Unicode letters, digits, - // white-space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TestConnectionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. - // - // EndpointArn is a required field - EndpointArn *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the replication instance. - // - // ReplicationInstanceArn is a required field - ReplicationInstanceArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s TestConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TestConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TestConnectionInput"} - if s.EndpointArn == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointArn")) - } - if s.ReplicationInstanceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationInstanceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *TestConnectionInput) SetEndpointArn(v string) *TestConnectionInput { - s.EndpointArn = &v - return s -} - -// SetReplicationInstanceArn sets the ReplicationInstanceArn field's value. -func (s *TestConnectionInput) SetReplicationInstanceArn(v string) *TestConnectionInput { - s.ReplicationInstanceArn = &v - return s -} - -type TestConnectionOutput struct { - _ struct{} `type:"structure"` - - // The connection tested. - Connection *Connection `type:"structure"` -} - -// String returns the string representation -func (s TestConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestConnectionOutput) GoString() string { - return s.String() -} - -// SetConnection sets the Connection field's value. -func (s *TestConnectionOutput) SetConnection(v *Connection) *TestConnectionOutput { - s.Connection = v - return s -} - -type VpcSecurityGroupMembership struct { - _ struct{} `type:"structure"` - - // The status of the VPC security group. - Status *string `type:"string"` - - // The VPC security group Id. - VpcSecurityGroupId *string `type:"string"` -} - -// String returns the string representation -func (s VpcSecurityGroupMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcSecurityGroupMembership) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *VpcSecurityGroupMembership) SetStatus(v string) *VpcSecurityGroupMembership { - s.Status = &v - return s -} - -// SetVpcSecurityGroupId sets the VpcSecurityGroupId field's value. -func (s *VpcSecurityGroupMembership) SetVpcSecurityGroupId(v string) *VpcSecurityGroupMembership { - s.VpcSecurityGroupId = &v - return s -} - -const ( - // AuthMechanismValueDefault is a AuthMechanismValue enum value - AuthMechanismValueDefault = "default" - - // AuthMechanismValueMongodbCr is a AuthMechanismValue enum value - AuthMechanismValueMongodbCr = "mongodb_cr" - - // AuthMechanismValueScramSha1 is a AuthMechanismValue enum value - AuthMechanismValueScramSha1 = "scram_sha_1" -) - -const ( - // AuthTypeValueNo is a AuthTypeValue enum value - AuthTypeValueNo = "no" - - // AuthTypeValuePassword is a AuthTypeValue enum value - AuthTypeValuePassword = "password" -) - -const ( - // CompressionTypeValueNone is a CompressionTypeValue enum value - CompressionTypeValueNone = "none" - - // CompressionTypeValueGzip is a CompressionTypeValue enum value - CompressionTypeValueGzip = "gzip" -) - -const ( - // DmsSslModeValueNone is a DmsSslModeValue enum value - DmsSslModeValueNone = "none" - - // DmsSslModeValueRequire is a DmsSslModeValue enum value - DmsSslModeValueRequire = "require" - - // DmsSslModeValueVerifyCa is a DmsSslModeValue enum value - DmsSslModeValueVerifyCa = "verify-ca" - - // DmsSslModeValueVerifyFull is a DmsSslModeValue enum value - DmsSslModeValueVerifyFull = "verify-full" -) - -const ( - // MessageFormatValueJson is a MessageFormatValue enum value - MessageFormatValueJson = "json" -) - -const ( - // MigrationTypeValueFullLoad is a MigrationTypeValue enum value - MigrationTypeValueFullLoad = "full-load" - - // MigrationTypeValueCdc is a MigrationTypeValue enum value - MigrationTypeValueCdc = "cdc" - - // MigrationTypeValueFullLoadAndCdc is a MigrationTypeValue enum value - MigrationTypeValueFullLoadAndCdc = "full-load-and-cdc" -) - -const ( - // NestingLevelValueNone is a NestingLevelValue enum value - NestingLevelValueNone = "none" - - // NestingLevelValueOne is a NestingLevelValue enum value - NestingLevelValueOne = "one" -) - -const ( - // RefreshSchemasStatusTypeValueSuccessful is a RefreshSchemasStatusTypeValue enum value - RefreshSchemasStatusTypeValueSuccessful = "successful" - - // RefreshSchemasStatusTypeValueFailed is a RefreshSchemasStatusTypeValue enum value - RefreshSchemasStatusTypeValueFailed = "failed" - - // RefreshSchemasStatusTypeValueRefreshing is a RefreshSchemasStatusTypeValue enum value - RefreshSchemasStatusTypeValueRefreshing = "refreshing" -) - -const ( - // ReloadOptionValueDataReload is a ReloadOptionValue enum value - ReloadOptionValueDataReload = "data-reload" - - // ReloadOptionValueValidateOnly is a ReloadOptionValue enum value - ReloadOptionValueValidateOnly = "validate-only" -) - -const ( - // ReplicationEndpointTypeValueSource is a ReplicationEndpointTypeValue enum value - ReplicationEndpointTypeValueSource = "source" - - // ReplicationEndpointTypeValueTarget is a ReplicationEndpointTypeValue enum value - ReplicationEndpointTypeValueTarget = "target" -) - -const ( - // SourceTypeReplicationInstance is a SourceType enum value - SourceTypeReplicationInstance = "replication-instance" -) - -const ( - // StartReplicationTaskTypeValueStartReplication is a StartReplicationTaskTypeValue enum value - StartReplicationTaskTypeValueStartReplication = "start-replication" - - // StartReplicationTaskTypeValueResumeProcessing is a StartReplicationTaskTypeValue enum value - StartReplicationTaskTypeValueResumeProcessing = "resume-processing" - - // StartReplicationTaskTypeValueReloadTarget is a StartReplicationTaskTypeValue enum value - StartReplicationTaskTypeValueReloadTarget = "reload-target" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/doc.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/doc.go deleted file mode 100644 index 9820993c6..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/doc.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package databasemigrationservice provides the client and types for making API -// requests to AWS Database Migration Service. -// -// AWS Database Migration Service (AWS DMS) can migrate your data to and from -// the most widely used commercial and open-source databases such as Oracle, -// PostgreSQL, Microsoft SQL Server, Amazon Redshift, MariaDB, Amazon Aurora, -// MySQL, and SAP Adaptive Server Enterprise (ASE). The service supports homogeneous -// migrations such as Oracle to Oracle, as well as heterogeneous migrations -// between different database platforms, such as Oracle to MySQL or SQL Server -// to PostgreSQL. -// -// For more information about AWS DMS, see What Is AWS Database Migration Service? -// (http://docs.aws.amazon.com/dms/latest/userguide/Welcome.html) in the AWS -// Database Migration User Guide. -// -// See https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01 for more information on this service. -// -// See databasemigrationservice package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/databasemigrationservice/ -// -// Using the Client -// -// To contact AWS Database Migration Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS Database Migration Service client DatabaseMigrationService for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/databasemigrationservice/#New -package databasemigrationservice diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/errors.go deleted file mode 100644 index 9bb02f3a9..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/errors.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package databasemigrationservice - -const ( - - // ErrCodeAccessDeniedFault for service response error code - // "AccessDeniedFault". - // - // AWS DMS was denied access to the endpoint. - ErrCodeAccessDeniedFault = "AccessDeniedFault" - - // ErrCodeInsufficientResourceCapacityFault for service response error code - // "InsufficientResourceCapacityFault". - // - // There are not enough resources allocated to the database migration. - ErrCodeInsufficientResourceCapacityFault = "InsufficientResourceCapacityFault" - - // ErrCodeInvalidCertificateFault for service response error code - // "InvalidCertificateFault". - // - // The certificate was not valid. - ErrCodeInvalidCertificateFault = "InvalidCertificateFault" - - // ErrCodeInvalidResourceStateFault for service response error code - // "InvalidResourceStateFault". - // - // The resource is in a state that prevents it from being used for database - // migration. - ErrCodeInvalidResourceStateFault = "InvalidResourceStateFault" - - // ErrCodeInvalidSubnet for service response error code - // "InvalidSubnet". - // - // The subnet provided is invalid. - ErrCodeInvalidSubnet = "InvalidSubnet" - - // ErrCodeKMSKeyNotAccessibleFault for service response error code - // "KMSKeyNotAccessibleFault". - // - // AWS DMS cannot access the KMS key. - ErrCodeKMSKeyNotAccessibleFault = "KMSKeyNotAccessibleFault" - - // ErrCodeReplicationSubnetGroupDoesNotCoverEnoughAZs for service response error code - // "ReplicationSubnetGroupDoesNotCoverEnoughAZs". - // - // The replication subnet group does not cover enough Availability Zones (AZs). - // Edit the replication subnet group and add more AZs. - ErrCodeReplicationSubnetGroupDoesNotCoverEnoughAZs = "ReplicationSubnetGroupDoesNotCoverEnoughAZs" - - // ErrCodeResourceAlreadyExistsFault for service response error code - // "ResourceAlreadyExistsFault". - // - // The resource you are attempting to create already exists. - ErrCodeResourceAlreadyExistsFault = "ResourceAlreadyExistsFault" - - // ErrCodeResourceNotFoundFault for service response error code - // "ResourceNotFoundFault". - // - // The resource could not be found. - ErrCodeResourceNotFoundFault = "ResourceNotFoundFault" - - // ErrCodeResourceQuotaExceededFault for service response error code - // "ResourceQuotaExceededFault". - // - // The quota for this resource quota has been exceeded. - ErrCodeResourceQuotaExceededFault = "ResourceQuotaExceededFault" - - // ErrCodeSNSInvalidTopicFault for service response error code - // "SNSInvalidTopicFault". - // - // The SNS topic is invalid. - ErrCodeSNSInvalidTopicFault = "SNSInvalidTopicFault" - - // ErrCodeSNSNoAuthorizationFault for service response error code - // "SNSNoAuthorizationFault". - // - // You are not authorized for the SNS subscription. - ErrCodeSNSNoAuthorizationFault = "SNSNoAuthorizationFault" - - // ErrCodeStorageQuotaExceededFault for service response error code - // "StorageQuotaExceededFault". - // - // The storage quota has been exceeded. - ErrCodeStorageQuotaExceededFault = "StorageQuotaExceededFault" - - // ErrCodeSubnetAlreadyInUse for service response error code - // "SubnetAlreadyInUse". - // - // The specified subnet is already in use. - ErrCodeSubnetAlreadyInUse = "SubnetAlreadyInUse" - - // ErrCodeUpgradeDependencyFailureFault for service response error code - // "UpgradeDependencyFailureFault". - // - // An upgrade dependency is preventing the database migration. - ErrCodeUpgradeDependencyFailureFault = "UpgradeDependencyFailureFault" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/service.go deleted file mode 100644 index 8ee775e03..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package databasemigrationservice - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// DatabaseMigrationService provides the API operation methods for making requests to -// AWS Database Migration Service. See this package's package overview docs -// for details on the service. -// -// DatabaseMigrationService methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type DatabaseMigrationService 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 = "dms" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Database Migration Service" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the DatabaseMigrationService client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a DatabaseMigrationService client from just a session. -// svc := databasemigrationservice.New(mySession) -// -// // Create a DatabaseMigrationService client with additional configuration -// svc := databasemigrationservice.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *DatabaseMigrationService { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DatabaseMigrationService { - svc := &DatabaseMigrationService{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2016-01-01", - JSONVersion: "1.1", - TargetPrefix: "AmazonDMSv20160101", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a DatabaseMigrationService operation and runs any -// custom request initialization. -func (c *DatabaseMigrationService) 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/databasemigrationservice/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/waiters.go deleted file mode 100644 index d034d3f65..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/waiters.go +++ /dev/null @@ -1,563 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package databasemigrationservice - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilEndpointDeleted uses the AWS Database Migration Service API operation -// DescribeEndpoints to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *DatabaseMigrationService) WaitUntilEndpointDeleted(input *DescribeEndpointsInput) error { - return c.WaitUntilEndpointDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilEndpointDeletedWithContext is an extended version of WaitUntilEndpointDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) WaitUntilEndpointDeletedWithContext(ctx aws.Context, input *DescribeEndpointsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilEndpointDeleted", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(5 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ResourceNotFoundFault", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Endpoints[].Status", - Expected: "active", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Endpoints[].Status", - Expected: "creating", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeEndpointsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEndpointsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilReplicationInstanceAvailable uses the AWS Database Migration Service API operation -// DescribeReplicationInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *DatabaseMigrationService) WaitUntilReplicationInstanceAvailable(input *DescribeReplicationInstancesInput) error { - return c.WaitUntilReplicationInstanceAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilReplicationInstanceAvailableWithContext is an extended version of WaitUntilReplicationInstanceAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) WaitUntilReplicationInstanceAvailableWithContext(ctx aws.Context, input *DescribeReplicationInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilReplicationInstanceAvailable", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(60 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus", - Expected: "deleting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus", - Expected: "incompatible-credentials", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus", - Expected: "incompatible-network", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus", - Expected: "inaccessible-encryption-credentials", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeReplicationInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilReplicationInstanceDeleted uses the AWS Database Migration Service API operation -// DescribeReplicationInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *DatabaseMigrationService) WaitUntilReplicationInstanceDeleted(input *DescribeReplicationInstancesInput) error { - return c.WaitUntilReplicationInstanceDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilReplicationInstanceDeletedWithContext is an extended version of WaitUntilReplicationInstanceDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) WaitUntilReplicationInstanceDeletedWithContext(ctx aws.Context, input *DescribeReplicationInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilReplicationInstanceDeleted", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus", - Expected: "available", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ResourceNotFoundFault", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeReplicationInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilReplicationTaskDeleted uses the AWS Database Migration Service API operation -// DescribeReplicationTasks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *DatabaseMigrationService) WaitUntilReplicationTaskDeleted(input *DescribeReplicationTasksInput) error { - return c.WaitUntilReplicationTaskDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilReplicationTaskDeletedWithContext is an extended version of WaitUntilReplicationTaskDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) WaitUntilReplicationTaskDeletedWithContext(ctx aws.Context, input *DescribeReplicationTasksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilReplicationTaskDeleted", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "ready", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "creating", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "stopped", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "running", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "failed", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ResourceNotFoundFault", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeReplicationTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilReplicationTaskReady uses the AWS Database Migration Service API operation -// DescribeReplicationTasks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *DatabaseMigrationService) WaitUntilReplicationTaskReady(input *DescribeReplicationTasksInput) error { - return c.WaitUntilReplicationTaskReadyWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilReplicationTaskReadyWithContext is an extended version of WaitUntilReplicationTaskReady. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) WaitUntilReplicationTaskReadyWithContext(ctx aws.Context, input *DescribeReplicationTasksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilReplicationTaskReady", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "ready", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "starting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "running", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "stopping", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "stopped", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "modifying", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "testing", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "deleting", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeReplicationTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilReplicationTaskRunning uses the AWS Database Migration Service API operation -// DescribeReplicationTasks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *DatabaseMigrationService) WaitUntilReplicationTaskRunning(input *DescribeReplicationTasksInput) error { - return c.WaitUntilReplicationTaskRunningWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilReplicationTaskRunningWithContext is an extended version of WaitUntilReplicationTaskRunning. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) WaitUntilReplicationTaskRunningWithContext(ctx aws.Context, input *DescribeReplicationTasksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilReplicationTaskRunning", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "running", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "ready", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "creating", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "stopping", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "stopped", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "modifying", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "testing", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "deleting", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeReplicationTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilReplicationTaskStopped uses the AWS Database Migration Service API operation -// DescribeReplicationTasks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *DatabaseMigrationService) WaitUntilReplicationTaskStopped(input *DescribeReplicationTasksInput) error { - return c.WaitUntilReplicationTaskStoppedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilReplicationTaskStoppedWithContext is an extended version of WaitUntilReplicationTaskStopped. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) WaitUntilReplicationTaskStoppedWithContext(ctx aws.Context, input *DescribeReplicationTasksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilReplicationTaskStopped", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "stopped", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "ready", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "creating", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "starting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "running", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "modifying", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "testing", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", - Expected: "deleting", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeReplicationTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilTestConnectionSucceeds uses the AWS Database Migration Service API operation -// DescribeConnections to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *DatabaseMigrationService) WaitUntilTestConnectionSucceeds(input *DescribeConnectionsInput) error { - return c.WaitUntilTestConnectionSucceedsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilTestConnectionSucceedsWithContext is an extended version of WaitUntilTestConnectionSucceeds. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DatabaseMigrationService) WaitUntilTestConnectionSucceedsWithContext(ctx aws.Context, input *DescribeConnectionsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilTestConnectionSucceeds", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(5 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Connections[].Status", - Expected: "successful", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Connections[].Status", - Expected: "failed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeConnectionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeConnectionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go deleted file mode 100644 index 1dac23346..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go +++ /dev/null @@ -1,4663 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package datapipeline - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opActivatePipeline = "ActivatePipeline" - -// ActivatePipelineRequest generates a "aws/request.Request" representing the -// client's request for the ActivatePipeline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ActivatePipeline for more information on using the ActivatePipeline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ActivatePipelineRequest method. -// req, resp := client.ActivatePipelineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ActivatePipeline -func (c *DataPipeline) ActivatePipelineRequest(input *ActivatePipelineInput) (req *request.Request, output *ActivatePipelineOutput) { - op := &request.Operation{ - Name: opActivatePipeline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ActivatePipelineInput{} - } - - output = &ActivatePipelineOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ActivatePipeline API operation for AWS Data Pipeline. -// -// Validates the specified pipeline and starts processing pipeline tasks. If -// the pipeline does not pass validation, activation fails. -// -// If you need to pause the pipeline to investigate an issue with a component, -// such as a data source or script, call DeactivatePipeline. -// -// To activate a finished pipeline, modify the end date for the pipeline and -// then activate 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 Data Pipeline's -// API operation ActivatePipeline for usage and error information. -// -// Returned Error Codes: -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodePipelineDeletedException "PipelineDeletedException" -// The specified pipeline has been deleted. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ActivatePipeline -func (c *DataPipeline) ActivatePipeline(input *ActivatePipelineInput) (*ActivatePipelineOutput, error) { - req, out := c.ActivatePipelineRequest(input) - return out, req.Send() -} - -// ActivatePipelineWithContext is the same as ActivatePipeline with the addition of -// the ability to pass a context and additional request options. -// -// See ActivatePipeline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) ActivatePipelineWithContext(ctx aws.Context, input *ActivatePipelineInput, opts ...request.Option) (*ActivatePipelineOutput, error) { - req, out := c.ActivatePipelineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddTags = "AddTags" - -// AddTagsRequest generates a "aws/request.Request" representing the -// client's request for the AddTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTags for more information on using the AddTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsRequest method. -// req, resp := client.AddTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/AddTags -func (c *DataPipeline) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) { - op := &request.Operation{ - Name: opAddTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsInput{} - } - - output = &AddTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTags API operation for AWS Data Pipeline. -// -// Adds or modifies tags for the specified pipeline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation AddTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodePipelineDeletedException "PipelineDeletedException" -// The specified pipeline has been deleted. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/AddTags -func (c *DataPipeline) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - return out, req.Send() -} - -// AddTagsWithContext is the same as AddTags with the addition of -// the ability to pass a context and additional request options. -// -// See AddTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePipeline = "CreatePipeline" - -// CreatePipelineRequest generates a "aws/request.Request" representing the -// client's request for the CreatePipeline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePipeline for more information on using the CreatePipeline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePipelineRequest method. -// req, resp := client.CreatePipelineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/CreatePipeline -func (c *DataPipeline) CreatePipelineRequest(input *CreatePipelineInput) (req *request.Request, output *CreatePipelineOutput) { - op := &request.Operation{ - Name: opCreatePipeline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePipelineInput{} - } - - output = &CreatePipelineOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePipeline API operation for AWS Data Pipeline. -// -// Creates a new, empty pipeline. Use PutPipelineDefinition to populate the -// pipeline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation CreatePipeline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/CreatePipeline -func (c *DataPipeline) CreatePipeline(input *CreatePipelineInput) (*CreatePipelineOutput, error) { - req, out := c.CreatePipelineRequest(input) - return out, req.Send() -} - -// CreatePipelineWithContext is the same as CreatePipeline with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePipeline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) CreatePipelineWithContext(ctx aws.Context, input *CreatePipelineInput, opts ...request.Option) (*CreatePipelineOutput, error) { - req, out := c.CreatePipelineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeactivatePipeline = "DeactivatePipeline" - -// DeactivatePipelineRequest generates a "aws/request.Request" representing the -// client's request for the DeactivatePipeline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeactivatePipeline for more information on using the DeactivatePipeline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeactivatePipelineRequest method. -// req, resp := client.DeactivatePipelineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DeactivatePipeline -func (c *DataPipeline) DeactivatePipelineRequest(input *DeactivatePipelineInput) (req *request.Request, output *DeactivatePipelineOutput) { - op := &request.Operation{ - Name: opDeactivatePipeline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeactivatePipelineInput{} - } - - output = &DeactivatePipelineOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeactivatePipeline API operation for AWS Data Pipeline. -// -// Deactivates the specified running pipeline. The pipeline is set to the DEACTIVATING -// state until the deactivation process completes. -// -// To resume a deactivated pipeline, use ActivatePipeline. By default, the pipeline -// resumes from the last completed execution. Optionally, you can specify the -// date and time to resume the pipeline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation DeactivatePipeline for usage and error information. -// -// Returned Error Codes: -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodePipelineDeletedException "PipelineDeletedException" -// The specified pipeline has been deleted. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DeactivatePipeline -func (c *DataPipeline) DeactivatePipeline(input *DeactivatePipelineInput) (*DeactivatePipelineOutput, error) { - req, out := c.DeactivatePipelineRequest(input) - return out, req.Send() -} - -// DeactivatePipelineWithContext is the same as DeactivatePipeline with the addition of -// the ability to pass a context and additional request options. -// -// See DeactivatePipeline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) DeactivatePipelineWithContext(ctx aws.Context, input *DeactivatePipelineInput, opts ...request.Option) (*DeactivatePipelineOutput, error) { - req, out := c.DeactivatePipelineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePipeline = "DeletePipeline" - -// DeletePipelineRequest generates a "aws/request.Request" representing the -// client's request for the DeletePipeline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePipeline for more information on using the DeletePipeline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePipelineRequest method. -// req, resp := client.DeletePipelineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DeletePipeline -func (c *DataPipeline) DeletePipelineRequest(input *DeletePipelineInput) (req *request.Request, output *DeletePipelineOutput) { - op := &request.Operation{ - Name: opDeletePipeline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePipelineInput{} - } - - output = &DeletePipelineOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePipeline API operation for AWS Data Pipeline. -// -// Deletes a pipeline, its pipeline definition, and its run history. AWS Data -// Pipeline attempts to cancel instances associated with the pipeline that are -// currently being processed by task runners. -// -// Deleting a pipeline cannot be undone. You cannot query or restore a deleted -// pipeline. To temporarily pause a pipeline instead of deleting it, call SetStatus -// with the status set to PAUSE on individual components. Components that are -// paused by SetStatus can be resumed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation DeletePipeline for usage and error information. -// -// Returned Error Codes: -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DeletePipeline -func (c *DataPipeline) DeletePipeline(input *DeletePipelineInput) (*DeletePipelineOutput, error) { - req, out := c.DeletePipelineRequest(input) - return out, req.Send() -} - -// DeletePipelineWithContext is the same as DeletePipeline with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePipeline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) DeletePipelineWithContext(ctx aws.Context, input *DeletePipelineInput, opts ...request.Option) (*DeletePipelineOutput, error) { - req, out := c.DeletePipelineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeObjects = "DescribeObjects" - -// DescribeObjectsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeObjects operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeObjects for more information on using the DescribeObjects -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeObjectsRequest method. -// req, resp := client.DescribeObjectsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DescribeObjects -func (c *DataPipeline) DescribeObjectsRequest(input *DescribeObjectsInput) (req *request.Request, output *DescribeObjectsOutput) { - op := &request.Operation{ - Name: opDescribeObjects, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"marker"}, - OutputTokens: []string{"marker"}, - LimitToken: "", - TruncationToken: "hasMoreResults", - }, - } - - if input == nil { - input = &DescribeObjectsInput{} - } - - output = &DescribeObjectsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeObjects API operation for AWS Data Pipeline. -// -// Gets the object definitions for a set of objects associated with the pipeline. -// Object definitions are composed of a set of fields that define the properties -// of the object. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation DescribeObjects for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodePipelineDeletedException "PipelineDeletedException" -// The specified pipeline has been deleted. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DescribeObjects -func (c *DataPipeline) DescribeObjects(input *DescribeObjectsInput) (*DescribeObjectsOutput, error) { - req, out := c.DescribeObjectsRequest(input) - return out, req.Send() -} - -// DescribeObjectsWithContext is the same as DescribeObjects with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeObjects for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) DescribeObjectsWithContext(ctx aws.Context, input *DescribeObjectsInput, opts ...request.Option) (*DescribeObjectsOutput, error) { - req, out := c.DescribeObjectsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeObjectsPages iterates over the pages of a DescribeObjects operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeObjects 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 DescribeObjects operation. -// pageNum := 0 -// err := client.DescribeObjectsPages(params, -// func(page *DescribeObjectsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DataPipeline) DescribeObjectsPages(input *DescribeObjectsInput, fn func(*DescribeObjectsOutput, bool) bool) error { - return c.DescribeObjectsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeObjectsPagesWithContext same as DescribeObjectsPages 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 *DataPipeline) DescribeObjectsPagesWithContext(ctx aws.Context, input *DescribeObjectsInput, fn func(*DescribeObjectsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeObjectsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeObjectsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeObjectsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribePipelines = "DescribePipelines" - -// DescribePipelinesRequest generates a "aws/request.Request" representing the -// client's request for the DescribePipelines operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePipelines for more information on using the DescribePipelines -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePipelinesRequest method. -// req, resp := client.DescribePipelinesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DescribePipelines -func (c *DataPipeline) DescribePipelinesRequest(input *DescribePipelinesInput) (req *request.Request, output *DescribePipelinesOutput) { - op := &request.Operation{ - Name: opDescribePipelines, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePipelinesInput{} - } - - output = &DescribePipelinesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePipelines API operation for AWS Data Pipeline. -// -// Retrieves metadata about one or more pipelines. The information retrieved -// includes the name of the pipeline, the pipeline identifier, its current state, -// and the user account that owns the pipeline. Using account credentials, you -// can retrieve metadata about pipelines that you or your IAM users have created. -// If you are using an IAM user account, you can retrieve metadata about only -// those pipelines for which you have read permissions. -// -// To retrieve the full pipeline definition instead of metadata about the pipeline, -// call GetPipelineDefinition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation DescribePipelines for usage and error information. -// -// Returned Error Codes: -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodePipelineDeletedException "PipelineDeletedException" -// The specified pipeline has been deleted. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DescribePipelines -func (c *DataPipeline) DescribePipelines(input *DescribePipelinesInput) (*DescribePipelinesOutput, error) { - req, out := c.DescribePipelinesRequest(input) - return out, req.Send() -} - -// DescribePipelinesWithContext is the same as DescribePipelines with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePipelines for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) DescribePipelinesWithContext(ctx aws.Context, input *DescribePipelinesInput, opts ...request.Option) (*DescribePipelinesOutput, error) { - req, out := c.DescribePipelinesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEvaluateExpression = "EvaluateExpression" - -// EvaluateExpressionRequest generates a "aws/request.Request" representing the -// client's request for the EvaluateExpression operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EvaluateExpression for more information on using the EvaluateExpression -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EvaluateExpressionRequest method. -// req, resp := client.EvaluateExpressionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/EvaluateExpression -func (c *DataPipeline) EvaluateExpressionRequest(input *EvaluateExpressionInput) (req *request.Request, output *EvaluateExpressionOutput) { - op := &request.Operation{ - Name: opEvaluateExpression, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EvaluateExpressionInput{} - } - - output = &EvaluateExpressionOutput{} - req = c.newRequest(op, input, output) - return -} - -// EvaluateExpression API operation for AWS Data Pipeline. -// -// Task runners call EvaluateExpression to evaluate a string in the context -// of the specified object. For example, a task runner can evaluate SQL queries -// stored in Amazon S3. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation EvaluateExpression for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeTaskNotFoundException "TaskNotFoundException" -// The specified task was not found. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodePipelineDeletedException "PipelineDeletedException" -// The specified pipeline has been deleted. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/EvaluateExpression -func (c *DataPipeline) EvaluateExpression(input *EvaluateExpressionInput) (*EvaluateExpressionOutput, error) { - req, out := c.EvaluateExpressionRequest(input) - return out, req.Send() -} - -// EvaluateExpressionWithContext is the same as EvaluateExpression with the addition of -// the ability to pass a context and additional request options. -// -// See EvaluateExpression for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) EvaluateExpressionWithContext(ctx aws.Context, input *EvaluateExpressionInput, opts ...request.Option) (*EvaluateExpressionOutput, error) { - req, out := c.EvaluateExpressionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPipelineDefinition = "GetPipelineDefinition" - -// GetPipelineDefinitionRequest generates a "aws/request.Request" representing the -// client's request for the GetPipelineDefinition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPipelineDefinition for more information on using the GetPipelineDefinition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPipelineDefinitionRequest method. -// req, resp := client.GetPipelineDefinitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/GetPipelineDefinition -func (c *DataPipeline) GetPipelineDefinitionRequest(input *GetPipelineDefinitionInput) (req *request.Request, output *GetPipelineDefinitionOutput) { - op := &request.Operation{ - Name: opGetPipelineDefinition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPipelineDefinitionInput{} - } - - output = &GetPipelineDefinitionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPipelineDefinition API operation for AWS Data Pipeline. -// -// Gets the definition of the specified pipeline. You can call GetPipelineDefinition -// to retrieve the pipeline definition that you provided using PutPipelineDefinition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation GetPipelineDefinition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodePipelineDeletedException "PipelineDeletedException" -// The specified pipeline has been deleted. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/GetPipelineDefinition -func (c *DataPipeline) GetPipelineDefinition(input *GetPipelineDefinitionInput) (*GetPipelineDefinitionOutput, error) { - req, out := c.GetPipelineDefinitionRequest(input) - return out, req.Send() -} - -// GetPipelineDefinitionWithContext is the same as GetPipelineDefinition with the addition of -// the ability to pass a context and additional request options. -// -// See GetPipelineDefinition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) GetPipelineDefinitionWithContext(ctx aws.Context, input *GetPipelineDefinitionInput, opts ...request.Option) (*GetPipelineDefinitionOutput, error) { - req, out := c.GetPipelineDefinitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPipelines = "ListPipelines" - -// ListPipelinesRequest generates a "aws/request.Request" representing the -// client's request for the ListPipelines operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPipelines for more information on using the ListPipelines -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPipelinesRequest method. -// req, resp := client.ListPipelinesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ListPipelines -func (c *DataPipeline) ListPipelinesRequest(input *ListPipelinesInput) (req *request.Request, output *ListPipelinesOutput) { - op := &request.Operation{ - Name: opListPipelines, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"marker"}, - OutputTokens: []string{"marker"}, - LimitToken: "", - TruncationToken: "hasMoreResults", - }, - } - - if input == nil { - input = &ListPipelinesInput{} - } - - output = &ListPipelinesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPipelines API operation for AWS Data Pipeline. -// -// Lists the pipeline identifiers for all active pipelines that you have permission -// to access. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation ListPipelines for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ListPipelines -func (c *DataPipeline) ListPipelines(input *ListPipelinesInput) (*ListPipelinesOutput, error) { - req, out := c.ListPipelinesRequest(input) - return out, req.Send() -} - -// ListPipelinesWithContext is the same as ListPipelines with the addition of -// the ability to pass a context and additional request options. -// -// See ListPipelines for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) ListPipelinesWithContext(ctx aws.Context, input *ListPipelinesInput, opts ...request.Option) (*ListPipelinesOutput, error) { - req, out := c.ListPipelinesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPipelinesPages iterates over the pages of a ListPipelines operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPipelines 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 ListPipelines operation. -// pageNum := 0 -// err := client.ListPipelinesPages(params, -// func(page *ListPipelinesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DataPipeline) ListPipelinesPages(input *ListPipelinesInput, fn func(*ListPipelinesOutput, bool) bool) error { - return c.ListPipelinesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPipelinesPagesWithContext same as ListPipelinesPages 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 *DataPipeline) ListPipelinesPagesWithContext(ctx aws.Context, input *ListPipelinesInput, fn func(*ListPipelinesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPipelinesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPipelinesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPipelinesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opPollForTask = "PollForTask" - -// PollForTaskRequest generates a "aws/request.Request" representing the -// client's request for the PollForTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PollForTask for more information on using the PollForTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PollForTaskRequest method. -// req, resp := client.PollForTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/PollForTask -func (c *DataPipeline) PollForTaskRequest(input *PollForTaskInput) (req *request.Request, output *PollForTaskOutput) { - op := &request.Operation{ - Name: opPollForTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PollForTaskInput{} - } - - output = &PollForTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// PollForTask API operation for AWS Data Pipeline. -// -// Task runners call PollForTask to receive a task to perform from AWS Data -// Pipeline. The task runner specifies which tasks it can perform by setting -// a value for the workerGroup parameter. The task returned can come from any -// of the pipelines that match the workerGroup value passed in by the task runner -// and that was launched using the IAM user credentials specified by the task -// runner. -// -// If tasks are ready in the work queue, PollForTask returns a response immediately. -// If no tasks are available in the queue, PollForTask uses long-polling and -// holds on to a poll connection for up to a 90 seconds, during which time the -// first newly scheduled task is handed to the task runner. To accomodate this, -// set the socket timeout in your task runner to 90 seconds. The task runner -// should not call PollForTask again on the same workerGroup until it receives -// a response, and this can take up to 90 seconds. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation PollForTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// * ErrCodeTaskNotFoundException "TaskNotFoundException" -// The specified task was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/PollForTask -func (c *DataPipeline) PollForTask(input *PollForTaskInput) (*PollForTaskOutput, error) { - req, out := c.PollForTaskRequest(input) - return out, req.Send() -} - -// PollForTaskWithContext is the same as PollForTask with the addition of -// the ability to pass a context and additional request options. -// -// See PollForTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) PollForTaskWithContext(ctx aws.Context, input *PollForTaskInput, opts ...request.Option) (*PollForTaskOutput, error) { - req, out := c.PollForTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutPipelineDefinition = "PutPipelineDefinition" - -// PutPipelineDefinitionRequest generates a "aws/request.Request" representing the -// client's request for the PutPipelineDefinition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutPipelineDefinition for more information on using the PutPipelineDefinition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutPipelineDefinitionRequest method. -// req, resp := client.PutPipelineDefinitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/PutPipelineDefinition -func (c *DataPipeline) PutPipelineDefinitionRequest(input *PutPipelineDefinitionInput) (req *request.Request, output *PutPipelineDefinitionOutput) { - op := &request.Operation{ - Name: opPutPipelineDefinition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutPipelineDefinitionInput{} - } - - output = &PutPipelineDefinitionOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutPipelineDefinition API operation for AWS Data Pipeline. -// -// Adds tasks, schedules, and preconditions to the specified pipeline. You can -// use PutPipelineDefinition to populate a new pipeline. -// -// PutPipelineDefinition also validates the configuration as it adds it to the -// pipeline. Changes to the pipeline are saved unless one of the following three -// validation errors exists in the pipeline. -// -// An object is missing a name or identifier field. -// A string or reference field is empty. -// The number of objects in the pipeline exceeds the maximum allowed objects. -// -// The pipeline is in a FINISHED state. -// Pipeline object definitions are passed to the PutPipelineDefinition action -// and returned by the GetPipelineDefinition action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation PutPipelineDefinition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodePipelineDeletedException "PipelineDeletedException" -// The specified pipeline has been deleted. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/PutPipelineDefinition -func (c *DataPipeline) PutPipelineDefinition(input *PutPipelineDefinitionInput) (*PutPipelineDefinitionOutput, error) { - req, out := c.PutPipelineDefinitionRequest(input) - return out, req.Send() -} - -// PutPipelineDefinitionWithContext is the same as PutPipelineDefinition with the addition of -// the ability to pass a context and additional request options. -// -// See PutPipelineDefinition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) PutPipelineDefinitionWithContext(ctx aws.Context, input *PutPipelineDefinitionInput, opts ...request.Option) (*PutPipelineDefinitionOutput, error) { - req, out := c.PutPipelineDefinitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opQueryObjects = "QueryObjects" - -// QueryObjectsRequest generates a "aws/request.Request" representing the -// client's request for the QueryObjects operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See QueryObjects for more information on using the QueryObjects -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the QueryObjectsRequest method. -// req, resp := client.QueryObjectsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/QueryObjects -func (c *DataPipeline) QueryObjectsRequest(input *QueryObjectsInput) (req *request.Request, output *QueryObjectsOutput) { - op := &request.Operation{ - Name: opQueryObjects, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"marker"}, - OutputTokens: []string{"marker"}, - LimitToken: "limit", - TruncationToken: "hasMoreResults", - }, - } - - if input == nil { - input = &QueryObjectsInput{} - } - - output = &QueryObjectsOutput{} - req = c.newRequest(op, input, output) - return -} - -// QueryObjects API operation for AWS Data Pipeline. -// -// Queries the specified pipeline for the names of objects that match the specified -// set of conditions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation QueryObjects for usage and error information. -// -// Returned Error Codes: -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodePipelineDeletedException "PipelineDeletedException" -// The specified pipeline has been deleted. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/QueryObjects -func (c *DataPipeline) QueryObjects(input *QueryObjectsInput) (*QueryObjectsOutput, error) { - req, out := c.QueryObjectsRequest(input) - return out, req.Send() -} - -// QueryObjectsWithContext is the same as QueryObjects with the addition of -// the ability to pass a context and additional request options. -// -// See QueryObjects for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) QueryObjectsWithContext(ctx aws.Context, input *QueryObjectsInput, opts ...request.Option) (*QueryObjectsOutput, error) { - req, out := c.QueryObjectsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// QueryObjectsPages iterates over the pages of a QueryObjects operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See QueryObjects 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 QueryObjects operation. -// pageNum := 0 -// err := client.QueryObjectsPages(params, -// func(page *QueryObjectsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DataPipeline) QueryObjectsPages(input *QueryObjectsInput, fn func(*QueryObjectsOutput, bool) bool) error { - return c.QueryObjectsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// QueryObjectsPagesWithContext same as QueryObjectsPages 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 *DataPipeline) QueryObjectsPagesWithContext(ctx aws.Context, input *QueryObjectsInput, fn func(*QueryObjectsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *QueryObjectsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.QueryObjectsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*QueryObjectsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opRemoveTags = "RemoveTags" - -// RemoveTagsRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTags for more information on using the RemoveTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsRequest method. -// req, resp := client.RemoveTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/RemoveTags -func (c *DataPipeline) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) { - op := &request.Operation{ - Name: opRemoveTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsInput{} - } - - output = &RemoveTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTags API operation for AWS Data Pipeline. -// -// Removes existing tags from the specified pipeline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation RemoveTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodePipelineDeletedException "PipelineDeletedException" -// The specified pipeline has been deleted. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/RemoveTags -func (c *DataPipeline) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - return out, req.Send() -} - -// RemoveTagsWithContext is the same as RemoveTags with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReportTaskProgress = "ReportTaskProgress" - -// ReportTaskProgressRequest generates a "aws/request.Request" representing the -// client's request for the ReportTaskProgress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReportTaskProgress for more information on using the ReportTaskProgress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReportTaskProgressRequest method. -// req, resp := client.ReportTaskProgressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ReportTaskProgress -func (c *DataPipeline) ReportTaskProgressRequest(input *ReportTaskProgressInput) (req *request.Request, output *ReportTaskProgressOutput) { - op := &request.Operation{ - Name: opReportTaskProgress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReportTaskProgressInput{} - } - - output = &ReportTaskProgressOutput{} - req = c.newRequest(op, input, output) - return -} - -// ReportTaskProgress API operation for AWS Data Pipeline. -// -// Task runners call ReportTaskProgress when assigned a task to acknowledge -// that it has the task. If the web service does not receive this acknowledgement -// within 2 minutes, it assigns the task in a subsequent PollForTask call. After -// this initial acknowledgement, the task runner only needs to report progress -// every 15 minutes to maintain its ownership of the task. You can change this -// reporting time from 15 minutes by specifying a reportProgressTimeout field -// in your pipeline. -// -// If a task runner does not report its status after 5 minutes, AWS Data Pipeline -// assumes that the task runner is unable to process the task and reassigns -// the task in a subsequent response to PollForTask. Task runners should call -// ReportTaskProgress every 60 seconds. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation ReportTaskProgress for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// * ErrCodeTaskNotFoundException "TaskNotFoundException" -// The specified task was not found. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodePipelineDeletedException "PipelineDeletedException" -// The specified pipeline has been deleted. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ReportTaskProgress -func (c *DataPipeline) ReportTaskProgress(input *ReportTaskProgressInput) (*ReportTaskProgressOutput, error) { - req, out := c.ReportTaskProgressRequest(input) - return out, req.Send() -} - -// ReportTaskProgressWithContext is the same as ReportTaskProgress with the addition of -// the ability to pass a context and additional request options. -// -// See ReportTaskProgress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) ReportTaskProgressWithContext(ctx aws.Context, input *ReportTaskProgressInput, opts ...request.Option) (*ReportTaskProgressOutput, error) { - req, out := c.ReportTaskProgressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReportTaskRunnerHeartbeat = "ReportTaskRunnerHeartbeat" - -// ReportTaskRunnerHeartbeatRequest generates a "aws/request.Request" representing the -// client's request for the ReportTaskRunnerHeartbeat operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReportTaskRunnerHeartbeat for more information on using the ReportTaskRunnerHeartbeat -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReportTaskRunnerHeartbeatRequest method. -// req, resp := client.ReportTaskRunnerHeartbeatRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ReportTaskRunnerHeartbeat -func (c *DataPipeline) ReportTaskRunnerHeartbeatRequest(input *ReportTaskRunnerHeartbeatInput) (req *request.Request, output *ReportTaskRunnerHeartbeatOutput) { - op := &request.Operation{ - Name: opReportTaskRunnerHeartbeat, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReportTaskRunnerHeartbeatInput{} - } - - output = &ReportTaskRunnerHeartbeatOutput{} - req = c.newRequest(op, input, output) - return -} - -// ReportTaskRunnerHeartbeat API operation for AWS Data Pipeline. -// -// Task runners call ReportTaskRunnerHeartbeat every 15 minutes to indicate -// that they are operational. If the AWS Data Pipeline Task Runner is launched -// on a resource managed by AWS Data Pipeline, the web service can use this -// call to detect when the task runner application has failed and restart a -// new instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation ReportTaskRunnerHeartbeat for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ReportTaskRunnerHeartbeat -func (c *DataPipeline) ReportTaskRunnerHeartbeat(input *ReportTaskRunnerHeartbeatInput) (*ReportTaskRunnerHeartbeatOutput, error) { - req, out := c.ReportTaskRunnerHeartbeatRequest(input) - return out, req.Send() -} - -// ReportTaskRunnerHeartbeatWithContext is the same as ReportTaskRunnerHeartbeat with the addition of -// the ability to pass a context and additional request options. -// -// See ReportTaskRunnerHeartbeat for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) ReportTaskRunnerHeartbeatWithContext(ctx aws.Context, input *ReportTaskRunnerHeartbeatInput, opts ...request.Option) (*ReportTaskRunnerHeartbeatOutput, error) { - req, out := c.ReportTaskRunnerHeartbeatRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetStatus = "SetStatus" - -// SetStatusRequest generates a "aws/request.Request" representing the -// client's request for the SetStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetStatus for more information on using the SetStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetStatusRequest method. -// req, resp := client.SetStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/SetStatus -func (c *DataPipeline) SetStatusRequest(input *SetStatusInput) (req *request.Request, output *SetStatusOutput) { - op := &request.Operation{ - Name: opSetStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetStatusInput{} - } - - output = &SetStatusOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetStatus API operation for AWS Data Pipeline. -// -// Requests that the status of the specified physical or logical pipeline objects -// be updated in the specified pipeline. This update might not occur immediately, -// but is eventually consistent. The status that can be set depends on the type -// of object (for example, DataNode or Activity). You cannot perform this operation -// on FINISHED pipelines and attempting to do so returns InvalidRequestException. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation SetStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodePipelineDeletedException "PipelineDeletedException" -// The specified pipeline has been deleted. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/SetStatus -func (c *DataPipeline) SetStatus(input *SetStatusInput) (*SetStatusOutput, error) { - req, out := c.SetStatusRequest(input) - return out, req.Send() -} - -// SetStatusWithContext is the same as SetStatus with the addition of -// the ability to pass a context and additional request options. -// -// See SetStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) SetStatusWithContext(ctx aws.Context, input *SetStatusInput, opts ...request.Option) (*SetStatusOutput, error) { - req, out := c.SetStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetTaskStatus = "SetTaskStatus" - -// SetTaskStatusRequest generates a "aws/request.Request" representing the -// client's request for the SetTaskStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetTaskStatus for more information on using the SetTaskStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetTaskStatusRequest method. -// req, resp := client.SetTaskStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/SetTaskStatus -func (c *DataPipeline) SetTaskStatusRequest(input *SetTaskStatusInput) (req *request.Request, output *SetTaskStatusOutput) { - op := &request.Operation{ - Name: opSetTaskStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetTaskStatusInput{} - } - - output = &SetTaskStatusOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetTaskStatus API operation for AWS Data Pipeline. -// -// Task runners call SetTaskStatus to notify AWS Data Pipeline that a task is -// completed and provide information about the final status. A task runner makes -// this call regardless of whether the task was sucessful. A task runner does -// not need to call SetTaskStatus for tasks that are canceled by the web service -// during a call to ReportTaskProgress. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation SetTaskStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeTaskNotFoundException "TaskNotFoundException" -// The specified task was not found. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodePipelineDeletedException "PipelineDeletedException" -// The specified pipeline has been deleted. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/SetTaskStatus -func (c *DataPipeline) SetTaskStatus(input *SetTaskStatusInput) (*SetTaskStatusOutput, error) { - req, out := c.SetTaskStatusRequest(input) - return out, req.Send() -} - -// SetTaskStatusWithContext is the same as SetTaskStatus with the addition of -// the ability to pass a context and additional request options. -// -// See SetTaskStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) SetTaskStatusWithContext(ctx aws.Context, input *SetTaskStatusInput, opts ...request.Option) (*SetTaskStatusOutput, error) { - req, out := c.SetTaskStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opValidatePipelineDefinition = "ValidatePipelineDefinition" - -// ValidatePipelineDefinitionRequest generates a "aws/request.Request" representing the -// client's request for the ValidatePipelineDefinition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ValidatePipelineDefinition for more information on using the ValidatePipelineDefinition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ValidatePipelineDefinitionRequest method. -// req, resp := client.ValidatePipelineDefinitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ValidatePipelineDefinition -func (c *DataPipeline) ValidatePipelineDefinitionRequest(input *ValidatePipelineDefinitionInput) (req *request.Request, output *ValidatePipelineDefinitionOutput) { - op := &request.Operation{ - Name: opValidatePipelineDefinition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ValidatePipelineDefinitionInput{} - } - - output = &ValidatePipelineDefinitionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ValidatePipelineDefinition API operation for AWS Data Pipeline. -// -// Validates the specified pipeline definition to ensure that it is well formed -// and can be run without error. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Data Pipeline's -// API operation ValidatePipelineDefinition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceError "InternalServiceError" -// An internal service error occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request was not valid. Verify that your request was properly formatted, -// that the signature was generated with the correct credentials, and that you -// haven't exceeded any of the service limits for your account. -// -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was not found. Verify that you used the correct user -// and account identifiers. -// -// * ErrCodePipelineDeletedException "PipelineDeletedException" -// The specified pipeline has been deleted. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ValidatePipelineDefinition -func (c *DataPipeline) ValidatePipelineDefinition(input *ValidatePipelineDefinitionInput) (*ValidatePipelineDefinitionOutput, error) { - req, out := c.ValidatePipelineDefinitionRequest(input) - return out, req.Send() -} - -// ValidatePipelineDefinitionWithContext is the same as ValidatePipelineDefinition with the addition of -// the ability to pass a context and additional request options. -// -// See ValidatePipelineDefinition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataPipeline) ValidatePipelineDefinitionWithContext(ctx aws.Context, input *ValidatePipelineDefinitionInput, opts ...request.Option) (*ValidatePipelineDefinitionOutput, error) { - req, out := c.ValidatePipelineDefinitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Contains the parameters for ActivatePipeline. -type ActivatePipelineInput struct { - _ struct{} `type:"structure"` - - // A list of parameter values to pass to the pipeline at activation. - ParameterValues []*ParameterValue `locationName:"parameterValues" type:"list"` - - // The ID of the pipeline. - // - // PipelineId is a required field - PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` - - // The date and time to resume the pipeline. By default, the pipeline resumes - // from the last completed execution. - StartTimestamp *time.Time `locationName:"startTimestamp" type:"timestamp"` -} - -// String returns the string representation -func (s ActivatePipelineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivatePipelineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ActivatePipelineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ActivatePipelineInput"} - if s.PipelineId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineId")) - } - if s.PipelineId != nil && len(*s.PipelineId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) - } - if s.ParameterValues != nil { - for i, v := range s.ParameterValues { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterValues", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParameterValues sets the ParameterValues field's value. -func (s *ActivatePipelineInput) SetParameterValues(v []*ParameterValue) *ActivatePipelineInput { - s.ParameterValues = v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *ActivatePipelineInput) SetPipelineId(v string) *ActivatePipelineInput { - s.PipelineId = &v - return s -} - -// SetStartTimestamp sets the StartTimestamp field's value. -func (s *ActivatePipelineInput) SetStartTimestamp(v time.Time) *ActivatePipelineInput { - s.StartTimestamp = &v - return s -} - -// Contains the output of ActivatePipeline. -type ActivatePipelineOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ActivatePipelineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivatePipelineOutput) GoString() string { - return s.String() -} - -// Contains the parameters for AddTags. -type AddTagsInput struct { - _ struct{} `type:"structure"` - - // The ID of the pipeline. - // - // PipelineId is a required field - PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` - - // The tags to add, as key/value pairs. - // - // Tags is a required field - Tags []*Tag `locationName:"tags" type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"} - if s.PipelineId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineId")) - } - if s.PipelineId != nil && len(*s.PipelineId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPipelineId sets the PipelineId field's value. -func (s *AddTagsInput) SetPipelineId(v string) *AddTagsInput { - s.PipelineId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsInput) SetTags(v []*Tag) *AddTagsInput { - s.Tags = v - return s -} - -// Contains the output of AddTags. -type AddTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsOutput) GoString() string { - return s.String() -} - -// Contains the parameters for CreatePipeline. -type CreatePipelineInput struct { - _ struct{} `type:"structure"` - - // The description for the pipeline. - Description *string `locationName:"description" type:"string"` - - // The name for the pipeline. You can use the same name for multiple pipelines - // associated with your AWS account, because AWS Data Pipeline assigns each - // pipeline a unique pipeline identifier. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // A list of tags to associate with the pipeline at creation. Tags let you control - // access to pipelines. For more information, see Controlling User Access to - // Pipelines (http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html) - // in the AWS Data Pipeline Developer Guide. - Tags []*Tag `locationName:"tags" type:"list"` - - // A unique identifier. This identifier is not the same as the pipeline identifier - // assigned by AWS Data Pipeline. You are responsible for defining the format - // and ensuring the uniqueness of this identifier. You use this parameter to - // ensure idempotency during repeated calls to CreatePipeline. For example, - // if the first call to CreatePipeline does not succeed, you can pass in the - // same unique identifier and pipeline name combination on a subsequent call - // to CreatePipeline. CreatePipeline ensures that if a pipeline already exists - // with the same name and unique identifier, a new pipeline is not created. - // Instead, you'll receive the pipeline identifier from the previous attempt. - // The uniqueness of the name and unique identifier combination is scoped to - // the AWS account or IAM user credentials. - // - // UniqueId is a required field - UniqueId *string `locationName:"uniqueId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreatePipelineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePipelineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePipelineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePipelineInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.UniqueId == nil { - invalidParams.Add(request.NewErrParamRequired("UniqueId")) - } - if s.UniqueId != nil && len(*s.UniqueId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UniqueId", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreatePipelineInput) SetDescription(v string) *CreatePipelineInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreatePipelineInput) SetName(v string) *CreatePipelineInput { - s.Name = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreatePipelineInput) SetTags(v []*Tag) *CreatePipelineInput { - s.Tags = v - return s -} - -// SetUniqueId sets the UniqueId field's value. -func (s *CreatePipelineInput) SetUniqueId(v string) *CreatePipelineInput { - s.UniqueId = &v - return s -} - -// Contains the output of CreatePipeline. -type CreatePipelineOutput struct { - _ struct{} `type:"structure"` - - // The ID that AWS Data Pipeline assigns the newly created pipeline. For example, - // df-06372391ZG65EXAMPLE. - // - // PipelineId is a required field - PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreatePipelineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePipelineOutput) GoString() string { - return s.String() -} - -// SetPipelineId sets the PipelineId field's value. -func (s *CreatePipelineOutput) SetPipelineId(v string) *CreatePipelineOutput { - s.PipelineId = &v - return s -} - -// Contains the parameters for DeactivatePipeline. -type DeactivatePipelineInput struct { - _ struct{} `type:"structure"` - - // Indicates whether to cancel any running objects. The default is true, which - // sets the state of any running objects to CANCELED. If this value is false, - // the pipeline is deactivated after all running objects finish. - CancelActive *bool `locationName:"cancelActive" type:"boolean"` - - // The ID of the pipeline. - // - // PipelineId is a required field - PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeactivatePipelineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeactivatePipelineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeactivatePipelineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeactivatePipelineInput"} - if s.PipelineId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineId")) - } - if s.PipelineId != nil && len(*s.PipelineId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCancelActive sets the CancelActive field's value. -func (s *DeactivatePipelineInput) SetCancelActive(v bool) *DeactivatePipelineInput { - s.CancelActive = &v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *DeactivatePipelineInput) SetPipelineId(v string) *DeactivatePipelineInput { - s.PipelineId = &v - return s -} - -// Contains the output of DeactivatePipeline. -type DeactivatePipelineOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeactivatePipelineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeactivatePipelineOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DeletePipeline. -type DeletePipelineInput struct { - _ struct{} `type:"structure"` - - // The ID of the pipeline. - // - // PipelineId is a required field - PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePipelineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePipelineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePipelineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePipelineInput"} - if s.PipelineId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineId")) - } - if s.PipelineId != nil && len(*s.PipelineId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPipelineId sets the PipelineId field's value. -func (s *DeletePipelineInput) SetPipelineId(v string) *DeletePipelineInput { - s.PipelineId = &v - return s -} - -type DeletePipelineOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePipelineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePipelineOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DescribeObjects. -type DescribeObjectsInput struct { - _ struct{} `type:"structure"` - - // Indicates whether any expressions in the object should be evaluated when - // the object descriptions are returned. - EvaluateExpressions *bool `locationName:"evaluateExpressions" type:"boolean"` - - // The starting point for the results to be returned. For the first call, this - // value should be empty. As long as there are more results, continue to call - // DescribeObjects with the marker value from the previous call to retrieve - // the next set of results. - Marker *string `locationName:"marker" type:"string"` - - // The IDs of the pipeline objects that contain the definitions to be described. - // You can pass as many as 25 identifiers in a single call to DescribeObjects. - // - // ObjectIds is a required field - ObjectIds []*string `locationName:"objectIds" type:"list" required:"true"` - - // The ID of the pipeline that contains the object definitions. - // - // PipelineId is a required field - PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeObjectsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeObjectsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeObjectsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeObjectsInput"} - if s.ObjectIds == nil { - invalidParams.Add(request.NewErrParamRequired("ObjectIds")) - } - if s.PipelineId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineId")) - } - if s.PipelineId != nil && len(*s.PipelineId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEvaluateExpressions sets the EvaluateExpressions field's value. -func (s *DescribeObjectsInput) SetEvaluateExpressions(v bool) *DescribeObjectsInput { - s.EvaluateExpressions = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeObjectsInput) SetMarker(v string) *DescribeObjectsInput { - s.Marker = &v - return s -} - -// SetObjectIds sets the ObjectIds field's value. -func (s *DescribeObjectsInput) SetObjectIds(v []*string) *DescribeObjectsInput { - s.ObjectIds = v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *DescribeObjectsInput) SetPipelineId(v string) *DescribeObjectsInput { - s.PipelineId = &v - return s -} - -// Contains the output of DescribeObjects. -type DescribeObjectsOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether there are more results to return. - HasMoreResults *bool `locationName:"hasMoreResults" type:"boolean"` - - // The starting point for the next page of results. To view the next page of - // results, call DescribeObjects again with this marker value. If the value - // is null, there are no more results. - Marker *string `locationName:"marker" type:"string"` - - // An array of object definitions. - // - // PipelineObjects is a required field - PipelineObjects []*PipelineObject `locationName:"pipelineObjects" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeObjectsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeObjectsOutput) GoString() string { - return s.String() -} - -// SetHasMoreResults sets the HasMoreResults field's value. -func (s *DescribeObjectsOutput) SetHasMoreResults(v bool) *DescribeObjectsOutput { - s.HasMoreResults = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeObjectsOutput) SetMarker(v string) *DescribeObjectsOutput { - s.Marker = &v - return s -} - -// SetPipelineObjects sets the PipelineObjects field's value. -func (s *DescribeObjectsOutput) SetPipelineObjects(v []*PipelineObject) *DescribeObjectsOutput { - s.PipelineObjects = v - return s -} - -// Contains the parameters for DescribePipelines. -type DescribePipelinesInput struct { - _ struct{} `type:"structure"` - - // The IDs of the pipelines to describe. You can pass as many as 25 identifiers - // in a single call. To obtain pipeline IDs, call ListPipelines. - // - // PipelineIds is a required field - PipelineIds []*string `locationName:"pipelineIds" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribePipelinesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePipelinesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribePipelinesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribePipelinesInput"} - if s.PipelineIds == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPipelineIds sets the PipelineIds field's value. -func (s *DescribePipelinesInput) SetPipelineIds(v []*string) *DescribePipelinesInput { - s.PipelineIds = v - return s -} - -// Contains the output of DescribePipelines. -type DescribePipelinesOutput struct { - _ struct{} `type:"structure"` - - // An array of descriptions for the specified pipelines. - // - // PipelineDescriptionList is a required field - PipelineDescriptionList []*PipelineDescription `locationName:"pipelineDescriptionList" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribePipelinesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePipelinesOutput) GoString() string { - return s.String() -} - -// SetPipelineDescriptionList sets the PipelineDescriptionList field's value. -func (s *DescribePipelinesOutput) SetPipelineDescriptionList(v []*PipelineDescription) *DescribePipelinesOutput { - s.PipelineDescriptionList = v - return s -} - -// Contains the parameters for EvaluateExpression. -type EvaluateExpressionInput struct { - _ struct{} `type:"structure"` - - // The expression to evaluate. - // - // Expression is a required field - Expression *string `locationName:"expression" type:"string" required:"true"` - - // The ID of the object. - // - // ObjectId is a required field - ObjectId *string `locationName:"objectId" min:"1" type:"string" required:"true"` - - // The ID of the pipeline. - // - // PipelineId is a required field - PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s EvaluateExpressionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EvaluateExpressionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EvaluateExpressionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EvaluateExpressionInput"} - if s.Expression == nil { - invalidParams.Add(request.NewErrParamRequired("Expression")) - } - if s.ObjectId == nil { - invalidParams.Add(request.NewErrParamRequired("ObjectId")) - } - if s.ObjectId != nil && len(*s.ObjectId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ObjectId", 1)) - } - if s.PipelineId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineId")) - } - if s.PipelineId != nil && len(*s.PipelineId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExpression sets the Expression field's value. -func (s *EvaluateExpressionInput) SetExpression(v string) *EvaluateExpressionInput { - s.Expression = &v - return s -} - -// SetObjectId sets the ObjectId field's value. -func (s *EvaluateExpressionInput) SetObjectId(v string) *EvaluateExpressionInput { - s.ObjectId = &v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *EvaluateExpressionInput) SetPipelineId(v string) *EvaluateExpressionInput { - s.PipelineId = &v - return s -} - -// Contains the output of EvaluateExpression. -type EvaluateExpressionOutput struct { - _ struct{} `type:"structure"` - - // The evaluated expression. - // - // EvaluatedExpression is a required field - EvaluatedExpression *string `locationName:"evaluatedExpression" type:"string" required:"true"` -} - -// String returns the string representation -func (s EvaluateExpressionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EvaluateExpressionOutput) GoString() string { - return s.String() -} - -// SetEvaluatedExpression sets the EvaluatedExpression field's value. -func (s *EvaluateExpressionOutput) SetEvaluatedExpression(v string) *EvaluateExpressionOutput { - s.EvaluatedExpression = &v - return s -} - -// A key-value pair that describes a property of a pipeline object. The value -// is specified as either a string value (StringValue) or a reference to another -// object (RefValue) but not as both. -type Field struct { - _ struct{} `type:"structure"` - - // The field identifier. - // - // Key is a required field - Key *string `locationName:"key" min:"1" type:"string" required:"true"` - - // The field value, expressed as the identifier of another object. - RefValue *string `locationName:"refValue" min:"1" type:"string"` - - // The field value, expressed as a String. - StringValue *string `locationName:"stringValue" type:"string"` -} - -// String returns the string representation -func (s Field) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Field) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Field) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Field"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.RefValue != nil && len(*s.RefValue) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RefValue", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Field) SetKey(v string) *Field { - s.Key = &v - return s -} - -// SetRefValue sets the RefValue field's value. -func (s *Field) SetRefValue(v string) *Field { - s.RefValue = &v - return s -} - -// SetStringValue sets the StringValue field's value. -func (s *Field) SetStringValue(v string) *Field { - s.StringValue = &v - return s -} - -// Contains the parameters for GetPipelineDefinition. -type GetPipelineDefinitionInput struct { - _ struct{} `type:"structure"` - - // The ID of the pipeline. - // - // PipelineId is a required field - PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` - - // The version of the pipeline definition to retrieve. Set this parameter to - // latest (default) to use the last definition saved to the pipeline or active - // to use the last definition that was activated. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s GetPipelineDefinitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPipelineDefinitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPipelineDefinitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPipelineDefinitionInput"} - if s.PipelineId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineId")) - } - if s.PipelineId != nil && len(*s.PipelineId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPipelineId sets the PipelineId field's value. -func (s *GetPipelineDefinitionInput) SetPipelineId(v string) *GetPipelineDefinitionInput { - s.PipelineId = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetPipelineDefinitionInput) SetVersion(v string) *GetPipelineDefinitionInput { - s.Version = &v - return s -} - -// Contains the output of GetPipelineDefinition. -type GetPipelineDefinitionOutput struct { - _ struct{} `type:"structure"` - - // The parameter objects used in the pipeline definition. - ParameterObjects []*ParameterObject `locationName:"parameterObjects" type:"list"` - - // The parameter values used in the pipeline definition. - ParameterValues []*ParameterValue `locationName:"parameterValues" type:"list"` - - // The objects defined in the pipeline. - PipelineObjects []*PipelineObject `locationName:"pipelineObjects" type:"list"` -} - -// String returns the string representation -func (s GetPipelineDefinitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPipelineDefinitionOutput) GoString() string { - return s.String() -} - -// SetParameterObjects sets the ParameterObjects field's value. -func (s *GetPipelineDefinitionOutput) SetParameterObjects(v []*ParameterObject) *GetPipelineDefinitionOutput { - s.ParameterObjects = v - return s -} - -// SetParameterValues sets the ParameterValues field's value. -func (s *GetPipelineDefinitionOutput) SetParameterValues(v []*ParameterValue) *GetPipelineDefinitionOutput { - s.ParameterValues = v - return s -} - -// SetPipelineObjects sets the PipelineObjects field's value. -func (s *GetPipelineDefinitionOutput) SetPipelineObjects(v []*PipelineObject) *GetPipelineDefinitionOutput { - s.PipelineObjects = v - return s -} - -// Identity information for the EC2 instance that is hosting the task runner. -// You can get this value by calling a metadata URI from the EC2 instance. For -// more information, see Instance Metadata (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html) -// in the Amazon Elastic Compute Cloud User Guide. Passing in this value proves -// that your task runner is running on an EC2 instance, and ensures the proper -// AWS Data Pipeline service charges are applied to your pipeline. -type InstanceIdentity struct { - _ struct{} `type:"structure"` - - // A description of an EC2 instance that is generated when the instance is launched - // and exposed to the instance via the instance metadata service in the form - // of a JSON representation of an object. - Document *string `locationName:"document" type:"string"` - - // A signature which can be used to verify the accuracy and authenticity of - // the information provided in the instance identity document. - Signature *string `locationName:"signature" type:"string"` -} - -// String returns the string representation -func (s InstanceIdentity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceIdentity) GoString() string { - return s.String() -} - -// SetDocument sets the Document field's value. -func (s *InstanceIdentity) SetDocument(v string) *InstanceIdentity { - s.Document = &v - return s -} - -// SetSignature sets the Signature field's value. -func (s *InstanceIdentity) SetSignature(v string) *InstanceIdentity { - s.Signature = &v - return s -} - -// Contains the parameters for ListPipelines. -type ListPipelinesInput struct { - _ struct{} `type:"structure"` - - // The starting point for the results to be returned. For the first call, this - // value should be empty. As long as there are more results, continue to call - // ListPipelines with the marker value from the previous call to retrieve the - // next set of results. - Marker *string `locationName:"marker" type:"string"` -} - -// String returns the string representation -func (s ListPipelinesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPipelinesInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListPipelinesInput) SetMarker(v string) *ListPipelinesInput { - s.Marker = &v - return s -} - -// Contains the output of ListPipelines. -type ListPipelinesOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether there are more results that can be obtained by a subsequent - // call. - HasMoreResults *bool `locationName:"hasMoreResults" type:"boolean"` - - // The starting point for the next page of results. To view the next page of - // results, call ListPipelinesOutput again with this marker value. If the value - // is null, there are no more results. - Marker *string `locationName:"marker" type:"string"` - - // The pipeline identifiers. If you require additional information about the - // pipelines, you can use these identifiers to call DescribePipelines and GetPipelineDefinition. - // - // PipelineIdList is a required field - PipelineIdList []*PipelineIdName `locationName:"pipelineIdList" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListPipelinesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPipelinesOutput) GoString() string { - return s.String() -} - -// SetHasMoreResults sets the HasMoreResults field's value. -func (s *ListPipelinesOutput) SetHasMoreResults(v bool) *ListPipelinesOutput { - s.HasMoreResults = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPipelinesOutput) SetMarker(v string) *ListPipelinesOutput { - s.Marker = &v - return s -} - -// SetPipelineIdList sets the PipelineIdList field's value. -func (s *ListPipelinesOutput) SetPipelineIdList(v []*PipelineIdName) *ListPipelinesOutput { - s.PipelineIdList = v - return s -} - -// Contains a logical operation for comparing the value of a field with a specified -// value. -type Operator struct { - _ struct{} `type:"structure"` - - // The logical operation to be performed: equal (EQ), equal reference (REF_EQ), - // less than or equal (LE), greater than or equal (GE), or between (BETWEEN). - // Equal reference (REF_EQ) can be used only with reference fields. The other - // comparison types can be used only with String fields. The comparison types - // you can use apply only to certain object fields, as detailed below. - // - // The comparison operators EQ and REF_EQ act on the following fields: - // - // * name - // * @sphere - // * parent - // * @componentParent - // * @instanceParent - // * @status - // * @scheduledStartTime - // * @scheduledEndTime - // * @actualStartTime - // * @actualEndTime - // The comparison operators GE, LE, and BETWEEN act on the following fields: - // - // * @scheduledStartTime - // * @scheduledEndTime - // * @actualStartTime - // * @actualEndTime - // Note that fields beginning with the at sign (@) are read-only and set by - // the web service. When you name fields, you should choose names containing - // only alpha-numeric values, as symbols may be reserved by AWS Data Pipeline. - // User-defined fields that you add to a pipeline should prefix their name with - // the string "my". - Type *string `locationName:"type" type:"string" enum:"OperatorType"` - - // The value that the actual field value will be compared with. - Values []*string `locationName:"values" type:"list"` -} - -// String returns the string representation -func (s Operator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Operator) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *Operator) SetType(v string) *Operator { - s.Type = &v - return s -} - -// SetValues sets the Values field's value. -func (s *Operator) SetValues(v []*string) *Operator { - s.Values = v - return s -} - -// The attributes allowed or specified with a parameter object. -type ParameterAttribute struct { - _ struct{} `type:"structure"` - - // The field identifier. - // - // Key is a required field - Key *string `locationName:"key" min:"1" type:"string" required:"true"` - - // The field value, expressed as a String. - // - // StringValue is a required field - StringValue *string `locationName:"stringValue" type:"string" required:"true"` -} - -// String returns the string representation -func (s ParameterAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterAttribute) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ParameterAttribute) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ParameterAttribute"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.StringValue == nil { - invalidParams.Add(request.NewErrParamRequired("StringValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *ParameterAttribute) SetKey(v string) *ParameterAttribute { - s.Key = &v - return s -} - -// SetStringValue sets the StringValue field's value. -func (s *ParameterAttribute) SetStringValue(v string) *ParameterAttribute { - s.StringValue = &v - return s -} - -// Contains information about a parameter object. -type ParameterObject struct { - _ struct{} `type:"structure"` - - // The attributes of the parameter object. - // - // Attributes is a required field - Attributes []*ParameterAttribute `locationName:"attributes" type:"list" required:"true"` - - // The ID of the parameter object. - // - // Id is a required field - Id *string `locationName:"id" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ParameterObject) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterObject) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ParameterObject) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ParameterObject"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Attributes != nil { - for i, v := range s.Attributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *ParameterObject) SetAttributes(v []*ParameterAttribute) *ParameterObject { - s.Attributes = v - return s -} - -// SetId sets the Id field's value. -func (s *ParameterObject) SetId(v string) *ParameterObject { - s.Id = &v - return s -} - -// A value or list of parameter values. -type ParameterValue struct { - _ struct{} `type:"structure"` - - // The ID of the parameter value. - // - // Id is a required field - Id *string `locationName:"id" min:"1" type:"string" required:"true"` - - // The field value, expressed as a String. - // - // StringValue is a required field - StringValue *string `locationName:"stringValue" type:"string" required:"true"` -} - -// String returns the string representation -func (s ParameterValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterValue) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ParameterValue) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ParameterValue"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.StringValue == nil { - invalidParams.Add(request.NewErrParamRequired("StringValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *ParameterValue) SetId(v string) *ParameterValue { - s.Id = &v - return s -} - -// SetStringValue sets the StringValue field's value. -func (s *ParameterValue) SetStringValue(v string) *ParameterValue { - s.StringValue = &v - return s -} - -// Contains pipeline metadata. -type PipelineDescription struct { - _ struct{} `type:"structure"` - - // Description of the pipeline. - Description *string `locationName:"description" type:"string"` - - // A list of read-only fields that contain metadata about the pipeline: @userId, - // @accountId, and @pipelineState. - // - // Fields is a required field - Fields []*Field `locationName:"fields" type:"list" required:"true"` - - // The name of the pipeline. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The pipeline identifier that was assigned by AWS Data Pipeline. This is a - // string of the form df-297EG78HU43EEXAMPLE. - // - // PipelineId is a required field - PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` - - // A list of tags to associated with a pipeline. Tags let you control access - // to pipelines. For more information, see Controlling User Access to Pipelines - // (http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html) - // in the AWS Data Pipeline Developer Guide. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s PipelineDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PipelineDescription) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *PipelineDescription) SetDescription(v string) *PipelineDescription { - s.Description = &v - return s -} - -// SetFields sets the Fields field's value. -func (s *PipelineDescription) SetFields(v []*Field) *PipelineDescription { - s.Fields = v - return s -} - -// SetName sets the Name field's value. -func (s *PipelineDescription) SetName(v string) *PipelineDescription { - s.Name = &v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *PipelineDescription) SetPipelineId(v string) *PipelineDescription { - s.PipelineId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *PipelineDescription) SetTags(v []*Tag) *PipelineDescription { - s.Tags = v - return s -} - -// Contains the name and identifier of a pipeline. -type PipelineIdName struct { - _ struct{} `type:"structure"` - - // The ID of the pipeline that was assigned by AWS Data Pipeline. This is a - // string of the form df-297EG78HU43EEXAMPLE. - Id *string `locationName:"id" min:"1" type:"string"` - - // The name of the pipeline. - Name *string `locationName:"name" min:"1" type:"string"` -} - -// String returns the string representation -func (s PipelineIdName) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PipelineIdName) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *PipelineIdName) SetId(v string) *PipelineIdName { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *PipelineIdName) SetName(v string) *PipelineIdName { - s.Name = &v - return s -} - -// Contains information about a pipeline object. This can be a logical, physical, -// or physical attempt pipeline object. The complete set of components of a -// pipeline defines the pipeline. -type PipelineObject struct { - _ struct{} `type:"structure"` - - // Key-value pairs that define the properties of the object. - // - // Fields is a required field - Fields []*Field `locationName:"fields" type:"list" required:"true"` - - // The ID of the object. - // - // Id is a required field - Id *string `locationName:"id" min:"1" type:"string" required:"true"` - - // The name of the object. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PipelineObject) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PipelineObject) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PipelineObject) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PipelineObject"} - if s.Fields == nil { - invalidParams.Add(request.NewErrParamRequired("Fields")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Fields != nil { - for i, v := range s.Fields { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Fields", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFields sets the Fields field's value. -func (s *PipelineObject) SetFields(v []*Field) *PipelineObject { - s.Fields = v - return s -} - -// SetId sets the Id field's value. -func (s *PipelineObject) SetId(v string) *PipelineObject { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *PipelineObject) SetName(v string) *PipelineObject { - s.Name = &v - return s -} - -// Contains the parameters for PollForTask. -type PollForTaskInput struct { - _ struct{} `type:"structure"` - - // The public DNS name of the calling task runner. - Hostname *string `locationName:"hostname" min:"1" type:"string"` - - // Identity information for the EC2 instance that is hosting the task runner. - // You can get this value from the instance using http://169.254.169.254/latest/meta-data/instance-id. - // For more information, see Instance Metadata (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html) - // in the Amazon Elastic Compute Cloud User Guide. Passing in this value proves - // that your task runner is running on an EC2 instance, and ensures the proper - // AWS Data Pipeline service charges are applied to your pipeline. - InstanceIdentity *InstanceIdentity `locationName:"instanceIdentity" type:"structure"` - - // The type of task the task runner is configured to accept and process. The - // worker group is set as a field on objects in the pipeline when they are created. - // You can only specify a single value for workerGroup in the call to PollForTask. - // There are no wildcard values permitted in workerGroup; the string must be - // an exact, case-sensitive, match. - // - // WorkerGroup is a required field - WorkerGroup *string `locationName:"workerGroup" type:"string" required:"true"` -} - -// String returns the string representation -func (s PollForTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PollForTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PollForTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PollForTaskInput"} - if s.Hostname != nil && len(*s.Hostname) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Hostname", 1)) - } - if s.WorkerGroup == nil { - invalidParams.Add(request.NewErrParamRequired("WorkerGroup")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostname sets the Hostname field's value. -func (s *PollForTaskInput) SetHostname(v string) *PollForTaskInput { - s.Hostname = &v - return s -} - -// SetInstanceIdentity sets the InstanceIdentity field's value. -func (s *PollForTaskInput) SetInstanceIdentity(v *InstanceIdentity) *PollForTaskInput { - s.InstanceIdentity = v - return s -} - -// SetWorkerGroup sets the WorkerGroup field's value. -func (s *PollForTaskInput) SetWorkerGroup(v string) *PollForTaskInput { - s.WorkerGroup = &v - return s -} - -// Contains the output of PollForTask. -type PollForTaskOutput struct { - _ struct{} `type:"structure"` - - // The information needed to complete the task that is being assigned to the - // task runner. One of the fields returned in this object is taskId, which contains - // an identifier for the task being assigned. The calling task runner uses taskId - // in subsequent calls to ReportTaskProgress and SetTaskStatus. - TaskObject *TaskObject `locationName:"taskObject" type:"structure"` -} - -// String returns the string representation -func (s PollForTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PollForTaskOutput) GoString() string { - return s.String() -} - -// SetTaskObject sets the TaskObject field's value. -func (s *PollForTaskOutput) SetTaskObject(v *TaskObject) *PollForTaskOutput { - s.TaskObject = v - return s -} - -// Contains the parameters for PutPipelineDefinition. -type PutPipelineDefinitionInput struct { - _ struct{} `type:"structure"` - - // The parameter objects used with the pipeline. - ParameterObjects []*ParameterObject `locationName:"parameterObjects" type:"list"` - - // The parameter values used with the pipeline. - ParameterValues []*ParameterValue `locationName:"parameterValues" type:"list"` - - // The ID of the pipeline. - // - // PipelineId is a required field - PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` - - // The objects that define the pipeline. These objects overwrite the existing - // pipeline definition. - // - // PipelineObjects is a required field - PipelineObjects []*PipelineObject `locationName:"pipelineObjects" type:"list" required:"true"` -} - -// String returns the string representation -func (s PutPipelineDefinitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutPipelineDefinitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutPipelineDefinitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutPipelineDefinitionInput"} - if s.PipelineId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineId")) - } - if s.PipelineId != nil && len(*s.PipelineId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) - } - if s.PipelineObjects == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineObjects")) - } - if s.ParameterObjects != nil { - for i, v := range s.ParameterObjects { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterObjects", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ParameterValues != nil { - for i, v := range s.ParameterValues { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterValues", i), err.(request.ErrInvalidParams)) - } - } - } - if s.PipelineObjects != nil { - for i, v := range s.PipelineObjects { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PipelineObjects", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParameterObjects sets the ParameterObjects field's value. -func (s *PutPipelineDefinitionInput) SetParameterObjects(v []*ParameterObject) *PutPipelineDefinitionInput { - s.ParameterObjects = v - return s -} - -// SetParameterValues sets the ParameterValues field's value. -func (s *PutPipelineDefinitionInput) SetParameterValues(v []*ParameterValue) *PutPipelineDefinitionInput { - s.ParameterValues = v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *PutPipelineDefinitionInput) SetPipelineId(v string) *PutPipelineDefinitionInput { - s.PipelineId = &v - return s -} - -// SetPipelineObjects sets the PipelineObjects field's value. -func (s *PutPipelineDefinitionInput) SetPipelineObjects(v []*PipelineObject) *PutPipelineDefinitionInput { - s.PipelineObjects = v - return s -} - -// Contains the output of PutPipelineDefinition. -type PutPipelineDefinitionOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether there were validation errors, and the pipeline definition - // is stored but cannot be activated until you correct the pipeline and call - // PutPipelineDefinition to commit the corrected pipeline. - // - // Errored is a required field - Errored *bool `locationName:"errored" type:"boolean" required:"true"` - - // The validation errors that are associated with the objects defined in pipelineObjects. - ValidationErrors []*ValidationError `locationName:"validationErrors" type:"list"` - - // The validation warnings that are associated with the objects defined in pipelineObjects. - ValidationWarnings []*ValidationWarning `locationName:"validationWarnings" type:"list"` -} - -// String returns the string representation -func (s PutPipelineDefinitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutPipelineDefinitionOutput) GoString() string { - return s.String() -} - -// SetErrored sets the Errored field's value. -func (s *PutPipelineDefinitionOutput) SetErrored(v bool) *PutPipelineDefinitionOutput { - s.Errored = &v - return s -} - -// SetValidationErrors sets the ValidationErrors field's value. -func (s *PutPipelineDefinitionOutput) SetValidationErrors(v []*ValidationError) *PutPipelineDefinitionOutput { - s.ValidationErrors = v - return s -} - -// SetValidationWarnings sets the ValidationWarnings field's value. -func (s *PutPipelineDefinitionOutput) SetValidationWarnings(v []*ValidationWarning) *PutPipelineDefinitionOutput { - s.ValidationWarnings = v - return s -} - -// Defines the query to run against an object. -type Query struct { - _ struct{} `type:"structure"` - - // List of selectors that define the query. An object must satisfy all of the - // selectors to match the query. - Selectors []*Selector `locationName:"selectors" type:"list"` -} - -// String returns the string representation -func (s Query) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Query) GoString() string { - return s.String() -} - -// SetSelectors sets the Selectors field's value. -func (s *Query) SetSelectors(v []*Selector) *Query { - s.Selectors = v - return s -} - -// Contains the parameters for QueryObjects. -type QueryObjectsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of object names that QueryObjects will return in a single - // call. The default value is 100. - Limit *int64 `locationName:"limit" type:"integer"` - - // The starting point for the results to be returned. For the first call, this - // value should be empty. As long as there are more results, continue to call - // QueryObjects with the marker value from the previous call to retrieve the - // next set of results. - Marker *string `locationName:"marker" type:"string"` - - // The ID of the pipeline. - // - // PipelineId is a required field - PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` - - // The query that defines the objects to be returned. The Query object can contain - // a maximum of ten selectors. The conditions in the query are limited to top-level - // String fields in the object. These filters can be applied to components, - // instances, and attempts. - Query *Query `locationName:"query" type:"structure"` - - // Indicates whether the query applies to components or instances. The possible - // values are: COMPONENT, INSTANCE, and ATTEMPT. - // - // Sphere is a required field - Sphere *string `locationName:"sphere" type:"string" required:"true"` -} - -// String returns the string representation -func (s QueryObjectsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryObjectsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *QueryObjectsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "QueryObjectsInput"} - if s.PipelineId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineId")) - } - if s.PipelineId != nil && len(*s.PipelineId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) - } - if s.Sphere == nil { - invalidParams.Add(request.NewErrParamRequired("Sphere")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *QueryObjectsInput) SetLimit(v int64) *QueryObjectsInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *QueryObjectsInput) SetMarker(v string) *QueryObjectsInput { - s.Marker = &v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *QueryObjectsInput) SetPipelineId(v string) *QueryObjectsInput { - s.PipelineId = &v - return s -} - -// SetQuery sets the Query field's value. -func (s *QueryObjectsInput) SetQuery(v *Query) *QueryObjectsInput { - s.Query = v - return s -} - -// SetSphere sets the Sphere field's value. -func (s *QueryObjectsInput) SetSphere(v string) *QueryObjectsInput { - s.Sphere = &v - return s -} - -// Contains the output of QueryObjects. -type QueryObjectsOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether there are more results that can be obtained by a subsequent - // call. - HasMoreResults *bool `locationName:"hasMoreResults" type:"boolean"` - - // The identifiers that match the query selectors. - Ids []*string `locationName:"ids" type:"list"` - - // The starting point for the next page of results. To view the next page of - // results, call QueryObjects again with this marker value. If the value is - // null, there are no more results. - Marker *string `locationName:"marker" type:"string"` -} - -// String returns the string representation -func (s QueryObjectsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryObjectsOutput) GoString() string { - return s.String() -} - -// SetHasMoreResults sets the HasMoreResults field's value. -func (s *QueryObjectsOutput) SetHasMoreResults(v bool) *QueryObjectsOutput { - s.HasMoreResults = &v - return s -} - -// SetIds sets the Ids field's value. -func (s *QueryObjectsOutput) SetIds(v []*string) *QueryObjectsOutput { - s.Ids = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *QueryObjectsOutput) SetMarker(v string) *QueryObjectsOutput { - s.Marker = &v - return s -} - -// Contains the parameters for RemoveTags. -type RemoveTagsInput struct { - _ struct{} `type:"structure"` - - // The ID of the pipeline. - // - // PipelineId is a required field - PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` - - // The keys of the tags to remove. - // - // TagKeys is a required field - TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"} - if s.PipelineId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineId")) - } - if s.PipelineId != nil && len(*s.PipelineId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPipelineId sets the PipelineId field's value. -func (s *RemoveTagsInput) SetPipelineId(v string) *RemoveTagsInput { - s.PipelineId = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsInput) SetTagKeys(v []*string) *RemoveTagsInput { - s.TagKeys = v - return s -} - -// Contains the output of RemoveTags. -type RemoveTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsOutput) GoString() string { - return s.String() -} - -// Contains the parameters for ReportTaskProgress. -type ReportTaskProgressInput struct { - _ struct{} `type:"structure"` - - // Key-value pairs that define the properties of the ReportTaskProgressInput - // object. - Fields []*Field `locationName:"fields" type:"list"` - - // The ID of the task assigned to the task runner. This value is provided in - // the response for PollForTask. - // - // TaskId is a required field - TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ReportTaskProgressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReportTaskProgressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReportTaskProgressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReportTaskProgressInput"} - if s.TaskId == nil { - invalidParams.Add(request.NewErrParamRequired("TaskId")) - } - if s.TaskId != nil && len(*s.TaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) - } - if s.Fields != nil { - for i, v := range s.Fields { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Fields", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFields sets the Fields field's value. -func (s *ReportTaskProgressInput) SetFields(v []*Field) *ReportTaskProgressInput { - s.Fields = v - return s -} - -// SetTaskId sets the TaskId field's value. -func (s *ReportTaskProgressInput) SetTaskId(v string) *ReportTaskProgressInput { - s.TaskId = &v - return s -} - -// Contains the output of ReportTaskProgress. -type ReportTaskProgressOutput struct { - _ struct{} `type:"structure"` - - // If true, the calling task runner should cancel processing of the task. The - // task runner does not need to call SetTaskStatus for canceled tasks. - // - // Canceled is a required field - Canceled *bool `locationName:"canceled" type:"boolean" required:"true"` -} - -// String returns the string representation -func (s ReportTaskProgressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReportTaskProgressOutput) GoString() string { - return s.String() -} - -// SetCanceled sets the Canceled field's value. -func (s *ReportTaskProgressOutput) SetCanceled(v bool) *ReportTaskProgressOutput { - s.Canceled = &v - return s -} - -// Contains the parameters for ReportTaskRunnerHeartbeat. -type ReportTaskRunnerHeartbeatInput struct { - _ struct{} `type:"structure"` - - // The public DNS name of the task runner. - Hostname *string `locationName:"hostname" min:"1" type:"string"` - - // The ID of the task runner. This value should be unique across your AWS account. - // In the case of AWS Data Pipeline Task Runner launched on a resource managed - // by AWS Data Pipeline, the web service provides a unique identifier when it - // launches the application. If you have written a custom task runner, you should - // assign a unique identifier for the task runner. - // - // TaskrunnerId is a required field - TaskrunnerId *string `locationName:"taskrunnerId" min:"1" type:"string" required:"true"` - - // The type of task the task runner is configured to accept and process. The - // worker group is set as a field on objects in the pipeline when they are created. - // You can only specify a single value for workerGroup. There are no wildcard - // values permitted in workerGroup; the string must be an exact, case-sensitive, - // match. - WorkerGroup *string `locationName:"workerGroup" type:"string"` -} - -// String returns the string representation -func (s ReportTaskRunnerHeartbeatInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReportTaskRunnerHeartbeatInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReportTaskRunnerHeartbeatInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReportTaskRunnerHeartbeatInput"} - if s.Hostname != nil && len(*s.Hostname) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Hostname", 1)) - } - if s.TaskrunnerId == nil { - invalidParams.Add(request.NewErrParamRequired("TaskrunnerId")) - } - if s.TaskrunnerId != nil && len(*s.TaskrunnerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskrunnerId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostname sets the Hostname field's value. -func (s *ReportTaskRunnerHeartbeatInput) SetHostname(v string) *ReportTaskRunnerHeartbeatInput { - s.Hostname = &v - return s -} - -// SetTaskrunnerId sets the TaskrunnerId field's value. -func (s *ReportTaskRunnerHeartbeatInput) SetTaskrunnerId(v string) *ReportTaskRunnerHeartbeatInput { - s.TaskrunnerId = &v - return s -} - -// SetWorkerGroup sets the WorkerGroup field's value. -func (s *ReportTaskRunnerHeartbeatInput) SetWorkerGroup(v string) *ReportTaskRunnerHeartbeatInput { - s.WorkerGroup = &v - return s -} - -// Contains the output of ReportTaskRunnerHeartbeat. -type ReportTaskRunnerHeartbeatOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether the calling task runner should terminate. - // - // Terminate is a required field - Terminate *bool `locationName:"terminate" type:"boolean" required:"true"` -} - -// String returns the string representation -func (s ReportTaskRunnerHeartbeatOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReportTaskRunnerHeartbeatOutput) GoString() string { - return s.String() -} - -// SetTerminate sets the Terminate field's value. -func (s *ReportTaskRunnerHeartbeatOutput) SetTerminate(v bool) *ReportTaskRunnerHeartbeatOutput { - s.Terminate = &v - return s -} - -// A comparision that is used to determine whether a query should return this -// object. -type Selector struct { - _ struct{} `type:"structure"` - - // The name of the field that the operator will be applied to. The field name - // is the "key" portion of the field definition in the pipeline definition syntax - // that is used by the AWS Data Pipeline API. If the field is not set on the - // object, the condition fails. - FieldName *string `locationName:"fieldName" type:"string"` - - // Contains a logical operation for comparing the value of a field with a specified - // value. - Operator *Operator `locationName:"operator" type:"structure"` -} - -// String returns the string representation -func (s Selector) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Selector) GoString() string { - return s.String() -} - -// SetFieldName sets the FieldName field's value. -func (s *Selector) SetFieldName(v string) *Selector { - s.FieldName = &v - return s -} - -// SetOperator sets the Operator field's value. -func (s *Selector) SetOperator(v *Operator) *Selector { - s.Operator = v - return s -} - -// Contains the parameters for SetStatus. -type SetStatusInput struct { - _ struct{} `type:"structure"` - - // The IDs of the objects. The corresponding objects can be either physical - // or components, but not a mix of both types. - // - // ObjectIds is a required field - ObjectIds []*string `locationName:"objectIds" type:"list" required:"true"` - - // The ID of the pipeline that contains the objects. - // - // PipelineId is a required field - PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` - - // The status to be set on all the objects specified in objectIds. For components, - // use PAUSE or RESUME. For instances, use TRY_CANCEL, RERUN, or MARK_FINISHED. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true"` -} - -// String returns the string representation -func (s SetStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetStatusInput"} - if s.ObjectIds == nil { - invalidParams.Add(request.NewErrParamRequired("ObjectIds")) - } - if s.PipelineId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineId")) - } - if s.PipelineId != nil && len(*s.PipelineId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetObjectIds sets the ObjectIds field's value. -func (s *SetStatusInput) SetObjectIds(v []*string) *SetStatusInput { - s.ObjectIds = v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *SetStatusInput) SetPipelineId(v string) *SetStatusInput { - s.PipelineId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SetStatusInput) SetStatus(v string) *SetStatusInput { - s.Status = &v - return s -} - -type SetStatusOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetStatusOutput) GoString() string { - return s.String() -} - -// Contains the parameters for SetTaskStatus. -type SetTaskStatusInput struct { - _ struct{} `type:"structure"` - - // If an error occurred during the task, this value specifies the error code. - // This value is set on the physical attempt object. It is used to display error - // information to the user. It should not start with string "Service_" which - // is reserved by the system. - ErrorId *string `locationName:"errorId" type:"string"` - - // If an error occurred during the task, this value specifies a text description - // of the error. This value is set on the physical attempt object. It is used - // to display error information to the user. The web service does not parse - // this value. - ErrorMessage *string `locationName:"errorMessage" type:"string"` - - // If an error occurred during the task, this value specifies the stack trace - // associated with the error. This value is set on the physical attempt object. - // It is used to display error information to the user. The web service does - // not parse this value. - ErrorStackTrace *string `locationName:"errorStackTrace" type:"string"` - - // The ID of the task assigned to the task runner. This value is provided in - // the response for PollForTask. - // - // TaskId is a required field - TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"` - - // If FINISHED, the task successfully completed. If FAILED, the task ended unsuccessfully. - // Preconditions use false. - // - // TaskStatus is a required field - TaskStatus *string `locationName:"taskStatus" type:"string" required:"true" enum:"TaskStatus"` -} - -// String returns the string representation -func (s SetTaskStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetTaskStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetTaskStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetTaskStatusInput"} - if s.TaskId == nil { - invalidParams.Add(request.NewErrParamRequired("TaskId")) - } - if s.TaskId != nil && len(*s.TaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) - } - if s.TaskStatus == nil { - invalidParams.Add(request.NewErrParamRequired("TaskStatus")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetErrorId sets the ErrorId field's value. -func (s *SetTaskStatusInput) SetErrorId(v string) *SetTaskStatusInput { - s.ErrorId = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *SetTaskStatusInput) SetErrorMessage(v string) *SetTaskStatusInput { - s.ErrorMessage = &v - return s -} - -// SetErrorStackTrace sets the ErrorStackTrace field's value. -func (s *SetTaskStatusInput) SetErrorStackTrace(v string) *SetTaskStatusInput { - s.ErrorStackTrace = &v - return s -} - -// SetTaskId sets the TaskId field's value. -func (s *SetTaskStatusInput) SetTaskId(v string) *SetTaskStatusInput { - s.TaskId = &v - return s -} - -// SetTaskStatus sets the TaskStatus field's value. -func (s *SetTaskStatusInput) SetTaskStatus(v string) *SetTaskStatusInput { - s.TaskStatus = &v - return s -} - -// Contains the output of SetTaskStatus. -type SetTaskStatusOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetTaskStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetTaskStatusOutput) GoString() string { - return s.String() -} - -// Tags are key/value pairs defined by a user and associated with a pipeline -// to control access. AWS Data Pipeline allows you to associate ten tags per -// pipeline. For more information, see Controlling User Access to Pipelines -// (http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html) -// in the AWS Data Pipeline Developer Guide. -type Tag struct { - _ struct{} `type:"structure"` - - // The key name of a tag defined by a user. For more information, see Controlling - // User Access to Pipelines (http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html) - // in the AWS Data Pipeline Developer Guide. - // - // Key is a required field - Key *string `locationName:"key" min:"1" type:"string" required:"true"` - - // The optional value portion of a tag defined by a user. For more information, - // see Controlling User Access to Pipelines (http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html) - // in the AWS Data Pipeline Developer Guide. - // - // Value is a required field - Value *string `locationName:"value" type:"string" required:"true"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Contains information about a pipeline task that is assigned to a task runner. -type TaskObject struct { - _ struct{} `type:"structure"` - - // The ID of the pipeline task attempt object. AWS Data Pipeline uses this value - // to track how many times a task is attempted. - AttemptId *string `locationName:"attemptId" min:"1" type:"string"` - - // Connection information for the location where the task runner will publish - // the output of the task. - Objects map[string]*PipelineObject `locationName:"objects" type:"map"` - - // The ID of the pipeline that provided the task. - PipelineId *string `locationName:"pipelineId" min:"1" type:"string"` - - // An internal identifier for the task. This ID is passed to the SetTaskStatus - // and ReportTaskProgress actions. - TaskId *string `locationName:"taskId" min:"1" type:"string"` -} - -// String returns the string representation -func (s TaskObject) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskObject) GoString() string { - return s.String() -} - -// SetAttemptId sets the AttemptId field's value. -func (s *TaskObject) SetAttemptId(v string) *TaskObject { - s.AttemptId = &v - return s -} - -// SetObjects sets the Objects field's value. -func (s *TaskObject) SetObjects(v map[string]*PipelineObject) *TaskObject { - s.Objects = v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *TaskObject) SetPipelineId(v string) *TaskObject { - s.PipelineId = &v - return s -} - -// SetTaskId sets the TaskId field's value. -func (s *TaskObject) SetTaskId(v string) *TaskObject { - s.TaskId = &v - return s -} - -// Contains the parameters for ValidatePipelineDefinition. -type ValidatePipelineDefinitionInput struct { - _ struct{} `type:"structure"` - - // The parameter objects used with the pipeline. - ParameterObjects []*ParameterObject `locationName:"parameterObjects" type:"list"` - - // The parameter values used with the pipeline. - ParameterValues []*ParameterValue `locationName:"parameterValues" type:"list"` - - // The ID of the pipeline. - // - // PipelineId is a required field - PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` - - // The objects that define the pipeline changes to validate against the pipeline. - // - // PipelineObjects is a required field - PipelineObjects []*PipelineObject `locationName:"pipelineObjects" type:"list" required:"true"` -} - -// String returns the string representation -func (s ValidatePipelineDefinitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidatePipelineDefinitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ValidatePipelineDefinitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ValidatePipelineDefinitionInput"} - if s.PipelineId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineId")) - } - if s.PipelineId != nil && len(*s.PipelineId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) - } - if s.PipelineObjects == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineObjects")) - } - if s.ParameterObjects != nil { - for i, v := range s.ParameterObjects { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterObjects", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ParameterValues != nil { - for i, v := range s.ParameterValues { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterValues", i), err.(request.ErrInvalidParams)) - } - } - } - if s.PipelineObjects != nil { - for i, v := range s.PipelineObjects { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PipelineObjects", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParameterObjects sets the ParameterObjects field's value. -func (s *ValidatePipelineDefinitionInput) SetParameterObjects(v []*ParameterObject) *ValidatePipelineDefinitionInput { - s.ParameterObjects = v - return s -} - -// SetParameterValues sets the ParameterValues field's value. -func (s *ValidatePipelineDefinitionInput) SetParameterValues(v []*ParameterValue) *ValidatePipelineDefinitionInput { - s.ParameterValues = v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *ValidatePipelineDefinitionInput) SetPipelineId(v string) *ValidatePipelineDefinitionInput { - s.PipelineId = &v - return s -} - -// SetPipelineObjects sets the PipelineObjects field's value. -func (s *ValidatePipelineDefinitionInput) SetPipelineObjects(v []*PipelineObject) *ValidatePipelineDefinitionInput { - s.PipelineObjects = v - return s -} - -// Contains the output of ValidatePipelineDefinition. -type ValidatePipelineDefinitionOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether there were validation errors. - // - // Errored is a required field - Errored *bool `locationName:"errored" type:"boolean" required:"true"` - - // Any validation errors that were found. - ValidationErrors []*ValidationError `locationName:"validationErrors" type:"list"` - - // Any validation warnings that were found. - ValidationWarnings []*ValidationWarning `locationName:"validationWarnings" type:"list"` -} - -// String returns the string representation -func (s ValidatePipelineDefinitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidatePipelineDefinitionOutput) GoString() string { - return s.String() -} - -// SetErrored sets the Errored field's value. -func (s *ValidatePipelineDefinitionOutput) SetErrored(v bool) *ValidatePipelineDefinitionOutput { - s.Errored = &v - return s -} - -// SetValidationErrors sets the ValidationErrors field's value. -func (s *ValidatePipelineDefinitionOutput) SetValidationErrors(v []*ValidationError) *ValidatePipelineDefinitionOutput { - s.ValidationErrors = v - return s -} - -// SetValidationWarnings sets the ValidationWarnings field's value. -func (s *ValidatePipelineDefinitionOutput) SetValidationWarnings(v []*ValidationWarning) *ValidatePipelineDefinitionOutput { - s.ValidationWarnings = v - return s -} - -// Defines a validation error. Validation errors prevent pipeline activation. -// The set of validation errors that can be returned are defined by AWS Data -// Pipeline. -type ValidationError struct { - _ struct{} `type:"structure"` - - // A description of the validation error. - Errors []*string `locationName:"errors" type:"list"` - - // The identifier of the object that contains the validation error. - Id *string `locationName:"id" min:"1" type:"string"` -} - -// String returns the string representation -func (s ValidationError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidationError) GoString() string { - return s.String() -} - -// SetErrors sets the Errors field's value. -func (s *ValidationError) SetErrors(v []*string) *ValidationError { - s.Errors = v - return s -} - -// SetId sets the Id field's value. -func (s *ValidationError) SetId(v string) *ValidationError { - s.Id = &v - return s -} - -// Defines a validation warning. Validation warnings do not prevent pipeline -// activation. The set of validation warnings that can be returned are defined -// by AWS Data Pipeline. -type ValidationWarning struct { - _ struct{} `type:"structure"` - - // The identifier of the object that contains the validation warning. - Id *string `locationName:"id" min:"1" type:"string"` - - // A description of the validation warning. - Warnings []*string `locationName:"warnings" type:"list"` -} - -// String returns the string representation -func (s ValidationWarning) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidationWarning) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *ValidationWarning) SetId(v string) *ValidationWarning { - s.Id = &v - return s -} - -// SetWarnings sets the Warnings field's value. -func (s *ValidationWarning) SetWarnings(v []*string) *ValidationWarning { - s.Warnings = v - return s -} - -const ( - // OperatorTypeEq is a OperatorType enum value - OperatorTypeEq = "EQ" - - // OperatorTypeRefEq is a OperatorType enum value - OperatorTypeRefEq = "REF_EQ" - - // OperatorTypeLe is a OperatorType enum value - OperatorTypeLe = "LE" - - // OperatorTypeGe is a OperatorType enum value - OperatorTypeGe = "GE" - - // OperatorTypeBetween is a OperatorType enum value - OperatorTypeBetween = "BETWEEN" -) - -const ( - // TaskStatusFinished is a TaskStatus enum value - TaskStatusFinished = "FINISHED" - - // TaskStatusFailed is a TaskStatus enum value - TaskStatusFailed = "FAILED" - - // TaskStatusFalse is a TaskStatus enum value - TaskStatusFalse = "FALSE" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/doc.go b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/doc.go deleted file mode 100644 index 79ee00a1e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/doc.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package datapipeline provides the client and types for making API -// requests to AWS Data Pipeline. -// -// AWS Data Pipeline configures and manages a data-driven workflow called a -// pipeline. AWS Data Pipeline handles the details of scheduling and ensuring -// that data dependencies are met so that your application can focus on processing -// the data. -// -// AWS Data Pipeline provides a JAR implementation of a task runner called AWS -// Data Pipeline Task Runner. AWS Data Pipeline Task Runner provides logic for -// common data management scenarios, such as performing database queries and -// running data analysis using Amazon Elastic MapReduce (Amazon EMR). You can -// use AWS Data Pipeline Task Runner as your task runner, or you can write your -// own task runner to provide custom data management. -// -// AWS Data Pipeline implements two main sets of functionality. Use the first -// set to create a pipeline and define data sources, schedules, dependencies, -// and the transforms to be performed on the data. Use the second set in your -// task runner application to receive the next task ready for processing. The -// logic for performing the task, such as querying the data, running data analysis, -// or converting the data from one format to another, is contained within the -// task runner. The task runner performs the task assigned to it by the web -// service, reporting progress to the web service as it does so. When the task -// is done, the task runner reports the final success or failure of the task -// to the web service. -// -// See https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29 for more information on this service. -// -// See datapipeline package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/datapipeline/ -// -// Using the Client -// -// To contact AWS Data Pipeline 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 Data Pipeline client DataPipeline for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/datapipeline/#New -package datapipeline diff --git a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/errors.go b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/errors.go deleted file mode 100644 index f60b7da9f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/errors.go +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package datapipeline - -const ( - - // ErrCodeInternalServiceError for service response error code - // "InternalServiceError". - // - // An internal service error occurred. - ErrCodeInternalServiceError = "InternalServiceError" - - // ErrCodeInvalidRequestException for service response error code - // "InvalidRequestException". - // - // The request was not valid. Verify that your request was properly formatted, - // that the signature was generated with the correct credentials, and that you - // haven't exceeded any of the service limits for your account. - ErrCodeInvalidRequestException = "InvalidRequestException" - - // ErrCodePipelineDeletedException for service response error code - // "PipelineDeletedException". - // - // The specified pipeline has been deleted. - ErrCodePipelineDeletedException = "PipelineDeletedException" - - // ErrCodePipelineNotFoundException for service response error code - // "PipelineNotFoundException". - // - // The specified pipeline was not found. Verify that you used the correct user - // and account identifiers. - ErrCodePipelineNotFoundException = "PipelineNotFoundException" - - // ErrCodeTaskNotFoundException for service response error code - // "TaskNotFoundException". - // - // The specified task was not found. - ErrCodeTaskNotFoundException = "TaskNotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/service.go b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/service.go deleted file mode 100644 index ebd5c29b2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package datapipeline - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// DataPipeline provides the API operation methods for making requests to -// AWS Data Pipeline. See this package's package overview docs -// for details on the service. -// -// DataPipeline methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type DataPipeline 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 = "datapipeline" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Data Pipeline" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the DataPipeline 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 DataPipeline client from just a session. -// svc := datapipeline.New(mySession) -// -// // Create a DataPipeline client with additional configuration -// svc := datapipeline.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *DataPipeline { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DataPipeline { - svc := &DataPipeline{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2012-10-29", - JSONVersion: "1.1", - TargetPrefix: "DataPipeline", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a DataPipeline operation and runs any -// custom request initialization. -func (c *DataPipeline) 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/datasync/api.go b/vendor/github.com/aws/aws-sdk-go/service/datasync/api.go deleted file mode 100644 index 3d4af4d2a..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/datasync/api.go +++ /dev/null @@ -1,5506 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package datasync - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCancelTaskExecution = "CancelTaskExecution" - -// CancelTaskExecutionRequest generates a "aws/request.Request" representing the -// client's request for the CancelTaskExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelTaskExecution for more information on using the CancelTaskExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelTaskExecutionRequest method. -// req, resp := client.CancelTaskExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CancelTaskExecution -func (c *DataSync) CancelTaskExecutionRequest(input *CancelTaskExecutionInput) (req *request.Request, output *CancelTaskExecutionOutput) { - op := &request.Operation{ - Name: opCancelTaskExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelTaskExecutionInput{} - } - - output = &CancelTaskExecutionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CancelTaskExecution API operation for AWS DataSync. -// -// Cancels execution of a task. -// -// When you cancel a task execution, the transfer of some files are abruptly -// interrupted. The contents of files that are transferred to the destination -// might be incomplete or inconsistent with the source files. However, if you -// start a new task execution on the same task and you allow the task execution -// to complete, file content on the destination is complete and consistent. -// This applies to other unexpected failures that interrupt a task execution. -// In all of these cases, AWS DataSync successfully complete the transfer when -// you start the next task execution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation CancelTaskExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CancelTaskExecution -func (c *DataSync) CancelTaskExecution(input *CancelTaskExecutionInput) (*CancelTaskExecutionOutput, error) { - req, out := c.CancelTaskExecutionRequest(input) - return out, req.Send() -} - -// CancelTaskExecutionWithContext is the same as CancelTaskExecution with the addition of -// the ability to pass a context and additional request options. -// -// See CancelTaskExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) CancelTaskExecutionWithContext(ctx aws.Context, input *CancelTaskExecutionInput, opts ...request.Option) (*CancelTaskExecutionOutput, error) { - req, out := c.CancelTaskExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAgent = "CreateAgent" - -// CreateAgentRequest generates a "aws/request.Request" representing the -// client's request for the CreateAgent operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAgent for more information on using the CreateAgent -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAgentRequest method. -// req, resp := client.CreateAgentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateAgent -func (c *DataSync) CreateAgentRequest(input *CreateAgentInput) (req *request.Request, output *CreateAgentOutput) { - op := &request.Operation{ - Name: opCreateAgent, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAgentInput{} - } - - output = &CreateAgentOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAgent API operation for AWS DataSync. -// -// Activates an AWS DataSync agent that you have deployed on your host. The -// activation process associates your agent with your account. In the activation -// process, you specify information such as the AWS Region that you want to -// activate the agent in. You activate the agent in the AWS Region where your -// target locations (in Amazon S3 or Amazon EFS) reside. Your tasks are created -// in this AWS Region. -// -// You can use an agent for more than one location. If a task uses multiple -// agents, all of them need to have status AVAILABLE for the task to run. If -// you use multiple agents for a source location, the status of all the agents -// must be AVAILABLE for the task to run. For more information, see Activating -// a Sync Agent (https://docs.aws.amazon.com/sync-service/latest/userguide/working-with-sync-agents.html#activating-sync-agent) -// in the AWS DataSync User Guide. -// -// Agents are automatically updated by AWS on a regular basis, using a mechanism -// that ensures minimal interruption to your tasks. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation CreateAgent for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateAgent -func (c *DataSync) CreateAgent(input *CreateAgentInput) (*CreateAgentOutput, error) { - req, out := c.CreateAgentRequest(input) - return out, req.Send() -} - -// CreateAgentWithContext is the same as CreateAgent with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAgent for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) CreateAgentWithContext(ctx aws.Context, input *CreateAgentInput, opts ...request.Option) (*CreateAgentOutput, error) { - req, out := c.CreateAgentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLocationEfs = "CreateLocationEfs" - -// CreateLocationEfsRequest generates a "aws/request.Request" representing the -// client's request for the CreateLocationEfs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLocationEfs for more information on using the CreateLocationEfs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLocationEfsRequest method. -// req, resp := client.CreateLocationEfsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationEfs -func (c *DataSync) CreateLocationEfsRequest(input *CreateLocationEfsInput) (req *request.Request, output *CreateLocationEfsOutput) { - op := &request.Operation{ - Name: opCreateLocationEfs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLocationEfsInput{} - } - - output = &CreateLocationEfsOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLocationEfs API operation for AWS DataSync. -// -// Creates an endpoint for an Amazon EFS file system. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation CreateLocationEfs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationEfs -func (c *DataSync) CreateLocationEfs(input *CreateLocationEfsInput) (*CreateLocationEfsOutput, error) { - req, out := c.CreateLocationEfsRequest(input) - return out, req.Send() -} - -// CreateLocationEfsWithContext is the same as CreateLocationEfs with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLocationEfs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) CreateLocationEfsWithContext(ctx aws.Context, input *CreateLocationEfsInput, opts ...request.Option) (*CreateLocationEfsOutput, error) { - req, out := c.CreateLocationEfsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLocationNfs = "CreateLocationNfs" - -// CreateLocationNfsRequest generates a "aws/request.Request" representing the -// client's request for the CreateLocationNfs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLocationNfs for more information on using the CreateLocationNfs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLocationNfsRequest method. -// req, resp := client.CreateLocationNfsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationNfs -func (c *DataSync) CreateLocationNfsRequest(input *CreateLocationNfsInput) (req *request.Request, output *CreateLocationNfsOutput) { - op := &request.Operation{ - Name: opCreateLocationNfs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLocationNfsInput{} - } - - output = &CreateLocationNfsOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLocationNfs API operation for AWS DataSync. -// -// Creates an endpoint for a Network File System (NFS) file system. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation CreateLocationNfs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationNfs -func (c *DataSync) CreateLocationNfs(input *CreateLocationNfsInput) (*CreateLocationNfsOutput, error) { - req, out := c.CreateLocationNfsRequest(input) - return out, req.Send() -} - -// CreateLocationNfsWithContext is the same as CreateLocationNfs with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLocationNfs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) CreateLocationNfsWithContext(ctx aws.Context, input *CreateLocationNfsInput, opts ...request.Option) (*CreateLocationNfsOutput, error) { - req, out := c.CreateLocationNfsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLocationS3 = "CreateLocationS3" - -// CreateLocationS3Request generates a "aws/request.Request" representing the -// client's request for the CreateLocationS3 operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLocationS3 for more information on using the CreateLocationS3 -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLocationS3Request method. -// req, resp := client.CreateLocationS3Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationS3 -func (c *DataSync) CreateLocationS3Request(input *CreateLocationS3Input) (req *request.Request, output *CreateLocationS3Output) { - op := &request.Operation{ - Name: opCreateLocationS3, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLocationS3Input{} - } - - output = &CreateLocationS3Output{} - req = c.newRequest(op, input, output) - return -} - -// CreateLocationS3 API operation for AWS DataSync. -// -// Creates an endpoint for an Amazon S3 bucket. -// -// For AWS DataSync to access a destination S3 bucket, it needs an AWS Identity -// and Access Management (IAM) role that has the required permissions. You can -// set up the required permissions by creating an IAM policy that grants the -// required permissions and attaching the policy to the role. An example of -// such a policy is shown in the examples section. For more information, see -// Configuring Amazon S3 Location Settings (https://docs.aws.amazon.com/sync-service/latest/userguide/configuring-s3-locations.html) -// in the AWS DataSync User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation CreateLocationS3 for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationS3 -func (c *DataSync) CreateLocationS3(input *CreateLocationS3Input) (*CreateLocationS3Output, error) { - req, out := c.CreateLocationS3Request(input) - return out, req.Send() -} - -// CreateLocationS3WithContext is the same as CreateLocationS3 with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLocationS3 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) CreateLocationS3WithContext(ctx aws.Context, input *CreateLocationS3Input, opts ...request.Option) (*CreateLocationS3Output, error) { - req, out := c.CreateLocationS3Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTask = "CreateTask" - -// CreateTaskRequest generates a "aws/request.Request" representing the -// client's request for the CreateTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTask for more information on using the CreateTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTaskRequest method. -// req, resp := client.CreateTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateTask -func (c *DataSync) CreateTaskRequest(input *CreateTaskInput) (req *request.Request, output *CreateTaskOutput) { - op := &request.Operation{ - Name: opCreateTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTaskInput{} - } - - output = &CreateTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTask API operation for AWS DataSync. -// -// Creates a task. A task is a set of two locations (source and destination) -// and a set of default OverrideOptions that you use to control the behavior -// of a task. If you don't specify default values for Options when you create -// a task, AWS DataSync populates them with safe service defaults. -// -// When you initially create a task, it enters the INITIALIZING status and then -// the CREATING status. In CREATING status, AWS DataSync attempts to mount the -// source Network File System (NFS) location. The task transitions to the AVAILABLE -// status without waiting for the destination location to mount. Instead, AWS -// DataSync mounts a destination before every task execution and then unmounts -// it after every task execution. -// -// If an agent that is associated with a source (NFS) location goes offline, -// the task transitions to the UNAVAILABLE status. If the status of the task -// remains in the CREATING status for more than a few minutes, it means that -// your agent might be having trouble mounting the source NFS file system. Check -// the task's ErrorCode and ErrorDetail. Mount issues are often caused by either -// a misconfigured firewall or a mistyped NFS server host name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation CreateTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateTask -func (c *DataSync) CreateTask(input *CreateTaskInput) (*CreateTaskOutput, error) { - req, out := c.CreateTaskRequest(input) - return out, req.Send() -} - -// CreateTaskWithContext is the same as CreateTask with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) CreateTaskWithContext(ctx aws.Context, input *CreateTaskInput, opts ...request.Option) (*CreateTaskOutput, error) { - req, out := c.CreateTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAgent = "DeleteAgent" - -// DeleteAgentRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAgent operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAgent for more information on using the DeleteAgent -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAgentRequest method. -// req, resp := client.DeleteAgentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteAgent -func (c *DataSync) DeleteAgentRequest(input *DeleteAgentInput) (req *request.Request, output *DeleteAgentOutput) { - op := &request.Operation{ - Name: opDeleteAgent, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAgentInput{} - } - - output = &DeleteAgentOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAgent API operation for AWS DataSync. -// -// Deletes an agent. To specify which agent to delete, use the Amazon Resource -// Name (ARN) of the agent in your request. The operation disassociates the -// agent from your AWS account. However, it doesn't delete the agent virtual -// machine (VM) from your on-premises environment. -// -// After you delete an agent, you can't reactivate it and you longer pay software -// charges for 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 DataSync's -// API operation DeleteAgent for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteAgent -func (c *DataSync) DeleteAgent(input *DeleteAgentInput) (*DeleteAgentOutput, error) { - req, out := c.DeleteAgentRequest(input) - return out, req.Send() -} - -// DeleteAgentWithContext is the same as DeleteAgent with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAgent for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) DeleteAgentWithContext(ctx aws.Context, input *DeleteAgentInput, opts ...request.Option) (*DeleteAgentOutput, error) { - req, out := c.DeleteAgentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLocation = "DeleteLocation" - -// DeleteLocationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLocation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLocation for more information on using the DeleteLocation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLocationRequest method. -// req, resp := client.DeleteLocationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteLocation -func (c *DataSync) DeleteLocationRequest(input *DeleteLocationInput) (req *request.Request, output *DeleteLocationOutput) { - op := &request.Operation{ - Name: opDeleteLocation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLocationInput{} - } - - output = &DeleteLocationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLocation API operation for AWS DataSync. -// -// Deletes the configuration of a location used by AWS DataSync. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation DeleteLocation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteLocation -func (c *DataSync) DeleteLocation(input *DeleteLocationInput) (*DeleteLocationOutput, error) { - req, out := c.DeleteLocationRequest(input) - return out, req.Send() -} - -// DeleteLocationWithContext is the same as DeleteLocation with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLocation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) DeleteLocationWithContext(ctx aws.Context, input *DeleteLocationInput, opts ...request.Option) (*DeleteLocationOutput, error) { - req, out := c.DeleteLocationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTask = "DeleteTask" - -// DeleteTaskRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTask for more information on using the DeleteTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTaskRequest method. -// req, resp := client.DeleteTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteTask -func (c *DataSync) DeleteTaskRequest(input *DeleteTaskInput) (req *request.Request, output *DeleteTaskOutput) { - op := &request.Operation{ - Name: opDeleteTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTaskInput{} - } - - output = &DeleteTaskOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTask API operation for AWS DataSync. -// -// Deletes a task. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation DeleteTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteTask -func (c *DataSync) DeleteTask(input *DeleteTaskInput) (*DeleteTaskOutput, error) { - req, out := c.DeleteTaskRequest(input) - return out, req.Send() -} - -// DeleteTaskWithContext is the same as DeleteTask with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) DeleteTaskWithContext(ctx aws.Context, input *DeleteTaskInput, opts ...request.Option) (*DeleteTaskOutput, error) { - req, out := c.DeleteTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAgent = "DescribeAgent" - -// DescribeAgentRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAgent operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAgent for more information on using the DescribeAgent -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAgentRequest method. -// req, resp := client.DescribeAgentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeAgent -func (c *DataSync) DescribeAgentRequest(input *DescribeAgentInput) (req *request.Request, output *DescribeAgentOutput) { - op := &request.Operation{ - Name: opDescribeAgent, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAgentInput{} - } - - output = &DescribeAgentOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAgent API operation for AWS DataSync. -// -// Returns metadata such as the name, the network interfaces, and the status -// (that is, whether the agent is running or not) for an agent. To specify which -// agent to describe, use the Amazon Resource Name (ARN) of the agent in your -// request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation DescribeAgent for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeAgent -func (c *DataSync) DescribeAgent(input *DescribeAgentInput) (*DescribeAgentOutput, error) { - req, out := c.DescribeAgentRequest(input) - return out, req.Send() -} - -// DescribeAgentWithContext is the same as DescribeAgent with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAgent for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) DescribeAgentWithContext(ctx aws.Context, input *DescribeAgentInput, opts ...request.Option) (*DescribeAgentOutput, error) { - req, out := c.DescribeAgentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLocationEfs = "DescribeLocationEfs" - -// DescribeLocationEfsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLocationEfs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLocationEfs for more information on using the DescribeLocationEfs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLocationEfsRequest method. -// req, resp := client.DescribeLocationEfsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationEfs -func (c *DataSync) DescribeLocationEfsRequest(input *DescribeLocationEfsInput) (req *request.Request, output *DescribeLocationEfsOutput) { - op := &request.Operation{ - Name: opDescribeLocationEfs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLocationEfsInput{} - } - - output = &DescribeLocationEfsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLocationEfs API operation for AWS DataSync. -// -// Returns metadata, such as the path information about an Amazon EFS location. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation DescribeLocationEfs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationEfs -func (c *DataSync) DescribeLocationEfs(input *DescribeLocationEfsInput) (*DescribeLocationEfsOutput, error) { - req, out := c.DescribeLocationEfsRequest(input) - return out, req.Send() -} - -// DescribeLocationEfsWithContext is the same as DescribeLocationEfs with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLocationEfs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) DescribeLocationEfsWithContext(ctx aws.Context, input *DescribeLocationEfsInput, opts ...request.Option) (*DescribeLocationEfsOutput, error) { - req, out := c.DescribeLocationEfsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLocationNfs = "DescribeLocationNfs" - -// DescribeLocationNfsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLocationNfs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLocationNfs for more information on using the DescribeLocationNfs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLocationNfsRequest method. -// req, resp := client.DescribeLocationNfsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationNfs -func (c *DataSync) DescribeLocationNfsRequest(input *DescribeLocationNfsInput) (req *request.Request, output *DescribeLocationNfsOutput) { - op := &request.Operation{ - Name: opDescribeLocationNfs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLocationNfsInput{} - } - - output = &DescribeLocationNfsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLocationNfs API operation for AWS DataSync. -// -// Returns metadata, such as the path information, about a NFS location. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation DescribeLocationNfs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationNfs -func (c *DataSync) DescribeLocationNfs(input *DescribeLocationNfsInput) (*DescribeLocationNfsOutput, error) { - req, out := c.DescribeLocationNfsRequest(input) - return out, req.Send() -} - -// DescribeLocationNfsWithContext is the same as DescribeLocationNfs with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLocationNfs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) DescribeLocationNfsWithContext(ctx aws.Context, input *DescribeLocationNfsInput, opts ...request.Option) (*DescribeLocationNfsOutput, error) { - req, out := c.DescribeLocationNfsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLocationS3 = "DescribeLocationS3" - -// DescribeLocationS3Request generates a "aws/request.Request" representing the -// client's request for the DescribeLocationS3 operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLocationS3 for more information on using the DescribeLocationS3 -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLocationS3Request method. -// req, resp := client.DescribeLocationS3Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationS3 -func (c *DataSync) DescribeLocationS3Request(input *DescribeLocationS3Input) (req *request.Request, output *DescribeLocationS3Output) { - op := &request.Operation{ - Name: opDescribeLocationS3, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLocationS3Input{} - } - - output = &DescribeLocationS3Output{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLocationS3 API operation for AWS DataSync. -// -// Returns metadata, such as bucket name, about an Amazon S3 bucket location. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation DescribeLocationS3 for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationS3 -func (c *DataSync) DescribeLocationS3(input *DescribeLocationS3Input) (*DescribeLocationS3Output, error) { - req, out := c.DescribeLocationS3Request(input) - return out, req.Send() -} - -// DescribeLocationS3WithContext is the same as DescribeLocationS3 with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLocationS3 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) DescribeLocationS3WithContext(ctx aws.Context, input *DescribeLocationS3Input, opts ...request.Option) (*DescribeLocationS3Output, error) { - req, out := c.DescribeLocationS3Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTask = "DescribeTask" - -// DescribeTaskRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTask for more information on using the DescribeTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTaskRequest method. -// req, resp := client.DescribeTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTask -func (c *DataSync) DescribeTaskRequest(input *DescribeTaskInput) (req *request.Request, output *DescribeTaskOutput) { - op := &request.Operation{ - Name: opDescribeTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTaskInput{} - } - - output = &DescribeTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTask API operation for AWS DataSync. -// -// Returns metadata about a task. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation DescribeTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTask -func (c *DataSync) DescribeTask(input *DescribeTaskInput) (*DescribeTaskOutput, error) { - req, out := c.DescribeTaskRequest(input) - return out, req.Send() -} - -// DescribeTaskWithContext is the same as DescribeTask with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) DescribeTaskWithContext(ctx aws.Context, input *DescribeTaskInput, opts ...request.Option) (*DescribeTaskOutput, error) { - req, out := c.DescribeTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTaskExecution = "DescribeTaskExecution" - -// DescribeTaskExecutionRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTaskExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTaskExecution for more information on using the DescribeTaskExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTaskExecutionRequest method. -// req, resp := client.DescribeTaskExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTaskExecution -func (c *DataSync) DescribeTaskExecutionRequest(input *DescribeTaskExecutionInput) (req *request.Request, output *DescribeTaskExecutionOutput) { - op := &request.Operation{ - Name: opDescribeTaskExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTaskExecutionInput{} - } - - output = &DescribeTaskExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTaskExecution API operation for AWS DataSync. -// -// Returns detailed metadata about a task that is being executed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation DescribeTaskExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTaskExecution -func (c *DataSync) DescribeTaskExecution(input *DescribeTaskExecutionInput) (*DescribeTaskExecutionOutput, error) { - req, out := c.DescribeTaskExecutionRequest(input) - return out, req.Send() -} - -// DescribeTaskExecutionWithContext is the same as DescribeTaskExecution with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTaskExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) DescribeTaskExecutionWithContext(ctx aws.Context, input *DescribeTaskExecutionInput, opts ...request.Option) (*DescribeTaskExecutionOutput, error) { - req, out := c.DescribeTaskExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAgents = "ListAgents" - -// ListAgentsRequest generates a "aws/request.Request" representing the -// client's request for the ListAgents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAgents for more information on using the ListAgents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAgentsRequest method. -// req, resp := client.ListAgentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListAgents -func (c *DataSync) ListAgentsRequest(input *ListAgentsInput) (req *request.Request, output *ListAgentsOutput) { - op := &request.Operation{ - Name: opListAgents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListAgentsInput{} - } - - output = &ListAgentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAgents API operation for AWS DataSync. -// -// Returns a list of agents owned by an AWS account in the AWS Region specified -// in the request. The returned list is ordered by agent Amazon Resource Name -// (ARN). -// -// By default, this operation returns a maximum of 100 agents. This operation -// supports pagination that enables you to optionally reduce the number of agents -// returned in a response. -// -// If you have more agents than are returned in a response (that is, the response -// returns only a truncated list of your agents), the response contains a marker -// that you can specify in your next request to fetch the next page of agents. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation ListAgents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListAgents -func (c *DataSync) ListAgents(input *ListAgentsInput) (*ListAgentsOutput, error) { - req, out := c.ListAgentsRequest(input) - return out, req.Send() -} - -// ListAgentsWithContext is the same as ListAgents with the addition of -// the ability to pass a context and additional request options. -// -// See ListAgents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) ListAgentsWithContext(ctx aws.Context, input *ListAgentsInput, opts ...request.Option) (*ListAgentsOutput, error) { - req, out := c.ListAgentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAgentsPages iterates over the pages of a ListAgents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAgents 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 ListAgents operation. -// pageNum := 0 -// err := client.ListAgentsPages(params, -// func(page *ListAgentsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DataSync) ListAgentsPages(input *ListAgentsInput, fn func(*ListAgentsOutput, bool) bool) error { - return c.ListAgentsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAgentsPagesWithContext same as ListAgentsPages 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 *DataSync) ListAgentsPagesWithContext(ctx aws.Context, input *ListAgentsInput, fn func(*ListAgentsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAgentsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAgentsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAgentsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListLocations = "ListLocations" - -// ListLocationsRequest generates a "aws/request.Request" representing the -// client's request for the ListLocations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListLocations for more information on using the ListLocations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListLocationsRequest method. -// req, resp := client.ListLocationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListLocations -func (c *DataSync) ListLocationsRequest(input *ListLocationsInput) (req *request.Request, output *ListLocationsOutput) { - op := &request.Operation{ - Name: opListLocations, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListLocationsInput{} - } - - output = &ListLocationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListLocations API operation for AWS DataSync. -// -// Returns a lists of source and destination locations. -// -// If you have more locations than are returned in a response (that is, the -// response returns only a truncated list of your agents), the response contains -// a token that you can specify in your next request to fetch the next page -// of locations. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation ListLocations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListLocations -func (c *DataSync) ListLocations(input *ListLocationsInput) (*ListLocationsOutput, error) { - req, out := c.ListLocationsRequest(input) - return out, req.Send() -} - -// ListLocationsWithContext is the same as ListLocations with the addition of -// the ability to pass a context and additional request options. -// -// See ListLocations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) ListLocationsWithContext(ctx aws.Context, input *ListLocationsInput, opts ...request.Option) (*ListLocationsOutput, error) { - req, out := c.ListLocationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListLocationsPages iterates over the pages of a ListLocations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListLocations 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 ListLocations operation. -// pageNum := 0 -// err := client.ListLocationsPages(params, -// func(page *ListLocationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DataSync) ListLocationsPages(input *ListLocationsInput, fn func(*ListLocationsOutput, bool) bool) error { - return c.ListLocationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListLocationsPagesWithContext same as ListLocationsPages 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 *DataSync) ListLocationsPagesWithContext(ctx aws.Context, input *ListLocationsInput, fn func(*ListLocationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListLocationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListLocationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListLocationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTagsForResource = "ListTagsForResource" - -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the 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/datasync-2018-11-09/ListTagsForResource -func (c *DataSync) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for AWS DataSync. -// -// Returns all the tags associated with a specified resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTagsForResource -func (c *DataSync) 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 *DataSync) 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() -} - -// ListTagsForResourcePages iterates over the pages of a ListTagsForResource operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTagsForResource 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 ListTagsForResource operation. -// pageNum := 0 -// err := client.ListTagsForResourcePages(params, -// func(page *ListTagsForResourceOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DataSync) ListTagsForResourcePages(input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool) error { - return c.ListTagsForResourcePagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTagsForResourcePagesWithContext same as ListTagsForResourcePages 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 *DataSync) ListTagsForResourcePagesWithContext(ctx aws.Context, input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTagsForResourceInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTagsForResourceRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTaskExecutions = "ListTaskExecutions" - -// ListTaskExecutionsRequest generates a "aws/request.Request" representing the -// client's request for the ListTaskExecutions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTaskExecutions for more information on using the ListTaskExecutions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTaskExecutionsRequest method. -// req, resp := client.ListTaskExecutionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTaskExecutions -func (c *DataSync) ListTaskExecutionsRequest(input *ListTaskExecutionsInput) (req *request.Request, output *ListTaskExecutionsOutput) { - op := &request.Operation{ - Name: opListTaskExecutions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTaskExecutionsInput{} - } - - output = &ListTaskExecutionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTaskExecutions API operation for AWS DataSync. -// -// Returns a list of executed tasks. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation ListTaskExecutions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTaskExecutions -func (c *DataSync) ListTaskExecutions(input *ListTaskExecutionsInput) (*ListTaskExecutionsOutput, error) { - req, out := c.ListTaskExecutionsRequest(input) - return out, req.Send() -} - -// ListTaskExecutionsWithContext is the same as ListTaskExecutions with the addition of -// the ability to pass a context and additional request options. -// -// See ListTaskExecutions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) ListTaskExecutionsWithContext(ctx aws.Context, input *ListTaskExecutionsInput, opts ...request.Option) (*ListTaskExecutionsOutput, error) { - req, out := c.ListTaskExecutionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTaskExecutionsPages iterates over the pages of a ListTaskExecutions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTaskExecutions 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 ListTaskExecutions operation. -// pageNum := 0 -// err := client.ListTaskExecutionsPages(params, -// func(page *ListTaskExecutionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DataSync) ListTaskExecutionsPages(input *ListTaskExecutionsInput, fn func(*ListTaskExecutionsOutput, bool) bool) error { - return c.ListTaskExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTaskExecutionsPagesWithContext same as ListTaskExecutionsPages 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 *DataSync) ListTaskExecutionsPagesWithContext(ctx aws.Context, input *ListTaskExecutionsInput, fn func(*ListTaskExecutionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTaskExecutionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTaskExecutionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTaskExecutionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTasks = "ListTasks" - -// ListTasksRequest generates a "aws/request.Request" representing the -// client's request for the ListTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTasks for more information on using the ListTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTasksRequest method. -// req, resp := client.ListTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTasks -func (c *DataSync) ListTasksRequest(input *ListTasksInput) (req *request.Request, output *ListTasksOutput) { - op := &request.Operation{ - Name: opListTasks, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTasksInput{} - } - - output = &ListTasksOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTasks API operation for AWS DataSync. -// -// Returns a list of all the tasks. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation ListTasks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTasks -func (c *DataSync) ListTasks(input *ListTasksInput) (*ListTasksOutput, error) { - req, out := c.ListTasksRequest(input) - return out, req.Send() -} - -// ListTasksWithContext is the same as ListTasks with the addition of -// the ability to pass a context and additional request options. -// -// See ListTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) ListTasksWithContext(ctx aws.Context, input *ListTasksInput, opts ...request.Option) (*ListTasksOutput, error) { - req, out := c.ListTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTasksPages iterates over the pages of a ListTasks operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTasks 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 ListTasks operation. -// pageNum := 0 -// err := client.ListTasksPages(params, -// func(page *ListTasksOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DataSync) ListTasksPages(input *ListTasksInput, fn func(*ListTasksOutput, bool) bool) error { - return c.ListTasksPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTasksPagesWithContext same as ListTasksPages 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 *DataSync) ListTasksPagesWithContext(ctx aws.Context, input *ListTasksInput, fn func(*ListTasksOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTasksOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opStartTaskExecution = "StartTaskExecution" - -// StartTaskExecutionRequest generates a "aws/request.Request" representing the -// client's request for the StartTaskExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartTaskExecution for more information on using the StartTaskExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartTaskExecutionRequest method. -// req, resp := client.StartTaskExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/StartTaskExecution -func (c *DataSync) StartTaskExecutionRequest(input *StartTaskExecutionInput) (req *request.Request, output *StartTaskExecutionOutput) { - op := &request.Operation{ - Name: opStartTaskExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartTaskExecutionInput{} - } - - output = &StartTaskExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartTaskExecution API operation for AWS DataSync. -// -// Starts a specific invocation of a task. A TaskExecution value represents -// an individual run of a task. Each task can have at most one TaskExecution -// at a time. -// -// TaskExecution has the following transition phases: INITIALIZING | PREPARING -// | TRANSFERRING | VERIFYING | SUCCESS/FAILURE. -// -// For detailed information, see Task Execution in Components and Terminology -// (https://docs.aws.amazon.com/sync-service/latest/userguide/how-awssync-works.html#terminology) -// in the AWS DataSync User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation StartTaskExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/StartTaskExecution -func (c *DataSync) StartTaskExecution(input *StartTaskExecutionInput) (*StartTaskExecutionOutput, error) { - req, out := c.StartTaskExecutionRequest(input) - return out, req.Send() -} - -// StartTaskExecutionWithContext is the same as StartTaskExecution with the addition of -// the ability to pass a context and additional request options. -// -// See StartTaskExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) StartTaskExecutionWithContext(ctx aws.Context, input *StartTaskExecutionInput, opts ...request.Option) (*StartTaskExecutionOutput, error) { - req, out := c.StartTaskExecutionRequest(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/datasync-2018-11-09/TagResource -func (c *DataSync) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for AWS DataSync. -// -// Applies a key-value pair to an AWS 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 DataSync's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/TagResource -func (c *DataSync) 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 *DataSync) 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/datasync-2018-11-09/UntagResource -func (c *DataSync) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for AWS DataSync. -// -// Removes a tag from an AWS 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 DataSync's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UntagResource -func (c *DataSync) 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 *DataSync) 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 opUpdateAgent = "UpdateAgent" - -// UpdateAgentRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAgent operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAgent for more information on using the UpdateAgent -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAgentRequest method. -// req, resp := client.UpdateAgentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateAgent -func (c *DataSync) UpdateAgentRequest(input *UpdateAgentInput) (req *request.Request, output *UpdateAgentOutput) { - op := &request.Operation{ - Name: opUpdateAgent, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAgentInput{} - } - - output = &UpdateAgentOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateAgent API operation for AWS DataSync. -// -// Updates the name of an agent. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation UpdateAgent for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateAgent -func (c *DataSync) UpdateAgent(input *UpdateAgentInput) (*UpdateAgentOutput, error) { - req, out := c.UpdateAgentRequest(input) - return out, req.Send() -} - -// UpdateAgentWithContext is the same as UpdateAgent with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAgent for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) UpdateAgentWithContext(ctx aws.Context, input *UpdateAgentInput, opts ...request.Option) (*UpdateAgentOutput, error) { - req, out := c.UpdateAgentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateTask = "UpdateTask" - -// UpdateTaskRequest generates a "aws/request.Request" representing the -// client's request for the UpdateTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateTask for more information on using the UpdateTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateTaskRequest method. -// req, resp := client.UpdateTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateTask -func (c *DataSync) UpdateTaskRequest(input *UpdateTaskInput) (req *request.Request, output *UpdateTaskOutput) { - op := &request.Operation{ - Name: opUpdateTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateTaskInput{} - } - - output = &UpdateTaskOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateTask API operation for AWS DataSync. -// -// Updates the metadata associated with a task. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS DataSync's -// API operation UpdateTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateTask -func (c *DataSync) UpdateTask(input *UpdateTaskInput) (*UpdateTaskOutput, error) { - req, out := c.UpdateTaskRequest(input) - return out, req.Send() -} - -// UpdateTaskWithContext is the same as UpdateTask with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DataSync) UpdateTaskWithContext(ctx aws.Context, input *UpdateTaskInput, opts ...request.Option) (*UpdateTaskOutput, error) { - req, out := c.UpdateTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Represents a single entry in a list of agents. AgentListEntry returns an -// array that contains a list of agents when the ListAgents operation is called. -type AgentListEntry struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the agent. - AgentArn *string `type:"string"` - - // The name of the agent. - Name *string `min:"1" type:"string"` - - // The status of the agent. - Status *string `type:"string" enum:"AgentStatus"` -} - -// String returns the string representation -func (s AgentListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AgentListEntry) GoString() string { - return s.String() -} - -// SetAgentArn sets the AgentArn field's value. -func (s *AgentListEntry) SetAgentArn(v string) *AgentListEntry { - s.AgentArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *AgentListEntry) SetName(v string) *AgentListEntry { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AgentListEntry) SetStatus(v string) *AgentListEntry { - s.Status = &v - return s -} - -// CancelTaskExecutionRequest -type CancelTaskExecutionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the task execution to cancel. - // - // TaskExecutionArn is a required field - TaskExecutionArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelTaskExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelTaskExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelTaskExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelTaskExecutionInput"} - if s.TaskExecutionArn == nil { - invalidParams.Add(request.NewErrParamRequired("TaskExecutionArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTaskExecutionArn sets the TaskExecutionArn field's value. -func (s *CancelTaskExecutionInput) SetTaskExecutionArn(v string) *CancelTaskExecutionInput { - s.TaskExecutionArn = &v - return s -} - -type CancelTaskExecutionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CancelTaskExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelTaskExecutionOutput) GoString() string { - return s.String() -} - -// CreateAgentRequest -type CreateAgentInput struct { - _ struct{} `type:"structure"` - - // Your agent activation key. You can get the activation key either by sending - // an HTTP GET request with redirects that enable you to get the agent IP address - // (port 80). Alternatively, you can get it from the AWS DataSync console. - // - // The redirect URL returned in the response provides you the activation key - // for your agent in the query string parameter activationKey. It might also - // include other activation-related parameters; however, these are merely defaults. - // The arguments you pass to this API call determine the actual configuration - // of your agent. For more information, see Activating a Sync Agent (https://docs.aws.amazon.com/sync-service/latest/userguide/working-with-sync-agents.html#activating-sync-agent) - // in the AWS DataSync User Guide. - // - // ActivationKey is a required field - ActivationKey *string `type:"string" required:"true"` - - // The name you configured for your agent. This value is a text reference that - // is used to identify the agent in the console. - AgentName *string `min:"1" type:"string"` - - // The key-value pair that represents the tag you want to associate with the - // agent. The value can be an empty string. This value helps you manage, filter, - // and search for your agents. - // - // Valid characters for key and value are letters, spaces, and numbers representable - // in UTF-8 format, and the following special characters: + - = . _ : / @. - Tags []*TagListEntry `type:"list"` -} - -// String returns the string representation -func (s CreateAgentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAgentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAgentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAgentInput"} - if s.ActivationKey == nil { - invalidParams.Add(request.NewErrParamRequired("ActivationKey")) - } - if s.AgentName != nil && len(*s.AgentName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AgentName", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivationKey sets the ActivationKey field's value. -func (s *CreateAgentInput) SetActivationKey(v string) *CreateAgentInput { - s.ActivationKey = &v - return s -} - -// SetAgentName sets the AgentName field's value. -func (s *CreateAgentInput) SetAgentName(v string) *CreateAgentInput { - s.AgentName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateAgentInput) SetTags(v []*TagListEntry) *CreateAgentInput { - s.Tags = v - return s -} - -// CreateAgentResponse -type CreateAgentOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the agent. Use the ListAgents operation - // to return a list of agents for your account and AWS Region. - AgentArn *string `type:"string"` -} - -// String returns the string representation -func (s CreateAgentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAgentOutput) GoString() string { - return s.String() -} - -// SetAgentArn sets the AgentArn field's value. -func (s *CreateAgentOutput) SetAgentArn(v string) *CreateAgentOutput { - s.AgentArn = &v - return s -} - -// CreateLocationEfsRequest -type CreateLocationEfsInput struct { - _ struct{} `type:"structure"` - - // The subnet and security group that the Amazon EFS file system uses. - // - // Ec2Config is a required field - Ec2Config *Ec2Config `type:"structure" required:"true"` - - // The Amazon Resource Name (ARN) for the Amazon EFS file system. - // - // EfsFilesystemArn is a required field - EfsFilesystemArn *string `type:"string" required:"true"` - - // A subdirectory in the location’s path. This subdirectory in the EFS file - // system is used to read data from the EFS source location or write data to - // the EFS destination. By default, AWS DataSync uses the root directory. - // - // Subdirectory is a required field - Subdirectory *string `type:"string" required:"true"` - - // The key-value pair that represents a tag that you want to add to the resource. - // The value can be an empty string. This value helps you manage, filter, and - // search for your resources. We recommend that you create a name tag for your - // location. - Tags []*TagListEntry `type:"list"` -} - -// String returns the string representation -func (s CreateLocationEfsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLocationEfsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLocationEfsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLocationEfsInput"} - if s.Ec2Config == nil { - invalidParams.Add(request.NewErrParamRequired("Ec2Config")) - } - if s.EfsFilesystemArn == nil { - invalidParams.Add(request.NewErrParamRequired("EfsFilesystemArn")) - } - if s.Subdirectory == nil { - invalidParams.Add(request.NewErrParamRequired("Subdirectory")) - } - if s.Ec2Config != nil { - if err := s.Ec2Config.Validate(); err != nil { - invalidParams.AddNested("Ec2Config", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEc2Config sets the Ec2Config field's value. -func (s *CreateLocationEfsInput) SetEc2Config(v *Ec2Config) *CreateLocationEfsInput { - s.Ec2Config = v - return s -} - -// SetEfsFilesystemArn sets the EfsFilesystemArn field's value. -func (s *CreateLocationEfsInput) SetEfsFilesystemArn(v string) *CreateLocationEfsInput { - s.EfsFilesystemArn = &v - return s -} - -// SetSubdirectory sets the Subdirectory field's value. -func (s *CreateLocationEfsInput) SetSubdirectory(v string) *CreateLocationEfsInput { - s.Subdirectory = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateLocationEfsInput) SetTags(v []*TagListEntry) *CreateLocationEfsInput { - s.Tags = v - return s -} - -// CreateLocationEfs -type CreateLocationEfsOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the Amazon EFS file system location that - // is created. - LocationArn *string `type:"string"` -} - -// String returns the string representation -func (s CreateLocationEfsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLocationEfsOutput) GoString() string { - return s.String() -} - -// SetLocationArn sets the LocationArn field's value. -func (s *CreateLocationEfsOutput) SetLocationArn(v string) *CreateLocationEfsOutput { - s.LocationArn = &v - return s -} - -// CreateLocationNfsRequest -type CreateLocationNfsInput struct { - _ struct{} `type:"structure"` - - // Contains a list of Amazon Resource Names (ARNs) of agents that are used to - // connect to an NFS server. - // - // OnPremConfig is a required field - OnPremConfig *OnPremConfig `type:"structure" required:"true"` - - // The name of the NFS server. This value is the IP address or Domain Name Service - // (DNS) name of the NFS server. An agent that is installed on-premises uses - // this host name to mount the NFS server in a network. - // - // This name must either be DNS-compliant or must be an IP version 4 (IPv4) - // address. - // - // ServerHostname is a required field - ServerHostname *string `type:"string" required:"true"` - - // The subdirectory in the NFS file system that is used to read data from the - // NFS source location or write data to the NFS destination. The NFS path should - // be a path that's exported by the NFS server, or a subdirectory of that path. - // The path should be such that it can be mounted by other NFS clients in your - // network. - // - // To see all the paths exported by your NFS server. run "showmount -e nfs-server-name" - // from an NFS client that has access to your server. You can specify any directory - // that appears in the results, and any subdirectory of that directory. Ensure - // that the NFS export is accessible without Kerberos authentication. - // - // To transfer all the data in the folder you specified, DataSync needs to have - // permissions to read all the data. To ensure this, either configure the NFS - // export with no_root_squash, or ensure that the permissions for all of the - // files that you want sync allow read access for all users. Doing either enables - // the agent to read the files. For the agent to access directories, you must - // additionally enable all execute access. For information about NFS export - // configuration, see 18.7. The /etc/exports Configuration File (https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-nfs-server-config-exports.html) - // in the Centos documentation. - // - // Subdirectory is a required field - Subdirectory *string `type:"string" required:"true"` - - // The key-value pair that represents the tag that you want to add to the location. - // The value can be an empty string. We recommend using tags to name your resources. - Tags []*TagListEntry `type:"list"` -} - -// String returns the string representation -func (s CreateLocationNfsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLocationNfsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLocationNfsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLocationNfsInput"} - if s.OnPremConfig == nil { - invalidParams.Add(request.NewErrParamRequired("OnPremConfig")) - } - if s.ServerHostname == nil { - invalidParams.Add(request.NewErrParamRequired("ServerHostname")) - } - if s.Subdirectory == nil { - invalidParams.Add(request.NewErrParamRequired("Subdirectory")) - } - if s.OnPremConfig != nil { - if err := s.OnPremConfig.Validate(); err != nil { - invalidParams.AddNested("OnPremConfig", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOnPremConfig sets the OnPremConfig field's value. -func (s *CreateLocationNfsInput) SetOnPremConfig(v *OnPremConfig) *CreateLocationNfsInput { - s.OnPremConfig = v - return s -} - -// SetServerHostname sets the ServerHostname field's value. -func (s *CreateLocationNfsInput) SetServerHostname(v string) *CreateLocationNfsInput { - s.ServerHostname = &v - return s -} - -// SetSubdirectory sets the Subdirectory field's value. -func (s *CreateLocationNfsInput) SetSubdirectory(v string) *CreateLocationNfsInput { - s.Subdirectory = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateLocationNfsInput) SetTags(v []*TagListEntry) *CreateLocationNfsInput { - s.Tags = v - return s -} - -// CreateLocationNfsResponse -type CreateLocationNfsOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the source NFS file system location that - // is created. - LocationArn *string `type:"string"` -} - -// String returns the string representation -func (s CreateLocationNfsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLocationNfsOutput) GoString() string { - return s.String() -} - -// SetLocationArn sets the LocationArn field's value. -func (s *CreateLocationNfsOutput) SetLocationArn(v string) *CreateLocationNfsOutput { - s.LocationArn = &v - return s -} - -// CreateLocationS3Request -type CreateLocationS3Input struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the Amazon S3 bucket. - // - // S3BucketArn is a required field - S3BucketArn *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the AWS Identity and Access Management - // (IAM) role that is used to access an Amazon S3 bucket. For detailed information - // about using such a role, see Components and Terminology (https://alpha-aws-docs.aws.amazon.com/sync-service/latest/userguide/create-locations-cli.html#create-location-s3-cli) - // in the AWS DataSync User Guide. - // - // S3Config is a required field - S3Config *S3Config `type:"structure" required:"true"` - - // A subdirectory in the Amazon S3 bucket. This subdirectory in Amazon S3 is - // used to read data from the S3 source location or write data to the S3 destination. - // - // Subdirectory is a required field - Subdirectory *string `type:"string" required:"true"` - - // The key-value pair that represents the tag that you want to add to the location. - // The value can be an empty string. We recommend using tags to name your resources. - Tags []*TagListEntry `type:"list"` -} - -// String returns the string representation -func (s CreateLocationS3Input) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLocationS3Input) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLocationS3Input) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLocationS3Input"} - if s.S3BucketArn == nil { - invalidParams.Add(request.NewErrParamRequired("S3BucketArn")) - } - if s.S3Config == nil { - invalidParams.Add(request.NewErrParamRequired("S3Config")) - } - if s.Subdirectory == nil { - invalidParams.Add(request.NewErrParamRequired("Subdirectory")) - } - if s.S3Config != nil { - if err := s.S3Config.Validate(); err != nil { - invalidParams.AddNested("S3Config", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3BucketArn sets the S3BucketArn field's value. -func (s *CreateLocationS3Input) SetS3BucketArn(v string) *CreateLocationS3Input { - s.S3BucketArn = &v - return s -} - -// SetS3Config sets the S3Config field's value. -func (s *CreateLocationS3Input) SetS3Config(v *S3Config) *CreateLocationS3Input { - s.S3Config = v - return s -} - -// SetSubdirectory sets the Subdirectory field's value. -func (s *CreateLocationS3Input) SetSubdirectory(v string) *CreateLocationS3Input { - s.Subdirectory = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateLocationS3Input) SetTags(v []*TagListEntry) *CreateLocationS3Input { - s.Tags = v - return s -} - -// CreateLocationS3Response -type CreateLocationS3Output struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the source Amazon S3 bucket location that - // is created. - LocationArn *string `type:"string"` -} - -// String returns the string representation -func (s CreateLocationS3Output) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLocationS3Output) GoString() string { - return s.String() -} - -// SetLocationArn sets the LocationArn field's value. -func (s *CreateLocationS3Output) SetLocationArn(v string) *CreateLocationS3Output { - s.LocationArn = &v - return s -} - -// CreateTaskRequest -type CreateTaskInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is - // used to monitor and log events in the task. For more information on these - // groups, see Working with Log Groups and Log Streams (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html) - // in the Amazon CloudWatch User Guide. - // - // For more information about how to useCloudWatchLogs with DataSync, see Monitoring - // Your Task (https://docs.aws.amazon.com/datasync/latest/userguide/monitor-datasync.html). - CloudWatchLogGroupArn *string `type:"string"` - - // The Amazon Resource Name (ARN) of an AWS storage resource's location. - // - // DestinationLocationArn is a required field - DestinationLocationArn *string `type:"string" required:"true"` - - // The name of a task. This value is a text reference that is used to identify - // the task in the console. - Name *string `min:"1" type:"string"` - - // The set of configuration options that control the behavior of a single execution - // of the task that occurs when you call StartTaskExecution. You can configure - // these options to preserve metadata such as user ID (UID) and group ID (GID), - // file permissions, data integrity verification, and so on. - // - // For each individual task execution, you can override these options by specifying - // the OverrideOptions before starting a the task execution. For more information, - // see the operation. - Options *Options `type:"structure"` - - // The Amazon Resource Name (ARN) of the source location for the task. - // - // SourceLocationArn is a required field - SourceLocationArn *string `type:"string" required:"true"` - - // The key-value pair that represents the tag that you want to add to the resource. - // The value can be an empty string. - Tags []*TagListEntry `type:"list"` -} - -// String returns the string representation -func (s CreateTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTaskInput"} - if s.DestinationLocationArn == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationLocationArn")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.SourceLocationArn == nil { - invalidParams.Add(request.NewErrParamRequired("SourceLocationArn")) - } - if s.Options != nil { - if err := s.Options.Validate(); err != nil { - invalidParams.AddNested("Options", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchLogGroupArn sets the CloudWatchLogGroupArn field's value. -func (s *CreateTaskInput) SetCloudWatchLogGroupArn(v string) *CreateTaskInput { - s.CloudWatchLogGroupArn = &v - return s -} - -// SetDestinationLocationArn sets the DestinationLocationArn field's value. -func (s *CreateTaskInput) SetDestinationLocationArn(v string) *CreateTaskInput { - s.DestinationLocationArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateTaskInput) SetName(v string) *CreateTaskInput { - s.Name = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *CreateTaskInput) SetOptions(v *Options) *CreateTaskInput { - s.Options = v - return s -} - -// SetSourceLocationArn sets the SourceLocationArn field's value. -func (s *CreateTaskInput) SetSourceLocationArn(v string) *CreateTaskInput { - s.SourceLocationArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateTaskInput) SetTags(v []*TagListEntry) *CreateTaskInput { - s.Tags = v - return s -} - -// CreateTaskResponse -type CreateTaskOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the task. - TaskArn *string `type:"string"` -} - -// String returns the string representation -func (s CreateTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTaskOutput) GoString() string { - return s.String() -} - -// SetTaskArn sets the TaskArn field's value. -func (s *CreateTaskOutput) SetTaskArn(v string) *CreateTaskOutput { - s.TaskArn = &v - return s -} - -// DeleteAgentRequest -type DeleteAgentInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the agent to delete. Use the ListAgents - // operation to return a list of agents for your account and AWS Region. - // - // AgentArn is a required field - AgentArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAgentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAgentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAgentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAgentInput"} - if s.AgentArn == nil { - invalidParams.Add(request.NewErrParamRequired("AgentArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAgentArn sets the AgentArn field's value. -func (s *DeleteAgentInput) SetAgentArn(v string) *DeleteAgentInput { - s.AgentArn = &v - return s -} - -type DeleteAgentOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAgentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAgentOutput) GoString() string { - return s.String() -} - -// DeleteLocation -type DeleteLocationInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the location to delete. - // - // LocationArn is a required field - LocationArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLocationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLocationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLocationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLocationInput"} - if s.LocationArn == nil { - invalidParams.Add(request.NewErrParamRequired("LocationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLocationArn sets the LocationArn field's value. -func (s *DeleteLocationInput) SetLocationArn(v string) *DeleteLocationInput { - s.LocationArn = &v - return s -} - -type DeleteLocationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLocationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLocationOutput) GoString() string { - return s.String() -} - -// DeleteTask -type DeleteTaskInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the task to delete. - // - // TaskArn is a required field - TaskArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTaskInput"} - if s.TaskArn == nil { - invalidParams.Add(request.NewErrParamRequired("TaskArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTaskArn sets the TaskArn field's value. -func (s *DeleteTaskInput) SetTaskArn(v string) *DeleteTaskInput { - s.TaskArn = &v - return s -} - -type DeleteTaskOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTaskOutput) GoString() string { - return s.String() -} - -// DescribeAgent -type DescribeAgentInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the agent to describe. - // - // AgentArn is a required field - AgentArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeAgentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAgentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAgentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAgentInput"} - if s.AgentArn == nil { - invalidParams.Add(request.NewErrParamRequired("AgentArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAgentArn sets the AgentArn field's value. -func (s *DescribeAgentInput) SetAgentArn(v string) *DescribeAgentInput { - s.AgentArn = &v - return s -} - -// DescribeAgentResponse -type DescribeAgentOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the agent. - AgentArn *string `type:"string"` - - // The time that the agent was activated (that is, created in your account). - CreationTime *time.Time `type:"timestamp"` - - // The time that the agent was last connected. - LastConnectionTime *time.Time `type:"timestamp"` - - // The name of the agent. - Name *string `min:"1" type:"string"` - - // The status of the agent. If the status is ONLINE, then the agent is configured - // properly and is available to use. The Running status is the normal running - // status for an agent. If the status is OFFLINE, the agent's VM is turned off - // or the agent is in an unhealthy state. When the issue that caused the unhealthy - // state is resolved, the agent returns to ONLINE status. - Status *string `type:"string" enum:"AgentStatus"` -} - -// String returns the string representation -func (s DescribeAgentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAgentOutput) GoString() string { - return s.String() -} - -// SetAgentArn sets the AgentArn field's value. -func (s *DescribeAgentOutput) SetAgentArn(v string) *DescribeAgentOutput { - s.AgentArn = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeAgentOutput) SetCreationTime(v time.Time) *DescribeAgentOutput { - s.CreationTime = &v - return s -} - -// SetLastConnectionTime sets the LastConnectionTime field's value. -func (s *DescribeAgentOutput) SetLastConnectionTime(v time.Time) *DescribeAgentOutput { - s.LastConnectionTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeAgentOutput) SetName(v string) *DescribeAgentOutput { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeAgentOutput) SetStatus(v string) *DescribeAgentOutput { - s.Status = &v - return s -} - -// DescribeLocationEfsRequest -type DescribeLocationEfsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the EFS location to describe. - // - // LocationArn is a required field - LocationArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeLocationEfsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLocationEfsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLocationEfsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLocationEfsInput"} - if s.LocationArn == nil { - invalidParams.Add(request.NewErrParamRequired("LocationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLocationArn sets the LocationArn field's value. -func (s *DescribeLocationEfsInput) SetLocationArn(v string) *DescribeLocationEfsInput { - s.LocationArn = &v - return s -} - -// DescribeLocationEfsResponse -type DescribeLocationEfsOutput struct { - _ struct{} `type:"structure"` - - // The time that the EFS location was created. - CreationTime *time.Time `type:"timestamp"` - - // The subnet and the security group that the target Amazon EFS file system - // uses. The subnet must have at least one mount target for that file system. - // The security group that you provide needs to be able to communicate with - // the security group on the mount target in the subnet specified. - // - // The exact relationship between security group M (of the mount target) and - // security group S (which you provide for DataSync to use at this stage) is - // as follows: - // - // * Security group M (which you associate with the mount target) must allow - // inbound access for the Transmission Control Protocol (TCP) on the NFS - // port (2049) from security group S. You can enable inbound connections - // either by IP address (CIDR range) or security group. - // - // * Security group S (provided to DataSync to access EFS) should have a - // rule that enables outbound connections to the NFS port on one of the file - // system’s mount targets. You can enable outbound connections either by - // IP address (CIDR range) or security group. For information about security - // groups and mount targets, see Security Groups for Amazon EC2 Instances - // and Mount Targets (https://docs.aws.amazon.com/efs/latest/ug/security-considerations.html#network-access) - // in the Amazon EFS User Guide. - Ec2Config *Ec2Config `type:"structure"` - - // The Amazon resource Name (ARN) of the EFS location that was described. - LocationArn *string `type:"string"` - - // The URL of the EFS location that was described. - LocationUri *string `type:"string"` -} - -// String returns the string representation -func (s DescribeLocationEfsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLocationEfsOutput) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeLocationEfsOutput) SetCreationTime(v time.Time) *DescribeLocationEfsOutput { - s.CreationTime = &v - return s -} - -// SetEc2Config sets the Ec2Config field's value. -func (s *DescribeLocationEfsOutput) SetEc2Config(v *Ec2Config) *DescribeLocationEfsOutput { - s.Ec2Config = v - return s -} - -// SetLocationArn sets the LocationArn field's value. -func (s *DescribeLocationEfsOutput) SetLocationArn(v string) *DescribeLocationEfsOutput { - s.LocationArn = &v - return s -} - -// SetLocationUri sets the LocationUri field's value. -func (s *DescribeLocationEfsOutput) SetLocationUri(v string) *DescribeLocationEfsOutput { - s.LocationUri = &v - return s -} - -// DescribeLocationNfsRequest -type DescribeLocationNfsInput struct { - _ struct{} `type:"structure"` - - // The Amazon resource Name (ARN) of the NFS location to describe. - // - // LocationArn is a required field - LocationArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeLocationNfsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLocationNfsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLocationNfsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLocationNfsInput"} - if s.LocationArn == nil { - invalidParams.Add(request.NewErrParamRequired("LocationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLocationArn sets the LocationArn field's value. -func (s *DescribeLocationNfsInput) SetLocationArn(v string) *DescribeLocationNfsInput { - s.LocationArn = &v - return s -} - -// DescribeLocationNfsResponse -type DescribeLocationNfsOutput struct { - _ struct{} `type:"structure"` - - // The time that the NFS location was created. - CreationTime *time.Time `type:"timestamp"` - - // The Amazon resource Name (ARN) of the NFS location that was described. - LocationArn *string `type:"string"` - - // The URL of the source NFS location that was described. - LocationUri *string `type:"string"` - - // A list of Amazon Resource Names (ARNs) of agents to use for a Network File - // System (NFS) location. - OnPremConfig *OnPremConfig `type:"structure"` -} - -// String returns the string representation -func (s DescribeLocationNfsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLocationNfsOutput) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeLocationNfsOutput) SetCreationTime(v time.Time) *DescribeLocationNfsOutput { - s.CreationTime = &v - return s -} - -// SetLocationArn sets the LocationArn field's value. -func (s *DescribeLocationNfsOutput) SetLocationArn(v string) *DescribeLocationNfsOutput { - s.LocationArn = &v - return s -} - -// SetLocationUri sets the LocationUri field's value. -func (s *DescribeLocationNfsOutput) SetLocationUri(v string) *DescribeLocationNfsOutput { - s.LocationUri = &v - return s -} - -// SetOnPremConfig sets the OnPremConfig field's value. -func (s *DescribeLocationNfsOutput) SetOnPremConfig(v *OnPremConfig) *DescribeLocationNfsOutput { - s.OnPremConfig = v - return s -} - -// DescribeLocationS3Request -type DescribeLocationS3Input struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the Amazon S3 bucket location to describe. - // - // LocationArn is a required field - LocationArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeLocationS3Input) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLocationS3Input) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLocationS3Input) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLocationS3Input"} - if s.LocationArn == nil { - invalidParams.Add(request.NewErrParamRequired("LocationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLocationArn sets the LocationArn field's value. -func (s *DescribeLocationS3Input) SetLocationArn(v string) *DescribeLocationS3Input { - s.LocationArn = &v - return s -} - -// DescribeLocationS3Response -type DescribeLocationS3Output struct { - _ struct{} `type:"structure"` - - // The time that the Amazon S3 bucket location was created. - CreationTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the Amazon S3 bucket location. - LocationArn *string `type:"string"` - - // The URL of the Amazon S3 location that was described. - LocationUri *string `type:"string"` - - // The Amazon Resource Name (ARN) of the AWS Identity and Access Management - // (IAM) role that is used to access an Amazon S3 bucket. For detailed information - // about using such a role, see Components and Terminology (https://alpha-aws-docs.aws.amazon.com/sync-service/latest/userguide/create-locations-cli.html#create-location-s3-cli) - // in the AWS DataSync User Guide. - S3Config *S3Config `type:"structure"` -} - -// String returns the string representation -func (s DescribeLocationS3Output) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLocationS3Output) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeLocationS3Output) SetCreationTime(v time.Time) *DescribeLocationS3Output { - s.CreationTime = &v - return s -} - -// SetLocationArn sets the LocationArn field's value. -func (s *DescribeLocationS3Output) SetLocationArn(v string) *DescribeLocationS3Output { - s.LocationArn = &v - return s -} - -// SetLocationUri sets the LocationUri field's value. -func (s *DescribeLocationS3Output) SetLocationUri(v string) *DescribeLocationS3Output { - s.LocationUri = &v - return s -} - -// SetS3Config sets the S3Config field's value. -func (s *DescribeLocationS3Output) SetS3Config(v *S3Config) *DescribeLocationS3Output { - s.S3Config = v - return s -} - -// DescribeTaskExecutionRequest -type DescribeTaskExecutionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the task that is being executed. - // - // TaskExecutionArn is a required field - TaskExecutionArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeTaskExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTaskExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTaskExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTaskExecutionInput"} - if s.TaskExecutionArn == nil { - invalidParams.Add(request.NewErrParamRequired("TaskExecutionArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTaskExecutionArn sets the TaskExecutionArn field's value. -func (s *DescribeTaskExecutionInput) SetTaskExecutionArn(v string) *DescribeTaskExecutionInput { - s.TaskExecutionArn = &v - return s -} - -// DescribeTaskExecutionResponse -type DescribeTaskExecutionOutput struct { - _ struct{} `type:"structure"` - - // The physical number of bytes transferred over the network. - BytesTransferred *int64 `type:"long"` - - // The number of logical bytes written to the destination AWS storage resource. - BytesWritten *int64 `type:"long"` - - // The estimated physical number of bytes that is to be transferred over the - // network. - EstimatedBytesToTransfer *int64 `type:"long"` - - // The expected number of files that is to be transferred over the network. - // This value is calculated during the PREPARING phase, before the TRANSFERRING - // phase. This value is the expected number of files to be transferred. It's - // calculated based on comparing the content of the source and destination locations - // and finding the delta that needs to be transferred. - EstimatedFilesToTransfer *int64 `type:"long"` - - // The actual number of files that was transferred over the network. This value - // is calculated and updated on an ongoing basis during the TRANSFERRING phase. - // It's updated periodically when each file is read from the source and sent - // over the network. - // - // If failures occur during a transfer, this value can be less than EstimatedFilesToTransfer. - // This value can also be greater than EstimatedFilesTransferred in some cases. - // This element is implementation-specific for some location types, so don't - // use it as an indicator for a correct file number or to monitor your task - // execution. - FilesTransferred *int64 `type:"long"` - - // Represents the options that are available to control the behavior of a StartTaskExecution - // operation. Behavior includes preserving metadata such as user ID (UID), group - // ID (GID), and file permissions, and also overwriting files in the destination, - // data integrity verification, and so on. - // - // A task has a set of default options associated with it. If you don't specify - // an option in StartTaskExecution, the default value is used. You can override - // the defaults options on each task execution by specifying an overriding Options - // value to StartTaskExecution. - Options *Options `type:"structure"` - - // The result of the task execution. - Result *TaskExecutionResultDetail `type:"structure"` - - // The time that the task execution was started. - StartTime *time.Time `type:"timestamp"` - - // The status of the task. For detailed information about sync statuses, see - // Understanding Sync Task Statuses (https://docs.aws.amazon.com/sync-service/latest/userguide/understand-sync-task-statuses.html). - Status *string `type:"string" enum:"TaskExecutionStatus"` - - // The Amazon Resource Name (ARN) of the task execution that was described. - // TaskExecutionArn is hierarchical and includes TaskArn for the task that was - // executed. - // - // For example, a TaskExecution value with the ARN arn:aws:sync:us-east-1:209870788375:task/task-0208075f79cedf4a2/execution/exec-08ef1e88ec491019b - // executed the task with the ARN arn:aws:sync:us-east-1:209870788375:task/task-0208075f79cedf4a2. - TaskExecutionArn *string `type:"string"` -} - -// String returns the string representation -func (s DescribeTaskExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTaskExecutionOutput) GoString() string { - return s.String() -} - -// SetBytesTransferred sets the BytesTransferred field's value. -func (s *DescribeTaskExecutionOutput) SetBytesTransferred(v int64) *DescribeTaskExecutionOutput { - s.BytesTransferred = &v - return s -} - -// SetBytesWritten sets the BytesWritten field's value. -func (s *DescribeTaskExecutionOutput) SetBytesWritten(v int64) *DescribeTaskExecutionOutput { - s.BytesWritten = &v - return s -} - -// SetEstimatedBytesToTransfer sets the EstimatedBytesToTransfer field's value. -func (s *DescribeTaskExecutionOutput) SetEstimatedBytesToTransfer(v int64) *DescribeTaskExecutionOutput { - s.EstimatedBytesToTransfer = &v - return s -} - -// SetEstimatedFilesToTransfer sets the EstimatedFilesToTransfer field's value. -func (s *DescribeTaskExecutionOutput) SetEstimatedFilesToTransfer(v int64) *DescribeTaskExecutionOutput { - s.EstimatedFilesToTransfer = &v - return s -} - -// SetFilesTransferred sets the FilesTransferred field's value. -func (s *DescribeTaskExecutionOutput) SetFilesTransferred(v int64) *DescribeTaskExecutionOutput { - s.FilesTransferred = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *DescribeTaskExecutionOutput) SetOptions(v *Options) *DescribeTaskExecutionOutput { - s.Options = v - return s -} - -// SetResult sets the Result field's value. -func (s *DescribeTaskExecutionOutput) SetResult(v *TaskExecutionResultDetail) *DescribeTaskExecutionOutput { - s.Result = v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeTaskExecutionOutput) SetStartTime(v time.Time) *DescribeTaskExecutionOutput { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeTaskExecutionOutput) SetStatus(v string) *DescribeTaskExecutionOutput { - s.Status = &v - return s -} - -// SetTaskExecutionArn sets the TaskExecutionArn field's value. -func (s *DescribeTaskExecutionOutput) SetTaskExecutionArn(v string) *DescribeTaskExecutionOutput { - s.TaskExecutionArn = &v - return s -} - -// DescribeTaskRequest -type DescribeTaskInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the task to describe. - // - // TaskArn is a required field - TaskArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTaskInput"} - if s.TaskArn == nil { - invalidParams.Add(request.NewErrParamRequired("TaskArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTaskArn sets the TaskArn field's value. -func (s *DescribeTaskInput) SetTaskArn(v string) *DescribeTaskInput { - s.TaskArn = &v - return s -} - -// DescribeTaskResponse -type DescribeTaskOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that was - // used to monitor and log events in the task. For more information on these - // groups, see Working with Log Groups and Log Streams (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html) - // in the Amazon CloudWatch User Guide. - CloudWatchLogGroupArn *string `type:"string"` - - // The time that the task was created. - CreationTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the task execution that is syncing files. - CurrentTaskExecutionArn *string `type:"string"` - - // The Amazon Resource Name (ARN) of the AWS storage resource's location. - DestinationLocationArn *string `type:"string"` - - // Errors that AWS DataSync encountered during execution of the task. You can - // use this error code to help troubleshoot issues. - ErrorCode *string `type:"string"` - - // Detailed description of an error that was encountered during the task execution. - // You can use this information to help troubleshoot issues. - ErrorDetail *string `type:"string"` - - // The name of the task that was described. - Name *string `min:"1" type:"string"` - - // The set of configuration options that control the behavior of a single execution - // of the task that occurs when you call StartTaskExecution. You can configure - // these options to preserve metadata such as user ID (UID) and group (GID), - // file permissions, data integrity verification, and so on. - // - // For each individual task execution, you can override these options by specifying - // the overriding OverrideOptions value to operation. - Options *Options `type:"structure"` - - // The Amazon Resource Name (ARN) of the source file system's location. - SourceLocationArn *string `type:"string"` - - // The status of the task that was described. For detailed information about - // sync statuses, see Understanding Sync Task Statuses (https://docs.aws.amazon.com/sync-service/latest/userguide/understand-sync-task-statuses.html). - Status *string `type:"string" enum:"TaskStatus"` - - // The Amazon Resource Name (ARN) of the task that was described. - TaskArn *string `type:"string"` -} - -// String returns the string representation -func (s DescribeTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTaskOutput) GoString() string { - return s.String() -} - -// SetCloudWatchLogGroupArn sets the CloudWatchLogGroupArn field's value. -func (s *DescribeTaskOutput) SetCloudWatchLogGroupArn(v string) *DescribeTaskOutput { - s.CloudWatchLogGroupArn = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeTaskOutput) SetCreationTime(v time.Time) *DescribeTaskOutput { - s.CreationTime = &v - return s -} - -// SetCurrentTaskExecutionArn sets the CurrentTaskExecutionArn field's value. -func (s *DescribeTaskOutput) SetCurrentTaskExecutionArn(v string) *DescribeTaskOutput { - s.CurrentTaskExecutionArn = &v - return s -} - -// SetDestinationLocationArn sets the DestinationLocationArn field's value. -func (s *DescribeTaskOutput) SetDestinationLocationArn(v string) *DescribeTaskOutput { - s.DestinationLocationArn = &v - return s -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *DescribeTaskOutput) SetErrorCode(v string) *DescribeTaskOutput { - s.ErrorCode = &v - return s -} - -// SetErrorDetail sets the ErrorDetail field's value. -func (s *DescribeTaskOutput) SetErrorDetail(v string) *DescribeTaskOutput { - s.ErrorDetail = &v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeTaskOutput) SetName(v string) *DescribeTaskOutput { - s.Name = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *DescribeTaskOutput) SetOptions(v *Options) *DescribeTaskOutput { - s.Options = v - return s -} - -// SetSourceLocationArn sets the SourceLocationArn field's value. -func (s *DescribeTaskOutput) SetSourceLocationArn(v string) *DescribeTaskOutput { - s.SourceLocationArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeTaskOutput) SetStatus(v string) *DescribeTaskOutput { - s.Status = &v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *DescribeTaskOutput) SetTaskArn(v string) *DescribeTaskOutput { - s.TaskArn = &v - return s -} - -// The subnet and the security group that the target Amazon EFS file system -// uses. The subnet must have at least one mount target for that file system. -// The security group that you provide needs to be able to communicate with -// the security group on the mount target in the subnet specified. -// -// The exact relationship between security group M (of the mount target) and -// security group S (which you provide for DataSync to use at this stage) is -// as follows: -// -// * Security group M (which you associate with the mount target) must allow -// inbound access for the Transmission Control Protocol (TCP) on the NFS -// port (2049) from security group S. You can enable inbound connections -// either by IP address (CIDR range) or security group. -// -// * Security group S (provided to DataSync to access EFS) should have a -// rule that enables outbound connections to the NFS port on one of the file -// system’s mount targets. You can enable outbound connections either by -// IP address (CIDR range) or security group. For information about security -// groups and mount targets, see Security Groups for Amazon EC2 Instances -// and Mount Targets (https://docs.aws.amazon.com/efs/latest/ug/security-considerations.html#network-access) -// in the Amazon EFS User Guide. -type Ec2Config struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Names (ARNs) of the security groups that are configured - // for the Amazon EC2 resource. - // - // SecurityGroupArns is a required field - SecurityGroupArns []*string `min:"1" type:"list" required:"true"` - - // The ARN of the subnet that the Amazon EC2 resource belongs in. - // - // SubnetArn is a required field - SubnetArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Ec2Config) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Ec2Config) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Ec2Config) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Ec2Config"} - if s.SecurityGroupArns == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityGroupArns")) - } - if s.SecurityGroupArns != nil && len(s.SecurityGroupArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityGroupArns", 1)) - } - if s.SubnetArn == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecurityGroupArns sets the SecurityGroupArns field's value. -func (s *Ec2Config) SetSecurityGroupArns(v []*string) *Ec2Config { - s.SecurityGroupArns = v - return s -} - -// SetSubnetArn sets the SubnetArn field's value. -func (s *Ec2Config) SetSubnetArn(v string) *Ec2Config { - s.SubnetArn = &v - return s -} - -// ListAgentsRequest -type ListAgentsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of agents to list. - MaxResults *int64 `type:"integer"` - - // An opaque string that indicates the position at which to begin the next list - // of agents. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAgentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAgentsInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAgentsInput) SetMaxResults(v int64) *ListAgentsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAgentsInput) SetNextToken(v string) *ListAgentsInput { - s.NextToken = &v - return s -} - -// ListAgentsResponse -type ListAgentsOutput struct { - _ struct{} `type:"structure"` - - // A list of agents in your account. - Agents []*AgentListEntry `type:"list"` - - // An opaque string that indicates the position at which to begin returning - // the next list of agents. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAgentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAgentsOutput) GoString() string { - return s.String() -} - -// SetAgents sets the Agents field's value. -func (s *ListAgentsOutput) SetAgents(v []*AgentListEntry) *ListAgentsOutput { - s.Agents = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAgentsOutput) SetNextToken(v string) *ListAgentsOutput { - s.NextToken = &v - return s -} - -// ListLocationsRequest -type ListLocationsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of locations to return. - MaxResults *int64 `type:"integer"` - - // An opaque string that indicates the position at which to begin the next list - // of locations. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListLocationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLocationsInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListLocationsInput) SetMaxResults(v int64) *ListLocationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListLocationsInput) SetNextToken(v string) *ListLocationsInput { - s.NextToken = &v - return s -} - -// ListLocationsResponse -type ListLocationsOutput struct { - _ struct{} `type:"structure"` - - // An array that contains a list of locations. - Locations []*LocationListEntry `type:"list"` - - // An opaque string that indicates the position at which to begin returning - // the next list of locations. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListLocationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLocationsOutput) GoString() string { - return s.String() -} - -// SetLocations sets the Locations field's value. -func (s *ListLocationsOutput) SetLocations(v []*LocationListEntry) *ListLocationsOutput { - s.Locations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListLocationsOutput) SetNextToken(v string) *ListLocationsOutput { - s.NextToken = &v - return s -} - -// ListTagsForResourceRequest -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The maximum number of locations to return. - MaxResults *int64 `type:"integer"` - - // An opaque string that indicates the position at which to begin the next list - // of locations. - NextToken *string `type:"string"` - - // The Amazon Resource Name (ARN) of the resource whose tags to list. - // - // ResourceArn is a required field - ResourceArn *string `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 invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { - s.NextToken = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { - s.ResourceArn = &v - return s -} - -// ListTagsForResourceResponse -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // An opaque string that indicates the position at which to begin returning - // the next list of resource tags. - NextToken *string `type:"string"` - - // Array of resource tags. - Tags []*TagListEntry `type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { - s.NextToken = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*TagListEntry) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -// ListTaskExecutions -type ListTaskExecutionsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of executed tasks to list. - MaxResults *int64 `type:"integer"` - - // An opaque string that indicates the position at which to begin the next list - // of the executed tasks. - NextToken *string `type:"string"` - - // The Amazon Resource Name (ARN) of the task whose tasks you want to list. - TaskArn *string `type:"string"` -} - -// String returns the string representation -func (s ListTaskExecutionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTaskExecutionsInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTaskExecutionsInput) SetMaxResults(v int64) *ListTaskExecutionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTaskExecutionsInput) SetNextToken(v string) *ListTaskExecutionsInput { - s.NextToken = &v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *ListTaskExecutionsInput) SetTaskArn(v string) *ListTaskExecutionsInput { - s.TaskArn = &v - return s -} - -// ListTaskExecutionsResponse -type ListTaskExecutionsOutput struct { - _ struct{} `type:"structure"` - - // An opaque string that indicates the position at which to begin returning - // the next list of executed tasks. - NextToken *string `type:"string"` - - // A list of executed tasks. - TaskExecutions []*TaskExecutionListEntry `type:"list"` -} - -// String returns the string representation -func (s ListTaskExecutionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTaskExecutionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTaskExecutionsOutput) SetNextToken(v string) *ListTaskExecutionsOutput { - s.NextToken = &v - return s -} - -// SetTaskExecutions sets the TaskExecutions field's value. -func (s *ListTaskExecutionsOutput) SetTaskExecutions(v []*TaskExecutionListEntry) *ListTaskExecutionsOutput { - s.TaskExecutions = v - return s -} - -// ListTasksRequest -type ListTasksInput struct { - _ struct{} `type:"structure"` - - // The maximum number of tasks to return. - MaxResults *int64 `type:"integer"` - - // An opaque string that indicates the position at which to begin the next list - // of tasks. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTasksInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTasksInput) SetMaxResults(v int64) *ListTasksInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTasksInput) SetNextToken(v string) *ListTasksInput { - s.NextToken = &v - return s -} - -// ListTasksResponse -type ListTasksOutput struct { - _ struct{} `type:"structure"` - - // An opaque string that indicates the position at which to begin returning - // the next list of tasks. - NextToken *string `type:"string"` - - // A list of all the tasks that are returned. - Tasks []*TaskListEntry `type:"list"` -} - -// String returns the string representation -func (s ListTasksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTasksOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTasksOutput) SetNextToken(v string) *ListTasksOutput { - s.NextToken = &v - return s -} - -// SetTasks sets the Tasks field's value. -func (s *ListTasksOutput) SetTasks(v []*TaskListEntry) *ListTasksOutput { - s.Tasks = v - return s -} - -// Represents a single entry in a list of locations. LocationListEntry returns -// an array that contains a list of locations when the ListLocations operation -// is called. -type LocationListEntry struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the location. For Network File System (NFS) - // or Amazon EFS, the location is the export path. For Amazon S3, the location - // is the prefix path that you want to mount and use as the root of the location. - LocationArn *string `type:"string"` - - // Represents a list of URLs of a location. LocationUri returns an array that - // contains a list of locations when the ListLocations operation is called. - // - // Format: TYPE://GLOBAL_ID/SUBDIR. - // - // TYPE designates the type of location. Valid values: NFS | EFS | S3. - // - // GLOBAL_ID is the globally unique identifier of the resource that backs the - // location. An example for EFS is us-east-2.fs-abcd1234. An example for Amazon - // S3 is the bucket name, such as myBucket. An example for NFS is a valid IPv4 - // address or a host name compliant with Domain Name Service (DNS). - // - // SUBDIR is a valid file system path, delimited by forward slashes as is the - // *nix convention. For NFS and Amazon EFS, it's the export path to mount the - // location. For Amazon S3, it's the prefix path that you mount to and treat - // as the root of the location. - LocationUri *string `type:"string"` -} - -// String returns the string representation -func (s LocationListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LocationListEntry) GoString() string { - return s.String() -} - -// SetLocationArn sets the LocationArn field's value. -func (s *LocationListEntry) SetLocationArn(v string) *LocationListEntry { - s.LocationArn = &v - return s -} - -// SetLocationUri sets the LocationUri field's value. -func (s *LocationListEntry) SetLocationUri(v string) *LocationListEntry { - s.LocationUri = &v - return s -} - -// A list of Amazon Resource Names (ARNs) of agents to use for a Network File -// System (NFS) location. -type OnPremConfig struct { - _ struct{} `type:"structure"` - - // ARNs)of the agents to use for an NFS location. - // - // AgentArns is a required field - AgentArns []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s OnPremConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OnPremConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OnPremConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OnPremConfig"} - if s.AgentArns == nil { - invalidParams.Add(request.NewErrParamRequired("AgentArns")) - } - if s.AgentArns != nil && len(s.AgentArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AgentArns", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAgentArns sets the AgentArns field's value. -func (s *OnPremConfig) SetAgentArns(v []*string) *OnPremConfig { - s.AgentArns = v - return s -} - -// Represents the options that are available to control the behavior of a StartTaskExecution -// operation. Behavior includes preserving metadata such as user ID (UID), group -// ID (GID), and file permissions, and also overwriting files in the destination, -// data integrity verification, and so on. -// -// A task has a set of default options associated with it. If you don't specify -// an option in StartTaskExecution, the default value is used. You can override -// the defaults options on each task execution by specifying an overriding Options -// value to StartTaskExecution. -type Options struct { - _ struct{} `type:"structure"` - - // A file metadata value that shows the last time a file was accessed (that - // is, when the file was read or written to). If you set Atime to BEST_EFFORT, - // DataSync attempts to preserve the original Atime attribute on all source - // files (that is, the version before the PREPARING phase). However, Atime's - // behavior is not fully standard across platforms, so AWS DataSync can only - // do this on a best-effort basis. - // - // Default value: BEST_EFFORT. - // - // BEST_EFFORT: Attempt to preserve the per-file Atime value (recommended). - // - // NONE: Ignore Atime. - // - // If Atime is set to BEST_EFFORT, Mtime must be set to PRESERVE. - // - // If Atime is set to NONE, Mtime must also be NONE. - Atime *string `type:"string" enum:"Atime"` - - // A value that limits the bandwidth used by AWS DataSync. For example, if you - // want AWS DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024). - BytesPerSecond *int64 `type:"long"` - - // The group ID (GID) of the file's owners. - // - // Default value: INT_VALUE. This preserves the integer value of the ID. - // - // INT_VALUE: Preserve the integer value of user ID (UID) and GID (recommended). - // - // NONE: Ignore UID and GID. - Gid *string `type:"string" enum:"Gid"` - - // A value that indicates the last time that a file was modified (that is, a - // file was written to) before the PREPARING phase. - // - // Default value: PRESERVE. - // - // PRESERVE: Preserve original Mtime (recommended) - // - // NONE: Ignore Mtime. - // - // If Mtime is set to PRESERVE, Atime must be set to BEST_EFFORT. - // - // If Mtime is set to NONE, Atime must also be set to NONE. - Mtime *string `type:"string" enum:"Mtime"` - - // A value that determines which users or groups can access a file for a specific - // purpose such as reading, writing, or execution of the file. - // - // Default value: PRESERVE. - // - // PRESERVE: Preserve POSIX-style permissions (recommended). - // - // NONE: Ignore permissions. - // - // AWS DataSync can preserve extant permissions of a source location. - PosixPermissions *string `type:"string" enum:"PosixPermissions"` - - // A value that specifies whether files in the destination that don't exist - // in the source file system should be preserved. - // - // Default value: PRESERVE. - // - // PRESERVE: Ignore such destination files (recommended). - // - // REMOVE: Delete destination files that aren’t present in the source. - PreserveDeletedFiles *string `type:"string" enum:"PreserveDeletedFiles"` - - // A value that determines whether AWS DataSync should preserve the metadata - // of block and character devices in the source file system, and recreate the - // files with that device name and metadata on the destination. - // - // AWS DataSync can't sync the actual contents of such devices, because they - // are nonterminal and don't return an end-of-file (EOF) marker. - // - // Default value: NONE. - // - // NONE: Ignore special devices (recommended). - // - // PRESERVE: Preserve character and block device metadata. This option isn't - // currently supported for Amazon EFS. - PreserveDevices *string `type:"string" enum:"PreserveDevices"` - - // The user ID (UID) of the file's owner. - // - // Default value: INT_VALUE. This preserves the integer value of the ID. - // - // INT_VALUE: Preserve the integer value of UID and group ID (GID) (recommended). - // - // NONE: Ignore UID and GID. - Uid *string `type:"string" enum:"Uid"` - - // A value that determines whether a data integrity verification should be performed - // at the end of a task execution after all data and metadata have been transferred. - // - // Default value: POINT_IN_TIME_CONSISTENT. - // - // POINT_IN_TIME_CONSISTENT: Perform verification (recommended). - // - // NONE: Skip verification. - VerifyMode *string `type:"string" enum:"VerifyMode"` -} - -// String returns the string representation -func (s Options) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Options) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Options) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Options"} - if s.BytesPerSecond != nil && *s.BytesPerSecond < -1 { - invalidParams.Add(request.NewErrParamMinValue("BytesPerSecond", -1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAtime sets the Atime field's value. -func (s *Options) SetAtime(v string) *Options { - s.Atime = &v - return s -} - -// SetBytesPerSecond sets the BytesPerSecond field's value. -func (s *Options) SetBytesPerSecond(v int64) *Options { - s.BytesPerSecond = &v - return s -} - -// SetGid sets the Gid field's value. -func (s *Options) SetGid(v string) *Options { - s.Gid = &v - return s -} - -// SetMtime sets the Mtime field's value. -func (s *Options) SetMtime(v string) *Options { - s.Mtime = &v - return s -} - -// SetPosixPermissions sets the PosixPermissions field's value. -func (s *Options) SetPosixPermissions(v string) *Options { - s.PosixPermissions = &v - return s -} - -// SetPreserveDeletedFiles sets the PreserveDeletedFiles field's value. -func (s *Options) SetPreserveDeletedFiles(v string) *Options { - s.PreserveDeletedFiles = &v - return s -} - -// SetPreserveDevices sets the PreserveDevices field's value. -func (s *Options) SetPreserveDevices(v string) *Options { - s.PreserveDevices = &v - return s -} - -// SetUid sets the Uid field's value. -func (s *Options) SetUid(v string) *Options { - s.Uid = &v - return s -} - -// SetVerifyMode sets the VerifyMode field's value. -func (s *Options) SetVerifyMode(v string) *Options { - s.VerifyMode = &v - return s -} - -// The Amazon Resource Name (ARN) of the AWS Identity and Access Management -// (IAM) role that is used to access an Amazon S3 bucket. For detailed information -// about using such a role, see Components and Terminology (https://alpha-aws-docs.aws.amazon.com/sync-service/latest/userguide/create-locations-cli.html#create-location-s3-cli) -// in the AWS DataSync User Guide. -type S3Config struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket to access. This bucket is used as a parameter in the - // CreateLocationS3 operation. - // - // BucketAccessRoleArn is a required field - BucketAccessRoleArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s S3Config) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Config) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3Config) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3Config"} - if s.BucketAccessRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("BucketAccessRoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketAccessRoleArn sets the BucketAccessRoleArn field's value. -func (s *S3Config) SetBucketAccessRoleArn(v string) *S3Config { - s.BucketAccessRoleArn = &v - return s -} - -// StartTaskExecutionRequest -type StartTaskExecutionInput struct { - _ struct{} `type:"structure"` - - // Represents the options that are available to control the behavior of a StartTaskExecution - // operation. Behavior includes preserving metadata such as user ID (UID), group - // ID (GID), and file permissions, and also overwriting files in the destination, - // data integrity verification, and so on. - // - // A task has a set of default options associated with it. If you don't specify - // an option in StartTaskExecution, the default value is used. You can override - // the defaults options on each task execution by specifying an overriding Options - // value to StartTaskExecution. - OverrideOptions *Options `type:"structure"` - - // The Amazon Resource Name (ARN) of the task to start. - // - // TaskArn is a required field - TaskArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StartTaskExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartTaskExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartTaskExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartTaskExecutionInput"} - if s.TaskArn == nil { - invalidParams.Add(request.NewErrParamRequired("TaskArn")) - } - if s.OverrideOptions != nil { - if err := s.OverrideOptions.Validate(); err != nil { - invalidParams.AddNested("OverrideOptions", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOverrideOptions sets the OverrideOptions field's value. -func (s *StartTaskExecutionInput) SetOverrideOptions(v *Options) *StartTaskExecutionInput { - s.OverrideOptions = v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *StartTaskExecutionInput) SetTaskArn(v string) *StartTaskExecutionInput { - s.TaskArn = &v - return s -} - -// StartTaskExecutionResponse -type StartTaskExecutionOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the specific task execution that was started. - TaskExecutionArn *string `type:"string"` -} - -// String returns the string representation -func (s StartTaskExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartTaskExecutionOutput) GoString() string { - return s.String() -} - -// SetTaskExecutionArn sets the TaskExecutionArn field's value. -func (s *StartTaskExecutionOutput) SetTaskExecutionArn(v string) *StartTaskExecutionOutput { - s.TaskExecutionArn = &v - return s -} - -// Represents a single entry in a list of AWS resource tags. TagListEntry returns -// an array that contains a list of tasks when the ListTagsForResource operation -// is called. -type TagListEntry struct { - _ struct{} `type:"structure"` - - // The key for an AWS resource tag. - Key *string `min:"1" type:"string"` - - // The value for an AWS resource tag. - Value *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s TagListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagListEntry) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagListEntry) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagListEntry"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *TagListEntry) SetKey(v string) *TagListEntry { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *TagListEntry) SetValue(v string) *TagListEntry { - s.Value = &v - return s -} - -// TagResourceRequest -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource to apply the tag to. - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` - - // The tags to apply. - // - // Tags is a required field - Tags []*TagListEntry `type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*TagListEntry) *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() -} - -// Represents a single entry in a list of task executions. TaskExecutionListEntry -// returns an array that contains a list of specific invocations of a task when -// ListTaskExecutions operation is called. -type TaskExecutionListEntry struct { - _ struct{} `type:"structure"` - - // The status of a task execution. - Status *string `type:"string" enum:"TaskExecutionStatus"` - - // The Amazon Resource Name (ARN) of the task that was executed. - TaskExecutionArn *string `type:"string"` -} - -// String returns the string representation -func (s TaskExecutionListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskExecutionListEntry) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *TaskExecutionListEntry) SetStatus(v string) *TaskExecutionListEntry { - s.Status = &v - return s -} - -// SetTaskExecutionArn sets the TaskExecutionArn field's value. -func (s *TaskExecutionListEntry) SetTaskExecutionArn(v string) *TaskExecutionListEntry { - s.TaskExecutionArn = &v - return s -} - -// Describes the detailed result of a TaskExecution operation. This result includes -// the time in milliseconds spent in each phase, the status of the task execution, -// and the errors encountered. -type TaskExecutionResultDetail struct { - _ struct{} `type:"structure"` - - // Errors that AWS DataSync encountered during execution of the task. You can - // use this error code to help troubleshoot issues. - ErrorCode *string `type:"string"` - - // Detailed description of an error that was encountered during the task execution. - // You can use this information to help troubleshoot issues. - ErrorDetail *string `type:"string"` - - // The total time in milliseconds that AWS DataSync spent in the PREPARING phase. - PrepareDuration *int64 `type:"long"` - - // The status of the PREPARING phase. - PrepareStatus *string `type:"string" enum:"PhaseStatus"` - - // The total time in milliseconds that AWS DataSync spent in the TRANSFERRING - // phase. - TransferDuration *int64 `type:"long"` - - // The status of the TRANSFERRING Phase. - TransferStatus *string `type:"string" enum:"PhaseStatus"` - - // The total time in milliseconds that AWS DataSync spent in the VERIFYING phase. - VerifyDuration *int64 `type:"long"` - - // The status of the VERIFYING Phase. - VerifyStatus *string `type:"string" enum:"PhaseStatus"` -} - -// String returns the string representation -func (s TaskExecutionResultDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskExecutionResultDetail) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *TaskExecutionResultDetail) SetErrorCode(v string) *TaskExecutionResultDetail { - s.ErrorCode = &v - return s -} - -// SetErrorDetail sets the ErrorDetail field's value. -func (s *TaskExecutionResultDetail) SetErrorDetail(v string) *TaskExecutionResultDetail { - s.ErrorDetail = &v - return s -} - -// SetPrepareDuration sets the PrepareDuration field's value. -func (s *TaskExecutionResultDetail) SetPrepareDuration(v int64) *TaskExecutionResultDetail { - s.PrepareDuration = &v - return s -} - -// SetPrepareStatus sets the PrepareStatus field's value. -func (s *TaskExecutionResultDetail) SetPrepareStatus(v string) *TaskExecutionResultDetail { - s.PrepareStatus = &v - return s -} - -// SetTransferDuration sets the TransferDuration field's value. -func (s *TaskExecutionResultDetail) SetTransferDuration(v int64) *TaskExecutionResultDetail { - s.TransferDuration = &v - return s -} - -// SetTransferStatus sets the TransferStatus field's value. -func (s *TaskExecutionResultDetail) SetTransferStatus(v string) *TaskExecutionResultDetail { - s.TransferStatus = &v - return s -} - -// SetVerifyDuration sets the VerifyDuration field's value. -func (s *TaskExecutionResultDetail) SetVerifyDuration(v int64) *TaskExecutionResultDetail { - s.VerifyDuration = &v - return s -} - -// SetVerifyStatus sets the VerifyStatus field's value. -func (s *TaskExecutionResultDetail) SetVerifyStatus(v string) *TaskExecutionResultDetail { - s.VerifyStatus = &v - return s -} - -// Represents a single entry in a list of tasks. TaskListEntry returns an array -// that contains a list of tasks when the ListTasks operation is called. A task -// includes the source and destination file systems to sync and the options -// to use for the tasks. -type TaskListEntry struct { - _ struct{} `type:"structure"` - - // The name of the task. - Name *string `min:"1" type:"string"` - - // The status of the task. - Status *string `type:"string" enum:"TaskStatus"` - - // The Amazon Resource Name (ARN) of the task. - TaskArn *string `type:"string"` -} - -// String returns the string representation -func (s TaskListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskListEntry) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *TaskListEntry) SetName(v string) *TaskListEntry { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *TaskListEntry) SetStatus(v string) *TaskListEntry { - s.Status = &v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *TaskListEntry) SetTaskArn(v string) *TaskListEntry { - s.TaskArn = &v - return s -} - -// UntagResourceRequest -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The keys in the key-value pair in the tag to remove. - // - // Keys is a required field - Keys []*string `min:"1" type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the resource to remove the tag from. - // - // ResourceArn is a required field - ResourceArn *string `type:"string" 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.Keys == nil { - invalidParams.Add(request.NewErrParamRequired("Keys")) - } - if s.Keys != nil && len(s.Keys) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Keys", 1)) - } - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeys sets the Keys field's value. -func (s *UntagResourceInput) SetKeys(v []*string) *UntagResourceInput { - s.Keys = v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { - s.ResourceArn = &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() -} - -// UpdateAgentRequest -type UpdateAgentInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the agent to update. - // - // AgentArn is a required field - AgentArn *string `type:"string" required:"true"` - - // The name that you want to use to configure the agent. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateAgentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAgentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAgentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAgentInput"} - if s.AgentArn == nil { - invalidParams.Add(request.NewErrParamRequired("AgentArn")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAgentArn sets the AgentArn field's value. -func (s *UpdateAgentInput) SetAgentArn(v string) *UpdateAgentInput { - s.AgentArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateAgentInput) SetName(v string) *UpdateAgentInput { - s.Name = &v - return s -} - -type UpdateAgentOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateAgentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAgentOutput) GoString() string { - return s.String() -} - -// UpdateTaskResponse -type UpdateTaskInput struct { - _ struct{} `type:"structure"` - - // The name of the task to update. - Name *string `min:"1" type:"string"` - - // Represents the options that are available to control the behavior of a StartTaskExecution - // operation. Behavior includes preserving metadata such as user ID (UID), group - // ID (GID), and file permissions, and also overwriting files in the destination, - // data integrity verification, and so on. - // - // A task has a set of default options associated with it. If you don't specify - // an option in StartTaskExecution, the default value is used. You can override - // the defaults options on each task execution by specifying an overriding Options - // value to StartTaskExecution. - Options *Options `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource name of the task to update. - // - // TaskArn is a required field - TaskArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateTaskInput"} - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.TaskArn == nil { - invalidParams.Add(request.NewErrParamRequired("TaskArn")) - } - if s.Options != nil { - if err := s.Options.Validate(); err != nil { - invalidParams.AddNested("Options", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *UpdateTaskInput) SetName(v string) *UpdateTaskInput { - s.Name = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *UpdateTaskInput) SetOptions(v *Options) *UpdateTaskInput { - s.Options = v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *UpdateTaskInput) SetTaskArn(v string) *UpdateTaskInput { - s.TaskArn = &v - return s -} - -type UpdateTaskOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTaskOutput) GoString() string { - return s.String() -} - -const ( - // AgentStatusOnline is a AgentStatus enum value - AgentStatusOnline = "ONLINE" - - // AgentStatusOffline is a AgentStatus enum value - AgentStatusOffline = "OFFLINE" -) - -const ( - // AtimeNone is a Atime enum value - AtimeNone = "NONE" - - // AtimeBestEffort is a Atime enum value - AtimeBestEffort = "BEST_EFFORT" -) - -const ( - // GidNone is a Gid enum value - GidNone = "NONE" - - // GidIntValue is a Gid enum value - GidIntValue = "INT_VALUE" - - // GidName is a Gid enum value - GidName = "NAME" - - // GidBoth is a Gid enum value - GidBoth = "BOTH" -) - -const ( - // MtimeNone is a Mtime enum value - MtimeNone = "NONE" - - // MtimePreserve is a Mtime enum value - MtimePreserve = "PRESERVE" -) - -const ( - // PhaseStatusPending is a PhaseStatus enum value - PhaseStatusPending = "PENDING" - - // PhaseStatusSuccess is a PhaseStatus enum value - PhaseStatusSuccess = "SUCCESS" - - // PhaseStatusError is a PhaseStatus enum value - PhaseStatusError = "ERROR" -) - -const ( - // PosixPermissionsNone is a PosixPermissions enum value - PosixPermissionsNone = "NONE" - - // PosixPermissionsBestEffort is a PosixPermissions enum value - PosixPermissionsBestEffort = "BEST_EFFORT" - - // PosixPermissionsPreserve is a PosixPermissions enum value - PosixPermissionsPreserve = "PRESERVE" -) - -const ( - // PreserveDeletedFilesPreserve is a PreserveDeletedFiles enum value - PreserveDeletedFilesPreserve = "PRESERVE" - - // PreserveDeletedFilesRemove is a PreserveDeletedFiles enum value - PreserveDeletedFilesRemove = "REMOVE" -) - -const ( - // PreserveDevicesNone is a PreserveDevices enum value - PreserveDevicesNone = "NONE" - - // PreserveDevicesPreserve is a PreserveDevices enum value - PreserveDevicesPreserve = "PRESERVE" -) - -const ( - // TaskExecutionStatusLaunching is a TaskExecutionStatus enum value - TaskExecutionStatusLaunching = "LAUNCHING" - - // TaskExecutionStatusPreparing is a TaskExecutionStatus enum value - TaskExecutionStatusPreparing = "PREPARING" - - // TaskExecutionStatusTransferring is a TaskExecutionStatus enum value - TaskExecutionStatusTransferring = "TRANSFERRING" - - // TaskExecutionStatusVerifying is a TaskExecutionStatus enum value - TaskExecutionStatusVerifying = "VERIFYING" - - // TaskExecutionStatusSuccess is a TaskExecutionStatus enum value - TaskExecutionStatusSuccess = "SUCCESS" - - // TaskExecutionStatusError is a TaskExecutionStatus enum value - TaskExecutionStatusError = "ERROR" -) - -const ( - // TaskStatusAvailable is a TaskStatus enum value - TaskStatusAvailable = "AVAILABLE" - - // TaskStatusCreating is a TaskStatus enum value - TaskStatusCreating = "CREATING" - - // TaskStatusRunning is a TaskStatus enum value - TaskStatusRunning = "RUNNING" - - // TaskStatusUnavailable is a TaskStatus enum value - TaskStatusUnavailable = "UNAVAILABLE" -) - -const ( - // UidNone is a Uid enum value - UidNone = "NONE" - - // UidIntValue is a Uid enum value - UidIntValue = "INT_VALUE" - - // UidName is a Uid enum value - UidName = "NAME" - - // UidBoth is a Uid enum value - UidBoth = "BOTH" -) - -const ( - // VerifyModePointInTimeConsistent is a VerifyMode enum value - VerifyModePointInTimeConsistent = "POINT_IN_TIME_CONSISTENT" - - // VerifyModeNone is a VerifyMode enum value - VerifyModeNone = "NONE" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/datasync/doc.go b/vendor/github.com/aws/aws-sdk-go/service/datasync/doc.go deleted file mode 100644 index 9db8d0698..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/datasync/doc.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package datasync provides the client and types for making API -// requests to AWS DataSync. -// -// AWS DataSync is a managed data transfer service that makes it simpler for -// you to automate moving data between on-premises storage and Amazon Simple -// Storage Service (Amazon S3) or Amazon Elastic File System (Amazon EFS). -// -// This API interface reference for AWS DataSync contains documentation for -// a programming interface that you can use to manage AWS DataSync. -// -// See https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09 for more information on this service. -// -// See datasync package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/datasync/ -// -// Using the Client -// -// To contact AWS DataSync 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 DataSync client DataSync for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/datasync/#New -package datasync diff --git a/vendor/github.com/aws/aws-sdk-go/service/datasync/errors.go b/vendor/github.com/aws/aws-sdk-go/service/datasync/errors.go deleted file mode 100644 index bd7164f2f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/datasync/errors.go +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package datasync - -const ( - - // ErrCodeInvalidRequestException for service response error code - // "InvalidRequestException". - // - // This exception is thrown when the client submits a malformed request. - ErrCodeInvalidRequestException = "InvalidRequestException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/datasync/service.go b/vendor/github.com/aws/aws-sdk-go/service/datasync/service.go deleted file mode 100644 index 22d8ddcb9..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/datasync/service.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package datasync - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// DataSync provides the API operation methods for making requests to -// AWS DataSync. See this package's package overview docs -// for details on the service. -// -// DataSync methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type DataSync 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 = "DataSync" // Name of service. - EndpointsID = "datasync" // ID to lookup a service endpoint with. - ServiceID = "DataSync" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the DataSync 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 DataSync client from just a session. -// svc := datasync.New(mySession) -// -// // Create a DataSync client with additional configuration -// svc := datasync.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *DataSync { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "datasync" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DataSync { - svc := &DataSync{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-11-09", - JSONVersion: "1.1", - TargetPrefix: "FmrsService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a DataSync operation and runs any -// custom request initialization. -func (c *DataSync) 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/dax/api.go b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go deleted file mode 100644 index 4b836d462..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/dax/api.go +++ /dev/null @@ -1,4774 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package dax - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" -) - -const opCreateCluster = "CreateCluster" - -// CreateClusterRequest generates a "aws/request.Request" representing the -// client's request for the CreateCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCluster for more information on using the CreateCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateClusterRequest method. -// req, resp := client.CreateClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/CreateCluster -func (c *DAX) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) { - op := &request.Operation{ - Name: opCreateCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateClusterInput{} - } - - output = &CreateClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCluster API operation for Amazon DynamoDB Accelerator (DAX). -// -// Creates a DAX cluster. All nodes in the cluster run the same DAX caching -// software. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation CreateCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterAlreadyExistsFault "ClusterAlreadyExistsFault" -// You already have a DAX cluster with the given identifier. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" -// The requested DAX cluster is not in the available state. -// -// * ErrCodeInsufficientClusterCapacityFault "InsufficientClusterCapacityFault" -// There are not enough system resources to create the cluster you requested -// (or to resize an already-existing cluster). -// -// * ErrCodeSubnetGroupNotFoundFault "SubnetGroupNotFoundFault" -// The requested subnet group name does not refer to an existing subnet group. -// -// * ErrCodeInvalidParameterGroupStateFault "InvalidParameterGroupStateFault" -// One or more parameters in a parameter group are in an invalid state. -// -// * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" -// The specified parameter group does not exist. -// -// * ErrCodeClusterQuotaForCustomerExceededFault "ClusterQuotaForCustomerExceededFault" -// You have attempted to exceed the maximum number of DAX clusters for your -// AWS account. -// -// * ErrCodeNodeQuotaForClusterExceededFault "NodeQuotaForClusterExceededFault" -// You have attempted to exceed the maximum number of nodes for a DAX cluster. -// -// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceededFault" -// You have attempted to exceed the maximum number of nodes for your AWS account. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The VPC network is in an invalid state. -// -// * ErrCodeTagQuotaPerResourceExceeded "TagQuotaPerResourceExceeded" -// You have exceeded the maximum number of tags for this DAX cluster. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/CreateCluster -func (c *DAX) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) { - req, out := c.CreateClusterRequest(input) - return out, req.Send() -} - -// CreateClusterWithContext is the same as CreateCluster with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) { - req, out := c.CreateClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateParameterGroup = "CreateParameterGroup" - -// CreateParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateParameterGroup for more information on using the CreateParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateParameterGroupRequest method. -// req, resp := client.CreateParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/CreateParameterGroup -func (c *DAX) CreateParameterGroupRequest(input *CreateParameterGroupInput) (req *request.Request, output *CreateParameterGroupOutput) { - op := &request.Operation{ - Name: opCreateParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateParameterGroupInput{} - } - - output = &CreateParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateParameterGroup API operation for Amazon DynamoDB Accelerator (DAX). -// -// Creates a new parameter group. A parameter group is a collection of parameters -// that you apply to all of the nodes in a DAX cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation CreateParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeParameterGroupQuotaExceededFault "ParameterGroupQuotaExceededFault" -// You have attempted to exceed the maximum number of parameter groups. -// -// * ErrCodeParameterGroupAlreadyExistsFault "ParameterGroupAlreadyExistsFault" -// The specified parameter group already exists. -// -// * ErrCodeInvalidParameterGroupStateFault "InvalidParameterGroupStateFault" -// One or more parameters in a parameter group are in an invalid state. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/CreateParameterGroup -func (c *DAX) CreateParameterGroup(input *CreateParameterGroupInput) (*CreateParameterGroupOutput, error) { - req, out := c.CreateParameterGroupRequest(input) - return out, req.Send() -} - -// CreateParameterGroupWithContext is the same as CreateParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) CreateParameterGroupWithContext(ctx aws.Context, input *CreateParameterGroupInput, opts ...request.Option) (*CreateParameterGroupOutput, error) { - req, out := c.CreateParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSubnetGroup = "CreateSubnetGroup" - -// CreateSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSubnetGroup for more information on using the CreateSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSubnetGroupRequest method. -// req, resp := client.CreateSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/CreateSubnetGroup -func (c *DAX) CreateSubnetGroupRequest(input *CreateSubnetGroupInput) (req *request.Request, output *CreateSubnetGroupOutput) { - op := &request.Operation{ - Name: opCreateSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSubnetGroupInput{} - } - - output = &CreateSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSubnetGroup API operation for Amazon DynamoDB Accelerator (DAX). -// -// Creates a new subnet group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation CreateSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubnetGroupAlreadyExistsFault "SubnetGroupAlreadyExistsFault" -// The specified subnet group already exists. -// -// * ErrCodeSubnetGroupQuotaExceededFault "SubnetGroupQuotaExceededFault" -// The request cannot be processed because it would exceed the allowed number -// of subnets in a subnet group. -// -// * ErrCodeSubnetQuotaExceededFault "SubnetQuotaExceededFault" -// The request cannot be processed because it would exceed the allowed number -// of subnets in a subnet group. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// An invalid subnet identifier was specified. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/CreateSubnetGroup -func (c *DAX) CreateSubnetGroup(input *CreateSubnetGroupInput) (*CreateSubnetGroupOutput, error) { - req, out := c.CreateSubnetGroupRequest(input) - return out, req.Send() -} - -// CreateSubnetGroupWithContext is the same as CreateSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) CreateSubnetGroupWithContext(ctx aws.Context, input *CreateSubnetGroupInput, opts ...request.Option) (*CreateSubnetGroupOutput, error) { - req, out := c.CreateSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDecreaseReplicationFactor = "DecreaseReplicationFactor" - -// DecreaseReplicationFactorRequest generates a "aws/request.Request" representing the -// client's request for the DecreaseReplicationFactor operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DecreaseReplicationFactor for more information on using the DecreaseReplicationFactor -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DecreaseReplicationFactorRequest method. -// req, resp := client.DecreaseReplicationFactorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DecreaseReplicationFactor -func (c *DAX) DecreaseReplicationFactorRequest(input *DecreaseReplicationFactorInput) (req *request.Request, output *DecreaseReplicationFactorOutput) { - op := &request.Operation{ - Name: opDecreaseReplicationFactor, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DecreaseReplicationFactorInput{} - } - - output = &DecreaseReplicationFactorOutput{} - req = c.newRequest(op, input, output) - return -} - -// DecreaseReplicationFactor API operation for Amazon DynamoDB Accelerator (DAX). -// -// Removes one or more nodes from a DAX cluster. -// -// You cannot use DecreaseReplicationFactor to remove the last node in a DAX -// cluster. If you need to do this, use DeleteCluster instead. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation DecreaseReplicationFactor for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" -// The requested cluster ID does not refer to an existing DAX cluster. -// -// * ErrCodeNodeNotFoundFault "NodeNotFoundFault" -// None of the nodes in the cluster have the given node ID. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" -// The requested DAX cluster is not in the available state. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DecreaseReplicationFactor -func (c *DAX) DecreaseReplicationFactor(input *DecreaseReplicationFactorInput) (*DecreaseReplicationFactorOutput, error) { - req, out := c.DecreaseReplicationFactorRequest(input) - return out, req.Send() -} - -// DecreaseReplicationFactorWithContext is the same as DecreaseReplicationFactor with the addition of -// the ability to pass a context and additional request options. -// -// See DecreaseReplicationFactor for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) DecreaseReplicationFactorWithContext(ctx aws.Context, input *DecreaseReplicationFactorInput, opts ...request.Option) (*DecreaseReplicationFactorOutput, error) { - req, out := c.DecreaseReplicationFactorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCluster = "DeleteCluster" - -// DeleteClusterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCluster for more information on using the DeleteCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteClusterRequest method. -// req, resp := client.DeleteClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DeleteCluster -func (c *DAX) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) { - op := &request.Operation{ - Name: opDeleteCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteClusterInput{} - } - - output = &DeleteClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteCluster API operation for Amazon DynamoDB Accelerator (DAX). -// -// Deletes a previously provisioned DAX cluster. DeleteCluster deletes all associated -// nodes, node endpoints and the DAX cluster itself. When you receive a successful -// response from this action, DAX immediately begins deleting the cluster; you -// cannot cancel or revert this action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation DeleteCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" -// The requested cluster ID does not refer to an existing DAX cluster. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" -// The requested DAX cluster is not in the available state. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DeleteCluster -func (c *DAX) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) { - req, out := c.DeleteClusterRequest(input) - return out, req.Send() -} - -// DeleteClusterWithContext is the same as DeleteCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) { - req, out := c.DeleteClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteParameterGroup = "DeleteParameterGroup" - -// DeleteParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteParameterGroup for more information on using the DeleteParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteParameterGroupRequest method. -// req, resp := client.DeleteParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DeleteParameterGroup -func (c *DAX) DeleteParameterGroupRequest(input *DeleteParameterGroupInput) (req *request.Request, output *DeleteParameterGroupOutput) { - op := &request.Operation{ - Name: opDeleteParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteParameterGroupInput{} - } - - output = &DeleteParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteParameterGroup API operation for Amazon DynamoDB Accelerator (DAX). -// -// Deletes the specified parameter group. You cannot delete a parameter group -// if it is associated with any DAX clusters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation DeleteParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterGroupStateFault "InvalidParameterGroupStateFault" -// One or more parameters in a parameter group are in an invalid state. -// -// * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" -// The specified parameter group does not exist. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DeleteParameterGroup -func (c *DAX) DeleteParameterGroup(input *DeleteParameterGroupInput) (*DeleteParameterGroupOutput, error) { - req, out := c.DeleteParameterGroupRequest(input) - return out, req.Send() -} - -// DeleteParameterGroupWithContext is the same as DeleteParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) DeleteParameterGroupWithContext(ctx aws.Context, input *DeleteParameterGroupInput, opts ...request.Option) (*DeleteParameterGroupOutput, error) { - req, out := c.DeleteParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSubnetGroup = "DeleteSubnetGroup" - -// DeleteSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSubnetGroup for more information on using the DeleteSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSubnetGroupRequest method. -// req, resp := client.DeleteSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DeleteSubnetGroup -func (c *DAX) DeleteSubnetGroupRequest(input *DeleteSubnetGroupInput) (req *request.Request, output *DeleteSubnetGroupOutput) { - op := &request.Operation{ - Name: opDeleteSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSubnetGroupInput{} - } - - output = &DeleteSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteSubnetGroup API operation for Amazon DynamoDB Accelerator (DAX). -// -// Deletes a subnet group. -// -// You cannot delete a subnet group if it is associated with any DAX clusters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation DeleteSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubnetGroupInUseFault "SubnetGroupInUseFault" -// The specified subnet group is currently in use. -// -// * ErrCodeSubnetGroupNotFoundFault "SubnetGroupNotFoundFault" -// The requested subnet group name does not refer to an existing subnet group. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DeleteSubnetGroup -func (c *DAX) DeleteSubnetGroup(input *DeleteSubnetGroupInput) (*DeleteSubnetGroupOutput, error) { - req, out := c.DeleteSubnetGroupRequest(input) - return out, req.Send() -} - -// DeleteSubnetGroupWithContext is the same as DeleteSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) DeleteSubnetGroupWithContext(ctx aws.Context, input *DeleteSubnetGroupInput, opts ...request.Option) (*DeleteSubnetGroupOutput, error) { - req, out := c.DeleteSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeClusters = "DescribeClusters" - -// DescribeClustersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClusters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClusters for more information on using the DescribeClusters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClustersRequest method. -// req, resp := client.DescribeClustersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeClusters -func (c *DAX) DescribeClustersRequest(input *DescribeClustersInput) (req *request.Request, output *DescribeClustersOutput) { - op := &request.Operation{ - Name: opDescribeClusters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeClustersInput{} - } - - output = &DescribeClustersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClusters API operation for Amazon DynamoDB Accelerator (DAX). -// -// Returns information about all provisioned DAX clusters if no cluster identifier -// is specified, or about a specific DAX cluster if a cluster identifier is -// supplied. -// -// If the cluster is in the CREATING state, only cluster level information will -// be displayed until all of the nodes are successfully provisioned. -// -// If the cluster is in the DELETING state, only cluster level information will -// be displayed. -// -// If nodes are currently being added to the DAX cluster, node endpoint information -// and creation time for the additional nodes will not be displayed until they -// are completely provisioned. When the DAX cluster state is available, the -// cluster is ready for use. -// -// If nodes are currently being removed from the DAX cluster, no endpoint information -// for the removed nodes is displayed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation DescribeClusters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" -// The requested cluster ID does not refer to an existing DAX cluster. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeClusters -func (c *DAX) DescribeClusters(input *DescribeClustersInput) (*DescribeClustersOutput, error) { - req, out := c.DescribeClustersRequest(input) - return out, req.Send() -} - -// DescribeClustersWithContext is the same as DescribeClusters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClusters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) DescribeClustersWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.Option) (*DescribeClustersOutput, error) { - req, out := c.DescribeClustersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDefaultParameters = "DescribeDefaultParameters" - -// DescribeDefaultParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDefaultParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDefaultParameters for more information on using the DescribeDefaultParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDefaultParametersRequest method. -// req, resp := client.DescribeDefaultParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeDefaultParameters -func (c *DAX) DescribeDefaultParametersRequest(input *DescribeDefaultParametersInput) (req *request.Request, output *DescribeDefaultParametersOutput) { - op := &request.Operation{ - Name: opDescribeDefaultParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDefaultParametersInput{} - } - - output = &DescribeDefaultParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDefaultParameters API operation for Amazon DynamoDB Accelerator (DAX). -// -// Returns the default system parameter information for the DAX caching software. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation DescribeDefaultParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeDefaultParameters -func (c *DAX) DescribeDefaultParameters(input *DescribeDefaultParametersInput) (*DescribeDefaultParametersOutput, error) { - req, out := c.DescribeDefaultParametersRequest(input) - return out, req.Send() -} - -// DescribeDefaultParametersWithContext is the same as DescribeDefaultParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDefaultParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) DescribeDefaultParametersWithContext(ctx aws.Context, input *DescribeDefaultParametersInput, opts ...request.Option) (*DescribeDefaultParametersOutput, error) { - req, out := c.DescribeDefaultParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEvents = "DescribeEvents" - -// DescribeEventsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEvents for more information on using the DescribeEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventsRequest method. -// req, resp := client.DescribeEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeEvents -func (c *DAX) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Request, output *DescribeEventsOutput) { - op := &request.Operation{ - Name: opDescribeEvents, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEventsInput{} - } - - output = &DescribeEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEvents API operation for Amazon DynamoDB Accelerator (DAX). -// -// Returns events related to DAX clusters and parameter groups. You can obtain -// events specific to a particular DAX cluster or parameter group by providing -// the name as a parameter. -// -// By default, only the events occurring within the last hour are returned; -// however, you can retrieve up to 14 days' worth of events if necessary. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation DescribeEvents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeEvents -func (c *DAX) DescribeEvents(input *DescribeEventsInput) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - return out, req.Send() -} - -// DescribeEventsWithContext is the same as DescribeEvents with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) DescribeEventsWithContext(ctx aws.Context, input *DescribeEventsInput, opts ...request.Option) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeParameterGroups = "DescribeParameterGroups" - -// DescribeParameterGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeParameterGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeParameterGroups for more information on using the DescribeParameterGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeParameterGroupsRequest method. -// req, resp := client.DescribeParameterGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeParameterGroups -func (c *DAX) DescribeParameterGroupsRequest(input *DescribeParameterGroupsInput) (req *request.Request, output *DescribeParameterGroupsOutput) { - op := &request.Operation{ - Name: opDescribeParameterGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeParameterGroupsInput{} - } - - output = &DescribeParameterGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeParameterGroups API operation for Amazon DynamoDB Accelerator (DAX). -// -// Returns a list of parameter group descriptions. If a parameter group name -// is specified, the list will contain only the descriptions for that group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation DescribeParameterGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" -// The specified parameter group does not exist. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeParameterGroups -func (c *DAX) DescribeParameterGroups(input *DescribeParameterGroupsInput) (*DescribeParameterGroupsOutput, error) { - req, out := c.DescribeParameterGroupsRequest(input) - return out, req.Send() -} - -// DescribeParameterGroupsWithContext is the same as DescribeParameterGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeParameterGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) DescribeParameterGroupsWithContext(ctx aws.Context, input *DescribeParameterGroupsInput, opts ...request.Option) (*DescribeParameterGroupsOutput, error) { - req, out := c.DescribeParameterGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeParameters = "DescribeParameters" - -// DescribeParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeParameters for more information on using the DescribeParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeParametersRequest method. -// req, resp := client.DescribeParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeParameters -func (c *DAX) DescribeParametersRequest(input *DescribeParametersInput) (req *request.Request, output *DescribeParametersOutput) { - op := &request.Operation{ - Name: opDescribeParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeParametersInput{} - } - - output = &DescribeParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeParameters API operation for Amazon DynamoDB Accelerator (DAX). -// -// Returns the detailed parameter list for a particular parameter group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation DescribeParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" -// The specified parameter group does not exist. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeParameters -func (c *DAX) DescribeParameters(input *DescribeParametersInput) (*DescribeParametersOutput, error) { - req, out := c.DescribeParametersRequest(input) - return out, req.Send() -} - -// DescribeParametersWithContext is the same as DescribeParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) DescribeParametersWithContext(ctx aws.Context, input *DescribeParametersInput, opts ...request.Option) (*DescribeParametersOutput, error) { - req, out := c.DescribeParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSubnetGroups = "DescribeSubnetGroups" - -// DescribeSubnetGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSubnetGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSubnetGroups for more information on using the DescribeSubnetGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSubnetGroupsRequest method. -// req, resp := client.DescribeSubnetGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeSubnetGroups -func (c *DAX) DescribeSubnetGroupsRequest(input *DescribeSubnetGroupsInput) (req *request.Request, output *DescribeSubnetGroupsOutput) { - op := &request.Operation{ - Name: opDescribeSubnetGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSubnetGroupsInput{} - } - - output = &DescribeSubnetGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSubnetGroups API operation for Amazon DynamoDB Accelerator (DAX). -// -// Returns a list of subnet group descriptions. If a subnet group name is specified, -// the list will contain only the description of that group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation DescribeSubnetGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubnetGroupNotFoundFault "SubnetGroupNotFoundFault" -// The requested subnet group name does not refer to an existing subnet group. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeSubnetGroups -func (c *DAX) DescribeSubnetGroups(input *DescribeSubnetGroupsInput) (*DescribeSubnetGroupsOutput, error) { - req, out := c.DescribeSubnetGroupsRequest(input) - return out, req.Send() -} - -// DescribeSubnetGroupsWithContext is the same as DescribeSubnetGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSubnetGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) DescribeSubnetGroupsWithContext(ctx aws.Context, input *DescribeSubnetGroupsInput, opts ...request.Option) (*DescribeSubnetGroupsOutput, error) { - req, out := c.DescribeSubnetGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opIncreaseReplicationFactor = "IncreaseReplicationFactor" - -// IncreaseReplicationFactorRequest generates a "aws/request.Request" representing the -// client's request for the IncreaseReplicationFactor operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See IncreaseReplicationFactor for more information on using the IncreaseReplicationFactor -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the IncreaseReplicationFactorRequest method. -// req, resp := client.IncreaseReplicationFactorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/IncreaseReplicationFactor -func (c *DAX) IncreaseReplicationFactorRequest(input *IncreaseReplicationFactorInput) (req *request.Request, output *IncreaseReplicationFactorOutput) { - op := &request.Operation{ - Name: opIncreaseReplicationFactor, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &IncreaseReplicationFactorInput{} - } - - output = &IncreaseReplicationFactorOutput{} - req = c.newRequest(op, input, output) - return -} - -// IncreaseReplicationFactor API operation for Amazon DynamoDB Accelerator (DAX). -// -// Adds one or more nodes to a DAX cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation IncreaseReplicationFactor for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" -// The requested cluster ID does not refer to an existing DAX cluster. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" -// The requested DAX cluster is not in the available state. -// -// * ErrCodeInsufficientClusterCapacityFault "InsufficientClusterCapacityFault" -// There are not enough system resources to create the cluster you requested -// (or to resize an already-existing cluster). -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The VPC network is in an invalid state. -// -// * ErrCodeNodeQuotaForClusterExceededFault "NodeQuotaForClusterExceededFault" -// You have attempted to exceed the maximum number of nodes for a DAX cluster. -// -// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceededFault" -// You have attempted to exceed the maximum number of nodes for your AWS account. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/IncreaseReplicationFactor -func (c *DAX) IncreaseReplicationFactor(input *IncreaseReplicationFactorInput) (*IncreaseReplicationFactorOutput, error) { - req, out := c.IncreaseReplicationFactorRequest(input) - return out, req.Send() -} - -// IncreaseReplicationFactorWithContext is the same as IncreaseReplicationFactor with the addition of -// the ability to pass a context and additional request options. -// -// See IncreaseReplicationFactor for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) IncreaseReplicationFactorWithContext(ctx aws.Context, input *IncreaseReplicationFactorInput, opts ...request.Option) (*IncreaseReplicationFactorOutput, error) { - req, out := c.IncreaseReplicationFactorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTags = "ListTags" - -// ListTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTags for more information on using the ListTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsRequest method. -// req, resp := client.ListTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/ListTags -func (c *DAX) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { - op := &request.Operation{ - Name: opListTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsInput{} - } - - output = &ListTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTags API operation for Amazon DynamoDB Accelerator (DAX). -// -// List all of the tags for a DAX cluster. You can call ListTags up to 10 times -// per second, per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation ListTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" -// The requested cluster ID does not refer to an existing DAX cluster. -// -// * ErrCodeInvalidARNFault "InvalidARNFault" -// The Amazon Resource Name (ARN) supplied in the request is not valid. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" -// The requested DAX cluster is not in the available state. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/ListTags -func (c *DAX) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - return out, req.Send() -} - -// ListTagsWithContext is the same as ListTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRebootNode = "RebootNode" - -// RebootNodeRequest generates a "aws/request.Request" representing the -// client's request for the RebootNode operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebootNode for more information on using the RebootNode -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebootNodeRequest method. -// req, resp := client.RebootNodeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/RebootNode -func (c *DAX) RebootNodeRequest(input *RebootNodeInput) (req *request.Request, output *RebootNodeOutput) { - op := &request.Operation{ - Name: opRebootNode, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RebootNodeInput{} - } - - output = &RebootNodeOutput{} - req = c.newRequest(op, input, output) - return -} - -// RebootNode API operation for Amazon DynamoDB Accelerator (DAX). -// -// Reboots a single node of a DAX cluster. The reboot action takes place as -// soon as possible. During the reboot, the node status is set to REBOOTING. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation RebootNode for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" -// The requested cluster ID does not refer to an existing DAX cluster. -// -// * ErrCodeNodeNotFoundFault "NodeNotFoundFault" -// None of the nodes in the cluster have the given node ID. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" -// The requested DAX cluster is not in the available state. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/RebootNode -func (c *DAX) RebootNode(input *RebootNodeInput) (*RebootNodeOutput, error) { - req, out := c.RebootNodeRequest(input) - return out, req.Send() -} - -// RebootNodeWithContext is the same as RebootNode with the addition of -// the ability to pass a context and additional request options. -// -// See RebootNode for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) RebootNodeWithContext(ctx aws.Context, input *RebootNodeInput, opts ...request.Option) (*RebootNodeOutput, error) { - req, out := c.RebootNodeRequest(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/dax-2017-04-19/TagResource -func (c *DAX) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// TagResource API operation for Amazon DynamoDB Accelerator (DAX). -// -// Associates a set of tags with a DAX resource. You can call TagResource up -// to 5 times per second, per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" -// The requested cluster ID does not refer to an existing DAX cluster. -// -// * ErrCodeTagQuotaPerResourceExceeded "TagQuotaPerResourceExceeded" -// You have exceeded the maximum number of tags for this DAX cluster. -// -// * ErrCodeInvalidARNFault "InvalidARNFault" -// The Amazon Resource Name (ARN) supplied in the request is not valid. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" -// The requested DAX cluster is not in the available state. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/TagResource -func (c *DAX) 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 *DAX) 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/dax-2017-04-19/UntagResource -func (c *DAX) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// UntagResource API operation for Amazon DynamoDB Accelerator (DAX). -// -// Removes the association of tags from a DAX resource. You can call UntagResource -// up to 5 times per second, per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" -// The requested cluster ID does not refer to an existing DAX cluster. -// -// * ErrCodeInvalidARNFault "InvalidARNFault" -// The Amazon Resource Name (ARN) supplied in the request is not valid. -// -// * ErrCodeTagNotFoundFault "TagNotFoundFault" -// The tag does not exist. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" -// The requested DAX cluster is not in the available state. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UntagResource -func (c *DAX) 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 *DAX) 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 opUpdateCluster = "UpdateCluster" - -// UpdateClusterRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateCluster for more information on using the UpdateCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateClusterRequest method. -// req, resp := client.UpdateClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UpdateCluster -func (c *DAX) UpdateClusterRequest(input *UpdateClusterInput) (req *request.Request, output *UpdateClusterOutput) { - op := &request.Operation{ - Name: opUpdateCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateClusterInput{} - } - - output = &UpdateClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateCluster API operation for Amazon DynamoDB Accelerator (DAX). -// -// Modifies the settings for a DAX cluster. You can use this action to change -// one or more cluster configuration parameters by specifying the parameters -// and the new values. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation UpdateCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" -// The requested DAX cluster is not in the available state. -// -// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" -// The requested cluster ID does not refer to an existing DAX cluster. -// -// * ErrCodeInvalidParameterGroupStateFault "InvalidParameterGroupStateFault" -// One or more parameters in a parameter group are in an invalid state. -// -// * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" -// The specified parameter group does not exist. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UpdateCluster -func (c *DAX) UpdateCluster(input *UpdateClusterInput) (*UpdateClusterOutput, error) { - req, out := c.UpdateClusterRequest(input) - return out, req.Send() -} - -// UpdateClusterWithContext is the same as UpdateCluster with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) UpdateClusterWithContext(ctx aws.Context, input *UpdateClusterInput, opts ...request.Option) (*UpdateClusterOutput, error) { - req, out := c.UpdateClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateParameterGroup = "UpdateParameterGroup" - -// UpdateParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateParameterGroup for more information on using the UpdateParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateParameterGroupRequest method. -// req, resp := client.UpdateParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UpdateParameterGroup -func (c *DAX) UpdateParameterGroupRequest(input *UpdateParameterGroupInput) (req *request.Request, output *UpdateParameterGroupOutput) { - op := &request.Operation{ - Name: opUpdateParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateParameterGroupInput{} - } - - output = &UpdateParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateParameterGroup API operation for Amazon DynamoDB Accelerator (DAX). -// -// Modifies the parameters of a parameter group. You can modify up to 20 parameters -// in a single request by submitting a list parameter name and value pairs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation UpdateParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterGroupStateFault "InvalidParameterGroupStateFault" -// One or more parameters in a parameter group are in an invalid state. -// -// * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" -// The specified parameter group does not exist. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UpdateParameterGroup -func (c *DAX) UpdateParameterGroup(input *UpdateParameterGroupInput) (*UpdateParameterGroupOutput, error) { - req, out := c.UpdateParameterGroupRequest(input) - return out, req.Send() -} - -// UpdateParameterGroupWithContext is the same as UpdateParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) UpdateParameterGroupWithContext(ctx aws.Context, input *UpdateParameterGroupInput, opts ...request.Option) (*UpdateParameterGroupOutput, error) { - req, out := c.UpdateParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSubnetGroup = "UpdateSubnetGroup" - -// UpdateSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSubnetGroup for more information on using the UpdateSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSubnetGroupRequest method. -// req, resp := client.UpdateSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UpdateSubnetGroup -func (c *DAX) UpdateSubnetGroupRequest(input *UpdateSubnetGroupInput) (req *request.Request, output *UpdateSubnetGroupOutput) { - op := &request.Operation{ - Name: opUpdateSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSubnetGroupInput{} - } - - output = &UpdateSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSubnetGroup API operation for Amazon DynamoDB Accelerator (DAX). -// -// Modifies an existing subnet group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s -// API operation UpdateSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubnetGroupNotFoundFault "SubnetGroupNotFoundFault" -// The requested subnet group name does not refer to an existing subnet group. -// -// * ErrCodeSubnetQuotaExceededFault "SubnetQuotaExceededFault" -// The request cannot be processed because it would exceed the allowed number -// of subnets in a subnet group. -// -// * ErrCodeSubnetInUse "SubnetInUse" -// The requested subnet is being used by another subnet group. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// An invalid subnet identifier was specified. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UpdateSubnetGroup -func (c *DAX) UpdateSubnetGroup(input *UpdateSubnetGroupInput) (*UpdateSubnetGroupOutput, error) { - req, out := c.UpdateSubnetGroupRequest(input) - return out, req.Send() -} - -// UpdateSubnetGroupWithContext is the same as UpdateSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DAX) UpdateSubnetGroupWithContext(ctx aws.Context, input *UpdateSubnetGroupInput, opts ...request.Option) (*UpdateSubnetGroupOutput, error) { - req, out := c.UpdateSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Contains all of the attributes of a specific DAX cluster. -type Cluster struct { - _ struct{} `type:"structure"` - - // The number of nodes in the cluster that are active (i.e., capable of serving - // requests). - ActiveNodes *int64 `type:"integer"` - - // The Amazon Resource Name (ARN) that uniquely identifies the cluster. - ClusterArn *string `type:"string"` - - // The configuration endpoint for this DAX cluster, consisting of a DNS name - // and a port number. Client applications can specify this endpoint, rather - // than an individual node endpoint, and allow the DAX client software to intelligently - // route requests and responses to nodes in the DAX cluster. - ClusterDiscoveryEndpoint *Endpoint `type:"structure"` - - // The name of the DAX cluster. - ClusterName *string `type:"string"` - - // The description of the cluster. - Description *string `type:"string"` - - // A valid Amazon Resource Name (ARN) that identifies an IAM role. At runtime, - // DAX will assume this role and use the role's permissions to access DynamoDB - // on your behalf. - IamRoleArn *string `type:"string"` - - // A list of nodes to be removed from the cluster. - NodeIdsToRemove []*string `type:"list"` - - // The node type for the nodes in the cluster. (All nodes in a DAX cluster are - // of the same type.) - NodeType *string `type:"string"` - - // A list of nodes that are currently in the cluster. - Nodes []*Node `type:"list"` - - // Describes a notification topic and its status. Notification topics are used - // for publishing DAX events to subscribers using Amazon Simple Notification - // Service (SNS). - NotificationConfiguration *NotificationConfiguration `type:"structure"` - - // The parameter group being used by nodes in the cluster. - ParameterGroup *ParameterGroupStatus `type:"structure"` - - // A range of time when maintenance of DAX cluster software will be performed. - // For example: sun:01:00-sun:09:00. Cluster maintenance normally takes less - // than 30 minutes, and is performed automatically within the maintenance window. - PreferredMaintenanceWindow *string `type:"string"` - - // The description of the server-side encryption status on the specified DAX - // cluster. - SSEDescription *SSEDescription `type:"structure"` - - // A list of security groups, and the status of each, for the nodes in the cluster. - SecurityGroups []*SecurityGroupMembership `type:"list"` - - // The current status of the cluster. - Status *string `type:"string"` - - // The subnet group where the DAX cluster is running. - SubnetGroup *string `type:"string"` - - // The total number of nodes in the cluster. - TotalNodes *int64 `type:"integer"` -} - -// String returns the string representation -func (s Cluster) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Cluster) GoString() string { - return s.String() -} - -// SetActiveNodes sets the ActiveNodes field's value. -func (s *Cluster) SetActiveNodes(v int64) *Cluster { - s.ActiveNodes = &v - return s -} - -// SetClusterArn sets the ClusterArn field's value. -func (s *Cluster) SetClusterArn(v string) *Cluster { - s.ClusterArn = &v - return s -} - -// SetClusterDiscoveryEndpoint sets the ClusterDiscoveryEndpoint field's value. -func (s *Cluster) SetClusterDiscoveryEndpoint(v *Endpoint) *Cluster { - s.ClusterDiscoveryEndpoint = v - return s -} - -// SetClusterName sets the ClusterName field's value. -func (s *Cluster) SetClusterName(v string) *Cluster { - s.ClusterName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Cluster) SetDescription(v string) *Cluster { - s.Description = &v - return s -} - -// SetIamRoleArn sets the IamRoleArn field's value. -func (s *Cluster) SetIamRoleArn(v string) *Cluster { - s.IamRoleArn = &v - return s -} - -// SetNodeIdsToRemove sets the NodeIdsToRemove field's value. -func (s *Cluster) SetNodeIdsToRemove(v []*string) *Cluster { - s.NodeIdsToRemove = v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *Cluster) SetNodeType(v string) *Cluster { - s.NodeType = &v - return s -} - -// SetNodes sets the Nodes field's value. -func (s *Cluster) SetNodes(v []*Node) *Cluster { - s.Nodes = v - return s -} - -// SetNotificationConfiguration sets the NotificationConfiguration field's value. -func (s *Cluster) SetNotificationConfiguration(v *NotificationConfiguration) *Cluster { - s.NotificationConfiguration = v - return s -} - -// SetParameterGroup sets the ParameterGroup field's value. -func (s *Cluster) SetParameterGroup(v *ParameterGroupStatus) *Cluster { - s.ParameterGroup = v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *Cluster) SetPreferredMaintenanceWindow(v string) *Cluster { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetSSEDescription sets the SSEDescription field's value. -func (s *Cluster) SetSSEDescription(v *SSEDescription) *Cluster { - s.SSEDescription = v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *Cluster) SetSecurityGroups(v []*SecurityGroupMembership) *Cluster { - s.SecurityGroups = v - return s -} - -// SetStatus sets the Status field's value. -func (s *Cluster) SetStatus(v string) *Cluster { - s.Status = &v - return s -} - -// SetSubnetGroup sets the SubnetGroup field's value. -func (s *Cluster) SetSubnetGroup(v string) *Cluster { - s.SubnetGroup = &v - return s -} - -// SetTotalNodes sets the TotalNodes field's value. -func (s *Cluster) SetTotalNodes(v int64) *Cluster { - s.TotalNodes = &v - return s -} - -type CreateClusterInput struct { - _ struct{} `type:"structure"` - - // The Availability Zones (AZs) in which the cluster nodes will be created. - // All nodes belonging to the cluster are placed in these Availability Zones. - // Use this parameter if you want to distribute the nodes across multiple AZs. - AvailabilityZones []*string `type:"list"` - - // The cluster identifier. This parameter is stored as a lowercase string. - // - // Constraints: - // - // * A name must contain from 1 to 20 alphanumeric characters or hyphens. - // - // * The first character must be a letter. - // - // * A name cannot end with a hyphen or contain two consecutive hyphens. - // - // ClusterName is a required field - ClusterName *string `type:"string" required:"true"` - - // A description of the cluster. - Description *string `type:"string"` - - // A valid Amazon Resource Name (ARN) that identifies an IAM role. At runtime, - // DAX will assume this role and use the role's permissions to access DynamoDB - // on your behalf. - // - // IamRoleArn is a required field - IamRoleArn *string `type:"string" required:"true"` - - // The compute and memory capacity of the nodes in the cluster. - // - // NodeType is a required field - NodeType *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications - // will be sent. - // - // The Amazon SNS topic owner must be same as the DAX cluster owner. - NotificationTopicArn *string `type:"string"` - - // The parameter group to be associated with the DAX cluster. - ParameterGroupName *string `type:"string"` - - // Specifies the weekly time range during which maintenance on the DAX cluster - // is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi - // (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid - // values for ddd are: - // - // * sun - // - // * mon - // - // * tue - // - // * wed - // - // * thu - // - // * fri - // - // * sat - // - // Example: sun:05:00-sun:09:00 - // - // If you don't specify a preferred maintenance window when you create or modify - // a cache cluster, DAX assigns a 60-minute maintenance window on a randomly - // selected day of the week. - PreferredMaintenanceWindow *string `type:"string"` - - // The number of nodes in the DAX cluster. A replication factor of 1 will create - // a single-node cluster, without any read replicas. For additional fault tolerance, - // you can create a multiple node cluster with one or more read replicas. To - // do this, set ReplicationFactor to 2 or more. - // - // AWS recommends that you have at least two read replicas per cluster. - // - // ReplicationFactor is a required field - ReplicationFactor *int64 `type:"integer" required:"true"` - - // Represents the settings used to enable server-side encryption on the cluster. - SSESpecification *SSESpecification `type:"structure"` - - // A list of security group IDs to be assigned to each node in the DAX cluster. - // (Each of the security group ID is system-generated.) - // - // If this parameter is not specified, DAX assigns the default VPC security - // group to each node. - SecurityGroupIds []*string `type:"list"` - - // The name of the subnet group to be used for the replication group. - // - // DAX clusters can only run in an Amazon VPC environment. All of the subnets - // that you specify in a subnet group must exist in the same VPC. - SubnetGroupName *string `type:"string"` - - // A set of tags to associate with the DAX cluster. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreateClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"} - if s.ClusterName == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterName")) - } - if s.IamRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("IamRoleArn")) - } - if s.NodeType == nil { - invalidParams.Add(request.NewErrParamRequired("NodeType")) - } - if s.ReplicationFactor == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationFactor")) - } - if s.SSESpecification != nil { - if err := s.SSESpecification.Validate(); err != nil { - invalidParams.AddNested("SSESpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *CreateClusterInput) SetAvailabilityZones(v []*string) *CreateClusterInput { - s.AvailabilityZones = v - return s -} - -// SetClusterName sets the ClusterName field's value. -func (s *CreateClusterInput) SetClusterName(v string) *CreateClusterInput { - s.ClusterName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateClusterInput) SetDescription(v string) *CreateClusterInput { - s.Description = &v - return s -} - -// SetIamRoleArn sets the IamRoleArn field's value. -func (s *CreateClusterInput) SetIamRoleArn(v string) *CreateClusterInput { - s.IamRoleArn = &v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *CreateClusterInput) SetNodeType(v string) *CreateClusterInput { - s.NodeType = &v - return s -} - -// SetNotificationTopicArn sets the NotificationTopicArn field's value. -func (s *CreateClusterInput) SetNotificationTopicArn(v string) *CreateClusterInput { - s.NotificationTopicArn = &v - return s -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *CreateClusterInput) SetParameterGroupName(v string) *CreateClusterInput { - s.ParameterGroupName = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CreateClusterInput) SetPreferredMaintenanceWindow(v string) *CreateClusterInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetReplicationFactor sets the ReplicationFactor field's value. -func (s *CreateClusterInput) SetReplicationFactor(v int64) *CreateClusterInput { - s.ReplicationFactor = &v - return s -} - -// SetSSESpecification sets the SSESpecification field's value. -func (s *CreateClusterInput) SetSSESpecification(v *SSESpecification) *CreateClusterInput { - s.SSESpecification = v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *CreateClusterInput) SetSecurityGroupIds(v []*string) *CreateClusterInput { - s.SecurityGroupIds = v - return s -} - -// SetSubnetGroupName sets the SubnetGroupName field's value. -func (s *CreateClusterInput) SetSubnetGroupName(v string) *CreateClusterInput { - s.SubnetGroupName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateClusterInput) SetTags(v []*Tag) *CreateClusterInput { - s.Tags = v - return s -} - -type CreateClusterOutput struct { - _ struct{} `type:"structure"` - - // A description of the DAX cluster that you have created. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s CreateClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *CreateClusterOutput) SetCluster(v *Cluster) *CreateClusterOutput { - s.Cluster = v - return s -} - -type CreateParameterGroupInput struct { - _ struct{} `type:"structure"` - - // A description of the parameter group. - Description *string `type:"string"` - - // The name of the parameter group to apply to all of the clusters in this replication - // group. - // - // ParameterGroupName is a required field - ParameterGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateParameterGroupInput"} - if s.ParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateParameterGroupInput) SetDescription(v string) *CreateParameterGroupInput { - s.Description = &v - return s -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *CreateParameterGroupInput) SetParameterGroupName(v string) *CreateParameterGroupInput { - s.ParameterGroupName = &v - return s -} - -type CreateParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // Represents the output of a CreateParameterGroup action. - ParameterGroup *ParameterGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateParameterGroupOutput) GoString() string { - return s.String() -} - -// SetParameterGroup sets the ParameterGroup field's value. -func (s *CreateParameterGroupOutput) SetParameterGroup(v *ParameterGroup) *CreateParameterGroupOutput { - s.ParameterGroup = v - return s -} - -type CreateSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // A description for the subnet group - Description *string `type:"string"` - - // A name for the subnet group. This value is stored as a lowercase string. - // - // SubnetGroupName is a required field - SubnetGroupName *string `type:"string" required:"true"` - - // A list of VPC subnet IDs for the subnet group. - // - // SubnetIds is a required field - SubnetIds []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSubnetGroupInput"} - if s.SubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetGroupName")) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateSubnetGroupInput) SetDescription(v string) *CreateSubnetGroupInput { - s.Description = &v - return s -} - -// SetSubnetGroupName sets the SubnetGroupName field's value. -func (s *CreateSubnetGroupInput) SetSubnetGroupName(v string) *CreateSubnetGroupInput { - s.SubnetGroupName = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateSubnetGroupInput) SetSubnetIds(v []*string) *CreateSubnetGroupInput { - s.SubnetIds = v - return s -} - -type CreateSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // Represents the output of a CreateSubnetGroup operation. - SubnetGroup *SubnetGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetSubnetGroup sets the SubnetGroup field's value. -func (s *CreateSubnetGroupOutput) SetSubnetGroup(v *SubnetGroup) *CreateSubnetGroupOutput { - s.SubnetGroup = v - return s -} - -type DecreaseReplicationFactorInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone(s) from which to remove nodes. - AvailabilityZones []*string `type:"list"` - - // The name of the DAX cluster from which you want to remove nodes. - // - // ClusterName is a required field - ClusterName *string `type:"string" required:"true"` - - // The new number of nodes for the DAX cluster. - // - // NewReplicationFactor is a required field - NewReplicationFactor *int64 `type:"integer" required:"true"` - - // The unique identifiers of the nodes to be removed from the cluster. - NodeIdsToRemove []*string `type:"list"` -} - -// String returns the string representation -func (s DecreaseReplicationFactorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DecreaseReplicationFactorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DecreaseReplicationFactorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DecreaseReplicationFactorInput"} - if s.ClusterName == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterName")) - } - if s.NewReplicationFactor == nil { - invalidParams.Add(request.NewErrParamRequired("NewReplicationFactor")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DecreaseReplicationFactorInput) SetAvailabilityZones(v []*string) *DecreaseReplicationFactorInput { - s.AvailabilityZones = v - return s -} - -// SetClusterName sets the ClusterName field's value. -func (s *DecreaseReplicationFactorInput) SetClusterName(v string) *DecreaseReplicationFactorInput { - s.ClusterName = &v - return s -} - -// SetNewReplicationFactor sets the NewReplicationFactor field's value. -func (s *DecreaseReplicationFactorInput) SetNewReplicationFactor(v int64) *DecreaseReplicationFactorInput { - s.NewReplicationFactor = &v - return s -} - -// SetNodeIdsToRemove sets the NodeIdsToRemove field's value. -func (s *DecreaseReplicationFactorInput) SetNodeIdsToRemove(v []*string) *DecreaseReplicationFactorInput { - s.NodeIdsToRemove = v - return s -} - -type DecreaseReplicationFactorOutput struct { - _ struct{} `type:"structure"` - - // A description of the DAX cluster, after you have decreased its replication - // factor. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s DecreaseReplicationFactorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DecreaseReplicationFactorOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *DecreaseReplicationFactorOutput) SetCluster(v *Cluster) *DecreaseReplicationFactorOutput { - s.Cluster = v - return s -} - -type DeleteClusterInput struct { - _ struct{} `type:"structure"` - - // The name of the cluster to be deleted. - // - // ClusterName is a required field - ClusterName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"} - if s.ClusterName == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterName sets the ClusterName field's value. -func (s *DeleteClusterInput) SetClusterName(v string) *DeleteClusterInput { - s.ClusterName = &v - return s -} - -type DeleteClusterOutput struct { - _ struct{} `type:"structure"` - - // A description of the DAX cluster that is being deleted. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s DeleteClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *DeleteClusterOutput) SetCluster(v *Cluster) *DeleteClusterOutput { - s.Cluster = v - return s -} - -type DeleteParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the parameter group to delete. - // - // ParameterGroupName is a required field - ParameterGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteParameterGroupInput"} - if s.ParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *DeleteParameterGroupInput) SetParameterGroupName(v string) *DeleteParameterGroupInput { - s.ParameterGroupName = &v - return s -} - -type DeleteParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // A user-specified message for this action (i.e., a reason for deleting the - // parameter group). - DeletionMessage *string `type:"string"` -} - -// String returns the string representation -func (s DeleteParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDeletionMessage sets the DeletionMessage field's value. -func (s *DeleteParameterGroupOutput) SetDeletionMessage(v string) *DeleteParameterGroupOutput { - s.DeletionMessage = &v - return s -} - -type DeleteSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the subnet group to delete. - // - // SubnetGroupName is a required field - SubnetGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSubnetGroupInput"} - if s.SubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSubnetGroupName sets the SubnetGroupName field's value. -func (s *DeleteSubnetGroupInput) SetSubnetGroupName(v string) *DeleteSubnetGroupInput { - s.SubnetGroupName = &v - return s -} - -type DeleteSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // A user-specified message for this action (i.e., a reason for deleting the - // subnet group). - DeletionMessage *string `type:"string"` -} - -// String returns the string representation -func (s DeleteSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetDeletionMessage sets the DeletionMessage field's value. -func (s *DeleteSubnetGroupOutput) SetDeletionMessage(v string) *DeleteSubnetGroupOutput { - s.DeletionMessage = &v - return s -} - -type DescribeClustersInput struct { - _ struct{} `type:"structure"` - - // The names of the DAX clusters being described. - ClusterNames []*string `type:"list"` - - // The maximum number of results to include in the response. If more results - // exist than the specified MaxResults value, a token is included in the response - // so that the remaining results can be retrieved. - // - // The value for MaxResults must be between 20 and 100. - MaxResults *int64 `type:"integer"` - - // An optional token returned from a prior request. Use this token for pagination - // of results from this action. If this parameter is specified, the response - // includes only results beyond the token, up to the value specified by MaxResults. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeClustersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClustersInput) GoString() string { - return s.String() -} - -// SetClusterNames sets the ClusterNames field's value. -func (s *DescribeClustersInput) SetClusterNames(v []*string) *DescribeClustersInput { - s.ClusterNames = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeClustersInput) SetMaxResults(v int64) *DescribeClustersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClustersInput) SetNextToken(v string) *DescribeClustersInput { - s.NextToken = &v - return s -} - -type DescribeClustersOutput struct { - _ struct{} `type:"structure"` - - // The descriptions of your DAX clusters, in response to a DescribeClusters - // request. - Clusters []*Cluster `type:"list"` - - // Provides an identifier to allow retrieval of paginated results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeClustersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClustersOutput) GoString() string { - return s.String() -} - -// SetClusters sets the Clusters field's value. -func (s *DescribeClustersOutput) SetClusters(v []*Cluster) *DescribeClustersOutput { - s.Clusters = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClustersOutput) SetNextToken(v string) *DescribeClustersOutput { - s.NextToken = &v - return s -} - -type DescribeDefaultParametersInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to include in the response. If more results - // exist than the specified MaxResults value, a token is included in the response - // so that the remaining results can be retrieved. - // - // The value for MaxResults must be between 20 and 100. - MaxResults *int64 `type:"integer"` - - // An optional token returned from a prior request. Use this token for pagination - // of results from this action. If this parameter is specified, the response - // includes only results beyond the token, up to the value specified by MaxResults. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDefaultParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDefaultParametersInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeDefaultParametersInput) SetMaxResults(v int64) *DescribeDefaultParametersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDefaultParametersInput) SetNextToken(v string) *DescribeDefaultParametersInput { - s.NextToken = &v - return s -} - -type DescribeDefaultParametersOutput struct { - _ struct{} `type:"structure"` - - // Provides an identifier to allow retrieval of paginated results. - NextToken *string `type:"string"` - - // A list of parameters. Each element in the list represents one parameter. - Parameters []*Parameter `type:"list"` -} - -// String returns the string representation -func (s DescribeDefaultParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDefaultParametersOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDefaultParametersOutput) SetNextToken(v string) *DescribeDefaultParametersOutput { - s.NextToken = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DescribeDefaultParametersOutput) SetParameters(v []*Parameter) *DescribeDefaultParametersOutput { - s.Parameters = v - return s -} - -type DescribeEventsInput struct { - _ struct{} `type:"structure"` - - // The number of minutes' worth of events to retrieve. - Duration *int64 `type:"integer"` - - // The end of the time interval for which to retrieve events, specified in ISO - // 8601 format. - EndTime *time.Time `type:"timestamp"` - - // The maximum number of results to include in the response. If more results - // exist than the specified MaxResults value, a token is included in the response - // so that the remaining results can be retrieved. - // - // The value for MaxResults must be between 20 and 100. - MaxResults *int64 `type:"integer"` - - // An optional token returned from a prior request. Use this token for pagination - // of results from this action. If this parameter is specified, the response - // includes only results beyond the token, up to the value specified by MaxResults. - NextToken *string `type:"string"` - - // The identifier of the event source for which events will be returned. If - // not specified, then all sources are included in the response. - SourceName *string `type:"string"` - - // The event source to retrieve events for. If no value is specified, all events - // are returned. - SourceType *string `type:"string" enum:"SourceType"` - - // The beginning of the time interval to retrieve events for, specified in ISO - // 8601 format. - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s DescribeEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsInput) GoString() string { - return s.String() -} - -// SetDuration sets the Duration field's value. -func (s *DescribeEventsInput) SetDuration(v int64) *DescribeEventsInput { - s.Duration = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *DescribeEventsInput) SetEndTime(v time.Time) *DescribeEventsInput { - s.EndTime = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeEventsInput) SetMaxResults(v int64) *DescribeEventsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEventsInput) SetNextToken(v string) *DescribeEventsInput { - s.NextToken = &v - return s -} - -// SetSourceName sets the SourceName field's value. -func (s *DescribeEventsInput) SetSourceName(v string) *DescribeEventsInput { - s.SourceName = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *DescribeEventsInput) SetSourceType(v string) *DescribeEventsInput { - s.SourceType = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeEventsInput) SetStartTime(v time.Time) *DescribeEventsInput { - s.StartTime = &v - return s -} - -type DescribeEventsOutput struct { - _ struct{} `type:"structure"` - - // An array of events. Each element in the array represents one event. - Events []*Event `type:"list"` - - // Provides an identifier to allow retrieval of paginated results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { - s.Events = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEventsOutput) SetNextToken(v string) *DescribeEventsOutput { - s.NextToken = &v - return s -} - -type DescribeParameterGroupsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to include in the response. If more results - // exist than the specified MaxResults value, a token is included in the response - // so that the remaining results can be retrieved. - // - // The value for MaxResults must be between 20 and 100. - MaxResults *int64 `type:"integer"` - - // An optional token returned from a prior request. Use this token for pagination - // of results from this action. If this parameter is specified, the response - // includes only results beyond the token, up to the value specified by MaxResults. - NextToken *string `type:"string"` - - // The names of the parameter groups. - ParameterGroupNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeParameterGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeParameterGroupsInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeParameterGroupsInput) SetMaxResults(v int64) *DescribeParameterGroupsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeParameterGroupsInput) SetNextToken(v string) *DescribeParameterGroupsInput { - s.NextToken = &v - return s -} - -// SetParameterGroupNames sets the ParameterGroupNames field's value. -func (s *DescribeParameterGroupsInput) SetParameterGroupNames(v []*string) *DescribeParameterGroupsInput { - s.ParameterGroupNames = v - return s -} - -type DescribeParameterGroupsOutput struct { - _ struct{} `type:"structure"` - - // Provides an identifier to allow retrieval of paginated results. - NextToken *string `type:"string"` - - // An array of parameter groups. Each element in the array represents one parameter - // group. - ParameterGroups []*ParameterGroup `type:"list"` -} - -// String returns the string representation -func (s DescribeParameterGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeParameterGroupsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeParameterGroupsOutput) SetNextToken(v string) *DescribeParameterGroupsOutput { - s.NextToken = &v - return s -} - -// SetParameterGroups sets the ParameterGroups field's value. -func (s *DescribeParameterGroupsOutput) SetParameterGroups(v []*ParameterGroup) *DescribeParameterGroupsOutput { - s.ParameterGroups = v - return s -} - -type DescribeParametersInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to include in the response. If more results - // exist than the specified MaxResults value, a token is included in the response - // so that the remaining results can be retrieved. - // - // The value for MaxResults must be between 20 and 100. - MaxResults *int64 `type:"integer"` - - // An optional token returned from a prior request. Use this token for pagination - // of results from this action. If this parameter is specified, the response - // includes only results beyond the token, up to the value specified by MaxResults. - NextToken *string `type:"string"` - - // The name of the parameter group. - // - // ParameterGroupName is a required field - ParameterGroupName *string `type:"string" required:"true"` - - // How the parameter is defined. For example, system denotes a system-defined - // parameter. - Source *string `type:"string"` -} - -// String returns the string representation -func (s DescribeParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeParametersInput"} - if s.ParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeParametersInput) SetMaxResults(v int64) *DescribeParametersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeParametersInput) SetNextToken(v string) *DescribeParametersInput { - s.NextToken = &v - return s -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *DescribeParametersInput) SetParameterGroupName(v string) *DescribeParametersInput { - s.ParameterGroupName = &v - return s -} - -// SetSource sets the Source field's value. -func (s *DescribeParametersInput) SetSource(v string) *DescribeParametersInput { - s.Source = &v - return s -} - -type DescribeParametersOutput struct { - _ struct{} `type:"structure"` - - // Provides an identifier to allow retrieval of paginated results. - NextToken *string `type:"string"` - - // A list of parameters within a parameter group. Each element in the list represents - // one parameter. - Parameters []*Parameter `type:"list"` -} - -// String returns the string representation -func (s DescribeParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeParametersOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeParametersOutput) SetNextToken(v string) *DescribeParametersOutput { - s.NextToken = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DescribeParametersOutput) SetParameters(v []*Parameter) *DescribeParametersOutput { - s.Parameters = v - return s -} - -type DescribeSubnetGroupsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to include in the response. If more results - // exist than the specified MaxResults value, a token is included in the response - // so that the remaining results can be retrieved. - // - // The value for MaxResults must be between 20 and 100. - MaxResults *int64 `type:"integer"` - - // An optional token returned from a prior request. Use this token for pagination - // of results from this action. If this parameter is specified, the response - // includes only results beyond the token, up to the value specified by MaxResults. - NextToken *string `type:"string"` - - // The name of the subnet group. - SubnetGroupNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeSubnetGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSubnetGroupsInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSubnetGroupsInput) SetMaxResults(v int64) *DescribeSubnetGroupsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSubnetGroupsInput) SetNextToken(v string) *DescribeSubnetGroupsInput { - s.NextToken = &v - return s -} - -// SetSubnetGroupNames sets the SubnetGroupNames field's value. -func (s *DescribeSubnetGroupsInput) SetSubnetGroupNames(v []*string) *DescribeSubnetGroupsInput { - s.SubnetGroupNames = v - return s -} - -type DescribeSubnetGroupsOutput struct { - _ struct{} `type:"structure"` - - // Provides an identifier to allow retrieval of paginated results. - NextToken *string `type:"string"` - - // An array of subnet groups. Each element in the array represents a single - // subnet group. - SubnetGroups []*SubnetGroup `type:"list"` -} - -// String returns the string representation -func (s DescribeSubnetGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSubnetGroupsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSubnetGroupsOutput) SetNextToken(v string) *DescribeSubnetGroupsOutput { - s.NextToken = &v - return s -} - -// SetSubnetGroups sets the SubnetGroups field's value. -func (s *DescribeSubnetGroupsOutput) SetSubnetGroups(v []*SubnetGroup) *DescribeSubnetGroupsOutput { - s.SubnetGroups = v - return s -} - -// Represents the information required for client programs to connect to the -// configuration endpoint for a DAX cluster, or to an individual node within -// the cluster. -type Endpoint struct { - _ struct{} `type:"structure"` - - // The DNS hostname of the endpoint. - Address *string `type:"string"` - - // The port number that applications should use to connect to the endpoint. - Port *int64 `type:"integer"` -} - -// String returns the string representation -func (s Endpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Endpoint) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *Endpoint) SetAddress(v string) *Endpoint { - s.Address = &v - return s -} - -// SetPort sets the Port field's value. -func (s *Endpoint) SetPort(v int64) *Endpoint { - s.Port = &v - return s -} - -// Represents a single occurrence of something interesting within the system. -// Some examples of events are creating a DAX cluster, adding or removing a -// node, or rebooting a node. -type Event struct { - _ struct{} `type:"structure"` - - // The date and time when the event occurred. - Date *time.Time `type:"timestamp"` - - // A user-defined message associated with the event. - Message *string `type:"string"` - - // The source of the event. For example, if the event occurred at the node level, - // the source would be the node ID. - SourceName *string `type:"string"` - - // Specifies the origin of this event - a cluster, a parameter group, a node - // ID, etc. - SourceType *string `type:"string" enum:"SourceType"` -} - -// String returns the string representation -func (s Event) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Event) GoString() string { - return s.String() -} - -// SetDate sets the Date field's value. -func (s *Event) SetDate(v time.Time) *Event { - s.Date = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *Event) SetMessage(v string) *Event { - s.Message = &v - return s -} - -// SetSourceName sets the SourceName field's value. -func (s *Event) SetSourceName(v string) *Event { - s.SourceName = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *Event) SetSourceType(v string) *Event { - s.SourceType = &v - return s -} - -type IncreaseReplicationFactorInput struct { - _ struct{} `type:"structure"` - - // The Availability Zones (AZs) in which the cluster nodes will be created. - // All nodes belonging to the cluster are placed in these Availability Zones. - // Use this parameter if you want to distribute the nodes across multiple AZs. - AvailabilityZones []*string `type:"list"` - - // The name of the DAX cluster that will receive additional nodes. - // - // ClusterName is a required field - ClusterName *string `type:"string" required:"true"` - - // The new number of nodes for the DAX cluster. - // - // NewReplicationFactor is a required field - NewReplicationFactor *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s IncreaseReplicationFactorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IncreaseReplicationFactorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IncreaseReplicationFactorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IncreaseReplicationFactorInput"} - if s.ClusterName == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterName")) - } - if s.NewReplicationFactor == nil { - invalidParams.Add(request.NewErrParamRequired("NewReplicationFactor")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *IncreaseReplicationFactorInput) SetAvailabilityZones(v []*string) *IncreaseReplicationFactorInput { - s.AvailabilityZones = v - return s -} - -// SetClusterName sets the ClusterName field's value. -func (s *IncreaseReplicationFactorInput) SetClusterName(v string) *IncreaseReplicationFactorInput { - s.ClusterName = &v - return s -} - -// SetNewReplicationFactor sets the NewReplicationFactor field's value. -func (s *IncreaseReplicationFactorInput) SetNewReplicationFactor(v int64) *IncreaseReplicationFactorInput { - s.NewReplicationFactor = &v - return s -} - -type IncreaseReplicationFactorOutput struct { - _ struct{} `type:"structure"` - - // A description of the DAX cluster. with its new replication factor. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s IncreaseReplicationFactorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IncreaseReplicationFactorOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *IncreaseReplicationFactorOutput) SetCluster(v *Cluster) *IncreaseReplicationFactorOutput { - s.Cluster = v - return s -} - -type ListTagsInput struct { - _ struct{} `type:"structure"` - - // An optional token returned from a prior request. Use this token for pagination - // of results from this action. If this parameter is specified, the response - // includes only results beyond the token. - NextToken *string `type:"string"` - - // The name of the DAX resource to which the tags belong. - // - // ResourceName is a required field - ResourceName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput { - s.NextToken = &v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *ListTagsInput) SetResourceName(v string) *ListTagsInput { - s.ResourceName = &v - return s -} - -type ListTagsOutput struct { - _ struct{} `type:"structure"` - - // If this value is present, there are additional results to be displayed. To - // retrieve them, call ListTags again, with NextToken set to this value. - NextToken *string `type:"string"` - - // A list of tags currently associated with the DAX cluster. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s ListTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput { - s.NextToken = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsOutput) SetTags(v []*Tag) *ListTagsOutput { - s.Tags = v - return s -} - -// Represents an individual node within a DAX cluster. -type Node struct { - _ struct{} `type:"structure"` - - // The Availability Zone (AZ) in which the node has been deployed. - AvailabilityZone *string `type:"string"` - - // The endpoint for the node, consisting of a DNS name and a port number. Client - // applications can connect directly to a node endpoint, if desired (as an alternative - // to allowing DAX client software to intelligently route requests and responses - // to nodes in the DAX cluster. - Endpoint *Endpoint `type:"structure"` - - // The date and time (in UNIX epoch format) when the node was launched. - NodeCreateTime *time.Time `type:"timestamp"` - - // A system-generated identifier for the node. - NodeId *string `type:"string"` - - // The current status of the node. For example: available. - NodeStatus *string `type:"string"` - - // The status of the parameter group associated with this node. For example, - // in-sync. - ParameterGroupStatus *string `type:"string"` -} - -// String returns the string representation -func (s Node) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Node) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Node) SetAvailabilityZone(v string) *Node { - s.AvailabilityZone = &v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *Node) SetEndpoint(v *Endpoint) *Node { - s.Endpoint = v - return s -} - -// SetNodeCreateTime sets the NodeCreateTime field's value. -func (s *Node) SetNodeCreateTime(v time.Time) *Node { - s.NodeCreateTime = &v - return s -} - -// SetNodeId sets the NodeId field's value. -func (s *Node) SetNodeId(v string) *Node { - s.NodeId = &v - return s -} - -// SetNodeStatus sets the NodeStatus field's value. -func (s *Node) SetNodeStatus(v string) *Node { - s.NodeStatus = &v - return s -} - -// SetParameterGroupStatus sets the ParameterGroupStatus field's value. -func (s *Node) SetParameterGroupStatus(v string) *Node { - s.ParameterGroupStatus = &v - return s -} - -// Represents a parameter value that is applicable to a particular node type. -type NodeTypeSpecificValue struct { - _ struct{} `type:"structure"` - - // A node type to which the parameter value applies. - NodeType *string `type:"string"` - - // The parameter value for this node type. - Value *string `type:"string"` -} - -// String returns the string representation -func (s NodeTypeSpecificValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NodeTypeSpecificValue) GoString() string { - return s.String() -} - -// SetNodeType sets the NodeType field's value. -func (s *NodeTypeSpecificValue) SetNodeType(v string) *NodeTypeSpecificValue { - s.NodeType = &v - return s -} - -// SetValue sets the Value field's value. -func (s *NodeTypeSpecificValue) SetValue(v string) *NodeTypeSpecificValue { - s.Value = &v - return s -} - -// Describes a notification topic and its status. Notification topics are used -// for publishing DAX events to subscribers using Amazon Simple Notification -// Service (SNS). -type NotificationConfiguration struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that identifies the topic. - TopicArn *string `type:"string"` - - // The current state of the topic. - TopicStatus *string `type:"string"` -} - -// String returns the string representation -func (s NotificationConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NotificationConfiguration) GoString() string { - return s.String() -} - -// SetTopicArn sets the TopicArn field's value. -func (s *NotificationConfiguration) SetTopicArn(v string) *NotificationConfiguration { - s.TopicArn = &v - return s -} - -// SetTopicStatus sets the TopicStatus field's value. -func (s *NotificationConfiguration) SetTopicStatus(v string) *NotificationConfiguration { - s.TopicStatus = &v - return s -} - -// Describes an individual setting that controls some aspect of DAX behavior. -type Parameter struct { - _ struct{} `type:"structure"` - - // A range of values within which the parameter can be set. - AllowedValues *string `type:"string"` - - // The conditions under which changes to this parameter can be applied. For - // example, requires-reboot indicates that a new value for this parameter will - // only take effect if a node is rebooted. - ChangeType *string `type:"string" enum:"ChangeType"` - - // The data type of the parameter. For example, integer: - DataType *string `type:"string"` - - // A description of the parameter - Description *string `type:"string"` - - // Whether the customer is allowed to modify the parameter. - IsModifiable *string `type:"string" enum:"IsModifiable"` - - // A list of node types, and specific parameter values for each node. - NodeTypeSpecificValues []*NodeTypeSpecificValue `type:"list"` - - // The name of the parameter. - ParameterName *string `type:"string"` - - // Determines whether the parameter can be applied to any nodes, or only nodes - // of a particular type. - ParameterType *string `type:"string" enum:"ParameterType"` - - // The value for the parameter. - ParameterValue *string `type:"string"` - - // How the parameter is defined. For example, system denotes a system-defined - // parameter. - Source *string `type:"string"` -} - -// String returns the string representation -func (s Parameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Parameter) GoString() string { - return s.String() -} - -// SetAllowedValues sets the AllowedValues field's value. -func (s *Parameter) SetAllowedValues(v string) *Parameter { - s.AllowedValues = &v - return s -} - -// SetChangeType sets the ChangeType field's value. -func (s *Parameter) SetChangeType(v string) *Parameter { - s.ChangeType = &v - return s -} - -// SetDataType sets the DataType field's value. -func (s *Parameter) SetDataType(v string) *Parameter { - s.DataType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Parameter) SetDescription(v string) *Parameter { - s.Description = &v - return s -} - -// SetIsModifiable sets the IsModifiable field's value. -func (s *Parameter) SetIsModifiable(v string) *Parameter { - s.IsModifiable = &v - return s -} - -// SetNodeTypeSpecificValues sets the NodeTypeSpecificValues field's value. -func (s *Parameter) SetNodeTypeSpecificValues(v []*NodeTypeSpecificValue) *Parameter { - s.NodeTypeSpecificValues = v - return s -} - -// SetParameterName sets the ParameterName field's value. -func (s *Parameter) SetParameterName(v string) *Parameter { - s.ParameterName = &v - return s -} - -// SetParameterType sets the ParameterType field's value. -func (s *Parameter) SetParameterType(v string) *Parameter { - s.ParameterType = &v - return s -} - -// SetParameterValue sets the ParameterValue field's value. -func (s *Parameter) SetParameterValue(v string) *Parameter { - s.ParameterValue = &v - return s -} - -// SetSource sets the Source field's value. -func (s *Parameter) SetSource(v string) *Parameter { - s.Source = &v - return s -} - -// A named set of parameters that are applied to all of the nodes in a DAX cluster. -type ParameterGroup struct { - _ struct{} `type:"structure"` - - // A description of the parameter group. - Description *string `type:"string"` - - // The name of the parameter group. - ParameterGroupName *string `type:"string"` -} - -// String returns the string representation -func (s ParameterGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterGroup) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *ParameterGroup) SetDescription(v string) *ParameterGroup { - s.Description = &v - return s -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *ParameterGroup) SetParameterGroupName(v string) *ParameterGroup { - s.ParameterGroupName = &v - return s -} - -// The status of a parameter group. -type ParameterGroupStatus struct { - _ struct{} `type:"structure"` - - // The node IDs of one or more nodes to be rebooted. - NodeIdsToReboot []*string `type:"list"` - - // The status of parameter updates. - ParameterApplyStatus *string `type:"string"` - - // The name of the parameter group. - ParameterGroupName *string `type:"string"` -} - -// String returns the string representation -func (s ParameterGroupStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterGroupStatus) GoString() string { - return s.String() -} - -// SetNodeIdsToReboot sets the NodeIdsToReboot field's value. -func (s *ParameterGroupStatus) SetNodeIdsToReboot(v []*string) *ParameterGroupStatus { - s.NodeIdsToReboot = v - return s -} - -// SetParameterApplyStatus sets the ParameterApplyStatus field's value. -func (s *ParameterGroupStatus) SetParameterApplyStatus(v string) *ParameterGroupStatus { - s.ParameterApplyStatus = &v - return s -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *ParameterGroupStatus) SetParameterGroupName(v string) *ParameterGroupStatus { - s.ParameterGroupName = &v - return s -} - -// An individual DAX parameter. -type ParameterNameValue struct { - _ struct{} `type:"structure"` - - // The name of the parameter. - ParameterName *string `type:"string"` - - // The value of the parameter. - ParameterValue *string `type:"string"` -} - -// String returns the string representation -func (s ParameterNameValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterNameValue) GoString() string { - return s.String() -} - -// SetParameterName sets the ParameterName field's value. -func (s *ParameterNameValue) SetParameterName(v string) *ParameterNameValue { - s.ParameterName = &v - return s -} - -// SetParameterValue sets the ParameterValue field's value. -func (s *ParameterNameValue) SetParameterValue(v string) *ParameterNameValue { - s.ParameterValue = &v - return s -} - -type RebootNodeInput struct { - _ struct{} `type:"structure"` - - // The name of the DAX cluster containing the node to be rebooted. - // - // ClusterName is a required field - ClusterName *string `type:"string" required:"true"` - - // The system-assigned ID of the node to be rebooted. - // - // NodeId is a required field - NodeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RebootNodeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootNodeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootNodeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootNodeInput"} - if s.ClusterName == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterName")) - } - if s.NodeId == nil { - invalidParams.Add(request.NewErrParamRequired("NodeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterName sets the ClusterName field's value. -func (s *RebootNodeInput) SetClusterName(v string) *RebootNodeInput { - s.ClusterName = &v - return s -} - -// SetNodeId sets the NodeId field's value. -func (s *RebootNodeInput) SetNodeId(v string) *RebootNodeInput { - s.NodeId = &v - return s -} - -type RebootNodeOutput struct { - _ struct{} `type:"structure"` - - // A description of the DAX cluster after a node has been rebooted. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s RebootNodeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootNodeOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *RebootNodeOutput) SetCluster(v *Cluster) *RebootNodeOutput { - s.Cluster = v - return s -} - -// The description of the server-side encryption status on the specified DAX -// cluster. -type SSEDescription struct { - _ struct{} `type:"structure"` - - // The current state of server-side encryption: - // - // * ENABLING - Server-side encryption is being enabled. - // - // * ENABLED - Server-side encryption is enabled. - // - // * DISABLING - Server-side encryption is being disabled. - // - // * DISABLED - Server-side encryption is disabled. - Status *string `type:"string" enum:"SSEStatus"` -} - -// String returns the string representation -func (s SSEDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SSEDescription) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *SSEDescription) SetStatus(v string) *SSEDescription { - s.Status = &v - return s -} - -// Represents the settings used to enable server-side encryption. -type SSESpecification struct { - _ struct{} `type:"structure"` - - // Indicates whether server-side encryption is enabled (true) or disabled (false) - // on the cluster. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s SSESpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SSESpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SSESpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SSESpecification"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *SSESpecification) SetEnabled(v bool) *SSESpecification { - s.Enabled = &v - return s -} - -// An individual VPC security group and its status. -type SecurityGroupMembership struct { - _ struct{} `type:"structure"` - - // The unique ID for this security group. - SecurityGroupIdentifier *string `type:"string"` - - // The status of this security group. - Status *string `type:"string"` -} - -// String returns the string representation -func (s SecurityGroupMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecurityGroupMembership) GoString() string { - return s.String() -} - -// SetSecurityGroupIdentifier sets the SecurityGroupIdentifier field's value. -func (s *SecurityGroupMembership) SetSecurityGroupIdentifier(v string) *SecurityGroupMembership { - s.SecurityGroupIdentifier = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SecurityGroupMembership) SetStatus(v string) *SecurityGroupMembership { - s.Status = &v - return s -} - -// Represents the subnet associated with a DAX cluster. This parameter refers -// to subnets defined in Amazon Virtual Private Cloud (Amazon VPC) and used -// with DAX. -type Subnet struct { - _ struct{} `type:"structure"` - - // The Availability Zone (AZ) for subnet subnet. - SubnetAvailabilityZone *string `type:"string"` - - // The system-assigned identifier for the subnet. - SubnetIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s Subnet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Subnet) GoString() string { - return s.String() -} - -// SetSubnetAvailabilityZone sets the SubnetAvailabilityZone field's value. -func (s *Subnet) SetSubnetAvailabilityZone(v string) *Subnet { - s.SubnetAvailabilityZone = &v - return s -} - -// SetSubnetIdentifier sets the SubnetIdentifier field's value. -func (s *Subnet) SetSubnetIdentifier(v string) *Subnet { - s.SubnetIdentifier = &v - return s -} - -// Represents the output of one of the following actions: -// -// * CreateSubnetGroup -// -// * ModifySubnetGroup -type SubnetGroup struct { - _ struct{} `type:"structure"` - - // The description of the subnet group. - Description *string `type:"string"` - - // The name of the subnet group. - SubnetGroupName *string `type:"string"` - - // A list of subnets associated with the subnet group. - Subnets []*Subnet `type:"list"` - - // The Amazon Virtual Private Cloud identifier (VPC ID) of the subnet group. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s SubnetGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubnetGroup) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *SubnetGroup) SetDescription(v string) *SubnetGroup { - s.Description = &v - return s -} - -// SetSubnetGroupName sets the SubnetGroupName field's value. -func (s *SubnetGroup) SetSubnetGroupName(v string) *SubnetGroup { - s.SubnetGroupName = &v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *SubnetGroup) SetSubnets(v []*Subnet) *SubnetGroup { - s.Subnets = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *SubnetGroup) SetVpcId(v string) *SubnetGroup { - s.VpcId = &v - return s -} - -// A description of a tag. Every tag is a key-value pair. You can add up to -// 50 tags to a single DAX cluster. -// -// AWS-assigned tag names and values are automatically assigned the aws: prefix, -// which the user cannot assign. AWS-assigned tag names do not count towards -// the tag limit of 50. User-assigned tag names have the prefix user:. -// -// You cannot backdate the application of a tag. -type Tag struct { - _ struct{} `type:"structure"` - - // The key for the tag. Tag keys are case sensitive. Every DAX cluster can only - // have one tag with the same key. If you try to add an existing tag (same key), - // the existing tag value will be updated to the new value. - Key *string `type:"string"` - - // The value of the tag. Tag values are case-sensitive and can be null. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The name of the DAX resource to which tags should be added. - // - // ResourceName is a required field - ResourceName *string `type:"string" required:"true"` - - // The tags to be assigned to the DAX resource. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *TagResourceInput) SetResourceName(v string) *TagResourceInput { - s.ResourceName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` - - // The list of tags that are associated with the DAX resource. - Tags []*Tag `type:"list"` -} - -// 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() -} - -// SetTags sets the Tags field's value. -func (s *TagResourceOutput) SetTags(v []*Tag) *TagResourceOutput { - s.Tags = v - return s -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The name of the DAX resource from which the tags should be removed. - // - // ResourceName is a required field - ResourceName *string `type:"string" required:"true"` - - // A list of tag keys. If the DAX cluster has any tags with these keys, then - // the tags are removed from the cluster. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s UntagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *UntagResourceInput) SetResourceName(v string) *UntagResourceInput { - s.ResourceName = &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"` - - // The tag keys that have been removed from the cluster. - Tags []*Tag `type:"list"` -} - -// 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() -} - -// SetTags sets the Tags field's value. -func (s *UntagResourceOutput) SetTags(v []*Tag) *UntagResourceOutput { - s.Tags = v - return s -} - -type UpdateClusterInput struct { - _ struct{} `type:"structure"` - - // The name of the DAX cluster to be modified. - // - // ClusterName is a required field - ClusterName *string `type:"string" required:"true"` - - // A description of the changes being made to the cluster. - Description *string `type:"string"` - - // The Amazon Resource Name (ARN) that identifies the topic. - NotificationTopicArn *string `type:"string"` - - // The current state of the topic. - NotificationTopicStatus *string `type:"string"` - - // The name of a parameter group for this cluster. - ParameterGroupName *string `type:"string"` - - // A range of time when maintenance of DAX cluster software will be performed. - // For example: sun:01:00-sun:09:00. Cluster maintenance normally takes less - // than 30 minutes, and is performed automatically within the maintenance window. - PreferredMaintenanceWindow *string `type:"string"` - - // A list of user-specified security group IDs to be assigned to each node in - // the DAX cluster. If this parameter is not specified, DAX assigns the default - // VPC security group to each node. - SecurityGroupIds []*string `type:"list"` -} - -// String returns the string representation -func (s UpdateClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateClusterInput"} - if s.ClusterName == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterName sets the ClusterName field's value. -func (s *UpdateClusterInput) SetClusterName(v string) *UpdateClusterInput { - s.ClusterName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateClusterInput) SetDescription(v string) *UpdateClusterInput { - s.Description = &v - return s -} - -// SetNotificationTopicArn sets the NotificationTopicArn field's value. -func (s *UpdateClusterInput) SetNotificationTopicArn(v string) *UpdateClusterInput { - s.NotificationTopicArn = &v - return s -} - -// SetNotificationTopicStatus sets the NotificationTopicStatus field's value. -func (s *UpdateClusterInput) SetNotificationTopicStatus(v string) *UpdateClusterInput { - s.NotificationTopicStatus = &v - return s -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *UpdateClusterInput) SetParameterGroupName(v string) *UpdateClusterInput { - s.ParameterGroupName = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *UpdateClusterInput) SetPreferredMaintenanceWindow(v string) *UpdateClusterInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *UpdateClusterInput) SetSecurityGroupIds(v []*string) *UpdateClusterInput { - s.SecurityGroupIds = v - return s -} - -type UpdateClusterOutput struct { - _ struct{} `type:"structure"` - - // A description of the DAX cluster, after it has been modified. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s UpdateClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *UpdateClusterOutput) SetCluster(v *Cluster) *UpdateClusterOutput { - s.Cluster = v - return s -} - -type UpdateParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the parameter group. - // - // ParameterGroupName is a required field - ParameterGroupName *string `type:"string" required:"true"` - - // An array of name-value pairs for the parameters in the group. Each element - // in the array represents a single parameter. - // - // ParameterNameValues is a required field - ParameterNameValues []*ParameterNameValue `type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateParameterGroupInput"} - if s.ParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) - } - if s.ParameterNameValues == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterNameValues")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *UpdateParameterGroupInput) SetParameterGroupName(v string) *UpdateParameterGroupInput { - s.ParameterGroupName = &v - return s -} - -// SetParameterNameValues sets the ParameterNameValues field's value. -func (s *UpdateParameterGroupInput) SetParameterNameValues(v []*ParameterNameValue) *UpdateParameterGroupInput { - s.ParameterNameValues = v - return s -} - -type UpdateParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // The parameter group that has been modified. - ParameterGroup *ParameterGroup `type:"structure"` -} - -// String returns the string representation -func (s UpdateParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateParameterGroupOutput) GoString() string { - return s.String() -} - -// SetParameterGroup sets the ParameterGroup field's value. -func (s *UpdateParameterGroupOutput) SetParameterGroup(v *ParameterGroup) *UpdateParameterGroupOutput { - s.ParameterGroup = v - return s -} - -type UpdateSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // A description of the subnet group. - Description *string `type:"string"` - - // The name of the subnet group. - // - // SubnetGroupName is a required field - SubnetGroupName *string `type:"string" required:"true"` - - // A list of subnet IDs in the subnet group. - SubnetIds []*string `type:"list"` -} - -// String returns the string representation -func (s UpdateSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSubnetGroupInput"} - if s.SubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateSubnetGroupInput) SetDescription(v string) *UpdateSubnetGroupInput { - s.Description = &v - return s -} - -// SetSubnetGroupName sets the SubnetGroupName field's value. -func (s *UpdateSubnetGroupInput) SetSubnetGroupName(v string) *UpdateSubnetGroupInput { - s.SubnetGroupName = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *UpdateSubnetGroupInput) SetSubnetIds(v []*string) *UpdateSubnetGroupInput { - s.SubnetIds = v - return s -} - -type UpdateSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // The subnet group that has been modified. - SubnetGroup *SubnetGroup `type:"structure"` -} - -// String returns the string representation -func (s UpdateSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetSubnetGroup sets the SubnetGroup field's value. -func (s *UpdateSubnetGroupOutput) SetSubnetGroup(v *SubnetGroup) *UpdateSubnetGroupOutput { - s.SubnetGroup = v - return s -} - -const ( - // ChangeTypeImmediate is a ChangeType enum value - ChangeTypeImmediate = "IMMEDIATE" - - // ChangeTypeRequiresReboot is a ChangeType enum value - ChangeTypeRequiresReboot = "REQUIRES_REBOOT" -) - -const ( - // IsModifiableTrue is a IsModifiable enum value - IsModifiableTrue = "TRUE" - - // IsModifiableFalse is a IsModifiable enum value - IsModifiableFalse = "FALSE" - - // IsModifiableConditional is a IsModifiable enum value - IsModifiableConditional = "CONDITIONAL" -) - -const ( - // ParameterTypeDefault is a ParameterType enum value - ParameterTypeDefault = "DEFAULT" - - // ParameterTypeNodeTypeSpecific is a ParameterType enum value - ParameterTypeNodeTypeSpecific = "NODE_TYPE_SPECIFIC" -) - -const ( - // SSEStatusEnabling is a SSEStatus enum value - SSEStatusEnabling = "ENABLING" - - // SSEStatusEnabled is a SSEStatus enum value - SSEStatusEnabled = "ENABLED" - - // SSEStatusDisabling is a SSEStatus enum value - SSEStatusDisabling = "DISABLING" - - // SSEStatusDisabled is a SSEStatus enum value - SSEStatusDisabled = "DISABLED" -) - -const ( - // SourceTypeCluster is a SourceType enum value - SourceTypeCluster = "CLUSTER" - - // SourceTypeParameterGroup is a SourceType enum value - SourceTypeParameterGroup = "PARAMETER_GROUP" - - // SourceTypeSubnetGroup is a SourceType enum value - SourceTypeSubnetGroup = "SUBNET_GROUP" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/doc.go b/vendor/github.com/aws/aws-sdk-go/service/dax/doc.go deleted file mode 100644 index a3b25ccbd..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/dax/doc.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package dax provides the client and types for making API -// requests to Amazon DynamoDB Accelerator (DAX). -// -// DAX is a managed caching service engineered for Amazon DynamoDB. DAX dramatically -// speeds up database reads by caching frequently-accessed data from DynamoDB, -// so applications can access that data with sub-millisecond latency. You can -// create a DAX cluster easily, using the AWS Management Console. With a few -// simple modifications to your code, your application can begin taking advantage -// of the DAX cluster and realize significant improvements in read performance. -// -// See https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19 for more information on this service. -// -// See dax package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/dax/ -// -// Using the Client -// -// To contact Amazon DynamoDB Accelerator (DAX) with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon DynamoDB Accelerator (DAX) client DAX for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/dax/#New -package dax diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/errors.go b/vendor/github.com/aws/aws-sdk-go/service/dax/errors.go deleted file mode 100644 index f5ef87e87..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/dax/errors.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package dax - -const ( - - // ErrCodeClusterAlreadyExistsFault for service response error code - // "ClusterAlreadyExistsFault". - // - // You already have a DAX cluster with the given identifier. - ErrCodeClusterAlreadyExistsFault = "ClusterAlreadyExistsFault" - - // ErrCodeClusterNotFoundFault for service response error code - // "ClusterNotFoundFault". - // - // The requested cluster ID does not refer to an existing DAX cluster. - ErrCodeClusterNotFoundFault = "ClusterNotFoundFault" - - // ErrCodeClusterQuotaForCustomerExceededFault for service response error code - // "ClusterQuotaForCustomerExceededFault". - // - // You have attempted to exceed the maximum number of DAX clusters for your - // AWS account. - ErrCodeClusterQuotaForCustomerExceededFault = "ClusterQuotaForCustomerExceededFault" - - // ErrCodeInsufficientClusterCapacityFault for service response error code - // "InsufficientClusterCapacityFault". - // - // There are not enough system resources to create the cluster you requested - // (or to resize an already-existing cluster). - ErrCodeInsufficientClusterCapacityFault = "InsufficientClusterCapacityFault" - - // ErrCodeInvalidARNFault for service response error code - // "InvalidARNFault". - // - // The Amazon Resource Name (ARN) supplied in the request is not valid. - ErrCodeInvalidARNFault = "InvalidARNFault" - - // ErrCodeInvalidClusterStateFault for service response error code - // "InvalidClusterStateFault". - // - // The requested DAX cluster is not in the available state. - ErrCodeInvalidClusterStateFault = "InvalidClusterStateFault" - - // ErrCodeInvalidParameterCombinationException for service response error code - // "InvalidParameterCombinationException". - // - // Two or more incompatible parameters were specified. - ErrCodeInvalidParameterCombinationException = "InvalidParameterCombinationException" - - // ErrCodeInvalidParameterGroupStateFault for service response error code - // "InvalidParameterGroupStateFault". - // - // One or more parameters in a parameter group are in an invalid state. - ErrCodeInvalidParameterGroupStateFault = "InvalidParameterGroupStateFault" - - // ErrCodeInvalidParameterValueException for service response error code - // "InvalidParameterValueException". - // - // The value for a parameter is invalid. - ErrCodeInvalidParameterValueException = "InvalidParameterValueException" - - // ErrCodeInvalidSubnet for service response error code - // "InvalidSubnet". - // - // An invalid subnet identifier was specified. - ErrCodeInvalidSubnet = "InvalidSubnet" - - // ErrCodeInvalidVPCNetworkStateFault for service response error code - // "InvalidVPCNetworkStateFault". - // - // The VPC network is in an invalid state. - ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault" - - // ErrCodeNodeNotFoundFault for service response error code - // "NodeNotFoundFault". - // - // None of the nodes in the cluster have the given node ID. - ErrCodeNodeNotFoundFault = "NodeNotFoundFault" - - // ErrCodeNodeQuotaForClusterExceededFault for service response error code - // "NodeQuotaForClusterExceededFault". - // - // You have attempted to exceed the maximum number of nodes for a DAX cluster. - ErrCodeNodeQuotaForClusterExceededFault = "NodeQuotaForClusterExceededFault" - - // ErrCodeNodeQuotaForCustomerExceededFault for service response error code - // "NodeQuotaForCustomerExceededFault". - // - // You have attempted to exceed the maximum number of nodes for your AWS account. - ErrCodeNodeQuotaForCustomerExceededFault = "NodeQuotaForCustomerExceededFault" - - // ErrCodeParameterGroupAlreadyExistsFault for service response error code - // "ParameterGroupAlreadyExistsFault". - // - // The specified parameter group already exists. - ErrCodeParameterGroupAlreadyExistsFault = "ParameterGroupAlreadyExistsFault" - - // ErrCodeParameterGroupNotFoundFault for service response error code - // "ParameterGroupNotFoundFault". - // - // The specified parameter group does not exist. - ErrCodeParameterGroupNotFoundFault = "ParameterGroupNotFoundFault" - - // ErrCodeParameterGroupQuotaExceededFault for service response error code - // "ParameterGroupQuotaExceededFault". - // - // You have attempted to exceed the maximum number of parameter groups. - ErrCodeParameterGroupQuotaExceededFault = "ParameterGroupQuotaExceededFault" - - // ErrCodeServiceLinkedRoleNotFoundFault for service response error code - // "ServiceLinkedRoleNotFoundFault". - ErrCodeServiceLinkedRoleNotFoundFault = "ServiceLinkedRoleNotFoundFault" - - // ErrCodeSubnetGroupAlreadyExistsFault for service response error code - // "SubnetGroupAlreadyExistsFault". - // - // The specified subnet group already exists. - ErrCodeSubnetGroupAlreadyExistsFault = "SubnetGroupAlreadyExistsFault" - - // ErrCodeSubnetGroupInUseFault for service response error code - // "SubnetGroupInUseFault". - // - // The specified subnet group is currently in use. - ErrCodeSubnetGroupInUseFault = "SubnetGroupInUseFault" - - // ErrCodeSubnetGroupNotFoundFault for service response error code - // "SubnetGroupNotFoundFault". - // - // The requested subnet group name does not refer to an existing subnet group. - ErrCodeSubnetGroupNotFoundFault = "SubnetGroupNotFoundFault" - - // ErrCodeSubnetGroupQuotaExceededFault for service response error code - // "SubnetGroupQuotaExceededFault". - // - // The request cannot be processed because it would exceed the allowed number - // of subnets in a subnet group. - ErrCodeSubnetGroupQuotaExceededFault = "SubnetGroupQuotaExceededFault" - - // ErrCodeSubnetInUse for service response error code - // "SubnetInUse". - // - // The requested subnet is being used by another subnet group. - ErrCodeSubnetInUse = "SubnetInUse" - - // ErrCodeSubnetQuotaExceededFault for service response error code - // "SubnetQuotaExceededFault". - // - // The request cannot be processed because it would exceed the allowed number - // of subnets in a subnet group. - ErrCodeSubnetQuotaExceededFault = "SubnetQuotaExceededFault" - - // ErrCodeTagNotFoundFault for service response error code - // "TagNotFoundFault". - // - // The tag does not exist. - ErrCodeTagNotFoundFault = "TagNotFoundFault" - - // ErrCodeTagQuotaPerResourceExceeded for service response error code - // "TagQuotaPerResourceExceeded". - // - // You have exceeded the maximum number of tags for this DAX cluster. - ErrCodeTagQuotaPerResourceExceeded = "TagQuotaPerResourceExceeded" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/service.go b/vendor/github.com/aws/aws-sdk-go/service/dax/service.go deleted file mode 100644 index 545ea0312..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/dax/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package dax - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// DAX provides the API operation methods for making requests to -// Amazon DynamoDB Accelerator (DAX). See this package's package overview docs -// for details on the service. -// -// DAX methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type DAX 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 = "dax" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "DAX" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the DAX client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a DAX client from just a session. -// svc := dax.New(mySession) -// -// // Create a DAX client with additional configuration -// svc := dax.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *DAX { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DAX { - svc := &DAX{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-04-19", - JSONVersion: "1.1", - TargetPrefix: "AmazonDAXV3", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a DAX operation and runs any -// custom request initialization. -func (c *DAX) 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/devicefarm/api.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go deleted file mode 100644 index 318320461..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go +++ /dev/null @@ -1,17066 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package devicefarm - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateDevicePool = "CreateDevicePool" - -// CreateDevicePoolRequest generates a "aws/request.Request" representing the -// client's request for the CreateDevicePool operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDevicePool for more information on using the CreateDevicePool -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDevicePoolRequest method. -// req, resp := client.CreateDevicePoolRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateDevicePool -func (c *DeviceFarm) CreateDevicePoolRequest(input *CreateDevicePoolInput) (req *request.Request, output *CreateDevicePoolOutput) { - op := &request.Operation{ - Name: opCreateDevicePool, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDevicePoolInput{} - } - - output = &CreateDevicePoolOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDevicePool API operation for AWS Device Farm. -// -// Creates a device pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation CreateDevicePool for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateDevicePool -func (c *DeviceFarm) CreateDevicePool(input *CreateDevicePoolInput) (*CreateDevicePoolOutput, error) { - req, out := c.CreateDevicePoolRequest(input) - return out, req.Send() -} - -// CreateDevicePoolWithContext is the same as CreateDevicePool with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDevicePool for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) CreateDevicePoolWithContext(ctx aws.Context, input *CreateDevicePoolInput, opts ...request.Option) (*CreateDevicePoolOutput, error) { - req, out := c.CreateDevicePoolRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateInstanceProfile = "CreateInstanceProfile" - -// CreateInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the CreateInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateInstanceProfile for more information on using the CreateInstanceProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateInstanceProfileRequest method. -// req, resp := client.CreateInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateInstanceProfile -func (c *DeviceFarm) CreateInstanceProfileRequest(input *CreateInstanceProfileInput) (req *request.Request, output *CreateInstanceProfileOutput) { - op := &request.Operation{ - Name: opCreateInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateInstanceProfileInput{} - } - - output = &CreateInstanceProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateInstanceProfile API operation for AWS Device Farm. -// -// Creates a profile that can be applied to one or more private fleet device -// instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation CreateInstanceProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateInstanceProfile -func (c *DeviceFarm) CreateInstanceProfile(input *CreateInstanceProfileInput) (*CreateInstanceProfileOutput, error) { - req, out := c.CreateInstanceProfileRequest(input) - return out, req.Send() -} - -// CreateInstanceProfileWithContext is the same as CreateInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInstanceProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) CreateInstanceProfileWithContext(ctx aws.Context, input *CreateInstanceProfileInput, opts ...request.Option) (*CreateInstanceProfileOutput, error) { - req, out := c.CreateInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateNetworkProfile = "CreateNetworkProfile" - -// CreateNetworkProfileRequest generates a "aws/request.Request" representing the -// client's request for the CreateNetworkProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateNetworkProfile for more information on using the CreateNetworkProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateNetworkProfileRequest method. -// req, resp := client.CreateNetworkProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateNetworkProfile -func (c *DeviceFarm) CreateNetworkProfileRequest(input *CreateNetworkProfileInput) (req *request.Request, output *CreateNetworkProfileOutput) { - op := &request.Operation{ - Name: opCreateNetworkProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateNetworkProfileInput{} - } - - output = &CreateNetworkProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateNetworkProfile API operation for AWS Device Farm. -// -// Creates a network profile. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation CreateNetworkProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateNetworkProfile -func (c *DeviceFarm) CreateNetworkProfile(input *CreateNetworkProfileInput) (*CreateNetworkProfileOutput, error) { - req, out := c.CreateNetworkProfileRequest(input) - return out, req.Send() -} - -// CreateNetworkProfileWithContext is the same as CreateNetworkProfile with the addition of -// the ability to pass a context and additional request options. -// -// See CreateNetworkProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) CreateNetworkProfileWithContext(ctx aws.Context, input *CreateNetworkProfileInput, opts ...request.Option) (*CreateNetworkProfileOutput, error) { - req, out := c.CreateNetworkProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateProject = "CreateProject" - -// CreateProjectRequest generates a "aws/request.Request" representing the -// client's request for the CreateProject operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateProject for more information on using the CreateProject -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateProjectRequest method. -// req, resp := client.CreateProjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateProject -func (c *DeviceFarm) CreateProjectRequest(input *CreateProjectInput) (req *request.Request, output *CreateProjectOutput) { - op := &request.Operation{ - Name: opCreateProject, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateProjectInput{} - } - - output = &CreateProjectOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateProject API operation for AWS Device Farm. -// -// Creates a new project. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation CreateProject for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateProject -func (c *DeviceFarm) CreateProject(input *CreateProjectInput) (*CreateProjectOutput, error) { - req, out := c.CreateProjectRequest(input) - return out, req.Send() -} - -// CreateProjectWithContext is the same as CreateProject with the addition of -// the ability to pass a context and additional request options. -// -// See CreateProject for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) CreateProjectWithContext(ctx aws.Context, input *CreateProjectInput, opts ...request.Option) (*CreateProjectOutput, error) { - req, out := c.CreateProjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRemoteAccessSession = "CreateRemoteAccessSession" - -// CreateRemoteAccessSessionRequest generates a "aws/request.Request" representing the -// client's request for the CreateRemoteAccessSession operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRemoteAccessSession for more information on using the CreateRemoteAccessSession -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRemoteAccessSessionRequest method. -// req, resp := client.CreateRemoteAccessSessionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateRemoteAccessSession -func (c *DeviceFarm) CreateRemoteAccessSessionRequest(input *CreateRemoteAccessSessionInput) (req *request.Request, output *CreateRemoteAccessSessionOutput) { - op := &request.Operation{ - Name: opCreateRemoteAccessSession, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRemoteAccessSessionInput{} - } - - output = &CreateRemoteAccessSessionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRemoteAccessSession API operation for AWS Device Farm. -// -// Specifies and starts a remote access session. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation CreateRemoteAccessSession for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateRemoteAccessSession -func (c *DeviceFarm) CreateRemoteAccessSession(input *CreateRemoteAccessSessionInput) (*CreateRemoteAccessSessionOutput, error) { - req, out := c.CreateRemoteAccessSessionRequest(input) - return out, req.Send() -} - -// CreateRemoteAccessSessionWithContext is the same as CreateRemoteAccessSession with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRemoteAccessSession for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) CreateRemoteAccessSessionWithContext(ctx aws.Context, input *CreateRemoteAccessSessionInput, opts ...request.Option) (*CreateRemoteAccessSessionOutput, error) { - req, out := c.CreateRemoteAccessSessionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateUpload = "CreateUpload" - -// CreateUploadRequest generates a "aws/request.Request" representing the -// client's request for the CreateUpload operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateUpload for more information on using the CreateUpload -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateUploadRequest method. -// req, resp := client.CreateUploadRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateUpload -func (c *DeviceFarm) CreateUploadRequest(input *CreateUploadInput) (req *request.Request, output *CreateUploadOutput) { - op := &request.Operation{ - Name: opCreateUpload, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateUploadInput{} - } - - output = &CreateUploadOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateUpload API operation for AWS Device Farm. -// -// Uploads an app or test scripts. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation CreateUpload for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateUpload -func (c *DeviceFarm) CreateUpload(input *CreateUploadInput) (*CreateUploadOutput, error) { - req, out := c.CreateUploadRequest(input) - return out, req.Send() -} - -// CreateUploadWithContext is the same as CreateUpload with the addition of -// the ability to pass a context and additional request options. -// -// See CreateUpload for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) CreateUploadWithContext(ctx aws.Context, input *CreateUploadInput, opts ...request.Option) (*CreateUploadOutput, error) { - req, out := c.CreateUploadRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVPCEConfiguration = "CreateVPCEConfiguration" - -// CreateVPCEConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the CreateVPCEConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVPCEConfiguration for more information on using the CreateVPCEConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVPCEConfigurationRequest method. -// req, resp := client.CreateVPCEConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateVPCEConfiguration -func (c *DeviceFarm) CreateVPCEConfigurationRequest(input *CreateVPCEConfigurationInput) (req *request.Request, output *CreateVPCEConfigurationOutput) { - op := &request.Operation{ - Name: opCreateVPCEConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateVPCEConfigurationInput{} - } - - output = &CreateVPCEConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVPCEConfiguration API operation for AWS Device Farm. -// -// Creates a configuration record in Device Farm for your Amazon Virtual Private -// Cloud (VPC) endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation CreateVPCEConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateVPCEConfiguration -func (c *DeviceFarm) CreateVPCEConfiguration(input *CreateVPCEConfigurationInput) (*CreateVPCEConfigurationOutput, error) { - req, out := c.CreateVPCEConfigurationRequest(input) - return out, req.Send() -} - -// CreateVPCEConfigurationWithContext is the same as CreateVPCEConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVPCEConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) CreateVPCEConfigurationWithContext(ctx aws.Context, input *CreateVPCEConfigurationInput, opts ...request.Option) (*CreateVPCEConfigurationOutput, error) { - req, out := c.CreateVPCEConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDevicePool = "DeleteDevicePool" - -// DeleteDevicePoolRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDevicePool operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDevicePool for more information on using the DeleteDevicePool -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDevicePoolRequest method. -// req, resp := client.DeleteDevicePoolRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteDevicePool -func (c *DeviceFarm) DeleteDevicePoolRequest(input *DeleteDevicePoolInput) (req *request.Request, output *DeleteDevicePoolOutput) { - op := &request.Operation{ - Name: opDeleteDevicePool, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDevicePoolInput{} - } - - output = &DeleteDevicePoolOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDevicePool API operation for AWS Device Farm. -// -// Deletes a device pool given the pool ARN. Does not allow deletion of curated -// pools owned by the system. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation DeleteDevicePool for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteDevicePool -func (c *DeviceFarm) DeleteDevicePool(input *DeleteDevicePoolInput) (*DeleteDevicePoolOutput, error) { - req, out := c.DeleteDevicePoolRequest(input) - return out, req.Send() -} - -// DeleteDevicePoolWithContext is the same as DeleteDevicePool with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDevicePool for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) DeleteDevicePoolWithContext(ctx aws.Context, input *DeleteDevicePoolInput, opts ...request.Option) (*DeleteDevicePoolOutput, error) { - req, out := c.DeleteDevicePoolRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteInstanceProfile = "DeleteInstanceProfile" - -// DeleteInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteInstanceProfile for more information on using the DeleteInstanceProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteInstanceProfileRequest method. -// req, resp := client.DeleteInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteInstanceProfile -func (c *DeviceFarm) DeleteInstanceProfileRequest(input *DeleteInstanceProfileInput) (req *request.Request, output *DeleteInstanceProfileOutput) { - op := &request.Operation{ - Name: opDeleteInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteInstanceProfileInput{} - } - - output = &DeleteInstanceProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteInstanceProfile API operation for AWS Device Farm. -// -// Deletes a profile that can be applied to one or more private device instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation DeleteInstanceProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteInstanceProfile -func (c *DeviceFarm) DeleteInstanceProfile(input *DeleteInstanceProfileInput) (*DeleteInstanceProfileOutput, error) { - req, out := c.DeleteInstanceProfileRequest(input) - return out, req.Send() -} - -// DeleteInstanceProfileWithContext is the same as DeleteInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteInstanceProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) DeleteInstanceProfileWithContext(ctx aws.Context, input *DeleteInstanceProfileInput, opts ...request.Option) (*DeleteInstanceProfileOutput, error) { - req, out := c.DeleteInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteNetworkProfile = "DeleteNetworkProfile" - -// DeleteNetworkProfileRequest generates a "aws/request.Request" representing the -// client's request for the DeleteNetworkProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteNetworkProfile for more information on using the DeleteNetworkProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteNetworkProfileRequest method. -// req, resp := client.DeleteNetworkProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteNetworkProfile -func (c *DeviceFarm) DeleteNetworkProfileRequest(input *DeleteNetworkProfileInput) (req *request.Request, output *DeleteNetworkProfileOutput) { - op := &request.Operation{ - Name: opDeleteNetworkProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteNetworkProfileInput{} - } - - output = &DeleteNetworkProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteNetworkProfile API operation for AWS Device Farm. -// -// Deletes a network profile. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation DeleteNetworkProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteNetworkProfile -func (c *DeviceFarm) DeleteNetworkProfile(input *DeleteNetworkProfileInput) (*DeleteNetworkProfileOutput, error) { - req, out := c.DeleteNetworkProfileRequest(input) - return out, req.Send() -} - -// DeleteNetworkProfileWithContext is the same as DeleteNetworkProfile with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteNetworkProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) DeleteNetworkProfileWithContext(ctx aws.Context, input *DeleteNetworkProfileInput, opts ...request.Option) (*DeleteNetworkProfileOutput, error) { - req, out := c.DeleteNetworkProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteProject = "DeleteProject" - -// DeleteProjectRequest generates a "aws/request.Request" representing the -// client's request for the DeleteProject operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteProject for more information on using the DeleteProject -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteProjectRequest method. -// req, resp := client.DeleteProjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteProject -func (c *DeviceFarm) DeleteProjectRequest(input *DeleteProjectInput) (req *request.Request, output *DeleteProjectOutput) { - op := &request.Operation{ - Name: opDeleteProject, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteProjectInput{} - } - - output = &DeleteProjectOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteProject API operation for AWS Device Farm. -// -// Deletes an AWS Device Farm project, given the project ARN. -// -// Note Deleting this resource does not stop an in-progress run. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation DeleteProject for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteProject -func (c *DeviceFarm) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) { - req, out := c.DeleteProjectRequest(input) - return out, req.Send() -} - -// DeleteProjectWithContext is the same as DeleteProject with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteProject for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) DeleteProjectWithContext(ctx aws.Context, input *DeleteProjectInput, opts ...request.Option) (*DeleteProjectOutput, error) { - req, out := c.DeleteProjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRemoteAccessSession = "DeleteRemoteAccessSession" - -// DeleteRemoteAccessSessionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRemoteAccessSession operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRemoteAccessSession for more information on using the DeleteRemoteAccessSession -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRemoteAccessSessionRequest method. -// req, resp := client.DeleteRemoteAccessSessionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRemoteAccessSession -func (c *DeviceFarm) DeleteRemoteAccessSessionRequest(input *DeleteRemoteAccessSessionInput) (req *request.Request, output *DeleteRemoteAccessSessionOutput) { - op := &request.Operation{ - Name: opDeleteRemoteAccessSession, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRemoteAccessSessionInput{} - } - - output = &DeleteRemoteAccessSessionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRemoteAccessSession API operation for AWS Device Farm. -// -// Deletes a completed remote access session and its results. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation DeleteRemoteAccessSession for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRemoteAccessSession -func (c *DeviceFarm) DeleteRemoteAccessSession(input *DeleteRemoteAccessSessionInput) (*DeleteRemoteAccessSessionOutput, error) { - req, out := c.DeleteRemoteAccessSessionRequest(input) - return out, req.Send() -} - -// DeleteRemoteAccessSessionWithContext is the same as DeleteRemoteAccessSession with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRemoteAccessSession for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) DeleteRemoteAccessSessionWithContext(ctx aws.Context, input *DeleteRemoteAccessSessionInput, opts ...request.Option) (*DeleteRemoteAccessSessionOutput, error) { - req, out := c.DeleteRemoteAccessSessionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRun = "DeleteRun" - -// DeleteRunRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRun operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRun for more information on using the DeleteRun -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRunRequest method. -// req, resp := client.DeleteRunRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRun -func (c *DeviceFarm) DeleteRunRequest(input *DeleteRunInput) (req *request.Request, output *DeleteRunOutput) { - op := &request.Operation{ - Name: opDeleteRun, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRunInput{} - } - - output = &DeleteRunOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRun API operation for AWS Device Farm. -// -// Deletes the run, given the run ARN. -// -// Note Deleting this resource does not stop an in-progress run. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation DeleteRun for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteRun -func (c *DeviceFarm) DeleteRun(input *DeleteRunInput) (*DeleteRunOutput, error) { - req, out := c.DeleteRunRequest(input) - return out, req.Send() -} - -// DeleteRunWithContext is the same as DeleteRun with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRun for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) DeleteRunWithContext(ctx aws.Context, input *DeleteRunInput, opts ...request.Option) (*DeleteRunOutput, error) { - req, out := c.DeleteRunRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUpload = "DeleteUpload" - -// DeleteUploadRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUpload operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUpload for more information on using the DeleteUpload -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteUploadRequest method. -// req, resp := client.DeleteUploadRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteUpload -func (c *DeviceFarm) DeleteUploadRequest(input *DeleteUploadInput) (req *request.Request, output *DeleteUploadOutput) { - op := &request.Operation{ - Name: opDeleteUpload, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUploadInput{} - } - - output = &DeleteUploadOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUpload API operation for AWS Device Farm. -// -// Deletes an upload given the upload 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 Device Farm's -// API operation DeleteUpload for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteUpload -func (c *DeviceFarm) DeleteUpload(input *DeleteUploadInput) (*DeleteUploadOutput, error) { - req, out := c.DeleteUploadRequest(input) - return out, req.Send() -} - -// DeleteUploadWithContext is the same as DeleteUpload with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUpload for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) DeleteUploadWithContext(ctx aws.Context, input *DeleteUploadInput, opts ...request.Option) (*DeleteUploadOutput, error) { - req, out := c.DeleteUploadRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVPCEConfiguration = "DeleteVPCEConfiguration" - -// DeleteVPCEConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVPCEConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVPCEConfiguration for more information on using the DeleteVPCEConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVPCEConfigurationRequest method. -// req, resp := client.DeleteVPCEConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteVPCEConfiguration -func (c *DeviceFarm) DeleteVPCEConfigurationRequest(input *DeleteVPCEConfigurationInput) (req *request.Request, output *DeleteVPCEConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteVPCEConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVPCEConfigurationInput{} - } - - output = &DeleteVPCEConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVPCEConfiguration API operation for AWS Device Farm. -// -// Deletes a configuration for your Amazon Virtual Private Cloud (VPC) endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation DeleteVPCEConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// There was an error with the update request, or you do not have sufficient -// permissions to update this VPC endpoint configuration. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteVPCEConfiguration -func (c *DeviceFarm) DeleteVPCEConfiguration(input *DeleteVPCEConfigurationInput) (*DeleteVPCEConfigurationOutput, error) { - req, out := c.DeleteVPCEConfigurationRequest(input) - return out, req.Send() -} - -// DeleteVPCEConfigurationWithContext is the same as DeleteVPCEConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVPCEConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) DeleteVPCEConfigurationWithContext(ctx aws.Context, input *DeleteVPCEConfigurationInput, opts ...request.Option) (*DeleteVPCEConfigurationOutput, error) { - req, out := c.DeleteVPCEConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAccountSettings = "GetAccountSettings" - -// GetAccountSettingsRequest generates a "aws/request.Request" representing the -// client's request for the GetAccountSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAccountSettings for more information on using the GetAccountSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAccountSettingsRequest method. -// req, resp := client.GetAccountSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetAccountSettings -func (c *DeviceFarm) GetAccountSettingsRequest(input *GetAccountSettingsInput) (req *request.Request, output *GetAccountSettingsOutput) { - op := &request.Operation{ - Name: opGetAccountSettings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAccountSettingsInput{} - } - - output = &GetAccountSettingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAccountSettings API operation for AWS Device Farm. -// -// Returns the number of unmetered iOS and/or unmetered Android devices that -// have been purchased by the account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetAccountSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetAccountSettings -func (c *DeviceFarm) GetAccountSettings(input *GetAccountSettingsInput) (*GetAccountSettingsOutput, error) { - req, out := c.GetAccountSettingsRequest(input) - return out, req.Send() -} - -// GetAccountSettingsWithContext is the same as GetAccountSettings with the addition of -// the ability to pass a context and additional request options. -// -// See GetAccountSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetAccountSettingsWithContext(ctx aws.Context, input *GetAccountSettingsInput, opts ...request.Option) (*GetAccountSettingsOutput, error) { - req, out := c.GetAccountSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDevice = "GetDevice" - -// GetDeviceRequest generates a "aws/request.Request" representing the -// client's request for the GetDevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDevice for more information on using the GetDevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDeviceRequest method. -// req, resp := client.GetDeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevice -func (c *DeviceFarm) GetDeviceRequest(input *GetDeviceInput) (req *request.Request, output *GetDeviceOutput) { - op := &request.Operation{ - Name: opGetDevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDeviceInput{} - } - - output = &GetDeviceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDevice API operation for AWS Device Farm. -// -// Gets information about a unique device type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetDevice for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevice -func (c *DeviceFarm) GetDevice(input *GetDeviceInput) (*GetDeviceOutput, error) { - req, out := c.GetDeviceRequest(input) - return out, req.Send() -} - -// GetDeviceWithContext is the same as GetDevice with the addition of -// the ability to pass a context and additional request options. -// -// See GetDevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetDeviceWithContext(ctx aws.Context, input *GetDeviceInput, opts ...request.Option) (*GetDeviceOutput, error) { - req, out := c.GetDeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDeviceInstance = "GetDeviceInstance" - -// GetDeviceInstanceRequest generates a "aws/request.Request" representing the -// client's request for the GetDeviceInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDeviceInstance for more information on using the GetDeviceInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDeviceInstanceRequest method. -// req, resp := client.GetDeviceInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDeviceInstance -func (c *DeviceFarm) GetDeviceInstanceRequest(input *GetDeviceInstanceInput) (req *request.Request, output *GetDeviceInstanceOutput) { - op := &request.Operation{ - Name: opGetDeviceInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDeviceInstanceInput{} - } - - output = &GetDeviceInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDeviceInstance API operation for AWS Device Farm. -// -// Returns information about a device instance belonging to a private device -// fleet. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetDeviceInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDeviceInstance -func (c *DeviceFarm) GetDeviceInstance(input *GetDeviceInstanceInput) (*GetDeviceInstanceOutput, error) { - req, out := c.GetDeviceInstanceRequest(input) - return out, req.Send() -} - -// GetDeviceInstanceWithContext is the same as GetDeviceInstance with the addition of -// the ability to pass a context and additional request options. -// -// See GetDeviceInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetDeviceInstanceWithContext(ctx aws.Context, input *GetDeviceInstanceInput, opts ...request.Option) (*GetDeviceInstanceOutput, error) { - req, out := c.GetDeviceInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDevicePool = "GetDevicePool" - -// GetDevicePoolRequest generates a "aws/request.Request" representing the -// client's request for the GetDevicePool operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDevicePool for more information on using the GetDevicePool -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDevicePoolRequest method. -// req, resp := client.GetDevicePoolRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePool -func (c *DeviceFarm) GetDevicePoolRequest(input *GetDevicePoolInput) (req *request.Request, output *GetDevicePoolOutput) { - op := &request.Operation{ - Name: opGetDevicePool, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDevicePoolInput{} - } - - output = &GetDevicePoolOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDevicePool API operation for AWS Device Farm. -// -// Gets information about a device pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetDevicePool for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePool -func (c *DeviceFarm) GetDevicePool(input *GetDevicePoolInput) (*GetDevicePoolOutput, error) { - req, out := c.GetDevicePoolRequest(input) - return out, req.Send() -} - -// GetDevicePoolWithContext is the same as GetDevicePool with the addition of -// the ability to pass a context and additional request options. -// -// See GetDevicePool for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetDevicePoolWithContext(ctx aws.Context, input *GetDevicePoolInput, opts ...request.Option) (*GetDevicePoolOutput, error) { - req, out := c.GetDevicePoolRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDevicePoolCompatibility = "GetDevicePoolCompatibility" - -// GetDevicePoolCompatibilityRequest generates a "aws/request.Request" representing the -// client's request for the GetDevicePoolCompatibility operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDevicePoolCompatibility for more information on using the GetDevicePoolCompatibility -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDevicePoolCompatibilityRequest method. -// req, resp := client.GetDevicePoolCompatibilityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePoolCompatibility -func (c *DeviceFarm) GetDevicePoolCompatibilityRequest(input *GetDevicePoolCompatibilityInput) (req *request.Request, output *GetDevicePoolCompatibilityOutput) { - op := &request.Operation{ - Name: opGetDevicePoolCompatibility, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDevicePoolCompatibilityInput{} - } - - output = &GetDevicePoolCompatibilityOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDevicePoolCompatibility API operation for AWS Device Farm. -// -// Gets information about compatibility with a device pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetDevicePoolCompatibility for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDevicePoolCompatibility -func (c *DeviceFarm) GetDevicePoolCompatibility(input *GetDevicePoolCompatibilityInput) (*GetDevicePoolCompatibilityOutput, error) { - req, out := c.GetDevicePoolCompatibilityRequest(input) - return out, req.Send() -} - -// GetDevicePoolCompatibilityWithContext is the same as GetDevicePoolCompatibility with the addition of -// the ability to pass a context and additional request options. -// -// See GetDevicePoolCompatibility for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetDevicePoolCompatibilityWithContext(ctx aws.Context, input *GetDevicePoolCompatibilityInput, opts ...request.Option) (*GetDevicePoolCompatibilityOutput, error) { - req, out := c.GetDevicePoolCompatibilityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInstanceProfile = "GetInstanceProfile" - -// GetInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the GetInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInstanceProfile for more information on using the GetInstanceProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInstanceProfileRequest method. -// req, resp := client.GetInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetInstanceProfile -func (c *DeviceFarm) GetInstanceProfileRequest(input *GetInstanceProfileInput) (req *request.Request, output *GetInstanceProfileOutput) { - op := &request.Operation{ - Name: opGetInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInstanceProfileInput{} - } - - output = &GetInstanceProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInstanceProfile API operation for AWS Device Farm. -// -// Returns information about the specified instance profile. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetInstanceProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetInstanceProfile -func (c *DeviceFarm) GetInstanceProfile(input *GetInstanceProfileInput) (*GetInstanceProfileOutput, error) { - req, out := c.GetInstanceProfileRequest(input) - return out, req.Send() -} - -// GetInstanceProfileWithContext is the same as GetInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See GetInstanceProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetInstanceProfileWithContext(ctx aws.Context, input *GetInstanceProfileInput, opts ...request.Option) (*GetInstanceProfileOutput, error) { - req, out := c.GetInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetJob = "GetJob" - -// GetJobRequest generates a "aws/request.Request" representing the -// client's request for the GetJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetJob for more information on using the GetJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetJobRequest method. -// req, resp := client.GetJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetJob -func (c *DeviceFarm) GetJobRequest(input *GetJobInput) (req *request.Request, output *GetJobOutput) { - op := &request.Operation{ - Name: opGetJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetJobInput{} - } - - output = &GetJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetJob API operation for AWS Device Farm. -// -// Gets information about a 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 Device Farm's -// API operation GetJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetJob -func (c *DeviceFarm) GetJob(input *GetJobInput) (*GetJobOutput, error) { - req, out := c.GetJobRequest(input) - return out, req.Send() -} - -// GetJobWithContext is the same as GetJob with the addition of -// the ability to pass a context and additional request options. -// -// See GetJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetJobWithContext(ctx aws.Context, input *GetJobInput, opts ...request.Option) (*GetJobOutput, error) { - req, out := c.GetJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetNetworkProfile = "GetNetworkProfile" - -// GetNetworkProfileRequest generates a "aws/request.Request" representing the -// client's request for the GetNetworkProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetNetworkProfile for more information on using the GetNetworkProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetNetworkProfileRequest method. -// req, resp := client.GetNetworkProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetNetworkProfile -func (c *DeviceFarm) GetNetworkProfileRequest(input *GetNetworkProfileInput) (req *request.Request, output *GetNetworkProfileOutput) { - op := &request.Operation{ - Name: opGetNetworkProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetNetworkProfileInput{} - } - - output = &GetNetworkProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetNetworkProfile API operation for AWS Device Farm. -// -// Returns information about a network profile. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetNetworkProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetNetworkProfile -func (c *DeviceFarm) GetNetworkProfile(input *GetNetworkProfileInput) (*GetNetworkProfileOutput, error) { - req, out := c.GetNetworkProfileRequest(input) - return out, req.Send() -} - -// GetNetworkProfileWithContext is the same as GetNetworkProfile with the addition of -// the ability to pass a context and additional request options. -// -// See GetNetworkProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetNetworkProfileWithContext(ctx aws.Context, input *GetNetworkProfileInput, opts ...request.Option) (*GetNetworkProfileOutput, error) { - req, out := c.GetNetworkProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOfferingStatus = "GetOfferingStatus" - -// GetOfferingStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetOfferingStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetOfferingStatus for more information on using the GetOfferingStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetOfferingStatusRequest method. -// req, resp := client.GetOfferingStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetOfferingStatus -func (c *DeviceFarm) GetOfferingStatusRequest(input *GetOfferingStatusInput) (req *request.Request, output *GetOfferingStatusOutput) { - op := &request.Operation{ - Name: opGetOfferingStatus, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetOfferingStatusInput{} - } - - output = &GetOfferingStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOfferingStatus API operation for AWS Device Farm. -// -// Gets the current status and future status of all offerings purchased by an -// AWS account. The response indicates how many offerings are currently available -// and the offerings that will be available in the next period. The API returns -// a NotEligible error if the user is not permitted to invoke the operation. -// Please contact aws-devicefarm-support@amazon.com (mailto:aws-devicefarm-support@amazon.com) -// if you believe that you should be able to invoke this operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetOfferingStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeNotEligibleException "NotEligibleException" -// Exception gets thrown when a user is not eligible to perform the specified -// transaction. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetOfferingStatus -func (c *DeviceFarm) GetOfferingStatus(input *GetOfferingStatusInput) (*GetOfferingStatusOutput, error) { - req, out := c.GetOfferingStatusRequest(input) - return out, req.Send() -} - -// GetOfferingStatusWithContext is the same as GetOfferingStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetOfferingStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetOfferingStatusWithContext(ctx aws.Context, input *GetOfferingStatusInput, opts ...request.Option) (*GetOfferingStatusOutput, error) { - req, out := c.GetOfferingStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetOfferingStatusPages iterates over the pages of a GetOfferingStatus operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetOfferingStatus 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 GetOfferingStatus operation. -// pageNum := 0 -// err := client.GetOfferingStatusPages(params, -// func(page *GetOfferingStatusOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DeviceFarm) GetOfferingStatusPages(input *GetOfferingStatusInput, fn func(*GetOfferingStatusOutput, bool) bool) error { - return c.GetOfferingStatusPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetOfferingStatusPagesWithContext same as GetOfferingStatusPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetOfferingStatusPagesWithContext(ctx aws.Context, input *GetOfferingStatusInput, fn func(*GetOfferingStatusOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetOfferingStatusInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetOfferingStatusRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetOfferingStatusOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetProject = "GetProject" - -// GetProjectRequest generates a "aws/request.Request" representing the -// client's request for the GetProject operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetProject for more information on using the GetProject -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetProjectRequest method. -// req, resp := client.GetProjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetProject -func (c *DeviceFarm) GetProjectRequest(input *GetProjectInput) (req *request.Request, output *GetProjectOutput) { - op := &request.Operation{ - Name: opGetProject, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetProjectInput{} - } - - output = &GetProjectOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetProject API operation for AWS Device Farm. -// -// Gets information about a project. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetProject for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetProject -func (c *DeviceFarm) GetProject(input *GetProjectInput) (*GetProjectOutput, error) { - req, out := c.GetProjectRequest(input) - return out, req.Send() -} - -// GetProjectWithContext is the same as GetProject with the addition of -// the ability to pass a context and additional request options. -// -// See GetProject for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetProjectWithContext(ctx aws.Context, input *GetProjectInput, opts ...request.Option) (*GetProjectOutput, error) { - req, out := c.GetProjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRemoteAccessSession = "GetRemoteAccessSession" - -// GetRemoteAccessSessionRequest generates a "aws/request.Request" representing the -// client's request for the GetRemoteAccessSession operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRemoteAccessSession for more information on using the GetRemoteAccessSession -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRemoteAccessSessionRequest method. -// req, resp := client.GetRemoteAccessSessionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRemoteAccessSession -func (c *DeviceFarm) GetRemoteAccessSessionRequest(input *GetRemoteAccessSessionInput) (req *request.Request, output *GetRemoteAccessSessionOutput) { - op := &request.Operation{ - Name: opGetRemoteAccessSession, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRemoteAccessSessionInput{} - } - - output = &GetRemoteAccessSessionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRemoteAccessSession API operation for AWS Device Farm. -// -// Returns a link to a currently running remote access session. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetRemoteAccessSession for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRemoteAccessSession -func (c *DeviceFarm) GetRemoteAccessSession(input *GetRemoteAccessSessionInput) (*GetRemoteAccessSessionOutput, error) { - req, out := c.GetRemoteAccessSessionRequest(input) - return out, req.Send() -} - -// GetRemoteAccessSessionWithContext is the same as GetRemoteAccessSession with the addition of -// the ability to pass a context and additional request options. -// -// See GetRemoteAccessSession for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetRemoteAccessSessionWithContext(ctx aws.Context, input *GetRemoteAccessSessionInput, opts ...request.Option) (*GetRemoteAccessSessionOutput, error) { - req, out := c.GetRemoteAccessSessionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRun = "GetRun" - -// GetRunRequest generates a "aws/request.Request" representing the -// client's request for the GetRun operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRun for more information on using the GetRun -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRunRequest method. -// req, resp := client.GetRunRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRun -func (c *DeviceFarm) GetRunRequest(input *GetRunInput) (req *request.Request, output *GetRunOutput) { - op := &request.Operation{ - Name: opGetRun, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRunInput{} - } - - output = &GetRunOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRun API operation for AWS Device Farm. -// -// Gets information about a run. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetRun for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetRun -func (c *DeviceFarm) GetRun(input *GetRunInput) (*GetRunOutput, error) { - req, out := c.GetRunRequest(input) - return out, req.Send() -} - -// GetRunWithContext is the same as GetRun with the addition of -// the ability to pass a context and additional request options. -// -// See GetRun for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetRunWithContext(ctx aws.Context, input *GetRunInput, opts ...request.Option) (*GetRunOutput, error) { - req, out := c.GetRunRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSuite = "GetSuite" - -// GetSuiteRequest generates a "aws/request.Request" representing the -// client's request for the GetSuite operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSuite for more information on using the GetSuite -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSuiteRequest method. -// req, resp := client.GetSuiteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetSuite -func (c *DeviceFarm) GetSuiteRequest(input *GetSuiteInput) (req *request.Request, output *GetSuiteOutput) { - op := &request.Operation{ - Name: opGetSuite, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSuiteInput{} - } - - output = &GetSuiteOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSuite API operation for AWS Device Farm. -// -// Gets information about a suite. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetSuite for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetSuite -func (c *DeviceFarm) GetSuite(input *GetSuiteInput) (*GetSuiteOutput, error) { - req, out := c.GetSuiteRequest(input) - return out, req.Send() -} - -// GetSuiteWithContext is the same as GetSuite with the addition of -// the ability to pass a context and additional request options. -// -// See GetSuite for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetSuiteWithContext(ctx aws.Context, input *GetSuiteInput, opts ...request.Option) (*GetSuiteOutput, error) { - req, out := c.GetSuiteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTest = "GetTest" - -// GetTestRequest generates a "aws/request.Request" representing the -// client's request for the GetTest operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTest for more information on using the GetTest -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTestRequest method. -// req, resp := client.GetTestRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetTest -func (c *DeviceFarm) GetTestRequest(input *GetTestInput) (req *request.Request, output *GetTestOutput) { - op := &request.Operation{ - Name: opGetTest, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTestInput{} - } - - output = &GetTestOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTest API operation for AWS Device Farm. -// -// Gets information about a test. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetTest for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetTest -func (c *DeviceFarm) GetTest(input *GetTestInput) (*GetTestOutput, error) { - req, out := c.GetTestRequest(input) - return out, req.Send() -} - -// GetTestWithContext is the same as GetTest with the addition of -// the ability to pass a context and additional request options. -// -// See GetTest for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetTestWithContext(ctx aws.Context, input *GetTestInput, opts ...request.Option) (*GetTestOutput, error) { - req, out := c.GetTestRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUpload = "GetUpload" - -// GetUploadRequest generates a "aws/request.Request" representing the -// client's request for the GetUpload operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUpload for more information on using the GetUpload -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUploadRequest method. -// req, resp := client.GetUploadRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetUpload -func (c *DeviceFarm) GetUploadRequest(input *GetUploadInput) (req *request.Request, output *GetUploadOutput) { - op := &request.Operation{ - Name: opGetUpload, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetUploadInput{} - } - - output = &GetUploadOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUpload API operation for AWS Device Farm. -// -// Gets information about an upload. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetUpload for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetUpload -func (c *DeviceFarm) GetUpload(input *GetUploadInput) (*GetUploadOutput, error) { - req, out := c.GetUploadRequest(input) - return out, req.Send() -} - -// GetUploadWithContext is the same as GetUpload with the addition of -// the ability to pass a context and additional request options. -// -// See GetUpload for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetUploadWithContext(ctx aws.Context, input *GetUploadInput, opts ...request.Option) (*GetUploadOutput, error) { - req, out := c.GetUploadRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetVPCEConfiguration = "GetVPCEConfiguration" - -// GetVPCEConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetVPCEConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetVPCEConfiguration for more information on using the GetVPCEConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetVPCEConfigurationRequest method. -// req, resp := client.GetVPCEConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetVPCEConfiguration -func (c *DeviceFarm) GetVPCEConfigurationRequest(input *GetVPCEConfigurationInput) (req *request.Request, output *GetVPCEConfigurationOutput) { - op := &request.Operation{ - Name: opGetVPCEConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetVPCEConfigurationInput{} - } - - output = &GetVPCEConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetVPCEConfiguration API operation for AWS Device Farm. -// -// Returns information about the configuration settings for your Amazon Virtual -// Private Cloud (VPC) endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation GetVPCEConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetVPCEConfiguration -func (c *DeviceFarm) GetVPCEConfiguration(input *GetVPCEConfigurationInput) (*GetVPCEConfigurationOutput, error) { - req, out := c.GetVPCEConfigurationRequest(input) - return out, req.Send() -} - -// GetVPCEConfigurationWithContext is the same as GetVPCEConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetVPCEConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) GetVPCEConfigurationWithContext(ctx aws.Context, input *GetVPCEConfigurationInput, opts ...request.Option) (*GetVPCEConfigurationOutput, error) { - req, out := c.GetVPCEConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInstallToRemoteAccessSession = "InstallToRemoteAccessSession" - -// InstallToRemoteAccessSessionRequest generates a "aws/request.Request" representing the -// client's request for the InstallToRemoteAccessSession operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See InstallToRemoteAccessSession for more information on using the InstallToRemoteAccessSession -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the InstallToRemoteAccessSessionRequest method. -// req, resp := client.InstallToRemoteAccessSessionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/InstallToRemoteAccessSession -func (c *DeviceFarm) InstallToRemoteAccessSessionRequest(input *InstallToRemoteAccessSessionInput) (req *request.Request, output *InstallToRemoteAccessSessionOutput) { - op := &request.Operation{ - Name: opInstallToRemoteAccessSession, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InstallToRemoteAccessSessionInput{} - } - - output = &InstallToRemoteAccessSessionOutput{} - req = c.newRequest(op, input, output) - return -} - -// InstallToRemoteAccessSession API operation for AWS Device Farm. -// -// Installs an application to the device in a remote access session. For Android -// applications, the file must be in .apk format. For iOS applications, the -// file must be in .ipa format. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation InstallToRemoteAccessSession for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/InstallToRemoteAccessSession -func (c *DeviceFarm) InstallToRemoteAccessSession(input *InstallToRemoteAccessSessionInput) (*InstallToRemoteAccessSessionOutput, error) { - req, out := c.InstallToRemoteAccessSessionRequest(input) - return out, req.Send() -} - -// InstallToRemoteAccessSessionWithContext is the same as InstallToRemoteAccessSession with the addition of -// the ability to pass a context and additional request options. -// -// See InstallToRemoteAccessSession for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) InstallToRemoteAccessSessionWithContext(ctx aws.Context, input *InstallToRemoteAccessSessionInput, opts ...request.Option) (*InstallToRemoteAccessSessionOutput, error) { - req, out := c.InstallToRemoteAccessSessionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListArtifacts = "ListArtifacts" - -// ListArtifactsRequest generates a "aws/request.Request" representing the -// client's request for the ListArtifacts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListArtifacts for more information on using the ListArtifacts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListArtifactsRequest method. -// req, resp := client.ListArtifactsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListArtifacts -func (c *DeviceFarm) ListArtifactsRequest(input *ListArtifactsInput) (req *request.Request, output *ListArtifactsOutput) { - op := &request.Operation{ - Name: opListArtifacts, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListArtifactsInput{} - } - - output = &ListArtifactsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListArtifacts API operation for AWS Device Farm. -// -// Gets information about artifacts. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListArtifacts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListArtifacts -func (c *DeviceFarm) ListArtifacts(input *ListArtifactsInput) (*ListArtifactsOutput, error) { - req, out := c.ListArtifactsRequest(input) - return out, req.Send() -} - -// ListArtifactsWithContext is the same as ListArtifacts with the addition of -// the ability to pass a context and additional request options. -// -// See ListArtifacts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListArtifactsWithContext(ctx aws.Context, input *ListArtifactsInput, opts ...request.Option) (*ListArtifactsOutput, error) { - req, out := c.ListArtifactsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListArtifactsPages iterates over the pages of a ListArtifacts operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListArtifacts 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 ListArtifacts operation. -// pageNum := 0 -// err := client.ListArtifactsPages(params, -// func(page *ListArtifactsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DeviceFarm) ListArtifactsPages(input *ListArtifactsInput, fn func(*ListArtifactsOutput, bool) bool) error { - return c.ListArtifactsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListArtifactsPagesWithContext same as ListArtifactsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListArtifactsPagesWithContext(ctx aws.Context, input *ListArtifactsInput, fn func(*ListArtifactsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListArtifactsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListArtifactsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListArtifactsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListDeviceInstances = "ListDeviceInstances" - -// ListDeviceInstancesRequest generates a "aws/request.Request" representing the -// client's request for the ListDeviceInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDeviceInstances for more information on using the ListDeviceInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDeviceInstancesRequest method. -// req, resp := client.ListDeviceInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDeviceInstances -func (c *DeviceFarm) ListDeviceInstancesRequest(input *ListDeviceInstancesInput) (req *request.Request, output *ListDeviceInstancesOutput) { - op := &request.Operation{ - Name: opListDeviceInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListDeviceInstancesInput{} - } - - output = &ListDeviceInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDeviceInstances API operation for AWS Device Farm. -// -// Returns information about the private device instances associated with one -// or more AWS accounts. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListDeviceInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDeviceInstances -func (c *DeviceFarm) ListDeviceInstances(input *ListDeviceInstancesInput) (*ListDeviceInstancesOutput, error) { - req, out := c.ListDeviceInstancesRequest(input) - return out, req.Send() -} - -// ListDeviceInstancesWithContext is the same as ListDeviceInstances with the addition of -// the ability to pass a context and additional request options. -// -// See ListDeviceInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListDeviceInstancesWithContext(ctx aws.Context, input *ListDeviceInstancesInput, opts ...request.Option) (*ListDeviceInstancesOutput, error) { - req, out := c.ListDeviceInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDevicePools = "ListDevicePools" - -// ListDevicePoolsRequest generates a "aws/request.Request" representing the -// client's request for the ListDevicePools operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDevicePools for more information on using the ListDevicePools -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDevicePoolsRequest method. -// req, resp := client.ListDevicePoolsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevicePools -func (c *DeviceFarm) ListDevicePoolsRequest(input *ListDevicePoolsInput) (req *request.Request, output *ListDevicePoolsOutput) { - op := &request.Operation{ - Name: opListDevicePools, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListDevicePoolsInput{} - } - - output = &ListDevicePoolsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDevicePools API operation for AWS Device Farm. -// -// Gets information about device pools. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListDevicePools for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevicePools -func (c *DeviceFarm) ListDevicePools(input *ListDevicePoolsInput) (*ListDevicePoolsOutput, error) { - req, out := c.ListDevicePoolsRequest(input) - return out, req.Send() -} - -// ListDevicePoolsWithContext is the same as ListDevicePools with the addition of -// the ability to pass a context and additional request options. -// -// See ListDevicePools for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListDevicePoolsWithContext(ctx aws.Context, input *ListDevicePoolsInput, opts ...request.Option) (*ListDevicePoolsOutput, error) { - req, out := c.ListDevicePoolsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListDevicePoolsPages iterates over the pages of a ListDevicePools operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDevicePools 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 ListDevicePools operation. -// pageNum := 0 -// err := client.ListDevicePoolsPages(params, -// func(page *ListDevicePoolsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DeviceFarm) ListDevicePoolsPages(input *ListDevicePoolsInput, fn func(*ListDevicePoolsOutput, bool) bool) error { - return c.ListDevicePoolsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDevicePoolsPagesWithContext same as ListDevicePoolsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListDevicePoolsPagesWithContext(ctx aws.Context, input *ListDevicePoolsInput, fn func(*ListDevicePoolsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDevicePoolsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDevicePoolsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDevicePoolsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListDevices = "ListDevices" - -// ListDevicesRequest generates a "aws/request.Request" representing the -// client's request for the ListDevices operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDevices for more information on using the ListDevices -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDevicesRequest method. -// req, resp := client.ListDevicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevices -func (c *DeviceFarm) ListDevicesRequest(input *ListDevicesInput) (req *request.Request, output *ListDevicesOutput) { - op := &request.Operation{ - Name: opListDevices, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListDevicesInput{} - } - - output = &ListDevicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDevices API operation for AWS Device Farm. -// -// Gets information about unique device types. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListDevices for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDevices -func (c *DeviceFarm) ListDevices(input *ListDevicesInput) (*ListDevicesOutput, error) { - req, out := c.ListDevicesRequest(input) - return out, req.Send() -} - -// ListDevicesWithContext is the same as ListDevices with the addition of -// the ability to pass a context and additional request options. -// -// See ListDevices for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListDevicesWithContext(ctx aws.Context, input *ListDevicesInput, opts ...request.Option) (*ListDevicesOutput, error) { - req, out := c.ListDevicesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListDevicesPages iterates over the pages of a ListDevices operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDevices 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 ListDevices operation. -// pageNum := 0 -// err := client.ListDevicesPages(params, -// func(page *ListDevicesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DeviceFarm) ListDevicesPages(input *ListDevicesInput, fn func(*ListDevicesOutput, bool) bool) error { - return c.ListDevicesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDevicesPagesWithContext same as ListDevicesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListDevicesPagesWithContext(ctx aws.Context, input *ListDevicesInput, fn func(*ListDevicesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDevicesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDevicesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDevicesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListInstanceProfiles = "ListInstanceProfiles" - -// ListInstanceProfilesRequest generates a "aws/request.Request" representing the -// client's request for the ListInstanceProfiles operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListInstanceProfiles for more information on using the ListInstanceProfiles -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListInstanceProfilesRequest method. -// req, resp := client.ListInstanceProfilesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListInstanceProfiles -func (c *DeviceFarm) ListInstanceProfilesRequest(input *ListInstanceProfilesInput) (req *request.Request, output *ListInstanceProfilesOutput) { - op := &request.Operation{ - Name: opListInstanceProfiles, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListInstanceProfilesInput{} - } - - output = &ListInstanceProfilesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInstanceProfiles API operation for AWS Device Farm. -// -// Returns information about all the instance profiles in an AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListInstanceProfiles for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListInstanceProfiles -func (c *DeviceFarm) ListInstanceProfiles(input *ListInstanceProfilesInput) (*ListInstanceProfilesOutput, error) { - req, out := c.ListInstanceProfilesRequest(input) - return out, req.Send() -} - -// ListInstanceProfilesWithContext is the same as ListInstanceProfiles with the addition of -// the ability to pass a context and additional request options. -// -// See ListInstanceProfiles for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListInstanceProfilesWithContext(ctx aws.Context, input *ListInstanceProfilesInput, opts ...request.Option) (*ListInstanceProfilesOutput, error) { - req, out := c.ListInstanceProfilesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListJobs = "ListJobs" - -// ListJobsRequest generates a "aws/request.Request" representing the -// client's request for the ListJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListJobs for more information on using the ListJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListJobsRequest method. -// req, resp := client.ListJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListJobs -func (c *DeviceFarm) ListJobsRequest(input *ListJobsInput) (req *request.Request, output *ListJobsOutput) { - op := &request.Operation{ - Name: opListJobs, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListJobsInput{} - } - - output = &ListJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListJobs API operation for AWS Device Farm. -// -// Gets information about jobs for a given test run. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListJobs -func (c *DeviceFarm) ListJobs(input *ListJobsInput) (*ListJobsOutput, error) { - req, out := c.ListJobsRequest(input) - return out, req.Send() -} - -// ListJobsWithContext is the same as ListJobs with the addition of -// the ability to pass a context and additional request options. -// -// See ListJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListJobsWithContext(ctx aws.Context, input *ListJobsInput, opts ...request.Option) (*ListJobsOutput, error) { - req, out := c.ListJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListJobsPages iterates over the pages of a ListJobs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListJobs method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListJobs operation. -// pageNum := 0 -// err := client.ListJobsPages(params, -// func(page *ListJobsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DeviceFarm) ListJobsPages(input *ListJobsInput, fn func(*ListJobsOutput, bool) bool) error { - return c.ListJobsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListJobsPagesWithContext same as ListJobsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListJobsPagesWithContext(ctx aws.Context, input *ListJobsInput, fn func(*ListJobsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListJobsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListJobsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListNetworkProfiles = "ListNetworkProfiles" - -// ListNetworkProfilesRequest generates a "aws/request.Request" representing the -// client's request for the ListNetworkProfiles operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListNetworkProfiles for more information on using the ListNetworkProfiles -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListNetworkProfilesRequest method. -// req, resp := client.ListNetworkProfilesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListNetworkProfiles -func (c *DeviceFarm) ListNetworkProfilesRequest(input *ListNetworkProfilesInput) (req *request.Request, output *ListNetworkProfilesOutput) { - op := &request.Operation{ - Name: opListNetworkProfiles, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListNetworkProfilesInput{} - } - - output = &ListNetworkProfilesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListNetworkProfiles API operation for AWS Device Farm. -// -// Returns the list of available network profiles. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListNetworkProfiles for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListNetworkProfiles -func (c *DeviceFarm) ListNetworkProfiles(input *ListNetworkProfilesInput) (*ListNetworkProfilesOutput, error) { - req, out := c.ListNetworkProfilesRequest(input) - return out, req.Send() -} - -// ListNetworkProfilesWithContext is the same as ListNetworkProfiles with the addition of -// the ability to pass a context and additional request options. -// -// See ListNetworkProfiles for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListNetworkProfilesWithContext(ctx aws.Context, input *ListNetworkProfilesInput, opts ...request.Option) (*ListNetworkProfilesOutput, error) { - req, out := c.ListNetworkProfilesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListOfferingPromotions = "ListOfferingPromotions" - -// ListOfferingPromotionsRequest generates a "aws/request.Request" representing the -// client's request for the ListOfferingPromotions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListOfferingPromotions for more information on using the ListOfferingPromotions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListOfferingPromotionsRequest method. -// req, resp := client.ListOfferingPromotionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingPromotions -func (c *DeviceFarm) ListOfferingPromotionsRequest(input *ListOfferingPromotionsInput) (req *request.Request, output *ListOfferingPromotionsOutput) { - op := &request.Operation{ - Name: opListOfferingPromotions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListOfferingPromotionsInput{} - } - - output = &ListOfferingPromotionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOfferingPromotions API operation for AWS Device Farm. -// -// Returns a list of offering promotions. Each offering promotion record contains -// the ID and description of the promotion. The API returns a NotEligible error -// if the caller is not permitted to invoke the operation. Contact aws-devicefarm-support@amazon.com -// (mailto:aws-devicefarm-support@amazon.com) if you believe that you should -// be able to invoke this operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListOfferingPromotions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeNotEligibleException "NotEligibleException" -// Exception gets thrown when a user is not eligible to perform the specified -// transaction. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingPromotions -func (c *DeviceFarm) ListOfferingPromotions(input *ListOfferingPromotionsInput) (*ListOfferingPromotionsOutput, error) { - req, out := c.ListOfferingPromotionsRequest(input) - return out, req.Send() -} - -// ListOfferingPromotionsWithContext is the same as ListOfferingPromotions with the addition of -// the ability to pass a context and additional request options. -// -// See ListOfferingPromotions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListOfferingPromotionsWithContext(ctx aws.Context, input *ListOfferingPromotionsInput, opts ...request.Option) (*ListOfferingPromotionsOutput, error) { - req, out := c.ListOfferingPromotionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListOfferingTransactions = "ListOfferingTransactions" - -// ListOfferingTransactionsRequest generates a "aws/request.Request" representing the -// client's request for the ListOfferingTransactions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListOfferingTransactions for more information on using the ListOfferingTransactions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListOfferingTransactionsRequest method. -// req, resp := client.ListOfferingTransactionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingTransactions -func (c *DeviceFarm) ListOfferingTransactionsRequest(input *ListOfferingTransactionsInput) (req *request.Request, output *ListOfferingTransactionsOutput) { - op := &request.Operation{ - Name: opListOfferingTransactions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListOfferingTransactionsInput{} - } - - output = &ListOfferingTransactionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOfferingTransactions API operation for AWS Device Farm. -// -// Returns a list of all historical purchases, renewals, and system renewal -// transactions for an AWS account. The list is paginated and ordered by a descending -// timestamp (most recent transactions are first). The API returns a NotEligible -// error if the user is not permitted to invoke the operation. Please contact -// aws-devicefarm-support@amazon.com (mailto:aws-devicefarm-support@amazon.com) -// if you believe that you should be able to invoke this operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListOfferingTransactions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeNotEligibleException "NotEligibleException" -// Exception gets thrown when a user is not eligible to perform the specified -// transaction. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferingTransactions -func (c *DeviceFarm) ListOfferingTransactions(input *ListOfferingTransactionsInput) (*ListOfferingTransactionsOutput, error) { - req, out := c.ListOfferingTransactionsRequest(input) - return out, req.Send() -} - -// ListOfferingTransactionsWithContext is the same as ListOfferingTransactions with the addition of -// the ability to pass a context and additional request options. -// -// See ListOfferingTransactions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListOfferingTransactionsWithContext(ctx aws.Context, input *ListOfferingTransactionsInput, opts ...request.Option) (*ListOfferingTransactionsOutput, error) { - req, out := c.ListOfferingTransactionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListOfferingTransactionsPages iterates over the pages of a ListOfferingTransactions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListOfferingTransactions 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 ListOfferingTransactions operation. -// pageNum := 0 -// err := client.ListOfferingTransactionsPages(params, -// func(page *ListOfferingTransactionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DeviceFarm) ListOfferingTransactionsPages(input *ListOfferingTransactionsInput, fn func(*ListOfferingTransactionsOutput, bool) bool) error { - return c.ListOfferingTransactionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListOfferingTransactionsPagesWithContext same as ListOfferingTransactionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListOfferingTransactionsPagesWithContext(ctx aws.Context, input *ListOfferingTransactionsInput, fn func(*ListOfferingTransactionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListOfferingTransactionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListOfferingTransactionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListOfferingTransactionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListOfferings = "ListOfferings" - -// ListOfferingsRequest generates a "aws/request.Request" representing the -// client's request for the ListOfferings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListOfferings for more information on using the ListOfferings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListOfferingsRequest method. -// req, resp := client.ListOfferingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferings -func (c *DeviceFarm) ListOfferingsRequest(input *ListOfferingsInput) (req *request.Request, output *ListOfferingsOutput) { - op := &request.Operation{ - Name: opListOfferings, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListOfferingsInput{} - } - - output = &ListOfferingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOfferings API operation for AWS Device Farm. -// -// Returns a list of products or offerings that the user can manage through -// the API. Each offering record indicates the recurring price per unit and -// the frequency for that offering. The API returns a NotEligible error if the -// user is not permitted to invoke the operation. Please contact aws-devicefarm-support@amazon.com -// (mailto:aws-devicefarm-support@amazon.com) if you believe that you should -// be able to invoke this operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListOfferings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeNotEligibleException "NotEligibleException" -// Exception gets thrown when a user is not eligible to perform the specified -// transaction. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListOfferings -func (c *DeviceFarm) ListOfferings(input *ListOfferingsInput) (*ListOfferingsOutput, error) { - req, out := c.ListOfferingsRequest(input) - return out, req.Send() -} - -// ListOfferingsWithContext is the same as ListOfferings with the addition of -// the ability to pass a context and additional request options. -// -// See ListOfferings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListOfferingsWithContext(ctx aws.Context, input *ListOfferingsInput, opts ...request.Option) (*ListOfferingsOutput, error) { - req, out := c.ListOfferingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListOfferingsPages iterates over the pages of a ListOfferings operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListOfferings 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 ListOfferings operation. -// pageNum := 0 -// err := client.ListOfferingsPages(params, -// func(page *ListOfferingsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DeviceFarm) ListOfferingsPages(input *ListOfferingsInput, fn func(*ListOfferingsOutput, bool) bool) error { - return c.ListOfferingsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListOfferingsPagesWithContext same as ListOfferingsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListOfferingsPagesWithContext(ctx aws.Context, input *ListOfferingsInput, fn func(*ListOfferingsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListOfferingsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListOfferingsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListOfferingsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListProjects = "ListProjects" - -// ListProjectsRequest generates a "aws/request.Request" representing the -// client's request for the ListProjects operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListProjects for more information on using the ListProjects -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListProjectsRequest method. -// req, resp := client.ListProjectsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListProjects -func (c *DeviceFarm) ListProjectsRequest(input *ListProjectsInput) (req *request.Request, output *ListProjectsOutput) { - op := &request.Operation{ - Name: opListProjects, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListProjectsInput{} - } - - output = &ListProjectsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListProjects API operation for AWS Device Farm. -// -// Gets information about projects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListProjects for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListProjects -func (c *DeviceFarm) ListProjects(input *ListProjectsInput) (*ListProjectsOutput, error) { - req, out := c.ListProjectsRequest(input) - return out, req.Send() -} - -// ListProjectsWithContext is the same as ListProjects with the addition of -// the ability to pass a context and additional request options. -// -// See ListProjects for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListProjectsWithContext(ctx aws.Context, input *ListProjectsInput, opts ...request.Option) (*ListProjectsOutput, error) { - req, out := c.ListProjectsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListProjectsPages iterates over the pages of a ListProjects operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListProjects method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListProjects operation. -// pageNum := 0 -// err := client.ListProjectsPages(params, -// func(page *ListProjectsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DeviceFarm) ListProjectsPages(input *ListProjectsInput, fn func(*ListProjectsOutput, bool) bool) error { - return c.ListProjectsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListProjectsPagesWithContext same as ListProjectsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListProjectsPagesWithContext(ctx aws.Context, input *ListProjectsInput, fn func(*ListProjectsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListProjectsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListProjectsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListProjectsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListRemoteAccessSessions = "ListRemoteAccessSessions" - -// ListRemoteAccessSessionsRequest generates a "aws/request.Request" representing the -// client's request for the ListRemoteAccessSessions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRemoteAccessSessions for more information on using the ListRemoteAccessSessions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRemoteAccessSessionsRequest method. -// req, resp := client.ListRemoteAccessSessionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRemoteAccessSessions -func (c *DeviceFarm) ListRemoteAccessSessionsRequest(input *ListRemoteAccessSessionsInput) (req *request.Request, output *ListRemoteAccessSessionsOutput) { - op := &request.Operation{ - Name: opListRemoteAccessSessions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListRemoteAccessSessionsInput{} - } - - output = &ListRemoteAccessSessionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRemoteAccessSessions API operation for AWS Device Farm. -// -// Returns a list of all currently running remote access sessions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListRemoteAccessSessions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRemoteAccessSessions -func (c *DeviceFarm) ListRemoteAccessSessions(input *ListRemoteAccessSessionsInput) (*ListRemoteAccessSessionsOutput, error) { - req, out := c.ListRemoteAccessSessionsRequest(input) - return out, req.Send() -} - -// ListRemoteAccessSessionsWithContext is the same as ListRemoteAccessSessions with the addition of -// the ability to pass a context and additional request options. -// -// See ListRemoteAccessSessions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListRemoteAccessSessionsWithContext(ctx aws.Context, input *ListRemoteAccessSessionsInput, opts ...request.Option) (*ListRemoteAccessSessionsOutput, error) { - req, out := c.ListRemoteAccessSessionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRuns = "ListRuns" - -// ListRunsRequest generates a "aws/request.Request" representing the -// client's request for the ListRuns operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRuns for more information on using the ListRuns -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRunsRequest method. -// req, resp := client.ListRunsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRuns -func (c *DeviceFarm) ListRunsRequest(input *ListRunsInput) (req *request.Request, output *ListRunsOutput) { - op := &request.Operation{ - Name: opListRuns, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListRunsInput{} - } - - output = &ListRunsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRuns API operation for AWS Device Farm. -// -// Gets information about runs, given an AWS Device Farm project 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 Device Farm's -// API operation ListRuns for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListRuns -func (c *DeviceFarm) ListRuns(input *ListRunsInput) (*ListRunsOutput, error) { - req, out := c.ListRunsRequest(input) - return out, req.Send() -} - -// ListRunsWithContext is the same as ListRuns with the addition of -// the ability to pass a context and additional request options. -// -// See ListRuns for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListRunsWithContext(ctx aws.Context, input *ListRunsInput, opts ...request.Option) (*ListRunsOutput, error) { - req, out := c.ListRunsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListRunsPages iterates over the pages of a ListRuns operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListRuns 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 ListRuns operation. -// pageNum := 0 -// err := client.ListRunsPages(params, -// func(page *ListRunsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DeviceFarm) ListRunsPages(input *ListRunsInput, fn func(*ListRunsOutput, bool) bool) error { - return c.ListRunsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListRunsPagesWithContext same as ListRunsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListRunsPagesWithContext(ctx aws.Context, input *ListRunsInput, fn func(*ListRunsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListRunsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListRunsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRunsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListSamples = "ListSamples" - -// ListSamplesRequest generates a "aws/request.Request" representing the -// client's request for the ListSamples operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSamples for more information on using the ListSamples -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSamplesRequest method. -// req, resp := client.ListSamplesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSamples -func (c *DeviceFarm) ListSamplesRequest(input *ListSamplesInput) (req *request.Request, output *ListSamplesOutput) { - op := &request.Operation{ - Name: opListSamples, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListSamplesInput{} - } - - output = &ListSamplesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSamples API operation for AWS Device Farm. -// -// Gets information about samples, given an AWS Device Farm job 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 Device Farm's -// API operation ListSamples for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSamples -func (c *DeviceFarm) ListSamples(input *ListSamplesInput) (*ListSamplesOutput, error) { - req, out := c.ListSamplesRequest(input) - return out, req.Send() -} - -// ListSamplesWithContext is the same as ListSamples with the addition of -// the ability to pass a context and additional request options. -// -// See ListSamples for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListSamplesWithContext(ctx aws.Context, input *ListSamplesInput, opts ...request.Option) (*ListSamplesOutput, error) { - req, out := c.ListSamplesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListSamplesPages iterates over the pages of a ListSamples operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListSamples 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 ListSamples operation. -// pageNum := 0 -// err := client.ListSamplesPages(params, -// func(page *ListSamplesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DeviceFarm) ListSamplesPages(input *ListSamplesInput, fn func(*ListSamplesOutput, bool) bool) error { - return c.ListSamplesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListSamplesPagesWithContext same as ListSamplesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListSamplesPagesWithContext(ctx aws.Context, input *ListSamplesInput, fn func(*ListSamplesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListSamplesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListSamplesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSamplesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListSuites = "ListSuites" - -// ListSuitesRequest generates a "aws/request.Request" representing the -// client's request for the ListSuites operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSuites for more information on using the ListSuites -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSuitesRequest method. -// req, resp := client.ListSuitesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSuites -func (c *DeviceFarm) ListSuitesRequest(input *ListSuitesInput) (req *request.Request, output *ListSuitesOutput) { - op := &request.Operation{ - Name: opListSuites, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListSuitesInput{} - } - - output = &ListSuitesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSuites API operation for AWS Device Farm. -// -// Gets information about test suites for a given job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListSuites for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListSuites -func (c *DeviceFarm) ListSuites(input *ListSuitesInput) (*ListSuitesOutput, error) { - req, out := c.ListSuitesRequest(input) - return out, req.Send() -} - -// ListSuitesWithContext is the same as ListSuites with the addition of -// the ability to pass a context and additional request options. -// -// See ListSuites for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListSuitesWithContext(ctx aws.Context, input *ListSuitesInput, opts ...request.Option) (*ListSuitesOutput, error) { - req, out := c.ListSuitesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListSuitesPages iterates over the pages of a ListSuites operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListSuites 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 ListSuites operation. -// pageNum := 0 -// err := client.ListSuitesPages(params, -// func(page *ListSuitesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DeviceFarm) ListSuitesPages(input *ListSuitesInput, fn func(*ListSuitesOutput, bool) bool) error { - return c.ListSuitesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListSuitesPagesWithContext same as ListSuitesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListSuitesPagesWithContext(ctx aws.Context, input *ListSuitesInput, fn func(*ListSuitesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListSuitesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListSuitesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSuitesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTests = "ListTests" - -// ListTestsRequest generates a "aws/request.Request" representing the -// client's request for the ListTests operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTests for more information on using the ListTests -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTestsRequest method. -// req, resp := client.ListTestsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTests -func (c *DeviceFarm) ListTestsRequest(input *ListTestsInput) (req *request.Request, output *ListTestsOutput) { - op := &request.Operation{ - Name: opListTests, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTestsInput{} - } - - output = &ListTestsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTests API operation for AWS Device Farm. -// -// Gets information about tests in a given test suite. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListTests for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTests -func (c *DeviceFarm) ListTests(input *ListTestsInput) (*ListTestsOutput, error) { - req, out := c.ListTestsRequest(input) - return out, req.Send() -} - -// ListTestsWithContext is the same as ListTests with the addition of -// the ability to pass a context and additional request options. -// -// See ListTests for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListTestsWithContext(ctx aws.Context, input *ListTestsInput, opts ...request.Option) (*ListTestsOutput, error) { - req, out := c.ListTestsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTestsPages iterates over the pages of a ListTests operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTests 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 ListTests operation. -// pageNum := 0 -// err := client.ListTestsPages(params, -// func(page *ListTestsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DeviceFarm) ListTestsPages(input *ListTestsInput, fn func(*ListTestsOutput, bool) bool) error { - return c.ListTestsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTestsPagesWithContext same as ListTestsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListTestsPagesWithContext(ctx aws.Context, input *ListTestsInput, fn func(*ListTestsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTestsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTestsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTestsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListUniqueProblems = "ListUniqueProblems" - -// ListUniqueProblemsRequest generates a "aws/request.Request" representing the -// client's request for the ListUniqueProblems operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListUniqueProblems for more information on using the ListUniqueProblems -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListUniqueProblemsRequest method. -// req, resp := client.ListUniqueProblemsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUniqueProblems -func (c *DeviceFarm) ListUniqueProblemsRequest(input *ListUniqueProblemsInput) (req *request.Request, output *ListUniqueProblemsOutput) { - op := &request.Operation{ - Name: opListUniqueProblems, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListUniqueProblemsInput{} - } - - output = &ListUniqueProblemsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUniqueProblems API operation for AWS Device Farm. -// -// Gets information about unique problems. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListUniqueProblems for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUniqueProblems -func (c *DeviceFarm) ListUniqueProblems(input *ListUniqueProblemsInput) (*ListUniqueProblemsOutput, error) { - req, out := c.ListUniqueProblemsRequest(input) - return out, req.Send() -} - -// ListUniqueProblemsWithContext is the same as ListUniqueProblems with the addition of -// the ability to pass a context and additional request options. -// -// See ListUniqueProblems for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListUniqueProblemsWithContext(ctx aws.Context, input *ListUniqueProblemsInput, opts ...request.Option) (*ListUniqueProblemsOutput, error) { - req, out := c.ListUniqueProblemsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListUniqueProblemsPages iterates over the pages of a ListUniqueProblems operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListUniqueProblems 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 ListUniqueProblems operation. -// pageNum := 0 -// err := client.ListUniqueProblemsPages(params, -// func(page *ListUniqueProblemsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DeviceFarm) ListUniqueProblemsPages(input *ListUniqueProblemsInput, fn func(*ListUniqueProblemsOutput, bool) bool) error { - return c.ListUniqueProblemsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListUniqueProblemsPagesWithContext same as ListUniqueProblemsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListUniqueProblemsPagesWithContext(ctx aws.Context, input *ListUniqueProblemsInput, fn func(*ListUniqueProblemsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListUniqueProblemsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListUniqueProblemsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListUniqueProblemsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListUploads = "ListUploads" - -// ListUploadsRequest generates a "aws/request.Request" representing the -// client's request for the ListUploads operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListUploads for more information on using the ListUploads -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListUploadsRequest method. -// req, resp := client.ListUploadsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUploads -func (c *DeviceFarm) ListUploadsRequest(input *ListUploadsInput) (req *request.Request, output *ListUploadsOutput) { - op := &request.Operation{ - Name: opListUploads, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListUploadsInput{} - } - - output = &ListUploadsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUploads API operation for AWS Device Farm. -// -// Gets information about uploads, given an AWS Device Farm project 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 Device Farm's -// API operation ListUploads for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUploads -func (c *DeviceFarm) ListUploads(input *ListUploadsInput) (*ListUploadsOutput, error) { - req, out := c.ListUploadsRequest(input) - return out, req.Send() -} - -// ListUploadsWithContext is the same as ListUploads with the addition of -// the ability to pass a context and additional request options. -// -// See ListUploads for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListUploadsWithContext(ctx aws.Context, input *ListUploadsInput, opts ...request.Option) (*ListUploadsOutput, error) { - req, out := c.ListUploadsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListUploadsPages iterates over the pages of a ListUploads operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListUploads 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 ListUploads operation. -// pageNum := 0 -// err := client.ListUploadsPages(params, -// func(page *ListUploadsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DeviceFarm) ListUploadsPages(input *ListUploadsInput, fn func(*ListUploadsOutput, bool) bool) error { - return c.ListUploadsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListUploadsPagesWithContext same as ListUploadsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListUploadsPagesWithContext(ctx aws.Context, input *ListUploadsInput, fn func(*ListUploadsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListUploadsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListUploadsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListUploadsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListVPCEConfigurations = "ListVPCEConfigurations" - -// ListVPCEConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the ListVPCEConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListVPCEConfigurations for more information on using the ListVPCEConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListVPCEConfigurationsRequest method. -// req, resp := client.ListVPCEConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListVPCEConfigurations -func (c *DeviceFarm) ListVPCEConfigurationsRequest(input *ListVPCEConfigurationsInput) (req *request.Request, output *ListVPCEConfigurationsOutput) { - op := &request.Operation{ - Name: opListVPCEConfigurations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListVPCEConfigurationsInput{} - } - - output = &ListVPCEConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListVPCEConfigurations API operation for AWS Device Farm. -// -// Returns information about all Amazon Virtual Private Cloud (VPC) endpoint -// configurations in the AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ListVPCEConfigurations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListVPCEConfigurations -func (c *DeviceFarm) ListVPCEConfigurations(input *ListVPCEConfigurationsInput) (*ListVPCEConfigurationsOutput, error) { - req, out := c.ListVPCEConfigurationsRequest(input) - return out, req.Send() -} - -// ListVPCEConfigurationsWithContext is the same as ListVPCEConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See ListVPCEConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ListVPCEConfigurationsWithContext(ctx aws.Context, input *ListVPCEConfigurationsInput, opts ...request.Option) (*ListVPCEConfigurationsOutput, error) { - req, out := c.ListVPCEConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPurchaseOffering = "PurchaseOffering" - -// PurchaseOfferingRequest generates a "aws/request.Request" representing the -// client's request for the PurchaseOffering operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PurchaseOffering for more information on using the PurchaseOffering -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PurchaseOfferingRequest method. -// req, resp := client.PurchaseOfferingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/PurchaseOffering -func (c *DeviceFarm) PurchaseOfferingRequest(input *PurchaseOfferingInput) (req *request.Request, output *PurchaseOfferingOutput) { - op := &request.Operation{ - Name: opPurchaseOffering, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PurchaseOfferingInput{} - } - - output = &PurchaseOfferingOutput{} - req = c.newRequest(op, input, output) - return -} - -// PurchaseOffering API operation for AWS Device Farm. -// -// Immediately purchases offerings for an AWS account. Offerings renew with -// the latest total purchased quantity for an offering, unless the renewal was -// overridden. The API returns a NotEligible error if the user is not permitted -// to invoke the operation. Please contact aws-devicefarm-support@amazon.com -// (mailto:aws-devicefarm-support@amazon.com) if you believe that you should -// be able to invoke this operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation PurchaseOffering for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeNotEligibleException "NotEligibleException" -// Exception gets thrown when a user is not eligible to perform the specified -// transaction. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/PurchaseOffering -func (c *DeviceFarm) PurchaseOffering(input *PurchaseOfferingInput) (*PurchaseOfferingOutput, error) { - req, out := c.PurchaseOfferingRequest(input) - return out, req.Send() -} - -// PurchaseOfferingWithContext is the same as PurchaseOffering with the addition of -// the ability to pass a context and additional request options. -// -// See PurchaseOffering for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) PurchaseOfferingWithContext(ctx aws.Context, input *PurchaseOfferingInput, opts ...request.Option) (*PurchaseOfferingOutput, error) { - req, out := c.PurchaseOfferingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRenewOffering = "RenewOffering" - -// RenewOfferingRequest generates a "aws/request.Request" representing the -// client's request for the RenewOffering operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RenewOffering for more information on using the RenewOffering -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RenewOfferingRequest method. -// req, resp := client.RenewOfferingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/RenewOffering -func (c *DeviceFarm) RenewOfferingRequest(input *RenewOfferingInput) (req *request.Request, output *RenewOfferingOutput) { - op := &request.Operation{ - Name: opRenewOffering, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RenewOfferingInput{} - } - - output = &RenewOfferingOutput{} - req = c.newRequest(op, input, output) - return -} - -// RenewOffering API operation for AWS Device Farm. -// -// Explicitly sets the quantity of devices to renew for an offering, starting -// from the effectiveDate of the next period. The API returns a NotEligible -// error if the user is not permitted to invoke the operation. Please contact -// aws-devicefarm-support@amazon.com (mailto:aws-devicefarm-support@amazon.com) -// if you believe that you should be able to invoke this operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation RenewOffering for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeNotEligibleException "NotEligibleException" -// Exception gets thrown when a user is not eligible to perform the specified -// transaction. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/RenewOffering -func (c *DeviceFarm) RenewOffering(input *RenewOfferingInput) (*RenewOfferingOutput, error) { - req, out := c.RenewOfferingRequest(input) - return out, req.Send() -} - -// RenewOfferingWithContext is the same as RenewOffering with the addition of -// the ability to pass a context and additional request options. -// -// See RenewOffering for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) RenewOfferingWithContext(ctx aws.Context, input *RenewOfferingInput, opts ...request.Option) (*RenewOfferingOutput, error) { - req, out := c.RenewOfferingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opScheduleRun = "ScheduleRun" - -// ScheduleRunRequest generates a "aws/request.Request" representing the -// client's request for the ScheduleRun operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ScheduleRun for more information on using the ScheduleRun -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ScheduleRunRequest method. -// req, resp := client.ScheduleRunRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ScheduleRun -func (c *DeviceFarm) ScheduleRunRequest(input *ScheduleRunInput) (req *request.Request, output *ScheduleRunOutput) { - op := &request.Operation{ - Name: opScheduleRun, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ScheduleRunInput{} - } - - output = &ScheduleRunOutput{} - req = c.newRequest(op, input, output) - return -} - -// ScheduleRun API operation for AWS Device Farm. -// -// Schedules a run. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation ScheduleRun for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeIdempotencyException "IdempotencyException" -// An entity with the same name already exists. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ScheduleRun -func (c *DeviceFarm) ScheduleRun(input *ScheduleRunInput) (*ScheduleRunOutput, error) { - req, out := c.ScheduleRunRequest(input) - return out, req.Send() -} - -// ScheduleRunWithContext is the same as ScheduleRun with the addition of -// the ability to pass a context and additional request options. -// -// See ScheduleRun for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) ScheduleRunWithContext(ctx aws.Context, input *ScheduleRunInput, opts ...request.Option) (*ScheduleRunOutput, error) { - req, out := c.ScheduleRunRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopJob = "StopJob" - -// StopJobRequest generates a "aws/request.Request" representing the -// client's request for the StopJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopJob for more information on using the StopJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopJobRequest method. -// req, resp := client.StopJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopJob -func (c *DeviceFarm) StopJobRequest(input *StopJobInput) (req *request.Request, output *StopJobOutput) { - op := &request.Operation{ - Name: opStopJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopJobInput{} - } - - output = &StopJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopJob API operation for AWS Device Farm. -// -// Initiates a stop request for the current job. AWS Device Farm will immediately -// stop the job on the device where tests have not started executing, and you -// will not be billed for this device. On the device where tests have started -// executing, Setup Suite and Teardown Suite tests will run to completion before -// stopping execution on the device. You will be billed for Setup, Teardown, -// and any tests that were in progress or already completed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation StopJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopJob -func (c *DeviceFarm) StopJob(input *StopJobInput) (*StopJobOutput, error) { - req, out := c.StopJobRequest(input) - return out, req.Send() -} - -// StopJobWithContext is the same as StopJob with the addition of -// the ability to pass a context and additional request options. -// -// See StopJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) StopJobWithContext(ctx aws.Context, input *StopJobInput, opts ...request.Option) (*StopJobOutput, error) { - req, out := c.StopJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopRemoteAccessSession = "StopRemoteAccessSession" - -// StopRemoteAccessSessionRequest generates a "aws/request.Request" representing the -// client's request for the StopRemoteAccessSession operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopRemoteAccessSession for more information on using the StopRemoteAccessSession -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopRemoteAccessSessionRequest method. -// req, resp := client.StopRemoteAccessSessionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRemoteAccessSession -func (c *DeviceFarm) StopRemoteAccessSessionRequest(input *StopRemoteAccessSessionInput) (req *request.Request, output *StopRemoteAccessSessionOutput) { - op := &request.Operation{ - Name: opStopRemoteAccessSession, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopRemoteAccessSessionInput{} - } - - output = &StopRemoteAccessSessionOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopRemoteAccessSession API operation for AWS Device Farm. -// -// Ends a specified remote access session. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation StopRemoteAccessSession for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRemoteAccessSession -func (c *DeviceFarm) StopRemoteAccessSession(input *StopRemoteAccessSessionInput) (*StopRemoteAccessSessionOutput, error) { - req, out := c.StopRemoteAccessSessionRequest(input) - return out, req.Send() -} - -// StopRemoteAccessSessionWithContext is the same as StopRemoteAccessSession with the addition of -// the ability to pass a context and additional request options. -// -// See StopRemoteAccessSession for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) StopRemoteAccessSessionWithContext(ctx aws.Context, input *StopRemoteAccessSessionInput, opts ...request.Option) (*StopRemoteAccessSessionOutput, error) { - req, out := c.StopRemoteAccessSessionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopRun = "StopRun" - -// StopRunRequest generates a "aws/request.Request" representing the -// client's request for the StopRun operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopRun for more information on using the StopRun -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopRunRequest method. -// req, resp := client.StopRunRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRun -func (c *DeviceFarm) StopRunRequest(input *StopRunInput) (req *request.Request, output *StopRunOutput) { - op := &request.Operation{ - Name: opStopRun, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopRunInput{} - } - - output = &StopRunOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopRun API operation for AWS Device Farm. -// -// Initiates a stop request for the current test run. AWS Device Farm will immediately -// stop the run on devices where tests have not started executing, and you will -// not be billed for these devices. On devices where tests have started executing, -// Setup Suite and Teardown Suite tests will run to completion before stopping -// execution on those devices. You will be billed for Setup, Teardown, and any -// tests that were in progress or already completed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation StopRun for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRun -func (c *DeviceFarm) StopRun(input *StopRunInput) (*StopRunOutput, error) { - req, out := c.StopRunRequest(input) - return out, req.Send() -} - -// StopRunWithContext is the same as StopRun with the addition of -// the ability to pass a context and additional request options. -// -// See StopRun for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) StopRunWithContext(ctx aws.Context, input *StopRunInput, opts ...request.Option) (*StopRunOutput, error) { - req, out := c.StopRunRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDeviceInstance = "UpdateDeviceInstance" - -// UpdateDeviceInstanceRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDeviceInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDeviceInstance for more information on using the UpdateDeviceInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDeviceInstanceRequest method. -// req, resp := client.UpdateDeviceInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDeviceInstance -func (c *DeviceFarm) UpdateDeviceInstanceRequest(input *UpdateDeviceInstanceInput) (req *request.Request, output *UpdateDeviceInstanceOutput) { - op := &request.Operation{ - Name: opUpdateDeviceInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateDeviceInstanceInput{} - } - - output = &UpdateDeviceInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDeviceInstance API operation for AWS Device Farm. -// -// Updates information about an existing private device instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation UpdateDeviceInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDeviceInstance -func (c *DeviceFarm) UpdateDeviceInstance(input *UpdateDeviceInstanceInput) (*UpdateDeviceInstanceOutput, error) { - req, out := c.UpdateDeviceInstanceRequest(input) - return out, req.Send() -} - -// UpdateDeviceInstanceWithContext is the same as UpdateDeviceInstance with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDeviceInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) UpdateDeviceInstanceWithContext(ctx aws.Context, input *UpdateDeviceInstanceInput, opts ...request.Option) (*UpdateDeviceInstanceOutput, error) { - req, out := c.UpdateDeviceInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDevicePool = "UpdateDevicePool" - -// UpdateDevicePoolRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDevicePool operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDevicePool for more information on using the UpdateDevicePool -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDevicePoolRequest method. -// req, resp := client.UpdateDevicePoolRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePool -func (c *DeviceFarm) UpdateDevicePoolRequest(input *UpdateDevicePoolInput) (req *request.Request, output *UpdateDevicePoolOutput) { - op := &request.Operation{ - Name: opUpdateDevicePool, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateDevicePoolInput{} - } - - output = &UpdateDevicePoolOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDevicePool API operation for AWS Device Farm. -// -// Modifies the name, description, and rules in a device pool given the attributes -// and the pool ARN. Rule updates are all-or-nothing, meaning they can only -// be updated as a whole (or not at all). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation UpdateDevicePool for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePool -func (c *DeviceFarm) UpdateDevicePool(input *UpdateDevicePoolInput) (*UpdateDevicePoolOutput, error) { - req, out := c.UpdateDevicePoolRequest(input) - return out, req.Send() -} - -// UpdateDevicePoolWithContext is the same as UpdateDevicePool with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDevicePool for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) UpdateDevicePoolWithContext(ctx aws.Context, input *UpdateDevicePoolInput, opts ...request.Option) (*UpdateDevicePoolOutput, error) { - req, out := c.UpdateDevicePoolRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateInstanceProfile = "UpdateInstanceProfile" - -// UpdateInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the UpdateInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateInstanceProfile for more information on using the UpdateInstanceProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateInstanceProfileRequest method. -// req, resp := client.UpdateInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateInstanceProfile -func (c *DeviceFarm) UpdateInstanceProfileRequest(input *UpdateInstanceProfileInput) (req *request.Request, output *UpdateInstanceProfileOutput) { - op := &request.Operation{ - Name: opUpdateInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateInstanceProfileInput{} - } - - output = &UpdateInstanceProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateInstanceProfile API operation for AWS Device Farm. -// -// Updates information about an existing private device instance profile. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation UpdateInstanceProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateInstanceProfile -func (c *DeviceFarm) UpdateInstanceProfile(input *UpdateInstanceProfileInput) (*UpdateInstanceProfileOutput, error) { - req, out := c.UpdateInstanceProfileRequest(input) - return out, req.Send() -} - -// UpdateInstanceProfileWithContext is the same as UpdateInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateInstanceProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) UpdateInstanceProfileWithContext(ctx aws.Context, input *UpdateInstanceProfileInput, opts ...request.Option) (*UpdateInstanceProfileOutput, error) { - req, out := c.UpdateInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateNetworkProfile = "UpdateNetworkProfile" - -// UpdateNetworkProfileRequest generates a "aws/request.Request" representing the -// client's request for the UpdateNetworkProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateNetworkProfile for more information on using the UpdateNetworkProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateNetworkProfileRequest method. -// req, resp := client.UpdateNetworkProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateNetworkProfile -func (c *DeviceFarm) UpdateNetworkProfileRequest(input *UpdateNetworkProfileInput) (req *request.Request, output *UpdateNetworkProfileOutput) { - op := &request.Operation{ - Name: opUpdateNetworkProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateNetworkProfileInput{} - } - - output = &UpdateNetworkProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateNetworkProfile API operation for AWS Device Farm. -// -// Updates the network profile with specific settings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation UpdateNetworkProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateNetworkProfile -func (c *DeviceFarm) UpdateNetworkProfile(input *UpdateNetworkProfileInput) (*UpdateNetworkProfileOutput, error) { - req, out := c.UpdateNetworkProfileRequest(input) - return out, req.Send() -} - -// UpdateNetworkProfileWithContext is the same as UpdateNetworkProfile with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateNetworkProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) UpdateNetworkProfileWithContext(ctx aws.Context, input *UpdateNetworkProfileInput, opts ...request.Option) (*UpdateNetworkProfileOutput, error) { - req, out := c.UpdateNetworkProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateProject = "UpdateProject" - -// UpdateProjectRequest generates a "aws/request.Request" representing the -// client's request for the UpdateProject operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateProject for more information on using the UpdateProject -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateProjectRequest method. -// req, resp := client.UpdateProjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateProject -func (c *DeviceFarm) UpdateProjectRequest(input *UpdateProjectInput) (req *request.Request, output *UpdateProjectOutput) { - op := &request.Operation{ - Name: opUpdateProject, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateProjectInput{} - } - - output = &UpdateProjectOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateProject API operation for AWS Device Farm. -// -// Modifies the specified project name, given the project ARN and a new name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation UpdateProject for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateProject -func (c *DeviceFarm) UpdateProject(input *UpdateProjectInput) (*UpdateProjectOutput, error) { - req, out := c.UpdateProjectRequest(input) - return out, req.Send() -} - -// UpdateProjectWithContext is the same as UpdateProject with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateProject for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) UpdateProjectWithContext(ctx aws.Context, input *UpdateProjectInput, opts ...request.Option) (*UpdateProjectOutput, error) { - req, out := c.UpdateProjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateUpload = "UpdateUpload" - -// UpdateUploadRequest generates a "aws/request.Request" representing the -// client's request for the UpdateUpload operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateUpload for more information on using the UpdateUpload -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateUploadRequest method. -// req, resp := client.UpdateUploadRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateUpload -func (c *DeviceFarm) UpdateUploadRequest(input *UpdateUploadInput) (req *request.Request, output *UpdateUploadOutput) { - op := &request.Operation{ - Name: opUpdateUpload, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateUploadInput{} - } - - output = &UpdateUploadOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateUpload API operation for AWS Device Farm. -// -// Update an uploaded test specification (test spec). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation UpdateUpload for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateUpload -func (c *DeviceFarm) UpdateUpload(input *UpdateUploadInput) (*UpdateUploadOutput, error) { - req, out := c.UpdateUploadRequest(input) - return out, req.Send() -} - -// UpdateUploadWithContext is the same as UpdateUpload with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateUpload for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) UpdateUploadWithContext(ctx aws.Context, input *UpdateUploadInput, opts ...request.Option) (*UpdateUploadOutput, error) { - req, out := c.UpdateUploadRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateVPCEConfiguration = "UpdateVPCEConfiguration" - -// UpdateVPCEConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateVPCEConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateVPCEConfiguration for more information on using the UpdateVPCEConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateVPCEConfigurationRequest method. -// req, resp := client.UpdateVPCEConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateVPCEConfiguration -func (c *DeviceFarm) UpdateVPCEConfigurationRequest(input *UpdateVPCEConfigurationInput) (req *request.Request, output *UpdateVPCEConfigurationOutput) { - op := &request.Operation{ - Name: opUpdateVPCEConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateVPCEConfigurationInput{} - } - - output = &UpdateVPCEConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateVPCEConfiguration API operation for AWS Device Farm. -// -// Updates information about an existing Amazon Virtual Private Cloud (VPC) -// endpoint configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Device Farm's -// API operation UpdateVPCEConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// There was an error with the update request, or you do not have sufficient -// permissions to update this VPC endpoint configuration. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateVPCEConfiguration -func (c *DeviceFarm) UpdateVPCEConfiguration(input *UpdateVPCEConfigurationInput) (*UpdateVPCEConfigurationOutput, error) { - req, out := c.UpdateVPCEConfigurationRequest(input) - return out, req.Send() -} - -// UpdateVPCEConfigurationWithContext is the same as UpdateVPCEConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateVPCEConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DeviceFarm) UpdateVPCEConfigurationWithContext(ctx aws.Context, input *UpdateVPCEConfigurationInput, opts ...request.Option) (*UpdateVPCEConfigurationOutput, error) { - req, out := c.UpdateVPCEConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// A container for account-level settings within AWS Device Farm. -type AccountSettings struct { - _ struct{} `type:"structure"` - - // The AWS account number specified in the AccountSettings container. - AwsAccountNumber *string `locationName:"awsAccountNumber" min:"2" type:"string"` - - // The default number of minutes (at the account level) a test run will execute - // before it times out. Default value is 60 minutes. - DefaultJobTimeoutMinutes *int64 `locationName:"defaultJobTimeoutMinutes" type:"integer"` - - // The maximum number of minutes a test run will execute before it times out. - MaxJobTimeoutMinutes *int64 `locationName:"maxJobTimeoutMinutes" type:"integer"` - - // The maximum number of device slots that the AWS account can purchase. Each - // maximum is expressed as an offering-id:number pair, where the offering-id - // represents one of the IDs returned by the ListOfferings command. - MaxSlots map[string]*int64 `locationName:"maxSlots" type:"map"` - - // When set to true, for private devices, Device Farm will not sign your app - // again. For public devices, Device Farm always signs your apps again and this - // parameter has no effect. - // - // For more information about how Device Farm re-signs your app(s), see Do you - // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device - // Farm FAQs. - SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` - - // Information about an AWS account's usage of free trial device minutes. - TrialMinutes *TrialMinutes `locationName:"trialMinutes" type:"structure"` - - // Returns the unmetered devices you have purchased or want to purchase. - UnmeteredDevices map[string]*int64 `locationName:"unmeteredDevices" type:"map"` - - // Returns the unmetered remote access devices you have purchased or want to - // purchase. - UnmeteredRemoteAccessDevices map[string]*int64 `locationName:"unmeteredRemoteAccessDevices" type:"map"` -} - -// String returns the string representation -func (s AccountSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountSettings) GoString() string { - return s.String() -} - -// SetAwsAccountNumber sets the AwsAccountNumber field's value. -func (s *AccountSettings) SetAwsAccountNumber(v string) *AccountSettings { - s.AwsAccountNumber = &v - return s -} - -// SetDefaultJobTimeoutMinutes sets the DefaultJobTimeoutMinutes field's value. -func (s *AccountSettings) SetDefaultJobTimeoutMinutes(v int64) *AccountSettings { - s.DefaultJobTimeoutMinutes = &v - return s -} - -// SetMaxJobTimeoutMinutes sets the MaxJobTimeoutMinutes field's value. -func (s *AccountSettings) SetMaxJobTimeoutMinutes(v int64) *AccountSettings { - s.MaxJobTimeoutMinutes = &v - return s -} - -// SetMaxSlots sets the MaxSlots field's value. -func (s *AccountSettings) SetMaxSlots(v map[string]*int64) *AccountSettings { - s.MaxSlots = v - return s -} - -// SetSkipAppResign sets the SkipAppResign field's value. -func (s *AccountSettings) SetSkipAppResign(v bool) *AccountSettings { - s.SkipAppResign = &v - return s -} - -// SetTrialMinutes sets the TrialMinutes field's value. -func (s *AccountSettings) SetTrialMinutes(v *TrialMinutes) *AccountSettings { - s.TrialMinutes = v - return s -} - -// SetUnmeteredDevices sets the UnmeteredDevices field's value. -func (s *AccountSettings) SetUnmeteredDevices(v map[string]*int64) *AccountSettings { - s.UnmeteredDevices = v - return s -} - -// SetUnmeteredRemoteAccessDevices sets the UnmeteredRemoteAccessDevices field's value. -func (s *AccountSettings) SetUnmeteredRemoteAccessDevices(v map[string]*int64) *AccountSettings { - s.UnmeteredRemoteAccessDevices = v - return s -} - -// Represents the output of a test. Examples of artifacts include logs and screenshots. -type Artifact struct { - _ struct{} `type:"structure"` - - // The artifact's ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The artifact's file extension. - Extension *string `locationName:"extension" type:"string"` - - // The artifact's name. - Name *string `locationName:"name" type:"string"` - - // The artifact's type. - // - // Allowed values include the following: - // - // * UNKNOWN: An unknown type. - // - // * SCREENSHOT: The screenshot type. - // - // * DEVICE_LOG: The device log type. - // - // * MESSAGE_LOG: The message log type. - // - // * VIDEO_LOG: The video log type. - // - // * RESULT_LOG: The result log type. - // - // * SERVICE_LOG: The service log type. - // - // * WEBKIT_LOG: The web kit log type. - // - // * INSTRUMENTATION_OUTPUT: The instrumentation type. - // - // * EXERCISER_MONKEY_OUTPUT: For Android, the artifact (log) generated by - // an Android fuzz test. - // - // * CALABASH_JSON_OUTPUT: The Calabash JSON output type. - // - // * CALABASH_PRETTY_OUTPUT: The Calabash pretty output type. - // - // * CALABASH_STANDARD_OUTPUT: The Calabash standard output type. - // - // * CALABASH_JAVA_XML_OUTPUT: The Calabash Java XML output type. - // - // * AUTOMATION_OUTPUT: The automation output type. - // - // * APPIUM_SERVER_OUTPUT: The Appium server output type. - // - // * APPIUM_JAVA_OUTPUT: The Appium Java output type. - // - // * APPIUM_JAVA_XML_OUTPUT: The Appium Java XML output type. - // - // * APPIUM_PYTHON_OUTPUT: The Appium Python output type. - // - // * APPIUM_PYTHON_XML_OUTPUT: The Appium Python XML output type. - // - // * EXPLORER_EVENT_LOG: The Explorer event log output type. - // - // * EXPLORER_SUMMARY_LOG: The Explorer summary log output type. - // - // * APPLICATION_CRASH_REPORT: The application crash report output type. - // - // * XCTEST_LOG: The XCode test output type. - // - // * VIDEO: The Video output type. - // - // * CUSTOMER_ARTIFACT:The Customer Artifact output type. - // - // * CUSTOMER_ARTIFACT_LOG: The Customer Artifact Log output type. - // - // * TESTSPEC_OUTPUT: The Test Spec Output type. - Type *string `locationName:"type" type:"string" enum:"ArtifactType"` - - // The pre-signed Amazon S3 URL that can be used with a corresponding GET request - // to download the artifact's file. - Url *string `locationName:"url" type:"string"` -} - -// String returns the string representation -func (s Artifact) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Artifact) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Artifact) SetArn(v string) *Artifact { - s.Arn = &v - return s -} - -// SetExtension sets the Extension field's value. -func (s *Artifact) SetExtension(v string) *Artifact { - s.Extension = &v - return s -} - -// SetName sets the Name field's value. -func (s *Artifact) SetName(v string) *Artifact { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *Artifact) SetType(v string) *Artifact { - s.Type = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *Artifact) SetUrl(v string) *Artifact { - s.Url = &v - return s -} - -// Represents the amount of CPU that an app is using on a physical device. -// -// Note that this does not represent system-wide CPU usage. -type CPU struct { - _ struct{} `type:"structure"` - - // The CPU's architecture, for example x86 or ARM. - Architecture *string `locationName:"architecture" type:"string"` - - // The clock speed of the device's CPU, expressed in hertz (Hz). For example, - // a 1.2 GHz CPU is expressed as 1200000000. - Clock *float64 `locationName:"clock" type:"double"` - - // The CPU's frequency. - Frequency *string `locationName:"frequency" type:"string"` -} - -// String returns the string representation -func (s CPU) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CPU) GoString() string { - return s.String() -} - -// SetArchitecture sets the Architecture field's value. -func (s *CPU) SetArchitecture(v string) *CPU { - s.Architecture = &v - return s -} - -// SetClock sets the Clock field's value. -func (s *CPU) SetClock(v float64) *CPU { - s.Clock = &v - return s -} - -// SetFrequency sets the Frequency field's value. -func (s *CPU) SetFrequency(v string) *CPU { - s.Frequency = &v - return s -} - -// Represents entity counters. -type Counters struct { - _ struct{} `type:"structure"` - - // The number of errored entities. - Errored *int64 `locationName:"errored" type:"integer"` - - // The number of failed entities. - Failed *int64 `locationName:"failed" type:"integer"` - - // The number of passed entities. - Passed *int64 `locationName:"passed" type:"integer"` - - // The number of skipped entities. - Skipped *int64 `locationName:"skipped" type:"integer"` - - // The number of stopped entities. - Stopped *int64 `locationName:"stopped" type:"integer"` - - // The total number of entities. - Total *int64 `locationName:"total" type:"integer"` - - // The number of warned entities. - Warned *int64 `locationName:"warned" type:"integer"` -} - -// String returns the string representation -func (s Counters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Counters) GoString() string { - return s.String() -} - -// SetErrored sets the Errored field's value. -func (s *Counters) SetErrored(v int64) *Counters { - s.Errored = &v - return s -} - -// SetFailed sets the Failed field's value. -func (s *Counters) SetFailed(v int64) *Counters { - s.Failed = &v - return s -} - -// SetPassed sets the Passed field's value. -func (s *Counters) SetPassed(v int64) *Counters { - s.Passed = &v - return s -} - -// SetSkipped sets the Skipped field's value. -func (s *Counters) SetSkipped(v int64) *Counters { - s.Skipped = &v - return s -} - -// SetStopped sets the Stopped field's value. -func (s *Counters) SetStopped(v int64) *Counters { - s.Stopped = &v - return s -} - -// SetTotal sets the Total field's value. -func (s *Counters) SetTotal(v int64) *Counters { - s.Total = &v - return s -} - -// SetWarned sets the Warned field's value. -func (s *Counters) SetWarned(v int64) *Counters { - s.Warned = &v - return s -} - -// Represents a request to the create device pool operation. -type CreateDevicePoolInput struct { - _ struct{} `type:"structure"` - - // The device pool's description. - Description *string `locationName:"description" type:"string"` - - // The number of devices that Device Farm can add to your device pool. Device - // Farm adds devices that are available and that meet the criteria that you - // assign for the rules parameter. Depending on how many devices meet these - // constraints, your device pool might contain fewer devices than the value - // for this parameter. - // - // By specifying the maximum number of devices, you can control the costs that - // you incur by running tests. - MaxDevices *int64 `locationName:"maxDevices" type:"integer"` - - // The device pool's name. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The ARN of the project for the device pool. - // - // ProjectArn is a required field - ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` - - // The device pool's rules. - // - // Rules is a required field - Rules []*Rule `locationName:"rules" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateDevicePoolInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDevicePoolInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDevicePoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDevicePoolInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.ProjectArn == nil { - invalidParams.Add(request.NewErrParamRequired("ProjectArn")) - } - if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) - } - if s.Rules == nil { - invalidParams.Add(request.NewErrParamRequired("Rules")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateDevicePoolInput) SetDescription(v string) *CreateDevicePoolInput { - s.Description = &v - return s -} - -// SetMaxDevices sets the MaxDevices field's value. -func (s *CreateDevicePoolInput) SetMaxDevices(v int64) *CreateDevicePoolInput { - s.MaxDevices = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateDevicePoolInput) SetName(v string) *CreateDevicePoolInput { - s.Name = &v - return s -} - -// SetProjectArn sets the ProjectArn field's value. -func (s *CreateDevicePoolInput) SetProjectArn(v string) *CreateDevicePoolInput { - s.ProjectArn = &v - return s -} - -// SetRules sets the Rules field's value. -func (s *CreateDevicePoolInput) SetRules(v []*Rule) *CreateDevicePoolInput { - s.Rules = v - return s -} - -// Represents the result of a create device pool request. -type CreateDevicePoolOutput struct { - _ struct{} `type:"structure"` - - // The newly created device pool. - DevicePool *DevicePool `locationName:"devicePool" type:"structure"` -} - -// String returns the string representation -func (s CreateDevicePoolOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDevicePoolOutput) GoString() string { - return s.String() -} - -// SetDevicePool sets the DevicePool field's value. -func (s *CreateDevicePoolOutput) SetDevicePool(v *DevicePool) *CreateDevicePoolOutput { - s.DevicePool = v - return s -} - -type CreateInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The description of your instance profile. - Description *string `locationName:"description" type:"string"` - - // An array of strings specifying the list of app packages that should not be - // cleaned up from the device after a test run is over. - // - // The list of packages is only considered if you set packageCleanup to true. - ExcludeAppPackagesFromCleanup []*string `locationName:"excludeAppPackagesFromCleanup" type:"list"` - - // The name of your instance profile. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // When set to true, Device Farm will remove app packages after a test run. - // The default value is false for private devices. - PackageCleanup *bool `locationName:"packageCleanup" type:"boolean"` - - // When set to true, Device Farm will reboot the instance after a test run. - // The default value is true. - RebootAfterUse *bool `locationName:"rebootAfterUse" type:"boolean"` -} - -// String returns the string representation -func (s CreateInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstanceProfileInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateInstanceProfileInput) SetDescription(v string) *CreateInstanceProfileInput { - s.Description = &v - return s -} - -// SetExcludeAppPackagesFromCleanup sets the ExcludeAppPackagesFromCleanup field's value. -func (s *CreateInstanceProfileInput) SetExcludeAppPackagesFromCleanup(v []*string) *CreateInstanceProfileInput { - s.ExcludeAppPackagesFromCleanup = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateInstanceProfileInput) SetName(v string) *CreateInstanceProfileInput { - s.Name = &v - return s -} - -// SetPackageCleanup sets the PackageCleanup field's value. -func (s *CreateInstanceProfileInput) SetPackageCleanup(v bool) *CreateInstanceProfileInput { - s.PackageCleanup = &v - return s -} - -// SetRebootAfterUse sets the RebootAfterUse field's value. -func (s *CreateInstanceProfileInput) SetRebootAfterUse(v bool) *CreateInstanceProfileInput { - s.RebootAfterUse = &v - return s -} - -type CreateInstanceProfileOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about your instance profile. - InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` -} - -// String returns the string representation -func (s CreateInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInstanceProfileOutput) GoString() string { - return s.String() -} - -// SetInstanceProfile sets the InstanceProfile field's value. -func (s *CreateInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *CreateInstanceProfileOutput { - s.InstanceProfile = v - return s -} - -type CreateNetworkProfileInput struct { - _ struct{} `type:"structure"` - - // The description of the network profile. - Description *string `locationName:"description" type:"string"` - - // The data throughput rate in bits per second, as an integer from 0 to 104857600. - DownlinkBandwidthBits *int64 `locationName:"downlinkBandwidthBits" type:"long"` - - // Delay time for all packets to destination in milliseconds as an integer from - // 0 to 2000. - DownlinkDelayMs *int64 `locationName:"downlinkDelayMs" type:"long"` - - // Time variation in the delay of received packets in milliseconds as an integer - // from 0 to 2000. - DownlinkJitterMs *int64 `locationName:"downlinkJitterMs" type:"long"` - - // Proportion of received packets that fail to arrive from 0 to 100 percent. - DownlinkLossPercent *int64 `locationName:"downlinkLossPercent" type:"integer"` - - // The name you wish to specify for the new network profile. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the project for which you want to create - // a network profile. - // - // ProjectArn is a required field - ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` - - // The type of network profile you wish to create. Valid values are listed below. - Type *string `locationName:"type" type:"string" enum:"NetworkProfileType"` - - // The data throughput rate in bits per second, as an integer from 0 to 104857600. - UplinkBandwidthBits *int64 `locationName:"uplinkBandwidthBits" type:"long"` - - // Delay time for all packets to destination in milliseconds as an integer from - // 0 to 2000. - UplinkDelayMs *int64 `locationName:"uplinkDelayMs" type:"long"` - - // Time variation in the delay of received packets in milliseconds as an integer - // from 0 to 2000. - UplinkJitterMs *int64 `locationName:"uplinkJitterMs" type:"long"` - - // Proportion of transmitted packets that fail to arrive from 0 to 100 percent. - UplinkLossPercent *int64 `locationName:"uplinkLossPercent" type:"integer"` -} - -// String returns the string representation -func (s CreateNetworkProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNetworkProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNetworkProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNetworkProfileInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.ProjectArn == nil { - invalidParams.Add(request.NewErrParamRequired("ProjectArn")) - } - if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateNetworkProfileInput) SetDescription(v string) *CreateNetworkProfileInput { - s.Description = &v - return s -} - -// SetDownlinkBandwidthBits sets the DownlinkBandwidthBits field's value. -func (s *CreateNetworkProfileInput) SetDownlinkBandwidthBits(v int64) *CreateNetworkProfileInput { - s.DownlinkBandwidthBits = &v - return s -} - -// SetDownlinkDelayMs sets the DownlinkDelayMs field's value. -func (s *CreateNetworkProfileInput) SetDownlinkDelayMs(v int64) *CreateNetworkProfileInput { - s.DownlinkDelayMs = &v - return s -} - -// SetDownlinkJitterMs sets the DownlinkJitterMs field's value. -func (s *CreateNetworkProfileInput) SetDownlinkJitterMs(v int64) *CreateNetworkProfileInput { - s.DownlinkJitterMs = &v - return s -} - -// SetDownlinkLossPercent sets the DownlinkLossPercent field's value. -func (s *CreateNetworkProfileInput) SetDownlinkLossPercent(v int64) *CreateNetworkProfileInput { - s.DownlinkLossPercent = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateNetworkProfileInput) SetName(v string) *CreateNetworkProfileInput { - s.Name = &v - return s -} - -// SetProjectArn sets the ProjectArn field's value. -func (s *CreateNetworkProfileInput) SetProjectArn(v string) *CreateNetworkProfileInput { - s.ProjectArn = &v - return s -} - -// SetType sets the Type field's value. -func (s *CreateNetworkProfileInput) SetType(v string) *CreateNetworkProfileInput { - s.Type = &v - return s -} - -// SetUplinkBandwidthBits sets the UplinkBandwidthBits field's value. -func (s *CreateNetworkProfileInput) SetUplinkBandwidthBits(v int64) *CreateNetworkProfileInput { - s.UplinkBandwidthBits = &v - return s -} - -// SetUplinkDelayMs sets the UplinkDelayMs field's value. -func (s *CreateNetworkProfileInput) SetUplinkDelayMs(v int64) *CreateNetworkProfileInput { - s.UplinkDelayMs = &v - return s -} - -// SetUplinkJitterMs sets the UplinkJitterMs field's value. -func (s *CreateNetworkProfileInput) SetUplinkJitterMs(v int64) *CreateNetworkProfileInput { - s.UplinkJitterMs = &v - return s -} - -// SetUplinkLossPercent sets the UplinkLossPercent field's value. -func (s *CreateNetworkProfileInput) SetUplinkLossPercent(v int64) *CreateNetworkProfileInput { - s.UplinkLossPercent = &v - return s -} - -type CreateNetworkProfileOutput struct { - _ struct{} `type:"structure"` - - // The network profile that is returned by the create network profile request. - NetworkProfile *NetworkProfile `locationName:"networkProfile" type:"structure"` -} - -// String returns the string representation -func (s CreateNetworkProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNetworkProfileOutput) GoString() string { - return s.String() -} - -// SetNetworkProfile sets the NetworkProfile field's value. -func (s *CreateNetworkProfileOutput) SetNetworkProfile(v *NetworkProfile) *CreateNetworkProfileOutput { - s.NetworkProfile = v - return s -} - -// Represents a request to the create project operation. -type CreateProjectInput struct { - _ struct{} `type:"structure"` - - // Sets the execution timeout value (in minutes) for a project. All test runs - // in this project will use the specified execution timeout value unless overridden - // when scheduling a run. - DefaultJobTimeoutMinutes *int64 `locationName:"defaultJobTimeoutMinutes" type:"integer"` - - // The project's name. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateProjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateProjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateProjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateProjectInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultJobTimeoutMinutes sets the DefaultJobTimeoutMinutes field's value. -func (s *CreateProjectInput) SetDefaultJobTimeoutMinutes(v int64) *CreateProjectInput { - s.DefaultJobTimeoutMinutes = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateProjectInput) SetName(v string) *CreateProjectInput { - s.Name = &v - return s -} - -// Represents the result of a create project request. -type CreateProjectOutput struct { - _ struct{} `type:"structure"` - - // The newly created project. - Project *Project `locationName:"project" type:"structure"` -} - -// String returns the string representation -func (s CreateProjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateProjectOutput) GoString() string { - return s.String() -} - -// SetProject sets the Project field's value. -func (s *CreateProjectOutput) SetProject(v *Project) *CreateProjectOutput { - s.Project = v - return s -} - -// Configuration settings for a remote access session, including billing method. -type CreateRemoteAccessSessionConfiguration struct { - _ struct{} `type:"structure"` - - // The billing method for the remote access session. - BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` - - // An array of Amazon Resource Names (ARNs) included in the VPC endpoint configuration. - VpceConfigurationArns []*string `locationName:"vpceConfigurationArns" type:"list"` -} - -// String returns the string representation -func (s CreateRemoteAccessSessionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRemoteAccessSessionConfiguration) GoString() string { - return s.String() -} - -// SetBillingMethod sets the BillingMethod field's value. -func (s *CreateRemoteAccessSessionConfiguration) SetBillingMethod(v string) *CreateRemoteAccessSessionConfiguration { - s.BillingMethod = &v - return s -} - -// SetVpceConfigurationArns sets the VpceConfigurationArns field's value. -func (s *CreateRemoteAccessSessionConfiguration) SetVpceConfigurationArns(v []*string) *CreateRemoteAccessSessionConfiguration { - s.VpceConfigurationArns = v - return s -} - -// Creates and submits a request to start a remote access session. -type CreateRemoteAccessSessionInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for the client. If you want access to multiple devices - // on the same client, you should pass the same clientId value in each call - // to CreateRemoteAccessSession. This is required only if remoteDebugEnabled - // is set to true. - ClientId *string `locationName:"clientId" type:"string"` - - // The configuration information for the remote access session request. - Configuration *CreateRemoteAccessSessionConfiguration `locationName:"configuration" type:"structure"` - - // The Amazon Resource Name (ARN) of the device for which you want to create - // a remote access session. - // - // DeviceArn is a required field - DeviceArn *string `locationName:"deviceArn" min:"32" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the device instance for which you want - // to create a remote access session. - InstanceArn *string `locationName:"instanceArn" min:"32" type:"string"` - - // The interaction mode of the remote access session. Valid values are: - // - // * INTERACTIVE: You can interact with the iOS device by viewing, touching, - // and rotating the screen. You cannot run XCUITest framework-based tests - // in this mode. - // - // * NO_VIDEO: You are connected to the device but cannot interact with it - // or view the screen. This mode has the fastest test execution speed. You - // can run XCUITest framework-based tests in this mode. - // - // * VIDEO_ONLY: You can view the screen but cannot touch or rotate it. You - // can run XCUITest framework-based tests and watch the screen in this mode. - InteractionMode *string `locationName:"interactionMode" type:"string" enum:"InteractionMode"` - - // The name of the remote access session that you wish to create. - Name *string `locationName:"name" type:"string"` - - // The Amazon Resource Name (ARN) of the project for which you want to create - // a remote access session. - // - // ProjectArn is a required field - ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` - - // Set to true if you want to access devices remotely for debugging in your - // remote access session. - RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"` - - // The Amazon Resource Name (ARN) for the app to be recorded in the remote access - // session. - RemoteRecordAppArn *string `locationName:"remoteRecordAppArn" min:"32" type:"string"` - - // Set to true to enable remote recording for the remote access session. - RemoteRecordEnabled *bool `locationName:"remoteRecordEnabled" type:"boolean"` - - // When set to true, for private devices, Device Farm will not sign your app - // again. For public devices, Device Farm always signs your apps again and this - // parameter has no effect. - // - // For more information about how Device Farm re-signs your app(s), see Do you - // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device - // Farm FAQs. - SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` - - // The public key of the ssh key pair you want to use for connecting to remote - // devices in your remote debugging session. This is only required if remoteDebugEnabled - // is set to true. - SshPublicKey *string `locationName:"sshPublicKey" type:"string"` -} - -// String returns the string representation -func (s CreateRemoteAccessSessionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRemoteAccessSessionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRemoteAccessSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRemoteAccessSessionInput"} - if s.DeviceArn == nil { - invalidParams.Add(request.NewErrParamRequired("DeviceArn")) - } - if s.DeviceArn != nil && len(*s.DeviceArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("DeviceArn", 32)) - } - if s.InstanceArn != nil && len(*s.InstanceArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("InstanceArn", 32)) - } - if s.ProjectArn == nil { - invalidParams.Add(request.NewErrParamRequired("ProjectArn")) - } - if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) - } - if s.RemoteRecordAppArn != nil && len(*s.RemoteRecordAppArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("RemoteRecordAppArn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientId sets the ClientId field's value. -func (s *CreateRemoteAccessSessionInput) SetClientId(v string) *CreateRemoteAccessSessionInput { - s.ClientId = &v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *CreateRemoteAccessSessionInput) SetConfiguration(v *CreateRemoteAccessSessionConfiguration) *CreateRemoteAccessSessionInput { - s.Configuration = v - return s -} - -// SetDeviceArn sets the DeviceArn field's value. -func (s *CreateRemoteAccessSessionInput) SetDeviceArn(v string) *CreateRemoteAccessSessionInput { - s.DeviceArn = &v - return s -} - -// SetInstanceArn sets the InstanceArn field's value. -func (s *CreateRemoteAccessSessionInput) SetInstanceArn(v string) *CreateRemoteAccessSessionInput { - s.InstanceArn = &v - return s -} - -// SetInteractionMode sets the InteractionMode field's value. -func (s *CreateRemoteAccessSessionInput) SetInteractionMode(v string) *CreateRemoteAccessSessionInput { - s.InteractionMode = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateRemoteAccessSessionInput) SetName(v string) *CreateRemoteAccessSessionInput { - s.Name = &v - return s -} - -// SetProjectArn sets the ProjectArn field's value. -func (s *CreateRemoteAccessSessionInput) SetProjectArn(v string) *CreateRemoteAccessSessionInput { - s.ProjectArn = &v - return s -} - -// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. -func (s *CreateRemoteAccessSessionInput) SetRemoteDebugEnabled(v bool) *CreateRemoteAccessSessionInput { - s.RemoteDebugEnabled = &v - return s -} - -// SetRemoteRecordAppArn sets the RemoteRecordAppArn field's value. -func (s *CreateRemoteAccessSessionInput) SetRemoteRecordAppArn(v string) *CreateRemoteAccessSessionInput { - s.RemoteRecordAppArn = &v - return s -} - -// SetRemoteRecordEnabled sets the RemoteRecordEnabled field's value. -func (s *CreateRemoteAccessSessionInput) SetRemoteRecordEnabled(v bool) *CreateRemoteAccessSessionInput { - s.RemoteRecordEnabled = &v - return s -} - -// SetSkipAppResign sets the SkipAppResign field's value. -func (s *CreateRemoteAccessSessionInput) SetSkipAppResign(v bool) *CreateRemoteAccessSessionInput { - s.SkipAppResign = &v - return s -} - -// SetSshPublicKey sets the SshPublicKey field's value. -func (s *CreateRemoteAccessSessionInput) SetSshPublicKey(v string) *CreateRemoteAccessSessionInput { - s.SshPublicKey = &v - return s -} - -// Represents the server response from a request to create a remote access session. -type CreateRemoteAccessSessionOutput struct { - _ struct{} `type:"structure"` - - // A container that describes the remote access session when the request to - // create a remote access session is sent. - RemoteAccessSession *RemoteAccessSession `locationName:"remoteAccessSession" type:"structure"` -} - -// String returns the string representation -func (s CreateRemoteAccessSessionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRemoteAccessSessionOutput) GoString() string { - return s.String() -} - -// SetRemoteAccessSession sets the RemoteAccessSession field's value. -func (s *CreateRemoteAccessSessionOutput) SetRemoteAccessSession(v *RemoteAccessSession) *CreateRemoteAccessSessionOutput { - s.RemoteAccessSession = v - return s -} - -// Represents a request to the create upload operation. -type CreateUploadInput struct { - _ struct{} `type:"structure"` - - // The upload's content type (for example, "application/octet-stream"). - ContentType *string `locationName:"contentType" type:"string"` - - // The upload's file name. The name should not contain the '/' character. If - // uploading an iOS app, the file name needs to end with the .ipa extension. - // If uploading an Android app, the file name needs to end with the .apk extension. - // For all others, the file name must end with the .zip file extension. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The ARN of the project for the upload. - // - // ProjectArn is a required field - ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` - - // The upload's upload type. - // - // Must be one of the following values: - // - // * ANDROID_APP: An Android upload. - // - // * IOS_APP: An iOS upload. - // - // * WEB_APP: A web application upload. - // - // * EXTERNAL_DATA: An external data upload. - // - // * APPIUM_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package upload. - // - // * APPIUM_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload. - // - // * APPIUM_PYTHON_TEST_PACKAGE: An Appium Python test package upload. - // - // * APPIUM_NODE_TEST_PACKAGE: An Appium Node.js test package upload. - // - // * APPIUM_RUBY_TEST_PACKAGE: An Appium Ruby test package upload. - // - // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package - // upload for a web app. - // - // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload for a web app. - // - // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload - // for a web app. - // - // * APPIUM_WEB_NODE_TEST_PACKAGE: An Appium Node.js test package upload - // for a web app. - // - // * APPIUM_WEB_RUBY_TEST_PACKAGE: An Appium Ruby test package upload for - // a web app. - // - // * CALABASH_TEST_PACKAGE: A Calabash test package upload. - // - // * INSTRUMENTATION_TEST_PACKAGE: An instrumentation upload. - // - // * UIAUTOMATION_TEST_PACKAGE: A uiautomation test package upload. - // - // * UIAUTOMATOR_TEST_PACKAGE: A uiautomator test package upload. - // - // * XCTEST_TEST_PACKAGE: An XCode test package upload. - // - // * XCTEST_UI_TEST_PACKAGE: An XCode UI test package upload. - // - // * APPIUM_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. - // - // * APPIUM_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. - // - // * APPIUM_PYTHON_TEST_SPEC: An Appium Python test spec upload. - // - // * APPIUM_NODE_TEST_SPEC: An Appium Node.js test spec upload. - // - // * APPIUM_RUBY_TEST_SPEC: An Appium Ruby test spec upload. - // - // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload - // for a web app. - // - // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload - // for a web app. - // - // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload for a - // web app. - // - // * APPIUM_WEB_NODE_TEST_SPEC: An Appium Node.js test spec upload for a - // web app. - // - // * APPIUM_WEB_RUBY_TEST_SPEC: An Appium Ruby test spec upload for a web - // app. - // - // * INSTRUMENTATION_TEST_SPEC: An instrumentation test spec upload. - // - // * XCTEST_UI_TEST_SPEC: An XCode UI test spec upload. - // - // Note If you call CreateUpload with WEB_APP specified, AWS Device Farm throws - // an ArgumentException error. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"UploadType"` -} - -// String returns the string representation -func (s CreateUploadInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUploadInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateUploadInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.ProjectArn == nil { - invalidParams.Add(request.NewErrParamRequired("ProjectArn")) - } - if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContentType sets the ContentType field's value. -func (s *CreateUploadInput) SetContentType(v string) *CreateUploadInput { - s.ContentType = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateUploadInput) SetName(v string) *CreateUploadInput { - s.Name = &v - return s -} - -// SetProjectArn sets the ProjectArn field's value. -func (s *CreateUploadInput) SetProjectArn(v string) *CreateUploadInput { - s.ProjectArn = &v - return s -} - -// SetType sets the Type field's value. -func (s *CreateUploadInput) SetType(v string) *CreateUploadInput { - s.Type = &v - return s -} - -// Represents the result of a create upload request. -type CreateUploadOutput struct { - _ struct{} `type:"structure"` - - // The newly created upload. - Upload *Upload `locationName:"upload" type:"structure"` -} - -// String returns the string representation -func (s CreateUploadOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUploadOutput) GoString() string { - return s.String() -} - -// SetUpload sets the Upload field's value. -func (s *CreateUploadOutput) SetUpload(v *Upload) *CreateUploadOutput { - s.Upload = v - return s -} - -type CreateVPCEConfigurationInput struct { - _ struct{} `type:"structure"` - - // The DNS name of the service running in your VPC that you want Device Farm - // to test. - // - // ServiceDnsName is a required field - ServiceDnsName *string `locationName:"serviceDnsName" type:"string" required:"true"` - - // An optional description, providing more details about your VPC endpoint configuration. - VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` - - // The friendly name you give to your VPC endpoint configuration, to manage - // your configurations more easily. - // - // VpceConfigurationName is a required field - VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string" required:"true"` - - // The name of the VPC endpoint service running inside your AWS account that - // you want Device Farm to test. - // - // VpceServiceName is a required field - VpceServiceName *string `locationName:"vpceServiceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateVPCEConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVPCEConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVPCEConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVPCEConfigurationInput"} - if s.ServiceDnsName == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceDnsName")) - } - if s.VpceConfigurationName == nil { - invalidParams.Add(request.NewErrParamRequired("VpceConfigurationName")) - } - if s.VpceServiceName == nil { - invalidParams.Add(request.NewErrParamRequired("VpceServiceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServiceDnsName sets the ServiceDnsName field's value. -func (s *CreateVPCEConfigurationInput) SetServiceDnsName(v string) *CreateVPCEConfigurationInput { - s.ServiceDnsName = &v - return s -} - -// SetVpceConfigurationDescription sets the VpceConfigurationDescription field's value. -func (s *CreateVPCEConfigurationInput) SetVpceConfigurationDescription(v string) *CreateVPCEConfigurationInput { - s.VpceConfigurationDescription = &v - return s -} - -// SetVpceConfigurationName sets the VpceConfigurationName field's value. -func (s *CreateVPCEConfigurationInput) SetVpceConfigurationName(v string) *CreateVPCEConfigurationInput { - s.VpceConfigurationName = &v - return s -} - -// SetVpceServiceName sets the VpceServiceName field's value. -func (s *CreateVPCEConfigurationInput) SetVpceServiceName(v string) *CreateVPCEConfigurationInput { - s.VpceServiceName = &v - return s -} - -type CreateVPCEConfigurationOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about your VPC endpoint configuration. - VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` -} - -// String returns the string representation -func (s CreateVPCEConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVPCEConfigurationOutput) GoString() string { - return s.String() -} - -// SetVpceConfiguration sets the VpceConfiguration field's value. -func (s *CreateVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *CreateVPCEConfigurationOutput { - s.VpceConfiguration = v - return s -} - -// A JSON object specifying the paths where the artifacts generated by the customer's -// tests, on the device or in the test environment, will be pulled from. -// -// Specify deviceHostPaths and optionally specify either iosPaths or androidPaths. -// -// For web app tests, you can specify both iosPaths and androidPaths. -type CustomerArtifactPaths struct { - _ struct{} `type:"structure"` - - // Comma-separated list of paths on the Android device where the artifacts generated - // by the customer's tests will be pulled from. - AndroidPaths []*string `locationName:"androidPaths" type:"list"` - - // Comma-separated list of paths in the test execution environment where the - // artifacts generated by the customer's tests will be pulled from. - DeviceHostPaths []*string `locationName:"deviceHostPaths" type:"list"` - - // Comma-separated list of paths on the iOS device where the artifacts generated - // by the customer's tests will be pulled from. - IosPaths []*string `locationName:"iosPaths" type:"list"` -} - -// String returns the string representation -func (s CustomerArtifactPaths) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CustomerArtifactPaths) GoString() string { - return s.String() -} - -// SetAndroidPaths sets the AndroidPaths field's value. -func (s *CustomerArtifactPaths) SetAndroidPaths(v []*string) *CustomerArtifactPaths { - s.AndroidPaths = v - return s -} - -// SetDeviceHostPaths sets the DeviceHostPaths field's value. -func (s *CustomerArtifactPaths) SetDeviceHostPaths(v []*string) *CustomerArtifactPaths { - s.DeviceHostPaths = v - return s -} - -// SetIosPaths sets the IosPaths field's value. -func (s *CustomerArtifactPaths) SetIosPaths(v []*string) *CustomerArtifactPaths { - s.IosPaths = v - return s -} - -// Represents a request to the delete device pool operation. -type DeleteDevicePoolInput struct { - _ struct{} `type:"structure"` - - // Represents the Amazon Resource Name (ARN) of the Device Farm device pool - // you wish to delete. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDevicePoolInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDevicePoolInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDevicePoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDevicePoolInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *DeleteDevicePoolInput) SetArn(v string) *DeleteDevicePoolInput { - s.Arn = &v - return s -} - -// Represents the result of a delete device pool request. -type DeleteDevicePoolOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDevicePoolOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDevicePoolOutput) GoString() string { - return s.String() -} - -type DeleteInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the instance profile you are requesting - // to delete. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceProfileInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *DeleteInstanceProfileInput) SetArn(v string) *DeleteInstanceProfileInput { - s.Arn = &v - return s -} - -type DeleteInstanceProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInstanceProfileOutput) GoString() string { - return s.String() -} - -type DeleteNetworkProfileInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the network profile you want to delete. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteNetworkProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNetworkProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNetworkProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkProfileInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *DeleteNetworkProfileInput) SetArn(v string) *DeleteNetworkProfileInput { - s.Arn = &v - return s -} - -type DeleteNetworkProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteNetworkProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNetworkProfileOutput) GoString() string { - return s.String() -} - -// Represents a request to the delete project operation. -type DeleteProjectInput struct { - _ struct{} `type:"structure"` - - // Represents the Amazon Resource Name (ARN) of the Device Farm project you - // wish to delete. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteProjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteProjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteProjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteProjectInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *DeleteProjectInput) SetArn(v string) *DeleteProjectInput { - s.Arn = &v - return s -} - -// Represents the result of a delete project request. -type DeleteProjectOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteProjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteProjectOutput) GoString() string { - return s.String() -} - -// Represents the request to delete the specified remote access session. -type DeleteRemoteAccessSessionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the sesssion for which you want to delete - // remote access. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRemoteAccessSessionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRemoteAccessSessionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRemoteAccessSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRemoteAccessSessionInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *DeleteRemoteAccessSessionInput) SetArn(v string) *DeleteRemoteAccessSessionInput { - s.Arn = &v - return s -} - -// The response from the server when a request is made to delete the remote -// access session. -type DeleteRemoteAccessSessionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRemoteAccessSessionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRemoteAccessSessionOutput) GoString() string { - return s.String() -} - -// Represents a request to the delete run operation. -type DeleteRunInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the run you wish to delete. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRunInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRunInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRunInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRunInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *DeleteRunInput) SetArn(v string) *DeleteRunInput { - s.Arn = &v - return s -} - -// Represents the result of a delete run request. -type DeleteRunOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRunOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRunOutput) GoString() string { - return s.String() -} - -// Represents a request to the delete upload operation. -type DeleteUploadInput struct { - _ struct{} `type:"structure"` - - // Represents the Amazon Resource Name (ARN) of the Device Farm upload you wish - // to delete. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteUploadInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUploadInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUploadInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *DeleteUploadInput) SetArn(v string) *DeleteUploadInput { - s.Arn = &v - return s -} - -// Represents the result of a delete upload request. -type DeleteUploadOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteUploadOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUploadOutput) GoString() string { - return s.String() -} - -type DeleteVPCEConfigurationInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want - // to delete. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVPCEConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVPCEConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVPCEConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVPCEConfigurationInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *DeleteVPCEConfigurationInput) SetArn(v string) *DeleteVPCEConfigurationInput { - s.Arn = &v - return s -} - -type DeleteVPCEConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteVPCEConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVPCEConfigurationOutput) GoString() string { - return s.String() -} - -// Represents a device type that an app is tested against. -type Device struct { - _ struct{} `type:"structure"` - - // The device's ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // Reflects how likely a device will be available for a test run. It is currently - // available in the ListDevices and GetDevice API methods. - Availability *string `locationName:"availability" type:"string" enum:"DeviceAvailability"` - - // The device's carrier. - Carrier *string `locationName:"carrier" type:"string"` - - // Information about the device's CPU. - Cpu *CPU `locationName:"cpu" type:"structure"` - - // The name of the fleet to which this device belongs. - FleetName *string `locationName:"fleetName" type:"string"` - - // The type of fleet to which this device belongs. Possible values for fleet - // type are PRIVATE and PUBLIC. - FleetType *string `locationName:"fleetType" type:"string"` - - // The device's form factor. - // - // Allowed values include: - // - // * PHONE: The phone form factor. - // - // * TABLET: The tablet form factor. - FormFactor *string `locationName:"formFactor" type:"string" enum:"DeviceFormFactor"` - - // The device's heap size, expressed in bytes. - HeapSize *int64 `locationName:"heapSize" type:"long"` - - // The device's image name. - Image *string `locationName:"image" type:"string"` - - // The instances belonging to this device. - Instances []*DeviceInstance `locationName:"instances" type:"list"` - - // The device's manufacturer name. - Manufacturer *string `locationName:"manufacturer" type:"string"` - - // The device's total memory size, expressed in bytes. - Memory *int64 `locationName:"memory" type:"long"` - - // The device's model name. - Model *string `locationName:"model" type:"string"` - - // The device's model ID. - ModelId *string `locationName:"modelId" type:"string"` - - // The device's display name. - Name *string `locationName:"name" type:"string"` - - // The device's operating system type. - Os *string `locationName:"os" type:"string"` - - // The device's platform. - // - // Allowed values include: - // - // * ANDROID: The Android platform. - // - // * IOS: The iOS platform. - Platform *string `locationName:"platform" type:"string" enum:"DevicePlatform"` - - // The device's radio. - Radio *string `locationName:"radio" type:"string"` - - // Specifies whether remote access has been enabled for the specified device. - RemoteAccessEnabled *bool `locationName:"remoteAccessEnabled" type:"boolean"` - - // This flag is set to true if remote debugging is enabled for the device. - RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"` - - // The resolution of the device. - Resolution *Resolution `locationName:"resolution" type:"structure"` -} - -// 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() -} - -// SetArn sets the Arn field's value. -func (s *Device) SetArn(v string) *Device { - s.Arn = &v - return s -} - -// SetAvailability sets the Availability field's value. -func (s *Device) SetAvailability(v string) *Device { - s.Availability = &v - return s -} - -// SetCarrier sets the Carrier field's value. -func (s *Device) SetCarrier(v string) *Device { - s.Carrier = &v - return s -} - -// SetCpu sets the Cpu field's value. -func (s *Device) SetCpu(v *CPU) *Device { - s.Cpu = v - return s -} - -// SetFleetName sets the FleetName field's value. -func (s *Device) SetFleetName(v string) *Device { - s.FleetName = &v - return s -} - -// SetFleetType sets the FleetType field's value. -func (s *Device) SetFleetType(v string) *Device { - s.FleetType = &v - return s -} - -// SetFormFactor sets the FormFactor field's value. -func (s *Device) SetFormFactor(v string) *Device { - s.FormFactor = &v - return s -} - -// SetHeapSize sets the HeapSize field's value. -func (s *Device) SetHeapSize(v int64) *Device { - s.HeapSize = &v - return s -} - -// SetImage sets the Image field's value. -func (s *Device) SetImage(v string) *Device { - s.Image = &v - return s -} - -// SetInstances sets the Instances field's value. -func (s *Device) SetInstances(v []*DeviceInstance) *Device { - s.Instances = v - return s -} - -// SetManufacturer sets the Manufacturer field's value. -func (s *Device) SetManufacturer(v string) *Device { - s.Manufacturer = &v - return s -} - -// SetMemory sets the Memory field's value. -func (s *Device) SetMemory(v int64) *Device { - s.Memory = &v - return s -} - -// SetModel sets the Model field's value. -func (s *Device) SetModel(v string) *Device { - s.Model = &v - return s -} - -// SetModelId sets the ModelId field's value. -func (s *Device) SetModelId(v string) *Device { - s.ModelId = &v - return s -} - -// SetName sets the Name field's value. -func (s *Device) SetName(v string) *Device { - s.Name = &v - return s -} - -// SetOs sets the Os field's value. -func (s *Device) SetOs(v string) *Device { - s.Os = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *Device) SetPlatform(v string) *Device { - s.Platform = &v - return s -} - -// SetRadio sets the Radio field's value. -func (s *Device) SetRadio(v string) *Device { - s.Radio = &v - return s -} - -// SetRemoteAccessEnabled sets the RemoteAccessEnabled field's value. -func (s *Device) SetRemoteAccessEnabled(v bool) *Device { - s.RemoteAccessEnabled = &v - return s -} - -// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. -func (s *Device) SetRemoteDebugEnabled(v bool) *Device { - s.RemoteDebugEnabled = &v - return s -} - -// SetResolution sets the Resolution field's value. -func (s *Device) SetResolution(v *Resolution) *Device { - s.Resolution = v - return s -} - -// Represents a device filter used to select a set of devices to be included -// in a test run. This data structure is passed in as the deviceSelectionConfiguration -// parameter to ScheduleRun. For an example of the JSON request syntax, see -// ScheduleRun. -// -// It is also passed in as the filters parameter to ListDevices. For an example -// of the JSON request syntax, see ListDevices. -type DeviceFilter struct { - _ struct{} `type:"structure"` - - // The aspect of a device such as platform or model used as the selection criteria - // in a device filter. - // - // The supported operators for each attribute are provided in the following - // list. - // - // ARNThe Amazon Resource Name (ARN) of the device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". - // - // Supported operators: EQUALS, IN, NOT_IN - // - // PLATFORMThe device platform. Valid values are "ANDROID" or "IOS". - // - // Supported operators: EQUALS - // - // OS_VERSIONThe operating system version. For example, "10.3.2". - // - // Supported operators: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS, IN, LESS_THAN, - // LESS_THAN_OR_EQUALS, NOT_IN - // - // MODELThe device model. For example, "iPad 5th Gen". - // - // Supported operators: CONTAINS, EQUALS, IN, NOT_IN - // - // AVAILABILITYThe current availability of the device. Valid values are "AVAILABLE", - // "HIGHLY_AVAILABLE", "BUSY", or "TEMPORARY_NOT_AVAILABLE". - // - // Supported operators: EQUALS - // - // FORM_FACTORThe device form factor. Valid values are "PHONE" or "TABLET". - // - // Supported operators: EQUALS - // - // MANUFACTURERThe device manufacturer. For example, "Apple". - // - // Supported operators: EQUALS, IN, NOT_IN - // - // REMOTE_ACCESS_ENABLEDWhether the device is enabled for remote access. Valid - // values are "TRUE" or "FALSE". - // - // Supported operators: EQUALS - // - // REMOTE_DEBUG_ENABLEDWhether the device is enabled for remote debugging. Valid - // values are "TRUE" or "FALSE". - // - // Supported operators: EQUALS - // - // INSTANCE_ARNThe Amazon Resource Name (ARN) of the device instance. - // - // Supported operators: EQUALS, IN, NOT_IN - // - // INSTANCE_LABELSThe label of the device instance. - // - // Supported operators: CONTAINS - // - // FLEET_TYPEThe fleet type. Valid values are "PUBLIC" or "PRIVATE". - // - // Supported operators: EQUALS - Attribute *string `locationName:"attribute" type:"string" enum:"DeviceFilterAttribute"` - - // Specifies how Device Farm compares the filter's attribute to the value. For - // the operators that are supported by each attribute, see the attribute descriptions. - Operator *string `locationName:"operator" type:"string" enum:"RuleOperator"` - - // An array of one or more filter values used in a device filter. - // - // Operator Values - // - // * The IN and NOT_IN operators can take a values array that has more than - // one element. - // - // * The other operators require an array with a single element. - // - // Attribute Values - // - // * The PLATFORM attribute can be set to "ANDROID" or "IOS". - // - // * The AVAILABILITY attribute can be set to "AVAILABLE", "HIGHLY_AVAILABLE", - // "BUSY", or "TEMPORARY_NOT_AVAILABLE". - // - // * The FORM_FACTOR attribute can be set to "PHONE" or "TABLET". - // - // * The FLEET_TYPE attribute can be set to "PUBLIC" or "PRIVATE". - Values []*string `locationName:"values" type:"list"` -} - -// String returns the string representation -func (s DeviceFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeviceFilter) GoString() string { - return s.String() -} - -// SetAttribute sets the Attribute field's value. -func (s *DeviceFilter) SetAttribute(v string) *DeviceFilter { - s.Attribute = &v - return s -} - -// SetOperator sets the Operator field's value. -func (s *DeviceFilter) SetOperator(v string) *DeviceFilter { - s.Operator = &v - return s -} - -// SetValues sets the Values field's value. -func (s *DeviceFilter) SetValues(v []*string) *DeviceFilter { - s.Values = v - return s -} - -// Represents the device instance. -type DeviceInstance struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the device instance. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The Amazon Resource Name (ARN) of the device. - DeviceArn *string `locationName:"deviceArn" min:"32" type:"string"` - - // A object containing information about the instance profile. - InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` - - // An array of strings describing the device instance. - Labels []*string `locationName:"labels" type:"list"` - - // The status of the device instance. Valid values are listed below. - Status *string `locationName:"status" type:"string" enum:"InstanceStatus"` - - // Unique device identifier for the device instance. - Udid *string `locationName:"udid" type:"string"` -} - -// String returns the string representation -func (s DeviceInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeviceInstance) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DeviceInstance) SetArn(v string) *DeviceInstance { - s.Arn = &v - return s -} - -// SetDeviceArn sets the DeviceArn field's value. -func (s *DeviceInstance) SetDeviceArn(v string) *DeviceInstance { - s.DeviceArn = &v - return s -} - -// SetInstanceProfile sets the InstanceProfile field's value. -func (s *DeviceInstance) SetInstanceProfile(v *InstanceProfile) *DeviceInstance { - s.InstanceProfile = v - return s -} - -// SetLabels sets the Labels field's value. -func (s *DeviceInstance) SetLabels(v []*string) *DeviceInstance { - s.Labels = v - return s -} - -// SetStatus sets the Status field's value. -func (s *DeviceInstance) SetStatus(v string) *DeviceInstance { - s.Status = &v - return s -} - -// SetUdid sets the Udid field's value. -func (s *DeviceInstance) SetUdid(v string) *DeviceInstance { - s.Udid = &v - return s -} - -// Represents the total (metered or unmetered) minutes used by the resource -// to run tests. Contains the sum of minutes consumed by all children. -type DeviceMinutes struct { - _ struct{} `type:"structure"` - - // When specified, represents only the sum of metered minutes used by the resource - // to run tests. - Metered *float64 `locationName:"metered" type:"double"` - - // When specified, represents the total minutes used by the resource to run - // tests. - Total *float64 `locationName:"total" type:"double"` - - // When specified, represents only the sum of unmetered minutes used by the - // resource to run tests. - Unmetered *float64 `locationName:"unmetered" type:"double"` -} - -// String returns the string representation -func (s DeviceMinutes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeviceMinutes) GoString() string { - return s.String() -} - -// SetMetered sets the Metered field's value. -func (s *DeviceMinutes) SetMetered(v float64) *DeviceMinutes { - s.Metered = &v - return s -} - -// SetTotal sets the Total field's value. -func (s *DeviceMinutes) SetTotal(v float64) *DeviceMinutes { - s.Total = &v - return s -} - -// SetUnmetered sets the Unmetered field's value. -func (s *DeviceMinutes) SetUnmetered(v float64) *DeviceMinutes { - s.Unmetered = &v - return s -} - -// Represents a collection of device types. -type DevicePool struct { - _ struct{} `type:"structure"` - - // The device pool's ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The device pool's description. - Description *string `locationName:"description" type:"string"` - - // The number of devices that Device Farm can add to your device pool. Device - // Farm adds devices that are available and that meet the criteria that you - // assign for the rules parameter. Depending on how many devices meet these - // constraints, your device pool might contain fewer devices than the value - // for this parameter. - // - // By specifying the maximum number of devices, you can control the costs that - // you incur by running tests. - MaxDevices *int64 `locationName:"maxDevices" type:"integer"` - - // The device pool's name. - Name *string `locationName:"name" type:"string"` - - // Information about the device pool's rules. - Rules []*Rule `locationName:"rules" type:"list"` - - // The device pool's type. - // - // Allowed values include: - // - // * CURATED: A device pool that is created and managed by AWS Device Farm. - // - // * PRIVATE: A device pool that is created and managed by the device pool - // developer. - Type *string `locationName:"type" type:"string" enum:"DevicePoolType"` -} - -// String returns the string representation -func (s DevicePool) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DevicePool) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DevicePool) SetArn(v string) *DevicePool { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DevicePool) SetDescription(v string) *DevicePool { - s.Description = &v - return s -} - -// SetMaxDevices sets the MaxDevices field's value. -func (s *DevicePool) SetMaxDevices(v int64) *DevicePool { - s.MaxDevices = &v - return s -} - -// SetName sets the Name field's value. -func (s *DevicePool) SetName(v string) *DevicePool { - s.Name = &v - return s -} - -// SetRules sets the Rules field's value. -func (s *DevicePool) SetRules(v []*Rule) *DevicePool { - s.Rules = v - return s -} - -// SetType sets the Type field's value. -func (s *DevicePool) SetType(v string) *DevicePool { - s.Type = &v - return s -} - -// Represents a device pool compatibility result. -type DevicePoolCompatibilityResult struct { - _ struct{} `type:"structure"` - - // Whether the result was compatible with the device pool. - Compatible *bool `locationName:"compatible" type:"boolean"` - - // The device (phone or tablet) that you wish to return information about. - Device *Device `locationName:"device" type:"structure"` - - // Information about the compatibility. - IncompatibilityMessages []*IncompatibilityMessage `locationName:"incompatibilityMessages" type:"list"` -} - -// String returns the string representation -func (s DevicePoolCompatibilityResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DevicePoolCompatibilityResult) GoString() string { - return s.String() -} - -// SetCompatible sets the Compatible field's value. -func (s *DevicePoolCompatibilityResult) SetCompatible(v bool) *DevicePoolCompatibilityResult { - s.Compatible = &v - return s -} - -// SetDevice sets the Device field's value. -func (s *DevicePoolCompatibilityResult) SetDevice(v *Device) *DevicePoolCompatibilityResult { - s.Device = v - return s -} - -// SetIncompatibilityMessages sets the IncompatibilityMessages field's value. -func (s *DevicePoolCompatibilityResult) SetIncompatibilityMessages(v []*IncompatibilityMessage) *DevicePoolCompatibilityResult { - s.IncompatibilityMessages = v - return s -} - -// Represents the device filters used in a test run as well as the maximum number -// of devices to be included in the run. It is passed in as the deviceSelectionConfiguration -// request parameter in ScheduleRun. -type DeviceSelectionConfiguration struct { - _ struct{} `type:"structure"` - - // Used to dynamically select a set of devices for a test run. A filter is made - // up of an attribute, an operator, and one or more values. - // - // * Attribute - // - // The aspect of a device such as platform or model used as the selection criteria - // in a device filter. - // - // Allowed values include: - // - // ARN: The Amazon Resource Name (ARN) of the device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". - // - // PLATFORM: The device platform. Valid values are "ANDROID" or "IOS". - // - // OS_VERSION: The operating system version. For example, "10.3.2". - // - // MODEL: The device model. For example, "iPad 5th Gen". - // - // AVAILABILITY: The current availability of the device. Valid values are "AVAILABLE", - // "HIGHLY_AVAILABLE", "BUSY", or "TEMPORARY_NOT_AVAILABLE". - // - // FORM_FACTOR: The device form factor. Valid values are "PHONE" or "TABLET". - // - // MANUFACTURER: The device manufacturer. For example, "Apple". - // - // REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. Valid - // values are "TRUE" or "FALSE". - // - // REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. - // Valid values are "TRUE" or "FALSE". - // - // INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance. - // - // INSTANCE_LABELS: The label of the device instance. - // - // FLEET_TYPE: The fleet type. Valid values are "PUBLIC" or "PRIVATE". - // - // * Operator - // - // The filter operator. - // - // The EQUALS operator is available for every attribute except INSTANCE_LABELS. - // - // The CONTAINS operator is available for the INSTANCE_LABELS and MODEL attributes. - // - // The IN and NOT_IN operators are available for the ARN, OS_VERSION, MODEL, - // MANUFACTURER, and INSTANCE_ARN attributes. - // - // The LESS_THAN, GREATER_THAN, LESS_THAN_OR_EQUALS, and GREATER_THAN_OR_EQUALS - // operators are also available for the OS_VERSION attribute. - // - // * Values - // - // An array of one or more filter values. - // - // Operator Values - // - // The IN and NOT_IN operators can take a values array that has more than one - // element. - // - // The other operators require an array with a single element. - // - // Attribute Values - // - // The PLATFORM attribute can be set to "ANDROID" or "IOS". - // - // The AVAILABILITY attribute can be set to "AVAILABLE", "HIGHLY_AVAILABLE", - // "BUSY", or "TEMPORARY_NOT_AVAILABLE". - // - // The FORM_FACTOR attribute can be set to "PHONE" or "TABLET". - // - // The FLEET_TYPE attribute can be set to "PUBLIC" or "PRIVATE". - // - // Filters is a required field - Filters []*DeviceFilter `locationName:"filters" type:"list" required:"true"` - - // The maximum number of devices to be included in a test run. - // - // MaxDevices is a required field - MaxDevices *int64 `locationName:"maxDevices" type:"integer" required:"true"` -} - -// String returns the string representation -func (s DeviceSelectionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeviceSelectionConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeviceSelectionConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeviceSelectionConfiguration"} - if s.Filters == nil { - invalidParams.Add(request.NewErrParamRequired("Filters")) - } - if s.MaxDevices == nil { - invalidParams.Add(request.NewErrParamRequired("MaxDevices")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DeviceSelectionConfiguration) SetFilters(v []*DeviceFilter) *DeviceSelectionConfiguration { - s.Filters = v - return s -} - -// SetMaxDevices sets the MaxDevices field's value. -func (s *DeviceSelectionConfiguration) SetMaxDevices(v int64) *DeviceSelectionConfiguration { - s.MaxDevices = &v - return s -} - -// Contains the run results requested by the device selection configuration -// as well as how many devices were returned. For an example of the JSON response -// syntax, see ScheduleRun. -type DeviceSelectionResult struct { - _ struct{} `type:"structure"` - - // The filters in a device selection result. - Filters []*DeviceFilter `locationName:"filters" type:"list"` - - // The number of devices that matched the device filter selection criteria. - MatchedDevicesCount *int64 `locationName:"matchedDevicesCount" type:"integer"` - - // The maximum number of devices to be selected by a device filter and included - // in a test run. - MaxDevices *int64 `locationName:"maxDevices" type:"integer"` -} - -// String returns the string representation -func (s DeviceSelectionResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeviceSelectionResult) GoString() string { - return s.String() -} - -// SetFilters sets the Filters field's value. -func (s *DeviceSelectionResult) SetFilters(v []*DeviceFilter) *DeviceSelectionResult { - s.Filters = v - return s -} - -// SetMatchedDevicesCount sets the MatchedDevicesCount field's value. -func (s *DeviceSelectionResult) SetMatchedDevicesCount(v int64) *DeviceSelectionResult { - s.MatchedDevicesCount = &v - return s -} - -// SetMaxDevices sets the MaxDevices field's value. -func (s *DeviceSelectionResult) SetMaxDevices(v int64) *DeviceSelectionResult { - s.MaxDevices = &v - return s -} - -// Represents configuration information about a test run, such as the execution -// timeout (in minutes). -type ExecutionConfiguration struct { - _ struct{} `type:"structure"` - - // True if account cleanup is enabled at the beginning of the test; otherwise, - // false. - AccountsCleanup *bool `locationName:"accountsCleanup" type:"boolean"` - - // True if app package cleanup is enabled at the beginning of the test; otherwise, - // false. - AppPackagesCleanup *bool `locationName:"appPackagesCleanup" type:"boolean"` - - // The number of minutes a test run will execute before it times out. - JobTimeoutMinutes *int64 `locationName:"jobTimeoutMinutes" type:"integer"` - - // When set to true, for private devices, Device Farm will not sign your app - // again. For public devices, Device Farm always signs your apps again and this - // parameter has no effect. - // - // For more information about how Device Farm re-signs your app(s), see Do you - // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device - // Farm FAQs. - SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` - - // Set to true to enable video capture; otherwise, set to false. The default - // is true. - VideoCapture *bool `locationName:"videoCapture" type:"boolean"` -} - -// String returns the string representation -func (s ExecutionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecutionConfiguration) GoString() string { - return s.String() -} - -// SetAccountsCleanup sets the AccountsCleanup field's value. -func (s *ExecutionConfiguration) SetAccountsCleanup(v bool) *ExecutionConfiguration { - s.AccountsCleanup = &v - return s -} - -// SetAppPackagesCleanup sets the AppPackagesCleanup field's value. -func (s *ExecutionConfiguration) SetAppPackagesCleanup(v bool) *ExecutionConfiguration { - s.AppPackagesCleanup = &v - return s -} - -// SetJobTimeoutMinutes sets the JobTimeoutMinutes field's value. -func (s *ExecutionConfiguration) SetJobTimeoutMinutes(v int64) *ExecutionConfiguration { - s.JobTimeoutMinutes = &v - return s -} - -// SetSkipAppResign sets the SkipAppResign field's value. -func (s *ExecutionConfiguration) SetSkipAppResign(v bool) *ExecutionConfiguration { - s.SkipAppResign = &v - return s -} - -// SetVideoCapture sets the VideoCapture field's value. -func (s *ExecutionConfiguration) SetVideoCapture(v bool) *ExecutionConfiguration { - s.VideoCapture = &v - return s -} - -// Represents the request sent to retrieve the account settings. -type GetAccountSettingsInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetAccountSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAccountSettingsInput) GoString() string { - return s.String() -} - -// Represents the account settings return values from the GetAccountSettings -// request. -type GetAccountSettingsOutput struct { - _ struct{} `type:"structure"` - - // The account settings. - AccountSettings *AccountSettings `locationName:"accountSettings" type:"structure"` -} - -// String returns the string representation -func (s GetAccountSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAccountSettingsOutput) GoString() string { - return s.String() -} - -// SetAccountSettings sets the AccountSettings field's value. -func (s *GetAccountSettingsOutput) SetAccountSettings(v *AccountSettings) *GetAccountSettingsOutput { - s.AccountSettings = v - return s -} - -// Represents a request to the get device request. -type GetDeviceInput struct { - _ struct{} `type:"structure"` - - // The device type's ARN. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeviceInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetDeviceInput) SetArn(v string) *GetDeviceInput { - s.Arn = &v - return s -} - -type GetDeviceInstanceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the instance you're requesting information - // about. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDeviceInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeviceInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeviceInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeviceInstanceInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetDeviceInstanceInput) SetArn(v string) *GetDeviceInstanceInput { - s.Arn = &v - return s -} - -type GetDeviceInstanceOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about your device instance. - DeviceInstance *DeviceInstance `locationName:"deviceInstance" type:"structure"` -} - -// String returns the string representation -func (s GetDeviceInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeviceInstanceOutput) GoString() string { - return s.String() -} - -// SetDeviceInstance sets the DeviceInstance field's value. -func (s *GetDeviceInstanceOutput) SetDeviceInstance(v *DeviceInstance) *GetDeviceInstanceOutput { - s.DeviceInstance = v - return s -} - -// Represents the result of a get device request. -type GetDeviceOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about the requested device. - Device *Device `locationName:"device" type:"structure"` -} - -// String returns the string representation -func (s GetDeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeviceOutput) GoString() string { - return s.String() -} - -// SetDevice sets the Device field's value. -func (s *GetDeviceOutput) SetDevice(v *Device) *GetDeviceOutput { - s.Device = v - return s -} - -// Represents a request to the get device pool compatibility operation. -type GetDevicePoolCompatibilityInput struct { - _ struct{} `type:"structure"` - - // The ARN of the app that is associated with the specified device pool. - AppArn *string `locationName:"appArn" min:"32" type:"string"` - - // An object containing information about the settings for a run. - Configuration *ScheduleRunConfiguration `locationName:"configuration" type:"structure"` - - // The device pool's ARN. - // - // DevicePoolArn is a required field - DevicePoolArn *string `locationName:"devicePoolArn" min:"32" type:"string" required:"true"` - - // Information about the uploaded test to be run against the device pool. - Test *ScheduleRunTest `locationName:"test" type:"structure"` - - // The test type for the specified device pool. - // - // Allowed values include the following: - // - // * BUILTIN_FUZZ: The built-in fuzz type. - // - // * BUILTIN_EXPLORER: For Android, an app explorer that will traverse an - // Android app, interacting with it and capturing screenshots at the same - // time. - // - // * APPIUM_JAVA_JUNIT: The Appium Java JUnit type. - // - // * APPIUM_JAVA_TESTNG: The Appium Java TestNG type. - // - // * APPIUM_PYTHON: The Appium Python type. - // - // * APPIUM_NODE: The Appium Node.js type. - // - // * APPIUM_RUBY: The Appium Ruby type. - // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. - // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. - // - // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. - // - // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. - // - // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. - // - // * CALABASH: The Calabash type. - // - // * INSTRUMENTATION: The Instrumentation type. - // - // * UIAUTOMATION: The uiautomation type. - // - // * UIAUTOMATOR: The uiautomator type. - // - // * XCTEST: The XCode test type. - // - // * XCTEST_UI: The XCode UI test type. - TestType *string `locationName:"testType" type:"string" enum:"TestType"` -} - -// String returns the string representation -func (s GetDevicePoolCompatibilityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDevicePoolCompatibilityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDevicePoolCompatibilityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDevicePoolCompatibilityInput"} - if s.AppArn != nil && len(*s.AppArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("AppArn", 32)) - } - if s.DevicePoolArn == nil { - invalidParams.Add(request.NewErrParamRequired("DevicePoolArn")) - } - if s.DevicePoolArn != nil && len(*s.DevicePoolArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("DevicePoolArn", 32)) - } - if s.Configuration != nil { - if err := s.Configuration.Validate(); err != nil { - invalidParams.AddNested("Configuration", err.(request.ErrInvalidParams)) - } - } - if s.Test != nil { - if err := s.Test.Validate(); err != nil { - invalidParams.AddNested("Test", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAppArn sets the AppArn field's value. -func (s *GetDevicePoolCompatibilityInput) SetAppArn(v string) *GetDevicePoolCompatibilityInput { - s.AppArn = &v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *GetDevicePoolCompatibilityInput) SetConfiguration(v *ScheduleRunConfiguration) *GetDevicePoolCompatibilityInput { - s.Configuration = v - return s -} - -// SetDevicePoolArn sets the DevicePoolArn field's value. -func (s *GetDevicePoolCompatibilityInput) SetDevicePoolArn(v string) *GetDevicePoolCompatibilityInput { - s.DevicePoolArn = &v - return s -} - -// SetTest sets the Test field's value. -func (s *GetDevicePoolCompatibilityInput) SetTest(v *ScheduleRunTest) *GetDevicePoolCompatibilityInput { - s.Test = v - return s -} - -// SetTestType sets the TestType field's value. -func (s *GetDevicePoolCompatibilityInput) SetTestType(v string) *GetDevicePoolCompatibilityInput { - s.TestType = &v - return s -} - -// Represents the result of describe device pool compatibility request. -type GetDevicePoolCompatibilityOutput struct { - _ struct{} `type:"structure"` - - // Information about compatible devices. - CompatibleDevices []*DevicePoolCompatibilityResult `locationName:"compatibleDevices" type:"list"` - - // Information about incompatible devices. - IncompatibleDevices []*DevicePoolCompatibilityResult `locationName:"incompatibleDevices" type:"list"` -} - -// String returns the string representation -func (s GetDevicePoolCompatibilityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDevicePoolCompatibilityOutput) GoString() string { - return s.String() -} - -// SetCompatibleDevices sets the CompatibleDevices field's value. -func (s *GetDevicePoolCompatibilityOutput) SetCompatibleDevices(v []*DevicePoolCompatibilityResult) *GetDevicePoolCompatibilityOutput { - s.CompatibleDevices = v - return s -} - -// SetIncompatibleDevices sets the IncompatibleDevices field's value. -func (s *GetDevicePoolCompatibilityOutput) SetIncompatibleDevices(v []*DevicePoolCompatibilityResult) *GetDevicePoolCompatibilityOutput { - s.IncompatibleDevices = v - return s -} - -// Represents a request to the get device pool operation. -type GetDevicePoolInput struct { - _ struct{} `type:"structure"` - - // The device pool's ARN. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDevicePoolInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDevicePoolInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDevicePoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDevicePoolInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetDevicePoolInput) SetArn(v string) *GetDevicePoolInput { - s.Arn = &v - return s -} - -// Represents the result of a get device pool request. -type GetDevicePoolOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about the requested device pool. - DevicePool *DevicePool `locationName:"devicePool" type:"structure"` -} - -// String returns the string representation -func (s GetDevicePoolOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDevicePoolOutput) GoString() string { - return s.String() -} - -// SetDevicePool sets the DevicePool field's value. -func (s *GetDevicePoolOutput) SetDevicePool(v *DevicePool) *GetDevicePoolOutput { - s.DevicePool = v - return s -} - -type GetInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of your instance profile. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceProfileInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetInstanceProfileInput) SetArn(v string) *GetInstanceProfileInput { - s.Arn = &v - return s -} - -type GetInstanceProfileOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about your instance profile. - InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` -} - -// String returns the string representation -func (s GetInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceProfileOutput) GoString() string { - return s.String() -} - -// SetInstanceProfile sets the InstanceProfile field's value. -func (s *GetInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *GetInstanceProfileOutput { - s.InstanceProfile = v - return s -} - -// Represents a request to the get job operation. -type GetJobInput struct { - _ struct{} `type:"structure"` - - // The job's ARN. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetJobInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetJobInput) SetArn(v string) *GetJobInput { - s.Arn = &v - return s -} - -// Represents the result of a get job request. -type GetJobOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about the requested job. - Job *Job `locationName:"job" type:"structure"` -} - -// String returns the string representation -func (s GetJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobOutput) GoString() string { - return s.String() -} - -// SetJob sets the Job field's value. -func (s *GetJobOutput) SetJob(v *Job) *GetJobOutput { - s.Job = v - return s -} - -type GetNetworkProfileInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the network profile you want to return - // information about. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetNetworkProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetNetworkProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetNetworkProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetNetworkProfileInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetNetworkProfileInput) SetArn(v string) *GetNetworkProfileInput { - s.Arn = &v - return s -} - -type GetNetworkProfileOutput struct { - _ struct{} `type:"structure"` - - // The network profile. - NetworkProfile *NetworkProfile `locationName:"networkProfile" type:"structure"` -} - -// String returns the string representation -func (s GetNetworkProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetNetworkProfileOutput) GoString() string { - return s.String() -} - -// SetNetworkProfile sets the NetworkProfile field's value. -func (s *GetNetworkProfileOutput) SetNetworkProfile(v *NetworkProfile) *GetNetworkProfileOutput { - s.NetworkProfile = v - return s -} - -// Represents the request to retrieve the offering status for the specified -// customer or account. -type GetOfferingStatusInput struct { - _ struct{} `type:"structure"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s GetOfferingStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOfferingStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOfferingStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOfferingStatusInput"} - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *GetOfferingStatusInput) SetNextToken(v string) *GetOfferingStatusInput { - s.NextToken = &v - return s -} - -// Returns the status result for a device offering. -type GetOfferingStatusOutput struct { - _ struct{} `type:"structure"` - - // When specified, gets the offering status for the current period. - Current map[string]*OfferingStatus `locationName:"current" type:"map"` - - // When specified, gets the offering status for the next period. - NextPeriod map[string]*OfferingStatus `locationName:"nextPeriod" type:"map"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s GetOfferingStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOfferingStatusOutput) GoString() string { - return s.String() -} - -// SetCurrent sets the Current field's value. -func (s *GetOfferingStatusOutput) SetCurrent(v map[string]*OfferingStatus) *GetOfferingStatusOutput { - s.Current = v - return s -} - -// SetNextPeriod sets the NextPeriod field's value. -func (s *GetOfferingStatusOutput) SetNextPeriod(v map[string]*OfferingStatus) *GetOfferingStatusOutput { - s.NextPeriod = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetOfferingStatusOutput) SetNextToken(v string) *GetOfferingStatusOutput { - s.NextToken = &v - return s -} - -// Represents a request to the get project operation. -type GetProjectInput struct { - _ struct{} `type:"structure"` - - // The project's ARN. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetProjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetProjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetProjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetProjectInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetProjectInput) SetArn(v string) *GetProjectInput { - s.Arn = &v - return s -} - -// Represents the result of a get project request. -type GetProjectOutput struct { - _ struct{} `type:"structure"` - - // The project you wish to get information about. - Project *Project `locationName:"project" type:"structure"` -} - -// String returns the string representation -func (s GetProjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetProjectOutput) GoString() string { - return s.String() -} - -// SetProject sets the Project field's value. -func (s *GetProjectOutput) SetProject(v *Project) *GetProjectOutput { - s.Project = v - return s -} - -// Represents the request to get information about the specified remote access -// session. -type GetRemoteAccessSessionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the remote access session about which you - // want to get session information. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRemoteAccessSessionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRemoteAccessSessionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRemoteAccessSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRemoteAccessSessionInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetRemoteAccessSessionInput) SetArn(v string) *GetRemoteAccessSessionInput { - s.Arn = &v - return s -} - -// Represents the response from the server that lists detailed information about -// the remote access session. -type GetRemoteAccessSessionOutput struct { - _ struct{} `type:"structure"` - - // A container that lists detailed information about the remote access session. - RemoteAccessSession *RemoteAccessSession `locationName:"remoteAccessSession" type:"structure"` -} - -// String returns the string representation -func (s GetRemoteAccessSessionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRemoteAccessSessionOutput) GoString() string { - return s.String() -} - -// SetRemoteAccessSession sets the RemoteAccessSession field's value. -func (s *GetRemoteAccessSessionOutput) SetRemoteAccessSession(v *RemoteAccessSession) *GetRemoteAccessSessionOutput { - s.RemoteAccessSession = v - return s -} - -// Represents a request to the get run operation. -type GetRunInput struct { - _ struct{} `type:"structure"` - - // The run's ARN. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRunInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRunInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRunInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRunInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetRunInput) SetArn(v string) *GetRunInput { - s.Arn = &v - return s -} - -// Represents the result of a get run request. -type GetRunOutput struct { - _ struct{} `type:"structure"` - - // The run you wish to get results from. - Run *Run `locationName:"run" type:"structure"` -} - -// String returns the string representation -func (s GetRunOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRunOutput) GoString() string { - return s.String() -} - -// SetRun sets the Run field's value. -func (s *GetRunOutput) SetRun(v *Run) *GetRunOutput { - s.Run = v - return s -} - -// Represents a request to the get suite operation. -type GetSuiteInput struct { - _ struct{} `type:"structure"` - - // The suite's ARN. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSuiteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSuiteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSuiteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSuiteInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetSuiteInput) SetArn(v string) *GetSuiteInput { - s.Arn = &v - return s -} - -// Represents the result of a get suite request. -type GetSuiteOutput struct { - _ struct{} `type:"structure"` - - // A collection of one or more tests. - Suite *Suite `locationName:"suite" type:"structure"` -} - -// String returns the string representation -func (s GetSuiteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSuiteOutput) GoString() string { - return s.String() -} - -// SetSuite sets the Suite field's value. -func (s *GetSuiteOutput) SetSuite(v *Suite) *GetSuiteOutput { - s.Suite = v - return s -} - -// Represents a request to the get test operation. -type GetTestInput struct { - _ struct{} `type:"structure"` - - // The test's ARN. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTestInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTestInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTestInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTestInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetTestInput) SetArn(v string) *GetTestInput { - s.Arn = &v - return s -} - -// Represents the result of a get test request. -type GetTestOutput struct { - _ struct{} `type:"structure"` - - // A test condition that is evaluated. - Test *Test `locationName:"test" type:"structure"` -} - -// String returns the string representation -func (s GetTestOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTestOutput) GoString() string { - return s.String() -} - -// SetTest sets the Test field's value. -func (s *GetTestOutput) SetTest(v *Test) *GetTestOutput { - s.Test = v - return s -} - -// Represents a request to the get upload operation. -type GetUploadInput struct { - _ struct{} `type:"structure"` - - // The upload's ARN. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetUploadInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUploadInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUploadInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetUploadInput) SetArn(v string) *GetUploadInput { - s.Arn = &v - return s -} - -// Represents the result of a get upload request. -type GetUploadOutput struct { - _ struct{} `type:"structure"` - - // An app or a set of one or more tests to upload or that have been uploaded. - Upload *Upload `locationName:"upload" type:"structure"` -} - -// String returns the string representation -func (s GetUploadOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUploadOutput) GoString() string { - return s.String() -} - -// SetUpload sets the Upload field's value. -func (s *GetUploadOutput) SetUpload(v *Upload) *GetUploadOutput { - s.Upload = v - return s -} - -type GetVPCEConfigurationInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want - // to describe. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetVPCEConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetVPCEConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetVPCEConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetVPCEConfigurationInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetVPCEConfigurationInput) SetArn(v string) *GetVPCEConfigurationInput { - s.Arn = &v - return s -} - -type GetVPCEConfigurationOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about your VPC endpoint configuration. - VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` -} - -// String returns the string representation -func (s GetVPCEConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetVPCEConfigurationOutput) GoString() string { - return s.String() -} - -// SetVpceConfiguration sets the VpceConfiguration field's value. -func (s *GetVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *GetVPCEConfigurationOutput { - s.VpceConfiguration = v - return s -} - -// Represents information about incompatibility. -type IncompatibilityMessage struct { - _ struct{} `type:"structure"` - - // A message about the incompatibility. - Message *string `locationName:"message" type:"string"` - - // The type of incompatibility. - // - // Allowed values include: - // - // * ARN: The ARN. - // - // * FORM_FACTOR: The form factor (for example, phone or tablet). - // - // * MANUFACTURER: The manufacturer. - // - // * PLATFORM: The platform (for example, Android or iOS). - // - // * REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. - // - // * APPIUM_VERSION: The Appium version for the test. - Type *string `locationName:"type" type:"string" enum:"DeviceAttribute"` -} - -// String returns the string representation -func (s IncompatibilityMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IncompatibilityMessage) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *IncompatibilityMessage) SetMessage(v string) *IncompatibilityMessage { - s.Message = &v - return s -} - -// SetType sets the Type field's value. -func (s *IncompatibilityMessage) SetType(v string) *IncompatibilityMessage { - s.Type = &v - return s -} - -// Represents the request to install an Android application (in .apk format) -// or an iOS application (in .ipa format) as part of a remote access session. -type InstallToRemoteAccessSessionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the app about which you are requesting - // information. - // - // AppArn is a required field - AppArn *string `locationName:"appArn" min:"32" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the remote access session about which you - // are requesting information. - // - // RemoteAccessSessionArn is a required field - RemoteAccessSessionArn *string `locationName:"remoteAccessSessionArn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s InstallToRemoteAccessSessionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstallToRemoteAccessSessionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstallToRemoteAccessSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstallToRemoteAccessSessionInput"} - if s.AppArn == nil { - invalidParams.Add(request.NewErrParamRequired("AppArn")) - } - if s.AppArn != nil && len(*s.AppArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("AppArn", 32)) - } - if s.RemoteAccessSessionArn == nil { - invalidParams.Add(request.NewErrParamRequired("RemoteAccessSessionArn")) - } - if s.RemoteAccessSessionArn != nil && len(*s.RemoteAccessSessionArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("RemoteAccessSessionArn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAppArn sets the AppArn field's value. -func (s *InstallToRemoteAccessSessionInput) SetAppArn(v string) *InstallToRemoteAccessSessionInput { - s.AppArn = &v - return s -} - -// SetRemoteAccessSessionArn sets the RemoteAccessSessionArn field's value. -func (s *InstallToRemoteAccessSessionInput) SetRemoteAccessSessionArn(v string) *InstallToRemoteAccessSessionInput { - s.RemoteAccessSessionArn = &v - return s -} - -// Represents the response from the server after AWS Device Farm makes a request -// to install to a remote access session. -type InstallToRemoteAccessSessionOutput struct { - _ struct{} `type:"structure"` - - // An app to upload or that has been uploaded. - AppUpload *Upload `locationName:"appUpload" type:"structure"` -} - -// String returns the string representation -func (s InstallToRemoteAccessSessionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstallToRemoteAccessSessionOutput) GoString() string { - return s.String() -} - -// SetAppUpload sets the AppUpload field's value. -func (s *InstallToRemoteAccessSessionOutput) SetAppUpload(v *Upload) *InstallToRemoteAccessSessionOutput { - s.AppUpload = v - return s -} - -// Represents the instance profile. -type InstanceProfile struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the instance profile. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The description of the instance profile. - Description *string `locationName:"description" type:"string"` - - // An array of strings specifying the list of app packages that should not be - // cleaned up from the device after a test run is over. - // - // The list of packages is only considered if you set packageCleanup to true. - ExcludeAppPackagesFromCleanup []*string `locationName:"excludeAppPackagesFromCleanup" type:"list"` - - // The name of the instance profile. - Name *string `locationName:"name" type:"string"` - - // When set to true, Device Farm will remove app packages after a test run. - // The default value is false for private devices. - PackageCleanup *bool `locationName:"packageCleanup" type:"boolean"` - - // When set to true, Device Farm will reboot the instance after a test run. - // The default value is true. - RebootAfterUse *bool `locationName:"rebootAfterUse" type:"boolean"` -} - -// String returns the string representation -func (s InstanceProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceProfile) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *InstanceProfile) SetArn(v string) *InstanceProfile { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *InstanceProfile) SetDescription(v string) *InstanceProfile { - s.Description = &v - return s -} - -// SetExcludeAppPackagesFromCleanup sets the ExcludeAppPackagesFromCleanup field's value. -func (s *InstanceProfile) SetExcludeAppPackagesFromCleanup(v []*string) *InstanceProfile { - s.ExcludeAppPackagesFromCleanup = v - return s -} - -// SetName sets the Name field's value. -func (s *InstanceProfile) SetName(v string) *InstanceProfile { - s.Name = &v - return s -} - -// SetPackageCleanup sets the PackageCleanup field's value. -func (s *InstanceProfile) SetPackageCleanup(v bool) *InstanceProfile { - s.PackageCleanup = &v - return s -} - -// SetRebootAfterUse sets the RebootAfterUse field's value. -func (s *InstanceProfile) SetRebootAfterUse(v bool) *InstanceProfile { - s.RebootAfterUse = &v - return s -} - -// Represents a device. -type Job struct { - _ struct{} `type:"structure"` - - // The job's ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The job's result counters. - Counters *Counters `locationName:"counters" type:"structure"` - - // When the job was created. - Created *time.Time `locationName:"created" type:"timestamp"` - - // The device (phone or tablet). - Device *Device `locationName:"device" type:"structure"` - - // Represents the total (metered or unmetered) minutes used by the job. - DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` - - // The Amazon Resource Name (ARN) of the instance. - InstanceArn *string `locationName:"instanceArn" min:"32" type:"string"` - - // A message about the job's result. - Message *string `locationName:"message" type:"string"` - - // The job's name. - Name *string `locationName:"name" type:"string"` - - // The job's result. - // - // Allowed values include: - // - // * PENDING: A pending condition. - // - // * PASSED: A passing condition. - // - // * WARNED: A warning condition. - // - // * FAILED: A failed condition. - // - // * SKIPPED: A skipped condition. - // - // * ERRORED: An error condition. - // - // * STOPPED: A stopped condition. - Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` - - // The job's start time. - Started *time.Time `locationName:"started" type:"timestamp"` - - // The job's status. - // - // Allowed values include: - // - // * PENDING: A pending status. - // - // * PENDING_CONCURRENCY: A pending concurrency status. - // - // * PENDING_DEVICE: A pending device status. - // - // * PROCESSING: A processing status. - // - // * SCHEDULING: A scheduling status. - // - // * PREPARING: A preparing status. - // - // * RUNNING: A running status. - // - // * COMPLETED: A completed status. - // - // * STOPPING: A stopping status. - Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` - - // The job's stop time. - Stopped *time.Time `locationName:"stopped" type:"timestamp"` - - // The job's type. - // - // Allowed values include the following: - // - // * BUILTIN_FUZZ: The built-in fuzz type. - // - // * BUILTIN_EXPLORER: For Android, an app explorer that will traverse an - // Android app, interacting with it and capturing screenshots at the same - // time. - // - // * APPIUM_JAVA_JUNIT: The Appium Java JUnit type. - // - // * APPIUM_JAVA_TESTNG: The Appium Java TestNG type. - // - // * APPIUM_PYTHON: The Appium Python type. - // - // * APPIUM_NODE: The Appium Node.js type. - // - // * APPIUM_RUBY: The Appium Ruby type. - // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. - // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. - // - // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. - // - // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. - // - // * APPIUM_WEB_RUBY: The Appium Ruby test type for web apps. - // - // * CALABASH: The Calabash type. - // - // * INSTRUMENTATION: The Instrumentation type. - // - // * UIAUTOMATION: The uiautomation type. - // - // * UIAUTOMATOR: The uiautomator type. - // - // * XCTEST: The XCode test type. - // - // * XCTEST_UI: The XCode UI test type. - Type *string `locationName:"type" type:"string" enum:"TestType"` - - // This value is set to true if video capture is enabled; otherwise, it is set - // to false. - VideoCapture *bool `locationName:"videoCapture" type:"boolean"` - - // The endpoint for streaming device video. - VideoEndpoint *string `locationName:"videoEndpoint" type:"string"` -} - -// String returns the string representation -func (s Job) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Job) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Job) SetArn(v string) *Job { - s.Arn = &v - return s -} - -// SetCounters sets the Counters field's value. -func (s *Job) SetCounters(v *Counters) *Job { - s.Counters = v - return s -} - -// SetCreated sets the Created field's value. -func (s *Job) SetCreated(v time.Time) *Job { - s.Created = &v - return s -} - -// SetDevice sets the Device field's value. -func (s *Job) SetDevice(v *Device) *Job { - s.Device = v - return s -} - -// SetDeviceMinutes sets the DeviceMinutes field's value. -func (s *Job) SetDeviceMinutes(v *DeviceMinutes) *Job { - s.DeviceMinutes = v - return s -} - -// SetInstanceArn sets the InstanceArn field's value. -func (s *Job) SetInstanceArn(v string) *Job { - s.InstanceArn = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *Job) SetMessage(v string) *Job { - s.Message = &v - return s -} - -// SetName sets the Name field's value. -func (s *Job) SetName(v string) *Job { - s.Name = &v - return s -} - -// SetResult sets the Result field's value. -func (s *Job) SetResult(v string) *Job { - s.Result = &v - return s -} - -// SetStarted sets the Started field's value. -func (s *Job) SetStarted(v time.Time) *Job { - s.Started = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Job) SetStatus(v string) *Job { - s.Status = &v - return s -} - -// SetStopped sets the Stopped field's value. -func (s *Job) SetStopped(v time.Time) *Job { - s.Stopped = &v - return s -} - -// SetType sets the Type field's value. -func (s *Job) SetType(v string) *Job { - s.Type = &v - return s -} - -// SetVideoCapture sets the VideoCapture field's value. -func (s *Job) SetVideoCapture(v bool) *Job { - s.VideoCapture = &v - return s -} - -// SetVideoEndpoint sets the VideoEndpoint field's value. -func (s *Job) SetVideoEndpoint(v string) *Job { - s.VideoEndpoint = &v - return s -} - -// Represents a request to the list artifacts operation. -type ListArtifactsInput struct { - _ struct{} `type:"structure"` - - // The Run, Job, Suite, or Test ARN. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // The artifacts' type. - // - // Allowed values include: - // - // * FILE: The artifacts are files. - // - // * LOG: The artifacts are logs. - // - // * SCREENSHOT: The artifacts are screenshots. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"ArtifactCategory"` -} - -// String returns the string representation -func (s ListArtifactsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListArtifactsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListArtifactsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListArtifactsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListArtifactsInput) SetArn(v string) *ListArtifactsInput { - s.Arn = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListArtifactsInput) SetNextToken(v string) *ListArtifactsInput { - s.NextToken = &v - return s -} - -// SetType sets the Type field's value. -func (s *ListArtifactsInput) SetType(v string) *ListArtifactsInput { - s.Type = &v - return s -} - -// Represents the result of a list artifacts operation. -type ListArtifactsOutput struct { - _ struct{} `type:"structure"` - - // Information about the artifacts. - Artifacts []*Artifact `locationName:"artifacts" type:"list"` - - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListArtifactsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListArtifactsOutput) GoString() string { - return s.String() -} - -// SetArtifacts sets the Artifacts field's value. -func (s *ListArtifactsOutput) SetArtifacts(v []*Artifact) *ListArtifactsOutput { - s.Artifacts = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListArtifactsOutput) SetNextToken(v string) *ListArtifactsOutput { - s.NextToken = &v - return s -} - -type ListDeviceInstancesInput struct { - _ struct{} `type:"structure"` - - // An integer specifying the maximum number of items you want to return in the - // API response. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListDeviceInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDeviceInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDeviceInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDeviceInstancesInput"} - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListDeviceInstancesInput) SetMaxResults(v int64) *ListDeviceInstancesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDeviceInstancesInput) SetNextToken(v string) *ListDeviceInstancesInput { - s.NextToken = &v - return s -} - -type ListDeviceInstancesOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about your device instances. - DeviceInstances []*DeviceInstance `locationName:"deviceInstances" type:"list"` - - // An identifier that can be used in the next call to this operation to return - // the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListDeviceInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDeviceInstancesOutput) GoString() string { - return s.String() -} - -// SetDeviceInstances sets the DeviceInstances field's value. -func (s *ListDeviceInstancesOutput) SetDeviceInstances(v []*DeviceInstance) *ListDeviceInstancesOutput { - s.DeviceInstances = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDeviceInstancesOutput) SetNextToken(v string) *ListDeviceInstancesOutput { - s.NextToken = &v - return s -} - -// Represents the result of a list device pools request. -type ListDevicePoolsInput struct { - _ struct{} `type:"structure"` - - // The project ARN. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // The device pools' type. - // - // Allowed values include: - // - // * CURATED: A device pool that is created and managed by AWS Device Farm. - // - // * PRIVATE: A device pool that is created and managed by the device pool - // developer. - Type *string `locationName:"type" type:"string" enum:"DevicePoolType"` -} - -// String returns the string representation -func (s ListDevicePoolsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDevicePoolsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDevicePoolsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDevicePoolsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListDevicePoolsInput) SetArn(v string) *ListDevicePoolsInput { - s.Arn = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDevicePoolsInput) SetNextToken(v string) *ListDevicePoolsInput { - s.NextToken = &v - return s -} - -// SetType sets the Type field's value. -func (s *ListDevicePoolsInput) SetType(v string) *ListDevicePoolsInput { - s.Type = &v - return s -} - -// Represents the result of a list device pools request. -type ListDevicePoolsOutput struct { - _ struct{} `type:"structure"` - - // Information about the device pools. - DevicePools []*DevicePool `locationName:"devicePools" type:"list"` - - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListDevicePoolsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDevicePoolsOutput) GoString() string { - return s.String() -} - -// SetDevicePools sets the DevicePools field's value. -func (s *ListDevicePoolsOutput) SetDevicePools(v []*DevicePool) *ListDevicePoolsOutput { - s.DevicePools = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDevicePoolsOutput) SetNextToken(v string) *ListDevicePoolsOutput { - s.NextToken = &v - return s -} - -// Represents the result of a list devices request. -type ListDevicesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the project. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // Used to select a set of devices. A filter is made up of an attribute, an - // operator, and one or more values. - // - // * Attribute: The aspect of a device such as platform or model used as - // the selction criteria in a device filter. - // - // Allowed values include: - // - // ARN: The Amazon Resource Name (ARN) of the device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". - // - // PLATFORM: The device platform. Valid values are "ANDROID" or "IOS". - // - // OS_VERSION: The operating system version. For example, "10.3.2". - // - // MODEL: The device model. For example, "iPad 5th Gen". - // - // AVAILABILITY: The current availability of the device. Valid values are "AVAILABLE", - // "HIGHLY_AVAILABLE", "BUSY", or "TEMPORARY_NOT_AVAILABLE". - // - // FORM_FACTOR: The device form factor. Valid values are "PHONE" or "TABLET". - // - // MANUFACTURER: The device manufacturer. For example, "Apple". - // - // REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. Valid - // values are "TRUE" or "FALSE". - // - // REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. - // Valid values are "TRUE" or "FALSE". - // - // INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance. - // - // INSTANCE_LABELS: The label of the device instance. - // - // FLEET_TYPE: The fleet type. Valid values are "PUBLIC" or "PRIVATE". - // - // * Operator: The filter operator. - // - // The EQUALS operator is available for every attribute except INSTANCE_LABELS. - // - // The CONTAINS operator is available for the INSTANCE_LABELS and MODEL attributes. - // - // The IN and NOT_IN operators are available for the ARN, OS_VERSION, MODEL, - // MANUFACTURER, and INSTANCE_ARN attributes. - // - // The LESS_THAN, GREATER_THAN, LESS_THAN_OR_EQUALS, and GREATER_THAN_OR_EQUALS - // operators are also available for the OS_VERSION attribute. - // - // * Values: An array of one or more filter values. - // - // The IN and NOT_IN operators take a values array that has one or more elements. - // - // The other operators require an array with a single element. - // - // In a request, the AVAILABILITY attribute takes "AVAILABLE", "HIGHLY_AVAILABLE", - // "BUSY", or "TEMPORARY_NOT_AVAILABLE" as values. - Filters []*DeviceFilter `locationName:"filters" type:"list"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListDevicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDevicesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDevicesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDevicesInput"} - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListDevicesInput) SetArn(v string) *ListDevicesInput { - s.Arn = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *ListDevicesInput) SetFilters(v []*DeviceFilter) *ListDevicesInput { - s.Filters = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDevicesInput) SetNextToken(v string) *ListDevicesInput { - s.NextToken = &v - return s -} - -// Represents the result of a list devices operation. -type ListDevicesOutput struct { - _ struct{} `type:"structure"` - - // Information about the devices. - Devices []*Device `locationName:"devices" type:"list"` - - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListDevicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDevicesOutput) GoString() string { - return s.String() -} - -// SetDevices sets the Devices field's value. -func (s *ListDevicesOutput) SetDevices(v []*Device) *ListDevicesOutput { - s.Devices = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDevicesOutput) SetNextToken(v string) *ListDevicesOutput { - s.NextToken = &v - return s -} - -type ListInstanceProfilesInput struct { - _ struct{} `type:"structure"` - - // An integer specifying the maximum number of items you want to return in the - // API response. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListInstanceProfilesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInstanceProfilesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInstanceProfilesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInstanceProfilesInput"} - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListInstanceProfilesInput) SetMaxResults(v int64) *ListInstanceProfilesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListInstanceProfilesInput) SetNextToken(v string) *ListInstanceProfilesInput { - s.NextToken = &v - return s -} - -type ListInstanceProfilesOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about your instance profiles. - InstanceProfiles []*InstanceProfile `locationName:"instanceProfiles" type:"list"` - - // An identifier that can be used in the next call to this operation to return - // the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListInstanceProfilesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInstanceProfilesOutput) GoString() string { - return s.String() -} - -// SetInstanceProfiles sets the InstanceProfiles field's value. -func (s *ListInstanceProfilesOutput) SetInstanceProfiles(v []*InstanceProfile) *ListInstanceProfilesOutput { - s.InstanceProfiles = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListInstanceProfilesOutput) SetNextToken(v string) *ListInstanceProfilesOutput { - s.NextToken = &v - return s -} - -// Represents a request to the list jobs operation. -type ListJobsInput struct { - _ struct{} `type:"structure"` - - // The run's Amazon Resource Name (ARN). - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListJobsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListJobsInput) SetArn(v string) *ListJobsInput { - s.Arn = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListJobsInput) SetNextToken(v string) *ListJobsInput { - s.NextToken = &v - return s -} - -// Represents the result of a list jobs request. -type ListJobsOutput struct { - _ struct{} `type:"structure"` - - // Information about the jobs. - Jobs []*Job `locationName:"jobs" type:"list"` - - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobsOutput) GoString() string { - return s.String() -} - -// SetJobs sets the Jobs field's value. -func (s *ListJobsOutput) SetJobs(v []*Job) *ListJobsOutput { - s.Jobs = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListJobsOutput) SetNextToken(v string) *ListJobsOutput { - s.NextToken = &v - return s -} - -type ListNetworkProfilesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the project for which you want to list - // network profiles. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // The type of network profile you wish to return information about. Valid values - // are listed below. - Type *string `locationName:"type" type:"string" enum:"NetworkProfileType"` -} - -// String returns the string representation -func (s ListNetworkProfilesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListNetworkProfilesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListNetworkProfilesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListNetworkProfilesInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListNetworkProfilesInput) SetArn(v string) *ListNetworkProfilesInput { - s.Arn = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListNetworkProfilesInput) SetNextToken(v string) *ListNetworkProfilesInput { - s.NextToken = &v - return s -} - -// SetType sets the Type field's value. -func (s *ListNetworkProfilesInput) SetType(v string) *ListNetworkProfilesInput { - s.Type = &v - return s -} - -type ListNetworkProfilesOutput struct { - _ struct{} `type:"structure"` - - // A list of the available network profiles. - NetworkProfiles []*NetworkProfile `locationName:"networkProfiles" type:"list"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListNetworkProfilesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListNetworkProfilesOutput) GoString() string { - return s.String() -} - -// SetNetworkProfiles sets the NetworkProfiles field's value. -func (s *ListNetworkProfilesOutput) SetNetworkProfiles(v []*NetworkProfile) *ListNetworkProfilesOutput { - s.NetworkProfiles = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListNetworkProfilesOutput) SetNextToken(v string) *ListNetworkProfilesOutput { - s.NextToken = &v - return s -} - -type ListOfferingPromotionsInput struct { - _ struct{} `type:"structure"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListOfferingPromotionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOfferingPromotionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListOfferingPromotionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOfferingPromotionsInput"} - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOfferingPromotionsInput) SetNextToken(v string) *ListOfferingPromotionsInput { - s.NextToken = &v - return s -} - -type ListOfferingPromotionsOutput struct { - _ struct{} `type:"structure"` - - // An identifier to be used in the next call to this operation, to return the - // next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // Information about the offering promotions. - OfferingPromotions []*OfferingPromotion `locationName:"offeringPromotions" type:"list"` -} - -// String returns the string representation -func (s ListOfferingPromotionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOfferingPromotionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOfferingPromotionsOutput) SetNextToken(v string) *ListOfferingPromotionsOutput { - s.NextToken = &v - return s -} - -// SetOfferingPromotions sets the OfferingPromotions field's value. -func (s *ListOfferingPromotionsOutput) SetOfferingPromotions(v []*OfferingPromotion) *ListOfferingPromotionsOutput { - s.OfferingPromotions = v - return s -} - -// Represents the request to list the offering transaction history. -type ListOfferingTransactionsInput struct { - _ struct{} `type:"structure"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListOfferingTransactionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOfferingTransactionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListOfferingTransactionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOfferingTransactionsInput"} - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOfferingTransactionsInput) SetNextToken(v string) *ListOfferingTransactionsInput { - s.NextToken = &v - return s -} - -// Returns the transaction log of the specified offerings. -type ListOfferingTransactionsOutput struct { - _ struct{} `type:"structure"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // The audit log of subscriptions you have purchased and modified through AWS - // Device Farm. - OfferingTransactions []*OfferingTransaction `locationName:"offeringTransactions" type:"list"` -} - -// String returns the string representation -func (s ListOfferingTransactionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOfferingTransactionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOfferingTransactionsOutput) SetNextToken(v string) *ListOfferingTransactionsOutput { - s.NextToken = &v - return s -} - -// SetOfferingTransactions sets the OfferingTransactions field's value. -func (s *ListOfferingTransactionsOutput) SetOfferingTransactions(v []*OfferingTransaction) *ListOfferingTransactionsOutput { - s.OfferingTransactions = v - return s -} - -// Represents the request to list all offerings. -type ListOfferingsInput struct { - _ struct{} `type:"structure"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListOfferingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOfferingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListOfferingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOfferingsInput"} - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOfferingsInput) SetNextToken(v string) *ListOfferingsInput { - s.NextToken = &v - return s -} - -// Represents the return values of the list of offerings. -type ListOfferingsOutput struct { - _ struct{} `type:"structure"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // A value representing the list offering results. - Offerings []*Offering `locationName:"offerings" type:"list"` -} - -// String returns the string representation -func (s ListOfferingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOfferingsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOfferingsOutput) SetNextToken(v string) *ListOfferingsOutput { - s.NextToken = &v - return s -} - -// SetOfferings sets the Offerings field's value. -func (s *ListOfferingsOutput) SetOfferings(v []*Offering) *ListOfferingsOutput { - s.Offerings = v - return s -} - -// Represents a request to the list projects operation. -type ListProjectsInput struct { - _ struct{} `type:"structure"` - - // Optional. If no Amazon Resource Name (ARN) is specified, then AWS Device - // Farm returns a list of all projects for the AWS account. You can also specify - // a project ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListProjectsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListProjectsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListProjectsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListProjectsInput"} - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListProjectsInput) SetArn(v string) *ListProjectsInput { - s.Arn = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListProjectsInput) SetNextToken(v string) *ListProjectsInput { - s.NextToken = &v - return s -} - -// Represents the result of a list projects request. -type ListProjectsOutput struct { - _ struct{} `type:"structure"` - - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // Information about the projects. - Projects []*Project `locationName:"projects" type:"list"` -} - -// String returns the string representation -func (s ListProjectsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListProjectsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListProjectsOutput) SetNextToken(v string) *ListProjectsOutput { - s.NextToken = &v - return s -} - -// SetProjects sets the Projects field's value. -func (s *ListProjectsOutput) SetProjects(v []*Project) *ListProjectsOutput { - s.Projects = v - return s -} - -// Represents the request to return information about the remote access session. -type ListRemoteAccessSessionsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the remote access session about which you - // are requesting information. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListRemoteAccessSessionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRemoteAccessSessionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRemoteAccessSessionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRemoteAccessSessionsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListRemoteAccessSessionsInput) SetArn(v string) *ListRemoteAccessSessionsInput { - s.Arn = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRemoteAccessSessionsInput) SetNextToken(v string) *ListRemoteAccessSessionsInput { - s.NextToken = &v - return s -} - -// Represents the response from the server after AWS Device Farm makes a request -// to return information about the remote access session. -type ListRemoteAccessSessionsOutput struct { - _ struct{} `type:"structure"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // A container representing the metadata from the service about each remote - // access session you are requesting. - RemoteAccessSessions []*RemoteAccessSession `locationName:"remoteAccessSessions" type:"list"` -} - -// String returns the string representation -func (s ListRemoteAccessSessionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRemoteAccessSessionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRemoteAccessSessionsOutput) SetNextToken(v string) *ListRemoteAccessSessionsOutput { - s.NextToken = &v - return s -} - -// SetRemoteAccessSessions sets the RemoteAccessSessions field's value. -func (s *ListRemoteAccessSessionsOutput) SetRemoteAccessSessions(v []*RemoteAccessSession) *ListRemoteAccessSessionsOutput { - s.RemoteAccessSessions = v - return s -} - -// Represents a request to the list runs operation. -type ListRunsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the project for which you want to list - // runs. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListRunsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRunsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRunsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRunsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListRunsInput) SetArn(v string) *ListRunsInput { - s.Arn = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRunsInput) SetNextToken(v string) *ListRunsInput { - s.NextToken = &v - return s -} - -// Represents the result of a list runs request. -type ListRunsOutput struct { - _ struct{} `type:"structure"` - - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // Information about the runs. - Runs []*Run `locationName:"runs" type:"list"` -} - -// String returns the string representation -func (s ListRunsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRunsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRunsOutput) SetNextToken(v string) *ListRunsOutput { - s.NextToken = &v - return s -} - -// SetRuns sets the Runs field's value. -func (s *ListRunsOutput) SetRuns(v []*Run) *ListRunsOutput { - s.Runs = v - return s -} - -// Represents a request to the list samples operation. -type ListSamplesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the job used to list samples. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListSamplesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSamplesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSamplesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSamplesInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListSamplesInput) SetArn(v string) *ListSamplesInput { - s.Arn = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSamplesInput) SetNextToken(v string) *ListSamplesInput { - s.NextToken = &v - return s -} - -// Represents the result of a list samples request. -type ListSamplesOutput struct { - _ struct{} `type:"structure"` - - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // Information about the samples. - Samples []*Sample `locationName:"samples" type:"list"` -} - -// String returns the string representation -func (s ListSamplesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSamplesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSamplesOutput) SetNextToken(v string) *ListSamplesOutput { - s.NextToken = &v - return s -} - -// SetSamples sets the Samples field's value. -func (s *ListSamplesOutput) SetSamples(v []*Sample) *ListSamplesOutput { - s.Samples = v - return s -} - -// Represents a request to the list suites operation. -type ListSuitesInput struct { - _ struct{} `type:"structure"` - - // The job's Amazon Resource Name (ARN). - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListSuitesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSuitesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSuitesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSuitesInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListSuitesInput) SetArn(v string) *ListSuitesInput { - s.Arn = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSuitesInput) SetNextToken(v string) *ListSuitesInput { - s.NextToken = &v - return s -} - -// Represents the result of a list suites request. -type ListSuitesOutput struct { - _ struct{} `type:"structure"` - - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // Information about the suites. - Suites []*Suite `locationName:"suites" type:"list"` -} - -// String returns the string representation -func (s ListSuitesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSuitesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSuitesOutput) SetNextToken(v string) *ListSuitesOutput { - s.NextToken = &v - return s -} - -// SetSuites sets the Suites field's value. -func (s *ListSuitesOutput) SetSuites(v []*Suite) *ListSuitesOutput { - s.Suites = v - return s -} - -// Represents a request to the list tests operation. -type ListTestsInput struct { - _ struct{} `type:"structure"` - - // The test suite's Amazon Resource Name (ARN). - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListTestsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTestsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTestsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTestsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListTestsInput) SetArn(v string) *ListTestsInput { - s.Arn = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTestsInput) SetNextToken(v string) *ListTestsInput { - s.NextToken = &v - return s -} - -// Represents the result of a list tests request. -type ListTestsOutput struct { - _ struct{} `type:"structure"` - - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // Information about the tests. - Tests []*Test `locationName:"tests" type:"list"` -} - -// String returns the string representation -func (s ListTestsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTestsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTestsOutput) SetNextToken(v string) *ListTestsOutput { - s.NextToken = &v - return s -} - -// SetTests sets the Tests field's value. -func (s *ListTestsOutput) SetTests(v []*Test) *ListTestsOutput { - s.Tests = v - return s -} - -// Represents a request to the list unique problems operation. -type ListUniqueProblemsInput struct { - _ struct{} `type:"structure"` - - // The unique problems' ARNs. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListUniqueProblemsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUniqueProblemsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUniqueProblemsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUniqueProblemsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListUniqueProblemsInput) SetArn(v string) *ListUniqueProblemsInput { - s.Arn = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUniqueProblemsInput) SetNextToken(v string) *ListUniqueProblemsInput { - s.NextToken = &v - return s -} - -// Represents the result of a list unique problems request. -type ListUniqueProblemsOutput struct { - _ struct{} `type:"structure"` - - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // Information about the unique problems. - // - // Allowed values include: - // - // * PENDING: A pending condition. - // - // * PASSED: A passing condition. - // - // * WARNED: A warning condition. - // - // * FAILED: A failed condition. - // - // * SKIPPED: A skipped condition. - // - // * ERRORED: An error condition. - // - // * STOPPED: A stopped condition. - UniqueProblems map[string][]*UniqueProblem `locationName:"uniqueProblems" type:"map"` -} - -// String returns the string representation -func (s ListUniqueProblemsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUniqueProblemsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUniqueProblemsOutput) SetNextToken(v string) *ListUniqueProblemsOutput { - s.NextToken = &v - return s -} - -// SetUniqueProblems sets the UniqueProblems field's value. -func (s *ListUniqueProblemsOutput) SetUniqueProblems(v map[string][]*UniqueProblem) *ListUniqueProblemsOutput { - s.UniqueProblems = v - return s -} - -// Represents a request to the list uploads operation. -type ListUploadsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the project for which you want to list - // uploads. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // The type of upload. - // - // Must be one of the following values: - // - // * ANDROID_APP: An Android upload. - // - // * IOS_APP: An iOS upload. - // - // * WEB_APP: A web appliction upload. - // - // * EXTERNAL_DATA: An external data upload. - // - // * APPIUM_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package upload. - // - // * APPIUM_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload. - // - // * APPIUM_PYTHON_TEST_PACKAGE: An Appium Python test package upload. - // - // * APPIUM_NODE_TEST_PACKAGE: An Appium Node.js test package upload. - // - // * APPIUM_RUBY_TEST_PACKAGE: An Appium Ruby test package upload. - // - // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package - // upload for a web app. - // - // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload for a web app. - // - // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload - // for a web app. - // - // * APPIUM_WEB_NODE_TEST_PACKAGE: An Appium Node.js test package upload - // for a web app. - // - // * APPIUM_WEB_RUBY_TEST_PACKAGE: An Appium Ruby test package upload for - // a web app. - // - // * CALABASH_TEST_PACKAGE: A Calabash test package upload. - // - // * INSTRUMENTATION_TEST_PACKAGE: An instrumentation upload. - // - // * UIAUTOMATION_TEST_PACKAGE: A uiautomation test package upload. - // - // * UIAUTOMATOR_TEST_PACKAGE: A uiautomator test package upload. - // - // * XCTEST_TEST_PACKAGE: An XCode test package upload. - // - // * XCTEST_UI_TEST_PACKAGE: An XCode UI test package upload. - // - // * APPIUM_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. - // - // * APPIUM_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. - // - // * APPIUM_PYTHON_TEST_SPEC: An Appium Python test spec upload. - // - // * APPIUM_NODE_TEST_SPEC: An Appium Node.js test spec upload. - // - // * APPIUM_RUBY_TEST_SPEC: An Appium Ruby test spec upload. - // - // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload - // for a web app. - // - // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload - // for a web app. - // - // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload for a - // web app. - // - // * APPIUM_WEB_NODE_TEST_SPEC: An Appium Node.js test spec upload for a - // web app. - // - // * APPIUM_WEB_RUBY_TEST_SPEC: An Appium Ruby test spec upload for a web - // app. - // - // * INSTRUMENTATION_TEST_SPEC: An instrumentation test spec upload. - // - // * XCTEST_UI_TEST_SPEC: An XCode UI test spec upload. - Type *string `locationName:"type" type:"string" enum:"UploadType"` -} - -// String returns the string representation -func (s ListUploadsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUploadsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUploadsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUploadsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListUploadsInput) SetArn(v string) *ListUploadsInput { - s.Arn = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUploadsInput) SetNextToken(v string) *ListUploadsInput { - s.NextToken = &v - return s -} - -// SetType sets the Type field's value. -func (s *ListUploadsInput) SetType(v string) *ListUploadsInput { - s.Type = &v - return s -} - -// Represents the result of a list uploads request. -type ListUploadsOutput struct { - _ struct{} `type:"structure"` - - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // Information about the uploads. - Uploads []*Upload `locationName:"uploads" type:"list"` -} - -// String returns the string representation -func (s ListUploadsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUploadsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUploadsOutput) SetNextToken(v string) *ListUploadsOutput { - s.NextToken = &v - return s -} - -// SetUploads sets the Uploads field's value. -func (s *ListUploadsOutput) SetUploads(v []*Upload) *ListUploadsOutput { - s.Uploads = v - return s -} - -type ListVPCEConfigurationsInput struct { - _ struct{} `type:"structure"` - - // An integer specifying the maximum number of items you want to return in the - // API response. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` -} - -// String returns the string representation -func (s ListVPCEConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVPCEConfigurationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListVPCEConfigurationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListVPCEConfigurationsInput"} - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListVPCEConfigurationsInput) SetMaxResults(v int64) *ListVPCEConfigurationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListVPCEConfigurationsInput) SetNextToken(v string) *ListVPCEConfigurationsInput { - s.NextToken = &v - return s -} - -type ListVPCEConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // An array of VPCEConfiguration objects containing information about your VPC - // endpoint configuration. - VpceConfigurations []*VPCEConfiguration `locationName:"vpceConfigurations" type:"list"` -} - -// String returns the string representation -func (s ListVPCEConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVPCEConfigurationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListVPCEConfigurationsOutput) SetNextToken(v string) *ListVPCEConfigurationsOutput { - s.NextToken = &v - return s -} - -// SetVpceConfigurations sets the VpceConfigurations field's value. -func (s *ListVPCEConfigurationsOutput) SetVpceConfigurations(v []*VPCEConfiguration) *ListVPCEConfigurationsOutput { - s.VpceConfigurations = v - return s -} - -// Represents a latitude and longitude pair, expressed in geographic coordinate -// system degrees (for example 47.6204, -122.3491). -// -// Elevation is currently not supported. -type Location struct { - _ struct{} `type:"structure"` - - // The latitude. - // - // Latitude is a required field - Latitude *float64 `locationName:"latitude" type:"double" required:"true"` - - // The longitude. - // - // Longitude is a required field - Longitude *float64 `locationName:"longitude" type:"double" required:"true"` -} - -// String returns the string representation -func (s Location) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Location) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Location) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Location"} - if s.Latitude == nil { - invalidParams.Add(request.NewErrParamRequired("Latitude")) - } - if s.Longitude == nil { - invalidParams.Add(request.NewErrParamRequired("Longitude")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLatitude sets the Latitude field's value. -func (s *Location) SetLatitude(v float64) *Location { - s.Latitude = &v - return s -} - -// SetLongitude sets the Longitude field's value. -func (s *Location) SetLongitude(v float64) *Location { - s.Longitude = &v - return s -} - -// A number representing the monetary amount for an offering or transaction. -type MonetaryAmount struct { - _ struct{} `type:"structure"` - - // The numerical amount of an offering or transaction. - Amount *float64 `locationName:"amount" type:"double"` - - // The currency code of a monetary amount. For example, USD means "U.S. dollars." - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCode"` -} - -// String returns the string representation -func (s MonetaryAmount) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MonetaryAmount) GoString() string { - return s.String() -} - -// SetAmount sets the Amount field's value. -func (s *MonetaryAmount) SetAmount(v float64) *MonetaryAmount { - s.Amount = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *MonetaryAmount) SetCurrencyCode(v string) *MonetaryAmount { - s.CurrencyCode = &v - return s -} - -// An array of settings that describes characteristics of a network profile. -type NetworkProfile struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the network profile. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The description of the network profile. - Description *string `locationName:"description" type:"string"` - - // The data throughput rate in bits per second, as an integer from 0 to 104857600. - DownlinkBandwidthBits *int64 `locationName:"downlinkBandwidthBits" type:"long"` - - // Delay time for all packets to destination in milliseconds as an integer from - // 0 to 2000. - DownlinkDelayMs *int64 `locationName:"downlinkDelayMs" type:"long"` - - // Time variation in the delay of received packets in milliseconds as an integer - // from 0 to 2000. - DownlinkJitterMs *int64 `locationName:"downlinkJitterMs" type:"long"` - - // Proportion of received packets that fail to arrive from 0 to 100 percent. - DownlinkLossPercent *int64 `locationName:"downlinkLossPercent" type:"integer"` - - // The name of the network profile. - Name *string `locationName:"name" type:"string"` - - // The type of network profile. Valid values are listed below. - Type *string `locationName:"type" type:"string" enum:"NetworkProfileType"` - - // The data throughput rate in bits per second, as an integer from 0 to 104857600. - UplinkBandwidthBits *int64 `locationName:"uplinkBandwidthBits" type:"long"` - - // Delay time for all packets to destination in milliseconds as an integer from - // 0 to 2000. - UplinkDelayMs *int64 `locationName:"uplinkDelayMs" type:"long"` - - // Time variation in the delay of received packets in milliseconds as an integer - // from 0 to 2000. - UplinkJitterMs *int64 `locationName:"uplinkJitterMs" type:"long"` - - // Proportion of transmitted packets that fail to arrive from 0 to 100 percent. - UplinkLossPercent *int64 `locationName:"uplinkLossPercent" type:"integer"` -} - -// String returns the string representation -func (s NetworkProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkProfile) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *NetworkProfile) SetArn(v string) *NetworkProfile { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *NetworkProfile) SetDescription(v string) *NetworkProfile { - s.Description = &v - return s -} - -// SetDownlinkBandwidthBits sets the DownlinkBandwidthBits field's value. -func (s *NetworkProfile) SetDownlinkBandwidthBits(v int64) *NetworkProfile { - s.DownlinkBandwidthBits = &v - return s -} - -// SetDownlinkDelayMs sets the DownlinkDelayMs field's value. -func (s *NetworkProfile) SetDownlinkDelayMs(v int64) *NetworkProfile { - s.DownlinkDelayMs = &v - return s -} - -// SetDownlinkJitterMs sets the DownlinkJitterMs field's value. -func (s *NetworkProfile) SetDownlinkJitterMs(v int64) *NetworkProfile { - s.DownlinkJitterMs = &v - return s -} - -// SetDownlinkLossPercent sets the DownlinkLossPercent field's value. -func (s *NetworkProfile) SetDownlinkLossPercent(v int64) *NetworkProfile { - s.DownlinkLossPercent = &v - return s -} - -// SetName sets the Name field's value. -func (s *NetworkProfile) SetName(v string) *NetworkProfile { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *NetworkProfile) SetType(v string) *NetworkProfile { - s.Type = &v - return s -} - -// SetUplinkBandwidthBits sets the UplinkBandwidthBits field's value. -func (s *NetworkProfile) SetUplinkBandwidthBits(v int64) *NetworkProfile { - s.UplinkBandwidthBits = &v - return s -} - -// SetUplinkDelayMs sets the UplinkDelayMs field's value. -func (s *NetworkProfile) SetUplinkDelayMs(v int64) *NetworkProfile { - s.UplinkDelayMs = &v - return s -} - -// SetUplinkJitterMs sets the UplinkJitterMs field's value. -func (s *NetworkProfile) SetUplinkJitterMs(v int64) *NetworkProfile { - s.UplinkJitterMs = &v - return s -} - -// SetUplinkLossPercent sets the UplinkLossPercent field's value. -func (s *NetworkProfile) SetUplinkLossPercent(v int64) *NetworkProfile { - s.UplinkLossPercent = &v - return s -} - -// Represents the metadata of a device offering. -type Offering struct { - _ struct{} `type:"structure"` - - // A string describing the offering. - Description *string `locationName:"description" type:"string"` - - // The ID that corresponds to a device offering. - Id *string `locationName:"id" min:"32" type:"string"` - - // The platform of the device (e.g., ANDROID or IOS). - Platform *string `locationName:"platform" type:"string" enum:"DevicePlatform"` - - // Specifies whether there are recurring charges for the offering. - RecurringCharges []*RecurringCharge `locationName:"recurringCharges" type:"list"` - - // The type of offering (e.g., "RECURRING") for a device. - Type *string `locationName:"type" type:"string" enum:"OfferingType"` -} - -// String returns the string representation -func (s Offering) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Offering) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *Offering) SetDescription(v string) *Offering { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *Offering) SetId(v string) *Offering { - s.Id = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *Offering) SetPlatform(v string) *Offering { - s.Platform = &v - return s -} - -// SetRecurringCharges sets the RecurringCharges field's value. -func (s *Offering) SetRecurringCharges(v []*RecurringCharge) *Offering { - s.RecurringCharges = v - return s -} - -// SetType sets the Type field's value. -func (s *Offering) SetType(v string) *Offering { - s.Type = &v - return s -} - -// Represents information about an offering promotion. -type OfferingPromotion struct { - _ struct{} `type:"structure"` - - // A string describing the offering promotion. - Description *string `locationName:"description" type:"string"` - - // The ID of the offering promotion. - Id *string `locationName:"id" min:"4" type:"string"` -} - -// String returns the string representation -func (s OfferingPromotion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OfferingPromotion) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *OfferingPromotion) SetDescription(v string) *OfferingPromotion { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *OfferingPromotion) SetId(v string) *OfferingPromotion { - s.Id = &v - return s -} - -// The status of the offering. -type OfferingStatus struct { - _ struct{} `type:"structure"` - - // The date on which the offering is effective. - EffectiveOn *time.Time `locationName:"effectiveOn" type:"timestamp"` - - // Represents the metadata of an offering status. - Offering *Offering `locationName:"offering" type:"structure"` - - // The number of available devices in the offering. - Quantity *int64 `locationName:"quantity" type:"integer"` - - // The type specified for the offering status. - Type *string `locationName:"type" type:"string" enum:"OfferingTransactionType"` -} - -// String returns the string representation -func (s OfferingStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OfferingStatus) GoString() string { - return s.String() -} - -// SetEffectiveOn sets the EffectiveOn field's value. -func (s *OfferingStatus) SetEffectiveOn(v time.Time) *OfferingStatus { - s.EffectiveOn = &v - return s -} - -// SetOffering sets the Offering field's value. -func (s *OfferingStatus) SetOffering(v *Offering) *OfferingStatus { - s.Offering = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *OfferingStatus) SetQuantity(v int64) *OfferingStatus { - s.Quantity = &v - return s -} - -// SetType sets the Type field's value. -func (s *OfferingStatus) SetType(v string) *OfferingStatus { - s.Type = &v - return s -} - -// Represents the metadata of an offering transaction. -type OfferingTransaction struct { - _ struct{} `type:"structure"` - - // The cost of an offering transaction. - Cost *MonetaryAmount `locationName:"cost" type:"structure"` - - // The date on which an offering transaction was created. - CreatedOn *time.Time `locationName:"createdOn" type:"timestamp"` - - // The ID that corresponds to a device offering promotion. - OfferingPromotionId *string `locationName:"offeringPromotionId" min:"4" type:"string"` - - // The status of an offering transaction. - OfferingStatus *OfferingStatus `locationName:"offeringStatus" type:"structure"` - - // The transaction ID of the offering transaction. - TransactionId *string `locationName:"transactionId" min:"32" type:"string"` -} - -// String returns the string representation -func (s OfferingTransaction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OfferingTransaction) GoString() string { - return s.String() -} - -// SetCost sets the Cost field's value. -func (s *OfferingTransaction) SetCost(v *MonetaryAmount) *OfferingTransaction { - s.Cost = v - return s -} - -// SetCreatedOn sets the CreatedOn field's value. -func (s *OfferingTransaction) SetCreatedOn(v time.Time) *OfferingTransaction { - s.CreatedOn = &v - return s -} - -// SetOfferingPromotionId sets the OfferingPromotionId field's value. -func (s *OfferingTransaction) SetOfferingPromotionId(v string) *OfferingTransaction { - s.OfferingPromotionId = &v - return s -} - -// SetOfferingStatus sets the OfferingStatus field's value. -func (s *OfferingTransaction) SetOfferingStatus(v *OfferingStatus) *OfferingTransaction { - s.OfferingStatus = v - return s -} - -// SetTransactionId sets the TransactionId field's value. -func (s *OfferingTransaction) SetTransactionId(v string) *OfferingTransaction { - s.TransactionId = &v - return s -} - -// Represents a specific warning or failure. -type Problem struct { - _ struct{} `type:"structure"` - - // Information about the associated device. - Device *Device `locationName:"device" type:"structure"` - - // Information about the associated job. - Job *ProblemDetail `locationName:"job" type:"structure"` - - // A message about the problem's result. - Message *string `locationName:"message" type:"string"` - - // The problem's result. - // - // Allowed values include: - // - // * PENDING: A pending condition. - // - // * PASSED: A passing condition. - // - // * WARNED: A warning condition. - // - // * FAILED: A failed condition. - // - // * SKIPPED: A skipped condition. - // - // * ERRORED: An error condition. - // - // * STOPPED: A stopped condition. - Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` - - // Information about the associated run. - Run *ProblemDetail `locationName:"run" type:"structure"` - - // Information about the associated suite. - Suite *ProblemDetail `locationName:"suite" type:"structure"` - - // Information about the associated test. - Test *ProblemDetail `locationName:"test" type:"structure"` -} - -// String returns the string representation -func (s Problem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Problem) GoString() string { - return s.String() -} - -// SetDevice sets the Device field's value. -func (s *Problem) SetDevice(v *Device) *Problem { - s.Device = v - return s -} - -// SetJob sets the Job field's value. -func (s *Problem) SetJob(v *ProblemDetail) *Problem { - s.Job = v - return s -} - -// SetMessage sets the Message field's value. -func (s *Problem) SetMessage(v string) *Problem { - s.Message = &v - return s -} - -// SetResult sets the Result field's value. -func (s *Problem) SetResult(v string) *Problem { - s.Result = &v - return s -} - -// SetRun sets the Run field's value. -func (s *Problem) SetRun(v *ProblemDetail) *Problem { - s.Run = v - return s -} - -// SetSuite sets the Suite field's value. -func (s *Problem) SetSuite(v *ProblemDetail) *Problem { - s.Suite = v - return s -} - -// SetTest sets the Test field's value. -func (s *Problem) SetTest(v *ProblemDetail) *Problem { - s.Test = v - return s -} - -// Information about a problem detail. -type ProblemDetail struct { - _ struct{} `type:"structure"` - - // The problem detail's ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The problem detail's name. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s ProblemDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProblemDetail) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ProblemDetail) SetArn(v string) *ProblemDetail { - s.Arn = &v - return s -} - -// SetName sets the Name field's value. -func (s *ProblemDetail) SetName(v string) *ProblemDetail { - s.Name = &v - return s -} - -// Represents an operating-system neutral workspace for running and managing -// tests. -type Project struct { - _ struct{} `type:"structure"` - - // The project's ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // When the project was created. - Created *time.Time `locationName:"created" type:"timestamp"` - - // The default number of minutes (at the project level) a test run will execute - // before it times out. Default value is 60 minutes. - DefaultJobTimeoutMinutes *int64 `locationName:"defaultJobTimeoutMinutes" type:"integer"` - - // The project's name. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s Project) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Project) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Project) SetArn(v string) *Project { - s.Arn = &v - return s -} - -// SetCreated sets the Created field's value. -func (s *Project) SetCreated(v time.Time) *Project { - s.Created = &v - return s -} - -// SetDefaultJobTimeoutMinutes sets the DefaultJobTimeoutMinutes field's value. -func (s *Project) SetDefaultJobTimeoutMinutes(v int64) *Project { - s.DefaultJobTimeoutMinutes = &v - return s -} - -// SetName sets the Name field's value. -func (s *Project) SetName(v string) *Project { - s.Name = &v - return s -} - -// Represents a request for a purchase offering. -type PurchaseOfferingInput struct { - _ struct{} `type:"structure"` - - // The ID of the offering. - OfferingId *string `locationName:"offeringId" min:"32" type:"string"` - - // The ID of the offering promotion to be applied to the purchase. - OfferingPromotionId *string `locationName:"offeringPromotionId" min:"4" type:"string"` - - // The number of device slots you wish to purchase in an offering request. - Quantity *int64 `locationName:"quantity" type:"integer"` -} - -// String returns the string representation -func (s PurchaseOfferingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseOfferingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseOfferingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseOfferingInput"} - if s.OfferingId != nil && len(*s.OfferingId) < 32 { - invalidParams.Add(request.NewErrParamMinLen("OfferingId", 32)) - } - if s.OfferingPromotionId != nil && len(*s.OfferingPromotionId) < 4 { - invalidParams.Add(request.NewErrParamMinLen("OfferingPromotionId", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOfferingId sets the OfferingId field's value. -func (s *PurchaseOfferingInput) SetOfferingId(v string) *PurchaseOfferingInput { - s.OfferingId = &v - return s -} - -// SetOfferingPromotionId sets the OfferingPromotionId field's value. -func (s *PurchaseOfferingInput) SetOfferingPromotionId(v string) *PurchaseOfferingInput { - s.OfferingPromotionId = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *PurchaseOfferingInput) SetQuantity(v int64) *PurchaseOfferingInput { - s.Quantity = &v - return s -} - -// The result of the purchase offering (e.g., success or failure). -type PurchaseOfferingOutput struct { - _ struct{} `type:"structure"` - - // Represents the offering transaction for the purchase result. - OfferingTransaction *OfferingTransaction `locationName:"offeringTransaction" type:"structure"` -} - -// String returns the string representation -func (s PurchaseOfferingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseOfferingOutput) GoString() string { - return s.String() -} - -// SetOfferingTransaction sets the OfferingTransaction field's value. -func (s *PurchaseOfferingOutput) SetOfferingTransaction(v *OfferingTransaction) *PurchaseOfferingOutput { - s.OfferingTransaction = v - return s -} - -// Represents the set of radios and their states on a device. Examples of radios -// include Wi-Fi, GPS, Bluetooth, and NFC. -type Radios struct { - _ struct{} `type:"structure"` - - // True if Bluetooth is enabled at the beginning of the test; otherwise, false. - Bluetooth *bool `locationName:"bluetooth" type:"boolean"` - - // True if GPS is enabled at the beginning of the test; otherwise, false. - Gps *bool `locationName:"gps" type:"boolean"` - - // True if NFC is enabled at the beginning of the test; otherwise, false. - Nfc *bool `locationName:"nfc" type:"boolean"` - - // True if Wi-Fi is enabled at the beginning of the test; otherwise, false. - Wifi *bool `locationName:"wifi" type:"boolean"` -} - -// String returns the string representation -func (s Radios) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Radios) GoString() string { - return s.String() -} - -// SetBluetooth sets the Bluetooth field's value. -func (s *Radios) SetBluetooth(v bool) *Radios { - s.Bluetooth = &v - return s -} - -// SetGps sets the Gps field's value. -func (s *Radios) SetGps(v bool) *Radios { - s.Gps = &v - return s -} - -// SetNfc sets the Nfc field's value. -func (s *Radios) SetNfc(v bool) *Radios { - s.Nfc = &v - return s -} - -// SetWifi sets the Wifi field's value. -func (s *Radios) SetWifi(v bool) *Radios { - s.Wifi = &v - return s -} - -// Specifies whether charges for devices will be recurring. -type RecurringCharge struct { - _ struct{} `type:"structure"` - - // The cost of the recurring charge. - Cost *MonetaryAmount `locationName:"cost" type:"structure"` - - // The frequency in which charges will recur. - Frequency *string `locationName:"frequency" type:"string" enum:"RecurringChargeFrequency"` -} - -// String returns the string representation -func (s RecurringCharge) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecurringCharge) GoString() string { - return s.String() -} - -// SetCost sets the Cost field's value. -func (s *RecurringCharge) SetCost(v *MonetaryAmount) *RecurringCharge { - s.Cost = v - return s -} - -// SetFrequency sets the Frequency field's value. -func (s *RecurringCharge) SetFrequency(v string) *RecurringCharge { - s.Frequency = &v - return s -} - -// Represents information about the remote access session. -type RemoteAccessSession struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the remote access session. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The billing method of the remote access session. Possible values include - // METERED or UNMETERED. For more information about metered devices, see AWS - // Device Farm terminology (https://docs.aws.amazon.com/devicefarm/latest/developerguide/welcome.html#welcome-terminology)." - BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` - - // Unique identifier of your client for the remote access session. Only returned - // if remote debugging is enabled for the remote access session. - ClientId *string `locationName:"clientId" type:"string"` - - // The date and time the remote access session was created. - Created *time.Time `locationName:"created" type:"timestamp"` - - // The device (phone or tablet) used in the remote access session. - Device *Device `locationName:"device" type:"structure"` - - // The number of minutes a device is used in a remote access sesssion (including - // setup and teardown minutes). - DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` - - // Unique device identifier for the remote device. Only returned if remote debugging - // is enabled for the remote access session. - DeviceUdid *string `locationName:"deviceUdid" type:"string"` - - // The endpoint for the remote access sesssion. - Endpoint *string `locationName:"endpoint" type:"string"` - - // IP address of the EC2 host where you need to connect to remotely debug devices. - // Only returned if remote debugging is enabled for the remote access session. - HostAddress *string `locationName:"hostAddress" type:"string"` - - // The Amazon Resource Name (ARN) of the instance. - InstanceArn *string `locationName:"instanceArn" min:"32" type:"string"` - - // The interaction mode of the remote access session. Valid values are: - // - // * INTERACTIVE: You can interact with the iOS device by viewing, touching, - // and rotating the screen. You cannot run XCUITest framework-based tests - // in this mode. - // - // * NO_VIDEO: You are connected to the device but cannot interact with it - // or view the screen. This mode has the fastest test execution speed. You - // can run XCUITest framework-based tests in this mode. - // - // * VIDEO_ONLY: You can view the screen but cannot touch or rotate it. You - // can run XCUITest framework-based tests and watch the screen in this mode. - InteractionMode *string `locationName:"interactionMode" type:"string" enum:"InteractionMode"` - - // A message about the remote access session. - Message *string `locationName:"message" type:"string"` - - // The name of the remote access session. - Name *string `locationName:"name" type:"string"` - - // This flag is set to true if remote debugging is enabled for the remote access - // session. - RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"` - - // The Amazon Resource Name (ARN) for the app to be recorded in the remote access - // session. - RemoteRecordAppArn *string `locationName:"remoteRecordAppArn" min:"32" type:"string"` - - // This flag is set to true if remote recording is enabled for the remote access - // session. - RemoteRecordEnabled *bool `locationName:"remoteRecordEnabled" type:"boolean"` - - // The result of the remote access session. Can be any of the following: - // - // * PENDING: A pending condition. - // - // * PASSED: A passing condition. - // - // * WARNED: A warning condition. - // - // * FAILED: A failed condition. - // - // * SKIPPED: A skipped condition. - // - // * ERRORED: An error condition. - // - // * STOPPED: A stopped condition. - Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` - - // When set to true, for private devices, Device Farm will not sign your app - // again. For public devices, Device Farm always signs your apps again and this - // parameter has no effect. - // - // For more information about how Device Farm re-signs your app(s), see Do you - // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device - // Farm FAQs. - SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` - - // The date and time the remote access session was started. - Started *time.Time `locationName:"started" type:"timestamp"` - - // The status of the remote access session. Can be any of the following: - // - // * PENDING: A pending status. - // - // * PENDING_CONCURRENCY: A pending concurrency status. - // - // * PENDING_DEVICE: A pending device status. - // - // * PROCESSING: A processing status. - // - // * SCHEDULING: A scheduling status. - // - // * PREPARING: A preparing status. - // - // * RUNNING: A running status. - // - // * COMPLETED: A completed status. - // - // * STOPPING: A stopping status. - Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` - - // The date and time the remote access session was stopped. - Stopped *time.Time `locationName:"stopped" type:"timestamp"` -} - -// String returns the string representation -func (s RemoteAccessSession) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoteAccessSession) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *RemoteAccessSession) SetArn(v string) *RemoteAccessSession { - s.Arn = &v - return s -} - -// SetBillingMethod sets the BillingMethod field's value. -func (s *RemoteAccessSession) SetBillingMethod(v string) *RemoteAccessSession { - s.BillingMethod = &v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *RemoteAccessSession) SetClientId(v string) *RemoteAccessSession { - s.ClientId = &v - return s -} - -// SetCreated sets the Created field's value. -func (s *RemoteAccessSession) SetCreated(v time.Time) *RemoteAccessSession { - s.Created = &v - return s -} - -// SetDevice sets the Device field's value. -func (s *RemoteAccessSession) SetDevice(v *Device) *RemoteAccessSession { - s.Device = v - return s -} - -// SetDeviceMinutes sets the DeviceMinutes field's value. -func (s *RemoteAccessSession) SetDeviceMinutes(v *DeviceMinutes) *RemoteAccessSession { - s.DeviceMinutes = v - return s -} - -// SetDeviceUdid sets the DeviceUdid field's value. -func (s *RemoteAccessSession) SetDeviceUdid(v string) *RemoteAccessSession { - s.DeviceUdid = &v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *RemoteAccessSession) SetEndpoint(v string) *RemoteAccessSession { - s.Endpoint = &v - return s -} - -// SetHostAddress sets the HostAddress field's value. -func (s *RemoteAccessSession) SetHostAddress(v string) *RemoteAccessSession { - s.HostAddress = &v - return s -} - -// SetInstanceArn sets the InstanceArn field's value. -func (s *RemoteAccessSession) SetInstanceArn(v string) *RemoteAccessSession { - s.InstanceArn = &v - return s -} - -// SetInteractionMode sets the InteractionMode field's value. -func (s *RemoteAccessSession) SetInteractionMode(v string) *RemoteAccessSession { - s.InteractionMode = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *RemoteAccessSession) SetMessage(v string) *RemoteAccessSession { - s.Message = &v - return s -} - -// SetName sets the Name field's value. -func (s *RemoteAccessSession) SetName(v string) *RemoteAccessSession { - s.Name = &v - return s -} - -// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. -func (s *RemoteAccessSession) SetRemoteDebugEnabled(v bool) *RemoteAccessSession { - s.RemoteDebugEnabled = &v - return s -} - -// SetRemoteRecordAppArn sets the RemoteRecordAppArn field's value. -func (s *RemoteAccessSession) SetRemoteRecordAppArn(v string) *RemoteAccessSession { - s.RemoteRecordAppArn = &v - return s -} - -// SetRemoteRecordEnabled sets the RemoteRecordEnabled field's value. -func (s *RemoteAccessSession) SetRemoteRecordEnabled(v bool) *RemoteAccessSession { - s.RemoteRecordEnabled = &v - return s -} - -// SetResult sets the Result field's value. -func (s *RemoteAccessSession) SetResult(v string) *RemoteAccessSession { - s.Result = &v - return s -} - -// SetSkipAppResign sets the SkipAppResign field's value. -func (s *RemoteAccessSession) SetSkipAppResign(v bool) *RemoteAccessSession { - s.SkipAppResign = &v - return s -} - -// SetStarted sets the Started field's value. -func (s *RemoteAccessSession) SetStarted(v time.Time) *RemoteAccessSession { - s.Started = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *RemoteAccessSession) SetStatus(v string) *RemoteAccessSession { - s.Status = &v - return s -} - -// SetStopped sets the Stopped field's value. -func (s *RemoteAccessSession) SetStopped(v time.Time) *RemoteAccessSession { - s.Stopped = &v - return s -} - -// A request representing an offering renewal. -type RenewOfferingInput struct { - _ struct{} `type:"structure"` - - // The ID of a request to renew an offering. - OfferingId *string `locationName:"offeringId" min:"32" type:"string"` - - // The quantity requested in an offering renewal. - Quantity *int64 `locationName:"quantity" type:"integer"` -} - -// String returns the string representation -func (s RenewOfferingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RenewOfferingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RenewOfferingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RenewOfferingInput"} - if s.OfferingId != nil && len(*s.OfferingId) < 32 { - invalidParams.Add(request.NewErrParamMinLen("OfferingId", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOfferingId sets the OfferingId field's value. -func (s *RenewOfferingInput) SetOfferingId(v string) *RenewOfferingInput { - s.OfferingId = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *RenewOfferingInput) SetQuantity(v int64) *RenewOfferingInput { - s.Quantity = &v - return s -} - -// The result of a renewal offering. -type RenewOfferingOutput struct { - _ struct{} `type:"structure"` - - // Represents the status of the offering transaction for the renewal. - OfferingTransaction *OfferingTransaction `locationName:"offeringTransaction" type:"structure"` -} - -// String returns the string representation -func (s RenewOfferingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RenewOfferingOutput) GoString() string { - return s.String() -} - -// SetOfferingTransaction sets the OfferingTransaction field's value. -func (s *RenewOfferingOutput) SetOfferingTransaction(v *OfferingTransaction) *RenewOfferingOutput { - s.OfferingTransaction = v - return s -} - -// Represents the screen resolution of a device in height and width, expressed -// in pixels. -type Resolution struct { - _ struct{} `type:"structure"` - - // The screen resolution's height, expressed in pixels. - Height *int64 `locationName:"height" type:"integer"` - - // The screen resolution's width, expressed in pixels. - Width *int64 `locationName:"width" type:"integer"` -} - -// String returns the string representation -func (s Resolution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Resolution) GoString() string { - return s.String() -} - -// SetHeight sets the Height field's value. -func (s *Resolution) SetHeight(v int64) *Resolution { - s.Height = &v - return s -} - -// SetWidth sets the Width field's value. -func (s *Resolution) SetWidth(v int64) *Resolution { - s.Width = &v - return s -} - -// Represents a condition for a device pool. -type Rule struct { - _ struct{} `type:"structure"` - - // The rule's stringified attribute. For example, specify the value as "\"abc\"". - // - // The supported operators for each attribute are provided in the following - // list. - // - // APPIUM_VERSIONThe Appium version for the test. - // - // Supported operators: CONTAINS - // - // ARNThe Amazon Resource Name (ARN) of the device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". - // - // Supported operators: EQUALS, IN, NOT_IN - // - // AVAILABILITYThe current availability of the device. Valid values are "AVAILABLE", - // "HIGHLY_AVAILABLE", "BUSY", or "TEMPORARY_NOT_AVAILABLE". - // - // Supported operators: EQUALS - // - // FLEET_TYPEThe fleet type. Valid values are "PUBLIC" or "PRIVATE". - // - // Supported operators: EQUALS - // - // FORM_FACTORThe device form factor. Valid values are "PHONE" or "TABLET". - // - // Supported operators: EQUALS, IN, NOT_IN - // - // INSTANCE_ARNThe Amazon Resource Name (ARN) of the device instance. - // - // Supported operators: IN, NOT_IN - // - // INSTANCE_LABELSThe label of the device instance. - // - // Supported operators: CONTAINS - // - // MANUFACTURERThe device manufacturer. For example, "Apple". - // - // Supported operators: EQUALS, IN, NOT_IN - // - // MODELThe device model, such as "Apple iPad Air 2" or "Google Pixel". - // - // Supported operators: CONTAINS, EQUALS, IN, NOT_IN - // - // OS_VERSIONThe operating system version. For example, "10.3.2". - // - // Supported operators: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS, IN, LESS_THAN, - // LESS_THAN_OR_EQUALS, NOT_IN - // - // PLATFORMThe device platform. Valid values are "ANDROID" or "IOS". - // - // Supported operators: EQUALS, IN, NOT_IN - // - // REMOTE_ACCESS_ENABLEDWhether the device is enabled for remote access. Valid - // values are "TRUE" or "FALSE". - // - // Supported operators: EQUALS - // - // REMOTE_DEBUG_ENABLEDWhether the device is enabled for remote debugging. Valid - // values are "TRUE" or "FALSE". - // - // Supported operators: EQUALS - Attribute *string `locationName:"attribute" type:"string" enum:"DeviceAttribute"` - - // Specifies how Device Farm compares the rule's attribute to the value. For - // the operators that are supported by each attribute, see the attribute descriptions. - Operator *string `locationName:"operator" type:"string" enum:"RuleOperator"` - - // The rule's value. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s Rule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Rule) GoString() string { - return s.String() -} - -// SetAttribute sets the Attribute field's value. -func (s *Rule) SetAttribute(v string) *Rule { - s.Attribute = &v - return s -} - -// SetOperator sets the Operator field's value. -func (s *Rule) SetOperator(v string) *Rule { - s.Operator = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Rule) SetValue(v string) *Rule { - s.Value = &v - return s -} - -// Represents a test run on a set of devices with a given app package, test -// parameters, etc. -type Run struct { - _ struct{} `type:"structure"` - - // An app to upload or that has been uploaded. - AppUpload *string `locationName:"appUpload" min:"32" type:"string"` - - // The run's ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // Specifies the billing method for a test run: metered or unmetered. If the - // parameter is not specified, the default value is metered. - BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` - - // The total number of completed jobs. - CompletedJobs *int64 `locationName:"completedJobs" type:"integer"` - - // The run's result counters. - Counters *Counters `locationName:"counters" type:"structure"` - - // When the run was created. - Created *time.Time `locationName:"created" type:"timestamp"` - - // Output CustomerArtifactPaths object for the test run. - CustomerArtifactPaths *CustomerArtifactPaths `locationName:"customerArtifactPaths" type:"structure"` - - // Represents the total (metered or unmetered) minutes used by the test run. - DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` - - // The ARN of the device pool for the run. - DevicePoolArn *string `locationName:"devicePoolArn" min:"32" type:"string"` - - // The results of a device filter used to select the devices for a test run. - DeviceSelectionResult *DeviceSelectionResult `locationName:"deviceSelectionResult" type:"structure"` - - // For fuzz tests, this is the number of events, between 1 and 10000, that the - // UI fuzz test should perform. - EventCount *int64 `locationName:"eventCount" type:"integer"` - - // The number of minutes the job will execute before it times out. - JobTimeoutMinutes *int64 `locationName:"jobTimeoutMinutes" type:"integer"` - - // Information about the locale that is used for the run. - Locale *string `locationName:"locale" type:"string"` - - // Information about the location that is used for the run. - Location *Location `locationName:"location" type:"structure"` - - // A message about the run's result. - Message *string `locationName:"message" type:"string"` - - // The run's name. - Name *string `locationName:"name" type:"string"` - - // The network profile being used for a test run. - NetworkProfile *NetworkProfile `locationName:"networkProfile" type:"structure"` - - // Read-only URL for an object in S3 bucket where you can get the parsing results - // of the test package. If the test package doesn't parse, the reason why it - // doesn't parse appears in the file that this URL points to. - ParsingResultUrl *string `locationName:"parsingResultUrl" type:"string"` - - // The run's platform. - // - // Allowed values include: - // - // * ANDROID: The Android platform. - // - // * IOS: The iOS platform. - Platform *string `locationName:"platform" type:"string" enum:"DevicePlatform"` - - // Information about the radio states for the run. - Radios *Radios `locationName:"radios" type:"structure"` - - // The run's result. - // - // Allowed values include: - // - // * PENDING: A pending condition. - // - // * PASSED: A passing condition. - // - // * WARNED: A warning condition. - // - // * FAILED: A failed condition. - // - // * SKIPPED: A skipped condition. - // - // * ERRORED: An error condition. - // - // * STOPPED: A stopped condition. - Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` - - // Supporting field for the result field. Set only if result is SKIPPED. PARSING_FAILED - // if the result is skipped because of test package parsing failure. - ResultCode *string `locationName:"resultCode" type:"string" enum:"ExecutionResultCode"` - - // For fuzz tests, this is a seed to use for randomizing the UI fuzz test. Using - // the same seed value between tests ensures identical event sequences. - Seed *int64 `locationName:"seed" type:"integer"` - - // When set to true, for private devices, Device Farm will not sign your app - // again. For public devices, Device Farm always signs your apps again and this - // parameter has no effect. - // - // For more information about how Device Farm re-signs your app(s), see Do you - // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device - // Farm FAQs. - SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` - - // The run's start time. - Started *time.Time `locationName:"started" type:"timestamp"` - - // The run's status. - // - // Allowed values include: - // - // * PENDING: A pending status. - // - // * PENDING_CONCURRENCY: A pending concurrency status. - // - // * PENDING_DEVICE: A pending device status. - // - // * PROCESSING: A processing status. - // - // * SCHEDULING: A scheduling status. - // - // * PREPARING: A preparing status. - // - // * RUNNING: A running status. - // - // * COMPLETED: A completed status. - // - // * STOPPING: A stopping status. - Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` - - // The run's stop time. - Stopped *time.Time `locationName:"stopped" type:"timestamp"` - - // The ARN of the YAML-formatted test specification for the run. - TestSpecArn *string `locationName:"testSpecArn" min:"32" type:"string"` - - // The total number of jobs for the run. - TotalJobs *int64 `locationName:"totalJobs" type:"integer"` - - // The run's type. - // - // Must be one of the following values: - // - // * BUILTIN_FUZZ: The built-in fuzz type. - // - // * BUILTIN_EXPLORER: For Android, an app explorer that will traverse an - // Android app, interacting with it and capturing screenshots at the same - // time. - // - // * APPIUM_JAVA_JUNIT: The Appium Java JUnit type. - // - // * APPIUM_JAVA_TESTNG: The Appium Java TestNG type. - // - // * APPIUM_PYTHON: The Appium Python type. - // - // * APPIUM_NODE: The Appium Node.js type. - // - // * APPIUM_RUBY: The Appium Ruby type. - // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. - // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. - // - // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. - // - // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. - // - // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. - // - // * CALABASH: The Calabash type. - // - // * INSTRUMENTATION: The Instrumentation type. - // - // * UIAUTOMATION: The uiautomation type. - // - // * UIAUTOMATOR: The uiautomator type. - // - // * XCTEST: The XCode test type. - // - // * XCTEST_UI: The XCode UI test type. - Type *string `locationName:"type" type:"string" enum:"TestType"` - - // The Device Farm console URL for the recording of the run. - WebUrl *string `locationName:"webUrl" type:"string"` -} - -// String returns the string representation -func (s Run) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Run) GoString() string { - return s.String() -} - -// SetAppUpload sets the AppUpload field's value. -func (s *Run) SetAppUpload(v string) *Run { - s.AppUpload = &v - return s -} - -// SetArn sets the Arn field's value. -func (s *Run) SetArn(v string) *Run { - s.Arn = &v - return s -} - -// SetBillingMethod sets the BillingMethod field's value. -func (s *Run) SetBillingMethod(v string) *Run { - s.BillingMethod = &v - return s -} - -// SetCompletedJobs sets the CompletedJobs field's value. -func (s *Run) SetCompletedJobs(v int64) *Run { - s.CompletedJobs = &v - return s -} - -// SetCounters sets the Counters field's value. -func (s *Run) SetCounters(v *Counters) *Run { - s.Counters = v - return s -} - -// SetCreated sets the Created field's value. -func (s *Run) SetCreated(v time.Time) *Run { - s.Created = &v - return s -} - -// SetCustomerArtifactPaths sets the CustomerArtifactPaths field's value. -func (s *Run) SetCustomerArtifactPaths(v *CustomerArtifactPaths) *Run { - s.CustomerArtifactPaths = v - return s -} - -// SetDeviceMinutes sets the DeviceMinutes field's value. -func (s *Run) SetDeviceMinutes(v *DeviceMinutes) *Run { - s.DeviceMinutes = v - return s -} - -// SetDevicePoolArn sets the DevicePoolArn field's value. -func (s *Run) SetDevicePoolArn(v string) *Run { - s.DevicePoolArn = &v - return s -} - -// SetDeviceSelectionResult sets the DeviceSelectionResult field's value. -func (s *Run) SetDeviceSelectionResult(v *DeviceSelectionResult) *Run { - s.DeviceSelectionResult = v - return s -} - -// SetEventCount sets the EventCount field's value. -func (s *Run) SetEventCount(v int64) *Run { - s.EventCount = &v - return s -} - -// SetJobTimeoutMinutes sets the JobTimeoutMinutes field's value. -func (s *Run) SetJobTimeoutMinutes(v int64) *Run { - s.JobTimeoutMinutes = &v - return s -} - -// SetLocale sets the Locale field's value. -func (s *Run) SetLocale(v string) *Run { - s.Locale = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *Run) SetLocation(v *Location) *Run { - s.Location = v - return s -} - -// SetMessage sets the Message field's value. -func (s *Run) SetMessage(v string) *Run { - s.Message = &v - return s -} - -// SetName sets the Name field's value. -func (s *Run) SetName(v string) *Run { - s.Name = &v - return s -} - -// SetNetworkProfile sets the NetworkProfile field's value. -func (s *Run) SetNetworkProfile(v *NetworkProfile) *Run { - s.NetworkProfile = v - return s -} - -// SetParsingResultUrl sets the ParsingResultUrl field's value. -func (s *Run) SetParsingResultUrl(v string) *Run { - s.ParsingResultUrl = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *Run) SetPlatform(v string) *Run { - s.Platform = &v - return s -} - -// SetRadios sets the Radios field's value. -func (s *Run) SetRadios(v *Radios) *Run { - s.Radios = v - return s -} - -// SetResult sets the Result field's value. -func (s *Run) SetResult(v string) *Run { - s.Result = &v - return s -} - -// SetResultCode sets the ResultCode field's value. -func (s *Run) SetResultCode(v string) *Run { - s.ResultCode = &v - return s -} - -// SetSeed sets the Seed field's value. -func (s *Run) SetSeed(v int64) *Run { - s.Seed = &v - return s -} - -// SetSkipAppResign sets the SkipAppResign field's value. -func (s *Run) SetSkipAppResign(v bool) *Run { - s.SkipAppResign = &v - return s -} - -// SetStarted sets the Started field's value. -func (s *Run) SetStarted(v time.Time) *Run { - s.Started = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Run) SetStatus(v string) *Run { - s.Status = &v - return s -} - -// SetStopped sets the Stopped field's value. -func (s *Run) SetStopped(v time.Time) *Run { - s.Stopped = &v - return s -} - -// SetTestSpecArn sets the TestSpecArn field's value. -func (s *Run) SetTestSpecArn(v string) *Run { - s.TestSpecArn = &v - return s -} - -// SetTotalJobs sets the TotalJobs field's value. -func (s *Run) SetTotalJobs(v int64) *Run { - s.TotalJobs = &v - return s -} - -// SetType sets the Type field's value. -func (s *Run) SetType(v string) *Run { - s.Type = &v - return s -} - -// SetWebUrl sets the WebUrl field's value. -func (s *Run) SetWebUrl(v string) *Run { - s.WebUrl = &v - return s -} - -// Represents a sample of performance data. -type Sample struct { - _ struct{} `type:"structure"` - - // The sample's ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The sample's type. - // - // Must be one of the following values: - // - // * CPU: A CPU sample type. This is expressed as the app processing CPU - // time (including child processes) as reported by process, as a percentage. - // - // * MEMORY: A memory usage sample type. This is expressed as the total proportional - // set size of an app process, in kilobytes. - // - // * NATIVE_AVG_DRAWTIME - // - // * NATIVE_FPS - // - // * NATIVE_FRAMES - // - // * NATIVE_MAX_DRAWTIME - // - // * NATIVE_MIN_DRAWTIME - // - // * OPENGL_AVG_DRAWTIME - // - // * OPENGL_FPS - // - // * OPENGL_FRAMES - // - // * OPENGL_MAX_DRAWTIME - // - // * OPENGL_MIN_DRAWTIME - // - // * RX - // - // * RX_RATE: The total number of bytes per second (TCP and UDP) that are - // sent, by app process. - // - // * THREADS: A threads sample type. This is expressed as the total number - // of threads per app process. - // - // * TX - // - // * TX_RATE: The total number of bytes per second (TCP and UDP) that are - // received, by app process. - Type *string `locationName:"type" type:"string" enum:"SampleType"` - - // The pre-signed Amazon S3 URL that can be used with a corresponding GET request - // to download the sample's file. - Url *string `locationName:"url" type:"string"` -} - -// String returns the string representation -func (s Sample) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Sample) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Sample) SetArn(v string) *Sample { - s.Arn = &v - return s -} - -// SetType sets the Type field's value. -func (s *Sample) SetType(v string) *Sample { - s.Type = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *Sample) SetUrl(v string) *Sample { - s.Url = &v - return s -} - -// Represents the settings for a run. Includes things like location, radio states, -// auxiliary apps, and network profiles. -type ScheduleRunConfiguration struct { - _ struct{} `type:"structure"` - - // A list of auxiliary apps for the run. - AuxiliaryApps []*string `locationName:"auxiliaryApps" type:"list"` - - // Specifies the billing method for a test run: metered or unmetered. If the - // parameter is not specified, the default value is metered. - BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` - - // Input CustomerArtifactPaths object for the scheduled run configuration. - CustomerArtifactPaths *CustomerArtifactPaths `locationName:"customerArtifactPaths" type:"structure"` - - // The ARN of the extra data for the run. The extra data is a .zip file that - // AWS Device Farm will extract to external data for Android or the app's sandbox - // for iOS. - ExtraDataPackageArn *string `locationName:"extraDataPackageArn" min:"32" type:"string"` - - // Information about the locale that is used for the run. - Locale *string `locationName:"locale" type:"string"` - - // Information about the location that is used for the run. - Location *Location `locationName:"location" type:"structure"` - - // Reserved for internal use. - NetworkProfileArn *string `locationName:"networkProfileArn" min:"32" type:"string"` - - // Information about the radio states for the run. - Radios *Radios `locationName:"radios" type:"structure"` - - // An array of Amazon Resource Names (ARNs) for your VPC endpoint configurations. - VpceConfigurationArns []*string `locationName:"vpceConfigurationArns" type:"list"` -} - -// String returns the string representation -func (s ScheduleRunConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduleRunConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScheduleRunConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScheduleRunConfiguration"} - if s.ExtraDataPackageArn != nil && len(*s.ExtraDataPackageArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ExtraDataPackageArn", 32)) - } - if s.NetworkProfileArn != nil && len(*s.NetworkProfileArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("NetworkProfileArn", 32)) - } - if s.Location != nil { - if err := s.Location.Validate(); err != nil { - invalidParams.AddNested("Location", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuxiliaryApps sets the AuxiliaryApps field's value. -func (s *ScheduleRunConfiguration) SetAuxiliaryApps(v []*string) *ScheduleRunConfiguration { - s.AuxiliaryApps = v - return s -} - -// SetBillingMethod sets the BillingMethod field's value. -func (s *ScheduleRunConfiguration) SetBillingMethod(v string) *ScheduleRunConfiguration { - s.BillingMethod = &v - return s -} - -// SetCustomerArtifactPaths sets the CustomerArtifactPaths field's value. -func (s *ScheduleRunConfiguration) SetCustomerArtifactPaths(v *CustomerArtifactPaths) *ScheduleRunConfiguration { - s.CustomerArtifactPaths = v - return s -} - -// SetExtraDataPackageArn sets the ExtraDataPackageArn field's value. -func (s *ScheduleRunConfiguration) SetExtraDataPackageArn(v string) *ScheduleRunConfiguration { - s.ExtraDataPackageArn = &v - return s -} - -// SetLocale sets the Locale field's value. -func (s *ScheduleRunConfiguration) SetLocale(v string) *ScheduleRunConfiguration { - s.Locale = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *ScheduleRunConfiguration) SetLocation(v *Location) *ScheduleRunConfiguration { - s.Location = v - return s -} - -// SetNetworkProfileArn sets the NetworkProfileArn field's value. -func (s *ScheduleRunConfiguration) SetNetworkProfileArn(v string) *ScheduleRunConfiguration { - s.NetworkProfileArn = &v - return s -} - -// SetRadios sets the Radios field's value. -func (s *ScheduleRunConfiguration) SetRadios(v *Radios) *ScheduleRunConfiguration { - s.Radios = v - return s -} - -// SetVpceConfigurationArns sets the VpceConfigurationArns field's value. -func (s *ScheduleRunConfiguration) SetVpceConfigurationArns(v []*string) *ScheduleRunConfiguration { - s.VpceConfigurationArns = v - return s -} - -// Represents a request to the schedule run operation. -type ScheduleRunInput struct { - _ struct{} `type:"structure"` - - // The ARN of the app to schedule a run. - AppArn *string `locationName:"appArn" min:"32" type:"string"` - - // Information about the settings for the run to be scheduled. - Configuration *ScheduleRunConfiguration `locationName:"configuration" type:"structure"` - - // The ARN of the device pool for the run to be scheduled. - DevicePoolArn *string `locationName:"devicePoolArn" min:"32" type:"string"` - - // The filter criteria used to dynamically select a set of devices for a test - // run, as well as the maximum number of devices to be included in the run. - // - // Either devicePoolArn or deviceSelectionConfiguration is required in a request. - DeviceSelectionConfiguration *DeviceSelectionConfiguration `locationName:"deviceSelectionConfiguration" type:"structure"` - - // Specifies configuration information about a test run, such as the execution - // timeout (in minutes). - ExecutionConfiguration *ExecutionConfiguration `locationName:"executionConfiguration" type:"structure"` - - // The name for the run to be scheduled. - Name *string `locationName:"name" type:"string"` - - // The ARN of the project for the run to be scheduled. - // - // ProjectArn is a required field - ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` - - // Information about the test for the run to be scheduled. - // - // Test is a required field - Test *ScheduleRunTest `locationName:"test" type:"structure" required:"true"` -} - -// String returns the string representation -func (s ScheduleRunInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduleRunInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScheduleRunInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScheduleRunInput"} - if s.AppArn != nil && len(*s.AppArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("AppArn", 32)) - } - if s.DevicePoolArn != nil && len(*s.DevicePoolArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("DevicePoolArn", 32)) - } - if s.ProjectArn == nil { - invalidParams.Add(request.NewErrParamRequired("ProjectArn")) - } - if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) - } - if s.Test == nil { - invalidParams.Add(request.NewErrParamRequired("Test")) - } - if s.Configuration != nil { - if err := s.Configuration.Validate(); err != nil { - invalidParams.AddNested("Configuration", err.(request.ErrInvalidParams)) - } - } - if s.DeviceSelectionConfiguration != nil { - if err := s.DeviceSelectionConfiguration.Validate(); err != nil { - invalidParams.AddNested("DeviceSelectionConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.Test != nil { - if err := s.Test.Validate(); err != nil { - invalidParams.AddNested("Test", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAppArn sets the AppArn field's value. -func (s *ScheduleRunInput) SetAppArn(v string) *ScheduleRunInput { - s.AppArn = &v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *ScheduleRunInput) SetConfiguration(v *ScheduleRunConfiguration) *ScheduleRunInput { - s.Configuration = v - return s -} - -// SetDevicePoolArn sets the DevicePoolArn field's value. -func (s *ScheduleRunInput) SetDevicePoolArn(v string) *ScheduleRunInput { - s.DevicePoolArn = &v - return s -} - -// SetDeviceSelectionConfiguration sets the DeviceSelectionConfiguration field's value. -func (s *ScheduleRunInput) SetDeviceSelectionConfiguration(v *DeviceSelectionConfiguration) *ScheduleRunInput { - s.DeviceSelectionConfiguration = v - return s -} - -// SetExecutionConfiguration sets the ExecutionConfiguration field's value. -func (s *ScheduleRunInput) SetExecutionConfiguration(v *ExecutionConfiguration) *ScheduleRunInput { - s.ExecutionConfiguration = v - return s -} - -// SetName sets the Name field's value. -func (s *ScheduleRunInput) SetName(v string) *ScheduleRunInput { - s.Name = &v - return s -} - -// SetProjectArn sets the ProjectArn field's value. -func (s *ScheduleRunInput) SetProjectArn(v string) *ScheduleRunInput { - s.ProjectArn = &v - return s -} - -// SetTest sets the Test field's value. -func (s *ScheduleRunInput) SetTest(v *ScheduleRunTest) *ScheduleRunInput { - s.Test = v - return s -} - -// Represents the result of a schedule run request. -type ScheduleRunOutput struct { - _ struct{} `type:"structure"` - - // Information about the scheduled run. - Run *Run `locationName:"run" type:"structure"` -} - -// String returns the string representation -func (s ScheduleRunOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduleRunOutput) GoString() string { - return s.String() -} - -// SetRun sets the Run field's value. -func (s *ScheduleRunOutput) SetRun(v *Run) *ScheduleRunOutput { - s.Run = v - return s -} - -// Represents test settings. This data structure is passed in as the "test" -// parameter to ScheduleRun. For an example of the JSON request syntax, see -// ScheduleRun. -type ScheduleRunTest struct { - _ struct{} `type:"structure"` - - // The test's filter. - Filter *string `locationName:"filter" type:"string"` - - // The test's parameters, such as test framework parameters and fixture settings. - // Parameters are represented by name-value pairs of strings. - // - // For all tests: - // - // * app_performance_monitoring: Performance monitoring is enabled by default. - // Set this parameter to "false" to disable it. - // - // For Calabash tests: - // - // * profile: A cucumber profile, for example, "my_profile_name". - // - // * tags: You can limit execution to features or scenarios that have (or - // don't have) certain tags, for example, "@smoke" or "@smoke,~@wip". - // - // For Appium tests (all types): - // - // * appium_version: The Appium version. Currently supported values are "1.6.5" - // (and higher), "latest", and "default". - // - // “latest” will run the latest Appium version supported by Device Farm (1.9.1). - // - // For “default”, Device Farm will choose a compatible version of Appium for - // the device. The current behavior is to run 1.7.2 on Android devices and - // iOS 9 and earlier, 1.7.2 for iOS 10 and later. - // - // This behavior is subject to change. - // - // For Fuzz tests (Android only): - // - // * event_count: The number of events, between 1 and 10000, that the UI - // fuzz test should perform. - // - // * throttle: The time, in ms, between 0 and 1000, that the UI fuzz test - // should wait between events. - // - // * seed: A seed to use for randomizing the UI fuzz test. Using the same - // seed value between tests ensures identical event sequences. - // - // For Explorer tests: - // - // * username: A username to use if the Explorer encounters a login form. - // If not supplied, no username will be inserted. - // - // * password: A password to use if the Explorer encounters a login form. - // If not supplied, no password will be inserted. - // - // For Instrumentation: - // - // * filter: A test filter string. Examples: - // - // Running a single test case: "com.android.abc.Test1" - // - // Running a single test: "com.android.abc.Test1#smoke" - // - // Running multiple tests: "com.android.abc.Test1,com.android.abc.Test2" - // - // For XCTest and XCTestUI: - // - // * filter: A test filter string. Examples: - // - // Running a single test class: "LoginTests" - // - // Running a multiple test classes: "LoginTests,SmokeTests" - // - // Running a single test: "LoginTests/testValid" - // - // Running multiple tests: "LoginTests/testValid,LoginTests/testInvalid" - // - // For UIAutomator: - // - // * filter: A test filter string. Examples: - // - // Running a single test case: "com.android.abc.Test1" - // - // Running a single test: "com.android.abc.Test1#smoke" - // - // Running multiple tests: "com.android.abc.Test1,com.android.abc.Test2" - Parameters map[string]*string `locationName:"parameters" type:"map"` - - // The ARN of the uploaded test that will be run. - TestPackageArn *string `locationName:"testPackageArn" min:"32" type:"string"` - - // The ARN of the YAML-formatted test specification. - TestSpecArn *string `locationName:"testSpecArn" min:"32" type:"string"` - - // The test's type. - // - // Must be one of the following values: - // - // * BUILTIN_FUZZ: The built-in fuzz type. - // - // * BUILTIN_EXPLORER: For Android, an app explorer that will traverse an - // Android app, interacting with it and capturing screenshots at the same - // time. - // - // * APPIUM_JAVA_JUNIT: The Appium Java JUnit type. - // - // * APPIUM_JAVA_TESTNG: The Appium Java TestNG type. - // - // * APPIUM_PYTHON: The Appium Python type. - // - // * APPIUM_NODE: The Appium Node.js type. - // - // * APPIUM_RUBY: The Appium Ruby type. - // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. - // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. - // - // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. - // - // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. - // - // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. - // - // * CALABASH: The Calabash type. - // - // * INSTRUMENTATION: The Instrumentation type. - // - // * UIAUTOMATION: The uiautomation type. - // - // * UIAUTOMATOR: The uiautomator type. - // - // * XCTEST: The XCode test type. - // - // * XCTEST_UI: The XCode UI test type. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"TestType"` -} - -// String returns the string representation -func (s ScheduleRunTest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduleRunTest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScheduleRunTest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScheduleRunTest"} - if s.TestPackageArn != nil && len(*s.TestPackageArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("TestPackageArn", 32)) - } - if s.TestSpecArn != nil && len(*s.TestSpecArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("TestSpecArn", 32)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *ScheduleRunTest) SetFilter(v string) *ScheduleRunTest { - s.Filter = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ScheduleRunTest) SetParameters(v map[string]*string) *ScheduleRunTest { - s.Parameters = v - return s -} - -// SetTestPackageArn sets the TestPackageArn field's value. -func (s *ScheduleRunTest) SetTestPackageArn(v string) *ScheduleRunTest { - s.TestPackageArn = &v - return s -} - -// SetTestSpecArn sets the TestSpecArn field's value. -func (s *ScheduleRunTest) SetTestSpecArn(v string) *ScheduleRunTest { - s.TestSpecArn = &v - return s -} - -// SetType sets the Type field's value. -func (s *ScheduleRunTest) SetType(v string) *ScheduleRunTest { - s.Type = &v - return s -} - -type StopJobInput struct { - _ struct{} `type:"structure"` - - // Represents the Amazon Resource Name (ARN) of the Device Farm job you wish - // to stop. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopJobInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *StopJobInput) SetArn(v string) *StopJobInput { - s.Arn = &v - return s -} - -type StopJobOutput struct { - _ struct{} `type:"structure"` - - // The job that was stopped. - Job *Job `locationName:"job" type:"structure"` -} - -// String returns the string representation -func (s StopJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopJobOutput) GoString() string { - return s.String() -} - -// SetJob sets the Job field's value. -func (s *StopJobOutput) SetJob(v *Job) *StopJobOutput { - s.Job = v - return s -} - -// Represents the request to stop the remote access session. -type StopRemoteAccessSessionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the remote access session you wish to stop. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopRemoteAccessSessionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopRemoteAccessSessionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopRemoteAccessSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopRemoteAccessSessionInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *StopRemoteAccessSessionInput) SetArn(v string) *StopRemoteAccessSessionInput { - s.Arn = &v - return s -} - -// Represents the response from the server that describes the remote access -// session when AWS Device Farm stops the session. -type StopRemoteAccessSessionOutput struct { - _ struct{} `type:"structure"` - - // A container representing the metadata from the service about the remote access - // session you are stopping. - RemoteAccessSession *RemoteAccessSession `locationName:"remoteAccessSession" type:"structure"` -} - -// String returns the string representation -func (s StopRemoteAccessSessionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopRemoteAccessSessionOutput) GoString() string { - return s.String() -} - -// SetRemoteAccessSession sets the RemoteAccessSession field's value. -func (s *StopRemoteAccessSessionOutput) SetRemoteAccessSession(v *RemoteAccessSession) *StopRemoteAccessSessionOutput { - s.RemoteAccessSession = v - return s -} - -// Represents the request to stop a specific run. -type StopRunInput struct { - _ struct{} `type:"structure"` - - // Represents the Amazon Resource Name (ARN) of the Device Farm run you wish - // to stop. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopRunInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopRunInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopRunInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopRunInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *StopRunInput) SetArn(v string) *StopRunInput { - s.Arn = &v - return s -} - -// Represents the results of your stop run attempt. -type StopRunOutput struct { - _ struct{} `type:"structure"` - - // The run that was stopped. - Run *Run `locationName:"run" type:"structure"` -} - -// String returns the string representation -func (s StopRunOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopRunOutput) GoString() string { - return s.String() -} - -// SetRun sets the Run field's value. -func (s *StopRunOutput) SetRun(v *Run) *StopRunOutput { - s.Run = v - return s -} - -// Represents a collection of one or more tests. -type Suite struct { - _ struct{} `type:"structure"` - - // The suite's ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The suite's result counters. - Counters *Counters `locationName:"counters" type:"structure"` - - // When the suite was created. - Created *time.Time `locationName:"created" type:"timestamp"` - - // Represents the total (metered or unmetered) minutes used by the test suite. - DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` - - // A message about the suite's result. - Message *string `locationName:"message" type:"string"` - - // The suite's name. - Name *string `locationName:"name" type:"string"` - - // The suite's result. - // - // Allowed values include: - // - // * PENDING: A pending condition. - // - // * PASSED: A passing condition. - // - // * WARNED: A warning condition. - // - // * FAILED: A failed condition. - // - // * SKIPPED: A skipped condition. - // - // * ERRORED: An error condition. - // - // * STOPPED: A stopped condition. - Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` - - // The suite's start time. - Started *time.Time `locationName:"started" type:"timestamp"` - - // The suite's status. - // - // Allowed values include: - // - // * PENDING: A pending status. - // - // * PENDING_CONCURRENCY: A pending concurrency status. - // - // * PENDING_DEVICE: A pending device status. - // - // * PROCESSING: A processing status. - // - // * SCHEDULING: A scheduling status. - // - // * PREPARING: A preparing status. - // - // * RUNNING: A running status. - // - // * COMPLETED: A completed status. - // - // * STOPPING: A stopping status. - Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` - - // The suite's stop time. - Stopped *time.Time `locationName:"stopped" type:"timestamp"` - - // The suite's type. - // - // Must be one of the following values: - // - // * BUILTIN_FUZZ: The built-in fuzz type. - // - // * BUILTIN_EXPLORER: For Android, an app explorer that will traverse an - // Android app, interacting with it and capturing screenshots at the same - // time. - // - // * APPIUM_JAVA_JUNIT: The Appium Java JUnit type. - // - // * APPIUM_JAVA_TESTNG: The Appium Java TestNG type. - // - // * APPIUM_PYTHON: The Appium Python type. - // - // * APPIUM_NODE: The Appium Node.js type. - // - // * APPIUM_RUBY: The Appium Ruby type. - // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. - // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. - // - // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. - // - // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. - // - // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. - // - // * CALABASH: The Calabash type. - // - // * INSTRUMENTATION: The Instrumentation type. - // - // * UIAUTOMATION: The uiautomation type. - // - // * UIAUTOMATOR: The uiautomator type. - // - // * XCTEST: The XCode test type. - // - // * XCTEST_UI: The XCode UI test type. - Type *string `locationName:"type" type:"string" enum:"TestType"` -} - -// String returns the string representation -func (s Suite) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Suite) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Suite) SetArn(v string) *Suite { - s.Arn = &v - return s -} - -// SetCounters sets the Counters field's value. -func (s *Suite) SetCounters(v *Counters) *Suite { - s.Counters = v - return s -} - -// SetCreated sets the Created field's value. -func (s *Suite) SetCreated(v time.Time) *Suite { - s.Created = &v - return s -} - -// SetDeviceMinutes sets the DeviceMinutes field's value. -func (s *Suite) SetDeviceMinutes(v *DeviceMinutes) *Suite { - s.DeviceMinutes = v - return s -} - -// SetMessage sets the Message field's value. -func (s *Suite) SetMessage(v string) *Suite { - s.Message = &v - return s -} - -// SetName sets the Name field's value. -func (s *Suite) SetName(v string) *Suite { - s.Name = &v - return s -} - -// SetResult sets the Result field's value. -func (s *Suite) SetResult(v string) *Suite { - s.Result = &v - return s -} - -// SetStarted sets the Started field's value. -func (s *Suite) SetStarted(v time.Time) *Suite { - s.Started = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Suite) SetStatus(v string) *Suite { - s.Status = &v - return s -} - -// SetStopped sets the Stopped field's value. -func (s *Suite) SetStopped(v time.Time) *Suite { - s.Stopped = &v - return s -} - -// SetType sets the Type field's value. -func (s *Suite) SetType(v string) *Suite { - s.Type = &v - return s -} - -// Represents a condition that is evaluated. -type Test struct { - _ struct{} `type:"structure"` - - // The test's ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The test's result counters. - Counters *Counters `locationName:"counters" type:"structure"` - - // When the test was created. - Created *time.Time `locationName:"created" type:"timestamp"` - - // Represents the total (metered or unmetered) minutes used by the test. - DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` - - // A message about the test's result. - Message *string `locationName:"message" type:"string"` - - // The test's name. - Name *string `locationName:"name" type:"string"` - - // The test's result. - // - // Allowed values include: - // - // * PENDING: A pending condition. - // - // * PASSED: A passing condition. - // - // * WARNED: A warning condition. - // - // * FAILED: A failed condition. - // - // * SKIPPED: A skipped condition. - // - // * ERRORED: An error condition. - // - // * STOPPED: A stopped condition. - Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` - - // The test's start time. - Started *time.Time `locationName:"started" type:"timestamp"` - - // The test's status. - // - // Allowed values include: - // - // * PENDING: A pending status. - // - // * PENDING_CONCURRENCY: A pending concurrency status. - // - // * PENDING_DEVICE: A pending device status. - // - // * PROCESSING: A processing status. - // - // * SCHEDULING: A scheduling status. - // - // * PREPARING: A preparing status. - // - // * RUNNING: A running status. - // - // * COMPLETED: A completed status. - // - // * STOPPING: A stopping status. - Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` - - // The test's stop time. - Stopped *time.Time `locationName:"stopped" type:"timestamp"` - - // The test's type. - // - // Must be one of the following values: - // - // * BUILTIN_FUZZ: The built-in fuzz type. - // - // * BUILTIN_EXPLORER: For Android, an app explorer that will traverse an - // Android app, interacting with it and capturing screenshots at the same - // time. - // - // * APPIUM_JAVA_JUNIT: The Appium Java JUnit type. - // - // * APPIUM_JAVA_TESTNG: The Appium Java TestNG type. - // - // * APPIUM_PYTHON: The Appium Python type. - // - // * APPIUM_NODE: The Appium Node.js type. - // - // * APPIUM_RUBY: The Appium Ruby type. - // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. - // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. - // - // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. - // - // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. - // - // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. - // - // * CALABASH: The Calabash type. - // - // * INSTRUMENTATION: The Instrumentation type. - // - // * UIAUTOMATION: The uiautomation type. - // - // * UIAUTOMATOR: The uiautomator type. - // - // * XCTEST: The XCode test type. - // - // * XCTEST_UI: The XCode UI test type. - Type *string `locationName:"type" type:"string" enum:"TestType"` -} - -// String returns the string representation -func (s Test) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Test) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Test) SetArn(v string) *Test { - s.Arn = &v - return s -} - -// SetCounters sets the Counters field's value. -func (s *Test) SetCounters(v *Counters) *Test { - s.Counters = v - return s -} - -// SetCreated sets the Created field's value. -func (s *Test) SetCreated(v time.Time) *Test { - s.Created = &v - return s -} - -// SetDeviceMinutes sets the DeviceMinutes field's value. -func (s *Test) SetDeviceMinutes(v *DeviceMinutes) *Test { - s.DeviceMinutes = v - return s -} - -// SetMessage sets the Message field's value. -func (s *Test) SetMessage(v string) *Test { - s.Message = &v - return s -} - -// SetName sets the Name field's value. -func (s *Test) SetName(v string) *Test { - s.Name = &v - return s -} - -// SetResult sets the Result field's value. -func (s *Test) SetResult(v string) *Test { - s.Result = &v - return s -} - -// SetStarted sets the Started field's value. -func (s *Test) SetStarted(v time.Time) *Test { - s.Started = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Test) SetStatus(v string) *Test { - s.Status = &v - return s -} - -// SetStopped sets the Stopped field's value. -func (s *Test) SetStopped(v time.Time) *Test { - s.Stopped = &v - return s -} - -// SetType sets the Type field's value. -func (s *Test) SetType(v string) *Test { - s.Type = &v - return s -} - -// Represents information about free trial device minutes for an AWS account. -type TrialMinutes struct { - _ struct{} `type:"structure"` - - // The number of free trial minutes remaining in the account. - Remaining *float64 `locationName:"remaining" type:"double"` - - // The total number of free trial minutes that the account started with. - Total *float64 `locationName:"total" type:"double"` -} - -// String returns the string representation -func (s TrialMinutes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TrialMinutes) GoString() string { - return s.String() -} - -// SetRemaining sets the Remaining field's value. -func (s *TrialMinutes) SetRemaining(v float64) *TrialMinutes { - s.Remaining = &v - return s -} - -// SetTotal sets the Total field's value. -func (s *TrialMinutes) SetTotal(v float64) *TrialMinutes { - s.Total = &v - return s -} - -// A collection of one or more problems, grouped by their result. -type UniqueProblem struct { - _ struct{} `type:"structure"` - - // A message about the unique problems' result. - Message *string `locationName:"message" type:"string"` - - // Information about the problems. - Problems []*Problem `locationName:"problems" type:"list"` -} - -// String returns the string representation -func (s UniqueProblem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UniqueProblem) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *UniqueProblem) SetMessage(v string) *UniqueProblem { - s.Message = &v - return s -} - -// SetProblems sets the Problems field's value. -func (s *UniqueProblem) SetProblems(v []*Problem) *UniqueProblem { - s.Problems = v - return s -} - -type UpdateDeviceInstanceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the device instance. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // An array of strings that you want to associate with the device instance. - Labels []*string `locationName:"labels" type:"list"` - - // The Amazon Resource Name (ARN) of the profile that you want to associate - // with the device instance. - ProfileArn *string `locationName:"profileArn" min:"32" type:"string"` -} - -// String returns the string representation -func (s UpdateDeviceInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDeviceInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDeviceInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDeviceInstanceInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - if s.ProfileArn != nil && len(*s.ProfileArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ProfileArn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *UpdateDeviceInstanceInput) SetArn(v string) *UpdateDeviceInstanceInput { - s.Arn = &v - return s -} - -// SetLabels sets the Labels field's value. -func (s *UpdateDeviceInstanceInput) SetLabels(v []*string) *UpdateDeviceInstanceInput { - s.Labels = v - return s -} - -// SetProfileArn sets the ProfileArn field's value. -func (s *UpdateDeviceInstanceInput) SetProfileArn(v string) *UpdateDeviceInstanceInput { - s.ProfileArn = &v - return s -} - -type UpdateDeviceInstanceOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about your device instance. - DeviceInstance *DeviceInstance `locationName:"deviceInstance" type:"structure"` -} - -// String returns the string representation -func (s UpdateDeviceInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDeviceInstanceOutput) GoString() string { - return s.String() -} - -// SetDeviceInstance sets the DeviceInstance field's value. -func (s *UpdateDeviceInstanceOutput) SetDeviceInstance(v *DeviceInstance) *UpdateDeviceInstanceOutput { - s.DeviceInstance = v - return s -} - -// Represents a request to the update device pool operation. -type UpdateDevicePoolInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resourc Name (ARN) of the Device Farm device pool you wish to - // update. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // Sets whether the maxDevices parameter applies to your device pool. If you - // set this parameter to true, the maxDevices parameter does not apply, and - // Device Farm does not limit the number of devices that it adds to your device - // pool. In this case, Device Farm adds all available devices that meet the - // criteria that are specified for the rules parameter. - // - // If you use this parameter in your request, you cannot use the maxDevices - // parameter in the same request. - ClearMaxDevices *bool `locationName:"clearMaxDevices" type:"boolean"` - - // A description of the device pool you wish to update. - Description *string `locationName:"description" type:"string"` - - // The number of devices that Device Farm can add to your device pool. Device - // Farm adds devices that are available and that meet the criteria that you - // assign for the rules parameter. Depending on how many devices meet these - // constraints, your device pool might contain fewer devices than the value - // for this parameter. - // - // By specifying the maximum number of devices, you can control the costs that - // you incur by running tests. - // - // If you use this parameter in your request, you cannot use the clearMaxDevices - // parameter in the same request. - MaxDevices *int64 `locationName:"maxDevices" type:"integer"` - - // A string representing the name of the device pool you wish to update. - Name *string `locationName:"name" type:"string"` - - // Represents the rules you wish to modify for the device pool. Updating rules - // is optional; however, if you choose to update rules for your request, the - // update will replace the existing rules. - Rules []*Rule `locationName:"rules" type:"list"` -} - -// String returns the string representation -func (s UpdateDevicePoolInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDevicePoolInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDevicePoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDevicePoolInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *UpdateDevicePoolInput) SetArn(v string) *UpdateDevicePoolInput { - s.Arn = &v - return s -} - -// SetClearMaxDevices sets the ClearMaxDevices field's value. -func (s *UpdateDevicePoolInput) SetClearMaxDevices(v bool) *UpdateDevicePoolInput { - s.ClearMaxDevices = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateDevicePoolInput) SetDescription(v string) *UpdateDevicePoolInput { - s.Description = &v - return s -} - -// SetMaxDevices sets the MaxDevices field's value. -func (s *UpdateDevicePoolInput) SetMaxDevices(v int64) *UpdateDevicePoolInput { - s.MaxDevices = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateDevicePoolInput) SetName(v string) *UpdateDevicePoolInput { - s.Name = &v - return s -} - -// SetRules sets the Rules field's value. -func (s *UpdateDevicePoolInput) SetRules(v []*Rule) *UpdateDevicePoolInput { - s.Rules = v - return s -} - -// Represents the result of an update device pool request. -type UpdateDevicePoolOutput struct { - _ struct{} `type:"structure"` - - // The device pool you just updated. - DevicePool *DevicePool `locationName:"devicePool" type:"structure"` -} - -// String returns the string representation -func (s UpdateDevicePoolOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDevicePoolOutput) GoString() string { - return s.String() -} - -// SetDevicePool sets the DevicePool field's value. -func (s *UpdateDevicePoolOutput) SetDevicePool(v *DevicePool) *UpdateDevicePoolOutput { - s.DevicePool = v - return s -} - -type UpdateInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the instance profile. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // The updated description for your instance profile. - Description *string `locationName:"description" type:"string"` - - // An array of strings specifying the list of app packages that should not be - // cleaned up from the device after a test run is over. - // - // The list of packages is only considered if you set packageCleanup to true. - ExcludeAppPackagesFromCleanup []*string `locationName:"excludeAppPackagesFromCleanup" type:"list"` - - // The updated name for your instance profile. - Name *string `locationName:"name" type:"string"` - - // The updated choice for whether you want to specify package cleanup. The default - // value is false for private devices. - PackageCleanup *bool `locationName:"packageCleanup" type:"boolean"` - - // The updated choice for whether you want to reboot the device after use. The - // default value is true. - RebootAfterUse *bool `locationName:"rebootAfterUse" type:"boolean"` -} - -// String returns the string representation -func (s UpdateInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateInstanceProfileInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *UpdateInstanceProfileInput) SetArn(v string) *UpdateInstanceProfileInput { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateInstanceProfileInput) SetDescription(v string) *UpdateInstanceProfileInput { - s.Description = &v - return s -} - -// SetExcludeAppPackagesFromCleanup sets the ExcludeAppPackagesFromCleanup field's value. -func (s *UpdateInstanceProfileInput) SetExcludeAppPackagesFromCleanup(v []*string) *UpdateInstanceProfileInput { - s.ExcludeAppPackagesFromCleanup = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateInstanceProfileInput) SetName(v string) *UpdateInstanceProfileInput { - s.Name = &v - return s -} - -// SetPackageCleanup sets the PackageCleanup field's value. -func (s *UpdateInstanceProfileInput) SetPackageCleanup(v bool) *UpdateInstanceProfileInput { - s.PackageCleanup = &v - return s -} - -// SetRebootAfterUse sets the RebootAfterUse field's value. -func (s *UpdateInstanceProfileInput) SetRebootAfterUse(v bool) *UpdateInstanceProfileInput { - s.RebootAfterUse = &v - return s -} - -type UpdateInstanceProfileOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about your instance profile. - InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` -} - -// String returns the string representation -func (s UpdateInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateInstanceProfileOutput) GoString() string { - return s.String() -} - -// SetInstanceProfile sets the InstanceProfile field's value. -func (s *UpdateInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *UpdateInstanceProfileOutput { - s.InstanceProfile = v - return s -} - -type UpdateNetworkProfileInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the project for which you want to update - // network profile settings. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // The descriptoin of the network profile about which you are returning information. - Description *string `locationName:"description" type:"string"` - - // The data throughput rate in bits per second, as an integer from 0 to 104857600. - DownlinkBandwidthBits *int64 `locationName:"downlinkBandwidthBits" type:"long"` - - // Delay time for all packets to destination in milliseconds as an integer from - // 0 to 2000. - DownlinkDelayMs *int64 `locationName:"downlinkDelayMs" type:"long"` - - // Time variation in the delay of received packets in milliseconds as an integer - // from 0 to 2000. - DownlinkJitterMs *int64 `locationName:"downlinkJitterMs" type:"long"` - - // Proportion of received packets that fail to arrive from 0 to 100 percent. - DownlinkLossPercent *int64 `locationName:"downlinkLossPercent" type:"integer"` - - // The name of the network profile about which you are returning information. - Name *string `locationName:"name" type:"string"` - - // The type of network profile you wish to return information about. Valid values - // are listed below. - Type *string `locationName:"type" type:"string" enum:"NetworkProfileType"` - - // The data throughput rate in bits per second, as an integer from 0 to 104857600. - UplinkBandwidthBits *int64 `locationName:"uplinkBandwidthBits" type:"long"` - - // Delay time for all packets to destination in milliseconds as an integer from - // 0 to 2000. - UplinkDelayMs *int64 `locationName:"uplinkDelayMs" type:"long"` - - // Time variation in the delay of received packets in milliseconds as an integer - // from 0 to 2000. - UplinkJitterMs *int64 `locationName:"uplinkJitterMs" type:"long"` - - // Proportion of transmitted packets that fail to arrive from 0 to 100 percent. - UplinkLossPercent *int64 `locationName:"uplinkLossPercent" type:"integer"` -} - -// String returns the string representation -func (s UpdateNetworkProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateNetworkProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateNetworkProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateNetworkProfileInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *UpdateNetworkProfileInput) SetArn(v string) *UpdateNetworkProfileInput { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateNetworkProfileInput) SetDescription(v string) *UpdateNetworkProfileInput { - s.Description = &v - return s -} - -// SetDownlinkBandwidthBits sets the DownlinkBandwidthBits field's value. -func (s *UpdateNetworkProfileInput) SetDownlinkBandwidthBits(v int64) *UpdateNetworkProfileInput { - s.DownlinkBandwidthBits = &v - return s -} - -// SetDownlinkDelayMs sets the DownlinkDelayMs field's value. -func (s *UpdateNetworkProfileInput) SetDownlinkDelayMs(v int64) *UpdateNetworkProfileInput { - s.DownlinkDelayMs = &v - return s -} - -// SetDownlinkJitterMs sets the DownlinkJitterMs field's value. -func (s *UpdateNetworkProfileInput) SetDownlinkJitterMs(v int64) *UpdateNetworkProfileInput { - s.DownlinkJitterMs = &v - return s -} - -// SetDownlinkLossPercent sets the DownlinkLossPercent field's value. -func (s *UpdateNetworkProfileInput) SetDownlinkLossPercent(v int64) *UpdateNetworkProfileInput { - s.DownlinkLossPercent = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateNetworkProfileInput) SetName(v string) *UpdateNetworkProfileInput { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *UpdateNetworkProfileInput) SetType(v string) *UpdateNetworkProfileInput { - s.Type = &v - return s -} - -// SetUplinkBandwidthBits sets the UplinkBandwidthBits field's value. -func (s *UpdateNetworkProfileInput) SetUplinkBandwidthBits(v int64) *UpdateNetworkProfileInput { - s.UplinkBandwidthBits = &v - return s -} - -// SetUplinkDelayMs sets the UplinkDelayMs field's value. -func (s *UpdateNetworkProfileInput) SetUplinkDelayMs(v int64) *UpdateNetworkProfileInput { - s.UplinkDelayMs = &v - return s -} - -// SetUplinkJitterMs sets the UplinkJitterMs field's value. -func (s *UpdateNetworkProfileInput) SetUplinkJitterMs(v int64) *UpdateNetworkProfileInput { - s.UplinkJitterMs = &v - return s -} - -// SetUplinkLossPercent sets the UplinkLossPercent field's value. -func (s *UpdateNetworkProfileInput) SetUplinkLossPercent(v int64) *UpdateNetworkProfileInput { - s.UplinkLossPercent = &v - return s -} - -type UpdateNetworkProfileOutput struct { - _ struct{} `type:"structure"` - - // A list of the available network profiles. - NetworkProfile *NetworkProfile `locationName:"networkProfile" type:"structure"` -} - -// String returns the string representation -func (s UpdateNetworkProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateNetworkProfileOutput) GoString() string { - return s.String() -} - -// SetNetworkProfile sets the NetworkProfile field's value. -func (s *UpdateNetworkProfileOutput) SetNetworkProfile(v *NetworkProfile) *UpdateNetworkProfileOutput { - s.NetworkProfile = v - return s -} - -// Represents a request to the update project operation. -type UpdateProjectInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the project whose name you wish to update. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // The number of minutes a test run in the project will execute before it times - // out. - DefaultJobTimeoutMinutes *int64 `locationName:"defaultJobTimeoutMinutes" type:"integer"` - - // A string representing the new name of the project that you are updating. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s UpdateProjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateProjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateProjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateProjectInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *UpdateProjectInput) SetArn(v string) *UpdateProjectInput { - s.Arn = &v - return s -} - -// SetDefaultJobTimeoutMinutes sets the DefaultJobTimeoutMinutes field's value. -func (s *UpdateProjectInput) SetDefaultJobTimeoutMinutes(v int64) *UpdateProjectInput { - s.DefaultJobTimeoutMinutes = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateProjectInput) SetName(v string) *UpdateProjectInput { - s.Name = &v - return s -} - -// Represents the result of an update project request. -type UpdateProjectOutput struct { - _ struct{} `type:"structure"` - - // The project you wish to update. - Project *Project `locationName:"project" type:"structure"` -} - -// String returns the string representation -func (s UpdateProjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateProjectOutput) GoString() string { - return s.String() -} - -// SetProject sets the Project field's value. -func (s *UpdateProjectOutput) SetProject(v *Project) *UpdateProjectOutput { - s.Project = v - return s -} - -type UpdateUploadInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the uploaded test spec. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // The upload's content type (for example, "application/x-yaml"). - ContentType *string `locationName:"contentType" type:"string"` - - // Set to true if the YAML file has changed and needs to be updated; otherwise, - // set to false. - EditContent *bool `locationName:"editContent" type:"boolean"` - - // The upload's test spec file name. The name should not contain the '/' character. - // The test spec file name must end with the .yaml or .yml file extension. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s UpdateUploadInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUploadInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateUploadInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *UpdateUploadInput) SetArn(v string) *UpdateUploadInput { - s.Arn = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *UpdateUploadInput) SetContentType(v string) *UpdateUploadInput { - s.ContentType = &v - return s -} - -// SetEditContent sets the EditContent field's value. -func (s *UpdateUploadInput) SetEditContent(v bool) *UpdateUploadInput { - s.EditContent = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateUploadInput) SetName(v string) *UpdateUploadInput { - s.Name = &v - return s -} - -type UpdateUploadOutput struct { - _ struct{} `type:"structure"` - - // A test spec uploaded to Device Farm. - Upload *Upload `locationName:"upload" type:"structure"` -} - -// String returns the string representation -func (s UpdateUploadOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUploadOutput) GoString() string { - return s.String() -} - -// SetUpload sets the Upload field's value. -func (s *UpdateUploadOutput) SetUpload(v *Upload) *UpdateUploadOutput { - s.Upload = v - return s -} - -type UpdateVPCEConfigurationInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want - // to update. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // The DNS (domain) name used to connect to your private service in your Amazon - // VPC. The DNS name must not already be in use on the Internet. - ServiceDnsName *string `locationName:"serviceDnsName" type:"string"` - - // An optional description, providing more details about your VPC endpoint configuration. - VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` - - // The friendly name you give to your VPC endpoint configuration, to manage - // your configurations more easily. - VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string"` - - // The name of the VPC endpoint service running inside your AWS account that - // you want Device Farm to test. - VpceServiceName *string `locationName:"vpceServiceName" type:"string"` -} - -// String returns the string representation -func (s UpdateVPCEConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVPCEConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateVPCEConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateVPCEConfigurationInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *UpdateVPCEConfigurationInput) SetArn(v string) *UpdateVPCEConfigurationInput { - s.Arn = &v - return s -} - -// SetServiceDnsName sets the ServiceDnsName field's value. -func (s *UpdateVPCEConfigurationInput) SetServiceDnsName(v string) *UpdateVPCEConfigurationInput { - s.ServiceDnsName = &v - return s -} - -// SetVpceConfigurationDescription sets the VpceConfigurationDescription field's value. -func (s *UpdateVPCEConfigurationInput) SetVpceConfigurationDescription(v string) *UpdateVPCEConfigurationInput { - s.VpceConfigurationDescription = &v - return s -} - -// SetVpceConfigurationName sets the VpceConfigurationName field's value. -func (s *UpdateVPCEConfigurationInput) SetVpceConfigurationName(v string) *UpdateVPCEConfigurationInput { - s.VpceConfigurationName = &v - return s -} - -// SetVpceServiceName sets the VpceServiceName field's value. -func (s *UpdateVPCEConfigurationInput) SetVpceServiceName(v string) *UpdateVPCEConfigurationInput { - s.VpceServiceName = &v - return s -} - -type UpdateVPCEConfigurationOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about your VPC endpoint configuration. - VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` -} - -// String returns the string representation -func (s UpdateVPCEConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVPCEConfigurationOutput) GoString() string { - return s.String() -} - -// SetVpceConfiguration sets the VpceConfiguration field's value. -func (s *UpdateVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *UpdateVPCEConfigurationOutput { - s.VpceConfiguration = v - return s -} - -// An app or a set of one or more tests to upload or that have been uploaded. -type Upload struct { - _ struct{} `type:"structure"` - - // The upload's ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The upload's category. Allowed values include: - // - // * CURATED: An upload managed by AWS Device Farm. - // - // * PRIVATE: An upload managed by the AWS Device Farm customer. - Category *string `locationName:"category" type:"string" enum:"UploadCategory"` - - // The upload's content type (for example, "application/octet-stream"). - ContentType *string `locationName:"contentType" type:"string"` - - // When the upload was created. - Created *time.Time `locationName:"created" type:"timestamp"` - - // A message about the upload's result. - Message *string `locationName:"message" type:"string"` - - // The upload's metadata. For example, for Android, this contains information - // that is parsed from the manifest and is displayed in the AWS Device Farm - // console after the associated app is uploaded. - Metadata *string `locationName:"metadata" type:"string"` - - // The upload's file name. - Name *string `locationName:"name" type:"string"` - - // The upload's status. - // - // Must be one of the following values: - // - // * FAILED: A failed status. - // - // * INITIALIZED: An initialized status. - // - // * PROCESSING: A processing status. - // - // * SUCCEEDED: A succeeded status. - Status *string `locationName:"status" type:"string" enum:"UploadStatus"` - - // The upload's type. - // - // Must be one of the following values: - // - // * ANDROID_APP: An Android upload. - // - // * IOS_APP: An iOS upload. - // - // * WEB_APP: A web appliction upload. - // - // * EXTERNAL_DATA: An external data upload. - // - // * APPIUM_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package upload. - // - // * APPIUM_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload. - // - // * APPIUM_PYTHON_TEST_PACKAGE: An Appium Python test package upload. - // - // * APPIUM_NODE_TEST_PACKAGE: An Appium Node.js test package upload. - // - // * APPIUM_RUBY_TEST_PACKAGE: An Appium Ruby test package upload. - // - // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package - // upload for web apps. - // - // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload for web apps. - // - // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload - // for web apps. - // - // * APPIUM_WEB_NODE_TEST_PACKAGE: An Appium Node.js test package upload - // for web apps. - // - // * APPIUM_WEB_RUBY_TEST_PACKAGE: An Appium Ruby test package upload for - // web apps. - // - // * CALABASH_TEST_PACKAGE: A Calabash test package upload. - // - // * INSTRUMENTATION_TEST_PACKAGE: An instrumentation upload. - // - // * UIAUTOMATION_TEST_PACKAGE: A uiautomation test package upload. - // - // * UIAUTOMATOR_TEST_PACKAGE: A uiautomator test package upload. - // - // * XCTEST_TEST_PACKAGE: An XCode test package upload. - // - // * XCTEST_UI_TEST_PACKAGE: An XCode UI test package upload. - // - // * APPIUM_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. - // - // * APPIUM_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. - // - // * APPIUM_PYTHON_TEST_SPEC: An Appium Python test spec upload. - // - // * APPIUM_NODE_TEST_SPEC: An Appium Node.js test spec upload. - // - // * APPIUM_RUBY_TEST_SPEC: An Appium Ruby test spec upload. - // - // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload - // for a web app. - // - // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload - // for a web app. - // - // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload for a - // web app. - // - // * APPIUM_WEB_NODE_TEST_SPEC: An Appium Node.js test spec upload for a - // web app. - // - // * APPIUM_WEB_RUBY_TEST_SPEC: An Appium Ruby test spec upload for a web - // app. - // - // * INSTRUMENTATION_TEST_SPEC: An instrumentation test spec upload. - // - // * XCTEST_UI_TEST_SPEC: An XCode UI test spec upload. - Type *string `locationName:"type" type:"string" enum:"UploadType"` - - // The pre-signed Amazon S3 URL that was used to store a file through a corresponding - // PUT request. - Url *string `locationName:"url" type:"string"` -} - -// String returns the string representation -func (s Upload) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Upload) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Upload) SetArn(v string) *Upload { - s.Arn = &v - return s -} - -// SetCategory sets the Category field's value. -func (s *Upload) SetCategory(v string) *Upload { - s.Category = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *Upload) SetContentType(v string) *Upload { - s.ContentType = &v - return s -} - -// SetCreated sets the Created field's value. -func (s *Upload) SetCreated(v time.Time) *Upload { - s.Created = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *Upload) SetMessage(v string) *Upload { - s.Message = &v - return s -} - -// SetMetadata sets the Metadata field's value. -func (s *Upload) SetMetadata(v string) *Upload { - s.Metadata = &v - return s -} - -// SetName sets the Name field's value. -func (s *Upload) SetName(v string) *Upload { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Upload) SetStatus(v string) *Upload { - s.Status = &v - return s -} - -// SetType sets the Type field's value. -func (s *Upload) SetType(v string) *Upload { - s.Type = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *Upload) SetUrl(v string) *Upload { - s.Url = &v - return s -} - -// Represents an Amazon Virtual Private Cloud (VPC) endpoint configuration. -type VPCEConfiguration struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the VPC endpoint configuration. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The DNS name that maps to the private IP address of the service you want - // to access. - ServiceDnsName *string `locationName:"serviceDnsName" type:"string"` - - // An optional description, providing more details about your VPC endpoint configuration. - VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` - - // The friendly name you give to your VPC endpoint configuration, to manage - // your configurations more easily. - VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string"` - - // The name of the VPC endpoint service running inside your AWS account that - // you want Device Farm to test. - VpceServiceName *string `locationName:"vpceServiceName" type:"string"` -} - -// String returns the string representation -func (s VPCEConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VPCEConfiguration) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *VPCEConfiguration) SetArn(v string) *VPCEConfiguration { - s.Arn = &v - return s -} - -// SetServiceDnsName sets the ServiceDnsName field's value. -func (s *VPCEConfiguration) SetServiceDnsName(v string) *VPCEConfiguration { - s.ServiceDnsName = &v - return s -} - -// SetVpceConfigurationDescription sets the VpceConfigurationDescription field's value. -func (s *VPCEConfiguration) SetVpceConfigurationDescription(v string) *VPCEConfiguration { - s.VpceConfigurationDescription = &v - return s -} - -// SetVpceConfigurationName sets the VpceConfigurationName field's value. -func (s *VPCEConfiguration) SetVpceConfigurationName(v string) *VPCEConfiguration { - s.VpceConfigurationName = &v - return s -} - -// SetVpceServiceName sets the VpceServiceName field's value. -func (s *VPCEConfiguration) SetVpceServiceName(v string) *VPCEConfiguration { - s.VpceServiceName = &v - return s -} - -const ( - // ArtifactCategoryScreenshot is a ArtifactCategory enum value - ArtifactCategoryScreenshot = "SCREENSHOT" - - // ArtifactCategoryFile is a ArtifactCategory enum value - ArtifactCategoryFile = "FILE" - - // ArtifactCategoryLog is a ArtifactCategory enum value - ArtifactCategoryLog = "LOG" -) - -const ( - // ArtifactTypeUnknown is a ArtifactType enum value - ArtifactTypeUnknown = "UNKNOWN" - - // ArtifactTypeScreenshot is a ArtifactType enum value - ArtifactTypeScreenshot = "SCREENSHOT" - - // ArtifactTypeDeviceLog is a ArtifactType enum value - ArtifactTypeDeviceLog = "DEVICE_LOG" - - // ArtifactTypeMessageLog is a ArtifactType enum value - ArtifactTypeMessageLog = "MESSAGE_LOG" - - // ArtifactTypeVideoLog is a ArtifactType enum value - ArtifactTypeVideoLog = "VIDEO_LOG" - - // ArtifactTypeResultLog is a ArtifactType enum value - ArtifactTypeResultLog = "RESULT_LOG" - - // ArtifactTypeServiceLog is a ArtifactType enum value - ArtifactTypeServiceLog = "SERVICE_LOG" - - // ArtifactTypeWebkitLog is a ArtifactType enum value - ArtifactTypeWebkitLog = "WEBKIT_LOG" - - // ArtifactTypeInstrumentationOutput is a ArtifactType enum value - ArtifactTypeInstrumentationOutput = "INSTRUMENTATION_OUTPUT" - - // ArtifactTypeExerciserMonkeyOutput is a ArtifactType enum value - ArtifactTypeExerciserMonkeyOutput = "EXERCISER_MONKEY_OUTPUT" - - // ArtifactTypeCalabashJsonOutput is a ArtifactType enum value - ArtifactTypeCalabashJsonOutput = "CALABASH_JSON_OUTPUT" - - // ArtifactTypeCalabashPrettyOutput is a ArtifactType enum value - ArtifactTypeCalabashPrettyOutput = "CALABASH_PRETTY_OUTPUT" - - // ArtifactTypeCalabashStandardOutput is a ArtifactType enum value - ArtifactTypeCalabashStandardOutput = "CALABASH_STANDARD_OUTPUT" - - // ArtifactTypeCalabashJavaXmlOutput is a ArtifactType enum value - ArtifactTypeCalabashJavaXmlOutput = "CALABASH_JAVA_XML_OUTPUT" - - // ArtifactTypeAutomationOutput is a ArtifactType enum value - ArtifactTypeAutomationOutput = "AUTOMATION_OUTPUT" - - // ArtifactTypeAppiumServerOutput is a ArtifactType enum value - ArtifactTypeAppiumServerOutput = "APPIUM_SERVER_OUTPUT" - - // ArtifactTypeAppiumJavaOutput is a ArtifactType enum value - ArtifactTypeAppiumJavaOutput = "APPIUM_JAVA_OUTPUT" - - // ArtifactTypeAppiumJavaXmlOutput is a ArtifactType enum value - ArtifactTypeAppiumJavaXmlOutput = "APPIUM_JAVA_XML_OUTPUT" - - // ArtifactTypeAppiumPythonOutput is a ArtifactType enum value - ArtifactTypeAppiumPythonOutput = "APPIUM_PYTHON_OUTPUT" - - // ArtifactTypeAppiumPythonXmlOutput is a ArtifactType enum value - ArtifactTypeAppiumPythonXmlOutput = "APPIUM_PYTHON_XML_OUTPUT" - - // ArtifactTypeExplorerEventLog is a ArtifactType enum value - ArtifactTypeExplorerEventLog = "EXPLORER_EVENT_LOG" - - // ArtifactTypeExplorerSummaryLog is a ArtifactType enum value - ArtifactTypeExplorerSummaryLog = "EXPLORER_SUMMARY_LOG" - - // ArtifactTypeApplicationCrashReport is a ArtifactType enum value - ArtifactTypeApplicationCrashReport = "APPLICATION_CRASH_REPORT" - - // ArtifactTypeXctestLog is a ArtifactType enum value - ArtifactTypeXctestLog = "XCTEST_LOG" - - // ArtifactTypeVideo is a ArtifactType enum value - ArtifactTypeVideo = "VIDEO" - - // ArtifactTypeCustomerArtifact is a ArtifactType enum value - ArtifactTypeCustomerArtifact = "CUSTOMER_ARTIFACT" - - // ArtifactTypeCustomerArtifactLog is a ArtifactType enum value - ArtifactTypeCustomerArtifactLog = "CUSTOMER_ARTIFACT_LOG" - - // ArtifactTypeTestspecOutput is a ArtifactType enum value - ArtifactTypeTestspecOutput = "TESTSPEC_OUTPUT" -) - -const ( - // BillingMethodMetered is a BillingMethod enum value - BillingMethodMetered = "METERED" - - // BillingMethodUnmetered is a BillingMethod enum value - BillingMethodUnmetered = "UNMETERED" -) - -const ( - // CurrencyCodeUsd is a CurrencyCode enum value - CurrencyCodeUsd = "USD" -) - -const ( - // DeviceAttributeArn is a DeviceAttribute enum value - DeviceAttributeArn = "ARN" - - // DeviceAttributePlatform is a DeviceAttribute enum value - DeviceAttributePlatform = "PLATFORM" - - // DeviceAttributeFormFactor is a DeviceAttribute enum value - DeviceAttributeFormFactor = "FORM_FACTOR" - - // DeviceAttributeManufacturer is a DeviceAttribute enum value - DeviceAttributeManufacturer = "MANUFACTURER" - - // DeviceAttributeRemoteAccessEnabled is a DeviceAttribute enum value - DeviceAttributeRemoteAccessEnabled = "REMOTE_ACCESS_ENABLED" - - // DeviceAttributeRemoteDebugEnabled is a DeviceAttribute enum value - DeviceAttributeRemoteDebugEnabled = "REMOTE_DEBUG_ENABLED" - - // DeviceAttributeAppiumVersion is a DeviceAttribute enum value - DeviceAttributeAppiumVersion = "APPIUM_VERSION" - - // DeviceAttributeInstanceArn is a DeviceAttribute enum value - DeviceAttributeInstanceArn = "INSTANCE_ARN" - - // DeviceAttributeInstanceLabels is a DeviceAttribute enum value - DeviceAttributeInstanceLabels = "INSTANCE_LABELS" - - // DeviceAttributeFleetType is a DeviceAttribute enum value - DeviceAttributeFleetType = "FLEET_TYPE" - - // DeviceAttributeOsVersion is a DeviceAttribute enum value - DeviceAttributeOsVersion = "OS_VERSION" - - // DeviceAttributeModel is a DeviceAttribute enum value - DeviceAttributeModel = "MODEL" - - // DeviceAttributeAvailability is a DeviceAttribute enum value - DeviceAttributeAvailability = "AVAILABILITY" -) - -const ( - // DeviceAvailabilityTemporaryNotAvailable is a DeviceAvailability enum value - DeviceAvailabilityTemporaryNotAvailable = "TEMPORARY_NOT_AVAILABLE" - - // DeviceAvailabilityBusy is a DeviceAvailability enum value - DeviceAvailabilityBusy = "BUSY" - - // DeviceAvailabilityAvailable is a DeviceAvailability enum value - DeviceAvailabilityAvailable = "AVAILABLE" - - // DeviceAvailabilityHighlyAvailable is a DeviceAvailability enum value - DeviceAvailabilityHighlyAvailable = "HIGHLY_AVAILABLE" -) - -const ( - // DeviceFilterAttributeArn is a DeviceFilterAttribute enum value - DeviceFilterAttributeArn = "ARN" - - // DeviceFilterAttributePlatform is a DeviceFilterAttribute enum value - DeviceFilterAttributePlatform = "PLATFORM" - - // DeviceFilterAttributeOsVersion is a DeviceFilterAttribute enum value - DeviceFilterAttributeOsVersion = "OS_VERSION" - - // DeviceFilterAttributeModel is a DeviceFilterAttribute enum value - DeviceFilterAttributeModel = "MODEL" - - // DeviceFilterAttributeAvailability is a DeviceFilterAttribute enum value - DeviceFilterAttributeAvailability = "AVAILABILITY" - - // DeviceFilterAttributeFormFactor is a DeviceFilterAttribute enum value - DeviceFilterAttributeFormFactor = "FORM_FACTOR" - - // DeviceFilterAttributeManufacturer is a DeviceFilterAttribute enum value - DeviceFilterAttributeManufacturer = "MANUFACTURER" - - // DeviceFilterAttributeRemoteAccessEnabled is a DeviceFilterAttribute enum value - DeviceFilterAttributeRemoteAccessEnabled = "REMOTE_ACCESS_ENABLED" - - // DeviceFilterAttributeRemoteDebugEnabled is a DeviceFilterAttribute enum value - DeviceFilterAttributeRemoteDebugEnabled = "REMOTE_DEBUG_ENABLED" - - // DeviceFilterAttributeInstanceArn is a DeviceFilterAttribute enum value - DeviceFilterAttributeInstanceArn = "INSTANCE_ARN" - - // DeviceFilterAttributeInstanceLabels is a DeviceFilterAttribute enum value - DeviceFilterAttributeInstanceLabels = "INSTANCE_LABELS" - - // DeviceFilterAttributeFleetType is a DeviceFilterAttribute enum value - DeviceFilterAttributeFleetType = "FLEET_TYPE" -) - -const ( - // DeviceFormFactorPhone is a DeviceFormFactor enum value - DeviceFormFactorPhone = "PHONE" - - // DeviceFormFactorTablet is a DeviceFormFactor enum value - DeviceFormFactorTablet = "TABLET" -) - -const ( - // DevicePlatformAndroid is a DevicePlatform enum value - DevicePlatformAndroid = "ANDROID" - - // DevicePlatformIos is a DevicePlatform enum value - DevicePlatformIos = "IOS" -) - -const ( - // DevicePoolTypeCurated is a DevicePoolType enum value - DevicePoolTypeCurated = "CURATED" - - // DevicePoolTypePrivate is a DevicePoolType enum value - DevicePoolTypePrivate = "PRIVATE" -) - -const ( - // ExecutionResultPending is a ExecutionResult enum value - ExecutionResultPending = "PENDING" - - // ExecutionResultPassed is a ExecutionResult enum value - ExecutionResultPassed = "PASSED" - - // ExecutionResultWarned is a ExecutionResult enum value - ExecutionResultWarned = "WARNED" - - // ExecutionResultFailed is a ExecutionResult enum value - ExecutionResultFailed = "FAILED" - - // ExecutionResultSkipped is a ExecutionResult enum value - ExecutionResultSkipped = "SKIPPED" - - // ExecutionResultErrored is a ExecutionResult enum value - ExecutionResultErrored = "ERRORED" - - // ExecutionResultStopped is a ExecutionResult enum value - ExecutionResultStopped = "STOPPED" -) - -const ( - // ExecutionResultCodeParsingFailed is a ExecutionResultCode enum value - ExecutionResultCodeParsingFailed = "PARSING_FAILED" - - // ExecutionResultCodeVpcEndpointSetupFailed is a ExecutionResultCode enum value - ExecutionResultCodeVpcEndpointSetupFailed = "VPC_ENDPOINT_SETUP_FAILED" -) - -const ( - // ExecutionStatusPending is a ExecutionStatus enum value - ExecutionStatusPending = "PENDING" - - // ExecutionStatusPendingConcurrency is a ExecutionStatus enum value - ExecutionStatusPendingConcurrency = "PENDING_CONCURRENCY" - - // ExecutionStatusPendingDevice is a ExecutionStatus enum value - ExecutionStatusPendingDevice = "PENDING_DEVICE" - - // ExecutionStatusProcessing is a ExecutionStatus enum value - ExecutionStatusProcessing = "PROCESSING" - - // ExecutionStatusScheduling is a ExecutionStatus enum value - ExecutionStatusScheduling = "SCHEDULING" - - // ExecutionStatusPreparing is a ExecutionStatus enum value - ExecutionStatusPreparing = "PREPARING" - - // ExecutionStatusRunning is a ExecutionStatus enum value - ExecutionStatusRunning = "RUNNING" - - // ExecutionStatusCompleted is a ExecutionStatus enum value - ExecutionStatusCompleted = "COMPLETED" - - // ExecutionStatusStopping is a ExecutionStatus enum value - ExecutionStatusStopping = "STOPPING" -) - -const ( - // InstanceStatusInUse is a InstanceStatus enum value - InstanceStatusInUse = "IN_USE" - - // InstanceStatusPreparing is a InstanceStatus enum value - InstanceStatusPreparing = "PREPARING" - - // InstanceStatusAvailable is a InstanceStatus enum value - InstanceStatusAvailable = "AVAILABLE" - - // InstanceStatusNotAvailable is a InstanceStatus enum value - InstanceStatusNotAvailable = "NOT_AVAILABLE" -) - -const ( - // InteractionModeInteractive is a InteractionMode enum value - InteractionModeInteractive = "INTERACTIVE" - - // InteractionModeNoVideo is a InteractionMode enum value - InteractionModeNoVideo = "NO_VIDEO" - - // InteractionModeVideoOnly is a InteractionMode enum value - InteractionModeVideoOnly = "VIDEO_ONLY" -) - -const ( - // NetworkProfileTypeCurated is a NetworkProfileType enum value - NetworkProfileTypeCurated = "CURATED" - - // NetworkProfileTypePrivate is a NetworkProfileType enum value - NetworkProfileTypePrivate = "PRIVATE" -) - -const ( - // OfferingTransactionTypePurchase is a OfferingTransactionType enum value - OfferingTransactionTypePurchase = "PURCHASE" - - // OfferingTransactionTypeRenew is a OfferingTransactionType enum value - OfferingTransactionTypeRenew = "RENEW" - - // OfferingTransactionTypeSystem is a OfferingTransactionType enum value - OfferingTransactionTypeSystem = "SYSTEM" -) - -const ( - // OfferingTypeRecurring is a OfferingType enum value - OfferingTypeRecurring = "RECURRING" -) - -const ( - // RecurringChargeFrequencyMonthly is a RecurringChargeFrequency enum value - RecurringChargeFrequencyMonthly = "MONTHLY" -) - -const ( - // RuleOperatorEquals is a RuleOperator enum value - RuleOperatorEquals = "EQUALS" - - // RuleOperatorLessThan is a RuleOperator enum value - RuleOperatorLessThan = "LESS_THAN" - - // RuleOperatorLessThanOrEquals is a RuleOperator enum value - RuleOperatorLessThanOrEquals = "LESS_THAN_OR_EQUALS" - - // RuleOperatorGreaterThan is a RuleOperator enum value - RuleOperatorGreaterThan = "GREATER_THAN" - - // RuleOperatorGreaterThanOrEquals is a RuleOperator enum value - RuleOperatorGreaterThanOrEquals = "GREATER_THAN_OR_EQUALS" - - // RuleOperatorIn is a RuleOperator enum value - RuleOperatorIn = "IN" - - // RuleOperatorNotIn is a RuleOperator enum value - RuleOperatorNotIn = "NOT_IN" - - // RuleOperatorContains is a RuleOperator enum value - RuleOperatorContains = "CONTAINS" -) - -const ( - // SampleTypeCpu is a SampleType enum value - SampleTypeCpu = "CPU" - - // SampleTypeMemory is a SampleType enum value - SampleTypeMemory = "MEMORY" - - // SampleTypeThreads is a SampleType enum value - SampleTypeThreads = "THREADS" - - // SampleTypeRxRate is a SampleType enum value - SampleTypeRxRate = "RX_RATE" - - // SampleTypeTxRate is a SampleType enum value - SampleTypeTxRate = "TX_RATE" - - // SampleTypeRx is a SampleType enum value - SampleTypeRx = "RX" - - // SampleTypeTx is a SampleType enum value - SampleTypeTx = "TX" - - // SampleTypeNativeFrames is a SampleType enum value - SampleTypeNativeFrames = "NATIVE_FRAMES" - - // SampleTypeNativeFps is a SampleType enum value - SampleTypeNativeFps = "NATIVE_FPS" - - // SampleTypeNativeMinDrawtime is a SampleType enum value - SampleTypeNativeMinDrawtime = "NATIVE_MIN_DRAWTIME" - - // SampleTypeNativeAvgDrawtime is a SampleType enum value - SampleTypeNativeAvgDrawtime = "NATIVE_AVG_DRAWTIME" - - // SampleTypeNativeMaxDrawtime is a SampleType enum value - SampleTypeNativeMaxDrawtime = "NATIVE_MAX_DRAWTIME" - - // SampleTypeOpenglFrames is a SampleType enum value - SampleTypeOpenglFrames = "OPENGL_FRAMES" - - // SampleTypeOpenglFps is a SampleType enum value - SampleTypeOpenglFps = "OPENGL_FPS" - - // SampleTypeOpenglMinDrawtime is a SampleType enum value - SampleTypeOpenglMinDrawtime = "OPENGL_MIN_DRAWTIME" - - // SampleTypeOpenglAvgDrawtime is a SampleType enum value - SampleTypeOpenglAvgDrawtime = "OPENGL_AVG_DRAWTIME" - - // SampleTypeOpenglMaxDrawtime is a SampleType enum value - SampleTypeOpenglMaxDrawtime = "OPENGL_MAX_DRAWTIME" -) - -const ( - // TestTypeBuiltinFuzz is a TestType enum value - TestTypeBuiltinFuzz = "BUILTIN_FUZZ" - - // TestTypeBuiltinExplorer is a TestType enum value - TestTypeBuiltinExplorer = "BUILTIN_EXPLORER" - - // TestTypeWebPerformanceProfile is a TestType enum value - TestTypeWebPerformanceProfile = "WEB_PERFORMANCE_PROFILE" - - // TestTypeAppiumJavaJunit is a TestType enum value - TestTypeAppiumJavaJunit = "APPIUM_JAVA_JUNIT" - - // TestTypeAppiumJavaTestng is a TestType enum value - TestTypeAppiumJavaTestng = "APPIUM_JAVA_TESTNG" - - // TestTypeAppiumPython is a TestType enum value - TestTypeAppiumPython = "APPIUM_PYTHON" - - // TestTypeAppiumNode is a TestType enum value - TestTypeAppiumNode = "APPIUM_NODE" - - // TestTypeAppiumRuby is a TestType enum value - TestTypeAppiumRuby = "APPIUM_RUBY" - - // TestTypeAppiumWebJavaJunit is a TestType enum value - TestTypeAppiumWebJavaJunit = "APPIUM_WEB_JAVA_JUNIT" - - // TestTypeAppiumWebJavaTestng is a TestType enum value - TestTypeAppiumWebJavaTestng = "APPIUM_WEB_JAVA_TESTNG" - - // TestTypeAppiumWebPython is a TestType enum value - TestTypeAppiumWebPython = "APPIUM_WEB_PYTHON" - - // TestTypeAppiumWebNode is a TestType enum value - TestTypeAppiumWebNode = "APPIUM_WEB_NODE" - - // TestTypeAppiumWebRuby is a TestType enum value - TestTypeAppiumWebRuby = "APPIUM_WEB_RUBY" - - // TestTypeCalabash is a TestType enum value - TestTypeCalabash = "CALABASH" - - // TestTypeInstrumentation is a TestType enum value - TestTypeInstrumentation = "INSTRUMENTATION" - - // TestTypeUiautomation is a TestType enum value - TestTypeUiautomation = "UIAUTOMATION" - - // TestTypeUiautomator is a TestType enum value - TestTypeUiautomator = "UIAUTOMATOR" - - // TestTypeXctest is a TestType enum value - TestTypeXctest = "XCTEST" - - // TestTypeXctestUi is a TestType enum value - TestTypeXctestUi = "XCTEST_UI" - - // TestTypeRemoteAccessRecord is a TestType enum value - TestTypeRemoteAccessRecord = "REMOTE_ACCESS_RECORD" - - // TestTypeRemoteAccessReplay is a TestType enum value - TestTypeRemoteAccessReplay = "REMOTE_ACCESS_REPLAY" -) - -const ( - // UploadCategoryCurated is a UploadCategory enum value - UploadCategoryCurated = "CURATED" - - // UploadCategoryPrivate is a UploadCategory enum value - UploadCategoryPrivate = "PRIVATE" -) - -const ( - // UploadStatusInitialized is a UploadStatus enum value - UploadStatusInitialized = "INITIALIZED" - - // UploadStatusProcessing is a UploadStatus enum value - UploadStatusProcessing = "PROCESSING" - - // UploadStatusSucceeded is a UploadStatus enum value - UploadStatusSucceeded = "SUCCEEDED" - - // UploadStatusFailed is a UploadStatus enum value - UploadStatusFailed = "FAILED" -) - -const ( - // UploadTypeAndroidApp is a UploadType enum value - UploadTypeAndroidApp = "ANDROID_APP" - - // UploadTypeIosApp is a UploadType enum value - UploadTypeIosApp = "IOS_APP" - - // UploadTypeWebApp is a UploadType enum value - UploadTypeWebApp = "WEB_APP" - - // UploadTypeExternalData is a UploadType enum value - UploadTypeExternalData = "EXTERNAL_DATA" - - // UploadTypeAppiumJavaJunitTestPackage is a UploadType enum value - UploadTypeAppiumJavaJunitTestPackage = "APPIUM_JAVA_JUNIT_TEST_PACKAGE" - - // UploadTypeAppiumJavaTestngTestPackage is a UploadType enum value - UploadTypeAppiumJavaTestngTestPackage = "APPIUM_JAVA_TESTNG_TEST_PACKAGE" - - // UploadTypeAppiumPythonTestPackage is a UploadType enum value - UploadTypeAppiumPythonTestPackage = "APPIUM_PYTHON_TEST_PACKAGE" - - // UploadTypeAppiumNodeTestPackage is a UploadType enum value - UploadTypeAppiumNodeTestPackage = "APPIUM_NODE_TEST_PACKAGE" - - // UploadTypeAppiumRubyTestPackage is a UploadType enum value - UploadTypeAppiumRubyTestPackage = "APPIUM_RUBY_TEST_PACKAGE" - - // UploadTypeAppiumWebJavaJunitTestPackage is a UploadType enum value - UploadTypeAppiumWebJavaJunitTestPackage = "APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE" - - // UploadTypeAppiumWebJavaTestngTestPackage is a UploadType enum value - UploadTypeAppiumWebJavaTestngTestPackage = "APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE" - - // UploadTypeAppiumWebPythonTestPackage is a UploadType enum value - UploadTypeAppiumWebPythonTestPackage = "APPIUM_WEB_PYTHON_TEST_PACKAGE" - - // UploadTypeAppiumWebNodeTestPackage is a UploadType enum value - UploadTypeAppiumWebNodeTestPackage = "APPIUM_WEB_NODE_TEST_PACKAGE" - - // UploadTypeAppiumWebRubyTestPackage is a UploadType enum value - UploadTypeAppiumWebRubyTestPackage = "APPIUM_WEB_RUBY_TEST_PACKAGE" - - // UploadTypeCalabashTestPackage is a UploadType enum value - UploadTypeCalabashTestPackage = "CALABASH_TEST_PACKAGE" - - // UploadTypeInstrumentationTestPackage is a UploadType enum value - UploadTypeInstrumentationTestPackage = "INSTRUMENTATION_TEST_PACKAGE" - - // UploadTypeUiautomationTestPackage is a UploadType enum value - UploadTypeUiautomationTestPackage = "UIAUTOMATION_TEST_PACKAGE" - - // UploadTypeUiautomatorTestPackage is a UploadType enum value - UploadTypeUiautomatorTestPackage = "UIAUTOMATOR_TEST_PACKAGE" - - // UploadTypeXctestTestPackage is a UploadType enum value - UploadTypeXctestTestPackage = "XCTEST_TEST_PACKAGE" - - // UploadTypeXctestUiTestPackage is a UploadType enum value - UploadTypeXctestUiTestPackage = "XCTEST_UI_TEST_PACKAGE" - - // UploadTypeAppiumJavaJunitTestSpec is a UploadType enum value - UploadTypeAppiumJavaJunitTestSpec = "APPIUM_JAVA_JUNIT_TEST_SPEC" - - // UploadTypeAppiumJavaTestngTestSpec is a UploadType enum value - UploadTypeAppiumJavaTestngTestSpec = "APPIUM_JAVA_TESTNG_TEST_SPEC" - - // UploadTypeAppiumPythonTestSpec is a UploadType enum value - UploadTypeAppiumPythonTestSpec = "APPIUM_PYTHON_TEST_SPEC" - - // UploadTypeAppiumNodeTestSpec is a UploadType enum value - UploadTypeAppiumNodeTestSpec = "APPIUM_NODE_TEST_SPEC" - - // UploadTypeAppiumRubyTestSpec is a UploadType enum value - UploadTypeAppiumRubyTestSpec = "APPIUM_RUBY_TEST_SPEC" - - // UploadTypeAppiumWebJavaJunitTestSpec is a UploadType enum value - UploadTypeAppiumWebJavaJunitTestSpec = "APPIUM_WEB_JAVA_JUNIT_TEST_SPEC" - - // UploadTypeAppiumWebJavaTestngTestSpec is a UploadType enum value - UploadTypeAppiumWebJavaTestngTestSpec = "APPIUM_WEB_JAVA_TESTNG_TEST_SPEC" - - // UploadTypeAppiumWebPythonTestSpec is a UploadType enum value - UploadTypeAppiumWebPythonTestSpec = "APPIUM_WEB_PYTHON_TEST_SPEC" - - // UploadTypeAppiumWebNodeTestSpec is a UploadType enum value - UploadTypeAppiumWebNodeTestSpec = "APPIUM_WEB_NODE_TEST_SPEC" - - // UploadTypeAppiumWebRubyTestSpec is a UploadType enum value - UploadTypeAppiumWebRubyTestSpec = "APPIUM_WEB_RUBY_TEST_SPEC" - - // UploadTypeInstrumentationTestSpec is a UploadType enum value - UploadTypeInstrumentationTestSpec = "INSTRUMENTATION_TEST_SPEC" - - // UploadTypeXctestUiTestSpec is a UploadType enum value - UploadTypeXctestUiTestSpec = "XCTEST_UI_TEST_SPEC" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/doc.go deleted file mode 100644 index 35e8d6e4d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/doc.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package devicefarm provides the client and types for making API -// requests to AWS Device Farm. -// -// AWS Device Farm is a service that enables mobile app developers to test Android, -// iOS, and Fire OS apps on physical phones, tablets, and other devices in the -// cloud. -// -// See https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23 for more information on this service. -// -// See devicefarm package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/devicefarm/ -// -// Using the Client -// -// To contact AWS Device Farm 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 Device Farm client DeviceFarm for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/devicefarm/#New -package devicefarm diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go deleted file mode 100644 index 2d9e5abdf..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package devicefarm - -const ( - - // ErrCodeArgumentException for service response error code - // "ArgumentException". - // - // An invalid argument was specified. - ErrCodeArgumentException = "ArgumentException" - - // ErrCodeIdempotencyException for service response error code - // "IdempotencyException". - // - // An entity with the same name already exists. - ErrCodeIdempotencyException = "IdempotencyException" - - // ErrCodeInvalidOperationException for service response error code - // "InvalidOperationException". - // - // There was an error with the update request, or you do not have sufficient - // permissions to update this VPC endpoint configuration. - ErrCodeInvalidOperationException = "InvalidOperationException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // A limit was exceeded. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeNotEligibleException for service response error code - // "NotEligibleException". - // - // Exception gets thrown when a user is not eligible to perform the specified - // transaction. - ErrCodeNotEligibleException = "NotEligibleException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // The specified entity was not found. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeServiceAccountException for service response error code - // "ServiceAccountException". - // - // There was a problem with the service account. - ErrCodeServiceAccountException = "ServiceAccountException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go deleted file mode 100644 index 0f2354a4e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package devicefarm - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// DeviceFarm provides the API operation methods for making requests to -// AWS Device Farm. See this package's package overview docs -// for details on the service. -// -// DeviceFarm methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type DeviceFarm 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 = "devicefarm" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Device Farm" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the DeviceFarm client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a DeviceFarm client from just a session. -// svc := devicefarm.New(mySession) -// -// // Create a DeviceFarm client with additional configuration -// svc := devicefarm.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *DeviceFarm { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DeviceFarm { - svc := &DeviceFarm{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-06-23", - JSONVersion: "1.1", - TargetPrefix: "DeviceFarm_20150623", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a DeviceFarm operation and runs any -// custom request initialization. -func (c *DeviceFarm) 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/directconnect/api.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go deleted file mode 100644 index 244425bd4..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go +++ /dev/null @@ -1,9245 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package directconnect - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAllocateConnectionOnInterconnect = "AllocateConnectionOnInterconnect" - -// AllocateConnectionOnInterconnectRequest generates a "aws/request.Request" representing the -// client's request for the AllocateConnectionOnInterconnect operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AllocateConnectionOnInterconnect for more information on using the AllocateConnectionOnInterconnect -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AllocateConnectionOnInterconnectRequest method. -// req, resp := client.AllocateConnectionOnInterconnectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateConnectionOnInterconnect -// -// Deprecated: AllocateConnectionOnInterconnect has been deprecated -func (c *DirectConnect) AllocateConnectionOnInterconnectRequest(input *AllocateConnectionOnInterconnectInput) (req *request.Request, output *Connection) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, AllocateConnectionOnInterconnect, has been deprecated") - } - op := &request.Operation{ - Name: opAllocateConnectionOnInterconnect, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AllocateConnectionOnInterconnectInput{} - } - - output = &Connection{} - req = c.newRequest(op, input, output) - return -} - -// AllocateConnectionOnInterconnect API operation for AWS Direct Connect. -// -// Deprecated. Use AllocateHostedConnection instead. -// -// Creates a hosted connection on an interconnect. -// -// Allocates a VLAN number and a specified amount of bandwidth for use by a -// hosted connection on the specified interconnect. -// -// Intended for use by AWS Direct Connect partners only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation AllocateConnectionOnInterconnect for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateConnectionOnInterconnect -// -// Deprecated: AllocateConnectionOnInterconnect has been deprecated -func (c *DirectConnect) AllocateConnectionOnInterconnect(input *AllocateConnectionOnInterconnectInput) (*Connection, error) { - req, out := c.AllocateConnectionOnInterconnectRequest(input) - return out, req.Send() -} - -// AllocateConnectionOnInterconnectWithContext is the same as AllocateConnectionOnInterconnect with the addition of -// the ability to pass a context and additional request options. -// -// See AllocateConnectionOnInterconnect for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: AllocateConnectionOnInterconnectWithContext has been deprecated -func (c *DirectConnect) AllocateConnectionOnInterconnectWithContext(ctx aws.Context, input *AllocateConnectionOnInterconnectInput, opts ...request.Option) (*Connection, error) { - req, out := c.AllocateConnectionOnInterconnectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAllocateHostedConnection = "AllocateHostedConnection" - -// AllocateHostedConnectionRequest generates a "aws/request.Request" representing the -// client's request for the AllocateHostedConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AllocateHostedConnection for more information on using the AllocateHostedConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AllocateHostedConnectionRequest method. -// req, resp := client.AllocateHostedConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateHostedConnection -func (c *DirectConnect) AllocateHostedConnectionRequest(input *AllocateHostedConnectionInput) (req *request.Request, output *Connection) { - op := &request.Operation{ - Name: opAllocateHostedConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AllocateHostedConnectionInput{} - } - - output = &Connection{} - req = c.newRequest(op, input, output) - return -} - -// AllocateHostedConnection API operation for AWS Direct Connect. -// -// Creates a hosted connection on the specified interconnect or a link aggregation -// group (LAG). -// -// Allocates a VLAN number and a specified amount of bandwidth for use by a -// hosted connection on the specified interconnect or LAG. -// -// Intended for use by AWS Direct Connect partners only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation AllocateHostedConnection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateHostedConnection -func (c *DirectConnect) AllocateHostedConnection(input *AllocateHostedConnectionInput) (*Connection, error) { - req, out := c.AllocateHostedConnectionRequest(input) - return out, req.Send() -} - -// AllocateHostedConnectionWithContext is the same as AllocateHostedConnection with the addition of -// the ability to pass a context and additional request options. -// -// See AllocateHostedConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) AllocateHostedConnectionWithContext(ctx aws.Context, input *AllocateHostedConnectionInput, opts ...request.Option) (*Connection, error) { - req, out := c.AllocateHostedConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAllocatePrivateVirtualInterface = "AllocatePrivateVirtualInterface" - -// AllocatePrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the -// client's request for the AllocatePrivateVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AllocatePrivateVirtualInterface for more information on using the AllocatePrivateVirtualInterface -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AllocatePrivateVirtualInterfaceRequest method. -// req, resp := client.AllocatePrivateVirtualInterfaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocatePrivateVirtualInterface -func (c *DirectConnect) AllocatePrivateVirtualInterfaceRequest(input *AllocatePrivateVirtualInterfaceInput) (req *request.Request, output *VirtualInterface) { - op := &request.Operation{ - Name: opAllocatePrivateVirtualInterface, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AllocatePrivateVirtualInterfaceInput{} - } - - output = &VirtualInterface{} - req = c.newRequest(op, input, output) - return -} - -// AllocatePrivateVirtualInterface API operation for AWS Direct Connect. -// -// Provisions a private virtual interface to be owned by the specified AWS account. -// -// Virtual interfaces created using this action must be confirmed by the owner -// using ConfirmPrivateVirtualInterface. Until then, the virtual interface is -// in the Confirming state and is not available to handle traffic. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation AllocatePrivateVirtualInterface for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocatePrivateVirtualInterface -func (c *DirectConnect) AllocatePrivateVirtualInterface(input *AllocatePrivateVirtualInterfaceInput) (*VirtualInterface, error) { - req, out := c.AllocatePrivateVirtualInterfaceRequest(input) - return out, req.Send() -} - -// AllocatePrivateVirtualInterfaceWithContext is the same as AllocatePrivateVirtualInterface with the addition of -// the ability to pass a context and additional request options. -// -// See AllocatePrivateVirtualInterface for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) AllocatePrivateVirtualInterfaceWithContext(ctx aws.Context, input *AllocatePrivateVirtualInterfaceInput, opts ...request.Option) (*VirtualInterface, error) { - req, out := c.AllocatePrivateVirtualInterfaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAllocatePublicVirtualInterface = "AllocatePublicVirtualInterface" - -// AllocatePublicVirtualInterfaceRequest generates a "aws/request.Request" representing the -// client's request for the AllocatePublicVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AllocatePublicVirtualInterface for more information on using the AllocatePublicVirtualInterface -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AllocatePublicVirtualInterfaceRequest method. -// req, resp := client.AllocatePublicVirtualInterfaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocatePublicVirtualInterface -func (c *DirectConnect) AllocatePublicVirtualInterfaceRequest(input *AllocatePublicVirtualInterfaceInput) (req *request.Request, output *VirtualInterface) { - op := &request.Operation{ - Name: opAllocatePublicVirtualInterface, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AllocatePublicVirtualInterfaceInput{} - } - - output = &VirtualInterface{} - req = c.newRequest(op, input, output) - return -} - -// AllocatePublicVirtualInterface API operation for AWS Direct Connect. -// -// Provisions a public virtual interface to be owned by the specified AWS account. -// -// The owner of a connection calls this function to provision a public virtual -// interface to be owned by the specified AWS account. -// -// Virtual interfaces created using this function must be confirmed by the owner -// using ConfirmPublicVirtualInterface. Until this step has been completed, -// the virtual interface is in the confirming state and is not available to -// handle traffic. -// -// When creating an IPv6 public virtual interface, omit the Amazon address and -// customer address. IPv6 addresses are automatically assigned from the Amazon -// pool of IPv6 addresses; you cannot specify custom IPv6 addresses. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation AllocatePublicVirtualInterface for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocatePublicVirtualInterface -func (c *DirectConnect) AllocatePublicVirtualInterface(input *AllocatePublicVirtualInterfaceInput) (*VirtualInterface, error) { - req, out := c.AllocatePublicVirtualInterfaceRequest(input) - return out, req.Send() -} - -// AllocatePublicVirtualInterfaceWithContext is the same as AllocatePublicVirtualInterface with the addition of -// the ability to pass a context and additional request options. -// -// See AllocatePublicVirtualInterface for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) AllocatePublicVirtualInterfaceWithContext(ctx aws.Context, input *AllocatePublicVirtualInterfaceInput, opts ...request.Option) (*VirtualInterface, error) { - req, out := c.AllocatePublicVirtualInterfaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateConnectionWithLag = "AssociateConnectionWithLag" - -// AssociateConnectionWithLagRequest generates a "aws/request.Request" representing the -// client's request for the AssociateConnectionWithLag operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateConnectionWithLag for more information on using the AssociateConnectionWithLag -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateConnectionWithLagRequest method. -// req, resp := client.AssociateConnectionWithLagRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateConnectionWithLag -func (c *DirectConnect) AssociateConnectionWithLagRequest(input *AssociateConnectionWithLagInput) (req *request.Request, output *Connection) { - op := &request.Operation{ - Name: opAssociateConnectionWithLag, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateConnectionWithLagInput{} - } - - output = &Connection{} - req = c.newRequest(op, input, output) - return -} - -// AssociateConnectionWithLag API operation for AWS Direct Connect. -// -// Associates an existing connection with a link aggregation group (LAG). The -// connection is interrupted and re-established as a member of the LAG (connectivity -// to AWS is interrupted). The connection must be hosted on the same AWS Direct -// Connect endpoint as the LAG, and its bandwidth must match the bandwidth for -// the LAG. You can re-associate a connection that's currently associated with -// a different LAG; however, if removing the connection would cause the original -// LAG to fall below its setting for minimum number of operational connections, -// the request fails. -// -// Any virtual interfaces that are directly associated with the connection are -// automatically re-associated with the LAG. If the connection was originally -// associated with a different LAG, the virtual interfaces remain associated -// with the original LAG. -// -// For interconnects, any hosted connections are automatically re-associated -// with the LAG. If the interconnect was originally associated with a different -// LAG, the hosted connections remain associated with the original LAG. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation AssociateConnectionWithLag for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateConnectionWithLag -func (c *DirectConnect) AssociateConnectionWithLag(input *AssociateConnectionWithLagInput) (*Connection, error) { - req, out := c.AssociateConnectionWithLagRequest(input) - return out, req.Send() -} - -// AssociateConnectionWithLagWithContext is the same as AssociateConnectionWithLag with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateConnectionWithLag for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) AssociateConnectionWithLagWithContext(ctx aws.Context, input *AssociateConnectionWithLagInput, opts ...request.Option) (*Connection, error) { - req, out := c.AssociateConnectionWithLagRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateHostedConnection = "AssociateHostedConnection" - -// AssociateHostedConnectionRequest generates a "aws/request.Request" representing the -// client's request for the AssociateHostedConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateHostedConnection for more information on using the AssociateHostedConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateHostedConnectionRequest method. -// req, resp := client.AssociateHostedConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateHostedConnection -func (c *DirectConnect) AssociateHostedConnectionRequest(input *AssociateHostedConnectionInput) (req *request.Request, output *Connection) { - op := &request.Operation{ - Name: opAssociateHostedConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateHostedConnectionInput{} - } - - output = &Connection{} - req = c.newRequest(op, input, output) - return -} - -// AssociateHostedConnection API operation for AWS Direct Connect. -// -// Associates a hosted connection and its virtual interfaces with a link aggregation -// group (LAG) or interconnect. If the target interconnect or LAG has an existing -// hosted connection with a conflicting VLAN number or IP address, the operation -// fails. This action temporarily interrupts the hosted connection's connectivity -// to AWS as it is being migrated. -// -// Intended for use by AWS Direct Connect partners only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation AssociateHostedConnection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateHostedConnection -func (c *DirectConnect) AssociateHostedConnection(input *AssociateHostedConnectionInput) (*Connection, error) { - req, out := c.AssociateHostedConnectionRequest(input) - return out, req.Send() -} - -// AssociateHostedConnectionWithContext is the same as AssociateHostedConnection with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateHostedConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) AssociateHostedConnectionWithContext(ctx aws.Context, input *AssociateHostedConnectionInput, opts ...request.Option) (*Connection, error) { - req, out := c.AssociateHostedConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateVirtualInterface = "AssociateVirtualInterface" - -// AssociateVirtualInterfaceRequest generates a "aws/request.Request" representing the -// client's request for the AssociateVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateVirtualInterface for more information on using the AssociateVirtualInterface -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateVirtualInterfaceRequest method. -// req, resp := client.AssociateVirtualInterfaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateVirtualInterface -func (c *DirectConnect) AssociateVirtualInterfaceRequest(input *AssociateVirtualInterfaceInput) (req *request.Request, output *VirtualInterface) { - op := &request.Operation{ - Name: opAssociateVirtualInterface, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateVirtualInterfaceInput{} - } - - output = &VirtualInterface{} - req = c.newRequest(op, input, output) - return -} - -// AssociateVirtualInterface API operation for AWS Direct Connect. -// -// Associates a virtual interface with a specified link aggregation group (LAG) -// or connection. Connectivity to AWS is temporarily interrupted as the virtual -// interface is being migrated. If the target connection or LAG has an associated -// virtual interface with a conflicting VLAN number or a conflicting IP address, -// the operation fails. -// -// Virtual interfaces associated with a hosted connection cannot be associated -// with a LAG; hosted connections must be migrated along with their virtual -// interfaces using AssociateHostedConnection. -// -// To reassociate a virtual interface to a new connection or LAG, the requester -// must own either the virtual interface itself or the connection to which the -// virtual interface is currently associated. Additionally, the requester must -// own the connection or LAG for the association. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation AssociateVirtualInterface for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateVirtualInterface -func (c *DirectConnect) AssociateVirtualInterface(input *AssociateVirtualInterfaceInput) (*VirtualInterface, error) { - req, out := c.AssociateVirtualInterfaceRequest(input) - return out, req.Send() -} - -// AssociateVirtualInterfaceWithContext is the same as AssociateVirtualInterface with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateVirtualInterface for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) AssociateVirtualInterfaceWithContext(ctx aws.Context, input *AssociateVirtualInterfaceInput, opts ...request.Option) (*VirtualInterface, error) { - req, out := c.AssociateVirtualInterfaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opConfirmConnection = "ConfirmConnection" - -// ConfirmConnectionRequest generates a "aws/request.Request" representing the -// client's request for the ConfirmConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ConfirmConnection for more information on using the ConfirmConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ConfirmConnectionRequest method. -// req, resp := client.ConfirmConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmConnection -func (c *DirectConnect) ConfirmConnectionRequest(input *ConfirmConnectionInput) (req *request.Request, output *ConfirmConnectionOutput) { - op := &request.Operation{ - Name: opConfirmConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ConfirmConnectionInput{} - } - - output = &ConfirmConnectionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ConfirmConnection API operation for AWS Direct Connect. -// -// Confirms the creation of the specified hosted connection on an interconnect. -// -// Upon creation, the hosted connection is initially in the Ordering state, -// and remains in this state until the owner confirms creation of the hosted -// connection. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation ConfirmConnection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmConnection -func (c *DirectConnect) ConfirmConnection(input *ConfirmConnectionInput) (*ConfirmConnectionOutput, error) { - req, out := c.ConfirmConnectionRequest(input) - return out, req.Send() -} - -// ConfirmConnectionWithContext is the same as ConfirmConnection with the addition of -// the ability to pass a context and additional request options. -// -// See ConfirmConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) ConfirmConnectionWithContext(ctx aws.Context, input *ConfirmConnectionInput, opts ...request.Option) (*ConfirmConnectionOutput, error) { - req, out := c.ConfirmConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opConfirmPrivateVirtualInterface = "ConfirmPrivateVirtualInterface" - -// ConfirmPrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the -// client's request for the ConfirmPrivateVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ConfirmPrivateVirtualInterface for more information on using the ConfirmPrivateVirtualInterface -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ConfirmPrivateVirtualInterfaceRequest method. -// req, resp := client.ConfirmPrivateVirtualInterfaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPrivateVirtualInterface -func (c *DirectConnect) ConfirmPrivateVirtualInterfaceRequest(input *ConfirmPrivateVirtualInterfaceInput) (req *request.Request, output *ConfirmPrivateVirtualInterfaceOutput) { - op := &request.Operation{ - Name: opConfirmPrivateVirtualInterface, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ConfirmPrivateVirtualInterfaceInput{} - } - - output = &ConfirmPrivateVirtualInterfaceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ConfirmPrivateVirtualInterface API operation for AWS Direct Connect. -// -// Accepts ownership of a private virtual interface created by another AWS account. -// -// After the virtual interface owner makes this call, the virtual interface -// is created and attached to the specified virtual private gateway or Direct -// Connect gateway, and is made available to handle traffic. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation ConfirmPrivateVirtualInterface for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPrivateVirtualInterface -func (c *DirectConnect) ConfirmPrivateVirtualInterface(input *ConfirmPrivateVirtualInterfaceInput) (*ConfirmPrivateVirtualInterfaceOutput, error) { - req, out := c.ConfirmPrivateVirtualInterfaceRequest(input) - return out, req.Send() -} - -// ConfirmPrivateVirtualInterfaceWithContext is the same as ConfirmPrivateVirtualInterface with the addition of -// the ability to pass a context and additional request options. -// -// See ConfirmPrivateVirtualInterface for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) ConfirmPrivateVirtualInterfaceWithContext(ctx aws.Context, input *ConfirmPrivateVirtualInterfaceInput, opts ...request.Option) (*ConfirmPrivateVirtualInterfaceOutput, error) { - req, out := c.ConfirmPrivateVirtualInterfaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opConfirmPublicVirtualInterface = "ConfirmPublicVirtualInterface" - -// ConfirmPublicVirtualInterfaceRequest generates a "aws/request.Request" representing the -// client's request for the ConfirmPublicVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ConfirmPublicVirtualInterface for more information on using the ConfirmPublicVirtualInterface -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ConfirmPublicVirtualInterfaceRequest method. -// req, resp := client.ConfirmPublicVirtualInterfaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPublicVirtualInterface -func (c *DirectConnect) ConfirmPublicVirtualInterfaceRequest(input *ConfirmPublicVirtualInterfaceInput) (req *request.Request, output *ConfirmPublicVirtualInterfaceOutput) { - op := &request.Operation{ - Name: opConfirmPublicVirtualInterface, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ConfirmPublicVirtualInterfaceInput{} - } - - output = &ConfirmPublicVirtualInterfaceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ConfirmPublicVirtualInterface API operation for AWS Direct Connect. -// -// Accepts ownership of a public virtual interface created by another AWS account. -// -// After the virtual interface owner makes this call, the specified virtual -// interface is created and made available to handle traffic. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation ConfirmPublicVirtualInterface for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPublicVirtualInterface -func (c *DirectConnect) ConfirmPublicVirtualInterface(input *ConfirmPublicVirtualInterfaceInput) (*ConfirmPublicVirtualInterfaceOutput, error) { - req, out := c.ConfirmPublicVirtualInterfaceRequest(input) - return out, req.Send() -} - -// ConfirmPublicVirtualInterfaceWithContext is the same as ConfirmPublicVirtualInterface with the addition of -// the ability to pass a context and additional request options. -// -// See ConfirmPublicVirtualInterface for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) ConfirmPublicVirtualInterfaceWithContext(ctx aws.Context, input *ConfirmPublicVirtualInterfaceInput, opts ...request.Option) (*ConfirmPublicVirtualInterfaceOutput, error) { - req, out := c.ConfirmPublicVirtualInterfaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateBGPPeer = "CreateBGPPeer" - -// CreateBGPPeerRequest generates a "aws/request.Request" representing the -// client's request for the CreateBGPPeer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateBGPPeer for more information on using the CreateBGPPeer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateBGPPeerRequest method. -// req, resp := client.CreateBGPPeerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateBGPPeer -func (c *DirectConnect) CreateBGPPeerRequest(input *CreateBGPPeerInput) (req *request.Request, output *CreateBGPPeerOutput) { - op := &request.Operation{ - Name: opCreateBGPPeer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateBGPPeerInput{} - } - - output = &CreateBGPPeerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateBGPPeer API operation for AWS Direct Connect. -// -// Creates a BGP peer on the specified virtual interface. -// -// You must create a BGP peer for the corresponding address family (IPv4/IPv6) -// in order to access AWS resources that also use that address family. -// -// If logical redundancy is not supported by the connection, interconnect, or -// LAG, the BGP peer cannot be in the same address family as an existing BGP -// peer on the virtual interface. -// -// When creating a IPv6 BGP peer, omit the Amazon address and customer address. -// IPv6 addresses are automatically assigned from the Amazon pool of IPv6 addresses; -// you cannot specify custom IPv6 addresses. -// -// For a public virtual interface, the Autonomous System Number (ASN) must be -// private or already whitelisted for the virtual interface. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation CreateBGPPeer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateBGPPeer -func (c *DirectConnect) CreateBGPPeer(input *CreateBGPPeerInput) (*CreateBGPPeerOutput, error) { - req, out := c.CreateBGPPeerRequest(input) - return out, req.Send() -} - -// CreateBGPPeerWithContext is the same as CreateBGPPeer with the addition of -// the ability to pass a context and additional request options. -// -// See CreateBGPPeer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) CreateBGPPeerWithContext(ctx aws.Context, input *CreateBGPPeerInput, opts ...request.Option) (*CreateBGPPeerOutput, error) { - req, out := c.CreateBGPPeerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateConnection = "CreateConnection" - -// CreateConnectionRequest generates a "aws/request.Request" representing the -// client's request for the CreateConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateConnection for more information on using the CreateConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateConnectionRequest method. -// req, resp := client.CreateConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateConnection -func (c *DirectConnect) CreateConnectionRequest(input *CreateConnectionInput) (req *request.Request, output *Connection) { - op := &request.Operation{ - Name: opCreateConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateConnectionInput{} - } - - output = &Connection{} - req = c.newRequest(op, input, output) - return -} - -// CreateConnection API operation for AWS Direct Connect. -// -// Creates a connection between a customer network and a specific AWS Direct -// Connect location. -// -// A connection links your internal network to an AWS Direct Connect location -// over a standard Ethernet fiber-optic cable. One end of the cable is connected -// to your router, the other to an AWS Direct Connect router. -// -// To find the locations for your Region, use DescribeLocations. -// -// You can automatically add the new connection to a link aggregation group -// (LAG) by specifying a LAG ID in the request. This ensures that the new connection -// is allocated on the same AWS Direct Connect endpoint that hosts the specified -// LAG. If there are no available ports on the endpoint, the request fails and -// no connection is created. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation CreateConnection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateConnection -func (c *DirectConnect) CreateConnection(input *CreateConnectionInput) (*Connection, error) { - req, out := c.CreateConnectionRequest(input) - return out, req.Send() -} - -// CreateConnectionWithContext is the same as CreateConnection with the addition of -// the ability to pass a context and additional request options. -// -// See CreateConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) CreateConnectionWithContext(ctx aws.Context, input *CreateConnectionInput, opts ...request.Option) (*Connection, error) { - req, out := c.CreateConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDirectConnectGateway = "CreateDirectConnectGateway" - -// CreateDirectConnectGatewayRequest generates a "aws/request.Request" representing the -// client's request for the CreateDirectConnectGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDirectConnectGateway for more information on using the CreateDirectConnectGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDirectConnectGatewayRequest method. -// req, resp := client.CreateDirectConnectGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGateway -func (c *DirectConnect) CreateDirectConnectGatewayRequest(input *CreateDirectConnectGatewayInput) (req *request.Request, output *CreateDirectConnectGatewayOutput) { - op := &request.Operation{ - Name: opCreateDirectConnectGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDirectConnectGatewayInput{} - } - - output = &CreateDirectConnectGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDirectConnectGateway API operation for AWS Direct Connect. -// -// Creates a Direct Connect gateway, which is an intermediate object that enables -// you to connect a set of virtual interfaces and virtual private gateways. -// A Direct Connect gateway is global and visible in any AWS Region after it -// is created. The virtual interfaces and virtual private gateways that are -// connected through a Direct Connect gateway can be in different AWS Regions. -// This enables you to connect to a VPC in any Region, regardless of the Region -// in which the virtual interfaces are located, and pass traffic between them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation CreateDirectConnectGateway for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGateway -func (c *DirectConnect) CreateDirectConnectGateway(input *CreateDirectConnectGatewayInput) (*CreateDirectConnectGatewayOutput, error) { - req, out := c.CreateDirectConnectGatewayRequest(input) - return out, req.Send() -} - -// CreateDirectConnectGatewayWithContext is the same as CreateDirectConnectGateway with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDirectConnectGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) CreateDirectConnectGatewayWithContext(ctx aws.Context, input *CreateDirectConnectGatewayInput, opts ...request.Option) (*CreateDirectConnectGatewayOutput, error) { - req, out := c.CreateDirectConnectGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDirectConnectGatewayAssociation = "CreateDirectConnectGatewayAssociation" - -// CreateDirectConnectGatewayAssociationRequest generates a "aws/request.Request" representing the -// client's request for the CreateDirectConnectGatewayAssociation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDirectConnectGatewayAssociation for more information on using the CreateDirectConnectGatewayAssociation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDirectConnectGatewayAssociationRequest method. -// req, resp := client.CreateDirectConnectGatewayAssociationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGatewayAssociation -func (c *DirectConnect) CreateDirectConnectGatewayAssociationRequest(input *CreateDirectConnectGatewayAssociationInput) (req *request.Request, output *CreateDirectConnectGatewayAssociationOutput) { - op := &request.Operation{ - Name: opCreateDirectConnectGatewayAssociation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDirectConnectGatewayAssociationInput{} - } - - output = &CreateDirectConnectGatewayAssociationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDirectConnectGatewayAssociation API operation for AWS Direct Connect. -// -// Creates an association between a Direct Connect gateway and a virtual private -// gateway. The virtual private gateway must be attached to a VPC and must not -// be associated with another Direct Connect gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation CreateDirectConnectGatewayAssociation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGatewayAssociation -func (c *DirectConnect) CreateDirectConnectGatewayAssociation(input *CreateDirectConnectGatewayAssociationInput) (*CreateDirectConnectGatewayAssociationOutput, error) { - req, out := c.CreateDirectConnectGatewayAssociationRequest(input) - return out, req.Send() -} - -// CreateDirectConnectGatewayAssociationWithContext is the same as CreateDirectConnectGatewayAssociation with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDirectConnectGatewayAssociation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) CreateDirectConnectGatewayAssociationWithContext(ctx aws.Context, input *CreateDirectConnectGatewayAssociationInput, opts ...request.Option) (*CreateDirectConnectGatewayAssociationOutput, error) { - req, out := c.CreateDirectConnectGatewayAssociationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateInterconnect = "CreateInterconnect" - -// CreateInterconnectRequest generates a "aws/request.Request" representing the -// client's request for the CreateInterconnect operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateInterconnect for more information on using the CreateInterconnect -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateInterconnectRequest method. -// req, resp := client.CreateInterconnectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateInterconnect -func (c *DirectConnect) CreateInterconnectRequest(input *CreateInterconnectInput) (req *request.Request, output *Interconnect) { - op := &request.Operation{ - Name: opCreateInterconnect, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateInterconnectInput{} - } - - output = &Interconnect{} - req = c.newRequest(op, input, output) - return -} - -// CreateInterconnect API operation for AWS Direct Connect. -// -// Creates an interconnect between an AWS Direct Connect partner's network and -// a specific AWS Direct Connect location. -// -// An interconnect is a connection which is capable of hosting other connections. -// The partner can use an interconnect to provide sub-1Gbps AWS Direct Connect -// service to tier 2 customers who do not have their own connections. Like a -// standard connection, an interconnect links the partner's network to an AWS -// Direct Connect location over a standard Ethernet fiber-optic cable. One end -// is connected to the partner's router, the other to an AWS Direct Connect -// router. -// -// You can automatically add the new interconnect to a link aggregation group -// (LAG) by specifying a LAG ID in the request. This ensures that the new interconnect -// is allocated on the same AWS Direct Connect endpoint that hosts the specified -// LAG. If there are no available ports on the endpoint, the request fails and -// no interconnect is created. -// -// For each end customer, the AWS Direct Connect partner provisions a connection -// on their interconnect by calling AllocateConnectionOnInterconnect. The end -// customer can then connect to AWS resources by creating a virtual interface -// on their connection, using the VLAN assigned to them by the partner. -// -// Intended for use by AWS Direct Connect partners only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation CreateInterconnect for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateInterconnect -func (c *DirectConnect) CreateInterconnect(input *CreateInterconnectInput) (*Interconnect, error) { - req, out := c.CreateInterconnectRequest(input) - return out, req.Send() -} - -// CreateInterconnectWithContext is the same as CreateInterconnect with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInterconnect for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) CreateInterconnectWithContext(ctx aws.Context, input *CreateInterconnectInput, opts ...request.Option) (*Interconnect, error) { - req, out := c.CreateInterconnectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLag = "CreateLag" - -// CreateLagRequest generates a "aws/request.Request" representing the -// client's request for the CreateLag operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLag for more information on using the CreateLag -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLagRequest method. -// req, resp := client.CreateLagRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateLag -func (c *DirectConnect) CreateLagRequest(input *CreateLagInput) (req *request.Request, output *Lag) { - op := &request.Operation{ - Name: opCreateLag, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLagInput{} - } - - output = &Lag{} - req = c.newRequest(op, input, output) - return -} - -// CreateLag API operation for AWS Direct Connect. -// -// Creates a link aggregation group (LAG) with the specified number of bundled -// physical connections between the customer network and a specific AWS Direct -// Connect location. A LAG is a logical interface that uses the Link Aggregation -// Control Protocol (LACP) to aggregate multiple interfaces, enabling you to -// treat them as a single interface. -// -// All connections in a LAG must use the same bandwidth and must terminate at -// the same AWS Direct Connect endpoint. -// -// You can have up to 10 connections per LAG. Regardless of this limit, if you -// request more connections for the LAG than AWS Direct Connect can allocate -// on a single endpoint, no LAG is created. -// -// You can specify an existing physical connection or interconnect to include -// in the LAG (which counts towards the total number of connections). Doing -// so interrupts the current physical connection or hosted connections, and -// re-establishes them as a member of the LAG. The LAG will be created on the -// same AWS Direct Connect endpoint to which the connection terminates. Any -// virtual interfaces associated with the connection are automatically disassociated -// and re-associated with the LAG. The connection ID does not change. -// -// If the AWS account used to create a LAG is a registered AWS Direct Connect -// partner, the LAG is automatically enabled to host sub-connections. For a -// LAG owned by a partner, any associated virtual interfaces cannot be directly -// configured. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation CreateLag for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateLag -func (c *DirectConnect) CreateLag(input *CreateLagInput) (*Lag, error) { - req, out := c.CreateLagRequest(input) - return out, req.Send() -} - -// CreateLagWithContext is the same as CreateLag with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLag for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) CreateLagWithContext(ctx aws.Context, input *CreateLagInput, opts ...request.Option) (*Lag, error) { - req, out := c.CreateLagRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePrivateVirtualInterface = "CreatePrivateVirtualInterface" - -// CreatePrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the -// client's request for the CreatePrivateVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePrivateVirtualInterface for more information on using the CreatePrivateVirtualInterface -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePrivateVirtualInterfaceRequest method. -// req, resp := client.CreatePrivateVirtualInterfaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreatePrivateVirtualInterface -func (c *DirectConnect) CreatePrivateVirtualInterfaceRequest(input *CreatePrivateVirtualInterfaceInput) (req *request.Request, output *VirtualInterface) { - op := &request.Operation{ - Name: opCreatePrivateVirtualInterface, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePrivateVirtualInterfaceInput{} - } - - output = &VirtualInterface{} - req = c.newRequest(op, input, output) - return -} - -// CreatePrivateVirtualInterface API operation for AWS Direct Connect. -// -// Creates a private virtual interface. A virtual interface is the VLAN that -// transports AWS Direct Connect traffic. A private virtual interface can be -// connected to either a Direct Connect gateway or a Virtual Private Gateway -// (VGW). Connecting the private virtual interface to a Direct Connect gateway -// enables the possibility for connecting to multiple VPCs, including VPCs in -// different AWS Regions. Connecting the private virtual interface to a VGW -// only provides access to a single VPC within the same Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation CreatePrivateVirtualInterface for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreatePrivateVirtualInterface -func (c *DirectConnect) CreatePrivateVirtualInterface(input *CreatePrivateVirtualInterfaceInput) (*VirtualInterface, error) { - req, out := c.CreatePrivateVirtualInterfaceRequest(input) - return out, req.Send() -} - -// CreatePrivateVirtualInterfaceWithContext is the same as CreatePrivateVirtualInterface with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePrivateVirtualInterface for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) CreatePrivateVirtualInterfaceWithContext(ctx aws.Context, input *CreatePrivateVirtualInterfaceInput, opts ...request.Option) (*VirtualInterface, error) { - req, out := c.CreatePrivateVirtualInterfaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePublicVirtualInterface = "CreatePublicVirtualInterface" - -// CreatePublicVirtualInterfaceRequest generates a "aws/request.Request" representing the -// client's request for the CreatePublicVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePublicVirtualInterface for more information on using the CreatePublicVirtualInterface -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePublicVirtualInterfaceRequest method. -// req, resp := client.CreatePublicVirtualInterfaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreatePublicVirtualInterface -func (c *DirectConnect) CreatePublicVirtualInterfaceRequest(input *CreatePublicVirtualInterfaceInput) (req *request.Request, output *VirtualInterface) { - op := &request.Operation{ - Name: opCreatePublicVirtualInterface, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePublicVirtualInterfaceInput{} - } - - output = &VirtualInterface{} - req = c.newRequest(op, input, output) - return -} - -// CreatePublicVirtualInterface API operation for AWS Direct Connect. -// -// Creates a public virtual interface. A virtual interface is the VLAN that -// transports AWS Direct Connect traffic. A public virtual interface supports -// sending traffic to public services of AWS such as Amazon S3. -// -// When creating an IPv6 public virtual interface (addressFamily is ipv6), leave -// the customer and amazon address fields blank to use auto-assigned IPv6 space. -// Custom IPv6 addresses are not supported. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation CreatePublicVirtualInterface for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreatePublicVirtualInterface -func (c *DirectConnect) CreatePublicVirtualInterface(input *CreatePublicVirtualInterfaceInput) (*VirtualInterface, error) { - req, out := c.CreatePublicVirtualInterfaceRequest(input) - return out, req.Send() -} - -// CreatePublicVirtualInterfaceWithContext is the same as CreatePublicVirtualInterface with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePublicVirtualInterface for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) CreatePublicVirtualInterfaceWithContext(ctx aws.Context, input *CreatePublicVirtualInterfaceInput, opts ...request.Option) (*VirtualInterface, error) { - req, out := c.CreatePublicVirtualInterfaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBGPPeer = "DeleteBGPPeer" - -// DeleteBGPPeerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBGPPeer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBGPPeer for more information on using the DeleteBGPPeer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBGPPeerRequest method. -// req, resp := client.DeleteBGPPeerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteBGPPeer -func (c *DirectConnect) DeleteBGPPeerRequest(input *DeleteBGPPeerInput) (req *request.Request, output *DeleteBGPPeerOutput) { - op := &request.Operation{ - Name: opDeleteBGPPeer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteBGPPeerInput{} - } - - output = &DeleteBGPPeerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteBGPPeer API operation for AWS Direct Connect. -// -// Deletes the specified BGP peer on the specified virtual interface with the -// specified customer address and ASN. -// -// You cannot delete the last BGP peer from a virtual interface. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DeleteBGPPeer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteBGPPeer -func (c *DirectConnect) DeleteBGPPeer(input *DeleteBGPPeerInput) (*DeleteBGPPeerOutput, error) { - req, out := c.DeleteBGPPeerRequest(input) - return out, req.Send() -} - -// DeleteBGPPeerWithContext is the same as DeleteBGPPeer with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBGPPeer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DeleteBGPPeerWithContext(ctx aws.Context, input *DeleteBGPPeerInput, opts ...request.Option) (*DeleteBGPPeerOutput, error) { - req, out := c.DeleteBGPPeerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteConnection = "DeleteConnection" - -// DeleteConnectionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteConnection for more information on using the DeleteConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteConnectionRequest method. -// req, resp := client.DeleteConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteConnection -func (c *DirectConnect) DeleteConnectionRequest(input *DeleteConnectionInput) (req *request.Request, output *Connection) { - op := &request.Operation{ - Name: opDeleteConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteConnectionInput{} - } - - output = &Connection{} - req = c.newRequest(op, input, output) - return -} - -// DeleteConnection API operation for AWS Direct Connect. -// -// Deletes the specified connection. -// -// Deleting a connection only stops the AWS Direct Connect port hour and data -// transfer charges. If you are partnering with any third parties to connect -// with the AWS Direct Connect location, you must cancel your service with them -// separately. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DeleteConnection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteConnection -func (c *DirectConnect) DeleteConnection(input *DeleteConnectionInput) (*Connection, error) { - req, out := c.DeleteConnectionRequest(input) - return out, req.Send() -} - -// DeleteConnectionWithContext is the same as DeleteConnection with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DeleteConnectionWithContext(ctx aws.Context, input *DeleteConnectionInput, opts ...request.Option) (*Connection, error) { - req, out := c.DeleteConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDirectConnectGateway = "DeleteDirectConnectGateway" - -// DeleteDirectConnectGatewayRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDirectConnectGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDirectConnectGateway for more information on using the DeleteDirectConnectGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDirectConnectGatewayRequest method. -// req, resp := client.DeleteDirectConnectGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGateway -func (c *DirectConnect) DeleteDirectConnectGatewayRequest(input *DeleteDirectConnectGatewayInput) (req *request.Request, output *DeleteDirectConnectGatewayOutput) { - op := &request.Operation{ - Name: opDeleteDirectConnectGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDirectConnectGatewayInput{} - } - - output = &DeleteDirectConnectGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDirectConnectGateway API operation for AWS Direct Connect. -// -// Deletes the specified Direct Connect gateway. You must first delete all virtual -// interfaces that are attached to the Direct Connect gateway and disassociate -// all virtual private gateways that are associated with the Direct Connect -// gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DeleteDirectConnectGateway for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGateway -func (c *DirectConnect) DeleteDirectConnectGateway(input *DeleteDirectConnectGatewayInput) (*DeleteDirectConnectGatewayOutput, error) { - req, out := c.DeleteDirectConnectGatewayRequest(input) - return out, req.Send() -} - -// DeleteDirectConnectGatewayWithContext is the same as DeleteDirectConnectGateway with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDirectConnectGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DeleteDirectConnectGatewayWithContext(ctx aws.Context, input *DeleteDirectConnectGatewayInput, opts ...request.Option) (*DeleteDirectConnectGatewayOutput, error) { - req, out := c.DeleteDirectConnectGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDirectConnectGatewayAssociation = "DeleteDirectConnectGatewayAssociation" - -// DeleteDirectConnectGatewayAssociationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDirectConnectGatewayAssociation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDirectConnectGatewayAssociation for more information on using the DeleteDirectConnectGatewayAssociation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDirectConnectGatewayAssociationRequest method. -// req, resp := client.DeleteDirectConnectGatewayAssociationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGatewayAssociation -func (c *DirectConnect) DeleteDirectConnectGatewayAssociationRequest(input *DeleteDirectConnectGatewayAssociationInput) (req *request.Request, output *DeleteDirectConnectGatewayAssociationOutput) { - op := &request.Operation{ - Name: opDeleteDirectConnectGatewayAssociation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDirectConnectGatewayAssociationInput{} - } - - output = &DeleteDirectConnectGatewayAssociationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDirectConnectGatewayAssociation API operation for AWS Direct Connect. -// -// Deletes the association between the specified Direct Connect gateway and -// virtual private gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DeleteDirectConnectGatewayAssociation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGatewayAssociation -func (c *DirectConnect) DeleteDirectConnectGatewayAssociation(input *DeleteDirectConnectGatewayAssociationInput) (*DeleteDirectConnectGatewayAssociationOutput, error) { - req, out := c.DeleteDirectConnectGatewayAssociationRequest(input) - return out, req.Send() -} - -// DeleteDirectConnectGatewayAssociationWithContext is the same as DeleteDirectConnectGatewayAssociation with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDirectConnectGatewayAssociation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DeleteDirectConnectGatewayAssociationWithContext(ctx aws.Context, input *DeleteDirectConnectGatewayAssociationInput, opts ...request.Option) (*DeleteDirectConnectGatewayAssociationOutput, error) { - req, out := c.DeleteDirectConnectGatewayAssociationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteInterconnect = "DeleteInterconnect" - -// DeleteInterconnectRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInterconnect operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteInterconnect for more information on using the DeleteInterconnect -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteInterconnectRequest method. -// req, resp := client.DeleteInterconnectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteInterconnect -func (c *DirectConnect) DeleteInterconnectRequest(input *DeleteInterconnectInput) (req *request.Request, output *DeleteInterconnectOutput) { - op := &request.Operation{ - Name: opDeleteInterconnect, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteInterconnectInput{} - } - - output = &DeleteInterconnectOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteInterconnect API operation for AWS Direct Connect. -// -// Deletes the specified interconnect. -// -// Intended for use by AWS Direct Connect partners only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DeleteInterconnect for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteInterconnect -func (c *DirectConnect) DeleteInterconnect(input *DeleteInterconnectInput) (*DeleteInterconnectOutput, error) { - req, out := c.DeleteInterconnectRequest(input) - return out, req.Send() -} - -// DeleteInterconnectWithContext is the same as DeleteInterconnect with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteInterconnect for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DeleteInterconnectWithContext(ctx aws.Context, input *DeleteInterconnectInput, opts ...request.Option) (*DeleteInterconnectOutput, error) { - req, out := c.DeleteInterconnectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLag = "DeleteLag" - -// DeleteLagRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLag operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLag for more information on using the DeleteLag -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLagRequest method. -// req, resp := client.DeleteLagRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteLag -func (c *DirectConnect) DeleteLagRequest(input *DeleteLagInput) (req *request.Request, output *Lag) { - op := &request.Operation{ - Name: opDeleteLag, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLagInput{} - } - - output = &Lag{} - req = c.newRequest(op, input, output) - return -} - -// DeleteLag API operation for AWS Direct Connect. -// -// Deletes the specified link aggregation group (LAG). You cannot delete a LAG -// if it has active virtual interfaces or hosted connections. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DeleteLag for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteLag -func (c *DirectConnect) DeleteLag(input *DeleteLagInput) (*Lag, error) { - req, out := c.DeleteLagRequest(input) - return out, req.Send() -} - -// DeleteLagWithContext is the same as DeleteLag with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLag for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DeleteLagWithContext(ctx aws.Context, input *DeleteLagInput, opts ...request.Option) (*Lag, error) { - req, out := c.DeleteLagRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVirtualInterface = "DeleteVirtualInterface" - -// DeleteVirtualInterfaceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVirtualInterface for more information on using the DeleteVirtualInterface -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVirtualInterfaceRequest method. -// req, resp := client.DeleteVirtualInterfaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteVirtualInterface -func (c *DirectConnect) DeleteVirtualInterfaceRequest(input *DeleteVirtualInterfaceInput) (req *request.Request, output *DeleteVirtualInterfaceOutput) { - op := &request.Operation{ - Name: opDeleteVirtualInterface, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVirtualInterfaceInput{} - } - - output = &DeleteVirtualInterfaceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteVirtualInterface API operation for AWS Direct Connect. -// -// Deletes a virtual interface. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DeleteVirtualInterface for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteVirtualInterface -func (c *DirectConnect) DeleteVirtualInterface(input *DeleteVirtualInterfaceInput) (*DeleteVirtualInterfaceOutput, error) { - req, out := c.DeleteVirtualInterfaceRequest(input) - return out, req.Send() -} - -// DeleteVirtualInterfaceWithContext is the same as DeleteVirtualInterface with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVirtualInterface for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DeleteVirtualInterfaceWithContext(ctx aws.Context, input *DeleteVirtualInterfaceInput, opts ...request.Option) (*DeleteVirtualInterfaceOutput, error) { - req, out := c.DeleteVirtualInterfaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConnectionLoa = "DescribeConnectionLoa" - -// DescribeConnectionLoaRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConnectionLoa operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConnectionLoa for more information on using the DescribeConnectionLoa -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConnectionLoaRequest method. -// req, resp := client.DescribeConnectionLoaRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionLoa -// -// Deprecated: DescribeConnectionLoa has been deprecated -func (c *DirectConnect) DescribeConnectionLoaRequest(input *DescribeConnectionLoaInput) (req *request.Request, output *DescribeConnectionLoaOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, DescribeConnectionLoa, has been deprecated") - } - op := &request.Operation{ - Name: opDescribeConnectionLoa, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConnectionLoaInput{} - } - - output = &DescribeConnectionLoaOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConnectionLoa API operation for AWS Direct Connect. -// -// Deprecated. Use DescribeLoa instead. -// -// Gets the LOA-CFA for a connection. -// -// The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is -// a document that your APN partner or service provider uses when establishing -// your cross connect to AWS at the colocation facility. For more information, -// see Requesting Cross Connects at AWS Direct Connect Locations (http://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html) -// in the AWS Direct Connect User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeConnectionLoa for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionLoa -// -// Deprecated: DescribeConnectionLoa has been deprecated -func (c *DirectConnect) DescribeConnectionLoa(input *DescribeConnectionLoaInput) (*DescribeConnectionLoaOutput, error) { - req, out := c.DescribeConnectionLoaRequest(input) - return out, req.Send() -} - -// DescribeConnectionLoaWithContext is the same as DescribeConnectionLoa with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConnectionLoa for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: DescribeConnectionLoaWithContext has been deprecated -func (c *DirectConnect) DescribeConnectionLoaWithContext(ctx aws.Context, input *DescribeConnectionLoaInput, opts ...request.Option) (*DescribeConnectionLoaOutput, error) { - req, out := c.DescribeConnectionLoaRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConnections = "DescribeConnections" - -// DescribeConnectionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConnections operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConnections for more information on using the DescribeConnections -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConnectionsRequest method. -// req, resp := client.DescribeConnectionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnections -func (c *DirectConnect) DescribeConnectionsRequest(input *DescribeConnectionsInput) (req *request.Request, output *Connections) { - op := &request.Operation{ - Name: opDescribeConnections, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConnectionsInput{} - } - - output = &Connections{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConnections API operation for AWS Direct Connect. -// -// Displays the specified connection or all connections in this Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeConnections for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnections -func (c *DirectConnect) DescribeConnections(input *DescribeConnectionsInput) (*Connections, error) { - req, out := c.DescribeConnectionsRequest(input) - return out, req.Send() -} - -// DescribeConnectionsWithContext is the same as DescribeConnections with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConnections for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DescribeConnectionsWithContext(ctx aws.Context, input *DescribeConnectionsInput, opts ...request.Option) (*Connections, error) { - req, out := c.DescribeConnectionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConnectionsOnInterconnect = "DescribeConnectionsOnInterconnect" - -// DescribeConnectionsOnInterconnectRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConnectionsOnInterconnect operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConnectionsOnInterconnect for more information on using the DescribeConnectionsOnInterconnect -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConnectionsOnInterconnectRequest method. -// req, resp := client.DescribeConnectionsOnInterconnectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionsOnInterconnect -// -// Deprecated: DescribeConnectionsOnInterconnect has been deprecated -func (c *DirectConnect) DescribeConnectionsOnInterconnectRequest(input *DescribeConnectionsOnInterconnectInput) (req *request.Request, output *Connections) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, DescribeConnectionsOnInterconnect, has been deprecated") - } - op := &request.Operation{ - Name: opDescribeConnectionsOnInterconnect, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConnectionsOnInterconnectInput{} - } - - output = &Connections{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConnectionsOnInterconnect API operation for AWS Direct Connect. -// -// Deprecated. Use DescribeHostedConnections instead. -// -// Lists the connections that have been provisioned on the specified interconnect. -// -// Intended for use by AWS Direct Connect partners only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeConnectionsOnInterconnect for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionsOnInterconnect -// -// Deprecated: DescribeConnectionsOnInterconnect has been deprecated -func (c *DirectConnect) DescribeConnectionsOnInterconnect(input *DescribeConnectionsOnInterconnectInput) (*Connections, error) { - req, out := c.DescribeConnectionsOnInterconnectRequest(input) - return out, req.Send() -} - -// DescribeConnectionsOnInterconnectWithContext is the same as DescribeConnectionsOnInterconnect with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConnectionsOnInterconnect for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: DescribeConnectionsOnInterconnectWithContext has been deprecated -func (c *DirectConnect) DescribeConnectionsOnInterconnectWithContext(ctx aws.Context, input *DescribeConnectionsOnInterconnectInput, opts ...request.Option) (*Connections, error) { - req, out := c.DescribeConnectionsOnInterconnectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDirectConnectGatewayAssociations = "DescribeDirectConnectGatewayAssociations" - -// DescribeDirectConnectGatewayAssociationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDirectConnectGatewayAssociations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDirectConnectGatewayAssociations for more information on using the DescribeDirectConnectGatewayAssociations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDirectConnectGatewayAssociationsRequest method. -// req, resp := client.DescribeDirectConnectGatewayAssociationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAssociations -func (c *DirectConnect) DescribeDirectConnectGatewayAssociationsRequest(input *DescribeDirectConnectGatewayAssociationsInput) (req *request.Request, output *DescribeDirectConnectGatewayAssociationsOutput) { - op := &request.Operation{ - Name: opDescribeDirectConnectGatewayAssociations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDirectConnectGatewayAssociationsInput{} - } - - output = &DescribeDirectConnectGatewayAssociationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDirectConnectGatewayAssociations API operation for AWS Direct Connect. -// -// Lists the associations between your Direct Connect gateways and virtual private -// gateways. You must specify a Direct Connect gateway, a virtual private gateway, -// or both. If you specify a Direct Connect gateway, the response contains all -// virtual private gateways associated with the Direct Connect gateway. If you -// specify a virtual private gateway, the response contains all Direct Connect -// gateways associated with the virtual private gateway. If you specify both, -// the response contains the association between the Direct Connect gateway -// and the virtual private gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeDirectConnectGatewayAssociations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAssociations -func (c *DirectConnect) DescribeDirectConnectGatewayAssociations(input *DescribeDirectConnectGatewayAssociationsInput) (*DescribeDirectConnectGatewayAssociationsOutput, error) { - req, out := c.DescribeDirectConnectGatewayAssociationsRequest(input) - return out, req.Send() -} - -// DescribeDirectConnectGatewayAssociationsWithContext is the same as DescribeDirectConnectGatewayAssociations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDirectConnectGatewayAssociations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DescribeDirectConnectGatewayAssociationsWithContext(ctx aws.Context, input *DescribeDirectConnectGatewayAssociationsInput, opts ...request.Option) (*DescribeDirectConnectGatewayAssociationsOutput, error) { - req, out := c.DescribeDirectConnectGatewayAssociationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDirectConnectGatewayAttachments = "DescribeDirectConnectGatewayAttachments" - -// DescribeDirectConnectGatewayAttachmentsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDirectConnectGatewayAttachments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDirectConnectGatewayAttachments for more information on using the DescribeDirectConnectGatewayAttachments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDirectConnectGatewayAttachmentsRequest method. -// req, resp := client.DescribeDirectConnectGatewayAttachmentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAttachments -func (c *DirectConnect) DescribeDirectConnectGatewayAttachmentsRequest(input *DescribeDirectConnectGatewayAttachmentsInput) (req *request.Request, output *DescribeDirectConnectGatewayAttachmentsOutput) { - op := &request.Operation{ - Name: opDescribeDirectConnectGatewayAttachments, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDirectConnectGatewayAttachmentsInput{} - } - - output = &DescribeDirectConnectGatewayAttachmentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDirectConnectGatewayAttachments API operation for AWS Direct Connect. -// -// Lists the attachments between your Direct Connect gateways and virtual interfaces. -// You must specify a Direct Connect gateway, a virtual interface, or both. -// If you specify a Direct Connect gateway, the response contains all virtual -// interfaces attached to the Direct Connect gateway. If you specify a virtual -// interface, the response contains all Direct Connect gateways attached to -// the virtual interface. If you specify both, the response contains the attachment -// between the Direct Connect gateway and the virtual interface. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeDirectConnectGatewayAttachments for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAttachments -func (c *DirectConnect) DescribeDirectConnectGatewayAttachments(input *DescribeDirectConnectGatewayAttachmentsInput) (*DescribeDirectConnectGatewayAttachmentsOutput, error) { - req, out := c.DescribeDirectConnectGatewayAttachmentsRequest(input) - return out, req.Send() -} - -// DescribeDirectConnectGatewayAttachmentsWithContext is the same as DescribeDirectConnectGatewayAttachments with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDirectConnectGatewayAttachments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DescribeDirectConnectGatewayAttachmentsWithContext(ctx aws.Context, input *DescribeDirectConnectGatewayAttachmentsInput, opts ...request.Option) (*DescribeDirectConnectGatewayAttachmentsOutput, error) { - req, out := c.DescribeDirectConnectGatewayAttachmentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDirectConnectGateways = "DescribeDirectConnectGateways" - -// DescribeDirectConnectGatewaysRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDirectConnectGateways operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDirectConnectGateways for more information on using the DescribeDirectConnectGateways -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDirectConnectGatewaysRequest method. -// req, resp := client.DescribeDirectConnectGatewaysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGateways -func (c *DirectConnect) DescribeDirectConnectGatewaysRequest(input *DescribeDirectConnectGatewaysInput) (req *request.Request, output *DescribeDirectConnectGatewaysOutput) { - op := &request.Operation{ - Name: opDescribeDirectConnectGateways, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDirectConnectGatewaysInput{} - } - - output = &DescribeDirectConnectGatewaysOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDirectConnectGateways API operation for AWS Direct Connect. -// -// Lists all your Direct Connect gateways or only the specified Direct Connect -// gateway. Deleted Direct Connect gateways are not returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeDirectConnectGateways for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGateways -func (c *DirectConnect) DescribeDirectConnectGateways(input *DescribeDirectConnectGatewaysInput) (*DescribeDirectConnectGatewaysOutput, error) { - req, out := c.DescribeDirectConnectGatewaysRequest(input) - return out, req.Send() -} - -// DescribeDirectConnectGatewaysWithContext is the same as DescribeDirectConnectGateways with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDirectConnectGateways for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DescribeDirectConnectGatewaysWithContext(ctx aws.Context, input *DescribeDirectConnectGatewaysInput, opts ...request.Option) (*DescribeDirectConnectGatewaysOutput, error) { - req, out := c.DescribeDirectConnectGatewaysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeHostedConnections = "DescribeHostedConnections" - -// DescribeHostedConnectionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeHostedConnections operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeHostedConnections for more information on using the DescribeHostedConnections -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeHostedConnectionsRequest method. -// req, resp := client.DescribeHostedConnectionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeHostedConnections -func (c *DirectConnect) DescribeHostedConnectionsRequest(input *DescribeHostedConnectionsInput) (req *request.Request, output *Connections) { - op := &request.Operation{ - Name: opDescribeHostedConnections, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeHostedConnectionsInput{} - } - - output = &Connections{} - req = c.newRequest(op, input, output) - return -} - -// DescribeHostedConnections API operation for AWS Direct Connect. -// -// Lists the hosted connections that have been provisioned on the specified -// interconnect or link aggregation group (LAG). -// -// Intended for use by AWS Direct Connect partners only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeHostedConnections for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeHostedConnections -func (c *DirectConnect) DescribeHostedConnections(input *DescribeHostedConnectionsInput) (*Connections, error) { - req, out := c.DescribeHostedConnectionsRequest(input) - return out, req.Send() -} - -// DescribeHostedConnectionsWithContext is the same as DescribeHostedConnections with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeHostedConnections for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DescribeHostedConnectionsWithContext(ctx aws.Context, input *DescribeHostedConnectionsInput, opts ...request.Option) (*Connections, error) { - req, out := c.DescribeHostedConnectionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInterconnectLoa = "DescribeInterconnectLoa" - -// DescribeInterconnectLoaRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInterconnectLoa operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInterconnectLoa for more information on using the DescribeInterconnectLoa -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInterconnectLoaRequest method. -// req, resp := client.DescribeInterconnectLoaRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnectLoa -// -// Deprecated: DescribeInterconnectLoa has been deprecated -func (c *DirectConnect) DescribeInterconnectLoaRequest(input *DescribeInterconnectLoaInput) (req *request.Request, output *DescribeInterconnectLoaOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, DescribeInterconnectLoa, has been deprecated") - } - op := &request.Operation{ - Name: opDescribeInterconnectLoa, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInterconnectLoaInput{} - } - - output = &DescribeInterconnectLoaOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInterconnectLoa API operation for AWS Direct Connect. -// -// Deprecated. Use DescribeLoa instead. -// -// Gets the LOA-CFA for the specified interconnect. -// -// The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is -// a document that is used when establishing your cross connect to AWS at the -// colocation facility. For more information, see Requesting Cross Connects -// at AWS Direct Connect Locations (http://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html) -// in the AWS Direct Connect User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeInterconnectLoa for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnectLoa -// -// Deprecated: DescribeInterconnectLoa has been deprecated -func (c *DirectConnect) DescribeInterconnectLoa(input *DescribeInterconnectLoaInput) (*DescribeInterconnectLoaOutput, error) { - req, out := c.DescribeInterconnectLoaRequest(input) - return out, req.Send() -} - -// DescribeInterconnectLoaWithContext is the same as DescribeInterconnectLoa with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInterconnectLoa for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: DescribeInterconnectLoaWithContext has been deprecated -func (c *DirectConnect) DescribeInterconnectLoaWithContext(ctx aws.Context, input *DescribeInterconnectLoaInput, opts ...request.Option) (*DescribeInterconnectLoaOutput, error) { - req, out := c.DescribeInterconnectLoaRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInterconnects = "DescribeInterconnects" - -// DescribeInterconnectsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInterconnects operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInterconnects for more information on using the DescribeInterconnects -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInterconnectsRequest method. -// req, resp := client.DescribeInterconnectsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnects -func (c *DirectConnect) DescribeInterconnectsRequest(input *DescribeInterconnectsInput) (req *request.Request, output *DescribeInterconnectsOutput) { - op := &request.Operation{ - Name: opDescribeInterconnects, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInterconnectsInput{} - } - - output = &DescribeInterconnectsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInterconnects API operation for AWS Direct Connect. -// -// Lists the interconnects owned by the AWS account or only the specified interconnect. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeInterconnects for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnects -func (c *DirectConnect) DescribeInterconnects(input *DescribeInterconnectsInput) (*DescribeInterconnectsOutput, error) { - req, out := c.DescribeInterconnectsRequest(input) - return out, req.Send() -} - -// DescribeInterconnectsWithContext is the same as DescribeInterconnects with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInterconnects for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DescribeInterconnectsWithContext(ctx aws.Context, input *DescribeInterconnectsInput, opts ...request.Option) (*DescribeInterconnectsOutput, error) { - req, out := c.DescribeInterconnectsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLags = "DescribeLags" - -// DescribeLagsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLags for more information on using the DescribeLags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLagsRequest method. -// req, resp := client.DescribeLagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLags -func (c *DirectConnect) DescribeLagsRequest(input *DescribeLagsInput) (req *request.Request, output *DescribeLagsOutput) { - op := &request.Operation{ - Name: opDescribeLags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLagsInput{} - } - - output = &DescribeLagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLags API operation for AWS Direct Connect. -// -// Describes all your link aggregation groups (LAG) or the specified LAG. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeLags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLags -func (c *DirectConnect) DescribeLags(input *DescribeLagsInput) (*DescribeLagsOutput, error) { - req, out := c.DescribeLagsRequest(input) - return out, req.Send() -} - -// DescribeLagsWithContext is the same as DescribeLags with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DescribeLagsWithContext(ctx aws.Context, input *DescribeLagsInput, opts ...request.Option) (*DescribeLagsOutput, error) { - req, out := c.DescribeLagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLoa = "DescribeLoa" - -// DescribeLoaRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoa operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLoa for more information on using the DescribeLoa -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLoaRequest method. -// req, resp := client.DescribeLoaRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLoa -func (c *DirectConnect) DescribeLoaRequest(input *DescribeLoaInput) (req *request.Request, output *Loa) { - op := &request.Operation{ - Name: opDescribeLoa, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLoaInput{} - } - - output = &Loa{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoa API operation for AWS Direct Connect. -// -// Gets the LOA-CFA for a connection, interconnect, or link aggregation group -// (LAG). -// -// The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is -// a document that is used when establishing your cross connect to AWS at the -// colocation facility. For more information, see Requesting Cross Connects -// at AWS Direct Connect Locations (http://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html) -// in the AWS Direct Connect User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeLoa for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLoa -func (c *DirectConnect) DescribeLoa(input *DescribeLoaInput) (*Loa, error) { - req, out := c.DescribeLoaRequest(input) - return out, req.Send() -} - -// DescribeLoaWithContext is the same as DescribeLoa with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoa for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DescribeLoaWithContext(ctx aws.Context, input *DescribeLoaInput, opts ...request.Option) (*Loa, error) { - req, out := c.DescribeLoaRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLocations = "DescribeLocations" - -// DescribeLocationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLocations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLocations for more information on using the DescribeLocations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLocationsRequest method. -// req, resp := client.DescribeLocationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLocations -func (c *DirectConnect) DescribeLocationsRequest(input *DescribeLocationsInput) (req *request.Request, output *DescribeLocationsOutput) { - op := &request.Operation{ - Name: opDescribeLocations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLocationsInput{} - } - - output = &DescribeLocationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLocations API operation for AWS Direct Connect. -// -// Lists the AWS Direct Connect locations in the current AWS Region. These are -// the locations that can be selected when calling CreateConnection or CreateInterconnect. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeLocations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLocations -func (c *DirectConnect) DescribeLocations(input *DescribeLocationsInput) (*DescribeLocationsOutput, error) { - req, out := c.DescribeLocationsRequest(input) - return out, req.Send() -} - -// DescribeLocationsWithContext is the same as DescribeLocations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLocations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DescribeLocationsWithContext(ctx aws.Context, input *DescribeLocationsInput, opts ...request.Option) (*DescribeLocationsOutput, error) { - req, out := c.DescribeLocationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTags = "DescribeTags" - -// DescribeTagsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTags for more information on using the DescribeTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTagsRequest method. -// req, resp := client.DescribeTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeTags -func (c *DirectConnect) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { - op := &request.Operation{ - Name: opDescribeTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTagsInput{} - } - - output = &DescribeTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTags API operation for AWS Direct Connect. -// -// Describes the tags associated with the specified AWS Direct Connect resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeTags -func (c *DirectConnect) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - return out, req.Send() -} - -// DescribeTagsWithContext is the same as DescribeTags with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVirtualGateways = "DescribeVirtualGateways" - -// DescribeVirtualGatewaysRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVirtualGateways operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVirtualGateways for more information on using the DescribeVirtualGateways -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVirtualGatewaysRequest method. -// req, resp := client.DescribeVirtualGatewaysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeVirtualGateways -func (c *DirectConnect) DescribeVirtualGatewaysRequest(input *DescribeVirtualGatewaysInput) (req *request.Request, output *DescribeVirtualGatewaysOutput) { - op := &request.Operation{ - Name: opDescribeVirtualGateways, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVirtualGatewaysInput{} - } - - output = &DescribeVirtualGatewaysOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVirtualGateways API operation for AWS Direct Connect. -// -// Lists the virtual private gateways owned by the AWS account. -// -// You can create one or more AWS Direct Connect private virtual interfaces -// linked to a virtual private gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeVirtualGateways for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeVirtualGateways -func (c *DirectConnect) DescribeVirtualGateways(input *DescribeVirtualGatewaysInput) (*DescribeVirtualGatewaysOutput, error) { - req, out := c.DescribeVirtualGatewaysRequest(input) - return out, req.Send() -} - -// DescribeVirtualGatewaysWithContext is the same as DescribeVirtualGateways with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVirtualGateways for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DescribeVirtualGatewaysWithContext(ctx aws.Context, input *DescribeVirtualGatewaysInput, opts ...request.Option) (*DescribeVirtualGatewaysOutput, error) { - req, out := c.DescribeVirtualGatewaysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVirtualInterfaces = "DescribeVirtualInterfaces" - -// DescribeVirtualInterfacesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVirtualInterfaces operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVirtualInterfaces for more information on using the DescribeVirtualInterfaces -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVirtualInterfacesRequest method. -// req, resp := client.DescribeVirtualInterfacesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeVirtualInterfaces -func (c *DirectConnect) DescribeVirtualInterfacesRequest(input *DescribeVirtualInterfacesInput) (req *request.Request, output *DescribeVirtualInterfacesOutput) { - op := &request.Operation{ - Name: opDescribeVirtualInterfaces, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVirtualInterfacesInput{} - } - - output = &DescribeVirtualInterfacesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVirtualInterfaces API operation for AWS Direct Connect. -// -// Displays all virtual interfaces for an AWS account. Virtual interfaces deleted -// fewer than 15 minutes before you make the request are also returned. If you -// specify a connection ID, only the virtual interfaces associated with the -// connection are returned. If you specify a virtual interface ID, then only -// a single virtual interface is returned. -// -// A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect -// location and the customer network. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DescribeVirtualInterfaces for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeVirtualInterfaces -func (c *DirectConnect) DescribeVirtualInterfaces(input *DescribeVirtualInterfacesInput) (*DescribeVirtualInterfacesOutput, error) { - req, out := c.DescribeVirtualInterfacesRequest(input) - return out, req.Send() -} - -// DescribeVirtualInterfacesWithContext is the same as DescribeVirtualInterfaces with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVirtualInterfaces for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DescribeVirtualInterfacesWithContext(ctx aws.Context, input *DescribeVirtualInterfacesInput, opts ...request.Option) (*DescribeVirtualInterfacesOutput, error) { - req, out := c.DescribeVirtualInterfacesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateConnectionFromLag = "DisassociateConnectionFromLag" - -// DisassociateConnectionFromLagRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateConnectionFromLag operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateConnectionFromLag for more information on using the DisassociateConnectionFromLag -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateConnectionFromLagRequest method. -// req, resp := client.DisassociateConnectionFromLagRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DisassociateConnectionFromLag -func (c *DirectConnect) DisassociateConnectionFromLagRequest(input *DisassociateConnectionFromLagInput) (req *request.Request, output *Connection) { - op := &request.Operation{ - Name: opDisassociateConnectionFromLag, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateConnectionFromLagInput{} - } - - output = &Connection{} - req = c.newRequest(op, input, output) - return -} - -// DisassociateConnectionFromLag API operation for AWS Direct Connect. -// -// Disassociates a connection from a link aggregation group (LAG). The connection -// is interrupted and re-established as a standalone connection (the connection -// is not deleted; to delete the connection, use the DeleteConnection request). -// If the LAG has associated virtual interfaces or hosted connections, they -// remain associated with the LAG. A disassociated connection owned by an AWS -// Direct Connect partner is automatically converted to an interconnect. -// -// If disassociating the connection would cause the LAG to fall below its setting -// for minimum number of operational connections, the request fails, except -// when it's the last member of the LAG. If all connections are disassociated, -// the LAG continues to exist as an empty LAG with no physical connections. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation DisassociateConnectionFromLag for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DisassociateConnectionFromLag -func (c *DirectConnect) DisassociateConnectionFromLag(input *DisassociateConnectionFromLagInput) (*Connection, error) { - req, out := c.DisassociateConnectionFromLagRequest(input) - return out, req.Send() -} - -// DisassociateConnectionFromLagWithContext is the same as DisassociateConnectionFromLag with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateConnectionFromLag for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) DisassociateConnectionFromLagWithContext(ctx aws.Context, input *DisassociateConnectionFromLagInput, opts ...request.Option) (*Connection, error) { - req, out := c.DisassociateConnectionFromLagRequest(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/directconnect-2012-10-25/TagResource -func (c *DirectConnect) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for AWS Direct Connect. -// -// Adds the specified tags to the specified AWS Direct Connect resource. Each -// resource can have a maximum of 50 tags. -// -// Each tag consists of a key and an optional value. If a tag with the same -// key is already associated with the resource, this action updates its value. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDuplicateTagKeysException "DuplicateTagKeysException" -// A tag key was specified more than once. -// -// * ErrCodeTooManyTagsException "TooManyTagsException" -// You have reached the limit on the number of tags that can be assigned. -// -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/TagResource -func (c *DirectConnect) 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 *DirectConnect) 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/directconnect-2012-10-25/UntagResource -func (c *DirectConnect) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for AWS Direct Connect. -// -// Removes one or more tags from the specified AWS Direct Connect resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UntagResource -func (c *DirectConnect) 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 *DirectConnect) 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 opUpdateLag = "UpdateLag" - -// UpdateLagRequest generates a "aws/request.Request" representing the -// client's request for the UpdateLag operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateLag for more information on using the UpdateLag -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateLagRequest method. -// req, resp := client.UpdateLagRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UpdateLag -func (c *DirectConnect) UpdateLagRequest(input *UpdateLagInput) (req *request.Request, output *Lag) { - op := &request.Operation{ - Name: opUpdateLag, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateLagInput{} - } - - output = &Lag{} - req = c.newRequest(op, input, output) - return -} - -// UpdateLag API operation for AWS Direct Connect. -// -// Updates the attributes of the specified link aggregation group (LAG). -// -// You can update the following attributes: -// -// * The name of the LAG. -// -// * The value for the minimum number of connections that must be operational -// for the LAG itself to be operational. -// -// When you create a LAG, the default value for the minimum number of operational -// connections is zero (0). If you update this value and the number of operational -// connections falls below the specified value, the LAG automatically goes down -// to avoid over-utilization of the remaining connections. Adjust this value -// with care, as it could force the LAG down if it is set higher than the current -// number of operational connections. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation UpdateLag for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UpdateLag -func (c *DirectConnect) UpdateLag(input *UpdateLagInput) (*Lag, error) { - req, out := c.UpdateLagRequest(input) - return out, req.Send() -} - -// UpdateLagWithContext is the same as UpdateLag with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateLag for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) UpdateLagWithContext(ctx aws.Context, input *UpdateLagInput, opts ...request.Option) (*Lag, error) { - req, out := c.UpdateLagRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateVirtualInterfaceAttributes = "UpdateVirtualInterfaceAttributes" - -// UpdateVirtualInterfaceAttributesRequest generates a "aws/request.Request" representing the -// client's request for the UpdateVirtualInterfaceAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateVirtualInterfaceAttributes for more information on using the UpdateVirtualInterfaceAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateVirtualInterfaceAttributesRequest method. -// req, resp := client.UpdateVirtualInterfaceAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UpdateVirtualInterfaceAttributes -func (c *DirectConnect) UpdateVirtualInterfaceAttributesRequest(input *UpdateVirtualInterfaceAttributesInput) (req *request.Request, output *UpdateVirtualInterfaceAttributesOutput) { - op := &request.Operation{ - Name: opUpdateVirtualInterfaceAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateVirtualInterfaceAttributesInput{} - } - - output = &UpdateVirtualInterfaceAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateVirtualInterfaceAttributes API operation for AWS Direct Connect. -// -// Updates the specified attributes of the specified virtual private interface. -// -// Setting the MTU of a virtual interface to 9001 (jumbo frames) can cause an -// update to the underlying physical connection if it wasn't updated to support -// jumbo frames. Updating the connection disrupts network connectivity for all -// virtual interfaces associated with the connection for up to 30 seconds. To -// check whether your connection supports jumbo frames, call DescribeConnections. -// To check whether your virtual interface supports jumbo frames, call DescribeVirtualInterfaces. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Direct Connect's -// API operation UpdateVirtualInterfaceAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred. -// -// * ErrCodeClientException "DirectConnectClientException" -// One or more parameters are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UpdateVirtualInterfaceAttributes -func (c *DirectConnect) UpdateVirtualInterfaceAttributes(input *UpdateVirtualInterfaceAttributesInput) (*UpdateVirtualInterfaceAttributesOutput, error) { - req, out := c.UpdateVirtualInterfaceAttributesRequest(input) - return out, req.Send() -} - -// UpdateVirtualInterfaceAttributesWithContext is the same as UpdateVirtualInterfaceAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateVirtualInterfaceAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectConnect) UpdateVirtualInterfaceAttributesWithContext(ctx aws.Context, input *UpdateVirtualInterfaceAttributesInput, opts ...request.Option) (*UpdateVirtualInterfaceAttributesOutput, error) { - req, out := c.UpdateVirtualInterfaceAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AllocateConnectionOnInterconnectInput struct { - _ struct{} `type:"structure"` - - // The bandwidth of the connection, in Mbps. The possible values are 50Mbps, - // 100Mbps, 200Mbps, 300Mbps, 400Mbps, and 500Mbps. - // - // Bandwidth is a required field - Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` - - // The name of the provisioned connection. - // - // ConnectionName is a required field - ConnectionName *string `locationName:"connectionName" type:"string" required:"true"` - - // The ID of the interconnect on which the connection will be provisioned. For - // example, dxcon-456abc78. - // - // InterconnectId is a required field - InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` - - // The ID of the AWS account of the customer for whom the connection will be - // provisioned. - // - // OwnerAccount is a required field - OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` - - // The dedicated VLAN provisioned to the connection. - // - // Vlan is a required field - Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` -} - -// String returns the string representation -func (s AllocateConnectionOnInterconnectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AllocateConnectionOnInterconnectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AllocateConnectionOnInterconnectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AllocateConnectionOnInterconnectInput"} - if s.Bandwidth == nil { - invalidParams.Add(request.NewErrParamRequired("Bandwidth")) - } - if s.ConnectionName == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionName")) - } - if s.InterconnectId == nil { - invalidParams.Add(request.NewErrParamRequired("InterconnectId")) - } - if s.OwnerAccount == nil { - invalidParams.Add(request.NewErrParamRequired("OwnerAccount")) - } - if s.Vlan == nil { - invalidParams.Add(request.NewErrParamRequired("Vlan")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBandwidth sets the Bandwidth field's value. -func (s *AllocateConnectionOnInterconnectInput) SetBandwidth(v string) *AllocateConnectionOnInterconnectInput { - s.Bandwidth = &v - return s -} - -// SetConnectionName sets the ConnectionName field's value. -func (s *AllocateConnectionOnInterconnectInput) SetConnectionName(v string) *AllocateConnectionOnInterconnectInput { - s.ConnectionName = &v - return s -} - -// SetInterconnectId sets the InterconnectId field's value. -func (s *AllocateConnectionOnInterconnectInput) SetInterconnectId(v string) *AllocateConnectionOnInterconnectInput { - s.InterconnectId = &v - return s -} - -// SetOwnerAccount sets the OwnerAccount field's value. -func (s *AllocateConnectionOnInterconnectInput) SetOwnerAccount(v string) *AllocateConnectionOnInterconnectInput { - s.OwnerAccount = &v - return s -} - -// SetVlan sets the Vlan field's value. -func (s *AllocateConnectionOnInterconnectInput) SetVlan(v int64) *AllocateConnectionOnInterconnectInput { - s.Vlan = &v - return s -} - -type AllocateHostedConnectionInput struct { - _ struct{} `type:"structure"` - - // The bandwidth of the hosted connection, in Mbps. The possible values are - // 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, and 500Mbps. - // - // Bandwidth is a required field - Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` - - // The ID of the interconnect or LAG. - // - // ConnectionId is a required field - ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - - // The name of the hosted connection. - // - // ConnectionName is a required field - ConnectionName *string `locationName:"connectionName" type:"string" required:"true"` - - // The ID of the AWS account ID of the customer for the connection. - // - // OwnerAccount is a required field - OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` - - // The dedicated VLAN provisioned to the hosted connection. - // - // Vlan is a required field - Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` -} - -// String returns the string representation -func (s AllocateHostedConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AllocateHostedConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AllocateHostedConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AllocateHostedConnectionInput"} - if s.Bandwidth == nil { - invalidParams.Add(request.NewErrParamRequired("Bandwidth")) - } - if s.ConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionId")) - } - if s.ConnectionName == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionName")) - } - if s.OwnerAccount == nil { - invalidParams.Add(request.NewErrParamRequired("OwnerAccount")) - } - if s.Vlan == nil { - invalidParams.Add(request.NewErrParamRequired("Vlan")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBandwidth sets the Bandwidth field's value. -func (s *AllocateHostedConnectionInput) SetBandwidth(v string) *AllocateHostedConnectionInput { - s.Bandwidth = &v - return s -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *AllocateHostedConnectionInput) SetConnectionId(v string) *AllocateHostedConnectionInput { - s.ConnectionId = &v - return s -} - -// SetConnectionName sets the ConnectionName field's value. -func (s *AllocateHostedConnectionInput) SetConnectionName(v string) *AllocateHostedConnectionInput { - s.ConnectionName = &v - return s -} - -// SetOwnerAccount sets the OwnerAccount field's value. -func (s *AllocateHostedConnectionInput) SetOwnerAccount(v string) *AllocateHostedConnectionInput { - s.OwnerAccount = &v - return s -} - -// SetVlan sets the Vlan field's value. -func (s *AllocateHostedConnectionInput) SetVlan(v int64) *AllocateHostedConnectionInput { - s.Vlan = &v - return s -} - -type AllocatePrivateVirtualInterfaceInput struct { - _ struct{} `type:"structure"` - - // The ID of the connection on which the private virtual interface is provisioned. - // - // ConnectionId is a required field - ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - - // Information about the private virtual interface. - // - // NewPrivateVirtualInterfaceAllocation is a required field - NewPrivateVirtualInterfaceAllocation *NewPrivateVirtualInterfaceAllocation `locationName:"newPrivateVirtualInterfaceAllocation" type:"structure" required:"true"` - - // The ID of the AWS account that owns the virtual private interface. - // - // OwnerAccount is a required field - OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` -} - -// String returns the string representation -func (s AllocatePrivateVirtualInterfaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AllocatePrivateVirtualInterfaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AllocatePrivateVirtualInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AllocatePrivateVirtualInterfaceInput"} - if s.ConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionId")) - } - if s.NewPrivateVirtualInterfaceAllocation == nil { - invalidParams.Add(request.NewErrParamRequired("NewPrivateVirtualInterfaceAllocation")) - } - if s.OwnerAccount == nil { - invalidParams.Add(request.NewErrParamRequired("OwnerAccount")) - } - if s.NewPrivateVirtualInterfaceAllocation != nil { - if err := s.NewPrivateVirtualInterfaceAllocation.Validate(); err != nil { - invalidParams.AddNested("NewPrivateVirtualInterfaceAllocation", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *AllocatePrivateVirtualInterfaceInput) SetConnectionId(v string) *AllocatePrivateVirtualInterfaceInput { - s.ConnectionId = &v - return s -} - -// SetNewPrivateVirtualInterfaceAllocation sets the NewPrivateVirtualInterfaceAllocation field's value. -func (s *AllocatePrivateVirtualInterfaceInput) SetNewPrivateVirtualInterfaceAllocation(v *NewPrivateVirtualInterfaceAllocation) *AllocatePrivateVirtualInterfaceInput { - s.NewPrivateVirtualInterfaceAllocation = v - return s -} - -// SetOwnerAccount sets the OwnerAccount field's value. -func (s *AllocatePrivateVirtualInterfaceInput) SetOwnerAccount(v string) *AllocatePrivateVirtualInterfaceInput { - s.OwnerAccount = &v - return s -} - -type AllocatePublicVirtualInterfaceInput struct { - _ struct{} `type:"structure"` - - // The ID of the connection on which the public virtual interface is provisioned. - // - // ConnectionId is a required field - ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - - // Information about the public virtual interface. - // - // NewPublicVirtualInterfaceAllocation is a required field - NewPublicVirtualInterfaceAllocation *NewPublicVirtualInterfaceAllocation `locationName:"newPublicVirtualInterfaceAllocation" type:"structure" required:"true"` - - // The ID of the AWS account that owns the public virtual interface. - // - // OwnerAccount is a required field - OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` -} - -// String returns the string representation -func (s AllocatePublicVirtualInterfaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AllocatePublicVirtualInterfaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AllocatePublicVirtualInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AllocatePublicVirtualInterfaceInput"} - if s.ConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionId")) - } - if s.NewPublicVirtualInterfaceAllocation == nil { - invalidParams.Add(request.NewErrParamRequired("NewPublicVirtualInterfaceAllocation")) - } - if s.OwnerAccount == nil { - invalidParams.Add(request.NewErrParamRequired("OwnerAccount")) - } - if s.NewPublicVirtualInterfaceAllocation != nil { - if err := s.NewPublicVirtualInterfaceAllocation.Validate(); err != nil { - invalidParams.AddNested("NewPublicVirtualInterfaceAllocation", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *AllocatePublicVirtualInterfaceInput) SetConnectionId(v string) *AllocatePublicVirtualInterfaceInput { - s.ConnectionId = &v - return s -} - -// SetNewPublicVirtualInterfaceAllocation sets the NewPublicVirtualInterfaceAllocation field's value. -func (s *AllocatePublicVirtualInterfaceInput) SetNewPublicVirtualInterfaceAllocation(v *NewPublicVirtualInterfaceAllocation) *AllocatePublicVirtualInterfaceInput { - s.NewPublicVirtualInterfaceAllocation = v - return s -} - -// SetOwnerAccount sets the OwnerAccount field's value. -func (s *AllocatePublicVirtualInterfaceInput) SetOwnerAccount(v string) *AllocatePublicVirtualInterfaceInput { - s.OwnerAccount = &v - return s -} - -type AssociateConnectionWithLagInput struct { - _ struct{} `type:"structure"` - - // The ID of the connection. For example, dxcon-abc123. - // - // ConnectionId is a required field - ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - - // The ID of the LAG with which to associate the connection. For example, dxlag-abc123. - // - // LagId is a required field - LagId *string `locationName:"lagId" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateConnectionWithLagInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateConnectionWithLagInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateConnectionWithLagInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateConnectionWithLagInput"} - if s.ConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionId")) - } - if s.LagId == nil { - invalidParams.Add(request.NewErrParamRequired("LagId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *AssociateConnectionWithLagInput) SetConnectionId(v string) *AssociateConnectionWithLagInput { - s.ConnectionId = &v - return s -} - -// SetLagId sets the LagId field's value. -func (s *AssociateConnectionWithLagInput) SetLagId(v string) *AssociateConnectionWithLagInput { - s.LagId = &v - return s -} - -type AssociateHostedConnectionInput struct { - _ struct{} `type:"structure"` - - // The ID of the hosted connection. - // - // ConnectionId is a required field - ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - - // The ID of the interconnect or the LAG. - // - // ParentConnectionId is a required field - ParentConnectionId *string `locationName:"parentConnectionId" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateHostedConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateHostedConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateHostedConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateHostedConnectionInput"} - if s.ConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionId")) - } - if s.ParentConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ParentConnectionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *AssociateHostedConnectionInput) SetConnectionId(v string) *AssociateHostedConnectionInput { - s.ConnectionId = &v - return s -} - -// SetParentConnectionId sets the ParentConnectionId field's value. -func (s *AssociateHostedConnectionInput) SetParentConnectionId(v string) *AssociateHostedConnectionInput { - s.ParentConnectionId = &v - return s -} - -type AssociateVirtualInterfaceInput struct { - _ struct{} `type:"structure"` - - // The ID of the LAG or connection. - // - // ConnectionId is a required field - ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - - // The ID of the virtual interface. - // - // VirtualInterfaceId is a required field - VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateVirtualInterfaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateVirtualInterfaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateVirtualInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateVirtualInterfaceInput"} - if s.ConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionId")) - } - if s.VirtualInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *AssociateVirtualInterfaceInput) SetConnectionId(v string) *AssociateVirtualInterfaceInput { - s.ConnectionId = &v - return s -} - -// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. -func (s *AssociateVirtualInterfaceInput) SetVirtualInterfaceId(v string) *AssociateVirtualInterfaceInput { - s.VirtualInterfaceId = &v - return s -} - -// Information about a BGP peer. -type BGPPeer struct { - _ struct{} `type:"structure"` - - // The address family for the BGP peer. - AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - - // The IP address assigned to the Amazon interface. - AmazonAddress *string `locationName:"amazonAddress" type:"string"` - - // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - Asn *int64 `locationName:"asn" type:"integer"` - - // The authentication key for BGP configuration. - AuthKey *string `locationName:"authKey" type:"string"` - - // The Direct Connect endpoint on which the BGP peer terminates. - AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - - // The ID of the BGP peer. - BgpPeerId *string `locationName:"bgpPeerId" type:"string"` - - // The state of the BGP peer. The following are the possible values: - // - // * verifying: The BGP peering addresses or ASN require validation before - // the BGP peer can be created. This state applies only to public virtual - // interfaces. - // - // * pending: The BGP peer is created, and remains in this state until it - // is ready to be established. - // - // * available: The BGP peer is ready to be established. - // - // * deleting: The BGP peer is being deleted. - // - // * deleted: The BGP peer is deleted and cannot be established. - BgpPeerState *string `locationName:"bgpPeerState" type:"string" enum:"BGPPeerState"` - - // The status of the BGP peer. The following are the possible values: - // - // * up: The BGP peer is established. This state does not indicate the state - // of the routing function. Ensure that you are receiving routes over the - // BGP session. - // - // * down: The BGP peer is down. - // - // * unknown: The BGP peer status is unknown. - BgpStatus *string `locationName:"bgpStatus" type:"string" enum:"BGPStatus"` - - // The IP address assigned to the customer interface. - CustomerAddress *string `locationName:"customerAddress" type:"string"` -} - -// String returns the string representation -func (s BGPPeer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BGPPeer) GoString() string { - return s.String() -} - -// SetAddressFamily sets the AddressFamily field's value. -func (s *BGPPeer) SetAddressFamily(v string) *BGPPeer { - s.AddressFamily = &v - return s -} - -// SetAmazonAddress sets the AmazonAddress field's value. -func (s *BGPPeer) SetAmazonAddress(v string) *BGPPeer { - s.AmazonAddress = &v - return s -} - -// SetAsn sets the Asn field's value. -func (s *BGPPeer) SetAsn(v int64) *BGPPeer { - s.Asn = &v - return s -} - -// SetAuthKey sets the AuthKey field's value. -func (s *BGPPeer) SetAuthKey(v string) *BGPPeer { - s.AuthKey = &v - return s -} - -// SetAwsDeviceV2 sets the AwsDeviceV2 field's value. -func (s *BGPPeer) SetAwsDeviceV2(v string) *BGPPeer { - s.AwsDeviceV2 = &v - return s -} - -// SetBgpPeerId sets the BgpPeerId field's value. -func (s *BGPPeer) SetBgpPeerId(v string) *BGPPeer { - s.BgpPeerId = &v - return s -} - -// SetBgpPeerState sets the BgpPeerState field's value. -func (s *BGPPeer) SetBgpPeerState(v string) *BGPPeer { - s.BgpPeerState = &v - return s -} - -// SetBgpStatus sets the BgpStatus field's value. -func (s *BGPPeer) SetBgpStatus(v string) *BGPPeer { - s.BgpStatus = &v - return s -} - -// SetCustomerAddress sets the CustomerAddress field's value. -func (s *BGPPeer) SetCustomerAddress(v string) *BGPPeer { - s.CustomerAddress = &v - return s -} - -type ConfirmConnectionInput struct { - _ struct{} `type:"structure"` - - // The ID of the hosted connection. - // - // ConnectionId is a required field - ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` -} - -// String returns the string representation -func (s ConfirmConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfirmConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfirmConnectionInput"} - if s.ConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *ConfirmConnectionInput) SetConnectionId(v string) *ConfirmConnectionInput { - s.ConnectionId = &v - return s -} - -type ConfirmConnectionOutput struct { - _ struct{} `type:"structure"` - - // The state of the connection. The following are the possible values: - // - // * ordering: The initial state of a hosted connection provisioned on an - // interconnect. The connection stays in the ordering state until the owner - // of the hosted connection confirms or declines the connection order. - // - // * requested: The initial state of a standard connection. The connection - // stays in the requested state until the Letter of Authorization (LOA) is - // sent to the customer. - // - // * pending: The connection has been approved and is being initialized. - // - // * available: The network link is up and the connection is ready for use. - // - // * down: The network link is down. - // - // * deleting: The connection is being deleted. - // - // * deleted: The connection has been deleted. - // - // * rejected: A hosted connection in the ordering state enters the rejected - // state if it is deleted by the customer. - ConnectionState *string `locationName:"connectionState" type:"string" enum:"ConnectionState"` -} - -// String returns the string representation -func (s ConfirmConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmConnectionOutput) GoString() string { - return s.String() -} - -// SetConnectionState sets the ConnectionState field's value. -func (s *ConfirmConnectionOutput) SetConnectionState(v string) *ConfirmConnectionOutput { - s.ConnectionState = &v - return s -} - -type ConfirmPrivateVirtualInterfaceInput struct { - _ struct{} `type:"structure"` - - // The ID of the Direct Connect gateway. - DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - - // The ID of the virtual private gateway. - VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` - - // The ID of the virtual interface. - // - // VirtualInterfaceId is a required field - VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` -} - -// String returns the string representation -func (s ConfirmPrivateVirtualInterfaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmPrivateVirtualInterfaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfirmPrivateVirtualInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfirmPrivateVirtualInterfaceInput"} - if s.VirtualInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. -func (s *ConfirmPrivateVirtualInterfaceInput) SetDirectConnectGatewayId(v string) *ConfirmPrivateVirtualInterfaceInput { - s.DirectConnectGatewayId = &v - return s -} - -// SetVirtualGatewayId sets the VirtualGatewayId field's value. -func (s *ConfirmPrivateVirtualInterfaceInput) SetVirtualGatewayId(v string) *ConfirmPrivateVirtualInterfaceInput { - s.VirtualGatewayId = &v - return s -} - -// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. -func (s *ConfirmPrivateVirtualInterfaceInput) SetVirtualInterfaceId(v string) *ConfirmPrivateVirtualInterfaceInput { - s.VirtualInterfaceId = &v - return s -} - -type ConfirmPrivateVirtualInterfaceOutput struct { - _ struct{} `type:"structure"` - - // The state of the virtual interface. The following are the possible values: - // - // * confirming: The creation of the virtual interface is pending confirmation - // from the virtual interface owner. If the owner of the virtual interface - // is different from the owner of the connection on which it is provisioned, - // then the virtual interface will remain in this state until it is confirmed - // by the virtual interface owner. - // - // * verifying: This state only applies to public virtual interfaces. Each - // public virtual interface needs validation before the virtual interface - // can be created. - // - // * pending: A virtual interface is in this state from the time that it - // is created until the virtual interface is ready to forward traffic. - // - // * available: A virtual interface that is able to forward traffic. - // - // * down: A virtual interface that is BGP down. - // - // * deleting: A virtual interface is in this state immediately after calling - // DeleteVirtualInterface until it can no longer forward traffic. - // - // * deleted: A virtual interface that cannot forward traffic. - // - // * rejected: The virtual interface owner has declined creation of the virtual - // interface. If a virtual interface in the Confirming state is deleted by - // the virtual interface owner, the virtual interface enters the Rejected - // state. - VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` -} - -// String returns the string representation -func (s ConfirmPrivateVirtualInterfaceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmPrivateVirtualInterfaceOutput) GoString() string { - return s.String() -} - -// SetVirtualInterfaceState sets the VirtualInterfaceState field's value. -func (s *ConfirmPrivateVirtualInterfaceOutput) SetVirtualInterfaceState(v string) *ConfirmPrivateVirtualInterfaceOutput { - s.VirtualInterfaceState = &v - return s -} - -type ConfirmPublicVirtualInterfaceInput struct { - _ struct{} `type:"structure"` - - // The ID of the virtual interface. - // - // VirtualInterfaceId is a required field - VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` -} - -// String returns the string representation -func (s ConfirmPublicVirtualInterfaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmPublicVirtualInterfaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfirmPublicVirtualInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfirmPublicVirtualInterfaceInput"} - if s.VirtualInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. -func (s *ConfirmPublicVirtualInterfaceInput) SetVirtualInterfaceId(v string) *ConfirmPublicVirtualInterfaceInput { - s.VirtualInterfaceId = &v - return s -} - -type ConfirmPublicVirtualInterfaceOutput struct { - _ struct{} `type:"structure"` - - // The state of the virtual interface. The following are the possible values: - // - // * confirming: The creation of the virtual interface is pending confirmation - // from the virtual interface owner. If the owner of the virtual interface - // is different from the owner of the connection on which it is provisioned, - // then the virtual interface will remain in this state until it is confirmed - // by the virtual interface owner. - // - // * verifying: This state only applies to public virtual interfaces. Each - // public virtual interface needs validation before the virtual interface - // can be created. - // - // * pending: A virtual interface is in this state from the time that it - // is created until the virtual interface is ready to forward traffic. - // - // * available: A virtual interface that is able to forward traffic. - // - // * down: A virtual interface that is BGP down. - // - // * deleting: A virtual interface is in this state immediately after calling - // DeleteVirtualInterface until it can no longer forward traffic. - // - // * deleted: A virtual interface that cannot forward traffic. - // - // * rejected: The virtual interface owner has declined creation of the virtual - // interface. If a virtual interface in the Confirming state is deleted by - // the virtual interface owner, the virtual interface enters the Rejected - // state. - VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` -} - -// String returns the string representation -func (s ConfirmPublicVirtualInterfaceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmPublicVirtualInterfaceOutput) GoString() string { - return s.String() -} - -// SetVirtualInterfaceState sets the VirtualInterfaceState field's value. -func (s *ConfirmPublicVirtualInterfaceOutput) SetVirtualInterfaceState(v string) *ConfirmPublicVirtualInterfaceOutput { - s.VirtualInterfaceState = &v - return s -} - -// Information about an AWS Direct Connect connection. -type Connection struct { - _ struct{} `type:"structure"` - - // The Direct Connect endpoint on which the physical connection terminates. - AwsDevice *string `locationName:"awsDevice" deprecated:"true" type:"string"` - - // The Direct Connect endpoint on which the physical connection terminates. - AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - - // The bandwidth of the connection. - Bandwidth *string `locationName:"bandwidth" type:"string"` - - // The ID of the connection. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // The name of the connection. - ConnectionName *string `locationName:"connectionName" type:"string"` - - // The state of the connection. The following are the possible values: - // - // * ordering: The initial state of a hosted connection provisioned on an - // interconnect. The connection stays in the ordering state until the owner - // of the hosted connection confirms or declines the connection order. - // - // * requested: The initial state of a standard connection. The connection - // stays in the requested state until the Letter of Authorization (LOA) is - // sent to the customer. - // - // * pending: The connection has been approved and is being initialized. - // - // * available: The network link is up and the connection is ready for use. - // - // * down: The network link is down. - // - // * deleting: The connection is being deleted. - // - // * deleted: The connection has been deleted. - // - // * rejected: A hosted connection in the ordering state enters the rejected - // state if it is deleted by the customer. - ConnectionState *string `locationName:"connectionState" type:"string" enum:"ConnectionState"` - - // Indicates whether the connection supports a secondary BGP peer in the same - // address family (IPv4/IPv6). - HasLogicalRedundancy *string `locationName:"hasLogicalRedundancy" type:"string" enum:"HasLogicalRedundancy"` - - // Indicates whether jumbo frames (9001 MTU) are supported. - JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` - - // The ID of the LAG. - LagId *string `locationName:"lagId" type:"string"` - - // The time of the most recent call to DescribeLoa for this connection. - LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp"` - - // The location of the connection. - Location *string `locationName:"location" type:"string"` - - // The ID of the AWS account that owns the connection. - OwnerAccount *string `locationName:"ownerAccount" type:"string"` - - // The name of the AWS Direct Connect service provider associated with the connection. - PartnerName *string `locationName:"partnerName" type:"string"` - - // The AWS Region where the connection is located. - Region *string `locationName:"region" type:"string"` - - // The ID of the VLAN. - Vlan *int64 `locationName:"vlan" type:"integer"` -} - -// String returns the string representation -func (s Connection) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Connection) GoString() string { - return s.String() -} - -// SetAwsDevice sets the AwsDevice field's value. -func (s *Connection) SetAwsDevice(v string) *Connection { - s.AwsDevice = &v - return s -} - -// SetAwsDeviceV2 sets the AwsDeviceV2 field's value. -func (s *Connection) SetAwsDeviceV2(v string) *Connection { - s.AwsDeviceV2 = &v - return s -} - -// SetBandwidth sets the Bandwidth field's value. -func (s *Connection) SetBandwidth(v string) *Connection { - s.Bandwidth = &v - return s -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *Connection) SetConnectionId(v string) *Connection { - s.ConnectionId = &v - return s -} - -// SetConnectionName sets the ConnectionName field's value. -func (s *Connection) SetConnectionName(v string) *Connection { - s.ConnectionName = &v - return s -} - -// SetConnectionState sets the ConnectionState field's value. -func (s *Connection) SetConnectionState(v string) *Connection { - s.ConnectionState = &v - return s -} - -// SetHasLogicalRedundancy sets the HasLogicalRedundancy field's value. -func (s *Connection) SetHasLogicalRedundancy(v string) *Connection { - s.HasLogicalRedundancy = &v - return s -} - -// SetJumboFrameCapable sets the JumboFrameCapable field's value. -func (s *Connection) SetJumboFrameCapable(v bool) *Connection { - s.JumboFrameCapable = &v - return s -} - -// SetLagId sets the LagId field's value. -func (s *Connection) SetLagId(v string) *Connection { - s.LagId = &v - return s -} - -// SetLoaIssueTime sets the LoaIssueTime field's value. -func (s *Connection) SetLoaIssueTime(v time.Time) *Connection { - s.LoaIssueTime = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *Connection) SetLocation(v string) *Connection { - s.Location = &v - return s -} - -// SetOwnerAccount sets the OwnerAccount field's value. -func (s *Connection) SetOwnerAccount(v string) *Connection { - s.OwnerAccount = &v - return s -} - -// SetPartnerName sets the PartnerName field's value. -func (s *Connection) SetPartnerName(v string) *Connection { - s.PartnerName = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *Connection) SetRegion(v string) *Connection { - s.Region = &v - return s -} - -// SetVlan sets the Vlan field's value. -func (s *Connection) SetVlan(v int64) *Connection { - s.Vlan = &v - return s -} - -type Connections struct { - _ struct{} `type:"structure"` - - // The connections. - Connections []*Connection `locationName:"connections" type:"list"` -} - -// String returns the string representation -func (s Connections) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Connections) GoString() string { - return s.String() -} - -// SetConnections sets the Connections field's value. -func (s *Connections) SetConnections(v []*Connection) *Connections { - s.Connections = v - return s -} - -type CreateBGPPeerInput struct { - _ struct{} `type:"structure"` - - // Information about the BGP peer. - NewBGPPeer *NewBGPPeer `locationName:"newBGPPeer" type:"structure"` - - // The ID of the virtual interface. - VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` -} - -// String returns the string representation -func (s CreateBGPPeerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBGPPeerInput) GoString() string { - return s.String() -} - -// SetNewBGPPeer sets the NewBGPPeer field's value. -func (s *CreateBGPPeerInput) SetNewBGPPeer(v *NewBGPPeer) *CreateBGPPeerInput { - s.NewBGPPeer = v - return s -} - -// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. -func (s *CreateBGPPeerInput) SetVirtualInterfaceId(v string) *CreateBGPPeerInput { - s.VirtualInterfaceId = &v - return s -} - -type CreateBGPPeerOutput struct { - _ struct{} `type:"structure"` - - // The virtual interface. - VirtualInterface *VirtualInterface `locationName:"virtualInterface" type:"structure"` -} - -// String returns the string representation -func (s CreateBGPPeerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBGPPeerOutput) GoString() string { - return s.String() -} - -// SetVirtualInterface sets the VirtualInterface field's value. -func (s *CreateBGPPeerOutput) SetVirtualInterface(v *VirtualInterface) *CreateBGPPeerOutput { - s.VirtualInterface = v - return s -} - -type CreateConnectionInput struct { - _ struct{} `type:"structure"` - - // The bandwidth of the connection. - // - // Bandwidth is a required field - Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` - - // The name of the connection. - // - // ConnectionName is a required field - ConnectionName *string `locationName:"connectionName" type:"string" required:"true"` - - // The ID of the LAG. - LagId *string `locationName:"lagId" type:"string"` - - // The location of the connection. - // - // Location is a required field - Location *string `locationName:"location" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateConnectionInput"} - if s.Bandwidth == nil { - invalidParams.Add(request.NewErrParamRequired("Bandwidth")) - } - if s.ConnectionName == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionName")) - } - if s.Location == nil { - invalidParams.Add(request.NewErrParamRequired("Location")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBandwidth sets the Bandwidth field's value. -func (s *CreateConnectionInput) SetBandwidth(v string) *CreateConnectionInput { - s.Bandwidth = &v - return s -} - -// SetConnectionName sets the ConnectionName field's value. -func (s *CreateConnectionInput) SetConnectionName(v string) *CreateConnectionInput { - s.ConnectionName = &v - return s -} - -// SetLagId sets the LagId field's value. -func (s *CreateConnectionInput) SetLagId(v string) *CreateConnectionInput { - s.LagId = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateConnectionInput) SetLocation(v string) *CreateConnectionInput { - s.Location = &v - return s -} - -type CreateDirectConnectGatewayAssociationInput struct { - _ struct{} `type:"structure"` - - // The ID of the Direct Connect gateway. - // - // DirectConnectGatewayId is a required field - DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string" required:"true"` - - // The ID of the virtual private gateway. - // - // VirtualGatewayId is a required field - VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateDirectConnectGatewayAssociationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDirectConnectGatewayAssociationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDirectConnectGatewayAssociationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDirectConnectGatewayAssociationInput"} - if s.DirectConnectGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectConnectGatewayId")) - } - if s.VirtualGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. -func (s *CreateDirectConnectGatewayAssociationInput) SetDirectConnectGatewayId(v string) *CreateDirectConnectGatewayAssociationInput { - s.DirectConnectGatewayId = &v - return s -} - -// SetVirtualGatewayId sets the VirtualGatewayId field's value. -func (s *CreateDirectConnectGatewayAssociationInput) SetVirtualGatewayId(v string) *CreateDirectConnectGatewayAssociationInput { - s.VirtualGatewayId = &v - return s -} - -type CreateDirectConnectGatewayAssociationOutput struct { - _ struct{} `type:"structure"` - - // The association to be created. - DirectConnectGatewayAssociation *GatewayAssociation `locationName:"directConnectGatewayAssociation" type:"structure"` -} - -// String returns the string representation -func (s CreateDirectConnectGatewayAssociationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDirectConnectGatewayAssociationOutput) GoString() string { - return s.String() -} - -// SetDirectConnectGatewayAssociation sets the DirectConnectGatewayAssociation field's value. -func (s *CreateDirectConnectGatewayAssociationOutput) SetDirectConnectGatewayAssociation(v *GatewayAssociation) *CreateDirectConnectGatewayAssociationOutput { - s.DirectConnectGatewayAssociation = v - return s -} - -type CreateDirectConnectGatewayInput struct { - _ struct{} `type:"structure"` - - // The autonomous system number (ASN) for Border Gateway Protocol (BGP) to be - // configured on the Amazon side of the connection. The ASN must be in the private - // range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294. The default - // is 64512. - AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` - - // The name of the Direct Connect gateway. - // - // DirectConnectGatewayName is a required field - DirectConnectGatewayName *string `locationName:"directConnectGatewayName" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateDirectConnectGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDirectConnectGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDirectConnectGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDirectConnectGatewayInput"} - if s.DirectConnectGatewayName == nil { - invalidParams.Add(request.NewErrParamRequired("DirectConnectGatewayName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAmazonSideAsn sets the AmazonSideAsn field's value. -func (s *CreateDirectConnectGatewayInput) SetAmazonSideAsn(v int64) *CreateDirectConnectGatewayInput { - s.AmazonSideAsn = &v - return s -} - -// SetDirectConnectGatewayName sets the DirectConnectGatewayName field's value. -func (s *CreateDirectConnectGatewayInput) SetDirectConnectGatewayName(v string) *CreateDirectConnectGatewayInput { - s.DirectConnectGatewayName = &v - return s -} - -type CreateDirectConnectGatewayOutput struct { - _ struct{} `type:"structure"` - - // The Direct Connect gateway. - DirectConnectGateway *Gateway `locationName:"directConnectGateway" type:"structure"` -} - -// String returns the string representation -func (s CreateDirectConnectGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDirectConnectGatewayOutput) GoString() string { - return s.String() -} - -// SetDirectConnectGateway sets the DirectConnectGateway field's value. -func (s *CreateDirectConnectGatewayOutput) SetDirectConnectGateway(v *Gateway) *CreateDirectConnectGatewayOutput { - s.DirectConnectGateway = v - return s -} - -type CreateInterconnectInput struct { - _ struct{} `type:"structure"` - - // The port bandwidth, in Gbps. The possible values are 1 and 10. - // - // Bandwidth is a required field - Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` - - // The name of the interconnect. - // - // InterconnectName is a required field - InterconnectName *string `locationName:"interconnectName" type:"string" required:"true"` - - // The ID of the LAG. - LagId *string `locationName:"lagId" type:"string"` - - // The location of the interconnect. - // - // Location is a required field - Location *string `locationName:"location" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateInterconnectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInterconnectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInterconnectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInterconnectInput"} - if s.Bandwidth == nil { - invalidParams.Add(request.NewErrParamRequired("Bandwidth")) - } - if s.InterconnectName == nil { - invalidParams.Add(request.NewErrParamRequired("InterconnectName")) - } - if s.Location == nil { - invalidParams.Add(request.NewErrParamRequired("Location")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBandwidth sets the Bandwidth field's value. -func (s *CreateInterconnectInput) SetBandwidth(v string) *CreateInterconnectInput { - s.Bandwidth = &v - return s -} - -// SetInterconnectName sets the InterconnectName field's value. -func (s *CreateInterconnectInput) SetInterconnectName(v string) *CreateInterconnectInput { - s.InterconnectName = &v - return s -} - -// SetLagId sets the LagId field's value. -func (s *CreateInterconnectInput) SetLagId(v string) *CreateInterconnectInput { - s.LagId = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateInterconnectInput) SetLocation(v string) *CreateInterconnectInput { - s.Location = &v - return s -} - -type CreateLagInput struct { - _ struct{} `type:"structure"` - - // The ID of an existing connection to migrate to the LAG. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // The bandwidth of the individual physical connections bundled by the LAG. - // The possible values are 1Gbps and 10Gbps. - // - // ConnectionsBandwidth is a required field - ConnectionsBandwidth *string `locationName:"connectionsBandwidth" type:"string" required:"true"` - - // The name of the LAG. - // - // LagName is a required field - LagName *string `locationName:"lagName" type:"string" required:"true"` - - // The location for the LAG. - // - // Location is a required field - Location *string `locationName:"location" type:"string" required:"true"` - - // The number of physical connections initially provisioned and bundled by the - // LAG. - // - // NumberOfConnections is a required field - NumberOfConnections *int64 `locationName:"numberOfConnections" type:"integer" required:"true"` -} - -// String returns the string representation -func (s CreateLagInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLagInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLagInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLagInput"} - if s.ConnectionsBandwidth == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionsBandwidth")) - } - if s.LagName == nil { - invalidParams.Add(request.NewErrParamRequired("LagName")) - } - if s.Location == nil { - invalidParams.Add(request.NewErrParamRequired("Location")) - } - if s.NumberOfConnections == nil { - invalidParams.Add(request.NewErrParamRequired("NumberOfConnections")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *CreateLagInput) SetConnectionId(v string) *CreateLagInput { - s.ConnectionId = &v - return s -} - -// SetConnectionsBandwidth sets the ConnectionsBandwidth field's value. -func (s *CreateLagInput) SetConnectionsBandwidth(v string) *CreateLagInput { - s.ConnectionsBandwidth = &v - return s -} - -// SetLagName sets the LagName field's value. -func (s *CreateLagInput) SetLagName(v string) *CreateLagInput { - s.LagName = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateLagInput) SetLocation(v string) *CreateLagInput { - s.Location = &v - return s -} - -// SetNumberOfConnections sets the NumberOfConnections field's value. -func (s *CreateLagInput) SetNumberOfConnections(v int64) *CreateLagInput { - s.NumberOfConnections = &v - return s -} - -type CreatePrivateVirtualInterfaceInput struct { - _ struct{} `type:"structure"` - - // The ID of the connection. - // - // ConnectionId is a required field - ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - - // Information about the private virtual interface. - // - // NewPrivateVirtualInterface is a required field - NewPrivateVirtualInterface *NewPrivateVirtualInterface `locationName:"newPrivateVirtualInterface" type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreatePrivateVirtualInterfaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePrivateVirtualInterfaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePrivateVirtualInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePrivateVirtualInterfaceInput"} - if s.ConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionId")) - } - if s.NewPrivateVirtualInterface == nil { - invalidParams.Add(request.NewErrParamRequired("NewPrivateVirtualInterface")) - } - if s.NewPrivateVirtualInterface != nil { - if err := s.NewPrivateVirtualInterface.Validate(); err != nil { - invalidParams.AddNested("NewPrivateVirtualInterface", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *CreatePrivateVirtualInterfaceInput) SetConnectionId(v string) *CreatePrivateVirtualInterfaceInput { - s.ConnectionId = &v - return s -} - -// SetNewPrivateVirtualInterface sets the NewPrivateVirtualInterface field's value. -func (s *CreatePrivateVirtualInterfaceInput) SetNewPrivateVirtualInterface(v *NewPrivateVirtualInterface) *CreatePrivateVirtualInterfaceInput { - s.NewPrivateVirtualInterface = v - return s -} - -type CreatePublicVirtualInterfaceInput struct { - _ struct{} `type:"structure"` - - // The ID of the connection. - // - // ConnectionId is a required field - ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - - // Information about the public virtual interface. - // - // NewPublicVirtualInterface is a required field - NewPublicVirtualInterface *NewPublicVirtualInterface `locationName:"newPublicVirtualInterface" type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreatePublicVirtualInterfaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePublicVirtualInterfaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePublicVirtualInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePublicVirtualInterfaceInput"} - if s.ConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionId")) - } - if s.NewPublicVirtualInterface == nil { - invalidParams.Add(request.NewErrParamRequired("NewPublicVirtualInterface")) - } - if s.NewPublicVirtualInterface != nil { - if err := s.NewPublicVirtualInterface.Validate(); err != nil { - invalidParams.AddNested("NewPublicVirtualInterface", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *CreatePublicVirtualInterfaceInput) SetConnectionId(v string) *CreatePublicVirtualInterfaceInput { - s.ConnectionId = &v - return s -} - -// SetNewPublicVirtualInterface sets the NewPublicVirtualInterface field's value. -func (s *CreatePublicVirtualInterfaceInput) SetNewPublicVirtualInterface(v *NewPublicVirtualInterface) *CreatePublicVirtualInterfaceInput { - s.NewPublicVirtualInterface = v - return s -} - -type DeleteBGPPeerInput struct { - _ struct{} `type:"structure"` - - // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - Asn *int64 `locationName:"asn" type:"integer"` - - // The ID of the BGP peer. - BgpPeerId *string `locationName:"bgpPeerId" type:"string"` - - // The IP address assigned to the customer interface. - CustomerAddress *string `locationName:"customerAddress" type:"string"` - - // The ID of the virtual interface. - VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` -} - -// String returns the string representation -func (s DeleteBGPPeerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBGPPeerInput) GoString() string { - return s.String() -} - -// SetAsn sets the Asn field's value. -func (s *DeleteBGPPeerInput) SetAsn(v int64) *DeleteBGPPeerInput { - s.Asn = &v - return s -} - -// SetBgpPeerId sets the BgpPeerId field's value. -func (s *DeleteBGPPeerInput) SetBgpPeerId(v string) *DeleteBGPPeerInput { - s.BgpPeerId = &v - return s -} - -// SetCustomerAddress sets the CustomerAddress field's value. -func (s *DeleteBGPPeerInput) SetCustomerAddress(v string) *DeleteBGPPeerInput { - s.CustomerAddress = &v - return s -} - -// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. -func (s *DeleteBGPPeerInput) SetVirtualInterfaceId(v string) *DeleteBGPPeerInput { - s.VirtualInterfaceId = &v - return s -} - -type DeleteBGPPeerOutput struct { - _ struct{} `type:"structure"` - - // The virtual interface. - VirtualInterface *VirtualInterface `locationName:"virtualInterface" type:"structure"` -} - -// String returns the string representation -func (s DeleteBGPPeerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBGPPeerOutput) GoString() string { - return s.String() -} - -// SetVirtualInterface sets the VirtualInterface field's value. -func (s *DeleteBGPPeerOutput) SetVirtualInterface(v *VirtualInterface) *DeleteBGPPeerOutput { - s.VirtualInterface = v - return s -} - -type DeleteConnectionInput struct { - _ struct{} `type:"structure"` - - // The ID of the connection. - // - // ConnectionId is a required field - ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteConnectionInput"} - if s.ConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *DeleteConnectionInput) SetConnectionId(v string) *DeleteConnectionInput { - s.ConnectionId = &v - return s -} - -type DeleteDirectConnectGatewayAssociationInput struct { - _ struct{} `type:"structure"` - - // The ID of the Direct Connect gateway. - // - // DirectConnectGatewayId is a required field - DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string" required:"true"` - - // The ID of the virtual private gateway. - // - // VirtualGatewayId is a required field - VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDirectConnectGatewayAssociationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDirectConnectGatewayAssociationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDirectConnectGatewayAssociationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDirectConnectGatewayAssociationInput"} - if s.DirectConnectGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectConnectGatewayId")) - } - if s.VirtualGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. -func (s *DeleteDirectConnectGatewayAssociationInput) SetDirectConnectGatewayId(v string) *DeleteDirectConnectGatewayAssociationInput { - s.DirectConnectGatewayId = &v - return s -} - -// SetVirtualGatewayId sets the VirtualGatewayId field's value. -func (s *DeleteDirectConnectGatewayAssociationInput) SetVirtualGatewayId(v string) *DeleteDirectConnectGatewayAssociationInput { - s.VirtualGatewayId = &v - return s -} - -type DeleteDirectConnectGatewayAssociationOutput struct { - _ struct{} `type:"structure"` - - // The association to be deleted. - DirectConnectGatewayAssociation *GatewayAssociation `locationName:"directConnectGatewayAssociation" type:"structure"` -} - -// String returns the string representation -func (s DeleteDirectConnectGatewayAssociationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDirectConnectGatewayAssociationOutput) GoString() string { - return s.String() -} - -// SetDirectConnectGatewayAssociation sets the DirectConnectGatewayAssociation field's value. -func (s *DeleteDirectConnectGatewayAssociationOutput) SetDirectConnectGatewayAssociation(v *GatewayAssociation) *DeleteDirectConnectGatewayAssociationOutput { - s.DirectConnectGatewayAssociation = v - return s -} - -type DeleteDirectConnectGatewayInput struct { - _ struct{} `type:"structure"` - - // The ID of the Direct Connect gateway. - // - // DirectConnectGatewayId is a required field - DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDirectConnectGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDirectConnectGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDirectConnectGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDirectConnectGatewayInput"} - if s.DirectConnectGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectConnectGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. -func (s *DeleteDirectConnectGatewayInput) SetDirectConnectGatewayId(v string) *DeleteDirectConnectGatewayInput { - s.DirectConnectGatewayId = &v - return s -} - -type DeleteDirectConnectGatewayOutput struct { - _ struct{} `type:"structure"` - - // The Direct Connect gateway. - DirectConnectGateway *Gateway `locationName:"directConnectGateway" type:"structure"` -} - -// String returns the string representation -func (s DeleteDirectConnectGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDirectConnectGatewayOutput) GoString() string { - return s.String() -} - -// SetDirectConnectGateway sets the DirectConnectGateway field's value. -func (s *DeleteDirectConnectGatewayOutput) SetDirectConnectGateway(v *Gateway) *DeleteDirectConnectGatewayOutput { - s.DirectConnectGateway = v - return s -} - -type DeleteInterconnectInput struct { - _ struct{} `type:"structure"` - - // The ID of the interconnect. - // - // InterconnectId is a required field - InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteInterconnectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInterconnectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInterconnectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInterconnectInput"} - if s.InterconnectId == nil { - invalidParams.Add(request.NewErrParamRequired("InterconnectId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInterconnectId sets the InterconnectId field's value. -func (s *DeleteInterconnectInput) SetInterconnectId(v string) *DeleteInterconnectInput { - s.InterconnectId = &v - return s -} - -type DeleteInterconnectOutput struct { - _ struct{} `type:"structure"` - - // The state of the interconnect. The following are the possible values: - // - // * requested: The initial state of an interconnect. The interconnect stays - // in the requested state until the Letter of Authorization (LOA) is sent - // to the customer. - // - // * pending: The interconnect is approved, and is being initialized. - // - // * available: The network link is up, and the interconnect is ready for - // use. - // - // * down: The network link is down. - // - // * deleting: The interconnect is being deleted. - // - // * deleted: The interconnect is deleted. - InterconnectState *string `locationName:"interconnectState" type:"string" enum:"InterconnectState"` -} - -// String returns the string representation -func (s DeleteInterconnectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInterconnectOutput) GoString() string { - return s.String() -} - -// SetInterconnectState sets the InterconnectState field's value. -func (s *DeleteInterconnectOutput) SetInterconnectState(v string) *DeleteInterconnectOutput { - s.InterconnectState = &v - return s -} - -type DeleteLagInput struct { - _ struct{} `type:"structure"` - - // The ID of the LAG. - // - // LagId is a required field - LagId *string `locationName:"lagId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLagInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLagInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLagInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLagInput"} - if s.LagId == nil { - invalidParams.Add(request.NewErrParamRequired("LagId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLagId sets the LagId field's value. -func (s *DeleteLagInput) SetLagId(v string) *DeleteLagInput { - s.LagId = &v - return s -} - -type DeleteVirtualInterfaceInput struct { - _ struct{} `type:"structure"` - - // The ID of the virtual interface. - // - // VirtualInterfaceId is a required field - VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVirtualInterfaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVirtualInterfaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVirtualInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVirtualInterfaceInput"} - if s.VirtualInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. -func (s *DeleteVirtualInterfaceInput) SetVirtualInterfaceId(v string) *DeleteVirtualInterfaceInput { - s.VirtualInterfaceId = &v - return s -} - -type DeleteVirtualInterfaceOutput struct { - _ struct{} `type:"structure"` - - // The state of the virtual interface. The following are the possible values: - // - // * confirming: The creation of the virtual interface is pending confirmation - // from the virtual interface owner. If the owner of the virtual interface - // is different from the owner of the connection on which it is provisioned, - // then the virtual interface will remain in this state until it is confirmed - // by the virtual interface owner. - // - // * verifying: This state only applies to public virtual interfaces. Each - // public virtual interface needs validation before the virtual interface - // can be created. - // - // * pending: A virtual interface is in this state from the time that it - // is created until the virtual interface is ready to forward traffic. - // - // * available: A virtual interface that is able to forward traffic. - // - // * down: A virtual interface that is BGP down. - // - // * deleting: A virtual interface is in this state immediately after calling - // DeleteVirtualInterface until it can no longer forward traffic. - // - // * deleted: A virtual interface that cannot forward traffic. - // - // * rejected: The virtual interface owner has declined creation of the virtual - // interface. If a virtual interface in the Confirming state is deleted by - // the virtual interface owner, the virtual interface enters the Rejected - // state. - VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` -} - -// String returns the string representation -func (s DeleteVirtualInterfaceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVirtualInterfaceOutput) GoString() string { - return s.String() -} - -// SetVirtualInterfaceState sets the VirtualInterfaceState field's value. -func (s *DeleteVirtualInterfaceOutput) SetVirtualInterfaceState(v string) *DeleteVirtualInterfaceOutput { - s.VirtualInterfaceState = &v - return s -} - -type DescribeConnectionLoaInput struct { - _ struct{} `type:"structure"` - - // The ID of the connection. - // - // ConnectionId is a required field - ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - - // The standard media type for the LOA-CFA document. The only supported value - // is application/pdf. - LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` - - // The name of the APN partner or service provider who establishes connectivity - // on your behalf. If you specify this parameter, the LOA-CFA lists the provider - // name alongside your company name as the requester of the cross connect. - ProviderName *string `locationName:"providerName" type:"string"` -} - -// String returns the string representation -func (s DescribeConnectionLoaInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConnectionLoaInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeConnectionLoaInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeConnectionLoaInput"} - if s.ConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *DescribeConnectionLoaInput) SetConnectionId(v string) *DescribeConnectionLoaInput { - s.ConnectionId = &v - return s -} - -// SetLoaContentType sets the LoaContentType field's value. -func (s *DescribeConnectionLoaInput) SetLoaContentType(v string) *DescribeConnectionLoaInput { - s.LoaContentType = &v - return s -} - -// SetProviderName sets the ProviderName field's value. -func (s *DescribeConnectionLoaInput) SetProviderName(v string) *DescribeConnectionLoaInput { - s.ProviderName = &v - return s -} - -type DescribeConnectionLoaOutput struct { - _ struct{} `type:"structure"` - - // The Letter of Authorization - Connecting Facility Assignment (LOA-CFA). - Loa *Loa `locationName:"loa" type:"structure"` -} - -// String returns the string representation -func (s DescribeConnectionLoaOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConnectionLoaOutput) GoString() string { - return s.String() -} - -// SetLoa sets the Loa field's value. -func (s *DescribeConnectionLoaOutput) SetLoa(v *Loa) *DescribeConnectionLoaOutput { - s.Loa = v - return s -} - -type DescribeConnectionsInput struct { - _ struct{} `type:"structure"` - - // The ID of the connection. - ConnectionId *string `locationName:"connectionId" type:"string"` -} - -// String returns the string representation -func (s DescribeConnectionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConnectionsInput) GoString() string { - return s.String() -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *DescribeConnectionsInput) SetConnectionId(v string) *DescribeConnectionsInput { - s.ConnectionId = &v - return s -} - -type DescribeConnectionsOnInterconnectInput struct { - _ struct{} `type:"structure"` - - // The ID of the interconnect. - // - // InterconnectId is a required field - InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeConnectionsOnInterconnectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConnectionsOnInterconnectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeConnectionsOnInterconnectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeConnectionsOnInterconnectInput"} - if s.InterconnectId == nil { - invalidParams.Add(request.NewErrParamRequired("InterconnectId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInterconnectId sets the InterconnectId field's value. -func (s *DescribeConnectionsOnInterconnectInput) SetInterconnectId(v string) *DescribeConnectionsOnInterconnectInput { - s.InterconnectId = &v - return s -} - -type DescribeDirectConnectGatewayAssociationsInput struct { - _ struct{} `type:"structure"` - - // The ID of the Direct Connect gateway. - DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - - // The maximum number of associations to return per page. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token provided in the previous call to retrieve the next page. - NextToken *string `locationName:"nextToken" type:"string"` - - // The ID of the virtual private gateway. - VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` -} - -// String returns the string representation -func (s DescribeDirectConnectGatewayAssociationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDirectConnectGatewayAssociationsInput) GoString() string { - return s.String() -} - -// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. -func (s *DescribeDirectConnectGatewayAssociationsInput) SetDirectConnectGatewayId(v string) *DescribeDirectConnectGatewayAssociationsInput { - s.DirectConnectGatewayId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeDirectConnectGatewayAssociationsInput) SetMaxResults(v int64) *DescribeDirectConnectGatewayAssociationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDirectConnectGatewayAssociationsInput) SetNextToken(v string) *DescribeDirectConnectGatewayAssociationsInput { - s.NextToken = &v - return s -} - -// SetVirtualGatewayId sets the VirtualGatewayId field's value. -func (s *DescribeDirectConnectGatewayAssociationsInput) SetVirtualGatewayId(v string) *DescribeDirectConnectGatewayAssociationsInput { - s.VirtualGatewayId = &v - return s -} - -type DescribeDirectConnectGatewayAssociationsOutput struct { - _ struct{} `type:"structure"` - - // The associations. - DirectConnectGatewayAssociations []*GatewayAssociation `locationName:"directConnectGatewayAssociations" type:"list"` - - // The token to retrieve the next page. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeDirectConnectGatewayAssociationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDirectConnectGatewayAssociationsOutput) GoString() string { - return s.String() -} - -// SetDirectConnectGatewayAssociations sets the DirectConnectGatewayAssociations field's value. -func (s *DescribeDirectConnectGatewayAssociationsOutput) SetDirectConnectGatewayAssociations(v []*GatewayAssociation) *DescribeDirectConnectGatewayAssociationsOutput { - s.DirectConnectGatewayAssociations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDirectConnectGatewayAssociationsOutput) SetNextToken(v string) *DescribeDirectConnectGatewayAssociationsOutput { - s.NextToken = &v - return s -} - -type DescribeDirectConnectGatewayAttachmentsInput struct { - _ struct{} `type:"structure"` - - // The ID of the Direct Connect gateway. - DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - - // The maximum number of attachments to return per page. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token provided in the previous call to retrieve the next page. - NextToken *string `locationName:"nextToken" type:"string"` - - // The ID of the virtual interface. - VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` -} - -// String returns the string representation -func (s DescribeDirectConnectGatewayAttachmentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDirectConnectGatewayAttachmentsInput) GoString() string { - return s.String() -} - -// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. -func (s *DescribeDirectConnectGatewayAttachmentsInput) SetDirectConnectGatewayId(v string) *DescribeDirectConnectGatewayAttachmentsInput { - s.DirectConnectGatewayId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeDirectConnectGatewayAttachmentsInput) SetMaxResults(v int64) *DescribeDirectConnectGatewayAttachmentsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDirectConnectGatewayAttachmentsInput) SetNextToken(v string) *DescribeDirectConnectGatewayAttachmentsInput { - s.NextToken = &v - return s -} - -// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. -func (s *DescribeDirectConnectGatewayAttachmentsInput) SetVirtualInterfaceId(v string) *DescribeDirectConnectGatewayAttachmentsInput { - s.VirtualInterfaceId = &v - return s -} - -type DescribeDirectConnectGatewayAttachmentsOutput struct { - _ struct{} `type:"structure"` - - // The attachments. - DirectConnectGatewayAttachments []*GatewayAttachment `locationName:"directConnectGatewayAttachments" type:"list"` - - // The token to retrieve the next page. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeDirectConnectGatewayAttachmentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDirectConnectGatewayAttachmentsOutput) GoString() string { - return s.String() -} - -// SetDirectConnectGatewayAttachments sets the DirectConnectGatewayAttachments field's value. -func (s *DescribeDirectConnectGatewayAttachmentsOutput) SetDirectConnectGatewayAttachments(v []*GatewayAttachment) *DescribeDirectConnectGatewayAttachmentsOutput { - s.DirectConnectGatewayAttachments = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDirectConnectGatewayAttachmentsOutput) SetNextToken(v string) *DescribeDirectConnectGatewayAttachmentsOutput { - s.NextToken = &v - return s -} - -type DescribeDirectConnectGatewaysInput struct { - _ struct{} `type:"structure"` - - // The ID of the Direct Connect gateway. - DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - - // The maximum number of Direct Connect gateways to return per page. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token provided in the previous call to retrieve the next page. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeDirectConnectGatewaysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDirectConnectGatewaysInput) GoString() string { - return s.String() -} - -// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. -func (s *DescribeDirectConnectGatewaysInput) SetDirectConnectGatewayId(v string) *DescribeDirectConnectGatewaysInput { - s.DirectConnectGatewayId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeDirectConnectGatewaysInput) SetMaxResults(v int64) *DescribeDirectConnectGatewaysInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDirectConnectGatewaysInput) SetNextToken(v string) *DescribeDirectConnectGatewaysInput { - s.NextToken = &v - return s -} - -type DescribeDirectConnectGatewaysOutput struct { - _ struct{} `type:"structure"` - - // The Direct Connect gateways. - DirectConnectGateways []*Gateway `locationName:"directConnectGateways" type:"list"` - - // The token to retrieve the next page. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeDirectConnectGatewaysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDirectConnectGatewaysOutput) GoString() string { - return s.String() -} - -// SetDirectConnectGateways sets the DirectConnectGateways field's value. -func (s *DescribeDirectConnectGatewaysOutput) SetDirectConnectGateways(v []*Gateway) *DescribeDirectConnectGatewaysOutput { - s.DirectConnectGateways = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDirectConnectGatewaysOutput) SetNextToken(v string) *DescribeDirectConnectGatewaysOutput { - s.NextToken = &v - return s -} - -type DescribeHostedConnectionsInput struct { - _ struct{} `type:"structure"` - - // The ID of the interconnect or LAG. - // - // ConnectionId is a required field - ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeHostedConnectionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHostedConnectionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeHostedConnectionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeHostedConnectionsInput"} - if s.ConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *DescribeHostedConnectionsInput) SetConnectionId(v string) *DescribeHostedConnectionsInput { - s.ConnectionId = &v - return s -} - -type DescribeInterconnectLoaInput struct { - _ struct{} `type:"structure"` - - // The ID of the interconnect. - // - // InterconnectId is a required field - InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` - - // The standard media type for the LOA-CFA document. The only supported value - // is application/pdf. - LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` - - // The name of the service provider who establishes connectivity on your behalf. - // If you supply this parameter, the LOA-CFA lists the provider name alongside - // your company name as the requester of the cross connect. - ProviderName *string `locationName:"providerName" type:"string"` -} - -// String returns the string representation -func (s DescribeInterconnectLoaInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInterconnectLoaInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInterconnectLoaInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInterconnectLoaInput"} - if s.InterconnectId == nil { - invalidParams.Add(request.NewErrParamRequired("InterconnectId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInterconnectId sets the InterconnectId field's value. -func (s *DescribeInterconnectLoaInput) SetInterconnectId(v string) *DescribeInterconnectLoaInput { - s.InterconnectId = &v - return s -} - -// SetLoaContentType sets the LoaContentType field's value. -func (s *DescribeInterconnectLoaInput) SetLoaContentType(v string) *DescribeInterconnectLoaInput { - s.LoaContentType = &v - return s -} - -// SetProviderName sets the ProviderName field's value. -func (s *DescribeInterconnectLoaInput) SetProviderName(v string) *DescribeInterconnectLoaInput { - s.ProviderName = &v - return s -} - -type DescribeInterconnectLoaOutput struct { - _ struct{} `type:"structure"` - - // The Letter of Authorization - Connecting Facility Assignment (LOA-CFA). - Loa *Loa `locationName:"loa" type:"structure"` -} - -// String returns the string representation -func (s DescribeInterconnectLoaOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInterconnectLoaOutput) GoString() string { - return s.String() -} - -// SetLoa sets the Loa field's value. -func (s *DescribeInterconnectLoaOutput) SetLoa(v *Loa) *DescribeInterconnectLoaOutput { - s.Loa = v - return s -} - -type DescribeInterconnectsInput struct { - _ struct{} `type:"structure"` - - // The ID of the interconnect. - InterconnectId *string `locationName:"interconnectId" type:"string"` -} - -// String returns the string representation -func (s DescribeInterconnectsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInterconnectsInput) GoString() string { - return s.String() -} - -// SetInterconnectId sets the InterconnectId field's value. -func (s *DescribeInterconnectsInput) SetInterconnectId(v string) *DescribeInterconnectsInput { - s.InterconnectId = &v - return s -} - -type DescribeInterconnectsOutput struct { - _ struct{} `type:"structure"` - - // The interconnects. - Interconnects []*Interconnect `locationName:"interconnects" type:"list"` -} - -// String returns the string representation -func (s DescribeInterconnectsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInterconnectsOutput) GoString() string { - return s.String() -} - -// SetInterconnects sets the Interconnects field's value. -func (s *DescribeInterconnectsOutput) SetInterconnects(v []*Interconnect) *DescribeInterconnectsOutput { - s.Interconnects = v - return s -} - -type DescribeLagsInput struct { - _ struct{} `type:"structure"` - - // The ID of the LAG. - LagId *string `locationName:"lagId" type:"string"` -} - -// String returns the string representation -func (s DescribeLagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLagsInput) GoString() string { - return s.String() -} - -// SetLagId sets the LagId field's value. -func (s *DescribeLagsInput) SetLagId(v string) *DescribeLagsInput { - s.LagId = &v - return s -} - -type DescribeLagsOutput struct { - _ struct{} `type:"structure"` - - // The LAGs. - Lags []*Lag `locationName:"lags" type:"list"` -} - -// String returns the string representation -func (s DescribeLagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLagsOutput) GoString() string { - return s.String() -} - -// SetLags sets the Lags field's value. -func (s *DescribeLagsOutput) SetLags(v []*Lag) *DescribeLagsOutput { - s.Lags = v - return s -} - -type DescribeLoaInput struct { - _ struct{} `type:"structure"` - - // The ID of a connection, LAG, or interconnect. - // - // ConnectionId is a required field - ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - - // The standard media type for the LOA-CFA document. The only supported value - // is application/pdf. - LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` - - // The name of the service provider who establishes connectivity on your behalf. - // If you specify this parameter, the LOA-CFA lists the provider name alongside - // your company name as the requester of the cross connect. - ProviderName *string `locationName:"providerName" type:"string"` -} - -// String returns the string representation -func (s DescribeLoaInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoaInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLoaInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLoaInput"} - if s.ConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *DescribeLoaInput) SetConnectionId(v string) *DescribeLoaInput { - s.ConnectionId = &v - return s -} - -// SetLoaContentType sets the LoaContentType field's value. -func (s *DescribeLoaInput) SetLoaContentType(v string) *DescribeLoaInput { - s.LoaContentType = &v - return s -} - -// SetProviderName sets the ProviderName field's value. -func (s *DescribeLoaInput) SetProviderName(v string) *DescribeLoaInput { - s.ProviderName = &v - return s -} - -type DescribeLocationsInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeLocationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLocationsInput) GoString() string { - return s.String() -} - -type DescribeLocationsOutput struct { - _ struct{} `type:"structure"` - - // The locations. - Locations []*Location `locationName:"locations" type:"list"` -} - -// String returns the string representation -func (s DescribeLocationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLocationsOutput) GoString() string { - return s.String() -} - -// SetLocations sets the Locations field's value. -func (s *DescribeLocationsOutput) SetLocations(v []*Location) *DescribeLocationsOutput { - s.Locations = v - return s -} - -type DescribeTagsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Names (ARNs) of the resources. - // - // ResourceArns is a required field - ResourceArns []*string `locationName:"resourceArns" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"} - if s.ResourceArns == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArns")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *DescribeTagsInput) SetResourceArns(v []*string) *DescribeTagsInput { - s.ResourceArns = v - return s -} - -type DescribeTagsOutput struct { - _ struct{} `type:"structure"` - - // Information about the tags. - ResourceTags []*ResourceTag `locationName:"resourceTags" type:"list"` -} - -// String returns the string representation -func (s DescribeTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsOutput) GoString() string { - return s.String() -} - -// SetResourceTags sets the ResourceTags field's value. -func (s *DescribeTagsOutput) SetResourceTags(v []*ResourceTag) *DescribeTagsOutput { - s.ResourceTags = v - return s -} - -type DescribeVirtualGatewaysInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeVirtualGatewaysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVirtualGatewaysInput) GoString() string { - return s.String() -} - -type DescribeVirtualGatewaysOutput struct { - _ struct{} `type:"structure"` - - // The virtual private gateways. - VirtualGateways []*VirtualGateway `locationName:"virtualGateways" type:"list"` -} - -// String returns the string representation -func (s DescribeVirtualGatewaysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVirtualGatewaysOutput) GoString() string { - return s.String() -} - -// SetVirtualGateways sets the VirtualGateways field's value. -func (s *DescribeVirtualGatewaysOutput) SetVirtualGateways(v []*VirtualGateway) *DescribeVirtualGatewaysOutput { - s.VirtualGateways = v - return s -} - -type DescribeVirtualInterfacesInput struct { - _ struct{} `type:"structure"` - - // The ID of the connection. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // The ID of the virtual interface. - VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` -} - -// String returns the string representation -func (s DescribeVirtualInterfacesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVirtualInterfacesInput) GoString() string { - return s.String() -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *DescribeVirtualInterfacesInput) SetConnectionId(v string) *DescribeVirtualInterfacesInput { - s.ConnectionId = &v - return s -} - -// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. -func (s *DescribeVirtualInterfacesInput) SetVirtualInterfaceId(v string) *DescribeVirtualInterfacesInput { - s.VirtualInterfaceId = &v - return s -} - -type DescribeVirtualInterfacesOutput struct { - _ struct{} `type:"structure"` - - // The virtual interfaces - VirtualInterfaces []*VirtualInterface `locationName:"virtualInterfaces" type:"list"` -} - -// String returns the string representation -func (s DescribeVirtualInterfacesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVirtualInterfacesOutput) GoString() string { - return s.String() -} - -// SetVirtualInterfaces sets the VirtualInterfaces field's value. -func (s *DescribeVirtualInterfacesOutput) SetVirtualInterfaces(v []*VirtualInterface) *DescribeVirtualInterfacesOutput { - s.VirtualInterfaces = v - return s -} - -type DisassociateConnectionFromLagInput struct { - _ struct{} `type:"structure"` - - // The ID of the connection. For example, dxcon-abc123. - // - // ConnectionId is a required field - ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - - // The ID of the LAG. For example, dxlag-abc123. - // - // LagId is a required field - LagId *string `locationName:"lagId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateConnectionFromLagInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateConnectionFromLagInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateConnectionFromLagInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateConnectionFromLagInput"} - if s.ConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionId")) - } - if s.LagId == nil { - invalidParams.Add(request.NewErrParamRequired("LagId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *DisassociateConnectionFromLagInput) SetConnectionId(v string) *DisassociateConnectionFromLagInput { - s.ConnectionId = &v - return s -} - -// SetLagId sets the LagId field's value. -func (s *DisassociateConnectionFromLagInput) SetLagId(v string) *DisassociateConnectionFromLagInput { - s.LagId = &v - return s -} - -// Information about a Direct Connect gateway, which enables you to connect -// virtual interfaces and virtual private gateways. -type Gateway struct { - _ struct{} `type:"structure"` - - // The autonomous system number (ASN) for the Amazon side of the connection. - AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` - - // The ID of the Direct Connect gateway. - DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - - // The name of the Direct Connect gateway. - DirectConnectGatewayName *string `locationName:"directConnectGatewayName" type:"string"` - - // The state of the Direct Connect gateway. The following are the possible values: - // - // * pending: The initial state after calling CreateDirectConnectGateway. - // - // * available: The Direct Connect gateway is ready for use. - // - // * deleting: The initial state after calling DeleteDirectConnectGateway. - // - // * deleted: The Direct Connect gateway is deleted and cannot pass traffic. - DirectConnectGatewayState *string `locationName:"directConnectGatewayState" type:"string" enum:"GatewayState"` - - // The ID of the AWS account that owns the Direct Connect gateway. - OwnerAccount *string `locationName:"ownerAccount" type:"string"` - - // The error message if the state of an object failed to advance. - StateChangeError *string `locationName:"stateChangeError" type:"string"` -} - -// String returns the string representation -func (s Gateway) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Gateway) GoString() string { - return s.String() -} - -// SetAmazonSideAsn sets the AmazonSideAsn field's value. -func (s *Gateway) SetAmazonSideAsn(v int64) *Gateway { - s.AmazonSideAsn = &v - return s -} - -// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. -func (s *Gateway) SetDirectConnectGatewayId(v string) *Gateway { - s.DirectConnectGatewayId = &v - return s -} - -// SetDirectConnectGatewayName sets the DirectConnectGatewayName field's value. -func (s *Gateway) SetDirectConnectGatewayName(v string) *Gateway { - s.DirectConnectGatewayName = &v - return s -} - -// SetDirectConnectGatewayState sets the DirectConnectGatewayState field's value. -func (s *Gateway) SetDirectConnectGatewayState(v string) *Gateway { - s.DirectConnectGatewayState = &v - return s -} - -// SetOwnerAccount sets the OwnerAccount field's value. -func (s *Gateway) SetOwnerAccount(v string) *Gateway { - s.OwnerAccount = &v - return s -} - -// SetStateChangeError sets the StateChangeError field's value. -func (s *Gateway) SetStateChangeError(v string) *Gateway { - s.StateChangeError = &v - return s -} - -// Information about an association between a Direct Connect gateway and a virtual -// private gateway. -type GatewayAssociation struct { - _ struct{} `type:"structure"` - - // The state of the association. The following are the possible values: - // - // * associating: The initial state after calling CreateDirectConnectGatewayAssociation. - // - // * associated: The Direct Connect gateway and virtual private gateway are - // successfully associated and ready to pass traffic. - // - // * disassociating: The initial state after calling DeleteDirectConnectGatewayAssociation. - // - // * disassociated: The virtual private gateway is disassociated from the - // Direct Connect gateway. Traffic flow between the Direct Connect gateway - // and virtual private gateway is stopped. - AssociationState *string `locationName:"associationState" type:"string" enum:"GatewayAssociationState"` - - // The ID of the Direct Connect gateway. - DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - - // The error message if the state of an object failed to advance. - StateChangeError *string `locationName:"stateChangeError" type:"string"` - - // The ID of the virtual private gateway. Applies only to private virtual interfaces. - VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` - - // The ID of the AWS account that owns the virtual private gateway. - VirtualGatewayOwnerAccount *string `locationName:"virtualGatewayOwnerAccount" type:"string"` - - // The AWS Region where the virtual private gateway is located. - VirtualGatewayRegion *string `locationName:"virtualGatewayRegion" type:"string"` -} - -// String returns the string representation -func (s GatewayAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GatewayAssociation) GoString() string { - return s.String() -} - -// SetAssociationState sets the AssociationState field's value. -func (s *GatewayAssociation) SetAssociationState(v string) *GatewayAssociation { - s.AssociationState = &v - return s -} - -// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. -func (s *GatewayAssociation) SetDirectConnectGatewayId(v string) *GatewayAssociation { - s.DirectConnectGatewayId = &v - return s -} - -// SetStateChangeError sets the StateChangeError field's value. -func (s *GatewayAssociation) SetStateChangeError(v string) *GatewayAssociation { - s.StateChangeError = &v - return s -} - -// SetVirtualGatewayId sets the VirtualGatewayId field's value. -func (s *GatewayAssociation) SetVirtualGatewayId(v string) *GatewayAssociation { - s.VirtualGatewayId = &v - return s -} - -// SetVirtualGatewayOwnerAccount sets the VirtualGatewayOwnerAccount field's value. -func (s *GatewayAssociation) SetVirtualGatewayOwnerAccount(v string) *GatewayAssociation { - s.VirtualGatewayOwnerAccount = &v - return s -} - -// SetVirtualGatewayRegion sets the VirtualGatewayRegion field's value. -func (s *GatewayAssociation) SetVirtualGatewayRegion(v string) *GatewayAssociation { - s.VirtualGatewayRegion = &v - return s -} - -// Information about an attachment between a Direct Connect gateway and a virtual -// interface. -type GatewayAttachment struct { - _ struct{} `type:"structure"` - - // The state of the attachment. The following are the possible values: - // - // * attaching: The initial state after a virtual interface is created using - // the Direct Connect gateway. - // - // * attached: The Direct Connect gateway and virtual interface are attached - // and ready to pass traffic. - // - // * detaching: The initial state after calling DeleteVirtualInterface. - // - // * detached: The virtual interface is detached from the Direct Connect - // gateway. Traffic flow between the Direct Connect gateway and virtual interface - // is stopped. - AttachmentState *string `locationName:"attachmentState" type:"string" enum:"GatewayAttachmentState"` - - // The ID of the Direct Connect gateway. - DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - - // The error message if the state of an object failed to advance. - StateChangeError *string `locationName:"stateChangeError" type:"string"` - - // The ID of the virtual interface. - VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` - - // The ID of the AWS account that owns the virtual interface. - VirtualInterfaceOwnerAccount *string `locationName:"virtualInterfaceOwnerAccount" type:"string"` - - // The AWS Region where the virtual interface is located. - VirtualInterfaceRegion *string `locationName:"virtualInterfaceRegion" type:"string"` -} - -// String returns the string representation -func (s GatewayAttachment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GatewayAttachment) GoString() string { - return s.String() -} - -// SetAttachmentState sets the AttachmentState field's value. -func (s *GatewayAttachment) SetAttachmentState(v string) *GatewayAttachment { - s.AttachmentState = &v - return s -} - -// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. -func (s *GatewayAttachment) SetDirectConnectGatewayId(v string) *GatewayAttachment { - s.DirectConnectGatewayId = &v - return s -} - -// SetStateChangeError sets the StateChangeError field's value. -func (s *GatewayAttachment) SetStateChangeError(v string) *GatewayAttachment { - s.StateChangeError = &v - return s -} - -// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. -func (s *GatewayAttachment) SetVirtualInterfaceId(v string) *GatewayAttachment { - s.VirtualInterfaceId = &v - return s -} - -// SetVirtualInterfaceOwnerAccount sets the VirtualInterfaceOwnerAccount field's value. -func (s *GatewayAttachment) SetVirtualInterfaceOwnerAccount(v string) *GatewayAttachment { - s.VirtualInterfaceOwnerAccount = &v - return s -} - -// SetVirtualInterfaceRegion sets the VirtualInterfaceRegion field's value. -func (s *GatewayAttachment) SetVirtualInterfaceRegion(v string) *GatewayAttachment { - s.VirtualInterfaceRegion = &v - return s -} - -// Information about an interconnect. -type Interconnect struct { - _ struct{} `type:"structure"` - - // The Direct Connect endpoint on which the physical connection terminates. - AwsDevice *string `locationName:"awsDevice" deprecated:"true" type:"string"` - - // The Direct Connect endpoint on which the physical connection terminates. - AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - - // The bandwidth of the connection. - Bandwidth *string `locationName:"bandwidth" type:"string"` - - // Indicates whether the interconnect supports a secondary BGP in the same address - // family (IPv4/IPv6). - HasLogicalRedundancy *string `locationName:"hasLogicalRedundancy" type:"string" enum:"HasLogicalRedundancy"` - - // The ID of the interconnect. - InterconnectId *string `locationName:"interconnectId" type:"string"` - - // The name of the interconnect. - InterconnectName *string `locationName:"interconnectName" type:"string"` - - // The state of the interconnect. The following are the possible values: - // - // * requested: The initial state of an interconnect. The interconnect stays - // in the requested state until the Letter of Authorization (LOA) is sent - // to the customer. - // - // * pending: The interconnect is approved, and is being initialized. - // - // * available: The network link is up, and the interconnect is ready for - // use. - // - // * down: The network link is down. - // - // * deleting: The interconnect is being deleted. - // - // * deleted: The interconnect is deleted. - InterconnectState *string `locationName:"interconnectState" type:"string" enum:"InterconnectState"` - - // Indicates whether jumbo frames (9001 MTU) are supported. - JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` - - // The ID of the LAG. - LagId *string `locationName:"lagId" type:"string"` - - // The time of the most recent call to DescribeLoa for this connection. - LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp"` - - // The location of the connection. - Location *string `locationName:"location" type:"string"` - - // The AWS Region where the connection is located. - Region *string `locationName:"region" type:"string"` -} - -// String returns the string representation -func (s Interconnect) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Interconnect) GoString() string { - return s.String() -} - -// SetAwsDevice sets the AwsDevice field's value. -func (s *Interconnect) SetAwsDevice(v string) *Interconnect { - s.AwsDevice = &v - return s -} - -// SetAwsDeviceV2 sets the AwsDeviceV2 field's value. -func (s *Interconnect) SetAwsDeviceV2(v string) *Interconnect { - s.AwsDeviceV2 = &v - return s -} - -// SetBandwidth sets the Bandwidth field's value. -func (s *Interconnect) SetBandwidth(v string) *Interconnect { - s.Bandwidth = &v - return s -} - -// SetHasLogicalRedundancy sets the HasLogicalRedundancy field's value. -func (s *Interconnect) SetHasLogicalRedundancy(v string) *Interconnect { - s.HasLogicalRedundancy = &v - return s -} - -// SetInterconnectId sets the InterconnectId field's value. -func (s *Interconnect) SetInterconnectId(v string) *Interconnect { - s.InterconnectId = &v - return s -} - -// SetInterconnectName sets the InterconnectName field's value. -func (s *Interconnect) SetInterconnectName(v string) *Interconnect { - s.InterconnectName = &v - return s -} - -// SetInterconnectState sets the InterconnectState field's value. -func (s *Interconnect) SetInterconnectState(v string) *Interconnect { - s.InterconnectState = &v - return s -} - -// SetJumboFrameCapable sets the JumboFrameCapable field's value. -func (s *Interconnect) SetJumboFrameCapable(v bool) *Interconnect { - s.JumboFrameCapable = &v - return s -} - -// SetLagId sets the LagId field's value. -func (s *Interconnect) SetLagId(v string) *Interconnect { - s.LagId = &v - return s -} - -// SetLoaIssueTime sets the LoaIssueTime field's value. -func (s *Interconnect) SetLoaIssueTime(v time.Time) *Interconnect { - s.LoaIssueTime = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *Interconnect) SetLocation(v string) *Interconnect { - s.Location = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *Interconnect) SetRegion(v string) *Interconnect { - s.Region = &v - return s -} - -// Information about a link aggregation group (LAG). -type Lag struct { - _ struct{} `type:"structure"` - - // Indicates whether the LAG can host other connections. - AllowsHostedConnections *bool `locationName:"allowsHostedConnections" type:"boolean"` - - // The Direct Connect endpoint that hosts the LAG. - AwsDevice *string `locationName:"awsDevice" deprecated:"true" type:"string"` - - // The Direct Connect endpoint that hosts the LAG. - AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - - // The connections bundled by the LAG. - Connections []*Connection `locationName:"connections" type:"list"` - - // The individual bandwidth of the physical connections bundled by the LAG. - // The possible values are 1Gbps and 10Gbps. - ConnectionsBandwidth *string `locationName:"connectionsBandwidth" type:"string"` - - // Indicates whether the LAG supports a secondary BGP peer in the same address - // family (IPv4/IPv6). - HasLogicalRedundancy *string `locationName:"hasLogicalRedundancy" type:"string" enum:"HasLogicalRedundancy"` - - // Indicates whether jumbo frames (9001 MTU) are supported. - JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` - - // The ID of the LAG. - LagId *string `locationName:"lagId" type:"string"` - - // The name of the LAG. - LagName *string `locationName:"lagName" type:"string"` - - // The state of the LAG. The following are the possible values: - // - // * requested: The initial state of a LAG. The LAG stays in the requested - // state until the Letter of Authorization (LOA) is available. - // - // * pending: The LAG has been approved and is being initialized. - // - // * available: The network link is established and the LAG is ready for - // use. - // - // * down: The network link is down. - // - // * deleting: The LAG is being deleted. - // - // * deleted: The LAG is deleted. - LagState *string `locationName:"lagState" type:"string" enum:"LagState"` - - // The location of the LAG. - Location *string `locationName:"location" type:"string"` - - // The minimum number of physical connections that must be operational for the - // LAG itself to be operational. - MinimumLinks *int64 `locationName:"minimumLinks" type:"integer"` - - // The number of physical connections bundled by the LAG, up to a maximum of - // 10. - NumberOfConnections *int64 `locationName:"numberOfConnections" type:"integer"` - - // The ID of the AWS account that owns the LAG. - OwnerAccount *string `locationName:"ownerAccount" type:"string"` - - // The AWS Region where the connection is located. - Region *string `locationName:"region" type:"string"` -} - -// String returns the string representation -func (s Lag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Lag) GoString() string { - return s.String() -} - -// SetAllowsHostedConnections sets the AllowsHostedConnections field's value. -func (s *Lag) SetAllowsHostedConnections(v bool) *Lag { - s.AllowsHostedConnections = &v - return s -} - -// SetAwsDevice sets the AwsDevice field's value. -func (s *Lag) SetAwsDevice(v string) *Lag { - s.AwsDevice = &v - return s -} - -// SetAwsDeviceV2 sets the AwsDeviceV2 field's value. -func (s *Lag) SetAwsDeviceV2(v string) *Lag { - s.AwsDeviceV2 = &v - return s -} - -// SetConnections sets the Connections field's value. -func (s *Lag) SetConnections(v []*Connection) *Lag { - s.Connections = v - return s -} - -// SetConnectionsBandwidth sets the ConnectionsBandwidth field's value. -func (s *Lag) SetConnectionsBandwidth(v string) *Lag { - s.ConnectionsBandwidth = &v - return s -} - -// SetHasLogicalRedundancy sets the HasLogicalRedundancy field's value. -func (s *Lag) SetHasLogicalRedundancy(v string) *Lag { - s.HasLogicalRedundancy = &v - return s -} - -// SetJumboFrameCapable sets the JumboFrameCapable field's value. -func (s *Lag) SetJumboFrameCapable(v bool) *Lag { - s.JumboFrameCapable = &v - return s -} - -// SetLagId sets the LagId field's value. -func (s *Lag) SetLagId(v string) *Lag { - s.LagId = &v - return s -} - -// SetLagName sets the LagName field's value. -func (s *Lag) SetLagName(v string) *Lag { - s.LagName = &v - return s -} - -// SetLagState sets the LagState field's value. -func (s *Lag) SetLagState(v string) *Lag { - s.LagState = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *Lag) SetLocation(v string) *Lag { - s.Location = &v - return s -} - -// SetMinimumLinks sets the MinimumLinks field's value. -func (s *Lag) SetMinimumLinks(v int64) *Lag { - s.MinimumLinks = &v - return s -} - -// SetNumberOfConnections sets the NumberOfConnections field's value. -func (s *Lag) SetNumberOfConnections(v int64) *Lag { - s.NumberOfConnections = &v - return s -} - -// SetOwnerAccount sets the OwnerAccount field's value. -func (s *Lag) SetOwnerAccount(v string) *Lag { - s.OwnerAccount = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *Lag) SetRegion(v string) *Lag { - s.Region = &v - return s -} - -// Information about a Letter of Authorization - Connecting Facility Assignment -// (LOA-CFA) for a connection. -type Loa struct { - _ struct{} `type:"structure"` - - // The binary contents of the LOA-CFA document. - // - // LoaContent is automatically base64 encoded/decoded by the SDK. - LoaContent []byte `locationName:"loaContent" type:"blob"` - - // The standard media type for the LOA-CFA document. The only supported value - // is application/pdf. - LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` -} - -// String returns the string representation -func (s Loa) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Loa) GoString() string { - return s.String() -} - -// SetLoaContent sets the LoaContent field's value. -func (s *Loa) SetLoaContent(v []byte) *Loa { - s.LoaContent = v - return s -} - -// SetLoaContentType sets the LoaContentType field's value. -func (s *Loa) SetLoaContentType(v string) *Loa { - s.LoaContentType = &v - return s -} - -// Information about an AWS Direct Connect location. -type Location struct { - _ struct{} `type:"structure"` - - // The code for the location. - LocationCode *string `locationName:"locationCode" type:"string"` - - // The name of the location. This includes the name of the colocation partner - // and the physical site of the building. - LocationName *string `locationName:"locationName" type:"string"` - - // The AWS Region for the location. - Region *string `locationName:"region" type:"string"` -} - -// String returns the string representation -func (s Location) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Location) GoString() string { - return s.String() -} - -// SetLocationCode sets the LocationCode field's value. -func (s *Location) SetLocationCode(v string) *Location { - s.LocationCode = &v - return s -} - -// SetLocationName sets the LocationName field's value. -func (s *Location) SetLocationName(v string) *Location { - s.LocationName = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *Location) SetRegion(v string) *Location { - s.Region = &v - return s -} - -// Information about a new BGP peer. -type NewBGPPeer struct { - _ struct{} `type:"structure"` - - // The address family for the BGP peer. - AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - - // The IP address assigned to the Amazon interface. - AmazonAddress *string `locationName:"amazonAddress" type:"string"` - - // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - Asn *int64 `locationName:"asn" type:"integer"` - - // The authentication key for BGP configuration. - AuthKey *string `locationName:"authKey" type:"string"` - - // The IP address assigned to the customer interface. - CustomerAddress *string `locationName:"customerAddress" type:"string"` -} - -// String returns the string representation -func (s NewBGPPeer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NewBGPPeer) GoString() string { - return s.String() -} - -// SetAddressFamily sets the AddressFamily field's value. -func (s *NewBGPPeer) SetAddressFamily(v string) *NewBGPPeer { - s.AddressFamily = &v - return s -} - -// SetAmazonAddress sets the AmazonAddress field's value. -func (s *NewBGPPeer) SetAmazonAddress(v string) *NewBGPPeer { - s.AmazonAddress = &v - return s -} - -// SetAsn sets the Asn field's value. -func (s *NewBGPPeer) SetAsn(v int64) *NewBGPPeer { - s.Asn = &v - return s -} - -// SetAuthKey sets the AuthKey field's value. -func (s *NewBGPPeer) SetAuthKey(v string) *NewBGPPeer { - s.AuthKey = &v - return s -} - -// SetCustomerAddress sets the CustomerAddress field's value. -func (s *NewBGPPeer) SetCustomerAddress(v string) *NewBGPPeer { - s.CustomerAddress = &v - return s -} - -// Information about a private virtual interface. -type NewPrivateVirtualInterface struct { - _ struct{} `type:"structure"` - - // The address family for the BGP peer. - AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - - // The IP address assigned to the Amazon interface. - AmazonAddress *string `locationName:"amazonAddress" type:"string"` - - // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - // - // Asn is a required field - Asn *int64 `locationName:"asn" type:"integer" required:"true"` - - // The authentication key for BGP configuration. - AuthKey *string `locationName:"authKey" type:"string"` - - // The IP address assigned to the customer interface. - CustomerAddress *string `locationName:"customerAddress" type:"string"` - - // The ID of the Direct Connect gateway. - DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - - // The maximum transmission unit (MTU), in bytes. The supported values are 1500 - // and 9001. The default value is 1500. - Mtu *int64 `locationName:"mtu" type:"integer"` - - // The ID of the virtual private gateway. - VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` - - // The name of the virtual interface assigned by the customer network. - // - // VirtualInterfaceName is a required field - VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` - - // The ID of the VLAN. - // - // Vlan is a required field - Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` -} - -// String returns the string representation -func (s NewPrivateVirtualInterface) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NewPrivateVirtualInterface) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NewPrivateVirtualInterface) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NewPrivateVirtualInterface"} - if s.Asn == nil { - invalidParams.Add(request.NewErrParamRequired("Asn")) - } - if s.VirtualInterfaceName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceName")) - } - if s.Vlan == nil { - invalidParams.Add(request.NewErrParamRequired("Vlan")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddressFamily sets the AddressFamily field's value. -func (s *NewPrivateVirtualInterface) SetAddressFamily(v string) *NewPrivateVirtualInterface { - s.AddressFamily = &v - return s -} - -// SetAmazonAddress sets the AmazonAddress field's value. -func (s *NewPrivateVirtualInterface) SetAmazonAddress(v string) *NewPrivateVirtualInterface { - s.AmazonAddress = &v - return s -} - -// SetAsn sets the Asn field's value. -func (s *NewPrivateVirtualInterface) SetAsn(v int64) *NewPrivateVirtualInterface { - s.Asn = &v - return s -} - -// SetAuthKey sets the AuthKey field's value. -func (s *NewPrivateVirtualInterface) SetAuthKey(v string) *NewPrivateVirtualInterface { - s.AuthKey = &v - return s -} - -// SetCustomerAddress sets the CustomerAddress field's value. -func (s *NewPrivateVirtualInterface) SetCustomerAddress(v string) *NewPrivateVirtualInterface { - s.CustomerAddress = &v - return s -} - -// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. -func (s *NewPrivateVirtualInterface) SetDirectConnectGatewayId(v string) *NewPrivateVirtualInterface { - s.DirectConnectGatewayId = &v - return s -} - -// SetMtu sets the Mtu field's value. -func (s *NewPrivateVirtualInterface) SetMtu(v int64) *NewPrivateVirtualInterface { - s.Mtu = &v - return s -} - -// SetVirtualGatewayId sets the VirtualGatewayId field's value. -func (s *NewPrivateVirtualInterface) SetVirtualGatewayId(v string) *NewPrivateVirtualInterface { - s.VirtualGatewayId = &v - return s -} - -// SetVirtualInterfaceName sets the VirtualInterfaceName field's value. -func (s *NewPrivateVirtualInterface) SetVirtualInterfaceName(v string) *NewPrivateVirtualInterface { - s.VirtualInterfaceName = &v - return s -} - -// SetVlan sets the Vlan field's value. -func (s *NewPrivateVirtualInterface) SetVlan(v int64) *NewPrivateVirtualInterface { - s.Vlan = &v - return s -} - -// Information about a private virtual interface to be provisioned on a connection. -type NewPrivateVirtualInterfaceAllocation struct { - _ struct{} `type:"structure"` - - // The address family for the BGP peer. - AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - - // The IP address assigned to the Amazon interface. - AmazonAddress *string `locationName:"amazonAddress" type:"string"` - - // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - // - // Asn is a required field - Asn *int64 `locationName:"asn" type:"integer" required:"true"` - - // The authentication key for BGP configuration. - AuthKey *string `locationName:"authKey" type:"string"` - - // The IP address assigned to the customer interface. - CustomerAddress *string `locationName:"customerAddress" type:"string"` - - // The maximum transmission unit (MTU), in bytes. The supported values are 1500 - // and 9001. The default value is 1500. - Mtu *int64 `locationName:"mtu" type:"integer"` - - // The name of the virtual interface assigned by the customer network. - // - // VirtualInterfaceName is a required field - VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` - - // The ID of the VLAN. - // - // Vlan is a required field - Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` -} - -// String returns the string representation -func (s NewPrivateVirtualInterfaceAllocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NewPrivateVirtualInterfaceAllocation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NewPrivateVirtualInterfaceAllocation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NewPrivateVirtualInterfaceAllocation"} - if s.Asn == nil { - invalidParams.Add(request.NewErrParamRequired("Asn")) - } - if s.VirtualInterfaceName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceName")) - } - if s.Vlan == nil { - invalidParams.Add(request.NewErrParamRequired("Vlan")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddressFamily sets the AddressFamily field's value. -func (s *NewPrivateVirtualInterfaceAllocation) SetAddressFamily(v string) *NewPrivateVirtualInterfaceAllocation { - s.AddressFamily = &v - return s -} - -// SetAmazonAddress sets the AmazonAddress field's value. -func (s *NewPrivateVirtualInterfaceAllocation) SetAmazonAddress(v string) *NewPrivateVirtualInterfaceAllocation { - s.AmazonAddress = &v - return s -} - -// SetAsn sets the Asn field's value. -func (s *NewPrivateVirtualInterfaceAllocation) SetAsn(v int64) *NewPrivateVirtualInterfaceAllocation { - s.Asn = &v - return s -} - -// SetAuthKey sets the AuthKey field's value. -func (s *NewPrivateVirtualInterfaceAllocation) SetAuthKey(v string) *NewPrivateVirtualInterfaceAllocation { - s.AuthKey = &v - return s -} - -// SetCustomerAddress sets the CustomerAddress field's value. -func (s *NewPrivateVirtualInterfaceAllocation) SetCustomerAddress(v string) *NewPrivateVirtualInterfaceAllocation { - s.CustomerAddress = &v - return s -} - -// SetMtu sets the Mtu field's value. -func (s *NewPrivateVirtualInterfaceAllocation) SetMtu(v int64) *NewPrivateVirtualInterfaceAllocation { - s.Mtu = &v - return s -} - -// SetVirtualInterfaceName sets the VirtualInterfaceName field's value. -func (s *NewPrivateVirtualInterfaceAllocation) SetVirtualInterfaceName(v string) *NewPrivateVirtualInterfaceAllocation { - s.VirtualInterfaceName = &v - return s -} - -// SetVlan sets the Vlan field's value. -func (s *NewPrivateVirtualInterfaceAllocation) SetVlan(v int64) *NewPrivateVirtualInterfaceAllocation { - s.Vlan = &v - return s -} - -// Information about a public virtual interface. -type NewPublicVirtualInterface struct { - _ struct{} `type:"structure"` - - // The address family for the BGP peer. - AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - - // The IP address assigned to the Amazon interface. - AmazonAddress *string `locationName:"amazonAddress" type:"string"` - - // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - // - // Asn is a required field - Asn *int64 `locationName:"asn" type:"integer" required:"true"` - - // The authentication key for BGP configuration. - AuthKey *string `locationName:"authKey" type:"string"` - - // The IP address assigned to the customer interface. - CustomerAddress *string `locationName:"customerAddress" type:"string"` - - // The routes to be advertised to the AWS network in this Region. Applies to - // public virtual interfaces. - RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` - - // The name of the virtual interface assigned by the customer network. - // - // VirtualInterfaceName is a required field - VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` - - // The ID of the VLAN. - // - // Vlan is a required field - Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` -} - -// String returns the string representation -func (s NewPublicVirtualInterface) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NewPublicVirtualInterface) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NewPublicVirtualInterface) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NewPublicVirtualInterface"} - if s.Asn == nil { - invalidParams.Add(request.NewErrParamRequired("Asn")) - } - if s.VirtualInterfaceName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceName")) - } - if s.Vlan == nil { - invalidParams.Add(request.NewErrParamRequired("Vlan")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddressFamily sets the AddressFamily field's value. -func (s *NewPublicVirtualInterface) SetAddressFamily(v string) *NewPublicVirtualInterface { - s.AddressFamily = &v - return s -} - -// SetAmazonAddress sets the AmazonAddress field's value. -func (s *NewPublicVirtualInterface) SetAmazonAddress(v string) *NewPublicVirtualInterface { - s.AmazonAddress = &v - return s -} - -// SetAsn sets the Asn field's value. -func (s *NewPublicVirtualInterface) SetAsn(v int64) *NewPublicVirtualInterface { - s.Asn = &v - return s -} - -// SetAuthKey sets the AuthKey field's value. -func (s *NewPublicVirtualInterface) SetAuthKey(v string) *NewPublicVirtualInterface { - s.AuthKey = &v - return s -} - -// SetCustomerAddress sets the CustomerAddress field's value. -func (s *NewPublicVirtualInterface) SetCustomerAddress(v string) *NewPublicVirtualInterface { - s.CustomerAddress = &v - return s -} - -// SetRouteFilterPrefixes sets the RouteFilterPrefixes field's value. -func (s *NewPublicVirtualInterface) SetRouteFilterPrefixes(v []*RouteFilterPrefix) *NewPublicVirtualInterface { - s.RouteFilterPrefixes = v - return s -} - -// SetVirtualInterfaceName sets the VirtualInterfaceName field's value. -func (s *NewPublicVirtualInterface) SetVirtualInterfaceName(v string) *NewPublicVirtualInterface { - s.VirtualInterfaceName = &v - return s -} - -// SetVlan sets the Vlan field's value. -func (s *NewPublicVirtualInterface) SetVlan(v int64) *NewPublicVirtualInterface { - s.Vlan = &v - return s -} - -// Information about a public virtual interface to be provisioned on a connection. -type NewPublicVirtualInterfaceAllocation struct { - _ struct{} `type:"structure"` - - // The address family for the BGP peer. - AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - - // The IP address assigned to the Amazon interface. - AmazonAddress *string `locationName:"amazonAddress" type:"string"` - - // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - // - // Asn is a required field - Asn *int64 `locationName:"asn" type:"integer" required:"true"` - - // The authentication key for BGP configuration. - AuthKey *string `locationName:"authKey" type:"string"` - - // The IP address assigned to the customer interface. - CustomerAddress *string `locationName:"customerAddress" type:"string"` - - // The routes to be advertised to the AWS network in this Region. Applies to - // public virtual interfaces. - RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` - - // The name of the virtual interface assigned by the customer network. - // - // VirtualInterfaceName is a required field - VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` - - // The ID of the VLAN. - // - // Vlan is a required field - Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` -} - -// String returns the string representation -func (s NewPublicVirtualInterfaceAllocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NewPublicVirtualInterfaceAllocation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NewPublicVirtualInterfaceAllocation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NewPublicVirtualInterfaceAllocation"} - if s.Asn == nil { - invalidParams.Add(request.NewErrParamRequired("Asn")) - } - if s.VirtualInterfaceName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceName")) - } - if s.Vlan == nil { - invalidParams.Add(request.NewErrParamRequired("Vlan")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddressFamily sets the AddressFamily field's value. -func (s *NewPublicVirtualInterfaceAllocation) SetAddressFamily(v string) *NewPublicVirtualInterfaceAllocation { - s.AddressFamily = &v - return s -} - -// SetAmazonAddress sets the AmazonAddress field's value. -func (s *NewPublicVirtualInterfaceAllocation) SetAmazonAddress(v string) *NewPublicVirtualInterfaceAllocation { - s.AmazonAddress = &v - return s -} - -// SetAsn sets the Asn field's value. -func (s *NewPublicVirtualInterfaceAllocation) SetAsn(v int64) *NewPublicVirtualInterfaceAllocation { - s.Asn = &v - return s -} - -// SetAuthKey sets the AuthKey field's value. -func (s *NewPublicVirtualInterfaceAllocation) SetAuthKey(v string) *NewPublicVirtualInterfaceAllocation { - s.AuthKey = &v - return s -} - -// SetCustomerAddress sets the CustomerAddress field's value. -func (s *NewPublicVirtualInterfaceAllocation) SetCustomerAddress(v string) *NewPublicVirtualInterfaceAllocation { - s.CustomerAddress = &v - return s -} - -// SetRouteFilterPrefixes sets the RouteFilterPrefixes field's value. -func (s *NewPublicVirtualInterfaceAllocation) SetRouteFilterPrefixes(v []*RouteFilterPrefix) *NewPublicVirtualInterfaceAllocation { - s.RouteFilterPrefixes = v - return s -} - -// SetVirtualInterfaceName sets the VirtualInterfaceName field's value. -func (s *NewPublicVirtualInterfaceAllocation) SetVirtualInterfaceName(v string) *NewPublicVirtualInterfaceAllocation { - s.VirtualInterfaceName = &v - return s -} - -// SetVlan sets the Vlan field's value. -func (s *NewPublicVirtualInterfaceAllocation) SetVlan(v int64) *NewPublicVirtualInterfaceAllocation { - s.Vlan = &v - return s -} - -// Information about a tag associated with an AWS Direct Connect resource. -type ResourceTag struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource. - ResourceArn *string `locationName:"resourceArn" type:"string"` - - // The tags. - Tags []*Tag `locationName:"tags" min:"1" type:"list"` -} - -// String returns the string representation -func (s ResourceTag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceTag) GoString() string { - return s.String() -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ResourceTag) SetResourceArn(v string) *ResourceTag { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ResourceTag) SetTags(v []*Tag) *ResourceTag { - s.Tags = v - return s -} - -// Information about a route filter prefix that a customer can advertise through -// Border Gateway Protocol (BGP) over a public virtual interface. -type RouteFilterPrefix struct { - _ struct{} `type:"structure"` - - // The CIDR block for the advertised route. Separate multiple routes using commas. - // An IPv6 CIDR must use /64 or shorter. - Cidr *string `locationName:"cidr" type:"string"` -} - -// String returns the string representation -func (s RouteFilterPrefix) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RouteFilterPrefix) GoString() string { - return s.String() -} - -// SetCidr sets the Cidr field's value. -func (s *RouteFilterPrefix) SetCidr(v string) *RouteFilterPrefix { - s.Cidr = &v - return s -} - -// Information about a tag. -type Tag struct { - _ struct{} `type:"structure"` - - // The key. - // - // Key is a required field - Key *string `locationName:"key" min:"1" type:"string" required:"true"` - - // The value. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` - - // The tags to add. - // - // Tags is a required field - Tags []*Tag `locationName:"tags" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` - - // The tag keys of the tags to remove. - // - // TagKeys is a required field - TagKeys []*string `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.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UpdateLagInput struct { - _ struct{} `type:"structure"` - - // The ID of the LAG. - // - // LagId is a required field - LagId *string `locationName:"lagId" type:"string" required:"true"` - - // The name of the LAG. - LagName *string `locationName:"lagName" type:"string"` - - // The minimum number of physical connections that must be operational for the - // LAG itself to be operational. - MinimumLinks *int64 `locationName:"minimumLinks" type:"integer"` -} - -// String returns the string representation -func (s UpdateLagInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateLagInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateLagInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateLagInput"} - if s.LagId == nil { - invalidParams.Add(request.NewErrParamRequired("LagId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLagId sets the LagId field's value. -func (s *UpdateLagInput) SetLagId(v string) *UpdateLagInput { - s.LagId = &v - return s -} - -// SetLagName sets the LagName field's value. -func (s *UpdateLagInput) SetLagName(v string) *UpdateLagInput { - s.LagName = &v - return s -} - -// SetMinimumLinks sets the MinimumLinks field's value. -func (s *UpdateLagInput) SetMinimumLinks(v int64) *UpdateLagInput { - s.MinimumLinks = &v - return s -} - -type UpdateVirtualInterfaceAttributesInput struct { - _ struct{} `type:"structure"` - - // The maximum transmission unit (MTU), in bytes. The supported values are 1500 - // and 9001. The default value is 1500. - Mtu *int64 `locationName:"mtu" type:"integer"` - - // The ID of the virtual private interface. - // - // VirtualInterfaceId is a required field - VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateVirtualInterfaceAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVirtualInterfaceAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateVirtualInterfaceAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateVirtualInterfaceAttributesInput"} - if s.VirtualInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMtu sets the Mtu field's value. -func (s *UpdateVirtualInterfaceAttributesInput) SetMtu(v int64) *UpdateVirtualInterfaceAttributesInput { - s.Mtu = &v - return s -} - -// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. -func (s *UpdateVirtualInterfaceAttributesInput) SetVirtualInterfaceId(v string) *UpdateVirtualInterfaceAttributesInput { - s.VirtualInterfaceId = &v - return s -} - -// Information about a virtual interface. -type UpdateVirtualInterfaceAttributesOutput struct { - _ struct{} `type:"structure"` - - // The address family for the BGP peer. - AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - - // The IP address assigned to the Amazon interface. - AmazonAddress *string `locationName:"amazonAddress" type:"string"` - - // The autonomous system number (ASN) for the Amazon side of the connection. - AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` - - // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - Asn *int64 `locationName:"asn" type:"integer"` - - // The authentication key for BGP configuration. - AuthKey *string `locationName:"authKey" type:"string"` - - // The Direct Connect endpoint on which the virtual interface terminates. - AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - - // The BGP peers configured on this virtual interface. - BgpPeers []*BGPPeer `locationName:"bgpPeers" type:"list"` - - // The ID of the connection. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // The IP address assigned to the customer interface. - CustomerAddress *string `locationName:"customerAddress" type:"string"` - - // The customer router configuration. - CustomerRouterConfig *string `locationName:"customerRouterConfig" type:"string"` - - // The ID of the Direct Connect gateway. - DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - - // Indicates whether jumbo frames (9001 MTU) are supported. - JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` - - // The location of the connection. - Location *string `locationName:"location" type:"string"` - - // The maximum transmission unit (MTU), in bytes. The supported values are 1500 - // and 9001. The default value is 1500. - Mtu *int64 `locationName:"mtu" type:"integer"` - - // The ID of the AWS account that owns the virtual interface. - OwnerAccount *string `locationName:"ownerAccount" type:"string"` - - // The AWS Region where the virtual interface is located. - Region *string `locationName:"region" type:"string"` - - // The routes to be advertised to the AWS network in this Region. Applies to - // public virtual interfaces. - RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` - - // The ID of the virtual private gateway. Applies only to private virtual interfaces. - VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` - - // The ID of the virtual interface. - VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` - - // The name of the virtual interface assigned by the customer network. - VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string"` - - // The state of the virtual interface. The following are the possible values: - // - // * confirming: The creation of the virtual interface is pending confirmation - // from the virtual interface owner. If the owner of the virtual interface - // is different from the owner of the connection on which it is provisioned, - // then the virtual interface will remain in this state until it is confirmed - // by the virtual interface owner. - // - // * verifying: This state only applies to public virtual interfaces. Each - // public virtual interface needs validation before the virtual interface - // can be created. - // - // * pending: A virtual interface is in this state from the time that it - // is created until the virtual interface is ready to forward traffic. - // - // * available: A virtual interface that is able to forward traffic. - // - // * down: A virtual interface that is BGP down. - // - // * deleting: A virtual interface is in this state immediately after calling - // DeleteVirtualInterface until it can no longer forward traffic. - // - // * deleted: A virtual interface that cannot forward traffic. - // - // * rejected: The virtual interface owner has declined creation of the virtual - // interface. If a virtual interface in the Confirming state is deleted by - // the virtual interface owner, the virtual interface enters the Rejected - // state. - VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` - - // The type of virtual interface. The possible values are private and public. - VirtualInterfaceType *string `locationName:"virtualInterfaceType" type:"string"` - - // The ID of the VLAN. - Vlan *int64 `locationName:"vlan" type:"integer"` -} - -// String returns the string representation -func (s UpdateVirtualInterfaceAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVirtualInterfaceAttributesOutput) GoString() string { - return s.String() -} - -// SetAddressFamily sets the AddressFamily field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetAddressFamily(v string) *UpdateVirtualInterfaceAttributesOutput { - s.AddressFamily = &v - return s -} - -// SetAmazonAddress sets the AmazonAddress field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetAmazonAddress(v string) *UpdateVirtualInterfaceAttributesOutput { - s.AmazonAddress = &v - return s -} - -// SetAmazonSideAsn sets the AmazonSideAsn field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetAmazonSideAsn(v int64) *UpdateVirtualInterfaceAttributesOutput { - s.AmazonSideAsn = &v - return s -} - -// SetAsn sets the Asn field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetAsn(v int64) *UpdateVirtualInterfaceAttributesOutput { - s.Asn = &v - return s -} - -// SetAuthKey sets the AuthKey field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetAuthKey(v string) *UpdateVirtualInterfaceAttributesOutput { - s.AuthKey = &v - return s -} - -// SetAwsDeviceV2 sets the AwsDeviceV2 field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetAwsDeviceV2(v string) *UpdateVirtualInterfaceAttributesOutput { - s.AwsDeviceV2 = &v - return s -} - -// SetBgpPeers sets the BgpPeers field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetBgpPeers(v []*BGPPeer) *UpdateVirtualInterfaceAttributesOutput { - s.BgpPeers = v - return s -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetConnectionId(v string) *UpdateVirtualInterfaceAttributesOutput { - s.ConnectionId = &v - return s -} - -// SetCustomerAddress sets the CustomerAddress field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetCustomerAddress(v string) *UpdateVirtualInterfaceAttributesOutput { - s.CustomerAddress = &v - return s -} - -// SetCustomerRouterConfig sets the CustomerRouterConfig field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetCustomerRouterConfig(v string) *UpdateVirtualInterfaceAttributesOutput { - s.CustomerRouterConfig = &v - return s -} - -// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetDirectConnectGatewayId(v string) *UpdateVirtualInterfaceAttributesOutput { - s.DirectConnectGatewayId = &v - return s -} - -// SetJumboFrameCapable sets the JumboFrameCapable field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetJumboFrameCapable(v bool) *UpdateVirtualInterfaceAttributesOutput { - s.JumboFrameCapable = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetLocation(v string) *UpdateVirtualInterfaceAttributesOutput { - s.Location = &v - return s -} - -// SetMtu sets the Mtu field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetMtu(v int64) *UpdateVirtualInterfaceAttributesOutput { - s.Mtu = &v - return s -} - -// SetOwnerAccount sets the OwnerAccount field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetOwnerAccount(v string) *UpdateVirtualInterfaceAttributesOutput { - s.OwnerAccount = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetRegion(v string) *UpdateVirtualInterfaceAttributesOutput { - s.Region = &v - return s -} - -// SetRouteFilterPrefixes sets the RouteFilterPrefixes field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetRouteFilterPrefixes(v []*RouteFilterPrefix) *UpdateVirtualInterfaceAttributesOutput { - s.RouteFilterPrefixes = v - return s -} - -// SetVirtualGatewayId sets the VirtualGatewayId field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualGatewayId(v string) *UpdateVirtualInterfaceAttributesOutput { - s.VirtualGatewayId = &v - return s -} - -// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualInterfaceId(v string) *UpdateVirtualInterfaceAttributesOutput { - s.VirtualInterfaceId = &v - return s -} - -// SetVirtualInterfaceName sets the VirtualInterfaceName field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualInterfaceName(v string) *UpdateVirtualInterfaceAttributesOutput { - s.VirtualInterfaceName = &v - return s -} - -// SetVirtualInterfaceState sets the VirtualInterfaceState field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualInterfaceState(v string) *UpdateVirtualInterfaceAttributesOutput { - s.VirtualInterfaceState = &v - return s -} - -// SetVirtualInterfaceType sets the VirtualInterfaceType field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualInterfaceType(v string) *UpdateVirtualInterfaceAttributesOutput { - s.VirtualInterfaceType = &v - return s -} - -// SetVlan sets the Vlan field's value. -func (s *UpdateVirtualInterfaceAttributesOutput) SetVlan(v int64) *UpdateVirtualInterfaceAttributesOutput { - s.Vlan = &v - return s -} - -// Information about a virtual private gateway for a private virtual interface. -type VirtualGateway struct { - _ struct{} `type:"structure"` - - // The ID of the virtual private gateway. - VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` - - // The state of the virtual private gateway. The following are the possible - // values: - // - // * pending: Initial state after creating the virtual private gateway. - // - // * available: Ready for use by a private virtual interface. - // - // * deleting: Initial state after deleting the virtual private gateway. - // - // * deleted: The virtual private gateway is deleted. The private virtual - // interface is unable to send traffic over this gateway. - VirtualGatewayState *string `locationName:"virtualGatewayState" type:"string"` -} - -// String returns the string representation -func (s VirtualGateway) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VirtualGateway) GoString() string { - return s.String() -} - -// SetVirtualGatewayId sets the VirtualGatewayId field's value. -func (s *VirtualGateway) SetVirtualGatewayId(v string) *VirtualGateway { - s.VirtualGatewayId = &v - return s -} - -// SetVirtualGatewayState sets the VirtualGatewayState field's value. -func (s *VirtualGateway) SetVirtualGatewayState(v string) *VirtualGateway { - s.VirtualGatewayState = &v - return s -} - -// Information about a virtual interface. -type VirtualInterface struct { - _ struct{} `type:"structure"` - - // The address family for the BGP peer. - AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - - // The IP address assigned to the Amazon interface. - AmazonAddress *string `locationName:"amazonAddress" type:"string"` - - // The autonomous system number (ASN) for the Amazon side of the connection. - AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` - - // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - Asn *int64 `locationName:"asn" type:"integer"` - - // The authentication key for BGP configuration. - AuthKey *string `locationName:"authKey" type:"string"` - - // The Direct Connect endpoint on which the virtual interface terminates. - AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - - // The BGP peers configured on this virtual interface. - BgpPeers []*BGPPeer `locationName:"bgpPeers" type:"list"` - - // The ID of the connection. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // The IP address assigned to the customer interface. - CustomerAddress *string `locationName:"customerAddress" type:"string"` - - // The customer router configuration. - CustomerRouterConfig *string `locationName:"customerRouterConfig" type:"string"` - - // The ID of the Direct Connect gateway. - DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - - // Indicates whether jumbo frames (9001 MTU) are supported. - JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` - - // The location of the connection. - Location *string `locationName:"location" type:"string"` - - // The maximum transmission unit (MTU), in bytes. The supported values are 1500 - // and 9001. The default value is 1500. - Mtu *int64 `locationName:"mtu" type:"integer"` - - // The ID of the AWS account that owns the virtual interface. - OwnerAccount *string `locationName:"ownerAccount" type:"string"` - - // The AWS Region where the virtual interface is located. - Region *string `locationName:"region" type:"string"` - - // The routes to be advertised to the AWS network in this Region. Applies to - // public virtual interfaces. - RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` - - // The ID of the virtual private gateway. Applies only to private virtual interfaces. - VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` - - // The ID of the virtual interface. - VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` - - // The name of the virtual interface assigned by the customer network. - VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string"` - - // The state of the virtual interface. The following are the possible values: - // - // * confirming: The creation of the virtual interface is pending confirmation - // from the virtual interface owner. If the owner of the virtual interface - // is different from the owner of the connection on which it is provisioned, - // then the virtual interface will remain in this state until it is confirmed - // by the virtual interface owner. - // - // * verifying: This state only applies to public virtual interfaces. Each - // public virtual interface needs validation before the virtual interface - // can be created. - // - // * pending: A virtual interface is in this state from the time that it - // is created until the virtual interface is ready to forward traffic. - // - // * available: A virtual interface that is able to forward traffic. - // - // * down: A virtual interface that is BGP down. - // - // * deleting: A virtual interface is in this state immediately after calling - // DeleteVirtualInterface until it can no longer forward traffic. - // - // * deleted: A virtual interface that cannot forward traffic. - // - // * rejected: The virtual interface owner has declined creation of the virtual - // interface. If a virtual interface in the Confirming state is deleted by - // the virtual interface owner, the virtual interface enters the Rejected - // state. - VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` - - // The type of virtual interface. The possible values are private and public. - VirtualInterfaceType *string `locationName:"virtualInterfaceType" type:"string"` - - // The ID of the VLAN. - Vlan *int64 `locationName:"vlan" type:"integer"` -} - -// String returns the string representation -func (s VirtualInterface) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VirtualInterface) GoString() string { - return s.String() -} - -// SetAddressFamily sets the AddressFamily field's value. -func (s *VirtualInterface) SetAddressFamily(v string) *VirtualInterface { - s.AddressFamily = &v - return s -} - -// SetAmazonAddress sets the AmazonAddress field's value. -func (s *VirtualInterface) SetAmazonAddress(v string) *VirtualInterface { - s.AmazonAddress = &v - return s -} - -// SetAmazonSideAsn sets the AmazonSideAsn field's value. -func (s *VirtualInterface) SetAmazonSideAsn(v int64) *VirtualInterface { - s.AmazonSideAsn = &v - return s -} - -// SetAsn sets the Asn field's value. -func (s *VirtualInterface) SetAsn(v int64) *VirtualInterface { - s.Asn = &v - return s -} - -// SetAuthKey sets the AuthKey field's value. -func (s *VirtualInterface) SetAuthKey(v string) *VirtualInterface { - s.AuthKey = &v - return s -} - -// SetAwsDeviceV2 sets the AwsDeviceV2 field's value. -func (s *VirtualInterface) SetAwsDeviceV2(v string) *VirtualInterface { - s.AwsDeviceV2 = &v - return s -} - -// SetBgpPeers sets the BgpPeers field's value. -func (s *VirtualInterface) SetBgpPeers(v []*BGPPeer) *VirtualInterface { - s.BgpPeers = v - return s -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *VirtualInterface) SetConnectionId(v string) *VirtualInterface { - s.ConnectionId = &v - return s -} - -// SetCustomerAddress sets the CustomerAddress field's value. -func (s *VirtualInterface) SetCustomerAddress(v string) *VirtualInterface { - s.CustomerAddress = &v - return s -} - -// SetCustomerRouterConfig sets the CustomerRouterConfig field's value. -func (s *VirtualInterface) SetCustomerRouterConfig(v string) *VirtualInterface { - s.CustomerRouterConfig = &v - return s -} - -// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. -func (s *VirtualInterface) SetDirectConnectGatewayId(v string) *VirtualInterface { - s.DirectConnectGatewayId = &v - return s -} - -// SetJumboFrameCapable sets the JumboFrameCapable field's value. -func (s *VirtualInterface) SetJumboFrameCapable(v bool) *VirtualInterface { - s.JumboFrameCapable = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *VirtualInterface) SetLocation(v string) *VirtualInterface { - s.Location = &v - return s -} - -// SetMtu sets the Mtu field's value. -func (s *VirtualInterface) SetMtu(v int64) *VirtualInterface { - s.Mtu = &v - return s -} - -// SetOwnerAccount sets the OwnerAccount field's value. -func (s *VirtualInterface) SetOwnerAccount(v string) *VirtualInterface { - s.OwnerAccount = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *VirtualInterface) SetRegion(v string) *VirtualInterface { - s.Region = &v - return s -} - -// SetRouteFilterPrefixes sets the RouteFilterPrefixes field's value. -func (s *VirtualInterface) SetRouteFilterPrefixes(v []*RouteFilterPrefix) *VirtualInterface { - s.RouteFilterPrefixes = v - return s -} - -// SetVirtualGatewayId sets the VirtualGatewayId field's value. -func (s *VirtualInterface) SetVirtualGatewayId(v string) *VirtualInterface { - s.VirtualGatewayId = &v - return s -} - -// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. -func (s *VirtualInterface) SetVirtualInterfaceId(v string) *VirtualInterface { - s.VirtualInterfaceId = &v - return s -} - -// SetVirtualInterfaceName sets the VirtualInterfaceName field's value. -func (s *VirtualInterface) SetVirtualInterfaceName(v string) *VirtualInterface { - s.VirtualInterfaceName = &v - return s -} - -// SetVirtualInterfaceState sets the VirtualInterfaceState field's value. -func (s *VirtualInterface) SetVirtualInterfaceState(v string) *VirtualInterface { - s.VirtualInterfaceState = &v - return s -} - -// SetVirtualInterfaceType sets the VirtualInterfaceType field's value. -func (s *VirtualInterface) SetVirtualInterfaceType(v string) *VirtualInterface { - s.VirtualInterfaceType = &v - return s -} - -// SetVlan sets the Vlan field's value. -func (s *VirtualInterface) SetVlan(v int64) *VirtualInterface { - s.Vlan = &v - return s -} - -const ( - // AddressFamilyIpv4 is a AddressFamily enum value - AddressFamilyIpv4 = "ipv4" - - // AddressFamilyIpv6 is a AddressFamily enum value - AddressFamilyIpv6 = "ipv6" -) - -const ( - // BGPPeerStateVerifying is a BGPPeerState enum value - BGPPeerStateVerifying = "verifying" - - // BGPPeerStatePending is a BGPPeerState enum value - BGPPeerStatePending = "pending" - - // BGPPeerStateAvailable is a BGPPeerState enum value - BGPPeerStateAvailable = "available" - - // BGPPeerStateDeleting is a BGPPeerState enum value - BGPPeerStateDeleting = "deleting" - - // BGPPeerStateDeleted is a BGPPeerState enum value - BGPPeerStateDeleted = "deleted" -) - -const ( - // BGPStatusUp is a BGPStatus enum value - BGPStatusUp = "up" - - // BGPStatusDown is a BGPStatus enum value - BGPStatusDown = "down" -) - -const ( - // ConnectionStateOrdering is a ConnectionState enum value - ConnectionStateOrdering = "ordering" - - // ConnectionStateRequested is a ConnectionState enum value - ConnectionStateRequested = "requested" - - // ConnectionStatePending is a ConnectionState enum value - ConnectionStatePending = "pending" - - // ConnectionStateAvailable is a ConnectionState enum value - ConnectionStateAvailable = "available" - - // ConnectionStateDown is a ConnectionState enum value - ConnectionStateDown = "down" - - // ConnectionStateDeleting is a ConnectionState enum value - ConnectionStateDeleting = "deleting" - - // ConnectionStateDeleted is a ConnectionState enum value - ConnectionStateDeleted = "deleted" - - // ConnectionStateRejected is a ConnectionState enum value - ConnectionStateRejected = "rejected" -) - -const ( - // GatewayAssociationStateAssociating is a GatewayAssociationState enum value - GatewayAssociationStateAssociating = "associating" - - // GatewayAssociationStateAssociated is a GatewayAssociationState enum value - GatewayAssociationStateAssociated = "associated" - - // GatewayAssociationStateDisassociating is a GatewayAssociationState enum value - GatewayAssociationStateDisassociating = "disassociating" - - // GatewayAssociationStateDisassociated is a GatewayAssociationState enum value - GatewayAssociationStateDisassociated = "disassociated" -) - -const ( - // GatewayAttachmentStateAttaching is a GatewayAttachmentState enum value - GatewayAttachmentStateAttaching = "attaching" - - // GatewayAttachmentStateAttached is a GatewayAttachmentState enum value - GatewayAttachmentStateAttached = "attached" - - // GatewayAttachmentStateDetaching is a GatewayAttachmentState enum value - GatewayAttachmentStateDetaching = "detaching" - - // GatewayAttachmentStateDetached is a GatewayAttachmentState enum value - GatewayAttachmentStateDetached = "detached" -) - -const ( - // GatewayStatePending is a GatewayState enum value - GatewayStatePending = "pending" - - // GatewayStateAvailable is a GatewayState enum value - GatewayStateAvailable = "available" - - // GatewayStateDeleting is a GatewayState enum value - GatewayStateDeleting = "deleting" - - // GatewayStateDeleted is a GatewayState enum value - GatewayStateDeleted = "deleted" -) - -const ( - // HasLogicalRedundancyUnknown is a HasLogicalRedundancy enum value - HasLogicalRedundancyUnknown = "unknown" - - // HasLogicalRedundancyYes is a HasLogicalRedundancy enum value - HasLogicalRedundancyYes = "yes" - - // HasLogicalRedundancyNo is a HasLogicalRedundancy enum value - HasLogicalRedundancyNo = "no" -) - -const ( - // InterconnectStateRequested is a InterconnectState enum value - InterconnectStateRequested = "requested" - - // InterconnectStatePending is a InterconnectState enum value - InterconnectStatePending = "pending" - - // InterconnectStateAvailable is a InterconnectState enum value - InterconnectStateAvailable = "available" - - // InterconnectStateDown is a InterconnectState enum value - InterconnectStateDown = "down" - - // InterconnectStateDeleting is a InterconnectState enum value - InterconnectStateDeleting = "deleting" - - // InterconnectStateDeleted is a InterconnectState enum value - InterconnectStateDeleted = "deleted" -) - -const ( - // LagStateRequested is a LagState enum value - LagStateRequested = "requested" - - // LagStatePending is a LagState enum value - LagStatePending = "pending" - - // LagStateAvailable is a LagState enum value - LagStateAvailable = "available" - - // LagStateDown is a LagState enum value - LagStateDown = "down" - - // LagStateDeleting is a LagState enum value - LagStateDeleting = "deleting" - - // LagStateDeleted is a LagState enum value - LagStateDeleted = "deleted" -) - -const ( - // LoaContentTypeApplicationPdf is a LoaContentType enum value - LoaContentTypeApplicationPdf = "application/pdf" -) - -const ( - // VirtualInterfaceStateConfirming is a VirtualInterfaceState enum value - VirtualInterfaceStateConfirming = "confirming" - - // VirtualInterfaceStateVerifying is a VirtualInterfaceState enum value - VirtualInterfaceStateVerifying = "verifying" - - // VirtualInterfaceStatePending is a VirtualInterfaceState enum value - VirtualInterfaceStatePending = "pending" - - // VirtualInterfaceStateAvailable is a VirtualInterfaceState enum value - VirtualInterfaceStateAvailable = "available" - - // VirtualInterfaceStateDown is a VirtualInterfaceState enum value - VirtualInterfaceStateDown = "down" - - // VirtualInterfaceStateDeleting is a VirtualInterfaceState enum value - VirtualInterfaceStateDeleting = "deleting" - - // VirtualInterfaceStateDeleted is a VirtualInterfaceState enum value - VirtualInterfaceStateDeleted = "deleted" - - // VirtualInterfaceStateRejected is a VirtualInterfaceState enum value - VirtualInterfaceStateRejected = "rejected" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go deleted file mode 100644 index de61cdbfa..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package directconnect provides the client and types for making API -// requests to AWS Direct Connect. -// -// AWS Direct Connect links your internal network to an AWS Direct Connect location -// over a standard Ethernet fiber-optic cable. One end of the cable is connected -// to your router, the other to an AWS Direct Connect router. With this connection -// in place, you can create virtual interfaces directly to the AWS cloud (for -// example, to Amazon EC2 and Amazon S3) and to Amazon VPC, bypassing Internet -// service providers in your network path. A connection provides access to all -// AWS Regions except the China (Beijing) and (China) Ningxia Regions. AWS resources -// in the China Regions can only be accessed through locations associated with -// those Regions. -// -// See https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25 for more information on this service. -// -// See directconnect package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/directconnect/ -// -// Using the Client -// -// To contact AWS Direct Connect 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 Direct Connect client DirectConnect for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/directconnect/#New -package directconnect diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go deleted file mode 100644 index 9d6f81031..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package directconnect - -const ( - - // ErrCodeClientException for service response error code - // "DirectConnectClientException". - // - // One or more parameters are not valid. - ErrCodeClientException = "DirectConnectClientException" - - // ErrCodeDuplicateTagKeysException for service response error code - // "DuplicateTagKeysException". - // - // A tag key was specified more than once. - ErrCodeDuplicateTagKeysException = "DuplicateTagKeysException" - - // ErrCodeServerException for service response error code - // "DirectConnectServerException". - // - // A server-side error occurred. - ErrCodeServerException = "DirectConnectServerException" - - // ErrCodeTooManyTagsException for service response error code - // "TooManyTagsException". - // - // You have reached the limit on the number of tags that can be assigned. - ErrCodeTooManyTagsException = "TooManyTagsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go deleted file mode 100644 index bb182821c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package directconnect - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// DirectConnect provides the API operation methods for making requests to -// AWS Direct Connect. See this package's package overview docs -// for details on the service. -// -// DirectConnect methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type DirectConnect 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 = "directconnect" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Direct Connect" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the DirectConnect client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a DirectConnect client from just a session. -// svc := directconnect.New(mySession) -// -// // Create a DirectConnect client with additional configuration -// svc := directconnect.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *DirectConnect { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DirectConnect { - svc := &DirectConnect{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2012-10-25", - JSONVersion: "1.1", - TargetPrefix: "OvertureService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a DirectConnect operation and runs any -// custom request initialization. -func (c *DirectConnect) 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/directoryservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go deleted file mode 100644 index c14ce177c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go +++ /dev/null @@ -1,11080 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package directoryservice - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAcceptSharedDirectory = "AcceptSharedDirectory" - -// AcceptSharedDirectoryRequest generates a "aws/request.Request" representing the -// client's request for the AcceptSharedDirectory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcceptSharedDirectory for more information on using the AcceptSharedDirectory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcceptSharedDirectoryRequest method. -// req, resp := client.AcceptSharedDirectoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/AcceptSharedDirectory -func (c *DirectoryService) AcceptSharedDirectoryRequest(input *AcceptSharedDirectoryInput) (req *request.Request, output *AcceptSharedDirectoryOutput) { - op := &request.Operation{ - Name: opAcceptSharedDirectory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AcceptSharedDirectoryInput{} - } - - output = &AcceptSharedDirectoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// AcceptSharedDirectory API operation for AWS Directory Service. -// -// Accepts a directory sharing request that was sent from the directory owner -// 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 Directory Service's -// API operation AcceptSharedDirectory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeDirectoryAlreadySharedException "DirectoryAlreadySharedException" -// The specified directory has already been shared with this AWS account. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/AcceptSharedDirectory -func (c *DirectoryService) AcceptSharedDirectory(input *AcceptSharedDirectoryInput) (*AcceptSharedDirectoryOutput, error) { - req, out := c.AcceptSharedDirectoryRequest(input) - return out, req.Send() -} - -// AcceptSharedDirectoryWithContext is the same as AcceptSharedDirectory with the addition of -// the ability to pass a context and additional request options. -// -// See AcceptSharedDirectory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) AcceptSharedDirectoryWithContext(ctx aws.Context, input *AcceptSharedDirectoryInput, opts ...request.Option) (*AcceptSharedDirectoryOutput, error) { - req, out := c.AcceptSharedDirectoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddIpRoutes = "AddIpRoutes" - -// AddIpRoutesRequest generates a "aws/request.Request" representing the -// client's request for the AddIpRoutes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddIpRoutes for more information on using the AddIpRoutes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddIpRoutesRequest method. -// req, resp := client.AddIpRoutesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/AddIpRoutes -func (c *DirectoryService) AddIpRoutesRequest(input *AddIpRoutesInput) (req *request.Request, output *AddIpRoutesOutput) { - op := &request.Operation{ - Name: opAddIpRoutes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddIpRoutesInput{} - } - - output = &AddIpRoutesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddIpRoutes API operation for AWS Directory Service. -// -// If the DNS server for your on-premises domain uses a publicly addressable -// IP address, you must add a CIDR address block to correctly route traffic -// to and from your Microsoft AD on Amazon Web Services. AddIpRoutes adds this -// address block. You can also use AddIpRoutes to facilitate routing traffic -// that uses public IP ranges from your Microsoft AD on AWS to a peer VPC. -// -// Before you call AddIpRoutes, ensure that all of the required permissions -// have been explicitly granted through a policy. For details about what permissions -// are required to run the AddIpRoutes operation, see AWS Directory Service -// API Permissions: Actions, Resources, and Conditions Reference (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/UsingWithDS_IAM_ResourcePermissions.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation AddIpRoutes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException" -// The specified entity already exists. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" -// The specified directory is unavailable or could not be found. -// -// * ErrCodeIpRouteLimitExceededException "IpRouteLimitExceededException" -// The maximum allowed number of IP addresses was exceeded. The default limit -// is 100 IP address blocks. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/AddIpRoutes -func (c *DirectoryService) AddIpRoutes(input *AddIpRoutesInput) (*AddIpRoutesOutput, error) { - req, out := c.AddIpRoutesRequest(input) - return out, req.Send() -} - -// AddIpRoutesWithContext is the same as AddIpRoutes with the addition of -// the ability to pass a context and additional request options. -// -// See AddIpRoutes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) AddIpRoutesWithContext(ctx aws.Context, input *AddIpRoutesInput, opts ...request.Option) (*AddIpRoutesOutput, error) { - req, out := c.AddIpRoutesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddTagsToResource = "AddTagsToResource" - -// AddTagsToResourceRequest generates a "aws/request.Request" representing the -// client's request for the AddTagsToResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTagsToResource for more information on using the AddTagsToResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsToResourceRequest method. -// req, resp := client.AddTagsToResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/AddTagsToResource -func (c *DirectoryService) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *request.Request, output *AddTagsToResourceOutput) { - op := &request.Operation{ - Name: opAddTagsToResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsToResourceInput{} - } - - output = &AddTagsToResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTagsToResource API operation for AWS Directory Service. -// -// Adds or overwrites one or more tags for the specified directory. Each directory -// can have a maximum of 50 tags. Each tag consists of a key and optional value. -// Tag keys must be unique to each 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 Directory Service's -// API operation AddTagsToResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeTagLimitExceededException "TagLimitExceededException" -// The maximum allowed number of tags was exceeded. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/AddTagsToResource -func (c *DirectoryService) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { - req, out := c.AddTagsToResourceRequest(input) - return out, req.Send() -} - -// AddTagsToResourceWithContext is the same as AddTagsToResource with the addition of -// the ability to pass a context and additional request options. -// -// See AddTagsToResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) AddTagsToResourceWithContext(ctx aws.Context, input *AddTagsToResourceInput, opts ...request.Option) (*AddTagsToResourceOutput, error) { - req, out := c.AddTagsToResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelSchemaExtension = "CancelSchemaExtension" - -// CancelSchemaExtensionRequest generates a "aws/request.Request" representing the -// client's request for the CancelSchemaExtension operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelSchemaExtension for more information on using the CancelSchemaExtension -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelSchemaExtensionRequest method. -// req, resp := client.CancelSchemaExtensionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CancelSchemaExtension -func (c *DirectoryService) CancelSchemaExtensionRequest(input *CancelSchemaExtensionInput) (req *request.Request, output *CancelSchemaExtensionOutput) { - op := &request.Operation{ - Name: opCancelSchemaExtension, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelSchemaExtensionInput{} - } - - output = &CancelSchemaExtensionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CancelSchemaExtension API operation for AWS Directory Service. -// -// Cancels an in-progress schema extension to a Microsoft AD directory. Once -// a schema extension has started replicating to all domain controllers, the -// task can no longer be canceled. A schema extension can be canceled during -// any of the following states; Initializing, CreatingSnapshot, and UpdatingSchema. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation CancelSchemaExtension for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CancelSchemaExtension -func (c *DirectoryService) CancelSchemaExtension(input *CancelSchemaExtensionInput) (*CancelSchemaExtensionOutput, error) { - req, out := c.CancelSchemaExtensionRequest(input) - return out, req.Send() -} - -// CancelSchemaExtensionWithContext is the same as CancelSchemaExtension with the addition of -// the ability to pass a context and additional request options. -// -// See CancelSchemaExtension for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) CancelSchemaExtensionWithContext(ctx aws.Context, input *CancelSchemaExtensionInput, opts ...request.Option) (*CancelSchemaExtensionOutput, error) { - req, out := c.CancelSchemaExtensionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opConnectDirectory = "ConnectDirectory" - -// ConnectDirectoryRequest generates a "aws/request.Request" representing the -// client's request for the ConnectDirectory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ConnectDirectory for more information on using the ConnectDirectory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ConnectDirectoryRequest method. -// req, resp := client.ConnectDirectoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ConnectDirectory -func (c *DirectoryService) ConnectDirectoryRequest(input *ConnectDirectoryInput) (req *request.Request, output *ConnectDirectoryOutput) { - op := &request.Operation{ - Name: opConnectDirectory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ConnectDirectoryInput{} - } - - output = &ConnectDirectoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// ConnectDirectory API operation for AWS Directory Service. -// -// Creates an AD Connector to connect to an on-premises directory. -// -// Before you call ConnectDirectory, ensure that all of the required permissions -// have been explicitly granted through a policy. For details about what permissions -// are required to run the ConnectDirectory operation, see AWS Directory Service -// API Permissions: Actions, Resources, and Conditions Reference (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/UsingWithDS_IAM_ResourcePermissions.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation ConnectDirectory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDirectoryLimitExceededException "DirectoryLimitExceededException" -// The maximum number of directories in the region has been reached. You can -// use the GetDirectoryLimits operation to determine your directory limits in -// the region. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ConnectDirectory -func (c *DirectoryService) ConnectDirectory(input *ConnectDirectoryInput) (*ConnectDirectoryOutput, error) { - req, out := c.ConnectDirectoryRequest(input) - return out, req.Send() -} - -// ConnectDirectoryWithContext is the same as ConnectDirectory with the addition of -// the ability to pass a context and additional request options. -// -// See ConnectDirectory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) ConnectDirectoryWithContext(ctx aws.Context, input *ConnectDirectoryInput, opts ...request.Option) (*ConnectDirectoryOutput, error) { - req, out := c.ConnectDirectoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAlias = "CreateAlias" - -// CreateAliasRequest generates a "aws/request.Request" representing the -// client's request for the CreateAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAlias for more information on using the CreateAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAliasRequest method. -// req, resp := client.CreateAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateAlias -func (c *DirectoryService) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *CreateAliasOutput) { - op := &request.Operation{ - Name: opCreateAlias, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAliasInput{} - } - - output = &CreateAliasOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAlias API operation for AWS Directory Service. -// -// Creates an alias for a directory and assigns the alias to the directory. -// The alias is used to construct the access URL for the directory, such as -// http://.awsapps.com. -// -// After an alias has been created, it cannot be deleted or reused, so this -// operation should only be used when absolutely necessary. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation CreateAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException" -// The specified entity already exists. -// -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateAlias -func (c *DirectoryService) CreateAlias(input *CreateAliasInput) (*CreateAliasOutput, error) { - req, out := c.CreateAliasRequest(input) - return out, req.Send() -} - -// CreateAliasWithContext is the same as CreateAlias with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) CreateAliasWithContext(ctx aws.Context, input *CreateAliasInput, opts ...request.Option) (*CreateAliasOutput, error) { - req, out := c.CreateAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateComputer = "CreateComputer" - -// CreateComputerRequest generates a "aws/request.Request" representing the -// client's request for the CreateComputer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateComputer for more information on using the CreateComputer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateComputerRequest method. -// req, resp := client.CreateComputerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateComputer -func (c *DirectoryService) CreateComputerRequest(input *CreateComputerInput) (req *request.Request, output *CreateComputerOutput) { - op := &request.Operation{ - Name: opCreateComputer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateComputerInput{} - } - - output = &CreateComputerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateComputer API operation for AWS Directory Service. -// -// Creates a computer account in the specified directory, and joins the computer -// to the directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation CreateComputer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAuthenticationFailedException "AuthenticationFailedException" -// An authentication error occurred. -// -// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" -// The specified directory is unavailable or could not be found. -// -// * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException" -// The specified entity already exists. -// -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateComputer -func (c *DirectoryService) CreateComputer(input *CreateComputerInput) (*CreateComputerOutput, error) { - req, out := c.CreateComputerRequest(input) - return out, req.Send() -} - -// CreateComputerWithContext is the same as CreateComputer with the addition of -// the ability to pass a context and additional request options. -// -// See CreateComputer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) CreateComputerWithContext(ctx aws.Context, input *CreateComputerInput, opts ...request.Option) (*CreateComputerOutput, error) { - req, out := c.CreateComputerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateConditionalForwarder = "CreateConditionalForwarder" - -// CreateConditionalForwarderRequest generates a "aws/request.Request" representing the -// client's request for the CreateConditionalForwarder operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateConditionalForwarder for more information on using the CreateConditionalForwarder -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateConditionalForwarderRequest method. -// req, resp := client.CreateConditionalForwarderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateConditionalForwarder -func (c *DirectoryService) CreateConditionalForwarderRequest(input *CreateConditionalForwarderInput) (req *request.Request, output *CreateConditionalForwarderOutput) { - op := &request.Operation{ - Name: opCreateConditionalForwarder, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateConditionalForwarderInput{} - } - - output = &CreateConditionalForwarderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateConditionalForwarder API operation for AWS Directory Service. -// -// Creates a conditional forwarder associated with your AWS directory. Conditional -// forwarders are required in order to set up a trust relationship with another -// domain. The conditional forwarder points to the trusted domain. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation CreateConditionalForwarder for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException" -// The specified entity already exists. -// -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" -// The specified directory is unavailable or could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateConditionalForwarder -func (c *DirectoryService) CreateConditionalForwarder(input *CreateConditionalForwarderInput) (*CreateConditionalForwarderOutput, error) { - req, out := c.CreateConditionalForwarderRequest(input) - return out, req.Send() -} - -// CreateConditionalForwarderWithContext is the same as CreateConditionalForwarder with the addition of -// the ability to pass a context and additional request options. -// -// See CreateConditionalForwarder for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) CreateConditionalForwarderWithContext(ctx aws.Context, input *CreateConditionalForwarderInput, opts ...request.Option) (*CreateConditionalForwarderOutput, error) { - req, out := c.CreateConditionalForwarderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDirectory = "CreateDirectory" - -// CreateDirectoryRequest generates a "aws/request.Request" representing the -// client's request for the CreateDirectory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDirectory for more information on using the CreateDirectory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDirectoryRequest method. -// req, resp := client.CreateDirectoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateDirectory -func (c *DirectoryService) CreateDirectoryRequest(input *CreateDirectoryInput) (req *request.Request, output *CreateDirectoryOutput) { - op := &request.Operation{ - Name: opCreateDirectory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDirectoryInput{} - } - - output = &CreateDirectoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDirectory API operation for AWS Directory Service. -// -// Creates a Simple AD directory. -// -// Before you call CreateDirectory, ensure that all of the required permissions -// have been explicitly granted through a policy. For details about what permissions -// are required to run the CreateDirectory operation, see AWS Directory Service -// API Permissions: Actions, Resources, and Conditions Reference (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/UsingWithDS_IAM_ResourcePermissions.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation CreateDirectory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDirectoryLimitExceededException "DirectoryLimitExceededException" -// The maximum number of directories in the region has been reached. You can -// use the GetDirectoryLimits operation to determine your directory limits in -// the region. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateDirectory -func (c *DirectoryService) CreateDirectory(input *CreateDirectoryInput) (*CreateDirectoryOutput, error) { - req, out := c.CreateDirectoryRequest(input) - return out, req.Send() -} - -// CreateDirectoryWithContext is the same as CreateDirectory with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDirectory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) CreateDirectoryWithContext(ctx aws.Context, input *CreateDirectoryInput, opts ...request.Option) (*CreateDirectoryOutput, error) { - req, out := c.CreateDirectoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLogSubscription = "CreateLogSubscription" - -// CreateLogSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the CreateLogSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLogSubscription for more information on using the CreateLogSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLogSubscriptionRequest method. -// req, resp := client.CreateLogSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateLogSubscription -func (c *DirectoryService) CreateLogSubscriptionRequest(input *CreateLogSubscriptionInput) (req *request.Request, output *CreateLogSubscriptionOutput) { - op := &request.Operation{ - Name: opCreateLogSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLogSubscriptionInput{} - } - - output = &CreateLogSubscriptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateLogSubscription API operation for AWS Directory Service. -// -// Creates a subscription to forward real time Directory Service domain controller -// security logs to the specified CloudWatch log group in your AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation CreateLogSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException" -// The specified entity already exists. -// -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// * ErrCodeInsufficientPermissionsException "InsufficientPermissionsException" -// The account does not have sufficient permission to perform the operation. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateLogSubscription -func (c *DirectoryService) CreateLogSubscription(input *CreateLogSubscriptionInput) (*CreateLogSubscriptionOutput, error) { - req, out := c.CreateLogSubscriptionRequest(input) - return out, req.Send() -} - -// CreateLogSubscriptionWithContext is the same as CreateLogSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLogSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) CreateLogSubscriptionWithContext(ctx aws.Context, input *CreateLogSubscriptionInput, opts ...request.Option) (*CreateLogSubscriptionOutput, error) { - req, out := c.CreateLogSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateMicrosoftAD = "CreateMicrosoftAD" - -// CreateMicrosoftADRequest generates a "aws/request.Request" representing the -// client's request for the CreateMicrosoftAD operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateMicrosoftAD for more information on using the CreateMicrosoftAD -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateMicrosoftADRequest method. -// req, resp := client.CreateMicrosoftADRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateMicrosoftAD -func (c *DirectoryService) CreateMicrosoftADRequest(input *CreateMicrosoftADInput) (req *request.Request, output *CreateMicrosoftADOutput) { - op := &request.Operation{ - Name: opCreateMicrosoftAD, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateMicrosoftADInput{} - } - - output = &CreateMicrosoftADOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateMicrosoftAD API operation for AWS Directory Service. -// -// Creates an AWS Managed Microsoft AD directory. -// -// Before you call CreateMicrosoftAD, ensure that all of the required permissions -// have been explicitly granted through a policy. For details about what permissions -// are required to run the CreateMicrosoftAD operation, see AWS Directory Service -// API Permissions: Actions, Resources, and Conditions Reference (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/UsingWithDS_IAM_ResourcePermissions.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation CreateMicrosoftAD for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDirectoryLimitExceededException "DirectoryLimitExceededException" -// The maximum number of directories in the region has been reached. You can -// use the GetDirectoryLimits operation to determine your directory limits in -// the region. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateMicrosoftAD -func (c *DirectoryService) CreateMicrosoftAD(input *CreateMicrosoftADInput) (*CreateMicrosoftADOutput, error) { - req, out := c.CreateMicrosoftADRequest(input) - return out, req.Send() -} - -// CreateMicrosoftADWithContext is the same as CreateMicrosoftAD with the addition of -// the ability to pass a context and additional request options. -// -// See CreateMicrosoftAD for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) CreateMicrosoftADWithContext(ctx aws.Context, input *CreateMicrosoftADInput, opts ...request.Option) (*CreateMicrosoftADOutput, error) { - req, out := c.CreateMicrosoftADRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSnapshot = "CreateSnapshot" - -// CreateSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSnapshot for more information on using the CreateSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSnapshotRequest method. -// req, resp := client.CreateSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateSnapshot -func (c *DirectoryService) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Request, output *CreateSnapshotOutput) { - op := &request.Operation{ - Name: opCreateSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSnapshotInput{} - } - - output = &CreateSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSnapshot API operation for AWS Directory Service. -// -// Creates a snapshot of a Simple AD or Microsoft AD directory in the AWS cloud. -// -// You cannot take snapshots of AD Connector directories. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation CreateSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeSnapshotLimitExceededException "SnapshotLimitExceededException" -// The maximum number of manual snapshots for the directory has been reached. -// You can use the GetSnapshotLimits operation to determine the snapshot limits -// for a directory. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateSnapshot -func (c *DirectoryService) CreateSnapshot(input *CreateSnapshotInput) (*CreateSnapshotOutput, error) { - req, out := c.CreateSnapshotRequest(input) - return out, req.Send() -} - -// CreateSnapshotWithContext is the same as CreateSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) CreateSnapshotWithContext(ctx aws.Context, input *CreateSnapshotInput, opts ...request.Option) (*CreateSnapshotOutput, error) { - req, out := c.CreateSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTrust = "CreateTrust" - -// CreateTrustRequest generates a "aws/request.Request" representing the -// client's request for the CreateTrust operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTrust for more information on using the CreateTrust -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTrustRequest method. -// req, resp := client.CreateTrustRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateTrust -func (c *DirectoryService) CreateTrustRequest(input *CreateTrustInput) (req *request.Request, output *CreateTrustOutput) { - op := &request.Operation{ - Name: opCreateTrust, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTrustInput{} - } - - output = &CreateTrustOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTrust API operation for AWS Directory Service. -// -// AWS Directory Service for Microsoft Active Directory allows you to configure -// trust relationships. For example, you can establish a trust between your -// AWS Managed Microsoft AD directory, and your existing on-premises Microsoft -// Active Directory. This would allow you to provide users and groups access -// to resources in either domain, with a single set of credentials. -// -// This action initiates the creation of the AWS side of a trust relationship -// between an AWS Managed Microsoft AD directory and an external domain. You -// can create either a forest trust or an external trust. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation CreateTrust for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException" -// The specified entity already exists. -// -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateTrust -func (c *DirectoryService) CreateTrust(input *CreateTrustInput) (*CreateTrustOutput, error) { - req, out := c.CreateTrustRequest(input) - return out, req.Send() -} - -// CreateTrustWithContext is the same as CreateTrust with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTrust for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) CreateTrustWithContext(ctx aws.Context, input *CreateTrustInput, opts ...request.Option) (*CreateTrustOutput, error) { - req, out := c.CreateTrustRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteConditionalForwarder = "DeleteConditionalForwarder" - -// DeleteConditionalForwarderRequest generates a "aws/request.Request" representing the -// client's request for the DeleteConditionalForwarder operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteConditionalForwarder for more information on using the DeleteConditionalForwarder -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteConditionalForwarderRequest method. -// req, resp := client.DeleteConditionalForwarderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteConditionalForwarder -func (c *DirectoryService) DeleteConditionalForwarderRequest(input *DeleteConditionalForwarderInput) (req *request.Request, output *DeleteConditionalForwarderOutput) { - op := &request.Operation{ - Name: opDeleteConditionalForwarder, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteConditionalForwarderInput{} - } - - output = &DeleteConditionalForwarderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteConditionalForwarder API operation for AWS Directory Service. -// -// Deletes a conditional forwarder that has been set up for your AWS directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DeleteConditionalForwarder for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" -// The specified directory is unavailable or could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteConditionalForwarder -func (c *DirectoryService) DeleteConditionalForwarder(input *DeleteConditionalForwarderInput) (*DeleteConditionalForwarderOutput, error) { - req, out := c.DeleteConditionalForwarderRequest(input) - return out, req.Send() -} - -// DeleteConditionalForwarderWithContext is the same as DeleteConditionalForwarder with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteConditionalForwarder for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DeleteConditionalForwarderWithContext(ctx aws.Context, input *DeleteConditionalForwarderInput, opts ...request.Option) (*DeleteConditionalForwarderOutput, error) { - req, out := c.DeleteConditionalForwarderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDirectory = "DeleteDirectory" - -// DeleteDirectoryRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDirectory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDirectory for more information on using the DeleteDirectory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDirectoryRequest method. -// req, resp := client.DeleteDirectoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteDirectory -func (c *DirectoryService) DeleteDirectoryRequest(input *DeleteDirectoryInput) (req *request.Request, output *DeleteDirectoryOutput) { - op := &request.Operation{ - Name: opDeleteDirectory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDirectoryInput{} - } - - output = &DeleteDirectoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDirectory API operation for AWS Directory Service. -// -// Deletes an AWS Directory Service directory. -// -// Before you call DeleteDirectory, ensure that all of the required permissions -// have been explicitly granted through a policy. For details about what permissions -// are required to run the DeleteDirectory operation, see AWS Directory Service -// API Permissions: Actions, Resources, and Conditions Reference (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/UsingWithDS_IAM_ResourcePermissions.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DeleteDirectory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteDirectory -func (c *DirectoryService) DeleteDirectory(input *DeleteDirectoryInput) (*DeleteDirectoryOutput, error) { - req, out := c.DeleteDirectoryRequest(input) - return out, req.Send() -} - -// DeleteDirectoryWithContext is the same as DeleteDirectory with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDirectory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DeleteDirectoryWithContext(ctx aws.Context, input *DeleteDirectoryInput, opts ...request.Option) (*DeleteDirectoryOutput, error) { - req, out := c.DeleteDirectoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLogSubscription = "DeleteLogSubscription" - -// DeleteLogSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLogSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLogSubscription for more information on using the DeleteLogSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLogSubscriptionRequest method. -// req, resp := client.DeleteLogSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteLogSubscription -func (c *DirectoryService) DeleteLogSubscriptionRequest(input *DeleteLogSubscriptionInput) (req *request.Request, output *DeleteLogSubscriptionOutput) { - op := &request.Operation{ - Name: opDeleteLogSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLogSubscriptionInput{} - } - - output = &DeleteLogSubscriptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLogSubscription API operation for AWS Directory Service. -// -// Deletes the specified log subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DeleteLogSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteLogSubscription -func (c *DirectoryService) DeleteLogSubscription(input *DeleteLogSubscriptionInput) (*DeleteLogSubscriptionOutput, error) { - req, out := c.DeleteLogSubscriptionRequest(input) - return out, req.Send() -} - -// DeleteLogSubscriptionWithContext is the same as DeleteLogSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLogSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DeleteLogSubscriptionWithContext(ctx aws.Context, input *DeleteLogSubscriptionInput, opts ...request.Option) (*DeleteLogSubscriptionOutput, error) { - req, out := c.DeleteLogSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSnapshot = "DeleteSnapshot" - -// DeleteSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSnapshot for more information on using the DeleteSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSnapshotRequest method. -// req, resp := client.DeleteSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteSnapshot -func (c *DirectoryService) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *request.Request, output *DeleteSnapshotOutput) { - op := &request.Operation{ - Name: opDeleteSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSnapshotInput{} - } - - output = &DeleteSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteSnapshot API operation for AWS Directory Service. -// -// Deletes a directory snapshot. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DeleteSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteSnapshot -func (c *DirectoryService) DeleteSnapshot(input *DeleteSnapshotInput) (*DeleteSnapshotOutput, error) { - req, out := c.DeleteSnapshotRequest(input) - return out, req.Send() -} - -// DeleteSnapshotWithContext is the same as DeleteSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DeleteSnapshotWithContext(ctx aws.Context, input *DeleteSnapshotInput, opts ...request.Option) (*DeleteSnapshotOutput, error) { - req, out := c.DeleteSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTrust = "DeleteTrust" - -// DeleteTrustRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTrust operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTrust for more information on using the DeleteTrust -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTrustRequest method. -// req, resp := client.DeleteTrustRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteTrust -func (c *DirectoryService) DeleteTrustRequest(input *DeleteTrustInput) (req *request.Request, output *DeleteTrustOutput) { - op := &request.Operation{ - Name: opDeleteTrust, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTrustInput{} - } - - output = &DeleteTrustOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteTrust API operation for AWS Directory Service. -// -// Deletes an existing trust relationship between your AWS Managed Microsoft -// AD directory and an external domain. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DeleteTrust for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteTrust -func (c *DirectoryService) DeleteTrust(input *DeleteTrustInput) (*DeleteTrustOutput, error) { - req, out := c.DeleteTrustRequest(input) - return out, req.Send() -} - -// DeleteTrustWithContext is the same as DeleteTrust with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTrust for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DeleteTrustWithContext(ctx aws.Context, input *DeleteTrustInput, opts ...request.Option) (*DeleteTrustOutput, error) { - req, out := c.DeleteTrustRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterEventTopic = "DeregisterEventTopic" - -// DeregisterEventTopicRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterEventTopic operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterEventTopic for more information on using the DeregisterEventTopic -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterEventTopicRequest method. -// req, resp := client.DeregisterEventTopicRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeregisterEventTopic -func (c *DirectoryService) DeregisterEventTopicRequest(input *DeregisterEventTopicInput) (req *request.Request, output *DeregisterEventTopicOutput) { - op := &request.Operation{ - Name: opDeregisterEventTopic, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterEventTopicInput{} - } - - output = &DeregisterEventTopicOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterEventTopic API operation for AWS Directory Service. -// -// Removes the specified directory as a publisher to the specified SNS topic. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DeregisterEventTopic for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeregisterEventTopic -func (c *DirectoryService) DeregisterEventTopic(input *DeregisterEventTopicInput) (*DeregisterEventTopicOutput, error) { - req, out := c.DeregisterEventTopicRequest(input) - return out, req.Send() -} - -// DeregisterEventTopicWithContext is the same as DeregisterEventTopic with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterEventTopic for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DeregisterEventTopicWithContext(ctx aws.Context, input *DeregisterEventTopicInput, opts ...request.Option) (*DeregisterEventTopicOutput, error) { - req, out := c.DeregisterEventTopicRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConditionalForwarders = "DescribeConditionalForwarders" - -// DescribeConditionalForwardersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConditionalForwarders operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConditionalForwarders for more information on using the DescribeConditionalForwarders -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConditionalForwardersRequest method. -// req, resp := client.DescribeConditionalForwardersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeConditionalForwarders -func (c *DirectoryService) DescribeConditionalForwardersRequest(input *DescribeConditionalForwardersInput) (req *request.Request, output *DescribeConditionalForwardersOutput) { - op := &request.Operation{ - Name: opDescribeConditionalForwarders, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConditionalForwardersInput{} - } - - output = &DescribeConditionalForwardersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConditionalForwarders API operation for AWS Directory Service. -// -// Obtains information about the conditional forwarders for this account. -// -// If no input parameters are provided for RemoteDomainNames, this request describes -// all conditional forwarders for the specified directory ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DescribeConditionalForwarders for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" -// The specified directory is unavailable or could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeConditionalForwarders -func (c *DirectoryService) DescribeConditionalForwarders(input *DescribeConditionalForwardersInput) (*DescribeConditionalForwardersOutput, error) { - req, out := c.DescribeConditionalForwardersRequest(input) - return out, req.Send() -} - -// DescribeConditionalForwardersWithContext is the same as DescribeConditionalForwarders with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConditionalForwarders for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DescribeConditionalForwardersWithContext(ctx aws.Context, input *DescribeConditionalForwardersInput, opts ...request.Option) (*DescribeConditionalForwardersOutput, error) { - req, out := c.DescribeConditionalForwardersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDirectories = "DescribeDirectories" - -// DescribeDirectoriesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDirectories operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDirectories for more information on using the DescribeDirectories -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDirectoriesRequest method. -// req, resp := client.DescribeDirectoriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeDirectories -func (c *DirectoryService) DescribeDirectoriesRequest(input *DescribeDirectoriesInput) (req *request.Request, output *DescribeDirectoriesOutput) { - op := &request.Operation{ - Name: opDescribeDirectories, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDirectoriesInput{} - } - - output = &DescribeDirectoriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDirectories API operation for AWS Directory Service. -// -// Obtains information about the directories that belong to this account. -// -// You can retrieve information about specific directories by passing the directory -// identifiers in the DirectoryIds parameter. Otherwise, all directories that -// belong to the current account are returned. -// -// This operation supports pagination with the use of the NextToken request -// and response parameters. If more results are available, the DescribeDirectoriesResult.NextToken -// member contains a token that you pass in the next call to DescribeDirectories -// to retrieve the next set of items. -// -// You can also specify a maximum number of return results with the Limit parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DescribeDirectories for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The NextToken value is not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeDirectories -func (c *DirectoryService) DescribeDirectories(input *DescribeDirectoriesInput) (*DescribeDirectoriesOutput, error) { - req, out := c.DescribeDirectoriesRequest(input) - return out, req.Send() -} - -// DescribeDirectoriesWithContext is the same as DescribeDirectories with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDirectories for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DescribeDirectoriesWithContext(ctx aws.Context, input *DescribeDirectoriesInput, opts ...request.Option) (*DescribeDirectoriesOutput, error) { - req, out := c.DescribeDirectoriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDomainControllers = "DescribeDomainControllers" - -// DescribeDomainControllersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDomainControllers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDomainControllers for more information on using the DescribeDomainControllers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDomainControllersRequest method. -// req, resp := client.DescribeDomainControllersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeDomainControllers -func (c *DirectoryService) DescribeDomainControllersRequest(input *DescribeDomainControllersInput) (req *request.Request, output *DescribeDomainControllersOutput) { - op := &request.Operation{ - Name: opDescribeDomainControllers, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "Limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDomainControllersInput{} - } - - output = &DescribeDomainControllersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDomainControllers API operation for AWS Directory Service. -// -// Provides information about any domain controllers in your directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DescribeDomainControllers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The NextToken value is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeDomainControllers -func (c *DirectoryService) DescribeDomainControllers(input *DescribeDomainControllersInput) (*DescribeDomainControllersOutput, error) { - req, out := c.DescribeDomainControllersRequest(input) - return out, req.Send() -} - -// DescribeDomainControllersWithContext is the same as DescribeDomainControllers with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDomainControllers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DescribeDomainControllersWithContext(ctx aws.Context, input *DescribeDomainControllersInput, opts ...request.Option) (*DescribeDomainControllersOutput, error) { - req, out := c.DescribeDomainControllersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDomainControllersPages iterates over the pages of a DescribeDomainControllers operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDomainControllers 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 DescribeDomainControllers operation. -// pageNum := 0 -// err := client.DescribeDomainControllersPages(params, -// func(page *DescribeDomainControllersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DirectoryService) DescribeDomainControllersPages(input *DescribeDomainControllersInput, fn func(*DescribeDomainControllersOutput, bool) bool) error { - return c.DescribeDomainControllersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDomainControllersPagesWithContext same as DescribeDomainControllersPages 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 *DirectoryService) DescribeDomainControllersPagesWithContext(ctx aws.Context, input *DescribeDomainControllersInput, fn func(*DescribeDomainControllersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDomainControllersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDomainControllersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDomainControllersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEventTopics = "DescribeEventTopics" - -// DescribeEventTopicsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEventTopics operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEventTopics for more information on using the DescribeEventTopics -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventTopicsRequest method. -// req, resp := client.DescribeEventTopicsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeEventTopics -func (c *DirectoryService) DescribeEventTopicsRequest(input *DescribeEventTopicsInput) (req *request.Request, output *DescribeEventTopicsOutput) { - op := &request.Operation{ - Name: opDescribeEventTopics, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEventTopicsInput{} - } - - output = &DescribeEventTopicsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEventTopics API operation for AWS Directory Service. -// -// Obtains information about which SNS topics receive status messages from the -// specified directory. -// -// If no input parameters are provided, such as DirectoryId or TopicName, this -// request describes all of the associations in the account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DescribeEventTopics for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeEventTopics -func (c *DirectoryService) DescribeEventTopics(input *DescribeEventTopicsInput) (*DescribeEventTopicsOutput, error) { - req, out := c.DescribeEventTopicsRequest(input) - return out, req.Send() -} - -// DescribeEventTopicsWithContext is the same as DescribeEventTopics with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEventTopics for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DescribeEventTopicsWithContext(ctx aws.Context, input *DescribeEventTopicsInput, opts ...request.Option) (*DescribeEventTopicsOutput, error) { - req, out := c.DescribeEventTopicsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSharedDirectories = "DescribeSharedDirectories" - -// DescribeSharedDirectoriesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSharedDirectories operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSharedDirectories for more information on using the DescribeSharedDirectories -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSharedDirectoriesRequest method. -// req, resp := client.DescribeSharedDirectoriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeSharedDirectories -func (c *DirectoryService) DescribeSharedDirectoriesRequest(input *DescribeSharedDirectoriesInput) (req *request.Request, output *DescribeSharedDirectoriesOutput) { - op := &request.Operation{ - Name: opDescribeSharedDirectories, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSharedDirectoriesInput{} - } - - output = &DescribeSharedDirectoriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSharedDirectories API operation for AWS Directory Service. -// -// Returns the shared directories in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DescribeSharedDirectories for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The NextToken value is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeSharedDirectories -func (c *DirectoryService) DescribeSharedDirectories(input *DescribeSharedDirectoriesInput) (*DescribeSharedDirectoriesOutput, error) { - req, out := c.DescribeSharedDirectoriesRequest(input) - return out, req.Send() -} - -// DescribeSharedDirectoriesWithContext is the same as DescribeSharedDirectories with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSharedDirectories for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DescribeSharedDirectoriesWithContext(ctx aws.Context, input *DescribeSharedDirectoriesInput, opts ...request.Option) (*DescribeSharedDirectoriesOutput, error) { - req, out := c.DescribeSharedDirectoriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSnapshots = "DescribeSnapshots" - -// DescribeSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSnapshots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSnapshots for more information on using the DescribeSnapshots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSnapshotsRequest method. -// req, resp := client.DescribeSnapshotsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeSnapshots -func (c *DirectoryService) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *request.Request, output *DescribeSnapshotsOutput) { - op := &request.Operation{ - Name: opDescribeSnapshots, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSnapshotsInput{} - } - - output = &DescribeSnapshotsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSnapshots API operation for AWS Directory Service. -// -// Obtains information about the directory snapshots that belong to this account. -// -// This operation supports pagination with the use of the NextToken request -// and response parameters. If more results are available, the DescribeSnapshots.NextToken -// member contains a token that you pass in the next call to DescribeSnapshots -// to retrieve the next set of items. -// -// You can also specify a maximum number of return results with the Limit parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DescribeSnapshots for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The NextToken value is not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeSnapshots -func (c *DirectoryService) DescribeSnapshots(input *DescribeSnapshotsInput) (*DescribeSnapshotsOutput, error) { - req, out := c.DescribeSnapshotsRequest(input) - return out, req.Send() -} - -// DescribeSnapshotsWithContext is the same as DescribeSnapshots with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSnapshots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DescribeSnapshotsWithContext(ctx aws.Context, input *DescribeSnapshotsInput, opts ...request.Option) (*DescribeSnapshotsOutput, error) { - req, out := c.DescribeSnapshotsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTrusts = "DescribeTrusts" - -// DescribeTrustsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTrusts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTrusts for more information on using the DescribeTrusts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTrustsRequest method. -// req, resp := client.DescribeTrustsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeTrusts -func (c *DirectoryService) DescribeTrustsRequest(input *DescribeTrustsInput) (req *request.Request, output *DescribeTrustsOutput) { - op := &request.Operation{ - Name: opDescribeTrusts, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTrustsInput{} - } - - output = &DescribeTrustsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTrusts API operation for AWS Directory Service. -// -// Obtains information about the trust relationships for this account. -// -// If no input parameters are provided, such as DirectoryId or TrustIds, this -// request describes all the trust relationships belonging to the account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DescribeTrusts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The NextToken value is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeTrusts -func (c *DirectoryService) DescribeTrusts(input *DescribeTrustsInput) (*DescribeTrustsOutput, error) { - req, out := c.DescribeTrustsRequest(input) - return out, req.Send() -} - -// DescribeTrustsWithContext is the same as DescribeTrusts with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTrusts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DescribeTrustsWithContext(ctx aws.Context, input *DescribeTrustsInput, opts ...request.Option) (*DescribeTrustsOutput, error) { - req, out := c.DescribeTrustsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableRadius = "DisableRadius" - -// DisableRadiusRequest generates a "aws/request.Request" representing the -// client's request for the DisableRadius operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableRadius for more information on using the DisableRadius -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableRadiusRequest method. -// req, resp := client.DisableRadiusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DisableRadius -func (c *DirectoryService) DisableRadiusRequest(input *DisableRadiusInput) (req *request.Request, output *DisableRadiusOutput) { - op := &request.Operation{ - Name: opDisableRadius, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableRadiusInput{} - } - - output = &DisableRadiusOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisableRadius API operation for AWS Directory Service. -// -// Disables multi-factor authentication (MFA) with the Remote Authentication -// Dial In User Service (RADIUS) server for an AD Connector or Microsoft AD -// directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DisableRadius for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DisableRadius -func (c *DirectoryService) DisableRadius(input *DisableRadiusInput) (*DisableRadiusOutput, error) { - req, out := c.DisableRadiusRequest(input) - return out, req.Send() -} - -// DisableRadiusWithContext is the same as DisableRadius with the addition of -// the ability to pass a context and additional request options. -// -// See DisableRadius for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DisableRadiusWithContext(ctx aws.Context, input *DisableRadiusInput, opts ...request.Option) (*DisableRadiusOutput, error) { - req, out := c.DisableRadiusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableSso = "DisableSso" - -// DisableSsoRequest generates a "aws/request.Request" representing the -// client's request for the DisableSso operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableSso for more information on using the DisableSso -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableSsoRequest method. -// req, resp := client.DisableSsoRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DisableSso -func (c *DirectoryService) DisableSsoRequest(input *DisableSsoInput) (req *request.Request, output *DisableSsoOutput) { - op := &request.Operation{ - Name: opDisableSso, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableSsoInput{} - } - - output = &DisableSsoOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisableSso API operation for AWS Directory Service. -// -// Disables single-sign on for a directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation DisableSso for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInsufficientPermissionsException "InsufficientPermissionsException" -// The account does not have sufficient permission to perform the operation. -// -// * ErrCodeAuthenticationFailedException "AuthenticationFailedException" -// An authentication error occurred. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DisableSso -func (c *DirectoryService) DisableSso(input *DisableSsoInput) (*DisableSsoOutput, error) { - req, out := c.DisableSsoRequest(input) - return out, req.Send() -} - -// DisableSsoWithContext is the same as DisableSso with the addition of -// the ability to pass a context and additional request options. -// -// See DisableSso for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) DisableSsoWithContext(ctx aws.Context, input *DisableSsoInput, opts ...request.Option) (*DisableSsoOutput, error) { - req, out := c.DisableSsoRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableRadius = "EnableRadius" - -// EnableRadiusRequest generates a "aws/request.Request" representing the -// client's request for the EnableRadius operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableRadius for more information on using the EnableRadius -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableRadiusRequest method. -// req, resp := client.EnableRadiusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/EnableRadius -func (c *DirectoryService) EnableRadiusRequest(input *EnableRadiusInput) (req *request.Request, output *EnableRadiusOutput) { - op := &request.Operation{ - Name: opEnableRadius, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableRadiusInput{} - } - - output = &EnableRadiusOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableRadius API operation for AWS Directory Service. -// -// Enables multi-factor authentication (MFA) with the Remote Authentication -// Dial In User Service (RADIUS) server for an AD Connector or Microsoft AD -// directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation EnableRadius for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException" -// The specified entity already exists. -// -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/EnableRadius -func (c *DirectoryService) EnableRadius(input *EnableRadiusInput) (*EnableRadiusOutput, error) { - req, out := c.EnableRadiusRequest(input) - return out, req.Send() -} - -// EnableRadiusWithContext is the same as EnableRadius with the addition of -// the ability to pass a context and additional request options. -// -// See EnableRadius for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) EnableRadiusWithContext(ctx aws.Context, input *EnableRadiusInput, opts ...request.Option) (*EnableRadiusOutput, error) { - req, out := c.EnableRadiusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableSso = "EnableSso" - -// EnableSsoRequest generates a "aws/request.Request" representing the -// client's request for the EnableSso operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableSso for more information on using the EnableSso -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableSsoRequest method. -// req, resp := client.EnableSsoRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/EnableSso -func (c *DirectoryService) EnableSsoRequest(input *EnableSsoInput) (req *request.Request, output *EnableSsoOutput) { - op := &request.Operation{ - Name: opEnableSso, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableSsoInput{} - } - - output = &EnableSsoOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableSso API operation for AWS Directory Service. -// -// Enables single sign-on for a directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation EnableSso for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInsufficientPermissionsException "InsufficientPermissionsException" -// The account does not have sufficient permission to perform the operation. -// -// * ErrCodeAuthenticationFailedException "AuthenticationFailedException" -// An authentication error occurred. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/EnableSso -func (c *DirectoryService) EnableSso(input *EnableSsoInput) (*EnableSsoOutput, error) { - req, out := c.EnableSsoRequest(input) - return out, req.Send() -} - -// EnableSsoWithContext is the same as EnableSso with the addition of -// the ability to pass a context and additional request options. -// -// See EnableSso for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) EnableSsoWithContext(ctx aws.Context, input *EnableSsoInput, opts ...request.Option) (*EnableSsoOutput, error) { - req, out := c.EnableSsoRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDirectoryLimits = "GetDirectoryLimits" - -// GetDirectoryLimitsRequest generates a "aws/request.Request" representing the -// client's request for the GetDirectoryLimits operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDirectoryLimits for more information on using the GetDirectoryLimits -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDirectoryLimitsRequest method. -// req, resp := client.GetDirectoryLimitsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/GetDirectoryLimits -func (c *DirectoryService) GetDirectoryLimitsRequest(input *GetDirectoryLimitsInput) (req *request.Request, output *GetDirectoryLimitsOutput) { - op := &request.Operation{ - Name: opGetDirectoryLimits, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDirectoryLimitsInput{} - } - - output = &GetDirectoryLimitsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDirectoryLimits API operation for AWS Directory Service. -// -// Obtains directory limit information for the current region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation GetDirectoryLimits for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/GetDirectoryLimits -func (c *DirectoryService) GetDirectoryLimits(input *GetDirectoryLimitsInput) (*GetDirectoryLimitsOutput, error) { - req, out := c.GetDirectoryLimitsRequest(input) - return out, req.Send() -} - -// GetDirectoryLimitsWithContext is the same as GetDirectoryLimits with the addition of -// the ability to pass a context and additional request options. -// -// See GetDirectoryLimits for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) GetDirectoryLimitsWithContext(ctx aws.Context, input *GetDirectoryLimitsInput, opts ...request.Option) (*GetDirectoryLimitsOutput, error) { - req, out := c.GetDirectoryLimitsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSnapshotLimits = "GetSnapshotLimits" - -// GetSnapshotLimitsRequest generates a "aws/request.Request" representing the -// client's request for the GetSnapshotLimits operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSnapshotLimits for more information on using the GetSnapshotLimits -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSnapshotLimitsRequest method. -// req, resp := client.GetSnapshotLimitsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/GetSnapshotLimits -func (c *DirectoryService) GetSnapshotLimitsRequest(input *GetSnapshotLimitsInput) (req *request.Request, output *GetSnapshotLimitsOutput) { - op := &request.Operation{ - Name: opGetSnapshotLimits, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSnapshotLimitsInput{} - } - - output = &GetSnapshotLimitsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSnapshotLimits API operation for AWS Directory Service. -// -// Obtains the manual snapshot limits for a directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation GetSnapshotLimits for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/GetSnapshotLimits -func (c *DirectoryService) GetSnapshotLimits(input *GetSnapshotLimitsInput) (*GetSnapshotLimitsOutput, error) { - req, out := c.GetSnapshotLimitsRequest(input) - return out, req.Send() -} - -// GetSnapshotLimitsWithContext is the same as GetSnapshotLimits with the addition of -// the ability to pass a context and additional request options. -// -// See GetSnapshotLimits for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) GetSnapshotLimitsWithContext(ctx aws.Context, input *GetSnapshotLimitsInput, opts ...request.Option) (*GetSnapshotLimitsOutput, error) { - req, out := c.GetSnapshotLimitsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListIpRoutes = "ListIpRoutes" - -// ListIpRoutesRequest generates a "aws/request.Request" representing the -// client's request for the ListIpRoutes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListIpRoutes for more information on using the ListIpRoutes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListIpRoutesRequest method. -// req, resp := client.ListIpRoutesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ListIpRoutes -func (c *DirectoryService) ListIpRoutesRequest(input *ListIpRoutesInput) (req *request.Request, output *ListIpRoutesOutput) { - op := &request.Operation{ - Name: opListIpRoutes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListIpRoutesInput{} - } - - output = &ListIpRoutesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListIpRoutes API operation for AWS Directory Service. -// -// Lists the address blocks that you have added to a directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation ListIpRoutes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The NextToken value is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ListIpRoutes -func (c *DirectoryService) ListIpRoutes(input *ListIpRoutesInput) (*ListIpRoutesOutput, error) { - req, out := c.ListIpRoutesRequest(input) - return out, req.Send() -} - -// ListIpRoutesWithContext is the same as ListIpRoutes with the addition of -// the ability to pass a context and additional request options. -// -// See ListIpRoutes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) ListIpRoutesWithContext(ctx aws.Context, input *ListIpRoutesInput, opts ...request.Option) (*ListIpRoutesOutput, error) { - req, out := c.ListIpRoutesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListLogSubscriptions = "ListLogSubscriptions" - -// ListLogSubscriptionsRequest generates a "aws/request.Request" representing the -// client's request for the ListLogSubscriptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListLogSubscriptions for more information on using the ListLogSubscriptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListLogSubscriptionsRequest method. -// req, resp := client.ListLogSubscriptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ListLogSubscriptions -func (c *DirectoryService) ListLogSubscriptionsRequest(input *ListLogSubscriptionsInput) (req *request.Request, output *ListLogSubscriptionsOutput) { - op := &request.Operation{ - Name: opListLogSubscriptions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListLogSubscriptionsInput{} - } - - output = &ListLogSubscriptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListLogSubscriptions API operation for AWS Directory Service. -// -// Lists the active log subscriptions for the AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation ListLogSubscriptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The NextToken value is not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ListLogSubscriptions -func (c *DirectoryService) ListLogSubscriptions(input *ListLogSubscriptionsInput) (*ListLogSubscriptionsOutput, error) { - req, out := c.ListLogSubscriptionsRequest(input) - return out, req.Send() -} - -// ListLogSubscriptionsWithContext is the same as ListLogSubscriptions with the addition of -// the ability to pass a context and additional request options. -// -// See ListLogSubscriptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) ListLogSubscriptionsWithContext(ctx aws.Context, input *ListLogSubscriptionsInput, opts ...request.Option) (*ListLogSubscriptionsOutput, error) { - req, out := c.ListLogSubscriptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSchemaExtensions = "ListSchemaExtensions" - -// ListSchemaExtensionsRequest generates a "aws/request.Request" representing the -// client's request for the ListSchemaExtensions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSchemaExtensions for more information on using the ListSchemaExtensions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSchemaExtensionsRequest method. -// req, resp := client.ListSchemaExtensionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ListSchemaExtensions -func (c *DirectoryService) ListSchemaExtensionsRequest(input *ListSchemaExtensionsInput) (req *request.Request, output *ListSchemaExtensionsOutput) { - op := &request.Operation{ - Name: opListSchemaExtensions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListSchemaExtensionsInput{} - } - - output = &ListSchemaExtensionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSchemaExtensions API operation for AWS Directory Service. -// -// Lists all schema extensions applied to a Microsoft AD Directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation ListSchemaExtensions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The NextToken value is not valid. -// -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ListSchemaExtensions -func (c *DirectoryService) ListSchemaExtensions(input *ListSchemaExtensionsInput) (*ListSchemaExtensionsOutput, error) { - req, out := c.ListSchemaExtensionsRequest(input) - return out, req.Send() -} - -// ListSchemaExtensionsWithContext is the same as ListSchemaExtensions with the addition of -// the ability to pass a context and additional request options. -// -// See ListSchemaExtensions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) ListSchemaExtensionsWithContext(ctx aws.Context, input *ListSchemaExtensionsInput, opts ...request.Option) (*ListSchemaExtensionsOutput, error) { - req, out := c.ListSchemaExtensionsRequest(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/ds-2015-04-16/ListTagsForResource -func (c *DirectoryService) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for AWS Directory Service. -// -// Lists all tags on a directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The NextToken value is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ListTagsForResource -func (c *DirectoryService) 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 *DirectoryService) 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 opRegisterEventTopic = "RegisterEventTopic" - -// RegisterEventTopicRequest generates a "aws/request.Request" representing the -// client's request for the RegisterEventTopic operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterEventTopic for more information on using the RegisterEventTopic -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterEventTopicRequest method. -// req, resp := client.RegisterEventTopicRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RegisterEventTopic -func (c *DirectoryService) RegisterEventTopicRequest(input *RegisterEventTopicInput) (req *request.Request, output *RegisterEventTopicOutput) { - op := &request.Operation{ - Name: opRegisterEventTopic, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterEventTopicInput{} - } - - output = &RegisterEventTopicOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RegisterEventTopic API operation for AWS Directory Service. -// -// Associates a directory with an SNS topic. This establishes the directory -// as a publisher to the specified SNS topic. You can then receive email or -// text (SMS) messages when the status of your directory changes. You get notified -// if your directory goes from an Active status to an Impaired or Inoperable -// status. You also receive a notification when the directory returns to an -// Active 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 Directory Service's -// API operation RegisterEventTopic for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RegisterEventTopic -func (c *DirectoryService) RegisterEventTopic(input *RegisterEventTopicInput) (*RegisterEventTopicOutput, error) { - req, out := c.RegisterEventTopicRequest(input) - return out, req.Send() -} - -// RegisterEventTopicWithContext is the same as RegisterEventTopic with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterEventTopic for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) RegisterEventTopicWithContext(ctx aws.Context, input *RegisterEventTopicInput, opts ...request.Option) (*RegisterEventTopicOutput, error) { - req, out := c.RegisterEventTopicRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRejectSharedDirectory = "RejectSharedDirectory" - -// RejectSharedDirectoryRequest generates a "aws/request.Request" representing the -// client's request for the RejectSharedDirectory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RejectSharedDirectory for more information on using the RejectSharedDirectory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RejectSharedDirectoryRequest method. -// req, resp := client.RejectSharedDirectoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RejectSharedDirectory -func (c *DirectoryService) RejectSharedDirectoryRequest(input *RejectSharedDirectoryInput) (req *request.Request, output *RejectSharedDirectoryOutput) { - op := &request.Operation{ - Name: opRejectSharedDirectory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RejectSharedDirectoryInput{} - } - - output = &RejectSharedDirectoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// RejectSharedDirectory API operation for AWS Directory Service. -// -// Rejects a directory sharing request that was sent from the directory owner -// 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 Directory Service's -// API operation RejectSharedDirectory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeDirectoryAlreadySharedException "DirectoryAlreadySharedException" -// The specified directory has already been shared with this AWS account. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RejectSharedDirectory -func (c *DirectoryService) RejectSharedDirectory(input *RejectSharedDirectoryInput) (*RejectSharedDirectoryOutput, error) { - req, out := c.RejectSharedDirectoryRequest(input) - return out, req.Send() -} - -// RejectSharedDirectoryWithContext is the same as RejectSharedDirectory with the addition of -// the ability to pass a context and additional request options. -// -// See RejectSharedDirectory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) RejectSharedDirectoryWithContext(ctx aws.Context, input *RejectSharedDirectoryInput, opts ...request.Option) (*RejectSharedDirectoryOutput, error) { - req, out := c.RejectSharedDirectoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveIpRoutes = "RemoveIpRoutes" - -// RemoveIpRoutesRequest generates a "aws/request.Request" representing the -// client's request for the RemoveIpRoutes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveIpRoutes for more information on using the RemoveIpRoutes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveIpRoutesRequest method. -// req, resp := client.RemoveIpRoutesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RemoveIpRoutes -func (c *DirectoryService) RemoveIpRoutesRequest(input *RemoveIpRoutesInput) (req *request.Request, output *RemoveIpRoutesOutput) { - op := &request.Operation{ - Name: opRemoveIpRoutes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveIpRoutesInput{} - } - - output = &RemoveIpRoutesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveIpRoutes API operation for AWS Directory Service. -// -// Removes IP address blocks from a directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation RemoveIpRoutes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" -// The specified directory is unavailable or could not be found. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RemoveIpRoutes -func (c *DirectoryService) RemoveIpRoutes(input *RemoveIpRoutesInput) (*RemoveIpRoutesOutput, error) { - req, out := c.RemoveIpRoutesRequest(input) - return out, req.Send() -} - -// RemoveIpRoutesWithContext is the same as RemoveIpRoutes with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveIpRoutes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) RemoveIpRoutesWithContext(ctx aws.Context, input *RemoveIpRoutesInput, opts ...request.Option) (*RemoveIpRoutesOutput, error) { - req, out := c.RemoveIpRoutesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTagsFromResource = "RemoveTagsFromResource" - -// RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTagsFromResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTagsFromResource for more information on using the RemoveTagsFromResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsFromResourceRequest method. -// req, resp := client.RemoveTagsFromResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RemoveTagsFromResource -func (c *DirectoryService) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *RemoveTagsFromResourceOutput) { - op := &request.Operation{ - Name: opRemoveTagsFromResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsFromResourceInput{} - } - - output = &RemoveTagsFromResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTagsFromResource API operation for AWS Directory Service. -// -// Removes tags from a directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation RemoveTagsFromResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RemoveTagsFromResource -func (c *DirectoryService) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - return out, req.Send() -} - -// RemoveTagsFromResourceWithContext is the same as RemoveTagsFromResource with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTagsFromResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*RemoveTagsFromResourceOutput, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetUserPassword = "ResetUserPassword" - -// ResetUserPasswordRequest generates a "aws/request.Request" representing the -// client's request for the ResetUserPassword operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetUserPassword for more information on using the ResetUserPassword -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetUserPasswordRequest method. -// req, resp := client.ResetUserPasswordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ResetUserPassword -func (c *DirectoryService) ResetUserPasswordRequest(input *ResetUserPasswordInput) (req *request.Request, output *ResetUserPasswordOutput) { - op := &request.Operation{ - Name: opResetUserPassword, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetUserPasswordInput{} - } - - output = &ResetUserPasswordOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ResetUserPassword API operation for AWS Directory Service. -// -// Resets the password for any user in your AWS Managed Microsoft AD or Simple -// AD directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation ResetUserPassword for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" -// The specified directory is unavailable or could not be found. -// -// * ErrCodeUserDoesNotExistException "UserDoesNotExistException" -// The user provided a username that does not exist in your directory. -// -// * ErrCodeInvalidPasswordException "InvalidPasswordException" -// The new password provided by the user does not meet the password complexity -// requirements defined in your directory. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ResetUserPassword -func (c *DirectoryService) ResetUserPassword(input *ResetUserPasswordInput) (*ResetUserPasswordOutput, error) { - req, out := c.ResetUserPasswordRequest(input) - return out, req.Send() -} - -// ResetUserPasswordWithContext is the same as ResetUserPassword with the addition of -// the ability to pass a context and additional request options. -// -// See ResetUserPassword for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) ResetUserPasswordWithContext(ctx aws.Context, input *ResetUserPasswordInput, opts ...request.Option) (*ResetUserPasswordOutput, error) { - req, out := c.ResetUserPasswordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreFromSnapshot = "RestoreFromSnapshot" - -// RestoreFromSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the RestoreFromSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreFromSnapshot for more information on using the RestoreFromSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreFromSnapshotRequest method. -// req, resp := client.RestoreFromSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RestoreFromSnapshot -func (c *DirectoryService) RestoreFromSnapshotRequest(input *RestoreFromSnapshotInput) (req *request.Request, output *RestoreFromSnapshotOutput) { - op := &request.Operation{ - Name: opRestoreFromSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreFromSnapshotInput{} - } - - output = &RestoreFromSnapshotOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RestoreFromSnapshot API operation for AWS Directory Service. -// -// Restores a directory using an existing directory snapshot. -// -// When you restore a directory from a snapshot, any changes made to the directory -// after the snapshot date are overwritten. -// -// This action returns as soon as the restore operation is initiated. You can -// monitor the progress of the restore operation by calling the DescribeDirectories -// operation with the directory identifier. When the DirectoryDescription.Stage -// value changes to Active, the restore operation is complete. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation RestoreFromSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RestoreFromSnapshot -func (c *DirectoryService) RestoreFromSnapshot(input *RestoreFromSnapshotInput) (*RestoreFromSnapshotOutput, error) { - req, out := c.RestoreFromSnapshotRequest(input) - return out, req.Send() -} - -// RestoreFromSnapshotWithContext is the same as RestoreFromSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreFromSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) RestoreFromSnapshotWithContext(ctx aws.Context, input *RestoreFromSnapshotInput, opts ...request.Option) (*RestoreFromSnapshotOutput, error) { - req, out := c.RestoreFromSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opShareDirectory = "ShareDirectory" - -// ShareDirectoryRequest generates a "aws/request.Request" representing the -// client's request for the ShareDirectory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ShareDirectory for more information on using the ShareDirectory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ShareDirectoryRequest method. -// req, resp := client.ShareDirectoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ShareDirectory -func (c *DirectoryService) ShareDirectoryRequest(input *ShareDirectoryInput) (req *request.Request, output *ShareDirectoryOutput) { - op := &request.Operation{ - Name: opShareDirectory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ShareDirectoryInput{} - } - - output = &ShareDirectoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// ShareDirectory API operation for AWS Directory Service. -// -// Shares a specified directory (DirectoryId) in your AWS account (directory -// owner) with another AWS account (directory consumer). With this operation -// you can use your directory from any AWS account and from any Amazon VPC within -// an AWS Region. -// -// When you share your AWS Managed Microsoft AD directory, AWS Directory Service -// creates a shared directory in the directory consumer account. This shared -// directory contains the metadata to provide access to the directory within -// the directory owner account. The shared directory is visible in all VPCs -// in the directory consumer account. -// -// The ShareMethod parameter determines whether the specified directory can -// be shared between AWS accounts inside the same AWS organization (ORGANIZATIONS). -// It also determines whether you can share the directory with any other AWS -// account either inside or outside of the organization (HANDSHAKE). -// -// The ShareNotes parameter is only used when HANDSHAKE is called, which sends -// a directory sharing request to the directory consumer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation ShareDirectory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDirectoryAlreadySharedException "DirectoryAlreadySharedException" -// The specified directory has already been shared with this AWS account. -// -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidTargetException "InvalidTargetException" -// The specified shared target is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeShareLimitExceededException "ShareLimitExceededException" -// The maximum number of AWS accounts that you can share with this directory -// has been reached. -// -// * ErrCodeOrganizationsException "OrganizationsException" -// Exception encountered while trying to access your AWS organization. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have sufficient access to perform this action. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ShareDirectory -func (c *DirectoryService) ShareDirectory(input *ShareDirectoryInput) (*ShareDirectoryOutput, error) { - req, out := c.ShareDirectoryRequest(input) - return out, req.Send() -} - -// ShareDirectoryWithContext is the same as ShareDirectory with the addition of -// the ability to pass a context and additional request options. -// -// See ShareDirectory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) ShareDirectoryWithContext(ctx aws.Context, input *ShareDirectoryInput, opts ...request.Option) (*ShareDirectoryOutput, error) { - req, out := c.ShareDirectoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartSchemaExtension = "StartSchemaExtension" - -// StartSchemaExtensionRequest generates a "aws/request.Request" representing the -// client's request for the StartSchemaExtension operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartSchemaExtension for more information on using the StartSchemaExtension -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartSchemaExtensionRequest method. -// req, resp := client.StartSchemaExtensionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/StartSchemaExtension -func (c *DirectoryService) StartSchemaExtensionRequest(input *StartSchemaExtensionInput) (req *request.Request, output *StartSchemaExtensionOutput) { - op := &request.Operation{ - Name: opStartSchemaExtension, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartSchemaExtensionInput{} - } - - output = &StartSchemaExtensionOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartSchemaExtension API operation for AWS Directory Service. -// -// Applies a schema extension to a Microsoft AD directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation StartSchemaExtension for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" -// The specified directory is unavailable or could not be found. -// -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeSnapshotLimitExceededException "SnapshotLimitExceededException" -// The maximum number of manual snapshots for the directory has been reached. -// You can use the GetSnapshotLimits operation to determine the snapshot limits -// for a directory. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/StartSchemaExtension -func (c *DirectoryService) StartSchemaExtension(input *StartSchemaExtensionInput) (*StartSchemaExtensionOutput, error) { - req, out := c.StartSchemaExtensionRequest(input) - return out, req.Send() -} - -// StartSchemaExtensionWithContext is the same as StartSchemaExtension with the addition of -// the ability to pass a context and additional request options. -// -// See StartSchemaExtension for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) StartSchemaExtensionWithContext(ctx aws.Context, input *StartSchemaExtensionInput, opts ...request.Option) (*StartSchemaExtensionOutput, error) { - req, out := c.StartSchemaExtensionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUnshareDirectory = "UnshareDirectory" - -// UnshareDirectoryRequest generates a "aws/request.Request" representing the -// client's request for the UnshareDirectory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UnshareDirectory for more information on using the UnshareDirectory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UnshareDirectoryRequest method. -// req, resp := client.UnshareDirectoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UnshareDirectory -func (c *DirectoryService) UnshareDirectoryRequest(input *UnshareDirectoryInput) (req *request.Request, output *UnshareDirectoryOutput) { - op := &request.Operation{ - Name: opUnshareDirectory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UnshareDirectoryInput{} - } - - output = &UnshareDirectoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// UnshareDirectory API operation for AWS Directory Service. -// -// Stops the directory sharing between the directory owner and consumer accounts. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation UnshareDirectory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidTargetException "InvalidTargetException" -// The specified shared target is not valid. -// -// * ErrCodeDirectoryNotSharedException "DirectoryNotSharedException" -// The specified directory has not been shared with this AWS account. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UnshareDirectory -func (c *DirectoryService) UnshareDirectory(input *UnshareDirectoryInput) (*UnshareDirectoryOutput, error) { - req, out := c.UnshareDirectoryRequest(input) - return out, req.Send() -} - -// UnshareDirectoryWithContext is the same as UnshareDirectory with the addition of -// the ability to pass a context and additional request options. -// -// See UnshareDirectory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) UnshareDirectoryWithContext(ctx aws.Context, input *UnshareDirectoryInput, opts ...request.Option) (*UnshareDirectoryOutput, error) { - req, out := c.UnshareDirectoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateConditionalForwarder = "UpdateConditionalForwarder" - -// UpdateConditionalForwarderRequest generates a "aws/request.Request" representing the -// client's request for the UpdateConditionalForwarder operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateConditionalForwarder for more information on using the UpdateConditionalForwarder -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateConditionalForwarderRequest method. -// req, resp := client.UpdateConditionalForwarderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UpdateConditionalForwarder -func (c *DirectoryService) UpdateConditionalForwarderRequest(input *UpdateConditionalForwarderInput) (req *request.Request, output *UpdateConditionalForwarderOutput) { - op := &request.Operation{ - Name: opUpdateConditionalForwarder, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateConditionalForwarderInput{} - } - - output = &UpdateConditionalForwarderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateConditionalForwarder API operation for AWS Directory Service. -// -// Updates a conditional forwarder that has been set up for your AWS directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation UpdateConditionalForwarder for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" -// The specified directory is unavailable or could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UpdateConditionalForwarder -func (c *DirectoryService) UpdateConditionalForwarder(input *UpdateConditionalForwarderInput) (*UpdateConditionalForwarderOutput, error) { - req, out := c.UpdateConditionalForwarderRequest(input) - return out, req.Send() -} - -// UpdateConditionalForwarderWithContext is the same as UpdateConditionalForwarder with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateConditionalForwarder for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) UpdateConditionalForwarderWithContext(ctx aws.Context, input *UpdateConditionalForwarderInput, opts ...request.Option) (*UpdateConditionalForwarderOutput, error) { - req, out := c.UpdateConditionalForwarderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateNumberOfDomainControllers = "UpdateNumberOfDomainControllers" - -// UpdateNumberOfDomainControllersRequest generates a "aws/request.Request" representing the -// client's request for the UpdateNumberOfDomainControllers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateNumberOfDomainControllers for more information on using the UpdateNumberOfDomainControllers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateNumberOfDomainControllersRequest method. -// req, resp := client.UpdateNumberOfDomainControllersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UpdateNumberOfDomainControllers -func (c *DirectoryService) UpdateNumberOfDomainControllersRequest(input *UpdateNumberOfDomainControllersInput) (req *request.Request, output *UpdateNumberOfDomainControllersOutput) { - op := &request.Operation{ - Name: opUpdateNumberOfDomainControllers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateNumberOfDomainControllersInput{} - } - - output = &UpdateNumberOfDomainControllersOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateNumberOfDomainControllers API operation for AWS Directory Service. -// -// Adds or removes domain controllers to or from the directory. Based on the -// difference between current value and new value (provided through this API -// call), domain controllers will be added or removed. It may take up to 45 -// minutes for any new domain controllers to become fully active once the requested -// number of domain controllers is updated. During this time, you cannot make -// another update request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation UpdateNumberOfDomainControllers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" -// The specified directory is unavailable or could not be found. -// -// * ErrCodeDomainControllerLimitExceededException "DomainControllerLimitExceededException" -// The maximum allowed number of domain controllers per directory was exceeded. -// The default limit per directory is 20 domain controllers. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UpdateNumberOfDomainControllers -func (c *DirectoryService) UpdateNumberOfDomainControllers(input *UpdateNumberOfDomainControllersInput) (*UpdateNumberOfDomainControllersOutput, error) { - req, out := c.UpdateNumberOfDomainControllersRequest(input) - return out, req.Send() -} - -// UpdateNumberOfDomainControllersWithContext is the same as UpdateNumberOfDomainControllers with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateNumberOfDomainControllers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) UpdateNumberOfDomainControllersWithContext(ctx aws.Context, input *UpdateNumberOfDomainControllersInput, opts ...request.Option) (*UpdateNumberOfDomainControllersOutput, error) { - req, out := c.UpdateNumberOfDomainControllersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRadius = "UpdateRadius" - -// UpdateRadiusRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRadius operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRadius for more information on using the UpdateRadius -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRadiusRequest method. -// req, resp := client.UpdateRadiusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UpdateRadius -func (c *DirectoryService) UpdateRadiusRequest(input *UpdateRadiusInput) (req *request.Request, output *UpdateRadiusOutput) { - op := &request.Operation{ - Name: opUpdateRadius, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRadiusInput{} - } - - output = &UpdateRadiusOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateRadius API operation for AWS Directory Service. -// -// Updates the Remote Authentication Dial In User Service (RADIUS) server information -// for an AD Connector or Microsoft AD directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation UpdateRadius for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UpdateRadius -func (c *DirectoryService) UpdateRadius(input *UpdateRadiusInput) (*UpdateRadiusOutput, error) { - req, out := c.UpdateRadiusRequest(input) - return out, req.Send() -} - -// UpdateRadiusWithContext is the same as UpdateRadius with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRadius for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) UpdateRadiusWithContext(ctx aws.Context, input *UpdateRadiusInput, opts ...request.Option) (*UpdateRadiusOutput, error) { - req, out := c.UpdateRadiusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateTrust = "UpdateTrust" - -// UpdateTrustRequest generates a "aws/request.Request" representing the -// client's request for the UpdateTrust operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateTrust for more information on using the UpdateTrust -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateTrustRequest method. -// req, resp := client.UpdateTrustRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UpdateTrust -func (c *DirectoryService) UpdateTrustRequest(input *UpdateTrustInput) (req *request.Request, output *UpdateTrustOutput) { - op := &request.Operation{ - Name: opUpdateTrust, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateTrustInput{} - } - - output = &UpdateTrustOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateTrust API operation for AWS Directory Service. -// -// Updates the trust that has been set up between your AWS Managed Microsoft -// AD directory and an on-premises Active Directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation UpdateTrust for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UpdateTrust -func (c *DirectoryService) UpdateTrust(input *UpdateTrustInput) (*UpdateTrustOutput, error) { - req, out := c.UpdateTrustRequest(input) - return out, req.Send() -} - -// UpdateTrustWithContext is the same as UpdateTrust with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateTrust for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) UpdateTrustWithContext(ctx aws.Context, input *UpdateTrustInput, opts ...request.Option) (*UpdateTrustOutput, error) { - req, out := c.UpdateTrustRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opVerifyTrust = "VerifyTrust" - -// VerifyTrustRequest generates a "aws/request.Request" representing the -// client's request for the VerifyTrust operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See VerifyTrust for more information on using the VerifyTrust -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the VerifyTrustRequest method. -// req, resp := client.VerifyTrustRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/VerifyTrust -func (c *DirectoryService) VerifyTrustRequest(input *VerifyTrustInput) (req *request.Request, output *VerifyTrustOutput) { - op := &request.Operation{ - Name: opVerifyTrust, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &VerifyTrustInput{} - } - - output = &VerifyTrustOutput{} - req = c.newRequest(op, input, output) - return -} - -// VerifyTrust API operation for AWS Directory Service. -// -// AWS Directory Service for Microsoft Active Directory allows you to configure -// and verify trust relationships. -// -// This action verifies a trust relationship between your AWS Managed Microsoft -// AD directory and an external domain. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Directory Service's -// API operation VerifyTrust for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" -// The specified entity could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters are not valid. -// -// * ErrCodeClientException "ClientException" -// A client exception has occurred. -// -// * ErrCodeServiceException "ServiceException" -// An exception has occurred in AWS Directory Service. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/VerifyTrust -func (c *DirectoryService) VerifyTrust(input *VerifyTrustInput) (*VerifyTrustOutput, error) { - req, out := c.VerifyTrustRequest(input) - return out, req.Send() -} - -// VerifyTrustWithContext is the same as VerifyTrust with the addition of -// the ability to pass a context and additional request options. -// -// See VerifyTrust for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DirectoryService) VerifyTrustWithContext(ctx aws.Context, input *VerifyTrustInput, opts ...request.Option) (*VerifyTrustOutput, error) { - req, out := c.VerifyTrustRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AcceptSharedDirectoryInput struct { - _ struct{} `type:"structure"` - - // Identifier of the shared directory in the directory consumer account. This - // identifier is different for each directory owner account. - // - // SharedDirectoryId is a required field - SharedDirectoryId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AcceptSharedDirectoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptSharedDirectoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AcceptSharedDirectoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AcceptSharedDirectoryInput"} - if s.SharedDirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("SharedDirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSharedDirectoryId sets the SharedDirectoryId field's value. -func (s *AcceptSharedDirectoryInput) SetSharedDirectoryId(v string) *AcceptSharedDirectoryInput { - s.SharedDirectoryId = &v - return s -} - -type AcceptSharedDirectoryOutput struct { - _ struct{} `type:"structure"` - - // The shared directory in the directory consumer account. - SharedDirectory *SharedDirectory `type:"structure"` -} - -// String returns the string representation -func (s AcceptSharedDirectoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptSharedDirectoryOutput) GoString() string { - return s.String() -} - -// SetSharedDirectory sets the SharedDirectory field's value. -func (s *AcceptSharedDirectoryOutput) SetSharedDirectory(v *SharedDirectory) *AcceptSharedDirectoryOutput { - s.SharedDirectory = v - return s -} - -type AddIpRoutesInput struct { - _ struct{} `type:"structure"` - - // Identifier (ID) of the directory to which to add the address block. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // IP address blocks, using CIDR format, of the traffic to route. This is often - // the IP address block of the DNS server used for your on-premises domain. - // - // IpRoutes is a required field - IpRoutes []*IpRoute `type:"list" required:"true"` - - // If set to true, updates the inbound and outbound rules of the security group - // that has the description: "AWS created security group for directory ID directory - // controllers." Following are the new rules: - // - // Inbound: - // - // * Type: Custom UDP Rule, Protocol: UDP, Range: 88, Source: 0.0.0.0/0 - // - // * Type: Custom UDP Rule, Protocol: UDP, Range: 123, Source: 0.0.0.0/0 - // - // * Type: Custom UDP Rule, Protocol: UDP, Range: 138, Source: 0.0.0.0/0 - // - // * Type: Custom UDP Rule, Protocol: UDP, Range: 389, Source: 0.0.0.0/0 - // - // * Type: Custom UDP Rule, Protocol: UDP, Range: 464, Source: 0.0.0.0/0 - // - // * Type: Custom UDP Rule, Protocol: UDP, Range: 445, Source: 0.0.0.0/0 - // - // * Type: Custom TCP Rule, Protocol: TCP, Range: 88, Source: 0.0.0.0/0 - // - // * Type: Custom TCP Rule, Protocol: TCP, Range: 135, Source: 0.0.0.0/0 - // - // * Type: Custom TCP Rule, Protocol: TCP, Range: 445, Source: 0.0.0.0/0 - // - // * Type: Custom TCP Rule, Protocol: TCP, Range: 464, Source: 0.0.0.0/0 - // - // * Type: Custom TCP Rule, Protocol: TCP, Range: 636, Source: 0.0.0.0/0 - // - // * Type: Custom TCP Rule, Protocol: TCP, Range: 1024-65535, Source: 0.0.0.0/0 - // - // * Type: Custom TCP Rule, Protocol: TCP, Range: 3268-33269, Source: 0.0.0.0/0 - // - // * Type: DNS (UDP), Protocol: UDP, Range: 53, Source: 0.0.0.0/0 - // - // * Type: DNS (TCP), Protocol: TCP, Range: 53, Source: 0.0.0.0/0 - // - // * Type: LDAP, Protocol: TCP, Range: 389, Source: 0.0.0.0/0 - // - // * Type: All ICMP, Protocol: All, Range: N/A, Source: 0.0.0.0/0 - // - // Outbound: - // - // Type: All traffic, Protocol: All, Range: All, Destination: 0.0.0.0/0 - UpdateSecurityGroupForDirectoryControllers *bool `type:"boolean"` -} - -// String returns the string representation -func (s AddIpRoutesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddIpRoutesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddIpRoutesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddIpRoutesInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.IpRoutes == nil { - invalidParams.Add(request.NewErrParamRequired("IpRoutes")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *AddIpRoutesInput) SetDirectoryId(v string) *AddIpRoutesInput { - s.DirectoryId = &v - return s -} - -// SetIpRoutes sets the IpRoutes field's value. -func (s *AddIpRoutesInput) SetIpRoutes(v []*IpRoute) *AddIpRoutesInput { - s.IpRoutes = v - return s -} - -// SetUpdateSecurityGroupForDirectoryControllers sets the UpdateSecurityGroupForDirectoryControllers field's value. -func (s *AddIpRoutesInput) SetUpdateSecurityGroupForDirectoryControllers(v bool) *AddIpRoutesInput { - s.UpdateSecurityGroupForDirectoryControllers = &v - return s -} - -type AddIpRoutesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddIpRoutesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddIpRoutesOutput) GoString() string { - return s.String() -} - -type AddTagsToResourceInput struct { - _ struct{} `type:"structure"` - - // Identifier (ID) for the directory to which to add the tag. - // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` - - // The tags to be assigned to the directory. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsToResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsToResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *AddTagsToResourceInput) SetResourceId(v string) *AddTagsToResourceInput { - s.ResourceId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { - s.Tags = v - return s -} - -type AddTagsToResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsToResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceOutput) GoString() string { - return s.String() -} - -// Represents a named directory attribute. -type Attribute struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - Name *string `min:"1" type:"string"` - - // The value of the attribute. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Attribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Attribute) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Attribute) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Attribute"} - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *Attribute) SetName(v string) *Attribute { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Attribute) SetValue(v string) *Attribute { - s.Value = &v - return s -} - -type CancelSchemaExtensionInput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory whose schema extension will be canceled. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The identifier of the schema extension that will be canceled. - // - // SchemaExtensionId is a required field - SchemaExtensionId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelSchemaExtensionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelSchemaExtensionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelSchemaExtensionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelSchemaExtensionInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.SchemaExtensionId == nil { - invalidParams.Add(request.NewErrParamRequired("SchemaExtensionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *CancelSchemaExtensionInput) SetDirectoryId(v string) *CancelSchemaExtensionInput { - s.DirectoryId = &v - return s -} - -// SetSchemaExtensionId sets the SchemaExtensionId field's value. -func (s *CancelSchemaExtensionInput) SetSchemaExtensionId(v string) *CancelSchemaExtensionInput { - s.SchemaExtensionId = &v - return s -} - -type CancelSchemaExtensionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CancelSchemaExtensionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelSchemaExtensionOutput) GoString() string { - return s.String() -} - -// Contains information about a computer account in a directory. -type Computer struct { - _ struct{} `type:"structure"` - - // An array of Attribute objects containing the LDAP attributes that belong - // to the computer account. - ComputerAttributes []*Attribute `type:"list"` - - // The identifier of the computer. - ComputerId *string `min:"1" type:"string"` - - // The computer name. - ComputerName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s Computer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Computer) GoString() string { - return s.String() -} - -// SetComputerAttributes sets the ComputerAttributes field's value. -func (s *Computer) SetComputerAttributes(v []*Attribute) *Computer { - s.ComputerAttributes = v - return s -} - -// SetComputerId sets the ComputerId field's value. -func (s *Computer) SetComputerId(v string) *Computer { - s.ComputerId = &v - return s -} - -// SetComputerName sets the ComputerName field's value. -func (s *Computer) SetComputerName(v string) *Computer { - s.ComputerName = &v - return s -} - -// Points to a remote domain with which you are setting up a trust relationship. -// Conditional forwarders are required in order to set up a trust relationship -// with another domain. -type ConditionalForwarder struct { - _ struct{} `type:"structure"` - - // The IP addresses of the remote DNS server associated with RemoteDomainName. - // This is the IP address of the DNS server that your conditional forwarder - // points to. - DnsIpAddrs []*string `type:"list"` - - // The fully qualified domain name (FQDN) of the remote domains pointed to by - // the conditional forwarder. - RemoteDomainName *string `type:"string"` - - // The replication scope of the conditional forwarder. The only allowed value - // is Domain, which will replicate the conditional forwarder to all of the domain - // controllers for your AWS directory. - ReplicationScope *string `type:"string" enum:"ReplicationScope"` -} - -// String returns the string representation -func (s ConditionalForwarder) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConditionalForwarder) GoString() string { - return s.String() -} - -// SetDnsIpAddrs sets the DnsIpAddrs field's value. -func (s *ConditionalForwarder) SetDnsIpAddrs(v []*string) *ConditionalForwarder { - s.DnsIpAddrs = v - return s -} - -// SetRemoteDomainName sets the RemoteDomainName field's value. -func (s *ConditionalForwarder) SetRemoteDomainName(v string) *ConditionalForwarder { - s.RemoteDomainName = &v - return s -} - -// SetReplicationScope sets the ReplicationScope field's value. -func (s *ConditionalForwarder) SetReplicationScope(v string) *ConditionalForwarder { - s.ReplicationScope = &v - return s -} - -// Contains the inputs for the ConnectDirectory operation. -type ConnectDirectoryInput struct { - _ struct{} `type:"structure"` - - // A DirectoryConnectSettings object that contains additional information for - // the operation. - // - // ConnectSettings is a required field - ConnectSettings *DirectoryConnectSettings `type:"structure" required:"true"` - - // A textual description for the directory. - Description *string `type:"string"` - - // The fully qualified name of the on-premises directory, such as corp.example.com. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The password for the on-premises user account. - // - // Password is a required field - Password *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The NetBIOS name of the on-premises directory, such as CORP. - ShortName *string `type:"string"` - - // The size of the directory. - // - // Size is a required field - Size *string `type:"string" required:"true" enum:"DirectorySize"` -} - -// String returns the string representation -func (s ConnectDirectoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConnectDirectoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConnectDirectoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConnectDirectoryInput"} - if s.ConnectSettings == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectSettings")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Password == nil { - invalidParams.Add(request.NewErrParamRequired("Password")) - } - if s.Password != nil && len(*s.Password) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Password", 1)) - } - if s.Size == nil { - invalidParams.Add(request.NewErrParamRequired("Size")) - } - if s.ConnectSettings != nil { - if err := s.ConnectSettings.Validate(); err != nil { - invalidParams.AddNested("ConnectSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectSettings sets the ConnectSettings field's value. -func (s *ConnectDirectoryInput) SetConnectSettings(v *DirectoryConnectSettings) *ConnectDirectoryInput { - s.ConnectSettings = v - return s -} - -// SetDescription sets the Description field's value. -func (s *ConnectDirectoryInput) SetDescription(v string) *ConnectDirectoryInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *ConnectDirectoryInput) SetName(v string) *ConnectDirectoryInput { - s.Name = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *ConnectDirectoryInput) SetPassword(v string) *ConnectDirectoryInput { - s.Password = &v - return s -} - -// SetShortName sets the ShortName field's value. -func (s *ConnectDirectoryInput) SetShortName(v string) *ConnectDirectoryInput { - s.ShortName = &v - return s -} - -// SetSize sets the Size field's value. -func (s *ConnectDirectoryInput) SetSize(v string) *ConnectDirectoryInput { - s.Size = &v - return s -} - -// Contains the results of the ConnectDirectory operation. -type ConnectDirectoryOutput struct { - _ struct{} `type:"structure"` - - // The identifier of the new directory. - DirectoryId *string `type:"string"` -} - -// String returns the string representation -func (s ConnectDirectoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConnectDirectoryOutput) GoString() string { - return s.String() -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *ConnectDirectoryOutput) SetDirectoryId(v string) *ConnectDirectoryOutput { - s.DirectoryId = &v - return s -} - -// Contains the inputs for the CreateAlias operation. -type CreateAliasInput struct { - _ struct{} `type:"structure"` - - // The requested alias. - // - // The alias must be unique amongst all aliases in AWS. This operation throws - // an EntityAlreadyExistsException error if the alias already exists. - // - // Alias is a required field - Alias *string `min:"1" type:"string" required:"true"` - - // The identifier of the directory for which to create the alias. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"} - if s.Alias == nil { - invalidParams.Add(request.NewErrParamRequired("Alias")) - } - if s.Alias != nil && len(*s.Alias) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Alias", 1)) - } - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlias sets the Alias field's value. -func (s *CreateAliasInput) SetAlias(v string) *CreateAliasInput { - s.Alias = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *CreateAliasInput) SetDirectoryId(v string) *CreateAliasInput { - s.DirectoryId = &v - return s -} - -// Contains the results of the CreateAlias operation. -type CreateAliasOutput struct { - _ struct{} `type:"structure"` - - // The alias for the directory. - Alias *string `min:"1" type:"string"` - - // The identifier of the directory. - DirectoryId *string `type:"string"` -} - -// String returns the string representation -func (s CreateAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAliasOutput) GoString() string { - return s.String() -} - -// SetAlias sets the Alias field's value. -func (s *CreateAliasOutput) SetAlias(v string) *CreateAliasOutput { - s.Alias = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *CreateAliasOutput) SetDirectoryId(v string) *CreateAliasOutput { - s.DirectoryId = &v - return s -} - -// Contains the inputs for the CreateComputer operation. -type CreateComputerInput struct { - _ struct{} `type:"structure"` - - // An array of Attribute objects that contain any LDAP attributes to apply to - // the computer account. - ComputerAttributes []*Attribute `type:"list"` - - // The name of the computer account. - // - // ComputerName is a required field - ComputerName *string `min:"1" type:"string" required:"true"` - - // The identifier of the directory in which to create the computer account. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The fully-qualified distinguished name of the organizational unit to place - // the computer account in. - OrganizationalUnitDistinguishedName *string `min:"1" type:"string"` - - // A one-time password that is used to join the computer to the directory. You - // should generate a random, strong password to use for this parameter. - // - // Password is a required field - Password *string `min:"8" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s CreateComputerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateComputerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateComputerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateComputerInput"} - if s.ComputerName == nil { - invalidParams.Add(request.NewErrParamRequired("ComputerName")) - } - if s.ComputerName != nil && len(*s.ComputerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ComputerName", 1)) - } - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.OrganizationalUnitDistinguishedName != nil && len(*s.OrganizationalUnitDistinguishedName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OrganizationalUnitDistinguishedName", 1)) - } - if s.Password == nil { - invalidParams.Add(request.NewErrParamRequired("Password")) - } - if s.Password != nil && len(*s.Password) < 8 { - invalidParams.Add(request.NewErrParamMinLen("Password", 8)) - } - if s.ComputerAttributes != nil { - for i, v := range s.ComputerAttributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ComputerAttributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComputerAttributes sets the ComputerAttributes field's value. -func (s *CreateComputerInput) SetComputerAttributes(v []*Attribute) *CreateComputerInput { - s.ComputerAttributes = v - return s -} - -// SetComputerName sets the ComputerName field's value. -func (s *CreateComputerInput) SetComputerName(v string) *CreateComputerInput { - s.ComputerName = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *CreateComputerInput) SetDirectoryId(v string) *CreateComputerInput { - s.DirectoryId = &v - return s -} - -// SetOrganizationalUnitDistinguishedName sets the OrganizationalUnitDistinguishedName field's value. -func (s *CreateComputerInput) SetOrganizationalUnitDistinguishedName(v string) *CreateComputerInput { - s.OrganizationalUnitDistinguishedName = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *CreateComputerInput) SetPassword(v string) *CreateComputerInput { - s.Password = &v - return s -} - -// Contains the results for the CreateComputer operation. -type CreateComputerOutput struct { - _ struct{} `type:"structure"` - - // A Computer object that represents the computer account. - Computer *Computer `type:"structure"` -} - -// String returns the string representation -func (s CreateComputerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateComputerOutput) GoString() string { - return s.String() -} - -// SetComputer sets the Computer field's value. -func (s *CreateComputerOutput) SetComputer(v *Computer) *CreateComputerOutput { - s.Computer = v - return s -} - -// Initiates the creation of a conditional forwarder for your AWS Directory -// Service for Microsoft Active Directory. Conditional forwarders are required -// in order to set up a trust relationship with another domain. -type CreateConditionalForwarderInput struct { - _ struct{} `type:"structure"` - - // The directory ID of the AWS directory for which you are creating the conditional - // forwarder. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The IP addresses of the remote DNS server associated with RemoteDomainName. - // - // DnsIpAddrs is a required field - DnsIpAddrs []*string `type:"list" required:"true"` - - // The fully qualified domain name (FQDN) of the remote domain with which you - // will set up a trust relationship. - // - // RemoteDomainName is a required field - RemoteDomainName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateConditionalForwarderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConditionalForwarderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateConditionalForwarderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateConditionalForwarderInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.DnsIpAddrs == nil { - invalidParams.Add(request.NewErrParamRequired("DnsIpAddrs")) - } - if s.RemoteDomainName == nil { - invalidParams.Add(request.NewErrParamRequired("RemoteDomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *CreateConditionalForwarderInput) SetDirectoryId(v string) *CreateConditionalForwarderInput { - s.DirectoryId = &v - return s -} - -// SetDnsIpAddrs sets the DnsIpAddrs field's value. -func (s *CreateConditionalForwarderInput) SetDnsIpAddrs(v []*string) *CreateConditionalForwarderInput { - s.DnsIpAddrs = v - return s -} - -// SetRemoteDomainName sets the RemoteDomainName field's value. -func (s *CreateConditionalForwarderInput) SetRemoteDomainName(v string) *CreateConditionalForwarderInput { - s.RemoteDomainName = &v - return s -} - -// The result of a CreateConditinalForwarder request. -type CreateConditionalForwarderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateConditionalForwarderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConditionalForwarderOutput) GoString() string { - return s.String() -} - -// Contains the inputs for the CreateDirectory operation. -type CreateDirectoryInput struct { - _ struct{} `type:"structure"` - - // A textual description for the directory. - Description *string `type:"string"` - - // The fully qualified name for the directory, such as corp.example.com. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The password for the directory administrator. The directory creation process - // creates a directory administrator account with the user name Administrator - // and this password. - // - // Password is a required field - Password *string `type:"string" required:"true" sensitive:"true"` - - // The short name of the directory, such as CORP. - ShortName *string `type:"string"` - - // The size of the directory. - // - // Size is a required field - Size *string `type:"string" required:"true" enum:"DirectorySize"` - - // A DirectoryVpcSettings object that contains additional information for the - // operation. - VpcSettings *DirectoryVpcSettings `type:"structure"` -} - -// String returns the string representation -func (s CreateDirectoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDirectoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDirectoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDirectoryInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Password == nil { - invalidParams.Add(request.NewErrParamRequired("Password")) - } - if s.Size == nil { - invalidParams.Add(request.NewErrParamRequired("Size")) - } - if s.VpcSettings != nil { - if err := s.VpcSettings.Validate(); err != nil { - invalidParams.AddNested("VpcSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateDirectoryInput) SetDescription(v string) *CreateDirectoryInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateDirectoryInput) SetName(v string) *CreateDirectoryInput { - s.Name = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *CreateDirectoryInput) SetPassword(v string) *CreateDirectoryInput { - s.Password = &v - return s -} - -// SetShortName sets the ShortName field's value. -func (s *CreateDirectoryInput) SetShortName(v string) *CreateDirectoryInput { - s.ShortName = &v - return s -} - -// SetSize sets the Size field's value. -func (s *CreateDirectoryInput) SetSize(v string) *CreateDirectoryInput { - s.Size = &v - return s -} - -// SetVpcSettings sets the VpcSettings field's value. -func (s *CreateDirectoryInput) SetVpcSettings(v *DirectoryVpcSettings) *CreateDirectoryInput { - s.VpcSettings = v - return s -} - -// Contains the results of the CreateDirectory operation. -type CreateDirectoryOutput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory that was created. - DirectoryId *string `type:"string"` -} - -// String returns the string representation -func (s CreateDirectoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDirectoryOutput) GoString() string { - return s.String() -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *CreateDirectoryOutput) SetDirectoryId(v string) *CreateDirectoryOutput { - s.DirectoryId = &v - return s -} - -type CreateLogSubscriptionInput struct { - _ struct{} `type:"structure"` - - // Identifier (ID) of the directory to which you want to subscribe and receive - // real-time logs to your specified CloudWatch log group. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The name of the CloudWatch log group where the real-time domain controller - // logs are forwarded. - // - // LogGroupName is a required field - LogGroupName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateLogSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLogSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLogSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLogSubscriptionInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *CreateLogSubscriptionInput) SetDirectoryId(v string) *CreateLogSubscriptionInput { - s.DirectoryId = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *CreateLogSubscriptionInput) SetLogGroupName(v string) *CreateLogSubscriptionInput { - s.LogGroupName = &v - return s -} - -type CreateLogSubscriptionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateLogSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLogSubscriptionOutput) GoString() string { - return s.String() -} - -// Creates an AWS Managed Microsoft AD directory. -type CreateMicrosoftADInput struct { - _ struct{} `type:"structure"` - - // A textual description for the directory. This label will appear on the AWS - // console Directory Details page after the directory is created. - Description *string `type:"string"` - - // AWS Managed Microsoft AD is available in two editions: Standard and Enterprise. - // Enterprise is the default. - Edition *string `type:"string" enum:"DirectoryEdition"` - - // The fully qualified domain name for the directory, such as corp.example.com. - // This name will resolve inside your VPC only. It does not need to be publicly - // resolvable. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The password for the default administrative user named Admin. - // - // Password is a required field - Password *string `type:"string" required:"true" sensitive:"true"` - - // The NetBIOS name for your domain. A short identifier for your domain, such - // as CORP. If you don't specify a NetBIOS name, it will default to the first - // part of your directory DNS. For example, CORP for the directory DNS corp.example.com. - ShortName *string `type:"string"` - - // Contains VPC information for the CreateDirectory or CreateMicrosoftAD operation. - // - // VpcSettings is a required field - VpcSettings *DirectoryVpcSettings `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateMicrosoftADInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMicrosoftADInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateMicrosoftADInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateMicrosoftADInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Password == nil { - invalidParams.Add(request.NewErrParamRequired("Password")) - } - if s.VpcSettings == nil { - invalidParams.Add(request.NewErrParamRequired("VpcSettings")) - } - if s.VpcSettings != nil { - if err := s.VpcSettings.Validate(); err != nil { - invalidParams.AddNested("VpcSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateMicrosoftADInput) SetDescription(v string) *CreateMicrosoftADInput { - s.Description = &v - return s -} - -// SetEdition sets the Edition field's value. -func (s *CreateMicrosoftADInput) SetEdition(v string) *CreateMicrosoftADInput { - s.Edition = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateMicrosoftADInput) SetName(v string) *CreateMicrosoftADInput { - s.Name = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *CreateMicrosoftADInput) SetPassword(v string) *CreateMicrosoftADInput { - s.Password = &v - return s -} - -// SetShortName sets the ShortName field's value. -func (s *CreateMicrosoftADInput) SetShortName(v string) *CreateMicrosoftADInput { - s.ShortName = &v - return s -} - -// SetVpcSettings sets the VpcSettings field's value. -func (s *CreateMicrosoftADInput) SetVpcSettings(v *DirectoryVpcSettings) *CreateMicrosoftADInput { - s.VpcSettings = v - return s -} - -// Result of a CreateMicrosoftAD request. -type CreateMicrosoftADOutput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory that was created. - DirectoryId *string `type:"string"` -} - -// String returns the string representation -func (s CreateMicrosoftADOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMicrosoftADOutput) GoString() string { - return s.String() -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *CreateMicrosoftADOutput) SetDirectoryId(v string) *CreateMicrosoftADOutput { - s.DirectoryId = &v - return s -} - -// Contains the inputs for the CreateSnapshot operation. -type CreateSnapshotInput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory of which to take a snapshot. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The descriptive name to apply to the snapshot. - Name *string `type:"string"` -} - -// String returns the string representation -func (s CreateSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *CreateSnapshotInput) SetDirectoryId(v string) *CreateSnapshotInput { - s.DirectoryId = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateSnapshotInput) SetName(v string) *CreateSnapshotInput { - s.Name = &v - return s -} - -// Contains the results of the CreateSnapshot operation. -type CreateSnapshotOutput struct { - _ struct{} `type:"structure"` - - // The identifier of the snapshot that was created. - SnapshotId *string `type:"string"` -} - -// String returns the string representation -func (s CreateSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSnapshotOutput) GoString() string { - return s.String() -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *CreateSnapshotOutput) SetSnapshotId(v string) *CreateSnapshotOutput { - s.SnapshotId = &v - return s -} - -// AWS Directory Service for Microsoft Active Directory allows you to configure -// trust relationships. For example, you can establish a trust between your -// AWS Managed Microsoft AD directory, and your existing on-premises Microsoft -// Active Directory. This would allow you to provide users and groups access -// to resources in either domain, with a single set of credentials. -// -// This action initiates the creation of the AWS side of a trust relationship -// between an AWS Managed Microsoft AD directory and an external domain. -type CreateTrustInput struct { - _ struct{} `type:"structure"` - - // The IP addresses of the remote DNS server associated with RemoteDomainName. - ConditionalForwarderIpAddrs []*string `type:"list"` - - // The Directory ID of the AWS Managed Microsoft AD directory for which to establish - // the trust relationship. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The Fully Qualified Domain Name (FQDN) of the external domain for which to - // create the trust relationship. - // - // RemoteDomainName is a required field - RemoteDomainName *string `type:"string" required:"true"` - - // Optional parameter to enable selective authentication for the trust. - SelectiveAuth *string `type:"string" enum:"SelectiveAuth"` - - // The direction of the trust relationship. - // - // TrustDirection is a required field - TrustDirection *string `type:"string" required:"true" enum:"TrustDirection"` - - // The trust password. The must be the same password that was used when creating - // the trust relationship on the external domain. - // - // TrustPassword is a required field - TrustPassword *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The trust relationship type. Forest is the default. - TrustType *string `type:"string" enum:"TrustType"` -} - -// String returns the string representation -func (s CreateTrustInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTrustInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTrustInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTrustInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.RemoteDomainName == nil { - invalidParams.Add(request.NewErrParamRequired("RemoteDomainName")) - } - if s.TrustDirection == nil { - invalidParams.Add(request.NewErrParamRequired("TrustDirection")) - } - if s.TrustPassword == nil { - invalidParams.Add(request.NewErrParamRequired("TrustPassword")) - } - if s.TrustPassword != nil && len(*s.TrustPassword) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TrustPassword", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConditionalForwarderIpAddrs sets the ConditionalForwarderIpAddrs field's value. -func (s *CreateTrustInput) SetConditionalForwarderIpAddrs(v []*string) *CreateTrustInput { - s.ConditionalForwarderIpAddrs = v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *CreateTrustInput) SetDirectoryId(v string) *CreateTrustInput { - s.DirectoryId = &v - return s -} - -// SetRemoteDomainName sets the RemoteDomainName field's value. -func (s *CreateTrustInput) SetRemoteDomainName(v string) *CreateTrustInput { - s.RemoteDomainName = &v - return s -} - -// SetSelectiveAuth sets the SelectiveAuth field's value. -func (s *CreateTrustInput) SetSelectiveAuth(v string) *CreateTrustInput { - s.SelectiveAuth = &v - return s -} - -// SetTrustDirection sets the TrustDirection field's value. -func (s *CreateTrustInput) SetTrustDirection(v string) *CreateTrustInput { - s.TrustDirection = &v - return s -} - -// SetTrustPassword sets the TrustPassword field's value. -func (s *CreateTrustInput) SetTrustPassword(v string) *CreateTrustInput { - s.TrustPassword = &v - return s -} - -// SetTrustType sets the TrustType field's value. -func (s *CreateTrustInput) SetTrustType(v string) *CreateTrustInput { - s.TrustType = &v - return s -} - -// The result of a CreateTrust request. -type CreateTrustOutput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the trust relationship that was created. - TrustId *string `type:"string"` -} - -// String returns the string representation -func (s CreateTrustOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTrustOutput) GoString() string { - return s.String() -} - -// SetTrustId sets the TrustId field's value. -func (s *CreateTrustOutput) SetTrustId(v string) *CreateTrustOutput { - s.TrustId = &v - return s -} - -// Deletes a conditional forwarder. -type DeleteConditionalForwarderInput struct { - _ struct{} `type:"structure"` - - // The directory ID for which you are deleting the conditional forwarder. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The fully qualified domain name (FQDN) of the remote domain with which you - // are deleting the conditional forwarder. - // - // RemoteDomainName is a required field - RemoteDomainName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteConditionalForwarderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConditionalForwarderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteConditionalForwarderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteConditionalForwarderInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.RemoteDomainName == nil { - invalidParams.Add(request.NewErrParamRequired("RemoteDomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DeleteConditionalForwarderInput) SetDirectoryId(v string) *DeleteConditionalForwarderInput { - s.DirectoryId = &v - return s -} - -// SetRemoteDomainName sets the RemoteDomainName field's value. -func (s *DeleteConditionalForwarderInput) SetRemoteDomainName(v string) *DeleteConditionalForwarderInput { - s.RemoteDomainName = &v - return s -} - -// The result of a DeleteConditionalForwarder request. -type DeleteConditionalForwarderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteConditionalForwarderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConditionalForwarderOutput) GoString() string { - return s.String() -} - -// Contains the inputs for the DeleteDirectory operation. -type DeleteDirectoryInput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory to delete. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDirectoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDirectoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDirectoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDirectoryInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DeleteDirectoryInput) SetDirectoryId(v string) *DeleteDirectoryInput { - s.DirectoryId = &v - return s -} - -// Contains the results of the DeleteDirectory operation. -type DeleteDirectoryOutput struct { - _ struct{} `type:"structure"` - - // The directory identifier. - DirectoryId *string `type:"string"` -} - -// String returns the string representation -func (s DeleteDirectoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDirectoryOutput) GoString() string { - return s.String() -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DeleteDirectoryOutput) SetDirectoryId(v string) *DeleteDirectoryOutput { - s.DirectoryId = &v - return s -} - -type DeleteLogSubscriptionInput struct { - _ struct{} `type:"structure"` - - // Identifier (ID) of the directory whose log subscription you want to delete. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLogSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLogSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLogSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLogSubscriptionInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DeleteLogSubscriptionInput) SetDirectoryId(v string) *DeleteLogSubscriptionInput { - s.DirectoryId = &v - return s -} - -type DeleteLogSubscriptionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLogSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLogSubscriptionOutput) GoString() string { - return s.String() -} - -// Contains the inputs for the DeleteSnapshot operation. -type DeleteSnapshotInput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory snapshot to be deleted. - // - // SnapshotId is a required field - SnapshotId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotInput"} - if s.SnapshotId == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *DeleteSnapshotInput) SetSnapshotId(v string) *DeleteSnapshotInput { - s.SnapshotId = &v - return s -} - -// Contains the results of the DeleteSnapshot operation. -type DeleteSnapshotOutput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory snapshot that was deleted. - SnapshotId *string `type:"string"` -} - -// String returns the string representation -func (s DeleteSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSnapshotOutput) GoString() string { - return s.String() -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *DeleteSnapshotOutput) SetSnapshotId(v string) *DeleteSnapshotOutput { - s.SnapshotId = &v - return s -} - -// Deletes the local side of an existing trust relationship between the AWS -// Managed Microsoft AD directory and the external domain. -type DeleteTrustInput struct { - _ struct{} `type:"structure"` - - // Delete a conditional forwarder as part of a DeleteTrustRequest. - DeleteAssociatedConditionalForwarder *bool `type:"boolean"` - - // The Trust ID of the trust relationship to be deleted. - // - // TrustId is a required field - TrustId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTrustInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTrustInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTrustInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTrustInput"} - if s.TrustId == nil { - invalidParams.Add(request.NewErrParamRequired("TrustId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeleteAssociatedConditionalForwarder sets the DeleteAssociatedConditionalForwarder field's value. -func (s *DeleteTrustInput) SetDeleteAssociatedConditionalForwarder(v bool) *DeleteTrustInput { - s.DeleteAssociatedConditionalForwarder = &v - return s -} - -// SetTrustId sets the TrustId field's value. -func (s *DeleteTrustInput) SetTrustId(v string) *DeleteTrustInput { - s.TrustId = &v - return s -} - -// The result of a DeleteTrust request. -type DeleteTrustOutput struct { - _ struct{} `type:"structure"` - - // The Trust ID of the trust relationship that was deleted. - TrustId *string `type:"string"` -} - -// String returns the string representation -func (s DeleteTrustOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTrustOutput) GoString() string { - return s.String() -} - -// SetTrustId sets the TrustId field's value. -func (s *DeleteTrustOutput) SetTrustId(v string) *DeleteTrustOutput { - s.TrustId = &v - return s -} - -// Removes the specified directory as a publisher to the specified SNS topic. -type DeregisterEventTopicInput struct { - _ struct{} `type:"structure"` - - // The Directory ID to remove as a publisher. This directory will no longer - // send messages to the specified SNS topic. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The name of the SNS topic from which to remove the directory as a publisher. - // - // TopicName is a required field - TopicName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterEventTopicInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterEventTopicInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterEventTopicInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterEventTopicInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.TopicName == nil { - invalidParams.Add(request.NewErrParamRequired("TopicName")) - } - if s.TopicName != nil && len(*s.TopicName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TopicName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DeregisterEventTopicInput) SetDirectoryId(v string) *DeregisterEventTopicInput { - s.DirectoryId = &v - return s -} - -// SetTopicName sets the TopicName field's value. -func (s *DeregisterEventTopicInput) SetTopicName(v string) *DeregisterEventTopicInput { - s.TopicName = &v - return s -} - -// The result of a DeregisterEventTopic request. -type DeregisterEventTopicOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeregisterEventTopicOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterEventTopicOutput) GoString() string { - return s.String() -} - -// Describes a conditional forwarder. -type DescribeConditionalForwardersInput struct { - _ struct{} `type:"structure"` - - // The directory ID for which to get the list of associated conditional forwarders. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The fully qualified domain names (FQDN) of the remote domains for which to - // get the list of associated conditional forwarders. If this member is null, - // all conditional forwarders are returned. - RemoteDomainNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeConditionalForwardersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConditionalForwardersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeConditionalForwardersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeConditionalForwardersInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DescribeConditionalForwardersInput) SetDirectoryId(v string) *DescribeConditionalForwardersInput { - s.DirectoryId = &v - return s -} - -// SetRemoteDomainNames sets the RemoteDomainNames field's value. -func (s *DescribeConditionalForwardersInput) SetRemoteDomainNames(v []*string) *DescribeConditionalForwardersInput { - s.RemoteDomainNames = v - return s -} - -// The result of a DescribeConditionalForwarder request. -type DescribeConditionalForwardersOutput struct { - _ struct{} `type:"structure"` - - // The list of conditional forwarders that have been created. - ConditionalForwarders []*ConditionalForwarder `type:"list"` -} - -// String returns the string representation -func (s DescribeConditionalForwardersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConditionalForwardersOutput) GoString() string { - return s.String() -} - -// SetConditionalForwarders sets the ConditionalForwarders field's value. -func (s *DescribeConditionalForwardersOutput) SetConditionalForwarders(v []*ConditionalForwarder) *DescribeConditionalForwardersOutput { - s.ConditionalForwarders = v - return s -} - -// Contains the inputs for the DescribeDirectories operation. -type DescribeDirectoriesInput struct { - _ struct{} `type:"structure"` - - // A list of identifiers of the directories for which to obtain the information. - // If this member is null, all directories that belong to the current account - // are returned. - // - // An empty list results in an InvalidParameterException being thrown. - DirectoryIds []*string `type:"list"` - - // The maximum number of items to return. If this value is zero, the maximum - // number of items is specified by the limitations of the operation. - Limit *int64 `type:"integer"` - - // The DescribeDirectoriesResult.NextToken value from a previous call to DescribeDirectories. - // Pass null if this is the first call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDirectoriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDirectoriesInput) GoString() string { - return s.String() -} - -// SetDirectoryIds sets the DirectoryIds field's value. -func (s *DescribeDirectoriesInput) SetDirectoryIds(v []*string) *DescribeDirectoriesInput { - s.DirectoryIds = v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeDirectoriesInput) SetLimit(v int64) *DescribeDirectoriesInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDirectoriesInput) SetNextToken(v string) *DescribeDirectoriesInput { - s.NextToken = &v - return s -} - -// Contains the results of the DescribeDirectories operation. -type DescribeDirectoriesOutput struct { - _ struct{} `type:"structure"` - - // The list of DirectoryDescription objects that were retrieved. - // - // It is possible that this list contains less than the number of items specified - // in the Limit member of the request. This occurs if there are less than the - // requested number of items left to retrieve, or if the limitations of the - // operation have been exceeded. - DirectoryDescriptions []*DirectoryDescription `type:"list"` - - // If not null, more results are available. Pass this value for the NextToken - // parameter in a subsequent call to DescribeDirectories to retrieve the next - // set of items. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDirectoriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDirectoriesOutput) GoString() string { - return s.String() -} - -// SetDirectoryDescriptions sets the DirectoryDescriptions field's value. -func (s *DescribeDirectoriesOutput) SetDirectoryDescriptions(v []*DirectoryDescription) *DescribeDirectoriesOutput { - s.DirectoryDescriptions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDirectoriesOutput) SetNextToken(v string) *DescribeDirectoriesOutput { - s.NextToken = &v - return s -} - -type DescribeDomainControllersInput struct { - _ struct{} `type:"structure"` - - // Identifier of the directory for which to retrieve the domain controller information. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // A list of identifiers for the domain controllers whose information will be - // provided. - DomainControllerIds []*string `type:"list"` - - // The maximum number of items to return. - Limit *int64 `type:"integer"` - - // The DescribeDomainControllers.NextToken value from a previous call to DescribeDomainControllers. - // Pass null if this is the first call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDomainControllersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDomainControllersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDomainControllersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDomainControllersInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DescribeDomainControllersInput) SetDirectoryId(v string) *DescribeDomainControllersInput { - s.DirectoryId = &v - return s -} - -// SetDomainControllerIds sets the DomainControllerIds field's value. -func (s *DescribeDomainControllersInput) SetDomainControllerIds(v []*string) *DescribeDomainControllersInput { - s.DomainControllerIds = v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeDomainControllersInput) SetLimit(v int64) *DescribeDomainControllersInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDomainControllersInput) SetNextToken(v string) *DescribeDomainControllersInput { - s.NextToken = &v - return s -} - -type DescribeDomainControllersOutput struct { - _ struct{} `type:"structure"` - - // List of the DomainController objects that were retrieved. - DomainControllers []*DomainController `type:"list"` - - // If not null, more results are available. Pass this value for the NextToken - // parameter in a subsequent call to DescribeDomainControllers retrieve the - // next set of items. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDomainControllersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDomainControllersOutput) GoString() string { - return s.String() -} - -// SetDomainControllers sets the DomainControllers field's value. -func (s *DescribeDomainControllersOutput) SetDomainControllers(v []*DomainController) *DescribeDomainControllersOutput { - s.DomainControllers = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDomainControllersOutput) SetNextToken(v string) *DescribeDomainControllersOutput { - s.NextToken = &v - return s -} - -// Describes event topics. -type DescribeEventTopicsInput struct { - _ struct{} `type:"structure"` - - // The Directory ID for which to get the list of associated SNS topics. If this - // member is null, associations for all Directory IDs are returned. - DirectoryId *string `type:"string"` - - // A list of SNS topic names for which to obtain the information. If this member - // is null, all associations for the specified Directory ID are returned. - // - // An empty list results in an InvalidParameterException being thrown. - TopicNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeEventTopicsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventTopicsInput) GoString() string { - return s.String() -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DescribeEventTopicsInput) SetDirectoryId(v string) *DescribeEventTopicsInput { - s.DirectoryId = &v - return s -} - -// SetTopicNames sets the TopicNames field's value. -func (s *DescribeEventTopicsInput) SetTopicNames(v []*string) *DescribeEventTopicsInput { - s.TopicNames = v - return s -} - -// The result of a DescribeEventTopic request. -type DescribeEventTopicsOutput struct { - _ struct{} `type:"structure"` - - // A list of SNS topic names that receive status messages from the specified - // Directory ID. - EventTopics []*EventTopic `type:"list"` -} - -// String returns the string representation -func (s DescribeEventTopicsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventTopicsOutput) GoString() string { - return s.String() -} - -// SetEventTopics sets the EventTopics field's value. -func (s *DescribeEventTopicsOutput) SetEventTopics(v []*EventTopic) *DescribeEventTopicsOutput { - s.EventTopics = v - return s -} - -type DescribeSharedDirectoriesInput struct { - _ struct{} `type:"structure"` - - // The number of shared directories to return in the response object. - Limit *int64 `type:"integer"` - - // The DescribeSharedDirectoriesResult.NextToken value from a previous call - // to DescribeSharedDirectories. Pass null if this is the first call. - NextToken *string `type:"string"` - - // Returns the identifier of the directory in the directory owner account. - // - // OwnerDirectoryId is a required field - OwnerDirectoryId *string `type:"string" required:"true"` - - // A list of identifiers of all shared directories in your account. - SharedDirectoryIds []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeSharedDirectoriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSharedDirectoriesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSharedDirectoriesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSharedDirectoriesInput"} - if s.OwnerDirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("OwnerDirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *DescribeSharedDirectoriesInput) SetLimit(v int64) *DescribeSharedDirectoriesInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSharedDirectoriesInput) SetNextToken(v string) *DescribeSharedDirectoriesInput { - s.NextToken = &v - return s -} - -// SetOwnerDirectoryId sets the OwnerDirectoryId field's value. -func (s *DescribeSharedDirectoriesInput) SetOwnerDirectoryId(v string) *DescribeSharedDirectoriesInput { - s.OwnerDirectoryId = &v - return s -} - -// SetSharedDirectoryIds sets the SharedDirectoryIds field's value. -func (s *DescribeSharedDirectoriesInput) SetSharedDirectoryIds(v []*string) *DescribeSharedDirectoriesInput { - s.SharedDirectoryIds = v - return s -} - -type DescribeSharedDirectoriesOutput struct { - _ struct{} `type:"structure"` - - // If not null, token that indicates that more results are available. Pass this - // value for the NextToken parameter in a subsequent call to DescribeSharedDirectories - // to retrieve the next set of items. - NextToken *string `type:"string"` - - // A list of all shared directories in your account. - SharedDirectories []*SharedDirectory `type:"list"` -} - -// String returns the string representation -func (s DescribeSharedDirectoriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSharedDirectoriesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSharedDirectoriesOutput) SetNextToken(v string) *DescribeSharedDirectoriesOutput { - s.NextToken = &v - return s -} - -// SetSharedDirectories sets the SharedDirectories field's value. -func (s *DescribeSharedDirectoriesOutput) SetSharedDirectories(v []*SharedDirectory) *DescribeSharedDirectoriesOutput { - s.SharedDirectories = v - return s -} - -// Contains the inputs for the DescribeSnapshots operation. -type DescribeSnapshotsInput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory for which to retrieve snapshot information. - DirectoryId *string `type:"string"` - - // The maximum number of objects to return. - Limit *int64 `type:"integer"` - - // The DescribeSnapshotsResult.NextToken value from a previous call to DescribeSnapshots. - // Pass null if this is the first call. - NextToken *string `type:"string"` - - // A list of identifiers of the snapshots to obtain the information for. If - // this member is null or empty, all snapshots are returned using the Limit - // and NextToken members. - SnapshotIds []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeSnapshotsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSnapshotsInput) GoString() string { - return s.String() -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DescribeSnapshotsInput) SetDirectoryId(v string) *DescribeSnapshotsInput { - s.DirectoryId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeSnapshotsInput) SetLimit(v int64) *DescribeSnapshotsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSnapshotsInput) SetNextToken(v string) *DescribeSnapshotsInput { - s.NextToken = &v - return s -} - -// SetSnapshotIds sets the SnapshotIds field's value. -func (s *DescribeSnapshotsInput) SetSnapshotIds(v []*string) *DescribeSnapshotsInput { - s.SnapshotIds = v - return s -} - -// Contains the results of the DescribeSnapshots operation. -type DescribeSnapshotsOutput struct { - _ struct{} `type:"structure"` - - // If not null, more results are available. Pass this value in the NextToken - // member of a subsequent call to DescribeSnapshots. - NextToken *string `type:"string"` - - // The list of Snapshot objects that were retrieved. - // - // It is possible that this list contains less than the number of items specified - // in the Limit member of the request. This occurs if there are less than the - // requested number of items left to retrieve, or if the limitations of the - // operation have been exceeded. - Snapshots []*Snapshot `type:"list"` -} - -// String returns the string representation -func (s DescribeSnapshotsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSnapshotsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSnapshotsOutput) SetNextToken(v string) *DescribeSnapshotsOutput { - s.NextToken = &v - return s -} - -// SetSnapshots sets the Snapshots field's value. -func (s *DescribeSnapshotsOutput) SetSnapshots(v []*Snapshot) *DescribeSnapshotsOutput { - s.Snapshots = v - return s -} - -// Describes the trust relationships for a particular AWS Managed Microsoft -// AD directory. If no input parameters are are provided, such as directory -// ID or trust ID, this request describes all the trust relationships. -type DescribeTrustsInput struct { - _ struct{} `type:"structure"` - - // The Directory ID of the AWS directory that is a part of the requested trust - // relationship. - DirectoryId *string `type:"string"` - - // The maximum number of objects to return. - Limit *int64 `type:"integer"` - - // The DescribeTrustsResult.NextToken value from a previous call to DescribeTrusts. - // Pass null if this is the first call. - NextToken *string `type:"string"` - - // A list of identifiers of the trust relationships for which to obtain the - // information. If this member is null, all trust relationships that belong - // to the current account are returned. - // - // An empty list results in an InvalidParameterException being thrown. - TrustIds []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeTrustsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTrustsInput) GoString() string { - return s.String() -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DescribeTrustsInput) SetDirectoryId(v string) *DescribeTrustsInput { - s.DirectoryId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeTrustsInput) SetLimit(v int64) *DescribeTrustsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeTrustsInput) SetNextToken(v string) *DescribeTrustsInput { - s.NextToken = &v - return s -} - -// SetTrustIds sets the TrustIds field's value. -func (s *DescribeTrustsInput) SetTrustIds(v []*string) *DescribeTrustsInput { - s.TrustIds = v - return s -} - -// The result of a DescribeTrust request. -type DescribeTrustsOutput struct { - _ struct{} `type:"structure"` - - // If not null, more results are available. Pass this value for the NextToken - // parameter in a subsequent call to DescribeTrusts to retrieve the next set - // of items. - NextToken *string `type:"string"` - - // The list of Trust objects that were retrieved. - // - // It is possible that this list contains less than the number of items specified - // in the Limit member of the request. This occurs if there are less than the - // requested number of items left to retrieve, or if the limitations of the - // operation have been exceeded. - Trusts []*Trust `type:"list"` -} - -// String returns the string representation -func (s DescribeTrustsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTrustsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeTrustsOutput) SetNextToken(v string) *DescribeTrustsOutput { - s.NextToken = &v - return s -} - -// SetTrusts sets the Trusts field's value. -func (s *DescribeTrustsOutput) SetTrusts(v []*Trust) *DescribeTrustsOutput { - s.Trusts = v - return s -} - -// Contains information for the ConnectDirectory operation when an AD Connector -// directory is being created. -type DirectoryConnectSettings struct { - _ struct{} `type:"structure"` - - // A list of one or more IP addresses of DNS servers or domain controllers in - // the on-premises directory. - // - // CustomerDnsIps is a required field - CustomerDnsIps []*string `type:"list" required:"true"` - - // The user name of an account in the on-premises directory that is used to - // connect to the directory. This account must have the following permissions: - // - // * Read users and groups - // - // * Create computer objects - // - // * Join computers to the domain - // - // CustomerUserName is a required field - CustomerUserName *string `min:"1" type:"string" required:"true"` - - // A list of subnet identifiers in the VPC in which the AD Connector is created. - // - // SubnetIds is a required field - SubnetIds []*string `type:"list" required:"true"` - - // The identifier of the VPC in which the AD Connector is created. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DirectoryConnectSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DirectoryConnectSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DirectoryConnectSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DirectoryConnectSettings"} - if s.CustomerDnsIps == nil { - invalidParams.Add(request.NewErrParamRequired("CustomerDnsIps")) - } - if s.CustomerUserName == nil { - invalidParams.Add(request.NewErrParamRequired("CustomerUserName")) - } - if s.CustomerUserName != nil && len(*s.CustomerUserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CustomerUserName", 1)) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomerDnsIps sets the CustomerDnsIps field's value. -func (s *DirectoryConnectSettings) SetCustomerDnsIps(v []*string) *DirectoryConnectSettings { - s.CustomerDnsIps = v - return s -} - -// SetCustomerUserName sets the CustomerUserName field's value. -func (s *DirectoryConnectSettings) SetCustomerUserName(v string) *DirectoryConnectSettings { - s.CustomerUserName = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *DirectoryConnectSettings) SetSubnetIds(v []*string) *DirectoryConnectSettings { - s.SubnetIds = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DirectoryConnectSettings) SetVpcId(v string) *DirectoryConnectSettings { - s.VpcId = &v - return s -} - -// Contains information about an AD Connector directory. -type DirectoryConnectSettingsDescription struct { - _ struct{} `type:"structure"` - - // A list of the Availability Zones that the directory is in. - AvailabilityZones []*string `type:"list"` - - // The IP addresses of the AD Connector servers. - ConnectIps []*string `type:"list"` - - // The user name of the service account in the on-premises directory. - CustomerUserName *string `min:"1" type:"string"` - - // The security group identifier for the AD Connector directory. - SecurityGroupId *string `type:"string"` - - // A list of subnet identifiers in the VPC that the AD connector is in. - SubnetIds []*string `type:"list"` - - // The identifier of the VPC that the AD Connector is in. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s DirectoryConnectSettingsDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DirectoryConnectSettingsDescription) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DirectoryConnectSettingsDescription) SetAvailabilityZones(v []*string) *DirectoryConnectSettingsDescription { - s.AvailabilityZones = v - return s -} - -// SetConnectIps sets the ConnectIps field's value. -func (s *DirectoryConnectSettingsDescription) SetConnectIps(v []*string) *DirectoryConnectSettingsDescription { - s.ConnectIps = v - return s -} - -// SetCustomerUserName sets the CustomerUserName field's value. -func (s *DirectoryConnectSettingsDescription) SetCustomerUserName(v string) *DirectoryConnectSettingsDescription { - s.CustomerUserName = &v - return s -} - -// SetSecurityGroupId sets the SecurityGroupId field's value. -func (s *DirectoryConnectSettingsDescription) SetSecurityGroupId(v string) *DirectoryConnectSettingsDescription { - s.SecurityGroupId = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *DirectoryConnectSettingsDescription) SetSubnetIds(v []*string) *DirectoryConnectSettingsDescription { - s.SubnetIds = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DirectoryConnectSettingsDescription) SetVpcId(v string) *DirectoryConnectSettingsDescription { - s.VpcId = &v - return s -} - -// Contains information about an AWS Directory Service directory. -type DirectoryDescription struct { - _ struct{} `type:"structure"` - - // The access URL for the directory, such as http://.awsapps.com. If - // no alias has been created for the directory, is the directory identifier, - // such as d-XXXXXXXXXX. - AccessUrl *string `min:"1" type:"string"` - - // The alias for the directory. If no alias has been created for the directory, - // the alias is the directory identifier, such as d-XXXXXXXXXX. - Alias *string `min:"1" type:"string"` - - // A DirectoryConnectSettingsDescription object that contains additional information - // about an AD Connector directory. This member is only present if the directory - // is an AD Connector directory. - ConnectSettings *DirectoryConnectSettingsDescription `type:"structure"` - - // The textual description for the directory. - Description *string `type:"string"` - - // The desired number of domain controllers in the directory if the directory - // is Microsoft AD. - DesiredNumberOfDomainControllers *int64 `min:"2" type:"integer"` - - // The directory identifier. - DirectoryId *string `type:"string"` - - // The IP addresses of the DNS servers for the directory. For a Simple AD or - // Microsoft AD directory, these are the IP addresses of the Simple AD or Microsoft - // AD directory servers. For an AD Connector directory, these are the IP addresses - // of the DNS servers or domain controllers in the on-premises directory to - // which the AD Connector is connected. - DnsIpAddrs []*string `type:"list"` - - // The edition associated with this directory. - Edition *string `type:"string" enum:"DirectoryEdition"` - - // Specifies when the directory was created. - LaunchTime *time.Time `type:"timestamp"` - - // The fully qualified name of the directory. - Name *string `type:"string"` - - // Describes the AWS Managed Microsoft AD directory in the directory owner account. - OwnerDirectoryDescription *OwnerDirectoryDescription `type:"structure"` - - // A RadiusSettings object that contains information about the RADIUS server - // configured for this directory. - RadiusSettings *RadiusSettings `type:"structure"` - - // The status of the RADIUS MFA server connection. - RadiusStatus *string `type:"string" enum:"RadiusStatus"` - - // The method used when sharing a directory to determine whether the directory - // should be shared within your AWS organization (ORGANIZATIONS) or with any - // AWS account by sending a shared directory request (HANDSHAKE). - ShareMethod *string `type:"string" enum:"ShareMethod"` - - // A directory share request that is sent by the directory owner to the directory - // consumer. The request includes a typed message to help the directory consumer - // administrator determine whether to approve or reject the share invitation. - ShareNotes *string `type:"string" sensitive:"true"` - - // Current directory status of the shared AWS Managed Microsoft AD directory. - ShareStatus *string `type:"string" enum:"ShareStatus"` - - // The short name of the directory. - ShortName *string `type:"string"` - - // The directory size. - Size *string `type:"string" enum:"DirectorySize"` - - // Indicates if single sign-on is enabled for the directory. For more information, - // see EnableSso and DisableSso. - SsoEnabled *bool `type:"boolean"` - - // The current stage of the directory. - Stage *string `type:"string" enum:"DirectoryStage"` - - // The date and time that the stage was last updated. - StageLastUpdatedDateTime *time.Time `type:"timestamp"` - - // Additional information about the directory stage. - StageReason *string `type:"string"` - - // The directory size. - Type *string `type:"string" enum:"DirectoryType"` - - // A DirectoryVpcSettingsDescription object that contains additional information - // about a directory. This member is only present if the directory is a Simple - // AD or Managed AD directory. - VpcSettings *DirectoryVpcSettingsDescription `type:"structure"` -} - -// String returns the string representation -func (s DirectoryDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DirectoryDescription) GoString() string { - return s.String() -} - -// SetAccessUrl sets the AccessUrl field's value. -func (s *DirectoryDescription) SetAccessUrl(v string) *DirectoryDescription { - s.AccessUrl = &v - return s -} - -// SetAlias sets the Alias field's value. -func (s *DirectoryDescription) SetAlias(v string) *DirectoryDescription { - s.Alias = &v - return s -} - -// SetConnectSettings sets the ConnectSettings field's value. -func (s *DirectoryDescription) SetConnectSettings(v *DirectoryConnectSettingsDescription) *DirectoryDescription { - s.ConnectSettings = v - return s -} - -// SetDescription sets the Description field's value. -func (s *DirectoryDescription) SetDescription(v string) *DirectoryDescription { - s.Description = &v - return s -} - -// SetDesiredNumberOfDomainControllers sets the DesiredNumberOfDomainControllers field's value. -func (s *DirectoryDescription) SetDesiredNumberOfDomainControllers(v int64) *DirectoryDescription { - s.DesiredNumberOfDomainControllers = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DirectoryDescription) SetDirectoryId(v string) *DirectoryDescription { - s.DirectoryId = &v - return s -} - -// SetDnsIpAddrs sets the DnsIpAddrs field's value. -func (s *DirectoryDescription) SetDnsIpAddrs(v []*string) *DirectoryDescription { - s.DnsIpAddrs = v - return s -} - -// SetEdition sets the Edition field's value. -func (s *DirectoryDescription) SetEdition(v string) *DirectoryDescription { - s.Edition = &v - return s -} - -// SetLaunchTime sets the LaunchTime field's value. -func (s *DirectoryDescription) SetLaunchTime(v time.Time) *DirectoryDescription { - s.LaunchTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *DirectoryDescription) SetName(v string) *DirectoryDescription { - s.Name = &v - return s -} - -// SetOwnerDirectoryDescription sets the OwnerDirectoryDescription field's value. -func (s *DirectoryDescription) SetOwnerDirectoryDescription(v *OwnerDirectoryDescription) *DirectoryDescription { - s.OwnerDirectoryDescription = v - return s -} - -// SetRadiusSettings sets the RadiusSettings field's value. -func (s *DirectoryDescription) SetRadiusSettings(v *RadiusSettings) *DirectoryDescription { - s.RadiusSettings = v - return s -} - -// SetRadiusStatus sets the RadiusStatus field's value. -func (s *DirectoryDescription) SetRadiusStatus(v string) *DirectoryDescription { - s.RadiusStatus = &v - return s -} - -// SetShareMethod sets the ShareMethod field's value. -func (s *DirectoryDescription) SetShareMethod(v string) *DirectoryDescription { - s.ShareMethod = &v - return s -} - -// SetShareNotes sets the ShareNotes field's value. -func (s *DirectoryDescription) SetShareNotes(v string) *DirectoryDescription { - s.ShareNotes = &v - return s -} - -// SetShareStatus sets the ShareStatus field's value. -func (s *DirectoryDescription) SetShareStatus(v string) *DirectoryDescription { - s.ShareStatus = &v - return s -} - -// SetShortName sets the ShortName field's value. -func (s *DirectoryDescription) SetShortName(v string) *DirectoryDescription { - s.ShortName = &v - return s -} - -// SetSize sets the Size field's value. -func (s *DirectoryDescription) SetSize(v string) *DirectoryDescription { - s.Size = &v - return s -} - -// SetSsoEnabled sets the SsoEnabled field's value. -func (s *DirectoryDescription) SetSsoEnabled(v bool) *DirectoryDescription { - s.SsoEnabled = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *DirectoryDescription) SetStage(v string) *DirectoryDescription { - s.Stage = &v - return s -} - -// SetStageLastUpdatedDateTime sets the StageLastUpdatedDateTime field's value. -func (s *DirectoryDescription) SetStageLastUpdatedDateTime(v time.Time) *DirectoryDescription { - s.StageLastUpdatedDateTime = &v - return s -} - -// SetStageReason sets the StageReason field's value. -func (s *DirectoryDescription) SetStageReason(v string) *DirectoryDescription { - s.StageReason = &v - return s -} - -// SetType sets the Type field's value. -func (s *DirectoryDescription) SetType(v string) *DirectoryDescription { - s.Type = &v - return s -} - -// SetVpcSettings sets the VpcSettings field's value. -func (s *DirectoryDescription) SetVpcSettings(v *DirectoryVpcSettingsDescription) *DirectoryDescription { - s.VpcSettings = v - return s -} - -// Contains directory limit information for a region. -type DirectoryLimits struct { - _ struct{} `type:"structure"` - - // The current number of cloud directories in the region. - CloudOnlyDirectoriesCurrentCount *int64 `type:"integer"` - - // The maximum number of cloud directories allowed in the region. - CloudOnlyDirectoriesLimit *int64 `type:"integer"` - - // Indicates if the cloud directory limit has been reached. - CloudOnlyDirectoriesLimitReached *bool `type:"boolean"` - - // The current number of AWS Managed Microsoft AD directories in the region. - CloudOnlyMicrosoftADCurrentCount *int64 `type:"integer"` - - // The maximum number of AWS Managed Microsoft AD directories allowed in the - // region. - CloudOnlyMicrosoftADLimit *int64 `type:"integer"` - - // Indicates if the AWS Managed Microsoft AD directory limit has been reached. - CloudOnlyMicrosoftADLimitReached *bool `type:"boolean"` - - // The current number of connected directories in the region. - ConnectedDirectoriesCurrentCount *int64 `type:"integer"` - - // The maximum number of connected directories allowed in the region. - ConnectedDirectoriesLimit *int64 `type:"integer"` - - // Indicates if the connected directory limit has been reached. - ConnectedDirectoriesLimitReached *bool `type:"boolean"` -} - -// String returns the string representation -func (s DirectoryLimits) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DirectoryLimits) GoString() string { - return s.String() -} - -// SetCloudOnlyDirectoriesCurrentCount sets the CloudOnlyDirectoriesCurrentCount field's value. -func (s *DirectoryLimits) SetCloudOnlyDirectoriesCurrentCount(v int64) *DirectoryLimits { - s.CloudOnlyDirectoriesCurrentCount = &v - return s -} - -// SetCloudOnlyDirectoriesLimit sets the CloudOnlyDirectoriesLimit field's value. -func (s *DirectoryLimits) SetCloudOnlyDirectoriesLimit(v int64) *DirectoryLimits { - s.CloudOnlyDirectoriesLimit = &v - return s -} - -// SetCloudOnlyDirectoriesLimitReached sets the CloudOnlyDirectoriesLimitReached field's value. -func (s *DirectoryLimits) SetCloudOnlyDirectoriesLimitReached(v bool) *DirectoryLimits { - s.CloudOnlyDirectoriesLimitReached = &v - return s -} - -// SetCloudOnlyMicrosoftADCurrentCount sets the CloudOnlyMicrosoftADCurrentCount field's value. -func (s *DirectoryLimits) SetCloudOnlyMicrosoftADCurrentCount(v int64) *DirectoryLimits { - s.CloudOnlyMicrosoftADCurrentCount = &v - return s -} - -// SetCloudOnlyMicrosoftADLimit sets the CloudOnlyMicrosoftADLimit field's value. -func (s *DirectoryLimits) SetCloudOnlyMicrosoftADLimit(v int64) *DirectoryLimits { - s.CloudOnlyMicrosoftADLimit = &v - return s -} - -// SetCloudOnlyMicrosoftADLimitReached sets the CloudOnlyMicrosoftADLimitReached field's value. -func (s *DirectoryLimits) SetCloudOnlyMicrosoftADLimitReached(v bool) *DirectoryLimits { - s.CloudOnlyMicrosoftADLimitReached = &v - return s -} - -// SetConnectedDirectoriesCurrentCount sets the ConnectedDirectoriesCurrentCount field's value. -func (s *DirectoryLimits) SetConnectedDirectoriesCurrentCount(v int64) *DirectoryLimits { - s.ConnectedDirectoriesCurrentCount = &v - return s -} - -// SetConnectedDirectoriesLimit sets the ConnectedDirectoriesLimit field's value. -func (s *DirectoryLimits) SetConnectedDirectoriesLimit(v int64) *DirectoryLimits { - s.ConnectedDirectoriesLimit = &v - return s -} - -// SetConnectedDirectoriesLimitReached sets the ConnectedDirectoriesLimitReached field's value. -func (s *DirectoryLimits) SetConnectedDirectoriesLimitReached(v bool) *DirectoryLimits { - s.ConnectedDirectoriesLimitReached = &v - return s -} - -// Contains VPC information for the CreateDirectory or CreateMicrosoftAD operation. -type DirectoryVpcSettings struct { - _ struct{} `type:"structure"` - - // The identifiers of the subnets for the directory servers. The two subnets - // must be in different Availability Zones. AWS Directory Service creates a - // directory server and a DNS server in each of these subnets. - // - // SubnetIds is a required field - SubnetIds []*string `type:"list" required:"true"` - - // The identifier of the VPC in which to create the directory. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DirectoryVpcSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DirectoryVpcSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DirectoryVpcSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DirectoryVpcSettings"} - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *DirectoryVpcSettings) SetSubnetIds(v []*string) *DirectoryVpcSettings { - s.SubnetIds = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DirectoryVpcSettings) SetVpcId(v string) *DirectoryVpcSettings { - s.VpcId = &v - return s -} - -// Contains information about the directory. -type DirectoryVpcSettingsDescription struct { - _ struct{} `type:"structure"` - - // The list of Availability Zones that the directory is in. - AvailabilityZones []*string `type:"list"` - - // The domain controller security group identifier for the directory. - SecurityGroupId *string `type:"string"` - - // The identifiers of the subnets for the directory servers. - SubnetIds []*string `type:"list"` - - // The identifier of the VPC that the directory is in. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s DirectoryVpcSettingsDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DirectoryVpcSettingsDescription) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DirectoryVpcSettingsDescription) SetAvailabilityZones(v []*string) *DirectoryVpcSettingsDescription { - s.AvailabilityZones = v - return s -} - -// SetSecurityGroupId sets the SecurityGroupId field's value. -func (s *DirectoryVpcSettingsDescription) SetSecurityGroupId(v string) *DirectoryVpcSettingsDescription { - s.SecurityGroupId = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *DirectoryVpcSettingsDescription) SetSubnetIds(v []*string) *DirectoryVpcSettingsDescription { - s.SubnetIds = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DirectoryVpcSettingsDescription) SetVpcId(v string) *DirectoryVpcSettingsDescription { - s.VpcId = &v - return s -} - -// Contains the inputs for the DisableRadius operation. -type DisableRadiusInput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory for which to disable MFA. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableRadiusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableRadiusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableRadiusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableRadiusInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DisableRadiusInput) SetDirectoryId(v string) *DisableRadiusInput { - s.DirectoryId = &v - return s -} - -// Contains the results of the DisableRadius operation. -type DisableRadiusOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableRadiusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableRadiusOutput) GoString() string { - return s.String() -} - -// Contains the inputs for the DisableSso operation. -type DisableSsoInput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory for which to disable single-sign on. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The password of an alternate account to use to disable single-sign on. This - // is only used for AD Connector directories. For more information, see the - // UserName parameter. - Password *string `min:"1" type:"string" sensitive:"true"` - - // The username of an alternate account to use to disable single-sign on. This - // is only used for AD Connector directories. This account must have privileges - // to remove a service principal name. - // - // If the AD Connector service account does not have privileges to remove a - // service principal name, you can specify an alternate account with the UserName - // and Password parameters. These credentials are only used to disable single - // sign-on and are not stored by the service. The AD Connector service account - // is not changed. - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DisableSsoInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableSsoInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableSsoInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableSsoInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.Password != nil && len(*s.Password) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Password", 1)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DisableSsoInput) SetDirectoryId(v string) *DisableSsoInput { - s.DirectoryId = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *DisableSsoInput) SetPassword(v string) *DisableSsoInput { - s.Password = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DisableSsoInput) SetUserName(v string) *DisableSsoInput { - s.UserName = &v - return s -} - -// Contains the results of the DisableSso operation. -type DisableSsoOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableSsoOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableSsoOutput) GoString() string { - return s.String() -} - -// Contains information about the domain controllers for a specified directory. -type DomainController struct { - _ struct{} `type:"structure"` - - // The Availability Zone where the domain controller is located. - AvailabilityZone *string `type:"string"` - - // Identifier of the directory where the domain controller resides. - DirectoryId *string `type:"string"` - - // The IP address of the domain controller. - DnsIpAddr *string `type:"string"` - - // Identifies a specific domain controller in the directory. - DomainControllerId *string `type:"string"` - - // Specifies when the domain controller was created. - LaunchTime *time.Time `type:"timestamp"` - - // The status of the domain controller. - Status *string `type:"string" enum:"DomainControllerStatus"` - - // The date and time that the status was last updated. - StatusLastUpdatedDateTime *time.Time `type:"timestamp"` - - // A description of the domain controller state. - StatusReason *string `type:"string"` - - // Identifier of the subnet in the VPC that contains the domain controller. - SubnetId *string `type:"string"` - - // The identifier of the VPC that contains the domain controller. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s DomainController) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainController) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *DomainController) SetAvailabilityZone(v string) *DomainController { - s.AvailabilityZone = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DomainController) SetDirectoryId(v string) *DomainController { - s.DirectoryId = &v - return s -} - -// SetDnsIpAddr sets the DnsIpAddr field's value. -func (s *DomainController) SetDnsIpAddr(v string) *DomainController { - s.DnsIpAddr = &v - return s -} - -// SetDomainControllerId sets the DomainControllerId field's value. -func (s *DomainController) SetDomainControllerId(v string) *DomainController { - s.DomainControllerId = &v - return s -} - -// SetLaunchTime sets the LaunchTime field's value. -func (s *DomainController) SetLaunchTime(v time.Time) *DomainController { - s.LaunchTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DomainController) SetStatus(v string) *DomainController { - s.Status = &v - return s -} - -// SetStatusLastUpdatedDateTime sets the StatusLastUpdatedDateTime field's value. -func (s *DomainController) SetStatusLastUpdatedDateTime(v time.Time) *DomainController { - s.StatusLastUpdatedDateTime = &v - return s -} - -// SetStatusReason sets the StatusReason field's value. -func (s *DomainController) SetStatusReason(v string) *DomainController { - s.StatusReason = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *DomainController) SetSubnetId(v string) *DomainController { - s.SubnetId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DomainController) SetVpcId(v string) *DomainController { - s.VpcId = &v - return s -} - -// Contains the inputs for the EnableRadius operation. -type EnableRadiusInput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory for which to enable MFA. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // A RadiusSettings object that contains information about the RADIUS server. - // - // RadiusSettings is a required field - RadiusSettings *RadiusSettings `type:"structure" required:"true"` -} - -// String returns the string representation -func (s EnableRadiusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableRadiusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableRadiusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableRadiusInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.RadiusSettings == nil { - invalidParams.Add(request.NewErrParamRequired("RadiusSettings")) - } - if s.RadiusSettings != nil { - if err := s.RadiusSettings.Validate(); err != nil { - invalidParams.AddNested("RadiusSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *EnableRadiusInput) SetDirectoryId(v string) *EnableRadiusInput { - s.DirectoryId = &v - return s -} - -// SetRadiusSettings sets the RadiusSettings field's value. -func (s *EnableRadiusInput) SetRadiusSettings(v *RadiusSettings) *EnableRadiusInput { - s.RadiusSettings = v - return s -} - -// Contains the results of the EnableRadius operation. -type EnableRadiusOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableRadiusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableRadiusOutput) GoString() string { - return s.String() -} - -// Contains the inputs for the EnableSso operation. -type EnableSsoInput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory for which to enable single-sign on. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The password of an alternate account to use to enable single-sign on. This - // is only used for AD Connector directories. For more information, see the - // UserName parameter. - Password *string `min:"1" type:"string" sensitive:"true"` - - // The username of an alternate account to use to enable single-sign on. This - // is only used for AD Connector directories. This account must have privileges - // to add a service principal name. - // - // If the AD Connector service account does not have privileges to add a service - // principal name, you can specify an alternate account with the UserName and - // Password parameters. These credentials are only used to enable single sign-on - // and are not stored by the service. The AD Connector service account is not - // changed. - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s EnableSsoInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableSsoInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableSsoInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableSsoInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.Password != nil && len(*s.Password) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Password", 1)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *EnableSsoInput) SetDirectoryId(v string) *EnableSsoInput { - s.DirectoryId = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *EnableSsoInput) SetPassword(v string) *EnableSsoInput { - s.Password = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *EnableSsoInput) SetUserName(v string) *EnableSsoInput { - s.UserName = &v - return s -} - -// Contains the results of the EnableSso operation. -type EnableSsoOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableSsoOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableSsoOutput) GoString() string { - return s.String() -} - -// Information about SNS topic and AWS Directory Service directory associations. -type EventTopic struct { - _ struct{} `type:"structure"` - - // The date and time of when you associated your directory with the SNS topic. - CreatedDateTime *time.Time `type:"timestamp"` - - // The Directory ID of an AWS Directory Service directory that will publish - // status messages to an SNS topic. - DirectoryId *string `type:"string"` - - // The topic registration status. - Status *string `type:"string" enum:"TopicStatus"` - - // The SNS topic ARN (Amazon Resource Name). - TopicArn *string `type:"string"` - - // The name of an AWS SNS topic the receives status messages from the directory. - TopicName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s EventTopic) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventTopic) GoString() string { - return s.String() -} - -// SetCreatedDateTime sets the CreatedDateTime field's value. -func (s *EventTopic) SetCreatedDateTime(v time.Time) *EventTopic { - s.CreatedDateTime = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *EventTopic) SetDirectoryId(v string) *EventTopic { - s.DirectoryId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *EventTopic) SetStatus(v string) *EventTopic { - s.Status = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *EventTopic) SetTopicArn(v string) *EventTopic { - s.TopicArn = &v - return s -} - -// SetTopicName sets the TopicName field's value. -func (s *EventTopic) SetTopicName(v string) *EventTopic { - s.TopicName = &v - return s -} - -// Contains the inputs for the GetDirectoryLimits operation. -type GetDirectoryLimitsInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetDirectoryLimitsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDirectoryLimitsInput) GoString() string { - return s.String() -} - -// Contains the results of the GetDirectoryLimits operation. -type GetDirectoryLimitsOutput struct { - _ struct{} `type:"structure"` - - // A DirectoryLimits object that contains the directory limits for the current - // region. - DirectoryLimits *DirectoryLimits `type:"structure"` -} - -// String returns the string representation -func (s GetDirectoryLimitsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDirectoryLimitsOutput) GoString() string { - return s.String() -} - -// SetDirectoryLimits sets the DirectoryLimits field's value. -func (s *GetDirectoryLimitsOutput) SetDirectoryLimits(v *DirectoryLimits) *GetDirectoryLimitsOutput { - s.DirectoryLimits = v - return s -} - -// Contains the inputs for the GetSnapshotLimits operation. -type GetSnapshotLimitsInput struct { - _ struct{} `type:"structure"` - - // Contains the identifier of the directory to obtain the limits for. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSnapshotLimitsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSnapshotLimitsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSnapshotLimitsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSnapshotLimitsInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *GetSnapshotLimitsInput) SetDirectoryId(v string) *GetSnapshotLimitsInput { - s.DirectoryId = &v - return s -} - -// Contains the results of the GetSnapshotLimits operation. -type GetSnapshotLimitsOutput struct { - _ struct{} `type:"structure"` - - // A SnapshotLimits object that contains the manual snapshot limits for the - // specified directory. - SnapshotLimits *SnapshotLimits `type:"structure"` -} - -// String returns the string representation -func (s GetSnapshotLimitsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSnapshotLimitsOutput) GoString() string { - return s.String() -} - -// SetSnapshotLimits sets the SnapshotLimits field's value. -func (s *GetSnapshotLimitsOutput) SetSnapshotLimits(v *SnapshotLimits) *GetSnapshotLimitsOutput { - s.SnapshotLimits = v - return s -} - -// IP address block. This is often the address block of the DNS server used -// for your on-premises domain. -type IpRoute struct { - _ struct{} `type:"structure"` - - // IP address block using CIDR format, for example 10.0.0.0/24. This is often - // the address block of the DNS server used for your on-premises domain. For - // a single IP address use a CIDR address block with /32. For example 10.0.0.0/32. - CidrIp *string `type:"string"` - - // Description of the address block. - Description *string `type:"string"` -} - -// String returns the string representation -func (s IpRoute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IpRoute) GoString() string { - return s.String() -} - -// SetCidrIp sets the CidrIp field's value. -func (s *IpRoute) SetCidrIp(v string) *IpRoute { - s.CidrIp = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *IpRoute) SetDescription(v string) *IpRoute { - s.Description = &v - return s -} - -// Information about one or more IP address blocks. -type IpRouteInfo struct { - _ struct{} `type:"structure"` - - // The date and time the address block was added to the directory. - AddedDateTime *time.Time `type:"timestamp"` - - // IP address block in the IpRoute. - CidrIp *string `type:"string"` - - // Description of the IpRouteInfo. - Description *string `type:"string"` - - // Identifier (ID) of the directory associated with the IP addresses. - DirectoryId *string `type:"string"` - - // The status of the IP address block. - IpRouteStatusMsg *string `type:"string" enum:"IpRouteStatusMsg"` - - // The reason for the IpRouteStatusMsg. - IpRouteStatusReason *string `type:"string"` -} - -// String returns the string representation -func (s IpRouteInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IpRouteInfo) GoString() string { - return s.String() -} - -// SetAddedDateTime sets the AddedDateTime field's value. -func (s *IpRouteInfo) SetAddedDateTime(v time.Time) *IpRouteInfo { - s.AddedDateTime = &v - return s -} - -// SetCidrIp sets the CidrIp field's value. -func (s *IpRouteInfo) SetCidrIp(v string) *IpRouteInfo { - s.CidrIp = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *IpRouteInfo) SetDescription(v string) *IpRouteInfo { - s.Description = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *IpRouteInfo) SetDirectoryId(v string) *IpRouteInfo { - s.DirectoryId = &v - return s -} - -// SetIpRouteStatusMsg sets the IpRouteStatusMsg field's value. -func (s *IpRouteInfo) SetIpRouteStatusMsg(v string) *IpRouteInfo { - s.IpRouteStatusMsg = &v - return s -} - -// SetIpRouteStatusReason sets the IpRouteStatusReason field's value. -func (s *IpRouteInfo) SetIpRouteStatusReason(v string) *IpRouteInfo { - s.IpRouteStatusReason = &v - return s -} - -type ListIpRoutesInput struct { - _ struct{} `type:"structure"` - - // Identifier (ID) of the directory for which you want to retrieve the IP addresses. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // Maximum number of items to return. If this value is zero, the maximum number - // of items is specified by the limitations of the operation. - Limit *int64 `type:"integer"` - - // The ListIpRoutes.NextToken value from a previous call to ListIpRoutes. Pass - // null if this is the first call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListIpRoutesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIpRoutesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListIpRoutesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListIpRoutesInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *ListIpRoutesInput) SetDirectoryId(v string) *ListIpRoutesInput { - s.DirectoryId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListIpRoutesInput) SetLimit(v int64) *ListIpRoutesInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListIpRoutesInput) SetNextToken(v string) *ListIpRoutesInput { - s.NextToken = &v - return s -} - -type ListIpRoutesOutput struct { - _ struct{} `type:"structure"` - - // A list of IpRoutes. - IpRoutesInfo []*IpRouteInfo `type:"list"` - - // If not null, more results are available. Pass this value for the NextToken - // parameter in a subsequent call to ListIpRoutes to retrieve the next set of - // items. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListIpRoutesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIpRoutesOutput) GoString() string { - return s.String() -} - -// SetIpRoutesInfo sets the IpRoutesInfo field's value. -func (s *ListIpRoutesOutput) SetIpRoutesInfo(v []*IpRouteInfo) *ListIpRoutesOutput { - s.IpRoutesInfo = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListIpRoutesOutput) SetNextToken(v string) *ListIpRoutesOutput { - s.NextToken = &v - return s -} - -type ListLogSubscriptionsInput struct { - _ struct{} `type:"structure"` - - // If a DirectoryID is provided, lists only the log subscription associated - // with that directory. If no DirectoryId is provided, lists all log subscriptions - // associated with your AWS account. If there are no log subscriptions for the - // AWS account or the directory, an empty list will be returned. - DirectoryId *string `type:"string"` - - // The maximum number of items returned. - Limit *int64 `type:"integer"` - - // The token for the next set of items to return. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListLogSubscriptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLogSubscriptionsInput) GoString() string { - return s.String() -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *ListLogSubscriptionsInput) SetDirectoryId(v string) *ListLogSubscriptionsInput { - s.DirectoryId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListLogSubscriptionsInput) SetLimit(v int64) *ListLogSubscriptionsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListLogSubscriptionsInput) SetNextToken(v string) *ListLogSubscriptionsInput { - s.NextToken = &v - return s -} - -type ListLogSubscriptionsOutput struct { - _ struct{} `type:"structure"` - - // A list of active LogSubscription objects for calling the AWS account. - LogSubscriptions []*LogSubscription `type:"list"` - - // The token for the next set of items to return. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListLogSubscriptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLogSubscriptionsOutput) GoString() string { - return s.String() -} - -// SetLogSubscriptions sets the LogSubscriptions field's value. -func (s *ListLogSubscriptionsOutput) SetLogSubscriptions(v []*LogSubscription) *ListLogSubscriptionsOutput { - s.LogSubscriptions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListLogSubscriptionsOutput) SetNextToken(v string) *ListLogSubscriptionsOutput { - s.NextToken = &v - return s -} - -type ListSchemaExtensionsInput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory from which to retrieve the schema extension - // information. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The maximum number of items to return. - Limit *int64 `type:"integer"` - - // The ListSchemaExtensions.NextToken value from a previous call to ListSchemaExtensions. - // Pass null if this is the first call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListSchemaExtensionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSchemaExtensionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSchemaExtensionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSchemaExtensionsInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *ListSchemaExtensionsInput) SetDirectoryId(v string) *ListSchemaExtensionsInput { - s.DirectoryId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListSchemaExtensionsInput) SetLimit(v int64) *ListSchemaExtensionsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSchemaExtensionsInput) SetNextToken(v string) *ListSchemaExtensionsInput { - s.NextToken = &v - return s -} - -type ListSchemaExtensionsOutput struct { - _ struct{} `type:"structure"` - - // If not null, more results are available. Pass this value for the NextToken - // parameter in a subsequent call to ListSchemaExtensions to retrieve the next - // set of items. - NextToken *string `type:"string"` - - // Information about the schema extensions applied to the directory. - SchemaExtensionsInfo []*SchemaExtensionInfo `type:"list"` -} - -// String returns the string representation -func (s ListSchemaExtensionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSchemaExtensionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSchemaExtensionsOutput) SetNextToken(v string) *ListSchemaExtensionsOutput { - s.NextToken = &v - return s -} - -// SetSchemaExtensionsInfo sets the SchemaExtensionsInfo field's value. -func (s *ListSchemaExtensionsOutput) SetSchemaExtensionsInfo(v []*SchemaExtensionInfo) *ListSchemaExtensionsOutput { - s.SchemaExtensionsInfo = v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // Reserved for future use. - Limit *int64 `type:"integer"` - - // Reserved for future use. - NextToken *string `type:"string"` - - // Identifier (ID) of the directory for which you want to retrieve tags. - // - // ResourceId is a required field - ResourceId *string `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.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListTagsForResourceInput) SetLimit(v int64) *ListTagsForResourceInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { - s.NextToken = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ListTagsForResourceInput) SetResourceId(v string) *ListTagsForResourceInput { - s.ResourceId = &v - return s -} - -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // Reserved for future use. - NextToken *string `type:"string"` - - // List of tags returned by the ListTagsForResource operation. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { - s.NextToken = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -// Represents a log subscription, which tracks real-time data from a chosen -// log group to a specified destination. -type LogSubscription struct { - _ struct{} `type:"structure"` - - // Identifier (ID) of the directory that you want to associate with the log - // subscription. - DirectoryId *string `type:"string"` - - // The name of the log group. - LogGroupName *string `min:"1" type:"string"` - - // The date and time that the log subscription was created. - SubscriptionCreatedDateTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s LogSubscription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LogSubscription) GoString() string { - return s.String() -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *LogSubscription) SetDirectoryId(v string) *LogSubscription { - s.DirectoryId = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *LogSubscription) SetLogGroupName(v string) *LogSubscription { - s.LogGroupName = &v - return s -} - -// SetSubscriptionCreatedDateTime sets the SubscriptionCreatedDateTime field's value. -func (s *LogSubscription) SetSubscriptionCreatedDateTime(v time.Time) *LogSubscription { - s.SubscriptionCreatedDateTime = &v - return s -} - -// Describes the directory owner account details that have been shared to the -// directory consumer account. -type OwnerDirectoryDescription struct { - _ struct{} `type:"structure"` - - // Identifier of the directory owner account. - AccountId *string `type:"string"` - - // Identifier of the AWS Managed Microsoft AD directory in the directory owner - // account. - DirectoryId *string `type:"string"` - - // IP address of the directory’s domain controllers. - DnsIpAddrs []*string `type:"list"` - - // A RadiusSettings object that contains information about the RADIUS server. - RadiusSettings *RadiusSettings `type:"structure"` - - // Information about the status of the RADIUS server. - RadiusStatus *string `type:"string" enum:"RadiusStatus"` - - // Information about the VPC settings for the directory. - VpcSettings *DirectoryVpcSettingsDescription `type:"structure"` -} - -// String returns the string representation -func (s OwnerDirectoryDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OwnerDirectoryDescription) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *OwnerDirectoryDescription) SetAccountId(v string) *OwnerDirectoryDescription { - s.AccountId = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *OwnerDirectoryDescription) SetDirectoryId(v string) *OwnerDirectoryDescription { - s.DirectoryId = &v - return s -} - -// SetDnsIpAddrs sets the DnsIpAddrs field's value. -func (s *OwnerDirectoryDescription) SetDnsIpAddrs(v []*string) *OwnerDirectoryDescription { - s.DnsIpAddrs = v - return s -} - -// SetRadiusSettings sets the RadiusSettings field's value. -func (s *OwnerDirectoryDescription) SetRadiusSettings(v *RadiusSettings) *OwnerDirectoryDescription { - s.RadiusSettings = v - return s -} - -// SetRadiusStatus sets the RadiusStatus field's value. -func (s *OwnerDirectoryDescription) SetRadiusStatus(v string) *OwnerDirectoryDescription { - s.RadiusStatus = &v - return s -} - -// SetVpcSettings sets the VpcSettings field's value. -func (s *OwnerDirectoryDescription) SetVpcSettings(v *DirectoryVpcSettingsDescription) *OwnerDirectoryDescription { - s.VpcSettings = v - return s -} - -// Contains information about a Remote Authentication Dial In User Service (RADIUS) -// server. -type RadiusSettings struct { - _ struct{} `type:"structure"` - - // The protocol specified for your RADIUS endpoints. - AuthenticationProtocol *string `type:"string" enum:"RadiusAuthenticationProtocol"` - - // Not currently used. - DisplayLabel *string `min:"1" type:"string"` - - // The port that your RADIUS server is using for communications. Your on-premises - // network must allow inbound traffic over this port from the AWS Directory - // Service servers. - RadiusPort *int64 `min:"1025" type:"integer"` - - // The maximum number of times that communication with the RADIUS server is - // attempted. - RadiusRetries *int64 `type:"integer"` - - // An array of strings that contains the IP addresses of the RADIUS server endpoints, - // or the IP addresses of your RADIUS server load balancer. - RadiusServers []*string `type:"list"` - - // The amount of time, in seconds, to wait for the RADIUS server to respond. - RadiusTimeout *int64 `min:"1" type:"integer"` - - // Required for enabling RADIUS on the directory. - SharedSecret *string `min:"8" type:"string" sensitive:"true"` - - // Not currently used. - UseSameUsername *bool `type:"boolean"` -} - -// String returns the string representation -func (s RadiusSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RadiusSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RadiusSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RadiusSettings"} - if s.DisplayLabel != nil && len(*s.DisplayLabel) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DisplayLabel", 1)) - } - if s.RadiusPort != nil && *s.RadiusPort < 1025 { - invalidParams.Add(request.NewErrParamMinValue("RadiusPort", 1025)) - } - if s.RadiusTimeout != nil && *s.RadiusTimeout < 1 { - invalidParams.Add(request.NewErrParamMinValue("RadiusTimeout", 1)) - } - if s.SharedSecret != nil && len(*s.SharedSecret) < 8 { - invalidParams.Add(request.NewErrParamMinLen("SharedSecret", 8)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticationProtocol sets the AuthenticationProtocol field's value. -func (s *RadiusSettings) SetAuthenticationProtocol(v string) *RadiusSettings { - s.AuthenticationProtocol = &v - return s -} - -// SetDisplayLabel sets the DisplayLabel field's value. -func (s *RadiusSettings) SetDisplayLabel(v string) *RadiusSettings { - s.DisplayLabel = &v - return s -} - -// SetRadiusPort sets the RadiusPort field's value. -func (s *RadiusSettings) SetRadiusPort(v int64) *RadiusSettings { - s.RadiusPort = &v - return s -} - -// SetRadiusRetries sets the RadiusRetries field's value. -func (s *RadiusSettings) SetRadiusRetries(v int64) *RadiusSettings { - s.RadiusRetries = &v - return s -} - -// SetRadiusServers sets the RadiusServers field's value. -func (s *RadiusSettings) SetRadiusServers(v []*string) *RadiusSettings { - s.RadiusServers = v - return s -} - -// SetRadiusTimeout sets the RadiusTimeout field's value. -func (s *RadiusSettings) SetRadiusTimeout(v int64) *RadiusSettings { - s.RadiusTimeout = &v - return s -} - -// SetSharedSecret sets the SharedSecret field's value. -func (s *RadiusSettings) SetSharedSecret(v string) *RadiusSettings { - s.SharedSecret = &v - return s -} - -// SetUseSameUsername sets the UseSameUsername field's value. -func (s *RadiusSettings) SetUseSameUsername(v bool) *RadiusSettings { - s.UseSameUsername = &v - return s -} - -// Registers a new event topic. -type RegisterEventTopicInput struct { - _ struct{} `type:"structure"` - - // The Directory ID that will publish status messages to the SNS topic. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The SNS topic name to which the directory will publish status messages. This - // SNS topic must be in the same region as the specified Directory ID. - // - // TopicName is a required field - TopicName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterEventTopicInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterEventTopicInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterEventTopicInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterEventTopicInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.TopicName == nil { - invalidParams.Add(request.NewErrParamRequired("TopicName")) - } - if s.TopicName != nil && len(*s.TopicName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TopicName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *RegisterEventTopicInput) SetDirectoryId(v string) *RegisterEventTopicInput { - s.DirectoryId = &v - return s -} - -// SetTopicName sets the TopicName field's value. -func (s *RegisterEventTopicInput) SetTopicName(v string) *RegisterEventTopicInput { - s.TopicName = &v - return s -} - -// The result of a RegisterEventTopic request. -type RegisterEventTopicOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RegisterEventTopicOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterEventTopicOutput) GoString() string { - return s.String() -} - -type RejectSharedDirectoryInput struct { - _ struct{} `type:"structure"` - - // Identifier of the shared directory in the directory consumer account. This - // identifier is different for each directory owner account. - // - // SharedDirectoryId is a required field - SharedDirectoryId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RejectSharedDirectoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectSharedDirectoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RejectSharedDirectoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RejectSharedDirectoryInput"} - if s.SharedDirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("SharedDirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSharedDirectoryId sets the SharedDirectoryId field's value. -func (s *RejectSharedDirectoryInput) SetSharedDirectoryId(v string) *RejectSharedDirectoryInput { - s.SharedDirectoryId = &v - return s -} - -type RejectSharedDirectoryOutput struct { - _ struct{} `type:"structure"` - - // Identifier of the shared directory in the directory consumer account. - SharedDirectoryId *string `type:"string"` -} - -// String returns the string representation -func (s RejectSharedDirectoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectSharedDirectoryOutput) GoString() string { - return s.String() -} - -// SetSharedDirectoryId sets the SharedDirectoryId field's value. -func (s *RejectSharedDirectoryOutput) SetSharedDirectoryId(v string) *RejectSharedDirectoryOutput { - s.SharedDirectoryId = &v - return s -} - -type RemoveIpRoutesInput struct { - _ struct{} `type:"structure"` - - // IP address blocks that you want to remove. - // - // CidrIps is a required field - CidrIps []*string `type:"list" required:"true"` - - // Identifier (ID) of the directory from which you want to remove the IP addresses. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RemoveIpRoutesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveIpRoutesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveIpRoutesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveIpRoutesInput"} - if s.CidrIps == nil { - invalidParams.Add(request.NewErrParamRequired("CidrIps")) - } - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCidrIps sets the CidrIps field's value. -func (s *RemoveIpRoutesInput) SetCidrIps(v []*string) *RemoveIpRoutesInput { - s.CidrIps = v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *RemoveIpRoutesInput) SetDirectoryId(v string) *RemoveIpRoutesInput { - s.DirectoryId = &v - return s -} - -type RemoveIpRoutesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveIpRoutesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveIpRoutesOutput) GoString() string { - return s.String() -} - -type RemoveTagsFromResourceInput struct { - _ struct{} `type:"structure"` - - // Identifier (ID) of the directory from which to remove the tag. - // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` - - // The tag key (name) of the tag to be removed. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsFromResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *RemoveTagsFromResourceInput) SetResourceId(v string) *RemoveTagsFromResourceInput { - s.ResourceId = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsFromResourceInput) SetTagKeys(v []*string) *RemoveTagsFromResourceInput { - s.TagKeys = v - return s -} - -type RemoveTagsFromResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceOutput) GoString() string { - return s.String() -} - -type ResetUserPasswordInput struct { - _ struct{} `type:"structure"` - - // Identifier of the AWS Managed Microsoft AD or Simple AD directory in which - // the user resides. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The new password that will be reset. - // - // NewPassword is a required field - NewPassword *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The user name of the user whose password will be reset. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ResetUserPasswordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetUserPasswordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetUserPasswordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetUserPasswordInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.NewPassword == nil { - invalidParams.Add(request.NewErrParamRequired("NewPassword")) - } - if s.NewPassword != nil && len(*s.NewPassword) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewPassword", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *ResetUserPasswordInput) SetDirectoryId(v string) *ResetUserPasswordInput { - s.DirectoryId = &v - return s -} - -// SetNewPassword sets the NewPassword field's value. -func (s *ResetUserPasswordInput) SetNewPassword(v string) *ResetUserPasswordInput { - s.NewPassword = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ResetUserPasswordInput) SetUserName(v string) *ResetUserPasswordInput { - s.UserName = &v - return s -} - -type ResetUserPasswordOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ResetUserPasswordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetUserPasswordOutput) GoString() string { - return s.String() -} - -// An object representing the inputs for the RestoreFromSnapshot operation. -type RestoreFromSnapshotInput struct { - _ struct{} `type:"structure"` - - // The identifier of the snapshot to restore from. - // - // SnapshotId is a required field - SnapshotId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RestoreFromSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreFromSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreFromSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreFromSnapshotInput"} - if s.SnapshotId == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *RestoreFromSnapshotInput) SetSnapshotId(v string) *RestoreFromSnapshotInput { - s.SnapshotId = &v - return s -} - -// Contains the results of the RestoreFromSnapshot operation. -type RestoreFromSnapshotOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RestoreFromSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreFromSnapshotOutput) GoString() string { - return s.String() -} - -// Information about a schema extension. -type SchemaExtensionInfo struct { - _ struct{} `type:"structure"` - - // A description of the schema extension. - Description *string `type:"string"` - - // The identifier of the directory to which the schema extension is applied. - DirectoryId *string `type:"string"` - - // The date and time that the schema extension was completed. - EndDateTime *time.Time `type:"timestamp"` - - // The identifier of the schema extension. - SchemaExtensionId *string `type:"string"` - - // The current status of the schema extension. - SchemaExtensionStatus *string `type:"string" enum:"SchemaExtensionStatus"` - - // The reason for the SchemaExtensionStatus. - SchemaExtensionStatusReason *string `type:"string"` - - // The date and time that the schema extension started being applied to the - // directory. - StartDateTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s SchemaExtensionInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SchemaExtensionInfo) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *SchemaExtensionInfo) SetDescription(v string) *SchemaExtensionInfo { - s.Description = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *SchemaExtensionInfo) SetDirectoryId(v string) *SchemaExtensionInfo { - s.DirectoryId = &v - return s -} - -// SetEndDateTime sets the EndDateTime field's value. -func (s *SchemaExtensionInfo) SetEndDateTime(v time.Time) *SchemaExtensionInfo { - s.EndDateTime = &v - return s -} - -// SetSchemaExtensionId sets the SchemaExtensionId field's value. -func (s *SchemaExtensionInfo) SetSchemaExtensionId(v string) *SchemaExtensionInfo { - s.SchemaExtensionId = &v - return s -} - -// SetSchemaExtensionStatus sets the SchemaExtensionStatus field's value. -func (s *SchemaExtensionInfo) SetSchemaExtensionStatus(v string) *SchemaExtensionInfo { - s.SchemaExtensionStatus = &v - return s -} - -// SetSchemaExtensionStatusReason sets the SchemaExtensionStatusReason field's value. -func (s *SchemaExtensionInfo) SetSchemaExtensionStatusReason(v string) *SchemaExtensionInfo { - s.SchemaExtensionStatusReason = &v - return s -} - -// SetStartDateTime sets the StartDateTime field's value. -func (s *SchemaExtensionInfo) SetStartDateTime(v time.Time) *SchemaExtensionInfo { - s.StartDateTime = &v - return s -} - -type ShareDirectoryInput struct { - _ struct{} `type:"structure"` - - // Identifier of the AWS Managed Microsoft AD directory that you want to share - // with other AWS accounts. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The method used when sharing a directory to determine whether the directory - // should be shared within your AWS organization (ORGANIZATIONS) or with any - // AWS account by sending a directory sharing request (HANDSHAKE). - // - // ShareMethod is a required field - ShareMethod *string `type:"string" required:"true" enum:"ShareMethod"` - - // A directory share request that is sent by the directory owner to the directory - // consumer. The request includes a typed message to help the directory consumer - // administrator determine whether to approve or reject the share invitation. - ShareNotes *string `type:"string" sensitive:"true"` - - // Identifier for the directory consumer account with whom the directory is - // to be shared. - // - // ShareTarget is a required field - ShareTarget *ShareTarget `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ShareDirectoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ShareDirectoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ShareDirectoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ShareDirectoryInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.ShareMethod == nil { - invalidParams.Add(request.NewErrParamRequired("ShareMethod")) - } - if s.ShareTarget == nil { - invalidParams.Add(request.NewErrParamRequired("ShareTarget")) - } - if s.ShareTarget != nil { - if err := s.ShareTarget.Validate(); err != nil { - invalidParams.AddNested("ShareTarget", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *ShareDirectoryInput) SetDirectoryId(v string) *ShareDirectoryInput { - s.DirectoryId = &v - return s -} - -// SetShareMethod sets the ShareMethod field's value. -func (s *ShareDirectoryInput) SetShareMethod(v string) *ShareDirectoryInput { - s.ShareMethod = &v - return s -} - -// SetShareNotes sets the ShareNotes field's value. -func (s *ShareDirectoryInput) SetShareNotes(v string) *ShareDirectoryInput { - s.ShareNotes = &v - return s -} - -// SetShareTarget sets the ShareTarget field's value. -func (s *ShareDirectoryInput) SetShareTarget(v *ShareTarget) *ShareDirectoryInput { - s.ShareTarget = v - return s -} - -type ShareDirectoryOutput struct { - _ struct{} `type:"structure"` - - // Identifier of the directory that is stored in the directory consumer account - // that is shared from the specified directory (DirectoryId). - SharedDirectoryId *string `type:"string"` -} - -// String returns the string representation -func (s ShareDirectoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ShareDirectoryOutput) GoString() string { - return s.String() -} - -// SetSharedDirectoryId sets the SharedDirectoryId field's value. -func (s *ShareDirectoryOutput) SetSharedDirectoryId(v string) *ShareDirectoryOutput { - s.SharedDirectoryId = &v - return s -} - -// Identifier that contains details about the directory consumer account. -type ShareTarget struct { - _ struct{} `type:"structure"` - - // Identifier of the directory consumer account. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` - - // Type of identifier to be used in the Id field. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"TargetType"` -} - -// String returns the string representation -func (s ShareTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ShareTarget) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ShareTarget) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ShareTarget"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *ShareTarget) SetId(v string) *ShareTarget { - s.Id = &v - return s -} - -// SetType sets the Type field's value. -func (s *ShareTarget) SetType(v string) *ShareTarget { - s.Type = &v - return s -} - -// Details about the shared directory in the directory owner account for which -// the share request in the directory consumer account has been accepted. -type SharedDirectory struct { - _ struct{} `type:"structure"` - - // The date and time that the shared directory was created. - CreatedDateTime *time.Time `type:"timestamp"` - - // The date and time that the shared directory was last updated. - LastUpdatedDateTime *time.Time `type:"timestamp"` - - // Identifier of the directory owner account, which contains the directory that - // has been shared to the consumer account. - OwnerAccountId *string `type:"string"` - - // Identifier of the directory in the directory owner account. - OwnerDirectoryId *string `type:"string"` - - // The method used when sharing a directory to determine whether the directory - // should be shared within your AWS organization (ORGANIZATIONS) or with any - // AWS account by sending a shared directory request (HANDSHAKE). - ShareMethod *string `type:"string" enum:"ShareMethod"` - - // A directory share request that is sent by the directory owner to the directory - // consumer. The request includes a typed message to help the directory consumer - // administrator determine whether to approve or reject the share invitation. - ShareNotes *string `type:"string" sensitive:"true"` - - // Current directory status of the shared AWS Managed Microsoft AD directory. - ShareStatus *string `type:"string" enum:"ShareStatus"` - - // Identifier of the directory consumer account that has access to the shared - // directory (OwnerDirectoryId) in the directory owner account. - SharedAccountId *string `type:"string"` - - // Identifier of the shared directory in the directory consumer account. This - // identifier is different for each directory owner account. - SharedDirectoryId *string `type:"string"` -} - -// String returns the string representation -func (s SharedDirectory) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SharedDirectory) GoString() string { - return s.String() -} - -// SetCreatedDateTime sets the CreatedDateTime field's value. -func (s *SharedDirectory) SetCreatedDateTime(v time.Time) *SharedDirectory { - s.CreatedDateTime = &v - return s -} - -// SetLastUpdatedDateTime sets the LastUpdatedDateTime field's value. -func (s *SharedDirectory) SetLastUpdatedDateTime(v time.Time) *SharedDirectory { - s.LastUpdatedDateTime = &v - return s -} - -// SetOwnerAccountId sets the OwnerAccountId field's value. -func (s *SharedDirectory) SetOwnerAccountId(v string) *SharedDirectory { - s.OwnerAccountId = &v - return s -} - -// SetOwnerDirectoryId sets the OwnerDirectoryId field's value. -func (s *SharedDirectory) SetOwnerDirectoryId(v string) *SharedDirectory { - s.OwnerDirectoryId = &v - return s -} - -// SetShareMethod sets the ShareMethod field's value. -func (s *SharedDirectory) SetShareMethod(v string) *SharedDirectory { - s.ShareMethod = &v - return s -} - -// SetShareNotes sets the ShareNotes field's value. -func (s *SharedDirectory) SetShareNotes(v string) *SharedDirectory { - s.ShareNotes = &v - return s -} - -// SetShareStatus sets the ShareStatus field's value. -func (s *SharedDirectory) SetShareStatus(v string) *SharedDirectory { - s.ShareStatus = &v - return s -} - -// SetSharedAccountId sets the SharedAccountId field's value. -func (s *SharedDirectory) SetSharedAccountId(v string) *SharedDirectory { - s.SharedAccountId = &v - return s -} - -// SetSharedDirectoryId sets the SharedDirectoryId field's value. -func (s *SharedDirectory) SetSharedDirectoryId(v string) *SharedDirectory { - s.SharedDirectoryId = &v - return s -} - -// Describes a directory snapshot. -type Snapshot struct { - _ struct{} `type:"structure"` - - // The directory identifier. - DirectoryId *string `type:"string"` - - // The descriptive name of the snapshot. - Name *string `type:"string"` - - // The snapshot identifier. - SnapshotId *string `type:"string"` - - // The date and time that the snapshot was taken. - StartTime *time.Time `type:"timestamp"` - - // The snapshot status. - Status *string `type:"string" enum:"SnapshotStatus"` - - // The snapshot type. - Type *string `type:"string" enum:"SnapshotType"` -} - -// String returns the string representation -func (s Snapshot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Snapshot) GoString() string { - return s.String() -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *Snapshot) SetDirectoryId(v string) *Snapshot { - s.DirectoryId = &v - return s -} - -// SetName sets the Name field's value. -func (s *Snapshot) SetName(v string) *Snapshot { - s.Name = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *Snapshot) SetSnapshotId(v string) *Snapshot { - s.SnapshotId = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *Snapshot) SetStartTime(v time.Time) *Snapshot { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Snapshot) SetStatus(v string) *Snapshot { - s.Status = &v - return s -} - -// SetType sets the Type field's value. -func (s *Snapshot) SetType(v string) *Snapshot { - s.Type = &v - return s -} - -// Contains manual snapshot limit information for a directory. -type SnapshotLimits struct { - _ struct{} `type:"structure"` - - // The current number of manual snapshots of the directory. - ManualSnapshotsCurrentCount *int64 `type:"integer"` - - // The maximum number of manual snapshots allowed. - ManualSnapshotsLimit *int64 `type:"integer"` - - // Indicates if the manual snapshot limit has been reached. - ManualSnapshotsLimitReached *bool `type:"boolean"` -} - -// String returns the string representation -func (s SnapshotLimits) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SnapshotLimits) GoString() string { - return s.String() -} - -// SetManualSnapshotsCurrentCount sets the ManualSnapshotsCurrentCount field's value. -func (s *SnapshotLimits) SetManualSnapshotsCurrentCount(v int64) *SnapshotLimits { - s.ManualSnapshotsCurrentCount = &v - return s -} - -// SetManualSnapshotsLimit sets the ManualSnapshotsLimit field's value. -func (s *SnapshotLimits) SetManualSnapshotsLimit(v int64) *SnapshotLimits { - s.ManualSnapshotsLimit = &v - return s -} - -// SetManualSnapshotsLimitReached sets the ManualSnapshotsLimitReached field's value. -func (s *SnapshotLimits) SetManualSnapshotsLimitReached(v bool) *SnapshotLimits { - s.ManualSnapshotsLimitReached = &v - return s -} - -type StartSchemaExtensionInput struct { - _ struct{} `type:"structure"` - - // If true, creates a snapshot of the directory before applying the schema extension. - // - // CreateSnapshotBeforeSchemaExtension is a required field - CreateSnapshotBeforeSchemaExtension *bool `type:"boolean" required:"true"` - - // A description of the schema extension. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // The identifier of the directory for which the schema extension will be applied - // to. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The LDIF file represented as a string. To construct the LdifContent string, - // precede each line as it would be formatted in an ldif file with \n. See the - // example request below for more details. The file size can be no larger than - // 1MB. - // - // LdifContent is a required field - LdifContent *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartSchemaExtensionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartSchemaExtensionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartSchemaExtensionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartSchemaExtensionInput"} - if s.CreateSnapshotBeforeSchemaExtension == nil { - invalidParams.Add(request.NewErrParamRequired("CreateSnapshotBeforeSchemaExtension")) - } - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.LdifContent == nil { - invalidParams.Add(request.NewErrParamRequired("LdifContent")) - } - if s.LdifContent != nil && len(*s.LdifContent) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LdifContent", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreateSnapshotBeforeSchemaExtension sets the CreateSnapshotBeforeSchemaExtension field's value. -func (s *StartSchemaExtensionInput) SetCreateSnapshotBeforeSchemaExtension(v bool) *StartSchemaExtensionInput { - s.CreateSnapshotBeforeSchemaExtension = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *StartSchemaExtensionInput) SetDescription(v string) *StartSchemaExtensionInput { - s.Description = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *StartSchemaExtensionInput) SetDirectoryId(v string) *StartSchemaExtensionInput { - s.DirectoryId = &v - return s -} - -// SetLdifContent sets the LdifContent field's value. -func (s *StartSchemaExtensionInput) SetLdifContent(v string) *StartSchemaExtensionInput { - s.LdifContent = &v - return s -} - -type StartSchemaExtensionOutput struct { - _ struct{} `type:"structure"` - - // The identifier of the schema extension that will be applied. - SchemaExtensionId *string `type:"string"` -} - -// String returns the string representation -func (s StartSchemaExtensionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartSchemaExtensionOutput) GoString() string { - return s.String() -} - -// SetSchemaExtensionId sets the SchemaExtensionId field's value. -func (s *StartSchemaExtensionOutput) SetSchemaExtensionId(v string) *StartSchemaExtensionOutput { - s.SchemaExtensionId = &v - return s -} - -// Metadata assigned to a directory consisting of a key-value pair. -type Tag struct { - _ struct{} `type:"structure"` - - // Required name of the tag. The string value can be Unicode characters and - // cannot be prefixed with "aws:". The string can contain only the set of Unicode - // letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The optional value of the tag. The string value can be Unicode characters. - // The string can contain only the set of Unicode letters, digits, white-space, - // '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Describes a trust relationship between an AWS Managed Microsoft AD directory -// and an external domain. -type Trust struct { - _ struct{} `type:"structure"` - - // The date and time that the trust relationship was created. - CreatedDateTime *time.Time `type:"timestamp"` - - // The Directory ID of the AWS directory involved in the trust relationship. - DirectoryId *string `type:"string"` - - // The date and time that the trust relationship was last updated. - LastUpdatedDateTime *time.Time `type:"timestamp"` - - // The Fully Qualified Domain Name (FQDN) of the external domain involved in - // the trust relationship. - RemoteDomainName *string `type:"string"` - - // Current state of selective authentication for the trust. - SelectiveAuth *string `type:"string" enum:"SelectiveAuth"` - - // The date and time that the TrustState was last updated. - StateLastUpdatedDateTime *time.Time `type:"timestamp"` - - // The trust relationship direction. - TrustDirection *string `type:"string" enum:"TrustDirection"` - - // The unique ID of the trust relationship. - TrustId *string `type:"string"` - - // The trust relationship state. - TrustState *string `type:"string" enum:"TrustState"` - - // The reason for the TrustState. - TrustStateReason *string `type:"string"` - - // The trust relationship type. Forest is the default. - TrustType *string `type:"string" enum:"TrustType"` -} - -// String returns the string representation -func (s Trust) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Trust) GoString() string { - return s.String() -} - -// SetCreatedDateTime sets the CreatedDateTime field's value. -func (s *Trust) SetCreatedDateTime(v time.Time) *Trust { - s.CreatedDateTime = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *Trust) SetDirectoryId(v string) *Trust { - s.DirectoryId = &v - return s -} - -// SetLastUpdatedDateTime sets the LastUpdatedDateTime field's value. -func (s *Trust) SetLastUpdatedDateTime(v time.Time) *Trust { - s.LastUpdatedDateTime = &v - return s -} - -// SetRemoteDomainName sets the RemoteDomainName field's value. -func (s *Trust) SetRemoteDomainName(v string) *Trust { - s.RemoteDomainName = &v - return s -} - -// SetSelectiveAuth sets the SelectiveAuth field's value. -func (s *Trust) SetSelectiveAuth(v string) *Trust { - s.SelectiveAuth = &v - return s -} - -// SetStateLastUpdatedDateTime sets the StateLastUpdatedDateTime field's value. -func (s *Trust) SetStateLastUpdatedDateTime(v time.Time) *Trust { - s.StateLastUpdatedDateTime = &v - return s -} - -// SetTrustDirection sets the TrustDirection field's value. -func (s *Trust) SetTrustDirection(v string) *Trust { - s.TrustDirection = &v - return s -} - -// SetTrustId sets the TrustId field's value. -func (s *Trust) SetTrustId(v string) *Trust { - s.TrustId = &v - return s -} - -// SetTrustState sets the TrustState field's value. -func (s *Trust) SetTrustState(v string) *Trust { - s.TrustState = &v - return s -} - -// SetTrustStateReason sets the TrustStateReason field's value. -func (s *Trust) SetTrustStateReason(v string) *Trust { - s.TrustStateReason = &v - return s -} - -// SetTrustType sets the TrustType field's value. -func (s *Trust) SetTrustType(v string) *Trust { - s.TrustType = &v - return s -} - -type UnshareDirectoryInput struct { - _ struct{} `type:"structure"` - - // The identifier of the AWS Managed Microsoft AD directory that you want to - // stop sharing. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // Identifier for the directory consumer account with whom the directory has - // to be unshared. - // - // UnshareTarget is a required field - UnshareTarget *UnshareTarget `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UnshareDirectoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnshareDirectoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UnshareDirectoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UnshareDirectoryInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.UnshareTarget == nil { - invalidParams.Add(request.NewErrParamRequired("UnshareTarget")) - } - if s.UnshareTarget != nil { - if err := s.UnshareTarget.Validate(); err != nil { - invalidParams.AddNested("UnshareTarget", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *UnshareDirectoryInput) SetDirectoryId(v string) *UnshareDirectoryInput { - s.DirectoryId = &v - return s -} - -// SetUnshareTarget sets the UnshareTarget field's value. -func (s *UnshareDirectoryInput) SetUnshareTarget(v *UnshareTarget) *UnshareDirectoryInput { - s.UnshareTarget = v - return s -} - -type UnshareDirectoryOutput struct { - _ struct{} `type:"structure"` - - // Identifier of the directory stored in the directory consumer account that - // is to be unshared from the specified directory (DirectoryId). - SharedDirectoryId *string `type:"string"` -} - -// String returns the string representation -func (s UnshareDirectoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnshareDirectoryOutput) GoString() string { - return s.String() -} - -// SetSharedDirectoryId sets the SharedDirectoryId field's value. -func (s *UnshareDirectoryOutput) SetSharedDirectoryId(v string) *UnshareDirectoryOutput { - s.SharedDirectoryId = &v - return s -} - -// Identifier that contains details about the directory consumer account with -// whom the directory is being unshared. -type UnshareTarget struct { - _ struct{} `type:"structure"` - - // Identifier of the directory consumer account. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` - - // Type of identifier to be used in the Id field. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"TargetType"` -} - -// String returns the string representation -func (s UnshareTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnshareTarget) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UnshareTarget) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UnshareTarget"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *UnshareTarget) SetId(v string) *UnshareTarget { - s.Id = &v - return s -} - -// SetType sets the Type field's value. -func (s *UnshareTarget) SetType(v string) *UnshareTarget { - s.Type = &v - return s -} - -// Updates a conditional forwarder. -type UpdateConditionalForwarderInput struct { - _ struct{} `type:"structure"` - - // The directory ID of the AWS directory for which to update the conditional - // forwarder. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The updated IP addresses of the remote DNS server associated with the conditional - // forwarder. - // - // DnsIpAddrs is a required field - DnsIpAddrs []*string `type:"list" required:"true"` - - // The fully qualified domain name (FQDN) of the remote domain with which you - // will set up a trust relationship. - // - // RemoteDomainName is a required field - RemoteDomainName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateConditionalForwarderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConditionalForwarderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateConditionalForwarderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateConditionalForwarderInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.DnsIpAddrs == nil { - invalidParams.Add(request.NewErrParamRequired("DnsIpAddrs")) - } - if s.RemoteDomainName == nil { - invalidParams.Add(request.NewErrParamRequired("RemoteDomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *UpdateConditionalForwarderInput) SetDirectoryId(v string) *UpdateConditionalForwarderInput { - s.DirectoryId = &v - return s -} - -// SetDnsIpAddrs sets the DnsIpAddrs field's value. -func (s *UpdateConditionalForwarderInput) SetDnsIpAddrs(v []*string) *UpdateConditionalForwarderInput { - s.DnsIpAddrs = v - return s -} - -// SetRemoteDomainName sets the RemoteDomainName field's value. -func (s *UpdateConditionalForwarderInput) SetRemoteDomainName(v string) *UpdateConditionalForwarderInput { - s.RemoteDomainName = &v - return s -} - -// The result of an UpdateConditionalForwarder request. -type UpdateConditionalForwarderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateConditionalForwarderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConditionalForwarderOutput) GoString() string { - return s.String() -} - -type UpdateNumberOfDomainControllersInput struct { - _ struct{} `type:"structure"` - - // The number of domain controllers desired in the directory. - // - // DesiredNumber is a required field - DesiredNumber *int64 `min:"2" type:"integer" required:"true"` - - // Identifier of the directory to which the domain controllers will be added - // or removed. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateNumberOfDomainControllersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateNumberOfDomainControllersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateNumberOfDomainControllersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateNumberOfDomainControllersInput"} - if s.DesiredNumber == nil { - invalidParams.Add(request.NewErrParamRequired("DesiredNumber")) - } - if s.DesiredNumber != nil && *s.DesiredNumber < 2 { - invalidParams.Add(request.NewErrParamMinValue("DesiredNumber", 2)) - } - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDesiredNumber sets the DesiredNumber field's value. -func (s *UpdateNumberOfDomainControllersInput) SetDesiredNumber(v int64) *UpdateNumberOfDomainControllersInput { - s.DesiredNumber = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *UpdateNumberOfDomainControllersInput) SetDirectoryId(v string) *UpdateNumberOfDomainControllersInput { - s.DirectoryId = &v - return s -} - -type UpdateNumberOfDomainControllersOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateNumberOfDomainControllersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateNumberOfDomainControllersOutput) GoString() string { - return s.String() -} - -// Contains the inputs for the UpdateRadius operation. -type UpdateRadiusInput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory for which to update the RADIUS server information. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // A RadiusSettings object that contains information about the RADIUS server. - // - // RadiusSettings is a required field - RadiusSettings *RadiusSettings `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateRadiusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRadiusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRadiusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRadiusInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.RadiusSettings == nil { - invalidParams.Add(request.NewErrParamRequired("RadiusSettings")) - } - if s.RadiusSettings != nil { - if err := s.RadiusSettings.Validate(); err != nil { - invalidParams.AddNested("RadiusSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *UpdateRadiusInput) SetDirectoryId(v string) *UpdateRadiusInput { - s.DirectoryId = &v - return s -} - -// SetRadiusSettings sets the RadiusSettings field's value. -func (s *UpdateRadiusInput) SetRadiusSettings(v *RadiusSettings) *UpdateRadiusInput { - s.RadiusSettings = v - return s -} - -// Contains the results of the UpdateRadius operation. -type UpdateRadiusOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateRadiusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRadiusOutput) GoString() string { - return s.String() -} - -type UpdateTrustInput struct { - _ struct{} `type:"structure"` - - // Updates selective authentication for the trust. - SelectiveAuth *string `type:"string" enum:"SelectiveAuth"` - - // Identifier of the trust relationship. - // - // TrustId is a required field - TrustId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateTrustInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTrustInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateTrustInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateTrustInput"} - if s.TrustId == nil { - invalidParams.Add(request.NewErrParamRequired("TrustId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSelectiveAuth sets the SelectiveAuth field's value. -func (s *UpdateTrustInput) SetSelectiveAuth(v string) *UpdateTrustInput { - s.SelectiveAuth = &v - return s -} - -// SetTrustId sets the TrustId field's value. -func (s *UpdateTrustInput) SetTrustId(v string) *UpdateTrustInput { - s.TrustId = &v - return s -} - -type UpdateTrustOutput struct { - _ struct{} `type:"structure"` - - // The AWS request identifier. - RequestId *string `type:"string"` - - // Identifier of the trust relationship. - TrustId *string `type:"string"` -} - -// String returns the string representation -func (s UpdateTrustOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTrustOutput) GoString() string { - return s.String() -} - -// SetRequestId sets the RequestId field's value. -func (s *UpdateTrustOutput) SetRequestId(v string) *UpdateTrustOutput { - s.RequestId = &v - return s -} - -// SetTrustId sets the TrustId field's value. -func (s *UpdateTrustOutput) SetTrustId(v string) *UpdateTrustOutput { - s.TrustId = &v - return s -} - -// Initiates the verification of an existing trust relationship between an AWS -// Managed Microsoft AD directory and an external domain. -type VerifyTrustInput struct { - _ struct{} `type:"structure"` - - // The unique Trust ID of the trust relationship to verify. - // - // TrustId is a required field - TrustId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s VerifyTrustInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerifyTrustInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VerifyTrustInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VerifyTrustInput"} - if s.TrustId == nil { - invalidParams.Add(request.NewErrParamRequired("TrustId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTrustId sets the TrustId field's value. -func (s *VerifyTrustInput) SetTrustId(v string) *VerifyTrustInput { - s.TrustId = &v - return s -} - -// Result of a VerifyTrust request. -type VerifyTrustOutput struct { - _ struct{} `type:"structure"` - - // The unique Trust ID of the trust relationship that was verified. - TrustId *string `type:"string"` -} - -// String returns the string representation -func (s VerifyTrustOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerifyTrustOutput) GoString() string { - return s.String() -} - -// SetTrustId sets the TrustId field's value. -func (s *VerifyTrustOutput) SetTrustId(v string) *VerifyTrustOutput { - s.TrustId = &v - return s -} - -const ( - // DirectoryEditionEnterprise is a DirectoryEdition enum value - DirectoryEditionEnterprise = "Enterprise" - - // DirectoryEditionStandard is a DirectoryEdition enum value - DirectoryEditionStandard = "Standard" -) - -const ( - // DirectorySizeSmall is a DirectorySize enum value - DirectorySizeSmall = "Small" - - // DirectorySizeLarge is a DirectorySize enum value - DirectorySizeLarge = "Large" -) - -const ( - // DirectoryStageRequested is a DirectoryStage enum value - DirectoryStageRequested = "Requested" - - // DirectoryStageCreating is a DirectoryStage enum value - DirectoryStageCreating = "Creating" - - // DirectoryStageCreated is a DirectoryStage enum value - DirectoryStageCreated = "Created" - - // DirectoryStageActive is a DirectoryStage enum value - DirectoryStageActive = "Active" - - // DirectoryStageInoperable is a DirectoryStage enum value - DirectoryStageInoperable = "Inoperable" - - // DirectoryStageImpaired is a DirectoryStage enum value - DirectoryStageImpaired = "Impaired" - - // DirectoryStageRestoring is a DirectoryStage enum value - DirectoryStageRestoring = "Restoring" - - // DirectoryStageRestoreFailed is a DirectoryStage enum value - DirectoryStageRestoreFailed = "RestoreFailed" - - // DirectoryStageDeleting is a DirectoryStage enum value - DirectoryStageDeleting = "Deleting" - - // DirectoryStageDeleted is a DirectoryStage enum value - DirectoryStageDeleted = "Deleted" - - // DirectoryStageFailed is a DirectoryStage enum value - DirectoryStageFailed = "Failed" -) - -const ( - // DirectoryTypeSimpleAd is a DirectoryType enum value - DirectoryTypeSimpleAd = "SimpleAD" - - // DirectoryTypeAdconnector is a DirectoryType enum value - DirectoryTypeAdconnector = "ADConnector" - - // DirectoryTypeMicrosoftAd is a DirectoryType enum value - DirectoryTypeMicrosoftAd = "MicrosoftAD" - - // DirectoryTypeSharedMicrosoftAd is a DirectoryType enum value - DirectoryTypeSharedMicrosoftAd = "SharedMicrosoftAD" -) - -const ( - // DomainControllerStatusCreating is a DomainControllerStatus enum value - DomainControllerStatusCreating = "Creating" - - // DomainControllerStatusActive is a DomainControllerStatus enum value - DomainControllerStatusActive = "Active" - - // DomainControllerStatusImpaired is a DomainControllerStatus enum value - DomainControllerStatusImpaired = "Impaired" - - // DomainControllerStatusRestoring is a DomainControllerStatus enum value - DomainControllerStatusRestoring = "Restoring" - - // DomainControllerStatusDeleting is a DomainControllerStatus enum value - DomainControllerStatusDeleting = "Deleting" - - // DomainControllerStatusDeleted is a DomainControllerStatus enum value - DomainControllerStatusDeleted = "Deleted" - - // DomainControllerStatusFailed is a DomainControllerStatus enum value - DomainControllerStatusFailed = "Failed" -) - -const ( - // IpRouteStatusMsgAdding is a IpRouteStatusMsg enum value - IpRouteStatusMsgAdding = "Adding" - - // IpRouteStatusMsgAdded is a IpRouteStatusMsg enum value - IpRouteStatusMsgAdded = "Added" - - // IpRouteStatusMsgRemoving is a IpRouteStatusMsg enum value - IpRouteStatusMsgRemoving = "Removing" - - // IpRouteStatusMsgRemoved is a IpRouteStatusMsg enum value - IpRouteStatusMsgRemoved = "Removed" - - // IpRouteStatusMsgAddFailed is a IpRouteStatusMsg enum value - IpRouteStatusMsgAddFailed = "AddFailed" - - // IpRouteStatusMsgRemoveFailed is a IpRouteStatusMsg enum value - IpRouteStatusMsgRemoveFailed = "RemoveFailed" -) - -const ( - // RadiusAuthenticationProtocolPap is a RadiusAuthenticationProtocol enum value - RadiusAuthenticationProtocolPap = "PAP" - - // RadiusAuthenticationProtocolChap is a RadiusAuthenticationProtocol enum value - RadiusAuthenticationProtocolChap = "CHAP" - - // RadiusAuthenticationProtocolMsChapv1 is a RadiusAuthenticationProtocol enum value - RadiusAuthenticationProtocolMsChapv1 = "MS-CHAPv1" - - // RadiusAuthenticationProtocolMsChapv2 is a RadiusAuthenticationProtocol enum value - RadiusAuthenticationProtocolMsChapv2 = "MS-CHAPv2" -) - -const ( - // RadiusStatusCreating is a RadiusStatus enum value - RadiusStatusCreating = "Creating" - - // RadiusStatusCompleted is a RadiusStatus enum value - RadiusStatusCompleted = "Completed" - - // RadiusStatusFailed is a RadiusStatus enum value - RadiusStatusFailed = "Failed" -) - -const ( - // ReplicationScopeDomain is a ReplicationScope enum value - ReplicationScopeDomain = "Domain" -) - -const ( - // SchemaExtensionStatusInitializing is a SchemaExtensionStatus enum value - SchemaExtensionStatusInitializing = "Initializing" - - // SchemaExtensionStatusCreatingSnapshot is a SchemaExtensionStatus enum value - SchemaExtensionStatusCreatingSnapshot = "CreatingSnapshot" - - // SchemaExtensionStatusUpdatingSchema is a SchemaExtensionStatus enum value - SchemaExtensionStatusUpdatingSchema = "UpdatingSchema" - - // SchemaExtensionStatusReplicating is a SchemaExtensionStatus enum value - SchemaExtensionStatusReplicating = "Replicating" - - // SchemaExtensionStatusCancelInProgress is a SchemaExtensionStatus enum value - SchemaExtensionStatusCancelInProgress = "CancelInProgress" - - // SchemaExtensionStatusRollbackInProgress is a SchemaExtensionStatus enum value - SchemaExtensionStatusRollbackInProgress = "RollbackInProgress" - - // SchemaExtensionStatusCancelled is a SchemaExtensionStatus enum value - SchemaExtensionStatusCancelled = "Cancelled" - - // SchemaExtensionStatusFailed is a SchemaExtensionStatus enum value - SchemaExtensionStatusFailed = "Failed" - - // SchemaExtensionStatusCompleted is a SchemaExtensionStatus enum value - SchemaExtensionStatusCompleted = "Completed" -) - -const ( - // SelectiveAuthEnabled is a SelectiveAuth enum value - SelectiveAuthEnabled = "Enabled" - - // SelectiveAuthDisabled is a SelectiveAuth enum value - SelectiveAuthDisabled = "Disabled" -) - -const ( - // ShareMethodOrganizations is a ShareMethod enum value - ShareMethodOrganizations = "ORGANIZATIONS" - - // ShareMethodHandshake is a ShareMethod enum value - ShareMethodHandshake = "HANDSHAKE" -) - -const ( - // ShareStatusShared is a ShareStatus enum value - ShareStatusShared = "Shared" - - // ShareStatusPendingAcceptance is a ShareStatus enum value - ShareStatusPendingAcceptance = "PendingAcceptance" - - // ShareStatusRejected is a ShareStatus enum value - ShareStatusRejected = "Rejected" - - // ShareStatusRejecting is a ShareStatus enum value - ShareStatusRejecting = "Rejecting" - - // ShareStatusRejectFailed is a ShareStatus enum value - ShareStatusRejectFailed = "RejectFailed" - - // ShareStatusSharing is a ShareStatus enum value - ShareStatusSharing = "Sharing" - - // ShareStatusShareFailed is a ShareStatus enum value - ShareStatusShareFailed = "ShareFailed" - - // ShareStatusDeleted is a ShareStatus enum value - ShareStatusDeleted = "Deleted" - - // ShareStatusDeleting is a ShareStatus enum value - ShareStatusDeleting = "Deleting" -) - -const ( - // SnapshotStatusCreating is a SnapshotStatus enum value - SnapshotStatusCreating = "Creating" - - // SnapshotStatusCompleted is a SnapshotStatus enum value - SnapshotStatusCompleted = "Completed" - - // SnapshotStatusFailed is a SnapshotStatus enum value - SnapshotStatusFailed = "Failed" -) - -const ( - // SnapshotTypeAuto is a SnapshotType enum value - SnapshotTypeAuto = "Auto" - - // SnapshotTypeManual is a SnapshotType enum value - SnapshotTypeManual = "Manual" -) - -const ( - // TargetTypeAccount is a TargetType enum value - TargetTypeAccount = "ACCOUNT" -) - -const ( - // TopicStatusRegistered is a TopicStatus enum value - TopicStatusRegistered = "Registered" - - // TopicStatusTopicnotfound is a TopicStatus enum value - TopicStatusTopicnotfound = "Topic not found" - - // TopicStatusFailed is a TopicStatus enum value - TopicStatusFailed = "Failed" - - // TopicStatusDeleted is a TopicStatus enum value - TopicStatusDeleted = "Deleted" -) - -const ( - // TrustDirectionOneWayOutgoing is a TrustDirection enum value - TrustDirectionOneWayOutgoing = "One-Way: Outgoing" - - // TrustDirectionOneWayIncoming is a TrustDirection enum value - TrustDirectionOneWayIncoming = "One-Way: Incoming" - - // TrustDirectionTwoWay is a TrustDirection enum value - TrustDirectionTwoWay = "Two-Way" -) - -const ( - // TrustStateCreating is a TrustState enum value - TrustStateCreating = "Creating" - - // TrustStateCreated is a TrustState enum value - TrustStateCreated = "Created" - - // TrustStateVerifying is a TrustState enum value - TrustStateVerifying = "Verifying" - - // TrustStateVerifyFailed is a TrustState enum value - TrustStateVerifyFailed = "VerifyFailed" - - // TrustStateVerified is a TrustState enum value - TrustStateVerified = "Verified" - - // TrustStateUpdating is a TrustState enum value - TrustStateUpdating = "Updating" - - // TrustStateUpdateFailed is a TrustState enum value - TrustStateUpdateFailed = "UpdateFailed" - - // TrustStateUpdated is a TrustState enum value - TrustStateUpdated = "Updated" - - // TrustStateDeleting is a TrustState enum value - TrustStateDeleting = "Deleting" - - // TrustStateDeleted is a TrustState enum value - TrustStateDeleted = "Deleted" - - // TrustStateFailed is a TrustState enum value - TrustStateFailed = "Failed" -) - -const ( - // TrustTypeForest is a TrustType enum value - TrustTypeForest = "Forest" - - // TrustTypeExternal is a TrustType enum value - TrustTypeExternal = "External" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/doc.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/doc.go deleted file mode 100644 index 2013ed02d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/doc.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package directoryservice provides the client and types for making API -// requests to AWS Directory Service. -// -// AWS Directory Service is a web service that makes it easy for you to setup -// and run directories in the AWS cloud, or connect your AWS resources with -// an existing on-premises Microsoft Active Directory. This guide provides detailed -// information about AWS Directory Service operations, data types, parameters, -// and errors. For information about AWS Directory Services features, see AWS -// Directory Service (https://aws.amazon.com/directoryservice/) and the AWS -// Directory Service Administration Guide (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/what_is.html). -// -// AWS provides SDKs that consist of libraries and sample code for various programming -// languages and platforms (Java, Ruby, .Net, iOS, Android, etc.). The SDKs -// provide a convenient way to create programmatic access to AWS Directory Service -// and other AWS services. For more information about the AWS SDKs, including -// how to download and install them, see Tools for Amazon Web Services (http://aws.amazon.com/tools/). -// -// See https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16 for more information on this service. -// -// See directoryservice package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/directoryservice/ -// -// Using the Client -// -// To contact AWS Directory Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS Directory Service client DirectoryService for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/directoryservice/#New -package directoryservice diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go deleted file mode 100644 index b5bdd25a1..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package directoryservice - -const ( - - // ErrCodeAccessDeniedException for service response error code - // "AccessDeniedException". - // - // You do not have sufficient access to perform this action. - ErrCodeAccessDeniedException = "AccessDeniedException" - - // ErrCodeAuthenticationFailedException for service response error code - // "AuthenticationFailedException". - // - // An authentication error occurred. - ErrCodeAuthenticationFailedException = "AuthenticationFailedException" - - // ErrCodeClientException for service response error code - // "ClientException". - // - // A client exception has occurred. - ErrCodeClientException = "ClientException" - - // ErrCodeDirectoryAlreadySharedException for service response error code - // "DirectoryAlreadySharedException". - // - // The specified directory has already been shared with this AWS account. - ErrCodeDirectoryAlreadySharedException = "DirectoryAlreadySharedException" - - // ErrCodeDirectoryLimitExceededException for service response error code - // "DirectoryLimitExceededException". - // - // The maximum number of directories in the region has been reached. You can - // use the GetDirectoryLimits operation to determine your directory limits in - // the region. - ErrCodeDirectoryLimitExceededException = "DirectoryLimitExceededException" - - // ErrCodeDirectoryNotSharedException for service response error code - // "DirectoryNotSharedException". - // - // The specified directory has not been shared with this AWS account. - ErrCodeDirectoryNotSharedException = "DirectoryNotSharedException" - - // ErrCodeDirectoryUnavailableException for service response error code - // "DirectoryUnavailableException". - // - // The specified directory is unavailable or could not be found. - ErrCodeDirectoryUnavailableException = "DirectoryUnavailableException" - - // ErrCodeDomainControllerLimitExceededException for service response error code - // "DomainControllerLimitExceededException". - // - // The maximum allowed number of domain controllers per directory was exceeded. - // The default limit per directory is 20 domain controllers. - ErrCodeDomainControllerLimitExceededException = "DomainControllerLimitExceededException" - - // ErrCodeEntityAlreadyExistsException for service response error code - // "EntityAlreadyExistsException". - // - // The specified entity already exists. - ErrCodeEntityAlreadyExistsException = "EntityAlreadyExistsException" - - // ErrCodeEntityDoesNotExistException for service response error code - // "EntityDoesNotExistException". - // - // The specified entity could not be found. - ErrCodeEntityDoesNotExistException = "EntityDoesNotExistException" - - // ErrCodeInsufficientPermissionsException for service response error code - // "InsufficientPermissionsException". - // - // The account does not have sufficient permission to perform the operation. - ErrCodeInsufficientPermissionsException = "InsufficientPermissionsException" - - // ErrCodeInvalidNextTokenException for service response error code - // "InvalidNextTokenException". - // - // The NextToken value is not valid. - ErrCodeInvalidNextTokenException = "InvalidNextTokenException" - - // ErrCodeInvalidParameterException for service response error code - // "InvalidParameterException". - // - // One or more parameters are not valid. - ErrCodeInvalidParameterException = "InvalidParameterException" - - // ErrCodeInvalidPasswordException for service response error code - // "InvalidPasswordException". - // - // The new password provided by the user does not meet the password complexity - // requirements defined in your directory. - ErrCodeInvalidPasswordException = "InvalidPasswordException" - - // ErrCodeInvalidTargetException for service response error code - // "InvalidTargetException". - // - // The specified shared target is not valid. - ErrCodeInvalidTargetException = "InvalidTargetException" - - // ErrCodeIpRouteLimitExceededException for service response error code - // "IpRouteLimitExceededException". - // - // The maximum allowed number of IP addresses was exceeded. The default limit - // is 100 IP address blocks. - ErrCodeIpRouteLimitExceededException = "IpRouteLimitExceededException" - - // ErrCodeOrganizationsException for service response error code - // "OrganizationsException". - // - // Exception encountered while trying to access your AWS organization. - ErrCodeOrganizationsException = "OrganizationsException" - - // ErrCodeServiceException for service response error code - // "ServiceException". - // - // An exception has occurred in AWS Directory Service. - ErrCodeServiceException = "ServiceException" - - // ErrCodeShareLimitExceededException for service response error code - // "ShareLimitExceededException". - // - // The maximum number of AWS accounts that you can share with this directory - // has been reached. - ErrCodeShareLimitExceededException = "ShareLimitExceededException" - - // ErrCodeSnapshotLimitExceededException for service response error code - // "SnapshotLimitExceededException". - // - // The maximum number of manual snapshots for the directory has been reached. - // You can use the GetSnapshotLimits operation to determine the snapshot limits - // for a directory. - ErrCodeSnapshotLimitExceededException = "SnapshotLimitExceededException" - - // ErrCodeTagLimitExceededException for service response error code - // "TagLimitExceededException". - // - // The maximum allowed number of tags was exceeded. - ErrCodeTagLimitExceededException = "TagLimitExceededException" - - // ErrCodeUnsupportedOperationException for service response error code - // "UnsupportedOperationException". - // - // The operation is not supported. - ErrCodeUnsupportedOperationException = "UnsupportedOperationException" - - // ErrCodeUserDoesNotExistException for service response error code - // "UserDoesNotExistException". - // - // The user provided a username that does not exist in your directory. - ErrCodeUserDoesNotExistException = "UserDoesNotExistException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/service.go deleted file mode 100644 index 0743c9632..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package directoryservice - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// DirectoryService provides the API operation methods for making requests to -// AWS Directory Service. See this package's package overview docs -// for details on the service. -// -// DirectoryService methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type DirectoryService 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 = "ds" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Directory Service" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the DirectoryService client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a DirectoryService client from just a session. -// svc := directoryservice.New(mySession) -// -// // Create a DirectoryService client with additional configuration -// svc := directoryservice.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *DirectoryService { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DirectoryService { - svc := &DirectoryService{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-04-16", - JSONVersion: "1.1", - TargetPrefix: "DirectoryService_20150416", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a DirectoryService operation and runs any -// custom request initialization. -func (c *DirectoryService) 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/dlm/api.go b/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go deleted file mode 100644 index 82d7778f1..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go +++ /dev/null @@ -1,1369 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package dlm - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opCreateLifecyclePolicy = "CreateLifecyclePolicy" - -// CreateLifecyclePolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreateLifecyclePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLifecyclePolicy for more information on using the CreateLifecyclePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLifecyclePolicyRequest method. -// req, resp := client.CreateLifecyclePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/CreateLifecyclePolicy -func (c *DLM) CreateLifecyclePolicyRequest(input *CreateLifecyclePolicyInput) (req *request.Request, output *CreateLifecyclePolicyOutput) { - op := &request.Operation{ - Name: opCreateLifecyclePolicy, - HTTPMethod: "POST", - HTTPPath: "/policies", - } - - if input == nil { - input = &CreateLifecyclePolicyInput{} - } - - output = &CreateLifecyclePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLifecyclePolicy API operation for Amazon Data Lifecycle Manager. -// -// Creates a policy to manage the lifecycle of the specified AWS resources. -// You can create up to 100 lifecycle policies. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Data Lifecycle Manager's -// API operation CreateLifecyclePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Bad request. The request is missing required parameters or has invalid parameters. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request failed because a limit was exceeded. -// -// * ErrCodeInternalServerException "InternalServerException" -// The service failed in an unexpected way. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/CreateLifecyclePolicy -func (c *DLM) CreateLifecyclePolicy(input *CreateLifecyclePolicyInput) (*CreateLifecyclePolicyOutput, error) { - req, out := c.CreateLifecyclePolicyRequest(input) - return out, req.Send() -} - -// CreateLifecyclePolicyWithContext is the same as CreateLifecyclePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLifecyclePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DLM) CreateLifecyclePolicyWithContext(ctx aws.Context, input *CreateLifecyclePolicyInput, opts ...request.Option) (*CreateLifecyclePolicyOutput, error) { - req, out := c.CreateLifecyclePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy" - -// DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLifecyclePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLifecyclePolicy for more information on using the DeleteLifecyclePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLifecyclePolicyRequest method. -// req, resp := client.DeleteLifecyclePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/DeleteLifecyclePolicy -func (c *DLM) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput) { - op := &request.Operation{ - Name: opDeleteLifecyclePolicy, - HTTPMethod: "DELETE", - HTTPPath: "/policies/{policyId}/", - } - - if input == nil { - input = &DeleteLifecyclePolicyInput{} - } - - output = &DeleteLifecyclePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLifecyclePolicy API operation for Amazon Data Lifecycle Manager. -// -// Deletes the specified lifecycle policy and halts the automated operations -// that the policy specified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Data Lifecycle Manager's -// API operation DeleteLifecyclePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A requested resource was not found. -// -// * ErrCodeInternalServerException "InternalServerException" -// The service failed in an unexpected way. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request failed because a limit was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/DeleteLifecyclePolicy -func (c *DLM) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error) { - req, out := c.DeleteLifecyclePolicyRequest(input) - return out, req.Send() -} - -// DeleteLifecyclePolicyWithContext is the same as DeleteLifecyclePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLifecyclePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DLM) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error) { - req, out := c.DeleteLifecyclePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLifecyclePolicies = "GetLifecyclePolicies" - -// GetLifecyclePoliciesRequest generates a "aws/request.Request" representing the -// client's request for the GetLifecyclePolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLifecyclePolicies for more information on using the GetLifecyclePolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLifecyclePoliciesRequest method. -// req, resp := client.GetLifecyclePoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/GetLifecyclePolicies -func (c *DLM) GetLifecyclePoliciesRequest(input *GetLifecyclePoliciesInput) (req *request.Request, output *GetLifecyclePoliciesOutput) { - op := &request.Operation{ - Name: opGetLifecyclePolicies, - HTTPMethod: "GET", - HTTPPath: "/policies", - } - - if input == nil { - input = &GetLifecyclePoliciesInput{} - } - - output = &GetLifecyclePoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLifecyclePolicies API operation for Amazon Data Lifecycle Manager. -// -// Gets summary information about all or the specified data lifecycle policies. -// -// To get complete information about a policy, use GetLifecyclePolicy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Data Lifecycle Manager's -// API operation GetLifecyclePolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A requested resource was not found. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Bad request. The request is missing required parameters or has invalid parameters. -// -// * ErrCodeInternalServerException "InternalServerException" -// The service failed in an unexpected way. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request failed because a limit was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/GetLifecyclePolicies -func (c *DLM) GetLifecyclePolicies(input *GetLifecyclePoliciesInput) (*GetLifecyclePoliciesOutput, error) { - req, out := c.GetLifecyclePoliciesRequest(input) - return out, req.Send() -} - -// GetLifecyclePoliciesWithContext is the same as GetLifecyclePolicies with the addition of -// the ability to pass a context and additional request options. -// -// See GetLifecyclePolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DLM) GetLifecyclePoliciesWithContext(ctx aws.Context, input *GetLifecyclePoliciesInput, opts ...request.Option) (*GetLifecyclePoliciesOutput, error) { - req, out := c.GetLifecyclePoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLifecyclePolicy = "GetLifecyclePolicy" - -// GetLifecyclePolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetLifecyclePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLifecyclePolicy for more information on using the GetLifecyclePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLifecyclePolicyRequest method. -// req, resp := client.GetLifecyclePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/GetLifecyclePolicy -func (c *DLM) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput) { - op := &request.Operation{ - Name: opGetLifecyclePolicy, - HTTPMethod: "GET", - HTTPPath: "/policies/{policyId}/", - } - - if input == nil { - input = &GetLifecyclePolicyInput{} - } - - output = &GetLifecyclePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLifecyclePolicy API operation for Amazon Data Lifecycle Manager. -// -// Gets detailed information about the specified lifecycle policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Data Lifecycle Manager's -// API operation GetLifecyclePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A requested resource was not found. -// -// * ErrCodeInternalServerException "InternalServerException" -// The service failed in an unexpected way. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request failed because a limit was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/GetLifecyclePolicy -func (c *DLM) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error) { - req, out := c.GetLifecyclePolicyRequest(input) - return out, req.Send() -} - -// GetLifecyclePolicyWithContext is the same as GetLifecyclePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetLifecyclePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DLM) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error) { - req, out := c.GetLifecyclePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateLifecyclePolicy = "UpdateLifecyclePolicy" - -// UpdateLifecyclePolicyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateLifecyclePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateLifecyclePolicy for more information on using the UpdateLifecyclePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateLifecyclePolicyRequest method. -// req, resp := client.UpdateLifecyclePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/UpdateLifecyclePolicy -func (c *DLM) UpdateLifecyclePolicyRequest(input *UpdateLifecyclePolicyInput) (req *request.Request, output *UpdateLifecyclePolicyOutput) { - op := &request.Operation{ - Name: opUpdateLifecyclePolicy, - HTTPMethod: "PATCH", - HTTPPath: "/policies/{policyId}", - } - - if input == nil { - input = &UpdateLifecyclePolicyInput{} - } - - output = &UpdateLifecyclePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateLifecyclePolicy API operation for Amazon Data Lifecycle Manager. -// -// Updates the specified lifecycle policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Data Lifecycle Manager's -// API operation UpdateLifecyclePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A requested resource was not found. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// Bad request. The request is missing required parameters or has invalid parameters. -// -// * ErrCodeInternalServerException "InternalServerException" -// The service failed in an unexpected way. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request failed because a limit was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/UpdateLifecyclePolicy -func (c *DLM) UpdateLifecyclePolicy(input *UpdateLifecyclePolicyInput) (*UpdateLifecyclePolicyOutput, error) { - req, out := c.UpdateLifecyclePolicyRequest(input) - return out, req.Send() -} - -// UpdateLifecyclePolicyWithContext is the same as UpdateLifecyclePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateLifecyclePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DLM) UpdateLifecyclePolicyWithContext(ctx aws.Context, input *UpdateLifecyclePolicyInput, opts ...request.Option) (*UpdateLifecyclePolicyOutput, error) { - req, out := c.UpdateLifecyclePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type CreateLifecyclePolicyInput struct { - _ struct{} `type:"structure"` - - // A description of the lifecycle policy. The characters ^[0-9A-Za-z _-]+$ are - // supported. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM role used to run the operations - // specified by the lifecycle policy. - // - // ExecutionRoleArn is a required field - ExecutionRoleArn *string `type:"string" required:"true"` - - // The configuration details of the lifecycle policy. - // - // Target tags cannot be re-used across lifecycle policies. - // - // PolicyDetails is a required field - PolicyDetails *PolicyDetails `type:"structure" required:"true"` - - // The desired activation state of the lifecycle policy after creation. - // - // State is a required field - State *string `type:"string" required:"true" enum:"SettablePolicyStateValues"` -} - -// String returns the string representation -func (s CreateLifecyclePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLifecyclePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLifecyclePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLifecyclePolicyInput"} - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - if s.ExecutionRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("ExecutionRoleArn")) - } - if s.PolicyDetails == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDetails")) - } - if s.State == nil { - invalidParams.Add(request.NewErrParamRequired("State")) - } - if s.PolicyDetails != nil { - if err := s.PolicyDetails.Validate(); err != nil { - invalidParams.AddNested("PolicyDetails", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateLifecyclePolicyInput) SetDescription(v string) *CreateLifecyclePolicyInput { - s.Description = &v - return s -} - -// SetExecutionRoleArn sets the ExecutionRoleArn field's value. -func (s *CreateLifecyclePolicyInput) SetExecutionRoleArn(v string) *CreateLifecyclePolicyInput { - s.ExecutionRoleArn = &v - return s -} - -// SetPolicyDetails sets the PolicyDetails field's value. -func (s *CreateLifecyclePolicyInput) SetPolicyDetails(v *PolicyDetails) *CreateLifecyclePolicyInput { - s.PolicyDetails = v - return s -} - -// SetState sets the State field's value. -func (s *CreateLifecyclePolicyInput) SetState(v string) *CreateLifecyclePolicyInput { - s.State = &v - return s -} - -type CreateLifecyclePolicyOutput struct { - _ struct{} `type:"structure"` - - // The identifier of the lifecycle policy. - PolicyId *string `type:"string"` -} - -// String returns the string representation -func (s CreateLifecyclePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLifecyclePolicyOutput) GoString() string { - return s.String() -} - -// SetPolicyId sets the PolicyId field's value. -func (s *CreateLifecyclePolicyOutput) SetPolicyId(v string) *CreateLifecyclePolicyOutput { - s.PolicyId = &v - return s -} - -// Specifies when to create snapshots of EBS volumes. -type CreateRule struct { - _ struct{} `type:"structure"` - - // The interval. The supported values are 12 and 24. - // - // Interval is a required field - Interval *int64 `min:"1" type:"integer" required:"true"` - - // The interval unit. - // - // IntervalUnit is a required field - IntervalUnit *string `type:"string" required:"true" enum:"IntervalUnitValues"` - - // The time, in UTC, to start the operation. - // - // The operation occurs within a one-hour window following the specified time. - Times []*string `type:"list"` -} - -// String returns the string representation -func (s CreateRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRule"} - if s.Interval == nil { - invalidParams.Add(request.NewErrParamRequired("Interval")) - } - if s.Interval != nil && *s.Interval < 1 { - invalidParams.Add(request.NewErrParamMinValue("Interval", 1)) - } - if s.IntervalUnit == nil { - invalidParams.Add(request.NewErrParamRequired("IntervalUnit")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInterval sets the Interval field's value. -func (s *CreateRule) SetInterval(v int64) *CreateRule { - s.Interval = &v - return s -} - -// SetIntervalUnit sets the IntervalUnit field's value. -func (s *CreateRule) SetIntervalUnit(v string) *CreateRule { - s.IntervalUnit = &v - return s -} - -// SetTimes sets the Times field's value. -func (s *CreateRule) SetTimes(v []*string) *CreateRule { - s.Times = v - return s -} - -type DeleteLifecyclePolicyInput struct { - _ struct{} `type:"structure"` - - // The identifier of the lifecycle policy. - // - // PolicyId is a required field - PolicyId *string `location:"uri" locationName:"policyId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLifecyclePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLifecyclePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLifecyclePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLifecyclePolicyInput"} - if s.PolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyId")) - } - if s.PolicyId != nil && len(*s.PolicyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyId sets the PolicyId field's value. -func (s *DeleteLifecyclePolicyInput) SetPolicyId(v string) *DeleteLifecyclePolicyInput { - s.PolicyId = &v - return s -} - -type DeleteLifecyclePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLifecyclePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLifecyclePolicyOutput) GoString() string { - return s.String() -} - -type GetLifecyclePoliciesInput struct { - _ struct{} `type:"structure"` - - // The identifiers of the data lifecycle policies. - PolicyIds []*string `location:"querystring" locationName:"policyIds" type:"list"` - - // The resource type. - ResourceTypes []*string `location:"querystring" locationName:"resourceTypes" min:"1" type:"list"` - - // The activation state. - State *string `location:"querystring" locationName:"state" type:"string" enum:"GettablePolicyStateValues"` - - // The tags to add to objects created by the policy. - // - // Tags are strings in the format key=value. - // - // These user-defined tags are added in addition to the AWS-added lifecycle - // tags. - TagsToAdd []*string `location:"querystring" locationName:"tagsToAdd" type:"list"` - - // The target tag for a policy. - // - // Tags are strings in the format key=value. - TargetTags []*string `location:"querystring" locationName:"targetTags" min:"1" type:"list"` -} - -// String returns the string representation -func (s GetLifecyclePoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLifecyclePoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLifecyclePoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePoliciesInput"} - if s.ResourceTypes != nil && len(s.ResourceTypes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceTypes", 1)) - } - if s.TargetTags != nil && len(s.TargetTags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetTags", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyIds sets the PolicyIds field's value. -func (s *GetLifecyclePoliciesInput) SetPolicyIds(v []*string) *GetLifecyclePoliciesInput { - s.PolicyIds = v - return s -} - -// SetResourceTypes sets the ResourceTypes field's value. -func (s *GetLifecyclePoliciesInput) SetResourceTypes(v []*string) *GetLifecyclePoliciesInput { - s.ResourceTypes = v - return s -} - -// SetState sets the State field's value. -func (s *GetLifecyclePoliciesInput) SetState(v string) *GetLifecyclePoliciesInput { - s.State = &v - return s -} - -// SetTagsToAdd sets the TagsToAdd field's value. -func (s *GetLifecyclePoliciesInput) SetTagsToAdd(v []*string) *GetLifecyclePoliciesInput { - s.TagsToAdd = v - return s -} - -// SetTargetTags sets the TargetTags field's value. -func (s *GetLifecyclePoliciesInput) SetTargetTags(v []*string) *GetLifecyclePoliciesInput { - s.TargetTags = v - return s -} - -type GetLifecyclePoliciesOutput struct { - _ struct{} `type:"structure"` - - // Summary information about the lifecycle policies. - Policies []*LifecyclePolicySummary `type:"list"` -} - -// String returns the string representation -func (s GetLifecyclePoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLifecyclePoliciesOutput) GoString() string { - return s.String() -} - -// SetPolicies sets the Policies field's value. -func (s *GetLifecyclePoliciesOutput) SetPolicies(v []*LifecyclePolicySummary) *GetLifecyclePoliciesOutput { - s.Policies = v - return s -} - -type GetLifecyclePolicyInput struct { - _ struct{} `type:"structure"` - - // The identifier of the lifecycle policy. - // - // PolicyId is a required field - PolicyId *string `location:"uri" locationName:"policyId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetLifecyclePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLifecyclePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLifecyclePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyInput"} - if s.PolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyId")) - } - if s.PolicyId != nil && len(*s.PolicyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyId sets the PolicyId field's value. -func (s *GetLifecyclePolicyInput) SetPolicyId(v string) *GetLifecyclePolicyInput { - s.PolicyId = &v - return s -} - -type GetLifecyclePolicyOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about the lifecycle policy. - Policy *LifecyclePolicy `type:"structure"` -} - -// String returns the string representation -func (s GetLifecyclePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLifecyclePolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *GetLifecyclePolicyOutput) SetPolicy(v *LifecyclePolicy) *GetLifecyclePolicyOutput { - s.Policy = v - return s -} - -// Detailed information about a lifecycle policy. -type LifecyclePolicy struct { - _ struct{} `type:"structure"` - - // The local date and time when the lifecycle policy was created. - DateCreated *time.Time `type:"timestamp"` - - // The local date and time when the lifecycle policy was last modified. - DateModified *time.Time `type:"timestamp"` - - // The description of the lifecycle policy. - Description *string `type:"string"` - - // The Amazon Resource Name (ARN) of the IAM role used to run the operations - // specified by the lifecycle policy. - ExecutionRoleArn *string `type:"string"` - - // The configuration of the lifecycle policy - PolicyDetails *PolicyDetails `type:"structure"` - - // The identifier of the lifecycle policy. - PolicyId *string `type:"string"` - - // The activation state of the lifecycle policy. - State *string `type:"string" enum:"GettablePolicyStateValues"` -} - -// String returns the string representation -func (s LifecyclePolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LifecyclePolicy) GoString() string { - return s.String() -} - -// SetDateCreated sets the DateCreated field's value. -func (s *LifecyclePolicy) SetDateCreated(v time.Time) *LifecyclePolicy { - s.DateCreated = &v - return s -} - -// SetDateModified sets the DateModified field's value. -func (s *LifecyclePolicy) SetDateModified(v time.Time) *LifecyclePolicy { - s.DateModified = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *LifecyclePolicy) SetDescription(v string) *LifecyclePolicy { - s.Description = &v - return s -} - -// SetExecutionRoleArn sets the ExecutionRoleArn field's value. -func (s *LifecyclePolicy) SetExecutionRoleArn(v string) *LifecyclePolicy { - s.ExecutionRoleArn = &v - return s -} - -// SetPolicyDetails sets the PolicyDetails field's value. -func (s *LifecyclePolicy) SetPolicyDetails(v *PolicyDetails) *LifecyclePolicy { - s.PolicyDetails = v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *LifecyclePolicy) SetPolicyId(v string) *LifecyclePolicy { - s.PolicyId = &v - return s -} - -// SetState sets the State field's value. -func (s *LifecyclePolicy) SetState(v string) *LifecyclePolicy { - s.State = &v - return s -} - -// Summary information about a lifecycle policy. -type LifecyclePolicySummary struct { - _ struct{} `type:"structure"` - - // The description of the lifecycle policy. - Description *string `type:"string"` - - // The identifier of the lifecycle policy. - PolicyId *string `type:"string"` - - // The activation state of the lifecycle policy. - State *string `type:"string" enum:"GettablePolicyStateValues"` -} - -// String returns the string representation -func (s LifecyclePolicySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LifecyclePolicySummary) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *LifecyclePolicySummary) SetDescription(v string) *LifecyclePolicySummary { - s.Description = &v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *LifecyclePolicySummary) SetPolicyId(v string) *LifecyclePolicySummary { - s.PolicyId = &v - return s -} - -// SetState sets the State field's value. -func (s *LifecyclePolicySummary) SetState(v string) *LifecyclePolicySummary { - s.State = &v - return s -} - -// Specifies the configuration of a lifecycle policy. -type PolicyDetails struct { - _ struct{} `type:"structure"` - - // The resource type. - ResourceTypes []*string `min:"1" type:"list"` - - // The schedule of policy-defined actions. - Schedules []*Schedule `min:"1" type:"list"` - - // The single tag that identifies targeted resources for this policy. - TargetTags []*Tag `min:"1" type:"list"` -} - -// String returns the string representation -func (s PolicyDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PolicyDetails) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PolicyDetails) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PolicyDetails"} - if s.ResourceTypes != nil && len(s.ResourceTypes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceTypes", 1)) - } - if s.Schedules != nil && len(s.Schedules) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Schedules", 1)) - } - if s.TargetTags != nil && len(s.TargetTags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetTags", 1)) - } - if s.Schedules != nil { - for i, v := range s.Schedules { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Schedules", i), err.(request.ErrInvalidParams)) - } - } - } - if s.TargetTags != nil { - for i, v := range s.TargetTags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetTags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceTypes sets the ResourceTypes field's value. -func (s *PolicyDetails) SetResourceTypes(v []*string) *PolicyDetails { - s.ResourceTypes = v - return s -} - -// SetSchedules sets the Schedules field's value. -func (s *PolicyDetails) SetSchedules(v []*Schedule) *PolicyDetails { - s.Schedules = v - return s -} - -// SetTargetTags sets the TargetTags field's value. -func (s *PolicyDetails) SetTargetTags(v []*Tag) *PolicyDetails { - s.TargetTags = v - return s -} - -// Specifies the number of snapshots to keep for each EBS volume. -type RetainRule struct { - _ struct{} `type:"structure"` - - // The number of snapshots to keep for each volume, up to a maximum of 1000. - // - // Count is a required field - Count *int64 `min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s RetainRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RetainRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RetainRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RetainRule"} - if s.Count == nil { - invalidParams.Add(request.NewErrParamRequired("Count")) - } - if s.Count != nil && *s.Count < 1 { - invalidParams.Add(request.NewErrParamMinValue("Count", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCount sets the Count field's value. -func (s *RetainRule) SetCount(v int64) *RetainRule { - s.Count = &v - return s -} - -// Specifies a schedule. -type Schedule struct { - _ struct{} `type:"structure"` - - CopyTags *bool `type:"boolean"` - - // The create rule. - CreateRule *CreateRule `type:"structure"` - - // The name of the schedule. - Name *string `type:"string"` - - // The retain rule. - RetainRule *RetainRule `type:"structure"` - - // The tags to apply to policy-created resources. These user-defined tags are - // in addition to the AWS-added lifecycle tags. - TagsToAdd []*Tag `type:"list"` -} - -// String returns the string representation -func (s Schedule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Schedule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Schedule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Schedule"} - if s.CreateRule != nil { - if err := s.CreateRule.Validate(); err != nil { - invalidParams.AddNested("CreateRule", err.(request.ErrInvalidParams)) - } - } - if s.RetainRule != nil { - if err := s.RetainRule.Validate(); err != nil { - invalidParams.AddNested("RetainRule", err.(request.ErrInvalidParams)) - } - } - if s.TagsToAdd != nil { - for i, v := range s.TagsToAdd { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsToAdd", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCopyTags sets the CopyTags field's value. -func (s *Schedule) SetCopyTags(v bool) *Schedule { - s.CopyTags = &v - return s -} - -// SetCreateRule sets the CreateRule field's value. -func (s *Schedule) SetCreateRule(v *CreateRule) *Schedule { - s.CreateRule = v - return s -} - -// SetName sets the Name field's value. -func (s *Schedule) SetName(v string) *Schedule { - s.Name = &v - return s -} - -// SetRetainRule sets the RetainRule field's value. -func (s *Schedule) SetRetainRule(v *RetainRule) *Schedule { - s.RetainRule = v - return s -} - -// SetTagsToAdd sets the TagsToAdd field's value. -func (s *Schedule) SetTagsToAdd(v []*Tag) *Schedule { - s.TagsToAdd = v - return s -} - -// Specifies a tag for a resource. -type Tag struct { - _ struct{} `type:"structure"` - - // The tag key. - // - // Key is a required field - Key *string `type:"string" required:"true"` - - // The tag value. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type UpdateLifecyclePolicyInput struct { - _ struct{} `type:"structure"` - - // A description of the lifecycle policy. - Description *string `type:"string"` - - // The Amazon Resource Name (ARN) of the IAM role used to run the operations - // specified by the lifecycle policy. - ExecutionRoleArn *string `type:"string"` - - // The configuration of the lifecycle policy. - // - // Target tags cannot be re-used across policies. - PolicyDetails *PolicyDetails `type:"structure"` - - // The identifier of the lifecycle policy. - // - // PolicyId is a required field - PolicyId *string `location:"uri" locationName:"policyId" type:"string" required:"true"` - - // The desired activation state of the lifecycle policy after creation. - State *string `type:"string" enum:"SettablePolicyStateValues"` -} - -// String returns the string representation -func (s UpdateLifecyclePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateLifecyclePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateLifecyclePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateLifecyclePolicyInput"} - if s.PolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyId")) - } - if s.PolicyId != nil && len(*s.PolicyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyId", 1)) - } - if s.PolicyDetails != nil { - if err := s.PolicyDetails.Validate(); err != nil { - invalidParams.AddNested("PolicyDetails", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateLifecyclePolicyInput) SetDescription(v string) *UpdateLifecyclePolicyInput { - s.Description = &v - return s -} - -// SetExecutionRoleArn sets the ExecutionRoleArn field's value. -func (s *UpdateLifecyclePolicyInput) SetExecutionRoleArn(v string) *UpdateLifecyclePolicyInput { - s.ExecutionRoleArn = &v - return s -} - -// SetPolicyDetails sets the PolicyDetails field's value. -func (s *UpdateLifecyclePolicyInput) SetPolicyDetails(v *PolicyDetails) *UpdateLifecyclePolicyInput { - s.PolicyDetails = v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *UpdateLifecyclePolicyInput) SetPolicyId(v string) *UpdateLifecyclePolicyInput { - s.PolicyId = &v - return s -} - -// SetState sets the State field's value. -func (s *UpdateLifecyclePolicyInput) SetState(v string) *UpdateLifecyclePolicyInput { - s.State = &v - return s -} - -type UpdateLifecyclePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateLifecyclePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateLifecyclePolicyOutput) GoString() string { - return s.String() -} - -const ( - // GettablePolicyStateValuesEnabled is a GettablePolicyStateValues enum value - GettablePolicyStateValuesEnabled = "ENABLED" - - // GettablePolicyStateValuesDisabled is a GettablePolicyStateValues enum value - GettablePolicyStateValuesDisabled = "DISABLED" - - // GettablePolicyStateValuesError is a GettablePolicyStateValues enum value - GettablePolicyStateValuesError = "ERROR" -) - -const ( - // IntervalUnitValuesHours is a IntervalUnitValues enum value - IntervalUnitValuesHours = "HOURS" -) - -const ( - // ResourceTypeValuesVolume is a ResourceTypeValues enum value - ResourceTypeValuesVolume = "VOLUME" -) - -const ( - // SettablePolicyStateValuesEnabled is a SettablePolicyStateValues enum value - SettablePolicyStateValuesEnabled = "ENABLED" - - // SettablePolicyStateValuesDisabled is a SettablePolicyStateValues enum value - SettablePolicyStateValuesDisabled = "DISABLED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/dlm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/dlm/doc.go deleted file mode 100644 index 52f3edd73..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/dlm/doc.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package dlm provides the client and types for making API -// requests to Amazon Data Lifecycle Manager. -// -// With Amazon Data Lifecycle Manager, you can manage the lifecycle of your -// AWS resources. You create lifecycle policies, which are used to automate -// operations on the specified resources. -// -// Amazon DLM supports Amazon EBS volumes and snapshots. For information about -// using Amazon DLM with Amazon EBS, see Automating the Amazon EBS Snapshot -// Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html) -// in the Amazon EC2 User Guide. -// -// See https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12 for more information on this service. -// -// See dlm package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/dlm/ -// -// Using the Client -// -// To contact Amazon Data Lifecycle Manager with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Data Lifecycle Manager client DLM for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/dlm/#New -package dlm diff --git a/vendor/github.com/aws/aws-sdk-go/service/dlm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/dlm/errors.go deleted file mode 100644 index f2f7e4b92..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/dlm/errors.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package dlm - -const ( - - // ErrCodeInternalServerException for service response error code - // "InternalServerException". - // - // The service failed in an unexpected way. - ErrCodeInternalServerException = "InternalServerException" - - // ErrCodeInvalidRequestException for service response error code - // "InvalidRequestException". - // - // Bad request. The request is missing required parameters or has invalid parameters. - ErrCodeInvalidRequestException = "InvalidRequestException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The request failed because a limit was exceeded. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // A requested resource was not found. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/dlm/service.go b/vendor/github.com/aws/aws-sdk-go/service/dlm/service.go deleted file mode 100644 index 63b2a803e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/dlm/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package dlm - -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" -) - -// DLM provides the API operation methods for making requests to -// Amazon Data Lifecycle Manager. See this package's package overview docs -// for details on the service. -// -// DLM methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type DLM 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 = "DLM" // Name of service. - EndpointsID = "dlm" // ID to lookup a service endpoint with. - ServiceID = "DLM" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the DLM 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 DLM client from just a session. -// svc := dlm.New(mySession) -// -// // Create a DLM client with additional configuration -// svc := dlm.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *DLM { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "dlm" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DLM { - svc := &DLM{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-01-12", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a DLM operation and runs any -// custom request initialization. -func (c *DLM) 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/docdb/api.go b/vendor/github.com/aws/aws-sdk-go/service/docdb/api.go deleted file mode 100644 index 471a189f1..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/docdb/api.go +++ /dev/null @@ -1,10980 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package docdb - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/query" -) - -const opAddTagsToResource = "AddTagsToResource" - -// AddTagsToResourceRequest generates a "aws/request.Request" representing the -// client's request for the AddTagsToResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTagsToResource for more information on using the AddTagsToResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsToResourceRequest method. -// req, resp := client.AddTagsToResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/AddTagsToResource -func (c *DocDB) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *request.Request, output *AddTagsToResourceOutput) { - op := &request.Operation{ - Name: opAddTagsToResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsToResourceInput{} - } - - output = &AddTagsToResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTagsToResource API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Adds metadata tags to an Amazon DocumentDB resource. You can use these tags -// with cost allocation reporting to track costs that are associated with Amazon -// DocumentDB resources. or in a Condition statement in an AWS Identity and -// Access Management (IAM) policy for Amazon DocumentDB. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation AddTagsToResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/AddTagsToResource -func (c *DocDB) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { - req, out := c.AddTagsToResourceRequest(input) - return out, req.Send() -} - -// AddTagsToResourceWithContext is the same as AddTagsToResource with the addition of -// the ability to pass a context and additional request options. -// -// See AddTagsToResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) AddTagsToResourceWithContext(ctx aws.Context, input *AddTagsToResourceInput, opts ...request.Option) (*AddTagsToResourceOutput, error) { - req, out := c.AddTagsToResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opApplyPendingMaintenanceAction = "ApplyPendingMaintenanceAction" - -// ApplyPendingMaintenanceActionRequest generates a "aws/request.Request" representing the -// client's request for the ApplyPendingMaintenanceAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ApplyPendingMaintenanceAction for more information on using the ApplyPendingMaintenanceAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ApplyPendingMaintenanceActionRequest method. -// req, resp := client.ApplyPendingMaintenanceActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ApplyPendingMaintenanceAction -func (c *DocDB) ApplyPendingMaintenanceActionRequest(input *ApplyPendingMaintenanceActionInput) (req *request.Request, output *ApplyPendingMaintenanceActionOutput) { - op := &request.Operation{ - Name: opApplyPendingMaintenanceAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ApplyPendingMaintenanceActionInput{} - } - - output = &ApplyPendingMaintenanceActionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ApplyPendingMaintenanceAction API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Applies a pending maintenance action to a resource (for example, to a DB -// instance). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation ApplyPendingMaintenanceAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The specified resource ID was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ApplyPendingMaintenanceAction -func (c *DocDB) ApplyPendingMaintenanceAction(input *ApplyPendingMaintenanceActionInput) (*ApplyPendingMaintenanceActionOutput, error) { - req, out := c.ApplyPendingMaintenanceActionRequest(input) - return out, req.Send() -} - -// ApplyPendingMaintenanceActionWithContext is the same as ApplyPendingMaintenanceAction with the addition of -// the ability to pass a context and additional request options. -// -// See ApplyPendingMaintenanceAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) ApplyPendingMaintenanceActionWithContext(ctx aws.Context, input *ApplyPendingMaintenanceActionInput, opts ...request.Option) (*ApplyPendingMaintenanceActionOutput, error) { - req, out := c.ApplyPendingMaintenanceActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyDBClusterParameterGroup = "CopyDBClusterParameterGroup" - -// CopyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the CopyDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyDBClusterParameterGroup for more information on using the CopyDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyDBClusterParameterGroupRequest method. -// req, resp := client.CopyDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CopyDBClusterParameterGroup -func (c *DocDB) CopyDBClusterParameterGroupRequest(input *CopyDBClusterParameterGroupInput) (req *request.Request, output *CopyDBClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opCopyDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyDBClusterParameterGroupInput{} - } - - output = &CopyDBClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyDBClusterParameterGroup API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Copies the specified DB cluster parameter group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation CopyDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// This request would cause you to exceed the allowed number of DB parameter -// groups. -// -// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" -// A DB parameter group with the same name already exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CopyDBClusterParameterGroup -func (c *DocDB) CopyDBClusterParameterGroup(input *CopyDBClusterParameterGroupInput) (*CopyDBClusterParameterGroupOutput, error) { - req, out := c.CopyDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// CopyDBClusterParameterGroupWithContext is the same as CopyDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CopyDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) CopyDBClusterParameterGroupWithContext(ctx aws.Context, input *CopyDBClusterParameterGroupInput, opts ...request.Option) (*CopyDBClusterParameterGroupOutput, error) { - req, out := c.CopyDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyDBClusterSnapshot = "CopyDBClusterSnapshot" - -// CopyDBClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CopyDBClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyDBClusterSnapshot for more information on using the CopyDBClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyDBClusterSnapshotRequest method. -// req, resp := client.CopyDBClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CopyDBClusterSnapshot -func (c *DocDB) CopyDBClusterSnapshotRequest(input *CopyDBClusterSnapshotInput) (req *request.Request, output *CopyDBClusterSnapshotOutput) { - op := &request.Operation{ - Name: opCopyDBClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyDBClusterSnapshotInput{} - } - - output = &CopyDBClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyDBClusterSnapshot API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Copies a snapshot of a DB cluster. -// -// To copy a DB cluster snapshot from a shared manual DB cluster snapshot, SourceDBClusterSnapshotIdentifier -// must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot. -// -// To cancel the copy operation after it is in progress, delete the target DB -// cluster snapshot identified by TargetDBClusterSnapshotIdentifier while that -// DB cluster snapshot is in the copying 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 Amazon DocumentDB with MongoDB compatibility's -// API operation CopyDBClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// You already have a DB cluster snapshot with the given identifier. -// -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The provided value isn't a valid DB cluster snapshot state. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// The request would cause you to exceed the allowed number of DB snapshots. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred when accessing an AWS KMS key. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CopyDBClusterSnapshot -func (c *DocDB) CopyDBClusterSnapshot(input *CopyDBClusterSnapshotInput) (*CopyDBClusterSnapshotOutput, error) { - req, out := c.CopyDBClusterSnapshotRequest(input) - return out, req.Send() -} - -// CopyDBClusterSnapshotWithContext is the same as CopyDBClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CopyDBClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) CopyDBClusterSnapshotWithContext(ctx aws.Context, input *CopyDBClusterSnapshotInput, opts ...request.Option) (*CopyDBClusterSnapshotOutput, error) { - req, out := c.CopyDBClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBCluster = "CreateDBCluster" - -// CreateDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBCluster for more information on using the CreateDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBClusterRequest method. -// req, resp := client.CreateDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBCluster -func (c *DocDB) CreateDBClusterRequest(input *CreateDBClusterInput) (req *request.Request, output *CreateDBClusterOutput) { - op := &request.Operation{ - Name: opCreateDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBClusterInput{} - } - - output = &CreateDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBCluster API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Creates a new Amazon DocumentDB DB cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation CreateDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// You already have a DB cluster with the given identifier. -// -// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is not enough storage available for the current action. You might be -// able to resolve this error by updating your subnet group to use different -// Availability Zones that have more storage available. -// -// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// The DB cluster can't be created because you have reached the maximum allowed -// quota of DB clusters. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would cause you to exceed the allowed amount of storage available -// across all DB instances. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it is created -// because of changes that were made. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. -// -// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group can't be deleted because it's in use. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is not valid, or multiple subnets were requested that -// are not all in a common virtual private cloud (VPC). -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. -// -// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter -// group. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred when accessing an AWS KMS key. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBCluster -func (c *DocDB) CreateDBCluster(input *CreateDBClusterInput) (*CreateDBClusterOutput, error) { - req, out := c.CreateDBClusterRequest(input) - return out, req.Send() -} - -// CreateDBClusterWithContext is the same as CreateDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) CreateDBClusterWithContext(ctx aws.Context, input *CreateDBClusterInput, opts ...request.Option) (*CreateDBClusterOutput, error) { - req, out := c.CreateDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBClusterParameterGroup = "CreateDBClusterParameterGroup" - -// CreateDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBClusterParameterGroup for more information on using the CreateDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBClusterParameterGroupRequest method. -// req, resp := client.CreateDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBClusterParameterGroup -func (c *DocDB) CreateDBClusterParameterGroupRequest(input *CreateDBClusterParameterGroupInput) (req *request.Request, output *CreateDBClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opCreateDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBClusterParameterGroupInput{} - } - - output = &CreateDBClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBClusterParameterGroup API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Creates a new DB cluster parameter group. -// -// Parameters in a DB cluster parameter group apply to all of the instances -// in a DB cluster. -// -// A DB cluster parameter group is initially created with the default parameters -// for the database engine used by instances in the DB cluster. To provide custom -// values for any of the parameters, you must modify the group after you create -// it. After you create a DB cluster parameter group, you must associate it -// with your DB cluster. For the new DB cluster parameter group and associated -// settings to take effect, you must then reboot the DB instances in the DB -// cluster without failover. -// -// After you create a DB cluster parameter group, you should wait at least 5 -// minutes before creating your first DB cluster that uses that DB cluster parameter -// group as the default parameter group. This allows Amazon DocumentDB to fully -// complete the create action before the DB cluster parameter group is used -// as the default for a new DB cluster. This step is especially important for -// parameters that are critical when creating the default database for a DB -// cluster, such as the character set for the default database defined by the -// character_set_database parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation CreateDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// This request would cause you to exceed the allowed number of DB parameter -// groups. -// -// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" -// A DB parameter group with the same name already exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBClusterParameterGroup -func (c *DocDB) CreateDBClusterParameterGroup(input *CreateDBClusterParameterGroupInput) (*CreateDBClusterParameterGroupOutput, error) { - req, out := c.CreateDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// CreateDBClusterParameterGroupWithContext is the same as CreateDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) CreateDBClusterParameterGroupWithContext(ctx aws.Context, input *CreateDBClusterParameterGroupInput, opts ...request.Option) (*CreateDBClusterParameterGroupOutput, error) { - req, out := c.CreateDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBClusterSnapshot = "CreateDBClusterSnapshot" - -// CreateDBClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBClusterSnapshot for more information on using the CreateDBClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBClusterSnapshotRequest method. -// req, resp := client.CreateDBClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBClusterSnapshot -func (c *DocDB) CreateDBClusterSnapshotRequest(input *CreateDBClusterSnapshotInput) (req *request.Request, output *CreateDBClusterSnapshotOutput) { - op := &request.Operation{ - Name: opCreateDBClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBClusterSnapshotInput{} - } - - output = &CreateDBClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBClusterSnapshot API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Creates a snapshot of a DB cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation CreateDBClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// You already have a DB cluster snapshot with the given identifier. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// The request would cause you to exceed the allowed number of DB snapshots. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The provided value isn't a valid DB cluster snapshot state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBClusterSnapshot -func (c *DocDB) CreateDBClusterSnapshot(input *CreateDBClusterSnapshotInput) (*CreateDBClusterSnapshotOutput, error) { - req, out := c.CreateDBClusterSnapshotRequest(input) - return out, req.Send() -} - -// CreateDBClusterSnapshotWithContext is the same as CreateDBClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) CreateDBClusterSnapshotWithContext(ctx aws.Context, input *CreateDBClusterSnapshotInput, opts ...request.Option) (*CreateDBClusterSnapshotOutput, error) { - req, out := c.CreateDBClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBInstance = "CreateDBInstance" - -// CreateDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBInstance for more information on using the CreateDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBInstanceRequest method. -// req, resp := client.CreateDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBInstance -func (c *DocDB) CreateDBInstanceRequest(input *CreateDBInstanceInput) (req *request.Request, output *CreateDBInstanceOutput) { - op := &request.Operation{ - Name: opCreateDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBInstanceInput{} - } - - output = &CreateDBInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBInstance API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Creates a new DB instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation CreateDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// You already have a DB instance with the given identifier. -// -// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// The specified DB instance class isn't available in the specified Availability -// Zone. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName doesn't refer to an existing DB security group. -// -// * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// The request would cause you to exceed the allowed number of DB instances. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would cause you to exceed the allowed amount of storage available -// across all DB instances. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is not valid, or multiple subnets were requested that -// are not all in a common virtual private cloud (VPC). -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it is created -// because of changes that were made. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// Storage of the specified StorageType can't be associated with the DB instance. -// -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// The specified CIDR IP or Amazon EC2 security group isn't authorized for the -// specified DB security group. -// -// Amazon DocumentDB also might not be authorized to perform necessary actions -// on your behalf using IAM. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred when accessing an AWS KMS key. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBInstance -func (c *DocDB) CreateDBInstance(input *CreateDBInstanceInput) (*CreateDBInstanceOutput, error) { - req, out := c.CreateDBInstanceRequest(input) - return out, req.Send() -} - -// CreateDBInstanceWithContext is the same as CreateDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) CreateDBInstanceWithContext(ctx aws.Context, input *CreateDBInstanceInput, opts ...request.Option) (*CreateDBInstanceOutput, error) { - req, out := c.CreateDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBSubnetGroup = "CreateDBSubnetGroup" - -// CreateDBSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBSubnetGroup for more information on using the CreateDBSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBSubnetGroupRequest method. -// req, resp := client.CreateDBSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBSubnetGroup -func (c *DocDB) CreateDBSubnetGroupRequest(input *CreateDBSubnetGroupInput) (req *request.Request, output *CreateDBSubnetGroupOutput) { - op := &request.Operation{ - Name: opCreateDBSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBSubnetGroupInput{} - } - - output = &CreateDBSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBSubnetGroup API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Creates a new DB subnet group. DB subnet groups must contain at least one -// subnet in at least two Availability Zones in the AWS Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation CreateDBSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSubnetGroupAlreadyExistsFault "DBSubnetGroupAlreadyExists" -// DBSubnetGroupName is already being used by an existing DB subnet group. -// -// * ErrCodeDBSubnetGroupQuotaExceededFault "DBSubnetGroupQuotaExceeded" -// The request would cause you to exceed the allowed number of DB subnet groups. -// -// * ErrCodeDBSubnetQuotaExceededFault "DBSubnetQuotaExceededFault" -// The request would cause you to exceed the allowed number of subnets in a -// DB subnet group. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is not valid, or multiple subnets were requested that -// are not all in a common virtual private cloud (VPC). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBSubnetGroup -func (c *DocDB) CreateDBSubnetGroup(input *CreateDBSubnetGroupInput) (*CreateDBSubnetGroupOutput, error) { - req, out := c.CreateDBSubnetGroupRequest(input) - return out, req.Send() -} - -// CreateDBSubnetGroupWithContext is the same as CreateDBSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) CreateDBSubnetGroupWithContext(ctx aws.Context, input *CreateDBSubnetGroupInput, opts ...request.Option) (*CreateDBSubnetGroupOutput, error) { - req, out := c.CreateDBSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBCluster = "DeleteDBCluster" - -// DeleteDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBCluster for more information on using the DeleteDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBClusterRequest method. -// req, resp := client.DeleteDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBCluster -func (c *DocDB) DeleteDBClusterRequest(input *DeleteDBClusterInput) (req *request.Request, output *DeleteDBClusterOutput) { - op := &request.Operation{ - Name: opDeleteDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBClusterInput{} - } - - output = &DeleteDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDBCluster API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Deletes a previously provisioned DB cluster. When you delete a DB cluster, -// all automated backups for that DB cluster are deleted and can't be recovered. -// Manual DB cluster snapshots of the specified DB cluster are not deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DeleteDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. -// -// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// You already have a DB cluster snapshot with the given identifier. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// The request would cause you to exceed the allowed number of DB snapshots. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The provided value isn't a valid DB cluster snapshot state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBCluster -func (c *DocDB) DeleteDBCluster(input *DeleteDBClusterInput) (*DeleteDBClusterOutput, error) { - req, out := c.DeleteDBClusterRequest(input) - return out, req.Send() -} - -// DeleteDBClusterWithContext is the same as DeleteDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DeleteDBClusterWithContext(ctx aws.Context, input *DeleteDBClusterInput, opts ...request.Option) (*DeleteDBClusterOutput, error) { - req, out := c.DeleteDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBClusterParameterGroup = "DeleteDBClusterParameterGroup" - -// DeleteDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBClusterParameterGroup for more information on using the DeleteDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBClusterParameterGroupRequest method. -// req, resp := client.DeleteDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBClusterParameterGroup -func (c *DocDB) DeleteDBClusterParameterGroupRequest(input *DeleteDBClusterParameterGroupInput) (req *request.Request, output *DeleteDBClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opDeleteDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBClusterParameterGroupInput{} - } - - output = &DeleteDBClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDBClusterParameterGroup API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Deletes a specified DB cluster parameter group. The DB cluster parameter -// group to be deleted can't be associated with any DB clusters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DeleteDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use, or it is in a state that is not valid. -// If you are trying to delete the parameter group, you can't delete it when -// the parameter group is in this state. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBClusterParameterGroup -func (c *DocDB) DeleteDBClusterParameterGroup(input *DeleteDBClusterParameterGroupInput) (*DeleteDBClusterParameterGroupOutput, error) { - req, out := c.DeleteDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// DeleteDBClusterParameterGroupWithContext is the same as DeleteDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DeleteDBClusterParameterGroupWithContext(ctx aws.Context, input *DeleteDBClusterParameterGroupInput, opts ...request.Option) (*DeleteDBClusterParameterGroupOutput, error) { - req, out := c.DeleteDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBClusterSnapshot = "DeleteDBClusterSnapshot" - -// DeleteDBClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBClusterSnapshot for more information on using the DeleteDBClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBClusterSnapshotRequest method. -// req, resp := client.DeleteDBClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBClusterSnapshot -func (c *DocDB) DeleteDBClusterSnapshotRequest(input *DeleteDBClusterSnapshotInput) (req *request.Request, output *DeleteDBClusterSnapshotOutput) { - op := &request.Operation{ - Name: opDeleteDBClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBClusterSnapshotInput{} - } - - output = &DeleteDBClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDBClusterSnapshot API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Deletes a DB cluster snapshot. If the snapshot is being copied, the copy -// operation is terminated. -// -// The DB cluster snapshot must be in the available state to be deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DeleteDBClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The provided value isn't a valid DB cluster snapshot state. -// -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBClusterSnapshot -func (c *DocDB) DeleteDBClusterSnapshot(input *DeleteDBClusterSnapshotInput) (*DeleteDBClusterSnapshotOutput, error) { - req, out := c.DeleteDBClusterSnapshotRequest(input) - return out, req.Send() -} - -// DeleteDBClusterSnapshotWithContext is the same as DeleteDBClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DeleteDBClusterSnapshotWithContext(ctx aws.Context, input *DeleteDBClusterSnapshotInput, opts ...request.Option) (*DeleteDBClusterSnapshotOutput, error) { - req, out := c.DeleteDBClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBInstance = "DeleteDBInstance" - -// DeleteDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBInstance for more information on using the DeleteDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBInstanceRequest method. -// req, resp := client.DeleteDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBInstance -func (c *DocDB) DeleteDBInstanceRequest(input *DeleteDBInstanceInput) (req *request.Request, output *DeleteDBInstanceOutput) { - op := &request.Operation{ - Name: opDeleteDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBInstanceInput{} - } - - output = &DeleteDBInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDBInstance API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Deletes a previously provisioned DB instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DeleteDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. -// -// * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" -// DBSnapshotIdentifier is already being used by an existing snapshot. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// The request would cause you to exceed the allowed number of DB snapshots. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBInstance -func (c *DocDB) DeleteDBInstance(input *DeleteDBInstanceInput) (*DeleteDBInstanceOutput, error) { - req, out := c.DeleteDBInstanceRequest(input) - return out, req.Send() -} - -// DeleteDBInstanceWithContext is the same as DeleteDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DeleteDBInstanceWithContext(ctx aws.Context, input *DeleteDBInstanceInput, opts ...request.Option) (*DeleteDBInstanceOutput, error) { - req, out := c.DeleteDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBSubnetGroup = "DeleteDBSubnetGroup" - -// DeleteDBSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBSubnetGroup for more information on using the DeleteDBSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBSubnetGroupRequest method. -// req, resp := client.DeleteDBSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBSubnetGroup -func (c *DocDB) DeleteDBSubnetGroupRequest(input *DeleteDBSubnetGroupInput) (req *request.Request, output *DeleteDBSubnetGroupOutput) { - op := &request.Operation{ - Name: opDeleteDBSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBSubnetGroupInput{} - } - - output = &DeleteDBSubnetGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDBSubnetGroup API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Deletes a DB subnet group. -// -// The specified database subnet group must not be associated with any DB instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DeleteDBSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group can't be deleted because it's in use. -// -// * ErrCodeInvalidDBSubnetStateFault "InvalidDBSubnetStateFault" -// The DB subnet isn't in the available state. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBSubnetGroup -func (c *DocDB) DeleteDBSubnetGroup(input *DeleteDBSubnetGroupInput) (*DeleteDBSubnetGroupOutput, error) { - req, out := c.DeleteDBSubnetGroupRequest(input) - return out, req.Send() -} - -// DeleteDBSubnetGroupWithContext is the same as DeleteDBSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DeleteDBSubnetGroupWithContext(ctx aws.Context, input *DeleteDBSubnetGroupInput, opts ...request.Option) (*DeleteDBSubnetGroupOutput, error) { - req, out := c.DeleteDBSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusterParameterGroups = "DescribeDBClusterParameterGroups" - -// DescribeDBClusterParameterGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusterParameterGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusterParameterGroups for more information on using the DescribeDBClusterParameterGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClusterParameterGroupsRequest method. -// req, resp := client.DescribeDBClusterParameterGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterParameterGroups -func (c *DocDB) DescribeDBClusterParameterGroupsRequest(input *DescribeDBClusterParameterGroupsInput) (req *request.Request, output *DescribeDBClusterParameterGroupsOutput) { - op := &request.Operation{ - Name: opDescribeDBClusterParameterGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClusterParameterGroupsInput{} - } - - output = &DescribeDBClusterParameterGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusterParameterGroups API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Returns a list of DBClusterParameterGroup descriptions. If a DBClusterParameterGroupName -// parameter is specified, the list contains only the description of the specified -// DB cluster parameter group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DescribeDBClusterParameterGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterParameterGroups -func (c *DocDB) DescribeDBClusterParameterGroups(input *DescribeDBClusterParameterGroupsInput) (*DescribeDBClusterParameterGroupsOutput, error) { - req, out := c.DescribeDBClusterParameterGroupsRequest(input) - return out, req.Send() -} - -// DescribeDBClusterParameterGroupsWithContext is the same as DescribeDBClusterParameterGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusterParameterGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DescribeDBClusterParameterGroupsWithContext(ctx aws.Context, input *DescribeDBClusterParameterGroupsInput, opts ...request.Option) (*DescribeDBClusterParameterGroupsOutput, error) { - req, out := c.DescribeDBClusterParameterGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusterParameters = "DescribeDBClusterParameters" - -// DescribeDBClusterParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusterParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusterParameters for more information on using the DescribeDBClusterParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClusterParametersRequest method. -// req, resp := client.DescribeDBClusterParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterParameters -func (c *DocDB) DescribeDBClusterParametersRequest(input *DescribeDBClusterParametersInput) (req *request.Request, output *DescribeDBClusterParametersOutput) { - op := &request.Operation{ - Name: opDescribeDBClusterParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClusterParametersInput{} - } - - output = &DescribeDBClusterParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusterParameters API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Returns the detailed parameter list for a particular DB cluster parameter -// group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DescribeDBClusterParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterParameters -func (c *DocDB) DescribeDBClusterParameters(input *DescribeDBClusterParametersInput) (*DescribeDBClusterParametersOutput, error) { - req, out := c.DescribeDBClusterParametersRequest(input) - return out, req.Send() -} - -// DescribeDBClusterParametersWithContext is the same as DescribeDBClusterParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusterParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DescribeDBClusterParametersWithContext(ctx aws.Context, input *DescribeDBClusterParametersInput, opts ...request.Option) (*DescribeDBClusterParametersOutput, error) { - req, out := c.DescribeDBClusterParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusterSnapshotAttributes = "DescribeDBClusterSnapshotAttributes" - -// DescribeDBClusterSnapshotAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusterSnapshotAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusterSnapshotAttributes for more information on using the DescribeDBClusterSnapshotAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClusterSnapshotAttributesRequest method. -// req, resp := client.DescribeDBClusterSnapshotAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterSnapshotAttributes -func (c *DocDB) DescribeDBClusterSnapshotAttributesRequest(input *DescribeDBClusterSnapshotAttributesInput) (req *request.Request, output *DescribeDBClusterSnapshotAttributesOutput) { - op := &request.Operation{ - Name: opDescribeDBClusterSnapshotAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClusterSnapshotAttributesInput{} - } - - output = &DescribeDBClusterSnapshotAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusterSnapshotAttributes API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Returns a list of DB cluster snapshot attribute names and values for a manual -// DB cluster snapshot. -// -// When you share snapshots with other AWS accounts, DescribeDBClusterSnapshotAttributes -// returns the restore attribute and a list of IDs for the AWS accounts that -// are authorized to copy or restore the manual DB cluster snapshot. If all -// is included in the list of values for the restore attribute, then the manual -// DB cluster snapshot is public and can be copied or restored by all AWS accounts. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DescribeDBClusterSnapshotAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterSnapshotAttributes -func (c *DocDB) DescribeDBClusterSnapshotAttributes(input *DescribeDBClusterSnapshotAttributesInput) (*DescribeDBClusterSnapshotAttributesOutput, error) { - req, out := c.DescribeDBClusterSnapshotAttributesRequest(input) - return out, req.Send() -} - -// DescribeDBClusterSnapshotAttributesWithContext is the same as DescribeDBClusterSnapshotAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusterSnapshotAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DescribeDBClusterSnapshotAttributesWithContext(ctx aws.Context, input *DescribeDBClusterSnapshotAttributesInput, opts ...request.Option) (*DescribeDBClusterSnapshotAttributesOutput, error) { - req, out := c.DescribeDBClusterSnapshotAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusterSnapshots = "DescribeDBClusterSnapshots" - -// DescribeDBClusterSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusterSnapshots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusterSnapshots for more information on using the DescribeDBClusterSnapshots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClusterSnapshotsRequest method. -// req, resp := client.DescribeDBClusterSnapshotsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterSnapshots -func (c *DocDB) DescribeDBClusterSnapshotsRequest(input *DescribeDBClusterSnapshotsInput) (req *request.Request, output *DescribeDBClusterSnapshotsOutput) { - op := &request.Operation{ - Name: opDescribeDBClusterSnapshots, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClusterSnapshotsInput{} - } - - output = &DescribeDBClusterSnapshotsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusterSnapshots API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Returns information about DB cluster snapshots. This API operation supports -// pagination. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DescribeDBClusterSnapshots for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterSnapshots -func (c *DocDB) DescribeDBClusterSnapshots(input *DescribeDBClusterSnapshotsInput) (*DescribeDBClusterSnapshotsOutput, error) { - req, out := c.DescribeDBClusterSnapshotsRequest(input) - return out, req.Send() -} - -// DescribeDBClusterSnapshotsWithContext is the same as DescribeDBClusterSnapshots with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusterSnapshots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DescribeDBClusterSnapshotsWithContext(ctx aws.Context, input *DescribeDBClusterSnapshotsInput, opts ...request.Option) (*DescribeDBClusterSnapshotsOutput, error) { - req, out := c.DescribeDBClusterSnapshotsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusters = "DescribeDBClusters" - -// DescribeDBClustersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusters for more information on using the DescribeDBClusters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClustersRequest method. -// req, resp := client.DescribeDBClustersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusters -func (c *DocDB) DescribeDBClustersRequest(input *DescribeDBClustersInput) (req *request.Request, output *DescribeDBClustersOutput) { - op := &request.Operation{ - Name: opDescribeDBClusters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBClustersInput{} - } - - output = &DescribeDBClustersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusters API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Returns information about provisioned Amazon DocumentDB DB clusters. This -// API operation supports pagination. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DescribeDBClusters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusters -func (c *DocDB) DescribeDBClusters(input *DescribeDBClustersInput) (*DescribeDBClustersOutput, error) { - req, out := c.DescribeDBClustersRequest(input) - return out, req.Send() -} - -// DescribeDBClustersWithContext is the same as DescribeDBClusters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DescribeDBClustersWithContext(ctx aws.Context, input *DescribeDBClustersInput, opts ...request.Option) (*DescribeDBClustersOutput, error) { - req, out := c.DescribeDBClustersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBClustersPages iterates over the pages of a DescribeDBClusters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBClusters 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 DescribeDBClusters operation. -// pageNum := 0 -// err := client.DescribeDBClustersPages(params, -// func(page *DescribeDBClustersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DocDB) DescribeDBClustersPages(input *DescribeDBClustersInput, fn func(*DescribeDBClustersOutput, bool) bool) error { - return c.DescribeDBClustersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBClustersPagesWithContext same as DescribeDBClustersPages 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 *DocDB) DescribeDBClustersPagesWithContext(ctx aws.Context, input *DescribeDBClustersInput, fn func(*DescribeDBClustersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBClustersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBClustersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBClustersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBEngineVersions = "DescribeDBEngineVersions" - -// DescribeDBEngineVersionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBEngineVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBEngineVersions for more information on using the DescribeDBEngineVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBEngineVersionsRequest method. -// req, resp := client.DescribeDBEngineVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBEngineVersions -func (c *DocDB) DescribeDBEngineVersionsRequest(input *DescribeDBEngineVersionsInput) (req *request.Request, output *DescribeDBEngineVersionsOutput) { - op := &request.Operation{ - Name: opDescribeDBEngineVersions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBEngineVersionsInput{} - } - - output = &DescribeDBEngineVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBEngineVersions API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Returns a list of the available DB engines. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DescribeDBEngineVersions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBEngineVersions -func (c *DocDB) DescribeDBEngineVersions(input *DescribeDBEngineVersionsInput) (*DescribeDBEngineVersionsOutput, error) { - req, out := c.DescribeDBEngineVersionsRequest(input) - return out, req.Send() -} - -// DescribeDBEngineVersionsWithContext is the same as DescribeDBEngineVersions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBEngineVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DescribeDBEngineVersionsWithContext(ctx aws.Context, input *DescribeDBEngineVersionsInput, opts ...request.Option) (*DescribeDBEngineVersionsOutput, error) { - req, out := c.DescribeDBEngineVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBEngineVersionsPages iterates over the pages of a DescribeDBEngineVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBEngineVersions 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 DescribeDBEngineVersions operation. -// pageNum := 0 -// err := client.DescribeDBEngineVersionsPages(params, -// func(page *DescribeDBEngineVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DocDB) DescribeDBEngineVersionsPages(input *DescribeDBEngineVersionsInput, fn func(*DescribeDBEngineVersionsOutput, bool) bool) error { - return c.DescribeDBEngineVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBEngineVersionsPagesWithContext same as DescribeDBEngineVersionsPages 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 *DocDB) DescribeDBEngineVersionsPagesWithContext(ctx aws.Context, input *DescribeDBEngineVersionsInput, fn func(*DescribeDBEngineVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBEngineVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBEngineVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBEngineVersionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBInstances = "DescribeDBInstances" - -// DescribeDBInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBInstances for more information on using the DescribeDBInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBInstancesRequest method. -// req, resp := client.DescribeDBInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBInstances -func (c *DocDB) DescribeDBInstancesRequest(input *DescribeDBInstancesInput) (req *request.Request, output *DescribeDBInstancesOutput) { - op := &request.Operation{ - Name: opDescribeDBInstances, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBInstancesInput{} - } - - output = &DescribeDBInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBInstances API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Returns information about provisioned Amazon DocumentDB instances. This API -// supports pagination. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DescribeDBInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBInstances -func (c *DocDB) DescribeDBInstances(input *DescribeDBInstancesInput) (*DescribeDBInstancesOutput, error) { - req, out := c.DescribeDBInstancesRequest(input) - return out, req.Send() -} - -// DescribeDBInstancesWithContext is the same as DescribeDBInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DescribeDBInstancesWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.Option) (*DescribeDBInstancesOutput, error) { - req, out := c.DescribeDBInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBInstancesPages iterates over the pages of a DescribeDBInstances operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBInstances 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 DescribeDBInstances operation. -// pageNum := 0 -// err := client.DescribeDBInstancesPages(params, -// func(page *DescribeDBInstancesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DocDB) DescribeDBInstancesPages(input *DescribeDBInstancesInput, fn func(*DescribeDBInstancesOutput, bool) bool) error { - return c.DescribeDBInstancesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBInstancesPagesWithContext same as DescribeDBInstancesPages 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 *DocDB) DescribeDBInstancesPagesWithContext(ctx aws.Context, input *DescribeDBInstancesInput, fn func(*DescribeDBInstancesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBInstancesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBSubnetGroups = "DescribeDBSubnetGroups" - -// DescribeDBSubnetGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBSubnetGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBSubnetGroups for more information on using the DescribeDBSubnetGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBSubnetGroupsRequest method. -// req, resp := client.DescribeDBSubnetGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBSubnetGroups -func (c *DocDB) DescribeDBSubnetGroupsRequest(input *DescribeDBSubnetGroupsInput) (req *request.Request, output *DescribeDBSubnetGroupsOutput) { - op := &request.Operation{ - Name: opDescribeDBSubnetGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBSubnetGroupsInput{} - } - - output = &DescribeDBSubnetGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBSubnetGroups API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified, -// the list will contain only the descriptions of the specified DBSubnetGroup. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DescribeDBSubnetGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBSubnetGroups -func (c *DocDB) DescribeDBSubnetGroups(input *DescribeDBSubnetGroupsInput) (*DescribeDBSubnetGroupsOutput, error) { - req, out := c.DescribeDBSubnetGroupsRequest(input) - return out, req.Send() -} - -// DescribeDBSubnetGroupsWithContext is the same as DescribeDBSubnetGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBSubnetGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DescribeDBSubnetGroupsWithContext(ctx aws.Context, input *DescribeDBSubnetGroupsInput, opts ...request.Option) (*DescribeDBSubnetGroupsOutput, error) { - req, out := c.DescribeDBSubnetGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBSubnetGroupsPages iterates over the pages of a DescribeDBSubnetGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBSubnetGroups 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 DescribeDBSubnetGroups operation. -// pageNum := 0 -// err := client.DescribeDBSubnetGroupsPages(params, -// func(page *DescribeDBSubnetGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DocDB) DescribeDBSubnetGroupsPages(input *DescribeDBSubnetGroupsInput, fn func(*DescribeDBSubnetGroupsOutput, bool) bool) error { - return c.DescribeDBSubnetGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBSubnetGroupsPagesWithContext same as DescribeDBSubnetGroupsPages 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 *DocDB) DescribeDBSubnetGroupsPagesWithContext(ctx aws.Context, input *DescribeDBSubnetGroupsInput, fn func(*DescribeDBSubnetGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBSubnetGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBSubnetGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBSubnetGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEngineDefaultClusterParameters = "DescribeEngineDefaultClusterParameters" - -// DescribeEngineDefaultClusterParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEngineDefaultClusterParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEngineDefaultClusterParameters for more information on using the DescribeEngineDefaultClusterParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEngineDefaultClusterParametersRequest method. -// req, resp := client.DescribeEngineDefaultClusterParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeEngineDefaultClusterParameters -func (c *DocDB) DescribeEngineDefaultClusterParametersRequest(input *DescribeEngineDefaultClusterParametersInput) (req *request.Request, output *DescribeEngineDefaultClusterParametersOutput) { - op := &request.Operation{ - Name: opDescribeEngineDefaultClusterParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEngineDefaultClusterParametersInput{} - } - - output = &DescribeEngineDefaultClusterParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEngineDefaultClusterParameters API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Returns the default engine and system parameter information for the cluster -// database engine. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DescribeEngineDefaultClusterParameters for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeEngineDefaultClusterParameters -func (c *DocDB) DescribeEngineDefaultClusterParameters(input *DescribeEngineDefaultClusterParametersInput) (*DescribeEngineDefaultClusterParametersOutput, error) { - req, out := c.DescribeEngineDefaultClusterParametersRequest(input) - return out, req.Send() -} - -// DescribeEngineDefaultClusterParametersWithContext is the same as DescribeEngineDefaultClusterParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEngineDefaultClusterParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DescribeEngineDefaultClusterParametersWithContext(ctx aws.Context, input *DescribeEngineDefaultClusterParametersInput, opts ...request.Option) (*DescribeEngineDefaultClusterParametersOutput, error) { - req, out := c.DescribeEngineDefaultClusterParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEventCategories = "DescribeEventCategories" - -// DescribeEventCategoriesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEventCategories operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEventCategories for more information on using the DescribeEventCategories -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventCategoriesRequest method. -// req, resp := client.DescribeEventCategoriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeEventCategories -func (c *DocDB) DescribeEventCategoriesRequest(input *DescribeEventCategoriesInput) (req *request.Request, output *DescribeEventCategoriesOutput) { - op := &request.Operation{ - Name: opDescribeEventCategories, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEventCategoriesInput{} - } - - output = &DescribeEventCategoriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEventCategories API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Displays a list of categories for all event source types, or, if specified, -// for a specified source type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DescribeEventCategories for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeEventCategories -func (c *DocDB) DescribeEventCategories(input *DescribeEventCategoriesInput) (*DescribeEventCategoriesOutput, error) { - req, out := c.DescribeEventCategoriesRequest(input) - return out, req.Send() -} - -// DescribeEventCategoriesWithContext is the same as DescribeEventCategories with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEventCategories for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DescribeEventCategoriesWithContext(ctx aws.Context, input *DescribeEventCategoriesInput, opts ...request.Option) (*DescribeEventCategoriesOutput, error) { - req, out := c.DescribeEventCategoriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEvents = "DescribeEvents" - -// DescribeEventsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEvents for more information on using the DescribeEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventsRequest method. -// req, resp := client.DescribeEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeEvents -func (c *DocDB) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Request, output *DescribeEventsOutput) { - op := &request.Operation{ - Name: opDescribeEvents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEventsInput{} - } - - output = &DescribeEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEvents API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Returns events related to DB instances, DB security groups, DB snapshots, -// and DB parameter groups for the past 14 days. You can obtain events specific -// to a particular DB instance, DB security group, DB snapshot, or DB parameter -// group by providing the name as a parameter. By default, the events of the -// past hour are returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DescribeEvents for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeEvents -func (c *DocDB) DescribeEvents(input *DescribeEventsInput) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - return out, req.Send() -} - -// DescribeEventsWithContext is the same as DescribeEvents with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DescribeEventsWithContext(ctx aws.Context, input *DescribeEventsInput, opts ...request.Option) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEventsPages iterates over the pages of a DescribeEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEvents 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 DescribeEvents operation. -// pageNum := 0 -// err := client.DescribeEventsPages(params, -// func(page *DescribeEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DocDB) DescribeEventsPages(input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool) error { - return c.DescribeEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEventsPagesWithContext same as DescribeEventsPages 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 *DocDB) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeOrderableDBInstanceOptions = "DescribeOrderableDBInstanceOptions" - -// DescribeOrderableDBInstanceOptionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeOrderableDBInstanceOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeOrderableDBInstanceOptions for more information on using the DescribeOrderableDBInstanceOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeOrderableDBInstanceOptionsRequest method. -// req, resp := client.DescribeOrderableDBInstanceOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeOrderableDBInstanceOptions -func (c *DocDB) DescribeOrderableDBInstanceOptionsRequest(input *DescribeOrderableDBInstanceOptionsInput) (req *request.Request, output *DescribeOrderableDBInstanceOptionsOutput) { - op := &request.Operation{ - Name: opDescribeOrderableDBInstanceOptions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeOrderableDBInstanceOptionsInput{} - } - - output = &DescribeOrderableDBInstanceOptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeOrderableDBInstanceOptions API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Returns a list of orderable DB instance options for the specified engine. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DescribeOrderableDBInstanceOptions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeOrderableDBInstanceOptions -func (c *DocDB) DescribeOrderableDBInstanceOptions(input *DescribeOrderableDBInstanceOptionsInput) (*DescribeOrderableDBInstanceOptionsOutput, error) { - req, out := c.DescribeOrderableDBInstanceOptionsRequest(input) - return out, req.Send() -} - -// DescribeOrderableDBInstanceOptionsWithContext is the same as DescribeOrderableDBInstanceOptions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeOrderableDBInstanceOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DescribeOrderableDBInstanceOptionsWithContext(ctx aws.Context, input *DescribeOrderableDBInstanceOptionsInput, opts ...request.Option) (*DescribeOrderableDBInstanceOptionsOutput, error) { - req, out := c.DescribeOrderableDBInstanceOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeOrderableDBInstanceOptionsPages iterates over the pages of a DescribeOrderableDBInstanceOptions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeOrderableDBInstanceOptions 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 DescribeOrderableDBInstanceOptions operation. -// pageNum := 0 -// err := client.DescribeOrderableDBInstanceOptionsPages(params, -// func(page *DescribeOrderableDBInstanceOptionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *DocDB) DescribeOrderableDBInstanceOptionsPages(input *DescribeOrderableDBInstanceOptionsInput, fn func(*DescribeOrderableDBInstanceOptionsOutput, bool) bool) error { - return c.DescribeOrderableDBInstanceOptionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeOrderableDBInstanceOptionsPagesWithContext same as DescribeOrderableDBInstanceOptionsPages 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 *DocDB) DescribeOrderableDBInstanceOptionsPagesWithContext(ctx aws.Context, input *DescribeOrderableDBInstanceOptionsInput, fn func(*DescribeOrderableDBInstanceOptionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeOrderableDBInstanceOptionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeOrderableDBInstanceOptionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeOrderableDBInstanceOptionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribePendingMaintenanceActions = "DescribePendingMaintenanceActions" - -// DescribePendingMaintenanceActionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribePendingMaintenanceActions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePendingMaintenanceActions for more information on using the DescribePendingMaintenanceActions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePendingMaintenanceActionsRequest method. -// req, resp := client.DescribePendingMaintenanceActionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribePendingMaintenanceActions -func (c *DocDB) DescribePendingMaintenanceActionsRequest(input *DescribePendingMaintenanceActionsInput) (req *request.Request, output *DescribePendingMaintenanceActionsOutput) { - op := &request.Operation{ - Name: opDescribePendingMaintenanceActions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePendingMaintenanceActionsInput{} - } - - output = &DescribePendingMaintenanceActionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePendingMaintenanceActions API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Returns a list of resources (for example, DB instances) that have at least -// one pending maintenance action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation DescribePendingMaintenanceActions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The specified resource ID was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribePendingMaintenanceActions -func (c *DocDB) DescribePendingMaintenanceActions(input *DescribePendingMaintenanceActionsInput) (*DescribePendingMaintenanceActionsOutput, error) { - req, out := c.DescribePendingMaintenanceActionsRequest(input) - return out, req.Send() -} - -// DescribePendingMaintenanceActionsWithContext is the same as DescribePendingMaintenanceActions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePendingMaintenanceActions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) DescribePendingMaintenanceActionsWithContext(ctx aws.Context, input *DescribePendingMaintenanceActionsInput, opts ...request.Option) (*DescribePendingMaintenanceActionsOutput, error) { - req, out := c.DescribePendingMaintenanceActionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opFailoverDBCluster = "FailoverDBCluster" - -// FailoverDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the FailoverDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See FailoverDBCluster for more information on using the FailoverDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the FailoverDBClusterRequest method. -// req, resp := client.FailoverDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/FailoverDBCluster -func (c *DocDB) FailoverDBClusterRequest(input *FailoverDBClusterInput) (req *request.Request, output *FailoverDBClusterOutput) { - op := &request.Operation{ - Name: opFailoverDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &FailoverDBClusterInput{} - } - - output = &FailoverDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// FailoverDBCluster API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Forces a failover for a DB cluster. -// -// A failover for a DB cluster promotes one of the Amazon DocumentDB replicas -// (read-only instances) in the DB cluster to be the primary instance (the cluster -// writer). -// -// If the primary instance fails, Amazon DocumentDB automatically fails over -// to an Amazon DocumentDB replica, if one exists. You can force a failover -// when you want to simulate a failure of a primary instance for testing. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation FailoverDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/FailoverDBCluster -func (c *DocDB) FailoverDBCluster(input *FailoverDBClusterInput) (*FailoverDBClusterOutput, error) { - req, out := c.FailoverDBClusterRequest(input) - return out, req.Send() -} - -// FailoverDBClusterWithContext is the same as FailoverDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See FailoverDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) FailoverDBClusterWithContext(ctx aws.Context, input *FailoverDBClusterInput, opts ...request.Option) (*FailoverDBClusterOutput, error) { - req, out := c.FailoverDBClusterRequest(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/docdb-2014-10-31/ListTagsForResource -func (c *DocDB) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Lists all tags on an Amazon DocumentDB resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ListTagsForResource -func (c *DocDB) 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 *DocDB) 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 opModifyDBCluster = "ModifyDBCluster" - -// ModifyDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBCluster for more information on using the ModifyDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBClusterRequest method. -// req, resp := client.ModifyDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBCluster -func (c *DocDB) ModifyDBClusterRequest(input *ModifyDBClusterInput) (req *request.Request, output *ModifyDBClusterOutput) { - op := &request.Operation{ - Name: opModifyDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBClusterInput{} - } - - output = &ModifyDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBCluster API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Modifies a setting for an Amazon DocumentDB DB cluster. You can change one -// or more database configuration parameters by specifying these parameters -// and the new values in the request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation ModifyDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would cause you to exceed the allowed amount of storage available -// across all DB instances. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it is created -// because of changes that were made. -// -// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group can't be deleted because it's in use. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is not valid, or multiple subnets were requested that -// are not all in a common virtual private cloud (VPC). -// -// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter -// group. -// -// * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group doesn't allow deletion. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. -// -// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// You already have a DB cluster with the given identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBCluster -func (c *DocDB) ModifyDBCluster(input *ModifyDBClusterInput) (*ModifyDBClusterOutput, error) { - req, out := c.ModifyDBClusterRequest(input) - return out, req.Send() -} - -// ModifyDBClusterWithContext is the same as ModifyDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) ModifyDBClusterWithContext(ctx aws.Context, input *ModifyDBClusterInput, opts ...request.Option) (*ModifyDBClusterOutput, error) { - req, out := c.ModifyDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBClusterParameterGroup = "ModifyDBClusterParameterGroup" - -// ModifyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBClusterParameterGroup for more information on using the ModifyDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBClusterParameterGroupRequest method. -// req, resp := client.ModifyDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBClusterParameterGroup -func (c *DocDB) ModifyDBClusterParameterGroupRequest(input *ModifyDBClusterParameterGroupInput) (req *request.Request, output *ModifyDBClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opModifyDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBClusterParameterGroupInput{} - } - - output = &ModifyDBClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBClusterParameterGroup API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Modifies the parameters of a DB cluster parameter group. To modify more than -// one parameter, submit a list of the following: ParameterName, ParameterValue, -// and ApplyMethod. A maximum of 20 parameters can be modified in a single request. -// -// Changes to dynamic parameters are applied immediately. Changes to static -// parameters require a reboot or maintenance window before the change can take -// effect. -// -// After you create a DB cluster parameter group, you should wait at least 5 -// minutes before creating your first DB cluster that uses that DB cluster parameter -// group as the default parameter group. This allows Amazon DocumentDB to fully -// complete the create action before the parameter group is used as the default -// for a new DB cluster. This step is especially important for parameters that -// are critical when creating the default database for a DB cluster, such as -// the character set for the default database defined by the character_set_database -// parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation ModifyDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use, or it is in a state that is not valid. -// If you are trying to delete the parameter group, you can't delete it when -// the parameter group is in this state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBClusterParameterGroup -func (c *DocDB) ModifyDBClusterParameterGroup(input *ModifyDBClusterParameterGroupInput) (*ModifyDBClusterParameterGroupOutput, error) { - req, out := c.ModifyDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// ModifyDBClusterParameterGroupWithContext is the same as ModifyDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) ModifyDBClusterParameterGroupWithContext(ctx aws.Context, input *ModifyDBClusterParameterGroupInput, opts ...request.Option) (*ModifyDBClusterParameterGroupOutput, error) { - req, out := c.ModifyDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBClusterSnapshotAttribute = "ModifyDBClusterSnapshotAttribute" - -// ModifyDBClusterSnapshotAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBClusterSnapshotAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBClusterSnapshotAttribute for more information on using the ModifyDBClusterSnapshotAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBClusterSnapshotAttributeRequest method. -// req, resp := client.ModifyDBClusterSnapshotAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBClusterSnapshotAttribute -func (c *DocDB) ModifyDBClusterSnapshotAttributeRequest(input *ModifyDBClusterSnapshotAttributeInput) (req *request.Request, output *ModifyDBClusterSnapshotAttributeOutput) { - op := &request.Operation{ - Name: opModifyDBClusterSnapshotAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBClusterSnapshotAttributeInput{} - } - - output = &ModifyDBClusterSnapshotAttributeOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBClusterSnapshotAttribute API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Adds an attribute and values to, or removes an attribute and values from, -// a manual DB cluster snapshot. -// -// To share a manual DB cluster snapshot with other AWS accounts, specify restore -// as the AttributeName, and use the ValuesToAdd parameter to add a list of -// IDs of the AWS accounts that are authorized to restore the manual DB cluster -// snapshot. Use the value all to make the manual DB cluster snapshot public, -// which means that it can be copied or restored by all AWS accounts. Do not -// add the all value for any manual DB cluster snapshots that contain private -// information that you don't want available to all AWS accounts. If a manual -// DB cluster snapshot is encrypted, it can be shared, but only by specifying -// a list of authorized AWS account IDs for the ValuesToAdd parameter. You can't -// use all as a value for that parameter in this case. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation ModifyDBClusterSnapshotAttribute for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The provided value isn't a valid DB cluster snapshot state. -// -// * ErrCodeSharedSnapshotQuotaExceededFault "SharedSnapshotQuotaExceeded" -// You have exceeded the maximum number of accounts that you can share a manual -// DB snapshot with. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBClusterSnapshotAttribute -func (c *DocDB) ModifyDBClusterSnapshotAttribute(input *ModifyDBClusterSnapshotAttributeInput) (*ModifyDBClusterSnapshotAttributeOutput, error) { - req, out := c.ModifyDBClusterSnapshotAttributeRequest(input) - return out, req.Send() -} - -// ModifyDBClusterSnapshotAttributeWithContext is the same as ModifyDBClusterSnapshotAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBClusterSnapshotAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) ModifyDBClusterSnapshotAttributeWithContext(ctx aws.Context, input *ModifyDBClusterSnapshotAttributeInput, opts ...request.Option) (*ModifyDBClusterSnapshotAttributeOutput, error) { - req, out := c.ModifyDBClusterSnapshotAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBInstance = "ModifyDBInstance" - -// ModifyDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBInstance for more information on using the ModifyDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBInstanceRequest method. -// req, resp := client.ModifyDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBInstance -func (c *DocDB) ModifyDBInstanceRequest(input *ModifyDBInstanceInput) (req *request.Request, output *ModifyDBInstanceOutput) { - op := &request.Operation{ - Name: opModifyDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBInstanceInput{} - } - - output = &ModifyDBInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBInstance API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Modifies settings for a DB instance. You can change one or more database -// configuration parameters by specifying these parameters and the new values -// in the request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation ModifyDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. -// -// * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group doesn't allow deletion. -// -// * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// You already have a DB instance with the given identifier. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName doesn't refer to an existing DB security group. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// The specified DB instance class isn't available in the specified Availability -// Zone. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would cause you to exceed the allowed amount of storage available -// across all DB instances. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it is created -// because of changes that were made. -// -// * ErrCodeDBUpgradeDependencyFailureFault "DBUpgradeDependencyFailure" -// The DB upgrade failed because a resource that the DB depends on can't be -// modified. -// -// * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// Storage of the specified StorageType can't be associated with the DB instance. -// -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// The specified CIDR IP or Amazon EC2 security group isn't authorized for the -// specified DB security group. -// -// Amazon DocumentDB also might not be authorized to perform necessary actions -// on your behalf using IAM. -// -// * ErrCodeCertificateNotFoundFault "CertificateNotFound" -// CertificateIdentifier doesn't refer to an existing certificate. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBInstance -func (c *DocDB) ModifyDBInstance(input *ModifyDBInstanceInput) (*ModifyDBInstanceOutput, error) { - req, out := c.ModifyDBInstanceRequest(input) - return out, req.Send() -} - -// ModifyDBInstanceWithContext is the same as ModifyDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) ModifyDBInstanceWithContext(ctx aws.Context, input *ModifyDBInstanceInput, opts ...request.Option) (*ModifyDBInstanceOutput, error) { - req, out := c.ModifyDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBSubnetGroup = "ModifyDBSubnetGroup" - -// ModifyDBSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBSubnetGroup for more information on using the ModifyDBSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBSubnetGroupRequest method. -// req, resp := client.ModifyDBSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBSubnetGroup -func (c *DocDB) ModifyDBSubnetGroupRequest(input *ModifyDBSubnetGroupInput) (req *request.Request, output *ModifyDBSubnetGroupOutput) { - op := &request.Operation{ - Name: opModifyDBSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBSubnetGroupInput{} - } - - output = &ModifyDBSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBSubnetGroup API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Modifies an existing DB subnet group. DB subnet groups must contain at least -// one subnet in at least two Availability Zones in the AWS Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation ModifyDBSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeDBSubnetQuotaExceededFault "DBSubnetQuotaExceededFault" -// The request would cause you to exceed the allowed number of subnets in a -// DB subnet group. -// -// * ErrCodeSubnetAlreadyInUse "SubnetAlreadyInUse" -// The DB subnet is already in use in the Availability Zone. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is not valid, or multiple subnets were requested that -// are not all in a common virtual private cloud (VPC). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBSubnetGroup -func (c *DocDB) ModifyDBSubnetGroup(input *ModifyDBSubnetGroupInput) (*ModifyDBSubnetGroupOutput, error) { - req, out := c.ModifyDBSubnetGroupRequest(input) - return out, req.Send() -} - -// ModifyDBSubnetGroupWithContext is the same as ModifyDBSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) ModifyDBSubnetGroupWithContext(ctx aws.Context, input *ModifyDBSubnetGroupInput, opts ...request.Option) (*ModifyDBSubnetGroupOutput, error) { - req, out := c.ModifyDBSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRebootDBInstance = "RebootDBInstance" - -// RebootDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RebootDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebootDBInstance for more information on using the RebootDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebootDBInstanceRequest method. -// req, resp := client.RebootDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RebootDBInstance -func (c *DocDB) RebootDBInstanceRequest(input *RebootDBInstanceInput) (req *request.Request, output *RebootDBInstanceOutput) { - op := &request.Operation{ - Name: opRebootDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RebootDBInstanceInput{} - } - - output = &RebootDBInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// RebootDBInstance API operation for Amazon DocumentDB with MongoDB compatibility. -// -// You might need to reboot your DB instance, usually for maintenance reasons. -// For example, if you make certain changes, or if you change the DB cluster -// parameter group that is associated with the DB instance, you must reboot -// the instance for the changes to take effect. -// -// Rebooting a DB instance restarts the database engine service. Rebooting a -// DB instance results in a momentary outage, during which the DB instance status -// is set to rebooting. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation RebootDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RebootDBInstance -func (c *DocDB) RebootDBInstance(input *RebootDBInstanceInput) (*RebootDBInstanceOutput, error) { - req, out := c.RebootDBInstanceRequest(input) - return out, req.Send() -} - -// RebootDBInstanceWithContext is the same as RebootDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See RebootDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) RebootDBInstanceWithContext(ctx aws.Context, input *RebootDBInstanceInput, opts ...request.Option) (*RebootDBInstanceOutput, error) { - req, out := c.RebootDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTagsFromResource = "RemoveTagsFromResource" - -// RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTagsFromResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTagsFromResource for more information on using the RemoveTagsFromResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsFromResourceRequest method. -// req, resp := client.RemoveTagsFromResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RemoveTagsFromResource -func (c *DocDB) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *RemoveTagsFromResourceOutput) { - op := &request.Operation{ - Name: opRemoveTagsFromResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsFromResourceInput{} - } - - output = &RemoveTagsFromResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTagsFromResource API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Removes metadata tags from an Amazon DocumentDB resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation RemoveTagsFromResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RemoveTagsFromResource -func (c *DocDB) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - return out, req.Send() -} - -// RemoveTagsFromResourceWithContext is the same as RemoveTagsFromResource with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTagsFromResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*RemoveTagsFromResourceOutput, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetDBClusterParameterGroup = "ResetDBClusterParameterGroup" - -// ResetDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ResetDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetDBClusterParameterGroup for more information on using the ResetDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetDBClusterParameterGroupRequest method. -// req, resp := client.ResetDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ResetDBClusterParameterGroup -func (c *DocDB) ResetDBClusterParameterGroupRequest(input *ResetDBClusterParameterGroupInput) (req *request.Request, output *ResetDBClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opResetDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetDBClusterParameterGroupInput{} - } - - output = &ResetDBClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ResetDBClusterParameterGroup API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Modifies the parameters of a DB cluster parameter group to the default value. -// To reset specific parameters, submit a list of the following: ParameterName -// and ApplyMethod. To reset the entire DB cluster parameter group, specify -// the DBClusterParameterGroupName and ResetAllParameters parameters. -// -// When you reset the entire group, dynamic parameters are updated immediately -// and static parameters are set to pending-reboot to take effect on the next -// DB instance reboot. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation ResetDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use, or it is in a state that is not valid. -// If you are trying to delete the parameter group, you can't delete it when -// the parameter group is in this state. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ResetDBClusterParameterGroup -func (c *DocDB) ResetDBClusterParameterGroup(input *ResetDBClusterParameterGroupInput) (*ResetDBClusterParameterGroupOutput, error) { - req, out := c.ResetDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// ResetDBClusterParameterGroupWithContext is the same as ResetDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ResetDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) ResetDBClusterParameterGroupWithContext(ctx aws.Context, input *ResetDBClusterParameterGroupInput, opts ...request.Option) (*ResetDBClusterParameterGroupOutput, error) { - req, out := c.ResetDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreDBClusterFromSnapshot = "RestoreDBClusterFromSnapshot" - -// RestoreDBClusterFromSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the RestoreDBClusterFromSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreDBClusterFromSnapshot for more information on using the RestoreDBClusterFromSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreDBClusterFromSnapshotRequest method. -// req, resp := client.RestoreDBClusterFromSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RestoreDBClusterFromSnapshot -func (c *DocDB) RestoreDBClusterFromSnapshotRequest(input *RestoreDBClusterFromSnapshotInput) (req *request.Request, output *RestoreDBClusterFromSnapshotOutput) { - op := &request.Operation{ - Name: opRestoreDBClusterFromSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreDBClusterFromSnapshotInput{} - } - - output = &RestoreDBClusterFromSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// RestoreDBClusterFromSnapshot API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Creates a new DB cluster from a DB snapshot or DB cluster snapshot. -// -// If a DB snapshot is specified, the target DB cluster is created from the -// source DB snapshot with a default configuration and default security group. -// -// If a DB cluster snapshot is specified, the target DB cluster is created from -// the source DB cluster restore point with the same configuration as the original -// source DB cluster, except that the new DB cluster is created with the default -// security group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation RestoreDBClusterFromSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// You already have a DB cluster with the given identifier. -// -// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// The DB cluster can't be created because you have reached the maximum allowed -// quota of DB clusters. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would cause you to exceed the allowed amount of storage available -// across all DB instances. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. -// -// * ErrCodeInsufficientDBClusterCapacityFault "InsufficientDBClusterCapacityFault" -// The DB cluster doesn't have enough capacity for the current operation. -// -// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is not enough storage available for the current action. You might be -// able to resolve this error by updating your subnet group to use different -// Availability Zones that have more storage available. -// -// * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot doesn't allow deletion. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The provided value isn't a valid DB cluster snapshot state. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would cause you to exceed the allowed amount of storage available -// across all DB instances. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it is created -// because of changes that were made. -// -// * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// You cannot restore from a virtual private cloud (VPC) backup to a non-VPC -// DB instance. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is not valid, or multiple subnets were requested that -// are not all in a common virtual private cloud (VPC). -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred when accessing an AWS KMS key. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RestoreDBClusterFromSnapshot -func (c *DocDB) RestoreDBClusterFromSnapshot(input *RestoreDBClusterFromSnapshotInput) (*RestoreDBClusterFromSnapshotOutput, error) { - req, out := c.RestoreDBClusterFromSnapshotRequest(input) - return out, req.Send() -} - -// RestoreDBClusterFromSnapshotWithContext is the same as RestoreDBClusterFromSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreDBClusterFromSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) RestoreDBClusterFromSnapshotWithContext(ctx aws.Context, input *RestoreDBClusterFromSnapshotInput, opts ...request.Option) (*RestoreDBClusterFromSnapshotOutput, error) { - req, out := c.RestoreDBClusterFromSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreDBClusterToPointInTime = "RestoreDBClusterToPointInTime" - -// RestoreDBClusterToPointInTimeRequest generates a "aws/request.Request" representing the -// client's request for the RestoreDBClusterToPointInTime operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreDBClusterToPointInTime for more information on using the RestoreDBClusterToPointInTime -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreDBClusterToPointInTimeRequest method. -// req, resp := client.RestoreDBClusterToPointInTimeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RestoreDBClusterToPointInTime -func (c *DocDB) RestoreDBClusterToPointInTimeRequest(input *RestoreDBClusterToPointInTimeInput) (req *request.Request, output *RestoreDBClusterToPointInTimeOutput) { - op := &request.Operation{ - Name: opRestoreDBClusterToPointInTime, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreDBClusterToPointInTimeInput{} - } - - output = &RestoreDBClusterToPointInTimeOutput{} - req = c.newRequest(op, input, output) - return -} - -// RestoreDBClusterToPointInTime API operation for Amazon DocumentDB with MongoDB compatibility. -// -// Restores a DB cluster to an arbitrary point in time. Users can restore to -// any point in time before LatestRestorableTime for up to BackupRetentionPeriod -// days. The target DB cluster is created from the source DB cluster with the -// same configuration as the original DB cluster, except that the new DB cluster -// is created with the default DB security group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's -// API operation RestoreDBClusterToPointInTime for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// You already have a DB cluster with the given identifier. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// The DB cluster can't be created because you have reached the maximum allowed -// quota of DB clusters. -// -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeInsufficientDBClusterCapacityFault "InsufficientDBClusterCapacityFault" -// The DB cluster doesn't have enough capacity for the current operation. -// -// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is not enough storage available for the current action. You might be -// able to resolve this error by updating your subnet group to use different -// Availability Zones that have more storage available. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The provided value isn't a valid DB cluster snapshot state. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. -// -// * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot doesn't allow deletion. -// -// * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// You cannot restore from a virtual private cloud (VPC) backup to a non-VPC -// DB instance. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is not valid, or multiple subnets were requested that -// are not all in a common virtual private cloud (VPC). -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it is created -// because of changes that were made. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred when accessing an AWS KMS key. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would cause you to exceed the allowed amount of storage available -// across all DB instances. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RestoreDBClusterToPointInTime -func (c *DocDB) RestoreDBClusterToPointInTime(input *RestoreDBClusterToPointInTimeInput) (*RestoreDBClusterToPointInTimeOutput, error) { - req, out := c.RestoreDBClusterToPointInTimeRequest(input) - return out, req.Send() -} - -// RestoreDBClusterToPointInTimeWithContext is the same as RestoreDBClusterToPointInTime with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreDBClusterToPointInTime for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) RestoreDBClusterToPointInTimeWithContext(ctx aws.Context, input *RestoreDBClusterToPointInTimeInput, opts ...request.Option) (*RestoreDBClusterToPointInTimeOutput, error) { - req, out := c.RestoreDBClusterToPointInTimeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Represents the input to AddTagsToResource. -type AddTagsToResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon DocumentDB resource that the tags are added to. This value is - // an Amazon Resource Name (ARN). - // - // ResourceName is a required field - ResourceName *string `type:"string" required:"true"` - - // The tags to be assigned to the Amazon DocumentDB resource. - // - // Tags is a required field - Tags []*Tag `locationNameList:"Tag" type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsToResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsToResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *AddTagsToResourceInput) SetResourceName(v string) *AddTagsToResourceInput { - s.ResourceName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { - s.Tags = v - return s -} - -type AddTagsToResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsToResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceOutput) GoString() string { - return s.String() -} - -// Represents the input to ApplyPendingMaintenanceAction. -type ApplyPendingMaintenanceActionInput struct { - _ struct{} `type:"structure"` - - // The pending maintenance action to apply to this resource. - // - // Valid values: system-update, db-upgrade - // - // ApplyAction is a required field - ApplyAction *string `type:"string" required:"true"` - - // A value that specifies the type of opt-in request or undoes an opt-in request. - // An opt-in request of type immediate can't be undone. - // - // Valid values: - // - // * immediate - Apply the maintenance action immediately. - // - // * next-maintenance - Apply the maintenance action during the next maintenance - // window for the resource. - // - // * undo-opt-in - Cancel any existing next-maintenance opt-in requests. - // - // OptInType is a required field - OptInType *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the resource that the pending maintenance - // action applies to. - // - // ResourceIdentifier is a required field - ResourceIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ApplyPendingMaintenanceActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplyPendingMaintenanceActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ApplyPendingMaintenanceActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ApplyPendingMaintenanceActionInput"} - if s.ApplyAction == nil { - invalidParams.Add(request.NewErrParamRequired("ApplyAction")) - } - if s.OptInType == nil { - invalidParams.Add(request.NewErrParamRequired("OptInType")) - } - if s.ResourceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyAction sets the ApplyAction field's value. -func (s *ApplyPendingMaintenanceActionInput) SetApplyAction(v string) *ApplyPendingMaintenanceActionInput { - s.ApplyAction = &v - return s -} - -// SetOptInType sets the OptInType field's value. -func (s *ApplyPendingMaintenanceActionInput) SetOptInType(v string) *ApplyPendingMaintenanceActionInput { - s.OptInType = &v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *ApplyPendingMaintenanceActionInput) SetResourceIdentifier(v string) *ApplyPendingMaintenanceActionInput { - s.ResourceIdentifier = &v - return s -} - -type ApplyPendingMaintenanceActionOutput struct { - _ struct{} `type:"structure"` - - // Represents the output of ApplyPendingMaintenanceAction. - ResourcePendingMaintenanceActions *ResourcePendingMaintenanceActions `type:"structure"` -} - -// String returns the string representation -func (s ApplyPendingMaintenanceActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplyPendingMaintenanceActionOutput) GoString() string { - return s.String() -} - -// SetResourcePendingMaintenanceActions sets the ResourcePendingMaintenanceActions field's value. -func (s *ApplyPendingMaintenanceActionOutput) SetResourcePendingMaintenanceActions(v *ResourcePendingMaintenanceActions) *ApplyPendingMaintenanceActionOutput { - s.ResourcePendingMaintenanceActions = v - return s -} - -// Information about an Availability Zone. -type AvailabilityZone struct { - _ struct{} `type:"structure"` - - // The name of the Availability Zone. - Name *string `type:"string"` -} - -// String returns the string representation -func (s AvailabilityZone) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailabilityZone) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { - s.Name = &v - return s -} - -// The configuration setting for the log types to be enabled for export to Amazon -// CloudWatch Logs for a specific DB instance or DB cluster. -// -// The EnableLogTypes and DisableLogTypes arrays determine which logs are exported -// (or not exported) to CloudWatch Logs. The values within these arrays depend -// on the DB engine that is being used. -type CloudwatchLogsExportConfiguration struct { - _ struct{} `type:"structure"` - - // The list of log types to disable. - DisableLogTypes []*string `type:"list"` - - // The list of log types to enable. - EnableLogTypes []*string `type:"list"` -} - -// String returns the string representation -func (s CloudwatchLogsExportConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudwatchLogsExportConfiguration) GoString() string { - return s.String() -} - -// SetDisableLogTypes sets the DisableLogTypes field's value. -func (s *CloudwatchLogsExportConfiguration) SetDisableLogTypes(v []*string) *CloudwatchLogsExportConfiguration { - s.DisableLogTypes = v - return s -} - -// SetEnableLogTypes sets the EnableLogTypes field's value. -func (s *CloudwatchLogsExportConfiguration) SetEnableLogTypes(v []*string) *CloudwatchLogsExportConfiguration { - s.EnableLogTypes = v - return s -} - -// Represents the input to CopyDBClusterParameterGroup. -type CopyDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The identifier or Amazon Resource Name (ARN) for the source DB cluster parameter - // group. - // - // Constraints: - // - // * Must specify a valid DB cluster parameter group. - // - // * If the source DB cluster parameter group is in the same AWS Region as - // the copy, specify a valid DB parameter group identifier; for example, - // my-db-cluster-param-group, or a valid ARN. - // - // * If the source DB parameter group is in a different AWS Region than the - // copy, specify a valid DB cluster parameter group ARN; for example, arn:aws:rds:us-east-1:123456789012:cluster-pg:custom-cluster-group1. - // - // SourceDBClusterParameterGroupIdentifier is a required field - SourceDBClusterParameterGroupIdentifier *string `type:"string" required:"true"` - - // The tags that are to be assigned to the parameter group. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A description for the copied DB cluster parameter group. - // - // TargetDBClusterParameterGroupDescription is a required field - TargetDBClusterParameterGroupDescription *string `type:"string" required:"true"` - - // The identifier for the copied DB cluster parameter group. - // - // Constraints: - // - // * Cannot be null, empty, or blank. - // - // * Must contain from 1 to 255 letters, numbers, or hyphens. - // - // * The first character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster-param-group1 - // - // TargetDBClusterParameterGroupIdentifier is a required field - TargetDBClusterParameterGroupIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyDBClusterParameterGroupInput"} - if s.SourceDBClusterParameterGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDBClusterParameterGroupIdentifier")) - } - if s.TargetDBClusterParameterGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBClusterParameterGroupDescription")) - } - if s.TargetDBClusterParameterGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBClusterParameterGroupIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceDBClusterParameterGroupIdentifier sets the SourceDBClusterParameterGroupIdentifier field's value. -func (s *CopyDBClusterParameterGroupInput) SetSourceDBClusterParameterGroupIdentifier(v string) *CopyDBClusterParameterGroupInput { - s.SourceDBClusterParameterGroupIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CopyDBClusterParameterGroupInput) SetTags(v []*Tag) *CopyDBClusterParameterGroupInput { - s.Tags = v - return s -} - -// SetTargetDBClusterParameterGroupDescription sets the TargetDBClusterParameterGroupDescription field's value. -func (s *CopyDBClusterParameterGroupInput) SetTargetDBClusterParameterGroupDescription(v string) *CopyDBClusterParameterGroupInput { - s.TargetDBClusterParameterGroupDescription = &v - return s -} - -// SetTargetDBClusterParameterGroupIdentifier sets the TargetDBClusterParameterGroupIdentifier field's value. -func (s *CopyDBClusterParameterGroupInput) SetTargetDBClusterParameterGroupIdentifier(v string) *CopyDBClusterParameterGroupInput { - s.TargetDBClusterParameterGroupIdentifier = &v - return s -} - -type CopyDBClusterParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB cluster parameter group. - DBClusterParameterGroup *DBClusterParameterGroup `type:"structure"` -} - -// String returns the string representation -func (s CopyDBClusterParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBClusterParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. -func (s *CopyDBClusterParameterGroupOutput) SetDBClusterParameterGroup(v *DBClusterParameterGroup) *CopyDBClusterParameterGroupOutput { - s.DBClusterParameterGroup = v - return s -} - -// Represents the input to CopyDBClusterSnapshot. -type CopyDBClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // Set to true to copy all tags from the source DB cluster snapshot to the target - // DB cluster snapshot, and otherwise false. The default is false. - CopyTags *bool `type:"boolean"` - - // The AWS KMS key ID for an encrypted DB cluster snapshot. The AWS KMS key - // ID is the Amazon Resource Name (ARN), AWS KMS key identifier, or the AWS - // KMS key alias for the AWS KMS encryption key. - // - // If you copy an encrypted DB cluster snapshot from your AWS account, you can - // specify a value for KmsKeyId to encrypt the copy with a new AWS KMS encryption - // key. If you don't specify a value for KmsKeyId, then the copy of the DB cluster - // snapshot is encrypted with the same AWS KMS key as the source DB cluster - // snapshot. - // - // If you copy an encrypted DB cluster snapshot that is shared from another - // AWS account, then you must specify a value for KmsKeyId. - // - // To copy an encrypted DB cluster snapshot to another AWS Region, set KmsKeyId - // to the AWS KMS key ID that you want to use to encrypt the copy of the DB - // cluster snapshot in the destination Region. AWS KMS encryption keys are specific - // to the AWS Region that they are created in, and you can't use encryption - // keys from one Region in another Region. - // - // If you copy an unencrypted DB cluster snapshot and specify a value for the - // KmsKeyId parameter, an error is returned. - KmsKeyId *string `type:"string"` - - // The URL that contains a Signature Version 4 signed request for the CopyDBClusterSnapshot - // API action in the AWS Region that contains the source DB cluster snapshot - // to copy. You must use the PreSignedUrl parameter when copying an encrypted - // DB cluster snapshot from another AWS Region. - // - // The presigned URL must be a valid request for the CopyDBSClusterSnapshot - // API action that can be executed in the source AWS Region that contains the - // encrypted DB cluster snapshot to be copied. The presigned URL request must - // contain the following parameter values: - // - // * KmsKeyId - The AWS KMS key identifier for the key to use to encrypt - // the copy of the DB cluster snapshot in the destination AWS Region. This - // is the same identifier for both the CopyDBClusterSnapshot action that - // is called in the destination AWS Region, and the action contained in the - // presigned URL. - // - // * DestinationRegion - The name of the AWS Region that the DB cluster snapshot - // will be created in. - // - // * SourceDBClusterSnapshotIdentifier - The DB cluster snapshot identifier - // for the encrypted DB cluster snapshot to be copied. This identifier must - // be in the Amazon Resource Name (ARN) format for the source AWS Region. - // For example, if you are copying an encrypted DB cluster snapshot from - // the us-west-2 AWS Region, then your SourceDBClusterSnapshotIdentifier - // looks like the following example: arn:aws:rds:us-west-2:123456789012:cluster-snapshot:my-cluster-snapshot-20161115. - PreSignedUrl *string `type:"string"` - - // The identifier of the DB cluster snapshot to copy. This parameter is not - // case sensitive. - // - // You can't copy an encrypted, shared DB cluster snapshot from one AWS Region - // to another. - // - // Constraints: - // - // * Must specify a valid system snapshot in the "available" state. - // - // * If the source snapshot is in the same AWS Region as the copy, specify - // a valid DB snapshot identifier. - // - // * If the source snapshot is in a different AWS Region than the copy, specify - // a valid DB cluster snapshot ARN. - // - // Example: my-cluster-snapshot1 - // - // SourceDBClusterSnapshotIdentifier is a required field - SourceDBClusterSnapshotIdentifier *string `type:"string" required:"true"` - - // The tags to be assigned to the DB cluster snapshot. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // The identifier of the new DB cluster snapshot to create from the source DB - // cluster snapshot. This parameter is not case sensitive. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * The first character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster-snapshot2 - // - // TargetDBClusterSnapshotIdentifier is a required field - TargetDBClusterSnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyDBClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyDBClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyDBClusterSnapshotInput"} - if s.SourceDBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDBClusterSnapshotIdentifier")) - } - if s.TargetDBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCopyTags sets the CopyTags field's value. -func (s *CopyDBClusterSnapshotInput) SetCopyTags(v bool) *CopyDBClusterSnapshotInput { - s.CopyTags = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CopyDBClusterSnapshotInput) SetKmsKeyId(v string) *CopyDBClusterSnapshotInput { - s.KmsKeyId = &v - return s -} - -// SetPreSignedUrl sets the PreSignedUrl field's value. -func (s *CopyDBClusterSnapshotInput) SetPreSignedUrl(v string) *CopyDBClusterSnapshotInput { - s.PreSignedUrl = &v - return s -} - -// SetSourceDBClusterSnapshotIdentifier sets the SourceDBClusterSnapshotIdentifier field's value. -func (s *CopyDBClusterSnapshotInput) SetSourceDBClusterSnapshotIdentifier(v string) *CopyDBClusterSnapshotInput { - s.SourceDBClusterSnapshotIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CopyDBClusterSnapshotInput) SetTags(v []*Tag) *CopyDBClusterSnapshotInput { - s.Tags = v - return s -} - -// SetTargetDBClusterSnapshotIdentifier sets the TargetDBClusterSnapshotIdentifier field's value. -func (s *CopyDBClusterSnapshotInput) SetTargetDBClusterSnapshotIdentifier(v string) *CopyDBClusterSnapshotInput { - s.TargetDBClusterSnapshotIdentifier = &v - return s -} - -type CopyDBClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB cluster snapshot. - DBClusterSnapshot *DBClusterSnapshot `type:"structure"` -} - -// String returns the string representation -func (s CopyDBClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. -func (s *CopyDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *CopyDBClusterSnapshotOutput { - s.DBClusterSnapshot = v - return s -} - -// Represents the input to CreateDBCluster. -type CreateDBClusterInput struct { - _ struct{} `type:"structure"` - - // A list of Amazon EC2 Availability Zones that instances in the DB cluster - // can be created in. - AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // The number of days for which automated backups are retained. You must specify - // a minimum value of 1. - // - // Default: 1 - // - // Constraints: - // - // * Must be a value from 1 to 35. - BackupRetentionPeriod *int64 `type:"integer"` - - // The DB cluster identifier. This parameter is stored as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * The first character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The name of the DB cluster parameter group to associate with this DB cluster. - DBClusterParameterGroupName *string `type:"string"` - - // A DB subnet group to associate with this DB cluster. - // - // Constraints: Must match the name of an existing DBSubnetGroup. Must not be - // default. - // - // Example: mySubnetgroup - DBSubnetGroupName *string `type:"string"` - - // A list of log types that need to be enabled for exporting to Amazon CloudWatch - // Logs. - EnableCloudwatchLogsExports []*string `type:"list"` - - // The name of the database engine to be used for this DB cluster. - // - // Valid values: docdb - // - // Engine is a required field - Engine *string `type:"string" required:"true"` - - // The version number of the database engine to use. - EngineVersion *string `type:"string"` - - // The AWS KMS key identifier for an encrypted DB cluster. - // - // The AWS KMS key identifier is the Amazon Resource Name (ARN) for the AWS - // KMS encryption key. If you are creating a DB cluster using the same AWS account - // that owns the AWS KMS encryption key that is used to encrypt the new DB cluster, - // you can use the AWS KMS key alias instead of the ARN for the AWS KMS encryption - // key. - // - // If an encryption key is not specified in KmsKeyId: - // - // * If ReplicationSourceIdentifier identifies an encrypted source, then - // Amazon DocumentDB uses the encryption key that is used to encrypt the - // source. Otherwise, Amazon DocumentDB uses your default encryption key. - // - // - // * If the StorageEncrypted parameter is true and ReplicationSourceIdentifier - // is not specified, Amazon DocumentDB uses your default encryption key. - // - // AWS KMS creates the default encryption key for your AWS account. Your AWS - // account has a different default encryption key for each AWS Region. - // - // If you create a replica of an encrypted DB cluster in another AWS Region, - // you must set KmsKeyId to a KMS key ID that is valid in the destination AWS - // Region. This key is used to encrypt the replica in that AWS Region. - KmsKeyId *string `type:"string"` - - // The password for the master database user. This password can contain any - // printable ASCII character except "/", """, or "@". - // - // Constraints: Must contain from 8 to 41 characters. - MasterUserPassword *string `type:"string"` - - // The name of the master user for the DB cluster. - // - // Constraints: - // - // * Must be from 1 to 16 letters or numbers. - // - // * The first character must be a letter. - // - // * Cannot be a reserved word for the chosen database engine. - MasterUsername *string `type:"string"` - - // The port number on which the instances in the DB cluster accept connections. - Port *int64 `type:"integer"` - - // The daily time range during which automated backups are created if automated - // backups are enabled using the BackupRetentionPeriod parameter. - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region. - // - // Constraints: - // - // * Must be in the format hh24:mi-hh24:mi. - // - // * Must be in Universal Coordinated Time (UTC). - // - // * Must not conflict with the preferred maintenance window. - // - // * Must be at least 30 minutes. - PreferredBackupWindow *string `type:"string"` - - // The weekly time range during which system maintenance can occur, in Universal - // Coordinated Time (UTC). - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region, occurring on a random day of the week. - // - // Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun - // - // Constraints: Minimum 30-minute window. - PreferredMaintenanceWindow *string `type:"string"` - - // Specifies whether the DB cluster is encrypted. - StorageEncrypted *bool `type:"boolean"` - - // The tags to be assigned to the DB cluster. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A list of EC2 VPC security groups to associate with this DB cluster. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s CreateDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.Engine == nil { - invalidParams.Add(request.NewErrParamRequired("Engine")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *CreateDBClusterInput) SetAvailabilityZones(v []*string) *CreateDBClusterInput { - s.AvailabilityZones = v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *CreateDBClusterInput) SetBackupRetentionPeriod(v int64) *CreateDBClusterInput { - s.BackupRetentionPeriod = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *CreateDBClusterInput) SetDBClusterIdentifier(v string) *CreateDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *CreateDBClusterInput) SetDBClusterParameterGroupName(v string) *CreateDBClusterInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *CreateDBClusterInput) SetDBSubnetGroupName(v string) *CreateDBClusterInput { - s.DBSubnetGroupName = &v - return s -} - -// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. -func (s *CreateDBClusterInput) SetEnableCloudwatchLogsExports(v []*string) *CreateDBClusterInput { - s.EnableCloudwatchLogsExports = v - return s -} - -// SetEngine sets the Engine field's value. -func (s *CreateDBClusterInput) SetEngine(v string) *CreateDBClusterInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *CreateDBClusterInput) SetEngineVersion(v string) *CreateDBClusterInput { - s.EngineVersion = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateDBClusterInput) SetKmsKeyId(v string) *CreateDBClusterInput { - s.KmsKeyId = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *CreateDBClusterInput) SetMasterUserPassword(v string) *CreateDBClusterInput { - s.MasterUserPassword = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *CreateDBClusterInput) SetMasterUsername(v string) *CreateDBClusterInput { - s.MasterUsername = &v - return s -} - -// SetPort sets the Port field's value. -func (s *CreateDBClusterInput) SetPort(v int64) *CreateDBClusterInput { - s.Port = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *CreateDBClusterInput) SetPreferredBackupWindow(v string) *CreateDBClusterInput { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CreateDBClusterInput) SetPreferredMaintenanceWindow(v string) *CreateDBClusterInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *CreateDBClusterInput) SetStorageEncrypted(v bool) *CreateDBClusterInput { - s.StorageEncrypted = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBClusterInput) SetTags(v []*Tag) *CreateDBClusterInput { - s.Tags = v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *CreateDBClusterInput) SetVpcSecurityGroupIds(v []*string) *CreateDBClusterInput { - s.VpcSecurityGroupIds = v - return s -} - -type CreateDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB cluster. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s CreateDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *CreateDBClusterOutput) SetDBCluster(v *DBCluster) *CreateDBClusterOutput { - s.DBCluster = v - return s -} - -// Represents the input of CreateDBClusterParameterGroup. -type CreateDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group. - // - // Constraints: - // - // * Must match the name of an existing DBClusterParameterGroup. - // - // This value is stored as a lowercase string. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` - - // The DB cluster parameter group family name. - // - // DBParameterGroupFamily is a required field - DBParameterGroupFamily *string `type:"string" required:"true"` - - // The description for the DB cluster parameter group. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // The tags to be assigned to the DB cluster parameter group. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterParameterGroupInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - if s.DBParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) - } - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *CreateDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *CreateDBClusterParameterGroupInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *CreateDBClusterParameterGroupInput) SetDBParameterGroupFamily(v string) *CreateDBClusterParameterGroupInput { - s.DBParameterGroupFamily = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateDBClusterParameterGroupInput) SetDescription(v string) *CreateDBClusterParameterGroupInput { - s.Description = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBClusterParameterGroupInput) SetTags(v []*Tag) *CreateDBClusterParameterGroupInput { - s.Tags = v - return s -} - -type CreateDBClusterParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB cluster parameter group. - DBClusterParameterGroup *DBClusterParameterGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateDBClusterParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. -func (s *CreateDBClusterParameterGroupOutput) SetDBClusterParameterGroup(v *DBClusterParameterGroup) *CreateDBClusterParameterGroupOutput { - s.DBClusterParameterGroup = v - return s -} - -// Represents the input of CreateDBClusterSnapshot. -type CreateDBClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // The identifier of the DB cluster to create a snapshot for. This parameter - // is not case sensitive. - // - // Constraints: - // - // * Must match the identifier of an existing DBCluster. - // - // Example: my-cluster - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The identifier of the DB cluster snapshot. This parameter is stored as a - // lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * The first character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster-snapshot1 - // - // DBClusterSnapshotIdentifier is a required field - DBClusterSnapshotIdentifier *string `type:"string" required:"true"` - - // The tags to be assigned to the DB cluster snapshot. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateDBClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterSnapshotInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.DBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *CreateDBClusterSnapshotInput) SetDBClusterIdentifier(v string) *CreateDBClusterSnapshotInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *CreateDBClusterSnapshotInput) SetDBClusterSnapshotIdentifier(v string) *CreateDBClusterSnapshotInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBClusterSnapshotInput) SetTags(v []*Tag) *CreateDBClusterSnapshotInput { - s.Tags = v - return s -} - -type CreateDBClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB cluster snapshot. - DBClusterSnapshot *DBClusterSnapshot `type:"structure"` -} - -// String returns the string representation -func (s CreateDBClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. -func (s *CreateDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *CreateDBClusterSnapshotOutput { - s.DBClusterSnapshot = v - return s -} - -// Represents the input to CreateDBInstance. -type CreateDBInstanceInput struct { - _ struct{} `type:"structure"` - - // Indicates that minor engine upgrades are applied automatically to the DB - // instance during the maintenance window. - // - // Default: true - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The Amazon EC2 Availability Zone that the DB instance is created in. - // - // Default: A random, system-chosen Availability Zone in the endpoint's AWS - // Region. - // - // Example: us-east-1d - // - // Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ - // parameter is set to true. The specified Availability Zone must be in the - // same AWS Region as the current endpoint. - AvailabilityZone *string `type:"string"` - - // The identifier of the DB cluster that the instance will belong to. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The compute and memory capacity of the DB instance; for example, db.m4.large. - // - // DBInstanceClass is a required field - DBInstanceClass *string `type:"string" required:"true"` - - // The DB instance identifier. This parameter is stored as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * The first character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: mydbinstance - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The name of the database engine to be used for this instance. - // - // Valid value: docdb - // - // Engine is a required field - Engine *string `type:"string" required:"true"` - - // The time range each week during which system maintenance can occur, in Universal - // Coordinated Time (UTC). - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region, occurring on a random day of the week. - // - // Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun - // - // Constraints: Minimum 30-minute window. - PreferredMaintenanceWindow *string `type:"string"` - - // A value that specifies the order in which an Amazon DocumentDB replica is - // promoted to the primary instance after a failure of the existing primary - // instance. - // - // Default: 1 - // - // Valid values: 0-15 - PromotionTier *int64 `type:"integer"` - - // The tags to be assigned to the DB instance. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBInstanceInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.DBInstanceClass == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceClass")) - } - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - if s.Engine == nil { - invalidParams.Add(request.NewErrParamRequired("Engine")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *CreateDBInstanceInput) SetAutoMinorVersionUpgrade(v bool) *CreateDBInstanceInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateDBInstanceInput) SetAvailabilityZone(v string) *CreateDBInstanceInput { - s.AvailabilityZone = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *CreateDBInstanceInput) SetDBClusterIdentifier(v string) *CreateDBInstanceInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *CreateDBInstanceInput) SetDBInstanceClass(v string) *CreateDBInstanceInput { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *CreateDBInstanceInput) SetDBInstanceIdentifier(v string) *CreateDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *CreateDBInstanceInput) SetEngine(v string) *CreateDBInstanceInput { - s.Engine = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CreateDBInstanceInput) SetPreferredMaintenanceWindow(v string) *CreateDBInstanceInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPromotionTier sets the PromotionTier field's value. -func (s *CreateDBInstanceInput) SetPromotionTier(v int64) *CreateDBInstanceInput { - s.PromotionTier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBInstanceInput) SetTags(v []*Tag) *CreateDBInstanceInput { - s.Tags = v - return s -} - -type CreateDBInstanceOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB instance. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s CreateDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBInstanceOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *CreateDBInstanceOutput) SetDBInstance(v *DBInstance) *CreateDBInstanceOutput { - s.DBInstance = v - return s -} - -// Represents the input to CreateDBSubnetGroup. -type CreateDBSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The description for the DB subnet group. - // - // DBSubnetGroupDescription is a required field - DBSubnetGroupDescription *string `type:"string" required:"true"` - - // The name for the DB subnet group. This value is stored as a lowercase string. - // - // Constraints: Must contain no more than 255 letters, numbers, periods, underscores, - // spaces, or hyphens. Must not be default. - // - // Example: mySubnetgroup - // - // DBSubnetGroupName is a required field - DBSubnetGroupName *string `type:"string" required:"true"` - - // The Amazon EC2 subnet IDs for the DB subnet group. - // - // SubnetIds is a required field - SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` - - // The tags to be assigned to the DB subnet group. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateDBSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBSubnetGroupInput"} - if s.DBSubnetGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupDescription")) - } - if s.DBSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. -func (s *CreateDBSubnetGroupInput) SetDBSubnetGroupDescription(v string) *CreateDBSubnetGroupInput { - s.DBSubnetGroupDescription = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *CreateDBSubnetGroupInput) SetDBSubnetGroupName(v string) *CreateDBSubnetGroupInput { - s.DBSubnetGroupName = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateDBSubnetGroupInput) SetSubnetIds(v []*string) *CreateDBSubnetGroupInput { - s.SubnetIds = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBSubnetGroupInput) SetTags(v []*Tag) *CreateDBSubnetGroupInput { - s.Tags = v - return s -} - -type CreateDBSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB subnet group. - DBSubnetGroup *DBSubnetGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateDBSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetDBSubnetGroup sets the DBSubnetGroup field's value. -func (s *CreateDBSubnetGroupOutput) SetDBSubnetGroup(v *DBSubnetGroup) *CreateDBSubnetGroupOutput { - s.DBSubnetGroup = v - return s -} - -// Detailed information about a DB cluster. -type DBCluster struct { - _ struct{} `type:"structure"` - - // Provides a list of the AWS Identity and Access Management (IAM) roles that - // are associated with the DB cluster. IAM roles that are associated with a - // DB cluster grant permission for the DB cluster to access other AWS services - // on your behalf. - AssociatedRoles []*DBClusterRole `locationNameList:"DBClusterRole" type:"list"` - - // Provides the list of Amazon EC2 Availability Zones that instances in the - // DB cluster can be created in. - AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // Specifies the number of days for which automatic DB snapshots are retained. - BackupRetentionPeriod *int64 `type:"integer"` - - // Specifies the time when the DB cluster was created, in Universal Coordinated - // Time (UTC). - ClusterCreateTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) for the DB cluster. - DBClusterArn *string `type:"string"` - - // Contains a user-supplied DB cluster identifier. This identifier is the unique - // key that identifies a DB cluster. - DBClusterIdentifier *string `type:"string"` - - // Provides the list of instances that make up the DB cluster. - DBClusterMembers []*DBClusterMember `locationNameList:"DBClusterMember" type:"list"` - - // Specifies the name of the DB cluster parameter group for the DB cluster. - DBClusterParameterGroup *string `type:"string"` - - // Specifies information on the subnet group that is associated with the DB - // cluster, including the name, description, and subnets in the subnet group. - DBSubnetGroup *string `type:"string"` - - // The AWS Region-unique, immutable identifier for the DB cluster. This identifier - // is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB - // cluster is accessed. - DbClusterResourceId *string `type:"string"` - - // The earliest time to which a database can be restored with point-in-time - // restore. - EarliestRestorableTime *time.Time `type:"timestamp"` - - // A list of log types that this DB cluster is configured to export to Amazon - // CloudWatch Logs. - EnabledCloudwatchLogsExports []*string `type:"list"` - - // Specifies the connection endpoint for the primary instance of the DB cluster. - Endpoint *string `type:"string"` - - // Provides the name of the database engine to be used for this DB cluster. - Engine *string `type:"string"` - - // Indicates the database engine version. - EngineVersion *string `type:"string"` - - // Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. - HostedZoneId *string `type:"string"` - - // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted - // DB cluster. - KmsKeyId *string `type:"string"` - - // Specifies the latest time to which a database can be restored with point-in-time - // restore. - LatestRestorableTime *time.Time `type:"timestamp"` - - // Contains the master user name for the DB cluster. - MasterUsername *string `type:"string"` - - // Specifies whether the DB cluster has instances in multiple Availability Zones. - MultiAZ *bool `type:"boolean"` - - // Specifies the progress of the operation as a percentage. - PercentProgress *string `type:"string"` - - // Specifies the port that the database engine is listening on. - Port *int64 `type:"integer"` - - // Specifies the daily time range during which automated backups are created - // if automated backups are enabled, as determined by the BackupRetentionPeriod. - PreferredBackupWindow *string `type:"string"` - - // Specifies the weekly time range during which system maintenance can occur, - // in Universal Coordinated Time (UTC). - PreferredMaintenanceWindow *string `type:"string"` - - // The reader endpoint for the DB cluster. The reader endpoint for a DB cluster - // load balances connections across the Amazon DocumentDB replicas that are - // available in a DB cluster. As clients request new connections to the reader - // endpoint, Amazon DocumentDB distributes the connection requests among the - // Amazon DocumentDB replicas in the DB cluster. This functionality can help - // balance your read workload across multiple Amazon DocumentDB replicas in - // your DB cluster. - // - // If a failover occurs, and the Amazon DocumentDB replica that you are connected - // to is promoted to be the primary instance, your connection is dropped. To - // continue sending your read workload to other Amazon DocumentDB replicas in - // the cluster, you can then reconnect to the reader endpoint. - ReaderEndpoint *string `type:"string"` - - // Specifies the current state of this DB cluster. - Status *string `type:"string"` - - // Specifies whether the DB cluster is encrypted. - StorageEncrypted *bool `type:"boolean"` - - // Provides a list of virtual private cloud (VPC) security groups that the DB - // cluster belongs to. - VpcSecurityGroups []*VpcSecurityGroupMembership `locationNameList:"VpcSecurityGroupMembership" type:"list"` -} - -// String returns the string representation -func (s DBCluster) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBCluster) GoString() string { - return s.String() -} - -// SetAssociatedRoles sets the AssociatedRoles field's value. -func (s *DBCluster) SetAssociatedRoles(v []*DBClusterRole) *DBCluster { - s.AssociatedRoles = v - return s -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DBCluster) SetAvailabilityZones(v []*string) *DBCluster { - s.AvailabilityZones = v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *DBCluster) SetBackupRetentionPeriod(v int64) *DBCluster { - s.BackupRetentionPeriod = &v - return s -} - -// SetClusterCreateTime sets the ClusterCreateTime field's value. -func (s *DBCluster) SetClusterCreateTime(v time.Time) *DBCluster { - s.ClusterCreateTime = &v - return s -} - -// SetDBClusterArn sets the DBClusterArn field's value. -func (s *DBCluster) SetDBClusterArn(v string) *DBCluster { - s.DBClusterArn = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DBCluster) SetDBClusterIdentifier(v string) *DBCluster { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterMembers sets the DBClusterMembers field's value. -func (s *DBCluster) SetDBClusterMembers(v []*DBClusterMember) *DBCluster { - s.DBClusterMembers = v - return s -} - -// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. -func (s *DBCluster) SetDBClusterParameterGroup(v string) *DBCluster { - s.DBClusterParameterGroup = &v - return s -} - -// SetDBSubnetGroup sets the DBSubnetGroup field's value. -func (s *DBCluster) SetDBSubnetGroup(v string) *DBCluster { - s.DBSubnetGroup = &v - return s -} - -// SetDbClusterResourceId sets the DbClusterResourceId field's value. -func (s *DBCluster) SetDbClusterResourceId(v string) *DBCluster { - s.DbClusterResourceId = &v - return s -} - -// SetEarliestRestorableTime sets the EarliestRestorableTime field's value. -func (s *DBCluster) SetEarliestRestorableTime(v time.Time) *DBCluster { - s.EarliestRestorableTime = &v - return s -} - -// SetEnabledCloudwatchLogsExports sets the EnabledCloudwatchLogsExports field's value. -func (s *DBCluster) SetEnabledCloudwatchLogsExports(v []*string) *DBCluster { - s.EnabledCloudwatchLogsExports = v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *DBCluster) SetEndpoint(v string) *DBCluster { - s.Endpoint = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DBCluster) SetEngine(v string) *DBCluster { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DBCluster) SetEngineVersion(v string) *DBCluster { - s.EngineVersion = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *DBCluster) SetHostedZoneId(v string) *DBCluster { - s.HostedZoneId = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DBCluster) SetKmsKeyId(v string) *DBCluster { - s.KmsKeyId = &v - return s -} - -// SetLatestRestorableTime sets the LatestRestorableTime field's value. -func (s *DBCluster) SetLatestRestorableTime(v time.Time) *DBCluster { - s.LatestRestorableTime = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *DBCluster) SetMasterUsername(v string) *DBCluster { - s.MasterUsername = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *DBCluster) SetMultiAZ(v bool) *DBCluster { - s.MultiAZ = &v - return s -} - -// SetPercentProgress sets the PercentProgress field's value. -func (s *DBCluster) SetPercentProgress(v string) *DBCluster { - s.PercentProgress = &v - return s -} - -// SetPort sets the Port field's value. -func (s *DBCluster) SetPort(v int64) *DBCluster { - s.Port = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *DBCluster) SetPreferredBackupWindow(v string) *DBCluster { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *DBCluster) SetPreferredMaintenanceWindow(v string) *DBCluster { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetReaderEndpoint sets the ReaderEndpoint field's value. -func (s *DBCluster) SetReaderEndpoint(v string) *DBCluster { - s.ReaderEndpoint = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBCluster) SetStatus(v string) *DBCluster { - s.Status = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *DBCluster) SetStorageEncrypted(v bool) *DBCluster { - s.StorageEncrypted = &v - return s -} - -// SetVpcSecurityGroups sets the VpcSecurityGroups field's value. -func (s *DBCluster) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *DBCluster { - s.VpcSecurityGroups = v - return s -} - -// Contains information about an instance that is part of a DB cluster. -type DBClusterMember struct { - _ struct{} `type:"structure"` - - // Specifies the status of the DB cluster parameter group for this member of - // the DB cluster. - DBClusterParameterGroupStatus *string `type:"string"` - - // Specifies the instance identifier for this member of the DB cluster. - DBInstanceIdentifier *string `type:"string"` - - // A value that is true if the cluster member is the primary instance for the - // DB cluster and false otherwise. - IsClusterWriter *bool `type:"boolean"` - - // A value that specifies the order in which an Amazon DocumentDB replica is - // promoted to the primary instance after a failure of the existing primary - // instance. - PromotionTier *int64 `type:"integer"` -} - -// String returns the string representation -func (s DBClusterMember) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterMember) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroupStatus sets the DBClusterParameterGroupStatus field's value. -func (s *DBClusterMember) SetDBClusterParameterGroupStatus(v string) *DBClusterMember { - s.DBClusterParameterGroupStatus = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DBClusterMember) SetDBInstanceIdentifier(v string) *DBClusterMember { - s.DBInstanceIdentifier = &v - return s -} - -// SetIsClusterWriter sets the IsClusterWriter field's value. -func (s *DBClusterMember) SetIsClusterWriter(v bool) *DBClusterMember { - s.IsClusterWriter = &v - return s -} - -// SetPromotionTier sets the PromotionTier field's value. -func (s *DBClusterMember) SetPromotionTier(v int64) *DBClusterMember { - s.PromotionTier = &v - return s -} - -// Detailed information about a DB cluster parameter group. -type DBClusterParameterGroup struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the DB cluster parameter group. - DBClusterParameterGroupArn *string `type:"string"` - - // Provides the name of the DB cluster parameter group. - DBClusterParameterGroupName *string `type:"string"` - - // Provides the name of the DB parameter group family that this DB cluster parameter - // group is compatible with. - DBParameterGroupFamily *string `type:"string"` - - // Provides the customer-specified description for this DB cluster parameter - // group. - Description *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterParameterGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterParameterGroup) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroupArn sets the DBClusterParameterGroupArn field's value. -func (s *DBClusterParameterGroup) SetDBClusterParameterGroupArn(v string) *DBClusterParameterGroup { - s.DBClusterParameterGroupArn = &v - return s -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *DBClusterParameterGroup) SetDBClusterParameterGroupName(v string) *DBClusterParameterGroup { - s.DBClusterParameterGroupName = &v - return s -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DBClusterParameterGroup) SetDBParameterGroupFamily(v string) *DBClusterParameterGroup { - s.DBParameterGroupFamily = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DBClusterParameterGroup) SetDescription(v string) *DBClusterParameterGroup { - s.Description = &v - return s -} - -// Describes an AWS Identity and Access Management (IAM) role that is associated -// with a DB cluster. -type DBClusterRole struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM role that is associated with the - // DB cluster. - RoleArn *string `type:"string"` - - // Describes the state of association between the IAM role and the DB cluster. - // The Status property returns one of the following values: - // - // * ACTIVE - The IAM role ARN is associated with the DB cluster and can - // be used to access other AWS services on your behalf. - // - // * PENDING - The IAM role ARN is being associated with the DB cluster. - // - // * INVALID - The IAM role ARN is associated with the DB cluster, but the - // DB cluster cannot assume the IAM role to access other AWS services on - // your behalf. - Status *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterRole) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterRole) GoString() string { - return s.String() -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DBClusterRole) SetRoleArn(v string) *DBClusterRole { - s.RoleArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBClusterRole) SetStatus(v string) *DBClusterRole { - s.Status = &v - return s -} - -// Detailed information about a DB cluster snapshot. -type DBClusterSnapshot struct { - _ struct{} `type:"structure"` - - // Provides the list of Amazon EC2 Availability Zones that instances in the - // DB cluster snapshot can be restored in. - AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // Specifies the time when the DB cluster was created, in Universal Coordinated - // Time (UTC). - ClusterCreateTime *time.Time `type:"timestamp"` - - // Specifies the DB cluster identifier of the DB cluster that this DB cluster - // snapshot was created from. - DBClusterIdentifier *string `type:"string"` - - // The Amazon Resource Name (ARN) for the DB cluster snapshot. - DBClusterSnapshotArn *string `type:"string"` - - // Specifies the identifier for the DB cluster snapshot. - DBClusterSnapshotIdentifier *string `type:"string"` - - // Specifies the name of the database engine. - Engine *string `type:"string"` - - // Provides the version of the database engine for this DB cluster snapshot. - EngineVersion *string `type:"string"` - - // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted - // DB cluster snapshot. - KmsKeyId *string `type:"string"` - - // Provides the master user name for the DB cluster snapshot. - MasterUsername *string `type:"string"` - - // Specifies the percentage of the estimated data that has been transferred. - PercentProgress *int64 `type:"integer"` - - // Specifies the port that the DB cluster was listening on at the time of the - // snapshot. - Port *int64 `type:"integer"` - - // Provides the time when the snapshot was taken, in UTC. - SnapshotCreateTime *time.Time `type:"timestamp"` - - // Provides the type of the DB cluster snapshot. - SnapshotType *string `type:"string"` - - // If the DB cluster snapshot was copied from a source DB cluster snapshot, - // the ARN for the source DB cluster snapshot; otherwise, a null value. - SourceDBClusterSnapshotArn *string `type:"string"` - - // Specifies the status of this DB cluster snapshot. - Status *string `type:"string"` - - // Specifies whether the DB cluster snapshot is encrypted. - StorageEncrypted *bool `type:"boolean"` - - // Provides the virtual private cloud (VPC) ID that is associated with the DB - // cluster snapshot. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterSnapshot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterSnapshot) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DBClusterSnapshot) SetAvailabilityZones(v []*string) *DBClusterSnapshot { - s.AvailabilityZones = v - return s -} - -// SetClusterCreateTime sets the ClusterCreateTime field's value. -func (s *DBClusterSnapshot) SetClusterCreateTime(v time.Time) *DBClusterSnapshot { - s.ClusterCreateTime = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DBClusterSnapshot) SetDBClusterIdentifier(v string) *DBClusterSnapshot { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterSnapshotArn sets the DBClusterSnapshotArn field's value. -func (s *DBClusterSnapshot) SetDBClusterSnapshotArn(v string) *DBClusterSnapshot { - s.DBClusterSnapshotArn = &v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DBClusterSnapshot) SetDBClusterSnapshotIdentifier(v string) *DBClusterSnapshot { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DBClusterSnapshot) SetEngine(v string) *DBClusterSnapshot { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DBClusterSnapshot) SetEngineVersion(v string) *DBClusterSnapshot { - s.EngineVersion = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DBClusterSnapshot) SetKmsKeyId(v string) *DBClusterSnapshot { - s.KmsKeyId = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *DBClusterSnapshot) SetMasterUsername(v string) *DBClusterSnapshot { - s.MasterUsername = &v - return s -} - -// SetPercentProgress sets the PercentProgress field's value. -func (s *DBClusterSnapshot) SetPercentProgress(v int64) *DBClusterSnapshot { - s.PercentProgress = &v - return s -} - -// SetPort sets the Port field's value. -func (s *DBClusterSnapshot) SetPort(v int64) *DBClusterSnapshot { - s.Port = &v - return s -} - -// SetSnapshotCreateTime sets the SnapshotCreateTime field's value. -func (s *DBClusterSnapshot) SetSnapshotCreateTime(v time.Time) *DBClusterSnapshot { - s.SnapshotCreateTime = &v - return s -} - -// SetSnapshotType sets the SnapshotType field's value. -func (s *DBClusterSnapshot) SetSnapshotType(v string) *DBClusterSnapshot { - s.SnapshotType = &v - return s -} - -// SetSourceDBClusterSnapshotArn sets the SourceDBClusterSnapshotArn field's value. -func (s *DBClusterSnapshot) SetSourceDBClusterSnapshotArn(v string) *DBClusterSnapshot { - s.SourceDBClusterSnapshotArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBClusterSnapshot) SetStatus(v string) *DBClusterSnapshot { - s.Status = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *DBClusterSnapshot) SetStorageEncrypted(v bool) *DBClusterSnapshot { - s.StorageEncrypted = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DBClusterSnapshot) SetVpcId(v string) *DBClusterSnapshot { - s.VpcId = &v - return s -} - -// Contains the name and values of a manual DB cluster snapshot attribute. -// -// Manual DB cluster snapshot attributes are used to authorize other AWS accounts -// to restore a manual DB cluster snapshot. -type DBClusterSnapshotAttribute struct { - _ struct{} `type:"structure"` - - // The name of the manual DB cluster snapshot attribute. - // - // The attribute named restore refers to the list of AWS accounts that have - // permission to copy or restore the manual DB cluster snapshot. - AttributeName *string `type:"string"` - - // The values for the manual DB cluster snapshot attribute. - // - // If the AttributeName field is set to restore, then this element returns a - // list of IDs of the AWS accounts that are authorized to copy or restore the - // manual DB cluster snapshot. If a value of all is in the list, then the manual - // DB cluster snapshot is public and available for any AWS account to copy or - // restore. - AttributeValues []*string `locationNameList:"AttributeValue" type:"list"` -} - -// String returns the string representation -func (s DBClusterSnapshotAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterSnapshotAttribute) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *DBClusterSnapshotAttribute) SetAttributeName(v string) *DBClusterSnapshotAttribute { - s.AttributeName = &v - return s -} - -// SetAttributeValues sets the AttributeValues field's value. -func (s *DBClusterSnapshotAttribute) SetAttributeValues(v []*string) *DBClusterSnapshotAttribute { - s.AttributeValues = v - return s -} - -// Detailed information about the attributes that are associated with a DB cluster -// snapshot. -type DBClusterSnapshotAttributesResult struct { - _ struct{} `type:"structure"` - - // The list of attributes and values for the DB cluster snapshot. - DBClusterSnapshotAttributes []*DBClusterSnapshotAttribute `locationNameList:"DBClusterSnapshotAttribute" type:"list"` - - // The identifier of the DB cluster snapshot that the attributes apply to. - DBClusterSnapshotIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterSnapshotAttributesResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterSnapshotAttributesResult) GoString() string { - return s.String() -} - -// SetDBClusterSnapshotAttributes sets the DBClusterSnapshotAttributes field's value. -func (s *DBClusterSnapshotAttributesResult) SetDBClusterSnapshotAttributes(v []*DBClusterSnapshotAttribute) *DBClusterSnapshotAttributesResult { - s.DBClusterSnapshotAttributes = v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DBClusterSnapshotAttributesResult) SetDBClusterSnapshotIdentifier(v string) *DBClusterSnapshotAttributesResult { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// Detailed information about a DB engine version. -type DBEngineVersion struct { - _ struct{} `type:"structure"` - - // The description of the database engine. - DBEngineDescription *string `type:"string"` - - // The description of the database engine version. - DBEngineVersionDescription *string `type:"string"` - - // The name of the DB parameter group family for the database engine. - DBParameterGroupFamily *string `type:"string"` - - // The name of the database engine. - Engine *string `type:"string"` - - // The version number of the database engine. - EngineVersion *string `type:"string"` - - // The types of logs that the database engine has available for export to Amazon - // CloudWatch Logs. - ExportableLogTypes []*string `type:"list"` - - // A value that indicates whether the engine version supports exporting the - // log types specified by ExportableLogTypes to CloudWatch Logs. - SupportsLogExportsToCloudwatchLogs *bool `type:"boolean"` - - // A list of engine versions that this database engine version can be upgraded - // to. - ValidUpgradeTarget []*UpgradeTarget `locationNameList:"UpgradeTarget" type:"list"` -} - -// String returns the string representation -func (s DBEngineVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBEngineVersion) GoString() string { - return s.String() -} - -// SetDBEngineDescription sets the DBEngineDescription field's value. -func (s *DBEngineVersion) SetDBEngineDescription(v string) *DBEngineVersion { - s.DBEngineDescription = &v - return s -} - -// SetDBEngineVersionDescription sets the DBEngineVersionDescription field's value. -func (s *DBEngineVersion) SetDBEngineVersionDescription(v string) *DBEngineVersion { - s.DBEngineVersionDescription = &v - return s -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DBEngineVersion) SetDBParameterGroupFamily(v string) *DBEngineVersion { - s.DBParameterGroupFamily = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DBEngineVersion) SetEngine(v string) *DBEngineVersion { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DBEngineVersion) SetEngineVersion(v string) *DBEngineVersion { - s.EngineVersion = &v - return s -} - -// SetExportableLogTypes sets the ExportableLogTypes field's value. -func (s *DBEngineVersion) SetExportableLogTypes(v []*string) *DBEngineVersion { - s.ExportableLogTypes = v - return s -} - -// SetSupportsLogExportsToCloudwatchLogs sets the SupportsLogExportsToCloudwatchLogs field's value. -func (s *DBEngineVersion) SetSupportsLogExportsToCloudwatchLogs(v bool) *DBEngineVersion { - s.SupportsLogExportsToCloudwatchLogs = &v - return s -} - -// SetValidUpgradeTarget sets the ValidUpgradeTarget field's value. -func (s *DBEngineVersion) SetValidUpgradeTarget(v []*UpgradeTarget) *DBEngineVersion { - s.ValidUpgradeTarget = v - return s -} - -// Detailed information about a DB instance. -type DBInstance struct { - _ struct{} `type:"structure"` - - // Indicates that minor version patches are applied automatically. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // Specifies the name of the Availability Zone that the DB instance is located - // in. - AvailabilityZone *string `type:"string"` - - // Specifies the number of days for which automatic DB snapshots are retained. - BackupRetentionPeriod *int64 `type:"integer"` - - // Contains the name of the DB cluster that the DB instance is a member of if - // the DB instance is a member of a DB cluster. - DBClusterIdentifier *string `type:"string"` - - // The Amazon Resource Name (ARN) for the DB instance. - DBInstanceArn *string `type:"string"` - - // Contains the name of the compute and memory capacity class of the DB instance. - DBInstanceClass *string `type:"string"` - - // Contains a user-provided database identifier. This identifier is the unique - // key that identifies a DB instance. - DBInstanceIdentifier *string `type:"string"` - - // Specifies the current state of this database. - DBInstanceStatus *string `type:"string"` - - // Specifies information on the subnet group that is associated with the DB - // instance, including the name, description, and subnets in the subnet group. - DBSubnetGroup *DBSubnetGroup `type:"structure"` - - // The AWS Region-unique, immutable identifier for the DB instance. This identifier - // is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB - // instance is accessed. - DbiResourceId *string `type:"string"` - - // A list of log types that this DB instance is configured to export to Amazon - // CloudWatch Logs. - EnabledCloudwatchLogsExports []*string `type:"list"` - - // Specifies the connection endpoint. - Endpoint *Endpoint `type:"structure"` - - // Provides the name of the database engine to be used for this DB instance. - Engine *string `type:"string"` - - // Indicates the database engine version. - EngineVersion *string `type:"string"` - - // Provides the date and time that the DB instance was created. - InstanceCreateTime *time.Time `type:"timestamp"` - - // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted - // DB instance. - KmsKeyId *string `type:"string"` - - // Specifies the latest time to which a database can be restored with point-in-time - // restore. - LatestRestorableTime *time.Time `type:"timestamp"` - - // Specifies that changes to the DB instance are pending. This element is included - // only when changes are pending. Specific changes are identified by subelements. - PendingModifiedValues *PendingModifiedValues `type:"structure"` - - // Specifies the daily time range during which automated backups are created - // if automated backups are enabled, as determined by the BackupRetentionPeriod. - PreferredBackupWindow *string `type:"string"` - - // Specifies the weekly time range during which system maintenance can occur, - // in Universal Coordinated Time (UTC). - PreferredMaintenanceWindow *string `type:"string"` - - // A value that specifies the order in which an Amazon DocumentDB replica is - // promoted to the primary instance after a failure of the existing primary - // instance. - PromotionTier *int64 `type:"integer"` - - // Specifies the availability options for the DB instance. A value of true specifies - // an internet-facing instance with a publicly resolvable DNS name, which resolves - // to a public IP address. A value of false specifies an internal instance with - // a DNS name that resolves to a private IP address. - PubliclyAccessible *bool `type:"boolean"` - - // The status of a read replica. If the instance is not a read replica, this - // is blank. - StatusInfos []*DBInstanceStatusInfo `locationNameList:"DBInstanceStatusInfo" type:"list"` - - // Specifies whether the DB instance is encrypted. - StorageEncrypted *bool `type:"boolean"` - - // Provides a list of VPC security group elements that the DB instance belongs - // to. - VpcSecurityGroups []*VpcSecurityGroupMembership `locationNameList:"VpcSecurityGroupMembership" type:"list"` -} - -// String returns the string representation -func (s DBInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBInstance) GoString() string { - return s.String() -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *DBInstance) SetAutoMinorVersionUpgrade(v bool) *DBInstance { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *DBInstance) SetAvailabilityZone(v string) *DBInstance { - s.AvailabilityZone = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *DBInstance) SetBackupRetentionPeriod(v int64) *DBInstance { - s.BackupRetentionPeriod = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DBInstance) SetDBClusterIdentifier(v string) *DBInstance { - s.DBClusterIdentifier = &v - return s -} - -// SetDBInstanceArn sets the DBInstanceArn field's value. -func (s *DBInstance) SetDBInstanceArn(v string) *DBInstance { - s.DBInstanceArn = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *DBInstance) SetDBInstanceClass(v string) *DBInstance { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DBInstance) SetDBInstanceIdentifier(v string) *DBInstance { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBInstanceStatus sets the DBInstanceStatus field's value. -func (s *DBInstance) SetDBInstanceStatus(v string) *DBInstance { - s.DBInstanceStatus = &v - return s -} - -// SetDBSubnetGroup sets the DBSubnetGroup field's value. -func (s *DBInstance) SetDBSubnetGroup(v *DBSubnetGroup) *DBInstance { - s.DBSubnetGroup = v - return s -} - -// SetDbiResourceId sets the DbiResourceId field's value. -func (s *DBInstance) SetDbiResourceId(v string) *DBInstance { - s.DbiResourceId = &v - return s -} - -// SetEnabledCloudwatchLogsExports sets the EnabledCloudwatchLogsExports field's value. -func (s *DBInstance) SetEnabledCloudwatchLogsExports(v []*string) *DBInstance { - s.EnabledCloudwatchLogsExports = v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *DBInstance) SetEndpoint(v *Endpoint) *DBInstance { - s.Endpoint = v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DBInstance) SetEngine(v string) *DBInstance { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DBInstance) SetEngineVersion(v string) *DBInstance { - s.EngineVersion = &v - return s -} - -// SetInstanceCreateTime sets the InstanceCreateTime field's value. -func (s *DBInstance) SetInstanceCreateTime(v time.Time) *DBInstance { - s.InstanceCreateTime = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DBInstance) SetKmsKeyId(v string) *DBInstance { - s.KmsKeyId = &v - return s -} - -// SetLatestRestorableTime sets the LatestRestorableTime field's value. -func (s *DBInstance) SetLatestRestorableTime(v time.Time) *DBInstance { - s.LatestRestorableTime = &v - return s -} - -// SetPendingModifiedValues sets the PendingModifiedValues field's value. -func (s *DBInstance) SetPendingModifiedValues(v *PendingModifiedValues) *DBInstance { - s.PendingModifiedValues = v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *DBInstance) SetPreferredBackupWindow(v string) *DBInstance { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *DBInstance) SetPreferredMaintenanceWindow(v string) *DBInstance { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPromotionTier sets the PromotionTier field's value. -func (s *DBInstance) SetPromotionTier(v int64) *DBInstance { - s.PromotionTier = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *DBInstance) SetPubliclyAccessible(v bool) *DBInstance { - s.PubliclyAccessible = &v - return s -} - -// SetStatusInfos sets the StatusInfos field's value. -func (s *DBInstance) SetStatusInfos(v []*DBInstanceStatusInfo) *DBInstance { - s.StatusInfos = v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *DBInstance) SetStorageEncrypted(v bool) *DBInstance { - s.StorageEncrypted = &v - return s -} - -// SetVpcSecurityGroups sets the VpcSecurityGroups field's value. -func (s *DBInstance) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *DBInstance { - s.VpcSecurityGroups = v - return s -} - -// Provides a list of status information for a DB instance. -type DBInstanceStatusInfo struct { - _ struct{} `type:"structure"` - - // Details of the error if there is an error for the instance. If the instance - // is not in an error state, this value is blank. - Message *string `type:"string"` - - // A Boolean value that is true if the instance is operating normally, or false - // if the instance is in an error state. - Normal *bool `type:"boolean"` - - // Status of the DB instance. For a StatusType of read replica, the values can - // be replicating, error, stopped, or terminated. - Status *string `type:"string"` - - // This value is currently "read replication." - StatusType *string `type:"string"` -} - -// String returns the string representation -func (s DBInstanceStatusInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBInstanceStatusInfo) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *DBInstanceStatusInfo) SetMessage(v string) *DBInstanceStatusInfo { - s.Message = &v - return s -} - -// SetNormal sets the Normal field's value. -func (s *DBInstanceStatusInfo) SetNormal(v bool) *DBInstanceStatusInfo { - s.Normal = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBInstanceStatusInfo) SetStatus(v string) *DBInstanceStatusInfo { - s.Status = &v - return s -} - -// SetStatusType sets the StatusType field's value. -func (s *DBInstanceStatusInfo) SetStatusType(v string) *DBInstanceStatusInfo { - s.StatusType = &v - return s -} - -// Detailed information about a DB subnet group. -type DBSubnetGroup struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Identifier (ARN) for the DB subnet group. - DBSubnetGroupArn *string `type:"string"` - - // Provides the description of the DB subnet group. - DBSubnetGroupDescription *string `type:"string"` - - // The name of the DB subnet group. - DBSubnetGroupName *string `type:"string"` - - // Provides the status of the DB subnet group. - SubnetGroupStatus *string `type:"string"` - - // Detailed information about one or more subnets within a DB subnet group. - Subnets []*Subnet `locationNameList:"Subnet" type:"list"` - - // Provides the virtual private cloud (VPC) ID of the DB subnet group. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s DBSubnetGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBSubnetGroup) GoString() string { - return s.String() -} - -// SetDBSubnetGroupArn sets the DBSubnetGroupArn field's value. -func (s *DBSubnetGroup) SetDBSubnetGroupArn(v string) *DBSubnetGroup { - s.DBSubnetGroupArn = &v - return s -} - -// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. -func (s *DBSubnetGroup) SetDBSubnetGroupDescription(v string) *DBSubnetGroup { - s.DBSubnetGroupDescription = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *DBSubnetGroup) SetDBSubnetGroupName(v string) *DBSubnetGroup { - s.DBSubnetGroupName = &v - return s -} - -// SetSubnetGroupStatus sets the SubnetGroupStatus field's value. -func (s *DBSubnetGroup) SetSubnetGroupStatus(v string) *DBSubnetGroup { - s.SubnetGroupStatus = &v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *DBSubnetGroup) SetSubnets(v []*Subnet) *DBSubnetGroup { - s.Subnets = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DBSubnetGroup) SetVpcId(v string) *DBSubnetGroup { - s.VpcId = &v - return s -} - -// Represents the input to DeleteDBCluster. -type DeleteDBClusterInput struct { - _ struct{} `type:"structure"` - - // The DB cluster identifier for the DB cluster to be deleted. This parameter - // isn't case sensitive. - // - // Constraints: - // - // * Must match an existing DBClusterIdentifier. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The DB cluster snapshot identifier of the new DB cluster snapshot created - // when SkipFinalSnapshot is set to false. - // - // Specifying this parameter and also setting the SkipFinalShapshot parameter - // to true results in an error. - // - // Constraints: - // - // * Must be from 1 to 255 letters, numbers, or hyphens. - // - // * The first character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - FinalDBSnapshotIdentifier *string `type:"string"` - - // Determines whether a final DB cluster snapshot is created before the DB cluster - // is deleted. If true is specified, no DB cluster snapshot is created. If false - // is specified, a DB cluster snapshot is created before the DB cluster is deleted. - // - // If SkipFinalSnapshot is false, you must specify a FinalDBSnapshotIdentifier - // parameter. - // - // Default: false - SkipFinalSnapshot *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeleteDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DeleteDBClusterInput) SetDBClusterIdentifier(v string) *DeleteDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetFinalDBSnapshotIdentifier sets the FinalDBSnapshotIdentifier field's value. -func (s *DeleteDBClusterInput) SetFinalDBSnapshotIdentifier(v string) *DeleteDBClusterInput { - s.FinalDBSnapshotIdentifier = &v - return s -} - -// SetSkipFinalSnapshot sets the SkipFinalSnapshot field's value. -func (s *DeleteDBClusterInput) SetSkipFinalSnapshot(v bool) *DeleteDBClusterInput { - s.SkipFinalSnapshot = &v - return s -} - -type DeleteDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB cluster. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *DeleteDBClusterOutput) SetDBCluster(v *DBCluster) *DeleteDBClusterOutput { - s.DBCluster = v - return s -} - -// Represents the input to DeleteDBClusterParameterGroup. -type DeleteDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group. - // - // Constraints: - // - // * Must be the name of an existing DB cluster parameter group. - // - // * You can't delete a default DB cluster parameter group. - // - // * Cannot be associated with any DB clusters. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterParameterGroupInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *DeleteDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *DeleteDBClusterParameterGroupInput { - s.DBClusterParameterGroupName = &v - return s -} - -type DeleteDBClusterParameterGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBClusterParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterParameterGroupOutput) GoString() string { - return s.String() -} - -// Represents the input to DeleteDBClusterSnapshot. -type DeleteDBClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // The identifier of the DB cluster snapshot to delete. - // - // Constraints: Must be the name of an existing DB cluster snapshot in the available - // state. - // - // DBClusterSnapshotIdentifier is a required field - DBClusterSnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterSnapshotInput"} - if s.DBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DeleteDBClusterSnapshotInput) SetDBClusterSnapshotIdentifier(v string) *DeleteDBClusterSnapshotInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -type DeleteDBClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB cluster snapshot. - DBClusterSnapshot *DBClusterSnapshot `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. -func (s *DeleteDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *DeleteDBClusterSnapshotOutput { - s.DBClusterSnapshot = v - return s -} - -// Represents the input to DeleteDBInstance. -type DeleteDBInstanceInput struct { - _ struct{} `type:"structure"` - - // The DB instance identifier for the DB instance to be deleted. This parameter - // isn't case sensitive. - // - // Constraints: - // - // * Must match the name of an existing DB instance. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBInstanceInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DeleteDBInstanceInput) SetDBInstanceIdentifier(v string) *DeleteDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -type DeleteDBInstanceOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB instance. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBInstanceOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *DeleteDBInstanceOutput) SetDBInstance(v *DBInstance) *DeleteDBInstanceOutput { - s.DBInstance = v - return s -} - -// Represents the input to DeleteDBSubnetGroup. -type DeleteDBSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the database subnet group to delete. - // - // You can't delete the default subnet group. - // - // Constraints: - // - // Must match the name of an existing DBSubnetGroup. Must not be default. - // - // Example: mySubnetgroup - // - // DBSubnetGroupName is a required field - DBSubnetGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBSubnetGroupInput"} - if s.DBSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *DeleteDBSubnetGroupInput) SetDBSubnetGroupName(v string) *DeleteDBSubnetGroupInput { - s.DBSubnetGroupName = &v - return s -} - -type DeleteDBSubnetGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBSubnetGroupOutput) GoString() string { - return s.String() -} - -// Represents the input to DescribeDBClusterParameterGroups. -type DescribeDBClusterParameterGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of a specific DB cluster parameter group to return details for. - // - // Constraints: - // - // * If provided, must match the name of an existing DBClusterParameterGroup. - DBClusterParameterGroupName *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token (marker) is - // included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBClusterParameterGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterParameterGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClusterParameterGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterParameterGroupsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *DescribeDBClusterParameterGroupsInput) SetDBClusterParameterGroupName(v string) *DescribeDBClusterParameterGroupsInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBClusterParameterGroupsInput) SetFilters(v []*Filter) *DescribeDBClusterParameterGroupsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterParameterGroupsInput) SetMarker(v string) *DescribeDBClusterParameterGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBClusterParameterGroupsInput) SetMaxRecords(v int64) *DescribeDBClusterParameterGroupsInput { - s.MaxRecords = &v - return s -} - -// Represents the output of DBClusterParameterGroups. -type DescribeDBClusterParameterGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of DB cluster parameter groups. - DBClusterParameterGroups []*DBClusterParameterGroup `locationNameList:"DBClusterParameterGroup" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClusterParameterGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterParameterGroupsOutput) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroups sets the DBClusterParameterGroups field's value. -func (s *DescribeDBClusterParameterGroupsOutput) SetDBClusterParameterGroups(v []*DBClusterParameterGroup) *DescribeDBClusterParameterGroupsOutput { - s.DBClusterParameterGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterParameterGroupsOutput) SetMarker(v string) *DescribeDBClusterParameterGroupsOutput { - s.Marker = &v - return s -} - -// Represents the input to DescribeDBClusterParameters. -type DescribeDBClusterParametersInput struct { - _ struct{} `type:"structure"` - - // The name of a specific DB cluster parameter group to return parameter details - // for. - // - // Constraints: - // - // * If provided, must match the name of an existing DBClusterParameterGroup. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token (marker) is - // included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // A value that indicates to return only parameters for a specific source. Parameter - // sources can be engine, service, or customer. - Source *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClusterParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClusterParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterParametersInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *DescribeDBClusterParametersInput) SetDBClusterParameterGroupName(v string) *DescribeDBClusterParametersInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBClusterParametersInput) SetFilters(v []*Filter) *DescribeDBClusterParametersInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterParametersInput) SetMarker(v string) *DescribeDBClusterParametersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBClusterParametersInput) SetMaxRecords(v int64) *DescribeDBClusterParametersInput { - s.MaxRecords = &v - return s -} - -// SetSource sets the Source field's value. -func (s *DescribeDBClusterParametersInput) SetSource(v string) *DescribeDBClusterParametersInput { - s.Source = &v - return s -} - -// Represents the output of DBClusterParameterGroup. -type DescribeDBClusterParametersOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // Provides a list of parameters for the DB cluster parameter group. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` -} - -// String returns the string representation -func (s DescribeDBClusterParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterParametersOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterParametersOutput) SetMarker(v string) *DescribeDBClusterParametersOutput { - s.Marker = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DescribeDBClusterParametersOutput) SetParameters(v []*Parameter) *DescribeDBClusterParametersOutput { - s.Parameters = v - return s -} - -// Represents the input to DescribeDBClusterSnapshotAttributes. -type DescribeDBClusterSnapshotAttributesInput struct { - _ struct{} `type:"structure"` - - // The identifier for the DB cluster snapshot to describe the attributes for. - // - // DBClusterSnapshotIdentifier is a required field - DBClusterSnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeDBClusterSnapshotAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterSnapshotAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClusterSnapshotAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterSnapshotAttributesInput"} - if s.DBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DescribeDBClusterSnapshotAttributesInput) SetDBClusterSnapshotIdentifier(v string) *DescribeDBClusterSnapshotAttributesInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -type DescribeDBClusterSnapshotAttributesOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about the attributes that are associated with a DB cluster - // snapshot. - DBClusterSnapshotAttributesResult *DBClusterSnapshotAttributesResult `type:"structure"` -} - -// String returns the string representation -func (s DescribeDBClusterSnapshotAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterSnapshotAttributesOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshotAttributesResult sets the DBClusterSnapshotAttributesResult field's value. -func (s *DescribeDBClusterSnapshotAttributesOutput) SetDBClusterSnapshotAttributesResult(v *DBClusterSnapshotAttributesResult) *DescribeDBClusterSnapshotAttributesOutput { - s.DBClusterSnapshotAttributesResult = v - return s -} - -// Represents the input to DescribeDBClusterSnapshots. -type DescribeDBClusterSnapshotsInput struct { - _ struct{} `type:"structure"` - - // The ID of the DB cluster to retrieve the list of DB cluster snapshots for. - // This parameter can't be used with the DBClusterSnapshotIdentifier parameter. - // This parameter is not case sensitive. - // - // Constraints: - // - // * If provided, must match the identifier of an existing DBCluster. - DBClusterIdentifier *string `type:"string"` - - // A specific DB cluster snapshot identifier to describe. This parameter can't - // be used with the DBClusterIdentifier parameter. This value is stored as a - // lowercase string. - // - // Constraints: - // - // * If provided, must match the identifier of an existing DBClusterSnapshot. - // - // * If this identifier is for an automated snapshot, the SnapshotType parameter - // must also be specified. - DBClusterSnapshotIdentifier *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // Set to true to include manual DB cluster snapshots that are public and can - // be copied or restored by any AWS account, and otherwise false. The default - // is false. - IncludePublic *bool `type:"boolean"` - - // Set to true to include shared manual DB cluster snapshots from other AWS - // accounts that this AWS account has been given permission to copy or restore, - // and otherwise false. The default is false. - IncludeShared *bool `type:"boolean"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token (marker) is - // included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The type of DB cluster snapshots to be returned. You can specify one of the - // following values: - // - // * automated - Return all DB cluster snapshots that Amazon DocumentDB has - // automatically created for your AWS account. - // - // * manual - Return all DB cluster snapshots that you have manually created - // for your AWS account. - // - // * shared - Return all manual DB cluster snapshots that have been shared - // to your AWS account. - // - // * public - Return all DB cluster snapshots that have been marked as public. - // - // If you don't specify a SnapshotType value, then both automated and manual - // DB cluster snapshots are returned. You can include shared DB cluster snapshots - // with these results by setting the IncludeShared parameter to true. You can - // include public DB cluster snapshots with these results by setting the IncludePublic - // parameter to true. - // - // The IncludeShared and IncludePublic parameters don't apply for SnapshotType - // values of manual or automated. The IncludePublic parameter doesn't apply - // when SnapshotType is set to shared. The IncludeShared parameter doesn't apply - // when SnapshotType is set to public. - SnapshotType *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClusterSnapshotsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterSnapshotsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClusterSnapshotsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterSnapshotsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DescribeDBClusterSnapshotsInput) SetDBClusterIdentifier(v string) *DescribeDBClusterSnapshotsInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DescribeDBClusterSnapshotsInput) SetDBClusterSnapshotIdentifier(v string) *DescribeDBClusterSnapshotsInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBClusterSnapshotsInput) SetFilters(v []*Filter) *DescribeDBClusterSnapshotsInput { - s.Filters = v - return s -} - -// SetIncludePublic sets the IncludePublic field's value. -func (s *DescribeDBClusterSnapshotsInput) SetIncludePublic(v bool) *DescribeDBClusterSnapshotsInput { - s.IncludePublic = &v - return s -} - -// SetIncludeShared sets the IncludeShared field's value. -func (s *DescribeDBClusterSnapshotsInput) SetIncludeShared(v bool) *DescribeDBClusterSnapshotsInput { - s.IncludeShared = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterSnapshotsInput) SetMarker(v string) *DescribeDBClusterSnapshotsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBClusterSnapshotsInput) SetMaxRecords(v int64) *DescribeDBClusterSnapshotsInput { - s.MaxRecords = &v - return s -} - -// SetSnapshotType sets the SnapshotType field's value. -func (s *DescribeDBClusterSnapshotsInput) SetSnapshotType(v string) *DescribeDBClusterSnapshotsInput { - s.SnapshotType = &v - return s -} - -// Represents the output of DescribeDBClusterSnapshots. -type DescribeDBClusterSnapshotsOutput struct { - _ struct{} `type:"structure"` - - // Provides a list of DB cluster snapshots. - DBClusterSnapshots []*DBClusterSnapshot `locationNameList:"DBClusterSnapshot" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClusterSnapshotsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterSnapshotsOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshots sets the DBClusterSnapshots field's value. -func (s *DescribeDBClusterSnapshotsOutput) SetDBClusterSnapshots(v []*DBClusterSnapshot) *DescribeDBClusterSnapshotsOutput { - s.DBClusterSnapshots = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterSnapshotsOutput) SetMarker(v string) *DescribeDBClusterSnapshotsOutput { - s.Marker = &v - return s -} - -// Represents the input to DescribeDBClusters. -type DescribeDBClustersInput struct { - _ struct{} `type:"structure"` - - // The user-provided DB cluster identifier. If this parameter is specified, - // information from only the specific DB cluster is returned. This parameter - // isn't case sensitive. - // - // Constraints: - // - // * If provided, must match an existing DBClusterIdentifier. - DBClusterIdentifier *string `type:"string"` - - // A filter that specifies one or more DB clusters to describe. - // - // Supported filters: - // - // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon - // Resource Names (ARNs). The results list only includes information about - // the DB clusters identified by these ARNs. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token (marker) is - // included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBClustersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClustersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClustersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClustersInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DescribeDBClustersInput) SetDBClusterIdentifier(v string) *DescribeDBClustersInput { - s.DBClusterIdentifier = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBClustersInput) SetFilters(v []*Filter) *DescribeDBClustersInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClustersInput) SetMarker(v string) *DescribeDBClustersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBClustersInput) SetMaxRecords(v int64) *DescribeDBClustersInput { - s.MaxRecords = &v - return s -} - -// Represents the output of DescribeDBClusters. -type DescribeDBClustersOutput struct { - _ struct{} `type:"structure"` - - // A list of DB clusters. - DBClusters []*DBCluster `locationNameList:"DBCluster" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClustersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClustersOutput) GoString() string { - return s.String() -} - -// SetDBClusters sets the DBClusters field's value. -func (s *DescribeDBClustersOutput) SetDBClusters(v []*DBCluster) *DescribeDBClustersOutput { - s.DBClusters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClustersOutput) SetMarker(v string) *DescribeDBClustersOutput { - s.Marker = &v - return s -} - -// Represents the input to DescribeDBEngineVersions. -type DescribeDBEngineVersionsInput struct { - _ struct{} `type:"structure"` - - // The name of a specific DB parameter group family to return details for. - // - // Constraints: - // - // * If provided, must match an existing DBParameterGroupFamily. - DBParameterGroupFamily *string `type:"string"` - - // Indicates that only the default version of the specified engine or engine - // and major version combination is returned. - DefaultOnly *bool `type:"boolean"` - - // The database engine to return. - Engine *string `type:"string"` - - // The database engine version to return. - // - // Example: 5.1.49 - EngineVersion *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // If this parameter is specified and the requested engine supports the CharacterSetName - // parameter for CreateDBInstance, the response includes a list of supported - // character sets for each engine version. - ListSupportedCharacterSets *bool `type:"boolean"` - - // If this parameter is specified and the requested engine supports the TimeZone - // parameter for CreateDBInstance, the response includes a list of supported - // time zones for each engine version. - ListSupportedTimezones *bool `type:"boolean"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token (marker) is - // included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBEngineVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBEngineVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBEngineVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBEngineVersionsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DescribeDBEngineVersionsInput) SetDBParameterGroupFamily(v string) *DescribeDBEngineVersionsInput { - s.DBParameterGroupFamily = &v - return s -} - -// SetDefaultOnly sets the DefaultOnly field's value. -func (s *DescribeDBEngineVersionsInput) SetDefaultOnly(v bool) *DescribeDBEngineVersionsInput { - s.DefaultOnly = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DescribeDBEngineVersionsInput) SetEngine(v string) *DescribeDBEngineVersionsInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DescribeDBEngineVersionsInput) SetEngineVersion(v string) *DescribeDBEngineVersionsInput { - s.EngineVersion = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBEngineVersionsInput) SetFilters(v []*Filter) *DescribeDBEngineVersionsInput { - s.Filters = v - return s -} - -// SetListSupportedCharacterSets sets the ListSupportedCharacterSets field's value. -func (s *DescribeDBEngineVersionsInput) SetListSupportedCharacterSets(v bool) *DescribeDBEngineVersionsInput { - s.ListSupportedCharacterSets = &v - return s -} - -// SetListSupportedTimezones sets the ListSupportedTimezones field's value. -func (s *DescribeDBEngineVersionsInput) SetListSupportedTimezones(v bool) *DescribeDBEngineVersionsInput { - s.ListSupportedTimezones = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBEngineVersionsInput) SetMarker(v string) *DescribeDBEngineVersionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBEngineVersionsInput) SetMaxRecords(v int64) *DescribeDBEngineVersionsInput { - s.MaxRecords = &v - return s -} - -// Represents the output of DescribeDBEngineVersions. -type DescribeDBEngineVersionsOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about one or more DB engine versions. - DBEngineVersions []*DBEngineVersion `locationNameList:"DBEngineVersion" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBEngineVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBEngineVersionsOutput) GoString() string { - return s.String() -} - -// SetDBEngineVersions sets the DBEngineVersions field's value. -func (s *DescribeDBEngineVersionsOutput) SetDBEngineVersions(v []*DBEngineVersion) *DescribeDBEngineVersionsOutput { - s.DBEngineVersions = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBEngineVersionsOutput) SetMarker(v string) *DescribeDBEngineVersionsOutput { - s.Marker = &v - return s -} - -// Represents the input to DescribeDBInstances. -type DescribeDBInstancesInput struct { - _ struct{} `type:"structure"` - - // The user-provided instance identifier. If this parameter is specified, information - // from only the specific DB instance is returned. This parameter isn't case - // sensitive. - // - // Constraints: - // - // * If provided, must match the identifier of an existing DBInstance. - DBInstanceIdentifier *string `type:"string"` - - // A filter that specifies one or more DB instances to describe. - // - // Supported filters: - // - // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon - // Resource Names (ARNs). The results list includes only the information - // about the DB instances that are associated with the DB clusters that are - // identified by these ARNs. - // - // * db-instance-id - Accepts DB instance identifiers and DB instance ARNs. - // The results list includes only the information about the DB instances - // that are identified by these ARNs. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token (marker) is - // included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBInstancesInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DescribeDBInstancesInput) SetDBInstanceIdentifier(v string) *DescribeDBInstancesInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBInstancesInput) SetFilters(v []*Filter) *DescribeDBInstancesInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBInstancesInput) SetMarker(v string) *DescribeDBInstancesInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBInstancesInput) SetMaxRecords(v int64) *DescribeDBInstancesInput { - s.MaxRecords = &v - return s -} - -// Represents the output of DescribeDBInstances. -type DescribeDBInstancesOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about one or more DB instances. - DBInstances []*DBInstance `locationNameList:"DBInstance" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBInstancesOutput) GoString() string { - return s.String() -} - -// SetDBInstances sets the DBInstances field's value. -func (s *DescribeDBInstancesOutput) SetDBInstances(v []*DBInstance) *DescribeDBInstancesOutput { - s.DBInstances = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBInstancesOutput) SetMarker(v string) *DescribeDBInstancesOutput { - s.Marker = &v - return s -} - -// Represents the input to DescribeDBSubnetGroups. -type DescribeDBSubnetGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of the DB subnet group to return details for. - DBSubnetGroupName *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token (marker) is - // included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBSubnetGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBSubnetGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBSubnetGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBSubnetGroupsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *DescribeDBSubnetGroupsInput) SetDBSubnetGroupName(v string) *DescribeDBSubnetGroupsInput { - s.DBSubnetGroupName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBSubnetGroupsInput) SetFilters(v []*Filter) *DescribeDBSubnetGroupsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBSubnetGroupsInput) SetMarker(v string) *DescribeDBSubnetGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBSubnetGroupsInput) SetMaxRecords(v int64) *DescribeDBSubnetGroupsInput { - s.MaxRecords = &v - return s -} - -// Represents the output of DescribeDBSubnetGroups. -type DescribeDBSubnetGroupsOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about one or more DB subnet groups. - DBSubnetGroups []*DBSubnetGroup `locationNameList:"DBSubnetGroup" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBSubnetGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBSubnetGroupsOutput) GoString() string { - return s.String() -} - -// SetDBSubnetGroups sets the DBSubnetGroups field's value. -func (s *DescribeDBSubnetGroupsOutput) SetDBSubnetGroups(v []*DBSubnetGroup) *DescribeDBSubnetGroupsOutput { - s.DBSubnetGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBSubnetGroupsOutput) SetMarker(v string) *DescribeDBSubnetGroupsOutput { - s.Marker = &v - return s -} - -// Represents the input to DescribeEngineDefaultClusterParameters. -type DescribeEngineDefaultClusterParametersInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group family to return the engine parameter - // information for. - // - // DBParameterGroupFamily is a required field - DBParameterGroupFamily *string `type:"string" required:"true"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token (marker) is - // included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeEngineDefaultClusterParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEngineDefaultClusterParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEngineDefaultClusterParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEngineDefaultClusterParametersInput"} - if s.DBParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DescribeEngineDefaultClusterParametersInput) SetDBParameterGroupFamily(v string) *DescribeEngineDefaultClusterParametersInput { - s.DBParameterGroupFamily = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEngineDefaultClusterParametersInput) SetFilters(v []*Filter) *DescribeEngineDefaultClusterParametersInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEngineDefaultClusterParametersInput) SetMarker(v string) *DescribeEngineDefaultClusterParametersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEngineDefaultClusterParametersInput) SetMaxRecords(v int64) *DescribeEngineDefaultClusterParametersInput { - s.MaxRecords = &v - return s -} - -type DescribeEngineDefaultClusterParametersOutput struct { - _ struct{} `type:"structure"` - - // Contains the result of a successful invocation of the DescribeEngineDefaultClusterParameters - // operation. - EngineDefaults *EngineDefaults `type:"structure"` -} - -// String returns the string representation -func (s DescribeEngineDefaultClusterParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEngineDefaultClusterParametersOutput) GoString() string { - return s.String() -} - -// SetEngineDefaults sets the EngineDefaults field's value. -func (s *DescribeEngineDefaultClusterParametersOutput) SetEngineDefaults(v *EngineDefaults) *DescribeEngineDefaultClusterParametersOutput { - s.EngineDefaults = v - return s -} - -// Represents the input to DescribeEventCategories. -type DescribeEventCategoriesInput struct { - _ struct{} `type:"structure"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // The type of source that is generating the events. - // - // Valid values: db-instance, db-parameter-group, db-security-group, db-snapshot - SourceType *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventCategoriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventCategoriesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventCategoriesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventCategoriesInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEventCategoriesInput) SetFilters(v []*Filter) *DescribeEventCategoriesInput { - s.Filters = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *DescribeEventCategoriesInput) SetSourceType(v string) *DescribeEventCategoriesInput { - s.SourceType = &v - return s -} - -// Represents the output of DescribeEventCategories. -type DescribeEventCategoriesOutput struct { - _ struct{} `type:"structure"` - - // A list of event category maps. - EventCategoriesMapList []*EventCategoriesMap `locationNameList:"EventCategoriesMap" type:"list"` -} - -// String returns the string representation -func (s DescribeEventCategoriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventCategoriesOutput) GoString() string { - return s.String() -} - -// SetEventCategoriesMapList sets the EventCategoriesMapList field's value. -func (s *DescribeEventCategoriesOutput) SetEventCategoriesMapList(v []*EventCategoriesMap) *DescribeEventCategoriesOutput { - s.EventCategoriesMapList = v - return s -} - -// Represents the input to DescribeEvents. -type DescribeEventsInput struct { - _ struct{} `type:"structure"` - - // The number of minutes to retrieve events for. - // - // Default: 60 - Duration *int64 `type:"integer"` - - // The end of the time interval for which to retrieve events, specified in ISO - // 8601 format. - // - // Example: 2009-07-08T18:00Z - EndTime *time.Time `type:"timestamp"` - - // A list of event categories that trigger notifications for an event notification - // subscription. - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token (marker) is - // included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The identifier of the event source for which events are returned. If not - // specified, then all sources are included in the response. - // - // Constraints: - // - // * If SourceIdentifier is provided, SourceType must also be provided. - // - // * If the source type is DBInstance, a DBInstanceIdentifier must be provided. - // - // * If the source type is DBSecurityGroup, a DBSecurityGroupName must be - // provided. - // - // * If the source type is DBParameterGroup, a DBParameterGroupName must - // be provided. - // - // * If the source type is DBSnapshot, a DBSnapshotIdentifier must be provided. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - SourceIdentifier *string `type:"string"` - - // The event source to retrieve events for. If no value is specified, all events - // are returned. - SourceType *string `type:"string" enum:"SourceType"` - - // The beginning of the time interval to retrieve events for, specified in ISO - // 8601 format. - // - // Example: 2009-07-08T18:00Z - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s DescribeEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDuration sets the Duration field's value. -func (s *DescribeEventsInput) SetDuration(v int64) *DescribeEventsInput { - s.Duration = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *DescribeEventsInput) SetEndTime(v time.Time) *DescribeEventsInput { - s.EndTime = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *DescribeEventsInput) SetEventCategories(v []*string) *DescribeEventsInput { - s.EventCategories = v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEventsInput) SetFilters(v []*Filter) *DescribeEventsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventsInput) SetMarker(v string) *DescribeEventsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEventsInput) SetMaxRecords(v int64) *DescribeEventsInput { - s.MaxRecords = &v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *DescribeEventsInput) SetSourceIdentifier(v string) *DescribeEventsInput { - s.SourceIdentifier = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *DescribeEventsInput) SetSourceType(v string) *DescribeEventsInput { - s.SourceType = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeEventsInput) SetStartTime(v time.Time) *DescribeEventsInput { - s.StartTime = &v - return s -} - -// Represents the output of DescribeEvents. -type DescribeEventsOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about one or more events. - Events []*Event `locationNameList:"Event" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { - s.Events = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventsOutput) SetMarker(v string) *DescribeEventsOutput { - s.Marker = &v - return s -} - -// Represents the input to DescribeOrderableDBInstanceOptions. -type DescribeOrderableDBInstanceOptionsInput struct { - _ struct{} `type:"structure"` - - // The DB instance class filter value. Specify this parameter to show only the - // available offerings that match the specified DB instance class. - DBInstanceClass *string `type:"string"` - - // The name of the engine to retrieve DB instance options for. - // - // Engine is a required field - Engine *string `type:"string" required:"true"` - - // The engine version filter value. Specify this parameter to show only the - // available offerings that match the specified engine version. - EngineVersion *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // The license model filter value. Specify this parameter to show only the available - // offerings that match the specified license model. - LicenseModel *string `type:"string"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token (marker) is - // included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The virtual private cloud (VPC) filter value. Specify this parameter to show - // only the available VPC or non-VPC offerings. - Vpc *bool `type:"boolean"` -} - -// String returns the string representation -func (s DescribeOrderableDBInstanceOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOrderableDBInstanceOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeOrderableDBInstanceOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeOrderableDBInstanceOptionsInput"} - if s.Engine == nil { - invalidParams.Add(request.NewErrParamRequired("Engine")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetDBInstanceClass(v string) *DescribeOrderableDBInstanceOptionsInput { - s.DBInstanceClass = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetEngine(v string) *DescribeOrderableDBInstanceOptionsInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetEngineVersion(v string) *DescribeOrderableDBInstanceOptionsInput { - s.EngineVersion = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetFilters(v []*Filter) *DescribeOrderableDBInstanceOptionsInput { - s.Filters = v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetLicenseModel(v string) *DescribeOrderableDBInstanceOptionsInput { - s.LicenseModel = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetMarker(v string) *DescribeOrderableDBInstanceOptionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetMaxRecords(v int64) *DescribeOrderableDBInstanceOptionsInput { - s.MaxRecords = &v - return s -} - -// SetVpc sets the Vpc field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetVpc(v bool) *DescribeOrderableDBInstanceOptionsInput { - s.Vpc = &v - return s -} - -// Represents the output of DescribeOrderableDBInstanceOptions. -type DescribeOrderableDBInstanceOptionsOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The options that are available for a particular orderable DB instance. - OrderableDBInstanceOptions []*OrderableDBInstanceOption `locationNameList:"OrderableDBInstanceOption" type:"list"` -} - -// String returns the string representation -func (s DescribeOrderableDBInstanceOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOrderableDBInstanceOptionsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeOrderableDBInstanceOptionsOutput) SetMarker(v string) *DescribeOrderableDBInstanceOptionsOutput { - s.Marker = &v - return s -} - -// SetOrderableDBInstanceOptions sets the OrderableDBInstanceOptions field's value. -func (s *DescribeOrderableDBInstanceOptionsOutput) SetOrderableDBInstanceOptions(v []*OrderableDBInstanceOption) *DescribeOrderableDBInstanceOptionsOutput { - s.OrderableDBInstanceOptions = v - return s -} - -// Represents the input to DescribePendingMaintenanceActions. -type DescribePendingMaintenanceActionsInput struct { - _ struct{} `type:"structure"` - - // A filter that specifies one or more resources to return pending maintenance - // actions for. - // - // Supported filters: - // - // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon - // Resource Names (ARNs). The results list includes only pending maintenance - // actions for the DB clusters identified by these ARNs. - // - // * db-instance-id - Accepts DB instance identifiers and DB instance ARNs. - // The results list includes only pending maintenance actions for the DB - // instances identified by these ARNs. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token (marker) is - // included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The ARN of a resource to return pending maintenance actions for. - ResourceIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s DescribePendingMaintenanceActionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePendingMaintenanceActionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribePendingMaintenanceActionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribePendingMaintenanceActionsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribePendingMaintenanceActionsInput) SetFilters(v []*Filter) *DescribePendingMaintenanceActionsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribePendingMaintenanceActionsInput) SetMarker(v string) *DescribePendingMaintenanceActionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribePendingMaintenanceActionsInput) SetMaxRecords(v int64) *DescribePendingMaintenanceActionsInput { - s.MaxRecords = &v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *DescribePendingMaintenanceActionsInput) SetResourceIdentifier(v string) *DescribePendingMaintenanceActionsInput { - s.ResourceIdentifier = &v - return s -} - -// Represents the output of DescribePendingMaintenanceActions. -type DescribePendingMaintenanceActionsOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maintenance actions to be applied. - PendingMaintenanceActions []*ResourcePendingMaintenanceActions `locationNameList:"ResourcePendingMaintenanceActions" type:"list"` -} - -// String returns the string representation -func (s DescribePendingMaintenanceActionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePendingMaintenanceActionsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribePendingMaintenanceActionsOutput) SetMarker(v string) *DescribePendingMaintenanceActionsOutput { - s.Marker = &v - return s -} - -// SetPendingMaintenanceActions sets the PendingMaintenanceActions field's value. -func (s *DescribePendingMaintenanceActionsOutput) SetPendingMaintenanceActions(v []*ResourcePendingMaintenanceActions) *DescribePendingMaintenanceActionsOutput { - s.PendingMaintenanceActions = v - return s -} - -// Network information for accessing a DB cluster or DB instance. Client programs -// must specify a valid endpoint to access these Amazon DocumentDB resources. -type Endpoint struct { - _ struct{} `type:"structure"` - - // Specifies the DNS address of the DB instance. - Address *string `type:"string"` - - // Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. - HostedZoneId *string `type:"string"` - - // Specifies the port that the database engine is listening on. - Port *int64 `type:"integer"` -} - -// String returns the string representation -func (s Endpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Endpoint) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *Endpoint) SetAddress(v string) *Endpoint { - s.Address = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *Endpoint) SetHostedZoneId(v string) *Endpoint { - s.HostedZoneId = &v - return s -} - -// SetPort sets the Port field's value. -func (s *Endpoint) SetPort(v int64) *Endpoint { - s.Port = &v - return s -} - -// Contains the result of a successful invocation of the DescribeEngineDefaultClusterParameters -// operation. -type EngineDefaults struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group family to return the engine parameter - // information for. - DBParameterGroupFamily *string `type:"string"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The parameters of a particular DB cluster parameter group family. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` -} - -// String returns the string representation -func (s EngineDefaults) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EngineDefaults) GoString() string { - return s.String() -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *EngineDefaults) SetDBParameterGroupFamily(v string) *EngineDefaults { - s.DBParameterGroupFamily = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *EngineDefaults) SetMarker(v string) *EngineDefaults { - s.Marker = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *EngineDefaults) SetParameters(v []*Parameter) *EngineDefaults { - s.Parameters = v - return s -} - -// Detailed information about an event. -type Event struct { - _ struct{} `type:"structure"` - - // Specifies the date and time of the event. - Date *time.Time `type:"timestamp"` - - // Specifies the category for the event. - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // Provides the text of this event. - Message *string `type:"string"` - - // The Amazon Resource Name (ARN) for the event. - SourceArn *string `type:"string"` - - // Provides the identifier for the source of the event. - SourceIdentifier *string `type:"string"` - - // Specifies the source type for this event. - SourceType *string `type:"string" enum:"SourceType"` -} - -// String returns the string representation -func (s Event) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Event) GoString() string { - return s.String() -} - -// SetDate sets the Date field's value. -func (s *Event) SetDate(v time.Time) *Event { - s.Date = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *Event) SetEventCategories(v []*string) *Event { - s.EventCategories = v - return s -} - -// SetMessage sets the Message field's value. -func (s *Event) SetMessage(v string) *Event { - s.Message = &v - return s -} - -// SetSourceArn sets the SourceArn field's value. -func (s *Event) SetSourceArn(v string) *Event { - s.SourceArn = &v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *Event) SetSourceIdentifier(v string) *Event { - s.SourceIdentifier = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *Event) SetSourceType(v string) *Event { - s.SourceType = &v - return s -} - -// An event source type, accompanied by one or more event category names. -type EventCategoriesMap struct { - _ struct{} `type:"structure"` - - // The event categories for the specified source type. - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // The source type that the returned categories belong to. - SourceType *string `type:"string"` -} - -// String returns the string representation -func (s EventCategoriesMap) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventCategoriesMap) GoString() string { - return s.String() -} - -// SetEventCategories sets the EventCategories field's value. -func (s *EventCategoriesMap) SetEventCategories(v []*string) *EventCategoriesMap { - s.EventCategories = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *EventCategoriesMap) SetSourceType(v string) *EventCategoriesMap { - s.SourceType = &v - return s -} - -// Represents the input to FailoverDBCluster. -type FailoverDBClusterInput struct { - _ struct{} `type:"structure"` - - // A DB cluster identifier to force a failover for. This parameter is not case - // sensitive. - // - // Constraints: - // - // * Must match the identifier of an existing DBCluster. - DBClusterIdentifier *string `type:"string"` - - // The name of the instance to promote to the primary instance. - // - // You must specify the instance identifier for an Amazon DocumentDB replica - // in the DB cluster. For example, mydbcluster-replica1. - TargetDBInstanceIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s FailoverDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailoverDBClusterInput) GoString() string { - return s.String() -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *FailoverDBClusterInput) SetDBClusterIdentifier(v string) *FailoverDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetTargetDBInstanceIdentifier sets the TargetDBInstanceIdentifier field's value. -func (s *FailoverDBClusterInput) SetTargetDBInstanceIdentifier(v string) *FailoverDBClusterInput { - s.TargetDBInstanceIdentifier = &v - return s -} - -type FailoverDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB cluster. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s FailoverDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailoverDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *FailoverDBClusterOutput) SetDBCluster(v *DBCluster) *FailoverDBClusterOutput { - s.DBCluster = v - return s -} - -// A named set of filter values, used to return a more specific list of results. -// You can use a filter to match a set of resources by specific criteria, such -// as IDs. -// -// Wildcards are not supported in filters. -type Filter struct { - _ struct{} `type:"structure"` - - // The name of the filter. Filter names are case sensitive. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // One or more filter values. Filter values are case sensitive. - // - // Values is a required field - Values []*string `locationNameList:"Value" type:"list" required:"true"` -} - -// String returns the string representation -func (s Filter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Filter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Filter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Filter"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *Filter) SetName(v string) *Filter { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *Filter) SetValues(v []*string) *Filter { - s.Values = v - return s -} - -// Represents the input to ListTagsForResource. -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // The Amazon DocumentDB resource with tags to be listed. This value is an Amazon - // Resource Name (ARN). - // - // ResourceName is a required field - ResourceName *string `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.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListTagsForResourceInput) SetFilters(v []*Filter) *ListTagsForResourceInput { - s.Filters = v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *ListTagsForResourceInput) SetResourceName(v string) *ListTagsForResourceInput { - s.ResourceName = &v - return s -} - -// Represents the output of ListTagsForResource. -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // A list of one or more tags. - TagList []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetTagList sets the TagList field's value. -func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOutput { - s.TagList = v - return s -} - -// Represents the input to ModifyDBCluster. -type ModifyDBClusterInput struct { - _ struct{} `type:"structure"` - - // A value that specifies whether the changes in this request and any pending - // changes are asynchronously applied as soon as possible, regardless of the - // PreferredMaintenanceWindow setting for the DB cluster. If this parameter - // is set to false, changes to the DB cluster are applied during the next maintenance - // window. - // - // The ApplyImmediately parameter affects only the NewDBClusterIdentifier and - // MasterUserPassword values. If you set this parameter value to false, the - // changes to the NewDBClusterIdentifier and MasterUserPassword values are applied - // during the next maintenance window. All other changes are applied immediately, - // regardless of the value of the ApplyImmediately parameter. - // - // Default: false - ApplyImmediately *bool `type:"boolean"` - - // The number of days for which automated backups are retained. You must specify - // a minimum value of 1. - // - // Default: 1 - // - // Constraints: - // - // * Must be a value from 1 to 35. - BackupRetentionPeriod *int64 `type:"integer"` - - // The configuration setting for the log types to be enabled for export to Amazon - // CloudWatch Logs for a specific DB instance or DB cluster. The EnableLogTypes - // and DisableLogTypes arrays determine which logs are exported (or not exported) - // to CloudWatch Logs. - CloudwatchLogsExportConfiguration *CloudwatchLogsExportConfiguration `type:"structure"` - - // The DB cluster identifier for the cluster that is being modified. This parameter - // is not case sensitive. - // - // Constraints: - // - // * Must match the identifier of an existing DBCluster. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The name of the DB cluster parameter group to use for the DB cluster. - DBClusterParameterGroupName *string `type:"string"` - - // The version number of the database engine to which you want to upgrade. Changing - // this parameter results in an outage. The change is applied during the next - // maintenance window unless the ApplyImmediately parameter is set to true. - EngineVersion *string `type:"string"` - - // The new password for the master database user. This password can contain - // any printable ASCII character except "/", """, or "@". - // - // Constraints: Must contain from 8 to 41 characters. - MasterUserPassword *string `type:"string"` - - // The new DB cluster identifier for the DB cluster when renaming a DB cluster. - // This value is stored as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * The first character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster2 - NewDBClusterIdentifier *string `type:"string"` - - // The port number on which the DB cluster accepts connections. - // - // Constraints: Must be a value from 1150 to 65535. - // - // Default: The same port as the original DB cluster. - Port *int64 `type:"integer"` - - // The daily time range during which automated backups are created if automated - // backups are enabled, using the BackupRetentionPeriod parameter. - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region. - // - // Constraints: - // - // * Must be in the format hh24:mi-hh24:mi. - // - // * Must be in Universal Coordinated Time (UTC). - // - // * Must not conflict with the preferred maintenance window. - // - // * Must be at least 30 minutes. - PreferredBackupWindow *string `type:"string"` - - // The weekly time range during which system maintenance can occur, in Universal - // Coordinated Time (UTC). - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region, occurring on a random day of the week. - // - // Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun - // - // Constraints: Minimum 30-minute window. - PreferredMaintenanceWindow *string `type:"string"` - - // A list of virtual private cloud (VPC) security groups that the DB cluster - // will belong to. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s ModifyDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *ModifyDBClusterInput) SetApplyImmediately(v bool) *ModifyDBClusterInput { - s.ApplyImmediately = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *ModifyDBClusterInput) SetBackupRetentionPeriod(v int64) *ModifyDBClusterInput { - s.BackupRetentionPeriod = &v - return s -} - -// SetCloudwatchLogsExportConfiguration sets the CloudwatchLogsExportConfiguration field's value. -func (s *ModifyDBClusterInput) SetCloudwatchLogsExportConfiguration(v *CloudwatchLogsExportConfiguration) *ModifyDBClusterInput { - s.CloudwatchLogsExportConfiguration = v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *ModifyDBClusterInput) SetDBClusterIdentifier(v string) *ModifyDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *ModifyDBClusterInput) SetDBClusterParameterGroupName(v string) *ModifyDBClusterInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *ModifyDBClusterInput) SetEngineVersion(v string) *ModifyDBClusterInput { - s.EngineVersion = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *ModifyDBClusterInput) SetMasterUserPassword(v string) *ModifyDBClusterInput { - s.MasterUserPassword = &v - return s -} - -// SetNewDBClusterIdentifier sets the NewDBClusterIdentifier field's value. -func (s *ModifyDBClusterInput) SetNewDBClusterIdentifier(v string) *ModifyDBClusterInput { - s.NewDBClusterIdentifier = &v - return s -} - -// SetPort sets the Port field's value. -func (s *ModifyDBClusterInput) SetPort(v int64) *ModifyDBClusterInput { - s.Port = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *ModifyDBClusterInput) SetPreferredBackupWindow(v string) *ModifyDBClusterInput { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *ModifyDBClusterInput) SetPreferredMaintenanceWindow(v string) *ModifyDBClusterInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *ModifyDBClusterInput) SetVpcSecurityGroupIds(v []*string) *ModifyDBClusterInput { - s.VpcSecurityGroupIds = v - return s -} - -type ModifyDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB cluster. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s ModifyDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *ModifyDBClusterOutput) SetDBCluster(v *DBCluster) *ModifyDBClusterOutput { - s.DBCluster = v - return s -} - -// Represents the input to ModifyDBClusterParameterGroup. -type ModifyDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group to modify. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` - - // A list of parameters in the DB cluster parameter group to modify. - // - // Parameters is a required field - Parameters []*Parameter `locationNameList:"Parameter" type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterParameterGroupInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - if s.Parameters == nil { - invalidParams.Add(request.NewErrParamRequired("Parameters")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *ModifyDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *ModifyDBClusterParameterGroupInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ModifyDBClusterParameterGroupInput) SetParameters(v []*Parameter) *ModifyDBClusterParameterGroupInput { - s.Parameters = v - return s -} - -// Contains the name of a DB cluster parameter group. -type ModifyDBClusterParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // The name of a DB cluster parameter group. - // - // Constraints: - // - // * Must be from 1 to 255 letters or numbers. - // - // * The first character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // This value is stored as a lowercase string. - DBClusterParameterGroupName *string `type:"string"` -} - -// String returns the string representation -func (s ModifyDBClusterParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *ModifyDBClusterParameterGroupOutput) SetDBClusterParameterGroupName(v string) *ModifyDBClusterParameterGroupOutput { - s.DBClusterParameterGroupName = &v - return s -} - -// Represents the input to ModifyDBClusterSnapshotAttribute. -type ModifyDBClusterSnapshotAttributeInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster snapshot attribute to modify. - // - // To manage authorization for other AWS accounts to copy or restore a manual - // DB cluster snapshot, set this value to restore. - // - // AttributeName is a required field - AttributeName *string `type:"string" required:"true"` - - // The identifier for the DB cluster snapshot to modify the attributes for. - // - // DBClusterSnapshotIdentifier is a required field - DBClusterSnapshotIdentifier *string `type:"string" required:"true"` - - // A list of DB cluster snapshot attributes to add to the attribute specified - // by AttributeName. - // - // To authorize other AWS accounts to copy or restore a manual DB cluster snapshot, - // set this list to include one or more AWS account IDs. To make the manual - // DB cluster snapshot restorable by any AWS account, set it to all. Do not - // add the all value for any manual DB cluster snapshots that contain private - // information that you don't want to be available to all AWS accounts. - ValuesToAdd []*string `locationNameList:"AttributeValue" type:"list"` - - // A list of DB cluster snapshot attributes to remove from the attribute specified - // by AttributeName. - // - // To remove authorization for other AWS accounts to copy or restore a manual - // DB cluster snapshot, set this list to include one or more AWS account identifiers. - // To remove authorization for any AWS account to copy or restore the DB cluster - // snapshot, set it to all . If you specify all, an AWS account whose account - // ID is explicitly added to the restore attribute can still copy or restore - // a manual DB cluster snapshot. - ValuesToRemove []*string `locationNameList:"AttributeValue" type:"list"` -} - -// String returns the string representation -func (s ModifyDBClusterSnapshotAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterSnapshotAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBClusterSnapshotAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterSnapshotAttributeInput"} - if s.AttributeName == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeName")) - } - if s.DBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeName sets the AttributeName field's value. -func (s *ModifyDBClusterSnapshotAttributeInput) SetAttributeName(v string) *ModifyDBClusterSnapshotAttributeInput { - s.AttributeName = &v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *ModifyDBClusterSnapshotAttributeInput) SetDBClusterSnapshotIdentifier(v string) *ModifyDBClusterSnapshotAttributeInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// SetValuesToAdd sets the ValuesToAdd field's value. -func (s *ModifyDBClusterSnapshotAttributeInput) SetValuesToAdd(v []*string) *ModifyDBClusterSnapshotAttributeInput { - s.ValuesToAdd = v - return s -} - -// SetValuesToRemove sets the ValuesToRemove field's value. -func (s *ModifyDBClusterSnapshotAttributeInput) SetValuesToRemove(v []*string) *ModifyDBClusterSnapshotAttributeInput { - s.ValuesToRemove = v - return s -} - -type ModifyDBClusterSnapshotAttributeOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about the attributes that are associated with a DB cluster - // snapshot. - DBClusterSnapshotAttributesResult *DBClusterSnapshotAttributesResult `type:"structure"` -} - -// String returns the string representation -func (s ModifyDBClusterSnapshotAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterSnapshotAttributeOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshotAttributesResult sets the DBClusterSnapshotAttributesResult field's value. -func (s *ModifyDBClusterSnapshotAttributeOutput) SetDBClusterSnapshotAttributesResult(v *DBClusterSnapshotAttributesResult) *ModifyDBClusterSnapshotAttributeOutput { - s.DBClusterSnapshotAttributesResult = v - return s -} - -// Represents the input to ModifyDBInstance. -type ModifyDBInstanceInput struct { - _ struct{} `type:"structure"` - - // Specifies whether the modifications in this request and any pending modifications - // are asynchronously applied as soon as possible, regardless of the PreferredMaintenanceWindow - // setting for the DB instance. - // - // If this parameter is set to false, changes to the DB instance are applied - // during the next maintenance window. Some parameter changes can cause an outage - // and are applied on the next reboot. - // - // Default: false - ApplyImmediately *bool `type:"boolean"` - - // Indicates that minor version upgrades are applied automatically to the DB - // instance during the maintenance window. Changing this parameter doesn't result - // in an outage except in the following case, and the change is asynchronously - // applied as soon as possible. An outage results if this parameter is set to - // true during the maintenance window, and a newer minor version is available, - // and Amazon DocumentDB has enabled automatic patching for that engine version. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The new compute and memory capacity of the DB instance; for example, db.m4.large. - // Not all DB instance classes are available in all AWS Regions. - // - // If you modify the DB instance class, an outage occurs during the change. - // The change is applied during the next maintenance window, unless ApplyImmediately - // is specified as true for this request. - // - // Default: Uses existing setting. - DBInstanceClass *string `type:"string"` - - // The DB instance identifier. This value is stored as a lowercase string. - // - // Constraints: - // - // * Must match the identifier of an existing DBInstance. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The new DB instance identifier for the DB instance when renaming a DB instance. - // When you change the DB instance identifier, an instance reboot occurs immediately - // if you set Apply Immediately to true. It occurs during the next maintenance - // window if you set Apply Immediately to false. This value is stored as a lowercase - // string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * The first character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: mydbinstance - NewDBInstanceIdentifier *string `type:"string"` - - // The weekly time range (in UTC) during which system maintenance can occur, - // which might result in an outage. Changing this parameter doesn't result in - // an outage except in the following situation, and the change is asynchronously - // applied as soon as possible. If there are pending actions that cause a reboot, - // and the maintenance window is changed to include the current time, changing - // this parameter causes a reboot of the DB instance. If you are moving this - // window to the current time, there must be at least 30 minutes between the - // current time and end of the window to ensure that pending changes are applied. - // - // Default: Uses existing setting. - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun - // - // Constraints: Must be at least 30 minutes. - PreferredMaintenanceWindow *string `type:"string"` - - // A value that specifies the order in which an Amazon DocumentDB replica is - // promoted to the primary instance after a failure of the existing primary - // instance. - // - // Default: 1 - // - // Valid values: 0-15 - PromotionTier *int64 `type:"integer"` -} - -// String returns the string representation -func (s ModifyDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBInstanceInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *ModifyDBInstanceInput) SetApplyImmediately(v bool) *ModifyDBInstanceInput { - s.ApplyImmediately = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *ModifyDBInstanceInput) SetAutoMinorVersionUpgrade(v bool) *ModifyDBInstanceInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *ModifyDBInstanceInput) SetDBInstanceClass(v string) *ModifyDBInstanceInput { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *ModifyDBInstanceInput) SetDBInstanceIdentifier(v string) *ModifyDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetNewDBInstanceIdentifier sets the NewDBInstanceIdentifier field's value. -func (s *ModifyDBInstanceInput) SetNewDBInstanceIdentifier(v string) *ModifyDBInstanceInput { - s.NewDBInstanceIdentifier = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *ModifyDBInstanceInput) SetPreferredMaintenanceWindow(v string) *ModifyDBInstanceInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPromotionTier sets the PromotionTier field's value. -func (s *ModifyDBInstanceInput) SetPromotionTier(v int64) *ModifyDBInstanceInput { - s.PromotionTier = &v - return s -} - -type ModifyDBInstanceOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB instance. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s ModifyDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBInstanceOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *ModifyDBInstanceOutput) SetDBInstance(v *DBInstance) *ModifyDBInstanceOutput { - s.DBInstance = v - return s -} - -// Represents the input to ModifyDBSubnetGroup. -type ModifyDBSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The description for the DB subnet group. - DBSubnetGroupDescription *string `type:"string"` - - // The name for the DB subnet group. This value is stored as a lowercase string. - // You can't modify the default subnet group. - // - // Constraints: Must match the name of an existing DBSubnetGroup. Must not be - // default. - // - // Example: mySubnetgroup - // - // DBSubnetGroupName is a required field - DBSubnetGroupName *string `type:"string" required:"true"` - - // The Amazon EC2 subnet IDs for the DB subnet group. - // - // SubnetIds is a required field - SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyDBSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBSubnetGroupInput"} - if s.DBSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. -func (s *ModifyDBSubnetGroupInput) SetDBSubnetGroupDescription(v string) *ModifyDBSubnetGroupInput { - s.DBSubnetGroupDescription = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *ModifyDBSubnetGroupInput) SetDBSubnetGroupName(v string) *ModifyDBSubnetGroupInput { - s.DBSubnetGroupName = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *ModifyDBSubnetGroupInput) SetSubnetIds(v []*string) *ModifyDBSubnetGroupInput { - s.SubnetIds = v - return s -} - -type ModifyDBSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB subnet group. - DBSubnetGroup *DBSubnetGroup `type:"structure"` -} - -// String returns the string representation -func (s ModifyDBSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetDBSubnetGroup sets the DBSubnetGroup field's value. -func (s *ModifyDBSubnetGroupOutput) SetDBSubnetGroup(v *DBSubnetGroup) *ModifyDBSubnetGroupOutput { - s.DBSubnetGroup = v - return s -} - -// The options that are available for a DB instance. -type OrderableDBInstanceOption struct { - _ struct{} `type:"structure"` - - // A list of Availability Zones for a DB instance. - AvailabilityZones []*AvailabilityZone `locationNameList:"AvailabilityZone" type:"list"` - - // The DB instance class for a DB instance. - DBInstanceClass *string `type:"string"` - - // The engine type of a DB instance. - Engine *string `type:"string"` - - // The engine version of a DB instance. - EngineVersion *string `type:"string"` - - // The license model for a DB instance. - LicenseModel *string `type:"string"` - - // Indicates whether a DB instance is in a virtual private cloud (VPC). - Vpc *bool `type:"boolean"` -} - -// String returns the string representation -func (s OrderableDBInstanceOption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OrderableDBInstanceOption) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *OrderableDBInstanceOption) SetAvailabilityZones(v []*AvailabilityZone) *OrderableDBInstanceOption { - s.AvailabilityZones = v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *OrderableDBInstanceOption) SetDBInstanceClass(v string) *OrderableDBInstanceOption { - s.DBInstanceClass = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *OrderableDBInstanceOption) SetEngine(v string) *OrderableDBInstanceOption { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *OrderableDBInstanceOption) SetEngineVersion(v string) *OrderableDBInstanceOption { - s.EngineVersion = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *OrderableDBInstanceOption) SetLicenseModel(v string) *OrderableDBInstanceOption { - s.LicenseModel = &v - return s -} - -// SetVpc sets the Vpc field's value. -func (s *OrderableDBInstanceOption) SetVpc(v bool) *OrderableDBInstanceOption { - s.Vpc = &v - return s -} - -// Detailed information about an individual parameter. -type Parameter struct { - _ struct{} `type:"structure"` - - // Specifies the valid range of values for the parameter. - AllowedValues *string `type:"string"` - - // Indicates when to apply parameter updates. - ApplyMethod *string `type:"string" enum:"ApplyMethod"` - - // Specifies the engine-specific parameters type. - ApplyType *string `type:"string"` - - // Specifies the valid data type for the parameter. - DataType *string `type:"string"` - - // Provides a description of the parameter. - Description *string `type:"string"` - - // Indicates whether (true) or not (false) the parameter can be modified. Some - // parameters have security or operational implications that prevent them from - // being changed. - IsModifiable *bool `type:"boolean"` - - // The earliest engine version to which the parameter can apply. - MinimumEngineVersion *string `type:"string"` - - // Specifies the name of the parameter. - ParameterName *string `type:"string"` - - // Specifies the value of the parameter. - ParameterValue *string `type:"string"` - - // Indicates the source of the parameter value. - Source *string `type:"string"` -} - -// String returns the string representation -func (s Parameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Parameter) GoString() string { - return s.String() -} - -// SetAllowedValues sets the AllowedValues field's value. -func (s *Parameter) SetAllowedValues(v string) *Parameter { - s.AllowedValues = &v - return s -} - -// SetApplyMethod sets the ApplyMethod field's value. -func (s *Parameter) SetApplyMethod(v string) *Parameter { - s.ApplyMethod = &v - return s -} - -// SetApplyType sets the ApplyType field's value. -func (s *Parameter) SetApplyType(v string) *Parameter { - s.ApplyType = &v - return s -} - -// SetDataType sets the DataType field's value. -func (s *Parameter) SetDataType(v string) *Parameter { - s.DataType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Parameter) SetDescription(v string) *Parameter { - s.Description = &v - return s -} - -// SetIsModifiable sets the IsModifiable field's value. -func (s *Parameter) SetIsModifiable(v bool) *Parameter { - s.IsModifiable = &v - return s -} - -// SetMinimumEngineVersion sets the MinimumEngineVersion field's value. -func (s *Parameter) SetMinimumEngineVersion(v string) *Parameter { - s.MinimumEngineVersion = &v - return s -} - -// SetParameterName sets the ParameterName field's value. -func (s *Parameter) SetParameterName(v string) *Parameter { - s.ParameterName = &v - return s -} - -// SetParameterValue sets the ParameterValue field's value. -func (s *Parameter) SetParameterValue(v string) *Parameter { - s.ParameterValue = &v - return s -} - -// SetSource sets the Source field's value. -func (s *Parameter) SetSource(v string) *Parameter { - s.Source = &v - return s -} - -// A list of the log types whose configuration is still pending. These log types -// are in the process of being activated or deactivated. -type PendingCloudwatchLogsExports struct { - _ struct{} `type:"structure"` - - // Log types that are in the process of being enabled. After they are enabled, - // these log types are exported to Amazon CloudWatch Logs. - LogTypesToDisable []*string `type:"list"` - - // Log types that are in the process of being deactivated. After they are deactivated, - // these log types aren't exported to CloudWatch Logs. - LogTypesToEnable []*string `type:"list"` -} - -// String returns the string representation -func (s PendingCloudwatchLogsExports) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingCloudwatchLogsExports) GoString() string { - return s.String() -} - -// SetLogTypesToDisable sets the LogTypesToDisable field's value. -func (s *PendingCloudwatchLogsExports) SetLogTypesToDisable(v []*string) *PendingCloudwatchLogsExports { - s.LogTypesToDisable = v - return s -} - -// SetLogTypesToEnable sets the LogTypesToEnable field's value. -func (s *PendingCloudwatchLogsExports) SetLogTypesToEnable(v []*string) *PendingCloudwatchLogsExports { - s.LogTypesToEnable = v - return s -} - -// Provides information about a pending maintenance action for a resource. -type PendingMaintenanceAction struct { - _ struct{} `type:"structure"` - - // The type of pending maintenance action that is available for the resource. - Action *string `type:"string"` - - // The date of the maintenance window when the action is applied. The maintenance - // action is applied to the resource during its first maintenance window after - // this date. If this date is specified, any next-maintenance opt-in requests - // are ignored. - AutoAppliedAfterDate *time.Time `type:"timestamp"` - - // The effective date when the pending maintenance action is applied to the - // resource. - CurrentApplyDate *time.Time `type:"timestamp"` - - // A description providing more detail about the maintenance action. - Description *string `type:"string"` - - // The date when the maintenance action is automatically applied. The maintenance - // action is applied to the resource on this date regardless of the maintenance - // window for the resource. If this date is specified, any immediate opt-in - // requests are ignored. - ForcedApplyDate *time.Time `type:"timestamp"` - - // Indicates the type of opt-in request that has been received for the resource. - OptInStatus *string `type:"string"` -} - -// String returns the string representation -func (s PendingMaintenanceAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingMaintenanceAction) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *PendingMaintenanceAction) SetAction(v string) *PendingMaintenanceAction { - s.Action = &v - return s -} - -// SetAutoAppliedAfterDate sets the AutoAppliedAfterDate field's value. -func (s *PendingMaintenanceAction) SetAutoAppliedAfterDate(v time.Time) *PendingMaintenanceAction { - s.AutoAppliedAfterDate = &v - return s -} - -// SetCurrentApplyDate sets the CurrentApplyDate field's value. -func (s *PendingMaintenanceAction) SetCurrentApplyDate(v time.Time) *PendingMaintenanceAction { - s.CurrentApplyDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PendingMaintenanceAction) SetDescription(v string) *PendingMaintenanceAction { - s.Description = &v - return s -} - -// SetForcedApplyDate sets the ForcedApplyDate field's value. -func (s *PendingMaintenanceAction) SetForcedApplyDate(v time.Time) *PendingMaintenanceAction { - s.ForcedApplyDate = &v - return s -} - -// SetOptInStatus sets the OptInStatus field's value. -func (s *PendingMaintenanceAction) SetOptInStatus(v string) *PendingMaintenanceAction { - s.OptInStatus = &v - return s -} - -// One or more modified settings for a DB instance. These modified settings -// have been requested, but haven't been applied yet. -type PendingModifiedValues struct { - _ struct{} `type:"structure"` - - // Contains the new AllocatedStorage size for the DB instance that will be applied - // or is currently being applied. - AllocatedStorage *int64 `type:"integer"` - - // Specifies the pending number of days for which automated backups are retained. - BackupRetentionPeriod *int64 `type:"integer"` - - // Specifies the identifier of the certificate authority (CA) certificate for - // the DB instance. - CACertificateIdentifier *string `type:"string"` - - // Contains the new DBInstanceClass for the DB instance that will be applied - // or is currently being applied. - DBInstanceClass *string `type:"string"` - - // Contains the new DBInstanceIdentifier for the DB instance that will be applied - // or is currently being applied. - DBInstanceIdentifier *string `type:"string"` - - // The new DB subnet group for the DB instance. - DBSubnetGroupName *string `type:"string"` - - // Indicates the database engine version. - EngineVersion *string `type:"string"` - - // Specifies the new Provisioned IOPS value for the DB instance that will be - // applied or is currently being applied. - Iops *int64 `type:"integer"` - - // The license model for the DB instance. - // - // Valid values: license-included, bring-your-own-license, general-public-license - LicenseModel *string `type:"string"` - - // Contains the pending or currently in-progress change of the master credentials - // for the DB instance. - MasterUserPassword *string `type:"string"` - - // Indicates that the Single-AZ DB instance is to change to a Multi-AZ deployment. - MultiAZ *bool `type:"boolean"` - - // A list of the log types whose configuration is still pending. These log types - // are in the process of being activated or deactivated. - PendingCloudwatchLogsExports *PendingCloudwatchLogsExports `type:"structure"` - - // Specifies the pending port for the DB instance. - Port *int64 `type:"integer"` - - // Specifies the storage type to be associated with the DB instance. - StorageType *string `type:"string"` -} - -// String returns the string representation -func (s PendingModifiedValues) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingModifiedValues) GoString() string { - return s.String() -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *PendingModifiedValues) SetAllocatedStorage(v int64) *PendingModifiedValues { - s.AllocatedStorage = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *PendingModifiedValues) SetBackupRetentionPeriod(v int64) *PendingModifiedValues { - s.BackupRetentionPeriod = &v - return s -} - -// SetCACertificateIdentifier sets the CACertificateIdentifier field's value. -func (s *PendingModifiedValues) SetCACertificateIdentifier(v string) *PendingModifiedValues { - s.CACertificateIdentifier = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *PendingModifiedValues) SetDBInstanceClass(v string) *PendingModifiedValues { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *PendingModifiedValues) SetDBInstanceIdentifier(v string) *PendingModifiedValues { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *PendingModifiedValues) SetDBSubnetGroupName(v string) *PendingModifiedValues { - s.DBSubnetGroupName = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *PendingModifiedValues) SetEngineVersion(v string) *PendingModifiedValues { - s.EngineVersion = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *PendingModifiedValues) SetIops(v int64) *PendingModifiedValues { - s.Iops = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *PendingModifiedValues) SetLicenseModel(v string) *PendingModifiedValues { - s.LicenseModel = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *PendingModifiedValues) SetMasterUserPassword(v string) *PendingModifiedValues { - s.MasterUserPassword = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *PendingModifiedValues) SetMultiAZ(v bool) *PendingModifiedValues { - s.MultiAZ = &v - return s -} - -// SetPendingCloudwatchLogsExports sets the PendingCloudwatchLogsExports field's value. -func (s *PendingModifiedValues) SetPendingCloudwatchLogsExports(v *PendingCloudwatchLogsExports) *PendingModifiedValues { - s.PendingCloudwatchLogsExports = v - return s -} - -// SetPort sets the Port field's value. -func (s *PendingModifiedValues) SetPort(v int64) *PendingModifiedValues { - s.Port = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *PendingModifiedValues) SetStorageType(v string) *PendingModifiedValues { - s.StorageType = &v - return s -} - -// Represents the input to RebootDBInstance. -type RebootDBInstanceInput struct { - _ struct{} `type:"structure"` - - // The DB instance identifier. This parameter is stored as a lowercase string. - // - // Constraints: - // - // * Must match the identifier of an existing DBInstance. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // When true, the reboot is conducted through a Multi-AZ failover. - // - // Constraint: You can't specify true if the instance is not configured for - // Multi-AZ. - ForceFailover *bool `type:"boolean"` -} - -// String returns the string representation -func (s RebootDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootDBInstanceInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *RebootDBInstanceInput) SetDBInstanceIdentifier(v string) *RebootDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetForceFailover sets the ForceFailover field's value. -func (s *RebootDBInstanceInput) SetForceFailover(v bool) *RebootDBInstanceInput { - s.ForceFailover = &v - return s -} - -type RebootDBInstanceOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB instance. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s RebootDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootDBInstanceOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *RebootDBInstanceOutput) SetDBInstance(v *DBInstance) *RebootDBInstanceOutput { - s.DBInstance = v - return s -} - -// Represents the input to RemoveTagsFromResource. -type RemoveTagsFromResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon DocumentDB resource that the tags are removed from. This value - // is an Amazon Resource Name (ARN). - // - // ResourceName is a required field - ResourceName *string `type:"string" required:"true"` - - // The tag key (name) of the tag to be removed. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsFromResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *RemoveTagsFromResourceInput) SetResourceName(v string) *RemoveTagsFromResourceInput { - s.ResourceName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsFromResourceInput) SetTagKeys(v []*string) *RemoveTagsFromResourceInput { - s.TagKeys = v - return s -} - -type RemoveTagsFromResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceOutput) GoString() string { - return s.String() -} - -// Represents the input to ResetDBClusterParameterGroup. -type ResetDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group to reset. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` - - // A list of parameter names in the DB cluster parameter group to reset to the - // default values. You can't use this parameter if the ResetAllParameters parameter - // is set to true. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` - - // A value that is set to true to reset all parameters in the DB cluster parameter - // group to their default values, and false otherwise. You can't use this parameter - // if there is a list of parameter names specified for the Parameters parameter. - ResetAllParameters *bool `type:"boolean"` -} - -// String returns the string representation -func (s ResetDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetDBClusterParameterGroupInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *ResetDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *ResetDBClusterParameterGroupInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ResetDBClusterParameterGroupInput) SetParameters(v []*Parameter) *ResetDBClusterParameterGroupInput { - s.Parameters = v - return s -} - -// SetResetAllParameters sets the ResetAllParameters field's value. -func (s *ResetDBClusterParameterGroupInput) SetResetAllParameters(v bool) *ResetDBClusterParameterGroupInput { - s.ResetAllParameters = &v - return s -} - -// Contains the name of a DB cluster parameter group. -type ResetDBClusterParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // The name of a DB cluster parameter group. - // - // Constraints: - // - // * Must be from 1 to 255 letters or numbers. - // - // * The first character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // This value is stored as a lowercase string. - DBClusterParameterGroupName *string `type:"string"` -} - -// String returns the string representation -func (s ResetDBClusterParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetDBClusterParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *ResetDBClusterParameterGroupOutput) SetDBClusterParameterGroupName(v string) *ResetDBClusterParameterGroupOutput { - s.DBClusterParameterGroupName = &v - return s -} - -// Represents the output of ApplyPendingMaintenanceAction. -type ResourcePendingMaintenanceActions struct { - _ struct{} `type:"structure"` - - // A list that provides details about the pending maintenance actions for the - // resource. - PendingMaintenanceActionDetails []*PendingMaintenanceAction `locationNameList:"PendingMaintenanceAction" type:"list"` - - // The Amazon Resource Name (ARN) of the resource that has pending maintenance - // actions. - ResourceIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s ResourcePendingMaintenanceActions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourcePendingMaintenanceActions) GoString() string { - return s.String() -} - -// SetPendingMaintenanceActionDetails sets the PendingMaintenanceActionDetails field's value. -func (s *ResourcePendingMaintenanceActions) SetPendingMaintenanceActionDetails(v []*PendingMaintenanceAction) *ResourcePendingMaintenanceActions { - s.PendingMaintenanceActionDetails = v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *ResourcePendingMaintenanceActions) SetResourceIdentifier(v string) *ResourcePendingMaintenanceActions { - s.ResourceIdentifier = &v - return s -} - -// Represents the input to RestoreDBClusterFromSnapshot. -type RestoreDBClusterFromSnapshotInput struct { - _ struct{} `type:"structure"` - - // Provides the list of Amazon EC2 Availability Zones that instances in the - // restored DB cluster can be created in. - AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // The name of the DB cluster to create from the DB snapshot or DB cluster snapshot. - // This parameter isn't case sensitive. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * The first character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: my-snapshot-id - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The name of the DB subnet group to use for the new DB cluster. - // - // Constraints: If provided, must match the name of an existing DBSubnetGroup. - // - // Example: mySubnetgroup - DBSubnetGroupName *string `type:"string"` - - // A list of log types that must be enabled for exporting to Amazon CloudWatch - // Logs. - EnableCloudwatchLogsExports []*string `type:"list"` - - // The database engine to use for the new DB cluster. - // - // Default: The same as source. - // - // Constraint: Must be compatible with the engine of the source. - // - // Engine is a required field - Engine *string `type:"string" required:"true"` - - // The version of the database engine to use for the new DB cluster. - EngineVersion *string `type:"string"` - - // The AWS KMS key identifier to use when restoring an encrypted DB cluster - // from a DB snapshot or DB cluster snapshot. - // - // The AWS KMS key identifier is the Amazon Resource Name (ARN) for the AWS - // KMS encryption key. If you are restoring a DB cluster with the same AWS account - // that owns the AWS KMS encryption key used to encrypt the new DB cluster, - // then you can use the AWS KMS key alias instead of the ARN for the AWS KMS - // encryption key. - // - // If you do not specify a value for the KmsKeyId parameter, then the following - // occurs: - // - // * If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is encrypted, - // then the restored DB cluster is encrypted using the AWS KMS key that was - // used to encrypt the DB snapshot or the DB cluster snapshot. - // - // * If the DB snapshot or the DB cluster snapshot in SnapshotIdentifier - // is not encrypted, then the restored DB cluster is not encrypted. - KmsKeyId *string `type:"string"` - - // The port number on which the new DB cluster accepts connections. - // - // Constraints: Must be a value from 1150 to 65535. - // - // Default: The same port as the original DB cluster. - Port *int64 `type:"integer"` - - // The identifier for the DB snapshot or DB cluster snapshot to restore from. - // - // You can use either the name or the Amazon Resource Name (ARN) to specify - // a DB cluster snapshot. However, you can use only the ARN to specify a DB - // snapshot. - // - // Constraints: - // - // * Must match the identifier of an existing snapshot. - // - // SnapshotIdentifier is a required field - SnapshotIdentifier *string `type:"string" required:"true"` - - // The tags to be assigned to the restored DB cluster. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A list of virtual private cloud (VPC) security groups that the new DB cluster - // will belong to. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s RestoreDBClusterFromSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBClusterFromSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreDBClusterFromSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreDBClusterFromSnapshotInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.Engine == nil { - invalidParams.Add(request.NewErrParamRequired("Engine")) - } - if s.SnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetAvailabilityZones(v []*string) *RestoreDBClusterFromSnapshotInput { - s.AvailabilityZones = v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetDBClusterIdentifier(v string) *RestoreDBClusterFromSnapshotInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetDBSubnetGroupName(v string) *RestoreDBClusterFromSnapshotInput { - s.DBSubnetGroupName = &v - return s -} - -// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterFromSnapshotInput { - s.EnableCloudwatchLogsExports = v - return s -} - -// SetEngine sets the Engine field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetEngine(v string) *RestoreDBClusterFromSnapshotInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetEngineVersion(v string) *RestoreDBClusterFromSnapshotInput { - s.EngineVersion = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetKmsKeyId(v string) *RestoreDBClusterFromSnapshotInput { - s.KmsKeyId = &v - return s -} - -// SetPort sets the Port field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetPort(v int64) *RestoreDBClusterFromSnapshotInput { - s.Port = &v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetSnapshotIdentifier(v string) *RestoreDBClusterFromSnapshotInput { - s.SnapshotIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetTags(v []*Tag) *RestoreDBClusterFromSnapshotInput { - s.Tags = v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetVpcSecurityGroupIds(v []*string) *RestoreDBClusterFromSnapshotInput { - s.VpcSecurityGroupIds = v - return s -} - -type RestoreDBClusterFromSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB cluster. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s RestoreDBClusterFromSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBClusterFromSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *RestoreDBClusterFromSnapshotOutput) SetDBCluster(v *DBCluster) *RestoreDBClusterFromSnapshotOutput { - s.DBCluster = v - return s -} - -// Represents the input to RestoreDBClusterToPointInTime. -type RestoreDBClusterToPointInTimeInput struct { - _ struct{} `type:"structure"` - - // The name of the new DB cluster to be created. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * The first character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The DB subnet group name to use for the new DB cluster. - // - // Constraints: If provided, must match the name of an existing DBSubnetGroup. - // - // Example: mySubnetgroup - DBSubnetGroupName *string `type:"string"` - - // A list of log types that must be enabled for exporting to Amazon CloudWatch - // Logs. - EnableCloudwatchLogsExports []*string `type:"list"` - - // The AWS KMS key identifier to use when restoring an encrypted DB cluster - // from an encrypted DB cluster. - // - // The AWS KMS key identifier is the Amazon Resource Name (ARN) for the AWS - // KMS encryption key. If you are restoring a DB cluster with the same AWS account - // that owns the AWS KMS encryption key used to encrypt the new DB cluster, - // then you can use the AWS KMS key alias instead of the ARN for the AWS KMS - // encryption key. - // - // You can restore to a new DB cluster and encrypt the new DB cluster with an - // AWS KMS key that is different from the AWS KMS key used to encrypt the source - // DB cluster. The new DB cluster is encrypted with the AWS KMS key identified - // by the KmsKeyId parameter. - // - // If you do not specify a value for the KmsKeyId parameter, then the following - // occurs: - // - // * If the DB cluster is encrypted, then the restored DB cluster is encrypted - // using the AWS KMS key that was used to encrypt the source DB cluster. - // - // * If the DB cluster is not encrypted, then the restored DB cluster is - // not encrypted. - // - // If DBClusterIdentifier refers to a DB cluster that is not encrypted, then - // the restore request is rejected. - KmsKeyId *string `type:"string"` - - // The port number on which the new DB cluster accepts connections. - // - // Constraints: Must be a value from 1150 to 65535. - // - // Default: The default port for the engine. - Port *int64 `type:"integer"` - - // The date and time to restore the DB cluster to. - // - // Valid values: A time in Universal Coordinated Time (UTC) format. - // - // Constraints: - // - // * Must be before the latest restorable time for the DB instance. - // - // * Must be specified if the UseLatestRestorableTime parameter is not provided. - // - // * Cannot be specified if the UseLatestRestorableTime parameter is true. - // - // * Cannot be specified if the RestoreType parameter is copy-on-write. - // - // Example: 2015-03-07T23:45:00Z - RestoreToTime *time.Time `type:"timestamp"` - - // The identifier of the source DB cluster from which to restore. - // - // Constraints: - // - // * Must match the identifier of an existing DBCluster. - // - // SourceDBClusterIdentifier is a required field - SourceDBClusterIdentifier *string `type:"string" required:"true"` - - // The tags to be assigned to the restored DB cluster. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A value that is set to true to restore the DB cluster to the latest restorable - // backup time, and false otherwise. - // - // Default: false - // - // Constraints: Cannot be specified if the RestoreToTime parameter is provided. - UseLatestRestorableTime *bool `type:"boolean"` - - // A list of VPC security groups that the new DB cluster belongs to. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s RestoreDBClusterToPointInTimeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBClusterToPointInTimeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreDBClusterToPointInTimeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreDBClusterToPointInTimeInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.SourceDBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetDBClusterIdentifier(v string) *RestoreDBClusterToPointInTimeInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetDBSubnetGroupName(v string) *RestoreDBClusterToPointInTimeInput { - s.DBSubnetGroupName = &v - return s -} - -// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterToPointInTimeInput { - s.EnableCloudwatchLogsExports = v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetKmsKeyId(v string) *RestoreDBClusterToPointInTimeInput { - s.KmsKeyId = &v - return s -} - -// SetPort sets the Port field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetPort(v int64) *RestoreDBClusterToPointInTimeInput { - s.Port = &v - return s -} - -// SetRestoreToTime sets the RestoreToTime field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetRestoreToTime(v time.Time) *RestoreDBClusterToPointInTimeInput { - s.RestoreToTime = &v - return s -} - -// SetSourceDBClusterIdentifier sets the SourceDBClusterIdentifier field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetSourceDBClusterIdentifier(v string) *RestoreDBClusterToPointInTimeInput { - s.SourceDBClusterIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetTags(v []*Tag) *RestoreDBClusterToPointInTimeInput { - s.Tags = v - return s -} - -// SetUseLatestRestorableTime sets the UseLatestRestorableTime field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetUseLatestRestorableTime(v bool) *RestoreDBClusterToPointInTimeInput { - s.UseLatestRestorableTime = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetVpcSecurityGroupIds(v []*string) *RestoreDBClusterToPointInTimeInput { - s.VpcSecurityGroupIds = v - return s -} - -type RestoreDBClusterToPointInTimeOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about a DB cluster. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s RestoreDBClusterToPointInTimeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBClusterToPointInTimeOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *RestoreDBClusterToPointInTimeOutput) SetDBCluster(v *DBCluster) *RestoreDBClusterToPointInTimeOutput { - s.DBCluster = v - return s -} - -// Detailed information about a subnet. -type Subnet struct { - _ struct{} `type:"structure"` - - // Specifies the Availability Zone for the subnet. - SubnetAvailabilityZone *AvailabilityZone `type:"structure"` - - // Specifies the identifier of the subnet. - SubnetIdentifier *string `type:"string"` - - // Specifies the status of the subnet. - SubnetStatus *string `type:"string"` -} - -// String returns the string representation -func (s Subnet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Subnet) GoString() string { - return s.String() -} - -// SetSubnetAvailabilityZone sets the SubnetAvailabilityZone field's value. -func (s *Subnet) SetSubnetAvailabilityZone(v *AvailabilityZone) *Subnet { - s.SubnetAvailabilityZone = v - return s -} - -// SetSubnetIdentifier sets the SubnetIdentifier field's value. -func (s *Subnet) SetSubnetIdentifier(v string) *Subnet { - s.SubnetIdentifier = &v - return s -} - -// SetSubnetStatus sets the SubnetStatus field's value. -func (s *Subnet) SetSubnetStatus(v string) *Subnet { - s.SubnetStatus = &v - return s -} - -// Metadata assigned to an Amazon DocumentDB resource consisting of a key-value -// pair. -type Tag struct { - _ struct{} `type:"structure"` - - // The required name of the tag. The string value can be from 1 to 128 Unicode - // characters in length and can't be prefixed with "aws:" or "rds:". The string - // can contain only the set of Unicode letters, digits, white space, '_', '.', - // '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). - Key *string `type:"string"` - - // The optional value of the tag. The string value can be from 1 to 256 Unicode - // characters in length and can't be prefixed with "aws:" or "rds:". The string - // can contain only the set of Unicode letters, digits, white space, '_', '.', - // '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// The version of the database engine that a DB instance can be upgraded to. -type UpgradeTarget struct { - _ struct{} `type:"structure"` - - // A value that indicates whether the target version is applied to any source - // DB instances that have AutoMinorVersionUpgrade set to true. - AutoUpgrade *bool `type:"boolean"` - - // The version of the database engine that a DB instance can be upgraded to. - Description *string `type:"string"` - - // The name of the upgrade target database engine. - Engine *string `type:"string"` - - // The version number of the upgrade target database engine. - EngineVersion *string `type:"string"` - - // A value that indicates whether a database engine is upgraded to a major version. - IsMajorVersionUpgrade *bool `type:"boolean"` -} - -// String returns the string representation -func (s UpgradeTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpgradeTarget) GoString() string { - return s.String() -} - -// SetAutoUpgrade sets the AutoUpgrade field's value. -func (s *UpgradeTarget) SetAutoUpgrade(v bool) *UpgradeTarget { - s.AutoUpgrade = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpgradeTarget) SetDescription(v string) *UpgradeTarget { - s.Description = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *UpgradeTarget) SetEngine(v string) *UpgradeTarget { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *UpgradeTarget) SetEngineVersion(v string) *UpgradeTarget { - s.EngineVersion = &v - return s -} - -// SetIsMajorVersionUpgrade sets the IsMajorVersionUpgrade field's value. -func (s *UpgradeTarget) SetIsMajorVersionUpgrade(v bool) *UpgradeTarget { - s.IsMajorVersionUpgrade = &v - return s -} - -// Used as a response element for queries on virtual private cloud (VPC) security -// group membership. -type VpcSecurityGroupMembership struct { - _ struct{} `type:"structure"` - - // The status of the VPC security group. - Status *string `type:"string"` - - // The name of the VPC security group. - VpcSecurityGroupId *string `type:"string"` -} - -// String returns the string representation -func (s VpcSecurityGroupMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcSecurityGroupMembership) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *VpcSecurityGroupMembership) SetStatus(v string) *VpcSecurityGroupMembership { - s.Status = &v - return s -} - -// SetVpcSecurityGroupId sets the VpcSecurityGroupId field's value. -func (s *VpcSecurityGroupMembership) SetVpcSecurityGroupId(v string) *VpcSecurityGroupMembership { - s.VpcSecurityGroupId = &v - return s -} - -const ( - // ApplyMethodImmediate is a ApplyMethod enum value - ApplyMethodImmediate = "immediate" - - // ApplyMethodPendingReboot is a ApplyMethod enum value - ApplyMethodPendingReboot = "pending-reboot" -) - -const ( - // SourceTypeDbInstance is a SourceType enum value - SourceTypeDbInstance = "db-instance" - - // SourceTypeDbParameterGroup is a SourceType enum value - SourceTypeDbParameterGroup = "db-parameter-group" - - // SourceTypeDbSecurityGroup is a SourceType enum value - SourceTypeDbSecurityGroup = "db-security-group" - - // SourceTypeDbSnapshot is a SourceType enum value - SourceTypeDbSnapshot = "db-snapshot" - - // SourceTypeDbCluster is a SourceType enum value - SourceTypeDbCluster = "db-cluster" - - // SourceTypeDbClusterSnapshot is a SourceType enum value - SourceTypeDbClusterSnapshot = "db-cluster-snapshot" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/docdb/doc.go b/vendor/github.com/aws/aws-sdk-go/service/docdb/doc.go deleted file mode 100644 index 18ca7f9d4..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/docdb/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package docdb provides the client and types for making API -// requests to Amazon DocumentDB with MongoDB compatibility. -// -// Amazon DocumentDB API documentation -// -// See https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31 for more information on this service. -// -// See docdb package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/docdb/ -// -// Using the Client -// -// To contact Amazon DocumentDB with MongoDB compatibility with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon DocumentDB with MongoDB compatibility client DocDB for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/docdb/#New -package docdb diff --git a/vendor/github.com/aws/aws-sdk-go/service/docdb/errors.go b/vendor/github.com/aws/aws-sdk-go/service/docdb/errors.go deleted file mode 100644 index cbce0b232..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/docdb/errors.go +++ /dev/null @@ -1,290 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package docdb - -const ( - - // ErrCodeAuthorizationNotFoundFault for service response error code - // "AuthorizationNotFound". - // - // The specified CIDR IP or Amazon EC2 security group isn't authorized for the - // specified DB security group. - // - // Amazon DocumentDB also might not be authorized to perform necessary actions - // on your behalf using IAM. - ErrCodeAuthorizationNotFoundFault = "AuthorizationNotFound" - - // ErrCodeCertificateNotFoundFault for service response error code - // "CertificateNotFound". - // - // CertificateIdentifier doesn't refer to an existing certificate. - ErrCodeCertificateNotFoundFault = "CertificateNotFound" - - // ErrCodeDBClusterAlreadyExistsFault for service response error code - // "DBClusterAlreadyExistsFault". - // - // You already have a DB cluster with the given identifier. - ErrCodeDBClusterAlreadyExistsFault = "DBClusterAlreadyExistsFault" - - // ErrCodeDBClusterNotFoundFault for service response error code - // "DBClusterNotFoundFault". - // - // DBClusterIdentifier doesn't refer to an existing DB cluster. - ErrCodeDBClusterNotFoundFault = "DBClusterNotFoundFault" - - // ErrCodeDBClusterParameterGroupNotFoundFault for service response error code - // "DBClusterParameterGroupNotFound". - // - // DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter - // group. - ErrCodeDBClusterParameterGroupNotFoundFault = "DBClusterParameterGroupNotFound" - - // ErrCodeDBClusterQuotaExceededFault for service response error code - // "DBClusterQuotaExceededFault". - // - // The DB cluster can't be created because you have reached the maximum allowed - // quota of DB clusters. - ErrCodeDBClusterQuotaExceededFault = "DBClusterQuotaExceededFault" - - // ErrCodeDBClusterSnapshotAlreadyExistsFault for service response error code - // "DBClusterSnapshotAlreadyExistsFault". - // - // You already have a DB cluster snapshot with the given identifier. - ErrCodeDBClusterSnapshotAlreadyExistsFault = "DBClusterSnapshotAlreadyExistsFault" - - // ErrCodeDBClusterSnapshotNotFoundFault for service response error code - // "DBClusterSnapshotNotFoundFault". - // - // DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. - ErrCodeDBClusterSnapshotNotFoundFault = "DBClusterSnapshotNotFoundFault" - - // ErrCodeDBInstanceAlreadyExistsFault for service response error code - // "DBInstanceAlreadyExists". - // - // You already have a DB instance with the given identifier. - ErrCodeDBInstanceAlreadyExistsFault = "DBInstanceAlreadyExists" - - // ErrCodeDBInstanceNotFoundFault for service response error code - // "DBInstanceNotFound". - // - // DBInstanceIdentifier doesn't refer to an existing DB instance. - ErrCodeDBInstanceNotFoundFault = "DBInstanceNotFound" - - // ErrCodeDBParameterGroupAlreadyExistsFault for service response error code - // "DBParameterGroupAlreadyExists". - // - // A DB parameter group with the same name already exists. - ErrCodeDBParameterGroupAlreadyExistsFault = "DBParameterGroupAlreadyExists" - - // ErrCodeDBParameterGroupNotFoundFault for service response error code - // "DBParameterGroupNotFound". - // - // DBParameterGroupName doesn't refer to an existing DB parameter group. - ErrCodeDBParameterGroupNotFoundFault = "DBParameterGroupNotFound" - - // ErrCodeDBParameterGroupQuotaExceededFault for service response error code - // "DBParameterGroupQuotaExceeded". - // - // This request would cause you to exceed the allowed number of DB parameter - // groups. - ErrCodeDBParameterGroupQuotaExceededFault = "DBParameterGroupQuotaExceeded" - - // ErrCodeDBSecurityGroupNotFoundFault for service response error code - // "DBSecurityGroupNotFound". - // - // DBSecurityGroupName doesn't refer to an existing DB security group. - ErrCodeDBSecurityGroupNotFoundFault = "DBSecurityGroupNotFound" - - // ErrCodeDBSnapshotAlreadyExistsFault for service response error code - // "DBSnapshotAlreadyExists". - // - // DBSnapshotIdentifier is already being used by an existing snapshot. - ErrCodeDBSnapshotAlreadyExistsFault = "DBSnapshotAlreadyExists" - - // ErrCodeDBSnapshotNotFoundFault for service response error code - // "DBSnapshotNotFound". - // - // DBSnapshotIdentifier doesn't refer to an existing DB snapshot. - ErrCodeDBSnapshotNotFoundFault = "DBSnapshotNotFound" - - // ErrCodeDBSubnetGroupAlreadyExistsFault for service response error code - // "DBSubnetGroupAlreadyExists". - // - // DBSubnetGroupName is already being used by an existing DB subnet group. - ErrCodeDBSubnetGroupAlreadyExistsFault = "DBSubnetGroupAlreadyExists" - - // ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs for service response error code - // "DBSubnetGroupDoesNotCoverEnoughAZs". - // - // Subnets in the DB subnet group should cover at least two Availability Zones - // unless there is only one Availability Zone. - ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs = "DBSubnetGroupDoesNotCoverEnoughAZs" - - // ErrCodeDBSubnetGroupNotFoundFault for service response error code - // "DBSubnetGroupNotFoundFault". - // - // DBSubnetGroupName doesn't refer to an existing DB subnet group. - ErrCodeDBSubnetGroupNotFoundFault = "DBSubnetGroupNotFoundFault" - - // ErrCodeDBSubnetGroupQuotaExceededFault for service response error code - // "DBSubnetGroupQuotaExceeded". - // - // The request would cause you to exceed the allowed number of DB subnet groups. - ErrCodeDBSubnetGroupQuotaExceededFault = "DBSubnetGroupQuotaExceeded" - - // ErrCodeDBSubnetQuotaExceededFault for service response error code - // "DBSubnetQuotaExceededFault". - // - // The request would cause you to exceed the allowed number of subnets in a - // DB subnet group. - ErrCodeDBSubnetQuotaExceededFault = "DBSubnetQuotaExceededFault" - - // ErrCodeDBUpgradeDependencyFailureFault for service response error code - // "DBUpgradeDependencyFailure". - // - // The DB upgrade failed because a resource that the DB depends on can't be - // modified. - ErrCodeDBUpgradeDependencyFailureFault = "DBUpgradeDependencyFailure" - - // ErrCodeInstanceQuotaExceededFault for service response error code - // "InstanceQuotaExceeded". - // - // The request would cause you to exceed the allowed number of DB instances. - ErrCodeInstanceQuotaExceededFault = "InstanceQuotaExceeded" - - // ErrCodeInsufficientDBClusterCapacityFault for service response error code - // "InsufficientDBClusterCapacityFault". - // - // The DB cluster doesn't have enough capacity for the current operation. - ErrCodeInsufficientDBClusterCapacityFault = "InsufficientDBClusterCapacityFault" - - // ErrCodeInsufficientDBInstanceCapacityFault for service response error code - // "InsufficientDBInstanceCapacity". - // - // The specified DB instance class isn't available in the specified Availability - // Zone. - ErrCodeInsufficientDBInstanceCapacityFault = "InsufficientDBInstanceCapacity" - - // ErrCodeInsufficientStorageClusterCapacityFault for service response error code - // "InsufficientStorageClusterCapacity". - // - // There is not enough storage available for the current action. You might be - // able to resolve this error by updating your subnet group to use different - // Availability Zones that have more storage available. - ErrCodeInsufficientStorageClusterCapacityFault = "InsufficientStorageClusterCapacity" - - // ErrCodeInvalidDBClusterSnapshotStateFault for service response error code - // "InvalidDBClusterSnapshotStateFault". - // - // The provided value isn't a valid DB cluster snapshot state. - ErrCodeInvalidDBClusterSnapshotStateFault = "InvalidDBClusterSnapshotStateFault" - - // ErrCodeInvalidDBClusterStateFault for service response error code - // "InvalidDBClusterStateFault". - // - // The DB cluster isn't in a valid state. - ErrCodeInvalidDBClusterStateFault = "InvalidDBClusterStateFault" - - // ErrCodeInvalidDBInstanceStateFault for service response error code - // "InvalidDBInstanceState". - // - // The specified DB instance isn't in the available state. - ErrCodeInvalidDBInstanceStateFault = "InvalidDBInstanceState" - - // ErrCodeInvalidDBParameterGroupStateFault for service response error code - // "InvalidDBParameterGroupState". - // - // The DB parameter group is in use, or it is in a state that is not valid. - // If you are trying to delete the parameter group, you can't delete it when - // the parameter group is in this state. - ErrCodeInvalidDBParameterGroupStateFault = "InvalidDBParameterGroupState" - - // ErrCodeInvalidDBSecurityGroupStateFault for service response error code - // "InvalidDBSecurityGroupState". - // - // The state of the DB security group doesn't allow deletion. - ErrCodeInvalidDBSecurityGroupStateFault = "InvalidDBSecurityGroupState" - - // ErrCodeInvalidDBSnapshotStateFault for service response error code - // "InvalidDBSnapshotState". - // - // The state of the DB snapshot doesn't allow deletion. - ErrCodeInvalidDBSnapshotStateFault = "InvalidDBSnapshotState" - - // ErrCodeInvalidDBSubnetGroupStateFault for service response error code - // "InvalidDBSubnetGroupStateFault". - // - // The DB subnet group can't be deleted because it's in use. - ErrCodeInvalidDBSubnetGroupStateFault = "InvalidDBSubnetGroupStateFault" - - // ErrCodeInvalidDBSubnetStateFault for service response error code - // "InvalidDBSubnetStateFault". - // - // The DB subnet isn't in the available state. - ErrCodeInvalidDBSubnetStateFault = "InvalidDBSubnetStateFault" - - // ErrCodeInvalidRestoreFault for service response error code - // "InvalidRestoreFault". - // - // You cannot restore from a virtual private cloud (VPC) backup to a non-VPC - // DB instance. - ErrCodeInvalidRestoreFault = "InvalidRestoreFault" - - // ErrCodeInvalidSubnet for service response error code - // "InvalidSubnet". - // - // The requested subnet is not valid, or multiple subnets were requested that - // are not all in a common virtual private cloud (VPC). - ErrCodeInvalidSubnet = "InvalidSubnet" - - // ErrCodeInvalidVPCNetworkStateFault for service response error code - // "InvalidVPCNetworkStateFault". - // - // The DB subnet group doesn't cover all Availability Zones after it is created - // because of changes that were made. - ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault" - - // ErrCodeKMSKeyNotAccessibleFault for service response error code - // "KMSKeyNotAccessibleFault". - // - // An error occurred when accessing an AWS KMS key. - ErrCodeKMSKeyNotAccessibleFault = "KMSKeyNotAccessibleFault" - - // ErrCodeResourceNotFoundFault for service response error code - // "ResourceNotFoundFault". - // - // The specified resource ID was not found. - ErrCodeResourceNotFoundFault = "ResourceNotFoundFault" - - // ErrCodeSharedSnapshotQuotaExceededFault for service response error code - // "SharedSnapshotQuotaExceeded". - // - // You have exceeded the maximum number of accounts that you can share a manual - // DB snapshot with. - ErrCodeSharedSnapshotQuotaExceededFault = "SharedSnapshotQuotaExceeded" - - // ErrCodeSnapshotQuotaExceededFault for service response error code - // "SnapshotQuotaExceeded". - // - // The request would cause you to exceed the allowed number of DB snapshots. - ErrCodeSnapshotQuotaExceededFault = "SnapshotQuotaExceeded" - - // ErrCodeStorageQuotaExceededFault for service response error code - // "StorageQuotaExceeded". - // - // The request would cause you to exceed the allowed amount of storage available - // across all DB instances. - ErrCodeStorageQuotaExceededFault = "StorageQuotaExceeded" - - // ErrCodeStorageTypeNotSupportedFault for service response error code - // "StorageTypeNotSupported". - // - // Storage of the specified StorageType can't be associated with the DB instance. - ErrCodeStorageTypeNotSupportedFault = "StorageTypeNotSupported" - - // ErrCodeSubnetAlreadyInUse for service response error code - // "SubnetAlreadyInUse". - // - // The DB subnet is already in use in the Availability Zone. - ErrCodeSubnetAlreadyInUse = "SubnetAlreadyInUse" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/docdb/service.go b/vendor/github.com/aws/aws-sdk-go/service/docdb/service.go deleted file mode 100644 index cd0f3d91d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/docdb/service.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package docdb - -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/query" -) - -// DocDB provides the API operation methods for making requests to -// Amazon DocumentDB with MongoDB compatibility. See this package's package overview docs -// for details on the service. -// -// DocDB methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type DocDB 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 = "DocDB" // Name of service. - EndpointsID = "rds" // ID to lookup a service endpoint with. - ServiceID = "DocDB" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the DocDB 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 DocDB client from just a session. -// svc := docdb.New(mySession) -// -// // Create a DocDB client with additional configuration -// svc := docdb.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *DocDB { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "rds" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DocDB { - svc := &DocDB{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-10-31", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a DocDB operation and runs any -// custom request initialization. -func (c *DocDB) 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/docdb/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/docdb/waiters.go deleted file mode 100644 index f1b1f2b86..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/docdb/waiters.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package docdb - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilDBInstanceAvailable uses the Amazon DocDB API operation -// DescribeDBInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *DocDB) WaitUntilDBInstanceAvailable(input *DescribeDBInstancesInput) error { - return c.WaitUntilDBInstanceAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilDBInstanceAvailableWithContext is an extended version of WaitUntilDBInstanceAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) WaitUntilDBInstanceAvailableWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilDBInstanceAvailable", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "deleted", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "deleting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "incompatible-restore", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "incompatible-parameters", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeDBInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilDBInstanceDeleted uses the Amazon DocDB API operation -// DescribeDBInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *DocDB) WaitUntilDBInstanceDeleted(input *DescribeDBInstancesInput) error { - return c.WaitUntilDBInstanceDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilDBInstanceDeletedWithContext is an extended version of WaitUntilDBInstanceDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *DocDB) WaitUntilDBInstanceDeletedWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilDBInstanceDeleted", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "deleted", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "DBInstanceNotFound", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "creating", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "modifying", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "rebooting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "resetting-master-credentials", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeDBInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go deleted file mode 100644 index 8ccb729e5..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ /dev/null @@ -1,86622 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ec2 - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/ec2query" -) - -const opAcceptReservedInstancesExchangeQuote = "AcceptReservedInstancesExchangeQuote" - -// AcceptReservedInstancesExchangeQuoteRequest generates a "aws/request.Request" representing the -// client's request for the AcceptReservedInstancesExchangeQuote operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcceptReservedInstancesExchangeQuote for more information on using the AcceptReservedInstancesExchangeQuote -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcceptReservedInstancesExchangeQuoteRequest method. -// req, resp := client.AcceptReservedInstancesExchangeQuoteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptReservedInstancesExchangeQuote -func (c *EC2) AcceptReservedInstancesExchangeQuoteRequest(input *AcceptReservedInstancesExchangeQuoteInput) (req *request.Request, output *AcceptReservedInstancesExchangeQuoteOutput) { - op := &request.Operation{ - Name: opAcceptReservedInstancesExchangeQuote, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AcceptReservedInstancesExchangeQuoteInput{} - } - - output = &AcceptReservedInstancesExchangeQuoteOutput{} - req = c.newRequest(op, input, output) - return -} - -// AcceptReservedInstancesExchangeQuote API operation for Amazon Elastic Compute Cloud. -// -// Accepts the Convertible Reserved Instance exchange quote described in the -// GetReservedInstancesExchangeQuote call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AcceptReservedInstancesExchangeQuote for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptReservedInstancesExchangeQuote -func (c *EC2) AcceptReservedInstancesExchangeQuote(input *AcceptReservedInstancesExchangeQuoteInput) (*AcceptReservedInstancesExchangeQuoteOutput, error) { - req, out := c.AcceptReservedInstancesExchangeQuoteRequest(input) - return out, req.Send() -} - -// AcceptReservedInstancesExchangeQuoteWithContext is the same as AcceptReservedInstancesExchangeQuote with the addition of -// the ability to pass a context and additional request options. -// -// See AcceptReservedInstancesExchangeQuote for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AcceptReservedInstancesExchangeQuoteWithContext(ctx aws.Context, input *AcceptReservedInstancesExchangeQuoteInput, opts ...request.Option) (*AcceptReservedInstancesExchangeQuoteOutput, error) { - req, out := c.AcceptReservedInstancesExchangeQuoteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAcceptTransitGatewayVpcAttachment = "AcceptTransitGatewayVpcAttachment" - -// AcceptTransitGatewayVpcAttachmentRequest generates a "aws/request.Request" representing the -// client's request for the AcceptTransitGatewayVpcAttachment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcceptTransitGatewayVpcAttachment for more information on using the AcceptTransitGatewayVpcAttachment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcceptTransitGatewayVpcAttachmentRequest method. -// req, resp := client.AcceptTransitGatewayVpcAttachmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptTransitGatewayVpcAttachment -func (c *EC2) AcceptTransitGatewayVpcAttachmentRequest(input *AcceptTransitGatewayVpcAttachmentInput) (req *request.Request, output *AcceptTransitGatewayVpcAttachmentOutput) { - op := &request.Operation{ - Name: opAcceptTransitGatewayVpcAttachment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AcceptTransitGatewayVpcAttachmentInput{} - } - - output = &AcceptTransitGatewayVpcAttachmentOutput{} - req = c.newRequest(op, input, output) - return -} - -// AcceptTransitGatewayVpcAttachment API operation for Amazon Elastic Compute Cloud. -// -// Accepts a request to attach a VPC to a transit gateway. -// -// The VPC attachment must be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments -// to view your pending VPC attachment requests. Use RejectTransitGatewayVpcAttachment -// to reject a VPC attachment request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AcceptTransitGatewayVpcAttachment for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptTransitGatewayVpcAttachment -func (c *EC2) AcceptTransitGatewayVpcAttachment(input *AcceptTransitGatewayVpcAttachmentInput) (*AcceptTransitGatewayVpcAttachmentOutput, error) { - req, out := c.AcceptTransitGatewayVpcAttachmentRequest(input) - return out, req.Send() -} - -// AcceptTransitGatewayVpcAttachmentWithContext is the same as AcceptTransitGatewayVpcAttachment with the addition of -// the ability to pass a context and additional request options. -// -// See AcceptTransitGatewayVpcAttachment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AcceptTransitGatewayVpcAttachmentWithContext(ctx aws.Context, input *AcceptTransitGatewayVpcAttachmentInput, opts ...request.Option) (*AcceptTransitGatewayVpcAttachmentOutput, error) { - req, out := c.AcceptTransitGatewayVpcAttachmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAcceptVpcEndpointConnections = "AcceptVpcEndpointConnections" - -// AcceptVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the -// client's request for the AcceptVpcEndpointConnections operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcceptVpcEndpointConnections for more information on using the AcceptVpcEndpointConnections -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcceptVpcEndpointConnectionsRequest method. -// req, resp := client.AcceptVpcEndpointConnectionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcEndpointConnections -func (c *EC2) AcceptVpcEndpointConnectionsRequest(input *AcceptVpcEndpointConnectionsInput) (req *request.Request, output *AcceptVpcEndpointConnectionsOutput) { - op := &request.Operation{ - Name: opAcceptVpcEndpointConnections, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AcceptVpcEndpointConnectionsInput{} - } - - output = &AcceptVpcEndpointConnectionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// AcceptVpcEndpointConnections API operation for Amazon Elastic Compute Cloud. -// -// Accepts one or more interface VPC endpoint connection requests to your VPC -// endpoint service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AcceptVpcEndpointConnections for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcEndpointConnections -func (c *EC2) AcceptVpcEndpointConnections(input *AcceptVpcEndpointConnectionsInput) (*AcceptVpcEndpointConnectionsOutput, error) { - req, out := c.AcceptVpcEndpointConnectionsRequest(input) - return out, req.Send() -} - -// AcceptVpcEndpointConnectionsWithContext is the same as AcceptVpcEndpointConnections with the addition of -// the ability to pass a context and additional request options. -// -// See AcceptVpcEndpointConnections for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AcceptVpcEndpointConnectionsWithContext(ctx aws.Context, input *AcceptVpcEndpointConnectionsInput, opts ...request.Option) (*AcceptVpcEndpointConnectionsOutput, error) { - req, out := c.AcceptVpcEndpointConnectionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAcceptVpcPeeringConnection = "AcceptVpcPeeringConnection" - -// AcceptVpcPeeringConnectionRequest generates a "aws/request.Request" representing the -// client's request for the AcceptVpcPeeringConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcceptVpcPeeringConnection for more information on using the AcceptVpcPeeringConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcceptVpcPeeringConnectionRequest method. -// req, resp := client.AcceptVpcPeeringConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnection -func (c *EC2) AcceptVpcPeeringConnectionRequest(input *AcceptVpcPeeringConnectionInput) (req *request.Request, output *AcceptVpcPeeringConnectionOutput) { - op := &request.Operation{ - Name: opAcceptVpcPeeringConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AcceptVpcPeeringConnectionInput{} - } - - output = &AcceptVpcPeeringConnectionOutput{} - req = c.newRequest(op, input, output) - return -} - -// AcceptVpcPeeringConnection API operation for Amazon Elastic Compute Cloud. -// -// Accept a VPC peering connection request. To accept a request, the VPC peering -// connection must be in the pending-acceptance state, and you must be the owner -// of the peer VPC. Use DescribeVpcPeeringConnections to view your outstanding -// VPC peering connection requests. -// -// For an inter-region VPC peering connection request, you must accept the VPC -// peering connection in the region of the accepter VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AcceptVpcPeeringConnection for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnection -func (c *EC2) AcceptVpcPeeringConnection(input *AcceptVpcPeeringConnectionInput) (*AcceptVpcPeeringConnectionOutput, error) { - req, out := c.AcceptVpcPeeringConnectionRequest(input) - return out, req.Send() -} - -// AcceptVpcPeeringConnectionWithContext is the same as AcceptVpcPeeringConnection with the addition of -// the ability to pass a context and additional request options. -// -// See AcceptVpcPeeringConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AcceptVpcPeeringConnectionWithContext(ctx aws.Context, input *AcceptVpcPeeringConnectionInput, opts ...request.Option) (*AcceptVpcPeeringConnectionOutput, error) { - req, out := c.AcceptVpcPeeringConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAdvertiseByoipCidr = "AdvertiseByoipCidr" - -// AdvertiseByoipCidrRequest generates a "aws/request.Request" representing the -// client's request for the AdvertiseByoipCidr operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AdvertiseByoipCidr for more information on using the AdvertiseByoipCidr -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AdvertiseByoipCidrRequest method. -// req, resp := client.AdvertiseByoipCidrRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AdvertiseByoipCidr -func (c *EC2) AdvertiseByoipCidrRequest(input *AdvertiseByoipCidrInput) (req *request.Request, output *AdvertiseByoipCidrOutput) { - op := &request.Operation{ - Name: opAdvertiseByoipCidr, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AdvertiseByoipCidrInput{} - } - - output = &AdvertiseByoipCidrOutput{} - req = c.newRequest(op, input, output) - return -} - -// AdvertiseByoipCidr API operation for Amazon Elastic Compute Cloud. -// -// Advertises an IPv4 address range that is provisioned for use with your AWS -// resources through bring your own IP addresses (BYOIP). -// -// You can perform this operation at most once every 10 seconds, even if you -// specify different address ranges each time. -// -// We recommend that you stop advertising the BYOIP CIDR from other locations -// when you advertise it from AWS. To minimize down time, you can configure -// your AWS resources to use an address from a BYOIP CIDR before it is advertised, -// and then simultaneously stop advertising it from the current location and -// start advertising it through AWS. -// -// It can take a few minutes before traffic to the specified addresses starts -// routing to AWS because of BGP propagation delays. -// -// To stop advertising the BYOIP CIDR, use WithdrawByoipCidr. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AdvertiseByoipCidr for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AdvertiseByoipCidr -func (c *EC2) AdvertiseByoipCidr(input *AdvertiseByoipCidrInput) (*AdvertiseByoipCidrOutput, error) { - req, out := c.AdvertiseByoipCidrRequest(input) - return out, req.Send() -} - -// AdvertiseByoipCidrWithContext is the same as AdvertiseByoipCidr with the addition of -// the ability to pass a context and additional request options. -// -// See AdvertiseByoipCidr for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AdvertiseByoipCidrWithContext(ctx aws.Context, input *AdvertiseByoipCidrInput, opts ...request.Option) (*AdvertiseByoipCidrOutput, error) { - req, out := c.AdvertiseByoipCidrRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAllocateAddress = "AllocateAddress" - -// AllocateAddressRequest generates a "aws/request.Request" representing the -// client's request for the AllocateAddress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AllocateAddress for more information on using the AllocateAddress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AllocateAddressRequest method. -// req, resp := client.AllocateAddressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddress -func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *request.Request, output *AllocateAddressOutput) { - op := &request.Operation{ - Name: opAllocateAddress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AllocateAddressInput{} - } - - output = &AllocateAddressOutput{} - req = c.newRequest(op, input, output) - return -} - -// AllocateAddress API operation for Amazon Elastic Compute Cloud. -// -// Allocates an Elastic IP address to your AWS account. After you allocate the -// Elastic IP address you can associate it with an instance or network interface. -// After you release an Elastic IP address, it is released to the IP address -// pool and can be allocated to a different AWS account. -// -// You can allocate an Elastic IP address from an address pool owned by AWS -// or from an address pool created from a public IPv4 address range that you -// have brought to AWS for use with your AWS resources using bring your own -// IP addresses (BYOIP). For more information, see Bring Your Own IP Addresses -// (BYOIP) (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// [EC2-VPC] If you release an Elastic IP address, you might be able to recover -// it. You cannot recover an Elastic IP address that you released after it is -// allocated to another AWS account. You cannot recover an Elastic IP address -// for EC2-Classic. To attempt to recover an Elastic IP address that you released, -// specify it in this operation. -// -// An Elastic IP address is for use either in the EC2-Classic platform or in -// a VPC. By default, you can allocate 5 Elastic IP addresses for EC2-Classic -// per region and 5 Elastic IP addresses for EC2-VPC per region. -// -// For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AllocateAddress for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddress -func (c *EC2) AllocateAddress(input *AllocateAddressInput) (*AllocateAddressOutput, error) { - req, out := c.AllocateAddressRequest(input) - return out, req.Send() -} - -// AllocateAddressWithContext is the same as AllocateAddress with the addition of -// the ability to pass a context and additional request options. -// -// See AllocateAddress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AllocateAddressWithContext(ctx aws.Context, input *AllocateAddressInput, opts ...request.Option) (*AllocateAddressOutput, error) { - req, out := c.AllocateAddressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAllocateHosts = "AllocateHosts" - -// AllocateHostsRequest generates a "aws/request.Request" representing the -// client's request for the AllocateHosts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AllocateHosts for more information on using the AllocateHosts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AllocateHostsRequest method. -// req, resp := client.AllocateHostsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateHosts -func (c *EC2) AllocateHostsRequest(input *AllocateHostsInput) (req *request.Request, output *AllocateHostsOutput) { - op := &request.Operation{ - Name: opAllocateHosts, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AllocateHostsInput{} - } - - output = &AllocateHostsOutput{} - req = c.newRequest(op, input, output) - return -} - -// AllocateHosts API operation for Amazon Elastic Compute Cloud. -// -// Allocates a Dedicated Host to your account. At a minimum, specify the instance -// size type, Availability Zone, and quantity of hosts to allocate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AllocateHosts for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateHosts -func (c *EC2) AllocateHosts(input *AllocateHostsInput) (*AllocateHostsOutput, error) { - req, out := c.AllocateHostsRequest(input) - return out, req.Send() -} - -// AllocateHostsWithContext is the same as AllocateHosts with the addition of -// the ability to pass a context and additional request options. -// -// See AllocateHosts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AllocateHostsWithContext(ctx aws.Context, input *AllocateHostsInput, opts ...request.Option) (*AllocateHostsOutput, error) { - req, out := c.AllocateHostsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opApplySecurityGroupsToClientVpnTargetNetwork = "ApplySecurityGroupsToClientVpnTargetNetwork" - -// ApplySecurityGroupsToClientVpnTargetNetworkRequest generates a "aws/request.Request" representing the -// client's request for the ApplySecurityGroupsToClientVpnTargetNetwork operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ApplySecurityGroupsToClientVpnTargetNetwork for more information on using the ApplySecurityGroupsToClientVpnTargetNetwork -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ApplySecurityGroupsToClientVpnTargetNetworkRequest method. -// req, resp := client.ApplySecurityGroupsToClientVpnTargetNetworkRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ApplySecurityGroupsToClientVpnTargetNetwork -func (c *EC2) ApplySecurityGroupsToClientVpnTargetNetworkRequest(input *ApplySecurityGroupsToClientVpnTargetNetworkInput) (req *request.Request, output *ApplySecurityGroupsToClientVpnTargetNetworkOutput) { - op := &request.Operation{ - Name: opApplySecurityGroupsToClientVpnTargetNetwork, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ApplySecurityGroupsToClientVpnTargetNetworkInput{} - } - - output = &ApplySecurityGroupsToClientVpnTargetNetworkOutput{} - req = c.newRequest(op, input, output) - return -} - -// ApplySecurityGroupsToClientVpnTargetNetwork API operation for Amazon Elastic Compute Cloud. -// -// Applies a security group to the association between the target network and -// the Client VPN endpoint. This action replaces the existing security groups -// with the specified security groups. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ApplySecurityGroupsToClientVpnTargetNetwork for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ApplySecurityGroupsToClientVpnTargetNetwork -func (c *EC2) ApplySecurityGroupsToClientVpnTargetNetwork(input *ApplySecurityGroupsToClientVpnTargetNetworkInput) (*ApplySecurityGroupsToClientVpnTargetNetworkOutput, error) { - req, out := c.ApplySecurityGroupsToClientVpnTargetNetworkRequest(input) - return out, req.Send() -} - -// ApplySecurityGroupsToClientVpnTargetNetworkWithContext is the same as ApplySecurityGroupsToClientVpnTargetNetwork with the addition of -// the ability to pass a context and additional request options. -// -// See ApplySecurityGroupsToClientVpnTargetNetwork for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ApplySecurityGroupsToClientVpnTargetNetworkWithContext(ctx aws.Context, input *ApplySecurityGroupsToClientVpnTargetNetworkInput, opts ...request.Option) (*ApplySecurityGroupsToClientVpnTargetNetworkOutput, error) { - req, out := c.ApplySecurityGroupsToClientVpnTargetNetworkRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssignIpv6Addresses = "AssignIpv6Addresses" - -// AssignIpv6AddressesRequest generates a "aws/request.Request" representing the -// client's request for the AssignIpv6Addresses operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssignIpv6Addresses for more information on using the AssignIpv6Addresses -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssignIpv6AddressesRequest method. -// req, resp := client.AssignIpv6AddressesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignIpv6Addresses -func (c *EC2) AssignIpv6AddressesRequest(input *AssignIpv6AddressesInput) (req *request.Request, output *AssignIpv6AddressesOutput) { - op := &request.Operation{ - Name: opAssignIpv6Addresses, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssignIpv6AddressesInput{} - } - - output = &AssignIpv6AddressesOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssignIpv6Addresses API operation for Amazon Elastic Compute Cloud. -// -// Assigns one or more IPv6 addresses to the specified network interface. You -// can specify one or more specific IPv6 addresses, or you can specify the number -// of IPv6 addresses to be automatically assigned from within the subnet's IPv6 -// CIDR block range. You can assign as many IPv6 addresses to a network interface -// as you can assign private IPv4 addresses, and the limit varies per instance -// type. For information, see IP Addresses Per Network Interface Per Instance -// Type (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AssignIpv6Addresses for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignIpv6Addresses -func (c *EC2) AssignIpv6Addresses(input *AssignIpv6AddressesInput) (*AssignIpv6AddressesOutput, error) { - req, out := c.AssignIpv6AddressesRequest(input) - return out, req.Send() -} - -// AssignIpv6AddressesWithContext is the same as AssignIpv6Addresses with the addition of -// the ability to pass a context and additional request options. -// -// See AssignIpv6Addresses for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AssignIpv6AddressesWithContext(ctx aws.Context, input *AssignIpv6AddressesInput, opts ...request.Option) (*AssignIpv6AddressesOutput, error) { - req, out := c.AssignIpv6AddressesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssignPrivateIpAddresses = "AssignPrivateIpAddresses" - -// AssignPrivateIpAddressesRequest generates a "aws/request.Request" representing the -// client's request for the AssignPrivateIpAddresses operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssignPrivateIpAddresses for more information on using the AssignPrivateIpAddresses -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssignPrivateIpAddressesRequest method. -// req, resp := client.AssignPrivateIpAddressesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddresses -func (c *EC2) AssignPrivateIpAddressesRequest(input *AssignPrivateIpAddressesInput) (req *request.Request, output *AssignPrivateIpAddressesOutput) { - op := &request.Operation{ - Name: opAssignPrivateIpAddresses, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssignPrivateIpAddressesInput{} - } - - output = &AssignPrivateIpAddressesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssignPrivateIpAddresses API operation for Amazon Elastic Compute Cloud. -// -// Assigns one or more secondary private IP addresses to the specified network -// interface. -// -// You can specify one or more specific secondary IP addresses, or you can specify -// the number of secondary IP addresses to be automatically assigned within -// the subnet's CIDR block range. The number of secondary IP addresses that -// you can assign to an instance varies by instance type. For information about -// instance types, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) -// in the Amazon Elastic Compute Cloud User Guide. For more information about -// Elastic IP addresses, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// When you move a secondary private IP address to another network interface, -// any Elastic IP address that is associated with the IP address is also moved. -// -// Remapping an IP address is an asynchronous operation. When you move an IP -// address from one network interface to another, check network/interfaces/macs/mac/local-ipv4s -// in the instance metadata to confirm that the remapping is complete. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AssignPrivateIpAddresses for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddresses -func (c *EC2) AssignPrivateIpAddresses(input *AssignPrivateIpAddressesInput) (*AssignPrivateIpAddressesOutput, error) { - req, out := c.AssignPrivateIpAddressesRequest(input) - return out, req.Send() -} - -// AssignPrivateIpAddressesWithContext is the same as AssignPrivateIpAddresses with the addition of -// the ability to pass a context and additional request options. -// -// See AssignPrivateIpAddresses for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AssignPrivateIpAddressesWithContext(ctx aws.Context, input *AssignPrivateIpAddressesInput, opts ...request.Option) (*AssignPrivateIpAddressesOutput, error) { - req, out := c.AssignPrivateIpAddressesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateAddress = "AssociateAddress" - -// AssociateAddressRequest generates a "aws/request.Request" representing the -// client's request for the AssociateAddress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateAddress for more information on using the AssociateAddress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateAddressRequest method. -// req, resp := client.AssociateAddressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddress -func (c *EC2) AssociateAddressRequest(input *AssociateAddressInput) (req *request.Request, output *AssociateAddressOutput) { - op := &request.Operation{ - Name: opAssociateAddress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateAddressInput{} - } - - output = &AssociateAddressOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateAddress API operation for Amazon Elastic Compute Cloud. -// -// Associates an Elastic IP address with an instance or a network interface. -// Before you can use an Elastic IP address, you must allocate it to your account. -// -// An Elastic IP address is for use in either the EC2-Classic platform or in -// a VPC. For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// [EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is -// already associated with a different instance, it is disassociated from that -// instance and associated with the specified instance. If you associate an -// Elastic IP address with an instance that has an existing Elastic IP address, -// the existing address is disassociated from the instance, but remains allocated -// to your account. -// -// [VPC in an EC2-Classic account] If you don't specify a private IP address, -// the Elastic IP address is associated with the primary IP address. If the -// Elastic IP address is already associated with a different instance or a network -// interface, you get an error unless you allow reassociation. You cannot associate -// an Elastic IP address with an instance or network interface that has an existing -// Elastic IP address. -// -// This is an idempotent operation. If you perform the operation more than once, -// Amazon EC2 doesn't return an error, and you may be charged for each time -// the Elastic IP address is remapped to the same instance. For more information, -// see the Elastic IP Addresses section of Amazon EC2 Pricing (http://aws.amazon.com/ec2/pricing/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AssociateAddress for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddress -func (c *EC2) AssociateAddress(input *AssociateAddressInput) (*AssociateAddressOutput, error) { - req, out := c.AssociateAddressRequest(input) - return out, req.Send() -} - -// AssociateAddressWithContext is the same as AssociateAddress with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateAddress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AssociateAddressWithContext(ctx aws.Context, input *AssociateAddressInput, opts ...request.Option) (*AssociateAddressOutput, error) { - req, out := c.AssociateAddressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateClientVpnTargetNetwork = "AssociateClientVpnTargetNetwork" - -// AssociateClientVpnTargetNetworkRequest generates a "aws/request.Request" representing the -// client's request for the AssociateClientVpnTargetNetwork operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateClientVpnTargetNetwork for more information on using the AssociateClientVpnTargetNetwork -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateClientVpnTargetNetworkRequest method. -// req, resp := client.AssociateClientVpnTargetNetworkRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateClientVpnTargetNetwork -func (c *EC2) AssociateClientVpnTargetNetworkRequest(input *AssociateClientVpnTargetNetworkInput) (req *request.Request, output *AssociateClientVpnTargetNetworkOutput) { - op := &request.Operation{ - Name: opAssociateClientVpnTargetNetwork, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateClientVpnTargetNetworkInput{} - } - - output = &AssociateClientVpnTargetNetworkOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateClientVpnTargetNetwork API operation for Amazon Elastic Compute Cloud. -// -// Associates a target network with a Client VPN endpoint. A target network -// is a subnet in a VPC. You can associate multiple subnets from the same VPC -// with a Client VPN endpoint. You can associate only one subnet in each Availability -// Zone. We recommend that you associate at least two subnets to provide Availability -// Zone redundancy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AssociateClientVpnTargetNetwork for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateClientVpnTargetNetwork -func (c *EC2) AssociateClientVpnTargetNetwork(input *AssociateClientVpnTargetNetworkInput) (*AssociateClientVpnTargetNetworkOutput, error) { - req, out := c.AssociateClientVpnTargetNetworkRequest(input) - return out, req.Send() -} - -// AssociateClientVpnTargetNetworkWithContext is the same as AssociateClientVpnTargetNetwork with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateClientVpnTargetNetwork for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AssociateClientVpnTargetNetworkWithContext(ctx aws.Context, input *AssociateClientVpnTargetNetworkInput, opts ...request.Option) (*AssociateClientVpnTargetNetworkOutput, error) { - req, out := c.AssociateClientVpnTargetNetworkRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateDhcpOptions = "AssociateDhcpOptions" - -// AssociateDhcpOptionsRequest generates a "aws/request.Request" representing the -// client's request for the AssociateDhcpOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateDhcpOptions for more information on using the AssociateDhcpOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateDhcpOptionsRequest method. -// req, resp := client.AssociateDhcpOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptions -func (c *EC2) AssociateDhcpOptionsRequest(input *AssociateDhcpOptionsInput) (req *request.Request, output *AssociateDhcpOptionsOutput) { - op := &request.Operation{ - Name: opAssociateDhcpOptions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateDhcpOptionsInput{} - } - - output = &AssociateDhcpOptionsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssociateDhcpOptions API operation for Amazon Elastic Compute Cloud. -// -// Associates a set of DHCP options (that you've previously created) with the -// specified VPC, or associates no DHCP options with the VPC. -// -// After you associate the options with the VPC, any existing instances and -// all new instances that you launch in that VPC use the options. You don't -// need to restart or relaunch the instances. They automatically pick up the -// changes within a few hours, depending on how frequently the instance renews -// its DHCP lease. You can explicitly renew the lease using the operating system -// on the instance. -// -// For more information, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AssociateDhcpOptions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptions -func (c *EC2) AssociateDhcpOptions(input *AssociateDhcpOptionsInput) (*AssociateDhcpOptionsOutput, error) { - req, out := c.AssociateDhcpOptionsRequest(input) - return out, req.Send() -} - -// AssociateDhcpOptionsWithContext is the same as AssociateDhcpOptions with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateDhcpOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AssociateDhcpOptionsWithContext(ctx aws.Context, input *AssociateDhcpOptionsInput, opts ...request.Option) (*AssociateDhcpOptionsOutput, error) { - req, out := c.AssociateDhcpOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateIamInstanceProfile = "AssociateIamInstanceProfile" - -// AssociateIamInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the AssociateIamInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateIamInstanceProfile for more information on using the AssociateIamInstanceProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateIamInstanceProfileRequest method. -// req, resp := client.AssociateIamInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateIamInstanceProfile -func (c *EC2) AssociateIamInstanceProfileRequest(input *AssociateIamInstanceProfileInput) (req *request.Request, output *AssociateIamInstanceProfileOutput) { - op := &request.Operation{ - Name: opAssociateIamInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateIamInstanceProfileInput{} - } - - output = &AssociateIamInstanceProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateIamInstanceProfile API operation for Amazon Elastic Compute Cloud. -// -// Associates an IAM instance profile with a running or stopped instance. You -// cannot associate more than one IAM instance profile with an instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AssociateIamInstanceProfile for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateIamInstanceProfile -func (c *EC2) AssociateIamInstanceProfile(input *AssociateIamInstanceProfileInput) (*AssociateIamInstanceProfileOutput, error) { - req, out := c.AssociateIamInstanceProfileRequest(input) - return out, req.Send() -} - -// AssociateIamInstanceProfileWithContext is the same as AssociateIamInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateIamInstanceProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AssociateIamInstanceProfileWithContext(ctx aws.Context, input *AssociateIamInstanceProfileInput, opts ...request.Option) (*AssociateIamInstanceProfileOutput, error) { - req, out := c.AssociateIamInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateRouteTable = "AssociateRouteTable" - -// AssociateRouteTableRequest generates a "aws/request.Request" representing the -// client's request for the AssociateRouteTable operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateRouteTable for more information on using the AssociateRouteTable -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateRouteTableRequest method. -// req, resp := client.AssociateRouteTableRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTable -func (c *EC2) AssociateRouteTableRequest(input *AssociateRouteTableInput) (req *request.Request, output *AssociateRouteTableOutput) { - op := &request.Operation{ - Name: opAssociateRouteTable, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateRouteTableInput{} - } - - output = &AssociateRouteTableOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateRouteTable API operation for Amazon Elastic Compute Cloud. -// -// Associates a subnet with a route table. The subnet and route table must be -// in the same VPC. This association causes traffic originating from the subnet -// to be routed according to the routes in the route table. The action returns -// an association ID, which you need in order to disassociate the route table -// from the subnet later. A route table can be associated with multiple subnets. -// -// For more information, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AssociateRouteTable for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTable -func (c *EC2) AssociateRouteTable(input *AssociateRouteTableInput) (*AssociateRouteTableOutput, error) { - req, out := c.AssociateRouteTableRequest(input) - return out, req.Send() -} - -// AssociateRouteTableWithContext is the same as AssociateRouteTable with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateRouteTable for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AssociateRouteTableWithContext(ctx aws.Context, input *AssociateRouteTableInput, opts ...request.Option) (*AssociateRouteTableOutput, error) { - req, out := c.AssociateRouteTableRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateSubnetCidrBlock = "AssociateSubnetCidrBlock" - -// AssociateSubnetCidrBlockRequest generates a "aws/request.Request" representing the -// client's request for the AssociateSubnetCidrBlock operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateSubnetCidrBlock for more information on using the AssociateSubnetCidrBlock -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateSubnetCidrBlockRequest method. -// req, resp := client.AssociateSubnetCidrBlockRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateSubnetCidrBlock -func (c *EC2) AssociateSubnetCidrBlockRequest(input *AssociateSubnetCidrBlockInput) (req *request.Request, output *AssociateSubnetCidrBlockOutput) { - op := &request.Operation{ - Name: opAssociateSubnetCidrBlock, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateSubnetCidrBlockInput{} - } - - output = &AssociateSubnetCidrBlockOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateSubnetCidrBlock API operation for Amazon Elastic Compute Cloud. -// -// Associates a CIDR block with your subnet. You can only associate a single -// IPv6 CIDR block with your subnet. An IPv6 CIDR block must have a prefix length -// of /64. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AssociateSubnetCidrBlock for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateSubnetCidrBlock -func (c *EC2) AssociateSubnetCidrBlock(input *AssociateSubnetCidrBlockInput) (*AssociateSubnetCidrBlockOutput, error) { - req, out := c.AssociateSubnetCidrBlockRequest(input) - return out, req.Send() -} - -// AssociateSubnetCidrBlockWithContext is the same as AssociateSubnetCidrBlock with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateSubnetCidrBlock for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AssociateSubnetCidrBlockWithContext(ctx aws.Context, input *AssociateSubnetCidrBlockInput, opts ...request.Option) (*AssociateSubnetCidrBlockOutput, error) { - req, out := c.AssociateSubnetCidrBlockRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateTransitGatewayRouteTable = "AssociateTransitGatewayRouteTable" - -// AssociateTransitGatewayRouteTableRequest generates a "aws/request.Request" representing the -// client's request for the AssociateTransitGatewayRouteTable operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateTransitGatewayRouteTable for more information on using the AssociateTransitGatewayRouteTable -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateTransitGatewayRouteTableRequest method. -// req, resp := client.AssociateTransitGatewayRouteTableRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateTransitGatewayRouteTable -func (c *EC2) AssociateTransitGatewayRouteTableRequest(input *AssociateTransitGatewayRouteTableInput) (req *request.Request, output *AssociateTransitGatewayRouteTableOutput) { - op := &request.Operation{ - Name: opAssociateTransitGatewayRouteTable, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateTransitGatewayRouteTableInput{} - } - - output = &AssociateTransitGatewayRouteTableOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateTransitGatewayRouteTable API operation for Amazon Elastic Compute Cloud. -// -// Associates the specified attachment with the specified transit gateway route -// table. You can associate only one route table with an attachment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AssociateTransitGatewayRouteTable for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateTransitGatewayRouteTable -func (c *EC2) AssociateTransitGatewayRouteTable(input *AssociateTransitGatewayRouteTableInput) (*AssociateTransitGatewayRouteTableOutput, error) { - req, out := c.AssociateTransitGatewayRouteTableRequest(input) - return out, req.Send() -} - -// AssociateTransitGatewayRouteTableWithContext is the same as AssociateTransitGatewayRouteTable with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateTransitGatewayRouteTable for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AssociateTransitGatewayRouteTableWithContext(ctx aws.Context, input *AssociateTransitGatewayRouteTableInput, opts ...request.Option) (*AssociateTransitGatewayRouteTableOutput, error) { - req, out := c.AssociateTransitGatewayRouteTableRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateVpcCidrBlock = "AssociateVpcCidrBlock" - -// AssociateVpcCidrBlockRequest generates a "aws/request.Request" representing the -// client's request for the AssociateVpcCidrBlock operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateVpcCidrBlock for more information on using the AssociateVpcCidrBlock -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateVpcCidrBlockRequest method. -// req, resp := client.AssociateVpcCidrBlockRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateVpcCidrBlock -func (c *EC2) AssociateVpcCidrBlockRequest(input *AssociateVpcCidrBlockInput) (req *request.Request, output *AssociateVpcCidrBlockOutput) { - op := &request.Operation{ - Name: opAssociateVpcCidrBlock, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateVpcCidrBlockInput{} - } - - output = &AssociateVpcCidrBlockOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateVpcCidrBlock API operation for Amazon Elastic Compute Cloud. -// -// Associates a CIDR block with your VPC. You can associate a secondary IPv4 -// CIDR block, or you can associate an Amazon-provided IPv6 CIDR block. The -// IPv6 CIDR block size is fixed at /56. -// -// For more information about associating CIDR blocks with your VPC and applicable -// restrictions, see VPC and Subnet Sizing (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html#VPC_Sizing) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AssociateVpcCidrBlock for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateVpcCidrBlock -func (c *EC2) AssociateVpcCidrBlock(input *AssociateVpcCidrBlockInput) (*AssociateVpcCidrBlockOutput, error) { - req, out := c.AssociateVpcCidrBlockRequest(input) - return out, req.Send() -} - -// AssociateVpcCidrBlockWithContext is the same as AssociateVpcCidrBlock with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateVpcCidrBlock for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AssociateVpcCidrBlockWithContext(ctx aws.Context, input *AssociateVpcCidrBlockInput, opts ...request.Option) (*AssociateVpcCidrBlockOutput, error) { - req, out := c.AssociateVpcCidrBlockRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachClassicLinkVpc = "AttachClassicLinkVpc" - -// AttachClassicLinkVpcRequest generates a "aws/request.Request" representing the -// client's request for the AttachClassicLinkVpc operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachClassicLinkVpc for more information on using the AttachClassicLinkVpc -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachClassicLinkVpcRequest method. -// req, resp := client.AttachClassicLinkVpcRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpc -func (c *EC2) AttachClassicLinkVpcRequest(input *AttachClassicLinkVpcInput) (req *request.Request, output *AttachClassicLinkVpcOutput) { - op := &request.Operation{ - Name: opAttachClassicLinkVpc, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachClassicLinkVpcInput{} - } - - output = &AttachClassicLinkVpcOutput{} - req = c.newRequest(op, input, output) - return -} - -// AttachClassicLinkVpc API operation for Amazon Elastic Compute Cloud. -// -// Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or -// more of the VPC's security groups. You cannot link an EC2-Classic instance -// to more than one VPC at a time. You can only link an instance that's in the -// running state. An instance is automatically unlinked from a VPC when it's -// stopped - you can link it to the VPC again when you restart it. -// -// After you've linked an instance, you cannot change the VPC security groups -// that are associated with it. To change the security groups, you must first -// unlink the instance, and then link it again. -// -// Linking your instance to a VPC is sometimes referred to as attaching your -// instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AttachClassicLinkVpc for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpc -func (c *EC2) AttachClassicLinkVpc(input *AttachClassicLinkVpcInput) (*AttachClassicLinkVpcOutput, error) { - req, out := c.AttachClassicLinkVpcRequest(input) - return out, req.Send() -} - -// AttachClassicLinkVpcWithContext is the same as AttachClassicLinkVpc with the addition of -// the ability to pass a context and additional request options. -// -// See AttachClassicLinkVpc for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AttachClassicLinkVpcWithContext(ctx aws.Context, input *AttachClassicLinkVpcInput, opts ...request.Option) (*AttachClassicLinkVpcOutput, error) { - req, out := c.AttachClassicLinkVpcRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachInternetGateway = "AttachInternetGateway" - -// AttachInternetGatewayRequest generates a "aws/request.Request" representing the -// client's request for the AttachInternetGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachInternetGateway for more information on using the AttachInternetGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachInternetGatewayRequest method. -// req, resp := client.AttachInternetGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGateway -func (c *EC2) AttachInternetGatewayRequest(input *AttachInternetGatewayInput) (req *request.Request, output *AttachInternetGatewayOutput) { - op := &request.Operation{ - Name: opAttachInternetGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachInternetGatewayInput{} - } - - output = &AttachInternetGatewayOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachInternetGateway API operation for Amazon Elastic Compute Cloud. -// -// Attaches an internet gateway to a VPC, enabling connectivity between the -// internet and the VPC. For more information about your VPC and internet gateway, -// see the Amazon Virtual Private Cloud User Guide (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AttachInternetGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGateway -func (c *EC2) AttachInternetGateway(input *AttachInternetGatewayInput) (*AttachInternetGatewayOutput, error) { - req, out := c.AttachInternetGatewayRequest(input) - return out, req.Send() -} - -// AttachInternetGatewayWithContext is the same as AttachInternetGateway with the addition of -// the ability to pass a context and additional request options. -// -// See AttachInternetGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AttachInternetGatewayWithContext(ctx aws.Context, input *AttachInternetGatewayInput, opts ...request.Option) (*AttachInternetGatewayOutput, error) { - req, out := c.AttachInternetGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachNetworkInterface = "AttachNetworkInterface" - -// AttachNetworkInterfaceRequest generates a "aws/request.Request" representing the -// client's request for the AttachNetworkInterface operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachNetworkInterface for more information on using the AttachNetworkInterface -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachNetworkInterfaceRequest method. -// req, resp := client.AttachNetworkInterfaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterface -func (c *EC2) AttachNetworkInterfaceRequest(input *AttachNetworkInterfaceInput) (req *request.Request, output *AttachNetworkInterfaceOutput) { - op := &request.Operation{ - Name: opAttachNetworkInterface, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachNetworkInterfaceInput{} - } - - output = &AttachNetworkInterfaceOutput{} - req = c.newRequest(op, input, output) - return -} - -// AttachNetworkInterface API operation for Amazon Elastic Compute Cloud. -// -// Attaches a network interface to an instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AttachNetworkInterface for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterface -func (c *EC2) AttachNetworkInterface(input *AttachNetworkInterfaceInput) (*AttachNetworkInterfaceOutput, error) { - req, out := c.AttachNetworkInterfaceRequest(input) - return out, req.Send() -} - -// AttachNetworkInterfaceWithContext is the same as AttachNetworkInterface with the addition of -// the ability to pass a context and additional request options. -// -// See AttachNetworkInterface for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AttachNetworkInterfaceWithContext(ctx aws.Context, input *AttachNetworkInterfaceInput, opts ...request.Option) (*AttachNetworkInterfaceOutput, error) { - req, out := c.AttachNetworkInterfaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachVolume = "AttachVolume" - -// AttachVolumeRequest generates a "aws/request.Request" representing the -// client's request for the AttachVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachVolume for more information on using the AttachVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachVolumeRequest method. -// req, resp := client.AttachVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolume -func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Request, output *VolumeAttachment) { - op := &request.Operation{ - Name: opAttachVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachVolumeInput{} - } - - output = &VolumeAttachment{} - req = c.newRequest(op, input, output) - return -} - -// AttachVolume API operation for Amazon Elastic Compute Cloud. -// -// Attaches an EBS volume to a running or stopped instance and exposes it to -// the instance with the specified device name. -// -// Encrypted EBS volumes may only be attached to instances that support Amazon -// EBS encryption. For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// For a list of supported device names, see Attaching an EBS Volume to an Instance -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html). -// Any device names that aren't reserved for instance store volumes can be used -// for EBS volumes. For more information, see Amazon EC2 Instance Store (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// If a volume has an AWS Marketplace product code: -// -// * The volume can be attached only to a stopped instance. -// -// * AWS Marketplace product codes are copied from the volume to the instance. -// -// * You must be subscribed to the product. -// -// * The instance type and operating system of the instance must support -// the product. For example, you can't detach a volume from a Windows instance -// and attach it to a Linux instance. -// -// For more information about EBS volumes, see Attaching Amazon EBS Volumes -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AttachVolume for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolume -func (c *EC2) AttachVolume(input *AttachVolumeInput) (*VolumeAttachment, error) { - req, out := c.AttachVolumeRequest(input) - return out, req.Send() -} - -// AttachVolumeWithContext is the same as AttachVolume with the addition of -// the ability to pass a context and additional request options. -// -// See AttachVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AttachVolumeWithContext(ctx aws.Context, input *AttachVolumeInput, opts ...request.Option) (*VolumeAttachment, error) { - req, out := c.AttachVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachVpnGateway = "AttachVpnGateway" - -// AttachVpnGatewayRequest generates a "aws/request.Request" representing the -// client's request for the AttachVpnGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachVpnGateway for more information on using the AttachVpnGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachVpnGatewayRequest method. -// req, resp := client.AttachVpnGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway -func (c *EC2) AttachVpnGatewayRequest(input *AttachVpnGatewayInput) (req *request.Request, output *AttachVpnGatewayOutput) { - op := &request.Operation{ - Name: opAttachVpnGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachVpnGatewayInput{} - } - - output = &AttachVpnGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// AttachVpnGateway API operation for Amazon Elastic Compute Cloud. -// -// Attaches a virtual private gateway to a VPC. You can attach one virtual private -// gateway to one VPC at a time. -// -// For more information, see AWS Managed VPN Connections (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AttachVpnGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway -func (c *EC2) AttachVpnGateway(input *AttachVpnGatewayInput) (*AttachVpnGatewayOutput, error) { - req, out := c.AttachVpnGatewayRequest(input) - return out, req.Send() -} - -// AttachVpnGatewayWithContext is the same as AttachVpnGateway with the addition of -// the ability to pass a context and additional request options. -// -// See AttachVpnGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AttachVpnGatewayWithContext(ctx aws.Context, input *AttachVpnGatewayInput, opts ...request.Option) (*AttachVpnGatewayOutput, error) { - req, out := c.AttachVpnGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAuthorizeClientVpnIngress = "AuthorizeClientVpnIngress" - -// AuthorizeClientVpnIngressRequest generates a "aws/request.Request" representing the -// client's request for the AuthorizeClientVpnIngress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AuthorizeClientVpnIngress for more information on using the AuthorizeClientVpnIngress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AuthorizeClientVpnIngressRequest method. -// req, resp := client.AuthorizeClientVpnIngressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeClientVpnIngress -func (c *EC2) AuthorizeClientVpnIngressRequest(input *AuthorizeClientVpnIngressInput) (req *request.Request, output *AuthorizeClientVpnIngressOutput) { - op := &request.Operation{ - Name: opAuthorizeClientVpnIngress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AuthorizeClientVpnIngressInput{} - } - - output = &AuthorizeClientVpnIngressOutput{} - req = c.newRequest(op, input, output) - return -} - -// AuthorizeClientVpnIngress API operation for Amazon Elastic Compute Cloud. -// -// Adds an ingress authorization rule to a Client VPN endpoint. Ingress authorization -// rules act as firewall rules that grant access to networks. You must configure -// ingress authorization rules to enable clients to access resources in AWS -// or on-premises networks. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AuthorizeClientVpnIngress for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeClientVpnIngress -func (c *EC2) AuthorizeClientVpnIngress(input *AuthorizeClientVpnIngressInput) (*AuthorizeClientVpnIngressOutput, error) { - req, out := c.AuthorizeClientVpnIngressRequest(input) - return out, req.Send() -} - -// AuthorizeClientVpnIngressWithContext is the same as AuthorizeClientVpnIngress with the addition of -// the ability to pass a context and additional request options. -// -// See AuthorizeClientVpnIngress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AuthorizeClientVpnIngressWithContext(ctx aws.Context, input *AuthorizeClientVpnIngressInput, opts ...request.Option) (*AuthorizeClientVpnIngressOutput, error) { - req, out := c.AuthorizeClientVpnIngressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAuthorizeSecurityGroupEgress = "AuthorizeSecurityGroupEgress" - -// AuthorizeSecurityGroupEgressRequest generates a "aws/request.Request" representing the -// client's request for the AuthorizeSecurityGroupEgress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AuthorizeSecurityGroupEgress for more information on using the AuthorizeSecurityGroupEgress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AuthorizeSecurityGroupEgressRequest method. -// req, resp := client.AuthorizeSecurityGroupEgressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgress -func (c *EC2) AuthorizeSecurityGroupEgressRequest(input *AuthorizeSecurityGroupEgressInput) (req *request.Request, output *AuthorizeSecurityGroupEgressOutput) { - op := &request.Operation{ - Name: opAuthorizeSecurityGroupEgress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AuthorizeSecurityGroupEgressInput{} - } - - output = &AuthorizeSecurityGroupEgressOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AuthorizeSecurityGroupEgress API operation for Amazon Elastic Compute Cloud. -// -// [EC2-VPC only] Adds one or more egress rules to a security group for use -// with a VPC. Specifically, this action permits instances to send traffic to -// one or more destination IPv4 or IPv6 CIDR address ranges, or to one or more -// destination security groups for the same VPC. This action doesn't apply to -// security groups for use in EC2-Classic. For more information, see Security -// Groups for Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html) -// in the Amazon Virtual Private Cloud User Guide. For more information about -// security group limits, see Amazon VPC Limits (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html). -// -// Each rule consists of the protocol (for example, TCP), plus either a CIDR -// range or a source group. For the TCP and UDP protocols, you must also specify -// the destination port or port range. For the ICMP protocol, you must also -// specify the ICMP type and code. You can use -1 for the type or code to mean -// all types or all codes. You can optionally specify a description for the -// rule. -// -// Rule changes are propagated to affected instances as quickly as possible. -// However, a small delay might occur. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AuthorizeSecurityGroupEgress for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgress -func (c *EC2) AuthorizeSecurityGroupEgress(input *AuthorizeSecurityGroupEgressInput) (*AuthorizeSecurityGroupEgressOutput, error) { - req, out := c.AuthorizeSecurityGroupEgressRequest(input) - return out, req.Send() -} - -// AuthorizeSecurityGroupEgressWithContext is the same as AuthorizeSecurityGroupEgress with the addition of -// the ability to pass a context and additional request options. -// -// See AuthorizeSecurityGroupEgress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AuthorizeSecurityGroupEgressWithContext(ctx aws.Context, input *AuthorizeSecurityGroupEgressInput, opts ...request.Option) (*AuthorizeSecurityGroupEgressOutput, error) { - req, out := c.AuthorizeSecurityGroupEgressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAuthorizeSecurityGroupIngress = "AuthorizeSecurityGroupIngress" - -// AuthorizeSecurityGroupIngressRequest generates a "aws/request.Request" representing the -// client's request for the AuthorizeSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AuthorizeSecurityGroupIngress for more information on using the AuthorizeSecurityGroupIngress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AuthorizeSecurityGroupIngressRequest method. -// req, resp := client.AuthorizeSecurityGroupIngressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngress -func (c *EC2) AuthorizeSecurityGroupIngressRequest(input *AuthorizeSecurityGroupIngressInput) (req *request.Request, output *AuthorizeSecurityGroupIngressOutput) { - op := &request.Operation{ - Name: opAuthorizeSecurityGroupIngress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AuthorizeSecurityGroupIngressInput{} - } - - output = &AuthorizeSecurityGroupIngressOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AuthorizeSecurityGroupIngress API operation for Amazon Elastic Compute Cloud. -// -// Adds one or more ingress rules to a security group. -// -// Rule changes are propagated to instances within the security group as quickly -// as possible. However, a small delay might occur. -// -// [EC2-Classic] This action gives one or more IPv4 CIDR address ranges permission -// to access a security group in your account, or gives one or more security -// groups (called the source groups) permission to access a security group for -// your account. A source group can be for your own AWS account, or another. -// You can have up to 100 rules per group. -// -// [EC2-VPC] This action gives one or more IPv4 or IPv6 CIDR address ranges -// permission to access a security group in your VPC, or gives one or more other -// security groups (called the source groups) permission to access a security -// group for your VPC. The security groups must all be for the same VPC or a -// peer VPC in a VPC peering connection. For more information about VPC security -// group limits, see Amazon VPC Limits (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html). -// -// You can optionally specify a description for the security group rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation AuthorizeSecurityGroupIngress for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngress -func (c *EC2) AuthorizeSecurityGroupIngress(input *AuthorizeSecurityGroupIngressInput) (*AuthorizeSecurityGroupIngressOutput, error) { - req, out := c.AuthorizeSecurityGroupIngressRequest(input) - return out, req.Send() -} - -// AuthorizeSecurityGroupIngressWithContext is the same as AuthorizeSecurityGroupIngress with the addition of -// the ability to pass a context and additional request options. -// -// See AuthorizeSecurityGroupIngress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) AuthorizeSecurityGroupIngressWithContext(ctx aws.Context, input *AuthorizeSecurityGroupIngressInput, opts ...request.Option) (*AuthorizeSecurityGroupIngressOutput, error) { - req, out := c.AuthorizeSecurityGroupIngressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBundleInstance = "BundleInstance" - -// BundleInstanceRequest generates a "aws/request.Request" representing the -// client's request for the BundleInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BundleInstance for more information on using the BundleInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BundleInstanceRequest method. -// req, resp := client.BundleInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleInstance -func (c *EC2) BundleInstanceRequest(input *BundleInstanceInput) (req *request.Request, output *BundleInstanceOutput) { - op := &request.Operation{ - Name: opBundleInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BundleInstanceInput{} - } - - output = &BundleInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// BundleInstance API operation for Amazon Elastic Compute Cloud. -// -// Bundles an Amazon instance store-backed Windows instance. -// -// During bundling, only the root device volume (C:\) is bundled. Data on other -// instance store volumes is not preserved. -// -// This action is not applicable for Linux/Unix instances or Windows instances -// that are backed by Amazon EBS. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation BundleInstance for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleInstance -func (c *EC2) BundleInstance(input *BundleInstanceInput) (*BundleInstanceOutput, error) { - req, out := c.BundleInstanceRequest(input) - return out, req.Send() -} - -// BundleInstanceWithContext is the same as BundleInstance with the addition of -// the ability to pass a context and additional request options. -// -// See BundleInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) BundleInstanceWithContext(ctx aws.Context, input *BundleInstanceInput, opts ...request.Option) (*BundleInstanceOutput, error) { - req, out := c.BundleInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelBundleTask = "CancelBundleTask" - -// CancelBundleTaskRequest generates a "aws/request.Request" representing the -// client's request for the CancelBundleTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelBundleTask for more information on using the CancelBundleTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelBundleTaskRequest method. -// req, resp := client.CancelBundleTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelBundleTask -func (c *EC2) CancelBundleTaskRequest(input *CancelBundleTaskInput) (req *request.Request, output *CancelBundleTaskOutput) { - op := &request.Operation{ - Name: opCancelBundleTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelBundleTaskInput{} - } - - output = &CancelBundleTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelBundleTask API operation for Amazon Elastic Compute Cloud. -// -// Cancels a bundling operation for an instance store-backed Windows instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CancelBundleTask for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelBundleTask -func (c *EC2) CancelBundleTask(input *CancelBundleTaskInput) (*CancelBundleTaskOutput, error) { - req, out := c.CancelBundleTaskRequest(input) - return out, req.Send() -} - -// CancelBundleTaskWithContext is the same as CancelBundleTask with the addition of -// the ability to pass a context and additional request options. -// -// See CancelBundleTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CancelBundleTaskWithContext(ctx aws.Context, input *CancelBundleTaskInput, opts ...request.Option) (*CancelBundleTaskOutput, error) { - req, out := c.CancelBundleTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelCapacityReservation = "CancelCapacityReservation" - -// CancelCapacityReservationRequest generates a "aws/request.Request" representing the -// client's request for the CancelCapacityReservation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelCapacityReservation for more information on using the CancelCapacityReservation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelCapacityReservationRequest method. -// req, resp := client.CancelCapacityReservationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelCapacityReservation -func (c *EC2) CancelCapacityReservationRequest(input *CancelCapacityReservationInput) (req *request.Request, output *CancelCapacityReservationOutput) { - op := &request.Operation{ - Name: opCancelCapacityReservation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelCapacityReservationInput{} - } - - output = &CancelCapacityReservationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelCapacityReservation API operation for Amazon Elastic Compute Cloud. -// -// Cancels the specified Capacity Reservation, releases the reserved capacity, -// and changes the Capacity Reservation's state to cancelled. -// -// Instances running in the reserved capacity continue running until you stop -// them. Stopped instances that target the Capacity Reservation can no longer -// launch. Modify these instances to either target a different Capacity Reservation, -// launch On-Demand Instance capacity, or run in any open Capacity Reservation -// that has matching attributes and sufficient capacity. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CancelCapacityReservation for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelCapacityReservation -func (c *EC2) CancelCapacityReservation(input *CancelCapacityReservationInput) (*CancelCapacityReservationOutput, error) { - req, out := c.CancelCapacityReservationRequest(input) - return out, req.Send() -} - -// CancelCapacityReservationWithContext is the same as CancelCapacityReservation with the addition of -// the ability to pass a context and additional request options. -// -// See CancelCapacityReservation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CancelCapacityReservationWithContext(ctx aws.Context, input *CancelCapacityReservationInput, opts ...request.Option) (*CancelCapacityReservationOutput, error) { - req, out := c.CancelCapacityReservationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelConversionTask = "CancelConversionTask" - -// CancelConversionTaskRequest generates a "aws/request.Request" representing the -// client's request for the CancelConversionTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelConversionTask for more information on using the CancelConversionTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelConversionTaskRequest method. -// req, resp := client.CancelConversionTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelConversionTask -func (c *EC2) CancelConversionTaskRequest(input *CancelConversionTaskInput) (req *request.Request, output *CancelConversionTaskOutput) { - op := &request.Operation{ - Name: opCancelConversionTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelConversionTaskInput{} - } - - output = &CancelConversionTaskOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CancelConversionTask API operation for Amazon Elastic Compute Cloud. -// -// Cancels an active conversion task. The task can be the import of an instance -// or volume. The action removes all artifacts of the conversion, including -// a partially uploaded volume or instance. If the conversion is complete or -// is in the process of transferring the final disk image, the command fails -// and returns an exception. -// -// For more information, see Importing a Virtual Machine Using the Amazon EC2 -// CLI (http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-vmimport-export.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CancelConversionTask for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelConversionTask -func (c *EC2) CancelConversionTask(input *CancelConversionTaskInput) (*CancelConversionTaskOutput, error) { - req, out := c.CancelConversionTaskRequest(input) - return out, req.Send() -} - -// CancelConversionTaskWithContext is the same as CancelConversionTask with the addition of -// the ability to pass a context and additional request options. -// -// See CancelConversionTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CancelConversionTaskWithContext(ctx aws.Context, input *CancelConversionTaskInput, opts ...request.Option) (*CancelConversionTaskOutput, error) { - req, out := c.CancelConversionTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelExportTask = "CancelExportTask" - -// CancelExportTaskRequest generates a "aws/request.Request" representing the -// client's request for the CancelExportTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelExportTask for more information on using the CancelExportTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelExportTaskRequest method. -// req, resp := client.CancelExportTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelExportTask -func (c *EC2) CancelExportTaskRequest(input *CancelExportTaskInput) (req *request.Request, output *CancelExportTaskOutput) { - op := &request.Operation{ - Name: opCancelExportTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelExportTaskInput{} - } - - output = &CancelExportTaskOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CancelExportTask API operation for Amazon Elastic Compute Cloud. -// -// Cancels an active export task. The request removes all artifacts of the export, -// including any partially-created Amazon S3 objects. If the export task is -// complete or is in the process of transferring the final disk image, the command -// fails and returns an error. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CancelExportTask for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelExportTask -func (c *EC2) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskOutput, error) { - req, out := c.CancelExportTaskRequest(input) - return out, req.Send() -} - -// CancelExportTaskWithContext is the same as CancelExportTask with the addition of -// the ability to pass a context and additional request options. -// -// See CancelExportTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CancelExportTaskWithContext(ctx aws.Context, input *CancelExportTaskInput, opts ...request.Option) (*CancelExportTaskOutput, error) { - req, out := c.CancelExportTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelImportTask = "CancelImportTask" - -// CancelImportTaskRequest generates a "aws/request.Request" representing the -// client's request for the CancelImportTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelImportTask for more information on using the CancelImportTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelImportTaskRequest method. -// req, resp := client.CancelImportTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelImportTask -func (c *EC2) CancelImportTaskRequest(input *CancelImportTaskInput) (req *request.Request, output *CancelImportTaskOutput) { - op := &request.Operation{ - Name: opCancelImportTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelImportTaskInput{} - } - - output = &CancelImportTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelImportTask API operation for Amazon Elastic Compute Cloud. -// -// Cancels an in-process import virtual machine or import snapshot task. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CancelImportTask for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelImportTask -func (c *EC2) CancelImportTask(input *CancelImportTaskInput) (*CancelImportTaskOutput, error) { - req, out := c.CancelImportTaskRequest(input) - return out, req.Send() -} - -// CancelImportTaskWithContext is the same as CancelImportTask with the addition of -// the ability to pass a context and additional request options. -// -// See CancelImportTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CancelImportTaskWithContext(ctx aws.Context, input *CancelImportTaskInput, opts ...request.Option) (*CancelImportTaskOutput, error) { - req, out := c.CancelImportTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelReservedInstancesListing = "CancelReservedInstancesListing" - -// CancelReservedInstancesListingRequest generates a "aws/request.Request" representing the -// client's request for the CancelReservedInstancesListing operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelReservedInstancesListing for more information on using the CancelReservedInstancesListing -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelReservedInstancesListingRequest method. -// req, resp := client.CancelReservedInstancesListingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelReservedInstancesListing -func (c *EC2) CancelReservedInstancesListingRequest(input *CancelReservedInstancesListingInput) (req *request.Request, output *CancelReservedInstancesListingOutput) { - op := &request.Operation{ - Name: opCancelReservedInstancesListing, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelReservedInstancesListingInput{} - } - - output = &CancelReservedInstancesListingOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelReservedInstancesListing API operation for Amazon Elastic Compute Cloud. -// -// Cancels the specified Reserved Instance listing in the Reserved Instance -// Marketplace. -// -// For more information, see Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CancelReservedInstancesListing for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelReservedInstancesListing -func (c *EC2) CancelReservedInstancesListing(input *CancelReservedInstancesListingInput) (*CancelReservedInstancesListingOutput, error) { - req, out := c.CancelReservedInstancesListingRequest(input) - return out, req.Send() -} - -// CancelReservedInstancesListingWithContext is the same as CancelReservedInstancesListing with the addition of -// the ability to pass a context and additional request options. -// -// See CancelReservedInstancesListing for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CancelReservedInstancesListingWithContext(ctx aws.Context, input *CancelReservedInstancesListingInput, opts ...request.Option) (*CancelReservedInstancesListingOutput, error) { - req, out := c.CancelReservedInstancesListingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelSpotFleetRequests = "CancelSpotFleetRequests" - -// CancelSpotFleetRequestsRequest generates a "aws/request.Request" representing the -// client's request for the CancelSpotFleetRequests operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelSpotFleetRequests for more information on using the CancelSpotFleetRequests -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelSpotFleetRequestsRequest method. -// req, resp := client.CancelSpotFleetRequestsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequests -func (c *EC2) CancelSpotFleetRequestsRequest(input *CancelSpotFleetRequestsInput) (req *request.Request, output *CancelSpotFleetRequestsOutput) { - op := &request.Operation{ - Name: opCancelSpotFleetRequests, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelSpotFleetRequestsInput{} - } - - output = &CancelSpotFleetRequestsOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelSpotFleetRequests API operation for Amazon Elastic Compute Cloud. -// -// Cancels the specified Spot Fleet requests. -// -// After you cancel a Spot Fleet request, the Spot Fleet launches no new Spot -// Instances. You must specify whether the Spot Fleet should also terminate -// its Spot Instances. If you terminate the instances, the Spot Fleet request -// enters the cancelled_terminating state. Otherwise, the Spot Fleet request -// enters the cancelled_running state and the instances continue to run until -// they are interrupted or you terminate them manually. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CancelSpotFleetRequests for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequests -func (c *EC2) CancelSpotFleetRequests(input *CancelSpotFleetRequestsInput) (*CancelSpotFleetRequestsOutput, error) { - req, out := c.CancelSpotFleetRequestsRequest(input) - return out, req.Send() -} - -// CancelSpotFleetRequestsWithContext is the same as CancelSpotFleetRequests with the addition of -// the ability to pass a context and additional request options. -// -// See CancelSpotFleetRequests for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CancelSpotFleetRequestsWithContext(ctx aws.Context, input *CancelSpotFleetRequestsInput, opts ...request.Option) (*CancelSpotFleetRequestsOutput, error) { - req, out := c.CancelSpotFleetRequestsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelSpotInstanceRequests = "CancelSpotInstanceRequests" - -// CancelSpotInstanceRequestsRequest generates a "aws/request.Request" representing the -// client's request for the CancelSpotInstanceRequests operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelSpotInstanceRequests for more information on using the CancelSpotInstanceRequests -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelSpotInstanceRequestsRequest method. -// req, resp := client.CancelSpotInstanceRequestsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotInstanceRequests -func (c *EC2) CancelSpotInstanceRequestsRequest(input *CancelSpotInstanceRequestsInput) (req *request.Request, output *CancelSpotInstanceRequestsOutput) { - op := &request.Operation{ - Name: opCancelSpotInstanceRequests, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelSpotInstanceRequestsInput{} - } - - output = &CancelSpotInstanceRequestsOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelSpotInstanceRequests API operation for Amazon Elastic Compute Cloud. -// -// Cancels one or more Spot Instance requests. -// -// Canceling a Spot Instance request does not terminate running Spot Instances -// associated with the request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CancelSpotInstanceRequests for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotInstanceRequests -func (c *EC2) CancelSpotInstanceRequests(input *CancelSpotInstanceRequestsInput) (*CancelSpotInstanceRequestsOutput, error) { - req, out := c.CancelSpotInstanceRequestsRequest(input) - return out, req.Send() -} - -// CancelSpotInstanceRequestsWithContext is the same as CancelSpotInstanceRequests with the addition of -// the ability to pass a context and additional request options. -// -// See CancelSpotInstanceRequests for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CancelSpotInstanceRequestsWithContext(ctx aws.Context, input *CancelSpotInstanceRequestsInput, opts ...request.Option) (*CancelSpotInstanceRequestsOutput, error) { - req, out := c.CancelSpotInstanceRequestsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opConfirmProductInstance = "ConfirmProductInstance" - -// ConfirmProductInstanceRequest generates a "aws/request.Request" representing the -// client's request for the ConfirmProductInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ConfirmProductInstance for more information on using the ConfirmProductInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ConfirmProductInstanceRequest method. -// req, resp := client.ConfirmProductInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstance -func (c *EC2) ConfirmProductInstanceRequest(input *ConfirmProductInstanceInput) (req *request.Request, output *ConfirmProductInstanceOutput) { - op := &request.Operation{ - Name: opConfirmProductInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ConfirmProductInstanceInput{} - } - - output = &ConfirmProductInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ConfirmProductInstance API operation for Amazon Elastic Compute Cloud. -// -// Determines whether a product code is associated with an instance. This action -// can only be used by the owner of the product code. It is useful when a product -// code owner must verify whether another user's instance is eligible for support. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ConfirmProductInstance for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstance -func (c *EC2) ConfirmProductInstance(input *ConfirmProductInstanceInput) (*ConfirmProductInstanceOutput, error) { - req, out := c.ConfirmProductInstanceRequest(input) - return out, req.Send() -} - -// ConfirmProductInstanceWithContext is the same as ConfirmProductInstance with the addition of -// the ability to pass a context and additional request options. -// -// See ConfirmProductInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ConfirmProductInstanceWithContext(ctx aws.Context, input *ConfirmProductInstanceInput, opts ...request.Option) (*ConfirmProductInstanceOutput, error) { - req, out := c.ConfirmProductInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyFpgaImage = "CopyFpgaImage" - -// CopyFpgaImageRequest generates a "aws/request.Request" representing the -// client's request for the CopyFpgaImage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyFpgaImage for more information on using the CopyFpgaImage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyFpgaImageRequest method. -// req, resp := client.CopyFpgaImageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyFpgaImage -func (c *EC2) CopyFpgaImageRequest(input *CopyFpgaImageInput) (req *request.Request, output *CopyFpgaImageOutput) { - op := &request.Operation{ - Name: opCopyFpgaImage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyFpgaImageInput{} - } - - output = &CopyFpgaImageOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyFpgaImage API operation for Amazon Elastic Compute Cloud. -// -// Copies the specified Amazon FPGA Image (AFI) to the current region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CopyFpgaImage for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyFpgaImage -func (c *EC2) CopyFpgaImage(input *CopyFpgaImageInput) (*CopyFpgaImageOutput, error) { - req, out := c.CopyFpgaImageRequest(input) - return out, req.Send() -} - -// CopyFpgaImageWithContext is the same as CopyFpgaImage with the addition of -// the ability to pass a context and additional request options. -// -// See CopyFpgaImage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CopyFpgaImageWithContext(ctx aws.Context, input *CopyFpgaImageInput, opts ...request.Option) (*CopyFpgaImageOutput, error) { - req, out := c.CopyFpgaImageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyImage = "CopyImage" - -// CopyImageRequest generates a "aws/request.Request" representing the -// client's request for the CopyImage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyImage for more information on using the CopyImage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyImageRequest method. -// req, resp := client.CopyImageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImage -func (c *EC2) CopyImageRequest(input *CopyImageInput) (req *request.Request, output *CopyImageOutput) { - op := &request.Operation{ - Name: opCopyImage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyImageInput{} - } - - output = &CopyImageOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyImage API operation for Amazon Elastic Compute Cloud. -// -// Initiates the copy of an AMI from the specified source region to the current -// region. You specify the destination region by using its endpoint when making -// the request. -// -// Copies of encrypted backing snapshots for the AMI are encrypted. Copies of -// unencrypted backing snapshots remain unencrypted, unless you set Encrypted -// during the copy operation. You cannot create an unencrypted copy of an encrypted -// backing snapshot. -// -// For more information about the prerequisites and limits when copying an AMI, -// see Copying an AMI (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CopyImage for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImage -func (c *EC2) CopyImage(input *CopyImageInput) (*CopyImageOutput, error) { - req, out := c.CopyImageRequest(input) - return out, req.Send() -} - -// CopyImageWithContext is the same as CopyImage with the addition of -// the ability to pass a context and additional request options. -// -// See CopyImage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CopyImageWithContext(ctx aws.Context, input *CopyImageInput, opts ...request.Option) (*CopyImageOutput, error) { - req, out := c.CopyImageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopySnapshot = "CopySnapshot" - -// CopySnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CopySnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopySnapshot for more information on using the CopySnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopySnapshotRequest method. -// req, resp := client.CopySnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshot -func (c *EC2) CopySnapshotRequest(input *CopySnapshotInput) (req *request.Request, output *CopySnapshotOutput) { - op := &request.Operation{ - Name: opCopySnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopySnapshotInput{} - } - - output = &CopySnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopySnapshot API operation for Amazon Elastic Compute Cloud. -// -// Copies a point-in-time snapshot of an EBS volume and stores it in Amazon -// S3. You can copy the snapshot within the same region or from one region to -// another. You can use the snapshot to create EBS volumes or Amazon Machine -// Images (AMIs). The snapshot is copied to the regional endpoint that you send -// the HTTP request to. -// -// Copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted -// snapshots remain unencrypted, unless the Encrypted flag is specified during -// the snapshot copy operation. By default, encrypted snapshot copies use the -// default AWS Key Management Service (AWS KMS) customer master key (CMK); however, -// you can specify a non-default CMK with the KmsKeyId parameter. -// -// To copy an encrypted snapshot that has been shared from another account, -// you must have permissions for the CMK used to encrypt the snapshot. -// -// Snapshots created by copying another snapshot have an arbitrary volume ID -// that should not be used for any purpose. -// -// For more information, see Copying an Amazon EBS Snapshot (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CopySnapshot for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshot -func (c *EC2) CopySnapshot(input *CopySnapshotInput) (*CopySnapshotOutput, error) { - req, out := c.CopySnapshotRequest(input) - return out, req.Send() -} - -// CopySnapshotWithContext is the same as CopySnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CopySnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CopySnapshotWithContext(ctx aws.Context, input *CopySnapshotInput, opts ...request.Option) (*CopySnapshotOutput, error) { - req, out := c.CopySnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCapacityReservation = "CreateCapacityReservation" - -// CreateCapacityReservationRequest generates a "aws/request.Request" representing the -// client's request for the CreateCapacityReservation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCapacityReservation for more information on using the CreateCapacityReservation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCapacityReservationRequest method. -// req, resp := client.CreateCapacityReservationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCapacityReservation -func (c *EC2) CreateCapacityReservationRequest(input *CreateCapacityReservationInput) (req *request.Request, output *CreateCapacityReservationOutput) { - op := &request.Operation{ - Name: opCreateCapacityReservation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCapacityReservationInput{} - } - - output = &CreateCapacityReservationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCapacityReservation API operation for Amazon Elastic Compute Cloud. -// -// Creates a new Capacity Reservation with the specified attributes. -// -// Capacity Reservations enable you to reserve capacity for your Amazon EC2 -// instances in a specific Availability Zone for any duration. This gives you -// the flexibility to selectively add capacity reservations and still get the -// Regional RI discounts for that usage. By creating Capacity Reservations, -// you ensure that you always have access to Amazon EC2 capacity when you need -// it, for as long as you need it. For more information, see Capacity Reservations -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Your request to create a Capacity Reservation could fail if Amazon EC2 does -// not have sufficient capacity to fulfill the request. If your request fails -// due to Amazon EC2 capacity constraints, either try again at a later time, -// try in a different Availability Zone, or request a smaller capacity reservation. -// If your application is flexible across instance types and sizes, try to create -// a Capacity Reservation with different instance attributes. -// -// Your request could also fail if the requested quantity exceeds your On-Demand -// Instance limit for the selected instance type. If your request fails due -// to limit constraints, increase your On-Demand Instance limit for the required -// instance type and try again. For more information about increasing your instance -// limits, see Amazon EC2 Service Limits (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateCapacityReservation for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCapacityReservation -func (c *EC2) CreateCapacityReservation(input *CreateCapacityReservationInput) (*CreateCapacityReservationOutput, error) { - req, out := c.CreateCapacityReservationRequest(input) - return out, req.Send() -} - -// CreateCapacityReservationWithContext is the same as CreateCapacityReservation with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCapacityReservation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateCapacityReservationWithContext(ctx aws.Context, input *CreateCapacityReservationInput, opts ...request.Option) (*CreateCapacityReservationOutput, error) { - req, out := c.CreateCapacityReservationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateClientVpnEndpoint = "CreateClientVpnEndpoint" - -// CreateClientVpnEndpointRequest generates a "aws/request.Request" representing the -// client's request for the CreateClientVpnEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateClientVpnEndpoint for more information on using the CreateClientVpnEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateClientVpnEndpointRequest method. -// req, resp := client.CreateClientVpnEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateClientVpnEndpoint -func (c *EC2) CreateClientVpnEndpointRequest(input *CreateClientVpnEndpointInput) (req *request.Request, output *CreateClientVpnEndpointOutput) { - op := &request.Operation{ - Name: opCreateClientVpnEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateClientVpnEndpointInput{} - } - - output = &CreateClientVpnEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateClientVpnEndpoint API operation for Amazon Elastic Compute Cloud. -// -// Creates a Client VPN endpoint. A Client VPN endpoint is the resource you -// create and configure to enable and manage client VPN sessions. It is the -// destination endpoint at which all client VPN sessions are terminated. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateClientVpnEndpoint for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateClientVpnEndpoint -func (c *EC2) CreateClientVpnEndpoint(input *CreateClientVpnEndpointInput) (*CreateClientVpnEndpointOutput, error) { - req, out := c.CreateClientVpnEndpointRequest(input) - return out, req.Send() -} - -// CreateClientVpnEndpointWithContext is the same as CreateClientVpnEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See CreateClientVpnEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateClientVpnEndpointWithContext(ctx aws.Context, input *CreateClientVpnEndpointInput, opts ...request.Option) (*CreateClientVpnEndpointOutput, error) { - req, out := c.CreateClientVpnEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateClientVpnRoute = "CreateClientVpnRoute" - -// CreateClientVpnRouteRequest generates a "aws/request.Request" representing the -// client's request for the CreateClientVpnRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateClientVpnRoute for more information on using the CreateClientVpnRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateClientVpnRouteRequest method. -// req, resp := client.CreateClientVpnRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateClientVpnRoute -func (c *EC2) CreateClientVpnRouteRequest(input *CreateClientVpnRouteInput) (req *request.Request, output *CreateClientVpnRouteOutput) { - op := &request.Operation{ - Name: opCreateClientVpnRoute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateClientVpnRouteInput{} - } - - output = &CreateClientVpnRouteOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateClientVpnRoute API operation for Amazon Elastic Compute Cloud. -// -// Adds a route to a network to a Client VPN endpoint. Each Client VPN endpoint -// has a route table that describes the available destination network routes. -// Each route in the route table specifies the path for traffic to specific resources -// or networks. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateClientVpnRoute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateClientVpnRoute -func (c *EC2) CreateClientVpnRoute(input *CreateClientVpnRouteInput) (*CreateClientVpnRouteOutput, error) { - req, out := c.CreateClientVpnRouteRequest(input) - return out, req.Send() -} - -// CreateClientVpnRouteWithContext is the same as CreateClientVpnRoute with the addition of -// the ability to pass a context and additional request options. -// -// See CreateClientVpnRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateClientVpnRouteWithContext(ctx aws.Context, input *CreateClientVpnRouteInput, opts ...request.Option) (*CreateClientVpnRouteOutput, error) { - req, out := c.CreateClientVpnRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCustomerGateway = "CreateCustomerGateway" - -// CreateCustomerGatewayRequest generates a "aws/request.Request" representing the -// client's request for the CreateCustomerGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCustomerGateway for more information on using the CreateCustomerGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCustomerGatewayRequest method. -// req, resp := client.CreateCustomerGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCustomerGateway -func (c *EC2) CreateCustomerGatewayRequest(input *CreateCustomerGatewayInput) (req *request.Request, output *CreateCustomerGatewayOutput) { - op := &request.Operation{ - Name: opCreateCustomerGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCustomerGatewayInput{} - } - - output = &CreateCustomerGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCustomerGateway API operation for Amazon Elastic Compute Cloud. -// -// Provides information to AWS about your VPN customer gateway device. The customer -// gateway is the appliance at your end of the VPN connection. (The device on -// the AWS side of the VPN connection is the virtual private gateway.) You must -// provide the Internet-routable IP address of the customer gateway's external -// interface. The IP address must be static and may be behind a device performing -// network address translation (NAT). -// -// For devices that use Border Gateway Protocol (BGP), you can also provide -// the device's BGP Autonomous System Number (ASN). You can use an existing -// ASN assigned to your network. If you don't have an ASN already, you can use -// a private ASN (in the 64512 - 65534 range). -// -// Amazon EC2 supports all 2-byte ASN numbers in the range of 1 - 65534, with -// the exception of 7224, which is reserved in the us-east-1 region, and 9059, -// which is reserved in the eu-west-1 region. -// -// For more information about VPN customer gateways, see AWS Managed VPN Connections -// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) in the -// Amazon Virtual Private Cloud User Guide. -// -// You cannot create more than one customer gateway with the same VPN type, -// IP address, and BGP ASN parameter values. If you run an identical request -// more than one time, the first request creates the customer gateway, and subsequent -// requests return information about the existing customer gateway. The subsequent -// requests do not create new customer gateway resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateCustomerGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCustomerGateway -func (c *EC2) CreateCustomerGateway(input *CreateCustomerGatewayInput) (*CreateCustomerGatewayOutput, error) { - req, out := c.CreateCustomerGatewayRequest(input) - return out, req.Send() -} - -// CreateCustomerGatewayWithContext is the same as CreateCustomerGateway with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCustomerGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateCustomerGatewayWithContext(ctx aws.Context, input *CreateCustomerGatewayInput, opts ...request.Option) (*CreateCustomerGatewayOutput, error) { - req, out := c.CreateCustomerGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDefaultSubnet = "CreateDefaultSubnet" - -// CreateDefaultSubnetRequest generates a "aws/request.Request" representing the -// client's request for the CreateDefaultSubnet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDefaultSubnet for more information on using the CreateDefaultSubnet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDefaultSubnetRequest method. -// req, resp := client.CreateDefaultSubnetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultSubnet -func (c *EC2) CreateDefaultSubnetRequest(input *CreateDefaultSubnetInput) (req *request.Request, output *CreateDefaultSubnetOutput) { - op := &request.Operation{ - Name: opCreateDefaultSubnet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDefaultSubnetInput{} - } - - output = &CreateDefaultSubnetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDefaultSubnet API operation for Amazon Elastic Compute Cloud. -// -// Creates a default subnet with a size /20 IPv4 CIDR block in the specified -// Availability Zone in your default VPC. You can have only one default subnet -// per Availability Zone. For more information, see Creating a Default Subnet -// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html#create-default-subnet) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateDefaultSubnet for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultSubnet -func (c *EC2) CreateDefaultSubnet(input *CreateDefaultSubnetInput) (*CreateDefaultSubnetOutput, error) { - req, out := c.CreateDefaultSubnetRequest(input) - return out, req.Send() -} - -// CreateDefaultSubnetWithContext is the same as CreateDefaultSubnet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDefaultSubnet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateDefaultSubnetWithContext(ctx aws.Context, input *CreateDefaultSubnetInput, opts ...request.Option) (*CreateDefaultSubnetOutput, error) { - req, out := c.CreateDefaultSubnetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDefaultVpc = "CreateDefaultVpc" - -// CreateDefaultVpcRequest generates a "aws/request.Request" representing the -// client's request for the CreateDefaultVpc operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDefaultVpc for more information on using the CreateDefaultVpc -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDefaultVpcRequest method. -// req, resp := client.CreateDefaultVpcRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpc -func (c *EC2) CreateDefaultVpcRequest(input *CreateDefaultVpcInput) (req *request.Request, output *CreateDefaultVpcOutput) { - op := &request.Operation{ - Name: opCreateDefaultVpc, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDefaultVpcInput{} - } - - output = &CreateDefaultVpcOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDefaultVpc API operation for Amazon Elastic Compute Cloud. -// -// Creates a default VPC with a size /16 IPv4 CIDR block and a default subnet -// in each Availability Zone. For more information about the components of a -// default VPC, see Default VPC and Default Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html) -// in the Amazon Virtual Private Cloud User Guide. You cannot specify the components -// of the default VPC yourself. -// -// If you deleted your previous default VPC, you can create a default VPC. You -// cannot have more than one default VPC per Region. -// -// If your account supports EC2-Classic, you cannot use this action to create -// a default VPC in a Region that supports EC2-Classic. If you want a default -// VPC in a Region that supports EC2-Classic, see "I really want a default VPC -// for my existing EC2 account. Is that possible?" in the Default VPCs FAQ (http://aws.amazon.com/vpc/faqs/#Default_VPCs). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateDefaultVpc for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpc -func (c *EC2) CreateDefaultVpc(input *CreateDefaultVpcInput) (*CreateDefaultVpcOutput, error) { - req, out := c.CreateDefaultVpcRequest(input) - return out, req.Send() -} - -// CreateDefaultVpcWithContext is the same as CreateDefaultVpc with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDefaultVpc for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateDefaultVpcWithContext(ctx aws.Context, input *CreateDefaultVpcInput, opts ...request.Option) (*CreateDefaultVpcOutput, error) { - req, out := c.CreateDefaultVpcRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDhcpOptions = "CreateDhcpOptions" - -// CreateDhcpOptionsRequest generates a "aws/request.Request" representing the -// client's request for the CreateDhcpOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDhcpOptions for more information on using the CreateDhcpOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDhcpOptionsRequest method. -// req, resp := client.CreateDhcpOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptions -func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *request.Request, output *CreateDhcpOptionsOutput) { - op := &request.Operation{ - Name: opCreateDhcpOptions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDhcpOptionsInput{} - } - - output = &CreateDhcpOptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDhcpOptions API operation for Amazon Elastic Compute Cloud. -// -// Creates a set of DHCP options for your VPC. After creating the set, you must -// associate it with the VPC, causing all existing and new instances that you -// launch in the VPC to use this set of DHCP options. The following are the -// individual DHCP options you can specify. For more information about the options, -// see RFC 2132 (http://www.ietf.org/rfc/rfc2132.txt). -// -// * domain-name-servers - The IP addresses of up to four domain name servers, -// or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. -// If specifying more than one domain name server, specify the IP addresses -// in a single parameter, separated by commas. ITo have your instance to -// receive a custom DNS hostname as specified in domain-name, you must set -// domain-name-servers to a custom DNS server. -// -// * domain-name - If you're using AmazonProvidedDNS in us-east-1, specify -// ec2.internal. If you're using AmazonProvidedDNS in another region, specify -// region.compute.internal (for example, ap-northeast-1.compute.internal). -// Otherwise, specify a domain name (for example, MyCompany.com). This value -// is used to complete unqualified DNS hostnames. Important: Some Linux operating -// systems accept multiple domain names separated by spaces. However, Windows -// and other Linux operating systems treat the value as a single domain, -// which results in unexpected behavior. If your DHCP options set is associated -// with a VPC that has instances with multiple operating systems, specify -// only one domain name. -// -// * ntp-servers - The IP addresses of up to four Network Time Protocol (NTP) -// servers. -// -// * netbios-name-servers - The IP addresses of up to four NetBIOS name servers. -// -// * netbios-node-type - The NetBIOS node type (1, 2, 4, or 8). We recommend -// that you specify 2 (broadcast and multicast are not currently supported). -// For more information about these node types, see RFC 2132 (http://www.ietf.org/rfc/rfc2132.txt). -// -// Your VPC automatically starts out with a set of DHCP options that includes -// only a DNS server that we provide (AmazonProvidedDNS). If you create a set -// of options, and if your VPC has an internet gateway, make sure to set the -// domain-name-servers option either to AmazonProvidedDNS or to a domain name -// server of your choice. For more information, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateDhcpOptions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptions -func (c *EC2) CreateDhcpOptions(input *CreateDhcpOptionsInput) (*CreateDhcpOptionsOutput, error) { - req, out := c.CreateDhcpOptionsRequest(input) - return out, req.Send() -} - -// CreateDhcpOptionsWithContext is the same as CreateDhcpOptions with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDhcpOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateDhcpOptionsWithContext(ctx aws.Context, input *CreateDhcpOptionsInput, opts ...request.Option) (*CreateDhcpOptionsOutput, error) { - req, out := c.CreateDhcpOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateEgressOnlyInternetGateway = "CreateEgressOnlyInternetGateway" - -// CreateEgressOnlyInternetGatewayRequest generates a "aws/request.Request" representing the -// client's request for the CreateEgressOnlyInternetGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateEgressOnlyInternetGateway for more information on using the CreateEgressOnlyInternetGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateEgressOnlyInternetGatewayRequest method. -// req, resp := client.CreateEgressOnlyInternetGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateEgressOnlyInternetGateway -func (c *EC2) CreateEgressOnlyInternetGatewayRequest(input *CreateEgressOnlyInternetGatewayInput) (req *request.Request, output *CreateEgressOnlyInternetGatewayOutput) { - op := &request.Operation{ - Name: opCreateEgressOnlyInternetGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateEgressOnlyInternetGatewayInput{} - } - - output = &CreateEgressOnlyInternetGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateEgressOnlyInternetGateway API operation for Amazon Elastic Compute Cloud. -// -// [IPv6 only] Creates an egress-only internet gateway for your VPC. An egress-only -// internet gateway is used to enable outbound communication over IPv6 from -// instances in your VPC to the internet, and prevents hosts outside of your -// VPC from initiating an IPv6 connection with your instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateEgressOnlyInternetGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateEgressOnlyInternetGateway -func (c *EC2) CreateEgressOnlyInternetGateway(input *CreateEgressOnlyInternetGatewayInput) (*CreateEgressOnlyInternetGatewayOutput, error) { - req, out := c.CreateEgressOnlyInternetGatewayRequest(input) - return out, req.Send() -} - -// CreateEgressOnlyInternetGatewayWithContext is the same as CreateEgressOnlyInternetGateway with the addition of -// the ability to pass a context and additional request options. -// -// See CreateEgressOnlyInternetGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateEgressOnlyInternetGatewayWithContext(ctx aws.Context, input *CreateEgressOnlyInternetGatewayInput, opts ...request.Option) (*CreateEgressOnlyInternetGatewayOutput, error) { - req, out := c.CreateEgressOnlyInternetGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFleet = "CreateFleet" - -// CreateFleetRequest generates a "aws/request.Request" representing the -// client's request for the CreateFleet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFleet for more information on using the CreateFleet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateFleetRequest method. -// req, resp := client.CreateFleetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFleet -func (c *EC2) CreateFleetRequest(input *CreateFleetInput) (req *request.Request, output *CreateFleetOutput) { - op := &request.Operation{ - Name: opCreateFleet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateFleetInput{} - } - - output = &CreateFleetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFleet API operation for Amazon Elastic Compute Cloud. -// -// Launches an EC2 Fleet. -// -// You can create a single EC2 Fleet that includes multiple launch specifications -// that vary by instance type, AMI, Availability Zone, or subnet. -// -// For more information, see Launching an EC2 Fleet (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateFleet for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFleet -func (c *EC2) CreateFleet(input *CreateFleetInput) (*CreateFleetOutput, error) { - req, out := c.CreateFleetRequest(input) - return out, req.Send() -} - -// CreateFleetWithContext is the same as CreateFleet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFleet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateFleetWithContext(ctx aws.Context, input *CreateFleetInput, opts ...request.Option) (*CreateFleetOutput, error) { - req, out := c.CreateFleetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFlowLogs = "CreateFlowLogs" - -// CreateFlowLogsRequest generates a "aws/request.Request" representing the -// client's request for the CreateFlowLogs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFlowLogs for more information on using the CreateFlowLogs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateFlowLogsRequest method. -// req, resp := client.CreateFlowLogsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFlowLogs -func (c *EC2) CreateFlowLogsRequest(input *CreateFlowLogsInput) (req *request.Request, output *CreateFlowLogsOutput) { - op := &request.Operation{ - Name: opCreateFlowLogs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateFlowLogsInput{} - } - - output = &CreateFlowLogsOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFlowLogs API operation for Amazon Elastic Compute Cloud. -// -// Creates one or more flow logs to capture information about IP traffic for -// a specific network interface, subnet, or VPC. -// -// Flow log data for a monitored network interface is recorded as flow log records, -// which are log events consisting of fields that describe the traffic flow. -// For more information, see Flow Log Records (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/flow-logs.html#flow-log-records) -// in the Amazon Virtual Private Cloud User Guide. -// -// When publishing to CloudWatch Logs, flow log records are published to a log -// group, and each network interface has a unique log stream in the log group. -// When publishing to Amazon S3, flow log records for all of the monitored network -// interfaces are published to a single log file object that is stored in the -// specified bucket. -// -// For more information, see VPC Flow Logs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/flow-logs.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateFlowLogs for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFlowLogs -func (c *EC2) CreateFlowLogs(input *CreateFlowLogsInput) (*CreateFlowLogsOutput, error) { - req, out := c.CreateFlowLogsRequest(input) - return out, req.Send() -} - -// CreateFlowLogsWithContext is the same as CreateFlowLogs with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFlowLogs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateFlowLogsWithContext(ctx aws.Context, input *CreateFlowLogsInput, opts ...request.Option) (*CreateFlowLogsOutput, error) { - req, out := c.CreateFlowLogsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFpgaImage = "CreateFpgaImage" - -// CreateFpgaImageRequest generates a "aws/request.Request" representing the -// client's request for the CreateFpgaImage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFpgaImage for more information on using the CreateFpgaImage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateFpgaImageRequest method. -// req, resp := client.CreateFpgaImageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImage -func (c *EC2) CreateFpgaImageRequest(input *CreateFpgaImageInput) (req *request.Request, output *CreateFpgaImageOutput) { - op := &request.Operation{ - Name: opCreateFpgaImage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateFpgaImageInput{} - } - - output = &CreateFpgaImageOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFpgaImage API operation for Amazon Elastic Compute Cloud. -// -// Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP). -// -// The create operation is asynchronous. To verify that the AFI is ready for -// use, check the output logs. -// -// An AFI contains the FPGA bitstream that is ready to download to an FPGA. -// You can securely deploy an AFI on one or more FPGA-accelerated instances. -// For more information, see the AWS FPGA Hardware Development Kit (https://github.com/aws/aws-fpga/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateFpgaImage for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImage -func (c *EC2) CreateFpgaImage(input *CreateFpgaImageInput) (*CreateFpgaImageOutput, error) { - req, out := c.CreateFpgaImageRequest(input) - return out, req.Send() -} - -// CreateFpgaImageWithContext is the same as CreateFpgaImage with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFpgaImage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateFpgaImageWithContext(ctx aws.Context, input *CreateFpgaImageInput, opts ...request.Option) (*CreateFpgaImageOutput, error) { - req, out := c.CreateFpgaImageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateImage = "CreateImage" - -// CreateImageRequest generates a "aws/request.Request" representing the -// client's request for the CreateImage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateImage for more information on using the CreateImage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateImageRequest method. -// req, resp := client.CreateImageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImage -func (c *EC2) CreateImageRequest(input *CreateImageInput) (req *request.Request, output *CreateImageOutput) { - op := &request.Operation{ - Name: opCreateImage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateImageInput{} - } - - output = &CreateImageOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateImage API operation for Amazon Elastic Compute Cloud. -// -// Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that -// is either running or stopped. -// -// If you customized your instance with instance store volumes or EBS volumes -// in addition to the root device volume, the new AMI contains block device -// mapping information for those volumes. When you launch an instance from this -// new AMI, the instance automatically launches with those additional volumes. -// -// For more information, see Creating Amazon EBS-Backed Linux AMIs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateImage for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImage -func (c *EC2) CreateImage(input *CreateImageInput) (*CreateImageOutput, error) { - req, out := c.CreateImageRequest(input) - return out, req.Send() -} - -// CreateImageWithContext is the same as CreateImage with the addition of -// the ability to pass a context and additional request options. -// -// See CreateImage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateImageWithContext(ctx aws.Context, input *CreateImageInput, opts ...request.Option) (*CreateImageOutput, error) { - req, out := c.CreateImageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateInstanceExportTask = "CreateInstanceExportTask" - -// CreateInstanceExportTaskRequest generates a "aws/request.Request" representing the -// client's request for the CreateInstanceExportTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateInstanceExportTask for more information on using the CreateInstanceExportTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateInstanceExportTaskRequest method. -// req, resp := client.CreateInstanceExportTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceExportTask -func (c *EC2) CreateInstanceExportTaskRequest(input *CreateInstanceExportTaskInput) (req *request.Request, output *CreateInstanceExportTaskOutput) { - op := &request.Operation{ - Name: opCreateInstanceExportTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateInstanceExportTaskInput{} - } - - output = &CreateInstanceExportTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateInstanceExportTask API operation for Amazon Elastic Compute Cloud. -// -// Exports a running or stopped instance to an S3 bucket. -// -// For information about the supported operating systems, image formats, and -// known limitations for the types of instances you can export, see Exporting -// an Instance as a VM Using VM Import/Export (http://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html) -// in the VM Import/Export User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateInstanceExportTask for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceExportTask -func (c *EC2) CreateInstanceExportTask(input *CreateInstanceExportTaskInput) (*CreateInstanceExportTaskOutput, error) { - req, out := c.CreateInstanceExportTaskRequest(input) - return out, req.Send() -} - -// CreateInstanceExportTaskWithContext is the same as CreateInstanceExportTask with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInstanceExportTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateInstanceExportTaskWithContext(ctx aws.Context, input *CreateInstanceExportTaskInput, opts ...request.Option) (*CreateInstanceExportTaskOutput, error) { - req, out := c.CreateInstanceExportTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateInternetGateway = "CreateInternetGateway" - -// CreateInternetGatewayRequest generates a "aws/request.Request" representing the -// client's request for the CreateInternetGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateInternetGateway for more information on using the CreateInternetGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateInternetGatewayRequest method. -// req, resp := client.CreateInternetGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGateway -func (c *EC2) CreateInternetGatewayRequest(input *CreateInternetGatewayInput) (req *request.Request, output *CreateInternetGatewayOutput) { - op := &request.Operation{ - Name: opCreateInternetGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateInternetGatewayInput{} - } - - output = &CreateInternetGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateInternetGateway API operation for Amazon Elastic Compute Cloud. -// -// Creates an internet gateway for use with a VPC. After creating the internet -// gateway, you attach it to a VPC using AttachInternetGateway. -// -// For more information about your VPC and internet gateway, see the Amazon -// Virtual Private Cloud User Guide (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateInternetGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGateway -func (c *EC2) CreateInternetGateway(input *CreateInternetGatewayInput) (*CreateInternetGatewayOutput, error) { - req, out := c.CreateInternetGatewayRequest(input) - return out, req.Send() -} - -// CreateInternetGatewayWithContext is the same as CreateInternetGateway with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInternetGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateInternetGatewayWithContext(ctx aws.Context, input *CreateInternetGatewayInput, opts ...request.Option) (*CreateInternetGatewayOutput, error) { - req, out := c.CreateInternetGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateKeyPair = "CreateKeyPair" - -// CreateKeyPairRequest generates a "aws/request.Request" representing the -// client's request for the CreateKeyPair operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateKeyPair for more information on using the CreateKeyPair -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateKeyPairRequest method. -// req, resp := client.CreateKeyPairRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateKeyPair -func (c *EC2) CreateKeyPairRequest(input *CreateKeyPairInput) (req *request.Request, output *CreateKeyPairOutput) { - op := &request.Operation{ - Name: opCreateKeyPair, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateKeyPairInput{} - } - - output = &CreateKeyPairOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateKeyPair API operation for Amazon Elastic Compute Cloud. -// -// Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores -// the public key and displays the private key for you to save to a file. The -// private key is returned as an unencrypted PEM encoded PKCS#1 private key. -// If a key with the specified name already exists, Amazon EC2 returns an error. -// -// You can have up to five thousand key pairs per region. -// -// The key pair returned to you is available only in the region in which you -// create it. If you prefer, you can create your own key pair using a third-party -// tool and upload it to any region using ImportKeyPair. -// -// For more information, see Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateKeyPair for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateKeyPair -func (c *EC2) CreateKeyPair(input *CreateKeyPairInput) (*CreateKeyPairOutput, error) { - req, out := c.CreateKeyPairRequest(input) - return out, req.Send() -} - -// CreateKeyPairWithContext is the same as CreateKeyPair with the addition of -// the ability to pass a context and additional request options. -// -// See CreateKeyPair for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateKeyPairWithContext(ctx aws.Context, input *CreateKeyPairInput, opts ...request.Option) (*CreateKeyPairOutput, error) { - req, out := c.CreateKeyPairRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLaunchTemplate = "CreateLaunchTemplate" - -// CreateLaunchTemplateRequest generates a "aws/request.Request" representing the -// client's request for the CreateLaunchTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLaunchTemplate for more information on using the CreateLaunchTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLaunchTemplateRequest method. -// req, resp := client.CreateLaunchTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLaunchTemplate -func (c *EC2) CreateLaunchTemplateRequest(input *CreateLaunchTemplateInput) (req *request.Request, output *CreateLaunchTemplateOutput) { - op := &request.Operation{ - Name: opCreateLaunchTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLaunchTemplateInput{} - } - - output = &CreateLaunchTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLaunchTemplate API operation for Amazon Elastic Compute Cloud. -// -// Creates a launch template. A launch template contains the parameters to launch -// an instance. When you launch an instance using RunInstances, you can specify -// a launch template instead of providing the launch parameters in the request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateLaunchTemplate for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLaunchTemplate -func (c *EC2) CreateLaunchTemplate(input *CreateLaunchTemplateInput) (*CreateLaunchTemplateOutput, error) { - req, out := c.CreateLaunchTemplateRequest(input) - return out, req.Send() -} - -// CreateLaunchTemplateWithContext is the same as CreateLaunchTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLaunchTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateLaunchTemplateWithContext(ctx aws.Context, input *CreateLaunchTemplateInput, opts ...request.Option) (*CreateLaunchTemplateOutput, error) { - req, out := c.CreateLaunchTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLaunchTemplateVersion = "CreateLaunchTemplateVersion" - -// CreateLaunchTemplateVersionRequest generates a "aws/request.Request" representing the -// client's request for the CreateLaunchTemplateVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLaunchTemplateVersion for more information on using the CreateLaunchTemplateVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLaunchTemplateVersionRequest method. -// req, resp := client.CreateLaunchTemplateVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLaunchTemplateVersion -func (c *EC2) CreateLaunchTemplateVersionRequest(input *CreateLaunchTemplateVersionInput) (req *request.Request, output *CreateLaunchTemplateVersionOutput) { - op := &request.Operation{ - Name: opCreateLaunchTemplateVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLaunchTemplateVersionInput{} - } - - output = &CreateLaunchTemplateVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLaunchTemplateVersion API operation for Amazon Elastic Compute Cloud. -// -// Creates a new version for a launch template. You can specify an existing -// version of launch template from which to base the new version. -// -// Launch template versions are numbered in the order in which they are created. -// You cannot specify, change, or replace the numbering of launch template versions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateLaunchTemplateVersion for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLaunchTemplateVersion -func (c *EC2) CreateLaunchTemplateVersion(input *CreateLaunchTemplateVersionInput) (*CreateLaunchTemplateVersionOutput, error) { - req, out := c.CreateLaunchTemplateVersionRequest(input) - return out, req.Send() -} - -// CreateLaunchTemplateVersionWithContext is the same as CreateLaunchTemplateVersion with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLaunchTemplateVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateLaunchTemplateVersionWithContext(ctx aws.Context, input *CreateLaunchTemplateVersionInput, opts ...request.Option) (*CreateLaunchTemplateVersionOutput, error) { - req, out := c.CreateLaunchTemplateVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateNatGateway = "CreateNatGateway" - -// CreateNatGatewayRequest generates a "aws/request.Request" representing the -// client's request for the CreateNatGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateNatGateway for more information on using the CreateNatGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateNatGatewayRequest method. -// req, resp := client.CreateNatGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNatGateway -func (c *EC2) CreateNatGatewayRequest(input *CreateNatGatewayInput) (req *request.Request, output *CreateNatGatewayOutput) { - op := &request.Operation{ - Name: opCreateNatGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateNatGatewayInput{} - } - - output = &CreateNatGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateNatGateway API operation for Amazon Elastic Compute Cloud. -// -// Creates a NAT gateway in the specified public subnet. This action creates -// a network interface in the specified subnet with a private IP address from -// the IP address range of the subnet. Internet-bound traffic from a private -// subnet can be routed to the NAT gateway, therefore enabling instances in -// the private subnet to connect to the internet. For more information, see -// NAT Gateways (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateNatGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNatGateway -func (c *EC2) CreateNatGateway(input *CreateNatGatewayInput) (*CreateNatGatewayOutput, error) { - req, out := c.CreateNatGatewayRequest(input) - return out, req.Send() -} - -// CreateNatGatewayWithContext is the same as CreateNatGateway with the addition of -// the ability to pass a context and additional request options. -// -// See CreateNatGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateNatGatewayWithContext(ctx aws.Context, input *CreateNatGatewayInput, opts ...request.Option) (*CreateNatGatewayOutput, error) { - req, out := c.CreateNatGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateNetworkAcl = "CreateNetworkAcl" - -// CreateNetworkAclRequest generates a "aws/request.Request" representing the -// client's request for the CreateNetworkAcl operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateNetworkAcl for more information on using the CreateNetworkAcl -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateNetworkAclRequest method. -// req, resp := client.CreateNetworkAclRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAcl -func (c *EC2) CreateNetworkAclRequest(input *CreateNetworkAclInput) (req *request.Request, output *CreateNetworkAclOutput) { - op := &request.Operation{ - Name: opCreateNetworkAcl, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateNetworkAclInput{} - } - - output = &CreateNetworkAclOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateNetworkAcl API operation for Amazon Elastic Compute Cloud. -// -// Creates a network ACL in a VPC. Network ACLs provide an optional layer of -// security (in addition to security groups) for the instances in your VPC. -// -// For more information, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateNetworkAcl for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAcl -func (c *EC2) CreateNetworkAcl(input *CreateNetworkAclInput) (*CreateNetworkAclOutput, error) { - req, out := c.CreateNetworkAclRequest(input) - return out, req.Send() -} - -// CreateNetworkAclWithContext is the same as CreateNetworkAcl with the addition of -// the ability to pass a context and additional request options. -// -// See CreateNetworkAcl for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateNetworkAclWithContext(ctx aws.Context, input *CreateNetworkAclInput, opts ...request.Option) (*CreateNetworkAclOutput, error) { - req, out := c.CreateNetworkAclRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateNetworkAclEntry = "CreateNetworkAclEntry" - -// CreateNetworkAclEntryRequest generates a "aws/request.Request" representing the -// client's request for the CreateNetworkAclEntry operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateNetworkAclEntry for more information on using the CreateNetworkAclEntry -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateNetworkAclEntryRequest method. -// req, resp := client.CreateNetworkAclEntryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntry -func (c *EC2) CreateNetworkAclEntryRequest(input *CreateNetworkAclEntryInput) (req *request.Request, output *CreateNetworkAclEntryOutput) { - op := &request.Operation{ - Name: opCreateNetworkAclEntry, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateNetworkAclEntryInput{} - } - - output = &CreateNetworkAclEntryOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateNetworkAclEntry API operation for Amazon Elastic Compute Cloud. -// -// Creates an entry (a rule) in a network ACL with the specified rule number. -// Each network ACL has a set of numbered ingress rules and a separate set of -// numbered egress rules. When determining whether a packet should be allowed -// in or out of a subnet associated with the ACL, we process the entries in -// the ACL according to the rule numbers, in ascending order. Each network ACL -// has a set of ingress rules and a separate set of egress rules. -// -// We recommend that you leave room between the rule numbers (for example, 100, -// 110, 120, ...), and not number them one right after the other (for example, -// 101, 102, 103, ...). This makes it easier to add a rule between existing -// ones without having to renumber the rules. -// -// After you add an entry, you can't modify it; you must either replace it, -// or create an entry and delete the old one. -// -// For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateNetworkAclEntry for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntry -func (c *EC2) CreateNetworkAclEntry(input *CreateNetworkAclEntryInput) (*CreateNetworkAclEntryOutput, error) { - req, out := c.CreateNetworkAclEntryRequest(input) - return out, req.Send() -} - -// CreateNetworkAclEntryWithContext is the same as CreateNetworkAclEntry with the addition of -// the ability to pass a context and additional request options. -// -// See CreateNetworkAclEntry for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateNetworkAclEntryWithContext(ctx aws.Context, input *CreateNetworkAclEntryInput, opts ...request.Option) (*CreateNetworkAclEntryOutput, error) { - req, out := c.CreateNetworkAclEntryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateNetworkInterface = "CreateNetworkInterface" - -// CreateNetworkInterfaceRequest generates a "aws/request.Request" representing the -// client's request for the CreateNetworkInterface operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateNetworkInterface for more information on using the CreateNetworkInterface -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateNetworkInterfaceRequest method. -// req, resp := client.CreateNetworkInterfaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterface -func (c *EC2) CreateNetworkInterfaceRequest(input *CreateNetworkInterfaceInput) (req *request.Request, output *CreateNetworkInterfaceOutput) { - op := &request.Operation{ - Name: opCreateNetworkInterface, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateNetworkInterfaceInput{} - } - - output = &CreateNetworkInterfaceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateNetworkInterface API operation for Amazon Elastic Compute Cloud. -// -// Creates a network interface in the specified subnet. -// -// For more information about network interfaces, see Elastic Network Interfaces -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html) in the -// Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateNetworkInterface for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterface -func (c *EC2) CreateNetworkInterface(input *CreateNetworkInterfaceInput) (*CreateNetworkInterfaceOutput, error) { - req, out := c.CreateNetworkInterfaceRequest(input) - return out, req.Send() -} - -// CreateNetworkInterfaceWithContext is the same as CreateNetworkInterface with the addition of -// the ability to pass a context and additional request options. -// -// See CreateNetworkInterface for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateNetworkInterfaceWithContext(ctx aws.Context, input *CreateNetworkInterfaceInput, opts ...request.Option) (*CreateNetworkInterfaceOutput, error) { - req, out := c.CreateNetworkInterfaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateNetworkInterfacePermission = "CreateNetworkInterfacePermission" - -// CreateNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the -// client's request for the CreateNetworkInterfacePermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateNetworkInterfacePermission for more information on using the CreateNetworkInterfacePermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateNetworkInterfacePermissionRequest method. -// req, resp := client.CreateNetworkInterfacePermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermission -func (c *EC2) CreateNetworkInterfacePermissionRequest(input *CreateNetworkInterfacePermissionInput) (req *request.Request, output *CreateNetworkInterfacePermissionOutput) { - op := &request.Operation{ - Name: opCreateNetworkInterfacePermission, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateNetworkInterfacePermissionInput{} - } - - output = &CreateNetworkInterfacePermissionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateNetworkInterfacePermission API operation for Amazon Elastic Compute Cloud. -// -// Grants an AWS-authorized account permission to attach the specified network -// interface to an instance in their account. -// -// You can grant permission to a single AWS account only, and only one account -// at a time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateNetworkInterfacePermission for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermission -func (c *EC2) CreateNetworkInterfacePermission(input *CreateNetworkInterfacePermissionInput) (*CreateNetworkInterfacePermissionOutput, error) { - req, out := c.CreateNetworkInterfacePermissionRequest(input) - return out, req.Send() -} - -// CreateNetworkInterfacePermissionWithContext is the same as CreateNetworkInterfacePermission with the addition of -// the ability to pass a context and additional request options. -// -// See CreateNetworkInterfacePermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateNetworkInterfacePermissionWithContext(ctx aws.Context, input *CreateNetworkInterfacePermissionInput, opts ...request.Option) (*CreateNetworkInterfacePermissionOutput, error) { - req, out := c.CreateNetworkInterfacePermissionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePlacementGroup = "CreatePlacementGroup" - -// CreatePlacementGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreatePlacementGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePlacementGroup for more information on using the CreatePlacementGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePlacementGroupRequest method. -// req, resp := client.CreatePlacementGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroup -func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req *request.Request, output *CreatePlacementGroupOutput) { - op := &request.Operation{ - Name: opCreatePlacementGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePlacementGroupInput{} - } - - output = &CreatePlacementGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreatePlacementGroup API operation for Amazon Elastic Compute Cloud. -// -// Creates a placement group in which to launch instances. The strategy of the -// placement group determines how the instances are organized within the group. -// -// A cluster placement group is a logical grouping of instances within a single -// Availability Zone that benefit from low network latency, high network throughput. -// A spread placement group places instances on distinct hardware. A partition -// placement group places groups of instances in different partitions, where -// instances in one partition do not share the same hardware with instances -// in another partition. -// -// For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreatePlacementGroup for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroup -func (c *EC2) CreatePlacementGroup(input *CreatePlacementGroupInput) (*CreatePlacementGroupOutput, error) { - req, out := c.CreatePlacementGroupRequest(input) - return out, req.Send() -} - -// CreatePlacementGroupWithContext is the same as CreatePlacementGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePlacementGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreatePlacementGroupWithContext(ctx aws.Context, input *CreatePlacementGroupInput, opts ...request.Option) (*CreatePlacementGroupOutput, error) { - req, out := c.CreatePlacementGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateReservedInstancesListing = "CreateReservedInstancesListing" - -// CreateReservedInstancesListingRequest generates a "aws/request.Request" representing the -// client's request for the CreateReservedInstancesListing operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateReservedInstancesListing for more information on using the CreateReservedInstancesListing -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateReservedInstancesListingRequest method. -// req, resp := client.CreateReservedInstancesListingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReservedInstancesListing -func (c *EC2) CreateReservedInstancesListingRequest(input *CreateReservedInstancesListingInput) (req *request.Request, output *CreateReservedInstancesListingOutput) { - op := &request.Operation{ - Name: opCreateReservedInstancesListing, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateReservedInstancesListingInput{} - } - - output = &CreateReservedInstancesListingOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateReservedInstancesListing API operation for Amazon Elastic Compute Cloud. -// -// Creates a listing for Amazon EC2 Standard Reserved Instances to be sold in -// the Reserved Instance Marketplace. You can submit one Standard Reserved Instance -// listing at a time. To get a list of your Standard Reserved Instances, you -// can use the DescribeReservedInstances operation. -// -// Only Standard Reserved Instances with a capacity reservation can be sold -// in the Reserved Instance Marketplace. Convertible Reserved Instances and -// Standard Reserved Instances with a regional benefit cannot be sold. -// -// The Reserved Instance Marketplace matches sellers who want to resell Standard -// Reserved Instance capacity that they no longer need with buyers who want -// to purchase additional capacity. Reserved Instances bought and sold through -// the Reserved Instance Marketplace work like any other Reserved Instances. -// -// To sell your Standard Reserved Instances, you must first register as a seller -// in the Reserved Instance Marketplace. After completing the registration process, -// you can create a Reserved Instance Marketplace listing of some or all of -// your Standard Reserved Instances, and specify the upfront price to receive -// for them. Your Standard Reserved Instance listings then become available -// for purchase. To view the details of your Standard Reserved Instance listing, -// you can use the DescribeReservedInstancesListings operation. -// -// For more information, see Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateReservedInstancesListing for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReservedInstancesListing -func (c *EC2) CreateReservedInstancesListing(input *CreateReservedInstancesListingInput) (*CreateReservedInstancesListingOutput, error) { - req, out := c.CreateReservedInstancesListingRequest(input) - return out, req.Send() -} - -// CreateReservedInstancesListingWithContext is the same as CreateReservedInstancesListing with the addition of -// the ability to pass a context and additional request options. -// -// See CreateReservedInstancesListing for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateReservedInstancesListingWithContext(ctx aws.Context, input *CreateReservedInstancesListingInput, opts ...request.Option) (*CreateReservedInstancesListingOutput, error) { - req, out := c.CreateReservedInstancesListingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRoute = "CreateRoute" - -// CreateRouteRequest generates a "aws/request.Request" representing the -// client's request for the CreateRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRoute for more information on using the CreateRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRouteRequest method. -// req, resp := client.CreateRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRoute -func (c *EC2) CreateRouteRequest(input *CreateRouteInput) (req *request.Request, output *CreateRouteOutput) { - op := &request.Operation{ - Name: opCreateRoute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRouteInput{} - } - - output = &CreateRouteOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRoute API operation for Amazon Elastic Compute Cloud. -// -// Creates a route in a route table within a VPC. -// -// You must specify one of the following targets: internet gateway or virtual -// private gateway, NAT instance, NAT gateway, VPC peering connection, network -// interface, or egress-only internet gateway. -// -// When determining how to route traffic, we use the route with the most specific -// match. For example, traffic is destined for the IPv4 address 192.0.2.3, and -// the route table includes the following two IPv4 routes: -// -// * 192.0.2.0/24 (goes to some target A) -// -// * 192.0.2.0/28 (goes to some target B) -// -// Both routes apply to the traffic destined for 192.0.2.3. However, the second -// route in the list covers a smaller number of IP addresses and is therefore -// more specific, so we use that route to determine where to target the traffic. -// -// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateRoute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRoute -func (c *EC2) CreateRoute(input *CreateRouteInput) (*CreateRouteOutput, error) { - req, out := c.CreateRouteRequest(input) - return out, req.Send() -} - -// CreateRouteWithContext is the same as CreateRoute with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateRouteWithContext(ctx aws.Context, input *CreateRouteInput, opts ...request.Option) (*CreateRouteOutput, error) { - req, out := c.CreateRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRouteTable = "CreateRouteTable" - -// CreateRouteTableRequest generates a "aws/request.Request" representing the -// client's request for the CreateRouteTable operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRouteTable for more information on using the CreateRouteTable -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRouteTableRequest method. -// req, resp := client.CreateRouteTableRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTable -func (c *EC2) CreateRouteTableRequest(input *CreateRouteTableInput) (req *request.Request, output *CreateRouteTableOutput) { - op := &request.Operation{ - Name: opCreateRouteTable, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRouteTableInput{} - } - - output = &CreateRouteTableOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRouteTable API operation for Amazon Elastic Compute Cloud. -// -// Creates a route table for the specified VPC. After you create a route table, -// you can add routes and associate the table with a subnet. -// -// For more information, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateRouteTable for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTable -func (c *EC2) CreateRouteTable(input *CreateRouteTableInput) (*CreateRouteTableOutput, error) { - req, out := c.CreateRouteTableRequest(input) - return out, req.Send() -} - -// CreateRouteTableWithContext is the same as CreateRouteTable with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRouteTable for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateRouteTableWithContext(ctx aws.Context, input *CreateRouteTableInput, opts ...request.Option) (*CreateRouteTableOutput, error) { - req, out := c.CreateRouteTableRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSecurityGroup = "CreateSecurityGroup" - -// CreateSecurityGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSecurityGroup for more information on using the CreateSecurityGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSecurityGroupRequest method. -// req, resp := client.CreateSecurityGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroup -func (c *EC2) CreateSecurityGroupRequest(input *CreateSecurityGroupInput) (req *request.Request, output *CreateSecurityGroupOutput) { - op := &request.Operation{ - Name: opCreateSecurityGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSecurityGroupInput{} - } - - output = &CreateSecurityGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSecurityGroup API operation for Amazon Elastic Compute Cloud. -// -// Creates a security group. -// -// A security group is for use with instances either in the EC2-Classic platform -// or in a specific VPC. For more information, see Amazon EC2 Security Groups -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html) -// in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your -// VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// EC2-Classic: You can have up to 500 security groups. -// -// EC2-VPC: You can create up to 500 security groups per VPC. -// -// When you create a security group, you specify a friendly name of your choice. -// You can have a security group for use in EC2-Classic with the same name as -// a security group for use in a VPC. However, you can't have two security groups -// for use in EC2-Classic with the same name or two security groups for use -// in a VPC with the same name. -// -// You have a default security group for use in EC2-Classic and a default security -// group for use in your VPC. If you don't specify a security group when you -// launch an instance, the instance is launched into the appropriate default -// security group. A default security group includes a default rule that grants -// instances unrestricted network access to each other. -// -// You can add or remove rules from your security groups using AuthorizeSecurityGroupIngress, -// AuthorizeSecurityGroupEgress, RevokeSecurityGroupIngress, and RevokeSecurityGroupEgress. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateSecurityGroup for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroup -func (c *EC2) CreateSecurityGroup(input *CreateSecurityGroupInput) (*CreateSecurityGroupOutput, error) { - req, out := c.CreateSecurityGroupRequest(input) - return out, req.Send() -} - -// CreateSecurityGroupWithContext is the same as CreateSecurityGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSecurityGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateSecurityGroupWithContext(ctx aws.Context, input *CreateSecurityGroupInput, opts ...request.Option) (*CreateSecurityGroupOutput, error) { - req, out := c.CreateSecurityGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSnapshot = "CreateSnapshot" - -// CreateSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSnapshot for more information on using the CreateSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSnapshotRequest method. -// req, resp := client.CreateSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshot -func (c *EC2) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Request, output *Snapshot) { - op := &request.Operation{ - Name: opCreateSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSnapshotInput{} - } - - output = &Snapshot{} - req = c.newRequest(op, input, output) - return -} - -// CreateSnapshot API operation for Amazon Elastic Compute Cloud. -// -// Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use -// snapshots for backups, to make copies of EBS volumes, and to save data before -// shutting down an instance. -// -// When a snapshot is created, any AWS Marketplace product codes that are associated -// with the source volume are propagated to the snapshot. -// -// You can take a snapshot of an attached volume that is in use. However, snapshots -// only capture data that has been written to your EBS volume at the time the -// snapshot command is issued; this may exclude any data that has been cached -// by any applications or the operating system. If you can pause any file systems -// on the volume long enough to take a snapshot, your snapshot should be complete. -// However, if you cannot pause all file writes to the volume, you should unmount -// the volume from within the instance, issue the snapshot command, and then -// remount the volume to ensure a consistent and complete snapshot. You may -// remount and use your volume while the snapshot status is pending. -// -// To create a snapshot for EBS volumes that serve as root devices, you should -// stop the instance before taking the snapshot. -// -// Snapshots that are taken from encrypted volumes are automatically encrypted. -// Volumes that are created from encrypted snapshots are also automatically -// encrypted. Your encrypted volumes and any associated snapshots always remain -// protected. -// -// You can tag your snapshots during creation. For more information, see Tagging -// Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// For more information, see Amazon Elastic Block Store (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html) -// and Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateSnapshot for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshot -func (c *EC2) CreateSnapshot(input *CreateSnapshotInput) (*Snapshot, error) { - req, out := c.CreateSnapshotRequest(input) - return out, req.Send() -} - -// CreateSnapshotWithContext is the same as CreateSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateSnapshotWithContext(ctx aws.Context, input *CreateSnapshotInput, opts ...request.Option) (*Snapshot, error) { - req, out := c.CreateSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSpotDatafeedSubscription = "CreateSpotDatafeedSubscription" - -// CreateSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the CreateSpotDatafeedSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSpotDatafeedSubscription for more information on using the CreateSpotDatafeedSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSpotDatafeedSubscriptionRequest method. -// req, resp := client.CreateSpotDatafeedSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSpotDatafeedSubscription -func (c *EC2) CreateSpotDatafeedSubscriptionRequest(input *CreateSpotDatafeedSubscriptionInput) (req *request.Request, output *CreateSpotDatafeedSubscriptionOutput) { - op := &request.Operation{ - Name: opCreateSpotDatafeedSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSpotDatafeedSubscriptionInput{} - } - - output = &CreateSpotDatafeedSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSpotDatafeedSubscription API operation for Amazon Elastic Compute Cloud. -// -// Creates a data feed for Spot Instances, enabling you to view Spot Instance -// usage logs. You can create one data feed per AWS account. For more information, -// see Spot Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html) -// in the Amazon EC2 User Guide for Linux Instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateSpotDatafeedSubscription for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSpotDatafeedSubscription -func (c *EC2) CreateSpotDatafeedSubscription(input *CreateSpotDatafeedSubscriptionInput) (*CreateSpotDatafeedSubscriptionOutput, error) { - req, out := c.CreateSpotDatafeedSubscriptionRequest(input) - return out, req.Send() -} - -// CreateSpotDatafeedSubscriptionWithContext is the same as CreateSpotDatafeedSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSpotDatafeedSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateSpotDatafeedSubscriptionWithContext(ctx aws.Context, input *CreateSpotDatafeedSubscriptionInput, opts ...request.Option) (*CreateSpotDatafeedSubscriptionOutput, error) { - req, out := c.CreateSpotDatafeedSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSubnet = "CreateSubnet" - -// CreateSubnetRequest generates a "aws/request.Request" representing the -// client's request for the CreateSubnet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSubnet for more information on using the CreateSubnet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSubnetRequest method. -// req, resp := client.CreateSubnetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnet -func (c *EC2) CreateSubnetRequest(input *CreateSubnetInput) (req *request.Request, output *CreateSubnetOutput) { - op := &request.Operation{ - Name: opCreateSubnet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSubnetInput{} - } - - output = &CreateSubnetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSubnet API operation for Amazon Elastic Compute Cloud. -// -// Creates a subnet in an existing VPC. -// -// When you create each subnet, you provide the VPC ID and IPv4 CIDR block for -// the subnet. After you create a subnet, you can't change its CIDR block. The -// size of the subnet's IPv4 CIDR block can be the same as a VPC's IPv4 CIDR -// block, or a subset of a VPC's IPv4 CIDR block. If you create more than one -// subnet in a VPC, the subnets' CIDR blocks must not overlap. The smallest -// IPv4 subnet (and VPC) you can create uses a /28 netmask (16 IPv4 addresses), -// and the largest uses a /16 netmask (65,536 IPv4 addresses). -// -// If you've associated an IPv6 CIDR block with your VPC, you can create a subnet -// with an IPv6 CIDR block that uses a /64 prefix length. -// -// AWS reserves both the first four and the last IPv4 address in each subnet's -// CIDR block. They're not available for use. -// -// If you add more than one subnet to a VPC, they're set up in a star topology -// with a logical router in the middle. -// -// If you launch an instance in a VPC using an Amazon EBS-backed AMI, the IP -// address doesn't change if you stop and restart the instance (unlike a similar -// instance launched outside a VPC, which gets a new IP address when restarted). -// It's therefore possible to have a subnet with no running instances (they're -// all stopped), but no remaining IP addresses available. -// -// For more information about subnets, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateSubnet for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnet -func (c *EC2) CreateSubnet(input *CreateSubnetInput) (*CreateSubnetOutput, error) { - req, out := c.CreateSubnetRequest(input) - return out, req.Send() -} - -// CreateSubnetWithContext is the same as CreateSubnet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSubnet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateSubnetWithContext(ctx aws.Context, input *CreateSubnetInput, opts ...request.Option) (*CreateSubnetOutput, error) { - req, out := c.CreateSubnetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTags = "CreateTags" - -// CreateTagsRequest generates a "aws/request.Request" representing the -// client's request for the CreateTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTags for more information on using the CreateTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTagsRequest method. -// req, resp := client.CreateTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags -func (c *EC2) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) { - op := &request.Operation{ - Name: opCreateTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTagsInput{} - } - - output = &CreateTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateTags API operation for Amazon Elastic Compute Cloud. -// -// Adds or overwrites one or more tags for the specified Amazon EC2 resource -// or resources. Each resource can have a maximum of 50 tags. Each tag consists -// of a key and optional value. Tag keys must be unique per resource. -// -// For more information about tags, see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) -// in the Amazon Elastic Compute Cloud User Guide. For more information about -// creating IAM policies that control users' access to resources based on tags, -// see Supported Resource-Level Permissions for Amazon EC2 API Actions (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateTags for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags -func (c *EC2) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) { - req, out := c.CreateTagsRequest(input) - return out, req.Send() -} - -// CreateTagsWithContext is the same as CreateTags with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opts ...request.Option) (*CreateTagsOutput, error) { - req, out := c.CreateTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTransitGateway = "CreateTransitGateway" - -// CreateTransitGatewayRequest generates a "aws/request.Request" representing the -// client's request for the CreateTransitGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTransitGateway for more information on using the CreateTransitGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTransitGatewayRequest method. -// req, resp := client.CreateTransitGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGateway -func (c *EC2) CreateTransitGatewayRequest(input *CreateTransitGatewayInput) (req *request.Request, output *CreateTransitGatewayOutput) { - op := &request.Operation{ - Name: opCreateTransitGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTransitGatewayInput{} - } - - output = &CreateTransitGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTransitGateway API operation for Amazon Elastic Compute Cloud. -// -// Creates a transit gateway. -// -// You can use a transit gateway to interconnect your virtual private clouds -// (VPC) and on-premises networks. After the transit gateway enters the available -// state, you can attach your VPCs and VPN connections to the transit gateway. -// -// To attach your VPCs, use CreateTransitGatewayVpcAttachment. -// -// To attach a VPN connection, use CreateCustomerGateway to create a customer -// gateway and specify the ID of the customer gateway and the ID of the transit -// gateway in a call to CreateVpnConnection. -// -// When you create a transit gateway, we create a default transit gateway route -// table and use it as the default association route table and the default propagation -// route table. You can use CreateTransitGatewayRouteTable to create additional -// transit gateway route tables. If you disable automatic route propagation, -// we do not create a default transit gateway route table. You can use EnableTransitGatewayRouteTablePropagation -// to propagate routes from a resource attachment to a transit gateway route -// table. If you disable automatic associations, you can use AssociateTransitGatewayRouteTable -// to associate a resource attachment with a transit gateway route table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateTransitGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGateway -func (c *EC2) CreateTransitGateway(input *CreateTransitGatewayInput) (*CreateTransitGatewayOutput, error) { - req, out := c.CreateTransitGatewayRequest(input) - return out, req.Send() -} - -// CreateTransitGatewayWithContext is the same as CreateTransitGateway with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTransitGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateTransitGatewayWithContext(ctx aws.Context, input *CreateTransitGatewayInput, opts ...request.Option) (*CreateTransitGatewayOutput, error) { - req, out := c.CreateTransitGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTransitGatewayRoute = "CreateTransitGatewayRoute" - -// CreateTransitGatewayRouteRequest generates a "aws/request.Request" representing the -// client's request for the CreateTransitGatewayRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTransitGatewayRoute for more information on using the CreateTransitGatewayRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTransitGatewayRouteRequest method. -// req, resp := client.CreateTransitGatewayRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayRoute -func (c *EC2) CreateTransitGatewayRouteRequest(input *CreateTransitGatewayRouteInput) (req *request.Request, output *CreateTransitGatewayRouteOutput) { - op := &request.Operation{ - Name: opCreateTransitGatewayRoute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTransitGatewayRouteInput{} - } - - output = &CreateTransitGatewayRouteOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTransitGatewayRoute API operation for Amazon Elastic Compute Cloud. -// -// Creates a static route for the specified transit gateway route table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateTransitGatewayRoute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayRoute -func (c *EC2) CreateTransitGatewayRoute(input *CreateTransitGatewayRouteInput) (*CreateTransitGatewayRouteOutput, error) { - req, out := c.CreateTransitGatewayRouteRequest(input) - return out, req.Send() -} - -// CreateTransitGatewayRouteWithContext is the same as CreateTransitGatewayRoute with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTransitGatewayRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateTransitGatewayRouteWithContext(ctx aws.Context, input *CreateTransitGatewayRouteInput, opts ...request.Option) (*CreateTransitGatewayRouteOutput, error) { - req, out := c.CreateTransitGatewayRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTransitGatewayRouteTable = "CreateTransitGatewayRouteTable" - -// CreateTransitGatewayRouteTableRequest generates a "aws/request.Request" representing the -// client's request for the CreateTransitGatewayRouteTable operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTransitGatewayRouteTable for more information on using the CreateTransitGatewayRouteTable -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTransitGatewayRouteTableRequest method. -// req, resp := client.CreateTransitGatewayRouteTableRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayRouteTable -func (c *EC2) CreateTransitGatewayRouteTableRequest(input *CreateTransitGatewayRouteTableInput) (req *request.Request, output *CreateTransitGatewayRouteTableOutput) { - op := &request.Operation{ - Name: opCreateTransitGatewayRouteTable, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTransitGatewayRouteTableInput{} - } - - output = &CreateTransitGatewayRouteTableOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTransitGatewayRouteTable API operation for Amazon Elastic Compute Cloud. -// -// Creates a route table for the specified transit gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateTransitGatewayRouteTable for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayRouteTable -func (c *EC2) CreateTransitGatewayRouteTable(input *CreateTransitGatewayRouteTableInput) (*CreateTransitGatewayRouteTableOutput, error) { - req, out := c.CreateTransitGatewayRouteTableRequest(input) - return out, req.Send() -} - -// CreateTransitGatewayRouteTableWithContext is the same as CreateTransitGatewayRouteTable with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTransitGatewayRouteTable for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateTransitGatewayRouteTableWithContext(ctx aws.Context, input *CreateTransitGatewayRouteTableInput, opts ...request.Option) (*CreateTransitGatewayRouteTableOutput, error) { - req, out := c.CreateTransitGatewayRouteTableRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTransitGatewayVpcAttachment = "CreateTransitGatewayVpcAttachment" - -// CreateTransitGatewayVpcAttachmentRequest generates a "aws/request.Request" representing the -// client's request for the CreateTransitGatewayVpcAttachment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTransitGatewayVpcAttachment for more information on using the CreateTransitGatewayVpcAttachment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTransitGatewayVpcAttachmentRequest method. -// req, resp := client.CreateTransitGatewayVpcAttachmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayVpcAttachment -func (c *EC2) CreateTransitGatewayVpcAttachmentRequest(input *CreateTransitGatewayVpcAttachmentInput) (req *request.Request, output *CreateTransitGatewayVpcAttachmentOutput) { - op := &request.Operation{ - Name: opCreateTransitGatewayVpcAttachment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTransitGatewayVpcAttachmentInput{} - } - - output = &CreateTransitGatewayVpcAttachmentOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTransitGatewayVpcAttachment API operation for Amazon Elastic Compute Cloud. -// -// Attaches the specified VPC to the specified transit gateway. -// -// If you attach a VPC with a CIDR range that overlaps the CIDR range of a VPC -// that is already attached, the new VPC CIDR range is not propagated to the -// default propagation route table. -// -// To send VPC traffic to an attached transit gateway, add a route to the VPC -// route table using CreateRoute. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateTransitGatewayVpcAttachment for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayVpcAttachment -func (c *EC2) CreateTransitGatewayVpcAttachment(input *CreateTransitGatewayVpcAttachmentInput) (*CreateTransitGatewayVpcAttachmentOutput, error) { - req, out := c.CreateTransitGatewayVpcAttachmentRequest(input) - return out, req.Send() -} - -// CreateTransitGatewayVpcAttachmentWithContext is the same as CreateTransitGatewayVpcAttachment with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTransitGatewayVpcAttachment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateTransitGatewayVpcAttachmentWithContext(ctx aws.Context, input *CreateTransitGatewayVpcAttachmentInput, opts ...request.Option) (*CreateTransitGatewayVpcAttachmentOutput, error) { - req, out := c.CreateTransitGatewayVpcAttachmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVolume = "CreateVolume" - -// CreateVolumeRequest generates a "aws/request.Request" representing the -// client's request for the CreateVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVolume for more information on using the CreateVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVolumeRequest method. -// req, resp := client.CreateVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolume -func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *request.Request, output *Volume) { - op := &request.Operation{ - Name: opCreateVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateVolumeInput{} - } - - output = &Volume{} - req = c.newRequest(op, input, output) - return -} - -// CreateVolume API operation for Amazon Elastic Compute Cloud. -// -// Creates an EBS volume that can be attached to an instance in the same Availability -// Zone. The volume is created in the regional endpoint that you send the HTTP -// request to. For more information see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html). -// -// You can create a new empty volume or restore a volume from an EBS snapshot. -// Any AWS Marketplace product codes from the snapshot are propagated to the -// volume. -// -// You can create encrypted volumes with the Encrypted parameter. Encrypted -// volumes may only be attached to instances that support Amazon EBS encryption. -// Volumes that are created from encrypted snapshots are also automatically -// encrypted. For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// You can tag your volumes during creation. For more information, see Tagging -// Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// For more information, see Creating an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateVolume for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolume -func (c *EC2) CreateVolume(input *CreateVolumeInput) (*Volume, error) { - req, out := c.CreateVolumeRequest(input) - return out, req.Send() -} - -// CreateVolumeWithContext is the same as CreateVolume with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateVolumeWithContext(ctx aws.Context, input *CreateVolumeInput, opts ...request.Option) (*Volume, error) { - req, out := c.CreateVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVpc = "CreateVpc" - -// CreateVpcRequest generates a "aws/request.Request" representing the -// client's request for the CreateVpc operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVpc for more information on using the CreateVpc -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVpcRequest method. -// req, resp := client.CreateVpcRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpc -func (c *EC2) CreateVpcRequest(input *CreateVpcInput) (req *request.Request, output *CreateVpcOutput) { - op := &request.Operation{ - Name: opCreateVpc, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateVpcInput{} - } - - output = &CreateVpcOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVpc API operation for Amazon Elastic Compute Cloud. -// -// Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can -// create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 -// netmask (65,536 IPv4 addresses). For more information about how large to -// make your VPC, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// You can optionally request an Amazon-provided IPv6 CIDR block for the VPC. -// The IPv6 CIDR block uses a /56 prefix length, and is allocated from Amazon's -// pool of IPv6 addresses. You cannot choose the IPv6 range for your VPC. -// -// By default, each instance you launch in the VPC has the default DHCP options, -// which include only a default DNS server that we provide (AmazonProvidedDNS). -// For more information, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// You can specify the instance tenancy value for the VPC when you create it. -// You can't change this value for the VPC after you create it. For more information, -// see Dedicated Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateVpc for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpc -func (c *EC2) CreateVpc(input *CreateVpcInput) (*CreateVpcOutput, error) { - req, out := c.CreateVpcRequest(input) - return out, req.Send() -} - -// CreateVpcWithContext is the same as CreateVpc with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVpc for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateVpcWithContext(ctx aws.Context, input *CreateVpcInput, opts ...request.Option) (*CreateVpcOutput, error) { - req, out := c.CreateVpcRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVpcEndpoint = "CreateVpcEndpoint" - -// CreateVpcEndpointRequest generates a "aws/request.Request" representing the -// client's request for the CreateVpcEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVpcEndpoint for more information on using the CreateVpcEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVpcEndpointRequest method. -// req, resp := client.CreateVpcEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpoint -func (c *EC2) CreateVpcEndpointRequest(input *CreateVpcEndpointInput) (req *request.Request, output *CreateVpcEndpointOutput) { - op := &request.Operation{ - Name: opCreateVpcEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateVpcEndpointInput{} - } - - output = &CreateVpcEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVpcEndpoint API operation for Amazon Elastic Compute Cloud. -// -// Creates a VPC endpoint for a specified service. An endpoint enables you to -// create a private connection between your VPC and the service. The service -// may be provided by AWS, an AWS Marketplace partner, or another AWS account. -// For more information, see VPC Endpoints (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-endpoints.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// A gateway endpoint serves as a target for a route in your route table for -// traffic destined for the AWS service. You can specify an endpoint policy -// to attach to the endpoint that will control access to the service from your -// VPC. You can also specify the VPC route tables that use the endpoint. -// -// An interface endpoint is a network interface in your subnet that serves as -// an endpoint for communicating with the specified service. You can specify -// the subnets in which to create an endpoint, and the security groups to associate -// with the endpoint network interface. -// -// Use DescribeVpcEndpointServices to get a list of supported 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 Amazon Elastic Compute Cloud's -// API operation CreateVpcEndpoint for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpoint -func (c *EC2) CreateVpcEndpoint(input *CreateVpcEndpointInput) (*CreateVpcEndpointOutput, error) { - req, out := c.CreateVpcEndpointRequest(input) - return out, req.Send() -} - -// CreateVpcEndpointWithContext is the same as CreateVpcEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVpcEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateVpcEndpointWithContext(ctx aws.Context, input *CreateVpcEndpointInput, opts ...request.Option) (*CreateVpcEndpointOutput, error) { - req, out := c.CreateVpcEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVpcEndpointConnectionNotification = "CreateVpcEndpointConnectionNotification" - -// CreateVpcEndpointConnectionNotificationRequest generates a "aws/request.Request" representing the -// client's request for the CreateVpcEndpointConnectionNotification operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVpcEndpointConnectionNotification for more information on using the CreateVpcEndpointConnectionNotification -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVpcEndpointConnectionNotificationRequest method. -// req, resp := client.CreateVpcEndpointConnectionNotificationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointConnectionNotification -func (c *EC2) CreateVpcEndpointConnectionNotificationRequest(input *CreateVpcEndpointConnectionNotificationInput) (req *request.Request, output *CreateVpcEndpointConnectionNotificationOutput) { - op := &request.Operation{ - Name: opCreateVpcEndpointConnectionNotification, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateVpcEndpointConnectionNotificationInput{} - } - - output = &CreateVpcEndpointConnectionNotificationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVpcEndpointConnectionNotification API operation for Amazon Elastic Compute Cloud. -// -// Creates a connection notification for a specified VPC endpoint or VPC endpoint -// service. A connection notification notifies you of specific endpoint events. -// You must create an SNS topic to receive notifications. For more information, -// see Create a Topic (http://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html) -// in the Amazon Simple Notification Service Developer Guide. -// -// You can create a connection notification for interface endpoints only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateVpcEndpointConnectionNotification for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointConnectionNotification -func (c *EC2) CreateVpcEndpointConnectionNotification(input *CreateVpcEndpointConnectionNotificationInput) (*CreateVpcEndpointConnectionNotificationOutput, error) { - req, out := c.CreateVpcEndpointConnectionNotificationRequest(input) - return out, req.Send() -} - -// CreateVpcEndpointConnectionNotificationWithContext is the same as CreateVpcEndpointConnectionNotification with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVpcEndpointConnectionNotification for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateVpcEndpointConnectionNotificationWithContext(ctx aws.Context, input *CreateVpcEndpointConnectionNotificationInput, opts ...request.Option) (*CreateVpcEndpointConnectionNotificationOutput, error) { - req, out := c.CreateVpcEndpointConnectionNotificationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVpcEndpointServiceConfiguration = "CreateVpcEndpointServiceConfiguration" - -// CreateVpcEndpointServiceConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the CreateVpcEndpointServiceConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVpcEndpointServiceConfiguration for more information on using the CreateVpcEndpointServiceConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVpcEndpointServiceConfigurationRequest method. -// req, resp := client.CreateVpcEndpointServiceConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointServiceConfiguration -func (c *EC2) CreateVpcEndpointServiceConfigurationRequest(input *CreateVpcEndpointServiceConfigurationInput) (req *request.Request, output *CreateVpcEndpointServiceConfigurationOutput) { - op := &request.Operation{ - Name: opCreateVpcEndpointServiceConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateVpcEndpointServiceConfigurationInput{} - } - - output = &CreateVpcEndpointServiceConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVpcEndpointServiceConfiguration API operation for Amazon Elastic Compute Cloud. -// -// Creates a VPC endpoint service configuration to which service consumers (AWS -// accounts, IAM users, and IAM roles) can connect. Service consumers can create -// an interface VPC endpoint to connect to your service. -// -// To create an endpoint service configuration, you must first create a Network -// Load Balancer for your service. For more information, see VPC Endpoint Services -// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/endpoint-service.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateVpcEndpointServiceConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointServiceConfiguration -func (c *EC2) CreateVpcEndpointServiceConfiguration(input *CreateVpcEndpointServiceConfigurationInput) (*CreateVpcEndpointServiceConfigurationOutput, error) { - req, out := c.CreateVpcEndpointServiceConfigurationRequest(input) - return out, req.Send() -} - -// CreateVpcEndpointServiceConfigurationWithContext is the same as CreateVpcEndpointServiceConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVpcEndpointServiceConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateVpcEndpointServiceConfigurationWithContext(ctx aws.Context, input *CreateVpcEndpointServiceConfigurationInput, opts ...request.Option) (*CreateVpcEndpointServiceConfigurationOutput, error) { - req, out := c.CreateVpcEndpointServiceConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection" - -// CreateVpcPeeringConnectionRequest generates a "aws/request.Request" representing the -// client's request for the CreateVpcPeeringConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVpcPeeringConnection for more information on using the CreateVpcPeeringConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVpcPeeringConnectionRequest method. -// req, resp := client.CreateVpcPeeringConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnection -func (c *EC2) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConnectionInput) (req *request.Request, output *CreateVpcPeeringConnectionOutput) { - op := &request.Operation{ - Name: opCreateVpcPeeringConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateVpcPeeringConnectionInput{} - } - - output = &CreateVpcPeeringConnectionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVpcPeeringConnection API operation for Amazon Elastic Compute Cloud. -// -// Requests a VPC peering connection between two VPCs: a requester VPC that -// you own and an accepter VPC with which to create the connection. The accepter -// VPC can belong to another AWS account and can be in a different Region to -// the requester VPC. The requester VPC and accepter VPC cannot have overlapping -// CIDR blocks. -// -// Limitations and rules apply to a VPC peering connection. For more information, -// see the limitations (http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/vpc-peering-basics.html#vpc-peering-limitations) -// section in the VPC Peering Guide. -// -// The owner of the accepter VPC must accept the peering request to activate -// the peering connection. The VPC peering connection request expires after -// 7 days, after which it cannot be accepted or rejected. -// -// If you create a VPC peering connection request between VPCs with overlapping -// CIDR blocks, the VPC peering connection has a status of failed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateVpcPeeringConnection for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnection -func (c *EC2) CreateVpcPeeringConnection(input *CreateVpcPeeringConnectionInput) (*CreateVpcPeeringConnectionOutput, error) { - req, out := c.CreateVpcPeeringConnectionRequest(input) - return out, req.Send() -} - -// CreateVpcPeeringConnectionWithContext is the same as CreateVpcPeeringConnection with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVpcPeeringConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateVpcPeeringConnectionWithContext(ctx aws.Context, input *CreateVpcPeeringConnectionInput, opts ...request.Option) (*CreateVpcPeeringConnectionOutput, error) { - req, out := c.CreateVpcPeeringConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVpnConnection = "CreateVpnConnection" - -// CreateVpnConnectionRequest generates a "aws/request.Request" representing the -// client's request for the CreateVpnConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVpnConnection for more information on using the CreateVpnConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVpnConnectionRequest method. -// req, resp := client.CreateVpnConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnection -func (c *EC2) CreateVpnConnectionRequest(input *CreateVpnConnectionInput) (req *request.Request, output *CreateVpnConnectionOutput) { - op := &request.Operation{ - Name: opCreateVpnConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateVpnConnectionInput{} - } - - output = &CreateVpnConnectionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVpnConnection API operation for Amazon Elastic Compute Cloud. -// -// Creates a VPN connection between an existing virtual private gateway and -// a VPN customer gateway. The only supported connection type is ipsec.1. -// -// The response includes information that you need to give to your network administrator -// to configure your customer gateway. -// -// We strongly recommend that you use HTTPS when calling this operation because -// the response contains sensitive cryptographic information for configuring -// your customer gateway. -// -// If you decide to shut down your VPN connection for any reason and later create -// a new VPN connection, you must reconfigure your customer gateway with the -// new information returned from this call. -// -// This is an idempotent operation. If you perform the operation more than once, -// Amazon EC2 doesn't return an error. -// -// For more information, see AWS Managed VPN Connections (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateVpnConnection for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnection -func (c *EC2) CreateVpnConnection(input *CreateVpnConnectionInput) (*CreateVpnConnectionOutput, error) { - req, out := c.CreateVpnConnectionRequest(input) - return out, req.Send() -} - -// CreateVpnConnectionWithContext is the same as CreateVpnConnection with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVpnConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateVpnConnectionWithContext(ctx aws.Context, input *CreateVpnConnectionInput, opts ...request.Option) (*CreateVpnConnectionOutput, error) { - req, out := c.CreateVpnConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVpnConnectionRoute = "CreateVpnConnectionRoute" - -// CreateVpnConnectionRouteRequest generates a "aws/request.Request" representing the -// client's request for the CreateVpnConnectionRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVpnConnectionRoute for more information on using the CreateVpnConnectionRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVpnConnectionRouteRequest method. -// req, resp := client.CreateVpnConnectionRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRoute -func (c *EC2) CreateVpnConnectionRouteRequest(input *CreateVpnConnectionRouteInput) (req *request.Request, output *CreateVpnConnectionRouteOutput) { - op := &request.Operation{ - Name: opCreateVpnConnectionRoute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateVpnConnectionRouteInput{} - } - - output = &CreateVpnConnectionRouteOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateVpnConnectionRoute API operation for Amazon Elastic Compute Cloud. -// -// Creates a static route associated with a VPN connection between an existing -// virtual private gateway and a VPN customer gateway. The static route allows -// traffic to be routed from the virtual private gateway to the VPN customer -// gateway. -// -// For more information about VPN connections, see AWS Managed VPN Connections -// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) in the -// Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateVpnConnectionRoute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRoute -func (c *EC2) CreateVpnConnectionRoute(input *CreateVpnConnectionRouteInput) (*CreateVpnConnectionRouteOutput, error) { - req, out := c.CreateVpnConnectionRouteRequest(input) - return out, req.Send() -} - -// CreateVpnConnectionRouteWithContext is the same as CreateVpnConnectionRoute with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVpnConnectionRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateVpnConnectionRouteWithContext(ctx aws.Context, input *CreateVpnConnectionRouteInput, opts ...request.Option) (*CreateVpnConnectionRouteOutput, error) { - req, out := c.CreateVpnConnectionRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVpnGateway = "CreateVpnGateway" - -// CreateVpnGatewayRequest generates a "aws/request.Request" representing the -// client's request for the CreateVpnGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVpnGateway for more information on using the CreateVpnGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVpnGatewayRequest method. -// req, resp := client.CreateVpnGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnGateway -func (c *EC2) CreateVpnGatewayRequest(input *CreateVpnGatewayInput) (req *request.Request, output *CreateVpnGatewayOutput) { - op := &request.Operation{ - Name: opCreateVpnGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateVpnGatewayInput{} - } - - output = &CreateVpnGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVpnGateway API operation for Amazon Elastic Compute Cloud. -// -// Creates a virtual private gateway. A virtual private gateway is the endpoint -// on the VPC side of your VPN connection. You can create a virtual private -// gateway before creating the VPC itself. -// -// For more information about virtual private gateways, see AWS Managed VPN -// Connections (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation CreateVpnGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnGateway -func (c *EC2) CreateVpnGateway(input *CreateVpnGatewayInput) (*CreateVpnGatewayOutput, error) { - req, out := c.CreateVpnGatewayRequest(input) - return out, req.Send() -} - -// CreateVpnGatewayWithContext is the same as CreateVpnGateway with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVpnGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) CreateVpnGatewayWithContext(ctx aws.Context, input *CreateVpnGatewayInput, opts ...request.Option) (*CreateVpnGatewayOutput, error) { - req, out := c.CreateVpnGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteClientVpnEndpoint = "DeleteClientVpnEndpoint" - -// DeleteClientVpnEndpointRequest generates a "aws/request.Request" representing the -// client's request for the DeleteClientVpnEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteClientVpnEndpoint for more information on using the DeleteClientVpnEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteClientVpnEndpointRequest method. -// req, resp := client.DeleteClientVpnEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteClientVpnEndpoint -func (c *EC2) DeleteClientVpnEndpointRequest(input *DeleteClientVpnEndpointInput) (req *request.Request, output *DeleteClientVpnEndpointOutput) { - op := &request.Operation{ - Name: opDeleteClientVpnEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteClientVpnEndpointInput{} - } - - output = &DeleteClientVpnEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteClientVpnEndpoint API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified Client VPN endpoint. You must disassociate all target -// networks before you can delete a Client VPN endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteClientVpnEndpoint for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteClientVpnEndpoint -func (c *EC2) DeleteClientVpnEndpoint(input *DeleteClientVpnEndpointInput) (*DeleteClientVpnEndpointOutput, error) { - req, out := c.DeleteClientVpnEndpointRequest(input) - return out, req.Send() -} - -// DeleteClientVpnEndpointWithContext is the same as DeleteClientVpnEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteClientVpnEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteClientVpnEndpointWithContext(ctx aws.Context, input *DeleteClientVpnEndpointInput, opts ...request.Option) (*DeleteClientVpnEndpointOutput, error) { - req, out := c.DeleteClientVpnEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteClientVpnRoute = "DeleteClientVpnRoute" - -// DeleteClientVpnRouteRequest generates a "aws/request.Request" representing the -// client's request for the DeleteClientVpnRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteClientVpnRoute for more information on using the DeleteClientVpnRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteClientVpnRouteRequest method. -// req, resp := client.DeleteClientVpnRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteClientVpnRoute -func (c *EC2) DeleteClientVpnRouteRequest(input *DeleteClientVpnRouteInput) (req *request.Request, output *DeleteClientVpnRouteOutput) { - op := &request.Operation{ - Name: opDeleteClientVpnRoute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteClientVpnRouteInput{} - } - - output = &DeleteClientVpnRouteOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteClientVpnRoute API operation for Amazon Elastic Compute Cloud. -// -// Deletes a route from a Client VPN endpoint. You can only delete routes that -// you manually added using the CreateClientVpnRoute action. You cannot delete -// routes that were automatically added when associating a subnet. To remove -// routes that have been automatically added, disassociate the target subnet -// from the Client VPN endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteClientVpnRoute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteClientVpnRoute -func (c *EC2) DeleteClientVpnRoute(input *DeleteClientVpnRouteInput) (*DeleteClientVpnRouteOutput, error) { - req, out := c.DeleteClientVpnRouteRequest(input) - return out, req.Send() -} - -// DeleteClientVpnRouteWithContext is the same as DeleteClientVpnRoute with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteClientVpnRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteClientVpnRouteWithContext(ctx aws.Context, input *DeleteClientVpnRouteInput, opts ...request.Option) (*DeleteClientVpnRouteOutput, error) { - req, out := c.DeleteClientVpnRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCustomerGateway = "DeleteCustomerGateway" - -// DeleteCustomerGatewayRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCustomerGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCustomerGateway for more information on using the DeleteCustomerGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCustomerGatewayRequest method. -// req, resp := client.DeleteCustomerGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteCustomerGateway -func (c *EC2) DeleteCustomerGatewayRequest(input *DeleteCustomerGatewayInput) (req *request.Request, output *DeleteCustomerGatewayOutput) { - op := &request.Operation{ - Name: opDeleteCustomerGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCustomerGatewayInput{} - } - - output = &DeleteCustomerGatewayOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCustomerGateway API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified customer gateway. You must delete the VPN connection -// before you can delete the customer gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteCustomerGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteCustomerGateway -func (c *EC2) DeleteCustomerGateway(input *DeleteCustomerGatewayInput) (*DeleteCustomerGatewayOutput, error) { - req, out := c.DeleteCustomerGatewayRequest(input) - return out, req.Send() -} - -// DeleteCustomerGatewayWithContext is the same as DeleteCustomerGateway with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCustomerGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteCustomerGatewayWithContext(ctx aws.Context, input *DeleteCustomerGatewayInput, opts ...request.Option) (*DeleteCustomerGatewayOutput, error) { - req, out := c.DeleteCustomerGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDhcpOptions = "DeleteDhcpOptions" - -// DeleteDhcpOptionsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDhcpOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDhcpOptions for more information on using the DeleteDhcpOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDhcpOptionsRequest method. -// req, resp := client.DeleteDhcpOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptions -func (c *EC2) DeleteDhcpOptionsRequest(input *DeleteDhcpOptionsInput) (req *request.Request, output *DeleteDhcpOptionsOutput) { - op := &request.Operation{ - Name: opDeleteDhcpOptions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDhcpOptionsInput{} - } - - output = &DeleteDhcpOptionsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDhcpOptions API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified set of DHCP options. You must disassociate the set -// of DHCP options before you can delete it. You can disassociate the set of -// DHCP options by associating either a new set of options or the default set -// of options with the VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteDhcpOptions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptions -func (c *EC2) DeleteDhcpOptions(input *DeleteDhcpOptionsInput) (*DeleteDhcpOptionsOutput, error) { - req, out := c.DeleteDhcpOptionsRequest(input) - return out, req.Send() -} - -// DeleteDhcpOptionsWithContext is the same as DeleteDhcpOptions with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDhcpOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteDhcpOptionsWithContext(ctx aws.Context, input *DeleteDhcpOptionsInput, opts ...request.Option) (*DeleteDhcpOptionsOutput, error) { - req, out := c.DeleteDhcpOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEgressOnlyInternetGateway = "DeleteEgressOnlyInternetGateway" - -// DeleteEgressOnlyInternetGatewayRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEgressOnlyInternetGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEgressOnlyInternetGateway for more information on using the DeleteEgressOnlyInternetGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEgressOnlyInternetGatewayRequest method. -// req, resp := client.DeleteEgressOnlyInternetGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteEgressOnlyInternetGateway -func (c *EC2) DeleteEgressOnlyInternetGatewayRequest(input *DeleteEgressOnlyInternetGatewayInput) (req *request.Request, output *DeleteEgressOnlyInternetGatewayOutput) { - op := &request.Operation{ - Name: opDeleteEgressOnlyInternetGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteEgressOnlyInternetGatewayInput{} - } - - output = &DeleteEgressOnlyInternetGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteEgressOnlyInternetGateway API operation for Amazon Elastic Compute Cloud. -// -// Deletes an egress-only internet gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteEgressOnlyInternetGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteEgressOnlyInternetGateway -func (c *EC2) DeleteEgressOnlyInternetGateway(input *DeleteEgressOnlyInternetGatewayInput) (*DeleteEgressOnlyInternetGatewayOutput, error) { - req, out := c.DeleteEgressOnlyInternetGatewayRequest(input) - return out, req.Send() -} - -// DeleteEgressOnlyInternetGatewayWithContext is the same as DeleteEgressOnlyInternetGateway with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEgressOnlyInternetGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteEgressOnlyInternetGatewayWithContext(ctx aws.Context, input *DeleteEgressOnlyInternetGatewayInput, opts ...request.Option) (*DeleteEgressOnlyInternetGatewayOutput, error) { - req, out := c.DeleteEgressOnlyInternetGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFleets = "DeleteFleets" - -// DeleteFleetsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFleets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFleets for more information on using the DeleteFleets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFleetsRequest method. -// req, resp := client.DeleteFleetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFleets -func (c *EC2) DeleteFleetsRequest(input *DeleteFleetsInput) (req *request.Request, output *DeleteFleetsOutput) { - op := &request.Operation{ - Name: opDeleteFleets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteFleetsInput{} - } - - output = &DeleteFleetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteFleets API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified EC2 Fleet. -// -// After you delete an EC2 Fleet, it launches no new instances. You must specify -// whether an EC2 Fleet should also terminate its instances. If you terminate -// the instances, the EC2 Fleet enters the deleted_terminating state. Otherwise, -// the EC2 Fleet enters the deleted_running state, and the instances continue -// to run until they are interrupted or you terminate them manually. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteFleets for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFleets -func (c *EC2) DeleteFleets(input *DeleteFleetsInput) (*DeleteFleetsOutput, error) { - req, out := c.DeleteFleetsRequest(input) - return out, req.Send() -} - -// DeleteFleetsWithContext is the same as DeleteFleets with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFleets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteFleetsWithContext(ctx aws.Context, input *DeleteFleetsInput, opts ...request.Option) (*DeleteFleetsOutput, error) { - req, out := c.DeleteFleetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFlowLogs = "DeleteFlowLogs" - -// DeleteFlowLogsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFlowLogs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFlowLogs for more information on using the DeleteFlowLogs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFlowLogsRequest method. -// req, resp := client.DeleteFlowLogsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFlowLogs -func (c *EC2) DeleteFlowLogsRequest(input *DeleteFlowLogsInput) (req *request.Request, output *DeleteFlowLogsOutput) { - op := &request.Operation{ - Name: opDeleteFlowLogs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteFlowLogsInput{} - } - - output = &DeleteFlowLogsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteFlowLogs API operation for Amazon Elastic Compute Cloud. -// -// Deletes one or more flow logs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteFlowLogs for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFlowLogs -func (c *EC2) DeleteFlowLogs(input *DeleteFlowLogsInput) (*DeleteFlowLogsOutput, error) { - req, out := c.DeleteFlowLogsRequest(input) - return out, req.Send() -} - -// DeleteFlowLogsWithContext is the same as DeleteFlowLogs with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFlowLogs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteFlowLogsWithContext(ctx aws.Context, input *DeleteFlowLogsInput, opts ...request.Option) (*DeleteFlowLogsOutput, error) { - req, out := c.DeleteFlowLogsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFpgaImage = "DeleteFpgaImage" - -// DeleteFpgaImageRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFpgaImage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFpgaImage for more information on using the DeleteFpgaImage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFpgaImageRequest method. -// req, resp := client.DeleteFpgaImageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFpgaImage -func (c *EC2) DeleteFpgaImageRequest(input *DeleteFpgaImageInput) (req *request.Request, output *DeleteFpgaImageOutput) { - op := &request.Operation{ - Name: opDeleteFpgaImage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteFpgaImageInput{} - } - - output = &DeleteFpgaImageOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteFpgaImage API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified Amazon FPGA Image (AFI). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteFpgaImage for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFpgaImage -func (c *EC2) DeleteFpgaImage(input *DeleteFpgaImageInput) (*DeleteFpgaImageOutput, error) { - req, out := c.DeleteFpgaImageRequest(input) - return out, req.Send() -} - -// DeleteFpgaImageWithContext is the same as DeleteFpgaImage with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFpgaImage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteFpgaImageWithContext(ctx aws.Context, input *DeleteFpgaImageInput, opts ...request.Option) (*DeleteFpgaImageOutput, error) { - req, out := c.DeleteFpgaImageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteInternetGateway = "DeleteInternetGateway" - -// DeleteInternetGatewayRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInternetGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteInternetGateway for more information on using the DeleteInternetGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteInternetGatewayRequest method. -// req, resp := client.DeleteInternetGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGateway -func (c *EC2) DeleteInternetGatewayRequest(input *DeleteInternetGatewayInput) (req *request.Request, output *DeleteInternetGatewayOutput) { - op := &request.Operation{ - Name: opDeleteInternetGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteInternetGatewayInput{} - } - - output = &DeleteInternetGatewayOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteInternetGateway API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified internet gateway. You must detach the internet gateway -// from the VPC before you can delete 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 Amazon Elastic Compute Cloud's -// API operation DeleteInternetGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGateway -func (c *EC2) DeleteInternetGateway(input *DeleteInternetGatewayInput) (*DeleteInternetGatewayOutput, error) { - req, out := c.DeleteInternetGatewayRequest(input) - return out, req.Send() -} - -// DeleteInternetGatewayWithContext is the same as DeleteInternetGateway with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteInternetGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteInternetGatewayWithContext(ctx aws.Context, input *DeleteInternetGatewayInput, opts ...request.Option) (*DeleteInternetGatewayOutput, error) { - req, out := c.DeleteInternetGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteKeyPair = "DeleteKeyPair" - -// DeleteKeyPairRequest generates a "aws/request.Request" representing the -// client's request for the DeleteKeyPair operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteKeyPair for more information on using the DeleteKeyPair -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteKeyPairRequest method. -// req, resp := client.DeleteKeyPairRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPair -func (c *EC2) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *request.Request, output *DeleteKeyPairOutput) { - op := &request.Operation{ - Name: opDeleteKeyPair, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteKeyPairInput{} - } - - output = &DeleteKeyPairOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteKeyPair API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified key pair, by removing the public key from Amazon EC2. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteKeyPair for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPair -func (c *EC2) DeleteKeyPair(input *DeleteKeyPairInput) (*DeleteKeyPairOutput, error) { - req, out := c.DeleteKeyPairRequest(input) - return out, req.Send() -} - -// DeleteKeyPairWithContext is the same as DeleteKeyPair with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteKeyPair for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteKeyPairWithContext(ctx aws.Context, input *DeleteKeyPairInput, opts ...request.Option) (*DeleteKeyPairOutput, error) { - req, out := c.DeleteKeyPairRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLaunchTemplate = "DeleteLaunchTemplate" - -// DeleteLaunchTemplateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLaunchTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLaunchTemplate for more information on using the DeleteLaunchTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLaunchTemplateRequest method. -// req, resp := client.DeleteLaunchTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplate -func (c *EC2) DeleteLaunchTemplateRequest(input *DeleteLaunchTemplateInput) (req *request.Request, output *DeleteLaunchTemplateOutput) { - op := &request.Operation{ - Name: opDeleteLaunchTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLaunchTemplateInput{} - } - - output = &DeleteLaunchTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteLaunchTemplate API operation for Amazon Elastic Compute Cloud. -// -// Deletes a launch template. Deleting a launch template deletes all of its -// versions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteLaunchTemplate for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplate -func (c *EC2) DeleteLaunchTemplate(input *DeleteLaunchTemplateInput) (*DeleteLaunchTemplateOutput, error) { - req, out := c.DeleteLaunchTemplateRequest(input) - return out, req.Send() -} - -// DeleteLaunchTemplateWithContext is the same as DeleteLaunchTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLaunchTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteLaunchTemplateWithContext(ctx aws.Context, input *DeleteLaunchTemplateInput, opts ...request.Option) (*DeleteLaunchTemplateOutput, error) { - req, out := c.DeleteLaunchTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLaunchTemplateVersions = "DeleteLaunchTemplateVersions" - -// DeleteLaunchTemplateVersionsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLaunchTemplateVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLaunchTemplateVersions for more information on using the DeleteLaunchTemplateVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLaunchTemplateVersionsRequest method. -// req, resp := client.DeleteLaunchTemplateVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplateVersions -func (c *EC2) DeleteLaunchTemplateVersionsRequest(input *DeleteLaunchTemplateVersionsInput) (req *request.Request, output *DeleteLaunchTemplateVersionsOutput) { - op := &request.Operation{ - Name: opDeleteLaunchTemplateVersions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLaunchTemplateVersionsInput{} - } - - output = &DeleteLaunchTemplateVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteLaunchTemplateVersions API operation for Amazon Elastic Compute Cloud. -// -// Deletes one or more versions of a launch template. You cannot delete the -// default version of a launch template; you must first assign a different version -// as the default. If the default version is the only version for the launch -// template, you must delete the entire launch template using DeleteLaunchTemplate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteLaunchTemplateVersions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplateVersions -func (c *EC2) DeleteLaunchTemplateVersions(input *DeleteLaunchTemplateVersionsInput) (*DeleteLaunchTemplateVersionsOutput, error) { - req, out := c.DeleteLaunchTemplateVersionsRequest(input) - return out, req.Send() -} - -// DeleteLaunchTemplateVersionsWithContext is the same as DeleteLaunchTemplateVersions with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLaunchTemplateVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteLaunchTemplateVersionsWithContext(ctx aws.Context, input *DeleteLaunchTemplateVersionsInput, opts ...request.Option) (*DeleteLaunchTemplateVersionsOutput, error) { - req, out := c.DeleteLaunchTemplateVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteNatGateway = "DeleteNatGateway" - -// DeleteNatGatewayRequest generates a "aws/request.Request" representing the -// client's request for the DeleteNatGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteNatGateway for more information on using the DeleteNatGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteNatGatewayRequest method. -// req, resp := client.DeleteNatGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNatGateway -func (c *EC2) DeleteNatGatewayRequest(input *DeleteNatGatewayInput) (req *request.Request, output *DeleteNatGatewayOutput) { - op := &request.Operation{ - Name: opDeleteNatGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteNatGatewayInput{} - } - - output = &DeleteNatGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteNatGateway API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified NAT gateway. Deleting a NAT gateway disassociates its -// Elastic IP address, but does not release the address from your account. Deleting -// a NAT gateway does not delete any NAT gateway routes in your route tables. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteNatGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNatGateway -func (c *EC2) DeleteNatGateway(input *DeleteNatGatewayInput) (*DeleteNatGatewayOutput, error) { - req, out := c.DeleteNatGatewayRequest(input) - return out, req.Send() -} - -// DeleteNatGatewayWithContext is the same as DeleteNatGateway with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteNatGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteNatGatewayWithContext(ctx aws.Context, input *DeleteNatGatewayInput, opts ...request.Option) (*DeleteNatGatewayOutput, error) { - req, out := c.DeleteNatGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteNetworkAcl = "DeleteNetworkAcl" - -// DeleteNetworkAclRequest generates a "aws/request.Request" representing the -// client's request for the DeleteNetworkAcl operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteNetworkAcl for more information on using the DeleteNetworkAcl -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteNetworkAclRequest method. -// req, resp := client.DeleteNetworkAclRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAcl -func (c *EC2) DeleteNetworkAclRequest(input *DeleteNetworkAclInput) (req *request.Request, output *DeleteNetworkAclOutput) { - op := &request.Operation{ - Name: opDeleteNetworkAcl, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteNetworkAclInput{} - } - - output = &DeleteNetworkAclOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteNetworkAcl API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified network ACL. You can't delete the ACL if it's associated -// with any subnets. You can't delete the default network ACL. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteNetworkAcl for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAcl -func (c *EC2) DeleteNetworkAcl(input *DeleteNetworkAclInput) (*DeleteNetworkAclOutput, error) { - req, out := c.DeleteNetworkAclRequest(input) - return out, req.Send() -} - -// DeleteNetworkAclWithContext is the same as DeleteNetworkAcl with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteNetworkAcl for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteNetworkAclWithContext(ctx aws.Context, input *DeleteNetworkAclInput, opts ...request.Option) (*DeleteNetworkAclOutput, error) { - req, out := c.DeleteNetworkAclRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteNetworkAclEntry = "DeleteNetworkAclEntry" - -// DeleteNetworkAclEntryRequest generates a "aws/request.Request" representing the -// client's request for the DeleteNetworkAclEntry operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteNetworkAclEntry for more information on using the DeleteNetworkAclEntry -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteNetworkAclEntryRequest method. -// req, resp := client.DeleteNetworkAclEntryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntry -func (c *EC2) DeleteNetworkAclEntryRequest(input *DeleteNetworkAclEntryInput) (req *request.Request, output *DeleteNetworkAclEntryOutput) { - op := &request.Operation{ - Name: opDeleteNetworkAclEntry, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteNetworkAclEntryInput{} - } - - output = &DeleteNetworkAclEntryOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteNetworkAclEntry API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified ingress or egress entry (rule) from the specified network -// ACL. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteNetworkAclEntry for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntry -func (c *EC2) DeleteNetworkAclEntry(input *DeleteNetworkAclEntryInput) (*DeleteNetworkAclEntryOutput, error) { - req, out := c.DeleteNetworkAclEntryRequest(input) - return out, req.Send() -} - -// DeleteNetworkAclEntryWithContext is the same as DeleteNetworkAclEntry with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteNetworkAclEntry for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteNetworkAclEntryWithContext(ctx aws.Context, input *DeleteNetworkAclEntryInput, opts ...request.Option) (*DeleteNetworkAclEntryOutput, error) { - req, out := c.DeleteNetworkAclEntryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteNetworkInterface = "DeleteNetworkInterface" - -// DeleteNetworkInterfaceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteNetworkInterface operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteNetworkInterface for more information on using the DeleteNetworkInterface -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteNetworkInterfaceRequest method. -// req, resp := client.DeleteNetworkInterfaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterface -func (c *EC2) DeleteNetworkInterfaceRequest(input *DeleteNetworkInterfaceInput) (req *request.Request, output *DeleteNetworkInterfaceOutput) { - op := &request.Operation{ - Name: opDeleteNetworkInterface, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteNetworkInterfaceInput{} - } - - output = &DeleteNetworkInterfaceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteNetworkInterface API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified network interface. You must detach the network interface -// before you can delete 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 Amazon Elastic Compute Cloud's -// API operation DeleteNetworkInterface for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterface -func (c *EC2) DeleteNetworkInterface(input *DeleteNetworkInterfaceInput) (*DeleteNetworkInterfaceOutput, error) { - req, out := c.DeleteNetworkInterfaceRequest(input) - return out, req.Send() -} - -// DeleteNetworkInterfaceWithContext is the same as DeleteNetworkInterface with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteNetworkInterface for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteNetworkInterfaceWithContext(ctx aws.Context, input *DeleteNetworkInterfaceInput, opts ...request.Option) (*DeleteNetworkInterfaceOutput, error) { - req, out := c.DeleteNetworkInterfaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteNetworkInterfacePermission = "DeleteNetworkInterfacePermission" - -// DeleteNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteNetworkInterfacePermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteNetworkInterfacePermission for more information on using the DeleteNetworkInterfacePermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteNetworkInterfacePermissionRequest method. -// req, resp := client.DeleteNetworkInterfacePermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermission -func (c *EC2) DeleteNetworkInterfacePermissionRequest(input *DeleteNetworkInterfacePermissionInput) (req *request.Request, output *DeleteNetworkInterfacePermissionOutput) { - op := &request.Operation{ - Name: opDeleteNetworkInterfacePermission, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteNetworkInterfacePermissionInput{} - } - - output = &DeleteNetworkInterfacePermissionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteNetworkInterfacePermission API operation for Amazon Elastic Compute Cloud. -// -// Deletes a permission for a network interface. By default, you cannot delete -// the permission if the account for which you're removing the permission has -// attached the network interface to an instance. However, you can force delete -// the permission, regardless of any attachment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteNetworkInterfacePermission for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermission -func (c *EC2) DeleteNetworkInterfacePermission(input *DeleteNetworkInterfacePermissionInput) (*DeleteNetworkInterfacePermissionOutput, error) { - req, out := c.DeleteNetworkInterfacePermissionRequest(input) - return out, req.Send() -} - -// DeleteNetworkInterfacePermissionWithContext is the same as DeleteNetworkInterfacePermission with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteNetworkInterfacePermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteNetworkInterfacePermissionWithContext(ctx aws.Context, input *DeleteNetworkInterfacePermissionInput, opts ...request.Option) (*DeleteNetworkInterfacePermissionOutput, error) { - req, out := c.DeleteNetworkInterfacePermissionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePlacementGroup = "DeletePlacementGroup" - -// DeletePlacementGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeletePlacementGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePlacementGroup for more information on using the DeletePlacementGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePlacementGroupRequest method. -// req, resp := client.DeletePlacementGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroup -func (c *EC2) DeletePlacementGroupRequest(input *DeletePlacementGroupInput) (req *request.Request, output *DeletePlacementGroupOutput) { - op := &request.Operation{ - Name: opDeletePlacementGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePlacementGroupInput{} - } - - output = &DeletePlacementGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePlacementGroup API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified placement group. You must terminate all instances in -// the placement group before you can delete the placement group. For more information, -// see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeletePlacementGroup for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroup -func (c *EC2) DeletePlacementGroup(input *DeletePlacementGroupInput) (*DeletePlacementGroupOutput, error) { - req, out := c.DeletePlacementGroupRequest(input) - return out, req.Send() -} - -// DeletePlacementGroupWithContext is the same as DeletePlacementGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePlacementGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeletePlacementGroupWithContext(ctx aws.Context, input *DeletePlacementGroupInput, opts ...request.Option) (*DeletePlacementGroupOutput, error) { - req, out := c.DeletePlacementGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRoute = "DeleteRoute" - -// DeleteRouteRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRoute for more information on using the DeleteRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRouteRequest method. -// req, resp := client.DeleteRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRoute -func (c *EC2) DeleteRouteRequest(input *DeleteRouteInput) (req *request.Request, output *DeleteRouteOutput) { - op := &request.Operation{ - Name: opDeleteRoute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRouteInput{} - } - - output = &DeleteRouteOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRoute API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified route from the specified route table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteRoute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRoute -func (c *EC2) DeleteRoute(input *DeleteRouteInput) (*DeleteRouteOutput, error) { - req, out := c.DeleteRouteRequest(input) - return out, req.Send() -} - -// DeleteRouteWithContext is the same as DeleteRoute with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteRouteWithContext(ctx aws.Context, input *DeleteRouteInput, opts ...request.Option) (*DeleteRouteOutput, error) { - req, out := c.DeleteRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRouteTable = "DeleteRouteTable" - -// DeleteRouteTableRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRouteTable operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRouteTable for more information on using the DeleteRouteTable -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRouteTableRequest method. -// req, resp := client.DeleteRouteTableRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTable -func (c *EC2) DeleteRouteTableRequest(input *DeleteRouteTableInput) (req *request.Request, output *DeleteRouteTableOutput) { - op := &request.Operation{ - Name: opDeleteRouteTable, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRouteTableInput{} - } - - output = &DeleteRouteTableOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRouteTable API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified route table. You must disassociate the route table -// from any subnets before you can delete it. You can't delete the main route -// table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteRouteTable for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTable -func (c *EC2) DeleteRouteTable(input *DeleteRouteTableInput) (*DeleteRouteTableOutput, error) { - req, out := c.DeleteRouteTableRequest(input) - return out, req.Send() -} - -// DeleteRouteTableWithContext is the same as DeleteRouteTable with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRouteTable for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteRouteTableWithContext(ctx aws.Context, input *DeleteRouteTableInput, opts ...request.Option) (*DeleteRouteTableOutput, error) { - req, out := c.DeleteRouteTableRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSecurityGroup = "DeleteSecurityGroup" - -// DeleteSecurityGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSecurityGroup for more information on using the DeleteSecurityGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSecurityGroupRequest method. -// req, resp := client.DeleteSecurityGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroup -func (c *EC2) DeleteSecurityGroupRequest(input *DeleteSecurityGroupInput) (req *request.Request, output *DeleteSecurityGroupOutput) { - op := &request.Operation{ - Name: opDeleteSecurityGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSecurityGroupInput{} - } - - output = &DeleteSecurityGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSecurityGroup API operation for Amazon Elastic Compute Cloud. -// -// Deletes a security group. -// -// If you attempt to delete a security group that is associated with an instance, -// or is referenced by another security group, the operation fails with InvalidGroup.InUse -// in EC2-Classic or DependencyViolation in EC2-VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteSecurityGroup for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroup -func (c *EC2) DeleteSecurityGroup(input *DeleteSecurityGroupInput) (*DeleteSecurityGroupOutput, error) { - req, out := c.DeleteSecurityGroupRequest(input) - return out, req.Send() -} - -// DeleteSecurityGroupWithContext is the same as DeleteSecurityGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSecurityGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteSecurityGroupWithContext(ctx aws.Context, input *DeleteSecurityGroupInput, opts ...request.Option) (*DeleteSecurityGroupOutput, error) { - req, out := c.DeleteSecurityGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSnapshot = "DeleteSnapshot" - -// DeleteSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSnapshot for more information on using the DeleteSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSnapshotRequest method. -// req, resp := client.DeleteSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshot -func (c *EC2) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *request.Request, output *DeleteSnapshotOutput) { - op := &request.Operation{ - Name: opDeleteSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSnapshotInput{} - } - - output = &DeleteSnapshotOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSnapshot API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified snapshot. -// -// When you make periodic snapshots of a volume, the snapshots are incremental, -// and only the blocks on the device that have changed since your last snapshot -// are saved in the new snapshot. When you delete a snapshot, only the data -// not needed for any other snapshot is removed. So regardless of which prior -// snapshots have been deleted, all active snapshots will have access to all -// the information needed to restore the volume. -// -// You cannot delete a snapshot of the root device of an EBS volume used by -// a registered AMI. You must first de-register the AMI before you can delete -// the snapshot. -// -// For more information, see Deleting an Amazon EBS Snapshot (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteSnapshot for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshot -func (c *EC2) DeleteSnapshot(input *DeleteSnapshotInput) (*DeleteSnapshotOutput, error) { - req, out := c.DeleteSnapshotRequest(input) - return out, req.Send() -} - -// DeleteSnapshotWithContext is the same as DeleteSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteSnapshotWithContext(ctx aws.Context, input *DeleteSnapshotInput, opts ...request.Option) (*DeleteSnapshotOutput, error) { - req, out := c.DeleteSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSpotDatafeedSubscription = "DeleteSpotDatafeedSubscription" - -// DeleteSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSpotDatafeedSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSpotDatafeedSubscription for more information on using the DeleteSpotDatafeedSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSpotDatafeedSubscriptionRequest method. -// req, resp := client.DeleteSpotDatafeedSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscription -func (c *EC2) DeleteSpotDatafeedSubscriptionRequest(input *DeleteSpotDatafeedSubscriptionInput) (req *request.Request, output *DeleteSpotDatafeedSubscriptionOutput) { - op := &request.Operation{ - Name: opDeleteSpotDatafeedSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSpotDatafeedSubscriptionInput{} - } - - output = &DeleteSpotDatafeedSubscriptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSpotDatafeedSubscription API operation for Amazon Elastic Compute Cloud. -// -// Deletes the data feed for Spot Instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteSpotDatafeedSubscription for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscription -func (c *EC2) DeleteSpotDatafeedSubscription(input *DeleteSpotDatafeedSubscriptionInput) (*DeleteSpotDatafeedSubscriptionOutput, error) { - req, out := c.DeleteSpotDatafeedSubscriptionRequest(input) - return out, req.Send() -} - -// DeleteSpotDatafeedSubscriptionWithContext is the same as DeleteSpotDatafeedSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSpotDatafeedSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteSpotDatafeedSubscriptionWithContext(ctx aws.Context, input *DeleteSpotDatafeedSubscriptionInput, opts ...request.Option) (*DeleteSpotDatafeedSubscriptionOutput, error) { - req, out := c.DeleteSpotDatafeedSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSubnet = "DeleteSubnet" - -// DeleteSubnetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSubnet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSubnet for more information on using the DeleteSubnet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSubnetRequest method. -// req, resp := client.DeleteSubnetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnet -func (c *EC2) DeleteSubnetRequest(input *DeleteSubnetInput) (req *request.Request, output *DeleteSubnetOutput) { - op := &request.Operation{ - Name: opDeleteSubnet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSubnetInput{} - } - - output = &DeleteSubnetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSubnet API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified subnet. You must terminate all running instances in -// the subnet before you can delete the subnet. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteSubnet for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnet -func (c *EC2) DeleteSubnet(input *DeleteSubnetInput) (*DeleteSubnetOutput, error) { - req, out := c.DeleteSubnetRequest(input) - return out, req.Send() -} - -// DeleteSubnetWithContext is the same as DeleteSubnet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSubnet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteSubnetWithContext(ctx aws.Context, input *DeleteSubnetInput, opts ...request.Option) (*DeleteSubnetOutput, error) { - req, out := c.DeleteSubnetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTags = "DeleteTags" - -// DeleteTagsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTags for more information on using the DeleteTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTagsRequest method. -// req, resp := client.DeleteTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTags -func (c *EC2) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { - op := &request.Operation{ - Name: opDeleteTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTagsInput{} - } - - output = &DeleteTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTags API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified set of tags from the specified set of resources. -// -// To list the current tags, use DescribeTags. For more information about tags, -// see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteTags for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTags -func (c *EC2) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - return out, req.Send() -} - -// DeleteTagsWithContext is the same as DeleteTags with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTransitGateway = "DeleteTransitGateway" - -// DeleteTransitGatewayRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTransitGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTransitGateway for more information on using the DeleteTransitGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTransitGatewayRequest method. -// req, resp := client.DeleteTransitGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGateway -func (c *EC2) DeleteTransitGatewayRequest(input *DeleteTransitGatewayInput) (req *request.Request, output *DeleteTransitGatewayOutput) { - op := &request.Operation{ - Name: opDeleteTransitGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTransitGatewayInput{} - } - - output = &DeleteTransitGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteTransitGateway API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified transit gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteTransitGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGateway -func (c *EC2) DeleteTransitGateway(input *DeleteTransitGatewayInput) (*DeleteTransitGatewayOutput, error) { - req, out := c.DeleteTransitGatewayRequest(input) - return out, req.Send() -} - -// DeleteTransitGatewayWithContext is the same as DeleteTransitGateway with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTransitGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteTransitGatewayWithContext(ctx aws.Context, input *DeleteTransitGatewayInput, opts ...request.Option) (*DeleteTransitGatewayOutput, error) { - req, out := c.DeleteTransitGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTransitGatewayRoute = "DeleteTransitGatewayRoute" - -// DeleteTransitGatewayRouteRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTransitGatewayRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTransitGatewayRoute for more information on using the DeleteTransitGatewayRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTransitGatewayRouteRequest method. -// req, resp := client.DeleteTransitGatewayRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayRoute -func (c *EC2) DeleteTransitGatewayRouteRequest(input *DeleteTransitGatewayRouteInput) (req *request.Request, output *DeleteTransitGatewayRouteOutput) { - op := &request.Operation{ - Name: opDeleteTransitGatewayRoute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTransitGatewayRouteInput{} - } - - output = &DeleteTransitGatewayRouteOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteTransitGatewayRoute API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified route from the specified transit gateway route table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteTransitGatewayRoute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayRoute -func (c *EC2) DeleteTransitGatewayRoute(input *DeleteTransitGatewayRouteInput) (*DeleteTransitGatewayRouteOutput, error) { - req, out := c.DeleteTransitGatewayRouteRequest(input) - return out, req.Send() -} - -// DeleteTransitGatewayRouteWithContext is the same as DeleteTransitGatewayRoute with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTransitGatewayRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteTransitGatewayRouteWithContext(ctx aws.Context, input *DeleteTransitGatewayRouteInput, opts ...request.Option) (*DeleteTransitGatewayRouteOutput, error) { - req, out := c.DeleteTransitGatewayRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTransitGatewayRouteTable = "DeleteTransitGatewayRouteTable" - -// DeleteTransitGatewayRouteTableRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTransitGatewayRouteTable operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTransitGatewayRouteTable for more information on using the DeleteTransitGatewayRouteTable -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTransitGatewayRouteTableRequest method. -// req, resp := client.DeleteTransitGatewayRouteTableRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayRouteTable -func (c *EC2) DeleteTransitGatewayRouteTableRequest(input *DeleteTransitGatewayRouteTableInput) (req *request.Request, output *DeleteTransitGatewayRouteTableOutput) { - op := &request.Operation{ - Name: opDeleteTransitGatewayRouteTable, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTransitGatewayRouteTableInput{} - } - - output = &DeleteTransitGatewayRouteTableOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteTransitGatewayRouteTable API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified transit gateway route table. You must disassociate -// the route table from any transit gateway route tables before you can delete -// 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 Amazon Elastic Compute Cloud's -// API operation DeleteTransitGatewayRouteTable for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayRouteTable -func (c *EC2) DeleteTransitGatewayRouteTable(input *DeleteTransitGatewayRouteTableInput) (*DeleteTransitGatewayRouteTableOutput, error) { - req, out := c.DeleteTransitGatewayRouteTableRequest(input) - return out, req.Send() -} - -// DeleteTransitGatewayRouteTableWithContext is the same as DeleteTransitGatewayRouteTable with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTransitGatewayRouteTable for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteTransitGatewayRouteTableWithContext(ctx aws.Context, input *DeleteTransitGatewayRouteTableInput, opts ...request.Option) (*DeleteTransitGatewayRouteTableOutput, error) { - req, out := c.DeleteTransitGatewayRouteTableRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTransitGatewayVpcAttachment = "DeleteTransitGatewayVpcAttachment" - -// DeleteTransitGatewayVpcAttachmentRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTransitGatewayVpcAttachment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTransitGatewayVpcAttachment for more information on using the DeleteTransitGatewayVpcAttachment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTransitGatewayVpcAttachmentRequest method. -// req, resp := client.DeleteTransitGatewayVpcAttachmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayVpcAttachment -func (c *EC2) DeleteTransitGatewayVpcAttachmentRequest(input *DeleteTransitGatewayVpcAttachmentInput) (req *request.Request, output *DeleteTransitGatewayVpcAttachmentOutput) { - op := &request.Operation{ - Name: opDeleteTransitGatewayVpcAttachment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTransitGatewayVpcAttachmentInput{} - } - - output = &DeleteTransitGatewayVpcAttachmentOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteTransitGatewayVpcAttachment API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified VPC attachment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteTransitGatewayVpcAttachment for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayVpcAttachment -func (c *EC2) DeleteTransitGatewayVpcAttachment(input *DeleteTransitGatewayVpcAttachmentInput) (*DeleteTransitGatewayVpcAttachmentOutput, error) { - req, out := c.DeleteTransitGatewayVpcAttachmentRequest(input) - return out, req.Send() -} - -// DeleteTransitGatewayVpcAttachmentWithContext is the same as DeleteTransitGatewayVpcAttachment with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTransitGatewayVpcAttachment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteTransitGatewayVpcAttachmentWithContext(ctx aws.Context, input *DeleteTransitGatewayVpcAttachmentInput, opts ...request.Option) (*DeleteTransitGatewayVpcAttachmentOutput, error) { - req, out := c.DeleteTransitGatewayVpcAttachmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVolume = "DeleteVolume" - -// DeleteVolumeRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVolume for more information on using the DeleteVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVolumeRequest method. -// req, resp := client.DeleteVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolume -func (c *EC2) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Request, output *DeleteVolumeOutput) { - op := &request.Operation{ - Name: opDeleteVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVolumeInput{} - } - - output = &DeleteVolumeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVolume API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified EBS volume. The volume must be in the available state -// (not attached to an instance). -// -// The volume can remain in the deleting state for several minutes. -// -// For more information, see Deleting an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteVolume for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolume -func (c *EC2) DeleteVolume(input *DeleteVolumeInput) (*DeleteVolumeOutput, error) { - req, out := c.DeleteVolumeRequest(input) - return out, req.Send() -} - -// DeleteVolumeWithContext is the same as DeleteVolume with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteVolumeWithContext(ctx aws.Context, input *DeleteVolumeInput, opts ...request.Option) (*DeleteVolumeOutput, error) { - req, out := c.DeleteVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVpc = "DeleteVpc" - -// DeleteVpcRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVpc operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVpc for more information on using the DeleteVpc -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVpcRequest method. -// req, resp := client.DeleteVpcRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpc -func (c *EC2) DeleteVpcRequest(input *DeleteVpcInput) (req *request.Request, output *DeleteVpcOutput) { - op := &request.Operation{ - Name: opDeleteVpc, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVpcInput{} - } - - output = &DeleteVpcOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVpc API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified VPC. You must detach or delete all gateways and resources -// that are associated with the VPC before you can delete it. For example, you -// must terminate all instances running in the VPC, delete all security groups -// associated with the VPC (except the default one), delete all route tables -// associated with the VPC (except the default one), and so on. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteVpc for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpc -func (c *EC2) DeleteVpc(input *DeleteVpcInput) (*DeleteVpcOutput, error) { - req, out := c.DeleteVpcRequest(input) - return out, req.Send() -} - -// DeleteVpcWithContext is the same as DeleteVpc with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVpc for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteVpcWithContext(ctx aws.Context, input *DeleteVpcInput, opts ...request.Option) (*DeleteVpcOutput, error) { - req, out := c.DeleteVpcRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVpcEndpointConnectionNotifications = "DeleteVpcEndpointConnectionNotifications" - -// DeleteVpcEndpointConnectionNotificationsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVpcEndpointConnectionNotifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVpcEndpointConnectionNotifications for more information on using the DeleteVpcEndpointConnectionNotifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVpcEndpointConnectionNotificationsRequest method. -// req, resp := client.DeleteVpcEndpointConnectionNotificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointConnectionNotifications -func (c *EC2) DeleteVpcEndpointConnectionNotificationsRequest(input *DeleteVpcEndpointConnectionNotificationsInput) (req *request.Request, output *DeleteVpcEndpointConnectionNotificationsOutput) { - op := &request.Operation{ - Name: opDeleteVpcEndpointConnectionNotifications, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVpcEndpointConnectionNotificationsInput{} - } - - output = &DeleteVpcEndpointConnectionNotificationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteVpcEndpointConnectionNotifications API operation for Amazon Elastic Compute Cloud. -// -// Deletes one or more VPC endpoint connection notifications. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteVpcEndpointConnectionNotifications for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointConnectionNotifications -func (c *EC2) DeleteVpcEndpointConnectionNotifications(input *DeleteVpcEndpointConnectionNotificationsInput) (*DeleteVpcEndpointConnectionNotificationsOutput, error) { - req, out := c.DeleteVpcEndpointConnectionNotificationsRequest(input) - return out, req.Send() -} - -// DeleteVpcEndpointConnectionNotificationsWithContext is the same as DeleteVpcEndpointConnectionNotifications with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVpcEndpointConnectionNotifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteVpcEndpointConnectionNotificationsWithContext(ctx aws.Context, input *DeleteVpcEndpointConnectionNotificationsInput, opts ...request.Option) (*DeleteVpcEndpointConnectionNotificationsOutput, error) { - req, out := c.DeleteVpcEndpointConnectionNotificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVpcEndpointServiceConfigurations = "DeleteVpcEndpointServiceConfigurations" - -// DeleteVpcEndpointServiceConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVpcEndpointServiceConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVpcEndpointServiceConfigurations for more information on using the DeleteVpcEndpointServiceConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVpcEndpointServiceConfigurationsRequest method. -// req, resp := client.DeleteVpcEndpointServiceConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointServiceConfigurations -func (c *EC2) DeleteVpcEndpointServiceConfigurationsRequest(input *DeleteVpcEndpointServiceConfigurationsInput) (req *request.Request, output *DeleteVpcEndpointServiceConfigurationsOutput) { - op := &request.Operation{ - Name: opDeleteVpcEndpointServiceConfigurations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVpcEndpointServiceConfigurationsInput{} - } - - output = &DeleteVpcEndpointServiceConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteVpcEndpointServiceConfigurations API operation for Amazon Elastic Compute Cloud. -// -// Deletes one or more VPC endpoint service configurations in your account. -// Before you delete the endpoint service configuration, you must reject any -// Available or PendingAcceptance interface endpoint connections that are attached -// to the service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteVpcEndpointServiceConfigurations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointServiceConfigurations -func (c *EC2) DeleteVpcEndpointServiceConfigurations(input *DeleteVpcEndpointServiceConfigurationsInput) (*DeleteVpcEndpointServiceConfigurationsOutput, error) { - req, out := c.DeleteVpcEndpointServiceConfigurationsRequest(input) - return out, req.Send() -} - -// DeleteVpcEndpointServiceConfigurationsWithContext is the same as DeleteVpcEndpointServiceConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVpcEndpointServiceConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteVpcEndpointServiceConfigurationsWithContext(ctx aws.Context, input *DeleteVpcEndpointServiceConfigurationsInput, opts ...request.Option) (*DeleteVpcEndpointServiceConfigurationsOutput, error) { - req, out := c.DeleteVpcEndpointServiceConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVpcEndpoints = "DeleteVpcEndpoints" - -// DeleteVpcEndpointsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVpcEndpoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVpcEndpoints for more information on using the DeleteVpcEndpoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVpcEndpointsRequest method. -// req, resp := client.DeleteVpcEndpointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpoints -func (c *EC2) DeleteVpcEndpointsRequest(input *DeleteVpcEndpointsInput) (req *request.Request, output *DeleteVpcEndpointsOutput) { - op := &request.Operation{ - Name: opDeleteVpcEndpoints, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVpcEndpointsInput{} - } - - output = &DeleteVpcEndpointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteVpcEndpoints API operation for Amazon Elastic Compute Cloud. -// -// Deletes one or more specified VPC endpoints. Deleting a gateway endpoint -// also deletes the endpoint routes in the route tables that were associated -// with the endpoint. Deleting an interface endpoint deletes the endpoint network -// interfaces. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteVpcEndpoints for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpoints -func (c *EC2) DeleteVpcEndpoints(input *DeleteVpcEndpointsInput) (*DeleteVpcEndpointsOutput, error) { - req, out := c.DeleteVpcEndpointsRequest(input) - return out, req.Send() -} - -// DeleteVpcEndpointsWithContext is the same as DeleteVpcEndpoints with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVpcEndpoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteVpcEndpointsWithContext(ctx aws.Context, input *DeleteVpcEndpointsInput, opts ...request.Option) (*DeleteVpcEndpointsOutput, error) { - req, out := c.DeleteVpcEndpointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection" - -// DeleteVpcPeeringConnectionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVpcPeeringConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVpcPeeringConnection for more information on using the DeleteVpcPeeringConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVpcPeeringConnectionRequest method. -// req, resp := client.DeleteVpcPeeringConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnection -func (c *EC2) DeleteVpcPeeringConnectionRequest(input *DeleteVpcPeeringConnectionInput) (req *request.Request, output *DeleteVpcPeeringConnectionOutput) { - op := &request.Operation{ - Name: opDeleteVpcPeeringConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVpcPeeringConnectionInput{} - } - - output = &DeleteVpcPeeringConnectionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteVpcPeeringConnection API operation for Amazon Elastic Compute Cloud. -// -// Deletes a VPC peering connection. Either the owner of the requester VPC or -// the owner of the accepter VPC can delete the VPC peering connection if it's -// in the active state. The owner of the requester VPC can delete a VPC peering -// connection in the pending-acceptance state. You cannot delete a VPC peering -// connection that's in the failed state. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteVpcPeeringConnection for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnection -func (c *EC2) DeleteVpcPeeringConnection(input *DeleteVpcPeeringConnectionInput) (*DeleteVpcPeeringConnectionOutput, error) { - req, out := c.DeleteVpcPeeringConnectionRequest(input) - return out, req.Send() -} - -// DeleteVpcPeeringConnectionWithContext is the same as DeleteVpcPeeringConnection with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVpcPeeringConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteVpcPeeringConnectionWithContext(ctx aws.Context, input *DeleteVpcPeeringConnectionInput, opts ...request.Option) (*DeleteVpcPeeringConnectionOutput, error) { - req, out := c.DeleteVpcPeeringConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVpnConnection = "DeleteVpnConnection" - -// DeleteVpnConnectionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVpnConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVpnConnection for more information on using the DeleteVpnConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVpnConnectionRequest method. -// req, resp := client.DeleteVpnConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnection -func (c *EC2) DeleteVpnConnectionRequest(input *DeleteVpnConnectionInput) (req *request.Request, output *DeleteVpnConnectionOutput) { - op := &request.Operation{ - Name: opDeleteVpnConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVpnConnectionInput{} - } - - output = &DeleteVpnConnectionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVpnConnection API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified VPN connection. -// -// If you're deleting the VPC and its associated components, we recommend that -// you detach the virtual private gateway from the VPC and delete the VPC before -// deleting the VPN connection. If you believe that the tunnel credentials for -// your VPN connection have been compromised, you can delete the VPN connection -// and create a new one that has new keys, without needing to delete the VPC -// or virtual private gateway. If you create a new VPN connection, you must -// reconfigure the customer gateway using the new configuration information -// returned with the new VPN connection ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteVpnConnection for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnection -func (c *EC2) DeleteVpnConnection(input *DeleteVpnConnectionInput) (*DeleteVpnConnectionOutput, error) { - req, out := c.DeleteVpnConnectionRequest(input) - return out, req.Send() -} - -// DeleteVpnConnectionWithContext is the same as DeleteVpnConnection with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVpnConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteVpnConnectionWithContext(ctx aws.Context, input *DeleteVpnConnectionInput, opts ...request.Option) (*DeleteVpnConnectionOutput, error) { - req, out := c.DeleteVpnConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVpnConnectionRoute = "DeleteVpnConnectionRoute" - -// DeleteVpnConnectionRouteRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVpnConnectionRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVpnConnectionRoute for more information on using the DeleteVpnConnectionRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVpnConnectionRouteRequest method. -// req, resp := client.DeleteVpnConnectionRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRoute -func (c *EC2) DeleteVpnConnectionRouteRequest(input *DeleteVpnConnectionRouteInput) (req *request.Request, output *DeleteVpnConnectionRouteOutput) { - op := &request.Operation{ - Name: opDeleteVpnConnectionRoute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVpnConnectionRouteInput{} - } - - output = &DeleteVpnConnectionRouteOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVpnConnectionRoute API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified static route associated with a VPN connection between -// an existing virtual private gateway and a VPN customer gateway. The static -// route allows traffic to be routed from the virtual private gateway to the -// VPN customer gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteVpnConnectionRoute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRoute -func (c *EC2) DeleteVpnConnectionRoute(input *DeleteVpnConnectionRouteInput) (*DeleteVpnConnectionRouteOutput, error) { - req, out := c.DeleteVpnConnectionRouteRequest(input) - return out, req.Send() -} - -// DeleteVpnConnectionRouteWithContext is the same as DeleteVpnConnectionRoute with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVpnConnectionRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteVpnConnectionRouteWithContext(ctx aws.Context, input *DeleteVpnConnectionRouteInput, opts ...request.Option) (*DeleteVpnConnectionRouteOutput, error) { - req, out := c.DeleteVpnConnectionRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVpnGateway = "DeleteVpnGateway" - -// DeleteVpnGatewayRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVpnGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVpnGateway for more information on using the DeleteVpnGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVpnGatewayRequest method. -// req, resp := client.DeleteVpnGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnGateway -func (c *EC2) DeleteVpnGatewayRequest(input *DeleteVpnGatewayInput) (req *request.Request, output *DeleteVpnGatewayOutput) { - op := &request.Operation{ - Name: opDeleteVpnGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVpnGatewayInput{} - } - - output = &DeleteVpnGatewayOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVpnGateway API operation for Amazon Elastic Compute Cloud. -// -// Deletes the specified virtual private gateway. We recommend that before you -// delete a virtual private gateway, you detach it from the VPC and delete the -// VPN connection. Note that you don't need to delete the virtual private gateway -// if you plan to delete and recreate the VPN connection between your VPC and -// your network. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeleteVpnGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnGateway -func (c *EC2) DeleteVpnGateway(input *DeleteVpnGatewayInput) (*DeleteVpnGatewayOutput, error) { - req, out := c.DeleteVpnGatewayRequest(input) - return out, req.Send() -} - -// DeleteVpnGatewayWithContext is the same as DeleteVpnGateway with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVpnGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeleteVpnGatewayWithContext(ctx aws.Context, input *DeleteVpnGatewayInput, opts ...request.Option) (*DeleteVpnGatewayOutput, error) { - req, out := c.DeleteVpnGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeprovisionByoipCidr = "DeprovisionByoipCidr" - -// DeprovisionByoipCidrRequest generates a "aws/request.Request" representing the -// client's request for the DeprovisionByoipCidr operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeprovisionByoipCidr for more information on using the DeprovisionByoipCidr -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeprovisionByoipCidrRequest method. -// req, resp := client.DeprovisionByoipCidrRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeprovisionByoipCidr -func (c *EC2) DeprovisionByoipCidrRequest(input *DeprovisionByoipCidrInput) (req *request.Request, output *DeprovisionByoipCidrOutput) { - op := &request.Operation{ - Name: opDeprovisionByoipCidr, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeprovisionByoipCidrInput{} - } - - output = &DeprovisionByoipCidrOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeprovisionByoipCidr API operation for Amazon Elastic Compute Cloud. -// -// Releases the specified address range that you provisioned for use with your -// AWS resources through bring your own IP addresses (BYOIP) and deletes the -// corresponding address pool. -// -// Before you can release an address range, you must stop advertising it using -// WithdrawByoipCidr and you must not have any IP addresses allocated from its -// address range. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeprovisionByoipCidr for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeprovisionByoipCidr -func (c *EC2) DeprovisionByoipCidr(input *DeprovisionByoipCidrInput) (*DeprovisionByoipCidrOutput, error) { - req, out := c.DeprovisionByoipCidrRequest(input) - return out, req.Send() -} - -// DeprovisionByoipCidrWithContext is the same as DeprovisionByoipCidr with the addition of -// the ability to pass a context and additional request options. -// -// See DeprovisionByoipCidr for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeprovisionByoipCidrWithContext(ctx aws.Context, input *DeprovisionByoipCidrInput, opts ...request.Option) (*DeprovisionByoipCidrOutput, error) { - req, out := c.DeprovisionByoipCidrRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterImage = "DeregisterImage" - -// DeregisterImageRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterImage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterImage for more information on using the DeregisterImage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterImageRequest method. -// req, resp := client.DeregisterImageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImage -func (c *EC2) DeregisterImageRequest(input *DeregisterImageInput) (req *request.Request, output *DeregisterImageOutput) { - op := &request.Operation{ - Name: opDeregisterImage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterImageInput{} - } - - output = &DeregisterImageOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterImage API operation for Amazon Elastic Compute Cloud. -// -// Deregisters the specified AMI. After you deregister an AMI, it can't be used -// to launch new instances; however, it doesn't affect any instances that you've -// already launched from the AMI. You'll continue to incur usage costs for those -// instances until you terminate them. -// -// When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot -// that was created for the root volume of the instance during the AMI creation -// process. When you deregister an instance store-backed AMI, it doesn't affect -// the files that you uploaded to Amazon S3 when you created the AMI. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DeregisterImage for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImage -func (c *EC2) DeregisterImage(input *DeregisterImageInput) (*DeregisterImageOutput, error) { - req, out := c.DeregisterImageRequest(input) - return out, req.Send() -} - -// DeregisterImageWithContext is the same as DeregisterImage with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterImage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DeregisterImageWithContext(ctx aws.Context, input *DeregisterImageInput, opts ...request.Option) (*DeregisterImageOutput, error) { - req, out := c.DeregisterImageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccountAttributes = "DescribeAccountAttributes" - -// DescribeAccountAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccountAttributes for more information on using the DescribeAccountAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAccountAttributesRequest method. -// req, resp := client.DescribeAccountAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributes -func (c *EC2) DescribeAccountAttributesRequest(input *DescribeAccountAttributesInput) (req *request.Request, output *DescribeAccountAttributesOutput) { - op := &request.Operation{ - Name: opDescribeAccountAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAccountAttributesInput{} - } - - output = &DescribeAccountAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccountAttributes API operation for Amazon Elastic Compute Cloud. -// -// Describes attributes of your AWS account. The following are the supported -// account attributes: -// -// * supported-platforms: Indicates whether your account can launch instances -// into EC2-Classic and EC2-VPC, or only into EC2-VPC. -// -// * default-vpc: The ID of the default VPC for your account, or none. -// -// * max-instances: The maximum number of On-Demand Instances that you can -// run. -// -// * vpc-max-security-groups-per-interface: The maximum number of security -// groups that you can assign to a network interface. -// -// * max-elastic-ips: The maximum number of Elastic IP addresses that you -// can allocate for use with EC2-Classic. -// -// * vpc-max-elastic-ips: The maximum number of Elastic IP addresses that -// you can allocate for use with EC2-VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeAccountAttributes for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributes -func (c *EC2) DescribeAccountAttributes(input *DescribeAccountAttributesInput) (*DescribeAccountAttributesOutput, error) { - req, out := c.DescribeAccountAttributesRequest(input) - return out, req.Send() -} - -// DescribeAccountAttributesWithContext is the same as DescribeAccountAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeAccountAttributesWithContext(ctx aws.Context, input *DescribeAccountAttributesInput, opts ...request.Option) (*DescribeAccountAttributesOutput, error) { - req, out := c.DescribeAccountAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAddresses = "DescribeAddresses" - -// DescribeAddressesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAddresses operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAddresses for more information on using the DescribeAddresses -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAddressesRequest method. -// req, resp := client.DescribeAddressesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses -func (c *EC2) DescribeAddressesRequest(input *DescribeAddressesInput) (req *request.Request, output *DescribeAddressesOutput) { - op := &request.Operation{ - Name: opDescribeAddresses, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAddressesInput{} - } - - output = &DescribeAddressesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAddresses API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your Elastic IP addresses. -// -// An Elastic IP address is for use in either the EC2-Classic platform or in -// a VPC. For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeAddresses for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses -func (c *EC2) DescribeAddresses(input *DescribeAddressesInput) (*DescribeAddressesOutput, error) { - req, out := c.DescribeAddressesRequest(input) - return out, req.Send() -} - -// DescribeAddressesWithContext is the same as DescribeAddresses with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAddresses for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeAddressesWithContext(ctx aws.Context, input *DescribeAddressesInput, opts ...request.Option) (*DescribeAddressesOutput, error) { - req, out := c.DescribeAddressesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAggregateIdFormat = "DescribeAggregateIdFormat" - -// DescribeAggregateIdFormatRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAggregateIdFormat operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAggregateIdFormat for more information on using the DescribeAggregateIdFormat -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAggregateIdFormatRequest method. -// req, resp := client.DescribeAggregateIdFormatRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAggregateIdFormat -func (c *EC2) DescribeAggregateIdFormatRequest(input *DescribeAggregateIdFormatInput) (req *request.Request, output *DescribeAggregateIdFormatOutput) { - op := &request.Operation{ - Name: opDescribeAggregateIdFormat, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAggregateIdFormatInput{} - } - - output = &DescribeAggregateIdFormatOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAggregateIdFormat API operation for Amazon Elastic Compute Cloud. -// -// Describes the longer ID format settings for all resource types in a specific -// region. This request is useful for performing a quick audit to determine -// whether a specific region is fully opted in for longer IDs (17-character -// IDs). -// -// This request only returns information about resource types that support longer -// IDs. -// -// The following resource types support longer IDs: bundle | conversion-task -// | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association -// | export-task | flow-log | image | import-task | instance | internet-gateway -// | network-acl | network-acl-association | network-interface | network-interface-attachment -// | prefix-list | reservation | route-table | route-table-association | security-group -// | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association -// | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeAggregateIdFormat for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAggregateIdFormat -func (c *EC2) DescribeAggregateIdFormat(input *DescribeAggregateIdFormatInput) (*DescribeAggregateIdFormatOutput, error) { - req, out := c.DescribeAggregateIdFormatRequest(input) - return out, req.Send() -} - -// DescribeAggregateIdFormatWithContext is the same as DescribeAggregateIdFormat with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAggregateIdFormat for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeAggregateIdFormatWithContext(ctx aws.Context, input *DescribeAggregateIdFormatInput, opts ...request.Option) (*DescribeAggregateIdFormatOutput, error) { - req, out := c.DescribeAggregateIdFormatRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAvailabilityZones = "DescribeAvailabilityZones" - -// DescribeAvailabilityZonesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAvailabilityZones operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAvailabilityZones for more information on using the DescribeAvailabilityZones -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAvailabilityZonesRequest method. -// req, resp := client.DescribeAvailabilityZonesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZones -func (c *EC2) DescribeAvailabilityZonesRequest(input *DescribeAvailabilityZonesInput) (req *request.Request, output *DescribeAvailabilityZonesOutput) { - op := &request.Operation{ - Name: opDescribeAvailabilityZones, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAvailabilityZonesInput{} - } - - output = &DescribeAvailabilityZonesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAvailabilityZones API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of the Availability Zones that are available to you. -// The results include zones only for the region you're currently using. If -// there is an event impacting an Availability Zone, you can use this request -// to view the state and any provided message for that Availability Zone. -// -// For more information, see Regions and Availability Zones (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeAvailabilityZones for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZones -func (c *EC2) DescribeAvailabilityZones(input *DescribeAvailabilityZonesInput) (*DescribeAvailabilityZonesOutput, error) { - req, out := c.DescribeAvailabilityZonesRequest(input) - return out, req.Send() -} - -// DescribeAvailabilityZonesWithContext is the same as DescribeAvailabilityZones with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAvailabilityZones for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeAvailabilityZonesWithContext(ctx aws.Context, input *DescribeAvailabilityZonesInput, opts ...request.Option) (*DescribeAvailabilityZonesOutput, error) { - req, out := c.DescribeAvailabilityZonesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeBundleTasks = "DescribeBundleTasks" - -// DescribeBundleTasksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeBundleTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeBundleTasks for more information on using the DescribeBundleTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeBundleTasksRequest method. -// req, resp := client.DescribeBundleTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasks -func (c *EC2) DescribeBundleTasksRequest(input *DescribeBundleTasksInput) (req *request.Request, output *DescribeBundleTasksOutput) { - op := &request.Operation{ - Name: opDescribeBundleTasks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeBundleTasksInput{} - } - - output = &DescribeBundleTasksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeBundleTasks API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your bundling tasks. -// -// Completed bundle tasks are listed for only a limited time. If your bundle -// task is no longer in the list, you can still register an AMI from it. Just -// use RegisterImage with the Amazon S3 bucket name and image manifest name -// you provided to the bundle task. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeBundleTasks for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasks -func (c *EC2) DescribeBundleTasks(input *DescribeBundleTasksInput) (*DescribeBundleTasksOutput, error) { - req, out := c.DescribeBundleTasksRequest(input) - return out, req.Send() -} - -// DescribeBundleTasksWithContext is the same as DescribeBundleTasks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeBundleTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeBundleTasksWithContext(ctx aws.Context, input *DescribeBundleTasksInput, opts ...request.Option) (*DescribeBundleTasksOutput, error) { - req, out := c.DescribeBundleTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeByoipCidrs = "DescribeByoipCidrs" - -// DescribeByoipCidrsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeByoipCidrs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeByoipCidrs for more information on using the DescribeByoipCidrs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeByoipCidrsRequest method. -// req, resp := client.DescribeByoipCidrsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeByoipCidrs -func (c *EC2) DescribeByoipCidrsRequest(input *DescribeByoipCidrsInput) (req *request.Request, output *DescribeByoipCidrsOutput) { - op := &request.Operation{ - Name: opDescribeByoipCidrs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeByoipCidrsInput{} - } - - output = &DescribeByoipCidrsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeByoipCidrs API operation for Amazon Elastic Compute Cloud. -// -// Describes the IP address ranges that were specified in calls to ProvisionByoipCidr. -// -// To describe the address pools that were created when you provisioned the -// address ranges, use DescribePublicIpv4Pools. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeByoipCidrs for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeByoipCidrs -func (c *EC2) DescribeByoipCidrs(input *DescribeByoipCidrsInput) (*DescribeByoipCidrsOutput, error) { - req, out := c.DescribeByoipCidrsRequest(input) - return out, req.Send() -} - -// DescribeByoipCidrsWithContext is the same as DescribeByoipCidrs with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeByoipCidrs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeByoipCidrsWithContext(ctx aws.Context, input *DescribeByoipCidrsInput, opts ...request.Option) (*DescribeByoipCidrsOutput, error) { - req, out := c.DescribeByoipCidrsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCapacityReservations = "DescribeCapacityReservations" - -// DescribeCapacityReservationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCapacityReservations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCapacityReservations for more information on using the DescribeCapacityReservations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCapacityReservationsRequest method. -// req, resp := client.DescribeCapacityReservationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCapacityReservations -func (c *EC2) DescribeCapacityReservationsRequest(input *DescribeCapacityReservationsInput) (req *request.Request, output *DescribeCapacityReservationsOutput) { - op := &request.Operation{ - Name: opDescribeCapacityReservations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCapacityReservationsInput{} - } - - output = &DescribeCapacityReservationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCapacityReservations API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your Capacity Reservations. The results describe -// only the Capacity Reservations in the AWS Region that you're currently using. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeCapacityReservations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCapacityReservations -func (c *EC2) DescribeCapacityReservations(input *DescribeCapacityReservationsInput) (*DescribeCapacityReservationsOutput, error) { - req, out := c.DescribeCapacityReservationsRequest(input) - return out, req.Send() -} - -// DescribeCapacityReservationsWithContext is the same as DescribeCapacityReservations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCapacityReservations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeCapacityReservationsWithContext(ctx aws.Context, input *DescribeCapacityReservationsInput, opts ...request.Option) (*DescribeCapacityReservationsOutput, error) { - req, out := c.DescribeCapacityReservationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeClassicLinkInstances = "DescribeClassicLinkInstances" - -// DescribeClassicLinkInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClassicLinkInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClassicLinkInstances for more information on using the DescribeClassicLinkInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClassicLinkInstancesRequest method. -// req, resp := client.DescribeClassicLinkInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClassicLinkInstances -func (c *EC2) DescribeClassicLinkInstancesRequest(input *DescribeClassicLinkInstancesInput) (req *request.Request, output *DescribeClassicLinkInstancesOutput) { - op := &request.Operation{ - Name: opDescribeClassicLinkInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeClassicLinkInstancesInput{} - } - - output = &DescribeClassicLinkInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClassicLinkInstances API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your linked EC2-Classic instances. This request -// only returns information about EC2-Classic instances linked to a VPC through -// ClassicLink. You cannot use this request to return information about other -// instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeClassicLinkInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClassicLinkInstances -func (c *EC2) DescribeClassicLinkInstances(input *DescribeClassicLinkInstancesInput) (*DescribeClassicLinkInstancesOutput, error) { - req, out := c.DescribeClassicLinkInstancesRequest(input) - return out, req.Send() -} - -// DescribeClassicLinkInstancesWithContext is the same as DescribeClassicLinkInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClassicLinkInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeClassicLinkInstancesWithContext(ctx aws.Context, input *DescribeClassicLinkInstancesInput, opts ...request.Option) (*DescribeClassicLinkInstancesOutput, error) { - req, out := c.DescribeClassicLinkInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeClientVpnAuthorizationRules = "DescribeClientVpnAuthorizationRules" - -// DescribeClientVpnAuthorizationRulesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClientVpnAuthorizationRules operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClientVpnAuthorizationRules for more information on using the DescribeClientVpnAuthorizationRules -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClientVpnAuthorizationRulesRequest method. -// req, resp := client.DescribeClientVpnAuthorizationRulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnAuthorizationRules -func (c *EC2) DescribeClientVpnAuthorizationRulesRequest(input *DescribeClientVpnAuthorizationRulesInput) (req *request.Request, output *DescribeClientVpnAuthorizationRulesOutput) { - op := &request.Operation{ - Name: opDescribeClientVpnAuthorizationRules, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeClientVpnAuthorizationRulesInput{} - } - - output = &DescribeClientVpnAuthorizationRulesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClientVpnAuthorizationRules API operation for Amazon Elastic Compute Cloud. -// -// Describes the authorization rules for a specified Client VPN endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeClientVpnAuthorizationRules for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnAuthorizationRules -func (c *EC2) DescribeClientVpnAuthorizationRules(input *DescribeClientVpnAuthorizationRulesInput) (*DescribeClientVpnAuthorizationRulesOutput, error) { - req, out := c.DescribeClientVpnAuthorizationRulesRequest(input) - return out, req.Send() -} - -// DescribeClientVpnAuthorizationRulesWithContext is the same as DescribeClientVpnAuthorizationRules with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClientVpnAuthorizationRules for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeClientVpnAuthorizationRulesWithContext(ctx aws.Context, input *DescribeClientVpnAuthorizationRulesInput, opts ...request.Option) (*DescribeClientVpnAuthorizationRulesOutput, error) { - req, out := c.DescribeClientVpnAuthorizationRulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeClientVpnConnections = "DescribeClientVpnConnections" - -// DescribeClientVpnConnectionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClientVpnConnections operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClientVpnConnections for more information on using the DescribeClientVpnConnections -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClientVpnConnectionsRequest method. -// req, resp := client.DescribeClientVpnConnectionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnConnections -func (c *EC2) DescribeClientVpnConnectionsRequest(input *DescribeClientVpnConnectionsInput) (req *request.Request, output *DescribeClientVpnConnectionsOutput) { - op := &request.Operation{ - Name: opDescribeClientVpnConnections, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeClientVpnConnectionsInput{} - } - - output = &DescribeClientVpnConnectionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClientVpnConnections API operation for Amazon Elastic Compute Cloud. -// -// Describes active client connections and connections that have been terminated -// within the last 60 minutes for the specified Client VPN endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeClientVpnConnections for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnConnections -func (c *EC2) DescribeClientVpnConnections(input *DescribeClientVpnConnectionsInput) (*DescribeClientVpnConnectionsOutput, error) { - req, out := c.DescribeClientVpnConnectionsRequest(input) - return out, req.Send() -} - -// DescribeClientVpnConnectionsWithContext is the same as DescribeClientVpnConnections with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClientVpnConnections for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeClientVpnConnectionsWithContext(ctx aws.Context, input *DescribeClientVpnConnectionsInput, opts ...request.Option) (*DescribeClientVpnConnectionsOutput, error) { - req, out := c.DescribeClientVpnConnectionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeClientVpnEndpoints = "DescribeClientVpnEndpoints" - -// DescribeClientVpnEndpointsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClientVpnEndpoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClientVpnEndpoints for more information on using the DescribeClientVpnEndpoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClientVpnEndpointsRequest method. -// req, resp := client.DescribeClientVpnEndpointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnEndpoints -func (c *EC2) DescribeClientVpnEndpointsRequest(input *DescribeClientVpnEndpointsInput) (req *request.Request, output *DescribeClientVpnEndpointsOutput) { - op := &request.Operation{ - Name: opDescribeClientVpnEndpoints, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeClientVpnEndpointsInput{} - } - - output = &DescribeClientVpnEndpointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClientVpnEndpoints API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more Client VPN endpoints in the account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeClientVpnEndpoints for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnEndpoints -func (c *EC2) DescribeClientVpnEndpoints(input *DescribeClientVpnEndpointsInput) (*DescribeClientVpnEndpointsOutput, error) { - req, out := c.DescribeClientVpnEndpointsRequest(input) - return out, req.Send() -} - -// DescribeClientVpnEndpointsWithContext is the same as DescribeClientVpnEndpoints with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClientVpnEndpoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeClientVpnEndpointsWithContext(ctx aws.Context, input *DescribeClientVpnEndpointsInput, opts ...request.Option) (*DescribeClientVpnEndpointsOutput, error) { - req, out := c.DescribeClientVpnEndpointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeClientVpnRoutes = "DescribeClientVpnRoutes" - -// DescribeClientVpnRoutesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClientVpnRoutes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClientVpnRoutes for more information on using the DescribeClientVpnRoutes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClientVpnRoutesRequest method. -// req, resp := client.DescribeClientVpnRoutesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnRoutes -func (c *EC2) DescribeClientVpnRoutesRequest(input *DescribeClientVpnRoutesInput) (req *request.Request, output *DescribeClientVpnRoutesOutput) { - op := &request.Operation{ - Name: opDescribeClientVpnRoutes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeClientVpnRoutesInput{} - } - - output = &DescribeClientVpnRoutesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClientVpnRoutes API operation for Amazon Elastic Compute Cloud. -// -// Describes the routes for the specified Client VPN endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeClientVpnRoutes for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnRoutes -func (c *EC2) DescribeClientVpnRoutes(input *DescribeClientVpnRoutesInput) (*DescribeClientVpnRoutesOutput, error) { - req, out := c.DescribeClientVpnRoutesRequest(input) - return out, req.Send() -} - -// DescribeClientVpnRoutesWithContext is the same as DescribeClientVpnRoutes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClientVpnRoutes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeClientVpnRoutesWithContext(ctx aws.Context, input *DescribeClientVpnRoutesInput, opts ...request.Option) (*DescribeClientVpnRoutesOutput, error) { - req, out := c.DescribeClientVpnRoutesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeClientVpnTargetNetworks = "DescribeClientVpnTargetNetworks" - -// DescribeClientVpnTargetNetworksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClientVpnTargetNetworks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClientVpnTargetNetworks for more information on using the DescribeClientVpnTargetNetworks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClientVpnTargetNetworksRequest method. -// req, resp := client.DescribeClientVpnTargetNetworksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnTargetNetworks -func (c *EC2) DescribeClientVpnTargetNetworksRequest(input *DescribeClientVpnTargetNetworksInput) (req *request.Request, output *DescribeClientVpnTargetNetworksOutput) { - op := &request.Operation{ - Name: opDescribeClientVpnTargetNetworks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeClientVpnTargetNetworksInput{} - } - - output = &DescribeClientVpnTargetNetworksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClientVpnTargetNetworks API operation for Amazon Elastic Compute Cloud. -// -// Describes the target networks associated with the specified Client VPN endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeClientVpnTargetNetworks for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnTargetNetworks -func (c *EC2) DescribeClientVpnTargetNetworks(input *DescribeClientVpnTargetNetworksInput) (*DescribeClientVpnTargetNetworksOutput, error) { - req, out := c.DescribeClientVpnTargetNetworksRequest(input) - return out, req.Send() -} - -// DescribeClientVpnTargetNetworksWithContext is the same as DescribeClientVpnTargetNetworks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClientVpnTargetNetworks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeClientVpnTargetNetworksWithContext(ctx aws.Context, input *DescribeClientVpnTargetNetworksInput, opts ...request.Option) (*DescribeClientVpnTargetNetworksOutput, error) { - req, out := c.DescribeClientVpnTargetNetworksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConversionTasks = "DescribeConversionTasks" - -// DescribeConversionTasksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConversionTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConversionTasks for more information on using the DescribeConversionTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConversionTasksRequest method. -// req, resp := client.DescribeConversionTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasks -func (c *EC2) DescribeConversionTasksRequest(input *DescribeConversionTasksInput) (req *request.Request, output *DescribeConversionTasksOutput) { - op := &request.Operation{ - Name: opDescribeConversionTasks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConversionTasksInput{} - } - - output = &DescribeConversionTasksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConversionTasks API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your conversion tasks. For more information, see -// the VM Import/Export User Guide (http://docs.aws.amazon.com/vm-import/latest/userguide/). -// -// For information about the import manifest referenced by this API action, -// see VM Import Manifest (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeConversionTasks for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasks -func (c *EC2) DescribeConversionTasks(input *DescribeConversionTasksInput) (*DescribeConversionTasksOutput, error) { - req, out := c.DescribeConversionTasksRequest(input) - return out, req.Send() -} - -// DescribeConversionTasksWithContext is the same as DescribeConversionTasks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConversionTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeConversionTasksWithContext(ctx aws.Context, input *DescribeConversionTasksInput, opts ...request.Option) (*DescribeConversionTasksOutput, error) { - req, out := c.DescribeConversionTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCustomerGateways = "DescribeCustomerGateways" - -// DescribeCustomerGatewaysRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCustomerGateways operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCustomerGateways for more information on using the DescribeCustomerGateways -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCustomerGatewaysRequest method. -// req, resp := client.DescribeCustomerGatewaysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGateways -func (c *EC2) DescribeCustomerGatewaysRequest(input *DescribeCustomerGatewaysInput) (req *request.Request, output *DescribeCustomerGatewaysOutput) { - op := &request.Operation{ - Name: opDescribeCustomerGateways, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCustomerGatewaysInput{} - } - - output = &DescribeCustomerGatewaysOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCustomerGateways API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your VPN customer gateways. -// -// For more information about VPN customer gateways, see AWS Managed VPN Connections -// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) in the -// Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeCustomerGateways for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGateways -func (c *EC2) DescribeCustomerGateways(input *DescribeCustomerGatewaysInput) (*DescribeCustomerGatewaysOutput, error) { - req, out := c.DescribeCustomerGatewaysRequest(input) - return out, req.Send() -} - -// DescribeCustomerGatewaysWithContext is the same as DescribeCustomerGateways with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCustomerGateways for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeCustomerGatewaysWithContext(ctx aws.Context, input *DescribeCustomerGatewaysInput, opts ...request.Option) (*DescribeCustomerGatewaysOutput, error) { - req, out := c.DescribeCustomerGatewaysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDhcpOptions = "DescribeDhcpOptions" - -// DescribeDhcpOptionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDhcpOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDhcpOptions for more information on using the DescribeDhcpOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDhcpOptionsRequest method. -// req, resp := client.DescribeDhcpOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions -func (c *EC2) DescribeDhcpOptionsRequest(input *DescribeDhcpOptionsInput) (req *request.Request, output *DescribeDhcpOptionsOutput) { - op := &request.Operation{ - Name: opDescribeDhcpOptions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDhcpOptionsInput{} - } - - output = &DescribeDhcpOptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDhcpOptions API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your DHCP options sets. -// -// For more information, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeDhcpOptions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions -func (c *EC2) DescribeDhcpOptions(input *DescribeDhcpOptionsInput) (*DescribeDhcpOptionsOutput, error) { - req, out := c.DescribeDhcpOptionsRequest(input) - return out, req.Send() -} - -// DescribeDhcpOptionsWithContext is the same as DescribeDhcpOptions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDhcpOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeDhcpOptionsWithContext(ctx aws.Context, input *DescribeDhcpOptionsInput, opts ...request.Option) (*DescribeDhcpOptionsOutput, error) { - req, out := c.DescribeDhcpOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEgressOnlyInternetGateways = "DescribeEgressOnlyInternetGateways" - -// DescribeEgressOnlyInternetGatewaysRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEgressOnlyInternetGateways operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEgressOnlyInternetGateways for more information on using the DescribeEgressOnlyInternetGateways -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEgressOnlyInternetGatewaysRequest method. -// req, resp := client.DescribeEgressOnlyInternetGatewaysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeEgressOnlyInternetGateways -func (c *EC2) DescribeEgressOnlyInternetGatewaysRequest(input *DescribeEgressOnlyInternetGatewaysInput) (req *request.Request, output *DescribeEgressOnlyInternetGatewaysOutput) { - op := &request.Operation{ - Name: opDescribeEgressOnlyInternetGateways, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEgressOnlyInternetGatewaysInput{} - } - - output = &DescribeEgressOnlyInternetGatewaysOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEgressOnlyInternetGateways API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your egress-only internet gateways. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeEgressOnlyInternetGateways for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeEgressOnlyInternetGateways -func (c *EC2) DescribeEgressOnlyInternetGateways(input *DescribeEgressOnlyInternetGatewaysInput) (*DescribeEgressOnlyInternetGatewaysOutput, error) { - req, out := c.DescribeEgressOnlyInternetGatewaysRequest(input) - return out, req.Send() -} - -// DescribeEgressOnlyInternetGatewaysWithContext is the same as DescribeEgressOnlyInternetGateways with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEgressOnlyInternetGateways for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeEgressOnlyInternetGatewaysWithContext(ctx aws.Context, input *DescribeEgressOnlyInternetGatewaysInput, opts ...request.Option) (*DescribeEgressOnlyInternetGatewaysOutput, error) { - req, out := c.DescribeEgressOnlyInternetGatewaysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeElasticGpus = "DescribeElasticGpus" - -// DescribeElasticGpusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeElasticGpus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeElasticGpus for more information on using the DescribeElasticGpus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeElasticGpusRequest method. -// req, resp := client.DescribeElasticGpusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpus -func (c *EC2) DescribeElasticGpusRequest(input *DescribeElasticGpusInput) (req *request.Request, output *DescribeElasticGpusOutput) { - op := &request.Operation{ - Name: opDescribeElasticGpus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeElasticGpusInput{} - } - - output = &DescribeElasticGpusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeElasticGpus API operation for Amazon Elastic Compute Cloud. -// -// Describes the Elastic Graphics accelerator associated with your instances. -// For more information about Elastic Graphics, see Amazon Elastic Graphics -// (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeElasticGpus for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpus -func (c *EC2) DescribeElasticGpus(input *DescribeElasticGpusInput) (*DescribeElasticGpusOutput, error) { - req, out := c.DescribeElasticGpusRequest(input) - return out, req.Send() -} - -// DescribeElasticGpusWithContext is the same as DescribeElasticGpus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeElasticGpus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeElasticGpusWithContext(ctx aws.Context, input *DescribeElasticGpusInput, opts ...request.Option) (*DescribeElasticGpusOutput, error) { - req, out := c.DescribeElasticGpusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeExportTasks = "DescribeExportTasks" - -// DescribeExportTasksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeExportTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeExportTasks for more information on using the DescribeExportTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeExportTasksRequest method. -// req, resp := client.DescribeExportTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasks -func (c *EC2) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput) { - op := &request.Operation{ - Name: opDescribeExportTasks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeExportTasksInput{} - } - - output = &DescribeExportTasksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeExportTasks API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your export tasks. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeExportTasks for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasks -func (c *EC2) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) { - req, out := c.DescribeExportTasksRequest(input) - return out, req.Send() -} - -// DescribeExportTasksWithContext is the same as DescribeExportTasks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeExportTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeExportTasksWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.Option) (*DescribeExportTasksOutput, error) { - req, out := c.DescribeExportTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFleetHistory = "DescribeFleetHistory" - -// DescribeFleetHistoryRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFleetHistory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFleetHistory for more information on using the DescribeFleetHistory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFleetHistoryRequest method. -// req, resp := client.DescribeFleetHistoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleetHistory -func (c *EC2) DescribeFleetHistoryRequest(input *DescribeFleetHistoryInput) (req *request.Request, output *DescribeFleetHistoryOutput) { - op := &request.Operation{ - Name: opDescribeFleetHistory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeFleetHistoryInput{} - } - - output = &DescribeFleetHistoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFleetHistory API operation for Amazon Elastic Compute Cloud. -// -// Describes the events for the specified EC2 Fleet during the specified time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeFleetHistory for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleetHistory -func (c *EC2) DescribeFleetHistory(input *DescribeFleetHistoryInput) (*DescribeFleetHistoryOutput, error) { - req, out := c.DescribeFleetHistoryRequest(input) - return out, req.Send() -} - -// DescribeFleetHistoryWithContext is the same as DescribeFleetHistory with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFleetHistory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeFleetHistoryWithContext(ctx aws.Context, input *DescribeFleetHistoryInput, opts ...request.Option) (*DescribeFleetHistoryOutput, error) { - req, out := c.DescribeFleetHistoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFleetInstances = "DescribeFleetInstances" - -// DescribeFleetInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFleetInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFleetInstances for more information on using the DescribeFleetInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFleetInstancesRequest method. -// req, resp := client.DescribeFleetInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleetInstances -func (c *EC2) DescribeFleetInstancesRequest(input *DescribeFleetInstancesInput) (req *request.Request, output *DescribeFleetInstancesOutput) { - op := &request.Operation{ - Name: opDescribeFleetInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeFleetInstancesInput{} - } - - output = &DescribeFleetInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFleetInstances API operation for Amazon Elastic Compute Cloud. -// -// Describes the running instances for the specified EC2 Fleet. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeFleetInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleetInstances -func (c *EC2) DescribeFleetInstances(input *DescribeFleetInstancesInput) (*DescribeFleetInstancesOutput, error) { - req, out := c.DescribeFleetInstancesRequest(input) - return out, req.Send() -} - -// DescribeFleetInstancesWithContext is the same as DescribeFleetInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFleetInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeFleetInstancesWithContext(ctx aws.Context, input *DescribeFleetInstancesInput, opts ...request.Option) (*DescribeFleetInstancesOutput, error) { - req, out := c.DescribeFleetInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFleets = "DescribeFleets" - -// DescribeFleetsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFleets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFleets for more information on using the DescribeFleets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFleetsRequest method. -// req, resp := client.DescribeFleetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleets -func (c *EC2) DescribeFleetsRequest(input *DescribeFleetsInput) (req *request.Request, output *DescribeFleetsOutput) { - op := &request.Operation{ - Name: opDescribeFleets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeFleetsInput{} - } - - output = &DescribeFleetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFleets API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your EC2 Fleets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeFleets for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleets -func (c *EC2) DescribeFleets(input *DescribeFleetsInput) (*DescribeFleetsOutput, error) { - req, out := c.DescribeFleetsRequest(input) - return out, req.Send() -} - -// DescribeFleetsWithContext is the same as DescribeFleets with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFleets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeFleetsWithContext(ctx aws.Context, input *DescribeFleetsInput, opts ...request.Option) (*DescribeFleetsOutput, error) { - req, out := c.DescribeFleetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFlowLogs = "DescribeFlowLogs" - -// DescribeFlowLogsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFlowLogs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFlowLogs for more information on using the DescribeFlowLogs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFlowLogsRequest method. -// req, resp := client.DescribeFlowLogsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFlowLogs -func (c *EC2) DescribeFlowLogsRequest(input *DescribeFlowLogsInput) (req *request.Request, output *DescribeFlowLogsOutput) { - op := &request.Operation{ - Name: opDescribeFlowLogs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeFlowLogsInput{} - } - - output = &DescribeFlowLogsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFlowLogs API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more flow logs. To view the information in your flow logs -// (the log streams for the network interfaces), you must use the CloudWatch -// Logs console or the CloudWatch Logs API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeFlowLogs for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFlowLogs -func (c *EC2) DescribeFlowLogs(input *DescribeFlowLogsInput) (*DescribeFlowLogsOutput, error) { - req, out := c.DescribeFlowLogsRequest(input) - return out, req.Send() -} - -// DescribeFlowLogsWithContext is the same as DescribeFlowLogs with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFlowLogs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeFlowLogsWithContext(ctx aws.Context, input *DescribeFlowLogsInput, opts ...request.Option) (*DescribeFlowLogsOutput, error) { - req, out := c.DescribeFlowLogsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFpgaImageAttribute = "DescribeFpgaImageAttribute" - -// DescribeFpgaImageAttributeRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFpgaImageAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFpgaImageAttribute for more information on using the DescribeFpgaImageAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFpgaImageAttributeRequest method. -// req, resp := client.DescribeFpgaImageAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImageAttribute -func (c *EC2) DescribeFpgaImageAttributeRequest(input *DescribeFpgaImageAttributeInput) (req *request.Request, output *DescribeFpgaImageAttributeOutput) { - op := &request.Operation{ - Name: opDescribeFpgaImageAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeFpgaImageAttributeInput{} - } - - output = &DescribeFpgaImageAttributeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFpgaImageAttribute API operation for Amazon Elastic Compute Cloud. -// -// Describes the specified attribute of the specified Amazon FPGA Image (AFI). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeFpgaImageAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImageAttribute -func (c *EC2) DescribeFpgaImageAttribute(input *DescribeFpgaImageAttributeInput) (*DescribeFpgaImageAttributeOutput, error) { - req, out := c.DescribeFpgaImageAttributeRequest(input) - return out, req.Send() -} - -// DescribeFpgaImageAttributeWithContext is the same as DescribeFpgaImageAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFpgaImageAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeFpgaImageAttributeWithContext(ctx aws.Context, input *DescribeFpgaImageAttributeInput, opts ...request.Option) (*DescribeFpgaImageAttributeOutput, error) { - req, out := c.DescribeFpgaImageAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFpgaImages = "DescribeFpgaImages" - -// DescribeFpgaImagesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFpgaImages operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFpgaImages for more information on using the DescribeFpgaImages -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFpgaImagesRequest method. -// req, resp := client.DescribeFpgaImagesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImages -func (c *EC2) DescribeFpgaImagesRequest(input *DescribeFpgaImagesInput) (req *request.Request, output *DescribeFpgaImagesOutput) { - op := &request.Operation{ - Name: opDescribeFpgaImages, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeFpgaImagesInput{} - } - - output = &DescribeFpgaImagesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFpgaImages API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more available Amazon FPGA Images (AFIs). These include -// public AFIs, private AFIs that you own, and AFIs owned by other AWS accounts -// for which you have load permissions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeFpgaImages for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImages -func (c *EC2) DescribeFpgaImages(input *DescribeFpgaImagesInput) (*DescribeFpgaImagesOutput, error) { - req, out := c.DescribeFpgaImagesRequest(input) - return out, req.Send() -} - -// DescribeFpgaImagesWithContext is the same as DescribeFpgaImages with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFpgaImages for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeFpgaImagesWithContext(ctx aws.Context, input *DescribeFpgaImagesInput, opts ...request.Option) (*DescribeFpgaImagesOutput, error) { - req, out := c.DescribeFpgaImagesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeHostReservationOfferings = "DescribeHostReservationOfferings" - -// DescribeHostReservationOfferingsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeHostReservationOfferings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeHostReservationOfferings for more information on using the DescribeHostReservationOfferings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeHostReservationOfferingsRequest method. -// req, resp := client.DescribeHostReservationOfferingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferings -func (c *EC2) DescribeHostReservationOfferingsRequest(input *DescribeHostReservationOfferingsInput) (req *request.Request, output *DescribeHostReservationOfferingsOutput) { - op := &request.Operation{ - Name: opDescribeHostReservationOfferings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeHostReservationOfferingsInput{} - } - - output = &DescribeHostReservationOfferingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeHostReservationOfferings API operation for Amazon Elastic Compute Cloud. -// -// Describes the Dedicated Host reservations that are available to purchase. -// -// The results describe all the Dedicated Host reservation offerings, including -// offerings that may not match the instance family and Region of your Dedicated -// Hosts. When purchasing an offering, ensure that the instance family and Region -// of the offering matches that of the Dedicated Hosts with which it is to be -// associated. For more information about supported instance types, see Dedicated -// Hosts Overview (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeHostReservationOfferings for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferings -func (c *EC2) DescribeHostReservationOfferings(input *DescribeHostReservationOfferingsInput) (*DescribeHostReservationOfferingsOutput, error) { - req, out := c.DescribeHostReservationOfferingsRequest(input) - return out, req.Send() -} - -// DescribeHostReservationOfferingsWithContext is the same as DescribeHostReservationOfferings with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeHostReservationOfferings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeHostReservationOfferingsWithContext(ctx aws.Context, input *DescribeHostReservationOfferingsInput, opts ...request.Option) (*DescribeHostReservationOfferingsOutput, error) { - req, out := c.DescribeHostReservationOfferingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeHostReservations = "DescribeHostReservations" - -// DescribeHostReservationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeHostReservations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeHostReservations for more information on using the DescribeHostReservations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeHostReservationsRequest method. -// req, resp := client.DescribeHostReservationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservations -func (c *EC2) DescribeHostReservationsRequest(input *DescribeHostReservationsInput) (req *request.Request, output *DescribeHostReservationsOutput) { - op := &request.Operation{ - Name: opDescribeHostReservations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeHostReservationsInput{} - } - - output = &DescribeHostReservationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeHostReservations API operation for Amazon Elastic Compute Cloud. -// -// Describes reservations that are associated with Dedicated Hosts in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeHostReservations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservations -func (c *EC2) DescribeHostReservations(input *DescribeHostReservationsInput) (*DescribeHostReservationsOutput, error) { - req, out := c.DescribeHostReservationsRequest(input) - return out, req.Send() -} - -// DescribeHostReservationsWithContext is the same as DescribeHostReservations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeHostReservations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeHostReservationsWithContext(ctx aws.Context, input *DescribeHostReservationsInput, opts ...request.Option) (*DescribeHostReservationsOutput, error) { - req, out := c.DescribeHostReservationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeHosts = "DescribeHosts" - -// DescribeHostsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeHosts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeHosts for more information on using the DescribeHosts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeHostsRequest method. -// req, resp := client.DescribeHostsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHosts -func (c *EC2) DescribeHostsRequest(input *DescribeHostsInput) (req *request.Request, output *DescribeHostsOutput) { - op := &request.Operation{ - Name: opDescribeHosts, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeHostsInput{} - } - - output = &DescribeHostsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeHosts API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your Dedicated Hosts. -// -// The results describe only the Dedicated Hosts in the Region you're currently -// using. All listed instances consume capacity on your Dedicated Host. Dedicated -// Hosts that have recently been released are listed with the state released. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeHosts for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHosts -func (c *EC2) DescribeHosts(input *DescribeHostsInput) (*DescribeHostsOutput, error) { - req, out := c.DescribeHostsRequest(input) - return out, req.Send() -} - -// DescribeHostsWithContext is the same as DescribeHosts with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeHosts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeHostsWithContext(ctx aws.Context, input *DescribeHostsInput, opts ...request.Option) (*DescribeHostsOutput, error) { - req, out := c.DescribeHostsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeIamInstanceProfileAssociations = "DescribeIamInstanceProfileAssociations" - -// DescribeIamInstanceProfileAssociationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeIamInstanceProfileAssociations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeIamInstanceProfileAssociations for more information on using the DescribeIamInstanceProfileAssociations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeIamInstanceProfileAssociationsRequest method. -// req, resp := client.DescribeIamInstanceProfileAssociationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIamInstanceProfileAssociations -func (c *EC2) DescribeIamInstanceProfileAssociationsRequest(input *DescribeIamInstanceProfileAssociationsInput) (req *request.Request, output *DescribeIamInstanceProfileAssociationsOutput) { - op := &request.Operation{ - Name: opDescribeIamInstanceProfileAssociations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeIamInstanceProfileAssociationsInput{} - } - - output = &DescribeIamInstanceProfileAssociationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeIamInstanceProfileAssociations API operation for Amazon Elastic Compute Cloud. -// -// Describes your IAM instance profile associations. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeIamInstanceProfileAssociations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIamInstanceProfileAssociations -func (c *EC2) DescribeIamInstanceProfileAssociations(input *DescribeIamInstanceProfileAssociationsInput) (*DescribeIamInstanceProfileAssociationsOutput, error) { - req, out := c.DescribeIamInstanceProfileAssociationsRequest(input) - return out, req.Send() -} - -// DescribeIamInstanceProfileAssociationsWithContext is the same as DescribeIamInstanceProfileAssociations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeIamInstanceProfileAssociations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeIamInstanceProfileAssociationsWithContext(ctx aws.Context, input *DescribeIamInstanceProfileAssociationsInput, opts ...request.Option) (*DescribeIamInstanceProfileAssociationsOutput, error) { - req, out := c.DescribeIamInstanceProfileAssociationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeIdFormat = "DescribeIdFormat" - -// DescribeIdFormatRequest generates a "aws/request.Request" representing the -// client's request for the DescribeIdFormat operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeIdFormat for more information on using the DescribeIdFormat -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeIdFormatRequest method. -// req, resp := client.DescribeIdFormatRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormat -func (c *EC2) DescribeIdFormatRequest(input *DescribeIdFormatInput) (req *request.Request, output *DescribeIdFormatOutput) { - op := &request.Operation{ - Name: opDescribeIdFormat, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeIdFormatInput{} - } - - output = &DescribeIdFormatOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeIdFormat API operation for Amazon Elastic Compute Cloud. -// -// Describes the ID format settings for your resources on a per-region basis, -// for example, to view which resource types are enabled for longer IDs. This -// request only returns information about resource types whose ID formats can -// be modified; it does not return information about other resource types. -// -// The following resource types support longer IDs: bundle | conversion-task -// | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association -// | export-task | flow-log | image | import-task | instance | internet-gateway -// | network-acl | network-acl-association | network-interface | network-interface-attachment -// | prefix-list | reservation | route-table | route-table-association | security-group -// | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association -// | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway. -// -// These settings apply to the IAM user who makes the request; they do not apply -// to the entire AWS account. By default, an IAM user defaults to the same settings -// as the root user, unless they explicitly override the settings by running -// the ModifyIdFormat command. Resources created with longer IDs are visible -// to all IAM users, regardless of these settings and provided that they have -// permission to use the relevant Describe command for the resource type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeIdFormat for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormat -func (c *EC2) DescribeIdFormat(input *DescribeIdFormatInput) (*DescribeIdFormatOutput, error) { - req, out := c.DescribeIdFormatRequest(input) - return out, req.Send() -} - -// DescribeIdFormatWithContext is the same as DescribeIdFormat with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeIdFormat for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeIdFormatWithContext(ctx aws.Context, input *DescribeIdFormatInput, opts ...request.Option) (*DescribeIdFormatOutput, error) { - req, out := c.DescribeIdFormatRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeIdentityIdFormat = "DescribeIdentityIdFormat" - -// DescribeIdentityIdFormatRequest generates a "aws/request.Request" representing the -// client's request for the DescribeIdentityIdFormat operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeIdentityIdFormat for more information on using the DescribeIdentityIdFormat -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeIdentityIdFormatRequest method. -// req, resp := client.DescribeIdentityIdFormatRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdentityIdFormat -func (c *EC2) DescribeIdentityIdFormatRequest(input *DescribeIdentityIdFormatInput) (req *request.Request, output *DescribeIdentityIdFormatOutput) { - op := &request.Operation{ - Name: opDescribeIdentityIdFormat, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeIdentityIdFormatInput{} - } - - output = &DescribeIdentityIdFormatOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeIdentityIdFormat API operation for Amazon Elastic Compute Cloud. -// -// Describes the ID format settings for resources for the specified IAM user, -// IAM role, or root user. For example, you can view the resource types that -// are enabled for longer IDs. This request only returns information about resource -// types whose ID formats can be modified; it does not return information about -// other resource types. For more information, see Resource IDs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// The following resource types support longer IDs: bundle | conversion-task -// | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association -// | export-task | flow-log | image | import-task | instance | internet-gateway -// | network-acl | network-acl-association | network-interface | network-interface-attachment -// | prefix-list | reservation | route-table | route-table-association | security-group -// | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association -// | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway. -// -// These settings apply to the principal specified in the request. They do not -// apply to the principal that makes the request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeIdentityIdFormat for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdentityIdFormat -func (c *EC2) DescribeIdentityIdFormat(input *DescribeIdentityIdFormatInput) (*DescribeIdentityIdFormatOutput, error) { - req, out := c.DescribeIdentityIdFormatRequest(input) - return out, req.Send() -} - -// DescribeIdentityIdFormatWithContext is the same as DescribeIdentityIdFormat with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeIdentityIdFormat for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeIdentityIdFormatWithContext(ctx aws.Context, input *DescribeIdentityIdFormatInput, opts ...request.Option) (*DescribeIdentityIdFormatOutput, error) { - req, out := c.DescribeIdentityIdFormatRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeImageAttribute = "DescribeImageAttribute" - -// DescribeImageAttributeRequest generates a "aws/request.Request" representing the -// client's request for the DescribeImageAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeImageAttribute for more information on using the DescribeImageAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeImageAttributeRequest method. -// req, resp := client.DescribeImageAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImageAttribute -func (c *EC2) DescribeImageAttributeRequest(input *DescribeImageAttributeInput) (req *request.Request, output *DescribeImageAttributeOutput) { - op := &request.Operation{ - Name: opDescribeImageAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeImageAttributeInput{} - } - - output = &DescribeImageAttributeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeImageAttribute API operation for Amazon Elastic Compute Cloud. -// -// Describes the specified attribute of the specified AMI. You can specify only -// one attribute at a time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeImageAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImageAttribute -func (c *EC2) DescribeImageAttribute(input *DescribeImageAttributeInput) (*DescribeImageAttributeOutput, error) { - req, out := c.DescribeImageAttributeRequest(input) - return out, req.Send() -} - -// DescribeImageAttributeWithContext is the same as DescribeImageAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeImageAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeImageAttributeWithContext(ctx aws.Context, input *DescribeImageAttributeInput, opts ...request.Option) (*DescribeImageAttributeOutput, error) { - req, out := c.DescribeImageAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeImages = "DescribeImages" - -// DescribeImagesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeImages operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeImages for more information on using the DescribeImages -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeImagesRequest method. -// req, resp := client.DescribeImagesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages -func (c *EC2) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Request, output *DescribeImagesOutput) { - op := &request.Operation{ - Name: opDescribeImages, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeImagesInput{} - } - - output = &DescribeImagesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeImages API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of the images (AMIs, AKIs, and ARIs) available to you. -// Images available to you include public images, private images that you own, -// and private images owned by other AWS accounts but for which you have explicit -// launch permissions. -// -// Deregistered images are included in the returned results for an unspecified -// interval after deregistration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeImages for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages -func (c *EC2) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) { - req, out := c.DescribeImagesRequest(input) - return out, req.Send() -} - -// DescribeImagesWithContext is the same as DescribeImages with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeImages for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeImagesWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.Option) (*DescribeImagesOutput, error) { - req, out := c.DescribeImagesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeImportImageTasks = "DescribeImportImageTasks" - -// DescribeImportImageTasksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeImportImageTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeImportImageTasks for more information on using the DescribeImportImageTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeImportImageTasksRequest method. -// req, resp := client.DescribeImportImageTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportImageTasks -func (c *EC2) DescribeImportImageTasksRequest(input *DescribeImportImageTasksInput) (req *request.Request, output *DescribeImportImageTasksOutput) { - op := &request.Operation{ - Name: opDescribeImportImageTasks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeImportImageTasksInput{} - } - - output = &DescribeImportImageTasksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeImportImageTasks API operation for Amazon Elastic Compute Cloud. -// -// Displays details about an import virtual machine or import snapshot tasks -// that are already created. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeImportImageTasks for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportImageTasks -func (c *EC2) DescribeImportImageTasks(input *DescribeImportImageTasksInput) (*DescribeImportImageTasksOutput, error) { - req, out := c.DescribeImportImageTasksRequest(input) - return out, req.Send() -} - -// DescribeImportImageTasksWithContext is the same as DescribeImportImageTasks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeImportImageTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeImportImageTasksWithContext(ctx aws.Context, input *DescribeImportImageTasksInput, opts ...request.Option) (*DescribeImportImageTasksOutput, error) { - req, out := c.DescribeImportImageTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeImportSnapshotTasks = "DescribeImportSnapshotTasks" - -// DescribeImportSnapshotTasksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeImportSnapshotTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeImportSnapshotTasks for more information on using the DescribeImportSnapshotTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeImportSnapshotTasksRequest method. -// req, resp := client.DescribeImportSnapshotTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportSnapshotTasks -func (c *EC2) DescribeImportSnapshotTasksRequest(input *DescribeImportSnapshotTasksInput) (req *request.Request, output *DescribeImportSnapshotTasksOutput) { - op := &request.Operation{ - Name: opDescribeImportSnapshotTasks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeImportSnapshotTasksInput{} - } - - output = &DescribeImportSnapshotTasksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeImportSnapshotTasks API operation for Amazon Elastic Compute Cloud. -// -// Describes your import snapshot tasks. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeImportSnapshotTasks for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportSnapshotTasks -func (c *EC2) DescribeImportSnapshotTasks(input *DescribeImportSnapshotTasksInput) (*DescribeImportSnapshotTasksOutput, error) { - req, out := c.DescribeImportSnapshotTasksRequest(input) - return out, req.Send() -} - -// DescribeImportSnapshotTasksWithContext is the same as DescribeImportSnapshotTasks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeImportSnapshotTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeImportSnapshotTasksWithContext(ctx aws.Context, input *DescribeImportSnapshotTasksInput, opts ...request.Option) (*DescribeImportSnapshotTasksOutput, error) { - req, out := c.DescribeImportSnapshotTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInstanceAttribute = "DescribeInstanceAttribute" - -// DescribeInstanceAttributeRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInstanceAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInstanceAttribute for more information on using the DescribeInstanceAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInstanceAttributeRequest method. -// req, resp := client.DescribeInstanceAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceAttribute -func (c *EC2) DescribeInstanceAttributeRequest(input *DescribeInstanceAttributeInput) (req *request.Request, output *DescribeInstanceAttributeOutput) { - op := &request.Operation{ - Name: opDescribeInstanceAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInstanceAttributeInput{} - } - - output = &DescribeInstanceAttributeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInstanceAttribute API operation for Amazon Elastic Compute Cloud. -// -// Describes the specified attribute of the specified instance. You can specify -// only one attribute at a time. Valid attribute values are: instanceType | -// kernel | ramdisk | userData | disableApiTermination | instanceInitiatedShutdownBehavior -// | rootDeviceName | blockDeviceMapping | productCodes | sourceDestCheck | -// groupSet | ebsOptimized | sriovNetSupport -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeInstanceAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceAttribute -func (c *EC2) DescribeInstanceAttribute(input *DescribeInstanceAttributeInput) (*DescribeInstanceAttributeOutput, error) { - req, out := c.DescribeInstanceAttributeRequest(input) - return out, req.Send() -} - -// DescribeInstanceAttributeWithContext is the same as DescribeInstanceAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInstanceAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeInstanceAttributeWithContext(ctx aws.Context, input *DescribeInstanceAttributeInput, opts ...request.Option) (*DescribeInstanceAttributeOutput, error) { - req, out := c.DescribeInstanceAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInstanceCreditSpecifications = "DescribeInstanceCreditSpecifications" - -// DescribeInstanceCreditSpecificationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInstanceCreditSpecifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInstanceCreditSpecifications for more information on using the DescribeInstanceCreditSpecifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInstanceCreditSpecificationsRequest method. -// req, resp := client.DescribeInstanceCreditSpecificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceCreditSpecifications -func (c *EC2) DescribeInstanceCreditSpecificationsRequest(input *DescribeInstanceCreditSpecificationsInput) (req *request.Request, output *DescribeInstanceCreditSpecificationsOutput) { - op := &request.Operation{ - Name: opDescribeInstanceCreditSpecifications, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInstanceCreditSpecificationsInput{} - } - - output = &DescribeInstanceCreditSpecificationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInstanceCreditSpecifications API operation for Amazon Elastic Compute Cloud. -// -// Describes the credit option for CPU usage of one or more of your T2 or T3 -// instances. The credit options are standard and unlimited. -// -// If you do not specify an instance ID, Amazon EC2 returns T2 and T3 instances -// with the unlimited credit option, as well as instances that were previously -// configured as T2 or T3 with the unlimited credit option. For example, if -// you resize a T2 instance, while it is configured as unlimited, to an M4 instance, -// Amazon EC2 returns the M4 instance. -// -// If you specify one or more instance IDs, Amazon EC2 returns the credit option -// (standard or unlimited) of those instances. If you specify an instance ID -// that is not valid, such as an instance that is not a T2 or T3 instance, an -// error is returned. -// -// Recently terminated instances might appear in the returned results. This -// interval is usually less than one hour. -// -// If an Availability Zone is experiencing a service disruption and you specify -// instance IDs in the affected zone, or do not specify any instance IDs at -// all, the call fails. If you specify only instance IDs in an unaffected zone, -// the call works normally. -// -// For more information, see Burstable Performance Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeInstanceCreditSpecifications for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceCreditSpecifications -func (c *EC2) DescribeInstanceCreditSpecifications(input *DescribeInstanceCreditSpecificationsInput) (*DescribeInstanceCreditSpecificationsOutput, error) { - req, out := c.DescribeInstanceCreditSpecificationsRequest(input) - return out, req.Send() -} - -// DescribeInstanceCreditSpecificationsWithContext is the same as DescribeInstanceCreditSpecifications with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInstanceCreditSpecifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeInstanceCreditSpecificationsWithContext(ctx aws.Context, input *DescribeInstanceCreditSpecificationsInput, opts ...request.Option) (*DescribeInstanceCreditSpecificationsOutput, error) { - req, out := c.DescribeInstanceCreditSpecificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInstanceStatus = "DescribeInstanceStatus" - -// DescribeInstanceStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInstanceStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInstanceStatus for more information on using the DescribeInstanceStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInstanceStatusRequest method. -// req, resp := client.DescribeInstanceStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatus -func (c *EC2) DescribeInstanceStatusRequest(input *DescribeInstanceStatusInput) (req *request.Request, output *DescribeInstanceStatusOutput) { - op := &request.Operation{ - Name: opDescribeInstanceStatus, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeInstanceStatusInput{} - } - - output = &DescribeInstanceStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInstanceStatus API operation for Amazon Elastic Compute Cloud. -// -// Describes the status of one or more instances. By default, only running instances -// are described, unless you specifically indicate to return the status of all -// instances. -// -// Instance status includes the following components: -// -// * Status checks - Amazon EC2 performs status checks on running EC2 instances -// to identify hardware and software issues. For more information, see Status -// Checks for Your Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html) -// and Troubleshooting Instances with Failed Status Checks (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// * Scheduled events - Amazon EC2 can schedule events (such as reboot, stop, -// or terminate) for your instances related to hardware issues, software -// updates, or system maintenance. For more information, see Scheduled Events -// for Your Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// * Instance state - You can manage your instances from the moment you launch -// them through their termination. For more information, see Instance Lifecycle -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeInstanceStatus for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatus -func (c *EC2) DescribeInstanceStatus(input *DescribeInstanceStatusInput) (*DescribeInstanceStatusOutput, error) { - req, out := c.DescribeInstanceStatusRequest(input) - return out, req.Send() -} - -// DescribeInstanceStatusWithContext is the same as DescribeInstanceStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInstanceStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeInstanceStatusWithContext(ctx aws.Context, input *DescribeInstanceStatusInput, opts ...request.Option) (*DescribeInstanceStatusOutput, error) { - req, out := c.DescribeInstanceStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeInstanceStatusPages iterates over the pages of a DescribeInstanceStatus operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeInstanceStatus 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 DescribeInstanceStatus operation. -// pageNum := 0 -// err := client.DescribeInstanceStatusPages(params, -// func(page *DescribeInstanceStatusOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EC2) DescribeInstanceStatusPages(input *DescribeInstanceStatusInput, fn func(*DescribeInstanceStatusOutput, bool) bool) error { - return c.DescribeInstanceStatusPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeInstanceStatusPagesWithContext same as DescribeInstanceStatusPages 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 *EC2) DescribeInstanceStatusPagesWithContext(ctx aws.Context, input *DescribeInstanceStatusInput, fn func(*DescribeInstanceStatusOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeInstanceStatusInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstanceStatusRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeInstanceStatusOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeInstances = "DescribeInstances" - -// DescribeInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInstances for more information on using the DescribeInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInstancesRequest method. -// req, resp := client.DescribeInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances -func (c *EC2) DescribeInstancesRequest(input *DescribeInstancesInput) (req *request.Request, output *DescribeInstancesOutput) { - op := &request.Operation{ - Name: opDescribeInstances, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeInstancesInput{} - } - - output = &DescribeInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInstances API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your instances. -// -// If you specify one or more instance IDs, Amazon EC2 returns information for -// those instances. If you do not specify instance IDs, Amazon EC2 returns information -// for all relevant instances. If you specify an instance ID that is not valid, -// an error is returned. If you specify an instance that you do not own, it -// is not included in the returned results. -// -// Recently terminated instances might appear in the returned results. This -// interval is usually less than one hour. -// -// If you describe instances in the rare case where an Availability Zone is -// experiencing a service disruption and you specify instance IDs that are in -// the affected zone, or do not specify any instance IDs at all, the call fails. -// If you describe instances and specify only instance IDs that are in an unaffected -// zone, the call works normally. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances -func (c *EC2) DescribeInstances(input *DescribeInstancesInput) (*DescribeInstancesOutput, error) { - req, out := c.DescribeInstancesRequest(input) - return out, req.Send() -} - -// DescribeInstancesWithContext is the same as DescribeInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeInstancesWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.Option) (*DescribeInstancesOutput, error) { - req, out := c.DescribeInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeInstancesPages iterates over the pages of a DescribeInstances operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeInstances 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 DescribeInstances operation. -// pageNum := 0 -// err := client.DescribeInstancesPages(params, -// func(page *DescribeInstancesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EC2) DescribeInstancesPages(input *DescribeInstancesInput, fn func(*DescribeInstancesOutput, bool) bool) error { - return c.DescribeInstancesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeInstancesPagesWithContext same as DescribeInstancesPages 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 *EC2) DescribeInstancesPagesWithContext(ctx aws.Context, input *DescribeInstancesInput, fn func(*DescribeInstancesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeInstancesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeInternetGateways = "DescribeInternetGateways" - -// DescribeInternetGatewaysRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInternetGateways operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInternetGateways for more information on using the DescribeInternetGateways -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInternetGatewaysRequest method. -// req, resp := client.DescribeInternetGatewaysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways -func (c *EC2) DescribeInternetGatewaysRequest(input *DescribeInternetGatewaysInput) (req *request.Request, output *DescribeInternetGatewaysOutput) { - op := &request.Operation{ - Name: opDescribeInternetGateways, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInternetGatewaysInput{} - } - - output = &DescribeInternetGatewaysOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInternetGateways API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your internet gateways. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeInternetGateways for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways -func (c *EC2) DescribeInternetGateways(input *DescribeInternetGatewaysInput) (*DescribeInternetGatewaysOutput, error) { - req, out := c.DescribeInternetGatewaysRequest(input) - return out, req.Send() -} - -// DescribeInternetGatewaysWithContext is the same as DescribeInternetGateways with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInternetGateways for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeInternetGatewaysWithContext(ctx aws.Context, input *DescribeInternetGatewaysInput, opts ...request.Option) (*DescribeInternetGatewaysOutput, error) { - req, out := c.DescribeInternetGatewaysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeKeyPairs = "DescribeKeyPairs" - -// DescribeKeyPairsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeKeyPairs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeKeyPairs for more information on using the DescribeKeyPairs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeKeyPairsRequest method. -// req, resp := client.DescribeKeyPairsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs -func (c *EC2) DescribeKeyPairsRequest(input *DescribeKeyPairsInput) (req *request.Request, output *DescribeKeyPairsOutput) { - op := &request.Operation{ - Name: opDescribeKeyPairs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeKeyPairsInput{} - } - - output = &DescribeKeyPairsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeKeyPairs API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your key pairs. -// -// For more information about key pairs, see Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeKeyPairs for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs -func (c *EC2) DescribeKeyPairs(input *DescribeKeyPairsInput) (*DescribeKeyPairsOutput, error) { - req, out := c.DescribeKeyPairsRequest(input) - return out, req.Send() -} - -// DescribeKeyPairsWithContext is the same as DescribeKeyPairs with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeKeyPairs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeKeyPairsWithContext(ctx aws.Context, input *DescribeKeyPairsInput, opts ...request.Option) (*DescribeKeyPairsOutput, error) { - req, out := c.DescribeKeyPairsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLaunchTemplateVersions = "DescribeLaunchTemplateVersions" - -// DescribeLaunchTemplateVersionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLaunchTemplateVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLaunchTemplateVersions for more information on using the DescribeLaunchTemplateVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLaunchTemplateVersionsRequest method. -// req, resp := client.DescribeLaunchTemplateVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLaunchTemplateVersions -func (c *EC2) DescribeLaunchTemplateVersionsRequest(input *DescribeLaunchTemplateVersionsInput) (req *request.Request, output *DescribeLaunchTemplateVersionsOutput) { - op := &request.Operation{ - Name: opDescribeLaunchTemplateVersions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLaunchTemplateVersionsInput{} - } - - output = &DescribeLaunchTemplateVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLaunchTemplateVersions API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more versions of a specified launch template. You can describe -// all versions, individual versions, or a range of versions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeLaunchTemplateVersions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLaunchTemplateVersions -func (c *EC2) DescribeLaunchTemplateVersions(input *DescribeLaunchTemplateVersionsInput) (*DescribeLaunchTemplateVersionsOutput, error) { - req, out := c.DescribeLaunchTemplateVersionsRequest(input) - return out, req.Send() -} - -// DescribeLaunchTemplateVersionsWithContext is the same as DescribeLaunchTemplateVersions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLaunchTemplateVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeLaunchTemplateVersionsWithContext(ctx aws.Context, input *DescribeLaunchTemplateVersionsInput, opts ...request.Option) (*DescribeLaunchTemplateVersionsOutput, error) { - req, out := c.DescribeLaunchTemplateVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLaunchTemplates = "DescribeLaunchTemplates" - -// DescribeLaunchTemplatesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLaunchTemplates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLaunchTemplates for more information on using the DescribeLaunchTemplates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLaunchTemplatesRequest method. -// req, resp := client.DescribeLaunchTemplatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLaunchTemplates -func (c *EC2) DescribeLaunchTemplatesRequest(input *DescribeLaunchTemplatesInput) (req *request.Request, output *DescribeLaunchTemplatesOutput) { - op := &request.Operation{ - Name: opDescribeLaunchTemplates, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLaunchTemplatesInput{} - } - - output = &DescribeLaunchTemplatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLaunchTemplates API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more launch templates. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeLaunchTemplates for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLaunchTemplates -func (c *EC2) DescribeLaunchTemplates(input *DescribeLaunchTemplatesInput) (*DescribeLaunchTemplatesOutput, error) { - req, out := c.DescribeLaunchTemplatesRequest(input) - return out, req.Send() -} - -// DescribeLaunchTemplatesWithContext is the same as DescribeLaunchTemplates with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLaunchTemplates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeLaunchTemplatesWithContext(ctx aws.Context, input *DescribeLaunchTemplatesInput, opts ...request.Option) (*DescribeLaunchTemplatesOutput, error) { - req, out := c.DescribeLaunchTemplatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMovingAddresses = "DescribeMovingAddresses" - -// DescribeMovingAddressesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMovingAddresses operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMovingAddresses for more information on using the DescribeMovingAddresses -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMovingAddressesRequest method. -// req, resp := client.DescribeMovingAddressesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeMovingAddresses -func (c *EC2) DescribeMovingAddressesRequest(input *DescribeMovingAddressesInput) (req *request.Request, output *DescribeMovingAddressesOutput) { - op := &request.Operation{ - Name: opDescribeMovingAddresses, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMovingAddressesInput{} - } - - output = &DescribeMovingAddressesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMovingAddresses API operation for Amazon Elastic Compute Cloud. -// -// Describes your Elastic IP addresses that are being moved to the EC2-VPC platform, -// or that are being restored to the EC2-Classic platform. This request does -// not return information about any other Elastic IP addresses in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeMovingAddresses for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeMovingAddresses -func (c *EC2) DescribeMovingAddresses(input *DescribeMovingAddressesInput) (*DescribeMovingAddressesOutput, error) { - req, out := c.DescribeMovingAddressesRequest(input) - return out, req.Send() -} - -// DescribeMovingAddressesWithContext is the same as DescribeMovingAddresses with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMovingAddresses for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeMovingAddressesWithContext(ctx aws.Context, input *DescribeMovingAddressesInput, opts ...request.Option) (*DescribeMovingAddressesOutput, error) { - req, out := c.DescribeMovingAddressesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeNatGateways = "DescribeNatGateways" - -// DescribeNatGatewaysRequest generates a "aws/request.Request" representing the -// client's request for the DescribeNatGateways operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeNatGateways for more information on using the DescribeNatGateways -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeNatGatewaysRequest method. -// req, resp := client.DescribeNatGatewaysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGateways -func (c *EC2) DescribeNatGatewaysRequest(input *DescribeNatGatewaysInput) (req *request.Request, output *DescribeNatGatewaysOutput) { - op := &request.Operation{ - Name: opDescribeNatGateways, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeNatGatewaysInput{} - } - - output = &DescribeNatGatewaysOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeNatGateways API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your NAT gateways. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeNatGateways for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGateways -func (c *EC2) DescribeNatGateways(input *DescribeNatGatewaysInput) (*DescribeNatGatewaysOutput, error) { - req, out := c.DescribeNatGatewaysRequest(input) - return out, req.Send() -} - -// DescribeNatGatewaysWithContext is the same as DescribeNatGateways with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeNatGateways for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeNatGatewaysWithContext(ctx aws.Context, input *DescribeNatGatewaysInput, opts ...request.Option) (*DescribeNatGatewaysOutput, error) { - req, out := c.DescribeNatGatewaysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeNatGatewaysPages iterates over the pages of a DescribeNatGateways operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeNatGateways 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 DescribeNatGateways operation. -// pageNum := 0 -// err := client.DescribeNatGatewaysPages(params, -// func(page *DescribeNatGatewaysOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EC2) DescribeNatGatewaysPages(input *DescribeNatGatewaysInput, fn func(*DescribeNatGatewaysOutput, bool) bool) error { - return c.DescribeNatGatewaysPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeNatGatewaysPagesWithContext same as DescribeNatGatewaysPages 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 *EC2) DescribeNatGatewaysPagesWithContext(ctx aws.Context, input *DescribeNatGatewaysInput, fn func(*DescribeNatGatewaysOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeNatGatewaysInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeNatGatewaysRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeNatGatewaysOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeNetworkAcls = "DescribeNetworkAcls" - -// DescribeNetworkAclsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeNetworkAcls operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeNetworkAcls for more information on using the DescribeNetworkAcls -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeNetworkAclsRequest method. -// req, resp := client.DescribeNetworkAclsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls -func (c *EC2) DescribeNetworkAclsRequest(input *DescribeNetworkAclsInput) (req *request.Request, output *DescribeNetworkAclsOutput) { - op := &request.Operation{ - Name: opDescribeNetworkAcls, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeNetworkAclsInput{} - } - - output = &DescribeNetworkAclsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeNetworkAcls API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your network ACLs. -// -// For more information, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeNetworkAcls for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls -func (c *EC2) DescribeNetworkAcls(input *DescribeNetworkAclsInput) (*DescribeNetworkAclsOutput, error) { - req, out := c.DescribeNetworkAclsRequest(input) - return out, req.Send() -} - -// DescribeNetworkAclsWithContext is the same as DescribeNetworkAcls with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeNetworkAcls for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeNetworkAclsWithContext(ctx aws.Context, input *DescribeNetworkAclsInput, opts ...request.Option) (*DescribeNetworkAclsOutput, error) { - req, out := c.DescribeNetworkAclsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeNetworkInterfaceAttribute = "DescribeNetworkInterfaceAttribute" - -// DescribeNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the -// client's request for the DescribeNetworkInterfaceAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeNetworkInterfaceAttribute for more information on using the DescribeNetworkInterfaceAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeNetworkInterfaceAttributeRequest method. -// req, resp := client.DescribeNetworkInterfaceAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttribute -func (c *EC2) DescribeNetworkInterfaceAttributeRequest(input *DescribeNetworkInterfaceAttributeInput) (req *request.Request, output *DescribeNetworkInterfaceAttributeOutput) { - op := &request.Operation{ - Name: opDescribeNetworkInterfaceAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeNetworkInterfaceAttributeInput{} - } - - output = &DescribeNetworkInterfaceAttributeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeNetworkInterfaceAttribute API operation for Amazon Elastic Compute Cloud. -// -// Describes a network interface attribute. You can specify only one attribute -// at a time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeNetworkInterfaceAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttribute -func (c *EC2) DescribeNetworkInterfaceAttribute(input *DescribeNetworkInterfaceAttributeInput) (*DescribeNetworkInterfaceAttributeOutput, error) { - req, out := c.DescribeNetworkInterfaceAttributeRequest(input) - return out, req.Send() -} - -// DescribeNetworkInterfaceAttributeWithContext is the same as DescribeNetworkInterfaceAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeNetworkInterfaceAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeNetworkInterfaceAttributeWithContext(ctx aws.Context, input *DescribeNetworkInterfaceAttributeInput, opts ...request.Option) (*DescribeNetworkInterfaceAttributeOutput, error) { - req, out := c.DescribeNetworkInterfaceAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeNetworkInterfacePermissions = "DescribeNetworkInterfacePermissions" - -// DescribeNetworkInterfacePermissionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeNetworkInterfacePermissions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeNetworkInterfacePermissions for more information on using the DescribeNetworkInterfacePermissions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeNetworkInterfacePermissionsRequest method. -// req, resp := client.DescribeNetworkInterfacePermissionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissions -func (c *EC2) DescribeNetworkInterfacePermissionsRequest(input *DescribeNetworkInterfacePermissionsInput) (req *request.Request, output *DescribeNetworkInterfacePermissionsOutput) { - op := &request.Operation{ - Name: opDescribeNetworkInterfacePermissions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeNetworkInterfacePermissionsInput{} - } - - output = &DescribeNetworkInterfacePermissionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeNetworkInterfacePermissions API operation for Amazon Elastic Compute Cloud. -// -// Describes the permissions for your network interfaces. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeNetworkInterfacePermissions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissions -func (c *EC2) DescribeNetworkInterfacePermissions(input *DescribeNetworkInterfacePermissionsInput) (*DescribeNetworkInterfacePermissionsOutput, error) { - req, out := c.DescribeNetworkInterfacePermissionsRequest(input) - return out, req.Send() -} - -// DescribeNetworkInterfacePermissionsWithContext is the same as DescribeNetworkInterfacePermissions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeNetworkInterfacePermissions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeNetworkInterfacePermissionsWithContext(ctx aws.Context, input *DescribeNetworkInterfacePermissionsInput, opts ...request.Option) (*DescribeNetworkInterfacePermissionsOutput, error) { - req, out := c.DescribeNetworkInterfacePermissionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeNetworkInterfaces = "DescribeNetworkInterfaces" - -// DescribeNetworkInterfacesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeNetworkInterfaces operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeNetworkInterfaces for more information on using the DescribeNetworkInterfaces -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeNetworkInterfacesRequest method. -// req, resp := client.DescribeNetworkInterfacesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces -func (c *EC2) DescribeNetworkInterfacesRequest(input *DescribeNetworkInterfacesInput) (req *request.Request, output *DescribeNetworkInterfacesOutput) { - op := &request.Operation{ - Name: opDescribeNetworkInterfaces, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeNetworkInterfacesInput{} - } - - output = &DescribeNetworkInterfacesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeNetworkInterfaces API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your network interfaces. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeNetworkInterfaces for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces -func (c *EC2) DescribeNetworkInterfaces(input *DescribeNetworkInterfacesInput) (*DescribeNetworkInterfacesOutput, error) { - req, out := c.DescribeNetworkInterfacesRequest(input) - return out, req.Send() -} - -// DescribeNetworkInterfacesWithContext is the same as DescribeNetworkInterfaces with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeNetworkInterfaces for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeNetworkInterfacesWithContext(ctx aws.Context, input *DescribeNetworkInterfacesInput, opts ...request.Option) (*DescribeNetworkInterfacesOutput, error) { - req, out := c.DescribeNetworkInterfacesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeNetworkInterfacesPages iterates over the pages of a DescribeNetworkInterfaces operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeNetworkInterfaces 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 DescribeNetworkInterfaces operation. -// pageNum := 0 -// err := client.DescribeNetworkInterfacesPages(params, -// func(page *DescribeNetworkInterfacesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EC2) DescribeNetworkInterfacesPages(input *DescribeNetworkInterfacesInput, fn func(*DescribeNetworkInterfacesOutput, bool) bool) error { - return c.DescribeNetworkInterfacesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeNetworkInterfacesPagesWithContext same as DescribeNetworkInterfacesPages 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 *EC2) DescribeNetworkInterfacesPagesWithContext(ctx aws.Context, input *DescribeNetworkInterfacesInput, fn func(*DescribeNetworkInterfacesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeNetworkInterfacesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeNetworkInterfacesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeNetworkInterfacesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribePlacementGroups = "DescribePlacementGroups" - -// DescribePlacementGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribePlacementGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePlacementGroups for more information on using the DescribePlacementGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePlacementGroupsRequest method. -// req, resp := client.DescribePlacementGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups -func (c *EC2) DescribePlacementGroupsRequest(input *DescribePlacementGroupsInput) (req *request.Request, output *DescribePlacementGroupsOutput) { - op := &request.Operation{ - Name: opDescribePlacementGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePlacementGroupsInput{} - } - - output = &DescribePlacementGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePlacementGroups API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your placement groups. For more information, see -// Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribePlacementGroups for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups -func (c *EC2) DescribePlacementGroups(input *DescribePlacementGroupsInput) (*DescribePlacementGroupsOutput, error) { - req, out := c.DescribePlacementGroupsRequest(input) - return out, req.Send() -} - -// DescribePlacementGroupsWithContext is the same as DescribePlacementGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePlacementGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribePlacementGroupsWithContext(ctx aws.Context, input *DescribePlacementGroupsInput, opts ...request.Option) (*DescribePlacementGroupsOutput, error) { - req, out := c.DescribePlacementGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribePrefixLists = "DescribePrefixLists" - -// DescribePrefixListsRequest generates a "aws/request.Request" representing the -// client's request for the DescribePrefixLists operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePrefixLists for more information on using the DescribePrefixLists -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePrefixListsRequest method. -// req, resp := client.DescribePrefixListsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrefixLists -func (c *EC2) DescribePrefixListsRequest(input *DescribePrefixListsInput) (req *request.Request, output *DescribePrefixListsOutput) { - op := &request.Operation{ - Name: opDescribePrefixLists, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePrefixListsInput{} - } - - output = &DescribePrefixListsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePrefixLists API operation for Amazon Elastic Compute Cloud. -// -// Describes available AWS services in a prefix list format, which includes -// the prefix list name and prefix list ID of the service and the IP address -// range for the service. A prefix list ID is required for creating an outbound -// security group rule that allows traffic from a VPC to access an AWS service -// through a gateway VPC endpoint. Currently, the services that support this -// action are Amazon S3 and Amazon DynamoDB. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribePrefixLists for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrefixLists -func (c *EC2) DescribePrefixLists(input *DescribePrefixListsInput) (*DescribePrefixListsOutput, error) { - req, out := c.DescribePrefixListsRequest(input) - return out, req.Send() -} - -// DescribePrefixListsWithContext is the same as DescribePrefixLists with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePrefixLists for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribePrefixListsWithContext(ctx aws.Context, input *DescribePrefixListsInput, opts ...request.Option) (*DescribePrefixListsOutput, error) { - req, out := c.DescribePrefixListsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribePrincipalIdFormat = "DescribePrincipalIdFormat" - -// DescribePrincipalIdFormatRequest generates a "aws/request.Request" representing the -// client's request for the DescribePrincipalIdFormat operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePrincipalIdFormat for more information on using the DescribePrincipalIdFormat -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePrincipalIdFormatRequest method. -// req, resp := client.DescribePrincipalIdFormatRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrincipalIdFormat -func (c *EC2) DescribePrincipalIdFormatRequest(input *DescribePrincipalIdFormatInput) (req *request.Request, output *DescribePrincipalIdFormatOutput) { - op := &request.Operation{ - Name: opDescribePrincipalIdFormat, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePrincipalIdFormatInput{} - } - - output = &DescribePrincipalIdFormatOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePrincipalIdFormat API operation for Amazon Elastic Compute Cloud. -// -// Describes the ID format settings for the root user and all IAM roles and -// IAM users that have explicitly specified a longer ID (17-character ID) preference. -// -// By default, all IAM roles and IAM users default to the same ID settings as -// the root user, unless they explicitly override the settings. This request -// is useful for identifying those IAM users and IAM roles that have overridden -// the default ID settings. -// -// The following resource types support longer IDs: bundle | conversion-task -// | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association -// | export-task | flow-log | image | import-task | instance | internet-gateway -// | network-acl | network-acl-association | network-interface | network-interface-attachment -// | prefix-list | reservation | route-table | route-table-association | security-group -// | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association -// | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribePrincipalIdFormat for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrincipalIdFormat -func (c *EC2) DescribePrincipalIdFormat(input *DescribePrincipalIdFormatInput) (*DescribePrincipalIdFormatOutput, error) { - req, out := c.DescribePrincipalIdFormatRequest(input) - return out, req.Send() -} - -// DescribePrincipalIdFormatWithContext is the same as DescribePrincipalIdFormat with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePrincipalIdFormat for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribePrincipalIdFormatWithContext(ctx aws.Context, input *DescribePrincipalIdFormatInput, opts ...request.Option) (*DescribePrincipalIdFormatOutput, error) { - req, out := c.DescribePrincipalIdFormatRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribePublicIpv4Pools = "DescribePublicIpv4Pools" - -// DescribePublicIpv4PoolsRequest generates a "aws/request.Request" representing the -// client's request for the DescribePublicIpv4Pools operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePublicIpv4Pools for more information on using the DescribePublicIpv4Pools -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePublicIpv4PoolsRequest method. -// req, resp := client.DescribePublicIpv4PoolsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePublicIpv4Pools -func (c *EC2) DescribePublicIpv4PoolsRequest(input *DescribePublicIpv4PoolsInput) (req *request.Request, output *DescribePublicIpv4PoolsOutput) { - op := &request.Operation{ - Name: opDescribePublicIpv4Pools, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePublicIpv4PoolsInput{} - } - - output = &DescribePublicIpv4PoolsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePublicIpv4Pools API operation for Amazon Elastic Compute Cloud. -// -// Describes the specified IPv4 address pools. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribePublicIpv4Pools for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePublicIpv4Pools -func (c *EC2) DescribePublicIpv4Pools(input *DescribePublicIpv4PoolsInput) (*DescribePublicIpv4PoolsOutput, error) { - req, out := c.DescribePublicIpv4PoolsRequest(input) - return out, req.Send() -} - -// DescribePublicIpv4PoolsWithContext is the same as DescribePublicIpv4Pools with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePublicIpv4Pools for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribePublicIpv4PoolsWithContext(ctx aws.Context, input *DescribePublicIpv4PoolsInput, opts ...request.Option) (*DescribePublicIpv4PoolsOutput, error) { - req, out := c.DescribePublicIpv4PoolsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeRegions = "DescribeRegions" - -// DescribeRegionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRegions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRegions for more information on using the DescribeRegions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRegionsRequest method. -// req, resp := client.DescribeRegionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegions -func (c *EC2) DescribeRegionsRequest(input *DescribeRegionsInput) (req *request.Request, output *DescribeRegionsOutput) { - op := &request.Operation{ - Name: opDescribeRegions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeRegionsInput{} - } - - output = &DescribeRegionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRegions API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more regions that are currently available to you. -// -// For a list of the regions supported by Amazon EC2, see Regions and Endpoints -// (http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeRegions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegions -func (c *EC2) DescribeRegions(input *DescribeRegionsInput) (*DescribeRegionsOutput, error) { - req, out := c.DescribeRegionsRequest(input) - return out, req.Send() -} - -// DescribeRegionsWithContext is the same as DescribeRegions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRegions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeRegionsWithContext(ctx aws.Context, input *DescribeRegionsInput, opts ...request.Option) (*DescribeRegionsOutput, error) { - req, out := c.DescribeRegionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeReservedInstances = "DescribeReservedInstances" - -// DescribeReservedInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservedInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReservedInstances for more information on using the DescribeReservedInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReservedInstancesRequest method. -// req, resp := client.DescribeReservedInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstances -func (c *EC2) DescribeReservedInstancesRequest(input *DescribeReservedInstancesInput) (req *request.Request, output *DescribeReservedInstancesOutput) { - op := &request.Operation{ - Name: opDescribeReservedInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeReservedInstancesInput{} - } - - output = &DescribeReservedInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReservedInstances API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of the Reserved Instances that you purchased. -// -// For more information about Reserved Instances, see Reserved Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeReservedInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstances -func (c *EC2) DescribeReservedInstances(input *DescribeReservedInstancesInput) (*DescribeReservedInstancesOutput, error) { - req, out := c.DescribeReservedInstancesRequest(input) - return out, req.Send() -} - -// DescribeReservedInstancesWithContext is the same as DescribeReservedInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReservedInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeReservedInstancesWithContext(ctx aws.Context, input *DescribeReservedInstancesInput, opts ...request.Option) (*DescribeReservedInstancesOutput, error) { - req, out := c.DescribeReservedInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeReservedInstancesListings = "DescribeReservedInstancesListings" - -// DescribeReservedInstancesListingsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservedInstancesListings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReservedInstancesListings for more information on using the DescribeReservedInstancesListings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReservedInstancesListingsRequest method. -// req, resp := client.DescribeReservedInstancesListingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListings -func (c *EC2) DescribeReservedInstancesListingsRequest(input *DescribeReservedInstancesListingsInput) (req *request.Request, output *DescribeReservedInstancesListingsOutput) { - op := &request.Operation{ - Name: opDescribeReservedInstancesListings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeReservedInstancesListingsInput{} - } - - output = &DescribeReservedInstancesListingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReservedInstancesListings API operation for Amazon Elastic Compute Cloud. -// -// Describes your account's Reserved Instance listings in the Reserved Instance -// Marketplace. -// -// The Reserved Instance Marketplace matches sellers who want to resell Reserved -// Instance capacity that they no longer need with buyers who want to purchase -// additional capacity. Reserved Instances bought and sold through the Reserved -// Instance Marketplace work like any other Reserved Instances. -// -// As a seller, you choose to list some or all of your Reserved Instances, and -// you specify the upfront price to receive for them. Your Reserved Instances -// are then listed in the Reserved Instance Marketplace and are available for -// purchase. -// -// As a buyer, you specify the configuration of the Reserved Instance to purchase, -// and the Marketplace matches what you're searching for with what's available. -// The Marketplace first sells the lowest priced Reserved Instances to you, -// and continues to sell available Reserved Instance listings to you until your -// demand is met. You are charged based on the total price of all of the listings -// that you purchase. -// -// For more information, see Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeReservedInstancesListings for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListings -func (c *EC2) DescribeReservedInstancesListings(input *DescribeReservedInstancesListingsInput) (*DescribeReservedInstancesListingsOutput, error) { - req, out := c.DescribeReservedInstancesListingsRequest(input) - return out, req.Send() -} - -// DescribeReservedInstancesListingsWithContext is the same as DescribeReservedInstancesListings with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReservedInstancesListings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeReservedInstancesListingsWithContext(ctx aws.Context, input *DescribeReservedInstancesListingsInput, opts ...request.Option) (*DescribeReservedInstancesListingsOutput, error) { - req, out := c.DescribeReservedInstancesListingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeReservedInstancesModifications = "DescribeReservedInstancesModifications" - -// DescribeReservedInstancesModificationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservedInstancesModifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReservedInstancesModifications for more information on using the DescribeReservedInstancesModifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReservedInstancesModificationsRequest method. -// req, resp := client.DescribeReservedInstancesModificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModifications -func (c *EC2) DescribeReservedInstancesModificationsRequest(input *DescribeReservedInstancesModificationsInput) (req *request.Request, output *DescribeReservedInstancesModificationsOutput) { - op := &request.Operation{ - Name: opDescribeReservedInstancesModifications, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReservedInstancesModificationsInput{} - } - - output = &DescribeReservedInstancesModificationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReservedInstancesModifications API operation for Amazon Elastic Compute Cloud. -// -// Describes the modifications made to your Reserved Instances. If no parameter -// is specified, information about all your Reserved Instances modification -// requests is returned. If a modification ID is specified, only information -// about the specific modification is returned. -// -// For more information, see Modifying Reserved Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeReservedInstancesModifications for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModifications -func (c *EC2) DescribeReservedInstancesModifications(input *DescribeReservedInstancesModificationsInput) (*DescribeReservedInstancesModificationsOutput, error) { - req, out := c.DescribeReservedInstancesModificationsRequest(input) - return out, req.Send() -} - -// DescribeReservedInstancesModificationsWithContext is the same as DescribeReservedInstancesModifications with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReservedInstancesModifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeReservedInstancesModificationsWithContext(ctx aws.Context, input *DescribeReservedInstancesModificationsInput, opts ...request.Option) (*DescribeReservedInstancesModificationsOutput, error) { - req, out := c.DescribeReservedInstancesModificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReservedInstancesModificationsPages iterates over the pages of a DescribeReservedInstancesModifications operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReservedInstancesModifications 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 DescribeReservedInstancesModifications operation. -// pageNum := 0 -// err := client.DescribeReservedInstancesModificationsPages(params, -// func(page *DescribeReservedInstancesModificationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EC2) DescribeReservedInstancesModificationsPages(input *DescribeReservedInstancesModificationsInput, fn func(*DescribeReservedInstancesModificationsOutput, bool) bool) error { - return c.DescribeReservedInstancesModificationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReservedInstancesModificationsPagesWithContext same as DescribeReservedInstancesModificationsPages 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 *EC2) DescribeReservedInstancesModificationsPagesWithContext(ctx aws.Context, input *DescribeReservedInstancesModificationsInput, fn func(*DescribeReservedInstancesModificationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReservedInstancesModificationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReservedInstancesModificationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedInstancesModificationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeReservedInstancesOfferings = "DescribeReservedInstancesOfferings" - -// DescribeReservedInstancesOfferingsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservedInstancesOfferings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReservedInstancesOfferings for more information on using the DescribeReservedInstancesOfferings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReservedInstancesOfferingsRequest method. -// req, resp := client.DescribeReservedInstancesOfferingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferings -func (c *EC2) DescribeReservedInstancesOfferingsRequest(input *DescribeReservedInstancesOfferingsInput) (req *request.Request, output *DescribeReservedInstancesOfferingsOutput) { - op := &request.Operation{ - Name: opDescribeReservedInstancesOfferings, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReservedInstancesOfferingsInput{} - } - - output = &DescribeReservedInstancesOfferingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReservedInstancesOfferings API operation for Amazon Elastic Compute Cloud. -// -// Describes Reserved Instance offerings that are available for purchase. With -// Reserved Instances, you purchase the right to launch instances for a period -// of time. During that time period, you do not receive insufficient capacity -// errors, and you pay a lower usage rate than the rate charged for On-Demand -// instances for the actual time used. -// -// If you have listed your own Reserved Instances for sale in the Reserved Instance -// Marketplace, they will be excluded from these results. This is to ensure -// that you do not purchase your own Reserved Instances. -// -// For more information, see Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeReservedInstancesOfferings for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferings -func (c *EC2) DescribeReservedInstancesOfferings(input *DescribeReservedInstancesOfferingsInput) (*DescribeReservedInstancesOfferingsOutput, error) { - req, out := c.DescribeReservedInstancesOfferingsRequest(input) - return out, req.Send() -} - -// DescribeReservedInstancesOfferingsWithContext is the same as DescribeReservedInstancesOfferings with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReservedInstancesOfferings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeReservedInstancesOfferingsWithContext(ctx aws.Context, input *DescribeReservedInstancesOfferingsInput, opts ...request.Option) (*DescribeReservedInstancesOfferingsOutput, error) { - req, out := c.DescribeReservedInstancesOfferingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReservedInstancesOfferingsPages iterates over the pages of a DescribeReservedInstancesOfferings operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReservedInstancesOfferings 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 DescribeReservedInstancesOfferings operation. -// pageNum := 0 -// err := client.DescribeReservedInstancesOfferingsPages(params, -// func(page *DescribeReservedInstancesOfferingsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EC2) DescribeReservedInstancesOfferingsPages(input *DescribeReservedInstancesOfferingsInput, fn func(*DescribeReservedInstancesOfferingsOutput, bool) bool) error { - return c.DescribeReservedInstancesOfferingsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReservedInstancesOfferingsPagesWithContext same as DescribeReservedInstancesOfferingsPages 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 *EC2) DescribeReservedInstancesOfferingsPagesWithContext(ctx aws.Context, input *DescribeReservedInstancesOfferingsInput, fn func(*DescribeReservedInstancesOfferingsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReservedInstancesOfferingsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReservedInstancesOfferingsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedInstancesOfferingsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeRouteTables = "DescribeRouteTables" - -// DescribeRouteTablesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRouteTables operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRouteTables for more information on using the DescribeRouteTables -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRouteTablesRequest method. -// req, resp := client.DescribeRouteTablesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables -func (c *EC2) DescribeRouteTablesRequest(input *DescribeRouteTablesInput) (req *request.Request, output *DescribeRouteTablesOutput) { - op := &request.Operation{ - Name: opDescribeRouteTables, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeRouteTablesInput{} - } - - output = &DescribeRouteTablesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRouteTables API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your route tables. -// -// Each subnet in your VPC must be associated with a route table. If a subnet -// is not explicitly associated with any route table, it is implicitly associated -// with the main route table. This command does not return the subnet ID for -// implicit associations. -// -// For more information, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeRouteTables for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables -func (c *EC2) DescribeRouteTables(input *DescribeRouteTablesInput) (*DescribeRouteTablesOutput, error) { - req, out := c.DescribeRouteTablesRequest(input) - return out, req.Send() -} - -// DescribeRouteTablesWithContext is the same as DescribeRouteTables with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRouteTables for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeRouteTablesWithContext(ctx aws.Context, input *DescribeRouteTablesInput, opts ...request.Option) (*DescribeRouteTablesOutput, error) { - req, out := c.DescribeRouteTablesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeRouteTablesPages iterates over the pages of a DescribeRouteTables operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeRouteTables 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 DescribeRouteTables operation. -// pageNum := 0 -// err := client.DescribeRouteTablesPages(params, -// func(page *DescribeRouteTablesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EC2) DescribeRouteTablesPages(input *DescribeRouteTablesInput, fn func(*DescribeRouteTablesOutput, bool) bool) error { - return c.DescribeRouteTablesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeRouteTablesPagesWithContext same as DescribeRouteTablesPages 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 *EC2) DescribeRouteTablesPagesWithContext(ctx aws.Context, input *DescribeRouteTablesInput, fn func(*DescribeRouteTablesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeRouteTablesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeRouteTablesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeRouteTablesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeScheduledInstanceAvailability = "DescribeScheduledInstanceAvailability" - -// DescribeScheduledInstanceAvailabilityRequest generates a "aws/request.Request" representing the -// client's request for the DescribeScheduledInstanceAvailability operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeScheduledInstanceAvailability for more information on using the DescribeScheduledInstanceAvailability -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeScheduledInstanceAvailabilityRequest method. -// req, resp := client.DescribeScheduledInstanceAvailabilityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstanceAvailability -func (c *EC2) DescribeScheduledInstanceAvailabilityRequest(input *DescribeScheduledInstanceAvailabilityInput) (req *request.Request, output *DescribeScheduledInstanceAvailabilityOutput) { - op := &request.Operation{ - Name: opDescribeScheduledInstanceAvailability, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeScheduledInstanceAvailabilityInput{} - } - - output = &DescribeScheduledInstanceAvailabilityOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeScheduledInstanceAvailability API operation for Amazon Elastic Compute Cloud. -// -// Finds available schedules that meet the specified criteria. -// -// You can search for an available schedule no more than 3 months in advance. -// You must meet the minimum required duration of 1,200 hours per year. For -// example, the minimum daily schedule is 4 hours, the minimum weekly schedule -// is 24 hours, and the minimum monthly schedule is 100 hours. -// -// After you find a schedule that meets your needs, call PurchaseScheduledInstances -// to purchase Scheduled Instances with that schedule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeScheduledInstanceAvailability for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstanceAvailability -func (c *EC2) DescribeScheduledInstanceAvailability(input *DescribeScheduledInstanceAvailabilityInput) (*DescribeScheduledInstanceAvailabilityOutput, error) { - req, out := c.DescribeScheduledInstanceAvailabilityRequest(input) - return out, req.Send() -} - -// DescribeScheduledInstanceAvailabilityWithContext is the same as DescribeScheduledInstanceAvailability with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeScheduledInstanceAvailability for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeScheduledInstanceAvailabilityWithContext(ctx aws.Context, input *DescribeScheduledInstanceAvailabilityInput, opts ...request.Option) (*DescribeScheduledInstanceAvailabilityOutput, error) { - req, out := c.DescribeScheduledInstanceAvailabilityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeScheduledInstances = "DescribeScheduledInstances" - -// DescribeScheduledInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeScheduledInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeScheduledInstances for more information on using the DescribeScheduledInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeScheduledInstancesRequest method. -// req, resp := client.DescribeScheduledInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstances -func (c *EC2) DescribeScheduledInstancesRequest(input *DescribeScheduledInstancesInput) (req *request.Request, output *DescribeScheduledInstancesOutput) { - op := &request.Operation{ - Name: opDescribeScheduledInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeScheduledInstancesInput{} - } - - output = &DescribeScheduledInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeScheduledInstances API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your Scheduled Instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeScheduledInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstances -func (c *EC2) DescribeScheduledInstances(input *DescribeScheduledInstancesInput) (*DescribeScheduledInstancesOutput, error) { - req, out := c.DescribeScheduledInstancesRequest(input) - return out, req.Send() -} - -// DescribeScheduledInstancesWithContext is the same as DescribeScheduledInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeScheduledInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeScheduledInstancesWithContext(ctx aws.Context, input *DescribeScheduledInstancesInput, opts ...request.Option) (*DescribeScheduledInstancesOutput, error) { - req, out := c.DescribeScheduledInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSecurityGroupReferences = "DescribeSecurityGroupReferences" - -// DescribeSecurityGroupReferencesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSecurityGroupReferences operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSecurityGroupReferences for more information on using the DescribeSecurityGroupReferences -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSecurityGroupReferencesRequest method. -// req, resp := client.DescribeSecurityGroupReferencesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupReferences -func (c *EC2) DescribeSecurityGroupReferencesRequest(input *DescribeSecurityGroupReferencesInput) (req *request.Request, output *DescribeSecurityGroupReferencesOutput) { - op := &request.Operation{ - Name: opDescribeSecurityGroupReferences, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSecurityGroupReferencesInput{} - } - - output = &DescribeSecurityGroupReferencesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSecurityGroupReferences API operation for Amazon Elastic Compute Cloud. -// -// [EC2-VPC only] Describes the VPCs on the other side of a VPC peering connection -// that are referencing the security groups you've specified in this request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeSecurityGroupReferences for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupReferences -func (c *EC2) DescribeSecurityGroupReferences(input *DescribeSecurityGroupReferencesInput) (*DescribeSecurityGroupReferencesOutput, error) { - req, out := c.DescribeSecurityGroupReferencesRequest(input) - return out, req.Send() -} - -// DescribeSecurityGroupReferencesWithContext is the same as DescribeSecurityGroupReferences with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSecurityGroupReferences for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeSecurityGroupReferencesWithContext(ctx aws.Context, input *DescribeSecurityGroupReferencesInput, opts ...request.Option) (*DescribeSecurityGroupReferencesOutput, error) { - req, out := c.DescribeSecurityGroupReferencesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSecurityGroups = "DescribeSecurityGroups" - -// DescribeSecurityGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSecurityGroups for more information on using the DescribeSecurityGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSecurityGroupsRequest method. -// req, resp := client.DescribeSecurityGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups -func (c *EC2) DescribeSecurityGroupsRequest(input *DescribeSecurityGroupsInput) (req *request.Request, output *DescribeSecurityGroupsOutput) { - op := &request.Operation{ - Name: opDescribeSecurityGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeSecurityGroupsInput{} - } - - output = &DescribeSecurityGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSecurityGroups API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your security groups. -// -// A security group is for use with instances either in the EC2-Classic platform -// or in a specific VPC. For more information, see Amazon EC2 Security Groups -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html) -// in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your -// VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeSecurityGroups for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups -func (c *EC2) DescribeSecurityGroups(input *DescribeSecurityGroupsInput) (*DescribeSecurityGroupsOutput, error) { - req, out := c.DescribeSecurityGroupsRequest(input) - return out, req.Send() -} - -// DescribeSecurityGroupsWithContext is the same as DescribeSecurityGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSecurityGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeSecurityGroupsWithContext(ctx aws.Context, input *DescribeSecurityGroupsInput, opts ...request.Option) (*DescribeSecurityGroupsOutput, error) { - req, out := c.DescribeSecurityGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeSecurityGroupsPages iterates over the pages of a DescribeSecurityGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeSecurityGroups 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 DescribeSecurityGroups operation. -// pageNum := 0 -// err := client.DescribeSecurityGroupsPages(params, -// func(page *DescribeSecurityGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EC2) DescribeSecurityGroupsPages(input *DescribeSecurityGroupsInput, fn func(*DescribeSecurityGroupsOutput, bool) bool) error { - return c.DescribeSecurityGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeSecurityGroupsPagesWithContext same as DescribeSecurityGroupsPages 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 *EC2) DescribeSecurityGroupsPagesWithContext(ctx aws.Context, input *DescribeSecurityGroupsInput, fn func(*DescribeSecurityGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeSecurityGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeSecurityGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSecurityGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeSnapshotAttribute = "DescribeSnapshotAttribute" - -// DescribeSnapshotAttributeRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSnapshotAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSnapshotAttribute for more information on using the DescribeSnapshotAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSnapshotAttributeRequest method. -// req, resp := client.DescribeSnapshotAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttribute -func (c *EC2) DescribeSnapshotAttributeRequest(input *DescribeSnapshotAttributeInput) (req *request.Request, output *DescribeSnapshotAttributeOutput) { - op := &request.Operation{ - Name: opDescribeSnapshotAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSnapshotAttributeInput{} - } - - output = &DescribeSnapshotAttributeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSnapshotAttribute API operation for Amazon Elastic Compute Cloud. -// -// Describes the specified attribute of the specified snapshot. You can specify -// only one attribute at a time. -// -// For more information about EBS snapshots, see Amazon EBS Snapshots (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeSnapshotAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttribute -func (c *EC2) DescribeSnapshotAttribute(input *DescribeSnapshotAttributeInput) (*DescribeSnapshotAttributeOutput, error) { - req, out := c.DescribeSnapshotAttributeRequest(input) - return out, req.Send() -} - -// DescribeSnapshotAttributeWithContext is the same as DescribeSnapshotAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSnapshotAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeSnapshotAttributeWithContext(ctx aws.Context, input *DescribeSnapshotAttributeInput, opts ...request.Option) (*DescribeSnapshotAttributeOutput, error) { - req, out := c.DescribeSnapshotAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSnapshots = "DescribeSnapshots" - -// DescribeSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSnapshots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSnapshots for more information on using the DescribeSnapshots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSnapshotsRequest method. -// req, resp := client.DescribeSnapshotsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots -func (c *EC2) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *request.Request, output *DescribeSnapshotsOutput) { - op := &request.Operation{ - Name: opDescribeSnapshots, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeSnapshotsInput{} - } - - output = &DescribeSnapshotsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSnapshots API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of the EBS snapshots available to you. Available snapshots -// include public snapshots available for any AWS account to launch, private -// snapshots that you own, and private snapshots owned by another AWS account -// but for which you've been given explicit create volume permissions. -// -// The create volume permissions fall into the following categories: -// -// * public: The owner of the snapshot granted create volume permissions -// for the snapshot to the all group. All AWS accounts have create volume -// permissions for these snapshots. -// -// * explicit: The owner of the snapshot granted create volume permissions -// to a specific AWS account. -// -// * implicit: An AWS account has implicit create volume permissions for -// all snapshots it owns. -// -// The list of snapshots returned can be modified by specifying snapshot IDs, -// snapshot owners, or AWS accounts with create volume permissions. If no options -// are specified, Amazon EC2 returns all snapshots for which you have create -// volume permissions. -// -// If you specify one or more snapshot IDs, only snapshots that have the specified -// IDs are returned. If you specify an invalid snapshot ID, an error is returned. -// If you specify a snapshot ID for which you do not have access, it is not -// included in the returned results. -// -// If you specify one or more snapshot owners using the OwnerIds option, only -// snapshots from the specified owners and for which you have access are returned. -// The results can include the AWS account IDs of the specified owners, amazon -// for snapshots owned by Amazon, or self for snapshots that you own. -// -// If you specify a list of restorable users, only snapshots with create snapshot -// permissions for those users are returned. You can specify AWS account IDs -// (if you own the snapshots), self for snapshots for which you own or have -// explicit permissions, or all for public snapshots. -// -// If you are describing a long list of snapshots, you can paginate the output -// to make the list more manageable. The MaxResults parameter sets the maximum -// number of results returned in a single page. If the list of results exceeds -// your MaxResults value, then that number of results is returned along with -// a NextToken value that can be passed to a subsequent DescribeSnapshots request -// to retrieve the remaining results. -// -// For more information about EBS snapshots, see Amazon EBS Snapshots (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeSnapshots for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots -func (c *EC2) DescribeSnapshots(input *DescribeSnapshotsInput) (*DescribeSnapshotsOutput, error) { - req, out := c.DescribeSnapshotsRequest(input) - return out, req.Send() -} - -// DescribeSnapshotsWithContext is the same as DescribeSnapshots with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSnapshots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeSnapshotsWithContext(ctx aws.Context, input *DescribeSnapshotsInput, opts ...request.Option) (*DescribeSnapshotsOutput, error) { - req, out := c.DescribeSnapshotsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeSnapshotsPages iterates over the pages of a DescribeSnapshots operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeSnapshots 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 DescribeSnapshots operation. -// pageNum := 0 -// err := client.DescribeSnapshotsPages(params, -// func(page *DescribeSnapshotsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EC2) DescribeSnapshotsPages(input *DescribeSnapshotsInput, fn func(*DescribeSnapshotsOutput, bool) bool) error { - return c.DescribeSnapshotsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeSnapshotsPagesWithContext same as DescribeSnapshotsPages 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 *EC2) DescribeSnapshotsPagesWithContext(ctx aws.Context, input *DescribeSnapshotsInput, fn func(*DescribeSnapshotsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeSnapshotsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeSnapshotsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSnapshotsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeSpotDatafeedSubscription = "DescribeSpotDatafeedSubscription" - -// DescribeSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSpotDatafeedSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSpotDatafeedSubscription for more information on using the DescribeSpotDatafeedSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSpotDatafeedSubscriptionRequest method. -// req, resp := client.DescribeSpotDatafeedSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscription -func (c *EC2) DescribeSpotDatafeedSubscriptionRequest(input *DescribeSpotDatafeedSubscriptionInput) (req *request.Request, output *DescribeSpotDatafeedSubscriptionOutput) { - op := &request.Operation{ - Name: opDescribeSpotDatafeedSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSpotDatafeedSubscriptionInput{} - } - - output = &DescribeSpotDatafeedSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSpotDatafeedSubscription API operation for Amazon Elastic Compute Cloud. -// -// Describes the data feed for Spot Instances. For more information, see Spot -// Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html) -// in the Amazon EC2 User Guide for Linux Instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeSpotDatafeedSubscription for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscription -func (c *EC2) DescribeSpotDatafeedSubscription(input *DescribeSpotDatafeedSubscriptionInput) (*DescribeSpotDatafeedSubscriptionOutput, error) { - req, out := c.DescribeSpotDatafeedSubscriptionRequest(input) - return out, req.Send() -} - -// DescribeSpotDatafeedSubscriptionWithContext is the same as DescribeSpotDatafeedSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSpotDatafeedSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeSpotDatafeedSubscriptionWithContext(ctx aws.Context, input *DescribeSpotDatafeedSubscriptionInput, opts ...request.Option) (*DescribeSpotDatafeedSubscriptionOutput, error) { - req, out := c.DescribeSpotDatafeedSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSpotFleetInstances = "DescribeSpotFleetInstances" - -// DescribeSpotFleetInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSpotFleetInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSpotFleetInstances for more information on using the DescribeSpotFleetInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSpotFleetInstancesRequest method. -// req, resp := client.DescribeSpotFleetInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetInstances -func (c *EC2) DescribeSpotFleetInstancesRequest(input *DescribeSpotFleetInstancesInput) (req *request.Request, output *DescribeSpotFleetInstancesOutput) { - op := &request.Operation{ - Name: opDescribeSpotFleetInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSpotFleetInstancesInput{} - } - - output = &DescribeSpotFleetInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSpotFleetInstances API operation for Amazon Elastic Compute Cloud. -// -// Describes the running instances for the specified Spot Fleet. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeSpotFleetInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetInstances -func (c *EC2) DescribeSpotFleetInstances(input *DescribeSpotFleetInstancesInput) (*DescribeSpotFleetInstancesOutput, error) { - req, out := c.DescribeSpotFleetInstancesRequest(input) - return out, req.Send() -} - -// DescribeSpotFleetInstancesWithContext is the same as DescribeSpotFleetInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSpotFleetInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeSpotFleetInstancesWithContext(ctx aws.Context, input *DescribeSpotFleetInstancesInput, opts ...request.Option) (*DescribeSpotFleetInstancesOutput, error) { - req, out := c.DescribeSpotFleetInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSpotFleetRequestHistory = "DescribeSpotFleetRequestHistory" - -// DescribeSpotFleetRequestHistoryRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSpotFleetRequestHistory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSpotFleetRequestHistory for more information on using the DescribeSpotFleetRequestHistory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSpotFleetRequestHistoryRequest method. -// req, resp := client.DescribeSpotFleetRequestHistoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestHistory -func (c *EC2) DescribeSpotFleetRequestHistoryRequest(input *DescribeSpotFleetRequestHistoryInput) (req *request.Request, output *DescribeSpotFleetRequestHistoryOutput) { - op := &request.Operation{ - Name: opDescribeSpotFleetRequestHistory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSpotFleetRequestHistoryInput{} - } - - output = &DescribeSpotFleetRequestHistoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSpotFleetRequestHistory API operation for Amazon Elastic Compute Cloud. -// -// Describes the events for the specified Spot Fleet request during the specified -// time. -// -// Spot Fleet events are delayed by up to 30 seconds before they can be described. -// This ensures that you can query by the last evaluated time and not miss a -// recorded event. Spot Fleet events are available for 48 hours. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeSpotFleetRequestHistory for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestHistory -func (c *EC2) DescribeSpotFleetRequestHistory(input *DescribeSpotFleetRequestHistoryInput) (*DescribeSpotFleetRequestHistoryOutput, error) { - req, out := c.DescribeSpotFleetRequestHistoryRequest(input) - return out, req.Send() -} - -// DescribeSpotFleetRequestHistoryWithContext is the same as DescribeSpotFleetRequestHistory with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSpotFleetRequestHistory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeSpotFleetRequestHistoryWithContext(ctx aws.Context, input *DescribeSpotFleetRequestHistoryInput, opts ...request.Option) (*DescribeSpotFleetRequestHistoryOutput, error) { - req, out := c.DescribeSpotFleetRequestHistoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSpotFleetRequests = "DescribeSpotFleetRequests" - -// DescribeSpotFleetRequestsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSpotFleetRequests operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSpotFleetRequests for more information on using the DescribeSpotFleetRequests -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSpotFleetRequestsRequest method. -// req, resp := client.DescribeSpotFleetRequestsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequests -func (c *EC2) DescribeSpotFleetRequestsRequest(input *DescribeSpotFleetRequestsInput) (req *request.Request, output *DescribeSpotFleetRequestsOutput) { - op := &request.Operation{ - Name: opDescribeSpotFleetRequests, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeSpotFleetRequestsInput{} - } - - output = &DescribeSpotFleetRequestsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSpotFleetRequests API operation for Amazon Elastic Compute Cloud. -// -// Describes your Spot Fleet requests. -// -// Spot Fleet requests are deleted 48 hours after they are canceled and their -// instances are terminated. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeSpotFleetRequests for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequests -func (c *EC2) DescribeSpotFleetRequests(input *DescribeSpotFleetRequestsInput) (*DescribeSpotFleetRequestsOutput, error) { - req, out := c.DescribeSpotFleetRequestsRequest(input) - return out, req.Send() -} - -// DescribeSpotFleetRequestsWithContext is the same as DescribeSpotFleetRequests with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSpotFleetRequests for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeSpotFleetRequestsWithContext(ctx aws.Context, input *DescribeSpotFleetRequestsInput, opts ...request.Option) (*DescribeSpotFleetRequestsOutput, error) { - req, out := c.DescribeSpotFleetRequestsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeSpotFleetRequestsPages iterates over the pages of a DescribeSpotFleetRequests operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeSpotFleetRequests 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 DescribeSpotFleetRequests operation. -// pageNum := 0 -// err := client.DescribeSpotFleetRequestsPages(params, -// func(page *DescribeSpotFleetRequestsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EC2) DescribeSpotFleetRequestsPages(input *DescribeSpotFleetRequestsInput, fn func(*DescribeSpotFleetRequestsOutput, bool) bool) error { - return c.DescribeSpotFleetRequestsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeSpotFleetRequestsPagesWithContext same as DescribeSpotFleetRequestsPages 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 *EC2) DescribeSpotFleetRequestsPagesWithContext(ctx aws.Context, input *DescribeSpotFleetRequestsInput, fn func(*DescribeSpotFleetRequestsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeSpotFleetRequestsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeSpotFleetRequestsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSpotFleetRequestsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeSpotInstanceRequests = "DescribeSpotInstanceRequests" - -// DescribeSpotInstanceRequestsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSpotInstanceRequests operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSpotInstanceRequests for more information on using the DescribeSpotInstanceRequests -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSpotInstanceRequestsRequest method. -// req, resp := client.DescribeSpotInstanceRequestsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequests -func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceRequestsInput) (req *request.Request, output *DescribeSpotInstanceRequestsOutput) { - op := &request.Operation{ - Name: opDescribeSpotInstanceRequests, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSpotInstanceRequestsInput{} - } - - output = &DescribeSpotInstanceRequestsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSpotInstanceRequests API operation for Amazon Elastic Compute Cloud. -// -// Describes the specified Spot Instance requests. -// -// You can use DescribeSpotInstanceRequests to find a running Spot Instance -// by examining the response. If the status of the Spot Instance is fulfilled, -// the instance ID appears in the response and contains the identifier of the -// instance. Alternatively, you can use DescribeInstances with a filter to look -// for instances where the instance lifecycle is spot. -// -// We recommend that you set MaxResults to a value between 5 and 1000 to limit -// the number of results returned. This paginates the output, which makes the -// list more manageable and returns the results faster. If the list of results -// exceeds your MaxResults value, then that number of results is returned along -// with a NextToken value that can be passed to a subsequent DescribeSpotInstanceRequests -// request to retrieve the remaining results. -// -// Spot Instance requests are deleted four hours after they are canceled and -// their instances are terminated. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeSpotInstanceRequests for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequests -func (c *EC2) DescribeSpotInstanceRequests(input *DescribeSpotInstanceRequestsInput) (*DescribeSpotInstanceRequestsOutput, error) { - req, out := c.DescribeSpotInstanceRequestsRequest(input) - return out, req.Send() -} - -// DescribeSpotInstanceRequestsWithContext is the same as DescribeSpotInstanceRequests with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSpotInstanceRequests for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeSpotInstanceRequestsWithContext(ctx aws.Context, input *DescribeSpotInstanceRequestsInput, opts ...request.Option) (*DescribeSpotInstanceRequestsOutput, error) { - req, out := c.DescribeSpotInstanceRequestsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSpotPriceHistory = "DescribeSpotPriceHistory" - -// DescribeSpotPriceHistoryRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSpotPriceHistory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSpotPriceHistory for more information on using the DescribeSpotPriceHistory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSpotPriceHistoryRequest method. -// req, resp := client.DescribeSpotPriceHistoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistory -func (c *EC2) DescribeSpotPriceHistoryRequest(input *DescribeSpotPriceHistoryInput) (req *request.Request, output *DescribeSpotPriceHistoryOutput) { - op := &request.Operation{ - Name: opDescribeSpotPriceHistory, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeSpotPriceHistoryInput{} - } - - output = &DescribeSpotPriceHistoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSpotPriceHistory API operation for Amazon Elastic Compute Cloud. -// -// Describes the Spot price history. For more information, see Spot Instance -// Pricing History (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html) -// in the Amazon EC2 User Guide for Linux Instances. -// -// When you specify a start and end time, this operation returns the prices -// of the instance types within the time range that you specified and the time -// when the price changed. The price is valid within the time period that you -// specified; the response merely indicates the last time that the price changed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeSpotPriceHistory for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistory -func (c *EC2) DescribeSpotPriceHistory(input *DescribeSpotPriceHistoryInput) (*DescribeSpotPriceHistoryOutput, error) { - req, out := c.DescribeSpotPriceHistoryRequest(input) - return out, req.Send() -} - -// DescribeSpotPriceHistoryWithContext is the same as DescribeSpotPriceHistory with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSpotPriceHistory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeSpotPriceHistoryWithContext(ctx aws.Context, input *DescribeSpotPriceHistoryInput, opts ...request.Option) (*DescribeSpotPriceHistoryOutput, error) { - req, out := c.DescribeSpotPriceHistoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeSpotPriceHistoryPages iterates over the pages of a DescribeSpotPriceHistory operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeSpotPriceHistory 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 DescribeSpotPriceHistory operation. -// pageNum := 0 -// err := client.DescribeSpotPriceHistoryPages(params, -// func(page *DescribeSpotPriceHistoryOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EC2) DescribeSpotPriceHistoryPages(input *DescribeSpotPriceHistoryInput, fn func(*DescribeSpotPriceHistoryOutput, bool) bool) error { - return c.DescribeSpotPriceHistoryPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeSpotPriceHistoryPagesWithContext same as DescribeSpotPriceHistoryPages 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 *EC2) DescribeSpotPriceHistoryPagesWithContext(ctx aws.Context, input *DescribeSpotPriceHistoryInput, fn func(*DescribeSpotPriceHistoryOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeSpotPriceHistoryInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeSpotPriceHistoryRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSpotPriceHistoryOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeStaleSecurityGroups = "DescribeStaleSecurityGroups" - -// DescribeStaleSecurityGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStaleSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStaleSecurityGroups for more information on using the DescribeStaleSecurityGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStaleSecurityGroupsRequest method. -// req, resp := client.DescribeStaleSecurityGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStaleSecurityGroups -func (c *EC2) DescribeStaleSecurityGroupsRequest(input *DescribeStaleSecurityGroupsInput) (req *request.Request, output *DescribeStaleSecurityGroupsOutput) { - op := &request.Operation{ - Name: opDescribeStaleSecurityGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStaleSecurityGroupsInput{} - } - - output = &DescribeStaleSecurityGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStaleSecurityGroups API operation for Amazon Elastic Compute Cloud. -// -// [EC2-VPC only] Describes the stale security group rules for security groups -// in a specified VPC. Rules are stale when they reference a deleted security -// group in a peer VPC, or a security group in a peer VPC for which the VPC -// peering connection has been deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeStaleSecurityGroups for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStaleSecurityGroups -func (c *EC2) DescribeStaleSecurityGroups(input *DescribeStaleSecurityGroupsInput) (*DescribeStaleSecurityGroupsOutput, error) { - req, out := c.DescribeStaleSecurityGroupsRequest(input) - return out, req.Send() -} - -// DescribeStaleSecurityGroupsWithContext is the same as DescribeStaleSecurityGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStaleSecurityGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeStaleSecurityGroupsWithContext(ctx aws.Context, input *DescribeStaleSecurityGroupsInput, opts ...request.Option) (*DescribeStaleSecurityGroupsOutput, error) { - req, out := c.DescribeStaleSecurityGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSubnets = "DescribeSubnets" - -// DescribeSubnetsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSubnets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSubnets for more information on using the DescribeSubnets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSubnetsRequest method. -// req, resp := client.DescribeSubnetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets -func (c *EC2) DescribeSubnetsRequest(input *DescribeSubnetsInput) (req *request.Request, output *DescribeSubnetsOutput) { - op := &request.Operation{ - Name: opDescribeSubnets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSubnetsInput{} - } - - output = &DescribeSubnetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSubnets API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your subnets. -// -// For more information, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeSubnets for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets -func (c *EC2) DescribeSubnets(input *DescribeSubnetsInput) (*DescribeSubnetsOutput, error) { - req, out := c.DescribeSubnetsRequest(input) - return out, req.Send() -} - -// DescribeSubnetsWithContext is the same as DescribeSubnets with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSubnets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeSubnetsWithContext(ctx aws.Context, input *DescribeSubnetsInput, opts ...request.Option) (*DescribeSubnetsOutput, error) { - req, out := c.DescribeSubnetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTags = "DescribeTags" - -// DescribeTagsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTags for more information on using the DescribeTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTagsRequest method. -// req, resp := client.DescribeTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTags -func (c *EC2) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { - op := &request.Operation{ - Name: opDescribeTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeTagsInput{} - } - - output = &DescribeTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTags API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of the tags for your EC2 resources. -// -// For more information about tags, see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeTags for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTags -func (c *EC2) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - return out, req.Send() -} - -// DescribeTagsWithContext is the same as DescribeTags with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeTagsPages iterates over the pages of a DescribeTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeTags 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 DescribeTags operation. -// pageNum := 0 -// err := client.DescribeTagsPages(params, -// func(page *DescribeTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EC2) DescribeTagsPages(input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool) error { - return c.DescribeTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeTagsPagesWithContext same as DescribeTagsPages 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 *EC2) DescribeTagsPagesWithContext(ctx aws.Context, input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTagsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeTransitGatewayAttachments = "DescribeTransitGatewayAttachments" - -// DescribeTransitGatewayAttachmentsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTransitGatewayAttachments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTransitGatewayAttachments for more information on using the DescribeTransitGatewayAttachments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTransitGatewayAttachmentsRequest method. -// req, resp := client.DescribeTransitGatewayAttachmentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayAttachments -func (c *EC2) DescribeTransitGatewayAttachmentsRequest(input *DescribeTransitGatewayAttachmentsInput) (req *request.Request, output *DescribeTransitGatewayAttachmentsOutput) { - op := &request.Operation{ - Name: opDescribeTransitGatewayAttachments, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTransitGatewayAttachmentsInput{} - } - - output = &DescribeTransitGatewayAttachmentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTransitGatewayAttachments API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more attachments between resources and transit gateways. -// By default, all attachments are described. Alternatively, you can filter -// the results by attachment ID, attachment state, resource ID, or resource -// owner. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeTransitGatewayAttachments for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayAttachments -func (c *EC2) DescribeTransitGatewayAttachments(input *DescribeTransitGatewayAttachmentsInput) (*DescribeTransitGatewayAttachmentsOutput, error) { - req, out := c.DescribeTransitGatewayAttachmentsRequest(input) - return out, req.Send() -} - -// DescribeTransitGatewayAttachmentsWithContext is the same as DescribeTransitGatewayAttachments with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTransitGatewayAttachments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeTransitGatewayAttachmentsWithContext(ctx aws.Context, input *DescribeTransitGatewayAttachmentsInput, opts ...request.Option) (*DescribeTransitGatewayAttachmentsOutput, error) { - req, out := c.DescribeTransitGatewayAttachmentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTransitGatewayRouteTables = "DescribeTransitGatewayRouteTables" - -// DescribeTransitGatewayRouteTablesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTransitGatewayRouteTables operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTransitGatewayRouteTables for more information on using the DescribeTransitGatewayRouteTables -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTransitGatewayRouteTablesRequest method. -// req, resp := client.DescribeTransitGatewayRouteTablesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayRouteTables -func (c *EC2) DescribeTransitGatewayRouteTablesRequest(input *DescribeTransitGatewayRouteTablesInput) (req *request.Request, output *DescribeTransitGatewayRouteTablesOutput) { - op := &request.Operation{ - Name: opDescribeTransitGatewayRouteTables, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTransitGatewayRouteTablesInput{} - } - - output = &DescribeTransitGatewayRouteTablesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTransitGatewayRouteTables API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more transit gateway route tables. By default, all transit -// gateway route tables are described. Alternatively, you can filter the results. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeTransitGatewayRouteTables for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayRouteTables -func (c *EC2) DescribeTransitGatewayRouteTables(input *DescribeTransitGatewayRouteTablesInput) (*DescribeTransitGatewayRouteTablesOutput, error) { - req, out := c.DescribeTransitGatewayRouteTablesRequest(input) - return out, req.Send() -} - -// DescribeTransitGatewayRouteTablesWithContext is the same as DescribeTransitGatewayRouteTables with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTransitGatewayRouteTables for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeTransitGatewayRouteTablesWithContext(ctx aws.Context, input *DescribeTransitGatewayRouteTablesInput, opts ...request.Option) (*DescribeTransitGatewayRouteTablesOutput, error) { - req, out := c.DescribeTransitGatewayRouteTablesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTransitGatewayVpcAttachments = "DescribeTransitGatewayVpcAttachments" - -// DescribeTransitGatewayVpcAttachmentsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTransitGatewayVpcAttachments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTransitGatewayVpcAttachments for more information on using the DescribeTransitGatewayVpcAttachments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTransitGatewayVpcAttachmentsRequest method. -// req, resp := client.DescribeTransitGatewayVpcAttachmentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayVpcAttachments -func (c *EC2) DescribeTransitGatewayVpcAttachmentsRequest(input *DescribeTransitGatewayVpcAttachmentsInput) (req *request.Request, output *DescribeTransitGatewayVpcAttachmentsOutput) { - op := &request.Operation{ - Name: opDescribeTransitGatewayVpcAttachments, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTransitGatewayVpcAttachmentsInput{} - } - - output = &DescribeTransitGatewayVpcAttachmentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTransitGatewayVpcAttachments API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more VPC attachments. By default, all VPC attachments are -// described. Alternatively, you can filter the results. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeTransitGatewayVpcAttachments for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayVpcAttachments -func (c *EC2) DescribeTransitGatewayVpcAttachments(input *DescribeTransitGatewayVpcAttachmentsInput) (*DescribeTransitGatewayVpcAttachmentsOutput, error) { - req, out := c.DescribeTransitGatewayVpcAttachmentsRequest(input) - return out, req.Send() -} - -// DescribeTransitGatewayVpcAttachmentsWithContext is the same as DescribeTransitGatewayVpcAttachments with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTransitGatewayVpcAttachments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeTransitGatewayVpcAttachmentsWithContext(ctx aws.Context, input *DescribeTransitGatewayVpcAttachmentsInput, opts ...request.Option) (*DescribeTransitGatewayVpcAttachmentsOutput, error) { - req, out := c.DescribeTransitGatewayVpcAttachmentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTransitGateways = "DescribeTransitGateways" - -// DescribeTransitGatewaysRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTransitGateways operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTransitGateways for more information on using the DescribeTransitGateways -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTransitGatewaysRequest method. -// req, resp := client.DescribeTransitGatewaysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGateways -func (c *EC2) DescribeTransitGatewaysRequest(input *DescribeTransitGatewaysInput) (req *request.Request, output *DescribeTransitGatewaysOutput) { - op := &request.Operation{ - Name: opDescribeTransitGateways, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTransitGatewaysInput{} - } - - output = &DescribeTransitGatewaysOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTransitGateways API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more transit gateways. By default, all transit gateways -// are described. Alternatively, you can filter the results. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeTransitGateways for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGateways -func (c *EC2) DescribeTransitGateways(input *DescribeTransitGatewaysInput) (*DescribeTransitGatewaysOutput, error) { - req, out := c.DescribeTransitGatewaysRequest(input) - return out, req.Send() -} - -// DescribeTransitGatewaysWithContext is the same as DescribeTransitGateways with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTransitGateways for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeTransitGatewaysWithContext(ctx aws.Context, input *DescribeTransitGatewaysInput, opts ...request.Option) (*DescribeTransitGatewaysOutput, error) { - req, out := c.DescribeTransitGatewaysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVolumeAttribute = "DescribeVolumeAttribute" - -// DescribeVolumeAttributeRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVolumeAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVolumeAttribute for more information on using the DescribeVolumeAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVolumeAttributeRequest method. -// req, resp := client.DescribeVolumeAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttribute -func (c *EC2) DescribeVolumeAttributeRequest(input *DescribeVolumeAttributeInput) (req *request.Request, output *DescribeVolumeAttributeOutput) { - op := &request.Operation{ - Name: opDescribeVolumeAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVolumeAttributeInput{} - } - - output = &DescribeVolumeAttributeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVolumeAttribute API operation for Amazon Elastic Compute Cloud. -// -// Describes the specified attribute of the specified volume. You can specify -// only one attribute at a time. -// -// For more information about EBS volumes, see Amazon EBS Volumes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVolumeAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttribute -func (c *EC2) DescribeVolumeAttribute(input *DescribeVolumeAttributeInput) (*DescribeVolumeAttributeOutput, error) { - req, out := c.DescribeVolumeAttributeRequest(input) - return out, req.Send() -} - -// DescribeVolumeAttributeWithContext is the same as DescribeVolumeAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVolumeAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVolumeAttributeWithContext(ctx aws.Context, input *DescribeVolumeAttributeInput, opts ...request.Option) (*DescribeVolumeAttributeOutput, error) { - req, out := c.DescribeVolumeAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVolumeStatus = "DescribeVolumeStatus" - -// DescribeVolumeStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVolumeStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVolumeStatus for more information on using the DescribeVolumeStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVolumeStatusRequest method. -// req, resp := client.DescribeVolumeStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatus -func (c *EC2) DescribeVolumeStatusRequest(input *DescribeVolumeStatusInput) (req *request.Request, output *DescribeVolumeStatusOutput) { - op := &request.Operation{ - Name: opDescribeVolumeStatus, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeVolumeStatusInput{} - } - - output = &DescribeVolumeStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVolumeStatus API operation for Amazon Elastic Compute Cloud. -// -// Describes the status of the specified volumes. Volume status provides the -// result of the checks performed on your volumes to determine events that can -// impair the performance of your volumes. The performance of a volume can be -// affected if an issue occurs on the volume's underlying host. If the volume's -// underlying host experiences a power outage or system issue, after the system -// is restored, there could be data inconsistencies on the volume. Volume events -// notify you if this occurs. Volume actions notify you if any action needs -// to be taken in response to the event. -// -// The DescribeVolumeStatus operation provides the following information about -// the specified volumes: -// -// Status: Reflects the current status of the volume. The possible values are -// ok, impaired , warning, or insufficient-data. If all checks pass, the overall -// status of the volume is ok. If the check fails, the overall status is impaired. -// If the status is insufficient-data, then the checks may still be taking place -// on your volume at the time. We recommend that you retry the request. For -// more information about volume status, see Monitoring the Status of Your Volumes -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Events: Reflect the cause of a volume status and may require you to take -// action. For example, if your volume returns an impaired status, then the -// volume event might be potential-data-inconsistency. This means that your -// volume has been affected by an issue with the underlying host, has all I/O -// operations disabled, and may have inconsistent data. -// -// Actions: Reflect the actions you may have to take in response to an event. -// For example, if the status of the volume is impaired and the volume event -// shows potential-data-inconsistency, then the action shows enable-volume-io. -// This means that you may want to enable the I/O operations for the volume -// by calling the EnableVolumeIO action and then check the volume for data consistency. -// -// Volume status is based on the volume status checks, and does not reflect -// the volume state. Therefore, volume status does not indicate volumes in the -// error state (for example, when a volume is incapable of accepting I/O.) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVolumeStatus for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatus -func (c *EC2) DescribeVolumeStatus(input *DescribeVolumeStatusInput) (*DescribeVolumeStatusOutput, error) { - req, out := c.DescribeVolumeStatusRequest(input) - return out, req.Send() -} - -// DescribeVolumeStatusWithContext is the same as DescribeVolumeStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVolumeStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVolumeStatusWithContext(ctx aws.Context, input *DescribeVolumeStatusInput, opts ...request.Option) (*DescribeVolumeStatusOutput, error) { - req, out := c.DescribeVolumeStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeVolumeStatusPages iterates over the pages of a DescribeVolumeStatus operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeVolumeStatus 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 DescribeVolumeStatus operation. -// pageNum := 0 -// err := client.DescribeVolumeStatusPages(params, -// func(page *DescribeVolumeStatusOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EC2) DescribeVolumeStatusPages(input *DescribeVolumeStatusInput, fn func(*DescribeVolumeStatusOutput, bool) bool) error { - return c.DescribeVolumeStatusPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeVolumeStatusPagesWithContext same as DescribeVolumeStatusPages 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 *EC2) DescribeVolumeStatusPagesWithContext(ctx aws.Context, input *DescribeVolumeStatusInput, fn func(*DescribeVolumeStatusOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeVolumeStatusInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeVolumeStatusRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVolumeStatusOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeVolumes = "DescribeVolumes" - -// DescribeVolumesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVolumes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVolumes for more information on using the DescribeVolumes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVolumesRequest method. -// req, resp := client.DescribeVolumesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes -func (c *EC2) DescribeVolumesRequest(input *DescribeVolumesInput) (req *request.Request, output *DescribeVolumesOutput) { - op := &request.Operation{ - Name: opDescribeVolumes, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeVolumesInput{} - } - - output = &DescribeVolumesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVolumes API operation for Amazon Elastic Compute Cloud. -// -// Describes the specified EBS volumes. -// -// If you are describing a long list of volumes, you can paginate the output -// to make the list more manageable. The MaxResults parameter sets the maximum -// number of results returned in a single page. If the list of results exceeds -// your MaxResults value, then that number of results is returned along with -// a NextToken value that can be passed to a subsequent DescribeVolumes request -// to retrieve the remaining results. -// -// For more information about EBS volumes, see Amazon EBS Volumes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVolumes for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes -func (c *EC2) DescribeVolumes(input *DescribeVolumesInput) (*DescribeVolumesOutput, error) { - req, out := c.DescribeVolumesRequest(input) - return out, req.Send() -} - -// DescribeVolumesWithContext is the same as DescribeVolumes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVolumes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVolumesWithContext(ctx aws.Context, input *DescribeVolumesInput, opts ...request.Option) (*DescribeVolumesOutput, error) { - req, out := c.DescribeVolumesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeVolumesPages iterates over the pages of a DescribeVolumes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeVolumes 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 DescribeVolumes operation. -// pageNum := 0 -// err := client.DescribeVolumesPages(params, -// func(page *DescribeVolumesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EC2) DescribeVolumesPages(input *DescribeVolumesInput, fn func(*DescribeVolumesOutput, bool) bool) error { - return c.DescribeVolumesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeVolumesPagesWithContext same as DescribeVolumesPages 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 *EC2) DescribeVolumesPagesWithContext(ctx aws.Context, input *DescribeVolumesInput, fn func(*DescribeVolumesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeVolumesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeVolumesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVolumesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeVolumesModifications = "DescribeVolumesModifications" - -// DescribeVolumesModificationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVolumesModifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVolumesModifications for more information on using the DescribeVolumesModifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVolumesModificationsRequest method. -// req, resp := client.DescribeVolumesModificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesModifications -func (c *EC2) DescribeVolumesModificationsRequest(input *DescribeVolumesModificationsInput) (req *request.Request, output *DescribeVolumesModificationsOutput) { - op := &request.Operation{ - Name: opDescribeVolumesModifications, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVolumesModificationsInput{} - } - - output = &DescribeVolumesModificationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVolumesModifications API operation for Amazon Elastic Compute Cloud. -// -// Reports the current modification status of EBS volumes. -// -// Current-generation EBS volumes support modification of attributes including -// type, size, and (for io1 volumes) IOPS provisioning while either attached -// to or detached from an instance. Following an action from the API or the -// console to modify a volume, the status of the modification may be modifying, -// optimizing, completed, or failed. If a volume has never been modified, then -// certain elements of the returned VolumeModification objects are null. -// -// You can also use CloudWatch Events to check the status of a modification -// to an EBS volume. For information about CloudWatch Events, see the Amazon -// CloudWatch Events User Guide (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/). -// For more information, see Monitoring Volume Modifications" (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVolumesModifications for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesModifications -func (c *EC2) DescribeVolumesModifications(input *DescribeVolumesModificationsInput) (*DescribeVolumesModificationsOutput, error) { - req, out := c.DescribeVolumesModificationsRequest(input) - return out, req.Send() -} - -// DescribeVolumesModificationsWithContext is the same as DescribeVolumesModifications with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVolumesModifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVolumesModificationsWithContext(ctx aws.Context, input *DescribeVolumesModificationsInput, opts ...request.Option) (*DescribeVolumesModificationsOutput, error) { - req, out := c.DescribeVolumesModificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpcAttribute = "DescribeVpcAttribute" - -// DescribeVpcAttributeRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpcAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpcAttribute for more information on using the DescribeVpcAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpcAttributeRequest method. -// req, resp := client.DescribeVpcAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttribute -func (c *EC2) DescribeVpcAttributeRequest(input *DescribeVpcAttributeInput) (req *request.Request, output *DescribeVpcAttributeOutput) { - op := &request.Operation{ - Name: opDescribeVpcAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpcAttributeInput{} - } - - output = &DescribeVpcAttributeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpcAttribute API operation for Amazon Elastic Compute Cloud. -// -// Describes the specified attribute of the specified VPC. You can specify only -// one attribute at a time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVpcAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttribute -func (c *EC2) DescribeVpcAttribute(input *DescribeVpcAttributeInput) (*DescribeVpcAttributeOutput, error) { - req, out := c.DescribeVpcAttributeRequest(input) - return out, req.Send() -} - -// DescribeVpcAttributeWithContext is the same as DescribeVpcAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpcAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVpcAttributeWithContext(ctx aws.Context, input *DescribeVpcAttributeInput, opts ...request.Option) (*DescribeVpcAttributeOutput, error) { - req, out := c.DescribeVpcAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpcClassicLink = "DescribeVpcClassicLink" - -// DescribeVpcClassicLinkRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpcClassicLink operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpcClassicLink for more information on using the DescribeVpcClassicLink -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpcClassicLinkRequest method. -// req, resp := client.DescribeVpcClassicLinkRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLink -func (c *EC2) DescribeVpcClassicLinkRequest(input *DescribeVpcClassicLinkInput) (req *request.Request, output *DescribeVpcClassicLinkOutput) { - op := &request.Operation{ - Name: opDescribeVpcClassicLink, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpcClassicLinkInput{} - } - - output = &DescribeVpcClassicLinkOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpcClassicLink API operation for Amazon Elastic Compute Cloud. -// -// Describes the ClassicLink status of one or more VPCs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVpcClassicLink for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLink -func (c *EC2) DescribeVpcClassicLink(input *DescribeVpcClassicLinkInput) (*DescribeVpcClassicLinkOutput, error) { - req, out := c.DescribeVpcClassicLinkRequest(input) - return out, req.Send() -} - -// DescribeVpcClassicLinkWithContext is the same as DescribeVpcClassicLink with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpcClassicLink for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVpcClassicLinkWithContext(ctx aws.Context, input *DescribeVpcClassicLinkInput, opts ...request.Option) (*DescribeVpcClassicLinkOutput, error) { - req, out := c.DescribeVpcClassicLinkRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpcClassicLinkDnsSupport = "DescribeVpcClassicLinkDnsSupport" - -// DescribeVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpcClassicLinkDnsSupport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpcClassicLinkDnsSupport for more information on using the DescribeVpcClassicLinkDnsSupport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpcClassicLinkDnsSupportRequest method. -// req, resp := client.DescribeVpcClassicLinkDnsSupportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkDnsSupport -func (c *EC2) DescribeVpcClassicLinkDnsSupportRequest(input *DescribeVpcClassicLinkDnsSupportInput) (req *request.Request, output *DescribeVpcClassicLinkDnsSupportOutput) { - op := &request.Operation{ - Name: opDescribeVpcClassicLinkDnsSupport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpcClassicLinkDnsSupportInput{} - } - - output = &DescribeVpcClassicLinkDnsSupportOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpcClassicLinkDnsSupport API operation for Amazon Elastic Compute Cloud. -// -// Describes the ClassicLink DNS support status of one or more VPCs. If enabled, -// the DNS hostname of a linked EC2-Classic instance resolves to its private -// IP address when addressed from an instance in the VPC to which it's linked. -// Similarly, the DNS hostname of an instance in a VPC resolves to its private -// IP address when addressed from a linked EC2-Classic instance. For more information, -// see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVpcClassicLinkDnsSupport for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkDnsSupport -func (c *EC2) DescribeVpcClassicLinkDnsSupport(input *DescribeVpcClassicLinkDnsSupportInput) (*DescribeVpcClassicLinkDnsSupportOutput, error) { - req, out := c.DescribeVpcClassicLinkDnsSupportRequest(input) - return out, req.Send() -} - -// DescribeVpcClassicLinkDnsSupportWithContext is the same as DescribeVpcClassicLinkDnsSupport with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpcClassicLinkDnsSupport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVpcClassicLinkDnsSupportWithContext(ctx aws.Context, input *DescribeVpcClassicLinkDnsSupportInput, opts ...request.Option) (*DescribeVpcClassicLinkDnsSupportOutput, error) { - req, out := c.DescribeVpcClassicLinkDnsSupportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpcEndpointConnectionNotifications = "DescribeVpcEndpointConnectionNotifications" - -// DescribeVpcEndpointConnectionNotificationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpcEndpointConnectionNotifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpcEndpointConnectionNotifications for more information on using the DescribeVpcEndpointConnectionNotifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpcEndpointConnectionNotificationsRequest method. -// req, resp := client.DescribeVpcEndpointConnectionNotificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointConnectionNotifications -func (c *EC2) DescribeVpcEndpointConnectionNotificationsRequest(input *DescribeVpcEndpointConnectionNotificationsInput) (req *request.Request, output *DescribeVpcEndpointConnectionNotificationsOutput) { - op := &request.Operation{ - Name: opDescribeVpcEndpointConnectionNotifications, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpcEndpointConnectionNotificationsInput{} - } - - output = &DescribeVpcEndpointConnectionNotificationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpcEndpointConnectionNotifications API operation for Amazon Elastic Compute Cloud. -// -// Describes the connection notifications for VPC endpoints and VPC endpoint -// 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 Amazon Elastic Compute Cloud's -// API operation DescribeVpcEndpointConnectionNotifications for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointConnectionNotifications -func (c *EC2) DescribeVpcEndpointConnectionNotifications(input *DescribeVpcEndpointConnectionNotificationsInput) (*DescribeVpcEndpointConnectionNotificationsOutput, error) { - req, out := c.DescribeVpcEndpointConnectionNotificationsRequest(input) - return out, req.Send() -} - -// DescribeVpcEndpointConnectionNotificationsWithContext is the same as DescribeVpcEndpointConnectionNotifications with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpcEndpointConnectionNotifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVpcEndpointConnectionNotificationsWithContext(ctx aws.Context, input *DescribeVpcEndpointConnectionNotificationsInput, opts ...request.Option) (*DescribeVpcEndpointConnectionNotificationsOutput, error) { - req, out := c.DescribeVpcEndpointConnectionNotificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpcEndpointConnections = "DescribeVpcEndpointConnections" - -// DescribeVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpcEndpointConnections operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpcEndpointConnections for more information on using the DescribeVpcEndpointConnections -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpcEndpointConnectionsRequest method. -// req, resp := client.DescribeVpcEndpointConnectionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointConnections -func (c *EC2) DescribeVpcEndpointConnectionsRequest(input *DescribeVpcEndpointConnectionsInput) (req *request.Request, output *DescribeVpcEndpointConnectionsOutput) { - op := &request.Operation{ - Name: opDescribeVpcEndpointConnections, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpcEndpointConnectionsInput{} - } - - output = &DescribeVpcEndpointConnectionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpcEndpointConnections API operation for Amazon Elastic Compute Cloud. -// -// Describes the VPC endpoint connections to your VPC endpoint services, including -// any endpoints that are pending your acceptance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVpcEndpointConnections for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointConnections -func (c *EC2) DescribeVpcEndpointConnections(input *DescribeVpcEndpointConnectionsInput) (*DescribeVpcEndpointConnectionsOutput, error) { - req, out := c.DescribeVpcEndpointConnectionsRequest(input) - return out, req.Send() -} - -// DescribeVpcEndpointConnectionsWithContext is the same as DescribeVpcEndpointConnections with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpcEndpointConnections for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVpcEndpointConnectionsWithContext(ctx aws.Context, input *DescribeVpcEndpointConnectionsInput, opts ...request.Option) (*DescribeVpcEndpointConnectionsOutput, error) { - req, out := c.DescribeVpcEndpointConnectionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpcEndpointServiceConfigurations = "DescribeVpcEndpointServiceConfigurations" - -// DescribeVpcEndpointServiceConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpcEndpointServiceConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpcEndpointServiceConfigurations for more information on using the DescribeVpcEndpointServiceConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpcEndpointServiceConfigurationsRequest method. -// req, resp := client.DescribeVpcEndpointServiceConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServiceConfigurations -func (c *EC2) DescribeVpcEndpointServiceConfigurationsRequest(input *DescribeVpcEndpointServiceConfigurationsInput) (req *request.Request, output *DescribeVpcEndpointServiceConfigurationsOutput) { - op := &request.Operation{ - Name: opDescribeVpcEndpointServiceConfigurations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpcEndpointServiceConfigurationsInput{} - } - - output = &DescribeVpcEndpointServiceConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpcEndpointServiceConfigurations API operation for Amazon Elastic Compute Cloud. -// -// Describes the VPC endpoint service configurations in your account (your 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 Amazon Elastic Compute Cloud's -// API operation DescribeVpcEndpointServiceConfigurations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServiceConfigurations -func (c *EC2) DescribeVpcEndpointServiceConfigurations(input *DescribeVpcEndpointServiceConfigurationsInput) (*DescribeVpcEndpointServiceConfigurationsOutput, error) { - req, out := c.DescribeVpcEndpointServiceConfigurationsRequest(input) - return out, req.Send() -} - -// DescribeVpcEndpointServiceConfigurationsWithContext is the same as DescribeVpcEndpointServiceConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpcEndpointServiceConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVpcEndpointServiceConfigurationsWithContext(ctx aws.Context, input *DescribeVpcEndpointServiceConfigurationsInput, opts ...request.Option) (*DescribeVpcEndpointServiceConfigurationsOutput, error) { - req, out := c.DescribeVpcEndpointServiceConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpcEndpointServicePermissions = "DescribeVpcEndpointServicePermissions" - -// DescribeVpcEndpointServicePermissionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpcEndpointServicePermissions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpcEndpointServicePermissions for more information on using the DescribeVpcEndpointServicePermissions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpcEndpointServicePermissionsRequest method. -// req, resp := client.DescribeVpcEndpointServicePermissionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServicePermissions -func (c *EC2) DescribeVpcEndpointServicePermissionsRequest(input *DescribeVpcEndpointServicePermissionsInput) (req *request.Request, output *DescribeVpcEndpointServicePermissionsOutput) { - op := &request.Operation{ - Name: opDescribeVpcEndpointServicePermissions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpcEndpointServicePermissionsInput{} - } - - output = &DescribeVpcEndpointServicePermissionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpcEndpointServicePermissions API operation for Amazon Elastic Compute Cloud. -// -// Describes the principals (service consumers) that are permitted to discover -// your VPC endpoint service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVpcEndpointServicePermissions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServicePermissions -func (c *EC2) DescribeVpcEndpointServicePermissions(input *DescribeVpcEndpointServicePermissionsInput) (*DescribeVpcEndpointServicePermissionsOutput, error) { - req, out := c.DescribeVpcEndpointServicePermissionsRequest(input) - return out, req.Send() -} - -// DescribeVpcEndpointServicePermissionsWithContext is the same as DescribeVpcEndpointServicePermissions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpcEndpointServicePermissions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVpcEndpointServicePermissionsWithContext(ctx aws.Context, input *DescribeVpcEndpointServicePermissionsInput, opts ...request.Option) (*DescribeVpcEndpointServicePermissionsOutput, error) { - req, out := c.DescribeVpcEndpointServicePermissionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpcEndpointServices = "DescribeVpcEndpointServices" - -// DescribeVpcEndpointServicesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpcEndpointServices operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpcEndpointServices for more information on using the DescribeVpcEndpointServices -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpcEndpointServicesRequest method. -// req, resp := client.DescribeVpcEndpointServicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServices -func (c *EC2) DescribeVpcEndpointServicesRequest(input *DescribeVpcEndpointServicesInput) (req *request.Request, output *DescribeVpcEndpointServicesOutput) { - op := &request.Operation{ - Name: opDescribeVpcEndpointServices, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpcEndpointServicesInput{} - } - - output = &DescribeVpcEndpointServicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpcEndpointServices API operation for Amazon Elastic Compute Cloud. -// -// Describes available services to which you can create a VPC endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVpcEndpointServices for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServices -func (c *EC2) DescribeVpcEndpointServices(input *DescribeVpcEndpointServicesInput) (*DescribeVpcEndpointServicesOutput, error) { - req, out := c.DescribeVpcEndpointServicesRequest(input) - return out, req.Send() -} - -// DescribeVpcEndpointServicesWithContext is the same as DescribeVpcEndpointServices with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpcEndpointServices for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVpcEndpointServicesWithContext(ctx aws.Context, input *DescribeVpcEndpointServicesInput, opts ...request.Option) (*DescribeVpcEndpointServicesOutput, error) { - req, out := c.DescribeVpcEndpointServicesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpcEndpoints = "DescribeVpcEndpoints" - -// DescribeVpcEndpointsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpcEndpoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpcEndpoints for more information on using the DescribeVpcEndpoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpcEndpointsRequest method. -// req, resp := client.DescribeVpcEndpointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpoints -func (c *EC2) DescribeVpcEndpointsRequest(input *DescribeVpcEndpointsInput) (req *request.Request, output *DescribeVpcEndpointsOutput) { - op := &request.Operation{ - Name: opDescribeVpcEndpoints, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpcEndpointsInput{} - } - - output = &DescribeVpcEndpointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpcEndpoints API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your VPC endpoints. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVpcEndpoints for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpoints -func (c *EC2) DescribeVpcEndpoints(input *DescribeVpcEndpointsInput) (*DescribeVpcEndpointsOutput, error) { - req, out := c.DescribeVpcEndpointsRequest(input) - return out, req.Send() -} - -// DescribeVpcEndpointsWithContext is the same as DescribeVpcEndpoints with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpcEndpoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVpcEndpointsWithContext(ctx aws.Context, input *DescribeVpcEndpointsInput, opts ...request.Option) (*DescribeVpcEndpointsOutput, error) { - req, out := c.DescribeVpcEndpointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections" - -// DescribeVpcPeeringConnectionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpcPeeringConnections operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpcPeeringConnections for more information on using the DescribeVpcPeeringConnections -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpcPeeringConnectionsRequest method. -// req, resp := client.DescribeVpcPeeringConnectionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections -func (c *EC2) DescribeVpcPeeringConnectionsRequest(input *DescribeVpcPeeringConnectionsInput) (req *request.Request, output *DescribeVpcPeeringConnectionsOutput) { - op := &request.Operation{ - Name: opDescribeVpcPeeringConnections, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpcPeeringConnectionsInput{} - } - - output = &DescribeVpcPeeringConnectionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpcPeeringConnections API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your VPC peering connections. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVpcPeeringConnections for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections -func (c *EC2) DescribeVpcPeeringConnections(input *DescribeVpcPeeringConnectionsInput) (*DescribeVpcPeeringConnectionsOutput, error) { - req, out := c.DescribeVpcPeeringConnectionsRequest(input) - return out, req.Send() -} - -// DescribeVpcPeeringConnectionsWithContext is the same as DescribeVpcPeeringConnections with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpcPeeringConnections for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVpcPeeringConnectionsWithContext(ctx aws.Context, input *DescribeVpcPeeringConnectionsInput, opts ...request.Option) (*DescribeVpcPeeringConnectionsOutput, error) { - req, out := c.DescribeVpcPeeringConnectionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpcs = "DescribeVpcs" - -// DescribeVpcsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpcs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpcs for more information on using the DescribeVpcs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpcsRequest method. -// req, resp := client.DescribeVpcsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs -func (c *EC2) DescribeVpcsRequest(input *DescribeVpcsInput) (req *request.Request, output *DescribeVpcsOutput) { - op := &request.Operation{ - Name: opDescribeVpcs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpcsInput{} - } - - output = &DescribeVpcsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpcs API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your VPCs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVpcs for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs -func (c *EC2) DescribeVpcs(input *DescribeVpcsInput) (*DescribeVpcsOutput, error) { - req, out := c.DescribeVpcsRequest(input) - return out, req.Send() -} - -// DescribeVpcsWithContext is the same as DescribeVpcs with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpcs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVpcsWithContext(ctx aws.Context, input *DescribeVpcsInput, opts ...request.Option) (*DescribeVpcsOutput, error) { - req, out := c.DescribeVpcsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpnConnections = "DescribeVpnConnections" - -// DescribeVpnConnectionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpnConnections operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpnConnections for more information on using the DescribeVpnConnections -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpnConnectionsRequest method. -// req, resp := client.DescribeVpnConnectionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnections -func (c *EC2) DescribeVpnConnectionsRequest(input *DescribeVpnConnectionsInput) (req *request.Request, output *DescribeVpnConnectionsOutput) { - op := &request.Operation{ - Name: opDescribeVpnConnections, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpnConnectionsInput{} - } - - output = &DescribeVpnConnectionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpnConnections API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your VPN connections. -// -// For more information about VPN connections, see AWS Managed VPN Connections -// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) in the -// Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVpnConnections for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnections -func (c *EC2) DescribeVpnConnections(input *DescribeVpnConnectionsInput) (*DescribeVpnConnectionsOutput, error) { - req, out := c.DescribeVpnConnectionsRequest(input) - return out, req.Send() -} - -// DescribeVpnConnectionsWithContext is the same as DescribeVpnConnections with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpnConnections for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVpnConnectionsWithContext(ctx aws.Context, input *DescribeVpnConnectionsInput, opts ...request.Option) (*DescribeVpnConnectionsOutput, error) { - req, out := c.DescribeVpnConnectionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpnGateways = "DescribeVpnGateways" - -// DescribeVpnGatewaysRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpnGateways operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpnGateways for more information on using the DescribeVpnGateways -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpnGatewaysRequest method. -// req, resp := client.DescribeVpnGatewaysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGateways -func (c *EC2) DescribeVpnGatewaysRequest(input *DescribeVpnGatewaysInput) (req *request.Request, output *DescribeVpnGatewaysOutput) { - op := &request.Operation{ - Name: opDescribeVpnGateways, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpnGatewaysInput{} - } - - output = &DescribeVpnGatewaysOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpnGateways API operation for Amazon Elastic Compute Cloud. -// -// Describes one or more of your virtual private gateways. -// -// For more information about virtual private gateways, see AWS Managed VPN -// Connections (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DescribeVpnGateways for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGateways -func (c *EC2) DescribeVpnGateways(input *DescribeVpnGatewaysInput) (*DescribeVpnGatewaysOutput, error) { - req, out := c.DescribeVpnGatewaysRequest(input) - return out, req.Send() -} - -// DescribeVpnGatewaysWithContext is the same as DescribeVpnGateways with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpnGateways for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DescribeVpnGatewaysWithContext(ctx aws.Context, input *DescribeVpnGatewaysInput, opts ...request.Option) (*DescribeVpnGatewaysOutput, error) { - req, out := c.DescribeVpnGatewaysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachClassicLinkVpc = "DetachClassicLinkVpc" - -// DetachClassicLinkVpcRequest generates a "aws/request.Request" representing the -// client's request for the DetachClassicLinkVpc operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachClassicLinkVpc for more information on using the DetachClassicLinkVpc -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachClassicLinkVpcRequest method. -// req, resp := client.DetachClassicLinkVpcRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpc -func (c *EC2) DetachClassicLinkVpcRequest(input *DetachClassicLinkVpcInput) (req *request.Request, output *DetachClassicLinkVpcOutput) { - op := &request.Operation{ - Name: opDetachClassicLinkVpc, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachClassicLinkVpcInput{} - } - - output = &DetachClassicLinkVpcOutput{} - req = c.newRequest(op, input, output) - return -} - -// DetachClassicLinkVpc API operation for Amazon Elastic Compute Cloud. -// -// Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance -// has been unlinked, the VPC security groups are no longer associated with -// it. An instance is automatically unlinked from a VPC when it's stopped. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DetachClassicLinkVpc for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpc -func (c *EC2) DetachClassicLinkVpc(input *DetachClassicLinkVpcInput) (*DetachClassicLinkVpcOutput, error) { - req, out := c.DetachClassicLinkVpcRequest(input) - return out, req.Send() -} - -// DetachClassicLinkVpcWithContext is the same as DetachClassicLinkVpc with the addition of -// the ability to pass a context and additional request options. -// -// See DetachClassicLinkVpc for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DetachClassicLinkVpcWithContext(ctx aws.Context, input *DetachClassicLinkVpcInput, opts ...request.Option) (*DetachClassicLinkVpcOutput, error) { - req, out := c.DetachClassicLinkVpcRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachInternetGateway = "DetachInternetGateway" - -// DetachInternetGatewayRequest generates a "aws/request.Request" representing the -// client's request for the DetachInternetGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachInternetGateway for more information on using the DetachInternetGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachInternetGatewayRequest method. -// req, resp := client.DetachInternetGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGateway -func (c *EC2) DetachInternetGatewayRequest(input *DetachInternetGatewayInput) (req *request.Request, output *DetachInternetGatewayOutput) { - op := &request.Operation{ - Name: opDetachInternetGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachInternetGatewayInput{} - } - - output = &DetachInternetGatewayOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachInternetGateway API operation for Amazon Elastic Compute Cloud. -// -// Detaches an internet gateway from a VPC, disabling connectivity between the -// internet and the VPC. The VPC must not contain any running instances with -// Elastic IP addresses or public IPv4 addresses. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DetachInternetGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGateway -func (c *EC2) DetachInternetGateway(input *DetachInternetGatewayInput) (*DetachInternetGatewayOutput, error) { - req, out := c.DetachInternetGatewayRequest(input) - return out, req.Send() -} - -// DetachInternetGatewayWithContext is the same as DetachInternetGateway with the addition of -// the ability to pass a context and additional request options. -// -// See DetachInternetGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DetachInternetGatewayWithContext(ctx aws.Context, input *DetachInternetGatewayInput, opts ...request.Option) (*DetachInternetGatewayOutput, error) { - req, out := c.DetachInternetGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachNetworkInterface = "DetachNetworkInterface" - -// DetachNetworkInterfaceRequest generates a "aws/request.Request" representing the -// client's request for the DetachNetworkInterface operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachNetworkInterface for more information on using the DetachNetworkInterface -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachNetworkInterfaceRequest method. -// req, resp := client.DetachNetworkInterfaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterface -func (c *EC2) DetachNetworkInterfaceRequest(input *DetachNetworkInterfaceInput) (req *request.Request, output *DetachNetworkInterfaceOutput) { - op := &request.Operation{ - Name: opDetachNetworkInterface, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachNetworkInterfaceInput{} - } - - output = &DetachNetworkInterfaceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachNetworkInterface API operation for Amazon Elastic Compute Cloud. -// -// Detaches a network interface from an instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DetachNetworkInterface for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterface -func (c *EC2) DetachNetworkInterface(input *DetachNetworkInterfaceInput) (*DetachNetworkInterfaceOutput, error) { - req, out := c.DetachNetworkInterfaceRequest(input) - return out, req.Send() -} - -// DetachNetworkInterfaceWithContext is the same as DetachNetworkInterface with the addition of -// the ability to pass a context and additional request options. -// -// See DetachNetworkInterface for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DetachNetworkInterfaceWithContext(ctx aws.Context, input *DetachNetworkInterfaceInput, opts ...request.Option) (*DetachNetworkInterfaceOutput, error) { - req, out := c.DetachNetworkInterfaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachVolume = "DetachVolume" - -// DetachVolumeRequest generates a "aws/request.Request" representing the -// client's request for the DetachVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachVolume for more information on using the DetachVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachVolumeRequest method. -// req, resp := client.DetachVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVolume -func (c *EC2) DetachVolumeRequest(input *DetachVolumeInput) (req *request.Request, output *VolumeAttachment) { - op := &request.Operation{ - Name: opDetachVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachVolumeInput{} - } - - output = &VolumeAttachment{} - req = c.newRequest(op, input, output) - return -} - -// DetachVolume API operation for Amazon Elastic Compute Cloud. -// -// Detaches an EBS volume from an instance. Make sure to unmount any file systems -// on the device within your operating system before detaching the volume. Failure -// to do so can result in the volume becoming stuck in the busy state while -// detaching. If this happens, detachment can be delayed indefinitely until -// you unmount the volume, force detachment, reboot the instance, or all three. -// If an EBS volume is the root device of an instance, it can't be detached -// while the instance is running. To detach the root volume, stop the instance -// first. -// -// When a volume with an AWS Marketplace product code is detached from an instance, -// the product code is no longer associated with the instance. -// -// For more information, see Detaching an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DetachVolume for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVolume -func (c *EC2) DetachVolume(input *DetachVolumeInput) (*VolumeAttachment, error) { - req, out := c.DetachVolumeRequest(input) - return out, req.Send() -} - -// DetachVolumeWithContext is the same as DetachVolume with the addition of -// the ability to pass a context and additional request options. -// -// See DetachVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DetachVolumeWithContext(ctx aws.Context, input *DetachVolumeInput, opts ...request.Option) (*VolumeAttachment, error) { - req, out := c.DetachVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachVpnGateway = "DetachVpnGateway" - -// DetachVpnGatewayRequest generates a "aws/request.Request" representing the -// client's request for the DetachVpnGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachVpnGateway for more information on using the DetachVpnGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachVpnGatewayRequest method. -// req, resp := client.DetachVpnGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVpnGateway -func (c *EC2) DetachVpnGatewayRequest(input *DetachVpnGatewayInput) (req *request.Request, output *DetachVpnGatewayOutput) { - op := &request.Operation{ - Name: opDetachVpnGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachVpnGatewayInput{} - } - - output = &DetachVpnGatewayOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachVpnGateway API operation for Amazon Elastic Compute Cloud. -// -// Detaches a virtual private gateway from a VPC. You do this if you're planning -// to turn off the VPC and not use it anymore. You can confirm a virtual private -// gateway has been completely detached from a VPC by describing the virtual -// private gateway (any attachments to the virtual private gateway are also -// described). -// -// You must wait for the attachment's state to switch to detached before you -// can delete the VPC or attach a different VPC to the virtual private gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DetachVpnGateway for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVpnGateway -func (c *EC2) DetachVpnGateway(input *DetachVpnGatewayInput) (*DetachVpnGatewayOutput, error) { - req, out := c.DetachVpnGatewayRequest(input) - return out, req.Send() -} - -// DetachVpnGatewayWithContext is the same as DetachVpnGateway with the addition of -// the ability to pass a context and additional request options. -// -// See DetachVpnGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DetachVpnGatewayWithContext(ctx aws.Context, input *DetachVpnGatewayInput, opts ...request.Option) (*DetachVpnGatewayOutput, error) { - req, out := c.DetachVpnGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableTransitGatewayRouteTablePropagation = "DisableTransitGatewayRouteTablePropagation" - -// DisableTransitGatewayRouteTablePropagationRequest generates a "aws/request.Request" representing the -// client's request for the DisableTransitGatewayRouteTablePropagation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableTransitGatewayRouteTablePropagation for more information on using the DisableTransitGatewayRouteTablePropagation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableTransitGatewayRouteTablePropagationRequest method. -// req, resp := client.DisableTransitGatewayRouteTablePropagationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableTransitGatewayRouteTablePropagation -func (c *EC2) DisableTransitGatewayRouteTablePropagationRequest(input *DisableTransitGatewayRouteTablePropagationInput) (req *request.Request, output *DisableTransitGatewayRouteTablePropagationOutput) { - op := &request.Operation{ - Name: opDisableTransitGatewayRouteTablePropagation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableTransitGatewayRouteTablePropagationInput{} - } - - output = &DisableTransitGatewayRouteTablePropagationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisableTransitGatewayRouteTablePropagation API operation for Amazon Elastic Compute Cloud. -// -// Disables the specified resource attachment from propagating routes to the -// specified propagation route table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DisableTransitGatewayRouteTablePropagation for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableTransitGatewayRouteTablePropagation -func (c *EC2) DisableTransitGatewayRouteTablePropagation(input *DisableTransitGatewayRouteTablePropagationInput) (*DisableTransitGatewayRouteTablePropagationOutput, error) { - req, out := c.DisableTransitGatewayRouteTablePropagationRequest(input) - return out, req.Send() -} - -// DisableTransitGatewayRouteTablePropagationWithContext is the same as DisableTransitGatewayRouteTablePropagation with the addition of -// the ability to pass a context and additional request options. -// -// See DisableTransitGatewayRouteTablePropagation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DisableTransitGatewayRouteTablePropagationWithContext(ctx aws.Context, input *DisableTransitGatewayRouteTablePropagationInput, opts ...request.Option) (*DisableTransitGatewayRouteTablePropagationOutput, error) { - req, out := c.DisableTransitGatewayRouteTablePropagationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableVgwRoutePropagation = "DisableVgwRoutePropagation" - -// DisableVgwRoutePropagationRequest generates a "aws/request.Request" representing the -// client's request for the DisableVgwRoutePropagation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableVgwRoutePropagation for more information on using the DisableVgwRoutePropagation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableVgwRoutePropagationRequest method. -// req, resp := client.DisableVgwRoutePropagationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVgwRoutePropagation -func (c *EC2) DisableVgwRoutePropagationRequest(input *DisableVgwRoutePropagationInput) (req *request.Request, output *DisableVgwRoutePropagationOutput) { - op := &request.Operation{ - Name: opDisableVgwRoutePropagation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableVgwRoutePropagationInput{} - } - - output = &DisableVgwRoutePropagationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisableVgwRoutePropagation API operation for Amazon Elastic Compute Cloud. -// -// Disables a virtual private gateway (VGW) from propagating routes to a specified -// route table of a VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DisableVgwRoutePropagation for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVgwRoutePropagation -func (c *EC2) DisableVgwRoutePropagation(input *DisableVgwRoutePropagationInput) (*DisableVgwRoutePropagationOutput, error) { - req, out := c.DisableVgwRoutePropagationRequest(input) - return out, req.Send() -} - -// DisableVgwRoutePropagationWithContext is the same as DisableVgwRoutePropagation with the addition of -// the ability to pass a context and additional request options. -// -// See DisableVgwRoutePropagation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DisableVgwRoutePropagationWithContext(ctx aws.Context, input *DisableVgwRoutePropagationInput, opts ...request.Option) (*DisableVgwRoutePropagationOutput, error) { - req, out := c.DisableVgwRoutePropagationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableVpcClassicLink = "DisableVpcClassicLink" - -// DisableVpcClassicLinkRequest generates a "aws/request.Request" representing the -// client's request for the DisableVpcClassicLink operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableVpcClassicLink for more information on using the DisableVpcClassicLink -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableVpcClassicLinkRequest method. -// req, resp := client.DisableVpcClassicLinkRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLink -func (c *EC2) DisableVpcClassicLinkRequest(input *DisableVpcClassicLinkInput) (req *request.Request, output *DisableVpcClassicLinkOutput) { - op := &request.Operation{ - Name: opDisableVpcClassicLink, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableVpcClassicLinkInput{} - } - - output = &DisableVpcClassicLinkOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisableVpcClassicLink API operation for Amazon Elastic Compute Cloud. -// -// Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC -// that has EC2-Classic instances linked 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 Amazon Elastic Compute Cloud's -// API operation DisableVpcClassicLink for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLink -func (c *EC2) DisableVpcClassicLink(input *DisableVpcClassicLinkInput) (*DisableVpcClassicLinkOutput, error) { - req, out := c.DisableVpcClassicLinkRequest(input) - return out, req.Send() -} - -// DisableVpcClassicLinkWithContext is the same as DisableVpcClassicLink with the addition of -// the ability to pass a context and additional request options. -// -// See DisableVpcClassicLink for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DisableVpcClassicLinkWithContext(ctx aws.Context, input *DisableVpcClassicLinkInput, opts ...request.Option) (*DisableVpcClassicLinkOutput, error) { - req, out := c.DisableVpcClassicLinkRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableVpcClassicLinkDnsSupport = "DisableVpcClassicLinkDnsSupport" - -// DisableVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the -// client's request for the DisableVpcClassicLinkDnsSupport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableVpcClassicLinkDnsSupport for more information on using the DisableVpcClassicLinkDnsSupport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableVpcClassicLinkDnsSupportRequest method. -// req, resp := client.DisableVpcClassicLinkDnsSupportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkDnsSupport -func (c *EC2) DisableVpcClassicLinkDnsSupportRequest(input *DisableVpcClassicLinkDnsSupportInput) (req *request.Request, output *DisableVpcClassicLinkDnsSupportOutput) { - op := &request.Operation{ - Name: opDisableVpcClassicLinkDnsSupport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableVpcClassicLinkDnsSupportInput{} - } - - output = &DisableVpcClassicLinkDnsSupportOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisableVpcClassicLinkDnsSupport API operation for Amazon Elastic Compute Cloud. -// -// Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve -// to public IP addresses when addressed between a linked EC2-Classic instance -// and instances in the VPC to which it's linked. For more information, see -// ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DisableVpcClassicLinkDnsSupport for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkDnsSupport -func (c *EC2) DisableVpcClassicLinkDnsSupport(input *DisableVpcClassicLinkDnsSupportInput) (*DisableVpcClassicLinkDnsSupportOutput, error) { - req, out := c.DisableVpcClassicLinkDnsSupportRequest(input) - return out, req.Send() -} - -// DisableVpcClassicLinkDnsSupportWithContext is the same as DisableVpcClassicLinkDnsSupport with the addition of -// the ability to pass a context and additional request options. -// -// See DisableVpcClassicLinkDnsSupport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DisableVpcClassicLinkDnsSupportWithContext(ctx aws.Context, input *DisableVpcClassicLinkDnsSupportInput, opts ...request.Option) (*DisableVpcClassicLinkDnsSupportOutput, error) { - req, out := c.DisableVpcClassicLinkDnsSupportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateAddress = "DisassociateAddress" - -// DisassociateAddressRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateAddress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateAddress for more information on using the DisassociateAddress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateAddressRequest method. -// req, resp := client.DisassociateAddressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddress -func (c *EC2) DisassociateAddressRequest(input *DisassociateAddressInput) (req *request.Request, output *DisassociateAddressOutput) { - op := &request.Operation{ - Name: opDisassociateAddress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateAddressInput{} - } - - output = &DisassociateAddressOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateAddress API operation for Amazon Elastic Compute Cloud. -// -// Disassociates an Elastic IP address from the instance or network interface -// it's associated with. -// -// An Elastic IP address is for use in either the EC2-Classic platform or in -// a VPC. For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// This is an idempotent operation. If you perform the operation more than once, -// Amazon EC2 doesn't return an error. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DisassociateAddress for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddress -func (c *EC2) DisassociateAddress(input *DisassociateAddressInput) (*DisassociateAddressOutput, error) { - req, out := c.DisassociateAddressRequest(input) - return out, req.Send() -} - -// DisassociateAddressWithContext is the same as DisassociateAddress with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateAddress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DisassociateAddressWithContext(ctx aws.Context, input *DisassociateAddressInput, opts ...request.Option) (*DisassociateAddressOutput, error) { - req, out := c.DisassociateAddressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateClientVpnTargetNetwork = "DisassociateClientVpnTargetNetwork" - -// DisassociateClientVpnTargetNetworkRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateClientVpnTargetNetwork operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateClientVpnTargetNetwork for more information on using the DisassociateClientVpnTargetNetwork -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateClientVpnTargetNetworkRequest method. -// req, resp := client.DisassociateClientVpnTargetNetworkRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateClientVpnTargetNetwork -func (c *EC2) DisassociateClientVpnTargetNetworkRequest(input *DisassociateClientVpnTargetNetworkInput) (req *request.Request, output *DisassociateClientVpnTargetNetworkOutput) { - op := &request.Operation{ - Name: opDisassociateClientVpnTargetNetwork, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateClientVpnTargetNetworkInput{} - } - - output = &DisassociateClientVpnTargetNetworkOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisassociateClientVpnTargetNetwork API operation for Amazon Elastic Compute Cloud. -// -// Disassociates a target network from the specified Client VPN endpoint. When -// you disassociate the last target network from a Client VPN, the following -// happens: -// -// * The route that was automatically added for the VPC is deleted -// -// * All active client connections are terminated -// -// * New client connections are disallowed -// -// * The Client VPN endpoint's status changes to pending-associate -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DisassociateClientVpnTargetNetwork for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateClientVpnTargetNetwork -func (c *EC2) DisassociateClientVpnTargetNetwork(input *DisassociateClientVpnTargetNetworkInput) (*DisassociateClientVpnTargetNetworkOutput, error) { - req, out := c.DisassociateClientVpnTargetNetworkRequest(input) - return out, req.Send() -} - -// DisassociateClientVpnTargetNetworkWithContext is the same as DisassociateClientVpnTargetNetwork with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateClientVpnTargetNetwork for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DisassociateClientVpnTargetNetworkWithContext(ctx aws.Context, input *DisassociateClientVpnTargetNetworkInput, opts ...request.Option) (*DisassociateClientVpnTargetNetworkOutput, error) { - req, out := c.DisassociateClientVpnTargetNetworkRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateIamInstanceProfile = "DisassociateIamInstanceProfile" - -// DisassociateIamInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateIamInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateIamInstanceProfile for more information on using the DisassociateIamInstanceProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateIamInstanceProfileRequest method. -// req, resp := client.DisassociateIamInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateIamInstanceProfile -func (c *EC2) DisassociateIamInstanceProfileRequest(input *DisassociateIamInstanceProfileInput) (req *request.Request, output *DisassociateIamInstanceProfileOutput) { - op := &request.Operation{ - Name: opDisassociateIamInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateIamInstanceProfileInput{} - } - - output = &DisassociateIamInstanceProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisassociateIamInstanceProfile API operation for Amazon Elastic Compute Cloud. -// -// Disassociates an IAM instance profile from a running or stopped instance. -// -// Use DescribeIamInstanceProfileAssociations to get the association ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DisassociateIamInstanceProfile for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateIamInstanceProfile -func (c *EC2) DisassociateIamInstanceProfile(input *DisassociateIamInstanceProfileInput) (*DisassociateIamInstanceProfileOutput, error) { - req, out := c.DisassociateIamInstanceProfileRequest(input) - return out, req.Send() -} - -// DisassociateIamInstanceProfileWithContext is the same as DisassociateIamInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateIamInstanceProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DisassociateIamInstanceProfileWithContext(ctx aws.Context, input *DisassociateIamInstanceProfileInput, opts ...request.Option) (*DisassociateIamInstanceProfileOutput, error) { - req, out := c.DisassociateIamInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateRouteTable = "DisassociateRouteTable" - -// DisassociateRouteTableRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateRouteTable operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateRouteTable for more information on using the DisassociateRouteTable -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateRouteTableRequest method. -// req, resp := client.DisassociateRouteTableRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTable -func (c *EC2) DisassociateRouteTableRequest(input *DisassociateRouteTableInput) (req *request.Request, output *DisassociateRouteTableOutput) { - op := &request.Operation{ - Name: opDisassociateRouteTable, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateRouteTableInput{} - } - - output = &DisassociateRouteTableOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateRouteTable API operation for Amazon Elastic Compute Cloud. -// -// Disassociates a subnet from a route table. -// -// After you perform this action, the subnet no longer uses the routes in the -// route table. Instead, it uses the routes in the VPC's main route table. For -// more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DisassociateRouteTable for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTable -func (c *EC2) DisassociateRouteTable(input *DisassociateRouteTableInput) (*DisassociateRouteTableOutput, error) { - req, out := c.DisassociateRouteTableRequest(input) - return out, req.Send() -} - -// DisassociateRouteTableWithContext is the same as DisassociateRouteTable with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateRouteTable for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DisassociateRouteTableWithContext(ctx aws.Context, input *DisassociateRouteTableInput, opts ...request.Option) (*DisassociateRouteTableOutput, error) { - req, out := c.DisassociateRouteTableRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateSubnetCidrBlock = "DisassociateSubnetCidrBlock" - -// DisassociateSubnetCidrBlockRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateSubnetCidrBlock operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateSubnetCidrBlock for more information on using the DisassociateSubnetCidrBlock -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateSubnetCidrBlockRequest method. -// req, resp := client.DisassociateSubnetCidrBlockRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateSubnetCidrBlock -func (c *EC2) DisassociateSubnetCidrBlockRequest(input *DisassociateSubnetCidrBlockInput) (req *request.Request, output *DisassociateSubnetCidrBlockOutput) { - op := &request.Operation{ - Name: opDisassociateSubnetCidrBlock, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateSubnetCidrBlockInput{} - } - - output = &DisassociateSubnetCidrBlockOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisassociateSubnetCidrBlock API operation for Amazon Elastic Compute Cloud. -// -// Disassociates a CIDR block from a subnet. Currently, you can disassociate -// an IPv6 CIDR block only. You must detach or delete all gateways and resources -// that are associated with the CIDR block before you can disassociate 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 Amazon Elastic Compute Cloud's -// API operation DisassociateSubnetCidrBlock for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateSubnetCidrBlock -func (c *EC2) DisassociateSubnetCidrBlock(input *DisassociateSubnetCidrBlockInput) (*DisassociateSubnetCidrBlockOutput, error) { - req, out := c.DisassociateSubnetCidrBlockRequest(input) - return out, req.Send() -} - -// DisassociateSubnetCidrBlockWithContext is the same as DisassociateSubnetCidrBlock with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateSubnetCidrBlock for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DisassociateSubnetCidrBlockWithContext(ctx aws.Context, input *DisassociateSubnetCidrBlockInput, opts ...request.Option) (*DisassociateSubnetCidrBlockOutput, error) { - req, out := c.DisassociateSubnetCidrBlockRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateTransitGatewayRouteTable = "DisassociateTransitGatewayRouteTable" - -// DisassociateTransitGatewayRouteTableRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateTransitGatewayRouteTable operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateTransitGatewayRouteTable for more information on using the DisassociateTransitGatewayRouteTable -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateTransitGatewayRouteTableRequest method. -// req, resp := client.DisassociateTransitGatewayRouteTableRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateTransitGatewayRouteTable -func (c *EC2) DisassociateTransitGatewayRouteTableRequest(input *DisassociateTransitGatewayRouteTableInput) (req *request.Request, output *DisassociateTransitGatewayRouteTableOutput) { - op := &request.Operation{ - Name: opDisassociateTransitGatewayRouteTable, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateTransitGatewayRouteTableInput{} - } - - output = &DisassociateTransitGatewayRouteTableOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisassociateTransitGatewayRouteTable API operation for Amazon Elastic Compute Cloud. -// -// Disassociates a resource attachment from a transit gateway route table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DisassociateTransitGatewayRouteTable for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateTransitGatewayRouteTable -func (c *EC2) DisassociateTransitGatewayRouteTable(input *DisassociateTransitGatewayRouteTableInput) (*DisassociateTransitGatewayRouteTableOutput, error) { - req, out := c.DisassociateTransitGatewayRouteTableRequest(input) - return out, req.Send() -} - -// DisassociateTransitGatewayRouteTableWithContext is the same as DisassociateTransitGatewayRouteTable with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateTransitGatewayRouteTable for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DisassociateTransitGatewayRouteTableWithContext(ctx aws.Context, input *DisassociateTransitGatewayRouteTableInput, opts ...request.Option) (*DisassociateTransitGatewayRouteTableOutput, error) { - req, out := c.DisassociateTransitGatewayRouteTableRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateVpcCidrBlock = "DisassociateVpcCidrBlock" - -// DisassociateVpcCidrBlockRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateVpcCidrBlock operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateVpcCidrBlock for more information on using the DisassociateVpcCidrBlock -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateVpcCidrBlockRequest method. -// req, resp := client.DisassociateVpcCidrBlockRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateVpcCidrBlock -func (c *EC2) DisassociateVpcCidrBlockRequest(input *DisassociateVpcCidrBlockInput) (req *request.Request, output *DisassociateVpcCidrBlockOutput) { - op := &request.Operation{ - Name: opDisassociateVpcCidrBlock, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateVpcCidrBlockInput{} - } - - output = &DisassociateVpcCidrBlockOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisassociateVpcCidrBlock API operation for Amazon Elastic Compute Cloud. -// -// Disassociates a CIDR block from a VPC. To disassociate the CIDR block, you -// must specify its association ID. You can get the association ID by using -// DescribeVpcs. You must detach or delete all gateways and resources that are -// associated with the CIDR block before you can disassociate it. -// -// You cannot disassociate the CIDR block with which you originally created -// the VPC (the primary CIDR block). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation DisassociateVpcCidrBlock for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateVpcCidrBlock -func (c *EC2) DisassociateVpcCidrBlock(input *DisassociateVpcCidrBlockInput) (*DisassociateVpcCidrBlockOutput, error) { - req, out := c.DisassociateVpcCidrBlockRequest(input) - return out, req.Send() -} - -// DisassociateVpcCidrBlockWithContext is the same as DisassociateVpcCidrBlock with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateVpcCidrBlock for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) DisassociateVpcCidrBlockWithContext(ctx aws.Context, input *DisassociateVpcCidrBlockInput, opts ...request.Option) (*DisassociateVpcCidrBlockOutput, error) { - req, out := c.DisassociateVpcCidrBlockRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableTransitGatewayRouteTablePropagation = "EnableTransitGatewayRouteTablePropagation" - -// EnableTransitGatewayRouteTablePropagationRequest generates a "aws/request.Request" representing the -// client's request for the EnableTransitGatewayRouteTablePropagation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableTransitGatewayRouteTablePropagation for more information on using the EnableTransitGatewayRouteTablePropagation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableTransitGatewayRouteTablePropagationRequest method. -// req, resp := client.EnableTransitGatewayRouteTablePropagationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableTransitGatewayRouteTablePropagation -func (c *EC2) EnableTransitGatewayRouteTablePropagationRequest(input *EnableTransitGatewayRouteTablePropagationInput) (req *request.Request, output *EnableTransitGatewayRouteTablePropagationOutput) { - op := &request.Operation{ - Name: opEnableTransitGatewayRouteTablePropagation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableTransitGatewayRouteTablePropagationInput{} - } - - output = &EnableTransitGatewayRouteTablePropagationOutput{} - req = c.newRequest(op, input, output) - return -} - -// EnableTransitGatewayRouteTablePropagation API operation for Amazon Elastic Compute Cloud. -// -// Enables the specified attachment to propagate routes to the specified propagation -// route table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation EnableTransitGatewayRouteTablePropagation for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableTransitGatewayRouteTablePropagation -func (c *EC2) EnableTransitGatewayRouteTablePropagation(input *EnableTransitGatewayRouteTablePropagationInput) (*EnableTransitGatewayRouteTablePropagationOutput, error) { - req, out := c.EnableTransitGatewayRouteTablePropagationRequest(input) - return out, req.Send() -} - -// EnableTransitGatewayRouteTablePropagationWithContext is the same as EnableTransitGatewayRouteTablePropagation with the addition of -// the ability to pass a context and additional request options. -// -// See EnableTransitGatewayRouteTablePropagation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) EnableTransitGatewayRouteTablePropagationWithContext(ctx aws.Context, input *EnableTransitGatewayRouteTablePropagationInput, opts ...request.Option) (*EnableTransitGatewayRouteTablePropagationOutput, error) { - req, out := c.EnableTransitGatewayRouteTablePropagationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableVgwRoutePropagation = "EnableVgwRoutePropagation" - -// EnableVgwRoutePropagationRequest generates a "aws/request.Request" representing the -// client's request for the EnableVgwRoutePropagation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableVgwRoutePropagation for more information on using the EnableVgwRoutePropagation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableVgwRoutePropagationRequest method. -// req, resp := client.EnableVgwRoutePropagationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagation -func (c *EC2) EnableVgwRoutePropagationRequest(input *EnableVgwRoutePropagationInput) (req *request.Request, output *EnableVgwRoutePropagationOutput) { - op := &request.Operation{ - Name: opEnableVgwRoutePropagation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableVgwRoutePropagationInput{} - } - - output = &EnableVgwRoutePropagationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableVgwRoutePropagation API operation for Amazon Elastic Compute Cloud. -// -// Enables a virtual private gateway (VGW) to propagate routes to the specified -// route table of a VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation EnableVgwRoutePropagation for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagation -func (c *EC2) EnableVgwRoutePropagation(input *EnableVgwRoutePropagationInput) (*EnableVgwRoutePropagationOutput, error) { - req, out := c.EnableVgwRoutePropagationRequest(input) - return out, req.Send() -} - -// EnableVgwRoutePropagationWithContext is the same as EnableVgwRoutePropagation with the addition of -// the ability to pass a context and additional request options. -// -// See EnableVgwRoutePropagation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) EnableVgwRoutePropagationWithContext(ctx aws.Context, input *EnableVgwRoutePropagationInput, opts ...request.Option) (*EnableVgwRoutePropagationOutput, error) { - req, out := c.EnableVgwRoutePropagationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableVolumeIO = "EnableVolumeIO" - -// EnableVolumeIORequest generates a "aws/request.Request" representing the -// client's request for the EnableVolumeIO operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableVolumeIO for more information on using the EnableVolumeIO -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableVolumeIORequest method. -// req, resp := client.EnableVolumeIORequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIO -func (c *EC2) EnableVolumeIORequest(input *EnableVolumeIOInput) (req *request.Request, output *EnableVolumeIOOutput) { - op := &request.Operation{ - Name: opEnableVolumeIO, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableVolumeIOInput{} - } - - output = &EnableVolumeIOOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableVolumeIO API operation for Amazon Elastic Compute Cloud. -// -// Enables I/O operations for a volume that had I/O operations disabled because -// the data on the volume was potentially inconsistent. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation EnableVolumeIO for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIO -func (c *EC2) EnableVolumeIO(input *EnableVolumeIOInput) (*EnableVolumeIOOutput, error) { - req, out := c.EnableVolumeIORequest(input) - return out, req.Send() -} - -// EnableVolumeIOWithContext is the same as EnableVolumeIO with the addition of -// the ability to pass a context and additional request options. -// -// See EnableVolumeIO for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) EnableVolumeIOWithContext(ctx aws.Context, input *EnableVolumeIOInput, opts ...request.Option) (*EnableVolumeIOOutput, error) { - req, out := c.EnableVolumeIORequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableVpcClassicLink = "EnableVpcClassicLink" - -// EnableVpcClassicLinkRequest generates a "aws/request.Request" representing the -// client's request for the EnableVpcClassicLink operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableVpcClassicLink for more information on using the EnableVpcClassicLink -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableVpcClassicLinkRequest method. -// req, resp := client.EnableVpcClassicLinkRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLink -func (c *EC2) EnableVpcClassicLinkRequest(input *EnableVpcClassicLinkInput) (req *request.Request, output *EnableVpcClassicLinkOutput) { - op := &request.Operation{ - Name: opEnableVpcClassicLink, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableVpcClassicLinkInput{} - } - - output = &EnableVpcClassicLinkOutput{} - req = c.newRequest(op, input, output) - return -} - -// EnableVpcClassicLink API operation for Amazon Elastic Compute Cloud. -// -// Enables a VPC for ClassicLink. You can then link EC2-Classic instances to -// your ClassicLink-enabled VPC to allow communication over private IP addresses. -// You cannot enable your VPC for ClassicLink if any of your VPC route tables -// have existing routes for address ranges within the 10.0.0.0/8 IP address -// range, excluding local routes for VPCs in the 10.0.0.0/16 and 10.1.0.0/16 -// IP address ranges. For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation EnableVpcClassicLink for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLink -func (c *EC2) EnableVpcClassicLink(input *EnableVpcClassicLinkInput) (*EnableVpcClassicLinkOutput, error) { - req, out := c.EnableVpcClassicLinkRequest(input) - return out, req.Send() -} - -// EnableVpcClassicLinkWithContext is the same as EnableVpcClassicLink with the addition of -// the ability to pass a context and additional request options. -// -// See EnableVpcClassicLink for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) EnableVpcClassicLinkWithContext(ctx aws.Context, input *EnableVpcClassicLinkInput, opts ...request.Option) (*EnableVpcClassicLinkOutput, error) { - req, out := c.EnableVpcClassicLinkRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableVpcClassicLinkDnsSupport = "EnableVpcClassicLinkDnsSupport" - -// EnableVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the -// client's request for the EnableVpcClassicLinkDnsSupport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableVpcClassicLinkDnsSupport for more information on using the EnableVpcClassicLinkDnsSupport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableVpcClassicLinkDnsSupportRequest method. -// req, resp := client.EnableVpcClassicLinkDnsSupportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkDnsSupport -func (c *EC2) EnableVpcClassicLinkDnsSupportRequest(input *EnableVpcClassicLinkDnsSupportInput) (req *request.Request, output *EnableVpcClassicLinkDnsSupportOutput) { - op := &request.Operation{ - Name: opEnableVpcClassicLinkDnsSupport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableVpcClassicLinkDnsSupportInput{} - } - - output = &EnableVpcClassicLinkDnsSupportOutput{} - req = c.newRequest(op, input, output) - return -} - -// EnableVpcClassicLinkDnsSupport API operation for Amazon Elastic Compute Cloud. -// -// Enables a VPC to support DNS hostname resolution for ClassicLink. If enabled, -// the DNS hostname of a linked EC2-Classic instance resolves to its private -// IP address when addressed from an instance in the VPC to which it's linked. -// Similarly, the DNS hostname of an instance in a VPC resolves to its private -// IP address when addressed from a linked EC2-Classic instance. For more information, -// see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation EnableVpcClassicLinkDnsSupport for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkDnsSupport -func (c *EC2) EnableVpcClassicLinkDnsSupport(input *EnableVpcClassicLinkDnsSupportInput) (*EnableVpcClassicLinkDnsSupportOutput, error) { - req, out := c.EnableVpcClassicLinkDnsSupportRequest(input) - return out, req.Send() -} - -// EnableVpcClassicLinkDnsSupportWithContext is the same as EnableVpcClassicLinkDnsSupport with the addition of -// the ability to pass a context and additional request options. -// -// See EnableVpcClassicLinkDnsSupport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) EnableVpcClassicLinkDnsSupportWithContext(ctx aws.Context, input *EnableVpcClassicLinkDnsSupportInput, opts ...request.Option) (*EnableVpcClassicLinkDnsSupportOutput, error) { - req, out := c.EnableVpcClassicLinkDnsSupportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opExportClientVpnClientCertificateRevocationList = "ExportClientVpnClientCertificateRevocationList" - -// ExportClientVpnClientCertificateRevocationListRequest generates a "aws/request.Request" representing the -// client's request for the ExportClientVpnClientCertificateRevocationList operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ExportClientVpnClientCertificateRevocationList for more information on using the ExportClientVpnClientCertificateRevocationList -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ExportClientVpnClientCertificateRevocationListRequest method. -// req, resp := client.ExportClientVpnClientCertificateRevocationListRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportClientVpnClientCertificateRevocationList -func (c *EC2) ExportClientVpnClientCertificateRevocationListRequest(input *ExportClientVpnClientCertificateRevocationListInput) (req *request.Request, output *ExportClientVpnClientCertificateRevocationListOutput) { - op := &request.Operation{ - Name: opExportClientVpnClientCertificateRevocationList, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ExportClientVpnClientCertificateRevocationListInput{} - } - - output = &ExportClientVpnClientCertificateRevocationListOutput{} - req = c.newRequest(op, input, output) - return -} - -// ExportClientVpnClientCertificateRevocationList API operation for Amazon Elastic Compute Cloud. -// -// Downloads the client certificate revocation list for the specified Client -// VPN endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ExportClientVpnClientCertificateRevocationList for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportClientVpnClientCertificateRevocationList -func (c *EC2) ExportClientVpnClientCertificateRevocationList(input *ExportClientVpnClientCertificateRevocationListInput) (*ExportClientVpnClientCertificateRevocationListOutput, error) { - req, out := c.ExportClientVpnClientCertificateRevocationListRequest(input) - return out, req.Send() -} - -// ExportClientVpnClientCertificateRevocationListWithContext is the same as ExportClientVpnClientCertificateRevocationList with the addition of -// the ability to pass a context and additional request options. -// -// See ExportClientVpnClientCertificateRevocationList for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ExportClientVpnClientCertificateRevocationListWithContext(ctx aws.Context, input *ExportClientVpnClientCertificateRevocationListInput, opts ...request.Option) (*ExportClientVpnClientCertificateRevocationListOutput, error) { - req, out := c.ExportClientVpnClientCertificateRevocationListRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opExportClientVpnClientConfiguration = "ExportClientVpnClientConfiguration" - -// ExportClientVpnClientConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the ExportClientVpnClientConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ExportClientVpnClientConfiguration for more information on using the ExportClientVpnClientConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ExportClientVpnClientConfigurationRequest method. -// req, resp := client.ExportClientVpnClientConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportClientVpnClientConfiguration -func (c *EC2) ExportClientVpnClientConfigurationRequest(input *ExportClientVpnClientConfigurationInput) (req *request.Request, output *ExportClientVpnClientConfigurationOutput) { - op := &request.Operation{ - Name: opExportClientVpnClientConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ExportClientVpnClientConfigurationInput{} - } - - output = &ExportClientVpnClientConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// ExportClientVpnClientConfiguration API operation for Amazon Elastic Compute Cloud. -// -// Downloads the contents of the Client VPN endpoint configuration file for -// the specified Client VPN endpoint. The Client VPN endpoint configuration -// file includes the Client VPN endpoint and certificate information clients -// need to establish a connection with the Client VPN endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ExportClientVpnClientConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportClientVpnClientConfiguration -func (c *EC2) ExportClientVpnClientConfiguration(input *ExportClientVpnClientConfigurationInput) (*ExportClientVpnClientConfigurationOutput, error) { - req, out := c.ExportClientVpnClientConfigurationRequest(input) - return out, req.Send() -} - -// ExportClientVpnClientConfigurationWithContext is the same as ExportClientVpnClientConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See ExportClientVpnClientConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ExportClientVpnClientConfigurationWithContext(ctx aws.Context, input *ExportClientVpnClientConfigurationInput, opts ...request.Option) (*ExportClientVpnClientConfigurationOutput, error) { - req, out := c.ExportClientVpnClientConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opExportTransitGatewayRoutes = "ExportTransitGatewayRoutes" - -// ExportTransitGatewayRoutesRequest generates a "aws/request.Request" representing the -// client's request for the ExportTransitGatewayRoutes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ExportTransitGatewayRoutes for more information on using the ExportTransitGatewayRoutes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ExportTransitGatewayRoutesRequest method. -// req, resp := client.ExportTransitGatewayRoutesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportTransitGatewayRoutes -func (c *EC2) ExportTransitGatewayRoutesRequest(input *ExportTransitGatewayRoutesInput) (req *request.Request, output *ExportTransitGatewayRoutesOutput) { - op := &request.Operation{ - Name: opExportTransitGatewayRoutes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ExportTransitGatewayRoutesInput{} - } - - output = &ExportTransitGatewayRoutesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ExportTransitGatewayRoutes API operation for Amazon Elastic Compute Cloud. -// -// Exports routes from the specified transit gateway route table to the specified -// S3 bucket. By default, all routes are exported. Alternatively, you can filter -// by CIDR range. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ExportTransitGatewayRoutes for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportTransitGatewayRoutes -func (c *EC2) ExportTransitGatewayRoutes(input *ExportTransitGatewayRoutesInput) (*ExportTransitGatewayRoutesOutput, error) { - req, out := c.ExportTransitGatewayRoutesRequest(input) - return out, req.Send() -} - -// ExportTransitGatewayRoutesWithContext is the same as ExportTransitGatewayRoutes with the addition of -// the ability to pass a context and additional request options. -// -// See ExportTransitGatewayRoutes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ExportTransitGatewayRoutesWithContext(ctx aws.Context, input *ExportTransitGatewayRoutesInput, opts ...request.Option) (*ExportTransitGatewayRoutesOutput, error) { - req, out := c.ExportTransitGatewayRoutesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetConsoleOutput = "GetConsoleOutput" - -// GetConsoleOutputRequest generates a "aws/request.Request" representing the -// client's request for the GetConsoleOutput operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetConsoleOutput for more information on using the GetConsoleOutput -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetConsoleOutputRequest method. -// req, resp := client.GetConsoleOutputRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutput -func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *request.Request, output *GetConsoleOutputOutput) { - op := &request.Operation{ - Name: opGetConsoleOutput, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetConsoleOutputInput{} - } - - output = &GetConsoleOutputOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetConsoleOutput API operation for Amazon Elastic Compute Cloud. -// -// Gets the console output for the specified instance. For Linux instances, -// the instance console output displays the exact console output that would -// normally be displayed on a physical monitor attached to a computer. For Windows -// instances, the instance console output includes the last three system event -// log errors. -// -// By default, the console output returns buffered information that was posted -// shortly after an instance transition state (start, stop, reboot, or terminate). -// This information is available for at least one hour after the most recent -// post. Only the most recent 64 KB of console output is available. -// -// You can optionally retrieve the latest serial console output at any time -// during the instance lifecycle. This option is supported on instance types -// that use the Nitro hypervisor. -// -// For more information, see Instance Console Output (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html#instance-console-console-output) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation GetConsoleOutput for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutput -func (c *EC2) GetConsoleOutput(input *GetConsoleOutputInput) (*GetConsoleOutputOutput, error) { - req, out := c.GetConsoleOutputRequest(input) - return out, req.Send() -} - -// GetConsoleOutputWithContext is the same as GetConsoleOutput with the addition of -// the ability to pass a context and additional request options. -// -// See GetConsoleOutput for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) GetConsoleOutputWithContext(ctx aws.Context, input *GetConsoleOutputInput, opts ...request.Option) (*GetConsoleOutputOutput, error) { - req, out := c.GetConsoleOutputRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetConsoleScreenshot = "GetConsoleScreenshot" - -// GetConsoleScreenshotRequest generates a "aws/request.Request" representing the -// client's request for the GetConsoleScreenshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetConsoleScreenshot for more information on using the GetConsoleScreenshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetConsoleScreenshotRequest method. -// req, resp := client.GetConsoleScreenshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleScreenshot -func (c *EC2) GetConsoleScreenshotRequest(input *GetConsoleScreenshotInput) (req *request.Request, output *GetConsoleScreenshotOutput) { - op := &request.Operation{ - Name: opGetConsoleScreenshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetConsoleScreenshotInput{} - } - - output = &GetConsoleScreenshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetConsoleScreenshot API operation for Amazon Elastic Compute Cloud. -// -// Retrieve a JPG-format screenshot of a running instance to help with troubleshooting. -// -// The returned content is Base64-encoded. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation GetConsoleScreenshot for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleScreenshot -func (c *EC2) GetConsoleScreenshot(input *GetConsoleScreenshotInput) (*GetConsoleScreenshotOutput, error) { - req, out := c.GetConsoleScreenshotRequest(input) - return out, req.Send() -} - -// GetConsoleScreenshotWithContext is the same as GetConsoleScreenshot with the addition of -// the ability to pass a context and additional request options. -// -// See GetConsoleScreenshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) GetConsoleScreenshotWithContext(ctx aws.Context, input *GetConsoleScreenshotInput, opts ...request.Option) (*GetConsoleScreenshotOutput, error) { - req, out := c.GetConsoleScreenshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetHostReservationPurchasePreview = "GetHostReservationPurchasePreview" - -// GetHostReservationPurchasePreviewRequest generates a "aws/request.Request" representing the -// client's request for the GetHostReservationPurchasePreview operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetHostReservationPurchasePreview for more information on using the GetHostReservationPurchasePreview -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetHostReservationPurchasePreviewRequest method. -// req, resp := client.GetHostReservationPurchasePreviewRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetHostReservationPurchasePreview -func (c *EC2) GetHostReservationPurchasePreviewRequest(input *GetHostReservationPurchasePreviewInput) (req *request.Request, output *GetHostReservationPurchasePreviewOutput) { - op := &request.Operation{ - Name: opGetHostReservationPurchasePreview, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetHostReservationPurchasePreviewInput{} - } - - output = &GetHostReservationPurchasePreviewOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetHostReservationPurchasePreview API operation for Amazon Elastic Compute Cloud. -// -// Preview a reservation purchase with configurations that match those of your -// Dedicated Host. You must have active Dedicated Hosts in your account before -// you purchase a reservation. -// -// This is a preview of the PurchaseHostReservation action and does not result -// in the offering being purchased. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation GetHostReservationPurchasePreview for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetHostReservationPurchasePreview -func (c *EC2) GetHostReservationPurchasePreview(input *GetHostReservationPurchasePreviewInput) (*GetHostReservationPurchasePreviewOutput, error) { - req, out := c.GetHostReservationPurchasePreviewRequest(input) - return out, req.Send() -} - -// GetHostReservationPurchasePreviewWithContext is the same as GetHostReservationPurchasePreview with the addition of -// the ability to pass a context and additional request options. -// -// See GetHostReservationPurchasePreview for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) GetHostReservationPurchasePreviewWithContext(ctx aws.Context, input *GetHostReservationPurchasePreviewInput, opts ...request.Option) (*GetHostReservationPurchasePreviewOutput, error) { - req, out := c.GetHostReservationPurchasePreviewRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLaunchTemplateData = "GetLaunchTemplateData" - -// GetLaunchTemplateDataRequest generates a "aws/request.Request" representing the -// client's request for the GetLaunchTemplateData operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLaunchTemplateData for more information on using the GetLaunchTemplateData -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLaunchTemplateDataRequest method. -// req, resp := client.GetLaunchTemplateDataRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetLaunchTemplateData -func (c *EC2) GetLaunchTemplateDataRequest(input *GetLaunchTemplateDataInput) (req *request.Request, output *GetLaunchTemplateDataOutput) { - op := &request.Operation{ - Name: opGetLaunchTemplateData, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetLaunchTemplateDataInput{} - } - - output = &GetLaunchTemplateDataOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLaunchTemplateData API operation for Amazon Elastic Compute Cloud. -// -// Retrieves the configuration data of the specified instance. You can use this -// data to create a launch template. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation GetLaunchTemplateData for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetLaunchTemplateData -func (c *EC2) GetLaunchTemplateData(input *GetLaunchTemplateDataInput) (*GetLaunchTemplateDataOutput, error) { - req, out := c.GetLaunchTemplateDataRequest(input) - return out, req.Send() -} - -// GetLaunchTemplateDataWithContext is the same as GetLaunchTemplateData with the addition of -// the ability to pass a context and additional request options. -// -// See GetLaunchTemplateData for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) GetLaunchTemplateDataWithContext(ctx aws.Context, input *GetLaunchTemplateDataInput, opts ...request.Option) (*GetLaunchTemplateDataOutput, error) { - req, out := c.GetLaunchTemplateDataRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPasswordData = "GetPasswordData" - -// GetPasswordDataRequest generates a "aws/request.Request" representing the -// client's request for the GetPasswordData operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPasswordData for more information on using the GetPasswordData -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPasswordDataRequest method. -// req, resp := client.GetPasswordDataRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordData -func (c *EC2) GetPasswordDataRequest(input *GetPasswordDataInput) (req *request.Request, output *GetPasswordDataOutput) { - op := &request.Operation{ - Name: opGetPasswordData, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPasswordDataInput{} - } - - output = &GetPasswordDataOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPasswordData API operation for Amazon Elastic Compute Cloud. -// -// Retrieves the encrypted administrator password for a running Windows instance. -// -// The Windows password is generated at boot by the EC2Config service or EC2Launch -// scripts (Windows Server 2016 and later). This usually only happens the first -// time an instance is launched. For more information, see EC2Config (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/UsingConfig_WinAMI.html) -// and EC2Launch (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2launch.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// For the EC2Config service, the password is not generated for rebundled AMIs -// unless Ec2SetPassword is enabled before bundling. -// -// The password is encrypted using the key pair that you specified when you -// launched the instance. You must provide the corresponding key pair file. -// -// When you launch an instance, password generation and encryption may take -// a few minutes. If you try to retrieve the password before it's available, -// the output returns an empty string. We recommend that you wait up to 15 minutes -// after launching an instance before trying to retrieve the generated password. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation GetPasswordData for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordData -func (c *EC2) GetPasswordData(input *GetPasswordDataInput) (*GetPasswordDataOutput, error) { - req, out := c.GetPasswordDataRequest(input) - return out, req.Send() -} - -// GetPasswordDataWithContext is the same as GetPasswordData with the addition of -// the ability to pass a context and additional request options. -// -// See GetPasswordData for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) GetPasswordDataWithContext(ctx aws.Context, input *GetPasswordDataInput, opts ...request.Option) (*GetPasswordDataOutput, error) { - req, out := c.GetPasswordDataRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetReservedInstancesExchangeQuote = "GetReservedInstancesExchangeQuote" - -// GetReservedInstancesExchangeQuoteRequest generates a "aws/request.Request" representing the -// client's request for the GetReservedInstancesExchangeQuote operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetReservedInstancesExchangeQuote for more information on using the GetReservedInstancesExchangeQuote -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetReservedInstancesExchangeQuoteRequest method. -// req, resp := client.GetReservedInstancesExchangeQuoteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetReservedInstancesExchangeQuote -func (c *EC2) GetReservedInstancesExchangeQuoteRequest(input *GetReservedInstancesExchangeQuoteInput) (req *request.Request, output *GetReservedInstancesExchangeQuoteOutput) { - op := &request.Operation{ - Name: opGetReservedInstancesExchangeQuote, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetReservedInstancesExchangeQuoteInput{} - } - - output = &GetReservedInstancesExchangeQuoteOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetReservedInstancesExchangeQuote API operation for Amazon Elastic Compute Cloud. -// -// Returns a quote and exchange information for exchanging one or more specified -// Convertible Reserved Instances for a new Convertible Reserved Instance. If -// the exchange cannot be performed, the reason is returned in the response. -// Use AcceptReservedInstancesExchangeQuote to perform the exchange. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation GetReservedInstancesExchangeQuote for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetReservedInstancesExchangeQuote -func (c *EC2) GetReservedInstancesExchangeQuote(input *GetReservedInstancesExchangeQuoteInput) (*GetReservedInstancesExchangeQuoteOutput, error) { - req, out := c.GetReservedInstancesExchangeQuoteRequest(input) - return out, req.Send() -} - -// GetReservedInstancesExchangeQuoteWithContext is the same as GetReservedInstancesExchangeQuote with the addition of -// the ability to pass a context and additional request options. -// -// See GetReservedInstancesExchangeQuote for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) GetReservedInstancesExchangeQuoteWithContext(ctx aws.Context, input *GetReservedInstancesExchangeQuoteInput, opts ...request.Option) (*GetReservedInstancesExchangeQuoteOutput, error) { - req, out := c.GetReservedInstancesExchangeQuoteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTransitGatewayAttachmentPropagations = "GetTransitGatewayAttachmentPropagations" - -// GetTransitGatewayAttachmentPropagationsRequest generates a "aws/request.Request" representing the -// client's request for the GetTransitGatewayAttachmentPropagations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTransitGatewayAttachmentPropagations for more information on using the GetTransitGatewayAttachmentPropagations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTransitGatewayAttachmentPropagationsRequest method. -// req, resp := client.GetTransitGatewayAttachmentPropagationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetTransitGatewayAttachmentPropagations -func (c *EC2) GetTransitGatewayAttachmentPropagationsRequest(input *GetTransitGatewayAttachmentPropagationsInput) (req *request.Request, output *GetTransitGatewayAttachmentPropagationsOutput) { - op := &request.Operation{ - Name: opGetTransitGatewayAttachmentPropagations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTransitGatewayAttachmentPropagationsInput{} - } - - output = &GetTransitGatewayAttachmentPropagationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTransitGatewayAttachmentPropagations API operation for Amazon Elastic Compute Cloud. -// -// Lists the route tables to which the specified resource attachment propagates -// routes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation GetTransitGatewayAttachmentPropagations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetTransitGatewayAttachmentPropagations -func (c *EC2) GetTransitGatewayAttachmentPropagations(input *GetTransitGatewayAttachmentPropagationsInput) (*GetTransitGatewayAttachmentPropagationsOutput, error) { - req, out := c.GetTransitGatewayAttachmentPropagationsRequest(input) - return out, req.Send() -} - -// GetTransitGatewayAttachmentPropagationsWithContext is the same as GetTransitGatewayAttachmentPropagations with the addition of -// the ability to pass a context and additional request options. -// -// See GetTransitGatewayAttachmentPropagations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) GetTransitGatewayAttachmentPropagationsWithContext(ctx aws.Context, input *GetTransitGatewayAttachmentPropagationsInput, opts ...request.Option) (*GetTransitGatewayAttachmentPropagationsOutput, error) { - req, out := c.GetTransitGatewayAttachmentPropagationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTransitGatewayRouteTableAssociations = "GetTransitGatewayRouteTableAssociations" - -// GetTransitGatewayRouteTableAssociationsRequest generates a "aws/request.Request" representing the -// client's request for the GetTransitGatewayRouteTableAssociations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTransitGatewayRouteTableAssociations for more information on using the GetTransitGatewayRouteTableAssociations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTransitGatewayRouteTableAssociationsRequest method. -// req, resp := client.GetTransitGatewayRouteTableAssociationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetTransitGatewayRouteTableAssociations -func (c *EC2) GetTransitGatewayRouteTableAssociationsRequest(input *GetTransitGatewayRouteTableAssociationsInput) (req *request.Request, output *GetTransitGatewayRouteTableAssociationsOutput) { - op := &request.Operation{ - Name: opGetTransitGatewayRouteTableAssociations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTransitGatewayRouteTableAssociationsInput{} - } - - output = &GetTransitGatewayRouteTableAssociationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTransitGatewayRouteTableAssociations API operation for Amazon Elastic Compute Cloud. -// -// Gets information about the associations for the specified transit gateway -// route table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation GetTransitGatewayRouteTableAssociations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetTransitGatewayRouteTableAssociations -func (c *EC2) GetTransitGatewayRouteTableAssociations(input *GetTransitGatewayRouteTableAssociationsInput) (*GetTransitGatewayRouteTableAssociationsOutput, error) { - req, out := c.GetTransitGatewayRouteTableAssociationsRequest(input) - return out, req.Send() -} - -// GetTransitGatewayRouteTableAssociationsWithContext is the same as GetTransitGatewayRouteTableAssociations with the addition of -// the ability to pass a context and additional request options. -// -// See GetTransitGatewayRouteTableAssociations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) GetTransitGatewayRouteTableAssociationsWithContext(ctx aws.Context, input *GetTransitGatewayRouteTableAssociationsInput, opts ...request.Option) (*GetTransitGatewayRouteTableAssociationsOutput, error) { - req, out := c.GetTransitGatewayRouteTableAssociationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTransitGatewayRouteTablePropagations = "GetTransitGatewayRouteTablePropagations" - -// GetTransitGatewayRouteTablePropagationsRequest generates a "aws/request.Request" representing the -// client's request for the GetTransitGatewayRouteTablePropagations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTransitGatewayRouteTablePropagations for more information on using the GetTransitGatewayRouteTablePropagations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTransitGatewayRouteTablePropagationsRequest method. -// req, resp := client.GetTransitGatewayRouteTablePropagationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetTransitGatewayRouteTablePropagations -func (c *EC2) GetTransitGatewayRouteTablePropagationsRequest(input *GetTransitGatewayRouteTablePropagationsInput) (req *request.Request, output *GetTransitGatewayRouteTablePropagationsOutput) { - op := &request.Operation{ - Name: opGetTransitGatewayRouteTablePropagations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTransitGatewayRouteTablePropagationsInput{} - } - - output = &GetTransitGatewayRouteTablePropagationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTransitGatewayRouteTablePropagations API operation for Amazon Elastic Compute Cloud. -// -// Gets information about the route table propagations for the specified transit -// gateway route table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation GetTransitGatewayRouteTablePropagations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetTransitGatewayRouteTablePropagations -func (c *EC2) GetTransitGatewayRouteTablePropagations(input *GetTransitGatewayRouteTablePropagationsInput) (*GetTransitGatewayRouteTablePropagationsOutput, error) { - req, out := c.GetTransitGatewayRouteTablePropagationsRequest(input) - return out, req.Send() -} - -// GetTransitGatewayRouteTablePropagationsWithContext is the same as GetTransitGatewayRouteTablePropagations with the addition of -// the ability to pass a context and additional request options. -// -// See GetTransitGatewayRouteTablePropagations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) GetTransitGatewayRouteTablePropagationsWithContext(ctx aws.Context, input *GetTransitGatewayRouteTablePropagationsInput, opts ...request.Option) (*GetTransitGatewayRouteTablePropagationsOutput, error) { - req, out := c.GetTransitGatewayRouteTablePropagationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportClientVpnClientCertificateRevocationList = "ImportClientVpnClientCertificateRevocationList" - -// ImportClientVpnClientCertificateRevocationListRequest generates a "aws/request.Request" representing the -// client's request for the ImportClientVpnClientCertificateRevocationList operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportClientVpnClientCertificateRevocationList for more information on using the ImportClientVpnClientCertificateRevocationList -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportClientVpnClientCertificateRevocationListRequest method. -// req, resp := client.ImportClientVpnClientCertificateRevocationListRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportClientVpnClientCertificateRevocationList -func (c *EC2) ImportClientVpnClientCertificateRevocationListRequest(input *ImportClientVpnClientCertificateRevocationListInput) (req *request.Request, output *ImportClientVpnClientCertificateRevocationListOutput) { - op := &request.Operation{ - Name: opImportClientVpnClientCertificateRevocationList, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportClientVpnClientCertificateRevocationListInput{} - } - - output = &ImportClientVpnClientCertificateRevocationListOutput{} - req = c.newRequest(op, input, output) - return -} - -// ImportClientVpnClientCertificateRevocationList API operation for Amazon Elastic Compute Cloud. -// -// Uploads a client certificate revocation list to the specified Client VPN -// endpoint. Uploading a client certificate revocation list overwrites the existing -// client certificate revocation list. -// -// Uploading a client certificate revocation list resets existing client connections. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ImportClientVpnClientCertificateRevocationList for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportClientVpnClientCertificateRevocationList -func (c *EC2) ImportClientVpnClientCertificateRevocationList(input *ImportClientVpnClientCertificateRevocationListInput) (*ImportClientVpnClientCertificateRevocationListOutput, error) { - req, out := c.ImportClientVpnClientCertificateRevocationListRequest(input) - return out, req.Send() -} - -// ImportClientVpnClientCertificateRevocationListWithContext is the same as ImportClientVpnClientCertificateRevocationList with the addition of -// the ability to pass a context and additional request options. -// -// See ImportClientVpnClientCertificateRevocationList for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ImportClientVpnClientCertificateRevocationListWithContext(ctx aws.Context, input *ImportClientVpnClientCertificateRevocationListInput, opts ...request.Option) (*ImportClientVpnClientCertificateRevocationListOutput, error) { - req, out := c.ImportClientVpnClientCertificateRevocationListRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportImage = "ImportImage" - -// ImportImageRequest generates a "aws/request.Request" representing the -// client's request for the ImportImage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportImage for more information on using the ImportImage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportImageRequest method. -// req, resp := client.ImportImageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImage -func (c *EC2) ImportImageRequest(input *ImportImageInput) (req *request.Request, output *ImportImageOutput) { - op := &request.Operation{ - Name: opImportImage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportImageInput{} - } - - output = &ImportImageOutput{} - req = c.newRequest(op, input, output) - return -} - -// ImportImage API operation for Amazon Elastic Compute Cloud. -// -// Import single or multi-volume disk images or EBS snapshots into an Amazon -// Machine Image (AMI). For more information, see Importing a VM as an Image -// Using VM Import/Export (http://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html) -// in the VM Import/Export User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ImportImage for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImage -func (c *EC2) ImportImage(input *ImportImageInput) (*ImportImageOutput, error) { - req, out := c.ImportImageRequest(input) - return out, req.Send() -} - -// ImportImageWithContext is the same as ImportImage with the addition of -// the ability to pass a context and additional request options. -// -// See ImportImage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ImportImageWithContext(ctx aws.Context, input *ImportImageInput, opts ...request.Option) (*ImportImageOutput, error) { - req, out := c.ImportImageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportInstance = "ImportInstance" - -// ImportInstanceRequest generates a "aws/request.Request" representing the -// client's request for the ImportInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportInstance for more information on using the ImportInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportInstanceRequest method. -// req, resp := client.ImportInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstance -func (c *EC2) ImportInstanceRequest(input *ImportInstanceInput) (req *request.Request, output *ImportInstanceOutput) { - op := &request.Operation{ - Name: opImportInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportInstanceInput{} - } - - output = &ImportInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ImportInstance API operation for Amazon Elastic Compute Cloud. -// -// Creates an import instance task using metadata from the specified disk image. -// ImportInstance only supports single-volume VMs. To import multi-volume VMs, -// use ImportImage. For more information, see Importing a Virtual Machine Using -// the Amazon EC2 CLI (http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-vmimport-export.html). -// -// For information about the import manifest referenced by this API action, -// see VM Import Manifest (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ImportInstance for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstance -func (c *EC2) ImportInstance(input *ImportInstanceInput) (*ImportInstanceOutput, error) { - req, out := c.ImportInstanceRequest(input) - return out, req.Send() -} - -// ImportInstanceWithContext is the same as ImportInstance with the addition of -// the ability to pass a context and additional request options. -// -// See ImportInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ImportInstanceWithContext(ctx aws.Context, input *ImportInstanceInput, opts ...request.Option) (*ImportInstanceOutput, error) { - req, out := c.ImportInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportKeyPair = "ImportKeyPair" - -// ImportKeyPairRequest generates a "aws/request.Request" representing the -// client's request for the ImportKeyPair operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportKeyPair for more information on using the ImportKeyPair -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportKeyPairRequest method. -// req, resp := client.ImportKeyPairRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPair -func (c *EC2) ImportKeyPairRequest(input *ImportKeyPairInput) (req *request.Request, output *ImportKeyPairOutput) { - op := &request.Operation{ - Name: opImportKeyPair, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportKeyPairInput{} - } - - output = &ImportKeyPairOutput{} - req = c.newRequest(op, input, output) - return -} - -// ImportKeyPair API operation for Amazon Elastic Compute Cloud. -// -// Imports the public key from an RSA key pair that you created with a third-party -// tool. Compare this with CreateKeyPair, in which AWS creates the key pair -// and gives the keys to you (AWS keeps a copy of the public key). With ImportKeyPair, -// you create the key pair and give AWS just the public key. The private key -// is never transferred between you and AWS. -// -// For more information about key pairs, see Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ImportKeyPair for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPair -func (c *EC2) ImportKeyPair(input *ImportKeyPairInput) (*ImportKeyPairOutput, error) { - req, out := c.ImportKeyPairRequest(input) - return out, req.Send() -} - -// ImportKeyPairWithContext is the same as ImportKeyPair with the addition of -// the ability to pass a context and additional request options. -// -// See ImportKeyPair for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ImportKeyPairWithContext(ctx aws.Context, input *ImportKeyPairInput, opts ...request.Option) (*ImportKeyPairOutput, error) { - req, out := c.ImportKeyPairRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportSnapshot = "ImportSnapshot" - -// ImportSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the ImportSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportSnapshot for more information on using the ImportSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportSnapshotRequest method. -// req, resp := client.ImportSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshot -func (c *EC2) ImportSnapshotRequest(input *ImportSnapshotInput) (req *request.Request, output *ImportSnapshotOutput) { - op := &request.Operation{ - Name: opImportSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportSnapshotInput{} - } - - output = &ImportSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// ImportSnapshot API operation for Amazon Elastic Compute Cloud. -// -// Imports a disk into an EBS snapshot. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ImportSnapshot for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshot -func (c *EC2) ImportSnapshot(input *ImportSnapshotInput) (*ImportSnapshotOutput, error) { - req, out := c.ImportSnapshotRequest(input) - return out, req.Send() -} - -// ImportSnapshotWithContext is the same as ImportSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See ImportSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ImportSnapshotWithContext(ctx aws.Context, input *ImportSnapshotInput, opts ...request.Option) (*ImportSnapshotOutput, error) { - req, out := c.ImportSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportVolume = "ImportVolume" - -// ImportVolumeRequest generates a "aws/request.Request" representing the -// client's request for the ImportVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportVolume for more information on using the ImportVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportVolumeRequest method. -// req, resp := client.ImportVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolume -func (c *EC2) ImportVolumeRequest(input *ImportVolumeInput) (req *request.Request, output *ImportVolumeOutput) { - op := &request.Operation{ - Name: opImportVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportVolumeInput{} - } - - output = &ImportVolumeOutput{} - req = c.newRequest(op, input, output) - return -} - -// ImportVolume API operation for Amazon Elastic Compute Cloud. -// -// Creates an import volume task using metadata from the specified disk image.For -// more information, see Importing Disks to Amazon EBS (http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/importing-your-volumes-into-amazon-ebs.html). -// -// For information about the import manifest referenced by this API action, -// see VM Import Manifest (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ImportVolume for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolume -func (c *EC2) ImportVolume(input *ImportVolumeInput) (*ImportVolumeOutput, error) { - req, out := c.ImportVolumeRequest(input) - return out, req.Send() -} - -// ImportVolumeWithContext is the same as ImportVolume with the addition of -// the ability to pass a context and additional request options. -// -// See ImportVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ImportVolumeWithContext(ctx aws.Context, input *ImportVolumeInput, opts ...request.Option) (*ImportVolumeOutput, error) { - req, out := c.ImportVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyCapacityReservation = "ModifyCapacityReservation" - -// ModifyCapacityReservationRequest generates a "aws/request.Request" representing the -// client's request for the ModifyCapacityReservation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyCapacityReservation for more information on using the ModifyCapacityReservation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyCapacityReservationRequest method. -// req, resp := client.ModifyCapacityReservationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyCapacityReservation -func (c *EC2) ModifyCapacityReservationRequest(input *ModifyCapacityReservationInput) (req *request.Request, output *ModifyCapacityReservationOutput) { - op := &request.Operation{ - Name: opModifyCapacityReservation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyCapacityReservationInput{} - } - - output = &ModifyCapacityReservationOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyCapacityReservation API operation for Amazon Elastic Compute Cloud. -// -// Modifies a Capacity Reservation's capacity and the conditions under which -// it is to be released. You cannot change a Capacity Reservation's instance -// type, EBS optimization, instance store settings, platform, Availability Zone, -// or instance eligibility. If you need to modify any of these attributes, we -// recommend that you cancel the Capacity Reservation, and then create a new -// one with the required attributes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyCapacityReservation for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyCapacityReservation -func (c *EC2) ModifyCapacityReservation(input *ModifyCapacityReservationInput) (*ModifyCapacityReservationOutput, error) { - req, out := c.ModifyCapacityReservationRequest(input) - return out, req.Send() -} - -// ModifyCapacityReservationWithContext is the same as ModifyCapacityReservation with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyCapacityReservation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyCapacityReservationWithContext(ctx aws.Context, input *ModifyCapacityReservationInput, opts ...request.Option) (*ModifyCapacityReservationOutput, error) { - req, out := c.ModifyCapacityReservationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyClientVpnEndpoint = "ModifyClientVpnEndpoint" - -// ModifyClientVpnEndpointRequest generates a "aws/request.Request" representing the -// client's request for the ModifyClientVpnEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyClientVpnEndpoint for more information on using the ModifyClientVpnEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyClientVpnEndpointRequest method. -// req, resp := client.ModifyClientVpnEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyClientVpnEndpoint -func (c *EC2) ModifyClientVpnEndpointRequest(input *ModifyClientVpnEndpointInput) (req *request.Request, output *ModifyClientVpnEndpointOutput) { - op := &request.Operation{ - Name: opModifyClientVpnEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyClientVpnEndpointInput{} - } - - output = &ModifyClientVpnEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyClientVpnEndpoint API operation for Amazon Elastic Compute Cloud. -// -// Modifies the specified Client VPN endpoint. You can only modify an endpoint's -// server certificate information, client connection logging information, DNS -// server, and description. Modifying the DNS server resets existing client -// connections. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyClientVpnEndpoint for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyClientVpnEndpoint -func (c *EC2) ModifyClientVpnEndpoint(input *ModifyClientVpnEndpointInput) (*ModifyClientVpnEndpointOutput, error) { - req, out := c.ModifyClientVpnEndpointRequest(input) - return out, req.Send() -} - -// ModifyClientVpnEndpointWithContext is the same as ModifyClientVpnEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyClientVpnEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyClientVpnEndpointWithContext(ctx aws.Context, input *ModifyClientVpnEndpointInput, opts ...request.Option) (*ModifyClientVpnEndpointOutput, error) { - req, out := c.ModifyClientVpnEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyFleet = "ModifyFleet" - -// ModifyFleetRequest generates a "aws/request.Request" representing the -// client's request for the ModifyFleet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyFleet for more information on using the ModifyFleet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyFleetRequest method. -// req, resp := client.ModifyFleetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFleet -func (c *EC2) ModifyFleetRequest(input *ModifyFleetInput) (req *request.Request, output *ModifyFleetOutput) { - op := &request.Operation{ - Name: opModifyFleet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyFleetInput{} - } - - output = &ModifyFleetOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyFleet API operation for Amazon Elastic Compute Cloud. -// -// Modifies the specified EC2 Fleet. -// -// While the EC2 Fleet is being modified, it is in the modifying state. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyFleet for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFleet -func (c *EC2) ModifyFleet(input *ModifyFleetInput) (*ModifyFleetOutput, error) { - req, out := c.ModifyFleetRequest(input) - return out, req.Send() -} - -// ModifyFleetWithContext is the same as ModifyFleet with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyFleet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyFleetWithContext(ctx aws.Context, input *ModifyFleetInput, opts ...request.Option) (*ModifyFleetOutput, error) { - req, out := c.ModifyFleetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyFpgaImageAttribute = "ModifyFpgaImageAttribute" - -// ModifyFpgaImageAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ModifyFpgaImageAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyFpgaImageAttribute for more information on using the ModifyFpgaImageAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyFpgaImageAttributeRequest method. -// req, resp := client.ModifyFpgaImageAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFpgaImageAttribute -func (c *EC2) ModifyFpgaImageAttributeRequest(input *ModifyFpgaImageAttributeInput) (req *request.Request, output *ModifyFpgaImageAttributeOutput) { - op := &request.Operation{ - Name: opModifyFpgaImageAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyFpgaImageAttributeInput{} - } - - output = &ModifyFpgaImageAttributeOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyFpgaImageAttribute API operation for Amazon Elastic Compute Cloud. -// -// Modifies the specified attribute of the specified Amazon FPGA Image (AFI). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyFpgaImageAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFpgaImageAttribute -func (c *EC2) ModifyFpgaImageAttribute(input *ModifyFpgaImageAttributeInput) (*ModifyFpgaImageAttributeOutput, error) { - req, out := c.ModifyFpgaImageAttributeRequest(input) - return out, req.Send() -} - -// ModifyFpgaImageAttributeWithContext is the same as ModifyFpgaImageAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyFpgaImageAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyFpgaImageAttributeWithContext(ctx aws.Context, input *ModifyFpgaImageAttributeInput, opts ...request.Option) (*ModifyFpgaImageAttributeOutput, error) { - req, out := c.ModifyFpgaImageAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyHosts = "ModifyHosts" - -// ModifyHostsRequest generates a "aws/request.Request" representing the -// client's request for the ModifyHosts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyHosts for more information on using the ModifyHosts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyHostsRequest method. -// req, resp := client.ModifyHostsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHosts -func (c *EC2) ModifyHostsRequest(input *ModifyHostsInput) (req *request.Request, output *ModifyHostsOutput) { - op := &request.Operation{ - Name: opModifyHosts, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyHostsInput{} - } - - output = &ModifyHostsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyHosts API operation for Amazon Elastic Compute Cloud. -// -// Modify the auto-placement setting of a Dedicated Host. When auto-placement -// is enabled, any instances that you launch with a tenancy of host but without -// a specific host ID are placed onto any available Dedicated Host in your account -// that has auto-placement enabled. When auto-placement is disabled, you need -// to provide a host ID to have the instance launch onto a specific host. If -// no host ID is provided, the instance is launched onto a suitable host with -// auto-placement enabled. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyHosts for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHosts -func (c *EC2) ModifyHosts(input *ModifyHostsInput) (*ModifyHostsOutput, error) { - req, out := c.ModifyHostsRequest(input) - return out, req.Send() -} - -// ModifyHostsWithContext is the same as ModifyHosts with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyHosts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyHostsWithContext(ctx aws.Context, input *ModifyHostsInput, opts ...request.Option) (*ModifyHostsOutput, error) { - req, out := c.ModifyHostsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyIdFormat = "ModifyIdFormat" - -// ModifyIdFormatRequest generates a "aws/request.Request" representing the -// client's request for the ModifyIdFormat operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyIdFormat for more information on using the ModifyIdFormat -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyIdFormatRequest method. -// req, resp := client.ModifyIdFormatRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdFormat -func (c *EC2) ModifyIdFormatRequest(input *ModifyIdFormatInput) (req *request.Request, output *ModifyIdFormatOutput) { - op := &request.Operation{ - Name: opModifyIdFormat, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyIdFormatInput{} - } - - output = &ModifyIdFormatOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyIdFormat API operation for Amazon Elastic Compute Cloud. -// -// Modifies the ID format for the specified resource on a per-region basis. -// You can specify that resources should receive longer IDs (17-character IDs) -// when they are created. -// -// This request can only be used to modify longer ID settings for resource types -// that are within the opt-in period. Resources currently in their opt-in period -// include: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation -// | elastic-ip-association | export-task | flow-log | image | import-task | -// internet-gateway | network-acl | network-acl-association | network-interface -// | network-interface-attachment | prefix-list | route-table | route-table-association -// | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association -// | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway. -// -// This setting applies to the IAM user who makes the request; it does not apply -// to the entire AWS account. By default, an IAM user defaults to the same settings -// as the root user. If you're using this action as the root user, then these -// settings apply to the entire account, unless an IAM user explicitly overrides -// these settings for themselves. For more information, see Resource IDs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Resources created with longer IDs are visible to all IAM roles and users, -// regardless of these settings and provided that they have permission to use -// the relevant Describe command for the resource type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyIdFormat for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdFormat -func (c *EC2) ModifyIdFormat(input *ModifyIdFormatInput) (*ModifyIdFormatOutput, error) { - req, out := c.ModifyIdFormatRequest(input) - return out, req.Send() -} - -// ModifyIdFormatWithContext is the same as ModifyIdFormat with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyIdFormat for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyIdFormatWithContext(ctx aws.Context, input *ModifyIdFormatInput, opts ...request.Option) (*ModifyIdFormatOutput, error) { - req, out := c.ModifyIdFormatRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyIdentityIdFormat = "ModifyIdentityIdFormat" - -// ModifyIdentityIdFormatRequest generates a "aws/request.Request" representing the -// client's request for the ModifyIdentityIdFormat operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyIdentityIdFormat for more information on using the ModifyIdentityIdFormat -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyIdentityIdFormatRequest method. -// req, resp := client.ModifyIdentityIdFormatRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdentityIdFormat -func (c *EC2) ModifyIdentityIdFormatRequest(input *ModifyIdentityIdFormatInput) (req *request.Request, output *ModifyIdentityIdFormatOutput) { - op := &request.Operation{ - Name: opModifyIdentityIdFormat, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyIdentityIdFormatInput{} - } - - output = &ModifyIdentityIdFormatOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyIdentityIdFormat API operation for Amazon Elastic Compute Cloud. -// -// Modifies the ID format of a resource for a specified IAM user, IAM role, -// or the root user for an account; or all IAM users, IAM roles, and the root -// user for an account. You can specify that resources should receive longer -// IDs (17-character IDs) when they are created. -// -// This request can only be used to modify longer ID settings for resource types -// that are within the opt-in period. Resources currently in their opt-in period -// include: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation -// | elastic-ip-association | export-task | flow-log | image | import-task | -// internet-gateway | network-acl | network-acl-association | network-interface -// | network-interface-attachment | prefix-list | route-table | route-table-association -// | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association -// | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway. -// -// For more information, see Resource IDs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// This setting applies to the principal specified in the request; it does not -// apply to the principal that makes the request. -// -// Resources created with longer IDs are visible to all IAM roles and users, -// regardless of these settings and provided that they have permission to use -// the relevant Describe command for the resource type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyIdentityIdFormat for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdentityIdFormat -func (c *EC2) ModifyIdentityIdFormat(input *ModifyIdentityIdFormatInput) (*ModifyIdentityIdFormatOutput, error) { - req, out := c.ModifyIdentityIdFormatRequest(input) - return out, req.Send() -} - -// ModifyIdentityIdFormatWithContext is the same as ModifyIdentityIdFormat with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyIdentityIdFormat for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyIdentityIdFormatWithContext(ctx aws.Context, input *ModifyIdentityIdFormatInput, opts ...request.Option) (*ModifyIdentityIdFormatOutput, error) { - req, out := c.ModifyIdentityIdFormatRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyImageAttribute = "ModifyImageAttribute" - -// ModifyImageAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ModifyImageAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyImageAttribute for more information on using the ModifyImageAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyImageAttributeRequest method. -// req, resp := client.ModifyImageAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttribute -func (c *EC2) ModifyImageAttributeRequest(input *ModifyImageAttributeInput) (req *request.Request, output *ModifyImageAttributeOutput) { - op := &request.Operation{ - Name: opModifyImageAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyImageAttributeInput{} - } - - output = &ModifyImageAttributeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyImageAttribute API operation for Amazon Elastic Compute Cloud. -// -// Modifies the specified attribute of the specified AMI. You can specify only -// one attribute at a time. You can use the Attribute parameter to specify the -// attribute or one of the following parameters: Description, LaunchPermission, -// or ProductCode. -// -// AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace -// product code cannot be made public. -// -// To enable the SriovNetSupport enhanced networking attribute of an image, -// enable SriovNetSupport on an instance and create an AMI from the instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyImageAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttribute -func (c *EC2) ModifyImageAttribute(input *ModifyImageAttributeInput) (*ModifyImageAttributeOutput, error) { - req, out := c.ModifyImageAttributeRequest(input) - return out, req.Send() -} - -// ModifyImageAttributeWithContext is the same as ModifyImageAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyImageAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyImageAttributeWithContext(ctx aws.Context, input *ModifyImageAttributeInput, opts ...request.Option) (*ModifyImageAttributeOutput, error) { - req, out := c.ModifyImageAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyInstanceAttribute = "ModifyInstanceAttribute" - -// ModifyInstanceAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ModifyInstanceAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyInstanceAttribute for more information on using the ModifyInstanceAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyInstanceAttributeRequest method. -// req, resp := client.ModifyInstanceAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttribute -func (c *EC2) ModifyInstanceAttributeRequest(input *ModifyInstanceAttributeInput) (req *request.Request, output *ModifyInstanceAttributeOutput) { - op := &request.Operation{ - Name: opModifyInstanceAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyInstanceAttributeInput{} - } - - output = &ModifyInstanceAttributeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyInstanceAttribute API operation for Amazon Elastic Compute Cloud. -// -// Modifies the specified attribute of the specified instance. You can specify -// only one attribute at a time. -// -// Note: Using this action to change the security groups associated with an -// elastic network interface (ENI) attached to an instance in a VPC can result -// in an error if the instance has more than one ENI. To change the security -// groups associated with an ENI attached to an instance that has multiple ENIs, -// we recommend that you use the ModifyNetworkInterfaceAttribute action. -// -// To modify some attributes, the instance must be stopped. For more information, -// see Modifying Attributes of a Stopped Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyInstanceAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttribute -func (c *EC2) ModifyInstanceAttribute(input *ModifyInstanceAttributeInput) (*ModifyInstanceAttributeOutput, error) { - req, out := c.ModifyInstanceAttributeRequest(input) - return out, req.Send() -} - -// ModifyInstanceAttributeWithContext is the same as ModifyInstanceAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyInstanceAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyInstanceAttributeWithContext(ctx aws.Context, input *ModifyInstanceAttributeInput, opts ...request.Option) (*ModifyInstanceAttributeOutput, error) { - req, out := c.ModifyInstanceAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyInstanceCapacityReservationAttributes = "ModifyInstanceCapacityReservationAttributes" - -// ModifyInstanceCapacityReservationAttributesRequest generates a "aws/request.Request" representing the -// client's request for the ModifyInstanceCapacityReservationAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyInstanceCapacityReservationAttributes for more information on using the ModifyInstanceCapacityReservationAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyInstanceCapacityReservationAttributesRequest method. -// req, resp := client.ModifyInstanceCapacityReservationAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceCapacityReservationAttributes -func (c *EC2) ModifyInstanceCapacityReservationAttributesRequest(input *ModifyInstanceCapacityReservationAttributesInput) (req *request.Request, output *ModifyInstanceCapacityReservationAttributesOutput) { - op := &request.Operation{ - Name: opModifyInstanceCapacityReservationAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyInstanceCapacityReservationAttributesInput{} - } - - output = &ModifyInstanceCapacityReservationAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyInstanceCapacityReservationAttributes API operation for Amazon Elastic Compute Cloud. -// -// Modifies the Capacity Reservation settings for a stopped instance. Use this -// action to configure an instance to target a specific Capacity Reservation, -// run in any open Capacity Reservation with matching attributes, or run On-Demand -// Instance capacity. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyInstanceCapacityReservationAttributes for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceCapacityReservationAttributes -func (c *EC2) ModifyInstanceCapacityReservationAttributes(input *ModifyInstanceCapacityReservationAttributesInput) (*ModifyInstanceCapacityReservationAttributesOutput, error) { - req, out := c.ModifyInstanceCapacityReservationAttributesRequest(input) - return out, req.Send() -} - -// ModifyInstanceCapacityReservationAttributesWithContext is the same as ModifyInstanceCapacityReservationAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyInstanceCapacityReservationAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyInstanceCapacityReservationAttributesWithContext(ctx aws.Context, input *ModifyInstanceCapacityReservationAttributesInput, opts ...request.Option) (*ModifyInstanceCapacityReservationAttributesOutput, error) { - req, out := c.ModifyInstanceCapacityReservationAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyInstanceCreditSpecification = "ModifyInstanceCreditSpecification" - -// ModifyInstanceCreditSpecificationRequest generates a "aws/request.Request" representing the -// client's request for the ModifyInstanceCreditSpecification operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyInstanceCreditSpecification for more information on using the ModifyInstanceCreditSpecification -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyInstanceCreditSpecificationRequest method. -// req, resp := client.ModifyInstanceCreditSpecificationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceCreditSpecification -func (c *EC2) ModifyInstanceCreditSpecificationRequest(input *ModifyInstanceCreditSpecificationInput) (req *request.Request, output *ModifyInstanceCreditSpecificationOutput) { - op := &request.Operation{ - Name: opModifyInstanceCreditSpecification, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyInstanceCreditSpecificationInput{} - } - - output = &ModifyInstanceCreditSpecificationOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyInstanceCreditSpecification API operation for Amazon Elastic Compute Cloud. -// -// Modifies the credit option for CPU usage on a running or stopped T2 or T3 -// instance. The credit options are standard and unlimited. -// -// For more information, see Burstable Performance Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyInstanceCreditSpecification for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceCreditSpecification -func (c *EC2) ModifyInstanceCreditSpecification(input *ModifyInstanceCreditSpecificationInput) (*ModifyInstanceCreditSpecificationOutput, error) { - req, out := c.ModifyInstanceCreditSpecificationRequest(input) - return out, req.Send() -} - -// ModifyInstanceCreditSpecificationWithContext is the same as ModifyInstanceCreditSpecification with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyInstanceCreditSpecification for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyInstanceCreditSpecificationWithContext(ctx aws.Context, input *ModifyInstanceCreditSpecificationInput, opts ...request.Option) (*ModifyInstanceCreditSpecificationOutput, error) { - req, out := c.ModifyInstanceCreditSpecificationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyInstancePlacement = "ModifyInstancePlacement" - -// ModifyInstancePlacementRequest generates a "aws/request.Request" representing the -// client's request for the ModifyInstancePlacement operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyInstancePlacement for more information on using the ModifyInstancePlacement -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyInstancePlacementRequest method. -// req, resp := client.ModifyInstancePlacementRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstancePlacement -func (c *EC2) ModifyInstancePlacementRequest(input *ModifyInstancePlacementInput) (req *request.Request, output *ModifyInstancePlacementOutput) { - op := &request.Operation{ - Name: opModifyInstancePlacement, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyInstancePlacementInput{} - } - - output = &ModifyInstancePlacementOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyInstancePlacement API operation for Amazon Elastic Compute Cloud. -// -// Modifies the placement attributes for a specified instance. You can do the -// following: -// -// * Modify the affinity between an instance and a Dedicated Host (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html). -// When affinity is set to host and the instance is not associated with a -// specific Dedicated Host, the next time the instance is launched, it is -// automatically associated with the host on which it lands. If the instance -// is restarted or rebooted, this relationship persists. -// -// * Change the Dedicated Host with which an instance is associated. -// -// * Change the instance tenancy of an instance from host to dedicated, or -// from dedicated to host. -// -// * Move an instance to or from a placement group (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html). -// -// At least one attribute for affinity, host ID, tenancy, or placement group -// name must be specified in the request. Affinity and tenancy can be modified -// in the same request. -// -// To modify the host ID, tenancy, placement group, or partition for an instance, -// the instance must be in the stopped state. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyInstancePlacement for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstancePlacement -func (c *EC2) ModifyInstancePlacement(input *ModifyInstancePlacementInput) (*ModifyInstancePlacementOutput, error) { - req, out := c.ModifyInstancePlacementRequest(input) - return out, req.Send() -} - -// ModifyInstancePlacementWithContext is the same as ModifyInstancePlacement with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyInstancePlacement for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyInstancePlacementWithContext(ctx aws.Context, input *ModifyInstancePlacementInput, opts ...request.Option) (*ModifyInstancePlacementOutput, error) { - req, out := c.ModifyInstancePlacementRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyLaunchTemplate = "ModifyLaunchTemplate" - -// ModifyLaunchTemplateRequest generates a "aws/request.Request" representing the -// client's request for the ModifyLaunchTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyLaunchTemplate for more information on using the ModifyLaunchTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyLaunchTemplateRequest method. -// req, resp := client.ModifyLaunchTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyLaunchTemplate -func (c *EC2) ModifyLaunchTemplateRequest(input *ModifyLaunchTemplateInput) (req *request.Request, output *ModifyLaunchTemplateOutput) { - op := &request.Operation{ - Name: opModifyLaunchTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyLaunchTemplateInput{} - } - - output = &ModifyLaunchTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyLaunchTemplate API operation for Amazon Elastic Compute Cloud. -// -// Modifies a launch template. You can specify which version of the launch template -// to set as the default version. When launching an instance, the default version -// applies when a launch template version is not specified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyLaunchTemplate for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyLaunchTemplate -func (c *EC2) ModifyLaunchTemplate(input *ModifyLaunchTemplateInput) (*ModifyLaunchTemplateOutput, error) { - req, out := c.ModifyLaunchTemplateRequest(input) - return out, req.Send() -} - -// ModifyLaunchTemplateWithContext is the same as ModifyLaunchTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyLaunchTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyLaunchTemplateWithContext(ctx aws.Context, input *ModifyLaunchTemplateInput, opts ...request.Option) (*ModifyLaunchTemplateOutput, error) { - req, out := c.ModifyLaunchTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyNetworkInterfaceAttribute = "ModifyNetworkInterfaceAttribute" - -// ModifyNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ModifyNetworkInterfaceAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyNetworkInterfaceAttribute for more information on using the ModifyNetworkInterfaceAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyNetworkInterfaceAttributeRequest method. -// req, resp := client.ModifyNetworkInterfaceAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttribute -func (c *EC2) ModifyNetworkInterfaceAttributeRequest(input *ModifyNetworkInterfaceAttributeInput) (req *request.Request, output *ModifyNetworkInterfaceAttributeOutput) { - op := &request.Operation{ - Name: opModifyNetworkInterfaceAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyNetworkInterfaceAttributeInput{} - } - - output = &ModifyNetworkInterfaceAttributeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyNetworkInterfaceAttribute API operation for Amazon Elastic Compute Cloud. -// -// Modifies the specified network interface attribute. You can specify only -// one attribute at a time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyNetworkInterfaceAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttribute -func (c *EC2) ModifyNetworkInterfaceAttribute(input *ModifyNetworkInterfaceAttributeInput) (*ModifyNetworkInterfaceAttributeOutput, error) { - req, out := c.ModifyNetworkInterfaceAttributeRequest(input) - return out, req.Send() -} - -// ModifyNetworkInterfaceAttributeWithContext is the same as ModifyNetworkInterfaceAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyNetworkInterfaceAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyNetworkInterfaceAttributeWithContext(ctx aws.Context, input *ModifyNetworkInterfaceAttributeInput, opts ...request.Option) (*ModifyNetworkInterfaceAttributeOutput, error) { - req, out := c.ModifyNetworkInterfaceAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyReservedInstances = "ModifyReservedInstances" - -// ModifyReservedInstancesRequest generates a "aws/request.Request" representing the -// client's request for the ModifyReservedInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyReservedInstances for more information on using the ModifyReservedInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyReservedInstancesRequest method. -// req, resp := client.ModifyReservedInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyReservedInstances -func (c *EC2) ModifyReservedInstancesRequest(input *ModifyReservedInstancesInput) (req *request.Request, output *ModifyReservedInstancesOutput) { - op := &request.Operation{ - Name: opModifyReservedInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyReservedInstancesInput{} - } - - output = &ModifyReservedInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyReservedInstances API operation for Amazon Elastic Compute Cloud. -// -// Modifies the Availability Zone, instance count, instance type, or network -// platform (EC2-Classic or EC2-VPC) of your Reserved Instances. The Reserved -// Instances to be modified must be identical, except for Availability Zone, -// network platform, and instance type. -// -// For more information, see Modifying Reserved Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyReservedInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyReservedInstances -func (c *EC2) ModifyReservedInstances(input *ModifyReservedInstancesInput) (*ModifyReservedInstancesOutput, error) { - req, out := c.ModifyReservedInstancesRequest(input) - return out, req.Send() -} - -// ModifyReservedInstancesWithContext is the same as ModifyReservedInstances with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyReservedInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyReservedInstancesWithContext(ctx aws.Context, input *ModifyReservedInstancesInput, opts ...request.Option) (*ModifyReservedInstancesOutput, error) { - req, out := c.ModifyReservedInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifySnapshotAttribute = "ModifySnapshotAttribute" - -// ModifySnapshotAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ModifySnapshotAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifySnapshotAttribute for more information on using the ModifySnapshotAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifySnapshotAttributeRequest method. -// req, resp := client.ModifySnapshotAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttribute -func (c *EC2) ModifySnapshotAttributeRequest(input *ModifySnapshotAttributeInput) (req *request.Request, output *ModifySnapshotAttributeOutput) { - op := &request.Operation{ - Name: opModifySnapshotAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifySnapshotAttributeInput{} - } - - output = &ModifySnapshotAttributeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifySnapshotAttribute API operation for Amazon Elastic Compute Cloud. -// -// Adds or removes permission settings for the specified snapshot. You may add -// or remove specified AWS account IDs from a snapshot's list of create volume -// permissions, but you cannot do both in a single API call. If you need to -// both add and remove account IDs for a snapshot, you must use multiple API -// calls. -// -// Encrypted snapshots and snapshots with AWS Marketplace product codes cannot -// be made public. Snapshots encrypted with your default CMK cannot be shared -// with other accounts. -// -// For more information about modifying snapshot permissions, see Sharing Snapshots -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifySnapshotAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttribute -func (c *EC2) ModifySnapshotAttribute(input *ModifySnapshotAttributeInput) (*ModifySnapshotAttributeOutput, error) { - req, out := c.ModifySnapshotAttributeRequest(input) - return out, req.Send() -} - -// ModifySnapshotAttributeWithContext is the same as ModifySnapshotAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ModifySnapshotAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifySnapshotAttributeWithContext(ctx aws.Context, input *ModifySnapshotAttributeInput, opts ...request.Option) (*ModifySnapshotAttributeOutput, error) { - req, out := c.ModifySnapshotAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifySpotFleetRequest = "ModifySpotFleetRequest" - -// ModifySpotFleetRequestRequest generates a "aws/request.Request" representing the -// client's request for the ModifySpotFleetRequest operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifySpotFleetRequest for more information on using the ModifySpotFleetRequest -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifySpotFleetRequestRequest method. -// req, resp := client.ModifySpotFleetRequestRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySpotFleetRequest -func (c *EC2) ModifySpotFleetRequestRequest(input *ModifySpotFleetRequestInput) (req *request.Request, output *ModifySpotFleetRequestOutput) { - op := &request.Operation{ - Name: opModifySpotFleetRequest, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifySpotFleetRequestInput{} - } - - output = &ModifySpotFleetRequestOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifySpotFleetRequest API operation for Amazon Elastic Compute Cloud. -// -// Modifies the specified Spot Fleet request. -// -// While the Spot Fleet request is being modified, it is in the modifying state. -// -// To scale up your Spot Fleet, increase its target capacity. The Spot Fleet -// launches the additional Spot Instances according to the allocation strategy -// for the Spot Fleet request. If the allocation strategy is lowestPrice, the -// Spot Fleet launches instances using the Spot pool with the lowest price. -// If the allocation strategy is diversified, the Spot Fleet distributes the -// instances across the Spot pools. -// -// To scale down your Spot Fleet, decrease its target capacity. First, the Spot -// Fleet cancels any open requests that exceed the new target capacity. You -// can request that the Spot Fleet terminate Spot Instances until the size of -// the fleet no longer exceeds the new target capacity. If the allocation strategy -// is lowestPrice, the Spot Fleet terminates the instances with the highest -// price per unit. If the allocation strategy is diversified, the Spot Fleet -// terminates instances across the Spot pools. Alternatively, you can request -// that the Spot Fleet keep the fleet at its current size, but not replace any -// Spot Instances that are interrupted or that you terminate manually. -// -// If you are finished with your Spot Fleet for now, but will use it again later, -// you can set the target capacity to 0. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifySpotFleetRequest for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySpotFleetRequest -func (c *EC2) ModifySpotFleetRequest(input *ModifySpotFleetRequestInput) (*ModifySpotFleetRequestOutput, error) { - req, out := c.ModifySpotFleetRequestRequest(input) - return out, req.Send() -} - -// ModifySpotFleetRequestWithContext is the same as ModifySpotFleetRequest with the addition of -// the ability to pass a context and additional request options. -// -// See ModifySpotFleetRequest for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifySpotFleetRequestWithContext(ctx aws.Context, input *ModifySpotFleetRequestInput, opts ...request.Option) (*ModifySpotFleetRequestOutput, error) { - req, out := c.ModifySpotFleetRequestRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifySubnetAttribute = "ModifySubnetAttribute" - -// ModifySubnetAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ModifySubnetAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifySubnetAttribute for more information on using the ModifySubnetAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifySubnetAttributeRequest method. -// req, resp := client.ModifySubnetAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySubnetAttribute -func (c *EC2) ModifySubnetAttributeRequest(input *ModifySubnetAttributeInput) (req *request.Request, output *ModifySubnetAttributeOutput) { - op := &request.Operation{ - Name: opModifySubnetAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifySubnetAttributeInput{} - } - - output = &ModifySubnetAttributeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifySubnetAttribute API operation for Amazon Elastic Compute Cloud. -// -// Modifies a subnet attribute. You can only modify one attribute at a time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifySubnetAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySubnetAttribute -func (c *EC2) ModifySubnetAttribute(input *ModifySubnetAttributeInput) (*ModifySubnetAttributeOutput, error) { - req, out := c.ModifySubnetAttributeRequest(input) - return out, req.Send() -} - -// ModifySubnetAttributeWithContext is the same as ModifySubnetAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ModifySubnetAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifySubnetAttributeWithContext(ctx aws.Context, input *ModifySubnetAttributeInput, opts ...request.Option) (*ModifySubnetAttributeOutput, error) { - req, out := c.ModifySubnetAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyTransitGatewayVpcAttachment = "ModifyTransitGatewayVpcAttachment" - -// ModifyTransitGatewayVpcAttachmentRequest generates a "aws/request.Request" representing the -// client's request for the ModifyTransitGatewayVpcAttachment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyTransitGatewayVpcAttachment for more information on using the ModifyTransitGatewayVpcAttachment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyTransitGatewayVpcAttachmentRequest method. -// req, resp := client.ModifyTransitGatewayVpcAttachmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyTransitGatewayVpcAttachment -func (c *EC2) ModifyTransitGatewayVpcAttachmentRequest(input *ModifyTransitGatewayVpcAttachmentInput) (req *request.Request, output *ModifyTransitGatewayVpcAttachmentOutput) { - op := &request.Operation{ - Name: opModifyTransitGatewayVpcAttachment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyTransitGatewayVpcAttachmentInput{} - } - - output = &ModifyTransitGatewayVpcAttachmentOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyTransitGatewayVpcAttachment API operation for Amazon Elastic Compute Cloud. -// -// Modifies the specified VPC attachment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyTransitGatewayVpcAttachment for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyTransitGatewayVpcAttachment -func (c *EC2) ModifyTransitGatewayVpcAttachment(input *ModifyTransitGatewayVpcAttachmentInput) (*ModifyTransitGatewayVpcAttachmentOutput, error) { - req, out := c.ModifyTransitGatewayVpcAttachmentRequest(input) - return out, req.Send() -} - -// ModifyTransitGatewayVpcAttachmentWithContext is the same as ModifyTransitGatewayVpcAttachment with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyTransitGatewayVpcAttachment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyTransitGatewayVpcAttachmentWithContext(ctx aws.Context, input *ModifyTransitGatewayVpcAttachmentInput, opts ...request.Option) (*ModifyTransitGatewayVpcAttachmentOutput, error) { - req, out := c.ModifyTransitGatewayVpcAttachmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyVolume = "ModifyVolume" - -// ModifyVolumeRequest generates a "aws/request.Request" representing the -// client's request for the ModifyVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyVolume for more information on using the ModifyVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyVolumeRequest method. -// req, resp := client.ModifyVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolume -func (c *EC2) ModifyVolumeRequest(input *ModifyVolumeInput) (req *request.Request, output *ModifyVolumeOutput) { - op := &request.Operation{ - Name: opModifyVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyVolumeInput{} - } - - output = &ModifyVolumeOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyVolume API operation for Amazon Elastic Compute Cloud. -// -// You can modify several parameters of an existing EBS volume, including volume -// size, volume type, and IOPS capacity. If your EBS volume is attached to a -// current-generation EC2 instance type, you may be able to apply these changes -// without stopping the instance or detaching the volume from it. For more information -// about modifying an EBS volume running Linux, see Modifying the Size, IOPS, -// or Type of an EBS Volume on Linux (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html). -// For more information about modifying an EBS volume running Windows, see Modifying -// the Size, IOPS, or Type of an EBS Volume on Windows (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html). -// -// When you complete a resize operation on your volume, you need to extend the -// volume's file-system size to take advantage of the new storage capacity. -// For information about extending a Linux file system, see Extending a Linux -// File System (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#recognize-expanded-volume-linux). -// For information about extending a Windows file system, see Extending a Windows -// File System (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html#recognize-expanded-volume-windows). -// -// You can use CloudWatch Events to check the status of a modification to an -// EBS volume. For information about CloudWatch Events, see the Amazon CloudWatch -// Events User Guide (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/). -// You can also track the status of a modification using the DescribeVolumesModifications -// API. For information about tracking status changes using either method, see -// Monitoring Volume Modifications (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods). -// -// With previous-generation instance types, resizing an EBS volume may require -// detaching and reattaching the volume or stopping and restarting the instance. -// For more information, see Modifying the Size, IOPS, or Type of an EBS Volume -// on Linux (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html) -// and Modifying the Size, IOPS, or Type of an EBS Volume on Windows (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html). -// -// If you reach the maximum volume modification rate per volume limit, you will -// need to wait at least six hours before applying further modifications to -// the affected EBS volume. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyVolume for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolume -func (c *EC2) ModifyVolume(input *ModifyVolumeInput) (*ModifyVolumeOutput, error) { - req, out := c.ModifyVolumeRequest(input) - return out, req.Send() -} - -// ModifyVolumeWithContext is the same as ModifyVolume with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyVolumeWithContext(ctx aws.Context, input *ModifyVolumeInput, opts ...request.Option) (*ModifyVolumeOutput, error) { - req, out := c.ModifyVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyVolumeAttribute = "ModifyVolumeAttribute" - -// ModifyVolumeAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ModifyVolumeAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyVolumeAttribute for more information on using the ModifyVolumeAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyVolumeAttributeRequest method. -// req, resp := client.ModifyVolumeAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttribute -func (c *EC2) ModifyVolumeAttributeRequest(input *ModifyVolumeAttributeInput) (req *request.Request, output *ModifyVolumeAttributeOutput) { - op := &request.Operation{ - Name: opModifyVolumeAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyVolumeAttributeInput{} - } - - output = &ModifyVolumeAttributeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyVolumeAttribute API operation for Amazon Elastic Compute Cloud. -// -// Modifies a volume attribute. -// -// By default, all I/O operations for the volume are suspended when the data -// on the volume is determined to be potentially inconsistent, to prevent undetectable, -// latent data corruption. The I/O access to the volume can be resumed by first -// enabling I/O access and then checking the data consistency on your volume. -// -// You can change the default behavior to resume I/O operations. We recommend -// that you change this only for boot volumes or for volumes that are stateless -// or disposable. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyVolumeAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttribute -func (c *EC2) ModifyVolumeAttribute(input *ModifyVolumeAttributeInput) (*ModifyVolumeAttributeOutput, error) { - req, out := c.ModifyVolumeAttributeRequest(input) - return out, req.Send() -} - -// ModifyVolumeAttributeWithContext is the same as ModifyVolumeAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyVolumeAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyVolumeAttributeWithContext(ctx aws.Context, input *ModifyVolumeAttributeInput, opts ...request.Option) (*ModifyVolumeAttributeOutput, error) { - req, out := c.ModifyVolumeAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyVpcAttribute = "ModifyVpcAttribute" - -// ModifyVpcAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ModifyVpcAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyVpcAttribute for more information on using the ModifyVpcAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyVpcAttributeRequest method. -// req, resp := client.ModifyVpcAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttribute -func (c *EC2) ModifyVpcAttributeRequest(input *ModifyVpcAttributeInput) (req *request.Request, output *ModifyVpcAttributeOutput) { - op := &request.Operation{ - Name: opModifyVpcAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyVpcAttributeInput{} - } - - output = &ModifyVpcAttributeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyVpcAttribute API operation for Amazon Elastic Compute Cloud. -// -// Modifies the specified attribute of the specified VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyVpcAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttribute -func (c *EC2) ModifyVpcAttribute(input *ModifyVpcAttributeInput) (*ModifyVpcAttributeOutput, error) { - req, out := c.ModifyVpcAttributeRequest(input) - return out, req.Send() -} - -// ModifyVpcAttributeWithContext is the same as ModifyVpcAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyVpcAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyVpcAttributeWithContext(ctx aws.Context, input *ModifyVpcAttributeInput, opts ...request.Option) (*ModifyVpcAttributeOutput, error) { - req, out := c.ModifyVpcAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyVpcEndpoint = "ModifyVpcEndpoint" - -// ModifyVpcEndpointRequest generates a "aws/request.Request" representing the -// client's request for the ModifyVpcEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyVpcEndpoint for more information on using the ModifyVpcEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyVpcEndpointRequest method. -// req, resp := client.ModifyVpcEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpoint -func (c *EC2) ModifyVpcEndpointRequest(input *ModifyVpcEndpointInput) (req *request.Request, output *ModifyVpcEndpointOutput) { - op := &request.Operation{ - Name: opModifyVpcEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyVpcEndpointInput{} - } - - output = &ModifyVpcEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyVpcEndpoint API operation for Amazon Elastic Compute Cloud. -// -// Modifies attributes of a specified VPC endpoint. The attributes that you -// can modify depend on the type of VPC endpoint (interface or gateway). For -// more information, see VPC Endpoints (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-endpoints.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyVpcEndpoint for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpoint -func (c *EC2) ModifyVpcEndpoint(input *ModifyVpcEndpointInput) (*ModifyVpcEndpointOutput, error) { - req, out := c.ModifyVpcEndpointRequest(input) - return out, req.Send() -} - -// ModifyVpcEndpointWithContext is the same as ModifyVpcEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyVpcEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyVpcEndpointWithContext(ctx aws.Context, input *ModifyVpcEndpointInput, opts ...request.Option) (*ModifyVpcEndpointOutput, error) { - req, out := c.ModifyVpcEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyVpcEndpointConnectionNotification = "ModifyVpcEndpointConnectionNotification" - -// ModifyVpcEndpointConnectionNotificationRequest generates a "aws/request.Request" representing the -// client's request for the ModifyVpcEndpointConnectionNotification operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyVpcEndpointConnectionNotification for more information on using the ModifyVpcEndpointConnectionNotification -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyVpcEndpointConnectionNotificationRequest method. -// req, resp := client.ModifyVpcEndpointConnectionNotificationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointConnectionNotification -func (c *EC2) ModifyVpcEndpointConnectionNotificationRequest(input *ModifyVpcEndpointConnectionNotificationInput) (req *request.Request, output *ModifyVpcEndpointConnectionNotificationOutput) { - op := &request.Operation{ - Name: opModifyVpcEndpointConnectionNotification, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyVpcEndpointConnectionNotificationInput{} - } - - output = &ModifyVpcEndpointConnectionNotificationOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyVpcEndpointConnectionNotification API operation for Amazon Elastic Compute Cloud. -// -// Modifies a connection notification for VPC endpoint or VPC endpoint service. -// You can change the SNS topic for the notification, or the events for which -// to be notified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyVpcEndpointConnectionNotification for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointConnectionNotification -func (c *EC2) ModifyVpcEndpointConnectionNotification(input *ModifyVpcEndpointConnectionNotificationInput) (*ModifyVpcEndpointConnectionNotificationOutput, error) { - req, out := c.ModifyVpcEndpointConnectionNotificationRequest(input) - return out, req.Send() -} - -// ModifyVpcEndpointConnectionNotificationWithContext is the same as ModifyVpcEndpointConnectionNotification with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyVpcEndpointConnectionNotification for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyVpcEndpointConnectionNotificationWithContext(ctx aws.Context, input *ModifyVpcEndpointConnectionNotificationInput, opts ...request.Option) (*ModifyVpcEndpointConnectionNotificationOutput, error) { - req, out := c.ModifyVpcEndpointConnectionNotificationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyVpcEndpointServiceConfiguration = "ModifyVpcEndpointServiceConfiguration" - -// ModifyVpcEndpointServiceConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the ModifyVpcEndpointServiceConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyVpcEndpointServiceConfiguration for more information on using the ModifyVpcEndpointServiceConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyVpcEndpointServiceConfigurationRequest method. -// req, resp := client.ModifyVpcEndpointServiceConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointServiceConfiguration -func (c *EC2) ModifyVpcEndpointServiceConfigurationRequest(input *ModifyVpcEndpointServiceConfigurationInput) (req *request.Request, output *ModifyVpcEndpointServiceConfigurationOutput) { - op := &request.Operation{ - Name: opModifyVpcEndpointServiceConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyVpcEndpointServiceConfigurationInput{} - } - - output = &ModifyVpcEndpointServiceConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyVpcEndpointServiceConfiguration API operation for Amazon Elastic Compute Cloud. -// -// Modifies the attributes of your VPC endpoint service configuration. You can -// change the Network Load Balancers for your service, and you can specify whether -// acceptance is required for requests to connect to your endpoint service through -// an interface VPC endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyVpcEndpointServiceConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointServiceConfiguration -func (c *EC2) ModifyVpcEndpointServiceConfiguration(input *ModifyVpcEndpointServiceConfigurationInput) (*ModifyVpcEndpointServiceConfigurationOutput, error) { - req, out := c.ModifyVpcEndpointServiceConfigurationRequest(input) - return out, req.Send() -} - -// ModifyVpcEndpointServiceConfigurationWithContext is the same as ModifyVpcEndpointServiceConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyVpcEndpointServiceConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyVpcEndpointServiceConfigurationWithContext(ctx aws.Context, input *ModifyVpcEndpointServiceConfigurationInput, opts ...request.Option) (*ModifyVpcEndpointServiceConfigurationOutput, error) { - req, out := c.ModifyVpcEndpointServiceConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyVpcEndpointServicePermissions = "ModifyVpcEndpointServicePermissions" - -// ModifyVpcEndpointServicePermissionsRequest generates a "aws/request.Request" representing the -// client's request for the ModifyVpcEndpointServicePermissions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyVpcEndpointServicePermissions for more information on using the ModifyVpcEndpointServicePermissions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyVpcEndpointServicePermissionsRequest method. -// req, resp := client.ModifyVpcEndpointServicePermissionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointServicePermissions -func (c *EC2) ModifyVpcEndpointServicePermissionsRequest(input *ModifyVpcEndpointServicePermissionsInput) (req *request.Request, output *ModifyVpcEndpointServicePermissionsOutput) { - op := &request.Operation{ - Name: opModifyVpcEndpointServicePermissions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyVpcEndpointServicePermissionsInput{} - } - - output = &ModifyVpcEndpointServicePermissionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyVpcEndpointServicePermissions API operation for Amazon Elastic Compute Cloud. -// -// Modifies the permissions for your VPC endpoint service (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/endpoint-service.html). -// You can add or remove permissions for service consumers (IAM users, IAM roles, -// and AWS accounts) to connect to your endpoint service. -// -// If you grant permissions to all principals, the service is public. Any users -// who know the name of a public service can send a request to attach an endpoint. -// If the service does not require manual approval, attachments are automatically -// approved. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyVpcEndpointServicePermissions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointServicePermissions -func (c *EC2) ModifyVpcEndpointServicePermissions(input *ModifyVpcEndpointServicePermissionsInput) (*ModifyVpcEndpointServicePermissionsOutput, error) { - req, out := c.ModifyVpcEndpointServicePermissionsRequest(input) - return out, req.Send() -} - -// ModifyVpcEndpointServicePermissionsWithContext is the same as ModifyVpcEndpointServicePermissions with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyVpcEndpointServicePermissions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyVpcEndpointServicePermissionsWithContext(ctx aws.Context, input *ModifyVpcEndpointServicePermissionsInput, opts ...request.Option) (*ModifyVpcEndpointServicePermissionsOutput, error) { - req, out := c.ModifyVpcEndpointServicePermissionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyVpcPeeringConnectionOptions = "ModifyVpcPeeringConnectionOptions" - -// ModifyVpcPeeringConnectionOptionsRequest generates a "aws/request.Request" representing the -// client's request for the ModifyVpcPeeringConnectionOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyVpcPeeringConnectionOptions for more information on using the ModifyVpcPeeringConnectionOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyVpcPeeringConnectionOptionsRequest method. -// req, resp := client.ModifyVpcPeeringConnectionOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcPeeringConnectionOptions -func (c *EC2) ModifyVpcPeeringConnectionOptionsRequest(input *ModifyVpcPeeringConnectionOptionsInput) (req *request.Request, output *ModifyVpcPeeringConnectionOptionsOutput) { - op := &request.Operation{ - Name: opModifyVpcPeeringConnectionOptions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyVpcPeeringConnectionOptionsInput{} - } - - output = &ModifyVpcPeeringConnectionOptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyVpcPeeringConnectionOptions API operation for Amazon Elastic Compute Cloud. -// -// Modifies the VPC peering connection options on one side of a VPC peering -// connection. You can do the following: -// -// * Enable/disable communication over the peering connection between an -// EC2-Classic instance that's linked to your VPC (using ClassicLink) and -// instances in the peer VPC. -// -// * Enable/disable communication over the peering connection between instances -// in your VPC and an EC2-Classic instance that's linked to the peer VPC. -// -// * Enable/disable the ability to resolve public DNS hostnames to private -// IP addresses when queried from instances in the peer VPC. -// -// If the peered VPCs are in the same AWS account, you can enable DNS resolution -// for queries from the local VPC. This ensures that queries from the local -// VPC resolve to private IP addresses in the peer VPC. This option is not available -// if the peered VPCs are in different AWS accounts or different regions. For -// peered VPCs in different AWS accounts, each AWS account owner must initiate -// a separate request to modify the peering connection options. For inter-region -// peering connections, you must use the region for the requester VPC to modify -// the requester VPC peering options and the region for the accepter VPC to -// modify the accepter VPC peering options. To verify which VPCs are the accepter -// and the requester for a VPC peering connection, use the DescribeVpcPeeringConnections -// command. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyVpcPeeringConnectionOptions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcPeeringConnectionOptions -func (c *EC2) ModifyVpcPeeringConnectionOptions(input *ModifyVpcPeeringConnectionOptionsInput) (*ModifyVpcPeeringConnectionOptionsOutput, error) { - req, out := c.ModifyVpcPeeringConnectionOptionsRequest(input) - return out, req.Send() -} - -// ModifyVpcPeeringConnectionOptionsWithContext is the same as ModifyVpcPeeringConnectionOptions with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyVpcPeeringConnectionOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyVpcPeeringConnectionOptionsWithContext(ctx aws.Context, input *ModifyVpcPeeringConnectionOptionsInput, opts ...request.Option) (*ModifyVpcPeeringConnectionOptionsOutput, error) { - req, out := c.ModifyVpcPeeringConnectionOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyVpcTenancy = "ModifyVpcTenancy" - -// ModifyVpcTenancyRequest generates a "aws/request.Request" representing the -// client's request for the ModifyVpcTenancy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyVpcTenancy for more information on using the ModifyVpcTenancy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyVpcTenancyRequest method. -// req, resp := client.ModifyVpcTenancyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcTenancy -func (c *EC2) ModifyVpcTenancyRequest(input *ModifyVpcTenancyInput) (req *request.Request, output *ModifyVpcTenancyOutput) { - op := &request.Operation{ - Name: opModifyVpcTenancy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyVpcTenancyInput{} - } - - output = &ModifyVpcTenancyOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyVpcTenancy API operation for Amazon Elastic Compute Cloud. -// -// Modifies the instance tenancy attribute of the specified VPC. You can change -// the instance tenancy attribute of a VPC to default only. You cannot change -// the instance tenancy attribute to dedicated. -// -// After you modify the tenancy of the VPC, any new instances that you launch -// into the VPC have a tenancy of default, unless you specify otherwise during -// launch. The tenancy of any existing instances in the VPC is not affected. -// -// For more information, see Dedicated Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ModifyVpcTenancy for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcTenancy -func (c *EC2) ModifyVpcTenancy(input *ModifyVpcTenancyInput) (*ModifyVpcTenancyOutput, error) { - req, out := c.ModifyVpcTenancyRequest(input) - return out, req.Send() -} - -// ModifyVpcTenancyWithContext is the same as ModifyVpcTenancy with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyVpcTenancy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ModifyVpcTenancyWithContext(ctx aws.Context, input *ModifyVpcTenancyInput, opts ...request.Option) (*ModifyVpcTenancyOutput, error) { - req, out := c.ModifyVpcTenancyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opMonitorInstances = "MonitorInstances" - -// MonitorInstancesRequest generates a "aws/request.Request" representing the -// client's request for the MonitorInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See MonitorInstances for more information on using the MonitorInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the MonitorInstancesRequest method. -// req, resp := client.MonitorInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances -func (c *EC2) MonitorInstancesRequest(input *MonitorInstancesInput) (req *request.Request, output *MonitorInstancesOutput) { - op := &request.Operation{ - Name: opMonitorInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &MonitorInstancesInput{} - } - - output = &MonitorInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// MonitorInstances API operation for Amazon Elastic Compute Cloud. -// -// Enables detailed monitoring for a running instance. Otherwise, basic monitoring -// is enabled. For more information, see Monitoring Your Instances and Volumes -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// To disable detailed monitoring, see . -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation MonitorInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances -func (c *EC2) MonitorInstances(input *MonitorInstancesInput) (*MonitorInstancesOutput, error) { - req, out := c.MonitorInstancesRequest(input) - return out, req.Send() -} - -// MonitorInstancesWithContext is the same as MonitorInstances with the addition of -// the ability to pass a context and additional request options. -// -// See MonitorInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) MonitorInstancesWithContext(ctx aws.Context, input *MonitorInstancesInput, opts ...request.Option) (*MonitorInstancesOutput, error) { - req, out := c.MonitorInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opMoveAddressToVpc = "MoveAddressToVpc" - -// MoveAddressToVpcRequest generates a "aws/request.Request" representing the -// client's request for the MoveAddressToVpc operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See MoveAddressToVpc for more information on using the MoveAddressToVpc -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the MoveAddressToVpcRequest method. -// req, resp := client.MoveAddressToVpcRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MoveAddressToVpc -func (c *EC2) MoveAddressToVpcRequest(input *MoveAddressToVpcInput) (req *request.Request, output *MoveAddressToVpcOutput) { - op := &request.Operation{ - Name: opMoveAddressToVpc, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &MoveAddressToVpcInput{} - } - - output = &MoveAddressToVpcOutput{} - req = c.newRequest(op, input, output) - return -} - -// MoveAddressToVpc API operation for Amazon Elastic Compute Cloud. -// -// Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC -// platform. The Elastic IP address must be allocated to your account for more -// than 24 hours, and it must not be associated with an instance. After the -// Elastic IP address is moved, it is no longer available for use in the EC2-Classic -// platform, unless you move it back using the RestoreAddressToClassic request. -// You cannot move an Elastic IP address that was originally allocated for use -// in the EC2-VPC platform to the EC2-Classic platform. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation MoveAddressToVpc for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MoveAddressToVpc -func (c *EC2) MoveAddressToVpc(input *MoveAddressToVpcInput) (*MoveAddressToVpcOutput, error) { - req, out := c.MoveAddressToVpcRequest(input) - return out, req.Send() -} - -// MoveAddressToVpcWithContext is the same as MoveAddressToVpc with the addition of -// the ability to pass a context and additional request options. -// -// See MoveAddressToVpc for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) MoveAddressToVpcWithContext(ctx aws.Context, input *MoveAddressToVpcInput, opts ...request.Option) (*MoveAddressToVpcOutput, error) { - req, out := c.MoveAddressToVpcRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opProvisionByoipCidr = "ProvisionByoipCidr" - -// ProvisionByoipCidrRequest generates a "aws/request.Request" representing the -// client's request for the ProvisionByoipCidr operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ProvisionByoipCidr for more information on using the ProvisionByoipCidr -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ProvisionByoipCidrRequest method. -// req, resp := client.ProvisionByoipCidrRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ProvisionByoipCidr -func (c *EC2) ProvisionByoipCidrRequest(input *ProvisionByoipCidrInput) (req *request.Request, output *ProvisionByoipCidrOutput) { - op := &request.Operation{ - Name: opProvisionByoipCidr, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ProvisionByoipCidrInput{} - } - - output = &ProvisionByoipCidrOutput{} - req = c.newRequest(op, input, output) - return -} - -// ProvisionByoipCidr API operation for Amazon Elastic Compute Cloud. -// -// Provisions an address range for use with your AWS resources through bring -// your own IP addresses (BYOIP) and creates a corresponding address pool. After -// the address range is provisioned, it is ready to be advertised using AdvertiseByoipCidr. -// -// AWS verifies that you own the address range and are authorized to advertise -// it. You must ensure that the address range is registered to you and that -// you created an RPKI ROA to authorize Amazon ASNs 16509 and 14618 to advertise -// the address range. For more information, see Bring Your Own IP Addresses -// (BYOIP) (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Provisioning an address range is an asynchronous operation, so the call returns -// immediately, but the address range is not ready to use until its status changes -// from pending-provision to provisioned. To monitor the status of an address -// range, use DescribeByoipCidrs. To allocate an Elastic IP address from your -// address pool, use AllocateAddress with either the specific address from the -// address pool or the ID of the address pool. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ProvisionByoipCidr for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ProvisionByoipCidr -func (c *EC2) ProvisionByoipCidr(input *ProvisionByoipCidrInput) (*ProvisionByoipCidrOutput, error) { - req, out := c.ProvisionByoipCidrRequest(input) - return out, req.Send() -} - -// ProvisionByoipCidrWithContext is the same as ProvisionByoipCidr with the addition of -// the ability to pass a context and additional request options. -// -// See ProvisionByoipCidr for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ProvisionByoipCidrWithContext(ctx aws.Context, input *ProvisionByoipCidrInput, opts ...request.Option) (*ProvisionByoipCidrOutput, error) { - req, out := c.ProvisionByoipCidrRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPurchaseHostReservation = "PurchaseHostReservation" - -// PurchaseHostReservationRequest generates a "aws/request.Request" representing the -// client's request for the PurchaseHostReservation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PurchaseHostReservation for more information on using the PurchaseHostReservation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PurchaseHostReservationRequest method. -// req, resp := client.PurchaseHostReservationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseHostReservation -func (c *EC2) PurchaseHostReservationRequest(input *PurchaseHostReservationInput) (req *request.Request, output *PurchaseHostReservationOutput) { - op := &request.Operation{ - Name: opPurchaseHostReservation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PurchaseHostReservationInput{} - } - - output = &PurchaseHostReservationOutput{} - req = c.newRequest(op, input, output) - return -} - -// PurchaseHostReservation API operation for Amazon Elastic Compute Cloud. -// -// Purchase a reservation with configurations that match those of your Dedicated -// Host. You must have active Dedicated Hosts in your account before you purchase -// a reservation. This action results in the specified reservation being purchased -// and charged 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 Amazon Elastic Compute Cloud's -// API operation PurchaseHostReservation for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseHostReservation -func (c *EC2) PurchaseHostReservation(input *PurchaseHostReservationInput) (*PurchaseHostReservationOutput, error) { - req, out := c.PurchaseHostReservationRequest(input) - return out, req.Send() -} - -// PurchaseHostReservationWithContext is the same as PurchaseHostReservation with the addition of -// the ability to pass a context and additional request options. -// -// See PurchaseHostReservation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) PurchaseHostReservationWithContext(ctx aws.Context, input *PurchaseHostReservationInput, opts ...request.Option) (*PurchaseHostReservationOutput, error) { - req, out := c.PurchaseHostReservationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPurchaseReservedInstancesOffering = "PurchaseReservedInstancesOffering" - -// PurchaseReservedInstancesOfferingRequest generates a "aws/request.Request" representing the -// client's request for the PurchaseReservedInstancesOffering operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PurchaseReservedInstancesOffering for more information on using the PurchaseReservedInstancesOffering -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PurchaseReservedInstancesOfferingRequest method. -// req, resp := client.PurchaseReservedInstancesOfferingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseReservedInstancesOffering -func (c *EC2) PurchaseReservedInstancesOfferingRequest(input *PurchaseReservedInstancesOfferingInput) (req *request.Request, output *PurchaseReservedInstancesOfferingOutput) { - op := &request.Operation{ - Name: opPurchaseReservedInstancesOffering, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PurchaseReservedInstancesOfferingInput{} - } - - output = &PurchaseReservedInstancesOfferingOutput{} - req = c.newRequest(op, input, output) - return -} - -// PurchaseReservedInstancesOffering API operation for Amazon Elastic Compute Cloud. -// -// Purchases a Reserved Instance for use with your account. With Reserved Instances, -// you pay a lower hourly rate compared to On-Demand instance pricing. -// -// Use DescribeReservedInstancesOfferings to get a list of Reserved Instance -// offerings that match your specifications. After you've purchased a Reserved -// Instance, you can check for your new Reserved Instance with DescribeReservedInstances. -// -// For more information, see Reserved Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html) -// and Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation PurchaseReservedInstancesOffering for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseReservedInstancesOffering -func (c *EC2) PurchaseReservedInstancesOffering(input *PurchaseReservedInstancesOfferingInput) (*PurchaseReservedInstancesOfferingOutput, error) { - req, out := c.PurchaseReservedInstancesOfferingRequest(input) - return out, req.Send() -} - -// PurchaseReservedInstancesOfferingWithContext is the same as PurchaseReservedInstancesOffering with the addition of -// the ability to pass a context and additional request options. -// -// See PurchaseReservedInstancesOffering for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) PurchaseReservedInstancesOfferingWithContext(ctx aws.Context, input *PurchaseReservedInstancesOfferingInput, opts ...request.Option) (*PurchaseReservedInstancesOfferingOutput, error) { - req, out := c.PurchaseReservedInstancesOfferingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPurchaseScheduledInstances = "PurchaseScheduledInstances" - -// PurchaseScheduledInstancesRequest generates a "aws/request.Request" representing the -// client's request for the PurchaseScheduledInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PurchaseScheduledInstances for more information on using the PurchaseScheduledInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PurchaseScheduledInstancesRequest method. -// req, resp := client.PurchaseScheduledInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstances -func (c *EC2) PurchaseScheduledInstancesRequest(input *PurchaseScheduledInstancesInput) (req *request.Request, output *PurchaseScheduledInstancesOutput) { - op := &request.Operation{ - Name: opPurchaseScheduledInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PurchaseScheduledInstancesInput{} - } - - output = &PurchaseScheduledInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// PurchaseScheduledInstances API operation for Amazon Elastic Compute Cloud. -// -// Purchases one or more Scheduled Instances with the specified schedule. -// -// Scheduled Instances enable you to purchase Amazon EC2 compute capacity by -// the hour for a one-year term. Before you can purchase a Scheduled Instance, -// you must call DescribeScheduledInstanceAvailability to check for available -// schedules and obtain a purchase token. After you purchase a Scheduled Instance, -// you must call RunScheduledInstances during each scheduled time period. -// -// After you purchase a Scheduled Instance, you can't cancel, modify, or resell -// your purchase. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation PurchaseScheduledInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstances -func (c *EC2) PurchaseScheduledInstances(input *PurchaseScheduledInstancesInput) (*PurchaseScheduledInstancesOutput, error) { - req, out := c.PurchaseScheduledInstancesRequest(input) - return out, req.Send() -} - -// PurchaseScheduledInstancesWithContext is the same as PurchaseScheduledInstances with the addition of -// the ability to pass a context and additional request options. -// -// See PurchaseScheduledInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) PurchaseScheduledInstancesWithContext(ctx aws.Context, input *PurchaseScheduledInstancesInput, opts ...request.Option) (*PurchaseScheduledInstancesOutput, error) { - req, out := c.PurchaseScheduledInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRebootInstances = "RebootInstances" - -// RebootInstancesRequest generates a "aws/request.Request" representing the -// client's request for the RebootInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebootInstances for more information on using the RebootInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebootInstancesRequest method. -// req, resp := client.RebootInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances -func (c *EC2) RebootInstancesRequest(input *RebootInstancesInput) (req *request.Request, output *RebootInstancesOutput) { - op := &request.Operation{ - Name: opRebootInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RebootInstancesInput{} - } - - output = &RebootInstancesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RebootInstances API operation for Amazon Elastic Compute Cloud. -// -// Requests a reboot of one or more instances. This operation is asynchronous; -// it only queues a request to reboot the specified instances. The operation -// succeeds if the instances are valid and belong to you. Requests to reboot -// terminated instances are ignored. -// -// If an instance does not cleanly shut down within four minutes, Amazon EC2 -// performs a hard reboot. -// -// For more information about troubleshooting, see Getting Console Output and -// Rebooting Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation RebootInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances -func (c *EC2) RebootInstances(input *RebootInstancesInput) (*RebootInstancesOutput, error) { - req, out := c.RebootInstancesRequest(input) - return out, req.Send() -} - -// RebootInstancesWithContext is the same as RebootInstances with the addition of -// the ability to pass a context and additional request options. -// -// See RebootInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) RebootInstancesWithContext(ctx aws.Context, input *RebootInstancesInput, opts ...request.Option) (*RebootInstancesOutput, error) { - req, out := c.RebootInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterImage = "RegisterImage" - -// RegisterImageRequest generates a "aws/request.Request" representing the -// client's request for the RegisterImage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterImage for more information on using the RegisterImage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterImageRequest method. -// req, resp := client.RegisterImageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImage -func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *request.Request, output *RegisterImageOutput) { - op := &request.Operation{ - Name: opRegisterImage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterImageInput{} - } - - output = &RegisterImageOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterImage API operation for Amazon Elastic Compute Cloud. -// -// Registers an AMI. When you're creating an AMI, this is the final step you -// must complete before you can launch an instance from the AMI. For more information -// about creating AMIs, see Creating Your Own AMIs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// For Amazon EBS-backed instances, CreateImage creates and registers the AMI -// in a single request, so you don't have to register the AMI yourself. -// -// You can also use RegisterImage to create an Amazon EBS-backed Linux AMI from -// a snapshot of a root device volume. You specify the snapshot using the block -// device mapping. For more information, see Launching a Linux Instance from -// a Backup (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-launch-snapshot.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// You can't register an image where a secondary (non-root) snapshot has AWS -// Marketplace product codes. -// -// Some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE -// Linux Enterprise Server (SLES), use the EC2 billing product code associated -// with an AMI to verify the subscription status for package updates. Creating -// an AMI from an EBS snapshot does not maintain this billing code, and instances -// launched from such an AMI are not able to connect to package update infrastructure. -// If you purchase a Reserved Instance offering for one of these Linux distributions -// and launch instances using an AMI that does not contain the required billing -// code, your Reserved Instance is not applied to these instances. -// -// To create an AMI for operating systems that require a billing code, see CreateImage. -// -// If needed, you can deregister an AMI at any time. Any modifications you make -// to an AMI backed by an instance store volume invalidates its registration. -// If you make changes to an image, deregister the previous image and register -// the new image. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation RegisterImage for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImage -func (c *EC2) RegisterImage(input *RegisterImageInput) (*RegisterImageOutput, error) { - req, out := c.RegisterImageRequest(input) - return out, req.Send() -} - -// RegisterImageWithContext is the same as RegisterImage with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterImage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) RegisterImageWithContext(ctx aws.Context, input *RegisterImageInput, opts ...request.Option) (*RegisterImageOutput, error) { - req, out := c.RegisterImageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRejectTransitGatewayVpcAttachment = "RejectTransitGatewayVpcAttachment" - -// RejectTransitGatewayVpcAttachmentRequest generates a "aws/request.Request" representing the -// client's request for the RejectTransitGatewayVpcAttachment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RejectTransitGatewayVpcAttachment for more information on using the RejectTransitGatewayVpcAttachment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RejectTransitGatewayVpcAttachmentRequest method. -// req, resp := client.RejectTransitGatewayVpcAttachmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectTransitGatewayVpcAttachment -func (c *EC2) RejectTransitGatewayVpcAttachmentRequest(input *RejectTransitGatewayVpcAttachmentInput) (req *request.Request, output *RejectTransitGatewayVpcAttachmentOutput) { - op := &request.Operation{ - Name: opRejectTransitGatewayVpcAttachment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RejectTransitGatewayVpcAttachmentInput{} - } - - output = &RejectTransitGatewayVpcAttachmentOutput{} - req = c.newRequest(op, input, output) - return -} - -// RejectTransitGatewayVpcAttachment API operation for Amazon Elastic Compute Cloud. -// -// Rejects a request to attach a VPC to a transit gateway. -// -// The VPC attachment must be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments -// to view your pending VPC attachment requests. Use AcceptTransitGatewayVpcAttachment -// to accept a VPC attachment request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation RejectTransitGatewayVpcAttachment for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectTransitGatewayVpcAttachment -func (c *EC2) RejectTransitGatewayVpcAttachment(input *RejectTransitGatewayVpcAttachmentInput) (*RejectTransitGatewayVpcAttachmentOutput, error) { - req, out := c.RejectTransitGatewayVpcAttachmentRequest(input) - return out, req.Send() -} - -// RejectTransitGatewayVpcAttachmentWithContext is the same as RejectTransitGatewayVpcAttachment with the addition of -// the ability to pass a context and additional request options. -// -// See RejectTransitGatewayVpcAttachment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) RejectTransitGatewayVpcAttachmentWithContext(ctx aws.Context, input *RejectTransitGatewayVpcAttachmentInput, opts ...request.Option) (*RejectTransitGatewayVpcAttachmentOutput, error) { - req, out := c.RejectTransitGatewayVpcAttachmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRejectVpcEndpointConnections = "RejectVpcEndpointConnections" - -// RejectVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the -// client's request for the RejectVpcEndpointConnections operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RejectVpcEndpointConnections for more information on using the RejectVpcEndpointConnections -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RejectVpcEndpointConnectionsRequest method. -// req, resp := client.RejectVpcEndpointConnectionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcEndpointConnections -func (c *EC2) RejectVpcEndpointConnectionsRequest(input *RejectVpcEndpointConnectionsInput) (req *request.Request, output *RejectVpcEndpointConnectionsOutput) { - op := &request.Operation{ - Name: opRejectVpcEndpointConnections, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RejectVpcEndpointConnectionsInput{} - } - - output = &RejectVpcEndpointConnectionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// RejectVpcEndpointConnections API operation for Amazon Elastic Compute Cloud. -// -// Rejects one or more VPC endpoint connection requests to your VPC endpoint -// service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation RejectVpcEndpointConnections for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcEndpointConnections -func (c *EC2) RejectVpcEndpointConnections(input *RejectVpcEndpointConnectionsInput) (*RejectVpcEndpointConnectionsOutput, error) { - req, out := c.RejectVpcEndpointConnectionsRequest(input) - return out, req.Send() -} - -// RejectVpcEndpointConnectionsWithContext is the same as RejectVpcEndpointConnections with the addition of -// the ability to pass a context and additional request options. -// -// See RejectVpcEndpointConnections for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) RejectVpcEndpointConnectionsWithContext(ctx aws.Context, input *RejectVpcEndpointConnectionsInput, opts ...request.Option) (*RejectVpcEndpointConnectionsOutput, error) { - req, out := c.RejectVpcEndpointConnectionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRejectVpcPeeringConnection = "RejectVpcPeeringConnection" - -// RejectVpcPeeringConnectionRequest generates a "aws/request.Request" representing the -// client's request for the RejectVpcPeeringConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RejectVpcPeeringConnection for more information on using the RejectVpcPeeringConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RejectVpcPeeringConnectionRequest method. -// req, resp := client.RejectVpcPeeringConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnection -func (c *EC2) RejectVpcPeeringConnectionRequest(input *RejectVpcPeeringConnectionInput) (req *request.Request, output *RejectVpcPeeringConnectionOutput) { - op := &request.Operation{ - Name: opRejectVpcPeeringConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RejectVpcPeeringConnectionInput{} - } - - output = &RejectVpcPeeringConnectionOutput{} - req = c.newRequest(op, input, output) - return -} - -// RejectVpcPeeringConnection API operation for Amazon Elastic Compute Cloud. -// -// Rejects a VPC peering connection request. The VPC peering connection must -// be in the pending-acceptance state. Use the DescribeVpcPeeringConnections -// request to view your outstanding VPC peering connection requests. To delete -// an active VPC peering connection, or to delete a VPC peering connection request -// that you initiated, use DeleteVpcPeeringConnection. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation RejectVpcPeeringConnection for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnection -func (c *EC2) RejectVpcPeeringConnection(input *RejectVpcPeeringConnectionInput) (*RejectVpcPeeringConnectionOutput, error) { - req, out := c.RejectVpcPeeringConnectionRequest(input) - return out, req.Send() -} - -// RejectVpcPeeringConnectionWithContext is the same as RejectVpcPeeringConnection with the addition of -// the ability to pass a context and additional request options. -// -// See RejectVpcPeeringConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) RejectVpcPeeringConnectionWithContext(ctx aws.Context, input *RejectVpcPeeringConnectionInput, opts ...request.Option) (*RejectVpcPeeringConnectionOutput, error) { - req, out := c.RejectVpcPeeringConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReleaseAddress = "ReleaseAddress" - -// ReleaseAddressRequest generates a "aws/request.Request" representing the -// client's request for the ReleaseAddress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReleaseAddress for more information on using the ReleaseAddress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReleaseAddressRequest method. -// req, resp := client.ReleaseAddressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddress -func (c *EC2) ReleaseAddressRequest(input *ReleaseAddressInput) (req *request.Request, output *ReleaseAddressOutput) { - op := &request.Operation{ - Name: opReleaseAddress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReleaseAddressInput{} - } - - output = &ReleaseAddressOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ReleaseAddress API operation for Amazon Elastic Compute Cloud. -// -// Releases the specified Elastic IP address. -// -// [EC2-Classic, default VPC] Releasing an Elastic IP address automatically -// disassociates it from any instance that it's associated with. To disassociate -// an Elastic IP address without releasing it, use DisassociateAddress. -// -// [Nondefault VPC] You must use DisassociateAddress to disassociate the Elastic -// IP address before you can release it. Otherwise, Amazon EC2 returns an error -// (InvalidIPAddress.InUse). -// -// After releasing an Elastic IP address, it is released to the IP address pool. -// Be sure to update your DNS records and any servers or devices that communicate -// with the address. If you attempt to release an Elastic IP address that you -// already released, you'll get an AuthFailure error if the address is already -// allocated to another AWS account. -// -// [EC2-VPC] After you release an Elastic IP address for use in a VPC, you might -// be able to recover it. For more information, see AllocateAddress. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ReleaseAddress for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddress -func (c *EC2) ReleaseAddress(input *ReleaseAddressInput) (*ReleaseAddressOutput, error) { - req, out := c.ReleaseAddressRequest(input) - return out, req.Send() -} - -// ReleaseAddressWithContext is the same as ReleaseAddress with the addition of -// the ability to pass a context and additional request options. -// -// See ReleaseAddress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ReleaseAddressWithContext(ctx aws.Context, input *ReleaseAddressInput, opts ...request.Option) (*ReleaseAddressOutput, error) { - req, out := c.ReleaseAddressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReleaseHosts = "ReleaseHosts" - -// ReleaseHostsRequest generates a "aws/request.Request" representing the -// client's request for the ReleaseHosts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReleaseHosts for more information on using the ReleaseHosts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReleaseHostsRequest method. -// req, resp := client.ReleaseHostsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseHosts -func (c *EC2) ReleaseHostsRequest(input *ReleaseHostsInput) (req *request.Request, output *ReleaseHostsOutput) { - op := &request.Operation{ - Name: opReleaseHosts, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReleaseHostsInput{} - } - - output = &ReleaseHostsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ReleaseHosts API operation for Amazon Elastic Compute Cloud. -// -// When you no longer want to use an On-Demand Dedicated Host it can be released. -// On-Demand billing is stopped and the host goes into released state. The host -// ID of Dedicated Hosts that have been released can no longer be specified -// in another request, for example, to modify the host. You must stop or terminate -// all instances on a host before it can be released. -// -// When Dedicated Hosts are released, it may take some time for them to stop -// counting toward your limit and you may receive capacity errors when trying -// to allocate new Dedicated Hosts. Wait a few minutes and then try again. -// -// Released hosts still appear in a DescribeHosts response. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ReleaseHosts for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseHosts -func (c *EC2) ReleaseHosts(input *ReleaseHostsInput) (*ReleaseHostsOutput, error) { - req, out := c.ReleaseHostsRequest(input) - return out, req.Send() -} - -// ReleaseHostsWithContext is the same as ReleaseHosts with the addition of -// the ability to pass a context and additional request options. -// -// See ReleaseHosts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ReleaseHostsWithContext(ctx aws.Context, input *ReleaseHostsInput, opts ...request.Option) (*ReleaseHostsOutput, error) { - req, out := c.ReleaseHostsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReplaceIamInstanceProfileAssociation = "ReplaceIamInstanceProfileAssociation" - -// ReplaceIamInstanceProfileAssociationRequest generates a "aws/request.Request" representing the -// client's request for the ReplaceIamInstanceProfileAssociation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReplaceIamInstanceProfileAssociation for more information on using the ReplaceIamInstanceProfileAssociation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReplaceIamInstanceProfileAssociationRequest method. -// req, resp := client.ReplaceIamInstanceProfileAssociationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceIamInstanceProfileAssociation -func (c *EC2) ReplaceIamInstanceProfileAssociationRequest(input *ReplaceIamInstanceProfileAssociationInput) (req *request.Request, output *ReplaceIamInstanceProfileAssociationOutput) { - op := &request.Operation{ - Name: opReplaceIamInstanceProfileAssociation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReplaceIamInstanceProfileAssociationInput{} - } - - output = &ReplaceIamInstanceProfileAssociationOutput{} - req = c.newRequest(op, input, output) - return -} - -// ReplaceIamInstanceProfileAssociation API operation for Amazon Elastic Compute Cloud. -// -// Replaces an IAM instance profile for the specified running instance. You -// can use this action to change the IAM instance profile that's associated -// with an instance without having to disassociate the existing IAM instance -// profile first. -// -// Use DescribeIamInstanceProfileAssociations to get the association ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ReplaceIamInstanceProfileAssociation for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceIamInstanceProfileAssociation -func (c *EC2) ReplaceIamInstanceProfileAssociation(input *ReplaceIamInstanceProfileAssociationInput) (*ReplaceIamInstanceProfileAssociationOutput, error) { - req, out := c.ReplaceIamInstanceProfileAssociationRequest(input) - return out, req.Send() -} - -// ReplaceIamInstanceProfileAssociationWithContext is the same as ReplaceIamInstanceProfileAssociation with the addition of -// the ability to pass a context and additional request options. -// -// See ReplaceIamInstanceProfileAssociation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ReplaceIamInstanceProfileAssociationWithContext(ctx aws.Context, input *ReplaceIamInstanceProfileAssociationInput, opts ...request.Option) (*ReplaceIamInstanceProfileAssociationOutput, error) { - req, out := c.ReplaceIamInstanceProfileAssociationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReplaceNetworkAclAssociation = "ReplaceNetworkAclAssociation" - -// ReplaceNetworkAclAssociationRequest generates a "aws/request.Request" representing the -// client's request for the ReplaceNetworkAclAssociation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReplaceNetworkAclAssociation for more information on using the ReplaceNetworkAclAssociation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReplaceNetworkAclAssociationRequest method. -// req, resp := client.ReplaceNetworkAclAssociationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociation -func (c *EC2) ReplaceNetworkAclAssociationRequest(input *ReplaceNetworkAclAssociationInput) (req *request.Request, output *ReplaceNetworkAclAssociationOutput) { - op := &request.Operation{ - Name: opReplaceNetworkAclAssociation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReplaceNetworkAclAssociationInput{} - } - - output = &ReplaceNetworkAclAssociationOutput{} - req = c.newRequest(op, input, output) - return -} - -// ReplaceNetworkAclAssociation API operation for Amazon Elastic Compute Cloud. -// -// Changes which network ACL a subnet is associated with. By default when you -// create a subnet, it's automatically associated with the default network ACL. -// For more information, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// This is an idempotent operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ReplaceNetworkAclAssociation for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociation -func (c *EC2) ReplaceNetworkAclAssociation(input *ReplaceNetworkAclAssociationInput) (*ReplaceNetworkAclAssociationOutput, error) { - req, out := c.ReplaceNetworkAclAssociationRequest(input) - return out, req.Send() -} - -// ReplaceNetworkAclAssociationWithContext is the same as ReplaceNetworkAclAssociation with the addition of -// the ability to pass a context and additional request options. -// -// See ReplaceNetworkAclAssociation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ReplaceNetworkAclAssociationWithContext(ctx aws.Context, input *ReplaceNetworkAclAssociationInput, opts ...request.Option) (*ReplaceNetworkAclAssociationOutput, error) { - req, out := c.ReplaceNetworkAclAssociationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReplaceNetworkAclEntry = "ReplaceNetworkAclEntry" - -// ReplaceNetworkAclEntryRequest generates a "aws/request.Request" representing the -// client's request for the ReplaceNetworkAclEntry operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReplaceNetworkAclEntry for more information on using the ReplaceNetworkAclEntry -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReplaceNetworkAclEntryRequest method. -// req, resp := client.ReplaceNetworkAclEntryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntry -func (c *EC2) ReplaceNetworkAclEntryRequest(input *ReplaceNetworkAclEntryInput) (req *request.Request, output *ReplaceNetworkAclEntryOutput) { - op := &request.Operation{ - Name: opReplaceNetworkAclEntry, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReplaceNetworkAclEntryInput{} - } - - output = &ReplaceNetworkAclEntryOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ReplaceNetworkAclEntry API operation for Amazon Elastic Compute Cloud. -// -// Replaces an entry (rule) in a network ACL. For more information, see Network -// ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ReplaceNetworkAclEntry for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntry -func (c *EC2) ReplaceNetworkAclEntry(input *ReplaceNetworkAclEntryInput) (*ReplaceNetworkAclEntryOutput, error) { - req, out := c.ReplaceNetworkAclEntryRequest(input) - return out, req.Send() -} - -// ReplaceNetworkAclEntryWithContext is the same as ReplaceNetworkAclEntry with the addition of -// the ability to pass a context and additional request options. -// -// See ReplaceNetworkAclEntry for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ReplaceNetworkAclEntryWithContext(ctx aws.Context, input *ReplaceNetworkAclEntryInput, opts ...request.Option) (*ReplaceNetworkAclEntryOutput, error) { - req, out := c.ReplaceNetworkAclEntryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReplaceRoute = "ReplaceRoute" - -// ReplaceRouteRequest generates a "aws/request.Request" representing the -// client's request for the ReplaceRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReplaceRoute for more information on using the ReplaceRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReplaceRouteRequest method. -// req, resp := client.ReplaceRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRoute -func (c *EC2) ReplaceRouteRequest(input *ReplaceRouteInput) (req *request.Request, output *ReplaceRouteOutput) { - op := &request.Operation{ - Name: opReplaceRoute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReplaceRouteInput{} - } - - output = &ReplaceRouteOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ReplaceRoute API operation for Amazon Elastic Compute Cloud. -// -// Replaces an existing route within a route table in a VPC. You must provide -// only one of the following: internet gateway or virtual private gateway, NAT -// instance, NAT gateway, VPC peering connection, network interface, or egress-only -// internet gateway. -// -// For more information, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ReplaceRoute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRoute -func (c *EC2) ReplaceRoute(input *ReplaceRouteInput) (*ReplaceRouteOutput, error) { - req, out := c.ReplaceRouteRequest(input) - return out, req.Send() -} - -// ReplaceRouteWithContext is the same as ReplaceRoute with the addition of -// the ability to pass a context and additional request options. -// -// See ReplaceRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ReplaceRouteWithContext(ctx aws.Context, input *ReplaceRouteInput, opts ...request.Option) (*ReplaceRouteOutput, error) { - req, out := c.ReplaceRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReplaceRouteTableAssociation = "ReplaceRouteTableAssociation" - -// ReplaceRouteTableAssociationRequest generates a "aws/request.Request" representing the -// client's request for the ReplaceRouteTableAssociation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReplaceRouteTableAssociation for more information on using the ReplaceRouteTableAssociation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReplaceRouteTableAssociationRequest method. -// req, resp := client.ReplaceRouteTableAssociationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociation -func (c *EC2) ReplaceRouteTableAssociationRequest(input *ReplaceRouteTableAssociationInput) (req *request.Request, output *ReplaceRouteTableAssociationOutput) { - op := &request.Operation{ - Name: opReplaceRouteTableAssociation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReplaceRouteTableAssociationInput{} - } - - output = &ReplaceRouteTableAssociationOutput{} - req = c.newRequest(op, input, output) - return -} - -// ReplaceRouteTableAssociation API operation for Amazon Elastic Compute Cloud. -// -// Changes the route table associated with a given subnet in a VPC. After the -// operation completes, the subnet uses the routes in the new route table it's -// associated with. For more information about route tables, see Route Tables -// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// You can also use ReplaceRouteTableAssociation to change which table is the -// main route table in the VPC. You just specify the main route table's association -// ID and the route table to be the new main route table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ReplaceRouteTableAssociation for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociation -func (c *EC2) ReplaceRouteTableAssociation(input *ReplaceRouteTableAssociationInput) (*ReplaceRouteTableAssociationOutput, error) { - req, out := c.ReplaceRouteTableAssociationRequest(input) - return out, req.Send() -} - -// ReplaceRouteTableAssociationWithContext is the same as ReplaceRouteTableAssociation with the addition of -// the ability to pass a context and additional request options. -// -// See ReplaceRouteTableAssociation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ReplaceRouteTableAssociationWithContext(ctx aws.Context, input *ReplaceRouteTableAssociationInput, opts ...request.Option) (*ReplaceRouteTableAssociationOutput, error) { - req, out := c.ReplaceRouteTableAssociationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReplaceTransitGatewayRoute = "ReplaceTransitGatewayRoute" - -// ReplaceTransitGatewayRouteRequest generates a "aws/request.Request" representing the -// client's request for the ReplaceTransitGatewayRoute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReplaceTransitGatewayRoute for more information on using the ReplaceTransitGatewayRoute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReplaceTransitGatewayRouteRequest method. -// req, resp := client.ReplaceTransitGatewayRouteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceTransitGatewayRoute -func (c *EC2) ReplaceTransitGatewayRouteRequest(input *ReplaceTransitGatewayRouteInput) (req *request.Request, output *ReplaceTransitGatewayRouteOutput) { - op := &request.Operation{ - Name: opReplaceTransitGatewayRoute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReplaceTransitGatewayRouteInput{} - } - - output = &ReplaceTransitGatewayRouteOutput{} - req = c.newRequest(op, input, output) - return -} - -// ReplaceTransitGatewayRoute API operation for Amazon Elastic Compute Cloud. -// -// Replaces the specified route in the specified transit gateway route table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ReplaceTransitGatewayRoute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceTransitGatewayRoute -func (c *EC2) ReplaceTransitGatewayRoute(input *ReplaceTransitGatewayRouteInput) (*ReplaceTransitGatewayRouteOutput, error) { - req, out := c.ReplaceTransitGatewayRouteRequest(input) - return out, req.Send() -} - -// ReplaceTransitGatewayRouteWithContext is the same as ReplaceTransitGatewayRoute with the addition of -// the ability to pass a context and additional request options. -// -// See ReplaceTransitGatewayRoute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ReplaceTransitGatewayRouteWithContext(ctx aws.Context, input *ReplaceTransitGatewayRouteInput, opts ...request.Option) (*ReplaceTransitGatewayRouteOutput, error) { - req, out := c.ReplaceTransitGatewayRouteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReportInstanceStatus = "ReportInstanceStatus" - -// ReportInstanceStatusRequest generates a "aws/request.Request" representing the -// client's request for the ReportInstanceStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReportInstanceStatus for more information on using the ReportInstanceStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReportInstanceStatusRequest method. -// req, resp := client.ReportInstanceStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatus -func (c *EC2) ReportInstanceStatusRequest(input *ReportInstanceStatusInput) (req *request.Request, output *ReportInstanceStatusOutput) { - op := &request.Operation{ - Name: opReportInstanceStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReportInstanceStatusInput{} - } - - output = &ReportInstanceStatusOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ReportInstanceStatus API operation for Amazon Elastic Compute Cloud. -// -// Submits feedback about the status of an instance. The instance must be in -// the running state. If your experience with the instance differs from the -// instance status returned by DescribeInstanceStatus, use ReportInstanceStatus -// to report your experience with the instance. Amazon EC2 collects this information -// to improve the accuracy of status checks. -// -// Use of this action does not change the value returned by DescribeInstanceStatus. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ReportInstanceStatus for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatus -func (c *EC2) ReportInstanceStatus(input *ReportInstanceStatusInput) (*ReportInstanceStatusOutput, error) { - req, out := c.ReportInstanceStatusRequest(input) - return out, req.Send() -} - -// ReportInstanceStatusWithContext is the same as ReportInstanceStatus with the addition of -// the ability to pass a context and additional request options. -// -// See ReportInstanceStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ReportInstanceStatusWithContext(ctx aws.Context, input *ReportInstanceStatusInput, opts ...request.Option) (*ReportInstanceStatusOutput, error) { - req, out := c.ReportInstanceStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRequestSpotFleet = "RequestSpotFleet" - -// RequestSpotFleetRequest generates a "aws/request.Request" representing the -// client's request for the RequestSpotFleet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RequestSpotFleet for more information on using the RequestSpotFleet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RequestSpotFleetRequest method. -// req, resp := client.RequestSpotFleetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotFleet -func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *request.Request, output *RequestSpotFleetOutput) { - op := &request.Operation{ - Name: opRequestSpotFleet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RequestSpotFleetInput{} - } - - output = &RequestSpotFleetOutput{} - req = c.newRequest(op, input, output) - return -} - -// RequestSpotFleet API operation for Amazon Elastic Compute Cloud. -// -// Creates a Spot Fleet request. -// -// The Spot Fleet request specifies the total target capacity and the On-Demand -// target capacity. Amazon EC2 calculates the difference between the total capacity -// and On-Demand capacity, and launches the difference as Spot capacity. -// -// You can submit a single request that includes multiple launch specifications -// that vary by instance type, AMI, Availability Zone, or subnet. -// -// By default, the Spot Fleet requests Spot Instances in the Spot pool where -// the price per unit is the lowest. Each launch specification can include its -// own instance weighting that reflects the value of the instance type to your -// application workload. -// -// Alternatively, you can specify that the Spot Fleet distribute the target -// capacity across the Spot pools included in its launch specifications. By -// ensuring that the Spot Instances in your Spot Fleet are in different Spot -// pools, you can improve the availability of your fleet. -// -// You can specify tags for the Spot Instances. You cannot tag other resource -// types in a Spot Fleet request because only the instance resource type is -// supported. -// -// For more information, see Spot Fleet Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html) -// in the Amazon EC2 User Guide for Linux Instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation RequestSpotFleet for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotFleet -func (c *EC2) RequestSpotFleet(input *RequestSpotFleetInput) (*RequestSpotFleetOutput, error) { - req, out := c.RequestSpotFleetRequest(input) - return out, req.Send() -} - -// RequestSpotFleetWithContext is the same as RequestSpotFleet with the addition of -// the ability to pass a context and additional request options. -// -// See RequestSpotFleet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) RequestSpotFleetWithContext(ctx aws.Context, input *RequestSpotFleetInput, opts ...request.Option) (*RequestSpotFleetOutput, error) { - req, out := c.RequestSpotFleetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRequestSpotInstances = "RequestSpotInstances" - -// RequestSpotInstancesRequest generates a "aws/request.Request" representing the -// client's request for the RequestSpotInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RequestSpotInstances for more information on using the RequestSpotInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RequestSpotInstancesRequest method. -// req, resp := client.RequestSpotInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotInstances -func (c *EC2) RequestSpotInstancesRequest(input *RequestSpotInstancesInput) (req *request.Request, output *RequestSpotInstancesOutput) { - op := &request.Operation{ - Name: opRequestSpotInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RequestSpotInstancesInput{} - } - - output = &RequestSpotInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// RequestSpotInstances API operation for Amazon Elastic Compute Cloud. -// -// Creates a Spot Instance request. -// -// For more information, see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) -// in the Amazon EC2 User Guide for Linux Instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation RequestSpotInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotInstances -func (c *EC2) RequestSpotInstances(input *RequestSpotInstancesInput) (*RequestSpotInstancesOutput, error) { - req, out := c.RequestSpotInstancesRequest(input) - return out, req.Send() -} - -// RequestSpotInstancesWithContext is the same as RequestSpotInstances with the addition of -// the ability to pass a context and additional request options. -// -// See RequestSpotInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) RequestSpotInstancesWithContext(ctx aws.Context, input *RequestSpotInstancesInput, opts ...request.Option) (*RequestSpotInstancesOutput, error) { - req, out := c.RequestSpotInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetFpgaImageAttribute = "ResetFpgaImageAttribute" - -// ResetFpgaImageAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ResetFpgaImageAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetFpgaImageAttribute for more information on using the ResetFpgaImageAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetFpgaImageAttributeRequest method. -// req, resp := client.ResetFpgaImageAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetFpgaImageAttribute -func (c *EC2) ResetFpgaImageAttributeRequest(input *ResetFpgaImageAttributeInput) (req *request.Request, output *ResetFpgaImageAttributeOutput) { - op := &request.Operation{ - Name: opResetFpgaImageAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetFpgaImageAttributeInput{} - } - - output = &ResetFpgaImageAttributeOutput{} - req = c.newRequest(op, input, output) - return -} - -// ResetFpgaImageAttribute API operation for Amazon Elastic Compute Cloud. -// -// Resets the specified attribute of the specified Amazon FPGA Image (AFI) to -// its default value. You can only reset the load permission attribute. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ResetFpgaImageAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetFpgaImageAttribute -func (c *EC2) ResetFpgaImageAttribute(input *ResetFpgaImageAttributeInput) (*ResetFpgaImageAttributeOutput, error) { - req, out := c.ResetFpgaImageAttributeRequest(input) - return out, req.Send() -} - -// ResetFpgaImageAttributeWithContext is the same as ResetFpgaImageAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ResetFpgaImageAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ResetFpgaImageAttributeWithContext(ctx aws.Context, input *ResetFpgaImageAttributeInput, opts ...request.Option) (*ResetFpgaImageAttributeOutput, error) { - req, out := c.ResetFpgaImageAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetImageAttribute = "ResetImageAttribute" - -// ResetImageAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ResetImageAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetImageAttribute for more information on using the ResetImageAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetImageAttributeRequest method. -// req, resp := client.ResetImageAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttribute -func (c *EC2) ResetImageAttributeRequest(input *ResetImageAttributeInput) (req *request.Request, output *ResetImageAttributeOutput) { - op := &request.Operation{ - Name: opResetImageAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetImageAttributeInput{} - } - - output = &ResetImageAttributeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ResetImageAttribute API operation for Amazon Elastic Compute Cloud. -// -// Resets an attribute of an AMI to its default value. -// -// The productCodes attribute can't be reset. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ResetImageAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttribute -func (c *EC2) ResetImageAttribute(input *ResetImageAttributeInput) (*ResetImageAttributeOutput, error) { - req, out := c.ResetImageAttributeRequest(input) - return out, req.Send() -} - -// ResetImageAttributeWithContext is the same as ResetImageAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ResetImageAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ResetImageAttributeWithContext(ctx aws.Context, input *ResetImageAttributeInput, opts ...request.Option) (*ResetImageAttributeOutput, error) { - req, out := c.ResetImageAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetInstanceAttribute = "ResetInstanceAttribute" - -// ResetInstanceAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ResetInstanceAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetInstanceAttribute for more information on using the ResetInstanceAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetInstanceAttributeRequest method. -// req, resp := client.ResetInstanceAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttribute -func (c *EC2) ResetInstanceAttributeRequest(input *ResetInstanceAttributeInput) (req *request.Request, output *ResetInstanceAttributeOutput) { - op := &request.Operation{ - Name: opResetInstanceAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetInstanceAttributeInput{} - } - - output = &ResetInstanceAttributeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ResetInstanceAttribute API operation for Amazon Elastic Compute Cloud. -// -// Resets an attribute of an instance to its default value. To reset the kernel -// or ramdisk, the instance must be in a stopped state. To reset the sourceDestCheck, -// the instance can be either running or stopped. -// -// The sourceDestCheck attribute controls whether source/destination checking -// is enabled. The default value is true, which means checking is enabled. This -// value must be false for a NAT instance to perform NAT. For more information, -// see NAT Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ResetInstanceAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttribute -func (c *EC2) ResetInstanceAttribute(input *ResetInstanceAttributeInput) (*ResetInstanceAttributeOutput, error) { - req, out := c.ResetInstanceAttributeRequest(input) - return out, req.Send() -} - -// ResetInstanceAttributeWithContext is the same as ResetInstanceAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ResetInstanceAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ResetInstanceAttributeWithContext(ctx aws.Context, input *ResetInstanceAttributeInput, opts ...request.Option) (*ResetInstanceAttributeOutput, error) { - req, out := c.ResetInstanceAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetNetworkInterfaceAttribute = "ResetNetworkInterfaceAttribute" - -// ResetNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ResetNetworkInterfaceAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetNetworkInterfaceAttribute for more information on using the ResetNetworkInterfaceAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetNetworkInterfaceAttributeRequest method. -// req, resp := client.ResetNetworkInterfaceAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttribute -func (c *EC2) ResetNetworkInterfaceAttributeRequest(input *ResetNetworkInterfaceAttributeInput) (req *request.Request, output *ResetNetworkInterfaceAttributeOutput) { - op := &request.Operation{ - Name: opResetNetworkInterfaceAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetNetworkInterfaceAttributeInput{} - } - - output = &ResetNetworkInterfaceAttributeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ResetNetworkInterfaceAttribute API operation for Amazon Elastic Compute Cloud. -// -// Resets a network interface attribute. You can specify only one attribute -// at a time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ResetNetworkInterfaceAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttribute -func (c *EC2) ResetNetworkInterfaceAttribute(input *ResetNetworkInterfaceAttributeInput) (*ResetNetworkInterfaceAttributeOutput, error) { - req, out := c.ResetNetworkInterfaceAttributeRequest(input) - return out, req.Send() -} - -// ResetNetworkInterfaceAttributeWithContext is the same as ResetNetworkInterfaceAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ResetNetworkInterfaceAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ResetNetworkInterfaceAttributeWithContext(ctx aws.Context, input *ResetNetworkInterfaceAttributeInput, opts ...request.Option) (*ResetNetworkInterfaceAttributeOutput, error) { - req, out := c.ResetNetworkInterfaceAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetSnapshotAttribute = "ResetSnapshotAttribute" - -// ResetSnapshotAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ResetSnapshotAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetSnapshotAttribute for more information on using the ResetSnapshotAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetSnapshotAttributeRequest method. -// req, resp := client.ResetSnapshotAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttribute -func (c *EC2) ResetSnapshotAttributeRequest(input *ResetSnapshotAttributeInput) (req *request.Request, output *ResetSnapshotAttributeOutput) { - op := &request.Operation{ - Name: opResetSnapshotAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetSnapshotAttributeInput{} - } - - output = &ResetSnapshotAttributeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ResetSnapshotAttribute API operation for Amazon Elastic Compute Cloud. -// -// Resets permission settings for the specified snapshot. -// -// For more information about modifying snapshot permissions, see Sharing Snapshots -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation ResetSnapshotAttribute for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttribute -func (c *EC2) ResetSnapshotAttribute(input *ResetSnapshotAttributeInput) (*ResetSnapshotAttributeOutput, error) { - req, out := c.ResetSnapshotAttributeRequest(input) - return out, req.Send() -} - -// ResetSnapshotAttributeWithContext is the same as ResetSnapshotAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ResetSnapshotAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) ResetSnapshotAttributeWithContext(ctx aws.Context, input *ResetSnapshotAttributeInput, opts ...request.Option) (*ResetSnapshotAttributeOutput, error) { - req, out := c.ResetSnapshotAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreAddressToClassic = "RestoreAddressToClassic" - -// RestoreAddressToClassicRequest generates a "aws/request.Request" representing the -// client's request for the RestoreAddressToClassic operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreAddressToClassic for more information on using the RestoreAddressToClassic -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreAddressToClassicRequest method. -// req, resp := client.RestoreAddressToClassicRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RestoreAddressToClassic -func (c *EC2) RestoreAddressToClassicRequest(input *RestoreAddressToClassicInput) (req *request.Request, output *RestoreAddressToClassicOutput) { - op := &request.Operation{ - Name: opRestoreAddressToClassic, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreAddressToClassicInput{} - } - - output = &RestoreAddressToClassicOutput{} - req = c.newRequest(op, input, output) - return -} - -// RestoreAddressToClassic API operation for Amazon Elastic Compute Cloud. -// -// Restores an Elastic IP address that was previously moved to the EC2-VPC platform -// back to the EC2-Classic platform. You cannot move an Elastic IP address that -// was originally allocated for use in EC2-VPC. The Elastic IP address must -// not be associated with an instance or network interface. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation RestoreAddressToClassic for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RestoreAddressToClassic -func (c *EC2) RestoreAddressToClassic(input *RestoreAddressToClassicInput) (*RestoreAddressToClassicOutput, error) { - req, out := c.RestoreAddressToClassicRequest(input) - return out, req.Send() -} - -// RestoreAddressToClassicWithContext is the same as RestoreAddressToClassic with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreAddressToClassic for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) RestoreAddressToClassicWithContext(ctx aws.Context, input *RestoreAddressToClassicInput, opts ...request.Option) (*RestoreAddressToClassicOutput, error) { - req, out := c.RestoreAddressToClassicRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRevokeClientVpnIngress = "RevokeClientVpnIngress" - -// RevokeClientVpnIngressRequest generates a "aws/request.Request" representing the -// client's request for the RevokeClientVpnIngress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RevokeClientVpnIngress for more information on using the RevokeClientVpnIngress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RevokeClientVpnIngressRequest method. -// req, resp := client.RevokeClientVpnIngressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeClientVpnIngress -func (c *EC2) RevokeClientVpnIngressRequest(input *RevokeClientVpnIngressInput) (req *request.Request, output *RevokeClientVpnIngressOutput) { - op := &request.Operation{ - Name: opRevokeClientVpnIngress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RevokeClientVpnIngressInput{} - } - - output = &RevokeClientVpnIngressOutput{} - req = c.newRequest(op, input, output) - return -} - -// RevokeClientVpnIngress API operation for Amazon Elastic Compute Cloud. -// -// Removes an ingress authorization rule from a Client VPN endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation RevokeClientVpnIngress for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeClientVpnIngress -func (c *EC2) RevokeClientVpnIngress(input *RevokeClientVpnIngressInput) (*RevokeClientVpnIngressOutput, error) { - req, out := c.RevokeClientVpnIngressRequest(input) - return out, req.Send() -} - -// RevokeClientVpnIngressWithContext is the same as RevokeClientVpnIngress with the addition of -// the ability to pass a context and additional request options. -// -// See RevokeClientVpnIngress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) RevokeClientVpnIngressWithContext(ctx aws.Context, input *RevokeClientVpnIngressInput, opts ...request.Option) (*RevokeClientVpnIngressOutput, error) { - req, out := c.RevokeClientVpnIngressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRevokeSecurityGroupEgress = "RevokeSecurityGroupEgress" - -// RevokeSecurityGroupEgressRequest generates a "aws/request.Request" representing the -// client's request for the RevokeSecurityGroupEgress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RevokeSecurityGroupEgress for more information on using the RevokeSecurityGroupEgress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RevokeSecurityGroupEgressRequest method. -// req, resp := client.RevokeSecurityGroupEgressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgress -func (c *EC2) RevokeSecurityGroupEgressRequest(input *RevokeSecurityGroupEgressInput) (req *request.Request, output *RevokeSecurityGroupEgressOutput) { - op := &request.Operation{ - Name: opRevokeSecurityGroupEgress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RevokeSecurityGroupEgressInput{} - } - - output = &RevokeSecurityGroupEgressOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RevokeSecurityGroupEgress API operation for Amazon Elastic Compute Cloud. -// -// [EC2-VPC only] Removes one or more egress rules from a security group for -// EC2-VPC. This action doesn't apply to security groups for use in EC2-Classic. -// To remove a rule, the values that you specify (for example, ports) must match -// the existing rule's values exactly. -// -// Each rule consists of the protocol and the IPv4 or IPv6 CIDR range or source -// security group. For the TCP and UDP protocols, you must also specify the -// destination port or range of ports. For the ICMP protocol, you must also -// specify the ICMP type and code. If the security group rule has a description, -// you do not have to specify the description to revoke the rule. -// -// Rule changes are propagated to instances within the security group as quickly -// as possible. However, a small delay might occur. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation RevokeSecurityGroupEgress for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgress -func (c *EC2) RevokeSecurityGroupEgress(input *RevokeSecurityGroupEgressInput) (*RevokeSecurityGroupEgressOutput, error) { - req, out := c.RevokeSecurityGroupEgressRequest(input) - return out, req.Send() -} - -// RevokeSecurityGroupEgressWithContext is the same as RevokeSecurityGroupEgress with the addition of -// the ability to pass a context and additional request options. -// -// See RevokeSecurityGroupEgress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) RevokeSecurityGroupEgressWithContext(ctx aws.Context, input *RevokeSecurityGroupEgressInput, opts ...request.Option) (*RevokeSecurityGroupEgressOutput, error) { - req, out := c.RevokeSecurityGroupEgressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRevokeSecurityGroupIngress = "RevokeSecurityGroupIngress" - -// RevokeSecurityGroupIngressRequest generates a "aws/request.Request" representing the -// client's request for the RevokeSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RevokeSecurityGroupIngress for more information on using the RevokeSecurityGroupIngress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RevokeSecurityGroupIngressRequest method. -// req, resp := client.RevokeSecurityGroupIngressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngress -func (c *EC2) RevokeSecurityGroupIngressRequest(input *RevokeSecurityGroupIngressInput) (req *request.Request, output *RevokeSecurityGroupIngressOutput) { - op := &request.Operation{ - Name: opRevokeSecurityGroupIngress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RevokeSecurityGroupIngressInput{} - } - - output = &RevokeSecurityGroupIngressOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RevokeSecurityGroupIngress API operation for Amazon Elastic Compute Cloud. -// -// Removes one or more ingress rules from a security group. To remove a rule, -// the values that you specify (for example, ports) must match the existing -// rule's values exactly. -// -// [EC2-Classic security groups only] If the values you specify do not match -// the existing rule's values, no error is returned. Use DescribeSecurityGroups -// to verify that the rule has been removed. -// -// Each rule consists of the protocol and the CIDR range or source security -// group. For the TCP and UDP protocols, you must also specify the destination -// port or range of ports. For the ICMP protocol, you must also specify the -// ICMP type and code. If the security group rule has a description, you do -// not have to specify the description to revoke the rule. -// -// Rule changes are propagated to instances within the security group as quickly -// as possible. However, a small delay might occur. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation RevokeSecurityGroupIngress for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngress -func (c *EC2) RevokeSecurityGroupIngress(input *RevokeSecurityGroupIngressInput) (*RevokeSecurityGroupIngressOutput, error) { - req, out := c.RevokeSecurityGroupIngressRequest(input) - return out, req.Send() -} - -// RevokeSecurityGroupIngressWithContext is the same as RevokeSecurityGroupIngress with the addition of -// the ability to pass a context and additional request options. -// -// See RevokeSecurityGroupIngress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) RevokeSecurityGroupIngressWithContext(ctx aws.Context, input *RevokeSecurityGroupIngressInput, opts ...request.Option) (*RevokeSecurityGroupIngressOutput, error) { - req, out := c.RevokeSecurityGroupIngressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRunInstances = "RunInstances" - -// RunInstancesRequest generates a "aws/request.Request" representing the -// client's request for the RunInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RunInstances for more information on using the RunInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RunInstancesRequest method. -// req, resp := client.RunInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstances -func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *request.Request, output *Reservation) { - op := &request.Operation{ - Name: opRunInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RunInstancesInput{} - } - - output = &Reservation{} - req = c.newRequest(op, input, output) - return -} - -// RunInstances API operation for Amazon Elastic Compute Cloud. -// -// Launches the specified number of instances using an AMI for which you have -// permissions. -// -// You can specify a number of options, or leave the default options. The following -// rules apply: -// -// * [EC2-VPC] If you don't specify a subnet ID, we choose a default subnet -// from your default VPC for you. If you don't have a default VPC, you must -// specify a subnet ID in the request. -// -// * [EC2-Classic] If don't specify an Availability Zone, we choose one for -// you. -// -// * Some instance types must be launched into a VPC. If you do not have -// a default VPC, or if you do not specify a subnet ID, the request fails. -// For more information, see Instance Types Available Only in a VPC (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html#vpc-only-instance-types). -// -// * [EC2-VPC] All instances have a network interface with a primary private -// IPv4 address. If you don't specify this address, we choose one from the -// IPv4 range of your subnet. -// -// * Not all instance types support IPv6 addresses. For more information, -// see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html). -// -// * If you don't specify a security group ID, we use the default security -// group. For more information, see Security Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html). -// -// * If any of the AMIs have a product code attached for which the user has -// not subscribed, the request fails. -// -// You can create a launch template (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html), -// which is a resource that contains the parameters to launch an instance. When -// you launch an instance using RunInstances, you can specify the launch template -// instead of specifying the launch parameters. -// -// To ensure faster instance launches, break up large requests into smaller -// batches. For example, create five separate launch requests for 100 instances -// each instead of one launch request for 500 instances. -// -// An instance is ready for you to use when it's in the running state. You can -// check the state of your instance using DescribeInstances. You can tag instances -// and EBS volumes during launch, after launch, or both. For more information, -// see CreateTags and Tagging Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html). -// -// Linux instances have access to the public key of the key pair at boot. You -// can use this key to provide secure access to the instance. Amazon EC2 public -// images use this feature to provide secure access without passwords. For more -// information, see Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// For troubleshooting, see What To Do If An Instance Immediately Terminates -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html), -// and Troubleshooting Connecting to Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation RunInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstances -func (c *EC2) RunInstances(input *RunInstancesInput) (*Reservation, error) { - req, out := c.RunInstancesRequest(input) - return out, req.Send() -} - -// RunInstancesWithContext is the same as RunInstances with the addition of -// the ability to pass a context and additional request options. -// -// See RunInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) RunInstancesWithContext(ctx aws.Context, input *RunInstancesInput, opts ...request.Option) (*Reservation, error) { - req, out := c.RunInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRunScheduledInstances = "RunScheduledInstances" - -// RunScheduledInstancesRequest generates a "aws/request.Request" representing the -// client's request for the RunScheduledInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RunScheduledInstances for more information on using the RunScheduledInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RunScheduledInstancesRequest method. -// req, resp := client.RunScheduledInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstances -func (c *EC2) RunScheduledInstancesRequest(input *RunScheduledInstancesInput) (req *request.Request, output *RunScheduledInstancesOutput) { - op := &request.Operation{ - Name: opRunScheduledInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RunScheduledInstancesInput{} - } - - output = &RunScheduledInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// RunScheduledInstances API operation for Amazon Elastic Compute Cloud. -// -// Launches the specified Scheduled Instances. -// -// Before you can launch a Scheduled Instance, you must purchase it and obtain -// an identifier using PurchaseScheduledInstances. -// -// You must launch a Scheduled Instance during its scheduled time period. You -// can't stop or reboot a Scheduled Instance, but you can terminate it as needed. -// If you terminate a Scheduled Instance before the current scheduled time period -// ends, you can launch it again after a few minutes. For more information, -// see Scheduled Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-scheduled-instances.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation RunScheduledInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstances -func (c *EC2) RunScheduledInstances(input *RunScheduledInstancesInput) (*RunScheduledInstancesOutput, error) { - req, out := c.RunScheduledInstancesRequest(input) - return out, req.Send() -} - -// RunScheduledInstancesWithContext is the same as RunScheduledInstances with the addition of -// the ability to pass a context and additional request options. -// -// See RunScheduledInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) RunScheduledInstancesWithContext(ctx aws.Context, input *RunScheduledInstancesInput, opts ...request.Option) (*RunScheduledInstancesOutput, error) { - req, out := c.RunScheduledInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSearchTransitGatewayRoutes = "SearchTransitGatewayRoutes" - -// SearchTransitGatewayRoutesRequest generates a "aws/request.Request" representing the -// client's request for the SearchTransitGatewayRoutes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SearchTransitGatewayRoutes for more information on using the SearchTransitGatewayRoutes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SearchTransitGatewayRoutesRequest method. -// req, resp := client.SearchTransitGatewayRoutesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SearchTransitGatewayRoutes -func (c *EC2) SearchTransitGatewayRoutesRequest(input *SearchTransitGatewayRoutesInput) (req *request.Request, output *SearchTransitGatewayRoutesOutput) { - op := &request.Operation{ - Name: opSearchTransitGatewayRoutes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SearchTransitGatewayRoutesInput{} - } - - output = &SearchTransitGatewayRoutesOutput{} - req = c.newRequest(op, input, output) - return -} - -// SearchTransitGatewayRoutes API operation for Amazon Elastic Compute Cloud. -// -// Searches for routes in the specified transit gateway route table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation SearchTransitGatewayRoutes for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SearchTransitGatewayRoutes -func (c *EC2) SearchTransitGatewayRoutes(input *SearchTransitGatewayRoutesInput) (*SearchTransitGatewayRoutesOutput, error) { - req, out := c.SearchTransitGatewayRoutesRequest(input) - return out, req.Send() -} - -// SearchTransitGatewayRoutesWithContext is the same as SearchTransitGatewayRoutes with the addition of -// the ability to pass a context and additional request options. -// -// See SearchTransitGatewayRoutes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) SearchTransitGatewayRoutesWithContext(ctx aws.Context, input *SearchTransitGatewayRoutesInput, opts ...request.Option) (*SearchTransitGatewayRoutesOutput, error) { - req, out := c.SearchTransitGatewayRoutesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartInstances = "StartInstances" - -// StartInstancesRequest generates a "aws/request.Request" representing the -// client's request for the StartInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartInstances for more information on using the StartInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartInstancesRequest method. -// req, resp := client.StartInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances -func (c *EC2) StartInstancesRequest(input *StartInstancesInput) (req *request.Request, output *StartInstancesOutput) { - op := &request.Operation{ - Name: opStartInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartInstancesInput{} - } - - output = &StartInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartInstances API operation for Amazon Elastic Compute Cloud. -// -// Starts an Amazon EBS-backed instance that you've previously stopped. -// -// Instances that use Amazon EBS volumes as their root devices can be quickly -// stopped and started. When an instance is stopped, the compute resources are -// released and you are not billed for instance usage. However, your root partition -// Amazon EBS volume remains and continues to persist your data, and you are -// charged for Amazon EBS volume usage. You can restart your instance at any -// time. Every time you start your Windows instance, Amazon EC2 charges you -// for a full instance hour. If you stop and restart your Windows instance, -// a new instance hour begins and Amazon EC2 charges you for another full instance -// hour even if you are still within the same 60-minute period when it was stopped. -// Every time you start your Linux instance, Amazon EC2 charges a one-minute -// minimum for instance usage, and thereafter charges per second for instance -// usage. -// -// Before stopping an instance, make sure it is in a state from which it can -// be restarted. Stopping an instance does not preserve data stored in RAM. -// -// Performing this operation on an instance that uses an instance store as its -// root device returns an error. -// -// For more information, see Stopping Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation StartInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances -func (c *EC2) StartInstances(input *StartInstancesInput) (*StartInstancesOutput, error) { - req, out := c.StartInstancesRequest(input) - return out, req.Send() -} - -// StartInstancesWithContext is the same as StartInstances with the addition of -// the ability to pass a context and additional request options. -// -// See StartInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) StartInstancesWithContext(ctx aws.Context, input *StartInstancesInput, opts ...request.Option) (*StartInstancesOutput, error) { - req, out := c.StartInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopInstances = "StopInstances" - -// StopInstancesRequest generates a "aws/request.Request" representing the -// client's request for the StopInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopInstances for more information on using the StopInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopInstancesRequest method. -// req, resp := client.StopInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances -func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Request, output *StopInstancesOutput) { - op := &request.Operation{ - Name: opStopInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopInstancesInput{} - } - - output = &StopInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopInstances API operation for Amazon Elastic Compute Cloud. -// -// Stops an Amazon EBS-backed instance. -// -// You can use the Stop action to hibernate an instance if the instance is enabled -// for hibernation (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#enabling-hibernation) -// and it meets the hibernation prerequisites (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). -// For more information, see Hibernate Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// We don't charge usage for a stopped instance, or data transfer fees; however, -// your root partition Amazon EBS volume remains and continues to persist your -// data, and you are charged for Amazon EBS volume usage. Every time you start -// your Windows instance, Amazon EC2 charges you for a full instance hour. If -// you stop and restart your Windows instance, a new instance hour begins and -// Amazon EC2 charges you for another full instance hour even if you are still -// within the same 60-minute period when it was stopped. Every time you start -// your Linux instance, Amazon EC2 charges a one-minute minimum for instance -// usage, and thereafter charges per second for instance usage. -// -// You can't start, stop, or hibernate Spot Instances, and you can't stop or -// hibernate instance store-backed instances. For information about using hibernation -// for Spot Instances, see Hibernating Interrupted Spot Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html#hibernate-spot-instances) -// in the Amazon Elastic Compute Cloud User Guide. -// -// When you stop or hibernate an instance, we shut it down. You can restart -// your instance at any time. Before stopping or hibernating an instance, make -// sure it is in a state from which it can be restarted. Stopping an instance -// does not preserve data stored in RAM, but hibernating an instance does preserve -// data stored in RAM. If an instance cannot hibernate successfully, a normal -// shutdown occurs. -// -// Stopping and hibernating an instance is different to rebooting or terminating -// it. For example, when you stop or hibernate an instance, the root device -// and any other devices attached to the instance persist. When you terminate -// an instance, the root device and any other devices attached during the instance -// launch are automatically deleted. For more information about the differences -// between rebooting, stopping, hibernating, and terminating instances, see -// Instance Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// When you stop an instance, we attempt to shut it down forcibly after a short -// while. If your instance appears stuck in the stopping state after a period -// of time, there may be an issue with the underlying host computer. For more -// information, see Troubleshooting Stopping Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation StopInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances -func (c *EC2) StopInstances(input *StopInstancesInput) (*StopInstancesOutput, error) { - req, out := c.StopInstancesRequest(input) - return out, req.Send() -} - -// StopInstancesWithContext is the same as StopInstances with the addition of -// the ability to pass a context and additional request options. -// -// See StopInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) StopInstancesWithContext(ctx aws.Context, input *StopInstancesInput, opts ...request.Option) (*StopInstancesOutput, error) { - req, out := c.StopInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTerminateClientVpnConnections = "TerminateClientVpnConnections" - -// TerminateClientVpnConnectionsRequest generates a "aws/request.Request" representing the -// client's request for the TerminateClientVpnConnections operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TerminateClientVpnConnections for more information on using the TerminateClientVpnConnections -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TerminateClientVpnConnectionsRequest method. -// req, resp := client.TerminateClientVpnConnectionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateClientVpnConnections -func (c *EC2) TerminateClientVpnConnectionsRequest(input *TerminateClientVpnConnectionsInput) (req *request.Request, output *TerminateClientVpnConnectionsOutput) { - op := &request.Operation{ - Name: opTerminateClientVpnConnections, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TerminateClientVpnConnectionsInput{} - } - - output = &TerminateClientVpnConnectionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// TerminateClientVpnConnections API operation for Amazon Elastic Compute Cloud. -// -// Terminates active Client VPN endpoint connections. This action can be used -// to terminate a specific client connection, or up to five connections established -// by a specific user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation TerminateClientVpnConnections for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateClientVpnConnections -func (c *EC2) TerminateClientVpnConnections(input *TerminateClientVpnConnectionsInput) (*TerminateClientVpnConnectionsOutput, error) { - req, out := c.TerminateClientVpnConnectionsRequest(input) - return out, req.Send() -} - -// TerminateClientVpnConnectionsWithContext is the same as TerminateClientVpnConnections with the addition of -// the ability to pass a context and additional request options. -// -// See TerminateClientVpnConnections for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) TerminateClientVpnConnectionsWithContext(ctx aws.Context, input *TerminateClientVpnConnectionsInput, opts ...request.Option) (*TerminateClientVpnConnectionsOutput, error) { - req, out := c.TerminateClientVpnConnectionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTerminateInstances = "TerminateInstances" - -// TerminateInstancesRequest generates a "aws/request.Request" representing the -// client's request for the TerminateInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TerminateInstances for more information on using the TerminateInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TerminateInstancesRequest method. -// req, resp := client.TerminateInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances -func (c *EC2) TerminateInstancesRequest(input *TerminateInstancesInput) (req *request.Request, output *TerminateInstancesOutput) { - op := &request.Operation{ - Name: opTerminateInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TerminateInstancesInput{} - } - - output = &TerminateInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// TerminateInstances API operation for Amazon Elastic Compute Cloud. -// -// Shuts down one or more instances. This operation is idempotent; if you terminate -// an instance more than once, each call succeeds. -// -// If you specify multiple instances and the request fails (for example, because -// of a single incorrect instance ID), none of the instances are terminated. -// -// Terminated instances remain visible after termination (for approximately -// one hour). -// -// By default, Amazon EC2 deletes all EBS volumes that were attached when the -// instance launched. Volumes attached after instance launch continue running. -// -// You can stop, start, and terminate EBS-backed instances. You can only terminate -// instance store-backed instances. What happens to an instance differs if you -// stop it or terminate it. For example, when you stop an instance, the root -// device and any other devices attached to the instance persist. When you terminate -// an instance, any attached EBS volumes with the DeleteOnTermination block -// device mapping parameter set to true are automatically deleted. For more -// information about the differences between stopping and terminating instances, -// see Instance Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// For more information about troubleshooting, see Troubleshooting Terminating -// Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation TerminateInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances -func (c *EC2) TerminateInstances(input *TerminateInstancesInput) (*TerminateInstancesOutput, error) { - req, out := c.TerminateInstancesRequest(input) - return out, req.Send() -} - -// TerminateInstancesWithContext is the same as TerminateInstances with the addition of -// the ability to pass a context and additional request options. -// -// See TerminateInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) TerminateInstancesWithContext(ctx aws.Context, input *TerminateInstancesInput, opts ...request.Option) (*TerminateInstancesOutput, error) { - req, out := c.TerminateInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUnassignIpv6Addresses = "UnassignIpv6Addresses" - -// UnassignIpv6AddressesRequest generates a "aws/request.Request" representing the -// client's request for the UnassignIpv6Addresses operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UnassignIpv6Addresses for more information on using the UnassignIpv6Addresses -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UnassignIpv6AddressesRequest method. -// req, resp := client.UnassignIpv6AddressesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignIpv6Addresses -func (c *EC2) UnassignIpv6AddressesRequest(input *UnassignIpv6AddressesInput) (req *request.Request, output *UnassignIpv6AddressesOutput) { - op := &request.Operation{ - Name: opUnassignIpv6Addresses, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UnassignIpv6AddressesInput{} - } - - output = &UnassignIpv6AddressesOutput{} - req = c.newRequest(op, input, output) - return -} - -// UnassignIpv6Addresses API operation for Amazon Elastic Compute Cloud. -// -// Unassigns one or more IPv6 addresses from a network interface. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation UnassignIpv6Addresses for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignIpv6Addresses -func (c *EC2) UnassignIpv6Addresses(input *UnassignIpv6AddressesInput) (*UnassignIpv6AddressesOutput, error) { - req, out := c.UnassignIpv6AddressesRequest(input) - return out, req.Send() -} - -// UnassignIpv6AddressesWithContext is the same as UnassignIpv6Addresses with the addition of -// the ability to pass a context and additional request options. -// -// See UnassignIpv6Addresses for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) UnassignIpv6AddressesWithContext(ctx aws.Context, input *UnassignIpv6AddressesInput, opts ...request.Option) (*UnassignIpv6AddressesOutput, error) { - req, out := c.UnassignIpv6AddressesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUnassignPrivateIpAddresses = "UnassignPrivateIpAddresses" - -// UnassignPrivateIpAddressesRequest generates a "aws/request.Request" representing the -// client's request for the UnassignPrivateIpAddresses operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UnassignPrivateIpAddresses for more information on using the UnassignPrivateIpAddresses -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UnassignPrivateIpAddressesRequest method. -// req, resp := client.UnassignPrivateIpAddressesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddresses -func (c *EC2) UnassignPrivateIpAddressesRequest(input *UnassignPrivateIpAddressesInput) (req *request.Request, output *UnassignPrivateIpAddressesOutput) { - op := &request.Operation{ - Name: opUnassignPrivateIpAddresses, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UnassignPrivateIpAddressesInput{} - } - - output = &UnassignPrivateIpAddressesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UnassignPrivateIpAddresses API operation for Amazon Elastic Compute Cloud. -// -// Unassigns one or more secondary private IP addresses from a network interface. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation UnassignPrivateIpAddresses for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddresses -func (c *EC2) UnassignPrivateIpAddresses(input *UnassignPrivateIpAddressesInput) (*UnassignPrivateIpAddressesOutput, error) { - req, out := c.UnassignPrivateIpAddressesRequest(input) - return out, req.Send() -} - -// UnassignPrivateIpAddressesWithContext is the same as UnassignPrivateIpAddresses with the addition of -// the ability to pass a context and additional request options. -// -// See UnassignPrivateIpAddresses for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) UnassignPrivateIpAddressesWithContext(ctx aws.Context, input *UnassignPrivateIpAddressesInput, opts ...request.Option) (*UnassignPrivateIpAddressesOutput, error) { - req, out := c.UnassignPrivateIpAddressesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUnmonitorInstances = "UnmonitorInstances" - -// UnmonitorInstancesRequest generates a "aws/request.Request" representing the -// client's request for the UnmonitorInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UnmonitorInstances for more information on using the UnmonitorInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UnmonitorInstancesRequest method. -// req, resp := client.UnmonitorInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances -func (c *EC2) UnmonitorInstancesRequest(input *UnmonitorInstancesInput) (req *request.Request, output *UnmonitorInstancesOutput) { - op := &request.Operation{ - Name: opUnmonitorInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UnmonitorInstancesInput{} - } - - output = &UnmonitorInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// UnmonitorInstances API operation for Amazon Elastic Compute Cloud. -// -// Disables detailed monitoring for a running instance. For more information, -// see Monitoring Your Instances and Volumes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html) -// in the Amazon Elastic Compute Cloud User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation UnmonitorInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances -func (c *EC2) UnmonitorInstances(input *UnmonitorInstancesInput) (*UnmonitorInstancesOutput, error) { - req, out := c.UnmonitorInstancesRequest(input) - return out, req.Send() -} - -// UnmonitorInstancesWithContext is the same as UnmonitorInstances with the addition of -// the ability to pass a context and additional request options. -// -// See UnmonitorInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) UnmonitorInstancesWithContext(ctx aws.Context, input *UnmonitorInstancesInput, opts ...request.Option) (*UnmonitorInstancesOutput, error) { - req, out := c.UnmonitorInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSecurityGroupRuleDescriptionsEgress = "UpdateSecurityGroupRuleDescriptionsEgress" - -// UpdateSecurityGroupRuleDescriptionsEgressRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSecurityGroupRuleDescriptionsEgress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSecurityGroupRuleDescriptionsEgress for more information on using the UpdateSecurityGroupRuleDescriptionsEgress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSecurityGroupRuleDescriptionsEgressRequest method. -// req, resp := client.UpdateSecurityGroupRuleDescriptionsEgressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UpdateSecurityGroupRuleDescriptionsEgress -func (c *EC2) UpdateSecurityGroupRuleDescriptionsEgressRequest(input *UpdateSecurityGroupRuleDescriptionsEgressInput) (req *request.Request, output *UpdateSecurityGroupRuleDescriptionsEgressOutput) { - op := &request.Operation{ - Name: opUpdateSecurityGroupRuleDescriptionsEgress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSecurityGroupRuleDescriptionsEgressInput{} - } - - output = &UpdateSecurityGroupRuleDescriptionsEgressOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSecurityGroupRuleDescriptionsEgress API operation for Amazon Elastic Compute Cloud. -// -// [EC2-VPC only] Updates the description of an egress (outbound) security group -// rule. You can replace an existing description, or add a description to a -// rule that did not have one previously. -// -// You specify the description as part of the IP permissions structure. You -// can remove a description for a security group rule by omitting the description -// parameter in the request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation UpdateSecurityGroupRuleDescriptionsEgress for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UpdateSecurityGroupRuleDescriptionsEgress -func (c *EC2) UpdateSecurityGroupRuleDescriptionsEgress(input *UpdateSecurityGroupRuleDescriptionsEgressInput) (*UpdateSecurityGroupRuleDescriptionsEgressOutput, error) { - req, out := c.UpdateSecurityGroupRuleDescriptionsEgressRequest(input) - return out, req.Send() -} - -// UpdateSecurityGroupRuleDescriptionsEgressWithContext is the same as UpdateSecurityGroupRuleDescriptionsEgress with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSecurityGroupRuleDescriptionsEgress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) UpdateSecurityGroupRuleDescriptionsEgressWithContext(ctx aws.Context, input *UpdateSecurityGroupRuleDescriptionsEgressInput, opts ...request.Option) (*UpdateSecurityGroupRuleDescriptionsEgressOutput, error) { - req, out := c.UpdateSecurityGroupRuleDescriptionsEgressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSecurityGroupRuleDescriptionsIngress = "UpdateSecurityGroupRuleDescriptionsIngress" - -// UpdateSecurityGroupRuleDescriptionsIngressRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSecurityGroupRuleDescriptionsIngress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSecurityGroupRuleDescriptionsIngress for more information on using the UpdateSecurityGroupRuleDescriptionsIngress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSecurityGroupRuleDescriptionsIngressRequest method. -// req, resp := client.UpdateSecurityGroupRuleDescriptionsIngressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UpdateSecurityGroupRuleDescriptionsIngress -func (c *EC2) UpdateSecurityGroupRuleDescriptionsIngressRequest(input *UpdateSecurityGroupRuleDescriptionsIngressInput) (req *request.Request, output *UpdateSecurityGroupRuleDescriptionsIngressOutput) { - op := &request.Operation{ - Name: opUpdateSecurityGroupRuleDescriptionsIngress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSecurityGroupRuleDescriptionsIngressInput{} - } - - output = &UpdateSecurityGroupRuleDescriptionsIngressOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSecurityGroupRuleDescriptionsIngress API operation for Amazon Elastic Compute Cloud. -// -// Updates the description of an ingress (inbound) security group rule. You -// can replace an existing description, or add a description to a rule that -// did not have one previously. -// -// You specify the description as part of the IP permissions structure. You -// can remove a description for a security group rule by omitting the description -// parameter in the request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation UpdateSecurityGroupRuleDescriptionsIngress for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UpdateSecurityGroupRuleDescriptionsIngress -func (c *EC2) UpdateSecurityGroupRuleDescriptionsIngress(input *UpdateSecurityGroupRuleDescriptionsIngressInput) (*UpdateSecurityGroupRuleDescriptionsIngressOutput, error) { - req, out := c.UpdateSecurityGroupRuleDescriptionsIngressRequest(input) - return out, req.Send() -} - -// UpdateSecurityGroupRuleDescriptionsIngressWithContext is the same as UpdateSecurityGroupRuleDescriptionsIngress with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSecurityGroupRuleDescriptionsIngress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) UpdateSecurityGroupRuleDescriptionsIngressWithContext(ctx aws.Context, input *UpdateSecurityGroupRuleDescriptionsIngressInput, opts ...request.Option) (*UpdateSecurityGroupRuleDescriptionsIngressOutput, error) { - req, out := c.UpdateSecurityGroupRuleDescriptionsIngressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opWithdrawByoipCidr = "WithdrawByoipCidr" - -// WithdrawByoipCidrRequest generates a "aws/request.Request" representing the -// client's request for the WithdrawByoipCidr operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See WithdrawByoipCidr for more information on using the WithdrawByoipCidr -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the WithdrawByoipCidrRequest method. -// req, resp := client.WithdrawByoipCidrRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/WithdrawByoipCidr -func (c *EC2) WithdrawByoipCidrRequest(input *WithdrawByoipCidrInput) (req *request.Request, output *WithdrawByoipCidrOutput) { - op := &request.Operation{ - Name: opWithdrawByoipCidr, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &WithdrawByoipCidrInput{} - } - - output = &WithdrawByoipCidrOutput{} - req = c.newRequest(op, input, output) - return -} - -// WithdrawByoipCidr API operation for Amazon Elastic Compute Cloud. -// -// Stops advertising an IPv4 address range that is provisioned as an address -// pool. -// -// You can perform this operation at most once every 10 seconds, even if you -// specify different address ranges each time. -// -// It can take a few minutes before traffic to the specified addresses stops -// routing to AWS because of BGP propagation delays. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Compute Cloud's -// API operation WithdrawByoipCidr for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/WithdrawByoipCidr -func (c *EC2) WithdrawByoipCidr(input *WithdrawByoipCidrInput) (*WithdrawByoipCidrOutput, error) { - req, out := c.WithdrawByoipCidrRequest(input) - return out, req.Send() -} - -// WithdrawByoipCidrWithContext is the same as WithdrawByoipCidr with the addition of -// the ability to pass a context and additional request options. -// -// See WithdrawByoipCidr for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WithdrawByoipCidrWithContext(ctx aws.Context, input *WithdrawByoipCidrInput, opts ...request.Option) (*WithdrawByoipCidrOutput, error) { - req, out := c.WithdrawByoipCidrRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Contains the parameters for accepting the quote. -type AcceptReservedInstancesExchangeQuoteInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The IDs of the Convertible Reserved Instances to exchange for another Convertible - // Reserved Instance of the same or higher value. - // - // ReservedInstanceIds is a required field - ReservedInstanceIds []*string `locationName:"ReservedInstanceId" locationNameList:"ReservedInstanceId" type:"list" required:"true"` - - // The configuration of the target Convertible Reserved Instance to exchange - // for your current Convertible Reserved Instances. - TargetConfigurations []*TargetConfigurationRequest `locationName:"TargetConfiguration" locationNameList:"TargetConfigurationRequest" type:"list"` -} - -// String returns the string representation -func (s AcceptReservedInstancesExchangeQuoteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptReservedInstancesExchangeQuoteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AcceptReservedInstancesExchangeQuoteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AcceptReservedInstancesExchangeQuoteInput"} - if s.ReservedInstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedInstanceIds")) - } - if s.TargetConfigurations != nil { - for i, v := range s.TargetConfigurations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetConfigurations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *AcceptReservedInstancesExchangeQuoteInput) SetDryRun(v bool) *AcceptReservedInstancesExchangeQuoteInput { - s.DryRun = &v - return s -} - -// SetReservedInstanceIds sets the ReservedInstanceIds field's value. -func (s *AcceptReservedInstancesExchangeQuoteInput) SetReservedInstanceIds(v []*string) *AcceptReservedInstancesExchangeQuoteInput { - s.ReservedInstanceIds = v - return s -} - -// SetTargetConfigurations sets the TargetConfigurations field's value. -func (s *AcceptReservedInstancesExchangeQuoteInput) SetTargetConfigurations(v []*TargetConfigurationRequest) *AcceptReservedInstancesExchangeQuoteInput { - s.TargetConfigurations = v - return s -} - -// The result of the exchange and whether it was successful. -type AcceptReservedInstancesExchangeQuoteOutput struct { - _ struct{} `type:"structure"` - - // The ID of the successful exchange. - ExchangeId *string `locationName:"exchangeId" type:"string"` -} - -// String returns the string representation -func (s AcceptReservedInstancesExchangeQuoteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptReservedInstancesExchangeQuoteOutput) GoString() string { - return s.String() -} - -// SetExchangeId sets the ExchangeId field's value. -func (s *AcceptReservedInstancesExchangeQuoteOutput) SetExchangeId(v string) *AcceptReservedInstancesExchangeQuoteOutput { - s.ExchangeId = &v - return s -} - -type AcceptTransitGatewayVpcAttachmentInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the attachment. - // - // TransitGatewayAttachmentId is a required field - TransitGatewayAttachmentId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AcceptTransitGatewayVpcAttachmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptTransitGatewayVpcAttachmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AcceptTransitGatewayVpcAttachmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AcceptTransitGatewayVpcAttachmentInput"} - if s.TransitGatewayAttachmentId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *AcceptTransitGatewayVpcAttachmentInput) SetDryRun(v bool) *AcceptTransitGatewayVpcAttachmentInput { - s.DryRun = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *AcceptTransitGatewayVpcAttachmentInput) SetTransitGatewayAttachmentId(v string) *AcceptTransitGatewayVpcAttachmentInput { - s.TransitGatewayAttachmentId = &v - return s -} - -type AcceptTransitGatewayVpcAttachmentOutput struct { - _ struct{} `type:"structure"` - - // The VPC attachment. - TransitGatewayVpcAttachment *TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachment" type:"structure"` -} - -// String returns the string representation -func (s AcceptTransitGatewayVpcAttachmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptTransitGatewayVpcAttachmentOutput) GoString() string { - return s.String() -} - -// SetTransitGatewayVpcAttachment sets the TransitGatewayVpcAttachment field's value. -func (s *AcceptTransitGatewayVpcAttachmentOutput) SetTransitGatewayVpcAttachment(v *TransitGatewayVpcAttachment) *AcceptTransitGatewayVpcAttachmentOutput { - s.TransitGatewayVpcAttachment = v - return s -} - -type AcceptVpcEndpointConnectionsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the endpoint service. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` - - // The IDs of one or more interface VPC endpoints. - // - // VpcEndpointIds is a required field - VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s AcceptVpcEndpointConnectionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptVpcEndpointConnectionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AcceptVpcEndpointConnectionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AcceptVpcEndpointConnectionsInput"} - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) - } - if s.VpcEndpointIds == nil { - invalidParams.Add(request.NewErrParamRequired("VpcEndpointIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *AcceptVpcEndpointConnectionsInput) SetDryRun(v bool) *AcceptVpcEndpointConnectionsInput { - s.DryRun = &v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *AcceptVpcEndpointConnectionsInput) SetServiceId(v string) *AcceptVpcEndpointConnectionsInput { - s.ServiceId = &v - return s -} - -// SetVpcEndpointIds sets the VpcEndpointIds field's value. -func (s *AcceptVpcEndpointConnectionsInput) SetVpcEndpointIds(v []*string) *AcceptVpcEndpointConnectionsInput { - s.VpcEndpointIds = v - return s -} - -type AcceptVpcEndpointConnectionsOutput struct { - _ struct{} `type:"structure"` - - // Information about the interface endpoints that were not accepted, if applicable. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s AcceptVpcEndpointConnectionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptVpcEndpointConnectionsOutput) GoString() string { - return s.String() -} - -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *AcceptVpcEndpointConnectionsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *AcceptVpcEndpointConnectionsOutput { - s.Unsuccessful = v - return s -} - -type AcceptVpcPeeringConnectionInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC peering connection. You must specify this parameter in - // the request. - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` -} - -// String returns the string representation -func (s AcceptVpcPeeringConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptVpcPeeringConnectionInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *AcceptVpcPeeringConnectionInput) SetDryRun(v bool) *AcceptVpcPeeringConnectionInput { - s.DryRun = &v - return s -} - -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *AcceptVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *AcceptVpcPeeringConnectionInput { - s.VpcPeeringConnectionId = &v - return s -} - -type AcceptVpcPeeringConnectionOutput struct { - _ struct{} `type:"structure"` - - // Information about the VPC peering connection. - VpcPeeringConnection *VpcPeeringConnection `locationName:"vpcPeeringConnection" type:"structure"` -} - -// String returns the string representation -func (s AcceptVpcPeeringConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptVpcPeeringConnectionOutput) GoString() string { - return s.String() -} - -// SetVpcPeeringConnection sets the VpcPeeringConnection field's value. -func (s *AcceptVpcPeeringConnectionOutput) SetVpcPeeringConnection(v *VpcPeeringConnection) *AcceptVpcPeeringConnectionOutput { - s.VpcPeeringConnection = v - return s -} - -// Describes an account attribute. -type AccountAttribute struct { - _ struct{} `type:"structure"` - - // The name of the account attribute. - AttributeName *string `locationName:"attributeName" type:"string"` - - // One or more values for the account attribute. - AttributeValues []*AccountAttributeValue `locationName:"attributeValueSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s AccountAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountAttribute) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *AccountAttribute) SetAttributeName(v string) *AccountAttribute { - s.AttributeName = &v - return s -} - -// SetAttributeValues sets the AttributeValues field's value. -func (s *AccountAttribute) SetAttributeValues(v []*AccountAttributeValue) *AccountAttribute { - s.AttributeValues = v - return s -} - -// Describes a value of an account attribute. -type AccountAttributeValue struct { - _ struct{} `type:"structure"` - - // The value of the attribute. - AttributeValue *string `locationName:"attributeValue" type:"string"` -} - -// String returns the string representation -func (s AccountAttributeValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountAttributeValue) GoString() string { - return s.String() -} - -// SetAttributeValue sets the AttributeValue field's value. -func (s *AccountAttributeValue) SetAttributeValue(v string) *AccountAttributeValue { - s.AttributeValue = &v - return s -} - -// Describes a running instance in a Spot Fleet. -type ActiveInstance struct { - _ struct{} `type:"structure"` - - // The health status of the instance. If the status of either the instance status - // check or the system status check is impaired, the health status of the instance - // is unhealthy. Otherwise, the health status is healthy. - InstanceHealth *string `locationName:"instanceHealth" type:"string" enum:"InstanceHealthStatus"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string"` - - // The ID of the Spot Instance request. - SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"` -} - -// String returns the string representation -func (s ActiveInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActiveInstance) GoString() string { - return s.String() -} - -// SetInstanceHealth sets the InstanceHealth field's value. -func (s *ActiveInstance) SetInstanceHealth(v string) *ActiveInstance { - s.InstanceHealth = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ActiveInstance) SetInstanceId(v string) *ActiveInstance { - s.InstanceId = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ActiveInstance) SetInstanceType(v string) *ActiveInstance { - s.InstanceType = &v - return s -} - -// SetSpotInstanceRequestId sets the SpotInstanceRequestId field's value. -func (s *ActiveInstance) SetSpotInstanceRequestId(v string) *ActiveInstance { - s.SpotInstanceRequestId = &v - return s -} - -// Describes an Elastic IP address. -type Address struct { - _ struct{} `type:"structure"` - - // The ID representing the allocation of the address for use with EC2-VPC. - AllocationId *string `locationName:"allocationId" type:"string"` - - // The ID representing the association of the address with an instance in a - // VPC. - AssociationId *string `locationName:"associationId" type:"string"` - - // Indicates whether this Elastic IP address is for use with instances in EC2-Classic - // (standard) or instances in a VPC (vpc). - Domain *string `locationName:"domain" type:"string" enum:"DomainType"` - - // The ID of the instance that the address is associated with (if any). - InstanceId *string `locationName:"instanceId" type:"string"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // The ID of the AWS account that owns the network interface. - NetworkInterfaceOwnerId *string `locationName:"networkInterfaceOwnerId" type:"string"` - - // The private IP address associated with the Elastic IP address. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // The Elastic IP address. - PublicIp *string `locationName:"publicIp" type:"string"` - - // The ID of an address pool. - PublicIpv4Pool *string `locationName:"publicIpv4Pool" type:"string"` - - // Any tags assigned to the Elastic IP address. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s Address) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Address) GoString() string { - return s.String() -} - -// SetAllocationId sets the AllocationId field's value. -func (s *Address) SetAllocationId(v string) *Address { - s.AllocationId = &v - return s -} - -// SetAssociationId sets the AssociationId field's value. -func (s *Address) SetAssociationId(v string) *Address { - s.AssociationId = &v - return s -} - -// SetDomain sets the Domain field's value. -func (s *Address) SetDomain(v string) *Address { - s.Domain = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *Address) SetInstanceId(v string) *Address { - s.InstanceId = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *Address) SetNetworkInterfaceId(v string) *Address { - s.NetworkInterfaceId = &v - return s -} - -// SetNetworkInterfaceOwnerId sets the NetworkInterfaceOwnerId field's value. -func (s *Address) SetNetworkInterfaceOwnerId(v string) *Address { - s.NetworkInterfaceOwnerId = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *Address) SetPrivateIpAddress(v string) *Address { - s.PrivateIpAddress = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *Address) SetPublicIp(v string) *Address { - s.PublicIp = &v - return s -} - -// SetPublicIpv4Pool sets the PublicIpv4Pool field's value. -func (s *Address) SetPublicIpv4Pool(v string) *Address { - s.PublicIpv4Pool = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Address) SetTags(v []*Tag) *Address { - s.Tags = v - return s -} - -type AdvertiseByoipCidrInput struct { - _ struct{} `type:"structure"` - - // The IPv4 address range, in CIDR notation. - // - // Cidr is a required field - Cidr *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s AdvertiseByoipCidrInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdvertiseByoipCidrInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AdvertiseByoipCidrInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AdvertiseByoipCidrInput"} - if s.Cidr == nil { - invalidParams.Add(request.NewErrParamRequired("Cidr")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCidr sets the Cidr field's value. -func (s *AdvertiseByoipCidrInput) SetCidr(v string) *AdvertiseByoipCidrInput { - s.Cidr = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *AdvertiseByoipCidrInput) SetDryRun(v bool) *AdvertiseByoipCidrInput { - s.DryRun = &v - return s -} - -type AdvertiseByoipCidrOutput struct { - _ struct{} `type:"structure"` - - // Information about the address range. - ByoipCidr *ByoipCidr `locationName:"byoipCidr" type:"structure"` -} - -// String returns the string representation -func (s AdvertiseByoipCidrOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdvertiseByoipCidrOutput) GoString() string { - return s.String() -} - -// SetByoipCidr sets the ByoipCidr field's value. -func (s *AdvertiseByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *AdvertiseByoipCidrOutput { - s.ByoipCidr = v - return s -} - -type AllocateAddressInput struct { - _ struct{} `type:"structure"` - - // [EC2-VPC] The Elastic IP address to recover or an IPv4 address from an address - // pool. - Address *string `type:"string"` - - // Set to vpc to allocate the address for use with instances in a VPC. - // - // Default: The address is for use with instances in EC2-Classic. - Domain *string `type:"string" enum:"DomainType"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of an address pool that you own. Use this parameter to let Amazon - // EC2 select an address from the address pool. To specify a specific address - // from the address pool, use the Address parameter instead. - PublicIpv4Pool *string `type:"string"` -} - -// String returns the string representation -func (s AllocateAddressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AllocateAddressInput) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *AllocateAddressInput) SetAddress(v string) *AllocateAddressInput { - s.Address = &v - return s -} - -// SetDomain sets the Domain field's value. -func (s *AllocateAddressInput) SetDomain(v string) *AllocateAddressInput { - s.Domain = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *AllocateAddressInput) SetDryRun(v bool) *AllocateAddressInput { - s.DryRun = &v - return s -} - -// SetPublicIpv4Pool sets the PublicIpv4Pool field's value. -func (s *AllocateAddressInput) SetPublicIpv4Pool(v string) *AllocateAddressInput { - s.PublicIpv4Pool = &v - return s -} - -type AllocateAddressOutput struct { - _ struct{} `type:"structure"` - - // [EC2-VPC] The ID that AWS assigns to represent the allocation of the Elastic - // IP address for use with instances in a VPC. - AllocationId *string `locationName:"allocationId" type:"string"` - - // Indicates whether this Elastic IP address is for use with instances in EC2-Classic - // (standard) or instances in a VPC (vpc). - Domain *string `locationName:"domain" type:"string" enum:"DomainType"` - - // The Elastic IP address. - PublicIp *string `locationName:"publicIp" type:"string"` - - // The ID of an address pool. - PublicIpv4Pool *string `locationName:"publicIpv4Pool" type:"string"` -} - -// String returns the string representation -func (s AllocateAddressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AllocateAddressOutput) GoString() string { - return s.String() -} - -// SetAllocationId sets the AllocationId field's value. -func (s *AllocateAddressOutput) SetAllocationId(v string) *AllocateAddressOutput { - s.AllocationId = &v - return s -} - -// SetDomain sets the Domain field's value. -func (s *AllocateAddressOutput) SetDomain(v string) *AllocateAddressOutput { - s.Domain = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *AllocateAddressOutput) SetPublicIp(v string) *AllocateAddressOutput { - s.PublicIp = &v - return s -} - -// SetPublicIpv4Pool sets the PublicIpv4Pool field's value. -func (s *AllocateAddressOutput) SetPublicIpv4Pool(v string) *AllocateAddressOutput { - s.PublicIpv4Pool = &v - return s -} - -type AllocateHostsInput struct { - _ struct{} `type:"structure"` - - // This is enabled by default. This property allows instances to be automatically - // placed onto available Dedicated Hosts, when you are launching instances without - // specifying a host ID. - // - // Default: Enabled - AutoPlacement *string `locationName:"autoPlacement" type:"string" enum:"AutoPlacement"` - - // The Availability Zone for the Dedicated Hosts. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Specify the instance type for which to configure your Dedicated Hosts. When - // you specify the instance type, that is the only instance type that you can - // launch onto that host. - // - // InstanceType is a required field - InstanceType *string `locationName:"instanceType" type:"string" required:"true"` - - // The number of Dedicated Hosts to allocate to your account with these parameters. - // - // Quantity is a required field - Quantity *int64 `locationName:"quantity" type:"integer" required:"true"` - - // The tags to apply to the Dedicated Host during creation. - TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s AllocateHostsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AllocateHostsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AllocateHostsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AllocateHostsInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceType")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoPlacement sets the AutoPlacement field's value. -func (s *AllocateHostsInput) SetAutoPlacement(v string) *AllocateHostsInput { - s.AutoPlacement = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *AllocateHostsInput) SetAvailabilityZone(v string) *AllocateHostsInput { - s.AvailabilityZone = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *AllocateHostsInput) SetClientToken(v string) *AllocateHostsInput { - s.ClientToken = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *AllocateHostsInput) SetInstanceType(v string) *AllocateHostsInput { - s.InstanceType = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *AllocateHostsInput) SetQuantity(v int64) *AllocateHostsInput { - s.Quantity = &v - return s -} - -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *AllocateHostsInput) SetTagSpecifications(v []*TagSpecification) *AllocateHostsInput { - s.TagSpecifications = v - return s -} - -// Contains the output of AllocateHosts. -type AllocateHostsOutput struct { - _ struct{} `type:"structure"` - - // The ID of the allocated Dedicated Host. This is used to launch an instance - // onto a specific host. - HostIds []*string `locationName:"hostIdSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s AllocateHostsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AllocateHostsOutput) GoString() string { - return s.String() -} - -// SetHostIds sets the HostIds field's value. -func (s *AllocateHostsOutput) SetHostIds(v []*string) *AllocateHostsOutput { - s.HostIds = v - return s -} - -// Describes a principal. -type AllowedPrincipal struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the principal. - Principal *string `locationName:"principal" type:"string"` - - // The type of principal. - PrincipalType *string `locationName:"principalType" type:"string" enum:"PrincipalType"` -} - -// String returns the string representation -func (s AllowedPrincipal) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AllowedPrincipal) GoString() string { - return s.String() -} - -// SetPrincipal sets the Principal field's value. -func (s *AllowedPrincipal) SetPrincipal(v string) *AllowedPrincipal { - s.Principal = &v - return s -} - -// SetPrincipalType sets the PrincipalType field's value. -func (s *AllowedPrincipal) SetPrincipalType(v string) *AllowedPrincipal { - s.PrincipalType = &v - return s -} - -type ApplySecurityGroupsToClientVpnTargetNetworkInput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The IDs of the security groups to apply to the associated target network. - // Up to 5 security groups can be applied to an associated target network. - // - // SecurityGroupIds is a required field - SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list" required:"true"` - - // The ID of the VPC in which the associated target network is located. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ApplySecurityGroupsToClientVpnTargetNetworkInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplySecurityGroupsToClientVpnTargetNetworkInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ApplySecurityGroupsToClientVpnTargetNetworkInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - if s.SecurityGroupIds == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) SetClientVpnEndpointId(v string) *ApplySecurityGroupsToClientVpnTargetNetworkInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) SetDryRun(v bool) *ApplySecurityGroupsToClientVpnTargetNetworkInput { - s.DryRun = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) SetSecurityGroupIds(v []*string) *ApplySecurityGroupsToClientVpnTargetNetworkInput { - s.SecurityGroupIds = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) SetVpcId(v string) *ApplySecurityGroupsToClientVpnTargetNetworkInput { - s.VpcId = &v - return s -} - -type ApplySecurityGroupsToClientVpnTargetNetworkOutput struct { - _ struct{} `type:"structure"` - - // The IDs of the applied security groups. - SecurityGroupIds []*string `locationName:"securityGroupIds" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s ApplySecurityGroupsToClientVpnTargetNetworkOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplySecurityGroupsToClientVpnTargetNetworkOutput) GoString() string { - return s.String() -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *ApplySecurityGroupsToClientVpnTargetNetworkOutput) SetSecurityGroupIds(v []*string) *ApplySecurityGroupsToClientVpnTargetNetworkOutput { - s.SecurityGroupIds = v - return s -} - -type AssignIpv6AddressesInput struct { - _ struct{} `type:"structure"` - - // The number of IPv6 addresses to assign to the network interface. Amazon EC2 - // automatically selects the IPv6 addresses from the subnet range. You can't - // use this option if specifying specific IPv6 addresses. - Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` - - // One or more specific IPv6 addresses to be assigned to the network interface. - // You can't use this option if you're specifying a number of IPv6 addresses. - Ipv6Addresses []*string `locationName:"ipv6Addresses" locationNameList:"item" type:"list"` - - // The ID of the network interface. - // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssignIpv6AddressesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssignIpv6AddressesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssignIpv6AddressesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssignIpv6AddressesInput"} - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIpv6AddressCount sets the Ipv6AddressCount field's value. -func (s *AssignIpv6AddressesInput) SetIpv6AddressCount(v int64) *AssignIpv6AddressesInput { - s.Ipv6AddressCount = &v - return s -} - -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *AssignIpv6AddressesInput) SetIpv6Addresses(v []*string) *AssignIpv6AddressesInput { - s.Ipv6Addresses = v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *AssignIpv6AddressesInput) SetNetworkInterfaceId(v string) *AssignIpv6AddressesInput { - s.NetworkInterfaceId = &v - return s -} - -type AssignIpv6AddressesOutput struct { - _ struct{} `type:"structure"` - - // The IPv6 addresses assigned to the network interface. - AssignedIpv6Addresses []*string `locationName:"assignedIpv6Addresses" locationNameList:"item" type:"list"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` -} - -// String returns the string representation -func (s AssignIpv6AddressesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssignIpv6AddressesOutput) GoString() string { - return s.String() -} - -// SetAssignedIpv6Addresses sets the AssignedIpv6Addresses field's value. -func (s *AssignIpv6AddressesOutput) SetAssignedIpv6Addresses(v []*string) *AssignIpv6AddressesOutput { - s.AssignedIpv6Addresses = v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *AssignIpv6AddressesOutput) SetNetworkInterfaceId(v string) *AssignIpv6AddressesOutput { - s.NetworkInterfaceId = &v - return s -} - -// Contains the parameters for AssignPrivateIpAddresses. -type AssignPrivateIpAddressesInput struct { - _ struct{} `type:"structure"` - - // Indicates whether to allow an IP address that is already assigned to another - // network interface or instance to be reassigned to the specified network interface. - AllowReassignment *bool `locationName:"allowReassignment" type:"boolean"` - - // The ID of the network interface. - // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` - - // One or more IP addresses to be assigned as a secondary private IP address - // to the network interface. You can't specify this parameter when also specifying - // a number of secondary IP addresses. - // - // If you don't specify an IP address, Amazon EC2 automatically selects an IP - // address within the subnet range. - PrivateIpAddresses []*string `locationName:"privateIpAddress" locationNameList:"PrivateIpAddress" type:"list"` - - // The number of secondary IP addresses to assign to the network interface. - // You can't specify this parameter when also specifying private IP addresses. - SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` -} - -// String returns the string representation -func (s AssignPrivateIpAddressesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssignPrivateIpAddressesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssignPrivateIpAddressesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssignPrivateIpAddressesInput"} - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowReassignment sets the AllowReassignment field's value. -func (s *AssignPrivateIpAddressesInput) SetAllowReassignment(v bool) *AssignPrivateIpAddressesInput { - s.AllowReassignment = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *AssignPrivateIpAddressesInput) SetNetworkInterfaceId(v string) *AssignPrivateIpAddressesInput { - s.NetworkInterfaceId = &v - return s -} - -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *AssignPrivateIpAddressesInput) SetPrivateIpAddresses(v []*string) *AssignPrivateIpAddressesInput { - s.PrivateIpAddresses = v - return s -} - -// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. -func (s *AssignPrivateIpAddressesInput) SetSecondaryPrivateIpAddressCount(v int64) *AssignPrivateIpAddressesInput { - s.SecondaryPrivateIpAddressCount = &v - return s -} - -type AssignPrivateIpAddressesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssignPrivateIpAddressesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssignPrivateIpAddressesOutput) GoString() string { - return s.String() -} - -type AssociateAddressInput struct { - _ struct{} `type:"structure"` - - // [EC2-VPC] The allocation ID. This is required for EC2-VPC. - AllocationId *string `type:"string"` - - // [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic - // IP address that is already associated with an instance or network interface - // to be reassociated with the specified instance or network interface. Otherwise, - // the operation fails. In a VPC in an EC2-VPC-only account, reassociation is - // automatic, therefore you can specify false to ensure the operation fails - // if the Elastic IP address is already associated with another resource. - AllowReassociation *bool `locationName:"allowReassociation" type:"boolean"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you - // can specify either the instance ID or the network interface ID, but not both. - // The operation fails if you specify an instance ID unless exactly one network - // interface is attached. - InstanceId *string `type:"string"` - - // [EC2-VPC] The ID of the network interface. If the instance has more than - // one network interface, you must specify a network interface ID. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // [EC2-VPC] The primary or secondary private IP address to associate with the - // Elastic IP address. If no private IP address is specified, the Elastic IP - // address is associated with the primary private IP address. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // The Elastic IP address. This is required for EC2-Classic. - PublicIp *string `type:"string"` -} - -// String returns the string representation -func (s AssociateAddressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateAddressInput) GoString() string { - return s.String() -} - -// SetAllocationId sets the AllocationId field's value. -func (s *AssociateAddressInput) SetAllocationId(v string) *AssociateAddressInput { - s.AllocationId = &v - return s -} - -// SetAllowReassociation sets the AllowReassociation field's value. -func (s *AssociateAddressInput) SetAllowReassociation(v bool) *AssociateAddressInput { - s.AllowReassociation = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *AssociateAddressInput) SetDryRun(v bool) *AssociateAddressInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *AssociateAddressInput) SetInstanceId(v string) *AssociateAddressInput { - s.InstanceId = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *AssociateAddressInput) SetNetworkInterfaceId(v string) *AssociateAddressInput { - s.NetworkInterfaceId = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *AssociateAddressInput) SetPrivateIpAddress(v string) *AssociateAddressInput { - s.PrivateIpAddress = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *AssociateAddressInput) SetPublicIp(v string) *AssociateAddressInput { - s.PublicIp = &v - return s -} - -type AssociateAddressOutput struct { - _ struct{} `type:"structure"` - - // [EC2-VPC] The ID that represents the association of the Elastic IP address - // with an instance. - AssociationId *string `locationName:"associationId" type:"string"` -} - -// String returns the string representation -func (s AssociateAddressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateAddressOutput) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *AssociateAddressOutput) SetAssociationId(v string) *AssociateAddressOutput { - s.AssociationId = &v - return s -} - -type AssociateClientVpnTargetNetworkInput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the subnet to associate with the Client VPN endpoint. - // - // SubnetId is a required field - SubnetId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateClientVpnTargetNetworkInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateClientVpnTargetNetworkInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateClientVpnTargetNetworkInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateClientVpnTargetNetworkInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - if s.SubnetId == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *AssociateClientVpnTargetNetworkInput) SetClientVpnEndpointId(v string) *AssociateClientVpnTargetNetworkInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *AssociateClientVpnTargetNetworkInput) SetDryRun(v bool) *AssociateClientVpnTargetNetworkInput { - s.DryRun = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *AssociateClientVpnTargetNetworkInput) SetSubnetId(v string) *AssociateClientVpnTargetNetworkInput { - s.SubnetId = &v - return s -} - -type AssociateClientVpnTargetNetworkOutput struct { - _ struct{} `type:"structure"` - - // The unique ID of the target network association. - AssociationId *string `locationName:"associationId" type:"string"` - - // The current state of the target network association. - Status *AssociationStatus `locationName:"status" type:"structure"` -} - -// String returns the string representation -func (s AssociateClientVpnTargetNetworkOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateClientVpnTargetNetworkOutput) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *AssociateClientVpnTargetNetworkOutput) SetAssociationId(v string) *AssociateClientVpnTargetNetworkOutput { - s.AssociationId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AssociateClientVpnTargetNetworkOutput) SetStatus(v *AssociationStatus) *AssociateClientVpnTargetNetworkOutput { - s.Status = v - return s -} - -type AssociateDhcpOptionsInput struct { - _ struct{} `type:"structure"` - - // The ID of the DHCP options set, or default to associate no DHCP options with - // the VPC. - // - // DhcpOptionsId is a required field - DhcpOptionsId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateDhcpOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateDhcpOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateDhcpOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateDhcpOptionsInput"} - if s.DhcpOptionsId == nil { - invalidParams.Add(request.NewErrParamRequired("DhcpOptionsId")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDhcpOptionsId sets the DhcpOptionsId field's value. -func (s *AssociateDhcpOptionsInput) SetDhcpOptionsId(v string) *AssociateDhcpOptionsInput { - s.DhcpOptionsId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *AssociateDhcpOptionsInput) SetDryRun(v bool) *AssociateDhcpOptionsInput { - s.DryRun = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *AssociateDhcpOptionsInput) SetVpcId(v string) *AssociateDhcpOptionsInput { - s.VpcId = &v - return s -} - -type AssociateDhcpOptionsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssociateDhcpOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateDhcpOptionsOutput) GoString() string { - return s.String() -} - -type AssociateIamInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The IAM instance profile. - // - // IamInstanceProfile is a required field - IamInstanceProfile *IamInstanceProfileSpecification `type:"structure" required:"true"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateIamInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateIamInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateIamInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateIamInstanceProfileInput"} - if s.IamInstanceProfile == nil { - invalidParams.Add(request.NewErrParamRequired("IamInstanceProfile")) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *AssociateIamInstanceProfileInput) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *AssociateIamInstanceProfileInput { - s.IamInstanceProfile = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *AssociateIamInstanceProfileInput) SetInstanceId(v string) *AssociateIamInstanceProfileInput { - s.InstanceId = &v - return s -} - -type AssociateIamInstanceProfileOutput struct { - _ struct{} `type:"structure"` - - // Information about the IAM instance profile association. - IamInstanceProfileAssociation *IamInstanceProfileAssociation `locationName:"iamInstanceProfileAssociation" type:"structure"` -} - -// String returns the string representation -func (s AssociateIamInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateIamInstanceProfileOutput) GoString() string { - return s.String() -} - -// SetIamInstanceProfileAssociation sets the IamInstanceProfileAssociation field's value. -func (s *AssociateIamInstanceProfileOutput) SetIamInstanceProfileAssociation(v *IamInstanceProfileAssociation) *AssociateIamInstanceProfileOutput { - s.IamInstanceProfileAssociation = v - return s -} - -type AssociateRouteTableInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the route table. - // - // RouteTableId is a required field - RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` - - // The ID of the subnet. - // - // SubnetId is a required field - SubnetId *string `locationName:"subnetId" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateRouteTableInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateRouteTableInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateRouteTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateRouteTableInput"} - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) - } - if s.SubnetId == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *AssociateRouteTableInput) SetDryRun(v bool) *AssociateRouteTableInput { - s.DryRun = &v - return s -} - -// SetRouteTableId sets the RouteTableId field's value. -func (s *AssociateRouteTableInput) SetRouteTableId(v string) *AssociateRouteTableInput { - s.RouteTableId = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *AssociateRouteTableInput) SetSubnetId(v string) *AssociateRouteTableInput { - s.SubnetId = &v - return s -} - -type AssociateRouteTableOutput struct { - _ struct{} `type:"structure"` - - // The route table association ID. This ID is required for disassociating the - // route table. - AssociationId *string `locationName:"associationId" type:"string"` -} - -// String returns the string representation -func (s AssociateRouteTableOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateRouteTableOutput) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *AssociateRouteTableOutput) SetAssociationId(v string) *AssociateRouteTableOutput { - s.AssociationId = &v - return s -} - -type AssociateSubnetCidrBlockInput struct { - _ struct{} `type:"structure"` - - // The IPv6 CIDR block for your subnet. The subnet must have a /64 prefix length. - // - // Ipv6CidrBlock is a required field - Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string" required:"true"` - - // The ID of your subnet. - // - // SubnetId is a required field - SubnetId *string `locationName:"subnetId" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateSubnetCidrBlockInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateSubnetCidrBlockInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateSubnetCidrBlockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateSubnetCidrBlockInput"} - if s.Ipv6CidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("Ipv6CidrBlock")) - } - if s.SubnetId == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. -func (s *AssociateSubnetCidrBlockInput) SetIpv6CidrBlock(v string) *AssociateSubnetCidrBlockInput { - s.Ipv6CidrBlock = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *AssociateSubnetCidrBlockInput) SetSubnetId(v string) *AssociateSubnetCidrBlockInput { - s.SubnetId = &v - return s -} - -type AssociateSubnetCidrBlockOutput struct { - _ struct{} `type:"structure"` - - // Information about the IPv6 CIDR block association. - Ipv6CidrBlockAssociation *SubnetIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociation" type:"structure"` - - // The ID of the subnet. - SubnetId *string `locationName:"subnetId" type:"string"` -} - -// String returns the string representation -func (s AssociateSubnetCidrBlockOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateSubnetCidrBlockOutput) GoString() string { - return s.String() -} - -// SetIpv6CidrBlockAssociation sets the Ipv6CidrBlockAssociation field's value. -func (s *AssociateSubnetCidrBlockOutput) SetIpv6CidrBlockAssociation(v *SubnetIpv6CidrBlockAssociation) *AssociateSubnetCidrBlockOutput { - s.Ipv6CidrBlockAssociation = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *AssociateSubnetCidrBlockOutput) SetSubnetId(v string) *AssociateSubnetCidrBlockOutput { - s.SubnetId = &v - return s -} - -type AssociateTransitGatewayRouteTableInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the attachment. - // - // TransitGatewayAttachmentId is a required field - TransitGatewayAttachmentId *string `type:"string" required:"true"` - - // The ID of the transit gateway route table. - // - // TransitGatewayRouteTableId is a required field - TransitGatewayRouteTableId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateTransitGatewayRouteTableInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateTransitGatewayRouteTableInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateTransitGatewayRouteTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateTransitGatewayRouteTableInput"} - if s.TransitGatewayAttachmentId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if s.TransitGatewayRouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *AssociateTransitGatewayRouteTableInput) SetDryRun(v bool) *AssociateTransitGatewayRouteTableInput { - s.DryRun = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *AssociateTransitGatewayRouteTableInput) SetTransitGatewayAttachmentId(v string) *AssociateTransitGatewayRouteTableInput { - s.TransitGatewayAttachmentId = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *AssociateTransitGatewayRouteTableInput) SetTransitGatewayRouteTableId(v string) *AssociateTransitGatewayRouteTableInput { - s.TransitGatewayRouteTableId = &v - return s -} - -type AssociateTransitGatewayRouteTableOutput struct { - _ struct{} `type:"structure"` - - // The ID of the association. - Association *TransitGatewayAssociation `locationName:"association" type:"structure"` -} - -// String returns the string representation -func (s AssociateTransitGatewayRouteTableOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateTransitGatewayRouteTableOutput) GoString() string { - return s.String() -} - -// SetAssociation sets the Association field's value. -func (s *AssociateTransitGatewayRouteTableOutput) SetAssociation(v *TransitGatewayAssociation) *AssociateTransitGatewayRouteTableOutput { - s.Association = v - return s -} - -type AssociateVpcCidrBlockInput struct { - _ struct{} `type:"structure"` - - // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for - // the VPC. You cannot specify the range of IPv6 addresses, or the size of the - // CIDR block. - AmazonProvidedIpv6CidrBlock *bool `locationName:"amazonProvidedIpv6CidrBlock" type:"boolean"` - - // An IPv4 CIDR block to associate with the VPC. - CidrBlock *string `type:"string"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateVpcCidrBlockInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateVpcCidrBlockInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateVpcCidrBlockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateVpcCidrBlockInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAmazonProvidedIpv6CidrBlock sets the AmazonProvidedIpv6CidrBlock field's value. -func (s *AssociateVpcCidrBlockInput) SetAmazonProvidedIpv6CidrBlock(v bool) *AssociateVpcCidrBlockInput { - s.AmazonProvidedIpv6CidrBlock = &v - return s -} - -// SetCidrBlock sets the CidrBlock field's value. -func (s *AssociateVpcCidrBlockInput) SetCidrBlock(v string) *AssociateVpcCidrBlockInput { - s.CidrBlock = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *AssociateVpcCidrBlockInput) SetVpcId(v string) *AssociateVpcCidrBlockInput { - s.VpcId = &v - return s -} - -type AssociateVpcCidrBlockOutput struct { - _ struct{} `type:"structure"` - - // Information about the IPv4 CIDR block association. - CidrBlockAssociation *VpcCidrBlockAssociation `locationName:"cidrBlockAssociation" type:"structure"` - - // Information about the IPv6 CIDR block association. - Ipv6CidrBlockAssociation *VpcIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociation" type:"structure"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s AssociateVpcCidrBlockOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateVpcCidrBlockOutput) GoString() string { - return s.String() -} - -// SetCidrBlockAssociation sets the CidrBlockAssociation field's value. -func (s *AssociateVpcCidrBlockOutput) SetCidrBlockAssociation(v *VpcCidrBlockAssociation) *AssociateVpcCidrBlockOutput { - s.CidrBlockAssociation = v - return s -} - -// SetIpv6CidrBlockAssociation sets the Ipv6CidrBlockAssociation field's value. -func (s *AssociateVpcCidrBlockOutput) SetIpv6CidrBlockAssociation(v *VpcIpv6CidrBlockAssociation) *AssociateVpcCidrBlockOutput { - s.Ipv6CidrBlockAssociation = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *AssociateVpcCidrBlockOutput) SetVpcId(v string) *AssociateVpcCidrBlockOutput { - s.VpcId = &v - return s -} - -// Describes a target network that is associated with a Client VPN endpoint. -// A target network is a subnet in a VPC. -type AssociatedTargetNetwork struct { - _ struct{} `type:"structure"` - - // The ID of the subnet. - NetworkId *string `locationName:"networkId" type:"string"` - - // The target network type. - NetworkType *string `locationName:"networkType" type:"string" enum:"AssociatedNetworkType"` -} - -// String returns the string representation -func (s AssociatedTargetNetwork) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociatedTargetNetwork) GoString() string { - return s.String() -} - -// SetNetworkId sets the NetworkId field's value. -func (s *AssociatedTargetNetwork) SetNetworkId(v string) *AssociatedTargetNetwork { - s.NetworkId = &v - return s -} - -// SetNetworkType sets the NetworkType field's value. -func (s *AssociatedTargetNetwork) SetNetworkType(v string) *AssociatedTargetNetwork { - s.NetworkType = &v - return s -} - -// Describes the state of a target network association. -type AssociationStatus struct { - _ struct{} `type:"structure"` - - // The state of the target network association. - Code *string `locationName:"code" type:"string" enum:"AssociationStatusCode"` - - // A message about the status of the target network association, if applicable. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s AssociationStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociationStatus) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *AssociationStatus) SetCode(v string) *AssociationStatus { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *AssociationStatus) SetMessage(v string) *AssociationStatus { - s.Message = &v - return s -} - -type AttachClassicLinkVpcInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of one or more of the VPC's security groups. You cannot specify security - // groups from a different VPC. - // - // Groups is a required field - Groups []*string `locationName:"SecurityGroupId" locationNameList:"groupId" type:"list" required:"true"` - - // The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC. - // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` - - // The ID of a ClassicLink-enabled VPC. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachClassicLinkVpcInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachClassicLinkVpcInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachClassicLinkVpcInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachClassicLinkVpcInput"} - if s.Groups == nil { - invalidParams.Add(request.NewErrParamRequired("Groups")) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *AttachClassicLinkVpcInput) SetDryRun(v bool) *AttachClassicLinkVpcInput { - s.DryRun = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *AttachClassicLinkVpcInput) SetGroups(v []*string) *AttachClassicLinkVpcInput { - s.Groups = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *AttachClassicLinkVpcInput) SetInstanceId(v string) *AttachClassicLinkVpcInput { - s.InstanceId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *AttachClassicLinkVpcInput) SetVpcId(v string) *AttachClassicLinkVpcInput { - s.VpcId = &v - return s -} - -type AttachClassicLinkVpcOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s AttachClassicLinkVpcOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachClassicLinkVpcOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *AttachClassicLinkVpcOutput) SetReturn(v bool) *AttachClassicLinkVpcOutput { - s.Return = &v - return s -} - -type AttachInternetGatewayInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the internet gateway. - // - // InternetGatewayId is a required field - InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachInternetGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachInternetGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachInternetGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachInternetGatewayInput"} - if s.InternetGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("InternetGatewayId")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *AttachInternetGatewayInput) SetDryRun(v bool) *AttachInternetGatewayInput { - s.DryRun = &v - return s -} - -// SetInternetGatewayId sets the InternetGatewayId field's value. -func (s *AttachInternetGatewayInput) SetInternetGatewayId(v string) *AttachInternetGatewayInput { - s.InternetGatewayId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *AttachInternetGatewayInput) SetVpcId(v string) *AttachInternetGatewayInput { - s.VpcId = &v - return s -} - -type AttachInternetGatewayOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AttachInternetGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachInternetGatewayOutput) GoString() string { - return s.String() -} - -// Contains the parameters for AttachNetworkInterface. -type AttachNetworkInterfaceInput struct { - _ struct{} `type:"structure"` - - // The index of the device for the network interface attachment. - // - // DeviceIndex is a required field - DeviceIndex *int64 `locationName:"deviceIndex" type:"integer" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` - - // The ID of the network interface. - // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachNetworkInterfaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachNetworkInterfaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachNetworkInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachNetworkInterfaceInput"} - if s.DeviceIndex == nil { - invalidParams.Add(request.NewErrParamRequired("DeviceIndex")) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeviceIndex sets the DeviceIndex field's value. -func (s *AttachNetworkInterfaceInput) SetDeviceIndex(v int64) *AttachNetworkInterfaceInput { - s.DeviceIndex = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *AttachNetworkInterfaceInput) SetDryRun(v bool) *AttachNetworkInterfaceInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *AttachNetworkInterfaceInput) SetInstanceId(v string) *AttachNetworkInterfaceInput { - s.InstanceId = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *AttachNetworkInterfaceInput) SetNetworkInterfaceId(v string) *AttachNetworkInterfaceInput { - s.NetworkInterfaceId = &v - return s -} - -// Contains the output of AttachNetworkInterface. -type AttachNetworkInterfaceOutput struct { - _ struct{} `type:"structure"` - - // The ID of the network interface attachment. - AttachmentId *string `locationName:"attachmentId" type:"string"` -} - -// String returns the string representation -func (s AttachNetworkInterfaceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachNetworkInterfaceOutput) GoString() string { - return s.String() -} - -// SetAttachmentId sets the AttachmentId field's value. -func (s *AttachNetworkInterfaceOutput) SetAttachmentId(v string) *AttachNetworkInterfaceOutput { - s.AttachmentId = &v - return s -} - -// Contains the parameters for AttachVolume. -type AttachVolumeInput struct { - _ struct{} `type:"structure"` - - // The device name (for example, /dev/sdh or xvdh). - // - // Device is a required field - Device *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The ID of the EBS volume. The volume and instance must be within the same - // Availability Zone. - // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachVolumeInput"} - if s.Device == nil { - invalidParams.Add(request.NewErrParamRequired("Device")) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDevice sets the Device field's value. -func (s *AttachVolumeInput) SetDevice(v string) *AttachVolumeInput { - s.Device = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *AttachVolumeInput) SetDryRun(v bool) *AttachVolumeInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *AttachVolumeInput) SetInstanceId(v string) *AttachVolumeInput { - s.InstanceId = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *AttachVolumeInput) SetVolumeId(v string) *AttachVolumeInput { - s.VolumeId = &v - return s -} - -// Contains the parameters for AttachVpnGateway. -type AttachVpnGatewayInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` - - // The ID of the virtual private gateway. - // - // VpnGatewayId is a required field - VpnGatewayId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachVpnGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachVpnGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachVpnGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachVpnGatewayInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - if s.VpnGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("VpnGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *AttachVpnGatewayInput) SetDryRun(v bool) *AttachVpnGatewayInput { - s.DryRun = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *AttachVpnGatewayInput) SetVpcId(v string) *AttachVpnGatewayInput { - s.VpcId = &v - return s -} - -// SetVpnGatewayId sets the VpnGatewayId field's value. -func (s *AttachVpnGatewayInput) SetVpnGatewayId(v string) *AttachVpnGatewayInput { - s.VpnGatewayId = &v - return s -} - -// Contains the output of AttachVpnGateway. -type AttachVpnGatewayOutput struct { - _ struct{} `type:"structure"` - - // Information about the attachment. - VpcAttachment *VpcAttachment `locationName:"attachment" type:"structure"` -} - -// String returns the string representation -func (s AttachVpnGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachVpnGatewayOutput) GoString() string { - return s.String() -} - -// SetVpcAttachment sets the VpcAttachment field's value. -func (s *AttachVpnGatewayOutput) SetVpcAttachment(v *VpcAttachment) *AttachVpnGatewayOutput { - s.VpcAttachment = v - return s -} - -// Describes a value for a resource attribute that is a Boolean value. -type AttributeBooleanValue struct { - _ struct{} `type:"structure"` - - // The attribute value. The valid values are true or false. - Value *bool `locationName:"value" type:"boolean"` -} - -// String returns the string representation -func (s AttributeBooleanValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttributeBooleanValue) GoString() string { - return s.String() -} - -// SetValue sets the Value field's value. -func (s *AttributeBooleanValue) SetValue(v bool) *AttributeBooleanValue { - s.Value = &v - return s -} - -// Describes a value for a resource attribute that is a String. -type AttributeValue struct { - _ struct{} `type:"structure"` - - // The attribute value. The value is case-sensitive. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s AttributeValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttributeValue) GoString() string { - return s.String() -} - -// SetValue sets the Value field's value. -func (s *AttributeValue) SetValue(v string) *AttributeValue { - s.Value = &v - return s -} - -// Information about an authorization rule. -type AuthorizationRule struct { - _ struct{} `type:"structure"` - - // Indicates whether the authorization rule grants access to all clients. - AccessAll *bool `locationName:"accessAll" type:"boolean"` - - // The ID of the Client VPN endpoint with which the authorization rule is associated. - ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` - - // A brief description of the authorization rule. - Description *string `locationName:"description" type:"string"` - - // The IPv4 address range, in CIDR notation, of the network to which the authorization - // rule applies. - DestinationCidr *string `locationName:"destinationCidr" type:"string"` - - // The ID of the Active Directory group to which the authorization rule grants - // access. - GroupId *string `locationName:"groupId" type:"string"` - - // The current state of the authorization rule. - Status *ClientVpnAuthorizationRuleStatus `locationName:"status" type:"structure"` -} - -// String returns the string representation -func (s AuthorizationRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizationRule) GoString() string { - return s.String() -} - -// SetAccessAll sets the AccessAll field's value. -func (s *AuthorizationRule) SetAccessAll(v bool) *AuthorizationRule { - s.AccessAll = &v - return s -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *AuthorizationRule) SetClientVpnEndpointId(v string) *AuthorizationRule { - s.ClientVpnEndpointId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *AuthorizationRule) SetDescription(v string) *AuthorizationRule { - s.Description = &v - return s -} - -// SetDestinationCidr sets the DestinationCidr field's value. -func (s *AuthorizationRule) SetDestinationCidr(v string) *AuthorizationRule { - s.DestinationCidr = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *AuthorizationRule) SetGroupId(v string) *AuthorizationRule { - s.GroupId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AuthorizationRule) SetStatus(v *ClientVpnAuthorizationRuleStatus) *AuthorizationRule { - s.Status = v - return s -} - -type AuthorizeClientVpnIngressInput struct { - _ struct{} `type:"structure"` - - // The ID of the Active Directory group to grant access. - AccessGroupId *string `type:"string"` - - // Indicates whether to grant access to all clients. Use true to grant all clients - // who successfully establish a VPN connection access to the network. - AuthorizeAllGroups *bool `type:"boolean"` - - // The ID of the Client VPN endpoint. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // A brief description of the authorization rule. - Description *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The IPv4 address range, in CIDR notation, of the network for which access - // is being authorized. - // - // TargetNetworkCidr is a required field - TargetNetworkCidr *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AuthorizeClientVpnIngressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeClientVpnIngressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AuthorizeClientVpnIngressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuthorizeClientVpnIngressInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - if s.TargetNetworkCidr == nil { - invalidParams.Add(request.NewErrParamRequired("TargetNetworkCidr")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessGroupId sets the AccessGroupId field's value. -func (s *AuthorizeClientVpnIngressInput) SetAccessGroupId(v string) *AuthorizeClientVpnIngressInput { - s.AccessGroupId = &v - return s -} - -// SetAuthorizeAllGroups sets the AuthorizeAllGroups field's value. -func (s *AuthorizeClientVpnIngressInput) SetAuthorizeAllGroups(v bool) *AuthorizeClientVpnIngressInput { - s.AuthorizeAllGroups = &v - return s -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *AuthorizeClientVpnIngressInput) SetClientVpnEndpointId(v string) *AuthorizeClientVpnIngressInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *AuthorizeClientVpnIngressInput) SetDescription(v string) *AuthorizeClientVpnIngressInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *AuthorizeClientVpnIngressInput) SetDryRun(v bool) *AuthorizeClientVpnIngressInput { - s.DryRun = &v - return s -} - -// SetTargetNetworkCidr sets the TargetNetworkCidr field's value. -func (s *AuthorizeClientVpnIngressInput) SetTargetNetworkCidr(v string) *AuthorizeClientVpnIngressInput { - s.TargetNetworkCidr = &v - return s -} - -type AuthorizeClientVpnIngressOutput struct { - _ struct{} `type:"structure"` - - // The current state of the authorization rule. - Status *ClientVpnAuthorizationRuleStatus `locationName:"status" type:"structure"` -} - -// String returns the string representation -func (s AuthorizeClientVpnIngressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeClientVpnIngressOutput) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *AuthorizeClientVpnIngressOutput) SetStatus(v *ClientVpnAuthorizationRuleStatus) *AuthorizeClientVpnIngressOutput { - s.Status = v - return s -} - -type AuthorizeSecurityGroupEgressInput struct { - _ struct{} `type:"structure"` - - // Not supported. Use a set of IP permissions to specify the CIDR. - CidrIp *string `locationName:"cidrIp" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Not supported. Use a set of IP permissions to specify the port. - FromPort *int64 `locationName:"fromPort" type:"integer"` - - // The ID of the security group. - // - // GroupId is a required field - GroupId *string `locationName:"groupId" type:"string" required:"true"` - - // One or more sets of IP permissions. You can't specify a destination security - // group and a CIDR IP address range in the same set of permissions. - IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` - - // Not supported. Use a set of IP permissions to specify the protocol name or - // number. - IpProtocol *string `locationName:"ipProtocol" type:"string"` - - // Not supported. Use a set of IP permissions to specify a destination security - // group. - SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"` - - // Not supported. Use a set of IP permissions to specify a destination security - // group. - SourceSecurityGroupOwnerId *string `locationName:"sourceSecurityGroupOwnerId" type:"string"` - - // Not supported. Use a set of IP permissions to specify the port. - ToPort *int64 `locationName:"toPort" type:"integer"` -} - -// String returns the string representation -func (s AuthorizeSecurityGroupEgressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeSecurityGroupEgressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AuthorizeSecurityGroupEgressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuthorizeSecurityGroupEgressInput"} - if s.GroupId == nil { - invalidParams.Add(request.NewErrParamRequired("GroupId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCidrIp sets the CidrIp field's value. -func (s *AuthorizeSecurityGroupEgressInput) SetCidrIp(v string) *AuthorizeSecurityGroupEgressInput { - s.CidrIp = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *AuthorizeSecurityGroupEgressInput) SetDryRun(v bool) *AuthorizeSecurityGroupEgressInput { - s.DryRun = &v - return s -} - -// SetFromPort sets the FromPort field's value. -func (s *AuthorizeSecurityGroupEgressInput) SetFromPort(v int64) *AuthorizeSecurityGroupEgressInput { - s.FromPort = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *AuthorizeSecurityGroupEgressInput) SetGroupId(v string) *AuthorizeSecurityGroupEgressInput { - s.GroupId = &v - return s -} - -// SetIpPermissions sets the IpPermissions field's value. -func (s *AuthorizeSecurityGroupEgressInput) SetIpPermissions(v []*IpPermission) *AuthorizeSecurityGroupEgressInput { - s.IpPermissions = v - return s -} - -// SetIpProtocol sets the IpProtocol field's value. -func (s *AuthorizeSecurityGroupEgressInput) SetIpProtocol(v string) *AuthorizeSecurityGroupEgressInput { - s.IpProtocol = &v - return s -} - -// SetSourceSecurityGroupName sets the SourceSecurityGroupName field's value. -func (s *AuthorizeSecurityGroupEgressInput) SetSourceSecurityGroupName(v string) *AuthorizeSecurityGroupEgressInput { - s.SourceSecurityGroupName = &v - return s -} - -// SetSourceSecurityGroupOwnerId sets the SourceSecurityGroupOwnerId field's value. -func (s *AuthorizeSecurityGroupEgressInput) SetSourceSecurityGroupOwnerId(v string) *AuthorizeSecurityGroupEgressInput { - s.SourceSecurityGroupOwnerId = &v - return s -} - -// SetToPort sets the ToPort field's value. -func (s *AuthorizeSecurityGroupEgressInput) SetToPort(v int64) *AuthorizeSecurityGroupEgressInput { - s.ToPort = &v - return s -} - -type AuthorizeSecurityGroupEgressOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AuthorizeSecurityGroupEgressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeSecurityGroupEgressOutput) GoString() string { - return s.String() -} - -type AuthorizeSecurityGroupIngressInput struct { - _ struct{} `type:"structure"` - - // The CIDR IPv4 address range. You can't specify this parameter when specifying - // a source security group. - CidrIp *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 - // type number. For the ICMP/ICMPv6 type number, use -1 to specify all types. - // If you specify all ICMP/ICMPv6 types, you must specify all codes. - FromPort *int64 `type:"integer"` - - // The ID of the security group. You must specify either the security group - // ID or the security group name in the request. For security groups in a nondefault - // VPC, you must specify the security group ID. - GroupId *string `type:"string"` - - // [EC2-Classic, default VPC] The name of the security group. You must specify - // either the security group ID or the security group name in the request. - GroupName *string `type:"string"` - - // One or more sets of IP permissions. Can be used to specify multiple rules - // in a single command. - IpPermissions []*IpPermission `locationNameList:"item" type:"list"` - - // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). - // (VPC only) Use -1 to specify all protocols. If you specify -1, or a protocol - // number other than tcp, udp, icmp, or 58 (ICMPv6), traffic on all ports is - // allowed, regardless of any ports you specify. For tcp, udp, and icmp, you - // must specify a port range. For protocol 58 (ICMPv6), you can optionally specify - // a port range; if you don't, traffic for all types and codes is allowed. - IpProtocol *string `type:"string"` - - // [EC2-Classic, default VPC] The name of the source security group. You can't - // specify this parameter in combination with the following parameters: the - // CIDR IP address range, the start of the port range, the IP protocol, and - // the end of the port range. Creates rules that grant full ICMP, UDP, and TCP - // access. To create a rule with a specific IP protocol and port range, use - // a set of IP permissions instead. For EC2-VPC, the source security group must - // be in the same VPC. - SourceSecurityGroupName *string `type:"string"` - - // [EC2-Classic] The AWS account ID for the source security group, if the source - // security group is in a different account. You can't specify this parameter - // in combination with the following parameters: the CIDR IP address range, - // the IP protocol, the start of the port range, and the end of the port range. - // Creates rules that grant full ICMP, UDP, and TCP access. To create a rule - // with a specific IP protocol and port range, use a set of IP permissions instead. - SourceSecurityGroupOwnerId *string `type:"string"` - - // The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code - // number. For the ICMP/ICMPv6 code number, use -1 to specify all codes. If - // you specify all ICMP/ICMPv6 types, you must specify all codes. - ToPort *int64 `type:"integer"` -} - -// String returns the string representation -func (s AuthorizeSecurityGroupIngressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeSecurityGroupIngressInput) GoString() string { - return s.String() -} - -// SetCidrIp sets the CidrIp field's value. -func (s *AuthorizeSecurityGroupIngressInput) SetCidrIp(v string) *AuthorizeSecurityGroupIngressInput { - s.CidrIp = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *AuthorizeSecurityGroupIngressInput) SetDryRun(v bool) *AuthorizeSecurityGroupIngressInput { - s.DryRun = &v - return s -} - -// SetFromPort sets the FromPort field's value. -func (s *AuthorizeSecurityGroupIngressInput) SetFromPort(v int64) *AuthorizeSecurityGroupIngressInput { - s.FromPort = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *AuthorizeSecurityGroupIngressInput) SetGroupId(v string) *AuthorizeSecurityGroupIngressInput { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *AuthorizeSecurityGroupIngressInput) SetGroupName(v string) *AuthorizeSecurityGroupIngressInput { - s.GroupName = &v - return s -} - -// SetIpPermissions sets the IpPermissions field's value. -func (s *AuthorizeSecurityGroupIngressInput) SetIpPermissions(v []*IpPermission) *AuthorizeSecurityGroupIngressInput { - s.IpPermissions = v - return s -} - -// SetIpProtocol sets the IpProtocol field's value. -func (s *AuthorizeSecurityGroupIngressInput) SetIpProtocol(v string) *AuthorizeSecurityGroupIngressInput { - s.IpProtocol = &v - return s -} - -// SetSourceSecurityGroupName sets the SourceSecurityGroupName field's value. -func (s *AuthorizeSecurityGroupIngressInput) SetSourceSecurityGroupName(v string) *AuthorizeSecurityGroupIngressInput { - s.SourceSecurityGroupName = &v - return s -} - -// SetSourceSecurityGroupOwnerId sets the SourceSecurityGroupOwnerId field's value. -func (s *AuthorizeSecurityGroupIngressInput) SetSourceSecurityGroupOwnerId(v string) *AuthorizeSecurityGroupIngressInput { - s.SourceSecurityGroupOwnerId = &v - return s -} - -// SetToPort sets the ToPort field's value. -func (s *AuthorizeSecurityGroupIngressInput) SetToPort(v int64) *AuthorizeSecurityGroupIngressInput { - s.ToPort = &v - return s -} - -type AuthorizeSecurityGroupIngressOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AuthorizeSecurityGroupIngressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeSecurityGroupIngressOutput) GoString() string { - return s.String() -} - -// Describes an Availability Zone. -type AvailabilityZone struct { - _ struct{} `type:"structure"` - - // Any messages about the Availability Zone. - Messages []*AvailabilityZoneMessage `locationName:"messageSet" locationNameList:"item" type:"list"` - - // The name of the region. - RegionName *string `locationName:"regionName" type:"string"` - - // The state of the Availability Zone. - State *string `locationName:"zoneState" type:"string" enum:"AvailabilityZoneState"` - - // The ID of the Availability Zone. - ZoneId *string `locationName:"zoneId" type:"string"` - - // The name of the Availability Zone. - ZoneName *string `locationName:"zoneName" type:"string"` -} - -// String returns the string representation -func (s AvailabilityZone) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailabilityZone) GoString() string { - return s.String() -} - -// SetMessages sets the Messages field's value. -func (s *AvailabilityZone) SetMessages(v []*AvailabilityZoneMessage) *AvailabilityZone { - s.Messages = v - return s -} - -// SetRegionName sets the RegionName field's value. -func (s *AvailabilityZone) SetRegionName(v string) *AvailabilityZone { - s.RegionName = &v - return s -} - -// SetState sets the State field's value. -func (s *AvailabilityZone) SetState(v string) *AvailabilityZone { - s.State = &v - return s -} - -// SetZoneId sets the ZoneId field's value. -func (s *AvailabilityZone) SetZoneId(v string) *AvailabilityZone { - s.ZoneId = &v - return s -} - -// SetZoneName sets the ZoneName field's value. -func (s *AvailabilityZone) SetZoneName(v string) *AvailabilityZone { - s.ZoneName = &v - return s -} - -// Describes a message about an Availability Zone. -type AvailabilityZoneMessage struct { - _ struct{} `type:"structure"` - - // The message about the Availability Zone. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s AvailabilityZoneMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailabilityZoneMessage) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *AvailabilityZoneMessage) SetMessage(v string) *AvailabilityZoneMessage { - s.Message = &v - return s -} - -// The capacity information for instances launched onto the Dedicated Host. -type AvailableCapacity struct { - _ struct{} `type:"structure"` - - // The total number of instances supported by the Dedicated Host. - AvailableInstanceCapacity []*InstanceCapacity `locationName:"availableInstanceCapacity" locationNameList:"item" type:"list"` - - // The number of vCPUs available on the Dedicated Host. - AvailableVCpus *int64 `locationName:"availableVCpus" type:"integer"` -} - -// String returns the string representation -func (s AvailableCapacity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailableCapacity) GoString() string { - return s.String() -} - -// SetAvailableInstanceCapacity sets the AvailableInstanceCapacity field's value. -func (s *AvailableCapacity) SetAvailableInstanceCapacity(v []*InstanceCapacity) *AvailableCapacity { - s.AvailableInstanceCapacity = v - return s -} - -// SetAvailableVCpus sets the AvailableVCpus field's value. -func (s *AvailableCapacity) SetAvailableVCpus(v int64) *AvailableCapacity { - s.AvailableVCpus = &v - return s -} - -type BlobAttributeValue struct { - _ struct{} `type:"structure"` - - // Value is automatically base64 encoded/decoded by the SDK. - Value []byte `locationName:"value" type:"blob"` -} - -// String returns the string representation -func (s BlobAttributeValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BlobAttributeValue) GoString() string { - return s.String() -} - -// SetValue sets the Value field's value. -func (s *BlobAttributeValue) SetValue(v []byte) *BlobAttributeValue { - s.Value = v - return s -} - -// Describes a block device mapping. -type BlockDeviceMapping struct { - _ struct{} `type:"structure"` - - // The device name (for example, /dev/sdh or xvdh). - DeviceName *string `locationName:"deviceName" type:"string"` - - // Parameters used to automatically set up EBS volumes when the instance is - // launched. - Ebs *EbsBlockDevice `locationName:"ebs" type:"structure"` - - // Suppresses the specified device included in the block device mapping of the - // AMI. - NoDevice *string `locationName:"noDevice" type:"string"` - - // The virtual device name (ephemeralN). Instance store volumes are numbered - // starting from 0. An instance type with 2 available instance store volumes - // can specify mappings for ephemeral0 and ephemeral1. The number of available - // instance store volumes depends on the instance type. After you connect to - // the instance, you must mount the volume. - // - // NVMe instance store volumes are automatically enumerated and assigned a device - // name. Including them in your block device mapping has no effect. - // - // Constraints: For M3 instances, you must specify instance store volumes in - // the block device mapping for the instance. When you launch an M3 instance, - // we ignore any instance store volumes specified in the block device mapping - // for the AMI. - VirtualName *string `locationName:"virtualName" type:"string"` -} - -// String returns the string representation -func (s BlockDeviceMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BlockDeviceMapping) GoString() string { - return s.String() -} - -// SetDeviceName sets the DeviceName field's value. -func (s *BlockDeviceMapping) SetDeviceName(v string) *BlockDeviceMapping { - s.DeviceName = &v - return s -} - -// SetEbs sets the Ebs field's value. -func (s *BlockDeviceMapping) SetEbs(v *EbsBlockDevice) *BlockDeviceMapping { - s.Ebs = v - return s -} - -// SetNoDevice sets the NoDevice field's value. -func (s *BlockDeviceMapping) SetNoDevice(v string) *BlockDeviceMapping { - s.NoDevice = &v - return s -} - -// SetVirtualName sets the VirtualName field's value. -func (s *BlockDeviceMapping) SetVirtualName(v string) *BlockDeviceMapping { - s.VirtualName = &v - return s -} - -// Contains the parameters for BundleInstance. -type BundleInstanceInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the instance to bundle. - // - // Type: String - // - // Default: None - // - // Required: Yes - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The bucket in which to store the AMI. You can specify a bucket that you already - // own or a new bucket that Amazon EC2 creates on your behalf. If you specify - // a bucket that belongs to someone else, Amazon EC2 returns an error. - // - // Storage is a required field - Storage *Storage `type:"structure" required:"true"` -} - -// String returns the string representation -func (s BundleInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BundleInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BundleInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BundleInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.Storage == nil { - invalidParams.Add(request.NewErrParamRequired("Storage")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *BundleInstanceInput) SetDryRun(v bool) *BundleInstanceInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *BundleInstanceInput) SetInstanceId(v string) *BundleInstanceInput { - s.InstanceId = &v - return s -} - -// SetStorage sets the Storage field's value. -func (s *BundleInstanceInput) SetStorage(v *Storage) *BundleInstanceInput { - s.Storage = v - return s -} - -// Contains the output of BundleInstance. -type BundleInstanceOutput struct { - _ struct{} `type:"structure"` - - // Information about the bundle task. - BundleTask *BundleTask `locationName:"bundleInstanceTask" type:"structure"` -} - -// String returns the string representation -func (s BundleInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BundleInstanceOutput) GoString() string { - return s.String() -} - -// SetBundleTask sets the BundleTask field's value. -func (s *BundleInstanceOutput) SetBundleTask(v *BundleTask) *BundleInstanceOutput { - s.BundleTask = v - return s -} - -// Describes a bundle task. -type BundleTask struct { - _ struct{} `type:"structure"` - - // The ID of the bundle task. - BundleId *string `locationName:"bundleId" type:"string"` - - // If the task fails, a description of the error. - BundleTaskError *BundleTaskError `locationName:"error" type:"structure"` - - // The ID of the instance associated with this bundle task. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The level of task completion, as a percent (for example, 20%). - Progress *string `locationName:"progress" type:"string"` - - // The time this task started. - StartTime *time.Time `locationName:"startTime" type:"timestamp"` - - // The state of the task. - State *string `locationName:"state" type:"string" enum:"BundleTaskState"` - - // The Amazon S3 storage locations. - Storage *Storage `locationName:"storage" type:"structure"` - - // The time of the most recent update for the task. - UpdateTime *time.Time `locationName:"updateTime" type:"timestamp"` -} - -// String returns the string representation -func (s BundleTask) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BundleTask) GoString() string { - return s.String() -} - -// SetBundleId sets the BundleId field's value. -func (s *BundleTask) SetBundleId(v string) *BundleTask { - s.BundleId = &v - return s -} - -// SetBundleTaskError sets the BundleTaskError field's value. -func (s *BundleTask) SetBundleTaskError(v *BundleTaskError) *BundleTask { - s.BundleTaskError = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *BundleTask) SetInstanceId(v string) *BundleTask { - s.InstanceId = &v - return s -} - -// SetProgress sets the Progress field's value. -func (s *BundleTask) SetProgress(v string) *BundleTask { - s.Progress = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *BundleTask) SetStartTime(v time.Time) *BundleTask { - s.StartTime = &v - return s -} - -// SetState sets the State field's value. -func (s *BundleTask) SetState(v string) *BundleTask { - s.State = &v - return s -} - -// SetStorage sets the Storage field's value. -func (s *BundleTask) SetStorage(v *Storage) *BundleTask { - s.Storage = v - return s -} - -// SetUpdateTime sets the UpdateTime field's value. -func (s *BundleTask) SetUpdateTime(v time.Time) *BundleTask { - s.UpdateTime = &v - return s -} - -// Describes an error for BundleInstance. -type BundleTaskError struct { - _ struct{} `type:"structure"` - - // The error code. - Code *string `locationName:"code" type:"string"` - - // The error message. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s BundleTaskError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BundleTaskError) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *BundleTaskError) SetCode(v string) *BundleTaskError { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *BundleTaskError) SetMessage(v string) *BundleTaskError { - s.Message = &v - return s -} - -// Information about an address range that is provisioned for use with your -// AWS resources through bring your own IP addresses (BYOIP). -type ByoipCidr struct { - _ struct{} `type:"structure"` - - // The public IPv4 address range, in CIDR notation. - Cidr *string `locationName:"cidr" type:"string"` - - // The description of the address range. - Description *string `locationName:"description" type:"string"` - - // The state of the address pool. - State *string `locationName:"state" type:"string" enum:"ByoipCidrState"` - - // Upon success, contains the ID of the address pool. Otherwise, contains an - // error message. - StatusMessage *string `locationName:"statusMessage" type:"string"` -} - -// String returns the string representation -func (s ByoipCidr) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ByoipCidr) GoString() string { - return s.String() -} - -// SetCidr sets the Cidr field's value. -func (s *ByoipCidr) SetCidr(v string) *ByoipCidr { - s.Cidr = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ByoipCidr) SetDescription(v string) *ByoipCidr { - s.Description = &v - return s -} - -// SetState sets the State field's value. -func (s *ByoipCidr) SetState(v string) *ByoipCidr { - s.State = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ByoipCidr) SetStatusMessage(v string) *ByoipCidr { - s.StatusMessage = &v - return s -} - -// Contains the parameters for CancelBundleTask. -type CancelBundleTaskInput struct { - _ struct{} `type:"structure"` - - // The ID of the bundle task. - // - // BundleId is a required field - BundleId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` -} - -// String returns the string representation -func (s CancelBundleTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelBundleTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelBundleTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelBundleTaskInput"} - if s.BundleId == nil { - invalidParams.Add(request.NewErrParamRequired("BundleId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBundleId sets the BundleId field's value. -func (s *CancelBundleTaskInput) SetBundleId(v string) *CancelBundleTaskInput { - s.BundleId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CancelBundleTaskInput) SetDryRun(v bool) *CancelBundleTaskInput { - s.DryRun = &v - return s -} - -// Contains the output of CancelBundleTask. -type CancelBundleTaskOutput struct { - _ struct{} `type:"structure"` - - // Information about the bundle task. - BundleTask *BundleTask `locationName:"bundleInstanceTask" type:"structure"` -} - -// String returns the string representation -func (s CancelBundleTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelBundleTaskOutput) GoString() string { - return s.String() -} - -// SetBundleTask sets the BundleTask field's value. -func (s *CancelBundleTaskOutput) SetBundleTask(v *BundleTask) *CancelBundleTaskOutput { - s.BundleTask = v - return s -} - -type CancelCapacityReservationInput struct { - _ struct{} `type:"structure"` - - // The ID of the Capacity Reservation to be cancelled. - // - // CapacityReservationId is a required field - CapacityReservationId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s CancelCapacityReservationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelCapacityReservationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelCapacityReservationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelCapacityReservationInput"} - if s.CapacityReservationId == nil { - invalidParams.Add(request.NewErrParamRequired("CapacityReservationId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCapacityReservationId sets the CapacityReservationId field's value. -func (s *CancelCapacityReservationInput) SetCapacityReservationId(v string) *CancelCapacityReservationInput { - s.CapacityReservationId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CancelCapacityReservationInput) SetDryRun(v bool) *CancelCapacityReservationInput { - s.DryRun = &v - return s -} - -type CancelCapacityReservationOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s CancelCapacityReservationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelCapacityReservationOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *CancelCapacityReservationOutput) SetReturn(v bool) *CancelCapacityReservationOutput { - s.Return = &v - return s -} - -// Contains the parameters for CancelConversionTask. -type CancelConversionTaskInput struct { - _ struct{} `type:"structure"` - - // The ID of the conversion task. - // - // ConversionTaskId is a required field - ConversionTaskId *string `locationName:"conversionTaskId" type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The reason for canceling the conversion task. - ReasonMessage *string `locationName:"reasonMessage" type:"string"` -} - -// String returns the string representation -func (s CancelConversionTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelConversionTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelConversionTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelConversionTaskInput"} - if s.ConversionTaskId == nil { - invalidParams.Add(request.NewErrParamRequired("ConversionTaskId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConversionTaskId sets the ConversionTaskId field's value. -func (s *CancelConversionTaskInput) SetConversionTaskId(v string) *CancelConversionTaskInput { - s.ConversionTaskId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CancelConversionTaskInput) SetDryRun(v bool) *CancelConversionTaskInput { - s.DryRun = &v - return s -} - -// SetReasonMessage sets the ReasonMessage field's value. -func (s *CancelConversionTaskInput) SetReasonMessage(v string) *CancelConversionTaskInput { - s.ReasonMessage = &v - return s -} - -type CancelConversionTaskOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CancelConversionTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelConversionTaskOutput) GoString() string { - return s.String() -} - -// Contains the parameters for CancelExportTask. -type CancelExportTaskInput struct { - _ struct{} `type:"structure"` - - // The ID of the export task. This is the ID returned by CreateInstanceExportTask. - // - // ExportTaskId is a required field - ExportTaskId *string `locationName:"exportTaskId" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelExportTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelExportTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelExportTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelExportTaskInput"} - if s.ExportTaskId == nil { - invalidParams.Add(request.NewErrParamRequired("ExportTaskId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExportTaskId sets the ExportTaskId field's value. -func (s *CancelExportTaskInput) SetExportTaskId(v string) *CancelExportTaskInput { - s.ExportTaskId = &v - return s -} - -type CancelExportTaskOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CancelExportTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelExportTaskOutput) GoString() string { - return s.String() -} - -// Contains the parameters for CancelImportTask. -type CancelImportTaskInput struct { - _ struct{} `type:"structure"` - - // The reason for canceling the task. - CancelReason *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the import image or import snapshot task to be canceled. - ImportTaskId *string `type:"string"` -} - -// String returns the string representation -func (s CancelImportTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelImportTaskInput) GoString() string { - return s.String() -} - -// SetCancelReason sets the CancelReason field's value. -func (s *CancelImportTaskInput) SetCancelReason(v string) *CancelImportTaskInput { - s.CancelReason = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CancelImportTaskInput) SetDryRun(v bool) *CancelImportTaskInput { - s.DryRun = &v - return s -} - -// SetImportTaskId sets the ImportTaskId field's value. -func (s *CancelImportTaskInput) SetImportTaskId(v string) *CancelImportTaskInput { - s.ImportTaskId = &v - return s -} - -// Contains the output for CancelImportTask. -type CancelImportTaskOutput struct { - _ struct{} `type:"structure"` - - // The ID of the task being canceled. - ImportTaskId *string `locationName:"importTaskId" type:"string"` - - // The current state of the task being canceled. - PreviousState *string `locationName:"previousState" type:"string"` - - // The current state of the task being canceled. - State *string `locationName:"state" type:"string"` -} - -// String returns the string representation -func (s CancelImportTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelImportTaskOutput) GoString() string { - return s.String() -} - -// SetImportTaskId sets the ImportTaskId field's value. -func (s *CancelImportTaskOutput) SetImportTaskId(v string) *CancelImportTaskOutput { - s.ImportTaskId = &v - return s -} - -// SetPreviousState sets the PreviousState field's value. -func (s *CancelImportTaskOutput) SetPreviousState(v string) *CancelImportTaskOutput { - s.PreviousState = &v - return s -} - -// SetState sets the State field's value. -func (s *CancelImportTaskOutput) SetState(v string) *CancelImportTaskOutput { - s.State = &v - return s -} - -// Contains the parameters for CancelReservedInstancesListing. -type CancelReservedInstancesListingInput struct { - _ struct{} `type:"structure"` - - // The ID of the Reserved Instance listing. - // - // ReservedInstancesListingId is a required field - ReservedInstancesListingId *string `locationName:"reservedInstancesListingId" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelReservedInstancesListingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelReservedInstancesListingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelReservedInstancesListingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelReservedInstancesListingInput"} - if s.ReservedInstancesListingId == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedInstancesListingId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReservedInstancesListingId sets the ReservedInstancesListingId field's value. -func (s *CancelReservedInstancesListingInput) SetReservedInstancesListingId(v string) *CancelReservedInstancesListingInput { - s.ReservedInstancesListingId = &v - return s -} - -// Contains the output of CancelReservedInstancesListing. -type CancelReservedInstancesListingOutput struct { - _ struct{} `type:"structure"` - - // The Reserved Instance listing. - ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s CancelReservedInstancesListingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelReservedInstancesListingOutput) GoString() string { - return s.String() -} - -// SetReservedInstancesListings sets the ReservedInstancesListings field's value. -func (s *CancelReservedInstancesListingOutput) SetReservedInstancesListings(v []*ReservedInstancesListing) *CancelReservedInstancesListingOutput { - s.ReservedInstancesListings = v - return s -} - -// Describes a Spot Fleet error. -type CancelSpotFleetRequestsError struct { - _ struct{} `type:"structure"` - - // The error code. - Code *string `locationName:"code" type:"string" enum:"CancelBatchErrorCode"` - - // The description for the error code. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s CancelSpotFleetRequestsError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelSpotFleetRequestsError) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *CancelSpotFleetRequestsError) SetCode(v string) *CancelSpotFleetRequestsError { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *CancelSpotFleetRequestsError) SetMessage(v string) *CancelSpotFleetRequestsError { - s.Message = &v - return s -} - -// Describes a Spot Fleet request that was not successfully canceled. -type CancelSpotFleetRequestsErrorItem struct { - _ struct{} `type:"structure"` - - // The error. - Error *CancelSpotFleetRequestsError `locationName:"error" type:"structure"` - - // The ID of the Spot Fleet request. - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` -} - -// String returns the string representation -func (s CancelSpotFleetRequestsErrorItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelSpotFleetRequestsErrorItem) GoString() string { - return s.String() -} - -// SetError sets the Error field's value. -func (s *CancelSpotFleetRequestsErrorItem) SetError(v *CancelSpotFleetRequestsError) *CancelSpotFleetRequestsErrorItem { - s.Error = v - return s -} - -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *CancelSpotFleetRequestsErrorItem) SetSpotFleetRequestId(v string) *CancelSpotFleetRequestsErrorItem { - s.SpotFleetRequestId = &v - return s -} - -// Contains the parameters for CancelSpotFleetRequests. -type CancelSpotFleetRequestsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The IDs of the Spot Fleet requests. - // - // SpotFleetRequestIds is a required field - SpotFleetRequestIds []*string `locationName:"spotFleetRequestId" locationNameList:"item" type:"list" required:"true"` - - // Indicates whether to terminate instances for a Spot Fleet request if it is - // canceled successfully. - // - // TerminateInstances is a required field - TerminateInstances *bool `locationName:"terminateInstances" type:"boolean" required:"true"` -} - -// String returns the string representation -func (s CancelSpotFleetRequestsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelSpotFleetRequestsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelSpotFleetRequestsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelSpotFleetRequestsInput"} - if s.SpotFleetRequestIds == nil { - invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestIds")) - } - if s.TerminateInstances == nil { - invalidParams.Add(request.NewErrParamRequired("TerminateInstances")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *CancelSpotFleetRequestsInput) SetDryRun(v bool) *CancelSpotFleetRequestsInput { - s.DryRun = &v - return s -} - -// SetSpotFleetRequestIds sets the SpotFleetRequestIds field's value. -func (s *CancelSpotFleetRequestsInput) SetSpotFleetRequestIds(v []*string) *CancelSpotFleetRequestsInput { - s.SpotFleetRequestIds = v - return s -} - -// SetTerminateInstances sets the TerminateInstances field's value. -func (s *CancelSpotFleetRequestsInput) SetTerminateInstances(v bool) *CancelSpotFleetRequestsInput { - s.TerminateInstances = &v - return s -} - -// Contains the output of CancelSpotFleetRequests. -type CancelSpotFleetRequestsOutput struct { - _ struct{} `type:"structure"` - - // Information about the Spot Fleet requests that are successfully canceled. - SuccessfulFleetRequests []*CancelSpotFleetRequestsSuccessItem `locationName:"successfulFleetRequestSet" locationNameList:"item" type:"list"` - - // Information about the Spot Fleet requests that are not successfully canceled. - UnsuccessfulFleetRequests []*CancelSpotFleetRequestsErrorItem `locationName:"unsuccessfulFleetRequestSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s CancelSpotFleetRequestsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelSpotFleetRequestsOutput) GoString() string { - return s.String() -} - -// SetSuccessfulFleetRequests sets the SuccessfulFleetRequests field's value. -func (s *CancelSpotFleetRequestsOutput) SetSuccessfulFleetRequests(v []*CancelSpotFleetRequestsSuccessItem) *CancelSpotFleetRequestsOutput { - s.SuccessfulFleetRequests = v - return s -} - -// SetUnsuccessfulFleetRequests sets the UnsuccessfulFleetRequests field's value. -func (s *CancelSpotFleetRequestsOutput) SetUnsuccessfulFleetRequests(v []*CancelSpotFleetRequestsErrorItem) *CancelSpotFleetRequestsOutput { - s.UnsuccessfulFleetRequests = v - return s -} - -// Describes a Spot Fleet request that was successfully canceled. -type CancelSpotFleetRequestsSuccessItem struct { - _ struct{} `type:"structure"` - - // The current state of the Spot Fleet request. - CurrentSpotFleetRequestState *string `locationName:"currentSpotFleetRequestState" type:"string" enum:"BatchState"` - - // The previous state of the Spot Fleet request. - PreviousSpotFleetRequestState *string `locationName:"previousSpotFleetRequestState" type:"string" enum:"BatchState"` - - // The ID of the Spot Fleet request. - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` -} - -// String returns the string representation -func (s CancelSpotFleetRequestsSuccessItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelSpotFleetRequestsSuccessItem) GoString() string { - return s.String() -} - -// SetCurrentSpotFleetRequestState sets the CurrentSpotFleetRequestState field's value. -func (s *CancelSpotFleetRequestsSuccessItem) SetCurrentSpotFleetRequestState(v string) *CancelSpotFleetRequestsSuccessItem { - s.CurrentSpotFleetRequestState = &v - return s -} - -// SetPreviousSpotFleetRequestState sets the PreviousSpotFleetRequestState field's value. -func (s *CancelSpotFleetRequestsSuccessItem) SetPreviousSpotFleetRequestState(v string) *CancelSpotFleetRequestsSuccessItem { - s.PreviousSpotFleetRequestState = &v - return s -} - -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *CancelSpotFleetRequestsSuccessItem) SetSpotFleetRequestId(v string) *CancelSpotFleetRequestsSuccessItem { - s.SpotFleetRequestId = &v - return s -} - -// Contains the parameters for CancelSpotInstanceRequests. -type CancelSpotInstanceRequestsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more Spot Instance request IDs. - // - // SpotInstanceRequestIds is a required field - SpotInstanceRequestIds []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list" required:"true"` -} - -// String returns the string representation -func (s CancelSpotInstanceRequestsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelSpotInstanceRequestsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelSpotInstanceRequestsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelSpotInstanceRequestsInput"} - if s.SpotInstanceRequestIds == nil { - invalidParams.Add(request.NewErrParamRequired("SpotInstanceRequestIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *CancelSpotInstanceRequestsInput) SetDryRun(v bool) *CancelSpotInstanceRequestsInput { - s.DryRun = &v - return s -} - -// SetSpotInstanceRequestIds sets the SpotInstanceRequestIds field's value. -func (s *CancelSpotInstanceRequestsInput) SetSpotInstanceRequestIds(v []*string) *CancelSpotInstanceRequestsInput { - s.SpotInstanceRequestIds = v - return s -} - -// Contains the output of CancelSpotInstanceRequests. -type CancelSpotInstanceRequestsOutput struct { - _ struct{} `type:"structure"` - - // One or more Spot Instance requests. - CancelledSpotInstanceRequests []*CancelledSpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s CancelSpotInstanceRequestsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelSpotInstanceRequestsOutput) GoString() string { - return s.String() -} - -// SetCancelledSpotInstanceRequests sets the CancelledSpotInstanceRequests field's value. -func (s *CancelSpotInstanceRequestsOutput) SetCancelledSpotInstanceRequests(v []*CancelledSpotInstanceRequest) *CancelSpotInstanceRequestsOutput { - s.CancelledSpotInstanceRequests = v - return s -} - -// Describes a request to cancel a Spot Instance. -type CancelledSpotInstanceRequest struct { - _ struct{} `type:"structure"` - - // The ID of the Spot Instance request. - SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"` - - // The state of the Spot Instance request. - State *string `locationName:"state" type:"string" enum:"CancelSpotInstanceRequestState"` -} - -// String returns the string representation -func (s CancelledSpotInstanceRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelledSpotInstanceRequest) GoString() string { - return s.String() -} - -// SetSpotInstanceRequestId sets the SpotInstanceRequestId field's value. -func (s *CancelledSpotInstanceRequest) SetSpotInstanceRequestId(v string) *CancelledSpotInstanceRequest { - s.SpotInstanceRequestId = &v - return s -} - -// SetState sets the State field's value. -func (s *CancelledSpotInstanceRequest) SetState(v string) *CancelledSpotInstanceRequest { - s.State = &v - return s -} - -// Describes a Capacity Reservation. -type CapacityReservation struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which the capacity is reserved. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The remaining capacity. Indicates the number of instances that can be launched - // in the Capacity Reservation. - AvailableInstanceCount *int64 `locationName:"availableInstanceCount" type:"integer"` - - // The ID of the Capacity Reservation. - CapacityReservationId *string `locationName:"capacityReservationId" type:"string"` - - // The date and time at which the Capacity Reservation was created. - CreateDate *time.Time `locationName:"createDate" type:"timestamp"` - - // Indicates whether the Capacity Reservation supports EBS-optimized instances. - // This optimization provides dedicated throughput to Amazon EBS and an optimized - // configuration stack to provide optimal I/O performance. This optimization - // isn't available with all instance types. Additional usage charges apply when - // using an EBS- optimized instance. - EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` - - // The date and time at which the Capacity Reservation expires. When a Capacity - // Reservation expires, the reserved capacity is released and you can no longer - // launch instances into it. The Capacity Reservation's state changes to expired - // when it reaches its end date and time. - EndDate *time.Time `locationName:"endDate" type:"timestamp"` - - // Indicates the way in which the Capacity Reservation ends. A Capacity Reservation - // can have one of the following end types: - // - // * unlimited - The Capacity Reservation remains active until you explicitly - // cancel it. - // - // * limited - The Capacity Reservation expires automatically at a specified - // date and time. - EndDateType *string `locationName:"endDateType" type:"string" enum:"EndDateType"` - - // Indicates whether the Capacity Reservation supports instances with temporary, - // block-level storage. - EphemeralStorage *bool `locationName:"ephemeralStorage" type:"boolean"` - - // Indicates the type of instance launches that the Capacity Reservation accepts. - // The options include: - // - // * open - The Capacity Reservation accepts all instances that have matching - // attributes (instance type, platform, and Availability Zone). Instances - // that have matching attributes launch into the Capacity Reservation automatically - // without specifying any additional parameters. - // - // * targeted - The Capacity Reservation only accepts instances that have - // matching attributes (instance type, platform, and Availability Zone), - // and explicitly target the Capacity Reservation. This ensures that only - // permitted instances can use the reserved capacity. - InstanceMatchCriteria *string `locationName:"instanceMatchCriteria" type:"string" enum:"InstanceMatchCriteria"` - - // The type of operating system for which the Capacity Reservation reserves - // capacity. - InstancePlatform *string `locationName:"instancePlatform" type:"string" enum:"CapacityReservationInstancePlatform"` - - // The type of instance for which the Capacity Reservation reserves capacity. - InstanceType *string `locationName:"instanceType" type:"string"` - - // The current state of the Capacity Reservation. A Capacity Reservation can - // be in one of the following states: - // - // * active - The Capacity Reservation is active and the capacity is available - // for your use. - // - // * cancelled - The Capacity Reservation expired automatically at the date - // and time specified in your request. The reserved capacity is no longer - // available for your use. - // - // * expired - The Capacity Reservation was manually cancelled. The reserved - // capacity is no longer available for your use. - // - // * pending - The Capacity Reservation request was successful but the capacity - // provisioning is still pending. - // - // * failed - The Capacity Reservation request has failed. A request might - // fail due to invalid request parameters, capacity constraints, or instance - // limit constraints. Failed requests are retained for 60 minutes. - State *string `locationName:"state" type:"string" enum:"CapacityReservationState"` - - // Any tags assigned to the Capacity Reservation. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // Indicates the tenancy of the Capacity Reservation. A Capacity Reservation - // can have one of the following tenancy settings: - // - // * default - The Capacity Reservation is created on hardware that is shared - // with other AWS accounts. - // - // * dedicated - The Capacity Reservation is created on single-tenant hardware - // that is dedicated to a single AWS account. - Tenancy *string `locationName:"tenancy" type:"string" enum:"CapacityReservationTenancy"` - - // The number of instances for which the Capacity Reservation reserves capacity. - TotalInstanceCount *int64 `locationName:"totalInstanceCount" type:"integer"` -} - -// String returns the string representation -func (s CapacityReservation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CapacityReservation) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CapacityReservation) SetAvailabilityZone(v string) *CapacityReservation { - s.AvailabilityZone = &v - return s -} - -// SetAvailableInstanceCount sets the AvailableInstanceCount field's value. -func (s *CapacityReservation) SetAvailableInstanceCount(v int64) *CapacityReservation { - s.AvailableInstanceCount = &v - return s -} - -// SetCapacityReservationId sets the CapacityReservationId field's value. -func (s *CapacityReservation) SetCapacityReservationId(v string) *CapacityReservation { - s.CapacityReservationId = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *CapacityReservation) SetCreateDate(v time.Time) *CapacityReservation { - s.CreateDate = &v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *CapacityReservation) SetEbsOptimized(v bool) *CapacityReservation { - s.EbsOptimized = &v - return s -} - -// SetEndDate sets the EndDate field's value. -func (s *CapacityReservation) SetEndDate(v time.Time) *CapacityReservation { - s.EndDate = &v - return s -} - -// SetEndDateType sets the EndDateType field's value. -func (s *CapacityReservation) SetEndDateType(v string) *CapacityReservation { - s.EndDateType = &v - return s -} - -// SetEphemeralStorage sets the EphemeralStorage field's value. -func (s *CapacityReservation) SetEphemeralStorage(v bool) *CapacityReservation { - s.EphemeralStorage = &v - return s -} - -// SetInstanceMatchCriteria sets the InstanceMatchCriteria field's value. -func (s *CapacityReservation) SetInstanceMatchCriteria(v string) *CapacityReservation { - s.InstanceMatchCriteria = &v - return s -} - -// SetInstancePlatform sets the InstancePlatform field's value. -func (s *CapacityReservation) SetInstancePlatform(v string) *CapacityReservation { - s.InstancePlatform = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *CapacityReservation) SetInstanceType(v string) *CapacityReservation { - s.InstanceType = &v - return s -} - -// SetState sets the State field's value. -func (s *CapacityReservation) SetState(v string) *CapacityReservation { - s.State = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CapacityReservation) SetTags(v []*Tag) *CapacityReservation { - s.Tags = v - return s -} - -// SetTenancy sets the Tenancy field's value. -func (s *CapacityReservation) SetTenancy(v string) *CapacityReservation { - s.Tenancy = &v - return s -} - -// SetTotalInstanceCount sets the TotalInstanceCount field's value. -func (s *CapacityReservation) SetTotalInstanceCount(v int64) *CapacityReservation { - s.TotalInstanceCount = &v - return s -} - -// Describes an instance's Capacity Reservation targeting option. You can specify -// only one option at a time. Use the CapacityReservationPreference parameter -// to configure the instance to run as an On-Demand Instance or to run in any -// open Capacity Reservation that has matching attributes (instance type, platform, -// Availability Zone). Use the CapacityReservationTarget parameter to explicitly -// target a specific Capacity Reservation. -type CapacityReservationSpecification struct { - _ struct{} `type:"structure"` - - // Indicates the instance's Capacity Reservation preferences. Possible preferences - // include: - // - // * open - The instance can run in any open Capacity Reservation that has - // matching attributes (instance type, platform, Availability Zone). - // - // * none - The instance avoids running in a Capacity Reservation even if - // one is available. The instance runs as an On-Demand Instance. - CapacityReservationPreference *string `type:"string" enum:"CapacityReservationPreference"` - - // Information about the target Capacity Reservation. - CapacityReservationTarget *CapacityReservationTarget `type:"structure"` -} - -// String returns the string representation -func (s CapacityReservationSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CapacityReservationSpecification) GoString() string { - return s.String() -} - -// SetCapacityReservationPreference sets the CapacityReservationPreference field's value. -func (s *CapacityReservationSpecification) SetCapacityReservationPreference(v string) *CapacityReservationSpecification { - s.CapacityReservationPreference = &v - return s -} - -// SetCapacityReservationTarget sets the CapacityReservationTarget field's value. -func (s *CapacityReservationSpecification) SetCapacityReservationTarget(v *CapacityReservationTarget) *CapacityReservationSpecification { - s.CapacityReservationTarget = v - return s -} - -// Describes the instance's Capacity Reservation targeting preferences. The -// action returns the capacityReservationPreference response element if the -// instance is configured to run in On-Demand capacity, or if it is configured -// in run in any open Capacity Reservation that has matching attributes (instance -// type, platform, Availability Zone). The action returns the capacityReservationTarget -// response element if the instance explicily targets a specific Capacity Reservation. -type CapacityReservationSpecificationResponse struct { - _ struct{} `type:"structure"` - - // Describes the instance's Capacity Reservation preferences. Possible preferences - // include: - // - // * open - The instance can run in any open Capacity Reservation that has - // matching attributes (instance type, platform, Availability Zone). - // - // * none - The instance avoids running in a Capacity Reservation even if - // one is available. The instance runs in On-Demand capacity. - CapacityReservationPreference *string `locationName:"capacityReservationPreference" type:"string" enum:"CapacityReservationPreference"` - - // Information about the targeted Capacity Reservation. - CapacityReservationTarget *CapacityReservationTargetResponse `locationName:"capacityReservationTarget" type:"structure"` -} - -// String returns the string representation -func (s CapacityReservationSpecificationResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CapacityReservationSpecificationResponse) GoString() string { - return s.String() -} - -// SetCapacityReservationPreference sets the CapacityReservationPreference field's value. -func (s *CapacityReservationSpecificationResponse) SetCapacityReservationPreference(v string) *CapacityReservationSpecificationResponse { - s.CapacityReservationPreference = &v - return s -} - -// SetCapacityReservationTarget sets the CapacityReservationTarget field's value. -func (s *CapacityReservationSpecificationResponse) SetCapacityReservationTarget(v *CapacityReservationTargetResponse) *CapacityReservationSpecificationResponse { - s.CapacityReservationTarget = v - return s -} - -// Describes a target Capacity Reservation. -type CapacityReservationTarget struct { - _ struct{} `type:"structure"` - - // The ID of the Capacity Reservation. - CapacityReservationId *string `type:"string"` -} - -// String returns the string representation -func (s CapacityReservationTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CapacityReservationTarget) GoString() string { - return s.String() -} - -// SetCapacityReservationId sets the CapacityReservationId field's value. -func (s *CapacityReservationTarget) SetCapacityReservationId(v string) *CapacityReservationTarget { - s.CapacityReservationId = &v - return s -} - -// Describes a target Capacity Reservation. -type CapacityReservationTargetResponse struct { - _ struct{} `type:"structure"` - - // The ID of the Capacity Reservation. - CapacityReservationId *string `locationName:"capacityReservationId" type:"string"` -} - -// String returns the string representation -func (s CapacityReservationTargetResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CapacityReservationTargetResponse) GoString() string { - return s.String() -} - -// SetCapacityReservationId sets the CapacityReservationId field's value. -func (s *CapacityReservationTargetResponse) SetCapacityReservationId(v string) *CapacityReservationTargetResponse { - s.CapacityReservationId = &v - return s -} - -// Information about the client certificate used for authentication. -type CertificateAuthentication struct { - _ struct{} `type:"structure"` - - // The ARN of the client certificate. - ClientRootCertificateChain *string `locationName:"clientRootCertificateChain" type:"string"` -} - -// String returns the string representation -func (s CertificateAuthentication) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CertificateAuthentication) GoString() string { - return s.String() -} - -// SetClientRootCertificateChain sets the ClientRootCertificateChain field's value. -func (s *CertificateAuthentication) SetClientRootCertificateChain(v string) *CertificateAuthentication { - s.ClientRootCertificateChain = &v - return s -} - -// Information about the client certificate to be used for authentication. -type CertificateAuthenticationRequest struct { - _ struct{} `type:"structure"` - - // The ARN of the client certificate. The certificate must be signed by a certificate - // authority (CA) and it must be provisioned in AWS Certificate Manager (ACM). - ClientRootCertificateChainArn *string `type:"string"` -} - -// String returns the string representation -func (s CertificateAuthenticationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CertificateAuthenticationRequest) GoString() string { - return s.String() -} - -// SetClientRootCertificateChainArn sets the ClientRootCertificateChainArn field's value. -func (s *CertificateAuthenticationRequest) SetClientRootCertificateChainArn(v string) *CertificateAuthenticationRequest { - s.ClientRootCertificateChainArn = &v - return s -} - -// Provides authorization for Amazon to bring a specific IP address range to -// a specific AWS account using bring your own IP addresses (BYOIP). -type CidrAuthorizationContext struct { - _ struct{} `type:"structure"` - - // The plain-text authorization message for the prefix and account. - // - // Message is a required field - Message *string `type:"string" required:"true"` - - // The signed authorization message for the prefix and account. - // - // Signature is a required field - Signature *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CidrAuthorizationContext) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CidrAuthorizationContext) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CidrAuthorizationContext) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CidrAuthorizationContext"} - if s.Message == nil { - invalidParams.Add(request.NewErrParamRequired("Message")) - } - if s.Signature == nil { - invalidParams.Add(request.NewErrParamRequired("Signature")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMessage sets the Message field's value. -func (s *CidrAuthorizationContext) SetMessage(v string) *CidrAuthorizationContext { - s.Message = &v - return s -} - -// SetSignature sets the Signature field's value. -func (s *CidrAuthorizationContext) SetSignature(v string) *CidrAuthorizationContext { - s.Signature = &v - return s -} - -// Describes an IPv4 CIDR block. -type CidrBlock struct { - _ struct{} `type:"structure"` - - // The IPv4 CIDR block. - CidrBlock *string `locationName:"cidrBlock" type:"string"` -} - -// String returns the string representation -func (s CidrBlock) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CidrBlock) GoString() string { - return s.String() -} - -// SetCidrBlock sets the CidrBlock field's value. -func (s *CidrBlock) SetCidrBlock(v string) *CidrBlock { - s.CidrBlock = &v - return s -} - -// Describes the ClassicLink DNS support status of a VPC. -type ClassicLinkDnsSupport struct { - _ struct{} `type:"structure"` - - // Indicates whether ClassicLink DNS support is enabled for the VPC. - ClassicLinkDnsSupported *bool `locationName:"classicLinkDnsSupported" type:"boolean"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s ClassicLinkDnsSupport) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClassicLinkDnsSupport) GoString() string { - return s.String() -} - -// SetClassicLinkDnsSupported sets the ClassicLinkDnsSupported field's value. -func (s *ClassicLinkDnsSupport) SetClassicLinkDnsSupported(v bool) *ClassicLinkDnsSupport { - s.ClassicLinkDnsSupported = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *ClassicLinkDnsSupport) SetVpcId(v string) *ClassicLinkDnsSupport { - s.VpcId = &v - return s -} - -// Describes a linked EC2-Classic instance. -type ClassicLinkInstance struct { - _ struct{} `type:"structure"` - - // A list of security groups. - Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // Any tags assigned to the instance. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s ClassicLinkInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClassicLinkInstance) GoString() string { - return s.String() -} - -// SetGroups sets the Groups field's value. -func (s *ClassicLinkInstance) SetGroups(v []*GroupIdentifier) *ClassicLinkInstance { - s.Groups = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ClassicLinkInstance) SetInstanceId(v string) *ClassicLinkInstance { - s.InstanceId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ClassicLinkInstance) SetTags(v []*Tag) *ClassicLinkInstance { - s.Tags = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *ClassicLinkInstance) SetVpcId(v string) *ClassicLinkInstance { - s.VpcId = &v - return s -} - -// Describes a Classic Load Balancer. -type ClassicLoadBalancer struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s ClassicLoadBalancer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClassicLoadBalancer) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *ClassicLoadBalancer) SetName(v string) *ClassicLoadBalancer { - s.Name = &v - return s -} - -// Describes the Classic Load Balancers to attach to a Spot Fleet. Spot Fleet -// registers the running Spot Instances with these Classic Load Balancers. -type ClassicLoadBalancersConfig struct { - _ struct{} `type:"structure"` - - // One or more Classic Load Balancers. - ClassicLoadBalancers []*ClassicLoadBalancer `locationName:"classicLoadBalancers" locationNameList:"item" min:"1" type:"list"` -} - -// String returns the string representation -func (s ClassicLoadBalancersConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClassicLoadBalancersConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ClassicLoadBalancersConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ClassicLoadBalancersConfig"} - if s.ClassicLoadBalancers != nil && len(s.ClassicLoadBalancers) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClassicLoadBalancers", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClassicLoadBalancers sets the ClassicLoadBalancers field's value. -func (s *ClassicLoadBalancersConfig) SetClassicLoadBalancers(v []*ClassicLoadBalancer) *ClassicLoadBalancersConfig { - s.ClassicLoadBalancers = v - return s -} - -// Describes the state of a client certificate revocation list. -type ClientCertificateRevocationListStatus struct { - _ struct{} `type:"structure"` - - // The state of the client certificate revocation list. - Code *string `locationName:"code" type:"string" enum:"ClientCertificateRevocationListStatusCode"` - - // A message about the status of the client certificate revocation list, if - // applicable. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s ClientCertificateRevocationListStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClientCertificateRevocationListStatus) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *ClientCertificateRevocationListStatus) SetCode(v string) *ClientCertificateRevocationListStatus { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ClientCertificateRevocationListStatus) SetMessage(v string) *ClientCertificateRevocationListStatus { - s.Message = &v - return s -} - -// Describes the client-specific data. -type ClientData struct { - _ struct{} `type:"structure"` - - // A user-defined comment about the disk upload. - Comment *string `type:"string"` - - // The time that the disk upload ends. - UploadEnd *time.Time `type:"timestamp"` - - // The size of the uploaded disk image, in GiB. - UploadSize *float64 `type:"double"` - - // The time that the disk upload starts. - UploadStart *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s ClientData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClientData) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *ClientData) SetComment(v string) *ClientData { - s.Comment = &v - return s -} - -// SetUploadEnd sets the UploadEnd field's value. -func (s *ClientData) SetUploadEnd(v time.Time) *ClientData { - s.UploadEnd = &v - return s -} - -// SetUploadSize sets the UploadSize field's value. -func (s *ClientData) SetUploadSize(v float64) *ClientData { - s.UploadSize = &v - return s -} - -// SetUploadStart sets the UploadStart field's value. -func (s *ClientData) SetUploadStart(v time.Time) *ClientData { - s.UploadStart = &v - return s -} - -// Describes the authentication methods used by a Client VPN endpoint. Client -// VPN supports Active Directory and mutual authentication. For more information, -// see Authentication (vpn/latest/clientvpn-admin/authentication-authrization.html#client-authentication) -// in the AWS Client VPN Admin Guide. -type ClientVpnAuthentication struct { - _ struct{} `type:"structure"` - - // Information about the Active Directory, if applicable. - ActiveDirectory *DirectoryServiceAuthentication `locationName:"activeDirectory" type:"structure"` - - // Information about the authentication certificates, if applicable. - MutualAuthentication *CertificateAuthentication `locationName:"mutualAuthentication" type:"structure"` - - // The authentication type used. - Type *string `locationName:"type" type:"string" enum:"ClientVpnAuthenticationType"` -} - -// String returns the string representation -func (s ClientVpnAuthentication) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClientVpnAuthentication) GoString() string { - return s.String() -} - -// SetActiveDirectory sets the ActiveDirectory field's value. -func (s *ClientVpnAuthentication) SetActiveDirectory(v *DirectoryServiceAuthentication) *ClientVpnAuthentication { - s.ActiveDirectory = v - return s -} - -// SetMutualAuthentication sets the MutualAuthentication field's value. -func (s *ClientVpnAuthentication) SetMutualAuthentication(v *CertificateAuthentication) *ClientVpnAuthentication { - s.MutualAuthentication = v - return s -} - -// SetType sets the Type field's value. -func (s *ClientVpnAuthentication) SetType(v string) *ClientVpnAuthentication { - s.Type = &v - return s -} - -// Describes the authentication method to be used by a Client VPN endpoint. -// Client VPN supports Active Directory and mutual authentication. For more -// information, see Authentication (vpn/latest/clientvpn-admin/authentication-authrization.html#client-authentication) -// in the AWS Client VPN Admin Guide. -type ClientVpnAuthenticationRequest struct { - _ struct{} `type:"structure"` - - // Information about the Active Directory to be used, if applicable. You must - // provide this information if Type is directory-service-authentication. - ActiveDirectory *DirectoryServiceAuthenticationRequest `type:"structure"` - - // Information about the authentication certificates to be used, if applicable. - // You must provide this information if Type is certificate-authentication. - MutualAuthentication *CertificateAuthenticationRequest `type:"structure"` - - // The type of client authentication to be used. Specify certificate-authentication - // to use certificate-based authentication, or directory-service-authentication - // to use Active Directory authentication. - Type *string `type:"string" enum:"ClientVpnAuthenticationType"` -} - -// String returns the string representation -func (s ClientVpnAuthenticationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClientVpnAuthenticationRequest) GoString() string { - return s.String() -} - -// SetActiveDirectory sets the ActiveDirectory field's value. -func (s *ClientVpnAuthenticationRequest) SetActiveDirectory(v *DirectoryServiceAuthenticationRequest) *ClientVpnAuthenticationRequest { - s.ActiveDirectory = v - return s -} - -// SetMutualAuthentication sets the MutualAuthentication field's value. -func (s *ClientVpnAuthenticationRequest) SetMutualAuthentication(v *CertificateAuthenticationRequest) *ClientVpnAuthenticationRequest { - s.MutualAuthentication = v - return s -} - -// SetType sets the Type field's value. -func (s *ClientVpnAuthenticationRequest) SetType(v string) *ClientVpnAuthenticationRequest { - s.Type = &v - return s -} - -// Describes the state of an authorization rule. -type ClientVpnAuthorizationRuleStatus struct { - _ struct{} `type:"structure"` - - // The state of the authorization rule. - Code *string `locationName:"code" type:"string" enum:"ClientVpnAuthorizationRuleStatusCode"` - - // A message about the status of the authorization rule, if applicable. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s ClientVpnAuthorizationRuleStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClientVpnAuthorizationRuleStatus) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *ClientVpnAuthorizationRuleStatus) SetCode(v string) *ClientVpnAuthorizationRuleStatus { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ClientVpnAuthorizationRuleStatus) SetMessage(v string) *ClientVpnAuthorizationRuleStatus { - s.Message = &v - return s -} - -// Describes a client connection. -type ClientVpnConnection struct { - _ struct{} `type:"structure"` - - // The IP address of the client. - ClientIp *string `locationName:"clientIp" type:"string"` - - // The ID of the Client VPN endpoint to which the client is connected. - ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` - - // The common name associated with the client. This is either the name of the - // client certificate, or the Active Directory user name. - CommonName *string `locationName:"commonName" type:"string"` - - // The date and time the client connection was terminated. - ConnectionEndTime *string `locationName:"connectionEndTime" type:"string"` - - // The date and time the client connection was established. - ConnectionEstablishedTime *string `locationName:"connectionEstablishedTime" type:"string"` - - // The ID of the client connection. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // The number of bytes received by the client. - EgressBytes *string `locationName:"egressBytes" type:"string"` - - // The number of packets received by the client. - EgressPackets *string `locationName:"egressPackets" type:"string"` - - // The number of bytes sent by the client. - IngressBytes *string `locationName:"ingressBytes" type:"string"` - - // The number of packets sent by the client. - IngressPackets *string `locationName:"ingressPackets" type:"string"` - - // The current state of the client connection. - Status *ClientVpnConnectionStatus `locationName:"status" type:"structure"` - - // The current date and time. - Timestamp *string `locationName:"timestamp" type:"string"` - - // The username of the client who established the client connection. This information - // is only provided if Active Directory client authentication is used. - Username *string `locationName:"username" type:"string"` -} - -// String returns the string representation -func (s ClientVpnConnection) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClientVpnConnection) GoString() string { - return s.String() -} - -// SetClientIp sets the ClientIp field's value. -func (s *ClientVpnConnection) SetClientIp(v string) *ClientVpnConnection { - s.ClientIp = &v - return s -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *ClientVpnConnection) SetClientVpnEndpointId(v string) *ClientVpnConnection { - s.ClientVpnEndpointId = &v - return s -} - -// SetCommonName sets the CommonName field's value. -func (s *ClientVpnConnection) SetCommonName(v string) *ClientVpnConnection { - s.CommonName = &v - return s -} - -// SetConnectionEndTime sets the ConnectionEndTime field's value. -func (s *ClientVpnConnection) SetConnectionEndTime(v string) *ClientVpnConnection { - s.ConnectionEndTime = &v - return s -} - -// SetConnectionEstablishedTime sets the ConnectionEstablishedTime field's value. -func (s *ClientVpnConnection) SetConnectionEstablishedTime(v string) *ClientVpnConnection { - s.ConnectionEstablishedTime = &v - return s -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *ClientVpnConnection) SetConnectionId(v string) *ClientVpnConnection { - s.ConnectionId = &v - return s -} - -// SetEgressBytes sets the EgressBytes field's value. -func (s *ClientVpnConnection) SetEgressBytes(v string) *ClientVpnConnection { - s.EgressBytes = &v - return s -} - -// SetEgressPackets sets the EgressPackets field's value. -func (s *ClientVpnConnection) SetEgressPackets(v string) *ClientVpnConnection { - s.EgressPackets = &v - return s -} - -// SetIngressBytes sets the IngressBytes field's value. -func (s *ClientVpnConnection) SetIngressBytes(v string) *ClientVpnConnection { - s.IngressBytes = &v - return s -} - -// SetIngressPackets sets the IngressPackets field's value. -func (s *ClientVpnConnection) SetIngressPackets(v string) *ClientVpnConnection { - s.IngressPackets = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ClientVpnConnection) SetStatus(v *ClientVpnConnectionStatus) *ClientVpnConnection { - s.Status = v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *ClientVpnConnection) SetTimestamp(v string) *ClientVpnConnection { - s.Timestamp = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *ClientVpnConnection) SetUsername(v string) *ClientVpnConnection { - s.Username = &v - return s -} - -// Describes the status of a client connection. -type ClientVpnConnectionStatus struct { - _ struct{} `type:"structure"` - - // The state of the client connection. - Code *string `locationName:"code" type:"string" enum:"ClientVpnConnectionStatusCode"` - - // A message about the status of the client connection, if applicable. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s ClientVpnConnectionStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClientVpnConnectionStatus) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *ClientVpnConnectionStatus) SetCode(v string) *ClientVpnConnectionStatus { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ClientVpnConnectionStatus) SetMessage(v string) *ClientVpnConnectionStatus { - s.Message = &v - return s -} - -// Describes a Client VPN endpoint. -type ClientVpnEndpoint struct { - _ struct{} `type:"structure"` - - // Information about the associated target networks. A target network is a subnet - // in a VPC. - AssociatedTargetNetworks []*AssociatedTargetNetwork `locationName:"associatedTargetNetwork" locationNameList:"item" type:"list"` - - // Information about the authentication method used by the Client VPN endpoint. - AuthenticationOptions []*ClientVpnAuthentication `locationName:"authenticationOptions" locationNameList:"item" type:"list"` - - // The IPv4 address range, in CIDR notation, from which client IP addresses - // are assigned. - ClientCidrBlock *string `locationName:"clientCidrBlock" type:"string"` - - // The ID of the Client VPN endpoint. - ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` - - // Information about the client connection logging options for the Client VPN - // endpoint. - ConnectionLogOptions *ConnectionLogResponseOptions `locationName:"connectionLogOptions" type:"structure"` - - // The date and time the Client VPN endpoint was created. - CreationTime *string `locationName:"creationTime" type:"string"` - - // The date and time the Client VPN endpoint was deleted, if applicable. Information - // about deleted Client VPN endpoints is retained for 24 hours, unless a new - // Client VPN is created with the same name. - DeletionTime *string `locationName:"deletionTime" type:"string"` - - // A brief description of the endpoint. - Description *string `locationName:"description" type:"string"` - - // The DNS name to be used by clients when establishing a connection. - DnsName *string `locationName:"dnsName" type:"string"` - - // The ARN of the server certificate. - ServerCertificateArn *string `locationName:"serverCertificateArn" type:"string"` - - // Indicates whether VPN split tunneling is supported. - SplitTunnel *bool `locationName:"splitTunnel" type:"boolean"` - - // The current state of the Client VPN endpoint. - Status *ClientVpnEndpointStatus `locationName:"status" type:"structure"` - - // The transport protocol used by the Client VPN endpoint. - TransportProtocol *string `locationName:"transportProtocol" type:"string" enum:"TransportProtocol"` - - // The protocol used by the VPN session. - VpnProtocol *string `locationName:"vpnProtocol" type:"string" enum:"VpnProtocol"` -} - -// String returns the string representation -func (s ClientVpnEndpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClientVpnEndpoint) GoString() string { - return s.String() -} - -// SetAssociatedTargetNetworks sets the AssociatedTargetNetworks field's value. -func (s *ClientVpnEndpoint) SetAssociatedTargetNetworks(v []*AssociatedTargetNetwork) *ClientVpnEndpoint { - s.AssociatedTargetNetworks = v - return s -} - -// SetAuthenticationOptions sets the AuthenticationOptions field's value. -func (s *ClientVpnEndpoint) SetAuthenticationOptions(v []*ClientVpnAuthentication) *ClientVpnEndpoint { - s.AuthenticationOptions = v - return s -} - -// SetClientCidrBlock sets the ClientCidrBlock field's value. -func (s *ClientVpnEndpoint) SetClientCidrBlock(v string) *ClientVpnEndpoint { - s.ClientCidrBlock = &v - return s -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *ClientVpnEndpoint) SetClientVpnEndpointId(v string) *ClientVpnEndpoint { - s.ClientVpnEndpointId = &v - return s -} - -// SetConnectionLogOptions sets the ConnectionLogOptions field's value. -func (s *ClientVpnEndpoint) SetConnectionLogOptions(v *ConnectionLogResponseOptions) *ClientVpnEndpoint { - s.ConnectionLogOptions = v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ClientVpnEndpoint) SetCreationTime(v string) *ClientVpnEndpoint { - s.CreationTime = &v - return s -} - -// SetDeletionTime sets the DeletionTime field's value. -func (s *ClientVpnEndpoint) SetDeletionTime(v string) *ClientVpnEndpoint { - s.DeletionTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ClientVpnEndpoint) SetDescription(v string) *ClientVpnEndpoint { - s.Description = &v - return s -} - -// SetDnsName sets the DnsName field's value. -func (s *ClientVpnEndpoint) SetDnsName(v string) *ClientVpnEndpoint { - s.DnsName = &v - return s -} - -// SetServerCertificateArn sets the ServerCertificateArn field's value. -func (s *ClientVpnEndpoint) SetServerCertificateArn(v string) *ClientVpnEndpoint { - s.ServerCertificateArn = &v - return s -} - -// SetSplitTunnel sets the SplitTunnel field's value. -func (s *ClientVpnEndpoint) SetSplitTunnel(v bool) *ClientVpnEndpoint { - s.SplitTunnel = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ClientVpnEndpoint) SetStatus(v *ClientVpnEndpointStatus) *ClientVpnEndpoint { - s.Status = v - return s -} - -// SetTransportProtocol sets the TransportProtocol field's value. -func (s *ClientVpnEndpoint) SetTransportProtocol(v string) *ClientVpnEndpoint { - s.TransportProtocol = &v - return s -} - -// SetVpnProtocol sets the VpnProtocol field's value. -func (s *ClientVpnEndpoint) SetVpnProtocol(v string) *ClientVpnEndpoint { - s.VpnProtocol = &v - return s -} - -// Describes the state of a Client VPN endpoint. -type ClientVpnEndpointStatus struct { - _ struct{} `type:"structure"` - - // The state of the Client VPN endpoint. Possible states include: - // - // * pending-associate - The Client VPN endpoint has been created but no - // target networks have been associated. The Client VPN endpoint cannot accept - // connections. - // - // * available - The Client VPN endpoint has been created and a target network - // has been associated. The Client VPN endpoint can accept connections. - // - // * deleting - The Client VPN endpoint is being deleted. The Client VPN - // endpoint cannot accept connections. - // - // * deleted - The Client VPN endpoint has been deleted. The Client VPN endpoint - // cannot accept connections. - Code *string `locationName:"code" type:"string" enum:"ClientVpnEndpointStatusCode"` - - // A message about the status of the Client VPN endpoint. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s ClientVpnEndpointStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClientVpnEndpointStatus) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *ClientVpnEndpointStatus) SetCode(v string) *ClientVpnEndpointStatus { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ClientVpnEndpointStatus) SetMessage(v string) *ClientVpnEndpointStatus { - s.Message = &v - return s -} - -// Information about a Client VPN endpoint route. -type ClientVpnRoute struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint with which the route is associated. - ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` - - // A brief description of the route. - Description *string `locationName:"description" type:"string"` - - // The IPv4 address range, in CIDR notation, of the route destination. - DestinationCidr *string `locationName:"destinationCidr" type:"string"` - - // Indicates how the route was associated with the Client VPN endpoint. associate - // indicates that the route was automatically added when the target network - // was associated with the Client VPN endpoint. add-route indicates that the - // route was manually added using the CreateClientVpnRoute action. - Origin *string `locationName:"origin" type:"string"` - - // The current state of the route. - Status *ClientVpnRouteStatus `locationName:"status" type:"structure"` - - // The ID of the subnet through which traffic is routed. - TargetSubnet *string `locationName:"targetSubnet" type:"string"` - - // The route type. - Type *string `locationName:"type" type:"string"` -} - -// String returns the string representation -func (s ClientVpnRoute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClientVpnRoute) GoString() string { - return s.String() -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *ClientVpnRoute) SetClientVpnEndpointId(v string) *ClientVpnRoute { - s.ClientVpnEndpointId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ClientVpnRoute) SetDescription(v string) *ClientVpnRoute { - s.Description = &v - return s -} - -// SetDestinationCidr sets the DestinationCidr field's value. -func (s *ClientVpnRoute) SetDestinationCidr(v string) *ClientVpnRoute { - s.DestinationCidr = &v - return s -} - -// SetOrigin sets the Origin field's value. -func (s *ClientVpnRoute) SetOrigin(v string) *ClientVpnRoute { - s.Origin = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ClientVpnRoute) SetStatus(v *ClientVpnRouteStatus) *ClientVpnRoute { - s.Status = v - return s -} - -// SetTargetSubnet sets the TargetSubnet field's value. -func (s *ClientVpnRoute) SetTargetSubnet(v string) *ClientVpnRoute { - s.TargetSubnet = &v - return s -} - -// SetType sets the Type field's value. -func (s *ClientVpnRoute) SetType(v string) *ClientVpnRoute { - s.Type = &v - return s -} - -// Describes the state of a Client VPN endpoint route. -type ClientVpnRouteStatus struct { - _ struct{} `type:"structure"` - - // The state of the Client VPN endpoint route. - Code *string `locationName:"code" type:"string" enum:"ClientVpnRouteStatusCode"` - - // A message about the status of the Client VPN endpoint route, if applicable. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s ClientVpnRouteStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClientVpnRouteStatus) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *ClientVpnRouteStatus) SetCode(v string) *ClientVpnRouteStatus { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ClientVpnRouteStatus) SetMessage(v string) *ClientVpnRouteStatus { - s.Message = &v - return s -} - -type ConfirmProductInstanceInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The product code. This must be a product code that you own. - // - // ProductCode is a required field - ProductCode *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ConfirmProductInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmProductInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfirmProductInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfirmProductInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.ProductCode == nil { - invalidParams.Add(request.NewErrParamRequired("ProductCode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *ConfirmProductInstanceInput) SetDryRun(v bool) *ConfirmProductInstanceInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ConfirmProductInstanceInput) SetInstanceId(v string) *ConfirmProductInstanceInput { - s.InstanceId = &v - return s -} - -// SetProductCode sets the ProductCode field's value. -func (s *ConfirmProductInstanceInput) SetProductCode(v string) *ConfirmProductInstanceInput { - s.ProductCode = &v - return s -} - -type ConfirmProductInstanceOutput struct { - _ struct{} `type:"structure"` - - // The AWS account ID of the instance owner. This is only present if the product - // code is attached to the instance. - OwnerId *string `locationName:"ownerId" type:"string"` - - // The return value of the request. Returns true if the specified product code - // is owned by the requester and associated with the specified instance. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s ConfirmProductInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmProductInstanceOutput) GoString() string { - return s.String() -} - -// SetOwnerId sets the OwnerId field's value. -func (s *ConfirmProductInstanceOutput) SetOwnerId(v string) *ConfirmProductInstanceOutput { - s.OwnerId = &v - return s -} - -// SetReturn sets the Return field's value. -func (s *ConfirmProductInstanceOutput) SetReturn(v bool) *ConfirmProductInstanceOutput { - s.Return = &v - return s -} - -// Describes the client connection logging options for the Client VPN endpoint. -type ConnectionLogOptions struct { - _ struct{} `type:"structure"` - - // The name of the CloudWatch Logs log group. - CloudwatchLogGroup *string `type:"string"` - - // The name of the CloudWatch Logs log stream to which the connection data is - // published. - CloudwatchLogStream *string `type:"string"` - - // Indicates whether connection logging is enabled. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s ConnectionLogOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConnectionLogOptions) GoString() string { - return s.String() -} - -// SetCloudwatchLogGroup sets the CloudwatchLogGroup field's value. -func (s *ConnectionLogOptions) SetCloudwatchLogGroup(v string) *ConnectionLogOptions { - s.CloudwatchLogGroup = &v - return s -} - -// SetCloudwatchLogStream sets the CloudwatchLogStream field's value. -func (s *ConnectionLogOptions) SetCloudwatchLogStream(v string) *ConnectionLogOptions { - s.CloudwatchLogStream = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *ConnectionLogOptions) SetEnabled(v bool) *ConnectionLogOptions { - s.Enabled = &v - return s -} - -// Information about the client connection logging options for a Client VPN -// endpoint. -type ConnectionLogResponseOptions struct { - _ struct{} `type:"structure"` - - // The name of the Amazon CloudWatch Logs log group to which connection logging - // data is published. - CloudwatchLogGroup *string `type:"string"` - - // The name of the Amazon CloudWatch Logs log stream to which connection logging - // data is published. - CloudwatchLogStream *string `type:"string"` - - // Indicates whether client connection logging is enabled for the Client VPN - // endpoint. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s ConnectionLogResponseOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConnectionLogResponseOptions) GoString() string { - return s.String() -} - -// SetCloudwatchLogGroup sets the CloudwatchLogGroup field's value. -func (s *ConnectionLogResponseOptions) SetCloudwatchLogGroup(v string) *ConnectionLogResponseOptions { - s.CloudwatchLogGroup = &v - return s -} - -// SetCloudwatchLogStream sets the CloudwatchLogStream field's value. -func (s *ConnectionLogResponseOptions) SetCloudwatchLogStream(v string) *ConnectionLogResponseOptions { - s.CloudwatchLogStream = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *ConnectionLogResponseOptions) SetEnabled(v bool) *ConnectionLogResponseOptions { - s.Enabled = &v - return s -} - -// Describes a connection notification for a VPC endpoint or VPC endpoint service. -type ConnectionNotification struct { - _ struct{} `type:"structure"` - - // The events for the notification. Valid values are Accept, Connect, Delete, - // and Reject. - ConnectionEvents []*string `locationName:"connectionEvents" locationNameList:"item" type:"list"` - - // The ARN of the SNS topic for the notification. - ConnectionNotificationArn *string `locationName:"connectionNotificationArn" type:"string"` - - // The ID of the notification. - ConnectionNotificationId *string `locationName:"connectionNotificationId" type:"string"` - - // The state of the notification. - ConnectionNotificationState *string `locationName:"connectionNotificationState" type:"string" enum:"ConnectionNotificationState"` - - // The type of notification. - ConnectionNotificationType *string `locationName:"connectionNotificationType" type:"string" enum:"ConnectionNotificationType"` - - // The ID of the endpoint service. - ServiceId *string `locationName:"serviceId" type:"string"` - - // The ID of the VPC endpoint. - VpcEndpointId *string `locationName:"vpcEndpointId" type:"string"` -} - -// String returns the string representation -func (s ConnectionNotification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConnectionNotification) GoString() string { - return s.String() -} - -// SetConnectionEvents sets the ConnectionEvents field's value. -func (s *ConnectionNotification) SetConnectionEvents(v []*string) *ConnectionNotification { - s.ConnectionEvents = v - return s -} - -// SetConnectionNotificationArn sets the ConnectionNotificationArn field's value. -func (s *ConnectionNotification) SetConnectionNotificationArn(v string) *ConnectionNotification { - s.ConnectionNotificationArn = &v - return s -} - -// SetConnectionNotificationId sets the ConnectionNotificationId field's value. -func (s *ConnectionNotification) SetConnectionNotificationId(v string) *ConnectionNotification { - s.ConnectionNotificationId = &v - return s -} - -// SetConnectionNotificationState sets the ConnectionNotificationState field's value. -func (s *ConnectionNotification) SetConnectionNotificationState(v string) *ConnectionNotification { - s.ConnectionNotificationState = &v - return s -} - -// SetConnectionNotificationType sets the ConnectionNotificationType field's value. -func (s *ConnectionNotification) SetConnectionNotificationType(v string) *ConnectionNotification { - s.ConnectionNotificationType = &v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *ConnectionNotification) SetServiceId(v string) *ConnectionNotification { - s.ServiceId = &v - return s -} - -// SetVpcEndpointId sets the VpcEndpointId field's value. -func (s *ConnectionNotification) SetVpcEndpointId(v string) *ConnectionNotification { - s.VpcEndpointId = &v - return s -} - -// Describes a conversion task. -type ConversionTask struct { - _ struct{} `type:"structure"` - - // The ID of the conversion task. - ConversionTaskId *string `locationName:"conversionTaskId" type:"string"` - - // The time when the task expires. If the upload isn't complete before the expiration - // time, we automatically cancel the task. - ExpirationTime *string `locationName:"expirationTime" type:"string"` - - // If the task is for importing an instance, this contains information about - // the import instance task. - ImportInstance *ImportInstanceTaskDetails `locationName:"importInstance" type:"structure"` - - // If the task is for importing a volume, this contains information about the - // import volume task. - ImportVolume *ImportVolumeTaskDetails `locationName:"importVolume" type:"structure"` - - // The state of the conversion task. - State *string `locationName:"state" type:"string" enum:"ConversionTaskState"` - - // The status message related to the conversion task. - StatusMessage *string `locationName:"statusMessage" type:"string"` - - // Any tags assigned to the task. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s ConversionTask) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConversionTask) GoString() string { - return s.String() -} - -// SetConversionTaskId sets the ConversionTaskId field's value. -func (s *ConversionTask) SetConversionTaskId(v string) *ConversionTask { - s.ConversionTaskId = &v - return s -} - -// SetExpirationTime sets the ExpirationTime field's value. -func (s *ConversionTask) SetExpirationTime(v string) *ConversionTask { - s.ExpirationTime = &v - return s -} - -// SetImportInstance sets the ImportInstance field's value. -func (s *ConversionTask) SetImportInstance(v *ImportInstanceTaskDetails) *ConversionTask { - s.ImportInstance = v - return s -} - -// SetImportVolume sets the ImportVolume field's value. -func (s *ConversionTask) SetImportVolume(v *ImportVolumeTaskDetails) *ConversionTask { - s.ImportVolume = v - return s -} - -// SetState sets the State field's value. -func (s *ConversionTask) SetState(v string) *ConversionTask { - s.State = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ConversionTask) SetStatusMessage(v string) *ConversionTask { - s.StatusMessage = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ConversionTask) SetTags(v []*Tag) *ConversionTask { - s.Tags = v - return s -} - -type CopyFpgaImageInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` - - // The description for the new AFI. - Description *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The name for the new AFI. The default is the name of the source AFI. - Name *string `type:"string"` - - // The ID of the source AFI. - // - // SourceFpgaImageId is a required field - SourceFpgaImageId *string `type:"string" required:"true"` - - // The region that contains the source AFI. - // - // SourceRegion is a required field - SourceRegion *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyFpgaImageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyFpgaImageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyFpgaImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyFpgaImageInput"} - if s.SourceFpgaImageId == nil { - invalidParams.Add(request.NewErrParamRequired("SourceFpgaImageId")) - } - if s.SourceRegion == nil { - invalidParams.Add(request.NewErrParamRequired("SourceRegion")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CopyFpgaImageInput) SetClientToken(v string) *CopyFpgaImageInput { - s.ClientToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CopyFpgaImageInput) SetDescription(v string) *CopyFpgaImageInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CopyFpgaImageInput) SetDryRun(v bool) *CopyFpgaImageInput { - s.DryRun = &v - return s -} - -// SetName sets the Name field's value. -func (s *CopyFpgaImageInput) SetName(v string) *CopyFpgaImageInput { - s.Name = &v - return s -} - -// SetSourceFpgaImageId sets the SourceFpgaImageId field's value. -func (s *CopyFpgaImageInput) SetSourceFpgaImageId(v string) *CopyFpgaImageInput { - s.SourceFpgaImageId = &v - return s -} - -// SetSourceRegion sets the SourceRegion field's value. -func (s *CopyFpgaImageInput) SetSourceRegion(v string) *CopyFpgaImageInput { - s.SourceRegion = &v - return s -} - -type CopyFpgaImageOutput struct { - _ struct{} `type:"structure"` - - // The ID of the new AFI. - FpgaImageId *string `locationName:"fpgaImageId" type:"string"` -} - -// String returns the string representation -func (s CopyFpgaImageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyFpgaImageOutput) GoString() string { - return s.String() -} - -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *CopyFpgaImageOutput) SetFpgaImageId(v string) *CopyFpgaImageOutput { - s.FpgaImageId = &v - return s -} - -// Contains the parameters for CopyImage. -type CopyImageInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure idempotency of the - // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. - ClientToken *string `type:"string"` - - // A description for the new AMI in the destination region. - Description *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Specifies whether the destination snapshots of the copied image should be - // encrypted. You can encrypt a copy of an unencrypted snapshot, but you cannot - // create an unencrypted copy of an encrypted snapshot. The default CMK for - // EBS is used unless you specify a non-default AWS Key Management Service (AWS - // KMS) CMK using KmsKeyId. For more information, see Amazon EBS Encryption - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in - // the Amazon Elastic Compute Cloud User Guide. - Encrypted *bool `locationName:"encrypted" type:"boolean"` - - // An identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use when creating the encrypted volume. This parameter is only - // required if you want to use a non-default CMK; if this parameter is not specified, - // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted - // flag must also be set. - // - // The CMK identifier may be provided in any of the following formats: - // - // * Key ID - // - // * Key alias, in the form alias/ExampleAlias - // - // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed - // by the region of the CMK, the AWS account ID of the CMK owner, the key - // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. - // - // - // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, - // followed by the region of the CMK, the AWS account ID of the CMK owner, - // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. - // - // - // AWS parses KmsKeyId asynchronously, meaning that the action you call may - // appear to complete even though you provided an invalid identifier. This action - // will eventually report failure. - // - // The specified CMK must exist in the region that the snapshot is being copied - // to. - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - - // The name of the new AMI in the destination region. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The ID of the AMI to copy. - // - // SourceImageId is a required field - SourceImageId *string `type:"string" required:"true"` - - // The name of the region that contains the AMI to copy. - // - // SourceRegion is a required field - SourceRegion *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyImageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyImageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyImageInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.SourceImageId == nil { - invalidParams.Add(request.NewErrParamRequired("SourceImageId")) - } - if s.SourceRegion == nil { - invalidParams.Add(request.NewErrParamRequired("SourceRegion")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CopyImageInput) SetClientToken(v string) *CopyImageInput { - s.ClientToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CopyImageInput) SetDescription(v string) *CopyImageInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CopyImageInput) SetDryRun(v bool) *CopyImageInput { - s.DryRun = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *CopyImageInput) SetEncrypted(v bool) *CopyImageInput { - s.Encrypted = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CopyImageInput) SetKmsKeyId(v string) *CopyImageInput { - s.KmsKeyId = &v - return s -} - -// SetName sets the Name field's value. -func (s *CopyImageInput) SetName(v string) *CopyImageInput { - s.Name = &v - return s -} - -// SetSourceImageId sets the SourceImageId field's value. -func (s *CopyImageInput) SetSourceImageId(v string) *CopyImageInput { - s.SourceImageId = &v - return s -} - -// SetSourceRegion sets the SourceRegion field's value. -func (s *CopyImageInput) SetSourceRegion(v string) *CopyImageInput { - s.SourceRegion = &v - return s -} - -// Contains the output of CopyImage. -type CopyImageOutput struct { - _ struct{} `type:"structure"` - - // The ID of the new AMI. - ImageId *string `locationName:"imageId" type:"string"` -} - -// String returns the string representation -func (s CopyImageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyImageOutput) GoString() string { - return s.String() -} - -// SetImageId sets the ImageId field's value. -func (s *CopyImageOutput) SetImageId(v string) *CopyImageOutput { - s.ImageId = &v - return s -} - -// Contains the parameters for CopySnapshot. -type CopySnapshotInput struct { - _ struct{} `type:"structure"` - - // A description for the EBS snapshot. - Description *string `type:"string"` - - // The destination region to use in the PresignedUrl parameter of a snapshot - // copy operation. This parameter is only valid for specifying the destination - // region in a PresignedUrl parameter, where it is required. - // - // The snapshot copy is sent to the regional endpoint that you sent the HTTP - // request to (for example, ec2.us-east-1.amazonaws.com). With the AWS CLI, - // this is specified using the --region parameter or the default region in your - // AWS configuration file. - DestinationRegion *string `locationName:"destinationRegion" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Specifies whether the destination snapshot should be encrypted. You can encrypt - // a copy of an unencrypted snapshot, but you cannot use it to create an unencrypted - // copy of an encrypted snapshot. Your default CMK for EBS is used unless you - // specify a non-default AWS Key Management Service (AWS KMS) CMK using KmsKeyId. - // For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) - // in the Amazon Elastic Compute Cloud User Guide. - Encrypted *bool `locationName:"encrypted" type:"boolean"` - - // An identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use when creating the encrypted volume. This parameter is only - // required if you want to use a non-default CMK; if this parameter is not specified, - // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted - // flag must also be set. - // - // The CMK identifier may be provided in any of the following formats: - // - // * Key ID - // - // * Key alias - // - // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed - // by the region of the CMK, the AWS account ID of the CMK owner, the key - // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. - // - // - // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, - // followed by the region of the CMK, the AWS account ID of the CMK owner, - // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. - // - // - // AWS parses KmsKeyId asynchronously, meaning that the action you call may - // appear to complete even though you provided an invalid identifier. The action - // will eventually fail. - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - - // When you copy an encrypted source snapshot using the Amazon EC2 Query API, - // you must supply a pre-signed URL. This parameter is optional for unencrypted - // snapshots. For more information, see Query Requests (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html). - // - // The PresignedUrl should use the snapshot source endpoint, the CopySnapshot - // action, and include the SourceRegion, SourceSnapshotId, and DestinationRegion - // parameters. The PresignedUrl must be signed using AWS Signature Version 4. - // Because EBS snapshots are stored in Amazon S3, the signing algorithm for - // this parameter uses the same logic that is described in Authenticating Requests - // by Using Query Parameters (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) - // in the Amazon Simple Storage Service API Reference. An invalid or improperly - // signed PresignedUrl will cause the copy operation to fail asynchronously, - // and the snapshot will move to an error state. - PresignedUrl *string `locationName:"presignedUrl" type:"string"` - - // The ID of the region that contains the snapshot to be copied. - // - // SourceRegion is a required field - SourceRegion *string `type:"string" required:"true"` - - // The ID of the EBS snapshot to copy. - // - // SourceSnapshotId is a required field - SourceSnapshotId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopySnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopySnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopySnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopySnapshotInput"} - if s.SourceRegion == nil { - invalidParams.Add(request.NewErrParamRequired("SourceRegion")) - } - if s.SourceSnapshotId == nil { - invalidParams.Add(request.NewErrParamRequired("SourceSnapshotId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CopySnapshotInput) SetDescription(v string) *CopySnapshotInput { - s.Description = &v - return s -} - -// SetDestinationRegion sets the DestinationRegion field's value. -func (s *CopySnapshotInput) SetDestinationRegion(v string) *CopySnapshotInput { - s.DestinationRegion = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CopySnapshotInput) SetDryRun(v bool) *CopySnapshotInput { - s.DryRun = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *CopySnapshotInput) SetEncrypted(v bool) *CopySnapshotInput { - s.Encrypted = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CopySnapshotInput) SetKmsKeyId(v string) *CopySnapshotInput { - s.KmsKeyId = &v - return s -} - -// SetPresignedUrl sets the PresignedUrl field's value. -func (s *CopySnapshotInput) SetPresignedUrl(v string) *CopySnapshotInput { - s.PresignedUrl = &v - return s -} - -// SetSourceRegion sets the SourceRegion field's value. -func (s *CopySnapshotInput) SetSourceRegion(v string) *CopySnapshotInput { - s.SourceRegion = &v - return s -} - -// SetSourceSnapshotId sets the SourceSnapshotId field's value. -func (s *CopySnapshotInput) SetSourceSnapshotId(v string) *CopySnapshotInput { - s.SourceSnapshotId = &v - return s -} - -// Contains the output of CopySnapshot. -type CopySnapshotOutput struct { - _ struct{} `type:"structure"` - - // The ID of the new snapshot. - SnapshotId *string `locationName:"snapshotId" type:"string"` -} - -// String returns the string representation -func (s CopySnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopySnapshotOutput) GoString() string { - return s.String() -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *CopySnapshotOutput) SetSnapshotId(v string) *CopySnapshotOutput { - s.SnapshotId = &v - return s -} - -// The CPU options for the instance. -type CpuOptions struct { - _ struct{} `type:"structure"` - - // The number of CPU cores for the instance. - CoreCount *int64 `locationName:"coreCount" type:"integer"` - - // The number of threads per CPU core. - ThreadsPerCore *int64 `locationName:"threadsPerCore" type:"integer"` -} - -// String returns the string representation -func (s CpuOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CpuOptions) GoString() string { - return s.String() -} - -// SetCoreCount sets the CoreCount field's value. -func (s *CpuOptions) SetCoreCount(v int64) *CpuOptions { - s.CoreCount = &v - return s -} - -// SetThreadsPerCore sets the ThreadsPerCore field's value. -func (s *CpuOptions) SetThreadsPerCore(v int64) *CpuOptions { - s.ThreadsPerCore = &v - return s -} - -// The CPU options for the instance. Both the core count and threads per core -// must be specified in the request. -type CpuOptionsRequest struct { - _ struct{} `type:"structure"` - - // The number of CPU cores for the instance. - CoreCount *int64 `type:"integer"` - - // The number of threads per CPU core. To disable Intel Hyper-Threading Technology - // for the instance, specify a value of 1. Otherwise, specify the default value - // of 2. - ThreadsPerCore *int64 `type:"integer"` -} - -// String returns the string representation -func (s CpuOptionsRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CpuOptionsRequest) GoString() string { - return s.String() -} - -// SetCoreCount sets the CoreCount field's value. -func (s *CpuOptionsRequest) SetCoreCount(v int64) *CpuOptionsRequest { - s.CoreCount = &v - return s -} - -// SetThreadsPerCore sets the ThreadsPerCore field's value. -func (s *CpuOptionsRequest) SetThreadsPerCore(v int64) *CpuOptionsRequest { - s.ThreadsPerCore = &v - return s -} - -type CreateCapacityReservationInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which to create the Capacity Reservation. - // - // AvailabilityZone is a required field - AvailabilityZone *string `type:"string" required:"true"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - // - // Constraint: Maximum 64 ASCII characters. - ClientToken *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // Indicates whether the Capacity Reservation supports EBS-optimized instances. - // This optimization provides dedicated throughput to Amazon EBS and an optimized - // configuration stack to provide optimal I/O performance. This optimization - // isn't available with all instance types. Additional usage charges apply when - // using an EBS- optimized instance. - EbsOptimized *bool `type:"boolean"` - - // The date and time at which the Capacity Reservation expires. When a Capacity - // Reservation expires, the reserved capacity is released and you can no longer - // launch instances into it. The Capacity Reservation's state changes to expired - // when it reaches its end date and time. - // - // You must provide an EndDate value if EndDateType is limited. Omit EndDate - // if EndDateType is unlimited. - // - // If the EndDateType is limited, the Capacity Reservation is cancelled within - // an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, - // the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 - // on 5/31/2019. - EndDate *time.Time `type:"timestamp"` - - // Indicates the way in which the Capacity Reservation ends. A Capacity Reservation - // can have one of the following end types: - // - // * unlimited - The Capacity Reservation remains active until you explicitly - // cancel it. Do not provide an EndDate if the EndDateType is unlimited. - // - // * limited - The Capacity Reservation expires automatically at a specified - // date and time. You must provide an EndDate value if the EndDateType value - // is limited. - EndDateType *string `type:"string" enum:"EndDateType"` - - // Indicates whether the Capacity Reservation supports instances with temporary, - // block-level storage. - EphemeralStorage *bool `type:"boolean"` - - // The number of instances for which to reserve capacity. - // - // InstanceCount is a required field - InstanceCount *int64 `type:"integer" required:"true"` - - // Indicates the type of instance launches that the Capacity Reservation accepts. - // The options include: - // - // * open - The Capacity Reservation automatically matches all instances - // that have matching attributes (instance type, platform, and Availability - // Zone). Instances that have matching attributes run in the Capacity Reservation - // automatically without specifying any additional parameters. - // - // * targeted - The Capacity Reservation only accepts instances that have - // matching attributes (instance type, platform, and Availability Zone), - // and explicitly target the Capacity Reservation. This ensures that only - // permitted instances can use the reserved capacity. - // - // Default: open - InstanceMatchCriteria *string `type:"string" enum:"InstanceMatchCriteria"` - - // The type of operating system for which to reserve capacity. - // - // InstancePlatform is a required field - InstancePlatform *string `type:"string" required:"true" enum:"CapacityReservationInstancePlatform"` - - // The instance type for which to reserve capacity. For more information, see - // Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // InstanceType is a required field - InstanceType *string `type:"string" required:"true"` - - // The tags to apply to the Capacity Reservation during launch. - TagSpecifications []*TagSpecification `locationNameList:"item" type:"list"` - - // Indicates the tenancy of the Capacity Reservation. A Capacity Reservation - // can have one of the following tenancy settings: - // - // * default - The Capacity Reservation is created on hardware that is shared - // with other AWS accounts. - // - // * dedicated - The Capacity Reservation is created on single-tenant hardware - // that is dedicated to a single AWS account. - Tenancy *string `type:"string" enum:"CapacityReservationTenancy"` -} - -// String returns the string representation -func (s CreateCapacityReservationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCapacityReservationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCapacityReservationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCapacityReservationInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.InstanceCount == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceCount")) - } - if s.InstancePlatform == nil { - invalidParams.Add(request.NewErrParamRequired("InstancePlatform")) - } - if s.InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateCapacityReservationInput) SetAvailabilityZone(v string) *CreateCapacityReservationInput { - s.AvailabilityZone = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateCapacityReservationInput) SetClientToken(v string) *CreateCapacityReservationInput { - s.ClientToken = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateCapacityReservationInput) SetDryRun(v bool) *CreateCapacityReservationInput { - s.DryRun = &v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *CreateCapacityReservationInput) SetEbsOptimized(v bool) *CreateCapacityReservationInput { - s.EbsOptimized = &v - return s -} - -// SetEndDate sets the EndDate field's value. -func (s *CreateCapacityReservationInput) SetEndDate(v time.Time) *CreateCapacityReservationInput { - s.EndDate = &v - return s -} - -// SetEndDateType sets the EndDateType field's value. -func (s *CreateCapacityReservationInput) SetEndDateType(v string) *CreateCapacityReservationInput { - s.EndDateType = &v - return s -} - -// SetEphemeralStorage sets the EphemeralStorage field's value. -func (s *CreateCapacityReservationInput) SetEphemeralStorage(v bool) *CreateCapacityReservationInput { - s.EphemeralStorage = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *CreateCapacityReservationInput) SetInstanceCount(v int64) *CreateCapacityReservationInput { - s.InstanceCount = &v - return s -} - -// SetInstanceMatchCriteria sets the InstanceMatchCriteria field's value. -func (s *CreateCapacityReservationInput) SetInstanceMatchCriteria(v string) *CreateCapacityReservationInput { - s.InstanceMatchCriteria = &v - return s -} - -// SetInstancePlatform sets the InstancePlatform field's value. -func (s *CreateCapacityReservationInput) SetInstancePlatform(v string) *CreateCapacityReservationInput { - s.InstancePlatform = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *CreateCapacityReservationInput) SetInstanceType(v string) *CreateCapacityReservationInput { - s.InstanceType = &v - return s -} - -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *CreateCapacityReservationInput) SetTagSpecifications(v []*TagSpecification) *CreateCapacityReservationInput { - s.TagSpecifications = v - return s -} - -// SetTenancy sets the Tenancy field's value. -func (s *CreateCapacityReservationInput) SetTenancy(v string) *CreateCapacityReservationInput { - s.Tenancy = &v - return s -} - -type CreateCapacityReservationOutput struct { - _ struct{} `type:"structure"` - - // Information about the Capacity Reservation. - CapacityReservation *CapacityReservation `locationName:"capacityReservation" type:"structure"` -} - -// String returns the string representation -func (s CreateCapacityReservationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCapacityReservationOutput) GoString() string { - return s.String() -} - -// SetCapacityReservation sets the CapacityReservation field's value. -func (s *CreateCapacityReservationOutput) SetCapacityReservation(v *CapacityReservation) *CreateCapacityReservationOutput { - s.CapacityReservation = v - return s -} - -type CreateClientVpnEndpointInput struct { - _ struct{} `type:"structure"` - - // Information about the authentication method to be used to authenticate clients. - // - // AuthenticationOptions is a required field - AuthenticationOptions []*ClientVpnAuthenticationRequest `locationName:"Authentication" type:"list" required:"true"` - - // The IPv4 address range, in CIDR notation, from which to assign client IP - // addresses. The address range cannot overlap with the local CIDR of the VPC - // in which the associated subnet is located, or the routes that you add manually. - // The address range cannot be changed after the Client VPN endpoint has been - // created. The CIDR block should be /22 or greater. - // - // ClientCidrBlock is a required field - ClientCidrBlock *string `type:"string" required:"true"` - - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). - ClientToken *string `type:"string" idempotencyToken:"true"` - - // Information about the client connection logging options. - // - // If you enable client connection logging, data about client connections is - // sent to a Cloudwatch Logs log stream. The following information is logged: - // - // * Client connection requests - // - // * Client connection results (successful and unsuccessful) - // - // * Reasons for unsuccessful client connection requests - // - // * Client connection termination time - // - // ConnectionLogOptions is a required field - ConnectionLogOptions *ConnectionLogOptions `type:"structure" required:"true"` - - // A brief description of the Client VPN endpoint. - Description *string `type:"string"` - - // Information about the DNS servers to be used for DNS resolution. A Client - // VPN endpoint can have up to two DNS servers. If no DNS server is specified, - // the DNS address of the VPC that is to be associated with Client VPN endpoint - // is used as the DNS server. - DnsServers []*string `locationNameList:"item" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ARN of the server certificate. For more information, see the AWS Certificate - // Manager User Guide (acm/latest/userguide/acm-overview.html) . - // - // ServerCertificateArn is a required field - ServerCertificateArn *string `type:"string" required:"true"` - - // The transport protocol to be used by the VPN session. - // - // Default value: udp - TransportProtocol *string `type:"string" enum:"TransportProtocol"` -} - -// String returns the string representation -func (s CreateClientVpnEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClientVpnEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateClientVpnEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateClientVpnEndpointInput"} - if s.AuthenticationOptions == nil { - invalidParams.Add(request.NewErrParamRequired("AuthenticationOptions")) - } - if s.ClientCidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("ClientCidrBlock")) - } - if s.ConnectionLogOptions == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionLogOptions")) - } - if s.ServerCertificateArn == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticationOptions sets the AuthenticationOptions field's value. -func (s *CreateClientVpnEndpointInput) SetAuthenticationOptions(v []*ClientVpnAuthenticationRequest) *CreateClientVpnEndpointInput { - s.AuthenticationOptions = v - return s -} - -// SetClientCidrBlock sets the ClientCidrBlock field's value. -func (s *CreateClientVpnEndpointInput) SetClientCidrBlock(v string) *CreateClientVpnEndpointInput { - s.ClientCidrBlock = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateClientVpnEndpointInput) SetClientToken(v string) *CreateClientVpnEndpointInput { - s.ClientToken = &v - return s -} - -// SetConnectionLogOptions sets the ConnectionLogOptions field's value. -func (s *CreateClientVpnEndpointInput) SetConnectionLogOptions(v *ConnectionLogOptions) *CreateClientVpnEndpointInput { - s.ConnectionLogOptions = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateClientVpnEndpointInput) SetDescription(v string) *CreateClientVpnEndpointInput { - s.Description = &v - return s -} - -// SetDnsServers sets the DnsServers field's value. -func (s *CreateClientVpnEndpointInput) SetDnsServers(v []*string) *CreateClientVpnEndpointInput { - s.DnsServers = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateClientVpnEndpointInput) SetDryRun(v bool) *CreateClientVpnEndpointInput { - s.DryRun = &v - return s -} - -// SetServerCertificateArn sets the ServerCertificateArn field's value. -func (s *CreateClientVpnEndpointInput) SetServerCertificateArn(v string) *CreateClientVpnEndpointInput { - s.ServerCertificateArn = &v - return s -} - -// SetTransportProtocol sets the TransportProtocol field's value. -func (s *CreateClientVpnEndpointInput) SetTransportProtocol(v string) *CreateClientVpnEndpointInput { - s.TransportProtocol = &v - return s -} - -type CreateClientVpnEndpointOutput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint. - ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` - - // The DNS name to be used by clients when establishing their VPN session. - DnsName *string `locationName:"dnsName" type:"string"` - - // The current state of the Client VPN endpoint. - Status *ClientVpnEndpointStatus `locationName:"status" type:"structure"` -} - -// String returns the string representation -func (s CreateClientVpnEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClientVpnEndpointOutput) GoString() string { - return s.String() -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *CreateClientVpnEndpointOutput) SetClientVpnEndpointId(v string) *CreateClientVpnEndpointOutput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDnsName sets the DnsName field's value. -func (s *CreateClientVpnEndpointOutput) SetDnsName(v string) *CreateClientVpnEndpointOutput { - s.DnsName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CreateClientVpnEndpointOutput) SetStatus(v *ClientVpnEndpointStatus) *CreateClientVpnEndpointOutput { - s.Status = v - return s -} - -type CreateClientVpnRouteInput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint to which to add the route. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // A brief description of the route. - Description *string `type:"string"` - - // The IPv4 address range, in CIDR notation, of the route destination. For example: - // - // * To add a route for Internet access, enter 0.0.0.0/0 - // - // * To add a route for a peered VPC, enter the peered VPC's IPv4 CIDR range - // - // * To add a route for an on-premises network, enter the AWS Site-to-Site - // VPN connection's IPv4 CIDR range - // - // Route address ranges cannot overlap with the CIDR range specified for client - // allocation. - // - // DestinationCidrBlock is a required field - DestinationCidrBlock *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the subnet through which you want to route traffic. The specified - // subnet must be an existing target network of the Client VPN endpoint. - // - // TargetVpcSubnetId is a required field - TargetVpcSubnetId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateClientVpnRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClientVpnRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateClientVpnRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateClientVpnRouteInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - if s.DestinationCidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) - } - if s.TargetVpcSubnetId == nil { - invalidParams.Add(request.NewErrParamRequired("TargetVpcSubnetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *CreateClientVpnRouteInput) SetClientVpnEndpointId(v string) *CreateClientVpnRouteInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateClientVpnRouteInput) SetDescription(v string) *CreateClientVpnRouteInput { - s.Description = &v - return s -} - -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *CreateClientVpnRouteInput) SetDestinationCidrBlock(v string) *CreateClientVpnRouteInput { - s.DestinationCidrBlock = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateClientVpnRouteInput) SetDryRun(v bool) *CreateClientVpnRouteInput { - s.DryRun = &v - return s -} - -// SetTargetVpcSubnetId sets the TargetVpcSubnetId field's value. -func (s *CreateClientVpnRouteInput) SetTargetVpcSubnetId(v string) *CreateClientVpnRouteInput { - s.TargetVpcSubnetId = &v - return s -} - -type CreateClientVpnRouteOutput struct { - _ struct{} `type:"structure"` - - // The current state of the route. - Status *ClientVpnRouteStatus `locationName:"status" type:"structure"` -} - -// String returns the string representation -func (s CreateClientVpnRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClientVpnRouteOutput) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *CreateClientVpnRouteOutput) SetStatus(v *ClientVpnRouteStatus) *CreateClientVpnRouteOutput { - s.Status = v - return s -} - -// Contains the parameters for CreateCustomerGateway. -type CreateCustomerGatewayInput struct { - _ struct{} `type:"structure"` - - // For devices that support BGP, the customer gateway's BGP ASN. - // - // Default: 65000 - // - // BgpAsn is a required field - BgpAsn *int64 `type:"integer" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The Internet-routable IP address for the customer gateway's outside interface. - // The address must be static. - // - // PublicIp is a required field - PublicIp *string `locationName:"IpAddress" type:"string" required:"true"` - - // The type of VPN connection that this customer gateway supports (ipsec.1). - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"GatewayType"` -} - -// String returns the string representation -func (s CreateCustomerGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCustomerGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCustomerGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCustomerGatewayInput"} - if s.BgpAsn == nil { - invalidParams.Add(request.NewErrParamRequired("BgpAsn")) - } - if s.PublicIp == nil { - invalidParams.Add(request.NewErrParamRequired("PublicIp")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBgpAsn sets the BgpAsn field's value. -func (s *CreateCustomerGatewayInput) SetBgpAsn(v int64) *CreateCustomerGatewayInput { - s.BgpAsn = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateCustomerGatewayInput) SetDryRun(v bool) *CreateCustomerGatewayInput { - s.DryRun = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *CreateCustomerGatewayInput) SetPublicIp(v string) *CreateCustomerGatewayInput { - s.PublicIp = &v - return s -} - -// SetType sets the Type field's value. -func (s *CreateCustomerGatewayInput) SetType(v string) *CreateCustomerGatewayInput { - s.Type = &v - return s -} - -// Contains the output of CreateCustomerGateway. -type CreateCustomerGatewayOutput struct { - _ struct{} `type:"structure"` - - // Information about the customer gateway. - CustomerGateway *CustomerGateway `locationName:"customerGateway" type:"structure"` -} - -// String returns the string representation -func (s CreateCustomerGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCustomerGatewayOutput) GoString() string { - return s.String() -} - -// SetCustomerGateway sets the CustomerGateway field's value. -func (s *CreateCustomerGatewayOutput) SetCustomerGateway(v *CustomerGateway) *CreateCustomerGatewayOutput { - s.CustomerGateway = v - return s -} - -type CreateDefaultSubnetInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which to create the default subnet. - // - // AvailabilityZone is a required field - AvailabilityZone *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s CreateDefaultSubnetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDefaultSubnetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDefaultSubnetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDefaultSubnetInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateDefaultSubnetInput) SetAvailabilityZone(v string) *CreateDefaultSubnetInput { - s.AvailabilityZone = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateDefaultSubnetInput) SetDryRun(v bool) *CreateDefaultSubnetInput { - s.DryRun = &v - return s -} - -type CreateDefaultSubnetOutput struct { - _ struct{} `type:"structure"` - - // Information about the subnet. - Subnet *Subnet `locationName:"subnet" type:"structure"` -} - -// String returns the string representation -func (s CreateDefaultSubnetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDefaultSubnetOutput) GoString() string { - return s.String() -} - -// SetSubnet sets the Subnet field's value. -func (s *CreateDefaultSubnetOutput) SetSubnet(v *Subnet) *CreateDefaultSubnetOutput { - s.Subnet = v - return s -} - -type CreateDefaultVpcInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s CreateDefaultVpcInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDefaultVpcInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateDefaultVpcInput) SetDryRun(v bool) *CreateDefaultVpcInput { - s.DryRun = &v - return s -} - -type CreateDefaultVpcOutput struct { - _ struct{} `type:"structure"` - - // Information about the VPC. - Vpc *Vpc `locationName:"vpc" type:"structure"` -} - -// String returns the string representation -func (s CreateDefaultVpcOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDefaultVpcOutput) GoString() string { - return s.String() -} - -// SetVpc sets the Vpc field's value. -func (s *CreateDefaultVpcOutput) SetVpc(v *Vpc) *CreateDefaultVpcOutput { - s.Vpc = v - return s -} - -type CreateDhcpOptionsInput struct { - _ struct{} `type:"structure"` - - // A DHCP configuration option. - // - // DhcpConfigurations is a required field - DhcpConfigurations []*NewDhcpConfiguration `locationName:"dhcpConfiguration" locationNameList:"item" type:"list" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` -} - -// String returns the string representation -func (s CreateDhcpOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDhcpOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDhcpOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDhcpOptionsInput"} - if s.DhcpConfigurations == nil { - invalidParams.Add(request.NewErrParamRequired("DhcpConfigurations")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDhcpConfigurations sets the DhcpConfigurations field's value. -func (s *CreateDhcpOptionsInput) SetDhcpConfigurations(v []*NewDhcpConfiguration) *CreateDhcpOptionsInput { - s.DhcpConfigurations = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateDhcpOptionsInput) SetDryRun(v bool) *CreateDhcpOptionsInput { - s.DryRun = &v - return s -} - -type CreateDhcpOptionsOutput struct { - _ struct{} `type:"structure"` - - // A set of DHCP options. - DhcpOptions *DhcpOptions `locationName:"dhcpOptions" type:"structure"` -} - -// String returns the string representation -func (s CreateDhcpOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDhcpOptionsOutput) GoString() string { - return s.String() -} - -// SetDhcpOptions sets the DhcpOptions field's value. -func (s *CreateDhcpOptionsOutput) SetDhcpOptions(v *DhcpOptions) *CreateDhcpOptionsOutput { - s.DhcpOptions = v - return s -} - -type CreateEgressOnlyInternetGatewayInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the VPC for which to create the egress-only internet gateway. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateEgressOnlyInternetGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEgressOnlyInternetGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateEgressOnlyInternetGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateEgressOnlyInternetGatewayInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateEgressOnlyInternetGatewayInput) SetClientToken(v string) *CreateEgressOnlyInternetGatewayInput { - s.ClientToken = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateEgressOnlyInternetGatewayInput) SetDryRun(v bool) *CreateEgressOnlyInternetGatewayInput { - s.DryRun = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CreateEgressOnlyInternetGatewayInput) SetVpcId(v string) *CreateEgressOnlyInternetGatewayInput { - s.VpcId = &v - return s -} - -type CreateEgressOnlyInternetGatewayOutput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the egress-only internet gateway. - EgressOnlyInternetGateway *EgressOnlyInternetGateway `locationName:"egressOnlyInternetGateway" type:"structure"` -} - -// String returns the string representation -func (s CreateEgressOnlyInternetGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEgressOnlyInternetGatewayOutput) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateEgressOnlyInternetGatewayOutput) SetClientToken(v string) *CreateEgressOnlyInternetGatewayOutput { - s.ClientToken = &v - return s -} - -// SetEgressOnlyInternetGateway sets the EgressOnlyInternetGateway field's value. -func (s *CreateEgressOnlyInternetGatewayOutput) SetEgressOnlyInternetGateway(v *EgressOnlyInternetGateway) *CreateEgressOnlyInternetGatewayOutput { - s.EgressOnlyInternetGateway = v - return s -} - -// Describes the instances that could not be launched by the fleet. -type CreateFleetError struct { - _ struct{} `type:"structure"` - - // The error code that indicates why the instance could not be launched. For - // more information about error codes, see Error Codes (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html). - ErrorCode *string `locationName:"errorCode" type:"string"` - - // The error message that describes why the instance could not be launched. - // For more information about error messages, see ee Error Codes (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html). - ErrorMessage *string `locationName:"errorMessage" type:"string"` - - // The launch templates and overrides that were used for launching the instances. - // Any parameters that you specify in the Overrides override the same parameters - // in the launch template. - LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse `locationName:"launchTemplateAndOverrides" type:"structure"` - - // Indicates if the instance that could not be launched was a Spot Instance - // or On-Demand Instance. - Lifecycle *string `locationName:"lifecycle" type:"string" enum:"InstanceLifecycle"` -} - -// String returns the string representation -func (s CreateFleetError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFleetError) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *CreateFleetError) SetErrorCode(v string) *CreateFleetError { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *CreateFleetError) SetErrorMessage(v string) *CreateFleetError { - s.ErrorMessage = &v - return s -} - -// SetLaunchTemplateAndOverrides sets the LaunchTemplateAndOverrides field's value. -func (s *CreateFleetError) SetLaunchTemplateAndOverrides(v *LaunchTemplateAndOverridesResponse) *CreateFleetError { - s.LaunchTemplateAndOverrides = v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *CreateFleetError) SetLifecycle(v string) *CreateFleetError { - s.Lifecycle = &v - return s -} - -type CreateFleetInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // Indicates whether running instances should be terminated if the total target - // capacity of the EC2 Fleet is decreased below the current size of the EC2 - // Fleet. - ExcessCapacityTerminationPolicy *string `type:"string" enum:"FleetExcessCapacityTerminationPolicy"` - - // The configuration for the EC2 Fleet. - // - // LaunchTemplateConfigs is a required field - LaunchTemplateConfigs []*FleetLaunchTemplateConfigRequest `locationNameList:"item" type:"list" required:"true"` - - // The allocation strategy of On-Demand Instances in an EC2 Fleet. - OnDemandOptions *OnDemandOptionsRequest `type:"structure"` - - // Indicates whether EC2 Fleet should replace unhealthy instances. - ReplaceUnhealthyInstances *bool `type:"boolean"` - - // Describes the configuration of Spot Instances in an EC2 Fleet. - SpotOptions *SpotOptionsRequest `type:"structure"` - - // The key-value pair for tagging the EC2 Fleet request on creation. The value - // for ResourceType must be fleet, otherwise the fleet request fails. To tag - // instances at launch, specify the tags in the launch template (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template). - // For information about tagging after launch, see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources). - TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` - - // The TotalTargetCapacity, OnDemandTargetCapacity, SpotTargetCapacity, and - // DefaultCapacityType structure. - // - // TargetCapacitySpecification is a required field - TargetCapacitySpecification *TargetCapacitySpecificationRequest `type:"structure" required:"true"` - - // Indicates whether running instances should be terminated when the EC2 Fleet - // expires. - TerminateInstancesWithExpiration *bool `type:"boolean"` - - // The type of the request. By default, the EC2 Fleet places an asynchronous - // request for your desired capacity, and maintains it by replenishing interrupted - // Spot Instances (maintain). A value of instant places a synchronous one-time - // request, and returns errors for any instances that could not be launched. - // A value of request places an asynchronous one-time request without maintaining - // capacity or submitting requests in alternative capacity pools if capacity - // is unavailable. For more information, see EC2 Fleet Request Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-configuration-strategies.html#ec2-fleet-request-type) - // in the Amazon Elastic Compute Cloud User Guide. - Type *string `type:"string" enum:"FleetType"` - - // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // The default is to start fulfilling the request immediately. - ValidFrom *time.Time `type:"timestamp"` - - // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // At this point, no new EC2 Fleet requests are placed or able to fulfill the - // request. The default end date is 7 days from the current date. - ValidUntil *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s CreateFleetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFleetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFleetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFleetInput"} - if s.LaunchTemplateConfigs == nil { - invalidParams.Add(request.NewErrParamRequired("LaunchTemplateConfigs")) - } - if s.TargetCapacitySpecification == nil { - invalidParams.Add(request.NewErrParamRequired("TargetCapacitySpecification")) - } - if s.LaunchTemplateConfigs != nil { - for i, v := range s.LaunchTemplateConfigs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LaunchTemplateConfigs", i), err.(request.ErrInvalidParams)) - } - } - } - if s.TargetCapacitySpecification != nil { - if err := s.TargetCapacitySpecification.Validate(); err != nil { - invalidParams.AddNested("TargetCapacitySpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateFleetInput) SetClientToken(v string) *CreateFleetInput { - s.ClientToken = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateFleetInput) SetDryRun(v bool) *CreateFleetInput { - s.DryRun = &v - return s -} - -// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. -func (s *CreateFleetInput) SetExcessCapacityTerminationPolicy(v string) *CreateFleetInput { - s.ExcessCapacityTerminationPolicy = &v - return s -} - -// SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value. -func (s *CreateFleetInput) SetLaunchTemplateConfigs(v []*FleetLaunchTemplateConfigRequest) *CreateFleetInput { - s.LaunchTemplateConfigs = v - return s -} - -// SetOnDemandOptions sets the OnDemandOptions field's value. -func (s *CreateFleetInput) SetOnDemandOptions(v *OnDemandOptionsRequest) *CreateFleetInput { - s.OnDemandOptions = v - return s -} - -// SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. -func (s *CreateFleetInput) SetReplaceUnhealthyInstances(v bool) *CreateFleetInput { - s.ReplaceUnhealthyInstances = &v - return s -} - -// SetSpotOptions sets the SpotOptions field's value. -func (s *CreateFleetInput) SetSpotOptions(v *SpotOptionsRequest) *CreateFleetInput { - s.SpotOptions = v - return s -} - -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *CreateFleetInput) SetTagSpecifications(v []*TagSpecification) *CreateFleetInput { - s.TagSpecifications = v - return s -} - -// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. -func (s *CreateFleetInput) SetTargetCapacitySpecification(v *TargetCapacitySpecificationRequest) *CreateFleetInput { - s.TargetCapacitySpecification = v - return s -} - -// SetTerminateInstancesWithExpiration sets the TerminateInstancesWithExpiration field's value. -func (s *CreateFleetInput) SetTerminateInstancesWithExpiration(v bool) *CreateFleetInput { - s.TerminateInstancesWithExpiration = &v - return s -} - -// SetType sets the Type field's value. -func (s *CreateFleetInput) SetType(v string) *CreateFleetInput { - s.Type = &v - return s -} - -// SetValidFrom sets the ValidFrom field's value. -func (s *CreateFleetInput) SetValidFrom(v time.Time) *CreateFleetInput { - s.ValidFrom = &v - return s -} - -// SetValidUntil sets the ValidUntil field's value. -func (s *CreateFleetInput) SetValidUntil(v time.Time) *CreateFleetInput { - s.ValidUntil = &v - return s -} - -// Describes the instances that were launched by the fleet. -type CreateFleetInstance struct { - _ struct{} `type:"structure"` - - // The IDs of the instances. - InstanceIds []*string `locationName:"instanceIds" locationNameList:"item" type:"list"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // The launch templates and overrides that were used for launching the instances. - // Any parameters that you specify in the Overrides override the same parameters - // in the launch template. - LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse `locationName:"launchTemplateAndOverrides" type:"structure"` - - // Indicates if the instance that was launched is a Spot Instance or On-Demand - // Instance. - Lifecycle *string `locationName:"lifecycle" type:"string" enum:"InstanceLifecycle"` - - // The value is Windows for Windows instances; otherwise blank. - Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` -} - -// String returns the string representation -func (s CreateFleetInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFleetInstance) GoString() string { - return s.String() -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *CreateFleetInstance) SetInstanceIds(v []*string) *CreateFleetInstance { - s.InstanceIds = v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *CreateFleetInstance) SetInstanceType(v string) *CreateFleetInstance { - s.InstanceType = &v - return s -} - -// SetLaunchTemplateAndOverrides sets the LaunchTemplateAndOverrides field's value. -func (s *CreateFleetInstance) SetLaunchTemplateAndOverrides(v *LaunchTemplateAndOverridesResponse) *CreateFleetInstance { - s.LaunchTemplateAndOverrides = v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *CreateFleetInstance) SetLifecycle(v string) *CreateFleetInstance { - s.Lifecycle = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *CreateFleetInstance) SetPlatform(v string) *CreateFleetInstance { - s.Platform = &v - return s -} - -type CreateFleetOutput struct { - _ struct{} `type:"structure"` - - // Information about the instances that could not be launched by the fleet. - // Valid only when Type is set to instant. - Errors []*CreateFleetError `locationName:"errorSet" locationNameList:"item" type:"list"` - - // The ID of the EC2 Fleet. - FleetId *string `locationName:"fleetId" type:"string"` - - // Information about the instances that were launched by the fleet. Valid only - // when Type is set to instant. - Instances []*CreateFleetInstance `locationName:"fleetInstanceSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s CreateFleetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFleetOutput) GoString() string { - return s.String() -} - -// SetErrors sets the Errors field's value. -func (s *CreateFleetOutput) SetErrors(v []*CreateFleetError) *CreateFleetOutput { - s.Errors = v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *CreateFleetOutput) SetFleetId(v string) *CreateFleetOutput { - s.FleetId = &v - return s -} - -// SetInstances sets the Instances field's value. -func (s *CreateFleetOutput) SetInstances(v []*CreateFleetInstance) *CreateFleetOutput { - s.Instances = v - return s -} - -type CreateFlowLogsInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` - - // The ARN for the IAM role that's used to post flow logs to a log group. - DeliverLogsPermissionArn *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // Specifies the destination to which the flow log data is to be published. - // Flow log data can be published to an CloudWatch Logs log group or an Amazon - // S3 bucket. The value specified for this parameter depends on the value specified - // for LogDestinationType. - // - // If LogDestinationType is not specified or cloud-watch-logs, specify the Amazon - // Resource Name (ARN) of the CloudWatch Logs log group. - // - // If LogDestinationType is s3, specify the ARN of the Amazon S3 bucket. You - // can also specify a subfolder in the bucket. To specify a subfolder in the - // bucket, use the following ARN format: bucket_ARN/subfolder_name/. For example, - // to specify a subfolder named my-logs in a bucket named my-bucket, use the - // following ARN: arn:aws:s3:::my-bucket/my-logs/. You cannot use AWSLogs as - // a subfolder name. This is a reserved term. - LogDestination *string `type:"string"` - - // Specifies the type of destination to which the flow log data is to be published. - // Flow log data can be published to CloudWatch Logs or Amazon S3. To publish - // flow log data to CloudWatch Logs, specify cloud-watch-logs. To publish flow - // log data to Amazon S3, specify s3. - // - // Default: cloud-watch-logs - LogDestinationType *string `type:"string" enum:"LogDestinationType"` - - // The name of the log group. - LogGroupName *string `type:"string"` - - // One or more subnet, network interface, or VPC IDs. - // - // Constraints: Maximum of 1000 resources - // - // ResourceIds is a required field - ResourceIds []*string `locationName:"ResourceId" locationNameList:"item" type:"list" required:"true"` - - // The type of resource on which to create the flow log. - // - // ResourceType is a required field - ResourceType *string `type:"string" required:"true" enum:"FlowLogsResourceType"` - - // The type of traffic to log. - // - // TrafficType is a required field - TrafficType *string `type:"string" required:"true" enum:"TrafficType"` -} - -// String returns the string representation -func (s CreateFlowLogsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFlowLogsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFlowLogsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFlowLogsInput"} - if s.ResourceIds == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceIds")) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - if s.TrafficType == nil { - invalidParams.Add(request.NewErrParamRequired("TrafficType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateFlowLogsInput) SetClientToken(v string) *CreateFlowLogsInput { - s.ClientToken = &v - return s -} - -// SetDeliverLogsPermissionArn sets the DeliverLogsPermissionArn field's value. -func (s *CreateFlowLogsInput) SetDeliverLogsPermissionArn(v string) *CreateFlowLogsInput { - s.DeliverLogsPermissionArn = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateFlowLogsInput) SetDryRun(v bool) *CreateFlowLogsInput { - s.DryRun = &v - return s -} - -// SetLogDestination sets the LogDestination field's value. -func (s *CreateFlowLogsInput) SetLogDestination(v string) *CreateFlowLogsInput { - s.LogDestination = &v - return s -} - -// SetLogDestinationType sets the LogDestinationType field's value. -func (s *CreateFlowLogsInput) SetLogDestinationType(v string) *CreateFlowLogsInput { - s.LogDestinationType = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *CreateFlowLogsInput) SetLogGroupName(v string) *CreateFlowLogsInput { - s.LogGroupName = &v - return s -} - -// SetResourceIds sets the ResourceIds field's value. -func (s *CreateFlowLogsInput) SetResourceIds(v []*string) *CreateFlowLogsInput { - s.ResourceIds = v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *CreateFlowLogsInput) SetResourceType(v string) *CreateFlowLogsInput { - s.ResourceType = &v - return s -} - -// SetTrafficType sets the TrafficType field's value. -func (s *CreateFlowLogsInput) SetTrafficType(v string) *CreateFlowLogsInput { - s.TrafficType = &v - return s -} - -type CreateFlowLogsOutput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // The IDs of the flow logs. - FlowLogIds []*string `locationName:"flowLogIdSet" locationNameList:"item" type:"list"` - - // Information about the flow logs that could not be created successfully. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s CreateFlowLogsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFlowLogsOutput) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateFlowLogsOutput) SetClientToken(v string) *CreateFlowLogsOutput { - s.ClientToken = &v - return s -} - -// SetFlowLogIds sets the FlowLogIds field's value. -func (s *CreateFlowLogsOutput) SetFlowLogIds(v []*string) *CreateFlowLogsOutput { - s.FlowLogIds = v - return s -} - -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *CreateFlowLogsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *CreateFlowLogsOutput { - s.Unsuccessful = v - return s -} - -type CreateFpgaImageInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` - - // A description for the AFI. - Description *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The location of the encrypted design checkpoint in Amazon S3. The input must - // be a tarball. - // - // InputStorageLocation is a required field - InputStorageLocation *StorageLocation `type:"structure" required:"true"` - - // The location in Amazon S3 for the output logs. - LogsStorageLocation *StorageLocation `type:"structure"` - - // A name for the AFI. - Name *string `type:"string"` -} - -// String returns the string representation -func (s CreateFpgaImageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFpgaImageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFpgaImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFpgaImageInput"} - if s.InputStorageLocation == nil { - invalidParams.Add(request.NewErrParamRequired("InputStorageLocation")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateFpgaImageInput) SetClientToken(v string) *CreateFpgaImageInput { - s.ClientToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateFpgaImageInput) SetDescription(v string) *CreateFpgaImageInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateFpgaImageInput) SetDryRun(v bool) *CreateFpgaImageInput { - s.DryRun = &v - return s -} - -// SetInputStorageLocation sets the InputStorageLocation field's value. -func (s *CreateFpgaImageInput) SetInputStorageLocation(v *StorageLocation) *CreateFpgaImageInput { - s.InputStorageLocation = v - return s -} - -// SetLogsStorageLocation sets the LogsStorageLocation field's value. -func (s *CreateFpgaImageInput) SetLogsStorageLocation(v *StorageLocation) *CreateFpgaImageInput { - s.LogsStorageLocation = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateFpgaImageInput) SetName(v string) *CreateFpgaImageInput { - s.Name = &v - return s -} - -type CreateFpgaImageOutput struct { - _ struct{} `type:"structure"` - - // The global FPGA image identifier (AGFI ID). - FpgaImageGlobalId *string `locationName:"fpgaImageGlobalId" type:"string"` - - // The FPGA image identifier (AFI ID). - FpgaImageId *string `locationName:"fpgaImageId" type:"string"` -} - -// String returns the string representation -func (s CreateFpgaImageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFpgaImageOutput) GoString() string { - return s.String() -} - -// SetFpgaImageGlobalId sets the FpgaImageGlobalId field's value. -func (s *CreateFpgaImageOutput) SetFpgaImageGlobalId(v string) *CreateFpgaImageOutput { - s.FpgaImageGlobalId = &v - return s -} - -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *CreateFpgaImageOutput) SetFpgaImageId(v string) *CreateFpgaImageOutput { - s.FpgaImageId = &v - return s -} - -// Contains the parameters for CreateImage. -type CreateImageInput struct { - _ struct{} `type:"structure"` - - // Information about one or more block device mappings. This parameter cannot - // be used to modify the encryption status of existing volumes or snapshots. - // To create an AMI with encrypted snapshots, use the CopyImage action. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` - - // A description for the new image. - Description *string `locationName:"description" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` - - // A name for the new image. - // - // Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets - // ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), - // at-signs (@), or underscores(_) - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // By default, Amazon EC2 attempts to shut down and reboot the instance before - // creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't - // shut down the instance before creating the image. When this option is used, - // file system integrity on the created image can't be guaranteed. - NoReboot *bool `locationName:"noReboot" type:"boolean"` -} - -// String returns the string representation -func (s CreateImageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateImageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateImageInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *CreateImageInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *CreateImageInput { - s.BlockDeviceMappings = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateImageInput) SetDescription(v string) *CreateImageInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateImageInput) SetDryRun(v bool) *CreateImageInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *CreateImageInput) SetInstanceId(v string) *CreateImageInput { - s.InstanceId = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateImageInput) SetName(v string) *CreateImageInput { - s.Name = &v - return s -} - -// SetNoReboot sets the NoReboot field's value. -func (s *CreateImageInput) SetNoReboot(v bool) *CreateImageInput { - s.NoReboot = &v - return s -} - -// Contains the output of CreateImage. -type CreateImageOutput struct { - _ struct{} `type:"structure"` - - // The ID of the new AMI. - ImageId *string `locationName:"imageId" type:"string"` -} - -// String returns the string representation -func (s CreateImageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateImageOutput) GoString() string { - return s.String() -} - -// SetImageId sets the ImageId field's value. -func (s *CreateImageOutput) SetImageId(v string) *CreateImageOutput { - s.ImageId = &v - return s -} - -// Contains the parameters for CreateInstanceExportTask. -type CreateInstanceExportTaskInput struct { - _ struct{} `type:"structure"` - - // A description for the conversion task or the resource being exported. The - // maximum length is 255 bytes. - Description *string `locationName:"description" type:"string"` - - // The format and location for an instance export task. - ExportToS3Task *ExportToS3TaskSpecification `locationName:"exportToS3" type:"structure"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` - - // The target virtualization environment. - TargetEnvironment *string `locationName:"targetEnvironment" type:"string" enum:"ExportEnvironment"` -} - -// String returns the string representation -func (s CreateInstanceExportTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInstanceExportTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstanceExportTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstanceExportTaskInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateInstanceExportTaskInput) SetDescription(v string) *CreateInstanceExportTaskInput { - s.Description = &v - return s -} - -// SetExportToS3Task sets the ExportToS3Task field's value. -func (s *CreateInstanceExportTaskInput) SetExportToS3Task(v *ExportToS3TaskSpecification) *CreateInstanceExportTaskInput { - s.ExportToS3Task = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *CreateInstanceExportTaskInput) SetInstanceId(v string) *CreateInstanceExportTaskInput { - s.InstanceId = &v - return s -} - -// SetTargetEnvironment sets the TargetEnvironment field's value. -func (s *CreateInstanceExportTaskInput) SetTargetEnvironment(v string) *CreateInstanceExportTaskInput { - s.TargetEnvironment = &v - return s -} - -// Contains the output for CreateInstanceExportTask. -type CreateInstanceExportTaskOutput struct { - _ struct{} `type:"structure"` - - // Information about the instance export task. - ExportTask *ExportTask `locationName:"exportTask" type:"structure"` -} - -// String returns the string representation -func (s CreateInstanceExportTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInstanceExportTaskOutput) GoString() string { - return s.String() -} - -// SetExportTask sets the ExportTask field's value. -func (s *CreateInstanceExportTaskOutput) SetExportTask(v *ExportTask) *CreateInstanceExportTaskOutput { - s.ExportTask = v - return s -} - -type CreateInternetGatewayInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` -} - -// String returns the string representation -func (s CreateInternetGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInternetGatewayInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateInternetGatewayInput) SetDryRun(v bool) *CreateInternetGatewayInput { - s.DryRun = &v - return s -} - -type CreateInternetGatewayOutput struct { - _ struct{} `type:"structure"` - - // Information about the internet gateway. - InternetGateway *InternetGateway `locationName:"internetGateway" type:"structure"` -} - -// String returns the string representation -func (s CreateInternetGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInternetGatewayOutput) GoString() string { - return s.String() -} - -// SetInternetGateway sets the InternetGateway field's value. -func (s *CreateInternetGatewayOutput) SetInternetGateway(v *InternetGateway) *CreateInternetGatewayOutput { - s.InternetGateway = v - return s -} - -type CreateKeyPairInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // A unique name for the key pair. - // - // Constraints: Up to 255 ASCII characters - // - // KeyName is a required field - KeyName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateKeyPairInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateKeyPairInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateKeyPairInput"} - if s.KeyName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateKeyPairInput) SetDryRun(v bool) *CreateKeyPairInput { - s.DryRun = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *CreateKeyPairInput) SetKeyName(v string) *CreateKeyPairInput { - s.KeyName = &v - return s -} - -// Describes a key pair. -type CreateKeyPairOutput struct { - _ struct{} `type:"structure"` - - // The SHA-1 digest of the DER encoded private key. - KeyFingerprint *string `locationName:"keyFingerprint" type:"string"` - - // An unencrypted PEM encoded RSA private key. - KeyMaterial *string `locationName:"keyMaterial" type:"string"` - - // The name of the key pair. - KeyName *string `locationName:"keyName" type:"string"` -} - -// String returns the string representation -func (s CreateKeyPairOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateKeyPairOutput) GoString() string { - return s.String() -} - -// SetKeyFingerprint sets the KeyFingerprint field's value. -func (s *CreateKeyPairOutput) SetKeyFingerprint(v string) *CreateKeyPairOutput { - s.KeyFingerprint = &v - return s -} - -// SetKeyMaterial sets the KeyMaterial field's value. -func (s *CreateKeyPairOutput) SetKeyMaterial(v string) *CreateKeyPairOutput { - s.KeyMaterial = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *CreateKeyPairOutput) SetKeyName(v string) *CreateKeyPairOutput { - s.KeyName = &v - return s -} - -type CreateLaunchTemplateInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The information for the launch template. - // - // LaunchTemplateData is a required field - LaunchTemplateData *RequestLaunchTemplateData `type:"structure" required:"true"` - - // A name for the launch template. - // - // LaunchTemplateName is a required field - LaunchTemplateName *string `min:"3" type:"string" required:"true"` - - // A description for the first version of the launch template. - VersionDescription *string `type:"string"` -} - -// String returns the string representation -func (s CreateLaunchTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLaunchTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLaunchTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLaunchTemplateInput"} - if s.LaunchTemplateData == nil { - invalidParams.Add(request.NewErrParamRequired("LaunchTemplateData")) - } - if s.LaunchTemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("LaunchTemplateName")) - } - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - if s.LaunchTemplateData != nil { - if err := s.LaunchTemplateData.Validate(); err != nil { - invalidParams.AddNested("LaunchTemplateData", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateLaunchTemplateInput) SetClientToken(v string) *CreateLaunchTemplateInput { - s.ClientToken = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateLaunchTemplateInput) SetDryRun(v bool) *CreateLaunchTemplateInput { - s.DryRun = &v - return s -} - -// SetLaunchTemplateData sets the LaunchTemplateData field's value. -func (s *CreateLaunchTemplateInput) SetLaunchTemplateData(v *RequestLaunchTemplateData) *CreateLaunchTemplateInput { - s.LaunchTemplateData = v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *CreateLaunchTemplateInput) SetLaunchTemplateName(v string) *CreateLaunchTemplateInput { - s.LaunchTemplateName = &v - return s -} - -// SetVersionDescription sets the VersionDescription field's value. -func (s *CreateLaunchTemplateInput) SetVersionDescription(v string) *CreateLaunchTemplateInput { - s.VersionDescription = &v - return s -} - -type CreateLaunchTemplateOutput struct { - _ struct{} `type:"structure"` - - // Information about the launch template. - LaunchTemplate *LaunchTemplate `locationName:"launchTemplate" type:"structure"` -} - -// String returns the string representation -func (s CreateLaunchTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLaunchTemplateOutput) GoString() string { - return s.String() -} - -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *CreateLaunchTemplateOutput) SetLaunchTemplate(v *LaunchTemplate) *CreateLaunchTemplateOutput { - s.LaunchTemplate = v - return s -} - -type CreateLaunchTemplateVersionInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The information for the launch template. - // - // LaunchTemplateData is a required field - LaunchTemplateData *RequestLaunchTemplateData `type:"structure" required:"true"` - - // The ID of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateId *string `type:"string"` - - // The name of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateName *string `min:"3" type:"string"` - - // The version number of the launch template version on which to base the new - // version. The new version inherits the same launch parameters as the source - // version, except for parameters that you specify in LaunchTemplateData. - SourceVersion *string `type:"string"` - - // A description for the version of the launch template. - VersionDescription *string `type:"string"` -} - -// String returns the string representation -func (s CreateLaunchTemplateVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLaunchTemplateVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLaunchTemplateVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLaunchTemplateVersionInput"} - if s.LaunchTemplateData == nil { - invalidParams.Add(request.NewErrParamRequired("LaunchTemplateData")) - } - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - if s.LaunchTemplateData != nil { - if err := s.LaunchTemplateData.Validate(); err != nil { - invalidParams.AddNested("LaunchTemplateData", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateLaunchTemplateVersionInput) SetClientToken(v string) *CreateLaunchTemplateVersionInput { - s.ClientToken = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateLaunchTemplateVersionInput) SetDryRun(v bool) *CreateLaunchTemplateVersionInput { - s.DryRun = &v - return s -} - -// SetLaunchTemplateData sets the LaunchTemplateData field's value. -func (s *CreateLaunchTemplateVersionInput) SetLaunchTemplateData(v *RequestLaunchTemplateData) *CreateLaunchTemplateVersionInput { - s.LaunchTemplateData = v - return s -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *CreateLaunchTemplateVersionInput) SetLaunchTemplateId(v string) *CreateLaunchTemplateVersionInput { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *CreateLaunchTemplateVersionInput) SetLaunchTemplateName(v string) *CreateLaunchTemplateVersionInput { - s.LaunchTemplateName = &v - return s -} - -// SetSourceVersion sets the SourceVersion field's value. -func (s *CreateLaunchTemplateVersionInput) SetSourceVersion(v string) *CreateLaunchTemplateVersionInput { - s.SourceVersion = &v - return s -} - -// SetVersionDescription sets the VersionDescription field's value. -func (s *CreateLaunchTemplateVersionInput) SetVersionDescription(v string) *CreateLaunchTemplateVersionInput { - s.VersionDescription = &v - return s -} - -type CreateLaunchTemplateVersionOutput struct { - _ struct{} `type:"structure"` - - // Information about the launch template version. - LaunchTemplateVersion *LaunchTemplateVersion `locationName:"launchTemplateVersion" type:"structure"` -} - -// String returns the string representation -func (s CreateLaunchTemplateVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLaunchTemplateVersionOutput) GoString() string { - return s.String() -} - -// SetLaunchTemplateVersion sets the LaunchTemplateVersion field's value. -func (s *CreateLaunchTemplateVersionOutput) SetLaunchTemplateVersion(v *LaunchTemplateVersion) *CreateLaunchTemplateVersionOutput { - s.LaunchTemplateVersion = v - return s -} - -type CreateNatGatewayInput struct { - _ struct{} `type:"structure"` - - // The allocation ID of an Elastic IP address to associate with the NAT gateway. - // If the Elastic IP address is associated with another resource, you must first - // disassociate it. - // - // AllocationId is a required field - AllocationId *string `type:"string" required:"true"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - // - // Constraint: Maximum 64 ASCII characters. - ClientToken *string `type:"string"` - - // The subnet in which to create the NAT gateway. - // - // SubnetId is a required field - SubnetId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateNatGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNatGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNatGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNatGatewayInput"} - if s.AllocationId == nil { - invalidParams.Add(request.NewErrParamRequired("AllocationId")) - } - if s.SubnetId == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllocationId sets the AllocationId field's value. -func (s *CreateNatGatewayInput) SetAllocationId(v string) *CreateNatGatewayInput { - s.AllocationId = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateNatGatewayInput) SetClientToken(v string) *CreateNatGatewayInput { - s.ClientToken = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *CreateNatGatewayInput) SetSubnetId(v string) *CreateNatGatewayInput { - s.SubnetId = &v - return s -} - -type CreateNatGatewayOutput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier to ensure the idempotency of the request. - // Only returned if a client token was provided in the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the NAT gateway. - NatGateway *NatGateway `locationName:"natGateway" type:"structure"` -} - -// String returns the string representation -func (s CreateNatGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNatGatewayOutput) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateNatGatewayOutput) SetClientToken(v string) *CreateNatGatewayOutput { - s.ClientToken = &v - return s -} - -// SetNatGateway sets the NatGateway field's value. -func (s *CreateNatGatewayOutput) SetNatGateway(v *NatGateway) *CreateNatGatewayOutput { - s.NatGateway = v - return s -} - -type CreateNetworkAclEntryInput struct { - _ struct{} `type:"structure"` - - // The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24). - CidrBlock *string `locationName:"cidrBlock" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Indicates whether this is an egress rule (rule is applied to traffic leaving - // the subnet). - // - // Egress is a required field - Egress *bool `locationName:"egress" type:"boolean" required:"true"` - - // ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol - // 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block. - IcmpTypeCode *IcmpTypeCode `locationName:"Icmp" type:"structure"` - - // The IPv6 network range to allow or deny, in CIDR notation (for example 2001:db8:1234:1a00::/64). - Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` - - // The ID of the network ACL. - // - // NetworkAclId is a required field - NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` - - // TCP or UDP protocols: The range of ports the rule applies to. Required if - // specifying protocol 6 (TCP) or 17 (UDP). - PortRange *PortRange `locationName:"portRange" type:"structure"` - - // The protocol number. A value of "-1" means all protocols. If you specify - // "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), - // traffic on all ports is allowed, regardless of any ports or ICMP types or - // codes that you specify. If you specify protocol "58" (ICMPv6) and specify - // an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless - // of any that you specify. If you specify protocol "58" (ICMPv6) and specify - // an IPv6 CIDR block, you must specify an ICMP type and code. - // - // Protocol is a required field - Protocol *string `locationName:"protocol" type:"string" required:"true"` - - // Indicates whether to allow or deny the traffic that matches the rule. - // - // RuleAction is a required field - RuleAction *string `locationName:"ruleAction" type:"string" required:"true" enum:"RuleAction"` - - // The rule number for the entry (for example, 100). ACL entries are processed - // in ascending order by rule number. - // - // Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is - // reserved for internal use. - // - // RuleNumber is a required field - RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"` -} - -// String returns the string representation -func (s CreateNetworkAclEntryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNetworkAclEntryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNetworkAclEntryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNetworkAclEntryInput"} - if s.Egress == nil { - invalidParams.Add(request.NewErrParamRequired("Egress")) - } - if s.NetworkAclId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) - } - if s.Protocol == nil { - invalidParams.Add(request.NewErrParamRequired("Protocol")) - } - if s.RuleAction == nil { - invalidParams.Add(request.NewErrParamRequired("RuleAction")) - } - if s.RuleNumber == nil { - invalidParams.Add(request.NewErrParamRequired("RuleNumber")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCidrBlock sets the CidrBlock field's value. -func (s *CreateNetworkAclEntryInput) SetCidrBlock(v string) *CreateNetworkAclEntryInput { - s.CidrBlock = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateNetworkAclEntryInput) SetDryRun(v bool) *CreateNetworkAclEntryInput { - s.DryRun = &v - return s -} - -// SetEgress sets the Egress field's value. -func (s *CreateNetworkAclEntryInput) SetEgress(v bool) *CreateNetworkAclEntryInput { - s.Egress = &v - return s -} - -// SetIcmpTypeCode sets the IcmpTypeCode field's value. -func (s *CreateNetworkAclEntryInput) SetIcmpTypeCode(v *IcmpTypeCode) *CreateNetworkAclEntryInput { - s.IcmpTypeCode = v - return s -} - -// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. -func (s *CreateNetworkAclEntryInput) SetIpv6CidrBlock(v string) *CreateNetworkAclEntryInput { - s.Ipv6CidrBlock = &v - return s -} - -// SetNetworkAclId sets the NetworkAclId field's value. -func (s *CreateNetworkAclEntryInput) SetNetworkAclId(v string) *CreateNetworkAclEntryInput { - s.NetworkAclId = &v - return s -} - -// SetPortRange sets the PortRange field's value. -func (s *CreateNetworkAclEntryInput) SetPortRange(v *PortRange) *CreateNetworkAclEntryInput { - s.PortRange = v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *CreateNetworkAclEntryInput) SetProtocol(v string) *CreateNetworkAclEntryInput { - s.Protocol = &v - return s -} - -// SetRuleAction sets the RuleAction field's value. -func (s *CreateNetworkAclEntryInput) SetRuleAction(v string) *CreateNetworkAclEntryInput { - s.RuleAction = &v - return s -} - -// SetRuleNumber sets the RuleNumber field's value. -func (s *CreateNetworkAclEntryInput) SetRuleNumber(v int64) *CreateNetworkAclEntryInput { - s.RuleNumber = &v - return s -} - -type CreateNetworkAclEntryOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateNetworkAclEntryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNetworkAclEntryOutput) GoString() string { - return s.String() -} - -type CreateNetworkAclInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateNetworkAclInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNetworkAclInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNetworkAclInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNetworkAclInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateNetworkAclInput) SetDryRun(v bool) *CreateNetworkAclInput { - s.DryRun = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CreateNetworkAclInput) SetVpcId(v string) *CreateNetworkAclInput { - s.VpcId = &v - return s -} - -type CreateNetworkAclOutput struct { - _ struct{} `type:"structure"` - - // Information about the network ACL. - NetworkAcl *NetworkAcl `locationName:"networkAcl" type:"structure"` -} - -// String returns the string representation -func (s CreateNetworkAclOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNetworkAclOutput) GoString() string { - return s.String() -} - -// SetNetworkAcl sets the NetworkAcl field's value. -func (s *CreateNetworkAclOutput) SetNetworkAcl(v *NetworkAcl) *CreateNetworkAclOutput { - s.NetworkAcl = v - return s -} - -// Contains the parameters for CreateNetworkInterface. -type CreateNetworkInterfaceInput struct { - _ struct{} `type:"structure"` - - // A description for the network interface. - Description *string `locationName:"description" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The IDs of one or more security groups. - Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` - - // The number of IPv6 addresses to assign to a network interface. Amazon EC2 - // automatically selects the IPv6 addresses from the subnet range. You can't - // use this option if specifying specific IPv6 addresses. If your subnet has - // the AssignIpv6AddressOnCreation attribute set to true, you can specify 0 - // to override this setting. - Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` - - // One or more specific IPv6 addresses from the IPv6 CIDR block range of your - // subnet. You can't use this option if you're specifying a number of IPv6 addresses. - Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6Addresses" locationNameList:"item" type:"list"` - - // The primary private IPv4 address of the network interface. If you don't specify - // an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR - // range. If you specify an IP address, you cannot indicate any IP addresses - // specified in privateIpAddresses as primary (only one IP address can be designated - // as primary). - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // One or more private IPv4 addresses. - PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddresses" locationNameList:"item" type:"list"` - - // The number of secondary private IPv4 addresses to assign to a network interface. - // When you specify a number of secondary IPv4 addresses, Amazon EC2 selects - // these IP addresses within the subnet's IPv4 CIDR range. You can't specify - // this option and specify more than one private IP address using privateIpAddresses. - // - // The number of IP addresses you can assign to a network interface varies by - // instance type. For more information, see IP Addresses Per ENI Per Instance - // Type (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) - // in the Amazon Virtual Private Cloud User Guide. - SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` - - // The ID of the subnet to associate with the network interface. - // - // SubnetId is a required field - SubnetId *string `locationName:"subnetId" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateNetworkInterfaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNetworkInterfaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNetworkInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNetworkInterfaceInput"} - if s.SubnetId == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateNetworkInterfaceInput) SetDescription(v string) *CreateNetworkInterfaceInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateNetworkInterfaceInput) SetDryRun(v bool) *CreateNetworkInterfaceInput { - s.DryRun = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *CreateNetworkInterfaceInput) SetGroups(v []*string) *CreateNetworkInterfaceInput { - s.Groups = v - return s -} - -// SetIpv6AddressCount sets the Ipv6AddressCount field's value. -func (s *CreateNetworkInterfaceInput) SetIpv6AddressCount(v int64) *CreateNetworkInterfaceInput { - s.Ipv6AddressCount = &v - return s -} - -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *CreateNetworkInterfaceInput) SetIpv6Addresses(v []*InstanceIpv6Address) *CreateNetworkInterfaceInput { - s.Ipv6Addresses = v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *CreateNetworkInterfaceInput) SetPrivateIpAddress(v string) *CreateNetworkInterfaceInput { - s.PrivateIpAddress = &v - return s -} - -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *CreateNetworkInterfaceInput) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *CreateNetworkInterfaceInput { - s.PrivateIpAddresses = v - return s -} - -// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. -func (s *CreateNetworkInterfaceInput) SetSecondaryPrivateIpAddressCount(v int64) *CreateNetworkInterfaceInput { - s.SecondaryPrivateIpAddressCount = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *CreateNetworkInterfaceInput) SetSubnetId(v string) *CreateNetworkInterfaceInput { - s.SubnetId = &v - return s -} - -// Contains the output of CreateNetworkInterface. -type CreateNetworkInterfaceOutput struct { - _ struct{} `type:"structure"` - - // Information about the network interface. - NetworkInterface *NetworkInterface `locationName:"networkInterface" type:"structure"` -} - -// String returns the string representation -func (s CreateNetworkInterfaceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNetworkInterfaceOutput) GoString() string { - return s.String() -} - -// SetNetworkInterface sets the NetworkInterface field's value. -func (s *CreateNetworkInterfaceOutput) SetNetworkInterface(v *NetworkInterface) *CreateNetworkInterfaceOutput { - s.NetworkInterface = v - return s -} - -// Contains the parameters for CreateNetworkInterfacePermission. -type CreateNetworkInterfacePermissionInput struct { - _ struct{} `type:"structure"` - - // The AWS account ID. - AwsAccountId *string `type:"string"` - - // The AWS service. Currently not supported. - AwsService *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the network interface. - // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `type:"string" required:"true"` - - // The type of permission to grant. - // - // Permission is a required field - Permission *string `type:"string" required:"true" enum:"InterfacePermissionType"` -} - -// String returns the string representation -func (s CreateNetworkInterfacePermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNetworkInterfacePermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNetworkInterfacePermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNetworkInterfacePermissionInput"} - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - if s.Permission == nil { - invalidParams.Add(request.NewErrParamRequired("Permission")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAwsAccountId sets the AwsAccountId field's value. -func (s *CreateNetworkInterfacePermissionInput) SetAwsAccountId(v string) *CreateNetworkInterfacePermissionInput { - s.AwsAccountId = &v - return s -} - -// SetAwsService sets the AwsService field's value. -func (s *CreateNetworkInterfacePermissionInput) SetAwsService(v string) *CreateNetworkInterfacePermissionInput { - s.AwsService = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateNetworkInterfacePermissionInput) SetDryRun(v bool) *CreateNetworkInterfacePermissionInput { - s.DryRun = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *CreateNetworkInterfacePermissionInput) SetNetworkInterfaceId(v string) *CreateNetworkInterfacePermissionInput { - s.NetworkInterfaceId = &v - return s -} - -// SetPermission sets the Permission field's value. -func (s *CreateNetworkInterfacePermissionInput) SetPermission(v string) *CreateNetworkInterfacePermissionInput { - s.Permission = &v - return s -} - -// Contains the output of CreateNetworkInterfacePermission. -type CreateNetworkInterfacePermissionOutput struct { - _ struct{} `type:"structure"` - - // Information about the permission for the network interface. - InterfacePermission *NetworkInterfacePermission `locationName:"interfacePermission" type:"structure"` -} - -// String returns the string representation -func (s CreateNetworkInterfacePermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNetworkInterfacePermissionOutput) GoString() string { - return s.String() -} - -// SetInterfacePermission sets the InterfacePermission field's value. -func (s *CreateNetworkInterfacePermissionOutput) SetInterfacePermission(v *NetworkInterfacePermission) *CreateNetworkInterfacePermissionOutput { - s.InterfacePermission = v - return s -} - -type CreatePlacementGroupInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // A name for the placement group. Must be unique within the scope of your account - // for the Region. - // - // Constraints: Up to 255 ASCII characters - GroupName *string `locationName:"groupName" type:"string"` - - // The number of partitions. Valid only when Strategy is set to partition. - PartitionCount *int64 `type:"integer"` - - // The placement strategy. - Strategy *string `locationName:"strategy" type:"string" enum:"PlacementStrategy"` -} - -// String returns the string representation -func (s CreatePlacementGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePlacementGroupInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *CreatePlacementGroupInput) SetDryRun(v bool) *CreatePlacementGroupInput { - s.DryRun = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *CreatePlacementGroupInput) SetGroupName(v string) *CreatePlacementGroupInput { - s.GroupName = &v - return s -} - -// SetPartitionCount sets the PartitionCount field's value. -func (s *CreatePlacementGroupInput) SetPartitionCount(v int64) *CreatePlacementGroupInput { - s.PartitionCount = &v - return s -} - -// SetStrategy sets the Strategy field's value. -func (s *CreatePlacementGroupInput) SetStrategy(v string) *CreatePlacementGroupInput { - s.Strategy = &v - return s -} - -type CreatePlacementGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreatePlacementGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePlacementGroupOutput) GoString() string { - return s.String() -} - -// Contains the parameters for CreateReservedInstancesListing. -type CreateReservedInstancesListingInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure idempotency of your - // listings. This helps avoid duplicate listings. For more information, see - // Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - // - // ClientToken is a required field - ClientToken *string `locationName:"clientToken" type:"string" required:"true"` - - // The number of instances that are a part of a Reserved Instance account to - // be listed in the Reserved Instance Marketplace. This number should be less - // than or equal to the instance count associated with the Reserved Instance - // ID specified in this call. - // - // InstanceCount is a required field - InstanceCount *int64 `locationName:"instanceCount" type:"integer" required:"true"` - - // A list specifying the price of the Standard Reserved Instance for each month - // remaining in the Reserved Instance term. - // - // PriceSchedules is a required field - PriceSchedules []*PriceScheduleSpecification `locationName:"priceSchedules" locationNameList:"item" type:"list" required:"true"` - - // The ID of the active Standard Reserved Instance. - // - // ReservedInstancesId is a required field - ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateReservedInstancesListingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReservedInstancesListingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateReservedInstancesListingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateReservedInstancesListingInput"} - if s.ClientToken == nil { - invalidParams.Add(request.NewErrParamRequired("ClientToken")) - } - if s.InstanceCount == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceCount")) - } - if s.PriceSchedules == nil { - invalidParams.Add(request.NewErrParamRequired("PriceSchedules")) - } - if s.ReservedInstancesId == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedInstancesId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateReservedInstancesListingInput) SetClientToken(v string) *CreateReservedInstancesListingInput { - s.ClientToken = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *CreateReservedInstancesListingInput) SetInstanceCount(v int64) *CreateReservedInstancesListingInput { - s.InstanceCount = &v - return s -} - -// SetPriceSchedules sets the PriceSchedules field's value. -func (s *CreateReservedInstancesListingInput) SetPriceSchedules(v []*PriceScheduleSpecification) *CreateReservedInstancesListingInput { - s.PriceSchedules = v - return s -} - -// SetReservedInstancesId sets the ReservedInstancesId field's value. -func (s *CreateReservedInstancesListingInput) SetReservedInstancesId(v string) *CreateReservedInstancesListingInput { - s.ReservedInstancesId = &v - return s -} - -// Contains the output of CreateReservedInstancesListing. -type CreateReservedInstancesListingOutput struct { - _ struct{} `type:"structure"` - - // Information about the Standard Reserved Instance listing. - ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s CreateReservedInstancesListingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReservedInstancesListingOutput) GoString() string { - return s.String() -} - -// SetReservedInstancesListings sets the ReservedInstancesListings field's value. -func (s *CreateReservedInstancesListingOutput) SetReservedInstancesListings(v []*ReservedInstancesListing) *CreateReservedInstancesListingOutput { - s.ReservedInstancesListings = v - return s -} - -type CreateRouteInput struct { - _ struct{} `type:"structure"` - - // The IPv4 CIDR address block used for the destination match. Routing decisions - // are based on the most specific match. - DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` - - // The IPv6 CIDR block used for the destination match. Routing decisions are - // based on the most specific match. - DestinationIpv6CidrBlock *string `locationName:"destinationIpv6CidrBlock" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // [IPv6 traffic only] The ID of an egress-only internet gateway. - EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` - - // The ID of an internet gateway or virtual private gateway attached to your - // VPC. - GatewayId *string `locationName:"gatewayId" type:"string"` - - // The ID of a NAT instance in your VPC. The operation fails if you specify - // an instance ID unless exactly one network interface is attached. - InstanceId *string `locationName:"instanceId" type:"string"` - - // [IPv4 traffic only] The ID of a NAT gateway. - NatGatewayId *string `locationName:"natGatewayId" type:"string"` - - // The ID of a network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // The ID of the route table for the route. - // - // RouteTableId is a required field - RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` - - // The ID of a transit gateway. - TransitGatewayId *string `type:"string"` - - // The ID of a VPC peering connection. - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` -} - -// String returns the string representation -func (s CreateRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRouteInput"} - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *CreateRouteInput) SetDestinationCidrBlock(v string) *CreateRouteInput { - s.DestinationCidrBlock = &v - return s -} - -// SetDestinationIpv6CidrBlock sets the DestinationIpv6CidrBlock field's value. -func (s *CreateRouteInput) SetDestinationIpv6CidrBlock(v string) *CreateRouteInput { - s.DestinationIpv6CidrBlock = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateRouteInput) SetDryRun(v bool) *CreateRouteInput { - s.DryRun = &v - return s -} - -// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. -func (s *CreateRouteInput) SetEgressOnlyInternetGatewayId(v string) *CreateRouteInput { - s.EgressOnlyInternetGatewayId = &v - return s -} - -// SetGatewayId sets the GatewayId field's value. -func (s *CreateRouteInput) SetGatewayId(v string) *CreateRouteInput { - s.GatewayId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *CreateRouteInput) SetInstanceId(v string) *CreateRouteInput { - s.InstanceId = &v - return s -} - -// SetNatGatewayId sets the NatGatewayId field's value. -func (s *CreateRouteInput) SetNatGatewayId(v string) *CreateRouteInput { - s.NatGatewayId = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *CreateRouteInput) SetNetworkInterfaceId(v string) *CreateRouteInput { - s.NetworkInterfaceId = &v - return s -} - -// SetRouteTableId sets the RouteTableId field's value. -func (s *CreateRouteInput) SetRouteTableId(v string) *CreateRouteInput { - s.RouteTableId = &v - return s -} - -// SetTransitGatewayId sets the TransitGatewayId field's value. -func (s *CreateRouteInput) SetTransitGatewayId(v string) *CreateRouteInput { - s.TransitGatewayId = &v - return s -} - -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *CreateRouteInput) SetVpcPeeringConnectionId(v string) *CreateRouteInput { - s.VpcPeeringConnectionId = &v - return s -} - -type CreateRouteOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s CreateRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRouteOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *CreateRouteOutput) SetReturn(v bool) *CreateRouteOutput { - s.Return = &v - return s -} - -type CreateRouteTableInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateRouteTableInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRouteTableInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRouteTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRouteTableInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateRouteTableInput) SetDryRun(v bool) *CreateRouteTableInput { - s.DryRun = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CreateRouteTableInput) SetVpcId(v string) *CreateRouteTableInput { - s.VpcId = &v - return s -} - -type CreateRouteTableOutput struct { - _ struct{} `type:"structure"` - - // Information about the route table. - RouteTable *RouteTable `locationName:"routeTable" type:"structure"` -} - -// String returns the string representation -func (s CreateRouteTableOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRouteTableOutput) GoString() string { - return s.String() -} - -// SetRouteTable sets the RouteTable field's value. -func (s *CreateRouteTableOutput) SetRouteTable(v *RouteTable) *CreateRouteTableOutput { - s.RouteTable = v - return s -} - -type CreateSecurityGroupInput struct { - _ struct{} `type:"structure"` - - // A description for the security group. This is informational only. - // - // Constraints: Up to 255 characters in length - // - // Constraints for EC2-Classic: ASCII characters - // - // Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* - // - // Description is a required field - Description *string `locationName:"GroupDescription" type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The name of the security group. - // - // Constraints: Up to 255 characters in length. Cannot start with sg-. - // - // Constraints for EC2-Classic: ASCII characters - // - // Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* - // - // GroupName is a required field - GroupName *string `type:"string" required:"true"` - - // [EC2-VPC] The ID of the VPC. Required for EC2-VPC. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s CreateSecurityGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSecurityGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSecurityGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSecurityGroupInput"} - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateSecurityGroupInput) SetDescription(v string) *CreateSecurityGroupInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateSecurityGroupInput) SetDryRun(v bool) *CreateSecurityGroupInput { - s.DryRun = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *CreateSecurityGroupInput) SetGroupName(v string) *CreateSecurityGroupInput { - s.GroupName = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CreateSecurityGroupInput) SetVpcId(v string) *CreateSecurityGroupInput { - s.VpcId = &v - return s -} - -type CreateSecurityGroupOutput struct { - _ struct{} `type:"structure"` - - // The ID of the security group. - GroupId *string `locationName:"groupId" type:"string"` -} - -// String returns the string representation -func (s CreateSecurityGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSecurityGroupOutput) GoString() string { - return s.String() -} - -// SetGroupId sets the GroupId field's value. -func (s *CreateSecurityGroupOutput) SetGroupId(v string) *CreateSecurityGroupOutput { - s.GroupId = &v - return s -} - -// Contains the parameters for CreateSnapshot. -type CreateSnapshotInput struct { - _ struct{} `type:"structure"` - - // A description for the snapshot. - Description *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The tags to apply to the snapshot during creation. - TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` - - // The ID of the EBS volume. - // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateSnapshotInput) SetDescription(v string) *CreateSnapshotInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateSnapshotInput) SetDryRun(v bool) *CreateSnapshotInput { - s.DryRun = &v - return s -} - -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *CreateSnapshotInput) SetTagSpecifications(v []*TagSpecification) *CreateSnapshotInput { - s.TagSpecifications = v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *CreateSnapshotInput) SetVolumeId(v string) *CreateSnapshotInput { - s.VolumeId = &v - return s -} - -// Contains the parameters for CreateSpotDatafeedSubscription. -type CreateSpotDatafeedSubscriptionInput struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket in which to store the Spot Instance data feed. - // - // Bucket is a required field - Bucket *string `locationName:"bucket" type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // A prefix for the data feed file names. - Prefix *string `locationName:"prefix" type:"string"` -} - -// String returns the string representation -func (s CreateSpotDatafeedSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSpotDatafeedSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSpotDatafeedSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSpotDatafeedSubscriptionInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *CreateSpotDatafeedSubscriptionInput) SetBucket(v string) *CreateSpotDatafeedSubscriptionInput { - s.Bucket = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateSpotDatafeedSubscriptionInput) SetDryRun(v bool) *CreateSpotDatafeedSubscriptionInput { - s.DryRun = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *CreateSpotDatafeedSubscriptionInput) SetPrefix(v string) *CreateSpotDatafeedSubscriptionInput { - s.Prefix = &v - return s -} - -// Contains the output of CreateSpotDatafeedSubscription. -type CreateSpotDatafeedSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // The Spot Instance data feed subscription. - SpotDatafeedSubscription *SpotDatafeedSubscription `locationName:"spotDatafeedSubscription" type:"structure"` -} - -// String returns the string representation -func (s CreateSpotDatafeedSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSpotDatafeedSubscriptionOutput) GoString() string { - return s.String() -} - -// SetSpotDatafeedSubscription sets the SpotDatafeedSubscription field's value. -func (s *CreateSpotDatafeedSubscriptionOutput) SetSpotDatafeedSubscription(v *SpotDatafeedSubscription) *CreateSpotDatafeedSubscriptionOutput { - s.SpotDatafeedSubscription = v - return s -} - -type CreateSubnetInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone for the subnet. - // - // Default: AWS selects one for you. If you create more than one subnet in your - // VPC, we may not necessarily select a different zone for each subnet. - AvailabilityZone *string `type:"string"` - - // The AZ ID of the subnet. - AvailabilityZoneId *string `type:"string"` - - // The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24. - // - // CidrBlock is a required field - CidrBlock *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The IPv6 network range for the subnet, in CIDR notation. The subnet size - // must use a /64 prefix length. - Ipv6CidrBlock *string `type:"string"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateSubnetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSubnetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSubnetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSubnetInput"} - if s.CidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("CidrBlock")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateSubnetInput) SetAvailabilityZone(v string) *CreateSubnetInput { - s.AvailabilityZone = &v - return s -} - -// SetAvailabilityZoneId sets the AvailabilityZoneId field's value. -func (s *CreateSubnetInput) SetAvailabilityZoneId(v string) *CreateSubnetInput { - s.AvailabilityZoneId = &v - return s -} - -// SetCidrBlock sets the CidrBlock field's value. -func (s *CreateSubnetInput) SetCidrBlock(v string) *CreateSubnetInput { - s.CidrBlock = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateSubnetInput) SetDryRun(v bool) *CreateSubnetInput { - s.DryRun = &v - return s -} - -// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. -func (s *CreateSubnetInput) SetIpv6CidrBlock(v string) *CreateSubnetInput { - s.Ipv6CidrBlock = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CreateSubnetInput) SetVpcId(v string) *CreateSubnetInput { - s.VpcId = &v - return s -} - -type CreateSubnetOutput struct { - _ struct{} `type:"structure"` - - // Information about the subnet. - Subnet *Subnet `locationName:"subnet" type:"structure"` -} - -// String returns the string representation -func (s CreateSubnetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSubnetOutput) GoString() string { - return s.String() -} - -// SetSubnet sets the Subnet field's value. -func (s *CreateSubnetOutput) SetSubnet(v *Subnet) *CreateSubnetOutput { - s.Subnet = v - return s -} - -type CreateTagsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The IDs of one or more resources, separated by spaces. - // - // Constraints: Up to 1000 resource IDs. We recommend breaking up this request - // into smaller batches. - // - // Resources is a required field - Resources []*string `locationName:"ResourceId" type:"list" required:"true"` - - // One or more tags. The value parameter is required, but if you don't want - // the tag to have a value, specify the parameter with no value, and we set - // the value to an empty string. - // - // Tags is a required field - Tags []*Tag `locationName:"Tag" locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"} - if s.Resources == nil { - invalidParams.Add(request.NewErrParamRequired("Resources")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateTagsInput) SetDryRun(v bool) *CreateTagsInput { - s.DryRun = &v - return s -} - -// SetResources sets the Resources field's value. -func (s *CreateTagsInput) SetResources(v []*string) *CreateTagsInput { - s.Resources = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateTagsInput) SetTags(v []*Tag) *CreateTagsInput { - s.Tags = v - return s -} - -type CreateTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTagsOutput) GoString() string { - return s.String() -} - -type CreateTransitGatewayInput struct { - _ struct{} `type:"structure"` - - // A description of the transit gateway. - Description *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The transit gateway options. - Options *TransitGatewayRequestOptions `type:"structure"` - - // The tags to apply to the transit gateway. - TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s CreateTransitGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTransitGatewayInput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *CreateTransitGatewayInput) SetDescription(v string) *CreateTransitGatewayInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateTransitGatewayInput) SetDryRun(v bool) *CreateTransitGatewayInput { - s.DryRun = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *CreateTransitGatewayInput) SetOptions(v *TransitGatewayRequestOptions) *CreateTransitGatewayInput { - s.Options = v - return s -} - -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *CreateTransitGatewayInput) SetTagSpecifications(v []*TagSpecification) *CreateTransitGatewayInput { - s.TagSpecifications = v - return s -} - -type CreateTransitGatewayOutput struct { - _ struct{} `type:"structure"` - - // Information about the transit gateway. - TransitGateway *TransitGateway `locationName:"transitGateway" type:"structure"` -} - -// String returns the string representation -func (s CreateTransitGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTransitGatewayOutput) GoString() string { - return s.String() -} - -// SetTransitGateway sets the TransitGateway field's value. -func (s *CreateTransitGatewayOutput) SetTransitGateway(v *TransitGateway) *CreateTransitGatewayOutput { - s.TransitGateway = v - return s -} - -type CreateTransitGatewayRouteInput struct { - _ struct{} `type:"structure"` - - // Indicates whether traffic matching this route is to be dropped. - Blackhole *bool `type:"boolean"` - - // The CIDR range used for destination matches. Routing decisions are based - // on the most specific match. - // - // DestinationCidrBlock is a required field - DestinationCidrBlock *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the attachment. - TransitGatewayAttachmentId *string `type:"string"` - - // The ID of the transit gateway route table. - // - // TransitGatewayRouteTableId is a required field - TransitGatewayRouteTableId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateTransitGatewayRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTransitGatewayRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTransitGatewayRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTransitGatewayRouteInput"} - if s.DestinationCidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) - } - if s.TransitGatewayRouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBlackhole sets the Blackhole field's value. -func (s *CreateTransitGatewayRouteInput) SetBlackhole(v bool) *CreateTransitGatewayRouteInput { - s.Blackhole = &v - return s -} - -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *CreateTransitGatewayRouteInput) SetDestinationCidrBlock(v string) *CreateTransitGatewayRouteInput { - s.DestinationCidrBlock = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateTransitGatewayRouteInput) SetDryRun(v bool) *CreateTransitGatewayRouteInput { - s.DryRun = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *CreateTransitGatewayRouteInput) SetTransitGatewayAttachmentId(v string) *CreateTransitGatewayRouteInput { - s.TransitGatewayAttachmentId = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *CreateTransitGatewayRouteInput) SetTransitGatewayRouteTableId(v string) *CreateTransitGatewayRouteInput { - s.TransitGatewayRouteTableId = &v - return s -} - -type CreateTransitGatewayRouteOutput struct { - _ struct{} `type:"structure"` - - // Information about the route. - Route *TransitGatewayRoute `locationName:"route" type:"structure"` -} - -// String returns the string representation -func (s CreateTransitGatewayRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTransitGatewayRouteOutput) GoString() string { - return s.String() -} - -// SetRoute sets the Route field's value. -func (s *CreateTransitGatewayRouteOutput) SetRoute(v *TransitGatewayRoute) *CreateTransitGatewayRouteOutput { - s.Route = v - return s -} - -type CreateTransitGatewayRouteTableInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The tags to apply to the transit gateway route table. - TagSpecifications []*TagSpecification `locationNameList:"item" type:"list"` - - // The ID of the transit gateway. - // - // TransitGatewayId is a required field - TransitGatewayId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateTransitGatewayRouteTableInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTransitGatewayRouteTableInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTransitGatewayRouteTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTransitGatewayRouteTableInput"} - if s.TransitGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateTransitGatewayRouteTableInput) SetDryRun(v bool) *CreateTransitGatewayRouteTableInput { - s.DryRun = &v - return s -} - -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *CreateTransitGatewayRouteTableInput) SetTagSpecifications(v []*TagSpecification) *CreateTransitGatewayRouteTableInput { - s.TagSpecifications = v - return s -} - -// SetTransitGatewayId sets the TransitGatewayId field's value. -func (s *CreateTransitGatewayRouteTableInput) SetTransitGatewayId(v string) *CreateTransitGatewayRouteTableInput { - s.TransitGatewayId = &v - return s -} - -type CreateTransitGatewayRouteTableOutput struct { - _ struct{} `type:"structure"` - - // Information about the transit gateway route table. - TransitGatewayRouteTable *TransitGatewayRouteTable `locationName:"transitGatewayRouteTable" type:"structure"` -} - -// String returns the string representation -func (s CreateTransitGatewayRouteTableOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTransitGatewayRouteTableOutput) GoString() string { - return s.String() -} - -// SetTransitGatewayRouteTable sets the TransitGatewayRouteTable field's value. -func (s *CreateTransitGatewayRouteTableOutput) SetTransitGatewayRouteTable(v *TransitGatewayRouteTable) *CreateTransitGatewayRouteTableOutput { - s.TransitGatewayRouteTable = v - return s -} - -type CreateTransitGatewayVpcAttachmentInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The VPC attachment options. - Options *CreateTransitGatewayVpcAttachmentRequestOptions `type:"structure"` - - // The IDs of one or more subnets. You can specify only one subnet per Availability - // Zone. You must specify at least one subnet, but we recommend that you specify - // two subnets for better availability. The transit gateway uses one IP address - // from each specified subnet. - // - // SubnetIds is a required field - SubnetIds []*string `locationNameList:"item" type:"list" required:"true"` - - // The tags to apply to the VPC attachment. - TagSpecifications []*TagSpecification `locationNameList:"item" type:"list"` - - // The ID of the transit gateway. - // - // TransitGatewayId is a required field - TransitGatewayId *string `type:"string" required:"true"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateTransitGatewayVpcAttachmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTransitGatewayVpcAttachmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTransitGatewayVpcAttachmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTransitGatewayVpcAttachmentInput"} - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - if s.TransitGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayId")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateTransitGatewayVpcAttachmentInput) SetDryRun(v bool) *CreateTransitGatewayVpcAttachmentInput { - s.DryRun = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *CreateTransitGatewayVpcAttachmentInput) SetOptions(v *CreateTransitGatewayVpcAttachmentRequestOptions) *CreateTransitGatewayVpcAttachmentInput { - s.Options = v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateTransitGatewayVpcAttachmentInput) SetSubnetIds(v []*string) *CreateTransitGatewayVpcAttachmentInput { - s.SubnetIds = v - return s -} - -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *CreateTransitGatewayVpcAttachmentInput) SetTagSpecifications(v []*TagSpecification) *CreateTransitGatewayVpcAttachmentInput { - s.TagSpecifications = v - return s -} - -// SetTransitGatewayId sets the TransitGatewayId field's value. -func (s *CreateTransitGatewayVpcAttachmentInput) SetTransitGatewayId(v string) *CreateTransitGatewayVpcAttachmentInput { - s.TransitGatewayId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CreateTransitGatewayVpcAttachmentInput) SetVpcId(v string) *CreateTransitGatewayVpcAttachmentInput { - s.VpcId = &v - return s -} - -type CreateTransitGatewayVpcAttachmentOutput struct { - _ struct{} `type:"structure"` - - // Information about the VPC attachment. - TransitGatewayVpcAttachment *TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachment" type:"structure"` -} - -// String returns the string representation -func (s CreateTransitGatewayVpcAttachmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTransitGatewayVpcAttachmentOutput) GoString() string { - return s.String() -} - -// SetTransitGatewayVpcAttachment sets the TransitGatewayVpcAttachment field's value. -func (s *CreateTransitGatewayVpcAttachmentOutput) SetTransitGatewayVpcAttachment(v *TransitGatewayVpcAttachment) *CreateTransitGatewayVpcAttachmentOutput { - s.TransitGatewayVpcAttachment = v - return s -} - -// Describes the options for a VPC attachment. -type CreateTransitGatewayVpcAttachmentRequestOptions struct { - _ struct{} `type:"structure"` - - // Enable or disable DNS support. The default is enable. - DnsSupport *string `type:"string" enum:"DnsSupportValue"` - - // Enable or disable IPv6 support. The default is enable. - Ipv6Support *string `type:"string" enum:"Ipv6SupportValue"` -} - -// String returns the string representation -func (s CreateTransitGatewayVpcAttachmentRequestOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTransitGatewayVpcAttachmentRequestOptions) GoString() string { - return s.String() -} - -// SetDnsSupport sets the DnsSupport field's value. -func (s *CreateTransitGatewayVpcAttachmentRequestOptions) SetDnsSupport(v string) *CreateTransitGatewayVpcAttachmentRequestOptions { - s.DnsSupport = &v - return s -} - -// SetIpv6Support sets the Ipv6Support field's value. -func (s *CreateTransitGatewayVpcAttachmentRequestOptions) SetIpv6Support(v string) *CreateTransitGatewayVpcAttachmentRequestOptions { - s.Ipv6Support = &v - return s -} - -// Contains the parameters for CreateVolume. -type CreateVolumeInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which to create the volume. Use DescribeAvailabilityZones - // to list the Availability Zones that are currently available to you. - // - // AvailabilityZone is a required field - AvailabilityZone *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes - // may only be attached to instances that support Amazon EBS encryption. Volumes - // that are created from encrypted snapshots are automatically encrypted. There - // is no way to create an encrypted volume from an unencrypted snapshot or vice - // versa. If your AMI uses encrypted volumes, you can only launch it on supported - // instance types. For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) - // in the Amazon Elastic Compute Cloud User Guide. - Encrypted *bool `locationName:"encrypted" type:"boolean"` - - // The number of I/O operations per second (IOPS) to provision for the volume, - // with a maximum ratio of 50 IOPS/GiB. Range is 100 to 64,000 IOPS for volumes - // in most regions. Maximum IOPS of 64,000 is guaranteed only on Nitro-based - // instances (AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). - // Other instance families guarantee performance up to 32,000 IOPS. For more - // information, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // This parameter is valid only for Provisioned IOPS SSD (io1) volumes. - Iops *int64 `type:"integer"` - - // An identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use when creating the encrypted volume. This parameter is only - // required if you want to use a non-default CMK; if this parameter is not specified, - // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted - // flag must also be set. - // - // The CMK identifier may be provided in any of the following formats: - // - // * Key ID - // - // * Key alias - // - // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed - // by the region of the CMK, the AWS account ID of the CMK owner, the key - // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. - // - // - // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, - // followed by the region of the CMK, the AWS account ID of the CMK owner, - // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. - // - // - // AWS parses KmsKeyId asynchronously, meaning that the action you call may - // appear to complete even though you provided an invalid identifier. The action - // will eventually fail. - KmsKeyId *string `type:"string"` - - // The size of the volume, in GiBs. - // - // Constraints: 1-16,384 for gp2, 4-16,384 for io1, 500-16,384 for st1, 500-16,384 - // for sc1, and 1-1,024 for standard. If you specify a snapshot, the volume - // size must be equal to or larger than the snapshot size. - // - // Default: If you're creating the volume from a snapshot and don't specify - // a volume size, the default is the snapshot size. - Size *int64 `type:"integer"` - - // The snapshot from which to create the volume. - SnapshotId *string `type:"string"` - - // The tags to apply to the volume during creation. - TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` - - // The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned - // IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard - // for Magnetic volumes. - // - // Defaults: If no volume type is specified, the default is standard in us-east-1, - // eu-west-1, eu-central-1, us-west-2, us-west-1, sa-east-1, ap-northeast-1, - // ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-south-1, us-gov-west-1, - // and cn-north-1. In all other regions, EBS defaults to gp2. - VolumeType *string `type:"string" enum:"VolumeType"` -} - -// String returns the string representation -func (s CreateVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVolumeInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateVolumeInput) SetAvailabilityZone(v string) *CreateVolumeInput { - s.AvailabilityZone = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateVolumeInput) SetDryRun(v bool) *CreateVolumeInput { - s.DryRun = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *CreateVolumeInput) SetEncrypted(v bool) *CreateVolumeInput { - s.Encrypted = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *CreateVolumeInput) SetIops(v int64) *CreateVolumeInput { - s.Iops = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateVolumeInput) SetKmsKeyId(v string) *CreateVolumeInput { - s.KmsKeyId = &v - return s -} - -// SetSize sets the Size field's value. -func (s *CreateVolumeInput) SetSize(v int64) *CreateVolumeInput { - s.Size = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *CreateVolumeInput) SetSnapshotId(v string) *CreateVolumeInput { - s.SnapshotId = &v - return s -} - -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *CreateVolumeInput) SetTagSpecifications(v []*TagSpecification) *CreateVolumeInput { - s.TagSpecifications = v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *CreateVolumeInput) SetVolumeType(v string) *CreateVolumeInput { - s.VolumeType = &v - return s -} - -// Describes the user or group to be added or removed from the permissions for -// a volume. -type CreateVolumePermission struct { - _ struct{} `type:"structure"` - - // The specific group that is to be added or removed from a volume's list of - // create volume permissions. - Group *string `locationName:"group" type:"string" enum:"PermissionGroup"` - - // The specific AWS account ID that is to be added or removed from a volume's - // list of create volume permissions. - UserId *string `locationName:"userId" type:"string"` -} - -// String returns the string representation -func (s CreateVolumePermission) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVolumePermission) GoString() string { - return s.String() -} - -// SetGroup sets the Group field's value. -func (s *CreateVolumePermission) SetGroup(v string) *CreateVolumePermission { - s.Group = &v - return s -} - -// SetUserId sets the UserId field's value. -func (s *CreateVolumePermission) SetUserId(v string) *CreateVolumePermission { - s.UserId = &v - return s -} - -// Describes modifications to the permissions for a volume. -type CreateVolumePermissionModifications struct { - _ struct{} `type:"structure"` - - // Adds a specific AWS account ID or group to a volume's list of create volume - // permissions. - Add []*CreateVolumePermission `locationNameList:"item" type:"list"` - - // Removes a specific AWS account ID or group from a volume's list of create - // volume permissions. - Remove []*CreateVolumePermission `locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s CreateVolumePermissionModifications) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVolumePermissionModifications) GoString() string { - return s.String() -} - -// SetAdd sets the Add field's value. -func (s *CreateVolumePermissionModifications) SetAdd(v []*CreateVolumePermission) *CreateVolumePermissionModifications { - s.Add = v - return s -} - -// SetRemove sets the Remove field's value. -func (s *CreateVolumePermissionModifications) SetRemove(v []*CreateVolumePermission) *CreateVolumePermissionModifications { - s.Remove = v - return s -} - -type CreateVpcEndpointConnectionNotificationInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` - - // One or more endpoint events for which to receive notifications. Valid values - // are Accept, Connect, Delete, and Reject. - // - // ConnectionEvents is a required field - ConnectionEvents []*string `locationNameList:"item" type:"list" required:"true"` - - // The ARN of the SNS topic for the notifications. - // - // ConnectionNotificationArn is a required field - ConnectionNotificationArn *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the endpoint service. - ServiceId *string `type:"string"` - - // The ID of the endpoint. - VpcEndpointId *string `type:"string"` -} - -// String returns the string representation -func (s CreateVpcEndpointConnectionNotificationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcEndpointConnectionNotificationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpcEndpointConnectionNotificationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpcEndpointConnectionNotificationInput"} - if s.ConnectionEvents == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionEvents")) - } - if s.ConnectionNotificationArn == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionNotificationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateVpcEndpointConnectionNotificationInput) SetClientToken(v string) *CreateVpcEndpointConnectionNotificationInput { - s.ClientToken = &v - return s -} - -// SetConnectionEvents sets the ConnectionEvents field's value. -func (s *CreateVpcEndpointConnectionNotificationInput) SetConnectionEvents(v []*string) *CreateVpcEndpointConnectionNotificationInput { - s.ConnectionEvents = v - return s -} - -// SetConnectionNotificationArn sets the ConnectionNotificationArn field's value. -func (s *CreateVpcEndpointConnectionNotificationInput) SetConnectionNotificationArn(v string) *CreateVpcEndpointConnectionNotificationInput { - s.ConnectionNotificationArn = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateVpcEndpointConnectionNotificationInput) SetDryRun(v bool) *CreateVpcEndpointConnectionNotificationInput { - s.DryRun = &v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *CreateVpcEndpointConnectionNotificationInput) SetServiceId(v string) *CreateVpcEndpointConnectionNotificationInput { - s.ServiceId = &v - return s -} - -// SetVpcEndpointId sets the VpcEndpointId field's value. -func (s *CreateVpcEndpointConnectionNotificationInput) SetVpcEndpointId(v string) *CreateVpcEndpointConnectionNotificationInput { - s.VpcEndpointId = &v - return s -} - -type CreateVpcEndpointConnectionNotificationOutput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the notification. - ConnectionNotification *ConnectionNotification `locationName:"connectionNotification" type:"structure"` -} - -// String returns the string representation -func (s CreateVpcEndpointConnectionNotificationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcEndpointConnectionNotificationOutput) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateVpcEndpointConnectionNotificationOutput) SetClientToken(v string) *CreateVpcEndpointConnectionNotificationOutput { - s.ClientToken = &v - return s -} - -// SetConnectionNotification sets the ConnectionNotification field's value. -func (s *CreateVpcEndpointConnectionNotificationOutput) SetConnectionNotification(v *ConnectionNotification) *CreateVpcEndpointConnectionNotificationOutput { - s.ConnectionNotification = v - return s -} - -// Contains the parameters for CreateVpcEndpoint. -type CreateVpcEndpointInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // (Gateway endpoint) A policy to attach to the endpoint that controls access - // to the service. The policy must be in valid JSON format. If this parameter - // is not specified, we attach a default policy that allows full access to the - // service. - PolicyDocument *string `type:"string"` - - // (Interface endpoint) Indicate whether to associate a private hosted zone - // with the specified VPC. The private hosted zone contains a record set for - // the default public DNS name for the service for the region (for example, - // kinesis.us-east-1.amazonaws.com) which resolves to the private IP addresses - // of the endpoint network interfaces in the VPC. This enables you to make requests - // to the default public DNS name for the service instead of the public DNS - // names that are automatically generated by the VPC endpoint service. - // - // To use a private hosted zone, you must set the following VPC attributes to - // true: enableDnsHostnames and enableDnsSupport. Use ModifyVpcAttribute to - // set the VPC attributes. - // - // Default: false - PrivateDnsEnabled *bool `type:"boolean"` - - // (Gateway endpoint) One or more route table IDs. - RouteTableIds []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"` - - // (Interface endpoint) The ID of one or more security groups to associate with - // the endpoint network interface. - SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"` - - // The service name. To get a list of available services, use the DescribeVpcEndpointServices - // request, or get the name from the service provider. - // - // ServiceName is a required field - ServiceName *string `type:"string" required:"true"` - - // (Interface endpoint) The ID of one or more subnets in which to create an - // endpoint network interface. - SubnetIds []*string `locationName:"SubnetId" locationNameList:"item" type:"list"` - - // The type of endpoint. - // - // Default: Gateway - VpcEndpointType *string `type:"string" enum:"VpcEndpointType"` - - // The ID of the VPC in which the endpoint will be used. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateVpcEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpcEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpcEndpointInput"} - if s.ServiceName == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceName")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateVpcEndpointInput) SetClientToken(v string) *CreateVpcEndpointInput { - s.ClientToken = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateVpcEndpointInput) SetDryRun(v bool) *CreateVpcEndpointInput { - s.DryRun = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *CreateVpcEndpointInput) SetPolicyDocument(v string) *CreateVpcEndpointInput { - s.PolicyDocument = &v - return s -} - -// SetPrivateDnsEnabled sets the PrivateDnsEnabled field's value. -func (s *CreateVpcEndpointInput) SetPrivateDnsEnabled(v bool) *CreateVpcEndpointInput { - s.PrivateDnsEnabled = &v - return s -} - -// SetRouteTableIds sets the RouteTableIds field's value. -func (s *CreateVpcEndpointInput) SetRouteTableIds(v []*string) *CreateVpcEndpointInput { - s.RouteTableIds = v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *CreateVpcEndpointInput) SetSecurityGroupIds(v []*string) *CreateVpcEndpointInput { - s.SecurityGroupIds = v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *CreateVpcEndpointInput) SetServiceName(v string) *CreateVpcEndpointInput { - s.ServiceName = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateVpcEndpointInput) SetSubnetIds(v []*string) *CreateVpcEndpointInput { - s.SubnetIds = v - return s -} - -// SetVpcEndpointType sets the VpcEndpointType field's value. -func (s *CreateVpcEndpointInput) SetVpcEndpointType(v string) *CreateVpcEndpointInput { - s.VpcEndpointType = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CreateVpcEndpointInput) SetVpcId(v string) *CreateVpcEndpointInput { - s.VpcId = &v - return s -} - -// Contains the output of CreateVpcEndpoint. -type CreateVpcEndpointOutput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the endpoint. - VpcEndpoint *VpcEndpoint `locationName:"vpcEndpoint" type:"structure"` -} - -// String returns the string representation -func (s CreateVpcEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcEndpointOutput) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateVpcEndpointOutput) SetClientToken(v string) *CreateVpcEndpointOutput { - s.ClientToken = &v - return s -} - -// SetVpcEndpoint sets the VpcEndpoint field's value. -func (s *CreateVpcEndpointOutput) SetVpcEndpoint(v *VpcEndpoint) *CreateVpcEndpointOutput { - s.VpcEndpoint = v - return s -} - -type CreateVpcEndpointServiceConfigurationInput struct { - _ struct{} `type:"structure"` - - // Indicate whether requests from service consumers to create an endpoint to - // your service must be accepted. To accept a request, use AcceptVpcEndpointConnections. - AcceptanceRequired *bool `type:"boolean"` - - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The Amazon Resource Names (ARNs) of one or more Network Load Balancers for - // your service. - // - // NetworkLoadBalancerArns is a required field - NetworkLoadBalancerArns []*string `locationName:"NetworkLoadBalancerArn" locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateVpcEndpointServiceConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcEndpointServiceConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpcEndpointServiceConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpcEndpointServiceConfigurationInput"} - if s.NetworkLoadBalancerArns == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkLoadBalancerArns")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptanceRequired sets the AcceptanceRequired field's value. -func (s *CreateVpcEndpointServiceConfigurationInput) SetAcceptanceRequired(v bool) *CreateVpcEndpointServiceConfigurationInput { - s.AcceptanceRequired = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateVpcEndpointServiceConfigurationInput) SetClientToken(v string) *CreateVpcEndpointServiceConfigurationInput { - s.ClientToken = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateVpcEndpointServiceConfigurationInput) SetDryRun(v bool) *CreateVpcEndpointServiceConfigurationInput { - s.DryRun = &v - return s -} - -// SetNetworkLoadBalancerArns sets the NetworkLoadBalancerArns field's value. -func (s *CreateVpcEndpointServiceConfigurationInput) SetNetworkLoadBalancerArns(v []*string) *CreateVpcEndpointServiceConfigurationInput { - s.NetworkLoadBalancerArns = v - return s -} - -type CreateVpcEndpointServiceConfigurationOutput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the service configuration. - ServiceConfiguration *ServiceConfiguration `locationName:"serviceConfiguration" type:"structure"` -} - -// String returns the string representation -func (s CreateVpcEndpointServiceConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcEndpointServiceConfigurationOutput) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateVpcEndpointServiceConfigurationOutput) SetClientToken(v string) *CreateVpcEndpointServiceConfigurationOutput { - s.ClientToken = &v - return s -} - -// SetServiceConfiguration sets the ServiceConfiguration field's value. -func (s *CreateVpcEndpointServiceConfigurationOutput) SetServiceConfiguration(v *ServiceConfiguration) *CreateVpcEndpointServiceConfigurationOutput { - s.ServiceConfiguration = v - return s -} - -type CreateVpcInput struct { - _ struct{} `type:"structure"` - - // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for - // the VPC. You cannot specify the range of IP addresses, or the size of the - // CIDR block. - AmazonProvidedIpv6CidrBlock *bool `locationName:"amazonProvidedIpv6CidrBlock" type:"boolean"` - - // The IPv4 network range for the VPC, in CIDR notation. For example, 10.0.0.0/16. - // - // CidrBlock is a required field - CidrBlock *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The tenancy options for instances launched into the VPC. For default, instances - // are launched with shared tenancy by default. You can launch instances with - // any tenancy into a shared tenancy VPC. For dedicated, instances are launched - // as dedicated tenancy instances by default. You can only launch instances - // with a tenancy of dedicated or host into a dedicated tenancy VPC. - // - // Important: The host value cannot be used with this parameter. Use the default - // or dedicated values only. - // - // Default: default - InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` -} - -// String returns the string representation -func (s CreateVpcInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpcInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpcInput"} - if s.CidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("CidrBlock")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAmazonProvidedIpv6CidrBlock sets the AmazonProvidedIpv6CidrBlock field's value. -func (s *CreateVpcInput) SetAmazonProvidedIpv6CidrBlock(v bool) *CreateVpcInput { - s.AmazonProvidedIpv6CidrBlock = &v - return s -} - -// SetCidrBlock sets the CidrBlock field's value. -func (s *CreateVpcInput) SetCidrBlock(v string) *CreateVpcInput { - s.CidrBlock = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateVpcInput) SetDryRun(v bool) *CreateVpcInput { - s.DryRun = &v - return s -} - -// SetInstanceTenancy sets the InstanceTenancy field's value. -func (s *CreateVpcInput) SetInstanceTenancy(v string) *CreateVpcInput { - s.InstanceTenancy = &v - return s -} - -type CreateVpcOutput struct { - _ struct{} `type:"structure"` - - // Information about the VPC. - Vpc *Vpc `locationName:"vpc" type:"structure"` -} - -// String returns the string representation -func (s CreateVpcOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcOutput) GoString() string { - return s.String() -} - -// SetVpc sets the Vpc field's value. -func (s *CreateVpcOutput) SetVpc(v *Vpc) *CreateVpcOutput { - s.Vpc = v - return s -} - -type CreateVpcPeeringConnectionInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The AWS account ID of the owner of the accepter VPC. - // - // Default: Your AWS account ID - PeerOwnerId *string `locationName:"peerOwnerId" type:"string"` - - // The region code for the accepter VPC, if the accepter VPC is located in a - // region other than the region in which you make the request. - // - // Default: The region in which you make the request. - PeerRegion *string `type:"string"` - - // The ID of the VPC with which you are creating the VPC peering connection. - // You must specify this parameter in the request. - PeerVpcId *string `locationName:"peerVpcId" type:"string"` - - // The ID of the requester VPC. You must specify this parameter in the request. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s CreateVpcPeeringConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcPeeringConnectionInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateVpcPeeringConnectionInput) SetDryRun(v bool) *CreateVpcPeeringConnectionInput { - s.DryRun = &v - return s -} - -// SetPeerOwnerId sets the PeerOwnerId field's value. -func (s *CreateVpcPeeringConnectionInput) SetPeerOwnerId(v string) *CreateVpcPeeringConnectionInput { - s.PeerOwnerId = &v - return s -} - -// SetPeerRegion sets the PeerRegion field's value. -func (s *CreateVpcPeeringConnectionInput) SetPeerRegion(v string) *CreateVpcPeeringConnectionInput { - s.PeerRegion = &v - return s -} - -// SetPeerVpcId sets the PeerVpcId field's value. -func (s *CreateVpcPeeringConnectionInput) SetPeerVpcId(v string) *CreateVpcPeeringConnectionInput { - s.PeerVpcId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CreateVpcPeeringConnectionInput) SetVpcId(v string) *CreateVpcPeeringConnectionInput { - s.VpcId = &v - return s -} - -type CreateVpcPeeringConnectionOutput struct { - _ struct{} `type:"structure"` - - // Information about the VPC peering connection. - VpcPeeringConnection *VpcPeeringConnection `locationName:"vpcPeeringConnection" type:"structure"` -} - -// String returns the string representation -func (s CreateVpcPeeringConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcPeeringConnectionOutput) GoString() string { - return s.String() -} - -// SetVpcPeeringConnection sets the VpcPeeringConnection field's value. -func (s *CreateVpcPeeringConnectionOutput) SetVpcPeeringConnection(v *VpcPeeringConnection) *CreateVpcPeeringConnectionOutput { - s.VpcPeeringConnection = v - return s -} - -// Contains the parameters for CreateVpnConnection. -type CreateVpnConnectionInput struct { - _ struct{} `type:"structure"` - - // The ID of the customer gateway. - // - // CustomerGatewayId is a required field - CustomerGatewayId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The options for the VPN connection. - Options *VpnConnectionOptionsSpecification `locationName:"options" type:"structure"` - - // The ID of the transit gateway. If you specify a transit gateway, you cannot - // specify a virtual private gateway. - TransitGatewayId *string `type:"string"` - - // The type of VPN connection (ipsec.1). - // - // Type is a required field - Type *string `type:"string" required:"true"` - - // The ID of the virtual private gateway. If you specify a virtual private gateway, - // you cannot specify a transit gateway. - VpnGatewayId *string `type:"string"` -} - -// String returns the string representation -func (s CreateVpnConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpnConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpnConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpnConnectionInput"} - if s.CustomerGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("CustomerGatewayId")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomerGatewayId sets the CustomerGatewayId field's value. -func (s *CreateVpnConnectionInput) SetCustomerGatewayId(v string) *CreateVpnConnectionInput { - s.CustomerGatewayId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateVpnConnectionInput) SetDryRun(v bool) *CreateVpnConnectionInput { - s.DryRun = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *CreateVpnConnectionInput) SetOptions(v *VpnConnectionOptionsSpecification) *CreateVpnConnectionInput { - s.Options = v - return s -} - -// SetTransitGatewayId sets the TransitGatewayId field's value. -func (s *CreateVpnConnectionInput) SetTransitGatewayId(v string) *CreateVpnConnectionInput { - s.TransitGatewayId = &v - return s -} - -// SetType sets the Type field's value. -func (s *CreateVpnConnectionInput) SetType(v string) *CreateVpnConnectionInput { - s.Type = &v - return s -} - -// SetVpnGatewayId sets the VpnGatewayId field's value. -func (s *CreateVpnConnectionInput) SetVpnGatewayId(v string) *CreateVpnConnectionInput { - s.VpnGatewayId = &v - return s -} - -// Contains the output of CreateVpnConnection. -type CreateVpnConnectionOutput struct { - _ struct{} `type:"structure"` - - // Information about the VPN connection. - VpnConnection *VpnConnection `locationName:"vpnConnection" type:"structure"` -} - -// String returns the string representation -func (s CreateVpnConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpnConnectionOutput) GoString() string { - return s.String() -} - -// SetVpnConnection sets the VpnConnection field's value. -func (s *CreateVpnConnectionOutput) SetVpnConnection(v *VpnConnection) *CreateVpnConnectionOutput { - s.VpnConnection = v - return s -} - -// Contains the parameters for CreateVpnConnectionRoute. -type CreateVpnConnectionRouteInput struct { - _ struct{} `type:"structure"` - - // The CIDR block associated with the local subnet of the customer network. - // - // DestinationCidrBlock is a required field - DestinationCidrBlock *string `type:"string" required:"true"` - - // The ID of the VPN connection. - // - // VpnConnectionId is a required field - VpnConnectionId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateVpnConnectionRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpnConnectionRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpnConnectionRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpnConnectionRouteInput"} - if s.DestinationCidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) - } - if s.VpnConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("VpnConnectionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *CreateVpnConnectionRouteInput) SetDestinationCidrBlock(v string) *CreateVpnConnectionRouteInput { - s.DestinationCidrBlock = &v - return s -} - -// SetVpnConnectionId sets the VpnConnectionId field's value. -func (s *CreateVpnConnectionRouteInput) SetVpnConnectionId(v string) *CreateVpnConnectionRouteInput { - s.VpnConnectionId = &v - return s -} - -type CreateVpnConnectionRouteOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateVpnConnectionRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpnConnectionRouteOutput) GoString() string { - return s.String() -} - -// Contains the parameters for CreateVpnGateway. -type CreateVpnGatewayInput struct { - _ struct{} `type:"structure"` - - // A private Autonomous System Number (ASN) for the Amazon side of a BGP session. - // If you're using a 16-bit ASN, it must be in the 64512 to 65534 range. If - // you're using a 32-bit ASN, it must be in the 4200000000 to 4294967294 range. - // - // Default: 64512 - AmazonSideAsn *int64 `type:"long"` - - // The Availability Zone for the virtual private gateway. - AvailabilityZone *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The type of VPN connection this virtual private gateway supports. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"GatewayType"` -} - -// String returns the string representation -func (s CreateVpnGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpnGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpnGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpnGatewayInput"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAmazonSideAsn sets the AmazonSideAsn field's value. -func (s *CreateVpnGatewayInput) SetAmazonSideAsn(v int64) *CreateVpnGatewayInput { - s.AmazonSideAsn = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateVpnGatewayInput) SetAvailabilityZone(v string) *CreateVpnGatewayInput { - s.AvailabilityZone = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateVpnGatewayInput) SetDryRun(v bool) *CreateVpnGatewayInput { - s.DryRun = &v - return s -} - -// SetType sets the Type field's value. -func (s *CreateVpnGatewayInput) SetType(v string) *CreateVpnGatewayInput { - s.Type = &v - return s -} - -// Contains the output of CreateVpnGateway. -type CreateVpnGatewayOutput struct { - _ struct{} `type:"structure"` - - // Information about the virtual private gateway. - VpnGateway *VpnGateway `locationName:"vpnGateway" type:"structure"` -} - -// String returns the string representation -func (s CreateVpnGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpnGatewayOutput) GoString() string { - return s.String() -} - -// SetVpnGateway sets the VpnGateway field's value. -func (s *CreateVpnGatewayOutput) SetVpnGateway(v *VpnGateway) *CreateVpnGatewayOutput { - s.VpnGateway = v - return s -} - -// Describes the credit option for CPU usage of a T2 or T3 instance. -type CreditSpecification struct { - _ struct{} `type:"structure"` - - // The credit option for CPU usage of a T2 or T3 instance. Valid values are - // standard and unlimited. - CpuCredits *string `locationName:"cpuCredits" type:"string"` -} - -// String returns the string representation -func (s CreditSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreditSpecification) GoString() string { - return s.String() -} - -// SetCpuCredits sets the CpuCredits field's value. -func (s *CreditSpecification) SetCpuCredits(v string) *CreditSpecification { - s.CpuCredits = &v - return s -} - -// The credit option for CPU usage of a T2 or T3 instance. -type CreditSpecificationRequest struct { - _ struct{} `type:"structure"` - - // The credit option for CPU usage of a T2 or T3 instance. Valid values are - // standard and unlimited. - // - // CpuCredits is a required field - CpuCredits *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreditSpecificationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreditSpecificationRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreditSpecificationRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreditSpecificationRequest"} - if s.CpuCredits == nil { - invalidParams.Add(request.NewErrParamRequired("CpuCredits")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCpuCredits sets the CpuCredits field's value. -func (s *CreditSpecificationRequest) SetCpuCredits(v string) *CreditSpecificationRequest { - s.CpuCredits = &v - return s -} - -// Describes a customer gateway. -type CustomerGateway struct { - _ struct{} `type:"structure"` - - // The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number - // (ASN). - BgpAsn *string `locationName:"bgpAsn" type:"string"` - - // The ID of the customer gateway. - CustomerGatewayId *string `locationName:"customerGatewayId" type:"string"` - - // The Internet-routable IP address of the customer gateway's outside interface. - IpAddress *string `locationName:"ipAddress" type:"string"` - - // The current state of the customer gateway (pending | available | deleting - // | deleted). - State *string `locationName:"state" type:"string"` - - // Any tags assigned to the customer gateway. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The type of VPN connection the customer gateway supports (ipsec.1). - Type *string `locationName:"type" type:"string"` -} - -// String returns the string representation -func (s CustomerGateway) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CustomerGateway) GoString() string { - return s.String() -} - -// SetBgpAsn sets the BgpAsn field's value. -func (s *CustomerGateway) SetBgpAsn(v string) *CustomerGateway { - s.BgpAsn = &v - return s -} - -// SetCustomerGatewayId sets the CustomerGatewayId field's value. -func (s *CustomerGateway) SetCustomerGatewayId(v string) *CustomerGateway { - s.CustomerGatewayId = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *CustomerGateway) SetIpAddress(v string) *CustomerGateway { - s.IpAddress = &v - return s -} - -// SetState sets the State field's value. -func (s *CustomerGateway) SetState(v string) *CustomerGateway { - s.State = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CustomerGateway) SetTags(v []*Tag) *CustomerGateway { - s.Tags = v - return s -} - -// SetType sets the Type field's value. -func (s *CustomerGateway) SetType(v string) *CustomerGateway { - s.Type = &v - return s -} - -type DeleteClientVpnEndpointInput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN to be deleted. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeleteClientVpnEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClientVpnEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClientVpnEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClientVpnEndpointInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *DeleteClientVpnEndpointInput) SetClientVpnEndpointId(v string) *DeleteClientVpnEndpointInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteClientVpnEndpointInput) SetDryRun(v bool) *DeleteClientVpnEndpointInput { - s.DryRun = &v - return s -} - -type DeleteClientVpnEndpointOutput struct { - _ struct{} `type:"structure"` - - // The current state of the Client VPN endpoint. - Status *ClientVpnEndpointStatus `locationName:"status" type:"structure"` -} - -// String returns the string representation -func (s DeleteClientVpnEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClientVpnEndpointOutput) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *DeleteClientVpnEndpointOutput) SetStatus(v *ClientVpnEndpointStatus) *DeleteClientVpnEndpointOutput { - s.Status = v - return s -} - -type DeleteClientVpnRouteInput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint from which the route is to be deleted. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // The IPv4 address range, in CIDR notation, of the route to be deleted. - // - // DestinationCidrBlock is a required field - DestinationCidrBlock *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the target subnet used by the route. - TargetVpcSubnetId *string `type:"string"` -} - -// String returns the string representation -func (s DeleteClientVpnRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClientVpnRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClientVpnRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClientVpnRouteInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - if s.DestinationCidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *DeleteClientVpnRouteInput) SetClientVpnEndpointId(v string) *DeleteClientVpnRouteInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *DeleteClientVpnRouteInput) SetDestinationCidrBlock(v string) *DeleteClientVpnRouteInput { - s.DestinationCidrBlock = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteClientVpnRouteInput) SetDryRun(v bool) *DeleteClientVpnRouteInput { - s.DryRun = &v - return s -} - -// SetTargetVpcSubnetId sets the TargetVpcSubnetId field's value. -func (s *DeleteClientVpnRouteInput) SetTargetVpcSubnetId(v string) *DeleteClientVpnRouteInput { - s.TargetVpcSubnetId = &v - return s -} - -type DeleteClientVpnRouteOutput struct { - _ struct{} `type:"structure"` - - // The current state of the route. - Status *ClientVpnRouteStatus `locationName:"status" type:"structure"` -} - -// String returns the string representation -func (s DeleteClientVpnRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClientVpnRouteOutput) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *DeleteClientVpnRouteOutput) SetStatus(v *ClientVpnRouteStatus) *DeleteClientVpnRouteOutput { - s.Status = v - return s -} - -// Contains the parameters for DeleteCustomerGateway. -type DeleteCustomerGatewayInput struct { - _ struct{} `type:"structure"` - - // The ID of the customer gateway. - // - // CustomerGatewayId is a required field - CustomerGatewayId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` -} - -// String returns the string representation -func (s DeleteCustomerGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCustomerGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCustomerGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCustomerGatewayInput"} - if s.CustomerGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("CustomerGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomerGatewayId sets the CustomerGatewayId field's value. -func (s *DeleteCustomerGatewayInput) SetCustomerGatewayId(v string) *DeleteCustomerGatewayInput { - s.CustomerGatewayId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteCustomerGatewayInput) SetDryRun(v bool) *DeleteCustomerGatewayInput { - s.DryRun = &v - return s -} - -type DeleteCustomerGatewayOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCustomerGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCustomerGatewayOutput) GoString() string { - return s.String() -} - -type DeleteDhcpOptionsInput struct { - _ struct{} `type:"structure"` - - // The ID of the DHCP options set. - // - // DhcpOptionsId is a required field - DhcpOptionsId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` -} - -// String returns the string representation -func (s DeleteDhcpOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDhcpOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDhcpOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDhcpOptionsInput"} - if s.DhcpOptionsId == nil { - invalidParams.Add(request.NewErrParamRequired("DhcpOptionsId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDhcpOptionsId sets the DhcpOptionsId field's value. -func (s *DeleteDhcpOptionsInput) SetDhcpOptionsId(v string) *DeleteDhcpOptionsInput { - s.DhcpOptionsId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteDhcpOptionsInput) SetDryRun(v bool) *DeleteDhcpOptionsInput { - s.DryRun = &v - return s -} - -type DeleteDhcpOptionsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDhcpOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDhcpOptionsOutput) GoString() string { - return s.String() -} - -type DeleteEgressOnlyInternetGatewayInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the egress-only internet gateway. - // - // EgressOnlyInternetGatewayId is a required field - EgressOnlyInternetGatewayId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEgressOnlyInternetGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEgressOnlyInternetGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEgressOnlyInternetGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEgressOnlyInternetGatewayInput"} - if s.EgressOnlyInternetGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("EgressOnlyInternetGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteEgressOnlyInternetGatewayInput) SetDryRun(v bool) *DeleteEgressOnlyInternetGatewayInput { - s.DryRun = &v - return s -} - -// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. -func (s *DeleteEgressOnlyInternetGatewayInput) SetEgressOnlyInternetGatewayId(v string) *DeleteEgressOnlyInternetGatewayInput { - s.EgressOnlyInternetGatewayId = &v - return s -} - -type DeleteEgressOnlyInternetGatewayOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - ReturnCode *bool `locationName:"returnCode" type:"boolean"` -} - -// String returns the string representation -func (s DeleteEgressOnlyInternetGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEgressOnlyInternetGatewayOutput) GoString() string { - return s.String() -} - -// SetReturnCode sets the ReturnCode field's value. -func (s *DeleteEgressOnlyInternetGatewayOutput) SetReturnCode(v bool) *DeleteEgressOnlyInternetGatewayOutput { - s.ReturnCode = &v - return s -} - -// Describes an EC2 Fleet error. -type DeleteFleetError struct { - _ struct{} `type:"structure"` - - // The error code. - Code *string `locationName:"code" type:"string" enum:"DeleteFleetErrorCode"` - - // The description for the error code. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s DeleteFleetError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFleetError) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *DeleteFleetError) SetCode(v string) *DeleteFleetError { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *DeleteFleetError) SetMessage(v string) *DeleteFleetError { - s.Message = &v - return s -} - -// Describes an EC2 Fleet that was not successfully deleted. -type DeleteFleetErrorItem struct { - _ struct{} `type:"structure"` - - // The error. - Error *DeleteFleetError `locationName:"error" type:"structure"` - - // The ID of the EC2 Fleet. - FleetId *string `locationName:"fleetId" type:"string"` -} - -// String returns the string representation -func (s DeleteFleetErrorItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFleetErrorItem) GoString() string { - return s.String() -} - -// SetError sets the Error field's value. -func (s *DeleteFleetErrorItem) SetError(v *DeleteFleetError) *DeleteFleetErrorItem { - s.Error = v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *DeleteFleetErrorItem) SetFleetId(v string) *DeleteFleetErrorItem { - s.FleetId = &v - return s -} - -// Describes an EC2 Fleet that was successfully deleted. -type DeleteFleetSuccessItem struct { - _ struct{} `type:"structure"` - - // The current state of the EC2 Fleet. - CurrentFleetState *string `locationName:"currentFleetState" type:"string" enum:"FleetStateCode"` - - // The ID of the EC2 Fleet. - FleetId *string `locationName:"fleetId" type:"string"` - - // The previous state of the EC2 Fleet. - PreviousFleetState *string `locationName:"previousFleetState" type:"string" enum:"FleetStateCode"` -} - -// String returns the string representation -func (s DeleteFleetSuccessItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFleetSuccessItem) GoString() string { - return s.String() -} - -// SetCurrentFleetState sets the CurrentFleetState field's value. -func (s *DeleteFleetSuccessItem) SetCurrentFleetState(v string) *DeleteFleetSuccessItem { - s.CurrentFleetState = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *DeleteFleetSuccessItem) SetFleetId(v string) *DeleteFleetSuccessItem { - s.FleetId = &v - return s -} - -// SetPreviousFleetState sets the PreviousFleetState field's value. -func (s *DeleteFleetSuccessItem) SetPreviousFleetState(v string) *DeleteFleetSuccessItem { - s.PreviousFleetState = &v - return s -} - -type DeleteFleetsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The IDs of the EC2 Fleets. - // - // FleetIds is a required field - FleetIds []*string `locationName:"FleetId" type:"list" required:"true"` - - // Indicates whether to terminate instances for an EC2 Fleet if it is deleted - // successfully. - // - // TerminateInstances is a required field - TerminateInstances *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s DeleteFleetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFleetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFleetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFleetsInput"} - if s.FleetIds == nil { - invalidParams.Add(request.NewErrParamRequired("FleetIds")) - } - if s.TerminateInstances == nil { - invalidParams.Add(request.NewErrParamRequired("TerminateInstances")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteFleetsInput) SetDryRun(v bool) *DeleteFleetsInput { - s.DryRun = &v - return s -} - -// SetFleetIds sets the FleetIds field's value. -func (s *DeleteFleetsInput) SetFleetIds(v []*string) *DeleteFleetsInput { - s.FleetIds = v - return s -} - -// SetTerminateInstances sets the TerminateInstances field's value. -func (s *DeleteFleetsInput) SetTerminateInstances(v bool) *DeleteFleetsInput { - s.TerminateInstances = &v - return s -} - -type DeleteFleetsOutput struct { - _ struct{} `type:"structure"` - - // Information about the EC2 Fleets that are successfully deleted. - SuccessfulFleetDeletions []*DeleteFleetSuccessItem `locationName:"successfulFleetDeletionSet" locationNameList:"item" type:"list"` - - // Information about the EC2 Fleets that are not successfully deleted. - UnsuccessfulFleetDeletions []*DeleteFleetErrorItem `locationName:"unsuccessfulFleetDeletionSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DeleteFleetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFleetsOutput) GoString() string { - return s.String() -} - -// SetSuccessfulFleetDeletions sets the SuccessfulFleetDeletions field's value. -func (s *DeleteFleetsOutput) SetSuccessfulFleetDeletions(v []*DeleteFleetSuccessItem) *DeleteFleetsOutput { - s.SuccessfulFleetDeletions = v - return s -} - -// SetUnsuccessfulFleetDeletions sets the UnsuccessfulFleetDeletions field's value. -func (s *DeleteFleetsOutput) SetUnsuccessfulFleetDeletions(v []*DeleteFleetErrorItem) *DeleteFleetsOutput { - s.UnsuccessfulFleetDeletions = v - return s -} - -type DeleteFlowLogsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more flow log IDs. - // - // FlowLogIds is a required field - FlowLogIds []*string `locationName:"FlowLogId" locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteFlowLogsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFlowLogsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFlowLogsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFlowLogsInput"} - if s.FlowLogIds == nil { - invalidParams.Add(request.NewErrParamRequired("FlowLogIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteFlowLogsInput) SetDryRun(v bool) *DeleteFlowLogsInput { - s.DryRun = &v - return s -} - -// SetFlowLogIds sets the FlowLogIds field's value. -func (s *DeleteFlowLogsInput) SetFlowLogIds(v []*string) *DeleteFlowLogsInput { - s.FlowLogIds = v - return s -} - -type DeleteFlowLogsOutput struct { - _ struct{} `type:"structure"` - - // Information about the flow logs that could not be deleted successfully. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DeleteFlowLogsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFlowLogsOutput) GoString() string { - return s.String() -} - -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *DeleteFlowLogsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteFlowLogsOutput { - s.Unsuccessful = v - return s -} - -type DeleteFpgaImageInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the AFI. - // - // FpgaImageId is a required field - FpgaImageId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteFpgaImageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFpgaImageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFpgaImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFpgaImageInput"} - if s.FpgaImageId == nil { - invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteFpgaImageInput) SetDryRun(v bool) *DeleteFpgaImageInput { - s.DryRun = &v - return s -} - -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *DeleteFpgaImageInput) SetFpgaImageId(v string) *DeleteFpgaImageInput { - s.FpgaImageId = &v - return s -} - -type DeleteFpgaImageOutput struct { - _ struct{} `type:"structure"` - - // Is true if the request succeeds, and an error otherwise. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s DeleteFpgaImageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFpgaImageOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *DeleteFpgaImageOutput) SetReturn(v bool) *DeleteFpgaImageOutput { - s.Return = &v - return s -} - -type DeleteInternetGatewayInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the internet gateway. - // - // InternetGatewayId is a required field - InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteInternetGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInternetGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInternetGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInternetGatewayInput"} - if s.InternetGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("InternetGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteInternetGatewayInput) SetDryRun(v bool) *DeleteInternetGatewayInput { - s.DryRun = &v - return s -} - -// SetInternetGatewayId sets the InternetGatewayId field's value. -func (s *DeleteInternetGatewayInput) SetInternetGatewayId(v string) *DeleteInternetGatewayInput { - s.InternetGatewayId = &v - return s -} - -type DeleteInternetGatewayOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteInternetGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInternetGatewayOutput) GoString() string { - return s.String() -} - -type DeleteKeyPairInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The name of the key pair. - // - // KeyName is a required field - KeyName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteKeyPairInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteKeyPairInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteKeyPairInput"} - if s.KeyName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteKeyPairInput) SetDryRun(v bool) *DeleteKeyPairInput { - s.DryRun = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *DeleteKeyPairInput) SetKeyName(v string) *DeleteKeyPairInput { - s.KeyName = &v - return s -} - -type DeleteKeyPairOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteKeyPairOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteKeyPairOutput) GoString() string { - return s.String() -} - -type DeleteLaunchTemplateInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateId *string `type:"string"` - - // The name of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateName *string `min:"3" type:"string"` -} - -// String returns the string representation -func (s DeleteLaunchTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLaunchTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLaunchTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLaunchTemplateInput"} - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteLaunchTemplateInput) SetDryRun(v bool) *DeleteLaunchTemplateInput { - s.DryRun = &v - return s -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *DeleteLaunchTemplateInput) SetLaunchTemplateId(v string) *DeleteLaunchTemplateInput { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *DeleteLaunchTemplateInput) SetLaunchTemplateName(v string) *DeleteLaunchTemplateInput { - s.LaunchTemplateName = &v - return s -} - -type DeleteLaunchTemplateOutput struct { - _ struct{} `type:"structure"` - - // Information about the launch template. - LaunchTemplate *LaunchTemplate `locationName:"launchTemplate" type:"structure"` -} - -// String returns the string representation -func (s DeleteLaunchTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLaunchTemplateOutput) GoString() string { - return s.String() -} - -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *DeleteLaunchTemplateOutput) SetLaunchTemplate(v *LaunchTemplate) *DeleteLaunchTemplateOutput { - s.LaunchTemplate = v - return s -} - -type DeleteLaunchTemplateVersionsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateId *string `type:"string"` - - // The name of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateName *string `min:"3" type:"string"` - - // The version numbers of one or more launch template versions to delete. - // - // Versions is a required field - Versions []*string `locationName:"LaunchTemplateVersion" locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteLaunchTemplateVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLaunchTemplateVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLaunchTemplateVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLaunchTemplateVersionsInput"} - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - if s.Versions == nil { - invalidParams.Add(request.NewErrParamRequired("Versions")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteLaunchTemplateVersionsInput) SetDryRun(v bool) *DeleteLaunchTemplateVersionsInput { - s.DryRun = &v - return s -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *DeleteLaunchTemplateVersionsInput) SetLaunchTemplateId(v string) *DeleteLaunchTemplateVersionsInput { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *DeleteLaunchTemplateVersionsInput) SetLaunchTemplateName(v string) *DeleteLaunchTemplateVersionsInput { - s.LaunchTemplateName = &v - return s -} - -// SetVersions sets the Versions field's value. -func (s *DeleteLaunchTemplateVersionsInput) SetVersions(v []*string) *DeleteLaunchTemplateVersionsInput { - s.Versions = v - return s -} - -type DeleteLaunchTemplateVersionsOutput struct { - _ struct{} `type:"structure"` - - // Information about the launch template versions that were successfully deleted. - SuccessfullyDeletedLaunchTemplateVersions []*DeleteLaunchTemplateVersionsResponseSuccessItem `locationName:"successfullyDeletedLaunchTemplateVersionSet" locationNameList:"item" type:"list"` - - // Information about the launch template versions that could not be deleted. - UnsuccessfullyDeletedLaunchTemplateVersions []*DeleteLaunchTemplateVersionsResponseErrorItem `locationName:"unsuccessfullyDeletedLaunchTemplateVersionSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DeleteLaunchTemplateVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLaunchTemplateVersionsOutput) GoString() string { - return s.String() -} - -// SetSuccessfullyDeletedLaunchTemplateVersions sets the SuccessfullyDeletedLaunchTemplateVersions field's value. -func (s *DeleteLaunchTemplateVersionsOutput) SetSuccessfullyDeletedLaunchTemplateVersions(v []*DeleteLaunchTemplateVersionsResponseSuccessItem) *DeleteLaunchTemplateVersionsOutput { - s.SuccessfullyDeletedLaunchTemplateVersions = v - return s -} - -// SetUnsuccessfullyDeletedLaunchTemplateVersions sets the UnsuccessfullyDeletedLaunchTemplateVersions field's value. -func (s *DeleteLaunchTemplateVersionsOutput) SetUnsuccessfullyDeletedLaunchTemplateVersions(v []*DeleteLaunchTemplateVersionsResponseErrorItem) *DeleteLaunchTemplateVersionsOutput { - s.UnsuccessfullyDeletedLaunchTemplateVersions = v - return s -} - -// Describes a launch template version that could not be deleted. -type DeleteLaunchTemplateVersionsResponseErrorItem struct { - _ struct{} `type:"structure"` - - // The ID of the launch template. - LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` - - // The name of the launch template. - LaunchTemplateName *string `locationName:"launchTemplateName" type:"string"` - - // Information about the error. - ResponseError *ResponseError `locationName:"responseError" type:"structure"` - - // The version number of the launch template. - VersionNumber *int64 `locationName:"versionNumber" type:"long"` -} - -// String returns the string representation -func (s DeleteLaunchTemplateVersionsResponseErrorItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLaunchTemplateVersionsResponseErrorItem) GoString() string { - return s.String() -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetLaunchTemplateId(v string) *DeleteLaunchTemplateVersionsResponseErrorItem { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetLaunchTemplateName(v string) *DeleteLaunchTemplateVersionsResponseErrorItem { - s.LaunchTemplateName = &v - return s -} - -// SetResponseError sets the ResponseError field's value. -func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetResponseError(v *ResponseError) *DeleteLaunchTemplateVersionsResponseErrorItem { - s.ResponseError = v - return s -} - -// SetVersionNumber sets the VersionNumber field's value. -func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetVersionNumber(v int64) *DeleteLaunchTemplateVersionsResponseErrorItem { - s.VersionNumber = &v - return s -} - -// Describes a launch template version that was successfully deleted. -type DeleteLaunchTemplateVersionsResponseSuccessItem struct { - _ struct{} `type:"structure"` - - // The ID of the launch template. - LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` - - // The name of the launch template. - LaunchTemplateName *string `locationName:"launchTemplateName" type:"string"` - - // The version number of the launch template. - VersionNumber *int64 `locationName:"versionNumber" type:"long"` -} - -// String returns the string representation -func (s DeleteLaunchTemplateVersionsResponseSuccessItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLaunchTemplateVersionsResponseSuccessItem) GoString() string { - return s.String() -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *DeleteLaunchTemplateVersionsResponseSuccessItem) SetLaunchTemplateId(v string) *DeleteLaunchTemplateVersionsResponseSuccessItem { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *DeleteLaunchTemplateVersionsResponseSuccessItem) SetLaunchTemplateName(v string) *DeleteLaunchTemplateVersionsResponseSuccessItem { - s.LaunchTemplateName = &v - return s -} - -// SetVersionNumber sets the VersionNumber field's value. -func (s *DeleteLaunchTemplateVersionsResponseSuccessItem) SetVersionNumber(v int64) *DeleteLaunchTemplateVersionsResponseSuccessItem { - s.VersionNumber = &v - return s -} - -type DeleteNatGatewayInput struct { - _ struct{} `type:"structure"` - - // The ID of the NAT gateway. - // - // NatGatewayId is a required field - NatGatewayId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteNatGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNatGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNatGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNatGatewayInput"} - if s.NatGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("NatGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNatGatewayId sets the NatGatewayId field's value. -func (s *DeleteNatGatewayInput) SetNatGatewayId(v string) *DeleteNatGatewayInput { - s.NatGatewayId = &v - return s -} - -type DeleteNatGatewayOutput struct { - _ struct{} `type:"structure"` - - // The ID of the NAT gateway. - NatGatewayId *string `locationName:"natGatewayId" type:"string"` -} - -// String returns the string representation -func (s DeleteNatGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNatGatewayOutput) GoString() string { - return s.String() -} - -// SetNatGatewayId sets the NatGatewayId field's value. -func (s *DeleteNatGatewayOutput) SetNatGatewayId(v string) *DeleteNatGatewayOutput { - s.NatGatewayId = &v - return s -} - -type DeleteNetworkAclEntryInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Indicates whether the rule is an egress rule. - // - // Egress is a required field - Egress *bool `locationName:"egress" type:"boolean" required:"true"` - - // The ID of the network ACL. - // - // NetworkAclId is a required field - NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` - - // The rule number of the entry to delete. - // - // RuleNumber is a required field - RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"` -} - -// String returns the string representation -func (s DeleteNetworkAclEntryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNetworkAclEntryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNetworkAclEntryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkAclEntryInput"} - if s.Egress == nil { - invalidParams.Add(request.NewErrParamRequired("Egress")) - } - if s.NetworkAclId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) - } - if s.RuleNumber == nil { - invalidParams.Add(request.NewErrParamRequired("RuleNumber")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteNetworkAclEntryInput) SetDryRun(v bool) *DeleteNetworkAclEntryInput { - s.DryRun = &v - return s -} - -// SetEgress sets the Egress field's value. -func (s *DeleteNetworkAclEntryInput) SetEgress(v bool) *DeleteNetworkAclEntryInput { - s.Egress = &v - return s -} - -// SetNetworkAclId sets the NetworkAclId field's value. -func (s *DeleteNetworkAclEntryInput) SetNetworkAclId(v string) *DeleteNetworkAclEntryInput { - s.NetworkAclId = &v - return s -} - -// SetRuleNumber sets the RuleNumber field's value. -func (s *DeleteNetworkAclEntryInput) SetRuleNumber(v int64) *DeleteNetworkAclEntryInput { - s.RuleNumber = &v - return s -} - -type DeleteNetworkAclEntryOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteNetworkAclEntryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNetworkAclEntryOutput) GoString() string { - return s.String() -} - -type DeleteNetworkAclInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the network ACL. - // - // NetworkAclId is a required field - NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteNetworkAclInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNetworkAclInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNetworkAclInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkAclInput"} - if s.NetworkAclId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteNetworkAclInput) SetDryRun(v bool) *DeleteNetworkAclInput { - s.DryRun = &v - return s -} - -// SetNetworkAclId sets the NetworkAclId field's value. -func (s *DeleteNetworkAclInput) SetNetworkAclId(v string) *DeleteNetworkAclInput { - s.NetworkAclId = &v - return s -} - -type DeleteNetworkAclOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteNetworkAclOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNetworkAclOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DeleteNetworkInterface. -type DeleteNetworkInterfaceInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the network interface. - // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteNetworkInterfaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNetworkInterfaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNetworkInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkInterfaceInput"} - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteNetworkInterfaceInput) SetDryRun(v bool) *DeleteNetworkInterfaceInput { - s.DryRun = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *DeleteNetworkInterfaceInput) SetNetworkInterfaceId(v string) *DeleteNetworkInterfaceInput { - s.NetworkInterfaceId = &v - return s -} - -type DeleteNetworkInterfaceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteNetworkInterfaceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNetworkInterfaceOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DeleteNetworkInterfacePermission. -type DeleteNetworkInterfacePermissionInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // Specify true to remove the permission even if the network interface is attached - // to an instance. - Force *bool `type:"boolean"` - - // The ID of the network interface permission. - // - // NetworkInterfacePermissionId is a required field - NetworkInterfacePermissionId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteNetworkInterfacePermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNetworkInterfacePermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNetworkInterfacePermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkInterfacePermissionInput"} - if s.NetworkInterfacePermissionId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfacePermissionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteNetworkInterfacePermissionInput) SetDryRun(v bool) *DeleteNetworkInterfacePermissionInput { - s.DryRun = &v - return s -} - -// SetForce sets the Force field's value. -func (s *DeleteNetworkInterfacePermissionInput) SetForce(v bool) *DeleteNetworkInterfacePermissionInput { - s.Force = &v - return s -} - -// SetNetworkInterfacePermissionId sets the NetworkInterfacePermissionId field's value. -func (s *DeleteNetworkInterfacePermissionInput) SetNetworkInterfacePermissionId(v string) *DeleteNetworkInterfacePermissionInput { - s.NetworkInterfacePermissionId = &v - return s -} - -// Contains the output for DeleteNetworkInterfacePermission. -type DeleteNetworkInterfacePermissionOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds, otherwise returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s DeleteNetworkInterfacePermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNetworkInterfacePermissionOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *DeleteNetworkInterfacePermissionOutput) SetReturn(v bool) *DeleteNetworkInterfacePermissionOutput { - s.Return = &v - return s -} - -type DeletePlacementGroupInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The name of the placement group. - // - // GroupName is a required field - GroupName *string `locationName:"groupName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePlacementGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePlacementGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePlacementGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePlacementGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeletePlacementGroupInput) SetDryRun(v bool) *DeletePlacementGroupInput { - s.DryRun = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *DeletePlacementGroupInput) SetGroupName(v string) *DeletePlacementGroupInput { - s.GroupName = &v - return s -} - -type DeletePlacementGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePlacementGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePlacementGroupOutput) GoString() string { - return s.String() -} - -type DeleteRouteInput struct { - _ struct{} `type:"structure"` - - // The IPv4 CIDR range for the route. The value you specify must match the CIDR - // for the route exactly. - DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` - - // The IPv6 CIDR range for the route. The value you specify must match the CIDR - // for the route exactly. - DestinationIpv6CidrBlock *string `locationName:"destinationIpv6CidrBlock" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the route table. - // - // RouteTableId is a required field - RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRouteInput"} - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *DeleteRouteInput) SetDestinationCidrBlock(v string) *DeleteRouteInput { - s.DestinationCidrBlock = &v - return s -} - -// SetDestinationIpv6CidrBlock sets the DestinationIpv6CidrBlock field's value. -func (s *DeleteRouteInput) SetDestinationIpv6CidrBlock(v string) *DeleteRouteInput { - s.DestinationIpv6CidrBlock = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteRouteInput) SetDryRun(v bool) *DeleteRouteInput { - s.DryRun = &v - return s -} - -// SetRouteTableId sets the RouteTableId field's value. -func (s *DeleteRouteInput) SetRouteTableId(v string) *DeleteRouteInput { - s.RouteTableId = &v - return s -} - -type DeleteRouteOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRouteOutput) GoString() string { - return s.String() -} - -type DeleteRouteTableInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the route table. - // - // RouteTableId is a required field - RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRouteTableInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRouteTableInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRouteTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRouteTableInput"} - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteRouteTableInput) SetDryRun(v bool) *DeleteRouteTableInput { - s.DryRun = &v - return s -} - -// SetRouteTableId sets the RouteTableId field's value. -func (s *DeleteRouteTableInput) SetRouteTableId(v string) *DeleteRouteTableInput { - s.RouteTableId = &v - return s -} - -type DeleteRouteTableOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRouteTableOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRouteTableOutput) GoString() string { - return s.String() -} - -type DeleteSecurityGroupInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the security group. Required for a nondefault VPC. - GroupId *string `type:"string"` - - // [EC2-Classic, default VPC] The name of the security group. You can specify - // either the security group name or the security group ID. - GroupName *string `type:"string"` -} - -// String returns the string representation -func (s DeleteSecurityGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSecurityGroupInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteSecurityGroupInput) SetDryRun(v bool) *DeleteSecurityGroupInput { - s.DryRun = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *DeleteSecurityGroupInput) SetGroupId(v string) *DeleteSecurityGroupInput { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *DeleteSecurityGroupInput) SetGroupName(v string) *DeleteSecurityGroupInput { - s.GroupName = &v - return s -} - -type DeleteSecurityGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteSecurityGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSecurityGroupOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DeleteSnapshot. -type DeleteSnapshotInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the EBS snapshot. - // - // SnapshotId is a required field - SnapshotId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotInput"} - if s.SnapshotId == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteSnapshotInput) SetDryRun(v bool) *DeleteSnapshotInput { - s.DryRun = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *DeleteSnapshotInput) SetSnapshotId(v string) *DeleteSnapshotInput { - s.SnapshotId = &v - return s -} - -type DeleteSnapshotOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSnapshotOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DeleteSpotDatafeedSubscription. -type DeleteSpotDatafeedSubscriptionInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` -} - -// String returns the string representation -func (s DeleteSpotDatafeedSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSpotDatafeedSubscriptionInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteSpotDatafeedSubscriptionInput) SetDryRun(v bool) *DeleteSpotDatafeedSubscriptionInput { - s.DryRun = &v - return s -} - -type DeleteSpotDatafeedSubscriptionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteSpotDatafeedSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSpotDatafeedSubscriptionOutput) GoString() string { - return s.String() -} - -type DeleteSubnetInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the subnet. - // - // SubnetId is a required field - SubnetId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSubnetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSubnetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSubnetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSubnetInput"} - if s.SubnetId == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteSubnetInput) SetDryRun(v bool) *DeleteSubnetInput { - s.DryRun = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *DeleteSubnetInput) SetSubnetId(v string) *DeleteSubnetInput { - s.SubnetId = &v - return s -} - -type DeleteSubnetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteSubnetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSubnetOutput) GoString() string { - return s.String() -} - -type DeleteTagsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The IDs of one or more resources, separated by spaces. - // - // Constraints: Up to 1000 resource IDs. We recommend breaking up this request - // into smaller batches. - // - // Resources is a required field - Resources []*string `locationName:"resourceId" type:"list" required:"true"` - - // One or more tags to delete. Specify a tag key and an optional tag value to - // delete specific tags. If you specify a tag key without a tag value, we delete - // any tag with this key regardless of its value. If you specify a tag key with - // an empty string as the tag value, we delete the tag only if its value is - // an empty string. - // - // If you omit this parameter, we delete all user-defined tags for the specified - // resources. We do not delete AWS-generated tags (tags that have the aws: prefix). - Tags []*Tag `locationName:"tag" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DeleteTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} - if s.Resources == nil { - invalidParams.Add(request.NewErrParamRequired("Resources")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteTagsInput) SetDryRun(v bool) *DeleteTagsInput { - s.DryRun = &v - return s -} - -// SetResources sets the Resources field's value. -func (s *DeleteTagsInput) SetResources(v []*string) *DeleteTagsInput { - s.Resources = v - return s -} - -// SetTags sets the Tags field's value. -func (s *DeleteTagsInput) SetTags(v []*Tag) *DeleteTagsInput { - s.Tags = v - return s -} - -type DeleteTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagsOutput) GoString() string { - return s.String() -} - -type DeleteTransitGatewayInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the transit gateway. - // - // TransitGatewayId is a required field - TransitGatewayId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTransitGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTransitGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTransitGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTransitGatewayInput"} - if s.TransitGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteTransitGatewayInput) SetDryRun(v bool) *DeleteTransitGatewayInput { - s.DryRun = &v - return s -} - -// SetTransitGatewayId sets the TransitGatewayId field's value. -func (s *DeleteTransitGatewayInput) SetTransitGatewayId(v string) *DeleteTransitGatewayInput { - s.TransitGatewayId = &v - return s -} - -type DeleteTransitGatewayOutput struct { - _ struct{} `type:"structure"` - - // Information about the deleted transit gateway. - TransitGateway *TransitGateway `locationName:"transitGateway" type:"structure"` -} - -// String returns the string representation -func (s DeleteTransitGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTransitGatewayOutput) GoString() string { - return s.String() -} - -// SetTransitGateway sets the TransitGateway field's value. -func (s *DeleteTransitGatewayOutput) SetTransitGateway(v *TransitGateway) *DeleteTransitGatewayOutput { - s.TransitGateway = v - return s -} - -type DeleteTransitGatewayRouteInput struct { - _ struct{} `type:"structure"` - - // The CIDR range for the route. This must match the CIDR for the route exactly. - // - // DestinationCidrBlock is a required field - DestinationCidrBlock *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the transit gateway route table. - // - // TransitGatewayRouteTableId is a required field - TransitGatewayRouteTableId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTransitGatewayRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTransitGatewayRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTransitGatewayRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTransitGatewayRouteInput"} - if s.DestinationCidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) - } - if s.TransitGatewayRouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *DeleteTransitGatewayRouteInput) SetDestinationCidrBlock(v string) *DeleteTransitGatewayRouteInput { - s.DestinationCidrBlock = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteTransitGatewayRouteInput) SetDryRun(v bool) *DeleteTransitGatewayRouteInput { - s.DryRun = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *DeleteTransitGatewayRouteInput) SetTransitGatewayRouteTableId(v string) *DeleteTransitGatewayRouteInput { - s.TransitGatewayRouteTableId = &v - return s -} - -type DeleteTransitGatewayRouteOutput struct { - _ struct{} `type:"structure"` - - // Information about the route. - Route *TransitGatewayRoute `locationName:"route" type:"structure"` -} - -// String returns the string representation -func (s DeleteTransitGatewayRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTransitGatewayRouteOutput) GoString() string { - return s.String() -} - -// SetRoute sets the Route field's value. -func (s *DeleteTransitGatewayRouteOutput) SetRoute(v *TransitGatewayRoute) *DeleteTransitGatewayRouteOutput { - s.Route = v - return s -} - -type DeleteTransitGatewayRouteTableInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the transit gateway route table. - // - // TransitGatewayRouteTableId is a required field - TransitGatewayRouteTableId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTransitGatewayRouteTableInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTransitGatewayRouteTableInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTransitGatewayRouteTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTransitGatewayRouteTableInput"} - if s.TransitGatewayRouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteTransitGatewayRouteTableInput) SetDryRun(v bool) *DeleteTransitGatewayRouteTableInput { - s.DryRun = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *DeleteTransitGatewayRouteTableInput) SetTransitGatewayRouteTableId(v string) *DeleteTransitGatewayRouteTableInput { - s.TransitGatewayRouteTableId = &v - return s -} - -type DeleteTransitGatewayRouteTableOutput struct { - _ struct{} `type:"structure"` - - // Information about the deleted transit gateway route table. - TransitGatewayRouteTable *TransitGatewayRouteTable `locationName:"transitGatewayRouteTable" type:"structure"` -} - -// String returns the string representation -func (s DeleteTransitGatewayRouteTableOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTransitGatewayRouteTableOutput) GoString() string { - return s.String() -} - -// SetTransitGatewayRouteTable sets the TransitGatewayRouteTable field's value. -func (s *DeleteTransitGatewayRouteTableOutput) SetTransitGatewayRouteTable(v *TransitGatewayRouteTable) *DeleteTransitGatewayRouteTableOutput { - s.TransitGatewayRouteTable = v - return s -} - -type DeleteTransitGatewayVpcAttachmentInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the attachment. - // - // TransitGatewayAttachmentId is a required field - TransitGatewayAttachmentId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTransitGatewayVpcAttachmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTransitGatewayVpcAttachmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTransitGatewayVpcAttachmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTransitGatewayVpcAttachmentInput"} - if s.TransitGatewayAttachmentId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteTransitGatewayVpcAttachmentInput) SetDryRun(v bool) *DeleteTransitGatewayVpcAttachmentInput { - s.DryRun = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *DeleteTransitGatewayVpcAttachmentInput) SetTransitGatewayAttachmentId(v string) *DeleteTransitGatewayVpcAttachmentInput { - s.TransitGatewayAttachmentId = &v - return s -} - -type DeleteTransitGatewayVpcAttachmentOutput struct { - _ struct{} `type:"structure"` - - // Information about the deleted VPC attachment. - TransitGatewayVpcAttachment *TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachment" type:"structure"` -} - -// String returns the string representation -func (s DeleteTransitGatewayVpcAttachmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTransitGatewayVpcAttachmentOutput) GoString() string { - return s.String() -} - -// SetTransitGatewayVpcAttachment sets the TransitGatewayVpcAttachment field's value. -func (s *DeleteTransitGatewayVpcAttachmentOutput) SetTransitGatewayVpcAttachment(v *TransitGatewayVpcAttachment) *DeleteTransitGatewayVpcAttachmentOutput { - s.TransitGatewayVpcAttachment = v - return s -} - -// Contains the parameters for DeleteVolume. -type DeleteVolumeInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the volume. - // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVolumeInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteVolumeInput) SetDryRun(v bool) *DeleteVolumeInput { - s.DryRun = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *DeleteVolumeInput) SetVolumeId(v string) *DeleteVolumeInput { - s.VolumeId = &v - return s -} - -type DeleteVolumeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteVolumeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVolumeOutput) GoString() string { - return s.String() -} - -type DeleteVpcEndpointConnectionNotificationsInput struct { - _ struct{} `type:"structure"` - - // One or more notification IDs. - // - // ConnectionNotificationIds is a required field - ConnectionNotificationIds []*string `locationName:"ConnectionNotificationId" locationNameList:"item" type:"list" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeleteVpcEndpointConnectionNotificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcEndpointConnectionNotificationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpcEndpointConnectionNotificationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpcEndpointConnectionNotificationsInput"} - if s.ConnectionNotificationIds == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionNotificationIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionNotificationIds sets the ConnectionNotificationIds field's value. -func (s *DeleteVpcEndpointConnectionNotificationsInput) SetConnectionNotificationIds(v []*string) *DeleteVpcEndpointConnectionNotificationsInput { - s.ConnectionNotificationIds = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteVpcEndpointConnectionNotificationsInput) SetDryRun(v bool) *DeleteVpcEndpointConnectionNotificationsInput { - s.DryRun = &v - return s -} - -type DeleteVpcEndpointConnectionNotificationsOutput struct { - _ struct{} `type:"structure"` - - // Information about the notifications that could not be deleted successfully. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DeleteVpcEndpointConnectionNotificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcEndpointConnectionNotificationsOutput) GoString() string { - return s.String() -} - -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *DeleteVpcEndpointConnectionNotificationsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteVpcEndpointConnectionNotificationsOutput { - s.Unsuccessful = v - return s -} - -type DeleteVpcEndpointServiceConfigurationsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The IDs of one or more services. - // - // ServiceIds is a required field - ServiceIds []*string `locationName:"ServiceId" locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteVpcEndpointServiceConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcEndpointServiceConfigurationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpcEndpointServiceConfigurationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpcEndpointServiceConfigurationsInput"} - if s.ServiceIds == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteVpcEndpointServiceConfigurationsInput) SetDryRun(v bool) *DeleteVpcEndpointServiceConfigurationsInput { - s.DryRun = &v - return s -} - -// SetServiceIds sets the ServiceIds field's value. -func (s *DeleteVpcEndpointServiceConfigurationsInput) SetServiceIds(v []*string) *DeleteVpcEndpointServiceConfigurationsInput { - s.ServiceIds = v - return s -} - -type DeleteVpcEndpointServiceConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // Information about the service configurations that were not deleted, if applicable. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DeleteVpcEndpointServiceConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcEndpointServiceConfigurationsOutput) GoString() string { - return s.String() -} - -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *DeleteVpcEndpointServiceConfigurationsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteVpcEndpointServiceConfigurationsOutput { - s.Unsuccessful = v - return s -} - -// Contains the parameters for DeleteVpcEndpoints. -type DeleteVpcEndpointsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more VPC endpoint IDs. - // - // VpcEndpointIds is a required field - VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteVpcEndpointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcEndpointsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpcEndpointsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpcEndpointsInput"} - if s.VpcEndpointIds == nil { - invalidParams.Add(request.NewErrParamRequired("VpcEndpointIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteVpcEndpointsInput) SetDryRun(v bool) *DeleteVpcEndpointsInput { - s.DryRun = &v - return s -} - -// SetVpcEndpointIds sets the VpcEndpointIds field's value. -func (s *DeleteVpcEndpointsInput) SetVpcEndpointIds(v []*string) *DeleteVpcEndpointsInput { - s.VpcEndpointIds = v - return s -} - -// Contains the output of DeleteVpcEndpoints. -type DeleteVpcEndpointsOutput struct { - _ struct{} `type:"structure"` - - // Information about the VPC endpoints that were not successfully deleted. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DeleteVpcEndpointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcEndpointsOutput) GoString() string { - return s.String() -} - -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *DeleteVpcEndpointsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteVpcEndpointsOutput { - s.Unsuccessful = v - return s -} - -type DeleteVpcInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVpcInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpcInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpcInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteVpcInput) SetDryRun(v bool) *DeleteVpcInput { - s.DryRun = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DeleteVpcInput) SetVpcId(v string) *DeleteVpcInput { - s.VpcId = &v - return s -} - -type DeleteVpcOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteVpcOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcOutput) GoString() string { - return s.String() -} - -type DeleteVpcPeeringConnectionInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC peering connection. - // - // VpcPeeringConnectionId is a required field - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVpcPeeringConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcPeeringConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpcPeeringConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpcPeeringConnectionInput"} - if s.VpcPeeringConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcPeeringConnectionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteVpcPeeringConnectionInput) SetDryRun(v bool) *DeleteVpcPeeringConnectionInput { - s.DryRun = &v - return s -} - -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *DeleteVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *DeleteVpcPeeringConnectionInput { - s.VpcPeeringConnectionId = &v - return s -} - -type DeleteVpcPeeringConnectionOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s DeleteVpcPeeringConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcPeeringConnectionOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *DeleteVpcPeeringConnectionOutput) SetReturn(v bool) *DeleteVpcPeeringConnectionOutput { - s.Return = &v - return s -} - -// Contains the parameters for DeleteVpnConnection. -type DeleteVpnConnectionInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPN connection. - // - // VpnConnectionId is a required field - VpnConnectionId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVpnConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpnConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpnConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpnConnectionInput"} - if s.VpnConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("VpnConnectionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteVpnConnectionInput) SetDryRun(v bool) *DeleteVpnConnectionInput { - s.DryRun = &v - return s -} - -// SetVpnConnectionId sets the VpnConnectionId field's value. -func (s *DeleteVpnConnectionInput) SetVpnConnectionId(v string) *DeleteVpnConnectionInput { - s.VpnConnectionId = &v - return s -} - -type DeleteVpnConnectionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteVpnConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpnConnectionOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DeleteVpnConnectionRoute. -type DeleteVpnConnectionRouteInput struct { - _ struct{} `type:"structure"` - - // The CIDR block associated with the local subnet of the customer network. - // - // DestinationCidrBlock is a required field - DestinationCidrBlock *string `type:"string" required:"true"` - - // The ID of the VPN connection. - // - // VpnConnectionId is a required field - VpnConnectionId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVpnConnectionRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpnConnectionRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpnConnectionRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpnConnectionRouteInput"} - if s.DestinationCidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) - } - if s.VpnConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("VpnConnectionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *DeleteVpnConnectionRouteInput) SetDestinationCidrBlock(v string) *DeleteVpnConnectionRouteInput { - s.DestinationCidrBlock = &v - return s -} - -// SetVpnConnectionId sets the VpnConnectionId field's value. -func (s *DeleteVpnConnectionRouteInput) SetVpnConnectionId(v string) *DeleteVpnConnectionRouteInput { - s.VpnConnectionId = &v - return s -} - -type DeleteVpnConnectionRouteOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteVpnConnectionRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpnConnectionRouteOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DeleteVpnGateway. -type DeleteVpnGatewayInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the virtual private gateway. - // - // VpnGatewayId is a required field - VpnGatewayId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVpnGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpnGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpnGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpnGatewayInput"} - if s.VpnGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("VpnGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteVpnGatewayInput) SetDryRun(v bool) *DeleteVpnGatewayInput { - s.DryRun = &v - return s -} - -// SetVpnGatewayId sets the VpnGatewayId field's value. -func (s *DeleteVpnGatewayInput) SetVpnGatewayId(v string) *DeleteVpnGatewayInput { - s.VpnGatewayId = &v - return s -} - -type DeleteVpnGatewayOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteVpnGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpnGatewayOutput) GoString() string { - return s.String() -} - -type DeprovisionByoipCidrInput struct { - _ struct{} `type:"structure"` - - // The public IPv4 address range, in CIDR notation. The prefix must be the same - // prefix that you specified when you provisioned the address range. - // - // Cidr is a required field - Cidr *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeprovisionByoipCidrInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeprovisionByoipCidrInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeprovisionByoipCidrInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeprovisionByoipCidrInput"} - if s.Cidr == nil { - invalidParams.Add(request.NewErrParamRequired("Cidr")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCidr sets the Cidr field's value. -func (s *DeprovisionByoipCidrInput) SetCidr(v string) *DeprovisionByoipCidrInput { - s.Cidr = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DeprovisionByoipCidrInput) SetDryRun(v bool) *DeprovisionByoipCidrInput { - s.DryRun = &v - return s -} - -type DeprovisionByoipCidrOutput struct { - _ struct{} `type:"structure"` - - // Information about the address range. - ByoipCidr *ByoipCidr `locationName:"byoipCidr" type:"structure"` -} - -// String returns the string representation -func (s DeprovisionByoipCidrOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeprovisionByoipCidrOutput) GoString() string { - return s.String() -} - -// SetByoipCidr sets the ByoipCidr field's value. -func (s *DeprovisionByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *DeprovisionByoipCidrOutput { - s.ByoipCidr = v - return s -} - -// Contains the parameters for DeregisterImage. -type DeregisterImageInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the AMI. - // - // ImageId is a required field - ImageId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterImageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterImageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterImageInput"} - if s.ImageId == nil { - invalidParams.Add(request.NewErrParamRequired("ImageId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeregisterImageInput) SetDryRun(v bool) *DeregisterImageInput { - s.DryRun = &v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *DeregisterImageInput) SetImageId(v string) *DeregisterImageInput { - s.ImageId = &v - return s -} - -type DeregisterImageOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeregisterImageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterImageOutput) GoString() string { - return s.String() -} - -type DescribeAccountAttributesInput struct { - _ struct{} `type:"structure"` - - // One or more account attribute names. - AttributeNames []*string `locationName:"attributeName" locationNameList:"attributeName" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` -} - -// String returns the string representation -func (s DescribeAccountAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountAttributesInput) GoString() string { - return s.String() -} - -// SetAttributeNames sets the AttributeNames field's value. -func (s *DescribeAccountAttributesInput) SetAttributeNames(v []*string) *DescribeAccountAttributesInput { - s.AttributeNames = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeAccountAttributesInput) SetDryRun(v bool) *DescribeAccountAttributesInput { - s.DryRun = &v - return s -} - -type DescribeAccountAttributesOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more account attributes. - AccountAttributes []*AccountAttribute `locationName:"accountAttributeSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeAccountAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountAttributesOutput) GoString() string { - return s.String() -} - -// SetAccountAttributes sets the AccountAttributes field's value. -func (s *DescribeAccountAttributesOutput) SetAccountAttributes(v []*AccountAttribute) *DescribeAccountAttributesOutput { - s.AccountAttributes = v - return s -} - -type DescribeAddressesInput struct { - _ struct{} `type:"structure"` - - // [EC2-VPC] One or more allocation IDs. - // - // Default: Describes all your Elastic IP addresses. - AllocationIds []*string `locationName:"AllocationId" locationNameList:"AllocationId" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. Filter names and values are case-sensitive. - // - // * allocation-id - [EC2-VPC] The allocation ID for the address. - // - // * association-id - [EC2-VPC] The association ID for the address. - // - // * domain - Indicates whether the address is for use in EC2-Classic (standard) - // or in a VPC (vpc). - // - // * instance-id - The ID of the instance the address is associated with, - // if any. - // - // * network-interface-id - [EC2-VPC] The ID of the network interface that - // the address is associated with, if any. - // - // * network-interface-owner-id - The AWS account ID of the owner. - // - // * private-ip-address - [EC2-VPC] The private IP address associated with - // the Elastic IP address. - // - // * public-ip - The Elastic IP address. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // [EC2-Classic] One or more Elastic IP addresses. - // - // Default: Describes all your Elastic IP addresses. - PublicIps []*string `locationName:"PublicIp" locationNameList:"PublicIp" type:"list"` -} - -// String returns the string representation -func (s DescribeAddressesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAddressesInput) GoString() string { - return s.String() -} - -// SetAllocationIds sets the AllocationIds field's value. -func (s *DescribeAddressesInput) SetAllocationIds(v []*string) *DescribeAddressesInput { - s.AllocationIds = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeAddressesInput) SetDryRun(v bool) *DescribeAddressesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeAddressesInput) SetFilters(v []*Filter) *DescribeAddressesInput { - s.Filters = v - return s -} - -// SetPublicIps sets the PublicIps field's value. -func (s *DescribeAddressesInput) SetPublicIps(v []*string) *DescribeAddressesInput { - s.PublicIps = v - return s -} - -type DescribeAddressesOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more Elastic IP addresses. - Addresses []*Address `locationName:"addressesSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeAddressesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAddressesOutput) GoString() string { - return s.String() -} - -// SetAddresses sets the Addresses field's value. -func (s *DescribeAddressesOutput) SetAddresses(v []*Address) *DescribeAddressesOutput { - s.Addresses = v - return s -} - -type DescribeAggregateIdFormatInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s DescribeAggregateIdFormatInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAggregateIdFormatInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeAggregateIdFormatInput) SetDryRun(v bool) *DescribeAggregateIdFormatInput { - s.DryRun = &v - return s -} - -type DescribeAggregateIdFormatOutput struct { - _ struct{} `type:"structure"` - - // Information about each resource's ID format. - Statuses []*IdFormat `locationName:"statusSet" locationNameList:"item" type:"list"` - - // Indicates whether all resource types in the region are configured to use - // longer IDs. This value is only true if all users are configured to use longer - // IDs for all resources types in the region. - UseLongIdsAggregated *bool `locationName:"useLongIdsAggregated" type:"boolean"` -} - -// String returns the string representation -func (s DescribeAggregateIdFormatOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAggregateIdFormatOutput) GoString() string { - return s.String() -} - -// SetStatuses sets the Statuses field's value. -func (s *DescribeAggregateIdFormatOutput) SetStatuses(v []*IdFormat) *DescribeAggregateIdFormatOutput { - s.Statuses = v - return s -} - -// SetUseLongIdsAggregated sets the UseLongIdsAggregated field's value. -func (s *DescribeAggregateIdFormatOutput) SetUseLongIdsAggregated(v bool) *DescribeAggregateIdFormatOutput { - s.UseLongIdsAggregated = &v - return s -} - -type DescribeAvailabilityZonesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * message - Information about the Availability Zone. - // - // * region-name - The name of the region for the Availability Zone (for - // example, us-east-1). - // - // * state - The state of the Availability Zone (available | information - // | impaired | unavailable). - // - // * zone-id - The ID of the Availability Zone (for example, use1-az1). - // - // * zone-name - The name of the Availability Zone (for example, us-east-1a). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The IDs of one or more Availability Zones. - ZoneIds []*string `locationName:"ZoneId" locationNameList:"ZoneId" type:"list"` - - // The names of one or more Availability Zones. - ZoneNames []*string `locationName:"ZoneName" locationNameList:"ZoneName" type:"list"` -} - -// String returns the string representation -func (s DescribeAvailabilityZonesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAvailabilityZonesInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeAvailabilityZonesInput) SetDryRun(v bool) *DescribeAvailabilityZonesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeAvailabilityZonesInput) SetFilters(v []*Filter) *DescribeAvailabilityZonesInput { - s.Filters = v - return s -} - -// SetZoneIds sets the ZoneIds field's value. -func (s *DescribeAvailabilityZonesInput) SetZoneIds(v []*string) *DescribeAvailabilityZonesInput { - s.ZoneIds = v - return s -} - -// SetZoneNames sets the ZoneNames field's value. -func (s *DescribeAvailabilityZonesInput) SetZoneNames(v []*string) *DescribeAvailabilityZonesInput { - s.ZoneNames = v - return s -} - -type DescribeAvailabilityZonesOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more Availability Zones. - AvailabilityZones []*AvailabilityZone `locationName:"availabilityZoneInfo" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeAvailabilityZonesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAvailabilityZonesOutput) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DescribeAvailabilityZonesOutput) SetAvailabilityZones(v []*AvailabilityZone) *DescribeAvailabilityZonesOutput { - s.AvailabilityZones = v - return s -} - -// Contains the parameters for DescribeBundleTasks. -type DescribeBundleTasksInput struct { - _ struct{} `type:"structure"` - - // One or more bundle task IDs. - // - // Default: Describes all your bundle tasks. - BundleIds []*string `locationName:"BundleId" locationNameList:"BundleId" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * bundle-id - The ID of the bundle task. - // - // * error-code - If the task failed, the error code returned. - // - // * error-message - If the task failed, the error message returned. - // - // * instance-id - The ID of the instance. - // - // * progress - The level of task completion, as a percentage (for example, - // 20%). - // - // * s3-bucket - The Amazon S3 bucket to store the AMI. - // - // * s3-prefix - The beginning of the AMI name. - // - // * start-time - The time the task started (for example, 2013-09-15T17:15:20.000Z). - // - // * state - The state of the task (pending | waiting-for-shutdown | bundling - // | storing | cancelling | complete | failed). - // - // * update-time - The time of the most recent update for the task. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` -} - -// String returns the string representation -func (s DescribeBundleTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBundleTasksInput) GoString() string { - return s.String() -} - -// SetBundleIds sets the BundleIds field's value. -func (s *DescribeBundleTasksInput) SetBundleIds(v []*string) *DescribeBundleTasksInput { - s.BundleIds = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeBundleTasksInput) SetDryRun(v bool) *DescribeBundleTasksInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeBundleTasksInput) SetFilters(v []*Filter) *DescribeBundleTasksInput { - s.Filters = v - return s -} - -// Contains the output of DescribeBundleTasks. -type DescribeBundleTasksOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more bundle tasks. - BundleTasks []*BundleTask `locationName:"bundleInstanceTasksSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeBundleTasksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBundleTasksOutput) GoString() string { - return s.String() -} - -// SetBundleTasks sets the BundleTasks field's value. -func (s *DescribeBundleTasksOutput) SetBundleTasks(v []*BundleTask) *DescribeBundleTasksOutput { - s.BundleTasks = v - return s -} - -type DescribeByoipCidrsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - // - // MaxResults is a required field - MaxResults *int64 `min:"5" type:"integer" required:"true"` - - // The token for the next page of results. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeByoipCidrsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeByoipCidrsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeByoipCidrsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeByoipCidrsInput"} - if s.MaxResults == nil { - invalidParams.Add(request.NewErrParamRequired("MaxResults")) - } - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeByoipCidrsInput) SetDryRun(v bool) *DescribeByoipCidrsInput { - s.DryRun = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeByoipCidrsInput) SetMaxResults(v int64) *DescribeByoipCidrsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeByoipCidrsInput) SetNextToken(v string) *DescribeByoipCidrsInput { - s.NextToken = &v - return s -} - -type DescribeByoipCidrsOutput struct { - _ struct{} `type:"structure"` - - // Information about your address ranges. - ByoipCidrs []*ByoipCidr `locationName:"byoipCidrSet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeByoipCidrsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeByoipCidrsOutput) GoString() string { - return s.String() -} - -// SetByoipCidrs sets the ByoipCidrs field's value. -func (s *DescribeByoipCidrsOutput) SetByoipCidrs(v []*ByoipCidr) *DescribeByoipCidrsOutput { - s.ByoipCidrs = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeByoipCidrsOutput) SetNextToken(v string) *DescribeByoipCidrsOutput { - s.NextToken = &v - return s -} - -type DescribeCapacityReservationsInput struct { - _ struct{} `type:"structure"` - - // The ID of the Capacity Reservation. - CapacityReservationIds []*string `locationName:"CapacityReservationId" locationNameList:"item" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the returned - // nextToken value. - MaxResults *int64 `type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeCapacityReservationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCapacityReservationsInput) GoString() string { - return s.String() -} - -// SetCapacityReservationIds sets the CapacityReservationIds field's value. -func (s *DescribeCapacityReservationsInput) SetCapacityReservationIds(v []*string) *DescribeCapacityReservationsInput { - s.CapacityReservationIds = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeCapacityReservationsInput) SetDryRun(v bool) *DescribeCapacityReservationsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeCapacityReservationsInput) SetFilters(v []*Filter) *DescribeCapacityReservationsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeCapacityReservationsInput) SetMaxResults(v int64) *DescribeCapacityReservationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeCapacityReservationsInput) SetNextToken(v string) *DescribeCapacityReservationsInput { - s.NextToken = &v - return s -} - -type DescribeCapacityReservationsOutput struct { - _ struct{} `type:"structure"` - - // Information about the Capacity Reservations. - CapacityReservations []*CapacityReservation `locationName:"capacityReservationSet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeCapacityReservationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCapacityReservationsOutput) GoString() string { - return s.String() -} - -// SetCapacityReservations sets the CapacityReservations field's value. -func (s *DescribeCapacityReservationsOutput) SetCapacityReservations(v []*CapacityReservation) *DescribeCapacityReservationsOutput { - s.CapacityReservations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeCapacityReservationsOutput) SetNextToken(v string) *DescribeCapacityReservationsOutput { - s.NextToken = &v - return s -} - -type DescribeClassicLinkInstancesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * group-id - The ID of a VPC security group that's associated with the - // instance. - // - // * instance-id - The ID of the instance. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * vpc-id - The ID of the VPC to which the instance is linked. - // - // vpc-id - The ID of the VPC that the instance is linked to. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more instance IDs. Must be instances linked to a VPC through ClassicLink. - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. This value can be between 5 and - // 1000. If MaxResults is given a value larger than 1000, only 1000 results - // are returned. You cannot specify this parameter and the instance IDs parameter - // in the same request. - // - // Constraint: If the value is greater than 1000, we return only 1000 items. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeClassicLinkInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClassicLinkInstancesInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeClassicLinkInstancesInput) SetDryRun(v bool) *DescribeClassicLinkInstancesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeClassicLinkInstancesInput) SetFilters(v []*Filter) *DescribeClassicLinkInstancesInput { - s.Filters = v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *DescribeClassicLinkInstancesInput) SetInstanceIds(v []*string) *DescribeClassicLinkInstancesInput { - s.InstanceIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeClassicLinkInstancesInput) SetMaxResults(v int64) *DescribeClassicLinkInstancesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClassicLinkInstancesInput) SetNextToken(v string) *DescribeClassicLinkInstancesInput { - s.NextToken = &v - return s -} - -type DescribeClassicLinkInstancesOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more linked EC2-Classic instances. - Instances []*ClassicLinkInstance `locationName:"instancesSet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeClassicLinkInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClassicLinkInstancesOutput) GoString() string { - return s.String() -} - -// SetInstances sets the Instances field's value. -func (s *DescribeClassicLinkInstancesOutput) SetInstances(v []*ClassicLinkInstance) *DescribeClassicLinkInstancesOutput { - s.Instances = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClassicLinkInstancesOutput) SetNextToken(v string) *DescribeClassicLinkInstancesOutput { - s.NextToken = &v - return s -} - -type DescribeClientVpnAuthorizationRulesInput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. Filter names and values are case-sensitive. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the nextToken - // value. - MaxResults *int64 `min:"5" type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeClientVpnAuthorizationRulesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClientVpnAuthorizationRulesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeClientVpnAuthorizationRulesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnAuthorizationRulesInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *DescribeClientVpnAuthorizationRulesInput) SetClientVpnEndpointId(v string) *DescribeClientVpnAuthorizationRulesInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeClientVpnAuthorizationRulesInput) SetDryRun(v bool) *DescribeClientVpnAuthorizationRulesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeClientVpnAuthorizationRulesInput) SetFilters(v []*Filter) *DescribeClientVpnAuthorizationRulesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeClientVpnAuthorizationRulesInput) SetMaxResults(v int64) *DescribeClientVpnAuthorizationRulesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClientVpnAuthorizationRulesInput) SetNextToken(v string) *DescribeClientVpnAuthorizationRulesInput { - s.NextToken = &v - return s -} - -type DescribeClientVpnAuthorizationRulesOutput struct { - _ struct{} `type:"structure"` - - // Information about the authorization rules. - AuthorizationRules []*AuthorizationRule `locationName:"authorizationRule" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeClientVpnAuthorizationRulesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClientVpnAuthorizationRulesOutput) GoString() string { - return s.String() -} - -// SetAuthorizationRules sets the AuthorizationRules field's value. -func (s *DescribeClientVpnAuthorizationRulesOutput) SetAuthorizationRules(v []*AuthorizationRule) *DescribeClientVpnAuthorizationRulesOutput { - s.AuthorizationRules = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClientVpnAuthorizationRulesOutput) SetNextToken(v string) *DescribeClientVpnAuthorizationRulesOutput { - s.NextToken = &v - return s -} - -type DescribeClientVpnConnectionsInput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. Filter names and values are case-sensitive. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the nextToken - // value. - MaxResults *int64 `min:"5" type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeClientVpnConnectionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClientVpnConnectionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeClientVpnConnectionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnConnectionsInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *DescribeClientVpnConnectionsInput) SetClientVpnEndpointId(v string) *DescribeClientVpnConnectionsInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeClientVpnConnectionsInput) SetDryRun(v bool) *DescribeClientVpnConnectionsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeClientVpnConnectionsInput) SetFilters(v []*Filter) *DescribeClientVpnConnectionsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeClientVpnConnectionsInput) SetMaxResults(v int64) *DescribeClientVpnConnectionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClientVpnConnectionsInput) SetNextToken(v string) *DescribeClientVpnConnectionsInput { - s.NextToken = &v - return s -} - -type DescribeClientVpnConnectionsOutput struct { - _ struct{} `type:"structure"` - - // Information about the active and terminated client connections. - Connections []*ClientVpnConnection `locationName:"connections" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeClientVpnConnectionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClientVpnConnectionsOutput) GoString() string { - return s.String() -} - -// SetConnections sets the Connections field's value. -func (s *DescribeClientVpnConnectionsOutput) SetConnections(v []*ClientVpnConnection) *DescribeClientVpnConnectionsOutput { - s.Connections = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClientVpnConnectionsOutput) SetNextToken(v string) *DescribeClientVpnConnectionsOutput { - s.NextToken = &v - return s -} - -type DescribeClientVpnEndpointsInput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint. - ClientVpnEndpointIds []*string `locationName:"ClientVpnEndpointId" locationNameList:"item" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. Filter names and values are case-sensitive. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the nextToken - // value. - MaxResults *int64 `min:"5" type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeClientVpnEndpointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClientVpnEndpointsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeClientVpnEndpointsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnEndpointsInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientVpnEndpointIds sets the ClientVpnEndpointIds field's value. -func (s *DescribeClientVpnEndpointsInput) SetClientVpnEndpointIds(v []*string) *DescribeClientVpnEndpointsInput { - s.ClientVpnEndpointIds = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeClientVpnEndpointsInput) SetDryRun(v bool) *DescribeClientVpnEndpointsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeClientVpnEndpointsInput) SetFilters(v []*Filter) *DescribeClientVpnEndpointsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeClientVpnEndpointsInput) SetMaxResults(v int64) *DescribeClientVpnEndpointsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClientVpnEndpointsInput) SetNextToken(v string) *DescribeClientVpnEndpointsInput { - s.NextToken = &v - return s -} - -type DescribeClientVpnEndpointsOutput struct { - _ struct{} `type:"structure"` - - // Information about the Client VPN endpoints. - ClientVpnEndpoints []*ClientVpnEndpoint `locationName:"clientVpnEndpoint" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeClientVpnEndpointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClientVpnEndpointsOutput) GoString() string { - return s.String() -} - -// SetClientVpnEndpoints sets the ClientVpnEndpoints field's value. -func (s *DescribeClientVpnEndpointsOutput) SetClientVpnEndpoints(v []*ClientVpnEndpoint) *DescribeClientVpnEndpointsOutput { - s.ClientVpnEndpoints = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClientVpnEndpointsOutput) SetNextToken(v string) *DescribeClientVpnEndpointsOutput { - s.NextToken = &v - return s -} - -type DescribeClientVpnRoutesInput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. Filter names and values are case-sensitive. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the nextToken - // value. - MaxResults *int64 `min:"5" type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeClientVpnRoutesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClientVpnRoutesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeClientVpnRoutesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnRoutesInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *DescribeClientVpnRoutesInput) SetClientVpnEndpointId(v string) *DescribeClientVpnRoutesInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeClientVpnRoutesInput) SetDryRun(v bool) *DescribeClientVpnRoutesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeClientVpnRoutesInput) SetFilters(v []*Filter) *DescribeClientVpnRoutesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeClientVpnRoutesInput) SetMaxResults(v int64) *DescribeClientVpnRoutesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClientVpnRoutesInput) SetNextToken(v string) *DescribeClientVpnRoutesInput { - s.NextToken = &v - return s -} - -type DescribeClientVpnRoutesOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // Information about the Client VPN endpoint routes. - Routes []*ClientVpnRoute `locationName:"routes" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeClientVpnRoutesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClientVpnRoutesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClientVpnRoutesOutput) SetNextToken(v string) *DescribeClientVpnRoutesOutput { - s.NextToken = &v - return s -} - -// SetRoutes sets the Routes field's value. -func (s *DescribeClientVpnRoutesOutput) SetRoutes(v []*ClientVpnRoute) *DescribeClientVpnRoutesOutput { - s.Routes = v - return s -} - -type DescribeClientVpnTargetNetworksInput struct { - _ struct{} `type:"structure"` - - // The IDs of the target network associations. - AssociationIds []*string `locationNameList:"item" type:"list"` - - // The ID of the Client VPN endpoint. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. Filter names and values are case-sensitive. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the nextToken - // value. - MaxResults *int64 `min:"5" type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeClientVpnTargetNetworksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClientVpnTargetNetworksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeClientVpnTargetNetworksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnTargetNetworksInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationIds sets the AssociationIds field's value. -func (s *DescribeClientVpnTargetNetworksInput) SetAssociationIds(v []*string) *DescribeClientVpnTargetNetworksInput { - s.AssociationIds = v - return s -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *DescribeClientVpnTargetNetworksInput) SetClientVpnEndpointId(v string) *DescribeClientVpnTargetNetworksInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeClientVpnTargetNetworksInput) SetDryRun(v bool) *DescribeClientVpnTargetNetworksInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeClientVpnTargetNetworksInput) SetFilters(v []*Filter) *DescribeClientVpnTargetNetworksInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeClientVpnTargetNetworksInput) SetMaxResults(v int64) *DescribeClientVpnTargetNetworksInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClientVpnTargetNetworksInput) SetNextToken(v string) *DescribeClientVpnTargetNetworksInput { - s.NextToken = &v - return s -} - -type DescribeClientVpnTargetNetworksOutput struct { - _ struct{} `type:"structure"` - - // Information about the associated target networks. - ClientVpnTargetNetworks []*TargetNetwork `locationName:"clientVpnTargetNetworks" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeClientVpnTargetNetworksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClientVpnTargetNetworksOutput) GoString() string { - return s.String() -} - -// SetClientVpnTargetNetworks sets the ClientVpnTargetNetworks field's value. -func (s *DescribeClientVpnTargetNetworksOutput) SetClientVpnTargetNetworks(v []*TargetNetwork) *DescribeClientVpnTargetNetworksOutput { - s.ClientVpnTargetNetworks = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClientVpnTargetNetworksOutput) SetNextToken(v string) *DescribeClientVpnTargetNetworksOutput { - s.NextToken = &v - return s -} - -// Contains the parameters for DescribeConversionTasks. -type DescribeConversionTasksInput struct { - _ struct{} `type:"structure"` - - // One or more conversion task IDs. - ConversionTaskIds []*string `locationName:"conversionTaskId" locationNameList:"item" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` -} - -// String returns the string representation -func (s DescribeConversionTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConversionTasksInput) GoString() string { - return s.String() -} - -// SetConversionTaskIds sets the ConversionTaskIds field's value. -func (s *DescribeConversionTasksInput) SetConversionTaskIds(v []*string) *DescribeConversionTasksInput { - s.ConversionTaskIds = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeConversionTasksInput) SetDryRun(v bool) *DescribeConversionTasksInput { - s.DryRun = &v - return s -} - -// Contains the output for DescribeConversionTasks. -type DescribeConversionTasksOutput struct { - _ struct{} `type:"structure"` - - // Information about the conversion tasks. - ConversionTasks []*ConversionTask `locationName:"conversionTasks" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeConversionTasksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConversionTasksOutput) GoString() string { - return s.String() -} - -// SetConversionTasks sets the ConversionTasks field's value. -func (s *DescribeConversionTasksOutput) SetConversionTasks(v []*ConversionTask) *DescribeConversionTasksOutput { - s.ConversionTasks = v - return s -} - -// Contains the parameters for DescribeCustomerGateways. -type DescribeCustomerGatewaysInput struct { - _ struct{} `type:"structure"` - - // One or more customer gateway IDs. - // - // Default: Describes all your customer gateways. - CustomerGatewayIds []*string `locationName:"CustomerGatewayId" locationNameList:"CustomerGatewayId" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * bgp-asn - The customer gateway's Border Gateway Protocol (BGP) Autonomous - // System Number (ASN). - // - // * customer-gateway-id - The ID of the customer gateway. - // - // * ip-address - The IP address of the customer gateway's Internet-routable - // external interface. - // - // * state - The state of the customer gateway (pending | available | deleting - // | deleted). - // - // * type - The type of customer gateway. Currently, the only supported type - // is ipsec.1. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` -} - -// String returns the string representation -func (s DescribeCustomerGatewaysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCustomerGatewaysInput) GoString() string { - return s.String() -} - -// SetCustomerGatewayIds sets the CustomerGatewayIds field's value. -func (s *DescribeCustomerGatewaysInput) SetCustomerGatewayIds(v []*string) *DescribeCustomerGatewaysInput { - s.CustomerGatewayIds = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeCustomerGatewaysInput) SetDryRun(v bool) *DescribeCustomerGatewaysInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeCustomerGatewaysInput) SetFilters(v []*Filter) *DescribeCustomerGatewaysInput { - s.Filters = v - return s -} - -// Contains the output of DescribeCustomerGateways. -type DescribeCustomerGatewaysOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more customer gateways. - CustomerGateways []*CustomerGateway `locationName:"customerGatewaySet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeCustomerGatewaysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCustomerGatewaysOutput) GoString() string { - return s.String() -} - -// SetCustomerGateways sets the CustomerGateways field's value. -func (s *DescribeCustomerGatewaysOutput) SetCustomerGateways(v []*CustomerGateway) *DescribeCustomerGatewaysOutput { - s.CustomerGateways = v - return s -} - -type DescribeDhcpOptionsInput struct { - _ struct{} `type:"structure"` - - // The IDs of one or more DHCP options sets. - // - // Default: Describes all your DHCP options sets. - DhcpOptionsIds []*string `locationName:"DhcpOptionsId" locationNameList:"DhcpOptionsId" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * dhcp-options-id - The ID of a DHCP options set. - // - // * key - The key for one of the options (for example, domain-name). - // - // * value - The value for one of the options. - // - // * owner-id - The ID of the AWS account that owns the DHCP options set. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` -} - -// String returns the string representation -func (s DescribeDhcpOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDhcpOptionsInput) GoString() string { - return s.String() -} - -// SetDhcpOptionsIds sets the DhcpOptionsIds field's value. -func (s *DescribeDhcpOptionsInput) SetDhcpOptionsIds(v []*string) *DescribeDhcpOptionsInput { - s.DhcpOptionsIds = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeDhcpOptionsInput) SetDryRun(v bool) *DescribeDhcpOptionsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDhcpOptionsInput) SetFilters(v []*Filter) *DescribeDhcpOptionsInput { - s.Filters = v - return s -} - -type DescribeDhcpOptionsOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more DHCP options sets. - DhcpOptions []*DhcpOptions `locationName:"dhcpOptionsSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeDhcpOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDhcpOptionsOutput) GoString() string { - return s.String() -} - -// SetDhcpOptions sets the DhcpOptions field's value. -func (s *DescribeDhcpOptionsOutput) SetDhcpOptions(v []*DhcpOptions) *DescribeDhcpOptionsOutput { - s.DhcpOptions = v - return s -} - -type DescribeEgressOnlyInternetGatewaysInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more egress-only internet gateway IDs. - EgressOnlyInternetGatewayIds []*string `locationName:"EgressOnlyInternetGatewayId" locationNameList:"item" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the returned - // NextToken value. This value can be between 5 and 1000. If MaxResults is given - // a value larger than 1000, only 1000 results are returned. - MaxResults *int64 `type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEgressOnlyInternetGatewaysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEgressOnlyInternetGatewaysInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeEgressOnlyInternetGatewaysInput) SetDryRun(v bool) *DescribeEgressOnlyInternetGatewaysInput { - s.DryRun = &v - return s -} - -// SetEgressOnlyInternetGatewayIds sets the EgressOnlyInternetGatewayIds field's value. -func (s *DescribeEgressOnlyInternetGatewaysInput) SetEgressOnlyInternetGatewayIds(v []*string) *DescribeEgressOnlyInternetGatewaysInput { - s.EgressOnlyInternetGatewayIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeEgressOnlyInternetGatewaysInput) SetMaxResults(v int64) *DescribeEgressOnlyInternetGatewaysInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEgressOnlyInternetGatewaysInput) SetNextToken(v string) *DescribeEgressOnlyInternetGatewaysInput { - s.NextToken = &v - return s -} - -type DescribeEgressOnlyInternetGatewaysOutput struct { - _ struct{} `type:"structure"` - - // Information about the egress-only internet gateways. - EgressOnlyInternetGateways []*EgressOnlyInternetGateway `locationName:"egressOnlyInternetGatewaySet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeEgressOnlyInternetGatewaysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEgressOnlyInternetGatewaysOutput) GoString() string { - return s.String() -} - -// SetEgressOnlyInternetGateways sets the EgressOnlyInternetGateways field's value. -func (s *DescribeEgressOnlyInternetGatewaysOutput) SetEgressOnlyInternetGateways(v []*EgressOnlyInternetGateway) *DescribeEgressOnlyInternetGatewaysOutput { - s.EgressOnlyInternetGateways = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEgressOnlyInternetGatewaysOutput) SetNextToken(v string) *DescribeEgressOnlyInternetGatewaysOutput { - s.NextToken = &v - return s -} - -type DescribeElasticGpusInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more Elastic Graphics accelerator IDs. - ElasticGpuIds []*string `locationName:"ElasticGpuId" locationNameList:"item" type:"list"` - - // One or more filters. - // - // * availability-zone - The Availability Zone in which the Elastic Graphics - // accelerator resides. - // - // * elastic-gpu-health - The status of the Elastic Graphics accelerator - // (OK | IMPAIRED). - // - // * elastic-gpu-state - The state of the Elastic Graphics accelerator (ATTACHED). - // - // * elastic-gpu-type - The type of Elastic Graphics accelerator; for example, - // eg1.medium. - // - // * instance-id - The ID of the instance to which the Elastic Graphics accelerator - // is associated. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. This - // value can be between 5 and 1000. - MaxResults *int64 `type:"integer"` - - // The token to request the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeElasticGpusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeElasticGpusInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeElasticGpusInput) SetDryRun(v bool) *DescribeElasticGpusInput { - s.DryRun = &v - return s -} - -// SetElasticGpuIds sets the ElasticGpuIds field's value. -func (s *DescribeElasticGpusInput) SetElasticGpuIds(v []*string) *DescribeElasticGpusInput { - s.ElasticGpuIds = v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeElasticGpusInput) SetFilters(v []*Filter) *DescribeElasticGpusInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeElasticGpusInput) SetMaxResults(v int64) *DescribeElasticGpusInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeElasticGpusInput) SetNextToken(v string) *DescribeElasticGpusInput { - s.NextToken = &v - return s -} - -type DescribeElasticGpusOutput struct { - _ struct{} `type:"structure"` - - // Information about the Elastic Graphics accelerators. - ElasticGpuSet []*ElasticGpus `locationName:"elasticGpuSet" locationNameList:"item" type:"list"` - - // The total number of items to return. If the total number of items available - // is more than the value specified in max-items then a Next-Token will be provided - // in the output that you can use to resume pagination. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeElasticGpusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeElasticGpusOutput) GoString() string { - return s.String() -} - -// SetElasticGpuSet sets the ElasticGpuSet field's value. -func (s *DescribeElasticGpusOutput) SetElasticGpuSet(v []*ElasticGpus) *DescribeElasticGpusOutput { - s.ElasticGpuSet = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeElasticGpusOutput) SetMaxResults(v int64) *DescribeElasticGpusOutput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeElasticGpusOutput) SetNextToken(v string) *DescribeElasticGpusOutput { - s.NextToken = &v - return s -} - -// Contains the parameters for DescribeExportTasks. -type DescribeExportTasksInput struct { - _ struct{} `type:"structure"` - - // One or more export task IDs. - ExportTaskIds []*string `locationName:"exportTaskId" locationNameList:"ExportTaskId" type:"list"` -} - -// String returns the string representation -func (s DescribeExportTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeExportTasksInput) GoString() string { - return s.String() -} - -// SetExportTaskIds sets the ExportTaskIds field's value. -func (s *DescribeExportTasksInput) SetExportTaskIds(v []*string) *DescribeExportTasksInput { - s.ExportTaskIds = v - return s -} - -// Contains the output for DescribeExportTasks. -type DescribeExportTasksOutput struct { - _ struct{} `type:"structure"` - - // Information about the export tasks. - ExportTasks []*ExportTask `locationName:"exportTaskSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeExportTasksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeExportTasksOutput) GoString() string { - return s.String() -} - -// SetExportTasks sets the ExportTasks field's value. -func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExportTasksOutput { - s.ExportTasks = v - return s -} - -// Describes the instances that could not be launched by the fleet. -type DescribeFleetError struct { - _ struct{} `type:"structure"` - - // The error code that indicates why the instance could not be launched. For - // more information about error codes, see Error Codes (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html). - ErrorCode *string `locationName:"errorCode" type:"string"` - - // The error message that describes why the instance could not be launched. - // For more information about error messages, see ee Error Codes (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html). - ErrorMessage *string `locationName:"errorMessage" type:"string"` - - // The launch templates and overrides that were used for launching the instances. - // Any parameters that you specify in the Overrides override the same parameters - // in the launch template. - LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse `locationName:"launchTemplateAndOverrides" type:"structure"` - - // Indicates if the instance that could not be launched was a Spot Instance - // or On-Demand Instance. - Lifecycle *string `locationName:"lifecycle" type:"string" enum:"InstanceLifecycle"` -} - -// String returns the string representation -func (s DescribeFleetError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetError) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *DescribeFleetError) SetErrorCode(v string) *DescribeFleetError { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *DescribeFleetError) SetErrorMessage(v string) *DescribeFleetError { - s.ErrorMessage = &v - return s -} - -// SetLaunchTemplateAndOverrides sets the LaunchTemplateAndOverrides field's value. -func (s *DescribeFleetError) SetLaunchTemplateAndOverrides(v *LaunchTemplateAndOverridesResponse) *DescribeFleetError { - s.LaunchTemplateAndOverrides = v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *DescribeFleetError) SetLifecycle(v string) *DescribeFleetError { - s.Lifecycle = &v - return s -} - -type DescribeFleetHistoryInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The type of events to describe. By default, all events are described. - EventType *string `type:"string" enum:"FleetEventType"` - - // The ID of the EC2 Fleet. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // The maximum number of results to return in a single call. Specify a value - // between 1 and 1000. The default value is 1000. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // The token for the next set of results. - NextToken *string `type:"string"` - - // The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // - // StartTime is a required field - StartTime *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s DescribeFleetHistoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetHistoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFleetHistoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFleetHistoryInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeFleetHistoryInput) SetDryRun(v bool) *DescribeFleetHistoryInput { - s.DryRun = &v - return s -} - -// SetEventType sets the EventType field's value. -func (s *DescribeFleetHistoryInput) SetEventType(v string) *DescribeFleetHistoryInput { - s.EventType = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *DescribeFleetHistoryInput) SetFleetId(v string) *DescribeFleetHistoryInput { - s.FleetId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeFleetHistoryInput) SetMaxResults(v int64) *DescribeFleetHistoryInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetHistoryInput) SetNextToken(v string) *DescribeFleetHistoryInput { - s.NextToken = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeFleetHistoryInput) SetStartTime(v time.Time) *DescribeFleetHistoryInput { - s.StartTime = &v - return s -} - -type DescribeFleetHistoryOutput struct { - _ struct{} `type:"structure"` - - // The ID of the EC Fleet. - FleetId *string `locationName:"fleetId" type:"string"` - - // Information about the events in the history of the EC2 Fleet. - HistoryRecords []*HistoryRecordEntry `locationName:"historyRecordSet" locationNameList:"item" type:"list"` - - // The last date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // All records up to this time were retrieved. - // - // If nextToken indicates that there are more results, this value is not present. - LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp"` - - // The token for the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - StartTime *time.Time `locationName:"startTime" type:"timestamp"` -} - -// String returns the string representation -func (s DescribeFleetHistoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetHistoryOutput) GoString() string { - return s.String() -} - -// SetFleetId sets the FleetId field's value. -func (s *DescribeFleetHistoryOutput) SetFleetId(v string) *DescribeFleetHistoryOutput { - s.FleetId = &v - return s -} - -// SetHistoryRecords sets the HistoryRecords field's value. -func (s *DescribeFleetHistoryOutput) SetHistoryRecords(v []*HistoryRecordEntry) *DescribeFleetHistoryOutput { - s.HistoryRecords = v - return s -} - -// SetLastEvaluatedTime sets the LastEvaluatedTime field's value. -func (s *DescribeFleetHistoryOutput) SetLastEvaluatedTime(v time.Time) *DescribeFleetHistoryOutput { - s.LastEvaluatedTime = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetHistoryOutput) SetNextToken(v string) *DescribeFleetHistoryOutput { - s.NextToken = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeFleetHistoryOutput) SetStartTime(v time.Time) *DescribeFleetHistoryOutput { - s.StartTime = &v - return s -} - -type DescribeFleetInstancesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * instance-type - The instance type. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The ID of the EC2 Fleet. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // The maximum number of results to return in a single call. Specify a value - // between 1 and 1000. The default value is 1000. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // The token for the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeFleetInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFleetInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFleetInstancesInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeFleetInstancesInput) SetDryRun(v bool) *DescribeFleetInstancesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeFleetInstancesInput) SetFilters(v []*Filter) *DescribeFleetInstancesInput { - s.Filters = v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *DescribeFleetInstancesInput) SetFleetId(v string) *DescribeFleetInstancesInput { - s.FleetId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeFleetInstancesInput) SetMaxResults(v int64) *DescribeFleetInstancesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetInstancesInput) SetNextToken(v string) *DescribeFleetInstancesInput { - s.NextToken = &v - return s -} - -type DescribeFleetInstancesOutput struct { - _ struct{} `type:"structure"` - - // The running instances. This list is refreshed periodically and might be out - // of date. - ActiveInstances []*ActiveInstance `locationName:"activeInstanceSet" locationNameList:"item" type:"list"` - - // The ID of the EC2 Fleet. - FleetId *string `locationName:"fleetId" type:"string"` - - // The token for the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeFleetInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetInstancesOutput) GoString() string { - return s.String() -} - -// SetActiveInstances sets the ActiveInstances field's value. -func (s *DescribeFleetInstancesOutput) SetActiveInstances(v []*ActiveInstance) *DescribeFleetInstancesOutput { - s.ActiveInstances = v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *DescribeFleetInstancesOutput) SetFleetId(v string) *DescribeFleetInstancesOutput { - s.FleetId = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetInstancesOutput) SetNextToken(v string) *DescribeFleetInstancesOutput { - s.NextToken = &v - return s -} - -type DescribeFleetsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * activity-status - The progress of the EC2 Fleet ( error | pending-fulfillment - // | pending-termination | fulfilled). - // - // * excess-capacity-termination-policy - Indicates whether to terminate - // running instances if the target capacity is decreased below the current - // EC2 Fleet size (true | false). - // - // * fleet-state - The state of the EC2 Fleet (submitted | active | deleted - // | failed | deleted-running | deleted-terminating | modifying). - // - // * replace-unhealthy-instances - Indicates whether EC2 Fleet should replace - // unhealthy instances (true | false). - // - // * type - The type of request (instant | request | maintain). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The ID of the EC2 Fleets. - FleetIds []*string `locationName:"FleetId" type:"list"` - - // The maximum number of results to return in a single call. Specify a value - // between 1 and 1000. The default value is 1000. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // The token for the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeFleetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeFleetsInput) SetDryRun(v bool) *DescribeFleetsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeFleetsInput) SetFilters(v []*Filter) *DescribeFleetsInput { - s.Filters = v - return s -} - -// SetFleetIds sets the FleetIds field's value. -func (s *DescribeFleetsInput) SetFleetIds(v []*string) *DescribeFleetsInput { - s.FleetIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeFleetsInput) SetMaxResults(v int64) *DescribeFleetsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetsInput) SetNextToken(v string) *DescribeFleetsInput { - s.NextToken = &v - return s -} - -// Describes the instances that were launched by the fleet. -type DescribeFleetsInstances struct { - _ struct{} `type:"structure"` - - // The IDs of the instances. - InstanceIds []*string `locationName:"instanceIds" locationNameList:"item" type:"list"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // The launch templates and overrides that were used for launching the instances. - // Any parameters that you specify in the Overrides override the same parameters - // in the launch template. - LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse `locationName:"launchTemplateAndOverrides" type:"structure"` - - // Indicates if the instance that was launched is a Spot Instance or On-Demand - // Instance. - Lifecycle *string `locationName:"lifecycle" type:"string" enum:"InstanceLifecycle"` - - // The value is Windows for Windows instances; otherwise blank. - Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` -} - -// String returns the string representation -func (s DescribeFleetsInstances) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetsInstances) GoString() string { - return s.String() -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *DescribeFleetsInstances) SetInstanceIds(v []*string) *DescribeFleetsInstances { - s.InstanceIds = v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *DescribeFleetsInstances) SetInstanceType(v string) *DescribeFleetsInstances { - s.InstanceType = &v - return s -} - -// SetLaunchTemplateAndOverrides sets the LaunchTemplateAndOverrides field's value. -func (s *DescribeFleetsInstances) SetLaunchTemplateAndOverrides(v *LaunchTemplateAndOverridesResponse) *DescribeFleetsInstances { - s.LaunchTemplateAndOverrides = v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *DescribeFleetsInstances) SetLifecycle(v string) *DescribeFleetsInstances { - s.Lifecycle = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *DescribeFleetsInstances) SetPlatform(v string) *DescribeFleetsInstances { - s.Platform = &v - return s -} - -type DescribeFleetsOutput struct { - _ struct{} `type:"structure"` - - // Information about the EC2 Fleets. - Fleets []*FleetData `locationName:"fleetSet" locationNameList:"item" type:"list"` - - // The token for the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeFleetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetsOutput) GoString() string { - return s.String() -} - -// SetFleets sets the Fleets field's value. -func (s *DescribeFleetsOutput) SetFleets(v []*FleetData) *DescribeFleetsOutput { - s.Fleets = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetsOutput) SetNextToken(v string) *DescribeFleetsOutput { - s.NextToken = &v - return s -} - -type DescribeFlowLogsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * deliver-log-status - The status of the logs delivery (SUCCESS | FAILED). - // - // * log-destination-type - The type of destination to which the flow log - // publishes data. Possible destination types include cloud-watch-logs and - // S3. - // - // * flow-log-id - The ID of the flow log. - // - // * log-group-name - The name of the log group. - // - // * resource-id - The ID of the VPC, subnet, or network interface. - // - // * traffic-type - The type of traffic (ACCEPT | REJECT | ALL). - Filter []*Filter `locationNameList:"Filter" type:"list"` - - // One or more flow log IDs. - FlowLogIds []*string `locationName:"FlowLogId" locationNameList:"item" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the returned - // NextToken value. This value can be between 5 and 1000. If MaxResults is given - // a value larger than 1000, only 1000 results are returned. You cannot specify - // this parameter and the flow log IDs parameter in the same request. - MaxResults *int64 `type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeFlowLogsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFlowLogsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeFlowLogsInput) SetDryRun(v bool) *DescribeFlowLogsInput { - s.DryRun = &v - return s -} - -// SetFilter sets the Filter field's value. -func (s *DescribeFlowLogsInput) SetFilter(v []*Filter) *DescribeFlowLogsInput { - s.Filter = v - return s -} - -// SetFlowLogIds sets the FlowLogIds field's value. -func (s *DescribeFlowLogsInput) SetFlowLogIds(v []*string) *DescribeFlowLogsInput { - s.FlowLogIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeFlowLogsInput) SetMaxResults(v int64) *DescribeFlowLogsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFlowLogsInput) SetNextToken(v string) *DescribeFlowLogsInput { - s.NextToken = &v - return s -} - -type DescribeFlowLogsOutput struct { - _ struct{} `type:"structure"` - - // Information about the flow logs. - FlowLogs []*FlowLog `locationName:"flowLogSet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeFlowLogsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFlowLogsOutput) GoString() string { - return s.String() -} - -// SetFlowLogs sets the FlowLogs field's value. -func (s *DescribeFlowLogsOutput) SetFlowLogs(v []*FlowLog) *DescribeFlowLogsOutput { - s.FlowLogs = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFlowLogsOutput) SetNextToken(v string) *DescribeFlowLogsOutput { - s.NextToken = &v - return s -} - -type DescribeFpgaImageAttributeInput struct { - _ struct{} `type:"structure"` - - // The AFI attribute. - // - // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"FpgaImageAttributeName"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the AFI. - // - // FpgaImageId is a required field - FpgaImageId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeFpgaImageAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFpgaImageAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFpgaImageAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFpgaImageAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - if s.FpgaImageId == nil { - invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *DescribeFpgaImageAttributeInput) SetAttribute(v string) *DescribeFpgaImageAttributeInput { - s.Attribute = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeFpgaImageAttributeInput) SetDryRun(v bool) *DescribeFpgaImageAttributeInput { - s.DryRun = &v - return s -} - -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *DescribeFpgaImageAttributeInput) SetFpgaImageId(v string) *DescribeFpgaImageAttributeInput { - s.FpgaImageId = &v - return s -} - -type DescribeFpgaImageAttributeOutput struct { - _ struct{} `type:"structure"` - - // Information about the attribute. - FpgaImageAttribute *FpgaImageAttribute `locationName:"fpgaImageAttribute" type:"structure"` -} - -// String returns the string representation -func (s DescribeFpgaImageAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFpgaImageAttributeOutput) GoString() string { - return s.String() -} - -// SetFpgaImageAttribute sets the FpgaImageAttribute field's value. -func (s *DescribeFpgaImageAttributeOutput) SetFpgaImageAttribute(v *FpgaImageAttribute) *DescribeFpgaImageAttributeOutput { - s.FpgaImageAttribute = v - return s -} - -type DescribeFpgaImagesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * create-time - The creation time of the AFI. - // - // * fpga-image-id - The FPGA image identifier (AFI ID). - // - // * fpga-image-global-id - The global FPGA image identifier (AGFI ID). - // - // * name - The name of the AFI. - // - // * owner-id - The AWS account ID of the AFI owner. - // - // * product-code - The product code. - // - // * shell-version - The version of the AWS Shell that was used to create - // the bitstream. - // - // * state - The state of the AFI (pending | failed | available | unavailable). - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * update-time - The time of the most recent update. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more AFI IDs. - FpgaImageIds []*string `locationName:"FpgaImageId" locationNameList:"item" type:"list"` - - // The maximum number of results to return in a single call. - MaxResults *int64 `min:"5" type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `min:"1" type:"string"` - - // Filters the AFI by owner. Specify an AWS account ID, self (owner is the sender - // of the request), or an AWS owner alias (valid values are amazon | aws-marketplace). - Owners []*string `locationName:"Owner" locationNameList:"Owner" type:"list"` -} - -// String returns the string representation -func (s DescribeFpgaImagesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFpgaImagesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFpgaImagesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFpgaImagesInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeFpgaImagesInput) SetDryRun(v bool) *DescribeFpgaImagesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeFpgaImagesInput) SetFilters(v []*Filter) *DescribeFpgaImagesInput { - s.Filters = v - return s -} - -// SetFpgaImageIds sets the FpgaImageIds field's value. -func (s *DescribeFpgaImagesInput) SetFpgaImageIds(v []*string) *DescribeFpgaImagesInput { - s.FpgaImageIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeFpgaImagesInput) SetMaxResults(v int64) *DescribeFpgaImagesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFpgaImagesInput) SetNextToken(v string) *DescribeFpgaImagesInput { - s.NextToken = &v - return s -} - -// SetOwners sets the Owners field's value. -func (s *DescribeFpgaImagesInput) SetOwners(v []*string) *DescribeFpgaImagesInput { - s.Owners = v - return s -} - -type DescribeFpgaImagesOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more FPGA images. - FpgaImages []*FpgaImage `locationName:"fpgaImageSet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeFpgaImagesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFpgaImagesOutput) GoString() string { - return s.String() -} - -// SetFpgaImages sets the FpgaImages field's value. -func (s *DescribeFpgaImagesOutput) SetFpgaImages(v []*FpgaImage) *DescribeFpgaImagesOutput { - s.FpgaImages = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFpgaImagesOutput) SetNextToken(v string) *DescribeFpgaImagesOutput { - s.NextToken = &v - return s -} - -type DescribeHostReservationOfferingsInput struct { - _ struct{} `type:"structure"` - - // One or more filters. - // - // * instance-family - The instance family of the offering (for example, - // m4). - // - // * payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront). - Filter []*Filter `locationNameList:"Filter" type:"list"` - - // This is the maximum duration of the reservation to purchase, specified in - // seconds. Reservations are available in one-year and three-year terms. The - // number of seconds specified must be the number of seconds in a year (365x24x60x60) - // times one of the supported durations (1 or 3). For example, specify 94608000 - // for three years. - MaxDuration *int64 `type:"integer"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500. If maxResults is given - // a larger value than 500, you receive an error. - MaxResults *int64 `type:"integer"` - - // This is the minimum duration of the reservation you'd like to purchase, specified - // in seconds. Reservations are available in one-year and three-year terms. - // The number of seconds specified must be the number of seconds in a year (365x24x60x60) - // times one of the supported durations (1 or 3). For example, specify 31536000 - // for one year. - MinDuration *int64 `type:"integer"` - - // The token to use to retrieve the next page of results. - NextToken *string `type:"string"` - - // The ID of the reservation offering. - OfferingId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeHostReservationOfferingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHostReservationOfferingsInput) GoString() string { - return s.String() -} - -// SetFilter sets the Filter field's value. -func (s *DescribeHostReservationOfferingsInput) SetFilter(v []*Filter) *DescribeHostReservationOfferingsInput { - s.Filter = v - return s -} - -// SetMaxDuration sets the MaxDuration field's value. -func (s *DescribeHostReservationOfferingsInput) SetMaxDuration(v int64) *DescribeHostReservationOfferingsInput { - s.MaxDuration = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeHostReservationOfferingsInput) SetMaxResults(v int64) *DescribeHostReservationOfferingsInput { - s.MaxResults = &v - return s -} - -// SetMinDuration sets the MinDuration field's value. -func (s *DescribeHostReservationOfferingsInput) SetMinDuration(v int64) *DescribeHostReservationOfferingsInput { - s.MinDuration = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeHostReservationOfferingsInput) SetNextToken(v string) *DescribeHostReservationOfferingsInput { - s.NextToken = &v - return s -} - -// SetOfferingId sets the OfferingId field's value. -func (s *DescribeHostReservationOfferingsInput) SetOfferingId(v string) *DescribeHostReservationOfferingsInput { - s.OfferingId = &v - return s -} - -type DescribeHostReservationOfferingsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the offerings. - OfferingSet []*HostOffering `locationName:"offeringSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeHostReservationOfferingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHostReservationOfferingsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeHostReservationOfferingsOutput) SetNextToken(v string) *DescribeHostReservationOfferingsOutput { - s.NextToken = &v - return s -} - -// SetOfferingSet sets the OfferingSet field's value. -func (s *DescribeHostReservationOfferingsOutput) SetOfferingSet(v []*HostOffering) *DescribeHostReservationOfferingsOutput { - s.OfferingSet = v - return s -} - -type DescribeHostReservationsInput struct { - _ struct{} `type:"structure"` - - // One or more filters. - // - // * instance-family - The instance family (for example, m4). - // - // * payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront). - // - // * state - The state of the reservation (payment-pending | payment-failed - // | active | retired). - Filter []*Filter `locationNameList:"Filter" type:"list"` - - // One or more host reservation IDs. - HostReservationIdSet []*string `locationNameList:"item" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500. If maxResults is given - // a larger value than 500, you receive an error. - MaxResults *int64 `type:"integer"` - - // The token to use to retrieve the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeHostReservationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHostReservationsInput) GoString() string { - return s.String() -} - -// SetFilter sets the Filter field's value. -func (s *DescribeHostReservationsInput) SetFilter(v []*Filter) *DescribeHostReservationsInput { - s.Filter = v - return s -} - -// SetHostReservationIdSet sets the HostReservationIdSet field's value. -func (s *DescribeHostReservationsInput) SetHostReservationIdSet(v []*string) *DescribeHostReservationsInput { - s.HostReservationIdSet = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeHostReservationsInput) SetMaxResults(v int64) *DescribeHostReservationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeHostReservationsInput) SetNextToken(v string) *DescribeHostReservationsInput { - s.NextToken = &v - return s -} - -type DescribeHostReservationsOutput struct { - _ struct{} `type:"structure"` - - // Details about the reservation's configuration. - HostReservationSet []*HostReservation `locationName:"hostReservationSet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeHostReservationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHostReservationsOutput) GoString() string { - return s.String() -} - -// SetHostReservationSet sets the HostReservationSet field's value. -func (s *DescribeHostReservationsOutput) SetHostReservationSet(v []*HostReservation) *DescribeHostReservationsOutput { - s.HostReservationSet = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeHostReservationsOutput) SetNextToken(v string) *DescribeHostReservationsOutput { - s.NextToken = &v - return s -} - -type DescribeHostsInput struct { - _ struct{} `type:"structure"` - - // One or more filters. - // - // * auto-placement - Whether auto-placement is enabled or disabled (on | - // off). - // - // * availability-zone - The Availability Zone of the host. - // - // * client-token - The idempotency token that you provided when you allocated - // the host. - // - // * host-reservation-id - The ID of the reservation assigned to this host. - // - // * instance-type - The instance type size that the Dedicated Host is configured - // to support. - // - // * state - The allocation state of the Dedicated Host (available | under-assessment - // | permanent-failure | released | released-permanent-failure). - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - Filter []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` - - // The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches. - HostIds []*string `locationName:"hostId" locationNameList:"item" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500. If maxResults is given - // a larger value than 500, you receive an error. You cannot specify this parameter - // and the host IDs parameter in the same request. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeHostsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHostsInput) GoString() string { - return s.String() -} - -// SetFilter sets the Filter field's value. -func (s *DescribeHostsInput) SetFilter(v []*Filter) *DescribeHostsInput { - s.Filter = v - return s -} - -// SetHostIds sets the HostIds field's value. -func (s *DescribeHostsInput) SetHostIds(v []*string) *DescribeHostsInput { - s.HostIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeHostsInput) SetMaxResults(v int64) *DescribeHostsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeHostsInput) SetNextToken(v string) *DescribeHostsInput { - s.NextToken = &v - return s -} - -type DescribeHostsOutput struct { - _ struct{} `type:"structure"` - - // Information about the Dedicated Hosts. - Hosts []*Host `locationName:"hostSet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeHostsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHostsOutput) GoString() string { - return s.String() -} - -// SetHosts sets the Hosts field's value. -func (s *DescribeHostsOutput) SetHosts(v []*Host) *DescribeHostsOutput { - s.Hosts = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeHostsOutput) SetNextToken(v string) *DescribeHostsOutput { - s.NextToken = &v - return s -} - -type DescribeIamInstanceProfileAssociationsInput struct { - _ struct{} `type:"structure"` - - // One or more IAM instance profile associations. - AssociationIds []*string `locationName:"AssociationId" locationNameList:"AssociationId" type:"list"` - - // One or more filters. - // - // * instance-id - The ID of the instance. - // - // * state - The state of the association (associating | associated | disassociating - // | disassociated). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. - MaxResults *int64 `min:"5" type:"integer"` - - // The token to request the next page of results. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeIamInstanceProfileAssociationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIamInstanceProfileAssociationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeIamInstanceProfileAssociationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeIamInstanceProfileAssociationsInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationIds sets the AssociationIds field's value. -func (s *DescribeIamInstanceProfileAssociationsInput) SetAssociationIds(v []*string) *DescribeIamInstanceProfileAssociationsInput { - s.AssociationIds = v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeIamInstanceProfileAssociationsInput) SetFilters(v []*Filter) *DescribeIamInstanceProfileAssociationsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeIamInstanceProfileAssociationsInput) SetMaxResults(v int64) *DescribeIamInstanceProfileAssociationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeIamInstanceProfileAssociationsInput) SetNextToken(v string) *DescribeIamInstanceProfileAssociationsInput { - s.NextToken = &v - return s -} - -type DescribeIamInstanceProfileAssociationsOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more IAM instance profile associations. - IamInstanceProfileAssociations []*IamInstanceProfileAssociation `locationName:"iamInstanceProfileAssociationSet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeIamInstanceProfileAssociationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIamInstanceProfileAssociationsOutput) GoString() string { - return s.String() -} - -// SetIamInstanceProfileAssociations sets the IamInstanceProfileAssociations field's value. -func (s *DescribeIamInstanceProfileAssociationsOutput) SetIamInstanceProfileAssociations(v []*IamInstanceProfileAssociation) *DescribeIamInstanceProfileAssociationsOutput { - s.IamInstanceProfileAssociations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeIamInstanceProfileAssociationsOutput) SetNextToken(v string) *DescribeIamInstanceProfileAssociationsOutput { - s.NextToken = &v - return s -} - -type DescribeIdFormatInput struct { - _ struct{} `type:"structure"` - - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log - // | image | import-task | instance | internet-gateway | network-acl | network-acl-association - // | network-interface | network-interface-attachment | prefix-list | reservation - // | route-table | route-table-association | security-group | snapshot | subnet - // | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association - // | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway - Resource *string `type:"string"` -} - -// String returns the string representation -func (s DescribeIdFormatInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIdFormatInput) GoString() string { - return s.String() -} - -// SetResource sets the Resource field's value. -func (s *DescribeIdFormatInput) SetResource(v string) *DescribeIdFormatInput { - s.Resource = &v - return s -} - -type DescribeIdFormatOutput struct { - _ struct{} `type:"structure"` - - // Information about the ID format for the resource. - Statuses []*IdFormat `locationName:"statusSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeIdFormatOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIdFormatOutput) GoString() string { - return s.String() -} - -// SetStatuses sets the Statuses field's value. -func (s *DescribeIdFormatOutput) SetStatuses(v []*IdFormat) *DescribeIdFormatOutput { - s.Statuses = v - return s -} - -type DescribeIdentityIdFormatInput struct { - _ struct{} `type:"structure"` - - // The ARN of the principal, which can be an IAM role, IAM user, or the root - // user. - // - // PrincipalArn is a required field - PrincipalArn *string `locationName:"principalArn" type:"string" required:"true"` - - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log - // | image | import-task | instance | internet-gateway | network-acl | network-acl-association - // | network-interface | network-interface-attachment | prefix-list | reservation - // | route-table | route-table-association | security-group | snapshot | subnet - // | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association - // | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway - Resource *string `locationName:"resource" type:"string"` -} - -// String returns the string representation -func (s DescribeIdentityIdFormatInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIdentityIdFormatInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeIdentityIdFormatInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityIdFormatInput"} - if s.PrincipalArn == nil { - invalidParams.Add(request.NewErrParamRequired("PrincipalArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPrincipalArn sets the PrincipalArn field's value. -func (s *DescribeIdentityIdFormatInput) SetPrincipalArn(v string) *DescribeIdentityIdFormatInput { - s.PrincipalArn = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *DescribeIdentityIdFormatInput) SetResource(v string) *DescribeIdentityIdFormatInput { - s.Resource = &v - return s -} - -type DescribeIdentityIdFormatOutput struct { - _ struct{} `type:"structure"` - - // Information about the ID format for the resources. - Statuses []*IdFormat `locationName:"statusSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeIdentityIdFormatOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIdentityIdFormatOutput) GoString() string { - return s.String() -} - -// SetStatuses sets the Statuses field's value. -func (s *DescribeIdentityIdFormatOutput) SetStatuses(v []*IdFormat) *DescribeIdentityIdFormatOutput { - s.Statuses = v - return s -} - -// Contains the parameters for DescribeImageAttribute. -type DescribeImageAttributeInput struct { - _ struct{} `type:"structure"` - - // The AMI attribute. - // - // Note: Depending on your account privileges, the blockDeviceMapping attribute - // may return a Client.AuthFailure error. If this happens, use DescribeImages - // to get information about the block device mapping for the AMI. - // - // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"ImageAttributeName"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the AMI. - // - // ImageId is a required field - ImageId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeImageAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeImageAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeImageAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeImageAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - if s.ImageId == nil { - invalidParams.Add(request.NewErrParamRequired("ImageId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *DescribeImageAttributeInput) SetAttribute(v string) *DescribeImageAttributeInput { - s.Attribute = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeImageAttributeInput) SetDryRun(v bool) *DescribeImageAttributeInput { - s.DryRun = &v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *DescribeImageAttributeInput) SetImageId(v string) *DescribeImageAttributeInput { - s.ImageId = &v - return s -} - -// Describes an image attribute. -type DescribeImageAttributeOutput struct { - _ struct{} `type:"structure"` - - // One or more block device mapping entries. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` - - // A description for the AMI. - Description *AttributeValue `locationName:"description" type:"structure"` - - // The ID of the AMI. - ImageId *string `locationName:"imageId" type:"string"` - - // The kernel ID. - KernelId *AttributeValue `locationName:"kernel" type:"structure"` - - // One or more launch permissions. - LaunchPermissions []*LaunchPermission `locationName:"launchPermission" locationNameList:"item" type:"list"` - - // One or more product codes. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` - - // The RAM disk ID. - RamdiskId *AttributeValue `locationName:"ramdisk" type:"structure"` - - // Indicates whether enhanced networking with the Intel 82599 Virtual Function - // interface is enabled. - SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` -} - -// String returns the string representation -func (s DescribeImageAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeImageAttributeOutput) GoString() string { - return s.String() -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *DescribeImageAttributeOutput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *DescribeImageAttributeOutput { - s.BlockDeviceMappings = v - return s -} - -// SetDescription sets the Description field's value. -func (s *DescribeImageAttributeOutput) SetDescription(v *AttributeValue) *DescribeImageAttributeOutput { - s.Description = v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *DescribeImageAttributeOutput) SetImageId(v string) *DescribeImageAttributeOutput { - s.ImageId = &v - return s -} - -// SetKernelId sets the KernelId field's value. -func (s *DescribeImageAttributeOutput) SetKernelId(v *AttributeValue) *DescribeImageAttributeOutput { - s.KernelId = v - return s -} - -// SetLaunchPermissions sets the LaunchPermissions field's value. -func (s *DescribeImageAttributeOutput) SetLaunchPermissions(v []*LaunchPermission) *DescribeImageAttributeOutput { - s.LaunchPermissions = v - return s -} - -// SetProductCodes sets the ProductCodes field's value. -func (s *DescribeImageAttributeOutput) SetProductCodes(v []*ProductCode) *DescribeImageAttributeOutput { - s.ProductCodes = v - return s -} - -// SetRamdiskId sets the RamdiskId field's value. -func (s *DescribeImageAttributeOutput) SetRamdiskId(v *AttributeValue) *DescribeImageAttributeOutput { - s.RamdiskId = v - return s -} - -// SetSriovNetSupport sets the SriovNetSupport field's value. -func (s *DescribeImageAttributeOutput) SetSriovNetSupport(v *AttributeValue) *DescribeImageAttributeOutput { - s.SriovNetSupport = v - return s -} - -// Contains the parameters for DescribeImages. -type DescribeImagesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Scopes the images by users with explicit launch permissions. Specify an AWS - // account ID, self (the sender of the request), or all (public AMIs). - ExecutableUsers []*string `locationName:"ExecutableBy" locationNameList:"ExecutableBy" type:"list"` - - // One or more filters. - // - // * architecture - The image architecture (i386 | x86_64). - // - // * block-device-mapping.delete-on-termination - A Boolean value that indicates - // whether the Amazon EBS volume is deleted on instance termination. - // - // * block-device-mapping.device-name - The device name specified in the - // block device mapping (for example, /dev/sdh or xvdh). - // - // * block-device-mapping.snapshot-id - The ID of the snapshot used for the - // EBS volume. - // - // * block-device-mapping.volume-size - The volume size of the EBS volume, - // in GiB. - // - // * block-device-mapping.volume-type - The volume type of the EBS volume - // (gp2 | io1 | st1 | sc1 | standard). - // - // * description - The description of the image (provided during image creation). - // - // * ena-support - A Boolean that indicates whether enhanced networking with - // ENA is enabled. - // - // * hypervisor - The hypervisor type (ovm | xen). - // - // * image-id - The ID of the image. - // - // * image-type - The image type (machine | kernel | ramdisk). - // - // * is-public - A Boolean that indicates whether the image is public. - // - // * kernel-id - The kernel ID. - // - // * manifest-location - The location of the image manifest. - // - // * name - The name of the AMI (provided during image creation). - // - // * owner-alias - String value from an Amazon-maintained list (amazon | - // aws-marketplace | microsoft) of snapshot owners. Not to be confused with - // the user-configured AWS account alias, which is set from the IAM console. - // - // * owner-id - The AWS account ID of the image owner. - // - // * platform - The platform. To only list Windows-based AMIs, use windows. - // - // * product-code - The product code. - // - // * product-code.type - The type of the product code (devpay | marketplace). - // - // * ramdisk-id - The RAM disk ID. - // - // * root-device-name - The device name of the root device volume (for example, - // /dev/sda1). - // - // * root-device-type - The type of the root device volume (ebs | instance-store). - // - // * state - The state of the image (available | pending | failed). - // - // * state-reason-code - The reason code for the state change. - // - // * state-reason-message - The message for the state change. - // - // * sriov-net-support - A value of simple indicates that enhanced networking - // with the Intel 82599 VF interface is enabled. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * virtualization-type - The virtualization type (paravirtual | hvm). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more image IDs. - // - // Default: Describes all images available to you. - ImageIds []*string `locationName:"ImageId" locationNameList:"ImageId" type:"list"` - - // Filters the images by the owner. Specify an AWS account ID, self (owner is - // the sender of the request), or an AWS owner alias (valid values are amazon - // | aws-marketplace | microsoft). Omitting this option returns all images for - // which you have launch permissions, regardless of ownership. - Owners []*string `locationName:"Owner" locationNameList:"Owner" type:"list"` -} - -// String returns the string representation -func (s DescribeImagesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeImagesInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeImagesInput) SetDryRun(v bool) *DescribeImagesInput { - s.DryRun = &v - return s -} - -// SetExecutableUsers sets the ExecutableUsers field's value. -func (s *DescribeImagesInput) SetExecutableUsers(v []*string) *DescribeImagesInput { - s.ExecutableUsers = v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeImagesInput) SetFilters(v []*Filter) *DescribeImagesInput { - s.Filters = v - return s -} - -// SetImageIds sets the ImageIds field's value. -func (s *DescribeImagesInput) SetImageIds(v []*string) *DescribeImagesInput { - s.ImageIds = v - return s -} - -// SetOwners sets the Owners field's value. -func (s *DescribeImagesInput) SetOwners(v []*string) *DescribeImagesInput { - s.Owners = v - return s -} - -// Contains the output of DescribeImages. -type DescribeImagesOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more images. - Images []*Image `locationName:"imagesSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeImagesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeImagesOutput) GoString() string { - return s.String() -} - -// SetImages sets the Images field's value. -func (s *DescribeImagesOutput) SetImages(v []*Image) *DescribeImagesOutput { - s.Images = v - return s -} - -// Contains the parameters for DescribeImportImageTasks. -type DescribeImportImageTasksInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // Filter tasks using the task-state filter and one of the following values: - // active, completed, deleting, deleted. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // A list of import image task IDs. - ImportTaskIds []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" type:"list"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // A token that indicates the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeImportImageTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeImportImageTasksInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeImportImageTasksInput) SetDryRun(v bool) *DescribeImportImageTasksInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeImportImageTasksInput) SetFilters(v []*Filter) *DescribeImportImageTasksInput { - s.Filters = v - return s -} - -// SetImportTaskIds sets the ImportTaskIds field's value. -func (s *DescribeImportImageTasksInput) SetImportTaskIds(v []*string) *DescribeImportImageTasksInput { - s.ImportTaskIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeImportImageTasksInput) SetMaxResults(v int64) *DescribeImportImageTasksInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeImportImageTasksInput) SetNextToken(v string) *DescribeImportImageTasksInput { - s.NextToken = &v - return s -} - -// Contains the output for DescribeImportImageTasks. -type DescribeImportImageTasksOutput struct { - _ struct{} `type:"structure"` - - // A list of zero or more import image tasks that are currently active or were - // completed or canceled in the previous 7 days. - ImportImageTasks []*ImportImageTask `locationName:"importImageTaskSet" locationNameList:"item" type:"list"` - - // The token to use to get the next page of results. This value is null when - // there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeImportImageTasksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeImportImageTasksOutput) GoString() string { - return s.String() -} - -// SetImportImageTasks sets the ImportImageTasks field's value. -func (s *DescribeImportImageTasksOutput) SetImportImageTasks(v []*ImportImageTask) *DescribeImportImageTasksOutput { - s.ImportImageTasks = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeImportImageTasksOutput) SetNextToken(v string) *DescribeImportImageTasksOutput { - s.NextToken = &v - return s -} - -// Contains the parameters for DescribeImportSnapshotTasks. -type DescribeImportSnapshotTasksInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // A list of import snapshot task IDs. - ImportTaskIds []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" type:"list"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // A token that indicates the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeImportSnapshotTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeImportSnapshotTasksInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeImportSnapshotTasksInput) SetDryRun(v bool) *DescribeImportSnapshotTasksInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeImportSnapshotTasksInput) SetFilters(v []*Filter) *DescribeImportSnapshotTasksInput { - s.Filters = v - return s -} - -// SetImportTaskIds sets the ImportTaskIds field's value. -func (s *DescribeImportSnapshotTasksInput) SetImportTaskIds(v []*string) *DescribeImportSnapshotTasksInput { - s.ImportTaskIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeImportSnapshotTasksInput) SetMaxResults(v int64) *DescribeImportSnapshotTasksInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeImportSnapshotTasksInput) SetNextToken(v string) *DescribeImportSnapshotTasksInput { - s.NextToken = &v - return s -} - -// Contains the output for DescribeImportSnapshotTasks. -type DescribeImportSnapshotTasksOutput struct { - _ struct{} `type:"structure"` - - // A list of zero or more import snapshot tasks that are currently active or - // were completed or canceled in the previous 7 days. - ImportSnapshotTasks []*ImportSnapshotTask `locationName:"importSnapshotTaskSet" locationNameList:"item" type:"list"` - - // The token to use to get the next page of results. This value is null when - // there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeImportSnapshotTasksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeImportSnapshotTasksOutput) GoString() string { - return s.String() -} - -// SetImportSnapshotTasks sets the ImportSnapshotTasks field's value. -func (s *DescribeImportSnapshotTasksOutput) SetImportSnapshotTasks(v []*ImportSnapshotTask) *DescribeImportSnapshotTasksOutput { - s.ImportSnapshotTasks = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeImportSnapshotTasksOutput) SetNextToken(v string) *DescribeImportSnapshotTasksOutput { - s.NextToken = &v - return s -} - -type DescribeInstanceAttributeInput struct { - _ struct{} `type:"structure"` - - // The instance attribute. - // - // Note: The enaSupport attribute is not supported at this time. - // - // Attribute is a required field - Attribute *string `locationName:"attribute" type:"string" required:"true" enum:"InstanceAttributeName"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeInstanceAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstanceAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInstanceAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInstanceAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *DescribeInstanceAttributeInput) SetAttribute(v string) *DescribeInstanceAttributeInput { - s.Attribute = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeInstanceAttributeInput) SetDryRun(v bool) *DescribeInstanceAttributeInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DescribeInstanceAttributeInput) SetInstanceId(v string) *DescribeInstanceAttributeInput { - s.InstanceId = &v - return s -} - -// Describes an instance attribute. -type DescribeInstanceAttributeOutput struct { - _ struct{} `type:"structure"` - - // The block device mapping of the instance. - BlockDeviceMappings []*InstanceBlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` - - // If the value is true, you can't terminate the instance through the Amazon - // EC2 console, CLI, or API; otherwise, you can. - DisableApiTermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"` - - // Indicates whether the instance is optimized for Amazon EBS I/O. - EbsOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"` - - // Indicates whether enhanced networking with ENA is enabled. - EnaSupport *AttributeBooleanValue `locationName:"enaSupport" type:"structure"` - - // The security groups associated with the instance. - Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - InstanceInitiatedShutdownBehavior *AttributeValue `locationName:"instanceInitiatedShutdownBehavior" type:"structure"` - - // The instance type. - InstanceType *AttributeValue `locationName:"instanceType" type:"structure"` - - // The kernel ID. - KernelId *AttributeValue `locationName:"kernel" type:"structure"` - - // A list of product codes. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` - - // The RAM disk ID. - RamdiskId *AttributeValue `locationName:"ramdisk" type:"structure"` - - // The device name of the root device volume (for example, /dev/sda1). - RootDeviceName *AttributeValue `locationName:"rootDeviceName" type:"structure"` - - // Indicates whether source/destination checking is enabled. A value of true - // means that checking is enabled, and false means that checking is disabled. - // This value must be false for a NAT instance to perform NAT. - SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"` - - // Indicates whether enhanced networking with the Intel 82599 Virtual Function - // interface is enabled. - SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` - - // The user data. - UserData *AttributeValue `locationName:"userData" type:"structure"` -} - -// String returns the string representation -func (s DescribeInstanceAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstanceAttributeOutput) GoString() string { - return s.String() -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *DescribeInstanceAttributeOutput) SetBlockDeviceMappings(v []*InstanceBlockDeviceMapping) *DescribeInstanceAttributeOutput { - s.BlockDeviceMappings = v - return s -} - -// SetDisableApiTermination sets the DisableApiTermination field's value. -func (s *DescribeInstanceAttributeOutput) SetDisableApiTermination(v *AttributeBooleanValue) *DescribeInstanceAttributeOutput { - s.DisableApiTermination = v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *DescribeInstanceAttributeOutput) SetEbsOptimized(v *AttributeBooleanValue) *DescribeInstanceAttributeOutput { - s.EbsOptimized = v - return s -} - -// SetEnaSupport sets the EnaSupport field's value. -func (s *DescribeInstanceAttributeOutput) SetEnaSupport(v *AttributeBooleanValue) *DescribeInstanceAttributeOutput { - s.EnaSupport = v - return s -} - -// SetGroups sets the Groups field's value. -func (s *DescribeInstanceAttributeOutput) SetGroups(v []*GroupIdentifier) *DescribeInstanceAttributeOutput { - s.Groups = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DescribeInstanceAttributeOutput) SetInstanceId(v string) *DescribeInstanceAttributeOutput { - s.InstanceId = &v - return s -} - -// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. -func (s *DescribeInstanceAttributeOutput) SetInstanceInitiatedShutdownBehavior(v *AttributeValue) *DescribeInstanceAttributeOutput { - s.InstanceInitiatedShutdownBehavior = v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *DescribeInstanceAttributeOutput) SetInstanceType(v *AttributeValue) *DescribeInstanceAttributeOutput { - s.InstanceType = v - return s -} - -// SetKernelId sets the KernelId field's value. -func (s *DescribeInstanceAttributeOutput) SetKernelId(v *AttributeValue) *DescribeInstanceAttributeOutput { - s.KernelId = v - return s -} - -// SetProductCodes sets the ProductCodes field's value. -func (s *DescribeInstanceAttributeOutput) SetProductCodes(v []*ProductCode) *DescribeInstanceAttributeOutput { - s.ProductCodes = v - return s -} - -// SetRamdiskId sets the RamdiskId field's value. -func (s *DescribeInstanceAttributeOutput) SetRamdiskId(v *AttributeValue) *DescribeInstanceAttributeOutput { - s.RamdiskId = v - return s -} - -// SetRootDeviceName sets the RootDeviceName field's value. -func (s *DescribeInstanceAttributeOutput) SetRootDeviceName(v *AttributeValue) *DescribeInstanceAttributeOutput { - s.RootDeviceName = v - return s -} - -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *DescribeInstanceAttributeOutput) SetSourceDestCheck(v *AttributeBooleanValue) *DescribeInstanceAttributeOutput { - s.SourceDestCheck = v - return s -} - -// SetSriovNetSupport sets the SriovNetSupport field's value. -func (s *DescribeInstanceAttributeOutput) SetSriovNetSupport(v *AttributeValue) *DescribeInstanceAttributeOutput { - s.SriovNetSupport = v - return s -} - -// SetUserData sets the UserData field's value. -func (s *DescribeInstanceAttributeOutput) SetUserData(v *AttributeValue) *DescribeInstanceAttributeOutput { - s.UserData = v - return s -} - -type DescribeInstanceCreditSpecificationsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * instance-id - The ID of the instance. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more instance IDs. - // - // Default: Describes all your instances. - // - // Constraints: Maximum 1000 explicitly specified instance IDs. - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. This - // value can be between 5 and 1000. You cannot specify this parameter and the - // instance IDs parameter in the same call. - MaxResults *int64 `type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeInstanceCreditSpecificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstanceCreditSpecificationsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeInstanceCreditSpecificationsInput) SetDryRun(v bool) *DescribeInstanceCreditSpecificationsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeInstanceCreditSpecificationsInput) SetFilters(v []*Filter) *DescribeInstanceCreditSpecificationsInput { - s.Filters = v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *DescribeInstanceCreditSpecificationsInput) SetInstanceIds(v []*string) *DescribeInstanceCreditSpecificationsInput { - s.InstanceIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeInstanceCreditSpecificationsInput) SetMaxResults(v int64) *DescribeInstanceCreditSpecificationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstanceCreditSpecificationsInput) SetNextToken(v string) *DescribeInstanceCreditSpecificationsInput { - s.NextToken = &v - return s -} - -type DescribeInstanceCreditSpecificationsOutput struct { - _ struct{} `type:"structure"` - - // Information about the credit option for CPU usage of an instance. - InstanceCreditSpecifications []*InstanceCreditSpecification `locationName:"instanceCreditSpecificationSet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeInstanceCreditSpecificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstanceCreditSpecificationsOutput) GoString() string { - return s.String() -} - -// SetInstanceCreditSpecifications sets the InstanceCreditSpecifications field's value. -func (s *DescribeInstanceCreditSpecificationsOutput) SetInstanceCreditSpecifications(v []*InstanceCreditSpecification) *DescribeInstanceCreditSpecificationsOutput { - s.InstanceCreditSpecifications = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstanceCreditSpecificationsOutput) SetNextToken(v string) *DescribeInstanceCreditSpecificationsOutput { - s.NextToken = &v - return s -} - -type DescribeInstanceStatusInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * availability-zone - The Availability Zone of the instance. - // - // * event.code - The code for the scheduled event (instance-reboot | system-reboot - // | system-maintenance | instance-retirement | instance-stop). - // - // * event.description - A description of the event. - // - // * event.not-after - The latest end time for the scheduled event (for example, - // 2014-09-15T17:15:20.000Z). - // - // * event.not-before - The earliest start time for the scheduled event (for - // example, 2014-09-15T17:15:20.000Z). - // - // * instance-state-code - The code for the instance state, as a 16-bit unsigned - // integer. The high byte is used for internal purposes and should be ignored. - // The low byte is set based on the state represented. The valid values are - // 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), - // and 80 (stopped). - // - // * instance-state-name - The state of the instance (pending | running | - // shutting-down | terminated | stopping | stopped). - // - // * instance-status.reachability - Filters on instance status where the - // name is reachability (passed | failed | initializing | insufficient-data). - // - // * instance-status.status - The status of the instance (ok | impaired | - // initializing | insufficient-data | not-applicable). - // - // * system-status.reachability - Filters on system status where the name - // is reachability (passed | failed | initializing | insufficient-data). - // - // * system-status.status - The system status of the instance (ok | impaired - // | initializing | insufficient-data | not-applicable). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // When true, includes the health status for all instances. When false, includes - // the health status for running instances only. - // - // Default: false - IncludeAllInstances *bool `locationName:"includeAllInstances" type:"boolean"` - - // One or more instance IDs. - // - // Default: Describes all your instances. - // - // Constraints: Maximum 100 explicitly specified instance IDs. - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. This - // value can be between 5 and 1000. You cannot specify this parameter and the - // instance IDs parameter in the same call. - MaxResults *int64 `type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeInstanceStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstanceStatusInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeInstanceStatusInput) SetDryRun(v bool) *DescribeInstanceStatusInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeInstanceStatusInput) SetFilters(v []*Filter) *DescribeInstanceStatusInput { - s.Filters = v - return s -} - -// SetIncludeAllInstances sets the IncludeAllInstances field's value. -func (s *DescribeInstanceStatusInput) SetIncludeAllInstances(v bool) *DescribeInstanceStatusInput { - s.IncludeAllInstances = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *DescribeInstanceStatusInput) SetInstanceIds(v []*string) *DescribeInstanceStatusInput { - s.InstanceIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeInstanceStatusInput) SetMaxResults(v int64) *DescribeInstanceStatusInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstanceStatusInput) SetNextToken(v string) *DescribeInstanceStatusInput { - s.NextToken = &v - return s -} - -type DescribeInstanceStatusOutput struct { - _ struct{} `type:"structure"` - - // One or more instance status descriptions. - InstanceStatuses []*InstanceStatus `locationName:"instanceStatusSet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeInstanceStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstanceStatusOutput) GoString() string { - return s.String() -} - -// SetInstanceStatuses sets the InstanceStatuses field's value. -func (s *DescribeInstanceStatusOutput) SetInstanceStatuses(v []*InstanceStatus) *DescribeInstanceStatusOutput { - s.InstanceStatuses = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstanceStatusOutput) SetNextToken(v string) *DescribeInstanceStatusOutput { - s.NextToken = &v - return s -} - -type DescribeInstancesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * affinity - The affinity setting for an instance running on a Dedicated - // Host (default | host). - // - // * architecture - The instance architecture (i386 | x86_64). - // - // * availability-zone - The Availability Zone of the instance. - // - // * block-device-mapping.attach-time - The attach time for an EBS volume - // mapped to the instance, for example, 2010-09-15T17:15:20.000Z. - // - // * block-device-mapping.delete-on-termination - A Boolean that indicates - // whether the EBS volume is deleted on instance termination. - // - // * block-device-mapping.device-name - The device name specified in the - // block device mapping (for example, /dev/sdh or xvdh). - // - // * block-device-mapping.status - The status for the EBS volume (attaching - // | attached | detaching | detached). - // - // * block-device-mapping.volume-id - The volume ID of the EBS volume. - // - // * client-token - The idempotency token you provided when you launched - // the instance. - // - // * dns-name - The public DNS name of the instance. - // - // * group-id - The ID of the security group for the instance. EC2-Classic - // only. - // - // * group-name - The name of the security group for the instance. EC2-Classic - // only. - // - // * hibernation-options.configured - A Boolean that indicates whether the - // instance is enabled for hibernation. A value of true means that the instance - // is enabled for hibernation. - // - // * host-id - The ID of the Dedicated Host on which the instance is running, - // if applicable. - // - // * hypervisor - The hypervisor type of the instance (ovm | xen). - // - // * iam-instance-profile.arn - The instance profile associated with the - // instance. Specified as an ARN. - // - // * image-id - The ID of the image used to launch the instance. - // - // * instance-id - The ID of the instance. - // - // * instance-lifecycle - Indicates whether this is a Spot Instance or a - // Scheduled Instance (spot | scheduled). - // - // * instance-state-code - The state of the instance, as a 16-bit unsigned - // integer. The high byte is used for internal purposes and should be ignored. - // The low byte is set based on the state represented. The valid values are: - // 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), - // and 80 (stopped). - // - // * instance-state-name - The state of the instance (pending | running | - // shutting-down | terminated | stopping | stopped). - // - // * instance-type - The type of instance (for example, t2.micro). - // - // * instance.group-id - The ID of the security group for the instance. - // - // * instance.group-name - The name of the security group for the instance. - // - // - // * ip-address - The public IPv4 address of the instance. - // - // * kernel-id - The kernel ID. - // - // * key-name - The name of the key pair used when the instance was launched. - // - // * launch-index - When launching multiple instances, this is the index - // for the instance in the launch group (for example, 0, 1, 2, and so on). - // - // - // * launch-time - The time when the instance was launched. - // - // * monitoring-state - Indicates whether detailed monitoring is enabled - // (disabled | enabled). - // - // * network-interface.addresses.private-ip-address - The private IPv4 address - // associated with the network interface. - // - // * network-interface.addresses.primary - Specifies whether the IPv4 address - // of the network interface is the primary private IPv4 address. - // - // * network-interface.addresses.association.public-ip - The ID of the association - // of an Elastic IP address (IPv4) with a network interface. - // - // * network-interface.addresses.association.ip-owner-id - The owner ID of - // the private IPv4 address associated with the network interface. - // - // * network-interface.association.public-ip - The address of the Elastic - // IP address (IPv4) bound to the network interface. - // - // * network-interface.association.ip-owner-id - The owner of the Elastic - // IP address (IPv4) associated with the network interface. - // - // * network-interface.association.allocation-id - The allocation ID returned - // when you allocated the Elastic IP address (IPv4) for your network interface. - // - // * network-interface.association.association-id - The association ID returned - // when the network interface was associated with an IPv4 address. - // - // * network-interface.attachment.attachment-id - The ID of the interface - // attachment. - // - // * network-interface.attachment.instance-id - The ID of the instance to - // which the network interface is attached. - // - // * network-interface.attachment.instance-owner-id - The owner ID of the - // instance to which the network interface is attached. - // - // * network-interface.attachment.device-index - The device index to which - // the network interface is attached. - // - // * network-interface.attachment.status - The status of the attachment (attaching - // | attached | detaching | detached). - // - // * network-interface.attachment.attach-time - The time that the network - // interface was attached to an instance. - // - // * network-interface.attachment.delete-on-termination - Specifies whether - // the attachment is deleted when an instance is terminated. - // - // * network-interface.availability-zone - The Availability Zone for the - // network interface. - // - // * network-interface.description - The description of the network interface. - // - // * network-interface.group-id - The ID of a security group associated with - // the network interface. - // - // * network-interface.group-name - The name of a security group associated - // with the network interface. - // - // * network-interface.ipv6-addresses.ipv6-address - The IPv6 address associated - // with the network interface. - // - // * network-interface.mac-address - The MAC address of the network interface. - // - // * network-interface.network-interface-id - The ID of the network interface. - // - // * network-interface.owner-id - The ID of the owner of the network interface. - // - // * network-interface.private-dns-name - The private DNS name of the network - // interface. - // - // * network-interface.requester-id - The requester ID for the network interface. - // - // * network-interface.requester-managed - Indicates whether the network - // interface is being managed by AWS. - // - // * network-interface.status - The status of the network interface (available) - // | in-use). - // - // * network-interface.source-dest-check - Whether the network interface - // performs source/destination checking. A value of true means that checking - // is enabled, and false means that checking is disabled. The value must - // be false for the network interface to perform network address translation - // (NAT) in your VPC. - // - // * network-interface.subnet-id - The ID of the subnet for the network interface. - // - // * network-interface.vpc-id - The ID of the VPC for the network interface. - // - // * owner-id - The AWS account ID of the instance owner. - // - // * placement-group-name - The name of the placement group for the instance. - // - // * placement-partition-number - The partition in which the instance is - // located. - // - // * platform - The platform. Use windows if you have Windows instances; - // otherwise, leave blank. - // - // * private-dns-name - The private IPv4 DNS name of the instance. - // - // * private-ip-address - The private IPv4 address of the instance. - // - // * product-code - The product code associated with the AMI used to launch - // the instance. - // - // * product-code.type - The type of product code (devpay | marketplace). - // - // * ramdisk-id - The RAM disk ID. - // - // * reason - The reason for the current state of the instance (for example, - // shows "User Initiated [date]" when you stop or terminate the instance). - // Similar to the state-reason-code filter. - // - // * requester-id - The ID of the entity that launched the instance on your - // behalf (for example, AWS Management Console, Auto Scaling, and so on). - // - // * reservation-id - The ID of the instance's reservation. A reservation - // ID is created any time you launch an instance. A reservation ID has a - // one-to-one relationship with an instance launch request, but can be associated - // with more than one instance if you launch multiple instances using the - // same launch request. For example, if you launch one instance, you get - // one reservation ID. If you launch ten instances using the same launch - // request, you also get one reservation ID. - // - // * root-device-name - The device name of the root device volume (for example, - // /dev/sda1). - // - // * root-device-type - The type of the root device volume (ebs | instance-store). - // - // * source-dest-check - Indicates whether the instance performs source/destination - // checking. A value of true means that checking is enabled, and false means - // that checking is disabled. The value must be false for the instance to - // perform network address translation (NAT) in your VPC. - // - // * spot-instance-request-id - The ID of the Spot Instance request. - // - // * state-reason-code - The reason code for the state change. - // - // * state-reason-message - A message that describes the state change. - // - // * subnet-id - The ID of the subnet for the instance. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources that have a tag with a specific key, regardless - // of the tag value. - // - // * tenancy - The tenancy of an instance (dedicated | default | host). - // - // * virtualization-type - The virtualization type of the instance (paravirtual - // | hvm). - // - // * vpc-id - The ID of the VPC that the instance is running in. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more instance IDs. - // - // Default: Describes all your instances. - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. This - // value can be between 5 and 1000. You cannot specify this parameter and the - // instance IDs parameter in the same call. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token to request the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstancesInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeInstancesInput) SetDryRun(v bool) *DescribeInstancesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeInstancesInput) SetFilters(v []*Filter) *DescribeInstancesInput { - s.Filters = v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *DescribeInstancesInput) SetInstanceIds(v []*string) *DescribeInstancesInput { - s.InstanceIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeInstancesInput) SetMaxResults(v int64) *DescribeInstancesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstancesInput) SetNextToken(v string) *DescribeInstancesInput { - s.NextToken = &v - return s -} - -type DescribeInstancesOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Zero or more reservations. - Reservations []*Reservation `locationName:"reservationSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstancesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstancesOutput) SetNextToken(v string) *DescribeInstancesOutput { - s.NextToken = &v - return s -} - -// SetReservations sets the Reservations field's value. -func (s *DescribeInstancesOutput) SetReservations(v []*Reservation) *DescribeInstancesOutput { - s.Reservations = v - return s -} - -type DescribeInternetGatewaysInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * attachment.state - The current state of the attachment between the gateway - // and the VPC (available). Present only if a VPC is attached. - // - // * attachment.vpc-id - The ID of an attached VPC. - // - // * internet-gateway-id - The ID of the Internet gateway. - // - // * owner-id - The ID of the AWS account that owns the internet gateway. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more internet gateway IDs. - // - // Default: Describes all your internet gateways. - InternetGatewayIds []*string `locationName:"internetGatewayId" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeInternetGatewaysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInternetGatewaysInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeInternetGatewaysInput) SetDryRun(v bool) *DescribeInternetGatewaysInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeInternetGatewaysInput) SetFilters(v []*Filter) *DescribeInternetGatewaysInput { - s.Filters = v - return s -} - -// SetInternetGatewayIds sets the InternetGatewayIds field's value. -func (s *DescribeInternetGatewaysInput) SetInternetGatewayIds(v []*string) *DescribeInternetGatewaysInput { - s.InternetGatewayIds = v - return s -} - -type DescribeInternetGatewaysOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more internet gateways. - InternetGateways []*InternetGateway `locationName:"internetGatewaySet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeInternetGatewaysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInternetGatewaysOutput) GoString() string { - return s.String() -} - -// SetInternetGateways sets the InternetGateways field's value. -func (s *DescribeInternetGatewaysOutput) SetInternetGateways(v []*InternetGateway) *DescribeInternetGatewaysOutput { - s.InternetGateways = v - return s -} - -type DescribeKeyPairsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * fingerprint - The fingerprint of the key pair. - // - // * key-name - The name of the key pair. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more key pair names. - // - // Default: Describes all your key pairs. - KeyNames []*string `locationName:"KeyName" locationNameList:"KeyName" type:"list"` -} - -// String returns the string representation -func (s DescribeKeyPairsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeKeyPairsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeKeyPairsInput) SetDryRun(v bool) *DescribeKeyPairsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeKeyPairsInput) SetFilters(v []*Filter) *DescribeKeyPairsInput { - s.Filters = v - return s -} - -// SetKeyNames sets the KeyNames field's value. -func (s *DescribeKeyPairsInput) SetKeyNames(v []*string) *DescribeKeyPairsInput { - s.KeyNames = v - return s -} - -type DescribeKeyPairsOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more key pairs. - KeyPairs []*KeyPairInfo `locationName:"keySet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeKeyPairsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeKeyPairsOutput) GoString() string { - return s.String() -} - -// SetKeyPairs sets the KeyPairs field's value. -func (s *DescribeKeyPairsOutput) SetKeyPairs(v []*KeyPairInfo) *DescribeKeyPairsOutput { - s.KeyPairs = v - return s -} - -type DescribeLaunchTemplateVersionsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * create-time - The time the launch template version was created. - // - // * ebs-optimized - A boolean that indicates whether the instance is optimized - // for Amazon EBS I/O. - // - // * iam-instance-profile - The ARN of the IAM instance profile. - // - // * image-id - The ID of the AMI. - // - // * instance-type - The instance type. - // - // * is-default-version - A boolean that indicates whether the launch template - // version is the default version. - // - // * kernel-id - The kernel ID. - // - // * ram-disk-id - The RAM disk ID. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The ID of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateId *string `type:"string"` - - // The name of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateName *string `min:"3" type:"string"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. This - // value can be between 1 and 200. - MaxResults *int64 `type:"integer"` - - // The version number up to which to describe launch template versions. - MaxVersion *string `type:"string"` - - // The version number after which to describe launch template versions. - MinVersion *string `type:"string"` - - // The token to request the next page of results. - NextToken *string `type:"string"` - - // One or more versions of the launch template. - Versions []*string `locationName:"LaunchTemplateVersion" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeLaunchTemplateVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLaunchTemplateVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLaunchTemplateVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLaunchTemplateVersionsInput"} - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetDryRun(v bool) *DescribeLaunchTemplateVersionsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetFilters(v []*Filter) *DescribeLaunchTemplateVersionsInput { - s.Filters = v - return s -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetLaunchTemplateId(v string) *DescribeLaunchTemplateVersionsInput { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetLaunchTemplateName(v string) *DescribeLaunchTemplateVersionsInput { - s.LaunchTemplateName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetMaxResults(v int64) *DescribeLaunchTemplateVersionsInput { - s.MaxResults = &v - return s -} - -// SetMaxVersion sets the MaxVersion field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetMaxVersion(v string) *DescribeLaunchTemplateVersionsInput { - s.MaxVersion = &v - return s -} - -// SetMinVersion sets the MinVersion field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetMinVersion(v string) *DescribeLaunchTemplateVersionsInput { - s.MinVersion = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetNextToken(v string) *DescribeLaunchTemplateVersionsInput { - s.NextToken = &v - return s -} - -// SetVersions sets the Versions field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetVersions(v []*string) *DescribeLaunchTemplateVersionsInput { - s.Versions = v - return s -} - -type DescribeLaunchTemplateVersionsOutput struct { - _ struct{} `type:"structure"` - - // Information about the launch template versions. - LaunchTemplateVersions []*LaunchTemplateVersion `locationName:"launchTemplateVersionSet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeLaunchTemplateVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLaunchTemplateVersionsOutput) GoString() string { - return s.String() -} - -// SetLaunchTemplateVersions sets the LaunchTemplateVersions field's value. -func (s *DescribeLaunchTemplateVersionsOutput) SetLaunchTemplateVersions(v []*LaunchTemplateVersion) *DescribeLaunchTemplateVersionsOutput { - s.LaunchTemplateVersions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLaunchTemplateVersionsOutput) SetNextToken(v string) *DescribeLaunchTemplateVersionsOutput { - s.NextToken = &v - return s -} - -type DescribeLaunchTemplatesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * create-time - The time the launch template was created. - // - // * launch-template-name - The name of the launch template. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more launch template IDs. - LaunchTemplateIds []*string `locationName:"LaunchTemplateId" locationNameList:"item" type:"list"` - - // One or more launch template names. - LaunchTemplateNames []*string `locationName:"LaunchTemplateName" locationNameList:"item" type:"list"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. This - // value can be between 1 and 200. - MaxResults *int64 `type:"integer"` - - // The token to request the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeLaunchTemplatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLaunchTemplatesInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeLaunchTemplatesInput) SetDryRun(v bool) *DescribeLaunchTemplatesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeLaunchTemplatesInput) SetFilters(v []*Filter) *DescribeLaunchTemplatesInput { - s.Filters = v - return s -} - -// SetLaunchTemplateIds sets the LaunchTemplateIds field's value. -func (s *DescribeLaunchTemplatesInput) SetLaunchTemplateIds(v []*string) *DescribeLaunchTemplatesInput { - s.LaunchTemplateIds = v - return s -} - -// SetLaunchTemplateNames sets the LaunchTemplateNames field's value. -func (s *DescribeLaunchTemplatesInput) SetLaunchTemplateNames(v []*string) *DescribeLaunchTemplatesInput { - s.LaunchTemplateNames = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeLaunchTemplatesInput) SetMaxResults(v int64) *DescribeLaunchTemplatesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLaunchTemplatesInput) SetNextToken(v string) *DescribeLaunchTemplatesInput { - s.NextToken = &v - return s -} - -type DescribeLaunchTemplatesOutput struct { - _ struct{} `type:"structure"` - - // Information about the launch templates. - LaunchTemplates []*LaunchTemplate `locationName:"launchTemplates" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeLaunchTemplatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLaunchTemplatesOutput) GoString() string { - return s.String() -} - -// SetLaunchTemplates sets the LaunchTemplates field's value. -func (s *DescribeLaunchTemplatesOutput) SetLaunchTemplates(v []*LaunchTemplate) *DescribeLaunchTemplatesOutput { - s.LaunchTemplates = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLaunchTemplatesOutput) SetNextToken(v string) *DescribeLaunchTemplatesOutput { - s.NextToken = &v - return s -} - -type DescribeMovingAddressesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * moving-status - The status of the Elastic IP address (MovingToVpc | - // RestoringToClassic). - Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. This value can be between 5 and - // 1000; if MaxResults is given a value outside of this range, an error is returned. - // - // Default: If no value is provided, the default is 1000. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token for the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // One or more Elastic IP addresses. - PublicIps []*string `locationName:"publicIp" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeMovingAddressesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMovingAddressesInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeMovingAddressesInput) SetDryRun(v bool) *DescribeMovingAddressesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeMovingAddressesInput) SetFilters(v []*Filter) *DescribeMovingAddressesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeMovingAddressesInput) SetMaxResults(v int64) *DescribeMovingAddressesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMovingAddressesInput) SetNextToken(v string) *DescribeMovingAddressesInput { - s.NextToken = &v - return s -} - -// SetPublicIps sets the PublicIps field's value. -func (s *DescribeMovingAddressesInput) SetPublicIps(v []*string) *DescribeMovingAddressesInput { - s.PublicIps = v - return s -} - -type DescribeMovingAddressesOutput struct { - _ struct{} `type:"structure"` - - // The status for each Elastic IP address. - MovingAddressStatuses []*MovingAddressStatus `locationName:"movingAddressStatusSet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeMovingAddressesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMovingAddressesOutput) GoString() string { - return s.String() -} - -// SetMovingAddressStatuses sets the MovingAddressStatuses field's value. -func (s *DescribeMovingAddressesOutput) SetMovingAddressStatuses(v []*MovingAddressStatus) *DescribeMovingAddressesOutput { - s.MovingAddressStatuses = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMovingAddressesOutput) SetNextToken(v string) *DescribeMovingAddressesOutput { - s.NextToken = &v - return s -} - -type DescribeNatGatewaysInput struct { - _ struct{} `type:"structure"` - - // One or more filters. - // - // * nat-gateway-id - The ID of the NAT gateway. - // - // * state - The state of the NAT gateway (pending | failed | available | - // deleting | deleted). - // - // * subnet-id - The ID of the subnet in which the NAT gateway resides. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * vpc-id - The ID of the VPC in which the NAT gateway resides. - Filter []*Filter `locationNameList:"Filter" type:"list"` - - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. - // - // Constraint: If the value specified is greater than 1000, we return only 1000 - // items. - MaxResults *int64 `type:"integer"` - - // One or more NAT gateway IDs. - NatGatewayIds []*string `locationName:"NatGatewayId" locationNameList:"item" type:"list"` - - // The token to retrieve the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeNatGatewaysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNatGatewaysInput) GoString() string { - return s.String() -} - -// SetFilter sets the Filter field's value. -func (s *DescribeNatGatewaysInput) SetFilter(v []*Filter) *DescribeNatGatewaysInput { - s.Filter = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeNatGatewaysInput) SetMaxResults(v int64) *DescribeNatGatewaysInput { - s.MaxResults = &v - return s -} - -// SetNatGatewayIds sets the NatGatewayIds field's value. -func (s *DescribeNatGatewaysInput) SetNatGatewayIds(v []*string) *DescribeNatGatewaysInput { - s.NatGatewayIds = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeNatGatewaysInput) SetNextToken(v string) *DescribeNatGatewaysInput { - s.NextToken = &v - return s -} - -type DescribeNatGatewaysOutput struct { - _ struct{} `type:"structure"` - - // Information about the NAT gateways. - NatGateways []*NatGateway `locationName:"natGatewaySet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeNatGatewaysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNatGatewaysOutput) GoString() string { - return s.String() -} - -// SetNatGateways sets the NatGateways field's value. -func (s *DescribeNatGatewaysOutput) SetNatGateways(v []*NatGateway) *DescribeNatGatewaysOutput { - s.NatGateways = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeNatGatewaysOutput) SetNextToken(v string) *DescribeNatGatewaysOutput { - s.NextToken = &v - return s -} - -type DescribeNetworkAclsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * association.association-id - The ID of an association ID for the ACL. - // - // * association.network-acl-id - The ID of the network ACL involved in the - // association. - // - // * association.subnet-id - The ID of the subnet involved in the association. - // - // * default - Indicates whether the ACL is the default network ACL for the - // VPC. - // - // * entry.cidr - The IPv4 CIDR range specified in the entry. - // - // * entry.icmp.code - The ICMP code specified in the entry, if any. - // - // * entry.icmp.type - The ICMP type specified in the entry, if any. - // - // * entry.ipv6-cidr - The IPv6 CIDR range specified in the entry. - // - // * entry.port-range.from - The start of the port range specified in the - // entry. - // - // * entry.port-range.to - The end of the port range specified in the entry. - // - // - // * entry.protocol - The protocol specified in the entry (tcp | udp | icmp - // or a protocol number). - // - // * entry.rule-action - Allows or denies the matching traffic (allow | deny). - // - // * entry.rule-number - The number of an entry (in other words, rule) in - // the set of ACL entries. - // - // * network-acl-id - The ID of the network ACL. - // - // * owner-id - The ID of the AWS account that owns the network ACL. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * vpc-id - The ID of the VPC for the network ACL. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more network ACL IDs. - // - // Default: Describes all your network ACLs. - NetworkAclIds []*string `locationName:"NetworkAclId" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeNetworkAclsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNetworkAclsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeNetworkAclsInput) SetDryRun(v bool) *DescribeNetworkAclsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeNetworkAclsInput) SetFilters(v []*Filter) *DescribeNetworkAclsInput { - s.Filters = v - return s -} - -// SetNetworkAclIds sets the NetworkAclIds field's value. -func (s *DescribeNetworkAclsInput) SetNetworkAclIds(v []*string) *DescribeNetworkAclsInput { - s.NetworkAclIds = v - return s -} - -type DescribeNetworkAclsOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more network ACLs. - NetworkAcls []*NetworkAcl `locationName:"networkAclSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeNetworkAclsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNetworkAclsOutput) GoString() string { - return s.String() -} - -// SetNetworkAcls sets the NetworkAcls field's value. -func (s *DescribeNetworkAclsOutput) SetNetworkAcls(v []*NetworkAcl) *DescribeNetworkAclsOutput { - s.NetworkAcls = v - return s -} - -// Contains the parameters for DescribeNetworkInterfaceAttribute. -type DescribeNetworkInterfaceAttributeInput struct { - _ struct{} `type:"structure"` - - // The attribute of the network interface. This parameter is required. - Attribute *string `locationName:"attribute" type:"string" enum:"NetworkInterfaceAttribute"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the network interface. - // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeNetworkInterfaceAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNetworkInterfaceAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeNetworkInterfaceAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeNetworkInterfaceAttributeInput"} - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *DescribeNetworkInterfaceAttributeInput) SetAttribute(v string) *DescribeNetworkInterfaceAttributeInput { - s.Attribute = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeNetworkInterfaceAttributeInput) SetDryRun(v bool) *DescribeNetworkInterfaceAttributeInput { - s.DryRun = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *DescribeNetworkInterfaceAttributeInput) SetNetworkInterfaceId(v string) *DescribeNetworkInterfaceAttributeInput { - s.NetworkInterfaceId = &v - return s -} - -// Contains the output of DescribeNetworkInterfaceAttribute. -type DescribeNetworkInterfaceAttributeOutput struct { - _ struct{} `type:"structure"` - - // The attachment (if any) of the network interface. - Attachment *NetworkInterfaceAttachment `locationName:"attachment" type:"structure"` - - // The description of the network interface. - Description *AttributeValue `locationName:"description" type:"structure"` - - // The security groups associated with the network interface. - Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // Indicates whether source/destination checking is enabled. - SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"` -} - -// String returns the string representation -func (s DescribeNetworkInterfaceAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNetworkInterfaceAttributeOutput) GoString() string { - return s.String() -} - -// SetAttachment sets the Attachment field's value. -func (s *DescribeNetworkInterfaceAttributeOutput) SetAttachment(v *NetworkInterfaceAttachment) *DescribeNetworkInterfaceAttributeOutput { - s.Attachment = v - return s -} - -// SetDescription sets the Description field's value. -func (s *DescribeNetworkInterfaceAttributeOutput) SetDescription(v *AttributeValue) *DescribeNetworkInterfaceAttributeOutput { - s.Description = v - return s -} - -// SetGroups sets the Groups field's value. -func (s *DescribeNetworkInterfaceAttributeOutput) SetGroups(v []*GroupIdentifier) *DescribeNetworkInterfaceAttributeOutput { - s.Groups = v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *DescribeNetworkInterfaceAttributeOutput) SetNetworkInterfaceId(v string) *DescribeNetworkInterfaceAttributeOutput { - s.NetworkInterfaceId = &v - return s -} - -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *DescribeNetworkInterfaceAttributeOutput) SetSourceDestCheck(v *AttributeBooleanValue) *DescribeNetworkInterfaceAttributeOutput { - s.SourceDestCheck = v - return s -} - -// Contains the parameters for DescribeNetworkInterfacePermissions. -type DescribeNetworkInterfacePermissionsInput struct { - _ struct{} `type:"structure"` - - // One or more filters. - // - // * network-interface-permission.network-interface-permission-id - The ID - // of the permission. - // - // * network-interface-permission.network-interface-id - The ID of the network - // interface. - // - // * network-interface-permission.aws-account-id - The AWS account ID. - // - // * network-interface-permission.aws-service - The AWS service. - // - // * network-interface-permission.permission - The type of permission (INSTANCE-ATTACH - // | EIP-ASSOCIATE). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. If - // this parameter is not specified, up to 50 results are returned by default. - MaxResults *int64 `type:"integer"` - - // One or more network interface permission IDs. - NetworkInterfacePermissionIds []*string `locationName:"NetworkInterfacePermissionId" type:"list"` - - // The token to request the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeNetworkInterfacePermissionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNetworkInterfacePermissionsInput) GoString() string { - return s.String() -} - -// SetFilters sets the Filters field's value. -func (s *DescribeNetworkInterfacePermissionsInput) SetFilters(v []*Filter) *DescribeNetworkInterfacePermissionsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeNetworkInterfacePermissionsInput) SetMaxResults(v int64) *DescribeNetworkInterfacePermissionsInput { - s.MaxResults = &v - return s -} - -// SetNetworkInterfacePermissionIds sets the NetworkInterfacePermissionIds field's value. -func (s *DescribeNetworkInterfacePermissionsInput) SetNetworkInterfacePermissionIds(v []*string) *DescribeNetworkInterfacePermissionsInput { - s.NetworkInterfacePermissionIds = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeNetworkInterfacePermissionsInput) SetNextToken(v string) *DescribeNetworkInterfacePermissionsInput { - s.NextToken = &v - return s -} - -// Contains the output for DescribeNetworkInterfacePermissions. -type DescribeNetworkInterfacePermissionsOutput struct { - _ struct{} `type:"structure"` - - // The network interface permissions. - NetworkInterfacePermissions []*NetworkInterfacePermission `locationName:"networkInterfacePermissions" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeNetworkInterfacePermissionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNetworkInterfacePermissionsOutput) GoString() string { - return s.String() -} - -// SetNetworkInterfacePermissions sets the NetworkInterfacePermissions field's value. -func (s *DescribeNetworkInterfacePermissionsOutput) SetNetworkInterfacePermissions(v []*NetworkInterfacePermission) *DescribeNetworkInterfacePermissionsOutput { - s.NetworkInterfacePermissions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeNetworkInterfacePermissionsOutput) SetNextToken(v string) *DescribeNetworkInterfacePermissionsOutput { - s.NextToken = &v - return s -} - -// Contains the parameters for DescribeNetworkInterfaces. -type DescribeNetworkInterfacesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * addresses.private-ip-address - The private IPv4 addresses associated - // with the network interface. - // - // * addresses.primary - Whether the private IPv4 address is the primary - // IP address associated with the network interface. - // - // * addresses.association.public-ip - The association ID returned when the - // network interface was associated with the Elastic IP address (IPv4). - // - // * addresses.association.owner-id - The owner ID of the addresses associated - // with the network interface. - // - // * association.association-id - The association ID returned when the network - // interface was associated with an IPv4 address. - // - // * association.allocation-id - The allocation ID returned when you allocated - // the Elastic IP address (IPv4) for your network interface. - // - // * association.ip-owner-id - The owner of the Elastic IP address (IPv4) - // associated with the network interface. - // - // * association.public-ip - The address of the Elastic IP address (IPv4) - // bound to the network interface. - // - // * association.public-dns-name - The public DNS name for the network interface - // (IPv4). - // - // * attachment.attachment-id - The ID of the interface attachment. - // - // * attachment.attach.time - The time that the network interface was attached - // to an instance. - // - // * attachment.delete-on-termination - Indicates whether the attachment - // is deleted when an instance is terminated. - // - // * attachment.device-index - The device index to which the network interface - // is attached. - // - // * attachment.instance-id - The ID of the instance to which the network - // interface is attached. - // - // * attachment.instance-owner-id - The owner ID of the instance to which - // the network interface is attached. - // - // * attachment.nat-gateway-id - The ID of the NAT gateway to which the network - // interface is attached. - // - // * attachment.status - The status of the attachment (attaching | attached - // | detaching | detached). - // - // * availability-zone - The Availability Zone of the network interface. - // - // * description - The description of the network interface. - // - // * group-id - The ID of a security group associated with the network interface. - // - // * group-name - The name of a security group associated with the network - // interface. - // - // * ipv6-addresses.ipv6-address - An IPv6 address associated with the network - // interface. - // - // * mac-address - The MAC address of the network interface. - // - // * network-interface-id - The ID of the network interface. - // - // * owner-id - The AWS account ID of the network interface owner. - // - // * private-ip-address - The private IPv4 address or addresses of the network - // interface. - // - // * private-dns-name - The private DNS name of the network interface (IPv4). - // - // * requester-id - The ID of the entity that launched the instance on your - // behalf (for example, AWS Management Console, Auto Scaling, and so on). - // - // * requester-managed - Indicates whether the network interface is being - // managed by an AWS service (for example, AWS Management Console, Auto Scaling, - // and so on). - // - // * source-desk-check - Indicates whether the network interface performs - // source/destination checking. A value of true means checking is enabled, - // and false means checking is disabled. The value must be false for the - // network interface to perform network address translation (NAT) in your - // VPC. - // - // * status - The status of the network interface. If the network interface - // is not attached to an instance, the status is available; if a network - // interface is attached to an instance the status is in-use. - // - // * subnet-id - The ID of the subnet for the network interface. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * vpc-id - The ID of the VPC for the network interface. - Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` - - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `type:"integer"` - - // One or more network interface IDs. - // - // Default: Describes all your network interfaces. - NetworkInterfaceIds []*string `locationName:"NetworkInterfaceId" locationNameList:"item" type:"list"` - - // The token to retrieve the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeNetworkInterfacesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNetworkInterfacesInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeNetworkInterfacesInput) SetDryRun(v bool) *DescribeNetworkInterfacesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeNetworkInterfacesInput) SetFilters(v []*Filter) *DescribeNetworkInterfacesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeNetworkInterfacesInput) SetMaxResults(v int64) *DescribeNetworkInterfacesInput { - s.MaxResults = &v - return s -} - -// SetNetworkInterfaceIds sets the NetworkInterfaceIds field's value. -func (s *DescribeNetworkInterfacesInput) SetNetworkInterfaceIds(v []*string) *DescribeNetworkInterfacesInput { - s.NetworkInterfaceIds = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeNetworkInterfacesInput) SetNextToken(v string) *DescribeNetworkInterfacesInput { - s.NextToken = &v - return s -} - -// Contains the output of DescribeNetworkInterfaces. -type DescribeNetworkInterfacesOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more network interfaces. - NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeNetworkInterfacesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNetworkInterfacesOutput) GoString() string { - return s.String() -} - -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *DescribeNetworkInterfacesOutput) SetNetworkInterfaces(v []*NetworkInterface) *DescribeNetworkInterfacesOutput { - s.NetworkInterfaces = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeNetworkInterfacesOutput) SetNextToken(v string) *DescribeNetworkInterfacesOutput { - s.NextToken = &v - return s -} - -type DescribePlacementGroupsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * group-name - The name of the placement group. - // - // * state - The state of the placement group (pending | available | deleting - // | deleted). - // - // * strategy - The strategy of the placement group (cluster | spread | partition). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more placement group names. - // - // Default: Describes all your placement groups, or only those otherwise specified. - GroupNames []*string `locationName:"groupName" type:"list"` -} - -// String returns the string representation -func (s DescribePlacementGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePlacementGroupsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribePlacementGroupsInput) SetDryRun(v bool) *DescribePlacementGroupsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribePlacementGroupsInput) SetFilters(v []*Filter) *DescribePlacementGroupsInput { - s.Filters = v - return s -} - -// SetGroupNames sets the GroupNames field's value. -func (s *DescribePlacementGroupsInput) SetGroupNames(v []*string) *DescribePlacementGroupsInput { - s.GroupNames = v - return s -} - -type DescribePlacementGroupsOutput struct { - _ struct{} `type:"structure"` - - // One or more placement groups. - PlacementGroups []*PlacementGroup `locationName:"placementGroupSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribePlacementGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePlacementGroupsOutput) GoString() string { - return s.String() -} - -// SetPlacementGroups sets the PlacementGroups field's value. -func (s *DescribePlacementGroupsOutput) SetPlacementGroups(v []*PlacementGroup) *DescribePlacementGroupsOutput { - s.PlacementGroups = v - return s -} - -type DescribePrefixListsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * prefix-list-id: The ID of a prefix list. - // - // * prefix-list-name: The name of a prefix list. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. - // - // Constraint: If the value specified is greater than 1000, we return only 1000 - // items. - MaxResults *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a prior call.) - NextToken *string `type:"string"` - - // One or more prefix list IDs. - PrefixListIds []*string `locationName:"PrefixListId" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribePrefixListsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePrefixListsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribePrefixListsInput) SetDryRun(v bool) *DescribePrefixListsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribePrefixListsInput) SetFilters(v []*Filter) *DescribePrefixListsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribePrefixListsInput) SetMaxResults(v int64) *DescribePrefixListsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePrefixListsInput) SetNextToken(v string) *DescribePrefixListsInput { - s.NextToken = &v - return s -} - -// SetPrefixListIds sets the PrefixListIds field's value. -func (s *DescribePrefixListsInput) SetPrefixListIds(v []*string) *DescribePrefixListsInput { - s.PrefixListIds = v - return s -} - -type DescribePrefixListsOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `locationName:"nextToken" type:"string"` - - // All available prefix lists. - PrefixLists []*PrefixList `locationName:"prefixListSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribePrefixListsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePrefixListsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePrefixListsOutput) SetNextToken(v string) *DescribePrefixListsOutput { - s.NextToken = &v - return s -} - -// SetPrefixLists sets the PrefixLists field's value. -func (s *DescribePrefixListsOutput) SetPrefixLists(v []*PrefixList) *DescribePrefixListsOutput { - s.PrefixLists = v - return s -} - -type DescribePrincipalIdFormatInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // The token to request the next page of results. - NextToken *string `type:"string"` - - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log - // | image | import-task | instance | internet-gateway | network-acl | network-acl-association - // | network-interface | network-interface-attachment | prefix-list | reservation - // | route-table | route-table-association | security-group | snapshot | subnet - // | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association - // | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway - Resources []*string `locationName:"Resource" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribePrincipalIdFormatInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePrincipalIdFormatInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribePrincipalIdFormatInput) SetDryRun(v bool) *DescribePrincipalIdFormatInput { - s.DryRun = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribePrincipalIdFormatInput) SetMaxResults(v int64) *DescribePrincipalIdFormatInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePrincipalIdFormatInput) SetNextToken(v string) *DescribePrincipalIdFormatInput { - s.NextToken = &v - return s -} - -// SetResources sets the Resources field's value. -func (s *DescribePrincipalIdFormatInput) SetResources(v []*string) *DescribePrincipalIdFormatInput { - s.Resources = v - return s -} - -type DescribePrincipalIdFormatOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the ID format settings for the ARN. - Principals []*PrincipalIdFormat `locationName:"principalSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribePrincipalIdFormatOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePrincipalIdFormatOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePrincipalIdFormatOutput) SetNextToken(v string) *DescribePrincipalIdFormatOutput { - s.NextToken = &v - return s -} - -// SetPrincipals sets the Principals field's value. -func (s *DescribePrincipalIdFormatOutput) SetPrincipals(v []*PrincipalIdFormat) *DescribePrincipalIdFormatOutput { - s.Principals = v - return s -} - -type DescribePublicIpv4PoolsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next page of results. - NextToken *string `min:"1" type:"string"` - - // The IDs of the address pools. - PoolIds []*string `locationName:"PoolId" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribePublicIpv4PoolsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePublicIpv4PoolsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribePublicIpv4PoolsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribePublicIpv4PoolsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribePublicIpv4PoolsInput) SetMaxResults(v int64) *DescribePublicIpv4PoolsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePublicIpv4PoolsInput) SetNextToken(v string) *DescribePublicIpv4PoolsInput { - s.NextToken = &v - return s -} - -// SetPoolIds sets the PoolIds field's value. -func (s *DescribePublicIpv4PoolsInput) SetPoolIds(v []*string) *DescribePublicIpv4PoolsInput { - s.PoolIds = v - return s -} - -type DescribePublicIpv4PoolsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the address pools. - PublicIpv4Pools []*PublicIpv4Pool `locationName:"publicIpv4PoolSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribePublicIpv4PoolsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePublicIpv4PoolsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePublicIpv4PoolsOutput) SetNextToken(v string) *DescribePublicIpv4PoolsOutput { - s.NextToken = &v - return s -} - -// SetPublicIpv4Pools sets the PublicIpv4Pools field's value. -func (s *DescribePublicIpv4PoolsOutput) SetPublicIpv4Pools(v []*PublicIpv4Pool) *DescribePublicIpv4PoolsOutput { - s.PublicIpv4Pools = v - return s -} - -type DescribeRegionsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * endpoint - The endpoint of the region (for example, ec2.us-east-1.amazonaws.com). - // - // * region-name - The name of the region (for example, us-east-1). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The names of one or more regions. - RegionNames []*string `locationName:"RegionName" locationNameList:"RegionName" type:"list"` -} - -// String returns the string representation -func (s DescribeRegionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRegionsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeRegionsInput) SetDryRun(v bool) *DescribeRegionsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeRegionsInput) SetFilters(v []*Filter) *DescribeRegionsInput { - s.Filters = v - return s -} - -// SetRegionNames sets the RegionNames field's value. -func (s *DescribeRegionsInput) SetRegionNames(v []*string) *DescribeRegionsInput { - s.RegionNames = v - return s -} - -type DescribeRegionsOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more regions. - Regions []*Region `locationName:"regionInfo" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeRegionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRegionsOutput) GoString() string { - return s.String() -} - -// SetRegions sets the Regions field's value. -func (s *DescribeRegionsOutput) SetRegions(v []*Region) *DescribeRegionsOutput { - s.Regions = v - return s -} - -// Contains the parameters for DescribeReservedInstances. -type DescribeReservedInstancesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * availability-zone - The Availability Zone where the Reserved Instance - // can be used. - // - // * duration - The duration of the Reserved Instance (one year or three - // years), in seconds (31536000 | 94608000). - // - // * end - The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z). - // - // * fixed-price - The purchase price of the Reserved Instance (for example, - // 9800.0). - // - // * instance-type - The instance type that is covered by the reservation. - // - // * scope - The scope of the Reserved Instance (Region or Availability Zone). - // - // * product-description - The Reserved Instance product platform description. - // Instances that include (Amazon VPC) in the product platform description - // will only be displayed to EC2-Classic account holders and are for use - // with Amazon VPC (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE - // Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux - // (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL Server - // Standard | Windows with SQL Server Standard (Amazon VPC) | Windows with - // SQL Server Web | Windows with SQL Server Web (Amazon VPC) | Windows with - // SQL Server Enterprise | Windows with SQL Server Enterprise (Amazon VPC)). - // - // * reserved-instances-id - The ID of the Reserved Instance. - // - // * start - The time at which the Reserved Instance purchase request was - // placed (for example, 2014-08-07T11:54:42.000Z). - // - // * state - The state of the Reserved Instance (payment-pending | active - // | payment-failed | retired). - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * usage-price - The usage price of the Reserved Instance, per hour (for - // example, 0.84). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // Describes whether the Reserved Instance is Standard or Convertible. - OfferingClass *string `type:"string" enum:"OfferingClassType"` - - // The Reserved Instance offering type. If you are using tools that predate - // the 2011-11-01 API version, you only have access to the Medium Utilization - // Reserved Instance offering type. - OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` - - // One or more Reserved Instance IDs. - // - // Default: Describes all your Reserved Instances, or only those otherwise specified. - ReservedInstancesIds []*string `locationName:"ReservedInstancesId" locationNameList:"ReservedInstancesId" type:"list"` -} - -// String returns the string representation -func (s DescribeReservedInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedInstancesInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeReservedInstancesInput) SetDryRun(v bool) *DescribeReservedInstancesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeReservedInstancesInput) SetFilters(v []*Filter) *DescribeReservedInstancesInput { - s.Filters = v - return s -} - -// SetOfferingClass sets the OfferingClass field's value. -func (s *DescribeReservedInstancesInput) SetOfferingClass(v string) *DescribeReservedInstancesInput { - s.OfferingClass = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *DescribeReservedInstancesInput) SetOfferingType(v string) *DescribeReservedInstancesInput { - s.OfferingType = &v - return s -} - -// SetReservedInstancesIds sets the ReservedInstancesIds field's value. -func (s *DescribeReservedInstancesInput) SetReservedInstancesIds(v []*string) *DescribeReservedInstancesInput { - s.ReservedInstancesIds = v - return s -} - -// Contains the parameters for DescribeReservedInstancesListings. -type DescribeReservedInstancesListingsInput struct { - _ struct{} `type:"structure"` - - // One or more filters. - // - // * reserved-instances-id - The ID of the Reserved Instances. - // - // * reserved-instances-listing-id - The ID of the Reserved Instances listing. - // - // * status - The status of the Reserved Instance listing (pending | active - // | cancelled | closed). - // - // * status-message - The reason for the status. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more Reserved Instance IDs. - ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` - - // One or more Reserved Instance listing IDs. - ReservedInstancesListingId *string `locationName:"reservedInstancesListingId" type:"string"` -} - -// String returns the string representation -func (s DescribeReservedInstancesListingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedInstancesListingsInput) GoString() string { - return s.String() -} - -// SetFilters sets the Filters field's value. -func (s *DescribeReservedInstancesListingsInput) SetFilters(v []*Filter) *DescribeReservedInstancesListingsInput { - s.Filters = v - return s -} - -// SetReservedInstancesId sets the ReservedInstancesId field's value. -func (s *DescribeReservedInstancesListingsInput) SetReservedInstancesId(v string) *DescribeReservedInstancesListingsInput { - s.ReservedInstancesId = &v - return s -} - -// SetReservedInstancesListingId sets the ReservedInstancesListingId field's value. -func (s *DescribeReservedInstancesListingsInput) SetReservedInstancesListingId(v string) *DescribeReservedInstancesListingsInput { - s.ReservedInstancesListingId = &v - return s -} - -// Contains the output of DescribeReservedInstancesListings. -type DescribeReservedInstancesListingsOutput struct { - _ struct{} `type:"structure"` - - // Information about the Reserved Instance listing. - ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeReservedInstancesListingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedInstancesListingsOutput) GoString() string { - return s.String() -} - -// SetReservedInstancesListings sets the ReservedInstancesListings field's value. -func (s *DescribeReservedInstancesListingsOutput) SetReservedInstancesListings(v []*ReservedInstancesListing) *DescribeReservedInstancesListingsOutput { - s.ReservedInstancesListings = v - return s -} - -// Contains the parameters for DescribeReservedInstancesModifications. -type DescribeReservedInstancesModificationsInput struct { - _ struct{} `type:"structure"` - - // One or more filters. - // - // * client-token - The idempotency token for the modification request. - // - // * create-date - The time when the modification request was created. - // - // * effective-date - The time when the modification becomes effective. - // - // * modification-result.reserved-instances-id - The ID for the Reserved - // Instances created as part of the modification request. This ID is only - // available when the status of the modification is fulfilled. - // - // * modification-result.target-configuration.availability-zone - The Availability - // Zone for the new Reserved Instances. - // - // * modification-result.target-configuration.instance-count - The number - // of new Reserved Instances. - // - // * modification-result.target-configuration.instance-type - The instance - // type of the new Reserved Instances. - // - // * modification-result.target-configuration.platform - The network platform - // of the new Reserved Instances (EC2-Classic | EC2-VPC). - // - // * reserved-instances-id - The ID of the Reserved Instances modified. - // - // * reserved-instances-modification-id - The ID of the modification request. - // - // * status - The status of the Reserved Instances modification request (processing - // | fulfilled | failed). - // - // * status-message - The reason for the status. - // - // * update-date - The time when the modification request was last updated. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The token to retrieve the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // IDs for the submitted modification request. - ReservedInstancesModificationIds []*string `locationName:"ReservedInstancesModificationId" locationNameList:"ReservedInstancesModificationId" type:"list"` -} - -// String returns the string representation -func (s DescribeReservedInstancesModificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedInstancesModificationsInput) GoString() string { - return s.String() -} - -// SetFilters sets the Filters field's value. -func (s *DescribeReservedInstancesModificationsInput) SetFilters(v []*Filter) *DescribeReservedInstancesModificationsInput { - s.Filters = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeReservedInstancesModificationsInput) SetNextToken(v string) *DescribeReservedInstancesModificationsInput { - s.NextToken = &v - return s -} - -// SetReservedInstancesModificationIds sets the ReservedInstancesModificationIds field's value. -func (s *DescribeReservedInstancesModificationsInput) SetReservedInstancesModificationIds(v []*string) *DescribeReservedInstancesModificationsInput { - s.ReservedInstancesModificationIds = v - return s -} - -// Contains the output of DescribeReservedInstancesModifications. -type DescribeReservedInstancesModificationsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // The Reserved Instance modification information. - ReservedInstancesModifications []*ReservedInstancesModification `locationName:"reservedInstancesModificationsSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeReservedInstancesModificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedInstancesModificationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeReservedInstancesModificationsOutput) SetNextToken(v string) *DescribeReservedInstancesModificationsOutput { - s.NextToken = &v - return s -} - -// SetReservedInstancesModifications sets the ReservedInstancesModifications field's value. -func (s *DescribeReservedInstancesModificationsOutput) SetReservedInstancesModifications(v []*ReservedInstancesModification) *DescribeReservedInstancesModificationsOutput { - s.ReservedInstancesModifications = v - return s -} - -// Contains the parameters for DescribeReservedInstancesOfferings. -type DescribeReservedInstancesOfferingsInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which the Reserved Instance can be used. - AvailabilityZone *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * availability-zone - The Availability Zone where the Reserved Instance - // can be used. - // - // * duration - The duration of the Reserved Instance (for example, one year - // or three years), in seconds (31536000 | 94608000). - // - // * fixed-price - The purchase price of the Reserved Instance (for example, - // 9800.0). - // - // * instance-type - The instance type that is covered by the reservation. - // - // * marketplace - Set to true to show only Reserved Instance Marketplace - // offerings. When this filter is not used, which is the default behavior, - // all offerings from both AWS and the Reserved Instance Marketplace are - // listed. - // - // * product-description - The Reserved Instance product platform description. - // Instances that include (Amazon VPC) in the product platform description - // will only be displayed to EC2-Classic account holders and are for use - // with Amazon VPC. (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | - // SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise - // Linux (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL - // Server Standard | Windows with SQL Server Standard (Amazon VPC) | Windows - // with SQL Server Web | Windows with SQL Server Web (Amazon VPC) | Windows - // with SQL Server Enterprise | Windows with SQL Server Enterprise (Amazon - // VPC)) - // - // * reserved-instances-offering-id - The Reserved Instances offering ID. - // - // * scope - The scope of the Reserved Instance (Availability Zone or Region). - // - // * usage-price - The usage price of the Reserved Instance, per hour (for - // example, 0.84). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // Include Reserved Instance Marketplace offerings in the response. - IncludeMarketplace *bool `type:"boolean"` - - // The tenancy of the instances covered by the reservation. A Reserved Instance - // with a tenancy of dedicated is applied to instances that run in a VPC on - // single-tenant hardware (i.e., Dedicated Instances). - // - // Important: The host value cannot be used with this parameter. Use the default - // or dedicated values only. - // - // Default: default - InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` - - // The instance type that the reservation will cover (for example, m1.small). - // For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. - InstanceType *string `type:"string" enum:"InstanceType"` - - // The maximum duration (in seconds) to filter when searching for offerings. - // - // Default: 94608000 (3 years) - MaxDuration *int64 `type:"long"` - - // The maximum number of instances to filter when searching for offerings. - // - // Default: 20 - MaxInstanceCount *int64 `type:"integer"` - - // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. The maximum is 100. - // - // Default: 100 - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The minimum duration (in seconds) to filter when searching for offerings. - // - // Default: 2592000 (1 month) - MinDuration *int64 `type:"long"` - - // The token to retrieve the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The offering class of the Reserved Instance. Can be standard or convertible. - OfferingClass *string `type:"string" enum:"OfferingClassType"` - - // The Reserved Instance offering type. If you are using tools that predate - // the 2011-11-01 API version, you only have access to the Medium Utilization - // Reserved Instance offering type. - OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` - - // The Reserved Instance product platform description. Instances that include - // (Amazon VPC) in the description are for use with Amazon VPC. - ProductDescription *string `type:"string" enum:"RIProductDescription"` - - // One or more Reserved Instances offering IDs. - ReservedInstancesOfferingIds []*string `locationName:"ReservedInstancesOfferingId" type:"list"` -} - -// String returns the string representation -func (s DescribeReservedInstancesOfferingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedInstancesOfferingsInput) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetAvailabilityZone(v string) *DescribeReservedInstancesOfferingsInput { - s.AvailabilityZone = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetDryRun(v bool) *DescribeReservedInstancesOfferingsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetFilters(v []*Filter) *DescribeReservedInstancesOfferingsInput { - s.Filters = v - return s -} - -// SetIncludeMarketplace sets the IncludeMarketplace field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetIncludeMarketplace(v bool) *DescribeReservedInstancesOfferingsInput { - s.IncludeMarketplace = &v - return s -} - -// SetInstanceTenancy sets the InstanceTenancy field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetInstanceTenancy(v string) *DescribeReservedInstancesOfferingsInput { - s.InstanceTenancy = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetInstanceType(v string) *DescribeReservedInstancesOfferingsInput { - s.InstanceType = &v - return s -} - -// SetMaxDuration sets the MaxDuration field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetMaxDuration(v int64) *DescribeReservedInstancesOfferingsInput { - s.MaxDuration = &v - return s -} - -// SetMaxInstanceCount sets the MaxInstanceCount field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetMaxInstanceCount(v int64) *DescribeReservedInstancesOfferingsInput { - s.MaxInstanceCount = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetMaxResults(v int64) *DescribeReservedInstancesOfferingsInput { - s.MaxResults = &v - return s -} - -// SetMinDuration sets the MinDuration field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetMinDuration(v int64) *DescribeReservedInstancesOfferingsInput { - s.MinDuration = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetNextToken(v string) *DescribeReservedInstancesOfferingsInput { - s.NextToken = &v - return s -} - -// SetOfferingClass sets the OfferingClass field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetOfferingClass(v string) *DescribeReservedInstancesOfferingsInput { - s.OfferingClass = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetOfferingType(v string) *DescribeReservedInstancesOfferingsInput { - s.OfferingType = &v - return s -} - -// SetProductDescription sets the ProductDescription field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetProductDescription(v string) *DescribeReservedInstancesOfferingsInput { - s.ProductDescription = &v - return s -} - -// SetReservedInstancesOfferingIds sets the ReservedInstancesOfferingIds field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetReservedInstancesOfferingIds(v []*string) *DescribeReservedInstancesOfferingsInput { - s.ReservedInstancesOfferingIds = v - return s -} - -// Contains the output of DescribeReservedInstancesOfferings. -type DescribeReservedInstancesOfferingsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of Reserved Instances offerings. - ReservedInstancesOfferings []*ReservedInstancesOffering `locationName:"reservedInstancesOfferingsSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeReservedInstancesOfferingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedInstancesOfferingsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeReservedInstancesOfferingsOutput) SetNextToken(v string) *DescribeReservedInstancesOfferingsOutput { - s.NextToken = &v - return s -} - -// SetReservedInstancesOfferings sets the ReservedInstancesOfferings field's value. -func (s *DescribeReservedInstancesOfferingsOutput) SetReservedInstancesOfferings(v []*ReservedInstancesOffering) *DescribeReservedInstancesOfferingsOutput { - s.ReservedInstancesOfferings = v - return s -} - -// Contains the output for DescribeReservedInstances. -type DescribeReservedInstancesOutput struct { - _ struct{} `type:"structure"` - - // A list of Reserved Instances. - ReservedInstances []*ReservedInstances `locationName:"reservedInstancesSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeReservedInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedInstancesOutput) GoString() string { - return s.String() -} - -// SetReservedInstances sets the ReservedInstances field's value. -func (s *DescribeReservedInstancesOutput) SetReservedInstances(v []*ReservedInstances) *DescribeReservedInstancesOutput { - s.ReservedInstances = v - return s -} - -type DescribeRouteTablesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * association.route-table-association-id - The ID of an association ID - // for the route table. - // - // * association.route-table-id - The ID of the route table involved in the - // association. - // - // * association.subnet-id - The ID of the subnet involved in the association. - // - // * association.main - Indicates whether the route table is the main route - // table for the VPC (true | false). Route tables that do not have an association - // ID are not returned in the response. - // - // * owner-id - The ID of the AWS account that owns the route table. - // - // * route-table-id - The ID of the route table. - // - // * route.destination-cidr-block - The IPv4 CIDR range specified in a route - // in the table. - // - // * route.destination-ipv6-cidr-block - The IPv6 CIDR range specified in - // a route in the route table. - // - // * route.destination-prefix-list-id - The ID (prefix) of the AWS service - // specified in a route in the table. - // - // * route.egress-only-internet-gateway-id - The ID of an egress-only Internet - // gateway specified in a route in the route table. - // - // * route.gateway-id - The ID of a gateway specified in a route in the table. - // - // * route.instance-id - The ID of an instance specified in a route in the - // table. - // - // * route.nat-gateway-id - The ID of a NAT gateway. - // - // * route.transit-gateway-id - The ID of a transit gateway. - // - // * route.origin - Describes how the route was created. CreateRouteTable - // indicates that the route was automatically created when the route table - // was created; CreateRoute indicates that the route was manually added to - // the route table; EnableVgwRoutePropagation indicates that the route was - // propagated by route propagation. - // - // * route.state - The state of a route in the route table (active | blackhole). - // The blackhole state indicates that the route's target isn't available - // (for example, the specified gateway isn't attached to the VPC, the specified - // NAT instance has been terminated, and so on). - // - // * route.vpc-peering-connection-id - The ID of a VPC peering connection - // specified in a route in the table. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * transit-gateway-id - The ID of a transit gateway. - // - // * vpc-id - The ID of the VPC for the route table. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. This - // value can be between 5 and 100. - MaxResults *int64 `type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `type:"string"` - - // One or more route table IDs. - // - // Default: Describes all your route tables. - RouteTableIds []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeRouteTablesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRouteTablesInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeRouteTablesInput) SetDryRun(v bool) *DescribeRouteTablesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeRouteTablesInput) SetFilters(v []*Filter) *DescribeRouteTablesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeRouteTablesInput) SetMaxResults(v int64) *DescribeRouteTablesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeRouteTablesInput) SetNextToken(v string) *DescribeRouteTablesInput { - s.NextToken = &v - return s -} - -// SetRouteTableIds sets the RouteTableIds field's value. -func (s *DescribeRouteTablesInput) SetRouteTableIds(v []*string) *DescribeRouteTablesInput { - s.RouteTableIds = v - return s -} - -// Contains the output of DescribeRouteTables. -type DescribeRouteTablesOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about one or more route tables. - RouteTables []*RouteTable `locationName:"routeTableSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeRouteTablesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRouteTablesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeRouteTablesOutput) SetNextToken(v string) *DescribeRouteTablesOutput { - s.NextToken = &v - return s -} - -// SetRouteTables sets the RouteTables field's value. -func (s *DescribeRouteTablesOutput) SetRouteTables(v []*RouteTable) *DescribeRouteTablesOutput { - s.RouteTables = v - return s -} - -// Contains the parameters for DescribeScheduledInstanceAvailability. -type DescribeScheduledInstanceAvailabilityInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * availability-zone - The Availability Zone (for example, us-west-2a). - // - // * instance-type - The instance type (for example, c4.large). - // - // * network-platform - The network platform (EC2-Classic or EC2-VPC). - // - // * platform - The platform (Linux/UNIX or Windows). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The time period for the first schedule to start. - // - // FirstSlotStartTimeRange is a required field - FirstSlotStartTimeRange *SlotDateTimeRangeRequest `type:"structure" required:"true"` - - // The maximum number of results to return in a single call. This value can - // be between 5 and 300. The default value is 300. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // The maximum available duration, in hours. This value must be greater than - // MinSlotDurationInHours and less than 1,720. - MaxSlotDurationInHours *int64 `type:"integer"` - - // The minimum available duration, in hours. The minimum required duration is - // 1,200 hours per year. For example, the minimum daily schedule is 4 hours, - // the minimum weekly schedule is 24 hours, and the minimum monthly schedule - // is 100 hours. - MinSlotDurationInHours *int64 `type:"integer"` - - // The token for the next set of results. - NextToken *string `type:"string"` - - // The schedule recurrence. - // - // Recurrence is a required field - Recurrence *ScheduledInstanceRecurrenceRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeScheduledInstanceAvailabilityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScheduledInstanceAvailabilityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeScheduledInstanceAvailabilityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeScheduledInstanceAvailabilityInput"} - if s.FirstSlotStartTimeRange == nil { - invalidParams.Add(request.NewErrParamRequired("FirstSlotStartTimeRange")) - } - if s.Recurrence == nil { - invalidParams.Add(request.NewErrParamRequired("Recurrence")) - } - if s.FirstSlotStartTimeRange != nil { - if err := s.FirstSlotStartTimeRange.Validate(); err != nil { - invalidParams.AddNested("FirstSlotStartTimeRange", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetDryRun(v bool) *DescribeScheduledInstanceAvailabilityInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetFilters(v []*Filter) *DescribeScheduledInstanceAvailabilityInput { - s.Filters = v - return s -} - -// SetFirstSlotStartTimeRange sets the FirstSlotStartTimeRange field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetFirstSlotStartTimeRange(v *SlotDateTimeRangeRequest) *DescribeScheduledInstanceAvailabilityInput { - s.FirstSlotStartTimeRange = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetMaxResults(v int64) *DescribeScheduledInstanceAvailabilityInput { - s.MaxResults = &v - return s -} - -// SetMaxSlotDurationInHours sets the MaxSlotDurationInHours field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetMaxSlotDurationInHours(v int64) *DescribeScheduledInstanceAvailabilityInput { - s.MaxSlotDurationInHours = &v - return s -} - -// SetMinSlotDurationInHours sets the MinSlotDurationInHours field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetMinSlotDurationInHours(v int64) *DescribeScheduledInstanceAvailabilityInput { - s.MinSlotDurationInHours = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetNextToken(v string) *DescribeScheduledInstanceAvailabilityInput { - s.NextToken = &v - return s -} - -// SetRecurrence sets the Recurrence field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetRecurrence(v *ScheduledInstanceRecurrenceRequest) *DescribeScheduledInstanceAvailabilityInput { - s.Recurrence = v - return s -} - -// Contains the output of DescribeScheduledInstanceAvailability. -type DescribeScheduledInstanceAvailabilityOutput struct { - _ struct{} `type:"structure"` - - // The token required to retrieve the next set of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the available Scheduled Instances. - ScheduledInstanceAvailabilitySet []*ScheduledInstanceAvailability `locationName:"scheduledInstanceAvailabilitySet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeScheduledInstanceAvailabilityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScheduledInstanceAvailabilityOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScheduledInstanceAvailabilityOutput) SetNextToken(v string) *DescribeScheduledInstanceAvailabilityOutput { - s.NextToken = &v - return s -} - -// SetScheduledInstanceAvailabilitySet sets the ScheduledInstanceAvailabilitySet field's value. -func (s *DescribeScheduledInstanceAvailabilityOutput) SetScheduledInstanceAvailabilitySet(v []*ScheduledInstanceAvailability) *DescribeScheduledInstanceAvailabilityOutput { - s.ScheduledInstanceAvailabilitySet = v - return s -} - -// Contains the parameters for DescribeScheduledInstances. -type DescribeScheduledInstancesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * availability-zone - The Availability Zone (for example, us-west-2a). - // - // * instance-type - The instance type (for example, c4.large). - // - // * network-platform - The network platform (EC2-Classic or EC2-VPC). - // - // * platform - The platform (Linux/UNIX or Windows). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return in a single call. This value can - // be between 5 and 300. The default value is 100. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // The token for the next set of results. - NextToken *string `type:"string"` - - // One or more Scheduled Instance IDs. - ScheduledInstanceIds []*string `locationName:"ScheduledInstanceId" locationNameList:"ScheduledInstanceId" type:"list"` - - // The time period for the first schedule to start. - SlotStartTimeRange *SlotStartTimeRangeRequest `type:"structure"` -} - -// String returns the string representation -func (s DescribeScheduledInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScheduledInstancesInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeScheduledInstancesInput) SetDryRun(v bool) *DescribeScheduledInstancesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeScheduledInstancesInput) SetFilters(v []*Filter) *DescribeScheduledInstancesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeScheduledInstancesInput) SetMaxResults(v int64) *DescribeScheduledInstancesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScheduledInstancesInput) SetNextToken(v string) *DescribeScheduledInstancesInput { - s.NextToken = &v - return s -} - -// SetScheduledInstanceIds sets the ScheduledInstanceIds field's value. -func (s *DescribeScheduledInstancesInput) SetScheduledInstanceIds(v []*string) *DescribeScheduledInstancesInput { - s.ScheduledInstanceIds = v - return s -} - -// SetSlotStartTimeRange sets the SlotStartTimeRange field's value. -func (s *DescribeScheduledInstancesInput) SetSlotStartTimeRange(v *SlotStartTimeRangeRequest) *DescribeScheduledInstancesInput { - s.SlotStartTimeRange = v - return s -} - -// Contains the output of DescribeScheduledInstances. -type DescribeScheduledInstancesOutput struct { - _ struct{} `type:"structure"` - - // The token required to retrieve the next set of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the Scheduled Instances. - ScheduledInstanceSet []*ScheduledInstance `locationName:"scheduledInstanceSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeScheduledInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScheduledInstancesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScheduledInstancesOutput) SetNextToken(v string) *DescribeScheduledInstancesOutput { - s.NextToken = &v - return s -} - -// SetScheduledInstanceSet sets the ScheduledInstanceSet field's value. -func (s *DescribeScheduledInstancesOutput) SetScheduledInstanceSet(v []*ScheduledInstance) *DescribeScheduledInstancesOutput { - s.ScheduledInstanceSet = v - return s -} - -type DescribeSecurityGroupReferencesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more security group IDs in your account. - // - // GroupId is a required field - GroupId []*string `locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeSecurityGroupReferencesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSecurityGroupReferencesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSecurityGroupReferencesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSecurityGroupReferencesInput"} - if s.GroupId == nil { - invalidParams.Add(request.NewErrParamRequired("GroupId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeSecurityGroupReferencesInput) SetDryRun(v bool) *DescribeSecurityGroupReferencesInput { - s.DryRun = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *DescribeSecurityGroupReferencesInput) SetGroupId(v []*string) *DescribeSecurityGroupReferencesInput { - s.GroupId = v - return s -} - -type DescribeSecurityGroupReferencesOutput struct { - _ struct{} `type:"structure"` - - // Information about the VPCs with the referencing security groups. - SecurityGroupReferenceSet []*SecurityGroupReference `locationName:"securityGroupReferenceSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeSecurityGroupReferencesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSecurityGroupReferencesOutput) GoString() string { - return s.String() -} - -// SetSecurityGroupReferenceSet sets the SecurityGroupReferenceSet field's value. -func (s *DescribeSecurityGroupReferencesOutput) SetSecurityGroupReferenceSet(v []*SecurityGroupReference) *DescribeSecurityGroupReferencesOutput { - s.SecurityGroupReferenceSet = v - return s -} - -type DescribeSecurityGroupsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. If using multiple filters for rules, the results include - // security groups for which any combination of rules - not necessarily a single - // rule - match all filters. - // - // * description - The description of the security group. - // - // * egress.ip-permission.cidr - An IPv4 CIDR block for an outbound security - // group rule. - // - // * egress.ip-permission.from-port - For an outbound rule, the start of - // port range for the TCP and UDP protocols, or an ICMP type number. - // - // * egress.ip-permission.group-id - The ID of a security group that has - // been referenced in an outbound security group rule. - // - // * egress.ip-permission.group-name - The name of a security group that - // has been referenced in an outbound security group rule. - // - // * egress.ip-permission.ipv6-cidr - An IPv6 CIDR block for an outbound - // security group rule. - // - // * egress.ip-permission.prefix-list-id - The ID (prefix) of the AWS service - // to which a security group rule allows outbound access. - // - // * egress.ip-permission.protocol - The IP protocol for an outbound security - // group rule (tcp | udp | icmp or a protocol number). - // - // * egress.ip-permission.to-port - For an outbound rule, the end of port - // range for the TCP and UDP protocols, or an ICMP code. - // - // * egress.ip-permission.user-id - The ID of an AWS account that has been - // referenced in an outbound security group rule. - // - // * group-id - The ID of the security group. - // - // * group-name - The name of the security group. - // - // * ip-permission.cidr - An IPv4 CIDR block for an inbound security group - // rule. - // - // * ip-permission.from-port - For an inbound rule, the start of port range - // for the TCP and UDP protocols, or an ICMP type number. - // - // * ip-permission.group-id - The ID of a security group that has been referenced - // in an inbound security group rule. - // - // * ip-permission.group-name - The name of a security group that has been - // referenced in an inbound security group rule. - // - // * ip-permission.ipv6-cidr - An IPv6 CIDR block for an inbound security - // group rule. - // - // * ip-permission.prefix-list-id - The ID (prefix) of the AWS service from - // which a security group rule allows inbound access. - // - // * ip-permission.protocol - The IP protocol for an inbound security group - // rule (tcp | udp | icmp or a protocol number). - // - // * ip-permission.to-port - For an inbound rule, the end of port range for - // the TCP and UDP protocols, or an ICMP code. - // - // * ip-permission.user-id - The ID of an AWS account that has been referenced - // in an inbound security group rule. - // - // * owner-id - The AWS account ID of the owner of the security group. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * vpc-id - The ID of the VPC specified when the security group was created. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more security group IDs. Required for security groups in a nondefault - // VPC. - // - // Default: Describes all your security groups. - GroupIds []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"` - - // [EC2-Classic and default VPC only] One or more security group names. You - // can specify either the security group name or the security group ID. For - // security groups in a nondefault VPC, use the group-name filter to describe - // security groups by name. - // - // Default: Describes all your security groups. - GroupNames []*string `locationName:"GroupName" locationNameList:"GroupName" type:"list"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another request with the returned NextToken value. - // This value can be between 5 and 1000. If this parameter is not specified, - // then all results are returned. - MaxResults *int64 `type:"integer"` - - // The token to request the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeSecurityGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSecurityGroupsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeSecurityGroupsInput) SetDryRun(v bool) *DescribeSecurityGroupsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeSecurityGroupsInput) SetFilters(v []*Filter) *DescribeSecurityGroupsInput { - s.Filters = v - return s -} - -// SetGroupIds sets the GroupIds field's value. -func (s *DescribeSecurityGroupsInput) SetGroupIds(v []*string) *DescribeSecurityGroupsInput { - s.GroupIds = v - return s -} - -// SetGroupNames sets the GroupNames field's value. -func (s *DescribeSecurityGroupsInput) SetGroupNames(v []*string) *DescribeSecurityGroupsInput { - s.GroupNames = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSecurityGroupsInput) SetMaxResults(v int64) *DescribeSecurityGroupsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSecurityGroupsInput) SetNextToken(v string) *DescribeSecurityGroupsInput { - s.NextToken = &v - return s -} - -type DescribeSecurityGroupsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about one or more security groups. - SecurityGroups []*SecurityGroup `locationName:"securityGroupInfo" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeSecurityGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSecurityGroupsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSecurityGroupsOutput) SetNextToken(v string) *DescribeSecurityGroupsOutput { - s.NextToken = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *DescribeSecurityGroupsOutput) SetSecurityGroups(v []*SecurityGroup) *DescribeSecurityGroupsOutput { - s.SecurityGroups = v - return s -} - -// Contains the parameters for DescribeSnapshotAttribute. -type DescribeSnapshotAttributeInput struct { - _ struct{} `type:"structure"` - - // The snapshot attribute you would like to view. - // - // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"SnapshotAttributeName"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the EBS snapshot. - // - // SnapshotId is a required field - SnapshotId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeSnapshotAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSnapshotAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSnapshotAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSnapshotAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - if s.SnapshotId == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *DescribeSnapshotAttributeInput) SetAttribute(v string) *DescribeSnapshotAttributeInput { - s.Attribute = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeSnapshotAttributeInput) SetDryRun(v bool) *DescribeSnapshotAttributeInput { - s.DryRun = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *DescribeSnapshotAttributeInput) SetSnapshotId(v string) *DescribeSnapshotAttributeInput { - s.SnapshotId = &v - return s -} - -// Contains the output of DescribeSnapshotAttribute. -type DescribeSnapshotAttributeOutput struct { - _ struct{} `type:"structure"` - - // A list of permissions for creating volumes from the snapshot. - CreateVolumePermissions []*CreateVolumePermission `locationName:"createVolumePermission" locationNameList:"item" type:"list"` - - // A list of product codes. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` - - // The ID of the EBS snapshot. - SnapshotId *string `locationName:"snapshotId" type:"string"` -} - -// String returns the string representation -func (s DescribeSnapshotAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSnapshotAttributeOutput) GoString() string { - return s.String() -} - -// SetCreateVolumePermissions sets the CreateVolumePermissions field's value. -func (s *DescribeSnapshotAttributeOutput) SetCreateVolumePermissions(v []*CreateVolumePermission) *DescribeSnapshotAttributeOutput { - s.CreateVolumePermissions = v - return s -} - -// SetProductCodes sets the ProductCodes field's value. -func (s *DescribeSnapshotAttributeOutput) SetProductCodes(v []*ProductCode) *DescribeSnapshotAttributeOutput { - s.ProductCodes = v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *DescribeSnapshotAttributeOutput) SetSnapshotId(v string) *DescribeSnapshotAttributeOutput { - s.SnapshotId = &v - return s -} - -// Contains the parameters for DescribeSnapshots. -type DescribeSnapshotsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * description - A description of the snapshot. - // - // * owner-alias - Value from an Amazon-maintained list (amazon | aws-marketplace - // | microsoft) of snapshot owners. Not to be confused with the user-configured - // AWS account alias, which is set from the IAM console. - // - // * owner-id - The ID of the AWS account that owns the snapshot. - // - // * progress - The progress of the snapshot, as a percentage (for example, - // 80%). - // - // * snapshot-id - The snapshot ID. - // - // * start-time - The time stamp when the snapshot was initiated. - // - // * status - The status of the snapshot (pending | completed | error). - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * volume-id - The ID of the volume the snapshot is for. - // - // * volume-size - The size of the volume, in GiB. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of snapshot results returned by DescribeSnapshots in paginated - // output. When this parameter is used, DescribeSnapshots only returns MaxResults - // results in a single page along with a NextToken response element. The remaining - // results of the initial request can be seen by sending another DescribeSnapshots - // request with the returned NextToken value. This value can be between 5 and - // 1000; if MaxResults is given a value larger than 1000, only 1000 results - // are returned. If this parameter is not used, then DescribeSnapshots returns - // all results. You cannot specify this parameter and the snapshot IDs parameter - // in the same request. - MaxResults *int64 `type:"integer"` - - // The NextToken value returned from a previous paginated DescribeSnapshots - // request where MaxResults was used and the results exceeded the value of that - // parameter. Pagination continues from the end of the previous results that - // returned the NextToken value. This value is null when there are no more results - // to return. - NextToken *string `type:"string"` - - // Returns the snapshots owned by the specified owner. Multiple owners can be - // specified. - OwnerIds []*string `locationName:"Owner" locationNameList:"Owner" type:"list"` - - // One or more AWS accounts IDs that can create volumes from the snapshot. - RestorableByUserIds []*string `locationName:"RestorableBy" type:"list"` - - // One or more snapshot IDs. - // - // Default: Describes snapshots for which you have launch permissions. - SnapshotIds []*string `locationName:"SnapshotId" locationNameList:"SnapshotId" type:"list"` -} - -// String returns the string representation -func (s DescribeSnapshotsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSnapshotsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeSnapshotsInput) SetDryRun(v bool) *DescribeSnapshotsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeSnapshotsInput) SetFilters(v []*Filter) *DescribeSnapshotsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSnapshotsInput) SetMaxResults(v int64) *DescribeSnapshotsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSnapshotsInput) SetNextToken(v string) *DescribeSnapshotsInput { - s.NextToken = &v - return s -} - -// SetOwnerIds sets the OwnerIds field's value. -func (s *DescribeSnapshotsInput) SetOwnerIds(v []*string) *DescribeSnapshotsInput { - s.OwnerIds = v - return s -} - -// SetRestorableByUserIds sets the RestorableByUserIds field's value. -func (s *DescribeSnapshotsInput) SetRestorableByUserIds(v []*string) *DescribeSnapshotsInput { - s.RestorableByUserIds = v - return s -} - -// SetSnapshotIds sets the SnapshotIds field's value. -func (s *DescribeSnapshotsInput) SetSnapshotIds(v []*string) *DescribeSnapshotsInput { - s.SnapshotIds = v - return s -} - -// Contains the output of DescribeSnapshots. -type DescribeSnapshotsOutput struct { - _ struct{} `type:"structure"` - - // The NextToken value to include in a future DescribeSnapshots request. When - // the results of a DescribeSnapshots request exceed MaxResults, this value - // can be used to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the snapshots. - Snapshots []*Snapshot `locationName:"snapshotSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeSnapshotsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSnapshotsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSnapshotsOutput) SetNextToken(v string) *DescribeSnapshotsOutput { - s.NextToken = &v - return s -} - -// SetSnapshots sets the Snapshots field's value. -func (s *DescribeSnapshotsOutput) SetSnapshots(v []*Snapshot) *DescribeSnapshotsOutput { - s.Snapshots = v - return s -} - -// Contains the parameters for DescribeSpotDatafeedSubscription. -type DescribeSpotDatafeedSubscriptionInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` -} - -// String returns the string representation -func (s DescribeSpotDatafeedSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSpotDatafeedSubscriptionInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeSpotDatafeedSubscriptionInput) SetDryRun(v bool) *DescribeSpotDatafeedSubscriptionInput { - s.DryRun = &v - return s -} - -// Contains the output of DescribeSpotDatafeedSubscription. -type DescribeSpotDatafeedSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // The Spot Instance data feed subscription. - SpotDatafeedSubscription *SpotDatafeedSubscription `locationName:"spotDatafeedSubscription" type:"structure"` -} - -// String returns the string representation -func (s DescribeSpotDatafeedSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSpotDatafeedSubscriptionOutput) GoString() string { - return s.String() -} - -// SetSpotDatafeedSubscription sets the SpotDatafeedSubscription field's value. -func (s *DescribeSpotDatafeedSubscriptionOutput) SetSpotDatafeedSubscription(v *SpotDatafeedSubscription) *DescribeSpotDatafeedSubscriptionOutput { - s.SpotDatafeedSubscription = v - return s -} - -// Contains the parameters for DescribeSpotFleetInstances. -type DescribeSpotFleetInstancesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The maximum number of results to return in a single call. Specify a value - // between 1 and 1000. The default value is 1000. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token for the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeSpotFleetInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSpotFleetInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSpotFleetInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSpotFleetInstancesInput"} - if s.SpotFleetRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeSpotFleetInstancesInput) SetDryRun(v bool) *DescribeSpotFleetInstancesInput { - s.DryRun = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSpotFleetInstancesInput) SetMaxResults(v int64) *DescribeSpotFleetInstancesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotFleetInstancesInput) SetNextToken(v string) *DescribeSpotFleetInstancesInput { - s.NextToken = &v - return s -} - -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *DescribeSpotFleetInstancesInput) SetSpotFleetRequestId(v string) *DescribeSpotFleetInstancesInput { - s.SpotFleetRequestId = &v - return s -} - -// Contains the output of DescribeSpotFleetInstances. -type DescribeSpotFleetInstancesOutput struct { - _ struct{} `type:"structure"` - - // The running instances. This list is refreshed periodically and might be out - // of date. - ActiveInstances []*ActiveInstance `locationName:"activeInstanceSet" locationNameList:"item" type:"list"` - - // The token required to retrieve the next set of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // The ID of the Spot Fleet request. - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` -} - -// String returns the string representation -func (s DescribeSpotFleetInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSpotFleetInstancesOutput) GoString() string { - return s.String() -} - -// SetActiveInstances sets the ActiveInstances field's value. -func (s *DescribeSpotFleetInstancesOutput) SetActiveInstances(v []*ActiveInstance) *DescribeSpotFleetInstancesOutput { - s.ActiveInstances = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotFleetInstancesOutput) SetNextToken(v string) *DescribeSpotFleetInstancesOutput { - s.NextToken = &v - return s -} - -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *DescribeSpotFleetInstancesOutput) SetSpotFleetRequestId(v string) *DescribeSpotFleetInstancesOutput { - s.SpotFleetRequestId = &v - return s -} - -// Contains the parameters for DescribeSpotFleetRequestHistory. -type DescribeSpotFleetRequestHistoryInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The type of events to describe. By default, all events are described. - EventType *string `locationName:"eventType" type:"string" enum:"EventType"` - - // The maximum number of results to return in a single call. Specify a value - // between 1 and 1000. The default value is 1000. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token for the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` - - // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // - // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s DescribeSpotFleetRequestHistoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSpotFleetRequestHistoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSpotFleetRequestHistoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSpotFleetRequestHistoryInput"} - if s.SpotFleetRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestId")) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeSpotFleetRequestHistoryInput) SetDryRun(v bool) *DescribeSpotFleetRequestHistoryInput { - s.DryRun = &v - return s -} - -// SetEventType sets the EventType field's value. -func (s *DescribeSpotFleetRequestHistoryInput) SetEventType(v string) *DescribeSpotFleetRequestHistoryInput { - s.EventType = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSpotFleetRequestHistoryInput) SetMaxResults(v int64) *DescribeSpotFleetRequestHistoryInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotFleetRequestHistoryInput) SetNextToken(v string) *DescribeSpotFleetRequestHistoryInput { - s.NextToken = &v - return s -} - -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *DescribeSpotFleetRequestHistoryInput) SetSpotFleetRequestId(v string) *DescribeSpotFleetRequestHistoryInput { - s.SpotFleetRequestId = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeSpotFleetRequestHistoryInput) SetStartTime(v time.Time) *DescribeSpotFleetRequestHistoryInput { - s.StartTime = &v - return s -} - -// Contains the output of DescribeSpotFleetRequestHistory. -type DescribeSpotFleetRequestHistoryOutput struct { - _ struct{} `type:"structure"` - - // Information about the events in the history of the Spot Fleet request. - HistoryRecords []*HistoryRecord `locationName:"historyRecordSet" locationNameList:"item" type:"list"` - - // The last date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // All records up to this time were retrieved. - // - // If nextToken indicates that there are more results, this value is not present. - LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp"` - - // The token required to retrieve the next set of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // The ID of the Spot Fleet request. - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` - - // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - StartTime *time.Time `locationName:"startTime" type:"timestamp"` -} - -// String returns the string representation -func (s DescribeSpotFleetRequestHistoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSpotFleetRequestHistoryOutput) GoString() string { - return s.String() -} - -// SetHistoryRecords sets the HistoryRecords field's value. -func (s *DescribeSpotFleetRequestHistoryOutput) SetHistoryRecords(v []*HistoryRecord) *DescribeSpotFleetRequestHistoryOutput { - s.HistoryRecords = v - return s -} - -// SetLastEvaluatedTime sets the LastEvaluatedTime field's value. -func (s *DescribeSpotFleetRequestHistoryOutput) SetLastEvaluatedTime(v time.Time) *DescribeSpotFleetRequestHistoryOutput { - s.LastEvaluatedTime = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotFleetRequestHistoryOutput) SetNextToken(v string) *DescribeSpotFleetRequestHistoryOutput { - s.NextToken = &v - return s -} - -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *DescribeSpotFleetRequestHistoryOutput) SetSpotFleetRequestId(v string) *DescribeSpotFleetRequestHistoryOutput { - s.SpotFleetRequestId = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeSpotFleetRequestHistoryOutput) SetStartTime(v time.Time) *DescribeSpotFleetRequestHistoryOutput { - s.StartTime = &v - return s -} - -// Contains the parameters for DescribeSpotFleetRequests. -type DescribeSpotFleetRequestsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The maximum number of results to return in a single call. Specify a value - // between 1 and 1000. The default value is 1000. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token for the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The IDs of the Spot Fleet requests. - SpotFleetRequestIds []*string `locationName:"spotFleetRequestId" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeSpotFleetRequestsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSpotFleetRequestsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeSpotFleetRequestsInput) SetDryRun(v bool) *DescribeSpotFleetRequestsInput { - s.DryRun = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSpotFleetRequestsInput) SetMaxResults(v int64) *DescribeSpotFleetRequestsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotFleetRequestsInput) SetNextToken(v string) *DescribeSpotFleetRequestsInput { - s.NextToken = &v - return s -} - -// SetSpotFleetRequestIds sets the SpotFleetRequestIds field's value. -func (s *DescribeSpotFleetRequestsInput) SetSpotFleetRequestIds(v []*string) *DescribeSpotFleetRequestsInput { - s.SpotFleetRequestIds = v - return s -} - -// Contains the output of DescribeSpotFleetRequests. -type DescribeSpotFleetRequestsOutput struct { - _ struct{} `type:"structure"` - - // The token required to retrieve the next set of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the configuration of your Spot Fleet. - SpotFleetRequestConfigs []*SpotFleetRequestConfig `locationName:"spotFleetRequestConfigSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeSpotFleetRequestsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSpotFleetRequestsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotFleetRequestsOutput) SetNextToken(v string) *DescribeSpotFleetRequestsOutput { - s.NextToken = &v - return s -} - -// SetSpotFleetRequestConfigs sets the SpotFleetRequestConfigs field's value. -func (s *DescribeSpotFleetRequestsOutput) SetSpotFleetRequestConfigs(v []*SpotFleetRequestConfig) *DescribeSpotFleetRequestsOutput { - s.SpotFleetRequestConfigs = v - return s -} - -// Contains the parameters for DescribeSpotInstanceRequests. -type DescribeSpotInstanceRequestsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * availability-zone-group - The Availability Zone group. - // - // * create-time - The time stamp when the Spot Instance request was created. - // - // * fault-code - The fault code related to the request. - // - // * fault-message - The fault message related to the request. - // - // * instance-id - The ID of the instance that fulfilled the request. - // - // * launch-group - The Spot Instance launch group. - // - // * launch.block-device-mapping.delete-on-termination - Indicates whether - // the EBS volume is deleted on instance termination. - // - // * launch.block-device-mapping.device-name - The device name for the volume - // in the block device mapping (for example, /dev/sdh or xvdh). - // - // * launch.block-device-mapping.snapshot-id - The ID of the snapshot for - // the EBS volume. - // - // * launch.block-device-mapping.volume-size - The size of the EBS volume, - // in GiB. - // - // * launch.block-device-mapping.volume-type - The type of EBS volume: gp2 - // for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput - // Optimized HDD, sc1for Cold HDD, or standard for Magnetic. - // - // * launch.group-id - The ID of the security group for the instance. - // - // * launch.group-name - The name of the security group for the instance. - // - // * launch.image-id - The ID of the AMI. - // - // * launch.instance-type - The type of instance (for example, m3.medium). - // - // * launch.kernel-id - The kernel ID. - // - // * launch.key-name - The name of the key pair the instance launched with. - // - // * launch.monitoring-enabled - Whether detailed monitoring is enabled for - // the Spot Instance. - // - // * launch.ramdisk-id - The RAM disk ID. - // - // * launched-availability-zone - The Availability Zone in which the request - // is launched. - // - // * network-interface.addresses.primary - Indicates whether the IP address - // is the primary private IP address. - // - // * network-interface.delete-on-termination - Indicates whether the network - // interface is deleted when the instance is terminated. - // - // * network-interface.description - A description of the network interface. - // - // * network-interface.device-index - The index of the device for the network - // interface attachment on the instance. - // - // * network-interface.group-id - The ID of the security group associated - // with the network interface. - // - // * network-interface.network-interface-id - The ID of the network interface. - // - // * network-interface.private-ip-address - The primary private IP address - // of the network interface. - // - // * network-interface.subnet-id - The ID of the subnet for the instance. - // - // * product-description - The product description associated with the instance - // (Linux/UNIX | Windows). - // - // * spot-instance-request-id - The Spot Instance request ID. - // - // * spot-price - The maximum hourly price for any Spot Instance launched - // to fulfill the request. - // - // * state - The state of the Spot Instance request (open | active | closed - // | cancelled | failed). Spot request status information can help you track - // your Amazon EC2 Spot Instance requests. For more information, see Spot - // Request Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) - // in the Amazon EC2 User Guide for Linux Instances. - // - // * status-code - The short code describing the most recent evaluation of - // your Spot Instance request. - // - // * status-message - The message explaining the status of the Spot Instance - // request. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * type - The type of Spot Instance request (one-time | persistent). - // - // * valid-from - The start date of the request. - // - // * valid-until - The end date of the request. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return in a single call. Specify a value - // between 5 and 1000. To retrieve the remaining results, make another call - // with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // The token to request the next set of results. This value is null when there - // are no more results to return. - NextToken *string `type:"string"` - - // One or more Spot Instance request IDs. - SpotInstanceRequestIds []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list"` -} - -// String returns the string representation -func (s DescribeSpotInstanceRequestsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSpotInstanceRequestsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeSpotInstanceRequestsInput) SetDryRun(v bool) *DescribeSpotInstanceRequestsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeSpotInstanceRequestsInput) SetFilters(v []*Filter) *DescribeSpotInstanceRequestsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSpotInstanceRequestsInput) SetMaxResults(v int64) *DescribeSpotInstanceRequestsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotInstanceRequestsInput) SetNextToken(v string) *DescribeSpotInstanceRequestsInput { - s.NextToken = &v - return s -} - -// SetSpotInstanceRequestIds sets the SpotInstanceRequestIds field's value. -func (s *DescribeSpotInstanceRequestsInput) SetSpotInstanceRequestIds(v []*string) *DescribeSpotInstanceRequestsInput { - s.SpotInstanceRequestIds = v - return s -} - -// Contains the output of DescribeSpotInstanceRequests. -type DescribeSpotInstanceRequestsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next set of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // One or more Spot Instance requests. - SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeSpotInstanceRequestsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSpotInstanceRequestsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotInstanceRequestsOutput) SetNextToken(v string) *DescribeSpotInstanceRequestsOutput { - s.NextToken = &v - return s -} - -// SetSpotInstanceRequests sets the SpotInstanceRequests field's value. -func (s *DescribeSpotInstanceRequestsOutput) SetSpotInstanceRequests(v []*SpotInstanceRequest) *DescribeSpotInstanceRequestsOutput { - s.SpotInstanceRequests = v - return s -} - -// Contains the parameters for DescribeSpotPriceHistory. -type DescribeSpotPriceHistoryInput struct { - _ struct{} `type:"structure"` - - // Filters the results by the specified Availability Zone. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The date and time, up to the current date, from which to stop retrieving - // the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - EndTime *time.Time `locationName:"endTime" type:"timestamp"` - - // One or more filters. - // - // * availability-zone - The Availability Zone for which prices should be - // returned. - // - // * instance-type - The type of instance (for example, m3.medium). - // - // * product-description - The product description for the Spot price (Linux/UNIX - // | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon - // VPC) | Windows (Amazon VPC)). - // - // * spot-price - The Spot price. The value must match exactly (or use wildcards; - // greater than or less than comparison is not supported). - // - // * timestamp - The time stamp of the Spot price history, in UTC format - // (for example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). - // Greater than or less than comparison is not supported. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // Filters the results by the specified instance types. - InstanceTypes []*string `locationName:"InstanceType" type:"list"` - - // The maximum number of results to return in a single call. Specify a value - // between 1 and 1000. The default value is 1000. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token for the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // Filters the results by the specified basic product descriptions. - ProductDescriptions []*string `locationName:"ProductDescription" type:"list"` - - // The date and time, up to the past 90 days, from which to start retrieving - // the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - StartTime *time.Time `locationName:"startTime" type:"timestamp"` -} - -// String returns the string representation -func (s DescribeSpotPriceHistoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSpotPriceHistoryInput) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *DescribeSpotPriceHistoryInput) SetAvailabilityZone(v string) *DescribeSpotPriceHistoryInput { - s.AvailabilityZone = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeSpotPriceHistoryInput) SetDryRun(v bool) *DescribeSpotPriceHistoryInput { - s.DryRun = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *DescribeSpotPriceHistoryInput) SetEndTime(v time.Time) *DescribeSpotPriceHistoryInput { - s.EndTime = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeSpotPriceHistoryInput) SetFilters(v []*Filter) *DescribeSpotPriceHistoryInput { - s.Filters = v - return s -} - -// SetInstanceTypes sets the InstanceTypes field's value. -func (s *DescribeSpotPriceHistoryInput) SetInstanceTypes(v []*string) *DescribeSpotPriceHistoryInput { - s.InstanceTypes = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSpotPriceHistoryInput) SetMaxResults(v int64) *DescribeSpotPriceHistoryInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotPriceHistoryInput) SetNextToken(v string) *DescribeSpotPriceHistoryInput { - s.NextToken = &v - return s -} - -// SetProductDescriptions sets the ProductDescriptions field's value. -func (s *DescribeSpotPriceHistoryInput) SetProductDescriptions(v []*string) *DescribeSpotPriceHistoryInput { - s.ProductDescriptions = v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeSpotPriceHistoryInput) SetStartTime(v time.Time) *DescribeSpotPriceHistoryInput { - s.StartTime = &v - return s -} - -// Contains the output of DescribeSpotPriceHistory. -type DescribeSpotPriceHistoryOutput struct { - _ struct{} `type:"structure"` - - // The token required to retrieve the next set of results. This value is null - // or an empty string when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // The historical Spot prices. - SpotPriceHistory []*SpotPrice `locationName:"spotPriceHistorySet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeSpotPriceHistoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSpotPriceHistoryOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotPriceHistoryOutput) SetNextToken(v string) *DescribeSpotPriceHistoryOutput { - s.NextToken = &v - return s -} - -// SetSpotPriceHistory sets the SpotPriceHistory field's value. -func (s *DescribeSpotPriceHistoryOutput) SetSpotPriceHistory(v []*SpotPrice) *DescribeSpotPriceHistoryOutput { - s.SpotPriceHistory = v - return s -} - -type DescribeStaleSecurityGroupsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"5" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a prior call.) - NextToken *string `min:"1" type:"string"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeStaleSecurityGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStaleSecurityGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStaleSecurityGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStaleSecurityGroupsInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeStaleSecurityGroupsInput) SetDryRun(v bool) *DescribeStaleSecurityGroupsInput { - s.DryRun = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeStaleSecurityGroupsInput) SetMaxResults(v int64) *DescribeStaleSecurityGroupsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeStaleSecurityGroupsInput) SetNextToken(v string) *DescribeStaleSecurityGroupsInput { - s.NextToken = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DescribeStaleSecurityGroupsInput) SetVpcId(v string) *DescribeStaleSecurityGroupsInput { - s.VpcId = &v - return s -} - -type DescribeStaleSecurityGroupsOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the stale security groups. - StaleSecurityGroupSet []*StaleSecurityGroup `locationName:"staleSecurityGroupSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeStaleSecurityGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStaleSecurityGroupsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeStaleSecurityGroupsOutput) SetNextToken(v string) *DescribeStaleSecurityGroupsOutput { - s.NextToken = &v - return s -} - -// SetStaleSecurityGroupSet sets the StaleSecurityGroupSet field's value. -func (s *DescribeStaleSecurityGroupsOutput) SetStaleSecurityGroupSet(v []*StaleSecurityGroup) *DescribeStaleSecurityGroupsOutput { - s.StaleSecurityGroupSet = v - return s -} - -type DescribeSubnetsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * availability-zone - The Availability Zone for the subnet. You can also - // use availabilityZone as the filter name. - // - // * availability-zone-id - The ID of the Availability Zone for the subnet. - // You can also use availabilityZoneId as the filter name. - // - // * available-ip-address-count - The number of IPv4 addresses in the subnet - // that are available. - // - // * cidr-block - The IPv4 CIDR block of the subnet. The CIDR block you specify - // must exactly match the subnet's CIDR block for information to be returned - // for the subnet. You can also use cidr or cidrBlock as the filter names. - // - // * default-for-az - Indicates whether this is the default subnet for the - // Availability Zone. You can also use defaultForAz as the filter name. - // - // * ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated - // with the subnet. - // - // * ipv6-cidr-block-association.association-id - An association ID for an - // IPv6 CIDR block associated with the subnet. - // - // * ipv6-cidr-block-association.state - The state of an IPv6 CIDR block - // associated with the subnet. - // - // * owner-id - The ID of the AWS account that owns the subnet. - // - // * state - The state of the subnet (pending | available). - // - // * subnet-arn - The Amazon Resource Name (ARN) of the subnet. - // - // * subnet-id - The ID of the subnet. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * vpc-id - The ID of the VPC for the subnet. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more subnet IDs. - // - // Default: Describes all your subnets. - SubnetIds []*string `locationName:"SubnetId" locationNameList:"SubnetId" type:"list"` -} - -// String returns the string representation -func (s DescribeSubnetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSubnetsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeSubnetsInput) SetDryRun(v bool) *DescribeSubnetsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeSubnetsInput) SetFilters(v []*Filter) *DescribeSubnetsInput { - s.Filters = v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *DescribeSubnetsInput) SetSubnetIds(v []*string) *DescribeSubnetsInput { - s.SubnetIds = v - return s -} - -type DescribeSubnetsOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more subnets. - Subnets []*Subnet `locationName:"subnetSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeSubnetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSubnetsOutput) GoString() string { - return s.String() -} - -// SetSubnets sets the Subnets field's value. -func (s *DescribeSubnetsOutput) SetSubnets(v []*Subnet) *DescribeSubnetsOutput { - s.Subnets = v - return s -} - -type DescribeTagsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * key - The tag key. - // - // * resource-id - The ID of the resource. - // - // * resource-type - The resource type (customer-gateway | dedicated-host - // | dhcp-options | elastic-ip | fleet | fpga-image | image | instance | - // internet-gateway | launch-template | natgateway | network-acl | network-interface - // | reserved-instances | route-table | security-group | snapshot | spot-instances-request - // | subnet | volume | vpc | vpc-peering-connection | vpn-connection | vpn-gateway). - // - // * tag: - The key/value combination of the tag. For example, specify - // "tag:Owner" for the filter name and "TeamA" for the filter value to find - // resources with the tag "Owner=TeamA". - // - // * value - The tag value. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return in a single call. This value can - // be between 5 and 1000. To retrieve the remaining results, make another call - // with the returned NextToken value. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeTagsInput) SetDryRun(v bool) *DescribeTagsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeTagsInput) SetFilters(v []*Filter) *DescribeTagsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeTagsInput) SetMaxResults(v int64) *DescribeTagsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeTagsInput) SetNextToken(v string) *DescribeTagsInput { - s.NextToken = &v - return s -} - -type DescribeTagsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // The tags. - Tags []*TagDescription `locationName:"tagSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeTagsOutput) SetNextToken(v string) *DescribeTagsOutput { - s.NextToken = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *DescribeTagsOutput) SetTags(v []*TagDescription) *DescribeTagsOutput { - s.Tags = v - return s -} - -type DescribeTransitGatewayAttachmentsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. The possible values are: - // - // * association.transit-gateway-route-table-id - The ID of the route table - // for the transit gateway. - // - // * association.state - The state of the association (associating | associated - // | disassociating). - // - // * resource-id - The ID of the resource. - // - // * resource-owner - The ID of the AWS account that owns the resource. - // - // * resource-type - The resource type (vpc | vpn). - // - // * state - The state of the attachment (pendingAcceptance | pending | available - // | modifying | deleting | deleted | failed | rejected). - // - // * transit-gateway-attachment-id - The ID of the attachment. - // - // * transit-gateway-id - The ID of the transit gateway. - // - // * transit-gateway-owner - The ID of the AWS account that owns the transit - // gateway. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `min:"5" type:"integer"` - - // The token for the next page of results. - NextToken *string `type:"string"` - - // The IDs of the attachments. - TransitGatewayAttachmentIds []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeTransitGatewayAttachmentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTransitGatewayAttachmentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTransitGatewayAttachmentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTransitGatewayAttachmentsInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeTransitGatewayAttachmentsInput) SetDryRun(v bool) *DescribeTransitGatewayAttachmentsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeTransitGatewayAttachmentsInput) SetFilters(v []*Filter) *DescribeTransitGatewayAttachmentsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeTransitGatewayAttachmentsInput) SetMaxResults(v int64) *DescribeTransitGatewayAttachmentsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeTransitGatewayAttachmentsInput) SetNextToken(v string) *DescribeTransitGatewayAttachmentsInput { - s.NextToken = &v - return s -} - -// SetTransitGatewayAttachmentIds sets the TransitGatewayAttachmentIds field's value. -func (s *DescribeTransitGatewayAttachmentsInput) SetTransitGatewayAttachmentIds(v []*string) *DescribeTransitGatewayAttachmentsInput { - s.TransitGatewayAttachmentIds = v - return s -} - -type DescribeTransitGatewayAttachmentsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the attachments. - TransitGatewayAttachments []*TransitGatewayAttachment `locationName:"transitGatewayAttachments" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeTransitGatewayAttachmentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTransitGatewayAttachmentsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeTransitGatewayAttachmentsOutput) SetNextToken(v string) *DescribeTransitGatewayAttachmentsOutput { - s.NextToken = &v - return s -} - -// SetTransitGatewayAttachments sets the TransitGatewayAttachments field's value. -func (s *DescribeTransitGatewayAttachmentsOutput) SetTransitGatewayAttachments(v []*TransitGatewayAttachment) *DescribeTransitGatewayAttachmentsOutput { - s.TransitGatewayAttachments = v - return s -} - -type DescribeTransitGatewayRouteTablesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. The possible values are: - // - // * default-association-route-table - Indicates whether this is the default - // association route table for the transit gateway (true | false). - // - // * default-propagation-route-table - Indicates whether this is the default - // propagation route table for the transit gateway (true | false). - // - // * state - The state of the attachment (pendingAcceptance | pending | available - // | modifying | deleting | deleted | failed | rejected). - // - // * transit-gateway-id - The ID of the transit gateway. - // - // * transit-gateway-route-table-id - The ID of the transit gateway route - // table. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `min:"5" type:"integer"` - - // The token for the next page of results. - NextToken *string `type:"string"` - - // The IDs of the transit gateway route tables. - TransitGatewayRouteTableIds []*string `locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeTransitGatewayRouteTablesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTransitGatewayRouteTablesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTransitGatewayRouteTablesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTransitGatewayRouteTablesInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeTransitGatewayRouteTablesInput) SetDryRun(v bool) *DescribeTransitGatewayRouteTablesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeTransitGatewayRouteTablesInput) SetFilters(v []*Filter) *DescribeTransitGatewayRouteTablesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeTransitGatewayRouteTablesInput) SetMaxResults(v int64) *DescribeTransitGatewayRouteTablesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeTransitGatewayRouteTablesInput) SetNextToken(v string) *DescribeTransitGatewayRouteTablesInput { - s.NextToken = &v - return s -} - -// SetTransitGatewayRouteTableIds sets the TransitGatewayRouteTableIds field's value. -func (s *DescribeTransitGatewayRouteTablesInput) SetTransitGatewayRouteTableIds(v []*string) *DescribeTransitGatewayRouteTablesInput { - s.TransitGatewayRouteTableIds = v - return s -} - -type DescribeTransitGatewayRouteTablesOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the transit gateway route tables. - TransitGatewayRouteTables []*TransitGatewayRouteTable `locationName:"transitGatewayRouteTables" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeTransitGatewayRouteTablesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTransitGatewayRouteTablesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeTransitGatewayRouteTablesOutput) SetNextToken(v string) *DescribeTransitGatewayRouteTablesOutput { - s.NextToken = &v - return s -} - -// SetTransitGatewayRouteTables sets the TransitGatewayRouteTables field's value. -func (s *DescribeTransitGatewayRouteTablesOutput) SetTransitGatewayRouteTables(v []*TransitGatewayRouteTable) *DescribeTransitGatewayRouteTablesOutput { - s.TransitGatewayRouteTables = v - return s -} - -type DescribeTransitGatewayVpcAttachmentsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. The possible values are: - // - // * state - The state of the attachment (pendingAcceptance | pending | available - // | modifying | deleting | deleted | failed | rejected). - // - // * transit-gateway-attachment-id - The ID of the attachment. - // - // * transit-gateway-id - The ID of the transit gateway. - // - // * vpc-id - The ID of the VPC. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `min:"5" type:"integer"` - - // The token for the next page of results. - NextToken *string `type:"string"` - - // The IDs of the attachments. - TransitGatewayAttachmentIds []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeTransitGatewayVpcAttachmentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTransitGatewayVpcAttachmentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTransitGatewayVpcAttachmentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTransitGatewayVpcAttachmentsInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeTransitGatewayVpcAttachmentsInput) SetDryRun(v bool) *DescribeTransitGatewayVpcAttachmentsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeTransitGatewayVpcAttachmentsInput) SetFilters(v []*Filter) *DescribeTransitGatewayVpcAttachmentsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeTransitGatewayVpcAttachmentsInput) SetMaxResults(v int64) *DescribeTransitGatewayVpcAttachmentsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeTransitGatewayVpcAttachmentsInput) SetNextToken(v string) *DescribeTransitGatewayVpcAttachmentsInput { - s.NextToken = &v - return s -} - -// SetTransitGatewayAttachmentIds sets the TransitGatewayAttachmentIds field's value. -func (s *DescribeTransitGatewayVpcAttachmentsInput) SetTransitGatewayAttachmentIds(v []*string) *DescribeTransitGatewayVpcAttachmentsInput { - s.TransitGatewayAttachmentIds = v - return s -} - -type DescribeTransitGatewayVpcAttachmentsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the VPC attachments. - TransitGatewayVpcAttachments []*TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachments" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeTransitGatewayVpcAttachmentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTransitGatewayVpcAttachmentsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeTransitGatewayVpcAttachmentsOutput) SetNextToken(v string) *DescribeTransitGatewayVpcAttachmentsOutput { - s.NextToken = &v - return s -} - -// SetTransitGatewayVpcAttachments sets the TransitGatewayVpcAttachments field's value. -func (s *DescribeTransitGatewayVpcAttachmentsOutput) SetTransitGatewayVpcAttachments(v []*TransitGatewayVpcAttachment) *DescribeTransitGatewayVpcAttachmentsOutput { - s.TransitGatewayVpcAttachments = v - return s -} - -type DescribeTransitGatewaysInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. The possible values are: - // - // * owner-id - The ID of the AWS account that owns the transit gateway. - // - // * options.propagation-default-route-table-id - The ID of the default propagation - // route table. - // - // * options.amazon-side-asn - The private ASN for the Amazon side of a BGP - // session. - // - // * options.association-default-route-table-id - The ID of the default association - // route table. - // - // * options.auto-accept-shared-attachments - Indicates whether there is - // automatic acceptance of attachment requests (enable | disable). - // - // * options.default-route-table-association - Indicates whether resource - // attachments are automatically associated with the default association - // route table (enable | disable). - // - // * options.default-route-table-propagation - Indicates whether resource - // attachments automatically propagate routes to the default propagation - // route table (enable | disable). - // - // * options.dns-support - Indicates whether DNS support is enabled (enable - // | disable). - // - // * options.vpn-ecmp-support - Indicates whether Equal Cost Multipath Protocol - // support is enabled (enable | disable). - // - // * state - The state of the attachment (pendingAcceptance | pending | available - // | modifying | deleting | deleted | failed | rejected). - // - // * transit-gateway-id - The ID of the transit gateway. - // - // * transit-gateway-state - The state of the transit gateway (pending | - // available | deleting | deleted). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `min:"5" type:"integer"` - - // The token for the next page of results. - NextToken *string `type:"string"` - - // The IDs of the transit gateways. - TransitGatewayIds []*string `locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeTransitGatewaysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTransitGatewaysInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTransitGatewaysInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTransitGatewaysInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeTransitGatewaysInput) SetDryRun(v bool) *DescribeTransitGatewaysInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeTransitGatewaysInput) SetFilters(v []*Filter) *DescribeTransitGatewaysInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeTransitGatewaysInput) SetMaxResults(v int64) *DescribeTransitGatewaysInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeTransitGatewaysInput) SetNextToken(v string) *DescribeTransitGatewaysInput { - s.NextToken = &v - return s -} - -// SetTransitGatewayIds sets the TransitGatewayIds field's value. -func (s *DescribeTransitGatewaysInput) SetTransitGatewayIds(v []*string) *DescribeTransitGatewaysInput { - s.TransitGatewayIds = v - return s -} - -type DescribeTransitGatewaysOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the transit gateways. - TransitGateways []*TransitGateway `locationName:"transitGatewaySet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeTransitGatewaysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTransitGatewaysOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeTransitGatewaysOutput) SetNextToken(v string) *DescribeTransitGatewaysOutput { - s.NextToken = &v - return s -} - -// SetTransitGateways sets the TransitGateways field's value. -func (s *DescribeTransitGatewaysOutput) SetTransitGateways(v []*TransitGateway) *DescribeTransitGatewaysOutput { - s.TransitGateways = v - return s -} - -// Contains the parameters for DescribeVolumeAttribute. -type DescribeVolumeAttributeInput struct { - _ struct{} `type:"structure"` - - // The attribute of the volume. This parameter is required. - // - // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"VolumeAttributeName"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the volume. - // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeVolumeAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVolumeAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeVolumeAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeVolumeAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *DescribeVolumeAttributeInput) SetAttribute(v string) *DescribeVolumeAttributeInput { - s.Attribute = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVolumeAttributeInput) SetDryRun(v bool) *DescribeVolumeAttributeInput { - s.DryRun = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *DescribeVolumeAttributeInput) SetVolumeId(v string) *DescribeVolumeAttributeInput { - s.VolumeId = &v - return s -} - -// Contains the output of DescribeVolumeAttribute. -type DescribeVolumeAttributeOutput struct { - _ struct{} `type:"structure"` - - // The state of autoEnableIO attribute. - AutoEnableIO *AttributeBooleanValue `locationName:"autoEnableIO" type:"structure"` - - // A list of product codes. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` - - // The ID of the volume. - VolumeId *string `locationName:"volumeId" type:"string"` -} - -// String returns the string representation -func (s DescribeVolumeAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVolumeAttributeOutput) GoString() string { - return s.String() -} - -// SetAutoEnableIO sets the AutoEnableIO field's value. -func (s *DescribeVolumeAttributeOutput) SetAutoEnableIO(v *AttributeBooleanValue) *DescribeVolumeAttributeOutput { - s.AutoEnableIO = v - return s -} - -// SetProductCodes sets the ProductCodes field's value. -func (s *DescribeVolumeAttributeOutput) SetProductCodes(v []*ProductCode) *DescribeVolumeAttributeOutput { - s.ProductCodes = v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *DescribeVolumeAttributeOutput) SetVolumeId(v string) *DescribeVolumeAttributeOutput { - s.VolumeId = &v - return s -} - -// Contains the parameters for DescribeVolumeStatus. -type DescribeVolumeStatusInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * action.code - The action code for the event (for example, enable-volume-io). - // - // * action.description - A description of the action. - // - // * action.event-id - The event ID associated with the action. - // - // * availability-zone - The Availability Zone of the instance. - // - // * event.description - A description of the event. - // - // * event.event-id - The event ID. - // - // * event.event-type - The event type (for io-enabled: passed | failed; - // for io-performance: io-performance:degraded | io-performance:severely-degraded - // | io-performance:stalled). - // - // * event.not-after - The latest end time for the event. - // - // * event.not-before - The earliest start time for the event. - // - // * volume-status.details-name - The cause for volume-status.status (io-enabled - // | io-performance). - // - // * volume-status.details-status - The status of volume-status.details-name - // (for io-enabled: passed | failed; for io-performance: normal | degraded - // | severely-degraded | stalled). - // - // * volume-status.status - The status of the volume (ok | impaired | warning - // | insufficient-data). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of volume results returned by DescribeVolumeStatus in - // paginated output. When this parameter is used, the request only returns MaxResults - // results in a single page along with a NextToken response element. The remaining - // results of the initial request can be seen by sending another request with - // the returned NextToken value. This value can be between 5 and 1000; if MaxResults - // is given a value larger than 1000, only 1000 results are returned. If this - // parameter is not used, then DescribeVolumeStatus returns all results. You - // cannot specify this parameter and the volume IDs parameter in the same request. - MaxResults *int64 `type:"integer"` - - // The NextToken value to include in a future DescribeVolumeStatus request. - // When the results of the request exceed MaxResults, this value can be used - // to retrieve the next page of results. This value is null when there are no - // more results to return. - NextToken *string `type:"string"` - - // One or more volume IDs. - // - // Default: Describes all your volumes. - VolumeIds []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"` -} - -// String returns the string representation -func (s DescribeVolumeStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVolumeStatusInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVolumeStatusInput) SetDryRun(v bool) *DescribeVolumeStatusInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVolumeStatusInput) SetFilters(v []*Filter) *DescribeVolumeStatusInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVolumeStatusInput) SetMaxResults(v int64) *DescribeVolumeStatusInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVolumeStatusInput) SetNextToken(v string) *DescribeVolumeStatusInput { - s.NextToken = &v - return s -} - -// SetVolumeIds sets the VolumeIds field's value. -func (s *DescribeVolumeStatusInput) SetVolumeIds(v []*string) *DescribeVolumeStatusInput { - s.VolumeIds = v - return s -} - -// Contains the output of DescribeVolumeStatus. -type DescribeVolumeStatusOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of volumes. - VolumeStatuses []*VolumeStatusItem `locationName:"volumeStatusSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVolumeStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVolumeStatusOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVolumeStatusOutput) SetNextToken(v string) *DescribeVolumeStatusOutput { - s.NextToken = &v - return s -} - -// SetVolumeStatuses sets the VolumeStatuses field's value. -func (s *DescribeVolumeStatusOutput) SetVolumeStatuses(v []*VolumeStatusItem) *DescribeVolumeStatusOutput { - s.VolumeStatuses = v - return s -} - -// Contains the parameters for DescribeVolumes. -type DescribeVolumesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * attachment.attach-time - The time stamp when the attachment initiated. - // - // * attachment.delete-on-termination - Whether the volume is deleted on - // instance termination. - // - // * attachment.device - The device name specified in the block device mapping - // (for example, /dev/sda1). - // - // * attachment.instance-id - The ID of the instance the volume is attached - // to. - // - // * attachment.status - The attachment state (attaching | attached | detaching). - // - // * availability-zone - The Availability Zone in which the volume was created. - // - // * create-time - The time stamp when the volume was created. - // - // * encrypted - The encryption status of the volume. - // - // * size - The size of the volume, in GiB. - // - // * snapshot-id - The snapshot from which the volume was created. - // - // * status - The status of the volume (creating | available | in-use | deleting - // | deleted | error). - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * volume-id - The volume ID. - // - // * volume-type - The Amazon EBS volume type. This can be gp2 for General - // Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput Optimized - // HDD, sc1 for Cold HDD, or standard for Magnetic volumes. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of volume results returned by DescribeVolumes in paginated - // output. When this parameter is used, DescribeVolumes only returns MaxResults - // results in a single page along with a NextToken response element. The remaining - // results of the initial request can be seen by sending another DescribeVolumes - // request with the returned NextToken value. This value can be between 5 and - // 500; if MaxResults is given a value larger than 500, only 500 results are - // returned. If this parameter is not used, then DescribeVolumes returns all - // results. You cannot specify this parameter and the volume IDs parameter in - // the same request. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The NextToken value returned from a previous paginated DescribeVolumes request - // where MaxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // NextToken value. This value is null when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // One or more volume IDs. - VolumeIds []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"` -} - -// String returns the string representation -func (s DescribeVolumesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVolumesInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVolumesInput) SetDryRun(v bool) *DescribeVolumesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVolumesInput) SetFilters(v []*Filter) *DescribeVolumesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVolumesInput) SetMaxResults(v int64) *DescribeVolumesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVolumesInput) SetNextToken(v string) *DescribeVolumesInput { - s.NextToken = &v - return s -} - -// SetVolumeIds sets the VolumeIds field's value. -func (s *DescribeVolumesInput) SetVolumeIds(v []*string) *DescribeVolumesInput { - s.VolumeIds = v - return s -} - -type DescribeVolumesModificationsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. Supported filters: volume-id, modification-state, target-size, - // target-iops, target-volume-type, original-size, original-iops, original-volume-type, - // start-time. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results (up to a limit of 500) to be returned in a - // paginated request. - MaxResults *int64 `type:"integer"` - - // The nextToken value returned by a previous paginated request. - NextToken *string `type:"string"` - - // One or more volume IDs for which in-progress modifications will be described. - VolumeIds []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"` -} - -// String returns the string representation -func (s DescribeVolumesModificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVolumesModificationsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVolumesModificationsInput) SetDryRun(v bool) *DescribeVolumesModificationsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVolumesModificationsInput) SetFilters(v []*Filter) *DescribeVolumesModificationsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVolumesModificationsInput) SetMaxResults(v int64) *DescribeVolumesModificationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVolumesModificationsInput) SetNextToken(v string) *DescribeVolumesModificationsInput { - s.NextToken = &v - return s -} - -// SetVolumeIds sets the VolumeIds field's value. -func (s *DescribeVolumesModificationsInput) SetVolumeIds(v []*string) *DescribeVolumesModificationsInput { - s.VolumeIds = v - return s -} - -type DescribeVolumesModificationsOutput struct { - _ struct{} `type:"structure"` - - // Token for pagination, null if there are no more results - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of returned VolumeModification objects. - VolumesModifications []*VolumeModification `locationName:"volumeModificationSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVolumesModificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVolumesModificationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVolumesModificationsOutput) SetNextToken(v string) *DescribeVolumesModificationsOutput { - s.NextToken = &v - return s -} - -// SetVolumesModifications sets the VolumesModifications field's value. -func (s *DescribeVolumesModificationsOutput) SetVolumesModifications(v []*VolumeModification) *DescribeVolumesModificationsOutput { - s.VolumesModifications = v - return s -} - -// Contains the output of DescribeVolumes. -type DescribeVolumesOutput struct { - _ struct{} `type:"structure"` - - // The NextToken value to include in a future DescribeVolumes request. When - // the results of a DescribeVolumes request exceed MaxResults, this value can - // be used to retrieve the next page of results. This value is null when there - // are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the volumes. - Volumes []*Volume `locationName:"volumeSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVolumesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVolumesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVolumesOutput) SetNextToken(v string) *DescribeVolumesOutput { - s.NextToken = &v - return s -} - -// SetVolumes sets the Volumes field's value. -func (s *DescribeVolumesOutput) SetVolumes(v []*Volume) *DescribeVolumesOutput { - s.Volumes = v - return s -} - -type DescribeVpcAttributeInput struct { - _ struct{} `type:"structure"` - - // The VPC attribute. - // - // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"VpcAttributeName"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeVpcAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeVpcAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeVpcAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *DescribeVpcAttributeInput) SetAttribute(v string) *DescribeVpcAttributeInput { - s.Attribute = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcAttributeInput) SetDryRun(v bool) *DescribeVpcAttributeInput { - s.DryRun = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DescribeVpcAttributeInput) SetVpcId(v string) *DescribeVpcAttributeInput { - s.VpcId = &v - return s -} - -type DescribeVpcAttributeOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether the instances launched in the VPC get DNS hostnames. If - // this attribute is true, instances in the VPC get DNS hostnames; otherwise, - // they do not. - EnableDnsHostnames *AttributeBooleanValue `locationName:"enableDnsHostnames" type:"structure"` - - // Indicates whether DNS resolution is enabled for the VPC. If this attribute - // is true, the Amazon DNS server resolves DNS hostnames for your instances - // to their corresponding IP addresses; otherwise, it does not. - EnableDnsSupport *AttributeBooleanValue `locationName:"enableDnsSupport" type:"structure"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s DescribeVpcAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcAttributeOutput) GoString() string { - return s.String() -} - -// SetEnableDnsHostnames sets the EnableDnsHostnames field's value. -func (s *DescribeVpcAttributeOutput) SetEnableDnsHostnames(v *AttributeBooleanValue) *DescribeVpcAttributeOutput { - s.EnableDnsHostnames = v - return s -} - -// SetEnableDnsSupport sets the EnableDnsSupport field's value. -func (s *DescribeVpcAttributeOutput) SetEnableDnsSupport(v *AttributeBooleanValue) *DescribeVpcAttributeOutput { - s.EnableDnsSupport = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DescribeVpcAttributeOutput) SetVpcId(v string) *DescribeVpcAttributeOutput { - s.VpcId = &v - return s -} - -type DescribeVpcClassicLinkDnsSupportInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `locationName:"maxResults" min:"5" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a prior call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // One or more VPC IDs. - VpcIds []*string `locationNameList:"VpcId" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcClassicLinkDnsSupportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcClassicLinkDnsSupportInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeVpcClassicLinkDnsSupportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeVpcClassicLinkDnsSupportInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVpcClassicLinkDnsSupportInput) SetMaxResults(v int64) *DescribeVpcClassicLinkDnsSupportInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcClassicLinkDnsSupportInput) SetNextToken(v string) *DescribeVpcClassicLinkDnsSupportInput { - s.NextToken = &v - return s -} - -// SetVpcIds sets the VpcIds field's value. -func (s *DescribeVpcClassicLinkDnsSupportInput) SetVpcIds(v []*string) *DescribeVpcClassicLinkDnsSupportInput { - s.VpcIds = v - return s -} - -type DescribeVpcClassicLinkDnsSupportOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // Information about the ClassicLink DNS support status of the VPCs. - Vpcs []*ClassicLinkDnsSupport `locationName:"vpcs" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcClassicLinkDnsSupportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcClassicLinkDnsSupportOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcClassicLinkDnsSupportOutput) SetNextToken(v string) *DescribeVpcClassicLinkDnsSupportOutput { - s.NextToken = &v - return s -} - -// SetVpcs sets the Vpcs field's value. -func (s *DescribeVpcClassicLinkDnsSupportOutput) SetVpcs(v []*ClassicLinkDnsSupport) *DescribeVpcClassicLinkDnsSupportOutput { - s.Vpcs = v - return s -} - -type DescribeVpcClassicLinkInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * is-classic-link-enabled - Whether the VPC is enabled for ClassicLink - // (true | false). - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more VPCs for which you want to describe the ClassicLink status. - VpcIds []*string `locationName:"VpcId" locationNameList:"VpcId" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcClassicLinkInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcClassicLinkInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcClassicLinkInput) SetDryRun(v bool) *DescribeVpcClassicLinkInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpcClassicLinkInput) SetFilters(v []*Filter) *DescribeVpcClassicLinkInput { - s.Filters = v - return s -} - -// SetVpcIds sets the VpcIds field's value. -func (s *DescribeVpcClassicLinkInput) SetVpcIds(v []*string) *DescribeVpcClassicLinkInput { - s.VpcIds = v - return s -} - -type DescribeVpcClassicLinkOutput struct { - _ struct{} `type:"structure"` - - // The ClassicLink status of one or more VPCs. - Vpcs []*VpcClassicLink `locationName:"vpcSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcClassicLinkOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcClassicLinkOutput) GoString() string { - return s.String() -} - -// SetVpcs sets the Vpcs field's value. -func (s *DescribeVpcClassicLinkOutput) SetVpcs(v []*VpcClassicLink) *DescribeVpcClassicLinkOutput { - s.Vpcs = v - return s -} - -type DescribeVpcEndpointConnectionNotificationsInput struct { - _ struct{} `type:"structure"` - - // The ID of the notification. - ConnectionNotificationId *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * connection-notification-arn - The ARN of SNS topic for the notification. - // - // * connection-notification-id - The ID of the notification. - // - // * connection-notification-state - The state of the notification (Enabled - // | Disabled). - // - // * connection-notification-type - The type of notification (Topic). - // - // * service-id - The ID of the endpoint service. - // - // * vpc-endpoint-id - The ID of the VPC endpoint. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another request with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // The token to request the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeVpcEndpointConnectionNotificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcEndpointConnectionNotificationsInput) GoString() string { - return s.String() -} - -// SetConnectionNotificationId sets the ConnectionNotificationId field's value. -func (s *DescribeVpcEndpointConnectionNotificationsInput) SetConnectionNotificationId(v string) *DescribeVpcEndpointConnectionNotificationsInput { - s.ConnectionNotificationId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcEndpointConnectionNotificationsInput) SetDryRun(v bool) *DescribeVpcEndpointConnectionNotificationsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpcEndpointConnectionNotificationsInput) SetFilters(v []*Filter) *DescribeVpcEndpointConnectionNotificationsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVpcEndpointConnectionNotificationsInput) SetMaxResults(v int64) *DescribeVpcEndpointConnectionNotificationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointConnectionNotificationsInput) SetNextToken(v string) *DescribeVpcEndpointConnectionNotificationsInput { - s.NextToken = &v - return s -} - -type DescribeVpcEndpointConnectionNotificationsOutput struct { - _ struct{} `type:"structure"` - - // One or more notifications. - ConnectionNotificationSet []*ConnectionNotification `locationName:"connectionNotificationSet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeVpcEndpointConnectionNotificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcEndpointConnectionNotificationsOutput) GoString() string { - return s.String() -} - -// SetConnectionNotificationSet sets the ConnectionNotificationSet field's value. -func (s *DescribeVpcEndpointConnectionNotificationsOutput) SetConnectionNotificationSet(v []*ConnectionNotification) *DescribeVpcEndpointConnectionNotificationsOutput { - s.ConnectionNotificationSet = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointConnectionNotificationsOutput) SetNextToken(v string) *DescribeVpcEndpointConnectionNotificationsOutput { - s.NextToken = &v - return s -} - -type DescribeVpcEndpointConnectionsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * service-id - The ID of the service. - // - // * vpc-endpoint-owner - The AWS account number of the owner of the endpoint. - // - // * vpc-endpoint-state - The state of the endpoint (pendingAcceptance | - // pending | available | deleting | deleted | rejected | failed). - // - // * vpc-endpoint-id - The ID of the endpoint. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. This value can be between 5 and - // 1000; if MaxResults is given a value larger than 1000, only 1000 results - // are returned. - MaxResults *int64 `type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeVpcEndpointConnectionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcEndpointConnectionsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcEndpointConnectionsInput) SetDryRun(v bool) *DescribeVpcEndpointConnectionsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpcEndpointConnectionsInput) SetFilters(v []*Filter) *DescribeVpcEndpointConnectionsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVpcEndpointConnectionsInput) SetMaxResults(v int64) *DescribeVpcEndpointConnectionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointConnectionsInput) SetNextToken(v string) *DescribeVpcEndpointConnectionsInput { - s.NextToken = &v - return s -} - -type DescribeVpcEndpointConnectionsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about one or more VPC endpoint connections. - VpcEndpointConnections []*VpcEndpointConnection `locationName:"vpcEndpointConnectionSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcEndpointConnectionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcEndpointConnectionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointConnectionsOutput) SetNextToken(v string) *DescribeVpcEndpointConnectionsOutput { - s.NextToken = &v - return s -} - -// SetVpcEndpointConnections sets the VpcEndpointConnections field's value. -func (s *DescribeVpcEndpointConnectionsOutput) SetVpcEndpointConnections(v []*VpcEndpointConnection) *DescribeVpcEndpointConnectionsOutput { - s.VpcEndpointConnections = v - return s -} - -type DescribeVpcEndpointServiceConfigurationsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * service-name - The name of the service. - // - // * service-id - The ID of the service. - // - // * service-state - The state of the service (Pending | Available | Deleting - // | Deleted | Failed). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. This value can be between 5 and - // 1000; if MaxResults is given a value larger than 1000, only 1000 results - // are returned. - MaxResults *int64 `type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `type:"string"` - - // The IDs of one or more services. - ServiceIds []*string `locationName:"ServiceId" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcEndpointServiceConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcEndpointServiceConfigurationsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcEndpointServiceConfigurationsInput) SetDryRun(v bool) *DescribeVpcEndpointServiceConfigurationsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpcEndpointServiceConfigurationsInput) SetFilters(v []*Filter) *DescribeVpcEndpointServiceConfigurationsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVpcEndpointServiceConfigurationsInput) SetMaxResults(v int64) *DescribeVpcEndpointServiceConfigurationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointServiceConfigurationsInput) SetNextToken(v string) *DescribeVpcEndpointServiceConfigurationsInput { - s.NextToken = &v - return s -} - -// SetServiceIds sets the ServiceIds field's value. -func (s *DescribeVpcEndpointServiceConfigurationsInput) SetServiceIds(v []*string) *DescribeVpcEndpointServiceConfigurationsInput { - s.ServiceIds = v - return s -} - -type DescribeVpcEndpointServiceConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about one or more services. - ServiceConfigurations []*ServiceConfiguration `locationName:"serviceConfigurationSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcEndpointServiceConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcEndpointServiceConfigurationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointServiceConfigurationsOutput) SetNextToken(v string) *DescribeVpcEndpointServiceConfigurationsOutput { - s.NextToken = &v - return s -} - -// SetServiceConfigurations sets the ServiceConfigurations field's value. -func (s *DescribeVpcEndpointServiceConfigurationsOutput) SetServiceConfigurations(v []*ServiceConfiguration) *DescribeVpcEndpointServiceConfigurationsOutput { - s.ServiceConfigurations = v - return s -} - -type DescribeVpcEndpointServicePermissionsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * principal - The ARN of the principal. - // - // * principal-type - The principal type (All | Service | OrganizationUnit - // | Account | User | Role). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. This value can be between 5 and - // 1000; if MaxResults is given a value larger than 1000, only 1000 results - // are returned. - MaxResults *int64 `type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `type:"string"` - - // The ID of the service. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeVpcEndpointServicePermissionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcEndpointServicePermissionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeVpcEndpointServicePermissionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeVpcEndpointServicePermissionsInput"} - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcEndpointServicePermissionsInput) SetDryRun(v bool) *DescribeVpcEndpointServicePermissionsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpcEndpointServicePermissionsInput) SetFilters(v []*Filter) *DescribeVpcEndpointServicePermissionsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVpcEndpointServicePermissionsInput) SetMaxResults(v int64) *DescribeVpcEndpointServicePermissionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointServicePermissionsInput) SetNextToken(v string) *DescribeVpcEndpointServicePermissionsInput { - s.NextToken = &v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *DescribeVpcEndpointServicePermissionsInput) SetServiceId(v string) *DescribeVpcEndpointServicePermissionsInput { - s.ServiceId = &v - return s -} - -type DescribeVpcEndpointServicePermissionsOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more allowed principals. - AllowedPrincipals []*AllowedPrincipal `locationName:"allowedPrincipals" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeVpcEndpointServicePermissionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcEndpointServicePermissionsOutput) GoString() string { - return s.String() -} - -// SetAllowedPrincipals sets the AllowedPrincipals field's value. -func (s *DescribeVpcEndpointServicePermissionsOutput) SetAllowedPrincipals(v []*AllowedPrincipal) *DescribeVpcEndpointServicePermissionsOutput { - s.AllowedPrincipals = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointServicePermissionsOutput) SetNextToken(v string) *DescribeVpcEndpointServicePermissionsOutput { - s.NextToken = &v - return s -} - -// Contains the parameters for DescribeVpcEndpointServices. -type DescribeVpcEndpointServicesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * service-name: The name of the service. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. - // - // Constraint: If the value is greater than 1000, we return only 1000 items. - MaxResults *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a prior call.) - NextToken *string `type:"string"` - - // One or more service names. - ServiceNames []*string `locationName:"ServiceName" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcEndpointServicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcEndpointServicesInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcEndpointServicesInput) SetDryRun(v bool) *DescribeVpcEndpointServicesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpcEndpointServicesInput) SetFilters(v []*Filter) *DescribeVpcEndpointServicesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVpcEndpointServicesInput) SetMaxResults(v int64) *DescribeVpcEndpointServicesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointServicesInput) SetNextToken(v string) *DescribeVpcEndpointServicesInput { - s.NextToken = &v - return s -} - -// SetServiceNames sets the ServiceNames field's value. -func (s *DescribeVpcEndpointServicesInput) SetServiceNames(v []*string) *DescribeVpcEndpointServicesInput { - s.ServiceNames = v - return s -} - -// Contains the output of DescribeVpcEndpointServices. -type DescribeVpcEndpointServicesOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the service. - ServiceDetails []*ServiceDetail `locationName:"serviceDetailSet" locationNameList:"item" type:"list"` - - // A list of supported services. - ServiceNames []*string `locationName:"serviceNameSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcEndpointServicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcEndpointServicesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointServicesOutput) SetNextToken(v string) *DescribeVpcEndpointServicesOutput { - s.NextToken = &v - return s -} - -// SetServiceDetails sets the ServiceDetails field's value. -func (s *DescribeVpcEndpointServicesOutput) SetServiceDetails(v []*ServiceDetail) *DescribeVpcEndpointServicesOutput { - s.ServiceDetails = v - return s -} - -// SetServiceNames sets the ServiceNames field's value. -func (s *DescribeVpcEndpointServicesOutput) SetServiceNames(v []*string) *DescribeVpcEndpointServicesOutput { - s.ServiceNames = v - return s -} - -// Contains the parameters for DescribeVpcEndpoints. -type DescribeVpcEndpointsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // * service-name: The name of the service. - // - // * vpc-id: The ID of the VPC in which the endpoint resides. - // - // * vpc-endpoint-id: The ID of the endpoint. - // - // * vpc-endpoint-state: The state of the endpoint. (pending | available - // | deleting | deleted) - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. - // - // Constraint: If the value is greater than 1000, we return only 1000 items. - MaxResults *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a prior call.) - NextToken *string `type:"string"` - - // One or more endpoint IDs. - VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcEndpointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcEndpointsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcEndpointsInput) SetDryRun(v bool) *DescribeVpcEndpointsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpcEndpointsInput) SetFilters(v []*Filter) *DescribeVpcEndpointsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVpcEndpointsInput) SetMaxResults(v int64) *DescribeVpcEndpointsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointsInput) SetNextToken(v string) *DescribeVpcEndpointsInput { - s.NextToken = &v - return s -} - -// SetVpcEndpointIds sets the VpcEndpointIds field's value. -func (s *DescribeVpcEndpointsInput) SetVpcEndpointIds(v []*string) *DescribeVpcEndpointsInput { - s.VpcEndpointIds = v - return s -} - -// Contains the output of DescribeVpcEndpoints. -type DescribeVpcEndpointsOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the endpoints. - VpcEndpoints []*VpcEndpoint `locationName:"vpcEndpointSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcEndpointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcEndpointsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointsOutput) SetNextToken(v string) *DescribeVpcEndpointsOutput { - s.NextToken = &v - return s -} - -// SetVpcEndpoints sets the VpcEndpoints field's value. -func (s *DescribeVpcEndpointsOutput) SetVpcEndpoints(v []*VpcEndpoint) *DescribeVpcEndpointsOutput { - s.VpcEndpoints = v - return s -} - -type DescribeVpcPeeringConnectionsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC. - // - // * accepter-vpc-info.owner-id - The AWS account ID of the owner of the - // accepter VPC. - // - // * accepter-vpc-info.vpc-id - The ID of the accepter VPC. - // - // * expiration-time - The expiration date and time for the VPC peering connection. - // - // * requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's - // VPC. - // - // * requester-vpc-info.owner-id - The AWS account ID of the owner of the - // requester VPC. - // - // * requester-vpc-info.vpc-id - The ID of the requester VPC. - // - // * status-code - The status of the VPC peering connection (pending-acceptance - // | failed | expired | provisioning | active | deleting | deleted | rejected). - // - // * status-message - A message that provides more information about the - // status of the VPC peering connection, if applicable. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * vpc-peering-connection-id - The ID of the VPC peering connection. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more VPC peering connection IDs. - // - // Default: Describes all your VPC peering connections. - VpcPeeringConnectionIds []*string `locationName:"VpcPeeringConnectionId" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcPeeringConnectionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcPeeringConnectionsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcPeeringConnectionsInput) SetDryRun(v bool) *DescribeVpcPeeringConnectionsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpcPeeringConnectionsInput) SetFilters(v []*Filter) *DescribeVpcPeeringConnectionsInput { - s.Filters = v - return s -} - -// SetVpcPeeringConnectionIds sets the VpcPeeringConnectionIds field's value. -func (s *DescribeVpcPeeringConnectionsInput) SetVpcPeeringConnectionIds(v []*string) *DescribeVpcPeeringConnectionsInput { - s.VpcPeeringConnectionIds = v - return s -} - -type DescribeVpcPeeringConnectionsOutput struct { - _ struct{} `type:"structure"` - - // Information about the VPC peering connections. - VpcPeeringConnections []*VpcPeeringConnection `locationName:"vpcPeeringConnectionSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcPeeringConnectionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcPeeringConnectionsOutput) GoString() string { - return s.String() -} - -// SetVpcPeeringConnections sets the VpcPeeringConnections field's value. -func (s *DescribeVpcPeeringConnectionsOutput) SetVpcPeeringConnections(v []*VpcPeeringConnection) *DescribeVpcPeeringConnectionsOutput { - s.VpcPeeringConnections = v - return s -} - -type DescribeVpcsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify - // must exactly match the VPC's CIDR block for information to be returned - // for the VPC. Must contain the slash followed by one or two digits (for - // example, /28). - // - // * cidr-block-association.cidr-block - An IPv4 CIDR block associated with - // the VPC. - // - // * cidr-block-association.association-id - The association ID for an IPv4 - // CIDR block associated with the VPC. - // - // * cidr-block-association.state - The state of an IPv4 CIDR block associated - // with the VPC. - // - // * dhcp-options-id - The ID of a set of DHCP options. - // - // * ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated - // with the VPC. - // - // * ipv6-cidr-block-association.association-id - The association ID for - // an IPv6 CIDR block associated with the VPC. - // - // * ipv6-cidr-block-association.state - The state of an IPv6 CIDR block - // associated with the VPC. - // - // * isDefault - Indicates whether the VPC is the default VPC. - // - // * owner-id - The ID of the AWS account that owns the VPC. - // - // * state - The state of the VPC (pending | available). - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * vpc-id - The ID of the VPC. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more VPC IDs. - // - // Default: Describes all your VPCs. - VpcIds []*string `locationName:"VpcId" locationNameList:"VpcId" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcsInput) SetDryRun(v bool) *DescribeVpcsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpcsInput) SetFilters(v []*Filter) *DescribeVpcsInput { - s.Filters = v - return s -} - -// SetVpcIds sets the VpcIds field's value. -func (s *DescribeVpcsInput) SetVpcIds(v []*string) *DescribeVpcsInput { - s.VpcIds = v - return s -} - -type DescribeVpcsOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more VPCs. - Vpcs []*Vpc `locationName:"vpcSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVpcsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcsOutput) GoString() string { - return s.String() -} - -// SetVpcs sets the Vpcs field's value. -func (s *DescribeVpcsOutput) SetVpcs(v []*Vpc) *DescribeVpcsOutput { - s.Vpcs = v - return s -} - -// Contains the parameters for DescribeVpnConnections. -type DescribeVpnConnectionsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * customer-gateway-configuration - The configuration information for the - // customer gateway. - // - // * customer-gateway-id - The ID of a customer gateway associated with the - // VPN connection. - // - // * state - The state of the VPN connection (pending | available | deleting - // | deleted). - // - // * option.static-routes-only - Indicates whether the connection has static - // routes only. Used for devices that do not support Border Gateway Protocol - // (BGP). - // - // * route.destination-cidr-block - The destination CIDR block. This corresponds - // to the subnet used in a customer data center. - // - // * bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP - // device. - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * type - The type of VPN connection. Currently the only supported type - // is ipsec.1. - // - // * vpn-connection-id - The ID of the VPN connection. - // - // * vpn-gateway-id - The ID of a virtual private gateway associated with - // the VPN connection. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more VPN connection IDs. - // - // Default: Describes your VPN connections. - VpnConnectionIds []*string `locationName:"VpnConnectionId" locationNameList:"VpnConnectionId" type:"list"` -} - -// String returns the string representation -func (s DescribeVpnConnectionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpnConnectionsInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpnConnectionsInput) SetDryRun(v bool) *DescribeVpnConnectionsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpnConnectionsInput) SetFilters(v []*Filter) *DescribeVpnConnectionsInput { - s.Filters = v - return s -} - -// SetVpnConnectionIds sets the VpnConnectionIds field's value. -func (s *DescribeVpnConnectionsInput) SetVpnConnectionIds(v []*string) *DescribeVpnConnectionsInput { - s.VpnConnectionIds = v - return s -} - -// Contains the output of DescribeVpnConnections. -type DescribeVpnConnectionsOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more VPN connections. - VpnConnections []*VpnConnection `locationName:"vpnConnectionSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVpnConnectionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpnConnectionsOutput) GoString() string { - return s.String() -} - -// SetVpnConnections sets the VpnConnections field's value. -func (s *DescribeVpnConnectionsOutput) SetVpnConnections(v []*VpnConnection) *DescribeVpnConnectionsOutput { - s.VpnConnections = v - return s -} - -// Contains the parameters for DescribeVpnGateways. -type DescribeVpnGatewaysInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * amazon-side-asn - The Autonomous System Number (ASN) for the Amazon - // side of the gateway. - // - // * attachment.state - The current state of the attachment between the gateway - // and the VPC (attaching | attached | detaching | detached). - // - // * attachment.vpc-id - The ID of an attached VPC. - // - // * availability-zone - The Availability Zone for the virtual private gateway - // (if applicable). - // - // * state - The state of the virtual private gateway (pending | available - // | deleting | deleted). - // - // * tag: - The key/value combination of a tag assigned to the resource. - // Use the tag key in the filter name and the tag value as the filter value. - // For example, to find all resources that have a tag with the key Owner - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * type - The type of virtual private gateway. Currently the only supported - // type is ipsec.1. - // - // * vpn-gateway-id - The ID of the virtual private gateway. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more virtual private gateway IDs. - // - // Default: Describes all your virtual private gateways. - VpnGatewayIds []*string `locationName:"VpnGatewayId" locationNameList:"VpnGatewayId" type:"list"` -} - -// String returns the string representation -func (s DescribeVpnGatewaysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpnGatewaysInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpnGatewaysInput) SetDryRun(v bool) *DescribeVpnGatewaysInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpnGatewaysInput) SetFilters(v []*Filter) *DescribeVpnGatewaysInput { - s.Filters = v - return s -} - -// SetVpnGatewayIds sets the VpnGatewayIds field's value. -func (s *DescribeVpnGatewaysInput) SetVpnGatewayIds(v []*string) *DescribeVpnGatewaysInput { - s.VpnGatewayIds = v - return s -} - -// Contains the output of DescribeVpnGateways. -type DescribeVpnGatewaysOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more virtual private gateways. - VpnGateways []*VpnGateway `locationName:"vpnGatewaySet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribeVpnGatewaysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpnGatewaysOutput) GoString() string { - return s.String() -} - -// SetVpnGateways sets the VpnGateways field's value. -func (s *DescribeVpnGatewaysOutput) SetVpnGateways(v []*VpnGateway) *DescribeVpnGatewaysOutput { - s.VpnGateways = v - return s -} - -type DetachClassicLinkVpcInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the instance to unlink from the VPC. - // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` - - // The ID of the VPC to which the instance is linked. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachClassicLinkVpcInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachClassicLinkVpcInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachClassicLinkVpcInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachClassicLinkVpcInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DetachClassicLinkVpcInput) SetDryRun(v bool) *DetachClassicLinkVpcInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DetachClassicLinkVpcInput) SetInstanceId(v string) *DetachClassicLinkVpcInput { - s.InstanceId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DetachClassicLinkVpcInput) SetVpcId(v string) *DetachClassicLinkVpcInput { - s.VpcId = &v - return s -} - -type DetachClassicLinkVpcOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s DetachClassicLinkVpcOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachClassicLinkVpcOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *DetachClassicLinkVpcOutput) SetReturn(v bool) *DetachClassicLinkVpcOutput { - s.Return = &v - return s -} - -type DetachInternetGatewayInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the internet gateway. - // - // InternetGatewayId is a required field - InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachInternetGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachInternetGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachInternetGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachInternetGatewayInput"} - if s.InternetGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("InternetGatewayId")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DetachInternetGatewayInput) SetDryRun(v bool) *DetachInternetGatewayInput { - s.DryRun = &v - return s -} - -// SetInternetGatewayId sets the InternetGatewayId field's value. -func (s *DetachInternetGatewayInput) SetInternetGatewayId(v string) *DetachInternetGatewayInput { - s.InternetGatewayId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DetachInternetGatewayInput) SetVpcId(v string) *DetachInternetGatewayInput { - s.VpcId = &v - return s -} - -type DetachInternetGatewayOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DetachInternetGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachInternetGatewayOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DetachNetworkInterface. -type DetachNetworkInterfaceInput struct { - _ struct{} `type:"structure"` - - // The ID of the attachment. - // - // AttachmentId is a required field - AttachmentId *string `locationName:"attachmentId" type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Specifies whether to force a detachment. - Force *bool `locationName:"force" type:"boolean"` -} - -// String returns the string representation -func (s DetachNetworkInterfaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachNetworkInterfaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachNetworkInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachNetworkInterfaceInput"} - if s.AttachmentId == nil { - invalidParams.Add(request.NewErrParamRequired("AttachmentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttachmentId sets the AttachmentId field's value. -func (s *DetachNetworkInterfaceInput) SetAttachmentId(v string) *DetachNetworkInterfaceInput { - s.AttachmentId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DetachNetworkInterfaceInput) SetDryRun(v bool) *DetachNetworkInterfaceInput { - s.DryRun = &v - return s -} - -// SetForce sets the Force field's value. -func (s *DetachNetworkInterfaceInput) SetForce(v bool) *DetachNetworkInterfaceInput { - s.Force = &v - return s -} - -type DetachNetworkInterfaceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DetachNetworkInterfaceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachNetworkInterfaceOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DetachVolume. -type DetachVolumeInput struct { - _ struct{} `type:"structure"` - - // The device name. - Device *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Forces detachment if the previous detachment attempt did not occur cleanly - // (for example, logging into an instance, unmounting the volume, and detaching - // normally). This option can lead to data loss or a corrupted file system. - // Use this option only as a last resort to detach a volume from a failed instance. - // The instance won't have an opportunity to flush file system caches or file - // system metadata. If you use this option, you must perform file system check - // and repair procedures. - Force *bool `type:"boolean"` - - // The ID of the instance. - InstanceId *string `type:"string"` - - // The ID of the volume. - // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachVolumeInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDevice sets the Device field's value. -func (s *DetachVolumeInput) SetDevice(v string) *DetachVolumeInput { - s.Device = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DetachVolumeInput) SetDryRun(v bool) *DetachVolumeInput { - s.DryRun = &v - return s -} - -// SetForce sets the Force field's value. -func (s *DetachVolumeInput) SetForce(v bool) *DetachVolumeInput { - s.Force = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DetachVolumeInput) SetInstanceId(v string) *DetachVolumeInput { - s.InstanceId = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *DetachVolumeInput) SetVolumeId(v string) *DetachVolumeInput { - s.VolumeId = &v - return s -} - -// Contains the parameters for DetachVpnGateway. -type DetachVpnGatewayInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` - - // The ID of the virtual private gateway. - // - // VpnGatewayId is a required field - VpnGatewayId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachVpnGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachVpnGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachVpnGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachVpnGatewayInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - if s.VpnGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("VpnGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DetachVpnGatewayInput) SetDryRun(v bool) *DetachVpnGatewayInput { - s.DryRun = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DetachVpnGatewayInput) SetVpcId(v string) *DetachVpnGatewayInput { - s.VpcId = &v - return s -} - -// SetVpnGatewayId sets the VpnGatewayId field's value. -func (s *DetachVpnGatewayInput) SetVpnGatewayId(v string) *DetachVpnGatewayInput { - s.VpnGatewayId = &v - return s -} - -type DetachVpnGatewayOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DetachVpnGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachVpnGatewayOutput) GoString() string { - return s.String() -} - -// Describes a DHCP configuration option. -type DhcpConfiguration struct { - _ struct{} `type:"structure"` - - // The name of a DHCP option. - Key *string `locationName:"key" type:"string"` - - // One or more values for the DHCP option. - Values []*AttributeValue `locationName:"valueSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DhcpConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DhcpConfiguration) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *DhcpConfiguration) SetKey(v string) *DhcpConfiguration { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *DhcpConfiguration) SetValues(v []*AttributeValue) *DhcpConfiguration { - s.Values = v - return s -} - -// Describes a set of DHCP options. -type DhcpOptions struct { - _ struct{} `type:"structure"` - - // One or more DHCP options in the set. - DhcpConfigurations []*DhcpConfiguration `locationName:"dhcpConfigurationSet" locationNameList:"item" type:"list"` - - // The ID of the set of DHCP options. - DhcpOptionsId *string `locationName:"dhcpOptionsId" type:"string"` - - // The ID of the AWS account that owns the DHCP options set. - OwnerId *string `locationName:"ownerId" type:"string"` - - // Any tags assigned to the DHCP options set. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DhcpOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DhcpOptions) GoString() string { - return s.String() -} - -// SetDhcpConfigurations sets the DhcpConfigurations field's value. -func (s *DhcpOptions) SetDhcpConfigurations(v []*DhcpConfiguration) *DhcpOptions { - s.DhcpConfigurations = v - return s -} - -// SetDhcpOptionsId sets the DhcpOptionsId field's value. -func (s *DhcpOptions) SetDhcpOptionsId(v string) *DhcpOptions { - s.DhcpOptionsId = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *DhcpOptions) SetOwnerId(v string) *DhcpOptions { - s.OwnerId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *DhcpOptions) SetTags(v []*Tag) *DhcpOptions { - s.Tags = v - return s -} - -// Describes an Active Directory. -type DirectoryServiceAuthentication struct { - _ struct{} `type:"structure"` - - // The ID of the Active Directory used for authentication. - DirectoryId *string `locationName:"directoryId" type:"string"` -} - -// String returns the string representation -func (s DirectoryServiceAuthentication) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DirectoryServiceAuthentication) GoString() string { - return s.String() -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DirectoryServiceAuthentication) SetDirectoryId(v string) *DirectoryServiceAuthentication { - s.DirectoryId = &v - return s -} - -// Describes the Active Directory to be used for client authentication. -type DirectoryServiceAuthenticationRequest struct { - _ struct{} `type:"structure"` - - // The ID of the Active Directory to be used for authentication. - DirectoryId *string `type:"string"` -} - -// String returns the string representation -func (s DirectoryServiceAuthenticationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DirectoryServiceAuthenticationRequest) GoString() string { - return s.String() -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DirectoryServiceAuthenticationRequest) SetDirectoryId(v string) *DirectoryServiceAuthenticationRequest { - s.DirectoryId = &v - return s -} - -type DisableTransitGatewayRouteTablePropagationInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the attachment. - // - // TransitGatewayAttachmentId is a required field - TransitGatewayAttachmentId *string `type:"string" required:"true"` - - // The ID of the propagation route table. - // - // TransitGatewayRouteTableId is a required field - TransitGatewayRouteTableId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableTransitGatewayRouteTablePropagationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableTransitGatewayRouteTablePropagationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableTransitGatewayRouteTablePropagationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableTransitGatewayRouteTablePropagationInput"} - if s.TransitGatewayAttachmentId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if s.TransitGatewayRouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DisableTransitGatewayRouteTablePropagationInput) SetDryRun(v bool) *DisableTransitGatewayRouteTablePropagationInput { - s.DryRun = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *DisableTransitGatewayRouteTablePropagationInput) SetTransitGatewayAttachmentId(v string) *DisableTransitGatewayRouteTablePropagationInput { - s.TransitGatewayAttachmentId = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *DisableTransitGatewayRouteTablePropagationInput) SetTransitGatewayRouteTableId(v string) *DisableTransitGatewayRouteTablePropagationInput { - s.TransitGatewayRouteTableId = &v - return s -} - -type DisableTransitGatewayRouteTablePropagationOutput struct { - _ struct{} `type:"structure"` - - // Information about route propagation. - Propagation *TransitGatewayPropagation `locationName:"propagation" type:"structure"` -} - -// String returns the string representation -func (s DisableTransitGatewayRouteTablePropagationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableTransitGatewayRouteTablePropagationOutput) GoString() string { - return s.String() -} - -// SetPropagation sets the Propagation field's value. -func (s *DisableTransitGatewayRouteTablePropagationOutput) SetPropagation(v *TransitGatewayPropagation) *DisableTransitGatewayRouteTablePropagationOutput { - s.Propagation = v - return s -} - -// Contains the parameters for DisableVgwRoutePropagation. -type DisableVgwRoutePropagationInput struct { - _ struct{} `type:"structure"` - - // The ID of the virtual private gateway. - // - // GatewayId is a required field - GatewayId *string `type:"string" required:"true"` - - // The ID of the route table. - // - // RouteTableId is a required field - RouteTableId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableVgwRoutePropagationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableVgwRoutePropagationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableVgwRoutePropagationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableVgwRoutePropagationInput"} - if s.GatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayId")) - } - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayId sets the GatewayId field's value. -func (s *DisableVgwRoutePropagationInput) SetGatewayId(v string) *DisableVgwRoutePropagationInput { - s.GatewayId = &v - return s -} - -// SetRouteTableId sets the RouteTableId field's value. -func (s *DisableVgwRoutePropagationInput) SetRouteTableId(v string) *DisableVgwRoutePropagationInput { - s.RouteTableId = &v - return s -} - -type DisableVgwRoutePropagationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableVgwRoutePropagationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableVgwRoutePropagationOutput) GoString() string { - return s.String() -} - -type DisableVpcClassicLinkDnsSupportInput struct { - _ struct{} `type:"structure"` - - // The ID of the VPC. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s DisableVpcClassicLinkDnsSupportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableVpcClassicLinkDnsSupportInput) GoString() string { - return s.String() -} - -// SetVpcId sets the VpcId field's value. -func (s *DisableVpcClassicLinkDnsSupportInput) SetVpcId(v string) *DisableVpcClassicLinkDnsSupportInput { - s.VpcId = &v - return s -} - -type DisableVpcClassicLinkDnsSupportOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s DisableVpcClassicLinkDnsSupportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableVpcClassicLinkDnsSupportOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *DisableVpcClassicLinkDnsSupportOutput) SetReturn(v bool) *DisableVpcClassicLinkDnsSupportOutput { - s.Return = &v - return s -} - -type DisableVpcClassicLinkInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableVpcClassicLinkInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableVpcClassicLinkInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableVpcClassicLinkInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableVpcClassicLinkInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DisableVpcClassicLinkInput) SetDryRun(v bool) *DisableVpcClassicLinkInput { - s.DryRun = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DisableVpcClassicLinkInput) SetVpcId(v string) *DisableVpcClassicLinkInput { - s.VpcId = &v - return s -} - -type DisableVpcClassicLinkOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s DisableVpcClassicLinkOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableVpcClassicLinkOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *DisableVpcClassicLinkOutput) SetReturn(v bool) *DisableVpcClassicLinkOutput { - s.Return = &v - return s -} - -type DisassociateAddressInput struct { - _ struct{} `type:"structure"` - - // [EC2-VPC] The association ID. Required for EC2-VPC. - AssociationId *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // [EC2-Classic] The Elastic IP address. Required for EC2-Classic. - PublicIp *string `type:"string"` -} - -// String returns the string representation -func (s DisassociateAddressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateAddressInput) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *DisassociateAddressInput) SetAssociationId(v string) *DisassociateAddressInput { - s.AssociationId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DisassociateAddressInput) SetDryRun(v bool) *DisassociateAddressInput { - s.DryRun = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *DisassociateAddressInput) SetPublicIp(v string) *DisassociateAddressInput { - s.PublicIp = &v - return s -} - -type DisassociateAddressOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateAddressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateAddressOutput) GoString() string { - return s.String() -} - -type DisassociateClientVpnTargetNetworkInput struct { - _ struct{} `type:"structure"` - - // The ID of the target network association. - // - // AssociationId is a required field - AssociationId *string `type:"string" required:"true"` - - // The ID of the Client VPN endpoint from which to disassociate the target network. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s DisassociateClientVpnTargetNetworkInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateClientVpnTargetNetworkInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateClientVpnTargetNetworkInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateClientVpnTargetNetworkInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) - } - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationId sets the AssociationId field's value. -func (s *DisassociateClientVpnTargetNetworkInput) SetAssociationId(v string) *DisassociateClientVpnTargetNetworkInput { - s.AssociationId = &v - return s -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *DisassociateClientVpnTargetNetworkInput) SetClientVpnEndpointId(v string) *DisassociateClientVpnTargetNetworkInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DisassociateClientVpnTargetNetworkInput) SetDryRun(v bool) *DisassociateClientVpnTargetNetworkInput { - s.DryRun = &v - return s -} - -type DisassociateClientVpnTargetNetworkOutput struct { - _ struct{} `type:"structure"` - - // The ID of the target network association. - AssociationId *string `locationName:"associationId" type:"string"` - - // The current state of the target network association. - Status *AssociationStatus `locationName:"status" type:"structure"` -} - -// String returns the string representation -func (s DisassociateClientVpnTargetNetworkOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateClientVpnTargetNetworkOutput) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *DisassociateClientVpnTargetNetworkOutput) SetAssociationId(v string) *DisassociateClientVpnTargetNetworkOutput { - s.AssociationId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DisassociateClientVpnTargetNetworkOutput) SetStatus(v *AssociationStatus) *DisassociateClientVpnTargetNetworkOutput { - s.Status = v - return s -} - -type DisassociateIamInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The ID of the IAM instance profile association. - // - // AssociationId is a required field - AssociationId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateIamInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateIamInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateIamInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateIamInstanceProfileInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationId sets the AssociationId field's value. -func (s *DisassociateIamInstanceProfileInput) SetAssociationId(v string) *DisassociateIamInstanceProfileInput { - s.AssociationId = &v - return s -} - -type DisassociateIamInstanceProfileOutput struct { - _ struct{} `type:"structure"` - - // Information about the IAM instance profile association. - IamInstanceProfileAssociation *IamInstanceProfileAssociation `locationName:"iamInstanceProfileAssociation" type:"structure"` -} - -// String returns the string representation -func (s DisassociateIamInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateIamInstanceProfileOutput) GoString() string { - return s.String() -} - -// SetIamInstanceProfileAssociation sets the IamInstanceProfileAssociation field's value. -func (s *DisassociateIamInstanceProfileOutput) SetIamInstanceProfileAssociation(v *IamInstanceProfileAssociation) *DisassociateIamInstanceProfileOutput { - s.IamInstanceProfileAssociation = v - return s -} - -type DisassociateRouteTableInput struct { - _ struct{} `type:"structure"` - - // The association ID representing the current association between the route - // table and subnet. - // - // AssociationId is a required field - AssociationId *string `locationName:"associationId" type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` -} - -// String returns the string representation -func (s DisassociateRouteTableInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateRouteTableInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateRouteTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateRouteTableInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationId sets the AssociationId field's value. -func (s *DisassociateRouteTableInput) SetAssociationId(v string) *DisassociateRouteTableInput { - s.AssociationId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DisassociateRouteTableInput) SetDryRun(v bool) *DisassociateRouteTableInput { - s.DryRun = &v - return s -} - -type DisassociateRouteTableOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateRouteTableOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateRouteTableOutput) GoString() string { - return s.String() -} - -type DisassociateSubnetCidrBlockInput struct { - _ struct{} `type:"structure"` - - // The association ID for the CIDR block. - // - // AssociationId is a required field - AssociationId *string `locationName:"associationId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateSubnetCidrBlockInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateSubnetCidrBlockInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateSubnetCidrBlockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateSubnetCidrBlockInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationId sets the AssociationId field's value. -func (s *DisassociateSubnetCidrBlockInput) SetAssociationId(v string) *DisassociateSubnetCidrBlockInput { - s.AssociationId = &v - return s -} - -type DisassociateSubnetCidrBlockOutput struct { - _ struct{} `type:"structure"` - - // Information about the IPv6 CIDR block association. - Ipv6CidrBlockAssociation *SubnetIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociation" type:"structure"` - - // The ID of the subnet. - SubnetId *string `locationName:"subnetId" type:"string"` -} - -// String returns the string representation -func (s DisassociateSubnetCidrBlockOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateSubnetCidrBlockOutput) GoString() string { - return s.String() -} - -// SetIpv6CidrBlockAssociation sets the Ipv6CidrBlockAssociation field's value. -func (s *DisassociateSubnetCidrBlockOutput) SetIpv6CidrBlockAssociation(v *SubnetIpv6CidrBlockAssociation) *DisassociateSubnetCidrBlockOutput { - s.Ipv6CidrBlockAssociation = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *DisassociateSubnetCidrBlockOutput) SetSubnetId(v string) *DisassociateSubnetCidrBlockOutput { - s.SubnetId = &v - return s -} - -type DisassociateTransitGatewayRouteTableInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the attachment. - // - // TransitGatewayAttachmentId is a required field - TransitGatewayAttachmentId *string `type:"string" required:"true"` - - // The ID of the transit gateway route table. - // - // TransitGatewayRouteTableId is a required field - TransitGatewayRouteTableId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateTransitGatewayRouteTableInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateTransitGatewayRouteTableInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateTransitGatewayRouteTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateTransitGatewayRouteTableInput"} - if s.TransitGatewayAttachmentId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if s.TransitGatewayRouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DisassociateTransitGatewayRouteTableInput) SetDryRun(v bool) *DisassociateTransitGatewayRouteTableInput { - s.DryRun = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *DisassociateTransitGatewayRouteTableInput) SetTransitGatewayAttachmentId(v string) *DisassociateTransitGatewayRouteTableInput { - s.TransitGatewayAttachmentId = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *DisassociateTransitGatewayRouteTableInput) SetTransitGatewayRouteTableId(v string) *DisassociateTransitGatewayRouteTableInput { - s.TransitGatewayRouteTableId = &v - return s -} - -type DisassociateTransitGatewayRouteTableOutput struct { - _ struct{} `type:"structure"` - - // Information about the association. - Association *TransitGatewayAssociation `locationName:"association" type:"structure"` -} - -// String returns the string representation -func (s DisassociateTransitGatewayRouteTableOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateTransitGatewayRouteTableOutput) GoString() string { - return s.String() -} - -// SetAssociation sets the Association field's value. -func (s *DisassociateTransitGatewayRouteTableOutput) SetAssociation(v *TransitGatewayAssociation) *DisassociateTransitGatewayRouteTableOutput { - s.Association = v - return s -} - -type DisassociateVpcCidrBlockInput struct { - _ struct{} `type:"structure"` - - // The association ID for the CIDR block. - // - // AssociationId is a required field - AssociationId *string `locationName:"associationId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateVpcCidrBlockInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateVpcCidrBlockInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateVpcCidrBlockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateVpcCidrBlockInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationId sets the AssociationId field's value. -func (s *DisassociateVpcCidrBlockInput) SetAssociationId(v string) *DisassociateVpcCidrBlockInput { - s.AssociationId = &v - return s -} - -type DisassociateVpcCidrBlockOutput struct { - _ struct{} `type:"structure"` - - // Information about the IPv4 CIDR block association. - CidrBlockAssociation *VpcCidrBlockAssociation `locationName:"cidrBlockAssociation" type:"structure"` - - // Information about the IPv6 CIDR block association. - Ipv6CidrBlockAssociation *VpcIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociation" type:"structure"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s DisassociateVpcCidrBlockOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateVpcCidrBlockOutput) GoString() string { - return s.String() -} - -// SetCidrBlockAssociation sets the CidrBlockAssociation field's value. -func (s *DisassociateVpcCidrBlockOutput) SetCidrBlockAssociation(v *VpcCidrBlockAssociation) *DisassociateVpcCidrBlockOutput { - s.CidrBlockAssociation = v - return s -} - -// SetIpv6CidrBlockAssociation sets the Ipv6CidrBlockAssociation field's value. -func (s *DisassociateVpcCidrBlockOutput) SetIpv6CidrBlockAssociation(v *VpcIpv6CidrBlockAssociation) *DisassociateVpcCidrBlockOutput { - s.Ipv6CidrBlockAssociation = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DisassociateVpcCidrBlockOutput) SetVpcId(v string) *DisassociateVpcCidrBlockOutput { - s.VpcId = &v - return s -} - -// Describes a disk image. -type DiskImage struct { - _ struct{} `type:"structure"` - - // A description of the disk image. - Description *string `type:"string"` - - // Information about the disk image. - Image *DiskImageDetail `type:"structure"` - - // Information about the volume. - Volume *VolumeDetail `type:"structure"` -} - -// String returns the string representation -func (s DiskImage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiskImage) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DiskImage) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DiskImage"} - if s.Image != nil { - if err := s.Image.Validate(); err != nil { - invalidParams.AddNested("Image", err.(request.ErrInvalidParams)) - } - } - if s.Volume != nil { - if err := s.Volume.Validate(); err != nil { - invalidParams.AddNested("Volume", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *DiskImage) SetDescription(v string) *DiskImage { - s.Description = &v - return s -} - -// SetImage sets the Image field's value. -func (s *DiskImage) SetImage(v *DiskImageDetail) *DiskImage { - s.Image = v - return s -} - -// SetVolume sets the Volume field's value. -func (s *DiskImage) SetVolume(v *VolumeDetail) *DiskImage { - s.Volume = v - return s -} - -// Describes a disk image. -type DiskImageDescription struct { - _ struct{} `type:"structure"` - - // The checksum computed for the disk image. - Checksum *string `locationName:"checksum" type:"string"` - - // The disk image format. - Format *string `locationName:"format" type:"string" enum:"DiskImageFormat"` - - // A presigned URL for the import manifest stored in Amazon S3. For information - // about creating a presigned URL for an Amazon S3 object, read the "Query String - // Request Authentication Alternative" section of the Authenticating REST Requests - // (http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) - // topic in the Amazon Simple Storage Service Developer Guide. - // - // For information about the import manifest referenced by this API action, - // see VM Import Manifest (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html). - ImportManifestUrl *string `locationName:"importManifestUrl" type:"string"` - - // The size of the disk image, in GiB. - Size *int64 `locationName:"size" type:"long"` -} - -// String returns the string representation -func (s DiskImageDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiskImageDescription) GoString() string { - return s.String() -} - -// SetChecksum sets the Checksum field's value. -func (s *DiskImageDescription) SetChecksum(v string) *DiskImageDescription { - s.Checksum = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *DiskImageDescription) SetFormat(v string) *DiskImageDescription { - s.Format = &v - return s -} - -// SetImportManifestUrl sets the ImportManifestUrl field's value. -func (s *DiskImageDescription) SetImportManifestUrl(v string) *DiskImageDescription { - s.ImportManifestUrl = &v - return s -} - -// SetSize sets the Size field's value. -func (s *DiskImageDescription) SetSize(v int64) *DiskImageDescription { - s.Size = &v - return s -} - -// Describes a disk image. -type DiskImageDetail struct { - _ struct{} `type:"structure"` - - // The size of the disk image, in GiB. - // - // Bytes is a required field - Bytes *int64 `locationName:"bytes" type:"long" required:"true"` - - // The disk image format. - // - // Format is a required field - Format *string `locationName:"format" type:"string" required:"true" enum:"DiskImageFormat"` - - // A presigned URL for the import manifest stored in Amazon S3 and presented - // here as an Amazon S3 presigned URL. For information about creating a presigned - // URL for an Amazon S3 object, read the "Query String Request Authentication - // Alternative" section of the Authenticating REST Requests (http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) - // topic in the Amazon Simple Storage Service Developer Guide. - // - // For information about the import manifest referenced by this API action, - // see VM Import Manifest (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html). - // - // ImportManifestUrl is a required field - ImportManifestUrl *string `locationName:"importManifestUrl" type:"string" required:"true"` -} - -// String returns the string representation -func (s DiskImageDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiskImageDetail) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DiskImageDetail) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DiskImageDetail"} - if s.Bytes == nil { - invalidParams.Add(request.NewErrParamRequired("Bytes")) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) - } - if s.ImportManifestUrl == nil { - invalidParams.Add(request.NewErrParamRequired("ImportManifestUrl")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBytes sets the Bytes field's value. -func (s *DiskImageDetail) SetBytes(v int64) *DiskImageDetail { - s.Bytes = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *DiskImageDetail) SetFormat(v string) *DiskImageDetail { - s.Format = &v - return s -} - -// SetImportManifestUrl sets the ImportManifestUrl field's value. -func (s *DiskImageDetail) SetImportManifestUrl(v string) *DiskImageDetail { - s.ImportManifestUrl = &v - return s -} - -// Describes a disk image volume. -type DiskImageVolumeDescription struct { - _ struct{} `type:"structure"` - - // The volume identifier. - Id *string `locationName:"id" type:"string"` - - // The size of the volume, in GiB. - Size *int64 `locationName:"size" type:"long"` -} - -// String returns the string representation -func (s DiskImageVolumeDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiskImageVolumeDescription) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *DiskImageVolumeDescription) SetId(v string) *DiskImageVolumeDescription { - s.Id = &v - return s -} - -// SetSize sets the Size field's value. -func (s *DiskImageVolumeDescription) SetSize(v int64) *DiskImageVolumeDescription { - s.Size = &v - return s -} - -// Describes a DNS entry. -type DnsEntry struct { - _ struct{} `type:"structure"` - - // The DNS name. - DnsName *string `locationName:"dnsName" type:"string"` - - // The ID of the private hosted zone. - HostedZoneId *string `locationName:"hostedZoneId" type:"string"` -} - -// String returns the string representation -func (s DnsEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DnsEntry) GoString() string { - return s.String() -} - -// SetDnsName sets the DnsName field's value. -func (s *DnsEntry) SetDnsName(v string) *DnsEntry { - s.DnsName = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *DnsEntry) SetHostedZoneId(v string) *DnsEntry { - s.HostedZoneId = &v - return s -} - -// Information about the DNS server to be used. -type DnsServersOptionsModifyStructure struct { - _ struct{} `type:"structure"` - - // The IPv4 address range, in CIDR notation, of the DNS servers to be used. - // You can specify up to two DNS servers. Ensure that the DNS servers can be - // reached by the clients. The specified values overwrite the existing values. - CustomDnsServers []*string `locationNameList:"item" type:"list"` - - // Indicates whether DNS servers should be used. Specify False to delete the - // existing DNS servers. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s DnsServersOptionsModifyStructure) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DnsServersOptionsModifyStructure) GoString() string { - return s.String() -} - -// SetCustomDnsServers sets the CustomDnsServers field's value. -func (s *DnsServersOptionsModifyStructure) SetCustomDnsServers(v []*string) *DnsServersOptionsModifyStructure { - s.CustomDnsServers = v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *DnsServersOptionsModifyStructure) SetEnabled(v bool) *DnsServersOptionsModifyStructure { - s.Enabled = &v - return s -} - -// Describes a block device for an EBS volume. -type EbsBlockDevice struct { - _ struct{} `type:"structure"` - - // Indicates whether the EBS volume is deleted on instance termination. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - - // Indicates whether the EBS volume is encrypted. Encrypted volumes can only - // be attached to instances that support Amazon EBS encryption. - // - // If you are creating a volume from a snapshot, you cannot specify an encryption - // value. This is because only blank volumes can be encrypted on creation. If - // you are creating a snapshot from an existing EBS volume, you cannot specify - // an encryption value that differs from that of the EBS volume. We recommend - // that you omit the encryption value from the block device mappings when creating - // an image from an instance. - Encrypted *bool `locationName:"encrypted" type:"boolean"` - - // The number of I/O operations per second (IOPS) that the volume supports. - // For io1, this represents the number of IOPS that are provisioned for the - // volume. For gp2, this represents the baseline performance of the volume and - // the rate at which the volume accumulates I/O credits for bursting. For more - // information about General Purpose SSD baseline performance, I/O credits, - // and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // Constraints: Range is 100-16,000 IOPS for gp2 volumes and 100 to 64,000IOPS - // for io1 volumes in most Regions. Maximum io1IOPS of 64,000 is guaranteed - // only on Nitro-based instances (AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). - // Other instance families guarantee performance up to 32,000 IOPS. For more - // information, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // Condition: This parameter is required for requests to create io1 volumes; - // it is not used in requests to create gp2, st1, sc1, or standard volumes. - Iops *int64 `locationName:"iops" type:"integer"` - - // Identifier (key ID, key alias, ID ARN, or alias ARN) for a user-managed CMK - // under which the EBS volume is encrypted. - // - // This parameter is only supported on BlockDeviceMapping objects called by - // RunInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html), - // RequestSpotFleet (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html), - // and RequestSpotInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html). - KmsKeyId *string `type:"string"` - - // The ID of the snapshot. - SnapshotId *string `locationName:"snapshotId" type:"string"` - - // The size of the volume, in GiB. - // - // Constraints: 1-16384 for General Purpose SSD (gp2), 4-16384 for Provisioned - // IOPS SSD (io1), 500-16384 for Throughput Optimized HDD (st1), 500-16384 for - // Cold HDD (sc1), and 1-1024 for Magnetic (standard) volumes. If you specify - // a snapshot, the volume size must be equal to or larger than the snapshot - // size. - // - // Default: If you're creating the volume from a snapshot and don't specify - // a volume size, the default is the snapshot size. - VolumeSize *int64 `locationName:"volumeSize" type:"integer"` - - // The volume type: gp2, io1, st1, sc1, or standard. - // - // Default: standard - VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` -} - -// String returns the string representation -func (s EbsBlockDevice) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EbsBlockDevice) GoString() string { - return s.String() -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *EbsBlockDevice) SetDeleteOnTermination(v bool) *EbsBlockDevice { - s.DeleteOnTermination = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *EbsBlockDevice) SetEncrypted(v bool) *EbsBlockDevice { - s.Encrypted = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *EbsBlockDevice) SetIops(v int64) *EbsBlockDevice { - s.Iops = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *EbsBlockDevice) SetKmsKeyId(v string) *EbsBlockDevice { - s.KmsKeyId = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *EbsBlockDevice) SetSnapshotId(v string) *EbsBlockDevice { - s.SnapshotId = &v - return s -} - -// SetVolumeSize sets the VolumeSize field's value. -func (s *EbsBlockDevice) SetVolumeSize(v int64) *EbsBlockDevice { - s.VolumeSize = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *EbsBlockDevice) SetVolumeType(v string) *EbsBlockDevice { - s.VolumeType = &v - return s -} - -// Describes a parameter used to set up an EBS volume in a block device mapping. -type EbsInstanceBlockDevice struct { - _ struct{} `type:"structure"` - - // The time stamp when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` - - // Indicates whether the volume is deleted on instance termination. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - - // The attachment state. - Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"` - - // The ID of the EBS volume. - VolumeId *string `locationName:"volumeId" type:"string"` -} - -// String returns the string representation -func (s EbsInstanceBlockDevice) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EbsInstanceBlockDevice) GoString() string { - return s.String() -} - -// SetAttachTime sets the AttachTime field's value. -func (s *EbsInstanceBlockDevice) SetAttachTime(v time.Time) *EbsInstanceBlockDevice { - s.AttachTime = &v - return s -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *EbsInstanceBlockDevice) SetDeleteOnTermination(v bool) *EbsInstanceBlockDevice { - s.DeleteOnTermination = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *EbsInstanceBlockDevice) SetStatus(v string) *EbsInstanceBlockDevice { - s.Status = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *EbsInstanceBlockDevice) SetVolumeId(v string) *EbsInstanceBlockDevice { - s.VolumeId = &v - return s -} - -// Describes information used to set up an EBS volume specified in a block device -// mapping. -type EbsInstanceBlockDeviceSpecification struct { - _ struct{} `type:"structure"` - - // Indicates whether the volume is deleted on instance termination. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - - // The ID of the EBS volume. - VolumeId *string `locationName:"volumeId" type:"string"` -} - -// String returns the string representation -func (s EbsInstanceBlockDeviceSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EbsInstanceBlockDeviceSpecification) GoString() string { - return s.String() -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *EbsInstanceBlockDeviceSpecification) SetDeleteOnTermination(v bool) *EbsInstanceBlockDeviceSpecification { - s.DeleteOnTermination = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *EbsInstanceBlockDeviceSpecification) SetVolumeId(v string) *EbsInstanceBlockDeviceSpecification { - s.VolumeId = &v - return s -} - -// Describes an egress-only internet gateway. -type EgressOnlyInternetGateway struct { - _ struct{} `type:"structure"` - - // Information about the attachment of the egress-only internet gateway. - Attachments []*InternetGatewayAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"` - - // The ID of the egress-only internet gateway. - EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` -} - -// String returns the string representation -func (s EgressOnlyInternetGateway) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EgressOnlyInternetGateway) GoString() string { - return s.String() -} - -// SetAttachments sets the Attachments field's value. -func (s *EgressOnlyInternetGateway) SetAttachments(v []*InternetGatewayAttachment) *EgressOnlyInternetGateway { - s.Attachments = v - return s -} - -// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. -func (s *EgressOnlyInternetGateway) SetEgressOnlyInternetGatewayId(v string) *EgressOnlyInternetGateway { - s.EgressOnlyInternetGatewayId = &v - return s -} - -// Describes the association between an instance and an Elastic Graphics accelerator. -type ElasticGpuAssociation struct { - _ struct{} `type:"structure"` - - // The ID of the association. - ElasticGpuAssociationId *string `locationName:"elasticGpuAssociationId" type:"string"` - - // The state of the association between the instance and the Elastic Graphics - // accelerator. - ElasticGpuAssociationState *string `locationName:"elasticGpuAssociationState" type:"string"` - - // The time the Elastic Graphics accelerator was associated with the instance. - ElasticGpuAssociationTime *string `locationName:"elasticGpuAssociationTime" type:"string"` - - // The ID of the Elastic Graphics accelerator. - ElasticGpuId *string `locationName:"elasticGpuId" type:"string"` -} - -// String returns the string representation -func (s ElasticGpuAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticGpuAssociation) GoString() string { - return s.String() -} - -// SetElasticGpuAssociationId sets the ElasticGpuAssociationId field's value. -func (s *ElasticGpuAssociation) SetElasticGpuAssociationId(v string) *ElasticGpuAssociation { - s.ElasticGpuAssociationId = &v - return s -} - -// SetElasticGpuAssociationState sets the ElasticGpuAssociationState field's value. -func (s *ElasticGpuAssociation) SetElasticGpuAssociationState(v string) *ElasticGpuAssociation { - s.ElasticGpuAssociationState = &v - return s -} - -// SetElasticGpuAssociationTime sets the ElasticGpuAssociationTime field's value. -func (s *ElasticGpuAssociation) SetElasticGpuAssociationTime(v string) *ElasticGpuAssociation { - s.ElasticGpuAssociationTime = &v - return s -} - -// SetElasticGpuId sets the ElasticGpuId field's value. -func (s *ElasticGpuAssociation) SetElasticGpuId(v string) *ElasticGpuAssociation { - s.ElasticGpuId = &v - return s -} - -// Describes the status of an Elastic Graphics accelerator. -type ElasticGpuHealth struct { - _ struct{} `type:"structure"` - - // The health status. - Status *string `locationName:"status" type:"string" enum:"ElasticGpuStatus"` -} - -// String returns the string representation -func (s ElasticGpuHealth) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticGpuHealth) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *ElasticGpuHealth) SetStatus(v string) *ElasticGpuHealth { - s.Status = &v - return s -} - -// A specification for an Elastic Graphics accelerator. -type ElasticGpuSpecification struct { - _ struct{} `type:"structure"` - - // The type of Elastic Graphics accelerator. - // - // Type is a required field - Type *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ElasticGpuSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticGpuSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ElasticGpuSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ElasticGpuSpecification"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetType sets the Type field's value. -func (s *ElasticGpuSpecification) SetType(v string) *ElasticGpuSpecification { - s.Type = &v - return s -} - -// Describes an elastic GPU. -type ElasticGpuSpecificationResponse struct { - _ struct{} `type:"structure"` - - // The elastic GPU type. - Type *string `locationName:"type" type:"string"` -} - -// String returns the string representation -func (s ElasticGpuSpecificationResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticGpuSpecificationResponse) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *ElasticGpuSpecificationResponse) SetType(v string) *ElasticGpuSpecificationResponse { - s.Type = &v - return s -} - -// Describes an Elastic Graphics accelerator. -type ElasticGpus struct { - _ struct{} `type:"structure"` - - // The Availability Zone in the which the Elastic Graphics accelerator resides. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The status of the Elastic Graphics accelerator. - ElasticGpuHealth *ElasticGpuHealth `locationName:"elasticGpuHealth" type:"structure"` - - // The ID of the Elastic Graphics accelerator. - ElasticGpuId *string `locationName:"elasticGpuId" type:"string"` - - // The state of the Elastic Graphics accelerator. - ElasticGpuState *string `locationName:"elasticGpuState" type:"string" enum:"ElasticGpuState"` - - // The type of Elastic Graphics accelerator. - ElasticGpuType *string `locationName:"elasticGpuType" type:"string"` - - // The ID of the instance to which the Elastic Graphics accelerator is attached. - InstanceId *string `locationName:"instanceId" type:"string"` -} - -// String returns the string representation -func (s ElasticGpus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticGpus) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ElasticGpus) SetAvailabilityZone(v string) *ElasticGpus { - s.AvailabilityZone = &v - return s -} - -// SetElasticGpuHealth sets the ElasticGpuHealth field's value. -func (s *ElasticGpus) SetElasticGpuHealth(v *ElasticGpuHealth) *ElasticGpus { - s.ElasticGpuHealth = v - return s -} - -// SetElasticGpuId sets the ElasticGpuId field's value. -func (s *ElasticGpus) SetElasticGpuId(v string) *ElasticGpus { - s.ElasticGpuId = &v - return s -} - -// SetElasticGpuState sets the ElasticGpuState field's value. -func (s *ElasticGpus) SetElasticGpuState(v string) *ElasticGpus { - s.ElasticGpuState = &v - return s -} - -// SetElasticGpuType sets the ElasticGpuType field's value. -func (s *ElasticGpus) SetElasticGpuType(v string) *ElasticGpus { - s.ElasticGpuType = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ElasticGpus) SetInstanceId(v string) *ElasticGpus { - s.InstanceId = &v - return s -} - -// Describes an elastic inference accelerator. -type ElasticInferenceAccelerator struct { - _ struct{} `type:"structure"` - - // The type of elastic inference accelerator. The possible values are eia1.small, - // eia1.medium, and eia1.large. - // - // Type is a required field - Type *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ElasticInferenceAccelerator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticInferenceAccelerator) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ElasticInferenceAccelerator) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ElasticInferenceAccelerator"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetType sets the Type field's value. -func (s *ElasticInferenceAccelerator) SetType(v string) *ElasticInferenceAccelerator { - s.Type = &v - return s -} - -// Describes the association between an instance and an elastic inference accelerator. -type ElasticInferenceAcceleratorAssociation struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the elastic inference accelerator. - ElasticInferenceAcceleratorArn *string `locationName:"elasticInferenceAcceleratorArn" type:"string"` - - // The ID of the association. - ElasticInferenceAcceleratorAssociationId *string `locationName:"elasticInferenceAcceleratorAssociationId" type:"string"` - - // The state of the elastic inference accelerator. - ElasticInferenceAcceleratorAssociationState *string `locationName:"elasticInferenceAcceleratorAssociationState" type:"string"` - - // The time at which the elastic inference accelerator is associated with an - // instance. - ElasticInferenceAcceleratorAssociationTime *time.Time `locationName:"elasticInferenceAcceleratorAssociationTime" type:"timestamp"` -} - -// String returns the string representation -func (s ElasticInferenceAcceleratorAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticInferenceAcceleratorAssociation) GoString() string { - return s.String() -} - -// SetElasticInferenceAcceleratorArn sets the ElasticInferenceAcceleratorArn field's value. -func (s *ElasticInferenceAcceleratorAssociation) SetElasticInferenceAcceleratorArn(v string) *ElasticInferenceAcceleratorAssociation { - s.ElasticInferenceAcceleratorArn = &v - return s -} - -// SetElasticInferenceAcceleratorAssociationId sets the ElasticInferenceAcceleratorAssociationId field's value. -func (s *ElasticInferenceAcceleratorAssociation) SetElasticInferenceAcceleratorAssociationId(v string) *ElasticInferenceAcceleratorAssociation { - s.ElasticInferenceAcceleratorAssociationId = &v - return s -} - -// SetElasticInferenceAcceleratorAssociationState sets the ElasticInferenceAcceleratorAssociationState field's value. -func (s *ElasticInferenceAcceleratorAssociation) SetElasticInferenceAcceleratorAssociationState(v string) *ElasticInferenceAcceleratorAssociation { - s.ElasticInferenceAcceleratorAssociationState = &v - return s -} - -// SetElasticInferenceAcceleratorAssociationTime sets the ElasticInferenceAcceleratorAssociationTime field's value. -func (s *ElasticInferenceAcceleratorAssociation) SetElasticInferenceAcceleratorAssociationTime(v time.Time) *ElasticInferenceAcceleratorAssociation { - s.ElasticInferenceAcceleratorAssociationTime = &v - return s -} - -type EnableTransitGatewayRouteTablePropagationInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the attachment. - // - // TransitGatewayAttachmentId is a required field - TransitGatewayAttachmentId *string `type:"string" required:"true"` - - // The ID of the propagation route table. - // - // TransitGatewayRouteTableId is a required field - TransitGatewayRouteTableId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s EnableTransitGatewayRouteTablePropagationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableTransitGatewayRouteTablePropagationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableTransitGatewayRouteTablePropagationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableTransitGatewayRouteTablePropagationInput"} - if s.TransitGatewayAttachmentId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if s.TransitGatewayRouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *EnableTransitGatewayRouteTablePropagationInput) SetDryRun(v bool) *EnableTransitGatewayRouteTablePropagationInput { - s.DryRun = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *EnableTransitGatewayRouteTablePropagationInput) SetTransitGatewayAttachmentId(v string) *EnableTransitGatewayRouteTablePropagationInput { - s.TransitGatewayAttachmentId = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *EnableTransitGatewayRouteTablePropagationInput) SetTransitGatewayRouteTableId(v string) *EnableTransitGatewayRouteTablePropagationInput { - s.TransitGatewayRouteTableId = &v - return s -} - -type EnableTransitGatewayRouteTablePropagationOutput struct { - _ struct{} `type:"structure"` - - // Information about route propagation. - Propagation *TransitGatewayPropagation `locationName:"propagation" type:"structure"` -} - -// String returns the string representation -func (s EnableTransitGatewayRouteTablePropagationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableTransitGatewayRouteTablePropagationOutput) GoString() string { - return s.String() -} - -// SetPropagation sets the Propagation field's value. -func (s *EnableTransitGatewayRouteTablePropagationOutput) SetPropagation(v *TransitGatewayPropagation) *EnableTransitGatewayRouteTablePropagationOutput { - s.Propagation = v - return s -} - -// Contains the parameters for EnableVgwRoutePropagation. -type EnableVgwRoutePropagationInput struct { - _ struct{} `type:"structure"` - - // The ID of the virtual private gateway. - // - // GatewayId is a required field - GatewayId *string `type:"string" required:"true"` - - // The ID of the route table. - // - // RouteTableId is a required field - RouteTableId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s EnableVgwRoutePropagationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableVgwRoutePropagationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableVgwRoutePropagationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableVgwRoutePropagationInput"} - if s.GatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayId")) - } - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayId sets the GatewayId field's value. -func (s *EnableVgwRoutePropagationInput) SetGatewayId(v string) *EnableVgwRoutePropagationInput { - s.GatewayId = &v - return s -} - -// SetRouteTableId sets the RouteTableId field's value. -func (s *EnableVgwRoutePropagationInput) SetRouteTableId(v string) *EnableVgwRoutePropagationInput { - s.RouteTableId = &v - return s -} - -type EnableVgwRoutePropagationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableVgwRoutePropagationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableVgwRoutePropagationOutput) GoString() string { - return s.String() -} - -// Contains the parameters for EnableVolumeIO. -type EnableVolumeIOInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the volume. - // - // VolumeId is a required field - VolumeId *string `locationName:"volumeId" type:"string" required:"true"` -} - -// String returns the string representation -func (s EnableVolumeIOInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableVolumeIOInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableVolumeIOInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableVolumeIOInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *EnableVolumeIOInput) SetDryRun(v bool) *EnableVolumeIOInput { - s.DryRun = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *EnableVolumeIOInput) SetVolumeId(v string) *EnableVolumeIOInput { - s.VolumeId = &v - return s -} - -type EnableVolumeIOOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableVolumeIOOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableVolumeIOOutput) GoString() string { - return s.String() -} - -type EnableVpcClassicLinkDnsSupportInput struct { - _ struct{} `type:"structure"` - - // The ID of the VPC. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s EnableVpcClassicLinkDnsSupportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableVpcClassicLinkDnsSupportInput) GoString() string { - return s.String() -} - -// SetVpcId sets the VpcId field's value. -func (s *EnableVpcClassicLinkDnsSupportInput) SetVpcId(v string) *EnableVpcClassicLinkDnsSupportInput { - s.VpcId = &v - return s -} - -type EnableVpcClassicLinkDnsSupportOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s EnableVpcClassicLinkDnsSupportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableVpcClassicLinkDnsSupportOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *EnableVpcClassicLinkDnsSupportOutput) SetReturn(v bool) *EnableVpcClassicLinkDnsSupportOutput { - s.Return = &v - return s -} - -type EnableVpcClassicLinkInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` -} - -// String returns the string representation -func (s EnableVpcClassicLinkInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableVpcClassicLinkInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableVpcClassicLinkInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableVpcClassicLinkInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *EnableVpcClassicLinkInput) SetDryRun(v bool) *EnableVpcClassicLinkInput { - s.DryRun = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *EnableVpcClassicLinkInput) SetVpcId(v string) *EnableVpcClassicLinkInput { - s.VpcId = &v - return s -} - -type EnableVpcClassicLinkOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s EnableVpcClassicLinkOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableVpcClassicLinkOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *EnableVpcClassicLinkOutput) SetReturn(v bool) *EnableVpcClassicLinkOutput { - s.Return = &v - return s -} - -// Describes a Spot Fleet event. -type EventInformation struct { - _ struct{} `type:"structure"` - - // The description of the event. - EventDescription *string `locationName:"eventDescription" type:"string"` - - // The event. - // - // The following are the error events: - // - // * iamFleetRoleInvalid - The Spot Fleet did not have the required permissions - // either to launch or terminate an instance. - // - // * launchSpecTemporarilyBlacklisted - The configuration is not valid and - // several attempts to launch instances have failed. For more information, - // see the description of the event. - // - // * spotFleetRequestConfigurationInvalid - The configuration is not valid. - // For more information, see the description of the event. - // - // * spotInstanceCountLimitExceeded - You've reached the limit on the number - // of Spot Instances that you can launch. - // - // The following are the fleetRequestChange events: - // - // * active - The Spot Fleet has been validated and Amazon EC2 is attempting - // to maintain the target number of running Spot Instances. - // - // * cancelled - The Spot Fleet is canceled and has no running Spot Instances. - // The Spot Fleet will be deleted two days after its instances were terminated. - // - // * cancelled_running - The Spot Fleet is canceled and does not launch additional - // Spot Instances. Existing Spot Instances continue to run until they are - // interrupted or terminated. - // - // * cancelled_terminating - The Spot Fleet is canceled and its Spot Instances - // are terminating. - // - // * expired - The Spot Fleet request has expired. A subsequent event indicates - // that the instances were terminated, if the request was created with TerminateInstancesWithExpiration - // set. - // - // * modify_in_progress - A request to modify the Spot Fleet request was - // accepted and is in progress. - // - // * modify_successful - The Spot Fleet request was modified. - // - // * price_update - The price for a launch configuration was adjusted because - // it was too high. This change is permanent. - // - // * submitted - The Spot Fleet request is being evaluated and Amazon EC2 - // is preparing to launch the target number of Spot Instances. - // - // The following are the instanceChange events: - // - // * launched - A request was fulfilled and a new instance was launched. - // - // * terminated - An instance was terminated by the user. - // - // The following are the Information events: - // - // * launchSpecUnusable - The price in a launch specification is not valid - // because it is below the Spot price or the Spot price is above the On-Demand - // price. - // - // * fleetProgressHalted - The price in every launch specification is not - // valid. A launch specification might become valid if the Spot price changes. - EventSubType *string `locationName:"eventSubType" type:"string"` - - // The ID of the instance. This information is available only for instanceChange - // events. - InstanceId *string `locationName:"instanceId" type:"string"` -} - -// String returns the string representation -func (s EventInformation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventInformation) GoString() string { - return s.String() -} - -// SetEventDescription sets the EventDescription field's value. -func (s *EventInformation) SetEventDescription(v string) *EventInformation { - s.EventDescription = &v - return s -} - -// SetEventSubType sets the EventSubType field's value. -func (s *EventInformation) SetEventSubType(v string) *EventInformation { - s.EventSubType = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *EventInformation) SetInstanceId(v string) *EventInformation { - s.InstanceId = &v - return s -} - -type ExportClientVpnClientCertificateRevocationListInput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s ExportClientVpnClientCertificateRevocationListInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportClientVpnClientCertificateRevocationListInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExportClientVpnClientCertificateRevocationListInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExportClientVpnClientCertificateRevocationListInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *ExportClientVpnClientCertificateRevocationListInput) SetClientVpnEndpointId(v string) *ExportClientVpnClientCertificateRevocationListInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ExportClientVpnClientCertificateRevocationListInput) SetDryRun(v bool) *ExportClientVpnClientCertificateRevocationListInput { - s.DryRun = &v - return s -} - -type ExportClientVpnClientCertificateRevocationListOutput struct { - _ struct{} `type:"structure"` - - // Information about the client certificate revocation list. - CertificateRevocationList *string `locationName:"certificateRevocationList" type:"string"` - - // The current state of the client certificate revocation list. - Status *ClientCertificateRevocationListStatus `locationName:"status" type:"structure"` -} - -// String returns the string representation -func (s ExportClientVpnClientCertificateRevocationListOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportClientVpnClientCertificateRevocationListOutput) GoString() string { - return s.String() -} - -// SetCertificateRevocationList sets the CertificateRevocationList field's value. -func (s *ExportClientVpnClientCertificateRevocationListOutput) SetCertificateRevocationList(v string) *ExportClientVpnClientCertificateRevocationListOutput { - s.CertificateRevocationList = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ExportClientVpnClientCertificateRevocationListOutput) SetStatus(v *ClientCertificateRevocationListStatus) *ExportClientVpnClientCertificateRevocationListOutput { - s.Status = v - return s -} - -type ExportClientVpnClientConfigurationInput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s ExportClientVpnClientConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportClientVpnClientConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExportClientVpnClientConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExportClientVpnClientConfigurationInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *ExportClientVpnClientConfigurationInput) SetClientVpnEndpointId(v string) *ExportClientVpnClientConfigurationInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ExportClientVpnClientConfigurationInput) SetDryRun(v bool) *ExportClientVpnClientConfigurationInput { - s.DryRun = &v - return s -} - -type ExportClientVpnClientConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The contents of the Client VPN endpoint configuration file. - ClientConfiguration *string `locationName:"clientConfiguration" type:"string"` -} - -// String returns the string representation -func (s ExportClientVpnClientConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportClientVpnClientConfigurationOutput) GoString() string { - return s.String() -} - -// SetClientConfiguration sets the ClientConfiguration field's value. -func (s *ExportClientVpnClientConfigurationOutput) SetClientConfiguration(v string) *ExportClientVpnClientConfigurationOutput { - s.ClientConfiguration = &v - return s -} - -// Describes an instance export task. -type ExportTask struct { - _ struct{} `type:"structure"` - - // A description of the resource being exported. - Description *string `locationName:"description" type:"string"` - - // The ID of the export task. - ExportTaskId *string `locationName:"exportTaskId" type:"string"` - - // Information about the export task. - ExportToS3Task *ExportToS3Task `locationName:"exportToS3" type:"structure"` - - // Information about the instance to export. - InstanceExportDetails *InstanceExportDetails `locationName:"instanceExport" type:"structure"` - - // The state of the export task. - State *string `locationName:"state" type:"string" enum:"ExportTaskState"` - - // The status message related to the export task. - StatusMessage *string `locationName:"statusMessage" type:"string"` -} - -// String returns the string representation -func (s ExportTask) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportTask) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *ExportTask) SetDescription(v string) *ExportTask { - s.Description = &v - return s -} - -// SetExportTaskId sets the ExportTaskId field's value. -func (s *ExportTask) SetExportTaskId(v string) *ExportTask { - s.ExportTaskId = &v - return s -} - -// SetExportToS3Task sets the ExportToS3Task field's value. -func (s *ExportTask) SetExportToS3Task(v *ExportToS3Task) *ExportTask { - s.ExportToS3Task = v - return s -} - -// SetInstanceExportDetails sets the InstanceExportDetails field's value. -func (s *ExportTask) SetInstanceExportDetails(v *InstanceExportDetails) *ExportTask { - s.InstanceExportDetails = v - return s -} - -// SetState sets the State field's value. -func (s *ExportTask) SetState(v string) *ExportTask { - s.State = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ExportTask) SetStatusMessage(v string) *ExportTask { - s.StatusMessage = &v - return s -} - -// Describes the format and location for an instance export task. -type ExportToS3Task struct { - _ struct{} `type:"structure"` - - // The container format used to combine disk images with metadata (such as OVF). - // If absent, only the disk image is exported. - ContainerFormat *string `locationName:"containerFormat" type:"string" enum:"ContainerFormat"` - - // The format for the exported image. - DiskImageFormat *string `locationName:"diskImageFormat" type:"string" enum:"DiskImageFormat"` - - // The S3 bucket for the destination image. The destination bucket must exist - // and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com. - S3Bucket *string `locationName:"s3Bucket" type:"string"` - - // The encryption key for your S3 bucket. - S3Key *string `locationName:"s3Key" type:"string"` -} - -// String returns the string representation -func (s ExportToS3Task) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportToS3Task) GoString() string { - return s.String() -} - -// SetContainerFormat sets the ContainerFormat field's value. -func (s *ExportToS3Task) SetContainerFormat(v string) *ExportToS3Task { - s.ContainerFormat = &v - return s -} - -// SetDiskImageFormat sets the DiskImageFormat field's value. -func (s *ExportToS3Task) SetDiskImageFormat(v string) *ExportToS3Task { - s.DiskImageFormat = &v - return s -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *ExportToS3Task) SetS3Bucket(v string) *ExportToS3Task { - s.S3Bucket = &v - return s -} - -// SetS3Key sets the S3Key field's value. -func (s *ExportToS3Task) SetS3Key(v string) *ExportToS3Task { - s.S3Key = &v - return s -} - -// Describes an instance export task. -type ExportToS3TaskSpecification struct { - _ struct{} `type:"structure"` - - // The container format used to combine disk images with metadata (such as OVF). - // If absent, only the disk image is exported. - ContainerFormat *string `locationName:"containerFormat" type:"string" enum:"ContainerFormat"` - - // The format for the exported image. - DiskImageFormat *string `locationName:"diskImageFormat" type:"string" enum:"DiskImageFormat"` - - // The S3 bucket for the destination image. The destination bucket must exist - // and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com. - S3Bucket *string `locationName:"s3Bucket" type:"string"` - - // The image is written to a single object in the S3 bucket at the S3 key s3prefix - // + exportTaskId + '.' + diskImageFormat. - S3Prefix *string `locationName:"s3Prefix" type:"string"` -} - -// String returns the string representation -func (s ExportToS3TaskSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportToS3TaskSpecification) GoString() string { - return s.String() -} - -// SetContainerFormat sets the ContainerFormat field's value. -func (s *ExportToS3TaskSpecification) SetContainerFormat(v string) *ExportToS3TaskSpecification { - s.ContainerFormat = &v - return s -} - -// SetDiskImageFormat sets the DiskImageFormat field's value. -func (s *ExportToS3TaskSpecification) SetDiskImageFormat(v string) *ExportToS3TaskSpecification { - s.DiskImageFormat = &v - return s -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *ExportToS3TaskSpecification) SetS3Bucket(v string) *ExportToS3TaskSpecification { - s.S3Bucket = &v - return s -} - -// SetS3Prefix sets the S3Prefix field's value. -func (s *ExportToS3TaskSpecification) SetS3Prefix(v string) *ExportToS3TaskSpecification { - s.S3Prefix = &v - return s -} - -type ExportTransitGatewayRoutesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. The possible values are: - // - // * transit-gateway-route-destination-cidr-block - The CIDR range. - // - // * transit-gateway-route-state - The state of the route (active | blackhole). - // - // * transit-gateway-route-transit-gateway-attachment-id - The ID of the - // attachment. - // - // * transit-gateway-route-type - The route type (static | propagated). - // - // * transit-gateway-route-vpn-connection-id - The ID of the VPN connection. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The name of the S3 bucket. - // - // S3Bucket is a required field - S3Bucket *string `type:"string" required:"true"` - - // The ID of the route table. - // - // TransitGatewayRouteTableId is a required field - TransitGatewayRouteTableId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ExportTransitGatewayRoutesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportTransitGatewayRoutesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExportTransitGatewayRoutesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExportTransitGatewayRoutesInput"} - if s.S3Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("S3Bucket")) - } - if s.TransitGatewayRouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *ExportTransitGatewayRoutesInput) SetDryRun(v bool) *ExportTransitGatewayRoutesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *ExportTransitGatewayRoutesInput) SetFilters(v []*Filter) *ExportTransitGatewayRoutesInput { - s.Filters = v - return s -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *ExportTransitGatewayRoutesInput) SetS3Bucket(v string) *ExportTransitGatewayRoutesInput { - s.S3Bucket = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *ExportTransitGatewayRoutesInput) SetTransitGatewayRouteTableId(v string) *ExportTransitGatewayRoutesInput { - s.TransitGatewayRouteTableId = &v - return s -} - -type ExportTransitGatewayRoutesOutput struct { - _ struct{} `type:"structure"` - - // The URL of the exported file in Amazon S3. For example, s3://bucket_name/VPCTransitGateway/TransitGatewayRouteTables/file_name. - S3Location *string `locationName:"s3Location" type:"string"` -} - -// String returns the string representation -func (s ExportTransitGatewayRoutesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportTransitGatewayRoutesOutput) GoString() string { - return s.String() -} - -// SetS3Location sets the S3Location field's value. -func (s *ExportTransitGatewayRoutesOutput) SetS3Location(v string) *ExportTransitGatewayRoutesOutput { - s.S3Location = &v - return s -} - -// A filter name and value pair that is used to return a more specific list -// of results from a describe operation. Filters can be used to match a set -// of resources by specific criteria, such as tags, attributes, or IDs. The -// filters supported by a describe operation are documented with the describe -// operation. For example: -// -// * DescribeAvailabilityZones -// -// * DescribeImages -// -// * DescribeInstances -// -// * DescribeKeyPairs -// -// * DescribeSecurityGroups -// -// * DescribeSnapshots -// -// * DescribeSubnets -// -// * DescribeTags -// -// * DescribeVolumes -// -// * DescribeVpcs -type Filter struct { - _ struct{} `type:"structure"` - - // The name of the filter. Filter names are case-sensitive. - Name *string `type:"string"` - - // One or more filter values. Filter values are case-sensitive. - Values []*string `locationName:"Value" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s Filter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Filter) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *Filter) SetName(v string) *Filter { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *Filter) SetValues(v []*string) *Filter { - s.Values = v - return s -} - -// Describes an EC2 Fleet. -type FleetData struct { - _ struct{} `type:"structure"` - - // The progress of the EC2 Fleet. If there is an error, the status is error. - // After all requests are placed, the status is pending_fulfillment. If the - // size of the EC2 Fleet is equal to or greater than its target capacity, the - // status is fulfilled. If the size of the EC2 Fleet is decreased, the status - // is pending_termination while instances are terminating. - ActivityStatus *string `locationName:"activityStatus" type:"string" enum:"FleetActivityStatus"` - - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - // - // Constraints: Maximum 64 ASCII characters - ClientToken *string `locationName:"clientToken" type:"string"` - - // The creation date and time of the EC2 Fleet. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - - // Information about the instances that could not be launched by the fleet. - // Valid only when Type is set to instant. - Errors []*DescribeFleetError `locationName:"errorSet" locationNameList:"item" type:"list"` - - // Indicates whether running instances should be terminated if the target capacity - // of the EC2 Fleet is decreased below the current size of the EC2 Fleet. - ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"FleetExcessCapacityTerminationPolicy"` - - // The ID of the EC2 Fleet. - FleetId *string `locationName:"fleetId" type:"string"` - - // The state of the EC2 Fleet. - FleetState *string `locationName:"fleetState" type:"string" enum:"FleetStateCode"` - - // The number of units fulfilled by this request compared to the set target - // capacity. - FulfilledCapacity *float64 `locationName:"fulfilledCapacity" type:"double"` - - // The number of units fulfilled by this request compared to the set target - // On-Demand capacity. - FulfilledOnDemandCapacity *float64 `locationName:"fulfilledOnDemandCapacity" type:"double"` - - // Information about the instances that were launched by the fleet. Valid only - // when Type is set to instant. - Instances []*DescribeFleetsInstances `locationName:"fleetInstanceSet" locationNameList:"item" type:"list"` - - // The launch template and overrides. - LaunchTemplateConfigs []*FleetLaunchTemplateConfig `locationName:"launchTemplateConfigs" locationNameList:"item" type:"list"` - - // The allocation strategy of On-Demand Instances in an EC2 Fleet. - OnDemandOptions *OnDemandOptions `locationName:"onDemandOptions" type:"structure"` - - // Indicates whether EC2 Fleet should replace unhealthy instances. - ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"` - - // The configuration of Spot Instances in an EC2 Fleet. - SpotOptions *SpotOptions `locationName:"spotOptions" type:"structure"` - - // The tags for an EC2 Fleet resource. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The number of units to request. You can choose to set the target capacity - // in terms of instances or a performance characteristic that is important to - // your application workload, such as vCPUs, memory, or I/O. If the request - // type is maintain, you can specify a target capacity of 0 and add capacity - // later. - TargetCapacitySpecification *TargetCapacitySpecification `locationName:"targetCapacitySpecification" type:"structure"` - - // Indicates whether running instances should be terminated when the EC2 Fleet - // expires. - TerminateInstancesWithExpiration *bool `locationName:"terminateInstancesWithExpiration" type:"boolean"` - - // The type of request. Indicates whether the EC2 Fleet only requests the target - // capacity, or also attempts to maintain it. If you request a certain target - // capacity, EC2 Fleet only places the required requests; it does not attempt - // to replenish instances if capacity is diminished, and does not submit requests - // in alternative capacity pools if capacity is unavailable. To maintain a certain - // target capacity, EC2 Fleet places the required requests to meet this target - // capacity. It also automatically replenishes any interrupted Spot Instances. - // Default: maintain. - Type *string `locationName:"type" type:"string" enum:"FleetType"` - - // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // The default is to start fulfilling the request immediately. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` - - // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // At this point, no new instance requests are placed or able to fulfill the - // request. The default end date is 7 days from the current date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` -} - -// String returns the string representation -func (s FleetData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FleetData) GoString() string { - return s.String() -} - -// SetActivityStatus sets the ActivityStatus field's value. -func (s *FleetData) SetActivityStatus(v string) *FleetData { - s.ActivityStatus = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *FleetData) SetClientToken(v string) *FleetData { - s.ClientToken = &v - return s -} - -// SetCreateTime sets the CreateTime field's value. -func (s *FleetData) SetCreateTime(v time.Time) *FleetData { - s.CreateTime = &v - return s -} - -// SetErrors sets the Errors field's value. -func (s *FleetData) SetErrors(v []*DescribeFleetError) *FleetData { - s.Errors = v - return s -} - -// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. -func (s *FleetData) SetExcessCapacityTerminationPolicy(v string) *FleetData { - s.ExcessCapacityTerminationPolicy = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *FleetData) SetFleetId(v string) *FleetData { - s.FleetId = &v - return s -} - -// SetFleetState sets the FleetState field's value. -func (s *FleetData) SetFleetState(v string) *FleetData { - s.FleetState = &v - return s -} - -// SetFulfilledCapacity sets the FulfilledCapacity field's value. -func (s *FleetData) SetFulfilledCapacity(v float64) *FleetData { - s.FulfilledCapacity = &v - return s -} - -// SetFulfilledOnDemandCapacity sets the FulfilledOnDemandCapacity field's value. -func (s *FleetData) SetFulfilledOnDemandCapacity(v float64) *FleetData { - s.FulfilledOnDemandCapacity = &v - return s -} - -// SetInstances sets the Instances field's value. -func (s *FleetData) SetInstances(v []*DescribeFleetsInstances) *FleetData { - s.Instances = v - return s -} - -// SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value. -func (s *FleetData) SetLaunchTemplateConfigs(v []*FleetLaunchTemplateConfig) *FleetData { - s.LaunchTemplateConfigs = v - return s -} - -// SetOnDemandOptions sets the OnDemandOptions field's value. -func (s *FleetData) SetOnDemandOptions(v *OnDemandOptions) *FleetData { - s.OnDemandOptions = v - return s -} - -// SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. -func (s *FleetData) SetReplaceUnhealthyInstances(v bool) *FleetData { - s.ReplaceUnhealthyInstances = &v - return s -} - -// SetSpotOptions sets the SpotOptions field's value. -func (s *FleetData) SetSpotOptions(v *SpotOptions) *FleetData { - s.SpotOptions = v - return s -} - -// SetTags sets the Tags field's value. -func (s *FleetData) SetTags(v []*Tag) *FleetData { - s.Tags = v - return s -} - -// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. -func (s *FleetData) SetTargetCapacitySpecification(v *TargetCapacitySpecification) *FleetData { - s.TargetCapacitySpecification = v - return s -} - -// SetTerminateInstancesWithExpiration sets the TerminateInstancesWithExpiration field's value. -func (s *FleetData) SetTerminateInstancesWithExpiration(v bool) *FleetData { - s.TerminateInstancesWithExpiration = &v - return s -} - -// SetType sets the Type field's value. -func (s *FleetData) SetType(v string) *FleetData { - s.Type = &v - return s -} - -// SetValidFrom sets the ValidFrom field's value. -func (s *FleetData) SetValidFrom(v time.Time) *FleetData { - s.ValidFrom = &v - return s -} - -// SetValidUntil sets the ValidUntil field's value. -func (s *FleetData) SetValidUntil(v time.Time) *FleetData { - s.ValidUntil = &v - return s -} - -// Describes a launch template and overrides. -type FleetLaunchTemplateConfig struct { - _ struct{} `type:"structure"` - - // The launch template. - LaunchTemplateSpecification *FleetLaunchTemplateSpecification `locationName:"launchTemplateSpecification" type:"structure"` - - // Any parameters that you specify override the same parameters in the launch - // template. - Overrides []*FleetLaunchTemplateOverrides `locationName:"overrides" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s FleetLaunchTemplateConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FleetLaunchTemplateConfig) GoString() string { - return s.String() -} - -// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. -func (s *FleetLaunchTemplateConfig) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecification) *FleetLaunchTemplateConfig { - s.LaunchTemplateSpecification = v - return s -} - -// SetOverrides sets the Overrides field's value. -func (s *FleetLaunchTemplateConfig) SetOverrides(v []*FleetLaunchTemplateOverrides) *FleetLaunchTemplateConfig { - s.Overrides = v - return s -} - -// Describes a launch template and overrides. -type FleetLaunchTemplateConfigRequest struct { - _ struct{} `type:"structure"` - - // The launch template to use. You must specify either the launch template ID - // or launch template name in the request. - LaunchTemplateSpecification *FleetLaunchTemplateSpecificationRequest `type:"structure"` - - // Any parameters that you specify override the same parameters in the launch - // template. - Overrides []*FleetLaunchTemplateOverridesRequest `locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s FleetLaunchTemplateConfigRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FleetLaunchTemplateConfigRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FleetLaunchTemplateConfigRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FleetLaunchTemplateConfigRequest"} - if s.LaunchTemplateSpecification != nil { - if err := s.LaunchTemplateSpecification.Validate(); err != nil { - invalidParams.AddNested("LaunchTemplateSpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. -func (s *FleetLaunchTemplateConfigRequest) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecificationRequest) *FleetLaunchTemplateConfigRequest { - s.LaunchTemplateSpecification = v - return s -} - -// SetOverrides sets the Overrides field's value. -func (s *FleetLaunchTemplateConfigRequest) SetOverrides(v []*FleetLaunchTemplateOverridesRequest) *FleetLaunchTemplateConfigRequest { - s.Overrides = v - return s -} - -// Describes overrides for a launch template. -type FleetLaunchTemplateOverrides struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which to launch the instances. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // The maximum price per unit hour that you are willing to pay for a Spot Instance. - MaxPrice *string `locationName:"maxPrice" type:"string"` - - // The location where the instance launched, if applicable. - Placement *PlacementResponse `locationName:"placement" type:"structure"` - - // The priority for the launch template override. If AllocationStrategy is set - // to prioritized, EC2 Fleet uses priority to determine which launch template - // override to use first in fulfilling On-Demand capacity. The highest priority - // is launched first. Valid values are whole numbers starting at 0. The lower - // the number, the higher the priority. If no number is set, the override has - // the lowest priority. - Priority *float64 `locationName:"priority" type:"double"` - - // The ID of the subnet in which to launch the instances. - SubnetId *string `locationName:"subnetId" type:"string"` - - // The number of units provided by the specified instance type. - WeightedCapacity *float64 `locationName:"weightedCapacity" type:"double"` -} - -// String returns the string representation -func (s FleetLaunchTemplateOverrides) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FleetLaunchTemplateOverrides) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *FleetLaunchTemplateOverrides) SetAvailabilityZone(v string) *FleetLaunchTemplateOverrides { - s.AvailabilityZone = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *FleetLaunchTemplateOverrides) SetInstanceType(v string) *FleetLaunchTemplateOverrides { - s.InstanceType = &v - return s -} - -// SetMaxPrice sets the MaxPrice field's value. -func (s *FleetLaunchTemplateOverrides) SetMaxPrice(v string) *FleetLaunchTemplateOverrides { - s.MaxPrice = &v - return s -} - -// SetPlacement sets the Placement field's value. -func (s *FleetLaunchTemplateOverrides) SetPlacement(v *PlacementResponse) *FleetLaunchTemplateOverrides { - s.Placement = v - return s -} - -// SetPriority sets the Priority field's value. -func (s *FleetLaunchTemplateOverrides) SetPriority(v float64) *FleetLaunchTemplateOverrides { - s.Priority = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *FleetLaunchTemplateOverrides) SetSubnetId(v string) *FleetLaunchTemplateOverrides { - s.SubnetId = &v - return s -} - -// SetWeightedCapacity sets the WeightedCapacity field's value. -func (s *FleetLaunchTemplateOverrides) SetWeightedCapacity(v float64) *FleetLaunchTemplateOverrides { - s.WeightedCapacity = &v - return s -} - -// Describes overrides for a launch template. -type FleetLaunchTemplateOverridesRequest struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which to launch the instances. - AvailabilityZone *string `type:"string"` - - // The instance type. - InstanceType *string `type:"string" enum:"InstanceType"` - - // The maximum price per unit hour that you are willing to pay for a Spot Instance. - MaxPrice *string `type:"string"` - - // The location where the instance launched, if applicable. - Placement *Placement `type:"structure"` - - // The priority for the launch template override. If AllocationStrategy is set - // to prioritized, EC2 Fleet uses priority to determine which launch template - // override to use first in fulfilling On-Demand capacity. The highest priority - // is launched first. Valid values are whole numbers starting at 0. The lower - // the number, the higher the priority. If no number is set, the launch template - // override has the lowest priority. - Priority *float64 `type:"double"` - - // The ID of the subnet in which to launch the instances. - SubnetId *string `type:"string"` - - // The number of units provided by the specified instance type. - WeightedCapacity *float64 `type:"double"` -} - -// String returns the string representation -func (s FleetLaunchTemplateOverridesRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FleetLaunchTemplateOverridesRequest) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *FleetLaunchTemplateOverridesRequest) SetAvailabilityZone(v string) *FleetLaunchTemplateOverridesRequest { - s.AvailabilityZone = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *FleetLaunchTemplateOverridesRequest) SetInstanceType(v string) *FleetLaunchTemplateOverridesRequest { - s.InstanceType = &v - return s -} - -// SetMaxPrice sets the MaxPrice field's value. -func (s *FleetLaunchTemplateOverridesRequest) SetMaxPrice(v string) *FleetLaunchTemplateOverridesRequest { - s.MaxPrice = &v - return s -} - -// SetPlacement sets the Placement field's value. -func (s *FleetLaunchTemplateOverridesRequest) SetPlacement(v *Placement) *FleetLaunchTemplateOverridesRequest { - s.Placement = v - return s -} - -// SetPriority sets the Priority field's value. -func (s *FleetLaunchTemplateOverridesRequest) SetPriority(v float64) *FleetLaunchTemplateOverridesRequest { - s.Priority = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *FleetLaunchTemplateOverridesRequest) SetSubnetId(v string) *FleetLaunchTemplateOverridesRequest { - s.SubnetId = &v - return s -} - -// SetWeightedCapacity sets the WeightedCapacity field's value. -func (s *FleetLaunchTemplateOverridesRequest) SetWeightedCapacity(v float64) *FleetLaunchTemplateOverridesRequest { - s.WeightedCapacity = &v - return s -} - -// Describes a launch template. -type FleetLaunchTemplateSpecification struct { - _ struct{} `type:"structure"` - - // The ID of the launch template. You must specify either a template ID or a - // template name. - LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` - - // The name of the launch template. You must specify either a template name - // or a template ID. - LaunchTemplateName *string `locationName:"launchTemplateName" min:"3" type:"string"` - - // The version number of the launch template. You must specify a version number. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s FleetLaunchTemplateSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FleetLaunchTemplateSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FleetLaunchTemplateSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FleetLaunchTemplateSpecification"} - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *FleetLaunchTemplateSpecification) SetLaunchTemplateId(v string) *FleetLaunchTemplateSpecification { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *FleetLaunchTemplateSpecification) SetLaunchTemplateName(v string) *FleetLaunchTemplateSpecification { - s.LaunchTemplateName = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *FleetLaunchTemplateSpecification) SetVersion(v string) *FleetLaunchTemplateSpecification { - s.Version = &v - return s -} - -// The launch template to use. You must specify either the launch template ID -// or launch template name in the request. -type FleetLaunchTemplateSpecificationRequest struct { - _ struct{} `type:"structure"` - - // The ID of the launch template. - LaunchTemplateId *string `type:"string"` - - // The name of the launch template. - LaunchTemplateName *string `min:"3" type:"string"` - - // The version number of the launch template. - Version *string `type:"string"` -} - -// String returns the string representation -func (s FleetLaunchTemplateSpecificationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FleetLaunchTemplateSpecificationRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FleetLaunchTemplateSpecificationRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FleetLaunchTemplateSpecificationRequest"} - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *FleetLaunchTemplateSpecificationRequest) SetLaunchTemplateId(v string) *FleetLaunchTemplateSpecificationRequest { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *FleetLaunchTemplateSpecificationRequest) SetLaunchTemplateName(v string) *FleetLaunchTemplateSpecificationRequest { - s.LaunchTemplateName = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *FleetLaunchTemplateSpecificationRequest) SetVersion(v string) *FleetLaunchTemplateSpecificationRequest { - s.Version = &v - return s -} - -// Describes a flow log. -type FlowLog struct { - _ struct{} `type:"structure"` - - // The date and time the flow log was created. - CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` - - // Information about the error that occurred. Rate limited indicates that CloudWatch - // Logs throttling has been applied for one or more network interfaces, or that - // you've reached the limit on the number of log groups that you can create. - // Access error indicates that the IAM role associated with the flow log does - // not have sufficient permissions to publish to CloudWatch Logs. Unknown error - // indicates an internal error. - DeliverLogsErrorMessage *string `locationName:"deliverLogsErrorMessage" type:"string"` - - // The ARN of the IAM role that posts logs to CloudWatch Logs. - DeliverLogsPermissionArn *string `locationName:"deliverLogsPermissionArn" type:"string"` - - // The status of the logs delivery (SUCCESS | FAILED). - DeliverLogsStatus *string `locationName:"deliverLogsStatus" type:"string"` - - // The flow log ID. - FlowLogId *string `locationName:"flowLogId" type:"string"` - - // The status of the flow log (ACTIVE). - FlowLogStatus *string `locationName:"flowLogStatus" type:"string"` - - // Specifies the destination to which the flow log data is published. Flow log - // data can be published to an CloudWatch Logs log group or an Amazon S3 bucket. - // If the flow log publishes to CloudWatch Logs, this element indicates the - // Amazon Resource Name (ARN) of the CloudWatch Logs log group to which the - // data is published. If the flow log publishes to Amazon S3, this element indicates - // the ARN of the Amazon S3 bucket to which the data is published. - LogDestination *string `locationName:"logDestination" type:"string"` - - // Specifies the type of destination to which the flow log data is published. - // Flow log data can be published to CloudWatch Logs or Amazon S3. - LogDestinationType *string `locationName:"logDestinationType" type:"string" enum:"LogDestinationType"` - - // The name of the flow log group. - LogGroupName *string `locationName:"logGroupName" type:"string"` - - // The ID of the resource on which the flow log was created. - ResourceId *string `locationName:"resourceId" type:"string"` - - // The type of traffic captured for the flow log. - TrafficType *string `locationName:"trafficType" type:"string" enum:"TrafficType"` -} - -// String returns the string representation -func (s FlowLog) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FlowLog) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *FlowLog) SetCreationTime(v time.Time) *FlowLog { - s.CreationTime = &v - return s -} - -// SetDeliverLogsErrorMessage sets the DeliverLogsErrorMessage field's value. -func (s *FlowLog) SetDeliverLogsErrorMessage(v string) *FlowLog { - s.DeliverLogsErrorMessage = &v - return s -} - -// SetDeliverLogsPermissionArn sets the DeliverLogsPermissionArn field's value. -func (s *FlowLog) SetDeliverLogsPermissionArn(v string) *FlowLog { - s.DeliverLogsPermissionArn = &v - return s -} - -// SetDeliverLogsStatus sets the DeliverLogsStatus field's value. -func (s *FlowLog) SetDeliverLogsStatus(v string) *FlowLog { - s.DeliverLogsStatus = &v - return s -} - -// SetFlowLogId sets the FlowLogId field's value. -func (s *FlowLog) SetFlowLogId(v string) *FlowLog { - s.FlowLogId = &v - return s -} - -// SetFlowLogStatus sets the FlowLogStatus field's value. -func (s *FlowLog) SetFlowLogStatus(v string) *FlowLog { - s.FlowLogStatus = &v - return s -} - -// SetLogDestination sets the LogDestination field's value. -func (s *FlowLog) SetLogDestination(v string) *FlowLog { - s.LogDestination = &v - return s -} - -// SetLogDestinationType sets the LogDestinationType field's value. -func (s *FlowLog) SetLogDestinationType(v string) *FlowLog { - s.LogDestinationType = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *FlowLog) SetLogGroupName(v string) *FlowLog { - s.LogGroupName = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *FlowLog) SetResourceId(v string) *FlowLog { - s.ResourceId = &v - return s -} - -// SetTrafficType sets the TrafficType field's value. -func (s *FlowLog) SetTrafficType(v string) *FlowLog { - s.TrafficType = &v - return s -} - -// Describes an Amazon FPGA image (AFI). -type FpgaImage struct { - _ struct{} `type:"structure"` - - // The date and time the AFI was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - - // The description of the AFI. - Description *string `locationName:"description" type:"string"` - - // The global FPGA image identifier (AGFI ID). - FpgaImageGlobalId *string `locationName:"fpgaImageGlobalId" type:"string"` - - // The FPGA image identifier (AFI ID). - FpgaImageId *string `locationName:"fpgaImageId" type:"string"` - - // The name of the AFI. - Name *string `locationName:"name" type:"string"` - - // The alias of the AFI owner. Possible values include self, amazon, and aws-marketplace. - OwnerAlias *string `locationName:"ownerAlias" type:"string"` - - // The AWS account ID of the AFI owner. - OwnerId *string `locationName:"ownerId" type:"string"` - - // Information about the PCI bus. - PciId *PciId `locationName:"pciId" type:"structure"` - - // The product codes for the AFI. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` - - // Indicates whether the AFI is public. - Public *bool `locationName:"public" type:"boolean"` - - // The version of the AWS Shell that was used to create the bitstream. - ShellVersion *string `locationName:"shellVersion" type:"string"` - - // Information about the state of the AFI. - State *FpgaImageState `locationName:"state" type:"structure"` - - // Any tags assigned to the AFI. - Tags []*Tag `locationName:"tags" locationNameList:"item" type:"list"` - - // The time of the most recent update to the AFI. - UpdateTime *time.Time `locationName:"updateTime" type:"timestamp"` -} - -// String returns the string representation -func (s FpgaImage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FpgaImage) GoString() string { - return s.String() -} - -// SetCreateTime sets the CreateTime field's value. -func (s *FpgaImage) SetCreateTime(v time.Time) *FpgaImage { - s.CreateTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *FpgaImage) SetDescription(v string) *FpgaImage { - s.Description = &v - return s -} - -// SetFpgaImageGlobalId sets the FpgaImageGlobalId field's value. -func (s *FpgaImage) SetFpgaImageGlobalId(v string) *FpgaImage { - s.FpgaImageGlobalId = &v - return s -} - -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *FpgaImage) SetFpgaImageId(v string) *FpgaImage { - s.FpgaImageId = &v - return s -} - -// SetName sets the Name field's value. -func (s *FpgaImage) SetName(v string) *FpgaImage { - s.Name = &v - return s -} - -// SetOwnerAlias sets the OwnerAlias field's value. -func (s *FpgaImage) SetOwnerAlias(v string) *FpgaImage { - s.OwnerAlias = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *FpgaImage) SetOwnerId(v string) *FpgaImage { - s.OwnerId = &v - return s -} - -// SetPciId sets the PciId field's value. -func (s *FpgaImage) SetPciId(v *PciId) *FpgaImage { - s.PciId = v - return s -} - -// SetProductCodes sets the ProductCodes field's value. -func (s *FpgaImage) SetProductCodes(v []*ProductCode) *FpgaImage { - s.ProductCodes = v - return s -} - -// SetPublic sets the Public field's value. -func (s *FpgaImage) SetPublic(v bool) *FpgaImage { - s.Public = &v - return s -} - -// SetShellVersion sets the ShellVersion field's value. -func (s *FpgaImage) SetShellVersion(v string) *FpgaImage { - s.ShellVersion = &v - return s -} - -// SetState sets the State field's value. -func (s *FpgaImage) SetState(v *FpgaImageState) *FpgaImage { - s.State = v - return s -} - -// SetTags sets the Tags field's value. -func (s *FpgaImage) SetTags(v []*Tag) *FpgaImage { - s.Tags = v - return s -} - -// SetUpdateTime sets the UpdateTime field's value. -func (s *FpgaImage) SetUpdateTime(v time.Time) *FpgaImage { - s.UpdateTime = &v - return s -} - -// Describes an Amazon FPGA image (AFI) attribute. -type FpgaImageAttribute struct { - _ struct{} `type:"structure"` - - // The description of the AFI. - Description *string `locationName:"description" type:"string"` - - // The ID of the AFI. - FpgaImageId *string `locationName:"fpgaImageId" type:"string"` - - // One or more load permissions. - LoadPermissions []*LoadPermission `locationName:"loadPermissions" locationNameList:"item" type:"list"` - - // The name of the AFI. - Name *string `locationName:"name" type:"string"` - - // One or more product codes. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s FpgaImageAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FpgaImageAttribute) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *FpgaImageAttribute) SetDescription(v string) *FpgaImageAttribute { - s.Description = &v - return s -} - -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *FpgaImageAttribute) SetFpgaImageId(v string) *FpgaImageAttribute { - s.FpgaImageId = &v - return s -} - -// SetLoadPermissions sets the LoadPermissions field's value. -func (s *FpgaImageAttribute) SetLoadPermissions(v []*LoadPermission) *FpgaImageAttribute { - s.LoadPermissions = v - return s -} - -// SetName sets the Name field's value. -func (s *FpgaImageAttribute) SetName(v string) *FpgaImageAttribute { - s.Name = &v - return s -} - -// SetProductCodes sets the ProductCodes field's value. -func (s *FpgaImageAttribute) SetProductCodes(v []*ProductCode) *FpgaImageAttribute { - s.ProductCodes = v - return s -} - -// Describes the state of the bitstream generation process for an Amazon FPGA -// image (AFI). -type FpgaImageState struct { - _ struct{} `type:"structure"` - - // The state. The following are the possible values: - // - // * pending - AFI bitstream generation is in progress. - // - // * available - The AFI is available for use. - // - // * failed - AFI bitstream generation failed. - // - // * unavailable - The AFI is no longer available for use. - Code *string `locationName:"code" type:"string" enum:"FpgaImageStateCode"` - - // If the state is failed, this is the error message. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s FpgaImageState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FpgaImageState) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *FpgaImageState) SetCode(v string) *FpgaImageState { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *FpgaImageState) SetMessage(v string) *FpgaImageState { - s.Message = &v - return s -} - -type GetConsoleOutputInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // When enabled, retrieves the latest console output for the instance. - // - // Default: disabled (false) - Latest *bool `type:"boolean"` -} - -// String returns the string representation -func (s GetConsoleOutputInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetConsoleOutputInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetConsoleOutputInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetConsoleOutputInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *GetConsoleOutputInput) SetDryRun(v bool) *GetConsoleOutputInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetConsoleOutputInput) SetInstanceId(v string) *GetConsoleOutputInput { - s.InstanceId = &v - return s -} - -// SetLatest sets the Latest field's value. -func (s *GetConsoleOutputInput) SetLatest(v bool) *GetConsoleOutputInput { - s.Latest = &v - return s -} - -type GetConsoleOutputOutput struct { - _ struct{} `type:"structure"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The console output, base64-encoded. If you are using a command line tool, - // the tool decodes the output for you. - Output *string `locationName:"output" type:"string"` - - // The time at which the output was last updated. - Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` -} - -// String returns the string representation -func (s GetConsoleOutputOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetConsoleOutputOutput) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetConsoleOutputOutput) SetInstanceId(v string) *GetConsoleOutputOutput { - s.InstanceId = &v - return s -} - -// SetOutput sets the Output field's value. -func (s *GetConsoleOutputOutput) SetOutput(v string) *GetConsoleOutputOutput { - s.Output = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *GetConsoleOutputOutput) SetTimestamp(v time.Time) *GetConsoleOutputOutput { - s.Timestamp = &v - return s -} - -type GetConsoleScreenshotInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // When set to true, acts as keystroke input and wakes up an instance that's - // in standby or "sleep" mode. - WakeUp *bool `type:"boolean"` -} - -// String returns the string representation -func (s GetConsoleScreenshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetConsoleScreenshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetConsoleScreenshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetConsoleScreenshotInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *GetConsoleScreenshotInput) SetDryRun(v bool) *GetConsoleScreenshotInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetConsoleScreenshotInput) SetInstanceId(v string) *GetConsoleScreenshotInput { - s.InstanceId = &v - return s -} - -// SetWakeUp sets the WakeUp field's value. -func (s *GetConsoleScreenshotInput) SetWakeUp(v bool) *GetConsoleScreenshotInput { - s.WakeUp = &v - return s -} - -type GetConsoleScreenshotOutput struct { - _ struct{} `type:"structure"` - - // The data that comprises the image. - ImageData *string `locationName:"imageData" type:"string"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` -} - -// String returns the string representation -func (s GetConsoleScreenshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetConsoleScreenshotOutput) GoString() string { - return s.String() -} - -// SetImageData sets the ImageData field's value. -func (s *GetConsoleScreenshotOutput) SetImageData(v string) *GetConsoleScreenshotOutput { - s.ImageData = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetConsoleScreenshotOutput) SetInstanceId(v string) *GetConsoleScreenshotOutput { - s.InstanceId = &v - return s -} - -type GetHostReservationPurchasePreviewInput struct { - _ struct{} `type:"structure"` - - // The IDs of the Dedicated Hosts with which the reservation is associated. - // - // HostIdSet is a required field - HostIdSet []*string `locationNameList:"item" type:"list" required:"true"` - - // The offering ID of the reservation. - // - // OfferingId is a required field - OfferingId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetHostReservationPurchasePreviewInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHostReservationPurchasePreviewInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetHostReservationPurchasePreviewInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetHostReservationPurchasePreviewInput"} - if s.HostIdSet == nil { - invalidParams.Add(request.NewErrParamRequired("HostIdSet")) - } - if s.OfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("OfferingId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostIdSet sets the HostIdSet field's value. -func (s *GetHostReservationPurchasePreviewInput) SetHostIdSet(v []*string) *GetHostReservationPurchasePreviewInput { - s.HostIdSet = v - return s -} - -// SetOfferingId sets the OfferingId field's value. -func (s *GetHostReservationPurchasePreviewInput) SetOfferingId(v string) *GetHostReservationPurchasePreviewInput { - s.OfferingId = &v - return s -} - -type GetHostReservationPurchasePreviewOutput struct { - _ struct{} `type:"structure"` - - // The currency in which the totalUpfrontPrice and totalHourlyPrice amounts - // are specified. At this time, the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // The purchase information of the Dedicated Host reservation and the Dedicated - // Hosts associated with it. - Purchase []*Purchase `locationName:"purchase" locationNameList:"item" type:"list"` - - // The potential total hourly price of the reservation per hour. - TotalHourlyPrice *string `locationName:"totalHourlyPrice" type:"string"` - - // The potential total upfront price. This is billed immediately. - TotalUpfrontPrice *string `locationName:"totalUpfrontPrice" type:"string"` -} - -// String returns the string representation -func (s GetHostReservationPurchasePreviewOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHostReservationPurchasePreviewOutput) GoString() string { - return s.String() -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *GetHostReservationPurchasePreviewOutput) SetCurrencyCode(v string) *GetHostReservationPurchasePreviewOutput { - s.CurrencyCode = &v - return s -} - -// SetPurchase sets the Purchase field's value. -func (s *GetHostReservationPurchasePreviewOutput) SetPurchase(v []*Purchase) *GetHostReservationPurchasePreviewOutput { - s.Purchase = v - return s -} - -// SetTotalHourlyPrice sets the TotalHourlyPrice field's value. -func (s *GetHostReservationPurchasePreviewOutput) SetTotalHourlyPrice(v string) *GetHostReservationPurchasePreviewOutput { - s.TotalHourlyPrice = &v - return s -} - -// SetTotalUpfrontPrice sets the TotalUpfrontPrice field's value. -func (s *GetHostReservationPurchasePreviewOutput) SetTotalUpfrontPrice(v string) *GetHostReservationPurchasePreviewOutput { - s.TotalUpfrontPrice = &v - return s -} - -type GetLaunchTemplateDataInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetLaunchTemplateDataInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLaunchTemplateDataInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLaunchTemplateDataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLaunchTemplateDataInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *GetLaunchTemplateDataInput) SetDryRun(v bool) *GetLaunchTemplateDataInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetLaunchTemplateDataInput) SetInstanceId(v string) *GetLaunchTemplateDataInput { - s.InstanceId = &v - return s -} - -type GetLaunchTemplateDataOutput struct { - _ struct{} `type:"structure"` - - // The instance data. - LaunchTemplateData *ResponseLaunchTemplateData `locationName:"launchTemplateData" type:"structure"` -} - -// String returns the string representation -func (s GetLaunchTemplateDataOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLaunchTemplateDataOutput) GoString() string { - return s.String() -} - -// SetLaunchTemplateData sets the LaunchTemplateData field's value. -func (s *GetLaunchTemplateDataOutput) SetLaunchTemplateData(v *ResponseLaunchTemplateData) *GetLaunchTemplateDataOutput { - s.LaunchTemplateData = v - return s -} - -type GetPasswordDataInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the Windows instance. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPasswordDataInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPasswordDataInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPasswordDataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPasswordDataInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *GetPasswordDataInput) SetDryRun(v bool) *GetPasswordDataInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetPasswordDataInput) SetInstanceId(v string) *GetPasswordDataInput { - s.InstanceId = &v - return s -} - -type GetPasswordDataOutput struct { - _ struct{} `type:"structure"` - - // The ID of the Windows instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The password of the instance. Returns an empty string if the password is - // not available. - PasswordData *string `locationName:"passwordData" type:"string"` - - // The time the data was last updated. - Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` -} - -// String returns the string representation -func (s GetPasswordDataOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPasswordDataOutput) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetPasswordDataOutput) SetInstanceId(v string) *GetPasswordDataOutput { - s.InstanceId = &v - return s -} - -// SetPasswordData sets the PasswordData field's value. -func (s *GetPasswordDataOutput) SetPasswordData(v string) *GetPasswordDataOutput { - s.PasswordData = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *GetPasswordDataOutput) SetTimestamp(v time.Time) *GetPasswordDataOutput { - s.Timestamp = &v - return s -} - -// Contains the parameters for GetReservedInstanceExchangeQuote. -type GetReservedInstancesExchangeQuoteInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The IDs of the Convertible Reserved Instances to exchange. - // - // ReservedInstanceIds is a required field - ReservedInstanceIds []*string `locationName:"ReservedInstanceId" locationNameList:"ReservedInstanceId" type:"list" required:"true"` - - // The configuration of the target Convertible Reserved Instance to exchange - // for your current Convertible Reserved Instances. - TargetConfigurations []*TargetConfigurationRequest `locationName:"TargetConfiguration" locationNameList:"TargetConfigurationRequest" type:"list"` -} - -// String returns the string representation -func (s GetReservedInstancesExchangeQuoteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetReservedInstancesExchangeQuoteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetReservedInstancesExchangeQuoteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetReservedInstancesExchangeQuoteInput"} - if s.ReservedInstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedInstanceIds")) - } - if s.TargetConfigurations != nil { - for i, v := range s.TargetConfigurations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetConfigurations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *GetReservedInstancesExchangeQuoteInput) SetDryRun(v bool) *GetReservedInstancesExchangeQuoteInput { - s.DryRun = &v - return s -} - -// SetReservedInstanceIds sets the ReservedInstanceIds field's value. -func (s *GetReservedInstancesExchangeQuoteInput) SetReservedInstanceIds(v []*string) *GetReservedInstancesExchangeQuoteInput { - s.ReservedInstanceIds = v - return s -} - -// SetTargetConfigurations sets the TargetConfigurations field's value. -func (s *GetReservedInstancesExchangeQuoteInput) SetTargetConfigurations(v []*TargetConfigurationRequest) *GetReservedInstancesExchangeQuoteInput { - s.TargetConfigurations = v - return s -} - -// Contains the output of GetReservedInstancesExchangeQuote. -type GetReservedInstancesExchangeQuoteOutput struct { - _ struct{} `type:"structure"` - - // The currency of the transaction. - CurrencyCode *string `locationName:"currencyCode" type:"string"` - - // If true, the exchange is valid. If false, the exchange cannot be completed. - IsValidExchange *bool `locationName:"isValidExchange" type:"boolean"` - - // The new end date of the reservation term. - OutputReservedInstancesWillExpireAt *time.Time `locationName:"outputReservedInstancesWillExpireAt" type:"timestamp"` - - // The total true upfront charge for the exchange. - PaymentDue *string `locationName:"paymentDue" type:"string"` - - // The cost associated with the Reserved Instance. - ReservedInstanceValueRollup *ReservationValue `locationName:"reservedInstanceValueRollup" type:"structure"` - - // The configuration of your Convertible Reserved Instances. - ReservedInstanceValueSet []*ReservedInstanceReservationValue `locationName:"reservedInstanceValueSet" locationNameList:"item" type:"list"` - - // The cost associated with the Reserved Instance. - TargetConfigurationValueRollup *ReservationValue `locationName:"targetConfigurationValueRollup" type:"structure"` - - // The values of the target Convertible Reserved Instances. - TargetConfigurationValueSet []*TargetReservationValue `locationName:"targetConfigurationValueSet" locationNameList:"item" type:"list"` - - // Describes the reason why the exchange cannot be completed. - ValidationFailureReason *string `locationName:"validationFailureReason" type:"string"` -} - -// String returns the string representation -func (s GetReservedInstancesExchangeQuoteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetReservedInstancesExchangeQuoteOutput) GoString() string { - return s.String() -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetCurrencyCode(v string) *GetReservedInstancesExchangeQuoteOutput { - s.CurrencyCode = &v - return s -} - -// SetIsValidExchange sets the IsValidExchange field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetIsValidExchange(v bool) *GetReservedInstancesExchangeQuoteOutput { - s.IsValidExchange = &v - return s -} - -// SetOutputReservedInstancesWillExpireAt sets the OutputReservedInstancesWillExpireAt field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetOutputReservedInstancesWillExpireAt(v time.Time) *GetReservedInstancesExchangeQuoteOutput { - s.OutputReservedInstancesWillExpireAt = &v - return s -} - -// SetPaymentDue sets the PaymentDue field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetPaymentDue(v string) *GetReservedInstancesExchangeQuoteOutput { - s.PaymentDue = &v - return s -} - -// SetReservedInstanceValueRollup sets the ReservedInstanceValueRollup field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetReservedInstanceValueRollup(v *ReservationValue) *GetReservedInstancesExchangeQuoteOutput { - s.ReservedInstanceValueRollup = v - return s -} - -// SetReservedInstanceValueSet sets the ReservedInstanceValueSet field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetReservedInstanceValueSet(v []*ReservedInstanceReservationValue) *GetReservedInstancesExchangeQuoteOutput { - s.ReservedInstanceValueSet = v - return s -} - -// SetTargetConfigurationValueRollup sets the TargetConfigurationValueRollup field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetTargetConfigurationValueRollup(v *ReservationValue) *GetReservedInstancesExchangeQuoteOutput { - s.TargetConfigurationValueRollup = v - return s -} - -// SetTargetConfigurationValueSet sets the TargetConfigurationValueSet field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetTargetConfigurationValueSet(v []*TargetReservationValue) *GetReservedInstancesExchangeQuoteOutput { - s.TargetConfigurationValueSet = v - return s -} - -// SetValidationFailureReason sets the ValidationFailureReason field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetValidationFailureReason(v string) *GetReservedInstancesExchangeQuoteOutput { - s.ValidationFailureReason = &v - return s -} - -type GetTransitGatewayAttachmentPropagationsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. The possible values are: - // - // * transit-gateway-route-table-id - The ID of the transit gateway route - // table. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `min:"5" type:"integer"` - - // The token for the next page of results. - NextToken *string `type:"string"` - - // The ID of the attachment. - // - // TransitGatewayAttachmentId is a required field - TransitGatewayAttachmentId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTransitGatewayAttachmentPropagationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTransitGatewayAttachmentPropagationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTransitGatewayAttachmentPropagationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTransitGatewayAttachmentPropagationsInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.TransitGatewayAttachmentId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *GetTransitGatewayAttachmentPropagationsInput) SetDryRun(v bool) *GetTransitGatewayAttachmentPropagationsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *GetTransitGatewayAttachmentPropagationsInput) SetFilters(v []*Filter) *GetTransitGatewayAttachmentPropagationsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetTransitGatewayAttachmentPropagationsInput) SetMaxResults(v int64) *GetTransitGatewayAttachmentPropagationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetTransitGatewayAttachmentPropagationsInput) SetNextToken(v string) *GetTransitGatewayAttachmentPropagationsInput { - s.NextToken = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *GetTransitGatewayAttachmentPropagationsInput) SetTransitGatewayAttachmentId(v string) *GetTransitGatewayAttachmentPropagationsInput { - s.TransitGatewayAttachmentId = &v - return s -} - -type GetTransitGatewayAttachmentPropagationsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the propagation route tables. - TransitGatewayAttachmentPropagations []*TransitGatewayAttachmentPropagation `locationName:"transitGatewayAttachmentPropagations" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s GetTransitGatewayAttachmentPropagationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTransitGatewayAttachmentPropagationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetTransitGatewayAttachmentPropagationsOutput) SetNextToken(v string) *GetTransitGatewayAttachmentPropagationsOutput { - s.NextToken = &v - return s -} - -// SetTransitGatewayAttachmentPropagations sets the TransitGatewayAttachmentPropagations field's value. -func (s *GetTransitGatewayAttachmentPropagationsOutput) SetTransitGatewayAttachmentPropagations(v []*TransitGatewayAttachmentPropagation) *GetTransitGatewayAttachmentPropagationsOutput { - s.TransitGatewayAttachmentPropagations = v - return s -} - -type GetTransitGatewayRouteTableAssociationsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. The possible values are: - // - // * resource-id - The ID of the resource. - // - // * resource-type - The resource type (vpc | vpn). - // - // * transit-gateway-attachment-id - The ID of the attachment. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `min:"5" type:"integer"` - - // The token for the next page of results. - NextToken *string `type:"string"` - - // The ID of the transit gateway route table. - // - // TransitGatewayRouteTableId is a required field - TransitGatewayRouteTableId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTransitGatewayRouteTableAssociationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTransitGatewayRouteTableAssociationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTransitGatewayRouteTableAssociationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTransitGatewayRouteTableAssociationsInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.TransitGatewayRouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *GetTransitGatewayRouteTableAssociationsInput) SetDryRun(v bool) *GetTransitGatewayRouteTableAssociationsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *GetTransitGatewayRouteTableAssociationsInput) SetFilters(v []*Filter) *GetTransitGatewayRouteTableAssociationsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetTransitGatewayRouteTableAssociationsInput) SetMaxResults(v int64) *GetTransitGatewayRouteTableAssociationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetTransitGatewayRouteTableAssociationsInput) SetNextToken(v string) *GetTransitGatewayRouteTableAssociationsInput { - s.NextToken = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *GetTransitGatewayRouteTableAssociationsInput) SetTransitGatewayRouteTableId(v string) *GetTransitGatewayRouteTableAssociationsInput { - s.TransitGatewayRouteTableId = &v - return s -} - -type GetTransitGatewayRouteTableAssociationsOutput struct { - _ struct{} `type:"structure"` - - // Information about the associations. - Associations []*TransitGatewayRouteTableAssociation `locationName:"associations" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetTransitGatewayRouteTableAssociationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTransitGatewayRouteTableAssociationsOutput) GoString() string { - return s.String() -} - -// SetAssociations sets the Associations field's value. -func (s *GetTransitGatewayRouteTableAssociationsOutput) SetAssociations(v []*TransitGatewayRouteTableAssociation) *GetTransitGatewayRouteTableAssociationsOutput { - s.Associations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetTransitGatewayRouteTableAssociationsOutput) SetNextToken(v string) *GetTransitGatewayRouteTableAssociationsOutput { - s.NextToken = &v - return s -} - -type GetTransitGatewayRouteTablePropagationsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. The possible values are: - // - // * resource-id - The ID of the resource. - // - // * resource-type - The resource type (vpc | vpn). - // - // * transit-gateway-attachment-id - The ID of the attachment. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `min:"5" type:"integer"` - - // The token for the next page of results. - NextToken *string `type:"string"` - - // The ID of the transit gateway route table. - // - // TransitGatewayRouteTableId is a required field - TransitGatewayRouteTableId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTransitGatewayRouteTablePropagationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTransitGatewayRouteTablePropagationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTransitGatewayRouteTablePropagationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTransitGatewayRouteTablePropagationsInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.TransitGatewayRouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *GetTransitGatewayRouteTablePropagationsInput) SetDryRun(v bool) *GetTransitGatewayRouteTablePropagationsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *GetTransitGatewayRouteTablePropagationsInput) SetFilters(v []*Filter) *GetTransitGatewayRouteTablePropagationsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetTransitGatewayRouteTablePropagationsInput) SetMaxResults(v int64) *GetTransitGatewayRouteTablePropagationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetTransitGatewayRouteTablePropagationsInput) SetNextToken(v string) *GetTransitGatewayRouteTablePropagationsInput { - s.NextToken = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *GetTransitGatewayRouteTablePropagationsInput) SetTransitGatewayRouteTableId(v string) *GetTransitGatewayRouteTablePropagationsInput { - s.TransitGatewayRouteTableId = &v - return s -} - -type GetTransitGatewayRouteTablePropagationsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the route table propagations. - TransitGatewayRouteTablePropagations []*TransitGatewayRouteTablePropagation `locationName:"transitGatewayRouteTablePropagations" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s GetTransitGatewayRouteTablePropagationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTransitGatewayRouteTablePropagationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetTransitGatewayRouteTablePropagationsOutput) SetNextToken(v string) *GetTransitGatewayRouteTablePropagationsOutput { - s.NextToken = &v - return s -} - -// SetTransitGatewayRouteTablePropagations sets the TransitGatewayRouteTablePropagations field's value. -func (s *GetTransitGatewayRouteTablePropagationsOutput) SetTransitGatewayRouteTablePropagations(v []*TransitGatewayRouteTablePropagation) *GetTransitGatewayRouteTablePropagationsOutput { - s.TransitGatewayRouteTablePropagations = v - return s -} - -// Describes a security group. -type GroupIdentifier struct { - _ struct{} `type:"structure"` - - // The ID of the security group. - GroupId *string `locationName:"groupId" type:"string"` - - // The name of the security group. - GroupName *string `locationName:"groupName" type:"string"` -} - -// String returns the string representation -func (s GroupIdentifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GroupIdentifier) GoString() string { - return s.String() -} - -// SetGroupId sets the GroupId field's value. -func (s *GroupIdentifier) SetGroupId(v string) *GroupIdentifier { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *GroupIdentifier) SetGroupName(v string) *GroupIdentifier { - s.GroupName = &v - return s -} - -// Indicates whether your instance is configured for hibernation. This parameter -// is valid only if the instance meets the hibernation prerequisites (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). -// Hibernation is currently supported only for Amazon Linux. For more information, -// see Hibernate Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) -// in the Amazon Elastic Compute Cloud User Guide. -type HibernationOptions struct { - _ struct{} `type:"structure"` - - // If this parameter is set to true, your instance is enabled for hibernation; - // otherwise, it is not enabled for hibernation. - Configured *bool `locationName:"configured" type:"boolean"` -} - -// String returns the string representation -func (s HibernationOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HibernationOptions) GoString() string { - return s.String() -} - -// SetConfigured sets the Configured field's value. -func (s *HibernationOptions) SetConfigured(v bool) *HibernationOptions { - s.Configured = &v - return s -} - -// Indicates whether your instance is configured for hibernation. This parameter -// is valid only if the instance meets the hibernation prerequisites (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). -// Hibernation is currently supported only for Amazon Linux. For more information, -// see Hibernate Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) -// in the Amazon Elastic Compute Cloud User Guide. -type HibernationOptionsRequest struct { - _ struct{} `type:"structure"` - - // If you set this parameter to true, your instance is enabled for hibernation. - // - // Default: false - Configured *bool `type:"boolean"` -} - -// String returns the string representation -func (s HibernationOptionsRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HibernationOptionsRequest) GoString() string { - return s.String() -} - -// SetConfigured sets the Configured field's value. -func (s *HibernationOptionsRequest) SetConfigured(v bool) *HibernationOptionsRequest { - s.Configured = &v - return s -} - -// Describes an event in the history of the Spot Fleet request. -type HistoryRecord struct { - _ struct{} `type:"structure"` - - // Information about the event. - EventInformation *EventInformation `locationName:"eventInformation" type:"structure"` - - // The event type. - // - // * error - An error with the Spot Fleet request. - // - // * fleetRequestChange - A change in the status or configuration of the - // Spot Fleet request. - // - // * instanceChange - An instance was launched or terminated. - // - // * Information - An informational event. - EventType *string `locationName:"eventType" type:"string" enum:"EventType"` - - // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` -} - -// String returns the string representation -func (s HistoryRecord) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HistoryRecord) GoString() string { - return s.String() -} - -// SetEventInformation sets the EventInformation field's value. -func (s *HistoryRecord) SetEventInformation(v *EventInformation) *HistoryRecord { - s.EventInformation = v - return s -} - -// SetEventType sets the EventType field's value. -func (s *HistoryRecord) SetEventType(v string) *HistoryRecord { - s.EventType = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *HistoryRecord) SetTimestamp(v time.Time) *HistoryRecord { - s.Timestamp = &v - return s -} - -// Describes an event in the history of an EC2 Fleet. -type HistoryRecordEntry struct { - _ struct{} `type:"structure"` - - // Information about the event. - EventInformation *EventInformation `locationName:"eventInformation" type:"structure"` - - // The event type. - EventType *string `locationName:"eventType" type:"string" enum:"FleetEventType"` - - // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` -} - -// String returns the string representation -func (s HistoryRecordEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HistoryRecordEntry) GoString() string { - return s.String() -} - -// SetEventInformation sets the EventInformation field's value. -func (s *HistoryRecordEntry) SetEventInformation(v *EventInformation) *HistoryRecordEntry { - s.EventInformation = v - return s -} - -// SetEventType sets the EventType field's value. -func (s *HistoryRecordEntry) SetEventType(v string) *HistoryRecordEntry { - s.EventType = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *HistoryRecordEntry) SetTimestamp(v time.Time) *HistoryRecordEntry { - s.Timestamp = &v - return s -} - -// Describes the properties of the Dedicated Host. -type Host struct { - _ struct{} `type:"structure"` - - // The time that the Dedicated Host was allocated. - AllocationTime *time.Time `locationName:"allocationTime" type:"timestamp"` - - // Whether auto-placement is on or off. - AutoPlacement *string `locationName:"autoPlacement" type:"string" enum:"AutoPlacement"` - - // The Availability Zone of the Dedicated Host. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The number of new instances that can be launched onto the Dedicated Host. - AvailableCapacity *AvailableCapacity `locationName:"availableCapacity" type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure idempotency - // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. - ClientToken *string `locationName:"clientToken" type:"string"` - - // The ID of the Dedicated Host. - HostId *string `locationName:"hostId" type:"string"` - - // The hardware specifications of the Dedicated Host. - HostProperties *HostProperties `locationName:"hostProperties" type:"structure"` - - // The reservation ID of the Dedicated Host. This returns a null response if - // the Dedicated Host doesn't have an associated reservation. - HostReservationId *string `locationName:"hostReservationId" type:"string"` - - // The IDs and instance type that are currently running on the Dedicated Host. - Instances []*HostInstance `locationName:"instances" locationNameList:"item" type:"list"` - - // The time that the Dedicated Host was released. - ReleaseTime *time.Time `locationName:"releaseTime" type:"timestamp"` - - // The Dedicated Host's state. - State *string `locationName:"state" type:"string" enum:"AllocationState"` - - // Any tags assigned to the Dedicated Host. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s Host) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Host) GoString() string { - return s.String() -} - -// SetAllocationTime sets the AllocationTime field's value. -func (s *Host) SetAllocationTime(v time.Time) *Host { - s.AllocationTime = &v - return s -} - -// SetAutoPlacement sets the AutoPlacement field's value. -func (s *Host) SetAutoPlacement(v string) *Host { - s.AutoPlacement = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Host) SetAvailabilityZone(v string) *Host { - s.AvailabilityZone = &v - return s -} - -// SetAvailableCapacity sets the AvailableCapacity field's value. -func (s *Host) SetAvailableCapacity(v *AvailableCapacity) *Host { - s.AvailableCapacity = v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *Host) SetClientToken(v string) *Host { - s.ClientToken = &v - return s -} - -// SetHostId sets the HostId field's value. -func (s *Host) SetHostId(v string) *Host { - s.HostId = &v - return s -} - -// SetHostProperties sets the HostProperties field's value. -func (s *Host) SetHostProperties(v *HostProperties) *Host { - s.HostProperties = v - return s -} - -// SetHostReservationId sets the HostReservationId field's value. -func (s *Host) SetHostReservationId(v string) *Host { - s.HostReservationId = &v - return s -} - -// SetInstances sets the Instances field's value. -func (s *Host) SetInstances(v []*HostInstance) *Host { - s.Instances = v - return s -} - -// SetReleaseTime sets the ReleaseTime field's value. -func (s *Host) SetReleaseTime(v time.Time) *Host { - s.ReleaseTime = &v - return s -} - -// SetState sets the State field's value. -func (s *Host) SetState(v string) *Host { - s.State = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Host) SetTags(v []*Tag) *Host { - s.Tags = v - return s -} - -// Describes an instance running on a Dedicated Host. -type HostInstance struct { - _ struct{} `type:"structure"` - - // the IDs of instances that are running on the Dedicated Host. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The instance type size (for example, m3.medium) of the running instance. - InstanceType *string `locationName:"instanceType" type:"string"` -} - -// String returns the string representation -func (s HostInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HostInstance) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *HostInstance) SetInstanceId(v string) *HostInstance { - s.InstanceId = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *HostInstance) SetInstanceType(v string) *HostInstance { - s.InstanceType = &v - return s -} - -// Details about the Dedicated Host Reservation offering. -type HostOffering struct { - _ struct{} `type:"structure"` - - // The currency of the offering. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // The duration of the offering (in seconds). - Duration *int64 `locationName:"duration" type:"integer"` - - // The hourly price of the offering. - HourlyPrice *string `locationName:"hourlyPrice" type:"string"` - - // The instance family of the offering. - InstanceFamily *string `locationName:"instanceFamily" type:"string"` - - // The ID of the offering. - OfferingId *string `locationName:"offeringId" type:"string"` - - // The available payment option. - PaymentOption *string `locationName:"paymentOption" type:"string" enum:"PaymentOption"` - - // The upfront price of the offering. Does not apply to No Upfront offerings. - UpfrontPrice *string `locationName:"upfrontPrice" type:"string"` -} - -// String returns the string representation -func (s HostOffering) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HostOffering) GoString() string { - return s.String() -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *HostOffering) SetCurrencyCode(v string) *HostOffering { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *HostOffering) SetDuration(v int64) *HostOffering { - s.Duration = &v - return s -} - -// SetHourlyPrice sets the HourlyPrice field's value. -func (s *HostOffering) SetHourlyPrice(v string) *HostOffering { - s.HourlyPrice = &v - return s -} - -// SetInstanceFamily sets the InstanceFamily field's value. -func (s *HostOffering) SetInstanceFamily(v string) *HostOffering { - s.InstanceFamily = &v - return s -} - -// SetOfferingId sets the OfferingId field's value. -func (s *HostOffering) SetOfferingId(v string) *HostOffering { - s.OfferingId = &v - return s -} - -// SetPaymentOption sets the PaymentOption field's value. -func (s *HostOffering) SetPaymentOption(v string) *HostOffering { - s.PaymentOption = &v - return s -} - -// SetUpfrontPrice sets the UpfrontPrice field's value. -func (s *HostOffering) SetUpfrontPrice(v string) *HostOffering { - s.UpfrontPrice = &v - return s -} - -// Describes properties of a Dedicated Host. -type HostProperties struct { - _ struct{} `type:"structure"` - - // The number of cores on the Dedicated Host. - Cores *int64 `locationName:"cores" type:"integer"` - - // The instance type size that the Dedicated Host supports (for example, m3.medium). - InstanceType *string `locationName:"instanceType" type:"string"` - - // The number of sockets on the Dedicated Host. - Sockets *int64 `locationName:"sockets" type:"integer"` - - // The number of vCPUs on the Dedicated Host. - TotalVCpus *int64 `locationName:"totalVCpus" type:"integer"` -} - -// String returns the string representation -func (s HostProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HostProperties) GoString() string { - return s.String() -} - -// SetCores sets the Cores field's value. -func (s *HostProperties) SetCores(v int64) *HostProperties { - s.Cores = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *HostProperties) SetInstanceType(v string) *HostProperties { - s.InstanceType = &v - return s -} - -// SetSockets sets the Sockets field's value. -func (s *HostProperties) SetSockets(v int64) *HostProperties { - s.Sockets = &v - return s -} - -// SetTotalVCpus sets the TotalVCpus field's value. -func (s *HostProperties) SetTotalVCpus(v int64) *HostProperties { - s.TotalVCpus = &v - return s -} - -// Details about the Dedicated Host Reservation and associated Dedicated Hosts. -type HostReservation struct { - _ struct{} `type:"structure"` - - // The number of Dedicated Hosts the reservation is associated with. - Count *int64 `locationName:"count" type:"integer"` - - // The currency in which the upfrontPrice and hourlyPrice amounts are specified. - // At this time, the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // The length of the reservation's term, specified in seconds. Can be 31536000 - // (1 year) | 94608000 (3 years). - Duration *int64 `locationName:"duration" type:"integer"` - - // The date and time that the reservation ends. - End *time.Time `locationName:"end" type:"timestamp"` - - // The IDs of the Dedicated Hosts associated with the reservation. - HostIdSet []*string `locationName:"hostIdSet" locationNameList:"item" type:"list"` - - // The ID of the reservation that specifies the associated Dedicated Hosts. - HostReservationId *string `locationName:"hostReservationId" type:"string"` - - // The hourly price of the reservation. - HourlyPrice *string `locationName:"hourlyPrice" type:"string"` - - // The instance family of the Dedicated Host Reservation. The instance family - // on the Dedicated Host must be the same in order for it to benefit from the - // reservation. - InstanceFamily *string `locationName:"instanceFamily" type:"string"` - - // The ID of the reservation. This remains the same regardless of which Dedicated - // Hosts are associated with it. - OfferingId *string `locationName:"offeringId" type:"string"` - - // The payment option selected for this reservation. - PaymentOption *string `locationName:"paymentOption" type:"string" enum:"PaymentOption"` - - // The date and time that the reservation started. - Start *time.Time `locationName:"start" type:"timestamp"` - - // The state of the reservation. - State *string `locationName:"state" type:"string" enum:"ReservationState"` - - // The upfront price of the reservation. - UpfrontPrice *string `locationName:"upfrontPrice" type:"string"` -} - -// String returns the string representation -func (s HostReservation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HostReservation) GoString() string { - return s.String() -} - -// SetCount sets the Count field's value. -func (s *HostReservation) SetCount(v int64) *HostReservation { - s.Count = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *HostReservation) SetCurrencyCode(v string) *HostReservation { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *HostReservation) SetDuration(v int64) *HostReservation { - s.Duration = &v - return s -} - -// SetEnd sets the End field's value. -func (s *HostReservation) SetEnd(v time.Time) *HostReservation { - s.End = &v - return s -} - -// SetHostIdSet sets the HostIdSet field's value. -func (s *HostReservation) SetHostIdSet(v []*string) *HostReservation { - s.HostIdSet = v - return s -} - -// SetHostReservationId sets the HostReservationId field's value. -func (s *HostReservation) SetHostReservationId(v string) *HostReservation { - s.HostReservationId = &v - return s -} - -// SetHourlyPrice sets the HourlyPrice field's value. -func (s *HostReservation) SetHourlyPrice(v string) *HostReservation { - s.HourlyPrice = &v - return s -} - -// SetInstanceFamily sets the InstanceFamily field's value. -func (s *HostReservation) SetInstanceFamily(v string) *HostReservation { - s.InstanceFamily = &v - return s -} - -// SetOfferingId sets the OfferingId field's value. -func (s *HostReservation) SetOfferingId(v string) *HostReservation { - s.OfferingId = &v - return s -} - -// SetPaymentOption sets the PaymentOption field's value. -func (s *HostReservation) SetPaymentOption(v string) *HostReservation { - s.PaymentOption = &v - return s -} - -// SetStart sets the Start field's value. -func (s *HostReservation) SetStart(v time.Time) *HostReservation { - s.Start = &v - return s -} - -// SetState sets the State field's value. -func (s *HostReservation) SetState(v string) *HostReservation { - s.State = &v - return s -} - -// SetUpfrontPrice sets the UpfrontPrice field's value. -func (s *HostReservation) SetUpfrontPrice(v string) *HostReservation { - s.UpfrontPrice = &v - return s -} - -// Describes an IAM instance profile. -type IamInstanceProfile struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the instance profile. - Arn *string `locationName:"arn" type:"string"` - - // The ID of the instance profile. - Id *string `locationName:"id" type:"string"` -} - -// String returns the string representation -func (s IamInstanceProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IamInstanceProfile) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *IamInstanceProfile) SetArn(v string) *IamInstanceProfile { - s.Arn = &v - return s -} - -// SetId sets the Id field's value. -func (s *IamInstanceProfile) SetId(v string) *IamInstanceProfile { - s.Id = &v - return s -} - -// Describes an association between an IAM instance profile and an instance. -type IamInstanceProfileAssociation struct { - _ struct{} `type:"structure"` - - // The ID of the association. - AssociationId *string `locationName:"associationId" type:"string"` - - // The IAM instance profile. - IamInstanceProfile *IamInstanceProfile `locationName:"iamInstanceProfile" type:"structure"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The state of the association. - State *string `locationName:"state" type:"string" enum:"IamInstanceProfileAssociationState"` - - // The time the IAM instance profile was associated with the instance. - Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` -} - -// String returns the string representation -func (s IamInstanceProfileAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IamInstanceProfileAssociation) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *IamInstanceProfileAssociation) SetAssociationId(v string) *IamInstanceProfileAssociation { - s.AssociationId = &v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *IamInstanceProfileAssociation) SetIamInstanceProfile(v *IamInstanceProfile) *IamInstanceProfileAssociation { - s.IamInstanceProfile = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *IamInstanceProfileAssociation) SetInstanceId(v string) *IamInstanceProfileAssociation { - s.InstanceId = &v - return s -} - -// SetState sets the State field's value. -func (s *IamInstanceProfileAssociation) SetState(v string) *IamInstanceProfileAssociation { - s.State = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *IamInstanceProfileAssociation) SetTimestamp(v time.Time) *IamInstanceProfileAssociation { - s.Timestamp = &v - return s -} - -// Describes an IAM instance profile. -type IamInstanceProfileSpecification struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the instance profile. - Arn *string `locationName:"arn" type:"string"` - - // The name of the instance profile. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s IamInstanceProfileSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IamInstanceProfileSpecification) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *IamInstanceProfileSpecification) SetArn(v string) *IamInstanceProfileSpecification { - s.Arn = &v - return s -} - -// SetName sets the Name field's value. -func (s *IamInstanceProfileSpecification) SetName(v string) *IamInstanceProfileSpecification { - s.Name = &v - return s -} - -// Describes the ICMP type and code. -type IcmpTypeCode struct { - _ struct{} `type:"structure"` - - // The ICMP code. A value of -1 means all codes for the specified ICMP type. - Code *int64 `locationName:"code" type:"integer"` - - // The ICMP type. A value of -1 means all types. - Type *int64 `locationName:"type" type:"integer"` -} - -// String returns the string representation -func (s IcmpTypeCode) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IcmpTypeCode) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *IcmpTypeCode) SetCode(v int64) *IcmpTypeCode { - s.Code = &v - return s -} - -// SetType sets the Type field's value. -func (s *IcmpTypeCode) SetType(v int64) *IcmpTypeCode { - s.Type = &v - return s -} - -// Describes the ID format for a resource. -type IdFormat struct { - _ struct{} `type:"structure"` - - // The date in UTC at which you are permanently switched over to using longer - // IDs. If a deadline is not yet available for this resource type, this field - // is not returned. - Deadline *time.Time `locationName:"deadline" type:"timestamp"` - - // The type of resource. - Resource *string `locationName:"resource" type:"string"` - - // Indicates whether longer IDs (17-character IDs) are enabled for the resource. - UseLongIds *bool `locationName:"useLongIds" type:"boolean"` -} - -// String returns the string representation -func (s IdFormat) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IdFormat) GoString() string { - return s.String() -} - -// SetDeadline sets the Deadline field's value. -func (s *IdFormat) SetDeadline(v time.Time) *IdFormat { - s.Deadline = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *IdFormat) SetResource(v string) *IdFormat { - s.Resource = &v - return s -} - -// SetUseLongIds sets the UseLongIds field's value. -func (s *IdFormat) SetUseLongIds(v bool) *IdFormat { - s.UseLongIds = &v - return s -} - -// Describes an image. -type Image struct { - _ struct{} `type:"structure"` - - // The architecture of the image. - Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` - - // Any block device mapping entries. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` - - // The date and time the image was created. - CreationDate *string `locationName:"creationDate" type:"string"` - - // The description of the AMI that was provided during image creation. - Description *string `locationName:"description" type:"string"` - - // Specifies whether enhanced networking with ENA is enabled. - EnaSupport *bool `locationName:"enaSupport" type:"boolean"` - - // The hypervisor type of the image. - Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"` - - // The ID of the AMI. - ImageId *string `locationName:"imageId" type:"string"` - - // The location of the AMI. - ImageLocation *string `locationName:"imageLocation" type:"string"` - - // The AWS account alias (for example, amazon, self) or the AWS account ID of - // the AMI owner. - ImageOwnerAlias *string `locationName:"imageOwnerAlias" type:"string"` - - // The type of image. - ImageType *string `locationName:"imageType" type:"string" enum:"ImageTypeValues"` - - // The kernel associated with the image, if any. Only applicable for machine - // images. - KernelId *string `locationName:"kernelId" type:"string"` - - // The name of the AMI that was provided during image creation. - Name *string `locationName:"name" type:"string"` - - // The AWS account ID of the image owner. - OwnerId *string `locationName:"imageOwnerId" type:"string"` - - // The value is Windows for Windows AMIs; otherwise blank. - Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` - - // Any product codes associated with the AMI. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` - - // Indicates whether the image has public launch permissions. The value is true - // if this image has public launch permissions or false if it has only implicit - // and explicit launch permissions. - Public *bool `locationName:"isPublic" type:"boolean"` - - // The RAM disk associated with the image, if any. Only applicable for machine - // images. - RamdiskId *string `locationName:"ramdiskId" type:"string"` - - // The device name of the root device volume (for example, /dev/sda1). - RootDeviceName *string `locationName:"rootDeviceName" type:"string"` - - // The type of root device used by the AMI. The AMI can use an EBS volume or - // an instance store volume. - RootDeviceType *string `locationName:"rootDeviceType" type:"string" enum:"DeviceType"` - - // Specifies whether enhanced networking with the Intel 82599 Virtual Function - // interface is enabled. - SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"` - - // The current state of the AMI. If the state is available, the image is successfully - // registered and can be used to launch an instance. - State *string `locationName:"imageState" type:"string" enum:"ImageState"` - - // The reason for the state change. - StateReason *StateReason `locationName:"stateReason" type:"structure"` - - // Any tags assigned to the image. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The type of virtualization of the AMI. - VirtualizationType *string `locationName:"virtualizationType" type:"string" enum:"VirtualizationType"` -} - -// String returns the string representation -func (s Image) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Image) GoString() string { - return s.String() -} - -// SetArchitecture sets the Architecture field's value. -func (s *Image) SetArchitecture(v string) *Image { - s.Architecture = &v - return s -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *Image) SetBlockDeviceMappings(v []*BlockDeviceMapping) *Image { - s.BlockDeviceMappings = v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *Image) SetCreationDate(v string) *Image { - s.CreationDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Image) SetDescription(v string) *Image { - s.Description = &v - return s -} - -// SetEnaSupport sets the EnaSupport field's value. -func (s *Image) SetEnaSupport(v bool) *Image { - s.EnaSupport = &v - return s -} - -// SetHypervisor sets the Hypervisor field's value. -func (s *Image) SetHypervisor(v string) *Image { - s.Hypervisor = &v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *Image) SetImageId(v string) *Image { - s.ImageId = &v - return s -} - -// SetImageLocation sets the ImageLocation field's value. -func (s *Image) SetImageLocation(v string) *Image { - s.ImageLocation = &v - return s -} - -// SetImageOwnerAlias sets the ImageOwnerAlias field's value. -func (s *Image) SetImageOwnerAlias(v string) *Image { - s.ImageOwnerAlias = &v - return s -} - -// SetImageType sets the ImageType field's value. -func (s *Image) SetImageType(v string) *Image { - s.ImageType = &v - return s -} - -// SetKernelId sets the KernelId field's value. -func (s *Image) SetKernelId(v string) *Image { - s.KernelId = &v - return s -} - -// SetName sets the Name field's value. -func (s *Image) SetName(v string) *Image { - s.Name = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *Image) SetOwnerId(v string) *Image { - s.OwnerId = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *Image) SetPlatform(v string) *Image { - s.Platform = &v - return s -} - -// SetProductCodes sets the ProductCodes field's value. -func (s *Image) SetProductCodes(v []*ProductCode) *Image { - s.ProductCodes = v - return s -} - -// SetPublic sets the Public field's value. -func (s *Image) SetPublic(v bool) *Image { - s.Public = &v - return s -} - -// SetRamdiskId sets the RamdiskId field's value. -func (s *Image) SetRamdiskId(v string) *Image { - s.RamdiskId = &v - return s -} - -// SetRootDeviceName sets the RootDeviceName field's value. -func (s *Image) SetRootDeviceName(v string) *Image { - s.RootDeviceName = &v - return s -} - -// SetRootDeviceType sets the RootDeviceType field's value. -func (s *Image) SetRootDeviceType(v string) *Image { - s.RootDeviceType = &v - return s -} - -// SetSriovNetSupport sets the SriovNetSupport field's value. -func (s *Image) SetSriovNetSupport(v string) *Image { - s.SriovNetSupport = &v - return s -} - -// SetState sets the State field's value. -func (s *Image) SetState(v string) *Image { - s.State = &v - return s -} - -// SetStateReason sets the StateReason field's value. -func (s *Image) SetStateReason(v *StateReason) *Image { - s.StateReason = v - return s -} - -// SetTags sets the Tags field's value. -func (s *Image) SetTags(v []*Tag) *Image { - s.Tags = v - return s -} - -// SetVirtualizationType sets the VirtualizationType field's value. -func (s *Image) SetVirtualizationType(v string) *Image { - s.VirtualizationType = &v - return s -} - -// Describes the disk container object for an import image task. -type ImageDiskContainer struct { - _ struct{} `type:"structure"` - - // The description of the disk image. - Description *string `type:"string"` - - // The block device mapping for the disk. - DeviceName *string `type:"string"` - - // The format of the disk image being imported. - // - // Valid values: VHD | VMDK | OVA - Format *string `type:"string"` - - // The ID of the EBS snapshot to be used for importing the snapshot. - SnapshotId *string `type:"string"` - - // The URL to the Amazon S3-based disk image being imported. The URL can either - // be a https URL (https://..) or an Amazon S3 URL (s3://..) - Url *string `type:"string"` - - // The S3 bucket for the disk image. - UserBucket *UserBucket `type:"structure"` -} - -// String returns the string representation -func (s ImageDiskContainer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImageDiskContainer) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *ImageDiskContainer) SetDescription(v string) *ImageDiskContainer { - s.Description = &v - return s -} - -// SetDeviceName sets the DeviceName field's value. -func (s *ImageDiskContainer) SetDeviceName(v string) *ImageDiskContainer { - s.DeviceName = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *ImageDiskContainer) SetFormat(v string) *ImageDiskContainer { - s.Format = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *ImageDiskContainer) SetSnapshotId(v string) *ImageDiskContainer { - s.SnapshotId = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *ImageDiskContainer) SetUrl(v string) *ImageDiskContainer { - s.Url = &v - return s -} - -// SetUserBucket sets the UserBucket field's value. -func (s *ImageDiskContainer) SetUserBucket(v *UserBucket) *ImageDiskContainer { - s.UserBucket = v - return s -} - -type ImportClientVpnClientCertificateRevocationListInput struct { - _ struct{} `type:"structure"` - - // The client certificate revocation list file. For more information, see Generate - // a Client Certificate Revocation List (vpn/latest/clientvpn-admin/cvpn-working-certificates.html#cvpn-working-certificates-generate) - // in the AWS Client VPN Admin Guide. - // - // CertificateRevocationList is a required field - CertificateRevocationList *string `type:"string" required:"true"` - - // The ID of the Client VPN endpoint to which the client certificate revocation - // list applies. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s ImportClientVpnClientCertificateRevocationListInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportClientVpnClientCertificateRevocationListInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportClientVpnClientCertificateRevocationListInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportClientVpnClientCertificateRevocationListInput"} - if s.CertificateRevocationList == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateRevocationList")) - } - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateRevocationList sets the CertificateRevocationList field's value. -func (s *ImportClientVpnClientCertificateRevocationListInput) SetCertificateRevocationList(v string) *ImportClientVpnClientCertificateRevocationListInput { - s.CertificateRevocationList = &v - return s -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *ImportClientVpnClientCertificateRevocationListInput) SetClientVpnEndpointId(v string) *ImportClientVpnClientCertificateRevocationListInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ImportClientVpnClientCertificateRevocationListInput) SetDryRun(v bool) *ImportClientVpnClientCertificateRevocationListInput { - s.DryRun = &v - return s -} - -type ImportClientVpnClientCertificateRevocationListOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s ImportClientVpnClientCertificateRevocationListOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportClientVpnClientCertificateRevocationListOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *ImportClientVpnClientCertificateRevocationListOutput) SetReturn(v bool) *ImportClientVpnClientCertificateRevocationListOutput { - s.Return = &v - return s -} - -// Contains the parameters for ImportImage. -type ImportImageInput struct { - _ struct{} `type:"structure"` - - // The architecture of the virtual machine. - // - // Valid values: i386 | x86_64 - Architecture *string `type:"string"` - - // The client-specific data. - ClientData *ClientData `type:"structure"` - - // The token to enable idempotency for VM import requests. - ClientToken *string `type:"string"` - - // A description string for the import image task. - Description *string `type:"string"` - - // Information about the disk containers. - DiskContainers []*ImageDiskContainer `locationName:"DiskContainer" locationNameList:"item" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // Specifies whether the destination AMI of the imported image should be encrypted. - // The default CMK for EBS is used unless you specify a non-default AWS Key - // Management Service (AWS KMS) CMK using KmsKeyId. For more information, see - // Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) - // in the Amazon Elastic Compute Cloud User Guide. - Encrypted *bool `type:"boolean"` - - // The target hypervisor platform. - // - // Valid values: xen - Hypervisor *string `type:"string"` - - // An identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use when creating the encrypted AMI. This parameter is only - // required if you want to use a non-default CMK; if this parameter is not specified, - // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted - // flag must also be set. - // - // The CMK identifier may be provided in any of the following formats: - // - // * Key ID - // - // * Key alias, in the form alias/ExampleAlias - // - // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed - // by the region of the CMK, the AWS account ID of the CMK owner, the key - // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. - // - // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, - // followed by the region of the CMK, the AWS account ID of the CMK owner, - // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. - // - // - // AWS parses KmsKeyId asynchronously, meaning that the action you call may - // appear to complete even though you provided an invalid identifier. This action - // will eventually report failure. - // - // The specified CMK must exist in the region that the AMI is being copied to. - KmsKeyId *string `type:"string"` - - // The license type to be used for the Amazon Machine Image (AMI) after importing. - // - // Note: You may only use BYOL if you have existing licenses with rights to - // use these licenses in a third party cloud like AWS. For more information, - // see Prerequisites (http://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#prerequisites-image) - // in the VM Import/Export User Guide. - // - // Valid values: AWS | BYOL - LicenseType *string `type:"string"` - - // The operating system of the virtual machine. - // - // Valid values: Windows | Linux - Platform *string `type:"string"` - - // The name of the role to use when not using the default role, 'vmimport'. - RoleName *string `type:"string"` -} - -// String returns the string representation -func (s ImportImageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportImageInput) GoString() string { - return s.String() -} - -// SetArchitecture sets the Architecture field's value. -func (s *ImportImageInput) SetArchitecture(v string) *ImportImageInput { - s.Architecture = &v - return s -} - -// SetClientData sets the ClientData field's value. -func (s *ImportImageInput) SetClientData(v *ClientData) *ImportImageInput { - s.ClientData = v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *ImportImageInput) SetClientToken(v string) *ImportImageInput { - s.ClientToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ImportImageInput) SetDescription(v string) *ImportImageInput { - s.Description = &v - return s -} - -// SetDiskContainers sets the DiskContainers field's value. -func (s *ImportImageInput) SetDiskContainers(v []*ImageDiskContainer) *ImportImageInput { - s.DiskContainers = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ImportImageInput) SetDryRun(v bool) *ImportImageInput { - s.DryRun = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *ImportImageInput) SetEncrypted(v bool) *ImportImageInput { - s.Encrypted = &v - return s -} - -// SetHypervisor sets the Hypervisor field's value. -func (s *ImportImageInput) SetHypervisor(v string) *ImportImageInput { - s.Hypervisor = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *ImportImageInput) SetKmsKeyId(v string) *ImportImageInput { - s.KmsKeyId = &v - return s -} - -// SetLicenseType sets the LicenseType field's value. -func (s *ImportImageInput) SetLicenseType(v string) *ImportImageInput { - s.LicenseType = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *ImportImageInput) SetPlatform(v string) *ImportImageInput { - s.Platform = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *ImportImageInput) SetRoleName(v string) *ImportImageInput { - s.RoleName = &v - return s -} - -// Contains the output for ImportImage. -type ImportImageOutput struct { - _ struct{} `type:"structure"` - - // The architecture of the virtual machine. - Architecture *string `locationName:"architecture" type:"string"` - - // A description of the import task. - Description *string `locationName:"description" type:"string"` - - // Indicates whether the AMI is encypted. - Encrypted *bool `locationName:"encrypted" type:"boolean"` - - // The target hypervisor of the import task. - Hypervisor *string `locationName:"hypervisor" type:"string"` - - // The ID of the Amazon Machine Image (AMI) created by the import task. - ImageId *string `locationName:"imageId" type:"string"` - - // The task ID of the import image task. - ImportTaskId *string `locationName:"importTaskId" type:"string"` - - // The identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) that was used to create the encrypted AMI. - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - - // The license type of the virtual machine. - LicenseType *string `locationName:"licenseType" type:"string"` - - // The operating system of the virtual machine. - Platform *string `locationName:"platform" type:"string"` - - // The progress of the task. - Progress *string `locationName:"progress" type:"string"` - - // Information about the snapshots. - SnapshotDetails []*SnapshotDetail `locationName:"snapshotDetailSet" locationNameList:"item" type:"list"` - - // A brief status of the task. - Status *string `locationName:"status" type:"string"` - - // A detailed status message of the import task. - StatusMessage *string `locationName:"statusMessage" type:"string"` -} - -// String returns the string representation -func (s ImportImageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportImageOutput) GoString() string { - return s.String() -} - -// SetArchitecture sets the Architecture field's value. -func (s *ImportImageOutput) SetArchitecture(v string) *ImportImageOutput { - s.Architecture = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ImportImageOutput) SetDescription(v string) *ImportImageOutput { - s.Description = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *ImportImageOutput) SetEncrypted(v bool) *ImportImageOutput { - s.Encrypted = &v - return s -} - -// SetHypervisor sets the Hypervisor field's value. -func (s *ImportImageOutput) SetHypervisor(v string) *ImportImageOutput { - s.Hypervisor = &v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *ImportImageOutput) SetImageId(v string) *ImportImageOutput { - s.ImageId = &v - return s -} - -// SetImportTaskId sets the ImportTaskId field's value. -func (s *ImportImageOutput) SetImportTaskId(v string) *ImportImageOutput { - s.ImportTaskId = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *ImportImageOutput) SetKmsKeyId(v string) *ImportImageOutput { - s.KmsKeyId = &v - return s -} - -// SetLicenseType sets the LicenseType field's value. -func (s *ImportImageOutput) SetLicenseType(v string) *ImportImageOutput { - s.LicenseType = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *ImportImageOutput) SetPlatform(v string) *ImportImageOutput { - s.Platform = &v - return s -} - -// SetProgress sets the Progress field's value. -func (s *ImportImageOutput) SetProgress(v string) *ImportImageOutput { - s.Progress = &v - return s -} - -// SetSnapshotDetails sets the SnapshotDetails field's value. -func (s *ImportImageOutput) SetSnapshotDetails(v []*SnapshotDetail) *ImportImageOutput { - s.SnapshotDetails = v - return s -} - -// SetStatus sets the Status field's value. -func (s *ImportImageOutput) SetStatus(v string) *ImportImageOutput { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ImportImageOutput) SetStatusMessage(v string) *ImportImageOutput { - s.StatusMessage = &v - return s -} - -// Describes an import image task. -type ImportImageTask struct { - _ struct{} `type:"structure"` - - // The architecture of the virtual machine. - // - // Valid values: i386 | x86_64 - Architecture *string `locationName:"architecture" type:"string"` - - // A description of the import task. - Description *string `locationName:"description" type:"string"` - - // Indicates whether the image is encrypted. - Encrypted *bool `locationName:"encrypted" type:"boolean"` - - // The target hypervisor for the import task. - // - // Valid values: xen - Hypervisor *string `locationName:"hypervisor" type:"string"` - - // The ID of the Amazon Machine Image (AMI) of the imported virtual machine. - ImageId *string `locationName:"imageId" type:"string"` - - // The ID of the import image task. - ImportTaskId *string `locationName:"importTaskId" type:"string"` - - // The identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) that was used to create the encrypted image. - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - - // The license type of the virtual machine. - LicenseType *string `locationName:"licenseType" type:"string"` - - // The description string for the import image task. - Platform *string `locationName:"platform" type:"string"` - - // The percentage of progress of the import image task. - Progress *string `locationName:"progress" type:"string"` - - // Information about the snapshots. - SnapshotDetails []*SnapshotDetail `locationName:"snapshotDetailSet" locationNameList:"item" type:"list"` - - // A brief status for the import image task. - Status *string `locationName:"status" type:"string"` - - // A descriptive status message for the import image task. - StatusMessage *string `locationName:"statusMessage" type:"string"` -} - -// String returns the string representation -func (s ImportImageTask) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportImageTask) GoString() string { - return s.String() -} - -// SetArchitecture sets the Architecture field's value. -func (s *ImportImageTask) SetArchitecture(v string) *ImportImageTask { - s.Architecture = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ImportImageTask) SetDescription(v string) *ImportImageTask { - s.Description = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *ImportImageTask) SetEncrypted(v bool) *ImportImageTask { - s.Encrypted = &v - return s -} - -// SetHypervisor sets the Hypervisor field's value. -func (s *ImportImageTask) SetHypervisor(v string) *ImportImageTask { - s.Hypervisor = &v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *ImportImageTask) SetImageId(v string) *ImportImageTask { - s.ImageId = &v - return s -} - -// SetImportTaskId sets the ImportTaskId field's value. -func (s *ImportImageTask) SetImportTaskId(v string) *ImportImageTask { - s.ImportTaskId = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *ImportImageTask) SetKmsKeyId(v string) *ImportImageTask { - s.KmsKeyId = &v - return s -} - -// SetLicenseType sets the LicenseType field's value. -func (s *ImportImageTask) SetLicenseType(v string) *ImportImageTask { - s.LicenseType = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *ImportImageTask) SetPlatform(v string) *ImportImageTask { - s.Platform = &v - return s -} - -// SetProgress sets the Progress field's value. -func (s *ImportImageTask) SetProgress(v string) *ImportImageTask { - s.Progress = &v - return s -} - -// SetSnapshotDetails sets the SnapshotDetails field's value. -func (s *ImportImageTask) SetSnapshotDetails(v []*SnapshotDetail) *ImportImageTask { - s.SnapshotDetails = v - return s -} - -// SetStatus sets the Status field's value. -func (s *ImportImageTask) SetStatus(v string) *ImportImageTask { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ImportImageTask) SetStatusMessage(v string) *ImportImageTask { - s.StatusMessage = &v - return s -} - -// Contains the parameters for ImportInstance. -type ImportInstanceInput struct { - _ struct{} `type:"structure"` - - // A description for the instance being imported. - Description *string `locationName:"description" type:"string"` - - // The disk image. - DiskImages []*DiskImage `locationName:"diskImage" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The launch specification. - LaunchSpecification *ImportInstanceLaunchSpecification `locationName:"launchSpecification" type:"structure"` - - // The instance operating system. - // - // Platform is a required field - Platform *string `locationName:"platform" type:"string" required:"true" enum:"PlatformValues"` -} - -// String returns the string representation -func (s ImportInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportInstanceInput"} - if s.Platform == nil { - invalidParams.Add(request.NewErrParamRequired("Platform")) - } - if s.DiskImages != nil { - for i, v := range s.DiskImages { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DiskImages", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *ImportInstanceInput) SetDescription(v string) *ImportInstanceInput { - s.Description = &v - return s -} - -// SetDiskImages sets the DiskImages field's value. -func (s *ImportInstanceInput) SetDiskImages(v []*DiskImage) *ImportInstanceInput { - s.DiskImages = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ImportInstanceInput) SetDryRun(v bool) *ImportInstanceInput { - s.DryRun = &v - return s -} - -// SetLaunchSpecification sets the LaunchSpecification field's value. -func (s *ImportInstanceInput) SetLaunchSpecification(v *ImportInstanceLaunchSpecification) *ImportInstanceInput { - s.LaunchSpecification = v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *ImportInstanceInput) SetPlatform(v string) *ImportInstanceInput { - s.Platform = &v - return s -} - -// Describes the launch specification for VM import. -type ImportInstanceLaunchSpecification struct { - _ struct{} `type:"structure"` - - // Reserved. - AdditionalInfo *string `locationName:"additionalInfo" type:"string"` - - // The architecture of the instance. - Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` - - // One or more security group IDs. - GroupIds []*string `locationName:"GroupId" locationNameList:"SecurityGroupId" type:"list"` - - // One or more security group names. - GroupNames []*string `locationName:"GroupName" locationNameList:"SecurityGroup" type:"list"` - - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"` - - // The instance type. For more information about the instance types that you - // can import, see Instance Types (http://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-instance-types) - // in the VM Import/Export User Guide. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // Indicates whether monitoring is enabled. - Monitoring *bool `locationName:"monitoring" type:"boolean"` - - // The placement information for the instance. - Placement *Placement `locationName:"placement" type:"structure"` - - // [EC2-VPC] An available IP address from the IP address range of the subnet. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // [EC2-VPC] The ID of the subnet in which to launch the instance. - SubnetId *string `locationName:"subnetId" type:"string"` - - // The Base64-encoded user data to make available to the instance. - UserData *UserData `locationName:"userData" type:"structure"` -} - -// String returns the string representation -func (s ImportInstanceLaunchSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportInstanceLaunchSpecification) GoString() string { - return s.String() -} - -// SetAdditionalInfo sets the AdditionalInfo field's value. -func (s *ImportInstanceLaunchSpecification) SetAdditionalInfo(v string) *ImportInstanceLaunchSpecification { - s.AdditionalInfo = &v - return s -} - -// SetArchitecture sets the Architecture field's value. -func (s *ImportInstanceLaunchSpecification) SetArchitecture(v string) *ImportInstanceLaunchSpecification { - s.Architecture = &v - return s -} - -// SetGroupIds sets the GroupIds field's value. -func (s *ImportInstanceLaunchSpecification) SetGroupIds(v []*string) *ImportInstanceLaunchSpecification { - s.GroupIds = v - return s -} - -// SetGroupNames sets the GroupNames field's value. -func (s *ImportInstanceLaunchSpecification) SetGroupNames(v []*string) *ImportInstanceLaunchSpecification { - s.GroupNames = v - return s -} - -// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. -func (s *ImportInstanceLaunchSpecification) SetInstanceInitiatedShutdownBehavior(v string) *ImportInstanceLaunchSpecification { - s.InstanceInitiatedShutdownBehavior = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ImportInstanceLaunchSpecification) SetInstanceType(v string) *ImportInstanceLaunchSpecification { - s.InstanceType = &v - return s -} - -// SetMonitoring sets the Monitoring field's value. -func (s *ImportInstanceLaunchSpecification) SetMonitoring(v bool) *ImportInstanceLaunchSpecification { - s.Monitoring = &v - return s -} - -// SetPlacement sets the Placement field's value. -func (s *ImportInstanceLaunchSpecification) SetPlacement(v *Placement) *ImportInstanceLaunchSpecification { - s.Placement = v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *ImportInstanceLaunchSpecification) SetPrivateIpAddress(v string) *ImportInstanceLaunchSpecification { - s.PrivateIpAddress = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *ImportInstanceLaunchSpecification) SetSubnetId(v string) *ImportInstanceLaunchSpecification { - s.SubnetId = &v - return s -} - -// SetUserData sets the UserData field's value. -func (s *ImportInstanceLaunchSpecification) SetUserData(v *UserData) *ImportInstanceLaunchSpecification { - s.UserData = v - return s -} - -// Contains the output for ImportInstance. -type ImportInstanceOutput struct { - _ struct{} `type:"structure"` - - // Information about the conversion task. - ConversionTask *ConversionTask `locationName:"conversionTask" type:"structure"` -} - -// String returns the string representation -func (s ImportInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportInstanceOutput) GoString() string { - return s.String() -} - -// SetConversionTask sets the ConversionTask field's value. -func (s *ImportInstanceOutput) SetConversionTask(v *ConversionTask) *ImportInstanceOutput { - s.ConversionTask = v - return s -} - -// Describes an import instance task. -type ImportInstanceTaskDetails struct { - _ struct{} `type:"structure"` - - // A description of the task. - Description *string `locationName:"description" type:"string"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The instance operating system. - Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` - - // One or more volumes. - Volumes []*ImportInstanceVolumeDetailItem `locationName:"volumes" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s ImportInstanceTaskDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportInstanceTaskDetails) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *ImportInstanceTaskDetails) SetDescription(v string) *ImportInstanceTaskDetails { - s.Description = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ImportInstanceTaskDetails) SetInstanceId(v string) *ImportInstanceTaskDetails { - s.InstanceId = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *ImportInstanceTaskDetails) SetPlatform(v string) *ImportInstanceTaskDetails { - s.Platform = &v - return s -} - -// SetVolumes sets the Volumes field's value. -func (s *ImportInstanceTaskDetails) SetVolumes(v []*ImportInstanceVolumeDetailItem) *ImportInstanceTaskDetails { - s.Volumes = v - return s -} - -// Describes an import volume task. -type ImportInstanceVolumeDetailItem struct { - _ struct{} `type:"structure"` - - // The Availability Zone where the resulting instance will reside. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The number of bytes converted so far. - BytesConverted *int64 `locationName:"bytesConverted" type:"long"` - - // A description of the task. - Description *string `locationName:"description" type:"string"` - - // The image. - Image *DiskImageDescription `locationName:"image" type:"structure"` - - // The status of the import of this particular disk image. - Status *string `locationName:"status" type:"string"` - - // The status information or errors related to the disk image. - StatusMessage *string `locationName:"statusMessage" type:"string"` - - // The volume. - Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure"` -} - -// String returns the string representation -func (s ImportInstanceVolumeDetailItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportInstanceVolumeDetailItem) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ImportInstanceVolumeDetailItem) SetAvailabilityZone(v string) *ImportInstanceVolumeDetailItem { - s.AvailabilityZone = &v - return s -} - -// SetBytesConverted sets the BytesConverted field's value. -func (s *ImportInstanceVolumeDetailItem) SetBytesConverted(v int64) *ImportInstanceVolumeDetailItem { - s.BytesConverted = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ImportInstanceVolumeDetailItem) SetDescription(v string) *ImportInstanceVolumeDetailItem { - s.Description = &v - return s -} - -// SetImage sets the Image field's value. -func (s *ImportInstanceVolumeDetailItem) SetImage(v *DiskImageDescription) *ImportInstanceVolumeDetailItem { - s.Image = v - return s -} - -// SetStatus sets the Status field's value. -func (s *ImportInstanceVolumeDetailItem) SetStatus(v string) *ImportInstanceVolumeDetailItem { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ImportInstanceVolumeDetailItem) SetStatusMessage(v string) *ImportInstanceVolumeDetailItem { - s.StatusMessage = &v - return s -} - -// SetVolume sets the Volume field's value. -func (s *ImportInstanceVolumeDetailItem) SetVolume(v *DiskImageVolumeDescription) *ImportInstanceVolumeDetailItem { - s.Volume = v - return s -} - -type ImportKeyPairInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // A unique name for the key pair. - // - // KeyName is a required field - KeyName *string `locationName:"keyName" type:"string" required:"true"` - - // The public key. For API calls, the text must be base64-encoded. For command - // line tools, base64 encoding is performed for you. - // - // PublicKeyMaterial is automatically base64 encoded/decoded by the SDK. - // - // PublicKeyMaterial is a required field - PublicKeyMaterial []byte `locationName:"publicKeyMaterial" type:"blob" required:"true"` -} - -// String returns the string representation -func (s ImportKeyPairInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportKeyPairInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportKeyPairInput"} - if s.KeyName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyName")) - } - if s.PublicKeyMaterial == nil { - invalidParams.Add(request.NewErrParamRequired("PublicKeyMaterial")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *ImportKeyPairInput) SetDryRun(v bool) *ImportKeyPairInput { - s.DryRun = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *ImportKeyPairInput) SetKeyName(v string) *ImportKeyPairInput { - s.KeyName = &v - return s -} - -// SetPublicKeyMaterial sets the PublicKeyMaterial field's value. -func (s *ImportKeyPairInput) SetPublicKeyMaterial(v []byte) *ImportKeyPairInput { - s.PublicKeyMaterial = v - return s -} - -type ImportKeyPairOutput struct { - _ struct{} `type:"structure"` - - // The MD5 public key fingerprint as specified in section 4 of RFC 4716. - KeyFingerprint *string `locationName:"keyFingerprint" type:"string"` - - // The key pair name you provided. - KeyName *string `locationName:"keyName" type:"string"` -} - -// String returns the string representation -func (s ImportKeyPairOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportKeyPairOutput) GoString() string { - return s.String() -} - -// SetKeyFingerprint sets the KeyFingerprint field's value. -func (s *ImportKeyPairOutput) SetKeyFingerprint(v string) *ImportKeyPairOutput { - s.KeyFingerprint = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *ImportKeyPairOutput) SetKeyName(v string) *ImportKeyPairOutput { - s.KeyName = &v - return s -} - -// Contains the parameters for ImportSnapshot. -type ImportSnapshotInput struct { - _ struct{} `type:"structure"` - - // The client-specific data. - ClientData *ClientData `type:"structure"` - - // Token to enable idempotency for VM import requests. - ClientToken *string `type:"string"` - - // The description string for the import snapshot task. - Description *string `type:"string"` - - // Information about the disk container. - DiskContainer *SnapshotDiskContainer `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // Specifies whether the destination snapshot of the imported image should be - // encrypted. The default CMK for EBS is used unless you specify a non-default - // AWS Key Management Service (AWS KMS) CMK using KmsKeyId. For more information, - // see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) - // in the Amazon Elastic Compute Cloud User Guide. - Encrypted *bool `type:"boolean"` - - // An identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use when creating the encrypted snapshot. This parameter is - // only required if you want to use a non-default CMK; if this parameter is - // not specified, the default CMK for EBS is used. If a KmsKeyId is specified, - // the Encrypted flag must also be set. - // - // The CMK identifier may be provided in any of the following formats: - // - // * Key ID - // - // * Key alias, in the form alias/ExampleAlias - // - // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed - // by the region of the CMK, the AWS account ID of the CMK owner, the key - // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. - // - // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, - // followed by the region of the CMK, the AWS account ID of the CMK owner, - // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. - // - // - // AWS parses KmsKeyId asynchronously, meaning that the action you call may - // appear to complete even though you provided an invalid identifier. This action - // will eventually report failure. - // - // The specified CMK must exist in the region that the snapshot is being copied - // to. - KmsKeyId *string `type:"string"` - - // The name of the role to use when not using the default role, 'vmimport'. - RoleName *string `type:"string"` -} - -// String returns the string representation -func (s ImportSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportSnapshotInput) GoString() string { - return s.String() -} - -// SetClientData sets the ClientData field's value. -func (s *ImportSnapshotInput) SetClientData(v *ClientData) *ImportSnapshotInput { - s.ClientData = v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *ImportSnapshotInput) SetClientToken(v string) *ImportSnapshotInput { - s.ClientToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ImportSnapshotInput) SetDescription(v string) *ImportSnapshotInput { - s.Description = &v - return s -} - -// SetDiskContainer sets the DiskContainer field's value. -func (s *ImportSnapshotInput) SetDiskContainer(v *SnapshotDiskContainer) *ImportSnapshotInput { - s.DiskContainer = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ImportSnapshotInput) SetDryRun(v bool) *ImportSnapshotInput { - s.DryRun = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *ImportSnapshotInput) SetEncrypted(v bool) *ImportSnapshotInput { - s.Encrypted = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *ImportSnapshotInput) SetKmsKeyId(v string) *ImportSnapshotInput { - s.KmsKeyId = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *ImportSnapshotInput) SetRoleName(v string) *ImportSnapshotInput { - s.RoleName = &v - return s -} - -// Contains the output for ImportSnapshot. -type ImportSnapshotOutput struct { - _ struct{} `type:"structure"` - - // A description of the import snapshot task. - Description *string `locationName:"description" type:"string"` - - // The ID of the import snapshot task. - ImportTaskId *string `locationName:"importTaskId" type:"string"` - - // Information about the import snapshot task. - SnapshotTaskDetail *SnapshotTaskDetail `locationName:"snapshotTaskDetail" type:"structure"` -} - -// String returns the string representation -func (s ImportSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportSnapshotOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *ImportSnapshotOutput) SetDescription(v string) *ImportSnapshotOutput { - s.Description = &v - return s -} - -// SetImportTaskId sets the ImportTaskId field's value. -func (s *ImportSnapshotOutput) SetImportTaskId(v string) *ImportSnapshotOutput { - s.ImportTaskId = &v - return s -} - -// SetSnapshotTaskDetail sets the SnapshotTaskDetail field's value. -func (s *ImportSnapshotOutput) SetSnapshotTaskDetail(v *SnapshotTaskDetail) *ImportSnapshotOutput { - s.SnapshotTaskDetail = v - return s -} - -// Describes an import snapshot task. -type ImportSnapshotTask struct { - _ struct{} `type:"structure"` - - // A description of the import snapshot task. - Description *string `locationName:"description" type:"string"` - - // The ID of the import snapshot task. - ImportTaskId *string `locationName:"importTaskId" type:"string"` - - // Describes an import snapshot task. - SnapshotTaskDetail *SnapshotTaskDetail `locationName:"snapshotTaskDetail" type:"structure"` -} - -// String returns the string representation -func (s ImportSnapshotTask) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportSnapshotTask) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *ImportSnapshotTask) SetDescription(v string) *ImportSnapshotTask { - s.Description = &v - return s -} - -// SetImportTaskId sets the ImportTaskId field's value. -func (s *ImportSnapshotTask) SetImportTaskId(v string) *ImportSnapshotTask { - s.ImportTaskId = &v - return s -} - -// SetSnapshotTaskDetail sets the SnapshotTaskDetail field's value. -func (s *ImportSnapshotTask) SetSnapshotTaskDetail(v *SnapshotTaskDetail) *ImportSnapshotTask { - s.SnapshotTaskDetail = v - return s -} - -// Contains the parameters for ImportVolume. -type ImportVolumeInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone for the resulting EBS volume. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // A description of the volume. - Description *string `locationName:"description" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The disk image. - // - // Image is a required field - Image *DiskImageDetail `locationName:"image" type:"structure" required:"true"` - - // The volume size. - // - // Volume is a required field - Volume *VolumeDetail `locationName:"volume" type:"structure" required:"true"` -} - -// String returns the string representation -func (s ImportVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportVolumeInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.Image == nil { - invalidParams.Add(request.NewErrParamRequired("Image")) - } - if s.Volume == nil { - invalidParams.Add(request.NewErrParamRequired("Volume")) - } - if s.Image != nil { - if err := s.Image.Validate(); err != nil { - invalidParams.AddNested("Image", err.(request.ErrInvalidParams)) - } - } - if s.Volume != nil { - if err := s.Volume.Validate(); err != nil { - invalidParams.AddNested("Volume", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ImportVolumeInput) SetAvailabilityZone(v string) *ImportVolumeInput { - s.AvailabilityZone = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ImportVolumeInput) SetDescription(v string) *ImportVolumeInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ImportVolumeInput) SetDryRun(v bool) *ImportVolumeInput { - s.DryRun = &v - return s -} - -// SetImage sets the Image field's value. -func (s *ImportVolumeInput) SetImage(v *DiskImageDetail) *ImportVolumeInput { - s.Image = v - return s -} - -// SetVolume sets the Volume field's value. -func (s *ImportVolumeInput) SetVolume(v *VolumeDetail) *ImportVolumeInput { - s.Volume = v - return s -} - -// Contains the output for ImportVolume. -type ImportVolumeOutput struct { - _ struct{} `type:"structure"` - - // Information about the conversion task. - ConversionTask *ConversionTask `locationName:"conversionTask" type:"structure"` -} - -// String returns the string representation -func (s ImportVolumeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportVolumeOutput) GoString() string { - return s.String() -} - -// SetConversionTask sets the ConversionTask field's value. -func (s *ImportVolumeOutput) SetConversionTask(v *ConversionTask) *ImportVolumeOutput { - s.ConversionTask = v - return s -} - -// Describes an import volume task. -type ImportVolumeTaskDetails struct { - _ struct{} `type:"structure"` - - // The Availability Zone where the resulting volume will reside. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The number of bytes converted so far. - BytesConverted *int64 `locationName:"bytesConverted" type:"long"` - - // The description you provided when starting the import volume task. - Description *string `locationName:"description" type:"string"` - - // The image. - Image *DiskImageDescription `locationName:"image" type:"structure"` - - // The volume. - Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure"` -} - -// String returns the string representation -func (s ImportVolumeTaskDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportVolumeTaskDetails) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ImportVolumeTaskDetails) SetAvailabilityZone(v string) *ImportVolumeTaskDetails { - s.AvailabilityZone = &v - return s -} - -// SetBytesConverted sets the BytesConverted field's value. -func (s *ImportVolumeTaskDetails) SetBytesConverted(v int64) *ImportVolumeTaskDetails { - s.BytesConverted = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ImportVolumeTaskDetails) SetDescription(v string) *ImportVolumeTaskDetails { - s.Description = &v - return s -} - -// SetImage sets the Image field's value. -func (s *ImportVolumeTaskDetails) SetImage(v *DiskImageDescription) *ImportVolumeTaskDetails { - s.Image = v - return s -} - -// SetVolume sets the Volume field's value. -func (s *ImportVolumeTaskDetails) SetVolume(v *DiskImageVolumeDescription) *ImportVolumeTaskDetails { - s.Volume = v - return s -} - -// Describes an instance. -type Instance struct { - _ struct{} `type:"structure"` - - // The AMI launch index, which can be used to find this instance in the launch - // group. - AmiLaunchIndex *int64 `locationName:"amiLaunchIndex" type:"integer"` - - // The architecture of the image. - Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` - - // Any block device mapping entries for the instance. - BlockDeviceMappings []*InstanceBlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` - - // The ID of the Capacity Reservation. - CapacityReservationId *string `locationName:"capacityReservationId" type:"string"` - - // Information about the Capacity Reservation targeting option. - CapacityReservationSpecification *CapacityReservationSpecificationResponse `locationName:"capacityReservationSpecification" type:"structure"` - - // The idempotency token you provided when you launched the instance, if applicable. - ClientToken *string `locationName:"clientToken" type:"string"` - - // The CPU options for the instance. - CpuOptions *CpuOptions `locationName:"cpuOptions" type:"structure"` - - // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal I/O performance. This optimization isn't available - // with all instance types. Additional usage charges apply when using an EBS - // Optimized instance. - EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` - - // The Elastic GPU associated with the instance. - ElasticGpuAssociations []*ElasticGpuAssociation `locationName:"elasticGpuAssociationSet" locationNameList:"item" type:"list"` - - // The elastic inference accelerator associated with the instance. - ElasticInferenceAcceleratorAssociations []*ElasticInferenceAcceleratorAssociation `locationName:"elasticInferenceAcceleratorAssociationSet" locationNameList:"item" type:"list"` - - // Specifies whether enhanced networking with ENA is enabled. - EnaSupport *bool `locationName:"enaSupport" type:"boolean"` - - // Indicates whether the instance is enabled for hibernation. - HibernationOptions *HibernationOptions `locationName:"hibernationOptions" type:"structure"` - - // The hypervisor type of the instance. - Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"` - - // The IAM instance profile associated with the instance, if applicable. - IamInstanceProfile *IamInstanceProfile `locationName:"iamInstanceProfile" type:"structure"` - - // The ID of the AMI used to launch the instance. - ImageId *string `locationName:"imageId" type:"string"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // Indicates whether this is a Spot Instance or a Scheduled Instance. - InstanceLifecycle *string `locationName:"instanceLifecycle" type:"string" enum:"InstanceLifecycleType"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // The kernel associated with this instance, if applicable. - KernelId *string `locationName:"kernelId" type:"string"` - - // The name of the key pair, if this instance was launched with an associated - // key pair. - KeyName *string `locationName:"keyName" type:"string"` - - // The time the instance was launched. - LaunchTime *time.Time `locationName:"launchTime" type:"timestamp"` - - // The license configurations. - Licenses []*LicenseConfiguration `locationName:"licenseSet" locationNameList:"item" type:"list"` - - // The monitoring for the instance. - Monitoring *Monitoring `locationName:"monitoring" type:"structure"` - - // [EC2-VPC] One or more network interfaces for the instance. - NetworkInterfaces []*InstanceNetworkInterface `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` - - // The location where the instance launched, if applicable. - Placement *Placement `locationName:"placement" type:"structure"` - - // The value is Windows for Windows instances; otherwise blank. - Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` - - // (IPv4 only) The private DNS hostname name assigned to the instance. This - // DNS hostname can only be used inside the Amazon EC2 network. This name is - // not available until the instance enters the running state. - // - // [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private - // DNS hostnames if you've enabled DNS resolution and DNS hostnames in your - // VPC. If you are not using the Amazon-provided DNS server in your VPC, your - // custom domain name servers must resolve the hostname as appropriate. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - - // The private IPv4 address assigned to the instance. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // The product codes attached to this instance, if applicable. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` - - // (IPv4 only) The public DNS name assigned to the instance. This name is not - // available until the instance enters the running state. For EC2-VPC, this - // name is only available if you've enabled DNS hostnames for your VPC. - PublicDnsName *string `locationName:"dnsName" type:"string"` - - // The public IPv4 address assigned to the instance, if applicable. - PublicIpAddress *string `locationName:"ipAddress" type:"string"` - - // The RAM disk associated with this instance, if applicable. - RamdiskId *string `locationName:"ramdiskId" type:"string"` - - // The device name of the root device volume (for example, /dev/sda1). - RootDeviceName *string `locationName:"rootDeviceName" type:"string"` - - // The root device type used by the AMI. The AMI can use an EBS volume or an - // instance store volume. - RootDeviceType *string `locationName:"rootDeviceType" type:"string" enum:"DeviceType"` - - // One or more security groups for the instance. - SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - - // Specifies whether to enable an instance launched in a VPC to perform NAT. - // This controls whether source/destination checking is enabled on the instance. - // A value of true means that checking is enabled, and false means that checking - // is disabled. The value must be false for the instance to perform NAT. For - // more information, see NAT Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html) - // in the Amazon Virtual Private Cloud User Guide. - SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` - - // If the request is a Spot Instance request, the ID of the request. - SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"` - - // Specifies whether enhanced networking with the Intel 82599 Virtual Function - // interface is enabled. - SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"` - - // The current state of the instance. - State *InstanceState `locationName:"instanceState" type:"structure"` - - // The reason for the most recent state transition. - StateReason *StateReason `locationName:"stateReason" type:"structure"` - - // The reason for the most recent state transition. This might be an empty string. - StateTransitionReason *string `locationName:"reason" type:"string"` - - // [EC2-VPC] The ID of the subnet in which the instance is running. - SubnetId *string `locationName:"subnetId" type:"string"` - - // Any tags assigned to the instance. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The virtualization type of the instance. - VirtualizationType *string `locationName:"virtualizationType" type:"string" enum:"VirtualizationType"` - - // [EC2-VPC] The ID of the VPC in which the instance is running. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s Instance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Instance) GoString() string { - return s.String() -} - -// SetAmiLaunchIndex sets the AmiLaunchIndex field's value. -func (s *Instance) SetAmiLaunchIndex(v int64) *Instance { - s.AmiLaunchIndex = &v - return s -} - -// SetArchitecture sets the Architecture field's value. -func (s *Instance) SetArchitecture(v string) *Instance { - s.Architecture = &v - return s -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *Instance) SetBlockDeviceMappings(v []*InstanceBlockDeviceMapping) *Instance { - s.BlockDeviceMappings = v - return s -} - -// SetCapacityReservationId sets the CapacityReservationId field's value. -func (s *Instance) SetCapacityReservationId(v string) *Instance { - s.CapacityReservationId = &v - return s -} - -// SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value. -func (s *Instance) SetCapacityReservationSpecification(v *CapacityReservationSpecificationResponse) *Instance { - s.CapacityReservationSpecification = v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *Instance) SetClientToken(v string) *Instance { - s.ClientToken = &v - return s -} - -// SetCpuOptions sets the CpuOptions field's value. -func (s *Instance) SetCpuOptions(v *CpuOptions) *Instance { - s.CpuOptions = v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *Instance) SetEbsOptimized(v bool) *Instance { - s.EbsOptimized = &v - return s -} - -// SetElasticGpuAssociations sets the ElasticGpuAssociations field's value. -func (s *Instance) SetElasticGpuAssociations(v []*ElasticGpuAssociation) *Instance { - s.ElasticGpuAssociations = v - return s -} - -// SetElasticInferenceAcceleratorAssociations sets the ElasticInferenceAcceleratorAssociations field's value. -func (s *Instance) SetElasticInferenceAcceleratorAssociations(v []*ElasticInferenceAcceleratorAssociation) *Instance { - s.ElasticInferenceAcceleratorAssociations = v - return s -} - -// SetEnaSupport sets the EnaSupport field's value. -func (s *Instance) SetEnaSupport(v bool) *Instance { - s.EnaSupport = &v - return s -} - -// SetHibernationOptions sets the HibernationOptions field's value. -func (s *Instance) SetHibernationOptions(v *HibernationOptions) *Instance { - s.HibernationOptions = v - return s -} - -// SetHypervisor sets the Hypervisor field's value. -func (s *Instance) SetHypervisor(v string) *Instance { - s.Hypervisor = &v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *Instance) SetIamInstanceProfile(v *IamInstanceProfile) *Instance { - s.IamInstanceProfile = v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *Instance) SetImageId(v string) *Instance { - s.ImageId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *Instance) SetInstanceId(v string) *Instance { - s.InstanceId = &v - return s -} - -// SetInstanceLifecycle sets the InstanceLifecycle field's value. -func (s *Instance) SetInstanceLifecycle(v string) *Instance { - s.InstanceLifecycle = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *Instance) SetInstanceType(v string) *Instance { - s.InstanceType = &v - return s -} - -// SetKernelId sets the KernelId field's value. -func (s *Instance) SetKernelId(v string) *Instance { - s.KernelId = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *Instance) SetKeyName(v string) *Instance { - s.KeyName = &v - return s -} - -// SetLaunchTime sets the LaunchTime field's value. -func (s *Instance) SetLaunchTime(v time.Time) *Instance { - s.LaunchTime = &v - return s -} - -// SetLicenses sets the Licenses field's value. -func (s *Instance) SetLicenses(v []*LicenseConfiguration) *Instance { - s.Licenses = v - return s -} - -// SetMonitoring sets the Monitoring field's value. -func (s *Instance) SetMonitoring(v *Monitoring) *Instance { - s.Monitoring = v - return s -} - -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *Instance) SetNetworkInterfaces(v []*InstanceNetworkInterface) *Instance { - s.NetworkInterfaces = v - return s -} - -// SetPlacement sets the Placement field's value. -func (s *Instance) SetPlacement(v *Placement) *Instance { - s.Placement = v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *Instance) SetPlatform(v string) *Instance { - s.Platform = &v - return s -} - -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *Instance) SetPrivateDnsName(v string) *Instance { - s.PrivateDnsName = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *Instance) SetPrivateIpAddress(v string) *Instance { - s.PrivateIpAddress = &v - return s -} - -// SetProductCodes sets the ProductCodes field's value. -func (s *Instance) SetProductCodes(v []*ProductCode) *Instance { - s.ProductCodes = v - return s -} - -// SetPublicDnsName sets the PublicDnsName field's value. -func (s *Instance) SetPublicDnsName(v string) *Instance { - s.PublicDnsName = &v - return s -} - -// SetPublicIpAddress sets the PublicIpAddress field's value. -func (s *Instance) SetPublicIpAddress(v string) *Instance { - s.PublicIpAddress = &v - return s -} - -// SetRamdiskId sets the RamdiskId field's value. -func (s *Instance) SetRamdiskId(v string) *Instance { - s.RamdiskId = &v - return s -} - -// SetRootDeviceName sets the RootDeviceName field's value. -func (s *Instance) SetRootDeviceName(v string) *Instance { - s.RootDeviceName = &v - return s -} - -// SetRootDeviceType sets the RootDeviceType field's value. -func (s *Instance) SetRootDeviceType(v string) *Instance { - s.RootDeviceType = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *Instance) SetSecurityGroups(v []*GroupIdentifier) *Instance { - s.SecurityGroups = v - return s -} - -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *Instance) SetSourceDestCheck(v bool) *Instance { - s.SourceDestCheck = &v - return s -} - -// SetSpotInstanceRequestId sets the SpotInstanceRequestId field's value. -func (s *Instance) SetSpotInstanceRequestId(v string) *Instance { - s.SpotInstanceRequestId = &v - return s -} - -// SetSriovNetSupport sets the SriovNetSupport field's value. -func (s *Instance) SetSriovNetSupport(v string) *Instance { - s.SriovNetSupport = &v - return s -} - -// SetState sets the State field's value. -func (s *Instance) SetState(v *InstanceState) *Instance { - s.State = v - return s -} - -// SetStateReason sets the StateReason field's value. -func (s *Instance) SetStateReason(v *StateReason) *Instance { - s.StateReason = v - return s -} - -// SetStateTransitionReason sets the StateTransitionReason field's value. -func (s *Instance) SetStateTransitionReason(v string) *Instance { - s.StateTransitionReason = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *Instance) SetSubnetId(v string) *Instance { - s.SubnetId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Instance) SetTags(v []*Tag) *Instance { - s.Tags = v - return s -} - -// SetVirtualizationType sets the VirtualizationType field's value. -func (s *Instance) SetVirtualizationType(v string) *Instance { - s.VirtualizationType = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *Instance) SetVpcId(v string) *Instance { - s.VpcId = &v - return s -} - -// Describes a block device mapping. -type InstanceBlockDeviceMapping struct { - _ struct{} `type:"structure"` - - // The device name (for example, /dev/sdh or xvdh). - DeviceName *string `locationName:"deviceName" type:"string"` - - // Parameters used to automatically set up EBS volumes when the instance is - // launched. - Ebs *EbsInstanceBlockDevice `locationName:"ebs" type:"structure"` -} - -// String returns the string representation -func (s InstanceBlockDeviceMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceBlockDeviceMapping) GoString() string { - return s.String() -} - -// SetDeviceName sets the DeviceName field's value. -func (s *InstanceBlockDeviceMapping) SetDeviceName(v string) *InstanceBlockDeviceMapping { - s.DeviceName = &v - return s -} - -// SetEbs sets the Ebs field's value. -func (s *InstanceBlockDeviceMapping) SetEbs(v *EbsInstanceBlockDevice) *InstanceBlockDeviceMapping { - s.Ebs = v - return s -} - -// Describes a block device mapping entry. -type InstanceBlockDeviceMappingSpecification struct { - _ struct{} `type:"structure"` - - // The device name (for example, /dev/sdh or xvdh). - DeviceName *string `locationName:"deviceName" type:"string"` - - // Parameters used to automatically set up EBS volumes when the instance is - // launched. - Ebs *EbsInstanceBlockDeviceSpecification `locationName:"ebs" type:"structure"` - - // suppress the specified device included in the block device mapping. - NoDevice *string `locationName:"noDevice" type:"string"` - - // The virtual device name. - VirtualName *string `locationName:"virtualName" type:"string"` -} - -// String returns the string representation -func (s InstanceBlockDeviceMappingSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceBlockDeviceMappingSpecification) GoString() string { - return s.String() -} - -// SetDeviceName sets the DeviceName field's value. -func (s *InstanceBlockDeviceMappingSpecification) SetDeviceName(v string) *InstanceBlockDeviceMappingSpecification { - s.DeviceName = &v - return s -} - -// SetEbs sets the Ebs field's value. -func (s *InstanceBlockDeviceMappingSpecification) SetEbs(v *EbsInstanceBlockDeviceSpecification) *InstanceBlockDeviceMappingSpecification { - s.Ebs = v - return s -} - -// SetNoDevice sets the NoDevice field's value. -func (s *InstanceBlockDeviceMappingSpecification) SetNoDevice(v string) *InstanceBlockDeviceMappingSpecification { - s.NoDevice = &v - return s -} - -// SetVirtualName sets the VirtualName field's value. -func (s *InstanceBlockDeviceMappingSpecification) SetVirtualName(v string) *InstanceBlockDeviceMappingSpecification { - s.VirtualName = &v - return s -} - -// Information about the instance type that the Dedicated Host supports. -type InstanceCapacity struct { - _ struct{} `type:"structure"` - - // The number of instances that can still be launched onto the Dedicated Host. - AvailableCapacity *int64 `locationName:"availableCapacity" type:"integer"` - - // The instance type size supported by the Dedicated Host. - InstanceType *string `locationName:"instanceType" type:"string"` - - // The total number of instances that can be launched onto the Dedicated Host. - TotalCapacity *int64 `locationName:"totalCapacity" type:"integer"` -} - -// String returns the string representation -func (s InstanceCapacity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceCapacity) GoString() string { - return s.String() -} - -// SetAvailableCapacity sets the AvailableCapacity field's value. -func (s *InstanceCapacity) SetAvailableCapacity(v int64) *InstanceCapacity { - s.AvailableCapacity = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *InstanceCapacity) SetInstanceType(v string) *InstanceCapacity { - s.InstanceType = &v - return s -} - -// SetTotalCapacity sets the TotalCapacity field's value. -func (s *InstanceCapacity) SetTotalCapacity(v int64) *InstanceCapacity { - s.TotalCapacity = &v - return s -} - -// Describes a Reserved Instance listing state. -type InstanceCount struct { - _ struct{} `type:"structure"` - - // The number of listed Reserved Instances in the state specified by the state. - InstanceCount *int64 `locationName:"instanceCount" type:"integer"` - - // The states of the listed Reserved Instances. - State *string `locationName:"state" type:"string" enum:"ListingState"` -} - -// String returns the string representation -func (s InstanceCount) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceCount) GoString() string { - return s.String() -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *InstanceCount) SetInstanceCount(v int64) *InstanceCount { - s.InstanceCount = &v - return s -} - -// SetState sets the State field's value. -func (s *InstanceCount) SetState(v string) *InstanceCount { - s.State = &v - return s -} - -// Describes the credit option for CPU usage of a T2 or T3 instance. -type InstanceCreditSpecification struct { - _ struct{} `type:"structure"` - - // The credit option for CPU usage of the instance. Valid values are standard - // and unlimited. - CpuCredits *string `locationName:"cpuCredits" type:"string"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` -} - -// String returns the string representation -func (s InstanceCreditSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceCreditSpecification) GoString() string { - return s.String() -} - -// SetCpuCredits sets the CpuCredits field's value. -func (s *InstanceCreditSpecification) SetCpuCredits(v string) *InstanceCreditSpecification { - s.CpuCredits = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceCreditSpecification) SetInstanceId(v string) *InstanceCreditSpecification { - s.InstanceId = &v - return s -} - -// Describes the credit option for CPU usage of a T2 or T3 instance. -type InstanceCreditSpecificationRequest struct { - _ struct{} `type:"structure"` - - // The credit option for CPU usage of the instance. Valid values are standard - // and unlimited. - CpuCredits *string `type:"string"` - - // The ID of the instance. - InstanceId *string `type:"string"` -} - -// String returns the string representation -func (s InstanceCreditSpecificationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceCreditSpecificationRequest) GoString() string { - return s.String() -} - -// SetCpuCredits sets the CpuCredits field's value. -func (s *InstanceCreditSpecificationRequest) SetCpuCredits(v string) *InstanceCreditSpecificationRequest { - s.CpuCredits = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceCreditSpecificationRequest) SetInstanceId(v string) *InstanceCreditSpecificationRequest { - s.InstanceId = &v - return s -} - -// Describes an instance to export. -type InstanceExportDetails struct { - _ struct{} `type:"structure"` - - // The ID of the resource being exported. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The target virtualization environment. - TargetEnvironment *string `locationName:"targetEnvironment" type:"string" enum:"ExportEnvironment"` -} - -// String returns the string representation -func (s InstanceExportDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceExportDetails) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceExportDetails) SetInstanceId(v string) *InstanceExportDetails { - s.InstanceId = &v - return s -} - -// SetTargetEnvironment sets the TargetEnvironment field's value. -func (s *InstanceExportDetails) SetTargetEnvironment(v string) *InstanceExportDetails { - s.TargetEnvironment = &v - return s -} - -// Describes an IPv6 address. -type InstanceIpv6Address struct { - _ struct{} `type:"structure"` - - // The IPv6 address. - Ipv6Address *string `locationName:"ipv6Address" type:"string"` -} - -// String returns the string representation -func (s InstanceIpv6Address) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceIpv6Address) GoString() string { - return s.String() -} - -// SetIpv6Address sets the Ipv6Address field's value. -func (s *InstanceIpv6Address) SetIpv6Address(v string) *InstanceIpv6Address { - s.Ipv6Address = &v - return s -} - -// Describes an IPv6 address. -type InstanceIpv6AddressRequest struct { - _ struct{} `type:"structure"` - - // The IPv6 address. - Ipv6Address *string `type:"string"` -} - -// String returns the string representation -func (s InstanceIpv6AddressRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceIpv6AddressRequest) GoString() string { - return s.String() -} - -// SetIpv6Address sets the Ipv6Address field's value. -func (s *InstanceIpv6AddressRequest) SetIpv6Address(v string) *InstanceIpv6AddressRequest { - s.Ipv6Address = &v - return s -} - -// Describes the market (purchasing) option for the instances. -type InstanceMarketOptionsRequest struct { - _ struct{} `type:"structure"` - - // The market type. - MarketType *string `type:"string" enum:"MarketType"` - - // The options for Spot Instances. - SpotOptions *SpotMarketOptions `type:"structure"` -} - -// String returns the string representation -func (s InstanceMarketOptionsRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceMarketOptionsRequest) GoString() string { - return s.String() -} - -// SetMarketType sets the MarketType field's value. -func (s *InstanceMarketOptionsRequest) SetMarketType(v string) *InstanceMarketOptionsRequest { - s.MarketType = &v - return s -} - -// SetSpotOptions sets the SpotOptions field's value. -func (s *InstanceMarketOptionsRequest) SetSpotOptions(v *SpotMarketOptions) *InstanceMarketOptionsRequest { - s.SpotOptions = v - return s -} - -// Describes the monitoring of an instance. -type InstanceMonitoring struct { - _ struct{} `type:"structure"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The monitoring for the instance. - Monitoring *Monitoring `locationName:"monitoring" type:"structure"` -} - -// String returns the string representation -func (s InstanceMonitoring) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceMonitoring) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceMonitoring) SetInstanceId(v string) *InstanceMonitoring { - s.InstanceId = &v - return s -} - -// SetMonitoring sets the Monitoring field's value. -func (s *InstanceMonitoring) SetMonitoring(v *Monitoring) *InstanceMonitoring { - s.Monitoring = v - return s -} - -// Describes a network interface. -type InstanceNetworkInterface struct { - _ struct{} `type:"structure"` - - // The association information for an Elastic IPv4 associated with the network - // interface. - Association *InstanceNetworkInterfaceAssociation `locationName:"association" type:"structure"` - - // The network interface attachment. - Attachment *InstanceNetworkInterfaceAttachment `locationName:"attachment" type:"structure"` - - // The description. - Description *string `locationName:"description" type:"string"` - - // One or more security groups. - Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - - // One or more IPv6 addresses associated with the network interface. - Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6AddressesSet" locationNameList:"item" type:"list"` - - // The MAC address. - MacAddress *string `locationName:"macAddress" type:"string"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // The ID of the AWS account that created the network interface. - OwnerId *string `locationName:"ownerId" type:"string"` - - // The private DNS name. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - - // The IPv4 address of the network interface within the subnet. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // One or more private IPv4 addresses associated with the network interface. - PrivateIpAddresses []*InstancePrivateIpAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"` - - // Indicates whether to validate network traffic to or from this network interface. - SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` - - // The status of the network interface. - Status *string `locationName:"status" type:"string" enum:"NetworkInterfaceStatus"` - - // The ID of the subnet. - SubnetId *string `locationName:"subnetId" type:"string"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s InstanceNetworkInterface) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceNetworkInterface) GoString() string { - return s.String() -} - -// SetAssociation sets the Association field's value. -func (s *InstanceNetworkInterface) SetAssociation(v *InstanceNetworkInterfaceAssociation) *InstanceNetworkInterface { - s.Association = v - return s -} - -// SetAttachment sets the Attachment field's value. -func (s *InstanceNetworkInterface) SetAttachment(v *InstanceNetworkInterfaceAttachment) *InstanceNetworkInterface { - s.Attachment = v - return s -} - -// SetDescription sets the Description field's value. -func (s *InstanceNetworkInterface) SetDescription(v string) *InstanceNetworkInterface { - s.Description = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *InstanceNetworkInterface) SetGroups(v []*GroupIdentifier) *InstanceNetworkInterface { - s.Groups = v - return s -} - -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *InstanceNetworkInterface) SetIpv6Addresses(v []*InstanceIpv6Address) *InstanceNetworkInterface { - s.Ipv6Addresses = v - return s -} - -// SetMacAddress sets the MacAddress field's value. -func (s *InstanceNetworkInterface) SetMacAddress(v string) *InstanceNetworkInterface { - s.MacAddress = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *InstanceNetworkInterface) SetNetworkInterfaceId(v string) *InstanceNetworkInterface { - s.NetworkInterfaceId = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *InstanceNetworkInterface) SetOwnerId(v string) *InstanceNetworkInterface { - s.OwnerId = &v - return s -} - -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *InstanceNetworkInterface) SetPrivateDnsName(v string) *InstanceNetworkInterface { - s.PrivateDnsName = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *InstanceNetworkInterface) SetPrivateIpAddress(v string) *InstanceNetworkInterface { - s.PrivateIpAddress = &v - return s -} - -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *InstanceNetworkInterface) SetPrivateIpAddresses(v []*InstancePrivateIpAddress) *InstanceNetworkInterface { - s.PrivateIpAddresses = v - return s -} - -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *InstanceNetworkInterface) SetSourceDestCheck(v bool) *InstanceNetworkInterface { - s.SourceDestCheck = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *InstanceNetworkInterface) SetStatus(v string) *InstanceNetworkInterface { - s.Status = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *InstanceNetworkInterface) SetSubnetId(v string) *InstanceNetworkInterface { - s.SubnetId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *InstanceNetworkInterface) SetVpcId(v string) *InstanceNetworkInterface { - s.VpcId = &v - return s -} - -// Describes association information for an Elastic IP address (IPv4). -type InstanceNetworkInterfaceAssociation struct { - _ struct{} `type:"structure"` - - // The ID of the owner of the Elastic IP address. - IpOwnerId *string `locationName:"ipOwnerId" type:"string"` - - // The public DNS name. - PublicDnsName *string `locationName:"publicDnsName" type:"string"` - - // The public IP address or Elastic IP address bound to the network interface. - PublicIp *string `locationName:"publicIp" type:"string"` -} - -// String returns the string representation -func (s InstanceNetworkInterfaceAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceNetworkInterfaceAssociation) GoString() string { - return s.String() -} - -// SetIpOwnerId sets the IpOwnerId field's value. -func (s *InstanceNetworkInterfaceAssociation) SetIpOwnerId(v string) *InstanceNetworkInterfaceAssociation { - s.IpOwnerId = &v - return s -} - -// SetPublicDnsName sets the PublicDnsName field's value. -func (s *InstanceNetworkInterfaceAssociation) SetPublicDnsName(v string) *InstanceNetworkInterfaceAssociation { - s.PublicDnsName = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *InstanceNetworkInterfaceAssociation) SetPublicIp(v string) *InstanceNetworkInterfaceAssociation { - s.PublicIp = &v - return s -} - -// Describes a network interface attachment. -type InstanceNetworkInterfaceAttachment struct { - _ struct{} `type:"structure"` - - // The time stamp when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` - - // The ID of the network interface attachment. - AttachmentId *string `locationName:"attachmentId" type:"string"` - - // Indicates whether the network interface is deleted when the instance is terminated. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - - // The index of the device on the instance for the network interface attachment. - DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"` - - // The attachment state. - Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"` -} - -// String returns the string representation -func (s InstanceNetworkInterfaceAttachment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceNetworkInterfaceAttachment) GoString() string { - return s.String() -} - -// SetAttachTime sets the AttachTime field's value. -func (s *InstanceNetworkInterfaceAttachment) SetAttachTime(v time.Time) *InstanceNetworkInterfaceAttachment { - s.AttachTime = &v - return s -} - -// SetAttachmentId sets the AttachmentId field's value. -func (s *InstanceNetworkInterfaceAttachment) SetAttachmentId(v string) *InstanceNetworkInterfaceAttachment { - s.AttachmentId = &v - return s -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *InstanceNetworkInterfaceAttachment) SetDeleteOnTermination(v bool) *InstanceNetworkInterfaceAttachment { - s.DeleteOnTermination = &v - return s -} - -// SetDeviceIndex sets the DeviceIndex field's value. -func (s *InstanceNetworkInterfaceAttachment) SetDeviceIndex(v int64) *InstanceNetworkInterfaceAttachment { - s.DeviceIndex = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *InstanceNetworkInterfaceAttachment) SetStatus(v string) *InstanceNetworkInterfaceAttachment { - s.Status = &v - return s -} - -// Describes a network interface. -type InstanceNetworkInterfaceSpecification struct { - _ struct{} `type:"structure"` - - // Indicates whether to assign a public IPv4 address to an instance you launch - // in a VPC. The public IP address can only be assigned to a network interface - // for eth0, and can only be assigned to a new network interface, not an existing - // one. You cannot specify more than one network interface in the request. If - // launching into a default subnet, the default value is true. - AssociatePublicIpAddress *bool `locationName:"associatePublicIpAddress" type:"boolean"` - - // If set to true, the interface is deleted when the instance is terminated. - // You can specify true only if creating a new network interface when launching - // an instance. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - - // The description of the network interface. Applies only if creating a network - // interface when launching an instance. - Description *string `locationName:"description" type:"string"` - - // The index of the device on the instance for the network interface attachment. - // If you are specifying a network interface in a RunInstances request, you - // must provide the device index. - DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"` - - // The IDs of the security groups for the network interface. Applies only if - // creating a network interface when launching an instance. - Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` - - // A number of IPv6 addresses to assign to the network interface. Amazon EC2 - // chooses the IPv6 addresses from the range of the subnet. You cannot specify - // this option and the option to assign specific IPv6 addresses in the same - // request. You can specify this option if you've specified a minimum number - // of instances to launch. - Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` - - // One or more IPv6 addresses to assign to the network interface. You cannot - // specify this option and the option to assign a number of IPv6 addresses in - // the same request. You cannot specify this option if you've specified a minimum - // number of instances to launch. - Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6AddressesSet" queryName:"Ipv6Addresses" locationNameList:"item" type:"list"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // The private IPv4 address of the network interface. Applies only if creating - // a network interface when launching an instance. You cannot specify this option - // if you're launching more than one instance in a RunInstances request. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // One or more private IPv4 addresses to assign to the network interface. Only - // one private IPv4 address can be designated as primary. You cannot specify - // this option if you're launching more than one instance in a RunInstances - // request. - PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddressesSet" queryName:"PrivateIpAddresses" locationNameList:"item" type:"list"` - - // The number of secondary private IPv4 addresses. You can't specify this option - // and specify more than one private IP address using the private IP addresses - // option. You cannot specify this option if you're launching more than one - // instance in a RunInstances request. - SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` - - // The ID of the subnet associated with the network string. Applies only if - // creating a network interface when launching an instance. - SubnetId *string `locationName:"subnetId" type:"string"` -} - -// String returns the string representation -func (s InstanceNetworkInterfaceSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceNetworkInterfaceSpecification) GoString() string { - return s.String() -} - -// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. -func (s *InstanceNetworkInterfaceSpecification) SetAssociatePublicIpAddress(v bool) *InstanceNetworkInterfaceSpecification { - s.AssociatePublicIpAddress = &v - return s -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *InstanceNetworkInterfaceSpecification) SetDeleteOnTermination(v bool) *InstanceNetworkInterfaceSpecification { - s.DeleteOnTermination = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *InstanceNetworkInterfaceSpecification) SetDescription(v string) *InstanceNetworkInterfaceSpecification { - s.Description = &v - return s -} - -// SetDeviceIndex sets the DeviceIndex field's value. -func (s *InstanceNetworkInterfaceSpecification) SetDeviceIndex(v int64) *InstanceNetworkInterfaceSpecification { - s.DeviceIndex = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *InstanceNetworkInterfaceSpecification) SetGroups(v []*string) *InstanceNetworkInterfaceSpecification { - s.Groups = v - return s -} - -// SetIpv6AddressCount sets the Ipv6AddressCount field's value. -func (s *InstanceNetworkInterfaceSpecification) SetIpv6AddressCount(v int64) *InstanceNetworkInterfaceSpecification { - s.Ipv6AddressCount = &v - return s -} - -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *InstanceNetworkInterfaceSpecification) SetIpv6Addresses(v []*InstanceIpv6Address) *InstanceNetworkInterfaceSpecification { - s.Ipv6Addresses = v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *InstanceNetworkInterfaceSpecification) SetNetworkInterfaceId(v string) *InstanceNetworkInterfaceSpecification { - s.NetworkInterfaceId = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *InstanceNetworkInterfaceSpecification) SetPrivateIpAddress(v string) *InstanceNetworkInterfaceSpecification { - s.PrivateIpAddress = &v - return s -} - -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *InstanceNetworkInterfaceSpecification) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *InstanceNetworkInterfaceSpecification { - s.PrivateIpAddresses = v - return s -} - -// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. -func (s *InstanceNetworkInterfaceSpecification) SetSecondaryPrivateIpAddressCount(v int64) *InstanceNetworkInterfaceSpecification { - s.SecondaryPrivateIpAddressCount = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *InstanceNetworkInterfaceSpecification) SetSubnetId(v string) *InstanceNetworkInterfaceSpecification { - s.SubnetId = &v - return s -} - -// Describes a private IPv4 address. -type InstancePrivateIpAddress struct { - _ struct{} `type:"structure"` - - // The association information for an Elastic IP address for the network interface. - Association *InstanceNetworkInterfaceAssociation `locationName:"association" type:"structure"` - - // Indicates whether this IPv4 address is the primary private IP address of - // the network interface. - Primary *bool `locationName:"primary" type:"boolean"` - - // The private IPv4 DNS name. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - - // The private IPv4 address of the network interface. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` -} - -// String returns the string representation -func (s InstancePrivateIpAddress) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstancePrivateIpAddress) GoString() string { - return s.String() -} - -// SetAssociation sets the Association field's value. -func (s *InstancePrivateIpAddress) SetAssociation(v *InstanceNetworkInterfaceAssociation) *InstancePrivateIpAddress { - s.Association = v - return s -} - -// SetPrimary sets the Primary field's value. -func (s *InstancePrivateIpAddress) SetPrimary(v bool) *InstancePrivateIpAddress { - s.Primary = &v - return s -} - -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *InstancePrivateIpAddress) SetPrivateDnsName(v string) *InstancePrivateIpAddress { - s.PrivateDnsName = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *InstancePrivateIpAddress) SetPrivateIpAddress(v string) *InstancePrivateIpAddress { - s.PrivateIpAddress = &v - return s -} - -// Describes the current state of an instance. -type InstanceState struct { - _ struct{} `type:"structure"` - - // The low byte represents the state. The high byte is used for internal purposes - // and should be ignored. - // - // * 0 : pending - // - // * 16 : running - // - // * 32 : shutting-down - // - // * 48 : terminated - // - // * 64 : stopping - // - // * 80 : stopped - Code *int64 `locationName:"code" type:"integer"` - - // The current state of the instance. - Name *string `locationName:"name" type:"string" enum:"InstanceStateName"` -} - -// String returns the string representation -func (s InstanceState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceState) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *InstanceState) SetCode(v int64) *InstanceState { - s.Code = &v - return s -} - -// SetName sets the Name field's value. -func (s *InstanceState) SetName(v string) *InstanceState { - s.Name = &v - return s -} - -// Describes an instance state change. -type InstanceStateChange struct { - _ struct{} `type:"structure"` - - // The current state of the instance. - CurrentState *InstanceState `locationName:"currentState" type:"structure"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The previous state of the instance. - PreviousState *InstanceState `locationName:"previousState" type:"structure"` -} - -// String returns the string representation -func (s InstanceStateChange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceStateChange) GoString() string { - return s.String() -} - -// SetCurrentState sets the CurrentState field's value. -func (s *InstanceStateChange) SetCurrentState(v *InstanceState) *InstanceStateChange { - s.CurrentState = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceStateChange) SetInstanceId(v string) *InstanceStateChange { - s.InstanceId = &v - return s -} - -// SetPreviousState sets the PreviousState field's value. -func (s *InstanceStateChange) SetPreviousState(v *InstanceState) *InstanceStateChange { - s.PreviousState = v - return s -} - -// Describes the status of an instance. -type InstanceStatus struct { - _ struct{} `type:"structure"` - - // The Availability Zone of the instance. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // Any scheduled events associated with the instance. - Events []*InstanceStatusEvent `locationName:"eventsSet" locationNameList:"item" type:"list"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The intended state of the instance. DescribeInstanceStatus requires that - // an instance be in the running state. - InstanceState *InstanceState `locationName:"instanceState" type:"structure"` - - // Reports impaired functionality that stems from issues internal to the instance, - // such as impaired reachability. - InstanceStatus *InstanceStatusSummary `locationName:"instanceStatus" type:"structure"` - - // Reports impaired functionality that stems from issues related to the systems - // that support an instance, such as hardware failures and network connectivity - // problems. - SystemStatus *InstanceStatusSummary `locationName:"systemStatus" type:"structure"` -} - -// String returns the string representation -func (s InstanceStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceStatus) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *InstanceStatus) SetAvailabilityZone(v string) *InstanceStatus { - s.AvailabilityZone = &v - return s -} - -// SetEvents sets the Events field's value. -func (s *InstanceStatus) SetEvents(v []*InstanceStatusEvent) *InstanceStatus { - s.Events = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceStatus) SetInstanceId(v string) *InstanceStatus { - s.InstanceId = &v - return s -} - -// SetInstanceState sets the InstanceState field's value. -func (s *InstanceStatus) SetInstanceState(v *InstanceState) *InstanceStatus { - s.InstanceState = v - return s -} - -// SetInstanceStatus sets the InstanceStatus field's value. -func (s *InstanceStatus) SetInstanceStatus(v *InstanceStatusSummary) *InstanceStatus { - s.InstanceStatus = v - return s -} - -// SetSystemStatus sets the SystemStatus field's value. -func (s *InstanceStatus) SetSystemStatus(v *InstanceStatusSummary) *InstanceStatus { - s.SystemStatus = v - return s -} - -// Describes the instance status. -type InstanceStatusDetails struct { - _ struct{} `type:"structure"` - - // The time when a status check failed. For an instance that was launched and - // impaired, this is the time when the instance was launched. - ImpairedSince *time.Time `locationName:"impairedSince" type:"timestamp"` - - // The type of instance status. - Name *string `locationName:"name" type:"string" enum:"StatusName"` - - // The status. - Status *string `locationName:"status" type:"string" enum:"StatusType"` -} - -// String returns the string representation -func (s InstanceStatusDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceStatusDetails) GoString() string { - return s.String() -} - -// SetImpairedSince sets the ImpairedSince field's value. -func (s *InstanceStatusDetails) SetImpairedSince(v time.Time) *InstanceStatusDetails { - s.ImpairedSince = &v - return s -} - -// SetName sets the Name field's value. -func (s *InstanceStatusDetails) SetName(v string) *InstanceStatusDetails { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *InstanceStatusDetails) SetStatus(v string) *InstanceStatusDetails { - s.Status = &v - return s -} - -// Describes a scheduled event for an instance. -type InstanceStatusEvent struct { - _ struct{} `type:"structure"` - - // The event code. - Code *string `locationName:"code" type:"string" enum:"EventCode"` - - // A description of the event. - // - // After a scheduled event is completed, it can still be described for up to - // a week. If the event has been completed, this description starts with the - // following text: [Completed]. - Description *string `locationName:"description" type:"string"` - - // The latest scheduled end time for the event. - NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` - - // The earliest scheduled start time for the event. - NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` -} - -// String returns the string representation -func (s InstanceStatusEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceStatusEvent) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *InstanceStatusEvent) SetCode(v string) *InstanceStatusEvent { - s.Code = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *InstanceStatusEvent) SetDescription(v string) *InstanceStatusEvent { - s.Description = &v - return s -} - -// SetNotAfter sets the NotAfter field's value. -func (s *InstanceStatusEvent) SetNotAfter(v time.Time) *InstanceStatusEvent { - s.NotAfter = &v - return s -} - -// SetNotBefore sets the NotBefore field's value. -func (s *InstanceStatusEvent) SetNotBefore(v time.Time) *InstanceStatusEvent { - s.NotBefore = &v - return s -} - -// Describes the status of an instance. -type InstanceStatusSummary struct { - _ struct{} `type:"structure"` - - // The system instance health or application instance health. - Details []*InstanceStatusDetails `locationName:"details" locationNameList:"item" type:"list"` - - // The status. - Status *string `locationName:"status" type:"string" enum:"SummaryStatus"` -} - -// String returns the string representation -func (s InstanceStatusSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceStatusSummary) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *InstanceStatusSummary) SetDetails(v []*InstanceStatusDetails) *InstanceStatusSummary { - s.Details = v - return s -} - -// SetStatus sets the Status field's value. -func (s *InstanceStatusSummary) SetStatus(v string) *InstanceStatusSummary { - s.Status = &v - return s -} - -// Describes an internet gateway. -type InternetGateway struct { - _ struct{} `type:"structure"` - - // Any VPCs attached to the internet gateway. - Attachments []*InternetGatewayAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"` - - // The ID of the internet gateway. - InternetGatewayId *string `locationName:"internetGatewayId" type:"string"` - - // The ID of the AWS account that owns the internet gateway. - OwnerId *string `locationName:"ownerId" type:"string"` - - // Any tags assigned to the internet gateway. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s InternetGateway) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InternetGateway) GoString() string { - return s.String() -} - -// SetAttachments sets the Attachments field's value. -func (s *InternetGateway) SetAttachments(v []*InternetGatewayAttachment) *InternetGateway { - s.Attachments = v - return s -} - -// SetInternetGatewayId sets the InternetGatewayId field's value. -func (s *InternetGateway) SetInternetGatewayId(v string) *InternetGateway { - s.InternetGatewayId = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *InternetGateway) SetOwnerId(v string) *InternetGateway { - s.OwnerId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *InternetGateway) SetTags(v []*Tag) *InternetGateway { - s.Tags = v - return s -} - -// Describes the attachment of a VPC to an internet gateway or an egress-only -// internet gateway. -type InternetGatewayAttachment struct { - _ struct{} `type:"structure"` - - // The current state of the attachment. For an internet gateway, the state is - // available when attached to a VPC; otherwise, this value is not returned. - State *string `locationName:"state" type:"string" enum:"AttachmentStatus"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s InternetGatewayAttachment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InternetGatewayAttachment) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *InternetGatewayAttachment) SetState(v string) *InternetGatewayAttachment { - s.State = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *InternetGatewayAttachment) SetVpcId(v string) *InternetGatewayAttachment { - s.VpcId = &v - return s -} - -// Describes a set of permissions for a security group rule. -type IpPermission struct { - _ struct{} `type:"structure"` - - // The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 - // type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify - // all ICMP/ICMPv6 types, you must specify all codes. - FromPort *int64 `locationName:"fromPort" type:"integer"` - - // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). - // - // [EC2-VPC only] Use -1 to specify all protocols. When authorizing security - // group rules, specifying -1 or a protocol number other than tcp, udp, icmp, - // or 58 (ICMPv6) allows traffic on all ports, regardless of any port range - // you specify. For tcp, udp, and icmp, you must specify a port range. For 58 - // (ICMPv6), you can optionally specify a port range; if you don't, traffic - // for all types and codes is allowed when authorizing rules. - IpProtocol *string `locationName:"ipProtocol" type:"string"` - - // One or more IPv4 ranges. - IpRanges []*IpRange `locationName:"ipRanges" locationNameList:"item" type:"list"` - - // [EC2-VPC only] One or more IPv6 ranges. - Ipv6Ranges []*Ipv6Range `locationName:"ipv6Ranges" locationNameList:"item" type:"list"` - - // [EC2-VPC only] One or more prefix list IDs for an AWS service. With AuthorizeSecurityGroupEgress, - // this is the AWS service that you want to access through a VPC endpoint from - // instances associated with the security group. - PrefixListIds []*PrefixListId `locationName:"prefixListIds" locationNameList:"item" type:"list"` - - // The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. - // A value of -1 indicates all ICMP/ICMPv6 codes for the specified ICMP type. - // If you specify all ICMP/ICMPv6 types, you must specify all codes. - ToPort *int64 `locationName:"toPort" type:"integer"` - - // One or more security group and AWS account ID pairs. - UserIdGroupPairs []*UserIdGroupPair `locationName:"groups" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s IpPermission) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IpPermission) GoString() string { - return s.String() -} - -// SetFromPort sets the FromPort field's value. -func (s *IpPermission) SetFromPort(v int64) *IpPermission { - s.FromPort = &v - return s -} - -// SetIpProtocol sets the IpProtocol field's value. -func (s *IpPermission) SetIpProtocol(v string) *IpPermission { - s.IpProtocol = &v - return s -} - -// SetIpRanges sets the IpRanges field's value. -func (s *IpPermission) SetIpRanges(v []*IpRange) *IpPermission { - s.IpRanges = v - return s -} - -// SetIpv6Ranges sets the Ipv6Ranges field's value. -func (s *IpPermission) SetIpv6Ranges(v []*Ipv6Range) *IpPermission { - s.Ipv6Ranges = v - return s -} - -// SetPrefixListIds sets the PrefixListIds field's value. -func (s *IpPermission) SetPrefixListIds(v []*PrefixListId) *IpPermission { - s.PrefixListIds = v - return s -} - -// SetToPort sets the ToPort field's value. -func (s *IpPermission) SetToPort(v int64) *IpPermission { - s.ToPort = &v - return s -} - -// SetUserIdGroupPairs sets the UserIdGroupPairs field's value. -func (s *IpPermission) SetUserIdGroupPairs(v []*UserIdGroupPair) *IpPermission { - s.UserIdGroupPairs = v - return s -} - -// Describes an IPv4 range. -type IpRange struct { - _ struct{} `type:"structure"` - - // The IPv4 CIDR range. You can either specify a CIDR range or a source security - // group, not both. To specify a single IPv4 address, use the /32 prefix length. - CidrIp *string `locationName:"cidrIp" type:"string"` - - // A description for the security group rule that references this IPv4 address - // range. - // - // Constraints: Up to 255 characters in length. Allowed characters are a-z, - // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$* - Description *string `locationName:"description" type:"string"` -} - -// String returns the string representation -func (s IpRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IpRange) GoString() string { - return s.String() -} - -// SetCidrIp sets the CidrIp field's value. -func (s *IpRange) SetCidrIp(v string) *IpRange { - s.CidrIp = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *IpRange) SetDescription(v string) *IpRange { - s.Description = &v - return s -} - -// Describes an IPv6 CIDR block. -type Ipv6CidrBlock struct { - _ struct{} `type:"structure"` - - // The IPv6 CIDR block. - Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` -} - -// String returns the string representation -func (s Ipv6CidrBlock) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Ipv6CidrBlock) GoString() string { - return s.String() -} - -// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. -func (s *Ipv6CidrBlock) SetIpv6CidrBlock(v string) *Ipv6CidrBlock { - s.Ipv6CidrBlock = &v - return s -} - -// [EC2-VPC only] Describes an IPv6 range. -type Ipv6Range struct { - _ struct{} `type:"structure"` - - // The IPv6 CIDR range. You can either specify a CIDR range or a source security - // group, not both. To specify a single IPv6 address, use the /128 prefix length. - CidrIpv6 *string `locationName:"cidrIpv6" type:"string"` - - // A description for the security group rule that references this IPv6 address - // range. - // - // Constraints: Up to 255 characters in length. Allowed characters are a-z, - // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$* - Description *string `locationName:"description" type:"string"` -} - -// String returns the string representation -func (s Ipv6Range) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Ipv6Range) GoString() string { - return s.String() -} - -// SetCidrIpv6 sets the CidrIpv6 field's value. -func (s *Ipv6Range) SetCidrIpv6(v string) *Ipv6Range { - s.CidrIpv6 = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Ipv6Range) SetDescription(v string) *Ipv6Range { - s.Description = &v - return s -} - -// Describes a key pair. -type KeyPairInfo struct { - _ struct{} `type:"structure"` - - // If you used CreateKeyPair to create the key pair, this is the SHA-1 digest - // of the DER encoded private key. If you used ImportKeyPair to provide AWS - // the public key, this is the MD5 public key fingerprint as specified in section - // 4 of RFC4716. - KeyFingerprint *string `locationName:"keyFingerprint" type:"string"` - - // The name of the key pair. - KeyName *string `locationName:"keyName" type:"string"` -} - -// String returns the string representation -func (s KeyPairInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KeyPairInfo) GoString() string { - return s.String() -} - -// SetKeyFingerprint sets the KeyFingerprint field's value. -func (s *KeyPairInfo) SetKeyFingerprint(v string) *KeyPairInfo { - s.KeyFingerprint = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *KeyPairInfo) SetKeyName(v string) *KeyPairInfo { - s.KeyName = &v - return s -} - -// Describes a launch permission. -type LaunchPermission struct { - _ struct{} `type:"structure"` - - // The name of the group. - Group *string `locationName:"group" type:"string" enum:"PermissionGroup"` - - // The AWS account ID. - UserId *string `locationName:"userId" type:"string"` -} - -// String returns the string representation -func (s LaunchPermission) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchPermission) GoString() string { - return s.String() -} - -// SetGroup sets the Group field's value. -func (s *LaunchPermission) SetGroup(v string) *LaunchPermission { - s.Group = &v - return s -} - -// SetUserId sets the UserId field's value. -func (s *LaunchPermission) SetUserId(v string) *LaunchPermission { - s.UserId = &v - return s -} - -// Describes a launch permission modification. -type LaunchPermissionModifications struct { - _ struct{} `type:"structure"` - - // The AWS account ID to add to the list of launch permissions for the AMI. - Add []*LaunchPermission `locationNameList:"item" type:"list"` - - // The AWS account ID to remove from the list of launch permissions for the - // AMI. - Remove []*LaunchPermission `locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s LaunchPermissionModifications) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchPermissionModifications) GoString() string { - return s.String() -} - -// SetAdd sets the Add field's value. -func (s *LaunchPermissionModifications) SetAdd(v []*LaunchPermission) *LaunchPermissionModifications { - s.Add = v - return s -} - -// SetRemove sets the Remove field's value. -func (s *LaunchPermissionModifications) SetRemove(v []*LaunchPermission) *LaunchPermissionModifications { - s.Remove = v - return s -} - -// Describes the launch specification for an instance. -type LaunchSpecification struct { - _ struct{} `type:"structure"` - - // Deprecated. - AddressingType *string `locationName:"addressingType" type:"string"` - - // One or more block device mapping entries. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` - - // Indicates whether the instance is optimized for EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal EBS I/O performance. This optimization isn't available - // with all instance types. Additional usage charges apply when using an EBS - // Optimized instance. - // - // Default: false - EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` - - // The IAM instance profile. - IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` - - // The ID of the AMI. - ImageId *string `locationName:"imageId" type:"string"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // The ID of the kernel. - KernelId *string `locationName:"kernelId" type:"string"` - - // The name of the key pair. - KeyName *string `locationName:"keyName" type:"string"` - - // Describes the monitoring of an instance. - Monitoring *RunInstancesMonitoringEnabled `locationName:"monitoring" type:"structure"` - - // One or more network interfaces. If you specify a network interface, you must - // specify subnet IDs and security group IDs using the network interface. - NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` - - // The placement information for the instance. - Placement *SpotPlacement `locationName:"placement" type:"structure"` - - // The ID of the RAM disk. - RamdiskId *string `locationName:"ramdiskId" type:"string"` - - // One or more security groups. When requesting instances in a VPC, you must - // specify the IDs of the security groups. When requesting instances in EC2-Classic, - // you can specify the names or the IDs of the security groups. - SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - - // The ID of the subnet in which to launch the instance. - SubnetId *string `locationName:"subnetId" type:"string"` - - // The Base64-encoded user data for the instance. - UserData *string `locationName:"userData" type:"string"` -} - -// String returns the string representation -func (s LaunchSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchSpecification) GoString() string { - return s.String() -} - -// SetAddressingType sets the AddressingType field's value. -func (s *LaunchSpecification) SetAddressingType(v string) *LaunchSpecification { - s.AddressingType = &v - return s -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *LaunchSpecification) SetBlockDeviceMappings(v []*BlockDeviceMapping) *LaunchSpecification { - s.BlockDeviceMappings = v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *LaunchSpecification) SetEbsOptimized(v bool) *LaunchSpecification { - s.EbsOptimized = &v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *LaunchSpecification) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *LaunchSpecification { - s.IamInstanceProfile = v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *LaunchSpecification) SetImageId(v string) *LaunchSpecification { - s.ImageId = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *LaunchSpecification) SetInstanceType(v string) *LaunchSpecification { - s.InstanceType = &v - return s -} - -// SetKernelId sets the KernelId field's value. -func (s *LaunchSpecification) SetKernelId(v string) *LaunchSpecification { - s.KernelId = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *LaunchSpecification) SetKeyName(v string) *LaunchSpecification { - s.KeyName = &v - return s -} - -// SetMonitoring sets the Monitoring field's value. -func (s *LaunchSpecification) SetMonitoring(v *RunInstancesMonitoringEnabled) *LaunchSpecification { - s.Monitoring = v - return s -} - -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *LaunchSpecification) SetNetworkInterfaces(v []*InstanceNetworkInterfaceSpecification) *LaunchSpecification { - s.NetworkInterfaces = v - return s -} - -// SetPlacement sets the Placement field's value. -func (s *LaunchSpecification) SetPlacement(v *SpotPlacement) *LaunchSpecification { - s.Placement = v - return s -} - -// SetRamdiskId sets the RamdiskId field's value. -func (s *LaunchSpecification) SetRamdiskId(v string) *LaunchSpecification { - s.RamdiskId = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *LaunchSpecification) SetSecurityGroups(v []*GroupIdentifier) *LaunchSpecification { - s.SecurityGroups = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *LaunchSpecification) SetSubnetId(v string) *LaunchSpecification { - s.SubnetId = &v - return s -} - -// SetUserData sets the UserData field's value. -func (s *LaunchSpecification) SetUserData(v string) *LaunchSpecification { - s.UserData = &v - return s -} - -// Describes a launch template. -type LaunchTemplate struct { - _ struct{} `type:"structure"` - - // The time launch template was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - - // The principal that created the launch template. - CreatedBy *string `locationName:"createdBy" type:"string"` - - // The version number of the default version of the launch template. - DefaultVersionNumber *int64 `locationName:"defaultVersionNumber" type:"long"` - - // The version number of the latest version of the launch template. - LatestVersionNumber *int64 `locationName:"latestVersionNumber" type:"long"` - - // The ID of the launch template. - LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` - - // The name of the launch template. - LaunchTemplateName *string `locationName:"launchTemplateName" min:"3" type:"string"` - - // The tags for the launch template. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s LaunchTemplate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplate) GoString() string { - return s.String() -} - -// SetCreateTime sets the CreateTime field's value. -func (s *LaunchTemplate) SetCreateTime(v time.Time) *LaunchTemplate { - s.CreateTime = &v - return s -} - -// SetCreatedBy sets the CreatedBy field's value. -func (s *LaunchTemplate) SetCreatedBy(v string) *LaunchTemplate { - s.CreatedBy = &v - return s -} - -// SetDefaultVersionNumber sets the DefaultVersionNumber field's value. -func (s *LaunchTemplate) SetDefaultVersionNumber(v int64) *LaunchTemplate { - s.DefaultVersionNumber = &v - return s -} - -// SetLatestVersionNumber sets the LatestVersionNumber field's value. -func (s *LaunchTemplate) SetLatestVersionNumber(v int64) *LaunchTemplate { - s.LatestVersionNumber = &v - return s -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *LaunchTemplate) SetLaunchTemplateId(v string) *LaunchTemplate { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *LaunchTemplate) SetLaunchTemplateName(v string) *LaunchTemplate { - s.LaunchTemplateName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *LaunchTemplate) SetTags(v []*Tag) *LaunchTemplate { - s.Tags = v - return s -} - -// Describes a launch template and overrides. -type LaunchTemplateAndOverridesResponse struct { - _ struct{} `type:"structure"` - - // The launch template. - LaunchTemplateSpecification *FleetLaunchTemplateSpecification `locationName:"launchTemplateSpecification" type:"structure"` - - // Any parameters that you specify override the same parameters in the launch - // template. - Overrides *FleetLaunchTemplateOverrides `locationName:"overrides" type:"structure"` -} - -// String returns the string representation -func (s LaunchTemplateAndOverridesResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateAndOverridesResponse) GoString() string { - return s.String() -} - -// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. -func (s *LaunchTemplateAndOverridesResponse) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecification) *LaunchTemplateAndOverridesResponse { - s.LaunchTemplateSpecification = v - return s -} - -// SetOverrides sets the Overrides field's value. -func (s *LaunchTemplateAndOverridesResponse) SetOverrides(v *FleetLaunchTemplateOverrides) *LaunchTemplateAndOverridesResponse { - s.Overrides = v - return s -} - -// Describes a block device mapping. -type LaunchTemplateBlockDeviceMapping struct { - _ struct{} `type:"structure"` - - // The device name. - DeviceName *string `locationName:"deviceName" type:"string"` - - // Information about the block device for an EBS volume. - Ebs *LaunchTemplateEbsBlockDevice `locationName:"ebs" type:"structure"` - - // Suppresses the specified device included in the block device mapping of the - // AMI. - NoDevice *string `locationName:"noDevice" type:"string"` - - // The virtual device name (ephemeralN). - VirtualName *string `locationName:"virtualName" type:"string"` -} - -// String returns the string representation -func (s LaunchTemplateBlockDeviceMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateBlockDeviceMapping) GoString() string { - return s.String() -} - -// SetDeviceName sets the DeviceName field's value. -func (s *LaunchTemplateBlockDeviceMapping) SetDeviceName(v string) *LaunchTemplateBlockDeviceMapping { - s.DeviceName = &v - return s -} - -// SetEbs sets the Ebs field's value. -func (s *LaunchTemplateBlockDeviceMapping) SetEbs(v *LaunchTemplateEbsBlockDevice) *LaunchTemplateBlockDeviceMapping { - s.Ebs = v - return s -} - -// SetNoDevice sets the NoDevice field's value. -func (s *LaunchTemplateBlockDeviceMapping) SetNoDevice(v string) *LaunchTemplateBlockDeviceMapping { - s.NoDevice = &v - return s -} - -// SetVirtualName sets the VirtualName field's value. -func (s *LaunchTemplateBlockDeviceMapping) SetVirtualName(v string) *LaunchTemplateBlockDeviceMapping { - s.VirtualName = &v - return s -} - -// Describes a block device mapping. -type LaunchTemplateBlockDeviceMappingRequest struct { - _ struct{} `type:"structure"` - - // The device name (for example, /dev/sdh or xvdh). - DeviceName *string `type:"string"` - - // Parameters used to automatically set up EBS volumes when the instance is - // launched. - Ebs *LaunchTemplateEbsBlockDeviceRequest `type:"structure"` - - // Suppresses the specified device included in the block device mapping of the - // AMI. - NoDevice *string `type:"string"` - - // The virtual device name (ephemeralN). Instance store volumes are numbered - // starting from 0. An instance type with 2 available instance store volumes - // can specify mappings for ephemeral0 and ephemeral1. The number of available - // instance store volumes depends on the instance type. After you connect to - // the instance, you must mount the volume. - VirtualName *string `type:"string"` -} - -// String returns the string representation -func (s LaunchTemplateBlockDeviceMappingRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateBlockDeviceMappingRequest) GoString() string { - return s.String() -} - -// SetDeviceName sets the DeviceName field's value. -func (s *LaunchTemplateBlockDeviceMappingRequest) SetDeviceName(v string) *LaunchTemplateBlockDeviceMappingRequest { - s.DeviceName = &v - return s -} - -// SetEbs sets the Ebs field's value. -func (s *LaunchTemplateBlockDeviceMappingRequest) SetEbs(v *LaunchTemplateEbsBlockDeviceRequest) *LaunchTemplateBlockDeviceMappingRequest { - s.Ebs = v - return s -} - -// SetNoDevice sets the NoDevice field's value. -func (s *LaunchTemplateBlockDeviceMappingRequest) SetNoDevice(v string) *LaunchTemplateBlockDeviceMappingRequest { - s.NoDevice = &v - return s -} - -// SetVirtualName sets the VirtualName field's value. -func (s *LaunchTemplateBlockDeviceMappingRequest) SetVirtualName(v string) *LaunchTemplateBlockDeviceMappingRequest { - s.VirtualName = &v - return s -} - -// Describes an instance's Capacity Reservation targeting option. You can specify -// only one option at a time. Use the CapacityReservationPreference parameter -// to configure the instance to run in On-Demand capacity or to run in any open -// Capacity Reservation that has matching attributes (instance type, platform, -// Availability Zone). Use the CapacityReservationTarget parameter to explicitly -// target a specific Capacity Reservation. -type LaunchTemplateCapacityReservationSpecificationRequest struct { - _ struct{} `type:"structure"` - - // Indicates the instance's Capacity Reservation preferences. Possible preferences - // include: - // - // * open - The instance can run in any open Capacity Reservation that has - // matching attributes (instance type, platform, Availability Zone). - // - // * none - The instance avoids running in a Capacity Reservation even if - // one is available. The instance runs in On-Demand capacity. - CapacityReservationPreference *string `type:"string" enum:"CapacityReservationPreference"` - - // Information about the target Capacity Reservation. - CapacityReservationTarget *CapacityReservationTarget `type:"structure"` -} - -// String returns the string representation -func (s LaunchTemplateCapacityReservationSpecificationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateCapacityReservationSpecificationRequest) GoString() string { - return s.String() -} - -// SetCapacityReservationPreference sets the CapacityReservationPreference field's value. -func (s *LaunchTemplateCapacityReservationSpecificationRequest) SetCapacityReservationPreference(v string) *LaunchTemplateCapacityReservationSpecificationRequest { - s.CapacityReservationPreference = &v - return s -} - -// SetCapacityReservationTarget sets the CapacityReservationTarget field's value. -func (s *LaunchTemplateCapacityReservationSpecificationRequest) SetCapacityReservationTarget(v *CapacityReservationTarget) *LaunchTemplateCapacityReservationSpecificationRequest { - s.CapacityReservationTarget = v - return s -} - -// Information about the Capacity Reservation targeting option. -type LaunchTemplateCapacityReservationSpecificationResponse struct { - _ struct{} `type:"structure"` - - // Indicates the instance's Capacity Reservation preferences. Possible preferences - // include: - // - // * open - The instance can run in any open Capacity Reservation that has - // matching attributes (instance type, platform, Availability Zone). - // - // * none - The instance avoids running in a Capacity Reservation even if - // one is available. The instance runs in On-Demand capacity. - CapacityReservationPreference *string `locationName:"capacityReservationPreference" type:"string" enum:"CapacityReservationPreference"` - - // Information about the target Capacity Reservation. - CapacityReservationTarget *CapacityReservationTargetResponse `locationName:"capacityReservationTarget" type:"structure"` -} - -// String returns the string representation -func (s LaunchTemplateCapacityReservationSpecificationResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateCapacityReservationSpecificationResponse) GoString() string { - return s.String() -} - -// SetCapacityReservationPreference sets the CapacityReservationPreference field's value. -func (s *LaunchTemplateCapacityReservationSpecificationResponse) SetCapacityReservationPreference(v string) *LaunchTemplateCapacityReservationSpecificationResponse { - s.CapacityReservationPreference = &v - return s -} - -// SetCapacityReservationTarget sets the CapacityReservationTarget field's value. -func (s *LaunchTemplateCapacityReservationSpecificationResponse) SetCapacityReservationTarget(v *CapacityReservationTargetResponse) *LaunchTemplateCapacityReservationSpecificationResponse { - s.CapacityReservationTarget = v - return s -} - -// Describes a launch template and overrides. -type LaunchTemplateConfig struct { - _ struct{} `type:"structure"` - - // The launch template. - LaunchTemplateSpecification *FleetLaunchTemplateSpecification `locationName:"launchTemplateSpecification" type:"structure"` - - // Any parameters that you specify override the same parameters in the launch - // template. - Overrides []*LaunchTemplateOverrides `locationName:"overrides" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s LaunchTemplateConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LaunchTemplateConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateConfig"} - if s.LaunchTemplateSpecification != nil { - if err := s.LaunchTemplateSpecification.Validate(); err != nil { - invalidParams.AddNested("LaunchTemplateSpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. -func (s *LaunchTemplateConfig) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecification) *LaunchTemplateConfig { - s.LaunchTemplateSpecification = v - return s -} - -// SetOverrides sets the Overrides field's value. -func (s *LaunchTemplateConfig) SetOverrides(v []*LaunchTemplateOverrides) *LaunchTemplateConfig { - s.Overrides = v - return s -} - -// The CPU options for the instance. -type LaunchTemplateCpuOptions struct { - _ struct{} `type:"structure"` - - // The number of CPU cores for the instance. - CoreCount *int64 `locationName:"coreCount" type:"integer"` - - // The number of threads per CPU core. - ThreadsPerCore *int64 `locationName:"threadsPerCore" type:"integer"` -} - -// String returns the string representation -func (s LaunchTemplateCpuOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateCpuOptions) GoString() string { - return s.String() -} - -// SetCoreCount sets the CoreCount field's value. -func (s *LaunchTemplateCpuOptions) SetCoreCount(v int64) *LaunchTemplateCpuOptions { - s.CoreCount = &v - return s -} - -// SetThreadsPerCore sets the ThreadsPerCore field's value. -func (s *LaunchTemplateCpuOptions) SetThreadsPerCore(v int64) *LaunchTemplateCpuOptions { - s.ThreadsPerCore = &v - return s -} - -// The CPU options for the instance. Both the core count and threads per core -// must be specified in the request. -type LaunchTemplateCpuOptionsRequest struct { - _ struct{} `type:"structure"` - - // The number of CPU cores for the instance. - CoreCount *int64 `type:"integer"` - - // The number of threads per CPU core. To disable Intel Hyper-Threading Technology - // for the instance, specify a value of 1. Otherwise, specify the default value - // of 2. - ThreadsPerCore *int64 `type:"integer"` -} - -// String returns the string representation -func (s LaunchTemplateCpuOptionsRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateCpuOptionsRequest) GoString() string { - return s.String() -} - -// SetCoreCount sets the CoreCount field's value. -func (s *LaunchTemplateCpuOptionsRequest) SetCoreCount(v int64) *LaunchTemplateCpuOptionsRequest { - s.CoreCount = &v - return s -} - -// SetThreadsPerCore sets the ThreadsPerCore field's value. -func (s *LaunchTemplateCpuOptionsRequest) SetThreadsPerCore(v int64) *LaunchTemplateCpuOptionsRequest { - s.ThreadsPerCore = &v - return s -} - -// Describes a block device for an EBS volume. -type LaunchTemplateEbsBlockDevice struct { - _ struct{} `type:"structure"` - - // Indicates whether the EBS volume is deleted on instance termination. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - - // Indicates whether the EBS volume is encrypted. - Encrypted *bool `locationName:"encrypted" type:"boolean"` - - // The number of I/O operations per second (IOPS) that the volume supports. - Iops *int64 `locationName:"iops" type:"integer"` - - // The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption. - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - - // The ID of the snapshot. - SnapshotId *string `locationName:"snapshotId" type:"string"` - - // The size of the volume, in GiB. - VolumeSize *int64 `locationName:"volumeSize" type:"integer"` - - // The volume type. - VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` -} - -// String returns the string representation -func (s LaunchTemplateEbsBlockDevice) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateEbsBlockDevice) GoString() string { - return s.String() -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *LaunchTemplateEbsBlockDevice) SetDeleteOnTermination(v bool) *LaunchTemplateEbsBlockDevice { - s.DeleteOnTermination = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *LaunchTemplateEbsBlockDevice) SetEncrypted(v bool) *LaunchTemplateEbsBlockDevice { - s.Encrypted = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *LaunchTemplateEbsBlockDevice) SetIops(v int64) *LaunchTemplateEbsBlockDevice { - s.Iops = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *LaunchTemplateEbsBlockDevice) SetKmsKeyId(v string) *LaunchTemplateEbsBlockDevice { - s.KmsKeyId = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *LaunchTemplateEbsBlockDevice) SetSnapshotId(v string) *LaunchTemplateEbsBlockDevice { - s.SnapshotId = &v - return s -} - -// SetVolumeSize sets the VolumeSize field's value. -func (s *LaunchTemplateEbsBlockDevice) SetVolumeSize(v int64) *LaunchTemplateEbsBlockDevice { - s.VolumeSize = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *LaunchTemplateEbsBlockDevice) SetVolumeType(v string) *LaunchTemplateEbsBlockDevice { - s.VolumeType = &v - return s -} - -// The parameters for a block device for an EBS volume. -type LaunchTemplateEbsBlockDeviceRequest struct { - _ struct{} `type:"structure"` - - // Indicates whether the EBS volume is deleted on instance termination. - DeleteOnTermination *bool `type:"boolean"` - - // Indicates whether the EBS volume is encrypted. Encrypted volumes can only - // be attached to instances that support Amazon EBS encryption. If you are creating - // a volume from a snapshot, you can't specify an encryption value. - Encrypted *bool `type:"boolean"` - - // The number of I/O operations per second (IOPS) that the volume supports. - // For io1, this represents the number of IOPS that are provisioned for the - // volume. For gp2, this represents the baseline performance of the volume and - // the rate at which the volume accumulates I/O credits for bursting. For more - // information about General Purpose SSD baseline performance, I/O credits, - // and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud - // User Guide. - // - // Condition: This parameter is required for requests to create io1 volumes; - // it is not used in requests to create gp2, st1, sc1, or standard volumes. - Iops *int64 `type:"integer"` - - // The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption. - KmsKeyId *string `type:"string"` - - // The ID of the snapshot. - SnapshotId *string `type:"string"` - - // The size of the volume, in GiB. - // - // Default: If you're creating the volume from a snapshot and don't specify - // a volume size, the default is the snapshot size. - VolumeSize *int64 `type:"integer"` - - // The volume type. - VolumeType *string `type:"string" enum:"VolumeType"` -} - -// String returns the string representation -func (s LaunchTemplateEbsBlockDeviceRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateEbsBlockDeviceRequest) GoString() string { - return s.String() -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *LaunchTemplateEbsBlockDeviceRequest) SetDeleteOnTermination(v bool) *LaunchTemplateEbsBlockDeviceRequest { - s.DeleteOnTermination = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *LaunchTemplateEbsBlockDeviceRequest) SetEncrypted(v bool) *LaunchTemplateEbsBlockDeviceRequest { - s.Encrypted = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *LaunchTemplateEbsBlockDeviceRequest) SetIops(v int64) *LaunchTemplateEbsBlockDeviceRequest { - s.Iops = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *LaunchTemplateEbsBlockDeviceRequest) SetKmsKeyId(v string) *LaunchTemplateEbsBlockDeviceRequest { - s.KmsKeyId = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *LaunchTemplateEbsBlockDeviceRequest) SetSnapshotId(v string) *LaunchTemplateEbsBlockDeviceRequest { - s.SnapshotId = &v - return s -} - -// SetVolumeSize sets the VolumeSize field's value. -func (s *LaunchTemplateEbsBlockDeviceRequest) SetVolumeSize(v int64) *LaunchTemplateEbsBlockDeviceRequest { - s.VolumeSize = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *LaunchTemplateEbsBlockDeviceRequest) SetVolumeType(v string) *LaunchTemplateEbsBlockDeviceRequest { - s.VolumeType = &v - return s -} - -// Describes an elastic inference accelerator. -type LaunchTemplateElasticInferenceAccelerator struct { - _ struct{} `type:"structure"` - - // The type of elastic inference accelerator. The possible values are eia1.medium, - // eia1.large, and eia1.xlarge. - // - // Type is a required field - Type *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s LaunchTemplateElasticInferenceAccelerator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateElasticInferenceAccelerator) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LaunchTemplateElasticInferenceAccelerator) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateElasticInferenceAccelerator"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetType sets the Type field's value. -func (s *LaunchTemplateElasticInferenceAccelerator) SetType(v string) *LaunchTemplateElasticInferenceAccelerator { - s.Type = &v - return s -} - -// Describes an elastic inference accelerator. -type LaunchTemplateElasticInferenceAcceleratorResponse struct { - _ struct{} `type:"structure"` - - // The type of elastic inference accelerator. The possible values are eia1.medium, - // eia1.large, and eia1.xlarge. - Type *string `locationName:"type" type:"string"` -} - -// String returns the string representation -func (s LaunchTemplateElasticInferenceAcceleratorResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateElasticInferenceAcceleratorResponse) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *LaunchTemplateElasticInferenceAcceleratorResponse) SetType(v string) *LaunchTemplateElasticInferenceAcceleratorResponse { - s.Type = &v - return s -} - -// Indicates whether an instance is configured for hibernation. -type LaunchTemplateHibernationOptions struct { - _ struct{} `type:"structure"` - - // If this parameter is set to true, the instance is enabled for hibernation; - // otherwise, it is not enabled for hibernation. - Configured *bool `locationName:"configured" type:"boolean"` -} - -// String returns the string representation -func (s LaunchTemplateHibernationOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateHibernationOptions) GoString() string { - return s.String() -} - -// SetConfigured sets the Configured field's value. -func (s *LaunchTemplateHibernationOptions) SetConfigured(v bool) *LaunchTemplateHibernationOptions { - s.Configured = &v - return s -} - -// Indicates whether the instance is configured for hibernation. This parameter -// is valid only if the instance meets the hibernation prerequisites (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). -// Hibernation is currently supported only for Amazon Linux. -type LaunchTemplateHibernationOptionsRequest struct { - _ struct{} `type:"structure"` - - // If you set this parameter to true, the instance is enabled for hibernation. - // - // Default: false - Configured *bool `type:"boolean"` -} - -// String returns the string representation -func (s LaunchTemplateHibernationOptionsRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateHibernationOptionsRequest) GoString() string { - return s.String() -} - -// SetConfigured sets the Configured field's value. -func (s *LaunchTemplateHibernationOptionsRequest) SetConfigured(v bool) *LaunchTemplateHibernationOptionsRequest { - s.Configured = &v - return s -} - -// Describes an IAM instance profile. -type LaunchTemplateIamInstanceProfileSpecification struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the instance profile. - Arn *string `locationName:"arn" type:"string"` - - // The name of the instance profile. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s LaunchTemplateIamInstanceProfileSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateIamInstanceProfileSpecification) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *LaunchTemplateIamInstanceProfileSpecification) SetArn(v string) *LaunchTemplateIamInstanceProfileSpecification { - s.Arn = &v - return s -} - -// SetName sets the Name field's value. -func (s *LaunchTemplateIamInstanceProfileSpecification) SetName(v string) *LaunchTemplateIamInstanceProfileSpecification { - s.Name = &v - return s -} - -// An IAM instance profile. -type LaunchTemplateIamInstanceProfileSpecificationRequest struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the instance profile. - Arn *string `type:"string"` - - // The name of the instance profile. - Name *string `type:"string"` -} - -// String returns the string representation -func (s LaunchTemplateIamInstanceProfileSpecificationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateIamInstanceProfileSpecificationRequest) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *LaunchTemplateIamInstanceProfileSpecificationRequest) SetArn(v string) *LaunchTemplateIamInstanceProfileSpecificationRequest { - s.Arn = &v - return s -} - -// SetName sets the Name field's value. -func (s *LaunchTemplateIamInstanceProfileSpecificationRequest) SetName(v string) *LaunchTemplateIamInstanceProfileSpecificationRequest { - s.Name = &v - return s -} - -// The market (purchasing) option for the instances. -type LaunchTemplateInstanceMarketOptions struct { - _ struct{} `type:"structure"` - - // The market type. - MarketType *string `locationName:"marketType" type:"string" enum:"MarketType"` - - // The options for Spot Instances. - SpotOptions *LaunchTemplateSpotMarketOptions `locationName:"spotOptions" type:"structure"` -} - -// String returns the string representation -func (s LaunchTemplateInstanceMarketOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateInstanceMarketOptions) GoString() string { - return s.String() -} - -// SetMarketType sets the MarketType field's value. -func (s *LaunchTemplateInstanceMarketOptions) SetMarketType(v string) *LaunchTemplateInstanceMarketOptions { - s.MarketType = &v - return s -} - -// SetSpotOptions sets the SpotOptions field's value. -func (s *LaunchTemplateInstanceMarketOptions) SetSpotOptions(v *LaunchTemplateSpotMarketOptions) *LaunchTemplateInstanceMarketOptions { - s.SpotOptions = v - return s -} - -// The market (purchasing) option for the instances. -type LaunchTemplateInstanceMarketOptionsRequest struct { - _ struct{} `type:"structure"` - - // The market type. - MarketType *string `type:"string" enum:"MarketType"` - - // The options for Spot Instances. - SpotOptions *LaunchTemplateSpotMarketOptionsRequest `type:"structure"` -} - -// String returns the string representation -func (s LaunchTemplateInstanceMarketOptionsRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateInstanceMarketOptionsRequest) GoString() string { - return s.String() -} - -// SetMarketType sets the MarketType field's value. -func (s *LaunchTemplateInstanceMarketOptionsRequest) SetMarketType(v string) *LaunchTemplateInstanceMarketOptionsRequest { - s.MarketType = &v - return s -} - -// SetSpotOptions sets the SpotOptions field's value. -func (s *LaunchTemplateInstanceMarketOptionsRequest) SetSpotOptions(v *LaunchTemplateSpotMarketOptionsRequest) *LaunchTemplateInstanceMarketOptionsRequest { - s.SpotOptions = v - return s -} - -// Describes a network interface. -type LaunchTemplateInstanceNetworkInterfaceSpecification struct { - _ struct{} `type:"structure"` - - // Indicates whether to associate a public IPv4 address with eth0 for a new - // network interface. - AssociatePublicIpAddress *bool `locationName:"associatePublicIpAddress" type:"boolean"` - - // Indicates whether the network interface is deleted when the instance is terminated. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - - // A description for the network interface. - Description *string `locationName:"description" type:"string"` - - // The device index for the network interface attachment. - DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"` - - // The IDs of one or more security groups. - Groups []*string `locationName:"groupSet" locationNameList:"groupId" type:"list"` - - // The number of IPv6 addresses for the network interface. - Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` - - // The IPv6 addresses for the network interface. - Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6AddressesSet" locationNameList:"item" type:"list"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // The primary private IPv4 address of the network interface. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // One or more private IPv4 addresses. - PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"` - - // The number of secondary private IPv4 addresses for the network interface. - SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` - - // The ID of the subnet for the network interface. - SubnetId *string `locationName:"subnetId" type:"string"` -} - -// String returns the string representation -func (s LaunchTemplateInstanceNetworkInterfaceSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateInstanceNetworkInterfaceSpecification) GoString() string { - return s.String() -} - -// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetAssociatePublicIpAddress(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.AssociatePublicIpAddress = &v - return s -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetDeleteOnTermination(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.DeleteOnTermination = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetDescription(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.Description = &v - return s -} - -// SetDeviceIndex sets the DeviceIndex field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetDeviceIndex(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.DeviceIndex = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetGroups(v []*string) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.Groups = v - return s -} - -// SetIpv6AddressCount sets the Ipv6AddressCount field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetIpv6AddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.Ipv6AddressCount = &v - return s -} - -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetIpv6Addresses(v []*InstanceIpv6Address) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.Ipv6Addresses = v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetNetworkInterfaceId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.NetworkInterfaceId = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetPrivateIpAddress(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.PrivateIpAddress = &v - return s -} - -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.PrivateIpAddresses = v - return s -} - -// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetSecondaryPrivateIpAddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.SecondaryPrivateIpAddressCount = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetSubnetId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.SubnetId = &v - return s -} - -// The parameters for a network interface. -type LaunchTemplateInstanceNetworkInterfaceSpecificationRequest struct { - _ struct{} `type:"structure"` - - // Associates a public IPv4 address with eth0 for a new network interface. - AssociatePublicIpAddress *bool `type:"boolean"` - - // Indicates whether the network interface is deleted when the instance is terminated. - DeleteOnTermination *bool `type:"boolean"` - - // A description for the network interface. - Description *string `type:"string"` - - // The device index for the network interface attachment. - DeviceIndex *int64 `type:"integer"` - - // The IDs of one or more security groups. - Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` - - // The number of IPv6 addresses to assign to a network interface. Amazon EC2 - // automatically selects the IPv6 addresses from the subnet range. You can't - // use this option if specifying specific IPv6 addresses. - Ipv6AddressCount *int64 `type:"integer"` - - // One or more specific IPv6 addresses from the IPv6 CIDR block range of your - // subnet. You can't use this option if you're specifying a number of IPv6 addresses. - Ipv6Addresses []*InstanceIpv6AddressRequest `locationNameList:"InstanceIpv6Address" type:"list"` - - // The ID of the network interface. - NetworkInterfaceId *string `type:"string"` - - // The primary private IPv4 address of the network interface. - PrivateIpAddress *string `type:"string"` - - // One or more private IPv4 addresses. - PrivateIpAddresses []*PrivateIpAddressSpecification `locationNameList:"item" type:"list"` - - // The number of secondary private IPv4 addresses to assign to a network interface. - SecondaryPrivateIpAddressCount *int64 `type:"integer"` - - // The ID of the subnet for the network interface. - SubnetId *string `type:"string"` -} - -// String returns the string representation -func (s LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) GoString() string { - return s.String() -} - -// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetAssociatePublicIpAddress(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.AssociatePublicIpAddress = &v - return s -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetDeleteOnTermination(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.DeleteOnTermination = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetDescription(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.Description = &v - return s -} - -// SetDeviceIndex sets the DeviceIndex field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetDeviceIndex(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.DeviceIndex = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetGroups(v []*string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.Groups = v - return s -} - -// SetIpv6AddressCount sets the Ipv6AddressCount field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetIpv6AddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.Ipv6AddressCount = &v - return s -} - -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetIpv6Addresses(v []*InstanceIpv6AddressRequest) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.Ipv6Addresses = v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetNetworkInterfaceId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.NetworkInterfaceId = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetPrivateIpAddress(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.PrivateIpAddress = &v - return s -} - -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.PrivateIpAddresses = v - return s -} - -// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetSecondaryPrivateIpAddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.SecondaryPrivateIpAddressCount = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetSubnetId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.SubnetId = &v - return s -} - -// Describes a license configuration. -type LaunchTemplateLicenseConfiguration struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the license configuration. - LicenseConfigurationArn *string `locationName:"licenseConfigurationArn" type:"string"` -} - -// String returns the string representation -func (s LaunchTemplateLicenseConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateLicenseConfiguration) GoString() string { - return s.String() -} - -// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. -func (s *LaunchTemplateLicenseConfiguration) SetLicenseConfigurationArn(v string) *LaunchTemplateLicenseConfiguration { - s.LicenseConfigurationArn = &v - return s -} - -// Describes a license configuration. -type LaunchTemplateLicenseConfigurationRequest struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the license configuration. - LicenseConfigurationArn *string `type:"string"` -} - -// String returns the string representation -func (s LaunchTemplateLicenseConfigurationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateLicenseConfigurationRequest) GoString() string { - return s.String() -} - -// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. -func (s *LaunchTemplateLicenseConfigurationRequest) SetLicenseConfigurationArn(v string) *LaunchTemplateLicenseConfigurationRequest { - s.LicenseConfigurationArn = &v - return s -} - -// Describes overrides for a launch template. -type LaunchTemplateOverrides struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which to launch the instances. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // The priority for the launch template override. If OnDemandAllocationStrategy - // is set to prioritized, Spot Fleet uses priority to determine which launch - // template override to use first in fulfilling On-Demand capacity. The highest - // priority is launched first. Valid values are whole numbers starting at 0. - // The lower the number, the higher the priority. If no number is set, the launch - // template override has the lowest priority. - Priority *float64 `locationName:"priority" type:"double"` - - // The maximum price per unit hour that you are willing to pay for a Spot Instance. - SpotPrice *string `locationName:"spotPrice" type:"string"` - - // The ID of the subnet in which to launch the instances. - SubnetId *string `locationName:"subnetId" type:"string"` - - // The number of units provided by the specified instance type. - WeightedCapacity *float64 `locationName:"weightedCapacity" type:"double"` -} - -// String returns the string representation -func (s LaunchTemplateOverrides) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateOverrides) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *LaunchTemplateOverrides) SetAvailabilityZone(v string) *LaunchTemplateOverrides { - s.AvailabilityZone = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *LaunchTemplateOverrides) SetInstanceType(v string) *LaunchTemplateOverrides { - s.InstanceType = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *LaunchTemplateOverrides) SetPriority(v float64) *LaunchTemplateOverrides { - s.Priority = &v - return s -} - -// SetSpotPrice sets the SpotPrice field's value. -func (s *LaunchTemplateOverrides) SetSpotPrice(v string) *LaunchTemplateOverrides { - s.SpotPrice = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *LaunchTemplateOverrides) SetSubnetId(v string) *LaunchTemplateOverrides { - s.SubnetId = &v - return s -} - -// SetWeightedCapacity sets the WeightedCapacity field's value. -func (s *LaunchTemplateOverrides) SetWeightedCapacity(v float64) *LaunchTemplateOverrides { - s.WeightedCapacity = &v - return s -} - -// Describes the placement of an instance. -type LaunchTemplatePlacement struct { - _ struct{} `type:"structure"` - - // The affinity setting for the instance on the Dedicated Host. - Affinity *string `locationName:"affinity" type:"string"` - - // The Availability Zone of the instance. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The name of the placement group for the instance. - GroupName *string `locationName:"groupName" type:"string"` - - // The ID of the Dedicated Host for the instance. - HostId *string `locationName:"hostId" type:"string"` - - // Reserved for future use. - SpreadDomain *string `locationName:"spreadDomain" type:"string"` - - // The tenancy of the instance (if the instance is running in a VPC). An instance - // with a tenancy of dedicated runs on single-tenant hardware. - Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"` -} - -// String returns the string representation -func (s LaunchTemplatePlacement) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplatePlacement) GoString() string { - return s.String() -} - -// SetAffinity sets the Affinity field's value. -func (s *LaunchTemplatePlacement) SetAffinity(v string) *LaunchTemplatePlacement { - s.Affinity = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *LaunchTemplatePlacement) SetAvailabilityZone(v string) *LaunchTemplatePlacement { - s.AvailabilityZone = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *LaunchTemplatePlacement) SetGroupName(v string) *LaunchTemplatePlacement { - s.GroupName = &v - return s -} - -// SetHostId sets the HostId field's value. -func (s *LaunchTemplatePlacement) SetHostId(v string) *LaunchTemplatePlacement { - s.HostId = &v - return s -} - -// SetSpreadDomain sets the SpreadDomain field's value. -func (s *LaunchTemplatePlacement) SetSpreadDomain(v string) *LaunchTemplatePlacement { - s.SpreadDomain = &v - return s -} - -// SetTenancy sets the Tenancy field's value. -func (s *LaunchTemplatePlacement) SetTenancy(v string) *LaunchTemplatePlacement { - s.Tenancy = &v - return s -} - -// Describes the placement of an instance. -type LaunchTemplatePlacementRequest struct { - _ struct{} `type:"structure"` - - // The affinity setting for an instance on a Dedicated Host. - Affinity *string `type:"string"` - - // The Availability Zone for the instance. - AvailabilityZone *string `type:"string"` - - // The name of the placement group for the instance. - GroupName *string `type:"string"` - - // The ID of the Dedicated Host for the instance. - HostId *string `type:"string"` - - // Reserved for future use. - SpreadDomain *string `type:"string"` - - // The tenancy of the instance (if the instance is running in a VPC). An instance - // with a tenancy of dedicated runs on single-tenant hardware. - Tenancy *string `type:"string" enum:"Tenancy"` -} - -// String returns the string representation -func (s LaunchTemplatePlacementRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplatePlacementRequest) GoString() string { - return s.String() -} - -// SetAffinity sets the Affinity field's value. -func (s *LaunchTemplatePlacementRequest) SetAffinity(v string) *LaunchTemplatePlacementRequest { - s.Affinity = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *LaunchTemplatePlacementRequest) SetAvailabilityZone(v string) *LaunchTemplatePlacementRequest { - s.AvailabilityZone = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *LaunchTemplatePlacementRequest) SetGroupName(v string) *LaunchTemplatePlacementRequest { - s.GroupName = &v - return s -} - -// SetHostId sets the HostId field's value. -func (s *LaunchTemplatePlacementRequest) SetHostId(v string) *LaunchTemplatePlacementRequest { - s.HostId = &v - return s -} - -// SetSpreadDomain sets the SpreadDomain field's value. -func (s *LaunchTemplatePlacementRequest) SetSpreadDomain(v string) *LaunchTemplatePlacementRequest { - s.SpreadDomain = &v - return s -} - -// SetTenancy sets the Tenancy field's value. -func (s *LaunchTemplatePlacementRequest) SetTenancy(v string) *LaunchTemplatePlacementRequest { - s.Tenancy = &v - return s -} - -// The launch template to use. You must specify either the launch template ID -// or launch template name in the request, but not both. -type LaunchTemplateSpecification struct { - _ struct{} `type:"structure"` - - // The ID of the launch template. - LaunchTemplateId *string `type:"string"` - - // The name of the launch template. - LaunchTemplateName *string `type:"string"` - - // The version number of the launch template. - // - // Default: The default version for the launch template. - Version *string `type:"string"` -} - -// String returns the string representation -func (s LaunchTemplateSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateSpecification) GoString() string { - return s.String() -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *LaunchTemplateSpecification) SetLaunchTemplateId(v string) *LaunchTemplateSpecification { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *LaunchTemplateSpecification) SetLaunchTemplateName(v string) *LaunchTemplateSpecification { - s.LaunchTemplateName = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *LaunchTemplateSpecification) SetVersion(v string) *LaunchTemplateSpecification { - s.Version = &v - return s -} - -// The options for Spot Instances. -type LaunchTemplateSpotMarketOptions struct { - _ struct{} `type:"structure"` - - // The required duration for the Spot Instances (also known as Spot blocks), - // in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, - // or 360). - BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` - - // The behavior when a Spot Instance is interrupted. - InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"` - - // The maximum hourly price you're willing to pay for the Spot Instances. - MaxPrice *string `locationName:"maxPrice" type:"string"` - - // The Spot Instance request type. - SpotInstanceType *string `locationName:"spotInstanceType" type:"string" enum:"SpotInstanceType"` - - // The end date of the request. For a one-time request, the request remains - // active until all instances launch, the request is canceled, or this date - // is reached. If the request is persistent, it remains active until it is canceled - // or this date and time is reached. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` -} - -// String returns the string representation -func (s LaunchTemplateSpotMarketOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateSpotMarketOptions) GoString() string { - return s.String() -} - -// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. -func (s *LaunchTemplateSpotMarketOptions) SetBlockDurationMinutes(v int64) *LaunchTemplateSpotMarketOptions { - s.BlockDurationMinutes = &v - return s -} - -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *LaunchTemplateSpotMarketOptions) SetInstanceInterruptionBehavior(v string) *LaunchTemplateSpotMarketOptions { - s.InstanceInterruptionBehavior = &v - return s -} - -// SetMaxPrice sets the MaxPrice field's value. -func (s *LaunchTemplateSpotMarketOptions) SetMaxPrice(v string) *LaunchTemplateSpotMarketOptions { - s.MaxPrice = &v - return s -} - -// SetSpotInstanceType sets the SpotInstanceType field's value. -func (s *LaunchTemplateSpotMarketOptions) SetSpotInstanceType(v string) *LaunchTemplateSpotMarketOptions { - s.SpotInstanceType = &v - return s -} - -// SetValidUntil sets the ValidUntil field's value. -func (s *LaunchTemplateSpotMarketOptions) SetValidUntil(v time.Time) *LaunchTemplateSpotMarketOptions { - s.ValidUntil = &v - return s -} - -// The options for Spot Instances. -type LaunchTemplateSpotMarketOptionsRequest struct { - _ struct{} `type:"structure"` - - // The required duration for the Spot Instances (also known as Spot blocks), - // in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, - // or 360). - BlockDurationMinutes *int64 `type:"integer"` - - // The behavior when a Spot Instance is interrupted. The default is terminate. - InstanceInterruptionBehavior *string `type:"string" enum:"InstanceInterruptionBehavior"` - - // The maximum hourly price you're willing to pay for the Spot Instances. - MaxPrice *string `type:"string"` - - // The Spot Instance request type. - SpotInstanceType *string `type:"string" enum:"SpotInstanceType"` - - // The end date of the request. For a one-time request, the request remains - // active until all instances launch, the request is canceled, or this date - // is reached. If the request is persistent, it remains active until it is canceled - // or this date and time is reached. The default end date is 7 days from the - // current date. - ValidUntil *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s LaunchTemplateSpotMarketOptionsRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateSpotMarketOptionsRequest) GoString() string { - return s.String() -} - -// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. -func (s *LaunchTemplateSpotMarketOptionsRequest) SetBlockDurationMinutes(v int64) *LaunchTemplateSpotMarketOptionsRequest { - s.BlockDurationMinutes = &v - return s -} - -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *LaunchTemplateSpotMarketOptionsRequest) SetInstanceInterruptionBehavior(v string) *LaunchTemplateSpotMarketOptionsRequest { - s.InstanceInterruptionBehavior = &v - return s -} - -// SetMaxPrice sets the MaxPrice field's value. -func (s *LaunchTemplateSpotMarketOptionsRequest) SetMaxPrice(v string) *LaunchTemplateSpotMarketOptionsRequest { - s.MaxPrice = &v - return s -} - -// SetSpotInstanceType sets the SpotInstanceType field's value. -func (s *LaunchTemplateSpotMarketOptionsRequest) SetSpotInstanceType(v string) *LaunchTemplateSpotMarketOptionsRequest { - s.SpotInstanceType = &v - return s -} - -// SetValidUntil sets the ValidUntil field's value. -func (s *LaunchTemplateSpotMarketOptionsRequest) SetValidUntil(v time.Time) *LaunchTemplateSpotMarketOptionsRequest { - s.ValidUntil = &v - return s -} - -// The tag specification for the launch template. -type LaunchTemplateTagSpecification struct { - _ struct{} `type:"structure"` - - // The type of resource. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The tags for the resource. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s LaunchTemplateTagSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateTagSpecification) GoString() string { - return s.String() -} - -// SetResourceType sets the ResourceType field's value. -func (s *LaunchTemplateTagSpecification) SetResourceType(v string) *LaunchTemplateTagSpecification { - s.ResourceType = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *LaunchTemplateTagSpecification) SetTags(v []*Tag) *LaunchTemplateTagSpecification { - s.Tags = v - return s -} - -// The tags specification for the launch template. -type LaunchTemplateTagSpecificationRequest struct { - _ struct{} `type:"structure"` - - // The type of resource to tag. Currently, the resource types that support tagging - // on creation are instance and volume. To tag a resource after it has been - // created, see CreateTags. - ResourceType *string `type:"string" enum:"ResourceType"` - - // The tags to apply to the resource. - Tags []*Tag `locationName:"Tag" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s LaunchTemplateTagSpecificationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateTagSpecificationRequest) GoString() string { - return s.String() -} - -// SetResourceType sets the ResourceType field's value. -func (s *LaunchTemplateTagSpecificationRequest) SetResourceType(v string) *LaunchTemplateTagSpecificationRequest { - s.ResourceType = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *LaunchTemplateTagSpecificationRequest) SetTags(v []*Tag) *LaunchTemplateTagSpecificationRequest { - s.Tags = v - return s -} - -// Describes a launch template version. -type LaunchTemplateVersion struct { - _ struct{} `type:"structure"` - - // The time the version was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - - // The principal that created the version. - CreatedBy *string `locationName:"createdBy" type:"string"` - - // Indicates whether the version is the default version. - DefaultVersion *bool `locationName:"defaultVersion" type:"boolean"` - - // Information about the launch template. - LaunchTemplateData *ResponseLaunchTemplateData `locationName:"launchTemplateData" type:"structure"` - - // The ID of the launch template. - LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` - - // The name of the launch template. - LaunchTemplateName *string `locationName:"launchTemplateName" min:"3" type:"string"` - - // The description for the version. - VersionDescription *string `locationName:"versionDescription" type:"string"` - - // The version number. - VersionNumber *int64 `locationName:"versionNumber" type:"long"` -} - -// String returns the string representation -func (s LaunchTemplateVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplateVersion) GoString() string { - return s.String() -} - -// SetCreateTime sets the CreateTime field's value. -func (s *LaunchTemplateVersion) SetCreateTime(v time.Time) *LaunchTemplateVersion { - s.CreateTime = &v - return s -} - -// SetCreatedBy sets the CreatedBy field's value. -func (s *LaunchTemplateVersion) SetCreatedBy(v string) *LaunchTemplateVersion { - s.CreatedBy = &v - return s -} - -// SetDefaultVersion sets the DefaultVersion field's value. -func (s *LaunchTemplateVersion) SetDefaultVersion(v bool) *LaunchTemplateVersion { - s.DefaultVersion = &v - return s -} - -// SetLaunchTemplateData sets the LaunchTemplateData field's value. -func (s *LaunchTemplateVersion) SetLaunchTemplateData(v *ResponseLaunchTemplateData) *LaunchTemplateVersion { - s.LaunchTemplateData = v - return s -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *LaunchTemplateVersion) SetLaunchTemplateId(v string) *LaunchTemplateVersion { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *LaunchTemplateVersion) SetLaunchTemplateName(v string) *LaunchTemplateVersion { - s.LaunchTemplateName = &v - return s -} - -// SetVersionDescription sets the VersionDescription field's value. -func (s *LaunchTemplateVersion) SetVersionDescription(v string) *LaunchTemplateVersion { - s.VersionDescription = &v - return s -} - -// SetVersionNumber sets the VersionNumber field's value. -func (s *LaunchTemplateVersion) SetVersionNumber(v int64) *LaunchTemplateVersion { - s.VersionNumber = &v - return s -} - -// Describes the monitoring for the instance. -type LaunchTemplatesMonitoring struct { - _ struct{} `type:"structure"` - - // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring - // is enabled. - Enabled *bool `locationName:"enabled" type:"boolean"` -} - -// String returns the string representation -func (s LaunchTemplatesMonitoring) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplatesMonitoring) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *LaunchTemplatesMonitoring) SetEnabled(v bool) *LaunchTemplatesMonitoring { - s.Enabled = &v - return s -} - -// Describes the monitoring for the instance. -type LaunchTemplatesMonitoringRequest struct { - _ struct{} `type:"structure"` - - // Specify true to enable detailed monitoring. Otherwise, basic monitoring is - // enabled. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s LaunchTemplatesMonitoringRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplatesMonitoringRequest) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *LaunchTemplatesMonitoringRequest) SetEnabled(v bool) *LaunchTemplatesMonitoringRequest { - s.Enabled = &v - return s -} - -// Describes a license configuration. -type LicenseConfiguration struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the license configuration. - LicenseConfigurationArn *string `locationName:"licenseConfigurationArn" type:"string"` -} - -// String returns the string representation -func (s LicenseConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LicenseConfiguration) GoString() string { - return s.String() -} - -// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. -func (s *LicenseConfiguration) SetLicenseConfigurationArn(v string) *LicenseConfiguration { - s.LicenseConfigurationArn = &v - return s -} - -// Describes a license configuration. -type LicenseConfigurationRequest struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the license configuration. - LicenseConfigurationArn *string `type:"string"` -} - -// String returns the string representation -func (s LicenseConfigurationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LicenseConfigurationRequest) GoString() string { - return s.String() -} - -// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. -func (s *LicenseConfigurationRequest) SetLicenseConfigurationArn(v string) *LicenseConfigurationRequest { - s.LicenseConfigurationArn = &v - return s -} - -// Describes the Classic Load Balancers and target groups to attach to a Spot -// Fleet request. -type LoadBalancersConfig struct { - _ struct{} `type:"structure"` - - // The Classic Load Balancers. - ClassicLoadBalancersConfig *ClassicLoadBalancersConfig `locationName:"classicLoadBalancersConfig" type:"structure"` - - // The target groups. - TargetGroupsConfig *TargetGroupsConfig `locationName:"targetGroupsConfig" type:"structure"` -} - -// String returns the string representation -func (s LoadBalancersConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancersConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LoadBalancersConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LoadBalancersConfig"} - if s.ClassicLoadBalancersConfig != nil { - if err := s.ClassicLoadBalancersConfig.Validate(); err != nil { - invalidParams.AddNested("ClassicLoadBalancersConfig", err.(request.ErrInvalidParams)) - } - } - if s.TargetGroupsConfig != nil { - if err := s.TargetGroupsConfig.Validate(); err != nil { - invalidParams.AddNested("TargetGroupsConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClassicLoadBalancersConfig sets the ClassicLoadBalancersConfig field's value. -func (s *LoadBalancersConfig) SetClassicLoadBalancersConfig(v *ClassicLoadBalancersConfig) *LoadBalancersConfig { - s.ClassicLoadBalancersConfig = v - return s -} - -// SetTargetGroupsConfig sets the TargetGroupsConfig field's value. -func (s *LoadBalancersConfig) SetTargetGroupsConfig(v *TargetGroupsConfig) *LoadBalancersConfig { - s.TargetGroupsConfig = v - return s -} - -// Describes a load permission. -type LoadPermission struct { - _ struct{} `type:"structure"` - - // The name of the group. - Group *string `locationName:"group" type:"string" enum:"PermissionGroup"` - - // The AWS account ID. - UserId *string `locationName:"userId" type:"string"` -} - -// String returns the string representation -func (s LoadPermission) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadPermission) GoString() string { - return s.String() -} - -// SetGroup sets the Group field's value. -func (s *LoadPermission) SetGroup(v string) *LoadPermission { - s.Group = &v - return s -} - -// SetUserId sets the UserId field's value. -func (s *LoadPermission) SetUserId(v string) *LoadPermission { - s.UserId = &v - return s -} - -// Describes modifications to the load permissions of an Amazon FPGA image (AFI). -type LoadPermissionModifications struct { - _ struct{} `type:"structure"` - - // The load permissions to add. - Add []*LoadPermissionRequest `locationNameList:"item" type:"list"` - - // The load permissions to remove. - Remove []*LoadPermissionRequest `locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s LoadPermissionModifications) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadPermissionModifications) GoString() string { - return s.String() -} - -// SetAdd sets the Add field's value. -func (s *LoadPermissionModifications) SetAdd(v []*LoadPermissionRequest) *LoadPermissionModifications { - s.Add = v - return s -} - -// SetRemove sets the Remove field's value. -func (s *LoadPermissionModifications) SetRemove(v []*LoadPermissionRequest) *LoadPermissionModifications { - s.Remove = v - return s -} - -// Describes a load permission. -type LoadPermissionRequest struct { - _ struct{} `type:"structure"` - - // The name of the group. - Group *string `type:"string" enum:"PermissionGroup"` - - // The AWS account ID. - UserId *string `type:"string"` -} - -// String returns the string representation -func (s LoadPermissionRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadPermissionRequest) GoString() string { - return s.String() -} - -// SetGroup sets the Group field's value. -func (s *LoadPermissionRequest) SetGroup(v string) *LoadPermissionRequest { - s.Group = &v - return s -} - -// SetUserId sets the UserId field's value. -func (s *LoadPermissionRequest) SetUserId(v string) *LoadPermissionRequest { - s.UserId = &v - return s -} - -type ModifyCapacityReservationInput struct { - _ struct{} `type:"structure"` - - // The ID of the Capacity Reservation. - // - // CapacityReservationId is a required field - CapacityReservationId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The date and time at which the Capacity Reservation expires. When a Capacity - // Reservation expires, the reserved capacity is released and you can no longer - // launch instances into it. The Capacity Reservation's state changes to expired - // when it reaches its end date and time. - // - // The Capacity Reservation is cancelled within an hour from the specified time. - // For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation - // is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019. - // - // You must provide an EndDate value if EndDateType is limited. Omit EndDate - // if EndDateType is unlimited. - EndDate *time.Time `type:"timestamp"` - - // Indicates the way in which the Capacity Reservation ends. A Capacity Reservation - // can have one of the following end types: - // - // * unlimited - The Capacity Reservation remains active until you explicitly - // cancel it. Do not provide an EndDate value if EndDateType is unlimited. - // - // * limited - The Capacity Reservation expires automatically at a specified - // date and time. You must provide an EndDate value if EndDateType is limited. - EndDateType *string `type:"string" enum:"EndDateType"` - - // The number of instances for which to reserve capacity. - InstanceCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s ModifyCapacityReservationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyCapacityReservationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyCapacityReservationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyCapacityReservationInput"} - if s.CapacityReservationId == nil { - invalidParams.Add(request.NewErrParamRequired("CapacityReservationId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCapacityReservationId sets the CapacityReservationId field's value. -func (s *ModifyCapacityReservationInput) SetCapacityReservationId(v string) *ModifyCapacityReservationInput { - s.CapacityReservationId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyCapacityReservationInput) SetDryRun(v bool) *ModifyCapacityReservationInput { - s.DryRun = &v - return s -} - -// SetEndDate sets the EndDate field's value. -func (s *ModifyCapacityReservationInput) SetEndDate(v time.Time) *ModifyCapacityReservationInput { - s.EndDate = &v - return s -} - -// SetEndDateType sets the EndDateType field's value. -func (s *ModifyCapacityReservationInput) SetEndDateType(v string) *ModifyCapacityReservationInput { - s.EndDateType = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *ModifyCapacityReservationInput) SetInstanceCount(v int64) *ModifyCapacityReservationInput { - s.InstanceCount = &v - return s -} - -type ModifyCapacityReservationOutput struct { - _ struct{} `type:"structure"` - - // Information about the Capacity Reservation. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s ModifyCapacityReservationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyCapacityReservationOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *ModifyCapacityReservationOutput) SetReturn(v bool) *ModifyCapacityReservationOutput { - s.Return = &v - return s -} - -type ModifyClientVpnEndpointInput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint to modify. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // Information about the client connection logging options. - // - // If you enable client connection logging, data about client connections is - // sent to a Cloudwatch Logs log stream. The following information is logged: - // - // * Client connection requests - // - // * Client connection results (successful and unsuccessful) - // - // * Reasons for unsuccessful client connection requests - // - // * Client connection termination time - ConnectionLogOptions *ConnectionLogOptions `type:"structure"` - - // A brief description of the Client VPN endpoint. - Description *string `type:"string"` - - // Information about the DNS servers to be used by Client VPN connections. A - // Client VPN endpoint can have up to two DNS servers. - DnsServers *DnsServersOptionsModifyStructure `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ARN of the server certificate to be used. The server certificate must - // be provisioned in AWS Certificate Manager (ACM). - ServerCertificateArn *string `type:"string"` -} - -// String returns the string representation -func (s ModifyClientVpnEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClientVpnEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyClientVpnEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyClientVpnEndpointInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *ModifyClientVpnEndpointInput) SetClientVpnEndpointId(v string) *ModifyClientVpnEndpointInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetConnectionLogOptions sets the ConnectionLogOptions field's value. -func (s *ModifyClientVpnEndpointInput) SetConnectionLogOptions(v *ConnectionLogOptions) *ModifyClientVpnEndpointInput { - s.ConnectionLogOptions = v - return s -} - -// SetDescription sets the Description field's value. -func (s *ModifyClientVpnEndpointInput) SetDescription(v string) *ModifyClientVpnEndpointInput { - s.Description = &v - return s -} - -// SetDnsServers sets the DnsServers field's value. -func (s *ModifyClientVpnEndpointInput) SetDnsServers(v *DnsServersOptionsModifyStructure) *ModifyClientVpnEndpointInput { - s.DnsServers = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyClientVpnEndpointInput) SetDryRun(v bool) *ModifyClientVpnEndpointInput { - s.DryRun = &v - return s -} - -// SetServerCertificateArn sets the ServerCertificateArn field's value. -func (s *ModifyClientVpnEndpointInput) SetServerCertificateArn(v string) *ModifyClientVpnEndpointInput { - s.ServerCertificateArn = &v - return s -} - -type ModifyClientVpnEndpointOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s ModifyClientVpnEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClientVpnEndpointOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *ModifyClientVpnEndpointOutput) SetReturn(v bool) *ModifyClientVpnEndpointOutput { - s.Return = &v - return s -} - -type ModifyFleetInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // Indicates whether running instances should be terminated if the total target - // capacity of the EC2 Fleet is decreased below the current size of the EC2 - // Fleet. - ExcessCapacityTerminationPolicy *string `type:"string" enum:"FleetExcessCapacityTerminationPolicy"` - - // The ID of the EC2 Fleet. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // The size of the EC2 Fleet. - // - // TargetCapacitySpecification is a required field - TargetCapacitySpecification *TargetCapacitySpecificationRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ModifyFleetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyFleetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyFleetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyFleetInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.TargetCapacitySpecification == nil { - invalidParams.Add(request.NewErrParamRequired("TargetCapacitySpecification")) - } - if s.TargetCapacitySpecification != nil { - if err := s.TargetCapacitySpecification.Validate(); err != nil { - invalidParams.AddNested("TargetCapacitySpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyFleetInput) SetDryRun(v bool) *ModifyFleetInput { - s.DryRun = &v - return s -} - -// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. -func (s *ModifyFleetInput) SetExcessCapacityTerminationPolicy(v string) *ModifyFleetInput { - s.ExcessCapacityTerminationPolicy = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *ModifyFleetInput) SetFleetId(v string) *ModifyFleetInput { - s.FleetId = &v - return s -} - -// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. -func (s *ModifyFleetInput) SetTargetCapacitySpecification(v *TargetCapacitySpecificationRequest) *ModifyFleetInput { - s.TargetCapacitySpecification = v - return s -} - -type ModifyFleetOutput struct { - _ struct{} `type:"structure"` - - // Is true if the request succeeds, and an error otherwise. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s ModifyFleetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyFleetOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *ModifyFleetOutput) SetReturn(v bool) *ModifyFleetOutput { - s.Return = &v - return s -} - -type ModifyFpgaImageAttributeInput struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - Attribute *string `type:"string" enum:"FpgaImageAttributeName"` - - // A description for the AFI. - Description *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the AFI. - // - // FpgaImageId is a required field - FpgaImageId *string `type:"string" required:"true"` - - // The load permission for the AFI. - LoadPermission *LoadPermissionModifications `type:"structure"` - - // A name for the AFI. - Name *string `type:"string"` - - // The operation type. - OperationType *string `type:"string" enum:"OperationType"` - - // One or more product codes. After you add a product code to an AFI, it can't - // be removed. This parameter is valid only when modifying the productCodes - // attribute. - ProductCodes []*string `locationName:"ProductCode" locationNameList:"ProductCode" type:"list"` - - // One or more user groups. This parameter is valid only when modifying the - // loadPermission attribute. - UserGroups []*string `locationName:"UserGroup" locationNameList:"UserGroup" type:"list"` - - // One or more AWS account IDs. This parameter is valid only when modifying - // the loadPermission attribute. - UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` -} - -// String returns the string representation -func (s ModifyFpgaImageAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyFpgaImageAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyFpgaImageAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyFpgaImageAttributeInput"} - if s.FpgaImageId == nil { - invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *ModifyFpgaImageAttributeInput) SetAttribute(v string) *ModifyFpgaImageAttributeInput { - s.Attribute = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ModifyFpgaImageAttributeInput) SetDescription(v string) *ModifyFpgaImageAttributeInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyFpgaImageAttributeInput) SetDryRun(v bool) *ModifyFpgaImageAttributeInput { - s.DryRun = &v - return s -} - -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *ModifyFpgaImageAttributeInput) SetFpgaImageId(v string) *ModifyFpgaImageAttributeInput { - s.FpgaImageId = &v - return s -} - -// SetLoadPermission sets the LoadPermission field's value. -func (s *ModifyFpgaImageAttributeInput) SetLoadPermission(v *LoadPermissionModifications) *ModifyFpgaImageAttributeInput { - s.LoadPermission = v - return s -} - -// SetName sets the Name field's value. -func (s *ModifyFpgaImageAttributeInput) SetName(v string) *ModifyFpgaImageAttributeInput { - s.Name = &v - return s -} - -// SetOperationType sets the OperationType field's value. -func (s *ModifyFpgaImageAttributeInput) SetOperationType(v string) *ModifyFpgaImageAttributeInput { - s.OperationType = &v - return s -} - -// SetProductCodes sets the ProductCodes field's value. -func (s *ModifyFpgaImageAttributeInput) SetProductCodes(v []*string) *ModifyFpgaImageAttributeInput { - s.ProductCodes = v - return s -} - -// SetUserGroups sets the UserGroups field's value. -func (s *ModifyFpgaImageAttributeInput) SetUserGroups(v []*string) *ModifyFpgaImageAttributeInput { - s.UserGroups = v - return s -} - -// SetUserIds sets the UserIds field's value. -func (s *ModifyFpgaImageAttributeInput) SetUserIds(v []*string) *ModifyFpgaImageAttributeInput { - s.UserIds = v - return s -} - -type ModifyFpgaImageAttributeOutput struct { - _ struct{} `type:"structure"` - - // Information about the attribute. - FpgaImageAttribute *FpgaImageAttribute `locationName:"fpgaImageAttribute" type:"structure"` -} - -// String returns the string representation -func (s ModifyFpgaImageAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyFpgaImageAttributeOutput) GoString() string { - return s.String() -} - -// SetFpgaImageAttribute sets the FpgaImageAttribute field's value. -func (s *ModifyFpgaImageAttributeOutput) SetFpgaImageAttribute(v *FpgaImageAttribute) *ModifyFpgaImageAttributeOutput { - s.FpgaImageAttribute = v - return s -} - -type ModifyHostsInput struct { - _ struct{} `type:"structure"` - - // Specify whether to enable or disable auto-placement. - // - // AutoPlacement is a required field - AutoPlacement *string `locationName:"autoPlacement" type:"string" required:"true" enum:"AutoPlacement"` - - // The IDs of the Dedicated Hosts to modify. - // - // HostIds is a required field - HostIds []*string `locationName:"hostId" locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyHostsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyHostsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyHostsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyHostsInput"} - if s.AutoPlacement == nil { - invalidParams.Add(request.NewErrParamRequired("AutoPlacement")) - } - if s.HostIds == nil { - invalidParams.Add(request.NewErrParamRequired("HostIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoPlacement sets the AutoPlacement field's value. -func (s *ModifyHostsInput) SetAutoPlacement(v string) *ModifyHostsInput { - s.AutoPlacement = &v - return s -} - -// SetHostIds sets the HostIds field's value. -func (s *ModifyHostsInput) SetHostIds(v []*string) *ModifyHostsInput { - s.HostIds = v - return s -} - -type ModifyHostsOutput struct { - _ struct{} `type:"structure"` - - // The IDs of the Dedicated Hosts that were successfully modified. - Successful []*string `locationName:"successful" locationNameList:"item" type:"list"` - - // The IDs of the Dedicated Hosts that could not be modified. Check whether - // the setting you requested can be used. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s ModifyHostsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyHostsOutput) GoString() string { - return s.String() -} - -// SetSuccessful sets the Successful field's value. -func (s *ModifyHostsOutput) SetSuccessful(v []*string) *ModifyHostsOutput { - s.Successful = v - return s -} - -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *ModifyHostsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *ModifyHostsOutput { - s.Unsuccessful = v - return s -} - -type ModifyIdFormatInput struct { - _ struct{} `type:"structure"` - - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log - // | image | import-task | internet-gateway | network-acl | network-acl-association - // | network-interface | network-interface-attachment | prefix-list | route-table - // | route-table-association | security-group | subnet | subnet-cidr-block-association - // | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection - // | vpn-connection | vpn-gateway. - // - // Alternatively, use the all-current option to include all resource types that - // are currently within their opt-in period for longer IDs. - // - // Resource is a required field - Resource *string `type:"string" required:"true"` - - // Indicate whether the resource should use longer IDs (17-character IDs). - // - // UseLongIds is a required field - UseLongIds *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s ModifyIdFormatInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyIdFormatInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyIdFormatInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyIdFormatInput"} - if s.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - if s.UseLongIds == nil { - invalidParams.Add(request.NewErrParamRequired("UseLongIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResource sets the Resource field's value. -func (s *ModifyIdFormatInput) SetResource(v string) *ModifyIdFormatInput { - s.Resource = &v - return s -} - -// SetUseLongIds sets the UseLongIds field's value. -func (s *ModifyIdFormatInput) SetUseLongIds(v bool) *ModifyIdFormatInput { - s.UseLongIds = &v - return s -} - -type ModifyIdFormatOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyIdFormatOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyIdFormatOutput) GoString() string { - return s.String() -} - -type ModifyIdentityIdFormatInput struct { - _ struct{} `type:"structure"` - - // The ARN of the principal, which can be an IAM user, IAM role, or the root - // user. Specify all to modify the ID format for all IAM users, IAM roles, and - // the root user of the account. - // - // PrincipalArn is a required field - PrincipalArn *string `locationName:"principalArn" type:"string" required:"true"` - - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log - // | image | import-task | internet-gateway | network-acl | network-acl-association - // | network-interface | network-interface-attachment | prefix-list | route-table - // | route-table-association | security-group | subnet | subnet-cidr-block-association - // | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection - // | vpn-connection | vpn-gateway. - // - // Alternatively, use the all-current option to include all resource types that - // are currently within their opt-in period for longer IDs. - // - // Resource is a required field - Resource *string `locationName:"resource" type:"string" required:"true"` - - // Indicates whether the resource should use longer IDs (17-character IDs) - // - // UseLongIds is a required field - UseLongIds *bool `locationName:"useLongIds" type:"boolean" required:"true"` -} - -// String returns the string representation -func (s ModifyIdentityIdFormatInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyIdentityIdFormatInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyIdentityIdFormatInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyIdentityIdFormatInput"} - if s.PrincipalArn == nil { - invalidParams.Add(request.NewErrParamRequired("PrincipalArn")) - } - if s.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - if s.UseLongIds == nil { - invalidParams.Add(request.NewErrParamRequired("UseLongIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPrincipalArn sets the PrincipalArn field's value. -func (s *ModifyIdentityIdFormatInput) SetPrincipalArn(v string) *ModifyIdentityIdFormatInput { - s.PrincipalArn = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *ModifyIdentityIdFormatInput) SetResource(v string) *ModifyIdentityIdFormatInput { - s.Resource = &v - return s -} - -// SetUseLongIds sets the UseLongIds field's value. -func (s *ModifyIdentityIdFormatInput) SetUseLongIds(v bool) *ModifyIdentityIdFormatInput { - s.UseLongIds = &v - return s -} - -type ModifyIdentityIdFormatOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyIdentityIdFormatOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyIdentityIdFormatOutput) GoString() string { - return s.String() -} - -// Contains the parameters for ModifyImageAttribute. -type ModifyImageAttributeInput struct { - _ struct{} `type:"structure"` - - // The name of the attribute to modify. The valid values are description, launchPermission, - // and productCodes. - Attribute *string `type:"string"` - - // A new description for the AMI. - Description *AttributeValue `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the AMI. - // - // ImageId is a required field - ImageId *string `type:"string" required:"true"` - - // A new launch permission for the AMI. - LaunchPermission *LaunchPermissionModifications `type:"structure"` - - // The operation type. This parameter can be used only when the Attribute parameter - // is launchPermission. - OperationType *string `type:"string" enum:"OperationType"` - - // One or more DevPay product codes. After you add a product code to an AMI, - // it can't be removed. - ProductCodes []*string `locationName:"ProductCode" locationNameList:"ProductCode" type:"list"` - - // One or more user groups. This parameter can be used only when the Attribute - // parameter is launchPermission. - UserGroups []*string `locationName:"UserGroup" locationNameList:"UserGroup" type:"list"` - - // One or more AWS account IDs. This parameter can be used only when the Attribute - // parameter is launchPermission. - UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` - - // The value of the attribute being modified. This parameter can be used only - // when the Attribute parameter is description or productCodes. - Value *string `type:"string"` -} - -// String returns the string representation -func (s ModifyImageAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyImageAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyImageAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyImageAttributeInput"} - if s.ImageId == nil { - invalidParams.Add(request.NewErrParamRequired("ImageId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *ModifyImageAttributeInput) SetAttribute(v string) *ModifyImageAttributeInput { - s.Attribute = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ModifyImageAttributeInput) SetDescription(v *AttributeValue) *ModifyImageAttributeInput { - s.Description = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyImageAttributeInput) SetDryRun(v bool) *ModifyImageAttributeInput { - s.DryRun = &v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *ModifyImageAttributeInput) SetImageId(v string) *ModifyImageAttributeInput { - s.ImageId = &v - return s -} - -// SetLaunchPermission sets the LaunchPermission field's value. -func (s *ModifyImageAttributeInput) SetLaunchPermission(v *LaunchPermissionModifications) *ModifyImageAttributeInput { - s.LaunchPermission = v - return s -} - -// SetOperationType sets the OperationType field's value. -func (s *ModifyImageAttributeInput) SetOperationType(v string) *ModifyImageAttributeInput { - s.OperationType = &v - return s -} - -// SetProductCodes sets the ProductCodes field's value. -func (s *ModifyImageAttributeInput) SetProductCodes(v []*string) *ModifyImageAttributeInput { - s.ProductCodes = v - return s -} - -// SetUserGroups sets the UserGroups field's value. -func (s *ModifyImageAttributeInput) SetUserGroups(v []*string) *ModifyImageAttributeInput { - s.UserGroups = v - return s -} - -// SetUserIds sets the UserIds field's value. -func (s *ModifyImageAttributeInput) SetUserIds(v []*string) *ModifyImageAttributeInput { - s.UserIds = v - return s -} - -// SetValue sets the Value field's value. -func (s *ModifyImageAttributeInput) SetValue(v string) *ModifyImageAttributeInput { - s.Value = &v - return s -} - -type ModifyImageAttributeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyImageAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyImageAttributeOutput) GoString() string { - return s.String() -} - -type ModifyInstanceAttributeInput struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - Attribute *string `locationName:"attribute" type:"string" enum:"InstanceAttributeName"` - - // Modifies the DeleteOnTermination attribute for volumes that are currently - // attached. The volume must be owned by the caller. If no value is specified - // for DeleteOnTermination, the default is true and the volume is deleted when - // the instance is terminated. - // - // To add instance store volumes to an Amazon EBS-backed instance, you must - // add them when you launch the instance. For more information, see Updating - // the Block Device Mapping when Launching an Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM) - // in the Amazon Elastic Compute Cloud User Guide. - BlockDeviceMappings []*InstanceBlockDeviceMappingSpecification `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` - - // If the value is true, you can't terminate the instance using the Amazon EC2 - // console, CLI, or API; otherwise, you can. You cannot use this parameter for - // Spot Instances. - DisableApiTermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Specifies whether the instance is optimized for Amazon EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal EBS I/O performance. This optimization isn't available - // with all instance types. Additional usage charges apply when using an EBS - // Optimized instance. - EbsOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"` - - // Set to true to enable enhanced networking with ENA for the instance. - // - // This option is supported only for HVM instances. Specifying this option with - // a PV instance can make it unreachable. - EnaSupport *AttributeBooleanValue `locationName:"enaSupport" type:"structure"` - - // [EC2-VPC] Changes the security groups of the instance. You must specify at - // least one security group, even if it's just the default security group for - // the VPC. You must specify the security group ID, not the security group name. - Groups []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` - - // Specifies whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - InstanceInitiatedShutdownBehavior *AttributeValue `locationName:"instanceInitiatedShutdownBehavior" type:"structure"` - - // Changes the instance type to the specified value. For more information, see - // Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html). - // If the instance type is not valid, the error returned is InvalidInstanceAttributeValue. - InstanceType *AttributeValue `locationName:"instanceType" type:"structure"` - - // Changes the instance's kernel to the specified value. We recommend that you - // use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html). - Kernel *AttributeValue `locationName:"kernel" type:"structure"` - - // Changes the instance's RAM disk to the specified value. We recommend that - // you use PV-GRUB instead of kernels and RAM disks. For more information, see - // PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html). - Ramdisk *AttributeValue `locationName:"ramdisk" type:"structure"` - - // Specifies whether source/destination checking is enabled. A value of true - // means that checking is enabled, and false means that checking is disabled. - // This value must be false for a NAT instance to perform NAT. - SourceDestCheck *AttributeBooleanValue `type:"structure"` - - // Set to simple to enable enhanced networking with the Intel 82599 Virtual - // Function interface for the instance. - // - // There is no way to disable enhanced networking with the Intel 82599 Virtual - // Function interface at this time. - // - // This option is supported only for HVM instances. Specifying this option with - // a PV instance can make it unreachable. - SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` - - // Changes the instance's user data to the specified value. If you are using - // an AWS SDK or command line tool, base64-encoding is performed for you, and - // you can load the text from a file. Otherwise, you must provide base64-encoded - // text. - UserData *BlobAttributeValue `locationName:"userData" type:"structure"` - - // A new value for the attribute. Use only with the kernel, ramdisk, userData, - // disableApiTermination, or instanceInitiatedShutdownBehavior attribute. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s ModifyInstanceAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyInstanceAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyInstanceAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceAttributeInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *ModifyInstanceAttributeInput) SetAttribute(v string) *ModifyInstanceAttributeInput { - s.Attribute = &v - return s -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *ModifyInstanceAttributeInput) SetBlockDeviceMappings(v []*InstanceBlockDeviceMappingSpecification) *ModifyInstanceAttributeInput { - s.BlockDeviceMappings = v - return s -} - -// SetDisableApiTermination sets the DisableApiTermination field's value. -func (s *ModifyInstanceAttributeInput) SetDisableApiTermination(v *AttributeBooleanValue) *ModifyInstanceAttributeInput { - s.DisableApiTermination = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyInstanceAttributeInput) SetDryRun(v bool) *ModifyInstanceAttributeInput { - s.DryRun = &v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *ModifyInstanceAttributeInput) SetEbsOptimized(v *AttributeBooleanValue) *ModifyInstanceAttributeInput { - s.EbsOptimized = v - return s -} - -// SetEnaSupport sets the EnaSupport field's value. -func (s *ModifyInstanceAttributeInput) SetEnaSupport(v *AttributeBooleanValue) *ModifyInstanceAttributeInput { - s.EnaSupport = v - return s -} - -// SetGroups sets the Groups field's value. -func (s *ModifyInstanceAttributeInput) SetGroups(v []*string) *ModifyInstanceAttributeInput { - s.Groups = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ModifyInstanceAttributeInput) SetInstanceId(v string) *ModifyInstanceAttributeInput { - s.InstanceId = &v - return s -} - -// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. -func (s *ModifyInstanceAttributeInput) SetInstanceInitiatedShutdownBehavior(v *AttributeValue) *ModifyInstanceAttributeInput { - s.InstanceInitiatedShutdownBehavior = v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ModifyInstanceAttributeInput) SetInstanceType(v *AttributeValue) *ModifyInstanceAttributeInput { - s.InstanceType = v - return s -} - -// SetKernel sets the Kernel field's value. -func (s *ModifyInstanceAttributeInput) SetKernel(v *AttributeValue) *ModifyInstanceAttributeInput { - s.Kernel = v - return s -} - -// SetRamdisk sets the Ramdisk field's value. -func (s *ModifyInstanceAttributeInput) SetRamdisk(v *AttributeValue) *ModifyInstanceAttributeInput { - s.Ramdisk = v - return s -} - -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *ModifyInstanceAttributeInput) SetSourceDestCheck(v *AttributeBooleanValue) *ModifyInstanceAttributeInput { - s.SourceDestCheck = v - return s -} - -// SetSriovNetSupport sets the SriovNetSupport field's value. -func (s *ModifyInstanceAttributeInput) SetSriovNetSupport(v *AttributeValue) *ModifyInstanceAttributeInput { - s.SriovNetSupport = v - return s -} - -// SetUserData sets the UserData field's value. -func (s *ModifyInstanceAttributeInput) SetUserData(v *BlobAttributeValue) *ModifyInstanceAttributeInput { - s.UserData = v - return s -} - -// SetValue sets the Value field's value. -func (s *ModifyInstanceAttributeInput) SetValue(v string) *ModifyInstanceAttributeInput { - s.Value = &v - return s -} - -type ModifyInstanceAttributeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyInstanceAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyInstanceAttributeOutput) GoString() string { - return s.String() -} - -type ModifyInstanceCapacityReservationAttributesInput struct { - _ struct{} `type:"structure"` - - // Information about the Capacity Reservation targeting option. - // - // CapacityReservationSpecification is a required field - CapacityReservationSpecification *CapacityReservationSpecification `type:"structure" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the instance to be modified. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyInstanceCapacityReservationAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyInstanceCapacityReservationAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyInstanceCapacityReservationAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceCapacityReservationAttributesInput"} - if s.CapacityReservationSpecification == nil { - invalidParams.Add(request.NewErrParamRequired("CapacityReservationSpecification")) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value. -func (s *ModifyInstanceCapacityReservationAttributesInput) SetCapacityReservationSpecification(v *CapacityReservationSpecification) *ModifyInstanceCapacityReservationAttributesInput { - s.CapacityReservationSpecification = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyInstanceCapacityReservationAttributesInput) SetDryRun(v bool) *ModifyInstanceCapacityReservationAttributesInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ModifyInstanceCapacityReservationAttributesInput) SetInstanceId(v string) *ModifyInstanceCapacityReservationAttributesInput { - s.InstanceId = &v - return s -} - -type ModifyInstanceCapacityReservationAttributesOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s ModifyInstanceCapacityReservationAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyInstanceCapacityReservationAttributesOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *ModifyInstanceCapacityReservationAttributesOutput) SetReturn(v bool) *ModifyInstanceCapacityReservationAttributesOutput { - s.Return = &v - return s -} - -type ModifyInstanceCreditSpecificationInput struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive token that you provide to ensure idempotency of - // your modification request. For more information, see Ensuring Idempotency - // (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // Information about the credit option for CPU usage. - // - // InstanceCreditSpecifications is a required field - InstanceCreditSpecifications []*InstanceCreditSpecificationRequest `locationName:"InstanceCreditSpecification" locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyInstanceCreditSpecificationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyInstanceCreditSpecificationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyInstanceCreditSpecificationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceCreditSpecificationInput"} - if s.InstanceCreditSpecifications == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceCreditSpecifications")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *ModifyInstanceCreditSpecificationInput) SetClientToken(v string) *ModifyInstanceCreditSpecificationInput { - s.ClientToken = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyInstanceCreditSpecificationInput) SetDryRun(v bool) *ModifyInstanceCreditSpecificationInput { - s.DryRun = &v - return s -} - -// SetInstanceCreditSpecifications sets the InstanceCreditSpecifications field's value. -func (s *ModifyInstanceCreditSpecificationInput) SetInstanceCreditSpecifications(v []*InstanceCreditSpecificationRequest) *ModifyInstanceCreditSpecificationInput { - s.InstanceCreditSpecifications = v - return s -} - -type ModifyInstanceCreditSpecificationOutput struct { - _ struct{} `type:"structure"` - - // Information about the instances whose credit option for CPU usage was successfully - // modified. - SuccessfulInstanceCreditSpecifications []*SuccessfulInstanceCreditSpecificationItem `locationName:"successfulInstanceCreditSpecificationSet" locationNameList:"item" type:"list"` - - // Information about the instances whose credit option for CPU usage was not - // modified. - UnsuccessfulInstanceCreditSpecifications []*UnsuccessfulInstanceCreditSpecificationItem `locationName:"unsuccessfulInstanceCreditSpecificationSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s ModifyInstanceCreditSpecificationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyInstanceCreditSpecificationOutput) GoString() string { - return s.String() -} - -// SetSuccessfulInstanceCreditSpecifications sets the SuccessfulInstanceCreditSpecifications field's value. -func (s *ModifyInstanceCreditSpecificationOutput) SetSuccessfulInstanceCreditSpecifications(v []*SuccessfulInstanceCreditSpecificationItem) *ModifyInstanceCreditSpecificationOutput { - s.SuccessfulInstanceCreditSpecifications = v - return s -} - -// SetUnsuccessfulInstanceCreditSpecifications sets the UnsuccessfulInstanceCreditSpecifications field's value. -func (s *ModifyInstanceCreditSpecificationOutput) SetUnsuccessfulInstanceCreditSpecifications(v []*UnsuccessfulInstanceCreditSpecificationItem) *ModifyInstanceCreditSpecificationOutput { - s.UnsuccessfulInstanceCreditSpecifications = v - return s -} - -type ModifyInstancePlacementInput struct { - _ struct{} `type:"structure"` - - // The affinity setting for the instance. - Affinity *string `locationName:"affinity" type:"string" enum:"Affinity"` - - // The name of the placement group in which to place the instance. For spread - // placement groups, the instance must have a tenancy of default. For cluster - // and partition placement groups, the instance must have a tenancy of default - // or dedicated. - // - // To remove an instance from a placement group, specify an empty string (""). - GroupName *string `type:"string"` - - // The ID of the Dedicated Host with which to associate the instance. - HostId *string `locationName:"hostId" type:"string"` - - // The ID of the instance that you are modifying. - // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` - - // Reserved for future use. - PartitionNumber *int64 `type:"integer"` - - // The tenancy for the instance. - Tenancy *string `locationName:"tenancy" type:"string" enum:"HostTenancy"` -} - -// String returns the string representation -func (s ModifyInstancePlacementInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyInstancePlacementInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyInstancePlacementInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyInstancePlacementInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAffinity sets the Affinity field's value. -func (s *ModifyInstancePlacementInput) SetAffinity(v string) *ModifyInstancePlacementInput { - s.Affinity = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *ModifyInstancePlacementInput) SetGroupName(v string) *ModifyInstancePlacementInput { - s.GroupName = &v - return s -} - -// SetHostId sets the HostId field's value. -func (s *ModifyInstancePlacementInput) SetHostId(v string) *ModifyInstancePlacementInput { - s.HostId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ModifyInstancePlacementInput) SetInstanceId(v string) *ModifyInstancePlacementInput { - s.InstanceId = &v - return s -} - -// SetPartitionNumber sets the PartitionNumber field's value. -func (s *ModifyInstancePlacementInput) SetPartitionNumber(v int64) *ModifyInstancePlacementInput { - s.PartitionNumber = &v - return s -} - -// SetTenancy sets the Tenancy field's value. -func (s *ModifyInstancePlacementInput) SetTenancy(v string) *ModifyInstancePlacementInput { - s.Tenancy = &v - return s -} - -type ModifyInstancePlacementOutput struct { - _ struct{} `type:"structure"` - - // Is true if the request succeeds, and an error otherwise. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s ModifyInstancePlacementOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyInstancePlacementOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *ModifyInstancePlacementOutput) SetReturn(v bool) *ModifyInstancePlacementOutput { - s.Return = &v - return s -} - -type ModifyLaunchTemplateInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` - - // The version number of the launch template to set as the default version. - DefaultVersion *string `locationName:"SetDefaultVersion" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateId *string `type:"string"` - - // The name of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateName *string `min:"3" type:"string"` -} - -// String returns the string representation -func (s ModifyLaunchTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyLaunchTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyLaunchTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyLaunchTemplateInput"} - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *ModifyLaunchTemplateInput) SetClientToken(v string) *ModifyLaunchTemplateInput { - s.ClientToken = &v - return s -} - -// SetDefaultVersion sets the DefaultVersion field's value. -func (s *ModifyLaunchTemplateInput) SetDefaultVersion(v string) *ModifyLaunchTemplateInput { - s.DefaultVersion = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyLaunchTemplateInput) SetDryRun(v bool) *ModifyLaunchTemplateInput { - s.DryRun = &v - return s -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *ModifyLaunchTemplateInput) SetLaunchTemplateId(v string) *ModifyLaunchTemplateInput { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *ModifyLaunchTemplateInput) SetLaunchTemplateName(v string) *ModifyLaunchTemplateInput { - s.LaunchTemplateName = &v - return s -} - -type ModifyLaunchTemplateOutput struct { - _ struct{} `type:"structure"` - - // Information about the launch template. - LaunchTemplate *LaunchTemplate `locationName:"launchTemplate" type:"structure"` -} - -// String returns the string representation -func (s ModifyLaunchTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyLaunchTemplateOutput) GoString() string { - return s.String() -} - -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *ModifyLaunchTemplateOutput) SetLaunchTemplate(v *LaunchTemplate) *ModifyLaunchTemplateOutput { - s.LaunchTemplate = v - return s -} - -// Contains the parameters for ModifyNetworkInterfaceAttribute. -type ModifyNetworkInterfaceAttributeInput struct { - _ struct{} `type:"structure"` - - // Information about the interface attachment. If modifying the 'delete on termination' - // attribute, you must specify the ID of the interface attachment. - Attachment *NetworkInterfaceAttachmentChanges `locationName:"attachment" type:"structure"` - - // A description for the network interface. - Description *AttributeValue `locationName:"description" type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Changes the security groups for the network interface. The new set of groups - // you specify replaces the current set. You must specify at least one group, - // even if it's just the default security group in the VPC. You must specify - // the ID of the security group, not the name. - Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` - - // The ID of the network interface. - // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` - - // Indicates whether source/destination checking is enabled. A value of true - // means checking is enabled, and false means checking is disabled. This value - // must be false for a NAT instance to perform NAT. For more information, see - // NAT Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html) - // in the Amazon Virtual Private Cloud User Guide. - SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"` -} - -// String returns the string representation -func (s ModifyNetworkInterfaceAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyNetworkInterfaceAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyNetworkInterfaceAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyNetworkInterfaceAttributeInput"} - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttachment sets the Attachment field's value. -func (s *ModifyNetworkInterfaceAttributeInput) SetAttachment(v *NetworkInterfaceAttachmentChanges) *ModifyNetworkInterfaceAttributeInput { - s.Attachment = v - return s -} - -// SetDescription sets the Description field's value. -func (s *ModifyNetworkInterfaceAttributeInput) SetDescription(v *AttributeValue) *ModifyNetworkInterfaceAttributeInput { - s.Description = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyNetworkInterfaceAttributeInput) SetDryRun(v bool) *ModifyNetworkInterfaceAttributeInput { - s.DryRun = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *ModifyNetworkInterfaceAttributeInput) SetGroups(v []*string) *ModifyNetworkInterfaceAttributeInput { - s.Groups = v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *ModifyNetworkInterfaceAttributeInput) SetNetworkInterfaceId(v string) *ModifyNetworkInterfaceAttributeInput { - s.NetworkInterfaceId = &v - return s -} - -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *ModifyNetworkInterfaceAttributeInput) SetSourceDestCheck(v *AttributeBooleanValue) *ModifyNetworkInterfaceAttributeInput { - s.SourceDestCheck = v - return s -} - -type ModifyNetworkInterfaceAttributeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyNetworkInterfaceAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyNetworkInterfaceAttributeOutput) GoString() string { - return s.String() -} - -// Contains the parameters for ModifyReservedInstances. -type ModifyReservedInstancesInput struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive token you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `locationName:"clientToken" type:"string"` - - // The IDs of the Reserved Instances to modify. - // - // ReservedInstancesIds is a required field - ReservedInstancesIds []*string `locationName:"ReservedInstancesId" locationNameList:"ReservedInstancesId" type:"list" required:"true"` - - // The configuration settings for the Reserved Instances to modify. - // - // TargetConfigurations is a required field - TargetConfigurations []*ReservedInstancesConfiguration `locationName:"ReservedInstancesConfigurationSetItemType" locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyReservedInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyReservedInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyReservedInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyReservedInstancesInput"} - if s.ReservedInstancesIds == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedInstancesIds")) - } - if s.TargetConfigurations == nil { - invalidParams.Add(request.NewErrParamRequired("TargetConfigurations")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *ModifyReservedInstancesInput) SetClientToken(v string) *ModifyReservedInstancesInput { - s.ClientToken = &v - return s -} - -// SetReservedInstancesIds sets the ReservedInstancesIds field's value. -func (s *ModifyReservedInstancesInput) SetReservedInstancesIds(v []*string) *ModifyReservedInstancesInput { - s.ReservedInstancesIds = v - return s -} - -// SetTargetConfigurations sets the TargetConfigurations field's value. -func (s *ModifyReservedInstancesInput) SetTargetConfigurations(v []*ReservedInstancesConfiguration) *ModifyReservedInstancesInput { - s.TargetConfigurations = v - return s -} - -// Contains the output of ModifyReservedInstances. -type ModifyReservedInstancesOutput struct { - _ struct{} `type:"structure"` - - // The ID for the modification. - ReservedInstancesModificationId *string `locationName:"reservedInstancesModificationId" type:"string"` -} - -// String returns the string representation -func (s ModifyReservedInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyReservedInstancesOutput) GoString() string { - return s.String() -} - -// SetReservedInstancesModificationId sets the ReservedInstancesModificationId field's value. -func (s *ModifyReservedInstancesOutput) SetReservedInstancesModificationId(v string) *ModifyReservedInstancesOutput { - s.ReservedInstancesModificationId = &v - return s -} - -// Contains the parameters for ModifySnapshotAttribute. -type ModifySnapshotAttributeInput struct { - _ struct{} `type:"structure"` - - // The snapshot attribute to modify. Only volume creation permissions can be - // modified. - Attribute *string `type:"string" enum:"SnapshotAttributeName"` - - // A JSON representation of the snapshot attribute modification. - CreateVolumePermission *CreateVolumePermissionModifications `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The group to modify for the snapshot. - GroupNames []*string `locationName:"UserGroup" locationNameList:"GroupName" type:"list"` - - // The type of operation to perform to the attribute. - OperationType *string `type:"string" enum:"OperationType"` - - // The ID of the snapshot. - // - // SnapshotId is a required field - SnapshotId *string `type:"string" required:"true"` - - // The account ID to modify for the snapshot. - UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` -} - -// String returns the string representation -func (s ModifySnapshotAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifySnapshotAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifySnapshotAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifySnapshotAttributeInput"} - if s.SnapshotId == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *ModifySnapshotAttributeInput) SetAttribute(v string) *ModifySnapshotAttributeInput { - s.Attribute = &v - return s -} - -// SetCreateVolumePermission sets the CreateVolumePermission field's value. -func (s *ModifySnapshotAttributeInput) SetCreateVolumePermission(v *CreateVolumePermissionModifications) *ModifySnapshotAttributeInput { - s.CreateVolumePermission = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifySnapshotAttributeInput) SetDryRun(v bool) *ModifySnapshotAttributeInput { - s.DryRun = &v - return s -} - -// SetGroupNames sets the GroupNames field's value. -func (s *ModifySnapshotAttributeInput) SetGroupNames(v []*string) *ModifySnapshotAttributeInput { - s.GroupNames = v - return s -} - -// SetOperationType sets the OperationType field's value. -func (s *ModifySnapshotAttributeInput) SetOperationType(v string) *ModifySnapshotAttributeInput { - s.OperationType = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *ModifySnapshotAttributeInput) SetSnapshotId(v string) *ModifySnapshotAttributeInput { - s.SnapshotId = &v - return s -} - -// SetUserIds sets the UserIds field's value. -func (s *ModifySnapshotAttributeInput) SetUserIds(v []*string) *ModifySnapshotAttributeInput { - s.UserIds = v - return s -} - -type ModifySnapshotAttributeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifySnapshotAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifySnapshotAttributeOutput) GoString() string { - return s.String() -} - -// Contains the parameters for ModifySpotFleetRequest. -type ModifySpotFleetRequestInput struct { - _ struct{} `type:"structure"` - - // Indicates whether running Spot Instances should be terminated if the target - // capacity of the Spot Fleet request is decreased below the current size of - // the Spot Fleet. - ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"` - - // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` - - // The size of the fleet. - TargetCapacity *int64 `locationName:"targetCapacity" type:"integer"` -} - -// String returns the string representation -func (s ModifySpotFleetRequestInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifySpotFleetRequestInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifySpotFleetRequestInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifySpotFleetRequestInput"} - if s.SpotFleetRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. -func (s *ModifySpotFleetRequestInput) SetExcessCapacityTerminationPolicy(v string) *ModifySpotFleetRequestInput { - s.ExcessCapacityTerminationPolicy = &v - return s -} - -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *ModifySpotFleetRequestInput) SetSpotFleetRequestId(v string) *ModifySpotFleetRequestInput { - s.SpotFleetRequestId = &v - return s -} - -// SetTargetCapacity sets the TargetCapacity field's value. -func (s *ModifySpotFleetRequestInput) SetTargetCapacity(v int64) *ModifySpotFleetRequestInput { - s.TargetCapacity = &v - return s -} - -// Contains the output of ModifySpotFleetRequest. -type ModifySpotFleetRequestOutput struct { - _ struct{} `type:"structure"` - - // Is true if the request succeeds, and an error otherwise. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s ModifySpotFleetRequestOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifySpotFleetRequestOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *ModifySpotFleetRequestOutput) SetReturn(v bool) *ModifySpotFleetRequestOutput { - s.Return = &v - return s -} - -type ModifySubnetAttributeInput struct { - _ struct{} `type:"structure"` - - // Specify true to indicate that network interfaces created in the specified - // subnet should be assigned an IPv6 address. This includes a network interface - // that's created when launching an instance into the subnet (the instance therefore - // receives an IPv6 address). - // - // If you enable the IPv6 addressing feature for your subnet, your network interface - // or instance only receives an IPv6 address if it's created using version 2016-11-15 - // or later of the Amazon EC2 API. - AssignIpv6AddressOnCreation *AttributeBooleanValue `type:"structure"` - - // Specify true to indicate that network interfaces created in the specified - // subnet should be assigned a public IPv4 address. This includes a network - // interface that's created when launching an instance into the subnet (the - // instance therefore receives a public IPv4 address). - MapPublicIpOnLaunch *AttributeBooleanValue `type:"structure"` - - // The ID of the subnet. - // - // SubnetId is a required field - SubnetId *string `locationName:"subnetId" type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifySubnetAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifySubnetAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifySubnetAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifySubnetAttributeInput"} - if s.SubnetId == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssignIpv6AddressOnCreation sets the AssignIpv6AddressOnCreation field's value. -func (s *ModifySubnetAttributeInput) SetAssignIpv6AddressOnCreation(v *AttributeBooleanValue) *ModifySubnetAttributeInput { - s.AssignIpv6AddressOnCreation = v - return s -} - -// SetMapPublicIpOnLaunch sets the MapPublicIpOnLaunch field's value. -func (s *ModifySubnetAttributeInput) SetMapPublicIpOnLaunch(v *AttributeBooleanValue) *ModifySubnetAttributeInput { - s.MapPublicIpOnLaunch = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *ModifySubnetAttributeInput) SetSubnetId(v string) *ModifySubnetAttributeInput { - s.SubnetId = &v - return s -} - -type ModifySubnetAttributeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifySubnetAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifySubnetAttributeOutput) GoString() string { - return s.String() -} - -type ModifyTransitGatewayVpcAttachmentInput struct { - _ struct{} `type:"structure"` - - // The IDs of one or more subnets to add. You can specify at most one subnet - // per Availability Zone. - AddSubnetIds []*string `locationNameList:"item" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The new VPC attachment options. - Options *ModifyTransitGatewayVpcAttachmentRequestOptions `type:"structure"` - - // The IDs of one or more subnets to remove. - RemoveSubnetIds []*string `locationNameList:"item" type:"list"` - - // The ID of the attachment. - // - // TransitGatewayAttachmentId is a required field - TransitGatewayAttachmentId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyTransitGatewayVpcAttachmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyTransitGatewayVpcAttachmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyTransitGatewayVpcAttachmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyTransitGatewayVpcAttachmentInput"} - if s.TransitGatewayAttachmentId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddSubnetIds sets the AddSubnetIds field's value. -func (s *ModifyTransitGatewayVpcAttachmentInput) SetAddSubnetIds(v []*string) *ModifyTransitGatewayVpcAttachmentInput { - s.AddSubnetIds = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyTransitGatewayVpcAttachmentInput) SetDryRun(v bool) *ModifyTransitGatewayVpcAttachmentInput { - s.DryRun = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *ModifyTransitGatewayVpcAttachmentInput) SetOptions(v *ModifyTransitGatewayVpcAttachmentRequestOptions) *ModifyTransitGatewayVpcAttachmentInput { - s.Options = v - return s -} - -// SetRemoveSubnetIds sets the RemoveSubnetIds field's value. -func (s *ModifyTransitGatewayVpcAttachmentInput) SetRemoveSubnetIds(v []*string) *ModifyTransitGatewayVpcAttachmentInput { - s.RemoveSubnetIds = v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *ModifyTransitGatewayVpcAttachmentInput) SetTransitGatewayAttachmentId(v string) *ModifyTransitGatewayVpcAttachmentInput { - s.TransitGatewayAttachmentId = &v - return s -} - -type ModifyTransitGatewayVpcAttachmentOutput struct { - _ struct{} `type:"structure"` - - // Information about the modified attachment. - TransitGatewayVpcAttachment *TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachment" type:"structure"` -} - -// String returns the string representation -func (s ModifyTransitGatewayVpcAttachmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyTransitGatewayVpcAttachmentOutput) GoString() string { - return s.String() -} - -// SetTransitGatewayVpcAttachment sets the TransitGatewayVpcAttachment field's value. -func (s *ModifyTransitGatewayVpcAttachmentOutput) SetTransitGatewayVpcAttachment(v *TransitGatewayVpcAttachment) *ModifyTransitGatewayVpcAttachmentOutput { - s.TransitGatewayVpcAttachment = v - return s -} - -// Describes the options for a VPC attachment. -type ModifyTransitGatewayVpcAttachmentRequestOptions struct { - _ struct{} `type:"structure"` - - // Enable or disable DNS support. The default is enable. - DnsSupport *string `type:"string" enum:"DnsSupportValue"` - - // Enable or disable IPv6 support. The default is enable. - Ipv6Support *string `type:"string" enum:"Ipv6SupportValue"` -} - -// String returns the string representation -func (s ModifyTransitGatewayVpcAttachmentRequestOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyTransitGatewayVpcAttachmentRequestOptions) GoString() string { - return s.String() -} - -// SetDnsSupport sets the DnsSupport field's value. -func (s *ModifyTransitGatewayVpcAttachmentRequestOptions) SetDnsSupport(v string) *ModifyTransitGatewayVpcAttachmentRequestOptions { - s.DnsSupport = &v - return s -} - -// SetIpv6Support sets the Ipv6Support field's value. -func (s *ModifyTransitGatewayVpcAttachmentRequestOptions) SetIpv6Support(v string) *ModifyTransitGatewayVpcAttachmentRequestOptions { - s.Ipv6Support = &v - return s -} - -// Contains the parameters for ModifyVolumeAttribute. -type ModifyVolumeAttributeInput struct { - _ struct{} `type:"structure"` - - // Indicates whether the volume should be auto-enabled for I/O operations. - AutoEnableIO *AttributeBooleanValue `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the volume. - // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyVolumeAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVolumeAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVolumeAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVolumeAttributeInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoEnableIO sets the AutoEnableIO field's value. -func (s *ModifyVolumeAttributeInput) SetAutoEnableIO(v *AttributeBooleanValue) *ModifyVolumeAttributeInput { - s.AutoEnableIO = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyVolumeAttributeInput) SetDryRun(v bool) *ModifyVolumeAttributeInput { - s.DryRun = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *ModifyVolumeAttributeInput) SetVolumeId(v string) *ModifyVolumeAttributeInput { - s.VolumeId = &v - return s -} - -type ModifyVolumeAttributeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyVolumeAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVolumeAttributeOutput) GoString() string { - return s.String() -} - -type ModifyVolumeInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The target IOPS rate of the volume. - // - // This is only valid for Provisioned IOPS SSD (io1) volumes. For more information, - // see Provisioned IOPS SSD (io1) Volumes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html#EBSVolumeTypes_piops). - // - // Default: If no IOPS value is specified, the existing value is retained. - Iops *int64 `type:"integer"` - - // The target size of the volume, in GiB. The target volume size must be greater - // than or equal to than the existing size of the volume. For information about - // available EBS volume sizes, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). - // - // Default: If no size is specified, the existing size is retained. - Size *int64 `type:"integer"` - - // The ID of the volume. - // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` - - // The target EBS volume type of the volume. - // - // Default: If no type is specified, the existing type is retained. - VolumeType *string `type:"string" enum:"VolumeType"` -} - -// String returns the string representation -func (s ModifyVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVolumeInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyVolumeInput) SetDryRun(v bool) *ModifyVolumeInput { - s.DryRun = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *ModifyVolumeInput) SetIops(v int64) *ModifyVolumeInput { - s.Iops = &v - return s -} - -// SetSize sets the Size field's value. -func (s *ModifyVolumeInput) SetSize(v int64) *ModifyVolumeInput { - s.Size = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *ModifyVolumeInput) SetVolumeId(v string) *ModifyVolumeInput { - s.VolumeId = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *ModifyVolumeInput) SetVolumeType(v string) *ModifyVolumeInput { - s.VolumeType = &v - return s -} - -type ModifyVolumeOutput struct { - _ struct{} `type:"structure"` - - // Information about the volume modification. - VolumeModification *VolumeModification `locationName:"volumeModification" type:"structure"` -} - -// String returns the string representation -func (s ModifyVolumeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVolumeOutput) GoString() string { - return s.String() -} - -// SetVolumeModification sets the VolumeModification field's value. -func (s *ModifyVolumeOutput) SetVolumeModification(v *VolumeModification) *ModifyVolumeOutput { - s.VolumeModification = v - return s -} - -type ModifyVpcAttributeInput struct { - _ struct{} `type:"structure"` - - // Indicates whether the instances launched in the VPC get DNS hostnames. If - // enabled, instances in the VPC get DNS hostnames; otherwise, they do not. - // - // You cannot modify the DNS resolution and DNS hostnames attributes in the - // same request. Use separate requests for each attribute. You can only enable - // DNS hostnames if you've enabled DNS support. - EnableDnsHostnames *AttributeBooleanValue `type:"structure"` - - // Indicates whether the DNS resolution is supported for the VPC. If enabled, - // queries to the Amazon provided DNS server at the 169.254.169.253 IP address, - // or the reserved IP address at the base of the VPC network range "plus two" - // succeed. If disabled, the Amazon provided DNS service in the VPC that resolves - // public DNS hostnames to IP addresses is not enabled. - // - // You cannot modify the DNS resolution and DNS hostnames attributes in the - // same request. Use separate requests for each attribute. - EnableDnsSupport *AttributeBooleanValue `type:"structure"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyVpcAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVpcAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVpcAttributeInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnableDnsHostnames sets the EnableDnsHostnames field's value. -func (s *ModifyVpcAttributeInput) SetEnableDnsHostnames(v *AttributeBooleanValue) *ModifyVpcAttributeInput { - s.EnableDnsHostnames = v - return s -} - -// SetEnableDnsSupport sets the EnableDnsSupport field's value. -func (s *ModifyVpcAttributeInput) SetEnableDnsSupport(v *AttributeBooleanValue) *ModifyVpcAttributeInput { - s.EnableDnsSupport = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *ModifyVpcAttributeInput) SetVpcId(v string) *ModifyVpcAttributeInput { - s.VpcId = &v - return s -} - -type ModifyVpcAttributeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyVpcAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcAttributeOutput) GoString() string { - return s.String() -} - -type ModifyVpcEndpointConnectionNotificationInput struct { - _ struct{} `type:"structure"` - - // One or more events for the endpoint. Valid values are Accept, Connect, Delete, - // and Reject. - ConnectionEvents []*string `locationNameList:"item" type:"list"` - - // The ARN for the SNS topic for the notification. - ConnectionNotificationArn *string `type:"string"` - - // The ID of the notification. - // - // ConnectionNotificationId is a required field - ConnectionNotificationId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s ModifyVpcEndpointConnectionNotificationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcEndpointConnectionNotificationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVpcEndpointConnectionNotificationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointConnectionNotificationInput"} - if s.ConnectionNotificationId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionNotificationId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionEvents sets the ConnectionEvents field's value. -func (s *ModifyVpcEndpointConnectionNotificationInput) SetConnectionEvents(v []*string) *ModifyVpcEndpointConnectionNotificationInput { - s.ConnectionEvents = v - return s -} - -// SetConnectionNotificationArn sets the ConnectionNotificationArn field's value. -func (s *ModifyVpcEndpointConnectionNotificationInput) SetConnectionNotificationArn(v string) *ModifyVpcEndpointConnectionNotificationInput { - s.ConnectionNotificationArn = &v - return s -} - -// SetConnectionNotificationId sets the ConnectionNotificationId field's value. -func (s *ModifyVpcEndpointConnectionNotificationInput) SetConnectionNotificationId(v string) *ModifyVpcEndpointConnectionNotificationInput { - s.ConnectionNotificationId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyVpcEndpointConnectionNotificationInput) SetDryRun(v bool) *ModifyVpcEndpointConnectionNotificationInput { - s.DryRun = &v - return s -} - -type ModifyVpcEndpointConnectionNotificationOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - ReturnValue *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s ModifyVpcEndpointConnectionNotificationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcEndpointConnectionNotificationOutput) GoString() string { - return s.String() -} - -// SetReturnValue sets the ReturnValue field's value. -func (s *ModifyVpcEndpointConnectionNotificationOutput) SetReturnValue(v bool) *ModifyVpcEndpointConnectionNotificationOutput { - s.ReturnValue = &v - return s -} - -// Contains the parameters for ModifyVpcEndpoint. -type ModifyVpcEndpointInput struct { - _ struct{} `type:"structure"` - - // (Gateway endpoint) One or more route tables IDs to associate with the endpoint. - AddRouteTableIds []*string `locationName:"AddRouteTableId" locationNameList:"item" type:"list"` - - // (Interface endpoint) One or more security group IDs to associate with the - // network interface. - AddSecurityGroupIds []*string `locationName:"AddSecurityGroupId" locationNameList:"item" type:"list"` - - // (Interface endpoint) One or more subnet IDs in which to serve the endpoint. - AddSubnetIds []*string `locationName:"AddSubnetId" locationNameList:"item" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // (Gateway endpoint) A policy document to attach to the endpoint. The policy - // must be in valid JSON format. - PolicyDocument *string `type:"string"` - - // (Interface endpoint) Indicate whether a private hosted zone is associated - // with the VPC. - PrivateDnsEnabled *bool `type:"boolean"` - - // (Gateway endpoint) One or more route table IDs to disassociate from the endpoint. - RemoveRouteTableIds []*string `locationName:"RemoveRouteTableId" locationNameList:"item" type:"list"` - - // (Interface endpoint) One or more security group IDs to disassociate from - // the network interface. - RemoveSecurityGroupIds []*string `locationName:"RemoveSecurityGroupId" locationNameList:"item" type:"list"` - - // (Interface endpoint) One or more subnets IDs in which to remove the endpoint. - RemoveSubnetIds []*string `locationName:"RemoveSubnetId" locationNameList:"item" type:"list"` - - // (Gateway endpoint) Specify true to reset the policy document to the default - // policy. The default policy allows full access to the service. - ResetPolicy *bool `type:"boolean"` - - // The ID of the endpoint. - // - // VpcEndpointId is a required field - VpcEndpointId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyVpcEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVpcEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointInput"} - if s.VpcEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcEndpointId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddRouteTableIds sets the AddRouteTableIds field's value. -func (s *ModifyVpcEndpointInput) SetAddRouteTableIds(v []*string) *ModifyVpcEndpointInput { - s.AddRouteTableIds = v - return s -} - -// SetAddSecurityGroupIds sets the AddSecurityGroupIds field's value. -func (s *ModifyVpcEndpointInput) SetAddSecurityGroupIds(v []*string) *ModifyVpcEndpointInput { - s.AddSecurityGroupIds = v - return s -} - -// SetAddSubnetIds sets the AddSubnetIds field's value. -func (s *ModifyVpcEndpointInput) SetAddSubnetIds(v []*string) *ModifyVpcEndpointInput { - s.AddSubnetIds = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyVpcEndpointInput) SetDryRun(v bool) *ModifyVpcEndpointInput { - s.DryRun = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *ModifyVpcEndpointInput) SetPolicyDocument(v string) *ModifyVpcEndpointInput { - s.PolicyDocument = &v - return s -} - -// SetPrivateDnsEnabled sets the PrivateDnsEnabled field's value. -func (s *ModifyVpcEndpointInput) SetPrivateDnsEnabled(v bool) *ModifyVpcEndpointInput { - s.PrivateDnsEnabled = &v - return s -} - -// SetRemoveRouteTableIds sets the RemoveRouteTableIds field's value. -func (s *ModifyVpcEndpointInput) SetRemoveRouteTableIds(v []*string) *ModifyVpcEndpointInput { - s.RemoveRouteTableIds = v - return s -} - -// SetRemoveSecurityGroupIds sets the RemoveSecurityGroupIds field's value. -func (s *ModifyVpcEndpointInput) SetRemoveSecurityGroupIds(v []*string) *ModifyVpcEndpointInput { - s.RemoveSecurityGroupIds = v - return s -} - -// SetRemoveSubnetIds sets the RemoveSubnetIds field's value. -func (s *ModifyVpcEndpointInput) SetRemoveSubnetIds(v []*string) *ModifyVpcEndpointInput { - s.RemoveSubnetIds = v - return s -} - -// SetResetPolicy sets the ResetPolicy field's value. -func (s *ModifyVpcEndpointInput) SetResetPolicy(v bool) *ModifyVpcEndpointInput { - s.ResetPolicy = &v - return s -} - -// SetVpcEndpointId sets the VpcEndpointId field's value. -func (s *ModifyVpcEndpointInput) SetVpcEndpointId(v string) *ModifyVpcEndpointInput { - s.VpcEndpointId = &v - return s -} - -type ModifyVpcEndpointOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s ModifyVpcEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcEndpointOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *ModifyVpcEndpointOutput) SetReturn(v bool) *ModifyVpcEndpointOutput { - s.Return = &v - return s -} - -type ModifyVpcEndpointServiceConfigurationInput struct { - _ struct{} `type:"structure"` - - // Indicate whether requests to create an endpoint to your service must be accepted. - AcceptanceRequired *bool `type:"boolean"` - - // The Amazon Resource Names (ARNs) of Network Load Balancers to add to your - // service configuration. - AddNetworkLoadBalancerArns []*string `locationName:"AddNetworkLoadBalancerArn" locationNameList:"item" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The Amazon Resource Names (ARNs) of Network Load Balancers to remove from - // your service configuration. - RemoveNetworkLoadBalancerArns []*string `locationName:"RemoveNetworkLoadBalancerArn" locationNameList:"item" type:"list"` - - // The ID of the service. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyVpcEndpointServiceConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcEndpointServiceConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVpcEndpointServiceConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointServiceConfigurationInput"} - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptanceRequired sets the AcceptanceRequired field's value. -func (s *ModifyVpcEndpointServiceConfigurationInput) SetAcceptanceRequired(v bool) *ModifyVpcEndpointServiceConfigurationInput { - s.AcceptanceRequired = &v - return s -} - -// SetAddNetworkLoadBalancerArns sets the AddNetworkLoadBalancerArns field's value. -func (s *ModifyVpcEndpointServiceConfigurationInput) SetAddNetworkLoadBalancerArns(v []*string) *ModifyVpcEndpointServiceConfigurationInput { - s.AddNetworkLoadBalancerArns = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyVpcEndpointServiceConfigurationInput) SetDryRun(v bool) *ModifyVpcEndpointServiceConfigurationInput { - s.DryRun = &v - return s -} - -// SetRemoveNetworkLoadBalancerArns sets the RemoveNetworkLoadBalancerArns field's value. -func (s *ModifyVpcEndpointServiceConfigurationInput) SetRemoveNetworkLoadBalancerArns(v []*string) *ModifyVpcEndpointServiceConfigurationInput { - s.RemoveNetworkLoadBalancerArns = v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *ModifyVpcEndpointServiceConfigurationInput) SetServiceId(v string) *ModifyVpcEndpointServiceConfigurationInput { - s.ServiceId = &v - return s -} - -type ModifyVpcEndpointServiceConfigurationOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s ModifyVpcEndpointServiceConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcEndpointServiceConfigurationOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *ModifyVpcEndpointServiceConfigurationOutput) SetReturn(v bool) *ModifyVpcEndpointServiceConfigurationOutput { - s.Return = &v - return s -} - -type ModifyVpcEndpointServicePermissionsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Names (ARN) of one or more principals. Permissions are - // granted to the principals in this list. To grant permissions to all principals, - // specify an asterisk (*). - AddAllowedPrincipals []*string `locationNameList:"item" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The Amazon Resource Names (ARN) of one or more principals. Permissions are - // revoked for principals in this list. - RemoveAllowedPrincipals []*string `locationNameList:"item" type:"list"` - - // The ID of the service. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyVpcEndpointServicePermissionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcEndpointServicePermissionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVpcEndpointServicePermissionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointServicePermissionsInput"} - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddAllowedPrincipals sets the AddAllowedPrincipals field's value. -func (s *ModifyVpcEndpointServicePermissionsInput) SetAddAllowedPrincipals(v []*string) *ModifyVpcEndpointServicePermissionsInput { - s.AddAllowedPrincipals = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyVpcEndpointServicePermissionsInput) SetDryRun(v bool) *ModifyVpcEndpointServicePermissionsInput { - s.DryRun = &v - return s -} - -// SetRemoveAllowedPrincipals sets the RemoveAllowedPrincipals field's value. -func (s *ModifyVpcEndpointServicePermissionsInput) SetRemoveAllowedPrincipals(v []*string) *ModifyVpcEndpointServicePermissionsInput { - s.RemoveAllowedPrincipals = v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *ModifyVpcEndpointServicePermissionsInput) SetServiceId(v string) *ModifyVpcEndpointServicePermissionsInput { - s.ServiceId = &v - return s -} - -type ModifyVpcEndpointServicePermissionsOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - ReturnValue *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s ModifyVpcEndpointServicePermissionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcEndpointServicePermissionsOutput) GoString() string { - return s.String() -} - -// SetReturnValue sets the ReturnValue field's value. -func (s *ModifyVpcEndpointServicePermissionsOutput) SetReturnValue(v bool) *ModifyVpcEndpointServicePermissionsOutput { - s.ReturnValue = &v - return s -} - -type ModifyVpcPeeringConnectionOptionsInput struct { - _ struct{} `type:"structure"` - - // The VPC peering connection options for the accepter VPC. - AccepterPeeringConnectionOptions *PeeringConnectionOptionsRequest `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The VPC peering connection options for the requester VPC. - RequesterPeeringConnectionOptions *PeeringConnectionOptionsRequest `type:"structure"` - - // The ID of the VPC peering connection. - // - // VpcPeeringConnectionId is a required field - VpcPeeringConnectionId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyVpcPeeringConnectionOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcPeeringConnectionOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVpcPeeringConnectionOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVpcPeeringConnectionOptionsInput"} - if s.VpcPeeringConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcPeeringConnectionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccepterPeeringConnectionOptions sets the AccepterPeeringConnectionOptions field's value. -func (s *ModifyVpcPeeringConnectionOptionsInput) SetAccepterPeeringConnectionOptions(v *PeeringConnectionOptionsRequest) *ModifyVpcPeeringConnectionOptionsInput { - s.AccepterPeeringConnectionOptions = v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyVpcPeeringConnectionOptionsInput) SetDryRun(v bool) *ModifyVpcPeeringConnectionOptionsInput { - s.DryRun = &v - return s -} - -// SetRequesterPeeringConnectionOptions sets the RequesterPeeringConnectionOptions field's value. -func (s *ModifyVpcPeeringConnectionOptionsInput) SetRequesterPeeringConnectionOptions(v *PeeringConnectionOptionsRequest) *ModifyVpcPeeringConnectionOptionsInput { - s.RequesterPeeringConnectionOptions = v - return s -} - -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *ModifyVpcPeeringConnectionOptionsInput) SetVpcPeeringConnectionId(v string) *ModifyVpcPeeringConnectionOptionsInput { - s.VpcPeeringConnectionId = &v - return s -} - -type ModifyVpcPeeringConnectionOptionsOutput struct { - _ struct{} `type:"structure"` - - // Information about the VPC peering connection options for the accepter VPC. - AccepterPeeringConnectionOptions *PeeringConnectionOptions `locationName:"accepterPeeringConnectionOptions" type:"structure"` - - // Information about the VPC peering connection options for the requester VPC. - RequesterPeeringConnectionOptions *PeeringConnectionOptions `locationName:"requesterPeeringConnectionOptions" type:"structure"` -} - -// String returns the string representation -func (s ModifyVpcPeeringConnectionOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcPeeringConnectionOptionsOutput) GoString() string { - return s.String() -} - -// SetAccepterPeeringConnectionOptions sets the AccepterPeeringConnectionOptions field's value. -func (s *ModifyVpcPeeringConnectionOptionsOutput) SetAccepterPeeringConnectionOptions(v *PeeringConnectionOptions) *ModifyVpcPeeringConnectionOptionsOutput { - s.AccepterPeeringConnectionOptions = v - return s -} - -// SetRequesterPeeringConnectionOptions sets the RequesterPeeringConnectionOptions field's value. -func (s *ModifyVpcPeeringConnectionOptionsOutput) SetRequesterPeeringConnectionOptions(v *PeeringConnectionOptions) *ModifyVpcPeeringConnectionOptionsOutput { - s.RequesterPeeringConnectionOptions = v - return s -} - -type ModifyVpcTenancyInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The instance tenancy attribute for the VPC. - // - // InstanceTenancy is a required field - InstanceTenancy *string `type:"string" required:"true" enum:"VpcTenancy"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyVpcTenancyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcTenancyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVpcTenancyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVpcTenancyInput"} - if s.InstanceTenancy == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceTenancy")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyVpcTenancyInput) SetDryRun(v bool) *ModifyVpcTenancyInput { - s.DryRun = &v - return s -} - -// SetInstanceTenancy sets the InstanceTenancy field's value. -func (s *ModifyVpcTenancyInput) SetInstanceTenancy(v string) *ModifyVpcTenancyInput { - s.InstanceTenancy = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *ModifyVpcTenancyInput) SetVpcId(v string) *ModifyVpcTenancyInput { - s.VpcId = &v - return s -} - -type ModifyVpcTenancyOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, returns an error. - ReturnValue *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s ModifyVpcTenancyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcTenancyOutput) GoString() string { - return s.String() -} - -// SetReturnValue sets the ReturnValue field's value. -func (s *ModifyVpcTenancyOutput) SetReturnValue(v bool) *ModifyVpcTenancyOutput { - s.ReturnValue = &v - return s -} - -type MonitorInstancesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more instance IDs. - // - // InstanceIds is a required field - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` -} - -// String returns the string representation -func (s MonitorInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MonitorInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MonitorInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MonitorInstancesInput"} - if s.InstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *MonitorInstancesInput) SetDryRun(v bool) *MonitorInstancesInput { - s.DryRun = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *MonitorInstancesInput) SetInstanceIds(v []*string) *MonitorInstancesInput { - s.InstanceIds = v - return s -} - -type MonitorInstancesOutput struct { - _ struct{} `type:"structure"` - - // The monitoring information. - InstanceMonitorings []*InstanceMonitoring `locationName:"instancesSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s MonitorInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MonitorInstancesOutput) GoString() string { - return s.String() -} - -// SetInstanceMonitorings sets the InstanceMonitorings field's value. -func (s *MonitorInstancesOutput) SetInstanceMonitorings(v []*InstanceMonitoring) *MonitorInstancesOutput { - s.InstanceMonitorings = v - return s -} - -// Describes the monitoring of an instance. -type Monitoring struct { - _ struct{} `type:"structure"` - - // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring - // is enabled. - State *string `locationName:"state" type:"string" enum:"MonitoringState"` -} - -// String returns the string representation -func (s Monitoring) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Monitoring) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *Monitoring) SetState(v string) *Monitoring { - s.State = &v - return s -} - -type MoveAddressToVpcInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The Elastic IP address. - // - // PublicIp is a required field - PublicIp *string `locationName:"publicIp" type:"string" required:"true"` -} - -// String returns the string representation -func (s MoveAddressToVpcInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MoveAddressToVpcInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MoveAddressToVpcInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MoveAddressToVpcInput"} - if s.PublicIp == nil { - invalidParams.Add(request.NewErrParamRequired("PublicIp")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *MoveAddressToVpcInput) SetDryRun(v bool) *MoveAddressToVpcInput { - s.DryRun = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *MoveAddressToVpcInput) SetPublicIp(v string) *MoveAddressToVpcInput { - s.PublicIp = &v - return s -} - -type MoveAddressToVpcOutput struct { - _ struct{} `type:"structure"` - - // The allocation ID for the Elastic IP address. - AllocationId *string `locationName:"allocationId" type:"string"` - - // The status of the move of the IP address. - Status *string `locationName:"status" type:"string" enum:"Status"` -} - -// String returns the string representation -func (s MoveAddressToVpcOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MoveAddressToVpcOutput) GoString() string { - return s.String() -} - -// SetAllocationId sets the AllocationId field's value. -func (s *MoveAddressToVpcOutput) SetAllocationId(v string) *MoveAddressToVpcOutput { - s.AllocationId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *MoveAddressToVpcOutput) SetStatus(v string) *MoveAddressToVpcOutput { - s.Status = &v - return s -} - -// Describes the status of a moving Elastic IP address. -type MovingAddressStatus struct { - _ struct{} `type:"structure"` - - // The status of the Elastic IP address that's being moved to the EC2-VPC platform, - // or restored to the EC2-Classic platform. - MoveStatus *string `locationName:"moveStatus" type:"string" enum:"MoveStatus"` - - // The Elastic IP address. - PublicIp *string `locationName:"publicIp" type:"string"` -} - -// String returns the string representation -func (s MovingAddressStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MovingAddressStatus) GoString() string { - return s.String() -} - -// SetMoveStatus sets the MoveStatus field's value. -func (s *MovingAddressStatus) SetMoveStatus(v string) *MovingAddressStatus { - s.MoveStatus = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *MovingAddressStatus) SetPublicIp(v string) *MovingAddressStatus { - s.PublicIp = &v - return s -} - -// Describes a NAT gateway. -type NatGateway struct { - _ struct{} `type:"structure"` - - // The date and time the NAT gateway was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - - // The date and time the NAT gateway was deleted, if applicable. - DeleteTime *time.Time `locationName:"deleteTime" type:"timestamp"` - - // If the NAT gateway could not be created, specifies the error code for the - // failure. (InsufficientFreeAddressesInSubnet | Gateway.NotAttached | InvalidAllocationID.NotFound - // | Resource.AlreadyAssociated | InternalError | InvalidSubnetID.NotFound) - FailureCode *string `locationName:"failureCode" type:"string"` - - // If the NAT gateway could not be created, specifies the error message for - // the failure, that corresponds to the error code. - // - // * For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free - // addresses to create this NAT gateway" - // - // * For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway - // attached" - // - // * For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx - // could not be associated with this NAT gateway" - // - // * For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx - // is already associated" - // - // * For InternalError: "Network interface eni-xxxxxxxx, created and used - // internally by this NAT gateway is in an invalid state. Please try again." - // - // * For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx - // does not exist or could not be found." - FailureMessage *string `locationName:"failureMessage" type:"string"` - - // Information about the IP addresses and network interface associated with - // the NAT gateway. - NatGatewayAddresses []*NatGatewayAddress `locationName:"natGatewayAddressSet" locationNameList:"item" type:"list"` - - // The ID of the NAT gateway. - NatGatewayId *string `locationName:"natGatewayId" type:"string"` - - // Reserved. If you need to sustain traffic greater than the documented limits - // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), - // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - ProvisionedBandwidth *ProvisionedBandwidth `locationName:"provisionedBandwidth" type:"structure"` - - // The state of the NAT gateway. - // - // * pending: The NAT gateway is being created and is not ready to process - // traffic. - // - // * failed: The NAT gateway could not be created. Check the failureCode - // and failureMessage fields for the reason. - // - // * available: The NAT gateway is able to process traffic. This status remains - // until you delete the NAT gateway, and does not indicate the health of - // the NAT gateway. - // - // * deleting: The NAT gateway is in the process of being terminated and - // may still be processing traffic. - // - // * deleted: The NAT gateway has been terminated and is no longer processing - // traffic. - State *string `locationName:"state" type:"string" enum:"NatGatewayState"` - - // The ID of the subnet in which the NAT gateway is located. - SubnetId *string `locationName:"subnetId" type:"string"` - - // The tags for the NAT gateway. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the VPC in which the NAT gateway is located. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s NatGateway) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NatGateway) GoString() string { - return s.String() -} - -// SetCreateTime sets the CreateTime field's value. -func (s *NatGateway) SetCreateTime(v time.Time) *NatGateway { - s.CreateTime = &v - return s -} - -// SetDeleteTime sets the DeleteTime field's value. -func (s *NatGateway) SetDeleteTime(v time.Time) *NatGateway { - s.DeleteTime = &v - return s -} - -// SetFailureCode sets the FailureCode field's value. -func (s *NatGateway) SetFailureCode(v string) *NatGateway { - s.FailureCode = &v - return s -} - -// SetFailureMessage sets the FailureMessage field's value. -func (s *NatGateway) SetFailureMessage(v string) *NatGateway { - s.FailureMessage = &v - return s -} - -// SetNatGatewayAddresses sets the NatGatewayAddresses field's value. -func (s *NatGateway) SetNatGatewayAddresses(v []*NatGatewayAddress) *NatGateway { - s.NatGatewayAddresses = v - return s -} - -// SetNatGatewayId sets the NatGatewayId field's value. -func (s *NatGateway) SetNatGatewayId(v string) *NatGateway { - s.NatGatewayId = &v - return s -} - -// SetProvisionedBandwidth sets the ProvisionedBandwidth field's value. -func (s *NatGateway) SetProvisionedBandwidth(v *ProvisionedBandwidth) *NatGateway { - s.ProvisionedBandwidth = v - return s -} - -// SetState sets the State field's value. -func (s *NatGateway) SetState(v string) *NatGateway { - s.State = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *NatGateway) SetSubnetId(v string) *NatGateway { - s.SubnetId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *NatGateway) SetTags(v []*Tag) *NatGateway { - s.Tags = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *NatGateway) SetVpcId(v string) *NatGateway { - s.VpcId = &v - return s -} - -// Describes the IP addresses and network interface associated with a NAT gateway. -type NatGatewayAddress struct { - _ struct{} `type:"structure"` - - // The allocation ID of the Elastic IP address that's associated with the NAT - // gateway. - AllocationId *string `locationName:"allocationId" type:"string"` - - // The ID of the network interface associated with the NAT gateway. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // The private IP address associated with the Elastic IP address. - PrivateIp *string `locationName:"privateIp" type:"string"` - - // The Elastic IP address associated with the NAT gateway. - PublicIp *string `locationName:"publicIp" type:"string"` -} - -// String returns the string representation -func (s NatGatewayAddress) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NatGatewayAddress) GoString() string { - return s.String() -} - -// SetAllocationId sets the AllocationId field's value. -func (s *NatGatewayAddress) SetAllocationId(v string) *NatGatewayAddress { - s.AllocationId = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *NatGatewayAddress) SetNetworkInterfaceId(v string) *NatGatewayAddress { - s.NetworkInterfaceId = &v - return s -} - -// SetPrivateIp sets the PrivateIp field's value. -func (s *NatGatewayAddress) SetPrivateIp(v string) *NatGatewayAddress { - s.PrivateIp = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *NatGatewayAddress) SetPublicIp(v string) *NatGatewayAddress { - s.PublicIp = &v - return s -} - -// Describes a network ACL. -type NetworkAcl struct { - _ struct{} `type:"structure"` - - // Any associations between the network ACL and one or more subnets - Associations []*NetworkAclAssociation `locationName:"associationSet" locationNameList:"item" type:"list"` - - // One or more entries (rules) in the network ACL. - Entries []*NetworkAclEntry `locationName:"entrySet" locationNameList:"item" type:"list"` - - // Indicates whether this is the default network ACL for the VPC. - IsDefault *bool `locationName:"default" type:"boolean"` - - // The ID of the network ACL. - NetworkAclId *string `locationName:"networkAclId" type:"string"` - - // The ID of the AWS account that owns the network ACL. - OwnerId *string `locationName:"ownerId" type:"string"` - - // Any tags assigned to the network ACL. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the VPC for the network ACL. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s NetworkAcl) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkAcl) GoString() string { - return s.String() -} - -// SetAssociations sets the Associations field's value. -func (s *NetworkAcl) SetAssociations(v []*NetworkAclAssociation) *NetworkAcl { - s.Associations = v - return s -} - -// SetEntries sets the Entries field's value. -func (s *NetworkAcl) SetEntries(v []*NetworkAclEntry) *NetworkAcl { - s.Entries = v - return s -} - -// SetIsDefault sets the IsDefault field's value. -func (s *NetworkAcl) SetIsDefault(v bool) *NetworkAcl { - s.IsDefault = &v - return s -} - -// SetNetworkAclId sets the NetworkAclId field's value. -func (s *NetworkAcl) SetNetworkAclId(v string) *NetworkAcl { - s.NetworkAclId = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *NetworkAcl) SetOwnerId(v string) *NetworkAcl { - s.OwnerId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *NetworkAcl) SetTags(v []*Tag) *NetworkAcl { - s.Tags = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *NetworkAcl) SetVpcId(v string) *NetworkAcl { - s.VpcId = &v - return s -} - -// Describes an association between a network ACL and a subnet. -type NetworkAclAssociation struct { - _ struct{} `type:"structure"` - - // The ID of the association between a network ACL and a subnet. - NetworkAclAssociationId *string `locationName:"networkAclAssociationId" type:"string"` - - // The ID of the network ACL. - NetworkAclId *string `locationName:"networkAclId" type:"string"` - - // The ID of the subnet. - SubnetId *string `locationName:"subnetId" type:"string"` -} - -// String returns the string representation -func (s NetworkAclAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkAclAssociation) GoString() string { - return s.String() -} - -// SetNetworkAclAssociationId sets the NetworkAclAssociationId field's value. -func (s *NetworkAclAssociation) SetNetworkAclAssociationId(v string) *NetworkAclAssociation { - s.NetworkAclAssociationId = &v - return s -} - -// SetNetworkAclId sets the NetworkAclId field's value. -func (s *NetworkAclAssociation) SetNetworkAclId(v string) *NetworkAclAssociation { - s.NetworkAclId = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *NetworkAclAssociation) SetSubnetId(v string) *NetworkAclAssociation { - s.SubnetId = &v - return s -} - -// Describes an entry in a network ACL. -type NetworkAclEntry struct { - _ struct{} `type:"structure"` - - // The IPv4 network range to allow or deny, in CIDR notation. - CidrBlock *string `locationName:"cidrBlock" type:"string"` - - // Indicates whether the rule is an egress rule (applied to traffic leaving - // the subnet). - Egress *bool `locationName:"egress" type:"boolean"` - - // ICMP protocol: The ICMP type and code. - IcmpTypeCode *IcmpTypeCode `locationName:"icmpTypeCode" type:"structure"` - - // The IPv6 network range to allow or deny, in CIDR notation. - Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` - - // TCP or UDP protocols: The range of ports the rule applies to. - PortRange *PortRange `locationName:"portRange" type:"structure"` - - // The protocol number. A value of "-1" means all protocols. - Protocol *string `locationName:"protocol" type:"string"` - - // Indicates whether to allow or deny the traffic that matches the rule. - RuleAction *string `locationName:"ruleAction" type:"string" enum:"RuleAction"` - - // The rule number for the entry. ACL entries are processed in ascending order - // by rule number. - RuleNumber *int64 `locationName:"ruleNumber" type:"integer"` -} - -// String returns the string representation -func (s NetworkAclEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkAclEntry) GoString() string { - return s.String() -} - -// SetCidrBlock sets the CidrBlock field's value. -func (s *NetworkAclEntry) SetCidrBlock(v string) *NetworkAclEntry { - s.CidrBlock = &v - return s -} - -// SetEgress sets the Egress field's value. -func (s *NetworkAclEntry) SetEgress(v bool) *NetworkAclEntry { - s.Egress = &v - return s -} - -// SetIcmpTypeCode sets the IcmpTypeCode field's value. -func (s *NetworkAclEntry) SetIcmpTypeCode(v *IcmpTypeCode) *NetworkAclEntry { - s.IcmpTypeCode = v - return s -} - -// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. -func (s *NetworkAclEntry) SetIpv6CidrBlock(v string) *NetworkAclEntry { - s.Ipv6CidrBlock = &v - return s -} - -// SetPortRange sets the PortRange field's value. -func (s *NetworkAclEntry) SetPortRange(v *PortRange) *NetworkAclEntry { - s.PortRange = v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *NetworkAclEntry) SetProtocol(v string) *NetworkAclEntry { - s.Protocol = &v - return s -} - -// SetRuleAction sets the RuleAction field's value. -func (s *NetworkAclEntry) SetRuleAction(v string) *NetworkAclEntry { - s.RuleAction = &v - return s -} - -// SetRuleNumber sets the RuleNumber field's value. -func (s *NetworkAclEntry) SetRuleNumber(v int64) *NetworkAclEntry { - s.RuleNumber = &v - return s -} - -// Describes a network interface. -type NetworkInterface struct { - _ struct{} `type:"structure"` - - // The association information for an Elastic IP address (IPv4) associated with - // the network interface. - Association *NetworkInterfaceAssociation `locationName:"association" type:"structure"` - - // The network interface attachment. - Attachment *NetworkInterfaceAttachment `locationName:"attachment" type:"structure"` - - // The Availability Zone. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // A description. - Description *string `locationName:"description" type:"string"` - - // Any security groups for the network interface. - Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - - // The type of interface. - InterfaceType *string `locationName:"interfaceType" type:"string" enum:"NetworkInterfaceType"` - - // The IPv6 addresses associated with the network interface. - Ipv6Addresses []*NetworkInterfaceIpv6Address `locationName:"ipv6AddressesSet" locationNameList:"item" type:"list"` - - // The MAC address. - MacAddress *string `locationName:"macAddress" type:"string"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // The AWS account ID of the owner of the network interface. - OwnerId *string `locationName:"ownerId" type:"string"` - - // The private DNS name. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - - // The IPv4 address of the network interface within the subnet. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // The private IPv4 addresses associated with the network interface. - PrivateIpAddresses []*NetworkInterfacePrivateIpAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"` - - // The ID of the entity that launched the instance on your behalf (for example, - // AWS Management Console or Auto Scaling). - RequesterId *string `locationName:"requesterId" type:"string"` - - // Indicates whether the network interface is being managed by AWS. - RequesterManaged *bool `locationName:"requesterManaged" type:"boolean"` - - // Indicates whether traffic to or from the instance is validated. - SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` - - // The status of the network interface. - Status *string `locationName:"status" type:"string" enum:"NetworkInterfaceStatus"` - - // The ID of the subnet. - SubnetId *string `locationName:"subnetId" type:"string"` - - // Any tags assigned to the network interface. - TagSet []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s NetworkInterface) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInterface) GoString() string { - return s.String() -} - -// SetAssociation sets the Association field's value. -func (s *NetworkInterface) SetAssociation(v *NetworkInterfaceAssociation) *NetworkInterface { - s.Association = v - return s -} - -// SetAttachment sets the Attachment field's value. -func (s *NetworkInterface) SetAttachment(v *NetworkInterfaceAttachment) *NetworkInterface { - s.Attachment = v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *NetworkInterface) SetAvailabilityZone(v string) *NetworkInterface { - s.AvailabilityZone = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *NetworkInterface) SetDescription(v string) *NetworkInterface { - s.Description = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *NetworkInterface) SetGroups(v []*GroupIdentifier) *NetworkInterface { - s.Groups = v - return s -} - -// SetInterfaceType sets the InterfaceType field's value. -func (s *NetworkInterface) SetInterfaceType(v string) *NetworkInterface { - s.InterfaceType = &v - return s -} - -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *NetworkInterface) SetIpv6Addresses(v []*NetworkInterfaceIpv6Address) *NetworkInterface { - s.Ipv6Addresses = v - return s -} - -// SetMacAddress sets the MacAddress field's value. -func (s *NetworkInterface) SetMacAddress(v string) *NetworkInterface { - s.MacAddress = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *NetworkInterface) SetNetworkInterfaceId(v string) *NetworkInterface { - s.NetworkInterfaceId = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *NetworkInterface) SetOwnerId(v string) *NetworkInterface { - s.OwnerId = &v - return s -} - -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *NetworkInterface) SetPrivateDnsName(v string) *NetworkInterface { - s.PrivateDnsName = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *NetworkInterface) SetPrivateIpAddress(v string) *NetworkInterface { - s.PrivateIpAddress = &v - return s -} - -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *NetworkInterface) SetPrivateIpAddresses(v []*NetworkInterfacePrivateIpAddress) *NetworkInterface { - s.PrivateIpAddresses = v - return s -} - -// SetRequesterId sets the RequesterId field's value. -func (s *NetworkInterface) SetRequesterId(v string) *NetworkInterface { - s.RequesterId = &v - return s -} - -// SetRequesterManaged sets the RequesterManaged field's value. -func (s *NetworkInterface) SetRequesterManaged(v bool) *NetworkInterface { - s.RequesterManaged = &v - return s -} - -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *NetworkInterface) SetSourceDestCheck(v bool) *NetworkInterface { - s.SourceDestCheck = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *NetworkInterface) SetStatus(v string) *NetworkInterface { - s.Status = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *NetworkInterface) SetSubnetId(v string) *NetworkInterface { - s.SubnetId = &v - return s -} - -// SetTagSet sets the TagSet field's value. -func (s *NetworkInterface) SetTagSet(v []*Tag) *NetworkInterface { - s.TagSet = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *NetworkInterface) SetVpcId(v string) *NetworkInterface { - s.VpcId = &v - return s -} - -// Describes association information for an Elastic IP address (IPv4 only). -type NetworkInterfaceAssociation struct { - _ struct{} `type:"structure"` - - // The allocation ID. - AllocationId *string `locationName:"allocationId" type:"string"` - - // The association ID. - AssociationId *string `locationName:"associationId" type:"string"` - - // The ID of the Elastic IP address owner. - IpOwnerId *string `locationName:"ipOwnerId" type:"string"` - - // The public DNS name. - PublicDnsName *string `locationName:"publicDnsName" type:"string"` - - // The address of the Elastic IP address bound to the network interface. - PublicIp *string `locationName:"publicIp" type:"string"` -} - -// String returns the string representation -func (s NetworkInterfaceAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInterfaceAssociation) GoString() string { - return s.String() -} - -// SetAllocationId sets the AllocationId field's value. -func (s *NetworkInterfaceAssociation) SetAllocationId(v string) *NetworkInterfaceAssociation { - s.AllocationId = &v - return s -} - -// SetAssociationId sets the AssociationId field's value. -func (s *NetworkInterfaceAssociation) SetAssociationId(v string) *NetworkInterfaceAssociation { - s.AssociationId = &v - return s -} - -// SetIpOwnerId sets the IpOwnerId field's value. -func (s *NetworkInterfaceAssociation) SetIpOwnerId(v string) *NetworkInterfaceAssociation { - s.IpOwnerId = &v - return s -} - -// SetPublicDnsName sets the PublicDnsName field's value. -func (s *NetworkInterfaceAssociation) SetPublicDnsName(v string) *NetworkInterfaceAssociation { - s.PublicDnsName = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *NetworkInterfaceAssociation) SetPublicIp(v string) *NetworkInterfaceAssociation { - s.PublicIp = &v - return s -} - -// Describes a network interface attachment. -type NetworkInterfaceAttachment struct { - _ struct{} `type:"structure"` - - // The timestamp indicating when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` - - // The ID of the network interface attachment. - AttachmentId *string `locationName:"attachmentId" type:"string"` - - // Indicates whether the network interface is deleted when the instance is terminated. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - - // The device index of the network interface attachment on the instance. - DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The AWS account ID of the owner of the instance. - InstanceOwnerId *string `locationName:"instanceOwnerId" type:"string"` - - // The attachment state. - Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"` -} - -// String returns the string representation -func (s NetworkInterfaceAttachment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInterfaceAttachment) GoString() string { - return s.String() -} - -// SetAttachTime sets the AttachTime field's value. -func (s *NetworkInterfaceAttachment) SetAttachTime(v time.Time) *NetworkInterfaceAttachment { - s.AttachTime = &v - return s -} - -// SetAttachmentId sets the AttachmentId field's value. -func (s *NetworkInterfaceAttachment) SetAttachmentId(v string) *NetworkInterfaceAttachment { - s.AttachmentId = &v - return s -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *NetworkInterfaceAttachment) SetDeleteOnTermination(v bool) *NetworkInterfaceAttachment { - s.DeleteOnTermination = &v - return s -} - -// SetDeviceIndex sets the DeviceIndex field's value. -func (s *NetworkInterfaceAttachment) SetDeviceIndex(v int64) *NetworkInterfaceAttachment { - s.DeviceIndex = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *NetworkInterfaceAttachment) SetInstanceId(v string) *NetworkInterfaceAttachment { - s.InstanceId = &v - return s -} - -// SetInstanceOwnerId sets the InstanceOwnerId field's value. -func (s *NetworkInterfaceAttachment) SetInstanceOwnerId(v string) *NetworkInterfaceAttachment { - s.InstanceOwnerId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *NetworkInterfaceAttachment) SetStatus(v string) *NetworkInterfaceAttachment { - s.Status = &v - return s -} - -// Describes an attachment change. -type NetworkInterfaceAttachmentChanges struct { - _ struct{} `type:"structure"` - - // The ID of the network interface attachment. - AttachmentId *string `locationName:"attachmentId" type:"string"` - - // Indicates whether the network interface is deleted when the instance is terminated. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` -} - -// String returns the string representation -func (s NetworkInterfaceAttachmentChanges) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInterfaceAttachmentChanges) GoString() string { - return s.String() -} - -// SetAttachmentId sets the AttachmentId field's value. -func (s *NetworkInterfaceAttachmentChanges) SetAttachmentId(v string) *NetworkInterfaceAttachmentChanges { - s.AttachmentId = &v - return s -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *NetworkInterfaceAttachmentChanges) SetDeleteOnTermination(v bool) *NetworkInterfaceAttachmentChanges { - s.DeleteOnTermination = &v - return s -} - -// Describes an IPv6 address associated with a network interface. -type NetworkInterfaceIpv6Address struct { - _ struct{} `type:"structure"` - - // The IPv6 address. - Ipv6Address *string `locationName:"ipv6Address" type:"string"` -} - -// String returns the string representation -func (s NetworkInterfaceIpv6Address) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInterfaceIpv6Address) GoString() string { - return s.String() -} - -// SetIpv6Address sets the Ipv6Address field's value. -func (s *NetworkInterfaceIpv6Address) SetIpv6Address(v string) *NetworkInterfaceIpv6Address { - s.Ipv6Address = &v - return s -} - -// Describes a permission for a network interface. -type NetworkInterfacePermission struct { - _ struct{} `type:"structure"` - - // The AWS account ID. - AwsAccountId *string `locationName:"awsAccountId" type:"string"` - - // The AWS service. - AwsService *string `locationName:"awsService" type:"string"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // The ID of the network interface permission. - NetworkInterfacePermissionId *string `locationName:"networkInterfacePermissionId" type:"string"` - - // The type of permission. - Permission *string `locationName:"permission" type:"string" enum:"InterfacePermissionType"` - - // Information about the state of the permission. - PermissionState *NetworkInterfacePermissionState `locationName:"permissionState" type:"structure"` -} - -// String returns the string representation -func (s NetworkInterfacePermission) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInterfacePermission) GoString() string { - return s.String() -} - -// SetAwsAccountId sets the AwsAccountId field's value. -func (s *NetworkInterfacePermission) SetAwsAccountId(v string) *NetworkInterfacePermission { - s.AwsAccountId = &v - return s -} - -// SetAwsService sets the AwsService field's value. -func (s *NetworkInterfacePermission) SetAwsService(v string) *NetworkInterfacePermission { - s.AwsService = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *NetworkInterfacePermission) SetNetworkInterfaceId(v string) *NetworkInterfacePermission { - s.NetworkInterfaceId = &v - return s -} - -// SetNetworkInterfacePermissionId sets the NetworkInterfacePermissionId field's value. -func (s *NetworkInterfacePermission) SetNetworkInterfacePermissionId(v string) *NetworkInterfacePermission { - s.NetworkInterfacePermissionId = &v - return s -} - -// SetPermission sets the Permission field's value. -func (s *NetworkInterfacePermission) SetPermission(v string) *NetworkInterfacePermission { - s.Permission = &v - return s -} - -// SetPermissionState sets the PermissionState field's value. -func (s *NetworkInterfacePermission) SetPermissionState(v *NetworkInterfacePermissionState) *NetworkInterfacePermission { - s.PermissionState = v - return s -} - -// Describes the state of a network interface permission. -type NetworkInterfacePermissionState struct { - _ struct{} `type:"structure"` - - // The state of the permission. - State *string `locationName:"state" type:"string" enum:"NetworkInterfacePermissionStateCode"` - - // A status message, if applicable. - StatusMessage *string `locationName:"statusMessage" type:"string"` -} - -// String returns the string representation -func (s NetworkInterfacePermissionState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInterfacePermissionState) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *NetworkInterfacePermissionState) SetState(v string) *NetworkInterfacePermissionState { - s.State = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *NetworkInterfacePermissionState) SetStatusMessage(v string) *NetworkInterfacePermissionState { - s.StatusMessage = &v - return s -} - -// Describes the private IPv4 address of a network interface. -type NetworkInterfacePrivateIpAddress struct { - _ struct{} `type:"structure"` - - // The association information for an Elastic IP address (IPv4) associated with - // the network interface. - Association *NetworkInterfaceAssociation `locationName:"association" type:"structure"` - - // Indicates whether this IPv4 address is the primary private IPv4 address of - // the network interface. - Primary *bool `locationName:"primary" type:"boolean"` - - // The private DNS name. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - - // The private IPv4 address. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` -} - -// String returns the string representation -func (s NetworkInterfacePrivateIpAddress) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInterfacePrivateIpAddress) GoString() string { - return s.String() -} - -// SetAssociation sets the Association field's value. -func (s *NetworkInterfacePrivateIpAddress) SetAssociation(v *NetworkInterfaceAssociation) *NetworkInterfacePrivateIpAddress { - s.Association = v - return s -} - -// SetPrimary sets the Primary field's value. -func (s *NetworkInterfacePrivateIpAddress) SetPrimary(v bool) *NetworkInterfacePrivateIpAddress { - s.Primary = &v - return s -} - -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *NetworkInterfacePrivateIpAddress) SetPrivateDnsName(v string) *NetworkInterfacePrivateIpAddress { - s.PrivateDnsName = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *NetworkInterfacePrivateIpAddress) SetPrivateIpAddress(v string) *NetworkInterfacePrivateIpAddress { - s.PrivateIpAddress = &v - return s -} - -type NewDhcpConfiguration struct { - _ struct{} `type:"structure"` - - Key *string `locationName:"key" type:"string"` - - Values []*string `locationName:"Value" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s NewDhcpConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NewDhcpConfiguration) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *NewDhcpConfiguration) SetKey(v string) *NewDhcpConfiguration { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *NewDhcpConfiguration) SetValues(v []*string) *NewDhcpConfiguration { - s.Values = v - return s -} - -// The allocation strategy of On-Demand Instances in an EC2 Fleet. -type OnDemandOptions struct { - _ struct{} `type:"structure"` - - // The order of the launch template overrides to use in fulfilling On-Demand - // capacity. If you specify lowest-price, EC2 Fleet uses price to determine - // the order, launching the lowest price first. If you specify prioritized, - // EC2 Fleet uses the priority that you assigned to each launch template override, - // launching the highest priority first. If you do not specify a value, EC2 - // Fleet defaults to lowest-price. - AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"FleetOnDemandAllocationStrategy"` - - // The minimum target capacity for On-Demand Instances in the fleet. If the - // minimum target capacity is not reached, the fleet launches no instances. - MinTargetCapacity *int64 `locationName:"minTargetCapacity" type:"integer"` - - // Indicates that the fleet launches all On-Demand Instances into a single Availability - // Zone. - SingleAvailabilityZone *bool `locationName:"singleAvailabilityZone" type:"boolean"` - - // Indicates that the fleet uses a single instance type to launch all On-Demand - // Instances in the fleet. - SingleInstanceType *bool `locationName:"singleInstanceType" type:"boolean"` -} - -// String returns the string representation -func (s OnDemandOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OnDemandOptions) GoString() string { - return s.String() -} - -// SetAllocationStrategy sets the AllocationStrategy field's value. -func (s *OnDemandOptions) SetAllocationStrategy(v string) *OnDemandOptions { - s.AllocationStrategy = &v - return s -} - -// SetMinTargetCapacity sets the MinTargetCapacity field's value. -func (s *OnDemandOptions) SetMinTargetCapacity(v int64) *OnDemandOptions { - s.MinTargetCapacity = &v - return s -} - -// SetSingleAvailabilityZone sets the SingleAvailabilityZone field's value. -func (s *OnDemandOptions) SetSingleAvailabilityZone(v bool) *OnDemandOptions { - s.SingleAvailabilityZone = &v - return s -} - -// SetSingleInstanceType sets the SingleInstanceType field's value. -func (s *OnDemandOptions) SetSingleInstanceType(v bool) *OnDemandOptions { - s.SingleInstanceType = &v - return s -} - -// The allocation strategy of On-Demand Instances in an EC2 Fleet. -type OnDemandOptionsRequest struct { - _ struct{} `type:"structure"` - - // The order of the launch template overrides to use in fulfilling On-Demand - // capacity. If you specify lowest-price, EC2 Fleet uses price to determine - // the order, launching the lowest price first. If you specify prioritized, - // EC2 Fleet uses the priority that you assigned to each launch template override, - // launching the highest priority first. If you do not specify a value, EC2 - // Fleet defaults to lowest-price. - AllocationStrategy *string `type:"string" enum:"FleetOnDemandAllocationStrategy"` - - // The minimum target capacity for On-Demand Instances in the fleet. If the - // minimum target capacity is not reached, the fleet launches no instances. - MinTargetCapacity *int64 `type:"integer"` - - // Indicates that the fleet launches all On-Demand Instances into a single Availability - // Zone. - SingleAvailabilityZone *bool `type:"boolean"` - - // Indicates that the fleet uses a single instance type to launch all On-Demand - // Instances in the fleet. - SingleInstanceType *bool `type:"boolean"` -} - -// String returns the string representation -func (s OnDemandOptionsRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OnDemandOptionsRequest) GoString() string { - return s.String() -} - -// SetAllocationStrategy sets the AllocationStrategy field's value. -func (s *OnDemandOptionsRequest) SetAllocationStrategy(v string) *OnDemandOptionsRequest { - s.AllocationStrategy = &v - return s -} - -// SetMinTargetCapacity sets the MinTargetCapacity field's value. -func (s *OnDemandOptionsRequest) SetMinTargetCapacity(v int64) *OnDemandOptionsRequest { - s.MinTargetCapacity = &v - return s -} - -// SetSingleAvailabilityZone sets the SingleAvailabilityZone field's value. -func (s *OnDemandOptionsRequest) SetSingleAvailabilityZone(v bool) *OnDemandOptionsRequest { - s.SingleAvailabilityZone = &v - return s -} - -// SetSingleInstanceType sets the SingleInstanceType field's value. -func (s *OnDemandOptionsRequest) SetSingleInstanceType(v bool) *OnDemandOptionsRequest { - s.SingleInstanceType = &v - return s -} - -// Describes the data that identifies an Amazon FPGA image (AFI) on the PCI -// bus. -type PciId struct { - _ struct{} `type:"structure"` - - // The ID of the device. - DeviceId *string `type:"string"` - - // The ID of the subsystem. - SubsystemId *string `type:"string"` - - // The ID of the vendor for the subsystem. - SubsystemVendorId *string `type:"string"` - - // The ID of the vendor. - VendorId *string `type:"string"` -} - -// String returns the string representation -func (s PciId) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PciId) GoString() string { - return s.String() -} - -// SetDeviceId sets the DeviceId field's value. -func (s *PciId) SetDeviceId(v string) *PciId { - s.DeviceId = &v - return s -} - -// SetSubsystemId sets the SubsystemId field's value. -func (s *PciId) SetSubsystemId(v string) *PciId { - s.SubsystemId = &v - return s -} - -// SetSubsystemVendorId sets the SubsystemVendorId field's value. -func (s *PciId) SetSubsystemVendorId(v string) *PciId { - s.SubsystemVendorId = &v - return s -} - -// SetVendorId sets the VendorId field's value. -func (s *PciId) SetVendorId(v string) *PciId { - s.VendorId = &v - return s -} - -// Describes the VPC peering connection options. -type PeeringConnectionOptions struct { - _ struct{} `type:"structure"` - - // If true, the public DNS hostnames of instances in the specified VPC resolve - // to private IP addresses when queried from instances in the peer VPC. - AllowDnsResolutionFromRemoteVpc *bool `locationName:"allowDnsResolutionFromRemoteVpc" type:"boolean"` - - // If true, enables outbound communication from an EC2-Classic instance that's - // linked to a local VPC using ClassicLink to instances in a peer VPC. - AllowEgressFromLocalClassicLinkToRemoteVpc *bool `locationName:"allowEgressFromLocalClassicLinkToRemoteVpc" type:"boolean"` - - // If true, enables outbound communication from instances in a local VPC to - // an EC2-Classic instance that's linked to a peer VPC using ClassicLink. - AllowEgressFromLocalVpcToRemoteClassicLink *bool `locationName:"allowEgressFromLocalVpcToRemoteClassicLink" type:"boolean"` -} - -// String returns the string representation -func (s PeeringConnectionOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PeeringConnectionOptions) GoString() string { - return s.String() -} - -// SetAllowDnsResolutionFromRemoteVpc sets the AllowDnsResolutionFromRemoteVpc field's value. -func (s *PeeringConnectionOptions) SetAllowDnsResolutionFromRemoteVpc(v bool) *PeeringConnectionOptions { - s.AllowDnsResolutionFromRemoteVpc = &v - return s -} - -// SetAllowEgressFromLocalClassicLinkToRemoteVpc sets the AllowEgressFromLocalClassicLinkToRemoteVpc field's value. -func (s *PeeringConnectionOptions) SetAllowEgressFromLocalClassicLinkToRemoteVpc(v bool) *PeeringConnectionOptions { - s.AllowEgressFromLocalClassicLinkToRemoteVpc = &v - return s -} - -// SetAllowEgressFromLocalVpcToRemoteClassicLink sets the AllowEgressFromLocalVpcToRemoteClassicLink field's value. -func (s *PeeringConnectionOptions) SetAllowEgressFromLocalVpcToRemoteClassicLink(v bool) *PeeringConnectionOptions { - s.AllowEgressFromLocalVpcToRemoteClassicLink = &v - return s -} - -// The VPC peering connection options. -type PeeringConnectionOptionsRequest struct { - _ struct{} `type:"structure"` - - // If true, enables a local VPC to resolve public DNS hostnames to private IP - // addresses when queried from instances in the peer VPC. - AllowDnsResolutionFromRemoteVpc *bool `type:"boolean"` - - // If true, enables outbound communication from an EC2-Classic instance that's - // linked to a local VPC using ClassicLink to instances in a peer VPC. - AllowEgressFromLocalClassicLinkToRemoteVpc *bool `type:"boolean"` - - // If true, enables outbound communication from instances in a local VPC to - // an EC2-Classic instance that's linked to a peer VPC using ClassicLink. - AllowEgressFromLocalVpcToRemoteClassicLink *bool `type:"boolean"` -} - -// String returns the string representation -func (s PeeringConnectionOptionsRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PeeringConnectionOptionsRequest) GoString() string { - return s.String() -} - -// SetAllowDnsResolutionFromRemoteVpc sets the AllowDnsResolutionFromRemoteVpc field's value. -func (s *PeeringConnectionOptionsRequest) SetAllowDnsResolutionFromRemoteVpc(v bool) *PeeringConnectionOptionsRequest { - s.AllowDnsResolutionFromRemoteVpc = &v - return s -} - -// SetAllowEgressFromLocalClassicLinkToRemoteVpc sets the AllowEgressFromLocalClassicLinkToRemoteVpc field's value. -func (s *PeeringConnectionOptionsRequest) SetAllowEgressFromLocalClassicLinkToRemoteVpc(v bool) *PeeringConnectionOptionsRequest { - s.AllowEgressFromLocalClassicLinkToRemoteVpc = &v - return s -} - -// SetAllowEgressFromLocalVpcToRemoteClassicLink sets the AllowEgressFromLocalVpcToRemoteClassicLink field's value. -func (s *PeeringConnectionOptionsRequest) SetAllowEgressFromLocalVpcToRemoteClassicLink(v bool) *PeeringConnectionOptionsRequest { - s.AllowEgressFromLocalVpcToRemoteClassicLink = &v - return s -} - -// Describes the placement of an instance. -type Placement struct { - _ struct{} `type:"structure"` - - // The affinity setting for the instance on the Dedicated Host. This parameter - // is not supported for the ImportInstance command. - Affinity *string `locationName:"affinity" type:"string"` - - // The Availability Zone of the instance. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The name of the placement group the instance is in. - GroupName *string `locationName:"groupName" type:"string"` - - // The ID of the Dedicated Host on which the instance resides. This parameter - // is not supported for the ImportInstance command. - HostId *string `locationName:"hostId" type:"string"` - - // The number of the partition the instance is in. Valid only if the placement - // group strategy is set to partition. - PartitionNumber *int64 `locationName:"partitionNumber" type:"integer"` - - // Reserved for future use. - SpreadDomain *string `locationName:"spreadDomain" type:"string"` - - // The tenancy of the instance (if the instance is running in a VPC). An instance - // with a tenancy of dedicated runs on single-tenant hardware. The host tenancy - // is not supported for the ImportInstance command. - Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"` -} - -// String returns the string representation -func (s Placement) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Placement) GoString() string { - return s.String() -} - -// SetAffinity sets the Affinity field's value. -func (s *Placement) SetAffinity(v string) *Placement { - s.Affinity = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Placement) SetAvailabilityZone(v string) *Placement { - s.AvailabilityZone = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *Placement) SetGroupName(v string) *Placement { - s.GroupName = &v - return s -} - -// SetHostId sets the HostId field's value. -func (s *Placement) SetHostId(v string) *Placement { - s.HostId = &v - return s -} - -// SetPartitionNumber sets the PartitionNumber field's value. -func (s *Placement) SetPartitionNumber(v int64) *Placement { - s.PartitionNumber = &v - return s -} - -// SetSpreadDomain sets the SpreadDomain field's value. -func (s *Placement) SetSpreadDomain(v string) *Placement { - s.SpreadDomain = &v - return s -} - -// SetTenancy sets the Tenancy field's value. -func (s *Placement) SetTenancy(v string) *Placement { - s.Tenancy = &v - return s -} - -// Describes a placement group. -type PlacementGroup struct { - _ struct{} `type:"structure"` - - // The name of the placement group. - GroupName *string `locationName:"groupName" type:"string"` - - // The number of partitions. Valid only if strategy is set to partition. - PartitionCount *int64 `locationName:"partitionCount" type:"integer"` - - // The state of the placement group. - State *string `locationName:"state" type:"string" enum:"PlacementGroupState"` - - // The placement strategy. - Strategy *string `locationName:"strategy" type:"string" enum:"PlacementStrategy"` -} - -// String returns the string representation -func (s PlacementGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlacementGroup) GoString() string { - return s.String() -} - -// SetGroupName sets the GroupName field's value. -func (s *PlacementGroup) SetGroupName(v string) *PlacementGroup { - s.GroupName = &v - return s -} - -// SetPartitionCount sets the PartitionCount field's value. -func (s *PlacementGroup) SetPartitionCount(v int64) *PlacementGroup { - s.PartitionCount = &v - return s -} - -// SetState sets the State field's value. -func (s *PlacementGroup) SetState(v string) *PlacementGroup { - s.State = &v - return s -} - -// SetStrategy sets the Strategy field's value. -func (s *PlacementGroup) SetStrategy(v string) *PlacementGroup { - s.Strategy = &v - return s -} - -// Describes the placement of an instance. -type PlacementResponse struct { - _ struct{} `type:"structure"` - - // The name of the placement group the instance is in. - GroupName *string `locationName:"groupName" type:"string"` -} - -// String returns the string representation -func (s PlacementResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlacementResponse) GoString() string { - return s.String() -} - -// SetGroupName sets the GroupName field's value. -func (s *PlacementResponse) SetGroupName(v string) *PlacementResponse { - s.GroupName = &v - return s -} - -// Describes a range of ports. -type PortRange struct { - _ struct{} `type:"structure"` - - // The first port in the range. - From *int64 `locationName:"from" type:"integer"` - - // The last port in the range. - To *int64 `locationName:"to" type:"integer"` -} - -// String returns the string representation -func (s PortRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PortRange) GoString() string { - return s.String() -} - -// SetFrom sets the From field's value. -func (s *PortRange) SetFrom(v int64) *PortRange { - s.From = &v - return s -} - -// SetTo sets the To field's value. -func (s *PortRange) SetTo(v int64) *PortRange { - s.To = &v - return s -} - -// Describes prefixes for AWS services. -type PrefixList struct { - _ struct{} `type:"structure"` - - // The IP address range of the AWS service. - Cidrs []*string `locationName:"cidrSet" locationNameList:"item" type:"list"` - - // The ID of the prefix. - PrefixListId *string `locationName:"prefixListId" type:"string"` - - // The name of the prefix. - PrefixListName *string `locationName:"prefixListName" type:"string"` -} - -// String returns the string representation -func (s PrefixList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PrefixList) GoString() string { - return s.String() -} - -// SetCidrs sets the Cidrs field's value. -func (s *PrefixList) SetCidrs(v []*string) *PrefixList { - s.Cidrs = v - return s -} - -// SetPrefixListId sets the PrefixListId field's value. -func (s *PrefixList) SetPrefixListId(v string) *PrefixList { - s.PrefixListId = &v - return s -} - -// SetPrefixListName sets the PrefixListName field's value. -func (s *PrefixList) SetPrefixListName(v string) *PrefixList { - s.PrefixListName = &v - return s -} - -// Describes a prefix list ID. -type PrefixListId struct { - _ struct{} `type:"structure"` - - // A description for the security group rule that references this prefix list - // ID. - // - // Constraints: Up to 255 characters in length. Allowed characters are a-z, - // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$* - Description *string `locationName:"description" type:"string"` - - // The ID of the prefix. - PrefixListId *string `locationName:"prefixListId" type:"string"` -} - -// String returns the string representation -func (s PrefixListId) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PrefixListId) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *PrefixListId) SetDescription(v string) *PrefixListId { - s.Description = &v - return s -} - -// SetPrefixListId sets the PrefixListId field's value. -func (s *PrefixListId) SetPrefixListId(v string) *PrefixListId { - s.PrefixListId = &v - return s -} - -// Describes the price for a Reserved Instance. -type PriceSchedule struct { - _ struct{} `type:"structure"` - - // The current price schedule, as determined by the term remaining for the Reserved - // Instance in the listing. - // - // A specific price schedule is always in effect, but only one price schedule - // can be active at any time. Take, for example, a Reserved Instance listing - // that has five months remaining in its term. When you specify price schedules - // for five months and two months, this means that schedule 1, covering the - // first three months of the remaining term, will be active during months 5, - // 4, and 3. Then schedule 2, covering the last two months of the term, will - // be active for months 2 and 1. - Active *bool `locationName:"active" type:"boolean"` - - // The currency for transacting the Reserved Instance resale. At this time, - // the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // The fixed price for the term. - Price *float64 `locationName:"price" type:"double"` - - // The number of months remaining in the reservation. For example, 2 is the - // second to the last month before the capacity reservation expires. - Term *int64 `locationName:"term" type:"long"` -} - -// String returns the string representation -func (s PriceSchedule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PriceSchedule) GoString() string { - return s.String() -} - -// SetActive sets the Active field's value. -func (s *PriceSchedule) SetActive(v bool) *PriceSchedule { - s.Active = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *PriceSchedule) SetCurrencyCode(v string) *PriceSchedule { - s.CurrencyCode = &v - return s -} - -// SetPrice sets the Price field's value. -func (s *PriceSchedule) SetPrice(v float64) *PriceSchedule { - s.Price = &v - return s -} - -// SetTerm sets the Term field's value. -func (s *PriceSchedule) SetTerm(v int64) *PriceSchedule { - s.Term = &v - return s -} - -// Describes the price for a Reserved Instance. -type PriceScheduleSpecification struct { - _ struct{} `type:"structure"` - - // The currency for transacting the Reserved Instance resale. At this time, - // the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // The fixed price for the term. - Price *float64 `locationName:"price" type:"double"` - - // The number of months remaining in the reservation. For example, 2 is the - // second to the last month before the capacity reservation expires. - Term *int64 `locationName:"term" type:"long"` -} - -// String returns the string representation -func (s PriceScheduleSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PriceScheduleSpecification) GoString() string { - return s.String() -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *PriceScheduleSpecification) SetCurrencyCode(v string) *PriceScheduleSpecification { - s.CurrencyCode = &v - return s -} - -// SetPrice sets the Price field's value. -func (s *PriceScheduleSpecification) SetPrice(v float64) *PriceScheduleSpecification { - s.Price = &v - return s -} - -// SetTerm sets the Term field's value. -func (s *PriceScheduleSpecification) SetTerm(v int64) *PriceScheduleSpecification { - s.Term = &v - return s -} - -// Describes a Reserved Instance offering. -type PricingDetail struct { - _ struct{} `type:"structure"` - - // The number of reservations available for the price. - Count *int64 `locationName:"count" type:"integer"` - - // The price per instance. - Price *float64 `locationName:"price" type:"double"` -} - -// String returns the string representation -func (s PricingDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PricingDetail) GoString() string { - return s.String() -} - -// SetCount sets the Count field's value. -func (s *PricingDetail) SetCount(v int64) *PricingDetail { - s.Count = &v - return s -} - -// SetPrice sets the Price field's value. -func (s *PricingDetail) SetPrice(v float64) *PricingDetail { - s.Price = &v - return s -} - -// PrincipalIdFormat description -type PrincipalIdFormat struct { - _ struct{} `type:"structure"` - - // PrincipalIdFormatARN description - Arn *string `locationName:"arn" type:"string"` - - // PrincipalIdFormatStatuses description - Statuses []*IdFormat `locationName:"statusSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s PrincipalIdFormat) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PrincipalIdFormat) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *PrincipalIdFormat) SetArn(v string) *PrincipalIdFormat { - s.Arn = &v - return s -} - -// SetStatuses sets the Statuses field's value. -func (s *PrincipalIdFormat) SetStatuses(v []*IdFormat) *PrincipalIdFormat { - s.Statuses = v - return s -} - -// Describes a secondary private IPv4 address for a network interface. -type PrivateIpAddressSpecification struct { - _ struct{} `type:"structure"` - - // Indicates whether the private IPv4 address is the primary private IPv4 address. - // Only one IPv4 address can be designated as primary. - Primary *bool `locationName:"primary" type:"boolean"` - - // The private IPv4 addresses. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` -} - -// String returns the string representation -func (s PrivateIpAddressSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PrivateIpAddressSpecification) GoString() string { - return s.String() -} - -// SetPrimary sets the Primary field's value. -func (s *PrivateIpAddressSpecification) SetPrimary(v bool) *PrivateIpAddressSpecification { - s.Primary = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *PrivateIpAddressSpecification) SetPrivateIpAddress(v string) *PrivateIpAddressSpecification { - s.PrivateIpAddress = &v - return s -} - -// Describes a product code. -type ProductCode struct { - _ struct{} `type:"structure"` - - // The product code. - ProductCodeId *string `locationName:"productCode" type:"string"` - - // The type of product code. - ProductCodeType *string `locationName:"type" type:"string" enum:"ProductCodeValues"` -} - -// String returns the string representation -func (s ProductCode) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProductCode) GoString() string { - return s.String() -} - -// SetProductCodeId sets the ProductCodeId field's value. -func (s *ProductCode) SetProductCodeId(v string) *ProductCode { - s.ProductCodeId = &v - return s -} - -// SetProductCodeType sets the ProductCodeType field's value. -func (s *ProductCode) SetProductCodeType(v string) *ProductCode { - s.ProductCodeType = &v - return s -} - -// Describes a virtual private gateway propagating route. -type PropagatingVgw struct { - _ struct{} `type:"structure"` - - // The ID of the virtual private gateway. - GatewayId *string `locationName:"gatewayId" type:"string"` -} - -// String returns the string representation -func (s PropagatingVgw) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PropagatingVgw) GoString() string { - return s.String() -} - -// SetGatewayId sets the GatewayId field's value. -func (s *PropagatingVgw) SetGatewayId(v string) *PropagatingVgw { - s.GatewayId = &v - return s -} - -type ProvisionByoipCidrInput struct { - _ struct{} `type:"structure"` - - // The public IPv4 address range, in CIDR notation. The most specific prefix - // that you can specify is /24. The address range cannot overlap with another - // address range that you've brought to this or another region. - // - // Cidr is a required field - Cidr *string `type:"string" required:"true"` - - // A signed document that proves that you are authorized to bring the specified - // IP address range to Amazon using BYOIP. - CidrAuthorizationContext *CidrAuthorizationContext `type:"structure"` - - // A description for the address range and the address pool. - Description *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s ProvisionByoipCidrInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisionByoipCidrInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProvisionByoipCidrInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProvisionByoipCidrInput"} - if s.Cidr == nil { - invalidParams.Add(request.NewErrParamRequired("Cidr")) - } - if s.CidrAuthorizationContext != nil { - if err := s.CidrAuthorizationContext.Validate(); err != nil { - invalidParams.AddNested("CidrAuthorizationContext", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCidr sets the Cidr field's value. -func (s *ProvisionByoipCidrInput) SetCidr(v string) *ProvisionByoipCidrInput { - s.Cidr = &v - return s -} - -// SetCidrAuthorizationContext sets the CidrAuthorizationContext field's value. -func (s *ProvisionByoipCidrInput) SetCidrAuthorizationContext(v *CidrAuthorizationContext) *ProvisionByoipCidrInput { - s.CidrAuthorizationContext = v - return s -} - -// SetDescription sets the Description field's value. -func (s *ProvisionByoipCidrInput) SetDescription(v string) *ProvisionByoipCidrInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ProvisionByoipCidrInput) SetDryRun(v bool) *ProvisionByoipCidrInput { - s.DryRun = &v - return s -} - -type ProvisionByoipCidrOutput struct { - _ struct{} `type:"structure"` - - // Information about the address pool. - ByoipCidr *ByoipCidr `locationName:"byoipCidr" type:"structure"` -} - -// String returns the string representation -func (s ProvisionByoipCidrOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisionByoipCidrOutput) GoString() string { - return s.String() -} - -// SetByoipCidr sets the ByoipCidr field's value. -func (s *ProvisionByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *ProvisionByoipCidrOutput { - s.ByoipCidr = v - return s -} - -// Reserved. If you need to sustain traffic greater than the documented limits -// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), -// contact us through the Support Center (https://console.aws.amazon.com/support/home?). -type ProvisionedBandwidth struct { - _ struct{} `type:"structure"` - - // Reserved. If you need to sustain traffic greater than the documented limits - // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), - // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - ProvisionTime *time.Time `locationName:"provisionTime" type:"timestamp"` - - // Reserved. If you need to sustain traffic greater than the documented limits - // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), - // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - Provisioned *string `locationName:"provisioned" type:"string"` - - // Reserved. If you need to sustain traffic greater than the documented limits - // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), - // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - RequestTime *time.Time `locationName:"requestTime" type:"timestamp"` - - // Reserved. If you need to sustain traffic greater than the documented limits - // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), - // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - Requested *string `locationName:"requested" type:"string"` - - // Reserved. If you need to sustain traffic greater than the documented limits - // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), - // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - Status *string `locationName:"status" type:"string"` -} - -// String returns the string representation -func (s ProvisionedBandwidth) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisionedBandwidth) GoString() string { - return s.String() -} - -// SetProvisionTime sets the ProvisionTime field's value. -func (s *ProvisionedBandwidth) SetProvisionTime(v time.Time) *ProvisionedBandwidth { - s.ProvisionTime = &v - return s -} - -// SetProvisioned sets the Provisioned field's value. -func (s *ProvisionedBandwidth) SetProvisioned(v string) *ProvisionedBandwidth { - s.Provisioned = &v - return s -} - -// SetRequestTime sets the RequestTime field's value. -func (s *ProvisionedBandwidth) SetRequestTime(v time.Time) *ProvisionedBandwidth { - s.RequestTime = &v - return s -} - -// SetRequested sets the Requested field's value. -func (s *ProvisionedBandwidth) SetRequested(v string) *ProvisionedBandwidth { - s.Requested = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ProvisionedBandwidth) SetStatus(v string) *ProvisionedBandwidth { - s.Status = &v - return s -} - -// Describes an address pool. -type PublicIpv4Pool struct { - _ struct{} `type:"structure"` - - // A description of the address pool. - Description *string `locationName:"description" type:"string"` - - // The address ranges. - PoolAddressRanges []*PublicIpv4PoolRange `locationName:"poolAddressRangeSet" locationNameList:"item" type:"list"` - - // The ID of the IPv4 address pool. - PoolId *string `locationName:"poolId" type:"string"` - - // The total number of addresses. - TotalAddressCount *int64 `locationName:"totalAddressCount" type:"integer"` - - // The total number of available addresses. - TotalAvailableAddressCount *int64 `locationName:"totalAvailableAddressCount" type:"integer"` -} - -// String returns the string representation -func (s PublicIpv4Pool) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublicIpv4Pool) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *PublicIpv4Pool) SetDescription(v string) *PublicIpv4Pool { - s.Description = &v - return s -} - -// SetPoolAddressRanges sets the PoolAddressRanges field's value. -func (s *PublicIpv4Pool) SetPoolAddressRanges(v []*PublicIpv4PoolRange) *PublicIpv4Pool { - s.PoolAddressRanges = v - return s -} - -// SetPoolId sets the PoolId field's value. -func (s *PublicIpv4Pool) SetPoolId(v string) *PublicIpv4Pool { - s.PoolId = &v - return s -} - -// SetTotalAddressCount sets the TotalAddressCount field's value. -func (s *PublicIpv4Pool) SetTotalAddressCount(v int64) *PublicIpv4Pool { - s.TotalAddressCount = &v - return s -} - -// SetTotalAvailableAddressCount sets the TotalAvailableAddressCount field's value. -func (s *PublicIpv4Pool) SetTotalAvailableAddressCount(v int64) *PublicIpv4Pool { - s.TotalAvailableAddressCount = &v - return s -} - -// Describes an address range of an IPv4 address pool. -type PublicIpv4PoolRange struct { - _ struct{} `type:"structure"` - - // The number of addresses in the range. - AddressCount *int64 `locationName:"addressCount" type:"integer"` - - // The number of available addresses in the range. - AvailableAddressCount *int64 `locationName:"availableAddressCount" type:"integer"` - - // The first IP address in the range. - FirstAddress *string `locationName:"firstAddress" type:"string"` - - // The last IP address in the range. - LastAddress *string `locationName:"lastAddress" type:"string"` -} - -// String returns the string representation -func (s PublicIpv4PoolRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublicIpv4PoolRange) GoString() string { - return s.String() -} - -// SetAddressCount sets the AddressCount field's value. -func (s *PublicIpv4PoolRange) SetAddressCount(v int64) *PublicIpv4PoolRange { - s.AddressCount = &v - return s -} - -// SetAvailableAddressCount sets the AvailableAddressCount field's value. -func (s *PublicIpv4PoolRange) SetAvailableAddressCount(v int64) *PublicIpv4PoolRange { - s.AvailableAddressCount = &v - return s -} - -// SetFirstAddress sets the FirstAddress field's value. -func (s *PublicIpv4PoolRange) SetFirstAddress(v string) *PublicIpv4PoolRange { - s.FirstAddress = &v - return s -} - -// SetLastAddress sets the LastAddress field's value. -func (s *PublicIpv4PoolRange) SetLastAddress(v string) *PublicIpv4PoolRange { - s.LastAddress = &v - return s -} - -// Describes the result of the purchase. -type Purchase struct { - _ struct{} `type:"structure"` - - // The currency in which the UpfrontPrice and HourlyPrice amounts are specified. - // At this time, the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // The duration of the reservation's term in seconds. - Duration *int64 `locationName:"duration" type:"integer"` - - // The IDs of the Dedicated Hosts associated with the reservation. - HostIdSet []*string `locationName:"hostIdSet" locationNameList:"item" type:"list"` - - // The ID of the reservation. - HostReservationId *string `locationName:"hostReservationId" type:"string"` - - // The hourly price of the reservation per hour. - HourlyPrice *string `locationName:"hourlyPrice" type:"string"` - - // The instance family on the Dedicated Host that the reservation can be associated - // with. - InstanceFamily *string `locationName:"instanceFamily" type:"string"` - - // The payment option for the reservation. - PaymentOption *string `locationName:"paymentOption" type:"string" enum:"PaymentOption"` - - // The upfront price of the reservation. - UpfrontPrice *string `locationName:"upfrontPrice" type:"string"` -} - -// String returns the string representation -func (s Purchase) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Purchase) GoString() string { - return s.String() -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *Purchase) SetCurrencyCode(v string) *Purchase { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *Purchase) SetDuration(v int64) *Purchase { - s.Duration = &v - return s -} - -// SetHostIdSet sets the HostIdSet field's value. -func (s *Purchase) SetHostIdSet(v []*string) *Purchase { - s.HostIdSet = v - return s -} - -// SetHostReservationId sets the HostReservationId field's value. -func (s *Purchase) SetHostReservationId(v string) *Purchase { - s.HostReservationId = &v - return s -} - -// SetHourlyPrice sets the HourlyPrice field's value. -func (s *Purchase) SetHourlyPrice(v string) *Purchase { - s.HourlyPrice = &v - return s -} - -// SetInstanceFamily sets the InstanceFamily field's value. -func (s *Purchase) SetInstanceFamily(v string) *Purchase { - s.InstanceFamily = &v - return s -} - -// SetPaymentOption sets the PaymentOption field's value. -func (s *Purchase) SetPaymentOption(v string) *Purchase { - s.PaymentOption = &v - return s -} - -// SetUpfrontPrice sets the UpfrontPrice field's value. -func (s *Purchase) SetUpfrontPrice(v string) *Purchase { - s.UpfrontPrice = &v - return s -} - -type PurchaseHostReservationInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure idempotency of the - // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. - ClientToken *string `type:"string"` - - // The currency in which the totalUpfrontPrice, LimitPrice, and totalHourlyPrice - // amounts are specified. At this time, the only supported currency is USD. - CurrencyCode *string `type:"string" enum:"CurrencyCodeValues"` - - // The IDs of the Dedicated Hosts with which the reservation will be associated. - // - // HostIdSet is a required field - HostIdSet []*string `locationNameList:"item" type:"list" required:"true"` - - // The specified limit is checked against the total upfront cost of the reservation - // (calculated as the offering's upfront cost multiplied by the host count). - // If the total upfront cost is greater than the specified price limit, the - // request fails. This is used to ensure that the purchase does not exceed the - // expected upfront cost of the purchase. At this time, the only supported currency - // is USD. For example, to indicate a limit price of USD 100, specify 100.00. - LimitPrice *string `type:"string"` - - // The ID of the offering. - // - // OfferingId is a required field - OfferingId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PurchaseHostReservationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseHostReservationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseHostReservationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseHostReservationInput"} - if s.HostIdSet == nil { - invalidParams.Add(request.NewErrParamRequired("HostIdSet")) - } - if s.OfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("OfferingId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *PurchaseHostReservationInput) SetClientToken(v string) *PurchaseHostReservationInput { - s.ClientToken = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *PurchaseHostReservationInput) SetCurrencyCode(v string) *PurchaseHostReservationInput { - s.CurrencyCode = &v - return s -} - -// SetHostIdSet sets the HostIdSet field's value. -func (s *PurchaseHostReservationInput) SetHostIdSet(v []*string) *PurchaseHostReservationInput { - s.HostIdSet = v - return s -} - -// SetLimitPrice sets the LimitPrice field's value. -func (s *PurchaseHostReservationInput) SetLimitPrice(v string) *PurchaseHostReservationInput { - s.LimitPrice = &v - return s -} - -// SetOfferingId sets the OfferingId field's value. -func (s *PurchaseHostReservationInput) SetOfferingId(v string) *PurchaseHostReservationInput { - s.OfferingId = &v - return s -} - -type PurchaseHostReservationOutput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure idempotency of the - // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. - ClientToken *string `locationName:"clientToken" type:"string"` - - // The currency in which the totalUpfrontPrice and totalHourlyPrice amounts - // are specified. At this time, the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // Describes the details of the purchase. - Purchase []*Purchase `locationName:"purchase" locationNameList:"item" type:"list"` - - // The total hourly price of the reservation calculated per hour. - TotalHourlyPrice *string `locationName:"totalHourlyPrice" type:"string"` - - // The total amount charged to your account when you purchase the reservation. - TotalUpfrontPrice *string `locationName:"totalUpfrontPrice" type:"string"` -} - -// String returns the string representation -func (s PurchaseHostReservationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseHostReservationOutput) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *PurchaseHostReservationOutput) SetClientToken(v string) *PurchaseHostReservationOutput { - s.ClientToken = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *PurchaseHostReservationOutput) SetCurrencyCode(v string) *PurchaseHostReservationOutput { - s.CurrencyCode = &v - return s -} - -// SetPurchase sets the Purchase field's value. -func (s *PurchaseHostReservationOutput) SetPurchase(v []*Purchase) *PurchaseHostReservationOutput { - s.Purchase = v - return s -} - -// SetTotalHourlyPrice sets the TotalHourlyPrice field's value. -func (s *PurchaseHostReservationOutput) SetTotalHourlyPrice(v string) *PurchaseHostReservationOutput { - s.TotalHourlyPrice = &v - return s -} - -// SetTotalUpfrontPrice sets the TotalUpfrontPrice field's value. -func (s *PurchaseHostReservationOutput) SetTotalUpfrontPrice(v string) *PurchaseHostReservationOutput { - s.TotalUpfrontPrice = &v - return s -} - -// Describes a request to purchase Scheduled Instances. -type PurchaseRequest struct { - _ struct{} `type:"structure"` - - // The number of instances. - // - // InstanceCount is a required field - InstanceCount *int64 `type:"integer" required:"true"` - - // The purchase token. - // - // PurchaseToken is a required field - PurchaseToken *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PurchaseRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseRequest"} - if s.InstanceCount == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceCount")) - } - if s.PurchaseToken == nil { - invalidParams.Add(request.NewErrParamRequired("PurchaseToken")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *PurchaseRequest) SetInstanceCount(v int64) *PurchaseRequest { - s.InstanceCount = &v - return s -} - -// SetPurchaseToken sets the PurchaseToken field's value. -func (s *PurchaseRequest) SetPurchaseToken(v string) *PurchaseRequest { - s.PurchaseToken = &v - return s -} - -// Contains the parameters for PurchaseReservedInstancesOffering. -type PurchaseReservedInstancesOfferingInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The number of Reserved Instances to purchase. - // - // InstanceCount is a required field - InstanceCount *int64 `type:"integer" required:"true"` - - // Specified for Reserved Instance Marketplace offerings to limit the total - // order and ensure that the Reserved Instances are not purchased at unexpected - // prices. - LimitPrice *ReservedInstanceLimitPrice `locationName:"limitPrice" type:"structure"` - - // The ID of the Reserved Instance offering to purchase. - // - // ReservedInstancesOfferingId is a required field - ReservedInstancesOfferingId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PurchaseReservedInstancesOfferingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseReservedInstancesOfferingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseReservedInstancesOfferingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseReservedInstancesOfferingInput"} - if s.InstanceCount == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceCount")) - } - if s.ReservedInstancesOfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedInstancesOfferingId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *PurchaseReservedInstancesOfferingInput) SetDryRun(v bool) *PurchaseReservedInstancesOfferingInput { - s.DryRun = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *PurchaseReservedInstancesOfferingInput) SetInstanceCount(v int64) *PurchaseReservedInstancesOfferingInput { - s.InstanceCount = &v - return s -} - -// SetLimitPrice sets the LimitPrice field's value. -func (s *PurchaseReservedInstancesOfferingInput) SetLimitPrice(v *ReservedInstanceLimitPrice) *PurchaseReservedInstancesOfferingInput { - s.LimitPrice = v - return s -} - -// SetReservedInstancesOfferingId sets the ReservedInstancesOfferingId field's value. -func (s *PurchaseReservedInstancesOfferingInput) SetReservedInstancesOfferingId(v string) *PurchaseReservedInstancesOfferingInput { - s.ReservedInstancesOfferingId = &v - return s -} - -// Contains the output of PurchaseReservedInstancesOffering. -type PurchaseReservedInstancesOfferingOutput struct { - _ struct{} `type:"structure"` - - // The IDs of the purchased Reserved Instances. - ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` -} - -// String returns the string representation -func (s PurchaseReservedInstancesOfferingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseReservedInstancesOfferingOutput) GoString() string { - return s.String() -} - -// SetReservedInstancesId sets the ReservedInstancesId field's value. -func (s *PurchaseReservedInstancesOfferingOutput) SetReservedInstancesId(v string) *PurchaseReservedInstancesOfferingOutput { - s.ReservedInstancesId = &v - return s -} - -// Contains the parameters for PurchaseScheduledInstances. -type PurchaseScheduledInstancesInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that ensures the idempotency of the request. - // For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string" idempotencyToken:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more purchase requests. - // - // PurchaseRequests is a required field - PurchaseRequests []*PurchaseRequest `locationName:"PurchaseRequest" locationNameList:"PurchaseRequest" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s PurchaseScheduledInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseScheduledInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseScheduledInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseScheduledInstancesInput"} - if s.PurchaseRequests == nil { - invalidParams.Add(request.NewErrParamRequired("PurchaseRequests")) - } - if s.PurchaseRequests != nil && len(s.PurchaseRequests) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PurchaseRequests", 1)) - } - if s.PurchaseRequests != nil { - for i, v := range s.PurchaseRequests { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PurchaseRequests", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *PurchaseScheduledInstancesInput) SetClientToken(v string) *PurchaseScheduledInstancesInput { - s.ClientToken = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *PurchaseScheduledInstancesInput) SetDryRun(v bool) *PurchaseScheduledInstancesInput { - s.DryRun = &v - return s -} - -// SetPurchaseRequests sets the PurchaseRequests field's value. -func (s *PurchaseScheduledInstancesInput) SetPurchaseRequests(v []*PurchaseRequest) *PurchaseScheduledInstancesInput { - s.PurchaseRequests = v - return s -} - -// Contains the output of PurchaseScheduledInstances. -type PurchaseScheduledInstancesOutput struct { - _ struct{} `type:"structure"` - - // Information about the Scheduled Instances. - ScheduledInstanceSet []*ScheduledInstance `locationName:"scheduledInstanceSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s PurchaseScheduledInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseScheduledInstancesOutput) GoString() string { - return s.String() -} - -// SetScheduledInstanceSet sets the ScheduledInstanceSet field's value. -func (s *PurchaseScheduledInstancesOutput) SetScheduledInstanceSet(v []*ScheduledInstance) *PurchaseScheduledInstancesOutput { - s.ScheduledInstanceSet = v - return s -} - -type RebootInstancesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more instance IDs. - // - // InstanceIds is a required field - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` -} - -// String returns the string representation -func (s RebootInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootInstancesInput"} - if s.InstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *RebootInstancesInput) SetDryRun(v bool) *RebootInstancesInput { - s.DryRun = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *RebootInstancesInput) SetInstanceIds(v []*string) *RebootInstancesInput { - s.InstanceIds = v - return s -} - -type RebootInstancesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RebootInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootInstancesOutput) GoString() string { - return s.String() -} - -// Describes a recurring charge. -type RecurringCharge struct { - _ struct{} `type:"structure"` - - // The amount of the recurring charge. - Amount *float64 `locationName:"amount" type:"double"` - - // The frequency of the recurring charge. - Frequency *string `locationName:"frequency" type:"string" enum:"RecurringChargeFrequency"` -} - -// String returns the string representation -func (s RecurringCharge) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecurringCharge) GoString() string { - return s.String() -} - -// SetAmount sets the Amount field's value. -func (s *RecurringCharge) SetAmount(v float64) *RecurringCharge { - s.Amount = &v - return s -} - -// SetFrequency sets the Frequency field's value. -func (s *RecurringCharge) SetFrequency(v string) *RecurringCharge { - s.Frequency = &v - return s -} - -// Describes a region. -type Region struct { - _ struct{} `type:"structure"` - - // The region service endpoint. - Endpoint *string `locationName:"regionEndpoint" type:"string"` - - // The name of the region. - RegionName *string `locationName:"regionName" type:"string"` -} - -// String returns the string representation -func (s Region) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Region) GoString() string { - return s.String() -} - -// SetEndpoint sets the Endpoint field's value. -func (s *Region) SetEndpoint(v string) *Region { - s.Endpoint = &v - return s -} - -// SetRegionName sets the RegionName field's value. -func (s *Region) SetRegionName(v string) *Region { - s.RegionName = &v - return s -} - -// Contains the parameters for RegisterImage. -type RegisterImageInput struct { - _ struct{} `type:"structure"` - - // The architecture of the AMI. - // - // Default: For Amazon EBS-backed AMIs, i386. For instance store-backed AMIs, - // the architecture specified in the manifest file. - Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` - - // The billing product codes. Your account must be authorized to specify billing - // product codes. Otherwise, you can use the AWS Marketplace to bill for the - // use of an AMI. - BillingProducts []*string `locationName:"BillingProduct" locationNameList:"item" type:"list"` - - // One or more block device mapping entries. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` - - // A description for your AMI. - Description *string `locationName:"description" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Set to true to enable enhanced networking with ENA for the AMI and any instances - // that you launch from the AMI. - // - // This option is supported only for HVM AMIs. Specifying this option with a - // PV AMI can make instances launched from the AMI unreachable. - EnaSupport *bool `locationName:"enaSupport" type:"boolean"` - - // The full path to your AMI manifest in Amazon S3 storage. - ImageLocation *string `type:"string"` - - // The ID of the kernel. - KernelId *string `locationName:"kernelId" type:"string"` - - // A name for your AMI. - // - // Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets - // ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), - // at-signs (@), or underscores(_) - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The ID of the RAM disk. - RamdiskId *string `locationName:"ramdiskId" type:"string"` - - // The device name of the root device volume (for example, /dev/sda1). - RootDeviceName *string `locationName:"rootDeviceName" type:"string"` - - // Set to simple to enable enhanced networking with the Intel 82599 Virtual - // Function interface for the AMI and any instances that you launch from the - // AMI. - // - // There is no way to disable sriovNetSupport at this time. - // - // This option is supported only for HVM AMIs. Specifying this option with a - // PV AMI can make instances launched from the AMI unreachable. - SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"` - - // The type of virtualization (hvm | paravirtual). - // - // Default: paravirtual - VirtualizationType *string `locationName:"virtualizationType" type:"string"` -} - -// String returns the string representation -func (s RegisterImageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterImageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterImageInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArchitecture sets the Architecture field's value. -func (s *RegisterImageInput) SetArchitecture(v string) *RegisterImageInput { - s.Architecture = &v - return s -} - -// SetBillingProducts sets the BillingProducts field's value. -func (s *RegisterImageInput) SetBillingProducts(v []*string) *RegisterImageInput { - s.BillingProducts = v - return s -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *RegisterImageInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *RegisterImageInput { - s.BlockDeviceMappings = v - return s -} - -// SetDescription sets the Description field's value. -func (s *RegisterImageInput) SetDescription(v string) *RegisterImageInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *RegisterImageInput) SetDryRun(v bool) *RegisterImageInput { - s.DryRun = &v - return s -} - -// SetEnaSupport sets the EnaSupport field's value. -func (s *RegisterImageInput) SetEnaSupport(v bool) *RegisterImageInput { - s.EnaSupport = &v - return s -} - -// SetImageLocation sets the ImageLocation field's value. -func (s *RegisterImageInput) SetImageLocation(v string) *RegisterImageInput { - s.ImageLocation = &v - return s -} - -// SetKernelId sets the KernelId field's value. -func (s *RegisterImageInput) SetKernelId(v string) *RegisterImageInput { - s.KernelId = &v - return s -} - -// SetName sets the Name field's value. -func (s *RegisterImageInput) SetName(v string) *RegisterImageInput { - s.Name = &v - return s -} - -// SetRamdiskId sets the RamdiskId field's value. -func (s *RegisterImageInput) SetRamdiskId(v string) *RegisterImageInput { - s.RamdiskId = &v - return s -} - -// SetRootDeviceName sets the RootDeviceName field's value. -func (s *RegisterImageInput) SetRootDeviceName(v string) *RegisterImageInput { - s.RootDeviceName = &v - return s -} - -// SetSriovNetSupport sets the SriovNetSupport field's value. -func (s *RegisterImageInput) SetSriovNetSupport(v string) *RegisterImageInput { - s.SriovNetSupport = &v - return s -} - -// SetVirtualizationType sets the VirtualizationType field's value. -func (s *RegisterImageInput) SetVirtualizationType(v string) *RegisterImageInput { - s.VirtualizationType = &v - return s -} - -// Contains the output of RegisterImage. -type RegisterImageOutput struct { - _ struct{} `type:"structure"` - - // The ID of the newly registered AMI. - ImageId *string `locationName:"imageId" type:"string"` -} - -// String returns the string representation -func (s RegisterImageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterImageOutput) GoString() string { - return s.String() -} - -// SetImageId sets the ImageId field's value. -func (s *RegisterImageOutput) SetImageId(v string) *RegisterImageOutput { - s.ImageId = &v - return s -} - -type RejectTransitGatewayVpcAttachmentInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the attachment. - // - // TransitGatewayAttachmentId is a required field - TransitGatewayAttachmentId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RejectTransitGatewayVpcAttachmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectTransitGatewayVpcAttachmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RejectTransitGatewayVpcAttachmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RejectTransitGatewayVpcAttachmentInput"} - if s.TransitGatewayAttachmentId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *RejectTransitGatewayVpcAttachmentInput) SetDryRun(v bool) *RejectTransitGatewayVpcAttachmentInput { - s.DryRun = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *RejectTransitGatewayVpcAttachmentInput) SetTransitGatewayAttachmentId(v string) *RejectTransitGatewayVpcAttachmentInput { - s.TransitGatewayAttachmentId = &v - return s -} - -type RejectTransitGatewayVpcAttachmentOutput struct { - _ struct{} `type:"structure"` - - // Information about the attachment. - TransitGatewayVpcAttachment *TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachment" type:"structure"` -} - -// String returns the string representation -func (s RejectTransitGatewayVpcAttachmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectTransitGatewayVpcAttachmentOutput) GoString() string { - return s.String() -} - -// SetTransitGatewayVpcAttachment sets the TransitGatewayVpcAttachment field's value. -func (s *RejectTransitGatewayVpcAttachmentOutput) SetTransitGatewayVpcAttachment(v *TransitGatewayVpcAttachment) *RejectTransitGatewayVpcAttachmentOutput { - s.TransitGatewayVpcAttachment = v - return s -} - -type RejectVpcEndpointConnectionsInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the service. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` - - // The IDs of one or more VPC endpoints. - // - // VpcEndpointIds is a required field - VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s RejectVpcEndpointConnectionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectVpcEndpointConnectionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RejectVpcEndpointConnectionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RejectVpcEndpointConnectionsInput"} - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) - } - if s.VpcEndpointIds == nil { - invalidParams.Add(request.NewErrParamRequired("VpcEndpointIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *RejectVpcEndpointConnectionsInput) SetDryRun(v bool) *RejectVpcEndpointConnectionsInput { - s.DryRun = &v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *RejectVpcEndpointConnectionsInput) SetServiceId(v string) *RejectVpcEndpointConnectionsInput { - s.ServiceId = &v - return s -} - -// SetVpcEndpointIds sets the VpcEndpointIds field's value. -func (s *RejectVpcEndpointConnectionsInput) SetVpcEndpointIds(v []*string) *RejectVpcEndpointConnectionsInput { - s.VpcEndpointIds = v - return s -} - -type RejectVpcEndpointConnectionsOutput struct { - _ struct{} `type:"structure"` - - // Information about the endpoints that were not rejected, if applicable. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s RejectVpcEndpointConnectionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectVpcEndpointConnectionsOutput) GoString() string { - return s.String() -} - -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *RejectVpcEndpointConnectionsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *RejectVpcEndpointConnectionsOutput { - s.Unsuccessful = v - return s -} - -type RejectVpcPeeringConnectionInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC peering connection. - // - // VpcPeeringConnectionId is a required field - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string" required:"true"` -} - -// String returns the string representation -func (s RejectVpcPeeringConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectVpcPeeringConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RejectVpcPeeringConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RejectVpcPeeringConnectionInput"} - if s.VpcPeeringConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcPeeringConnectionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *RejectVpcPeeringConnectionInput) SetDryRun(v bool) *RejectVpcPeeringConnectionInput { - s.DryRun = &v - return s -} - -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *RejectVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *RejectVpcPeeringConnectionInput { - s.VpcPeeringConnectionId = &v - return s -} - -type RejectVpcPeeringConnectionOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s RejectVpcPeeringConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectVpcPeeringConnectionOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *RejectVpcPeeringConnectionOutput) SetReturn(v bool) *RejectVpcPeeringConnectionOutput { - s.Return = &v - return s -} - -type ReleaseAddressInput struct { - _ struct{} `type:"structure"` - - // [EC2-VPC] The allocation ID. Required for EC2-VPC. - AllocationId *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // [EC2-Classic] The Elastic IP address. Required for EC2-Classic. - PublicIp *string `type:"string"` -} - -// String returns the string representation -func (s ReleaseAddressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReleaseAddressInput) GoString() string { - return s.String() -} - -// SetAllocationId sets the AllocationId field's value. -func (s *ReleaseAddressInput) SetAllocationId(v string) *ReleaseAddressInput { - s.AllocationId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ReleaseAddressInput) SetDryRun(v bool) *ReleaseAddressInput { - s.DryRun = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *ReleaseAddressInput) SetPublicIp(v string) *ReleaseAddressInput { - s.PublicIp = &v - return s -} - -type ReleaseAddressOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ReleaseAddressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReleaseAddressOutput) GoString() string { - return s.String() -} - -type ReleaseHostsInput struct { - _ struct{} `type:"structure"` - - // The IDs of the Dedicated Hosts to release. - // - // HostIds is a required field - HostIds []*string `locationName:"hostId" locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s ReleaseHostsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReleaseHostsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReleaseHostsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReleaseHostsInput"} - if s.HostIds == nil { - invalidParams.Add(request.NewErrParamRequired("HostIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostIds sets the HostIds field's value. -func (s *ReleaseHostsInput) SetHostIds(v []*string) *ReleaseHostsInput { - s.HostIds = v - return s -} - -type ReleaseHostsOutput struct { - _ struct{} `type:"structure"` - - // The IDs of the Dedicated Hosts that were successfully released. - Successful []*string `locationName:"successful" locationNameList:"item" type:"list"` - - // The IDs of the Dedicated Hosts that could not be released, including an error - // message. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s ReleaseHostsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReleaseHostsOutput) GoString() string { - return s.String() -} - -// SetSuccessful sets the Successful field's value. -func (s *ReleaseHostsOutput) SetSuccessful(v []*string) *ReleaseHostsOutput { - s.Successful = v - return s -} - -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *ReleaseHostsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *ReleaseHostsOutput { - s.Unsuccessful = v - return s -} - -type ReplaceIamInstanceProfileAssociationInput struct { - _ struct{} `type:"structure"` - - // The ID of the existing IAM instance profile association. - // - // AssociationId is a required field - AssociationId *string `type:"string" required:"true"` - - // The IAM instance profile. - // - // IamInstanceProfile is a required field - IamInstanceProfile *IamInstanceProfileSpecification `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ReplaceIamInstanceProfileAssociationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceIamInstanceProfileAssociationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplaceIamInstanceProfileAssociationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplaceIamInstanceProfileAssociationInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) - } - if s.IamInstanceProfile == nil { - invalidParams.Add(request.NewErrParamRequired("IamInstanceProfile")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationId sets the AssociationId field's value. -func (s *ReplaceIamInstanceProfileAssociationInput) SetAssociationId(v string) *ReplaceIamInstanceProfileAssociationInput { - s.AssociationId = &v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *ReplaceIamInstanceProfileAssociationInput) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *ReplaceIamInstanceProfileAssociationInput { - s.IamInstanceProfile = v - return s -} - -type ReplaceIamInstanceProfileAssociationOutput struct { - _ struct{} `type:"structure"` - - // Information about the IAM instance profile association. - IamInstanceProfileAssociation *IamInstanceProfileAssociation `locationName:"iamInstanceProfileAssociation" type:"structure"` -} - -// String returns the string representation -func (s ReplaceIamInstanceProfileAssociationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceIamInstanceProfileAssociationOutput) GoString() string { - return s.String() -} - -// SetIamInstanceProfileAssociation sets the IamInstanceProfileAssociation field's value. -func (s *ReplaceIamInstanceProfileAssociationOutput) SetIamInstanceProfileAssociation(v *IamInstanceProfileAssociation) *ReplaceIamInstanceProfileAssociationOutput { - s.IamInstanceProfileAssociation = v - return s -} - -type ReplaceNetworkAclAssociationInput struct { - _ struct{} `type:"structure"` - - // The ID of the current association between the original network ACL and the - // subnet. - // - // AssociationId is a required field - AssociationId *string `locationName:"associationId" type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the new network ACL to associate with the subnet. - // - // NetworkAclId is a required field - NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` -} - -// String returns the string representation -func (s ReplaceNetworkAclAssociationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceNetworkAclAssociationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplaceNetworkAclAssociationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplaceNetworkAclAssociationInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) - } - if s.NetworkAclId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationId sets the AssociationId field's value. -func (s *ReplaceNetworkAclAssociationInput) SetAssociationId(v string) *ReplaceNetworkAclAssociationInput { - s.AssociationId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ReplaceNetworkAclAssociationInput) SetDryRun(v bool) *ReplaceNetworkAclAssociationInput { - s.DryRun = &v - return s -} - -// SetNetworkAclId sets the NetworkAclId field's value. -func (s *ReplaceNetworkAclAssociationInput) SetNetworkAclId(v string) *ReplaceNetworkAclAssociationInput { - s.NetworkAclId = &v - return s -} - -type ReplaceNetworkAclAssociationOutput struct { - _ struct{} `type:"structure"` - - // The ID of the new association. - NewAssociationId *string `locationName:"newAssociationId" type:"string"` -} - -// String returns the string representation -func (s ReplaceNetworkAclAssociationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceNetworkAclAssociationOutput) GoString() string { - return s.String() -} - -// SetNewAssociationId sets the NewAssociationId field's value. -func (s *ReplaceNetworkAclAssociationOutput) SetNewAssociationId(v string) *ReplaceNetworkAclAssociationOutput { - s.NewAssociationId = &v - return s -} - -type ReplaceNetworkAclEntryInput struct { - _ struct{} `type:"structure"` - - // The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24). - CidrBlock *string `locationName:"cidrBlock" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Indicates whether to replace the egress rule. - // - // Default: If no value is specified, we replace the ingress rule. - // - // Egress is a required field - Egress *bool `locationName:"egress" type:"boolean" required:"true"` - - // ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol - // 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block. - IcmpTypeCode *IcmpTypeCode `locationName:"Icmp" type:"structure"` - - // The IPv6 network range to allow or deny, in CIDR notation (for example 2001:bd8:1234:1a00::/64). - Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` - - // The ID of the ACL. - // - // NetworkAclId is a required field - NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` - - // TCP or UDP protocols: The range of ports the rule applies to. Required if - // specifying protocol 6 (TCP) or 17 (UDP). - PortRange *PortRange `locationName:"portRange" type:"structure"` - - // The protocol number. A value of "-1" means all protocols. If you specify - // "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), - // traffic on all ports is allowed, regardless of any ports or ICMP types or - // codes that you specify. If you specify protocol "58" (ICMPv6) and specify - // an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless - // of any that you specify. If you specify protocol "58" (ICMPv6) and specify - // an IPv6 CIDR block, you must specify an ICMP type and code. - // - // Protocol is a required field - Protocol *string `locationName:"protocol" type:"string" required:"true"` - - // Indicates whether to allow or deny the traffic that matches the rule. - // - // RuleAction is a required field - RuleAction *string `locationName:"ruleAction" type:"string" required:"true" enum:"RuleAction"` - - // The rule number of the entry to replace. - // - // RuleNumber is a required field - RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"` -} - -// String returns the string representation -func (s ReplaceNetworkAclEntryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceNetworkAclEntryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplaceNetworkAclEntryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplaceNetworkAclEntryInput"} - if s.Egress == nil { - invalidParams.Add(request.NewErrParamRequired("Egress")) - } - if s.NetworkAclId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) - } - if s.Protocol == nil { - invalidParams.Add(request.NewErrParamRequired("Protocol")) - } - if s.RuleAction == nil { - invalidParams.Add(request.NewErrParamRequired("RuleAction")) - } - if s.RuleNumber == nil { - invalidParams.Add(request.NewErrParamRequired("RuleNumber")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCidrBlock sets the CidrBlock field's value. -func (s *ReplaceNetworkAclEntryInput) SetCidrBlock(v string) *ReplaceNetworkAclEntryInput { - s.CidrBlock = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ReplaceNetworkAclEntryInput) SetDryRun(v bool) *ReplaceNetworkAclEntryInput { - s.DryRun = &v - return s -} - -// SetEgress sets the Egress field's value. -func (s *ReplaceNetworkAclEntryInput) SetEgress(v bool) *ReplaceNetworkAclEntryInput { - s.Egress = &v - return s -} - -// SetIcmpTypeCode sets the IcmpTypeCode field's value. -func (s *ReplaceNetworkAclEntryInput) SetIcmpTypeCode(v *IcmpTypeCode) *ReplaceNetworkAclEntryInput { - s.IcmpTypeCode = v - return s -} - -// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. -func (s *ReplaceNetworkAclEntryInput) SetIpv6CidrBlock(v string) *ReplaceNetworkAclEntryInput { - s.Ipv6CidrBlock = &v - return s -} - -// SetNetworkAclId sets the NetworkAclId field's value. -func (s *ReplaceNetworkAclEntryInput) SetNetworkAclId(v string) *ReplaceNetworkAclEntryInput { - s.NetworkAclId = &v - return s -} - -// SetPortRange sets the PortRange field's value. -func (s *ReplaceNetworkAclEntryInput) SetPortRange(v *PortRange) *ReplaceNetworkAclEntryInput { - s.PortRange = v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *ReplaceNetworkAclEntryInput) SetProtocol(v string) *ReplaceNetworkAclEntryInput { - s.Protocol = &v - return s -} - -// SetRuleAction sets the RuleAction field's value. -func (s *ReplaceNetworkAclEntryInput) SetRuleAction(v string) *ReplaceNetworkAclEntryInput { - s.RuleAction = &v - return s -} - -// SetRuleNumber sets the RuleNumber field's value. -func (s *ReplaceNetworkAclEntryInput) SetRuleNumber(v int64) *ReplaceNetworkAclEntryInput { - s.RuleNumber = &v - return s -} - -type ReplaceNetworkAclEntryOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ReplaceNetworkAclEntryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceNetworkAclEntryOutput) GoString() string { - return s.String() -} - -type ReplaceRouteInput struct { - _ struct{} `type:"structure"` - - // The IPv4 CIDR address block used for the destination match. The value that - // you provide must match the CIDR of an existing route in the table. - DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` - - // The IPv6 CIDR address block used for the destination match. The value that - // you provide must match the CIDR of an existing route in the table. - DestinationIpv6CidrBlock *string `locationName:"destinationIpv6CidrBlock" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // [IPv6 traffic only] The ID of an egress-only internet gateway. - EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` - - // The ID of an internet gateway or virtual private gateway. - GatewayId *string `locationName:"gatewayId" type:"string"` - - // The ID of a NAT instance in your VPC. - InstanceId *string `locationName:"instanceId" type:"string"` - - // [IPv4 traffic only] The ID of a NAT gateway. - NatGatewayId *string `locationName:"natGatewayId" type:"string"` - - // The ID of a network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // The ID of the route table. - // - // RouteTableId is a required field - RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` - - // The ID of a transit gateway. - TransitGatewayId *string `type:"string"` - - // The ID of a VPC peering connection. - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` -} - -// String returns the string representation -func (s ReplaceRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplaceRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplaceRouteInput"} - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *ReplaceRouteInput) SetDestinationCidrBlock(v string) *ReplaceRouteInput { - s.DestinationCidrBlock = &v - return s -} - -// SetDestinationIpv6CidrBlock sets the DestinationIpv6CidrBlock field's value. -func (s *ReplaceRouteInput) SetDestinationIpv6CidrBlock(v string) *ReplaceRouteInput { - s.DestinationIpv6CidrBlock = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ReplaceRouteInput) SetDryRun(v bool) *ReplaceRouteInput { - s.DryRun = &v - return s -} - -// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. -func (s *ReplaceRouteInput) SetEgressOnlyInternetGatewayId(v string) *ReplaceRouteInput { - s.EgressOnlyInternetGatewayId = &v - return s -} - -// SetGatewayId sets the GatewayId field's value. -func (s *ReplaceRouteInput) SetGatewayId(v string) *ReplaceRouteInput { - s.GatewayId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ReplaceRouteInput) SetInstanceId(v string) *ReplaceRouteInput { - s.InstanceId = &v - return s -} - -// SetNatGatewayId sets the NatGatewayId field's value. -func (s *ReplaceRouteInput) SetNatGatewayId(v string) *ReplaceRouteInput { - s.NatGatewayId = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *ReplaceRouteInput) SetNetworkInterfaceId(v string) *ReplaceRouteInput { - s.NetworkInterfaceId = &v - return s -} - -// SetRouteTableId sets the RouteTableId field's value. -func (s *ReplaceRouteInput) SetRouteTableId(v string) *ReplaceRouteInput { - s.RouteTableId = &v - return s -} - -// SetTransitGatewayId sets the TransitGatewayId field's value. -func (s *ReplaceRouteInput) SetTransitGatewayId(v string) *ReplaceRouteInput { - s.TransitGatewayId = &v - return s -} - -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *ReplaceRouteInput) SetVpcPeeringConnectionId(v string) *ReplaceRouteInput { - s.VpcPeeringConnectionId = &v - return s -} - -type ReplaceRouteOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ReplaceRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceRouteOutput) GoString() string { - return s.String() -} - -type ReplaceRouteTableAssociationInput struct { - _ struct{} `type:"structure"` - - // The association ID. - // - // AssociationId is a required field - AssociationId *string `locationName:"associationId" type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the new route table to associate with the subnet. - // - // RouteTableId is a required field - RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` -} - -// String returns the string representation -func (s ReplaceRouteTableAssociationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceRouteTableAssociationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplaceRouteTableAssociationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplaceRouteTableAssociationInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) - } - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationId sets the AssociationId field's value. -func (s *ReplaceRouteTableAssociationInput) SetAssociationId(v string) *ReplaceRouteTableAssociationInput { - s.AssociationId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ReplaceRouteTableAssociationInput) SetDryRun(v bool) *ReplaceRouteTableAssociationInput { - s.DryRun = &v - return s -} - -// SetRouteTableId sets the RouteTableId field's value. -func (s *ReplaceRouteTableAssociationInput) SetRouteTableId(v string) *ReplaceRouteTableAssociationInput { - s.RouteTableId = &v - return s -} - -type ReplaceRouteTableAssociationOutput struct { - _ struct{} `type:"structure"` - - // The ID of the new association. - NewAssociationId *string `locationName:"newAssociationId" type:"string"` -} - -// String returns the string representation -func (s ReplaceRouteTableAssociationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceRouteTableAssociationOutput) GoString() string { - return s.String() -} - -// SetNewAssociationId sets the NewAssociationId field's value. -func (s *ReplaceRouteTableAssociationOutput) SetNewAssociationId(v string) *ReplaceRouteTableAssociationOutput { - s.NewAssociationId = &v - return s -} - -type ReplaceTransitGatewayRouteInput struct { - _ struct{} `type:"structure"` - - // Indicates whether traffic matching this route is to be dropped. - Blackhole *bool `type:"boolean"` - - // The CIDR range used for the destination match. Routing decisions are based - // on the most specific match. - // - // DestinationCidrBlock is a required field - DestinationCidrBlock *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the attachment. - TransitGatewayAttachmentId *string `type:"string"` - - // The ID of the route table. - // - // TransitGatewayRouteTableId is a required field - TransitGatewayRouteTableId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ReplaceTransitGatewayRouteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceTransitGatewayRouteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplaceTransitGatewayRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplaceTransitGatewayRouteInput"} - if s.DestinationCidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) - } - if s.TransitGatewayRouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBlackhole sets the Blackhole field's value. -func (s *ReplaceTransitGatewayRouteInput) SetBlackhole(v bool) *ReplaceTransitGatewayRouteInput { - s.Blackhole = &v - return s -} - -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *ReplaceTransitGatewayRouteInput) SetDestinationCidrBlock(v string) *ReplaceTransitGatewayRouteInput { - s.DestinationCidrBlock = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ReplaceTransitGatewayRouteInput) SetDryRun(v bool) *ReplaceTransitGatewayRouteInput { - s.DryRun = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *ReplaceTransitGatewayRouteInput) SetTransitGatewayAttachmentId(v string) *ReplaceTransitGatewayRouteInput { - s.TransitGatewayAttachmentId = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *ReplaceTransitGatewayRouteInput) SetTransitGatewayRouteTableId(v string) *ReplaceTransitGatewayRouteInput { - s.TransitGatewayRouteTableId = &v - return s -} - -type ReplaceTransitGatewayRouteOutput struct { - _ struct{} `type:"structure"` - - // Information about the modified route. - Route *TransitGatewayRoute `locationName:"route" type:"structure"` -} - -// String returns the string representation -func (s ReplaceTransitGatewayRouteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceTransitGatewayRouteOutput) GoString() string { - return s.String() -} - -// SetRoute sets the Route field's value. -func (s *ReplaceTransitGatewayRouteOutput) SetRoute(v *TransitGatewayRoute) *ReplaceTransitGatewayRouteOutput { - s.Route = v - return s -} - -type ReportInstanceStatusInput struct { - _ struct{} `type:"structure"` - - // Descriptive text about the health state of your instance. - Description *string `locationName:"description" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The time at which the reported instance health state ended. - EndTime *time.Time `locationName:"endTime" type:"timestamp"` - - // One or more instances. - // - // Instances is a required field - Instances []*string `locationName:"instanceId" locationNameList:"InstanceId" type:"list" required:"true"` - - // One or more reason codes that describe the health state of your instance. - // - // * instance-stuck-in-state: My instance is stuck in a state. - // - // * unresponsive: My instance is unresponsive. - // - // * not-accepting-credentials: My instance is not accepting my credentials. - // - // * password-not-available: A password is not available for my instance. - // - // * performance-network: My instance is experiencing performance problems - // that I believe are network related. - // - // * performance-instance-store: My instance is experiencing performance - // problems that I believe are related to the instance stores. - // - // * performance-ebs-volume: My instance is experiencing performance problems - // that I believe are related to an EBS volume. - // - // * performance-other: My instance is experiencing performance problems. - // - // * other: [explain using the description parameter] - // - // ReasonCodes is a required field - ReasonCodes []*string `locationName:"reasonCode" locationNameList:"item" type:"list" required:"true"` - - // The time at which the reported instance health state began. - StartTime *time.Time `locationName:"startTime" type:"timestamp"` - - // The status of all instances listed. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"ReportStatusType"` -} - -// String returns the string representation -func (s ReportInstanceStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReportInstanceStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReportInstanceStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReportInstanceStatusInput"} - if s.Instances == nil { - invalidParams.Add(request.NewErrParamRequired("Instances")) - } - if s.ReasonCodes == nil { - invalidParams.Add(request.NewErrParamRequired("ReasonCodes")) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *ReportInstanceStatusInput) SetDescription(v string) *ReportInstanceStatusInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ReportInstanceStatusInput) SetDryRun(v bool) *ReportInstanceStatusInput { - s.DryRun = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *ReportInstanceStatusInput) SetEndTime(v time.Time) *ReportInstanceStatusInput { - s.EndTime = &v - return s -} - -// SetInstances sets the Instances field's value. -func (s *ReportInstanceStatusInput) SetInstances(v []*string) *ReportInstanceStatusInput { - s.Instances = v - return s -} - -// SetReasonCodes sets the ReasonCodes field's value. -func (s *ReportInstanceStatusInput) SetReasonCodes(v []*string) *ReportInstanceStatusInput { - s.ReasonCodes = v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *ReportInstanceStatusInput) SetStartTime(v time.Time) *ReportInstanceStatusInput { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ReportInstanceStatusInput) SetStatus(v string) *ReportInstanceStatusInput { - s.Status = &v - return s -} - -type ReportInstanceStatusOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ReportInstanceStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReportInstanceStatusOutput) GoString() string { - return s.String() -} - -// The information to include in the launch template. -type RequestLaunchTemplateData struct { - _ struct{} `type:"structure"` - - // The block device mapping. - // - // Supplying both a snapshot ID and an encryption value as arguments for block-device - // mapping results in an error. This is because only blank volumes can be encrypted - // on start, and these are not created from a snapshot. If a snapshot is the - // basis for the volume, it contains data by definition and its encryption status - // cannot be changed using this action. - BlockDeviceMappings []*LaunchTemplateBlockDeviceMappingRequest `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` - - // The Capacity Reservation targeting option. - CapacityReservationSpecification *LaunchTemplateCapacityReservationSpecificationRequest `type:"structure"` - - // The CPU options for the instance. For more information, see Optimizing CPU - // Options (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) - // in the Amazon Elastic Compute Cloud User Guide. - CpuOptions *LaunchTemplateCpuOptionsRequest `type:"structure"` - - // The credit option for CPU usage of the instance. Valid for T2 or T3 instances - // only. - CreditSpecification *CreditSpecificationRequest `type:"structure"` - - // If set to true, you can't terminate the instance using the Amazon EC2 console, - // CLI, or API. To change this attribute to false after launch, use ModifyInstanceAttribute. - DisableApiTermination *bool `type:"boolean"` - - // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal Amazon EBS I/O performance. This optimization isn't - // available with all instance types. Additional usage charges apply when using - // an EBS-optimized instance. - EbsOptimized *bool `type:"boolean"` - - // An elastic GPU to associate with the instance. - ElasticGpuSpecifications []*ElasticGpuSpecification `locationName:"ElasticGpuSpecification" locationNameList:"ElasticGpuSpecification" type:"list"` - - // The elastic inference accelerator for the instance. - ElasticInferenceAccelerators []*LaunchTemplateElasticInferenceAccelerator `locationName:"ElasticInferenceAccelerator" locationNameList:"item" type:"list"` - - // Indicates whether an instance is enabled for hibernation. This parameter - // is valid only if the instance meets the hibernation prerequisites (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). - // Hibernation is currently supported only for Amazon Linux. For more information, - // see Hibernate Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) - // in the Amazon Elastic Compute Cloud User Guide. - HibernationOptions *LaunchTemplateHibernationOptionsRequest `type:"structure"` - - // The IAM instance profile. - IamInstanceProfile *LaunchTemplateIamInstanceProfileSpecificationRequest `type:"structure"` - - // The ID of the AMI, which you can get by using DescribeImages. - ImageId *string `type:"string"` - - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - // - // Default: stop - InstanceInitiatedShutdownBehavior *string `type:"string" enum:"ShutdownBehavior"` - - // The market (purchasing) option for the instances. - InstanceMarketOptions *LaunchTemplateInstanceMarketOptionsRequest `type:"structure"` - - // The instance type. For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. - InstanceType *string `type:"string" enum:"InstanceType"` - - // The ID of the kernel. - // - // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more - // information, see User Provided Kernels (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - // in the Amazon Elastic Compute Cloud User Guide. - KernelId *string `type:"string"` - - // The name of the key pair. You can create a key pair using CreateKeyPair or - // ImportKeyPair. - // - // If you do not specify a key pair, you can't connect to the instance unless - // you choose an AMI that is configured to allow users another way to log in. - KeyName *string `type:"string"` - - // The license configurations. - LicenseSpecifications []*LaunchTemplateLicenseConfigurationRequest `locationName:"LicenseSpecification" locationNameList:"item" type:"list"` - - // The monitoring for the instance. - Monitoring *LaunchTemplatesMonitoringRequest `type:"structure"` - - // One or more network interfaces. - NetworkInterfaces []*LaunchTemplateInstanceNetworkInterfaceSpecificationRequest `locationName:"NetworkInterface" locationNameList:"InstanceNetworkInterfaceSpecification" type:"list"` - - // The placement for the instance. - Placement *LaunchTemplatePlacementRequest `type:"structure"` - - // The ID of the RAM disk. - // - // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more - // information, see User Provided Kernels (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - // in the Amazon Elastic Compute Cloud User Guide. - RamDiskId *string `type:"string"` - - // One or more security group IDs. You can create a security group using CreateSecurityGroup. - // You cannot specify both a security group ID and security name in the same - // request. - SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` - - // [EC2-Classic, default VPC] One or more security group names. For a nondefault - // VPC, you must use security group IDs instead. You cannot specify both a security - // group ID and security name in the same request. - SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"SecurityGroup" type:"list"` - - // The tags to apply to the resources during launch. You can only tag instances - // and volumes on launch. The specified tags are applied to all instances or - // volumes that are created during launch. To tag a resource after it has been - // created, see CreateTags. - TagSpecifications []*LaunchTemplateTagSpecificationRequest `locationName:"TagSpecification" locationNameList:"LaunchTemplateTagSpecificationRequest" type:"list"` - - // The Base64-encoded user data to make available to the instance. For more - // information, see Running Commands on Your Linux Instance at Launch (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) - // (Linux) and Adding User Data (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data) - // (Windows). - UserData *string `type:"string"` -} - -// String returns the string representation -func (s RequestLaunchTemplateData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestLaunchTemplateData) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestLaunchTemplateData) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestLaunchTemplateData"} - if s.CreditSpecification != nil { - if err := s.CreditSpecification.Validate(); err != nil { - invalidParams.AddNested("CreditSpecification", err.(request.ErrInvalidParams)) - } - } - if s.ElasticGpuSpecifications != nil { - for i, v := range s.ElasticGpuSpecifications { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ElasticGpuSpecifications", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ElasticInferenceAccelerators != nil { - for i, v := range s.ElasticInferenceAccelerators { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ElasticInferenceAccelerators", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *RequestLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateBlockDeviceMappingRequest) *RequestLaunchTemplateData { - s.BlockDeviceMappings = v - return s -} - -// SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value. -func (s *RequestLaunchTemplateData) SetCapacityReservationSpecification(v *LaunchTemplateCapacityReservationSpecificationRequest) *RequestLaunchTemplateData { - s.CapacityReservationSpecification = v - return s -} - -// SetCpuOptions sets the CpuOptions field's value. -func (s *RequestLaunchTemplateData) SetCpuOptions(v *LaunchTemplateCpuOptionsRequest) *RequestLaunchTemplateData { - s.CpuOptions = v - return s -} - -// SetCreditSpecification sets the CreditSpecification field's value. -func (s *RequestLaunchTemplateData) SetCreditSpecification(v *CreditSpecificationRequest) *RequestLaunchTemplateData { - s.CreditSpecification = v - return s -} - -// SetDisableApiTermination sets the DisableApiTermination field's value. -func (s *RequestLaunchTemplateData) SetDisableApiTermination(v bool) *RequestLaunchTemplateData { - s.DisableApiTermination = &v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *RequestLaunchTemplateData) SetEbsOptimized(v bool) *RequestLaunchTemplateData { - s.EbsOptimized = &v - return s -} - -// SetElasticGpuSpecifications sets the ElasticGpuSpecifications field's value. -func (s *RequestLaunchTemplateData) SetElasticGpuSpecifications(v []*ElasticGpuSpecification) *RequestLaunchTemplateData { - s.ElasticGpuSpecifications = v - return s -} - -// SetElasticInferenceAccelerators sets the ElasticInferenceAccelerators field's value. -func (s *RequestLaunchTemplateData) SetElasticInferenceAccelerators(v []*LaunchTemplateElasticInferenceAccelerator) *RequestLaunchTemplateData { - s.ElasticInferenceAccelerators = v - return s -} - -// SetHibernationOptions sets the HibernationOptions field's value. -func (s *RequestLaunchTemplateData) SetHibernationOptions(v *LaunchTemplateHibernationOptionsRequest) *RequestLaunchTemplateData { - s.HibernationOptions = v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *RequestLaunchTemplateData) SetIamInstanceProfile(v *LaunchTemplateIamInstanceProfileSpecificationRequest) *RequestLaunchTemplateData { - s.IamInstanceProfile = v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *RequestLaunchTemplateData) SetImageId(v string) *RequestLaunchTemplateData { - s.ImageId = &v - return s -} - -// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. -func (s *RequestLaunchTemplateData) SetInstanceInitiatedShutdownBehavior(v string) *RequestLaunchTemplateData { - s.InstanceInitiatedShutdownBehavior = &v - return s -} - -// SetInstanceMarketOptions sets the InstanceMarketOptions field's value. -func (s *RequestLaunchTemplateData) SetInstanceMarketOptions(v *LaunchTemplateInstanceMarketOptionsRequest) *RequestLaunchTemplateData { - s.InstanceMarketOptions = v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *RequestLaunchTemplateData) SetInstanceType(v string) *RequestLaunchTemplateData { - s.InstanceType = &v - return s -} - -// SetKernelId sets the KernelId field's value. -func (s *RequestLaunchTemplateData) SetKernelId(v string) *RequestLaunchTemplateData { - s.KernelId = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *RequestLaunchTemplateData) SetKeyName(v string) *RequestLaunchTemplateData { - s.KeyName = &v - return s -} - -// SetLicenseSpecifications sets the LicenseSpecifications field's value. -func (s *RequestLaunchTemplateData) SetLicenseSpecifications(v []*LaunchTemplateLicenseConfigurationRequest) *RequestLaunchTemplateData { - s.LicenseSpecifications = v - return s -} - -// SetMonitoring sets the Monitoring field's value. -func (s *RequestLaunchTemplateData) SetMonitoring(v *LaunchTemplatesMonitoringRequest) *RequestLaunchTemplateData { - s.Monitoring = v - return s -} - -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *RequestLaunchTemplateData) SetNetworkInterfaces(v []*LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) *RequestLaunchTemplateData { - s.NetworkInterfaces = v - return s -} - -// SetPlacement sets the Placement field's value. -func (s *RequestLaunchTemplateData) SetPlacement(v *LaunchTemplatePlacementRequest) *RequestLaunchTemplateData { - s.Placement = v - return s -} - -// SetRamDiskId sets the RamDiskId field's value. -func (s *RequestLaunchTemplateData) SetRamDiskId(v string) *RequestLaunchTemplateData { - s.RamDiskId = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *RequestLaunchTemplateData) SetSecurityGroupIds(v []*string) *RequestLaunchTemplateData { - s.SecurityGroupIds = v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *RequestLaunchTemplateData) SetSecurityGroups(v []*string) *RequestLaunchTemplateData { - s.SecurityGroups = v - return s -} - -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *RequestLaunchTemplateData) SetTagSpecifications(v []*LaunchTemplateTagSpecificationRequest) *RequestLaunchTemplateData { - s.TagSpecifications = v - return s -} - -// SetUserData sets the UserData field's value. -func (s *RequestLaunchTemplateData) SetUserData(v string) *RequestLaunchTemplateData { - s.UserData = &v - return s -} - -// Contains the parameters for RequestSpotFleet. -type RequestSpotFleetInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The configuration for the Spot Fleet request. - // - // SpotFleetRequestConfig is a required field - SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure" required:"true"` -} - -// String returns the string representation -func (s RequestSpotFleetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestSpotFleetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestSpotFleetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestSpotFleetInput"} - if s.SpotFleetRequestConfig == nil { - invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestConfig")) - } - if s.SpotFleetRequestConfig != nil { - if err := s.SpotFleetRequestConfig.Validate(); err != nil { - invalidParams.AddNested("SpotFleetRequestConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *RequestSpotFleetInput) SetDryRun(v bool) *RequestSpotFleetInput { - s.DryRun = &v - return s -} - -// SetSpotFleetRequestConfig sets the SpotFleetRequestConfig field's value. -func (s *RequestSpotFleetInput) SetSpotFleetRequestConfig(v *SpotFleetRequestConfigData) *RequestSpotFleetInput { - s.SpotFleetRequestConfig = v - return s -} - -// Contains the output of RequestSpotFleet. -type RequestSpotFleetOutput struct { - _ struct{} `type:"structure"` - - // The ID of the Spot Fleet request. - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` -} - -// String returns the string representation -func (s RequestSpotFleetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestSpotFleetOutput) GoString() string { - return s.String() -} - -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *RequestSpotFleetOutput) SetSpotFleetRequestId(v string) *RequestSpotFleetOutput { - s.SpotFleetRequestId = &v - return s -} - -// Contains the parameters for RequestSpotInstances. -type RequestSpotInstancesInput struct { - _ struct{} `type:"structure"` - - // The user-specified name for a logical grouping of requests. - // - // When you specify an Availability Zone group in a Spot Instance request, all - // Spot Instances in the request are launched in the same Availability Zone. - // Instance proximity is maintained with this parameter, but the choice of Availability - // Zone is not. The group applies only to requests for Spot Instances of the - // same instance type. Any additional Spot Instance requests that are specified - // with the same Availability Zone group name are launched in that same Availability - // Zone, as long as at least one instance from the group is still active. - // - // If there is no active instance running in the Availability Zone group that - // you specify for a new Spot Instance request (all instances are terminated, - // the request is expired, or the maximum price you specified falls below current - // Spot price), then Amazon EC2 launches the instance in any Availability Zone - // where the constraint can be met. Consequently, the subsequent set of Spot - // Instances could be placed in a different zone from the original request, - // even if you specified the same Availability Zone group. - // - // Default: Instances are launched in any available Availability Zone. - AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"` - - // The required duration for the Spot Instances (also known as Spot blocks), - // in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, - // or 360). - // - // The duration period starts as soon as your Spot Instance receives its instance - // ID. At the end of the duration period, Amazon EC2 marks the Spot Instance - // for termination and provides a Spot Instance termination notice, which gives - // the instance a two-minute warning before it terminates. - // - // You can't specify an Availability Zone group or a launch group if you specify - // a duration. - BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon EC2 User Guide for Linux Instances. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The maximum number of Spot Instances to launch. - // - // Default: 1 - InstanceCount *int64 `locationName:"instanceCount" type:"integer"` - - // The behavior when a Spot Instance is interrupted. The default is terminate. - InstanceInterruptionBehavior *string `type:"string" enum:"InstanceInterruptionBehavior"` - - // The instance launch group. Launch groups are Spot Instances that launch together - // and terminate together. - // - // Default: Instances are launched and terminated individually - LaunchGroup *string `locationName:"launchGroup" type:"string"` - - // The launch specification. - LaunchSpecification *RequestSpotLaunchSpecification `type:"structure"` - - // The maximum price per hour that you are willing to pay for a Spot Instance. - // The default is the On-Demand price. - SpotPrice *string `locationName:"spotPrice" type:"string"` - - // The Spot Instance request type. - // - // Default: one-time - Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"` - - // The start date of the request. If this is a one-time request, the request - // becomes active at this date and time and remains active until all instances - // launch, the request expires, or the request is canceled. If the request is - // persistent, the request becomes active at this date and time and remains - // active until it expires or is canceled. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` - - // The end date of the request. If this is a one-time request, the request remains - // active until all instances launch, the request is canceled, or this date - // is reached. If the request is persistent, it remains active until it is canceled - // or this date is reached. The default end date is 7 days from the current - // date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` -} - -// String returns the string representation -func (s RequestSpotInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestSpotInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestSpotInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestSpotInstancesInput"} - if s.LaunchSpecification != nil { - if err := s.LaunchSpecification.Validate(); err != nil { - invalidParams.AddNested("LaunchSpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZoneGroup sets the AvailabilityZoneGroup field's value. -func (s *RequestSpotInstancesInput) SetAvailabilityZoneGroup(v string) *RequestSpotInstancesInput { - s.AvailabilityZoneGroup = &v - return s -} - -// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. -func (s *RequestSpotInstancesInput) SetBlockDurationMinutes(v int64) *RequestSpotInstancesInput { - s.BlockDurationMinutes = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *RequestSpotInstancesInput) SetClientToken(v string) *RequestSpotInstancesInput { - s.ClientToken = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *RequestSpotInstancesInput) SetDryRun(v bool) *RequestSpotInstancesInput { - s.DryRun = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *RequestSpotInstancesInput) SetInstanceCount(v int64) *RequestSpotInstancesInput { - s.InstanceCount = &v - return s -} - -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *RequestSpotInstancesInput) SetInstanceInterruptionBehavior(v string) *RequestSpotInstancesInput { - s.InstanceInterruptionBehavior = &v - return s -} - -// SetLaunchGroup sets the LaunchGroup field's value. -func (s *RequestSpotInstancesInput) SetLaunchGroup(v string) *RequestSpotInstancesInput { - s.LaunchGroup = &v - return s -} - -// SetLaunchSpecification sets the LaunchSpecification field's value. -func (s *RequestSpotInstancesInput) SetLaunchSpecification(v *RequestSpotLaunchSpecification) *RequestSpotInstancesInput { - s.LaunchSpecification = v - return s -} - -// SetSpotPrice sets the SpotPrice field's value. -func (s *RequestSpotInstancesInput) SetSpotPrice(v string) *RequestSpotInstancesInput { - s.SpotPrice = &v - return s -} - -// SetType sets the Type field's value. -func (s *RequestSpotInstancesInput) SetType(v string) *RequestSpotInstancesInput { - s.Type = &v - return s -} - -// SetValidFrom sets the ValidFrom field's value. -func (s *RequestSpotInstancesInput) SetValidFrom(v time.Time) *RequestSpotInstancesInput { - s.ValidFrom = &v - return s -} - -// SetValidUntil sets the ValidUntil field's value. -func (s *RequestSpotInstancesInput) SetValidUntil(v time.Time) *RequestSpotInstancesInput { - s.ValidUntil = &v - return s -} - -// Contains the output of RequestSpotInstances. -type RequestSpotInstancesOutput struct { - _ struct{} `type:"structure"` - - // One or more Spot Instance requests. - SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s RequestSpotInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestSpotInstancesOutput) GoString() string { - return s.String() -} - -// SetSpotInstanceRequests sets the SpotInstanceRequests field's value. -func (s *RequestSpotInstancesOutput) SetSpotInstanceRequests(v []*SpotInstanceRequest) *RequestSpotInstancesOutput { - s.SpotInstanceRequests = v - return s -} - -// Describes the launch specification for an instance. -type RequestSpotLaunchSpecification struct { - _ struct{} `type:"structure"` - - // Deprecated. - AddressingType *string `locationName:"addressingType" type:"string"` - - // One or more block device mapping entries. You can't specify both a snapshot - // ID and an encryption value. This is because only blank volumes can be encrypted - // on creation. If a snapshot is the basis for a volume, it is not blank and - // its encryption status is used for the volume encryption status. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` - - // Indicates whether the instance is optimized for EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal EBS I/O performance. This optimization isn't available - // with all instance types. Additional usage charges apply when using an EBS - // Optimized instance. - // - // Default: false - EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` - - // The IAM instance profile. - IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` - - // The ID of the AMI. - ImageId *string `locationName:"imageId" type:"string"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // The ID of the kernel. - KernelId *string `locationName:"kernelId" type:"string"` - - // The name of the key pair. - KeyName *string `locationName:"keyName" type:"string"` - - // Indicates whether basic or detailed monitoring is enabled for the instance. - // - // Default: Disabled - Monitoring *RunInstancesMonitoringEnabled `locationName:"monitoring" type:"structure"` - - // One or more network interfaces. If you specify a network interface, you must - // specify subnet IDs and security group IDs using the network interface. - NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"NetworkInterface" locationNameList:"item" type:"list"` - - // The placement information for the instance. - Placement *SpotPlacement `locationName:"placement" type:"structure"` - - // The ID of the RAM disk. - RamdiskId *string `locationName:"ramdiskId" type:"string"` - - // One or more security group IDs. - SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"` - - // One or more security groups. When requesting instances in a VPC, you must - // specify the IDs of the security groups. When requesting instances in EC2-Classic, - // you can specify the names or the IDs of the security groups. - SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"item" type:"list"` - - // The ID of the subnet in which to launch the instance. - SubnetId *string `locationName:"subnetId" type:"string"` - - // The Base64-encoded user data for the instance. - UserData *string `locationName:"userData" type:"string"` -} - -// String returns the string representation -func (s RequestSpotLaunchSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestSpotLaunchSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestSpotLaunchSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestSpotLaunchSpecification"} - if s.Monitoring != nil { - if err := s.Monitoring.Validate(); err != nil { - invalidParams.AddNested("Monitoring", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddressingType sets the AddressingType field's value. -func (s *RequestSpotLaunchSpecification) SetAddressingType(v string) *RequestSpotLaunchSpecification { - s.AddressingType = &v - return s -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *RequestSpotLaunchSpecification) SetBlockDeviceMappings(v []*BlockDeviceMapping) *RequestSpotLaunchSpecification { - s.BlockDeviceMappings = v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *RequestSpotLaunchSpecification) SetEbsOptimized(v bool) *RequestSpotLaunchSpecification { - s.EbsOptimized = &v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *RequestSpotLaunchSpecification) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *RequestSpotLaunchSpecification { - s.IamInstanceProfile = v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *RequestSpotLaunchSpecification) SetImageId(v string) *RequestSpotLaunchSpecification { - s.ImageId = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *RequestSpotLaunchSpecification) SetInstanceType(v string) *RequestSpotLaunchSpecification { - s.InstanceType = &v - return s -} - -// SetKernelId sets the KernelId field's value. -func (s *RequestSpotLaunchSpecification) SetKernelId(v string) *RequestSpotLaunchSpecification { - s.KernelId = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *RequestSpotLaunchSpecification) SetKeyName(v string) *RequestSpotLaunchSpecification { - s.KeyName = &v - return s -} - -// SetMonitoring sets the Monitoring field's value. -func (s *RequestSpotLaunchSpecification) SetMonitoring(v *RunInstancesMonitoringEnabled) *RequestSpotLaunchSpecification { - s.Monitoring = v - return s -} - -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *RequestSpotLaunchSpecification) SetNetworkInterfaces(v []*InstanceNetworkInterfaceSpecification) *RequestSpotLaunchSpecification { - s.NetworkInterfaces = v - return s -} - -// SetPlacement sets the Placement field's value. -func (s *RequestSpotLaunchSpecification) SetPlacement(v *SpotPlacement) *RequestSpotLaunchSpecification { - s.Placement = v - return s -} - -// SetRamdiskId sets the RamdiskId field's value. -func (s *RequestSpotLaunchSpecification) SetRamdiskId(v string) *RequestSpotLaunchSpecification { - s.RamdiskId = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *RequestSpotLaunchSpecification) SetSecurityGroupIds(v []*string) *RequestSpotLaunchSpecification { - s.SecurityGroupIds = v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *RequestSpotLaunchSpecification) SetSecurityGroups(v []*string) *RequestSpotLaunchSpecification { - s.SecurityGroups = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *RequestSpotLaunchSpecification) SetSubnetId(v string) *RequestSpotLaunchSpecification { - s.SubnetId = &v - return s -} - -// SetUserData sets the UserData field's value. -func (s *RequestSpotLaunchSpecification) SetUserData(v string) *RequestSpotLaunchSpecification { - s.UserData = &v - return s -} - -// Describes a reservation. -type Reservation struct { - _ struct{} `type:"structure"` - - // [EC2-Classic only] One or more security groups. - Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - - // One or more instances. - Instances []*Instance `locationName:"instancesSet" locationNameList:"item" type:"list"` - - // The ID of the AWS account that owns the reservation. - OwnerId *string `locationName:"ownerId" type:"string"` - - // The ID of the requester that launched the instances on your behalf (for example, - // AWS Management Console or Auto Scaling). - RequesterId *string `locationName:"requesterId" type:"string"` - - // The ID of the reservation. - ReservationId *string `locationName:"reservationId" type:"string"` -} - -// String returns the string representation -func (s Reservation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Reservation) GoString() string { - return s.String() -} - -// SetGroups sets the Groups field's value. -func (s *Reservation) SetGroups(v []*GroupIdentifier) *Reservation { - s.Groups = v - return s -} - -// SetInstances sets the Instances field's value. -func (s *Reservation) SetInstances(v []*Instance) *Reservation { - s.Instances = v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *Reservation) SetOwnerId(v string) *Reservation { - s.OwnerId = &v - return s -} - -// SetRequesterId sets the RequesterId field's value. -func (s *Reservation) SetRequesterId(v string) *Reservation { - s.RequesterId = &v - return s -} - -// SetReservationId sets the ReservationId field's value. -func (s *Reservation) SetReservationId(v string) *Reservation { - s.ReservationId = &v - return s -} - -// The cost associated with the Reserved Instance. -type ReservationValue struct { - _ struct{} `type:"structure"` - - // The hourly rate of the reservation. - HourlyPrice *string `locationName:"hourlyPrice" type:"string"` - - // The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice - // * number of hours remaining). - RemainingTotalValue *string `locationName:"remainingTotalValue" type:"string"` - - // The remaining upfront cost of the reservation. - RemainingUpfrontValue *string `locationName:"remainingUpfrontValue" type:"string"` -} - -// String returns the string representation -func (s ReservationValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservationValue) GoString() string { - return s.String() -} - -// SetHourlyPrice sets the HourlyPrice field's value. -func (s *ReservationValue) SetHourlyPrice(v string) *ReservationValue { - s.HourlyPrice = &v - return s -} - -// SetRemainingTotalValue sets the RemainingTotalValue field's value. -func (s *ReservationValue) SetRemainingTotalValue(v string) *ReservationValue { - s.RemainingTotalValue = &v - return s -} - -// SetRemainingUpfrontValue sets the RemainingUpfrontValue field's value. -func (s *ReservationValue) SetRemainingUpfrontValue(v string) *ReservationValue { - s.RemainingUpfrontValue = &v - return s -} - -// Describes the limit price of a Reserved Instance offering. -type ReservedInstanceLimitPrice struct { - _ struct{} `type:"structure"` - - // Used for Reserved Instance Marketplace offerings. Specifies the limit price - // on the total order (instanceCount * price). - Amount *float64 `locationName:"amount" type:"double"` - - // The currency in which the limitPrice amount is specified. At this time, the - // only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` -} - -// String returns the string representation -func (s ReservedInstanceLimitPrice) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedInstanceLimitPrice) GoString() string { - return s.String() -} - -// SetAmount sets the Amount field's value. -func (s *ReservedInstanceLimitPrice) SetAmount(v float64) *ReservedInstanceLimitPrice { - s.Amount = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *ReservedInstanceLimitPrice) SetCurrencyCode(v string) *ReservedInstanceLimitPrice { - s.CurrencyCode = &v - return s -} - -// The total value of the Convertible Reserved Instance. -type ReservedInstanceReservationValue struct { - _ struct{} `type:"structure"` - - // The total value of the Convertible Reserved Instance that you are exchanging. - ReservationValue *ReservationValue `locationName:"reservationValue" type:"structure"` - - // The ID of the Convertible Reserved Instance that you are exchanging. - ReservedInstanceId *string `locationName:"reservedInstanceId" type:"string"` -} - -// String returns the string representation -func (s ReservedInstanceReservationValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedInstanceReservationValue) GoString() string { - return s.String() -} - -// SetReservationValue sets the ReservationValue field's value. -func (s *ReservedInstanceReservationValue) SetReservationValue(v *ReservationValue) *ReservedInstanceReservationValue { - s.ReservationValue = v - return s -} - -// SetReservedInstanceId sets the ReservedInstanceId field's value. -func (s *ReservedInstanceReservationValue) SetReservedInstanceId(v string) *ReservedInstanceReservationValue { - s.ReservedInstanceId = &v - return s -} - -// Describes a Reserved Instance. -type ReservedInstances struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which the Reserved Instance can be used. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The currency of the Reserved Instance. It's specified using ISO 4217 standard - // currency codes. At this time, the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // The duration of the Reserved Instance, in seconds. - Duration *int64 `locationName:"duration" type:"long"` - - // The time when the Reserved Instance expires. - End *time.Time `locationName:"end" type:"timestamp"` - - // The purchase price of the Reserved Instance. - FixedPrice *float64 `locationName:"fixedPrice" type:"float"` - - // The number of reservations purchased. - InstanceCount *int64 `locationName:"instanceCount" type:"integer"` - - // The tenancy of the instance. - InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` - - // The instance type on which the Reserved Instance can be used. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // The offering class of the Reserved Instance. - OfferingClass *string `locationName:"offeringClass" type:"string" enum:"OfferingClassType"` - - // The Reserved Instance offering type. - OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` - - // The Reserved Instance product platform description. - ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` - - // The recurring charge tag assigned to the resource. - RecurringCharges []*RecurringCharge `locationName:"recurringCharges" locationNameList:"item" type:"list"` - - // The ID of the Reserved Instance. - ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` - - // The scope of the Reserved Instance. - Scope *string `locationName:"scope" type:"string" enum:"scope"` - - // The date and time the Reserved Instance started. - Start *time.Time `locationName:"start" type:"timestamp"` - - // The state of the Reserved Instance purchase. - State *string `locationName:"state" type:"string" enum:"ReservedInstanceState"` - - // Any tags assigned to the resource. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The usage price of the Reserved Instance, per hour. - UsagePrice *float64 `locationName:"usagePrice" type:"float"` -} - -// String returns the string representation -func (s ReservedInstances) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedInstances) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ReservedInstances) SetAvailabilityZone(v string) *ReservedInstances { - s.AvailabilityZone = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *ReservedInstances) SetCurrencyCode(v string) *ReservedInstances { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *ReservedInstances) SetDuration(v int64) *ReservedInstances { - s.Duration = &v - return s -} - -// SetEnd sets the End field's value. -func (s *ReservedInstances) SetEnd(v time.Time) *ReservedInstances { - s.End = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *ReservedInstances) SetFixedPrice(v float64) *ReservedInstances { - s.FixedPrice = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *ReservedInstances) SetInstanceCount(v int64) *ReservedInstances { - s.InstanceCount = &v - return s -} - -// SetInstanceTenancy sets the InstanceTenancy field's value. -func (s *ReservedInstances) SetInstanceTenancy(v string) *ReservedInstances { - s.InstanceTenancy = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ReservedInstances) SetInstanceType(v string) *ReservedInstances { - s.InstanceType = &v - return s -} - -// SetOfferingClass sets the OfferingClass field's value. -func (s *ReservedInstances) SetOfferingClass(v string) *ReservedInstances { - s.OfferingClass = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *ReservedInstances) SetOfferingType(v string) *ReservedInstances { - s.OfferingType = &v - return s -} - -// SetProductDescription sets the ProductDescription field's value. -func (s *ReservedInstances) SetProductDescription(v string) *ReservedInstances { - s.ProductDescription = &v - return s -} - -// SetRecurringCharges sets the RecurringCharges field's value. -func (s *ReservedInstances) SetRecurringCharges(v []*RecurringCharge) *ReservedInstances { - s.RecurringCharges = v - return s -} - -// SetReservedInstancesId sets the ReservedInstancesId field's value. -func (s *ReservedInstances) SetReservedInstancesId(v string) *ReservedInstances { - s.ReservedInstancesId = &v - return s -} - -// SetScope sets the Scope field's value. -func (s *ReservedInstances) SetScope(v string) *ReservedInstances { - s.Scope = &v - return s -} - -// SetStart sets the Start field's value. -func (s *ReservedInstances) SetStart(v time.Time) *ReservedInstances { - s.Start = &v - return s -} - -// SetState sets the State field's value. -func (s *ReservedInstances) SetState(v string) *ReservedInstances { - s.State = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ReservedInstances) SetTags(v []*Tag) *ReservedInstances { - s.Tags = v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *ReservedInstances) SetUsagePrice(v float64) *ReservedInstances { - s.UsagePrice = &v - return s -} - -// Describes the configuration settings for the modified Reserved Instances. -type ReservedInstancesConfiguration struct { - _ struct{} `type:"structure"` - - // The Availability Zone for the modified Reserved Instances. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The number of modified Reserved Instances. - InstanceCount *int64 `locationName:"instanceCount" type:"integer"` - - // The instance type for the modified Reserved Instances. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // The network platform of the modified Reserved Instances, which is either - // EC2-Classic or EC2-VPC. - Platform *string `locationName:"platform" type:"string"` - - // Whether the Reserved Instance is applied to instances in a region or instances - // in a specific Availability Zone. - Scope *string `locationName:"scope" type:"string" enum:"scope"` -} - -// String returns the string representation -func (s ReservedInstancesConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedInstancesConfiguration) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ReservedInstancesConfiguration) SetAvailabilityZone(v string) *ReservedInstancesConfiguration { - s.AvailabilityZone = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *ReservedInstancesConfiguration) SetInstanceCount(v int64) *ReservedInstancesConfiguration { - s.InstanceCount = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ReservedInstancesConfiguration) SetInstanceType(v string) *ReservedInstancesConfiguration { - s.InstanceType = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *ReservedInstancesConfiguration) SetPlatform(v string) *ReservedInstancesConfiguration { - s.Platform = &v - return s -} - -// SetScope sets the Scope field's value. -func (s *ReservedInstancesConfiguration) SetScope(v string) *ReservedInstancesConfiguration { - s.Scope = &v - return s -} - -// Describes the ID of a Reserved Instance. -type ReservedInstancesId struct { - _ struct{} `type:"structure"` - - // The ID of the Reserved Instance. - ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` -} - -// String returns the string representation -func (s ReservedInstancesId) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedInstancesId) GoString() string { - return s.String() -} - -// SetReservedInstancesId sets the ReservedInstancesId field's value. -func (s *ReservedInstancesId) SetReservedInstancesId(v string) *ReservedInstancesId { - s.ReservedInstancesId = &v - return s -} - -// Describes a Reserved Instance listing. -type ReservedInstancesListing struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive key supplied by the client to ensure that the request - // is idempotent. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `locationName:"clientToken" type:"string"` - - // The time the listing was created. - CreateDate *time.Time `locationName:"createDate" type:"timestamp"` - - // The number of instances in this state. - InstanceCounts []*InstanceCount `locationName:"instanceCounts" locationNameList:"item" type:"list"` - - // The price of the Reserved Instance listing. - PriceSchedules []*PriceSchedule `locationName:"priceSchedules" locationNameList:"item" type:"list"` - - // The ID of the Reserved Instance. - ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` - - // The ID of the Reserved Instance listing. - ReservedInstancesListingId *string `locationName:"reservedInstancesListingId" type:"string"` - - // The status of the Reserved Instance listing. - Status *string `locationName:"status" type:"string" enum:"ListingStatus"` - - // The reason for the current status of the Reserved Instance listing. The response - // can be blank. - StatusMessage *string `locationName:"statusMessage" type:"string"` - - // Any tags assigned to the resource. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The last modified timestamp of the listing. - UpdateDate *time.Time `locationName:"updateDate" type:"timestamp"` -} - -// String returns the string representation -func (s ReservedInstancesListing) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedInstancesListing) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *ReservedInstancesListing) SetClientToken(v string) *ReservedInstancesListing { - s.ClientToken = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *ReservedInstancesListing) SetCreateDate(v time.Time) *ReservedInstancesListing { - s.CreateDate = &v - return s -} - -// SetInstanceCounts sets the InstanceCounts field's value. -func (s *ReservedInstancesListing) SetInstanceCounts(v []*InstanceCount) *ReservedInstancesListing { - s.InstanceCounts = v - return s -} - -// SetPriceSchedules sets the PriceSchedules field's value. -func (s *ReservedInstancesListing) SetPriceSchedules(v []*PriceSchedule) *ReservedInstancesListing { - s.PriceSchedules = v - return s -} - -// SetReservedInstancesId sets the ReservedInstancesId field's value. -func (s *ReservedInstancesListing) SetReservedInstancesId(v string) *ReservedInstancesListing { - s.ReservedInstancesId = &v - return s -} - -// SetReservedInstancesListingId sets the ReservedInstancesListingId field's value. -func (s *ReservedInstancesListing) SetReservedInstancesListingId(v string) *ReservedInstancesListing { - s.ReservedInstancesListingId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ReservedInstancesListing) SetStatus(v string) *ReservedInstancesListing { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ReservedInstancesListing) SetStatusMessage(v string) *ReservedInstancesListing { - s.StatusMessage = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ReservedInstancesListing) SetTags(v []*Tag) *ReservedInstancesListing { - s.Tags = v - return s -} - -// SetUpdateDate sets the UpdateDate field's value. -func (s *ReservedInstancesListing) SetUpdateDate(v time.Time) *ReservedInstancesListing { - s.UpdateDate = &v - return s -} - -// Describes a Reserved Instance modification. -type ReservedInstancesModification struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive key supplied by the client to ensure that the request - // is idempotent. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `locationName:"clientToken" type:"string"` - - // The time when the modification request was created. - CreateDate *time.Time `locationName:"createDate" type:"timestamp"` - - // The time for the modification to become effective. - EffectiveDate *time.Time `locationName:"effectiveDate" type:"timestamp"` - - // Contains target configurations along with their corresponding new Reserved - // Instance IDs. - ModificationResults []*ReservedInstancesModificationResult `locationName:"modificationResultSet" locationNameList:"item" type:"list"` - - // The IDs of one or more Reserved Instances. - ReservedInstancesIds []*ReservedInstancesId `locationName:"reservedInstancesSet" locationNameList:"item" type:"list"` - - // A unique ID for the Reserved Instance modification. - ReservedInstancesModificationId *string `locationName:"reservedInstancesModificationId" type:"string"` - - // The status of the Reserved Instances modification request. - Status *string `locationName:"status" type:"string"` - - // The reason for the status. - StatusMessage *string `locationName:"statusMessage" type:"string"` - - // The time when the modification request was last updated. - UpdateDate *time.Time `locationName:"updateDate" type:"timestamp"` -} - -// String returns the string representation -func (s ReservedInstancesModification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedInstancesModification) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *ReservedInstancesModification) SetClientToken(v string) *ReservedInstancesModification { - s.ClientToken = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *ReservedInstancesModification) SetCreateDate(v time.Time) *ReservedInstancesModification { - s.CreateDate = &v - return s -} - -// SetEffectiveDate sets the EffectiveDate field's value. -func (s *ReservedInstancesModification) SetEffectiveDate(v time.Time) *ReservedInstancesModification { - s.EffectiveDate = &v - return s -} - -// SetModificationResults sets the ModificationResults field's value. -func (s *ReservedInstancesModification) SetModificationResults(v []*ReservedInstancesModificationResult) *ReservedInstancesModification { - s.ModificationResults = v - return s -} - -// SetReservedInstancesIds sets the ReservedInstancesIds field's value. -func (s *ReservedInstancesModification) SetReservedInstancesIds(v []*ReservedInstancesId) *ReservedInstancesModification { - s.ReservedInstancesIds = v - return s -} - -// SetReservedInstancesModificationId sets the ReservedInstancesModificationId field's value. -func (s *ReservedInstancesModification) SetReservedInstancesModificationId(v string) *ReservedInstancesModification { - s.ReservedInstancesModificationId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ReservedInstancesModification) SetStatus(v string) *ReservedInstancesModification { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ReservedInstancesModification) SetStatusMessage(v string) *ReservedInstancesModification { - s.StatusMessage = &v - return s -} - -// SetUpdateDate sets the UpdateDate field's value. -func (s *ReservedInstancesModification) SetUpdateDate(v time.Time) *ReservedInstancesModification { - s.UpdateDate = &v - return s -} - -// Describes the modification request/s. -type ReservedInstancesModificationResult struct { - _ struct{} `type:"structure"` - - // The ID for the Reserved Instances that were created as part of the modification - // request. This field is only available when the modification is fulfilled. - ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` - - // The target Reserved Instances configurations supplied as part of the modification - // request. - TargetConfiguration *ReservedInstancesConfiguration `locationName:"targetConfiguration" type:"structure"` -} - -// String returns the string representation -func (s ReservedInstancesModificationResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedInstancesModificationResult) GoString() string { - return s.String() -} - -// SetReservedInstancesId sets the ReservedInstancesId field's value. -func (s *ReservedInstancesModificationResult) SetReservedInstancesId(v string) *ReservedInstancesModificationResult { - s.ReservedInstancesId = &v - return s -} - -// SetTargetConfiguration sets the TargetConfiguration field's value. -func (s *ReservedInstancesModificationResult) SetTargetConfiguration(v *ReservedInstancesConfiguration) *ReservedInstancesModificationResult { - s.TargetConfiguration = v - return s -} - -// Describes a Reserved Instance offering. -type ReservedInstancesOffering struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which the Reserved Instance can be used. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The currency of the Reserved Instance offering you are purchasing. It's specified - // using ISO 4217 standard currency codes. At this time, the only supported - // currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // The duration of the Reserved Instance, in seconds. - Duration *int64 `locationName:"duration" type:"long"` - - // The purchase price of the Reserved Instance. - FixedPrice *float64 `locationName:"fixedPrice" type:"float"` - - // The tenancy of the instance. - InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` - - // The instance type on which the Reserved Instance can be used. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // Indicates whether the offering is available through the Reserved Instance - // Marketplace (resale) or AWS. If it's a Reserved Instance Marketplace offering, - // this is true. - Marketplace *bool `locationName:"marketplace" type:"boolean"` - - // If convertible it can be exchanged for Reserved Instances of the same or - // higher monetary value, with different configurations. If standard, it is - // not possible to perform an exchange. - OfferingClass *string `locationName:"offeringClass" type:"string" enum:"OfferingClassType"` - - // The Reserved Instance offering type. - OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` - - // The pricing details of the Reserved Instance offering. - PricingDetails []*PricingDetail `locationName:"pricingDetailsSet" locationNameList:"item" type:"list"` - - // The Reserved Instance product platform description. - ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` - - // The recurring charge tag assigned to the resource. - RecurringCharges []*RecurringCharge `locationName:"recurringCharges" locationNameList:"item" type:"list"` - - // The ID of the Reserved Instance offering. This is the offering ID used in - // GetReservedInstancesExchangeQuote to confirm that an exchange can be made. - ReservedInstancesOfferingId *string `locationName:"reservedInstancesOfferingId" type:"string"` - - // Whether the Reserved Instance is applied to instances in a region or an Availability - // Zone. - Scope *string `locationName:"scope" type:"string" enum:"scope"` - - // The usage price of the Reserved Instance, per hour. - UsagePrice *float64 `locationName:"usagePrice" type:"float"` -} - -// String returns the string representation -func (s ReservedInstancesOffering) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedInstancesOffering) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ReservedInstancesOffering) SetAvailabilityZone(v string) *ReservedInstancesOffering { - s.AvailabilityZone = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *ReservedInstancesOffering) SetCurrencyCode(v string) *ReservedInstancesOffering { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *ReservedInstancesOffering) SetDuration(v int64) *ReservedInstancesOffering { - s.Duration = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *ReservedInstancesOffering) SetFixedPrice(v float64) *ReservedInstancesOffering { - s.FixedPrice = &v - return s -} - -// SetInstanceTenancy sets the InstanceTenancy field's value. -func (s *ReservedInstancesOffering) SetInstanceTenancy(v string) *ReservedInstancesOffering { - s.InstanceTenancy = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ReservedInstancesOffering) SetInstanceType(v string) *ReservedInstancesOffering { - s.InstanceType = &v - return s -} - -// SetMarketplace sets the Marketplace field's value. -func (s *ReservedInstancesOffering) SetMarketplace(v bool) *ReservedInstancesOffering { - s.Marketplace = &v - return s -} - -// SetOfferingClass sets the OfferingClass field's value. -func (s *ReservedInstancesOffering) SetOfferingClass(v string) *ReservedInstancesOffering { - s.OfferingClass = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *ReservedInstancesOffering) SetOfferingType(v string) *ReservedInstancesOffering { - s.OfferingType = &v - return s -} - -// SetPricingDetails sets the PricingDetails field's value. -func (s *ReservedInstancesOffering) SetPricingDetails(v []*PricingDetail) *ReservedInstancesOffering { - s.PricingDetails = v - return s -} - -// SetProductDescription sets the ProductDescription field's value. -func (s *ReservedInstancesOffering) SetProductDescription(v string) *ReservedInstancesOffering { - s.ProductDescription = &v - return s -} - -// SetRecurringCharges sets the RecurringCharges field's value. -func (s *ReservedInstancesOffering) SetRecurringCharges(v []*RecurringCharge) *ReservedInstancesOffering { - s.RecurringCharges = v - return s -} - -// SetReservedInstancesOfferingId sets the ReservedInstancesOfferingId field's value. -func (s *ReservedInstancesOffering) SetReservedInstancesOfferingId(v string) *ReservedInstancesOffering { - s.ReservedInstancesOfferingId = &v - return s -} - -// SetScope sets the Scope field's value. -func (s *ReservedInstancesOffering) SetScope(v string) *ReservedInstancesOffering { - s.Scope = &v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *ReservedInstancesOffering) SetUsagePrice(v float64) *ReservedInstancesOffering { - s.UsagePrice = &v - return s -} - -type ResetFpgaImageAttributeInput struct { - _ struct{} `type:"structure"` - - // The attribute. - Attribute *string `type:"string" enum:"ResetFpgaImageAttributeName"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the AFI. - // - // FpgaImageId is a required field - FpgaImageId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ResetFpgaImageAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetFpgaImageAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetFpgaImageAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetFpgaImageAttributeInput"} - if s.FpgaImageId == nil { - invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *ResetFpgaImageAttributeInput) SetAttribute(v string) *ResetFpgaImageAttributeInput { - s.Attribute = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ResetFpgaImageAttributeInput) SetDryRun(v bool) *ResetFpgaImageAttributeInput { - s.DryRun = &v - return s -} - -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *ResetFpgaImageAttributeInput) SetFpgaImageId(v string) *ResetFpgaImageAttributeInput { - s.FpgaImageId = &v - return s -} - -type ResetFpgaImageAttributeOutput struct { - _ struct{} `type:"structure"` - - // Is true if the request succeeds, and an error otherwise. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s ResetFpgaImageAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetFpgaImageAttributeOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *ResetFpgaImageAttributeOutput) SetReturn(v bool) *ResetFpgaImageAttributeOutput { - s.Return = &v - return s -} - -// Contains the parameters for ResetImageAttribute. -type ResetImageAttributeInput struct { - _ struct{} `type:"structure"` - - // The attribute to reset (currently you can only reset the launch permission - // attribute). - // - // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"ResetImageAttributeName"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the AMI. - // - // ImageId is a required field - ImageId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ResetImageAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetImageAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetImageAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetImageAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - if s.ImageId == nil { - invalidParams.Add(request.NewErrParamRequired("ImageId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *ResetImageAttributeInput) SetAttribute(v string) *ResetImageAttributeInput { - s.Attribute = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ResetImageAttributeInput) SetDryRun(v bool) *ResetImageAttributeInput { - s.DryRun = &v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *ResetImageAttributeInput) SetImageId(v string) *ResetImageAttributeInput { - s.ImageId = &v - return s -} - -type ResetImageAttributeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ResetImageAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetImageAttributeOutput) GoString() string { - return s.String() -} - -type ResetInstanceAttributeInput struct { - _ struct{} `type:"structure"` - - // The attribute to reset. - // - // You can only reset the following attributes: kernel | ramdisk | sourceDestCheck. - // To change an instance attribute, use ModifyInstanceAttribute. - // - // Attribute is a required field - Attribute *string `locationName:"attribute" type:"string" required:"true" enum:"InstanceAttributeName"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` -} - -// String returns the string representation -func (s ResetInstanceAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetInstanceAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetInstanceAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetInstanceAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *ResetInstanceAttributeInput) SetAttribute(v string) *ResetInstanceAttributeInput { - s.Attribute = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ResetInstanceAttributeInput) SetDryRun(v bool) *ResetInstanceAttributeInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ResetInstanceAttributeInput) SetInstanceId(v string) *ResetInstanceAttributeInput { - s.InstanceId = &v - return s -} - -type ResetInstanceAttributeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ResetInstanceAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetInstanceAttributeOutput) GoString() string { - return s.String() -} - -// Contains the parameters for ResetNetworkInterfaceAttribute. -type ResetNetworkInterfaceAttributeInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the network interface. - // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` - - // The source/destination checking attribute. Resets the value to true. - SourceDestCheck *string `locationName:"sourceDestCheck" type:"string"` -} - -// String returns the string representation -func (s ResetNetworkInterfaceAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetNetworkInterfaceAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetNetworkInterfaceAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetNetworkInterfaceAttributeInput"} - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *ResetNetworkInterfaceAttributeInput) SetDryRun(v bool) *ResetNetworkInterfaceAttributeInput { - s.DryRun = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *ResetNetworkInterfaceAttributeInput) SetNetworkInterfaceId(v string) *ResetNetworkInterfaceAttributeInput { - s.NetworkInterfaceId = &v - return s -} - -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *ResetNetworkInterfaceAttributeInput) SetSourceDestCheck(v string) *ResetNetworkInterfaceAttributeInput { - s.SourceDestCheck = &v - return s -} - -type ResetNetworkInterfaceAttributeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ResetNetworkInterfaceAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetNetworkInterfaceAttributeOutput) GoString() string { - return s.String() -} - -// Contains the parameters for ResetSnapshotAttribute. -type ResetSnapshotAttributeInput struct { - _ struct{} `type:"structure"` - - // The attribute to reset. Currently, only the attribute for permission to create - // volumes can be reset. - // - // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"SnapshotAttributeName"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the snapshot. - // - // SnapshotId is a required field - SnapshotId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ResetSnapshotAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetSnapshotAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetSnapshotAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetSnapshotAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - if s.SnapshotId == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *ResetSnapshotAttributeInput) SetAttribute(v string) *ResetSnapshotAttributeInput { - s.Attribute = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ResetSnapshotAttributeInput) SetDryRun(v bool) *ResetSnapshotAttributeInput { - s.DryRun = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *ResetSnapshotAttributeInput) SetSnapshotId(v string) *ResetSnapshotAttributeInput { - s.SnapshotId = &v - return s -} - -type ResetSnapshotAttributeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ResetSnapshotAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetSnapshotAttributeOutput) GoString() string { - return s.String() -} - -// Describes the error that's returned when you cannot delete a launch template -// version. -type ResponseError struct { - _ struct{} `type:"structure"` - - // The error code. - Code *string `locationName:"code" type:"string" enum:"LaunchTemplateErrorCode"` - - // The error message, if applicable. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s ResponseError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResponseError) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *ResponseError) SetCode(v string) *ResponseError { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ResponseError) SetMessage(v string) *ResponseError { - s.Message = &v - return s -} - -// The information for a launch template. -type ResponseLaunchTemplateData struct { - _ struct{} `type:"structure"` - - // The block device mappings. - BlockDeviceMappings []*LaunchTemplateBlockDeviceMapping `locationName:"blockDeviceMappingSet" locationNameList:"item" type:"list"` - - // Information about the Capacity Reservation targeting option. - CapacityReservationSpecification *LaunchTemplateCapacityReservationSpecificationResponse `locationName:"capacityReservationSpecification" type:"structure"` - - // The CPU options for the instance. For more information, see Optimizing CPU - // Options (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) - // in the Amazon Elastic Compute Cloud User Guide. - CpuOptions *LaunchTemplateCpuOptions `locationName:"cpuOptions" type:"structure"` - - // The credit option for CPU usage of the instance. - CreditSpecification *CreditSpecification `locationName:"creditSpecification" type:"structure"` - - // If set to true, indicates that the instance cannot be terminated using the - // Amazon EC2 console, command line tool, or API. - DisableApiTermination *bool `locationName:"disableApiTermination" type:"boolean"` - - // Indicates whether the instance is optimized for Amazon EBS I/O. - EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` - - // The elastic GPU specification. - ElasticGpuSpecifications []*ElasticGpuSpecificationResponse `locationName:"elasticGpuSpecificationSet" locationNameList:"item" type:"list"` - - // The elastic inference accelerator for the instance. - ElasticInferenceAccelerators []*LaunchTemplateElasticInferenceAcceleratorResponse `locationName:"elasticInferenceAcceleratorSet" locationNameList:"item" type:"list"` - - // Indicates whether an instance is configured for hibernation. For more information, - // see Hibernate Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) - // in the Amazon Elastic Compute Cloud User Guide. - HibernationOptions *LaunchTemplateHibernationOptions `locationName:"hibernationOptions" type:"structure"` - - // The IAM instance profile. - IamInstanceProfile *LaunchTemplateIamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` - - // The ID of the AMI that was used to launch the instance. - ImageId *string `locationName:"imageId" type:"string"` - - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"` - - // The market (purchasing) option for the instances. - InstanceMarketOptions *LaunchTemplateInstanceMarketOptions `locationName:"instanceMarketOptions" type:"structure"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // The ID of the kernel, if applicable. - KernelId *string `locationName:"kernelId" type:"string"` - - // The name of the key pair. - KeyName *string `locationName:"keyName" type:"string"` - - // The license configurations. - LicenseSpecifications []*LaunchTemplateLicenseConfiguration `locationName:"licenseSet" locationNameList:"item" type:"list"` - - // The monitoring for the instance. - Monitoring *LaunchTemplatesMonitoring `locationName:"monitoring" type:"structure"` - - // The network interfaces. - NetworkInterfaces []*LaunchTemplateInstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` - - // The placement of the instance. - Placement *LaunchTemplatePlacement `locationName:"placement" type:"structure"` - - // The ID of the RAM disk, if applicable. - RamDiskId *string `locationName:"ramDiskId" type:"string"` - - // The security group IDs. - SecurityGroupIds []*string `locationName:"securityGroupIdSet" locationNameList:"item" type:"list"` - - // The security group names. - SecurityGroups []*string `locationName:"securityGroupSet" locationNameList:"item" type:"list"` - - // The tags. - TagSpecifications []*LaunchTemplateTagSpecification `locationName:"tagSpecificationSet" locationNameList:"item" type:"list"` - - // The user data for the instance. - UserData *string `locationName:"userData" type:"string"` -} - -// String returns the string representation -func (s ResponseLaunchTemplateData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResponseLaunchTemplateData) GoString() string { - return s.String() -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *ResponseLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateBlockDeviceMapping) *ResponseLaunchTemplateData { - s.BlockDeviceMappings = v - return s -} - -// SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value. -func (s *ResponseLaunchTemplateData) SetCapacityReservationSpecification(v *LaunchTemplateCapacityReservationSpecificationResponse) *ResponseLaunchTemplateData { - s.CapacityReservationSpecification = v - return s -} - -// SetCpuOptions sets the CpuOptions field's value. -func (s *ResponseLaunchTemplateData) SetCpuOptions(v *LaunchTemplateCpuOptions) *ResponseLaunchTemplateData { - s.CpuOptions = v - return s -} - -// SetCreditSpecification sets the CreditSpecification field's value. -func (s *ResponseLaunchTemplateData) SetCreditSpecification(v *CreditSpecification) *ResponseLaunchTemplateData { - s.CreditSpecification = v - return s -} - -// SetDisableApiTermination sets the DisableApiTermination field's value. -func (s *ResponseLaunchTemplateData) SetDisableApiTermination(v bool) *ResponseLaunchTemplateData { - s.DisableApiTermination = &v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *ResponseLaunchTemplateData) SetEbsOptimized(v bool) *ResponseLaunchTemplateData { - s.EbsOptimized = &v - return s -} - -// SetElasticGpuSpecifications sets the ElasticGpuSpecifications field's value. -func (s *ResponseLaunchTemplateData) SetElasticGpuSpecifications(v []*ElasticGpuSpecificationResponse) *ResponseLaunchTemplateData { - s.ElasticGpuSpecifications = v - return s -} - -// SetElasticInferenceAccelerators sets the ElasticInferenceAccelerators field's value. -func (s *ResponseLaunchTemplateData) SetElasticInferenceAccelerators(v []*LaunchTemplateElasticInferenceAcceleratorResponse) *ResponseLaunchTemplateData { - s.ElasticInferenceAccelerators = v - return s -} - -// SetHibernationOptions sets the HibernationOptions field's value. -func (s *ResponseLaunchTemplateData) SetHibernationOptions(v *LaunchTemplateHibernationOptions) *ResponseLaunchTemplateData { - s.HibernationOptions = v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *ResponseLaunchTemplateData) SetIamInstanceProfile(v *LaunchTemplateIamInstanceProfileSpecification) *ResponseLaunchTemplateData { - s.IamInstanceProfile = v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *ResponseLaunchTemplateData) SetImageId(v string) *ResponseLaunchTemplateData { - s.ImageId = &v - return s -} - -// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. -func (s *ResponseLaunchTemplateData) SetInstanceInitiatedShutdownBehavior(v string) *ResponseLaunchTemplateData { - s.InstanceInitiatedShutdownBehavior = &v - return s -} - -// SetInstanceMarketOptions sets the InstanceMarketOptions field's value. -func (s *ResponseLaunchTemplateData) SetInstanceMarketOptions(v *LaunchTemplateInstanceMarketOptions) *ResponseLaunchTemplateData { - s.InstanceMarketOptions = v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ResponseLaunchTemplateData) SetInstanceType(v string) *ResponseLaunchTemplateData { - s.InstanceType = &v - return s -} - -// SetKernelId sets the KernelId field's value. -func (s *ResponseLaunchTemplateData) SetKernelId(v string) *ResponseLaunchTemplateData { - s.KernelId = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *ResponseLaunchTemplateData) SetKeyName(v string) *ResponseLaunchTemplateData { - s.KeyName = &v - return s -} - -// SetLicenseSpecifications sets the LicenseSpecifications field's value. -func (s *ResponseLaunchTemplateData) SetLicenseSpecifications(v []*LaunchTemplateLicenseConfiguration) *ResponseLaunchTemplateData { - s.LicenseSpecifications = v - return s -} - -// SetMonitoring sets the Monitoring field's value. -func (s *ResponseLaunchTemplateData) SetMonitoring(v *LaunchTemplatesMonitoring) *ResponseLaunchTemplateData { - s.Monitoring = v - return s -} - -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *ResponseLaunchTemplateData) SetNetworkInterfaces(v []*LaunchTemplateInstanceNetworkInterfaceSpecification) *ResponseLaunchTemplateData { - s.NetworkInterfaces = v - return s -} - -// SetPlacement sets the Placement field's value. -func (s *ResponseLaunchTemplateData) SetPlacement(v *LaunchTemplatePlacement) *ResponseLaunchTemplateData { - s.Placement = v - return s -} - -// SetRamDiskId sets the RamDiskId field's value. -func (s *ResponseLaunchTemplateData) SetRamDiskId(v string) *ResponseLaunchTemplateData { - s.RamDiskId = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *ResponseLaunchTemplateData) SetSecurityGroupIds(v []*string) *ResponseLaunchTemplateData { - s.SecurityGroupIds = v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *ResponseLaunchTemplateData) SetSecurityGroups(v []*string) *ResponseLaunchTemplateData { - s.SecurityGroups = v - return s -} - -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *ResponseLaunchTemplateData) SetTagSpecifications(v []*LaunchTemplateTagSpecification) *ResponseLaunchTemplateData { - s.TagSpecifications = v - return s -} - -// SetUserData sets the UserData field's value. -func (s *ResponseLaunchTemplateData) SetUserData(v string) *ResponseLaunchTemplateData { - s.UserData = &v - return s -} - -type RestoreAddressToClassicInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The Elastic IP address. - // - // PublicIp is a required field - PublicIp *string `locationName:"publicIp" type:"string" required:"true"` -} - -// String returns the string representation -func (s RestoreAddressToClassicInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreAddressToClassicInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreAddressToClassicInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreAddressToClassicInput"} - if s.PublicIp == nil { - invalidParams.Add(request.NewErrParamRequired("PublicIp")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *RestoreAddressToClassicInput) SetDryRun(v bool) *RestoreAddressToClassicInput { - s.DryRun = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *RestoreAddressToClassicInput) SetPublicIp(v string) *RestoreAddressToClassicInput { - s.PublicIp = &v - return s -} - -type RestoreAddressToClassicOutput struct { - _ struct{} `type:"structure"` - - // The Elastic IP address. - PublicIp *string `locationName:"publicIp" type:"string"` - - // The move status for the IP address. - Status *string `locationName:"status" type:"string" enum:"Status"` -} - -// String returns the string representation -func (s RestoreAddressToClassicOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreAddressToClassicOutput) GoString() string { - return s.String() -} - -// SetPublicIp sets the PublicIp field's value. -func (s *RestoreAddressToClassicOutput) SetPublicIp(v string) *RestoreAddressToClassicOutput { - s.PublicIp = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *RestoreAddressToClassicOutput) SetStatus(v string) *RestoreAddressToClassicOutput { - s.Status = &v - return s -} - -type RevokeClientVpnIngressInput struct { - _ struct{} `type:"structure"` - - // The ID of the Active Directory group for which to revoke access. - AccessGroupId *string `type:"string"` - - // The ID of the Client VPN endpoint with which the authorization rule is associated. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // Indicates whether access should be revoked for all clients. - RevokeAllGroups *bool `type:"boolean"` - - // The IPv4 address range, in CIDR notation, of the network for which access - // is being removed. - // - // TargetNetworkCidr is a required field - TargetNetworkCidr *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RevokeClientVpnIngressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeClientVpnIngressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RevokeClientVpnIngressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RevokeClientVpnIngressInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - if s.TargetNetworkCidr == nil { - invalidParams.Add(request.NewErrParamRequired("TargetNetworkCidr")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessGroupId sets the AccessGroupId field's value. -func (s *RevokeClientVpnIngressInput) SetAccessGroupId(v string) *RevokeClientVpnIngressInput { - s.AccessGroupId = &v - return s -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *RevokeClientVpnIngressInput) SetClientVpnEndpointId(v string) *RevokeClientVpnIngressInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *RevokeClientVpnIngressInput) SetDryRun(v bool) *RevokeClientVpnIngressInput { - s.DryRun = &v - return s -} - -// SetRevokeAllGroups sets the RevokeAllGroups field's value. -func (s *RevokeClientVpnIngressInput) SetRevokeAllGroups(v bool) *RevokeClientVpnIngressInput { - s.RevokeAllGroups = &v - return s -} - -// SetTargetNetworkCidr sets the TargetNetworkCidr field's value. -func (s *RevokeClientVpnIngressInput) SetTargetNetworkCidr(v string) *RevokeClientVpnIngressInput { - s.TargetNetworkCidr = &v - return s -} - -type RevokeClientVpnIngressOutput struct { - _ struct{} `type:"structure"` - - // The current state of the authorization rule. - Status *ClientVpnAuthorizationRuleStatus `locationName:"status" type:"structure"` -} - -// String returns the string representation -func (s RevokeClientVpnIngressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeClientVpnIngressOutput) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *RevokeClientVpnIngressOutput) SetStatus(v *ClientVpnAuthorizationRuleStatus) *RevokeClientVpnIngressOutput { - s.Status = v - return s -} - -type RevokeSecurityGroupEgressInput struct { - _ struct{} `type:"structure"` - - // Not supported. Use a set of IP permissions to specify the CIDR. - CidrIp *string `locationName:"cidrIp" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Not supported. Use a set of IP permissions to specify the port. - FromPort *int64 `locationName:"fromPort" type:"integer"` - - // The ID of the security group. - // - // GroupId is a required field - GroupId *string `locationName:"groupId" type:"string" required:"true"` - - // One or more sets of IP permissions. You can't specify a destination security - // group and a CIDR IP address range in the same set of permissions. - IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` - - // Not supported. Use a set of IP permissions to specify the protocol name or - // number. - IpProtocol *string `locationName:"ipProtocol" type:"string"` - - // Not supported. Use a set of IP permissions to specify a destination security - // group. - SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"` - - // Not supported. Use a set of IP permissions to specify a destination security - // group. - SourceSecurityGroupOwnerId *string `locationName:"sourceSecurityGroupOwnerId" type:"string"` - - // Not supported. Use a set of IP permissions to specify the port. - ToPort *int64 `locationName:"toPort" type:"integer"` -} - -// String returns the string representation -func (s RevokeSecurityGroupEgressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeSecurityGroupEgressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RevokeSecurityGroupEgressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RevokeSecurityGroupEgressInput"} - if s.GroupId == nil { - invalidParams.Add(request.NewErrParamRequired("GroupId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCidrIp sets the CidrIp field's value. -func (s *RevokeSecurityGroupEgressInput) SetCidrIp(v string) *RevokeSecurityGroupEgressInput { - s.CidrIp = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *RevokeSecurityGroupEgressInput) SetDryRun(v bool) *RevokeSecurityGroupEgressInput { - s.DryRun = &v - return s -} - -// SetFromPort sets the FromPort field's value. -func (s *RevokeSecurityGroupEgressInput) SetFromPort(v int64) *RevokeSecurityGroupEgressInput { - s.FromPort = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *RevokeSecurityGroupEgressInput) SetGroupId(v string) *RevokeSecurityGroupEgressInput { - s.GroupId = &v - return s -} - -// SetIpPermissions sets the IpPermissions field's value. -func (s *RevokeSecurityGroupEgressInput) SetIpPermissions(v []*IpPermission) *RevokeSecurityGroupEgressInput { - s.IpPermissions = v - return s -} - -// SetIpProtocol sets the IpProtocol field's value. -func (s *RevokeSecurityGroupEgressInput) SetIpProtocol(v string) *RevokeSecurityGroupEgressInput { - s.IpProtocol = &v - return s -} - -// SetSourceSecurityGroupName sets the SourceSecurityGroupName field's value. -func (s *RevokeSecurityGroupEgressInput) SetSourceSecurityGroupName(v string) *RevokeSecurityGroupEgressInput { - s.SourceSecurityGroupName = &v - return s -} - -// SetSourceSecurityGroupOwnerId sets the SourceSecurityGroupOwnerId field's value. -func (s *RevokeSecurityGroupEgressInput) SetSourceSecurityGroupOwnerId(v string) *RevokeSecurityGroupEgressInput { - s.SourceSecurityGroupOwnerId = &v - return s -} - -// SetToPort sets the ToPort field's value. -func (s *RevokeSecurityGroupEgressInput) SetToPort(v int64) *RevokeSecurityGroupEgressInput { - s.ToPort = &v - return s -} - -type RevokeSecurityGroupEgressOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RevokeSecurityGroupEgressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeSecurityGroupEgressOutput) GoString() string { - return s.String() -} - -type RevokeSecurityGroupIngressInput struct { - _ struct{} `type:"structure"` - - // The CIDR IP address range. You can't specify this parameter when specifying - // a source security group. - CidrIp *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The start of port range for the TCP and UDP protocols, or an ICMP type number. - // For the ICMP type number, use -1 to specify all ICMP types. - FromPort *int64 `type:"integer"` - - // The ID of the security group. You must specify either the security group - // ID or the security group name in the request. For security groups in a nondefault - // VPC, you must specify the security group ID. - GroupId *string `type:"string"` - - // [EC2-Classic, default VPC] The name of the security group. You must specify - // either the security group ID or the security group name in the request. - GroupName *string `type:"string"` - - // One or more sets of IP permissions. You can't specify a source security group - // and a CIDR IP address range in the same set of permissions. - IpPermissions []*IpPermission `locationNameList:"item" type:"list"` - - // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). - // Use -1 to specify all. - IpProtocol *string `type:"string"` - - // [EC2-Classic, default VPC] The name of the source security group. You can't - // specify this parameter in combination with the following parameters: the - // CIDR IP address range, the start of the port range, the IP protocol, and - // the end of the port range. For EC2-VPC, the source security group must be - // in the same VPC. To revoke a specific rule for an IP protocol and port range, - // use a set of IP permissions instead. - SourceSecurityGroupName *string `type:"string"` - - // [EC2-Classic] The AWS account ID of the source security group, if the source - // security group is in a different account. You can't specify this parameter - // in combination with the following parameters: the CIDR IP address range, - // the IP protocol, the start of the port range, and the end of the port range. - // To revoke a specific rule for an IP protocol and port range, use a set of - // IP permissions instead. - SourceSecurityGroupOwnerId *string `type:"string"` - - // The end of port range for the TCP and UDP protocols, or an ICMP code number. - // For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type. - ToPort *int64 `type:"integer"` -} - -// String returns the string representation -func (s RevokeSecurityGroupIngressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeSecurityGroupIngressInput) GoString() string { - return s.String() -} - -// SetCidrIp sets the CidrIp field's value. -func (s *RevokeSecurityGroupIngressInput) SetCidrIp(v string) *RevokeSecurityGroupIngressInput { - s.CidrIp = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *RevokeSecurityGroupIngressInput) SetDryRun(v bool) *RevokeSecurityGroupIngressInput { - s.DryRun = &v - return s -} - -// SetFromPort sets the FromPort field's value. -func (s *RevokeSecurityGroupIngressInput) SetFromPort(v int64) *RevokeSecurityGroupIngressInput { - s.FromPort = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *RevokeSecurityGroupIngressInput) SetGroupId(v string) *RevokeSecurityGroupIngressInput { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *RevokeSecurityGroupIngressInput) SetGroupName(v string) *RevokeSecurityGroupIngressInput { - s.GroupName = &v - return s -} - -// SetIpPermissions sets the IpPermissions field's value. -func (s *RevokeSecurityGroupIngressInput) SetIpPermissions(v []*IpPermission) *RevokeSecurityGroupIngressInput { - s.IpPermissions = v - return s -} - -// SetIpProtocol sets the IpProtocol field's value. -func (s *RevokeSecurityGroupIngressInput) SetIpProtocol(v string) *RevokeSecurityGroupIngressInput { - s.IpProtocol = &v - return s -} - -// SetSourceSecurityGroupName sets the SourceSecurityGroupName field's value. -func (s *RevokeSecurityGroupIngressInput) SetSourceSecurityGroupName(v string) *RevokeSecurityGroupIngressInput { - s.SourceSecurityGroupName = &v - return s -} - -// SetSourceSecurityGroupOwnerId sets the SourceSecurityGroupOwnerId field's value. -func (s *RevokeSecurityGroupIngressInput) SetSourceSecurityGroupOwnerId(v string) *RevokeSecurityGroupIngressInput { - s.SourceSecurityGroupOwnerId = &v - return s -} - -// SetToPort sets the ToPort field's value. -func (s *RevokeSecurityGroupIngressInput) SetToPort(v int64) *RevokeSecurityGroupIngressInput { - s.ToPort = &v - return s -} - -type RevokeSecurityGroupIngressOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RevokeSecurityGroupIngressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeSecurityGroupIngressOutput) GoString() string { - return s.String() -} - -// Describes a route in a route table. -type Route struct { - _ struct{} `type:"structure"` - - // The IPv4 CIDR block used for the destination match. - DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` - - // The IPv6 CIDR block used for the destination match. - DestinationIpv6CidrBlock *string `locationName:"destinationIpv6CidrBlock" type:"string"` - - // The prefix of the AWS service. - DestinationPrefixListId *string `locationName:"destinationPrefixListId" type:"string"` - - // The ID of the egress-only internet gateway. - EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` - - // The ID of a gateway attached to your VPC. - GatewayId *string `locationName:"gatewayId" type:"string"` - - // The ID of a NAT instance in your VPC. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The AWS account ID of the owner of the instance. - InstanceOwnerId *string `locationName:"instanceOwnerId" type:"string"` - - // The ID of a NAT gateway. - NatGatewayId *string `locationName:"natGatewayId" type:"string"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // Describes how the route was created. - // - // * CreateRouteTable - The route was automatically created when the route - // table was created. - // - // * CreateRoute - The route was manually added to the route table. - // - // * EnableVgwRoutePropagation - The route was propagated by route propagation. - Origin *string `locationName:"origin" type:"string" enum:"RouteOrigin"` - - // The state of the route. The blackhole state indicates that the route's target - // isn't available (for example, the specified gateway isn't attached to the - // VPC, or the specified NAT instance has been terminated). - State *string `locationName:"state" type:"string" enum:"RouteState"` - - // The ID of a transit gateway. - TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` - - // The ID of a VPC peering connection. - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` -} - -// String returns the string representation -func (s Route) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Route) GoString() string { - return s.String() -} - -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *Route) SetDestinationCidrBlock(v string) *Route { - s.DestinationCidrBlock = &v - return s -} - -// SetDestinationIpv6CidrBlock sets the DestinationIpv6CidrBlock field's value. -func (s *Route) SetDestinationIpv6CidrBlock(v string) *Route { - s.DestinationIpv6CidrBlock = &v - return s -} - -// SetDestinationPrefixListId sets the DestinationPrefixListId field's value. -func (s *Route) SetDestinationPrefixListId(v string) *Route { - s.DestinationPrefixListId = &v - return s -} - -// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. -func (s *Route) SetEgressOnlyInternetGatewayId(v string) *Route { - s.EgressOnlyInternetGatewayId = &v - return s -} - -// SetGatewayId sets the GatewayId field's value. -func (s *Route) SetGatewayId(v string) *Route { - s.GatewayId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *Route) SetInstanceId(v string) *Route { - s.InstanceId = &v - return s -} - -// SetInstanceOwnerId sets the InstanceOwnerId field's value. -func (s *Route) SetInstanceOwnerId(v string) *Route { - s.InstanceOwnerId = &v - return s -} - -// SetNatGatewayId sets the NatGatewayId field's value. -func (s *Route) SetNatGatewayId(v string) *Route { - s.NatGatewayId = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *Route) SetNetworkInterfaceId(v string) *Route { - s.NetworkInterfaceId = &v - return s -} - -// SetOrigin sets the Origin field's value. -func (s *Route) SetOrigin(v string) *Route { - s.Origin = &v - return s -} - -// SetState sets the State field's value. -func (s *Route) SetState(v string) *Route { - s.State = &v - return s -} - -// SetTransitGatewayId sets the TransitGatewayId field's value. -func (s *Route) SetTransitGatewayId(v string) *Route { - s.TransitGatewayId = &v - return s -} - -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *Route) SetVpcPeeringConnectionId(v string) *Route { - s.VpcPeeringConnectionId = &v - return s -} - -// Describes a route table. -type RouteTable struct { - _ struct{} `type:"structure"` - - // The associations between the route table and one or more subnets. - Associations []*RouteTableAssociation `locationName:"associationSet" locationNameList:"item" type:"list"` - - // The ID of the AWS account that owns the route table. - OwnerId *string `locationName:"ownerId" type:"string"` - - // Any virtual private gateway (VGW) propagating routes. - PropagatingVgws []*PropagatingVgw `locationName:"propagatingVgwSet" locationNameList:"item" type:"list"` - - // The ID of the route table. - RouteTableId *string `locationName:"routeTableId" type:"string"` - - // The routes in the route table. - Routes []*Route `locationName:"routeSet" locationNameList:"item" type:"list"` - - // Any tags assigned to the route table. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s RouteTable) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RouteTable) GoString() string { - return s.String() -} - -// SetAssociations sets the Associations field's value. -func (s *RouteTable) SetAssociations(v []*RouteTableAssociation) *RouteTable { - s.Associations = v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *RouteTable) SetOwnerId(v string) *RouteTable { - s.OwnerId = &v - return s -} - -// SetPropagatingVgws sets the PropagatingVgws field's value. -func (s *RouteTable) SetPropagatingVgws(v []*PropagatingVgw) *RouteTable { - s.PropagatingVgws = v - return s -} - -// SetRouteTableId sets the RouteTableId field's value. -func (s *RouteTable) SetRouteTableId(v string) *RouteTable { - s.RouteTableId = &v - return s -} - -// SetRoutes sets the Routes field's value. -func (s *RouteTable) SetRoutes(v []*Route) *RouteTable { - s.Routes = v - return s -} - -// SetTags sets the Tags field's value. -func (s *RouteTable) SetTags(v []*Tag) *RouteTable { - s.Tags = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *RouteTable) SetVpcId(v string) *RouteTable { - s.VpcId = &v - return s -} - -// Describes an association between a route table and a subnet. -type RouteTableAssociation struct { - _ struct{} `type:"structure"` - - // Indicates whether this is the main route table. - Main *bool `locationName:"main" type:"boolean"` - - // The ID of the association between a route table and a subnet. - RouteTableAssociationId *string `locationName:"routeTableAssociationId" type:"string"` - - // The ID of the route table. - RouteTableId *string `locationName:"routeTableId" type:"string"` - - // The ID of the subnet. A subnet ID is not returned for an implicit association. - SubnetId *string `locationName:"subnetId" type:"string"` -} - -// String returns the string representation -func (s RouteTableAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RouteTableAssociation) GoString() string { - return s.String() -} - -// SetMain sets the Main field's value. -func (s *RouteTableAssociation) SetMain(v bool) *RouteTableAssociation { - s.Main = &v - return s -} - -// SetRouteTableAssociationId sets the RouteTableAssociationId field's value. -func (s *RouteTableAssociation) SetRouteTableAssociationId(v string) *RouteTableAssociation { - s.RouteTableAssociationId = &v - return s -} - -// SetRouteTableId sets the RouteTableId field's value. -func (s *RouteTableAssociation) SetRouteTableId(v string) *RouteTableAssociation { - s.RouteTableId = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *RouteTableAssociation) SetSubnetId(v string) *RouteTableAssociation { - s.SubnetId = &v - return s -} - -type RunInstancesInput struct { - _ struct{} `type:"structure"` - - // Reserved. - AdditionalInfo *string `locationName:"additionalInfo" type:"string"` - - // One or more block device mapping entries. You can't specify both a snapshot - // ID and an encryption value. This is because only blank volumes can be encrypted - // on creation. If a snapshot is the basis for a volume, it is not blank and - // its encryption status is used for the volume encryption status. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` - - // Information about the Capacity Reservation targeting option. - CapacityReservationSpecification *CapacityReservationSpecification `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - // - // Constraints: Maximum 64 ASCII characters - ClientToken *string `locationName:"clientToken" type:"string"` - - // The CPU options for the instance. For more information, see Optimizing CPU - // Options (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) - // in the Amazon Elastic Compute Cloud User Guide. - CpuOptions *CpuOptionsRequest `type:"structure"` - - // The credit option for CPU usage of the instance. Valid values are standard - // and unlimited. To change this attribute after launch, use ModifyInstanceCreditSpecification. - // For more information, see Burstable Performance Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // Default: standard (T2 instances) or unlimited (T3 instances) - CreditSpecification *CreditSpecificationRequest `type:"structure"` - - // If you set this parameter to true, you can't terminate the instance using - // the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute - // to false after launch, use ModifyInstanceAttribute. Alternatively, if you - // set InstanceInitiatedShutdownBehavior to terminate, you can terminate the - // instance by running the shutdown command from the instance. - // - // Default: false - DisableApiTermination *bool `locationName:"disableApiTermination" type:"boolean"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal Amazon EBS I/O performance. This optimization isn't - // available with all instance types. Additional usage charges apply when using - // an EBS-optimized instance. - // - // Default: false - EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` - - // An elastic GPU to associate with the instance. - ElasticGpuSpecification []*ElasticGpuSpecification `locationNameList:"item" type:"list"` - - // An elastic inference accelerator. - ElasticInferenceAccelerators []*ElasticInferenceAccelerator `locationName:"ElasticInferenceAccelerator" locationNameList:"item" type:"list"` - - // Indicates whether an instance is enabled for hibernation. For more information, - // see Hibernate Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) - // in the Amazon Elastic Compute Cloud User Guide. - HibernationOptions *HibernationOptionsRequest `type:"structure"` - - // The IAM instance profile. - IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` - - // The ID of the AMI, which you can get by calling DescribeImages. An AMI is - // required to launch an instance and must be specified here or in a launch - // template. - ImageId *string `type:"string"` - - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - // - // Default: stop - InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"` - - // The market (purchasing) option for the instances. - // - // For RunInstances, persistent Spot Instance requests are only supported when - // InstanceInterruptionBehavior is set to either hibernate or stop. - InstanceMarketOptions *InstanceMarketOptionsRequest `type:"structure"` - - // The instance type. For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // Default: m1.small - InstanceType *string `type:"string" enum:"InstanceType"` - - // [EC2-VPC] A number of IPv6 addresses to associate with the primary network - // interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. - // You cannot specify this option and the option to assign specific IPv6 addresses - // in the same request. You can specify this option if you've specified a minimum - // number of instances to launch. - Ipv6AddressCount *int64 `type:"integer"` - - // [EC2-VPC] Specify one or more IPv6 addresses from the range of the subnet - // to associate with the primary network interface. You cannot specify this - // option and the option to assign a number of IPv6 addresses in the same request. - // You cannot specify this option if you've specified a minimum number of instances - // to launch. - Ipv6Addresses []*InstanceIpv6Address `locationName:"Ipv6Address" locationNameList:"item" type:"list"` - - // The ID of the kernel. - // - // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more - // information, see PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - // in the Amazon Elastic Compute Cloud User Guide. - KernelId *string `type:"string"` - - // The name of the key pair. You can create a key pair using CreateKeyPair or - // ImportKeyPair. - // - // If you do not specify a key pair, you can't connect to the instance unless - // you choose an AMI that is configured to allow users another way to log in. - KeyName *string `type:"string"` - - // The launch template to use to launch the instances. Any parameters that you - // specify in RunInstances override the same parameters in the launch template. - // You can specify either the name or ID of a launch template, but not both. - LaunchTemplate *LaunchTemplateSpecification `type:"structure"` - - // The license configurations. - LicenseSpecifications []*LicenseConfigurationRequest `locationName:"LicenseSpecification" locationNameList:"item" type:"list"` - - // The maximum number of instances to launch. If you specify more instances - // than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches - // the largest possible number of instances above MinCount. - // - // Constraints: Between 1 and the maximum number you're allowed for the specified - // instance type. For more information about the default limits, and how to - // request an increase, see How many instances can I run in Amazon EC2 (http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2) - // in the Amazon EC2 FAQ. - // - // MaxCount is a required field - MaxCount *int64 `type:"integer" required:"true"` - - // The minimum number of instances to launch. If you specify a minimum that - // is more instances than Amazon EC2 can launch in the target Availability Zone, - // Amazon EC2 launches no instances. - // - // Constraints: Between 1 and the maximum number you're allowed for the specified - // instance type. For more information about the default limits, and how to - // request an increase, see How many instances can I run in Amazon EC2 (http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2) - // in the Amazon EC2 General FAQ. - // - // MinCount is a required field - MinCount *int64 `type:"integer" required:"true"` - - // The monitoring for the instance. - Monitoring *RunInstancesMonitoringEnabled `type:"structure"` - - // One or more network interfaces. - NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterface" locationNameList:"item" type:"list"` - - // The placement for the instance. - Placement *Placement `type:"structure"` - - // [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 - // address range of the subnet. - // - // Only one private IP address can be designated as primary. You can't specify - // this option if you've specified the option to designate a private IP address - // as the primary IP address in a network interface specification. You cannot - // specify this option if you're launching more than one instance in the request. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // The ID of the RAM disk. - // - // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more - // information, see PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - // in the Amazon Elastic Compute Cloud User Guide. - RamdiskId *string `type:"string"` - - // One or more security group IDs. You can create a security group using CreateSecurityGroup. - // - // Default: Amazon EC2 uses the default security group. - SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` - - // [EC2-Classic, default VPC] One or more security group names. For a nondefault - // VPC, you must use security group IDs instead. - // - // Default: Amazon EC2 uses the default security group. - SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"SecurityGroup" type:"list"` - - // [EC2-VPC] The ID of the subnet to launch the instance into. - SubnetId *string `type:"string"` - - // The tags to apply to the resources during launch. You can only tag instances - // and volumes on launch. The specified tags are applied to all instances or - // volumes that are created during launch. To tag a resource after it has been - // created, see CreateTags. - TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` - - // The user data to make available to the instance. For more information, see - // Running Commands on Your Linux Instance at Launch (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) - // (Linux) and Adding User Data (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data) - // (Windows). If you are using a command line tool, base64-encoding is performed - // for you, and you can load the text from a file. Otherwise, you must provide - // base64-encoded text. - UserData *string `type:"string"` -} - -// String returns the string representation -func (s RunInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RunInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RunInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RunInstancesInput"} - if s.MaxCount == nil { - invalidParams.Add(request.NewErrParamRequired("MaxCount")) - } - if s.MinCount == nil { - invalidParams.Add(request.NewErrParamRequired("MinCount")) - } - if s.CreditSpecification != nil { - if err := s.CreditSpecification.Validate(); err != nil { - invalidParams.AddNested("CreditSpecification", err.(request.ErrInvalidParams)) - } - } - if s.ElasticGpuSpecification != nil { - for i, v := range s.ElasticGpuSpecification { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ElasticGpuSpecification", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ElasticInferenceAccelerators != nil { - for i, v := range s.ElasticInferenceAccelerators { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ElasticInferenceAccelerators", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Monitoring != nil { - if err := s.Monitoring.Validate(); err != nil { - invalidParams.AddNested("Monitoring", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdditionalInfo sets the AdditionalInfo field's value. -func (s *RunInstancesInput) SetAdditionalInfo(v string) *RunInstancesInput { - s.AdditionalInfo = &v - return s -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *RunInstancesInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *RunInstancesInput { - s.BlockDeviceMappings = v - return s -} - -// SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value. -func (s *RunInstancesInput) SetCapacityReservationSpecification(v *CapacityReservationSpecification) *RunInstancesInput { - s.CapacityReservationSpecification = v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *RunInstancesInput) SetClientToken(v string) *RunInstancesInput { - s.ClientToken = &v - return s -} - -// SetCpuOptions sets the CpuOptions field's value. -func (s *RunInstancesInput) SetCpuOptions(v *CpuOptionsRequest) *RunInstancesInput { - s.CpuOptions = v - return s -} - -// SetCreditSpecification sets the CreditSpecification field's value. -func (s *RunInstancesInput) SetCreditSpecification(v *CreditSpecificationRequest) *RunInstancesInput { - s.CreditSpecification = v - return s -} - -// SetDisableApiTermination sets the DisableApiTermination field's value. -func (s *RunInstancesInput) SetDisableApiTermination(v bool) *RunInstancesInput { - s.DisableApiTermination = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *RunInstancesInput) SetDryRun(v bool) *RunInstancesInput { - s.DryRun = &v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *RunInstancesInput) SetEbsOptimized(v bool) *RunInstancesInput { - s.EbsOptimized = &v - return s -} - -// SetElasticGpuSpecification sets the ElasticGpuSpecification field's value. -func (s *RunInstancesInput) SetElasticGpuSpecification(v []*ElasticGpuSpecification) *RunInstancesInput { - s.ElasticGpuSpecification = v - return s -} - -// SetElasticInferenceAccelerators sets the ElasticInferenceAccelerators field's value. -func (s *RunInstancesInput) SetElasticInferenceAccelerators(v []*ElasticInferenceAccelerator) *RunInstancesInput { - s.ElasticInferenceAccelerators = v - return s -} - -// SetHibernationOptions sets the HibernationOptions field's value. -func (s *RunInstancesInput) SetHibernationOptions(v *HibernationOptionsRequest) *RunInstancesInput { - s.HibernationOptions = v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *RunInstancesInput) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *RunInstancesInput { - s.IamInstanceProfile = v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *RunInstancesInput) SetImageId(v string) *RunInstancesInput { - s.ImageId = &v - return s -} - -// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. -func (s *RunInstancesInput) SetInstanceInitiatedShutdownBehavior(v string) *RunInstancesInput { - s.InstanceInitiatedShutdownBehavior = &v - return s -} - -// SetInstanceMarketOptions sets the InstanceMarketOptions field's value. -func (s *RunInstancesInput) SetInstanceMarketOptions(v *InstanceMarketOptionsRequest) *RunInstancesInput { - s.InstanceMarketOptions = v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *RunInstancesInput) SetInstanceType(v string) *RunInstancesInput { - s.InstanceType = &v - return s -} - -// SetIpv6AddressCount sets the Ipv6AddressCount field's value. -func (s *RunInstancesInput) SetIpv6AddressCount(v int64) *RunInstancesInput { - s.Ipv6AddressCount = &v - return s -} - -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *RunInstancesInput) SetIpv6Addresses(v []*InstanceIpv6Address) *RunInstancesInput { - s.Ipv6Addresses = v - return s -} - -// SetKernelId sets the KernelId field's value. -func (s *RunInstancesInput) SetKernelId(v string) *RunInstancesInput { - s.KernelId = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *RunInstancesInput) SetKeyName(v string) *RunInstancesInput { - s.KeyName = &v - return s -} - -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *RunInstancesInput) SetLaunchTemplate(v *LaunchTemplateSpecification) *RunInstancesInput { - s.LaunchTemplate = v - return s -} - -// SetLicenseSpecifications sets the LicenseSpecifications field's value. -func (s *RunInstancesInput) SetLicenseSpecifications(v []*LicenseConfigurationRequest) *RunInstancesInput { - s.LicenseSpecifications = v - return s -} - -// SetMaxCount sets the MaxCount field's value. -func (s *RunInstancesInput) SetMaxCount(v int64) *RunInstancesInput { - s.MaxCount = &v - return s -} - -// SetMinCount sets the MinCount field's value. -func (s *RunInstancesInput) SetMinCount(v int64) *RunInstancesInput { - s.MinCount = &v - return s -} - -// SetMonitoring sets the Monitoring field's value. -func (s *RunInstancesInput) SetMonitoring(v *RunInstancesMonitoringEnabled) *RunInstancesInput { - s.Monitoring = v - return s -} - -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *RunInstancesInput) SetNetworkInterfaces(v []*InstanceNetworkInterfaceSpecification) *RunInstancesInput { - s.NetworkInterfaces = v - return s -} - -// SetPlacement sets the Placement field's value. -func (s *RunInstancesInput) SetPlacement(v *Placement) *RunInstancesInput { - s.Placement = v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *RunInstancesInput) SetPrivateIpAddress(v string) *RunInstancesInput { - s.PrivateIpAddress = &v - return s -} - -// SetRamdiskId sets the RamdiskId field's value. -func (s *RunInstancesInput) SetRamdiskId(v string) *RunInstancesInput { - s.RamdiskId = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *RunInstancesInput) SetSecurityGroupIds(v []*string) *RunInstancesInput { - s.SecurityGroupIds = v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *RunInstancesInput) SetSecurityGroups(v []*string) *RunInstancesInput { - s.SecurityGroups = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *RunInstancesInput) SetSubnetId(v string) *RunInstancesInput { - s.SubnetId = &v - return s -} - -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *RunInstancesInput) SetTagSpecifications(v []*TagSpecification) *RunInstancesInput { - s.TagSpecifications = v - return s -} - -// SetUserData sets the UserData field's value. -func (s *RunInstancesInput) SetUserData(v string) *RunInstancesInput { - s.UserData = &v - return s -} - -// Describes the monitoring of an instance. -type RunInstancesMonitoringEnabled struct { - _ struct{} `type:"structure"` - - // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring - // is enabled. - // - // Enabled is a required field - Enabled *bool `locationName:"enabled" type:"boolean" required:"true"` -} - -// String returns the string representation -func (s RunInstancesMonitoringEnabled) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RunInstancesMonitoringEnabled) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RunInstancesMonitoringEnabled) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RunInstancesMonitoringEnabled"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *RunInstancesMonitoringEnabled) SetEnabled(v bool) *RunInstancesMonitoringEnabled { - s.Enabled = &v - return s -} - -// Contains the parameters for RunScheduledInstances. -type RunScheduledInstancesInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that ensures the idempotency of the request. - // For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string" idempotencyToken:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The number of instances. - // - // Default: 1 - InstanceCount *int64 `type:"integer"` - - // The launch specification. You must match the instance type, Availability - // Zone, network, and platform of the schedule that you purchased. - // - // LaunchSpecification is a required field - LaunchSpecification *ScheduledInstancesLaunchSpecification `type:"structure" required:"true"` - - // The Scheduled Instance ID. - // - // ScheduledInstanceId is a required field - ScheduledInstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RunScheduledInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RunScheduledInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RunScheduledInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RunScheduledInstancesInput"} - if s.LaunchSpecification == nil { - invalidParams.Add(request.NewErrParamRequired("LaunchSpecification")) - } - if s.ScheduledInstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduledInstanceId")) - } - if s.LaunchSpecification != nil { - if err := s.LaunchSpecification.Validate(); err != nil { - invalidParams.AddNested("LaunchSpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *RunScheduledInstancesInput) SetClientToken(v string) *RunScheduledInstancesInput { - s.ClientToken = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *RunScheduledInstancesInput) SetDryRun(v bool) *RunScheduledInstancesInput { - s.DryRun = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *RunScheduledInstancesInput) SetInstanceCount(v int64) *RunScheduledInstancesInput { - s.InstanceCount = &v - return s -} - -// SetLaunchSpecification sets the LaunchSpecification field's value. -func (s *RunScheduledInstancesInput) SetLaunchSpecification(v *ScheduledInstancesLaunchSpecification) *RunScheduledInstancesInput { - s.LaunchSpecification = v - return s -} - -// SetScheduledInstanceId sets the ScheduledInstanceId field's value. -func (s *RunScheduledInstancesInput) SetScheduledInstanceId(v string) *RunScheduledInstancesInput { - s.ScheduledInstanceId = &v - return s -} - -// Contains the output of RunScheduledInstances. -type RunScheduledInstancesOutput struct { - _ struct{} `type:"structure"` - - // The IDs of the newly launched instances. - InstanceIdSet []*string `locationName:"instanceIdSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s RunScheduledInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RunScheduledInstancesOutput) GoString() string { - return s.String() -} - -// SetInstanceIdSet sets the InstanceIdSet field's value. -func (s *RunScheduledInstancesOutput) SetInstanceIdSet(v []*string) *RunScheduledInstancesOutput { - s.InstanceIdSet = v - return s -} - -// Describes the storage parameters for S3 and S3 buckets for an instance store-backed -// AMI. -type S3Storage struct { - _ struct{} `type:"structure"` - - // The access key ID of the owner of the bucket. Before you specify a value - // for your access key ID, review and follow the guidance in Best Practices - // for Managing AWS Access Keys (http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html). - AWSAccessKeyId *string `type:"string"` - - // The bucket in which to store the AMI. You can specify a bucket that you already - // own or a new bucket that Amazon EC2 creates on your behalf. If you specify - // a bucket that belongs to someone else, Amazon EC2 returns an error. - Bucket *string `locationName:"bucket" type:"string"` - - // The beginning of the file name of the AMI. - Prefix *string `locationName:"prefix" type:"string"` - - // An Amazon S3 upload policy that gives Amazon EC2 permission to upload items - // into Amazon S3 on your behalf. - // - // UploadPolicy is automatically base64 encoded/decoded by the SDK. - UploadPolicy []byte `locationName:"uploadPolicy" type:"blob"` - - // The signature of the JSON document. - UploadPolicySignature *string `locationName:"uploadPolicySignature" type:"string"` -} - -// String returns the string representation -func (s S3Storage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Storage) GoString() string { - return s.String() -} - -// SetAWSAccessKeyId sets the AWSAccessKeyId field's value. -func (s *S3Storage) SetAWSAccessKeyId(v string) *S3Storage { - s.AWSAccessKeyId = &v - return s -} - -// SetBucket sets the Bucket field's value. -func (s *S3Storage) SetBucket(v string) *S3Storage { - s.Bucket = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *S3Storage) SetPrefix(v string) *S3Storage { - s.Prefix = &v - return s -} - -// SetUploadPolicy sets the UploadPolicy field's value. -func (s *S3Storage) SetUploadPolicy(v []byte) *S3Storage { - s.UploadPolicy = v - return s -} - -// SetUploadPolicySignature sets the UploadPolicySignature field's value. -func (s *S3Storage) SetUploadPolicySignature(v string) *S3Storage { - s.UploadPolicySignature = &v - return s -} - -// Describes a Scheduled Instance. -type ScheduledInstance struct { - _ struct{} `type:"structure"` - - // The Availability Zone. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The date when the Scheduled Instance was purchased. - CreateDate *time.Time `locationName:"createDate" type:"timestamp"` - - // The hourly price for a single instance. - HourlyPrice *string `locationName:"hourlyPrice" type:"string"` - - // The number of instances. - InstanceCount *int64 `locationName:"instanceCount" type:"integer"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string"` - - // The network platform (EC2-Classic or EC2-VPC). - NetworkPlatform *string `locationName:"networkPlatform" type:"string"` - - // The time for the next schedule to start. - NextSlotStartTime *time.Time `locationName:"nextSlotStartTime" type:"timestamp"` - - // The platform (Linux/UNIX or Windows). - Platform *string `locationName:"platform" type:"string"` - - // The time that the previous schedule ended or will end. - PreviousSlotEndTime *time.Time `locationName:"previousSlotEndTime" type:"timestamp"` - - // The schedule recurrence. - Recurrence *ScheduledInstanceRecurrence `locationName:"recurrence" type:"structure"` - - // The Scheduled Instance ID. - ScheduledInstanceId *string `locationName:"scheduledInstanceId" type:"string"` - - // The number of hours in the schedule. - SlotDurationInHours *int64 `locationName:"slotDurationInHours" type:"integer"` - - // The end date for the Scheduled Instance. - TermEndDate *time.Time `locationName:"termEndDate" type:"timestamp"` - - // The start date for the Scheduled Instance. - TermStartDate *time.Time `locationName:"termStartDate" type:"timestamp"` - - // The total number of hours for a single instance for the entire term. - TotalScheduledInstanceHours *int64 `locationName:"totalScheduledInstanceHours" type:"integer"` -} - -// String returns the string representation -func (s ScheduledInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledInstance) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ScheduledInstance) SetAvailabilityZone(v string) *ScheduledInstance { - s.AvailabilityZone = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *ScheduledInstance) SetCreateDate(v time.Time) *ScheduledInstance { - s.CreateDate = &v - return s -} - -// SetHourlyPrice sets the HourlyPrice field's value. -func (s *ScheduledInstance) SetHourlyPrice(v string) *ScheduledInstance { - s.HourlyPrice = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *ScheduledInstance) SetInstanceCount(v int64) *ScheduledInstance { - s.InstanceCount = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ScheduledInstance) SetInstanceType(v string) *ScheduledInstance { - s.InstanceType = &v - return s -} - -// SetNetworkPlatform sets the NetworkPlatform field's value. -func (s *ScheduledInstance) SetNetworkPlatform(v string) *ScheduledInstance { - s.NetworkPlatform = &v - return s -} - -// SetNextSlotStartTime sets the NextSlotStartTime field's value. -func (s *ScheduledInstance) SetNextSlotStartTime(v time.Time) *ScheduledInstance { - s.NextSlotStartTime = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *ScheduledInstance) SetPlatform(v string) *ScheduledInstance { - s.Platform = &v - return s -} - -// SetPreviousSlotEndTime sets the PreviousSlotEndTime field's value. -func (s *ScheduledInstance) SetPreviousSlotEndTime(v time.Time) *ScheduledInstance { - s.PreviousSlotEndTime = &v - return s -} - -// SetRecurrence sets the Recurrence field's value. -func (s *ScheduledInstance) SetRecurrence(v *ScheduledInstanceRecurrence) *ScheduledInstance { - s.Recurrence = v - return s -} - -// SetScheduledInstanceId sets the ScheduledInstanceId field's value. -func (s *ScheduledInstance) SetScheduledInstanceId(v string) *ScheduledInstance { - s.ScheduledInstanceId = &v - return s -} - -// SetSlotDurationInHours sets the SlotDurationInHours field's value. -func (s *ScheduledInstance) SetSlotDurationInHours(v int64) *ScheduledInstance { - s.SlotDurationInHours = &v - return s -} - -// SetTermEndDate sets the TermEndDate field's value. -func (s *ScheduledInstance) SetTermEndDate(v time.Time) *ScheduledInstance { - s.TermEndDate = &v - return s -} - -// SetTermStartDate sets the TermStartDate field's value. -func (s *ScheduledInstance) SetTermStartDate(v time.Time) *ScheduledInstance { - s.TermStartDate = &v - return s -} - -// SetTotalScheduledInstanceHours sets the TotalScheduledInstanceHours field's value. -func (s *ScheduledInstance) SetTotalScheduledInstanceHours(v int64) *ScheduledInstance { - s.TotalScheduledInstanceHours = &v - return s -} - -// Describes a schedule that is available for your Scheduled Instances. -type ScheduledInstanceAvailability struct { - _ struct{} `type:"structure"` - - // The Availability Zone. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The number of available instances. - AvailableInstanceCount *int64 `locationName:"availableInstanceCount" type:"integer"` - - // The time period for the first schedule to start. - FirstSlotStartTime *time.Time `locationName:"firstSlotStartTime" type:"timestamp"` - - // The hourly price for a single instance. - HourlyPrice *string `locationName:"hourlyPrice" type:"string"` - - // The instance type. You can specify one of the C3, C4, M4, or R3 instance - // types. - InstanceType *string `locationName:"instanceType" type:"string"` - - // The maximum term. The only possible value is 365 days. - MaxTermDurationInDays *int64 `locationName:"maxTermDurationInDays" type:"integer"` - - // The minimum term. The only possible value is 365 days. - MinTermDurationInDays *int64 `locationName:"minTermDurationInDays" type:"integer"` - - // The network platform (EC2-Classic or EC2-VPC). - NetworkPlatform *string `locationName:"networkPlatform" type:"string"` - - // The platform (Linux/UNIX or Windows). - Platform *string `locationName:"platform" type:"string"` - - // The purchase token. This token expires in two hours. - PurchaseToken *string `locationName:"purchaseToken" type:"string"` - - // The schedule recurrence. - Recurrence *ScheduledInstanceRecurrence `locationName:"recurrence" type:"structure"` - - // The number of hours in the schedule. - SlotDurationInHours *int64 `locationName:"slotDurationInHours" type:"integer"` - - // The total number of hours for a single instance for the entire term. - TotalScheduledInstanceHours *int64 `locationName:"totalScheduledInstanceHours" type:"integer"` -} - -// String returns the string representation -func (s ScheduledInstanceAvailability) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledInstanceAvailability) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ScheduledInstanceAvailability) SetAvailabilityZone(v string) *ScheduledInstanceAvailability { - s.AvailabilityZone = &v - return s -} - -// SetAvailableInstanceCount sets the AvailableInstanceCount field's value. -func (s *ScheduledInstanceAvailability) SetAvailableInstanceCount(v int64) *ScheduledInstanceAvailability { - s.AvailableInstanceCount = &v - return s -} - -// SetFirstSlotStartTime sets the FirstSlotStartTime field's value. -func (s *ScheduledInstanceAvailability) SetFirstSlotStartTime(v time.Time) *ScheduledInstanceAvailability { - s.FirstSlotStartTime = &v - return s -} - -// SetHourlyPrice sets the HourlyPrice field's value. -func (s *ScheduledInstanceAvailability) SetHourlyPrice(v string) *ScheduledInstanceAvailability { - s.HourlyPrice = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ScheduledInstanceAvailability) SetInstanceType(v string) *ScheduledInstanceAvailability { - s.InstanceType = &v - return s -} - -// SetMaxTermDurationInDays sets the MaxTermDurationInDays field's value. -func (s *ScheduledInstanceAvailability) SetMaxTermDurationInDays(v int64) *ScheduledInstanceAvailability { - s.MaxTermDurationInDays = &v - return s -} - -// SetMinTermDurationInDays sets the MinTermDurationInDays field's value. -func (s *ScheduledInstanceAvailability) SetMinTermDurationInDays(v int64) *ScheduledInstanceAvailability { - s.MinTermDurationInDays = &v - return s -} - -// SetNetworkPlatform sets the NetworkPlatform field's value. -func (s *ScheduledInstanceAvailability) SetNetworkPlatform(v string) *ScheduledInstanceAvailability { - s.NetworkPlatform = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *ScheduledInstanceAvailability) SetPlatform(v string) *ScheduledInstanceAvailability { - s.Platform = &v - return s -} - -// SetPurchaseToken sets the PurchaseToken field's value. -func (s *ScheduledInstanceAvailability) SetPurchaseToken(v string) *ScheduledInstanceAvailability { - s.PurchaseToken = &v - return s -} - -// SetRecurrence sets the Recurrence field's value. -func (s *ScheduledInstanceAvailability) SetRecurrence(v *ScheduledInstanceRecurrence) *ScheduledInstanceAvailability { - s.Recurrence = v - return s -} - -// SetSlotDurationInHours sets the SlotDurationInHours field's value. -func (s *ScheduledInstanceAvailability) SetSlotDurationInHours(v int64) *ScheduledInstanceAvailability { - s.SlotDurationInHours = &v - return s -} - -// SetTotalScheduledInstanceHours sets the TotalScheduledInstanceHours field's value. -func (s *ScheduledInstanceAvailability) SetTotalScheduledInstanceHours(v int64) *ScheduledInstanceAvailability { - s.TotalScheduledInstanceHours = &v - return s -} - -// Describes the recurring schedule for a Scheduled Instance. -type ScheduledInstanceRecurrence struct { - _ struct{} `type:"structure"` - - // The frequency (Daily, Weekly, or Monthly). - Frequency *string `locationName:"frequency" type:"string"` - - // The interval quantity. The interval unit depends on the value of frequency. - // For example, every 2 weeks or every 2 months. - Interval *int64 `locationName:"interval" type:"integer"` - - // The days. For a monthly schedule, this is one or more days of the month (1-31). - // For a weekly schedule, this is one or more days of the week (1-7, where 1 - // is Sunday). - OccurrenceDaySet []*int64 `locationName:"occurrenceDaySet" locationNameList:"item" type:"list"` - - // Indicates whether the occurrence is relative to the end of the specified - // week or month. - OccurrenceRelativeToEnd *bool `locationName:"occurrenceRelativeToEnd" type:"boolean"` - - // The unit for occurrenceDaySet (DayOfWeek or DayOfMonth). - OccurrenceUnit *string `locationName:"occurrenceUnit" type:"string"` -} - -// String returns the string representation -func (s ScheduledInstanceRecurrence) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledInstanceRecurrence) GoString() string { - return s.String() -} - -// SetFrequency sets the Frequency field's value. -func (s *ScheduledInstanceRecurrence) SetFrequency(v string) *ScheduledInstanceRecurrence { - s.Frequency = &v - return s -} - -// SetInterval sets the Interval field's value. -func (s *ScheduledInstanceRecurrence) SetInterval(v int64) *ScheduledInstanceRecurrence { - s.Interval = &v - return s -} - -// SetOccurrenceDaySet sets the OccurrenceDaySet field's value. -func (s *ScheduledInstanceRecurrence) SetOccurrenceDaySet(v []*int64) *ScheduledInstanceRecurrence { - s.OccurrenceDaySet = v - return s -} - -// SetOccurrenceRelativeToEnd sets the OccurrenceRelativeToEnd field's value. -func (s *ScheduledInstanceRecurrence) SetOccurrenceRelativeToEnd(v bool) *ScheduledInstanceRecurrence { - s.OccurrenceRelativeToEnd = &v - return s -} - -// SetOccurrenceUnit sets the OccurrenceUnit field's value. -func (s *ScheduledInstanceRecurrence) SetOccurrenceUnit(v string) *ScheduledInstanceRecurrence { - s.OccurrenceUnit = &v - return s -} - -// Describes the recurring schedule for a Scheduled Instance. -type ScheduledInstanceRecurrenceRequest struct { - _ struct{} `type:"structure"` - - // The frequency (Daily, Weekly, or Monthly). - Frequency *string `type:"string"` - - // The interval quantity. The interval unit depends on the value of Frequency. - // For example, every 2 weeks or every 2 months. - Interval *int64 `type:"integer"` - - // The days. For a monthly schedule, this is one or more days of the month (1-31). - // For a weekly schedule, this is one or more days of the week (1-7, where 1 - // is Sunday). You can't specify this value with a daily schedule. If the occurrence - // is relative to the end of the month, you can specify only a single day. - OccurrenceDays []*int64 `locationName:"OccurrenceDay" locationNameList:"OccurenceDay" type:"list"` - - // Indicates whether the occurrence is relative to the end of the specified - // week or month. You can't specify this value with a daily schedule. - OccurrenceRelativeToEnd *bool `type:"boolean"` - - // The unit for OccurrenceDays (DayOfWeek or DayOfMonth). This value is required - // for a monthly schedule. You can't specify DayOfWeek with a weekly schedule. - // You can't specify this value with a daily schedule. - OccurrenceUnit *string `type:"string"` -} - -// String returns the string representation -func (s ScheduledInstanceRecurrenceRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledInstanceRecurrenceRequest) GoString() string { - return s.String() -} - -// SetFrequency sets the Frequency field's value. -func (s *ScheduledInstanceRecurrenceRequest) SetFrequency(v string) *ScheduledInstanceRecurrenceRequest { - s.Frequency = &v - return s -} - -// SetInterval sets the Interval field's value. -func (s *ScheduledInstanceRecurrenceRequest) SetInterval(v int64) *ScheduledInstanceRecurrenceRequest { - s.Interval = &v - return s -} - -// SetOccurrenceDays sets the OccurrenceDays field's value. -func (s *ScheduledInstanceRecurrenceRequest) SetOccurrenceDays(v []*int64) *ScheduledInstanceRecurrenceRequest { - s.OccurrenceDays = v - return s -} - -// SetOccurrenceRelativeToEnd sets the OccurrenceRelativeToEnd field's value. -func (s *ScheduledInstanceRecurrenceRequest) SetOccurrenceRelativeToEnd(v bool) *ScheduledInstanceRecurrenceRequest { - s.OccurrenceRelativeToEnd = &v - return s -} - -// SetOccurrenceUnit sets the OccurrenceUnit field's value. -func (s *ScheduledInstanceRecurrenceRequest) SetOccurrenceUnit(v string) *ScheduledInstanceRecurrenceRequest { - s.OccurrenceUnit = &v - return s -} - -// Describes a block device mapping for a Scheduled Instance. -type ScheduledInstancesBlockDeviceMapping struct { - _ struct{} `type:"structure"` - - // The device name (for example, /dev/sdh or xvdh). - DeviceName *string `type:"string"` - - // Parameters used to set up EBS volumes automatically when the instance is - // launched. - Ebs *ScheduledInstancesEbs `type:"structure"` - - // Suppresses the specified device included in the block device mapping of the - // AMI. - NoDevice *string `type:"string"` - - // The virtual device name (ephemeralN). Instance store volumes are numbered - // starting from 0. An instance type with two available instance store volumes - // can specify mappings for ephemeral0 and ephemeral1. The number of available - // instance store volumes depends on the instance type. After you connect to - // the instance, you must mount the volume. - // - // Constraints: For M3 instances, you must specify instance store volumes in - // the block device mapping for the instance. When you launch an M3 instance, - // we ignore any instance store volumes specified in the block device mapping - // for the AMI. - VirtualName *string `type:"string"` -} - -// String returns the string representation -func (s ScheduledInstancesBlockDeviceMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledInstancesBlockDeviceMapping) GoString() string { - return s.String() -} - -// SetDeviceName sets the DeviceName field's value. -func (s *ScheduledInstancesBlockDeviceMapping) SetDeviceName(v string) *ScheduledInstancesBlockDeviceMapping { - s.DeviceName = &v - return s -} - -// SetEbs sets the Ebs field's value. -func (s *ScheduledInstancesBlockDeviceMapping) SetEbs(v *ScheduledInstancesEbs) *ScheduledInstancesBlockDeviceMapping { - s.Ebs = v - return s -} - -// SetNoDevice sets the NoDevice field's value. -func (s *ScheduledInstancesBlockDeviceMapping) SetNoDevice(v string) *ScheduledInstancesBlockDeviceMapping { - s.NoDevice = &v - return s -} - -// SetVirtualName sets the VirtualName field's value. -func (s *ScheduledInstancesBlockDeviceMapping) SetVirtualName(v string) *ScheduledInstancesBlockDeviceMapping { - s.VirtualName = &v - return s -} - -// Describes an EBS volume for a Scheduled Instance. -type ScheduledInstancesEbs struct { - _ struct{} `type:"structure"` - - // Indicates whether the volume is deleted on instance termination. - DeleteOnTermination *bool `type:"boolean"` - - // Indicates whether the volume is encrypted. You can attached encrypted volumes - // only to instances that support them. - Encrypted *bool `type:"boolean"` - - // The number of I/O operations per second (IOPS) that the volume supports. - // For io1 volumes, this represents the number of IOPS that are provisioned - // for the volume. For gp2 volumes, this represents the baseline performance - // of the volume and the rate at which the volume accumulates I/O credits for - // bursting. For more information about gp2 baseline performance, I/O credits, - // and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for - // gp2 volumes. - // - // Condition: This parameter is required for requests to create io1volumes; - // it is not used in requests to create gp2, st1, sc1, or standard volumes. - Iops *int64 `type:"integer"` - - // The ID of the snapshot. - SnapshotId *string `type:"string"` - - // The size of the volume, in GiB. - // - // Default: If you're creating the volume from a snapshot and don't specify - // a volume size, the default is the snapshot size. - VolumeSize *int64 `type:"integer"` - - // The volume type. gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, - // Throughput Optimized HDD for st1, Cold HDD for sc1, or standard for Magnetic. - // - // Default: standard - VolumeType *string `type:"string"` -} - -// String returns the string representation -func (s ScheduledInstancesEbs) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledInstancesEbs) GoString() string { - return s.String() -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *ScheduledInstancesEbs) SetDeleteOnTermination(v bool) *ScheduledInstancesEbs { - s.DeleteOnTermination = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *ScheduledInstancesEbs) SetEncrypted(v bool) *ScheduledInstancesEbs { - s.Encrypted = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *ScheduledInstancesEbs) SetIops(v int64) *ScheduledInstancesEbs { - s.Iops = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *ScheduledInstancesEbs) SetSnapshotId(v string) *ScheduledInstancesEbs { - s.SnapshotId = &v - return s -} - -// SetVolumeSize sets the VolumeSize field's value. -func (s *ScheduledInstancesEbs) SetVolumeSize(v int64) *ScheduledInstancesEbs { - s.VolumeSize = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *ScheduledInstancesEbs) SetVolumeType(v string) *ScheduledInstancesEbs { - s.VolumeType = &v - return s -} - -// Describes an IAM instance profile for a Scheduled Instance. -type ScheduledInstancesIamInstanceProfile struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). - Arn *string `type:"string"` - - // The name. - Name *string `type:"string"` -} - -// String returns the string representation -func (s ScheduledInstancesIamInstanceProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledInstancesIamInstanceProfile) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ScheduledInstancesIamInstanceProfile) SetArn(v string) *ScheduledInstancesIamInstanceProfile { - s.Arn = &v - return s -} - -// SetName sets the Name field's value. -func (s *ScheduledInstancesIamInstanceProfile) SetName(v string) *ScheduledInstancesIamInstanceProfile { - s.Name = &v - return s -} - -// Describes an IPv6 address. -type ScheduledInstancesIpv6Address struct { - _ struct{} `type:"structure"` - - // The IPv6 address. - Ipv6Address *string `type:"string"` -} - -// String returns the string representation -func (s ScheduledInstancesIpv6Address) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledInstancesIpv6Address) GoString() string { - return s.String() -} - -// SetIpv6Address sets the Ipv6Address field's value. -func (s *ScheduledInstancesIpv6Address) SetIpv6Address(v string) *ScheduledInstancesIpv6Address { - s.Ipv6Address = &v - return s -} - -// Describes the launch specification for a Scheduled Instance. -// -// If you are launching the Scheduled Instance in EC2-VPC, you must specify -// the ID of the subnet. You can specify the subnet using either SubnetId or -// NetworkInterface. -type ScheduledInstancesLaunchSpecification struct { - _ struct{} `type:"structure"` - - // One or more block device mapping entries. - BlockDeviceMappings []*ScheduledInstancesBlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` - - // Indicates whether the instances are optimized for EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal EBS I/O performance. This optimization isn't available - // with all instance types. Additional usage charges apply when using an EBS-optimized - // instance. - // - // Default: false - EbsOptimized *bool `type:"boolean"` - - // The IAM instance profile. - IamInstanceProfile *ScheduledInstancesIamInstanceProfile `type:"structure"` - - // The ID of the Amazon Machine Image (AMI). - // - // ImageId is a required field - ImageId *string `type:"string" required:"true"` - - // The instance type. - InstanceType *string `type:"string"` - - // The ID of the kernel. - KernelId *string `type:"string"` - - // The name of the key pair. - KeyName *string `type:"string"` - - // Enable or disable monitoring for the instances. - Monitoring *ScheduledInstancesMonitoring `type:"structure"` - - // One or more network interfaces. - NetworkInterfaces []*ScheduledInstancesNetworkInterface `locationName:"NetworkInterface" locationNameList:"NetworkInterface" type:"list"` - - // The placement information. - Placement *ScheduledInstancesPlacement `type:"structure"` - - // The ID of the RAM disk. - RamdiskId *string `type:"string"` - - // The IDs of one or more security groups. - SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` - - // The ID of the subnet in which to launch the instances. - SubnetId *string `type:"string"` - - // The base64-encoded MIME user data. - UserData *string `type:"string"` -} - -// String returns the string representation -func (s ScheduledInstancesLaunchSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledInstancesLaunchSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScheduledInstancesLaunchSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScheduledInstancesLaunchSpecification"} - if s.ImageId == nil { - invalidParams.Add(request.NewErrParamRequired("ImageId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *ScheduledInstancesLaunchSpecification) SetBlockDeviceMappings(v []*ScheduledInstancesBlockDeviceMapping) *ScheduledInstancesLaunchSpecification { - s.BlockDeviceMappings = v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *ScheduledInstancesLaunchSpecification) SetEbsOptimized(v bool) *ScheduledInstancesLaunchSpecification { - s.EbsOptimized = &v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *ScheduledInstancesLaunchSpecification) SetIamInstanceProfile(v *ScheduledInstancesIamInstanceProfile) *ScheduledInstancesLaunchSpecification { - s.IamInstanceProfile = v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *ScheduledInstancesLaunchSpecification) SetImageId(v string) *ScheduledInstancesLaunchSpecification { - s.ImageId = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ScheduledInstancesLaunchSpecification) SetInstanceType(v string) *ScheduledInstancesLaunchSpecification { - s.InstanceType = &v - return s -} - -// SetKernelId sets the KernelId field's value. -func (s *ScheduledInstancesLaunchSpecification) SetKernelId(v string) *ScheduledInstancesLaunchSpecification { - s.KernelId = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *ScheduledInstancesLaunchSpecification) SetKeyName(v string) *ScheduledInstancesLaunchSpecification { - s.KeyName = &v - return s -} - -// SetMonitoring sets the Monitoring field's value. -func (s *ScheduledInstancesLaunchSpecification) SetMonitoring(v *ScheduledInstancesMonitoring) *ScheduledInstancesLaunchSpecification { - s.Monitoring = v - return s -} - -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *ScheduledInstancesLaunchSpecification) SetNetworkInterfaces(v []*ScheduledInstancesNetworkInterface) *ScheduledInstancesLaunchSpecification { - s.NetworkInterfaces = v - return s -} - -// SetPlacement sets the Placement field's value. -func (s *ScheduledInstancesLaunchSpecification) SetPlacement(v *ScheduledInstancesPlacement) *ScheduledInstancesLaunchSpecification { - s.Placement = v - return s -} - -// SetRamdiskId sets the RamdiskId field's value. -func (s *ScheduledInstancesLaunchSpecification) SetRamdiskId(v string) *ScheduledInstancesLaunchSpecification { - s.RamdiskId = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *ScheduledInstancesLaunchSpecification) SetSecurityGroupIds(v []*string) *ScheduledInstancesLaunchSpecification { - s.SecurityGroupIds = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *ScheduledInstancesLaunchSpecification) SetSubnetId(v string) *ScheduledInstancesLaunchSpecification { - s.SubnetId = &v - return s -} - -// SetUserData sets the UserData field's value. -func (s *ScheduledInstancesLaunchSpecification) SetUserData(v string) *ScheduledInstancesLaunchSpecification { - s.UserData = &v - return s -} - -// Describes whether monitoring is enabled for a Scheduled Instance. -type ScheduledInstancesMonitoring struct { - _ struct{} `type:"structure"` - - // Indicates whether monitoring is enabled. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s ScheduledInstancesMonitoring) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledInstancesMonitoring) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *ScheduledInstancesMonitoring) SetEnabled(v bool) *ScheduledInstancesMonitoring { - s.Enabled = &v - return s -} - -// Describes a network interface for a Scheduled Instance. -type ScheduledInstancesNetworkInterface struct { - _ struct{} `type:"structure"` - - // Indicates whether to assign a public IPv4 address to instances launched in - // a VPC. The public IPv4 address can only be assigned to a network interface - // for eth0, and can only be assigned to a new network interface, not an existing - // one. You cannot specify more than one network interface in the request. If - // launching into a default subnet, the default value is true. - AssociatePublicIpAddress *bool `type:"boolean"` - - // Indicates whether to delete the interface when the instance is terminated. - DeleteOnTermination *bool `type:"boolean"` - - // The description. - Description *string `type:"string"` - - // The index of the device for the network interface attachment. - DeviceIndex *int64 `type:"integer"` - - // The IDs of one or more security groups. - Groups []*string `locationName:"Group" locationNameList:"SecurityGroupId" type:"list"` - - // The number of IPv6 addresses to assign to the network interface. The IPv6 - // addresses are automatically selected from the subnet range. - Ipv6AddressCount *int64 `type:"integer"` - - // One or more specific IPv6 addresses from the subnet range. - Ipv6Addresses []*ScheduledInstancesIpv6Address `locationName:"Ipv6Address" locationNameList:"Ipv6Address" type:"list"` - - // The ID of the network interface. - NetworkInterfaceId *string `type:"string"` - - // The IPv4 address of the network interface within the subnet. - PrivateIpAddress *string `type:"string"` - - // The private IPv4 addresses. - PrivateIpAddressConfigs []*ScheduledInstancesPrivateIpAddressConfig `locationName:"PrivateIpAddressConfig" locationNameList:"PrivateIpAddressConfigSet" type:"list"` - - // The number of secondary private IPv4 addresses. - SecondaryPrivateIpAddressCount *int64 `type:"integer"` - - // The ID of the subnet. - SubnetId *string `type:"string"` -} - -// String returns the string representation -func (s ScheduledInstancesNetworkInterface) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledInstancesNetworkInterface) GoString() string { - return s.String() -} - -// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. -func (s *ScheduledInstancesNetworkInterface) SetAssociatePublicIpAddress(v bool) *ScheduledInstancesNetworkInterface { - s.AssociatePublicIpAddress = &v - return s -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *ScheduledInstancesNetworkInterface) SetDeleteOnTermination(v bool) *ScheduledInstancesNetworkInterface { - s.DeleteOnTermination = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ScheduledInstancesNetworkInterface) SetDescription(v string) *ScheduledInstancesNetworkInterface { - s.Description = &v - return s -} - -// SetDeviceIndex sets the DeviceIndex field's value. -func (s *ScheduledInstancesNetworkInterface) SetDeviceIndex(v int64) *ScheduledInstancesNetworkInterface { - s.DeviceIndex = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *ScheduledInstancesNetworkInterface) SetGroups(v []*string) *ScheduledInstancesNetworkInterface { - s.Groups = v - return s -} - -// SetIpv6AddressCount sets the Ipv6AddressCount field's value. -func (s *ScheduledInstancesNetworkInterface) SetIpv6AddressCount(v int64) *ScheduledInstancesNetworkInterface { - s.Ipv6AddressCount = &v - return s -} - -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *ScheduledInstancesNetworkInterface) SetIpv6Addresses(v []*ScheduledInstancesIpv6Address) *ScheduledInstancesNetworkInterface { - s.Ipv6Addresses = v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *ScheduledInstancesNetworkInterface) SetNetworkInterfaceId(v string) *ScheduledInstancesNetworkInterface { - s.NetworkInterfaceId = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *ScheduledInstancesNetworkInterface) SetPrivateIpAddress(v string) *ScheduledInstancesNetworkInterface { - s.PrivateIpAddress = &v - return s -} - -// SetPrivateIpAddressConfigs sets the PrivateIpAddressConfigs field's value. -func (s *ScheduledInstancesNetworkInterface) SetPrivateIpAddressConfigs(v []*ScheduledInstancesPrivateIpAddressConfig) *ScheduledInstancesNetworkInterface { - s.PrivateIpAddressConfigs = v - return s -} - -// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. -func (s *ScheduledInstancesNetworkInterface) SetSecondaryPrivateIpAddressCount(v int64) *ScheduledInstancesNetworkInterface { - s.SecondaryPrivateIpAddressCount = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *ScheduledInstancesNetworkInterface) SetSubnetId(v string) *ScheduledInstancesNetworkInterface { - s.SubnetId = &v - return s -} - -// Describes the placement for a Scheduled Instance. -type ScheduledInstancesPlacement struct { - _ struct{} `type:"structure"` - - // The Availability Zone. - AvailabilityZone *string `type:"string"` - - // The name of the placement group. - GroupName *string `type:"string"` -} - -// String returns the string representation -func (s ScheduledInstancesPlacement) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledInstancesPlacement) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ScheduledInstancesPlacement) SetAvailabilityZone(v string) *ScheduledInstancesPlacement { - s.AvailabilityZone = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *ScheduledInstancesPlacement) SetGroupName(v string) *ScheduledInstancesPlacement { - s.GroupName = &v - return s -} - -// Describes a private IPv4 address for a Scheduled Instance. -type ScheduledInstancesPrivateIpAddressConfig struct { - _ struct{} `type:"structure"` - - // Indicates whether this is a primary IPv4 address. Otherwise, this is a secondary - // IPv4 address. - Primary *bool `type:"boolean"` - - // The IPv4 address. - PrivateIpAddress *string `type:"string"` -} - -// String returns the string representation -func (s ScheduledInstancesPrivateIpAddressConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledInstancesPrivateIpAddressConfig) GoString() string { - return s.String() -} - -// SetPrimary sets the Primary field's value. -func (s *ScheduledInstancesPrivateIpAddressConfig) SetPrimary(v bool) *ScheduledInstancesPrivateIpAddressConfig { - s.Primary = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *ScheduledInstancesPrivateIpAddressConfig) SetPrivateIpAddress(v string) *ScheduledInstancesPrivateIpAddressConfig { - s.PrivateIpAddress = &v - return s -} - -type SearchTransitGatewayRoutesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. The possible values are: - // - // * transit-gateway-route-destination-cidr-block - The CIDR range. - // - // * transit-gateway-route-state - The state of the route (active | blackhole). - // - // * transit-gateway-route-transit-gateway-attachment-id - The ID of the - // attachment. - // - // * transit-gateway-route-type - The route type (static | propagated). - // - // Filters is a required field - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list" required:"true"` - - // The maximum number of routes to return. - MaxResults *int64 `min:"5" type:"integer"` - - // The ID of the transit gateway route table. - // - // TransitGatewayRouteTableId is a required field - TransitGatewayRouteTableId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SearchTransitGatewayRoutesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchTransitGatewayRoutesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SearchTransitGatewayRoutesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SearchTransitGatewayRoutesInput"} - if s.Filters == nil { - invalidParams.Add(request.NewErrParamRequired("Filters")) - } - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.TransitGatewayRouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *SearchTransitGatewayRoutesInput) SetDryRun(v bool) *SearchTransitGatewayRoutesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *SearchTransitGatewayRoutesInput) SetFilters(v []*Filter) *SearchTransitGatewayRoutesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *SearchTransitGatewayRoutesInput) SetMaxResults(v int64) *SearchTransitGatewayRoutesInput { - s.MaxResults = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *SearchTransitGatewayRoutesInput) SetTransitGatewayRouteTableId(v string) *SearchTransitGatewayRoutesInput { - s.TransitGatewayRouteTableId = &v - return s -} - -type SearchTransitGatewayRoutesOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether there are additional routes available. - AdditionalRoutesAvailable *bool `locationName:"additionalRoutesAvailable" type:"boolean"` - - // Information about the routes. - Routes []*TransitGatewayRoute `locationName:"routeSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s SearchTransitGatewayRoutesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchTransitGatewayRoutesOutput) GoString() string { - return s.String() -} - -// SetAdditionalRoutesAvailable sets the AdditionalRoutesAvailable field's value. -func (s *SearchTransitGatewayRoutesOutput) SetAdditionalRoutesAvailable(v bool) *SearchTransitGatewayRoutesOutput { - s.AdditionalRoutesAvailable = &v - return s -} - -// SetRoutes sets the Routes field's value. -func (s *SearchTransitGatewayRoutesOutput) SetRoutes(v []*TransitGatewayRoute) *SearchTransitGatewayRoutesOutput { - s.Routes = v - return s -} - -// Describes a security group -type SecurityGroup struct { - _ struct{} `type:"structure"` - - // A description of the security group. - Description *string `locationName:"groupDescription" type:"string"` - - // The ID of the security group. - GroupId *string `locationName:"groupId" type:"string"` - - // The name of the security group. - GroupName *string `locationName:"groupName" type:"string"` - - // One or more inbound rules associated with the security group. - IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` - - // [EC2-VPC] One or more outbound rules associated with the security group. - IpPermissionsEgress []*IpPermission `locationName:"ipPermissionsEgress" locationNameList:"item" type:"list"` - - // The AWS account ID of the owner of the security group. - OwnerId *string `locationName:"ownerId" type:"string"` - - // Any tags assigned to the security group. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // [EC2-VPC] The ID of the VPC for the security group. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s SecurityGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecurityGroup) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *SecurityGroup) SetDescription(v string) *SecurityGroup { - s.Description = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *SecurityGroup) SetGroupId(v string) *SecurityGroup { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *SecurityGroup) SetGroupName(v string) *SecurityGroup { - s.GroupName = &v - return s -} - -// SetIpPermissions sets the IpPermissions field's value. -func (s *SecurityGroup) SetIpPermissions(v []*IpPermission) *SecurityGroup { - s.IpPermissions = v - return s -} - -// SetIpPermissionsEgress sets the IpPermissionsEgress field's value. -func (s *SecurityGroup) SetIpPermissionsEgress(v []*IpPermission) *SecurityGroup { - s.IpPermissionsEgress = v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *SecurityGroup) SetOwnerId(v string) *SecurityGroup { - s.OwnerId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *SecurityGroup) SetTags(v []*Tag) *SecurityGroup { - s.Tags = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *SecurityGroup) SetVpcId(v string) *SecurityGroup { - s.VpcId = &v - return s -} - -// Describes a security group. -type SecurityGroupIdentifier struct { - _ struct{} `type:"structure"` - - // The ID of the security group. - GroupId *string `locationName:"groupId" type:"string"` - - // The name of the security group. - GroupName *string `locationName:"groupName" type:"string"` -} - -// String returns the string representation -func (s SecurityGroupIdentifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecurityGroupIdentifier) GoString() string { - return s.String() -} - -// SetGroupId sets the GroupId field's value. -func (s *SecurityGroupIdentifier) SetGroupId(v string) *SecurityGroupIdentifier { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *SecurityGroupIdentifier) SetGroupName(v string) *SecurityGroupIdentifier { - s.GroupName = &v - return s -} - -// Describes a VPC with a security group that references your security group. -type SecurityGroupReference struct { - _ struct{} `type:"structure"` - - // The ID of your security group. - GroupId *string `locationName:"groupId" type:"string"` - - // The ID of the VPC with the referencing security group. - ReferencingVpcId *string `locationName:"referencingVpcId" type:"string"` - - // The ID of the VPC peering connection. - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` -} - -// String returns the string representation -func (s SecurityGroupReference) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecurityGroupReference) GoString() string { - return s.String() -} - -// SetGroupId sets the GroupId field's value. -func (s *SecurityGroupReference) SetGroupId(v string) *SecurityGroupReference { - s.GroupId = &v - return s -} - -// SetReferencingVpcId sets the ReferencingVpcId field's value. -func (s *SecurityGroupReference) SetReferencingVpcId(v string) *SecurityGroupReference { - s.ReferencingVpcId = &v - return s -} - -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *SecurityGroupReference) SetVpcPeeringConnectionId(v string) *SecurityGroupReference { - s.VpcPeeringConnectionId = &v - return s -} - -// Describes a service configuration for a VPC endpoint service. -type ServiceConfiguration struct { - _ struct{} `type:"structure"` - - // Indicates whether requests from other AWS accounts to create an endpoint - // to the service must first be accepted. - AcceptanceRequired *bool `locationName:"acceptanceRequired" type:"boolean"` - - // In the Availability Zones in which the service is available. - AvailabilityZones []*string `locationName:"availabilityZoneSet" locationNameList:"item" type:"list"` - - // The DNS names for the service. - BaseEndpointDnsNames []*string `locationName:"baseEndpointDnsNameSet" locationNameList:"item" type:"list"` - - // The Amazon Resource Names (ARNs) of the Network Load Balancers for the service. - NetworkLoadBalancerArns []*string `locationName:"networkLoadBalancerArnSet" locationNameList:"item" type:"list"` - - // The private DNS name for the service. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - - // The ID of the service. - ServiceId *string `locationName:"serviceId" type:"string"` - - // The name of the service. - ServiceName *string `locationName:"serviceName" type:"string"` - - // The service state. - ServiceState *string `locationName:"serviceState" type:"string" enum:"ServiceState"` - - // The type of service. - ServiceType []*ServiceTypeDetail `locationName:"serviceType" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s ServiceConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceConfiguration) GoString() string { - return s.String() -} - -// SetAcceptanceRequired sets the AcceptanceRequired field's value. -func (s *ServiceConfiguration) SetAcceptanceRequired(v bool) *ServiceConfiguration { - s.AcceptanceRequired = &v - return s -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *ServiceConfiguration) SetAvailabilityZones(v []*string) *ServiceConfiguration { - s.AvailabilityZones = v - return s -} - -// SetBaseEndpointDnsNames sets the BaseEndpointDnsNames field's value. -func (s *ServiceConfiguration) SetBaseEndpointDnsNames(v []*string) *ServiceConfiguration { - s.BaseEndpointDnsNames = v - return s -} - -// SetNetworkLoadBalancerArns sets the NetworkLoadBalancerArns field's value. -func (s *ServiceConfiguration) SetNetworkLoadBalancerArns(v []*string) *ServiceConfiguration { - s.NetworkLoadBalancerArns = v - return s -} - -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *ServiceConfiguration) SetPrivateDnsName(v string) *ServiceConfiguration { - s.PrivateDnsName = &v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *ServiceConfiguration) SetServiceId(v string) *ServiceConfiguration { - s.ServiceId = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *ServiceConfiguration) SetServiceName(v string) *ServiceConfiguration { - s.ServiceName = &v - return s -} - -// SetServiceState sets the ServiceState field's value. -func (s *ServiceConfiguration) SetServiceState(v string) *ServiceConfiguration { - s.ServiceState = &v - return s -} - -// SetServiceType sets the ServiceType field's value. -func (s *ServiceConfiguration) SetServiceType(v []*ServiceTypeDetail) *ServiceConfiguration { - s.ServiceType = v - return s -} - -// Describes a VPC endpoint service. -type ServiceDetail struct { - _ struct{} `type:"structure"` - - // Indicates whether VPC endpoint connection requests to the service must be - // accepted by the service owner. - AcceptanceRequired *bool `locationName:"acceptanceRequired" type:"boolean"` - - // The Availability Zones in which the service is available. - AvailabilityZones []*string `locationName:"availabilityZoneSet" locationNameList:"item" type:"list"` - - // The DNS names for the service. - BaseEndpointDnsNames []*string `locationName:"baseEndpointDnsNameSet" locationNameList:"item" type:"list"` - - // The AWS account ID of the service owner. - Owner *string `locationName:"owner" type:"string"` - - // The private DNS name for the service. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - - // The Amazon Resource Name (ARN) of the service. - ServiceName *string `locationName:"serviceName" type:"string"` - - // The type of service. - ServiceType []*ServiceTypeDetail `locationName:"serviceType" locationNameList:"item" type:"list"` - - // Indicates whether the service supports endpoint policies. - VpcEndpointPolicySupported *bool `locationName:"vpcEndpointPolicySupported" type:"boolean"` -} - -// String returns the string representation -func (s ServiceDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceDetail) GoString() string { - return s.String() -} - -// SetAcceptanceRequired sets the AcceptanceRequired field's value. -func (s *ServiceDetail) SetAcceptanceRequired(v bool) *ServiceDetail { - s.AcceptanceRequired = &v - return s -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *ServiceDetail) SetAvailabilityZones(v []*string) *ServiceDetail { - s.AvailabilityZones = v - return s -} - -// SetBaseEndpointDnsNames sets the BaseEndpointDnsNames field's value. -func (s *ServiceDetail) SetBaseEndpointDnsNames(v []*string) *ServiceDetail { - s.BaseEndpointDnsNames = v - return s -} - -// SetOwner sets the Owner field's value. -func (s *ServiceDetail) SetOwner(v string) *ServiceDetail { - s.Owner = &v - return s -} - -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *ServiceDetail) SetPrivateDnsName(v string) *ServiceDetail { - s.PrivateDnsName = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *ServiceDetail) SetServiceName(v string) *ServiceDetail { - s.ServiceName = &v - return s -} - -// SetServiceType sets the ServiceType field's value. -func (s *ServiceDetail) SetServiceType(v []*ServiceTypeDetail) *ServiceDetail { - s.ServiceType = v - return s -} - -// SetVpcEndpointPolicySupported sets the VpcEndpointPolicySupported field's value. -func (s *ServiceDetail) SetVpcEndpointPolicySupported(v bool) *ServiceDetail { - s.VpcEndpointPolicySupported = &v - return s -} - -// Describes the type of service for a VPC endpoint. -type ServiceTypeDetail struct { - _ struct{} `type:"structure"` - - // The type of service. - ServiceType *string `locationName:"serviceType" type:"string" enum:"ServiceType"` -} - -// String returns the string representation -func (s ServiceTypeDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceTypeDetail) GoString() string { - return s.String() -} - -// SetServiceType sets the ServiceType field's value. -func (s *ServiceTypeDetail) SetServiceType(v string) *ServiceTypeDetail { - s.ServiceType = &v - return s -} - -// Describes the time period for a Scheduled Instance to start its first schedule. -// The time period must span less than one day. -type SlotDateTimeRangeRequest struct { - _ struct{} `type:"structure"` - - // The earliest date and time, in UTC, for the Scheduled Instance to start. - // - // EarliestTime is a required field - EarliestTime *time.Time `type:"timestamp" required:"true"` - - // The latest date and time, in UTC, for the Scheduled Instance to start. This - // value must be later than or equal to the earliest date and at most three - // months in the future. - // - // LatestTime is a required field - LatestTime *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s SlotDateTimeRangeRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SlotDateTimeRangeRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SlotDateTimeRangeRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SlotDateTimeRangeRequest"} - if s.EarliestTime == nil { - invalidParams.Add(request.NewErrParamRequired("EarliestTime")) - } - if s.LatestTime == nil { - invalidParams.Add(request.NewErrParamRequired("LatestTime")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEarliestTime sets the EarliestTime field's value. -func (s *SlotDateTimeRangeRequest) SetEarliestTime(v time.Time) *SlotDateTimeRangeRequest { - s.EarliestTime = &v - return s -} - -// SetLatestTime sets the LatestTime field's value. -func (s *SlotDateTimeRangeRequest) SetLatestTime(v time.Time) *SlotDateTimeRangeRequest { - s.LatestTime = &v - return s -} - -// Describes the time period for a Scheduled Instance to start its first schedule. -type SlotStartTimeRangeRequest struct { - _ struct{} `type:"structure"` - - // The earliest date and time, in UTC, for the Scheduled Instance to start. - EarliestTime *time.Time `type:"timestamp"` - - // The latest date and time, in UTC, for the Scheduled Instance to start. - LatestTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s SlotStartTimeRangeRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SlotStartTimeRangeRequest) GoString() string { - return s.String() -} - -// SetEarliestTime sets the EarliestTime field's value. -func (s *SlotStartTimeRangeRequest) SetEarliestTime(v time.Time) *SlotStartTimeRangeRequest { - s.EarliestTime = &v - return s -} - -// SetLatestTime sets the LatestTime field's value. -func (s *SlotStartTimeRangeRequest) SetLatestTime(v time.Time) *SlotStartTimeRangeRequest { - s.LatestTime = &v - return s -} - -// Describes a snapshot. -type Snapshot struct { - _ struct{} `type:"structure"` - - // The data encryption key identifier for the snapshot. This value is a unique - // identifier that corresponds to the data encryption key that was used to encrypt - // the original volume or snapshot copy. Because data encryption keys are inherited - // by volumes created from snapshots, and vice versa, if snapshots share the - // same data encryption key identifier, then they belong to the same volume/snapshot - // lineage. This parameter is only returned by the DescribeSnapshots API operation. - DataEncryptionKeyId *string `locationName:"dataEncryptionKeyId" type:"string"` - - // The description for the snapshot. - Description *string `locationName:"description" type:"string"` - - // Indicates whether the snapshot is encrypted. - Encrypted *bool `locationName:"encrypted" type:"boolean"` - - // The full ARN of the AWS Key Management Service (AWS KMS) customer master - // key (CMK) that was used to protect the volume encryption key for the parent - // volume. - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - - // Value from an Amazon-maintained list (amazon | aws-marketplace | microsoft) - // of snapshot owners. Not to be confused with the user-configured AWS account - // alias, which is set from the IAM console. - OwnerAlias *string `locationName:"ownerAlias" type:"string"` - - // The AWS account ID of the EBS snapshot owner. - OwnerId *string `locationName:"ownerId" type:"string"` - - // The progress of the snapshot, as a percentage. - Progress *string `locationName:"progress" type:"string"` - - // The ID of the snapshot. Each snapshot receives a unique identifier when it - // is created. - SnapshotId *string `locationName:"snapshotId" type:"string"` - - // The time stamp when the snapshot was initiated. - StartTime *time.Time `locationName:"startTime" type:"timestamp"` - - // The snapshot state. - State *string `locationName:"status" type:"string" enum:"SnapshotState"` - - // Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy - // operation fails (for example, if the proper AWS Key Management Service (AWS - // KMS) permissions are not obtained) this field displays error state details - // to help you diagnose why the error occurred. This parameter is only returned - // by the DescribeSnapshots API operation. - StateMessage *string `locationName:"statusMessage" type:"string"` - - // Any tags assigned to the snapshot. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the volume that was used to create the snapshot. Snapshots created - // by the CopySnapshot action have an arbitrary volume ID that should not be - // used for any purpose. - VolumeId *string `locationName:"volumeId" type:"string"` - - // The size of the volume, in GiB. - VolumeSize *int64 `locationName:"volumeSize" type:"integer"` -} - -// String returns the string representation -func (s Snapshot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Snapshot) GoString() string { - return s.String() -} - -// SetDataEncryptionKeyId sets the DataEncryptionKeyId field's value. -func (s *Snapshot) SetDataEncryptionKeyId(v string) *Snapshot { - s.DataEncryptionKeyId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Snapshot) SetDescription(v string) *Snapshot { - s.Description = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *Snapshot) SetEncrypted(v bool) *Snapshot { - s.Encrypted = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *Snapshot) SetKmsKeyId(v string) *Snapshot { - s.KmsKeyId = &v - return s -} - -// SetOwnerAlias sets the OwnerAlias field's value. -func (s *Snapshot) SetOwnerAlias(v string) *Snapshot { - s.OwnerAlias = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *Snapshot) SetOwnerId(v string) *Snapshot { - s.OwnerId = &v - return s -} - -// SetProgress sets the Progress field's value. -func (s *Snapshot) SetProgress(v string) *Snapshot { - s.Progress = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *Snapshot) SetSnapshotId(v string) *Snapshot { - s.SnapshotId = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *Snapshot) SetStartTime(v time.Time) *Snapshot { - s.StartTime = &v - return s -} - -// SetState sets the State field's value. -func (s *Snapshot) SetState(v string) *Snapshot { - s.State = &v - return s -} - -// SetStateMessage sets the StateMessage field's value. -func (s *Snapshot) SetStateMessage(v string) *Snapshot { - s.StateMessage = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Snapshot) SetTags(v []*Tag) *Snapshot { - s.Tags = v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *Snapshot) SetVolumeId(v string) *Snapshot { - s.VolumeId = &v - return s -} - -// SetVolumeSize sets the VolumeSize field's value. -func (s *Snapshot) SetVolumeSize(v int64) *Snapshot { - s.VolumeSize = &v - return s -} - -// Describes the snapshot created from the imported disk. -type SnapshotDetail struct { - _ struct{} `type:"structure"` - - // A description for the snapshot. - Description *string `locationName:"description" type:"string"` - - // The block device mapping for the snapshot. - DeviceName *string `locationName:"deviceName" type:"string"` - - // The size of the disk in the snapshot, in GiB. - DiskImageSize *float64 `locationName:"diskImageSize" type:"double"` - - // The format of the disk image from which the snapshot is created. - Format *string `locationName:"format" type:"string"` - - // The percentage of progress for the task. - Progress *string `locationName:"progress" type:"string"` - - // The snapshot ID of the disk being imported. - SnapshotId *string `locationName:"snapshotId" type:"string"` - - // A brief status of the snapshot creation. - Status *string `locationName:"status" type:"string"` - - // A detailed status message for the snapshot creation. - StatusMessage *string `locationName:"statusMessage" type:"string"` - - // The URL used to access the disk image. - Url *string `locationName:"url" type:"string"` - - // The S3 bucket for the disk image. - UserBucket *UserBucketDetails `locationName:"userBucket" type:"structure"` -} - -// String returns the string representation -func (s SnapshotDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SnapshotDetail) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *SnapshotDetail) SetDescription(v string) *SnapshotDetail { - s.Description = &v - return s -} - -// SetDeviceName sets the DeviceName field's value. -func (s *SnapshotDetail) SetDeviceName(v string) *SnapshotDetail { - s.DeviceName = &v - return s -} - -// SetDiskImageSize sets the DiskImageSize field's value. -func (s *SnapshotDetail) SetDiskImageSize(v float64) *SnapshotDetail { - s.DiskImageSize = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *SnapshotDetail) SetFormat(v string) *SnapshotDetail { - s.Format = &v - return s -} - -// SetProgress sets the Progress field's value. -func (s *SnapshotDetail) SetProgress(v string) *SnapshotDetail { - s.Progress = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *SnapshotDetail) SetSnapshotId(v string) *SnapshotDetail { - s.SnapshotId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SnapshotDetail) SetStatus(v string) *SnapshotDetail { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *SnapshotDetail) SetStatusMessage(v string) *SnapshotDetail { - s.StatusMessage = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *SnapshotDetail) SetUrl(v string) *SnapshotDetail { - s.Url = &v - return s -} - -// SetUserBucket sets the UserBucket field's value. -func (s *SnapshotDetail) SetUserBucket(v *UserBucketDetails) *SnapshotDetail { - s.UserBucket = v - return s -} - -// The disk container object for the import snapshot request. -type SnapshotDiskContainer struct { - _ struct{} `type:"structure"` - - // The description of the disk image being imported. - Description *string `type:"string"` - - // The format of the disk image being imported. - // - // Valid values: VHD | VMDK - Format *string `type:"string"` - - // The URL to the Amazon S3-based disk image being imported. It can either be - // a https URL (https://..) or an Amazon S3 URL (s3://..). - Url *string `type:"string"` - - // The S3 bucket for the disk image. - UserBucket *UserBucket `type:"structure"` -} - -// String returns the string representation -func (s SnapshotDiskContainer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SnapshotDiskContainer) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *SnapshotDiskContainer) SetDescription(v string) *SnapshotDiskContainer { - s.Description = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *SnapshotDiskContainer) SetFormat(v string) *SnapshotDiskContainer { - s.Format = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *SnapshotDiskContainer) SetUrl(v string) *SnapshotDiskContainer { - s.Url = &v - return s -} - -// SetUserBucket sets the UserBucket field's value. -func (s *SnapshotDiskContainer) SetUserBucket(v *UserBucket) *SnapshotDiskContainer { - s.UserBucket = v - return s -} - -// Details about the import snapshot task. -type SnapshotTaskDetail struct { - _ struct{} `type:"structure"` - - // The description of the snapshot. - Description *string `locationName:"description" type:"string"` - - // The size of the disk in the snapshot, in GiB. - DiskImageSize *float64 `locationName:"diskImageSize" type:"double"` - - // Indicates whether the snapshot is encrypted. - Encrypted *bool `locationName:"encrypted" type:"boolean"` - - // The format of the disk image from which the snapshot is created. - Format *string `locationName:"format" type:"string"` - - // The identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) that was used to create the encrypted snapshot. - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - - // The percentage of completion for the import snapshot task. - Progress *string `locationName:"progress" type:"string"` - - // The snapshot ID of the disk being imported. - SnapshotId *string `locationName:"snapshotId" type:"string"` - - // A brief status for the import snapshot task. - Status *string `locationName:"status" type:"string"` - - // A detailed status message for the import snapshot task. - StatusMessage *string `locationName:"statusMessage" type:"string"` - - // The URL of the disk image from which the snapshot is created. - Url *string `locationName:"url" type:"string"` - - // The S3 bucket for the disk image. - UserBucket *UserBucketDetails `locationName:"userBucket" type:"structure"` -} - -// String returns the string representation -func (s SnapshotTaskDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SnapshotTaskDetail) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *SnapshotTaskDetail) SetDescription(v string) *SnapshotTaskDetail { - s.Description = &v - return s -} - -// SetDiskImageSize sets the DiskImageSize field's value. -func (s *SnapshotTaskDetail) SetDiskImageSize(v float64) *SnapshotTaskDetail { - s.DiskImageSize = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *SnapshotTaskDetail) SetEncrypted(v bool) *SnapshotTaskDetail { - s.Encrypted = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *SnapshotTaskDetail) SetFormat(v string) *SnapshotTaskDetail { - s.Format = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *SnapshotTaskDetail) SetKmsKeyId(v string) *SnapshotTaskDetail { - s.KmsKeyId = &v - return s -} - -// SetProgress sets the Progress field's value. -func (s *SnapshotTaskDetail) SetProgress(v string) *SnapshotTaskDetail { - s.Progress = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *SnapshotTaskDetail) SetSnapshotId(v string) *SnapshotTaskDetail { - s.SnapshotId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SnapshotTaskDetail) SetStatus(v string) *SnapshotTaskDetail { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *SnapshotTaskDetail) SetStatusMessage(v string) *SnapshotTaskDetail { - s.StatusMessage = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *SnapshotTaskDetail) SetUrl(v string) *SnapshotTaskDetail { - s.Url = &v - return s -} - -// SetUserBucket sets the UserBucket field's value. -func (s *SnapshotTaskDetail) SetUserBucket(v *UserBucketDetails) *SnapshotTaskDetail { - s.UserBucket = v - return s -} - -// Describes the data feed for a Spot Instance. -type SpotDatafeedSubscription struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket where the Spot Instance data feed is located. - Bucket *string `locationName:"bucket" type:"string"` - - // The fault codes for the Spot Instance request, if any. - Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"` - - // The AWS account ID of the account. - OwnerId *string `locationName:"ownerId" type:"string"` - - // The prefix that is prepended to data feed files. - Prefix *string `locationName:"prefix" type:"string"` - - // The state of the Spot Instance data feed subscription. - State *string `locationName:"state" type:"string" enum:"DatafeedSubscriptionState"` -} - -// String returns the string representation -func (s SpotDatafeedSubscription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotDatafeedSubscription) GoString() string { - return s.String() -} - -// SetBucket sets the Bucket field's value. -func (s *SpotDatafeedSubscription) SetBucket(v string) *SpotDatafeedSubscription { - s.Bucket = &v - return s -} - -// SetFault sets the Fault field's value. -func (s *SpotDatafeedSubscription) SetFault(v *SpotInstanceStateFault) *SpotDatafeedSubscription { - s.Fault = v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *SpotDatafeedSubscription) SetOwnerId(v string) *SpotDatafeedSubscription { - s.OwnerId = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *SpotDatafeedSubscription) SetPrefix(v string) *SpotDatafeedSubscription { - s.Prefix = &v - return s -} - -// SetState sets the State field's value. -func (s *SpotDatafeedSubscription) SetState(v string) *SpotDatafeedSubscription { - s.State = &v - return s -} - -// Describes the launch specification for one or more Spot Instances. -type SpotFleetLaunchSpecification struct { - _ struct{} `type:"structure"` - - // Deprecated. - AddressingType *string `locationName:"addressingType" type:"string"` - - // One or more block device mapping entries. You can't specify both a snapshot - // ID and an encryption value. This is because only blank volumes can be encrypted - // on creation. If a snapshot is the basis for a volume, it is not blank and - // its encryption status is used for the volume encryption status. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` - - // Indicates whether the instances are optimized for EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal EBS I/O performance. This optimization isn't available - // with all instance types. Additional usage charges apply when using an EBS - // Optimized instance. - // - // Default: false - EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` - - // The IAM instance profile. - IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` - - // The ID of the AMI. - ImageId *string `locationName:"imageId" type:"string"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // The ID of the kernel. - KernelId *string `locationName:"kernelId" type:"string"` - - // The name of the key pair. - KeyName *string `locationName:"keyName" type:"string"` - - // Enable or disable monitoring for the instances. - Monitoring *SpotFleetMonitoring `locationName:"monitoring" type:"structure"` - - // One or more network interfaces. If you specify a network interface, you must - // specify subnet IDs and security group IDs using the network interface. - NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` - - // The placement information. - Placement *SpotPlacement `locationName:"placement" type:"structure"` - - // The ID of the RAM disk. - RamdiskId *string `locationName:"ramdiskId" type:"string"` - - // One or more security groups. When requesting instances in a VPC, you must - // specify the IDs of the security groups. When requesting instances in EC2-Classic, - // you can specify the names or the IDs of the security groups. - SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - - // The maximum price per unit hour that you are willing to pay for a Spot Instance. - // If this value is not specified, the default is the Spot price specified for - // the fleet. To determine the Spot price per unit hour, divide the Spot price - // by the value of WeightedCapacity. - SpotPrice *string `locationName:"spotPrice" type:"string"` - - // The ID of the subnet in which to launch the instances. To specify multiple - // subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08". - SubnetId *string `locationName:"subnetId" type:"string"` - - // The tags to apply during creation. - TagSpecifications []*SpotFleetTagSpecification `locationName:"tagSpecificationSet" locationNameList:"item" type:"list"` - - // The Base64-encoded user data to make available to the instances. - UserData *string `locationName:"userData" type:"string"` - - // The number of units provided by the specified instance type. These are the - // same units that you chose to set the target capacity in terms (instances - // or a performance characteristic such as vCPUs, memory, or I/O). - // - // If the target capacity divided by this value is not a whole number, we round - // the number of instances to the next whole number. If this value is not specified, - // the default is 1. - WeightedCapacity *float64 `locationName:"weightedCapacity" type:"double"` -} - -// String returns the string representation -func (s SpotFleetLaunchSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotFleetLaunchSpecification) GoString() string { - return s.String() -} - -// SetAddressingType sets the AddressingType field's value. -func (s *SpotFleetLaunchSpecification) SetAddressingType(v string) *SpotFleetLaunchSpecification { - s.AddressingType = &v - return s -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *SpotFleetLaunchSpecification) SetBlockDeviceMappings(v []*BlockDeviceMapping) *SpotFleetLaunchSpecification { - s.BlockDeviceMappings = v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *SpotFleetLaunchSpecification) SetEbsOptimized(v bool) *SpotFleetLaunchSpecification { - s.EbsOptimized = &v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *SpotFleetLaunchSpecification) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *SpotFleetLaunchSpecification { - s.IamInstanceProfile = v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *SpotFleetLaunchSpecification) SetImageId(v string) *SpotFleetLaunchSpecification { - s.ImageId = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *SpotFleetLaunchSpecification) SetInstanceType(v string) *SpotFleetLaunchSpecification { - s.InstanceType = &v - return s -} - -// SetKernelId sets the KernelId field's value. -func (s *SpotFleetLaunchSpecification) SetKernelId(v string) *SpotFleetLaunchSpecification { - s.KernelId = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *SpotFleetLaunchSpecification) SetKeyName(v string) *SpotFleetLaunchSpecification { - s.KeyName = &v - return s -} - -// SetMonitoring sets the Monitoring field's value. -func (s *SpotFleetLaunchSpecification) SetMonitoring(v *SpotFleetMonitoring) *SpotFleetLaunchSpecification { - s.Monitoring = v - return s -} - -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *SpotFleetLaunchSpecification) SetNetworkInterfaces(v []*InstanceNetworkInterfaceSpecification) *SpotFleetLaunchSpecification { - s.NetworkInterfaces = v - return s -} - -// SetPlacement sets the Placement field's value. -func (s *SpotFleetLaunchSpecification) SetPlacement(v *SpotPlacement) *SpotFleetLaunchSpecification { - s.Placement = v - return s -} - -// SetRamdiskId sets the RamdiskId field's value. -func (s *SpotFleetLaunchSpecification) SetRamdiskId(v string) *SpotFleetLaunchSpecification { - s.RamdiskId = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *SpotFleetLaunchSpecification) SetSecurityGroups(v []*GroupIdentifier) *SpotFleetLaunchSpecification { - s.SecurityGroups = v - return s -} - -// SetSpotPrice sets the SpotPrice field's value. -func (s *SpotFleetLaunchSpecification) SetSpotPrice(v string) *SpotFleetLaunchSpecification { - s.SpotPrice = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *SpotFleetLaunchSpecification) SetSubnetId(v string) *SpotFleetLaunchSpecification { - s.SubnetId = &v - return s -} - -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *SpotFleetLaunchSpecification) SetTagSpecifications(v []*SpotFleetTagSpecification) *SpotFleetLaunchSpecification { - s.TagSpecifications = v - return s -} - -// SetUserData sets the UserData field's value. -func (s *SpotFleetLaunchSpecification) SetUserData(v string) *SpotFleetLaunchSpecification { - s.UserData = &v - return s -} - -// SetWeightedCapacity sets the WeightedCapacity field's value. -func (s *SpotFleetLaunchSpecification) SetWeightedCapacity(v float64) *SpotFleetLaunchSpecification { - s.WeightedCapacity = &v - return s -} - -// Describes whether monitoring is enabled. -type SpotFleetMonitoring struct { - _ struct{} `type:"structure"` - - // Enables monitoring for the instance. - // - // Default: false - Enabled *bool `locationName:"enabled" type:"boolean"` -} - -// String returns the string representation -func (s SpotFleetMonitoring) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotFleetMonitoring) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *SpotFleetMonitoring) SetEnabled(v bool) *SpotFleetMonitoring { - s.Enabled = &v - return s -} - -// Describes a Spot Fleet request. -type SpotFleetRequestConfig struct { - _ struct{} `type:"structure"` - - // The progress of the Spot Fleet request. If there is an error, the status - // is error. After all requests are placed, the status is pending_fulfillment. - // If the size of the fleet is equal to or greater than its target capacity, - // the status is fulfilled. If the size of the fleet is decreased, the status - // is pending_termination while Spot Instances are terminating. - ActivityStatus *string `locationName:"activityStatus" type:"string" enum:"ActivityStatus"` - - // The creation date and time of the request. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - - // The configuration of the Spot Fleet request. - SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure"` - - // The ID of the Spot Fleet request. - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` - - // The state of the Spot Fleet request. - SpotFleetRequestState *string `locationName:"spotFleetRequestState" type:"string" enum:"BatchState"` -} - -// String returns the string representation -func (s SpotFleetRequestConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotFleetRequestConfig) GoString() string { - return s.String() -} - -// SetActivityStatus sets the ActivityStatus field's value. -func (s *SpotFleetRequestConfig) SetActivityStatus(v string) *SpotFleetRequestConfig { - s.ActivityStatus = &v - return s -} - -// SetCreateTime sets the CreateTime field's value. -func (s *SpotFleetRequestConfig) SetCreateTime(v time.Time) *SpotFleetRequestConfig { - s.CreateTime = &v - return s -} - -// SetSpotFleetRequestConfig sets the SpotFleetRequestConfig field's value. -func (s *SpotFleetRequestConfig) SetSpotFleetRequestConfig(v *SpotFleetRequestConfigData) *SpotFleetRequestConfig { - s.SpotFleetRequestConfig = v - return s -} - -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *SpotFleetRequestConfig) SetSpotFleetRequestId(v string) *SpotFleetRequestConfig { - s.SpotFleetRequestId = &v - return s -} - -// SetSpotFleetRequestState sets the SpotFleetRequestState field's value. -func (s *SpotFleetRequestConfig) SetSpotFleetRequestState(v string) *SpotFleetRequestConfig { - s.SpotFleetRequestState = &v - return s -} - -// Describes the configuration of a Spot Fleet request. -type SpotFleetRequestConfigData struct { - _ struct{} `type:"structure"` - - // Indicates how to allocate the target capacity across the Spot pools specified - // by the Spot Fleet request. The default is lowestPrice. - AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"AllocationStrategy"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of your listings. This helps to avoid duplicate listings. For more information, - // see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `locationName:"clientToken" type:"string"` - - // Indicates whether running Spot Instances should be terminated if the target - // capacity of the Spot Fleet request is decreased below the current size of - // the Spot Fleet. - ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"` - - // The number of units fulfilled by this request compared to the set target - // capacity. You cannot set this value. - FulfilledCapacity *float64 `locationName:"fulfilledCapacity" type:"double"` - - // Grants the Spot Fleet permission to terminate Spot Instances on your behalf - // when you cancel its Spot Fleet request using CancelSpotFleetRequests or when - // the Spot Fleet request expires, if you set terminateInstancesWithExpiration. - // - // IamFleetRole is a required field - IamFleetRole *string `locationName:"iamFleetRole" type:"string" required:"true"` - - // The behavior when a Spot Instance is interrupted. The default is terminate. - InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"` - - // The number of Spot pools across which to allocate your target Spot capacity. - // Valid only when Spot AllocationStrategy is set to lowest-price. Spot Fleet - // selects the cheapest Spot pools and evenly allocates your target Spot capacity - // across the number of Spot pools that you specify. - InstancePoolsToUseCount *int64 `locationName:"instancePoolsToUseCount" type:"integer"` - - // The launch specifications for the Spot Fleet request. - LaunchSpecifications []*SpotFleetLaunchSpecification `locationName:"launchSpecifications" locationNameList:"item" type:"list"` - - // The launch template and overrides. - LaunchTemplateConfigs []*LaunchTemplateConfig `locationName:"launchTemplateConfigs" locationNameList:"item" type:"list"` - - // One or more Classic Load Balancers and target groups to attach to the Spot - // Fleet request. Spot Fleet registers the running Spot Instances with the specified - // Classic Load Balancers and target groups. - // - // With Network Load Balancers, Spot Fleet cannot register instances that have - // the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, - // HS1, M1, M2, M3, and T1. - LoadBalancersConfig *LoadBalancersConfig `locationName:"loadBalancersConfig" type:"structure"` - - // The order of the launch template overrides to use in fulfilling On-Demand - // capacity. If you specify lowestPrice, Spot Fleet uses price to determine - // the order, launching the lowest price first. If you specify prioritized, - // Spot Fleet uses the priority that you assign to each Spot Fleet launch template - // override, launching the highest priority first. If you do not specify a value, - // Spot Fleet defaults to lowestPrice. - OnDemandAllocationStrategy *string `locationName:"onDemandAllocationStrategy" type:"string" enum:"OnDemandAllocationStrategy"` - - // The number of On-Demand units fulfilled by this request compared to the set - // target On-Demand capacity. - OnDemandFulfilledCapacity *float64 `locationName:"onDemandFulfilledCapacity" type:"double"` - - // The number of On-Demand units to request. You can choose to set the target - // capacity in terms of instances or a performance characteristic that is important - // to your application workload, such as vCPUs, memory, or I/O. If the request - // type is maintain, you can specify a target capacity of 0 and add capacity - // later. - OnDemandTargetCapacity *int64 `locationName:"onDemandTargetCapacity" type:"integer"` - - // Indicates whether Spot Fleet should replace unhealthy instances. - ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"` - - // The maximum price per unit hour that you are willing to pay for a Spot Instance. - // The default is the On-Demand price. - SpotPrice *string `locationName:"spotPrice" type:"string"` - - // The number of units to request. You can choose to set the target capacity - // in terms of instances or a performance characteristic that is important to - // your application workload, such as vCPUs, memory, or I/O. If the request - // type is maintain, you can specify a target capacity of 0 and add capacity - // later. - // - // TargetCapacity is a required field - TargetCapacity *int64 `locationName:"targetCapacity" type:"integer" required:"true"` - - // Indicates whether running Spot Instances should be terminated when the Spot - // Fleet request expires. - TerminateInstancesWithExpiration *bool `locationName:"terminateInstancesWithExpiration" type:"boolean"` - - // The type of request. Indicates whether the Spot Fleet only requests the target - // capacity or also attempts to maintain it. When this value is request, the - // Spot Fleet only places the required requests. It does not attempt to replenish - // Spot Instances if capacity is diminished, nor does it submit requests in - // alternative Spot pools if capacity is not available. When this value is maintain, - // the Spot Fleet maintains the target capacity. The Spot Fleet places the required - // requests to meet capacity and automatically replenishes any interrupted instances. - // Default: maintain. instant is listed but is not used by Spot Fleet. - Type *string `locationName:"type" type:"string" enum:"FleetType"` - - // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // The default is to start fulfilling the request immediately. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` - - // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // At this point, no new Spot Instance requests are placed or able to fulfill - // the request. The default end date is 7 days from the current date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` -} - -// String returns the string representation -func (s SpotFleetRequestConfigData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotFleetRequestConfigData) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SpotFleetRequestConfigData) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SpotFleetRequestConfigData"} - if s.IamFleetRole == nil { - invalidParams.Add(request.NewErrParamRequired("IamFleetRole")) - } - if s.TargetCapacity == nil { - invalidParams.Add(request.NewErrParamRequired("TargetCapacity")) - } - if s.LaunchTemplateConfigs != nil { - for i, v := range s.LaunchTemplateConfigs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LaunchTemplateConfigs", i), err.(request.ErrInvalidParams)) - } - } - } - if s.LoadBalancersConfig != nil { - if err := s.LoadBalancersConfig.Validate(); err != nil { - invalidParams.AddNested("LoadBalancersConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllocationStrategy sets the AllocationStrategy field's value. -func (s *SpotFleetRequestConfigData) SetAllocationStrategy(v string) *SpotFleetRequestConfigData { - s.AllocationStrategy = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *SpotFleetRequestConfigData) SetClientToken(v string) *SpotFleetRequestConfigData { - s.ClientToken = &v - return s -} - -// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. -func (s *SpotFleetRequestConfigData) SetExcessCapacityTerminationPolicy(v string) *SpotFleetRequestConfigData { - s.ExcessCapacityTerminationPolicy = &v - return s -} - -// SetFulfilledCapacity sets the FulfilledCapacity field's value. -func (s *SpotFleetRequestConfigData) SetFulfilledCapacity(v float64) *SpotFleetRequestConfigData { - s.FulfilledCapacity = &v - return s -} - -// SetIamFleetRole sets the IamFleetRole field's value. -func (s *SpotFleetRequestConfigData) SetIamFleetRole(v string) *SpotFleetRequestConfigData { - s.IamFleetRole = &v - return s -} - -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *SpotFleetRequestConfigData) SetInstanceInterruptionBehavior(v string) *SpotFleetRequestConfigData { - s.InstanceInterruptionBehavior = &v - return s -} - -// SetInstancePoolsToUseCount sets the InstancePoolsToUseCount field's value. -func (s *SpotFleetRequestConfigData) SetInstancePoolsToUseCount(v int64) *SpotFleetRequestConfigData { - s.InstancePoolsToUseCount = &v - return s -} - -// SetLaunchSpecifications sets the LaunchSpecifications field's value. -func (s *SpotFleetRequestConfigData) SetLaunchSpecifications(v []*SpotFleetLaunchSpecification) *SpotFleetRequestConfigData { - s.LaunchSpecifications = v - return s -} - -// SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value. -func (s *SpotFleetRequestConfigData) SetLaunchTemplateConfigs(v []*LaunchTemplateConfig) *SpotFleetRequestConfigData { - s.LaunchTemplateConfigs = v - return s -} - -// SetLoadBalancersConfig sets the LoadBalancersConfig field's value. -func (s *SpotFleetRequestConfigData) SetLoadBalancersConfig(v *LoadBalancersConfig) *SpotFleetRequestConfigData { - s.LoadBalancersConfig = v - return s -} - -// SetOnDemandAllocationStrategy sets the OnDemandAllocationStrategy field's value. -func (s *SpotFleetRequestConfigData) SetOnDemandAllocationStrategy(v string) *SpotFleetRequestConfigData { - s.OnDemandAllocationStrategy = &v - return s -} - -// SetOnDemandFulfilledCapacity sets the OnDemandFulfilledCapacity field's value. -func (s *SpotFleetRequestConfigData) SetOnDemandFulfilledCapacity(v float64) *SpotFleetRequestConfigData { - s.OnDemandFulfilledCapacity = &v - return s -} - -// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. -func (s *SpotFleetRequestConfigData) SetOnDemandTargetCapacity(v int64) *SpotFleetRequestConfigData { - s.OnDemandTargetCapacity = &v - return s -} - -// SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. -func (s *SpotFleetRequestConfigData) SetReplaceUnhealthyInstances(v bool) *SpotFleetRequestConfigData { - s.ReplaceUnhealthyInstances = &v - return s -} - -// SetSpotPrice sets the SpotPrice field's value. -func (s *SpotFleetRequestConfigData) SetSpotPrice(v string) *SpotFleetRequestConfigData { - s.SpotPrice = &v - return s -} - -// SetTargetCapacity sets the TargetCapacity field's value. -func (s *SpotFleetRequestConfigData) SetTargetCapacity(v int64) *SpotFleetRequestConfigData { - s.TargetCapacity = &v - return s -} - -// SetTerminateInstancesWithExpiration sets the TerminateInstancesWithExpiration field's value. -func (s *SpotFleetRequestConfigData) SetTerminateInstancesWithExpiration(v bool) *SpotFleetRequestConfigData { - s.TerminateInstancesWithExpiration = &v - return s -} - -// SetType sets the Type field's value. -func (s *SpotFleetRequestConfigData) SetType(v string) *SpotFleetRequestConfigData { - s.Type = &v - return s -} - -// SetValidFrom sets the ValidFrom field's value. -func (s *SpotFleetRequestConfigData) SetValidFrom(v time.Time) *SpotFleetRequestConfigData { - s.ValidFrom = &v - return s -} - -// SetValidUntil sets the ValidUntil field's value. -func (s *SpotFleetRequestConfigData) SetValidUntil(v time.Time) *SpotFleetRequestConfigData { - s.ValidUntil = &v - return s -} - -// The tags for a Spot Fleet resource. -type SpotFleetTagSpecification struct { - _ struct{} `type:"structure"` - - // The type of resource. Currently, the only resource type that is supported - // is instance. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The tags. - Tags []*Tag `locationName:"tag" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s SpotFleetTagSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotFleetTagSpecification) GoString() string { - return s.String() -} - -// SetResourceType sets the ResourceType field's value. -func (s *SpotFleetTagSpecification) SetResourceType(v string) *SpotFleetTagSpecification { - s.ResourceType = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *SpotFleetTagSpecification) SetTags(v []*Tag) *SpotFleetTagSpecification { - s.Tags = v - return s -} - -// Describes a Spot Instance request. -type SpotInstanceRequest struct { - _ struct{} `type:"structure"` - - // If you specified a duration and your Spot Instance request was fulfilled, - // this is the fixed hourly price in effect for the Spot Instance while it runs. - ActualBlockHourlyPrice *string `locationName:"actualBlockHourlyPrice" type:"string"` - - // The Availability Zone group. If you specify the same Availability Zone group - // for all Spot Instance requests, all Spot Instances are launched in the same - // Availability Zone. - AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"` - - // The duration for the Spot Instance, in minutes. - BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` - - // The date and time when the Spot Instance request was created, in UTC format - // (for example, YYYY-MM-DDTHH:MM:SSZ). - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - - // The fault codes for the Spot Instance request, if any. - Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"` - - // The instance ID, if an instance has been launched to fulfill the Spot Instance - // request. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The behavior when a Spot Instance is interrupted. - InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"` - - // The instance launch group. Launch groups are Spot Instances that launch together - // and terminate together. - LaunchGroup *string `locationName:"launchGroup" type:"string"` - - // Additional information for launching instances. - LaunchSpecification *LaunchSpecification `locationName:"launchSpecification" type:"structure"` - - // The Availability Zone in which the request is launched. - LaunchedAvailabilityZone *string `locationName:"launchedAvailabilityZone" type:"string"` - - // The product description associated with the Spot Instance. - ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` - - // The ID of the Spot Instance request. - SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"` - - // The maximum price per hour that you are willing to pay for a Spot Instance. - SpotPrice *string `locationName:"spotPrice" type:"string"` - - // The state of the Spot Instance request. Spot status information helps track - // your Spot Instance requests. For more information, see Spot Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) - // in the Amazon EC2 User Guide for Linux Instances. - State *string `locationName:"state" type:"string" enum:"SpotInstanceState"` - - // The status code and status message describing the Spot Instance request. - Status *SpotInstanceStatus `locationName:"status" type:"structure"` - - // Any tags assigned to the resource. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The Spot Instance request type. - Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"` - - // The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // The request becomes active at this date and time. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` - - // The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // If this is a one-time request, it remains active until all instances launch, - // the request is canceled, or this date is reached. If the request is persistent, - // it remains active until it is canceled or this date is reached. The default - // end date is 7 days from the current date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` -} - -// String returns the string representation -func (s SpotInstanceRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotInstanceRequest) GoString() string { - return s.String() -} - -// SetActualBlockHourlyPrice sets the ActualBlockHourlyPrice field's value. -func (s *SpotInstanceRequest) SetActualBlockHourlyPrice(v string) *SpotInstanceRequest { - s.ActualBlockHourlyPrice = &v - return s -} - -// SetAvailabilityZoneGroup sets the AvailabilityZoneGroup field's value. -func (s *SpotInstanceRequest) SetAvailabilityZoneGroup(v string) *SpotInstanceRequest { - s.AvailabilityZoneGroup = &v - return s -} - -// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. -func (s *SpotInstanceRequest) SetBlockDurationMinutes(v int64) *SpotInstanceRequest { - s.BlockDurationMinutes = &v - return s -} - -// SetCreateTime sets the CreateTime field's value. -func (s *SpotInstanceRequest) SetCreateTime(v time.Time) *SpotInstanceRequest { - s.CreateTime = &v - return s -} - -// SetFault sets the Fault field's value. -func (s *SpotInstanceRequest) SetFault(v *SpotInstanceStateFault) *SpotInstanceRequest { - s.Fault = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *SpotInstanceRequest) SetInstanceId(v string) *SpotInstanceRequest { - s.InstanceId = &v - return s -} - -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *SpotInstanceRequest) SetInstanceInterruptionBehavior(v string) *SpotInstanceRequest { - s.InstanceInterruptionBehavior = &v - return s -} - -// SetLaunchGroup sets the LaunchGroup field's value. -func (s *SpotInstanceRequest) SetLaunchGroup(v string) *SpotInstanceRequest { - s.LaunchGroup = &v - return s -} - -// SetLaunchSpecification sets the LaunchSpecification field's value. -func (s *SpotInstanceRequest) SetLaunchSpecification(v *LaunchSpecification) *SpotInstanceRequest { - s.LaunchSpecification = v - return s -} - -// SetLaunchedAvailabilityZone sets the LaunchedAvailabilityZone field's value. -func (s *SpotInstanceRequest) SetLaunchedAvailabilityZone(v string) *SpotInstanceRequest { - s.LaunchedAvailabilityZone = &v - return s -} - -// SetProductDescription sets the ProductDescription field's value. -func (s *SpotInstanceRequest) SetProductDescription(v string) *SpotInstanceRequest { - s.ProductDescription = &v - return s -} - -// SetSpotInstanceRequestId sets the SpotInstanceRequestId field's value. -func (s *SpotInstanceRequest) SetSpotInstanceRequestId(v string) *SpotInstanceRequest { - s.SpotInstanceRequestId = &v - return s -} - -// SetSpotPrice sets the SpotPrice field's value. -func (s *SpotInstanceRequest) SetSpotPrice(v string) *SpotInstanceRequest { - s.SpotPrice = &v - return s -} - -// SetState sets the State field's value. -func (s *SpotInstanceRequest) SetState(v string) *SpotInstanceRequest { - s.State = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SpotInstanceRequest) SetStatus(v *SpotInstanceStatus) *SpotInstanceRequest { - s.Status = v - return s -} - -// SetTags sets the Tags field's value. -func (s *SpotInstanceRequest) SetTags(v []*Tag) *SpotInstanceRequest { - s.Tags = v - return s -} - -// SetType sets the Type field's value. -func (s *SpotInstanceRequest) SetType(v string) *SpotInstanceRequest { - s.Type = &v - return s -} - -// SetValidFrom sets the ValidFrom field's value. -func (s *SpotInstanceRequest) SetValidFrom(v time.Time) *SpotInstanceRequest { - s.ValidFrom = &v - return s -} - -// SetValidUntil sets the ValidUntil field's value. -func (s *SpotInstanceRequest) SetValidUntil(v time.Time) *SpotInstanceRequest { - s.ValidUntil = &v - return s -} - -// Describes a Spot Instance state change. -type SpotInstanceStateFault struct { - _ struct{} `type:"structure"` - - // The reason code for the Spot Instance state change. - Code *string `locationName:"code" type:"string"` - - // The message for the Spot Instance state change. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s SpotInstanceStateFault) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotInstanceStateFault) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *SpotInstanceStateFault) SetCode(v string) *SpotInstanceStateFault { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *SpotInstanceStateFault) SetMessage(v string) *SpotInstanceStateFault { - s.Message = &v - return s -} - -// Describes the status of a Spot Instance request. -type SpotInstanceStatus struct { - _ struct{} `type:"structure"` - - // The status code. For a list of status codes, see Spot Status Codes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html#spot-instance-bid-status-understand) - // in the Amazon EC2 User Guide for Linux Instances. - Code *string `locationName:"code" type:"string"` - - // The description for the status code. - Message *string `locationName:"message" type:"string"` - - // The date and time of the most recent status update, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). - UpdateTime *time.Time `locationName:"updateTime" type:"timestamp"` -} - -// String returns the string representation -func (s SpotInstanceStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotInstanceStatus) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *SpotInstanceStatus) SetCode(v string) *SpotInstanceStatus { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *SpotInstanceStatus) SetMessage(v string) *SpotInstanceStatus { - s.Message = &v - return s -} - -// SetUpdateTime sets the UpdateTime field's value. -func (s *SpotInstanceStatus) SetUpdateTime(v time.Time) *SpotInstanceStatus { - s.UpdateTime = &v - return s -} - -// The options for Spot Instances. -type SpotMarketOptions struct { - _ struct{} `type:"structure"` - - // The required duration for the Spot Instances (also known as Spot blocks), - // in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, - // or 360). - BlockDurationMinutes *int64 `type:"integer"` - - // The behavior when a Spot Instance is interrupted. The default is terminate. - InstanceInterruptionBehavior *string `type:"string" enum:"InstanceInterruptionBehavior"` - - // The maximum hourly price you're willing to pay for the Spot Instances. The - // default is the On-Demand price. - MaxPrice *string `type:"string"` - - // The Spot Instance request type. For RunInstances, persistent Spot Instance - // requests are only supported when InstanceInterruptionBehavior is set to either - // hibernate or stop. - SpotInstanceType *string `type:"string" enum:"SpotInstanceType"` - - // The end date of the request. For a one-time request, the request remains - // active until all instances launch, the request is canceled, or this date - // is reached. If the request is persistent, it remains active until it is canceled - // or this date and time is reached. The default end date is 7 days from the - // current date. - ValidUntil *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s SpotMarketOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotMarketOptions) GoString() string { - return s.String() -} - -// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. -func (s *SpotMarketOptions) SetBlockDurationMinutes(v int64) *SpotMarketOptions { - s.BlockDurationMinutes = &v - return s -} - -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *SpotMarketOptions) SetInstanceInterruptionBehavior(v string) *SpotMarketOptions { - s.InstanceInterruptionBehavior = &v - return s -} - -// SetMaxPrice sets the MaxPrice field's value. -func (s *SpotMarketOptions) SetMaxPrice(v string) *SpotMarketOptions { - s.MaxPrice = &v - return s -} - -// SetSpotInstanceType sets the SpotInstanceType field's value. -func (s *SpotMarketOptions) SetSpotInstanceType(v string) *SpotMarketOptions { - s.SpotInstanceType = &v - return s -} - -// SetValidUntil sets the ValidUntil field's value. -func (s *SpotMarketOptions) SetValidUntil(v time.Time) *SpotMarketOptions { - s.ValidUntil = &v - return s -} - -// Describes the configuration of Spot Instances in an EC2 Fleet. -type SpotOptions struct { - _ struct{} `type:"structure"` - - // Indicates how to allocate the target capacity across the Spot pools specified - // by the Spot Fleet request. The default is lowest-price. - AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"SpotAllocationStrategy"` - - // The behavior when a Spot Instance is interrupted. The default is terminate. - InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"SpotInstanceInterruptionBehavior"` - - // The number of Spot pools across which to allocate your target Spot capacity. - // Valid only when AllocationStrategy is set to lowestPrice. EC2 Fleet selects - // the cheapest Spot pools and evenly allocates your target Spot capacity across - // the number of Spot pools that you specify. - InstancePoolsToUseCount *int64 `locationName:"instancePoolsToUseCount" type:"integer"` - - // The minimum target capacity for Spot Instances in the fleet. If the minimum - // target capacity is not reached, the fleet launches no instances. - MinTargetCapacity *int64 `locationName:"minTargetCapacity" type:"integer"` - - // Indicates that the fleet launches all Spot Instances into a single Availability - // Zone. - SingleAvailabilityZone *bool `locationName:"singleAvailabilityZone" type:"boolean"` - - // Indicates that the fleet uses a single instance type to launch all Spot Instances - // in the fleet. - SingleInstanceType *bool `locationName:"singleInstanceType" type:"boolean"` -} - -// String returns the string representation -func (s SpotOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotOptions) GoString() string { - return s.String() -} - -// SetAllocationStrategy sets the AllocationStrategy field's value. -func (s *SpotOptions) SetAllocationStrategy(v string) *SpotOptions { - s.AllocationStrategy = &v - return s -} - -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *SpotOptions) SetInstanceInterruptionBehavior(v string) *SpotOptions { - s.InstanceInterruptionBehavior = &v - return s -} - -// SetInstancePoolsToUseCount sets the InstancePoolsToUseCount field's value. -func (s *SpotOptions) SetInstancePoolsToUseCount(v int64) *SpotOptions { - s.InstancePoolsToUseCount = &v - return s -} - -// SetMinTargetCapacity sets the MinTargetCapacity field's value. -func (s *SpotOptions) SetMinTargetCapacity(v int64) *SpotOptions { - s.MinTargetCapacity = &v - return s -} - -// SetSingleAvailabilityZone sets the SingleAvailabilityZone field's value. -func (s *SpotOptions) SetSingleAvailabilityZone(v bool) *SpotOptions { - s.SingleAvailabilityZone = &v - return s -} - -// SetSingleInstanceType sets the SingleInstanceType field's value. -func (s *SpotOptions) SetSingleInstanceType(v bool) *SpotOptions { - s.SingleInstanceType = &v - return s -} - -// Describes the configuration of Spot Instances in an EC2 Fleet request. -type SpotOptionsRequest struct { - _ struct{} `type:"structure"` - - // Indicates how to allocate the target capacity across the Spot pools specified - // by the Spot Fleet request. The default is lowestPrice. - AllocationStrategy *string `type:"string" enum:"SpotAllocationStrategy"` - - // The behavior when a Spot Instance is interrupted. The default is terminate. - InstanceInterruptionBehavior *string `type:"string" enum:"SpotInstanceInterruptionBehavior"` - - // The number of Spot pools across which to allocate your target Spot capacity. - // Valid only when Spot AllocationStrategy is set to lowest-price. EC2 Fleet - // selects the cheapest Spot pools and evenly allocates your target Spot capacity - // across the number of Spot pools that you specify. - InstancePoolsToUseCount *int64 `type:"integer"` - - // The minimum target capacity for Spot Instances in the fleet. If the minimum - // target capacity is not reached, the fleet launches no instances. - MinTargetCapacity *int64 `type:"integer"` - - // Indicates that the fleet launches all Spot Instances into a single Availability - // Zone. - SingleAvailabilityZone *bool `type:"boolean"` - - // Indicates that the fleet uses a single instance type to launch all Spot Instances - // in the fleet. - SingleInstanceType *bool `type:"boolean"` -} - -// String returns the string representation -func (s SpotOptionsRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotOptionsRequest) GoString() string { - return s.String() -} - -// SetAllocationStrategy sets the AllocationStrategy field's value. -func (s *SpotOptionsRequest) SetAllocationStrategy(v string) *SpotOptionsRequest { - s.AllocationStrategy = &v - return s -} - -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *SpotOptionsRequest) SetInstanceInterruptionBehavior(v string) *SpotOptionsRequest { - s.InstanceInterruptionBehavior = &v - return s -} - -// SetInstancePoolsToUseCount sets the InstancePoolsToUseCount field's value. -func (s *SpotOptionsRequest) SetInstancePoolsToUseCount(v int64) *SpotOptionsRequest { - s.InstancePoolsToUseCount = &v - return s -} - -// SetMinTargetCapacity sets the MinTargetCapacity field's value. -func (s *SpotOptionsRequest) SetMinTargetCapacity(v int64) *SpotOptionsRequest { - s.MinTargetCapacity = &v - return s -} - -// SetSingleAvailabilityZone sets the SingleAvailabilityZone field's value. -func (s *SpotOptionsRequest) SetSingleAvailabilityZone(v bool) *SpotOptionsRequest { - s.SingleAvailabilityZone = &v - return s -} - -// SetSingleInstanceType sets the SingleInstanceType field's value. -func (s *SpotOptionsRequest) SetSingleInstanceType(v bool) *SpotOptionsRequest { - s.SingleInstanceType = &v - return s -} - -// Describes Spot Instance placement. -type SpotPlacement struct { - _ struct{} `type:"structure"` - - // The Availability Zone. - // - // [Spot Fleet only] To specify multiple Availability Zones, separate them using - // commas; for example, "us-west-2a, us-west-2b". - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The name of the placement group. - GroupName *string `locationName:"groupName" type:"string"` - - // The tenancy of the instance (if the instance is running in a VPC). An instance - // with a tenancy of dedicated runs on single-tenant hardware. The host tenancy - // is not supported for Spot Instances. - Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"` -} - -// String returns the string representation -func (s SpotPlacement) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotPlacement) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *SpotPlacement) SetAvailabilityZone(v string) *SpotPlacement { - s.AvailabilityZone = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *SpotPlacement) SetGroupName(v string) *SpotPlacement { - s.GroupName = &v - return s -} - -// SetTenancy sets the Tenancy field's value. -func (s *SpotPlacement) SetTenancy(v string) *SpotPlacement { - s.Tenancy = &v - return s -} - -// Describes the maximum price per hour that you are willing to pay for a Spot -// Instance. -type SpotPrice struct { - _ struct{} `type:"structure"` - - // The Availability Zone. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // A general description of the AMI. - ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` - - // The maximum price per hour that you are willing to pay for a Spot Instance. - SpotPrice *string `locationName:"spotPrice" type:"string"` - - // The date and time the request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` -} - -// String returns the string representation -func (s SpotPrice) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotPrice) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *SpotPrice) SetAvailabilityZone(v string) *SpotPrice { - s.AvailabilityZone = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *SpotPrice) SetInstanceType(v string) *SpotPrice { - s.InstanceType = &v - return s -} - -// SetProductDescription sets the ProductDescription field's value. -func (s *SpotPrice) SetProductDescription(v string) *SpotPrice { - s.ProductDescription = &v - return s -} - -// SetSpotPrice sets the SpotPrice field's value. -func (s *SpotPrice) SetSpotPrice(v string) *SpotPrice { - s.SpotPrice = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *SpotPrice) SetTimestamp(v time.Time) *SpotPrice { - s.Timestamp = &v - return s -} - -// Describes a stale rule in a security group. -type StaleIpPermission struct { - _ struct{} `type:"structure"` - - // The start of the port range for the TCP and UDP protocols, or an ICMP type - // number. A value of -1 indicates all ICMP types. - FromPort *int64 `locationName:"fromPort" type:"integer"` - - // The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers) - // (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). - IpProtocol *string `locationName:"ipProtocol" type:"string"` - - // One or more IP ranges. Not applicable for stale security group rules. - IpRanges []*string `locationName:"ipRanges" locationNameList:"item" type:"list"` - - // One or more prefix list IDs for an AWS service. Not applicable for stale - // security group rules. - PrefixListIds []*string `locationName:"prefixListIds" locationNameList:"item" type:"list"` - - // The end of the port range for the TCP and UDP protocols, or an ICMP type - // number. A value of -1 indicates all ICMP types. - ToPort *int64 `locationName:"toPort" type:"integer"` - - // One or more security group pairs. Returns the ID of the referenced security - // group and VPC, and the ID and status of the VPC peering connection. - UserIdGroupPairs []*UserIdGroupPair `locationName:"groups" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s StaleIpPermission) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StaleIpPermission) GoString() string { - return s.String() -} - -// SetFromPort sets the FromPort field's value. -func (s *StaleIpPermission) SetFromPort(v int64) *StaleIpPermission { - s.FromPort = &v - return s -} - -// SetIpProtocol sets the IpProtocol field's value. -func (s *StaleIpPermission) SetIpProtocol(v string) *StaleIpPermission { - s.IpProtocol = &v - return s -} - -// SetIpRanges sets the IpRanges field's value. -func (s *StaleIpPermission) SetIpRanges(v []*string) *StaleIpPermission { - s.IpRanges = v - return s -} - -// SetPrefixListIds sets the PrefixListIds field's value. -func (s *StaleIpPermission) SetPrefixListIds(v []*string) *StaleIpPermission { - s.PrefixListIds = v - return s -} - -// SetToPort sets the ToPort field's value. -func (s *StaleIpPermission) SetToPort(v int64) *StaleIpPermission { - s.ToPort = &v - return s -} - -// SetUserIdGroupPairs sets the UserIdGroupPairs field's value. -func (s *StaleIpPermission) SetUserIdGroupPairs(v []*UserIdGroupPair) *StaleIpPermission { - s.UserIdGroupPairs = v - return s -} - -// Describes a stale security group (a security group that contains stale rules). -type StaleSecurityGroup struct { - _ struct{} `type:"structure"` - - // The description of the security group. - Description *string `locationName:"description" type:"string"` - - // The ID of the security group. - GroupId *string `locationName:"groupId" type:"string"` - - // The name of the security group. - GroupName *string `locationName:"groupName" type:"string"` - - // Information about the stale inbound rules in the security group. - StaleIpPermissions []*StaleIpPermission `locationName:"staleIpPermissions" locationNameList:"item" type:"list"` - - // Information about the stale outbound rules in the security group. - StaleIpPermissionsEgress []*StaleIpPermission `locationName:"staleIpPermissionsEgress" locationNameList:"item" type:"list"` - - // The ID of the VPC for the security group. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s StaleSecurityGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StaleSecurityGroup) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *StaleSecurityGroup) SetDescription(v string) *StaleSecurityGroup { - s.Description = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *StaleSecurityGroup) SetGroupId(v string) *StaleSecurityGroup { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *StaleSecurityGroup) SetGroupName(v string) *StaleSecurityGroup { - s.GroupName = &v - return s -} - -// SetStaleIpPermissions sets the StaleIpPermissions field's value. -func (s *StaleSecurityGroup) SetStaleIpPermissions(v []*StaleIpPermission) *StaleSecurityGroup { - s.StaleIpPermissions = v - return s -} - -// SetStaleIpPermissionsEgress sets the StaleIpPermissionsEgress field's value. -func (s *StaleSecurityGroup) SetStaleIpPermissionsEgress(v []*StaleIpPermission) *StaleSecurityGroup { - s.StaleIpPermissionsEgress = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *StaleSecurityGroup) SetVpcId(v string) *StaleSecurityGroup { - s.VpcId = &v - return s -} - -type StartInstancesInput struct { - _ struct{} `type:"structure"` - - // Reserved. - AdditionalInfo *string `locationName:"additionalInfo" type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more instance IDs. - // - // InstanceIds is a required field - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` -} - -// String returns the string representation -func (s StartInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartInstancesInput"} - if s.InstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdditionalInfo sets the AdditionalInfo field's value. -func (s *StartInstancesInput) SetAdditionalInfo(v string) *StartInstancesInput { - s.AdditionalInfo = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *StartInstancesInput) SetDryRun(v bool) *StartInstancesInput { - s.DryRun = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *StartInstancesInput) SetInstanceIds(v []*string) *StartInstancesInput { - s.InstanceIds = v - return s -} - -type StartInstancesOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more started instances. - StartingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s StartInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartInstancesOutput) GoString() string { - return s.String() -} - -// SetStartingInstances sets the StartingInstances field's value. -func (s *StartInstancesOutput) SetStartingInstances(v []*InstanceStateChange) *StartInstancesOutput { - s.StartingInstances = v - return s -} - -// Describes a state change. -type StateReason struct { - _ struct{} `type:"structure"` - - // The reason code for the state change. - Code *string `locationName:"code" type:"string"` - - // The message for the state change. - // - // * Server.InsufficientInstanceCapacity: There was insufficient capacity - // available to satisfy the launch request. - // - // * Server.InternalError: An internal error caused the instance to terminate - // during launch. - // - // * Server.ScheduledStop: The instance was stopped due to a scheduled retirement. - // - // * Server.SpotInstanceShutdown: The instance was stopped because the number - // of Spot requests with a maximum price equal to or higher than the Spot - // price exceeded available capacity or because of an increase in the Spot - // price. - // - // * Server.SpotInstanceTermination: The instance was terminated because - // the number of Spot requests with a maximum price equal to or higher than - // the Spot price exceeded available capacity or because of an increase in - // the Spot price. - // - // * Client.InstanceInitiatedShutdown: The instance was shut down using the - // shutdown -h command from the instance. - // - // * Client.InstanceTerminated: The instance was terminated or rebooted during - // AMI creation. - // - // * Client.InternalError: A client error caused the instance to terminate - // during launch. - // - // * Client.InvalidSnapshot.NotFound: The specified snapshot was not found. - // - // * Client.UserInitiatedHibernate: Hibernation was initiated on the instance. - // - // * Client.UserInitiatedShutdown: The instance was shut down using the Amazon - // EC2 API. - // - // * Client.VolumeLimitExceeded: The limit on the number of EBS volumes or - // total storage was exceeded. Decrease usage or request an increase in your - // account limits. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s StateReason) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StateReason) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *StateReason) SetCode(v string) *StateReason { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *StateReason) SetMessage(v string) *StateReason { - s.Message = &v - return s -} - -type StopInstancesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Forces the instances to stop. The instances do not have an opportunity to - // flush file system caches or file system metadata. If you use this option, - // you must perform file system check and repair procedures. This option is - // not recommended for Windows instances. - // - // Default: false - Force *bool `locationName:"force" type:"boolean"` - - // Hibernates the instance if the instance was enabled for hibernation at launch. - // If the instance cannot hibernate successfully, a normal shutdown occurs. - // For more information, see Hibernate Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // Default: false - Hibernate *bool `type:"boolean"` - - // One or more instance IDs. - // - // InstanceIds is a required field - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` -} - -// String returns the string representation -func (s StopInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopInstancesInput"} - if s.InstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *StopInstancesInput) SetDryRun(v bool) *StopInstancesInput { - s.DryRun = &v - return s -} - -// SetForce sets the Force field's value. -func (s *StopInstancesInput) SetForce(v bool) *StopInstancesInput { - s.Force = &v - return s -} - -// SetHibernate sets the Hibernate field's value. -func (s *StopInstancesInput) SetHibernate(v bool) *StopInstancesInput { - s.Hibernate = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *StopInstancesInput) SetInstanceIds(v []*string) *StopInstancesInput { - s.InstanceIds = v - return s -} - -type StopInstancesOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more stopped instances. - StoppingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s StopInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopInstancesOutput) GoString() string { - return s.String() -} - -// SetStoppingInstances sets the StoppingInstances field's value. -func (s *StopInstancesOutput) SetStoppingInstances(v []*InstanceStateChange) *StopInstancesOutput { - s.StoppingInstances = v - return s -} - -// Describes the storage location for an instance store-backed AMI. -type Storage struct { - _ struct{} `type:"structure"` - - // An Amazon S3 storage location. - S3 *S3Storage `type:"structure"` -} - -// String returns the string representation -func (s Storage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Storage) GoString() string { - return s.String() -} - -// SetS3 sets the S3 field's value. -func (s *Storage) SetS3(v *S3Storage) *Storage { - s.S3 = v - return s -} - -// Describes a storage location in Amazon S3. -type StorageLocation struct { - _ struct{} `type:"structure"` - - // The name of the S3 bucket. - Bucket *string `type:"string"` - - // The key. - Key *string `type:"string"` -} - -// String returns the string representation -func (s StorageLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StorageLocation) GoString() string { - return s.String() -} - -// SetBucket sets the Bucket field's value. -func (s *StorageLocation) SetBucket(v string) *StorageLocation { - s.Bucket = &v - return s -} - -// SetKey sets the Key field's value. -func (s *StorageLocation) SetKey(v string) *StorageLocation { - s.Key = &v - return s -} - -// Describes a subnet. -type Subnet struct { - _ struct{} `type:"structure"` - - // Indicates whether a network interface created in this subnet (including a - // network interface created by RunInstances) receives an IPv6 address. - AssignIpv6AddressOnCreation *bool `locationName:"assignIpv6AddressOnCreation" type:"boolean"` - - // The Availability Zone of the subnet. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The AZ ID of the subnet. - AvailabilityZoneId *string `locationName:"availabilityZoneId" type:"string"` - - // The number of unused private IPv4 addresses in the subnet. The IPv4 addresses - // for any stopped instances are considered unavailable. - AvailableIpAddressCount *int64 `locationName:"availableIpAddressCount" type:"integer"` - - // The IPv4 CIDR block assigned to the subnet. - CidrBlock *string `locationName:"cidrBlock" type:"string"` - - // Indicates whether this is the default subnet for the Availability Zone. - DefaultForAz *bool `locationName:"defaultForAz" type:"boolean"` - - // Information about the IPv6 CIDR blocks associated with the subnet. - Ipv6CidrBlockAssociationSet []*SubnetIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociationSet" locationNameList:"item" type:"list"` - - // Indicates whether instances launched in this subnet receive a public IPv4 - // address. - MapPublicIpOnLaunch *bool `locationName:"mapPublicIpOnLaunch" type:"boolean"` - - // The ID of the AWS account that owns the subnet. - OwnerId *string `locationName:"ownerId" type:"string"` - - // The current state of the subnet. - State *string `locationName:"state" type:"string" enum:"SubnetState"` - - // The Amazon Resource Name (ARN) of the subnet. - SubnetArn *string `locationName:"subnetArn" type:"string"` - - // The ID of the subnet. - SubnetId *string `locationName:"subnetId" type:"string"` - - // Any tags assigned to the subnet. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the VPC the subnet is in. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s Subnet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Subnet) GoString() string { - return s.String() -} - -// SetAssignIpv6AddressOnCreation sets the AssignIpv6AddressOnCreation field's value. -func (s *Subnet) SetAssignIpv6AddressOnCreation(v bool) *Subnet { - s.AssignIpv6AddressOnCreation = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Subnet) SetAvailabilityZone(v string) *Subnet { - s.AvailabilityZone = &v - return s -} - -// SetAvailabilityZoneId sets the AvailabilityZoneId field's value. -func (s *Subnet) SetAvailabilityZoneId(v string) *Subnet { - s.AvailabilityZoneId = &v - return s -} - -// SetAvailableIpAddressCount sets the AvailableIpAddressCount field's value. -func (s *Subnet) SetAvailableIpAddressCount(v int64) *Subnet { - s.AvailableIpAddressCount = &v - return s -} - -// SetCidrBlock sets the CidrBlock field's value. -func (s *Subnet) SetCidrBlock(v string) *Subnet { - s.CidrBlock = &v - return s -} - -// SetDefaultForAz sets the DefaultForAz field's value. -func (s *Subnet) SetDefaultForAz(v bool) *Subnet { - s.DefaultForAz = &v - return s -} - -// SetIpv6CidrBlockAssociationSet sets the Ipv6CidrBlockAssociationSet field's value. -func (s *Subnet) SetIpv6CidrBlockAssociationSet(v []*SubnetIpv6CidrBlockAssociation) *Subnet { - s.Ipv6CidrBlockAssociationSet = v - return s -} - -// SetMapPublicIpOnLaunch sets the MapPublicIpOnLaunch field's value. -func (s *Subnet) SetMapPublicIpOnLaunch(v bool) *Subnet { - s.MapPublicIpOnLaunch = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *Subnet) SetOwnerId(v string) *Subnet { - s.OwnerId = &v - return s -} - -// SetState sets the State field's value. -func (s *Subnet) SetState(v string) *Subnet { - s.State = &v - return s -} - -// SetSubnetArn sets the SubnetArn field's value. -func (s *Subnet) SetSubnetArn(v string) *Subnet { - s.SubnetArn = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *Subnet) SetSubnetId(v string) *Subnet { - s.SubnetId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Subnet) SetTags(v []*Tag) *Subnet { - s.Tags = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *Subnet) SetVpcId(v string) *Subnet { - s.VpcId = &v - return s -} - -// Describes the state of a CIDR block. -type SubnetCidrBlockState struct { - _ struct{} `type:"structure"` - - // The state of a CIDR block. - State *string `locationName:"state" type:"string" enum:"SubnetCidrBlockStateCode"` - - // A message about the status of the CIDR block, if applicable. - StatusMessage *string `locationName:"statusMessage" type:"string"` -} - -// String returns the string representation -func (s SubnetCidrBlockState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubnetCidrBlockState) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *SubnetCidrBlockState) SetState(v string) *SubnetCidrBlockState { - s.State = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *SubnetCidrBlockState) SetStatusMessage(v string) *SubnetCidrBlockState { - s.StatusMessage = &v - return s -} - -// Describes an IPv6 CIDR block associated with a subnet. -type SubnetIpv6CidrBlockAssociation struct { - _ struct{} `type:"structure"` - - // The association ID for the CIDR block. - AssociationId *string `locationName:"associationId" type:"string"` - - // The IPv6 CIDR block. - Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` - - // Information about the state of the CIDR block. - Ipv6CidrBlockState *SubnetCidrBlockState `locationName:"ipv6CidrBlockState" type:"structure"` -} - -// String returns the string representation -func (s SubnetIpv6CidrBlockAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubnetIpv6CidrBlockAssociation) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *SubnetIpv6CidrBlockAssociation) SetAssociationId(v string) *SubnetIpv6CidrBlockAssociation { - s.AssociationId = &v - return s -} - -// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. -func (s *SubnetIpv6CidrBlockAssociation) SetIpv6CidrBlock(v string) *SubnetIpv6CidrBlockAssociation { - s.Ipv6CidrBlock = &v - return s -} - -// SetIpv6CidrBlockState sets the Ipv6CidrBlockState field's value. -func (s *SubnetIpv6CidrBlockAssociation) SetIpv6CidrBlockState(v *SubnetCidrBlockState) *SubnetIpv6CidrBlockAssociation { - s.Ipv6CidrBlockState = v - return s -} - -// Describes the T2 or T3 instance whose credit option for CPU usage was successfully -// modified. -type SuccessfulInstanceCreditSpecificationItem struct { - _ struct{} `type:"structure"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` -} - -// String returns the string representation -func (s SuccessfulInstanceCreditSpecificationItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SuccessfulInstanceCreditSpecificationItem) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *SuccessfulInstanceCreditSpecificationItem) SetInstanceId(v string) *SuccessfulInstanceCreditSpecificationItem { - s.InstanceId = &v - return s -} - -// Describes a tag. -type Tag struct { - _ struct{} `type:"structure"` - - // The key of the tag. - // - // Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode - // characters. May not begin with aws:. - Key *string `locationName:"key" type:"string"` - - // The value of the tag. - // - // Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode - // characters. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Describes a tag. -type TagDescription struct { - _ struct{} `type:"structure"` - - // The tag key. - Key *string `locationName:"key" type:"string"` - - // The ID of the resource. - ResourceId *string `locationName:"resourceId" type:"string"` - - // The resource type. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The tag value. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s TagDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagDescription) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *TagDescription) SetKey(v string) *TagDescription { - s.Key = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *TagDescription) SetResourceId(v string) *TagDescription { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TagDescription) SetResourceType(v string) *TagDescription { - s.ResourceType = &v - return s -} - -// SetValue sets the Value field's value. -func (s *TagDescription) SetValue(v string) *TagDescription { - s.Value = &v - return s -} - -// The tags to apply to a resource when the resource is being created. -type TagSpecification struct { - _ struct{} `type:"structure"` - - // The type of resource to tag. Currently, the resource types that support tagging - // on creation are fleet, dedicated-host, instance, snapshot, and volume. To - // tag a resource after it has been created, see CreateTags. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The tags to apply to the resource. - Tags []*Tag `locationName:"Tag" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s TagSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagSpecification) GoString() string { - return s.String() -} - -// SetResourceType sets the ResourceType field's value. -func (s *TagSpecification) SetResourceType(v string) *TagSpecification { - s.ResourceType = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagSpecification) SetTags(v []*Tag) *TagSpecification { - s.Tags = v - return s -} - -// The number of units to request. You can choose to set the target capacity -// in terms of instances or a performance characteristic that is important to -// your application workload, such as vCPUs, memory, or I/O. If the request -// type is maintain, you can specify a target capacity of 0 and add capacity -// later. -type TargetCapacitySpecification struct { - _ struct{} `type:"structure"` - - // The default TotalTargetCapacity, which is either Spot or On-Demand. - DefaultTargetCapacityType *string `locationName:"defaultTargetCapacityType" type:"string" enum:"DefaultTargetCapacityType"` - - // The number of On-Demand units to request. - OnDemandTargetCapacity *int64 `locationName:"onDemandTargetCapacity" type:"integer"` - - // The maximum number of Spot units to launch. - SpotTargetCapacity *int64 `locationName:"spotTargetCapacity" type:"integer"` - - // The number of units to request, filled using DefaultTargetCapacityType. - TotalTargetCapacity *int64 `locationName:"totalTargetCapacity" type:"integer"` -} - -// String returns the string representation -func (s TargetCapacitySpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetCapacitySpecification) GoString() string { - return s.String() -} - -// SetDefaultTargetCapacityType sets the DefaultTargetCapacityType field's value. -func (s *TargetCapacitySpecification) SetDefaultTargetCapacityType(v string) *TargetCapacitySpecification { - s.DefaultTargetCapacityType = &v - return s -} - -// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. -func (s *TargetCapacitySpecification) SetOnDemandTargetCapacity(v int64) *TargetCapacitySpecification { - s.OnDemandTargetCapacity = &v - return s -} - -// SetSpotTargetCapacity sets the SpotTargetCapacity field's value. -func (s *TargetCapacitySpecification) SetSpotTargetCapacity(v int64) *TargetCapacitySpecification { - s.SpotTargetCapacity = &v - return s -} - -// SetTotalTargetCapacity sets the TotalTargetCapacity field's value. -func (s *TargetCapacitySpecification) SetTotalTargetCapacity(v int64) *TargetCapacitySpecification { - s.TotalTargetCapacity = &v - return s -} - -// The number of units to request. You can choose to set the target capacity -// in terms of instances or a performance characteristic that is important to -// your application workload, such as vCPUs, memory, or I/O. If the request -// type is maintain, you can specify a target capacity of 0 and add capacity -// later. -type TargetCapacitySpecificationRequest struct { - _ struct{} `type:"structure"` - - // The default TotalTargetCapacity, which is either Spot or On-Demand. - DefaultTargetCapacityType *string `type:"string" enum:"DefaultTargetCapacityType"` - - // The number of On-Demand units to request. - OnDemandTargetCapacity *int64 `type:"integer"` - - // The number of Spot units to request. - SpotTargetCapacity *int64 `type:"integer"` - - // The number of units to request, filled using DefaultTargetCapacityType. - // - // TotalTargetCapacity is a required field - TotalTargetCapacity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s TargetCapacitySpecificationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetCapacitySpecificationRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetCapacitySpecificationRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetCapacitySpecificationRequest"} - if s.TotalTargetCapacity == nil { - invalidParams.Add(request.NewErrParamRequired("TotalTargetCapacity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultTargetCapacityType sets the DefaultTargetCapacityType field's value. -func (s *TargetCapacitySpecificationRequest) SetDefaultTargetCapacityType(v string) *TargetCapacitySpecificationRequest { - s.DefaultTargetCapacityType = &v - return s -} - -// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. -func (s *TargetCapacitySpecificationRequest) SetOnDemandTargetCapacity(v int64) *TargetCapacitySpecificationRequest { - s.OnDemandTargetCapacity = &v - return s -} - -// SetSpotTargetCapacity sets the SpotTargetCapacity field's value. -func (s *TargetCapacitySpecificationRequest) SetSpotTargetCapacity(v int64) *TargetCapacitySpecificationRequest { - s.SpotTargetCapacity = &v - return s -} - -// SetTotalTargetCapacity sets the TotalTargetCapacity field's value. -func (s *TargetCapacitySpecificationRequest) SetTotalTargetCapacity(v int64) *TargetCapacitySpecificationRequest { - s.TotalTargetCapacity = &v - return s -} - -// Information about the Convertible Reserved Instance offering. -type TargetConfiguration struct { - _ struct{} `type:"structure"` - - // The number of instances the Convertible Reserved Instance offering can be - // applied to. This parameter is reserved and cannot be specified in a request - InstanceCount *int64 `locationName:"instanceCount" type:"integer"` - - // The ID of the Convertible Reserved Instance offering. - OfferingId *string `locationName:"offeringId" type:"string"` -} - -// String returns the string representation -func (s TargetConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetConfiguration) GoString() string { - return s.String() -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *TargetConfiguration) SetInstanceCount(v int64) *TargetConfiguration { - s.InstanceCount = &v - return s -} - -// SetOfferingId sets the OfferingId field's value. -func (s *TargetConfiguration) SetOfferingId(v string) *TargetConfiguration { - s.OfferingId = &v - return s -} - -// Details about the target configuration. -type TargetConfigurationRequest struct { - _ struct{} `type:"structure"` - - // The number of instances the Covertible Reserved Instance offering can be - // applied to. This parameter is reserved and cannot be specified in a request - InstanceCount *int64 `type:"integer"` - - // The Convertible Reserved Instance offering ID. - // - // OfferingId is a required field - OfferingId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s TargetConfigurationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetConfigurationRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetConfigurationRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetConfigurationRequest"} - if s.OfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("OfferingId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *TargetConfigurationRequest) SetInstanceCount(v int64) *TargetConfigurationRequest { - s.InstanceCount = &v - return s -} - -// SetOfferingId sets the OfferingId field's value. -func (s *TargetConfigurationRequest) SetOfferingId(v string) *TargetConfigurationRequest { - s.OfferingId = &v - return s -} - -// Describes a load balancer target group. -type TargetGroup struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. - Arn *string `locationName:"arn" type:"string"` -} - -// String returns the string representation -func (s TargetGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetGroup) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *TargetGroup) SetArn(v string) *TargetGroup { - s.Arn = &v - return s -} - -// Describes the target groups to attach to a Spot Fleet. Spot Fleet registers -// the running Spot Instances with these target groups. -type TargetGroupsConfig struct { - _ struct{} `type:"structure"` - - // One or more target groups. - TargetGroups []*TargetGroup `locationName:"targetGroups" locationNameList:"item" min:"1" type:"list"` -} - -// String returns the string representation -func (s TargetGroupsConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetGroupsConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetGroupsConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetGroupsConfig"} - if s.TargetGroups != nil && len(s.TargetGroups) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetGroups", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetGroups sets the TargetGroups field's value. -func (s *TargetGroupsConfig) SetTargetGroups(v []*TargetGroup) *TargetGroupsConfig { - s.TargetGroups = v - return s -} - -// Describes a target network associated with a Client VPN endpoint. -type TargetNetwork struct { - _ struct{} `type:"structure"` - - // The ID of the association. - AssociationId *string `locationName:"associationId" type:"string"` - - // The ID of the Client VPN endpoint with which the target network is associated. - ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` - - // The IDs of the security groups applied to the target network association. - SecurityGroups []*string `locationName:"securityGroups" locationNameList:"item" type:"list"` - - // The current state of the target network association. - Status *AssociationStatus `locationName:"status" type:"structure"` - - // The ID of the subnet specified as the target network. - TargetNetworkId *string `locationName:"targetNetworkId" type:"string"` - - // The ID of the VPC in which the target network (subnet) is located. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s TargetNetwork) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetNetwork) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *TargetNetwork) SetAssociationId(v string) *TargetNetwork { - s.AssociationId = &v - return s -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *TargetNetwork) SetClientVpnEndpointId(v string) *TargetNetwork { - s.ClientVpnEndpointId = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *TargetNetwork) SetSecurityGroups(v []*string) *TargetNetwork { - s.SecurityGroups = v - return s -} - -// SetStatus sets the Status field's value. -func (s *TargetNetwork) SetStatus(v *AssociationStatus) *TargetNetwork { - s.Status = v - return s -} - -// SetTargetNetworkId sets the TargetNetworkId field's value. -func (s *TargetNetwork) SetTargetNetworkId(v string) *TargetNetwork { - s.TargetNetworkId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *TargetNetwork) SetVpcId(v string) *TargetNetwork { - s.VpcId = &v - return s -} - -// The total value of the new Convertible Reserved Instances. -type TargetReservationValue struct { - _ struct{} `type:"structure"` - - // The total value of the Convertible Reserved Instances that make up the exchange. - // This is the sum of the list value, remaining upfront price, and additional - // upfront cost of the exchange. - ReservationValue *ReservationValue `locationName:"reservationValue" type:"structure"` - - // The configuration of the Convertible Reserved Instances that make up the - // exchange. - TargetConfiguration *TargetConfiguration `locationName:"targetConfiguration" type:"structure"` -} - -// String returns the string representation -func (s TargetReservationValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetReservationValue) GoString() string { - return s.String() -} - -// SetReservationValue sets the ReservationValue field's value. -func (s *TargetReservationValue) SetReservationValue(v *ReservationValue) *TargetReservationValue { - s.ReservationValue = v - return s -} - -// SetTargetConfiguration sets the TargetConfiguration field's value. -func (s *TargetReservationValue) SetTargetConfiguration(v *TargetConfiguration) *TargetReservationValue { - s.TargetConfiguration = v - return s -} - -type TerminateClientVpnConnectionsInput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint to which the client is connected. - // - // ClientVpnEndpointId is a required field - ClientVpnEndpointId *string `type:"string" required:"true"` - - // The ID of the client connection to be terminated. - ConnectionId *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The name of the user who initiated the connection. Use this option to terminate - // all active connections for the specified user. This option can only be used - // if the user has established up to five connections. - Username *string `type:"string"` -} - -// String returns the string representation -func (s TerminateClientVpnConnectionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateClientVpnConnectionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TerminateClientVpnConnectionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TerminateClientVpnConnectionsInput"} - if s.ClientVpnEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *TerminateClientVpnConnectionsInput) SetClientVpnEndpointId(v string) *TerminateClientVpnConnectionsInput { - s.ClientVpnEndpointId = &v - return s -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *TerminateClientVpnConnectionsInput) SetConnectionId(v string) *TerminateClientVpnConnectionsInput { - s.ConnectionId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *TerminateClientVpnConnectionsInput) SetDryRun(v bool) *TerminateClientVpnConnectionsInput { - s.DryRun = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *TerminateClientVpnConnectionsInput) SetUsername(v string) *TerminateClientVpnConnectionsInput { - s.Username = &v - return s -} - -type TerminateClientVpnConnectionsOutput struct { - _ struct{} `type:"structure"` - - // The ID of the Client VPN endpoint. - ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` - - // The current state of the client connections. - ConnectionStatuses []*TerminateConnectionStatus `locationName:"connectionStatuses" locationNameList:"item" type:"list"` - - // The user who established the terminated client connections. - Username *string `locationName:"username" type:"string"` -} - -// String returns the string representation -func (s TerminateClientVpnConnectionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateClientVpnConnectionsOutput) GoString() string { - return s.String() -} - -// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. -func (s *TerminateClientVpnConnectionsOutput) SetClientVpnEndpointId(v string) *TerminateClientVpnConnectionsOutput { - s.ClientVpnEndpointId = &v - return s -} - -// SetConnectionStatuses sets the ConnectionStatuses field's value. -func (s *TerminateClientVpnConnectionsOutput) SetConnectionStatuses(v []*TerminateConnectionStatus) *TerminateClientVpnConnectionsOutput { - s.ConnectionStatuses = v - return s -} - -// SetUsername sets the Username field's value. -func (s *TerminateClientVpnConnectionsOutput) SetUsername(v string) *TerminateClientVpnConnectionsOutput { - s.Username = &v - return s -} - -// Information about a terminated Client VPN endpoint client connection. -type TerminateConnectionStatus struct { - _ struct{} `type:"structure"` - - // The ID of the client connection. - ConnectionId *string `locationName:"connectionId" type:"string"` - - // A message about the status of the client connection, if applicable. - CurrentStatus *ClientVpnConnectionStatus `locationName:"currentStatus" type:"structure"` - - // The state of the client connection. - PreviousStatus *ClientVpnConnectionStatus `locationName:"previousStatus" type:"structure"` -} - -// String returns the string representation -func (s TerminateConnectionStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateConnectionStatus) GoString() string { - return s.String() -} - -// SetConnectionId sets the ConnectionId field's value. -func (s *TerminateConnectionStatus) SetConnectionId(v string) *TerminateConnectionStatus { - s.ConnectionId = &v - return s -} - -// SetCurrentStatus sets the CurrentStatus field's value. -func (s *TerminateConnectionStatus) SetCurrentStatus(v *ClientVpnConnectionStatus) *TerminateConnectionStatus { - s.CurrentStatus = v - return s -} - -// SetPreviousStatus sets the PreviousStatus field's value. -func (s *TerminateConnectionStatus) SetPreviousStatus(v *ClientVpnConnectionStatus) *TerminateConnectionStatus { - s.PreviousStatus = v - return s -} - -type TerminateInstancesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more instance IDs. - // - // Constraints: Up to 1000 instance IDs. We recommend breaking up this request - // into smaller batches. - // - // InstanceIds is a required field - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` -} - -// String returns the string representation -func (s TerminateInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TerminateInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TerminateInstancesInput"} - if s.InstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *TerminateInstancesInput) SetDryRun(v bool) *TerminateInstancesInput { - s.DryRun = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *TerminateInstancesInput) SetInstanceIds(v []*string) *TerminateInstancesInput { - s.InstanceIds = v - return s -} - -type TerminateInstancesOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more terminated instances. - TerminatingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s TerminateInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateInstancesOutput) GoString() string { - return s.String() -} - -// SetTerminatingInstances sets the TerminatingInstances field's value. -func (s *TerminateInstancesOutput) SetTerminatingInstances(v []*InstanceStateChange) *TerminateInstancesOutput { - s.TerminatingInstances = v - return s -} - -// Describes a transit gateway. -type TransitGateway struct { - _ struct{} `type:"structure"` - - // The creation time. - CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` - - // The description of the transit gateway. - Description *string `locationName:"description" type:"string"` - - // The transit gateway options. - Options *TransitGatewayOptions `locationName:"options" type:"structure"` - - // The ID of the AWS account ID that owns the transit gateway. - OwnerId *string `locationName:"ownerId" type:"string"` - - // The state of the transit gateway. - State *string `locationName:"state" type:"string" enum:"TransitGatewayState"` - - // The tags for the transit gateway. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The Amazon Resource Name (ARN) of the transit gateway. - TransitGatewayArn *string `locationName:"transitGatewayArn" type:"string"` - - // The ID of the transit gateway. - TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` -} - -// String returns the string representation -func (s TransitGateway) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGateway) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *TransitGateway) SetCreationTime(v time.Time) *TransitGateway { - s.CreationTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *TransitGateway) SetDescription(v string) *TransitGateway { - s.Description = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *TransitGateway) SetOptions(v *TransitGatewayOptions) *TransitGateway { - s.Options = v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *TransitGateway) SetOwnerId(v string) *TransitGateway { - s.OwnerId = &v - return s -} - -// SetState sets the State field's value. -func (s *TransitGateway) SetState(v string) *TransitGateway { - s.State = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TransitGateway) SetTags(v []*Tag) *TransitGateway { - s.Tags = v - return s -} - -// SetTransitGatewayArn sets the TransitGatewayArn field's value. -func (s *TransitGateway) SetTransitGatewayArn(v string) *TransitGateway { - s.TransitGatewayArn = &v - return s -} - -// SetTransitGatewayId sets the TransitGatewayId field's value. -func (s *TransitGateway) SetTransitGatewayId(v string) *TransitGateway { - s.TransitGatewayId = &v - return s -} - -// Describes an association between a resource attachment and a transit gateway -// route table. -type TransitGatewayAssociation struct { - _ struct{} `type:"structure"` - - // The ID of the resource. - ResourceId *string `locationName:"resourceId" type:"string"` - - // The resource type. - ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` - - // The state of the association. - State *string `locationName:"state" type:"string" enum:"TransitGatewayAssociationState"` - - // The ID of the attachment. - TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` - - // The ID of the transit gateway route table. - TransitGatewayRouteTableId *string `locationName:"transitGatewayRouteTableId" type:"string"` -} - -// String returns the string representation -func (s TransitGatewayAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGatewayAssociation) GoString() string { - return s.String() -} - -// SetResourceId sets the ResourceId field's value. -func (s *TransitGatewayAssociation) SetResourceId(v string) *TransitGatewayAssociation { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TransitGatewayAssociation) SetResourceType(v string) *TransitGatewayAssociation { - s.ResourceType = &v - return s -} - -// SetState sets the State field's value. -func (s *TransitGatewayAssociation) SetState(v string) *TransitGatewayAssociation { - s.State = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *TransitGatewayAssociation) SetTransitGatewayAttachmentId(v string) *TransitGatewayAssociation { - s.TransitGatewayAttachmentId = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *TransitGatewayAssociation) SetTransitGatewayRouteTableId(v string) *TransitGatewayAssociation { - s.TransitGatewayRouteTableId = &v - return s -} - -// Describes an attachment between a resource and a transit gateway. -type TransitGatewayAttachment struct { - _ struct{} `type:"structure"` - - // The association. - Association *TransitGatewayAttachmentAssociation `locationName:"association" type:"structure"` - - // The creation time. - CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` - - // The ID of the resource. - ResourceId *string `locationName:"resourceId" type:"string"` - - // The ID of the AWS account that owns the resource. - ResourceOwnerId *string `locationName:"resourceOwnerId" type:"string"` - - // The resource type. - ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` - - // The attachment state. - State *string `locationName:"state" type:"string" enum:"TransitGatewayAttachmentState"` - - // The tags for the attachment. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the attachment. - TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` - - // The ID of the transit gateway. - TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` - - // The ID of the AWS account that owns the transit gateway. - TransitGatewayOwnerId *string `locationName:"transitGatewayOwnerId" type:"string"` -} - -// String returns the string representation -func (s TransitGatewayAttachment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGatewayAttachment) GoString() string { - return s.String() -} - -// SetAssociation sets the Association field's value. -func (s *TransitGatewayAttachment) SetAssociation(v *TransitGatewayAttachmentAssociation) *TransitGatewayAttachment { - s.Association = v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *TransitGatewayAttachment) SetCreationTime(v time.Time) *TransitGatewayAttachment { - s.CreationTime = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *TransitGatewayAttachment) SetResourceId(v string) *TransitGatewayAttachment { - s.ResourceId = &v - return s -} - -// SetResourceOwnerId sets the ResourceOwnerId field's value. -func (s *TransitGatewayAttachment) SetResourceOwnerId(v string) *TransitGatewayAttachment { - s.ResourceOwnerId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TransitGatewayAttachment) SetResourceType(v string) *TransitGatewayAttachment { - s.ResourceType = &v - return s -} - -// SetState sets the State field's value. -func (s *TransitGatewayAttachment) SetState(v string) *TransitGatewayAttachment { - s.State = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TransitGatewayAttachment) SetTags(v []*Tag) *TransitGatewayAttachment { - s.Tags = v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *TransitGatewayAttachment) SetTransitGatewayAttachmentId(v string) *TransitGatewayAttachment { - s.TransitGatewayAttachmentId = &v - return s -} - -// SetTransitGatewayId sets the TransitGatewayId field's value. -func (s *TransitGatewayAttachment) SetTransitGatewayId(v string) *TransitGatewayAttachment { - s.TransitGatewayId = &v - return s -} - -// SetTransitGatewayOwnerId sets the TransitGatewayOwnerId field's value. -func (s *TransitGatewayAttachment) SetTransitGatewayOwnerId(v string) *TransitGatewayAttachment { - s.TransitGatewayOwnerId = &v - return s -} - -// Describes an association. -type TransitGatewayAttachmentAssociation struct { - _ struct{} `type:"structure"` - - // The state of the association. - State *string `locationName:"state" type:"string" enum:"TransitGatewayAssociationState"` - - // The ID of the route table for the transit gateway. - TransitGatewayRouteTableId *string `locationName:"transitGatewayRouteTableId" type:"string"` -} - -// String returns the string representation -func (s TransitGatewayAttachmentAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGatewayAttachmentAssociation) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *TransitGatewayAttachmentAssociation) SetState(v string) *TransitGatewayAttachmentAssociation { - s.State = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *TransitGatewayAttachmentAssociation) SetTransitGatewayRouteTableId(v string) *TransitGatewayAttachmentAssociation { - s.TransitGatewayRouteTableId = &v - return s -} - -// Describes a propagation route table. -type TransitGatewayAttachmentPropagation struct { - _ struct{} `type:"structure"` - - // The state of the propagation route table. - State *string `locationName:"state" type:"string" enum:"TransitGatewayPropagationState"` - - // The ID of the propagation route table. - TransitGatewayRouteTableId *string `locationName:"transitGatewayRouteTableId" type:"string"` -} - -// String returns the string representation -func (s TransitGatewayAttachmentPropagation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGatewayAttachmentPropagation) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *TransitGatewayAttachmentPropagation) SetState(v string) *TransitGatewayAttachmentPropagation { - s.State = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *TransitGatewayAttachmentPropagation) SetTransitGatewayRouteTableId(v string) *TransitGatewayAttachmentPropagation { - s.TransitGatewayRouteTableId = &v - return s -} - -// Describes the options for a transit gateway. -type TransitGatewayOptions struct { - _ struct{} `type:"structure"` - - // A private Autonomous System Number (ASN) for the Amazon side of a BGP session. - // The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 - // for 32-bit ASNs. - AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` - - // The ID of the default association route table. - AssociationDefaultRouteTableId *string `locationName:"associationDefaultRouteTableId" type:"string"` - - // Indicates whether attachment requests are automatically accepted. - AutoAcceptSharedAttachments *string `locationName:"autoAcceptSharedAttachments" type:"string" enum:"AutoAcceptSharedAttachmentsValue"` - - // Indicates whether resource attachments are automatically associated with - // the default association route table. - DefaultRouteTableAssociation *string `locationName:"defaultRouteTableAssociation" type:"string" enum:"DefaultRouteTableAssociationValue"` - - // Indicates whether resource attachments automatically propagate routes to - // the default propagation route table. - DefaultRouteTablePropagation *string `locationName:"defaultRouteTablePropagation" type:"string" enum:"DefaultRouteTablePropagationValue"` - - // Indicates whether DNS support is enabled. - DnsSupport *string `locationName:"dnsSupport" type:"string" enum:"DnsSupportValue"` - - // The ID of the default propagation route table. - PropagationDefaultRouteTableId *string `locationName:"propagationDefaultRouteTableId" type:"string"` - - // Indicates whether Equal Cost Multipath Protocol support is enabled. - VpnEcmpSupport *string `locationName:"vpnEcmpSupport" type:"string" enum:"VpnEcmpSupportValue"` -} - -// String returns the string representation -func (s TransitGatewayOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGatewayOptions) GoString() string { - return s.String() -} - -// SetAmazonSideAsn sets the AmazonSideAsn field's value. -func (s *TransitGatewayOptions) SetAmazonSideAsn(v int64) *TransitGatewayOptions { - s.AmazonSideAsn = &v - return s -} - -// SetAssociationDefaultRouteTableId sets the AssociationDefaultRouteTableId field's value. -func (s *TransitGatewayOptions) SetAssociationDefaultRouteTableId(v string) *TransitGatewayOptions { - s.AssociationDefaultRouteTableId = &v - return s -} - -// SetAutoAcceptSharedAttachments sets the AutoAcceptSharedAttachments field's value. -func (s *TransitGatewayOptions) SetAutoAcceptSharedAttachments(v string) *TransitGatewayOptions { - s.AutoAcceptSharedAttachments = &v - return s -} - -// SetDefaultRouteTableAssociation sets the DefaultRouteTableAssociation field's value. -func (s *TransitGatewayOptions) SetDefaultRouteTableAssociation(v string) *TransitGatewayOptions { - s.DefaultRouteTableAssociation = &v - return s -} - -// SetDefaultRouteTablePropagation sets the DefaultRouteTablePropagation field's value. -func (s *TransitGatewayOptions) SetDefaultRouteTablePropagation(v string) *TransitGatewayOptions { - s.DefaultRouteTablePropagation = &v - return s -} - -// SetDnsSupport sets the DnsSupport field's value. -func (s *TransitGatewayOptions) SetDnsSupport(v string) *TransitGatewayOptions { - s.DnsSupport = &v - return s -} - -// SetPropagationDefaultRouteTableId sets the PropagationDefaultRouteTableId field's value. -func (s *TransitGatewayOptions) SetPropagationDefaultRouteTableId(v string) *TransitGatewayOptions { - s.PropagationDefaultRouteTableId = &v - return s -} - -// SetVpnEcmpSupport sets the VpnEcmpSupport field's value. -func (s *TransitGatewayOptions) SetVpnEcmpSupport(v string) *TransitGatewayOptions { - s.VpnEcmpSupport = &v - return s -} - -// Describes route propagation. -type TransitGatewayPropagation struct { - _ struct{} `type:"structure"` - - // The ID of the resource. - ResourceId *string `locationName:"resourceId" type:"string"` - - // The resource type. - ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` - - // The state. - State *string `locationName:"state" type:"string" enum:"TransitGatewayPropagationState"` - - // The ID of the attachment. - TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` - - // The ID of the transit gateway route table. - TransitGatewayRouteTableId *string `locationName:"transitGatewayRouteTableId" type:"string"` -} - -// String returns the string representation -func (s TransitGatewayPropagation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGatewayPropagation) GoString() string { - return s.String() -} - -// SetResourceId sets the ResourceId field's value. -func (s *TransitGatewayPropagation) SetResourceId(v string) *TransitGatewayPropagation { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TransitGatewayPropagation) SetResourceType(v string) *TransitGatewayPropagation { - s.ResourceType = &v - return s -} - -// SetState sets the State field's value. -func (s *TransitGatewayPropagation) SetState(v string) *TransitGatewayPropagation { - s.State = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *TransitGatewayPropagation) SetTransitGatewayAttachmentId(v string) *TransitGatewayPropagation { - s.TransitGatewayAttachmentId = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *TransitGatewayPropagation) SetTransitGatewayRouteTableId(v string) *TransitGatewayPropagation { - s.TransitGatewayRouteTableId = &v - return s -} - -// Describes the options for a transit gateway. -type TransitGatewayRequestOptions struct { - _ struct{} `type:"structure"` - - // A private Autonomous System Number (ASN) for the Amazon side of a BGP session. - // The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 - // for 32-bit ASNs. - AmazonSideAsn *int64 `type:"long"` - - // Enable or disable automatic acceptance of attachment requests. The default - // is disable. - AutoAcceptSharedAttachments *string `type:"string" enum:"AutoAcceptSharedAttachmentsValue"` - - // Enable or disable automatic association with the default association route - // table. The default is enable. - DefaultRouteTableAssociation *string `type:"string" enum:"DefaultRouteTableAssociationValue"` - - // Enable or disable automatic propagation of routes to the default propagation - // route table. The default is enable. - DefaultRouteTablePropagation *string `type:"string" enum:"DefaultRouteTablePropagationValue"` - - // Enable or disable DNS support. - DnsSupport *string `type:"string" enum:"DnsSupportValue"` - - // Enable or disable Equal Cost Multipath Protocol support. - VpnEcmpSupport *string `type:"string" enum:"VpnEcmpSupportValue"` -} - -// String returns the string representation -func (s TransitGatewayRequestOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGatewayRequestOptions) GoString() string { - return s.String() -} - -// SetAmazonSideAsn sets the AmazonSideAsn field's value. -func (s *TransitGatewayRequestOptions) SetAmazonSideAsn(v int64) *TransitGatewayRequestOptions { - s.AmazonSideAsn = &v - return s -} - -// SetAutoAcceptSharedAttachments sets the AutoAcceptSharedAttachments field's value. -func (s *TransitGatewayRequestOptions) SetAutoAcceptSharedAttachments(v string) *TransitGatewayRequestOptions { - s.AutoAcceptSharedAttachments = &v - return s -} - -// SetDefaultRouteTableAssociation sets the DefaultRouteTableAssociation field's value. -func (s *TransitGatewayRequestOptions) SetDefaultRouteTableAssociation(v string) *TransitGatewayRequestOptions { - s.DefaultRouteTableAssociation = &v - return s -} - -// SetDefaultRouteTablePropagation sets the DefaultRouteTablePropagation field's value. -func (s *TransitGatewayRequestOptions) SetDefaultRouteTablePropagation(v string) *TransitGatewayRequestOptions { - s.DefaultRouteTablePropagation = &v - return s -} - -// SetDnsSupport sets the DnsSupport field's value. -func (s *TransitGatewayRequestOptions) SetDnsSupport(v string) *TransitGatewayRequestOptions { - s.DnsSupport = &v - return s -} - -// SetVpnEcmpSupport sets the VpnEcmpSupport field's value. -func (s *TransitGatewayRequestOptions) SetVpnEcmpSupport(v string) *TransitGatewayRequestOptions { - s.VpnEcmpSupport = &v - return s -} - -// Describes a route for a transit gateway route table. -type TransitGatewayRoute struct { - _ struct{} `type:"structure"` - - // The CIDR block used for destination matches. - DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` - - // The state of the route. - State *string `locationName:"state" type:"string" enum:"TransitGatewayRouteState"` - - // The attachments. - TransitGatewayAttachments []*TransitGatewayRouteAttachment `locationName:"transitGatewayAttachments" locationNameList:"item" type:"list"` - - // The route type. - Type *string `locationName:"type" type:"string" enum:"TransitGatewayRouteType"` -} - -// String returns the string representation -func (s TransitGatewayRoute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGatewayRoute) GoString() string { - return s.String() -} - -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *TransitGatewayRoute) SetDestinationCidrBlock(v string) *TransitGatewayRoute { - s.DestinationCidrBlock = &v - return s -} - -// SetState sets the State field's value. -func (s *TransitGatewayRoute) SetState(v string) *TransitGatewayRoute { - s.State = &v - return s -} - -// SetTransitGatewayAttachments sets the TransitGatewayAttachments field's value. -func (s *TransitGatewayRoute) SetTransitGatewayAttachments(v []*TransitGatewayRouteAttachment) *TransitGatewayRoute { - s.TransitGatewayAttachments = v - return s -} - -// SetType sets the Type field's value. -func (s *TransitGatewayRoute) SetType(v string) *TransitGatewayRoute { - s.Type = &v - return s -} - -// Describes a route attachment. -type TransitGatewayRouteAttachment struct { - _ struct{} `type:"structure"` - - // The ID of the resource. - ResourceId *string `locationName:"resourceId" type:"string"` - - // The resource type. - ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` - - // The ID of the attachment. - TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` -} - -// String returns the string representation -func (s TransitGatewayRouteAttachment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGatewayRouteAttachment) GoString() string { - return s.String() -} - -// SetResourceId sets the ResourceId field's value. -func (s *TransitGatewayRouteAttachment) SetResourceId(v string) *TransitGatewayRouteAttachment { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TransitGatewayRouteAttachment) SetResourceType(v string) *TransitGatewayRouteAttachment { - s.ResourceType = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *TransitGatewayRouteAttachment) SetTransitGatewayAttachmentId(v string) *TransitGatewayRouteAttachment { - s.TransitGatewayAttachmentId = &v - return s -} - -// Describes a transit gateway route table. -type TransitGatewayRouteTable struct { - _ struct{} `type:"structure"` - - // The creation time. - CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` - - // Indicates whether this is the default association route table for the transit - // gateway. - DefaultAssociationRouteTable *bool `locationName:"defaultAssociationRouteTable" type:"boolean"` - - // Indicates whether this is the default propagation route table for the transit - // gateway. - DefaultPropagationRouteTable *bool `locationName:"defaultPropagationRouteTable" type:"boolean"` - - // The state of the transit gateway route table. - State *string `locationName:"state" type:"string" enum:"TransitGatewayRouteTableState"` - - // Any tags assigned to the route table. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the transit gateway. - TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` - - // The ID of the transit gateway route table. - TransitGatewayRouteTableId *string `locationName:"transitGatewayRouteTableId" type:"string"` -} - -// String returns the string representation -func (s TransitGatewayRouteTable) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGatewayRouteTable) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *TransitGatewayRouteTable) SetCreationTime(v time.Time) *TransitGatewayRouteTable { - s.CreationTime = &v - return s -} - -// SetDefaultAssociationRouteTable sets the DefaultAssociationRouteTable field's value. -func (s *TransitGatewayRouteTable) SetDefaultAssociationRouteTable(v bool) *TransitGatewayRouteTable { - s.DefaultAssociationRouteTable = &v - return s -} - -// SetDefaultPropagationRouteTable sets the DefaultPropagationRouteTable field's value. -func (s *TransitGatewayRouteTable) SetDefaultPropagationRouteTable(v bool) *TransitGatewayRouteTable { - s.DefaultPropagationRouteTable = &v - return s -} - -// SetState sets the State field's value. -func (s *TransitGatewayRouteTable) SetState(v string) *TransitGatewayRouteTable { - s.State = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TransitGatewayRouteTable) SetTags(v []*Tag) *TransitGatewayRouteTable { - s.Tags = v - return s -} - -// SetTransitGatewayId sets the TransitGatewayId field's value. -func (s *TransitGatewayRouteTable) SetTransitGatewayId(v string) *TransitGatewayRouteTable { - s.TransitGatewayId = &v - return s -} - -// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. -func (s *TransitGatewayRouteTable) SetTransitGatewayRouteTableId(v string) *TransitGatewayRouteTable { - s.TransitGatewayRouteTableId = &v - return s -} - -// Describes an association between a route table and a resource attachment. -type TransitGatewayRouteTableAssociation struct { - _ struct{} `type:"structure"` - - // The ID of the resource. - ResourceId *string `locationName:"resourceId" type:"string"` - - // The resource type. - ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` - - // The state of the association. - State *string `locationName:"state" type:"string" enum:"TransitGatewayAssociationState"` - - // The ID of the attachment. - TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` -} - -// String returns the string representation -func (s TransitGatewayRouteTableAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGatewayRouteTableAssociation) GoString() string { - return s.String() -} - -// SetResourceId sets the ResourceId field's value. -func (s *TransitGatewayRouteTableAssociation) SetResourceId(v string) *TransitGatewayRouteTableAssociation { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TransitGatewayRouteTableAssociation) SetResourceType(v string) *TransitGatewayRouteTableAssociation { - s.ResourceType = &v - return s -} - -// SetState sets the State field's value. -func (s *TransitGatewayRouteTableAssociation) SetState(v string) *TransitGatewayRouteTableAssociation { - s.State = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *TransitGatewayRouteTableAssociation) SetTransitGatewayAttachmentId(v string) *TransitGatewayRouteTableAssociation { - s.TransitGatewayAttachmentId = &v - return s -} - -// Describes a route table propagation. -type TransitGatewayRouteTablePropagation struct { - _ struct{} `type:"structure"` - - // The ID of the resource. - ResourceId *string `locationName:"resourceId" type:"string"` - - // The type of resource. - ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` - - // The state of the resource. - State *string `locationName:"state" type:"string" enum:"TransitGatewayPropagationState"` - - // The ID of the attachment. - TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` -} - -// String returns the string representation -func (s TransitGatewayRouteTablePropagation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGatewayRouteTablePropagation) GoString() string { - return s.String() -} - -// SetResourceId sets the ResourceId field's value. -func (s *TransitGatewayRouteTablePropagation) SetResourceId(v string) *TransitGatewayRouteTablePropagation { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TransitGatewayRouteTablePropagation) SetResourceType(v string) *TransitGatewayRouteTablePropagation { - s.ResourceType = &v - return s -} - -// SetState sets the State field's value. -func (s *TransitGatewayRouteTablePropagation) SetState(v string) *TransitGatewayRouteTablePropagation { - s.State = &v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *TransitGatewayRouteTablePropagation) SetTransitGatewayAttachmentId(v string) *TransitGatewayRouteTablePropagation { - s.TransitGatewayAttachmentId = &v - return s -} - -// Describes a VPC attachment. -type TransitGatewayVpcAttachment struct { - _ struct{} `type:"structure"` - - // The creation time. - CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` - - // The VPC attachment options. - Options *TransitGatewayVpcAttachmentOptions `locationName:"options" type:"structure"` - - // The state of the VPC attachment. - State *string `locationName:"state" type:"string" enum:"TransitGatewayAttachmentState"` - - // The IDs of the subnets. - SubnetIds []*string `locationName:"subnetIds" locationNameList:"item" type:"list"` - - // The tags for the VPC attachment. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the attachment. - TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` - - // The ID of the transit gateway. - TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` - - // The ID of the AWS account that owns the VPC. - VpcOwnerId *string `locationName:"vpcOwnerId" type:"string"` -} - -// String returns the string representation -func (s TransitGatewayVpcAttachment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGatewayVpcAttachment) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *TransitGatewayVpcAttachment) SetCreationTime(v time.Time) *TransitGatewayVpcAttachment { - s.CreationTime = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *TransitGatewayVpcAttachment) SetOptions(v *TransitGatewayVpcAttachmentOptions) *TransitGatewayVpcAttachment { - s.Options = v - return s -} - -// SetState sets the State field's value. -func (s *TransitGatewayVpcAttachment) SetState(v string) *TransitGatewayVpcAttachment { - s.State = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *TransitGatewayVpcAttachment) SetSubnetIds(v []*string) *TransitGatewayVpcAttachment { - s.SubnetIds = v - return s -} - -// SetTags sets the Tags field's value. -func (s *TransitGatewayVpcAttachment) SetTags(v []*Tag) *TransitGatewayVpcAttachment { - s.Tags = v - return s -} - -// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. -func (s *TransitGatewayVpcAttachment) SetTransitGatewayAttachmentId(v string) *TransitGatewayVpcAttachment { - s.TransitGatewayAttachmentId = &v - return s -} - -// SetTransitGatewayId sets the TransitGatewayId field's value. -func (s *TransitGatewayVpcAttachment) SetTransitGatewayId(v string) *TransitGatewayVpcAttachment { - s.TransitGatewayId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *TransitGatewayVpcAttachment) SetVpcId(v string) *TransitGatewayVpcAttachment { - s.VpcId = &v - return s -} - -// SetVpcOwnerId sets the VpcOwnerId field's value. -func (s *TransitGatewayVpcAttachment) SetVpcOwnerId(v string) *TransitGatewayVpcAttachment { - s.VpcOwnerId = &v - return s -} - -// Describes the VPC attachment options. -type TransitGatewayVpcAttachmentOptions struct { - _ struct{} `type:"structure"` - - // Indicates whether DNS support is enabled. - DnsSupport *string `locationName:"dnsSupport" type:"string" enum:"DnsSupportValue"` - - // Indicates whether IPv6 support is enabled. - Ipv6Support *string `locationName:"ipv6Support" type:"string" enum:"Ipv6SupportValue"` -} - -// String returns the string representation -func (s TransitGatewayVpcAttachmentOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransitGatewayVpcAttachmentOptions) GoString() string { - return s.String() -} - -// SetDnsSupport sets the DnsSupport field's value. -func (s *TransitGatewayVpcAttachmentOptions) SetDnsSupport(v string) *TransitGatewayVpcAttachmentOptions { - s.DnsSupport = &v - return s -} - -// SetIpv6Support sets the Ipv6Support field's value. -func (s *TransitGatewayVpcAttachmentOptions) SetIpv6Support(v string) *TransitGatewayVpcAttachmentOptions { - s.Ipv6Support = &v - return s -} - -type UnassignIpv6AddressesInput struct { - _ struct{} `type:"structure"` - - // The IPv6 addresses to unassign from the network interface. - // - // Ipv6Addresses is a required field - Ipv6Addresses []*string `locationName:"ipv6Addresses" locationNameList:"item" type:"list" required:"true"` - - // The ID of the network interface. - // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` -} - -// String returns the string representation -func (s UnassignIpv6AddressesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnassignIpv6AddressesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UnassignIpv6AddressesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UnassignIpv6AddressesInput"} - if s.Ipv6Addresses == nil { - invalidParams.Add(request.NewErrParamRequired("Ipv6Addresses")) - } - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *UnassignIpv6AddressesInput) SetIpv6Addresses(v []*string) *UnassignIpv6AddressesInput { - s.Ipv6Addresses = v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *UnassignIpv6AddressesInput) SetNetworkInterfaceId(v string) *UnassignIpv6AddressesInput { - s.NetworkInterfaceId = &v - return s -} - -type UnassignIpv6AddressesOutput struct { - _ struct{} `type:"structure"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // The IPv6 addresses that have been unassigned from the network interface. - UnassignedIpv6Addresses []*string `locationName:"unassignedIpv6Addresses" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s UnassignIpv6AddressesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnassignIpv6AddressesOutput) GoString() string { - return s.String() -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *UnassignIpv6AddressesOutput) SetNetworkInterfaceId(v string) *UnassignIpv6AddressesOutput { - s.NetworkInterfaceId = &v - return s -} - -// SetUnassignedIpv6Addresses sets the UnassignedIpv6Addresses field's value. -func (s *UnassignIpv6AddressesOutput) SetUnassignedIpv6Addresses(v []*string) *UnassignIpv6AddressesOutput { - s.UnassignedIpv6Addresses = v - return s -} - -// Contains the parameters for UnassignPrivateIpAddresses. -type UnassignPrivateIpAddressesInput struct { - _ struct{} `type:"structure"` - - // The ID of the network interface. - // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` - - // The secondary private IP addresses to unassign from the network interface. - // You can specify this option multiple times to unassign more than one IP address. - // - // PrivateIpAddresses is a required field - PrivateIpAddresses []*string `locationName:"privateIpAddress" locationNameList:"PrivateIpAddress" type:"list" required:"true"` -} - -// String returns the string representation -func (s UnassignPrivateIpAddressesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnassignPrivateIpAddressesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UnassignPrivateIpAddressesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UnassignPrivateIpAddressesInput"} - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - if s.PrivateIpAddresses == nil { - invalidParams.Add(request.NewErrParamRequired("PrivateIpAddresses")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *UnassignPrivateIpAddressesInput) SetNetworkInterfaceId(v string) *UnassignPrivateIpAddressesInput { - s.NetworkInterfaceId = &v - return s -} - -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *UnassignPrivateIpAddressesInput) SetPrivateIpAddresses(v []*string) *UnassignPrivateIpAddressesInput { - s.PrivateIpAddresses = v - return s -} - -type UnassignPrivateIpAddressesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UnassignPrivateIpAddressesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnassignPrivateIpAddressesOutput) GoString() string { - return s.String() -} - -type UnmonitorInstancesInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more instance IDs. - // - // InstanceIds is a required field - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` -} - -// String returns the string representation -func (s UnmonitorInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnmonitorInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UnmonitorInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UnmonitorInstancesInput"} - if s.InstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *UnmonitorInstancesInput) SetDryRun(v bool) *UnmonitorInstancesInput { - s.DryRun = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *UnmonitorInstancesInput) SetInstanceIds(v []*string) *UnmonitorInstancesInput { - s.InstanceIds = v - return s -} - -type UnmonitorInstancesOutput struct { - _ struct{} `type:"structure"` - - // The monitoring information. - InstanceMonitorings []*InstanceMonitoring `locationName:"instancesSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s UnmonitorInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnmonitorInstancesOutput) GoString() string { - return s.String() -} - -// SetInstanceMonitorings sets the InstanceMonitorings field's value. -func (s *UnmonitorInstancesOutput) SetInstanceMonitorings(v []*InstanceMonitoring) *UnmonitorInstancesOutput { - s.InstanceMonitorings = v - return s -} - -// Describes the T2 or T3 instance whose credit option for CPU usage was not -// modified. -type UnsuccessfulInstanceCreditSpecificationItem struct { - _ struct{} `type:"structure"` - - // The applicable error for the T2 or T3 instance whose credit option for CPU - // usage was not modified. - Error *UnsuccessfulInstanceCreditSpecificationItemError `locationName:"error" type:"structure"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` -} - -// String returns the string representation -func (s UnsuccessfulInstanceCreditSpecificationItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnsuccessfulInstanceCreditSpecificationItem) GoString() string { - return s.String() -} - -// SetError sets the Error field's value. -func (s *UnsuccessfulInstanceCreditSpecificationItem) SetError(v *UnsuccessfulInstanceCreditSpecificationItemError) *UnsuccessfulInstanceCreditSpecificationItem { - s.Error = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *UnsuccessfulInstanceCreditSpecificationItem) SetInstanceId(v string) *UnsuccessfulInstanceCreditSpecificationItem { - s.InstanceId = &v - return s -} - -// Information about the error for the T2 or T3 instance whose credit option -// for CPU usage was not modified. -type UnsuccessfulInstanceCreditSpecificationItemError struct { - _ struct{} `type:"structure"` - - // The error code. - Code *string `locationName:"code" type:"string" enum:"UnsuccessfulInstanceCreditSpecificationErrorCode"` - - // The applicable error message. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s UnsuccessfulInstanceCreditSpecificationItemError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnsuccessfulInstanceCreditSpecificationItemError) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *UnsuccessfulInstanceCreditSpecificationItemError) SetCode(v string) *UnsuccessfulInstanceCreditSpecificationItemError { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *UnsuccessfulInstanceCreditSpecificationItemError) SetMessage(v string) *UnsuccessfulInstanceCreditSpecificationItemError { - s.Message = &v - return s -} - -// Information about items that were not successfully processed in a batch call. -type UnsuccessfulItem struct { - _ struct{} `type:"structure"` - - // Information about the error. - Error *UnsuccessfulItemError `locationName:"error" type:"structure"` - - // The ID of the resource. - ResourceId *string `locationName:"resourceId" type:"string"` -} - -// String returns the string representation -func (s UnsuccessfulItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnsuccessfulItem) GoString() string { - return s.String() -} - -// SetError sets the Error field's value. -func (s *UnsuccessfulItem) SetError(v *UnsuccessfulItemError) *UnsuccessfulItem { - s.Error = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *UnsuccessfulItem) SetResourceId(v string) *UnsuccessfulItem { - s.ResourceId = &v - return s -} - -// Information about the error that occurred. For more information about errors, -// see Error Codes (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html). -type UnsuccessfulItemError struct { - _ struct{} `type:"structure"` - - // The error code. - Code *string `locationName:"code" type:"string"` - - // The error message accompanying the error code. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s UnsuccessfulItemError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnsuccessfulItemError) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *UnsuccessfulItemError) SetCode(v string) *UnsuccessfulItemError { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *UnsuccessfulItemError) SetMessage(v string) *UnsuccessfulItemError { - s.Message = &v - return s -} - -type UpdateSecurityGroupRuleDescriptionsEgressInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the security group. You must specify either the security group - // ID or the security group name in the request. For security groups in a nondefault - // VPC, you must specify the security group ID. - GroupId *string `type:"string"` - - // [Default VPC] The name of the security group. You must specify either the - // security group ID or the security group name in the request. - GroupName *string `type:"string"` - - // The IP permissions for the security group rule. - // - // IpPermissions is a required field - IpPermissions []*IpPermission `locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateSecurityGroupRuleDescriptionsEgressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSecurityGroupRuleDescriptionsEgressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSecurityGroupRuleDescriptionsEgressInput"} - if s.IpPermissions == nil { - invalidParams.Add(request.NewErrParamRequired("IpPermissions")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) SetDryRun(v bool) *UpdateSecurityGroupRuleDescriptionsEgressInput { - s.DryRun = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) SetGroupId(v string) *UpdateSecurityGroupRuleDescriptionsEgressInput { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) SetGroupName(v string) *UpdateSecurityGroupRuleDescriptionsEgressInput { - s.GroupName = &v - return s -} - -// SetIpPermissions sets the IpPermissions field's value. -func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) SetIpPermissions(v []*IpPermission) *UpdateSecurityGroupRuleDescriptionsEgressInput { - s.IpPermissions = v - return s -} - -type UpdateSecurityGroupRuleDescriptionsEgressOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s UpdateSecurityGroupRuleDescriptionsEgressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSecurityGroupRuleDescriptionsEgressOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *UpdateSecurityGroupRuleDescriptionsEgressOutput) SetReturn(v bool) *UpdateSecurityGroupRuleDescriptionsEgressOutput { - s.Return = &v - return s -} - -type UpdateSecurityGroupRuleDescriptionsIngressInput struct { - _ struct{} `type:"structure"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The ID of the security group. You must specify either the security group - // ID or the security group name in the request. For security groups in a nondefault - // VPC, you must specify the security group ID. - GroupId *string `type:"string"` - - // [EC2-Classic, default VPC] The name of the security group. You must specify - // either the security group ID or the security group name in the request. - GroupName *string `type:"string"` - - // The IP permissions for the security group rule. - // - // IpPermissions is a required field - IpPermissions []*IpPermission `locationNameList:"item" type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateSecurityGroupRuleDescriptionsIngressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSecurityGroupRuleDescriptionsIngressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSecurityGroupRuleDescriptionsIngressInput"} - if s.IpPermissions == nil { - invalidParams.Add(request.NewErrParamRequired("IpPermissions")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) SetDryRun(v bool) *UpdateSecurityGroupRuleDescriptionsIngressInput { - s.DryRun = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) SetGroupId(v string) *UpdateSecurityGroupRuleDescriptionsIngressInput { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) SetGroupName(v string) *UpdateSecurityGroupRuleDescriptionsIngressInput { - s.GroupName = &v - return s -} - -// SetIpPermissions sets the IpPermissions field's value. -func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) SetIpPermissions(v []*IpPermission) *UpdateSecurityGroupRuleDescriptionsIngressInput { - s.IpPermissions = v - return s -} - -type UpdateSecurityGroupRuleDescriptionsIngressOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, returns an error. - Return *bool `locationName:"return" type:"boolean"` -} - -// String returns the string representation -func (s UpdateSecurityGroupRuleDescriptionsIngressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSecurityGroupRuleDescriptionsIngressOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *UpdateSecurityGroupRuleDescriptionsIngressOutput) SetReturn(v bool) *UpdateSecurityGroupRuleDescriptionsIngressOutput { - s.Return = &v - return s -} - -// Describes the S3 bucket for the disk image. -type UserBucket struct { - _ struct{} `type:"structure"` - - // The name of the S3 bucket where the disk image is located. - S3Bucket *string `type:"string"` - - // The file name of the disk image. - S3Key *string `type:"string"` -} - -// String returns the string representation -func (s UserBucket) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserBucket) GoString() string { - return s.String() -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *UserBucket) SetS3Bucket(v string) *UserBucket { - s.S3Bucket = &v - return s -} - -// SetS3Key sets the S3Key field's value. -func (s *UserBucket) SetS3Key(v string) *UserBucket { - s.S3Key = &v - return s -} - -// Describes the S3 bucket for the disk image. -type UserBucketDetails struct { - _ struct{} `type:"structure"` - - // The S3 bucket from which the disk image was created. - S3Bucket *string `locationName:"s3Bucket" type:"string"` - - // The file name of the disk image. - S3Key *string `locationName:"s3Key" type:"string"` -} - -// String returns the string representation -func (s UserBucketDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserBucketDetails) GoString() string { - return s.String() -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *UserBucketDetails) SetS3Bucket(v string) *UserBucketDetails { - s.S3Bucket = &v - return s -} - -// SetS3Key sets the S3Key field's value. -func (s *UserBucketDetails) SetS3Key(v string) *UserBucketDetails { - s.S3Key = &v - return s -} - -// Describes the user data for an instance. -type UserData struct { - _ struct{} `type:"structure"` - - // The user data. If you are using an AWS SDK or command line tool, Base64-encoding - // is performed for you, and you can load the text from a file. Otherwise, you - // must provide Base64-encoded text. - Data *string `locationName:"data" type:"string"` -} - -// String returns the string representation -func (s UserData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserData) GoString() string { - return s.String() -} - -// SetData sets the Data field's value. -func (s *UserData) SetData(v string) *UserData { - s.Data = &v - return s -} - -// Describes a security group and AWS account ID pair. -type UserIdGroupPair struct { - _ struct{} `type:"structure"` - - // A description for the security group rule that references this user ID group - // pair. - // - // Constraints: Up to 255 characters in length. Allowed characters are a-z, - // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$* - Description *string `locationName:"description" type:"string"` - - // The ID of the security group. - GroupId *string `locationName:"groupId" type:"string"` - - // The name of the security group. In a request, use this parameter for a security - // group in EC2-Classic or a default VPC only. For a security group in a nondefault - // VPC, use the security group ID. - // - // For a referenced security group in another VPC, this value is not returned - // if the referenced security group is deleted. - GroupName *string `locationName:"groupName" type:"string"` - - // The status of a VPC peering connection, if applicable. - PeeringStatus *string `locationName:"peeringStatus" type:"string"` - - // The ID of an AWS account. - // - // For a referenced security group in another VPC, the account ID of the referenced - // security group is returned in the response. If the referenced security group - // is deleted, this value is not returned. - // - // [EC2-Classic] Required when adding or removing rules that reference a security - // group in another AWS account. - UserId *string `locationName:"userId" type:"string"` - - // The ID of the VPC for the referenced security group, if applicable. - VpcId *string `locationName:"vpcId" type:"string"` - - // The ID of the VPC peering connection, if applicable. - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` -} - -// String returns the string representation -func (s UserIdGroupPair) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserIdGroupPair) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *UserIdGroupPair) SetDescription(v string) *UserIdGroupPair { - s.Description = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *UserIdGroupPair) SetGroupId(v string) *UserIdGroupPair { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *UserIdGroupPair) SetGroupName(v string) *UserIdGroupPair { - s.GroupName = &v - return s -} - -// SetPeeringStatus sets the PeeringStatus field's value. -func (s *UserIdGroupPair) SetPeeringStatus(v string) *UserIdGroupPair { - s.PeeringStatus = &v - return s -} - -// SetUserId sets the UserId field's value. -func (s *UserIdGroupPair) SetUserId(v string) *UserIdGroupPair { - s.UserId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *UserIdGroupPair) SetVpcId(v string) *UserIdGroupPair { - s.VpcId = &v - return s -} - -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *UserIdGroupPair) SetVpcPeeringConnectionId(v string) *UserIdGroupPair { - s.VpcPeeringConnectionId = &v - return s -} - -// Describes telemetry for a VPN tunnel. -type VgwTelemetry struct { - _ struct{} `type:"structure"` - - // The number of accepted routes. - AcceptedRouteCount *int64 `locationName:"acceptedRouteCount" type:"integer"` - - // The date and time of the last change in status. - LastStatusChange *time.Time `locationName:"lastStatusChange" type:"timestamp"` - - // The Internet-routable IP address of the virtual private gateway's outside - // interface. - OutsideIpAddress *string `locationName:"outsideIpAddress" type:"string"` - - // The status of the VPN tunnel. - Status *string `locationName:"status" type:"string" enum:"TelemetryStatus"` - - // If an error occurs, a description of the error. - StatusMessage *string `locationName:"statusMessage" type:"string"` -} - -// String returns the string representation -func (s VgwTelemetry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VgwTelemetry) GoString() string { - return s.String() -} - -// SetAcceptedRouteCount sets the AcceptedRouteCount field's value. -func (s *VgwTelemetry) SetAcceptedRouteCount(v int64) *VgwTelemetry { - s.AcceptedRouteCount = &v - return s -} - -// SetLastStatusChange sets the LastStatusChange field's value. -func (s *VgwTelemetry) SetLastStatusChange(v time.Time) *VgwTelemetry { - s.LastStatusChange = &v - return s -} - -// SetOutsideIpAddress sets the OutsideIpAddress field's value. -func (s *VgwTelemetry) SetOutsideIpAddress(v string) *VgwTelemetry { - s.OutsideIpAddress = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *VgwTelemetry) SetStatus(v string) *VgwTelemetry { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *VgwTelemetry) SetStatusMessage(v string) *VgwTelemetry { - s.StatusMessage = &v - return s -} - -// Describes a volume. -type Volume struct { - _ struct{} `type:"structure"` - - // Information about the volume attachments. - Attachments []*VolumeAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"` - - // The Availability Zone for the volume. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The time stamp when volume creation was initiated. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - - // Indicates whether the volume will be encrypted. - Encrypted *bool `locationName:"encrypted" type:"boolean"` - - // The number of I/O operations per second (IOPS) that the volume supports. - // For Provisioned IOPS SSD volumes, this represents the number of IOPS that - // are provisioned for the volume. For General Purpose SSD volumes, this represents - // the baseline performance of the volume and the rate at which the volume accumulates - // I/O credits for bursting. For more information about General Purpose SSD - // baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // Constraints: Range is 100-16,000 IOPS for gp2 volumes and 100 to 64,000IOPS - // for io1 volumes in most regions. Maximum io1IOPS of 64,000 is guaranteed - // only on Nitro-based instances (AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). - // Other instance families guarantee performance up to 32,000 IOPS. For more - // information, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // Condition: This parameter is required for requests to create io1 volumes; - // it is not used in requests to create gp2, st1, sc1, or standard volumes. - Iops *int64 `locationName:"iops" type:"integer"` - - // The full ARN of the AWS Key Management Service (AWS KMS) customer master - // key (CMK) that was used to protect the volume encryption key for the volume. - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - - // The size of the volume, in GiBs. - Size *int64 `locationName:"size" type:"integer"` - - // The snapshot from which the volume was created, if applicable. - SnapshotId *string `locationName:"snapshotId" type:"string"` - - // The volume state. - State *string `locationName:"status" type:"string" enum:"VolumeState"` - - // Any tags assigned to the volume. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the volume. - VolumeId *string `locationName:"volumeId" type:"string"` - - // The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned - // IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard - // for Magnetic volumes. - VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` -} - -// String returns the string representation -func (s Volume) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Volume) GoString() string { - return s.String() -} - -// SetAttachments sets the Attachments field's value. -func (s *Volume) SetAttachments(v []*VolumeAttachment) *Volume { - s.Attachments = v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Volume) SetAvailabilityZone(v string) *Volume { - s.AvailabilityZone = &v - return s -} - -// SetCreateTime sets the CreateTime field's value. -func (s *Volume) SetCreateTime(v time.Time) *Volume { - s.CreateTime = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *Volume) SetEncrypted(v bool) *Volume { - s.Encrypted = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *Volume) SetIops(v int64) *Volume { - s.Iops = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *Volume) SetKmsKeyId(v string) *Volume { - s.KmsKeyId = &v - return s -} - -// SetSize sets the Size field's value. -func (s *Volume) SetSize(v int64) *Volume { - s.Size = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *Volume) SetSnapshotId(v string) *Volume { - s.SnapshotId = &v - return s -} - -// SetState sets the State field's value. -func (s *Volume) SetState(v string) *Volume { - s.State = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Volume) SetTags(v []*Tag) *Volume { - s.Tags = v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *Volume) SetVolumeId(v string) *Volume { - s.VolumeId = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *Volume) SetVolumeType(v string) *Volume { - s.VolumeType = &v - return s -} - -// Describes volume attachment details. -type VolumeAttachment struct { - _ struct{} `type:"structure"` - - // The time stamp when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` - - // Indicates whether the EBS volume is deleted on instance termination. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - - // The device name. - Device *string `locationName:"device" type:"string"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The attachment state of the volume. - State *string `locationName:"status" type:"string" enum:"VolumeAttachmentState"` - - // The ID of the volume. - VolumeId *string `locationName:"volumeId" type:"string"` -} - -// String returns the string representation -func (s VolumeAttachment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VolumeAttachment) GoString() string { - return s.String() -} - -// SetAttachTime sets the AttachTime field's value. -func (s *VolumeAttachment) SetAttachTime(v time.Time) *VolumeAttachment { - s.AttachTime = &v - return s -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *VolumeAttachment) SetDeleteOnTermination(v bool) *VolumeAttachment { - s.DeleteOnTermination = &v - return s -} - -// SetDevice sets the Device field's value. -func (s *VolumeAttachment) SetDevice(v string) *VolumeAttachment { - s.Device = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *VolumeAttachment) SetInstanceId(v string) *VolumeAttachment { - s.InstanceId = &v - return s -} - -// SetState sets the State field's value. -func (s *VolumeAttachment) SetState(v string) *VolumeAttachment { - s.State = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *VolumeAttachment) SetVolumeId(v string) *VolumeAttachment { - s.VolumeId = &v - return s -} - -// Describes an EBS volume. -type VolumeDetail struct { - _ struct{} `type:"structure"` - - // The size of the volume, in GiB. - // - // Size is a required field - Size *int64 `locationName:"size" type:"long" required:"true"` -} - -// String returns the string representation -func (s VolumeDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VolumeDetail) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VolumeDetail) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VolumeDetail"} - if s.Size == nil { - invalidParams.Add(request.NewErrParamRequired("Size")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSize sets the Size field's value. -func (s *VolumeDetail) SetSize(v int64) *VolumeDetail { - s.Size = &v - return s -} - -// Describes the modification status of an EBS volume. -// -// If the volume has never been modified, some element values will be null. -type VolumeModification struct { - _ struct{} `type:"structure"` - - // The modification completion or failure time. - EndTime *time.Time `locationName:"endTime" type:"timestamp"` - - // The current modification state. The modification state is null for unmodified - // volumes. - ModificationState *string `locationName:"modificationState" type:"string" enum:"VolumeModificationState"` - - // The original IOPS rate of the volume. - OriginalIops *int64 `locationName:"originalIops" type:"integer"` - - // The original size of the volume. - OriginalSize *int64 `locationName:"originalSize" type:"integer"` - - // The original EBS volume type of the volume. - OriginalVolumeType *string `locationName:"originalVolumeType" type:"string" enum:"VolumeType"` - - // The modification progress, from 0 to 100 percent complete. - Progress *int64 `locationName:"progress" type:"long"` - - // The modification start time. - StartTime *time.Time `locationName:"startTime" type:"timestamp"` - - // A status message about the modification progress or failure. - StatusMessage *string `locationName:"statusMessage" type:"string"` - - // The target IOPS rate of the volume. - TargetIops *int64 `locationName:"targetIops" type:"integer"` - - // The target size of the volume, in GiB. - TargetSize *int64 `locationName:"targetSize" type:"integer"` - - // The target EBS volume type of the volume. - TargetVolumeType *string `locationName:"targetVolumeType" type:"string" enum:"VolumeType"` - - // The ID of the volume. - VolumeId *string `locationName:"volumeId" type:"string"` -} - -// String returns the string representation -func (s VolumeModification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VolumeModification) GoString() string { - return s.String() -} - -// SetEndTime sets the EndTime field's value. -func (s *VolumeModification) SetEndTime(v time.Time) *VolumeModification { - s.EndTime = &v - return s -} - -// SetModificationState sets the ModificationState field's value. -func (s *VolumeModification) SetModificationState(v string) *VolumeModification { - s.ModificationState = &v - return s -} - -// SetOriginalIops sets the OriginalIops field's value. -func (s *VolumeModification) SetOriginalIops(v int64) *VolumeModification { - s.OriginalIops = &v - return s -} - -// SetOriginalSize sets the OriginalSize field's value. -func (s *VolumeModification) SetOriginalSize(v int64) *VolumeModification { - s.OriginalSize = &v - return s -} - -// SetOriginalVolumeType sets the OriginalVolumeType field's value. -func (s *VolumeModification) SetOriginalVolumeType(v string) *VolumeModification { - s.OriginalVolumeType = &v - return s -} - -// SetProgress sets the Progress field's value. -func (s *VolumeModification) SetProgress(v int64) *VolumeModification { - s.Progress = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *VolumeModification) SetStartTime(v time.Time) *VolumeModification { - s.StartTime = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *VolumeModification) SetStatusMessage(v string) *VolumeModification { - s.StatusMessage = &v - return s -} - -// SetTargetIops sets the TargetIops field's value. -func (s *VolumeModification) SetTargetIops(v int64) *VolumeModification { - s.TargetIops = &v - return s -} - -// SetTargetSize sets the TargetSize field's value. -func (s *VolumeModification) SetTargetSize(v int64) *VolumeModification { - s.TargetSize = &v - return s -} - -// SetTargetVolumeType sets the TargetVolumeType field's value. -func (s *VolumeModification) SetTargetVolumeType(v string) *VolumeModification { - s.TargetVolumeType = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *VolumeModification) SetVolumeId(v string) *VolumeModification { - s.VolumeId = &v - return s -} - -// Describes a volume status operation code. -type VolumeStatusAction struct { - _ struct{} `type:"structure"` - - // The code identifying the operation, for example, enable-volume-io. - Code *string `locationName:"code" type:"string"` - - // A description of the operation. - Description *string `locationName:"description" type:"string"` - - // The ID of the event associated with this operation. - EventId *string `locationName:"eventId" type:"string"` - - // The event type associated with this operation. - EventType *string `locationName:"eventType" type:"string"` -} - -// String returns the string representation -func (s VolumeStatusAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VolumeStatusAction) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *VolumeStatusAction) SetCode(v string) *VolumeStatusAction { - s.Code = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *VolumeStatusAction) SetDescription(v string) *VolumeStatusAction { - s.Description = &v - return s -} - -// SetEventId sets the EventId field's value. -func (s *VolumeStatusAction) SetEventId(v string) *VolumeStatusAction { - s.EventId = &v - return s -} - -// SetEventType sets the EventType field's value. -func (s *VolumeStatusAction) SetEventType(v string) *VolumeStatusAction { - s.EventType = &v - return s -} - -// Describes a volume status. -type VolumeStatusDetails struct { - _ struct{} `type:"structure"` - - // The name of the volume status. - Name *string `locationName:"name" type:"string" enum:"VolumeStatusName"` - - // The intended status of the volume status. - Status *string `locationName:"status" type:"string"` -} - -// String returns the string representation -func (s VolumeStatusDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VolumeStatusDetails) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *VolumeStatusDetails) SetName(v string) *VolumeStatusDetails { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *VolumeStatusDetails) SetStatus(v string) *VolumeStatusDetails { - s.Status = &v - return s -} - -// Describes a volume status event. -type VolumeStatusEvent struct { - _ struct{} `type:"structure"` - - // A description of the event. - Description *string `locationName:"description" type:"string"` - - // The ID of this event. - EventId *string `locationName:"eventId" type:"string"` - - // The type of this event. - EventType *string `locationName:"eventType" type:"string"` - - // The latest end time of the event. - NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` - - // The earliest start time of the event. - NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` -} - -// String returns the string representation -func (s VolumeStatusEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VolumeStatusEvent) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *VolumeStatusEvent) SetDescription(v string) *VolumeStatusEvent { - s.Description = &v - return s -} - -// SetEventId sets the EventId field's value. -func (s *VolumeStatusEvent) SetEventId(v string) *VolumeStatusEvent { - s.EventId = &v - return s -} - -// SetEventType sets the EventType field's value. -func (s *VolumeStatusEvent) SetEventType(v string) *VolumeStatusEvent { - s.EventType = &v - return s -} - -// SetNotAfter sets the NotAfter field's value. -func (s *VolumeStatusEvent) SetNotAfter(v time.Time) *VolumeStatusEvent { - s.NotAfter = &v - return s -} - -// SetNotBefore sets the NotBefore field's value. -func (s *VolumeStatusEvent) SetNotBefore(v time.Time) *VolumeStatusEvent { - s.NotBefore = &v - return s -} - -// Describes the status of a volume. -type VolumeStatusInfo struct { - _ struct{} `type:"structure"` - - // The details of the volume status. - Details []*VolumeStatusDetails `locationName:"details" locationNameList:"item" type:"list"` - - // The status of the volume. - Status *string `locationName:"status" type:"string" enum:"VolumeStatusInfoStatus"` -} - -// String returns the string representation -func (s VolumeStatusInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VolumeStatusInfo) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *VolumeStatusInfo) SetDetails(v []*VolumeStatusDetails) *VolumeStatusInfo { - s.Details = v - return s -} - -// SetStatus sets the Status field's value. -func (s *VolumeStatusInfo) SetStatus(v string) *VolumeStatusInfo { - s.Status = &v - return s -} - -// Describes the volume status. -type VolumeStatusItem struct { - _ struct{} `type:"structure"` - - // The details of the operation. - Actions []*VolumeStatusAction `locationName:"actionsSet" locationNameList:"item" type:"list"` - - // The Availability Zone of the volume. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // A list of events associated with the volume. - Events []*VolumeStatusEvent `locationName:"eventsSet" locationNameList:"item" type:"list"` - - // The volume ID. - VolumeId *string `locationName:"volumeId" type:"string"` - - // The volume status. - VolumeStatus *VolumeStatusInfo `locationName:"volumeStatus" type:"structure"` -} - -// String returns the string representation -func (s VolumeStatusItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VolumeStatusItem) GoString() string { - return s.String() -} - -// SetActions sets the Actions field's value. -func (s *VolumeStatusItem) SetActions(v []*VolumeStatusAction) *VolumeStatusItem { - s.Actions = v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *VolumeStatusItem) SetAvailabilityZone(v string) *VolumeStatusItem { - s.AvailabilityZone = &v - return s -} - -// SetEvents sets the Events field's value. -func (s *VolumeStatusItem) SetEvents(v []*VolumeStatusEvent) *VolumeStatusItem { - s.Events = v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *VolumeStatusItem) SetVolumeId(v string) *VolumeStatusItem { - s.VolumeId = &v - return s -} - -// SetVolumeStatus sets the VolumeStatus field's value. -func (s *VolumeStatusItem) SetVolumeStatus(v *VolumeStatusInfo) *VolumeStatusItem { - s.VolumeStatus = v - return s -} - -// Describes a VPC. -type Vpc struct { - _ struct{} `type:"structure"` - - // The primary IPv4 CIDR block for the VPC. - CidrBlock *string `locationName:"cidrBlock" type:"string"` - - // Information about the IPv4 CIDR blocks associated with the VPC. - CidrBlockAssociationSet []*VpcCidrBlockAssociation `locationName:"cidrBlockAssociationSet" locationNameList:"item" type:"list"` - - // The ID of the set of DHCP options you've associated with the VPC (or default - // if the default options are associated with the VPC). - DhcpOptionsId *string `locationName:"dhcpOptionsId" type:"string"` - - // The allowed tenancy of instances launched into the VPC. - InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` - - // Information about the IPv6 CIDR blocks associated with the VPC. - Ipv6CidrBlockAssociationSet []*VpcIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociationSet" locationNameList:"item" type:"list"` - - // Indicates whether the VPC is the default VPC. - IsDefault *bool `locationName:"isDefault" type:"boolean"` - - // The ID of the AWS account that owns the VPC. - OwnerId *string `locationName:"ownerId" type:"string"` - - // The current state of the VPC. - State *string `locationName:"state" type:"string" enum:"VpcState"` - - // Any tags assigned to the VPC. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s Vpc) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Vpc) GoString() string { - return s.String() -} - -// SetCidrBlock sets the CidrBlock field's value. -func (s *Vpc) SetCidrBlock(v string) *Vpc { - s.CidrBlock = &v - return s -} - -// SetCidrBlockAssociationSet sets the CidrBlockAssociationSet field's value. -func (s *Vpc) SetCidrBlockAssociationSet(v []*VpcCidrBlockAssociation) *Vpc { - s.CidrBlockAssociationSet = v - return s -} - -// SetDhcpOptionsId sets the DhcpOptionsId field's value. -func (s *Vpc) SetDhcpOptionsId(v string) *Vpc { - s.DhcpOptionsId = &v - return s -} - -// SetInstanceTenancy sets the InstanceTenancy field's value. -func (s *Vpc) SetInstanceTenancy(v string) *Vpc { - s.InstanceTenancy = &v - return s -} - -// SetIpv6CidrBlockAssociationSet sets the Ipv6CidrBlockAssociationSet field's value. -func (s *Vpc) SetIpv6CidrBlockAssociationSet(v []*VpcIpv6CidrBlockAssociation) *Vpc { - s.Ipv6CidrBlockAssociationSet = v - return s -} - -// SetIsDefault sets the IsDefault field's value. -func (s *Vpc) SetIsDefault(v bool) *Vpc { - s.IsDefault = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *Vpc) SetOwnerId(v string) *Vpc { - s.OwnerId = &v - return s -} - -// SetState sets the State field's value. -func (s *Vpc) SetState(v string) *Vpc { - s.State = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Vpc) SetTags(v []*Tag) *Vpc { - s.Tags = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *Vpc) SetVpcId(v string) *Vpc { - s.VpcId = &v - return s -} - -// Describes an attachment between a virtual private gateway and a VPC. -type VpcAttachment struct { - _ struct{} `type:"structure"` - - // The current state of the attachment. - State *string `locationName:"state" type:"string" enum:"AttachmentStatus"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s VpcAttachment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcAttachment) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *VpcAttachment) SetState(v string) *VpcAttachment { - s.State = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *VpcAttachment) SetVpcId(v string) *VpcAttachment { - s.VpcId = &v - return s -} - -// Describes an IPv4 CIDR block associated with a VPC. -type VpcCidrBlockAssociation struct { - _ struct{} `type:"structure"` - - // The association ID for the IPv4 CIDR block. - AssociationId *string `locationName:"associationId" type:"string"` - - // The IPv4 CIDR block. - CidrBlock *string `locationName:"cidrBlock" type:"string"` - - // Information about the state of the CIDR block. - CidrBlockState *VpcCidrBlockState `locationName:"cidrBlockState" type:"structure"` -} - -// String returns the string representation -func (s VpcCidrBlockAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcCidrBlockAssociation) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *VpcCidrBlockAssociation) SetAssociationId(v string) *VpcCidrBlockAssociation { - s.AssociationId = &v - return s -} - -// SetCidrBlock sets the CidrBlock field's value. -func (s *VpcCidrBlockAssociation) SetCidrBlock(v string) *VpcCidrBlockAssociation { - s.CidrBlock = &v - return s -} - -// SetCidrBlockState sets the CidrBlockState field's value. -func (s *VpcCidrBlockAssociation) SetCidrBlockState(v *VpcCidrBlockState) *VpcCidrBlockAssociation { - s.CidrBlockState = v - return s -} - -// Describes the state of a CIDR block. -type VpcCidrBlockState struct { - _ struct{} `type:"structure"` - - // The state of the CIDR block. - State *string `locationName:"state" type:"string" enum:"VpcCidrBlockStateCode"` - - // A message about the status of the CIDR block, if applicable. - StatusMessage *string `locationName:"statusMessage" type:"string"` -} - -// String returns the string representation -func (s VpcCidrBlockState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcCidrBlockState) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *VpcCidrBlockState) SetState(v string) *VpcCidrBlockState { - s.State = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *VpcCidrBlockState) SetStatusMessage(v string) *VpcCidrBlockState { - s.StatusMessage = &v - return s -} - -// Describes whether a VPC is enabled for ClassicLink. -type VpcClassicLink struct { - _ struct{} `type:"structure"` - - // Indicates whether the VPC is enabled for ClassicLink. - ClassicLinkEnabled *bool `locationName:"classicLinkEnabled" type:"boolean"` - - // Any tags assigned to the VPC. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s VpcClassicLink) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcClassicLink) GoString() string { - return s.String() -} - -// SetClassicLinkEnabled sets the ClassicLinkEnabled field's value. -func (s *VpcClassicLink) SetClassicLinkEnabled(v bool) *VpcClassicLink { - s.ClassicLinkEnabled = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *VpcClassicLink) SetTags(v []*Tag) *VpcClassicLink { - s.Tags = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *VpcClassicLink) SetVpcId(v string) *VpcClassicLink { - s.VpcId = &v - return s -} - -// Describes a VPC endpoint. -type VpcEndpoint struct { - _ struct{} `type:"structure"` - - // The date and time the VPC endpoint was created. - CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp"` - - // (Interface endpoint) The DNS entries for the endpoint. - DnsEntries []*DnsEntry `locationName:"dnsEntrySet" locationNameList:"item" type:"list"` - - // (Interface endpoint) Information about the security groups associated with - // the network interface. - Groups []*SecurityGroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - - // (Interface endpoint) One or more network interfaces for the endpoint. - NetworkInterfaceIds []*string `locationName:"networkInterfaceIdSet" locationNameList:"item" type:"list"` - - // The policy document associated with the endpoint, if applicable. - PolicyDocument *string `locationName:"policyDocument" type:"string"` - - // (Interface endpoint) Indicates whether the VPC is associated with a private - // hosted zone. - PrivateDnsEnabled *bool `locationName:"privateDnsEnabled" type:"boolean"` - - // (Gateway endpoint) One or more route tables associated with the endpoint. - RouteTableIds []*string `locationName:"routeTableIdSet" locationNameList:"item" type:"list"` - - // The name of the service to which the endpoint is associated. - ServiceName *string `locationName:"serviceName" type:"string"` - - // The state of the VPC endpoint. - State *string `locationName:"state" type:"string" enum:"State"` - - // (Interface endpoint) One or more subnets in which the endpoint is located. - SubnetIds []*string `locationName:"subnetIdSet" locationNameList:"item" type:"list"` - - // The ID of the VPC endpoint. - VpcEndpointId *string `locationName:"vpcEndpointId" type:"string"` - - // The type of endpoint. - VpcEndpointType *string `locationName:"vpcEndpointType" type:"string" enum:"VpcEndpointType"` - - // The ID of the VPC to which the endpoint is associated. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s VpcEndpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcEndpoint) GoString() string { - return s.String() -} - -// SetCreationTimestamp sets the CreationTimestamp field's value. -func (s *VpcEndpoint) SetCreationTimestamp(v time.Time) *VpcEndpoint { - s.CreationTimestamp = &v - return s -} - -// SetDnsEntries sets the DnsEntries field's value. -func (s *VpcEndpoint) SetDnsEntries(v []*DnsEntry) *VpcEndpoint { - s.DnsEntries = v - return s -} - -// SetGroups sets the Groups field's value. -func (s *VpcEndpoint) SetGroups(v []*SecurityGroupIdentifier) *VpcEndpoint { - s.Groups = v - return s -} - -// SetNetworkInterfaceIds sets the NetworkInterfaceIds field's value. -func (s *VpcEndpoint) SetNetworkInterfaceIds(v []*string) *VpcEndpoint { - s.NetworkInterfaceIds = v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *VpcEndpoint) SetPolicyDocument(v string) *VpcEndpoint { - s.PolicyDocument = &v - return s -} - -// SetPrivateDnsEnabled sets the PrivateDnsEnabled field's value. -func (s *VpcEndpoint) SetPrivateDnsEnabled(v bool) *VpcEndpoint { - s.PrivateDnsEnabled = &v - return s -} - -// SetRouteTableIds sets the RouteTableIds field's value. -func (s *VpcEndpoint) SetRouteTableIds(v []*string) *VpcEndpoint { - s.RouteTableIds = v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *VpcEndpoint) SetServiceName(v string) *VpcEndpoint { - s.ServiceName = &v - return s -} - -// SetState sets the State field's value. -func (s *VpcEndpoint) SetState(v string) *VpcEndpoint { - s.State = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *VpcEndpoint) SetSubnetIds(v []*string) *VpcEndpoint { - s.SubnetIds = v - return s -} - -// SetVpcEndpointId sets the VpcEndpointId field's value. -func (s *VpcEndpoint) SetVpcEndpointId(v string) *VpcEndpoint { - s.VpcEndpointId = &v - return s -} - -// SetVpcEndpointType sets the VpcEndpointType field's value. -func (s *VpcEndpoint) SetVpcEndpointType(v string) *VpcEndpoint { - s.VpcEndpointType = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *VpcEndpoint) SetVpcId(v string) *VpcEndpoint { - s.VpcId = &v - return s -} - -// Describes a VPC endpoint connection to a service. -type VpcEndpointConnection struct { - _ struct{} `type:"structure"` - - // The date and time the VPC endpoint was created. - CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp"` - - // The ID of the service to which the endpoint is connected. - ServiceId *string `locationName:"serviceId" type:"string"` - - // The ID of the VPC endpoint. - VpcEndpointId *string `locationName:"vpcEndpointId" type:"string"` - - // The AWS account ID of the owner of the VPC endpoint. - VpcEndpointOwner *string `locationName:"vpcEndpointOwner" type:"string"` - - // The state of the VPC endpoint. - VpcEndpointState *string `locationName:"vpcEndpointState" type:"string" enum:"State"` -} - -// String returns the string representation -func (s VpcEndpointConnection) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcEndpointConnection) GoString() string { - return s.String() -} - -// SetCreationTimestamp sets the CreationTimestamp field's value. -func (s *VpcEndpointConnection) SetCreationTimestamp(v time.Time) *VpcEndpointConnection { - s.CreationTimestamp = &v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *VpcEndpointConnection) SetServiceId(v string) *VpcEndpointConnection { - s.ServiceId = &v - return s -} - -// SetVpcEndpointId sets the VpcEndpointId field's value. -func (s *VpcEndpointConnection) SetVpcEndpointId(v string) *VpcEndpointConnection { - s.VpcEndpointId = &v - return s -} - -// SetVpcEndpointOwner sets the VpcEndpointOwner field's value. -func (s *VpcEndpointConnection) SetVpcEndpointOwner(v string) *VpcEndpointConnection { - s.VpcEndpointOwner = &v - return s -} - -// SetVpcEndpointState sets the VpcEndpointState field's value. -func (s *VpcEndpointConnection) SetVpcEndpointState(v string) *VpcEndpointConnection { - s.VpcEndpointState = &v - return s -} - -// Describes an IPv6 CIDR block associated with a VPC. -type VpcIpv6CidrBlockAssociation struct { - _ struct{} `type:"structure"` - - // The association ID for the IPv6 CIDR block. - AssociationId *string `locationName:"associationId" type:"string"` - - // The IPv6 CIDR block. - Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` - - // Information about the state of the CIDR block. - Ipv6CidrBlockState *VpcCidrBlockState `locationName:"ipv6CidrBlockState" type:"structure"` -} - -// String returns the string representation -func (s VpcIpv6CidrBlockAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcIpv6CidrBlockAssociation) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *VpcIpv6CidrBlockAssociation) SetAssociationId(v string) *VpcIpv6CidrBlockAssociation { - s.AssociationId = &v - return s -} - -// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. -func (s *VpcIpv6CidrBlockAssociation) SetIpv6CidrBlock(v string) *VpcIpv6CidrBlockAssociation { - s.Ipv6CidrBlock = &v - return s -} - -// SetIpv6CidrBlockState sets the Ipv6CidrBlockState field's value. -func (s *VpcIpv6CidrBlockAssociation) SetIpv6CidrBlockState(v *VpcCidrBlockState) *VpcIpv6CidrBlockAssociation { - s.Ipv6CidrBlockState = v - return s -} - -// Describes a VPC peering connection. -type VpcPeeringConnection struct { - _ struct{} `type:"structure"` - - // Information about the accepter VPC. CIDR block information is only returned - // when describing an active VPC peering connection. - AccepterVpcInfo *VpcPeeringConnectionVpcInfo `locationName:"accepterVpcInfo" type:"structure"` - - // The time that an unaccepted VPC peering connection will expire. - ExpirationTime *time.Time `locationName:"expirationTime" type:"timestamp"` - - // Information about the requester VPC. CIDR block information is only returned - // when describing an active VPC peering connection. - RequesterVpcInfo *VpcPeeringConnectionVpcInfo `locationName:"requesterVpcInfo" type:"structure"` - - // The status of the VPC peering connection. - Status *VpcPeeringConnectionStateReason `locationName:"status" type:"structure"` - - // Any tags assigned to the resource. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the VPC peering connection. - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` -} - -// String returns the string representation -func (s VpcPeeringConnection) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcPeeringConnection) GoString() string { - return s.String() -} - -// SetAccepterVpcInfo sets the AccepterVpcInfo field's value. -func (s *VpcPeeringConnection) SetAccepterVpcInfo(v *VpcPeeringConnectionVpcInfo) *VpcPeeringConnection { - s.AccepterVpcInfo = v - return s -} - -// SetExpirationTime sets the ExpirationTime field's value. -func (s *VpcPeeringConnection) SetExpirationTime(v time.Time) *VpcPeeringConnection { - s.ExpirationTime = &v - return s -} - -// SetRequesterVpcInfo sets the RequesterVpcInfo field's value. -func (s *VpcPeeringConnection) SetRequesterVpcInfo(v *VpcPeeringConnectionVpcInfo) *VpcPeeringConnection { - s.RequesterVpcInfo = v - return s -} - -// SetStatus sets the Status field's value. -func (s *VpcPeeringConnection) SetStatus(v *VpcPeeringConnectionStateReason) *VpcPeeringConnection { - s.Status = v - return s -} - -// SetTags sets the Tags field's value. -func (s *VpcPeeringConnection) SetTags(v []*Tag) *VpcPeeringConnection { - s.Tags = v - return s -} - -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *VpcPeeringConnection) SetVpcPeeringConnectionId(v string) *VpcPeeringConnection { - s.VpcPeeringConnectionId = &v - return s -} - -// Describes the VPC peering connection options. -type VpcPeeringConnectionOptionsDescription struct { - _ struct{} `type:"structure"` - - // Indicates whether a local VPC can resolve public DNS hostnames to private - // IP addresses when queried from instances in a peer VPC. - AllowDnsResolutionFromRemoteVpc *bool `locationName:"allowDnsResolutionFromRemoteVpc" type:"boolean"` - - // Indicates whether a local ClassicLink connection can communicate with the - // peer VPC over the VPC peering connection. - AllowEgressFromLocalClassicLinkToRemoteVpc *bool `locationName:"allowEgressFromLocalClassicLinkToRemoteVpc" type:"boolean"` - - // Indicates whether a local VPC can communicate with a ClassicLink connection - // in the peer VPC over the VPC peering connection. - AllowEgressFromLocalVpcToRemoteClassicLink *bool `locationName:"allowEgressFromLocalVpcToRemoteClassicLink" type:"boolean"` -} - -// String returns the string representation -func (s VpcPeeringConnectionOptionsDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcPeeringConnectionOptionsDescription) GoString() string { - return s.String() -} - -// SetAllowDnsResolutionFromRemoteVpc sets the AllowDnsResolutionFromRemoteVpc field's value. -func (s *VpcPeeringConnectionOptionsDescription) SetAllowDnsResolutionFromRemoteVpc(v bool) *VpcPeeringConnectionOptionsDescription { - s.AllowDnsResolutionFromRemoteVpc = &v - return s -} - -// SetAllowEgressFromLocalClassicLinkToRemoteVpc sets the AllowEgressFromLocalClassicLinkToRemoteVpc field's value. -func (s *VpcPeeringConnectionOptionsDescription) SetAllowEgressFromLocalClassicLinkToRemoteVpc(v bool) *VpcPeeringConnectionOptionsDescription { - s.AllowEgressFromLocalClassicLinkToRemoteVpc = &v - return s -} - -// SetAllowEgressFromLocalVpcToRemoteClassicLink sets the AllowEgressFromLocalVpcToRemoteClassicLink field's value. -func (s *VpcPeeringConnectionOptionsDescription) SetAllowEgressFromLocalVpcToRemoteClassicLink(v bool) *VpcPeeringConnectionOptionsDescription { - s.AllowEgressFromLocalVpcToRemoteClassicLink = &v - return s -} - -// Describes the status of a VPC peering connection. -type VpcPeeringConnectionStateReason struct { - _ struct{} `type:"structure"` - - // The status of the VPC peering connection. - Code *string `locationName:"code" type:"string" enum:"VpcPeeringConnectionStateReasonCode"` - - // A message that provides more information about the status, if applicable. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s VpcPeeringConnectionStateReason) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcPeeringConnectionStateReason) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *VpcPeeringConnectionStateReason) SetCode(v string) *VpcPeeringConnectionStateReason { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *VpcPeeringConnectionStateReason) SetMessage(v string) *VpcPeeringConnectionStateReason { - s.Message = &v - return s -} - -// Describes a VPC in a VPC peering connection. -type VpcPeeringConnectionVpcInfo struct { - _ struct{} `type:"structure"` - - // The IPv4 CIDR block for the VPC. - CidrBlock *string `locationName:"cidrBlock" type:"string"` - - // Information about the IPv4 CIDR blocks for the VPC. - CidrBlockSet []*CidrBlock `locationName:"cidrBlockSet" locationNameList:"item" type:"list"` - - // The IPv6 CIDR block for the VPC. - Ipv6CidrBlockSet []*Ipv6CidrBlock `locationName:"ipv6CidrBlockSet" locationNameList:"item" type:"list"` - - // The AWS account ID of the VPC owner. - OwnerId *string `locationName:"ownerId" type:"string"` - - // Information about the VPC peering connection options for the accepter or - // requester VPC. - PeeringOptions *VpcPeeringConnectionOptionsDescription `locationName:"peeringOptions" type:"structure"` - - // The region in which the VPC is located. - Region *string `locationName:"region" type:"string"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s VpcPeeringConnectionVpcInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcPeeringConnectionVpcInfo) GoString() string { - return s.String() -} - -// SetCidrBlock sets the CidrBlock field's value. -func (s *VpcPeeringConnectionVpcInfo) SetCidrBlock(v string) *VpcPeeringConnectionVpcInfo { - s.CidrBlock = &v - return s -} - -// SetCidrBlockSet sets the CidrBlockSet field's value. -func (s *VpcPeeringConnectionVpcInfo) SetCidrBlockSet(v []*CidrBlock) *VpcPeeringConnectionVpcInfo { - s.CidrBlockSet = v - return s -} - -// SetIpv6CidrBlockSet sets the Ipv6CidrBlockSet field's value. -func (s *VpcPeeringConnectionVpcInfo) SetIpv6CidrBlockSet(v []*Ipv6CidrBlock) *VpcPeeringConnectionVpcInfo { - s.Ipv6CidrBlockSet = v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *VpcPeeringConnectionVpcInfo) SetOwnerId(v string) *VpcPeeringConnectionVpcInfo { - s.OwnerId = &v - return s -} - -// SetPeeringOptions sets the PeeringOptions field's value. -func (s *VpcPeeringConnectionVpcInfo) SetPeeringOptions(v *VpcPeeringConnectionOptionsDescription) *VpcPeeringConnectionVpcInfo { - s.PeeringOptions = v - return s -} - -// SetRegion sets the Region field's value. -func (s *VpcPeeringConnectionVpcInfo) SetRegion(v string) *VpcPeeringConnectionVpcInfo { - s.Region = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *VpcPeeringConnectionVpcInfo) SetVpcId(v string) *VpcPeeringConnectionVpcInfo { - s.VpcId = &v - return s -} - -// Describes a VPN connection. -type VpnConnection struct { - _ struct{} `type:"structure"` - - // The category of the VPN connection. A value of VPN indicates an AWS VPN connection. - // A value of VPN-Classic indicates an AWS Classic VPN connection. For more - // information, see AWS Managed VPN Categories (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html#vpn-categories) - // in the Amazon Virtual Private Cloud User Guide. - Category *string `locationName:"category" type:"string"` - - // The configuration information for the VPN connection's customer gateway (in - // the native XML format). This element is always present in the CreateVpnConnection - // response; however, it's present in the DescribeVpnConnections response only - // if the VPN connection is in the pending or available state. - CustomerGatewayConfiguration *string `locationName:"customerGatewayConfiguration" type:"string"` - - // The ID of the customer gateway at your end of the VPN connection. - CustomerGatewayId *string `locationName:"customerGatewayId" type:"string"` - - // The VPN connection options. - Options *VpnConnectionOptions `locationName:"options" type:"structure"` - - // The static routes associated with the VPN connection. - Routes []*VpnStaticRoute `locationName:"routes" locationNameList:"item" type:"list"` - - // The current state of the VPN connection. - State *string `locationName:"state" type:"string" enum:"VpnState"` - - // Any tags assigned to the VPN connection. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the transit gateway associated with the VPN connection. - TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` - - // The type of VPN connection. - Type *string `locationName:"type" type:"string" enum:"GatewayType"` - - // Information about the VPN tunnel. - VgwTelemetry []*VgwTelemetry `locationName:"vgwTelemetry" locationNameList:"item" type:"list"` - - // The ID of the VPN connection. - VpnConnectionId *string `locationName:"vpnConnectionId" type:"string"` - - // The ID of the virtual private gateway at the AWS side of the VPN connection. - VpnGatewayId *string `locationName:"vpnGatewayId" type:"string"` -} - -// String returns the string representation -func (s VpnConnection) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpnConnection) GoString() string { - return s.String() -} - -// SetCategory sets the Category field's value. -func (s *VpnConnection) SetCategory(v string) *VpnConnection { - s.Category = &v - return s -} - -// SetCustomerGatewayConfiguration sets the CustomerGatewayConfiguration field's value. -func (s *VpnConnection) SetCustomerGatewayConfiguration(v string) *VpnConnection { - s.CustomerGatewayConfiguration = &v - return s -} - -// SetCustomerGatewayId sets the CustomerGatewayId field's value. -func (s *VpnConnection) SetCustomerGatewayId(v string) *VpnConnection { - s.CustomerGatewayId = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *VpnConnection) SetOptions(v *VpnConnectionOptions) *VpnConnection { - s.Options = v - return s -} - -// SetRoutes sets the Routes field's value. -func (s *VpnConnection) SetRoutes(v []*VpnStaticRoute) *VpnConnection { - s.Routes = v - return s -} - -// SetState sets the State field's value. -func (s *VpnConnection) SetState(v string) *VpnConnection { - s.State = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *VpnConnection) SetTags(v []*Tag) *VpnConnection { - s.Tags = v - return s -} - -// SetTransitGatewayId sets the TransitGatewayId field's value. -func (s *VpnConnection) SetTransitGatewayId(v string) *VpnConnection { - s.TransitGatewayId = &v - return s -} - -// SetType sets the Type field's value. -func (s *VpnConnection) SetType(v string) *VpnConnection { - s.Type = &v - return s -} - -// SetVgwTelemetry sets the VgwTelemetry field's value. -func (s *VpnConnection) SetVgwTelemetry(v []*VgwTelemetry) *VpnConnection { - s.VgwTelemetry = v - return s -} - -// SetVpnConnectionId sets the VpnConnectionId field's value. -func (s *VpnConnection) SetVpnConnectionId(v string) *VpnConnection { - s.VpnConnectionId = &v - return s -} - -// SetVpnGatewayId sets the VpnGatewayId field's value. -func (s *VpnConnection) SetVpnGatewayId(v string) *VpnConnection { - s.VpnGatewayId = &v - return s -} - -// Describes VPN connection options. -type VpnConnectionOptions struct { - _ struct{} `type:"structure"` - - // Indicates whether the VPN connection uses static routes only. Static routes - // must be used for devices that don't support BGP. - StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"` -} - -// String returns the string representation -func (s VpnConnectionOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpnConnectionOptions) GoString() string { - return s.String() -} - -// SetStaticRoutesOnly sets the StaticRoutesOnly field's value. -func (s *VpnConnectionOptions) SetStaticRoutesOnly(v bool) *VpnConnectionOptions { - s.StaticRoutesOnly = &v - return s -} - -// Describes VPN connection options. -type VpnConnectionOptionsSpecification struct { - _ struct{} `type:"structure"` - - // Indicate whether the VPN connection uses static routes only. If you are creating - // a VPN connection for a device that does not support BGP, you must specify - // true. Use CreateVpnConnectionRoute to create a static route. - // - // Default: false - StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"` - - // The tunnel options for the VPN connection. - TunnelOptions []*VpnTunnelOptionsSpecification `locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s VpnConnectionOptionsSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpnConnectionOptionsSpecification) GoString() string { - return s.String() -} - -// SetStaticRoutesOnly sets the StaticRoutesOnly field's value. -func (s *VpnConnectionOptionsSpecification) SetStaticRoutesOnly(v bool) *VpnConnectionOptionsSpecification { - s.StaticRoutesOnly = &v - return s -} - -// SetTunnelOptions sets the TunnelOptions field's value. -func (s *VpnConnectionOptionsSpecification) SetTunnelOptions(v []*VpnTunnelOptionsSpecification) *VpnConnectionOptionsSpecification { - s.TunnelOptions = v - return s -} - -// Describes a virtual private gateway. -type VpnGateway struct { - _ struct{} `type:"structure"` - - // The private Autonomous System Number (ASN) for the Amazon side of a BGP session. - AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` - - // The Availability Zone where the virtual private gateway was created, if applicable. - // This field may be empty or not returned. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The current state of the virtual private gateway. - State *string `locationName:"state" type:"string" enum:"VpnState"` - - // Any tags assigned to the virtual private gateway. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The type of VPN connection the virtual private gateway supports. - Type *string `locationName:"type" type:"string" enum:"GatewayType"` - - // Any VPCs attached to the virtual private gateway. - VpcAttachments []*VpcAttachment `locationName:"attachments" locationNameList:"item" type:"list"` - - // The ID of the virtual private gateway. - VpnGatewayId *string `locationName:"vpnGatewayId" type:"string"` -} - -// String returns the string representation -func (s VpnGateway) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpnGateway) GoString() string { - return s.String() -} - -// SetAmazonSideAsn sets the AmazonSideAsn field's value. -func (s *VpnGateway) SetAmazonSideAsn(v int64) *VpnGateway { - s.AmazonSideAsn = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *VpnGateway) SetAvailabilityZone(v string) *VpnGateway { - s.AvailabilityZone = &v - return s -} - -// SetState sets the State field's value. -func (s *VpnGateway) SetState(v string) *VpnGateway { - s.State = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *VpnGateway) SetTags(v []*Tag) *VpnGateway { - s.Tags = v - return s -} - -// SetType sets the Type field's value. -func (s *VpnGateway) SetType(v string) *VpnGateway { - s.Type = &v - return s -} - -// SetVpcAttachments sets the VpcAttachments field's value. -func (s *VpnGateway) SetVpcAttachments(v []*VpcAttachment) *VpnGateway { - s.VpcAttachments = v - return s -} - -// SetVpnGatewayId sets the VpnGatewayId field's value. -func (s *VpnGateway) SetVpnGatewayId(v string) *VpnGateway { - s.VpnGatewayId = &v - return s -} - -// Describes a static route for a VPN connection. -type VpnStaticRoute struct { - _ struct{} `type:"structure"` - - // The CIDR block associated with the local subnet of the customer data center. - DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` - - // Indicates how the routes were provided. - Source *string `locationName:"source" type:"string" enum:"VpnStaticRouteSource"` - - // The current state of the static route. - State *string `locationName:"state" type:"string" enum:"VpnState"` -} - -// String returns the string representation -func (s VpnStaticRoute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpnStaticRoute) GoString() string { - return s.String() -} - -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *VpnStaticRoute) SetDestinationCidrBlock(v string) *VpnStaticRoute { - s.DestinationCidrBlock = &v - return s -} - -// SetSource sets the Source field's value. -func (s *VpnStaticRoute) SetSource(v string) *VpnStaticRoute { - s.Source = &v - return s -} - -// SetState sets the State field's value. -func (s *VpnStaticRoute) SetState(v string) *VpnStaticRoute { - s.State = &v - return s -} - -// The tunnel options for a VPN connection. -type VpnTunnelOptionsSpecification struct { - _ struct{} `type:"structure"` - - // The pre-shared key (PSK) to establish initial authentication between the - // virtual private gateway and customer gateway. - // - // Constraints: Allowed characters are alphanumeric characters and ._. Must - // be between 8 and 64 characters in length and cannot start with zero (0). - PreSharedKey *string `type:"string"` - - // The range of inside IP addresses for the tunnel. Any specified CIDR blocks - // must be unique across all VPN connections that use the same virtual private - // gateway. - // - // Constraints: A size /30 CIDR block from the 169.254.0.0/16 range. The following - // CIDR blocks are reserved and cannot be used: - // - // * 169.254.0.0/30 - // - // * 169.254.1.0/30 - // - // * 169.254.2.0/30 - // - // * 169.254.3.0/30 - // - // * 169.254.4.0/30 - // - // * 169.254.5.0/30 - // - // * 169.254.169.252/30 - TunnelInsideCidr *string `type:"string"` -} - -// String returns the string representation -func (s VpnTunnelOptionsSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpnTunnelOptionsSpecification) GoString() string { - return s.String() -} - -// SetPreSharedKey sets the PreSharedKey field's value. -func (s *VpnTunnelOptionsSpecification) SetPreSharedKey(v string) *VpnTunnelOptionsSpecification { - s.PreSharedKey = &v - return s -} - -// SetTunnelInsideCidr sets the TunnelInsideCidr field's value. -func (s *VpnTunnelOptionsSpecification) SetTunnelInsideCidr(v string) *VpnTunnelOptionsSpecification { - s.TunnelInsideCidr = &v - return s -} - -type WithdrawByoipCidrInput struct { - _ struct{} `type:"structure"` - - // The public IPv4 address range, in CIDR notation. - // - // Cidr is a required field - Cidr *string `type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` -} - -// String returns the string representation -func (s WithdrawByoipCidrInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WithdrawByoipCidrInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WithdrawByoipCidrInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WithdrawByoipCidrInput"} - if s.Cidr == nil { - invalidParams.Add(request.NewErrParamRequired("Cidr")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCidr sets the Cidr field's value. -func (s *WithdrawByoipCidrInput) SetCidr(v string) *WithdrawByoipCidrInput { - s.Cidr = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *WithdrawByoipCidrInput) SetDryRun(v bool) *WithdrawByoipCidrInput { - s.DryRun = &v - return s -} - -type WithdrawByoipCidrOutput struct { - _ struct{} `type:"structure"` - - // Information about the address pool. - ByoipCidr *ByoipCidr `locationName:"byoipCidr" type:"structure"` -} - -// String returns the string representation -func (s WithdrawByoipCidrOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WithdrawByoipCidrOutput) GoString() string { - return s.String() -} - -// SetByoipCidr sets the ByoipCidr field's value. -func (s *WithdrawByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *WithdrawByoipCidrOutput { - s.ByoipCidr = v - return s -} - -const ( - // AccountAttributeNameSupportedPlatforms is a AccountAttributeName enum value - AccountAttributeNameSupportedPlatforms = "supported-platforms" - - // AccountAttributeNameDefaultVpc is a AccountAttributeName enum value - AccountAttributeNameDefaultVpc = "default-vpc" -) - -const ( - // ActivityStatusError is a ActivityStatus enum value - ActivityStatusError = "error" - - // ActivityStatusPendingFulfillment is a ActivityStatus enum value - ActivityStatusPendingFulfillment = "pending_fulfillment" - - // ActivityStatusPendingTermination is a ActivityStatus enum value - ActivityStatusPendingTermination = "pending_termination" - - // ActivityStatusFulfilled is a ActivityStatus enum value - ActivityStatusFulfilled = "fulfilled" -) - -const ( - // AffinityDefault is a Affinity enum value - AffinityDefault = "default" - - // AffinityHost is a Affinity enum value - AffinityHost = "host" -) - -const ( - // AllocationStateAvailable is a AllocationState enum value - AllocationStateAvailable = "available" - - // AllocationStateUnderAssessment is a AllocationState enum value - AllocationStateUnderAssessment = "under-assessment" - - // AllocationStatePermanentFailure is a AllocationState enum value - AllocationStatePermanentFailure = "permanent-failure" - - // AllocationStateReleased is a AllocationState enum value - AllocationStateReleased = "released" - - // AllocationStateReleasedPermanentFailure is a AllocationState enum value - AllocationStateReleasedPermanentFailure = "released-permanent-failure" -) - -const ( - // AllocationStrategyLowestPrice is a AllocationStrategy enum value - AllocationStrategyLowestPrice = "lowestPrice" - - // AllocationStrategyDiversified is a AllocationStrategy enum value - AllocationStrategyDiversified = "diversified" -) - -const ( - // ArchitectureValuesI386 is a ArchitectureValues enum value - ArchitectureValuesI386 = "i386" - - // ArchitectureValuesX8664 is a ArchitectureValues enum value - ArchitectureValuesX8664 = "x86_64" - - // ArchitectureValuesArm64 is a ArchitectureValues enum value - ArchitectureValuesArm64 = "arm64" -) - -const ( - // AssociatedNetworkTypeVpc is a AssociatedNetworkType enum value - AssociatedNetworkTypeVpc = "vpc" -) - -const ( - // AssociationStatusCodeAssociating is a AssociationStatusCode enum value - AssociationStatusCodeAssociating = "associating" - - // AssociationStatusCodeAssociated is a AssociationStatusCode enum value - AssociationStatusCodeAssociated = "associated" - - // AssociationStatusCodeAssociationFailed is a AssociationStatusCode enum value - AssociationStatusCodeAssociationFailed = "association-failed" - - // AssociationStatusCodeDisassociating is a AssociationStatusCode enum value - AssociationStatusCodeDisassociating = "disassociating" - - // AssociationStatusCodeDisassociated is a AssociationStatusCode enum value - AssociationStatusCodeDisassociated = "disassociated" -) - -const ( - // AttachmentStatusAttaching is a AttachmentStatus enum value - AttachmentStatusAttaching = "attaching" - - // AttachmentStatusAttached is a AttachmentStatus enum value - AttachmentStatusAttached = "attached" - - // AttachmentStatusDetaching is a AttachmentStatus enum value - AttachmentStatusDetaching = "detaching" - - // AttachmentStatusDetached is a AttachmentStatus enum value - AttachmentStatusDetached = "detached" -) - -const ( - // AutoAcceptSharedAttachmentsValueEnable is a AutoAcceptSharedAttachmentsValue enum value - AutoAcceptSharedAttachmentsValueEnable = "enable" - - // AutoAcceptSharedAttachmentsValueDisable is a AutoAcceptSharedAttachmentsValue enum value - AutoAcceptSharedAttachmentsValueDisable = "disable" -) - -const ( - // AutoPlacementOn is a AutoPlacement enum value - AutoPlacementOn = "on" - - // AutoPlacementOff is a AutoPlacement enum value - AutoPlacementOff = "off" -) - -const ( - // AvailabilityZoneStateAvailable is a AvailabilityZoneState enum value - AvailabilityZoneStateAvailable = "available" - - // AvailabilityZoneStateInformation is a AvailabilityZoneState enum value - AvailabilityZoneStateInformation = "information" - - // AvailabilityZoneStateImpaired is a AvailabilityZoneState enum value - AvailabilityZoneStateImpaired = "impaired" - - // AvailabilityZoneStateUnavailable is a AvailabilityZoneState enum value - AvailabilityZoneStateUnavailable = "unavailable" -) - -const ( - // BatchStateSubmitted is a BatchState enum value - BatchStateSubmitted = "submitted" - - // BatchStateActive is a BatchState enum value - BatchStateActive = "active" - - // BatchStateCancelled is a BatchState enum value - BatchStateCancelled = "cancelled" - - // BatchStateFailed is a BatchState enum value - BatchStateFailed = "failed" - - // BatchStateCancelledRunning is a BatchState enum value - BatchStateCancelledRunning = "cancelled_running" - - // BatchStateCancelledTerminating is a BatchState enum value - BatchStateCancelledTerminating = "cancelled_terminating" - - // BatchStateModifying is a BatchState enum value - BatchStateModifying = "modifying" -) - -const ( - // BundleTaskStatePending is a BundleTaskState enum value - BundleTaskStatePending = "pending" - - // BundleTaskStateWaitingForShutdown is a BundleTaskState enum value - BundleTaskStateWaitingForShutdown = "waiting-for-shutdown" - - // BundleTaskStateBundling is a BundleTaskState enum value - BundleTaskStateBundling = "bundling" - - // BundleTaskStateStoring is a BundleTaskState enum value - BundleTaskStateStoring = "storing" - - // BundleTaskStateCancelling is a BundleTaskState enum value - BundleTaskStateCancelling = "cancelling" - - // BundleTaskStateComplete is a BundleTaskState enum value - BundleTaskStateComplete = "complete" - - // BundleTaskStateFailed is a BundleTaskState enum value - BundleTaskStateFailed = "failed" -) - -const ( - // ByoipCidrStateAdvertised is a ByoipCidrState enum value - ByoipCidrStateAdvertised = "advertised" - - // ByoipCidrStateDeprovisioned is a ByoipCidrState enum value - ByoipCidrStateDeprovisioned = "deprovisioned" - - // ByoipCidrStateFailedDeprovision is a ByoipCidrState enum value - ByoipCidrStateFailedDeprovision = "failed-deprovision" - - // ByoipCidrStateFailedProvision is a ByoipCidrState enum value - ByoipCidrStateFailedProvision = "failed-provision" - - // ByoipCidrStatePendingDeprovision is a ByoipCidrState enum value - ByoipCidrStatePendingDeprovision = "pending-deprovision" - - // ByoipCidrStatePendingProvision is a ByoipCidrState enum value - ByoipCidrStatePendingProvision = "pending-provision" - - // ByoipCidrStateProvisioned is a ByoipCidrState enum value - ByoipCidrStateProvisioned = "provisioned" -) - -const ( - // CancelBatchErrorCodeFleetRequestIdDoesNotExist is a CancelBatchErrorCode enum value - CancelBatchErrorCodeFleetRequestIdDoesNotExist = "fleetRequestIdDoesNotExist" - - // CancelBatchErrorCodeFleetRequestIdMalformed is a CancelBatchErrorCode enum value - CancelBatchErrorCodeFleetRequestIdMalformed = "fleetRequestIdMalformed" - - // CancelBatchErrorCodeFleetRequestNotInCancellableState is a CancelBatchErrorCode enum value - CancelBatchErrorCodeFleetRequestNotInCancellableState = "fleetRequestNotInCancellableState" - - // CancelBatchErrorCodeUnexpectedError is a CancelBatchErrorCode enum value - CancelBatchErrorCodeUnexpectedError = "unexpectedError" -) - -const ( - // CancelSpotInstanceRequestStateActive is a CancelSpotInstanceRequestState enum value - CancelSpotInstanceRequestStateActive = "active" - - // CancelSpotInstanceRequestStateOpen is a CancelSpotInstanceRequestState enum value - CancelSpotInstanceRequestStateOpen = "open" - - // CancelSpotInstanceRequestStateClosed is a CancelSpotInstanceRequestState enum value - CancelSpotInstanceRequestStateClosed = "closed" - - // CancelSpotInstanceRequestStateCancelled is a CancelSpotInstanceRequestState enum value - CancelSpotInstanceRequestStateCancelled = "cancelled" - - // CancelSpotInstanceRequestStateCompleted is a CancelSpotInstanceRequestState enum value - CancelSpotInstanceRequestStateCompleted = "completed" -) - -const ( - // CapacityReservationInstancePlatformLinuxUnix is a CapacityReservationInstancePlatform enum value - CapacityReservationInstancePlatformLinuxUnix = "Linux/UNIX" - - // CapacityReservationInstancePlatformRedHatEnterpriseLinux is a CapacityReservationInstancePlatform enum value - CapacityReservationInstancePlatformRedHatEnterpriseLinux = "Red Hat Enterprise Linux" - - // CapacityReservationInstancePlatformSuselinux is a CapacityReservationInstancePlatform enum value - CapacityReservationInstancePlatformSuselinux = "SUSE Linux" - - // CapacityReservationInstancePlatformWindows is a CapacityReservationInstancePlatform enum value - CapacityReservationInstancePlatformWindows = "Windows" - - // CapacityReservationInstancePlatformWindowswithSqlserver is a CapacityReservationInstancePlatform enum value - CapacityReservationInstancePlatformWindowswithSqlserver = "Windows with SQL Server" - - // CapacityReservationInstancePlatformWindowswithSqlserverEnterprise is a CapacityReservationInstancePlatform enum value - CapacityReservationInstancePlatformWindowswithSqlserverEnterprise = "Windows with SQL Server Enterprise" - - // CapacityReservationInstancePlatformWindowswithSqlserverStandard is a CapacityReservationInstancePlatform enum value - CapacityReservationInstancePlatformWindowswithSqlserverStandard = "Windows with SQL Server Standard" - - // CapacityReservationInstancePlatformWindowswithSqlserverWeb is a CapacityReservationInstancePlatform enum value - CapacityReservationInstancePlatformWindowswithSqlserverWeb = "Windows with SQL Server Web" -) - -const ( - // CapacityReservationPreferenceOpen is a CapacityReservationPreference enum value - CapacityReservationPreferenceOpen = "open" - - // CapacityReservationPreferenceNone is a CapacityReservationPreference enum value - CapacityReservationPreferenceNone = "none" -) - -const ( - // CapacityReservationStateActive is a CapacityReservationState enum value - CapacityReservationStateActive = "active" - - // CapacityReservationStateExpired is a CapacityReservationState enum value - CapacityReservationStateExpired = "expired" - - // CapacityReservationStateCancelled is a CapacityReservationState enum value - CapacityReservationStateCancelled = "cancelled" - - // CapacityReservationStatePending is a CapacityReservationState enum value - CapacityReservationStatePending = "pending" - - // CapacityReservationStateFailed is a CapacityReservationState enum value - CapacityReservationStateFailed = "failed" -) - -const ( - // CapacityReservationTenancyDefault is a CapacityReservationTenancy enum value - CapacityReservationTenancyDefault = "default" - - // CapacityReservationTenancyDedicated is a CapacityReservationTenancy enum value - CapacityReservationTenancyDedicated = "dedicated" -) - -const ( - // ClientCertificateRevocationListStatusCodePending is a ClientCertificateRevocationListStatusCode enum value - ClientCertificateRevocationListStatusCodePending = "pending" - - // ClientCertificateRevocationListStatusCodeActive is a ClientCertificateRevocationListStatusCode enum value - ClientCertificateRevocationListStatusCodeActive = "active" -) - -const ( - // ClientVpnAuthenticationTypeCertificateAuthentication is a ClientVpnAuthenticationType enum value - ClientVpnAuthenticationTypeCertificateAuthentication = "certificate-authentication" - - // ClientVpnAuthenticationTypeDirectoryServiceAuthentication is a ClientVpnAuthenticationType enum value - ClientVpnAuthenticationTypeDirectoryServiceAuthentication = "directory-service-authentication" -) - -const ( - // ClientVpnAuthorizationRuleStatusCodeAuthorizing is a ClientVpnAuthorizationRuleStatusCode enum value - ClientVpnAuthorizationRuleStatusCodeAuthorizing = "authorizing" - - // ClientVpnAuthorizationRuleStatusCodeActive is a ClientVpnAuthorizationRuleStatusCode enum value - ClientVpnAuthorizationRuleStatusCodeActive = "active" - - // ClientVpnAuthorizationRuleStatusCodeFailed is a ClientVpnAuthorizationRuleStatusCode enum value - ClientVpnAuthorizationRuleStatusCodeFailed = "failed" - - // ClientVpnAuthorizationRuleStatusCodeRevoking is a ClientVpnAuthorizationRuleStatusCode enum value - ClientVpnAuthorizationRuleStatusCodeRevoking = "revoking" -) - -const ( - // ClientVpnConnectionStatusCodeActive is a ClientVpnConnectionStatusCode enum value - ClientVpnConnectionStatusCodeActive = "active" - - // ClientVpnConnectionStatusCodeFailedToTerminate is a ClientVpnConnectionStatusCode enum value - ClientVpnConnectionStatusCodeFailedToTerminate = "failed-to-terminate" - - // ClientVpnConnectionStatusCodeTerminating is a ClientVpnConnectionStatusCode enum value - ClientVpnConnectionStatusCodeTerminating = "terminating" - - // ClientVpnConnectionStatusCodeTerminated is a ClientVpnConnectionStatusCode enum value - ClientVpnConnectionStatusCodeTerminated = "terminated" -) - -const ( - // ClientVpnEndpointStatusCodePendingAssociate is a ClientVpnEndpointStatusCode enum value - ClientVpnEndpointStatusCodePendingAssociate = "pending-associate" - - // ClientVpnEndpointStatusCodeAvailable is a ClientVpnEndpointStatusCode enum value - ClientVpnEndpointStatusCodeAvailable = "available" - - // ClientVpnEndpointStatusCodeDeleting is a ClientVpnEndpointStatusCode enum value - ClientVpnEndpointStatusCodeDeleting = "deleting" - - // ClientVpnEndpointStatusCodeDeleted is a ClientVpnEndpointStatusCode enum value - ClientVpnEndpointStatusCodeDeleted = "deleted" -) - -const ( - // ClientVpnRouteStatusCodeCreating is a ClientVpnRouteStatusCode enum value - ClientVpnRouteStatusCodeCreating = "creating" - - // ClientVpnRouteStatusCodeActive is a ClientVpnRouteStatusCode enum value - ClientVpnRouteStatusCodeActive = "active" - - // ClientVpnRouteStatusCodeFailed is a ClientVpnRouteStatusCode enum value - ClientVpnRouteStatusCodeFailed = "failed" - - // ClientVpnRouteStatusCodeDeleting is a ClientVpnRouteStatusCode enum value - ClientVpnRouteStatusCodeDeleting = "deleting" -) - -const ( - // ConnectionNotificationStateEnabled is a ConnectionNotificationState enum value - ConnectionNotificationStateEnabled = "Enabled" - - // ConnectionNotificationStateDisabled is a ConnectionNotificationState enum value - ConnectionNotificationStateDisabled = "Disabled" -) - -const ( - // ConnectionNotificationTypeTopic is a ConnectionNotificationType enum value - ConnectionNotificationTypeTopic = "Topic" -) - -const ( - // ContainerFormatOva is a ContainerFormat enum value - ContainerFormatOva = "ova" -) - -const ( - // ConversionTaskStateActive is a ConversionTaskState enum value - ConversionTaskStateActive = "active" - - // ConversionTaskStateCancelling is a ConversionTaskState enum value - ConversionTaskStateCancelling = "cancelling" - - // ConversionTaskStateCancelled is a ConversionTaskState enum value - ConversionTaskStateCancelled = "cancelled" - - // ConversionTaskStateCompleted is a ConversionTaskState enum value - ConversionTaskStateCompleted = "completed" -) - -const ( - // CurrencyCodeValuesUsd is a CurrencyCodeValues enum value - CurrencyCodeValuesUsd = "USD" -) - -const ( - // DatafeedSubscriptionStateActive is a DatafeedSubscriptionState enum value - DatafeedSubscriptionStateActive = "Active" - - // DatafeedSubscriptionStateInactive is a DatafeedSubscriptionState enum value - DatafeedSubscriptionStateInactive = "Inactive" -) - -const ( - // DefaultRouteTableAssociationValueEnable is a DefaultRouteTableAssociationValue enum value - DefaultRouteTableAssociationValueEnable = "enable" - - // DefaultRouteTableAssociationValueDisable is a DefaultRouteTableAssociationValue enum value - DefaultRouteTableAssociationValueDisable = "disable" -) - -const ( - // DefaultRouteTablePropagationValueEnable is a DefaultRouteTablePropagationValue enum value - DefaultRouteTablePropagationValueEnable = "enable" - - // DefaultRouteTablePropagationValueDisable is a DefaultRouteTablePropagationValue enum value - DefaultRouteTablePropagationValueDisable = "disable" -) - -const ( - // DefaultTargetCapacityTypeSpot is a DefaultTargetCapacityType enum value - DefaultTargetCapacityTypeSpot = "spot" - - // DefaultTargetCapacityTypeOnDemand is a DefaultTargetCapacityType enum value - DefaultTargetCapacityTypeOnDemand = "on-demand" -) - -const ( - // DeleteFleetErrorCodeFleetIdDoesNotExist is a DeleteFleetErrorCode enum value - DeleteFleetErrorCodeFleetIdDoesNotExist = "fleetIdDoesNotExist" - - // DeleteFleetErrorCodeFleetIdMalformed is a DeleteFleetErrorCode enum value - DeleteFleetErrorCodeFleetIdMalformed = "fleetIdMalformed" - - // DeleteFleetErrorCodeFleetNotInDeletableState is a DeleteFleetErrorCode enum value - DeleteFleetErrorCodeFleetNotInDeletableState = "fleetNotInDeletableState" - - // DeleteFleetErrorCodeUnexpectedError is a DeleteFleetErrorCode enum value - DeleteFleetErrorCodeUnexpectedError = "unexpectedError" -) - -const ( - // DeviceTypeEbs is a DeviceType enum value - DeviceTypeEbs = "ebs" - - // DeviceTypeInstanceStore is a DeviceType enum value - DeviceTypeInstanceStore = "instance-store" -) - -const ( - // DiskImageFormatVmdk is a DiskImageFormat enum value - DiskImageFormatVmdk = "VMDK" - - // DiskImageFormatRaw is a DiskImageFormat enum value - DiskImageFormatRaw = "RAW" - - // DiskImageFormatVhd is a DiskImageFormat enum value - DiskImageFormatVhd = "VHD" -) - -const ( - // DnsSupportValueEnable is a DnsSupportValue enum value - DnsSupportValueEnable = "enable" - - // DnsSupportValueDisable is a DnsSupportValue enum value - DnsSupportValueDisable = "disable" -) - -const ( - // DomainTypeVpc is a DomainType enum value - DomainTypeVpc = "vpc" - - // DomainTypeStandard is a DomainType enum value - DomainTypeStandard = "standard" -) - -const ( - // ElasticGpuStateAttached is a ElasticGpuState enum value - ElasticGpuStateAttached = "ATTACHED" -) - -const ( - // ElasticGpuStatusOk is a ElasticGpuStatus enum value - ElasticGpuStatusOk = "OK" - - // ElasticGpuStatusImpaired is a ElasticGpuStatus enum value - ElasticGpuStatusImpaired = "IMPAIRED" -) - -const ( - // EndDateTypeUnlimited is a EndDateType enum value - EndDateTypeUnlimited = "unlimited" - - // EndDateTypeLimited is a EndDateType enum value - EndDateTypeLimited = "limited" -) - -const ( - // EventCodeInstanceReboot is a EventCode enum value - EventCodeInstanceReboot = "instance-reboot" - - // EventCodeSystemReboot is a EventCode enum value - EventCodeSystemReboot = "system-reboot" - - // EventCodeSystemMaintenance is a EventCode enum value - EventCodeSystemMaintenance = "system-maintenance" - - // EventCodeInstanceRetirement is a EventCode enum value - EventCodeInstanceRetirement = "instance-retirement" - - // EventCodeInstanceStop is a EventCode enum value - EventCodeInstanceStop = "instance-stop" -) - -const ( - // EventTypeInstanceChange is a EventType enum value - EventTypeInstanceChange = "instanceChange" - - // EventTypeFleetRequestChange is a EventType enum value - EventTypeFleetRequestChange = "fleetRequestChange" - - // EventTypeError is a EventType enum value - EventTypeError = "error" -) - -const ( - // ExcessCapacityTerminationPolicyNoTermination is a ExcessCapacityTerminationPolicy enum value - ExcessCapacityTerminationPolicyNoTermination = "noTermination" - - // ExcessCapacityTerminationPolicyDefault is a ExcessCapacityTerminationPolicy enum value - ExcessCapacityTerminationPolicyDefault = "default" -) - -const ( - // ExportEnvironmentCitrix is a ExportEnvironment enum value - ExportEnvironmentCitrix = "citrix" - - // ExportEnvironmentVmware is a ExportEnvironment enum value - ExportEnvironmentVmware = "vmware" - - // ExportEnvironmentMicrosoft is a ExportEnvironment enum value - ExportEnvironmentMicrosoft = "microsoft" -) - -const ( - // ExportTaskStateActive is a ExportTaskState enum value - ExportTaskStateActive = "active" - - // ExportTaskStateCancelling is a ExportTaskState enum value - ExportTaskStateCancelling = "cancelling" - - // ExportTaskStateCancelled is a ExportTaskState enum value - ExportTaskStateCancelled = "cancelled" - - // ExportTaskStateCompleted is a ExportTaskState enum value - ExportTaskStateCompleted = "completed" -) - -const ( - // FleetActivityStatusError is a FleetActivityStatus enum value - FleetActivityStatusError = "error" - - // FleetActivityStatusPendingFulfillment is a FleetActivityStatus enum value - FleetActivityStatusPendingFulfillment = "pending-fulfillment" - - // FleetActivityStatusPendingTermination is a FleetActivityStatus enum value - FleetActivityStatusPendingTermination = "pending-termination" - - // FleetActivityStatusFulfilled is a FleetActivityStatus enum value - FleetActivityStatusFulfilled = "fulfilled" -) - -const ( - // FleetEventTypeInstanceChange is a FleetEventType enum value - FleetEventTypeInstanceChange = "instance-change" - - // FleetEventTypeFleetChange is a FleetEventType enum value - FleetEventTypeFleetChange = "fleet-change" - - // FleetEventTypeServiceError is a FleetEventType enum value - FleetEventTypeServiceError = "service-error" -) - -const ( - // FleetExcessCapacityTerminationPolicyNoTermination is a FleetExcessCapacityTerminationPolicy enum value - FleetExcessCapacityTerminationPolicyNoTermination = "no-termination" - - // FleetExcessCapacityTerminationPolicyTermination is a FleetExcessCapacityTerminationPolicy enum value - FleetExcessCapacityTerminationPolicyTermination = "termination" -) - -const ( - // FleetOnDemandAllocationStrategyLowestPrice is a FleetOnDemandAllocationStrategy enum value - FleetOnDemandAllocationStrategyLowestPrice = "lowest-price" - - // FleetOnDemandAllocationStrategyPrioritized is a FleetOnDemandAllocationStrategy enum value - FleetOnDemandAllocationStrategyPrioritized = "prioritized" -) - -const ( - // FleetStateCodeSubmitted is a FleetStateCode enum value - FleetStateCodeSubmitted = "submitted" - - // FleetStateCodeActive is a FleetStateCode enum value - FleetStateCodeActive = "active" - - // FleetStateCodeDeleted is a FleetStateCode enum value - FleetStateCodeDeleted = "deleted" - - // FleetStateCodeFailed is a FleetStateCode enum value - FleetStateCodeFailed = "failed" - - // FleetStateCodeDeletedRunning is a FleetStateCode enum value - FleetStateCodeDeletedRunning = "deleted-running" - - // FleetStateCodeDeletedTerminating is a FleetStateCode enum value - FleetStateCodeDeletedTerminating = "deleted-terminating" - - // FleetStateCodeModifying is a FleetStateCode enum value - FleetStateCodeModifying = "modifying" -) - -const ( - // FleetTypeRequest is a FleetType enum value - FleetTypeRequest = "request" - - // FleetTypeMaintain is a FleetType enum value - FleetTypeMaintain = "maintain" - - // FleetTypeInstant is a FleetType enum value - FleetTypeInstant = "instant" -) - -const ( - // FlowLogsResourceTypeVpc is a FlowLogsResourceType enum value - FlowLogsResourceTypeVpc = "VPC" - - // FlowLogsResourceTypeSubnet is a FlowLogsResourceType enum value - FlowLogsResourceTypeSubnet = "Subnet" - - // FlowLogsResourceTypeNetworkInterface is a FlowLogsResourceType enum value - FlowLogsResourceTypeNetworkInterface = "NetworkInterface" -) - -const ( - // FpgaImageAttributeNameDescription is a FpgaImageAttributeName enum value - FpgaImageAttributeNameDescription = "description" - - // FpgaImageAttributeNameName is a FpgaImageAttributeName enum value - FpgaImageAttributeNameName = "name" - - // FpgaImageAttributeNameLoadPermission is a FpgaImageAttributeName enum value - FpgaImageAttributeNameLoadPermission = "loadPermission" - - // FpgaImageAttributeNameProductCodes is a FpgaImageAttributeName enum value - FpgaImageAttributeNameProductCodes = "productCodes" -) - -const ( - // FpgaImageStateCodePending is a FpgaImageStateCode enum value - FpgaImageStateCodePending = "pending" - - // FpgaImageStateCodeFailed is a FpgaImageStateCode enum value - FpgaImageStateCodeFailed = "failed" - - // FpgaImageStateCodeAvailable is a FpgaImageStateCode enum value - FpgaImageStateCodeAvailable = "available" - - // FpgaImageStateCodeUnavailable is a FpgaImageStateCode enum value - FpgaImageStateCodeUnavailable = "unavailable" -) - -const ( - // GatewayTypeIpsec1 is a GatewayType enum value - GatewayTypeIpsec1 = "ipsec.1" -) - -const ( - // HostTenancyDedicated is a HostTenancy enum value - HostTenancyDedicated = "dedicated" - - // HostTenancyHost is a HostTenancy enum value - HostTenancyHost = "host" -) - -const ( - // HypervisorTypeOvm is a HypervisorType enum value - HypervisorTypeOvm = "ovm" - - // HypervisorTypeXen is a HypervisorType enum value - HypervisorTypeXen = "xen" -) - -const ( - // IamInstanceProfileAssociationStateAssociating is a IamInstanceProfileAssociationState enum value - IamInstanceProfileAssociationStateAssociating = "associating" - - // IamInstanceProfileAssociationStateAssociated is a IamInstanceProfileAssociationState enum value - IamInstanceProfileAssociationStateAssociated = "associated" - - // IamInstanceProfileAssociationStateDisassociating is a IamInstanceProfileAssociationState enum value - IamInstanceProfileAssociationStateDisassociating = "disassociating" - - // IamInstanceProfileAssociationStateDisassociated is a IamInstanceProfileAssociationState enum value - IamInstanceProfileAssociationStateDisassociated = "disassociated" -) - -const ( - // ImageAttributeNameDescription is a ImageAttributeName enum value - ImageAttributeNameDescription = "description" - - // ImageAttributeNameKernel is a ImageAttributeName enum value - ImageAttributeNameKernel = "kernel" - - // ImageAttributeNameRamdisk is a ImageAttributeName enum value - ImageAttributeNameRamdisk = "ramdisk" - - // ImageAttributeNameLaunchPermission is a ImageAttributeName enum value - ImageAttributeNameLaunchPermission = "launchPermission" - - // ImageAttributeNameProductCodes is a ImageAttributeName enum value - ImageAttributeNameProductCodes = "productCodes" - - // ImageAttributeNameBlockDeviceMapping is a ImageAttributeName enum value - ImageAttributeNameBlockDeviceMapping = "blockDeviceMapping" - - // ImageAttributeNameSriovNetSupport is a ImageAttributeName enum value - ImageAttributeNameSriovNetSupport = "sriovNetSupport" -) - -const ( - // ImageStatePending is a ImageState enum value - ImageStatePending = "pending" - - // ImageStateAvailable is a ImageState enum value - ImageStateAvailable = "available" - - // ImageStateInvalid is a ImageState enum value - ImageStateInvalid = "invalid" - - // ImageStateDeregistered is a ImageState enum value - ImageStateDeregistered = "deregistered" - - // ImageStateTransient is a ImageState enum value - ImageStateTransient = "transient" - - // ImageStateFailed is a ImageState enum value - ImageStateFailed = "failed" - - // ImageStateError is a ImageState enum value - ImageStateError = "error" -) - -const ( - // ImageTypeValuesMachine is a ImageTypeValues enum value - ImageTypeValuesMachine = "machine" - - // ImageTypeValuesKernel is a ImageTypeValues enum value - ImageTypeValuesKernel = "kernel" - - // ImageTypeValuesRamdisk is a ImageTypeValues enum value - ImageTypeValuesRamdisk = "ramdisk" -) - -const ( - // InstanceAttributeNameInstanceType is a InstanceAttributeName enum value - InstanceAttributeNameInstanceType = "instanceType" - - // InstanceAttributeNameKernel is a InstanceAttributeName enum value - InstanceAttributeNameKernel = "kernel" - - // InstanceAttributeNameRamdisk is a InstanceAttributeName enum value - InstanceAttributeNameRamdisk = "ramdisk" - - // InstanceAttributeNameUserData is a InstanceAttributeName enum value - InstanceAttributeNameUserData = "userData" - - // InstanceAttributeNameDisableApiTermination is a InstanceAttributeName enum value - InstanceAttributeNameDisableApiTermination = "disableApiTermination" - - // InstanceAttributeNameInstanceInitiatedShutdownBehavior is a InstanceAttributeName enum value - InstanceAttributeNameInstanceInitiatedShutdownBehavior = "instanceInitiatedShutdownBehavior" - - // InstanceAttributeNameRootDeviceName is a InstanceAttributeName enum value - InstanceAttributeNameRootDeviceName = "rootDeviceName" - - // InstanceAttributeNameBlockDeviceMapping is a InstanceAttributeName enum value - InstanceAttributeNameBlockDeviceMapping = "blockDeviceMapping" - - // InstanceAttributeNameProductCodes is a InstanceAttributeName enum value - InstanceAttributeNameProductCodes = "productCodes" - - // InstanceAttributeNameSourceDestCheck is a InstanceAttributeName enum value - InstanceAttributeNameSourceDestCheck = "sourceDestCheck" - - // InstanceAttributeNameGroupSet is a InstanceAttributeName enum value - InstanceAttributeNameGroupSet = "groupSet" - - // InstanceAttributeNameEbsOptimized is a InstanceAttributeName enum value - InstanceAttributeNameEbsOptimized = "ebsOptimized" - - // InstanceAttributeNameSriovNetSupport is a InstanceAttributeName enum value - InstanceAttributeNameSriovNetSupport = "sriovNetSupport" - - // InstanceAttributeNameEnaSupport is a InstanceAttributeName enum value - InstanceAttributeNameEnaSupport = "enaSupport" -) - -const ( - // InstanceHealthStatusHealthy is a InstanceHealthStatus enum value - InstanceHealthStatusHealthy = "healthy" - - // InstanceHealthStatusUnhealthy is a InstanceHealthStatus enum value - InstanceHealthStatusUnhealthy = "unhealthy" -) - -const ( - // InstanceInterruptionBehaviorHibernate is a InstanceInterruptionBehavior enum value - InstanceInterruptionBehaviorHibernate = "hibernate" - - // InstanceInterruptionBehaviorStop is a InstanceInterruptionBehavior enum value - InstanceInterruptionBehaviorStop = "stop" - - // InstanceInterruptionBehaviorTerminate is a InstanceInterruptionBehavior enum value - InstanceInterruptionBehaviorTerminate = "terminate" -) - -const ( - // InstanceLifecycleSpot is a InstanceLifecycle enum value - InstanceLifecycleSpot = "spot" - - // InstanceLifecycleOnDemand is a InstanceLifecycle enum value - InstanceLifecycleOnDemand = "on-demand" -) - -const ( - // InstanceLifecycleTypeSpot is a InstanceLifecycleType enum value - InstanceLifecycleTypeSpot = "spot" - - // InstanceLifecycleTypeScheduled is a InstanceLifecycleType enum value - InstanceLifecycleTypeScheduled = "scheduled" -) - -const ( - // InstanceMatchCriteriaOpen is a InstanceMatchCriteria enum value - InstanceMatchCriteriaOpen = "open" - - // InstanceMatchCriteriaTargeted is a InstanceMatchCriteria enum value - InstanceMatchCriteriaTargeted = "targeted" -) - -const ( - // InstanceStateNamePending is a InstanceStateName enum value - InstanceStateNamePending = "pending" - - // InstanceStateNameRunning is a InstanceStateName enum value - InstanceStateNameRunning = "running" - - // InstanceStateNameShuttingDown is a InstanceStateName enum value - InstanceStateNameShuttingDown = "shutting-down" - - // InstanceStateNameTerminated is a InstanceStateName enum value - InstanceStateNameTerminated = "terminated" - - // InstanceStateNameStopping is a InstanceStateName enum value - InstanceStateNameStopping = "stopping" - - // InstanceStateNameStopped is a InstanceStateName enum value - InstanceStateNameStopped = "stopped" -) - -const ( - // InstanceTypeT1Micro is a InstanceType enum value - InstanceTypeT1Micro = "t1.micro" - - // InstanceTypeT2Nano is a InstanceType enum value - InstanceTypeT2Nano = "t2.nano" - - // InstanceTypeT2Micro is a InstanceType enum value - InstanceTypeT2Micro = "t2.micro" - - // InstanceTypeT2Small is a InstanceType enum value - InstanceTypeT2Small = "t2.small" - - // InstanceTypeT2Medium is a InstanceType enum value - InstanceTypeT2Medium = "t2.medium" - - // InstanceTypeT2Large is a InstanceType enum value - InstanceTypeT2Large = "t2.large" - - // InstanceTypeT2Xlarge is a InstanceType enum value - InstanceTypeT2Xlarge = "t2.xlarge" - - // InstanceTypeT22xlarge is a InstanceType enum value - InstanceTypeT22xlarge = "t2.2xlarge" - - // InstanceTypeT3Nano is a InstanceType enum value - InstanceTypeT3Nano = "t3.nano" - - // InstanceTypeT3Micro is a InstanceType enum value - InstanceTypeT3Micro = "t3.micro" - - // InstanceTypeT3Small is a InstanceType enum value - InstanceTypeT3Small = "t3.small" - - // InstanceTypeT3Medium is a InstanceType enum value - InstanceTypeT3Medium = "t3.medium" - - // InstanceTypeT3Large is a InstanceType enum value - InstanceTypeT3Large = "t3.large" - - // InstanceTypeT3Xlarge is a InstanceType enum value - InstanceTypeT3Xlarge = "t3.xlarge" - - // InstanceTypeT32xlarge is a InstanceType enum value - InstanceTypeT32xlarge = "t3.2xlarge" - - // InstanceTypeM1Small is a InstanceType enum value - InstanceTypeM1Small = "m1.small" - - // InstanceTypeM1Medium is a InstanceType enum value - InstanceTypeM1Medium = "m1.medium" - - // InstanceTypeM1Large is a InstanceType enum value - InstanceTypeM1Large = "m1.large" - - // InstanceTypeM1Xlarge is a InstanceType enum value - InstanceTypeM1Xlarge = "m1.xlarge" - - // InstanceTypeM3Medium is a InstanceType enum value - InstanceTypeM3Medium = "m3.medium" - - // InstanceTypeM3Large is a InstanceType enum value - InstanceTypeM3Large = "m3.large" - - // InstanceTypeM3Xlarge is a InstanceType enum value - InstanceTypeM3Xlarge = "m3.xlarge" - - // InstanceTypeM32xlarge is a InstanceType enum value - InstanceTypeM32xlarge = "m3.2xlarge" - - // InstanceTypeM4Large is a InstanceType enum value - InstanceTypeM4Large = "m4.large" - - // InstanceTypeM4Xlarge is a InstanceType enum value - InstanceTypeM4Xlarge = "m4.xlarge" - - // InstanceTypeM42xlarge is a InstanceType enum value - InstanceTypeM42xlarge = "m4.2xlarge" - - // InstanceTypeM44xlarge is a InstanceType enum value - InstanceTypeM44xlarge = "m4.4xlarge" - - // InstanceTypeM410xlarge is a InstanceType enum value - InstanceTypeM410xlarge = "m4.10xlarge" - - // InstanceTypeM416xlarge is a InstanceType enum value - InstanceTypeM416xlarge = "m4.16xlarge" - - // InstanceTypeM2Xlarge is a InstanceType enum value - InstanceTypeM2Xlarge = "m2.xlarge" - - // InstanceTypeM22xlarge is a InstanceType enum value - InstanceTypeM22xlarge = "m2.2xlarge" - - // InstanceTypeM24xlarge is a InstanceType enum value - InstanceTypeM24xlarge = "m2.4xlarge" - - // InstanceTypeCr18xlarge is a InstanceType enum value - InstanceTypeCr18xlarge = "cr1.8xlarge" - - // InstanceTypeR3Large is a InstanceType enum value - InstanceTypeR3Large = "r3.large" - - // InstanceTypeR3Xlarge is a InstanceType enum value - InstanceTypeR3Xlarge = "r3.xlarge" - - // InstanceTypeR32xlarge is a InstanceType enum value - InstanceTypeR32xlarge = "r3.2xlarge" - - // InstanceTypeR34xlarge is a InstanceType enum value - InstanceTypeR34xlarge = "r3.4xlarge" - - // InstanceTypeR38xlarge is a InstanceType enum value - InstanceTypeR38xlarge = "r3.8xlarge" - - // InstanceTypeR4Large is a InstanceType enum value - InstanceTypeR4Large = "r4.large" - - // InstanceTypeR4Xlarge is a InstanceType enum value - InstanceTypeR4Xlarge = "r4.xlarge" - - // InstanceTypeR42xlarge is a InstanceType enum value - InstanceTypeR42xlarge = "r4.2xlarge" - - // InstanceTypeR44xlarge is a InstanceType enum value - InstanceTypeR44xlarge = "r4.4xlarge" - - // InstanceTypeR48xlarge is a InstanceType enum value - InstanceTypeR48xlarge = "r4.8xlarge" - - // InstanceTypeR416xlarge is a InstanceType enum value - InstanceTypeR416xlarge = "r4.16xlarge" - - // InstanceTypeR5Large is a InstanceType enum value - InstanceTypeR5Large = "r5.large" - - // InstanceTypeR5Xlarge is a InstanceType enum value - InstanceTypeR5Xlarge = "r5.xlarge" - - // InstanceTypeR52xlarge is a InstanceType enum value - InstanceTypeR52xlarge = "r5.2xlarge" - - // InstanceTypeR54xlarge is a InstanceType enum value - InstanceTypeR54xlarge = "r5.4xlarge" - - // InstanceTypeR512xlarge is a InstanceType enum value - InstanceTypeR512xlarge = "r5.12xlarge" - - // InstanceTypeR524xlarge is a InstanceType enum value - InstanceTypeR524xlarge = "r5.24xlarge" - - // InstanceTypeR5Metal is a InstanceType enum value - InstanceTypeR5Metal = "r5.metal" - - // InstanceTypeR5aLarge is a InstanceType enum value - InstanceTypeR5aLarge = "r5a.large" - - // InstanceTypeR5aXlarge is a InstanceType enum value - InstanceTypeR5aXlarge = "r5a.xlarge" - - // InstanceTypeR5a2xlarge is a InstanceType enum value - InstanceTypeR5a2xlarge = "r5a.2xlarge" - - // InstanceTypeR5a4xlarge is a InstanceType enum value - InstanceTypeR5a4xlarge = "r5a.4xlarge" - - // InstanceTypeR5a12xlarge is a InstanceType enum value - InstanceTypeR5a12xlarge = "r5a.12xlarge" - - // InstanceTypeR5a24xlarge is a InstanceType enum value - InstanceTypeR5a24xlarge = "r5a.24xlarge" - - // InstanceTypeR5dLarge is a InstanceType enum value - InstanceTypeR5dLarge = "r5d.large" - - // InstanceTypeR5dXlarge is a InstanceType enum value - InstanceTypeR5dXlarge = "r5d.xlarge" - - // InstanceTypeR5d2xlarge is a InstanceType enum value - InstanceTypeR5d2xlarge = "r5d.2xlarge" - - // InstanceTypeR5d4xlarge is a InstanceType enum value - InstanceTypeR5d4xlarge = "r5d.4xlarge" - - // InstanceTypeR5d12xlarge is a InstanceType enum value - InstanceTypeR5d12xlarge = "r5d.12xlarge" - - // InstanceTypeR5d24xlarge is a InstanceType enum value - InstanceTypeR5d24xlarge = "r5d.24xlarge" - - // InstanceTypeR5dMetal is a InstanceType enum value - InstanceTypeR5dMetal = "r5d.metal" - - // InstanceTypeX116xlarge is a InstanceType enum value - InstanceTypeX116xlarge = "x1.16xlarge" - - // InstanceTypeX132xlarge is a InstanceType enum value - InstanceTypeX132xlarge = "x1.32xlarge" - - // InstanceTypeX1eXlarge is a InstanceType enum value - InstanceTypeX1eXlarge = "x1e.xlarge" - - // InstanceTypeX1e2xlarge is a InstanceType enum value - InstanceTypeX1e2xlarge = "x1e.2xlarge" - - // InstanceTypeX1e4xlarge is a InstanceType enum value - InstanceTypeX1e4xlarge = "x1e.4xlarge" - - // InstanceTypeX1e8xlarge is a InstanceType enum value - InstanceTypeX1e8xlarge = "x1e.8xlarge" - - // InstanceTypeX1e16xlarge is a InstanceType enum value - InstanceTypeX1e16xlarge = "x1e.16xlarge" - - // InstanceTypeX1e32xlarge is a InstanceType enum value - InstanceTypeX1e32xlarge = "x1e.32xlarge" - - // InstanceTypeI2Xlarge is a InstanceType enum value - InstanceTypeI2Xlarge = "i2.xlarge" - - // InstanceTypeI22xlarge is a InstanceType enum value - InstanceTypeI22xlarge = "i2.2xlarge" - - // InstanceTypeI24xlarge is a InstanceType enum value - InstanceTypeI24xlarge = "i2.4xlarge" - - // InstanceTypeI28xlarge is a InstanceType enum value - InstanceTypeI28xlarge = "i2.8xlarge" - - // InstanceTypeI3Large is a InstanceType enum value - InstanceTypeI3Large = "i3.large" - - // InstanceTypeI3Xlarge is a InstanceType enum value - InstanceTypeI3Xlarge = "i3.xlarge" - - // InstanceTypeI32xlarge is a InstanceType enum value - InstanceTypeI32xlarge = "i3.2xlarge" - - // InstanceTypeI34xlarge is a InstanceType enum value - InstanceTypeI34xlarge = "i3.4xlarge" - - // InstanceTypeI38xlarge is a InstanceType enum value - InstanceTypeI38xlarge = "i3.8xlarge" - - // InstanceTypeI316xlarge is a InstanceType enum value - InstanceTypeI316xlarge = "i3.16xlarge" - - // InstanceTypeI3Metal is a InstanceType enum value - InstanceTypeI3Metal = "i3.metal" - - // InstanceTypeHi14xlarge is a InstanceType enum value - InstanceTypeHi14xlarge = "hi1.4xlarge" - - // InstanceTypeHs18xlarge is a InstanceType enum value - InstanceTypeHs18xlarge = "hs1.8xlarge" - - // InstanceTypeC1Medium is a InstanceType enum value - InstanceTypeC1Medium = "c1.medium" - - // InstanceTypeC1Xlarge is a InstanceType enum value - InstanceTypeC1Xlarge = "c1.xlarge" - - // InstanceTypeC3Large is a InstanceType enum value - InstanceTypeC3Large = "c3.large" - - // InstanceTypeC3Xlarge is a InstanceType enum value - InstanceTypeC3Xlarge = "c3.xlarge" - - // InstanceTypeC32xlarge is a InstanceType enum value - InstanceTypeC32xlarge = "c3.2xlarge" - - // InstanceTypeC34xlarge is a InstanceType enum value - InstanceTypeC34xlarge = "c3.4xlarge" - - // InstanceTypeC38xlarge is a InstanceType enum value - InstanceTypeC38xlarge = "c3.8xlarge" - - // InstanceTypeC4Large is a InstanceType enum value - InstanceTypeC4Large = "c4.large" - - // InstanceTypeC4Xlarge is a InstanceType enum value - InstanceTypeC4Xlarge = "c4.xlarge" - - // InstanceTypeC42xlarge is a InstanceType enum value - InstanceTypeC42xlarge = "c4.2xlarge" - - // InstanceTypeC44xlarge is a InstanceType enum value - InstanceTypeC44xlarge = "c4.4xlarge" - - // InstanceTypeC48xlarge is a InstanceType enum value - InstanceTypeC48xlarge = "c4.8xlarge" - - // InstanceTypeC5Large is a InstanceType enum value - InstanceTypeC5Large = "c5.large" - - // InstanceTypeC5Xlarge is a InstanceType enum value - InstanceTypeC5Xlarge = "c5.xlarge" - - // InstanceTypeC52xlarge is a InstanceType enum value - InstanceTypeC52xlarge = "c5.2xlarge" - - // InstanceTypeC54xlarge is a InstanceType enum value - InstanceTypeC54xlarge = "c5.4xlarge" - - // InstanceTypeC59xlarge is a InstanceType enum value - InstanceTypeC59xlarge = "c5.9xlarge" - - // InstanceTypeC518xlarge is a InstanceType enum value - InstanceTypeC518xlarge = "c5.18xlarge" - - // InstanceTypeC5dLarge is a InstanceType enum value - InstanceTypeC5dLarge = "c5d.large" - - // InstanceTypeC5dXlarge is a InstanceType enum value - InstanceTypeC5dXlarge = "c5d.xlarge" - - // InstanceTypeC5d2xlarge is a InstanceType enum value - InstanceTypeC5d2xlarge = "c5d.2xlarge" - - // InstanceTypeC5d4xlarge is a InstanceType enum value - InstanceTypeC5d4xlarge = "c5d.4xlarge" - - // InstanceTypeC5d9xlarge is a InstanceType enum value - InstanceTypeC5d9xlarge = "c5d.9xlarge" - - // InstanceTypeC5d18xlarge is a InstanceType enum value - InstanceTypeC5d18xlarge = "c5d.18xlarge" - - // InstanceTypeC5nLarge is a InstanceType enum value - InstanceTypeC5nLarge = "c5n.large" - - // InstanceTypeC5nXlarge is a InstanceType enum value - InstanceTypeC5nXlarge = "c5n.xlarge" - - // InstanceTypeC5n2xlarge is a InstanceType enum value - InstanceTypeC5n2xlarge = "c5n.2xlarge" - - // InstanceTypeC5n4xlarge is a InstanceType enum value - InstanceTypeC5n4xlarge = "c5n.4xlarge" - - // InstanceTypeC5n9xlarge is a InstanceType enum value - InstanceTypeC5n9xlarge = "c5n.9xlarge" - - // InstanceTypeC5n18xlarge is a InstanceType enum value - InstanceTypeC5n18xlarge = "c5n.18xlarge" - - // InstanceTypeCc14xlarge is a InstanceType enum value - InstanceTypeCc14xlarge = "cc1.4xlarge" - - // InstanceTypeCc28xlarge is a InstanceType enum value - InstanceTypeCc28xlarge = "cc2.8xlarge" - - // InstanceTypeG22xlarge is a InstanceType enum value - InstanceTypeG22xlarge = "g2.2xlarge" - - // InstanceTypeG28xlarge is a InstanceType enum value - InstanceTypeG28xlarge = "g2.8xlarge" - - // InstanceTypeG34xlarge is a InstanceType enum value - InstanceTypeG34xlarge = "g3.4xlarge" - - // InstanceTypeG38xlarge is a InstanceType enum value - InstanceTypeG38xlarge = "g3.8xlarge" - - // InstanceTypeG316xlarge is a InstanceType enum value - InstanceTypeG316xlarge = "g3.16xlarge" - - // InstanceTypeG3sXlarge is a InstanceType enum value - InstanceTypeG3sXlarge = "g3s.xlarge" - - // InstanceTypeCg14xlarge is a InstanceType enum value - InstanceTypeCg14xlarge = "cg1.4xlarge" - - // InstanceTypeP2Xlarge is a InstanceType enum value - InstanceTypeP2Xlarge = "p2.xlarge" - - // InstanceTypeP28xlarge is a InstanceType enum value - InstanceTypeP28xlarge = "p2.8xlarge" - - // InstanceTypeP216xlarge is a InstanceType enum value - InstanceTypeP216xlarge = "p2.16xlarge" - - // InstanceTypeP32xlarge is a InstanceType enum value - InstanceTypeP32xlarge = "p3.2xlarge" - - // InstanceTypeP38xlarge is a InstanceType enum value - InstanceTypeP38xlarge = "p3.8xlarge" - - // InstanceTypeP316xlarge is a InstanceType enum value - InstanceTypeP316xlarge = "p3.16xlarge" - - // InstanceTypeP3dn24xlarge is a InstanceType enum value - InstanceTypeP3dn24xlarge = "p3dn.24xlarge" - - // InstanceTypeD2Xlarge is a InstanceType enum value - InstanceTypeD2Xlarge = "d2.xlarge" - - // InstanceTypeD22xlarge is a InstanceType enum value - InstanceTypeD22xlarge = "d2.2xlarge" - - // InstanceTypeD24xlarge is a InstanceType enum value - InstanceTypeD24xlarge = "d2.4xlarge" - - // InstanceTypeD28xlarge is a InstanceType enum value - InstanceTypeD28xlarge = "d2.8xlarge" - - // InstanceTypeF12xlarge is a InstanceType enum value - InstanceTypeF12xlarge = "f1.2xlarge" - - // InstanceTypeF14xlarge is a InstanceType enum value - InstanceTypeF14xlarge = "f1.4xlarge" - - // InstanceTypeF116xlarge is a InstanceType enum value - InstanceTypeF116xlarge = "f1.16xlarge" - - // InstanceTypeM5Large is a InstanceType enum value - InstanceTypeM5Large = "m5.large" - - // InstanceTypeM5Xlarge is a InstanceType enum value - InstanceTypeM5Xlarge = "m5.xlarge" - - // InstanceTypeM52xlarge is a InstanceType enum value - InstanceTypeM52xlarge = "m5.2xlarge" - - // InstanceTypeM54xlarge is a InstanceType enum value - InstanceTypeM54xlarge = "m5.4xlarge" - - // InstanceTypeM512xlarge is a InstanceType enum value - InstanceTypeM512xlarge = "m5.12xlarge" - - // InstanceTypeM524xlarge is a InstanceType enum value - InstanceTypeM524xlarge = "m5.24xlarge" - - // InstanceTypeM5aLarge is a InstanceType enum value - InstanceTypeM5aLarge = "m5a.large" - - // InstanceTypeM5aXlarge is a InstanceType enum value - InstanceTypeM5aXlarge = "m5a.xlarge" - - // InstanceTypeM5a2xlarge is a InstanceType enum value - InstanceTypeM5a2xlarge = "m5a.2xlarge" - - // InstanceTypeM5a4xlarge is a InstanceType enum value - InstanceTypeM5a4xlarge = "m5a.4xlarge" - - // InstanceTypeM5a12xlarge is a InstanceType enum value - InstanceTypeM5a12xlarge = "m5a.12xlarge" - - // InstanceTypeM5a24xlarge is a InstanceType enum value - InstanceTypeM5a24xlarge = "m5a.24xlarge" - - // InstanceTypeM5dLarge is a InstanceType enum value - InstanceTypeM5dLarge = "m5d.large" - - // InstanceTypeM5dXlarge is a InstanceType enum value - InstanceTypeM5dXlarge = "m5d.xlarge" - - // InstanceTypeM5d2xlarge is a InstanceType enum value - InstanceTypeM5d2xlarge = "m5d.2xlarge" - - // InstanceTypeM5d4xlarge is a InstanceType enum value - InstanceTypeM5d4xlarge = "m5d.4xlarge" - - // InstanceTypeM5d12xlarge is a InstanceType enum value - InstanceTypeM5d12xlarge = "m5d.12xlarge" - - // InstanceTypeM5d24xlarge is a InstanceType enum value - InstanceTypeM5d24xlarge = "m5d.24xlarge" - - // InstanceTypeH12xlarge is a InstanceType enum value - InstanceTypeH12xlarge = "h1.2xlarge" - - // InstanceTypeH14xlarge is a InstanceType enum value - InstanceTypeH14xlarge = "h1.4xlarge" - - // InstanceTypeH18xlarge is a InstanceType enum value - InstanceTypeH18xlarge = "h1.8xlarge" - - // InstanceTypeH116xlarge is a InstanceType enum value - InstanceTypeH116xlarge = "h1.16xlarge" - - // InstanceTypeZ1dLarge is a InstanceType enum value - InstanceTypeZ1dLarge = "z1d.large" - - // InstanceTypeZ1dXlarge is a InstanceType enum value - InstanceTypeZ1dXlarge = "z1d.xlarge" - - // InstanceTypeZ1d2xlarge is a InstanceType enum value - InstanceTypeZ1d2xlarge = "z1d.2xlarge" - - // InstanceTypeZ1d3xlarge is a InstanceType enum value - InstanceTypeZ1d3xlarge = "z1d.3xlarge" - - // InstanceTypeZ1d6xlarge is a InstanceType enum value - InstanceTypeZ1d6xlarge = "z1d.6xlarge" - - // InstanceTypeZ1d12xlarge is a InstanceType enum value - InstanceTypeZ1d12xlarge = "z1d.12xlarge" - - // InstanceTypeU6tb1Metal is a InstanceType enum value - InstanceTypeU6tb1Metal = "u-6tb1.metal" - - // InstanceTypeU9tb1Metal is a InstanceType enum value - InstanceTypeU9tb1Metal = "u-9tb1.metal" - - // InstanceTypeU12tb1Metal is a InstanceType enum value - InstanceTypeU12tb1Metal = "u-12tb1.metal" - - // InstanceTypeA1Medium is a InstanceType enum value - InstanceTypeA1Medium = "a1.medium" - - // InstanceTypeA1Large is a InstanceType enum value - InstanceTypeA1Large = "a1.large" - - // InstanceTypeA1Xlarge is a InstanceType enum value - InstanceTypeA1Xlarge = "a1.xlarge" - - // InstanceTypeA12xlarge is a InstanceType enum value - InstanceTypeA12xlarge = "a1.2xlarge" - - // InstanceTypeA14xlarge is a InstanceType enum value - InstanceTypeA14xlarge = "a1.4xlarge" -) - -const ( - // InterfacePermissionTypeInstanceAttach is a InterfacePermissionType enum value - InterfacePermissionTypeInstanceAttach = "INSTANCE-ATTACH" - - // InterfacePermissionTypeEipAssociate is a InterfacePermissionType enum value - InterfacePermissionTypeEipAssociate = "EIP-ASSOCIATE" -) - -const ( - // Ipv6SupportValueEnable is a Ipv6SupportValue enum value - Ipv6SupportValueEnable = "enable" - - // Ipv6SupportValueDisable is a Ipv6SupportValue enum value - Ipv6SupportValueDisable = "disable" -) - -const ( - // LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist is a LaunchTemplateErrorCode enum value - LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist = "launchTemplateIdDoesNotExist" - - // LaunchTemplateErrorCodeLaunchTemplateIdMalformed is a LaunchTemplateErrorCode enum value - LaunchTemplateErrorCodeLaunchTemplateIdMalformed = "launchTemplateIdMalformed" - - // LaunchTemplateErrorCodeLaunchTemplateNameDoesNotExist is a LaunchTemplateErrorCode enum value - LaunchTemplateErrorCodeLaunchTemplateNameDoesNotExist = "launchTemplateNameDoesNotExist" - - // LaunchTemplateErrorCodeLaunchTemplateNameMalformed is a LaunchTemplateErrorCode enum value - LaunchTemplateErrorCodeLaunchTemplateNameMalformed = "launchTemplateNameMalformed" - - // LaunchTemplateErrorCodeLaunchTemplateVersionDoesNotExist is a LaunchTemplateErrorCode enum value - LaunchTemplateErrorCodeLaunchTemplateVersionDoesNotExist = "launchTemplateVersionDoesNotExist" - - // LaunchTemplateErrorCodeUnexpectedError is a LaunchTemplateErrorCode enum value - LaunchTemplateErrorCodeUnexpectedError = "unexpectedError" -) - -const ( - // ListingStateAvailable is a ListingState enum value - ListingStateAvailable = "available" - - // ListingStateSold is a ListingState enum value - ListingStateSold = "sold" - - // ListingStateCancelled is a ListingState enum value - ListingStateCancelled = "cancelled" - - // ListingStatePending is a ListingState enum value - ListingStatePending = "pending" -) - -const ( - // ListingStatusActive is a ListingStatus enum value - ListingStatusActive = "active" - - // ListingStatusPending is a ListingStatus enum value - ListingStatusPending = "pending" - - // ListingStatusCancelled is a ListingStatus enum value - ListingStatusCancelled = "cancelled" - - // ListingStatusClosed is a ListingStatus enum value - ListingStatusClosed = "closed" -) - -const ( - // LogDestinationTypeCloudWatchLogs is a LogDestinationType enum value - LogDestinationTypeCloudWatchLogs = "cloud-watch-logs" - - // LogDestinationTypeS3 is a LogDestinationType enum value - LogDestinationTypeS3 = "s3" -) - -const ( - // MarketTypeSpot is a MarketType enum value - MarketTypeSpot = "spot" -) - -const ( - // MonitoringStateDisabled is a MonitoringState enum value - MonitoringStateDisabled = "disabled" - - // MonitoringStateDisabling is a MonitoringState enum value - MonitoringStateDisabling = "disabling" - - // MonitoringStateEnabled is a MonitoringState enum value - MonitoringStateEnabled = "enabled" - - // MonitoringStatePending is a MonitoringState enum value - MonitoringStatePending = "pending" -) - -const ( - // MoveStatusMovingToVpc is a MoveStatus enum value - MoveStatusMovingToVpc = "movingToVpc" - - // MoveStatusRestoringToClassic is a MoveStatus enum value - MoveStatusRestoringToClassic = "restoringToClassic" -) - -const ( - // NatGatewayStatePending is a NatGatewayState enum value - NatGatewayStatePending = "pending" - - // NatGatewayStateFailed is a NatGatewayState enum value - NatGatewayStateFailed = "failed" - - // NatGatewayStateAvailable is a NatGatewayState enum value - NatGatewayStateAvailable = "available" - - // NatGatewayStateDeleting is a NatGatewayState enum value - NatGatewayStateDeleting = "deleting" - - // NatGatewayStateDeleted is a NatGatewayState enum value - NatGatewayStateDeleted = "deleted" -) - -const ( - // NetworkInterfaceAttributeDescription is a NetworkInterfaceAttribute enum value - NetworkInterfaceAttributeDescription = "description" - - // NetworkInterfaceAttributeGroupSet is a NetworkInterfaceAttribute enum value - NetworkInterfaceAttributeGroupSet = "groupSet" - - // NetworkInterfaceAttributeSourceDestCheck is a NetworkInterfaceAttribute enum value - NetworkInterfaceAttributeSourceDestCheck = "sourceDestCheck" - - // NetworkInterfaceAttributeAttachment is a NetworkInterfaceAttribute enum value - NetworkInterfaceAttributeAttachment = "attachment" -) - -const ( - // NetworkInterfacePermissionStateCodePending is a NetworkInterfacePermissionStateCode enum value - NetworkInterfacePermissionStateCodePending = "pending" - - // NetworkInterfacePermissionStateCodeGranted is a NetworkInterfacePermissionStateCode enum value - NetworkInterfacePermissionStateCodeGranted = "granted" - - // NetworkInterfacePermissionStateCodeRevoking is a NetworkInterfacePermissionStateCode enum value - NetworkInterfacePermissionStateCodeRevoking = "revoking" - - // NetworkInterfacePermissionStateCodeRevoked is a NetworkInterfacePermissionStateCode enum value - NetworkInterfacePermissionStateCodeRevoked = "revoked" -) - -const ( - // NetworkInterfaceStatusAvailable is a NetworkInterfaceStatus enum value - NetworkInterfaceStatusAvailable = "available" - - // NetworkInterfaceStatusAssociated is a NetworkInterfaceStatus enum value - NetworkInterfaceStatusAssociated = "associated" - - // NetworkInterfaceStatusAttaching is a NetworkInterfaceStatus enum value - NetworkInterfaceStatusAttaching = "attaching" - - // NetworkInterfaceStatusInUse is a NetworkInterfaceStatus enum value - NetworkInterfaceStatusInUse = "in-use" - - // NetworkInterfaceStatusDetaching is a NetworkInterfaceStatus enum value - NetworkInterfaceStatusDetaching = "detaching" -) - -const ( - // NetworkInterfaceTypeInterface is a NetworkInterfaceType enum value - NetworkInterfaceTypeInterface = "interface" - - // NetworkInterfaceTypeNatGateway is a NetworkInterfaceType enum value - NetworkInterfaceTypeNatGateway = "natGateway" -) - -const ( - // OfferingClassTypeStandard is a OfferingClassType enum value - OfferingClassTypeStandard = "standard" - - // OfferingClassTypeConvertible is a OfferingClassType enum value - OfferingClassTypeConvertible = "convertible" -) - -const ( - // OfferingTypeValuesHeavyUtilization is a OfferingTypeValues enum value - OfferingTypeValuesHeavyUtilization = "Heavy Utilization" - - // OfferingTypeValuesMediumUtilization is a OfferingTypeValues enum value - OfferingTypeValuesMediumUtilization = "Medium Utilization" - - // OfferingTypeValuesLightUtilization is a OfferingTypeValues enum value - OfferingTypeValuesLightUtilization = "Light Utilization" - - // OfferingTypeValuesNoUpfront is a OfferingTypeValues enum value - OfferingTypeValuesNoUpfront = "No Upfront" - - // OfferingTypeValuesPartialUpfront is a OfferingTypeValues enum value - OfferingTypeValuesPartialUpfront = "Partial Upfront" - - // OfferingTypeValuesAllUpfront is a OfferingTypeValues enum value - OfferingTypeValuesAllUpfront = "All Upfront" -) - -const ( - // OnDemandAllocationStrategyLowestPrice is a OnDemandAllocationStrategy enum value - OnDemandAllocationStrategyLowestPrice = "lowestPrice" - - // OnDemandAllocationStrategyPrioritized is a OnDemandAllocationStrategy enum value - OnDemandAllocationStrategyPrioritized = "prioritized" -) - -const ( - // OperationTypeAdd is a OperationType enum value - OperationTypeAdd = "add" - - // OperationTypeRemove is a OperationType enum value - OperationTypeRemove = "remove" -) - -const ( - // PaymentOptionAllUpfront is a PaymentOption enum value - PaymentOptionAllUpfront = "AllUpfront" - - // PaymentOptionPartialUpfront is a PaymentOption enum value - PaymentOptionPartialUpfront = "PartialUpfront" - - // PaymentOptionNoUpfront is a PaymentOption enum value - PaymentOptionNoUpfront = "NoUpfront" -) - -const ( - // PermissionGroupAll is a PermissionGroup enum value - PermissionGroupAll = "all" -) - -const ( - // PlacementGroupStatePending is a PlacementGroupState enum value - PlacementGroupStatePending = "pending" - - // PlacementGroupStateAvailable is a PlacementGroupState enum value - PlacementGroupStateAvailable = "available" - - // PlacementGroupStateDeleting is a PlacementGroupState enum value - PlacementGroupStateDeleting = "deleting" - - // PlacementGroupStateDeleted is a PlacementGroupState enum value - PlacementGroupStateDeleted = "deleted" -) - -const ( - // PlacementStrategyCluster is a PlacementStrategy enum value - PlacementStrategyCluster = "cluster" - - // PlacementStrategySpread is a PlacementStrategy enum value - PlacementStrategySpread = "spread" - - // PlacementStrategyPartition is a PlacementStrategy enum value - PlacementStrategyPartition = "partition" -) - -const ( - // PlatformValuesWindows is a PlatformValues enum value - PlatformValuesWindows = "Windows" -) - -const ( - // PrincipalTypeAll is a PrincipalType enum value - PrincipalTypeAll = "All" - - // PrincipalTypeService is a PrincipalType enum value - PrincipalTypeService = "Service" - - // PrincipalTypeOrganizationUnit is a PrincipalType enum value - PrincipalTypeOrganizationUnit = "OrganizationUnit" - - // PrincipalTypeAccount is a PrincipalType enum value - PrincipalTypeAccount = "Account" - - // PrincipalTypeUser is a PrincipalType enum value - PrincipalTypeUser = "User" - - // PrincipalTypeRole is a PrincipalType enum value - PrincipalTypeRole = "Role" -) - -const ( - // ProductCodeValuesDevpay is a ProductCodeValues enum value - ProductCodeValuesDevpay = "devpay" - - // ProductCodeValuesMarketplace is a ProductCodeValues enum value - ProductCodeValuesMarketplace = "marketplace" -) - -const ( - // RIProductDescriptionLinuxUnix is a RIProductDescription enum value - RIProductDescriptionLinuxUnix = "Linux/UNIX" - - // RIProductDescriptionLinuxUnixamazonVpc is a RIProductDescription enum value - RIProductDescriptionLinuxUnixamazonVpc = "Linux/UNIX (Amazon VPC)" - - // RIProductDescriptionWindows is a RIProductDescription enum value - RIProductDescriptionWindows = "Windows" - - // RIProductDescriptionWindowsAmazonVpc is a RIProductDescription enum value - RIProductDescriptionWindowsAmazonVpc = "Windows (Amazon VPC)" -) - -const ( - // RecurringChargeFrequencyHourly is a RecurringChargeFrequency enum value - RecurringChargeFrequencyHourly = "Hourly" -) - -const ( - // ReportInstanceReasonCodesInstanceStuckInState is a ReportInstanceReasonCodes enum value - ReportInstanceReasonCodesInstanceStuckInState = "instance-stuck-in-state" - - // ReportInstanceReasonCodesUnresponsive is a ReportInstanceReasonCodes enum value - ReportInstanceReasonCodesUnresponsive = "unresponsive" - - // ReportInstanceReasonCodesNotAcceptingCredentials is a ReportInstanceReasonCodes enum value - ReportInstanceReasonCodesNotAcceptingCredentials = "not-accepting-credentials" - - // ReportInstanceReasonCodesPasswordNotAvailable is a ReportInstanceReasonCodes enum value - ReportInstanceReasonCodesPasswordNotAvailable = "password-not-available" - - // ReportInstanceReasonCodesPerformanceNetwork is a ReportInstanceReasonCodes enum value - ReportInstanceReasonCodesPerformanceNetwork = "performance-network" - - // ReportInstanceReasonCodesPerformanceInstanceStore is a ReportInstanceReasonCodes enum value - ReportInstanceReasonCodesPerformanceInstanceStore = "performance-instance-store" - - // ReportInstanceReasonCodesPerformanceEbsVolume is a ReportInstanceReasonCodes enum value - ReportInstanceReasonCodesPerformanceEbsVolume = "performance-ebs-volume" - - // ReportInstanceReasonCodesPerformanceOther is a ReportInstanceReasonCodes enum value - ReportInstanceReasonCodesPerformanceOther = "performance-other" - - // ReportInstanceReasonCodesOther is a ReportInstanceReasonCodes enum value - ReportInstanceReasonCodesOther = "other" -) - -const ( - // ReportStatusTypeOk is a ReportStatusType enum value - ReportStatusTypeOk = "ok" - - // ReportStatusTypeImpaired is a ReportStatusType enum value - ReportStatusTypeImpaired = "impaired" -) - -const ( - // ReservationStatePaymentPending is a ReservationState enum value - ReservationStatePaymentPending = "payment-pending" - - // ReservationStatePaymentFailed is a ReservationState enum value - ReservationStatePaymentFailed = "payment-failed" - - // ReservationStateActive is a ReservationState enum value - ReservationStateActive = "active" - - // ReservationStateRetired is a ReservationState enum value - ReservationStateRetired = "retired" -) - -const ( - // ReservedInstanceStatePaymentPending is a ReservedInstanceState enum value - ReservedInstanceStatePaymentPending = "payment-pending" - - // ReservedInstanceStateActive is a ReservedInstanceState enum value - ReservedInstanceStateActive = "active" - - // ReservedInstanceStatePaymentFailed is a ReservedInstanceState enum value - ReservedInstanceStatePaymentFailed = "payment-failed" - - // ReservedInstanceStateRetired is a ReservedInstanceState enum value - ReservedInstanceStateRetired = "retired" -) - -const ( - // ResetFpgaImageAttributeNameLoadPermission is a ResetFpgaImageAttributeName enum value - ResetFpgaImageAttributeNameLoadPermission = "loadPermission" -) - -const ( - // ResetImageAttributeNameLaunchPermission is a ResetImageAttributeName enum value - ResetImageAttributeNameLaunchPermission = "launchPermission" -) - -const ( - // ResourceTypeCustomerGateway is a ResourceType enum value - ResourceTypeCustomerGateway = "customer-gateway" - - // ResourceTypeDedicatedHost is a ResourceType enum value - ResourceTypeDedicatedHost = "dedicated-host" - - // ResourceTypeDhcpOptions is a ResourceType enum value - ResourceTypeDhcpOptions = "dhcp-options" - - // ResourceTypeElasticIp is a ResourceType enum value - ResourceTypeElasticIp = "elastic-ip" - - // ResourceTypeFleet is a ResourceType enum value - ResourceTypeFleet = "fleet" - - // ResourceTypeFpgaImage is a ResourceType enum value - ResourceTypeFpgaImage = "fpga-image" - - // ResourceTypeImage is a ResourceType enum value - ResourceTypeImage = "image" - - // ResourceTypeInstance is a ResourceType enum value - ResourceTypeInstance = "instance" - - // ResourceTypeInternetGateway is a ResourceType enum value - ResourceTypeInternetGateway = "internet-gateway" - - // ResourceTypeLaunchTemplate is a ResourceType enum value - ResourceTypeLaunchTemplate = "launch-template" - - // ResourceTypeNatgateway is a ResourceType enum value - ResourceTypeNatgateway = "natgateway" - - // ResourceTypeNetworkAcl is a ResourceType enum value - ResourceTypeNetworkAcl = "network-acl" - - // ResourceTypeNetworkInterface is a ResourceType enum value - ResourceTypeNetworkInterface = "network-interface" - - // ResourceTypeReservedInstances is a ResourceType enum value - ResourceTypeReservedInstances = "reserved-instances" - - // ResourceTypeRouteTable is a ResourceType enum value - ResourceTypeRouteTable = "route-table" - - // ResourceTypeSecurityGroup is a ResourceType enum value - ResourceTypeSecurityGroup = "security-group" - - // ResourceTypeSnapshot is a ResourceType enum value - ResourceTypeSnapshot = "snapshot" - - // ResourceTypeSpotInstancesRequest is a ResourceType enum value - ResourceTypeSpotInstancesRequest = "spot-instances-request" - - // ResourceTypeSubnet is a ResourceType enum value - ResourceTypeSubnet = "subnet" - - // ResourceTypeTransitGateway is a ResourceType enum value - ResourceTypeTransitGateway = "transit-gateway" - - // ResourceTypeTransitGatewayAttachment is a ResourceType enum value - ResourceTypeTransitGatewayAttachment = "transit-gateway-attachment" - - // ResourceTypeTransitGatewayRouteTable is a ResourceType enum value - ResourceTypeTransitGatewayRouteTable = "transit-gateway-route-table" - - // ResourceTypeVolume is a ResourceType enum value - ResourceTypeVolume = "volume" - - // ResourceTypeVpc is a ResourceType enum value - ResourceTypeVpc = "vpc" - - // ResourceTypeVpcPeeringConnection is a ResourceType enum value - ResourceTypeVpcPeeringConnection = "vpc-peering-connection" - - // ResourceTypeVpnConnection is a ResourceType enum value - ResourceTypeVpnConnection = "vpn-connection" - - // ResourceTypeVpnGateway is a ResourceType enum value - ResourceTypeVpnGateway = "vpn-gateway" -) - -const ( - // RouteOriginCreateRouteTable is a RouteOrigin enum value - RouteOriginCreateRouteTable = "CreateRouteTable" - - // RouteOriginCreateRoute is a RouteOrigin enum value - RouteOriginCreateRoute = "CreateRoute" - - // RouteOriginEnableVgwRoutePropagation is a RouteOrigin enum value - RouteOriginEnableVgwRoutePropagation = "EnableVgwRoutePropagation" -) - -const ( - // RouteStateActive is a RouteState enum value - RouteStateActive = "active" - - // RouteStateBlackhole is a RouteState enum value - RouteStateBlackhole = "blackhole" -) - -const ( - // RuleActionAllow is a RuleAction enum value - RuleActionAllow = "allow" - - // RuleActionDeny is a RuleAction enum value - RuleActionDeny = "deny" -) - -const ( - // ServiceStatePending is a ServiceState enum value - ServiceStatePending = "Pending" - - // ServiceStateAvailable is a ServiceState enum value - ServiceStateAvailable = "Available" - - // ServiceStateDeleting is a ServiceState enum value - ServiceStateDeleting = "Deleting" - - // ServiceStateDeleted is a ServiceState enum value - ServiceStateDeleted = "Deleted" - - // ServiceStateFailed is a ServiceState enum value - ServiceStateFailed = "Failed" -) - -const ( - // ServiceTypeInterface is a ServiceType enum value - ServiceTypeInterface = "Interface" - - // ServiceTypeGateway is a ServiceType enum value - ServiceTypeGateway = "Gateway" -) - -const ( - // ShutdownBehaviorStop is a ShutdownBehavior enum value - ShutdownBehaviorStop = "stop" - - // ShutdownBehaviorTerminate is a ShutdownBehavior enum value - ShutdownBehaviorTerminate = "terminate" -) - -const ( - // SnapshotAttributeNameProductCodes is a SnapshotAttributeName enum value - SnapshotAttributeNameProductCodes = "productCodes" - - // SnapshotAttributeNameCreateVolumePermission is a SnapshotAttributeName enum value - SnapshotAttributeNameCreateVolumePermission = "createVolumePermission" -) - -const ( - // SnapshotStatePending is a SnapshotState enum value - SnapshotStatePending = "pending" - - // SnapshotStateCompleted is a SnapshotState enum value - SnapshotStateCompleted = "completed" - - // SnapshotStateError is a SnapshotState enum value - SnapshotStateError = "error" -) - -const ( - // SpotAllocationStrategyLowestPrice is a SpotAllocationStrategy enum value - SpotAllocationStrategyLowestPrice = "lowest-price" - - // SpotAllocationStrategyDiversified is a SpotAllocationStrategy enum value - SpotAllocationStrategyDiversified = "diversified" -) - -const ( - // SpotInstanceInterruptionBehaviorHibernate is a SpotInstanceInterruptionBehavior enum value - SpotInstanceInterruptionBehaviorHibernate = "hibernate" - - // SpotInstanceInterruptionBehaviorStop is a SpotInstanceInterruptionBehavior enum value - SpotInstanceInterruptionBehaviorStop = "stop" - - // SpotInstanceInterruptionBehaviorTerminate is a SpotInstanceInterruptionBehavior enum value - SpotInstanceInterruptionBehaviorTerminate = "terminate" -) - -const ( - // SpotInstanceStateOpen is a SpotInstanceState enum value - SpotInstanceStateOpen = "open" - - // SpotInstanceStateActive is a SpotInstanceState enum value - SpotInstanceStateActive = "active" - - // SpotInstanceStateClosed is a SpotInstanceState enum value - SpotInstanceStateClosed = "closed" - - // SpotInstanceStateCancelled is a SpotInstanceState enum value - SpotInstanceStateCancelled = "cancelled" - - // SpotInstanceStateFailed is a SpotInstanceState enum value - SpotInstanceStateFailed = "failed" -) - -const ( - // SpotInstanceTypeOneTime is a SpotInstanceType enum value - SpotInstanceTypeOneTime = "one-time" - - // SpotInstanceTypePersistent is a SpotInstanceType enum value - SpotInstanceTypePersistent = "persistent" -) - -const ( - // StatePendingAcceptance is a State enum value - StatePendingAcceptance = "PendingAcceptance" - - // StatePending is a State enum value - StatePending = "Pending" - - // StateAvailable is a State enum value - StateAvailable = "Available" - - // StateDeleting is a State enum value - StateDeleting = "Deleting" - - // StateDeleted is a State enum value - StateDeleted = "Deleted" - - // StateRejected is a State enum value - StateRejected = "Rejected" - - // StateFailed is a State enum value - StateFailed = "Failed" - - // StateExpired is a State enum value - StateExpired = "Expired" -) - -const ( - // StatusMoveInProgress is a Status enum value - StatusMoveInProgress = "MoveInProgress" - - // StatusInVpc is a Status enum value - StatusInVpc = "InVpc" - - // StatusInClassic is a Status enum value - StatusInClassic = "InClassic" -) - -const ( - // StatusNameReachability is a StatusName enum value - StatusNameReachability = "reachability" -) - -const ( - // StatusTypePassed is a StatusType enum value - StatusTypePassed = "passed" - - // StatusTypeFailed is a StatusType enum value - StatusTypeFailed = "failed" - - // StatusTypeInsufficientData is a StatusType enum value - StatusTypeInsufficientData = "insufficient-data" - - // StatusTypeInitializing is a StatusType enum value - StatusTypeInitializing = "initializing" -) - -const ( - // SubnetCidrBlockStateCodeAssociating is a SubnetCidrBlockStateCode enum value - SubnetCidrBlockStateCodeAssociating = "associating" - - // SubnetCidrBlockStateCodeAssociated is a SubnetCidrBlockStateCode enum value - SubnetCidrBlockStateCodeAssociated = "associated" - - // SubnetCidrBlockStateCodeDisassociating is a SubnetCidrBlockStateCode enum value - SubnetCidrBlockStateCodeDisassociating = "disassociating" - - // SubnetCidrBlockStateCodeDisassociated is a SubnetCidrBlockStateCode enum value - SubnetCidrBlockStateCodeDisassociated = "disassociated" - - // SubnetCidrBlockStateCodeFailing is a SubnetCidrBlockStateCode enum value - SubnetCidrBlockStateCodeFailing = "failing" - - // SubnetCidrBlockStateCodeFailed is a SubnetCidrBlockStateCode enum value - SubnetCidrBlockStateCodeFailed = "failed" -) - -const ( - // SubnetStatePending is a SubnetState enum value - SubnetStatePending = "pending" - - // SubnetStateAvailable is a SubnetState enum value - SubnetStateAvailable = "available" -) - -const ( - // SummaryStatusOk is a SummaryStatus enum value - SummaryStatusOk = "ok" - - // SummaryStatusImpaired is a SummaryStatus enum value - SummaryStatusImpaired = "impaired" - - // SummaryStatusInsufficientData is a SummaryStatus enum value - SummaryStatusInsufficientData = "insufficient-data" - - // SummaryStatusNotApplicable is a SummaryStatus enum value - SummaryStatusNotApplicable = "not-applicable" - - // SummaryStatusInitializing is a SummaryStatus enum value - SummaryStatusInitializing = "initializing" -) - -const ( - // TelemetryStatusUp is a TelemetryStatus enum value - TelemetryStatusUp = "UP" - - // TelemetryStatusDown is a TelemetryStatus enum value - TelemetryStatusDown = "DOWN" -) - -const ( - // TenancyDefault is a Tenancy enum value - TenancyDefault = "default" - - // TenancyDedicated is a Tenancy enum value - TenancyDedicated = "dedicated" - - // TenancyHost is a Tenancy enum value - TenancyHost = "host" -) - -const ( - // TrafficTypeAccept is a TrafficType enum value - TrafficTypeAccept = "ACCEPT" - - // TrafficTypeReject is a TrafficType enum value - TrafficTypeReject = "REJECT" - - // TrafficTypeAll is a TrafficType enum value - TrafficTypeAll = "ALL" -) - -const ( - // TransitGatewayAssociationStateAssociating is a TransitGatewayAssociationState enum value - TransitGatewayAssociationStateAssociating = "associating" - - // TransitGatewayAssociationStateAssociated is a TransitGatewayAssociationState enum value - TransitGatewayAssociationStateAssociated = "associated" - - // TransitGatewayAssociationStateDisassociating is a TransitGatewayAssociationState enum value - TransitGatewayAssociationStateDisassociating = "disassociating" - - // TransitGatewayAssociationStateDisassociated is a TransitGatewayAssociationState enum value - TransitGatewayAssociationStateDisassociated = "disassociated" -) - -const ( - // TransitGatewayAttachmentResourceTypeVpc is a TransitGatewayAttachmentResourceType enum value - TransitGatewayAttachmentResourceTypeVpc = "vpc" - - // TransitGatewayAttachmentResourceTypeVpn is a TransitGatewayAttachmentResourceType enum value - TransitGatewayAttachmentResourceTypeVpn = "vpn" -) - -const ( - // TransitGatewayAttachmentStatePendingAcceptance is a TransitGatewayAttachmentState enum value - TransitGatewayAttachmentStatePendingAcceptance = "pendingAcceptance" - - // TransitGatewayAttachmentStateRollingBack is a TransitGatewayAttachmentState enum value - TransitGatewayAttachmentStateRollingBack = "rollingBack" - - // TransitGatewayAttachmentStatePending is a TransitGatewayAttachmentState enum value - TransitGatewayAttachmentStatePending = "pending" - - // TransitGatewayAttachmentStateAvailable is a TransitGatewayAttachmentState enum value - TransitGatewayAttachmentStateAvailable = "available" - - // TransitGatewayAttachmentStateModifying is a TransitGatewayAttachmentState enum value - TransitGatewayAttachmentStateModifying = "modifying" - - // TransitGatewayAttachmentStateDeleting is a TransitGatewayAttachmentState enum value - TransitGatewayAttachmentStateDeleting = "deleting" - - // TransitGatewayAttachmentStateDeleted is a TransitGatewayAttachmentState enum value - TransitGatewayAttachmentStateDeleted = "deleted" - - // TransitGatewayAttachmentStateFailed is a TransitGatewayAttachmentState enum value - TransitGatewayAttachmentStateFailed = "failed" - - // TransitGatewayAttachmentStateRejected is a TransitGatewayAttachmentState enum value - TransitGatewayAttachmentStateRejected = "rejected" - - // TransitGatewayAttachmentStateRejecting is a TransitGatewayAttachmentState enum value - TransitGatewayAttachmentStateRejecting = "rejecting" - - // TransitGatewayAttachmentStateFailing is a TransitGatewayAttachmentState enum value - TransitGatewayAttachmentStateFailing = "failing" -) - -const ( - // TransitGatewayPropagationStateEnabling is a TransitGatewayPropagationState enum value - TransitGatewayPropagationStateEnabling = "enabling" - - // TransitGatewayPropagationStateEnabled is a TransitGatewayPropagationState enum value - TransitGatewayPropagationStateEnabled = "enabled" - - // TransitGatewayPropagationStateDisabling is a TransitGatewayPropagationState enum value - TransitGatewayPropagationStateDisabling = "disabling" - - // TransitGatewayPropagationStateDisabled is a TransitGatewayPropagationState enum value - TransitGatewayPropagationStateDisabled = "disabled" -) - -const ( - // TransitGatewayRouteStatePending is a TransitGatewayRouteState enum value - TransitGatewayRouteStatePending = "pending" - - // TransitGatewayRouteStateActive is a TransitGatewayRouteState enum value - TransitGatewayRouteStateActive = "active" - - // TransitGatewayRouteStateBlackhole is a TransitGatewayRouteState enum value - TransitGatewayRouteStateBlackhole = "blackhole" - - // TransitGatewayRouteStateDeleting is a TransitGatewayRouteState enum value - TransitGatewayRouteStateDeleting = "deleting" - - // TransitGatewayRouteStateDeleted is a TransitGatewayRouteState enum value - TransitGatewayRouteStateDeleted = "deleted" -) - -const ( - // TransitGatewayRouteTableStatePending is a TransitGatewayRouteTableState enum value - TransitGatewayRouteTableStatePending = "pending" - - // TransitGatewayRouteTableStateAvailable is a TransitGatewayRouteTableState enum value - TransitGatewayRouteTableStateAvailable = "available" - - // TransitGatewayRouteTableStateDeleting is a TransitGatewayRouteTableState enum value - TransitGatewayRouteTableStateDeleting = "deleting" - - // TransitGatewayRouteTableStateDeleted is a TransitGatewayRouteTableState enum value - TransitGatewayRouteTableStateDeleted = "deleted" -) - -const ( - // TransitGatewayRouteTypeStatic is a TransitGatewayRouteType enum value - TransitGatewayRouteTypeStatic = "static" - - // TransitGatewayRouteTypePropagated is a TransitGatewayRouteType enum value - TransitGatewayRouteTypePropagated = "propagated" -) - -const ( - // TransitGatewayStatePending is a TransitGatewayState enum value - TransitGatewayStatePending = "pending" - - // TransitGatewayStateAvailable is a TransitGatewayState enum value - TransitGatewayStateAvailable = "available" - - // TransitGatewayStateModifying is a TransitGatewayState enum value - TransitGatewayStateModifying = "modifying" - - // TransitGatewayStateDeleting is a TransitGatewayState enum value - TransitGatewayStateDeleting = "deleting" - - // TransitGatewayStateDeleted is a TransitGatewayState enum value - TransitGatewayStateDeleted = "deleted" -) - -const ( - // TransportProtocolTcp is a TransportProtocol enum value - TransportProtocolTcp = "tcp" - - // TransportProtocolUdp is a TransportProtocol enum value - TransportProtocolUdp = "udp" -) - -const ( - // UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdMalformed is a UnsuccessfulInstanceCreditSpecificationErrorCode enum value - UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdMalformed = "InvalidInstanceID.Malformed" - - // UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdNotFound is a UnsuccessfulInstanceCreditSpecificationErrorCode enum value - UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdNotFound = "InvalidInstanceID.NotFound" - - // UnsuccessfulInstanceCreditSpecificationErrorCodeIncorrectInstanceState is a UnsuccessfulInstanceCreditSpecificationErrorCode enum value - UnsuccessfulInstanceCreditSpecificationErrorCodeIncorrectInstanceState = "IncorrectInstanceState" - - // UnsuccessfulInstanceCreditSpecificationErrorCodeInstanceCreditSpecificationNotSupported is a UnsuccessfulInstanceCreditSpecificationErrorCode enum value - UnsuccessfulInstanceCreditSpecificationErrorCodeInstanceCreditSpecificationNotSupported = "InstanceCreditSpecification.NotSupported" -) - -const ( - // VirtualizationTypeHvm is a VirtualizationType enum value - VirtualizationTypeHvm = "hvm" - - // VirtualizationTypeParavirtual is a VirtualizationType enum value - VirtualizationTypeParavirtual = "paravirtual" -) - -const ( - // VolumeAttachmentStateAttaching is a VolumeAttachmentState enum value - VolumeAttachmentStateAttaching = "attaching" - - // VolumeAttachmentStateAttached is a VolumeAttachmentState enum value - VolumeAttachmentStateAttached = "attached" - - // VolumeAttachmentStateDetaching is a VolumeAttachmentState enum value - VolumeAttachmentStateDetaching = "detaching" - - // VolumeAttachmentStateDetached is a VolumeAttachmentState enum value - VolumeAttachmentStateDetached = "detached" - - // VolumeAttachmentStateBusy is a VolumeAttachmentState enum value - VolumeAttachmentStateBusy = "busy" -) - -const ( - // VolumeAttributeNameAutoEnableIo is a VolumeAttributeName enum value - VolumeAttributeNameAutoEnableIo = "autoEnableIO" - - // VolumeAttributeNameProductCodes is a VolumeAttributeName enum value - VolumeAttributeNameProductCodes = "productCodes" -) - -const ( - // VolumeModificationStateModifying is a VolumeModificationState enum value - VolumeModificationStateModifying = "modifying" - - // VolumeModificationStateOptimizing is a VolumeModificationState enum value - VolumeModificationStateOptimizing = "optimizing" - - // VolumeModificationStateCompleted is a VolumeModificationState enum value - VolumeModificationStateCompleted = "completed" - - // VolumeModificationStateFailed is a VolumeModificationState enum value - VolumeModificationStateFailed = "failed" -) - -const ( - // VolumeStateCreating is a VolumeState enum value - VolumeStateCreating = "creating" - - // VolumeStateAvailable is a VolumeState enum value - VolumeStateAvailable = "available" - - // VolumeStateInUse is a VolumeState enum value - VolumeStateInUse = "in-use" - - // VolumeStateDeleting is a VolumeState enum value - VolumeStateDeleting = "deleting" - - // VolumeStateDeleted is a VolumeState enum value - VolumeStateDeleted = "deleted" - - // VolumeStateError is a VolumeState enum value - VolumeStateError = "error" -) - -const ( - // VolumeStatusInfoStatusOk is a VolumeStatusInfoStatus enum value - VolumeStatusInfoStatusOk = "ok" - - // VolumeStatusInfoStatusImpaired is a VolumeStatusInfoStatus enum value - VolumeStatusInfoStatusImpaired = "impaired" - - // VolumeStatusInfoStatusInsufficientData is a VolumeStatusInfoStatus enum value - VolumeStatusInfoStatusInsufficientData = "insufficient-data" -) - -const ( - // VolumeStatusNameIoEnabled is a VolumeStatusName enum value - VolumeStatusNameIoEnabled = "io-enabled" - - // VolumeStatusNameIoPerformance is a VolumeStatusName enum value - VolumeStatusNameIoPerformance = "io-performance" -) - -const ( - // VolumeTypeStandard is a VolumeType enum value - VolumeTypeStandard = "standard" - - // VolumeTypeIo1 is a VolumeType enum value - VolumeTypeIo1 = "io1" - - // VolumeTypeGp2 is a VolumeType enum value - VolumeTypeGp2 = "gp2" - - // VolumeTypeSc1 is a VolumeType enum value - VolumeTypeSc1 = "sc1" - - // VolumeTypeSt1 is a VolumeType enum value - VolumeTypeSt1 = "st1" -) - -const ( - // VpcAttributeNameEnableDnsSupport is a VpcAttributeName enum value - VpcAttributeNameEnableDnsSupport = "enableDnsSupport" - - // VpcAttributeNameEnableDnsHostnames is a VpcAttributeName enum value - VpcAttributeNameEnableDnsHostnames = "enableDnsHostnames" -) - -const ( - // VpcCidrBlockStateCodeAssociating is a VpcCidrBlockStateCode enum value - VpcCidrBlockStateCodeAssociating = "associating" - - // VpcCidrBlockStateCodeAssociated is a VpcCidrBlockStateCode enum value - VpcCidrBlockStateCodeAssociated = "associated" - - // VpcCidrBlockStateCodeDisassociating is a VpcCidrBlockStateCode enum value - VpcCidrBlockStateCodeDisassociating = "disassociating" - - // VpcCidrBlockStateCodeDisassociated is a VpcCidrBlockStateCode enum value - VpcCidrBlockStateCodeDisassociated = "disassociated" - - // VpcCidrBlockStateCodeFailing is a VpcCidrBlockStateCode enum value - VpcCidrBlockStateCodeFailing = "failing" - - // VpcCidrBlockStateCodeFailed is a VpcCidrBlockStateCode enum value - VpcCidrBlockStateCodeFailed = "failed" -) - -const ( - // VpcEndpointTypeInterface is a VpcEndpointType enum value - VpcEndpointTypeInterface = "Interface" - - // VpcEndpointTypeGateway is a VpcEndpointType enum value - VpcEndpointTypeGateway = "Gateway" -) - -const ( - // VpcPeeringConnectionStateReasonCodeInitiatingRequest is a VpcPeeringConnectionStateReasonCode enum value - VpcPeeringConnectionStateReasonCodeInitiatingRequest = "initiating-request" - - // VpcPeeringConnectionStateReasonCodePendingAcceptance is a VpcPeeringConnectionStateReasonCode enum value - VpcPeeringConnectionStateReasonCodePendingAcceptance = "pending-acceptance" - - // VpcPeeringConnectionStateReasonCodeActive is a VpcPeeringConnectionStateReasonCode enum value - VpcPeeringConnectionStateReasonCodeActive = "active" - - // VpcPeeringConnectionStateReasonCodeDeleted is a VpcPeeringConnectionStateReasonCode enum value - VpcPeeringConnectionStateReasonCodeDeleted = "deleted" - - // VpcPeeringConnectionStateReasonCodeRejected is a VpcPeeringConnectionStateReasonCode enum value - VpcPeeringConnectionStateReasonCodeRejected = "rejected" - - // VpcPeeringConnectionStateReasonCodeFailed is a VpcPeeringConnectionStateReasonCode enum value - VpcPeeringConnectionStateReasonCodeFailed = "failed" - - // VpcPeeringConnectionStateReasonCodeExpired is a VpcPeeringConnectionStateReasonCode enum value - VpcPeeringConnectionStateReasonCodeExpired = "expired" - - // VpcPeeringConnectionStateReasonCodeProvisioning is a VpcPeeringConnectionStateReasonCode enum value - VpcPeeringConnectionStateReasonCodeProvisioning = "provisioning" - - // VpcPeeringConnectionStateReasonCodeDeleting is a VpcPeeringConnectionStateReasonCode enum value - VpcPeeringConnectionStateReasonCodeDeleting = "deleting" -) - -const ( - // VpcStatePending is a VpcState enum value - VpcStatePending = "pending" - - // VpcStateAvailable is a VpcState enum value - VpcStateAvailable = "available" -) - -const ( - // VpcTenancyDefault is a VpcTenancy enum value - VpcTenancyDefault = "default" -) - -const ( - // VpnEcmpSupportValueEnable is a VpnEcmpSupportValue enum value - VpnEcmpSupportValueEnable = "enable" - - // VpnEcmpSupportValueDisable is a VpnEcmpSupportValue enum value - VpnEcmpSupportValueDisable = "disable" -) - -const ( - // VpnProtocolOpenvpn is a VpnProtocol enum value - VpnProtocolOpenvpn = "openvpn" -) - -const ( - // VpnStatePending is a VpnState enum value - VpnStatePending = "pending" - - // VpnStateAvailable is a VpnState enum value - VpnStateAvailable = "available" - - // VpnStateDeleting is a VpnState enum value - VpnStateDeleting = "deleting" - - // VpnStateDeleted is a VpnState enum value - VpnStateDeleted = "deleted" -) - -const ( - // VpnStaticRouteSourceStatic is a VpnStaticRouteSource enum value - VpnStaticRouteSourceStatic = "Static" -) - -const ( - // ScopeAvailabilityZone is a scope enum value - ScopeAvailabilityZone = "Availability Zone" - - // ScopeRegion is a scope enum value - ScopeRegion = "Region" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/customizations.go deleted file mode 100644 index 7b42719d6..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/customizations.go +++ /dev/null @@ -1,120 +0,0 @@ -package ec2 - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/endpoints" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/internal/sdkrand" -) - -type retryer struct { - client.DefaultRetryer -} - -func (d retryer) RetryRules(r *request.Request) time.Duration { - switch r.Operation.Name { - case opModifyNetworkInterfaceAttribute: - fallthrough - case opAssignPrivateIpAddresses: - return customRetryRule(r) - default: - return d.DefaultRetryer.RetryRules(r) - } -} - -func customRetryRule(r *request.Request) time.Duration { - retryTimes := []time.Duration{ - time.Second, - 3 * time.Second, - 5 * time.Second, - } - - count := r.RetryCount - if count >= len(retryTimes) { - count = len(retryTimes) - 1 - } - - minTime := int(retryTimes[count]) - return time.Duration(sdkrand.SeededRand.Intn(minTime) + minTime) -} - -func setCustomRetryer(c *client.Client) { - maxRetries := aws.IntValue(c.Config.MaxRetries) - if c.Config.MaxRetries == nil || maxRetries == aws.UseServiceDefaultRetries { - maxRetries = 3 - } - - c.Retryer = retryer{ - DefaultRetryer: client.DefaultRetryer{ - NumMaxRetries: maxRetries, - }, - } -} - -func init() { - initClient = func(c *client.Client) { - if c.Config.Retryer == nil { - // Only override the retryer with a custom one if the config - // does not already contain a retryer - setCustomRetryer(c) - } - } - initRequest = func(r *request.Request) { - if r.Operation.Name == opCopySnapshot { // fill the PresignedURL parameter - r.Handlers.Build.PushFront(fillPresignedURL) - } - } -} - -func fillPresignedURL(r *request.Request) { - if !r.ParamsFilled() { - return - } - - origParams := r.Params.(*CopySnapshotInput) - - // Stop if PresignedURL/DestinationRegion is set - if origParams.PresignedUrl != nil || origParams.DestinationRegion != nil { - return - } - - origParams.DestinationRegion = r.Config.Region - newParams := awsutil.CopyOf(r.Params).(*CopySnapshotInput) - - // Create a new request based on the existing request. We will use this to - // presign the CopySnapshot request against the source region. - cfg := r.Config.Copy(aws.NewConfig(). - WithEndpoint(""). - WithRegion(aws.StringValue(origParams.SourceRegion))) - - clientInfo := r.ClientInfo - resolved, err := r.Config.EndpointResolver.EndpointFor( - clientInfo.ServiceName, aws.StringValue(cfg.Region), - func(opt *endpoints.Options) { - opt.DisableSSL = aws.BoolValue(cfg.DisableSSL) - opt.UseDualStack = aws.BoolValue(cfg.UseDualStack) - }, - ) - if err != nil { - r.Error = err - return - } - - clientInfo.Endpoint = resolved.URL - clientInfo.SigningRegion = resolved.SigningRegion - - // Presign a CopySnapshot request with modified params - req := request.New(*cfg, clientInfo, r.Handlers, r.Retryer, r.Operation, newParams, r.Data) - url, err := req.Presign(5 * time.Minute) // 5 minutes should be enough. - if err != nil { // bubble error back up to original request - r.Error = err - return - } - - // We have our URL, set it on params - origParams.PresignedUrl = &url -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go deleted file mode 100644 index c258e0e85..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package ec2 provides the client and types for making API -// requests to Amazon Elastic Compute Cloud. -// -// Amazon Elastic Compute Cloud (Amazon EC2) provides secure and resizable computing -// capacity in the AWS cloud. Using Amazon EC2 eliminates the need to invest -// in hardware up front, so you can develop and deploy applications faster. -// -// To learn more about Amazon EC2, Amazon EBS, and Amazon VPC, see the following -// resources: -// -// * Amazon EC2 product page (http://aws.amazon.com/ec2) -// -// * Amazon EC2 documentation (http://aws.amazon.com/documentation/ec2) -// -// * Amazon EBS product page (http://aws.amazon.com/ebs) -// -// * Amazon VPC product page (http://aws.amazon.com/vpc) -// -// * Amazon VPC documentation (http://aws.amazon.com/documentation/vpc) -// -// See https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15 for more information on this service. -// -// See ec2 package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/ -// -// Using the Client -// -// To contact Amazon Elastic Compute Cloud with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Elastic Compute Cloud client EC2 for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#New -package ec2 diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go deleted file mode 100644 index 3d61d7e35..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go +++ /dev/null @@ -1,3 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ec2 diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go deleted file mode 100644 index 6acbc43fe..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ec2 - -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/ec2query" -) - -// EC2 provides the API operation methods for making requests to -// Amazon Elastic Compute Cloud. See this package's package overview docs -// for details on the service. -// -// EC2 methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type EC2 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 = "ec2" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "EC2" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the EC2 client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a EC2 client from just a session. -// svc := ec2.New(mySession) -// -// // Create a EC2 client with additional configuration -// svc := ec2.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *EC2 { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *EC2 { - svc := &EC2{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2016-11-15", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(ec2query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(ec2query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(ec2query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(ec2query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a EC2 operation and runs any -// custom request initialization. -func (c *EC2) 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/ec2/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go deleted file mode 100644 index 0469f0f01..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go +++ /dev/null @@ -1,1626 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ec2 - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilBundleTaskComplete uses the Amazon EC2 API operation -// DescribeBundleTasks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilBundleTaskComplete(input *DescribeBundleTasksInput) error { - return c.WaitUntilBundleTaskCompleteWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilBundleTaskCompleteWithContext is an extended version of WaitUntilBundleTaskComplete. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilBundleTaskCompleteWithContext(ctx aws.Context, input *DescribeBundleTasksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilBundleTaskComplete", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "BundleTasks[].State", - Expected: "complete", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "BundleTasks[].State", - Expected: "failed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeBundleTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeBundleTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilConversionTaskCancelled uses the Amazon EC2 API operation -// DescribeConversionTasks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilConversionTaskCancelled(input *DescribeConversionTasksInput) error { - return c.WaitUntilConversionTaskCancelledWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilConversionTaskCancelledWithContext is an extended version of WaitUntilConversionTaskCancelled. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilConversionTaskCancelledWithContext(ctx aws.Context, input *DescribeConversionTasksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilConversionTaskCancelled", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "ConversionTasks[].State", - Expected: "cancelled", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeConversionTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeConversionTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilConversionTaskCompleted uses the Amazon EC2 API operation -// DescribeConversionTasks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilConversionTaskCompleted(input *DescribeConversionTasksInput) error { - return c.WaitUntilConversionTaskCompletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilConversionTaskCompletedWithContext is an extended version of WaitUntilConversionTaskCompleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilConversionTaskCompletedWithContext(ctx aws.Context, input *DescribeConversionTasksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilConversionTaskCompleted", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "ConversionTasks[].State", - Expected: "completed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ConversionTasks[].State", - Expected: "cancelled", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ConversionTasks[].State", - Expected: "cancelling", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeConversionTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeConversionTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilConversionTaskDeleted uses the Amazon EC2 API operation -// DescribeConversionTasks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilConversionTaskDeleted(input *DescribeConversionTasksInput) error { - return c.WaitUntilConversionTaskDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilConversionTaskDeletedWithContext is an extended version of WaitUntilConversionTaskDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilConversionTaskDeletedWithContext(ctx aws.Context, input *DescribeConversionTasksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilConversionTaskDeleted", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "ConversionTasks[].State", - Expected: "deleted", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeConversionTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeConversionTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilCustomerGatewayAvailable uses the Amazon EC2 API operation -// DescribeCustomerGateways to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilCustomerGatewayAvailable(input *DescribeCustomerGatewaysInput) error { - return c.WaitUntilCustomerGatewayAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilCustomerGatewayAvailableWithContext is an extended version of WaitUntilCustomerGatewayAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilCustomerGatewayAvailableWithContext(ctx aws.Context, input *DescribeCustomerGatewaysInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilCustomerGatewayAvailable", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "CustomerGateways[].State", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "CustomerGateways[].State", - Expected: "deleted", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "CustomerGateways[].State", - Expected: "deleting", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeCustomerGatewaysInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeCustomerGatewaysRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilExportTaskCancelled uses the Amazon EC2 API operation -// DescribeExportTasks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilExportTaskCancelled(input *DescribeExportTasksInput) error { - return c.WaitUntilExportTaskCancelledWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilExportTaskCancelledWithContext is an extended version of WaitUntilExportTaskCancelled. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilExportTaskCancelledWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilExportTaskCancelled", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "ExportTasks[].State", - Expected: "cancelled", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeExportTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeExportTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilExportTaskCompleted uses the Amazon EC2 API operation -// DescribeExportTasks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilExportTaskCompleted(input *DescribeExportTasksInput) error { - return c.WaitUntilExportTaskCompletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilExportTaskCompletedWithContext is an extended version of WaitUntilExportTaskCompleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilExportTaskCompletedWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilExportTaskCompleted", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "ExportTasks[].State", - Expected: "completed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeExportTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeExportTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilImageAvailable uses the Amazon EC2 API operation -// DescribeImages to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilImageAvailable(input *DescribeImagesInput) error { - return c.WaitUntilImageAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilImageAvailableWithContext is an extended version of WaitUntilImageAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilImageAvailableWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilImageAvailable", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Images[].State", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Images[].State", - Expected: "failed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeImagesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeImagesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilImageExists uses the Amazon EC2 API operation -// DescribeImages to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilImageExists(input *DescribeImagesInput) error { - return c.WaitUntilImageExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilImageExistsWithContext is an extended version of WaitUntilImageExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilImageExistsWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilImageExists", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "length(Images[]) > `0`", - Expected: true, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidAMIID.NotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeImagesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeImagesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInstanceExists uses the Amazon EC2 API operation -// DescribeInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilInstanceExists(input *DescribeInstancesInput) error { - return c.WaitUntilInstanceExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceExistsWithContext is an extended version of WaitUntilInstanceExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilInstanceExistsWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceExists", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(5 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "length(Reservations[]) > `0`", - Expected: true, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidInstanceID.NotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInstanceRunning uses the Amazon EC2 API operation -// DescribeInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilInstanceRunning(input *DescribeInstancesInput) error { - return c.WaitUntilInstanceRunningWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceRunningWithContext is an extended version of WaitUntilInstanceRunning. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilInstanceRunningWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceRunning", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Reservations[].Instances[].State.Name", - Expected: "running", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name", - Expected: "shutting-down", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name", - Expected: "terminated", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name", - Expected: "stopping", - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidInstanceID.NotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInstanceStatusOk uses the Amazon EC2 API operation -// DescribeInstanceStatus to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilInstanceStatusOk(input *DescribeInstanceStatusInput) error { - return c.WaitUntilInstanceStatusOkWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceStatusOkWithContext is an extended version of WaitUntilInstanceStatusOk. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilInstanceStatusOkWithContext(ctx aws.Context, input *DescribeInstanceStatusInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceStatusOk", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "InstanceStatuses[].InstanceStatus.Status", - Expected: "ok", - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidInstanceID.NotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstanceStatusInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstanceStatusRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInstanceStopped uses the Amazon EC2 API operation -// DescribeInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilInstanceStopped(input *DescribeInstancesInput) error { - return c.WaitUntilInstanceStoppedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceStoppedWithContext is an extended version of WaitUntilInstanceStopped. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilInstanceStoppedWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceStopped", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Reservations[].Instances[].State.Name", - Expected: "stopped", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name", - Expected: "pending", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name", - Expected: "terminated", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInstanceTerminated uses the Amazon EC2 API operation -// DescribeInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilInstanceTerminated(input *DescribeInstancesInput) error { - return c.WaitUntilInstanceTerminatedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceTerminatedWithContext is an extended version of WaitUntilInstanceTerminated. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilInstanceTerminatedWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceTerminated", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Reservations[].Instances[].State.Name", - Expected: "terminated", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name", - Expected: "pending", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name", - Expected: "stopping", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilKeyPairExists uses the Amazon EC2 API operation -// DescribeKeyPairs to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilKeyPairExists(input *DescribeKeyPairsInput) error { - return c.WaitUntilKeyPairExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilKeyPairExistsWithContext is an extended version of WaitUntilKeyPairExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilKeyPairExistsWithContext(ctx aws.Context, input *DescribeKeyPairsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilKeyPairExists", - MaxAttempts: 6, - Delay: request.ConstantWaiterDelay(5 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "length(KeyPairs[].KeyName) > `0`", - Expected: true, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidKeyPair.NotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeKeyPairsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeKeyPairsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilNatGatewayAvailable uses the Amazon EC2 API operation -// DescribeNatGateways to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilNatGatewayAvailable(input *DescribeNatGatewaysInput) error { - return c.WaitUntilNatGatewayAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilNatGatewayAvailableWithContext is an extended version of WaitUntilNatGatewayAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilNatGatewayAvailableWithContext(ctx aws.Context, input *DescribeNatGatewaysInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilNatGatewayAvailable", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "NatGateways[].State", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "NatGateways[].State", - Expected: "failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "NatGateways[].State", - Expected: "deleting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "NatGateways[].State", - Expected: "deleted", - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "NatGatewayNotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeNatGatewaysInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeNatGatewaysRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilNetworkInterfaceAvailable uses the Amazon EC2 API operation -// DescribeNetworkInterfaces to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilNetworkInterfaceAvailable(input *DescribeNetworkInterfacesInput) error { - return c.WaitUntilNetworkInterfaceAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilNetworkInterfaceAvailableWithContext is an extended version of WaitUntilNetworkInterfaceAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilNetworkInterfaceAvailableWithContext(ctx aws.Context, input *DescribeNetworkInterfacesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilNetworkInterfaceAvailable", - MaxAttempts: 10, - Delay: request.ConstantWaiterDelay(20 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "NetworkInterfaces[].Status", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidNetworkInterfaceID.NotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeNetworkInterfacesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeNetworkInterfacesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilPasswordDataAvailable uses the Amazon EC2 API operation -// GetPasswordData to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilPasswordDataAvailable(input *GetPasswordDataInput) error { - return c.WaitUntilPasswordDataAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilPasswordDataAvailableWithContext is an extended version of WaitUntilPasswordDataAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilPasswordDataAvailableWithContext(ctx aws.Context, input *GetPasswordDataInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilPasswordDataAvailable", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "length(PasswordData) > `0`", - Expected: true, - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetPasswordDataInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetPasswordDataRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilSnapshotCompleted uses the Amazon EC2 API operation -// DescribeSnapshots to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilSnapshotCompleted(input *DescribeSnapshotsInput) error { - return c.WaitUntilSnapshotCompletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilSnapshotCompletedWithContext is an extended version of WaitUntilSnapshotCompleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilSnapshotCompletedWithContext(ctx aws.Context, input *DescribeSnapshotsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilSnapshotCompleted", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Snapshots[].State", - Expected: "completed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeSnapshotsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeSnapshotsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilSpotInstanceRequestFulfilled uses the Amazon EC2 API operation -// DescribeSpotInstanceRequests to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilSpotInstanceRequestFulfilled(input *DescribeSpotInstanceRequestsInput) error { - return c.WaitUntilSpotInstanceRequestFulfilledWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilSpotInstanceRequestFulfilledWithContext is an extended version of WaitUntilSpotInstanceRequestFulfilled. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilSpotInstanceRequestFulfilledWithContext(ctx aws.Context, input *DescribeSpotInstanceRequestsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilSpotInstanceRequestFulfilled", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code", - Expected: "fulfilled", - }, - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code", - Expected: "request-canceled-and-instance-running", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code", - Expected: "schedule-expired", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code", - Expected: "canceled-before-fulfillment", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code", - Expected: "bad-parameters", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code", - Expected: "system-error", - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidSpotInstanceRequestID.NotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeSpotInstanceRequestsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeSpotInstanceRequestsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilSubnetAvailable uses the Amazon EC2 API operation -// DescribeSubnets to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilSubnetAvailable(input *DescribeSubnetsInput) error { - return c.WaitUntilSubnetAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilSubnetAvailableWithContext is an extended version of WaitUntilSubnetAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilSubnetAvailableWithContext(ctx aws.Context, input *DescribeSubnetsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilSubnetAvailable", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Subnets[].State", - Expected: "available", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeSubnetsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeSubnetsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilSystemStatusOk uses the Amazon EC2 API operation -// DescribeInstanceStatus to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilSystemStatusOk(input *DescribeInstanceStatusInput) error { - return c.WaitUntilSystemStatusOkWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilSystemStatusOkWithContext is an extended version of WaitUntilSystemStatusOk. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilSystemStatusOkWithContext(ctx aws.Context, input *DescribeInstanceStatusInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilSystemStatusOk", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "InstanceStatuses[].SystemStatus.Status", - Expected: "ok", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstanceStatusInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstanceStatusRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilVolumeAvailable uses the Amazon EC2 API operation -// DescribeVolumes to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilVolumeAvailable(input *DescribeVolumesInput) error { - return c.WaitUntilVolumeAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilVolumeAvailableWithContext is an extended version of WaitUntilVolumeAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilVolumeAvailableWithContext(ctx aws.Context, input *DescribeVolumesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilVolumeAvailable", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Volumes[].State", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Volumes[].State", - Expected: "deleted", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeVolumesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeVolumesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilVolumeDeleted uses the Amazon EC2 API operation -// DescribeVolumes to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilVolumeDeleted(input *DescribeVolumesInput) error { - return c.WaitUntilVolumeDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilVolumeDeletedWithContext is an extended version of WaitUntilVolumeDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilVolumeDeletedWithContext(ctx aws.Context, input *DescribeVolumesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilVolumeDeleted", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Volumes[].State", - Expected: "deleted", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidVolume.NotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeVolumesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeVolumesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilVolumeInUse uses the Amazon EC2 API operation -// DescribeVolumes to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilVolumeInUse(input *DescribeVolumesInput) error { - return c.WaitUntilVolumeInUseWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilVolumeInUseWithContext is an extended version of WaitUntilVolumeInUse. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilVolumeInUseWithContext(ctx aws.Context, input *DescribeVolumesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilVolumeInUse", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Volumes[].State", - Expected: "in-use", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Volumes[].State", - Expected: "deleted", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeVolumesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeVolumesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilVpcAvailable uses the Amazon EC2 API operation -// DescribeVpcs to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilVpcAvailable(input *DescribeVpcsInput) error { - return c.WaitUntilVpcAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilVpcAvailableWithContext is an extended version of WaitUntilVpcAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilVpcAvailableWithContext(ctx aws.Context, input *DescribeVpcsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilVpcAvailable", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Vpcs[].State", - Expected: "available", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeVpcsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeVpcsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilVpcExists uses the Amazon EC2 API operation -// DescribeVpcs to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilVpcExists(input *DescribeVpcsInput) error { - return c.WaitUntilVpcExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilVpcExistsWithContext is an extended version of WaitUntilVpcExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilVpcExistsWithContext(ctx aws.Context, input *DescribeVpcsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilVpcExists", - MaxAttempts: 5, - Delay: request.ConstantWaiterDelay(1 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidVpcID.NotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeVpcsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeVpcsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilVpcPeeringConnectionDeleted uses the Amazon EC2 API operation -// DescribeVpcPeeringConnections to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilVpcPeeringConnectionDeleted(input *DescribeVpcPeeringConnectionsInput) error { - return c.WaitUntilVpcPeeringConnectionDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilVpcPeeringConnectionDeletedWithContext is an extended version of WaitUntilVpcPeeringConnectionDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilVpcPeeringConnectionDeletedWithContext(ctx aws.Context, input *DescribeVpcPeeringConnectionsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilVpcPeeringConnectionDeleted", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "VpcPeeringConnections[].Status.Code", - Expected: "deleted", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidVpcPeeringConnectionID.NotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeVpcPeeringConnectionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeVpcPeeringConnectionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilVpcPeeringConnectionExists uses the Amazon EC2 API operation -// DescribeVpcPeeringConnections to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilVpcPeeringConnectionExists(input *DescribeVpcPeeringConnectionsInput) error { - return c.WaitUntilVpcPeeringConnectionExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilVpcPeeringConnectionExistsWithContext is an extended version of WaitUntilVpcPeeringConnectionExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilVpcPeeringConnectionExistsWithContext(ctx aws.Context, input *DescribeVpcPeeringConnectionsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilVpcPeeringConnectionExists", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidVpcPeeringConnectionID.NotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeVpcPeeringConnectionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeVpcPeeringConnectionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilVpnConnectionAvailable uses the Amazon EC2 API operation -// DescribeVpnConnections to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilVpnConnectionAvailable(input *DescribeVpnConnectionsInput) error { - return c.WaitUntilVpnConnectionAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilVpnConnectionAvailableWithContext is an extended version of WaitUntilVpnConnectionAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilVpnConnectionAvailableWithContext(ctx aws.Context, input *DescribeVpnConnectionsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilVpnConnectionAvailable", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "VpnConnections[].State", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "VpnConnections[].State", - Expected: "deleting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "VpnConnections[].State", - Expected: "deleted", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeVpnConnectionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeVpnConnectionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilVpnConnectionDeleted uses the Amazon EC2 API operation -// DescribeVpnConnections to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EC2) WaitUntilVpnConnectionDeleted(input *DescribeVpnConnectionsInput) error { - return c.WaitUntilVpnConnectionDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilVpnConnectionDeletedWithContext is an extended version of WaitUntilVpnConnectionDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EC2) WaitUntilVpnConnectionDeletedWithContext(ctx aws.Context, input *DescribeVpnConnectionsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilVpnConnectionDeleted", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "VpnConnections[].State", - Expected: "deleted", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "VpnConnections[].State", - Expected: "pending", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeVpnConnectionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeVpnConnectionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go deleted file mode 100644 index e3284308c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go +++ /dev/null @@ -1,5834 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ecr - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opBatchCheckLayerAvailability = "BatchCheckLayerAvailability" - -// BatchCheckLayerAvailabilityRequest generates a "aws/request.Request" representing the -// client's request for the BatchCheckLayerAvailability operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchCheckLayerAvailability for more information on using the BatchCheckLayerAvailability -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchCheckLayerAvailabilityRequest method. -// req, resp := client.BatchCheckLayerAvailabilityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailability -func (c *ECR) BatchCheckLayerAvailabilityRequest(input *BatchCheckLayerAvailabilityInput) (req *request.Request, output *BatchCheckLayerAvailabilityOutput) { - op := &request.Operation{ - Name: opBatchCheckLayerAvailability, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchCheckLayerAvailabilityInput{} - } - - output = &BatchCheckLayerAvailabilityOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchCheckLayerAvailability API operation for Amazon EC2 Container Registry. -// -// Check the availability of multiple image layers in a specified registry and -// repository. -// -// This operation is used by the Amazon ECR proxy, and it is not intended for -// general use by customers for pulling and pushing images. In most cases, you -// should use the docker CLI to pull, tag, and push images. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation BatchCheckLayerAvailability for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailability -func (c *ECR) BatchCheckLayerAvailability(input *BatchCheckLayerAvailabilityInput) (*BatchCheckLayerAvailabilityOutput, error) { - req, out := c.BatchCheckLayerAvailabilityRequest(input) - return out, req.Send() -} - -// BatchCheckLayerAvailabilityWithContext is the same as BatchCheckLayerAvailability with the addition of -// the ability to pass a context and additional request options. -// -// See BatchCheckLayerAvailability for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) BatchCheckLayerAvailabilityWithContext(ctx aws.Context, input *BatchCheckLayerAvailabilityInput, opts ...request.Option) (*BatchCheckLayerAvailabilityOutput, error) { - req, out := c.BatchCheckLayerAvailabilityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchDeleteImage = "BatchDeleteImage" - -// BatchDeleteImageRequest generates a "aws/request.Request" representing the -// client's request for the BatchDeleteImage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchDeleteImage for more information on using the BatchDeleteImage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchDeleteImageRequest method. -// req, resp := client.BatchDeleteImageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImage -func (c *ECR) BatchDeleteImageRequest(input *BatchDeleteImageInput) (req *request.Request, output *BatchDeleteImageOutput) { - op := &request.Operation{ - Name: opBatchDeleteImage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchDeleteImageInput{} - } - - output = &BatchDeleteImageOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchDeleteImage API operation for Amazon EC2 Container Registry. -// -// Deletes a list of specified images within a specified repository. Images -// are specified with either imageTag or imageDigest. -// -// You can remove a tag from an image by specifying the image's tag in your -// request. When you remove the last tag from an image, the image is deleted -// from your repository. -// -// You can completely delete an image (and all of its tags) by specifying the -// image's digest in your request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation BatchDeleteImage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImage -func (c *ECR) BatchDeleteImage(input *BatchDeleteImageInput) (*BatchDeleteImageOutput, error) { - req, out := c.BatchDeleteImageRequest(input) - return out, req.Send() -} - -// BatchDeleteImageWithContext is the same as BatchDeleteImage with the addition of -// the ability to pass a context and additional request options. -// -// See BatchDeleteImage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) BatchDeleteImageWithContext(ctx aws.Context, input *BatchDeleteImageInput, opts ...request.Option) (*BatchDeleteImageOutput, error) { - req, out := c.BatchDeleteImageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchGetImage = "BatchGetImage" - -// BatchGetImageRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetImage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetImage for more information on using the BatchGetImage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetImageRequest method. -// req, resp := client.BatchGetImageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImage -func (c *ECR) BatchGetImageRequest(input *BatchGetImageInput) (req *request.Request, output *BatchGetImageOutput) { - op := &request.Operation{ - Name: opBatchGetImage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetImageInput{} - } - - output = &BatchGetImageOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetImage API operation for Amazon EC2 Container Registry. -// -// Gets detailed information for specified images within a specified repository. -// Images are specified with either imageTag or imageDigest. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation BatchGetImage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImage -func (c *ECR) BatchGetImage(input *BatchGetImageInput) (*BatchGetImageOutput, error) { - req, out := c.BatchGetImageRequest(input) - return out, req.Send() -} - -// BatchGetImageWithContext is the same as BatchGetImage with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetImage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) BatchGetImageWithContext(ctx aws.Context, input *BatchGetImageInput, opts ...request.Option) (*BatchGetImageOutput, error) { - req, out := c.BatchGetImageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCompleteLayerUpload = "CompleteLayerUpload" - -// CompleteLayerUploadRequest generates a "aws/request.Request" representing the -// client's request for the CompleteLayerUpload operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CompleteLayerUpload for more information on using the CompleteLayerUpload -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CompleteLayerUploadRequest method. -// req, resp := client.CompleteLayerUploadRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUpload -func (c *ECR) CompleteLayerUploadRequest(input *CompleteLayerUploadInput) (req *request.Request, output *CompleteLayerUploadOutput) { - op := &request.Operation{ - Name: opCompleteLayerUpload, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CompleteLayerUploadInput{} - } - - output = &CompleteLayerUploadOutput{} - req = c.newRequest(op, input, output) - return -} - -// CompleteLayerUpload API operation for Amazon EC2 Container Registry. -// -// Informs Amazon ECR that the image layer upload has completed for a specified -// registry, repository name, and upload ID. You can optionally provide a sha256 -// digest of the image layer for data validation purposes. -// -// This operation is used by the Amazon ECR proxy, and it is not intended for -// general use by customers for pulling and pushing images. In most cases, you -// should use the docker CLI to pull, tag, and push images. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation CompleteLayerUpload for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeUploadNotFoundException "UploadNotFoundException" -// The upload could not be found, or the specified upload id is not valid for -// this repository. -// -// * ErrCodeInvalidLayerException "InvalidLayerException" -// The layer digest calculation performed by Amazon ECR upon receipt of the -// image layer does not match the digest specified. -// -// * ErrCodeLayerPartTooSmallException "LayerPartTooSmallException" -// Layer parts must be at least 5 MiB in size. -// -// * ErrCodeLayerAlreadyExistsException "LayerAlreadyExistsException" -// The image layer already exists in the associated repository. -// -// * ErrCodeEmptyUploadException "EmptyUploadException" -// The specified layer upload does not contain any layer parts. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUpload -func (c *ECR) CompleteLayerUpload(input *CompleteLayerUploadInput) (*CompleteLayerUploadOutput, error) { - req, out := c.CompleteLayerUploadRequest(input) - return out, req.Send() -} - -// CompleteLayerUploadWithContext is the same as CompleteLayerUpload with the addition of -// the ability to pass a context and additional request options. -// -// See CompleteLayerUpload for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) CompleteLayerUploadWithContext(ctx aws.Context, input *CompleteLayerUploadInput, opts ...request.Option) (*CompleteLayerUploadOutput, error) { - req, out := c.CompleteLayerUploadRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRepository = "CreateRepository" - -// CreateRepositoryRequest generates a "aws/request.Request" representing the -// client's request for the CreateRepository operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRepository for more information on using the CreateRepository -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRepositoryRequest method. -// req, resp := client.CreateRepositoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepository -func (c *ECR) CreateRepositoryRequest(input *CreateRepositoryInput) (req *request.Request, output *CreateRepositoryOutput) { - op := &request.Operation{ - Name: opCreateRepository, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRepositoryInput{} - } - - output = &CreateRepositoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRepository API operation for Amazon EC2 Container Registry. -// -// Creates an image repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation CreateRepository for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeInvalidTagParameterException "InvalidTagParameterException" -// An invalid parameter has been specified. Tag keys can have a maximum character -// length of 128 characters, and tag values can have a maximum length of 256 -// characters. -// -// * ErrCodeTooManyTagsException "TooManyTagsException" -// The list of tags on the repository is over the limit. The maximum number -// of tags that can be applied to a repository is 50. -// -// * ErrCodeRepositoryAlreadyExistsException "RepositoryAlreadyExistsException" -// The specified repository already exists in the specified registry. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The operation did not succeed because it would have exceeded a service limit -// for your account. For more information, see Amazon ECR Default Service Limits -// (http://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html) -// in the Amazon Elastic Container Registry User Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepository -func (c *ECR) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) { - req, out := c.CreateRepositoryRequest(input) - return out, req.Send() -} - -// CreateRepositoryWithContext is the same as CreateRepository with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRepository for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) CreateRepositoryWithContext(ctx aws.Context, input *CreateRepositoryInput, opts ...request.Option) (*CreateRepositoryOutput, error) { - req, out := c.CreateRepositoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy" - -// DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLifecyclePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLifecyclePolicy for more information on using the DeleteLifecyclePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLifecyclePolicyRequest method. -// req, resp := client.DeleteLifecyclePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicy -func (c *ECR) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput) { - op := &request.Operation{ - Name: opDeleteLifecyclePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLifecyclePolicyInput{} - } - - output = &DeleteLifecyclePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteLifecyclePolicy API operation for Amazon EC2 Container Registry. -// -// Deletes the specified lifecycle policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation DeleteLifecyclePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeLifecyclePolicyNotFoundException "LifecyclePolicyNotFoundException" -// The lifecycle policy could not be found, and no policy is set to the repository. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicy -func (c *ECR) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error) { - req, out := c.DeleteLifecyclePolicyRequest(input) - return out, req.Send() -} - -// DeleteLifecyclePolicyWithContext is the same as DeleteLifecyclePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLifecyclePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error) { - req, out := c.DeleteLifecyclePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRepository = "DeleteRepository" - -// DeleteRepositoryRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRepository operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRepository for more information on using the DeleteRepository -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRepositoryRequest method. -// req, resp := client.DeleteRepositoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepository -func (c *ECR) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *request.Request, output *DeleteRepositoryOutput) { - op := &request.Operation{ - Name: opDeleteRepository, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRepositoryInput{} - } - - output = &DeleteRepositoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRepository API operation for Amazon EC2 Container Registry. -// -// Deletes an existing image repository. If a repository contains images, you -// must use the force option to delete 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 Amazon EC2 Container Registry's -// API operation DeleteRepository for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeRepositoryNotEmptyException "RepositoryNotEmptyException" -// The specified repository contains images. To delete a repository that contains -// images, you must force the deletion with the force parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepository -func (c *ECR) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) { - req, out := c.DeleteRepositoryRequest(input) - return out, req.Send() -} - -// DeleteRepositoryWithContext is the same as DeleteRepository with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRepository for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) DeleteRepositoryWithContext(ctx aws.Context, input *DeleteRepositoryInput, opts ...request.Option) (*DeleteRepositoryOutput, error) { - req, out := c.DeleteRepositoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRepositoryPolicy = "DeleteRepositoryPolicy" - -// DeleteRepositoryPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRepositoryPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRepositoryPolicy for more information on using the DeleteRepositoryPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRepositoryPolicyRequest method. -// req, resp := client.DeleteRepositoryPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicy -func (c *ECR) DeleteRepositoryPolicyRequest(input *DeleteRepositoryPolicyInput) (req *request.Request, output *DeleteRepositoryPolicyOutput) { - op := &request.Operation{ - Name: opDeleteRepositoryPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRepositoryPolicyInput{} - } - - output = &DeleteRepositoryPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRepositoryPolicy API operation for Amazon EC2 Container Registry. -// -// Deletes the repository policy from a specified repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation DeleteRepositoryPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeRepositoryPolicyNotFoundException "RepositoryPolicyNotFoundException" -// The specified repository and registry combination does not have an associated -// repository policy. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicy -func (c *ECR) DeleteRepositoryPolicy(input *DeleteRepositoryPolicyInput) (*DeleteRepositoryPolicyOutput, error) { - req, out := c.DeleteRepositoryPolicyRequest(input) - return out, req.Send() -} - -// DeleteRepositoryPolicyWithContext is the same as DeleteRepositoryPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRepositoryPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) DeleteRepositoryPolicyWithContext(ctx aws.Context, input *DeleteRepositoryPolicyInput, opts ...request.Option) (*DeleteRepositoryPolicyOutput, error) { - req, out := c.DeleteRepositoryPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeImages = "DescribeImages" - -// DescribeImagesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeImages operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeImages for more information on using the DescribeImages -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeImagesRequest method. -// req, resp := client.DescribeImagesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImages -func (c *ECR) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Request, output *DescribeImagesOutput) { - op := &request.Operation{ - Name: opDescribeImages, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeImagesInput{} - } - - output = &DescribeImagesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeImages API operation for Amazon EC2 Container Registry. -// -// Returns metadata about the images in a repository, including image size, -// image tags, and creation date. -// -// Beginning with Docker version 1.9, the Docker client compresses image layers -// before pushing them to a V2 Docker registry. The output of the docker images -// command shows the uncompressed image size, so it may return a larger image -// size than the image sizes returned by DescribeImages. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation DescribeImages for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeImageNotFoundException "ImageNotFoundException" -// The image requested does not exist in the specified repository. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImages -func (c *ECR) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) { - req, out := c.DescribeImagesRequest(input) - return out, req.Send() -} - -// DescribeImagesWithContext is the same as DescribeImages with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeImages for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) DescribeImagesWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.Option) (*DescribeImagesOutput, error) { - req, out := c.DescribeImagesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeImagesPages iterates over the pages of a DescribeImages operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeImages 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 DescribeImages operation. -// pageNum := 0 -// err := client.DescribeImagesPages(params, -// func(page *DescribeImagesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ECR) DescribeImagesPages(input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool) error { - return c.DescribeImagesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeImagesPagesWithContext same as DescribeImagesPages 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 *ECR) DescribeImagesPagesWithContext(ctx aws.Context, input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeImagesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeImagesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeImagesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeRepositories = "DescribeRepositories" - -// DescribeRepositoriesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRepositories operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRepositories for more information on using the DescribeRepositories -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRepositoriesRequest method. -// req, resp := client.DescribeRepositoriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositories -func (c *ECR) DescribeRepositoriesRequest(input *DescribeRepositoriesInput) (req *request.Request, output *DescribeRepositoriesOutput) { - op := &request.Operation{ - Name: opDescribeRepositories, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeRepositoriesInput{} - } - - output = &DescribeRepositoriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRepositories API operation for Amazon EC2 Container Registry. -// -// Describes image repositories in a registry. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation DescribeRepositories for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositories -func (c *ECR) DescribeRepositories(input *DescribeRepositoriesInput) (*DescribeRepositoriesOutput, error) { - req, out := c.DescribeRepositoriesRequest(input) - return out, req.Send() -} - -// DescribeRepositoriesWithContext is the same as DescribeRepositories with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRepositories for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) DescribeRepositoriesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, opts ...request.Option) (*DescribeRepositoriesOutput, error) { - req, out := c.DescribeRepositoriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeRepositoriesPages iterates over the pages of a DescribeRepositories operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeRepositories 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 DescribeRepositories operation. -// pageNum := 0 -// err := client.DescribeRepositoriesPages(params, -// func(page *DescribeRepositoriesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ECR) DescribeRepositoriesPages(input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool) error { - return c.DescribeRepositoriesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeRepositoriesPagesWithContext same as DescribeRepositoriesPages 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 *ECR) DescribeRepositoriesPagesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeRepositoriesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeRepositoriesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeRepositoriesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetAuthorizationToken = "GetAuthorizationToken" - -// GetAuthorizationTokenRequest generates a "aws/request.Request" representing the -// client's request for the GetAuthorizationToken operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAuthorizationToken for more information on using the GetAuthorizationToken -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAuthorizationTokenRequest method. -// req, resp := client.GetAuthorizationTokenRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationToken -func (c *ECR) GetAuthorizationTokenRequest(input *GetAuthorizationTokenInput) (req *request.Request, output *GetAuthorizationTokenOutput) { - op := &request.Operation{ - Name: opGetAuthorizationToken, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAuthorizationTokenInput{} - } - - output = &GetAuthorizationTokenOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAuthorizationToken API operation for Amazon EC2 Container Registry. -// -// Retrieves a token that is valid for a specified registry for 12 hours. This -// command allows you to use the docker CLI to push and pull images with Amazon -// ECR. If you do not specify a registry, the default registry is assumed. -// -// The authorizationToken returned for each registry specified is a base64 encoded -// string that can be decoded and used in a docker login command to authenticate -// to a registry. The AWS CLI offers an aws ecr get-login command that simplifies -// the login process. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation GetAuthorizationToken for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationToken -func (c *ECR) GetAuthorizationToken(input *GetAuthorizationTokenInput) (*GetAuthorizationTokenOutput, error) { - req, out := c.GetAuthorizationTokenRequest(input) - return out, req.Send() -} - -// GetAuthorizationTokenWithContext is the same as GetAuthorizationToken with the addition of -// the ability to pass a context and additional request options. -// -// See GetAuthorizationToken for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) GetAuthorizationTokenWithContext(ctx aws.Context, input *GetAuthorizationTokenInput, opts ...request.Option) (*GetAuthorizationTokenOutput, error) { - req, out := c.GetAuthorizationTokenRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDownloadUrlForLayer = "GetDownloadUrlForLayer" - -// GetDownloadUrlForLayerRequest generates a "aws/request.Request" representing the -// client's request for the GetDownloadUrlForLayer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDownloadUrlForLayer for more information on using the GetDownloadUrlForLayer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDownloadUrlForLayerRequest method. -// req, resp := client.GetDownloadUrlForLayerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayer -func (c *ECR) GetDownloadUrlForLayerRequest(input *GetDownloadUrlForLayerInput) (req *request.Request, output *GetDownloadUrlForLayerOutput) { - op := &request.Operation{ - Name: opGetDownloadUrlForLayer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDownloadUrlForLayerInput{} - } - - output = &GetDownloadUrlForLayerOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDownloadUrlForLayer API operation for Amazon EC2 Container Registry. -// -// Retrieves the pre-signed Amazon S3 download URL corresponding to an image -// layer. You can only get URLs for image layers that are referenced in an image. -// -// This operation is used by the Amazon ECR proxy, and it is not intended for -// general use by customers for pulling and pushing images. In most cases, you -// should use the docker CLI to pull, tag, and push images. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation GetDownloadUrlForLayer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeLayersNotFoundException "LayersNotFoundException" -// The specified layers could not be found, or the specified layer is not valid -// for this repository. -// -// * ErrCodeLayerInaccessibleException "LayerInaccessibleException" -// The specified layer is not available because it is not associated with an -// image. Unassociated image layers may be cleaned up at any time. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayer -func (c *ECR) GetDownloadUrlForLayer(input *GetDownloadUrlForLayerInput) (*GetDownloadUrlForLayerOutput, error) { - req, out := c.GetDownloadUrlForLayerRequest(input) - return out, req.Send() -} - -// GetDownloadUrlForLayerWithContext is the same as GetDownloadUrlForLayer with the addition of -// the ability to pass a context and additional request options. -// -// See GetDownloadUrlForLayer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) GetDownloadUrlForLayerWithContext(ctx aws.Context, input *GetDownloadUrlForLayerInput, opts ...request.Option) (*GetDownloadUrlForLayerOutput, error) { - req, out := c.GetDownloadUrlForLayerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLifecyclePolicy = "GetLifecyclePolicy" - -// GetLifecyclePolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetLifecyclePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLifecyclePolicy for more information on using the GetLifecyclePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLifecyclePolicyRequest method. -// req, resp := client.GetLifecyclePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicy -func (c *ECR) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput) { - op := &request.Operation{ - Name: opGetLifecyclePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetLifecyclePolicyInput{} - } - - output = &GetLifecyclePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLifecyclePolicy API operation for Amazon EC2 Container Registry. -// -// Retrieves the specified lifecycle policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation GetLifecyclePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeLifecyclePolicyNotFoundException "LifecyclePolicyNotFoundException" -// The lifecycle policy could not be found, and no policy is set to the repository. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicy -func (c *ECR) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error) { - req, out := c.GetLifecyclePolicyRequest(input) - return out, req.Send() -} - -// GetLifecyclePolicyWithContext is the same as GetLifecyclePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetLifecyclePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error) { - req, out := c.GetLifecyclePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLifecyclePolicyPreview = "GetLifecyclePolicyPreview" - -// GetLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the -// client's request for the GetLifecyclePolicyPreview operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLifecyclePolicyPreview for more information on using the GetLifecyclePolicyPreview -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLifecyclePolicyPreviewRequest method. -// req, resp := client.GetLifecyclePolicyPreviewRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreview -func (c *ECR) GetLifecyclePolicyPreviewRequest(input *GetLifecyclePolicyPreviewInput) (req *request.Request, output *GetLifecyclePolicyPreviewOutput) { - op := &request.Operation{ - Name: opGetLifecyclePolicyPreview, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetLifecyclePolicyPreviewInput{} - } - - output = &GetLifecyclePolicyPreviewOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLifecyclePolicyPreview API operation for Amazon EC2 Container Registry. -// -// Retrieves the results of the specified lifecycle policy preview request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation GetLifecyclePolicyPreview for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeLifecyclePolicyPreviewNotFoundException "LifecyclePolicyPreviewNotFoundException" -// There is no dry run for this repository. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreview -func (c *ECR) GetLifecyclePolicyPreview(input *GetLifecyclePolicyPreviewInput) (*GetLifecyclePolicyPreviewOutput, error) { - req, out := c.GetLifecyclePolicyPreviewRequest(input) - return out, req.Send() -} - -// GetLifecyclePolicyPreviewWithContext is the same as GetLifecyclePolicyPreview with the addition of -// the ability to pass a context and additional request options. -// -// See GetLifecyclePolicyPreview for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) GetLifecyclePolicyPreviewWithContext(ctx aws.Context, input *GetLifecyclePolicyPreviewInput, opts ...request.Option) (*GetLifecyclePolicyPreviewOutput, error) { - req, out := c.GetLifecyclePolicyPreviewRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRepositoryPolicy = "GetRepositoryPolicy" - -// GetRepositoryPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetRepositoryPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRepositoryPolicy for more information on using the GetRepositoryPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRepositoryPolicyRequest method. -// req, resp := client.GetRepositoryPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicy -func (c *ECR) GetRepositoryPolicyRequest(input *GetRepositoryPolicyInput) (req *request.Request, output *GetRepositoryPolicyOutput) { - op := &request.Operation{ - Name: opGetRepositoryPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRepositoryPolicyInput{} - } - - output = &GetRepositoryPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRepositoryPolicy API operation for Amazon EC2 Container Registry. -// -// Retrieves the repository policy for a specified repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation GetRepositoryPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeRepositoryPolicyNotFoundException "RepositoryPolicyNotFoundException" -// The specified repository and registry combination does not have an associated -// repository policy. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicy -func (c *ECR) GetRepositoryPolicy(input *GetRepositoryPolicyInput) (*GetRepositoryPolicyOutput, error) { - req, out := c.GetRepositoryPolicyRequest(input) - return out, req.Send() -} - -// GetRepositoryPolicyWithContext is the same as GetRepositoryPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetRepositoryPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) GetRepositoryPolicyWithContext(ctx aws.Context, input *GetRepositoryPolicyInput, opts ...request.Option) (*GetRepositoryPolicyOutput, error) { - req, out := c.GetRepositoryPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInitiateLayerUpload = "InitiateLayerUpload" - -// InitiateLayerUploadRequest generates a "aws/request.Request" representing the -// client's request for the InitiateLayerUpload operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See InitiateLayerUpload for more information on using the InitiateLayerUpload -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the InitiateLayerUploadRequest method. -// req, resp := client.InitiateLayerUploadRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUpload -func (c *ECR) InitiateLayerUploadRequest(input *InitiateLayerUploadInput) (req *request.Request, output *InitiateLayerUploadOutput) { - op := &request.Operation{ - Name: opInitiateLayerUpload, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InitiateLayerUploadInput{} - } - - output = &InitiateLayerUploadOutput{} - req = c.newRequest(op, input, output) - return -} - -// InitiateLayerUpload API operation for Amazon EC2 Container Registry. -// -// Notify Amazon ECR that you intend to upload an image layer. -// -// This operation is used by the Amazon ECR proxy, and it is not intended for -// general use by customers for pulling and pushing images. In most cases, you -// should use the docker CLI to pull, tag, and push images. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation InitiateLayerUpload for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUpload -func (c *ECR) InitiateLayerUpload(input *InitiateLayerUploadInput) (*InitiateLayerUploadOutput, error) { - req, out := c.InitiateLayerUploadRequest(input) - return out, req.Send() -} - -// InitiateLayerUploadWithContext is the same as InitiateLayerUpload with the addition of -// the ability to pass a context and additional request options. -// -// See InitiateLayerUpload for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) InitiateLayerUploadWithContext(ctx aws.Context, input *InitiateLayerUploadInput, opts ...request.Option) (*InitiateLayerUploadOutput, error) { - req, out := c.InitiateLayerUploadRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListImages = "ListImages" - -// ListImagesRequest generates a "aws/request.Request" representing the -// client's request for the ListImages operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListImages for more information on using the ListImages -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListImagesRequest method. -// req, resp := client.ListImagesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImages -func (c *ECR) ListImagesRequest(input *ListImagesInput) (req *request.Request, output *ListImagesOutput) { - op := &request.Operation{ - Name: opListImages, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListImagesInput{} - } - - output = &ListImagesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListImages API operation for Amazon EC2 Container Registry. -// -// Lists all the image IDs for a given repository. -// -// You can filter images based on whether or not they are tagged by setting -// the tagStatus parameter to TAGGED or UNTAGGED. For example, you can filter -// your results to return only UNTAGGED images and then pipe that result to -// a BatchDeleteImage operation to delete them. Or, you can filter your results -// to return only TAGGED images to list all of the tags in your repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation ListImages for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImages -func (c *ECR) ListImages(input *ListImagesInput) (*ListImagesOutput, error) { - req, out := c.ListImagesRequest(input) - return out, req.Send() -} - -// ListImagesWithContext is the same as ListImages with the addition of -// the ability to pass a context and additional request options. -// -// See ListImages for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) ListImagesWithContext(ctx aws.Context, input *ListImagesInput, opts ...request.Option) (*ListImagesOutput, error) { - req, out := c.ListImagesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListImagesPages iterates over the pages of a ListImages operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListImages 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 ListImages operation. -// pageNum := 0 -// err := client.ListImagesPages(params, -// func(page *ListImagesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ECR) ListImagesPages(input *ListImagesInput, fn func(*ListImagesOutput, bool) bool) error { - return c.ListImagesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListImagesPagesWithContext same as ListImagesPages 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 *ECR) ListImagesPagesWithContext(ctx aws.Context, input *ListImagesInput, fn func(*ListImagesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListImagesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListImagesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListImagesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTagsForResource = "ListTagsForResource" - -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the 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/ecr-2015-09-21/ListTagsForResource -func (c *ECR) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for Amazon EC2 Container Registry. -// -// List the tags for an Amazon ECR resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListTagsForResource -func (c *ECR) 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 *ECR) 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 opPutImage = "PutImage" - -// PutImageRequest generates a "aws/request.Request" representing the -// client's request for the PutImage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutImage for more information on using the PutImage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutImageRequest method. -// req, resp := client.PutImageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImage -func (c *ECR) PutImageRequest(input *PutImageInput) (req *request.Request, output *PutImageOutput) { - op := &request.Operation{ - Name: opPutImage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutImageInput{} - } - - output = &PutImageOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutImage API operation for Amazon EC2 Container Registry. -// -// Creates or updates the image manifest and tags associated with an image. -// -// This operation is used by the Amazon ECR proxy, and it is not intended for -// general use by customers for pulling and pushing images. In most cases, you -// should use the docker CLI to pull, tag, and push images. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation PutImage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeImageAlreadyExistsException "ImageAlreadyExistsException" -// The specified image has already been pushed, and there were no changes to -// the manifest or image tag after the last push. -// -// * ErrCodeLayersNotFoundException "LayersNotFoundException" -// The specified layers could not be found, or the specified layer is not valid -// for this repository. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The operation did not succeed because it would have exceeded a service limit -// for your account. For more information, see Amazon ECR Default Service Limits -// (http://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html) -// in the Amazon Elastic Container Registry User Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImage -func (c *ECR) PutImage(input *PutImageInput) (*PutImageOutput, error) { - req, out := c.PutImageRequest(input) - return out, req.Send() -} - -// PutImageWithContext is the same as PutImage with the addition of -// the ability to pass a context and additional request options. -// -// See PutImage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) PutImageWithContext(ctx aws.Context, input *PutImageInput, opts ...request.Option) (*PutImageOutput, error) { - req, out := c.PutImageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutLifecyclePolicy = "PutLifecyclePolicy" - -// PutLifecyclePolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutLifecyclePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutLifecyclePolicy for more information on using the PutLifecyclePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutLifecyclePolicyRequest method. -// req, resp := client.PutLifecyclePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicy -func (c *ECR) PutLifecyclePolicyRequest(input *PutLifecyclePolicyInput) (req *request.Request, output *PutLifecyclePolicyOutput) { - op := &request.Operation{ - Name: opPutLifecyclePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutLifecyclePolicyInput{} - } - - output = &PutLifecyclePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutLifecyclePolicy API operation for Amazon EC2 Container Registry. -// -// Creates or updates a lifecycle policy. For information about lifecycle policy -// syntax, see Lifecycle Policy Template (http://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation PutLifecyclePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicy -func (c *ECR) PutLifecyclePolicy(input *PutLifecyclePolicyInput) (*PutLifecyclePolicyOutput, error) { - req, out := c.PutLifecyclePolicyRequest(input) - return out, req.Send() -} - -// PutLifecyclePolicyWithContext is the same as PutLifecyclePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutLifecyclePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) PutLifecyclePolicyWithContext(ctx aws.Context, input *PutLifecyclePolicyInput, opts ...request.Option) (*PutLifecyclePolicyOutput, error) { - req, out := c.PutLifecyclePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetRepositoryPolicy = "SetRepositoryPolicy" - -// SetRepositoryPolicyRequest generates a "aws/request.Request" representing the -// client's request for the SetRepositoryPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetRepositoryPolicy for more information on using the SetRepositoryPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetRepositoryPolicyRequest method. -// req, resp := client.SetRepositoryPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicy -func (c *ECR) SetRepositoryPolicyRequest(input *SetRepositoryPolicyInput) (req *request.Request, output *SetRepositoryPolicyOutput) { - op := &request.Operation{ - Name: opSetRepositoryPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetRepositoryPolicyInput{} - } - - output = &SetRepositoryPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetRepositoryPolicy API operation for Amazon EC2 Container Registry. -// -// Applies a repository policy on a specified repository to control access permissions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation SetRepositoryPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicy -func (c *ECR) SetRepositoryPolicy(input *SetRepositoryPolicyInput) (*SetRepositoryPolicyOutput, error) { - req, out := c.SetRepositoryPolicyRequest(input) - return out, req.Send() -} - -// SetRepositoryPolicyWithContext is the same as SetRepositoryPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See SetRepositoryPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) SetRepositoryPolicyWithContext(ctx aws.Context, input *SetRepositoryPolicyInput, opts ...request.Option) (*SetRepositoryPolicyOutput, error) { - req, out := c.SetRepositoryPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartLifecyclePolicyPreview = "StartLifecyclePolicyPreview" - -// StartLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the -// client's request for the StartLifecyclePolicyPreview operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartLifecyclePolicyPreview for more information on using the StartLifecyclePolicyPreview -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartLifecyclePolicyPreviewRequest method. -// req, resp := client.StartLifecyclePolicyPreviewRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview -func (c *ECR) StartLifecyclePolicyPreviewRequest(input *StartLifecyclePolicyPreviewInput) (req *request.Request, output *StartLifecyclePolicyPreviewOutput) { - op := &request.Operation{ - Name: opStartLifecyclePolicyPreview, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartLifecyclePolicyPreviewInput{} - } - - output = &StartLifecyclePolicyPreviewOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartLifecyclePolicyPreview API operation for Amazon EC2 Container Registry. -// -// Starts a preview of the specified lifecycle policy. This allows you to see -// the results before creating the lifecycle policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation StartLifecyclePolicyPreview for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeLifecyclePolicyNotFoundException "LifecyclePolicyNotFoundException" -// The lifecycle policy could not be found, and no policy is set to the repository. -// -// * ErrCodeLifecyclePolicyPreviewInProgressException "LifecyclePolicyPreviewInProgressException" -// The previous lifecycle policy preview request has not completed. Please try -// again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview -func (c *ECR) StartLifecyclePolicyPreview(input *StartLifecyclePolicyPreviewInput) (*StartLifecyclePolicyPreviewOutput, error) { - req, out := c.StartLifecyclePolicyPreviewRequest(input) - return out, req.Send() -} - -// StartLifecyclePolicyPreviewWithContext is the same as StartLifecyclePolicyPreview with the addition of -// the ability to pass a context and additional request options. -// -// See StartLifecyclePolicyPreview for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) StartLifecyclePolicyPreviewWithContext(ctx aws.Context, input *StartLifecyclePolicyPreviewInput, opts ...request.Option) (*StartLifecyclePolicyPreviewOutput, error) { - req, out := c.StartLifecyclePolicyPreviewRequest(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/ecr-2015-09-21/TagResource -func (c *ECR) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for Amazon EC2 Container Registry. -// -// Adds specified tags to a resource with the specified ARN. Existing tags on -// a resource are not changed if they are not specified in 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 Amazon EC2 Container Registry's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeInvalidTagParameterException "InvalidTagParameterException" -// An invalid parameter has been specified. Tag keys can have a maximum character -// length of 128 characters, and tag values can have a maximum length of 256 -// characters. -// -// * ErrCodeTooManyTagsException "TooManyTagsException" -// The list of tags on the repository is over the limit. The maximum number -// of tags that can be applied to a repository is 50. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TagResource -func (c *ECR) 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 *ECR) 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/ecr-2015-09-21/UntagResource -func (c *ECR) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for Amazon EC2 Container Registry. -// -// Deletes specified tags from a resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeInvalidTagParameterException "InvalidTagParameterException" -// An invalid parameter has been specified. Tag keys can have a maximum character -// length of 128 characters, and tag values can have a maximum length of 256 -// characters. -// -// * ErrCodeTooManyTagsException "TooManyTagsException" -// The list of tags on the repository is over the limit. The maximum number -// of tags that can be applied to a repository is 50. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UntagResource -func (c *ECR) 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 *ECR) 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 opUploadLayerPart = "UploadLayerPart" - -// UploadLayerPartRequest generates a "aws/request.Request" representing the -// client's request for the UploadLayerPart operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UploadLayerPart for more information on using the UploadLayerPart -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UploadLayerPartRequest method. -// req, resp := client.UploadLayerPartRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPart -func (c *ECR) UploadLayerPartRequest(input *UploadLayerPartInput) (req *request.Request, output *UploadLayerPartOutput) { - op := &request.Operation{ - Name: opUploadLayerPart, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UploadLayerPartInput{} - } - - output = &UploadLayerPartOutput{} - req = c.newRequest(op, input, output) - return -} - -// UploadLayerPart API operation for Amazon EC2 Container Registry. -// -// Uploads an image layer part to Amazon ECR. -// -// This operation is used by the Amazon ECR proxy, and it is not intended for -// general use by customers for pulling and pushing images. In most cases, you -// should use the docker CLI to pull, tag, and push images. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Registry's -// API operation UploadLayerPart for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeInvalidLayerPartException "InvalidLayerPartException" -// The layer part size is not valid, or the first byte specified is not consecutive -// to the last byte of a previous layer part upload. -// -// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" -// The specified repository could not be found. Check the spelling of the specified -// repository and ensure that you are performing operations on the correct registry. -// -// * ErrCodeUploadNotFoundException "UploadNotFoundException" -// The upload could not be found, or the specified upload id is not valid for -// this repository. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The operation did not succeed because it would have exceeded a service limit -// for your account. For more information, see Amazon ECR Default Service Limits -// (http://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html) -// in the Amazon Elastic Container Registry User Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPart -func (c *ECR) UploadLayerPart(input *UploadLayerPartInput) (*UploadLayerPartOutput, error) { - req, out := c.UploadLayerPartRequest(input) - return out, req.Send() -} - -// UploadLayerPartWithContext is the same as UploadLayerPart with the addition of -// the ability to pass a context and additional request options. -// -// See UploadLayerPart for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECR) UploadLayerPartWithContext(ctx aws.Context, input *UploadLayerPartInput, opts ...request.Option) (*UploadLayerPartOutput, error) { - req, out := c.UploadLayerPartRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// An object representing authorization data for an Amazon ECR registry. -type AuthorizationData struct { - _ struct{} `type:"structure"` - - // A base64-encoded string that contains authorization data for the specified - // Amazon ECR registry. When the string is decoded, it is presented in the format - // user:password for private registry authentication using docker login. - AuthorizationToken *string `locationName:"authorizationToken" type:"string"` - - // The Unix time in seconds and milliseconds when the authorization token expires. - // Authorization tokens are valid for 12 hours. - ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp"` - - // The registry URL to use for this authorization token in a docker login command. - // The Amazon ECR registry URL format is https://aws_account_id.dkr.ecr.region.amazonaws.com. - // For example, https://012345678910.dkr.ecr.us-east-1.amazonaws.com.. - ProxyEndpoint *string `locationName:"proxyEndpoint" type:"string"` -} - -// String returns the string representation -func (s AuthorizationData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizationData) GoString() string { - return s.String() -} - -// SetAuthorizationToken sets the AuthorizationToken field's value. -func (s *AuthorizationData) SetAuthorizationToken(v string) *AuthorizationData { - s.AuthorizationToken = &v - return s -} - -// SetExpiresAt sets the ExpiresAt field's value. -func (s *AuthorizationData) SetExpiresAt(v time.Time) *AuthorizationData { - s.ExpiresAt = &v - return s -} - -// SetProxyEndpoint sets the ProxyEndpoint field's value. -func (s *AuthorizationData) SetProxyEndpoint(v string) *AuthorizationData { - s.ProxyEndpoint = &v - return s -} - -type BatchCheckLayerAvailabilityInput struct { - _ struct{} `type:"structure"` - - // The digests of the image layers to check. - // - // LayerDigests is a required field - LayerDigests []*string `locationName:"layerDigests" min:"1" type:"list" required:"true"` - - // The AWS account ID associated with the registry that contains the image layers - // to check. If you do not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository that is associated with the image layers to check. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s BatchCheckLayerAvailabilityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchCheckLayerAvailabilityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchCheckLayerAvailabilityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchCheckLayerAvailabilityInput"} - if s.LayerDigests == nil { - invalidParams.Add(request.NewErrParamRequired("LayerDigests")) - } - if s.LayerDigests != nil && len(s.LayerDigests) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1)) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLayerDigests sets the LayerDigests field's value. -func (s *BatchCheckLayerAvailabilityInput) SetLayerDigests(v []*string) *BatchCheckLayerAvailabilityInput { - s.LayerDigests = v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *BatchCheckLayerAvailabilityInput) SetRegistryId(v string) *BatchCheckLayerAvailabilityInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *BatchCheckLayerAvailabilityInput) SetRepositoryName(v string) *BatchCheckLayerAvailabilityInput { - s.RepositoryName = &v - return s -} - -type BatchCheckLayerAvailabilityOutput struct { - _ struct{} `type:"structure"` - - // Any failures associated with the call. - Failures []*LayerFailure `locationName:"failures" type:"list"` - - // A list of image layer objects corresponding to the image layer references - // in the request. - Layers []*Layer `locationName:"layers" type:"list"` -} - -// String returns the string representation -func (s BatchCheckLayerAvailabilityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchCheckLayerAvailabilityOutput) GoString() string { - return s.String() -} - -// SetFailures sets the Failures field's value. -func (s *BatchCheckLayerAvailabilityOutput) SetFailures(v []*LayerFailure) *BatchCheckLayerAvailabilityOutput { - s.Failures = v - return s -} - -// SetLayers sets the Layers field's value. -func (s *BatchCheckLayerAvailabilityOutput) SetLayers(v []*Layer) *BatchCheckLayerAvailabilityOutput { - s.Layers = v - return s -} - -// Deletes specified images within a specified repository. Images are specified -// with either the imageTag or imageDigest. -type BatchDeleteImageInput struct { - _ struct{} `type:"structure"` - - // A list of image ID references that correspond to images to delete. The format - // of the imageIds reference is imageTag=tag or imageDigest=digest. - // - // ImageIds is a required field - ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list" required:"true"` - - // The AWS account ID associated with the registry that contains the image to - // delete. If you do not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The repository that contains the image to delete. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s BatchDeleteImageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteImageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchDeleteImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchDeleteImageInput"} - if s.ImageIds == nil { - invalidParams.Add(request.NewErrParamRequired("ImageIds")) - } - if s.ImageIds != nil && len(s.ImageIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1)) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetImageIds sets the ImageIds field's value. -func (s *BatchDeleteImageInput) SetImageIds(v []*ImageIdentifier) *BatchDeleteImageInput { - s.ImageIds = v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *BatchDeleteImageInput) SetRegistryId(v string) *BatchDeleteImageInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *BatchDeleteImageInput) SetRepositoryName(v string) *BatchDeleteImageInput { - s.RepositoryName = &v - return s -} - -type BatchDeleteImageOutput struct { - _ struct{} `type:"structure"` - - // Any failures associated with the call. - Failures []*ImageFailure `locationName:"failures" type:"list"` - - // The image IDs of the deleted images. - ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"` -} - -// String returns the string representation -func (s BatchDeleteImageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteImageOutput) GoString() string { - return s.String() -} - -// SetFailures sets the Failures field's value. -func (s *BatchDeleteImageOutput) SetFailures(v []*ImageFailure) *BatchDeleteImageOutput { - s.Failures = v - return s -} - -// SetImageIds sets the ImageIds field's value. -func (s *BatchDeleteImageOutput) SetImageIds(v []*ImageIdentifier) *BatchDeleteImageOutput { - s.ImageIds = v - return s -} - -type BatchGetImageInput struct { - _ struct{} `type:"structure"` - - // The accepted media types for the request. - // - // Valid values: application/vnd.docker.distribution.manifest.v1+json | application/vnd.docker.distribution.manifest.v2+json - // | application/vnd.oci.image.manifest.v1+json - AcceptedMediaTypes []*string `locationName:"acceptedMediaTypes" min:"1" type:"list"` - - // A list of image ID references that correspond to images to describe. The - // format of the imageIds reference is imageTag=tag or imageDigest=digest. - // - // ImageIds is a required field - ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list" required:"true"` - - // The AWS account ID associated with the registry that contains the images - // to describe. If you do not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The repository that contains the images to describe. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s BatchGetImageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetImageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetImageInput"} - if s.AcceptedMediaTypes != nil && len(s.AcceptedMediaTypes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AcceptedMediaTypes", 1)) - } - if s.ImageIds == nil { - invalidParams.Add(request.NewErrParamRequired("ImageIds")) - } - if s.ImageIds != nil && len(s.ImageIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1)) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptedMediaTypes sets the AcceptedMediaTypes field's value. -func (s *BatchGetImageInput) SetAcceptedMediaTypes(v []*string) *BatchGetImageInput { - s.AcceptedMediaTypes = v - return s -} - -// SetImageIds sets the ImageIds field's value. -func (s *BatchGetImageInput) SetImageIds(v []*ImageIdentifier) *BatchGetImageInput { - s.ImageIds = v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *BatchGetImageInput) SetRegistryId(v string) *BatchGetImageInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *BatchGetImageInput) SetRepositoryName(v string) *BatchGetImageInput { - s.RepositoryName = &v - return s -} - -type BatchGetImageOutput struct { - _ struct{} `type:"structure"` - - // Any failures associated with the call. - Failures []*ImageFailure `locationName:"failures" type:"list"` - - // A list of image objects corresponding to the image references in the request. - Images []*Image `locationName:"images" type:"list"` -} - -// String returns the string representation -func (s BatchGetImageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetImageOutput) GoString() string { - return s.String() -} - -// SetFailures sets the Failures field's value. -func (s *BatchGetImageOutput) SetFailures(v []*ImageFailure) *BatchGetImageOutput { - s.Failures = v - return s -} - -// SetImages sets the Images field's value. -func (s *BatchGetImageOutput) SetImages(v []*Image) *BatchGetImageOutput { - s.Images = v - return s -} - -type CompleteLayerUploadInput struct { - _ struct{} `type:"structure"` - - // The sha256 digest of the image layer. - // - // LayerDigests is a required field - LayerDigests []*string `locationName:"layerDigests" min:"1" type:"list" required:"true"` - - // The AWS account ID associated with the registry to which to upload layers. - // If you do not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository to associate with the image layer. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` - - // The upload ID from a previous InitiateLayerUpload operation to associate - // with the image layer. - // - // UploadId is a required field - UploadId *string `locationName:"uploadId" type:"string" required:"true"` -} - -// String returns the string representation -func (s CompleteLayerUploadInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CompleteLayerUploadInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CompleteLayerUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CompleteLayerUploadInput"} - if s.LayerDigests == nil { - invalidParams.Add(request.NewErrParamRequired("LayerDigests")) - } - if s.LayerDigests != nil && len(s.LayerDigests) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1)) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - if s.UploadId == nil { - invalidParams.Add(request.NewErrParamRequired("UploadId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLayerDigests sets the LayerDigests field's value. -func (s *CompleteLayerUploadInput) SetLayerDigests(v []*string) *CompleteLayerUploadInput { - s.LayerDigests = v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *CompleteLayerUploadInput) SetRegistryId(v string) *CompleteLayerUploadInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *CompleteLayerUploadInput) SetRepositoryName(v string) *CompleteLayerUploadInput { - s.RepositoryName = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *CompleteLayerUploadInput) SetUploadId(v string) *CompleteLayerUploadInput { - s.UploadId = &v - return s -} - -type CompleteLayerUploadOutput struct { - _ struct{} `type:"structure"` - - // The sha256 digest of the image layer. - LayerDigest *string `locationName:"layerDigest" type:"string"` - - // The registry ID associated with the request. - RegistryId *string `locationName:"registryId" type:"string"` - - // The repository name associated with the request. - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` - - // The upload ID associated with the layer. - UploadId *string `locationName:"uploadId" type:"string"` -} - -// String returns the string representation -func (s CompleteLayerUploadOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CompleteLayerUploadOutput) GoString() string { - return s.String() -} - -// SetLayerDigest sets the LayerDigest field's value. -func (s *CompleteLayerUploadOutput) SetLayerDigest(v string) *CompleteLayerUploadOutput { - s.LayerDigest = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *CompleteLayerUploadOutput) SetRegistryId(v string) *CompleteLayerUploadOutput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *CompleteLayerUploadOutput) SetRepositoryName(v string) *CompleteLayerUploadOutput { - s.RepositoryName = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *CompleteLayerUploadOutput) SetUploadId(v string) *CompleteLayerUploadOutput { - s.UploadId = &v - return s -} - -type CreateRepositoryInput struct { - _ struct{} `type:"structure"` - - // The name to use for the repository. The repository name may be specified - // on its own (such as nginx-web-app) or it can be prepended with a namespace - // to group the repository into a category (such as project-a/nginx-web-app). - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` - - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateRepositoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRepositoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRepositoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRepositoryInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *CreateRepositoryInput) SetRepositoryName(v string) *CreateRepositoryInput { - s.RepositoryName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateRepositoryInput) SetTags(v []*Tag) *CreateRepositoryInput { - s.Tags = v - return s -} - -type CreateRepositoryOutput struct { - _ struct{} `type:"structure"` - - // The repository that was created. - Repository *Repository `locationName:"repository" type:"structure"` -} - -// String returns the string representation -func (s CreateRepositoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRepositoryOutput) GoString() string { - return s.String() -} - -// SetRepository sets the Repository field's value. -func (s *CreateRepositoryOutput) SetRepository(v *Repository) *CreateRepositoryOutput { - s.Repository = v - return s -} - -type DeleteLifecyclePolicyInput struct { - _ struct{} `type:"structure"` - - // The AWS account ID associated with the registry that contains the repository. - // If you do not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLifecyclePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLifecyclePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLifecyclePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLifecyclePolicyInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRegistryId sets the RegistryId field's value. -func (s *DeleteLifecyclePolicyInput) SetRegistryId(v string) *DeleteLifecyclePolicyInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *DeleteLifecyclePolicyInput) SetRepositoryName(v string) *DeleteLifecyclePolicyInput { - s.RepositoryName = &v - return s -} - -type DeleteLifecyclePolicyOutput struct { - _ struct{} `type:"structure"` - - // The time stamp of the last time that the lifecycle policy was run. - LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp"` - - // The JSON lifecycle policy text. - LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` - - // The registry ID associated with the request. - RegistryId *string `locationName:"registryId" type:"string"` - - // The repository name associated with the request. - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` -} - -// String returns the string representation -func (s DeleteLifecyclePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLifecyclePolicyOutput) GoString() string { - return s.String() -} - -// SetLastEvaluatedAt sets the LastEvaluatedAt field's value. -func (s *DeleteLifecyclePolicyOutput) SetLastEvaluatedAt(v time.Time) *DeleteLifecyclePolicyOutput { - s.LastEvaluatedAt = &v - return s -} - -// SetLifecyclePolicyText sets the LifecyclePolicyText field's value. -func (s *DeleteLifecyclePolicyOutput) SetLifecyclePolicyText(v string) *DeleteLifecyclePolicyOutput { - s.LifecyclePolicyText = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *DeleteLifecyclePolicyOutput) SetRegistryId(v string) *DeleteLifecyclePolicyOutput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *DeleteLifecyclePolicyOutput) SetRepositoryName(v string) *DeleteLifecyclePolicyOutput { - s.RepositoryName = &v - return s -} - -type DeleteRepositoryInput struct { - _ struct{} `type:"structure"` - - // If a repository contains images, forces the deletion. - Force *bool `locationName:"force" type:"boolean"` - - // The AWS account ID associated with the registry that contains the repository - // to delete. If you do not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository to delete. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRepositoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRepositoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRepositoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForce sets the Force field's value. -func (s *DeleteRepositoryInput) SetForce(v bool) *DeleteRepositoryInput { - s.Force = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *DeleteRepositoryInput) SetRegistryId(v string) *DeleteRepositoryInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *DeleteRepositoryInput) SetRepositoryName(v string) *DeleteRepositoryInput { - s.RepositoryName = &v - return s -} - -type DeleteRepositoryOutput struct { - _ struct{} `type:"structure"` - - // The repository that was deleted. - Repository *Repository `locationName:"repository" type:"structure"` -} - -// String returns the string representation -func (s DeleteRepositoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRepositoryOutput) GoString() string { - return s.String() -} - -// SetRepository sets the Repository field's value. -func (s *DeleteRepositoryOutput) SetRepository(v *Repository) *DeleteRepositoryOutput { - s.Repository = v - return s -} - -type DeleteRepositoryPolicyInput struct { - _ struct{} `type:"structure"` - - // The AWS account ID associated with the registry that contains the repository - // policy to delete. If you do not specify a registry, the default registry - // is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository that is associated with the repository policy - // to delete. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRepositoryPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRepositoryPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRepositoryPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryPolicyInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRegistryId sets the RegistryId field's value. -func (s *DeleteRepositoryPolicyInput) SetRegistryId(v string) *DeleteRepositoryPolicyInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *DeleteRepositoryPolicyInput) SetRepositoryName(v string) *DeleteRepositoryPolicyInput { - s.RepositoryName = &v - return s -} - -type DeleteRepositoryPolicyOutput struct { - _ struct{} `type:"structure"` - - // The JSON repository policy that was deleted from the repository. - PolicyText *string `locationName:"policyText" type:"string"` - - // The registry ID associated with the request. - RegistryId *string `locationName:"registryId" type:"string"` - - // The repository name associated with the request. - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` -} - -// String returns the string representation -func (s DeleteRepositoryPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRepositoryPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicyText sets the PolicyText field's value. -func (s *DeleteRepositoryPolicyOutput) SetPolicyText(v string) *DeleteRepositoryPolicyOutput { - s.PolicyText = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *DeleteRepositoryPolicyOutput) SetRegistryId(v string) *DeleteRepositoryPolicyOutput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *DeleteRepositoryPolicyOutput) SetRepositoryName(v string) *DeleteRepositoryPolicyOutput { - s.RepositoryName = &v - return s -} - -// An object representing a filter on a DescribeImages operation. -type DescribeImagesFilter struct { - _ struct{} `type:"structure"` - - // The tag status with which to filter your DescribeImages results. You can - // filter results based on whether they are TAGGED or UNTAGGED. - TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"` -} - -// String returns the string representation -func (s DescribeImagesFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeImagesFilter) GoString() string { - return s.String() -} - -// SetTagStatus sets the TagStatus field's value. -func (s *DescribeImagesFilter) SetTagStatus(v string) *DescribeImagesFilter { - s.TagStatus = &v - return s -} - -type DescribeImagesInput struct { - _ struct{} `type:"structure"` - - // The filter key and value with which to filter your DescribeImages results. - Filter *DescribeImagesFilter `locationName:"filter" type:"structure"` - - // The list of image IDs for the requested repository. - ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"` - - // The maximum number of repository results returned by DescribeImages in paginated - // output. When this parameter is used, DescribeImages only returns maxResults - // results in a single page along with a nextToken response element. The remaining - // results of the initial request can be seen by sending another DescribeImages - // request with the returned nextToken value. This value can be between 1 and - // 1000. If this parameter is not used, then DescribeImages returns up to 100 - // results and a nextToken value, if applicable. This option cannot be used - // when you specify images with imageIds. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // The nextToken value returned from a previous paginated DescribeImages request - // where maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. This value is null when there are no more results to return. - // This option cannot be used when you specify images with imageIds. - NextToken *string `locationName:"nextToken" type:"string"` - - // The AWS account ID associated with the registry that contains the repository - // in which to describe images. If you do not specify a registry, the default - // registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // A list of repositories to describe. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeImagesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeImagesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeImagesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeImagesInput"} - if s.ImageIds != nil && len(s.ImageIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *DescribeImagesInput) SetFilter(v *DescribeImagesFilter) *DescribeImagesInput { - s.Filter = v - return s -} - -// SetImageIds sets the ImageIds field's value. -func (s *DescribeImagesInput) SetImageIds(v []*ImageIdentifier) *DescribeImagesInput { - s.ImageIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeImagesInput) SetMaxResults(v int64) *DescribeImagesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeImagesInput) SetNextToken(v string) *DescribeImagesInput { - s.NextToken = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *DescribeImagesInput) SetRegistryId(v string) *DescribeImagesInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *DescribeImagesInput) SetRepositoryName(v string) *DescribeImagesInput { - s.RepositoryName = &v - return s -} - -type DescribeImagesOutput struct { - _ struct{} `type:"structure"` - - // A list of ImageDetail objects that contain data about the image. - ImageDetails []*ImageDetail `locationName:"imageDetails" type:"list"` - - // The nextToken value to include in a future DescribeImages request. When the - // results of a DescribeImages request exceed maxResults, this value can be - // used to retrieve the next page of results. This value is null when there - // are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeImagesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeImagesOutput) GoString() string { - return s.String() -} - -// SetImageDetails sets the ImageDetails field's value. -func (s *DescribeImagesOutput) SetImageDetails(v []*ImageDetail) *DescribeImagesOutput { - s.ImageDetails = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeImagesOutput) SetNextToken(v string) *DescribeImagesOutput { - s.NextToken = &v - return s -} - -type DescribeRepositoriesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of repository results returned by DescribeRepositories - // in paginated output. When this parameter is used, DescribeRepositories only - // returns maxResults results in a single page along with a nextToken response - // element. The remaining results of the initial request can be seen by sending - // another DescribeRepositories request with the returned nextToken value. This - // value can be between 1 and 1000. If this parameter is not used, then DescribeRepositories - // returns up to 100 results and a nextToken value, if applicable. This option - // cannot be used when you specify repositories with repositoryNames. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // The nextToken value returned from a previous paginated DescribeRepositories - // request where maxResults was used and the results exceeded the value of that - // parameter. Pagination continues from the end of the previous results that - // returned the nextToken value. This value is null when there are no more results - // to return. This option cannot be used when you specify repositories with - // repositoryNames. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `locationName:"nextToken" type:"string"` - - // The AWS account ID associated with the registry that contains the repositories - // to be described. If you do not specify a registry, the default registry is - // assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // A list of repositories to describe. If this parameter is omitted, then all - // repositories in a registry are described. - RepositoryNames []*string `locationName:"repositoryNames" min:"1" type:"list"` -} - -// String returns the string representation -func (s DescribeRepositoriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRepositoriesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRepositoriesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRepositoriesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.RepositoryNames != nil && len(s.RepositoryNames) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryNames", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeRepositoriesInput) SetMaxResults(v int64) *DescribeRepositoriesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeRepositoriesInput) SetNextToken(v string) *DescribeRepositoriesInput { - s.NextToken = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *DescribeRepositoriesInput) SetRegistryId(v string) *DescribeRepositoriesInput { - s.RegistryId = &v - return s -} - -// SetRepositoryNames sets the RepositoryNames field's value. -func (s *DescribeRepositoriesInput) SetRepositoryNames(v []*string) *DescribeRepositoriesInput { - s.RepositoryNames = v - return s -} - -type DescribeRepositoriesOutput struct { - _ struct{} `type:"structure"` - - // The nextToken value to include in a future DescribeRepositories request. - // When the results of a DescribeRepositories request exceed maxResults, this - // value can be used to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of repository objects corresponding to valid repositories. - Repositories []*Repository `locationName:"repositories" type:"list"` -} - -// String returns the string representation -func (s DescribeRepositoriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRepositoriesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeRepositoriesOutput) SetNextToken(v string) *DescribeRepositoriesOutput { - s.NextToken = &v - return s -} - -// SetRepositories sets the Repositories field's value. -func (s *DescribeRepositoriesOutput) SetRepositories(v []*Repository) *DescribeRepositoriesOutput { - s.Repositories = v - return s -} - -type GetAuthorizationTokenInput struct { - _ struct{} `type:"structure"` - - // A list of AWS account IDs that are associated with the registries for which - // to get authorization tokens. If you do not specify a registry, the default - // registry is assumed. - RegistryIds []*string `locationName:"registryIds" min:"1" type:"list"` -} - -// String returns the string representation -func (s GetAuthorizationTokenInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAuthorizationTokenInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAuthorizationTokenInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAuthorizationTokenInput"} - if s.RegistryIds != nil && len(s.RegistryIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RegistryIds", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRegistryIds sets the RegistryIds field's value. -func (s *GetAuthorizationTokenInput) SetRegistryIds(v []*string) *GetAuthorizationTokenInput { - s.RegistryIds = v - return s -} - -type GetAuthorizationTokenOutput struct { - _ struct{} `type:"structure"` - - // A list of authorization token data objects that correspond to the registryIds - // values in the request. - AuthorizationData []*AuthorizationData `locationName:"authorizationData" type:"list"` -} - -// String returns the string representation -func (s GetAuthorizationTokenOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAuthorizationTokenOutput) GoString() string { - return s.String() -} - -// SetAuthorizationData sets the AuthorizationData field's value. -func (s *GetAuthorizationTokenOutput) SetAuthorizationData(v []*AuthorizationData) *GetAuthorizationTokenOutput { - s.AuthorizationData = v - return s -} - -type GetDownloadUrlForLayerInput struct { - _ struct{} `type:"structure"` - - // The digest of the image layer to download. - // - // LayerDigest is a required field - LayerDigest *string `locationName:"layerDigest" type:"string" required:"true"` - - // The AWS account ID associated with the registry that contains the image layer - // to download. If you do not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository that is associated with the image layer to download. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDownloadUrlForLayerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDownloadUrlForLayerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDownloadUrlForLayerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDownloadUrlForLayerInput"} - if s.LayerDigest == nil { - invalidParams.Add(request.NewErrParamRequired("LayerDigest")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLayerDigest sets the LayerDigest field's value. -func (s *GetDownloadUrlForLayerInput) SetLayerDigest(v string) *GetDownloadUrlForLayerInput { - s.LayerDigest = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *GetDownloadUrlForLayerInput) SetRegistryId(v string) *GetDownloadUrlForLayerInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetDownloadUrlForLayerInput) SetRepositoryName(v string) *GetDownloadUrlForLayerInput { - s.RepositoryName = &v - return s -} - -type GetDownloadUrlForLayerOutput struct { - _ struct{} `type:"structure"` - - // The pre-signed Amazon S3 download URL for the requested layer. - DownloadUrl *string `locationName:"downloadUrl" type:"string"` - - // The digest of the image layer to download. - LayerDigest *string `locationName:"layerDigest" type:"string"` -} - -// String returns the string representation -func (s GetDownloadUrlForLayerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDownloadUrlForLayerOutput) GoString() string { - return s.String() -} - -// SetDownloadUrl sets the DownloadUrl field's value. -func (s *GetDownloadUrlForLayerOutput) SetDownloadUrl(v string) *GetDownloadUrlForLayerOutput { - s.DownloadUrl = &v - return s -} - -// SetLayerDigest sets the LayerDigest field's value. -func (s *GetDownloadUrlForLayerOutput) SetLayerDigest(v string) *GetDownloadUrlForLayerOutput { - s.LayerDigest = &v - return s -} - -type GetLifecyclePolicyInput struct { - _ struct{} `type:"structure"` - - // The AWS account ID associated with the registry that contains the repository. - // If you do not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetLifecyclePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLifecyclePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLifecyclePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRegistryId sets the RegistryId field's value. -func (s *GetLifecyclePolicyInput) SetRegistryId(v string) *GetLifecyclePolicyInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetLifecyclePolicyInput) SetRepositoryName(v string) *GetLifecyclePolicyInput { - s.RepositoryName = &v - return s -} - -type GetLifecyclePolicyOutput struct { - _ struct{} `type:"structure"` - - // The time stamp of the last time that the lifecycle policy was run. - LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp"` - - // The JSON lifecycle policy text. - LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` - - // The registry ID associated with the request. - RegistryId *string `locationName:"registryId" type:"string"` - - // The repository name associated with the request. - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` -} - -// String returns the string representation -func (s GetLifecyclePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLifecyclePolicyOutput) GoString() string { - return s.String() -} - -// SetLastEvaluatedAt sets the LastEvaluatedAt field's value. -func (s *GetLifecyclePolicyOutput) SetLastEvaluatedAt(v time.Time) *GetLifecyclePolicyOutput { - s.LastEvaluatedAt = &v - return s -} - -// SetLifecyclePolicyText sets the LifecyclePolicyText field's value. -func (s *GetLifecyclePolicyOutput) SetLifecyclePolicyText(v string) *GetLifecyclePolicyOutput { - s.LifecyclePolicyText = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *GetLifecyclePolicyOutput) SetRegistryId(v string) *GetLifecyclePolicyOutput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetLifecyclePolicyOutput) SetRepositoryName(v string) *GetLifecyclePolicyOutput { - s.RepositoryName = &v - return s -} - -type GetLifecyclePolicyPreviewInput struct { - _ struct{} `type:"structure"` - - // An optional parameter that filters results based on image tag status and - // all tags, if tagged. - Filter *LifecyclePolicyPreviewFilter `locationName:"filter" type:"structure"` - - // The list of imageIDs to be included. - ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"` - - // The maximum number of repository results returned by GetLifecyclePolicyPreviewRequest - // in
 paginated output. When this parameter is used, GetLifecyclePolicyPreviewRequest - // only returns
 maxResults results in a single page along with a nextToken - // response element. The remaining results of the initial request can be seen - // by sending
 another GetLifecyclePolicyPreviewRequest request with the returned - // nextToken
 value. This value can be between 1 and 1000. If this
 parameter - // is not used, then GetLifecyclePolicyPreviewRequest returns up to
 100 results - // and a nextToken value, if
 applicable. This option cannot be used when you - // specify images with imageIds. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // The nextToken value returned from a previous paginated
 GetLifecyclePolicyPreviewRequest - // request where maxResults was used and the
 results exceeded the value of - // that parameter. Pagination continues from the end of the
 previous results - // that returned the nextToken value. This value is
 null when there are no - // more results to return. This option cannot be used when you specify images - // with imageIds. - NextToken *string `locationName:"nextToken" type:"string"` - - // The AWS account ID associated with the registry that contains the repository. - // If you do not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetLifecyclePolicyPreviewInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLifecyclePolicyPreviewInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLifecyclePolicyPreviewInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyPreviewInput"} - if s.ImageIds != nil && len(s.ImageIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *GetLifecyclePolicyPreviewInput) SetFilter(v *LifecyclePolicyPreviewFilter) *GetLifecyclePolicyPreviewInput { - s.Filter = v - return s -} - -// SetImageIds sets the ImageIds field's value. -func (s *GetLifecyclePolicyPreviewInput) SetImageIds(v []*ImageIdentifier) *GetLifecyclePolicyPreviewInput { - s.ImageIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetLifecyclePolicyPreviewInput) SetMaxResults(v int64) *GetLifecyclePolicyPreviewInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetLifecyclePolicyPreviewInput) SetNextToken(v string) *GetLifecyclePolicyPreviewInput { - s.NextToken = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *GetLifecyclePolicyPreviewInput) SetRegistryId(v string) *GetLifecyclePolicyPreviewInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetLifecyclePolicyPreviewInput) SetRepositoryName(v string) *GetLifecyclePolicyPreviewInput { - s.RepositoryName = &v - return s -} - -type GetLifecyclePolicyPreviewOutput struct { - _ struct{} `type:"structure"` - - // The JSON lifecycle policy text. - LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` - - // The nextToken value to include in a future GetLifecyclePolicyPreview request. - // When the results of a GetLifecyclePolicyPreview request exceed maxResults, - // this value can be used to retrieve the next page of results. This value is - // null when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // The results of the lifecycle policy preview request. - PreviewResults []*LifecyclePolicyPreviewResult `locationName:"previewResults" type:"list"` - - // The registry ID associated with the request. - RegistryId *string `locationName:"registryId" type:"string"` - - // The repository name associated with the request. - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` - - // The status of the lifecycle policy preview request. - Status *string `locationName:"status" type:"string" enum:"LifecyclePolicyPreviewStatus"` - - // The list of images that is returned as a result of the action. - Summary *LifecyclePolicyPreviewSummary `locationName:"summary" type:"structure"` -} - -// String returns the string representation -func (s GetLifecyclePolicyPreviewOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLifecyclePolicyPreviewOutput) GoString() string { - return s.String() -} - -// SetLifecyclePolicyText sets the LifecyclePolicyText field's value. -func (s *GetLifecyclePolicyPreviewOutput) SetLifecyclePolicyText(v string) *GetLifecyclePolicyPreviewOutput { - s.LifecyclePolicyText = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetLifecyclePolicyPreviewOutput) SetNextToken(v string) *GetLifecyclePolicyPreviewOutput { - s.NextToken = &v - return s -} - -// SetPreviewResults sets the PreviewResults field's value. -func (s *GetLifecyclePolicyPreviewOutput) SetPreviewResults(v []*LifecyclePolicyPreviewResult) *GetLifecyclePolicyPreviewOutput { - s.PreviewResults = v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *GetLifecyclePolicyPreviewOutput) SetRegistryId(v string) *GetLifecyclePolicyPreviewOutput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetLifecyclePolicyPreviewOutput) SetRepositoryName(v string) *GetLifecyclePolicyPreviewOutput { - s.RepositoryName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetLifecyclePolicyPreviewOutput) SetStatus(v string) *GetLifecyclePolicyPreviewOutput { - s.Status = &v - return s -} - -// SetSummary sets the Summary field's value. -func (s *GetLifecyclePolicyPreviewOutput) SetSummary(v *LifecyclePolicyPreviewSummary) *GetLifecyclePolicyPreviewOutput { - s.Summary = v - return s -} - -type GetRepositoryPolicyInput struct { - _ struct{} `type:"structure"` - - // The AWS account ID associated with the registry that contains the repository. - // If you do not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository with the policy to retrieve. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRepositoryPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRepositoryPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRepositoryPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRepositoryPolicyInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRegistryId sets the RegistryId field's value. -func (s *GetRepositoryPolicyInput) SetRegistryId(v string) *GetRepositoryPolicyInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetRepositoryPolicyInput) SetRepositoryName(v string) *GetRepositoryPolicyInput { - s.RepositoryName = &v - return s -} - -type GetRepositoryPolicyOutput struct { - _ struct{} `type:"structure"` - - // The JSON repository policy text associated with the repository. - PolicyText *string `locationName:"policyText" type:"string"` - - // The registry ID associated with the request. - RegistryId *string `locationName:"registryId" type:"string"` - - // The repository name associated with the request. - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` -} - -// String returns the string representation -func (s GetRepositoryPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRepositoryPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicyText sets the PolicyText field's value. -func (s *GetRepositoryPolicyOutput) SetPolicyText(v string) *GetRepositoryPolicyOutput { - s.PolicyText = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *GetRepositoryPolicyOutput) SetRegistryId(v string) *GetRepositoryPolicyOutput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetRepositoryPolicyOutput) SetRepositoryName(v string) *GetRepositoryPolicyOutput { - s.RepositoryName = &v - return s -} - -// An object representing an Amazon ECR image. -type Image struct { - _ struct{} `type:"structure"` - - // An object containing the image tag and image digest associated with an image. - ImageId *ImageIdentifier `locationName:"imageId" type:"structure"` - - // The image manifest associated with the image. - ImageManifest *string `locationName:"imageManifest" type:"string"` - - // The AWS account ID associated with the registry containing the image. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository associated with the image. - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` -} - -// String returns the string representation -func (s Image) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Image) GoString() string { - return s.String() -} - -// SetImageId sets the ImageId field's value. -func (s *Image) SetImageId(v *ImageIdentifier) *Image { - s.ImageId = v - return s -} - -// SetImageManifest sets the ImageManifest field's value. -func (s *Image) SetImageManifest(v string) *Image { - s.ImageManifest = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *Image) SetRegistryId(v string) *Image { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *Image) SetRepositoryName(v string) *Image { - s.RepositoryName = &v - return s -} - -// An object that describes an image returned by a DescribeImages operation. -type ImageDetail struct { - _ struct{} `type:"structure"` - - // The sha256 digest of the image manifest. - ImageDigest *string `locationName:"imageDigest" type:"string"` - - // The date and time, expressed in standard JavaScript date format, at which - // the current image was pushed to the repository. - ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp"` - - // The size, in bytes, of the image in the repository. - // - // Beginning with Docker version 1.9, the Docker client compresses image layers - // before pushing them to a V2 Docker registry. The output of the docker images - // command shows the uncompressed image size, so it may return a larger image - // size than the image sizes returned by DescribeImages. - ImageSizeInBytes *int64 `locationName:"imageSizeInBytes" type:"long"` - - // The list of tags associated with this image. - ImageTags []*string `locationName:"imageTags" type:"list"` - - // The AWS account ID associated with the registry to which this image belongs. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository to which this image belongs. - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` -} - -// String returns the string representation -func (s ImageDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImageDetail) GoString() string { - return s.String() -} - -// SetImageDigest sets the ImageDigest field's value. -func (s *ImageDetail) SetImageDigest(v string) *ImageDetail { - s.ImageDigest = &v - return s -} - -// SetImagePushedAt sets the ImagePushedAt field's value. -func (s *ImageDetail) SetImagePushedAt(v time.Time) *ImageDetail { - s.ImagePushedAt = &v - return s -} - -// SetImageSizeInBytes sets the ImageSizeInBytes field's value. -func (s *ImageDetail) SetImageSizeInBytes(v int64) *ImageDetail { - s.ImageSizeInBytes = &v - return s -} - -// SetImageTags sets the ImageTags field's value. -func (s *ImageDetail) SetImageTags(v []*string) *ImageDetail { - s.ImageTags = v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *ImageDetail) SetRegistryId(v string) *ImageDetail { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *ImageDetail) SetRepositoryName(v string) *ImageDetail { - s.RepositoryName = &v - return s -} - -// An object representing an Amazon ECR image failure. -type ImageFailure struct { - _ struct{} `type:"structure"` - - // The code associated with the failure. - FailureCode *string `locationName:"failureCode" type:"string" enum:"ImageFailureCode"` - - // The reason for the failure. - FailureReason *string `locationName:"failureReason" type:"string"` - - // The image ID associated with the failure. - ImageId *ImageIdentifier `locationName:"imageId" type:"structure"` -} - -// String returns the string representation -func (s ImageFailure) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImageFailure) GoString() string { - return s.String() -} - -// SetFailureCode sets the FailureCode field's value. -func (s *ImageFailure) SetFailureCode(v string) *ImageFailure { - s.FailureCode = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *ImageFailure) SetFailureReason(v string) *ImageFailure { - s.FailureReason = &v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *ImageFailure) SetImageId(v *ImageIdentifier) *ImageFailure { - s.ImageId = v - return s -} - -// An object with identifying information for an Amazon ECR image. -type ImageIdentifier struct { - _ struct{} `type:"structure"` - - // The sha256 digest of the image manifest. - ImageDigest *string `locationName:"imageDigest" type:"string"` - - // The tag used for the image. - ImageTag *string `locationName:"imageTag" type:"string"` -} - -// String returns the string representation -func (s ImageIdentifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImageIdentifier) GoString() string { - return s.String() -} - -// SetImageDigest sets the ImageDigest field's value. -func (s *ImageIdentifier) SetImageDigest(v string) *ImageIdentifier { - s.ImageDigest = &v - return s -} - -// SetImageTag sets the ImageTag field's value. -func (s *ImageIdentifier) SetImageTag(v string) *ImageIdentifier { - s.ImageTag = &v - return s -} - -type InitiateLayerUploadInput struct { - _ struct{} `type:"structure"` - - // The AWS account ID associated with the registry to which you intend to upload - // layers. If you do not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository to which you intend to upload layers. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s InitiateLayerUploadInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InitiateLayerUploadInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InitiateLayerUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InitiateLayerUploadInput"} - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRegistryId sets the RegistryId field's value. -func (s *InitiateLayerUploadInput) SetRegistryId(v string) *InitiateLayerUploadInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *InitiateLayerUploadInput) SetRepositoryName(v string) *InitiateLayerUploadInput { - s.RepositoryName = &v - return s -} - -type InitiateLayerUploadOutput struct { - _ struct{} `type:"structure"` - - // The size, in bytes, that Amazon ECR expects future layer part uploads to - // be. - PartSize *int64 `locationName:"partSize" type:"long"` - - // The upload ID for the layer upload. This parameter is passed to further UploadLayerPart - // and CompleteLayerUpload operations. - UploadId *string `locationName:"uploadId" type:"string"` -} - -// String returns the string representation -func (s InitiateLayerUploadOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InitiateLayerUploadOutput) GoString() string { - return s.String() -} - -// SetPartSize sets the PartSize field's value. -func (s *InitiateLayerUploadOutput) SetPartSize(v int64) *InitiateLayerUploadOutput { - s.PartSize = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *InitiateLayerUploadOutput) SetUploadId(v string) *InitiateLayerUploadOutput { - s.UploadId = &v - return s -} - -// An object representing an Amazon ECR image layer. -type Layer struct { - _ struct{} `type:"structure"` - - // The availability status of the image layer. - LayerAvailability *string `locationName:"layerAvailability" type:"string" enum:"LayerAvailability"` - - // The sha256 digest of the image layer. - LayerDigest *string `locationName:"layerDigest" type:"string"` - - // The size, in bytes, of the image layer. - LayerSize *int64 `locationName:"layerSize" type:"long"` - - // The media type of the layer, such as application/vnd.docker.image.rootfs.diff.tar.gzip - // or application/vnd.oci.image.layer.v1.tar+gzip. - MediaType *string `locationName:"mediaType" type:"string"` -} - -// String returns the string representation -func (s Layer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Layer) GoString() string { - return s.String() -} - -// SetLayerAvailability sets the LayerAvailability field's value. -func (s *Layer) SetLayerAvailability(v string) *Layer { - s.LayerAvailability = &v - return s -} - -// SetLayerDigest sets the LayerDigest field's value. -func (s *Layer) SetLayerDigest(v string) *Layer { - s.LayerDigest = &v - return s -} - -// SetLayerSize sets the LayerSize field's value. -func (s *Layer) SetLayerSize(v int64) *Layer { - s.LayerSize = &v - return s -} - -// SetMediaType sets the MediaType field's value. -func (s *Layer) SetMediaType(v string) *Layer { - s.MediaType = &v - return s -} - -// An object representing an Amazon ECR image layer failure. -type LayerFailure struct { - _ struct{} `type:"structure"` - - // The failure code associated with the failure. - FailureCode *string `locationName:"failureCode" type:"string" enum:"LayerFailureCode"` - - // The reason for the failure. - FailureReason *string `locationName:"failureReason" type:"string"` - - // The layer digest associated with the failure. - LayerDigest *string `locationName:"layerDigest" type:"string"` -} - -// String returns the string representation -func (s LayerFailure) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LayerFailure) GoString() string { - return s.String() -} - -// SetFailureCode sets the FailureCode field's value. -func (s *LayerFailure) SetFailureCode(v string) *LayerFailure { - s.FailureCode = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *LayerFailure) SetFailureReason(v string) *LayerFailure { - s.FailureReason = &v - return s -} - -// SetLayerDigest sets the LayerDigest field's value. -func (s *LayerFailure) SetLayerDigest(v string) *LayerFailure { - s.LayerDigest = &v - return s -} - -// The filter for the lifecycle policy preview. -type LifecyclePolicyPreviewFilter struct { - _ struct{} `type:"structure"` - - // The tag status of the image. - TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"` -} - -// String returns the string representation -func (s LifecyclePolicyPreviewFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LifecyclePolicyPreviewFilter) GoString() string { - return s.String() -} - -// SetTagStatus sets the TagStatus field's value. -func (s *LifecyclePolicyPreviewFilter) SetTagStatus(v string) *LifecyclePolicyPreviewFilter { - s.TagStatus = &v - return s -} - -// The result of the lifecycle policy preview. -type LifecyclePolicyPreviewResult struct { - _ struct{} `type:"structure"` - - // The type of action to be taken. - Action *LifecyclePolicyRuleAction `locationName:"action" type:"structure"` - - // The priority of the applied rule. - AppliedRulePriority *int64 `locationName:"appliedRulePriority" min:"1" type:"integer"` - - // The sha256 digest of the image manifest. - ImageDigest *string `locationName:"imageDigest" type:"string"` - - // The date and time, expressed in standard JavaScript date format, at which - // the current image was pushed to the repository. - ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp"` - - // The list of tags associated with this image. - ImageTags []*string `locationName:"imageTags" type:"list"` -} - -// String returns the string representation -func (s LifecyclePolicyPreviewResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LifecyclePolicyPreviewResult) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *LifecyclePolicyPreviewResult) SetAction(v *LifecyclePolicyRuleAction) *LifecyclePolicyPreviewResult { - s.Action = v - return s -} - -// SetAppliedRulePriority sets the AppliedRulePriority field's value. -func (s *LifecyclePolicyPreviewResult) SetAppliedRulePriority(v int64) *LifecyclePolicyPreviewResult { - s.AppliedRulePriority = &v - return s -} - -// SetImageDigest sets the ImageDigest field's value. -func (s *LifecyclePolicyPreviewResult) SetImageDigest(v string) *LifecyclePolicyPreviewResult { - s.ImageDigest = &v - return s -} - -// SetImagePushedAt sets the ImagePushedAt field's value. -func (s *LifecyclePolicyPreviewResult) SetImagePushedAt(v time.Time) *LifecyclePolicyPreviewResult { - s.ImagePushedAt = &v - return s -} - -// SetImageTags sets the ImageTags field's value. -func (s *LifecyclePolicyPreviewResult) SetImageTags(v []*string) *LifecyclePolicyPreviewResult { - s.ImageTags = v - return s -} - -// The summary of the lifecycle policy preview request. -type LifecyclePolicyPreviewSummary struct { - _ struct{} `type:"structure"` - - // The number of expiring images. - ExpiringImageTotalCount *int64 `locationName:"expiringImageTotalCount" type:"integer"` -} - -// String returns the string representation -func (s LifecyclePolicyPreviewSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LifecyclePolicyPreviewSummary) GoString() string { - return s.String() -} - -// SetExpiringImageTotalCount sets the ExpiringImageTotalCount field's value. -func (s *LifecyclePolicyPreviewSummary) SetExpiringImageTotalCount(v int64) *LifecyclePolicyPreviewSummary { - s.ExpiringImageTotalCount = &v - return s -} - -// The type of action to be taken. -type LifecyclePolicyRuleAction struct { - _ struct{} `type:"structure"` - - // The type of action to be taken. - Type *string `locationName:"type" type:"string" enum:"ImageActionType"` -} - -// String returns the string representation -func (s LifecyclePolicyRuleAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LifecyclePolicyRuleAction) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *LifecyclePolicyRuleAction) SetType(v string) *LifecyclePolicyRuleAction { - s.Type = &v - return s -} - -// An object representing a filter on a ListImages operation. -type ListImagesFilter struct { - _ struct{} `type:"structure"` - - // The tag status with which to filter your ListImages results. You can filter - // results based on whether they are TAGGED or UNTAGGED. - TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"` -} - -// String returns the string representation -func (s ListImagesFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListImagesFilter) GoString() string { - return s.String() -} - -// SetTagStatus sets the TagStatus field's value. -func (s *ListImagesFilter) SetTagStatus(v string) *ListImagesFilter { - s.TagStatus = &v - return s -} - -type ListImagesInput struct { - _ struct{} `type:"structure"` - - // The filter key and value with which to filter your ListImages results. - Filter *ListImagesFilter `locationName:"filter" type:"structure"` - - // The maximum number of image results returned by ListImages in paginated output. - // When this parameter is used, ListImages only returns maxResults results in - // a single page along with a nextToken response element. The remaining results - // of the initial request can be seen by sending another ListImages request - // with the returned nextToken value. This value can be between 1 and 1000. - // If this parameter is not used, then ListImages returns up to 100 results - // and a nextToken value, if applicable. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // The nextToken value returned from a previous paginated ListImages request - // where maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. This value is null when there are no more results to return. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `locationName:"nextToken" type:"string"` - - // The AWS account ID associated with the registry that contains the repository - // in which to list images. If you do not specify a registry, the default registry - // is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The repository with image IDs to be listed. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListImagesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListImagesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListImagesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListImagesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *ListImagesInput) SetFilter(v *ListImagesFilter) *ListImagesInput { - s.Filter = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListImagesInput) SetMaxResults(v int64) *ListImagesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListImagesInput) SetNextToken(v string) *ListImagesInput { - s.NextToken = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *ListImagesInput) SetRegistryId(v string) *ListImagesInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *ListImagesInput) SetRepositoryName(v string) *ListImagesInput { - s.RepositoryName = &v - return s -} - -type ListImagesOutput struct { - _ struct{} `type:"structure"` - - // The list of image IDs for the requested repository. - ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"` - - // The nextToken value to include in a future ListImages request. When the results - // of a ListImages request exceed maxResults, this value can be used to retrieve - // the next page of results. This value is null when there are no more results - // to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListImagesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListImagesOutput) GoString() string { - return s.String() -} - -// SetImageIds sets the ImageIds field's value. -func (s *ListImagesOutput) SetImageIds(v []*ImageIdentifier) *ListImagesOutput { - s.ImageIds = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListImagesOutput) SetNextToken(v string) *ListImagesOutput { - s.NextToken = &v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that identifies the resource for which to - // list the tags. Currently, the only supported resource is an Amazon ECR repository. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { - s.ResourceArn = &v - return s -} - -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // The tags for the resource. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -type PutImageInput struct { - _ struct{} `type:"structure"` - - // The image manifest corresponding to the image to be uploaded. - // - // ImageManifest is a required field - ImageManifest *string `locationName:"imageManifest" type:"string" required:"true"` - - // The tag to associate with the image. This parameter is required for images - // that use the Docker Image Manifest V2 Schema 2 or OCI formats. - ImageTag *string `locationName:"imageTag" type:"string"` - - // The AWS account ID associated with the registry that contains the repository - // in which to put the image. If you do not specify a registry, the default - // registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository in which to put the image. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutImageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutImageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutImageInput"} - if s.ImageManifest == nil { - invalidParams.Add(request.NewErrParamRequired("ImageManifest")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetImageManifest sets the ImageManifest field's value. -func (s *PutImageInput) SetImageManifest(v string) *PutImageInput { - s.ImageManifest = &v - return s -} - -// SetImageTag sets the ImageTag field's value. -func (s *PutImageInput) SetImageTag(v string) *PutImageInput { - s.ImageTag = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *PutImageInput) SetRegistryId(v string) *PutImageInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *PutImageInput) SetRepositoryName(v string) *PutImageInput { - s.RepositoryName = &v - return s -} - -type PutImageOutput struct { - _ struct{} `type:"structure"` - - // Details of the image uploaded. - Image *Image `locationName:"image" type:"structure"` -} - -// String returns the string representation -func (s PutImageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutImageOutput) GoString() string { - return s.String() -} - -// SetImage sets the Image field's value. -func (s *PutImageOutput) SetImage(v *Image) *PutImageOutput { - s.Image = v - return s -} - -type PutLifecyclePolicyInput struct { - _ struct{} `type:"structure"` - - // The JSON repository policy text to apply to the repository. - // - // LifecyclePolicyText is a required field - LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string" required:"true"` - - // The AWS account ID associated with the registry that contains the repository. - // If you do
 not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository to receive the policy. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutLifecyclePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutLifecyclePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutLifecyclePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutLifecyclePolicyInput"} - if s.LifecyclePolicyText == nil { - invalidParams.Add(request.NewErrParamRequired("LifecyclePolicyText")) - } - if s.LifecyclePolicyText != nil && len(*s.LifecyclePolicyText) < 100 { - invalidParams.Add(request.NewErrParamMinLen("LifecyclePolicyText", 100)) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLifecyclePolicyText sets the LifecyclePolicyText field's value. -func (s *PutLifecyclePolicyInput) SetLifecyclePolicyText(v string) *PutLifecyclePolicyInput { - s.LifecyclePolicyText = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *PutLifecyclePolicyInput) SetRegistryId(v string) *PutLifecyclePolicyInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *PutLifecyclePolicyInput) SetRepositoryName(v string) *PutLifecyclePolicyInput { - s.RepositoryName = &v - return s -} - -type PutLifecyclePolicyOutput struct { - _ struct{} `type:"structure"` - - // The JSON repository policy text. - LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` - - // The registry ID associated with the request. - RegistryId *string `locationName:"registryId" type:"string"` - - // The repository name associated with the request. - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` -} - -// String returns the string representation -func (s PutLifecyclePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutLifecyclePolicyOutput) GoString() string { - return s.String() -} - -// SetLifecyclePolicyText sets the LifecyclePolicyText field's value. -func (s *PutLifecyclePolicyOutput) SetLifecyclePolicyText(v string) *PutLifecyclePolicyOutput { - s.LifecyclePolicyText = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *PutLifecyclePolicyOutput) SetRegistryId(v string) *PutLifecyclePolicyOutput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *PutLifecyclePolicyOutput) SetRepositoryName(v string) *PutLifecyclePolicyOutput { - s.RepositoryName = &v - return s -} - -// An object representing a repository. -type Repository struct { - _ struct{} `type:"structure"` - - // The date and time, in JavaScript date format, when the repository was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The AWS account ID associated with the registry that contains the repository. - RegistryId *string `locationName:"registryId" type:"string"` - - // The Amazon Resource Name (ARN) that identifies the repository. The ARN contains - // the arn:aws:ecr namespace, followed by the region of the repository, AWS - // account ID of the repository owner, repository namespace, and repository - // name. For example, arn:aws:ecr:region:012345678910:repository/test. - RepositoryArn *string `locationName:"repositoryArn" type:"string"` - - // The name of the repository. - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` - - // The URI for the repository. You can use this URI for Docker push or pull - // operations. - RepositoryUri *string `locationName:"repositoryUri" type:"string"` -} - -// String returns the string representation -func (s Repository) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Repository) GoString() string { - return s.String() -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Repository) SetCreatedAt(v time.Time) *Repository { - s.CreatedAt = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *Repository) SetRegistryId(v string) *Repository { - s.RegistryId = &v - return s -} - -// SetRepositoryArn sets the RepositoryArn field's value. -func (s *Repository) SetRepositoryArn(v string) *Repository { - s.RepositoryArn = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *Repository) SetRepositoryName(v string) *Repository { - s.RepositoryName = &v - return s -} - -// SetRepositoryUri sets the RepositoryUri field's value. -func (s *Repository) SetRepositoryUri(v string) *Repository { - s.RepositoryUri = &v - return s -} - -type SetRepositoryPolicyInput struct { - _ struct{} `type:"structure"` - - // If the policy you are attempting to set on a repository policy would prevent - // you from setting another policy in the future, you must force the SetRepositoryPolicy - // operation. This is intended to prevent accidental repository lock outs. - Force *bool `locationName:"force" type:"boolean"` - - // The JSON repository policy text to apply to the repository. - // - // PolicyText is a required field - PolicyText *string `locationName:"policyText" type:"string" required:"true"` - - // The AWS account ID associated with the registry that contains the repository. - // If you do not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository to receive the policy. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s SetRepositoryPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetRepositoryPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetRepositoryPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetRepositoryPolicyInput"} - if s.PolicyText == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyText")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForce sets the Force field's value. -func (s *SetRepositoryPolicyInput) SetForce(v bool) *SetRepositoryPolicyInput { - s.Force = &v - return s -} - -// SetPolicyText sets the PolicyText field's value. -func (s *SetRepositoryPolicyInput) SetPolicyText(v string) *SetRepositoryPolicyInput { - s.PolicyText = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *SetRepositoryPolicyInput) SetRegistryId(v string) *SetRepositoryPolicyInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *SetRepositoryPolicyInput) SetRepositoryName(v string) *SetRepositoryPolicyInput { - s.RepositoryName = &v - return s -} - -type SetRepositoryPolicyOutput struct { - _ struct{} `type:"structure"` - - // The JSON repository policy text applied to the repository. - PolicyText *string `locationName:"policyText" type:"string"` - - // The registry ID associated with the request. - RegistryId *string `locationName:"registryId" type:"string"` - - // The repository name associated with the request. - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` -} - -// String returns the string representation -func (s SetRepositoryPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetRepositoryPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicyText sets the PolicyText field's value. -func (s *SetRepositoryPolicyOutput) SetPolicyText(v string) *SetRepositoryPolicyOutput { - s.PolicyText = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *SetRepositoryPolicyOutput) SetRegistryId(v string) *SetRepositoryPolicyOutput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *SetRepositoryPolicyOutput) SetRepositoryName(v string) *SetRepositoryPolicyOutput { - s.RepositoryName = &v - return s -} - -type StartLifecyclePolicyPreviewInput struct { - _ struct{} `type:"structure"` - - // The policy to be evaluated against. If you do not specify a policy, the current - // policy for the repository is used. - LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` - - // The AWS account ID associated with the registry that contains the repository. - // If you do not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository to be evaluated. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartLifecyclePolicyPreviewInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartLifecyclePolicyPreviewInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartLifecyclePolicyPreviewInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartLifecyclePolicyPreviewInput"} - if s.LifecyclePolicyText != nil && len(*s.LifecyclePolicyText) < 100 { - invalidParams.Add(request.NewErrParamMinLen("LifecyclePolicyText", 100)) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLifecyclePolicyText sets the LifecyclePolicyText field's value. -func (s *StartLifecyclePolicyPreviewInput) SetLifecyclePolicyText(v string) *StartLifecyclePolicyPreviewInput { - s.LifecyclePolicyText = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *StartLifecyclePolicyPreviewInput) SetRegistryId(v string) *StartLifecyclePolicyPreviewInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *StartLifecyclePolicyPreviewInput) SetRepositoryName(v string) *StartLifecyclePolicyPreviewInput { - s.RepositoryName = &v - return s -} - -type StartLifecyclePolicyPreviewOutput struct { - _ struct{} `type:"structure"` - - // The JSON repository policy text. - LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` - - // The registry ID associated with the request. - RegistryId *string `locationName:"registryId" type:"string"` - - // The repository name associated with the request. - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` - - // The status of the lifecycle policy preview request. - Status *string `locationName:"status" type:"string" enum:"LifecyclePolicyPreviewStatus"` -} - -// String returns the string representation -func (s StartLifecyclePolicyPreviewOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartLifecyclePolicyPreviewOutput) GoString() string { - return s.String() -} - -// SetLifecyclePolicyText sets the LifecyclePolicyText field's value. -func (s *StartLifecyclePolicyPreviewOutput) SetLifecyclePolicyText(v string) *StartLifecyclePolicyPreviewOutput { - s.LifecyclePolicyText = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *StartLifecyclePolicyPreviewOutput) SetRegistryId(v string) *StartLifecyclePolicyPreviewOutput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *StartLifecyclePolicyPreviewOutput) SetRepositoryName(v string) *StartLifecyclePolicyPreviewOutput { - s.RepositoryName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StartLifecyclePolicyPreviewOutput) SetStatus(v string) *StartLifecyclePolicyPreviewOutput { - s.Status = &v - return s -} - -// The metadata that you apply to a resource to help you categorize and organize -// them. Each tag consists of a key and an optional value, both of which you -// define. Tag keys can have a maximum character length of 128 characters, and -// tag values can have a maximum length of 256 characters. -type Tag struct { - _ struct{} `type:"structure"` - - // One part of a key-value pair that make up a tag. A key is a general label - // that acts like a category for more specific tag values. - Key *string `type:"string"` - - // The optional part of a key-value pair that make up a tag. A value acts as - // a descriptor within a tag category (key). - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the the resource to which to add tags. - // Currently, the only supported resource is an Amazon ECR repository. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` - - // The tags to add to the resource. A tag is an array of key-value pairs. Tag - // keys can have a maximum character length of 128 characters, and tag values - // can have a maximum length of 256 characters. - // - // Tags is a required field - Tags []*Tag `locationName:"tags" type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource from which to remove tags. - // Currently, the only supported resource is an Amazon ECR repository. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` - - // The keys of the tags to be removed. - // - // TagKeys is a required field - TagKeys []*string `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.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UploadLayerPartInput struct { - _ struct{} `type:"structure"` - - // The base64-encoded layer part payload. - // - // LayerPartBlob is automatically base64 encoded/decoded by the SDK. - // - // LayerPartBlob is a required field - LayerPartBlob []byte `locationName:"layerPartBlob" type:"blob" required:"true"` - - // The integer value of the first byte of the layer part. - // - // PartFirstByte is a required field - PartFirstByte *int64 `locationName:"partFirstByte" type:"long" required:"true"` - - // The integer value of the last byte of the layer part. - // - // PartLastByte is a required field - PartLastByte *int64 `locationName:"partLastByte" type:"long" required:"true"` - - // The AWS account ID associated with the registry to which you are uploading - // layer parts. If you do not specify a registry, the default registry is assumed. - RegistryId *string `locationName:"registryId" type:"string"` - - // The name of the repository to which you are uploading layer parts. - // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` - - // The upload ID from a previous InitiateLayerUpload operation to associate - // with the layer part upload. - // - // UploadId is a required field - UploadId *string `locationName:"uploadId" type:"string" required:"true"` -} - -// String returns the string representation -func (s UploadLayerPartInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UploadLayerPartInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UploadLayerPartInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UploadLayerPartInput"} - if s.LayerPartBlob == nil { - invalidParams.Add(request.NewErrParamRequired("LayerPartBlob")) - } - if s.PartFirstByte == nil { - invalidParams.Add(request.NewErrParamRequired("PartFirstByte")) - } - if s.PartLastByte == nil { - invalidParams.Add(request.NewErrParamRequired("PartLastByte")) - } - if s.RepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryName")) - } - if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) - } - if s.UploadId == nil { - invalidParams.Add(request.NewErrParamRequired("UploadId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLayerPartBlob sets the LayerPartBlob field's value. -func (s *UploadLayerPartInput) SetLayerPartBlob(v []byte) *UploadLayerPartInput { - s.LayerPartBlob = v - return s -} - -// SetPartFirstByte sets the PartFirstByte field's value. -func (s *UploadLayerPartInput) SetPartFirstByte(v int64) *UploadLayerPartInput { - s.PartFirstByte = &v - return s -} - -// SetPartLastByte sets the PartLastByte field's value. -func (s *UploadLayerPartInput) SetPartLastByte(v int64) *UploadLayerPartInput { - s.PartLastByte = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *UploadLayerPartInput) SetRegistryId(v string) *UploadLayerPartInput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *UploadLayerPartInput) SetRepositoryName(v string) *UploadLayerPartInput { - s.RepositoryName = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *UploadLayerPartInput) SetUploadId(v string) *UploadLayerPartInput { - s.UploadId = &v - return s -} - -type UploadLayerPartOutput struct { - _ struct{} `type:"structure"` - - // The integer value of the last byte received in the request. - LastByteReceived *int64 `locationName:"lastByteReceived" type:"long"` - - // The registry ID associated with the request. - RegistryId *string `locationName:"registryId" type:"string"` - - // The repository name associated with the request. - RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` - - // The upload ID associated with the request. - UploadId *string `locationName:"uploadId" type:"string"` -} - -// String returns the string representation -func (s UploadLayerPartOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UploadLayerPartOutput) GoString() string { - return s.String() -} - -// SetLastByteReceived sets the LastByteReceived field's value. -func (s *UploadLayerPartOutput) SetLastByteReceived(v int64) *UploadLayerPartOutput { - s.LastByteReceived = &v - return s -} - -// SetRegistryId sets the RegistryId field's value. -func (s *UploadLayerPartOutput) SetRegistryId(v string) *UploadLayerPartOutput { - s.RegistryId = &v - return s -} - -// SetRepositoryName sets the RepositoryName field's value. -func (s *UploadLayerPartOutput) SetRepositoryName(v string) *UploadLayerPartOutput { - s.RepositoryName = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *UploadLayerPartOutput) SetUploadId(v string) *UploadLayerPartOutput { - s.UploadId = &v - return s -} - -const ( - // ImageActionTypeExpire is a ImageActionType enum value - ImageActionTypeExpire = "EXPIRE" -) - -const ( - // ImageFailureCodeInvalidImageDigest is a ImageFailureCode enum value - ImageFailureCodeInvalidImageDigest = "InvalidImageDigest" - - // ImageFailureCodeInvalidImageTag is a ImageFailureCode enum value - ImageFailureCodeInvalidImageTag = "InvalidImageTag" - - // ImageFailureCodeImageTagDoesNotMatchDigest is a ImageFailureCode enum value - ImageFailureCodeImageTagDoesNotMatchDigest = "ImageTagDoesNotMatchDigest" - - // ImageFailureCodeImageNotFound is a ImageFailureCode enum value - ImageFailureCodeImageNotFound = "ImageNotFound" - - // ImageFailureCodeMissingDigestAndTag is a ImageFailureCode enum value - ImageFailureCodeMissingDigestAndTag = "MissingDigestAndTag" -) - -const ( - // LayerAvailabilityAvailable is a LayerAvailability enum value - LayerAvailabilityAvailable = "AVAILABLE" - - // LayerAvailabilityUnavailable is a LayerAvailability enum value - LayerAvailabilityUnavailable = "UNAVAILABLE" -) - -const ( - // LayerFailureCodeInvalidLayerDigest is a LayerFailureCode enum value - LayerFailureCodeInvalidLayerDigest = "InvalidLayerDigest" - - // LayerFailureCodeMissingLayerDigest is a LayerFailureCode enum value - LayerFailureCodeMissingLayerDigest = "MissingLayerDigest" -) - -const ( - // LifecyclePolicyPreviewStatusInProgress is a LifecyclePolicyPreviewStatus enum value - LifecyclePolicyPreviewStatusInProgress = "IN_PROGRESS" - - // LifecyclePolicyPreviewStatusComplete is a LifecyclePolicyPreviewStatus enum value - LifecyclePolicyPreviewStatusComplete = "COMPLETE" - - // LifecyclePolicyPreviewStatusExpired is a LifecyclePolicyPreviewStatus enum value - LifecyclePolicyPreviewStatusExpired = "EXPIRED" - - // LifecyclePolicyPreviewStatusFailed is a LifecyclePolicyPreviewStatus enum value - LifecyclePolicyPreviewStatusFailed = "FAILED" -) - -const ( - // TagStatusTagged is a TagStatus enum value - TagStatusTagged = "TAGGED" - - // TagStatusUntagged is a TagStatus enum value - TagStatusUntagged = "UNTAGGED" - - // TagStatusAny is a TagStatus enum value - TagStatusAny = "ANY" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go deleted file mode 100644 index d970974bc..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package ecr provides the client and types for making API -// requests to Amazon EC2 Container Registry. -// -// Amazon Elastic Container Registry (Amazon ECR) is a managed Docker registry -// service. Customers can use the familiar Docker CLI to push, pull, and manage -// images. Amazon ECR provides a secure, scalable, and reliable registry. Amazon -// ECR supports private Docker repositories with resource-based permissions -// using IAM so that specific users or Amazon EC2 instances can access repositories -// and images. Developers can use the Docker CLI to author and manage images. -// -// See https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21 for more information on this service. -// -// See ecr package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/ecr/ -// -// Using the Client -// -// To contact Amazon EC2 Container Registry with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon EC2 Container Registry client ECR for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/ecr/#New -package ecr diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go deleted file mode 100644 index 834905106..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ecr - -const ( - - // ErrCodeEmptyUploadException for service response error code - // "EmptyUploadException". - // - // The specified layer upload does not contain any layer parts. - ErrCodeEmptyUploadException = "EmptyUploadException" - - // ErrCodeImageAlreadyExistsException for service response error code - // "ImageAlreadyExistsException". - // - // The specified image has already been pushed, and there were no changes to - // the manifest or image tag after the last push. - ErrCodeImageAlreadyExistsException = "ImageAlreadyExistsException" - - // ErrCodeImageNotFoundException for service response error code - // "ImageNotFoundException". - // - // The image requested does not exist in the specified repository. - ErrCodeImageNotFoundException = "ImageNotFoundException" - - // ErrCodeInvalidLayerException for service response error code - // "InvalidLayerException". - // - // The layer digest calculation performed by Amazon ECR upon receipt of the - // image layer does not match the digest specified. - ErrCodeInvalidLayerException = "InvalidLayerException" - - // ErrCodeInvalidLayerPartException for service response error code - // "InvalidLayerPartException". - // - // The layer part size is not valid, or the first byte specified is not consecutive - // to the last byte of a previous layer part upload. - ErrCodeInvalidLayerPartException = "InvalidLayerPartException" - - // ErrCodeInvalidParameterException for service response error code - // "InvalidParameterException". - // - // The specified parameter is invalid. Review the available parameters for the - // API request. - ErrCodeInvalidParameterException = "InvalidParameterException" - - // ErrCodeInvalidTagParameterException for service response error code - // "InvalidTagParameterException". - // - // An invalid parameter has been specified. Tag keys can have a maximum character - // length of 128 characters, and tag values can have a maximum length of 256 - // characters. - ErrCodeInvalidTagParameterException = "InvalidTagParameterException" - - // ErrCodeLayerAlreadyExistsException for service response error code - // "LayerAlreadyExistsException". - // - // The image layer already exists in the associated repository. - ErrCodeLayerAlreadyExistsException = "LayerAlreadyExistsException" - - // ErrCodeLayerInaccessibleException for service response error code - // "LayerInaccessibleException". - // - // The specified layer is not available because it is not associated with an - // image. Unassociated image layers may be cleaned up at any time. - ErrCodeLayerInaccessibleException = "LayerInaccessibleException" - - // ErrCodeLayerPartTooSmallException for service response error code - // "LayerPartTooSmallException". - // - // Layer parts must be at least 5 MiB in size. - ErrCodeLayerPartTooSmallException = "LayerPartTooSmallException" - - // ErrCodeLayersNotFoundException for service response error code - // "LayersNotFoundException". - // - // The specified layers could not be found, or the specified layer is not valid - // for this repository. - ErrCodeLayersNotFoundException = "LayersNotFoundException" - - // ErrCodeLifecyclePolicyNotFoundException for service response error code - // "LifecyclePolicyNotFoundException". - // - // The lifecycle policy could not be found, and no policy is set to the repository. - ErrCodeLifecyclePolicyNotFoundException = "LifecyclePolicyNotFoundException" - - // ErrCodeLifecyclePolicyPreviewInProgressException for service response error code - // "LifecyclePolicyPreviewInProgressException". - // - // The previous lifecycle policy preview request has not completed. Please try - // again later. - ErrCodeLifecyclePolicyPreviewInProgressException = "LifecyclePolicyPreviewInProgressException" - - // ErrCodeLifecyclePolicyPreviewNotFoundException for service response error code - // "LifecyclePolicyPreviewNotFoundException". - // - // There is no dry run for this repository. - ErrCodeLifecyclePolicyPreviewNotFoundException = "LifecyclePolicyPreviewNotFoundException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The operation did not succeed because it would have exceeded a service limit - // for your account. For more information, see Amazon ECR Default Service Limits - // (http://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html) - // in the Amazon Elastic Container Registry User Guide. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeRepositoryAlreadyExistsException for service response error code - // "RepositoryAlreadyExistsException". - // - // The specified repository already exists in the specified registry. - ErrCodeRepositoryAlreadyExistsException = "RepositoryAlreadyExistsException" - - // ErrCodeRepositoryNotEmptyException for service response error code - // "RepositoryNotEmptyException". - // - // The specified repository contains images. To delete a repository that contains - // images, you must force the deletion with the force parameter. - ErrCodeRepositoryNotEmptyException = "RepositoryNotEmptyException" - - // ErrCodeRepositoryNotFoundException for service response error code - // "RepositoryNotFoundException". - // - // The specified repository could not be found. Check the spelling of the specified - // repository and ensure that you are performing operations on the correct registry. - ErrCodeRepositoryNotFoundException = "RepositoryNotFoundException" - - // ErrCodeRepositoryPolicyNotFoundException for service response error code - // "RepositoryPolicyNotFoundException". - // - // The specified repository and registry combination does not have an associated - // repository policy. - ErrCodeRepositoryPolicyNotFoundException = "RepositoryPolicyNotFoundException" - - // ErrCodeServerException for service response error code - // "ServerException". - // - // These errors are usually caused by a server-side issue. - ErrCodeServerException = "ServerException" - - // ErrCodeTooManyTagsException for service response error code - // "TooManyTagsException". - // - // The list of tags on the repository is over the limit. The maximum number - // of tags that can be applied to a repository is 50. - ErrCodeTooManyTagsException = "TooManyTagsException" - - // ErrCodeUploadNotFoundException for service response error code - // "UploadNotFoundException". - // - // The upload could not be found, or the specified upload id is not valid for - // this repository. - ErrCodeUploadNotFoundException = "UploadNotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go deleted file mode 100644 index 3eba7f696..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ecr - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// ECR provides the API operation methods for making requests to -// Amazon EC2 Container Registry. See this package's package overview docs -// for details on the service. -// -// ECR methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ECR 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 = "ecr" // Name of service. - EndpointsID = "api.ecr" // ID to lookup a service endpoint with. - ServiceID = "ECR" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ECR client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a ECR client from just a session. -// svc := ecr.New(mySession) -// -// // Create a ECR client with additional configuration -// svc := ecr.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ECR { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "ecr" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ECR { - svc := &ECR{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-09-21", - JSONVersion: "1.1", - TargetPrefix: "AmazonEC2ContainerRegistry_V20150921", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ECR operation and runs any -// custom request initialization. -func (c *ECR) 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/ecs/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go deleted file mode 100644 index 23a09052c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go +++ /dev/null @@ -1,13807 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ecs - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateCluster = "CreateCluster" - -// CreateClusterRequest generates a "aws/request.Request" representing the -// client's request for the CreateCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCluster for more information on using the CreateCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateClusterRequest method. -// req, resp := client.CreateClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/CreateCluster -func (c *ECS) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) { - op := &request.Operation{ - Name: opCreateCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateClusterInput{} - } - - output = &CreateClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCluster API operation for Amazon EC2 Container Service. -// -// Creates a new Amazon ECS cluster. By default, your account receives a default -// cluster when you launch your first container instance. However, you can create -// your own cluster with a unique name with the CreateCluster action. -// -// When you call the CreateCluster API operation, Amazon ECS attempts to create -// the service-linked role for your account so that required resources in other -// AWS services can be managed on your behalf. However, if the IAM user that -// makes the call does not have permissions to create the service-linked role, -// it is not created. For more information, see Using Service-Linked Roles for -// Amazon ECS (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html) -// in the Amazon Elastic Container Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation CreateCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/CreateCluster -func (c *ECS) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) { - req, out := c.CreateClusterRequest(input) - return out, req.Send() -} - -// CreateClusterWithContext is the same as CreateCluster with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) { - req, out := c.CreateClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateService = "CreateService" - -// CreateServiceRequest generates a "aws/request.Request" representing the -// client's request for the CreateService operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateService for more information on using the CreateService -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateServiceRequest method. -// req, resp := client.CreateServiceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/CreateService -func (c *ECS) CreateServiceRequest(input *CreateServiceInput) (req *request.Request, output *CreateServiceOutput) { - op := &request.Operation{ - Name: opCreateService, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateServiceInput{} - } - - output = &CreateServiceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateService API operation for Amazon EC2 Container Service. -// -// Runs and maintains a desired number of tasks from a specified task definition. -// If the number of tasks running in a service drops below desiredCount, Amazon -// ECS spawns another copy of the task in the specified cluster. To update an -// existing service, see UpdateService. -// -// In addition to maintaining the desired count of tasks in your service, you -// can optionally run your service behind a load balancer. The load balancer -// distributes traffic across the tasks that are associated with the service. -// For more information, see Service Load Balancing (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html) -// in the Amazon Elastic Container Service Developer Guide. -// -// You can optionally specify a deployment configuration for your service. The -// deployment is triggered by changing properties, such as the task definition -// or the desired count of a service, with an UpdateService operation. -// -// If a service is using the ECS deployment controller, the minimum healthy -// percent represents a lower limit on the number of tasks in a service that -// must remain in the RUNNING state during a deployment, as a percentage of -// the desired number of tasks (rounded up to the nearest integer), and while -// any container instances are in the DRAINING state if the service contains -// tasks using the EC2 launch type. This parameter enables you to deploy without -// using additional cluster capacity. For example, if your service has a desired -// number of four tasks and a minimum healthy percent of 50%, the scheduler -// may stop two existing tasks to free up cluster capacity before starting two -// new tasks. Tasks for services that do not use a load balancer are considered -// healthy if they are in the RUNNING state; tasks for services that do use -// a load balancer are considered healthy if they are in the RUNNING state and -// they are reported as healthy by the load balancer. The default value for -// minimum healthy percent is 100%. -// -// If a service is using the ECS deployment controller, the maximum percent -// parameter represents an upper limit on the number of tasks in a service that -// are allowed in the RUNNING or PENDING state during a deployment, as a percentage -// of the desired number of tasks (rounded down to the nearest integer), and -// while any container instances are in the DRAINING state if the service contains -// tasks using the EC2 launch type. This parameter enables you to define the -// deployment batch size. For example, if your service has a desired number -// of four tasks and a maximum percent value of 200%, the scheduler may start -// four new tasks before stopping the four older tasks (provided that the cluster -// resources required to do this are available). The default value for maximum -// percent is 200%. -// -// If a service is using the CODE_DEPLOY deployment controller and tasks that -// use the EC2 launch type, the minimum healthy percent and maximum percent -// values are only used to define the lower and upper limit on the number of -// the tasks in the service that remain in the RUNNING state while the container -// instances are in the DRAINING state. If the tasks in the service use the -// Fargate launch type, the minimum healthy percent and maximum percent values -// are not used, although they are currently visible when describing your service. -// -// Tasks for services that do not use a load balancer are considered healthy -// if they are in the RUNNING state. Tasks for services that do use a load balancer -// are considered healthy if they are in the RUNNING state and the container -// instance they are hosted on is reported as healthy by the load balancer. -// The default value for a replica service for minimumHealthyPercent is 100%. -// The default value for a daemon service for minimumHealthyPercent is 0%. -// -// When the service scheduler launches new tasks, it determines task placement -// in your cluster using the following logic: -// -// * Determine which of the container instances in your cluster can support -// your service's task definition (for example, they have the required CPU, -// memory, ports, and container instance attributes). -// -// * By default, the service scheduler attempts to balance tasks across Availability -// Zones in this manner (although you can choose a different placement strategy) -// with the placementStrategy parameter): -// -// Sort the valid container instances, giving priority to instances that have -// the fewest number of running tasks for this service in their respective -// Availability Zone. For example, if zone A has one running service task -// and zones B and C each have zero, valid container instances in either -// zone B or C are considered optimal for placement. -// -// Place the new service task on a valid container instance in an optimal Availability -// Zone (based on the previous steps), favoring container instances with -// the fewest number of running tasks for this service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation CreateService for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// * ErrCodeUnsupportedFeatureException "UnsupportedFeatureException" -// The specified task is not supported in this Region. -// -// * ErrCodePlatformUnknownException "PlatformUnknownException" -// The specified platform version does not exist. -// -// * ErrCodePlatformTaskDefinitionIncompatibilityException "PlatformTaskDefinitionIncompatibilityException" -// The specified platform version does not satisfy the task definition's required -// capabilities. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have authorization to perform the requested action. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/CreateService -func (c *ECS) CreateService(input *CreateServiceInput) (*CreateServiceOutput, error) { - req, out := c.CreateServiceRequest(input) - return out, req.Send() -} - -// CreateServiceWithContext is the same as CreateService with the addition of -// the ability to pass a context and additional request options. -// -// See CreateService for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) CreateServiceWithContext(ctx aws.Context, input *CreateServiceInput, opts ...request.Option) (*CreateServiceOutput, error) { - req, out := c.CreateServiceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAccountSetting = "DeleteAccountSetting" - -// DeleteAccountSettingRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAccountSetting operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAccountSetting for more information on using the DeleteAccountSetting -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAccountSettingRequest method. -// req, resp := client.DeleteAccountSettingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteAccountSetting -func (c *ECS) DeleteAccountSettingRequest(input *DeleteAccountSettingInput) (req *request.Request, output *DeleteAccountSettingOutput) { - op := &request.Operation{ - Name: opDeleteAccountSetting, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAccountSettingInput{} - } - - output = &DeleteAccountSettingOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteAccountSetting API operation for Amazon EC2 Container Service. -// -// Modifies the ARN and resource ID format of a resource for a specified IAM -// user, IAM role, or the root user for an account. You can specify whether -// the new ARN and resource ID format are disabled for new resources that are -// created. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation DeleteAccountSetting for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteAccountSetting -func (c *ECS) DeleteAccountSetting(input *DeleteAccountSettingInput) (*DeleteAccountSettingOutput, error) { - req, out := c.DeleteAccountSettingRequest(input) - return out, req.Send() -} - -// DeleteAccountSettingWithContext is the same as DeleteAccountSetting with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAccountSetting for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) DeleteAccountSettingWithContext(ctx aws.Context, input *DeleteAccountSettingInput, opts ...request.Option) (*DeleteAccountSettingOutput, error) { - req, out := c.DeleteAccountSettingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAttributes = "DeleteAttributes" - -// DeleteAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAttributes for more information on using the DeleteAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAttributesRequest method. -// req, resp := client.DeleteAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteAttributes -func (c *ECS) DeleteAttributesRequest(input *DeleteAttributesInput) (req *request.Request, output *DeleteAttributesOutput) { - op := &request.Operation{ - Name: opDeleteAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAttributesInput{} - } - - output = &DeleteAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteAttributes API operation for Amazon EC2 Container Service. -// -// Deletes one or more custom attributes from an Amazon ECS resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation DeleteAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// * ErrCodeTargetNotFoundException "TargetNotFoundException" -// The specified target could not be found. You can view your available container -// instances with ListContainerInstances. Amazon ECS container instances are -// cluster-specific and Region-specific. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteAttributes -func (c *ECS) DeleteAttributes(input *DeleteAttributesInput) (*DeleteAttributesOutput, error) { - req, out := c.DeleteAttributesRequest(input) - return out, req.Send() -} - -// DeleteAttributesWithContext is the same as DeleteAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) DeleteAttributesWithContext(ctx aws.Context, input *DeleteAttributesInput, opts ...request.Option) (*DeleteAttributesOutput, error) { - req, out := c.DeleteAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCluster = "DeleteCluster" - -// DeleteClusterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCluster for more information on using the DeleteCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteClusterRequest method. -// req, resp := client.DeleteClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteCluster -func (c *ECS) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) { - op := &request.Operation{ - Name: opDeleteCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteClusterInput{} - } - - output = &DeleteClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteCluster API operation for Amazon EC2 Container Service. -// -// Deletes the specified cluster. You must deregister all container instances -// from this cluster before you may delete it. You can list the container instances -// in a cluster with ListContainerInstances and deregister them with DeregisterContainerInstance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation DeleteCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// * ErrCodeClusterContainsContainerInstancesException "ClusterContainsContainerInstancesException" -// You cannot delete a cluster that has registered container instances. First, -// deregister the container instances before you can delete the cluster. For -// more information, see DeregisterContainerInstance. -// -// * ErrCodeClusterContainsServicesException "ClusterContainsServicesException" -// You cannot delete a cluster that contains services. First, update the service -// to reduce its desired task count to 0 and then delete the service. For more -// information, see UpdateService and DeleteService. -// -// * ErrCodeClusterContainsTasksException "ClusterContainsTasksException" -// You cannot delete a cluster that has active tasks. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteCluster -func (c *ECS) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) { - req, out := c.DeleteClusterRequest(input) - return out, req.Send() -} - -// DeleteClusterWithContext is the same as DeleteCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) { - req, out := c.DeleteClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteService = "DeleteService" - -// DeleteServiceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteService operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteService for more information on using the DeleteService -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteServiceRequest method. -// req, resp := client.DeleteServiceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteService -func (c *ECS) DeleteServiceRequest(input *DeleteServiceInput) (req *request.Request, output *DeleteServiceOutput) { - op := &request.Operation{ - Name: opDeleteService, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteServiceInput{} - } - - output = &DeleteServiceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteService API operation for Amazon EC2 Container Service. -// -// Deletes a specified service within a cluster. You can delete a service if -// you have no running tasks in it and the desired task count is zero. If the -// service is actively maintaining tasks, you cannot delete it, and you must -// update the service to a desired task count of zero. For more information, -// see UpdateService. -// -// When you delete a service, if there are still running tasks that require -// cleanup, the service status moves from ACTIVE to DRAINING, and the service -// is no longer visible in the console or in the ListServices API operation. -// After the tasks have stopped, then the service status moves from DRAINING -// to INACTIVE. Services in the DRAINING or INACTIVE status can still be viewed -// with the DescribeServices API operation. However, in the future, INACTIVE -// services may be cleaned up and purged from Amazon ECS record keeping, and -// DescribeServices calls on those services return a ServiceNotFoundException -// error. -// -// If you attempt to create a new service with the same name as an existing -// service in either ACTIVE or DRAINING status, you receive an error. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation DeleteService for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// * ErrCodeServiceNotFoundException "ServiceNotFoundException" -// The specified service could not be found. You can view your available services -// with ListServices. Amazon ECS services are cluster-specific and Region-specific. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteService -func (c *ECS) DeleteService(input *DeleteServiceInput) (*DeleteServiceOutput, error) { - req, out := c.DeleteServiceRequest(input) - return out, req.Send() -} - -// DeleteServiceWithContext is the same as DeleteService with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteService for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) DeleteServiceWithContext(ctx aws.Context, input *DeleteServiceInput, opts ...request.Option) (*DeleteServiceOutput, error) { - req, out := c.DeleteServiceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterContainerInstance = "DeregisterContainerInstance" - -// DeregisterContainerInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterContainerInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterContainerInstance for more information on using the DeregisterContainerInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterContainerInstanceRequest method. -// req, resp := client.DeregisterContainerInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeregisterContainerInstance -func (c *ECS) DeregisterContainerInstanceRequest(input *DeregisterContainerInstanceInput) (req *request.Request, output *DeregisterContainerInstanceOutput) { - op := &request.Operation{ - Name: opDeregisterContainerInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterContainerInstanceInput{} - } - - output = &DeregisterContainerInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeregisterContainerInstance API operation for Amazon EC2 Container Service. -// -// Deregisters an Amazon ECS container instance from the specified cluster. -// This instance is no longer available to run tasks. -// -// If you intend to use the container instance for some other purpose after -// deregistration, you should stop all of the tasks running on the container -// instance before deregistration. That prevents any orphaned tasks from consuming -// resources. -// -// Deregistering a container instance removes the instance from a cluster, but -// it does not terminate the EC2 instance. If you are finished using the instance, -// be sure to terminate it in the Amazon EC2 console to stop billing. -// -// If you terminate a running container instance, Amazon ECS automatically deregisters -// the instance from your cluster (stopped container instances or instances -// with disconnected agents are not automatically deregistered when terminated). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation DeregisterContainerInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeregisterContainerInstance -func (c *ECS) DeregisterContainerInstance(input *DeregisterContainerInstanceInput) (*DeregisterContainerInstanceOutput, error) { - req, out := c.DeregisterContainerInstanceRequest(input) - return out, req.Send() -} - -// DeregisterContainerInstanceWithContext is the same as DeregisterContainerInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterContainerInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) DeregisterContainerInstanceWithContext(ctx aws.Context, input *DeregisterContainerInstanceInput, opts ...request.Option) (*DeregisterContainerInstanceOutput, error) { - req, out := c.DeregisterContainerInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterTaskDefinition = "DeregisterTaskDefinition" - -// DeregisterTaskDefinitionRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterTaskDefinition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterTaskDefinition for more information on using the DeregisterTaskDefinition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterTaskDefinitionRequest method. -// req, resp := client.DeregisterTaskDefinitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeregisterTaskDefinition -func (c *ECS) DeregisterTaskDefinitionRequest(input *DeregisterTaskDefinitionInput) (req *request.Request, output *DeregisterTaskDefinitionOutput) { - op := &request.Operation{ - Name: opDeregisterTaskDefinition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterTaskDefinitionInput{} - } - - output = &DeregisterTaskDefinitionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeregisterTaskDefinition API operation for Amazon EC2 Container Service. -// -// Deregisters the specified task definition by family and revision. Upon deregistration, -// the task definition is marked as INACTIVE. Existing tasks and services that -// reference an INACTIVE task definition continue to run without disruption. -// Existing services that reference an INACTIVE task definition can still scale -// up or down by modifying the service's desired count. -// -// You cannot use an INACTIVE task definition to run new tasks or create new -// services, and you cannot update an existing service to reference an INACTIVE -// task definition. However, there may be up to a 10-minute window following -// deregistration where these restrictions have not yet taken effect. -// -// At this time, INACTIVE task definitions remain discoverable in your account -// indefinitely. However, this behavior is subject to change in the future, -// so you should not rely on INACTIVE task definitions persisting beyond the -// lifecycle of any associated tasks and 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 Amazon EC2 Container Service's -// API operation DeregisterTaskDefinition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeregisterTaskDefinition -func (c *ECS) DeregisterTaskDefinition(input *DeregisterTaskDefinitionInput) (*DeregisterTaskDefinitionOutput, error) { - req, out := c.DeregisterTaskDefinitionRequest(input) - return out, req.Send() -} - -// DeregisterTaskDefinitionWithContext is the same as DeregisterTaskDefinition with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterTaskDefinition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) DeregisterTaskDefinitionWithContext(ctx aws.Context, input *DeregisterTaskDefinitionInput, opts ...request.Option) (*DeregisterTaskDefinitionOutput, error) { - req, out := c.DeregisterTaskDefinitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeClusters = "DescribeClusters" - -// DescribeClustersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClusters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClusters for more information on using the DescribeClusters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClustersRequest method. -// req, resp := client.DescribeClustersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeClusters -func (c *ECS) DescribeClustersRequest(input *DescribeClustersInput) (req *request.Request, output *DescribeClustersOutput) { - op := &request.Operation{ - Name: opDescribeClusters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeClustersInput{} - } - - output = &DescribeClustersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClusters API operation for Amazon EC2 Container Service. -// -// Describes one or more of your clusters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation DescribeClusters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeClusters -func (c *ECS) DescribeClusters(input *DescribeClustersInput) (*DescribeClustersOutput, error) { - req, out := c.DescribeClustersRequest(input) - return out, req.Send() -} - -// DescribeClustersWithContext is the same as DescribeClusters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClusters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) DescribeClustersWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.Option) (*DescribeClustersOutput, error) { - req, out := c.DescribeClustersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeContainerInstances = "DescribeContainerInstances" - -// DescribeContainerInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeContainerInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeContainerInstances for more information on using the DescribeContainerInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeContainerInstancesRequest method. -// req, resp := client.DescribeContainerInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeContainerInstances -func (c *ECS) DescribeContainerInstancesRequest(input *DescribeContainerInstancesInput) (req *request.Request, output *DescribeContainerInstancesOutput) { - op := &request.Operation{ - Name: opDescribeContainerInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeContainerInstancesInput{} - } - - output = &DescribeContainerInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeContainerInstances API operation for Amazon EC2 Container Service. -// -// Describes Amazon Elastic Container Service container instances. Returns metadata -// about registered and remaining resources on each container instance requested. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation DescribeContainerInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeContainerInstances -func (c *ECS) DescribeContainerInstances(input *DescribeContainerInstancesInput) (*DescribeContainerInstancesOutput, error) { - req, out := c.DescribeContainerInstancesRequest(input) - return out, req.Send() -} - -// DescribeContainerInstancesWithContext is the same as DescribeContainerInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeContainerInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) DescribeContainerInstancesWithContext(ctx aws.Context, input *DescribeContainerInstancesInput, opts ...request.Option) (*DescribeContainerInstancesOutput, error) { - req, out := c.DescribeContainerInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeServices = "DescribeServices" - -// DescribeServicesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeServices operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeServices for more information on using the DescribeServices -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeServicesRequest method. -// req, resp := client.DescribeServicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeServices -func (c *ECS) DescribeServicesRequest(input *DescribeServicesInput) (req *request.Request, output *DescribeServicesOutput) { - op := &request.Operation{ - Name: opDescribeServices, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeServicesInput{} - } - - output = &DescribeServicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeServices API operation for Amazon EC2 Container Service. -// -// Describes the specified services running in your cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation DescribeServices for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeServices -func (c *ECS) DescribeServices(input *DescribeServicesInput) (*DescribeServicesOutput, error) { - req, out := c.DescribeServicesRequest(input) - return out, req.Send() -} - -// DescribeServicesWithContext is the same as DescribeServices with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeServices for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) DescribeServicesWithContext(ctx aws.Context, input *DescribeServicesInput, opts ...request.Option) (*DescribeServicesOutput, error) { - req, out := c.DescribeServicesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTaskDefinition = "DescribeTaskDefinition" - -// DescribeTaskDefinitionRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTaskDefinition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTaskDefinition for more information on using the DescribeTaskDefinition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTaskDefinitionRequest method. -// req, resp := client.DescribeTaskDefinitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeTaskDefinition -func (c *ECS) DescribeTaskDefinitionRequest(input *DescribeTaskDefinitionInput) (req *request.Request, output *DescribeTaskDefinitionOutput) { - op := &request.Operation{ - Name: opDescribeTaskDefinition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTaskDefinitionInput{} - } - - output = &DescribeTaskDefinitionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTaskDefinition API operation for Amazon EC2 Container Service. -// -// Describes a task definition. You can specify a family and revision to find -// information about a specific task definition, or you can simply specify the -// family to find the latest ACTIVE revision in that family. -// -// You can only describe INACTIVE task definitions while an active task or service -// references them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation DescribeTaskDefinition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeTaskDefinition -func (c *ECS) DescribeTaskDefinition(input *DescribeTaskDefinitionInput) (*DescribeTaskDefinitionOutput, error) { - req, out := c.DescribeTaskDefinitionRequest(input) - return out, req.Send() -} - -// DescribeTaskDefinitionWithContext is the same as DescribeTaskDefinition with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTaskDefinition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) DescribeTaskDefinitionWithContext(ctx aws.Context, input *DescribeTaskDefinitionInput, opts ...request.Option) (*DescribeTaskDefinitionOutput, error) { - req, out := c.DescribeTaskDefinitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTasks = "DescribeTasks" - -// DescribeTasksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTasks for more information on using the DescribeTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTasksRequest method. -// req, resp := client.DescribeTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeTasks -func (c *ECS) DescribeTasksRequest(input *DescribeTasksInput) (req *request.Request, output *DescribeTasksOutput) { - op := &request.Operation{ - Name: opDescribeTasks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTasksInput{} - } - - output = &DescribeTasksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTasks API operation for Amazon EC2 Container Service. -// -// Describes a specified task or tasks. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation DescribeTasks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeTasks -func (c *ECS) DescribeTasks(input *DescribeTasksInput) (*DescribeTasksOutput, error) { - req, out := c.DescribeTasksRequest(input) - return out, req.Send() -} - -// DescribeTasksWithContext is the same as DescribeTasks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) DescribeTasksWithContext(ctx aws.Context, input *DescribeTasksInput, opts ...request.Option) (*DescribeTasksOutput, error) { - req, out := c.DescribeTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDiscoverPollEndpoint = "DiscoverPollEndpoint" - -// DiscoverPollEndpointRequest generates a "aws/request.Request" representing the -// client's request for the DiscoverPollEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DiscoverPollEndpoint for more information on using the DiscoverPollEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DiscoverPollEndpointRequest method. -// req, resp := client.DiscoverPollEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DiscoverPollEndpoint -func (c *ECS) DiscoverPollEndpointRequest(input *DiscoverPollEndpointInput) (req *request.Request, output *DiscoverPollEndpointOutput) { - op := &request.Operation{ - Name: opDiscoverPollEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DiscoverPollEndpointInput{} - } - - output = &DiscoverPollEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// DiscoverPollEndpoint API operation for Amazon EC2 Container Service. -// -// This action is only used by the Amazon ECS agent, and it is not intended -// for use outside of the agent. -// -// Returns an endpoint for the Amazon ECS agent to poll for updates. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation DiscoverPollEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DiscoverPollEndpoint -func (c *ECS) DiscoverPollEndpoint(input *DiscoverPollEndpointInput) (*DiscoverPollEndpointOutput, error) { - req, out := c.DiscoverPollEndpointRequest(input) - return out, req.Send() -} - -// DiscoverPollEndpointWithContext is the same as DiscoverPollEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See DiscoverPollEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) DiscoverPollEndpointWithContext(ctx aws.Context, input *DiscoverPollEndpointInput, opts ...request.Option) (*DiscoverPollEndpointOutput, error) { - req, out := c.DiscoverPollEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAccountSettings = "ListAccountSettings" - -// ListAccountSettingsRequest generates a "aws/request.Request" representing the -// client's request for the ListAccountSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAccountSettings for more information on using the ListAccountSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAccountSettingsRequest method. -// req, resp := client.ListAccountSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListAccountSettings -func (c *ECS) ListAccountSettingsRequest(input *ListAccountSettingsInput) (req *request.Request, output *ListAccountSettingsOutput) { - op := &request.Operation{ - Name: opListAccountSettings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListAccountSettingsInput{} - } - - output = &ListAccountSettingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAccountSettings API operation for Amazon EC2 Container Service. -// -// Lists the account settings for an Amazon ECS resource for a specified principal. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation ListAccountSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListAccountSettings -func (c *ECS) ListAccountSettings(input *ListAccountSettingsInput) (*ListAccountSettingsOutput, error) { - req, out := c.ListAccountSettingsRequest(input) - return out, req.Send() -} - -// ListAccountSettingsWithContext is the same as ListAccountSettings with the addition of -// the ability to pass a context and additional request options. -// -// See ListAccountSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) ListAccountSettingsWithContext(ctx aws.Context, input *ListAccountSettingsInput, opts ...request.Option) (*ListAccountSettingsOutput, error) { - req, out := c.ListAccountSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAttributes = "ListAttributes" - -// ListAttributesRequest generates a "aws/request.Request" representing the -// client's request for the ListAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAttributes for more information on using the ListAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAttributesRequest method. -// req, resp := client.ListAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListAttributes -func (c *ECS) ListAttributesRequest(input *ListAttributesInput) (req *request.Request, output *ListAttributesOutput) { - op := &request.Operation{ - Name: opListAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListAttributesInput{} - } - - output = &ListAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAttributes API operation for Amazon EC2 Container Service. -// -// Lists the attributes for Amazon ECS resources within a specified target type -// and cluster. When you specify a target type and cluster, ListAttributes returns -// a list of attribute objects, one for each attribute on each resource. You -// can filter the list of results to a single attribute name to only return -// results that have that name. You can also filter the results by attribute -// name and value, for example, to see which container instances in a cluster -// are running a Linux AMI (ecs.os-type=linux). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation ListAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListAttributes -func (c *ECS) ListAttributes(input *ListAttributesInput) (*ListAttributesOutput, error) { - req, out := c.ListAttributesRequest(input) - return out, req.Send() -} - -// ListAttributesWithContext is the same as ListAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See ListAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) ListAttributesWithContext(ctx aws.Context, input *ListAttributesInput, opts ...request.Option) (*ListAttributesOutput, error) { - req, out := c.ListAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListClusters = "ListClusters" - -// ListClustersRequest generates a "aws/request.Request" representing the -// client's request for the ListClusters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListClusters for more information on using the ListClusters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListClustersRequest method. -// req, resp := client.ListClustersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListClusters -func (c *ECS) ListClustersRequest(input *ListClustersInput) (req *request.Request, output *ListClustersOutput) { - op := &request.Operation{ - Name: opListClusters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListClustersInput{} - } - - output = &ListClustersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListClusters API operation for Amazon EC2 Container Service. -// -// Returns a list of existing clusters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation ListClusters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListClusters -func (c *ECS) ListClusters(input *ListClustersInput) (*ListClustersOutput, error) { - req, out := c.ListClustersRequest(input) - return out, req.Send() -} - -// ListClustersWithContext is the same as ListClusters with the addition of -// the ability to pass a context and additional request options. -// -// See ListClusters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) ListClustersWithContext(ctx aws.Context, input *ListClustersInput, opts ...request.Option) (*ListClustersOutput, error) { - req, out := c.ListClustersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListClustersPages iterates over the pages of a ListClusters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListClusters 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 ListClusters operation. -// pageNum := 0 -// err := client.ListClustersPages(params, -// func(page *ListClustersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ECS) ListClustersPages(input *ListClustersInput, fn func(*ListClustersOutput, bool) bool) error { - return c.ListClustersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListClustersPagesWithContext same as ListClustersPages 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 *ECS) ListClustersPagesWithContext(ctx aws.Context, input *ListClustersInput, fn func(*ListClustersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListClustersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListClustersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListClustersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListContainerInstances = "ListContainerInstances" - -// ListContainerInstancesRequest generates a "aws/request.Request" representing the -// client's request for the ListContainerInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListContainerInstances for more information on using the ListContainerInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListContainerInstancesRequest method. -// req, resp := client.ListContainerInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListContainerInstances -func (c *ECS) ListContainerInstancesRequest(input *ListContainerInstancesInput) (req *request.Request, output *ListContainerInstancesOutput) { - op := &request.Operation{ - Name: opListContainerInstances, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListContainerInstancesInput{} - } - - output = &ListContainerInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListContainerInstances API operation for Amazon EC2 Container Service. -// -// Returns a list of container instances in a specified cluster. You can filter -// the results of a ListContainerInstances operation with cluster query language -// statements inside the filter parameter. For more information, see Cluster -// Query Language (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) -// in the Amazon Elastic Container Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation ListContainerInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListContainerInstances -func (c *ECS) ListContainerInstances(input *ListContainerInstancesInput) (*ListContainerInstancesOutput, error) { - req, out := c.ListContainerInstancesRequest(input) - return out, req.Send() -} - -// ListContainerInstancesWithContext is the same as ListContainerInstances with the addition of -// the ability to pass a context and additional request options. -// -// See ListContainerInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) ListContainerInstancesWithContext(ctx aws.Context, input *ListContainerInstancesInput, opts ...request.Option) (*ListContainerInstancesOutput, error) { - req, out := c.ListContainerInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListContainerInstancesPages iterates over the pages of a ListContainerInstances operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListContainerInstances 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 ListContainerInstances operation. -// pageNum := 0 -// err := client.ListContainerInstancesPages(params, -// func(page *ListContainerInstancesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ECS) ListContainerInstancesPages(input *ListContainerInstancesInput, fn func(*ListContainerInstancesOutput, bool) bool) error { - return c.ListContainerInstancesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListContainerInstancesPagesWithContext same as ListContainerInstancesPages 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 *ECS) ListContainerInstancesPagesWithContext(ctx aws.Context, input *ListContainerInstancesInput, fn func(*ListContainerInstancesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListContainerInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListContainerInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListContainerInstancesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListServices = "ListServices" - -// ListServicesRequest generates a "aws/request.Request" representing the -// client's request for the ListServices operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListServices for more information on using the ListServices -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListServicesRequest method. -// req, resp := client.ListServicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListServices -func (c *ECS) ListServicesRequest(input *ListServicesInput) (req *request.Request, output *ListServicesOutput) { - op := &request.Operation{ - Name: opListServices, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListServicesInput{} - } - - output = &ListServicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListServices API operation for Amazon EC2 Container Service. -// -// Lists the services that are running in a specified cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation ListServices for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListServices -func (c *ECS) ListServices(input *ListServicesInput) (*ListServicesOutput, error) { - req, out := c.ListServicesRequest(input) - return out, req.Send() -} - -// ListServicesWithContext is the same as ListServices with the addition of -// the ability to pass a context and additional request options. -// -// See ListServices for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) ListServicesWithContext(ctx aws.Context, input *ListServicesInput, opts ...request.Option) (*ListServicesOutput, error) { - req, out := c.ListServicesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListServicesPages iterates over the pages of a ListServices operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListServices 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 ListServices operation. -// pageNum := 0 -// err := client.ListServicesPages(params, -// func(page *ListServicesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ECS) ListServicesPages(input *ListServicesInput, fn func(*ListServicesOutput, bool) bool) error { - return c.ListServicesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListServicesPagesWithContext same as ListServicesPages 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 *ECS) ListServicesPagesWithContext(ctx aws.Context, input *ListServicesInput, fn func(*ListServicesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListServicesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListServicesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListServicesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTagsForResource = "ListTagsForResource" - -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the 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/ecs-2014-11-13/ListTagsForResource -func (c *ECS) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for Amazon EC2 Container Service. -// -// List the tags for an Amazon ECS resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTagsForResource -func (c *ECS) 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 *ECS) 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 opListTaskDefinitionFamilies = "ListTaskDefinitionFamilies" - -// ListTaskDefinitionFamiliesRequest generates a "aws/request.Request" representing the -// client's request for the ListTaskDefinitionFamilies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTaskDefinitionFamilies for more information on using the ListTaskDefinitionFamilies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTaskDefinitionFamiliesRequest method. -// req, resp := client.ListTaskDefinitionFamiliesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTaskDefinitionFamilies -func (c *ECS) ListTaskDefinitionFamiliesRequest(input *ListTaskDefinitionFamiliesInput) (req *request.Request, output *ListTaskDefinitionFamiliesOutput) { - op := &request.Operation{ - Name: opListTaskDefinitionFamilies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTaskDefinitionFamiliesInput{} - } - - output = &ListTaskDefinitionFamiliesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTaskDefinitionFamilies API operation for Amazon EC2 Container Service. -// -// Returns a list of task definition families that are registered to your account -// (which may include task definition families that no longer have any ACTIVE -// task definition revisions). -// -// You can filter out task definition families that do not contain any ACTIVE -// task definition revisions by setting the status parameter to ACTIVE. You -// can also filter the results with the familyPrefix parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation ListTaskDefinitionFamilies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTaskDefinitionFamilies -func (c *ECS) ListTaskDefinitionFamilies(input *ListTaskDefinitionFamiliesInput) (*ListTaskDefinitionFamiliesOutput, error) { - req, out := c.ListTaskDefinitionFamiliesRequest(input) - return out, req.Send() -} - -// ListTaskDefinitionFamiliesWithContext is the same as ListTaskDefinitionFamilies with the addition of -// the ability to pass a context and additional request options. -// -// See ListTaskDefinitionFamilies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) ListTaskDefinitionFamiliesWithContext(ctx aws.Context, input *ListTaskDefinitionFamiliesInput, opts ...request.Option) (*ListTaskDefinitionFamiliesOutput, error) { - req, out := c.ListTaskDefinitionFamiliesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTaskDefinitionFamiliesPages iterates over the pages of a ListTaskDefinitionFamilies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTaskDefinitionFamilies 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 ListTaskDefinitionFamilies operation. -// pageNum := 0 -// err := client.ListTaskDefinitionFamiliesPages(params, -// func(page *ListTaskDefinitionFamiliesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ECS) ListTaskDefinitionFamiliesPages(input *ListTaskDefinitionFamiliesInput, fn func(*ListTaskDefinitionFamiliesOutput, bool) bool) error { - return c.ListTaskDefinitionFamiliesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTaskDefinitionFamiliesPagesWithContext same as ListTaskDefinitionFamiliesPages 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 *ECS) ListTaskDefinitionFamiliesPagesWithContext(ctx aws.Context, input *ListTaskDefinitionFamiliesInput, fn func(*ListTaskDefinitionFamiliesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTaskDefinitionFamiliesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTaskDefinitionFamiliesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTaskDefinitionFamiliesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTaskDefinitions = "ListTaskDefinitions" - -// ListTaskDefinitionsRequest generates a "aws/request.Request" representing the -// client's request for the ListTaskDefinitions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTaskDefinitions for more information on using the ListTaskDefinitions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTaskDefinitionsRequest method. -// req, resp := client.ListTaskDefinitionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTaskDefinitions -func (c *ECS) ListTaskDefinitionsRequest(input *ListTaskDefinitionsInput) (req *request.Request, output *ListTaskDefinitionsOutput) { - op := &request.Operation{ - Name: opListTaskDefinitions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTaskDefinitionsInput{} - } - - output = &ListTaskDefinitionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTaskDefinitions API operation for Amazon EC2 Container Service. -// -// Returns a list of task definitions that are registered to your account. You -// can filter the results by family name with the familyPrefix parameter or -// by status with the status parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation ListTaskDefinitions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTaskDefinitions -func (c *ECS) ListTaskDefinitions(input *ListTaskDefinitionsInput) (*ListTaskDefinitionsOutput, error) { - req, out := c.ListTaskDefinitionsRequest(input) - return out, req.Send() -} - -// ListTaskDefinitionsWithContext is the same as ListTaskDefinitions with the addition of -// the ability to pass a context and additional request options. -// -// See ListTaskDefinitions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) ListTaskDefinitionsWithContext(ctx aws.Context, input *ListTaskDefinitionsInput, opts ...request.Option) (*ListTaskDefinitionsOutput, error) { - req, out := c.ListTaskDefinitionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTaskDefinitionsPages iterates over the pages of a ListTaskDefinitions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTaskDefinitions 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 ListTaskDefinitions operation. -// pageNum := 0 -// err := client.ListTaskDefinitionsPages(params, -// func(page *ListTaskDefinitionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ECS) ListTaskDefinitionsPages(input *ListTaskDefinitionsInput, fn func(*ListTaskDefinitionsOutput, bool) bool) error { - return c.ListTaskDefinitionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTaskDefinitionsPagesWithContext same as ListTaskDefinitionsPages 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 *ECS) ListTaskDefinitionsPagesWithContext(ctx aws.Context, input *ListTaskDefinitionsInput, fn func(*ListTaskDefinitionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTaskDefinitionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTaskDefinitionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTaskDefinitionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTasks = "ListTasks" - -// ListTasksRequest generates a "aws/request.Request" representing the -// client's request for the ListTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTasks for more information on using the ListTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTasksRequest method. -// req, resp := client.ListTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTasks -func (c *ECS) ListTasksRequest(input *ListTasksInput) (req *request.Request, output *ListTasksOutput) { - op := &request.Operation{ - Name: opListTasks, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTasksInput{} - } - - output = &ListTasksOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTasks API operation for Amazon EC2 Container Service. -// -// Returns a list of tasks for a specified cluster. You can filter the results -// by family name, by a particular container instance, or by the desired status -// of the task with the family, containerInstance, and desiredStatus parameters. -// -// Recently stopped tasks might appear in the returned results. Currently, stopped -// tasks appear in the returned results for at least one hour. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation ListTasks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// * ErrCodeServiceNotFoundException "ServiceNotFoundException" -// The specified service could not be found. You can view your available services -// with ListServices. Amazon ECS services are cluster-specific and Region-specific. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTasks -func (c *ECS) ListTasks(input *ListTasksInput) (*ListTasksOutput, error) { - req, out := c.ListTasksRequest(input) - return out, req.Send() -} - -// ListTasksWithContext is the same as ListTasks with the addition of -// the ability to pass a context and additional request options. -// -// See ListTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) ListTasksWithContext(ctx aws.Context, input *ListTasksInput, opts ...request.Option) (*ListTasksOutput, error) { - req, out := c.ListTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTasksPages iterates over the pages of a ListTasks operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTasks 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 ListTasks operation. -// pageNum := 0 -// err := client.ListTasksPages(params, -// func(page *ListTasksOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ECS) ListTasksPages(input *ListTasksInput, fn func(*ListTasksOutput, bool) bool) error { - return c.ListTasksPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTasksPagesWithContext same as ListTasksPages 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 *ECS) ListTasksPagesWithContext(ctx aws.Context, input *ListTasksInput, fn func(*ListTasksOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTasksOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opPutAccountSetting = "PutAccountSetting" - -// PutAccountSettingRequest generates a "aws/request.Request" representing the -// client's request for the PutAccountSetting operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutAccountSetting for more information on using the PutAccountSetting -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutAccountSettingRequest method. -// req, resp := client.PutAccountSettingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutAccountSetting -func (c *ECS) PutAccountSettingRequest(input *PutAccountSettingInput) (req *request.Request, output *PutAccountSettingOutput) { - op := &request.Operation{ - Name: opPutAccountSetting, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutAccountSettingInput{} - } - - output = &PutAccountSettingOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutAccountSetting API operation for Amazon EC2 Container Service. -// -// Modifies the ARN and resource ID format of a resource for a specified IAM -// user, IAM role, or the root user for an account. You can specify whether -// the new ARN and resource ID format are enabled for new resources that are -// created. Enabling this setting is required to use new Amazon ECS features -// such as resource tagging. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation PutAccountSetting for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutAccountSetting -func (c *ECS) PutAccountSetting(input *PutAccountSettingInput) (*PutAccountSettingOutput, error) { - req, out := c.PutAccountSettingRequest(input) - return out, req.Send() -} - -// PutAccountSettingWithContext is the same as PutAccountSetting with the addition of -// the ability to pass a context and additional request options. -// -// See PutAccountSetting for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) PutAccountSettingWithContext(ctx aws.Context, input *PutAccountSettingInput, opts ...request.Option) (*PutAccountSettingOutput, error) { - req, out := c.PutAccountSettingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutAttributes = "PutAttributes" - -// PutAttributesRequest generates a "aws/request.Request" representing the -// client's request for the PutAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutAttributes for more information on using the PutAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutAttributesRequest method. -// req, resp := client.PutAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutAttributes -func (c *ECS) PutAttributesRequest(input *PutAttributesInput) (req *request.Request, output *PutAttributesOutput) { - op := &request.Operation{ - Name: opPutAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutAttributesInput{} - } - - output = &PutAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutAttributes API operation for Amazon EC2 Container Service. -// -// Create or update an attribute on an Amazon ECS resource. If the attribute -// does not exist, it is created. If the attribute exists, its value is replaced -// with the specified value. To delete an attribute, use DeleteAttributes. For -// more information, see Attributes (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes) -// in the Amazon Elastic Container Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation PutAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// * ErrCodeTargetNotFoundException "TargetNotFoundException" -// The specified target could not be found. You can view your available container -// instances with ListContainerInstances. Amazon ECS container instances are -// cluster-specific and Region-specific. -// -// * ErrCodeAttributeLimitExceededException "AttributeLimitExceededException" -// You can apply up to 10 custom attributes per resource. You can view the attributes -// of a resource with ListAttributes. You can remove existing attributes on -// a resource with DeleteAttributes. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutAttributes -func (c *ECS) PutAttributes(input *PutAttributesInput) (*PutAttributesOutput, error) { - req, out := c.PutAttributesRequest(input) - return out, req.Send() -} - -// PutAttributesWithContext is the same as PutAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See PutAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) PutAttributesWithContext(ctx aws.Context, input *PutAttributesInput, opts ...request.Option) (*PutAttributesOutput, error) { - req, out := c.PutAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterContainerInstance = "RegisterContainerInstance" - -// RegisterContainerInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RegisterContainerInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterContainerInstance for more information on using the RegisterContainerInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterContainerInstanceRequest method. -// req, resp := client.RegisterContainerInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RegisterContainerInstance -func (c *ECS) RegisterContainerInstanceRequest(input *RegisterContainerInstanceInput) (req *request.Request, output *RegisterContainerInstanceOutput) { - op := &request.Operation{ - Name: opRegisterContainerInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterContainerInstanceInput{} - } - - output = &RegisterContainerInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterContainerInstance API operation for Amazon EC2 Container Service. -// -// This action is only used by the Amazon ECS agent, and it is not intended -// for use outside of the agent. -// -// Registers an EC2 instance into the specified cluster. This instance becomes -// available to place containers on. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation RegisterContainerInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RegisterContainerInstance -func (c *ECS) RegisterContainerInstance(input *RegisterContainerInstanceInput) (*RegisterContainerInstanceOutput, error) { - req, out := c.RegisterContainerInstanceRequest(input) - return out, req.Send() -} - -// RegisterContainerInstanceWithContext is the same as RegisterContainerInstance with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterContainerInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) RegisterContainerInstanceWithContext(ctx aws.Context, input *RegisterContainerInstanceInput, opts ...request.Option) (*RegisterContainerInstanceOutput, error) { - req, out := c.RegisterContainerInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterTaskDefinition = "RegisterTaskDefinition" - -// RegisterTaskDefinitionRequest generates a "aws/request.Request" representing the -// client's request for the RegisterTaskDefinition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterTaskDefinition for more information on using the RegisterTaskDefinition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterTaskDefinitionRequest method. -// req, resp := client.RegisterTaskDefinitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RegisterTaskDefinition -func (c *ECS) RegisterTaskDefinitionRequest(input *RegisterTaskDefinitionInput) (req *request.Request, output *RegisterTaskDefinitionOutput) { - op := &request.Operation{ - Name: opRegisterTaskDefinition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterTaskDefinitionInput{} - } - - output = &RegisterTaskDefinitionOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterTaskDefinition API operation for Amazon EC2 Container Service. -// -// Registers a new task definition from the supplied family and containerDefinitions. -// Optionally, you can add data volumes to your containers with the volumes -// parameter. For more information about task definition parameters and defaults, -// see Amazon ECS Task Definitions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) -// in the Amazon Elastic Container Service Developer Guide. -// -// You can specify an IAM role for your task with the taskRoleArn parameter. -// When you specify an IAM role for a task, its containers can then use the -// latest versions of the AWS CLI or SDKs to make API requests to the AWS services -// that are specified in the IAM policy associated with the role. For more information, -// see IAM Roles for Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) -// in the Amazon Elastic Container Service Developer Guide. -// -// You can specify a Docker networking mode for the containers in your task -// definition with the networkMode parameter. The available network modes correspond -// to those described in Network settings (https://docs.docker.com/engine/reference/run/#/network-settings) -// in the Docker run reference. If you specify the awsvpc network mode, the -// task is allocated an elastic network interface, and you must specify a NetworkConfiguration -// when you create a service or run a task with the task definition. For more -// information, see Task Networking (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) -// in the Amazon Elastic Container Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation RegisterTaskDefinition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RegisterTaskDefinition -func (c *ECS) RegisterTaskDefinition(input *RegisterTaskDefinitionInput) (*RegisterTaskDefinitionOutput, error) { - req, out := c.RegisterTaskDefinitionRequest(input) - return out, req.Send() -} - -// RegisterTaskDefinitionWithContext is the same as RegisterTaskDefinition with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterTaskDefinition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) RegisterTaskDefinitionWithContext(ctx aws.Context, input *RegisterTaskDefinitionInput, opts ...request.Option) (*RegisterTaskDefinitionOutput, error) { - req, out := c.RegisterTaskDefinitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRunTask = "RunTask" - -// RunTaskRequest generates a "aws/request.Request" representing the -// client's request for the RunTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RunTask for more information on using the RunTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RunTaskRequest method. -// req, resp := client.RunTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RunTask -func (c *ECS) RunTaskRequest(input *RunTaskInput) (req *request.Request, output *RunTaskOutput) { - op := &request.Operation{ - Name: opRunTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RunTaskInput{} - } - - output = &RunTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// RunTask API operation for Amazon EC2 Container Service. -// -// Starts a new task using the specified task definition. -// -// You can allow Amazon ECS to place tasks for you, or you can customize how -// Amazon ECS places tasks using placement constraints and placement strategies. -// For more information, see Scheduling Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html) -// in the Amazon Elastic Container Service Developer Guide. -// -// Alternatively, you can use StartTask to use your own scheduler or place tasks -// manually on specific container instances. -// -// The Amazon ECS API follows an eventual consistency model, due to the distributed -// nature of the system supporting the API. This means that the result of an -// API command you run that affects your Amazon ECS resources might not be immediately -// visible to all subsequent commands you run. Keep this in mind when you carry -// out an API command that immediately follows a previous API command. -// -// To manage eventual consistency, you can do the following: -// -// * Confirm the state of the resource before you run a command to modify -// it. Run the DescribeTasks command using an exponential backoff algorithm -// to ensure that you allow enough time for the previous command to propagate -// through the system. To do this, run the DescribeTasks command repeatedly, -// starting with a couple of seconds of wait time and increasing gradually -// up to five minutes of wait time. -// -// * Add wait time between subsequent commands, even if the DescribeTasks -// command returns an accurate response. Apply an exponential backoff algorithm -// starting with a couple of seconds of wait time, and increase gradually -// up to about five minutes of wait time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation RunTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// * ErrCodeUnsupportedFeatureException "UnsupportedFeatureException" -// The specified task is not supported in this Region. -// -// * ErrCodePlatformUnknownException "PlatformUnknownException" -// The specified platform version does not exist. -// -// * ErrCodePlatformTaskDefinitionIncompatibilityException "PlatformTaskDefinitionIncompatibilityException" -// The specified platform version does not satisfy the task definition's required -// capabilities. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have authorization to perform the requested action. -// -// * ErrCodeBlockedException "BlockedException" -// Your AWS account has been blocked. For more information, contact AWS Support -// (http://aws.amazon.com/contact-us/). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RunTask -func (c *ECS) RunTask(input *RunTaskInput) (*RunTaskOutput, error) { - req, out := c.RunTaskRequest(input) - return out, req.Send() -} - -// RunTaskWithContext is the same as RunTask with the addition of -// the ability to pass a context and additional request options. -// -// See RunTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) RunTaskWithContext(ctx aws.Context, input *RunTaskInput, opts ...request.Option) (*RunTaskOutput, error) { - req, out := c.RunTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartTask = "StartTask" - -// StartTaskRequest generates a "aws/request.Request" representing the -// client's request for the StartTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartTask for more information on using the StartTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartTaskRequest method. -// req, resp := client.StartTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/StartTask -func (c *ECS) StartTaskRequest(input *StartTaskInput) (req *request.Request, output *StartTaskOutput) { - op := &request.Operation{ - Name: opStartTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartTaskInput{} - } - - output = &StartTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartTask API operation for Amazon EC2 Container Service. -// -// Starts a new task from the specified task definition on the specified container -// instance or instances. -// -// Alternatively, you can use RunTask to place tasks for you. For more information, -// see Scheduling Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html) -// in the Amazon Elastic Container Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation StartTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/StartTask -func (c *ECS) StartTask(input *StartTaskInput) (*StartTaskOutput, error) { - req, out := c.StartTaskRequest(input) - return out, req.Send() -} - -// StartTaskWithContext is the same as StartTask with the addition of -// the ability to pass a context and additional request options. -// -// See StartTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) StartTaskWithContext(ctx aws.Context, input *StartTaskInput, opts ...request.Option) (*StartTaskOutput, error) { - req, out := c.StartTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopTask = "StopTask" - -// StopTaskRequest generates a "aws/request.Request" representing the -// client's request for the StopTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopTask for more information on using the StopTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopTaskRequest method. -// req, resp := client.StopTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/StopTask -func (c *ECS) StopTaskRequest(input *StopTaskInput) (req *request.Request, output *StopTaskOutput) { - op := &request.Operation{ - Name: opStopTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopTaskInput{} - } - - output = &StopTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopTask API operation for Amazon EC2 Container Service. -// -// Stops a running task. Any tags associated with the task will be deleted. -// -// When StopTask is called on a task, the equivalent of docker stop is issued -// to the containers running in the task. This results in a SIGTERM value and -// a default 30-second timeout, after which the SIGKILL value is sent and the -// containers are forcibly stopped. If the container handles the SIGTERM value -// gracefully and exits within 30 seconds from receiving it, no SIGKILL value -// is sent. -// -// The default 30-second timeout can be configured on the Amazon ECS container -// agent with the ECS_CONTAINER_STOP_TIMEOUT variable. For more information, -// see Amazon ECS Container Agent Configuration (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html) -// in the Amazon Elastic Container Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation StopTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/StopTask -func (c *ECS) StopTask(input *StopTaskInput) (*StopTaskOutput, error) { - req, out := c.StopTaskRequest(input) - return out, req.Send() -} - -// StopTaskWithContext is the same as StopTask with the addition of -// the ability to pass a context and additional request options. -// -// See StopTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) StopTaskWithContext(ctx aws.Context, input *StopTaskInput, opts ...request.Option) (*StopTaskOutput, error) { - req, out := c.StopTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSubmitContainerStateChange = "SubmitContainerStateChange" - -// SubmitContainerStateChangeRequest generates a "aws/request.Request" representing the -// client's request for the SubmitContainerStateChange operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SubmitContainerStateChange for more information on using the SubmitContainerStateChange -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SubmitContainerStateChangeRequest method. -// req, resp := client.SubmitContainerStateChangeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/SubmitContainerStateChange -func (c *ECS) SubmitContainerStateChangeRequest(input *SubmitContainerStateChangeInput) (req *request.Request, output *SubmitContainerStateChangeOutput) { - op := &request.Operation{ - Name: opSubmitContainerStateChange, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SubmitContainerStateChangeInput{} - } - - output = &SubmitContainerStateChangeOutput{} - req = c.newRequest(op, input, output) - return -} - -// SubmitContainerStateChange API operation for Amazon EC2 Container Service. -// -// This action is only used by the Amazon ECS agent, and it is not intended -// for use outside of the agent. -// -// Sent to acknowledge that a container changed states. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation SubmitContainerStateChange for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have authorization to perform the requested action. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/SubmitContainerStateChange -func (c *ECS) SubmitContainerStateChange(input *SubmitContainerStateChangeInput) (*SubmitContainerStateChangeOutput, error) { - req, out := c.SubmitContainerStateChangeRequest(input) - return out, req.Send() -} - -// SubmitContainerStateChangeWithContext is the same as SubmitContainerStateChange with the addition of -// the ability to pass a context and additional request options. -// -// See SubmitContainerStateChange for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) SubmitContainerStateChangeWithContext(ctx aws.Context, input *SubmitContainerStateChangeInput, opts ...request.Option) (*SubmitContainerStateChangeOutput, error) { - req, out := c.SubmitContainerStateChangeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSubmitTaskStateChange = "SubmitTaskStateChange" - -// SubmitTaskStateChangeRequest generates a "aws/request.Request" representing the -// client's request for the SubmitTaskStateChange operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SubmitTaskStateChange for more information on using the SubmitTaskStateChange -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SubmitTaskStateChangeRequest method. -// req, resp := client.SubmitTaskStateChangeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/SubmitTaskStateChange -func (c *ECS) SubmitTaskStateChangeRequest(input *SubmitTaskStateChangeInput) (req *request.Request, output *SubmitTaskStateChangeOutput) { - op := &request.Operation{ - Name: opSubmitTaskStateChange, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SubmitTaskStateChangeInput{} - } - - output = &SubmitTaskStateChangeOutput{} - req = c.newRequest(op, input, output) - return -} - -// SubmitTaskStateChange API operation for Amazon EC2 Container Service. -// -// This action is only used by the Amazon ECS agent, and it is not intended -// for use outside of the agent. -// -// Sent to acknowledge that a task changed states. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation SubmitTaskStateChange for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have authorization to perform the requested action. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/SubmitTaskStateChange -func (c *ECS) SubmitTaskStateChange(input *SubmitTaskStateChangeInput) (*SubmitTaskStateChangeOutput, error) { - req, out := c.SubmitTaskStateChangeRequest(input) - return out, req.Send() -} - -// SubmitTaskStateChangeWithContext is the same as SubmitTaskStateChange with the addition of -// the ability to pass a context and additional request options. -// -// See SubmitTaskStateChange for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) SubmitTaskStateChangeWithContext(ctx aws.Context, input *SubmitTaskStateChangeInput, opts ...request.Option) (*SubmitTaskStateChangeOutput, error) { - req, out := c.SubmitTaskStateChangeRequest(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/ecs-2014-11-13/TagResource -func (c *ECS) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for Amazon EC2 Container Service. -// -// Associates the specified tags to a resource with the specified resourceArn. -// If existing tags on a resource are not specified in the request parameters, -// they are not changed. When a resource is deleted, the tags associated with -// that resource are deleted as well. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/TagResource -func (c *ECS) 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 *ECS) 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/ecs-2014-11-13/UntagResource -func (c *ECS) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for Amazon EC2 Container Service. -// -// Deletes specified tags from a resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UntagResource -func (c *ECS) 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 *ECS) 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 opUpdateContainerAgent = "UpdateContainerAgent" - -// UpdateContainerAgentRequest generates a "aws/request.Request" representing the -// client's request for the UpdateContainerAgent operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateContainerAgent for more information on using the UpdateContainerAgent -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateContainerAgentRequest method. -// req, resp := client.UpdateContainerAgentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateContainerAgent -func (c *ECS) UpdateContainerAgentRequest(input *UpdateContainerAgentInput) (req *request.Request, output *UpdateContainerAgentOutput) { - op := &request.Operation{ - Name: opUpdateContainerAgent, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateContainerAgentInput{} - } - - output = &UpdateContainerAgentOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateContainerAgent API operation for Amazon EC2 Container Service. -// -// Updates the Amazon ECS container agent on a specified container instance. -// Updating the Amazon ECS container agent does not interrupt running tasks -// or services on the container instance. The process for updating the agent -// differs depending on whether your container instance was launched with the -// Amazon ECS-optimized AMI or another operating system. -// -// UpdateContainerAgent requires the Amazon ECS-optimized AMI or Amazon Linux -// with the ecs-init service installed and running. For help updating the Amazon -// ECS container agent on other operating systems, see Manually Updating the -// Amazon ECS Container Agent (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html#manually_update_agent) -// in the Amazon Elastic Container Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation UpdateContainerAgent for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// * ErrCodeUpdateInProgressException "UpdateInProgressException" -// There is already a current Amazon ECS container agent update in progress -// on the specified container instance. If the container agent becomes disconnected -// while it is in a transitional stage, such as PENDING or STAGING, the update -// process can get stuck in that state. However, when the agent reconnects, -// it resumes where it stopped previously. -// -// * ErrCodeNoUpdateAvailableException "NoUpdateAvailableException" -// There is no update available for this Amazon ECS container agent. This could -// be because the agent is already running the latest version, or it is so old -// that there is no update path to the current version. -// -// * ErrCodeMissingVersionException "MissingVersionException" -// Amazon ECS is unable to determine the current version of the Amazon ECS container -// agent on the container instance and does not have enough information to proceed -// with an update. This could be because the agent running on the container -// instance is an older or custom version that does not use our version information. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateContainerAgent -func (c *ECS) UpdateContainerAgent(input *UpdateContainerAgentInput) (*UpdateContainerAgentOutput, error) { - req, out := c.UpdateContainerAgentRequest(input) - return out, req.Send() -} - -// UpdateContainerAgentWithContext is the same as UpdateContainerAgent with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateContainerAgent for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) UpdateContainerAgentWithContext(ctx aws.Context, input *UpdateContainerAgentInput, opts ...request.Option) (*UpdateContainerAgentOutput, error) { - req, out := c.UpdateContainerAgentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateContainerInstancesState = "UpdateContainerInstancesState" - -// UpdateContainerInstancesStateRequest generates a "aws/request.Request" representing the -// client's request for the UpdateContainerInstancesState operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateContainerInstancesState for more information on using the UpdateContainerInstancesState -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateContainerInstancesStateRequest method. -// req, resp := client.UpdateContainerInstancesStateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateContainerInstancesState -func (c *ECS) UpdateContainerInstancesStateRequest(input *UpdateContainerInstancesStateInput) (req *request.Request, output *UpdateContainerInstancesStateOutput) { - op := &request.Operation{ - Name: opUpdateContainerInstancesState, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateContainerInstancesStateInput{} - } - - output = &UpdateContainerInstancesStateOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateContainerInstancesState API operation for Amazon EC2 Container Service. -// -// Modifies the status of an Amazon ECS container instance. -// -// You can change the status of a container instance to DRAINING to manually -// remove an instance from a cluster, for example to perform system updates, -// update the Docker daemon, or scale down the cluster size. -// -// When you set a container instance to DRAINING, Amazon ECS prevents new tasks -// from being scheduled for placement on the container instance and replacement -// service tasks are started on other container instances in the cluster if -// the resources are available. Service tasks on the container instance that -// are in the PENDING state are stopped immediately. -// -// Service tasks on the container instance that are in the RUNNING state are -// stopped and replaced according to the service's deployment configuration -// parameters, minimumHealthyPercent and maximumPercent. You can change the -// deployment configuration of your service using UpdateService. -// -// * If minimumHealthyPercent is below 100%, the scheduler can ignore desiredCount -// temporarily during task replacement. For example, desiredCount is four -// tasks, a minimum of 50% allows the scheduler to stop two existing tasks -// before starting two new tasks. If the minimum is 100%, the service scheduler -// can't remove existing tasks until the replacement tasks are considered -// healthy. Tasks for services that do not use a load balancer are considered -// healthy if they are in the RUNNING state. Tasks for services that use -// a load balancer are considered healthy if they are in the RUNNING state -// and the container instance they are hosted on is reported as healthy by -// the load balancer. -// -// * The maximumPercent parameter represents an upper limit on the number -// of running tasks during task replacement, which enables you to define -// the replacement batch size. For example, if desiredCount is four tasks, -// a maximum of 200% starts four new tasks before stopping the four tasks -// to be drained, provided that the cluster resources required to do this -// are available. If the maximum is 100%, then replacement tasks can't start -// until the draining tasks have stopped. -// -// Any PENDING or RUNNING tasks that do not belong to a service are not affected. -// You must wait for them to finish or stop them manually. -// -// A container instance has completed draining when it has no more RUNNING tasks. -// You can verify this using ListTasks. -// -// When you set a container instance to ACTIVE, the Amazon ECS scheduler can -// begin scheduling tasks on the instance again. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation UpdateContainerInstancesState for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateContainerInstancesState -func (c *ECS) UpdateContainerInstancesState(input *UpdateContainerInstancesStateInput) (*UpdateContainerInstancesStateOutput, error) { - req, out := c.UpdateContainerInstancesStateRequest(input) - return out, req.Send() -} - -// UpdateContainerInstancesStateWithContext is the same as UpdateContainerInstancesState with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateContainerInstancesState for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) UpdateContainerInstancesStateWithContext(ctx aws.Context, input *UpdateContainerInstancesStateInput, opts ...request.Option) (*UpdateContainerInstancesStateOutput, error) { - req, out := c.UpdateContainerInstancesStateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateService = "UpdateService" - -// UpdateServiceRequest generates a "aws/request.Request" representing the -// client's request for the UpdateService operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateService for more information on using the UpdateService -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateServiceRequest method. -// req, resp := client.UpdateServiceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateService -func (c *ECS) UpdateServiceRequest(input *UpdateServiceInput) (req *request.Request, output *UpdateServiceOutput) { - op := &request.Operation{ - Name: opUpdateService, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateServiceInput{} - } - - output = &UpdateServiceOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateService API operation for Amazon EC2 Container Service. -// -// Modifies the parameters of a service. -// -// For services using the rolling update (ECS) deployment controller, the desired -// count, deployment configuration, network configuration, or task definition -// used can be updated. -// -// For services using the blue/green (CODE_DEPLOY) deployment controller, only -// the desired count, deployment configuration, and health check grace period -// can be updated using this API. If the network configuration, platform version, -// or task definition need to be updated, a new AWS CodeDeploy deployment should -// be created. For more information, see CreateDeployment (https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html) -// in the AWS CodeDeploy API Reference. -// -// You can add to or subtract from the number of instantiations of a task definition -// in a service by specifying the cluster that the service is running in and -// a new desiredCount parameter. -// -// If you have updated the Docker image of your application, you can create -// a new task definition with that image and deploy it to your service. The -// service scheduler uses the minimum healthy percent and maximum percent parameters -// (in the service's deployment configuration) to determine the deployment strategy. -// -// If your updated Docker image uses the same tag as what is in the existing -// task definition for your service (for example, my_image:latest), you do not -// need to create a new revision of your task definition. You can update the -// service using the forceNewDeployment option. The new tasks launched by the -// deployment pull the current image/tag combination from your repository when -// they start. -// -// You can also update the deployment configuration of a service. When a deployment -// is triggered by updating the task definition of a service, the service scheduler -// uses the deployment configuration parameters, minimumHealthyPercent and maximumPercent, -// to determine the deployment strategy. -// -// * If minimumHealthyPercent is below 100%, the scheduler can ignore desiredCount -// temporarily during a deployment. For example, if desiredCount is four -// tasks, a minimum of 50% allows the scheduler to stop two existing tasks -// before starting two new tasks. Tasks for services that do not use a load -// balancer are considered healthy if they are in the RUNNING state. Tasks -// for services that use a load balancer are considered healthy if they are -// in the RUNNING state and the container instance they are hosted on is -// reported as healthy by the load balancer. -// -// * The maximumPercent parameter represents an upper limit on the number -// of running tasks during a deployment, which enables you to define the -// deployment batch size. For example, if desiredCount is four tasks, a maximum -// of 200% starts four new tasks before stopping the four older tasks (provided -// that the cluster resources required to do this are available). -// -// When UpdateService stops a task during a deployment, the equivalent of docker -// stop is issued to the containers running in the task. This results in a SIGTERM -// and a 30-second timeout, after which SIGKILL is sent and the containers are -// forcibly stopped. If the container handles the SIGTERM gracefully and exits -// within 30 seconds from receiving it, no SIGKILL is sent. -// -// When the service scheduler launches new tasks, it determines task placement -// in your cluster with the following logic: -// -// * Determine which of the container instances in your cluster can support -// your service's task definition (for example, they have the required CPU, -// memory, ports, and container instance attributes). -// -// * By default, the service scheduler attempts to balance tasks across Availability -// Zones in this manner (although you can choose a different placement strategy): -// -// Sort the valid container instances by the fewest number of running tasks -// for this service in the same Availability Zone as the instance. For example, -// if zone A has one running service task and zones B and C each have zero, -// valid container instances in either zone B or C are considered optimal -// for placement. -// -// Place the new service task on a valid container instance in an optimal Availability -// Zone (based on the previous steps), favoring container instances with -// the fewest number of running tasks for this service. -// -// When the service scheduler stops running tasks, it attempts to maintain balance -// across the Availability Zones in your cluster using the following logic: -// -// * Sort the container instances by the largest number of running tasks -// for this service in the same Availability Zone as the instance. For example, -// if zone A has one running service task and zones B and C each have two, -// container instances in either zone B or C are considered optimal for termination. -// -// * Stop the task on a container instance in an optimal Availability Zone -// (based on the previous steps), favoring container instances with the largest -// number of running tasks for this service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon EC2 Container Service's -// API operation UpdateService for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server issue. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are Region-specific. -// -// * ErrCodeServiceNotFoundException "ServiceNotFoundException" -// The specified service could not be found. You can view your available services -// with ListServices. Amazon ECS services are cluster-specific and Region-specific. -// -// * ErrCodeServiceNotActiveException "ServiceNotActiveException" -// The specified service is not active. You can't update a service that is inactive. -// If you have previously deleted a service, you can re-create it with CreateService. -// -// * ErrCodePlatformUnknownException "PlatformUnknownException" -// The specified platform version does not exist. -// -// * ErrCodePlatformTaskDefinitionIncompatibilityException "PlatformTaskDefinitionIncompatibilityException" -// The specified platform version does not satisfy the task definition's required -// capabilities. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have authorization to perform the requested action. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateService -func (c *ECS) UpdateService(input *UpdateServiceInput) (*UpdateServiceOutput, error) { - req, out := c.UpdateServiceRequest(input) - return out, req.Send() -} - -// UpdateServiceWithContext is the same as UpdateService with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateService for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) UpdateServiceWithContext(ctx aws.Context, input *UpdateServiceInput, opts ...request.Option) (*UpdateServiceOutput, error) { - req, out := c.UpdateServiceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// An object representing a container instance or task attachment. -type Attachment struct { - _ struct{} `type:"structure"` - - // Details of the attachment. For elastic network interfaces, this includes - // the network interface ID, the MAC address, the subnet ID, and the private - // IPv4 address. - Details []*KeyValuePair `locationName:"details" type:"list"` - - // The unique identifier for the attachment. - Id *string `locationName:"id" type:"string"` - - // The status of the attachment. Valid values are PRECREATED, CREATED, ATTACHING, - // ATTACHED, DETACHING, DETACHED, and DELETED. - Status *string `locationName:"status" type:"string"` - - // The type of the attachment, such as ElasticNetworkInterface. - Type *string `locationName:"type" type:"string"` -} - -// String returns the string representation -func (s Attachment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Attachment) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *Attachment) SetDetails(v []*KeyValuePair) *Attachment { - s.Details = v - return s -} - -// SetId sets the Id field's value. -func (s *Attachment) SetId(v string) *Attachment { - s.Id = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Attachment) SetStatus(v string) *Attachment { - s.Status = &v - return s -} - -// SetType sets the Type field's value. -func (s *Attachment) SetType(v string) *Attachment { - s.Type = &v - return s -} - -// An object representing a change in state for a task attachment. -type AttachmentStateChange struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the attachment. - // - // AttachmentArn is a required field - AttachmentArn *string `locationName:"attachmentArn" type:"string" required:"true"` - - // The status of the attachment. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachmentStateChange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachmentStateChange) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachmentStateChange) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachmentStateChange"} - if s.AttachmentArn == nil { - invalidParams.Add(request.NewErrParamRequired("AttachmentArn")) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttachmentArn sets the AttachmentArn field's value. -func (s *AttachmentStateChange) SetAttachmentArn(v string) *AttachmentStateChange { - s.AttachmentArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AttachmentStateChange) SetStatus(v string) *AttachmentStateChange { - s.Status = &v - return s -} - -// An attribute is a name-value pair associated with an Amazon ECS object. Attributes -// enable you to extend the Amazon ECS data model by adding custom metadata -// to your resources. For more information, see Attributes (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes) -// in the Amazon Elastic Container Service Developer Guide. -type Attribute struct { - _ struct{} `type:"structure"` - - // The name of the attribute. Up to 128 letters (uppercase and lowercase), numbers, - // hyphens, underscores, and periods are allowed. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The ID of the target. You can specify the short form ID for a resource or - // the full Amazon Resource Name (ARN). - TargetId *string `locationName:"targetId" type:"string"` - - // The type of the target with which to attach the attribute. This parameter - // is required if you use the short form ID for a resource instead of the full - // ARN. - TargetType *string `locationName:"targetType" type:"string" enum:"TargetType"` - - // The value of the attribute. Up to 128 letters (uppercase and lowercase), - // numbers, hyphens, underscores, periods, at signs (@), forward slashes, colons, - // and spaces are allowed. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s Attribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Attribute) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Attribute) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Attribute"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *Attribute) SetName(v string) *Attribute { - s.Name = &v - return s -} - -// SetTargetId sets the TargetId field's value. -func (s *Attribute) SetTargetId(v string) *Attribute { - s.TargetId = &v - return s -} - -// SetTargetType sets the TargetType field's value. -func (s *Attribute) SetTargetType(v string) *Attribute { - s.TargetType = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Attribute) SetValue(v string) *Attribute { - s.Value = &v - return s -} - -// An object representing the networking details for a task or service. -type AwsVpcConfiguration struct { - _ struct{} `type:"structure"` - - // Whether the task's elastic network interface receives a public IP address. - // The default value is DISABLED. - AssignPublicIp *string `locationName:"assignPublicIp" type:"string" enum:"AssignPublicIp"` - - // The security groups associated with the task or service. If you do not specify - // a security group, the default security group for the VPC is used. There is - // a limit of five security groups able to be specified per AwsVpcConfiguration. - // - // All specified security groups must be from the same VPC. - SecurityGroups []*string `locationName:"securityGroups" type:"list"` - - // The subnets associated with the task or service. There is a limit of 16 subnets - // able to be specified per AwsVpcConfiguration. - // - // All specified subnets must be from the same VPC. - // - // Subnets is a required field - Subnets []*string `locationName:"subnets" type:"list" required:"true"` -} - -// String returns the string representation -func (s AwsVpcConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AwsVpcConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AwsVpcConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AwsVpcConfiguration"} - if s.Subnets == nil { - invalidParams.Add(request.NewErrParamRequired("Subnets")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssignPublicIp sets the AssignPublicIp field's value. -func (s *AwsVpcConfiguration) SetAssignPublicIp(v string) *AwsVpcConfiguration { - s.AssignPublicIp = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *AwsVpcConfiguration) SetSecurityGroups(v []*string) *AwsVpcConfiguration { - s.SecurityGroups = v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *AwsVpcConfiguration) SetSubnets(v []*string) *AwsVpcConfiguration { - s.Subnets = v - return s -} - -// A regional grouping of one or more container instances on which you can run -// task requests. Each account receives a default cluster the first time you -// use the Amazon ECS service, but you may also create other clusters. Clusters -// may contain more than one instance type simultaneously. -type Cluster struct { - _ struct{} `type:"structure"` - - // The number of services that are running on the cluster in an ACTIVE state. - // You can view these services with ListServices. - ActiveServicesCount *int64 `locationName:"activeServicesCount" type:"integer"` - - // The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains - // the arn:aws:ecs namespace, followed by the Region of the cluster, the AWS - // account ID of the cluster owner, the cluster namespace, and then the cluster - // name. For example, arn:aws:ecs:region:012345678910:cluster/test.. - ClusterArn *string `locationName:"clusterArn" type:"string"` - - // A user-generated string that you use to identify your cluster. - ClusterName *string `locationName:"clusterName" type:"string"` - - // The number of tasks in the cluster that are in the PENDING state. - PendingTasksCount *int64 `locationName:"pendingTasksCount" type:"integer"` - - // The number of container instances registered into the cluster. This includes - // container instances in both ACTIVE and DRAINING status. - RegisteredContainerInstancesCount *int64 `locationName:"registeredContainerInstancesCount" type:"integer"` - - // The number of tasks in the cluster that are in the RUNNING state. - RunningTasksCount *int64 `locationName:"runningTasksCount" type:"integer"` - - // Additional information about your clusters that are separated by launch type, - // including: - // - // * runningEC2TasksCount - // - // * RunningFargateTasksCount - // - // * pendingEC2TasksCount - // - // * pendingFargateTasksCount - // - // * activeEC2ServiceCount - // - // * activeFargateServiceCount - // - // * drainingEC2ServiceCount - // - // * drainingFargateServiceCount - Statistics []*KeyValuePair `locationName:"statistics" type:"list"` - - // The status of the cluster. The valid values are ACTIVE or INACTIVE. ACTIVE - // indicates that you can register container instances with the cluster and - // the associated instances can accept tasks. - Status *string `locationName:"status" type:"string"` - - // The metadata that you apply to the cluster to help you categorize and organize - // them. Each tag consists of a key and an optional value, both of which you - // define. Tag keys can have a maximum character length of 128 characters, and - // tag values can have a maximum length of 256 characters. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s Cluster) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Cluster) GoString() string { - return s.String() -} - -// SetActiveServicesCount sets the ActiveServicesCount field's value. -func (s *Cluster) SetActiveServicesCount(v int64) *Cluster { - s.ActiveServicesCount = &v - return s -} - -// SetClusterArn sets the ClusterArn field's value. -func (s *Cluster) SetClusterArn(v string) *Cluster { - s.ClusterArn = &v - return s -} - -// SetClusterName sets the ClusterName field's value. -func (s *Cluster) SetClusterName(v string) *Cluster { - s.ClusterName = &v - return s -} - -// SetPendingTasksCount sets the PendingTasksCount field's value. -func (s *Cluster) SetPendingTasksCount(v int64) *Cluster { - s.PendingTasksCount = &v - return s -} - -// SetRegisteredContainerInstancesCount sets the RegisteredContainerInstancesCount field's value. -func (s *Cluster) SetRegisteredContainerInstancesCount(v int64) *Cluster { - s.RegisteredContainerInstancesCount = &v - return s -} - -// SetRunningTasksCount sets the RunningTasksCount field's value. -func (s *Cluster) SetRunningTasksCount(v int64) *Cluster { - s.RunningTasksCount = &v - return s -} - -// SetStatistics sets the Statistics field's value. -func (s *Cluster) SetStatistics(v []*KeyValuePair) *Cluster { - s.Statistics = v - return s -} - -// SetStatus sets the Status field's value. -func (s *Cluster) SetStatus(v string) *Cluster { - s.Status = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Cluster) SetTags(v []*Tag) *Cluster { - s.Tags = v - return s -} - -// A Docker container that is part of a task. -type Container struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the container. - ContainerArn *string `locationName:"containerArn" type:"string"` - - // The exit code returned from the container. - ExitCode *int64 `locationName:"exitCode" type:"integer"` - - // The health status of the container. If health checks are not configured for - // this container in its task definition, then it reports the health status - // as UNKNOWN. - HealthStatus *string `locationName:"healthStatus" type:"string" enum:"HealthStatus"` - - // The last known status of the container. - LastStatus *string `locationName:"lastStatus" type:"string"` - - // The name of the container. - Name *string `locationName:"name" type:"string"` - - // The network bindings associated with the container. - NetworkBindings []*NetworkBinding `locationName:"networkBindings" type:"list"` - - // The network interfaces associated with the container. - NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaces" type:"list"` - - // A short (255 max characters) human-readable string to provide additional - // details about a running or stopped container. - Reason *string `locationName:"reason" type:"string"` - - // The ARN of the task. - TaskArn *string `locationName:"taskArn" type:"string"` -} - -// String returns the string representation -func (s Container) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Container) GoString() string { - return s.String() -} - -// SetContainerArn sets the ContainerArn field's value. -func (s *Container) SetContainerArn(v string) *Container { - s.ContainerArn = &v - return s -} - -// SetExitCode sets the ExitCode field's value. -func (s *Container) SetExitCode(v int64) *Container { - s.ExitCode = &v - return s -} - -// SetHealthStatus sets the HealthStatus field's value. -func (s *Container) SetHealthStatus(v string) *Container { - s.HealthStatus = &v - return s -} - -// SetLastStatus sets the LastStatus field's value. -func (s *Container) SetLastStatus(v string) *Container { - s.LastStatus = &v - return s -} - -// SetName sets the Name field's value. -func (s *Container) SetName(v string) *Container { - s.Name = &v - return s -} - -// SetNetworkBindings sets the NetworkBindings field's value. -func (s *Container) SetNetworkBindings(v []*NetworkBinding) *Container { - s.NetworkBindings = v - return s -} - -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *Container) SetNetworkInterfaces(v []*NetworkInterface) *Container { - s.NetworkInterfaces = v - return s -} - -// SetReason sets the Reason field's value. -func (s *Container) SetReason(v string) *Container { - s.Reason = &v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *Container) SetTaskArn(v string) *Container { - s.TaskArn = &v - return s -} - -// Container definitions are used in task definitions to describe the different -// containers that are launched as part of a task. -type ContainerDefinition struct { - _ struct{} `type:"structure"` - - // The command that is passed to the container. This parameter maps to Cmd in - // the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the COMMAND parameter to docker run (https://docs.docker.com/engine/reference/run/). - // For more information, see https://docs.docker.com/engine/reference/builder/#cmd - // (https://docs.docker.com/engine/reference/builder/#cmd). - Command []*string `locationName:"command" type:"list"` - - // The number of cpu units reserved for the container. This parameter maps to - // CpuShares in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --cpu-shares option to docker run (https://docs.docker.com/engine/reference/run/). - // - // This field is optional for tasks using the Fargate launch type, and the only - // requirement is that the total amount of CPU reserved for all containers within - // a task be lower than the task-level cpu value. - // - // You can determine the number of CPU units that are available per EC2 instance - // type by multiplying the vCPUs listed for that instance type on the Amazon - // EC2 Instances (http://aws.amazon.com/ec2/instance-types/) detail page by - // 1,024. - // - // For example, if you run a single-container task on a single-core instance - // type with 512 CPU units specified for that container, and that is the only - // task running on the container instance, that container could use the full - // 1,024 CPU unit share at any given time. However, if you launched another - // copy of the same task on that container instance, each task would be guaranteed - // a minimum of 512 CPU units when needed, and each container could float to - // higher CPU usage if the other container was not using it, but if both tasks - // were 100% active all of the time, they would be limited to 512 CPU units. - // - // Linux containers share unallocated CPU units with other containers on the - // container instance with the same ratio as their allocated amount. For example, - // if you run a single-container task on a single-core instance type with 512 - // CPU units specified for that container, and that is the only task running - // on the container instance, that container could use the full 1,024 CPU unit - // share at any given time. However, if you launched another copy of the same - // task on that container instance, each task would be guaranteed a minimum - // of 512 CPU units when needed, and each container could float to higher CPU - // usage if the other container was not using it, but if both tasks were 100% - // active all of the time, they would be limited to 512 CPU units. - // - // On Linux container instances, the Docker daemon on the container instance - // uses the CPU value to calculate the relative CPU share ratios for running - // containers. For more information, see CPU share constraint (https://docs.docker.com/engine/reference/run/#cpu-share-constraint) - // in the Docker documentation. The minimum valid CPU share value that the Linux - // kernel allows is 2. However, the CPU parameter is not required, and you can - // use CPU values below 2 in your container definitions. For CPU values below - // 2 (including null), the behavior varies based on your Amazon ECS container - // agent version: - // - // * Agent versions less than or equal to 1.1.0: Null and zero CPU values - // are passed to Docker as 0, which Docker then converts to 1,024 CPU shares. - // CPU values of 1 are passed to Docker as 1, which the Linux kernel converts - // to two CPU shares. - // - // * Agent versions greater than or equal to 1.2.0: Null, zero, and CPU values - // of 1 are passed to Docker as 2. - // - // On Windows container instances, the CPU limit is enforced as an absolute - // limit, or a quota. Windows containers only have access to the specified amount - // of CPU that is described in the task definition. - Cpu *int64 `locationName:"cpu" type:"integer"` - - // When this parameter is true, networking is disabled within the container. - // This parameter maps to NetworkDisabled in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/). - // - // This parameter is not supported for Windows containers. - DisableNetworking *bool `locationName:"disableNetworking" type:"boolean"` - - // A list of DNS search domains that are presented to the container. This parameter - // maps to DnsSearch in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --dns-search option to docker run (https://docs.docker.com/engine/reference/run/). - // - // This parameter is not supported for Windows containers. - DnsSearchDomains []*string `locationName:"dnsSearchDomains" type:"list"` - - // A list of DNS servers that are presented to the container. This parameter - // maps to Dns in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --dns option to docker run (https://docs.docker.com/engine/reference/run/). - // - // This parameter is not supported for Windows containers. - DnsServers []*string `locationName:"dnsServers" type:"list"` - - // A key/value map of labels to add to the container. This parameter maps to - // Labels in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --label option to docker run (https://docs.docker.com/engine/reference/run/). - // This parameter requires version 1.18 of the Docker Remote API or greater - // on your container instance. To check the Docker Remote API version on your - // container instance, log in to your container instance and run the following - // command: sudo docker version --format '{{.Server.APIVersion}}' - DockerLabels map[string]*string `locationName:"dockerLabels" type:"map"` - - // A list of strings to provide custom labels for SELinux and AppArmor multi-level - // security systems. This field is not valid for containers in tasks using the - // Fargate launch type. - // - // This parameter maps to SecurityOpt in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --security-opt option to docker run (https://docs.docker.com/engine/reference/run/). - // - // The Amazon ECS container agent running on a container instance must register - // with the ECS_SELINUX_CAPABLE=true or ECS_APPARMOR_CAPABLE=true environment - // variables before containers placed on that instance can use these security - // options. For more information, see Amazon ECS Container Agent Configuration - // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html) - // in the Amazon Elastic Container Service Developer Guide. - // - // This parameter is not supported for Windows containers. - DockerSecurityOptions []*string `locationName:"dockerSecurityOptions" type:"list"` - - // Early versions of the Amazon ECS container agent do not properly handle entryPoint - // parameters. If you have problems using entryPoint, update your container - // agent or enter your commands and arguments as command array items instead. - // - // The entry point that is passed to the container. This parameter maps to Entrypoint - // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --entrypoint option to docker run (https://docs.docker.com/engine/reference/run/). - // For more information, see https://docs.docker.com/engine/reference/builder/#entrypoint - // (https://docs.docker.com/engine/reference/builder/#entrypoint). - EntryPoint []*string `locationName:"entryPoint" type:"list"` - - // The environment variables to pass to a container. This parameter maps to - // Env in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --env option to docker run (https://docs.docker.com/engine/reference/run/). - // - // We do not recommend using plaintext environment variables for sensitive information, - // such as credential data. - Environment []*KeyValuePair `locationName:"environment" type:"list"` - - // If the essential parameter of a container is marked as true, and that container - // fails or stops for any reason, all other containers that are part of the - // task are stopped. If the essential parameter of a container is marked as - // false, then its failure does not affect the rest of the containers in a task. - // If this parameter is omitted, a container is assumed to be essential. - // - // All tasks must have at least one essential container. If you have an application - // that is composed of multiple containers, you should group containers that - // are used for a common purpose into components, and separate the different - // components into multiple task definitions. For more information, see Application - // Architecture (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/application_architecture.html) - // in the Amazon Elastic Container Service Developer Guide. - Essential *bool `locationName:"essential" type:"boolean"` - - // A list of hostnames and IP address mappings to append to the /etc/hosts file - // on the container. This parameter maps to ExtraHosts in the Create a container - // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section - // of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and - // the --add-host option to docker run (https://docs.docker.com/engine/reference/run/). - // - // This parameter is not supported for Windows containers or tasks that use - // the awsvpc network mode. - ExtraHosts []*HostEntry `locationName:"extraHosts" type:"list"` - - // The health check command and associated configuration parameters for the - // container. This parameter maps to HealthCheck in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the HEALTHCHECK parameter of docker run (https://docs.docker.com/engine/reference/run/). - HealthCheck *HealthCheck `locationName:"healthCheck" type:"structure"` - - // The hostname to use for your container. This parameter maps to Hostname in - // the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --hostname option to docker run (https://docs.docker.com/engine/reference/run/). - // - // The hostname parameter is not supported if you are using the awsvpc network - // mode. - Hostname *string `locationName:"hostname" type:"string"` - - // The image used to start a container. This string is passed directly to the - // Docker daemon. Images in the Docker Hub registry are available by default. - // Other repositories are specified with either repository-url/image:tag or - // repository-url/image@digest. Up to 255 letters (uppercase and lowercase), - // numbers, hyphens, underscores, colons, periods, forward slashes, and number - // signs are allowed. This parameter maps to Image in the Create a container - // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section - // of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and - // the IMAGE parameter of docker run (https://docs.docker.com/engine/reference/run/). - // - // * When a new task starts, the Amazon ECS container agent pulls the latest - // version of the specified image and tag for the container to use. However, - // subsequent updates to a repository image are not propagated to already - // running tasks. - // - // * Images in Amazon ECR repositories can be specified by either using the - // full registry/repository:tag or registry/repository@digest. For example, - // 012345678910.dkr.ecr..amazonaws.com/:latest - // or 012345678910.dkr.ecr..amazonaws.com/@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE. - // - // - // * Images in official repositories on Docker Hub use a single name (for - // example, ubuntu or mongo). - // - // * Images in other repositories on Docker Hub are qualified with an organization - // name (for example, amazon/amazon-ecs-agent). - // - // * Images in other online repositories are qualified further by a domain - // name (for example, quay.io/assemblyline/ubuntu). - Image *string `locationName:"image" type:"string"` - - // When this parameter is true, this allows you to deploy containerized applications - // that require stdin or a tty to be allocated. This parameter maps to OpenStdin - // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --interactive option to docker run (https://docs.docker.com/engine/reference/run/). - Interactive *bool `locationName:"interactive" type:"boolean"` - - // The link parameter allows containers to communicate with each other without - // the need for port mappings. Only supported if the network mode of a task - // definition is set to bridge. The name:internalName construct is analogous - // to name:alias in Docker links. Up to 255 letters (uppercase and lowercase), - // numbers, hyphens, and underscores are allowed. For more information about - // linking Docker containers, go to https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/ - // (https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/). - // This parameter maps to Links in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --link option to docker run (https://docs.docker.com/engine/reference/commandline/run/). - // - // This parameter is not supported for Windows containers. - // - // Containers that are collocated on a single container instance may be able - // to communicate with each other without requiring links or host port mappings. - // Network isolation is achieved on the container instance using security groups - // and VPC settings. - Links []*string `locationName:"links" type:"list"` - - // Linux-specific modifications that are applied to the container, such as Linux - // KernelCapabilities. - // - // This parameter is not supported for Windows containers. - LinuxParameters *LinuxParameters `locationName:"linuxParameters" type:"structure"` - - // The log configuration specification for the container. - // - // If you are using the Fargate launch type, the only supported value is awslogs. - // - // This parameter maps to LogConfig in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --log-driver option to docker run (https://docs.docker.com/engine/reference/run/). - // By default, containers use the same logging driver that the Docker daemon - // uses. However the container may use a different logging driver than the Docker - // daemon by specifying a log driver with this parameter in the container definition. - // To use a different logging driver for a container, the log system must be - // configured properly on the container instance (or on a different log server - // for remote logging options). For more information on the options for different - // supported log drivers, see Configure logging drivers (https://docs.docker.com/engine/admin/logging/overview/) - // in the Docker documentation. - // - // Amazon ECS currently supports a subset of the logging drivers available to - // the Docker daemon (shown in the LogConfiguration data type). Additional log - // drivers may be available in future releases of the Amazon ECS container agent. - // - // This parameter requires version 1.18 of the Docker Remote API or greater - // on your container instance. To check the Docker Remote API version on your - // container instance, log in to your container instance and run the following - // command: sudo docker version --format '{{.Server.APIVersion}}' - // - // The Amazon ECS container agent running on a container instance must register - // the logging drivers available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS - // environment variable before containers placed on that instance can use these - // log configuration options. For more information, see Amazon ECS Container - // Agent Configuration (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html) - // in the Amazon Elastic Container Service Developer Guide. - LogConfiguration *LogConfiguration `locationName:"logConfiguration" type:"structure"` - - // The hard limit (in MiB) of memory to present to the container. If your container - // attempts to exceed the memory specified here, the container is killed. This - // parameter maps to Memory in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --memory option to docker run (https://docs.docker.com/engine/reference/run/). - // - // If your containers are part of a task using the Fargate launch type, this - // field is optional and the only requirement is that the total amount of memory - // reserved for all containers within a task be lower than the task memory value. - // - // For containers that are part of a task using the EC2 launch type, you must - // specify a non-zero integer for one or both of memory or memoryReservation - // in container definitions. If you specify both, memory must be greater than - // memoryReservation. If you specify memoryReservation, then that value is subtracted - // from the available memory resources for the container instance on which the - // container is placed. Otherwise, the value of memory is used. - // - // The Docker daemon reserves a minimum of 4 MiB of memory for a container, - // so you should not specify fewer than 4 MiB of memory for your containers. - Memory *int64 `locationName:"memory" type:"integer"` - - // The soft limit (in MiB) of memory to reserve for the container. When system - // memory is under heavy contention, Docker attempts to keep the container memory - // to this soft limit. However, your container can consume more memory when - // it needs to, up to either the hard limit specified with the memory parameter - // (if applicable), or all of the available memory on the container instance, - // whichever comes first. This parameter maps to MemoryReservation in the Create - // a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --memory-reservation option to docker run (https://docs.docker.com/engine/reference/run/). - // - // You must specify a non-zero integer for one or both of memory or memoryReservation - // in container definitions. If you specify both, memory must be greater than - // memoryReservation. If you specify memoryReservation, then that value is subtracted - // from the available memory resources for the container instance on which the - // container is placed. Otherwise, the value of memory is used. - // - // For example, if your container normally uses 128 MiB of memory, but occasionally - // bursts to 256 MiB of memory for short periods of time, you can set a memoryReservation - // of 128 MiB, and a memory hard limit of 300 MiB. This configuration would - // allow the container to only reserve 128 MiB of memory from the remaining - // resources on the container instance, but also allow the container to consume - // more memory resources when needed. - // - // The Docker daemon reserves a minimum of 4 MiB of memory for a container, - // so you should not specify fewer than 4 MiB of memory for your containers. - MemoryReservation *int64 `locationName:"memoryReservation" type:"integer"` - - // The mount points for data volumes in your container. - // - // This parameter maps to Volumes in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --volume option to docker run (https://docs.docker.com/engine/reference/run/). - // - // Windows containers can mount whole directories on the same drive as $env:ProgramData. - // Windows containers cannot mount directories on a different drive, and mount - // point cannot be across drives. - MountPoints []*MountPoint `locationName:"mountPoints" type:"list"` - - // The name of a container. If you are linking multiple containers together - // in a task definition, the name of one container can be entered in the links - // of another container to connect the containers. Up to 255 letters (uppercase - // and lowercase), numbers, hyphens, and underscores are allowed. This parameter - // maps to name in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --name option to docker run (https://docs.docker.com/engine/reference/run/). - Name *string `locationName:"name" type:"string"` - - // The list of port mappings for the container. Port mappings allow containers - // to access ports on the host container instance to send or receive traffic. - // - // For task definitions that use the awsvpc network mode, you should only specify - // the containerPort. The hostPort can be left blank or it must be the same - // value as the containerPort. - // - // Port mappings on Windows use the NetNAT gateway address rather than localhost. - // There is no loopback for port mappings on Windows, so you cannot access a - // container's mapped port from the host itself. - // - // This parameter maps to PortBindings in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --publish option to docker run (https://docs.docker.com/engine/reference/run/). - // If the network mode of a task definition is set to none, then you can't specify - // port mappings. If the network mode of a task definition is set to host, then - // host ports must either be undefined or they must match the container port - // in the port mapping. - // - // After a task reaches the RUNNING status, manual and automatic host and container - // port assignments are visible in the Network Bindings section of a container - // description for a selected task in the Amazon ECS console. The assignments - // are also visible in the networkBindings section DescribeTasks responses. - PortMappings []*PortMapping `locationName:"portMappings" type:"list"` - - // When this parameter is true, the container is given elevated privileges on - // the host container instance (similar to the root user). This parameter maps - // to Privileged in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --privileged option to docker run (https://docs.docker.com/engine/reference/run/). - // - // This parameter is not supported for Windows containers or tasks using the - // Fargate launch type. - Privileged *bool `locationName:"privileged" type:"boolean"` - - // When this parameter is true, a TTY is allocated. This parameter maps to Tty - // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --tty option to docker run (https://docs.docker.com/engine/reference/run/). - PseudoTerminal *bool `locationName:"pseudoTerminal" type:"boolean"` - - // When this parameter is true, the container is given read-only access to its - // root file system. This parameter maps to ReadonlyRootfs in the Create a container - // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section - // of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and - // the --read-only option to docker run (https://docs.docker.com/engine/reference/run/). - // - // This parameter is not supported for Windows containers. - ReadonlyRootFilesystem *bool `locationName:"readonlyRootFilesystem" type:"boolean"` - - // The private repository authentication credentials to use. - RepositoryCredentials *RepositoryCredentials `locationName:"repositoryCredentials" type:"structure"` - - // The secrets to pass to the container. - Secrets []*Secret `locationName:"secrets" type:"list"` - - // A list of namespaced kernel parameters to set in the container. This parameter - // maps to Sysctls in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --sysctl option to docker run (https://docs.docker.com/engine/reference/run/). - // - // It is not recommended that you specify network-related systemControls parameters - // for multiple containers in a single task that also uses either the awsvpc - // or host network modes. For tasks that use the awsvpc network mode, the container - // that is started last determines which systemControls parameters take effect. - // For tasks that use the host network mode, it changes the container instance's - // namespaced kernel parameters as well as the containers. - SystemControls []*SystemControl `locationName:"systemControls" type:"list"` - - // A list of ulimits to set in the container. This parameter maps to Ulimits - // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --ulimit option to docker run (https://docs.docker.com/engine/reference/run/). - // Valid naming values are displayed in the Ulimit data type. This parameter - // requires version 1.18 of the Docker Remote API or greater on your container - // instance. To check the Docker Remote API version on your container instance, - // log in to your container instance and run the following command: sudo docker - // version --format '{{.Server.APIVersion}}' - // - // This parameter is not supported for Windows containers. - Ulimits []*Ulimit `locationName:"ulimits" type:"list"` - - // The user name to use inside the container. This parameter maps to User in - // the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --user option to docker run (https://docs.docker.com/engine/reference/run/). - // - // This parameter is not supported for Windows containers. - User *string `locationName:"user" type:"string"` - - // Data volumes to mount from another container. This parameter maps to VolumesFrom - // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --volumes-from option to docker run (https://docs.docker.com/engine/reference/run/). - VolumesFrom []*VolumeFrom `locationName:"volumesFrom" type:"list"` - - // The working directory in which to run commands inside the container. This - // parameter maps to WorkingDir in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --workdir option to docker run (https://docs.docker.com/engine/reference/run/). - WorkingDirectory *string `locationName:"workingDirectory" type:"string"` -} - -// String returns the string representation -func (s ContainerDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContainerDefinition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContainerDefinition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContainerDefinition"} - if s.ExtraHosts != nil { - for i, v := range s.ExtraHosts { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ExtraHosts", i), err.(request.ErrInvalidParams)) - } - } - } - if s.HealthCheck != nil { - if err := s.HealthCheck.Validate(); err != nil { - invalidParams.AddNested("HealthCheck", err.(request.ErrInvalidParams)) - } - } - if s.LinuxParameters != nil { - if err := s.LinuxParameters.Validate(); err != nil { - invalidParams.AddNested("LinuxParameters", err.(request.ErrInvalidParams)) - } - } - if s.LogConfiguration != nil { - if err := s.LogConfiguration.Validate(); err != nil { - invalidParams.AddNested("LogConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.RepositoryCredentials != nil { - if err := s.RepositoryCredentials.Validate(); err != nil { - invalidParams.AddNested("RepositoryCredentials", err.(request.ErrInvalidParams)) - } - } - if s.Secrets != nil { - for i, v := range s.Secrets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Secrets", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Ulimits != nil { - for i, v := range s.Ulimits { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Ulimits", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCommand sets the Command field's value. -func (s *ContainerDefinition) SetCommand(v []*string) *ContainerDefinition { - s.Command = v - return s -} - -// SetCpu sets the Cpu field's value. -func (s *ContainerDefinition) SetCpu(v int64) *ContainerDefinition { - s.Cpu = &v - return s -} - -// SetDisableNetworking sets the DisableNetworking field's value. -func (s *ContainerDefinition) SetDisableNetworking(v bool) *ContainerDefinition { - s.DisableNetworking = &v - return s -} - -// SetDnsSearchDomains sets the DnsSearchDomains field's value. -func (s *ContainerDefinition) SetDnsSearchDomains(v []*string) *ContainerDefinition { - s.DnsSearchDomains = v - return s -} - -// SetDnsServers sets the DnsServers field's value. -func (s *ContainerDefinition) SetDnsServers(v []*string) *ContainerDefinition { - s.DnsServers = v - return s -} - -// SetDockerLabels sets the DockerLabels field's value. -func (s *ContainerDefinition) SetDockerLabels(v map[string]*string) *ContainerDefinition { - s.DockerLabels = v - return s -} - -// SetDockerSecurityOptions sets the DockerSecurityOptions field's value. -func (s *ContainerDefinition) SetDockerSecurityOptions(v []*string) *ContainerDefinition { - s.DockerSecurityOptions = v - return s -} - -// SetEntryPoint sets the EntryPoint field's value. -func (s *ContainerDefinition) SetEntryPoint(v []*string) *ContainerDefinition { - s.EntryPoint = v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *ContainerDefinition) SetEnvironment(v []*KeyValuePair) *ContainerDefinition { - s.Environment = v - return s -} - -// SetEssential sets the Essential field's value. -func (s *ContainerDefinition) SetEssential(v bool) *ContainerDefinition { - s.Essential = &v - return s -} - -// SetExtraHosts sets the ExtraHosts field's value. -func (s *ContainerDefinition) SetExtraHosts(v []*HostEntry) *ContainerDefinition { - s.ExtraHosts = v - return s -} - -// SetHealthCheck sets the HealthCheck field's value. -func (s *ContainerDefinition) SetHealthCheck(v *HealthCheck) *ContainerDefinition { - s.HealthCheck = v - return s -} - -// SetHostname sets the Hostname field's value. -func (s *ContainerDefinition) SetHostname(v string) *ContainerDefinition { - s.Hostname = &v - return s -} - -// SetImage sets the Image field's value. -func (s *ContainerDefinition) SetImage(v string) *ContainerDefinition { - s.Image = &v - return s -} - -// SetInteractive sets the Interactive field's value. -func (s *ContainerDefinition) SetInteractive(v bool) *ContainerDefinition { - s.Interactive = &v - return s -} - -// SetLinks sets the Links field's value. -func (s *ContainerDefinition) SetLinks(v []*string) *ContainerDefinition { - s.Links = v - return s -} - -// SetLinuxParameters sets the LinuxParameters field's value. -func (s *ContainerDefinition) SetLinuxParameters(v *LinuxParameters) *ContainerDefinition { - s.LinuxParameters = v - return s -} - -// SetLogConfiguration sets the LogConfiguration field's value. -func (s *ContainerDefinition) SetLogConfiguration(v *LogConfiguration) *ContainerDefinition { - s.LogConfiguration = v - return s -} - -// SetMemory sets the Memory field's value. -func (s *ContainerDefinition) SetMemory(v int64) *ContainerDefinition { - s.Memory = &v - return s -} - -// SetMemoryReservation sets the MemoryReservation field's value. -func (s *ContainerDefinition) SetMemoryReservation(v int64) *ContainerDefinition { - s.MemoryReservation = &v - return s -} - -// SetMountPoints sets the MountPoints field's value. -func (s *ContainerDefinition) SetMountPoints(v []*MountPoint) *ContainerDefinition { - s.MountPoints = v - return s -} - -// SetName sets the Name field's value. -func (s *ContainerDefinition) SetName(v string) *ContainerDefinition { - s.Name = &v - return s -} - -// SetPortMappings sets the PortMappings field's value. -func (s *ContainerDefinition) SetPortMappings(v []*PortMapping) *ContainerDefinition { - s.PortMappings = v - return s -} - -// SetPrivileged sets the Privileged field's value. -func (s *ContainerDefinition) SetPrivileged(v bool) *ContainerDefinition { - s.Privileged = &v - return s -} - -// SetPseudoTerminal sets the PseudoTerminal field's value. -func (s *ContainerDefinition) SetPseudoTerminal(v bool) *ContainerDefinition { - s.PseudoTerminal = &v - return s -} - -// SetReadonlyRootFilesystem sets the ReadonlyRootFilesystem field's value. -func (s *ContainerDefinition) SetReadonlyRootFilesystem(v bool) *ContainerDefinition { - s.ReadonlyRootFilesystem = &v - return s -} - -// SetRepositoryCredentials sets the RepositoryCredentials field's value. -func (s *ContainerDefinition) SetRepositoryCredentials(v *RepositoryCredentials) *ContainerDefinition { - s.RepositoryCredentials = v - return s -} - -// SetSecrets sets the Secrets field's value. -func (s *ContainerDefinition) SetSecrets(v []*Secret) *ContainerDefinition { - s.Secrets = v - return s -} - -// SetSystemControls sets the SystemControls field's value. -func (s *ContainerDefinition) SetSystemControls(v []*SystemControl) *ContainerDefinition { - s.SystemControls = v - return s -} - -// SetUlimits sets the Ulimits field's value. -func (s *ContainerDefinition) SetUlimits(v []*Ulimit) *ContainerDefinition { - s.Ulimits = v - return s -} - -// SetUser sets the User field's value. -func (s *ContainerDefinition) SetUser(v string) *ContainerDefinition { - s.User = &v - return s -} - -// SetVolumesFrom sets the VolumesFrom field's value. -func (s *ContainerDefinition) SetVolumesFrom(v []*VolumeFrom) *ContainerDefinition { - s.VolumesFrom = v - return s -} - -// SetWorkingDirectory sets the WorkingDirectory field's value. -func (s *ContainerDefinition) SetWorkingDirectory(v string) *ContainerDefinition { - s.WorkingDirectory = &v - return s -} - -// An EC2 instance that is running the Amazon ECS agent and has been registered -// with a cluster. -type ContainerInstance struct { - _ struct{} `type:"structure"` - - // This parameter returns true if the agent is connected to Amazon ECS. Registered - // instances with an agent that may be unhealthy or stopped return false. Only - // instances connected to an agent can accept placement requests. - AgentConnected *bool `locationName:"agentConnected" type:"boolean"` - - // The status of the most recent agent update. If an update has never been requested, - // this value is NULL. - AgentUpdateStatus *string `locationName:"agentUpdateStatus" type:"string" enum:"AgentUpdateStatus"` - - // The elastic network interfaces associated with the container instance. - Attachments []*Attachment `locationName:"attachments" type:"list"` - - // The attributes set for the container instance, either by the Amazon ECS container - // agent at instance registration or manually with the PutAttributes operation. - Attributes []*Attribute `locationName:"attributes" type:"list"` - - // The Amazon Resource Name (ARN) of the container instance. The ARN contains - // the arn:aws:ecs namespace, followed by the Region of the container instance, - // the AWS account ID of the container instance owner, the container-instance - // namespace, and then the container instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID. - ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"` - - // The EC2 instance ID of the container instance. - Ec2InstanceId *string `locationName:"ec2InstanceId" type:"string"` - - // The number of tasks on the container instance that are in the PENDING status. - PendingTasksCount *int64 `locationName:"pendingTasksCount" type:"integer"` - - // The Unix timestamp for when the container instance was registered. - RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp"` - - // For CPU and memory resource types, this parameter describes the amount of - // each resource that was available on the container instance when the container - // agent registered it with Amazon ECS. This value represents the total amount - // of CPU and memory that can be allocated on this container instance to tasks. - // For port resource types, this parameter describes the ports that were reserved - // by the Amazon ECS container agent when it registered the container instance - // with Amazon ECS. - RegisteredResources []*Resource `locationName:"registeredResources" type:"list"` - - // For CPU and memory resource types, this parameter describes the remaining - // CPU and memory that has not already been allocated to tasks and is therefore - // available for new tasks. For port resource types, this parameter describes - // the ports that were reserved by the Amazon ECS container agent (at instance - // registration time) and any task containers that have reserved port mappings - // on the host (with the host or bridge network mode). Any port that is not - // specified here is available for new tasks. - RemainingResources []*Resource `locationName:"remainingResources" type:"list"` - - // The number of tasks on the container instance that are in the RUNNING status. - RunningTasksCount *int64 `locationName:"runningTasksCount" type:"integer"` - - // The status of the container instance. The valid values are ACTIVE, INACTIVE, - // or DRAINING. ACTIVE indicates that the container instance can accept tasks. - // DRAINING indicates that new tasks are not placed on the container instance - // and any service tasks running on the container instance are removed if possible. - // For more information, see Container Instance Draining (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-draining.html) - // in the Amazon Elastic Container Service Developer Guide. - Status *string `locationName:"status" type:"string"` - - // The metadata that you apply to the container instance to help you categorize - // and organize them. Each tag consists of a key and an optional value, both - // of which you define. Tag keys can have a maximum character length of 128 - // characters, and tag values can have a maximum length of 256 characters. - Tags []*Tag `locationName:"tags" type:"list"` - - // The version counter for the container instance. Every time a container instance - // experiences a change that triggers a CloudWatch event, the version counter - // is incremented. If you are replicating your Amazon ECS container instance - // state with CloudWatch Events, you can compare the version of a container - // instance reported by the Amazon ECS APIs with the version reported in CloudWatch - // Events for the container instance (inside the detail object) to verify that - // the version in your event stream is current. - Version *int64 `locationName:"version" type:"long"` - - // The version information for the Amazon ECS container agent and Docker daemon - // running on the container instance. - VersionInfo *VersionInfo `locationName:"versionInfo" type:"structure"` -} - -// String returns the string representation -func (s ContainerInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContainerInstance) GoString() string { - return s.String() -} - -// SetAgentConnected sets the AgentConnected field's value. -func (s *ContainerInstance) SetAgentConnected(v bool) *ContainerInstance { - s.AgentConnected = &v - return s -} - -// SetAgentUpdateStatus sets the AgentUpdateStatus field's value. -func (s *ContainerInstance) SetAgentUpdateStatus(v string) *ContainerInstance { - s.AgentUpdateStatus = &v - return s -} - -// SetAttachments sets the Attachments field's value. -func (s *ContainerInstance) SetAttachments(v []*Attachment) *ContainerInstance { - s.Attachments = v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *ContainerInstance) SetAttributes(v []*Attribute) *ContainerInstance { - s.Attributes = v - return s -} - -// SetContainerInstanceArn sets the ContainerInstanceArn field's value. -func (s *ContainerInstance) SetContainerInstanceArn(v string) *ContainerInstance { - s.ContainerInstanceArn = &v - return s -} - -// SetEc2InstanceId sets the Ec2InstanceId field's value. -func (s *ContainerInstance) SetEc2InstanceId(v string) *ContainerInstance { - s.Ec2InstanceId = &v - return s -} - -// SetPendingTasksCount sets the PendingTasksCount field's value. -func (s *ContainerInstance) SetPendingTasksCount(v int64) *ContainerInstance { - s.PendingTasksCount = &v - return s -} - -// SetRegisteredAt sets the RegisteredAt field's value. -func (s *ContainerInstance) SetRegisteredAt(v time.Time) *ContainerInstance { - s.RegisteredAt = &v - return s -} - -// SetRegisteredResources sets the RegisteredResources field's value. -func (s *ContainerInstance) SetRegisteredResources(v []*Resource) *ContainerInstance { - s.RegisteredResources = v - return s -} - -// SetRemainingResources sets the RemainingResources field's value. -func (s *ContainerInstance) SetRemainingResources(v []*Resource) *ContainerInstance { - s.RemainingResources = v - return s -} - -// SetRunningTasksCount sets the RunningTasksCount field's value. -func (s *ContainerInstance) SetRunningTasksCount(v int64) *ContainerInstance { - s.RunningTasksCount = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ContainerInstance) SetStatus(v string) *ContainerInstance { - s.Status = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ContainerInstance) SetTags(v []*Tag) *ContainerInstance { - s.Tags = v - return s -} - -// SetVersion sets the Version field's value. -func (s *ContainerInstance) SetVersion(v int64) *ContainerInstance { - s.Version = &v - return s -} - -// SetVersionInfo sets the VersionInfo field's value. -func (s *ContainerInstance) SetVersionInfo(v *VersionInfo) *ContainerInstance { - s.VersionInfo = v - return s -} - -// The overrides that should be sent to a container. -type ContainerOverride struct { - _ struct{} `type:"structure"` - - // The command to send to the container that overrides the default command from - // the Docker image or the task definition. You must also specify a container - // name. - Command []*string `locationName:"command" type:"list"` - - // The number of cpu units reserved for the container, instead of the default - // value from the task definition. You must also specify a container name. - Cpu *int64 `locationName:"cpu" type:"integer"` - - // The environment variables to send to the container. You can add new environment - // variables, which are added to the container at launch, or you can override - // the existing environment variables from the Docker image or the task definition. - // You must also specify a container name. - Environment []*KeyValuePair `locationName:"environment" type:"list"` - - // The hard limit (in MiB) of memory to present to the container, instead of - // the default value from the task definition. If your container attempts to - // exceed the memory specified here, the container is killed. You must also - // specify a container name. - Memory *int64 `locationName:"memory" type:"integer"` - - // The soft limit (in MiB) of memory to reserve for the container, instead of - // the default value from the task definition. You must also specify a container - // name. - MemoryReservation *int64 `locationName:"memoryReservation" type:"integer"` - - // The name of the container that receives the override. This parameter is required - // if any override is specified. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s ContainerOverride) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContainerOverride) GoString() string { - return s.String() -} - -// SetCommand sets the Command field's value. -func (s *ContainerOverride) SetCommand(v []*string) *ContainerOverride { - s.Command = v - return s -} - -// SetCpu sets the Cpu field's value. -func (s *ContainerOverride) SetCpu(v int64) *ContainerOverride { - s.Cpu = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *ContainerOverride) SetEnvironment(v []*KeyValuePair) *ContainerOverride { - s.Environment = v - return s -} - -// SetMemory sets the Memory field's value. -func (s *ContainerOverride) SetMemory(v int64) *ContainerOverride { - s.Memory = &v - return s -} - -// SetMemoryReservation sets the MemoryReservation field's value. -func (s *ContainerOverride) SetMemoryReservation(v int64) *ContainerOverride { - s.MemoryReservation = &v - return s -} - -// SetName sets the Name field's value. -func (s *ContainerOverride) SetName(v string) *ContainerOverride { - s.Name = &v - return s -} - -// An object representing a change in state for a container. -type ContainerStateChange struct { - _ struct{} `type:"structure"` - - // The name of the container. - ContainerName *string `locationName:"containerName" type:"string"` - - // The exit code for the container, if the state change is a result of the container - // exiting. - ExitCode *int64 `locationName:"exitCode" type:"integer"` - - // Any network bindings associated with the container. - NetworkBindings []*NetworkBinding `locationName:"networkBindings" type:"list"` - - // The reason for the state change. - Reason *string `locationName:"reason" type:"string"` - - // The status of the container. - Status *string `locationName:"status" type:"string"` -} - -// String returns the string representation -func (s ContainerStateChange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContainerStateChange) GoString() string { - return s.String() -} - -// SetContainerName sets the ContainerName field's value. -func (s *ContainerStateChange) SetContainerName(v string) *ContainerStateChange { - s.ContainerName = &v - return s -} - -// SetExitCode sets the ExitCode field's value. -func (s *ContainerStateChange) SetExitCode(v int64) *ContainerStateChange { - s.ExitCode = &v - return s -} - -// SetNetworkBindings sets the NetworkBindings field's value. -func (s *ContainerStateChange) SetNetworkBindings(v []*NetworkBinding) *ContainerStateChange { - s.NetworkBindings = v - return s -} - -// SetReason sets the Reason field's value. -func (s *ContainerStateChange) SetReason(v string) *ContainerStateChange { - s.Reason = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ContainerStateChange) SetStatus(v string) *ContainerStateChange { - s.Status = &v - return s -} - -type CreateClusterInput struct { - _ struct{} `type:"structure"` - - // The name of your cluster. If you do not specify a name for your cluster, - // you create a cluster named default. Up to 255 letters (uppercase and lowercase), - // numbers, hyphens, and underscores are allowed. - ClusterName *string `locationName:"clusterName" type:"string"` - - // The metadata that you apply to the cluster to help you categorize and organize - // them. Each tag consists of a key and an optional value, both of which you - // define. Tag keys can have a maximum character length of 128 characters, and - // tag values can have a maximum length of 256 characters. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"} - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterName sets the ClusterName field's value. -func (s *CreateClusterInput) SetClusterName(v string) *CreateClusterInput { - s.ClusterName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateClusterInput) SetTags(v []*Tag) *CreateClusterInput { - s.Tags = v - return s -} - -type CreateClusterOutput struct { - _ struct{} `type:"structure"` - - // The full description of your new cluster. - Cluster *Cluster `locationName:"cluster" type:"structure"` -} - -// String returns the string representation -func (s CreateClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *CreateClusterOutput) SetCluster(v *Cluster) *CreateClusterOutput { - s.Cluster = v - return s -} - -type CreateServiceInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. Up to 32 ASCII characters are allowed. - ClientToken *string `locationName:"clientToken" type:"string"` - - // The short name or full Amazon Resource Name (ARN) of the cluster on which - // to run your service. If you do not specify a cluster, the default cluster - // is assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // Optional deployment parameters that control how many tasks run during the - // deployment and the ordering of stopping and starting tasks. - DeploymentConfiguration *DeploymentConfiguration `locationName:"deploymentConfiguration" type:"structure"` - - // The deployment controller to use for the service. - DeploymentController *DeploymentController `locationName:"deploymentController" type:"structure"` - - // The number of instantiations of the specified task definition to place and - // keep running on your cluster. - DesiredCount *int64 `locationName:"desiredCount" type:"integer"` - - // Specifies whether to enable Amazon ECS managed tags for the tasks within - // the service. For more information, see Tagging Your Amazon ECS Resources - // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) - // in the Amazon Elastic Container Service Developer Guide. - EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"` - - // The period of time, in seconds, that the Amazon ECS service scheduler should - // ignore unhealthy Elastic Load Balancing target health checks after a task - // has first started. This is only valid if your service is configured to use - // a load balancer. If your service's tasks take a while to start and respond - // to Elastic Load Balancing health checks, you can specify a health check grace - // period of up to 7,200 seconds. During that time, the ECS service scheduler - // ignores health check status. This grace period can prevent the ECS service - // scheduler from marking tasks as unhealthy and stopping them before they have - // time to come up. - HealthCheckGracePeriodSeconds *int64 `locationName:"healthCheckGracePeriodSeconds" type:"integer"` - - // The launch type on which to run your service. For more information, see Amazon - // ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) - // in the Amazon Elastic Container Service Developer Guide. - LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` - - // A load balancer object representing the load balancer to use with your service. - // - // If the service is using the ECS deployment controller, you are limited to - // one load balancer or target group. - // - // If the service is using the CODE_DEPLOY deployment controller, the service - // is required to use either an Application Load Balancer or Network Load Balancer. - // When creating an AWS CodeDeploy deployment group, you specify two target - // groups (referred to as a targetGroupPair). During a deployment, AWS CodeDeploy - // determines which task set in your service has the status PRIMARY and associates - // one target group with it, and then associates the other target group with - // the replacement task set. The load balancer can also have up to two listeners: - // a required listener for production traffic and an optional listener that - // allows you perform validation tests with Lambda functions before routing - // production traffic to it. - // - // After you create a service using the ECS deployment controller, the load - // balancer name or target group ARN, container name, and container port specified - // in the service definition are immutable. If you are using the CODE_DEPLOY - // deployment controller, these values can be changed when updating the service. - // - // For Classic Load Balancers, this object must contain the load balancer name, - // the container name (as it appears in a container definition), and the container - // port to access from the load balancer. When a task from this service is placed - // on a container instance, the container instance is registered with the load - // balancer specified here. - // - // For Application Load Balancers and Network Load Balancers, this object must - // contain the load balancer target group ARN, the container name (as it appears - // in a container definition), and the container port to access from the load - // balancer. When a task from this service is placed on a container instance, - // the container instance and port combination is registered as a target in - // the target group specified here. - // - // Services with tasks that use the awsvpc network mode (for example, those - // with the Fargate launch type) only support Application Load Balancers and - // Network Load Balancers. Classic Load Balancers are not supported. Also, when - // you create any target groups for these services, you must choose ip as the - // target type, not instance, because tasks that use the awsvpc network mode - // are associated with an elastic network interface, not an Amazon EC2 instance. - LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` - - // The network configuration for the service. This parameter is required for - // task definitions that use the awsvpc network mode to receive their own elastic - // network interface, and it is not supported for other network modes. For more - // information, see Task Networking (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) - // in the Amazon Elastic Container Service Developer Guide. - NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` - - // An array of placement constraint objects to use for tasks in your service. - // You can specify a maximum of 10 constraints per task (this limit includes - // constraints in the task definition and those specified at runtime). - PlacementConstraints []*PlacementConstraint `locationName:"placementConstraints" type:"list"` - - // The placement strategy objects to use for tasks in your service. You can - // specify a maximum of five strategy rules per service. - PlacementStrategy []*PlacementStrategy `locationName:"placementStrategy" type:"list"` - - // The platform version on which your tasks in the service are running. A platform - // version is only specified for tasks using the Fargate launch type. If one - // is not specified, the LATEST platform version is used by default. For more - // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) - // in the Amazon Elastic Container Service Developer Guide. - PlatformVersion *string `locationName:"platformVersion" type:"string"` - - // Specifies whether to propagate the tags from the task definition or the service - // to the tasks. If no value is specified, the tags are not propagated. Tags - // can only be propagated to the tasks within the service during service creation. - // To add tags to a task after service creation, use the TagResource API action. - PropagateTags *string `locationName:"propagateTags" type:"string" enum:"PropagateTags"` - - // The name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon - // ECS to make calls to your load balancer on your behalf. This parameter is - // only permitted if you are using a load balancer with your service and your - // task definition does not use the awsvpc network mode. If you specify the - // role parameter, you must also specify a load balancer object with the loadBalancers - // parameter. - // - // If your account has already created the Amazon ECS service-linked role, that - // role is used by default for your service unless you specify a role here. - // The service-linked role is required if your task definition uses the awsvpc - // network mode, in which case you should not specify a role here. For more - // information, see Using Service-Linked Roles for Amazon ECS (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html) - // in the Amazon Elastic Container Service Developer Guide. - // - // If your specified role has a path other than /, then you must either specify - // the full role ARN (this is recommended) or prefix the role name with the - // path. For example, if a role with the name bar has a path of /foo/ then you - // would specify /foo/bar as the role name. For more information, see Friendly - // Names and Paths (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-friendly-names) - // in the IAM User Guide. - Role *string `locationName:"role" type:"string"` - - // The scheduling strategy to use for the service. For more information, see - // Services (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html). - // - // There are two service scheduler strategies available: - // - // * REPLICA-The replica scheduling strategy places and maintains the desired - // number of tasks across your cluster. By default, the service scheduler - // spreads tasks across Availability Zones. You can use task placement strategies - // and constraints to customize task placement decisions. This scheduler - // strategy is required if using the CODE_DEPLOY deployment controller. - // - // * DAEMON-The daemon scheduling strategy deploys exactly one task on each - // active container instance that meets all of the task placement constraints - // that you specify in your cluster. When you are using this strategy, there - // is no need to specify a desired number of tasks, a task placement strategy, - // or use Service Auto Scaling policies. - // - // Tasks using the Fargate launch type or the CODE_DEPLOY deploymenet controller - // do not support the DAEMON scheduling strategy. - SchedulingStrategy *string `locationName:"schedulingStrategy" type:"string" enum:"SchedulingStrategy"` - - // The name of your service. Up to 255 letters (uppercase and lowercase), numbers, - // hyphens, and underscores are allowed. Service names must be unique within - // a cluster, but you can have similarly named services in multiple clusters - // within a Region or across multiple Regions. - // - // ServiceName is a required field - ServiceName *string `locationName:"serviceName" type:"string" required:"true"` - - // The details of the service discovery registries to assign to this service. - // For more information, see Service Discovery (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html). - // - // Service discovery is supported for Fargate tasks if you are using platform - // version v1.1.0 or later. For more information, see AWS Fargate Platform Versions - // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html). - ServiceRegistries []*ServiceRegistry `locationName:"serviceRegistries" type:"list"` - - // The metadata that you apply to the service to help you categorize and organize - // them. Each tag consists of a key and an optional value, both of which you - // define. When a service is deleted, the tags are deleted as well. Tag keys - // can have a maximum character length of 128 characters, and tag values can - // have a maximum length of 256 characters. - Tags []*Tag `locationName:"tags" type:"list"` - - // The family and revision (family:revision) or full ARN of the task definition - // to run in your service. If a revision is not specified, the latest ACTIVE - // revision is used. - // - // TaskDefinition is a required field - TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateServiceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateServiceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateServiceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateServiceInput"} - if s.ServiceName == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceName")) - } - if s.TaskDefinition == nil { - invalidParams.Add(request.NewErrParamRequired("TaskDefinition")) - } - if s.DeploymentController != nil { - if err := s.DeploymentController.Validate(); err != nil { - invalidParams.AddNested("DeploymentController", err.(request.ErrInvalidParams)) - } - } - if s.NetworkConfiguration != nil { - if err := s.NetworkConfiguration.Validate(); err != nil { - invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateServiceInput) SetClientToken(v string) *CreateServiceInput { - s.ClientToken = &v - return s -} - -// SetCluster sets the Cluster field's value. -func (s *CreateServiceInput) SetCluster(v string) *CreateServiceInput { - s.Cluster = &v - return s -} - -// SetDeploymentConfiguration sets the DeploymentConfiguration field's value. -func (s *CreateServiceInput) SetDeploymentConfiguration(v *DeploymentConfiguration) *CreateServiceInput { - s.DeploymentConfiguration = v - return s -} - -// SetDeploymentController sets the DeploymentController field's value. -func (s *CreateServiceInput) SetDeploymentController(v *DeploymentController) *CreateServiceInput { - s.DeploymentController = v - return s -} - -// SetDesiredCount sets the DesiredCount field's value. -func (s *CreateServiceInput) SetDesiredCount(v int64) *CreateServiceInput { - s.DesiredCount = &v - return s -} - -// SetEnableECSManagedTags sets the EnableECSManagedTags field's value. -func (s *CreateServiceInput) SetEnableECSManagedTags(v bool) *CreateServiceInput { - s.EnableECSManagedTags = &v - return s -} - -// SetHealthCheckGracePeriodSeconds sets the HealthCheckGracePeriodSeconds field's value. -func (s *CreateServiceInput) SetHealthCheckGracePeriodSeconds(v int64) *CreateServiceInput { - s.HealthCheckGracePeriodSeconds = &v - return s -} - -// SetLaunchType sets the LaunchType field's value. -func (s *CreateServiceInput) SetLaunchType(v string) *CreateServiceInput { - s.LaunchType = &v - return s -} - -// SetLoadBalancers sets the LoadBalancers field's value. -func (s *CreateServiceInput) SetLoadBalancers(v []*LoadBalancer) *CreateServiceInput { - s.LoadBalancers = v - return s -} - -// SetNetworkConfiguration sets the NetworkConfiguration field's value. -func (s *CreateServiceInput) SetNetworkConfiguration(v *NetworkConfiguration) *CreateServiceInput { - s.NetworkConfiguration = v - return s -} - -// SetPlacementConstraints sets the PlacementConstraints field's value. -func (s *CreateServiceInput) SetPlacementConstraints(v []*PlacementConstraint) *CreateServiceInput { - s.PlacementConstraints = v - return s -} - -// SetPlacementStrategy sets the PlacementStrategy field's value. -func (s *CreateServiceInput) SetPlacementStrategy(v []*PlacementStrategy) *CreateServiceInput { - s.PlacementStrategy = v - return s -} - -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *CreateServiceInput) SetPlatformVersion(v string) *CreateServiceInput { - s.PlatformVersion = &v - return s -} - -// SetPropagateTags sets the PropagateTags field's value. -func (s *CreateServiceInput) SetPropagateTags(v string) *CreateServiceInput { - s.PropagateTags = &v - return s -} - -// SetRole sets the Role field's value. -func (s *CreateServiceInput) SetRole(v string) *CreateServiceInput { - s.Role = &v - return s -} - -// SetSchedulingStrategy sets the SchedulingStrategy field's value. -func (s *CreateServiceInput) SetSchedulingStrategy(v string) *CreateServiceInput { - s.SchedulingStrategy = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *CreateServiceInput) SetServiceName(v string) *CreateServiceInput { - s.ServiceName = &v - return s -} - -// SetServiceRegistries sets the ServiceRegistries field's value. -func (s *CreateServiceInput) SetServiceRegistries(v []*ServiceRegistry) *CreateServiceInput { - s.ServiceRegistries = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateServiceInput) SetTags(v []*Tag) *CreateServiceInput { - s.Tags = v - return s -} - -// SetTaskDefinition sets the TaskDefinition field's value. -func (s *CreateServiceInput) SetTaskDefinition(v string) *CreateServiceInput { - s.TaskDefinition = &v - return s -} - -type CreateServiceOutput struct { - _ struct{} `type:"structure"` - - // The full description of your service following the create call. - // - // If a service is using the ECS deployment controller, the deploymentController - // and taskSets parameters will not be returned. - // - // If the service is using the CODE_DEPLOY deployment controller, the deploymentController, - // taskSets and deployments parameters will be returned, however the deployments - // parameter will be an empty list. - Service *Service `locationName:"service" type:"structure"` -} - -// String returns the string representation -func (s CreateServiceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateServiceOutput) GoString() string { - return s.String() -} - -// SetService sets the Service field's value. -func (s *CreateServiceOutput) SetService(v *Service) *CreateServiceOutput { - s.Service = v - return s -} - -type DeleteAccountSettingInput struct { - _ struct{} `type:"structure"` - - // The resource name for which to disable the new format. If serviceLongArnFormat - // is specified, the ARN for your Amazon ECS services is affected. If taskLongArnFormat - // is specified, the ARN and resource ID for your Amazon ECS tasks is affected. - // If containerInstanceLongArnFormat is specified, the ARN and resource ID for - // your Amazon ECS container instances is affected. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true" enum:"SettingName"` - - // The ARN of the principal, which can be an IAM user, IAM role, or the root - // user. If you specify the root user, it modifies the ARN and resource ID format - // for all IAM users, IAM roles, and the root user of the account unless an - // IAM user or role explicitly overrides these settings for themselves. If this - // field is omitted, the setting are changed only for the authenticated user. - PrincipalArn *string `locationName:"principalArn" type:"string"` -} - -// String returns the string representation -func (s DeleteAccountSettingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAccountSettingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAccountSettingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAccountSettingInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteAccountSettingInput) SetName(v string) *DeleteAccountSettingInput { - s.Name = &v - return s -} - -// SetPrincipalArn sets the PrincipalArn field's value. -func (s *DeleteAccountSettingInput) SetPrincipalArn(v string) *DeleteAccountSettingInput { - s.PrincipalArn = &v - return s -} - -type DeleteAccountSettingOutput struct { - _ struct{} `type:"structure"` - - // The account setting for the specified principal ARN. - Setting *Setting `locationName:"setting" type:"structure"` -} - -// String returns the string representation -func (s DeleteAccountSettingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAccountSettingOutput) GoString() string { - return s.String() -} - -// SetSetting sets the Setting field's value. -func (s *DeleteAccountSettingOutput) SetSetting(v *Setting) *DeleteAccountSettingOutput { - s.Setting = v - return s -} - -type DeleteAttributesInput struct { - _ struct{} `type:"structure"` - - // The attributes to delete from your resource. You can specify up to 10 attributes - // per request. For custom attributes, specify the attribute name and target - // ID, but do not specify the value. If you specify the target ID using the - // short form, you must also specify the target type. - // - // Attributes is a required field - Attributes []*Attribute `locationName:"attributes" type:"list" required:"true"` - - // The short name or full Amazon Resource Name (ARN) of the cluster that contains - // the resource to delete attributes. If you do not specify a cluster, the default - // cluster is assumed. - Cluster *string `locationName:"cluster" type:"string"` -} - -// String returns the string representation -func (s DeleteAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAttributesInput"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.Attributes != nil { - for i, v := range s.Attributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *DeleteAttributesInput) SetAttributes(v []*Attribute) *DeleteAttributesInput { - s.Attributes = v - return s -} - -// SetCluster sets the Cluster field's value. -func (s *DeleteAttributesInput) SetCluster(v string) *DeleteAttributesInput { - s.Cluster = &v - return s -} - -type DeleteAttributesOutput struct { - _ struct{} `type:"structure"` - - // A list of attribute objects that were successfully deleted from your resource. - Attributes []*Attribute `locationName:"attributes" type:"list"` -} - -// String returns the string representation -func (s DeleteAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *DeleteAttributesOutput) SetAttributes(v []*Attribute) *DeleteAttributesOutput { - s.Attributes = v - return s -} - -type DeleteClusterInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster to delete. - // - // Cluster is a required field - Cluster *string `locationName:"cluster" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"} - if s.Cluster == nil { - invalidParams.Add(request.NewErrParamRequired("Cluster")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCluster sets the Cluster field's value. -func (s *DeleteClusterInput) SetCluster(v string) *DeleteClusterInput { - s.Cluster = &v - return s -} - -type DeleteClusterOutput struct { - _ struct{} `type:"structure"` - - // The full description of the deleted cluster. - Cluster *Cluster `locationName:"cluster" type:"structure"` -} - -// String returns the string representation -func (s DeleteClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *DeleteClusterOutput) SetCluster(v *Cluster) *DeleteClusterOutput { - s.Cluster = v - return s -} - -type DeleteServiceInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster that hosts - // the service to delete. If you do not specify a cluster, the default cluster - // is assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // If true, allows you to delete a service even if it has not been scaled down - // to zero tasks. It is only necessary to use this if the service is using the - // REPLICA scheduling strategy. - Force *bool `locationName:"force" type:"boolean"` - - // The name of the service to delete. - // - // Service is a required field - Service *string `locationName:"service" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteServiceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteServiceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteServiceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteServiceInput"} - if s.Service == nil { - invalidParams.Add(request.NewErrParamRequired("Service")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCluster sets the Cluster field's value. -func (s *DeleteServiceInput) SetCluster(v string) *DeleteServiceInput { - s.Cluster = &v - return s -} - -// SetForce sets the Force field's value. -func (s *DeleteServiceInput) SetForce(v bool) *DeleteServiceInput { - s.Force = &v - return s -} - -// SetService sets the Service field's value. -func (s *DeleteServiceInput) SetService(v string) *DeleteServiceInput { - s.Service = &v - return s -} - -type DeleteServiceOutput struct { - _ struct{} `type:"structure"` - - // The full description of the deleted service. - Service *Service `locationName:"service" type:"structure"` -} - -// String returns the string representation -func (s DeleteServiceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteServiceOutput) GoString() string { - return s.String() -} - -// SetService sets the Service field's value. -func (s *DeleteServiceOutput) SetService(v *Service) *DeleteServiceOutput { - s.Service = v - return s -} - -// The details of an Amazon ECS service deployment. This is used when a service -// uses the CODE_DEPLOY deployment controller type. -type Deployment struct { - _ struct{} `type:"structure"` - - // The Unix timestamp for when the service deployment was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The most recent desired count of tasks that was specified for the service - // to deploy or maintain. - DesiredCount *int64 `locationName:"desiredCount" type:"integer"` - - // The ID of the deployment. - Id *string `locationName:"id" type:"string"` - - // The launch type the tasks in the service are using. For more information, - // see Amazon ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) - // in the Amazon Elastic Container Service Developer Guide. - LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` - - // The VPC subnet and security group configuration for tasks that receive their - // own elastic network interface by using the awsvpc networking mode. - NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` - - // The number of tasks in the deployment that are in the PENDING status. - PendingCount *int64 `locationName:"pendingCount" type:"integer"` - - // The platform version on which your tasks in the service are running. A platform - // version is only specified for tasks using the Fargate launch type. If one - // is not specified, the LATEST platform version is used by default. For more - // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) - // in the Amazon Elastic Container Service Developer Guide. - PlatformVersion *string `locationName:"platformVersion" type:"string"` - - // The number of tasks in the deployment that are in the RUNNING status. - RunningCount *int64 `locationName:"runningCount" type:"integer"` - - // The status of the deployment. The following describes each state: - // - // PRIMARYThe most recent deployment of a service. - // - // ACTIVEA service deployment that still has running tasks, but are in the process - // of being replaced with a new PRIMARY deployment. - // - // INACTIVEA deployment that has been completely replaced. - Status *string `locationName:"status" type:"string"` - - // The most recent task definition that was specified for the tasks in the service - // to use. - TaskDefinition *string `locationName:"taskDefinition" type:"string"` - - // The Unix timestamp for when the service deployment was last updated. - UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp"` -} - -// 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 time.Time) *Deployment { - s.CreatedAt = &v - return s -} - -// SetDesiredCount sets the DesiredCount field's value. -func (s *Deployment) SetDesiredCount(v int64) *Deployment { - s.DesiredCount = &v - return s -} - -// SetId sets the Id field's value. -func (s *Deployment) SetId(v string) *Deployment { - s.Id = &v - return s -} - -// SetLaunchType sets the LaunchType field's value. -func (s *Deployment) SetLaunchType(v string) *Deployment { - s.LaunchType = &v - return s -} - -// SetNetworkConfiguration sets the NetworkConfiguration field's value. -func (s *Deployment) SetNetworkConfiguration(v *NetworkConfiguration) *Deployment { - s.NetworkConfiguration = v - return s -} - -// SetPendingCount sets the PendingCount field's value. -func (s *Deployment) SetPendingCount(v int64) *Deployment { - s.PendingCount = &v - return s -} - -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *Deployment) SetPlatformVersion(v string) *Deployment { - s.PlatformVersion = &v - return s -} - -// SetRunningCount sets the RunningCount field's value. -func (s *Deployment) SetRunningCount(v int64) *Deployment { - s.RunningCount = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Deployment) SetStatus(v string) *Deployment { - s.Status = &v - return s -} - -// SetTaskDefinition sets the TaskDefinition field's value. -func (s *Deployment) SetTaskDefinition(v string) *Deployment { - s.TaskDefinition = &v - return s -} - -// SetUpdatedAt sets the UpdatedAt field's value. -func (s *Deployment) SetUpdatedAt(v time.Time) *Deployment { - s.UpdatedAt = &v - return s -} - -// Optional deployment parameters that control how many tasks run during the -// deployment and the ordering of stopping and starting tasks. -type DeploymentConfiguration struct { - _ struct{} `type:"structure"` - - // If a service is using the rolling update (ECS) deployment type, the maximum - // percent parameter represents an upper limit on the number of tasks in a service - // that are allowed in the RUNNING or PENDING state during a deployment, as - // a percentage of the desired number of tasks (rounded down to the nearest - // integer), and while any container instances are in the DRAINING state if - // the service contains tasks using the EC2 launch type. This parameter enables - // you to define the deployment batch size. For example, if your service has - // a desired number of four tasks and a maximum percent value of 200%, the scheduler - // may start four new tasks before stopping the four older tasks (provided that - // the cluster resources required to do this are available). The default value - // for maximum percent is 200%. - // - // If a service is using the blue/green (CODE_DEPLOY) deployment type and tasks - // that use the EC2 launch type, the maximum percent value is set to the default - // value and is used to define the upper limit on the number of the tasks in - // the service that remain in the RUNNING state while the container instances - // are in the DRAINING state. If the tasks in the service use the Fargate launch - // type, the maximum percent value is not used, although it is returned when - // describing your service. - MaximumPercent *int64 `locationName:"maximumPercent" type:"integer"` - - // If a service is using the rolling update (ECS) deployment type, the minimum - // healthy percent represents a lower limit on the number of tasks in a service - // that must remain in the RUNNING state during a deployment, as a percentage - // of the desired number of tasks (rounded up to the nearest integer), and while - // any container instances are in the DRAINING state if the service contains - // tasks using the EC2 launch type. This parameter enables you to deploy without - // using additional cluster capacity. For example, if your service has a desired - // number of four tasks and a minimum healthy percent of 50%, the scheduler - // may stop two existing tasks to free up cluster capacity before starting two - // new tasks. Tasks for services that do not use a load balancer are considered - // healthy if they are in the RUNNING state; tasks for services that do use - // a load balancer are considered healthy if they are in the RUNNING state and - // they are reported as healthy by the load balancer. The default value for - // minimum healthy percent is 100%. - // - // If a service is using the blue/green (CODE_DEPLOY) deployment type and tasks - // that use the EC2 launch type, the minimum healthy percent value is set to - // the default value and is used to define the lower limit on the number of - // the tasks in the service that remain in the RUNNING state while the container - // instances are in the DRAINING state. If the tasks in the service use the - // Fargate launch type, the minimum healthy percent value is not used, although - // it is returned when describing your service. - MinimumHealthyPercent *int64 `locationName:"minimumHealthyPercent" type:"integer"` -} - -// String returns the string representation -func (s DeploymentConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeploymentConfiguration) GoString() string { - return s.String() -} - -// SetMaximumPercent sets the MaximumPercent field's value. -func (s *DeploymentConfiguration) SetMaximumPercent(v int64) *DeploymentConfiguration { - s.MaximumPercent = &v - return s -} - -// SetMinimumHealthyPercent sets the MinimumHealthyPercent field's value. -func (s *DeploymentConfiguration) SetMinimumHealthyPercent(v int64) *DeploymentConfiguration { - s.MinimumHealthyPercent = &v - return s -} - -// The deployment controller to use for the service. For more information, see -// Amazon ECS Deployment Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) -// in the Amazon Elastic Container Service Developer Guide. -type DeploymentController struct { - _ struct{} `type:"structure"` - - // The deployment controller type to use. - // - // There are two deployment controller types available: - // - // ECSThe rolling update (ECS) deployment type involves replacing the current - // running version of the container with the latest version. The number of containers - // Amazon ECS adds or removes from the service during a rolling update is controlled - // by adjusting the minimum and maximum number of healthy tasks allowed during - // a service deployment, as specified in the DeploymentConfiguration. - // - // CODE_DEPLOYThe blue/green (CODE_DEPLOY) deployment type uses the blue/green - // deployment model powered by AWS CodeDeploy, which allows you to verify a - // new deployment of a service before sending production traffic to it. For - // more information, see Amazon ECS Deployment Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) - // in the Amazon Elastic Container Service Developer Guide. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"DeploymentControllerType"` -} - -// String returns the string representation -func (s DeploymentController) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeploymentController) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeploymentController) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeploymentController"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetType sets the Type field's value. -func (s *DeploymentController) SetType(v string) *DeploymentController { - s.Type = &v - return s -} - -type DeregisterContainerInstanceInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster that hosts - // the container instance to deregister. If you do not specify a cluster, the - // default cluster is assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // The container instance ID or full ARN of the container instance to deregister. - // The ARN contains the arn:aws:ecs namespace, followed by the Region of the - // container instance, the AWS account ID of the container instance owner, the - // container-instance namespace, and then the container instance ID. For example, - // arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID. - // - // ContainerInstance is a required field - ContainerInstance *string `locationName:"containerInstance" type:"string" required:"true"` - - // Forces the deregistration of the container instance. If you have tasks running - // on the container instance when you deregister it with the force option, these - // tasks remain running until you terminate the instance or the tasks stop through - // some other means, but they are orphaned (no longer monitored or accounted - // for by Amazon ECS). If an orphaned task on your container instance is part - // of an Amazon ECS service, then the service scheduler starts another copy - // of that task, on a different container instance if possible. - // - // Any containers in orphaned service tasks that are registered with a Classic - // Load Balancer or an Application Load Balancer target group are deregistered. - // They begin connection draining according to the settings on the load balancer - // or target group. - Force *bool `locationName:"force" type:"boolean"` -} - -// String returns the string representation -func (s DeregisterContainerInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterContainerInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterContainerInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterContainerInstanceInput"} - if s.ContainerInstance == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerInstance")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCluster sets the Cluster field's value. -func (s *DeregisterContainerInstanceInput) SetCluster(v string) *DeregisterContainerInstanceInput { - s.Cluster = &v - return s -} - -// SetContainerInstance sets the ContainerInstance field's value. -func (s *DeregisterContainerInstanceInput) SetContainerInstance(v string) *DeregisterContainerInstanceInput { - s.ContainerInstance = &v - return s -} - -// SetForce sets the Force field's value. -func (s *DeregisterContainerInstanceInput) SetForce(v bool) *DeregisterContainerInstanceInput { - s.Force = &v - return s -} - -type DeregisterContainerInstanceOutput struct { - _ struct{} `type:"structure"` - - // The container instance that was deregistered. - ContainerInstance *ContainerInstance `locationName:"containerInstance" type:"structure"` -} - -// String returns the string representation -func (s DeregisterContainerInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterContainerInstanceOutput) GoString() string { - return s.String() -} - -// SetContainerInstance sets the ContainerInstance field's value. -func (s *DeregisterContainerInstanceOutput) SetContainerInstance(v *ContainerInstance) *DeregisterContainerInstanceOutput { - s.ContainerInstance = v - return s -} - -type DeregisterTaskDefinitionInput struct { - _ struct{} `type:"structure"` - - // The family and revision (family:revision) or full Amazon Resource Name (ARN) - // of the task definition to deregister. You must specify a revision. - // - // TaskDefinition is a required field - TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterTaskDefinitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterTaskDefinitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterTaskDefinitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterTaskDefinitionInput"} - if s.TaskDefinition == nil { - invalidParams.Add(request.NewErrParamRequired("TaskDefinition")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTaskDefinition sets the TaskDefinition field's value. -func (s *DeregisterTaskDefinitionInput) SetTaskDefinition(v string) *DeregisterTaskDefinitionInput { - s.TaskDefinition = &v - return s -} - -type DeregisterTaskDefinitionOutput struct { - _ struct{} `type:"structure"` - - // The full description of the deregistered task. - TaskDefinition *TaskDefinition `locationName:"taskDefinition" type:"structure"` -} - -// String returns the string representation -func (s DeregisterTaskDefinitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterTaskDefinitionOutput) GoString() string { - return s.String() -} - -// SetTaskDefinition sets the TaskDefinition field's value. -func (s *DeregisterTaskDefinitionOutput) SetTaskDefinition(v *TaskDefinition) *DeregisterTaskDefinitionOutput { - s.TaskDefinition = v - return s -} - -type DescribeClustersInput struct { - _ struct{} `type:"structure"` - - // A list of up to 100 cluster names or full cluster Amazon Resource Name (ARN) - // entries. If you do not specify a cluster, the default cluster is assumed. - Clusters []*string `locationName:"clusters" type:"list"` - - // Additional information about your clusters to be separated by launch type, - // including: - // - // * runningEC2TasksCount - // - // * runningFargateTasksCount - // - // * pendingEC2TasksCount - // - // * pendingFargateTasksCount - // - // * activeEC2ServiceCount - // - // * activeFargateServiceCount - // - // * drainingEC2ServiceCount - // - // * drainingFargateServiceCount - Include []*string `locationName:"include" type:"list"` -} - -// String returns the string representation -func (s DescribeClustersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClustersInput) GoString() string { - return s.String() -} - -// SetClusters sets the Clusters field's value. -func (s *DescribeClustersInput) SetClusters(v []*string) *DescribeClustersInput { - s.Clusters = v - return s -} - -// SetInclude sets the Include field's value. -func (s *DescribeClustersInput) SetInclude(v []*string) *DescribeClustersInput { - s.Include = v - return s -} - -type DescribeClustersOutput struct { - _ struct{} `type:"structure"` - - // The list of clusters. - Clusters []*Cluster `locationName:"clusters" type:"list"` - - // Any failures associated with the call. - Failures []*Failure `locationName:"failures" type:"list"` -} - -// String returns the string representation -func (s DescribeClustersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClustersOutput) GoString() string { - return s.String() -} - -// SetClusters sets the Clusters field's value. -func (s *DescribeClustersOutput) SetClusters(v []*Cluster) *DescribeClustersOutput { - s.Clusters = v - return s -} - -// SetFailures sets the Failures field's value. -func (s *DescribeClustersOutput) SetFailures(v []*Failure) *DescribeClustersOutput { - s.Failures = v - return s -} - -type DescribeContainerInstancesInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster that hosts - // the container instances to describe. If you do not specify a cluster, the - // default cluster is assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // A list of up to 100 container instance IDs or full Amazon Resource Name (ARN) - // entries. - // - // ContainerInstances is a required field - ContainerInstances []*string `locationName:"containerInstances" type:"list" required:"true"` - - // Specifies whether you want to see the resource tags for the container instance. - // If TAGS is specified, the tags are included in the response. If this field - // is omitted, tags are not included in the response. - Include []*string `locationName:"include" type:"list"` -} - -// String returns the string representation -func (s DescribeContainerInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeContainerInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeContainerInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeContainerInstancesInput"} - if s.ContainerInstances == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerInstances")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCluster sets the Cluster field's value. -func (s *DescribeContainerInstancesInput) SetCluster(v string) *DescribeContainerInstancesInput { - s.Cluster = &v - return s -} - -// SetContainerInstances sets the ContainerInstances field's value. -func (s *DescribeContainerInstancesInput) SetContainerInstances(v []*string) *DescribeContainerInstancesInput { - s.ContainerInstances = v - return s -} - -// SetInclude sets the Include field's value. -func (s *DescribeContainerInstancesInput) SetInclude(v []*string) *DescribeContainerInstancesInput { - s.Include = v - return s -} - -type DescribeContainerInstancesOutput struct { - _ struct{} `type:"structure"` - - // The list of container instances. - ContainerInstances []*ContainerInstance `locationName:"containerInstances" type:"list"` - - // Any failures associated with the call. - Failures []*Failure `locationName:"failures" type:"list"` -} - -// String returns the string representation -func (s DescribeContainerInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeContainerInstancesOutput) GoString() string { - return s.String() -} - -// SetContainerInstances sets the ContainerInstances field's value. -func (s *DescribeContainerInstancesOutput) SetContainerInstances(v []*ContainerInstance) *DescribeContainerInstancesOutput { - s.ContainerInstances = v - return s -} - -// SetFailures sets the Failures field's value. -func (s *DescribeContainerInstancesOutput) SetFailures(v []*Failure) *DescribeContainerInstancesOutput { - s.Failures = v - return s -} - -type DescribeServicesInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN)the cluster that hosts the - // service to describe. If you do not specify a cluster, the default cluster - // is assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // Specifies whether you want to see the resource tags for the service. If TAGS - // is specified, the tags are included in the response. If this field is omitted, - // tags are not included in the response. - Include []*string `locationName:"include" type:"list"` - - // A list of services to describe. You may specify up to 10 services to describe - // in a single operation. - // - // Services is a required field - Services []*string `locationName:"services" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeServicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeServicesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeServicesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeServicesInput"} - if s.Services == nil { - invalidParams.Add(request.NewErrParamRequired("Services")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCluster sets the Cluster field's value. -func (s *DescribeServicesInput) SetCluster(v string) *DescribeServicesInput { - s.Cluster = &v - return s -} - -// SetInclude sets the Include field's value. -func (s *DescribeServicesInput) SetInclude(v []*string) *DescribeServicesInput { - s.Include = v - return s -} - -// SetServices sets the Services field's value. -func (s *DescribeServicesInput) SetServices(v []*string) *DescribeServicesInput { - s.Services = v - return s -} - -type DescribeServicesOutput struct { - _ struct{} `type:"structure"` - - // Any failures associated with the call. - Failures []*Failure `locationName:"failures" type:"list"` - - // The list of services described. - Services []*Service `locationName:"services" type:"list"` -} - -// String returns the string representation -func (s DescribeServicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeServicesOutput) GoString() string { - return s.String() -} - -// SetFailures sets the Failures field's value. -func (s *DescribeServicesOutput) SetFailures(v []*Failure) *DescribeServicesOutput { - s.Failures = v - return s -} - -// SetServices sets the Services field's value. -func (s *DescribeServicesOutput) SetServices(v []*Service) *DescribeServicesOutput { - s.Services = v - return s -} - -type DescribeTaskDefinitionInput struct { - _ struct{} `type:"structure"` - - // Specifies whether to see the resource tags for the task definition. If TAGS - // is specified, the tags are included in the response. If this field is omitted, - // tags are not included in the response. - Include []*string `locationName:"include" type:"list"` - - // The family for the latest ACTIVE revision, family and revision (family:revision) - // for a specific revision in the family, or full Amazon Resource Name (ARN) - // of the task definition to describe. - // - // TaskDefinition is a required field - TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeTaskDefinitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTaskDefinitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTaskDefinitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTaskDefinitionInput"} - if s.TaskDefinition == nil { - invalidParams.Add(request.NewErrParamRequired("TaskDefinition")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInclude sets the Include field's value. -func (s *DescribeTaskDefinitionInput) SetInclude(v []*string) *DescribeTaskDefinitionInput { - s.Include = v - return s -} - -// SetTaskDefinition sets the TaskDefinition field's value. -func (s *DescribeTaskDefinitionInput) SetTaskDefinition(v string) *DescribeTaskDefinitionInput { - s.TaskDefinition = &v - return s -} - -type DescribeTaskDefinitionOutput struct { - _ struct{} `type:"structure"` - - // The metadata that is applied to the task definition to help you categorize - // and organize them. Each tag consists of a key and an optional value, both - // of which you define. Tag keys can have a maximum character length of 128 - // characters, and tag values can have a maximum length of 256 characters. - Tags []*Tag `locationName:"tags" type:"list"` - - // The full task definition description. - TaskDefinition *TaskDefinition `locationName:"taskDefinition" type:"structure"` -} - -// String returns the string representation -func (s DescribeTaskDefinitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTaskDefinitionOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *DescribeTaskDefinitionOutput) SetTags(v []*Tag) *DescribeTaskDefinitionOutput { - s.Tags = v - return s -} - -// SetTaskDefinition sets the TaskDefinition field's value. -func (s *DescribeTaskDefinitionOutput) SetTaskDefinition(v *TaskDefinition) *DescribeTaskDefinitionOutput { - s.TaskDefinition = v - return s -} - -type DescribeTasksInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster that hosts - // the task to describe. If you do not specify a cluster, the default cluster - // is assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // Specifies whether you want to see the resource tags for the task. If TAGS - // is specified, the tags are included in the response. If this field is omitted, - // tags are not included in the response. - Include []*string `locationName:"include" type:"list"` - - // A list of up to 100 task IDs or full ARN entries. - // - // Tasks is a required field - Tasks []*string `locationName:"tasks" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTasksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTasksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTasksInput"} - if s.Tasks == nil { - invalidParams.Add(request.NewErrParamRequired("Tasks")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCluster sets the Cluster field's value. -func (s *DescribeTasksInput) SetCluster(v string) *DescribeTasksInput { - s.Cluster = &v - return s -} - -// SetInclude sets the Include field's value. -func (s *DescribeTasksInput) SetInclude(v []*string) *DescribeTasksInput { - s.Include = v - return s -} - -// SetTasks sets the Tasks field's value. -func (s *DescribeTasksInput) SetTasks(v []*string) *DescribeTasksInput { - s.Tasks = v - return s -} - -type DescribeTasksOutput struct { - _ struct{} `type:"structure"` - - // Any failures associated with the call. - Failures []*Failure `locationName:"failures" type:"list"` - - // The list of tasks. - Tasks []*Task `locationName:"tasks" type:"list"` -} - -// String returns the string representation -func (s DescribeTasksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTasksOutput) GoString() string { - return s.String() -} - -// SetFailures sets the Failures field's value. -func (s *DescribeTasksOutput) SetFailures(v []*Failure) *DescribeTasksOutput { - s.Failures = v - return s -} - -// SetTasks sets the Tasks field's value. -func (s *DescribeTasksOutput) SetTasks(v []*Task) *DescribeTasksOutput { - s.Tasks = v - return s -} - -// An object representing a container instance host device. -type Device struct { - _ struct{} `type:"structure"` - - // The path inside the container at which to expose the host device. - ContainerPath *string `locationName:"containerPath" type:"string"` - - // The path for the device on the host container instance. - // - // HostPath is a required field - HostPath *string `locationName:"hostPath" type:"string" required:"true"` - - // The explicit permissions to provide to the container for the device. By default, - // the container has permissions for read, write, and mknod for the device. - Permissions []*string `locationName:"permissions" type:"list"` -} - -// 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.HostPath == nil { - invalidParams.Add(request.NewErrParamRequired("HostPath")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerPath sets the ContainerPath field's value. -func (s *Device) SetContainerPath(v string) *Device { - s.ContainerPath = &v - return s -} - -// SetHostPath sets the HostPath field's value. -func (s *Device) SetHostPath(v string) *Device { - s.HostPath = &v - return s -} - -// SetPermissions sets the Permissions field's value. -func (s *Device) SetPermissions(v []*string) *Device { - s.Permissions = v - return s -} - -type DiscoverPollEndpointInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster to which - // the container instance belongs. - Cluster *string `locationName:"cluster" type:"string"` - - // The container instance ID or full ARN of the container instance. The ARN - // contains the arn:aws:ecs namespace, followed by the Region of the container - // instance, the AWS account ID of the container instance owner, the container-instance - // namespace, and then the container instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID. - ContainerInstance *string `locationName:"containerInstance" type:"string"` -} - -// String returns the string representation -func (s DiscoverPollEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiscoverPollEndpointInput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *DiscoverPollEndpointInput) SetCluster(v string) *DiscoverPollEndpointInput { - s.Cluster = &v - return s -} - -// SetContainerInstance sets the ContainerInstance field's value. -func (s *DiscoverPollEndpointInput) SetContainerInstance(v string) *DiscoverPollEndpointInput { - s.ContainerInstance = &v - return s -} - -type DiscoverPollEndpointOutput struct { - _ struct{} `type:"structure"` - - // The endpoint for the Amazon ECS agent to poll. - Endpoint *string `locationName:"endpoint" type:"string"` - - // The telemetry endpoint for the Amazon ECS agent. - TelemetryEndpoint *string `locationName:"telemetryEndpoint" type:"string"` -} - -// String returns the string representation -func (s DiscoverPollEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiscoverPollEndpointOutput) GoString() string { - return s.String() -} - -// SetEndpoint sets the Endpoint field's value. -func (s *DiscoverPollEndpointOutput) SetEndpoint(v string) *DiscoverPollEndpointOutput { - s.Endpoint = &v - return s -} - -// SetTelemetryEndpoint sets the TelemetryEndpoint field's value. -func (s *DiscoverPollEndpointOutput) SetTelemetryEndpoint(v string) *DiscoverPollEndpointOutput { - s.TelemetryEndpoint = &v - return s -} - -// This parameter is specified when you are using Docker volumes. Docker volumes -// are only supported when you are using the EC2 launch type. Windows containers -// only support the use of the local driver. To use bind mounts, specify a host -// instead. -type DockerVolumeConfiguration struct { - _ struct{} `type:"structure"` - - // If this value is true, the Docker volume is created if it does not already - // exist. - // - // This field is only used if the scope is shared. - Autoprovision *bool `locationName:"autoprovision" type:"boolean"` - - // The Docker volume driver to use. The driver value must match the driver name - // provided by Docker because it is used for task placement. If the driver was - // installed using the Docker plugin CLI, use docker plugin ls to retrieve the - // driver name from your container instance. If the driver was installed using - // another method, use Docker plugin discovery to retrieve the driver name. - // For more information, see Docker plugin discovery (https://docs.docker.com/engine/extend/plugin_api/#plugin-discovery). - // This parameter maps to Driver in the Create a volume (https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the xxdriver option to docker volume create (https://docs.docker.com/engine/reference/commandline/volume_create/). - Driver *string `locationName:"driver" type:"string"` - - // A map of Docker driver-specific options passed through. This parameter maps - // to DriverOpts in the Create a volume (https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the xxopt option to docker volume create (https://docs.docker.com/engine/reference/commandline/volume_create/). - DriverOpts map[string]*string `locationName:"driverOpts" type:"map"` - - // Custom metadata to add to your Docker volume. This parameter maps to Labels - // in the Create a volume (https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the xxlabel option to docker volume create (https://docs.docker.com/engine/reference/commandline/volume_create/). - Labels map[string]*string `locationName:"labels" type:"map"` - - // The scope for the Docker volume that determines its lifecycle. Docker volumes - // that are scoped to a task are automatically provisioned when the task starts - // and destroyed when the task stops. Docker volumes that are scoped as shared - // persist after the task stops. - Scope *string `locationName:"scope" type:"string" enum:"Scope"` -} - -// String returns the string representation -func (s DockerVolumeConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DockerVolumeConfiguration) GoString() string { - return s.String() -} - -// SetAutoprovision sets the Autoprovision field's value. -func (s *DockerVolumeConfiguration) SetAutoprovision(v bool) *DockerVolumeConfiguration { - s.Autoprovision = &v - return s -} - -// SetDriver sets the Driver field's value. -func (s *DockerVolumeConfiguration) SetDriver(v string) *DockerVolumeConfiguration { - s.Driver = &v - return s -} - -// SetDriverOpts sets the DriverOpts field's value. -func (s *DockerVolumeConfiguration) SetDriverOpts(v map[string]*string) *DockerVolumeConfiguration { - s.DriverOpts = v - return s -} - -// SetLabels sets the Labels field's value. -func (s *DockerVolumeConfiguration) SetLabels(v map[string]*string) *DockerVolumeConfiguration { - s.Labels = v - return s -} - -// SetScope sets the Scope field's value. -func (s *DockerVolumeConfiguration) SetScope(v string) *DockerVolumeConfiguration { - s.Scope = &v - return s -} - -// A failed resource. -type Failure struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the failed resource. - Arn *string `locationName:"arn" type:"string"` - - // The reason for the failure. - Reason *string `locationName:"reason" type:"string"` -} - -// String returns the string representation -func (s Failure) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Failure) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Failure) SetArn(v string) *Failure { - s.Arn = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *Failure) SetReason(v string) *Failure { - s.Reason = &v - return s -} - -// An object representing a container health check. Health check parameters -// that are specified in a container definition override any Docker health checks -// that exist in the container image (such as those specified in a parent image -// or from the image's Dockerfile). -// -// The following are notes about container health check support: -// -// * Container health checks require version 1.17.0 or greater of the Amazon -// ECS container agent. For more information, see Updating the Amazon ECS -// Container Agent (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html). -// -// * Container health checks are supported for Fargate tasks if you are using -// platform version 1.1.0 or greater. For more information, see AWS Fargate -// Platform Versions (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html). -// -// * Container health checks are not supported for tasks that are part of -// a service that is configured to use a Classic Load Balancer. -type HealthCheck struct { - _ struct{} `type:"structure"` - - // A string array representing the command that the container runs to determine - // if it is healthy. The string array must start with CMD to execute the command - // arguments directly, or CMD-SHELL to run the command with the container's - // default shell. For example: - // - // [ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ] - // - // An exit code of 0 indicates success, and non-zero exit code indicates failure. - // For more information, see HealthCheck in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/). - // - // Command is a required field - Command []*string `locationName:"command" type:"list" required:"true"` - - // The time period in seconds between each health check execution. You may specify - // between 5 and 300 seconds. The default value is 30 seconds. - Interval *int64 `locationName:"interval" type:"integer"` - - // The number of times to retry a failed health check before the container is - // considered unhealthy. You may specify between 1 and 10 retries. The default - // value is 3. - Retries *int64 `locationName:"retries" type:"integer"` - - // The optional grace period within which to provide containers time to bootstrap - // before failed health checks count towards the maximum number of retries. - // You may specify between 0 and 300 seconds. The startPeriod is disabled by - // default. - // - // If a health check succeeds within the startPeriod, then the container is - // considered healthy and any subsequent failures count toward the maximum number - // of retries. - StartPeriod *int64 `locationName:"startPeriod" type:"integer"` - - // The time period in seconds to wait for a health check to succeed before it - // is considered a failure. You may specify between 2 and 60 seconds. The default - // value is 5. - Timeout *int64 `locationName:"timeout" type:"integer"` -} - -// String returns the string representation -func (s HealthCheck) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HealthCheck) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HealthCheck) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HealthCheck"} - if s.Command == nil { - invalidParams.Add(request.NewErrParamRequired("Command")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCommand sets the Command field's value. -func (s *HealthCheck) SetCommand(v []*string) *HealthCheck { - s.Command = v - return s -} - -// SetInterval sets the Interval field's value. -func (s *HealthCheck) SetInterval(v int64) *HealthCheck { - s.Interval = &v - return s -} - -// SetRetries sets the Retries field's value. -func (s *HealthCheck) SetRetries(v int64) *HealthCheck { - s.Retries = &v - return s -} - -// SetStartPeriod sets the StartPeriod field's value. -func (s *HealthCheck) SetStartPeriod(v int64) *HealthCheck { - s.StartPeriod = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *HealthCheck) SetTimeout(v int64) *HealthCheck { - s.Timeout = &v - return s -} - -// Hostnames and IP address entries that are added to the /etc/hosts file of -// a container via the extraHosts parameter of its ContainerDefinition. -type HostEntry struct { - _ struct{} `type:"structure"` - - // The hostname to use in the /etc/hosts entry. - // - // Hostname is a required field - Hostname *string `locationName:"hostname" type:"string" required:"true"` - - // The IP address to use in the /etc/hosts entry. - // - // IpAddress is a required field - IpAddress *string `locationName:"ipAddress" type:"string" required:"true"` -} - -// String returns the string representation -func (s HostEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HostEntry) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HostEntry) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HostEntry"} - if s.Hostname == nil { - invalidParams.Add(request.NewErrParamRequired("Hostname")) - } - if s.IpAddress == nil { - invalidParams.Add(request.NewErrParamRequired("IpAddress")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostname sets the Hostname field's value. -func (s *HostEntry) SetHostname(v string) *HostEntry { - s.Hostname = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *HostEntry) SetIpAddress(v string) *HostEntry { - s.IpAddress = &v - return s -} - -// Details on a container instance bind mount host volume. -type HostVolumeProperties struct { - _ struct{} `type:"structure"` - - // When the host parameter is used, specify a sourcePath to declare the path - // on the host container instance that is presented to the container. If this - // parameter is empty, then the Docker daemon has assigned a host path for you. - // If the host parameter contains a sourcePath file location, then the data - // volume persists at the specified location on the host container instance - // until you delete it manually. If the sourcePath value does not exist on the - // host container instance, the Docker daemon creates it. If the location does - // exist, the contents of the source path folder are exported. - // - // If you are using the Fargate launch type, the sourcePath parameter is not - // supported. - SourcePath *string `locationName:"sourcePath" type:"string"` -} - -// String returns the string representation -func (s HostVolumeProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HostVolumeProperties) GoString() string { - return s.String() -} - -// SetSourcePath sets the SourcePath field's value. -func (s *HostVolumeProperties) SetSourcePath(v string) *HostVolumeProperties { - s.SourcePath = &v - return s -} - -// The Linux capabilities for the container that are added to or dropped from -// the default configuration provided by Docker. For more information on the -// default capabilities and the non-default available capabilities, see Runtime -// privilege and Linux capabilities (https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities) -// in the Docker run reference. For more detailed information on these Linux -// capabilities, see the capabilities(7) (http://man7.org/linux/man-pages/man7/capabilities.7.html) -// Linux manual page. -type KernelCapabilities struct { - _ struct{} `type:"structure"` - - // The Linux capabilities for the container that have been added to the default - // configuration provided by Docker. This parameter maps to CapAdd in the Create - // a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --cap-add option to docker run (https://docs.docker.com/engine/reference/run/). - // - // If you are using tasks that use the Fargate launch type, the add parameter - // is not supported. - // - // Valid values: "ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | - // "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" - // | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" - // | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" - // | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" - // | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | - // "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" | - // "WAKE_ALARM" - Add []*string `locationName:"add" type:"list"` - - // The Linux capabilities for the container that have been removed from the - // default configuration provided by Docker. This parameter maps to CapDrop - // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --cap-drop option to docker run (https://docs.docker.com/engine/reference/run/). - // - // Valid values: "ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | - // "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" - // | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" - // | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" - // | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" - // | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | - // "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" | - // "WAKE_ALARM" - Drop []*string `locationName:"drop" type:"list"` -} - -// String returns the string representation -func (s KernelCapabilities) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KernelCapabilities) GoString() string { - return s.String() -} - -// SetAdd sets the Add field's value. -func (s *KernelCapabilities) SetAdd(v []*string) *KernelCapabilities { - s.Add = v - return s -} - -// SetDrop sets the Drop field's value. -func (s *KernelCapabilities) SetDrop(v []*string) *KernelCapabilities { - s.Drop = v - return s -} - -// A key-value pair object. -type KeyValuePair struct { - _ struct{} `type:"structure"` - - // The name of the key-value pair. For environment variables, this is the name - // of the environment variable. - Name *string `locationName:"name" type:"string"` - - // The value of the key-value pair. For environment variables, this is the value - // of the environment variable. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s KeyValuePair) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KeyValuePair) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *KeyValuePair) SetName(v string) *KeyValuePair { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *KeyValuePair) SetValue(v string) *KeyValuePair { - s.Value = &v - return s -} - -// Linux-specific options that are applied to the container, such as Linux KernelCapabilities. -type LinuxParameters struct { - _ struct{} `type:"structure"` - - // The Linux capabilities for the container that are added to or dropped from - // the default configuration provided by Docker. - // - // If you are using tasks that use the Fargate launch type, capabilities is - // supported but the add parameter is not supported. - Capabilities *KernelCapabilities `locationName:"capabilities" type:"structure"` - - // Any host devices to expose to the container. This parameter maps to Devices - // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --device option to docker run (https://docs.docker.com/engine/reference/run/). - // - // If you are using tasks that use the Fargate launch type, the devices parameter - // is not supported. - Devices []*Device `locationName:"devices" type:"list"` - - // Run an init process inside the container that forwards signals and reaps - // processes. This parameter maps to the --init option to docker run (https://docs.docker.com/engine/reference/run/). - // This parameter requires version 1.25 of the Docker Remote API or greater - // on your container instance. To check the Docker Remote API version on your - // container instance, log in to your container instance and run the following - // command: sudo docker version --format '{{.Server.APIVersion}}' - InitProcessEnabled *bool `locationName:"initProcessEnabled" type:"boolean"` - - // The value for the size (in MiB) of the /dev/shm volume. This parameter maps - // to the --shm-size option to docker run (https://docs.docker.com/engine/reference/run/). - // - // If you are using tasks that use the Fargate launch type, the sharedMemorySize - // parameter is not supported. - SharedMemorySize *int64 `locationName:"sharedMemorySize" type:"integer"` - - // The container path, mount options, and size (in MiB) of the tmpfs mount. - // This parameter maps to the --tmpfs option to docker run (https://docs.docker.com/engine/reference/run/). - // - // If you are using tasks that use the Fargate launch type, the tmpfs parameter - // is not supported. - Tmpfs []*Tmpfs `locationName:"tmpfs" type:"list"` -} - -// String returns the string representation -func (s LinuxParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LinuxParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LinuxParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LinuxParameters"} - 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 s.Tmpfs != nil { - for i, v := range s.Tmpfs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tmpfs", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCapabilities sets the Capabilities field's value. -func (s *LinuxParameters) SetCapabilities(v *KernelCapabilities) *LinuxParameters { - s.Capabilities = v - return s -} - -// SetDevices sets the Devices field's value. -func (s *LinuxParameters) SetDevices(v []*Device) *LinuxParameters { - s.Devices = v - return s -} - -// SetInitProcessEnabled sets the InitProcessEnabled field's value. -func (s *LinuxParameters) SetInitProcessEnabled(v bool) *LinuxParameters { - s.InitProcessEnabled = &v - return s -} - -// SetSharedMemorySize sets the SharedMemorySize field's value. -func (s *LinuxParameters) SetSharedMemorySize(v int64) *LinuxParameters { - s.SharedMemorySize = &v - return s -} - -// SetTmpfs sets the Tmpfs field's value. -func (s *LinuxParameters) SetTmpfs(v []*Tmpfs) *LinuxParameters { - s.Tmpfs = v - return s -} - -type ListAccountSettingsInput struct { - _ struct{} `type:"structure"` - - // Specifies whether to return the effective settings. If true, the account - // settings for the root user or the default setting for the principalArn. If - // false, the account settings for the principalArn are returned if they are - // set. Otherwise, no account settings are returned. - EffectiveSettings *bool `locationName:"effectiveSettings" type:"boolean"` - - // The maximum number of account setting results returned by ListAccountSettings - // in paginated output. When this parameter is used, ListAccountSettings only - // returns maxResults results in a single page along with a nextToken response - // element. The remaining results of the initial request can be seen by sending - // another ListAccountSettings request with the returned nextToken value. This - // value can be between 1 and 10. If this parameter is not used, then ListAccountSettings - // returns up to 10 results and a nextToken value if applicable. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The resource name you want to list the account settings for. - Name *string `locationName:"name" type:"string" enum:"SettingName"` - - // The nextToken value returned from a previous paginated ListAccountSettings - // request where maxResults was used and the results exceeded the value of that - // parameter. Pagination continues from the end of the previous results that - // returned the nextToken value. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `locationName:"nextToken" type:"string"` - - // The ARN of the principal, which can be an IAM user, IAM role, or the root - // user. If this field is omitted, the account settings are listed only for - // the authenticated user. - PrincipalArn *string `locationName:"principalArn" type:"string"` - - // The value of the account settings with which to filter results. You must - // also specify an account setting name to use this parameter. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s ListAccountSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAccountSettingsInput) GoString() string { - return s.String() -} - -// SetEffectiveSettings sets the EffectiveSettings field's value. -func (s *ListAccountSettingsInput) SetEffectiveSettings(v bool) *ListAccountSettingsInput { - s.EffectiveSettings = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAccountSettingsInput) SetMaxResults(v int64) *ListAccountSettingsInput { - s.MaxResults = &v - return s -} - -// SetName sets the Name field's value. -func (s *ListAccountSettingsInput) SetName(v string) *ListAccountSettingsInput { - s.Name = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAccountSettingsInput) SetNextToken(v string) *ListAccountSettingsInput { - s.NextToken = &v - return s -} - -// SetPrincipalArn sets the PrincipalArn field's value. -func (s *ListAccountSettingsInput) SetPrincipalArn(v string) *ListAccountSettingsInput { - s.PrincipalArn = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ListAccountSettingsInput) SetValue(v string) *ListAccountSettingsInput { - s.Value = &v - return s -} - -type ListAccountSettingsOutput struct { - _ struct{} `type:"structure"` - - // The nextToken value to include in a future ListAccountSettings request. When - // the results of a ListAccountSettings request exceed maxResults, this value - // can be used to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // The account settings for the resource. - Settings []*Setting `locationName:"settings" type:"list"` -} - -// String returns the string representation -func (s ListAccountSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAccountSettingsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAccountSettingsOutput) SetNextToken(v string) *ListAccountSettingsOutput { - s.NextToken = &v - return s -} - -// SetSettings sets the Settings field's value. -func (s *ListAccountSettingsOutput) SetSettings(v []*Setting) *ListAccountSettingsOutput { - s.Settings = v - return s -} - -type ListAttributesInput struct { - _ struct{} `type:"structure"` - - // The name of the attribute with which to filter the results. - AttributeName *string `locationName:"attributeName" type:"string"` - - // The value of the attribute with which to filter results. You must also specify - // an attribute name to use this parameter. - AttributeValue *string `locationName:"attributeValue" type:"string"` - - // The short name or full Amazon Resource Name (ARN) of the cluster to list - // attributes. If you do not specify a cluster, the default cluster is assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // The maximum number of cluster results returned by ListAttributes in paginated - // output. When this parameter is used, ListAttributes only returns maxResults - // results in a single page along with a nextToken response element. The remaining - // results of the initial request can be seen by sending another ListAttributes - // request with the returned nextToken value. This value can be between 1 and - // 100. If this parameter is not used, then ListAttributes returns up to 100 - // results and a nextToken value if applicable. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The nextToken value returned from a previous paginated ListAttributes request - // where maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `locationName:"nextToken" type:"string"` - - // The type of the target with which to list attributes. - // - // TargetType is a required field - TargetType *string `locationName:"targetType" type:"string" required:"true" enum:"TargetType"` -} - -// String returns the string representation -func (s ListAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAttributesInput"} - if s.TargetType == nil { - invalidParams.Add(request.NewErrParamRequired("TargetType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeName sets the AttributeName field's value. -func (s *ListAttributesInput) SetAttributeName(v string) *ListAttributesInput { - s.AttributeName = &v - return s -} - -// SetAttributeValue sets the AttributeValue field's value. -func (s *ListAttributesInput) SetAttributeValue(v string) *ListAttributesInput { - s.AttributeValue = &v - return s -} - -// SetCluster sets the Cluster field's value. -func (s *ListAttributesInput) SetCluster(v string) *ListAttributesInput { - s.Cluster = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAttributesInput) SetMaxResults(v int64) *ListAttributesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAttributesInput) SetNextToken(v string) *ListAttributesInput { - s.NextToken = &v - return s -} - -// SetTargetType sets the TargetType field's value. -func (s *ListAttributesInput) SetTargetType(v string) *ListAttributesInput { - s.TargetType = &v - return s -} - -type ListAttributesOutput struct { - _ struct{} `type:"structure"` - - // A list of attribute objects that meet the criteria of the request. - Attributes []*Attribute `locationName:"attributes" type:"list"` - - // The nextToken value to include in a future ListAttributes request. When the - // results of a ListAttributes request exceed maxResults, this value can be - // used to retrieve the next page of results. This value is null when there - // are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *ListAttributesOutput) SetAttributes(v []*Attribute) *ListAttributesOutput { - s.Attributes = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAttributesOutput) SetNextToken(v string) *ListAttributesOutput { - s.NextToken = &v - return s -} - -type ListClustersInput struct { - _ struct{} `type:"structure"` - - // The maximum number of cluster results returned by ListClusters in paginated - // output. When this parameter is used, ListClusters only returns maxResults - // results in a single page along with a nextToken response element. The remaining - // results of the initial request can be seen by sending another ListClusters - // request with the returned nextToken value. This value can be between 1 and - // 100. If this parameter is not used, then ListClusters returns up to 100 results - // and a nextToken value if applicable. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The nextToken value returned from a previous paginated ListClusters request - // where maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListClustersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListClustersInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListClustersInput) SetMaxResults(v int64) *ListClustersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListClustersInput) SetNextToken(v string) *ListClustersInput { - s.NextToken = &v - return s -} - -type ListClustersOutput struct { - _ struct{} `type:"structure"` - - // The list of full Amazon Resource Name (ARN) entries for each cluster associated - // with your account. - ClusterArns []*string `locationName:"clusterArns" type:"list"` - - // The nextToken value to include in a future ListClusters request. When the - // results of a ListClusters request exceed maxResults, this value can be used - // to retrieve the next page of results. This value is null when there are no - // more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListClustersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListClustersOutput) GoString() string { - return s.String() -} - -// SetClusterArns sets the ClusterArns field's value. -func (s *ListClustersOutput) SetClusterArns(v []*string) *ListClustersOutput { - s.ClusterArns = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListClustersOutput) SetNextToken(v string) *ListClustersOutput { - s.NextToken = &v - return s -} - -type ListContainerInstancesInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster that hosts - // the container instances to list. If you do not specify a cluster, the default - // cluster is assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // You can filter the results of a ListContainerInstances operation with cluster - // query language statements. For more information, see Cluster Query Language - // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) - // in the Amazon Elastic Container Service Developer Guide. - Filter *string `locationName:"filter" type:"string"` - - // The maximum number of container instance results returned by ListContainerInstances - // in paginated output. When this parameter is used, ListContainerInstances - // only returns maxResults results in a single page along with a nextToken response - // element. The remaining results of the initial request can be seen by sending - // another ListContainerInstances request with the returned nextToken value. - // This value can be between 1 and 100. If this parameter is not used, then - // ListContainerInstances returns up to 100 results and a nextToken value if - // applicable. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The nextToken value returned from a previous paginated ListContainerInstances - // request where maxResults was used and the results exceeded the value of that - // parameter. Pagination continues from the end of the previous results that - // returned the nextToken value. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `locationName:"nextToken" type:"string"` - - // Filters the container instances by status. For example, if you specify the - // DRAINING status, the results include only container instances that have been - // set to DRAINING using UpdateContainerInstancesState. If you do not specify - // this parameter, the default is to include container instances set to ACTIVE - // and DRAINING. - Status *string `locationName:"status" type:"string" enum:"ContainerInstanceStatus"` -} - -// String returns the string representation -func (s ListContainerInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListContainerInstancesInput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *ListContainerInstancesInput) SetCluster(v string) *ListContainerInstancesInput { - s.Cluster = &v - return s -} - -// SetFilter sets the Filter field's value. -func (s *ListContainerInstancesInput) SetFilter(v string) *ListContainerInstancesInput { - s.Filter = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListContainerInstancesInput) SetMaxResults(v int64) *ListContainerInstancesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListContainerInstancesInput) SetNextToken(v string) *ListContainerInstancesInput { - s.NextToken = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ListContainerInstancesInput) SetStatus(v string) *ListContainerInstancesInput { - s.Status = &v - return s -} - -type ListContainerInstancesOutput struct { - _ struct{} `type:"structure"` - - // The list of container instances with full ARN entries for each container - // instance associated with the specified cluster. - ContainerInstanceArns []*string `locationName:"containerInstanceArns" type:"list"` - - // The nextToken value to include in a future ListContainerInstances request. - // When the results of a ListContainerInstances request exceed maxResults, this - // value can be used to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListContainerInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListContainerInstancesOutput) GoString() string { - return s.String() -} - -// SetContainerInstanceArns sets the ContainerInstanceArns field's value. -func (s *ListContainerInstancesOutput) SetContainerInstanceArns(v []*string) *ListContainerInstancesOutput { - s.ContainerInstanceArns = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListContainerInstancesOutput) SetNextToken(v string) *ListContainerInstancesOutput { - s.NextToken = &v - return s -} - -type ListServicesInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster that hosts - // the services to list. If you do not specify a cluster, the default cluster - // is assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // The launch type for the services to list. - LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` - - // The maximum number of service results returned by ListServices in paginated - // output. When this parameter is used, ListServices only returns maxResults - // results in a single page along with a nextToken response element. The remaining - // results of the initial request can be seen by sending another ListServices - // request with the returned nextToken value. This value can be between 1 and - // 100. If this parameter is not used, then ListServices returns up to 10 results - // and a nextToken value if applicable. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The nextToken value returned from a previous paginated ListServices request - // where maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `locationName:"nextToken" type:"string"` - - // The scheduling strategy for services to list. - SchedulingStrategy *string `locationName:"schedulingStrategy" type:"string" enum:"SchedulingStrategy"` -} - -// String returns the string representation -func (s ListServicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListServicesInput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *ListServicesInput) SetCluster(v string) *ListServicesInput { - s.Cluster = &v - return s -} - -// SetLaunchType sets the LaunchType field's value. -func (s *ListServicesInput) SetLaunchType(v string) *ListServicesInput { - s.LaunchType = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListServicesInput) SetMaxResults(v int64) *ListServicesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListServicesInput) SetNextToken(v string) *ListServicesInput { - s.NextToken = &v - return s -} - -// SetSchedulingStrategy sets the SchedulingStrategy field's value. -func (s *ListServicesInput) SetSchedulingStrategy(v string) *ListServicesInput { - s.SchedulingStrategy = &v - return s -} - -type ListServicesOutput struct { - _ struct{} `type:"structure"` - - // The nextToken value to include in a future ListServices request. When the - // results of a ListServices request exceed maxResults, this value can be used - // to retrieve the next page of results. This value is null when there are no - // more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // The list of full ARN entries for each service associated with the specified - // cluster. - ServiceArns []*string `locationName:"serviceArns" type:"list"` -} - -// String returns the string representation -func (s ListServicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListServicesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListServicesOutput) SetNextToken(v string) *ListServicesOutput { - s.NextToken = &v - return s -} - -// SetServiceArns sets the ServiceArns field's value. -func (s *ListServicesOutput) SetServiceArns(v []*string) *ListServicesOutput { - s.ServiceArns = v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that identifies the resource for which to - // list the tags. Currently, the supported resources are Amazon ECS tasks, services, - // task definitions, clusters, and container instances. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { - s.ResourceArn = &v - return s -} - -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // The tags for the resource. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -type ListTaskDefinitionFamiliesInput struct { - _ struct{} `type:"structure"` - - // The familyPrefix is a string that is used to filter the results of ListTaskDefinitionFamilies. - // If you specify a familyPrefix, only task definition family names that begin - // with the familyPrefix string are returned. - FamilyPrefix *string `locationName:"familyPrefix" type:"string"` - - // The maximum number of task definition family results returned by ListTaskDefinitionFamilies - // in paginated output. When this parameter is used, ListTaskDefinitions only - // returns maxResults results in a single page along with a nextToken response - // element. The remaining results of the initial request can be seen by sending - // another ListTaskDefinitionFamilies request with the returned nextToken value. - // This value can be between 1 and 100. If this parameter is not used, then - // ListTaskDefinitionFamilies returns up to 100 results and a nextToken value - // if applicable. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The nextToken value returned from a previous paginated ListTaskDefinitionFamilies - // request where maxResults was used and the results exceeded the value of that - // parameter. Pagination continues from the end of the previous results that - // returned the nextToken value. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `locationName:"nextToken" type:"string"` - - // The task definition family status with which to filter the ListTaskDefinitionFamilies - // results. By default, both ACTIVE and INACTIVE task definition families are - // listed. If this parameter is set to ACTIVE, only task definition families - // that have an ACTIVE task definition revision are returned. If this parameter - // is set to INACTIVE, only task definition families that do not have any ACTIVE - // task definition revisions are returned. If you paginate the resulting output, - // be sure to keep the status value constant in each subsequent request. - Status *string `locationName:"status" type:"string" enum:"TaskDefinitionFamilyStatus"` -} - -// String returns the string representation -func (s ListTaskDefinitionFamiliesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTaskDefinitionFamiliesInput) GoString() string { - return s.String() -} - -// SetFamilyPrefix sets the FamilyPrefix field's value. -func (s *ListTaskDefinitionFamiliesInput) SetFamilyPrefix(v string) *ListTaskDefinitionFamiliesInput { - s.FamilyPrefix = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTaskDefinitionFamiliesInput) SetMaxResults(v int64) *ListTaskDefinitionFamiliesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTaskDefinitionFamiliesInput) SetNextToken(v string) *ListTaskDefinitionFamiliesInput { - s.NextToken = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ListTaskDefinitionFamiliesInput) SetStatus(v string) *ListTaskDefinitionFamiliesInput { - s.Status = &v - return s -} - -type ListTaskDefinitionFamiliesOutput struct { - _ struct{} `type:"structure"` - - // The list of task definition family names that match the ListTaskDefinitionFamilies - // request. - Families []*string `locationName:"families" type:"list"` - - // The nextToken value to include in a future ListTaskDefinitionFamilies request. - // When the results of a ListTaskDefinitionFamilies request exceed maxResults, - // this value can be used to retrieve the next page of results. This value is - // null when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListTaskDefinitionFamiliesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTaskDefinitionFamiliesOutput) GoString() string { - return s.String() -} - -// SetFamilies sets the Families field's value. -func (s *ListTaskDefinitionFamiliesOutput) SetFamilies(v []*string) *ListTaskDefinitionFamiliesOutput { - s.Families = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTaskDefinitionFamiliesOutput) SetNextToken(v string) *ListTaskDefinitionFamiliesOutput { - s.NextToken = &v - return s -} - -type ListTaskDefinitionsInput struct { - _ struct{} `type:"structure"` - - // The full family name with which to filter the ListTaskDefinitions results. - // Specifying a familyPrefix limits the listed task definitions to task definition - // revisions that belong to that family. - FamilyPrefix *string `locationName:"familyPrefix" type:"string"` - - // The maximum number of task definition results returned by ListTaskDefinitions - // in paginated output. When this parameter is used, ListTaskDefinitions only - // returns maxResults results in a single page along with a nextToken response - // element. The remaining results of the initial request can be seen by sending - // another ListTaskDefinitions request with the returned nextToken value. This - // value can be between 1 and 100. If this parameter is not used, then ListTaskDefinitions - // returns up to 100 results and a nextToken value if applicable. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The nextToken value returned from a previous paginated ListTaskDefinitions - // request where maxResults was used and the results exceeded the value of that - // parameter. Pagination continues from the end of the previous results that - // returned the nextToken value. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `locationName:"nextToken" type:"string"` - - // The order in which to sort the results. Valid values are ASC and DESC. By - // default (ASC), task definitions are listed lexicographically by family name - // and in ascending numerical order by revision so that the newest task definitions - // in a family are listed last. Setting this parameter to DESC reverses the - // sort order on family name and revision so that the newest task definitions - // in a family are listed first. - Sort *string `locationName:"sort" type:"string" enum:"SortOrder"` - - // The task definition status with which to filter the ListTaskDefinitions results. - // By default, only ACTIVE task definitions are listed. By setting this parameter - // to INACTIVE, you can view task definitions that are INACTIVE as long as an - // active task or service still references them. If you paginate the resulting - // output, be sure to keep the status value constant in each subsequent request. - Status *string `locationName:"status" type:"string" enum:"TaskDefinitionStatus"` -} - -// String returns the string representation -func (s ListTaskDefinitionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTaskDefinitionsInput) GoString() string { - return s.String() -} - -// SetFamilyPrefix sets the FamilyPrefix field's value. -func (s *ListTaskDefinitionsInput) SetFamilyPrefix(v string) *ListTaskDefinitionsInput { - s.FamilyPrefix = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTaskDefinitionsInput) SetMaxResults(v int64) *ListTaskDefinitionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTaskDefinitionsInput) SetNextToken(v string) *ListTaskDefinitionsInput { - s.NextToken = &v - return s -} - -// SetSort sets the Sort field's value. -func (s *ListTaskDefinitionsInput) SetSort(v string) *ListTaskDefinitionsInput { - s.Sort = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ListTaskDefinitionsInput) SetStatus(v string) *ListTaskDefinitionsInput { - s.Status = &v - return s -} - -type ListTaskDefinitionsOutput struct { - _ struct{} `type:"structure"` - - // The nextToken value to include in a future ListTaskDefinitions request. When - // the results of a ListTaskDefinitions request exceed maxResults, this value - // can be used to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // The list of task definition Amazon Resource Name (ARN) entries for the ListTaskDefinitions - // request. - TaskDefinitionArns []*string `locationName:"taskDefinitionArns" type:"list"` -} - -// String returns the string representation -func (s ListTaskDefinitionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTaskDefinitionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTaskDefinitionsOutput) SetNextToken(v string) *ListTaskDefinitionsOutput { - s.NextToken = &v - return s -} - -// SetTaskDefinitionArns sets the TaskDefinitionArns field's value. -func (s *ListTaskDefinitionsOutput) SetTaskDefinitionArns(v []*string) *ListTaskDefinitionsOutput { - s.TaskDefinitionArns = v - return s -} - -type ListTasksInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster that hosts - // the tasks to list. If you do not specify a cluster, the default cluster is - // assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // The container instance ID or full ARN of the container instance with which - // to filter the ListTasks results. Specifying a containerInstance limits the - // results to tasks that belong to that container instance. - ContainerInstance *string `locationName:"containerInstance" type:"string"` - - // The task desired status with which to filter the ListTasks results. Specifying - // a desiredStatus of STOPPED limits the results to tasks that Amazon ECS has - // set the desired status to STOPPED. This can be useful for debugging tasks - // that are not starting properly or have died or finished. The default status - // filter is RUNNING, which shows tasks that Amazon ECS has set the desired - // status to RUNNING. - // - // Although you can filter results based on a desired status of PENDING, this - // does not return any results. Amazon ECS never sets the desired status of - // a task to that value (only a task's lastStatus may have a value of PENDING). - DesiredStatus *string `locationName:"desiredStatus" type:"string" enum:"DesiredStatus"` - - // The name of the family with which to filter the ListTasks results. Specifying - // a family limits the results to tasks that belong to that family. - Family *string `locationName:"family" type:"string"` - - // The launch type for services to list. - LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` - - // The maximum number of task results returned by ListTasks in paginated output. - // When this parameter is used, ListTasks only returns maxResults results in - // a single page along with a nextToken response element. The remaining results - // of the initial request can be seen by sending another ListTasks request with - // the returned nextToken value. This value can be between 1 and 100. If this - // parameter is not used, then ListTasks returns up to 100 results and a nextToken - // value if applicable. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The nextToken value returned from a previous paginated ListTasks request - // where maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `locationName:"nextToken" type:"string"` - - // The name of the service with which to filter the ListTasks results. Specifying - // a serviceName limits the results to tasks that belong to that service. - ServiceName *string `locationName:"serviceName" type:"string"` - - // The startedBy value with which to filter the task results. Specifying a startedBy - // value limits the results to tasks that were started with that value. - StartedBy *string `locationName:"startedBy" type:"string"` -} - -// String returns the string representation -func (s ListTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTasksInput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *ListTasksInput) SetCluster(v string) *ListTasksInput { - s.Cluster = &v - return s -} - -// SetContainerInstance sets the ContainerInstance field's value. -func (s *ListTasksInput) SetContainerInstance(v string) *ListTasksInput { - s.ContainerInstance = &v - return s -} - -// SetDesiredStatus sets the DesiredStatus field's value. -func (s *ListTasksInput) SetDesiredStatus(v string) *ListTasksInput { - s.DesiredStatus = &v - return s -} - -// SetFamily sets the Family field's value. -func (s *ListTasksInput) SetFamily(v string) *ListTasksInput { - s.Family = &v - return s -} - -// SetLaunchType sets the LaunchType field's value. -func (s *ListTasksInput) SetLaunchType(v string) *ListTasksInput { - s.LaunchType = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTasksInput) SetMaxResults(v int64) *ListTasksInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTasksInput) SetNextToken(v string) *ListTasksInput { - s.NextToken = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *ListTasksInput) SetServiceName(v string) *ListTasksInput { - s.ServiceName = &v - return s -} - -// SetStartedBy sets the StartedBy field's value. -func (s *ListTasksInput) SetStartedBy(v string) *ListTasksInput { - s.StartedBy = &v - return s -} - -type ListTasksOutput struct { - _ struct{} `type:"structure"` - - // The nextToken value to include in a future ListTasks request. When the results - // of a ListTasks request exceed maxResults, this value can be used to retrieve - // the next page of results. This value is null when there are no more results - // to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // The list of task ARN entries for the ListTasks request. - TaskArns []*string `locationName:"taskArns" type:"list"` -} - -// String returns the string representation -func (s ListTasksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTasksOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTasksOutput) SetNextToken(v string) *ListTasksOutput { - s.NextToken = &v - return s -} - -// SetTaskArns sets the TaskArns field's value. -func (s *ListTasksOutput) SetTaskArns(v []*string) *ListTasksOutput { - s.TaskArns = v - return s -} - -// Details on a load balancer that is used with a service. -// -// If the service is using the ECS deployment controller, you are limited to -// one load balancer or target group. -// -// If the service is using the CODE_DEPLOY deployment controller, the service -// is required to use either an Application Load Balancer or Network Load Balancer. -// When you are creating an AWS CodeDeploy deployment group, you specify two -// target groups (referred to as a targetGroupPair). Each target group binds -// to a separate task set in the deployment. The load balancer can also have -// up to two listeners, a required listener for production traffic and an optional -// listener that allows you to test new revisions of the service before routing -// production traffic to it. -// -// Services with tasks that use the awsvpc network mode (for example, those -// with the Fargate launch type) only support Application Load Balancers and -// Network Load Balancers. Classic Load Balancers are not supported. Also, when -// you create any target groups for these services, you must choose ip as the -// target type, not instance. Tasks that use the awsvpc network mode are associated -// with an elastic network interface, not an Amazon EC2 instance. -type LoadBalancer struct { - _ struct{} `type:"structure"` - - // The name of the container (as it appears in a container definition) to associate - // with the load balancer. - ContainerName *string `locationName:"containerName" type:"string"` - - // The port on the container to associate with the load balancer. This port - // must correspond to a containerPort in the service's task definition. Your - // container instances must allow ingress traffic on the hostPort of the port - // mapping. - ContainerPort *int64 `locationName:"containerPort" type:"integer"` - - // The name of a load balancer. - LoadBalancerName *string `locationName:"loadBalancerName" type:"string"` - - // The full Amazon Resource Name (ARN) of the Elastic Load Balancing target - // group or groups associated with a service. For services using the ECS deployment - // controller, you are limited to one target group. For services using the CODE_DEPLOY - // deployment controller, you are required to define two target groups for the - // load balancer. - // - // If your service's task definition uses the awsvpc network mode (which is - // required for the Fargate launch type), you must choose ip as the target type, - // not instance, because tasks that use the awsvpc network mode are associated - // with an elastic network interface, not an Amazon EC2 instance. - TargetGroupArn *string `locationName:"targetGroupArn" type:"string"` -} - -// String returns the string representation -func (s LoadBalancer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancer) GoString() string { - return s.String() -} - -// SetContainerName sets the ContainerName field's value. -func (s *LoadBalancer) SetContainerName(v string) *LoadBalancer { - s.ContainerName = &v - return s -} - -// SetContainerPort sets the ContainerPort field's value. -func (s *LoadBalancer) SetContainerPort(v int64) *LoadBalancer { - s.ContainerPort = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *LoadBalancer) SetLoadBalancerName(v string) *LoadBalancer { - s.LoadBalancerName = &v - return s -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *LoadBalancer) SetTargetGroupArn(v string) *LoadBalancer { - s.TargetGroupArn = &v - return s -} - -// Log configuration options to send to a custom log driver for the container. -type LogConfiguration struct { - _ struct{} `type:"structure"` - - // The log driver to use for the container. The valid values listed for this - // parameter are log drivers that the Amazon ECS container agent can communicate - // with by default. If you are using the Fargate launch type, the only supported - // value is awslogs. For more information about using the awslogs driver, see - // Using the awslogs Log Driver (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) - // in the Amazon Elastic Container Service Developer Guide. - // - // If you have a custom driver that is not listed above that you would like - // to work with the Amazon ECS container agent, you can fork the Amazon ECS - // container agent project that is available on GitHub (https://github.com/aws/amazon-ecs-agent) - // and customize it to work with that driver. We encourage you to submit pull - // requests for changes that you would like to have included. However, Amazon - // Web Services does not currently support running modified copies of this software. - // - // This parameter requires version 1.18 of the Docker Remote API or greater - // on your container instance. To check the Docker Remote API version on your - // container instance, log in to your container instance and run the following - // command: sudo docker version --format '{{.Server.APIVersion}}' - // - // LogDriver is a required field - LogDriver *string `locationName:"logDriver" type:"string" required:"true" enum:"LogDriver"` - - // The configuration options to send to the log driver. This parameter requires - // version 1.19 of the Docker Remote API or greater on your container instance. - // To check the Docker Remote API version on your container instance, log in - // to your container instance and run the following command: sudo docker version - // --format '{{.Server.APIVersion}}' - Options map[string]*string `locationName:"options" type:"map"` -} - -// String returns the string representation -func (s LogConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LogConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LogConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LogConfiguration"} - if s.LogDriver == nil { - invalidParams.Add(request.NewErrParamRequired("LogDriver")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogDriver sets the LogDriver field's value. -func (s *LogConfiguration) SetLogDriver(v string) *LogConfiguration { - s.LogDriver = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *LogConfiguration) SetOptions(v map[string]*string) *LogConfiguration { - s.Options = v - return s -} - -// Details on a volume mount point that is used in a container definition. -type MountPoint struct { - _ struct{} `type:"structure"` - - // The path on the container to mount the host volume at. - ContainerPath *string `locationName:"containerPath" type:"string"` - - // If this value is true, the container has read-only access to the volume. - // If this value is false, then the container can write to the volume. The default - // value is false. - ReadOnly *bool `locationName:"readOnly" type:"boolean"` - - // The name of the volume to mount. Must be a volume name referenced in the - // name parameter of task definition volume. - SourceVolume *string `locationName:"sourceVolume" type:"string"` -} - -// String returns the string representation -func (s MountPoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MountPoint) GoString() string { - return s.String() -} - -// SetContainerPath sets the ContainerPath field's value. -func (s *MountPoint) SetContainerPath(v string) *MountPoint { - s.ContainerPath = &v - return s -} - -// SetReadOnly sets the ReadOnly field's value. -func (s *MountPoint) SetReadOnly(v bool) *MountPoint { - s.ReadOnly = &v - return s -} - -// SetSourceVolume sets the SourceVolume field's value. -func (s *MountPoint) SetSourceVolume(v string) *MountPoint { - s.SourceVolume = &v - return s -} - -// Details on the network bindings between a container and its host container -// instance. After a task reaches the RUNNING status, manual and automatic host -// and container port assignments are visible in the networkBindings section -// of DescribeTasks API responses. -type NetworkBinding struct { - _ struct{} `type:"structure"` - - // The IP address that the container is bound to on the container instance. - BindIP *string `locationName:"bindIP" type:"string"` - - // The port number on the container that is used with the network binding. - ContainerPort *int64 `locationName:"containerPort" type:"integer"` - - // The port number on the host that is used with the network binding. - HostPort *int64 `locationName:"hostPort" type:"integer"` - - // The protocol used for the network binding. - Protocol *string `locationName:"protocol" type:"string" enum:"TransportProtocol"` -} - -// String returns the string representation -func (s NetworkBinding) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkBinding) GoString() string { - return s.String() -} - -// SetBindIP sets the BindIP field's value. -func (s *NetworkBinding) SetBindIP(v string) *NetworkBinding { - s.BindIP = &v - return s -} - -// SetContainerPort sets the ContainerPort field's value. -func (s *NetworkBinding) SetContainerPort(v int64) *NetworkBinding { - s.ContainerPort = &v - return s -} - -// SetHostPort sets the HostPort field's value. -func (s *NetworkBinding) SetHostPort(v int64) *NetworkBinding { - s.HostPort = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *NetworkBinding) SetProtocol(v string) *NetworkBinding { - s.Protocol = &v - return s -} - -// An object representing the network configuration for a task or service. -type NetworkConfiguration struct { - _ struct{} `type:"structure"` - - // The VPC subnets and security groups associated with a task. - // - // All specified subnets and security groups must be from the same VPC. - AwsvpcConfiguration *AwsVpcConfiguration `locationName:"awsvpcConfiguration" type:"structure"` -} - -// String returns the string representation -func (s NetworkConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NetworkConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NetworkConfiguration"} - if s.AwsvpcConfiguration != nil { - if err := s.AwsvpcConfiguration.Validate(); err != nil { - invalidParams.AddNested("AwsvpcConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAwsvpcConfiguration sets the AwsvpcConfiguration field's value. -func (s *NetworkConfiguration) SetAwsvpcConfiguration(v *AwsVpcConfiguration) *NetworkConfiguration { - s.AwsvpcConfiguration = v - return s -} - -// An object representing the elastic network interface for tasks that use the -// awsvpc network mode. -type NetworkInterface struct { - _ struct{} `type:"structure"` - - // The attachment ID for the network interface. - AttachmentId *string `locationName:"attachmentId" type:"string"` - - // The private IPv6 address for the network interface. - Ipv6Address *string `locationName:"ipv6Address" type:"string"` - - // The private IPv4 address for the network interface. - PrivateIpv4Address *string `locationName:"privateIpv4Address" type:"string"` -} - -// String returns the string representation -func (s NetworkInterface) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInterface) GoString() string { - return s.String() -} - -// SetAttachmentId sets the AttachmentId field's value. -func (s *NetworkInterface) SetAttachmentId(v string) *NetworkInterface { - s.AttachmentId = &v - return s -} - -// SetIpv6Address sets the Ipv6Address field's value. -func (s *NetworkInterface) SetIpv6Address(v string) *NetworkInterface { - s.Ipv6Address = &v - return s -} - -// SetPrivateIpv4Address sets the PrivateIpv4Address field's value. -func (s *NetworkInterface) SetPrivateIpv4Address(v string) *NetworkInterface { - s.PrivateIpv4Address = &v - return s -} - -// An object representing a constraint on task placement. For more information, -// see Task Placement Constraints (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html) -// in the Amazon Elastic Container Service Developer Guide. -type PlacementConstraint struct { - _ struct{} `type:"structure"` - - // A cluster query language expression to apply to the constraint. You cannot - // specify an expression if the constraint type is distinctInstance. For more - // information, see Cluster Query Language (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) - // in the Amazon Elastic Container Service Developer Guide. - Expression *string `locationName:"expression" type:"string"` - - // The type of constraint. Use distinctInstance to ensure that each task in - // a particular group is running on a different container instance. Use memberOf - // to restrict the selection to a group of valid candidates. The value distinctInstance - // is not supported in task definitions. - Type *string `locationName:"type" type:"string" enum:"PlacementConstraintType"` -} - -// String returns the string representation -func (s PlacementConstraint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlacementConstraint) GoString() string { - return s.String() -} - -// SetExpression sets the Expression field's value. -func (s *PlacementConstraint) SetExpression(v string) *PlacementConstraint { - s.Expression = &v - return s -} - -// SetType sets the Type field's value. -func (s *PlacementConstraint) SetType(v string) *PlacementConstraint { - s.Type = &v - return s -} - -// The task placement strategy for a task or service. For more information, -// see Task Placement Strategies (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html) -// in the Amazon Elastic Container Service Developer Guide. -type PlacementStrategy struct { - _ struct{} `type:"structure"` - - // The field to apply the placement strategy against. For the spread placement - // strategy, valid values are instanceId (or host, which has the same effect), - // or any platform or custom attribute that is applied to a container instance, - // such as attribute:ecs.availability-zone. For the binpack placement strategy, - // valid values are cpu and memory. For the random placement strategy, this - // field is not used. - Field *string `locationName:"field" type:"string"` - - // The type of placement strategy. The random placement strategy randomly places - // tasks on available candidates. The spread placement strategy spreads placement - // across available candidates evenly based on the field parameter. The binpack - // strategy places tasks on available candidates that have the least available - // amount of the resource that is specified with the field parameter. For example, - // if you binpack on memory, a task is placed on the instance with the least - // amount of remaining memory (but still enough to run the task). - Type *string `locationName:"type" type:"string" enum:"PlacementStrategyType"` -} - -// String returns the string representation -func (s PlacementStrategy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlacementStrategy) GoString() string { - return s.String() -} - -// SetField sets the Field field's value. -func (s *PlacementStrategy) SetField(v string) *PlacementStrategy { - s.Field = &v - return s -} - -// SetType sets the Type field's value. -func (s *PlacementStrategy) SetType(v string) *PlacementStrategy { - s.Type = &v - return s -} - -// Port mappings allow containers to access ports on the host container instance -// to send or receive traffic. Port mappings are specified as part of the container -// definition. -// -// If you are using containers in a task with the awsvpc or host network mode, -// exposed ports should be specified using containerPort. The hostPort can be -// left blank or it must be the same value as the containerPort. -// -// After a task reaches the RUNNING status, manual and automatic host and container -// port assignments are visible in the networkBindings section of DescribeTasks -// API responses. -type PortMapping struct { - _ struct{} `type:"structure"` - - // The port number on the container that is bound to the user-specified or automatically - // assigned host port. - // - // If you are using containers in a task with the awsvpc or host network mode, - // exposed ports should be specified using containerPort. - // - // If you are using containers in a task with the bridge network mode and you - // specify a container port and not a host port, your container automatically - // receives a host port in the ephemeral port range. For more information, see - // hostPort. Port mappings that are automatically assigned in this way do not - // count toward the 100 reserved ports limit of a container instance. - ContainerPort *int64 `locationName:"containerPort" type:"integer"` - - // The port number on the container instance to reserve for your container. - // - // If you are using containers in a task with the awsvpc or host network mode, - // the hostPort can either be left blank or set to the same value as the containerPort. - // - // If you are using containers in a task with the bridge network mode, you can - // specify a non-reserved host port for your container port mapping, or you - // can omit the hostPort (or set it to 0) while specifying a containerPort and - // your container automatically receives a port in the ephemeral port range - // for your container instance operating system and Docker version. - // - // The default ephemeral port range for Docker version 1.6.0 and later is listed - // on the instance under /proc/sys/net/ipv4/ip_local_port_range. If this kernel - // parameter is unavailable, the default ephemeral port range from 49153 through - // 65535 is used. Do not attempt to specify a host port in the ephemeral port - // range as these are reserved for automatic assignment. In general, ports below - // 32768 are outside of the ephemeral port range. - // - // The default ephemeral port range from 49153 through 65535 is always used - // for Docker versions before 1.6.0. - // - // The default reserved ports are 22 for SSH, the Docker ports 2375 and 2376, - // and the Amazon ECS container agent ports 51678 and 51679. Any host port that - // was previously specified in a running task is also reserved while the task - // is running (after a task stops, the host port is released). The current reserved - // ports are displayed in the remainingResources of DescribeContainerInstances - // output. A container instance may have up to 100 reserved ports at a time, - // including the default reserved ports. Aautomatically assigned ports do not - // count toward the 100 reserved ports limit. - HostPort *int64 `locationName:"hostPort" type:"integer"` - - // The protocol used for the port mapping. Valid values are tcp and udp. The - // default is tcp. - Protocol *string `locationName:"protocol" type:"string" enum:"TransportProtocol"` -} - -// String returns the string representation -func (s PortMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PortMapping) GoString() string { - return s.String() -} - -// SetContainerPort sets the ContainerPort field's value. -func (s *PortMapping) SetContainerPort(v int64) *PortMapping { - s.ContainerPort = &v - return s -} - -// SetHostPort sets the HostPort field's value. -func (s *PortMapping) SetHostPort(v int64) *PortMapping { - s.HostPort = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *PortMapping) SetProtocol(v string) *PortMapping { - s.Protocol = &v - return s -} - -type PutAccountSettingInput struct { - _ struct{} `type:"structure"` - - // The resource name for which to enable the new format. If serviceLongArnFormat - // is specified, the ARN for your Amazon ECS services is affected. If taskLongArnFormat - // is specified, the ARN and resource ID for your Amazon ECS tasks is affected. - // If containerInstanceLongArnFormat is specified, the ARN and resource ID for - // your Amazon ECS container instances is affected. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true" enum:"SettingName"` - - // The ARN of the principal, which can be an IAM user, IAM role, or the root - // user. If you specify the root user, it modifies the ARN and resource ID format - // for all IAM users, IAM roles, and the root user of the account unless an - // IAM user or role explicitly overrides these settings for themselves. If this - // field is omitted, the setting are changed only for the authenticated user. - PrincipalArn *string `locationName:"principalArn" type:"string"` - - // The account setting value for the specified principal ARN. Accepted values - // are enabled and disabled. - // - // Value is a required field - Value *string `locationName:"value" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutAccountSettingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutAccountSettingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutAccountSettingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutAccountSettingInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *PutAccountSettingInput) SetName(v string) *PutAccountSettingInput { - s.Name = &v - return s -} - -// SetPrincipalArn sets the PrincipalArn field's value. -func (s *PutAccountSettingInput) SetPrincipalArn(v string) *PutAccountSettingInput { - s.PrincipalArn = &v - return s -} - -// SetValue sets the Value field's value. -func (s *PutAccountSettingInput) SetValue(v string) *PutAccountSettingInput { - s.Value = &v - return s -} - -type PutAccountSettingOutput struct { - _ struct{} `type:"structure"` - - // The current account setting for a resource. - Setting *Setting `locationName:"setting" type:"structure"` -} - -// String returns the string representation -func (s PutAccountSettingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutAccountSettingOutput) GoString() string { - return s.String() -} - -// SetSetting sets the Setting field's value. -func (s *PutAccountSettingOutput) SetSetting(v *Setting) *PutAccountSettingOutput { - s.Setting = v - return s -} - -type PutAttributesInput struct { - _ struct{} `type:"structure"` - - // The attributes to apply to your resource. You can specify up to 10 custom - // attributes per resource. You can specify up to 10 attributes in a single - // call. - // - // Attributes is a required field - Attributes []*Attribute `locationName:"attributes" type:"list" required:"true"` - - // The short name or full Amazon Resource Name (ARN) of the cluster that contains - // the resource to apply attributes. If you do not specify a cluster, the default - // cluster is assumed. - Cluster *string `locationName:"cluster" type:"string"` -} - -// String returns the string representation -func (s PutAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutAttributesInput"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.Attributes != nil { - for i, v := range s.Attributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *PutAttributesInput) SetAttributes(v []*Attribute) *PutAttributesInput { - s.Attributes = v - return s -} - -// SetCluster sets the Cluster field's value. -func (s *PutAttributesInput) SetCluster(v string) *PutAttributesInput { - s.Cluster = &v - return s -} - -type PutAttributesOutput struct { - _ struct{} `type:"structure"` - - // The attributes applied to your resource. - Attributes []*Attribute `locationName:"attributes" type:"list"` -} - -// String returns the string representation -func (s PutAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *PutAttributesOutput) SetAttributes(v []*Attribute) *PutAttributesOutput { - s.Attributes = v - return s -} - -type RegisterContainerInstanceInput struct { - _ struct{} `type:"structure"` - - // The container instance attributes that this container instance supports. - Attributes []*Attribute `locationName:"attributes" type:"list"` - - // The short name or full Amazon Resource Name (ARN) of the cluster with which - // to register your container instance. If you do not specify a cluster, the - // default cluster is assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // The ARN of the container instance (if it was previously registered). - ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"` - - // The instance identity document for the EC2 instance to register. This document - // can be found by running the following command from the instance: curl http://169.254.169.254/latest/dynamic/instance-identity/document/ - InstanceIdentityDocument *string `locationName:"instanceIdentityDocument" type:"string"` - - // The instance identity document signature for the EC2 instance to register. - // This signature can be found by running the following command from the instance: - // curl http://169.254.169.254/latest/dynamic/instance-identity/signature/ - InstanceIdentityDocumentSignature *string `locationName:"instanceIdentityDocumentSignature" type:"string"` - - // The metadata that you apply to the container instance to help you categorize - // and organize them. Each tag consists of a key and an optional value, both - // of which you define. Tag keys can have a maximum character length of 128 - // characters, and tag values can have a maximum length of 256 characters. - Tags []*Tag `locationName:"tags" type:"list"` - - // The resources available on the instance. - TotalResources []*Resource `locationName:"totalResources" type:"list"` - - // The version information for the Amazon ECS container agent and Docker daemon - // running on the container instance. - VersionInfo *VersionInfo `locationName:"versionInfo" type:"structure"` -} - -// String returns the string representation -func (s RegisterContainerInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterContainerInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterContainerInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterContainerInstanceInput"} - if s.Attributes != nil { - for i, v := range s.Attributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *RegisterContainerInstanceInput) SetAttributes(v []*Attribute) *RegisterContainerInstanceInput { - s.Attributes = v - return s -} - -// SetCluster sets the Cluster field's value. -func (s *RegisterContainerInstanceInput) SetCluster(v string) *RegisterContainerInstanceInput { - s.Cluster = &v - return s -} - -// SetContainerInstanceArn sets the ContainerInstanceArn field's value. -func (s *RegisterContainerInstanceInput) SetContainerInstanceArn(v string) *RegisterContainerInstanceInput { - s.ContainerInstanceArn = &v - return s -} - -// SetInstanceIdentityDocument sets the InstanceIdentityDocument field's value. -func (s *RegisterContainerInstanceInput) SetInstanceIdentityDocument(v string) *RegisterContainerInstanceInput { - s.InstanceIdentityDocument = &v - return s -} - -// SetInstanceIdentityDocumentSignature sets the InstanceIdentityDocumentSignature field's value. -func (s *RegisterContainerInstanceInput) SetInstanceIdentityDocumentSignature(v string) *RegisterContainerInstanceInput { - s.InstanceIdentityDocumentSignature = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RegisterContainerInstanceInput) SetTags(v []*Tag) *RegisterContainerInstanceInput { - s.Tags = v - return s -} - -// SetTotalResources sets the TotalResources field's value. -func (s *RegisterContainerInstanceInput) SetTotalResources(v []*Resource) *RegisterContainerInstanceInput { - s.TotalResources = v - return s -} - -// SetVersionInfo sets the VersionInfo field's value. -func (s *RegisterContainerInstanceInput) SetVersionInfo(v *VersionInfo) *RegisterContainerInstanceInput { - s.VersionInfo = v - return s -} - -type RegisterContainerInstanceOutput struct { - _ struct{} `type:"structure"` - - // The container instance that was registered. - ContainerInstance *ContainerInstance `locationName:"containerInstance" type:"structure"` -} - -// String returns the string representation -func (s RegisterContainerInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterContainerInstanceOutput) GoString() string { - return s.String() -} - -// SetContainerInstance sets the ContainerInstance field's value. -func (s *RegisterContainerInstanceOutput) SetContainerInstance(v *ContainerInstance) *RegisterContainerInstanceOutput { - s.ContainerInstance = v - return s -} - -type RegisterTaskDefinitionInput struct { - _ struct{} `type:"structure"` - - // A list of container definitions in JSON format that describe the different - // containers that make up your task. - // - // ContainerDefinitions is a required field - ContainerDefinitions []*ContainerDefinition `locationName:"containerDefinitions" type:"list" required:"true"` - - // The number of CPU units used by the task. It can be expressed as an integer - // using CPU units, for example 1024, or as a string using vCPUs, for example - // 1 vCPU or 1 vcpu, in a task definition. String values are converted to an - // integer indicating the CPU units when the task definition is registered. - // - // Task-level CPU and memory parameters are ignored for Windows containers. - // We recommend specifying container-level resources for Windows containers. - // - // If you are using the EC2 launch type, this field is optional. Supported values - // are between 128 CPU units (0.125 vCPUs) and 10240 CPU units (10 vCPUs). - // - // If you are using the Fargate launch type, this field is required and you - // must use one of the following values, which determines your range of supported - // values for the memory parameter: - // - // * 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), - // 2048 (2 GB) - // - // * 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 - // (3 GB), 4096 (4 GB) - // - // * 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 - // (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - // - // * 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 - // (16 GB) in increments of 1024 (1 GB) - // - // * 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 - // (30 GB) in increments of 1024 (1 GB) - Cpu *string `locationName:"cpu" type:"string"` - - // The Amazon Resource Name (ARN) of the task execution role that the Amazon - // ECS container agent and the Docker daemon can assume. - ExecutionRoleArn *string `locationName:"executionRoleArn" type:"string"` - - // You must specify a family for a task definition, which allows you to track - // multiple versions of the same task definition. The family is used as a name - // for your task definition. Up to 255 letters (uppercase and lowercase), numbers, - // hyphens, and underscores are allowed. - // - // Family is a required field - Family *string `locationName:"family" type:"string" required:"true"` - - // The IPC resource namespace to use for the containers in the task. The valid - // values are host, task, or none. If host is specified, then all containers - // within the tasks that specified the host IPC mode on the same container instance - // share the same IPC resources with the host Amazon EC2 instance. If task is - // specified, all containers within the specified task share the same IPC resources. - // If none is specified, then IPC resources within the containers of a task - // are private and not shared with other containers in a task or on the container - // instance. If no value is specified, then the IPC resource namespace sharing - // depends on the Docker daemon setting on the container instance. For more - // information, see IPC settings (https://docs.docker.com/engine/reference/run/#ipc-settings---ipc) - // in the Docker run reference. - // - // If the host IPC mode is used, be aware that there is a heightened risk of - // undesired IPC namespace expose. For more information, see Docker security - // (https://docs.docker.com/engine/security/security/). - // - // If you are setting namespaced kernel parameters using systemControls for - // the containers in the task, the following will apply to your IPC resource - // namespace. For more information, see System Controls (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) - // in the Amazon Elastic Container Service Developer Guide. - // - // * For tasks that use the host IPC mode, IPC namespace related systemControls - // are not supported. - // - // * For tasks that use the task IPC mode, IPC namespace related systemControls - // will apply to all containers within a task. - // - // This parameter is not supported for Windows containers or tasks using the - // Fargate launch type. - IpcMode *string `locationName:"ipcMode" type:"string" enum:"IpcMode"` - - // The amount of memory (in MiB) used by the task. It can be expressed as an - // integer using MiB, for example 1024, or as a string using GB, for example - // 1GB or 1 GB, in a task definition. String values are converted to an integer - // indicating the MiB when the task definition is registered. - // - // Task-level CPU and memory parameters are ignored for Windows containers. - // We recommend specifying container-level resources for Windows containers. - // - // If using the EC2 launch type, this field is optional. - // - // If using the Fargate launch type, this field is required and you must use - // one of the following values, which determines your range of supported values - // for the cpu parameter: - // - // * 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 - // vCPU) - // - // * 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: - // 512 (.5 vCPU) - // - // * 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 - // (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU) - // - // * Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - - // Available cpu values: 2048 (2 vCPU) - // - // * Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - - // Available cpu values: 4096 (4 vCPU) - Memory *string `locationName:"memory" type:"string"` - - // The Docker networking mode to use for the containers in the task. The valid - // values are none, bridge, awsvpc, and host. The default Docker network mode - // is bridge. If you are using the Fargate launch type, the awsvpc network mode - // is required. If you are using the EC2 launch type, any network mode can be - // used. If the network mode is set to none, you cannot specify port mappings - // in your container definitions, and the tasks containers do not have external - // connectivity. The host and awsvpc network modes offer the highest networking - // performance for containers because they use the EC2 network stack instead - // of the virtualized network stack provided by the bridge mode. - // - // With the host and awsvpc network modes, exposed container ports are mapped - // directly to the corresponding host port (for the host network mode) or the - // attached elastic network interface port (for the awsvpc network mode), so - // you cannot take advantage of dynamic host port mappings. - // - // If the network mode is awsvpc, the task is allocated an elastic network interface, - // and you must specify a NetworkConfiguration value when you create a service - // or run a task with the task definition. For more information, see Task Networking - // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) - // in the Amazon Elastic Container Service Developer Guide. - // - // Currently, only Amazon ECS-optimized AMIs, other Amazon Linux variants with - // the ecs-init package, or AWS Fargate infrastructure support the awsvpc network - // mode. - // - // If the network mode is host, you cannot run multiple instantiations of the - // same task on a single container instance when port mappings are used. - // - // Docker for Windows uses different network modes than Docker for Linux. When - // you register a task definition with Windows containers, you must not specify - // a network mode. If you use the console to register a task definition with - // Windows containers, you must choose the network mode object. - // - // For more information, see Network settings (https://docs.docker.com/engine/reference/run/#network-settings) - // in the Docker run reference. - NetworkMode *string `locationName:"networkMode" type:"string" enum:"NetworkMode"` - - // The process namespace to use for the containers in the task. The valid values - // are host or task. If host is specified, then all containers within the tasks - // that specified the host PID mode on the same container instance share the - // same IPC resources with the host Amazon EC2 instance. If task is specified, - // all containers within the specified task share the same process namespace. - // If no value is specified, the default is a private namespace. For more information, - // see PID settings (https://docs.docker.com/engine/reference/run/#pid-settings---pid) - // in the Docker run reference. - // - // If the host PID mode is used, be aware that there is a heightened risk of - // undesired process namespace expose. For more information, see Docker security - // (https://docs.docker.com/engine/security/security/). - // - // This parameter is not supported for Windows containers or tasks using the - // Fargate launch type. - PidMode *string `locationName:"pidMode" type:"string" enum:"PidMode"` - - // An array of placement constraint objects to use for the task. You can specify - // a maximum of 10 constraints per task (this limit includes constraints in - // the task definition and those specified at runtime). - PlacementConstraints []*TaskDefinitionPlacementConstraint `locationName:"placementConstraints" type:"list"` - - // The launch type required by the task. If no value is specified, it defaults - // to EC2. - RequiresCompatibilities []*string `locationName:"requiresCompatibilities" type:"list"` - - // The metadata that you apply to the task definition to help you categorize - // and organize them. Each tag consists of a key and an optional value, both - // of which you define. Tag keys can have a maximum character length of 128 - // characters, and tag values can have a maximum length of 256 characters. - Tags []*Tag `locationName:"tags" type:"list"` - - // The short name or full Amazon Resource Name (ARN) of the IAM role that containers - // in this task can assume. All containers in this task are granted the permissions - // that are specified in this role. For more information, see IAM Roles for - // Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) - // in the Amazon Elastic Container Service Developer Guide. - TaskRoleArn *string `locationName:"taskRoleArn" type:"string"` - - // A list of volume definitions in JSON format that containers in your task - // may use. - Volumes []*Volume `locationName:"volumes" type:"list"` -} - -// String returns the string representation -func (s RegisterTaskDefinitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterTaskDefinitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterTaskDefinitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterTaskDefinitionInput"} - if s.ContainerDefinitions == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerDefinitions")) - } - if s.Family == nil { - invalidParams.Add(request.NewErrParamRequired("Family")) - } - if s.ContainerDefinitions != nil { - for i, v := range s.ContainerDefinitions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContainerDefinitions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerDefinitions sets the ContainerDefinitions field's value. -func (s *RegisterTaskDefinitionInput) SetContainerDefinitions(v []*ContainerDefinition) *RegisterTaskDefinitionInput { - s.ContainerDefinitions = v - return s -} - -// SetCpu sets the Cpu field's value. -func (s *RegisterTaskDefinitionInput) SetCpu(v string) *RegisterTaskDefinitionInput { - s.Cpu = &v - return s -} - -// SetExecutionRoleArn sets the ExecutionRoleArn field's value. -func (s *RegisterTaskDefinitionInput) SetExecutionRoleArn(v string) *RegisterTaskDefinitionInput { - s.ExecutionRoleArn = &v - return s -} - -// SetFamily sets the Family field's value. -func (s *RegisterTaskDefinitionInput) SetFamily(v string) *RegisterTaskDefinitionInput { - s.Family = &v - return s -} - -// SetIpcMode sets the IpcMode field's value. -func (s *RegisterTaskDefinitionInput) SetIpcMode(v string) *RegisterTaskDefinitionInput { - s.IpcMode = &v - return s -} - -// SetMemory sets the Memory field's value. -func (s *RegisterTaskDefinitionInput) SetMemory(v string) *RegisterTaskDefinitionInput { - s.Memory = &v - return s -} - -// SetNetworkMode sets the NetworkMode field's value. -func (s *RegisterTaskDefinitionInput) SetNetworkMode(v string) *RegisterTaskDefinitionInput { - s.NetworkMode = &v - return s -} - -// SetPidMode sets the PidMode field's value. -func (s *RegisterTaskDefinitionInput) SetPidMode(v string) *RegisterTaskDefinitionInput { - s.PidMode = &v - return s -} - -// SetPlacementConstraints sets the PlacementConstraints field's value. -func (s *RegisterTaskDefinitionInput) SetPlacementConstraints(v []*TaskDefinitionPlacementConstraint) *RegisterTaskDefinitionInput { - s.PlacementConstraints = v - return s -} - -// SetRequiresCompatibilities sets the RequiresCompatibilities field's value. -func (s *RegisterTaskDefinitionInput) SetRequiresCompatibilities(v []*string) *RegisterTaskDefinitionInput { - s.RequiresCompatibilities = v - return s -} - -// SetTags sets the Tags field's value. -func (s *RegisterTaskDefinitionInput) SetTags(v []*Tag) *RegisterTaskDefinitionInput { - s.Tags = v - return s -} - -// SetTaskRoleArn sets the TaskRoleArn field's value. -func (s *RegisterTaskDefinitionInput) SetTaskRoleArn(v string) *RegisterTaskDefinitionInput { - s.TaskRoleArn = &v - return s -} - -// SetVolumes sets the Volumes field's value. -func (s *RegisterTaskDefinitionInput) SetVolumes(v []*Volume) *RegisterTaskDefinitionInput { - s.Volumes = v - return s -} - -type RegisterTaskDefinitionOutput struct { - _ struct{} `type:"structure"` - - // The list of tags associated with the task definition. - Tags []*Tag `locationName:"tags" type:"list"` - - // The full description of the registered task definition. - TaskDefinition *TaskDefinition `locationName:"taskDefinition" type:"structure"` -} - -// String returns the string representation -func (s RegisterTaskDefinitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterTaskDefinitionOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *RegisterTaskDefinitionOutput) SetTags(v []*Tag) *RegisterTaskDefinitionOutput { - s.Tags = v - return s -} - -// SetTaskDefinition sets the TaskDefinition field's value. -func (s *RegisterTaskDefinitionOutput) SetTaskDefinition(v *TaskDefinition) *RegisterTaskDefinitionOutput { - s.TaskDefinition = v - return s -} - -// The repository credentials for private registry authentication. -type RepositoryCredentials struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the secret containing the private repository - // credentials. - // - // When you are using the Amazon ECS API, AWS CLI, or AWS SDK, if the secret - // exists in the same Region as the task that you are launching then you can - // use either the full ARN or the name of the secret. When you are using the - // AWS Management Console, you must specify the full ARN of the secret. - // - // CredentialsParameter is a required field - CredentialsParameter *string `locationName:"credentialsParameter" type:"string" required:"true"` -} - -// String returns the string representation -func (s RepositoryCredentials) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RepositoryCredentials) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RepositoryCredentials) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RepositoryCredentials"} - if s.CredentialsParameter == nil { - invalidParams.Add(request.NewErrParamRequired("CredentialsParameter")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCredentialsParameter sets the CredentialsParameter field's value. -func (s *RepositoryCredentials) SetCredentialsParameter(v string) *RepositoryCredentials { - s.CredentialsParameter = &v - return s -} - -// Describes the resources available for a container instance. -type Resource struct { - _ struct{} `type:"structure"` - - // When the doubleValue type is set, the value of the resource must be a double - // precision floating-point type. - DoubleValue *float64 `locationName:"doubleValue" type:"double"` - - // When the integerValue type is set, the value of the resource must be an integer. - IntegerValue *int64 `locationName:"integerValue" type:"integer"` - - // When the longValue type is set, the value of the resource must be an extended - // precision floating-point type. - LongValue *int64 `locationName:"longValue" type:"long"` - - // The name of the resource, such as CPU, MEMORY, PORTS, PORTS_UDP, or a user-defined - // resource. - Name *string `locationName:"name" type:"string"` - - // When the stringSetValue type is set, the value of the resource must be a - // string type. - StringSetValue []*string `locationName:"stringSetValue" type:"list"` - - // The type of the resource, such as INTEGER, DOUBLE, LONG, or STRINGSET. - Type *string `locationName:"type" type:"string"` -} - -// 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() -} - -// SetDoubleValue sets the DoubleValue field's value. -func (s *Resource) SetDoubleValue(v float64) *Resource { - s.DoubleValue = &v - return s -} - -// SetIntegerValue sets the IntegerValue field's value. -func (s *Resource) SetIntegerValue(v int64) *Resource { - s.IntegerValue = &v - return s -} - -// SetLongValue sets the LongValue field's value. -func (s *Resource) SetLongValue(v int64) *Resource { - s.LongValue = &v - return s -} - -// SetName sets the Name field's value. -func (s *Resource) SetName(v string) *Resource { - s.Name = &v - return s -} - -// SetStringSetValue sets the StringSetValue field's value. -func (s *Resource) SetStringSetValue(v []*string) *Resource { - s.StringSetValue = v - return s -} - -// SetType sets the Type field's value. -func (s *Resource) SetType(v string) *Resource { - s.Type = &v - return s -} - -type RunTaskInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster on which - // to run your task. If you do not specify a cluster, the default cluster is - // assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // The number of instantiations of the specified task to place on your cluster. - // You can specify up to 10 tasks per call. - Count *int64 `locationName:"count" type:"integer"` - - // Specifies whether to enable Amazon ECS managed tags for the task. For more - // information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) - // in the Amazon Elastic Container Service Developer Guide. - EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"` - - // The name of the task group to associate with the task. The default value - // is the family name of the task definition (for example, family:my-family-name). - Group *string `locationName:"group" type:"string"` - - // The launch type on which to run your task. For more information, see Amazon - // ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) - // in the Amazon Elastic Container Service Developer Guide. - LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` - - // The network configuration for the task. This parameter is required for task - // definitions that use the awsvpc network mode to receive their own elastic - // network interface, and it is not supported for other network modes. For more - // information, see Task Networking (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) - // in the Amazon Elastic Container Service Developer Guide. - NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` - - // A list of container overrides in JSON format that specify the name of a container - // in the specified task definition and the overrides it should receive. You - // can override the default command for a container (that is specified in the - // task definition or Docker image) with a command override. You can also override - // existing environment variables (that are specified in the task definition - // or Docker image) on a container or add new environment variables to it with - // an environment override. - // - // A total of 8192 characters are allowed for overrides. This limit includes - // the JSON formatting characters of the override structure. - Overrides *TaskOverride `locationName:"overrides" type:"structure"` - - // An array of placement constraint objects to use for the task. You can specify - // up to 10 constraints per task (including constraints in the task definition - // and those specified at runtime). - PlacementConstraints []*PlacementConstraint `locationName:"placementConstraints" type:"list"` - - // The placement strategy objects to use for the task. You can specify a maximum - // of five strategy rules per task. - PlacementStrategy []*PlacementStrategy `locationName:"placementStrategy" type:"list"` - - // The platform version the task should run. A platform version is only specified - // for tasks using the Fargate launch type. If one is not specified, the LATEST - // platform version is used by default. For more information, see AWS Fargate - // Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) - // in the Amazon Elastic Container Service Developer Guide. - PlatformVersion *string `locationName:"platformVersion" type:"string"` - - // Specifies whether to propagate the tags from the task definition or the service - // to the task. If no value is specified, the tags are not propagated. - PropagateTags *string `locationName:"propagateTags" type:"string" enum:"PropagateTags"` - - // An optional tag specified when a task is started. For example, if you automatically - // trigger a task to run a batch process job, you could apply a unique identifier - // for that job to your task with the startedBy parameter. You can then identify - // which tasks belong to that job by filtering the results of a ListTasks call - // with the startedBy value. Up to 36 letters (uppercase and lowercase), numbers, - // hyphens, and underscores are allowed. - // - // If a task is started by an Amazon ECS service, then the startedBy parameter - // contains the deployment ID of the service that starts it. - StartedBy *string `locationName:"startedBy" type:"string"` - - // The metadata that you apply to the task to help you categorize and organize - // them. Each tag consists of a key and an optional value, both of which you - // define. Tag keys can have a maximum character length of 128 characters, and - // tag values can have a maximum length of 256 characters. - Tags []*Tag `locationName:"tags" type:"list"` - - // The family and revision (family:revision) or full ARN of the task definition - // to run. If a revision is not specified, the latest ACTIVE revision is used. - // - // TaskDefinition is a required field - TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"` -} - -// String returns the string representation -func (s RunTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RunTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RunTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RunTaskInput"} - if s.TaskDefinition == nil { - invalidParams.Add(request.NewErrParamRequired("TaskDefinition")) - } - if s.NetworkConfiguration != nil { - if err := s.NetworkConfiguration.Validate(); err != nil { - invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCluster sets the Cluster field's value. -func (s *RunTaskInput) SetCluster(v string) *RunTaskInput { - s.Cluster = &v - return s -} - -// SetCount sets the Count field's value. -func (s *RunTaskInput) SetCount(v int64) *RunTaskInput { - s.Count = &v - return s -} - -// SetEnableECSManagedTags sets the EnableECSManagedTags field's value. -func (s *RunTaskInput) SetEnableECSManagedTags(v bool) *RunTaskInput { - s.EnableECSManagedTags = &v - return s -} - -// SetGroup sets the Group field's value. -func (s *RunTaskInput) SetGroup(v string) *RunTaskInput { - s.Group = &v - return s -} - -// SetLaunchType sets the LaunchType field's value. -func (s *RunTaskInput) SetLaunchType(v string) *RunTaskInput { - s.LaunchType = &v - return s -} - -// SetNetworkConfiguration sets the NetworkConfiguration field's value. -func (s *RunTaskInput) SetNetworkConfiguration(v *NetworkConfiguration) *RunTaskInput { - s.NetworkConfiguration = v - return s -} - -// SetOverrides sets the Overrides field's value. -func (s *RunTaskInput) SetOverrides(v *TaskOverride) *RunTaskInput { - s.Overrides = v - return s -} - -// SetPlacementConstraints sets the PlacementConstraints field's value. -func (s *RunTaskInput) SetPlacementConstraints(v []*PlacementConstraint) *RunTaskInput { - s.PlacementConstraints = v - return s -} - -// SetPlacementStrategy sets the PlacementStrategy field's value. -func (s *RunTaskInput) SetPlacementStrategy(v []*PlacementStrategy) *RunTaskInput { - s.PlacementStrategy = v - return s -} - -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *RunTaskInput) SetPlatformVersion(v string) *RunTaskInput { - s.PlatformVersion = &v - return s -} - -// SetPropagateTags sets the PropagateTags field's value. -func (s *RunTaskInput) SetPropagateTags(v string) *RunTaskInput { - s.PropagateTags = &v - return s -} - -// SetStartedBy sets the StartedBy field's value. -func (s *RunTaskInput) SetStartedBy(v string) *RunTaskInput { - s.StartedBy = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RunTaskInput) SetTags(v []*Tag) *RunTaskInput { - s.Tags = v - return s -} - -// SetTaskDefinition sets the TaskDefinition field's value. -func (s *RunTaskInput) SetTaskDefinition(v string) *RunTaskInput { - s.TaskDefinition = &v - return s -} - -type RunTaskOutput struct { - _ struct{} `type:"structure"` - - // Any failures associated with the call. - Failures []*Failure `locationName:"failures" type:"list"` - - // A full description of the tasks that were run. The tasks that were successfully - // placed on your cluster are described here. - Tasks []*Task `locationName:"tasks" type:"list"` -} - -// String returns the string representation -func (s RunTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RunTaskOutput) GoString() string { - return s.String() -} - -// SetFailures sets the Failures field's value. -func (s *RunTaskOutput) SetFailures(v []*Failure) *RunTaskOutput { - s.Failures = v - return s -} - -// SetTasks sets the Tasks field's value. -func (s *RunTaskOutput) SetTasks(v []*Task) *RunTaskOutput { - s.Tasks = v - return s -} - -// A floating-point percentage of the desired number of tasks to place and keep -// running in the service. This is used when a service uses the CODE_DEPLOY -// deployment controller type. -type Scale struct { - _ struct{} `type:"structure"` - - // The unit of measure for the scale value. - Unit *string `locationName:"unit" type:"string" enum:"ScaleUnit"` - - // The value, specified as a percent total of a service's desiredCount, to scale - // the task set. - Value *float64 `locationName:"value" type:"double"` -} - -// String returns the string representation -func (s Scale) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scale) GoString() string { - return s.String() -} - -// SetUnit sets the Unit field's value. -func (s *Scale) SetUnit(v string) *Scale { - s.Unit = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Scale) SetValue(v float64) *Scale { - s.Value = &v - return s -} - -// An object representing the secret to expose to your container. -type Secret struct { - _ struct{} `type:"structure"` - - // The value to set as the environment variable on the container. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The secret to expose to the container. Supported values are either the full - // ARN or the name of the parameter in the AWS Systems Manager Parameter Store. - // - // ValueFrom is a required field - ValueFrom *string `locationName:"valueFrom" type:"string" required:"true"` -} - -// String returns the string representation -func (s Secret) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Secret) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Secret) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Secret"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.ValueFrom == nil { - invalidParams.Add(request.NewErrParamRequired("ValueFrom")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *Secret) SetName(v string) *Secret { - s.Name = &v - return s -} - -// SetValueFrom sets the ValueFrom field's value. -func (s *Secret) SetValueFrom(v string) *Secret { - s.ValueFrom = &v - return s -} - -// Details on a service within a cluster -type Service struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the cluster that hosts the service. - ClusterArn *string `locationName:"clusterArn" type:"string"` - - // The Unix timestamp for when the service was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The principal that created the service. - CreatedBy *string `locationName:"createdBy" type:"string"` - - // Optional deployment parameters that control how many tasks run during the - // deployment and the ordering of stopping and starting tasks. - DeploymentConfiguration *DeploymentConfiguration `locationName:"deploymentConfiguration" type:"structure"` - - // The deployment controller type the service is using. - DeploymentController *DeploymentController `locationName:"deploymentController" type:"structure"` - - // The current state of deployments for the service. - Deployments []*Deployment `locationName:"deployments" type:"list"` - - // The desired number of instantiations of the task definition to keep running - // on the service. This value is specified when the service is created with - // CreateService, and it can be modified with UpdateService. - DesiredCount *int64 `locationName:"desiredCount" type:"integer"` - - // Specifies whether to enable Amazon ECS managed tags for the tasks in the - // service. For more information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) - // in the Amazon Elastic Container Service Developer Guide. - EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"` - - // The event stream for your service. A maximum of 100 of the latest events - // are displayed. - Events []*ServiceEvent `locationName:"events" type:"list"` - - // The period of time, in seconds, that the Amazon ECS service scheduler ignores - // unhealthy Elastic Load Balancing target health checks after a task has first - // started. - HealthCheckGracePeriodSeconds *int64 `locationName:"healthCheckGracePeriodSeconds" type:"integer"` - - // The launch type on which your service is running. For more information, see - // Amazon ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) - // in the Amazon Elastic Container Service Developer Guide. - LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` - - // A list of Elastic Load Balancing load balancer objects, containing the load - // balancer name, the container name (as it appears in a container definition), - // and the container port to access from the load balancer. - // - // Services with tasks that use the awsvpc network mode (for example, those - // with the Fargate launch type) only support Application Load Balancers and - // Network Load Balancers. Classic Load Balancers are not supported. Also, when - // you create any target groups for these services, you must choose ip as the - // target type, not instance. Tasks that use the awsvpc network mode are associated - // with an elastic network interface, not an Amazon EC2 instance. - LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` - - // The VPC subnet and security group configuration for tasks that receive their - // own elastic network interface by using the awsvpc networking mode. - NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` - - // The number of tasks in the cluster that are in the PENDING state. - PendingCount *int64 `locationName:"pendingCount" type:"integer"` - - // The placement constraints for the tasks in the service. - PlacementConstraints []*PlacementConstraint `locationName:"placementConstraints" type:"list"` - - // The placement strategy that determines how tasks for the service are placed. - PlacementStrategy []*PlacementStrategy `locationName:"placementStrategy" type:"list"` - - // The platform version on which your tasks in the service are running. A platform - // version is only specified for tasks using the Fargate launch type. If one - // is not specified, the LATEST platform version is used by default. For more - // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) - // in the Amazon Elastic Container Service Developer Guide. - PlatformVersion *string `locationName:"platformVersion" type:"string"` - - // Specifies whether to propagate the tags from the task definition or the service - // to the task. If no value is specified, the tags are not propagated. - PropagateTags *string `locationName:"propagateTags" type:"string" enum:"PropagateTags"` - - // The ARN of the IAM role associated with the service that allows the Amazon - // ECS container agent to register container instances with an Elastic Load - // Balancing load balancer. - RoleArn *string `locationName:"roleArn" type:"string"` - - // The number of tasks in the cluster that are in the RUNNING state. - RunningCount *int64 `locationName:"runningCount" type:"integer"` - - // The scheduling strategy to use for the service. For more information, see - // Services (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html). - // - // There are two service scheduler strategies available: - // - // * REPLICA-The replica scheduling strategy places and maintains the desired - // number of tasks across your cluster. By default, the service scheduler - // spreads tasks across Availability Zones. You can use task placement strategies - // and constraints to customize task placement decisions. - // - // * DAEMON-The daemon scheduling strategy deploys exactly one task on each - // container instance in your cluster. When you are using this strategy, - // do not specify a desired number of tasks or any task placement strategies. - // - // Fargate tasks do not support the DAEMON scheduling strategy. - SchedulingStrategy *string `locationName:"schedulingStrategy" type:"string" enum:"SchedulingStrategy"` - - // The ARN that identifies the service. The ARN contains the arn:aws:ecs namespace, - // followed by the Region of the service, the AWS account ID of the service - // owner, the service namespace, and then the service name. For example, arn:aws:ecs:region:012345678910:service/my-service. - ServiceArn *string `locationName:"serviceArn" type:"string"` - - // The name of your service. Up to 255 letters (uppercase and lowercase), numbers, - // hyphens, and underscores are allowed. Service names must be unique within - // a cluster, but you can have similarly named services in multiple clusters - // within a Region or across multiple Regions. - ServiceName *string `locationName:"serviceName" type:"string"` - - ServiceRegistries []*ServiceRegistry `locationName:"serviceRegistries" type:"list"` - - // The status of the service. The valid values are ACTIVE, DRAINING, or INACTIVE. - Status *string `locationName:"status" type:"string"` - - // The metadata that you apply to the service to help you categorize and organize - // them. Each tag consists of a key and an optional value, both of which you - // define. Tag keys can have a maximum character length of 128 characters, and - // tag values can have a maximum length of 256 characters. - Tags []*Tag `locationName:"tags" type:"list"` - - // The task definition to use for tasks in the service. This value is specified - // when the service is created with CreateService, and it can be modified with - // UpdateService. - TaskDefinition *string `locationName:"taskDefinition" type:"string"` - - // Information about a set of Amazon ECS tasks in an AWS CodeDeploy deployment. - // An Amazon ECS task set includes details such as the desired number of tasks, - // how many tasks are running, and whether the task set serves production traffic. - TaskSets []*TaskSet `locationName:"taskSets" type:"list"` -} - -// String returns the string representation -func (s Service) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Service) GoString() string { - return s.String() -} - -// SetClusterArn sets the ClusterArn field's value. -func (s *Service) SetClusterArn(v string) *Service { - s.ClusterArn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Service) SetCreatedAt(v time.Time) *Service { - s.CreatedAt = &v - return s -} - -// SetCreatedBy sets the CreatedBy field's value. -func (s *Service) SetCreatedBy(v string) *Service { - s.CreatedBy = &v - return s -} - -// SetDeploymentConfiguration sets the DeploymentConfiguration field's value. -func (s *Service) SetDeploymentConfiguration(v *DeploymentConfiguration) *Service { - s.DeploymentConfiguration = v - return s -} - -// SetDeploymentController sets the DeploymentController field's value. -func (s *Service) SetDeploymentController(v *DeploymentController) *Service { - s.DeploymentController = v - return s -} - -// SetDeployments sets the Deployments field's value. -func (s *Service) SetDeployments(v []*Deployment) *Service { - s.Deployments = v - return s -} - -// SetDesiredCount sets the DesiredCount field's value. -func (s *Service) SetDesiredCount(v int64) *Service { - s.DesiredCount = &v - return s -} - -// SetEnableECSManagedTags sets the EnableECSManagedTags field's value. -func (s *Service) SetEnableECSManagedTags(v bool) *Service { - s.EnableECSManagedTags = &v - return s -} - -// SetEvents sets the Events field's value. -func (s *Service) SetEvents(v []*ServiceEvent) *Service { - s.Events = v - return s -} - -// SetHealthCheckGracePeriodSeconds sets the HealthCheckGracePeriodSeconds field's value. -func (s *Service) SetHealthCheckGracePeriodSeconds(v int64) *Service { - s.HealthCheckGracePeriodSeconds = &v - return s -} - -// SetLaunchType sets the LaunchType field's value. -func (s *Service) SetLaunchType(v string) *Service { - s.LaunchType = &v - return s -} - -// SetLoadBalancers sets the LoadBalancers field's value. -func (s *Service) SetLoadBalancers(v []*LoadBalancer) *Service { - s.LoadBalancers = v - return s -} - -// SetNetworkConfiguration sets the NetworkConfiguration field's value. -func (s *Service) SetNetworkConfiguration(v *NetworkConfiguration) *Service { - s.NetworkConfiguration = v - return s -} - -// SetPendingCount sets the PendingCount field's value. -func (s *Service) SetPendingCount(v int64) *Service { - s.PendingCount = &v - return s -} - -// SetPlacementConstraints sets the PlacementConstraints field's value. -func (s *Service) SetPlacementConstraints(v []*PlacementConstraint) *Service { - s.PlacementConstraints = v - return s -} - -// SetPlacementStrategy sets the PlacementStrategy field's value. -func (s *Service) SetPlacementStrategy(v []*PlacementStrategy) *Service { - s.PlacementStrategy = v - return s -} - -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *Service) SetPlatformVersion(v string) *Service { - s.PlatformVersion = &v - return s -} - -// SetPropagateTags sets the PropagateTags field's value. -func (s *Service) SetPropagateTags(v string) *Service { - s.PropagateTags = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *Service) SetRoleArn(v string) *Service { - s.RoleArn = &v - return s -} - -// SetRunningCount sets the RunningCount field's value. -func (s *Service) SetRunningCount(v int64) *Service { - s.RunningCount = &v - return s -} - -// SetSchedulingStrategy sets the SchedulingStrategy field's value. -func (s *Service) SetSchedulingStrategy(v string) *Service { - s.SchedulingStrategy = &v - return s -} - -// SetServiceArn sets the ServiceArn field's value. -func (s *Service) SetServiceArn(v string) *Service { - s.ServiceArn = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *Service) SetServiceName(v string) *Service { - s.ServiceName = &v - return s -} - -// SetServiceRegistries sets the ServiceRegistries field's value. -func (s *Service) SetServiceRegistries(v []*ServiceRegistry) *Service { - s.ServiceRegistries = v - return s -} - -// SetStatus sets the Status field's value. -func (s *Service) SetStatus(v string) *Service { - s.Status = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Service) SetTags(v []*Tag) *Service { - s.Tags = v - return s -} - -// SetTaskDefinition sets the TaskDefinition field's value. -func (s *Service) SetTaskDefinition(v string) *Service { - s.TaskDefinition = &v - return s -} - -// SetTaskSets sets the TaskSets field's value. -func (s *Service) SetTaskSets(v []*TaskSet) *Service { - s.TaskSets = v - return s -} - -// Details on an event associated with a service. -type ServiceEvent struct { - _ struct{} `type:"structure"` - - // The Unix timestamp for when the event was triggered. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The ID string of the event. - Id *string `locationName:"id" type:"string"` - - // The event message. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s ServiceEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceEvent) GoString() string { - return s.String() -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *ServiceEvent) SetCreatedAt(v time.Time) *ServiceEvent { - s.CreatedAt = &v - return s -} - -// SetId sets the Id field's value. -func (s *ServiceEvent) SetId(v string) *ServiceEvent { - s.Id = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ServiceEvent) SetMessage(v string) *ServiceEvent { - s.Message = &v - return s -} - -// Details of the service registry. -type ServiceRegistry struct { - _ struct{} `type:"structure"` - - // The container name value, already specified in the task definition, to be - // used for your service discovery service. If the task definition that your - // service task specifies uses the bridge or host network mode, you must specify - // a containerName and containerPort combination from the task definition. If - // the task definition that your service task specifies uses the awsvpc network - // mode and a type SRV DNS record is used, you must specify either a containerName - // and containerPort combination or a port value, but not both. - ContainerName *string `locationName:"containerName" type:"string"` - - // The port value, already specified in the task definition, to be used for - // your service discovery service. If the task definition your service task - // specifies uses the bridge or host network mode, you must specify a containerName - // and containerPort combination from the task definition. If the task definition - // your service task specifies uses the awsvpc network mode and a type SRV DNS - // record is used, you must specify either a containerName and containerPort - // combination or a port value, but not both. - ContainerPort *int64 `locationName:"containerPort" type:"integer"` - - // The port value used if your service discovery service specified an SRV record. - // This field may be used if both the awsvpc network mode and SRV records are - // used. - Port *int64 `locationName:"port" type:"integer"` - - // The Amazon Resource Name (ARN) of the service registry. The currently supported - // service registry is Amazon Route 53 Auto Naming. For more information, see - // Service (https://docs.aws.amazon.com/Route53/latest/APIReference/API_autonaming_Service.html). - RegistryArn *string `locationName:"registryArn" type:"string"` -} - -// String returns the string representation -func (s ServiceRegistry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceRegistry) GoString() string { - return s.String() -} - -// SetContainerName sets the ContainerName field's value. -func (s *ServiceRegistry) SetContainerName(v string) *ServiceRegistry { - s.ContainerName = &v - return s -} - -// SetContainerPort sets the ContainerPort field's value. -func (s *ServiceRegistry) SetContainerPort(v int64) *ServiceRegistry { - s.ContainerPort = &v - return s -} - -// SetPort sets the Port field's value. -func (s *ServiceRegistry) SetPort(v int64) *ServiceRegistry { - s.Port = &v - return s -} - -// SetRegistryArn sets the RegistryArn field's value. -func (s *ServiceRegistry) SetRegistryArn(v string) *ServiceRegistry { - s.RegistryArn = &v - return s -} - -// The current account setting for a resource. -type Setting struct { - _ struct{} `type:"structure"` - - // The account resource name. - Name *string `locationName:"name" type:"string" enum:"SettingName"` - - // The ARN of the principal, which can be an IAM user, IAM role, or the root - // user. If this field is omitted, the authenticated user is assumed. - PrincipalArn *string `locationName:"principalArn" type:"string"` - - // The current account setting for the resource name. If enabled, then the resource - // will receive the new Amazon Resource Name (ARN) and resource identifier (ID) - // format. If disabled, then the resource will receive the old Amazon Resource - // Name (ARN) and resource identifier (ID) format. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s Setting) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Setting) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *Setting) SetName(v string) *Setting { - s.Name = &v - return s -} - -// SetPrincipalArn sets the PrincipalArn field's value. -func (s *Setting) SetPrincipalArn(v string) *Setting { - s.PrincipalArn = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Setting) SetValue(v string) *Setting { - s.Value = &v - return s -} - -type StartTaskInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster on which - // to start your task. If you do not specify a cluster, the default cluster - // is assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // The container instance IDs or full ARN entries for the container instances - // on which you would like to place your task. You can specify up to 10 container - // instances. - // - // ContainerInstances is a required field - ContainerInstances []*string `locationName:"containerInstances" type:"list" required:"true"` - - // Specifies whether to enable Amazon ECS managed tags for the task. For more - // information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) - // in the Amazon Elastic Container Service Developer Guide. - EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"` - - // The name of the task group to associate with the task. The default value - // is the family name of the task definition (for example, family:my-family-name). - Group *string `locationName:"group" type:"string"` - - // The VPC subnet and security group configuration for tasks that receive their - // own elastic network interface by using the awsvpc networking mode. - NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` - - // A list of container overrides in JSON format that specify the name of a container - // in the specified task definition and the overrides it should receive. You - // can override the default command for a container (that is specified in the - // task definition or Docker image) with a command override. You can also override - // existing environment variables (that are specified in the task definition - // or Docker image) on a container or add new environment variables to it with - // an environment override. - // - // A total of 8192 characters are allowed for overrides. This limit includes - // the JSON formatting characters of the override structure. - Overrides *TaskOverride `locationName:"overrides" type:"structure"` - - // Specifies whether to propagate the tags from the task definition or the service - // to the task. If no value is specified, the tags are not propagated. - PropagateTags *string `locationName:"propagateTags" type:"string" enum:"PropagateTags"` - - // An optional tag specified when a task is started. For example, if you automatically - // trigger a task to run a batch process job, you could apply a unique identifier - // for that job to your task with the startedBy parameter. You can then identify - // which tasks belong to that job by filtering the results of a ListTasks call - // with the startedBy value. Up to 36 letters (uppercase and lowercase), numbers, - // hyphens, and underscores are allowed. - // - // If a task is started by an Amazon ECS service, then the startedBy parameter - // contains the deployment ID of the service that starts it. - StartedBy *string `locationName:"startedBy" type:"string"` - - // The metadata that you apply to the task to help you categorize and organize - // them. Each tag consists of a key and an optional value, both of which you - // define. Tag keys can have a maximum character length of 128 characters, and - // tag values can have a maximum length of 256 characters. - Tags []*Tag `locationName:"tags" type:"list"` - - // The family and revision (family:revision) or full ARN of the task definition - // to start. If a revision is not specified, the latest ACTIVE revision is used. - // - // TaskDefinition is a required field - TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartTaskInput"} - if s.ContainerInstances == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerInstances")) - } - if s.TaskDefinition == nil { - invalidParams.Add(request.NewErrParamRequired("TaskDefinition")) - } - if s.NetworkConfiguration != nil { - if err := s.NetworkConfiguration.Validate(); err != nil { - invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCluster sets the Cluster field's value. -func (s *StartTaskInput) SetCluster(v string) *StartTaskInput { - s.Cluster = &v - return s -} - -// SetContainerInstances sets the ContainerInstances field's value. -func (s *StartTaskInput) SetContainerInstances(v []*string) *StartTaskInput { - s.ContainerInstances = v - return s -} - -// SetEnableECSManagedTags sets the EnableECSManagedTags field's value. -func (s *StartTaskInput) SetEnableECSManagedTags(v bool) *StartTaskInput { - s.EnableECSManagedTags = &v - return s -} - -// SetGroup sets the Group field's value. -func (s *StartTaskInput) SetGroup(v string) *StartTaskInput { - s.Group = &v - return s -} - -// SetNetworkConfiguration sets the NetworkConfiguration field's value. -func (s *StartTaskInput) SetNetworkConfiguration(v *NetworkConfiguration) *StartTaskInput { - s.NetworkConfiguration = v - return s -} - -// SetOverrides sets the Overrides field's value. -func (s *StartTaskInput) SetOverrides(v *TaskOverride) *StartTaskInput { - s.Overrides = v - return s -} - -// SetPropagateTags sets the PropagateTags field's value. -func (s *StartTaskInput) SetPropagateTags(v string) *StartTaskInput { - s.PropagateTags = &v - return s -} - -// SetStartedBy sets the StartedBy field's value. -func (s *StartTaskInput) SetStartedBy(v string) *StartTaskInput { - s.StartedBy = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *StartTaskInput) SetTags(v []*Tag) *StartTaskInput { - s.Tags = v - return s -} - -// SetTaskDefinition sets the TaskDefinition field's value. -func (s *StartTaskInput) SetTaskDefinition(v string) *StartTaskInput { - s.TaskDefinition = &v - return s -} - -type StartTaskOutput struct { - _ struct{} `type:"structure"` - - // Any failures associated with the call. - Failures []*Failure `locationName:"failures" type:"list"` - - // A full description of the tasks that were started. Each task that was successfully - // placed on your container instances is described. - Tasks []*Task `locationName:"tasks" type:"list"` -} - -// String returns the string representation -func (s StartTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartTaskOutput) GoString() string { - return s.String() -} - -// SetFailures sets the Failures field's value. -func (s *StartTaskOutput) SetFailures(v []*Failure) *StartTaskOutput { - s.Failures = v - return s -} - -// SetTasks sets the Tasks field's value. -func (s *StartTaskOutput) SetTasks(v []*Task) *StartTaskOutput { - s.Tasks = v - return s -} - -type StopTaskInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster that hosts - // the task to stop. If you do not specify a cluster, the default cluster is - // assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // An optional message specified when a task is stopped. For example, if you - // are using a custom scheduler, you can use this parameter to specify the reason - // for stopping the task here, and the message appears in subsequent DescribeTasks - // API operations on this task. Up to 255 characters are allowed in this message. - Reason *string `locationName:"reason" type:"string"` - - // The task ID or full ARN entry of the task to stop. - // - // Task is a required field - Task *string `locationName:"task" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopTaskInput"} - if s.Task == nil { - invalidParams.Add(request.NewErrParamRequired("Task")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCluster sets the Cluster field's value. -func (s *StopTaskInput) SetCluster(v string) *StopTaskInput { - s.Cluster = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *StopTaskInput) SetReason(v string) *StopTaskInput { - s.Reason = &v - return s -} - -// SetTask sets the Task field's value. -func (s *StopTaskInput) SetTask(v string) *StopTaskInput { - s.Task = &v - return s -} - -type StopTaskOutput struct { - _ struct{} `type:"structure"` - - // The task that was stopped. - Task *Task `locationName:"task" type:"structure"` -} - -// String returns the string representation -func (s StopTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopTaskOutput) GoString() string { - return s.String() -} - -// SetTask sets the Task field's value. -func (s *StopTaskOutput) SetTask(v *Task) *StopTaskOutput { - s.Task = v - return s -} - -type SubmitContainerStateChangeInput struct { - _ struct{} `type:"structure"` - - // The short name or full ARN of the cluster that hosts the container. - Cluster *string `locationName:"cluster" type:"string"` - - // The name of the container. - ContainerName *string `locationName:"containerName" type:"string"` - - // The exit code returned for the state change request. - ExitCode *int64 `locationName:"exitCode" type:"integer"` - - // The network bindings of the container. - NetworkBindings []*NetworkBinding `locationName:"networkBindings" type:"list"` - - // The reason for the state change request. - Reason *string `locationName:"reason" type:"string"` - - // The status of the state change request. - Status *string `locationName:"status" type:"string"` - - // The task ID or full Amazon Resource Name (ARN) of the task that hosts the - // container. - Task *string `locationName:"task" type:"string"` -} - -// String returns the string representation -func (s SubmitContainerStateChangeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubmitContainerStateChangeInput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *SubmitContainerStateChangeInput) SetCluster(v string) *SubmitContainerStateChangeInput { - s.Cluster = &v - return s -} - -// SetContainerName sets the ContainerName field's value. -func (s *SubmitContainerStateChangeInput) SetContainerName(v string) *SubmitContainerStateChangeInput { - s.ContainerName = &v - return s -} - -// SetExitCode sets the ExitCode field's value. -func (s *SubmitContainerStateChangeInput) SetExitCode(v int64) *SubmitContainerStateChangeInput { - s.ExitCode = &v - return s -} - -// SetNetworkBindings sets the NetworkBindings field's value. -func (s *SubmitContainerStateChangeInput) SetNetworkBindings(v []*NetworkBinding) *SubmitContainerStateChangeInput { - s.NetworkBindings = v - return s -} - -// SetReason sets the Reason field's value. -func (s *SubmitContainerStateChangeInput) SetReason(v string) *SubmitContainerStateChangeInput { - s.Reason = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SubmitContainerStateChangeInput) SetStatus(v string) *SubmitContainerStateChangeInput { - s.Status = &v - return s -} - -// SetTask sets the Task field's value. -func (s *SubmitContainerStateChangeInput) SetTask(v string) *SubmitContainerStateChangeInput { - s.Task = &v - return s -} - -type SubmitContainerStateChangeOutput struct { - _ struct{} `type:"structure"` - - // Acknowledgement of the state change. - Acknowledgment *string `locationName:"acknowledgment" type:"string"` -} - -// String returns the string representation -func (s SubmitContainerStateChangeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubmitContainerStateChangeOutput) GoString() string { - return s.String() -} - -// SetAcknowledgment sets the Acknowledgment field's value. -func (s *SubmitContainerStateChangeOutput) SetAcknowledgment(v string) *SubmitContainerStateChangeOutput { - s.Acknowledgment = &v - return s -} - -type SubmitTaskStateChangeInput struct { - _ struct{} `type:"structure"` - - // Any attachments associated with the state change request. - Attachments []*AttachmentStateChange `locationName:"attachments" type:"list"` - - // The short name or full Amazon Resource Name (ARN) of the cluster that hosts - // the task. - Cluster *string `locationName:"cluster" type:"string"` - - // Any containers associated with the state change request. - Containers []*ContainerStateChange `locationName:"containers" type:"list"` - - // The Unix timestamp for when the task execution stopped. - ExecutionStoppedAt *time.Time `locationName:"executionStoppedAt" type:"timestamp"` - - // The Unix timestamp for when the container image pull began. - PullStartedAt *time.Time `locationName:"pullStartedAt" type:"timestamp"` - - // The Unix timestamp for when the container image pull completed. - PullStoppedAt *time.Time `locationName:"pullStoppedAt" type:"timestamp"` - - // The reason for the state change request. - Reason *string `locationName:"reason" type:"string"` - - // The status of the state change request. - Status *string `locationName:"status" type:"string"` - - // The task ID or full ARN of the task in the state change request. - Task *string `locationName:"task" type:"string"` -} - -// String returns the string representation -func (s SubmitTaskStateChangeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubmitTaskStateChangeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SubmitTaskStateChangeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SubmitTaskStateChangeInput"} - if s.Attachments != nil { - for i, v := range s.Attachments { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attachments", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttachments sets the Attachments field's value. -func (s *SubmitTaskStateChangeInput) SetAttachments(v []*AttachmentStateChange) *SubmitTaskStateChangeInput { - s.Attachments = v - return s -} - -// SetCluster sets the Cluster field's value. -func (s *SubmitTaskStateChangeInput) SetCluster(v string) *SubmitTaskStateChangeInput { - s.Cluster = &v - return s -} - -// SetContainers sets the Containers field's value. -func (s *SubmitTaskStateChangeInput) SetContainers(v []*ContainerStateChange) *SubmitTaskStateChangeInput { - s.Containers = v - return s -} - -// SetExecutionStoppedAt sets the ExecutionStoppedAt field's value. -func (s *SubmitTaskStateChangeInput) SetExecutionStoppedAt(v time.Time) *SubmitTaskStateChangeInput { - s.ExecutionStoppedAt = &v - return s -} - -// SetPullStartedAt sets the PullStartedAt field's value. -func (s *SubmitTaskStateChangeInput) SetPullStartedAt(v time.Time) *SubmitTaskStateChangeInput { - s.PullStartedAt = &v - return s -} - -// SetPullStoppedAt sets the PullStoppedAt field's value. -func (s *SubmitTaskStateChangeInput) SetPullStoppedAt(v time.Time) *SubmitTaskStateChangeInput { - s.PullStoppedAt = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *SubmitTaskStateChangeInput) SetReason(v string) *SubmitTaskStateChangeInput { - s.Reason = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SubmitTaskStateChangeInput) SetStatus(v string) *SubmitTaskStateChangeInput { - s.Status = &v - return s -} - -// SetTask sets the Task field's value. -func (s *SubmitTaskStateChangeInput) SetTask(v string) *SubmitTaskStateChangeInput { - s.Task = &v - return s -} - -type SubmitTaskStateChangeOutput struct { - _ struct{} `type:"structure"` - - // Acknowledgement of the state change. - Acknowledgment *string `locationName:"acknowledgment" type:"string"` -} - -// String returns the string representation -func (s SubmitTaskStateChangeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubmitTaskStateChangeOutput) GoString() string { - return s.String() -} - -// SetAcknowledgment sets the Acknowledgment field's value. -func (s *SubmitTaskStateChangeOutput) SetAcknowledgment(v string) *SubmitTaskStateChangeOutput { - s.Acknowledgment = &v - return s -} - -// A list of namespaced kernel parameters to set in the container. This parameter -// maps to Sysctls in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) -// section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) -// and the --sysctl option to docker run (https://docs.docker.com/engine/reference/run/). -// -// It is not recommended that you specify network-related systemControls parameters -// for multiple containers in a single task that also uses either the awsvpc -// or host network mode for the following reasons: -// -// * For tasks that use the awsvpc network mode, if you set systemControls -// for any container, it applies to all containers in the task. If you set -// different systemControls for multiple containers in a single task, the -// container that is started last determines which systemControls take effect. -// -// * For tasks that use the host network mode, the systemControls parameter -// applies to the container instance's kernel parameter as well as that of -// all containers of any tasks running on that container instance. -type SystemControl struct { - _ struct{} `type:"structure"` - - // The namespaced kernel parameter for which to set a value. - Namespace *string `locationName:"namespace" type:"string"` - - // The value for the namespaced kernel parameter specified in namespace. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s SystemControl) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SystemControl) GoString() string { - return s.String() -} - -// SetNamespace sets the Namespace field's value. -func (s *SystemControl) SetNamespace(v string) *SystemControl { - s.Namespace = &v - return s -} - -// SetValue sets the Value field's value. -func (s *SystemControl) SetValue(v string) *SystemControl { - s.Value = &v - return s -} - -// The metadata that you apply to a resource to help you categorize and organize -// them. Each tag consists of a key and an optional value, both of which you -// define. Tag keys can have a maximum character length of 128 characters, and -// tag values can have a maximum length of 256 characters. -type Tag struct { - _ struct{} `type:"structure"` - - // One part of a key-value pair that make up a tag. A key is a general label - // that acts like a category for more specific tag values. - Key *string `locationName:"key" min:"1" type:"string"` - - // The optional part of a key-value pair that make up a tag. A value acts as - // a descriptor within a tag category (key). - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource to which to add tags. Currently, - // the supported resources are Amazon ECS tasks, services, task definitions, - // clusters, and container instances. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` - - // The tags to add to the resource. A tag is an array of key-value pairs. Tag - // keys can have a maximum character length of 128 characters, and tag values - // can have a maximum length of 256 characters. - // - // Tags is a required field - Tags []*Tag `locationName:"tags" type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -// Details on a task in a cluster. -type Task struct { - _ struct{} `type:"structure"` - - // The Elastic Network Adapter associated with the task if the task uses the - // awsvpc network mode. - Attachments []*Attachment `locationName:"attachments" type:"list"` - - // The ARN of the cluster that hosts the task. - ClusterArn *string `locationName:"clusterArn" type:"string"` - - // The connectivity status of a task. - Connectivity *string `locationName:"connectivity" type:"string" enum:"Connectivity"` - - // The Unix timestamp for when the task last went into CONNECTED status. - ConnectivityAt *time.Time `locationName:"connectivityAt" type:"timestamp"` - - // The ARN of the container instances that host the task. - ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"` - - // The containers associated with the task. - Containers []*Container `locationName:"containers" type:"list"` - - // The number of CPU units used by the task as expressed in a task definition. - // It can be expressed as an integer using CPU units, for example 1024. It can - // also be expressed as a string using vCPUs, for example 1 vCPU or 1 vcpu. - // String values are converted to an integer indicating the CPU units when the - // task definition is registered. - // - // If you are using the EC2 launch type, this field is optional. Supported values - // are between 128 CPU units (0.125 vCPUs) and 10240 CPU units (10 vCPUs). - // - // If you are using the Fargate launch type, this field is required and you - // must use one of the following values, which determines your range of supported - // values for the memory parameter: - // - // * 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), - // 2048 (2 GB) - // - // * 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 - // (3 GB), 4096 (4 GB) - // - // * 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 - // (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - // - // * 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 - // (16 GB) in increments of 1024 (1 GB) - // - // * 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 - // (30 GB) in increments of 1024 (1 GB) - Cpu *string `locationName:"cpu" type:"string"` - - // The Unix timestamp for when the task was created (the task entered the PENDING - // state). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The desired status of the task. For more information, see Task Lifecycle - // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_life_cycle.html). - DesiredStatus *string `locationName:"desiredStatus" type:"string"` - - // The Unix timestamp for when the task execution stopped. - ExecutionStoppedAt *time.Time `locationName:"executionStoppedAt" type:"timestamp"` - - // The name of the task group associated with the task. - Group *string `locationName:"group" type:"string"` - - // The health status for the task, which is determined by the health of the - // essential containers in the task. If all essential containers in the task - // are reporting as HEALTHY, then the task status also reports as HEALTHY. If - // any essential containers in the task are reporting as UNHEALTHY or UNKNOWN, - // then the task status also reports as UNHEALTHY or UNKNOWN, accordingly. - // - // The Amazon ECS container agent does not monitor or report on Docker health - // checks that are embedded in a container image (such as those specified in - // a parent image or from the image's Dockerfile) and not specified in the container - // definition. Health check parameters that are specified in a container definition - // override any Docker health checks that exist in the container image. - HealthStatus *string `locationName:"healthStatus" type:"string" enum:"HealthStatus"` - - // The last known status of the task. For more information, see Task Lifecycle - // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_life_cycle.html). - LastStatus *string `locationName:"lastStatus" type:"string"` - - // The launch type on which your task is running. For more information, see - // Amazon ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) - // in the Amazon Elastic Container Service Developer Guide. - LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` - - // The amount of memory (in MiB) used by the task as expressed in a task definition. - // It can be expressed as an integer using MiB, for example 1024. It can also - // be expressed as a string using GB, for example 1GB or 1 GB. String values - // are converted to an integer indicating the MiB when the task definition is - // registered. - // - // If you are using the EC2 launch type, this field is optional. - // - // If you are using the Fargate launch type, this field is required and you - // must use one of the following values, which determines your range of supported - // values for the cpu parameter: - // - // * 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 - // vCPU) - // - // * 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: - // 512 (.5 vCPU) - // - // * 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 - // (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU) - // - // * Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - - // Available cpu values: 2048 (2 vCPU) - // - // * Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - - // Available cpu values: 4096 (4 vCPU) - Memory *string `locationName:"memory" type:"string"` - - // One or more container overrides. - Overrides *TaskOverride `locationName:"overrides" type:"structure"` - - // The platform version on which your task is running. A platform version is - // only specified for tasks using the Fargate launch type. If one is not specified, - // the LATEST platform version is used by default. For more information, see - // AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) - // in the Amazon Elastic Container Service Developer Guide. - PlatformVersion *string `locationName:"platformVersion" type:"string"` - - // The Unix timestamp for when the container image pull began. - PullStartedAt *time.Time `locationName:"pullStartedAt" type:"timestamp"` - - // The Unix timestamp for when the container image pull completed. - PullStoppedAt *time.Time `locationName:"pullStoppedAt" type:"timestamp"` - - // The Unix timestamp for when the task started (the task transitioned from - // the PENDING state to the RUNNING state). - StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` - - // The tag specified when a task is started. If the task is started by an Amazon - // ECS service, then the startedBy parameter contains the deployment ID of the - // service that starts it. - StartedBy *string `locationName:"startedBy" type:"string"` - - // The stop code indicating why a task was stopped. The stoppedReason may contain - // additional details. - StopCode *string `locationName:"stopCode" type:"string" enum:"TaskStopCode"` - - // The Unix timestamp for when the task was stopped (the task transitioned from - // the RUNNING state to the STOPPED state). - StoppedAt *time.Time `locationName:"stoppedAt" type:"timestamp"` - - // The reason that the task was stopped. - StoppedReason *string `locationName:"stoppedReason" type:"string"` - - // The Unix timestamp for when the task stops (transitions from the RUNNING - // state to STOPPED). - StoppingAt *time.Time `locationName:"stoppingAt" type:"timestamp"` - - // The metadata that you apply to the task to help you categorize and organize - // them. Each tag consists of a key and an optional value, both of which you - // define. Tag keys can have a maximum character length of 128 characters, and - // tag values can have a maximum length of 256 characters. - Tags []*Tag `locationName:"tags" type:"list"` - - // The Amazon Resource Name (ARN) of the task. - TaskArn *string `locationName:"taskArn" type:"string"` - - // The ARN of the task definition that creates the task. - TaskDefinitionArn *string `locationName:"taskDefinitionArn" type:"string"` - - // The version counter for the task. Every time a task experiences a change - // that triggers a CloudWatch event, the version counter is incremented. If - // you are replicating your Amazon ECS task state with CloudWatch Events, you - // can compare the version of a task reported by the Amazon ECS API actionss - // with the version reported in CloudWatch Events for the task (inside the detail - // object) to verify that the version in your event stream is current. - Version *int64 `locationName:"version" type:"long"` -} - -// String returns the string representation -func (s Task) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Task) GoString() string { - return s.String() -} - -// SetAttachments sets the Attachments field's value. -func (s *Task) SetAttachments(v []*Attachment) *Task { - s.Attachments = v - return s -} - -// SetClusterArn sets the ClusterArn field's value. -func (s *Task) SetClusterArn(v string) *Task { - s.ClusterArn = &v - return s -} - -// SetConnectivity sets the Connectivity field's value. -func (s *Task) SetConnectivity(v string) *Task { - s.Connectivity = &v - return s -} - -// SetConnectivityAt sets the ConnectivityAt field's value. -func (s *Task) SetConnectivityAt(v time.Time) *Task { - s.ConnectivityAt = &v - return s -} - -// SetContainerInstanceArn sets the ContainerInstanceArn field's value. -func (s *Task) SetContainerInstanceArn(v string) *Task { - s.ContainerInstanceArn = &v - return s -} - -// SetContainers sets the Containers field's value. -func (s *Task) SetContainers(v []*Container) *Task { - s.Containers = v - return s -} - -// SetCpu sets the Cpu field's value. -func (s *Task) SetCpu(v string) *Task { - s.Cpu = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Task) SetCreatedAt(v time.Time) *Task { - s.CreatedAt = &v - return s -} - -// SetDesiredStatus sets the DesiredStatus field's value. -func (s *Task) SetDesiredStatus(v string) *Task { - s.DesiredStatus = &v - return s -} - -// SetExecutionStoppedAt sets the ExecutionStoppedAt field's value. -func (s *Task) SetExecutionStoppedAt(v time.Time) *Task { - s.ExecutionStoppedAt = &v - return s -} - -// SetGroup sets the Group field's value. -func (s *Task) SetGroup(v string) *Task { - s.Group = &v - return s -} - -// SetHealthStatus sets the HealthStatus field's value. -func (s *Task) SetHealthStatus(v string) *Task { - s.HealthStatus = &v - return s -} - -// SetLastStatus sets the LastStatus field's value. -func (s *Task) SetLastStatus(v string) *Task { - s.LastStatus = &v - return s -} - -// SetLaunchType sets the LaunchType field's value. -func (s *Task) SetLaunchType(v string) *Task { - s.LaunchType = &v - return s -} - -// SetMemory sets the Memory field's value. -func (s *Task) SetMemory(v string) *Task { - s.Memory = &v - return s -} - -// SetOverrides sets the Overrides field's value. -func (s *Task) SetOverrides(v *TaskOverride) *Task { - s.Overrides = v - return s -} - -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *Task) SetPlatformVersion(v string) *Task { - s.PlatformVersion = &v - return s -} - -// SetPullStartedAt sets the PullStartedAt field's value. -func (s *Task) SetPullStartedAt(v time.Time) *Task { - s.PullStartedAt = &v - return s -} - -// SetPullStoppedAt sets the PullStoppedAt field's value. -func (s *Task) SetPullStoppedAt(v time.Time) *Task { - s.PullStoppedAt = &v - return s -} - -// SetStartedAt sets the StartedAt field's value. -func (s *Task) SetStartedAt(v time.Time) *Task { - s.StartedAt = &v - return s -} - -// SetStartedBy sets the StartedBy field's value. -func (s *Task) SetStartedBy(v string) *Task { - s.StartedBy = &v - return s -} - -// SetStopCode sets the StopCode field's value. -func (s *Task) SetStopCode(v string) *Task { - s.StopCode = &v - return s -} - -// SetStoppedAt sets the StoppedAt field's value. -func (s *Task) SetStoppedAt(v time.Time) *Task { - s.StoppedAt = &v - return s -} - -// SetStoppedReason sets the StoppedReason field's value. -func (s *Task) SetStoppedReason(v string) *Task { - s.StoppedReason = &v - return s -} - -// SetStoppingAt sets the StoppingAt field's value. -func (s *Task) SetStoppingAt(v time.Time) *Task { - s.StoppingAt = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Task) SetTags(v []*Tag) *Task { - s.Tags = v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *Task) SetTaskArn(v string) *Task { - s.TaskArn = &v - return s -} - -// SetTaskDefinitionArn sets the TaskDefinitionArn field's value. -func (s *Task) SetTaskDefinitionArn(v string) *Task { - s.TaskDefinitionArn = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *Task) SetVersion(v int64) *Task { - s.Version = &v - return s -} - -// Details of a task definition. -type TaskDefinition struct { - _ struct{} `type:"structure"` - - // The launch type to use with your task. For more information, see Amazon ECS - // Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) - // in the Amazon Elastic Container Service Developer Guide. - Compatibilities []*string `locationName:"compatibilities" type:"list"` - - // A list of container definitions in JSON format that describe the different - // containers that make up your task. For more information about container definition - // parameters and defaults, see Amazon ECS Task Definitions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) - // in the Amazon Elastic Container Service Developer Guide. - ContainerDefinitions []*ContainerDefinition `locationName:"containerDefinitions" type:"list"` - - // The number of cpu units used by the task. If you are using the EC2 launch - // type, this field is optional and any value can be used. If you are using - // the Fargate launch type, this field is required and you must use one of the - // following values, which determines your range of valid values for the memory - // parameter: - // - // * 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), - // 2048 (2 GB) - // - // * 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 - // (3 GB), 4096 (4 GB) - // - // * 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 - // (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - // - // * 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 - // (16 GB) in increments of 1024 (1 GB) - // - // * 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 - // (30 GB) in increments of 1024 (1 GB) - Cpu *string `locationName:"cpu" type:"string"` - - // The Amazon Resource Name (ARN) of the task execution role that the Amazon - // ECS container agent and the Docker daemon can assume. - ExecutionRoleArn *string `locationName:"executionRoleArn" type:"string"` - - // The family of your task definition, used as the definition name. - Family *string `locationName:"family" type:"string"` - - // The IPC resource namespace to use for the containers in the task. The valid - // values are host, task, or none. If host is specified, then all containers - // within the tasks that specified the host IPC mode on the same container instance - // share the same IPC resources with the host Amazon EC2 instance. If task is - // specified, all containers within the specified task share the same IPC resources. - // If none is specified, then IPC resources within the containers of a task - // are private and not shared with other containers in a task or on the container - // instance. If no value is specified, then the IPC resource namespace sharing - // depends on the Docker daemon setting on the container instance. For more - // information, see IPC settings (https://docs.docker.com/engine/reference/run/#ipc-settings---ipc) - // in the Docker run reference. - // - // If the host IPC mode is used, be aware that there is a heightened risk of - // undesired IPC namespace expose. For more information, see Docker security - // (https://docs.docker.com/engine/security/security/). - // - // If you are setting namespaced kernel parameters using systemControls for - // the containers in the task, the following will apply to your IPC resource - // namespace. For more information, see System Controls (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) - // in the Amazon Elastic Container Service Developer Guide. - // - // * For tasks that use the host IPC mode, IPC namespace related systemControls - // are not supported. - // - // * For tasks that use the task IPC mode, IPC namespace related systemControls - // will apply to all containers within a task. - // - // This parameter is not supported for Windows containers or tasks using the - // Fargate launch type. - IpcMode *string `locationName:"ipcMode" type:"string" enum:"IpcMode"` - - // The amount (in MiB) of memory used by the task. If using the EC2 launch type, - // this field is optional and any value can be used. If using the Fargate launch - // type, this field is required and you must use one of the following values, - // which determines your range of valid values for the cpu parameter: - // - // * 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 - // vCPU) - // - // * 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: - // 512 (.5 vCPU) - // - // * 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 - // (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU) - // - // * Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - - // Available cpu values: 2048 (2 vCPU) - // - // * Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - - // Available cpu values: 4096 (4 vCPU) - Memory *string `locationName:"memory" type:"string"` - - // The Docker networking mode to use for the containers in the task. The valid - // values are none, bridge, awsvpc, and host. The default Docker network mode - // is bridge. If you are using the Fargate launch type, the awsvpc network mode - // is required. If you are using the EC2 launch type, any network mode can be - // used. If the network mode is set to none, you cannot specify port mappings - // in your container definitions, and the tasks containers do not have external - // connectivity. The host and awsvpc network modes offer the highest networking - // performance for containers because they use the EC2 network stack instead - // of the virtualized network stack provided by the bridge mode. - // - // With the host and awsvpc network modes, exposed container ports are mapped - // directly to the corresponding host port (for the host network mode) or the - // attached elastic network interface port (for the awsvpc network mode), so - // you cannot take advantage of dynamic host port mappings. - // - // If the network mode is awsvpc, the task is allocated an elastic network interface, - // and you must specify a NetworkConfiguration value when you create a service - // or run a task with the task definition. For more information, see Task Networking - // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) - // in the Amazon Elastic Container Service Developer Guide. - // - // Currently, only Amazon ECS-optimized AMIs, other Amazon Linux variants with - // the ecs-init package, or AWS Fargate infrastructure support the awsvpc network - // mode. - // - // If the network mode is host, you cannot run multiple instantiations of the - // same task on a single container instance when port mappings are used. - // - // Docker for Windows uses different network modes than Docker for Linux. When - // you register a task definition with Windows containers, you must not specify - // a network mode. If you use the console to register a task definition with - // Windows containers, you must choose the network mode object. - // - // For more information, see Network settings (https://docs.docker.com/engine/reference/run/#network-settings) - // in the Docker run reference. - NetworkMode *string `locationName:"networkMode" type:"string" enum:"NetworkMode"` - - // The process namespace to use for the containers in the task. The valid values - // are host or task. If host is specified, then all containers within the tasks - // that specified the host PID mode on the same container instance share the - // same IPC resources with the host Amazon EC2 instance. If task is specified, - // all containers within the specified task share the same process namespace. - // If no value is specified, the default is a private namespace. For more information, - // see PID settings (https://docs.docker.com/engine/reference/run/#pid-settings---pid) - // in the Docker run reference. - // - // If the host PID mode is used, be aware that there is a heightened risk of - // undesired process namespace expose. For more information, see Docker security - // (https://docs.docker.com/engine/security/security/). - // - // This parameter is not supported for Windows containers or tasks using the - // Fargate launch type. - PidMode *string `locationName:"pidMode" type:"string" enum:"PidMode"` - - // An array of placement constraint objects to use for tasks. This field is - // not valid if you are using the Fargate launch type for your task. - PlacementConstraints []*TaskDefinitionPlacementConstraint `locationName:"placementConstraints" type:"list"` - - // The container instance attributes required by your task. This field is not - // valid if you are using the Fargate launch type for your task. - RequiresAttributes []*Attribute `locationName:"requiresAttributes" type:"list"` - - // The launch type that the task is using. - RequiresCompatibilities []*string `locationName:"requiresCompatibilities" type:"list"` - - // The revision of the task in a particular family. The revision is a version - // number of a task definition in a family. When you register a task definition - // for the first time, the revision is 1. Each time that you register a new - // revision of a task definition in the same family, the revision value always - // increases by one, even if you have deregistered previous revisions in this - // family. - Revision *int64 `locationName:"revision" type:"integer"` - - // The status of the task definition. - Status *string `locationName:"status" type:"string" enum:"TaskDefinitionStatus"` - - // The full Amazon Resource Name (ARN) of the task definition. - TaskDefinitionArn *string `locationName:"taskDefinitionArn" type:"string"` - - // The ARN of the IAM role that containers in this task can assume. All containers - // in this task are granted the permissions that are specified in this role. - // - // IAM roles for tasks on Windows require that the -EnableTaskIAMRole option - // is set when you launch the Amazon ECS-optimized Windows AMI. Your containers - // must also run some configuration code in order to take advantage of the feature. - // For more information, see Windows IAM Roles for Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows_task_IAM_roles.html) - // in the Amazon Elastic Container Service Developer Guide. - TaskRoleArn *string `locationName:"taskRoleArn" type:"string"` - - // The list of volumes in a task. - // - // If you are using the Fargate launch type, the host and sourcePath parameters - // are not supported. - // - // For more information about volume definition parameters and defaults, see - // Amazon ECS Task Definitions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) - // in the Amazon Elastic Container Service Developer Guide. - Volumes []*Volume `locationName:"volumes" type:"list"` -} - -// String returns the string representation -func (s TaskDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskDefinition) GoString() string { - return s.String() -} - -// SetCompatibilities sets the Compatibilities field's value. -func (s *TaskDefinition) SetCompatibilities(v []*string) *TaskDefinition { - s.Compatibilities = v - return s -} - -// SetContainerDefinitions sets the ContainerDefinitions field's value. -func (s *TaskDefinition) SetContainerDefinitions(v []*ContainerDefinition) *TaskDefinition { - s.ContainerDefinitions = v - return s -} - -// SetCpu sets the Cpu field's value. -func (s *TaskDefinition) SetCpu(v string) *TaskDefinition { - s.Cpu = &v - return s -} - -// SetExecutionRoleArn sets the ExecutionRoleArn field's value. -func (s *TaskDefinition) SetExecutionRoleArn(v string) *TaskDefinition { - s.ExecutionRoleArn = &v - return s -} - -// SetFamily sets the Family field's value. -func (s *TaskDefinition) SetFamily(v string) *TaskDefinition { - s.Family = &v - return s -} - -// SetIpcMode sets the IpcMode field's value. -func (s *TaskDefinition) SetIpcMode(v string) *TaskDefinition { - s.IpcMode = &v - return s -} - -// SetMemory sets the Memory field's value. -func (s *TaskDefinition) SetMemory(v string) *TaskDefinition { - s.Memory = &v - return s -} - -// SetNetworkMode sets the NetworkMode field's value. -func (s *TaskDefinition) SetNetworkMode(v string) *TaskDefinition { - s.NetworkMode = &v - return s -} - -// SetPidMode sets the PidMode field's value. -func (s *TaskDefinition) SetPidMode(v string) *TaskDefinition { - s.PidMode = &v - return s -} - -// SetPlacementConstraints sets the PlacementConstraints field's value. -func (s *TaskDefinition) SetPlacementConstraints(v []*TaskDefinitionPlacementConstraint) *TaskDefinition { - s.PlacementConstraints = v - return s -} - -// SetRequiresAttributes sets the RequiresAttributes field's value. -func (s *TaskDefinition) SetRequiresAttributes(v []*Attribute) *TaskDefinition { - s.RequiresAttributes = v - return s -} - -// SetRequiresCompatibilities sets the RequiresCompatibilities field's value. -func (s *TaskDefinition) SetRequiresCompatibilities(v []*string) *TaskDefinition { - s.RequiresCompatibilities = v - return s -} - -// SetRevision sets the Revision field's value. -func (s *TaskDefinition) SetRevision(v int64) *TaskDefinition { - s.Revision = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *TaskDefinition) SetStatus(v string) *TaskDefinition { - s.Status = &v - return s -} - -// SetTaskDefinitionArn sets the TaskDefinitionArn field's value. -func (s *TaskDefinition) SetTaskDefinitionArn(v string) *TaskDefinition { - s.TaskDefinitionArn = &v - return s -} - -// SetTaskRoleArn sets the TaskRoleArn field's value. -func (s *TaskDefinition) SetTaskRoleArn(v string) *TaskDefinition { - s.TaskRoleArn = &v - return s -} - -// SetVolumes sets the Volumes field's value. -func (s *TaskDefinition) SetVolumes(v []*Volume) *TaskDefinition { - s.Volumes = v - return s -} - -// An object representing a constraint on task placement in the task definition. -// -// If you are using the Fargate launch type, task placement constraints are -// not supported. -// -// For more information, see Task Placement Constraints (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html) -// in the Amazon Elastic Container Service Developer Guide. -type TaskDefinitionPlacementConstraint struct { - _ struct{} `type:"structure"` - - // A cluster query language expression to apply to the constraint. For more - // information, see Cluster Query Language (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) - // in the Amazon Elastic Container Service Developer Guide. - Expression *string `locationName:"expression" type:"string"` - - // The type of constraint. The DistinctInstance constraint ensures that each - // task in a particular group is running on a different container instance. - // The MemberOf constraint restricts selection to be from a group of valid candidates. - Type *string `locationName:"type" type:"string" enum:"TaskDefinitionPlacementConstraintType"` -} - -// String returns the string representation -func (s TaskDefinitionPlacementConstraint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskDefinitionPlacementConstraint) GoString() string { - return s.String() -} - -// SetExpression sets the Expression field's value. -func (s *TaskDefinitionPlacementConstraint) SetExpression(v string) *TaskDefinitionPlacementConstraint { - s.Expression = &v - return s -} - -// SetType sets the Type field's value. -func (s *TaskDefinitionPlacementConstraint) SetType(v string) *TaskDefinitionPlacementConstraint { - s.Type = &v - return s -} - -// The overrides associated with a task. -type TaskOverride struct { - _ struct{} `type:"structure"` - - // One or more container overrides sent to a task. - ContainerOverrides []*ContainerOverride `locationName:"containerOverrides" type:"list"` - - // The Amazon Resource Name (ARN) of the task execution role that the Amazon - // ECS container agent and the Docker daemon can assume. - ExecutionRoleArn *string `locationName:"executionRoleArn" type:"string"` - - // The Amazon Resource Name (ARN) of the IAM role that containers in this task - // can assume. All containers in this task are granted the permissions that - // are specified in this role. - TaskRoleArn *string `locationName:"taskRoleArn" type:"string"` -} - -// String returns the string representation -func (s TaskOverride) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskOverride) GoString() string { - return s.String() -} - -// SetContainerOverrides sets the ContainerOverrides field's value. -func (s *TaskOverride) SetContainerOverrides(v []*ContainerOverride) *TaskOverride { - s.ContainerOverrides = v - return s -} - -// SetExecutionRoleArn sets the ExecutionRoleArn field's value. -func (s *TaskOverride) SetExecutionRoleArn(v string) *TaskOverride { - s.ExecutionRoleArn = &v - return s -} - -// SetTaskRoleArn sets the TaskRoleArn field's value. -func (s *TaskOverride) SetTaskRoleArn(v string) *TaskOverride { - s.TaskRoleArn = &v - return s -} - -// Information about a set of Amazon ECS tasks in an AWS CodeDeploy deployment. -// An Amazon ECS task set includes details such as the desired number of tasks, -// how many tasks are running, and whether the task set serves production traffic. -type TaskSet struct { - _ struct{} `type:"structure"` - - // The computed desired count for the task set. This is calculated by multiplying - // the service's desiredCount by the task set's scale percentage. - ComputedDesiredCount *int64 `locationName:"computedDesiredCount" type:"integer"` - - // The Unix timestamp for when the task set was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The deployment ID of the AWS CodeDeploy deployment. - ExternalId *string `locationName:"externalId" type:"string"` - - // The ID of the task set. - Id *string `locationName:"id" type:"string"` - - // The launch type the tasks in the task set are using. For more information, - // see Amazon ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) - // in the Amazon Elastic Container Service Developer Guide. - LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` - - // Details on a load balancer that is used with a task set. - LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` - - // The network configuration for the task set. - NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` - - // The number of tasks in the task set that are in the PENDING status during - // a deployment. A task in the PENDING state is preparing to enter the RUNNING - // state. A task set enters the PENDING status when it launches for the first - // time, or when it is restarted after being in the STOPPED state. - PendingCount *int64 `locationName:"pendingCount" type:"integer"` - - // The platform version on which the tasks in the task set are running. A platform - // version is only specified for tasks using the Fargate launch type. If one - // is not specified, the LATEST platform version is used by default. For more - // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) - // in the Amazon Elastic Container Service Developer Guide. - PlatformVersion *string `locationName:"platformVersion" type:"string"` - - // The number of tasks in the task set that are in the RUNNING status during - // a deployment. A task in the RUNNING state is running and ready for use. - RunningCount *int64 `locationName:"runningCount" type:"integer"` - - // A floating-point percentage of the desired number of tasks to place and keep - // running in the service. - Scale *Scale `locationName:"scale" type:"structure"` - - // The stability status, which indicates whether the task set has reached a - // steady state. If the following conditions are met, the task set will be in - // STEADY_STATE: - // - // * The task runningCount is equal to the computedDesiredCount. - // - // * The pendingCount is 0. - // - // * There are no tasks running on container instances in the DRAINING status. - // - // * All tasks are reporting a healthy status from the load balancers, service - // discovery, and container health checks. - // - // If any of those conditions are not met, the stability status returns STABILIZING. - StabilityStatus *string `locationName:"stabilityStatus" type:"string" enum:"StabilityStatus"` - - // The Unix timestamp for when the task set stability status was retrieved. - StabilityStatusAt *time.Time `locationName:"stabilityStatusAt" type:"timestamp"` - - // The tag specified when a task set is started. If the task is started by an - // AWS CodeDeploy deployment, then the startedBy parameter is CODE_DEPLOY. - StartedBy *string `locationName:"startedBy" type:"string"` - - // The status of the task set. The following describes each state: - // - // PRIMARYThe task set is serving production traffic. - // - // ACTIVEThe task set is not serving production traffic. - // - // DRAININGThe tasks in the task set are being stopped and their corresponding - // targets are being deregistered from their target group. - Status *string `locationName:"status" type:"string"` - - // The task definition the task set is using. - TaskDefinition *string `locationName:"taskDefinition" type:"string"` - - // The Amazon Resource Name (ARN) of the task set. - TaskSetArn *string `locationName:"taskSetArn" type:"string"` - - // The Unix timestamp for when the task set was last updated. - UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp"` -} - -// String returns the string representation -func (s TaskSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskSet) GoString() string { - return s.String() -} - -// SetComputedDesiredCount sets the ComputedDesiredCount field's value. -func (s *TaskSet) SetComputedDesiredCount(v int64) *TaskSet { - s.ComputedDesiredCount = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *TaskSet) SetCreatedAt(v time.Time) *TaskSet { - s.CreatedAt = &v - return s -} - -// SetExternalId sets the ExternalId field's value. -func (s *TaskSet) SetExternalId(v string) *TaskSet { - s.ExternalId = &v - return s -} - -// SetId sets the Id field's value. -func (s *TaskSet) SetId(v string) *TaskSet { - s.Id = &v - return s -} - -// SetLaunchType sets the LaunchType field's value. -func (s *TaskSet) SetLaunchType(v string) *TaskSet { - s.LaunchType = &v - return s -} - -// SetLoadBalancers sets the LoadBalancers field's value. -func (s *TaskSet) SetLoadBalancers(v []*LoadBalancer) *TaskSet { - s.LoadBalancers = v - return s -} - -// SetNetworkConfiguration sets the NetworkConfiguration field's value. -func (s *TaskSet) SetNetworkConfiguration(v *NetworkConfiguration) *TaskSet { - s.NetworkConfiguration = v - return s -} - -// SetPendingCount sets the PendingCount field's value. -func (s *TaskSet) SetPendingCount(v int64) *TaskSet { - s.PendingCount = &v - return s -} - -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *TaskSet) SetPlatformVersion(v string) *TaskSet { - s.PlatformVersion = &v - return s -} - -// SetRunningCount sets the RunningCount field's value. -func (s *TaskSet) SetRunningCount(v int64) *TaskSet { - s.RunningCount = &v - return s -} - -// SetScale sets the Scale field's value. -func (s *TaskSet) SetScale(v *Scale) *TaskSet { - s.Scale = v - return s -} - -// SetStabilityStatus sets the StabilityStatus field's value. -func (s *TaskSet) SetStabilityStatus(v string) *TaskSet { - s.StabilityStatus = &v - return s -} - -// SetStabilityStatusAt sets the StabilityStatusAt field's value. -func (s *TaskSet) SetStabilityStatusAt(v time.Time) *TaskSet { - s.StabilityStatusAt = &v - return s -} - -// SetStartedBy sets the StartedBy field's value. -func (s *TaskSet) SetStartedBy(v string) *TaskSet { - s.StartedBy = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *TaskSet) SetStatus(v string) *TaskSet { - s.Status = &v - return s -} - -// SetTaskDefinition sets the TaskDefinition field's value. -func (s *TaskSet) SetTaskDefinition(v string) *TaskSet { - s.TaskDefinition = &v - return s -} - -// SetTaskSetArn sets the TaskSetArn field's value. -func (s *TaskSet) SetTaskSetArn(v string) *TaskSet { - s.TaskSetArn = &v - return s -} - -// SetUpdatedAt sets the UpdatedAt field's value. -func (s *TaskSet) SetUpdatedAt(v time.Time) *TaskSet { - s.UpdatedAt = &v - return s -} - -// The container path, mount options, and size of the tmpfs mount. -type Tmpfs struct { - _ struct{} `type:"structure"` - - // The absolute file path where the tmpfs volume is to be mounted. - // - // ContainerPath is a required field - ContainerPath *string `locationName:"containerPath" type:"string" required:"true"` - - // The list of tmpfs volume mount options. - // - // Valid values: "defaults" | "ro" | "rw" | "suid" | "nosuid" | "dev" | "nodev" - // | "exec" | "noexec" | "sync" | "async" | "dirsync" | "remount" | "mand" | - // "nomand" | "atime" | "noatime" | "diratime" | "nodiratime" | "bind" | "rbind" - // | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" - // | "slave" | "rslave" | "relatime" | "norelatime" | "strictatime" | "nostrictatime" - // | "mode" | "uid" | "gid" | "nr_inodes" | "nr_blocks" | "mpol" - MountOptions []*string `locationName:"mountOptions" type:"list"` - - // The size (in MiB) of the tmpfs volume. - // - // Size is a required field - Size *int64 `locationName:"size" type:"integer" required:"true"` -} - -// String returns the string representation -func (s Tmpfs) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tmpfs) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tmpfs) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tmpfs"} - if s.ContainerPath == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerPath")) - } - if s.Size == nil { - invalidParams.Add(request.NewErrParamRequired("Size")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerPath sets the ContainerPath field's value. -func (s *Tmpfs) SetContainerPath(v string) *Tmpfs { - s.ContainerPath = &v - return s -} - -// SetMountOptions sets the MountOptions field's value. -func (s *Tmpfs) SetMountOptions(v []*string) *Tmpfs { - s.MountOptions = v - return s -} - -// SetSize sets the Size field's value. -func (s *Tmpfs) SetSize(v int64) *Tmpfs { - s.Size = &v - return s -} - -// The ulimit settings to pass to the container. -type Ulimit struct { - _ struct{} `type:"structure"` - - // The hard limit for the ulimit type. - // - // HardLimit is a required field - HardLimit *int64 `locationName:"hardLimit" type:"integer" required:"true"` - - // The type of the ulimit. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true" enum:"UlimitName"` - - // The soft limit for the ulimit type. - // - // SoftLimit is a required field - SoftLimit *int64 `locationName:"softLimit" type:"integer" required:"true"` -} - -// String returns the string representation -func (s Ulimit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Ulimit) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Ulimit) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Ulimit"} - if s.HardLimit == nil { - invalidParams.Add(request.NewErrParamRequired("HardLimit")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.SoftLimit == nil { - invalidParams.Add(request.NewErrParamRequired("SoftLimit")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHardLimit sets the HardLimit field's value. -func (s *Ulimit) SetHardLimit(v int64) *Ulimit { - s.HardLimit = &v - return s -} - -// SetName sets the Name field's value. -func (s *Ulimit) SetName(v string) *Ulimit { - s.Name = &v - return s -} - -// SetSoftLimit sets the SoftLimit field's value. -func (s *Ulimit) SetSoftLimit(v int64) *Ulimit { - s.SoftLimit = &v - return s -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource from which to delete tags. - // Currently, the supported resources are Amazon ECS tasks, services, task definitions, - // clusters, and container instances. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` - - // The keys of the tags to be removed. - // - // TagKeys is a required field - TagKeys []*string `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.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UpdateContainerAgentInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster that your - // container instance is running on. If you do not specify a cluster, the default - // cluster is assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // The container instance ID or full ARN entries for the container instance - // on which you would like to update the Amazon ECS container agent. - // - // ContainerInstance is a required field - ContainerInstance *string `locationName:"containerInstance" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateContainerAgentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateContainerAgentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateContainerAgentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateContainerAgentInput"} - if s.ContainerInstance == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerInstance")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCluster sets the Cluster field's value. -func (s *UpdateContainerAgentInput) SetCluster(v string) *UpdateContainerAgentInput { - s.Cluster = &v - return s -} - -// SetContainerInstance sets the ContainerInstance field's value. -func (s *UpdateContainerAgentInput) SetContainerInstance(v string) *UpdateContainerAgentInput { - s.ContainerInstance = &v - return s -} - -type UpdateContainerAgentOutput struct { - _ struct{} `type:"structure"` - - // The container instance for which the container agent was updated. - ContainerInstance *ContainerInstance `locationName:"containerInstance" type:"structure"` -} - -// String returns the string representation -func (s UpdateContainerAgentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateContainerAgentOutput) GoString() string { - return s.String() -} - -// SetContainerInstance sets the ContainerInstance field's value. -func (s *UpdateContainerAgentOutput) SetContainerInstance(v *ContainerInstance) *UpdateContainerAgentOutput { - s.ContainerInstance = v - return s -} - -type UpdateContainerInstancesStateInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster that hosts - // the container instance to update. If you do not specify a cluster, the default - // cluster is assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // A list of container instance IDs or full ARN entries. - // - // ContainerInstances is a required field - ContainerInstances []*string `locationName:"containerInstances" type:"list" required:"true"` - - // The container instance state with which to update the container instance. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"ContainerInstanceStatus"` -} - -// String returns the string representation -func (s UpdateContainerInstancesStateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateContainerInstancesStateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateContainerInstancesStateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateContainerInstancesStateInput"} - if s.ContainerInstances == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerInstances")) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCluster sets the Cluster field's value. -func (s *UpdateContainerInstancesStateInput) SetCluster(v string) *UpdateContainerInstancesStateInput { - s.Cluster = &v - return s -} - -// SetContainerInstances sets the ContainerInstances field's value. -func (s *UpdateContainerInstancesStateInput) SetContainerInstances(v []*string) *UpdateContainerInstancesStateInput { - s.ContainerInstances = v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateContainerInstancesStateInput) SetStatus(v string) *UpdateContainerInstancesStateInput { - s.Status = &v - return s -} - -type UpdateContainerInstancesStateOutput struct { - _ struct{} `type:"structure"` - - // The list of container instances. - ContainerInstances []*ContainerInstance `locationName:"containerInstances" type:"list"` - - // Any failures associated with the call. - Failures []*Failure `locationName:"failures" type:"list"` -} - -// String returns the string representation -func (s UpdateContainerInstancesStateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateContainerInstancesStateOutput) GoString() string { - return s.String() -} - -// SetContainerInstances sets the ContainerInstances field's value. -func (s *UpdateContainerInstancesStateOutput) SetContainerInstances(v []*ContainerInstance) *UpdateContainerInstancesStateOutput { - s.ContainerInstances = v - return s -} - -// SetFailures sets the Failures field's value. -func (s *UpdateContainerInstancesStateOutput) SetFailures(v []*Failure) *UpdateContainerInstancesStateOutput { - s.Failures = v - return s -} - -type UpdateServiceInput struct { - _ struct{} `type:"structure"` - - // The short name or full Amazon Resource Name (ARN) of the cluster that your - // service is running on. If you do not specify a cluster, the default cluster - // is assumed. - Cluster *string `locationName:"cluster" type:"string"` - - // Optional deployment parameters that control how many tasks run during the - // deployment and the ordering of stopping and starting tasks. - DeploymentConfiguration *DeploymentConfiguration `locationName:"deploymentConfiguration" type:"structure"` - - // The number of instantiations of the task to place and keep running in your - // service. - DesiredCount *int64 `locationName:"desiredCount" type:"integer"` - - // Whether to force a new deployment of the service. Deployments are not forced - // by default. You can use this option to trigger a new deployment with no service - // definition changes. For example, you can update a service's tasks to use - // a newer Docker image with the same image/tag combination (my_image:latest) - // or to roll Fargate tasks onto a newer platform version. - ForceNewDeployment *bool `locationName:"forceNewDeployment" type:"boolean"` - - // The period of time, in seconds, that the Amazon ECS service scheduler should - // ignore unhealthy Elastic Load Balancing target health checks after a task - // has first started. This is only valid if your service is configured to use - // a load balancer. If your service's tasks take a while to start and respond - // to Elastic Load Balancing health checks, you can specify a health check grace - // period of up to 1,800 seconds. During that time, the ECS service scheduler - // ignores the Elastic Load Balancing health check status. This grace period - // can prevent the ECS service scheduler from marking tasks as unhealthy and - // stopping them before they have time to come up. - HealthCheckGracePeriodSeconds *int64 `locationName:"healthCheckGracePeriodSeconds" type:"integer"` - - // The network configuration for the service. This parameter is required for - // task definitions that use the awsvpc network mode to receive their own elastic - // network interface, and it is not supported for other network modes. For more - // information, see Task Networking (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) - // in the Amazon Elastic Container Service Developer Guide. - // - // Updating a service to add a subnet to a list of existing subnets does not - // trigger a service deployment. For example, if your network configuration - // change is to keep the existing subnets and simply add another subnet to the - // network configuration, this does not trigger a new service deployment. - NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` - - // The platform version on which your tasks in the service are running. A platform - // version is only specified for tasks using the Fargate launch type. If one - // is not specified, the LATEST platform version is used by default. For more - // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) - // in the Amazon Elastic Container Service Developer Guide. - PlatformVersion *string `locationName:"platformVersion" type:"string"` - - // The name of the service to update. - // - // Service is a required field - Service *string `locationName:"service" type:"string" required:"true"` - - // The family and revision (family:revision) or full ARN of the task definition - // to run in your service. If a revision is not specified, the latest ACTIVE - // revision is used. If you modify the task definition with UpdateService, Amazon - // ECS spawns a task with the new version of the task definition and then stops - // an old task after the new version is running. - TaskDefinition *string `locationName:"taskDefinition" type:"string"` -} - -// String returns the string representation -func (s UpdateServiceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateServiceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateServiceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateServiceInput"} - if s.Service == nil { - invalidParams.Add(request.NewErrParamRequired("Service")) - } - if s.NetworkConfiguration != nil { - if err := s.NetworkConfiguration.Validate(); err != nil { - invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCluster sets the Cluster field's value. -func (s *UpdateServiceInput) SetCluster(v string) *UpdateServiceInput { - s.Cluster = &v - return s -} - -// SetDeploymentConfiguration sets the DeploymentConfiguration field's value. -func (s *UpdateServiceInput) SetDeploymentConfiguration(v *DeploymentConfiguration) *UpdateServiceInput { - s.DeploymentConfiguration = v - return s -} - -// SetDesiredCount sets the DesiredCount field's value. -func (s *UpdateServiceInput) SetDesiredCount(v int64) *UpdateServiceInput { - s.DesiredCount = &v - return s -} - -// SetForceNewDeployment sets the ForceNewDeployment field's value. -func (s *UpdateServiceInput) SetForceNewDeployment(v bool) *UpdateServiceInput { - s.ForceNewDeployment = &v - return s -} - -// SetHealthCheckGracePeriodSeconds sets the HealthCheckGracePeriodSeconds field's value. -func (s *UpdateServiceInput) SetHealthCheckGracePeriodSeconds(v int64) *UpdateServiceInput { - s.HealthCheckGracePeriodSeconds = &v - return s -} - -// SetNetworkConfiguration sets the NetworkConfiguration field's value. -func (s *UpdateServiceInput) SetNetworkConfiguration(v *NetworkConfiguration) *UpdateServiceInput { - s.NetworkConfiguration = v - return s -} - -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *UpdateServiceInput) SetPlatformVersion(v string) *UpdateServiceInput { - s.PlatformVersion = &v - return s -} - -// SetService sets the Service field's value. -func (s *UpdateServiceInput) SetService(v string) *UpdateServiceInput { - s.Service = &v - return s -} - -// SetTaskDefinition sets the TaskDefinition field's value. -func (s *UpdateServiceInput) SetTaskDefinition(v string) *UpdateServiceInput { - s.TaskDefinition = &v - return s -} - -type UpdateServiceOutput struct { - _ struct{} `type:"structure"` - - // The full description of your service following the update call. - Service *Service `locationName:"service" type:"structure"` -} - -// String returns the string representation -func (s UpdateServiceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateServiceOutput) GoString() string { - return s.String() -} - -// SetService sets the Service field's value. -func (s *UpdateServiceOutput) SetService(v *Service) *UpdateServiceOutput { - s.Service = v - return s -} - -// The Docker and Amazon ECS container agent version information about a container -// instance. -type VersionInfo struct { - _ struct{} `type:"structure"` - - // The Git commit hash for the Amazon ECS container agent build on the amazon-ecs-agent - // (https://github.com/aws/amazon-ecs-agent/commits/master) GitHub repository. - AgentHash *string `locationName:"agentHash" type:"string"` - - // The version number of the Amazon ECS container agent. - AgentVersion *string `locationName:"agentVersion" type:"string"` - - // The Docker version running on the container instance. - DockerVersion *string `locationName:"dockerVersion" type:"string"` -} - -// String returns the string representation -func (s VersionInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VersionInfo) GoString() string { - return s.String() -} - -// SetAgentHash sets the AgentHash field's value. -func (s *VersionInfo) SetAgentHash(v string) *VersionInfo { - s.AgentHash = &v - return s -} - -// SetAgentVersion sets the AgentVersion field's value. -func (s *VersionInfo) SetAgentVersion(v string) *VersionInfo { - s.AgentVersion = &v - return s -} - -// SetDockerVersion sets the DockerVersion field's value. -func (s *VersionInfo) SetDockerVersion(v string) *VersionInfo { - s.DockerVersion = &v - return s -} - -// A data volume used in a task definition. For tasks that use a Docker volume, -// specify a DockerVolumeConfiguration. For tasks that use a bind mount host -// volume, specify a host and optional sourcePath. For more information, see -// Using Data Volumes in Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html). -type Volume struct { - _ struct{} `type:"structure"` - - // This parameter is specified when you are using Docker volumes. Docker volumes - // are only supported when you are using the EC2 launch type. Windows containers - // only support the use of the local driver. To use bind mounts, specify a host - // instead. - DockerVolumeConfiguration *DockerVolumeConfiguration `locationName:"dockerVolumeConfiguration" type:"structure"` - - // This parameter is specified when you are using bind mount host volumes. Bind - // mount host volumes are supported when you are using either the EC2 or Fargate - // launch types. The contents of the host parameter determine whether your bind - // mount host volume persists on the host container instance and where it is - // stored. If the host parameter is empty, then the Docker daemon assigns a - // host path for your data volume. However, the data is not guaranteed to persist - // after the containers associated with it stop running. - // - // Windows containers can mount whole directories on the same drive as $env:ProgramData. - // Windows containers cannot mount directories on a different drive, and mount - // point cannot be across drives. For example, you can mount C:\my\path:C:\my\path - // and D:\:D:\, but not D:\my\path:C:\my\path or D:\:C:\my\path. - Host *HostVolumeProperties `locationName:"host" type:"structure"` - - // The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, - // hyphens, and underscores are allowed. This name is referenced in the sourceVolume - // parameter of container definition mountPoints. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s Volume) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Volume) GoString() string { - return s.String() -} - -// SetDockerVolumeConfiguration sets the DockerVolumeConfiguration field's value. -func (s *Volume) SetDockerVolumeConfiguration(v *DockerVolumeConfiguration) *Volume { - s.DockerVolumeConfiguration = v - return s -} - -// SetHost sets the Host field's value. -func (s *Volume) SetHost(v *HostVolumeProperties) *Volume { - s.Host = v - return s -} - -// SetName sets the Name field's value. -func (s *Volume) SetName(v string) *Volume { - s.Name = &v - return s -} - -// Details on a data volume from another container in the same task definition. -type VolumeFrom struct { - _ struct{} `type:"structure"` - - // If this value is true, the container has read-only access to the volume. - // If this value is false, then the container can write to the volume. The default - // value is false. - ReadOnly *bool `locationName:"readOnly" type:"boolean"` - - // The name of another container within the same task definition from which - // to mount volumes. - SourceContainer *string `locationName:"sourceContainer" type:"string"` -} - -// String returns the string representation -func (s VolumeFrom) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VolumeFrom) GoString() string { - return s.String() -} - -// SetReadOnly sets the ReadOnly field's value. -func (s *VolumeFrom) SetReadOnly(v bool) *VolumeFrom { - s.ReadOnly = &v - return s -} - -// SetSourceContainer sets the SourceContainer field's value. -func (s *VolumeFrom) SetSourceContainer(v string) *VolumeFrom { - s.SourceContainer = &v - return s -} - -const ( - // AgentUpdateStatusPending is a AgentUpdateStatus enum value - AgentUpdateStatusPending = "PENDING" - - // AgentUpdateStatusStaging is a AgentUpdateStatus enum value - AgentUpdateStatusStaging = "STAGING" - - // AgentUpdateStatusStaged is a AgentUpdateStatus enum value - AgentUpdateStatusStaged = "STAGED" - - // AgentUpdateStatusUpdating is a AgentUpdateStatus enum value - AgentUpdateStatusUpdating = "UPDATING" - - // AgentUpdateStatusUpdated is a AgentUpdateStatus enum value - AgentUpdateStatusUpdated = "UPDATED" - - // AgentUpdateStatusFailed is a AgentUpdateStatus enum value - AgentUpdateStatusFailed = "FAILED" -) - -const ( - // AssignPublicIpEnabled is a AssignPublicIp enum value - AssignPublicIpEnabled = "ENABLED" - - // AssignPublicIpDisabled is a AssignPublicIp enum value - AssignPublicIpDisabled = "DISABLED" -) - -const ( - // ClusterFieldStatistics is a ClusterField enum value - ClusterFieldStatistics = "STATISTICS" - - // ClusterFieldTags is a ClusterField enum value - ClusterFieldTags = "TAGS" -) - -const ( - // CompatibilityEc2 is a Compatibility enum value - CompatibilityEc2 = "EC2" - - // CompatibilityFargate is a Compatibility enum value - CompatibilityFargate = "FARGATE" -) - -const ( - // ConnectivityConnected is a Connectivity enum value - ConnectivityConnected = "CONNECTED" - - // ConnectivityDisconnected is a Connectivity enum value - ConnectivityDisconnected = "DISCONNECTED" -) - -const ( - // ContainerInstanceFieldTags is a ContainerInstanceField enum value - ContainerInstanceFieldTags = "TAGS" -) - -const ( - // ContainerInstanceStatusActive is a ContainerInstanceStatus enum value - ContainerInstanceStatusActive = "ACTIVE" - - // ContainerInstanceStatusDraining is a ContainerInstanceStatus enum value - ContainerInstanceStatusDraining = "DRAINING" -) - -const ( - // DeploymentControllerTypeEcs is a DeploymentControllerType enum value - DeploymentControllerTypeEcs = "ECS" - - // DeploymentControllerTypeCodeDeploy is a DeploymentControllerType enum value - DeploymentControllerTypeCodeDeploy = "CODE_DEPLOY" -) - -const ( - // DesiredStatusRunning is a DesiredStatus enum value - DesiredStatusRunning = "RUNNING" - - // DesiredStatusPending is a DesiredStatus enum value - DesiredStatusPending = "PENDING" - - // DesiredStatusStopped is a DesiredStatus enum value - DesiredStatusStopped = "STOPPED" -) - -const ( - // DeviceCgroupPermissionRead is a DeviceCgroupPermission enum value - DeviceCgroupPermissionRead = "read" - - // DeviceCgroupPermissionWrite is a DeviceCgroupPermission enum value - DeviceCgroupPermissionWrite = "write" - - // DeviceCgroupPermissionMknod is a DeviceCgroupPermission enum value - DeviceCgroupPermissionMknod = "mknod" -) - -const ( - // HealthStatusHealthy is a HealthStatus enum value - HealthStatusHealthy = "HEALTHY" - - // HealthStatusUnhealthy is a HealthStatus enum value - HealthStatusUnhealthy = "UNHEALTHY" - - // HealthStatusUnknown is a HealthStatus enum value - HealthStatusUnknown = "UNKNOWN" -) - -const ( - // IpcModeHost is a IpcMode enum value - IpcModeHost = "host" - - // IpcModeTask is a IpcMode enum value - IpcModeTask = "task" - - // IpcModeNone is a IpcMode enum value - IpcModeNone = "none" -) - -const ( - // LaunchTypeEc2 is a LaunchType enum value - LaunchTypeEc2 = "EC2" - - // LaunchTypeFargate is a LaunchType enum value - LaunchTypeFargate = "FARGATE" -) - -const ( - // LogDriverJsonFile is a LogDriver enum value - LogDriverJsonFile = "json-file" - - // LogDriverSyslog is a LogDriver enum value - LogDriverSyslog = "syslog" - - // LogDriverJournald is a LogDriver enum value - LogDriverJournald = "journald" - - // LogDriverGelf is a LogDriver enum value - LogDriverGelf = "gelf" - - // LogDriverFluentd is a LogDriver enum value - LogDriverFluentd = "fluentd" - - // LogDriverAwslogs is a LogDriver enum value - LogDriverAwslogs = "awslogs" - - // LogDriverSplunk is a LogDriver enum value - LogDriverSplunk = "splunk" -) - -const ( - // NetworkModeBridge is a NetworkMode enum value - NetworkModeBridge = "bridge" - - // NetworkModeHost is a NetworkMode enum value - NetworkModeHost = "host" - - // NetworkModeAwsvpc is a NetworkMode enum value - NetworkModeAwsvpc = "awsvpc" - - // NetworkModeNone is a NetworkMode enum value - NetworkModeNone = "none" -) - -const ( - // PidModeHost is a PidMode enum value - PidModeHost = "host" - - // PidModeTask is a PidMode enum value - PidModeTask = "task" -) - -const ( - // PlacementConstraintTypeDistinctInstance is a PlacementConstraintType enum value - PlacementConstraintTypeDistinctInstance = "distinctInstance" - - // PlacementConstraintTypeMemberOf is a PlacementConstraintType enum value - PlacementConstraintTypeMemberOf = "memberOf" -) - -const ( - // PlacementStrategyTypeRandom is a PlacementStrategyType enum value - PlacementStrategyTypeRandom = "random" - - // PlacementStrategyTypeSpread is a PlacementStrategyType enum value - PlacementStrategyTypeSpread = "spread" - - // PlacementStrategyTypeBinpack is a PlacementStrategyType enum value - PlacementStrategyTypeBinpack = "binpack" -) - -const ( - // PropagateTagsTaskDefinition is a PropagateTags enum value - PropagateTagsTaskDefinition = "TASK_DEFINITION" - - // PropagateTagsService is a PropagateTags enum value - PropagateTagsService = "SERVICE" -) - -const ( - // ScaleUnitPercent is a ScaleUnit enum value - ScaleUnitPercent = "PERCENT" -) - -const ( - // SchedulingStrategyReplica is a SchedulingStrategy enum value - SchedulingStrategyReplica = "REPLICA" - - // SchedulingStrategyDaemon is a SchedulingStrategy enum value - SchedulingStrategyDaemon = "DAEMON" -) - -const ( - // ScopeTask is a Scope enum value - ScopeTask = "task" - - // ScopeShared is a Scope enum value - ScopeShared = "shared" -) - -const ( - // ServiceFieldTags is a ServiceField enum value - ServiceFieldTags = "TAGS" -) - -const ( - // SettingNameServiceLongArnFormat is a SettingName enum value - SettingNameServiceLongArnFormat = "serviceLongArnFormat" - - // SettingNameTaskLongArnFormat is a SettingName enum value - SettingNameTaskLongArnFormat = "taskLongArnFormat" - - // SettingNameContainerInstanceLongArnFormat is a SettingName enum value - SettingNameContainerInstanceLongArnFormat = "containerInstanceLongArnFormat" -) - -const ( - // SortOrderAsc is a SortOrder enum value - SortOrderAsc = "ASC" - - // SortOrderDesc is a SortOrder enum value - SortOrderDesc = "DESC" -) - -const ( - // StabilityStatusSteadyState is a StabilityStatus enum value - StabilityStatusSteadyState = "STEADY_STATE" - - // StabilityStatusStabilizing is a StabilityStatus enum value - StabilityStatusStabilizing = "STABILIZING" -) - -const ( - // TargetTypeContainerInstance is a TargetType enum value - TargetTypeContainerInstance = "container-instance" -) - -const ( - // TaskDefinitionFamilyStatusActive is a TaskDefinitionFamilyStatus enum value - TaskDefinitionFamilyStatusActive = "ACTIVE" - - // TaskDefinitionFamilyStatusInactive is a TaskDefinitionFamilyStatus enum value - TaskDefinitionFamilyStatusInactive = "INACTIVE" - - // TaskDefinitionFamilyStatusAll is a TaskDefinitionFamilyStatus enum value - TaskDefinitionFamilyStatusAll = "ALL" -) - -const ( - // TaskDefinitionFieldTags is a TaskDefinitionField enum value - TaskDefinitionFieldTags = "TAGS" -) - -const ( - // TaskDefinitionPlacementConstraintTypeMemberOf is a TaskDefinitionPlacementConstraintType enum value - TaskDefinitionPlacementConstraintTypeMemberOf = "memberOf" -) - -const ( - // TaskDefinitionStatusActive is a TaskDefinitionStatus enum value - TaskDefinitionStatusActive = "ACTIVE" - - // TaskDefinitionStatusInactive is a TaskDefinitionStatus enum value - TaskDefinitionStatusInactive = "INACTIVE" -) - -const ( - // TaskFieldTags is a TaskField enum value - TaskFieldTags = "TAGS" -) - -const ( - // TaskStopCodeTaskFailedToStart is a TaskStopCode enum value - TaskStopCodeTaskFailedToStart = "TaskFailedToStart" - - // TaskStopCodeEssentialContainerExited is a TaskStopCode enum value - TaskStopCodeEssentialContainerExited = "EssentialContainerExited" - - // TaskStopCodeUserInitiated is a TaskStopCode enum value - TaskStopCodeUserInitiated = "UserInitiated" -) - -const ( - // TransportProtocolTcp is a TransportProtocol enum value - TransportProtocolTcp = "tcp" - - // TransportProtocolUdp is a TransportProtocol enum value - TransportProtocolUdp = "udp" -) - -const ( - // UlimitNameCore is a UlimitName enum value - UlimitNameCore = "core" - - // UlimitNameCpu is a UlimitName enum value - UlimitNameCpu = "cpu" - - // UlimitNameData is a UlimitName enum value - UlimitNameData = "data" - - // UlimitNameFsize is a UlimitName enum value - UlimitNameFsize = "fsize" - - // UlimitNameLocks is a UlimitName enum value - UlimitNameLocks = "locks" - - // UlimitNameMemlock is a UlimitName enum value - UlimitNameMemlock = "memlock" - - // UlimitNameMsgqueue is a UlimitName enum value - UlimitNameMsgqueue = "msgqueue" - - // UlimitNameNice is a UlimitName enum value - UlimitNameNice = "nice" - - // UlimitNameNofile is a UlimitName enum value - UlimitNameNofile = "nofile" - - // UlimitNameNproc is a UlimitName enum value - UlimitNameNproc = "nproc" - - // UlimitNameRss is a UlimitName enum value - UlimitNameRss = "rss" - - // UlimitNameRtprio is a UlimitName enum value - UlimitNameRtprio = "rtprio" - - // UlimitNameRttime is a UlimitName enum value - UlimitNameRttime = "rttime" - - // UlimitNameSigpending is a UlimitName enum value - UlimitNameSigpending = "sigpending" - - // UlimitNameStack is a UlimitName enum value - UlimitNameStack = "stack" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/doc.go deleted file mode 100644 index 1d59f5b64..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/doc.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package ecs provides the client and types for making API -// requests to Amazon EC2 Container Service. -// -// Amazon Elastic Container Service (Amazon ECS) is a highly scalable, fast, -// container management service that makes it easy to run, stop, and manage -// Docker containers on a cluster. You can host your cluster on a serverless -// infrastructure that is managed by Amazon ECS by launching your services or -// tasks using the Fargate launch type. For more control, you can host your -// tasks on a cluster of Amazon Elastic Compute Cloud (Amazon EC2) instances -// that you manage by using the EC2 launch type. For more information about -// launch types, see Amazon ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html). -// -// Amazon ECS lets you launch and stop container-based applications with simple -// API calls, allows you to get the state of your cluster from a centralized -// service, and gives you access to many familiar Amazon EC2 features. -// -// You can use Amazon ECS to schedule the placement of containers across your -// cluster based on your resource needs, isolation policies, and availability -// requirements. Amazon ECS eliminates the need for you to operate your own -// cluster management and configuration management systems or worry about scaling -// your management infrastructure. -// -// See https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13 for more information on this service. -// -// See ecs package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/ecs/ -// -// Using the Client -// -// To contact Amazon EC2 Container Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon EC2 Container Service client ECS for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/ecs/#New -package ecs diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/errors.go deleted file mode 100644 index 9a11f23dc..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/errors.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ecs - -const ( - - // ErrCodeAccessDeniedException for service response error code - // "AccessDeniedException". - // - // You do not have authorization to perform the requested action. - ErrCodeAccessDeniedException = "AccessDeniedException" - - // ErrCodeAttributeLimitExceededException for service response error code - // "AttributeLimitExceededException". - // - // You can apply up to 10 custom attributes per resource. You can view the attributes - // of a resource with ListAttributes. You can remove existing attributes on - // a resource with DeleteAttributes. - ErrCodeAttributeLimitExceededException = "AttributeLimitExceededException" - - // ErrCodeBlockedException for service response error code - // "BlockedException". - // - // Your AWS account has been blocked. For more information, contact AWS Support - // (http://aws.amazon.com/contact-us/). - ErrCodeBlockedException = "BlockedException" - - // ErrCodeClientException for service response error code - // "ClientException". - // - // These errors are usually caused by a client action, such as using an action - // or resource on behalf of a user that doesn't have permissions to use the - // action or resource, or specifying an identifier that is not valid. - ErrCodeClientException = "ClientException" - - // ErrCodeClusterContainsContainerInstancesException for service response error code - // "ClusterContainsContainerInstancesException". - // - // You cannot delete a cluster that has registered container instances. First, - // deregister the container instances before you can delete the cluster. For - // more information, see DeregisterContainerInstance. - ErrCodeClusterContainsContainerInstancesException = "ClusterContainsContainerInstancesException" - - // ErrCodeClusterContainsServicesException for service response error code - // "ClusterContainsServicesException". - // - // You cannot delete a cluster that contains services. First, update the service - // to reduce its desired task count to 0 and then delete the service. For more - // information, see UpdateService and DeleteService. - ErrCodeClusterContainsServicesException = "ClusterContainsServicesException" - - // ErrCodeClusterContainsTasksException for service response error code - // "ClusterContainsTasksException". - // - // You cannot delete a cluster that has active tasks. - ErrCodeClusterContainsTasksException = "ClusterContainsTasksException" - - // ErrCodeClusterNotFoundException for service response error code - // "ClusterNotFoundException". - // - // The specified cluster could not be found. You can view your available clusters - // with ListClusters. Amazon ECS clusters are Region-specific. - ErrCodeClusterNotFoundException = "ClusterNotFoundException" - - // ErrCodeInvalidParameterException for service response error code - // "InvalidParameterException". - // - // The specified parameter is invalid. Review the available parameters for the - // API request. - ErrCodeInvalidParameterException = "InvalidParameterException" - - // ErrCodeMissingVersionException for service response error code - // "MissingVersionException". - // - // Amazon ECS is unable to determine the current version of the Amazon ECS container - // agent on the container instance and does not have enough information to proceed - // with an update. This could be because the agent running on the container - // instance is an older or custom version that does not use our version information. - ErrCodeMissingVersionException = "MissingVersionException" - - // ErrCodeNoUpdateAvailableException for service response error code - // "NoUpdateAvailableException". - // - // There is no update available for this Amazon ECS container agent. This could - // be because the agent is already running the latest version, or it is so old - // that there is no update path to the current version. - ErrCodeNoUpdateAvailableException = "NoUpdateAvailableException" - - // ErrCodePlatformTaskDefinitionIncompatibilityException for service response error code - // "PlatformTaskDefinitionIncompatibilityException". - // - // The specified platform version does not satisfy the task definition's required - // capabilities. - ErrCodePlatformTaskDefinitionIncompatibilityException = "PlatformTaskDefinitionIncompatibilityException" - - // ErrCodePlatformUnknownException for service response error code - // "PlatformUnknownException". - // - // The specified platform version does not exist. - ErrCodePlatformUnknownException = "PlatformUnknownException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The specified resource could not be found. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeServerException for service response error code - // "ServerException". - // - // These errors are usually caused by a server issue. - ErrCodeServerException = "ServerException" - - // ErrCodeServiceNotActiveException for service response error code - // "ServiceNotActiveException". - // - // The specified service is not active. You can't update a service that is inactive. - // If you have previously deleted a service, you can re-create it with CreateService. - ErrCodeServiceNotActiveException = "ServiceNotActiveException" - - // ErrCodeServiceNotFoundException for service response error code - // "ServiceNotFoundException". - // - // The specified service could not be found. You can view your available services - // with ListServices. Amazon ECS services are cluster-specific and Region-specific. - ErrCodeServiceNotFoundException = "ServiceNotFoundException" - - // ErrCodeTargetNotFoundException for service response error code - // "TargetNotFoundException". - // - // The specified target could not be found. You can view your available container - // instances with ListContainerInstances. Amazon ECS container instances are - // cluster-specific and Region-specific. - ErrCodeTargetNotFoundException = "TargetNotFoundException" - - // ErrCodeUnsupportedFeatureException for service response error code - // "UnsupportedFeatureException". - // - // The specified task is not supported in this Region. - ErrCodeUnsupportedFeatureException = "UnsupportedFeatureException" - - // ErrCodeUpdateInProgressException for service response error code - // "UpdateInProgressException". - // - // There is already a current Amazon ECS container agent update in progress - // on the specified container instance. If the container agent becomes disconnected - // while it is in a transitional stage, such as PENDING or STAGING, the update - // process can get stuck in that state. However, when the agent reconnects, - // it resumes where it stopped previously. - ErrCodeUpdateInProgressException = "UpdateInProgressException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/service.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/service.go deleted file mode 100644 index c268614ec..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ecs - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// ECS provides the API operation methods for making requests to -// Amazon EC2 Container Service. See this package's package overview docs -// for details on the service. -// -// ECS methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ECS 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 = "ecs" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "ECS" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ECS client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a ECS client from just a session. -// svc := ecs.New(mySession) -// -// // Create a ECS client with additional configuration -// svc := ecs.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ECS { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ECS { - svc := &ECS{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-11-13", - JSONVersion: "1.1", - TargetPrefix: "AmazonEC2ContainerServiceV20141113", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ECS operation and runs any -// custom request initialization. -func (c *ECS) 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/ecs/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/waiters.go deleted file mode 100644 index 542fe7f0f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/waiters.go +++ /dev/null @@ -1,224 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ecs - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilServicesInactive uses the Amazon ECS API operation -// DescribeServices to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ECS) WaitUntilServicesInactive(input *DescribeServicesInput) error { - return c.WaitUntilServicesInactiveWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilServicesInactiveWithContext is an extended version of WaitUntilServicesInactive. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) WaitUntilServicesInactiveWithContext(ctx aws.Context, input *DescribeServicesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilServicesInactive", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "failures[].reason", - Expected: "MISSING", - }, - { - State: request.SuccessWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "services[].status", - Expected: "INACTIVE", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeServicesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeServicesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilServicesStable uses the Amazon ECS API operation -// DescribeServices to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ECS) WaitUntilServicesStable(input *DescribeServicesInput) error { - return c.WaitUntilServicesStableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilServicesStableWithContext is an extended version of WaitUntilServicesStable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) WaitUntilServicesStableWithContext(ctx aws.Context, input *DescribeServicesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilServicesStable", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "failures[].reason", - Expected: "MISSING", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "services[].status", - Expected: "DRAINING", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "services[].status", - Expected: "INACTIVE", - }, - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "length(services[?!(length(deployments) == `1` && runningCount == desiredCount)]) == `0`", - Expected: true, - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeServicesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeServicesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilTasksRunning uses the Amazon ECS API operation -// DescribeTasks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ECS) WaitUntilTasksRunning(input *DescribeTasksInput) error { - return c.WaitUntilTasksRunningWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilTasksRunningWithContext is an extended version of WaitUntilTasksRunning. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) WaitUntilTasksRunningWithContext(ctx aws.Context, input *DescribeTasksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilTasksRunning", - MaxAttempts: 100, - Delay: request.ConstantWaiterDelay(6 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "tasks[].lastStatus", - Expected: "STOPPED", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "failures[].reason", - Expected: "MISSING", - }, - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "tasks[].lastStatus", - Expected: "RUNNING", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilTasksStopped uses the Amazon ECS API operation -// DescribeTasks to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ECS) WaitUntilTasksStopped(input *DescribeTasksInput) error { - return c.WaitUntilTasksStoppedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilTasksStoppedWithContext is an extended version of WaitUntilTasksStopped. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ECS) WaitUntilTasksStoppedWithContext(ctx aws.Context, input *DescribeTasksInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilTasksStopped", - MaxAttempts: 100, - Delay: request.ConstantWaiterDelay(6 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "tasks[].lastStatus", - Expected: "STOPPED", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeTasksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTasksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go deleted file mode 100644 index b3ef2782e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go +++ /dev/null @@ -1,2952 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package efs - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opCreateFileSystem = "CreateFileSystem" - -// CreateFileSystemRequest generates a "aws/request.Request" representing the -// client's request for the CreateFileSystem operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFileSystem for more information on using the CreateFileSystem -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateFileSystemRequest method. -// req, resp := client.CreateFileSystemRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem -func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *request.Request, output *FileSystemDescription) { - op := &request.Operation{ - Name: opCreateFileSystem, - HTTPMethod: "POST", - HTTPPath: "/2015-02-01/file-systems", - } - - if input == nil { - input = &CreateFileSystemInput{} - } - - output = &FileSystemDescription{} - req = c.newRequest(op, input, output) - return -} - -// CreateFileSystem API operation for Amazon Elastic File System. -// -// Creates a new, empty file system. The operation requires a creation token -// in the request that Amazon EFS uses to ensure idempotent creation (calling -// the operation with same creation token has no effect). If a file system does -// not currently exist that is owned by the caller's AWS account with the specified -// creation token, this operation does the following: -// -// * Creates a new, empty file system. The file system will have an Amazon -// EFS assigned ID, and an initial lifecycle state creating. -// -// * Returns with the description of the created file system. -// -// Otherwise, this operation returns a FileSystemAlreadyExists error with the -// ID of the existing file system. -// -// For basic use cases, you can use a randomly generated UUID for the creation -// token. -// -// The idempotent operation allows you to retry a CreateFileSystem call without -// risk of creating an extra file system. This can happen when an initial call -// fails in a way that leaves it uncertain whether or not a file system was -// actually created. An example might be that a transport level timeout occurred -// or your connection was reset. As long as you use the same creation token, -// if the initial call had succeeded in creating a file system, the client can -// learn of its existence from the FileSystemAlreadyExists error. -// -// The CreateFileSystem call returns while the file system's lifecycle state -// is still creating. You can check the file system creation status by calling -// the DescribeFileSystems operation, which among other things returns the file -// system state. -// -// This operation also takes an optional PerformanceMode parameter that you -// choose for your file system. We recommend generalPurpose performance mode -// for most file systems. File systems using the maxIO performance mode can -// scale to higher levels of aggregate throughput and operations per second -// with a tradeoff of slightly higher latencies for most file operations. The -// performance mode can't be changed after the file system has been created. -// For more information, see Amazon EFS: Performance Modes (http://docs.aws.amazon.com/efs/latest/ug/performance.html#performancemodes.html). -// -// After the file system is fully created, Amazon EFS sets its lifecycle state -// to available, at which point you can create one or more mount targets for -// the file system in your VPC. For more information, see CreateMountTarget. -// You mount your Amazon EFS file system on an EC2 instances in your VPC via -// the mount target. For more information, see Amazon EFS: How it Works (http://docs.aws.amazon.com/efs/latest/ug/how-it-works.html). -// -// This operation requires permissions for the elasticfilesystem:CreateFileSystem -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation CreateFileSystem for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// * ErrCodeInternalServerError "InternalServerError" -// Returned if an error occurred on the server side. -// -// * ErrCodeFileSystemAlreadyExists "FileSystemAlreadyExists" -// Returned if the file system you are trying to create already exists, with -// the creation token you provided. -// -// * ErrCodeFileSystemLimitExceeded "FileSystemLimitExceeded" -// Returned if the AWS account has already created the maximum number of file -// systems allowed per account. -// -// * ErrCodeInsufficientThroughputCapacity "InsufficientThroughputCapacity" -// Returned if there's not enough capacity to provision additional throughput. -// This value might be returned when you try to create a file system in provisioned -// throughput mode, when you attempt to increase the provisioned throughput -// of an existing file system, or when you attempt to change an existing file -// system from bursting to provisioned throughput mode. -// -// * ErrCodeThroughputLimitExceeded "ThroughputLimitExceeded" -// Returned if the throughput mode or amount of provisioned throughput can't -// be changed because the throughput limit of 1024 MiB/s has been reached. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem -func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*FileSystemDescription, error) { - req, out := c.CreateFileSystemRequest(input) - return out, req.Send() -} - -// CreateFileSystemWithContext is the same as CreateFileSystem with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFileSystem for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) CreateFileSystemWithContext(ctx aws.Context, input *CreateFileSystemInput, opts ...request.Option) (*FileSystemDescription, error) { - req, out := c.CreateFileSystemRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateMountTarget = "CreateMountTarget" - -// CreateMountTargetRequest generates a "aws/request.Request" representing the -// client's request for the CreateMountTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateMountTarget for more information on using the CreateMountTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateMountTargetRequest method. -// req, resp := client.CreateMountTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateMountTarget -func (c *EFS) CreateMountTargetRequest(input *CreateMountTargetInput) (req *request.Request, output *MountTargetDescription) { - op := &request.Operation{ - Name: opCreateMountTarget, - HTTPMethod: "POST", - HTTPPath: "/2015-02-01/mount-targets", - } - - if input == nil { - input = &CreateMountTargetInput{} - } - - output = &MountTargetDescription{} - req = c.newRequest(op, input, output) - return -} - -// CreateMountTarget API operation for Amazon Elastic File System. -// -// Creates a mount target for a file system. You can then mount the file system -// on EC2 instances via the mount target. -// -// You can create one mount target in each Availability Zone in your VPC. All -// EC2 instances in a VPC within a given Availability Zone share a single mount -// target for a given file system. If you have multiple subnets in an Availability -// Zone, you create a mount target in one of the subnets. EC2 instances do not -// need to be in the same subnet as the mount target in order to access their -// file system. For more information, see Amazon EFS: How it Works (http://docs.aws.amazon.com/efs/latest/ug/how-it-works.html). -// -// In the request, you also specify a file system ID for which you are creating -// the mount target and the file system's lifecycle state must be available. -// For more information, see DescribeFileSystems. -// -// In the request, you also provide a subnet ID, which determines the following: -// -// * VPC in which Amazon EFS creates the mount target -// -// * Availability Zone in which Amazon EFS creates the mount target -// -// * IP address range from which Amazon EFS selects the IP address of the -// mount target (if you don't specify an IP address in the request) -// -// After creating the mount target, Amazon EFS returns a response that includes, -// a MountTargetId and an IpAddress. You use this IP address when mounting the -// file system in an EC2 instance. You can also use the mount target's DNS name -// when mounting the file system. The EC2 instance on which you mount the file -// system via the mount target can resolve the mount target's DNS name to its -// IP address. For more information, see How it Works: Implementation Overview -// (http://docs.aws.amazon.com/efs/latest/ug/how-it-works.html#how-it-works-implementation). -// -// Note that you can create mount targets for a file system in only one VPC, -// and there can be only one mount target per Availability Zone. That is, if -// the file system already has one or more mount targets created for it, the -// subnet specified in the request to add another mount target must meet the -// following requirements: -// -// * Must belong to the same VPC as the subnets of the existing mount targets -// -// * Must not be in the same Availability Zone as any of the subnets of the -// existing mount targets -// -// If the request satisfies the requirements, Amazon EFS does the following: -// -// * Creates a new mount target in the specified subnet. -// -// * Also creates a new network interface in the subnet as follows: -// -// If the request provides an IpAddress, Amazon EFS assigns that IP address -// to the network interface. Otherwise, Amazon EFS assigns a free address -// in the subnet (in the same way that the Amazon EC2 CreateNetworkInterface -// call does when a request does not specify a primary private IP address). -// -// If the request provides SecurityGroups, this network interface is associated -// with those security groups. Otherwise, it belongs to the default security -// group for the subnet's VPC. -// -// Assigns the description Mount target fsmt-id for file system fs-id where -// fsmt-id is the mount target ID, and fs-id is the FileSystemId. -// -// Sets the requesterManaged property of the network interface to true, and -// the requesterId value to EFS. -// -// Each Amazon EFS mount target has one corresponding requester-managed EC2 -// network interface. After the network interface is created, Amazon EFS -// sets the NetworkInterfaceId field in the mount target's description to -// the network interface ID, and the IpAddress field to its address. If network -// interface creation fails, the entire CreateMountTarget operation fails. -// -// The CreateMountTarget call returns only after creating the network interface, -// but while the mount target state is still creating, you can check the mount -// target creation status by calling the DescribeMountTargets operation, which -// among other things returns the mount target state. -// -// We recommend you create a mount target in each of the Availability Zones. -// There are cost considerations for using a file system in an Availability -// Zone through a mount target created in another Availability Zone. For more -// information, see Amazon EFS (http://aws.amazon.com/efs/). In addition, by -// always using a mount target local to the instance's Availability Zone, you -// eliminate a partial failure scenario. If the Availability Zone in which your -// mount target is created goes down, then you won't be able to access your -// file system through that mount target. -// -// This operation requires permissions for the following action on the file -// system: -// -// * elasticfilesystem:CreateMountTarget -// -// This operation also requires permissions for the following Amazon EC2 actions: -// -// * ec2:DescribeSubnets -// -// * ec2:DescribeNetworkInterfaces -// -// * ec2:CreateNetworkInterface -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation CreateMountTarget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// * ErrCodeInternalServerError "InternalServerError" -// Returned if an error occurred on the server side. -// -// * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId value doesn't exist in the requester's -// AWS account. -// -// * ErrCodeIncorrectFileSystemLifeCycleState "IncorrectFileSystemLifeCycleState" -// Returned if the file system's lifecycle state is not "available". -// -// * ErrCodeMountTargetConflict "MountTargetConflict" -// Returned if the mount target would violate one of the specified restrictions -// based on the file system's existing mount targets. -// -// * ErrCodeSubnetNotFound "SubnetNotFound" -// Returned if there is no subnet with ID SubnetId provided in the request. -// -// * ErrCodeNoFreeAddressesInSubnet "NoFreeAddressesInSubnet" -// Returned if IpAddress was not specified in the request and there are no free -// IP addresses in the subnet. -// -// * ErrCodeIpAddressInUse "IpAddressInUse" -// Returned if the request specified an IpAddress that is already in use in -// the subnet. -// -// * ErrCodeNetworkInterfaceLimitExceeded "NetworkInterfaceLimitExceeded" -// The calling account has reached the limit for elastic network interfaces -// for the specific AWS Region. The client should try to delete some elastic -// network interfaces or get the account limit raised. For more information, -// see Amazon VPC Limits (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html) -// in the Amazon VPC User Guide (see the Network interfaces per VPC entry in -// the table). -// -// * ErrCodeSecurityGroupLimitExceeded "SecurityGroupLimitExceeded" -// Returned if the size of SecurityGroups specified in the request is greater -// than five. -// -// * ErrCodeSecurityGroupNotFound "SecurityGroupNotFound" -// Returned if one of the specified security groups doesn't exist in the subnet's -// VPC. -// -// * ErrCodeUnsupportedAvailabilityZone "UnsupportedAvailabilityZone" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateMountTarget -func (c *EFS) CreateMountTarget(input *CreateMountTargetInput) (*MountTargetDescription, error) { - req, out := c.CreateMountTargetRequest(input) - return out, req.Send() -} - -// CreateMountTargetWithContext is the same as CreateMountTarget with the addition of -// the ability to pass a context and additional request options. -// -// See CreateMountTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) CreateMountTargetWithContext(ctx aws.Context, input *CreateMountTargetInput, opts ...request.Option) (*MountTargetDescription, error) { - req, out := c.CreateMountTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTags = "CreateTags" - -// CreateTagsRequest generates a "aws/request.Request" representing the -// client's request for the CreateTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTags for more information on using the CreateTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTagsRequest method. -// req, resp := client.CreateTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateTags -func (c *EFS) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) { - op := &request.Operation{ - Name: opCreateTags, - HTTPMethod: "POST", - HTTPPath: "/2015-02-01/create-tags/{FileSystemId}", - } - - if input == nil { - input = &CreateTagsInput{} - } - - output = &CreateTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateTags API operation for Amazon Elastic File System. -// -// Creates or overwrites tags associated with a file system. Each tag is a key-value -// pair. If a tag key specified in the request already exists on the file system, -// this operation overwrites its value with the value provided in the request. -// If you add the Name tag to your file system, Amazon EFS returns it in the -// response to the DescribeFileSystems operation. -// -// This operation requires permission for the elasticfilesystem:CreateTags action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation CreateTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// * ErrCodeInternalServerError "InternalServerError" -// Returned if an error occurred on the server side. -// -// * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId value doesn't exist in the requester's -// AWS account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateTags -func (c *EFS) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) { - req, out := c.CreateTagsRequest(input) - return out, req.Send() -} - -// CreateTagsWithContext is the same as CreateTags with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opts ...request.Option) (*CreateTagsOutput, error) { - req, out := c.CreateTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFileSystem = "DeleteFileSystem" - -// DeleteFileSystemRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFileSystem operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFileSystem for more information on using the DeleteFileSystem -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFileSystemRequest method. -// req, resp := client.DeleteFileSystemRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteFileSystem -func (c *EFS) DeleteFileSystemRequest(input *DeleteFileSystemInput) (req *request.Request, output *DeleteFileSystemOutput) { - op := &request.Operation{ - Name: opDeleteFileSystem, - HTTPMethod: "DELETE", - HTTPPath: "/2015-02-01/file-systems/{FileSystemId}", - } - - if input == nil { - input = &DeleteFileSystemInput{} - } - - output = &DeleteFileSystemOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteFileSystem API operation for Amazon Elastic File System. -// -// Deletes a file system, permanently severing access to its contents. Upon -// return, the file system no longer exists and you can't access any contents -// of the deleted file system. -// -// You can't delete a file system that is in use. That is, if the file system -// has any mount targets, you must first delete them. For more information, -// see DescribeMountTargets and DeleteMountTarget. -// -// The DeleteFileSystem call returns while the file system state is still deleting. -// You can check the file system deletion status by calling the DescribeFileSystems -// operation, which returns a list of file systems in your account. If you pass -// file system ID or creation token for the deleted file system, the DescribeFileSystems -// returns a 404 FileSystemNotFound error. -// -// This operation requires permissions for the elasticfilesystem:DeleteFileSystem -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DeleteFileSystem for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// * ErrCodeInternalServerError "InternalServerError" -// Returned if an error occurred on the server side. -// -// * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId value doesn't exist in the requester's -// AWS account. -// -// * ErrCodeFileSystemInUse "FileSystemInUse" -// Returned if a file system has mount targets. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteFileSystem -func (c *EFS) DeleteFileSystem(input *DeleteFileSystemInput) (*DeleteFileSystemOutput, error) { - req, out := c.DeleteFileSystemRequest(input) - return out, req.Send() -} - -// DeleteFileSystemWithContext is the same as DeleteFileSystem with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFileSystem for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DeleteFileSystemWithContext(ctx aws.Context, input *DeleteFileSystemInput, opts ...request.Option) (*DeleteFileSystemOutput, error) { - req, out := c.DeleteFileSystemRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteMountTarget = "DeleteMountTarget" - -// DeleteMountTargetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMountTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteMountTarget for more information on using the DeleteMountTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteMountTargetRequest method. -// req, resp := client.DeleteMountTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteMountTarget -func (c *EFS) DeleteMountTargetRequest(input *DeleteMountTargetInput) (req *request.Request, output *DeleteMountTargetOutput) { - op := &request.Operation{ - Name: opDeleteMountTarget, - HTTPMethod: "DELETE", - HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}", - } - - if input == nil { - input = &DeleteMountTargetInput{} - } - - output = &DeleteMountTargetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteMountTarget API operation for Amazon Elastic File System. -// -// Deletes the specified mount target. -// -// This operation forcibly breaks any mounts of the file system via the mount -// target that is being deleted, which might disrupt instances or applications -// using those mounts. To avoid applications getting cut off abruptly, you might -// consider unmounting any mounts of the mount target, if feasible. The operation -// also deletes the associated network interface. Uncommitted writes may be -// lost, but breaking a mount target using this operation does not corrupt the -// file system itself. The file system you created remains. You can mount an -// EC2 instance in your VPC via another mount target. -// -// This operation requires permissions for the following action on the file -// system: -// -// * elasticfilesystem:DeleteMountTarget -// -// The DeleteMountTarget call returns while the mount target state is still -// deleting. You can check the mount target deletion by calling the DescribeMountTargets -// operation, which returns a list of mount target descriptions for the given -// file system. -// -// The operation also requires permissions for the following Amazon EC2 action -// on the mount target's network interface: -// -// * ec2:DeleteNetworkInterface -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DeleteMountTarget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// * ErrCodeInternalServerError "InternalServerError" -// Returned if an error occurred on the server side. -// -// * ErrCodeDependencyTimeout "DependencyTimeout" -// The service timed out trying to fulfill the request, and the client should -// try the call again. -// -// * ErrCodeMountTargetNotFound "MountTargetNotFound" -// Returned if there is no mount target with the specified ID found in the caller's -// account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteMountTarget -func (c *EFS) DeleteMountTarget(input *DeleteMountTargetInput) (*DeleteMountTargetOutput, error) { - req, out := c.DeleteMountTargetRequest(input) - return out, req.Send() -} - -// DeleteMountTargetWithContext is the same as DeleteMountTarget with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteMountTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DeleteMountTargetWithContext(ctx aws.Context, input *DeleteMountTargetInput, opts ...request.Option) (*DeleteMountTargetOutput, error) { - req, out := c.DeleteMountTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTags = "DeleteTags" - -// DeleteTagsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTags for more information on using the DeleteTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTagsRequest method. -// req, resp := client.DeleteTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteTags -func (c *EFS) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { - op := &request.Operation{ - Name: opDeleteTags, - HTTPMethod: "POST", - HTTPPath: "/2015-02-01/delete-tags/{FileSystemId}", - } - - if input == nil { - input = &DeleteTagsInput{} - } - - output = &DeleteTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTags API operation for Amazon Elastic File System. -// -// Deletes the specified tags from a file system. If the DeleteTags request -// includes a tag key that does not exist, Amazon EFS ignores it and doesn't -// cause an error. For more information about tags and related restrictions, -// see Tag Restrictions (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) -// in the AWS Billing and Cost Management User Guide. -// -// This operation requires permissions for the elasticfilesystem:DeleteTags -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DeleteTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// * ErrCodeInternalServerError "InternalServerError" -// Returned if an error occurred on the server side. -// -// * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId value doesn't exist in the requester's -// AWS account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteTags -func (c *EFS) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - return out, req.Send() -} - -// DeleteTagsWithContext is the same as DeleteTags with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFileSystems = "DescribeFileSystems" - -// DescribeFileSystemsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFileSystems operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFileSystems for more information on using the DescribeFileSystems -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFileSystemsRequest method. -// req, resp := client.DescribeFileSystemsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystems -func (c *EFS) DescribeFileSystemsRequest(input *DescribeFileSystemsInput) (req *request.Request, output *DescribeFileSystemsOutput) { - op := &request.Operation{ - Name: opDescribeFileSystems, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/file-systems", - } - - if input == nil { - input = &DescribeFileSystemsInput{} - } - - output = &DescribeFileSystemsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFileSystems API operation for Amazon Elastic File System. -// -// Returns the description of a specific Amazon EFS file system if either the -// file system CreationToken or the FileSystemId is provided. Otherwise, it -// returns descriptions of all file systems owned by the caller's AWS account -// in the AWS Region of the endpoint that you're calling. -// -// When retrieving all file system descriptions, you can optionally specify -// the MaxItems parameter to limit the number of descriptions in a response. -// If more file system descriptions remain, Amazon EFS returns a NextMarker, -// an opaque token, in the response. In this case, you should send a subsequent -// request with the Marker request parameter set to the value of NextMarker. -// -// To retrieve a list of your file system descriptions, this operation is used -// in an iterative process, where DescribeFileSystems is called first without -// the Marker and then the operation continues to call it with the Marker parameter -// set to the value of the NextMarker from the previous response until the response -// has no NextMarker. -// -// The implementation may return fewer than MaxItems file system descriptions -// while still including a NextMarker value. -// -// The order of file systems returned in the response of one DescribeFileSystems -// call and the order of file systems returned across the responses of a multi-call -// iteration is unspecified. -// -// This operation requires permissions for the elasticfilesystem:DescribeFileSystems -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DescribeFileSystems for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// * ErrCodeInternalServerError "InternalServerError" -// Returned if an error occurred on the server side. -// -// * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId value doesn't exist in the requester's -// AWS account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystems -func (c *EFS) DescribeFileSystems(input *DescribeFileSystemsInput) (*DescribeFileSystemsOutput, error) { - req, out := c.DescribeFileSystemsRequest(input) - return out, req.Send() -} - -// DescribeFileSystemsWithContext is the same as DescribeFileSystems with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFileSystems for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeFileSystemsWithContext(ctx aws.Context, input *DescribeFileSystemsInput, opts ...request.Option) (*DescribeFileSystemsOutput, error) { - req, out := c.DescribeFileSystemsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMountTargetSecurityGroups = "DescribeMountTargetSecurityGroups" - -// DescribeMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMountTargetSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMountTargetSecurityGroups for more information on using the DescribeMountTargetSecurityGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMountTargetSecurityGroupsRequest method. -// req, resp := client.DescribeMountTargetSecurityGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargetSecurityGroups -func (c *EFS) DescribeMountTargetSecurityGroupsRequest(input *DescribeMountTargetSecurityGroupsInput) (req *request.Request, output *DescribeMountTargetSecurityGroupsOutput) { - op := &request.Operation{ - Name: opDescribeMountTargetSecurityGroups, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}/security-groups", - } - - if input == nil { - input = &DescribeMountTargetSecurityGroupsInput{} - } - - output = &DescribeMountTargetSecurityGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMountTargetSecurityGroups API operation for Amazon Elastic File System. -// -// Returns the security groups currently in effect for a mount target. This -// operation requires that the network interface of the mount target has been -// created and the lifecycle state of the mount target is not deleted. -// -// This operation requires permissions for the following actions: -// -// * elasticfilesystem:DescribeMountTargetSecurityGroups action on the mount -// target's file system. -// -// * ec2:DescribeNetworkInterfaceAttribute action on the mount target's network -// interface. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DescribeMountTargetSecurityGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// * ErrCodeInternalServerError "InternalServerError" -// Returned if an error occurred on the server side. -// -// * ErrCodeMountTargetNotFound "MountTargetNotFound" -// Returned if there is no mount target with the specified ID found in the caller's -// account. -// -// * ErrCodeIncorrectMountTargetState "IncorrectMountTargetState" -// Returned if the mount target is not in the correct state for the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargetSecurityGroups -func (c *EFS) DescribeMountTargetSecurityGroups(input *DescribeMountTargetSecurityGroupsInput) (*DescribeMountTargetSecurityGroupsOutput, error) { - req, out := c.DescribeMountTargetSecurityGroupsRequest(input) - return out, req.Send() -} - -// DescribeMountTargetSecurityGroupsWithContext is the same as DescribeMountTargetSecurityGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMountTargetSecurityGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeMountTargetSecurityGroupsWithContext(ctx aws.Context, input *DescribeMountTargetSecurityGroupsInput, opts ...request.Option) (*DescribeMountTargetSecurityGroupsOutput, error) { - req, out := c.DescribeMountTargetSecurityGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMountTargets = "DescribeMountTargets" - -// DescribeMountTargetsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMountTargets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMountTargets for more information on using the DescribeMountTargets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMountTargetsRequest method. -// req, resp := client.DescribeMountTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargets -func (c *EFS) DescribeMountTargetsRequest(input *DescribeMountTargetsInput) (req *request.Request, output *DescribeMountTargetsOutput) { - op := &request.Operation{ - Name: opDescribeMountTargets, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/mount-targets", - } - - if input == nil { - input = &DescribeMountTargetsInput{} - } - - output = &DescribeMountTargetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMountTargets API operation for Amazon Elastic File System. -// -// Returns the descriptions of all the current mount targets, or a specific -// mount target, for a file system. When requesting all of the current mount -// targets, the order of mount targets returned in the response is unspecified. -// -// This operation requires permissions for the elasticfilesystem:DescribeMountTargets -// action, on either the file system ID that you specify in FileSystemId, or -// on the file system of the mount target that you specify in MountTargetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DescribeMountTargets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// * ErrCodeInternalServerError "InternalServerError" -// Returned if an error occurred on the server side. -// -// * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId value doesn't exist in the requester's -// AWS account. -// -// * ErrCodeMountTargetNotFound "MountTargetNotFound" -// Returned if there is no mount target with the specified ID found in the caller's -// account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargets -func (c *EFS) DescribeMountTargets(input *DescribeMountTargetsInput) (*DescribeMountTargetsOutput, error) { - req, out := c.DescribeMountTargetsRequest(input) - return out, req.Send() -} - -// DescribeMountTargetsWithContext is the same as DescribeMountTargets with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMountTargets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeMountTargetsWithContext(ctx aws.Context, input *DescribeMountTargetsInput, opts ...request.Option) (*DescribeMountTargetsOutput, error) { - req, out := c.DescribeMountTargetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTags = "DescribeTags" - -// DescribeTagsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTags for more information on using the DescribeTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTagsRequest method. -// req, resp := client.DescribeTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeTags -func (c *EFS) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { - op := &request.Operation{ - Name: opDescribeTags, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/tags/{FileSystemId}/", - } - - if input == nil { - input = &DescribeTagsInput{} - } - - output = &DescribeTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTags API operation for Amazon Elastic File System. -// -// Returns the tags associated with a file system. The order of tags returned -// in the response of one DescribeTags call and the order of tags returned across -// the responses of a multi-call iteration (when using pagination) is unspecified. -// -// This operation requires permissions for the elasticfilesystem:DescribeTags -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DescribeTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// * ErrCodeInternalServerError "InternalServerError" -// Returned if an error occurred on the server side. -// -// * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId value doesn't exist in the requester's -// AWS account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeTags -func (c *EFS) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - return out, req.Send() -} - -// DescribeTagsWithContext is the same as DescribeTags with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyMountTargetSecurityGroups = "ModifyMountTargetSecurityGroups" - -// ModifyMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ModifyMountTargetSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyMountTargetSecurityGroups for more information on using the ModifyMountTargetSecurityGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyMountTargetSecurityGroupsRequest method. -// req, resp := client.ModifyMountTargetSecurityGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ModifyMountTargetSecurityGroups -func (c *EFS) ModifyMountTargetSecurityGroupsRequest(input *ModifyMountTargetSecurityGroupsInput) (req *request.Request, output *ModifyMountTargetSecurityGroupsOutput) { - op := &request.Operation{ - Name: opModifyMountTargetSecurityGroups, - HTTPMethod: "PUT", - HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}/security-groups", - } - - if input == nil { - input = &ModifyMountTargetSecurityGroupsInput{} - } - - output = &ModifyMountTargetSecurityGroupsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyMountTargetSecurityGroups API operation for Amazon Elastic File System. -// -// Modifies the set of security groups in effect for a mount target. -// -// When you create a mount target, Amazon EFS also creates a new network interface. -// For more information, see CreateMountTarget. This operation replaces the -// security groups in effect for the network interface associated with a mount -// target, with the SecurityGroups provided in the request. This operation requires -// that the network interface of the mount target has been created and the lifecycle -// state of the mount target is not deleted. -// -// The operation requires permissions for the following actions: -// -// * elasticfilesystem:ModifyMountTargetSecurityGroups action on the mount -// target's file system. -// -// * ec2:ModifyNetworkInterfaceAttribute action on the mount target's network -// interface. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation ModifyMountTargetSecurityGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// * ErrCodeInternalServerError "InternalServerError" -// Returned if an error occurred on the server side. -// -// * ErrCodeMountTargetNotFound "MountTargetNotFound" -// Returned if there is no mount target with the specified ID found in the caller's -// account. -// -// * ErrCodeIncorrectMountTargetState "IncorrectMountTargetState" -// Returned if the mount target is not in the correct state for the operation. -// -// * ErrCodeSecurityGroupLimitExceeded "SecurityGroupLimitExceeded" -// Returned if the size of SecurityGroups specified in the request is greater -// than five. -// -// * ErrCodeSecurityGroupNotFound "SecurityGroupNotFound" -// Returned if one of the specified security groups doesn't exist in the subnet's -// VPC. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ModifyMountTargetSecurityGroups -func (c *EFS) ModifyMountTargetSecurityGroups(input *ModifyMountTargetSecurityGroupsInput) (*ModifyMountTargetSecurityGroupsOutput, error) { - req, out := c.ModifyMountTargetSecurityGroupsRequest(input) - return out, req.Send() -} - -// ModifyMountTargetSecurityGroupsWithContext is the same as ModifyMountTargetSecurityGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyMountTargetSecurityGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) ModifyMountTargetSecurityGroupsWithContext(ctx aws.Context, input *ModifyMountTargetSecurityGroupsInput, opts ...request.Option) (*ModifyMountTargetSecurityGroupsOutput, error) { - req, out := c.ModifyMountTargetSecurityGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFileSystem = "UpdateFileSystem" - -// UpdateFileSystemRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFileSystem operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFileSystem for more information on using the UpdateFileSystem -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFileSystemRequest method. -// req, resp := client.UpdateFileSystemRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UpdateFileSystem -func (c *EFS) UpdateFileSystemRequest(input *UpdateFileSystemInput) (req *request.Request, output *UpdateFileSystemOutput) { - op := &request.Operation{ - Name: opUpdateFileSystem, - HTTPMethod: "PUT", - HTTPPath: "/2015-02-01/file-systems/{FileSystemId}", - } - - if input == nil { - input = &UpdateFileSystemInput{} - } - - output = &UpdateFileSystemOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFileSystem API operation for Amazon Elastic File System. -// -// Updates the throughput mode or the amount of provisioned throughput of an -// existing file system. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation UpdateFileSystem for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId value doesn't exist in the requester's -// AWS account. -// -// * ErrCodeIncorrectFileSystemLifeCycleState "IncorrectFileSystemLifeCycleState" -// Returned if the file system's lifecycle state is not "available". -// -// * ErrCodeInsufficientThroughputCapacity "InsufficientThroughputCapacity" -// Returned if there's not enough capacity to provision additional throughput. -// This value might be returned when you try to create a file system in provisioned -// throughput mode, when you attempt to increase the provisioned throughput -// of an existing file system, or when you attempt to change an existing file -// system from bursting to provisioned throughput mode. -// -// * ErrCodeInternalServerError "InternalServerError" -// Returned if an error occurred on the server side. -// -// * ErrCodeThroughputLimitExceeded "ThroughputLimitExceeded" -// Returned if the throughput mode or amount of provisioned throughput can't -// be changed because the throughput limit of 1024 MiB/s has been reached. -// -// * ErrCodeTooManyRequests "TooManyRequests" -// Returned if you don’t wait at least 24 hours before changing the throughput -// mode, or decreasing the Provisioned Throughput value. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UpdateFileSystem -func (c *EFS) UpdateFileSystem(input *UpdateFileSystemInput) (*UpdateFileSystemOutput, error) { - req, out := c.UpdateFileSystemRequest(input) - return out, req.Send() -} - -// UpdateFileSystemWithContext is the same as UpdateFileSystem with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFileSystem for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) UpdateFileSystemWithContext(ctx aws.Context, input *UpdateFileSystemInput, opts ...request.Option) (*UpdateFileSystemOutput, error) { - req, out := c.UpdateFileSystemRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type CreateFileSystemInput struct { - _ struct{} `type:"structure"` - - // String of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent - // creation. - // - // CreationToken is a required field - CreationToken *string `min:"1" type:"string" required:"true"` - - // A Boolean value that, if true, creates an encrypted file system. When creating - // an encrypted file system, you have the option of specifying a CreateFileSystemRequest$KmsKeyId - // for an existing AWS Key Management Service (AWS KMS) customer master key - // (CMK). If you don't specify a CMK, then the default CMK for Amazon EFS, /aws/elasticfilesystem, - // is used to protect the encrypted file system. - Encrypted *bool `type:"boolean"` - - // The ID of the AWS KMS CMK to be used to protect the encrypted file system. - // This parameter is only required if you want to use a non-default CMK. If - // this parameter is not specified, the default CMK for Amazon EFS is used. - // This ID can be in one of the following formats: - // - // * Key ID - A unique identifier of the key, for example, 1234abcd-12ab-34cd-56ef-1234567890ab. - // - // * ARN - An Amazon Resource Name (ARN) for the key, for example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. - // - // * Key alias - A previously created display name for a key. For example, - // alias/projectKey1. - // - // * Key alias ARN - An ARN for a key alias, for example, arn:aws:kms:us-west-2:444455556666:alias/projectKey1. - // - // If KmsKeyId is specified, the CreateFileSystemRequest$Encrypted parameter - // must be set to true. - KmsKeyId *string `min:"1" type:"string"` - - // The PerformanceMode of the file system. We recommend generalPurpose performance - // mode for most file systems. File systems using the maxIO performance mode - // can scale to higher levels of aggregate throughput and operations per second - // with a tradeoff of slightly higher latencies for most file operations. This - // can't be changed after the file system has been created. - PerformanceMode *string `type:"string" enum:"PerformanceMode"` - - // The throughput, measured in MiB/s, that you want to provision for a file - // system that you're creating. The limit on throughput is 1024 MiB/s. You can - // get these limits increased by contacting AWS Support. For more information, - // see Amazon EFS Limits That You Can Increase (http://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits) - // in the Amazon EFS User Guide. - ProvisionedThroughputInMibps *float64 `type:"double"` - - // The throughput mode for the file system to be created. There are two throughput - // modes to choose from for your file system: bursting and provisioned. You - // can decrease your file system's throughput in Provisioned Throughput mode - // or change between the throughput modes as long as it’s been more than 24 - // hours since the last decrease or throughput mode change. - ThroughputMode *string `type:"string" enum:"ThroughputMode"` -} - -// String returns the string representation -func (s CreateFileSystemInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFileSystemInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFileSystemInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemInput"} - if s.CreationToken == nil { - invalidParams.Add(request.NewErrParamRequired("CreationToken")) - } - if s.CreationToken != nil && len(*s.CreationToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CreationToken", 1)) - } - if s.KmsKeyId != nil && len(*s.KmsKeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KmsKeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationToken sets the CreationToken field's value. -func (s *CreateFileSystemInput) SetCreationToken(v string) *CreateFileSystemInput { - s.CreationToken = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *CreateFileSystemInput) SetEncrypted(v bool) *CreateFileSystemInput { - s.Encrypted = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateFileSystemInput) SetKmsKeyId(v string) *CreateFileSystemInput { - s.KmsKeyId = &v - return s -} - -// SetPerformanceMode sets the PerformanceMode field's value. -func (s *CreateFileSystemInput) SetPerformanceMode(v string) *CreateFileSystemInput { - s.PerformanceMode = &v - return s -} - -// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. -func (s *CreateFileSystemInput) SetProvisionedThroughputInMibps(v float64) *CreateFileSystemInput { - s.ProvisionedThroughputInMibps = &v - return s -} - -// SetThroughputMode sets the ThroughputMode field's value. -func (s *CreateFileSystemInput) SetThroughputMode(v string) *CreateFileSystemInput { - s.ThroughputMode = &v - return s -} - -type CreateMountTargetInput struct { - _ struct{} `type:"structure"` - - // ID of the file system for which to create the mount target. - // - // FileSystemId is a required field - FileSystemId *string `type:"string" required:"true"` - - // Valid IPv4 address within the address range of the specified subnet. - IpAddress *string `type:"string"` - - // Up to five VPC security group IDs, of the form sg-xxxxxxxx. These must be - // for the same VPC as subnet specified. - SecurityGroups []*string `type:"list"` - - // ID of the subnet to add the mount target in. - // - // SubnetId is a required field - SubnetId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateMountTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMountTargetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateMountTargetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateMountTargetInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.SubnetId == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *CreateMountTargetInput) SetFileSystemId(v string) *CreateMountTargetInput { - s.FileSystemId = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *CreateMountTargetInput) SetIpAddress(v string) *CreateMountTargetInput { - s.IpAddress = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *CreateMountTargetInput) SetSecurityGroups(v []*string) *CreateMountTargetInput { - s.SecurityGroups = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *CreateMountTargetInput) SetSubnetId(v string) *CreateMountTargetInput { - s.SubnetId = &v - return s -} - -type CreateTagsInput struct { - _ struct{} `type:"structure"` - - // ID of the file system whose tags you want to modify (String). This operation - // modifies the tags only, not the file system. - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` - - // Array of Tag objects to add. Each Tag object is a key-value pair. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *CreateTagsInput) SetFileSystemId(v string) *CreateTagsInput { - s.FileSystemId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateTagsInput) SetTags(v []*Tag) *CreateTagsInput { - s.Tags = v - return s -} - -type CreateTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTagsOutput) GoString() string { - return s.String() -} - -type DeleteFileSystemInput struct { - _ struct{} `type:"structure"` - - // ID of the file system you want to delete. - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteFileSystemInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFileSystemInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFileSystemInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFileSystemInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DeleteFileSystemInput) SetFileSystemId(v string) *DeleteFileSystemInput { - s.FileSystemId = &v - return s -} - -type DeleteFileSystemOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteFileSystemOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFileSystemOutput) GoString() string { - return s.String() -} - -type DeleteMountTargetInput struct { - _ struct{} `type:"structure"` - - // ID of the mount target to delete (String). - // - // MountTargetId is a required field - MountTargetId *string `location:"uri" locationName:"MountTargetId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteMountTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMountTargetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMountTargetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMountTargetInput"} - if s.MountTargetId == nil { - invalidParams.Add(request.NewErrParamRequired("MountTargetId")) - } - if s.MountTargetId != nil && len(*s.MountTargetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMountTargetId sets the MountTargetId field's value. -func (s *DeleteMountTargetInput) SetMountTargetId(v string) *DeleteMountTargetInput { - s.MountTargetId = &v - return s -} - -type DeleteMountTargetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteMountTargetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMountTargetOutput) GoString() string { - return s.String() -} - -type DeleteTagsInput struct { - _ struct{} `type:"structure"` - - // ID of the file system whose tags you want to delete (String). - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` - - // List of tag keys to delete. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DeleteTagsInput) SetFileSystemId(v string) *DeleteTagsInput { - s.FileSystemId = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput { - s.TagKeys = v - return s -} - -type DeleteTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagsOutput) GoString() string { - return s.String() -} - -type DescribeFileSystemsInput struct { - _ struct{} `type:"structure"` - - // (Optional) Restricts the list to the file system with this creation token - // (String). You specify a creation token when you create an Amazon EFS file - // system. - CreationToken *string `location:"querystring" locationName:"CreationToken" min:"1" type:"string"` - - // (Optional) ID of the file system whose description you want to retrieve (String). - FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string"` - - // (Optional) Opaque pagination token returned from a previous DescribeFileSystems - // operation (String). If present, specifies to continue the list from where - // the returning call had left off. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // (Optional) Specifies the maximum number of file systems to return in the - // response (integer). This parameter value must be greater than 0. The number - // of items that Amazon EFS returns is the minimum of the MaxItems parameter - // specified in the request and the service's internal maximum number of items - // per page. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` -} - -// String returns the string representation -func (s DescribeFileSystemsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFileSystemsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFileSystemsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFileSystemsInput"} - if s.CreationToken != nil && len(*s.CreationToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CreationToken", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationToken sets the CreationToken field's value. -func (s *DescribeFileSystemsInput) SetCreationToken(v string) *DescribeFileSystemsInput { - s.CreationToken = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DescribeFileSystemsInput) SetFileSystemId(v string) *DescribeFileSystemsInput { - s.FileSystemId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeFileSystemsInput) SetMarker(v string) *DescribeFileSystemsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *DescribeFileSystemsInput) SetMaxItems(v int64) *DescribeFileSystemsInput { - s.MaxItems = &v - return s -} - -type DescribeFileSystemsOutput struct { - _ struct{} `type:"structure"` - - // Array of file system descriptions. - FileSystems []*FileSystemDescription `type:"list"` - - // Present if provided by caller in the request (String). - Marker *string `type:"string"` - - // Present if there are more file systems than returned in the response (String). - // You can use the NextMarker in the subsequent request to fetch the descriptions. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeFileSystemsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFileSystemsOutput) GoString() string { - return s.String() -} - -// SetFileSystems sets the FileSystems field's value. -func (s *DescribeFileSystemsOutput) SetFileSystems(v []*FileSystemDescription) *DescribeFileSystemsOutput { - s.FileSystems = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeFileSystemsOutput) SetMarker(v string) *DescribeFileSystemsOutput { - s.Marker = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeFileSystemsOutput) SetNextMarker(v string) *DescribeFileSystemsOutput { - s.NextMarker = &v - return s -} - -type DescribeMountTargetSecurityGroupsInput struct { - _ struct{} `type:"structure"` - - // ID of the mount target whose security groups you want to retrieve. - // - // MountTargetId is a required field - MountTargetId *string `location:"uri" locationName:"MountTargetId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeMountTargetSecurityGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMountTargetSecurityGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMountTargetSecurityGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMountTargetSecurityGroupsInput"} - if s.MountTargetId == nil { - invalidParams.Add(request.NewErrParamRequired("MountTargetId")) - } - if s.MountTargetId != nil && len(*s.MountTargetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMountTargetId sets the MountTargetId field's value. -func (s *DescribeMountTargetSecurityGroupsInput) SetMountTargetId(v string) *DescribeMountTargetSecurityGroupsInput { - s.MountTargetId = &v - return s -} - -type DescribeMountTargetSecurityGroupsOutput struct { - _ struct{} `type:"structure"` - - // Array of security groups. - // - // SecurityGroups is a required field - SecurityGroups []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeMountTargetSecurityGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMountTargetSecurityGroupsOutput) GoString() string { - return s.String() -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *DescribeMountTargetSecurityGroupsOutput) SetSecurityGroups(v []*string) *DescribeMountTargetSecurityGroupsOutput { - s.SecurityGroups = v - return s -} - -type DescribeMountTargetsInput struct { - _ struct{} `type:"structure"` - - // (Optional) ID of the file system whose mount targets you want to list (String). - // It must be included in your request if MountTargetId is not included. - FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string"` - - // (Optional) Opaque pagination token returned from a previous DescribeMountTargets - // operation (String). If present, it specifies to continue the list from where - // the previous returning call left off. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // (Optional) Maximum number of mount targets to return in the response. It - // must be an integer with a value greater than zero. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` - - // (Optional) ID of the mount target that you want to have described (String). - // It must be included in your request if FileSystemId is not included. - MountTargetId *string `location:"querystring" locationName:"MountTargetId" type:"string"` -} - -// String returns the string representation -func (s DescribeMountTargetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMountTargetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMountTargetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMountTargetsInput"} - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DescribeMountTargetsInput) SetFileSystemId(v string) *DescribeMountTargetsInput { - s.FileSystemId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeMountTargetsInput) SetMarker(v string) *DescribeMountTargetsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *DescribeMountTargetsInput) SetMaxItems(v int64) *DescribeMountTargetsInput { - s.MaxItems = &v - return s -} - -// SetMountTargetId sets the MountTargetId field's value. -func (s *DescribeMountTargetsInput) SetMountTargetId(v string) *DescribeMountTargetsInput { - s.MountTargetId = &v - return s -} - -type DescribeMountTargetsOutput struct { - _ struct{} `type:"structure"` - - // If the request included the Marker, the response returns that value in this - // field. - Marker *string `type:"string"` - - // Returns the file system's mount targets as an array of MountTargetDescription - // objects. - MountTargets []*MountTargetDescription `type:"list"` - - // If a value is present, there are more mount targets to return. In a subsequent - // request, you can provide Marker in your request with this value to retrieve - // the next set of mount targets. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeMountTargetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMountTargetsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeMountTargetsOutput) SetMarker(v string) *DescribeMountTargetsOutput { - s.Marker = &v - return s -} - -// SetMountTargets sets the MountTargets field's value. -func (s *DescribeMountTargetsOutput) SetMountTargets(v []*MountTargetDescription) *DescribeMountTargetsOutput { - s.MountTargets = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeMountTargetsOutput) SetNextMarker(v string) *DescribeMountTargetsOutput { - s.NextMarker = &v - return s -} - -type DescribeTagsInput struct { - _ struct{} `type:"structure"` - - // ID of the file system whose tag set you want to retrieve. - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` - - // (Optional) Opaque pagination token returned from a previous DescribeTags - // operation (String). If present, it specifies to continue the list from where - // the previous call left off. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // (Optional) Maximum number of file system tags to return in the response. - // It must be an integer with a value greater than zero. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` -} - -// String returns the string representation -func (s DescribeTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DescribeTagsInput) SetFileSystemId(v string) *DescribeTagsInput { - s.FileSystemId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTagsInput) SetMarker(v string) *DescribeTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *DescribeTagsInput) SetMaxItems(v int64) *DescribeTagsInput { - s.MaxItems = &v - return s -} - -type DescribeTagsOutput struct { - _ struct{} `type:"structure"` - - // If the request included a Marker, the response returns that value in this - // field. - Marker *string `type:"string"` - - // If a value is present, there are more tags to return. In a subsequent request, - // you can provide the value of NextMarker as the value of the Marker parameter - // in your next request to retrieve the next set of tags. - NextMarker *string `type:"string"` - - // Returns tags associated with the file system as an array of Tag objects. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTagsOutput) SetMarker(v string) *DescribeTagsOutput { - s.Marker = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeTagsOutput) SetNextMarker(v string) *DescribeTagsOutput { - s.NextMarker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *DescribeTagsOutput) SetTags(v []*Tag) *DescribeTagsOutput { - s.Tags = v - return s -} - -// Description of the file system. -type FileSystemDescription struct { - _ struct{} `type:"structure"` - - // Time that the file system was created, in seconds (since 1970-01-01T00:00:00Z). - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // Opaque string specified in the request. - // - // CreationToken is a required field - CreationToken *string `min:"1" type:"string" required:"true"` - - // A Boolean value that, if true, indicates that the file system is encrypted. - Encrypted *bool `type:"boolean"` - - // ID of the file system, assigned by Amazon EFS. - // - // FileSystemId is a required field - FileSystemId *string `type:"string" required:"true"` - - // The ID of an AWS Key Management Service (AWS KMS) customer master key (CMK) - // that was used to protect the encrypted file system. - KmsKeyId *string `min:"1" type:"string"` - - // Lifecycle phase of the file system. - // - // LifeCycleState is a required field - LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"` - - // You can add tags to a file system, including a Name tag. For more information, - // see CreateTags. If the file system has a Name tag, Amazon EFS returns the - // value in this field. - Name *string `type:"string"` - - // Current number of mount targets that the file system has. For more information, - // see CreateMountTarget. - // - // NumberOfMountTargets is a required field - NumberOfMountTargets *int64 `type:"integer" required:"true"` - - // AWS account that created the file system. If the file system was created - // by an IAM user, the parent account to which the user belongs is the owner. - // - // OwnerId is a required field - OwnerId *string `type:"string" required:"true"` - - // The PerformanceMode of the file system. - // - // PerformanceMode is a required field - PerformanceMode *string `type:"string" required:"true" enum:"PerformanceMode"` - - // The throughput, measured in MiB/s, that you want to provision for a file - // system. The limit on throughput is 1024 MiB/s. You can get these limits increased - // by contacting AWS Support. For more information, see Amazon EFS Limits That - // You Can Increase (http://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits) - // in the Amazon EFS User Guide. - ProvisionedThroughputInMibps *float64 `type:"double"` - - // Latest known metered size (in bytes) of data stored in the file system, in - // its Value field, and the time at which that size was determined in its Timestamp - // field. The Timestamp value is the integer number of seconds since 1970-01-01T00:00:00Z. - // The SizeInBytes value doesn't represent the size of a consistent snapshot - // of the file system, but it is eventually consistent when there are no writes - // to the file system. That is, SizeInBytes represents actual size only if the - // file system is not modified for a period longer than a couple of hours. Otherwise, - // the value is not the exact size that the file system was at any point in - // time. - // - // SizeInBytes is a required field - SizeInBytes *FileSystemSize `type:"structure" required:"true"` - - // The throughput mode for a file system. There are two throughput modes to - // choose from for your file system: bursting and provisioned. You can decrease - // your file system's throughput in Provisioned Throughput mode or change between - // the throughput modes as long as it’s been more than 24 hours since the last - // decrease or throughput mode change. - ThroughputMode *string `type:"string" enum:"ThroughputMode"` -} - -// String returns the string representation -func (s FileSystemDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FileSystemDescription) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *FileSystemDescription) SetCreationTime(v time.Time) *FileSystemDescription { - s.CreationTime = &v - return s -} - -// SetCreationToken sets the CreationToken field's value. -func (s *FileSystemDescription) SetCreationToken(v string) *FileSystemDescription { - s.CreationToken = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *FileSystemDescription) SetEncrypted(v bool) *FileSystemDescription { - s.Encrypted = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *FileSystemDescription) SetFileSystemId(v string) *FileSystemDescription { - s.FileSystemId = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *FileSystemDescription) SetKmsKeyId(v string) *FileSystemDescription { - s.KmsKeyId = &v - return s -} - -// SetLifeCycleState sets the LifeCycleState field's value. -func (s *FileSystemDescription) SetLifeCycleState(v string) *FileSystemDescription { - s.LifeCycleState = &v - return s -} - -// SetName sets the Name field's value. -func (s *FileSystemDescription) SetName(v string) *FileSystemDescription { - s.Name = &v - return s -} - -// SetNumberOfMountTargets sets the NumberOfMountTargets field's value. -func (s *FileSystemDescription) SetNumberOfMountTargets(v int64) *FileSystemDescription { - s.NumberOfMountTargets = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *FileSystemDescription) SetOwnerId(v string) *FileSystemDescription { - s.OwnerId = &v - return s -} - -// SetPerformanceMode sets the PerformanceMode field's value. -func (s *FileSystemDescription) SetPerformanceMode(v string) *FileSystemDescription { - s.PerformanceMode = &v - return s -} - -// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. -func (s *FileSystemDescription) SetProvisionedThroughputInMibps(v float64) *FileSystemDescription { - s.ProvisionedThroughputInMibps = &v - return s -} - -// SetSizeInBytes sets the SizeInBytes field's value. -func (s *FileSystemDescription) SetSizeInBytes(v *FileSystemSize) *FileSystemDescription { - s.SizeInBytes = v - return s -} - -// SetThroughputMode sets the ThroughputMode field's value. -func (s *FileSystemDescription) SetThroughputMode(v string) *FileSystemDescription { - s.ThroughputMode = &v - return s -} - -// Latest known metered size (in bytes) of data stored in the file system, in -// its Value field, and the time at which that size was determined in its Timestamp -// field. Note that the value does not represent the size of a consistent snapshot -// of the file system, but it is eventually consistent when there are no writes -// to the file system. That is, the value will represent the actual size only -// if the file system is not modified for a period longer than a couple of hours. -// Otherwise, the value is not necessarily the exact size the file system was -// at any instant in time. -type FileSystemSize struct { - _ struct{} `type:"structure"` - - // Time at which the size of data, returned in the Value field, was determined. - // The value is the integer number of seconds since 1970-01-01T00:00:00Z. - Timestamp *time.Time `type:"timestamp"` - - // Latest known metered size (in bytes) of data stored in the file system. - // - // Value is a required field - Value *int64 `type:"long" required:"true"` -} - -// String returns the string representation -func (s FileSystemSize) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FileSystemSize) GoString() string { - return s.String() -} - -// SetTimestamp sets the Timestamp field's value. -func (s *FileSystemSize) SetTimestamp(v time.Time) *FileSystemSize { - s.Timestamp = &v - return s -} - -// SetValue sets the Value field's value. -func (s *FileSystemSize) SetValue(v int64) *FileSystemSize { - s.Value = &v - return s -} - -type ModifyMountTargetSecurityGroupsInput struct { - _ struct{} `type:"structure"` - - // ID of the mount target whose security groups you want to modify. - // - // MountTargetId is a required field - MountTargetId *string `location:"uri" locationName:"MountTargetId" type:"string" required:"true"` - - // Array of up to five VPC security group IDs. - SecurityGroups []*string `type:"list"` -} - -// String returns the string representation -func (s ModifyMountTargetSecurityGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyMountTargetSecurityGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyMountTargetSecurityGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyMountTargetSecurityGroupsInput"} - if s.MountTargetId == nil { - invalidParams.Add(request.NewErrParamRequired("MountTargetId")) - } - if s.MountTargetId != nil && len(*s.MountTargetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMountTargetId sets the MountTargetId field's value. -func (s *ModifyMountTargetSecurityGroupsInput) SetMountTargetId(v string) *ModifyMountTargetSecurityGroupsInput { - s.MountTargetId = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *ModifyMountTargetSecurityGroupsInput) SetSecurityGroups(v []*string) *ModifyMountTargetSecurityGroupsInput { - s.SecurityGroups = v - return s -} - -type ModifyMountTargetSecurityGroupsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyMountTargetSecurityGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyMountTargetSecurityGroupsOutput) GoString() string { - return s.String() -} - -// Provides a description of a mount target. -type MountTargetDescription struct { - _ struct{} `type:"structure"` - - // ID of the file system for which the mount target is intended. - // - // FileSystemId is a required field - FileSystemId *string `type:"string" required:"true"` - - // Address at which the file system may be mounted via the mount target. - IpAddress *string `type:"string"` - - // Lifecycle state of the mount target. - // - // LifeCycleState is a required field - LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"` - - // System-assigned mount target ID. - // - // MountTargetId is a required field - MountTargetId *string `type:"string" required:"true"` - - // ID of the network interface that Amazon EFS created when it created the mount - // target. - NetworkInterfaceId *string `type:"string"` - - // AWS account ID that owns the resource. - OwnerId *string `type:"string"` - - // ID of the mount target's subnet. - // - // SubnetId is a required field - SubnetId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s MountTargetDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MountTargetDescription) GoString() string { - return s.String() -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *MountTargetDescription) SetFileSystemId(v string) *MountTargetDescription { - s.FileSystemId = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *MountTargetDescription) SetIpAddress(v string) *MountTargetDescription { - s.IpAddress = &v - return s -} - -// SetLifeCycleState sets the LifeCycleState field's value. -func (s *MountTargetDescription) SetLifeCycleState(v string) *MountTargetDescription { - s.LifeCycleState = &v - return s -} - -// SetMountTargetId sets the MountTargetId field's value. -func (s *MountTargetDescription) SetMountTargetId(v string) *MountTargetDescription { - s.MountTargetId = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *MountTargetDescription) SetNetworkInterfaceId(v string) *MountTargetDescription { - s.NetworkInterfaceId = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *MountTargetDescription) SetOwnerId(v string) *MountTargetDescription { - s.OwnerId = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *MountTargetDescription) SetSubnetId(v string) *MountTargetDescription { - s.SubnetId = &v - return s -} - -// A tag is a key-value pair. Allowed characters: letters, whitespace, and numbers, -// representable in UTF-8, and the following characters: + - = . _ : / -type Tag struct { - _ struct{} `type:"structure"` - - // Tag key (String). The key can't start with aws:. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // Value of the tag key. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type UpdateFileSystemInput struct { - _ struct{} `type:"structure"` - - // The ID of the file system that you want to update. - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` - - // (Optional) The amount of throughput, in MiB/s, that you want to provision - // for your file system. If you're not updating the amount of provisioned throughput - // for your file system, you don't need to provide this value in your request. - ProvisionedThroughputInMibps *float64 `type:"double"` - - // (Optional) The throughput mode that you want your file system to use. If - // you're not updating your throughput mode, you don't need to provide this - // value in your request. - ThroughputMode *string `type:"string" enum:"ThroughputMode"` -} - -// String returns the string representation -func (s UpdateFileSystemInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFileSystemInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFileSystemInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFileSystemInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *UpdateFileSystemInput) SetFileSystemId(v string) *UpdateFileSystemInput { - s.FileSystemId = &v - return s -} - -// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. -func (s *UpdateFileSystemInput) SetProvisionedThroughputInMibps(v float64) *UpdateFileSystemInput { - s.ProvisionedThroughputInMibps = &v - return s -} - -// SetThroughputMode sets the ThroughputMode field's value. -func (s *UpdateFileSystemInput) SetThroughputMode(v string) *UpdateFileSystemInput { - s.ThroughputMode = &v - return s -} - -// Description of the file system. -type UpdateFileSystemOutput struct { - _ struct{} `type:"structure"` - - // Time that the file system was created, in seconds (since 1970-01-01T00:00:00Z). - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // Opaque string specified in the request. - // - // CreationToken is a required field - CreationToken *string `min:"1" type:"string" required:"true"` - - // A Boolean value that, if true, indicates that the file system is encrypted. - Encrypted *bool `type:"boolean"` - - // ID of the file system, assigned by Amazon EFS. - // - // FileSystemId is a required field - FileSystemId *string `type:"string" required:"true"` - - // The ID of an AWS Key Management Service (AWS KMS) customer master key (CMK) - // that was used to protect the encrypted file system. - KmsKeyId *string `min:"1" type:"string"` - - // Lifecycle phase of the file system. - // - // LifeCycleState is a required field - LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"` - - // You can add tags to a file system, including a Name tag. For more information, - // see CreateTags. If the file system has a Name tag, Amazon EFS returns the - // value in this field. - Name *string `type:"string"` - - // Current number of mount targets that the file system has. For more information, - // see CreateMountTarget. - // - // NumberOfMountTargets is a required field - NumberOfMountTargets *int64 `type:"integer" required:"true"` - - // AWS account that created the file system. If the file system was created - // by an IAM user, the parent account to which the user belongs is the owner. - // - // OwnerId is a required field - OwnerId *string `type:"string" required:"true"` - - // The PerformanceMode of the file system. - // - // PerformanceMode is a required field - PerformanceMode *string `type:"string" required:"true" enum:"PerformanceMode"` - - // The throughput, measured in MiB/s, that you want to provision for a file - // system. The limit on throughput is 1024 MiB/s. You can get these limits increased - // by contacting AWS Support. For more information, see Amazon EFS Limits That - // You Can Increase (http://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits) - // in the Amazon EFS User Guide. - ProvisionedThroughputInMibps *float64 `type:"double"` - - // Latest known metered size (in bytes) of data stored in the file system, in - // its Value field, and the time at which that size was determined in its Timestamp - // field. The Timestamp value is the integer number of seconds since 1970-01-01T00:00:00Z. - // The SizeInBytes value doesn't represent the size of a consistent snapshot - // of the file system, but it is eventually consistent when there are no writes - // to the file system. That is, SizeInBytes represents actual size only if the - // file system is not modified for a period longer than a couple of hours. Otherwise, - // the value is not the exact size that the file system was at any point in - // time. - // - // SizeInBytes is a required field - SizeInBytes *FileSystemSize `type:"structure" required:"true"` - - // The throughput mode for a file system. There are two throughput modes to - // choose from for your file system: bursting and provisioned. You can decrease - // your file system's throughput in Provisioned Throughput mode or change between - // the throughput modes as long as it’s been more than 24 hours since the last - // decrease or throughput mode change. - ThroughputMode *string `type:"string" enum:"ThroughputMode"` -} - -// String returns the string representation -func (s UpdateFileSystemOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFileSystemOutput) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *UpdateFileSystemOutput) SetCreationTime(v time.Time) *UpdateFileSystemOutput { - s.CreationTime = &v - return s -} - -// SetCreationToken sets the CreationToken field's value. -func (s *UpdateFileSystemOutput) SetCreationToken(v string) *UpdateFileSystemOutput { - s.CreationToken = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *UpdateFileSystemOutput) SetEncrypted(v bool) *UpdateFileSystemOutput { - s.Encrypted = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *UpdateFileSystemOutput) SetFileSystemId(v string) *UpdateFileSystemOutput { - s.FileSystemId = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *UpdateFileSystemOutput) SetKmsKeyId(v string) *UpdateFileSystemOutput { - s.KmsKeyId = &v - return s -} - -// SetLifeCycleState sets the LifeCycleState field's value. -func (s *UpdateFileSystemOutput) SetLifeCycleState(v string) *UpdateFileSystemOutput { - s.LifeCycleState = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateFileSystemOutput) SetName(v string) *UpdateFileSystemOutput { - s.Name = &v - return s -} - -// SetNumberOfMountTargets sets the NumberOfMountTargets field's value. -func (s *UpdateFileSystemOutput) SetNumberOfMountTargets(v int64) *UpdateFileSystemOutput { - s.NumberOfMountTargets = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *UpdateFileSystemOutput) SetOwnerId(v string) *UpdateFileSystemOutput { - s.OwnerId = &v - return s -} - -// SetPerformanceMode sets the PerformanceMode field's value. -func (s *UpdateFileSystemOutput) SetPerformanceMode(v string) *UpdateFileSystemOutput { - s.PerformanceMode = &v - return s -} - -// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. -func (s *UpdateFileSystemOutput) SetProvisionedThroughputInMibps(v float64) *UpdateFileSystemOutput { - s.ProvisionedThroughputInMibps = &v - return s -} - -// SetSizeInBytes sets the SizeInBytes field's value. -func (s *UpdateFileSystemOutput) SetSizeInBytes(v *FileSystemSize) *UpdateFileSystemOutput { - s.SizeInBytes = v - return s -} - -// SetThroughputMode sets the ThroughputMode field's value. -func (s *UpdateFileSystemOutput) SetThroughputMode(v string) *UpdateFileSystemOutput { - s.ThroughputMode = &v - return s -} - -const ( - // LifeCycleStateCreating is a LifeCycleState enum value - LifeCycleStateCreating = "creating" - - // LifeCycleStateAvailable is a LifeCycleState enum value - LifeCycleStateAvailable = "available" - - // LifeCycleStateUpdating is a LifeCycleState enum value - LifeCycleStateUpdating = "updating" - - // LifeCycleStateDeleting is a LifeCycleState enum value - LifeCycleStateDeleting = "deleting" - - // LifeCycleStateDeleted is a LifeCycleState enum value - LifeCycleStateDeleted = "deleted" -) - -const ( - // PerformanceModeGeneralPurpose is a PerformanceMode enum value - PerformanceModeGeneralPurpose = "generalPurpose" - - // PerformanceModeMaxIo is a PerformanceMode enum value - PerformanceModeMaxIo = "maxIO" -) - -const ( - // ThroughputModeBursting is a ThroughputMode enum value - ThroughputModeBursting = "bursting" - - // ThroughputModeProvisioned is a ThroughputMode enum value - ThroughputModeProvisioned = "provisioned" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/doc.go b/vendor/github.com/aws/aws-sdk-go/service/efs/doc.go deleted file mode 100644 index 606891eab..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/doc.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package efs provides the client and types for making API -// requests to Amazon Elastic File System. -// -// Amazon Elastic File System (Amazon EFS) provides simple, scalable file storage -// for use with Amazon EC2 instances in the AWS Cloud. With Amazon EFS, storage -// capacity is elastic, growing and shrinking automatically as you add and remove -// files, so your applications have the storage they need, when they need it. -// For more information, see the User Guide (http://docs.aws.amazon.com/efs/latest/ug/api-reference.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01 for more information on this service. -// -// See efs package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/efs/ -// -// Using the Client -// -// To contact Amazon Elastic File System with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Elastic File System client EFS for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/efs/#New -package efs diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go deleted file mode 100644 index b616a864c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package efs - -const ( - - // ErrCodeBadRequest for service response error code - // "BadRequest". - // - // Returned if the request is malformed or contains an error such as an invalid - // parameter value or a missing required parameter. - ErrCodeBadRequest = "BadRequest" - - // ErrCodeDependencyTimeout for service response error code - // "DependencyTimeout". - // - // The service timed out trying to fulfill the request, and the client should - // try the call again. - ErrCodeDependencyTimeout = "DependencyTimeout" - - // ErrCodeFileSystemAlreadyExists for service response error code - // "FileSystemAlreadyExists". - // - // Returned if the file system you are trying to create already exists, with - // the creation token you provided. - ErrCodeFileSystemAlreadyExists = "FileSystemAlreadyExists" - - // ErrCodeFileSystemInUse for service response error code - // "FileSystemInUse". - // - // Returned if a file system has mount targets. - ErrCodeFileSystemInUse = "FileSystemInUse" - - // ErrCodeFileSystemLimitExceeded for service response error code - // "FileSystemLimitExceeded". - // - // Returned if the AWS account has already created the maximum number of file - // systems allowed per account. - ErrCodeFileSystemLimitExceeded = "FileSystemLimitExceeded" - - // ErrCodeFileSystemNotFound for service response error code - // "FileSystemNotFound". - // - // Returned if the specified FileSystemId value doesn't exist in the requester's - // AWS account. - ErrCodeFileSystemNotFound = "FileSystemNotFound" - - // ErrCodeIncorrectFileSystemLifeCycleState for service response error code - // "IncorrectFileSystemLifeCycleState". - // - // Returned if the file system's lifecycle state is not "available". - ErrCodeIncorrectFileSystemLifeCycleState = "IncorrectFileSystemLifeCycleState" - - // ErrCodeIncorrectMountTargetState for service response error code - // "IncorrectMountTargetState". - // - // Returned if the mount target is not in the correct state for the operation. - ErrCodeIncorrectMountTargetState = "IncorrectMountTargetState" - - // ErrCodeInsufficientThroughputCapacity for service response error code - // "InsufficientThroughputCapacity". - // - // Returned if there's not enough capacity to provision additional throughput. - // This value might be returned when you try to create a file system in provisioned - // throughput mode, when you attempt to increase the provisioned throughput - // of an existing file system, or when you attempt to change an existing file - // system from bursting to provisioned throughput mode. - ErrCodeInsufficientThroughputCapacity = "InsufficientThroughputCapacity" - - // ErrCodeInternalServerError for service response error code - // "InternalServerError". - // - // Returned if an error occurred on the server side. - ErrCodeInternalServerError = "InternalServerError" - - // ErrCodeIpAddressInUse for service response error code - // "IpAddressInUse". - // - // Returned if the request specified an IpAddress that is already in use in - // the subnet. - ErrCodeIpAddressInUse = "IpAddressInUse" - - // ErrCodeMountTargetConflict for service response error code - // "MountTargetConflict". - // - // Returned if the mount target would violate one of the specified restrictions - // based on the file system's existing mount targets. - ErrCodeMountTargetConflict = "MountTargetConflict" - - // ErrCodeMountTargetNotFound for service response error code - // "MountTargetNotFound". - // - // Returned if there is no mount target with the specified ID found in the caller's - // account. - ErrCodeMountTargetNotFound = "MountTargetNotFound" - - // ErrCodeNetworkInterfaceLimitExceeded for service response error code - // "NetworkInterfaceLimitExceeded". - // - // The calling account has reached the limit for elastic network interfaces - // for the specific AWS Region. The client should try to delete some elastic - // network interfaces or get the account limit raised. For more information, - // see Amazon VPC Limits (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html) - // in the Amazon VPC User Guide (see the Network interfaces per VPC entry in - // the table). - ErrCodeNetworkInterfaceLimitExceeded = "NetworkInterfaceLimitExceeded" - - // ErrCodeNoFreeAddressesInSubnet for service response error code - // "NoFreeAddressesInSubnet". - // - // Returned if IpAddress was not specified in the request and there are no free - // IP addresses in the subnet. - ErrCodeNoFreeAddressesInSubnet = "NoFreeAddressesInSubnet" - - // ErrCodeSecurityGroupLimitExceeded for service response error code - // "SecurityGroupLimitExceeded". - // - // Returned if the size of SecurityGroups specified in the request is greater - // than five. - ErrCodeSecurityGroupLimitExceeded = "SecurityGroupLimitExceeded" - - // ErrCodeSecurityGroupNotFound for service response error code - // "SecurityGroupNotFound". - // - // Returned if one of the specified security groups doesn't exist in the subnet's - // VPC. - ErrCodeSecurityGroupNotFound = "SecurityGroupNotFound" - - // ErrCodeSubnetNotFound for service response error code - // "SubnetNotFound". - // - // Returned if there is no subnet with ID SubnetId provided in the request. - ErrCodeSubnetNotFound = "SubnetNotFound" - - // ErrCodeThroughputLimitExceeded for service response error code - // "ThroughputLimitExceeded". - // - // Returned if the throughput mode or amount of provisioned throughput can't - // be changed because the throughput limit of 1024 MiB/s has been reached. - ErrCodeThroughputLimitExceeded = "ThroughputLimitExceeded" - - // ErrCodeTooManyRequests for service response error code - // "TooManyRequests". - // - // Returned if you don’t wait at least 24 hours before changing the throughput - // mode, or decreasing the Provisioned Throughput value. - ErrCodeTooManyRequests = "TooManyRequests" - - // ErrCodeUnsupportedAvailabilityZone for service response error code - // "UnsupportedAvailabilityZone". - ErrCodeUnsupportedAvailabilityZone = "UnsupportedAvailabilityZone" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/service.go b/vendor/github.com/aws/aws-sdk-go/service/efs/service.go deleted file mode 100644 index 6b1a11c90..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package efs - -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" -) - -// EFS provides the API operation methods for making requests to -// Amazon Elastic File System. See this package's package overview docs -// for details on the service. -// -// EFS methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type EFS 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 = "elasticfilesystem" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "EFS" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the EFS client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a EFS client from just a session. -// svc := efs.New(mySession) -// -// // Create a EFS client with additional configuration -// svc := efs.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *EFS { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *EFS { - svc := &EFS{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-02-01", - }, - 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 EFS operation and runs any -// custom request initialization. -func (c *EFS) 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/eks/api.go b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go deleted file mode 100644 index 9190a03d8..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/api.go +++ /dev/null @@ -1,1819 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package eks - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" -) - -const opCreateCluster = "CreateCluster" - -// CreateClusterRequest generates a "aws/request.Request" representing the -// client's request for the CreateCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCluster for more information on using the CreateCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateClusterRequest method. -// req, resp := client.CreateClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/CreateCluster -func (c *EKS) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) { - op := &request.Operation{ - Name: opCreateCluster, - HTTPMethod: "POST", - HTTPPath: "/clusters", - } - - if input == nil { - input = &CreateClusterInput{} - } - - output = &CreateClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCluster API operation for Amazon Elastic Container Service for Kubernetes. -// -// Creates an Amazon EKS control plane. -// -// The Amazon EKS control plane consists of control plane instances that run -// the Kubernetes software, like etcd and the API server. The control plane -// runs in an account managed by AWS, and the Kubernetes API is exposed via -// the Amazon EKS API server endpoint. -// -// Amazon EKS worker nodes run in your AWS account and connect to your cluster's -// control plane via the Kubernetes API server endpoint and a certificate file -// that is created for your cluster. -// -// The cluster control plane is provisioned across multiple Availability Zones -// and fronted by an Elastic Load Balancing Network Load Balancer. Amazon EKS -// also provisions elastic network interfaces in your VPC subnets to provide -// connectivity from the control plane instances to the worker nodes (for example, -// to support kubectl exec, logs, and proxy data flows). -// -// After you create an Amazon EKS cluster, you must configure your Kubernetes -// tooling to communicate with the API server and launch worker nodes into your -// cluster. For more information, see Managing Cluster Authentication (http://docs.aws.amazon.com/eks/latest/userguide/managing-auth.html) -// and Launching Amazon EKS Worker Nodes (http://docs.aws.amazon.com/eks/latest/userguide/launch-workers.html)in -// the Amazon EKS User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Container Service for Kubernetes's -// API operation CreateCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUseException "ResourceInUseException" -// The specified resource is in use. -// -// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" -// You have encountered a service limit on the specified resource. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action. Actions can include using -// an action or resource on behalf of a user that doesn't have permissions to -// use the action or resource or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable. Back off and retry the operation. -// -// * ErrCodeUnsupportedAvailabilityZoneException "UnsupportedAvailabilityZoneException" -// At least one of your specified cluster subnets is in an Availability Zone -// that does not support Amazon EKS. The exception output specifies the supported -// Availability Zones for your account, from which you can choose subnets for -// your cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/CreateCluster -func (c *EKS) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) { - req, out := c.CreateClusterRequest(input) - return out, req.Send() -} - -// CreateClusterWithContext is the same as CreateCluster with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EKS) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) { - req, out := c.CreateClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCluster = "DeleteCluster" - -// DeleteClusterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCluster for more information on using the DeleteCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteClusterRequest method. -// req, resp := client.DeleteClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DeleteCluster -func (c *EKS) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) { - op := &request.Operation{ - Name: opDeleteCluster, - HTTPMethod: "DELETE", - HTTPPath: "/clusters/{name}", - } - - if input == nil { - input = &DeleteClusterInput{} - } - - output = &DeleteClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteCluster API operation for Amazon Elastic Container Service for Kubernetes. -// -// Deletes the Amazon EKS cluster control plane. -// -// If you have active services in your cluster that are associated with a load -// balancer, you must delete those services before deleting the cluster so that -// the load balancers are deleted properly. Otherwise, you can have orphaned -// resources in your VPC that prevent you from being able to delete the VPC. -// For more information, see Deleting a Cluster (http://docs.aws.amazon.com/eks/latest/userguide/delete-cluster.html) -// in the Amazon EKS User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Container Service for Kubernetes's -// API operation DeleteCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUseException "ResourceInUseException" -// The specified resource is in use. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. You can view your available clusters -// with ListClusters. Amazon EKS clusters are Region-specific. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action. Actions can include using -// an action or resource on behalf of a user that doesn't have permissions to -// use the action or resource or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable. Back off and retry the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DeleteCluster -func (c *EKS) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) { - req, out := c.DeleteClusterRequest(input) - return out, req.Send() -} - -// DeleteClusterWithContext is the same as DeleteCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EKS) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) { - req, out := c.DeleteClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCluster = "DescribeCluster" - -// DescribeClusterRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCluster for more information on using the DescribeCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClusterRequest method. -// req, resp := client.DescribeClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeCluster -func (c *EKS) DescribeClusterRequest(input *DescribeClusterInput) (req *request.Request, output *DescribeClusterOutput) { - op := &request.Operation{ - Name: opDescribeCluster, - HTTPMethod: "GET", - HTTPPath: "/clusters/{name}", - } - - if input == nil { - input = &DescribeClusterInput{} - } - - output = &DescribeClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCluster API operation for Amazon Elastic Container Service for Kubernetes. -// -// Returns descriptive information about an Amazon EKS cluster. -// -// The API server endpoint and certificate authority data returned by this operation -// are required for kubelet and kubectl to communicate with your Kubernetes -// API server. For more information, see Create a kubeconfig for Amazon EKS -// (http://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html). -// -// The API server endpoint and certificate authority data are not available -// until the cluster reaches the ACTIVE state. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Container Service for Kubernetes's -// API operation DescribeCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. You can view your available clusters -// with ListClusters. Amazon EKS clusters are Region-specific. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action. Actions can include using -// an action or resource on behalf of a user that doesn't have permissions to -// use the action or resource or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable. Back off and retry the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeCluster -func (c *EKS) DescribeCluster(input *DescribeClusterInput) (*DescribeClusterOutput, error) { - req, out := c.DescribeClusterRequest(input) - return out, req.Send() -} - -// DescribeClusterWithContext is the same as DescribeCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EKS) DescribeClusterWithContext(ctx aws.Context, input *DescribeClusterInput, opts ...request.Option) (*DescribeClusterOutput, error) { - req, out := c.DescribeClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeUpdate = "DescribeUpdate" - -// DescribeUpdateRequest generates a "aws/request.Request" representing the -// client's request for the DescribeUpdate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeUpdate for more information on using the DescribeUpdate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeUpdateRequest method. -// req, resp := client.DescribeUpdateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeUpdate -func (c *EKS) DescribeUpdateRequest(input *DescribeUpdateInput) (req *request.Request, output *DescribeUpdateOutput) { - op := &request.Operation{ - Name: opDescribeUpdate, - HTTPMethod: "GET", - HTTPPath: "/clusters/{name}/updates/{updateId}", - } - - if input == nil { - input = &DescribeUpdateInput{} - } - - output = &DescribeUpdateOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeUpdate API operation for Amazon Elastic Container Service for Kubernetes. -// -// Returns descriptive information about an update against your Amazon EKS cluster. -// -// When the status of the update is Succeeded, the update is complete. If an -// update fails, the status is Failed, and an error detail explains the reason -// for the failure. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Container Service for Kubernetes's -// API operation DescribeUpdate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action. Actions can include using -// an action or resource on behalf of a user that doesn't have permissions to -// use the action or resource or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. You can view your available clusters -// with ListClusters. Amazon EKS clusters are Region-specific. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeUpdate -func (c *EKS) DescribeUpdate(input *DescribeUpdateInput) (*DescribeUpdateOutput, error) { - req, out := c.DescribeUpdateRequest(input) - return out, req.Send() -} - -// DescribeUpdateWithContext is the same as DescribeUpdate with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeUpdate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EKS) DescribeUpdateWithContext(ctx aws.Context, input *DescribeUpdateInput, opts ...request.Option) (*DescribeUpdateOutput, error) { - req, out := c.DescribeUpdateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListClusters = "ListClusters" - -// ListClustersRequest generates a "aws/request.Request" representing the -// client's request for the ListClusters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListClusters for more information on using the ListClusters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListClustersRequest method. -// req, resp := client.ListClustersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListClusters -func (c *EKS) ListClustersRequest(input *ListClustersInput) (req *request.Request, output *ListClustersOutput) { - op := &request.Operation{ - Name: opListClusters, - HTTPMethod: "GET", - HTTPPath: "/clusters", - } - - if input == nil { - input = &ListClustersInput{} - } - - output = &ListClustersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListClusters API operation for Amazon Elastic Container Service for Kubernetes. -// -// Lists the Amazon EKS clusters in your AWS account in the specified Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Container Service for Kubernetes's -// API operation ListClusters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action. Actions can include using -// an action or resource on behalf of a user that doesn't have permissions to -// use the action or resource or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable. Back off and retry the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListClusters -func (c *EKS) ListClusters(input *ListClustersInput) (*ListClustersOutput, error) { - req, out := c.ListClustersRequest(input) - return out, req.Send() -} - -// ListClustersWithContext is the same as ListClusters with the addition of -// the ability to pass a context and additional request options. -// -// See ListClusters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EKS) ListClustersWithContext(ctx aws.Context, input *ListClustersInput, opts ...request.Option) (*ListClustersOutput, error) { - req, out := c.ListClustersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListUpdates = "ListUpdates" - -// ListUpdatesRequest generates a "aws/request.Request" representing the -// client's request for the ListUpdates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListUpdates for more information on using the ListUpdates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListUpdatesRequest method. -// req, resp := client.ListUpdatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListUpdates -func (c *EKS) ListUpdatesRequest(input *ListUpdatesInput) (req *request.Request, output *ListUpdatesOutput) { - op := &request.Operation{ - Name: opListUpdates, - HTTPMethod: "GET", - HTTPPath: "/clusters/{name}/updates", - } - - if input == nil { - input = &ListUpdatesInput{} - } - - output = &ListUpdatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUpdates API operation for Amazon Elastic Container Service for Kubernetes. -// -// Lists the updates associated with an Amazon EKS cluster in your AWS account, -// in the specified Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Container Service for Kubernetes's -// API operation ListUpdates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action. Actions can include using -// an action or resource on behalf of a user that doesn't have permissions to -// use the action or resource or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. You can view your available clusters -// with ListClusters. Amazon EKS clusters are Region-specific. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListUpdates -func (c *EKS) ListUpdates(input *ListUpdatesInput) (*ListUpdatesOutput, error) { - req, out := c.ListUpdatesRequest(input) - return out, req.Send() -} - -// ListUpdatesWithContext is the same as ListUpdates with the addition of -// the ability to pass a context and additional request options. -// -// See ListUpdates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EKS) ListUpdatesWithContext(ctx aws.Context, input *ListUpdatesInput, opts ...request.Option) (*ListUpdatesOutput, error) { - req, out := c.ListUpdatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateClusterVersion = "UpdateClusterVersion" - -// UpdateClusterVersionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateClusterVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateClusterVersion for more information on using the UpdateClusterVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateClusterVersionRequest method. -// req, resp := client.UpdateClusterVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/UpdateClusterVersion -func (c *EKS) UpdateClusterVersionRequest(input *UpdateClusterVersionInput) (req *request.Request, output *UpdateClusterVersionOutput) { - op := &request.Operation{ - Name: opUpdateClusterVersion, - HTTPMethod: "POST", - HTTPPath: "/clusters/{name}/updates", - } - - if input == nil { - input = &UpdateClusterVersionInput{} - } - - output = &UpdateClusterVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateClusterVersion API operation for Amazon Elastic Container Service for Kubernetes. -// -// Updates an Amazon EKS cluster to the specified Kubernetes version. Your cluster -// continues to function during the update. The response output includes an -// update ID that you can use to track the status of your cluster update with -// the DescribeUpdate API operation. -// -// Cluster updates are asynchronous, and they should finish within a few minutes. -// During an update, the cluster status moves to UPDATING (this status transition -// is eventually consistent). When the update is complete (either Failed or -// Successful), the cluster status moves to Active. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Container Service for Kubernetes's -// API operation UpdateClusterVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// The specified parameter is invalid. Review the available parameters for the -// API request. -// -// * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action. Actions can include using -// an action or resource on behalf of a user that doesn't have permissions to -// use the action or resource or specifying an identifier that is not valid. -// -// * ErrCodeServerException "ServerException" -// These errors are usually caused by a server-side issue. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The specified resource is in use. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. You can view your available clusters -// with ListClusters. Amazon EKS clusters are Region-specific. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is invalid given the state of the cluster. Check the state of -// the cluster and the associated operations. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/UpdateClusterVersion -func (c *EKS) UpdateClusterVersion(input *UpdateClusterVersionInput) (*UpdateClusterVersionOutput, error) { - req, out := c.UpdateClusterVersionRequest(input) - return out, req.Send() -} - -// UpdateClusterVersionWithContext is the same as UpdateClusterVersion with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateClusterVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EKS) UpdateClusterVersionWithContext(ctx aws.Context, input *UpdateClusterVersionInput, opts ...request.Option) (*UpdateClusterVersionOutput, error) { - req, out := c.UpdateClusterVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// An object representing the certificate-authority-data for your cluster. -type Certificate struct { - _ struct{} `type:"structure"` - - // The base64 encoded certificate data required to communicate with your cluster. - // Add this to the certificate-authority-data section of the kubeconfig file - // for your cluster. - Data *string `locationName:"data" type:"string"` -} - -// String returns the string representation -func (s Certificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Certificate) GoString() string { - return s.String() -} - -// SetData sets the Data field's value. -func (s *Certificate) SetData(v string) *Certificate { - s.Data = &v - return s -} - -// An object representing an Amazon EKS cluster. -type Cluster struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the cluster. - Arn *string `locationName:"arn" type:"string"` - - // The certificate-authority-data for your cluster. - CertificateAuthority *Certificate `locationName:"certificateAuthority" type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientRequestToken *string `locationName:"clientRequestToken" type:"string"` - - // The Unix epoch timestamp in seconds for when the cluster was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The endpoint for your Kubernetes API server. - Endpoint *string `locationName:"endpoint" type:"string"` - - // The name of the cluster. - Name *string `locationName:"name" type:"string"` - - // The platform version of your Amazon EKS cluster. For more information, see - // Platform Versions (http://docs.aws.amazon.com/eks/latest/userguide/platform-versions.html) - // in the Amazon EKS User Guide. - PlatformVersion *string `locationName:"platformVersion" type:"string"` - - // The VPC subnets and security groups used by the cluster control plane. Amazon - // EKS VPC resources have specific requirements to work properly with Kubernetes. - // For more information, see Cluster VPC Considerations (http://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) - // and Cluster Security Group Considerations (http://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) - // in the Amazon EKS User Guide. - ResourcesVpcConfig *VpcConfigResponse `locationName:"resourcesVpcConfig" type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM role that provides permissions - // for the Kubernetes control plane to make calls to AWS API operations on your - // behalf. - RoleArn *string `locationName:"roleArn" type:"string"` - - // The current status of the cluster. - Status *string `locationName:"status" type:"string" enum:"ClusterStatus"` - - // The Kubernetes server version for the cluster. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s Cluster) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Cluster) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Cluster) SetArn(v string) *Cluster { - s.Arn = &v - return s -} - -// SetCertificateAuthority sets the CertificateAuthority field's value. -func (s *Cluster) SetCertificateAuthority(v *Certificate) *Cluster { - s.CertificateAuthority = v - return s -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *Cluster) SetClientRequestToken(v string) *Cluster { - s.ClientRequestToken = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Cluster) SetCreatedAt(v time.Time) *Cluster { - s.CreatedAt = &v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *Cluster) SetEndpoint(v string) *Cluster { - s.Endpoint = &v - return s -} - -// SetName sets the Name field's value. -func (s *Cluster) SetName(v string) *Cluster { - s.Name = &v - return s -} - -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *Cluster) SetPlatformVersion(v string) *Cluster { - s.PlatformVersion = &v - return s -} - -// SetResourcesVpcConfig sets the ResourcesVpcConfig field's value. -func (s *Cluster) SetResourcesVpcConfig(v *VpcConfigResponse) *Cluster { - s.ResourcesVpcConfig = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *Cluster) SetRoleArn(v string) *Cluster { - s.RoleArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Cluster) SetStatus(v string) *Cluster { - s.Status = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *Cluster) SetVersion(v string) *Cluster { - s.Version = &v - return s -} - -type CreateClusterInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"` - - // The unique name to give to your cluster. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The VPC subnets and security groups used by the cluster control plane. Amazon - // EKS VPC resources have specific requirements to work properly with Kubernetes. - // For more information, see Cluster VPC Considerations (http://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) - // and Cluster Security Group Considerations (http://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) - // in the Amazon EKS User Guide. You must specify at least two subnets. You - // may specify up to five security groups, but we recommend that you use a dedicated - // security group for your cluster control plane. - // - // ResourcesVpcConfig is a required field - ResourcesVpcConfig *VpcConfigRequest `locationName:"resourcesVpcConfig" type:"structure" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM role that provides permissions - // for Amazon EKS to make calls to other AWS API operations on your behalf. - // For more information, see Amazon EKS Service IAM Role (http://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html) - // in the Amazon EKS User Guide. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` - - // The desired Kubernetes version for your cluster. If you do not specify a - // value here, the latest version available in Amazon EKS is used. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s CreateClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.ResourcesVpcConfig == nil { - invalidParams.Add(request.NewErrParamRequired("ResourcesVpcConfig")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.ResourcesVpcConfig != nil { - if err := s.ResourcesVpcConfig.Validate(); err != nil { - invalidParams.AddNested("ResourcesVpcConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *CreateClusterInput) SetClientRequestToken(v string) *CreateClusterInput { - s.ClientRequestToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateClusterInput) SetName(v string) *CreateClusterInput { - s.Name = &v - return s -} - -// SetResourcesVpcConfig sets the ResourcesVpcConfig field's value. -func (s *CreateClusterInput) SetResourcesVpcConfig(v *VpcConfigRequest) *CreateClusterInput { - s.ResourcesVpcConfig = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CreateClusterInput) SetRoleArn(v string) *CreateClusterInput { - s.RoleArn = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *CreateClusterInput) SetVersion(v string) *CreateClusterInput { - s.Version = &v - return s -} - -type CreateClusterOutput struct { - _ struct{} `type:"structure"` - - // The full description of your new cluster. - Cluster *Cluster `locationName:"cluster" type:"structure"` -} - -// String returns the string representation -func (s CreateClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *CreateClusterOutput) SetCluster(v *Cluster) *CreateClusterOutput { - s.Cluster = v - return s -} - -type DeleteClusterInput struct { - _ struct{} `type:"structure"` - - // The name of the cluster to delete. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteClusterInput) SetName(v string) *DeleteClusterInput { - s.Name = &v - return s -} - -type DeleteClusterOutput struct { - _ struct{} `type:"structure"` - - // The full description of the cluster to delete. - Cluster *Cluster `locationName:"cluster" type:"structure"` -} - -// String returns the string representation -func (s DeleteClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *DeleteClusterOutput) SetCluster(v *Cluster) *DeleteClusterOutput { - s.Cluster = v - return s -} - -type DescribeClusterInput struct { - _ struct{} `type:"structure"` - - // The name of the cluster to describe. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeClusterInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DescribeClusterInput) SetName(v string) *DescribeClusterInput { - s.Name = &v - return s -} - -type DescribeClusterOutput struct { - _ struct{} `type:"structure"` - - // The full description of your specified cluster. - Cluster *Cluster `locationName:"cluster" type:"structure"` -} - -// String returns the string representation -func (s DescribeClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *DescribeClusterOutput) SetCluster(v *Cluster) *DescribeClusterOutput { - s.Cluster = v - return s -} - -type DescribeUpdateInput struct { - _ struct{} `type:"structure"` - - // The name of the Amazon EKS cluster to update. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` - - // The ID of the update to describe. - // - // UpdateId is a required field - UpdateId *string `location:"uri" locationName:"updateId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeUpdateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUpdateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeUpdateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeUpdateInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.UpdateId == nil { - invalidParams.Add(request.NewErrParamRequired("UpdateId")) - } - if s.UpdateId != nil && len(*s.UpdateId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UpdateId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DescribeUpdateInput) SetName(v string) *DescribeUpdateInput { - s.Name = &v - return s -} - -// SetUpdateId sets the UpdateId field's value. -func (s *DescribeUpdateInput) SetUpdateId(v string) *DescribeUpdateInput { - s.UpdateId = &v - return s -} - -type DescribeUpdateOutput struct { - _ struct{} `type:"structure"` - - // The full description of the specified update. - Update *Update `locationName:"update" type:"structure"` -} - -// String returns the string representation -func (s DescribeUpdateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUpdateOutput) GoString() string { - return s.String() -} - -// SetUpdate sets the Update field's value. -func (s *DescribeUpdateOutput) SetUpdate(v *Update) *DescribeUpdateOutput { - s.Update = v - return s -} - -// An object representing an error when an asynchronous operation fails. -type ErrorDetail struct { - _ struct{} `type:"structure"` - - // A brief description of the error. - // - // * SubnetNotFound: One of the subnets associated with the cluster could - // not be found. - // - // * SecurityGroupNotFound: One of the security groups associated with the - // cluster could not be found. - // - // * EniLimitReached: You have reached the elastic network interface limit - // for your account. - // - // * IpNotAvailable: A subnet associated with the cluster does not have any - // free IP addresses. - // - // * AccessDenied: You do not have permissions to perform the specified operation. - // - // * OperationNotPermitted: The service role associated with the cluster - // does not have the required access permissions for Amazon EKS. - // - // * VpcIdNotFound: The VPC associated with the cluster could not be found. - ErrorCode *string `locationName:"errorCode" type:"string" enum:"ErrorCode"` - - // A more complete description of the error. - ErrorMessage *string `locationName:"errorMessage" type:"string"` - - // An optional field that contains the resource IDs associated with the error. - ResourceIds []*string `locationName:"resourceIds" type:"list"` -} - -// 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() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *ErrorDetail) SetErrorCode(v string) *ErrorDetail { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *ErrorDetail) SetErrorMessage(v string) *ErrorDetail { - s.ErrorMessage = &v - return s -} - -// SetResourceIds sets the ResourceIds field's value. -func (s *ErrorDetail) SetResourceIds(v []*string) *ErrorDetail { - s.ResourceIds = v - return s -} - -type ListClustersInput struct { - _ struct{} `type:"structure"` - - // The maximum number of cluster results returned by ListClusters in paginated - // output. When this parameter is used, ListClusters only returns maxResults - // results in a single page along with a nextToken response element. The remaining - // results of the initial request can be seen by sending another ListClusters - // request with the returned nextToken value. This value can be between 1 and - // 100. If this parameter is not used, then ListClusters returns up to 100 results - // and a nextToken value if applicable. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The nextToken value returned from a previous paginated ListClusters request - // where maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. - // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListClustersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListClustersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListClustersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListClustersInput"} - 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 *ListClustersInput) SetMaxResults(v int64) *ListClustersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListClustersInput) SetNextToken(v string) *ListClustersInput { - s.NextToken = &v - return s -} - -type ListClustersOutput struct { - _ struct{} `type:"structure"` - - // A list of all of the clusters for your account in the specified Region. - Clusters []*string `locationName:"clusters" type:"list"` - - // The nextToken value to include in a future ListClusters request. When the - // results of a ListClusters request exceed maxResults, this value can be used - // to retrieve the next page of results. This value is null when there are no - // more results to return. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListClustersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListClustersOutput) GoString() string { - return s.String() -} - -// SetClusters sets the Clusters field's value. -func (s *ListClustersOutput) SetClusters(v []*string) *ListClustersOutput { - s.Clusters = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListClustersOutput) SetNextToken(v string) *ListClustersOutput { - s.NextToken = &v - return s -} - -type ListUpdatesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of update results returned by ListUpdates in paginated - // output. When this parameter is used, ListUpdates only returns maxResults - // results in a single page along with a nextToken response element. The remaining - // results of the initial request can be seen by sending another ListUpdates - // request with the returned nextToken value. This value can be between 1 and - // 100. If this parameter is not used, then ListUpdates returns up to 100 results - // and a nextToken value if applicable. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The name of the Amazon EKS cluster for which to list updates. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` - - // The nextToken value returned from a previous paginated ListUpdates request - // where maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListUpdatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUpdatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUpdatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUpdatesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListUpdatesInput) SetMaxResults(v int64) *ListUpdatesInput { - s.MaxResults = &v - return s -} - -// SetName sets the Name field's value. -func (s *ListUpdatesInput) SetName(v string) *ListUpdatesInput { - s.Name = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUpdatesInput) SetNextToken(v string) *ListUpdatesInput { - s.NextToken = &v - return s -} - -type ListUpdatesOutput struct { - _ struct{} `type:"structure"` - - // The nextToken value to include in a future ListUpdates request. When the - // results of a ListUpdates request exceed maxResults, this value can be used - // to retrieve the next page of results. This value is null when there are no - // more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of all the updates for the specified cluster and Region. - UpdateIds []*string `locationName:"updateIds" type:"list"` -} - -// String returns the string representation -func (s ListUpdatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUpdatesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUpdatesOutput) SetNextToken(v string) *ListUpdatesOutput { - s.NextToken = &v - return s -} - -// SetUpdateIds sets the UpdateIds field's value. -func (s *ListUpdatesOutput) SetUpdateIds(v []*string) *ListUpdatesOutput { - s.UpdateIds = v - return s -} - -// An object representing an asynchronous update. -type Update struct { - _ struct{} `type:"structure"` - - // The Unix epoch timestamp in seconds for when the update was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // Any errors associated with a Failed update. - Errors []*ErrorDetail `locationName:"errors" type:"list"` - - // A UUID that is used to track the update. - Id *string `locationName:"id" type:"string"` - - // A key-value map that contains the parameters associated with the update. - Params []*UpdateParam `locationName:"params" type:"list"` - - // The current status of the update. - Status *string `locationName:"status" type:"string" enum:"UpdateStatus"` - - // The type of the update. - Type *string `locationName:"type" type:"string" enum:"UpdateType"` -} - -// String returns the string representation -func (s Update) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Update) GoString() string { - return s.String() -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Update) SetCreatedAt(v time.Time) *Update { - s.CreatedAt = &v - return s -} - -// SetErrors sets the Errors field's value. -func (s *Update) SetErrors(v []*ErrorDetail) *Update { - s.Errors = v - return s -} - -// SetId sets the Id field's value. -func (s *Update) SetId(v string) *Update { - s.Id = &v - return s -} - -// SetParams sets the Params field's value. -func (s *Update) SetParams(v []*UpdateParam) *Update { - s.Params = v - return s -} - -// SetStatus sets the Status field's value. -func (s *Update) SetStatus(v string) *Update { - s.Status = &v - return s -} - -// SetType sets the Type field's value. -func (s *Update) SetType(v string) *Update { - s.Type = &v - return s -} - -type UpdateClusterVersionInput struct { - _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"` - - // The name of the Amazon EKS cluster to update. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` - - // The desired Kubernetes version following a successful update. - // - // Version is a required field - Version *string `locationName:"version" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateClusterVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateClusterVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateClusterVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateClusterVersionInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *UpdateClusterVersionInput) SetClientRequestToken(v string) *UpdateClusterVersionInput { - s.ClientRequestToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateClusterVersionInput) SetName(v string) *UpdateClusterVersionInput { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *UpdateClusterVersionInput) SetVersion(v string) *UpdateClusterVersionInput { - s.Version = &v - return s -} - -type UpdateClusterVersionOutput struct { - _ struct{} `type:"structure"` - - // The full description of the specified update - Update *Update `locationName:"update" type:"structure"` -} - -// String returns the string representation -func (s UpdateClusterVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateClusterVersionOutput) GoString() string { - return s.String() -} - -// SetUpdate sets the Update field's value. -func (s *UpdateClusterVersionOutput) SetUpdate(v *Update) *UpdateClusterVersionOutput { - s.Update = v - return s -} - -// An object representing the details of an update request. -type UpdateParam struct { - _ struct{} `type:"structure"` - - // The keys associated with an update request. - Type *string `locationName:"type" type:"string" enum:"UpdateParamType"` - - // The value of the keys submitted as part of an update request. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s UpdateParam) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateParam) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *UpdateParam) SetType(v string) *UpdateParam { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *UpdateParam) SetValue(v string) *UpdateParam { - s.Value = &v - return s -} - -// An object representing an Amazon EKS cluster VPC configuration request. -type VpcConfigRequest struct { - _ struct{} `type:"structure"` - - // Specify one or more security groups for the cross-account elastic network - // interfaces that Amazon EKS creates to use to allow communication between - // your worker nodes and the Kubernetes control plane. If you do not specify - // a security group, the default security group for your VPC is used. - SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list"` - - // Specify subnets for your Amazon EKS worker nodes. Amazon EKS creates cross-account - // elastic network interfaces in these subnets to allow communication between - // your worker nodes and the Kubernetes control plane. - // - // SubnetIds is a required field - SubnetIds []*string `locationName:"subnetIds" type:"list" required:"true"` -} - -// String returns the string representation -func (s VpcConfigRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcConfigRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VpcConfigRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VpcConfigRequest"} - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *VpcConfigRequest) SetSecurityGroupIds(v []*string) *VpcConfigRequest { - s.SecurityGroupIds = v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *VpcConfigRequest) SetSubnetIds(v []*string) *VpcConfigRequest { - s.SubnetIds = v - return s -} - -// An object representing an Amazon EKS cluster VPC configuration response. -type VpcConfigResponse struct { - _ struct{} `type:"structure"` - - // The security groups associated with the cross-account elastic network interfaces - // that are used to allow communication between your worker nodes and the Kubernetes - // control plane. - SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list"` - - // The subnets associated with your cluster. - SubnetIds []*string `locationName:"subnetIds" type:"list"` - - // The VPC associated with your cluster. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s VpcConfigResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcConfigResponse) GoString() string { - return s.String() -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *VpcConfigResponse) SetSecurityGroupIds(v []*string) *VpcConfigResponse { - s.SecurityGroupIds = v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *VpcConfigResponse) SetSubnetIds(v []*string) *VpcConfigResponse { - s.SubnetIds = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *VpcConfigResponse) SetVpcId(v string) *VpcConfigResponse { - s.VpcId = &v - return s -} - -const ( - // ClusterStatusCreating is a ClusterStatus enum value - ClusterStatusCreating = "CREATING" - - // ClusterStatusActive is a ClusterStatus enum value - ClusterStatusActive = "ACTIVE" - - // ClusterStatusDeleting is a ClusterStatus enum value - ClusterStatusDeleting = "DELETING" - - // ClusterStatusFailed is a ClusterStatus enum value - ClusterStatusFailed = "FAILED" -) - -const ( - // ErrorCodeSubnetNotFound is a ErrorCode enum value - ErrorCodeSubnetNotFound = "SubnetNotFound" - - // ErrorCodeSecurityGroupNotFound is a ErrorCode enum value - ErrorCodeSecurityGroupNotFound = "SecurityGroupNotFound" - - // ErrorCodeEniLimitReached is a ErrorCode enum value - ErrorCodeEniLimitReached = "EniLimitReached" - - // ErrorCodeIpNotAvailable is a ErrorCode enum value - ErrorCodeIpNotAvailable = "IpNotAvailable" - - // ErrorCodeAccessDenied is a ErrorCode enum value - ErrorCodeAccessDenied = "AccessDenied" - - // ErrorCodeOperationNotPermitted is a ErrorCode enum value - ErrorCodeOperationNotPermitted = "OperationNotPermitted" - - // ErrorCodeVpcIdNotFound is a ErrorCode enum value - ErrorCodeVpcIdNotFound = "VpcIdNotFound" - - // ErrorCodeUnknown is a ErrorCode enum value - ErrorCodeUnknown = "Unknown" -) - -const ( - // UpdateParamTypeVersion is a UpdateParamType enum value - UpdateParamTypeVersion = "Version" - - // UpdateParamTypePlatformVersion is a UpdateParamType enum value - UpdateParamTypePlatformVersion = "PlatformVersion" -) - -const ( - // UpdateStatusInProgress is a UpdateStatus enum value - UpdateStatusInProgress = "InProgress" - - // UpdateStatusFailed is a UpdateStatus enum value - UpdateStatusFailed = "Failed" - - // UpdateStatusCancelled is a UpdateStatus enum value - UpdateStatusCancelled = "Cancelled" - - // UpdateStatusSuccessful is a UpdateStatus enum value - UpdateStatusSuccessful = "Successful" -) - -const ( - // UpdateTypeVersionUpdate is a UpdateType enum value - UpdateTypeVersionUpdate = "VersionUpdate" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/doc.go b/vendor/github.com/aws/aws-sdk-go/service/eks/doc.go deleted file mode 100644 index 0f1941076..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/doc.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package eks provides the client and types for making API -// requests to Amazon Elastic Container Service for Kubernetes. -// -// Amazon Elastic Container Service for Kubernetes (Amazon EKS) is a managed -// service that makes it easy for you to run Kubernetes on AWS without needing -// to stand up or maintain your own Kubernetes control plane. Kubernetes is -// an open-source system for automating the deployment, scaling, and management -// of containerized applications. -// -// Amazon EKS runs up-to-date versions of the open-source Kubernetes software, -// so you can use all the existing plugins and tooling from the Kubernetes community. -// Applications running on Amazon EKS are fully compatible with applications -// running on any standard Kubernetes environment, whether running in on-premises -// data centers or public clouds. This means that you can easily migrate any -// standard Kubernetes application to Amazon EKS without any code modification -// required. -// -// See https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01 for more information on this service. -// -// See eks package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/eks/ -// -// Using the Client -// -// To contact Amazon Elastic Container Service for Kubernetes with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Elastic Container Service for Kubernetes client EKS for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/eks/#New -package eks diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go b/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go deleted file mode 100644 index b343c7e0b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go +++ /dev/null @@ -1,68 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package eks - -const ( - - // ErrCodeClientException for service response error code - // "ClientException". - // - // These errors are usually caused by a client action. Actions can include using - // an action or resource on behalf of a user that doesn't have permissions to - // use the action or resource or specifying an identifier that is not valid. - ErrCodeClientException = "ClientException" - - // ErrCodeInvalidParameterException for service response error code - // "InvalidParameterException". - // - // The specified parameter is invalid. Review the available parameters for the - // API request. - ErrCodeInvalidParameterException = "InvalidParameterException" - - // ErrCodeInvalidRequestException for service response error code - // "InvalidRequestException". - // - // The request is invalid given the state of the cluster. Check the state of - // the cluster and the associated operations. - ErrCodeInvalidRequestException = "InvalidRequestException" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUseException". - // - // The specified resource is in use. - ErrCodeResourceInUseException = "ResourceInUseException" - - // ErrCodeResourceLimitExceededException for service response error code - // "ResourceLimitExceededException". - // - // You have encountered a service limit on the specified resource. - ErrCodeResourceLimitExceededException = "ResourceLimitExceededException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The specified resource could not be found. You can view your available clusters - // with ListClusters. Amazon EKS clusters are Region-specific. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeServerException for service response error code - // "ServerException". - // - // These errors are usually caused by a server-side issue. - ErrCodeServerException = "ServerException" - - // ErrCodeServiceUnavailableException for service response error code - // "ServiceUnavailableException". - // - // The service is unavailable. Back off and retry the operation. - ErrCodeServiceUnavailableException = "ServiceUnavailableException" - - // ErrCodeUnsupportedAvailabilityZoneException for service response error code - // "UnsupportedAvailabilityZoneException". - // - // At least one of your specified cluster subnets is in an Availability Zone - // that does not support Amazon EKS. The exception output specifies the supported - // Availability Zones for your account, from which you can choose subnets for - // your cluster. - ErrCodeUnsupportedAvailabilityZoneException = "UnsupportedAvailabilityZoneException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/service.go b/vendor/github.com/aws/aws-sdk-go/service/eks/service.go deleted file mode 100644 index e72b2c362..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package eks - -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" -) - -// EKS provides the API operation methods for making requests to -// Amazon Elastic Container Service for Kubernetes. See this package's package overview docs -// for details on the service. -// -// EKS methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type EKS 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 = "eks" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "EKS" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the EKS client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a EKS client from just a session. -// svc := eks.New(mySession) -// -// // Create a EKS client with additional configuration -// svc := eks.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *EKS { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "eks" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *EKS { - svc := &EKS{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-11-01", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a EKS operation and runs any -// custom request initialization. -func (c *EKS) 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/eks/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/eks/waiters.go deleted file mode 100644 index 022255cf0..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/waiters.go +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package eks - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilClusterActive uses the Amazon EKS API operation -// DescribeCluster to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EKS) WaitUntilClusterActive(input *DescribeClusterInput) error { - return c.WaitUntilClusterActiveWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilClusterActiveWithContext is an extended version of WaitUntilClusterActive. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EKS) WaitUntilClusterActiveWithContext(ctx aws.Context, input *DescribeClusterInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilClusterActive", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "cluster.status", - Expected: "DELETING", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "cluster.status", - Expected: "FAILED", - }, - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "cluster.status", - Expected: "ACTIVE", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeClusterInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClusterRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilClusterDeleted uses the Amazon EKS API operation -// DescribeCluster to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EKS) WaitUntilClusterDeleted(input *DescribeClusterInput) error { - return c.WaitUntilClusterDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilClusterDeletedWithContext is an extended version of WaitUntilClusterDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EKS) WaitUntilClusterDeletedWithContext(ctx aws.Context, input *DescribeClusterInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilClusterDeleted", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "cluster.status", - Expected: "ACTIVE", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "cluster.status", - Expected: "CREATING", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ResourceNotFoundException", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeClusterInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClusterRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go deleted file mode 100644 index f0b65981d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go +++ /dev/null @@ -1,13299 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elasticache - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/query" -) - -const opAddTagsToResource = "AddTagsToResource" - -// AddTagsToResourceRequest generates a "aws/request.Request" representing the -// client's request for the AddTagsToResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTagsToResource for more information on using the AddTagsToResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsToResourceRequest method. -// req, resp := client.AddTagsToResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/AddTagsToResource -func (c *ElastiCache) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *request.Request, output *TagListMessage) { - op := &request.Operation{ - Name: opAddTagsToResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsToResourceInput{} - } - - output = &TagListMessage{} - req = c.newRequest(op, input, output) - return -} - -// AddTagsToResource API operation for Amazon ElastiCache. -// -// Adds up to 50 cost allocation tags to the named resource. A cost allocation -// tag is a key-value pair where the key and value are case-sensitive. You can -// use cost allocation tags to categorize and track your AWS costs. -// -// When you apply tags to your ElastiCache resources, AWS generates a cost allocation -// report as a comma-separated value (CSV) file with your usage and costs aggregated -// by your tags. You can apply tags that represent business categories (such -// as cost centers, application names, or owners) to organize your costs across -// multiple services. For more information, see Using Cost Allocation Tags in -// Amazon ElastiCache (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Tagging.html) -// in the ElastiCache User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation AddTagsToResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. -// -// * ErrCodeSnapshotNotFoundFault "SnapshotNotFoundFault" -// The requested snapshot name does not refer to an existing snapshot. -// -// * ErrCodeTagQuotaPerResourceExceeded "TagQuotaPerResourceExceeded" -// The request cannot be processed because it would cause the resource to have -// more than the allowed number of tags. The maximum number of tags permitted -// on a resource is 50. -// -// * ErrCodeInvalidARNFault "InvalidARN" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/AddTagsToResource -func (c *ElastiCache) AddTagsToResource(input *AddTagsToResourceInput) (*TagListMessage, error) { - req, out := c.AddTagsToResourceRequest(input) - return out, req.Send() -} - -// AddTagsToResourceWithContext is the same as AddTagsToResource with the addition of -// the ability to pass a context and additional request options. -// -// See AddTagsToResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) AddTagsToResourceWithContext(ctx aws.Context, input *AddTagsToResourceInput, opts ...request.Option) (*TagListMessage, error) { - req, out := c.AddTagsToResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAuthorizeCacheSecurityGroupIngress = "AuthorizeCacheSecurityGroupIngress" - -// AuthorizeCacheSecurityGroupIngressRequest generates a "aws/request.Request" representing the -// client's request for the AuthorizeCacheSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AuthorizeCacheSecurityGroupIngress for more information on using the AuthorizeCacheSecurityGroupIngress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AuthorizeCacheSecurityGroupIngressRequest method. -// req, resp := client.AuthorizeCacheSecurityGroupIngressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/AuthorizeCacheSecurityGroupIngress -func (c *ElastiCache) AuthorizeCacheSecurityGroupIngressRequest(input *AuthorizeCacheSecurityGroupIngressInput) (req *request.Request, output *AuthorizeCacheSecurityGroupIngressOutput) { - op := &request.Operation{ - Name: opAuthorizeCacheSecurityGroupIngress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AuthorizeCacheSecurityGroupIngressInput{} - } - - output = &AuthorizeCacheSecurityGroupIngressOutput{} - req = c.newRequest(op, input, output) - return -} - -// AuthorizeCacheSecurityGroupIngress API operation for Amazon ElastiCache. -// -// Allows network ingress to a cache security group. Applications using ElastiCache -// must be running on Amazon EC2, and Amazon EC2 security groups are used as -// the authorization mechanism. -// -// You cannot authorize ingress from an Amazon EC2 security group in one region -// to an ElastiCache cluster in another region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation AuthorizeCacheSecurityGroupIngress for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheSecurityGroupNotFoundFault "CacheSecurityGroupNotFound" -// The requested cache security group name does not refer to an existing cache -// security group. -// -// * ErrCodeInvalidCacheSecurityGroupStateFault "InvalidCacheSecurityGroupState" -// The current state of the cache security group does not allow deletion. -// -// * ErrCodeAuthorizationAlreadyExistsFault "AuthorizationAlreadyExists" -// The specified Amazon EC2 security group is already authorized for the specified -// cache security group. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/AuthorizeCacheSecurityGroupIngress -func (c *ElastiCache) AuthorizeCacheSecurityGroupIngress(input *AuthorizeCacheSecurityGroupIngressInput) (*AuthorizeCacheSecurityGroupIngressOutput, error) { - req, out := c.AuthorizeCacheSecurityGroupIngressRequest(input) - return out, req.Send() -} - -// AuthorizeCacheSecurityGroupIngressWithContext is the same as AuthorizeCacheSecurityGroupIngress with the addition of -// the ability to pass a context and additional request options. -// -// See AuthorizeCacheSecurityGroupIngress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) AuthorizeCacheSecurityGroupIngressWithContext(ctx aws.Context, input *AuthorizeCacheSecurityGroupIngressInput, opts ...request.Option) (*AuthorizeCacheSecurityGroupIngressOutput, error) { - req, out := c.AuthorizeCacheSecurityGroupIngressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopySnapshot = "CopySnapshot" - -// CopySnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CopySnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopySnapshot for more information on using the CopySnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopySnapshotRequest method. -// req, resp := client.CopySnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CopySnapshot -func (c *ElastiCache) CopySnapshotRequest(input *CopySnapshotInput) (req *request.Request, output *CopySnapshotOutput) { - op := &request.Operation{ - Name: opCopySnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopySnapshotInput{} - } - - output = &CopySnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopySnapshot API operation for Amazon ElastiCache. -// -// Makes a copy of an existing snapshot. -// -// This operation is valid for Redis only. -// -// Users or groups that have permissions to use the CopySnapshot operation can -// create their own Amazon S3 buckets and copy snapshots to it. To control access -// to your snapshots, use an IAM policy to control who has the ability to use -// the CopySnapshot operation. For more information about using IAM to control -// the use of ElastiCache operations, see Exporting Snapshots (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html) -// and Authentication & Access Control (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/IAM.html). -// -// You could receive the following error messages. -// -// Error Messages -// -// * Error Message: The S3 bucket %s is outside of the region. -// -// Solution: Create an Amazon S3 bucket in the same region as your snapshot. -// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) -// in the ElastiCache User Guide. -// -// * Error Message: The S3 bucket %s does not exist. -// -// Solution: Create an Amazon S3 bucket in the same region as your snapshot. -// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) -// in the ElastiCache User Guide. -// -// * Error Message: The S3 bucket %s is not owned by the authenticated user. -// -// Solution: Create an Amazon S3 bucket in the same region as your snapshot. -// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) -// in the ElastiCache User Guide. -// -// * Error Message: The authenticated user does not have sufficient permissions -// to perform the desired activity. -// -// Solution: Contact your system administrator to get the needed permissions. -// -// * Error Message: The S3 bucket %s already contains an object with key -// %s. -// -// Solution: Give the TargetSnapshotName a new and unique value. If exporting -// a snapshot, you could alternatively create a new Amazon S3 bucket and -// use this same value for TargetSnapshotName. -// -// * Error Message: ElastiCache has not been granted READ permissions %s -// on the S3 Bucket. -// -// Solution: Add List and Read permissions on the bucket. For more information, -// see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) -// in the ElastiCache User Guide. -// -// * Error Message: ElastiCache has not been granted WRITE permissions %s -// on the S3 Bucket. -// -// Solution: Add Upload/Delete permissions on the bucket. For more information, -// see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) -// in the ElastiCache User Guide. -// -// * Error Message: ElastiCache has not been granted READ_ACP permissions -// %s on the S3 Bucket. -// -// Solution: Add View Permissions on the bucket. For more information, see Step -// 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) -// in the ElastiCache User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation CopySnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSnapshotAlreadyExistsFault "SnapshotAlreadyExistsFault" -// You already have a snapshot with the given name. -// -// * ErrCodeSnapshotNotFoundFault "SnapshotNotFoundFault" -// The requested snapshot name does not refer to an existing snapshot. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceededFault" -// The request cannot be processed because it would exceed the maximum number -// of snapshots. -// -// * ErrCodeInvalidSnapshotStateFault "InvalidSnapshotState" -// The current state of the snapshot does not allow the requested operation -// to occur. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CopySnapshot -func (c *ElastiCache) CopySnapshot(input *CopySnapshotInput) (*CopySnapshotOutput, error) { - req, out := c.CopySnapshotRequest(input) - return out, req.Send() -} - -// CopySnapshotWithContext is the same as CopySnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CopySnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) CopySnapshotWithContext(ctx aws.Context, input *CopySnapshotInput, opts ...request.Option) (*CopySnapshotOutput, error) { - req, out := c.CopySnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCacheCluster = "CreateCacheCluster" - -// CreateCacheClusterRequest generates a "aws/request.Request" representing the -// client's request for the CreateCacheCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCacheCluster for more information on using the CreateCacheCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCacheClusterRequest method. -// req, resp := client.CreateCacheClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateCacheCluster -func (c *ElastiCache) CreateCacheClusterRequest(input *CreateCacheClusterInput) (req *request.Request, output *CreateCacheClusterOutput) { - op := &request.Operation{ - Name: opCreateCacheCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCacheClusterInput{} - } - - output = &CreateCacheClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCacheCluster API operation for Amazon ElastiCache. -// -// Creates a cluster. All nodes in the cluster run the same protocol-compliant -// cache engine software, either Memcached or Redis. -// -// This operation is not supported for Redis (cluster mode enabled) clusters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation CreateCacheCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" -// The requested replication group is not in the available state. -// -// * ErrCodeCacheClusterAlreadyExistsFault "CacheClusterAlreadyExists" -// You already have a cluster with the given identifier. -// -// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" -// The requested cache node type is not available in the specified Availability -// Zone. -// -// * ErrCodeCacheSecurityGroupNotFoundFault "CacheSecurityGroupNotFound" -// The requested cache security group name does not refer to an existing cache -// security group. -// -// * ErrCodeCacheSubnetGroupNotFoundFault "CacheSubnetGroupNotFoundFault" -// The requested cache subnet group name does not refer to an existing cache -// subnet group. -// -// * ErrCodeClusterQuotaForCustomerExceededFault "ClusterQuotaForCustomerExceeded" -// The request cannot be processed because it would exceed the allowed number -// of clusters per customer. -// -// * ErrCodeNodeQuotaForClusterExceededFault "NodeQuotaForClusterExceeded" -// The request cannot be processed because it would exceed the allowed number -// of cache nodes in a single cluster. -// -// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" -// The request cannot be processed because it would exceed the allowed number -// of cache nodes per customer. -// -// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" -// The requested cache parameter group name does not refer to an existing cache -// parameter group. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The VPC network is in an invalid state. -// -// * ErrCodeTagQuotaPerResourceExceeded "TagQuotaPerResourceExceeded" -// The request cannot be processed because it would cause the resource to have -// more than the allowed number of tags. The maximum number of tags permitted -// on a resource is 50. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateCacheCluster -func (c *ElastiCache) CreateCacheCluster(input *CreateCacheClusterInput) (*CreateCacheClusterOutput, error) { - req, out := c.CreateCacheClusterRequest(input) - return out, req.Send() -} - -// CreateCacheClusterWithContext is the same as CreateCacheCluster with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCacheCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) CreateCacheClusterWithContext(ctx aws.Context, input *CreateCacheClusterInput, opts ...request.Option) (*CreateCacheClusterOutput, error) { - req, out := c.CreateCacheClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCacheParameterGroup = "CreateCacheParameterGroup" - -// CreateCacheParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateCacheParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCacheParameterGroup for more information on using the CreateCacheParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCacheParameterGroupRequest method. -// req, resp := client.CreateCacheParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateCacheParameterGroup -func (c *ElastiCache) CreateCacheParameterGroupRequest(input *CreateCacheParameterGroupInput) (req *request.Request, output *CreateCacheParameterGroupOutput) { - op := &request.Operation{ - Name: opCreateCacheParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCacheParameterGroupInput{} - } - - output = &CreateCacheParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCacheParameterGroup API operation for Amazon ElastiCache. -// -// Creates a new Amazon ElastiCache cache parameter group. An ElastiCache cache -// parameter group is a collection of parameters and their values that are applied -// to all of the nodes in any cluster or replication group using the CacheParameterGroup. -// -// A newly created CacheParameterGroup is an exact duplicate of the default -// parameter group for the CacheParameterGroupFamily. To customize the newly -// created CacheParameterGroup you can change the values of specific parameters. -// For more information, see: -// -// * ModifyCacheParameterGroup (http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyCacheParameterGroup.html) -// in the ElastiCache API Reference. -// -// * Parameters and Parameter Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.html) -// in the ElastiCache User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation CreateCacheParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheParameterGroupQuotaExceededFault "CacheParameterGroupQuotaExceeded" -// The request cannot be processed because it would exceed the maximum number -// of cache security groups. -// -// * ErrCodeCacheParameterGroupAlreadyExistsFault "CacheParameterGroupAlreadyExists" -// A cache parameter group with the requested name already exists. -// -// * ErrCodeInvalidCacheParameterGroupStateFault "InvalidCacheParameterGroupState" -// The current state of the cache parameter group does not allow the requested -// operation to occur. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateCacheParameterGroup -func (c *ElastiCache) CreateCacheParameterGroup(input *CreateCacheParameterGroupInput) (*CreateCacheParameterGroupOutput, error) { - req, out := c.CreateCacheParameterGroupRequest(input) - return out, req.Send() -} - -// CreateCacheParameterGroupWithContext is the same as CreateCacheParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCacheParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) CreateCacheParameterGroupWithContext(ctx aws.Context, input *CreateCacheParameterGroupInput, opts ...request.Option) (*CreateCacheParameterGroupOutput, error) { - req, out := c.CreateCacheParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCacheSecurityGroup = "CreateCacheSecurityGroup" - -// CreateCacheSecurityGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateCacheSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCacheSecurityGroup for more information on using the CreateCacheSecurityGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCacheSecurityGroupRequest method. -// req, resp := client.CreateCacheSecurityGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateCacheSecurityGroup -func (c *ElastiCache) CreateCacheSecurityGroupRequest(input *CreateCacheSecurityGroupInput) (req *request.Request, output *CreateCacheSecurityGroupOutput) { - op := &request.Operation{ - Name: opCreateCacheSecurityGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCacheSecurityGroupInput{} - } - - output = &CreateCacheSecurityGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCacheSecurityGroup API operation for Amazon ElastiCache. -// -// Creates a new cache security group. Use a cache security group to control -// access to one or more clusters. -// -// Cache security groups are only used when you are creating a cluster outside -// of an Amazon Virtual Private Cloud (Amazon VPC). If you are creating a cluster -// inside of a VPC, use a cache subnet group instead. For more information, -// see CreateCacheSubnetGroup (http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateCacheSubnetGroup.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation CreateCacheSecurityGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheSecurityGroupAlreadyExistsFault "CacheSecurityGroupAlreadyExists" -// A cache security group with the specified name already exists. -// -// * ErrCodeCacheSecurityGroupQuotaExceededFault "QuotaExceeded.CacheSecurityGroup" -// The request cannot be processed because it would exceed the allowed number -// of cache security groups. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateCacheSecurityGroup -func (c *ElastiCache) CreateCacheSecurityGroup(input *CreateCacheSecurityGroupInput) (*CreateCacheSecurityGroupOutput, error) { - req, out := c.CreateCacheSecurityGroupRequest(input) - return out, req.Send() -} - -// CreateCacheSecurityGroupWithContext is the same as CreateCacheSecurityGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCacheSecurityGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) CreateCacheSecurityGroupWithContext(ctx aws.Context, input *CreateCacheSecurityGroupInput, opts ...request.Option) (*CreateCacheSecurityGroupOutput, error) { - req, out := c.CreateCacheSecurityGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCacheSubnetGroup = "CreateCacheSubnetGroup" - -// CreateCacheSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateCacheSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCacheSubnetGroup for more information on using the CreateCacheSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCacheSubnetGroupRequest method. -// req, resp := client.CreateCacheSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateCacheSubnetGroup -func (c *ElastiCache) CreateCacheSubnetGroupRequest(input *CreateCacheSubnetGroupInput) (req *request.Request, output *CreateCacheSubnetGroupOutput) { - op := &request.Operation{ - Name: opCreateCacheSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCacheSubnetGroupInput{} - } - - output = &CreateCacheSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCacheSubnetGroup API operation for Amazon ElastiCache. -// -// Creates a new cache subnet group. -// -// Use this parameter only when you are creating a cluster in an Amazon Virtual -// Private Cloud (Amazon VPC). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation CreateCacheSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheSubnetGroupAlreadyExistsFault "CacheSubnetGroupAlreadyExists" -// The requested cache subnet group name is already in use by an existing cache -// subnet group. -// -// * ErrCodeCacheSubnetGroupQuotaExceededFault "CacheSubnetGroupQuotaExceeded" -// The request cannot be processed because it would exceed the allowed number -// of cache subnet groups. -// -// * ErrCodeCacheSubnetQuotaExceededFault "CacheSubnetQuotaExceededFault" -// The request cannot be processed because it would exceed the allowed number -// of subnets in a cache subnet group. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// An invalid subnet identifier was specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateCacheSubnetGroup -func (c *ElastiCache) CreateCacheSubnetGroup(input *CreateCacheSubnetGroupInput) (*CreateCacheSubnetGroupOutput, error) { - req, out := c.CreateCacheSubnetGroupRequest(input) - return out, req.Send() -} - -// CreateCacheSubnetGroupWithContext is the same as CreateCacheSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCacheSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) CreateCacheSubnetGroupWithContext(ctx aws.Context, input *CreateCacheSubnetGroupInput, opts ...request.Option) (*CreateCacheSubnetGroupOutput, error) { - req, out := c.CreateCacheSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateReplicationGroup = "CreateReplicationGroup" - -// CreateReplicationGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateReplicationGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateReplicationGroup for more information on using the CreateReplicationGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateReplicationGroupRequest method. -// req, resp := client.CreateReplicationGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateReplicationGroup -func (c *ElastiCache) CreateReplicationGroupRequest(input *CreateReplicationGroupInput) (req *request.Request, output *CreateReplicationGroupOutput) { - op := &request.Operation{ - Name: opCreateReplicationGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateReplicationGroupInput{} - } - - output = &CreateReplicationGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateReplicationGroup API operation for Amazon ElastiCache. -// -// Creates a Redis (cluster mode disabled) or a Redis (cluster mode enabled) -// replication group. -// -// A Redis (cluster mode disabled) replication group is a collection of clusters, -// where one of the clusters is a read/write primary and the others are read-only -// replicas. Writes to the primary are asynchronously propagated to the replicas. -// -// A Redis (cluster mode enabled) replication group is a collection of 1 to -// 15 node groups (shards). Each node group (shard) has one read/write primary -// node and up to 5 read-only replica nodes. Writes to the primary are asynchronously -// propagated to the replicas. Redis (cluster mode enabled) replication groups -// partition the data across node groups (shards). -// -// When a Redis (cluster mode disabled) replication group has been successfully -// created, you can add one or more read replicas to it, up to a total of 5 -// read replicas. You cannot alter a Redis (cluster mode enabled) replication -// group after it has been created. However, if you need to increase or decrease -// the number of node groups (console: shards), you can avail yourself of ElastiCache -// for Redis' enhanced backup and restore. For more information, see Restoring -// From a Backup with Cluster Resizing (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-restoring.html) -// in the ElastiCache User Guide. -// -// This operation is valid for Redis only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation CreateReplicationGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. -// -// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cluster is not in the available state. -// -// * ErrCodeReplicationGroupAlreadyExistsFault "ReplicationGroupAlreadyExists" -// The specified replication group already exists. -// -// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" -// The requested cache node type is not available in the specified Availability -// Zone. -// -// * ErrCodeCacheSecurityGroupNotFoundFault "CacheSecurityGroupNotFound" -// The requested cache security group name does not refer to an existing cache -// security group. -// -// * ErrCodeCacheSubnetGroupNotFoundFault "CacheSubnetGroupNotFoundFault" -// The requested cache subnet group name does not refer to an existing cache -// subnet group. -// -// * ErrCodeClusterQuotaForCustomerExceededFault "ClusterQuotaForCustomerExceeded" -// The request cannot be processed because it would exceed the allowed number -// of clusters per customer. -// -// * ErrCodeNodeQuotaForClusterExceededFault "NodeQuotaForClusterExceeded" -// The request cannot be processed because it would exceed the allowed number -// of cache nodes in a single cluster. -// -// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" -// The request cannot be processed because it would exceed the allowed number -// of cache nodes per customer. -// -// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" -// The requested cache parameter group name does not refer to an existing cache -// parameter group. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The VPC network is in an invalid state. -// -// * ErrCodeTagQuotaPerResourceExceeded "TagQuotaPerResourceExceeded" -// The request cannot be processed because it would cause the resource to have -// more than the allowed number of tags. The maximum number of tags permitted -// on a resource is 50. -// -// * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" -// The request cannot be processed because it would exceed the maximum allowed -// number of node groups (shards) in a single replication group. The default -// maximum is 15 -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateReplicationGroup -func (c *ElastiCache) CreateReplicationGroup(input *CreateReplicationGroupInput) (*CreateReplicationGroupOutput, error) { - req, out := c.CreateReplicationGroupRequest(input) - return out, req.Send() -} - -// CreateReplicationGroupWithContext is the same as CreateReplicationGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateReplicationGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) CreateReplicationGroupWithContext(ctx aws.Context, input *CreateReplicationGroupInput, opts ...request.Option) (*CreateReplicationGroupOutput, error) { - req, out := c.CreateReplicationGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSnapshot = "CreateSnapshot" - -// CreateSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSnapshot for more information on using the CreateSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSnapshotRequest method. -// req, resp := client.CreateSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateSnapshot -func (c *ElastiCache) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Request, output *CreateSnapshotOutput) { - op := &request.Operation{ - Name: opCreateSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSnapshotInput{} - } - - output = &CreateSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSnapshot API operation for Amazon ElastiCache. -// -// Creates a copy of an entire cluster or replication group at a specific moment -// in time. -// -// This operation is valid for Redis only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation CreateSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSnapshotAlreadyExistsFault "SnapshotAlreadyExistsFault" -// You already have a snapshot with the given name. -// -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. -// -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cluster is not in the available state. -// -// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" -// The requested replication group is not in the available state. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceededFault" -// The request cannot be processed because it would exceed the maximum number -// of snapshots. -// -// * ErrCodeSnapshotFeatureNotSupportedFault "SnapshotFeatureNotSupportedFault" -// You attempted one of the following operations: -// -// * Creating a snapshot of a Redis cluster running on a cache.t1.micro cache -// node. -// -// * Creating a snapshot of a cluster that is running Memcached rather than -// Redis. -// -// Neither of these are supported by ElastiCache. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateSnapshot -func (c *ElastiCache) CreateSnapshot(input *CreateSnapshotInput) (*CreateSnapshotOutput, error) { - req, out := c.CreateSnapshotRequest(input) - return out, req.Send() -} - -// CreateSnapshotWithContext is the same as CreateSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) CreateSnapshotWithContext(ctx aws.Context, input *CreateSnapshotInput, opts ...request.Option) (*CreateSnapshotOutput, error) { - req, out := c.CreateSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDecreaseReplicaCount = "DecreaseReplicaCount" - -// DecreaseReplicaCountRequest generates a "aws/request.Request" representing the -// client's request for the DecreaseReplicaCount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DecreaseReplicaCount for more information on using the DecreaseReplicaCount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DecreaseReplicaCountRequest method. -// req, resp := client.DecreaseReplicaCountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DecreaseReplicaCount -func (c *ElastiCache) DecreaseReplicaCountRequest(input *DecreaseReplicaCountInput) (req *request.Request, output *DecreaseReplicaCountOutput) { - op := &request.Operation{ - Name: opDecreaseReplicaCount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DecreaseReplicaCountInput{} - } - - output = &DecreaseReplicaCountOutput{} - req = c.newRequest(op, input, output) - return -} - -// DecreaseReplicaCount API operation for Amazon ElastiCache. -// -// Dynamically decreases the number of replics in a Redis (cluster mode disabled) -// replication group or the number of replica nodes in one or more node groups -// (shards) of a Redis (cluster mode enabled) replication group. This operation -// is performed with no cluster down time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DecreaseReplicaCount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" -// The requested replication group is not in the available state. -// -// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cluster is not in the available state. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The VPC network is in an invalid state. -// -// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" -// The requested cache node type is not available in the specified Availability -// Zone. -// -// * ErrCodeClusterQuotaForCustomerExceededFault "ClusterQuotaForCustomerExceeded" -// The request cannot be processed because it would exceed the allowed number -// of clusters per customer. -// -// * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" -// The request cannot be processed because it would exceed the maximum allowed -// number of node groups (shards) in a single replication group. The default -// maximum is 15 -// -// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" -// The request cannot be processed because it would exceed the allowed number -// of cache nodes per customer. -// -// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" -// The specified service linked role (SLR) was not found. -// -// * ErrCodeNoOperationFault "NoOperationFault" -// The operation was not performed because no changes were required. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DecreaseReplicaCount -func (c *ElastiCache) DecreaseReplicaCount(input *DecreaseReplicaCountInput) (*DecreaseReplicaCountOutput, error) { - req, out := c.DecreaseReplicaCountRequest(input) - return out, req.Send() -} - -// DecreaseReplicaCountWithContext is the same as DecreaseReplicaCount with the addition of -// the ability to pass a context and additional request options. -// -// See DecreaseReplicaCount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DecreaseReplicaCountWithContext(ctx aws.Context, input *DecreaseReplicaCountInput, opts ...request.Option) (*DecreaseReplicaCountOutput, error) { - req, out := c.DecreaseReplicaCountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCacheCluster = "DeleteCacheCluster" - -// DeleteCacheClusterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCacheCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCacheCluster for more information on using the DeleteCacheCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCacheClusterRequest method. -// req, resp := client.DeleteCacheClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteCacheCluster -func (c *ElastiCache) DeleteCacheClusterRequest(input *DeleteCacheClusterInput) (req *request.Request, output *DeleteCacheClusterOutput) { - op := &request.Operation{ - Name: opDeleteCacheCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCacheClusterInput{} - } - - output = &DeleteCacheClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteCacheCluster API operation for Amazon ElastiCache. -// -// Deletes a previously provisioned cluster. DeleteCacheCluster deletes all -// associated cache nodes, node endpoints and the cluster itself. When you receive -// a successful response from this operation, Amazon ElastiCache immediately -// begins deleting the cluster; you cannot cancel or revert this operation. -// -// This operation cannot be used to delete a cluster that is the last read replica -// of a replication group or node group (shard) that has Multi-AZ mode enabled -// or a cluster from a Redis (cluster mode enabled) replication group. -// -// This operation is not valid for Redis (cluster mode enabled) clusters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DeleteCacheCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. -// -// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cluster is not in the available state. -// -// * ErrCodeSnapshotAlreadyExistsFault "SnapshotAlreadyExistsFault" -// You already have a snapshot with the given name. -// -// * ErrCodeSnapshotFeatureNotSupportedFault "SnapshotFeatureNotSupportedFault" -// You attempted one of the following operations: -// -// * Creating a snapshot of a Redis cluster running on a cache.t1.micro cache -// node. -// -// * Creating a snapshot of a cluster that is running Memcached rather than -// Redis. -// -// Neither of these are supported by ElastiCache. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceededFault" -// The request cannot be processed because it would exceed the maximum number -// of snapshots. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteCacheCluster -func (c *ElastiCache) DeleteCacheCluster(input *DeleteCacheClusterInput) (*DeleteCacheClusterOutput, error) { - req, out := c.DeleteCacheClusterRequest(input) - return out, req.Send() -} - -// DeleteCacheClusterWithContext is the same as DeleteCacheCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCacheCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DeleteCacheClusterWithContext(ctx aws.Context, input *DeleteCacheClusterInput, opts ...request.Option) (*DeleteCacheClusterOutput, error) { - req, out := c.DeleteCacheClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCacheParameterGroup = "DeleteCacheParameterGroup" - -// DeleteCacheParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCacheParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCacheParameterGroup for more information on using the DeleteCacheParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCacheParameterGroupRequest method. -// req, resp := client.DeleteCacheParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteCacheParameterGroup -func (c *ElastiCache) DeleteCacheParameterGroupRequest(input *DeleteCacheParameterGroupInput) (req *request.Request, output *DeleteCacheParameterGroupOutput) { - op := &request.Operation{ - Name: opDeleteCacheParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCacheParameterGroupInput{} - } - - output = &DeleteCacheParameterGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCacheParameterGroup API operation for Amazon ElastiCache. -// -// Deletes the specified cache parameter group. You cannot delete a cache parameter -// group if it is associated with any cache clusters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DeleteCacheParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidCacheParameterGroupStateFault "InvalidCacheParameterGroupState" -// The current state of the cache parameter group does not allow the requested -// operation to occur. -// -// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" -// The requested cache parameter group name does not refer to an existing cache -// parameter group. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteCacheParameterGroup -func (c *ElastiCache) DeleteCacheParameterGroup(input *DeleteCacheParameterGroupInput) (*DeleteCacheParameterGroupOutput, error) { - req, out := c.DeleteCacheParameterGroupRequest(input) - return out, req.Send() -} - -// DeleteCacheParameterGroupWithContext is the same as DeleteCacheParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCacheParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DeleteCacheParameterGroupWithContext(ctx aws.Context, input *DeleteCacheParameterGroupInput, opts ...request.Option) (*DeleteCacheParameterGroupOutput, error) { - req, out := c.DeleteCacheParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCacheSecurityGroup = "DeleteCacheSecurityGroup" - -// DeleteCacheSecurityGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCacheSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCacheSecurityGroup for more information on using the DeleteCacheSecurityGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCacheSecurityGroupRequest method. -// req, resp := client.DeleteCacheSecurityGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteCacheSecurityGroup -func (c *ElastiCache) DeleteCacheSecurityGroupRequest(input *DeleteCacheSecurityGroupInput) (req *request.Request, output *DeleteCacheSecurityGroupOutput) { - op := &request.Operation{ - Name: opDeleteCacheSecurityGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCacheSecurityGroupInput{} - } - - output = &DeleteCacheSecurityGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCacheSecurityGroup API operation for Amazon ElastiCache. -// -// Deletes a cache security group. -// -// You cannot delete a cache security group if it is associated with any clusters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DeleteCacheSecurityGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidCacheSecurityGroupStateFault "InvalidCacheSecurityGroupState" -// The current state of the cache security group does not allow deletion. -// -// * ErrCodeCacheSecurityGroupNotFoundFault "CacheSecurityGroupNotFound" -// The requested cache security group name does not refer to an existing cache -// security group. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteCacheSecurityGroup -func (c *ElastiCache) DeleteCacheSecurityGroup(input *DeleteCacheSecurityGroupInput) (*DeleteCacheSecurityGroupOutput, error) { - req, out := c.DeleteCacheSecurityGroupRequest(input) - return out, req.Send() -} - -// DeleteCacheSecurityGroupWithContext is the same as DeleteCacheSecurityGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCacheSecurityGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DeleteCacheSecurityGroupWithContext(ctx aws.Context, input *DeleteCacheSecurityGroupInput, opts ...request.Option) (*DeleteCacheSecurityGroupOutput, error) { - req, out := c.DeleteCacheSecurityGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCacheSubnetGroup = "DeleteCacheSubnetGroup" - -// DeleteCacheSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCacheSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCacheSubnetGroup for more information on using the DeleteCacheSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCacheSubnetGroupRequest method. -// req, resp := client.DeleteCacheSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteCacheSubnetGroup -func (c *ElastiCache) DeleteCacheSubnetGroupRequest(input *DeleteCacheSubnetGroupInput) (req *request.Request, output *DeleteCacheSubnetGroupOutput) { - op := &request.Operation{ - Name: opDeleteCacheSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCacheSubnetGroupInput{} - } - - output = &DeleteCacheSubnetGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCacheSubnetGroup API operation for Amazon ElastiCache. -// -// Deletes a cache subnet group. -// -// You cannot delete a cache subnet group if it is associated with any clusters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DeleteCacheSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheSubnetGroupInUse "CacheSubnetGroupInUse" -// The requested cache subnet group is currently in use. -// -// * ErrCodeCacheSubnetGroupNotFoundFault "CacheSubnetGroupNotFoundFault" -// The requested cache subnet group name does not refer to an existing cache -// subnet group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteCacheSubnetGroup -func (c *ElastiCache) DeleteCacheSubnetGroup(input *DeleteCacheSubnetGroupInput) (*DeleteCacheSubnetGroupOutput, error) { - req, out := c.DeleteCacheSubnetGroupRequest(input) - return out, req.Send() -} - -// DeleteCacheSubnetGroupWithContext is the same as DeleteCacheSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCacheSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DeleteCacheSubnetGroupWithContext(ctx aws.Context, input *DeleteCacheSubnetGroupInput, opts ...request.Option) (*DeleteCacheSubnetGroupOutput, error) { - req, out := c.DeleteCacheSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteReplicationGroup = "DeleteReplicationGroup" - -// DeleteReplicationGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteReplicationGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteReplicationGroup for more information on using the DeleteReplicationGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteReplicationGroupRequest method. -// req, resp := client.DeleteReplicationGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteReplicationGroup -func (c *ElastiCache) DeleteReplicationGroupRequest(input *DeleteReplicationGroupInput) (req *request.Request, output *DeleteReplicationGroupOutput) { - op := &request.Operation{ - Name: opDeleteReplicationGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteReplicationGroupInput{} - } - - output = &DeleteReplicationGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteReplicationGroup API operation for Amazon ElastiCache. -// -// Deletes an existing replication group. By default, this operation deletes -// the entire replication group, including the primary/primaries and all of -// the read replicas. If the replication group has only one primary, you can -// optionally delete only the read replicas, while retaining the primary by -// setting RetainPrimaryCluster=true. -// -// When you receive a successful response from this operation, Amazon ElastiCache -// immediately begins deleting the selected resources; you cannot cancel or -// revert this operation. -// -// This operation is valid for Redis only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DeleteReplicationGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" -// The requested replication group is not in the available state. -// -// * ErrCodeSnapshotAlreadyExistsFault "SnapshotAlreadyExistsFault" -// You already have a snapshot with the given name. -// -// * ErrCodeSnapshotFeatureNotSupportedFault "SnapshotFeatureNotSupportedFault" -// You attempted one of the following operations: -// -// * Creating a snapshot of a Redis cluster running on a cache.t1.micro cache -// node. -// -// * Creating a snapshot of a cluster that is running Memcached rather than -// Redis. -// -// Neither of these are supported by ElastiCache. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceededFault" -// The request cannot be processed because it would exceed the maximum number -// of snapshots. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteReplicationGroup -func (c *ElastiCache) DeleteReplicationGroup(input *DeleteReplicationGroupInput) (*DeleteReplicationGroupOutput, error) { - req, out := c.DeleteReplicationGroupRequest(input) - return out, req.Send() -} - -// DeleteReplicationGroupWithContext is the same as DeleteReplicationGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteReplicationGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DeleteReplicationGroupWithContext(ctx aws.Context, input *DeleteReplicationGroupInput, opts ...request.Option) (*DeleteReplicationGroupOutput, error) { - req, out := c.DeleteReplicationGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSnapshot = "DeleteSnapshot" - -// DeleteSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSnapshot for more information on using the DeleteSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSnapshotRequest method. -// req, resp := client.DeleteSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteSnapshot -func (c *ElastiCache) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *request.Request, output *DeleteSnapshotOutput) { - op := &request.Operation{ - Name: opDeleteSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSnapshotInput{} - } - - output = &DeleteSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteSnapshot API operation for Amazon ElastiCache. -// -// Deletes an existing snapshot. When you receive a successful response from -// this operation, ElastiCache immediately begins deleting the snapshot; you -// cannot cancel or revert this operation. -// -// This operation is valid for Redis only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DeleteSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSnapshotNotFoundFault "SnapshotNotFoundFault" -// The requested snapshot name does not refer to an existing snapshot. -// -// * ErrCodeInvalidSnapshotStateFault "InvalidSnapshotState" -// The current state of the snapshot does not allow the requested operation -// to occur. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteSnapshot -func (c *ElastiCache) DeleteSnapshot(input *DeleteSnapshotInput) (*DeleteSnapshotOutput, error) { - req, out := c.DeleteSnapshotRequest(input) - return out, req.Send() -} - -// DeleteSnapshotWithContext is the same as DeleteSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DeleteSnapshotWithContext(ctx aws.Context, input *DeleteSnapshotInput, opts ...request.Option) (*DeleteSnapshotOutput, error) { - req, out := c.DeleteSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCacheClusters = "DescribeCacheClusters" - -// DescribeCacheClustersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCacheClusters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCacheClusters for more information on using the DescribeCacheClusters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCacheClustersRequest method. -// req, resp := client.DescribeCacheClustersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeCacheClusters -func (c *ElastiCache) DescribeCacheClustersRequest(input *DescribeCacheClustersInput) (req *request.Request, output *DescribeCacheClustersOutput) { - op := &request.Operation{ - Name: opDescribeCacheClusters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeCacheClustersInput{} - } - - output = &DescribeCacheClustersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCacheClusters API operation for Amazon ElastiCache. -// -// Returns information about all provisioned clusters if no cluster identifier -// is specified, or about a specific cache cluster if a cluster identifier is -// supplied. -// -// By default, abbreviated information about the clusters is returned. You can -// use the optional ShowCacheNodeInfo flag to retrieve detailed information -// about the cache nodes associated with the clusters. These details include -// the DNS address and port for the cache node endpoint. -// -// If the cluster is in the creating state, only cluster-level information is -// displayed until all of the nodes are successfully provisioned. -// -// If the cluster is in the deleting state, only cluster-level information is -// displayed. -// -// If cache nodes are currently being added to the cluster, node endpoint information -// and creation time for the additional nodes are not displayed until they are -// completely provisioned. When the cluster state is available, the cluster -// is ready for use. -// -// If cache nodes are currently being removed from the cluster, no endpoint -// information for the removed nodes is displayed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DescribeCacheClusters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeCacheClusters -func (c *ElastiCache) DescribeCacheClusters(input *DescribeCacheClustersInput) (*DescribeCacheClustersOutput, error) { - req, out := c.DescribeCacheClustersRequest(input) - return out, req.Send() -} - -// DescribeCacheClustersWithContext is the same as DescribeCacheClusters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCacheClusters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeCacheClustersWithContext(ctx aws.Context, input *DescribeCacheClustersInput, opts ...request.Option) (*DescribeCacheClustersOutput, error) { - req, out := c.DescribeCacheClustersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeCacheClustersPages iterates over the pages of a DescribeCacheClusters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeCacheClusters 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 DescribeCacheClusters operation. -// pageNum := 0 -// err := client.DescribeCacheClustersPages(params, -// func(page *DescribeCacheClustersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElastiCache) DescribeCacheClustersPages(input *DescribeCacheClustersInput, fn func(*DescribeCacheClustersOutput, bool) bool) error { - return c.DescribeCacheClustersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeCacheClustersPagesWithContext same as DescribeCacheClustersPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeCacheClustersPagesWithContext(ctx aws.Context, input *DescribeCacheClustersInput, fn func(*DescribeCacheClustersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeCacheClustersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeCacheClustersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCacheClustersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeCacheEngineVersions = "DescribeCacheEngineVersions" - -// DescribeCacheEngineVersionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCacheEngineVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCacheEngineVersions for more information on using the DescribeCacheEngineVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCacheEngineVersionsRequest method. -// req, resp := client.DescribeCacheEngineVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeCacheEngineVersions -func (c *ElastiCache) DescribeCacheEngineVersionsRequest(input *DescribeCacheEngineVersionsInput) (req *request.Request, output *DescribeCacheEngineVersionsOutput) { - op := &request.Operation{ - Name: opDescribeCacheEngineVersions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeCacheEngineVersionsInput{} - } - - output = &DescribeCacheEngineVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCacheEngineVersions API operation for Amazon ElastiCache. -// -// Returns a list of the available cache engines and their versions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DescribeCacheEngineVersions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeCacheEngineVersions -func (c *ElastiCache) DescribeCacheEngineVersions(input *DescribeCacheEngineVersionsInput) (*DescribeCacheEngineVersionsOutput, error) { - req, out := c.DescribeCacheEngineVersionsRequest(input) - return out, req.Send() -} - -// DescribeCacheEngineVersionsWithContext is the same as DescribeCacheEngineVersions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCacheEngineVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeCacheEngineVersionsWithContext(ctx aws.Context, input *DescribeCacheEngineVersionsInput, opts ...request.Option) (*DescribeCacheEngineVersionsOutput, error) { - req, out := c.DescribeCacheEngineVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeCacheEngineVersionsPages iterates over the pages of a DescribeCacheEngineVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeCacheEngineVersions 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 DescribeCacheEngineVersions operation. -// pageNum := 0 -// err := client.DescribeCacheEngineVersionsPages(params, -// func(page *DescribeCacheEngineVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElastiCache) DescribeCacheEngineVersionsPages(input *DescribeCacheEngineVersionsInput, fn func(*DescribeCacheEngineVersionsOutput, bool) bool) error { - return c.DescribeCacheEngineVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeCacheEngineVersionsPagesWithContext same as DescribeCacheEngineVersionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeCacheEngineVersionsPagesWithContext(ctx aws.Context, input *DescribeCacheEngineVersionsInput, fn func(*DescribeCacheEngineVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeCacheEngineVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeCacheEngineVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCacheEngineVersionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeCacheParameterGroups = "DescribeCacheParameterGroups" - -// DescribeCacheParameterGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCacheParameterGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCacheParameterGroups for more information on using the DescribeCacheParameterGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCacheParameterGroupsRequest method. -// req, resp := client.DescribeCacheParameterGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeCacheParameterGroups -func (c *ElastiCache) DescribeCacheParameterGroupsRequest(input *DescribeCacheParameterGroupsInput) (req *request.Request, output *DescribeCacheParameterGroupsOutput) { - op := &request.Operation{ - Name: opDescribeCacheParameterGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeCacheParameterGroupsInput{} - } - - output = &DescribeCacheParameterGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCacheParameterGroups API operation for Amazon ElastiCache. -// -// Returns a list of cache parameter group descriptions. If a cache parameter -// group name is specified, the list contains only the descriptions for that -// group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DescribeCacheParameterGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" -// The requested cache parameter group name does not refer to an existing cache -// parameter group. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeCacheParameterGroups -func (c *ElastiCache) DescribeCacheParameterGroups(input *DescribeCacheParameterGroupsInput) (*DescribeCacheParameterGroupsOutput, error) { - req, out := c.DescribeCacheParameterGroupsRequest(input) - return out, req.Send() -} - -// DescribeCacheParameterGroupsWithContext is the same as DescribeCacheParameterGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCacheParameterGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeCacheParameterGroupsWithContext(ctx aws.Context, input *DescribeCacheParameterGroupsInput, opts ...request.Option) (*DescribeCacheParameterGroupsOutput, error) { - req, out := c.DescribeCacheParameterGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeCacheParameterGroupsPages iterates over the pages of a DescribeCacheParameterGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeCacheParameterGroups 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 DescribeCacheParameterGroups operation. -// pageNum := 0 -// err := client.DescribeCacheParameterGroupsPages(params, -// func(page *DescribeCacheParameterGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElastiCache) DescribeCacheParameterGroupsPages(input *DescribeCacheParameterGroupsInput, fn func(*DescribeCacheParameterGroupsOutput, bool) bool) error { - return c.DescribeCacheParameterGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeCacheParameterGroupsPagesWithContext same as DescribeCacheParameterGroupsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeCacheParameterGroupsPagesWithContext(ctx aws.Context, input *DescribeCacheParameterGroupsInput, fn func(*DescribeCacheParameterGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeCacheParameterGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeCacheParameterGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCacheParameterGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeCacheParameters = "DescribeCacheParameters" - -// DescribeCacheParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCacheParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCacheParameters for more information on using the DescribeCacheParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCacheParametersRequest method. -// req, resp := client.DescribeCacheParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeCacheParameters -func (c *ElastiCache) DescribeCacheParametersRequest(input *DescribeCacheParametersInput) (req *request.Request, output *DescribeCacheParametersOutput) { - op := &request.Operation{ - Name: opDescribeCacheParameters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeCacheParametersInput{} - } - - output = &DescribeCacheParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCacheParameters API operation for Amazon ElastiCache. -// -// Returns the detailed parameter list for a particular cache parameter group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DescribeCacheParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" -// The requested cache parameter group name does not refer to an existing cache -// parameter group. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeCacheParameters -func (c *ElastiCache) DescribeCacheParameters(input *DescribeCacheParametersInput) (*DescribeCacheParametersOutput, error) { - req, out := c.DescribeCacheParametersRequest(input) - return out, req.Send() -} - -// DescribeCacheParametersWithContext is the same as DescribeCacheParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCacheParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeCacheParametersWithContext(ctx aws.Context, input *DescribeCacheParametersInput, opts ...request.Option) (*DescribeCacheParametersOutput, error) { - req, out := c.DescribeCacheParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeCacheParametersPages iterates over the pages of a DescribeCacheParameters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeCacheParameters 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 DescribeCacheParameters operation. -// pageNum := 0 -// err := client.DescribeCacheParametersPages(params, -// func(page *DescribeCacheParametersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElastiCache) DescribeCacheParametersPages(input *DescribeCacheParametersInput, fn func(*DescribeCacheParametersOutput, bool) bool) error { - return c.DescribeCacheParametersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeCacheParametersPagesWithContext same as DescribeCacheParametersPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeCacheParametersPagesWithContext(ctx aws.Context, input *DescribeCacheParametersInput, fn func(*DescribeCacheParametersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeCacheParametersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeCacheParametersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCacheParametersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeCacheSecurityGroups = "DescribeCacheSecurityGroups" - -// DescribeCacheSecurityGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCacheSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCacheSecurityGroups for more information on using the DescribeCacheSecurityGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCacheSecurityGroupsRequest method. -// req, resp := client.DescribeCacheSecurityGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeCacheSecurityGroups -func (c *ElastiCache) DescribeCacheSecurityGroupsRequest(input *DescribeCacheSecurityGroupsInput) (req *request.Request, output *DescribeCacheSecurityGroupsOutput) { - op := &request.Operation{ - Name: opDescribeCacheSecurityGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeCacheSecurityGroupsInput{} - } - - output = &DescribeCacheSecurityGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCacheSecurityGroups API operation for Amazon ElastiCache. -// -// Returns a list of cache security group descriptions. If a cache security -// group name is specified, the list contains only the description of that group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DescribeCacheSecurityGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheSecurityGroupNotFoundFault "CacheSecurityGroupNotFound" -// The requested cache security group name does not refer to an existing cache -// security group. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeCacheSecurityGroups -func (c *ElastiCache) DescribeCacheSecurityGroups(input *DescribeCacheSecurityGroupsInput) (*DescribeCacheSecurityGroupsOutput, error) { - req, out := c.DescribeCacheSecurityGroupsRequest(input) - return out, req.Send() -} - -// DescribeCacheSecurityGroupsWithContext is the same as DescribeCacheSecurityGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCacheSecurityGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeCacheSecurityGroupsWithContext(ctx aws.Context, input *DescribeCacheSecurityGroupsInput, opts ...request.Option) (*DescribeCacheSecurityGroupsOutput, error) { - req, out := c.DescribeCacheSecurityGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeCacheSecurityGroupsPages iterates over the pages of a DescribeCacheSecurityGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeCacheSecurityGroups 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 DescribeCacheSecurityGroups operation. -// pageNum := 0 -// err := client.DescribeCacheSecurityGroupsPages(params, -// func(page *DescribeCacheSecurityGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElastiCache) DescribeCacheSecurityGroupsPages(input *DescribeCacheSecurityGroupsInput, fn func(*DescribeCacheSecurityGroupsOutput, bool) bool) error { - return c.DescribeCacheSecurityGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeCacheSecurityGroupsPagesWithContext same as DescribeCacheSecurityGroupsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeCacheSecurityGroupsPagesWithContext(ctx aws.Context, input *DescribeCacheSecurityGroupsInput, fn func(*DescribeCacheSecurityGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeCacheSecurityGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeCacheSecurityGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCacheSecurityGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeCacheSubnetGroups = "DescribeCacheSubnetGroups" - -// DescribeCacheSubnetGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCacheSubnetGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCacheSubnetGroups for more information on using the DescribeCacheSubnetGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCacheSubnetGroupsRequest method. -// req, resp := client.DescribeCacheSubnetGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeCacheSubnetGroups -func (c *ElastiCache) DescribeCacheSubnetGroupsRequest(input *DescribeCacheSubnetGroupsInput) (req *request.Request, output *DescribeCacheSubnetGroupsOutput) { - op := &request.Operation{ - Name: opDescribeCacheSubnetGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeCacheSubnetGroupsInput{} - } - - output = &DescribeCacheSubnetGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCacheSubnetGroups API operation for Amazon ElastiCache. -// -// Returns a list of cache subnet group descriptions. If a subnet group name -// is specified, the list contains only the description of that group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DescribeCacheSubnetGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheSubnetGroupNotFoundFault "CacheSubnetGroupNotFoundFault" -// The requested cache subnet group name does not refer to an existing cache -// subnet group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeCacheSubnetGroups -func (c *ElastiCache) DescribeCacheSubnetGroups(input *DescribeCacheSubnetGroupsInput) (*DescribeCacheSubnetGroupsOutput, error) { - req, out := c.DescribeCacheSubnetGroupsRequest(input) - return out, req.Send() -} - -// DescribeCacheSubnetGroupsWithContext is the same as DescribeCacheSubnetGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCacheSubnetGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeCacheSubnetGroupsWithContext(ctx aws.Context, input *DescribeCacheSubnetGroupsInput, opts ...request.Option) (*DescribeCacheSubnetGroupsOutput, error) { - req, out := c.DescribeCacheSubnetGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeCacheSubnetGroupsPages iterates over the pages of a DescribeCacheSubnetGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeCacheSubnetGroups 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 DescribeCacheSubnetGroups operation. -// pageNum := 0 -// err := client.DescribeCacheSubnetGroupsPages(params, -// func(page *DescribeCacheSubnetGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElastiCache) DescribeCacheSubnetGroupsPages(input *DescribeCacheSubnetGroupsInput, fn func(*DescribeCacheSubnetGroupsOutput, bool) bool) error { - return c.DescribeCacheSubnetGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeCacheSubnetGroupsPagesWithContext same as DescribeCacheSubnetGroupsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeCacheSubnetGroupsPagesWithContext(ctx aws.Context, input *DescribeCacheSubnetGroupsInput, fn func(*DescribeCacheSubnetGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeCacheSubnetGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeCacheSubnetGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCacheSubnetGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEngineDefaultParameters = "DescribeEngineDefaultParameters" - -// DescribeEngineDefaultParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEngineDefaultParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEngineDefaultParameters for more information on using the DescribeEngineDefaultParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEngineDefaultParametersRequest method. -// req, resp := client.DescribeEngineDefaultParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeEngineDefaultParameters -func (c *ElastiCache) DescribeEngineDefaultParametersRequest(input *DescribeEngineDefaultParametersInput) (req *request.Request, output *DescribeEngineDefaultParametersOutput) { - op := &request.Operation{ - Name: opDescribeEngineDefaultParameters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"EngineDefaults.Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEngineDefaultParametersInput{} - } - - output = &DescribeEngineDefaultParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEngineDefaultParameters API operation for Amazon ElastiCache. -// -// Returns the default engine and system parameter information for the specified -// cache engine. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DescribeEngineDefaultParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeEngineDefaultParameters -func (c *ElastiCache) DescribeEngineDefaultParameters(input *DescribeEngineDefaultParametersInput) (*DescribeEngineDefaultParametersOutput, error) { - req, out := c.DescribeEngineDefaultParametersRequest(input) - return out, req.Send() -} - -// DescribeEngineDefaultParametersWithContext is the same as DescribeEngineDefaultParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEngineDefaultParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeEngineDefaultParametersWithContext(ctx aws.Context, input *DescribeEngineDefaultParametersInput, opts ...request.Option) (*DescribeEngineDefaultParametersOutput, error) { - req, out := c.DescribeEngineDefaultParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEngineDefaultParametersPages iterates over the pages of a DescribeEngineDefaultParameters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEngineDefaultParameters 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 DescribeEngineDefaultParameters operation. -// pageNum := 0 -// err := client.DescribeEngineDefaultParametersPages(params, -// func(page *DescribeEngineDefaultParametersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElastiCache) DescribeEngineDefaultParametersPages(input *DescribeEngineDefaultParametersInput, fn func(*DescribeEngineDefaultParametersOutput, bool) bool) error { - return c.DescribeEngineDefaultParametersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEngineDefaultParametersPagesWithContext same as DescribeEngineDefaultParametersPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeEngineDefaultParametersPagesWithContext(ctx aws.Context, input *DescribeEngineDefaultParametersInput, fn func(*DescribeEngineDefaultParametersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEngineDefaultParametersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEngineDefaultParametersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEngineDefaultParametersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEvents = "DescribeEvents" - -// DescribeEventsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEvents for more information on using the DescribeEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventsRequest method. -// req, resp := client.DescribeEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeEvents -func (c *ElastiCache) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Request, output *DescribeEventsOutput) { - op := &request.Operation{ - Name: opDescribeEvents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEventsInput{} - } - - output = &DescribeEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEvents API operation for Amazon ElastiCache. -// -// Returns events related to clusters, cache security groups, and cache parameter -// groups. You can obtain events specific to a particular cluster, cache security -// group, or cache parameter group by providing the name as a parameter. -// -// By default, only the events occurring within the last hour are returned; -// however, you can retrieve up to 14 days' worth of events if necessary. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DescribeEvents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeEvents -func (c *ElastiCache) DescribeEvents(input *DescribeEventsInput) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - return out, req.Send() -} - -// DescribeEventsWithContext is the same as DescribeEvents with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeEventsWithContext(ctx aws.Context, input *DescribeEventsInput, opts ...request.Option) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEventsPages iterates over the pages of a DescribeEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEvents 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 DescribeEvents operation. -// pageNum := 0 -// err := client.DescribeEventsPages(params, -// func(page *DescribeEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElastiCache) DescribeEventsPages(input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool) error { - return c.DescribeEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEventsPagesWithContext same as DescribeEventsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeReplicationGroups = "DescribeReplicationGroups" - -// DescribeReplicationGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReplicationGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReplicationGroups for more information on using the DescribeReplicationGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReplicationGroupsRequest method. -// req, resp := client.DescribeReplicationGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeReplicationGroups -func (c *ElastiCache) DescribeReplicationGroupsRequest(input *DescribeReplicationGroupsInput) (req *request.Request, output *DescribeReplicationGroupsOutput) { - op := &request.Operation{ - Name: opDescribeReplicationGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReplicationGroupsInput{} - } - - output = &DescribeReplicationGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReplicationGroups API operation for Amazon ElastiCache. -// -// Returns information about a particular replication group. If no identifier -// is specified, DescribeReplicationGroups returns information about all replication -// groups. -// -// This operation is valid for Redis only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DescribeReplicationGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeReplicationGroups -func (c *ElastiCache) DescribeReplicationGroups(input *DescribeReplicationGroupsInput) (*DescribeReplicationGroupsOutput, error) { - req, out := c.DescribeReplicationGroupsRequest(input) - return out, req.Send() -} - -// DescribeReplicationGroupsWithContext is the same as DescribeReplicationGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReplicationGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeReplicationGroupsWithContext(ctx aws.Context, input *DescribeReplicationGroupsInput, opts ...request.Option) (*DescribeReplicationGroupsOutput, error) { - req, out := c.DescribeReplicationGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReplicationGroupsPages iterates over the pages of a DescribeReplicationGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReplicationGroups method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeReplicationGroups operation. -// pageNum := 0 -// err := client.DescribeReplicationGroupsPages(params, -// func(page *DescribeReplicationGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElastiCache) DescribeReplicationGroupsPages(input *DescribeReplicationGroupsInput, fn func(*DescribeReplicationGroupsOutput, bool) bool) error { - return c.DescribeReplicationGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReplicationGroupsPagesWithContext same as DescribeReplicationGroupsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeReplicationGroupsPagesWithContext(ctx aws.Context, input *DescribeReplicationGroupsInput, fn func(*DescribeReplicationGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReplicationGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReplicationGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeReservedCacheNodes = "DescribeReservedCacheNodes" - -// DescribeReservedCacheNodesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservedCacheNodes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReservedCacheNodes for more information on using the DescribeReservedCacheNodes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReservedCacheNodesRequest method. -// req, resp := client.DescribeReservedCacheNodesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeReservedCacheNodes -func (c *ElastiCache) DescribeReservedCacheNodesRequest(input *DescribeReservedCacheNodesInput) (req *request.Request, output *DescribeReservedCacheNodesOutput) { - op := &request.Operation{ - Name: opDescribeReservedCacheNodes, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReservedCacheNodesInput{} - } - - output = &DescribeReservedCacheNodesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReservedCacheNodes API operation for Amazon ElastiCache. -// -// Returns information about reserved cache nodes for this account, or about -// a specified reserved cache node. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DescribeReservedCacheNodes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReservedCacheNodeNotFoundFault "ReservedCacheNodeNotFound" -// The requested reserved cache node was not found. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeReservedCacheNodes -func (c *ElastiCache) DescribeReservedCacheNodes(input *DescribeReservedCacheNodesInput) (*DescribeReservedCacheNodesOutput, error) { - req, out := c.DescribeReservedCacheNodesRequest(input) - return out, req.Send() -} - -// DescribeReservedCacheNodesWithContext is the same as DescribeReservedCacheNodes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReservedCacheNodes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeReservedCacheNodesWithContext(ctx aws.Context, input *DescribeReservedCacheNodesInput, opts ...request.Option) (*DescribeReservedCacheNodesOutput, error) { - req, out := c.DescribeReservedCacheNodesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReservedCacheNodesPages iterates over the pages of a DescribeReservedCacheNodes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReservedCacheNodes 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 DescribeReservedCacheNodes operation. -// pageNum := 0 -// err := client.DescribeReservedCacheNodesPages(params, -// func(page *DescribeReservedCacheNodesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElastiCache) DescribeReservedCacheNodesPages(input *DescribeReservedCacheNodesInput, fn func(*DescribeReservedCacheNodesOutput, bool) bool) error { - return c.DescribeReservedCacheNodesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReservedCacheNodesPagesWithContext same as DescribeReservedCacheNodesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeReservedCacheNodesPagesWithContext(ctx aws.Context, input *DescribeReservedCacheNodesInput, fn func(*DescribeReservedCacheNodesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReservedCacheNodesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReservedCacheNodesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedCacheNodesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeReservedCacheNodesOfferings = "DescribeReservedCacheNodesOfferings" - -// DescribeReservedCacheNodesOfferingsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservedCacheNodesOfferings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReservedCacheNodesOfferings for more information on using the DescribeReservedCacheNodesOfferings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReservedCacheNodesOfferingsRequest method. -// req, resp := client.DescribeReservedCacheNodesOfferingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeReservedCacheNodesOfferings -func (c *ElastiCache) DescribeReservedCacheNodesOfferingsRequest(input *DescribeReservedCacheNodesOfferingsInput) (req *request.Request, output *DescribeReservedCacheNodesOfferingsOutput) { - op := &request.Operation{ - Name: opDescribeReservedCacheNodesOfferings, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReservedCacheNodesOfferingsInput{} - } - - output = &DescribeReservedCacheNodesOfferingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReservedCacheNodesOfferings API operation for Amazon ElastiCache. -// -// Lists available reserved cache node offerings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DescribeReservedCacheNodesOfferings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReservedCacheNodesOfferingNotFoundFault "ReservedCacheNodesOfferingNotFound" -// The requested cache node offering does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeReservedCacheNodesOfferings -func (c *ElastiCache) DescribeReservedCacheNodesOfferings(input *DescribeReservedCacheNodesOfferingsInput) (*DescribeReservedCacheNodesOfferingsOutput, error) { - req, out := c.DescribeReservedCacheNodesOfferingsRequest(input) - return out, req.Send() -} - -// DescribeReservedCacheNodesOfferingsWithContext is the same as DescribeReservedCacheNodesOfferings with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReservedCacheNodesOfferings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeReservedCacheNodesOfferingsWithContext(ctx aws.Context, input *DescribeReservedCacheNodesOfferingsInput, opts ...request.Option) (*DescribeReservedCacheNodesOfferingsOutput, error) { - req, out := c.DescribeReservedCacheNodesOfferingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReservedCacheNodesOfferingsPages iterates over the pages of a DescribeReservedCacheNodesOfferings operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReservedCacheNodesOfferings 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 DescribeReservedCacheNodesOfferings operation. -// pageNum := 0 -// err := client.DescribeReservedCacheNodesOfferingsPages(params, -// func(page *DescribeReservedCacheNodesOfferingsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElastiCache) DescribeReservedCacheNodesOfferingsPages(input *DescribeReservedCacheNodesOfferingsInput, fn func(*DescribeReservedCacheNodesOfferingsOutput, bool) bool) error { - return c.DescribeReservedCacheNodesOfferingsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReservedCacheNodesOfferingsPagesWithContext same as DescribeReservedCacheNodesOfferingsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeReservedCacheNodesOfferingsPagesWithContext(ctx aws.Context, input *DescribeReservedCacheNodesOfferingsInput, fn func(*DescribeReservedCacheNodesOfferingsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReservedCacheNodesOfferingsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReservedCacheNodesOfferingsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedCacheNodesOfferingsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeSnapshots = "DescribeSnapshots" - -// DescribeSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSnapshots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSnapshots for more information on using the DescribeSnapshots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSnapshotsRequest method. -// req, resp := client.DescribeSnapshotsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeSnapshots -func (c *ElastiCache) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *request.Request, output *DescribeSnapshotsOutput) { - op := &request.Operation{ - Name: opDescribeSnapshots, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeSnapshotsInput{} - } - - output = &DescribeSnapshotsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSnapshots API operation for Amazon ElastiCache. -// -// Returns information about cluster or replication group snapshots. By default, -// DescribeSnapshots lists all of your snapshots; it can optionally describe -// a single snapshot, or just the snapshots associated with a particular cache -// cluster. -// -// This operation is valid for Redis only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation DescribeSnapshots for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. -// -// * ErrCodeSnapshotNotFoundFault "SnapshotNotFoundFault" -// The requested snapshot name does not refer to an existing snapshot. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeSnapshots -func (c *ElastiCache) DescribeSnapshots(input *DescribeSnapshotsInput) (*DescribeSnapshotsOutput, error) { - req, out := c.DescribeSnapshotsRequest(input) - return out, req.Send() -} - -// DescribeSnapshotsWithContext is the same as DescribeSnapshots with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSnapshots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeSnapshotsWithContext(ctx aws.Context, input *DescribeSnapshotsInput, opts ...request.Option) (*DescribeSnapshotsOutput, error) { - req, out := c.DescribeSnapshotsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeSnapshotsPages iterates over the pages of a DescribeSnapshots operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeSnapshots 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 DescribeSnapshots operation. -// pageNum := 0 -// err := client.DescribeSnapshotsPages(params, -// func(page *DescribeSnapshotsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElastiCache) DescribeSnapshotsPages(input *DescribeSnapshotsInput, fn func(*DescribeSnapshotsOutput, bool) bool) error { - return c.DescribeSnapshotsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeSnapshotsPagesWithContext same as DescribeSnapshotsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) DescribeSnapshotsPagesWithContext(ctx aws.Context, input *DescribeSnapshotsInput, fn func(*DescribeSnapshotsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeSnapshotsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeSnapshotsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSnapshotsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opIncreaseReplicaCount = "IncreaseReplicaCount" - -// IncreaseReplicaCountRequest generates a "aws/request.Request" representing the -// client's request for the IncreaseReplicaCount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See IncreaseReplicaCount for more information on using the IncreaseReplicaCount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the IncreaseReplicaCountRequest method. -// req, resp := client.IncreaseReplicaCountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/IncreaseReplicaCount -func (c *ElastiCache) IncreaseReplicaCountRequest(input *IncreaseReplicaCountInput) (req *request.Request, output *IncreaseReplicaCountOutput) { - op := &request.Operation{ - Name: opIncreaseReplicaCount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &IncreaseReplicaCountInput{} - } - - output = &IncreaseReplicaCountOutput{} - req = c.newRequest(op, input, output) - return -} - -// IncreaseReplicaCount API operation for Amazon ElastiCache. -// -// Dynamically increases the number of replics in a Redis (cluster mode disabled) -// replication group or the number of replica nodes in one or more node groups -// (shards) of a Redis (cluster mode enabled) replication group. This operation -// is performed with no cluster down time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation IncreaseReplicaCount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" -// The requested replication group is not in the available state. -// -// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cluster is not in the available state. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The VPC network is in an invalid state. -// -// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" -// The requested cache node type is not available in the specified Availability -// Zone. -// -// * ErrCodeClusterQuotaForCustomerExceededFault "ClusterQuotaForCustomerExceeded" -// The request cannot be processed because it would exceed the allowed number -// of clusters per customer. -// -// * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" -// The request cannot be processed because it would exceed the maximum allowed -// number of node groups (shards) in a single replication group. The default -// maximum is 15 -// -// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" -// The request cannot be processed because it would exceed the allowed number -// of cache nodes per customer. -// -// * ErrCodeNoOperationFault "NoOperationFault" -// The operation was not performed because no changes were required. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/IncreaseReplicaCount -func (c *ElastiCache) IncreaseReplicaCount(input *IncreaseReplicaCountInput) (*IncreaseReplicaCountOutput, error) { - req, out := c.IncreaseReplicaCountRequest(input) - return out, req.Send() -} - -// IncreaseReplicaCountWithContext is the same as IncreaseReplicaCount with the addition of -// the ability to pass a context and additional request options. -// -// See IncreaseReplicaCount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) IncreaseReplicaCountWithContext(ctx aws.Context, input *IncreaseReplicaCountInput, opts ...request.Option) (*IncreaseReplicaCountOutput, error) { - req, out := c.IncreaseReplicaCountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAllowedNodeTypeModifications = "ListAllowedNodeTypeModifications" - -// ListAllowedNodeTypeModificationsRequest generates a "aws/request.Request" representing the -// client's request for the ListAllowedNodeTypeModifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAllowedNodeTypeModifications for more information on using the ListAllowedNodeTypeModifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAllowedNodeTypeModificationsRequest method. -// req, resp := client.ListAllowedNodeTypeModificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ListAllowedNodeTypeModifications -func (c *ElastiCache) ListAllowedNodeTypeModificationsRequest(input *ListAllowedNodeTypeModificationsInput) (req *request.Request, output *ListAllowedNodeTypeModificationsOutput) { - op := &request.Operation{ - Name: opListAllowedNodeTypeModifications, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListAllowedNodeTypeModificationsInput{} - } - - output = &ListAllowedNodeTypeModificationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAllowedNodeTypeModifications API operation for Amazon ElastiCache. -// -// Lists all available node types that you can scale your Redis cluster's or -// replication group's current node type up to. -// -// When you use the ModifyCacheCluster or ModifyReplicationGroup operations -// to scale up your cluster or replication group, the value of the CacheNodeType -// parameter must be one of the node types returned by this operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation ListAllowedNodeTypeModifications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. -// -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ListAllowedNodeTypeModifications -func (c *ElastiCache) ListAllowedNodeTypeModifications(input *ListAllowedNodeTypeModificationsInput) (*ListAllowedNodeTypeModificationsOutput, error) { - req, out := c.ListAllowedNodeTypeModificationsRequest(input) - return out, req.Send() -} - -// ListAllowedNodeTypeModificationsWithContext is the same as ListAllowedNodeTypeModifications with the addition of -// the ability to pass a context and additional request options. -// -// See ListAllowedNodeTypeModifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) ListAllowedNodeTypeModificationsWithContext(ctx aws.Context, input *ListAllowedNodeTypeModificationsInput, opts ...request.Option) (*ListAllowedNodeTypeModificationsOutput, error) { - req, out := c.ListAllowedNodeTypeModificationsRequest(input) - 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/elasticache-2015-02-02/ListTagsForResource -func (c *ElastiCache) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *TagListMessage) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &TagListMessage{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for Amazon ElastiCache. -// -// Lists all cost allocation tags currently on the named resource. A cost allocation -// tag is a key-value pair where the key is case-sensitive and the value is -// optional. You can use cost allocation tags to categorize and track your AWS -// costs. -// -// If the cluster is not in the available state, ListTagsForResource returns -// an error. -// -// You can have a maximum of 50 cost allocation tags on an ElastiCache resource. -// For more information, see Monitoring Costs with Tags (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Tagging.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. -// -// * ErrCodeSnapshotNotFoundFault "SnapshotNotFoundFault" -// The requested snapshot name does not refer to an existing snapshot. -// -// * ErrCodeInvalidARNFault "InvalidARN" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ListTagsForResource -func (c *ElastiCache) ListTagsForResource(input *ListTagsForResourceInput) (*TagListMessage, error) { - req, out := c.ListTagsForResourceRequest(input) - return out, req.Send() -} - -// 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 *ElastiCache) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*TagListMessage, error) { - req, out := c.ListTagsForResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyCacheCluster = "ModifyCacheCluster" - -// ModifyCacheClusterRequest generates a "aws/request.Request" representing the -// client's request for the ModifyCacheCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyCacheCluster for more information on using the ModifyCacheCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyCacheClusterRequest method. -// req, resp := client.ModifyCacheClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheCluster -func (c *ElastiCache) ModifyCacheClusterRequest(input *ModifyCacheClusterInput) (req *request.Request, output *ModifyCacheClusterOutput) { - op := &request.Operation{ - Name: opModifyCacheCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyCacheClusterInput{} - } - - output = &ModifyCacheClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyCacheCluster API operation for Amazon ElastiCache. -// -// Modifies the settings for a cluster. You can use this operation to change -// one or more cluster configuration parameters by specifying the parameters -// and the new values. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation ModifyCacheCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cluster is not in the available state. -// -// * ErrCodeInvalidCacheSecurityGroupStateFault "InvalidCacheSecurityGroupState" -// The current state of the cache security group does not allow deletion. -// -// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" -// The requested cache node type is not available in the specified Availability -// Zone. -// -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. -// -// * ErrCodeNodeQuotaForClusterExceededFault "NodeQuotaForClusterExceeded" -// The request cannot be processed because it would exceed the allowed number -// of cache nodes in a single cluster. -// -// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" -// The request cannot be processed because it would exceed the allowed number -// of cache nodes per customer. -// -// * ErrCodeCacheSecurityGroupNotFoundFault "CacheSecurityGroupNotFound" -// The requested cache security group name does not refer to an existing cache -// security group. -// -// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" -// The requested cache parameter group name does not refer to an existing cache -// parameter group. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The VPC network is in an invalid state. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheCluster -func (c *ElastiCache) ModifyCacheCluster(input *ModifyCacheClusterInput) (*ModifyCacheClusterOutput, error) { - req, out := c.ModifyCacheClusterRequest(input) - return out, req.Send() -} - -// ModifyCacheClusterWithContext is the same as ModifyCacheCluster with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyCacheCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) ModifyCacheClusterWithContext(ctx aws.Context, input *ModifyCacheClusterInput, opts ...request.Option) (*ModifyCacheClusterOutput, error) { - req, out := c.ModifyCacheClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyCacheParameterGroup = "ModifyCacheParameterGroup" - -// ModifyCacheParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyCacheParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyCacheParameterGroup for more information on using the ModifyCacheParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyCacheParameterGroupRequest method. -// req, resp := client.ModifyCacheParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheParameterGroup -func (c *ElastiCache) ModifyCacheParameterGroupRequest(input *ModifyCacheParameterGroupInput) (req *request.Request, output *CacheParameterGroupNameMessage) { - op := &request.Operation{ - Name: opModifyCacheParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyCacheParameterGroupInput{} - } - - output = &CacheParameterGroupNameMessage{} - req = c.newRequest(op, input, output) - return -} - -// ModifyCacheParameterGroup API operation for Amazon ElastiCache. -// -// Modifies the parameters of a cache parameter group. You can modify up to -// 20 parameters in a single request by submitting a list parameter name and -// value pairs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation ModifyCacheParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" -// The requested cache parameter group name does not refer to an existing cache -// parameter group. -// -// * ErrCodeInvalidCacheParameterGroupStateFault "InvalidCacheParameterGroupState" -// The current state of the cache parameter group does not allow the requested -// operation to occur. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheParameterGroup -func (c *ElastiCache) ModifyCacheParameterGroup(input *ModifyCacheParameterGroupInput) (*CacheParameterGroupNameMessage, error) { - req, out := c.ModifyCacheParameterGroupRequest(input) - return out, req.Send() -} - -// ModifyCacheParameterGroupWithContext is the same as ModifyCacheParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyCacheParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) ModifyCacheParameterGroupWithContext(ctx aws.Context, input *ModifyCacheParameterGroupInput, opts ...request.Option) (*CacheParameterGroupNameMessage, error) { - req, out := c.ModifyCacheParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyCacheSubnetGroup = "ModifyCacheSubnetGroup" - -// ModifyCacheSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyCacheSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyCacheSubnetGroup for more information on using the ModifyCacheSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyCacheSubnetGroupRequest method. -// req, resp := client.ModifyCacheSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheSubnetGroup -func (c *ElastiCache) ModifyCacheSubnetGroupRequest(input *ModifyCacheSubnetGroupInput) (req *request.Request, output *ModifyCacheSubnetGroupOutput) { - op := &request.Operation{ - Name: opModifyCacheSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyCacheSubnetGroupInput{} - } - - output = &ModifyCacheSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyCacheSubnetGroup API operation for Amazon ElastiCache. -// -// Modifies an existing cache subnet group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation ModifyCacheSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheSubnetGroupNotFoundFault "CacheSubnetGroupNotFoundFault" -// The requested cache subnet group name does not refer to an existing cache -// subnet group. -// -// * ErrCodeCacheSubnetQuotaExceededFault "CacheSubnetQuotaExceededFault" -// The request cannot be processed because it would exceed the allowed number -// of subnets in a cache subnet group. -// -// * ErrCodeSubnetInUse "SubnetInUse" -// The requested subnet is being used by another cache subnet group. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// An invalid subnet identifier was specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheSubnetGroup -func (c *ElastiCache) ModifyCacheSubnetGroup(input *ModifyCacheSubnetGroupInput) (*ModifyCacheSubnetGroupOutput, error) { - req, out := c.ModifyCacheSubnetGroupRequest(input) - return out, req.Send() -} - -// ModifyCacheSubnetGroupWithContext is the same as ModifyCacheSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyCacheSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) ModifyCacheSubnetGroupWithContext(ctx aws.Context, input *ModifyCacheSubnetGroupInput, opts ...request.Option) (*ModifyCacheSubnetGroupOutput, error) { - req, out := c.ModifyCacheSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyReplicationGroup = "ModifyReplicationGroup" - -// ModifyReplicationGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyReplicationGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyReplicationGroup for more information on using the ModifyReplicationGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyReplicationGroupRequest method. -// req, resp := client.ModifyReplicationGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroup -func (c *ElastiCache) ModifyReplicationGroupRequest(input *ModifyReplicationGroupInput) (req *request.Request, output *ModifyReplicationGroupOutput) { - op := &request.Operation{ - Name: opModifyReplicationGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyReplicationGroupInput{} - } - - output = &ModifyReplicationGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyReplicationGroup API operation for Amazon ElastiCache. -// -// Modifies the settings for a replication group. -// -// For Redis (cluster mode enabled) clusters, this operation cannot be used -// to change a cluster's node type or engine version. For more information, -// see: -// -// * Scaling for Amazon ElastiCache for Redis—Redis (cluster mode enabled) -// (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/scaling-redis-cluster-mode-enabled.html) -// in the ElastiCache User Guide -// -// * ModifyReplicationGroupShardConfiguration (http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyReplicationGroupShardConfiguration.html) -// in the ElastiCache API Reference -// -// This operation is valid for Redis only. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation ModifyReplicationGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" -// The requested replication group is not in the available state. -// -// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cluster is not in the available state. -// -// * ErrCodeInvalidCacheSecurityGroupStateFault "InvalidCacheSecurityGroupState" -// The current state of the cache security group does not allow deletion. -// -// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" -// The requested cache node type is not available in the specified Availability -// Zone. -// -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. -// -// * ErrCodeNodeQuotaForClusterExceededFault "NodeQuotaForClusterExceeded" -// The request cannot be processed because it would exceed the allowed number -// of cache nodes in a single cluster. -// -// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" -// The request cannot be processed because it would exceed the allowed number -// of cache nodes per customer. -// -// * ErrCodeCacheSecurityGroupNotFoundFault "CacheSecurityGroupNotFound" -// The requested cache security group name does not refer to an existing cache -// security group. -// -// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" -// The requested cache parameter group name does not refer to an existing cache -// parameter group. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The VPC network is in an invalid state. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroup -func (c *ElastiCache) ModifyReplicationGroup(input *ModifyReplicationGroupInput) (*ModifyReplicationGroupOutput, error) { - req, out := c.ModifyReplicationGroupRequest(input) - return out, req.Send() -} - -// ModifyReplicationGroupWithContext is the same as ModifyReplicationGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyReplicationGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) ModifyReplicationGroupWithContext(ctx aws.Context, input *ModifyReplicationGroupInput, opts ...request.Option) (*ModifyReplicationGroupOutput, error) { - req, out := c.ModifyReplicationGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyReplicationGroupShardConfiguration = "ModifyReplicationGroupShardConfiguration" - -// ModifyReplicationGroupShardConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the ModifyReplicationGroupShardConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyReplicationGroupShardConfiguration for more information on using the ModifyReplicationGroupShardConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyReplicationGroupShardConfigurationRequest method. -// req, resp := client.ModifyReplicationGroupShardConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroupShardConfiguration -func (c *ElastiCache) ModifyReplicationGroupShardConfigurationRequest(input *ModifyReplicationGroupShardConfigurationInput) (req *request.Request, output *ModifyReplicationGroupShardConfigurationOutput) { - op := &request.Operation{ - Name: opModifyReplicationGroupShardConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyReplicationGroupShardConfigurationInput{} - } - - output = &ModifyReplicationGroupShardConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyReplicationGroupShardConfiguration API operation for Amazon ElastiCache. -// -// Modifies a replication group's shards (node groups) by allowing you to add -// shards, remove shards, or rebalance the keyspaces among exisiting shards. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation ModifyReplicationGroupShardConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" -// The requested replication group is not in the available state. -// -// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cluster is not in the available state. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The VPC network is in an invalid state. -// -// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" -// The requested cache node type is not available in the specified Availability -// Zone. -// -// * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" -// The request cannot be processed because it would exceed the maximum allowed -// number of node groups (shards) in a single replication group. The default -// maximum is 15 -// -// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" -// The request cannot be processed because it would exceed the allowed number -// of cache nodes per customer. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroupShardConfiguration -func (c *ElastiCache) ModifyReplicationGroupShardConfiguration(input *ModifyReplicationGroupShardConfigurationInput) (*ModifyReplicationGroupShardConfigurationOutput, error) { - req, out := c.ModifyReplicationGroupShardConfigurationRequest(input) - return out, req.Send() -} - -// ModifyReplicationGroupShardConfigurationWithContext is the same as ModifyReplicationGroupShardConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyReplicationGroupShardConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) ModifyReplicationGroupShardConfigurationWithContext(ctx aws.Context, input *ModifyReplicationGroupShardConfigurationInput, opts ...request.Option) (*ModifyReplicationGroupShardConfigurationOutput, error) { - req, out := c.ModifyReplicationGroupShardConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPurchaseReservedCacheNodesOffering = "PurchaseReservedCacheNodesOffering" - -// PurchaseReservedCacheNodesOfferingRequest generates a "aws/request.Request" representing the -// client's request for the PurchaseReservedCacheNodesOffering operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PurchaseReservedCacheNodesOffering for more information on using the PurchaseReservedCacheNodesOffering -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PurchaseReservedCacheNodesOfferingRequest method. -// req, resp := client.PurchaseReservedCacheNodesOfferingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/PurchaseReservedCacheNodesOffering -func (c *ElastiCache) PurchaseReservedCacheNodesOfferingRequest(input *PurchaseReservedCacheNodesOfferingInput) (req *request.Request, output *PurchaseReservedCacheNodesOfferingOutput) { - op := &request.Operation{ - Name: opPurchaseReservedCacheNodesOffering, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PurchaseReservedCacheNodesOfferingInput{} - } - - output = &PurchaseReservedCacheNodesOfferingOutput{} - req = c.newRequest(op, input, output) - return -} - -// PurchaseReservedCacheNodesOffering API operation for Amazon ElastiCache. -// -// Allows you to purchase a reserved cache node offering. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation PurchaseReservedCacheNodesOffering for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReservedCacheNodesOfferingNotFoundFault "ReservedCacheNodesOfferingNotFound" -// The requested cache node offering does not exist. -// -// * ErrCodeReservedCacheNodeAlreadyExistsFault "ReservedCacheNodeAlreadyExists" -// You already have a reservation with the given identifier. -// -// * ErrCodeReservedCacheNodeQuotaExceededFault "ReservedCacheNodeQuotaExceeded" -// The request cannot be processed because it would exceed the user's cache -// node quota. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/PurchaseReservedCacheNodesOffering -func (c *ElastiCache) PurchaseReservedCacheNodesOffering(input *PurchaseReservedCacheNodesOfferingInput) (*PurchaseReservedCacheNodesOfferingOutput, error) { - req, out := c.PurchaseReservedCacheNodesOfferingRequest(input) - return out, req.Send() -} - -// PurchaseReservedCacheNodesOfferingWithContext is the same as PurchaseReservedCacheNodesOffering with the addition of -// the ability to pass a context and additional request options. -// -// See PurchaseReservedCacheNodesOffering for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) PurchaseReservedCacheNodesOfferingWithContext(ctx aws.Context, input *PurchaseReservedCacheNodesOfferingInput, opts ...request.Option) (*PurchaseReservedCacheNodesOfferingOutput, error) { - req, out := c.PurchaseReservedCacheNodesOfferingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRebootCacheCluster = "RebootCacheCluster" - -// RebootCacheClusterRequest generates a "aws/request.Request" representing the -// client's request for the RebootCacheCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebootCacheCluster for more information on using the RebootCacheCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebootCacheClusterRequest method. -// req, resp := client.RebootCacheClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RebootCacheCluster -func (c *ElastiCache) RebootCacheClusterRequest(input *RebootCacheClusterInput) (req *request.Request, output *RebootCacheClusterOutput) { - op := &request.Operation{ - Name: opRebootCacheCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RebootCacheClusterInput{} - } - - output = &RebootCacheClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// RebootCacheCluster API operation for Amazon ElastiCache. -// -// Reboots some, or all, of the cache nodes within a provisioned cluster. This -// operation applies any modified cache parameter groups to the cluster. The -// reboot operation takes place as soon as possible, and results in a momentary -// outage to the cluster. During the reboot, the cluster status is set to REBOOTING. -// -// The reboot causes the contents of the cache (for each cache node being rebooted) -// to be lost. -// -// When the reboot is complete, a cluster event is created. -// -// Rebooting a cluster is currently supported on Memcached and Redis (cluster -// mode disabled) clusters. Rebooting is not supported on Redis (cluster mode -// enabled) clusters. -// -// If you make changes to parameters that require a Redis (cluster mode enabled) -// cluster reboot for the changes to be applied, see Rebooting a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html) -// for an alternate process. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation RebootCacheCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cluster is not in the available state. -// -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RebootCacheCluster -func (c *ElastiCache) RebootCacheCluster(input *RebootCacheClusterInput) (*RebootCacheClusterOutput, error) { - req, out := c.RebootCacheClusterRequest(input) - return out, req.Send() -} - -// RebootCacheClusterWithContext is the same as RebootCacheCluster with the addition of -// the ability to pass a context and additional request options. -// -// See RebootCacheCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) RebootCacheClusterWithContext(ctx aws.Context, input *RebootCacheClusterInput, opts ...request.Option) (*RebootCacheClusterOutput, error) { - req, out := c.RebootCacheClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTagsFromResource = "RemoveTagsFromResource" - -// RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTagsFromResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTagsFromResource for more information on using the RemoveTagsFromResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsFromResourceRequest method. -// req, resp := client.RemoveTagsFromResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RemoveTagsFromResource -func (c *ElastiCache) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *TagListMessage) { - op := &request.Operation{ - Name: opRemoveTagsFromResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsFromResourceInput{} - } - - output = &TagListMessage{} - req = c.newRequest(op, input, output) - return -} - -// RemoveTagsFromResource API operation for Amazon ElastiCache. -// -// Removes the tags identified by the TagKeys list from the named resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation RemoveTagsFromResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. -// -// * ErrCodeSnapshotNotFoundFault "SnapshotNotFoundFault" -// The requested snapshot name does not refer to an existing snapshot. -// -// * ErrCodeInvalidARNFault "InvalidARN" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// -// * ErrCodeTagNotFoundFault "TagNotFound" -// The requested tag was not found on this resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RemoveTagsFromResource -func (c *ElastiCache) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*TagListMessage, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - return out, req.Send() -} - -// RemoveTagsFromResourceWithContext is the same as RemoveTagsFromResource with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTagsFromResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*TagListMessage, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetCacheParameterGroup = "ResetCacheParameterGroup" - -// ResetCacheParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ResetCacheParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetCacheParameterGroup for more information on using the ResetCacheParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetCacheParameterGroupRequest method. -// req, resp := client.ResetCacheParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ResetCacheParameterGroup -func (c *ElastiCache) ResetCacheParameterGroupRequest(input *ResetCacheParameterGroupInput) (req *request.Request, output *CacheParameterGroupNameMessage) { - op := &request.Operation{ - Name: opResetCacheParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetCacheParameterGroupInput{} - } - - output = &CacheParameterGroupNameMessage{} - req = c.newRequest(op, input, output) - return -} - -// ResetCacheParameterGroup API operation for Amazon ElastiCache. -// -// Modifies the parameters of a cache parameter group to the engine or system -// default value. You can reset specific parameters by submitting a list of -// parameter names. To reset the entire cache parameter group, specify the ResetAllParameters -// and CacheParameterGroupName parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation ResetCacheParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidCacheParameterGroupStateFault "InvalidCacheParameterGroupState" -// The current state of the cache parameter group does not allow the requested -// operation to occur. -// -// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" -// The requested cache parameter group name does not refer to an existing cache -// parameter group. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ResetCacheParameterGroup -func (c *ElastiCache) ResetCacheParameterGroup(input *ResetCacheParameterGroupInput) (*CacheParameterGroupNameMessage, error) { - req, out := c.ResetCacheParameterGroupRequest(input) - return out, req.Send() -} - -// ResetCacheParameterGroupWithContext is the same as ResetCacheParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ResetCacheParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) ResetCacheParameterGroupWithContext(ctx aws.Context, input *ResetCacheParameterGroupInput, opts ...request.Option) (*CacheParameterGroupNameMessage, error) { - req, out := c.ResetCacheParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRevokeCacheSecurityGroupIngress = "RevokeCacheSecurityGroupIngress" - -// RevokeCacheSecurityGroupIngressRequest generates a "aws/request.Request" representing the -// client's request for the RevokeCacheSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RevokeCacheSecurityGroupIngress for more information on using the RevokeCacheSecurityGroupIngress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RevokeCacheSecurityGroupIngressRequest method. -// req, resp := client.RevokeCacheSecurityGroupIngressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RevokeCacheSecurityGroupIngress -func (c *ElastiCache) RevokeCacheSecurityGroupIngressRequest(input *RevokeCacheSecurityGroupIngressInput) (req *request.Request, output *RevokeCacheSecurityGroupIngressOutput) { - op := &request.Operation{ - Name: opRevokeCacheSecurityGroupIngress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RevokeCacheSecurityGroupIngressInput{} - } - - output = &RevokeCacheSecurityGroupIngressOutput{} - req = c.newRequest(op, input, output) - return -} - -// RevokeCacheSecurityGroupIngress API operation for Amazon ElastiCache. -// -// Revokes ingress from a cache security group. Use this operation to disallow -// access from an Amazon EC2 security group that had been previously authorized. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation RevokeCacheSecurityGroupIngress for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCacheSecurityGroupNotFoundFault "CacheSecurityGroupNotFound" -// The requested cache security group name does not refer to an existing cache -// security group. -// -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// The specified Amazon EC2 security group is not authorized for the specified -// cache security group. -// -// * ErrCodeInvalidCacheSecurityGroupStateFault "InvalidCacheSecurityGroupState" -// The current state of the cache security group does not allow deletion. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RevokeCacheSecurityGroupIngress -func (c *ElastiCache) RevokeCacheSecurityGroupIngress(input *RevokeCacheSecurityGroupIngressInput) (*RevokeCacheSecurityGroupIngressOutput, error) { - req, out := c.RevokeCacheSecurityGroupIngressRequest(input) - return out, req.Send() -} - -// RevokeCacheSecurityGroupIngressWithContext is the same as RevokeCacheSecurityGroupIngress with the addition of -// the ability to pass a context and additional request options. -// -// See RevokeCacheSecurityGroupIngress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) RevokeCacheSecurityGroupIngressWithContext(ctx aws.Context, input *RevokeCacheSecurityGroupIngressInput, opts ...request.Option) (*RevokeCacheSecurityGroupIngressOutput, error) { - req, out := c.RevokeCacheSecurityGroupIngressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTestFailover = "TestFailover" - -// TestFailoverRequest generates a "aws/request.Request" representing the -// client's request for the TestFailover operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TestFailover for more information on using the TestFailover -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TestFailoverRequest method. -// req, resp := client.TestFailoverRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/TestFailover -func (c *ElastiCache) TestFailoverRequest(input *TestFailoverInput) (req *request.Request, output *TestFailoverOutput) { - op := &request.Operation{ - Name: opTestFailover, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TestFailoverInput{} - } - - output = &TestFailoverOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestFailover API operation for Amazon ElastiCache. -// -// Represents the input of a TestFailover operation which test automatic failover -// on a specified node group (called shard in the console) in a replication -// group (called cluster in the console). -// -// Note the following -// -// * A customer can use this operation to test automatic failover on up to -// 5 shards (called node groups in the ElastiCache API and AWS CLI) in any -// rolling 24-hour period. -// -// * If calling this operation on shards in different clusters (called replication -// groups in the API and CLI), the calls can be made concurrently. -// -// * If calling this operation multiple times on different shards in the -// same Redis (cluster mode enabled) replication group, the first node replacement -// must complete before a subsequent call can be made. -// -// * To determine whether the node replacement is complete you can check -// Events using the Amazon ElastiCache console, the AWS CLI, or the ElastiCache -// API. Look for the following automatic failover related events, listed -// here in order of occurrance: -// -// Replication group message: Test Failover API called for node group -// -// Cache cluster message: Failover from master node to replica -// node completed -// -// Replication group message: Failover from master node to -// replica node completed -// -// Cache cluster message: Recovering cache nodes -// -// Cache cluster message: Finished recovery for cache nodes -// -// For more information see: -// -// Viewing ElastiCache Events (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ECEvents.Viewing.html) -// in the ElastiCache User Guide -// -// DescribeEvents (http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_DescribeEvents.html) -// in the ElastiCache API Reference -// -// Also see, Testing Multi-AZ with Automatic Failover (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html#auto-failover-test) -// in the ElastiCache User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon ElastiCache's -// API operation TestFailover for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAPICallRateForCustomerExceededFault "APICallRateForCustomerExceeded" -// The customer has exceeded the allowed rate of API calls. -// -// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cluster is not in the available state. -// -// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" -// The requested replication group is not in the available state. -// -// * ErrCodeNodeGroupNotFoundFault "NodeGroupNotFoundFault" -// The node group specified by the NodeGroupId parameter could not be found. -// Please verify that the node group exists and that you spelled the NodeGroupId -// value correctly. -// -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeTestFailoverNotAvailableFault "TestFailoverNotAvailableFault" -// The TestFailover action is not available. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/TestFailover -func (c *ElastiCache) TestFailover(input *TestFailoverInput) (*TestFailoverOutput, error) { - req, out := c.TestFailoverRequest(input) - return out, req.Send() -} - -// TestFailoverWithContext is the same as TestFailover with the addition of -// the ability to pass a context and additional request options. -// -// See TestFailover for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) TestFailoverWithContext(ctx aws.Context, input *TestFailoverInput, opts ...request.Option) (*TestFailoverOutput, error) { - req, out := c.TestFailoverRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Represents the input of an AddTagsToResource operation. -type AddTagsToResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource to which the tags are to be - // added, for example arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster - // or arn:aws:elasticache:us-west-2:0123456789:snapshot:mySnapshot. ElastiCache - // resources are cluster and snapshot. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS - // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // ResourceName is a required field - ResourceName *string `type:"string" required:"true"` - - // A list of cost allocation tags to be added to this resource. A tag is a key-value - // pair. A tag key must be accompanied by a tag value. - // - // Tags is a required field - Tags []*Tag `locationNameList:"Tag" type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsToResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsToResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *AddTagsToResourceInput) SetResourceName(v string) *AddTagsToResourceInput { - s.ResourceName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { - s.Tags = v - return s -} - -// Represents the input of an AuthorizeCacheSecurityGroupIngress operation. -type AuthorizeCacheSecurityGroupIngressInput struct { - _ struct{} `type:"structure"` - - // The cache security group that allows network ingress. - // - // CacheSecurityGroupName is a required field - CacheSecurityGroupName *string `type:"string" required:"true"` - - // The Amazon EC2 security group to be authorized for ingress to the cache security - // group. - // - // EC2SecurityGroupName is a required field - EC2SecurityGroupName *string `type:"string" required:"true"` - - // The AWS account number of the Amazon EC2 security group owner. Note that - // this is not the same thing as an AWS access key ID - you must provide a valid - // AWS account number for this parameter. - // - // EC2SecurityGroupOwnerId is a required field - EC2SecurityGroupOwnerId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AuthorizeCacheSecurityGroupIngressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeCacheSecurityGroupIngressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AuthorizeCacheSecurityGroupIngressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuthorizeCacheSecurityGroupIngressInput"} - if s.CacheSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheSecurityGroupName")) - } - if s.EC2SecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("EC2SecurityGroupName")) - } - if s.EC2SecurityGroupOwnerId == nil { - invalidParams.Add(request.NewErrParamRequired("EC2SecurityGroupOwnerId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. -func (s *AuthorizeCacheSecurityGroupIngressInput) SetCacheSecurityGroupName(v string) *AuthorizeCacheSecurityGroupIngressInput { - s.CacheSecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. -func (s *AuthorizeCacheSecurityGroupIngressInput) SetEC2SecurityGroupName(v string) *AuthorizeCacheSecurityGroupIngressInput { - s.EC2SecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. -func (s *AuthorizeCacheSecurityGroupIngressInput) SetEC2SecurityGroupOwnerId(v string) *AuthorizeCacheSecurityGroupIngressInput { - s.EC2SecurityGroupOwnerId = &v - return s -} - -type AuthorizeCacheSecurityGroupIngressOutput struct { - _ struct{} `type:"structure"` - - // Represents the output of one of the following operations: - // - // * AuthorizeCacheSecurityGroupIngress - // - // * CreateCacheSecurityGroup - // - // * RevokeCacheSecurityGroupIngress - CacheSecurityGroup *CacheSecurityGroup `type:"structure"` -} - -// String returns the string representation -func (s AuthorizeCacheSecurityGroupIngressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeCacheSecurityGroupIngressOutput) GoString() string { - return s.String() -} - -// SetCacheSecurityGroup sets the CacheSecurityGroup field's value. -func (s *AuthorizeCacheSecurityGroupIngressOutput) SetCacheSecurityGroup(v *CacheSecurityGroup) *AuthorizeCacheSecurityGroupIngressOutput { - s.CacheSecurityGroup = v - return s -} - -// Describes an Availability Zone in which the cluster is launched. -type AvailabilityZone struct { - _ struct{} `type:"structure"` - - // The name of the Availability Zone. - Name *string `type:"string"` -} - -// String returns the string representation -func (s AvailabilityZone) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailabilityZone) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { - s.Name = &v - return s -} - -// Contains all of the attributes of a specific cluster. -type CacheCluster struct { - _ struct{} `type:"structure"` - - // A flag that enables encryption at-rest when set to true. - // - // You cannot modify the value of AtRestEncryptionEnabled after the cluster - // is created. To enable at-rest encryption on a cluster you must set AtRestEncryptionEnabled - // to true when you create a cluster. - // - // Required: Only available when creating a replication group in an Amazon VPC - // using redis version 3.2.6 or 4.x. - // - // Default: false - AtRestEncryptionEnabled *bool `type:"boolean"` - - // A flag that enables using an AuthToken (password) when issuing Redis commands. - // - // Default: false - AuthTokenEnabled *bool `type:"boolean"` - - // This parameter is currently disabled. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The date and time when the cluster was created. - CacheClusterCreateTime *time.Time `type:"timestamp"` - - // The user-supplied identifier of the cluster. This identifier is a unique - // key that identifies a cluster. - CacheClusterId *string `type:"string"` - - // The current state of this cluster, one of the following values: available, - // creating, deleted, deleting, incompatible-network, modifying, rebooting cluster - // nodes, restore-failed, or snapshotting. - CacheClusterStatus *string `type:"string"` - - // The name of the compute and memory capacity node type for the cluster. - // - // The following node types are supported by ElastiCache. Generally speaking, - // the current generation types provide more memory and computational power - // at lower cost when compared to their equivalent previous generation counterparts. - // - // * General purpose: - // - // Current generation: - // - // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium - // - // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - // - // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge - // - // Previous generation: (not recommended) - // - // T1 node types:cache.t1.micro - // - // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge - // - // * Compute optimized: - // - // Previous generation: (not recommended) - // - // C1 node types:cache.c1.xlarge - // - // * Memory optimized: - // - // Current generation: - // - // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, - // cache.r3.8xlarge - // - // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, - // cache.r4.8xlarge, cache.r4.16xlarge - // - // Previous generation: (not recommended) - // - // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge - // - // Notes: - // - // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon - // VPC). - // - // * Redis (cluster mode disabled): Redis backup/restore is not supported - // on T1 and T2 instances. - // - // * Redis (cluster mode enabled): Backup/restore is not supported on T1 - // instances. - // - // * Redis Append-only files (AOF) functionality is not supported for T1 - // or T2 instances. - // - // For a complete listing of node types and specifications, see: - // - // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) - // - // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // - // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) - CacheNodeType *string `type:"string"` - - // A list of cache nodes that are members of the cluster. - CacheNodes []*CacheNode `locationNameList:"CacheNode" type:"list"` - - // Status of the cache parameter group. - CacheParameterGroup *CacheParameterGroupStatus `type:"structure"` - - // A list of cache security group elements, composed of name and status sub-elements. - CacheSecurityGroups []*CacheSecurityGroupMembership `locationNameList:"CacheSecurityGroup" type:"list"` - - // The name of the cache subnet group associated with the cluster. - CacheSubnetGroupName *string `type:"string"` - - // The URL of the web page where you can download the latest ElastiCache client - // library. - ClientDownloadLandingPage *string `type:"string"` - - // Represents a Memcached cluster endpoint which, if Automatic Discovery is - // enabled on the cluster, can be used by an application to connect to any node - // in the cluster. The configuration endpoint will always have .cfg in it. - // - // Example: mem-3.9dvc4r.cfg.usw2.cache.amazonaws.com:11211 - ConfigurationEndpoint *Endpoint `type:"structure"` - - // The name of the cache engine (memcached or redis) to be used for this cluster. - Engine *string `type:"string"` - - // The version of the cache engine that is used in this cluster. - EngineVersion *string `type:"string"` - - // Describes a notification topic and its status. Notification topics are used - // for publishing ElastiCache events to subscribers using Amazon Simple Notification - // Service (SNS). - NotificationConfiguration *NotificationConfiguration `type:"structure"` - - // The number of cache nodes in the cluster. - // - // For clusters running Redis, this value must be 1. For clusters running Memcached, - // this value must be between 1 and 20. - NumCacheNodes *int64 `type:"integer"` - - // A group of settings that are applied to the cluster in the future, or that - // are currently being applied. - PendingModifiedValues *PendingModifiedValues `type:"structure"` - - // The name of the Availability Zone in which the cluster is located or "Multiple" - // if the cache nodes are located in different Availability Zones. - PreferredAvailabilityZone *string `type:"string"` - - // Specifies the weekly time range during which maintenance on the cluster is - // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi - // (24H Clock UTC). The minimum maintenance window is a 60 minute period. - // - // Valid values for ddd are: - // - // * sun - // - // * mon - // - // * tue - // - // * wed - // - // * thu - // - // * fri - // - // * sat - // - // Example: sun:23:00-mon:01:30 - PreferredMaintenanceWindow *string `type:"string"` - - // The replication group to which this cluster belongs. If this field is empty, - // the cluster is not associated with any replication group. - ReplicationGroupId *string `type:"string"` - - // A list of VPC Security Groups associated with the cluster. - SecurityGroups []*SecurityGroupMembership `type:"list"` - - // The number of days for which ElastiCache retains automatic cluster snapshots - // before deleting them. For example, if you set SnapshotRetentionLimit to 5, - // a snapshot that was taken today is retained for 5 days before being deleted. - // - // If the value of SnapshotRetentionLimit is set to zero (0), backups are turned - // off. - SnapshotRetentionLimit *int64 `type:"integer"` - - // The daily time range (in UTC) during which ElastiCache begins taking a daily - // snapshot of your cluster. - // - // Example: 05:00-09:00 - SnapshotWindow *string `type:"string"` - - // A flag that enables in-transit encryption when set to true. - // - // You cannot modify the value of TransitEncryptionEnabled after the cluster - // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled - // to true when you create a cluster. - // - // Required: Only available when creating a replication group in an Amazon VPC - // using redis version 3.2.6 or 4.x. - // - // Default: false - TransitEncryptionEnabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s CacheCluster) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CacheCluster) GoString() string { - return s.String() -} - -// SetAtRestEncryptionEnabled sets the AtRestEncryptionEnabled field's value. -func (s *CacheCluster) SetAtRestEncryptionEnabled(v bool) *CacheCluster { - s.AtRestEncryptionEnabled = &v - return s -} - -// SetAuthTokenEnabled sets the AuthTokenEnabled field's value. -func (s *CacheCluster) SetAuthTokenEnabled(v bool) *CacheCluster { - s.AuthTokenEnabled = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *CacheCluster) SetAutoMinorVersionUpgrade(v bool) *CacheCluster { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetCacheClusterCreateTime sets the CacheClusterCreateTime field's value. -func (s *CacheCluster) SetCacheClusterCreateTime(v time.Time) *CacheCluster { - s.CacheClusterCreateTime = &v - return s -} - -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *CacheCluster) SetCacheClusterId(v string) *CacheCluster { - s.CacheClusterId = &v - return s -} - -// SetCacheClusterStatus sets the CacheClusterStatus field's value. -func (s *CacheCluster) SetCacheClusterStatus(v string) *CacheCluster { - s.CacheClusterStatus = &v - return s -} - -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *CacheCluster) SetCacheNodeType(v string) *CacheCluster { - s.CacheNodeType = &v - return s -} - -// SetCacheNodes sets the CacheNodes field's value. -func (s *CacheCluster) SetCacheNodes(v []*CacheNode) *CacheCluster { - s.CacheNodes = v - return s -} - -// SetCacheParameterGroup sets the CacheParameterGroup field's value. -func (s *CacheCluster) SetCacheParameterGroup(v *CacheParameterGroupStatus) *CacheCluster { - s.CacheParameterGroup = v - return s -} - -// SetCacheSecurityGroups sets the CacheSecurityGroups field's value. -func (s *CacheCluster) SetCacheSecurityGroups(v []*CacheSecurityGroupMembership) *CacheCluster { - s.CacheSecurityGroups = v - return s -} - -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *CacheCluster) SetCacheSubnetGroupName(v string) *CacheCluster { - s.CacheSubnetGroupName = &v - return s -} - -// SetClientDownloadLandingPage sets the ClientDownloadLandingPage field's value. -func (s *CacheCluster) SetClientDownloadLandingPage(v string) *CacheCluster { - s.ClientDownloadLandingPage = &v - return s -} - -// SetConfigurationEndpoint sets the ConfigurationEndpoint field's value. -func (s *CacheCluster) SetConfigurationEndpoint(v *Endpoint) *CacheCluster { - s.ConfigurationEndpoint = v - return s -} - -// SetEngine sets the Engine field's value. -func (s *CacheCluster) SetEngine(v string) *CacheCluster { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *CacheCluster) SetEngineVersion(v string) *CacheCluster { - s.EngineVersion = &v - return s -} - -// SetNotificationConfiguration sets the NotificationConfiguration field's value. -func (s *CacheCluster) SetNotificationConfiguration(v *NotificationConfiguration) *CacheCluster { - s.NotificationConfiguration = v - return s -} - -// SetNumCacheNodes sets the NumCacheNodes field's value. -func (s *CacheCluster) SetNumCacheNodes(v int64) *CacheCluster { - s.NumCacheNodes = &v - return s -} - -// SetPendingModifiedValues sets the PendingModifiedValues field's value. -func (s *CacheCluster) SetPendingModifiedValues(v *PendingModifiedValues) *CacheCluster { - s.PendingModifiedValues = v - return s -} - -// SetPreferredAvailabilityZone sets the PreferredAvailabilityZone field's value. -func (s *CacheCluster) SetPreferredAvailabilityZone(v string) *CacheCluster { - s.PreferredAvailabilityZone = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CacheCluster) SetPreferredMaintenanceWindow(v string) *CacheCluster { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *CacheCluster) SetReplicationGroupId(v string) *CacheCluster { - s.ReplicationGroupId = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *CacheCluster) SetSecurityGroups(v []*SecurityGroupMembership) *CacheCluster { - s.SecurityGroups = v - return s -} - -// SetSnapshotRetentionLimit sets the SnapshotRetentionLimit field's value. -func (s *CacheCluster) SetSnapshotRetentionLimit(v int64) *CacheCluster { - s.SnapshotRetentionLimit = &v - return s -} - -// SetSnapshotWindow sets the SnapshotWindow field's value. -func (s *CacheCluster) SetSnapshotWindow(v string) *CacheCluster { - s.SnapshotWindow = &v - return s -} - -// SetTransitEncryptionEnabled sets the TransitEncryptionEnabled field's value. -func (s *CacheCluster) SetTransitEncryptionEnabled(v bool) *CacheCluster { - s.TransitEncryptionEnabled = &v - return s -} - -// Provides all of the details about a particular cache engine version. -type CacheEngineVersion struct { - _ struct{} `type:"structure"` - - // The description of the cache engine. - CacheEngineDescription *string `type:"string"` - - // The description of the cache engine version. - CacheEngineVersionDescription *string `type:"string"` - - // The name of the cache parameter group family associated with this cache engine. - // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 - CacheParameterGroupFamily *string `type:"string"` - - // The name of the cache engine. - Engine *string `type:"string"` - - // The version number of the cache engine. - EngineVersion *string `type:"string"` -} - -// String returns the string representation -func (s CacheEngineVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CacheEngineVersion) GoString() string { - return s.String() -} - -// SetCacheEngineDescription sets the CacheEngineDescription field's value. -func (s *CacheEngineVersion) SetCacheEngineDescription(v string) *CacheEngineVersion { - s.CacheEngineDescription = &v - return s -} - -// SetCacheEngineVersionDescription sets the CacheEngineVersionDescription field's value. -func (s *CacheEngineVersion) SetCacheEngineVersionDescription(v string) *CacheEngineVersion { - s.CacheEngineVersionDescription = &v - return s -} - -// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. -func (s *CacheEngineVersion) SetCacheParameterGroupFamily(v string) *CacheEngineVersion { - s.CacheParameterGroupFamily = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *CacheEngineVersion) SetEngine(v string) *CacheEngineVersion { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *CacheEngineVersion) SetEngineVersion(v string) *CacheEngineVersion { - s.EngineVersion = &v - return s -} - -// Represents an individual cache node within a cluster. Each cache node runs -// its own instance of the cluster's protocol-compliant caching software - either -// Memcached or Redis. -// -// The following node types are supported by ElastiCache. Generally speaking, -// the current generation types provide more memory and computational power -// at lower cost when compared to their equivalent previous generation counterparts. -// -// * General purpose: -// -// Current generation: -// -// T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium -// -// M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge -// -// M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, -// cache.m4.10xlarge -// -// Previous generation: (not recommended) -// -// T1 node types:cache.t1.micro -// -// M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge -// -// * Compute optimized: -// -// Previous generation: (not recommended) -// -// C1 node types:cache.c1.xlarge -// -// * Memory optimized: -// -// Current generation: -// -// R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, -// cache.r3.8xlarge -// -// R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, -// cache.r4.8xlarge, cache.r4.16xlarge -// -// Previous generation: (not recommended) -// -// M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge -// -// Notes: -// -// * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon -// VPC). -// -// * Redis (cluster mode disabled): Redis backup/restore is not supported -// on T1 and T2 instances. -// -// * Redis (cluster mode enabled): Backup/restore is not supported on T1 -// instances. -// -// * Redis Append-only files (AOF) functionality is not supported for T1 -// or T2 instances. -// -// For a complete listing of node types and specifications, see: -// -// * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) -// -// * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) -// -// * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) -type CacheNode struct { - _ struct{} `type:"structure"` - - // The date and time when the cache node was created. - CacheNodeCreateTime *time.Time `type:"timestamp"` - - // The cache node identifier. A node ID is a numeric identifier (0001, 0002, - // etc.). The combination of cluster ID and node ID uniquely identifies every - // cache node used in a customer's AWS account. - CacheNodeId *string `type:"string"` - - // The current state of this cache node. - CacheNodeStatus *string `type:"string"` - - // The Availability Zone where this node was created and now resides. - CustomerAvailabilityZone *string `type:"string"` - - // The hostname for connecting to this cache node. - Endpoint *Endpoint `type:"structure"` - - // The status of the parameter group applied to this cache node. - ParameterGroupStatus *string `type:"string"` - - // The ID of the primary node to which this read replica node is synchronized. - // If this field is empty, this node is not associated with a primary cluster. - SourceCacheNodeId *string `type:"string"` -} - -// String returns the string representation -func (s CacheNode) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CacheNode) GoString() string { - return s.String() -} - -// SetCacheNodeCreateTime sets the CacheNodeCreateTime field's value. -func (s *CacheNode) SetCacheNodeCreateTime(v time.Time) *CacheNode { - s.CacheNodeCreateTime = &v - return s -} - -// SetCacheNodeId sets the CacheNodeId field's value. -func (s *CacheNode) SetCacheNodeId(v string) *CacheNode { - s.CacheNodeId = &v - return s -} - -// SetCacheNodeStatus sets the CacheNodeStatus field's value. -func (s *CacheNode) SetCacheNodeStatus(v string) *CacheNode { - s.CacheNodeStatus = &v - return s -} - -// SetCustomerAvailabilityZone sets the CustomerAvailabilityZone field's value. -func (s *CacheNode) SetCustomerAvailabilityZone(v string) *CacheNode { - s.CustomerAvailabilityZone = &v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *CacheNode) SetEndpoint(v *Endpoint) *CacheNode { - s.Endpoint = v - return s -} - -// SetParameterGroupStatus sets the ParameterGroupStatus field's value. -func (s *CacheNode) SetParameterGroupStatus(v string) *CacheNode { - s.ParameterGroupStatus = &v - return s -} - -// SetSourceCacheNodeId sets the SourceCacheNodeId field's value. -func (s *CacheNode) SetSourceCacheNodeId(v string) *CacheNode { - s.SourceCacheNodeId = &v - return s -} - -// A parameter that has a different value for each cache node type it is applied -// to. For example, in a Redis cluster, a cache.m1.large cache node type would -// have a larger maxmemory value than a cache.m1.small type. -type CacheNodeTypeSpecificParameter struct { - _ struct{} `type:"structure"` - - // The valid range of values for the parameter. - AllowedValues *string `type:"string"` - - // A list of cache node types and their corresponding values for this parameter. - CacheNodeTypeSpecificValues []*CacheNodeTypeSpecificValue `locationNameList:"CacheNodeTypeSpecificValue" type:"list"` - - // Indicates whether a change to the parameter is applied immediately or requires - // a reboot for the change to be applied. You can force a reboot or wait until - // the next maintenance window's reboot. For more information, see Rebooting - // a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html). - ChangeType *string `type:"string" enum:"ChangeType"` - - // The valid data type for the parameter. - DataType *string `type:"string"` - - // A description of the parameter. - Description *string `type:"string"` - - // Indicates whether (true) or not (false) the parameter can be modified. Some - // parameters have security or operational implications that prevent them from - // being changed. - IsModifiable *bool `type:"boolean"` - - // The earliest cache engine version to which the parameter can apply. - MinimumEngineVersion *string `type:"string"` - - // The name of the parameter. - ParameterName *string `type:"string"` - - // The source of the parameter value. - Source *string `type:"string"` -} - -// String returns the string representation -func (s CacheNodeTypeSpecificParameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CacheNodeTypeSpecificParameter) GoString() string { - return s.String() -} - -// SetAllowedValues sets the AllowedValues field's value. -func (s *CacheNodeTypeSpecificParameter) SetAllowedValues(v string) *CacheNodeTypeSpecificParameter { - s.AllowedValues = &v - return s -} - -// SetCacheNodeTypeSpecificValues sets the CacheNodeTypeSpecificValues field's value. -func (s *CacheNodeTypeSpecificParameter) SetCacheNodeTypeSpecificValues(v []*CacheNodeTypeSpecificValue) *CacheNodeTypeSpecificParameter { - s.CacheNodeTypeSpecificValues = v - return s -} - -// SetChangeType sets the ChangeType field's value. -func (s *CacheNodeTypeSpecificParameter) SetChangeType(v string) *CacheNodeTypeSpecificParameter { - s.ChangeType = &v - return s -} - -// SetDataType sets the DataType field's value. -func (s *CacheNodeTypeSpecificParameter) SetDataType(v string) *CacheNodeTypeSpecificParameter { - s.DataType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CacheNodeTypeSpecificParameter) SetDescription(v string) *CacheNodeTypeSpecificParameter { - s.Description = &v - return s -} - -// SetIsModifiable sets the IsModifiable field's value. -func (s *CacheNodeTypeSpecificParameter) SetIsModifiable(v bool) *CacheNodeTypeSpecificParameter { - s.IsModifiable = &v - return s -} - -// SetMinimumEngineVersion sets the MinimumEngineVersion field's value. -func (s *CacheNodeTypeSpecificParameter) SetMinimumEngineVersion(v string) *CacheNodeTypeSpecificParameter { - s.MinimumEngineVersion = &v - return s -} - -// SetParameterName sets the ParameterName field's value. -func (s *CacheNodeTypeSpecificParameter) SetParameterName(v string) *CacheNodeTypeSpecificParameter { - s.ParameterName = &v - return s -} - -// SetSource sets the Source field's value. -func (s *CacheNodeTypeSpecificParameter) SetSource(v string) *CacheNodeTypeSpecificParameter { - s.Source = &v - return s -} - -// A value that applies only to a certain cache node type. -type CacheNodeTypeSpecificValue struct { - _ struct{} `type:"structure"` - - // The cache node type for which this value applies. - CacheNodeType *string `type:"string"` - - // The value for the cache node type. - Value *string `type:"string"` -} - -// String returns the string representation -func (s CacheNodeTypeSpecificValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CacheNodeTypeSpecificValue) GoString() string { - return s.String() -} - -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *CacheNodeTypeSpecificValue) SetCacheNodeType(v string) *CacheNodeTypeSpecificValue { - s.CacheNodeType = &v - return s -} - -// SetValue sets the Value field's value. -func (s *CacheNodeTypeSpecificValue) SetValue(v string) *CacheNodeTypeSpecificValue { - s.Value = &v - return s -} - -// Represents the output of a CreateCacheParameterGroup operation. -type CacheParameterGroup struct { - _ struct{} `type:"structure"` - - // The name of the cache parameter group family that this cache parameter group - // is compatible with. - // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 - CacheParameterGroupFamily *string `type:"string"` - - // The name of the cache parameter group. - CacheParameterGroupName *string `type:"string"` - - // The description for this cache parameter group. - Description *string `type:"string"` -} - -// String returns the string representation -func (s CacheParameterGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CacheParameterGroup) GoString() string { - return s.String() -} - -// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. -func (s *CacheParameterGroup) SetCacheParameterGroupFamily(v string) *CacheParameterGroup { - s.CacheParameterGroupFamily = &v - return s -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *CacheParameterGroup) SetCacheParameterGroupName(v string) *CacheParameterGroup { - s.CacheParameterGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CacheParameterGroup) SetDescription(v string) *CacheParameterGroup { - s.Description = &v - return s -} - -// Represents the output of one of the following operations: -// -// * ModifyCacheParameterGroup -// -// * ResetCacheParameterGroup -type CacheParameterGroupNameMessage struct { - _ struct{} `type:"structure"` - - // The name of the cache parameter group. - CacheParameterGroupName *string `type:"string"` -} - -// String returns the string representation -func (s CacheParameterGroupNameMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CacheParameterGroupNameMessage) GoString() string { - return s.String() -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *CacheParameterGroupNameMessage) SetCacheParameterGroupName(v string) *CacheParameterGroupNameMessage { - s.CacheParameterGroupName = &v - return s -} - -// Status of the cache parameter group. -type CacheParameterGroupStatus struct { - _ struct{} `type:"structure"` - - // A list of the cache node IDs which need to be rebooted for parameter changes - // to be applied. A node ID is a numeric identifier (0001, 0002, etc.). - CacheNodeIdsToReboot []*string `locationNameList:"CacheNodeId" type:"list"` - - // The name of the cache parameter group. - CacheParameterGroupName *string `type:"string"` - - // The status of parameter updates. - ParameterApplyStatus *string `type:"string"` -} - -// String returns the string representation -func (s CacheParameterGroupStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CacheParameterGroupStatus) GoString() string { - return s.String() -} - -// SetCacheNodeIdsToReboot sets the CacheNodeIdsToReboot field's value. -func (s *CacheParameterGroupStatus) SetCacheNodeIdsToReboot(v []*string) *CacheParameterGroupStatus { - s.CacheNodeIdsToReboot = v - return s -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *CacheParameterGroupStatus) SetCacheParameterGroupName(v string) *CacheParameterGroupStatus { - s.CacheParameterGroupName = &v - return s -} - -// SetParameterApplyStatus sets the ParameterApplyStatus field's value. -func (s *CacheParameterGroupStatus) SetParameterApplyStatus(v string) *CacheParameterGroupStatus { - s.ParameterApplyStatus = &v - return s -} - -// Represents the output of one of the following operations: -// -// * AuthorizeCacheSecurityGroupIngress -// -// * CreateCacheSecurityGroup -// -// * RevokeCacheSecurityGroupIngress -type CacheSecurityGroup struct { - _ struct{} `type:"structure"` - - // The name of the cache security group. - CacheSecurityGroupName *string `type:"string"` - - // The description of the cache security group. - Description *string `type:"string"` - - // A list of Amazon EC2 security groups that are associated with this cache - // security group. - EC2SecurityGroups []*EC2SecurityGroup `locationNameList:"EC2SecurityGroup" type:"list"` - - // The AWS account ID of the cache security group owner. - OwnerId *string `type:"string"` -} - -// String returns the string representation -func (s CacheSecurityGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CacheSecurityGroup) GoString() string { - return s.String() -} - -// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. -func (s *CacheSecurityGroup) SetCacheSecurityGroupName(v string) *CacheSecurityGroup { - s.CacheSecurityGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CacheSecurityGroup) SetDescription(v string) *CacheSecurityGroup { - s.Description = &v - return s -} - -// SetEC2SecurityGroups sets the EC2SecurityGroups field's value. -func (s *CacheSecurityGroup) SetEC2SecurityGroups(v []*EC2SecurityGroup) *CacheSecurityGroup { - s.EC2SecurityGroups = v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *CacheSecurityGroup) SetOwnerId(v string) *CacheSecurityGroup { - s.OwnerId = &v - return s -} - -// Represents a cluster's status within a particular cache security group. -type CacheSecurityGroupMembership struct { - _ struct{} `type:"structure"` - - // The name of the cache security group. - CacheSecurityGroupName *string `type:"string"` - - // The membership status in the cache security group. The status changes when - // a cache security group is modified, or when the cache security groups assigned - // to a cluster are modified. - Status *string `type:"string"` -} - -// String returns the string representation -func (s CacheSecurityGroupMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CacheSecurityGroupMembership) GoString() string { - return s.String() -} - -// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. -func (s *CacheSecurityGroupMembership) SetCacheSecurityGroupName(v string) *CacheSecurityGroupMembership { - s.CacheSecurityGroupName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CacheSecurityGroupMembership) SetStatus(v string) *CacheSecurityGroupMembership { - s.Status = &v - return s -} - -// Represents the output of one of the following operations: -// -// * CreateCacheSubnetGroup -// -// * ModifyCacheSubnetGroup -type CacheSubnetGroup struct { - _ struct{} `type:"structure"` - - // The description of the cache subnet group. - CacheSubnetGroupDescription *string `type:"string"` - - // The name of the cache subnet group. - CacheSubnetGroupName *string `type:"string"` - - // A list of subnets associated with the cache subnet group. - Subnets []*Subnet `locationNameList:"Subnet" type:"list"` - - // The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet - // group. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s CacheSubnetGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CacheSubnetGroup) GoString() string { - return s.String() -} - -// SetCacheSubnetGroupDescription sets the CacheSubnetGroupDescription field's value. -func (s *CacheSubnetGroup) SetCacheSubnetGroupDescription(v string) *CacheSubnetGroup { - s.CacheSubnetGroupDescription = &v - return s -} - -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *CacheSubnetGroup) SetCacheSubnetGroupName(v string) *CacheSubnetGroup { - s.CacheSubnetGroupName = &v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *CacheSubnetGroup) SetSubnets(v []*Subnet) *CacheSubnetGroup { - s.Subnets = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CacheSubnetGroup) SetVpcId(v string) *CacheSubnetGroup { - s.VpcId = &v - return s -} - -// Node group (shard) configuration options when adding or removing replicas. -// Each node group (shard) configuration has the following members: NodeGroupId, -// NewReplicaCount, and PreferredAvailabilityZones. -type ConfigureShard struct { - _ struct{} `type:"structure"` - - // The number of replicas you want in this node group at the end of this operation. - // The maximum value for NewReplicaCount is 5. The minimum value depends upon - // the type of Redis replication group you are working with. - // - // The minimum number of replicas in a shard or replication group is: - // - // * Redis (cluster mode disabled) - // - // If Multi-AZ with Automatic Failover is enabled: 1 - // - // If Multi-AZ with Automatic Failover is not enable: 0 - // - // * Redis (cluster mode enabled): 0 (though you will not be able to failover - // to a replica if your primary node fails) - // - // NewReplicaCount is a required field - NewReplicaCount *int64 `type:"integer" required:"true"` - - // The 4-digit id for the node group you are configuring. For Redis (cluster - // mode disabled) replication groups, the node group id is always 0001. To find - // a Redis (cluster mode enabled)'s node group's (shard's) id, see Finding a - // Shard's Id (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/shard-find-id.html). - // - // NodeGroupId is a required field - NodeGroupId *string `min:"1" type:"string" required:"true"` - - // A list of PreferredAvailabilityZone strings that specify which availability - // zones the replication group's nodes are to be in. The nummber of PreferredAvailabilityZone - // values must equal the value of NewReplicaCount plus 1 to account for the - // primary node. If this member of ReplicaConfiguration is omitted, ElastiCache - // for Redis selects the availability zone for each of the replicas. - PreferredAvailabilityZones []*string `locationNameList:"PreferredAvailabilityZone" type:"list"` -} - -// String returns the string representation -func (s ConfigureShard) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigureShard) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfigureShard) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfigureShard"} - if s.NewReplicaCount == nil { - invalidParams.Add(request.NewErrParamRequired("NewReplicaCount")) - } - if s.NodeGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("NodeGroupId")) - } - if s.NodeGroupId != nil && len(*s.NodeGroupId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NodeGroupId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNewReplicaCount sets the NewReplicaCount field's value. -func (s *ConfigureShard) SetNewReplicaCount(v int64) *ConfigureShard { - s.NewReplicaCount = &v - return s -} - -// SetNodeGroupId sets the NodeGroupId field's value. -func (s *ConfigureShard) SetNodeGroupId(v string) *ConfigureShard { - s.NodeGroupId = &v - return s -} - -// SetPreferredAvailabilityZones sets the PreferredAvailabilityZones field's value. -func (s *ConfigureShard) SetPreferredAvailabilityZones(v []*string) *ConfigureShard { - s.PreferredAvailabilityZones = v - return s -} - -// Represents the input of a CopySnapshotMessage operation. -type CopySnapshotInput struct { - _ struct{} `type:"structure"` - - // The name of an existing snapshot from which to make a copy. - // - // SourceSnapshotName is a required field - SourceSnapshotName *string `type:"string" required:"true"` - - // The Amazon S3 bucket to which the snapshot is exported. This parameter is - // used only when exporting a snapshot for external access. - // - // When using this parameter to export a snapshot, be sure Amazon ElastiCache - // has the needed permissions to this S3 bucket. For more information, see Step - // 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) - // in the Amazon ElastiCache User Guide. - // - // For more information, see Exporting a Snapshot (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html) - // in the Amazon ElastiCache User Guide. - TargetBucket *string `type:"string"` - - // A name for the snapshot copy. ElastiCache does not permit overwriting a snapshot, - // therefore this name must be unique within its context - ElastiCache or an - // Amazon S3 bucket if exporting. - // - // TargetSnapshotName is a required field - TargetSnapshotName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopySnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopySnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopySnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopySnapshotInput"} - if s.SourceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("SourceSnapshotName")) - } - if s.TargetSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("TargetSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceSnapshotName sets the SourceSnapshotName field's value. -func (s *CopySnapshotInput) SetSourceSnapshotName(v string) *CopySnapshotInput { - s.SourceSnapshotName = &v - return s -} - -// SetTargetBucket sets the TargetBucket field's value. -func (s *CopySnapshotInput) SetTargetBucket(v string) *CopySnapshotInput { - s.TargetBucket = &v - return s -} - -// SetTargetSnapshotName sets the TargetSnapshotName field's value. -func (s *CopySnapshotInput) SetTargetSnapshotName(v string) *CopySnapshotInput { - s.TargetSnapshotName = &v - return s -} - -type CopySnapshotOutput struct { - _ struct{} `type:"structure"` - - // Represents a copy of an entire Redis cluster as of the time when the snapshot - // was taken. - Snapshot *Snapshot `type:"structure"` -} - -// String returns the string representation -func (s CopySnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopySnapshotOutput) GoString() string { - return s.String() -} - -// SetSnapshot sets the Snapshot field's value. -func (s *CopySnapshotOutput) SetSnapshot(v *Snapshot) *CopySnapshotOutput { - s.Snapshot = v - return s -} - -// Represents the input of a CreateCacheCluster operation. -type CreateCacheClusterInput struct { - _ struct{} `type:"structure"` - - // Specifies whether the nodes in this Memcached cluster are created in a single - // Availability Zone or created across multiple Availability Zones in the cluster's - // region. - // - // This parameter is only supported for Memcached clusters. - // - // If the AZMode and PreferredAvailabilityZones are not specified, ElastiCache - // assumes single-az mode. - AZMode *string `type:"string" enum:"AZMode"` - - // Reserved parameter. The password used to access a password protected server. - // - // Password constraints: - // - // * Must be only printable ASCII characters. - // - // * Must be at least 16 characters and no more than 128 characters in length. - // - // * Cannot contain any of the following characters: '/', '"', or '@'. - // - // For more information, see AUTH password (http://redis.io/commands/AUTH) at - // http://redis.io/commands/AUTH. - AuthToken *string `type:"string"` - - // This parameter is currently disabled. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The node group (shard) identifier. This parameter is stored as a lowercase - // string. - // - // Constraints: - // - // * A name must contain from 1 to 20 alphanumeric characters or hyphens. - // - // * The first character must be a letter. - // - // * A name cannot end with a hyphen or contain two consecutive hyphens. - // - // CacheClusterId is a required field - CacheClusterId *string `type:"string" required:"true"` - - // The compute and memory capacity of the nodes in the node group (shard). - // - // The following node types are supported by ElastiCache. Generally speaking, - // the current generation types provide more memory and computational power - // at lower cost when compared to their equivalent previous generation counterparts. - // - // * General purpose: - // - // Current generation: - // - // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium - // - // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - // - // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge - // - // Previous generation: (not recommended) - // - // T1 node types:cache.t1.micro - // - // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge - // - // * Compute optimized: - // - // Previous generation: (not recommended) - // - // C1 node types:cache.c1.xlarge - // - // * Memory optimized: - // - // Current generation: - // - // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, - // cache.r3.8xlarge - // - // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, - // cache.r4.8xlarge, cache.r4.16xlarge - // - // Previous generation: (not recommended) - // - // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge - // - // Notes: - // - // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon - // VPC). - // - // * Redis (cluster mode disabled): Redis backup/restore is not supported - // on T1 and T2 instances. - // - // * Redis (cluster mode enabled): Backup/restore is not supported on T1 - // instances. - // - // * Redis Append-only files (AOF) functionality is not supported for T1 - // or T2 instances. - // - // For a complete listing of node types and specifications, see: - // - // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) - // - // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // - // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) - CacheNodeType *string `type:"string"` - - // The name of the parameter group to associate with this cluster. If this argument - // is omitted, the default parameter group for the specified engine is used. - // You cannot use any parameter group which has cluster-enabled='yes' when creating - // a cluster. - CacheParameterGroupName *string `type:"string"` - - // A list of security group names to associate with this cluster. - // - // Use this parameter only when you are creating a cluster outside of an Amazon - // Virtual Private Cloud (Amazon VPC). - CacheSecurityGroupNames []*string `locationNameList:"CacheSecurityGroupName" type:"list"` - - // The name of the subnet group to be used for the cluster. - // - // Use this parameter only when you are creating a cluster in an Amazon Virtual - // Private Cloud (Amazon VPC). - // - // If you're going to launch your cluster in an Amazon VPC, you need to create - // a subnet group before you start creating a cluster. For more information, - // see Subnets and Subnet Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). - CacheSubnetGroupName *string `type:"string"` - - // The name of the cache engine to be used for this cluster. - // - // Valid values for this parameter are: memcached | redis - Engine *string `type:"string"` - - // The version number of the cache engine to be used for this cluster. To view - // the supported cache engine versions, use the DescribeCacheEngineVersions - // operation. - // - // Important: You can upgrade to a newer engine version (see Selecting a Cache - // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)), - // but you cannot downgrade to an earlier engine version. If you want to use - // an earlier engine version, you must delete the existing cluster or replication - // group and create it anew with the earlier engine version. - EngineVersion *string `type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service - // (SNS) topic to which notifications are sent. - // - // The Amazon SNS topic owner must be the same as the cluster owner. - NotificationTopicArn *string `type:"string"` - - // The initial number of cache nodes that the cluster has. - // - // For clusters running Redis, this value must be 1. For clusters running Memcached, - // this value must be between 1 and 20. - // - // If you need more than 20 nodes for your Memcached cluster, please fill out - // the ElastiCache Limit Increase Request form at http://aws.amazon.com/contact-us/elasticache-node-limit-request/ - // (http://aws.amazon.com/contact-us/elasticache-node-limit-request/). - NumCacheNodes *int64 `type:"integer"` - - // The port number on which each of the cache nodes accepts connections. - Port *int64 `type:"integer"` - - // The EC2 Availability Zone in which the cluster is created. - // - // All nodes belonging to this Memcached cluster are placed in the preferred - // Availability Zone. If you want to create your nodes across multiple Availability - // Zones, use PreferredAvailabilityZones. - // - // Default: System chosen Availability Zone. - PreferredAvailabilityZone *string `type:"string"` - - // A list of the Availability Zones in which cache nodes are created. The order - // of the zones in the list is not important. - // - // This option is only supported on Memcached. - // - // If you are creating your cluster in an Amazon VPC (recommended) you can only - // locate nodes in Availability Zones that are associated with the subnets in - // the selected subnet group. - // - // The number of Availability Zones listed must equal the value of NumCacheNodes. - // - // If you want all the nodes in the same Availability Zone, use PreferredAvailabilityZone - // instead, or repeat the Availability Zone multiple times in the list. - // - // Default: System chosen Availability Zones. - PreferredAvailabilityZones []*string `locationNameList:"PreferredAvailabilityZone" type:"list"` - - // Specifies the weekly time range during which maintenance on the cluster is - // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi - // (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid - // values for ddd are: - // - // Specifies the weekly time range during which maintenance on the cluster is - // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi - // (24H Clock UTC). The minimum maintenance window is a 60 minute period. - // - // Valid values for ddd are: - // - // * sun - // - // * mon - // - // * tue - // - // * wed - // - // * thu - // - // * fri - // - // * sat - // - // Example: sun:23:00-mon:01:30 - PreferredMaintenanceWindow *string `type:"string"` - - // The ID of the replication group to which this cluster should belong. If this - // parameter is specified, the cluster is added to the specified replication - // group as a read replica; otherwise, the cluster is a standalone primary that - // is not part of any replication group. - // - // If the specified replication group is Multi-AZ enabled and the Availability - // Zone is not specified, the cluster is created in Availability Zones that - // provide the best spread of read replicas across Availability Zones. - // - // This parameter is only valid if the Engine parameter is redis. - ReplicationGroupId *string `type:"string"` - - // One or more VPC security groups associated with the cluster. - // - // Use this parameter only when you are creating a cluster in an Amazon Virtual - // Private Cloud (Amazon VPC). - SecurityGroupIds []*string `locationNameList:"SecurityGroupId" type:"list"` - - // A single-element string list containing an Amazon Resource Name (ARN) that - // uniquely identifies a Redis RDB snapshot file stored in Amazon S3. The snapshot - // file is used to populate the node group (shard). The Amazon S3 object name - // in the ARN cannot contain any commas. - // - // This parameter is only valid if the Engine parameter is redis. - // - // Example of an Amazon S3 ARN: arn:aws:s3:::my_bucket/snapshot1.rdb - SnapshotArns []*string `locationNameList:"SnapshotArn" type:"list"` - - // The name of a Redis snapshot from which to restore data into the new node - // group (shard). The snapshot status changes to restoring while the new node - // group (shard) is being created. - // - // This parameter is only valid if the Engine parameter is redis. - SnapshotName *string `type:"string"` - - // The number of days for which ElastiCache retains automatic snapshots before - // deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot - // taken today is retained for 5 days before being deleted. - // - // This parameter is only valid if the Engine parameter is redis. - // - // Default: 0 (i.e., automatic backups are disabled for this cache cluster). - SnapshotRetentionLimit *int64 `type:"integer"` - - // The daily time range (in UTC) during which ElastiCache begins taking a daily - // snapshot of your node group (shard). - // - // Example: 05:00-09:00 - // - // If you do not specify this parameter, ElastiCache automatically chooses an - // appropriate time range. - // - // This parameter is only valid if the Engine parameter is redis. - SnapshotWindow *string `type:"string"` - - // A list of cost allocation tags to be added to this resource. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateCacheClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCacheClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCacheClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCacheClusterInput"} - if s.CacheClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("CacheClusterId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAZMode sets the AZMode field's value. -func (s *CreateCacheClusterInput) SetAZMode(v string) *CreateCacheClusterInput { - s.AZMode = &v - return s -} - -// SetAuthToken sets the AuthToken field's value. -func (s *CreateCacheClusterInput) SetAuthToken(v string) *CreateCacheClusterInput { - s.AuthToken = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *CreateCacheClusterInput) SetAutoMinorVersionUpgrade(v bool) *CreateCacheClusterInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *CreateCacheClusterInput) SetCacheClusterId(v string) *CreateCacheClusterInput { - s.CacheClusterId = &v - return s -} - -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *CreateCacheClusterInput) SetCacheNodeType(v string) *CreateCacheClusterInput { - s.CacheNodeType = &v - return s -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *CreateCacheClusterInput) SetCacheParameterGroupName(v string) *CreateCacheClusterInput { - s.CacheParameterGroupName = &v - return s -} - -// SetCacheSecurityGroupNames sets the CacheSecurityGroupNames field's value. -func (s *CreateCacheClusterInput) SetCacheSecurityGroupNames(v []*string) *CreateCacheClusterInput { - s.CacheSecurityGroupNames = v - return s -} - -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *CreateCacheClusterInput) SetCacheSubnetGroupName(v string) *CreateCacheClusterInput { - s.CacheSubnetGroupName = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *CreateCacheClusterInput) SetEngine(v string) *CreateCacheClusterInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *CreateCacheClusterInput) SetEngineVersion(v string) *CreateCacheClusterInput { - s.EngineVersion = &v - return s -} - -// SetNotificationTopicArn sets the NotificationTopicArn field's value. -func (s *CreateCacheClusterInput) SetNotificationTopicArn(v string) *CreateCacheClusterInput { - s.NotificationTopicArn = &v - return s -} - -// SetNumCacheNodes sets the NumCacheNodes field's value. -func (s *CreateCacheClusterInput) SetNumCacheNodes(v int64) *CreateCacheClusterInput { - s.NumCacheNodes = &v - return s -} - -// SetPort sets the Port field's value. -func (s *CreateCacheClusterInput) SetPort(v int64) *CreateCacheClusterInput { - s.Port = &v - return s -} - -// SetPreferredAvailabilityZone sets the PreferredAvailabilityZone field's value. -func (s *CreateCacheClusterInput) SetPreferredAvailabilityZone(v string) *CreateCacheClusterInput { - s.PreferredAvailabilityZone = &v - return s -} - -// SetPreferredAvailabilityZones sets the PreferredAvailabilityZones field's value. -func (s *CreateCacheClusterInput) SetPreferredAvailabilityZones(v []*string) *CreateCacheClusterInput { - s.PreferredAvailabilityZones = v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CreateCacheClusterInput) SetPreferredMaintenanceWindow(v string) *CreateCacheClusterInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *CreateCacheClusterInput) SetReplicationGroupId(v string) *CreateCacheClusterInput { - s.ReplicationGroupId = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *CreateCacheClusterInput) SetSecurityGroupIds(v []*string) *CreateCacheClusterInput { - s.SecurityGroupIds = v - return s -} - -// SetSnapshotArns sets the SnapshotArns field's value. -func (s *CreateCacheClusterInput) SetSnapshotArns(v []*string) *CreateCacheClusterInput { - s.SnapshotArns = v - return s -} - -// SetSnapshotName sets the SnapshotName field's value. -func (s *CreateCacheClusterInput) SetSnapshotName(v string) *CreateCacheClusterInput { - s.SnapshotName = &v - return s -} - -// SetSnapshotRetentionLimit sets the SnapshotRetentionLimit field's value. -func (s *CreateCacheClusterInput) SetSnapshotRetentionLimit(v int64) *CreateCacheClusterInput { - s.SnapshotRetentionLimit = &v - return s -} - -// SetSnapshotWindow sets the SnapshotWindow field's value. -func (s *CreateCacheClusterInput) SetSnapshotWindow(v string) *CreateCacheClusterInput { - s.SnapshotWindow = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateCacheClusterInput) SetTags(v []*Tag) *CreateCacheClusterInput { - s.Tags = v - return s -} - -type CreateCacheClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains all of the attributes of a specific cluster. - CacheCluster *CacheCluster `type:"structure"` -} - -// String returns the string representation -func (s CreateCacheClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCacheClusterOutput) GoString() string { - return s.String() -} - -// SetCacheCluster sets the CacheCluster field's value. -func (s *CreateCacheClusterOutput) SetCacheCluster(v *CacheCluster) *CreateCacheClusterOutput { - s.CacheCluster = v - return s -} - -// Represents the input of a CreateCacheParameterGroup operation. -type CreateCacheParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the cache parameter group family that the cache parameter group - // can be used with. - // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 - // - // CacheParameterGroupFamily is a required field - CacheParameterGroupFamily *string `type:"string" required:"true"` - - // A user-specified name for the cache parameter group. - // - // CacheParameterGroupName is a required field - CacheParameterGroupName *string `type:"string" required:"true"` - - // A user-specified description for the cache parameter group. - // - // Description is a required field - Description *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateCacheParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCacheParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCacheParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCacheParameterGroupInput"} - if s.CacheParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupFamily")) - } - if s.CacheParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) - } - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. -func (s *CreateCacheParameterGroupInput) SetCacheParameterGroupFamily(v string) *CreateCacheParameterGroupInput { - s.CacheParameterGroupFamily = &v - return s -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *CreateCacheParameterGroupInput) SetCacheParameterGroupName(v string) *CreateCacheParameterGroupInput { - s.CacheParameterGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateCacheParameterGroupInput) SetDescription(v string) *CreateCacheParameterGroupInput { - s.Description = &v - return s -} - -type CreateCacheParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // Represents the output of a CreateCacheParameterGroup operation. - CacheParameterGroup *CacheParameterGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateCacheParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCacheParameterGroupOutput) GoString() string { - return s.String() -} - -// SetCacheParameterGroup sets the CacheParameterGroup field's value. -func (s *CreateCacheParameterGroupOutput) SetCacheParameterGroup(v *CacheParameterGroup) *CreateCacheParameterGroupOutput { - s.CacheParameterGroup = v - return s -} - -// Represents the input of a CreateCacheSecurityGroup operation. -type CreateCacheSecurityGroupInput struct { - _ struct{} `type:"structure"` - - // A name for the cache security group. This value is stored as a lowercase - // string. - // - // Constraints: Must contain no more than 255 alphanumeric characters. Cannot - // be the word "Default". - // - // Example: mysecuritygroup - // - // CacheSecurityGroupName is a required field - CacheSecurityGroupName *string `type:"string" required:"true"` - - // A description for the cache security group. - // - // Description is a required field - Description *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateCacheSecurityGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCacheSecurityGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCacheSecurityGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCacheSecurityGroupInput"} - if s.CacheSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheSecurityGroupName")) - } - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. -func (s *CreateCacheSecurityGroupInput) SetCacheSecurityGroupName(v string) *CreateCacheSecurityGroupInput { - s.CacheSecurityGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateCacheSecurityGroupInput) SetDescription(v string) *CreateCacheSecurityGroupInput { - s.Description = &v - return s -} - -type CreateCacheSecurityGroupOutput struct { - _ struct{} `type:"structure"` - - // Represents the output of one of the following operations: - // - // * AuthorizeCacheSecurityGroupIngress - // - // * CreateCacheSecurityGroup - // - // * RevokeCacheSecurityGroupIngress - CacheSecurityGroup *CacheSecurityGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateCacheSecurityGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCacheSecurityGroupOutput) GoString() string { - return s.String() -} - -// SetCacheSecurityGroup sets the CacheSecurityGroup field's value. -func (s *CreateCacheSecurityGroupOutput) SetCacheSecurityGroup(v *CacheSecurityGroup) *CreateCacheSecurityGroupOutput { - s.CacheSecurityGroup = v - return s -} - -// Represents the input of a CreateCacheSubnetGroup operation. -type CreateCacheSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // A description for the cache subnet group. - // - // CacheSubnetGroupDescription is a required field - CacheSubnetGroupDescription *string `type:"string" required:"true"` - - // A name for the cache subnet group. This value is stored as a lowercase string. - // - // Constraints: Must contain no more than 255 alphanumeric characters or hyphens. - // - // Example: mysubnetgroup - // - // CacheSubnetGroupName is a required field - CacheSubnetGroupName *string `type:"string" required:"true"` - - // A list of VPC subnet IDs for the cache subnet group. - // - // SubnetIds is a required field - SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateCacheSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCacheSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCacheSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCacheSubnetGroupInput"} - if s.CacheSubnetGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("CacheSubnetGroupDescription")) - } - if s.CacheSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheSubnetGroupName")) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheSubnetGroupDescription sets the CacheSubnetGroupDescription field's value. -func (s *CreateCacheSubnetGroupInput) SetCacheSubnetGroupDescription(v string) *CreateCacheSubnetGroupInput { - s.CacheSubnetGroupDescription = &v - return s -} - -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *CreateCacheSubnetGroupInput) SetCacheSubnetGroupName(v string) *CreateCacheSubnetGroupInput { - s.CacheSubnetGroupName = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateCacheSubnetGroupInput) SetSubnetIds(v []*string) *CreateCacheSubnetGroupInput { - s.SubnetIds = v - return s -} - -type CreateCacheSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // Represents the output of one of the following operations: - // - // * CreateCacheSubnetGroup - // - // * ModifyCacheSubnetGroup - CacheSubnetGroup *CacheSubnetGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateCacheSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCacheSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetCacheSubnetGroup sets the CacheSubnetGroup field's value. -func (s *CreateCacheSubnetGroupOutput) SetCacheSubnetGroup(v *CacheSubnetGroup) *CreateCacheSubnetGroupOutput { - s.CacheSubnetGroup = v - return s -} - -// Represents the input of a CreateReplicationGroup operation. -type CreateReplicationGroupInput struct { - _ struct{} `type:"structure"` - - // A flag that enables encryption at rest when set to true. - // - // You cannot modify the value of AtRestEncryptionEnabled after the replication - // group is created. To enable encryption at rest on a replication group you - // must set AtRestEncryptionEnabled to true when you create the replication - // group. - // - // Required: Only available when creating a replication group in an Amazon VPC - // using redis version 3.2.6 or 4.x. - // - // Default: false - AtRestEncryptionEnabled *bool `type:"boolean"` - - // Reserved parameter. The password used to access a password protected server. - // - // AuthToken can be specified only on replication groups where TransitEncryptionEnabled - // is true. - // - // For HIPAA compliance, you must specify TransitEncryptionEnabled as true, - // an AuthToken, and a CacheSubnetGroup. - // - // Password constraints: - // - // * Must be only printable ASCII characters. - // - // * Must be at least 16 characters and no more than 128 characters in length. - // - // * Cannot contain any of the following characters: '/', '"', or '@'. - // - // For more information, see AUTH password (http://redis.io/commands/AUTH) at - // http://redis.io/commands/AUTH. - AuthToken *string `type:"string"` - - // This parameter is currently disabled. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // Specifies whether a read-only replica is automatically promoted to read/write - // primary if the existing primary fails. - // - // If true, Multi-AZ is enabled for this replication group. If false, Multi-AZ - // is disabled for this replication group. - // - // AutomaticFailoverEnabled must be enabled for Redis (cluster mode enabled) - // replication groups. - // - // Default: false - // - // Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover - // on: - // - // * Redis versions earlier than 2.8.6. - // - // * Redis (cluster mode disabled): T1 and T2 cache node types. - // - // * Redis (cluster mode enabled): T1 node types. - AutomaticFailoverEnabled *bool `type:"boolean"` - - // The compute and memory capacity of the nodes in the node group (shard). - // - // The following node types are supported by ElastiCache. Generally speaking, - // the current generation types provide more memory and computational power - // at lower cost when compared to their equivalent previous generation counterparts. - // - // * General purpose: - // - // Current generation: - // - // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium - // - // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - // - // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge - // - // Previous generation: (not recommended) - // - // T1 node types:cache.t1.micro - // - // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge - // - // * Compute optimized: - // - // Previous generation: (not recommended) - // - // C1 node types:cache.c1.xlarge - // - // * Memory optimized: - // - // Current generation: - // - // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, - // cache.r3.8xlarge - // - // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, - // cache.r4.8xlarge, cache.r4.16xlarge - // - // Previous generation: (not recommended) - // - // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge - // - // Notes: - // - // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon - // VPC). - // - // * Redis (cluster mode disabled): Redis backup/restore is not supported - // on T1 and T2 instances. - // - // * Redis (cluster mode enabled): Backup/restore is not supported on T1 - // instances. - // - // * Redis Append-only files (AOF) functionality is not supported for T1 - // or T2 instances. - // - // For a complete listing of node types and specifications, see: - // - // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) - // - // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // - // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) - CacheNodeType *string `type:"string"` - - // The name of the parameter group to associate with this replication group. - // If this argument is omitted, the default cache parameter group for the specified - // engine is used. - // - // If you are running Redis version 3.2.4 or later, only one node group (shard), - // and want to use a default parameter group, we recommend that you specify - // the parameter group by name. - // - // * To create a Redis (cluster mode disabled) replication group, use CacheParameterGroupName=default.redis3.2. - // - // * To create a Redis (cluster mode enabled) replication group, use CacheParameterGroupName=default.redis3.2.cluster.on. - CacheParameterGroupName *string `type:"string"` - - // A list of cache security group names to associate with this replication group. - CacheSecurityGroupNames []*string `locationNameList:"CacheSecurityGroupName" type:"list"` - - // The name of the cache subnet group to be used for the replication group. - // - // If you're going to launch your cluster in an Amazon VPC, you need to create - // a subnet group before you start creating a cluster. For more information, - // see Subnets and Subnet Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). - CacheSubnetGroupName *string `type:"string"` - - // The name of the cache engine to be used for the clusters in this replication - // group. - Engine *string `type:"string"` - - // The version number of the cache engine to be used for the clusters in this - // replication group. To view the supported cache engine versions, use the DescribeCacheEngineVersions - // operation. - // - // Important: You can upgrade to a newer engine version (see Selecting a Cache - // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)) - // in the ElastiCache User Guide, but you cannot downgrade to an earlier engine - // version. If you want to use an earlier engine version, you must delete the - // existing cluster or replication group and create it anew with the earlier - // engine version. - EngineVersion *string `type:"string"` - - // A list of node group (shard) configuration options. Each node group (shard) - // configuration has the following members: PrimaryAvailabilityZone, ReplicaAvailabilityZones, - // ReplicaCount, and Slots. - // - // If you're creating a Redis (cluster mode disabled) or a Redis (cluster mode - // enabled) replication group, you can use this parameter to individually configure - // each node group (shard), or you can omit this parameter. However, when seeding - // a Redis (cluster mode enabled) cluster from a S3 rdb file, you must configure - // each node group (shard) using this parameter because you must specify the - // slots for each node group. - NodeGroupConfiguration []*NodeGroupConfiguration `locationNameList:"NodeGroupConfiguration" type:"list"` - - // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service - // (SNS) topic to which notifications are sent. - // - // The Amazon SNS topic owner must be the same as the cluster owner. - NotificationTopicArn *string `type:"string"` - - // The number of clusters this replication group initially has. - // - // This parameter is not used if there is more than one node group (shard). - // You should use ReplicasPerNodeGroup instead. - // - // If AutomaticFailoverEnabled is true, the value of this parameter must be - // at least 2. If AutomaticFailoverEnabled is false you can omit this parameter - // (it will default to 1), or you can explicitly set it to a value between 2 - // and 6. - // - // The maximum permitted value for NumCacheClusters is 6 (1 primary plus 5 replicas). - NumCacheClusters *int64 `type:"integer"` - - // An optional parameter that specifies the number of node groups (shards) for - // this Redis (cluster mode enabled) replication group. For Redis (cluster mode - // disabled) either omit this parameter or set it to 1. - // - // Default: 1 - NumNodeGroups *int64 `type:"integer"` - - // The port number on which each member of the replication group accepts connections. - Port *int64 `type:"integer"` - - // A list of EC2 Availability Zones in which the replication group's clusters - // are created. The order of the Availability Zones in the list is the order - // in which clusters are allocated. The primary cluster is created in the first - // AZ in the list. - // - // This parameter is not used if there is more than one node group (shard). - // You should use NodeGroupConfiguration instead. - // - // If you are creating your replication group in an Amazon VPC (recommended), - // you can only locate clusters in Availability Zones associated with the subnets - // in the selected subnet group. - // - // The number of Availability Zones listed must equal the value of NumCacheClusters. - // - // Default: system chosen Availability Zones. - PreferredCacheClusterAZs []*string `locationNameList:"AvailabilityZone" type:"list"` - - // Specifies the weekly time range during which maintenance on the cluster is - // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi - // (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid - // values for ddd are: - // - // Specifies the weekly time range during which maintenance on the cluster is - // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi - // (24H Clock UTC). The minimum maintenance window is a 60 minute period. - // - // Valid values for ddd are: - // - // * sun - // - // * mon - // - // * tue - // - // * wed - // - // * thu - // - // * fri - // - // * sat - // - // Example: sun:23:00-mon:01:30 - PreferredMaintenanceWindow *string `type:"string"` - - // The identifier of the cluster that serves as the primary for this replication - // group. This cluster must already exist and have a status of available. - // - // This parameter is not required if NumCacheClusters, NumNodeGroups, or ReplicasPerNodeGroup - // is specified. - PrimaryClusterId *string `type:"string"` - - // An optional parameter that specifies the number of replica nodes in each - // node group (shard). Valid values are 0 to 5. - ReplicasPerNodeGroup *int64 `type:"integer"` - - // A user-created description for the replication group. - // - // ReplicationGroupDescription is a required field - ReplicationGroupDescription *string `type:"string" required:"true"` - - // The replication group identifier. This parameter is stored as a lowercase - // string. - // - // Constraints: - // - // * A name must contain from 1 to 20 alphanumeric characters or hyphens. - // - // * The first character must be a letter. - // - // * A name cannot end with a hyphen or contain two consecutive hyphens. - // - // ReplicationGroupId is a required field - ReplicationGroupId *string `type:"string" required:"true"` - - // One or more Amazon VPC security groups associated with this replication group. - // - // Use this parameter only when you are creating a replication group in an Amazon - // Virtual Private Cloud (Amazon VPC). - SecurityGroupIds []*string `locationNameList:"SecurityGroupId" type:"list"` - - // A list of Amazon Resource Names (ARN) that uniquely identify the Redis RDB - // snapshot files stored in Amazon S3. The snapshot files are used to populate - // the new replication group. The Amazon S3 object name in the ARN cannot contain - // any commas. The new replication group will have the number of node groups - // (console: shards) specified by the parameter NumNodeGroups or the number - // of node groups configured by NodeGroupConfiguration regardless of the number - // of ARNs specified here. - // - // Example of an Amazon S3 ARN: arn:aws:s3:::my_bucket/snapshot1.rdb - SnapshotArns []*string `locationNameList:"SnapshotArn" type:"list"` - - // The name of a snapshot from which to restore data into the new replication - // group. The snapshot status changes to restoring while the new replication - // group is being created. - SnapshotName *string `type:"string"` - - // The number of days for which ElastiCache retains automatic snapshots before - // deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot - // that was taken today is retained for 5 days before being deleted. - // - // Default: 0 (i.e., automatic backups are disabled for this cluster). - SnapshotRetentionLimit *int64 `type:"integer"` - - // The daily time range (in UTC) during which ElastiCache begins taking a daily - // snapshot of your node group (shard). - // - // Example: 05:00-09:00 - // - // If you do not specify this parameter, ElastiCache automatically chooses an - // appropriate time range. - SnapshotWindow *string `type:"string"` - - // A list of cost allocation tags to be added to this resource. A tag is a key-value - // pair. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A flag that enables in-transit encryption when set to true. - // - // You cannot modify the value of TransitEncryptionEnabled after the cluster - // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled - // to true when you create a cluster. - // - // This parameter is valid only if the Engine parameter is redis, the EngineVersion - // parameter is 3.2.6 or 4.x, and the cluster is being created in an Amazon - // VPC. - // - // If you enable in-transit encryption, you must also specify a value for CacheSubnetGroup. - // - // Required: Only available when creating a replication group in an Amazon VPC - // using redis version 3.2.6 or 4.x. - // - // Default: false - // - // For HIPAA compliance, you must specify TransitEncryptionEnabled as true, - // an AuthToken, and a CacheSubnetGroup. - TransitEncryptionEnabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s CreateReplicationGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReplicationGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateReplicationGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateReplicationGroupInput"} - if s.ReplicationGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationGroupDescription")) - } - if s.ReplicationGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) - } - if s.NodeGroupConfiguration != nil { - for i, v := range s.NodeGroupConfiguration { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NodeGroupConfiguration", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAtRestEncryptionEnabled sets the AtRestEncryptionEnabled field's value. -func (s *CreateReplicationGroupInput) SetAtRestEncryptionEnabled(v bool) *CreateReplicationGroupInput { - s.AtRestEncryptionEnabled = &v - return s -} - -// SetAuthToken sets the AuthToken field's value. -func (s *CreateReplicationGroupInput) SetAuthToken(v string) *CreateReplicationGroupInput { - s.AuthToken = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *CreateReplicationGroupInput) SetAutoMinorVersionUpgrade(v bool) *CreateReplicationGroupInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAutomaticFailoverEnabled sets the AutomaticFailoverEnabled field's value. -func (s *CreateReplicationGroupInput) SetAutomaticFailoverEnabled(v bool) *CreateReplicationGroupInput { - s.AutomaticFailoverEnabled = &v - return s -} - -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *CreateReplicationGroupInput) SetCacheNodeType(v string) *CreateReplicationGroupInput { - s.CacheNodeType = &v - return s -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *CreateReplicationGroupInput) SetCacheParameterGroupName(v string) *CreateReplicationGroupInput { - s.CacheParameterGroupName = &v - return s -} - -// SetCacheSecurityGroupNames sets the CacheSecurityGroupNames field's value. -func (s *CreateReplicationGroupInput) SetCacheSecurityGroupNames(v []*string) *CreateReplicationGroupInput { - s.CacheSecurityGroupNames = v - return s -} - -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *CreateReplicationGroupInput) SetCacheSubnetGroupName(v string) *CreateReplicationGroupInput { - s.CacheSubnetGroupName = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *CreateReplicationGroupInput) SetEngine(v string) *CreateReplicationGroupInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *CreateReplicationGroupInput) SetEngineVersion(v string) *CreateReplicationGroupInput { - s.EngineVersion = &v - return s -} - -// SetNodeGroupConfiguration sets the NodeGroupConfiguration field's value. -func (s *CreateReplicationGroupInput) SetNodeGroupConfiguration(v []*NodeGroupConfiguration) *CreateReplicationGroupInput { - s.NodeGroupConfiguration = v - return s -} - -// SetNotificationTopicArn sets the NotificationTopicArn field's value. -func (s *CreateReplicationGroupInput) SetNotificationTopicArn(v string) *CreateReplicationGroupInput { - s.NotificationTopicArn = &v - return s -} - -// SetNumCacheClusters sets the NumCacheClusters field's value. -func (s *CreateReplicationGroupInput) SetNumCacheClusters(v int64) *CreateReplicationGroupInput { - s.NumCacheClusters = &v - return s -} - -// SetNumNodeGroups sets the NumNodeGroups field's value. -func (s *CreateReplicationGroupInput) SetNumNodeGroups(v int64) *CreateReplicationGroupInput { - s.NumNodeGroups = &v - return s -} - -// SetPort sets the Port field's value. -func (s *CreateReplicationGroupInput) SetPort(v int64) *CreateReplicationGroupInput { - s.Port = &v - return s -} - -// SetPreferredCacheClusterAZs sets the PreferredCacheClusterAZs field's value. -func (s *CreateReplicationGroupInput) SetPreferredCacheClusterAZs(v []*string) *CreateReplicationGroupInput { - s.PreferredCacheClusterAZs = v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CreateReplicationGroupInput) SetPreferredMaintenanceWindow(v string) *CreateReplicationGroupInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPrimaryClusterId sets the PrimaryClusterId field's value. -func (s *CreateReplicationGroupInput) SetPrimaryClusterId(v string) *CreateReplicationGroupInput { - s.PrimaryClusterId = &v - return s -} - -// SetReplicasPerNodeGroup sets the ReplicasPerNodeGroup field's value. -func (s *CreateReplicationGroupInput) SetReplicasPerNodeGroup(v int64) *CreateReplicationGroupInput { - s.ReplicasPerNodeGroup = &v - return s -} - -// SetReplicationGroupDescription sets the ReplicationGroupDescription field's value. -func (s *CreateReplicationGroupInput) SetReplicationGroupDescription(v string) *CreateReplicationGroupInput { - s.ReplicationGroupDescription = &v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *CreateReplicationGroupInput) SetReplicationGroupId(v string) *CreateReplicationGroupInput { - s.ReplicationGroupId = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *CreateReplicationGroupInput) SetSecurityGroupIds(v []*string) *CreateReplicationGroupInput { - s.SecurityGroupIds = v - return s -} - -// SetSnapshotArns sets the SnapshotArns field's value. -func (s *CreateReplicationGroupInput) SetSnapshotArns(v []*string) *CreateReplicationGroupInput { - s.SnapshotArns = v - return s -} - -// SetSnapshotName sets the SnapshotName field's value. -func (s *CreateReplicationGroupInput) SetSnapshotName(v string) *CreateReplicationGroupInput { - s.SnapshotName = &v - return s -} - -// SetSnapshotRetentionLimit sets the SnapshotRetentionLimit field's value. -func (s *CreateReplicationGroupInput) SetSnapshotRetentionLimit(v int64) *CreateReplicationGroupInput { - s.SnapshotRetentionLimit = &v - return s -} - -// SetSnapshotWindow sets the SnapshotWindow field's value. -func (s *CreateReplicationGroupInput) SetSnapshotWindow(v string) *CreateReplicationGroupInput { - s.SnapshotWindow = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateReplicationGroupInput) SetTags(v []*Tag) *CreateReplicationGroupInput { - s.Tags = v - return s -} - -// SetTransitEncryptionEnabled sets the TransitEncryptionEnabled field's value. -func (s *CreateReplicationGroupInput) SetTransitEncryptionEnabled(v bool) *CreateReplicationGroupInput { - s.TransitEncryptionEnabled = &v - return s -} - -type CreateReplicationGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains all of the attributes of a specific Redis replication group. - ReplicationGroup *ReplicationGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateReplicationGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReplicationGroupOutput) GoString() string { - return s.String() -} - -// SetReplicationGroup sets the ReplicationGroup field's value. -func (s *CreateReplicationGroupOutput) SetReplicationGroup(v *ReplicationGroup) *CreateReplicationGroupOutput { - s.ReplicationGroup = v - return s -} - -// Represents the input of a CreateSnapshot operation. -type CreateSnapshotInput struct { - _ struct{} `type:"structure"` - - // The identifier of an existing cluster. The snapshot is created from this - // cluster. - CacheClusterId *string `type:"string"` - - // The identifier of an existing replication group. The snapshot is created - // from this replication group. - ReplicationGroupId *string `type:"string"` - - // A name for the snapshot being created. - // - // SnapshotName is a required field - SnapshotName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotInput"} - if s.SnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *CreateSnapshotInput) SetCacheClusterId(v string) *CreateSnapshotInput { - s.CacheClusterId = &v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *CreateSnapshotInput) SetReplicationGroupId(v string) *CreateSnapshotInput { - s.ReplicationGroupId = &v - return s -} - -// SetSnapshotName sets the SnapshotName field's value. -func (s *CreateSnapshotInput) SetSnapshotName(v string) *CreateSnapshotInput { - s.SnapshotName = &v - return s -} - -type CreateSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Represents a copy of an entire Redis cluster as of the time when the snapshot - // was taken. - Snapshot *Snapshot `type:"structure"` -} - -// String returns the string representation -func (s CreateSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSnapshotOutput) GoString() string { - return s.String() -} - -// SetSnapshot sets the Snapshot field's value. -func (s *CreateSnapshotOutput) SetSnapshot(v *Snapshot) *CreateSnapshotOutput { - s.Snapshot = v - return s -} - -type DecreaseReplicaCountInput struct { - _ struct{} `type:"structure"` - - // If True, the number of replica nodes is decreased immediately. If False, - // the number of replica nodes is decreased during the next maintenance window. - // - // ApplyImmediately is a required field - ApplyImmediately *bool `type:"boolean" required:"true"` - - // The number of read replica nodes you want at the completion of this operation. - // For Redis (cluster mode disabled) replication groups, this is the number - // of replica nodes in the replication group. For Redis (cluster mode enabled) - // replication groups, this is the number of replica nodes in each of the replication - // group's node groups. - // - // The minimum number of replicas in a shard or replication group is: - // - // * Redis (cluster mode disabled) - // - // If Multi-AZ with Automatic Failover is enabled: 1 - // - // If Multi-AZ with Automatic Failover is not enabled: 0 - // - // * Redis (cluster mode enabled): 0 (though you will not be able to failover - // to a replica if your primary node fails) - NewReplicaCount *int64 `type:"integer"` - - // A list of ConfigureShard objects that can be used to configure each shard - // in a Redis (cluster mode enabled) replication group. The ConfigureShard has - // three members: NewReplicaCount, NodeGroupId, and PreferredAvailabilityZones. - ReplicaConfiguration []*ConfigureShard `locationNameList:"ConfigureShard" type:"list"` - - // A list of the node ids to remove from the replication group or node group - // (shard). - ReplicasToRemove []*string `type:"list"` - - // The id of the replication group from which you want to remove replica nodes. - // - // ReplicationGroupId is a required field - ReplicationGroupId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DecreaseReplicaCountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DecreaseReplicaCountInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DecreaseReplicaCountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DecreaseReplicaCountInput"} - if s.ApplyImmediately == nil { - invalidParams.Add(request.NewErrParamRequired("ApplyImmediately")) - } - if s.ReplicationGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) - } - if s.ReplicaConfiguration != nil { - for i, v := range s.ReplicaConfiguration { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaConfiguration", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *DecreaseReplicaCountInput) SetApplyImmediately(v bool) *DecreaseReplicaCountInput { - s.ApplyImmediately = &v - return s -} - -// SetNewReplicaCount sets the NewReplicaCount field's value. -func (s *DecreaseReplicaCountInput) SetNewReplicaCount(v int64) *DecreaseReplicaCountInput { - s.NewReplicaCount = &v - return s -} - -// SetReplicaConfiguration sets the ReplicaConfiguration field's value. -func (s *DecreaseReplicaCountInput) SetReplicaConfiguration(v []*ConfigureShard) *DecreaseReplicaCountInput { - s.ReplicaConfiguration = v - return s -} - -// SetReplicasToRemove sets the ReplicasToRemove field's value. -func (s *DecreaseReplicaCountInput) SetReplicasToRemove(v []*string) *DecreaseReplicaCountInput { - s.ReplicasToRemove = v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *DecreaseReplicaCountInput) SetReplicationGroupId(v string) *DecreaseReplicaCountInput { - s.ReplicationGroupId = &v - return s -} - -type DecreaseReplicaCountOutput struct { - _ struct{} `type:"structure"` - - // Contains all of the attributes of a specific Redis replication group. - ReplicationGroup *ReplicationGroup `type:"structure"` -} - -// String returns the string representation -func (s DecreaseReplicaCountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DecreaseReplicaCountOutput) GoString() string { - return s.String() -} - -// SetReplicationGroup sets the ReplicationGroup field's value. -func (s *DecreaseReplicaCountOutput) SetReplicationGroup(v *ReplicationGroup) *DecreaseReplicaCountOutput { - s.ReplicationGroup = v - return s -} - -// Represents the input of a DeleteCacheCluster operation. -type DeleteCacheClusterInput struct { - _ struct{} `type:"structure"` - - // The cluster identifier for the cluster to be deleted. This parameter is not - // case sensitive. - // - // CacheClusterId is a required field - CacheClusterId *string `type:"string" required:"true"` - - // The user-supplied name of a final cluster snapshot. This is the unique name - // that identifies the snapshot. ElastiCache creates the snapshot, and then - // deletes the cluster immediately afterward. - FinalSnapshotIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s DeleteCacheClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCacheClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCacheClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCacheClusterInput"} - if s.CacheClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("CacheClusterId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *DeleteCacheClusterInput) SetCacheClusterId(v string) *DeleteCacheClusterInput { - s.CacheClusterId = &v - return s -} - -// SetFinalSnapshotIdentifier sets the FinalSnapshotIdentifier field's value. -func (s *DeleteCacheClusterInput) SetFinalSnapshotIdentifier(v string) *DeleteCacheClusterInput { - s.FinalSnapshotIdentifier = &v - return s -} - -type DeleteCacheClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains all of the attributes of a specific cluster. - CacheCluster *CacheCluster `type:"structure"` -} - -// String returns the string representation -func (s DeleteCacheClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCacheClusterOutput) GoString() string { - return s.String() -} - -// SetCacheCluster sets the CacheCluster field's value. -func (s *DeleteCacheClusterOutput) SetCacheCluster(v *CacheCluster) *DeleteCacheClusterOutput { - s.CacheCluster = v - return s -} - -// Represents the input of a DeleteCacheParameterGroup operation. -type DeleteCacheParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the cache parameter group to delete. - // - // The specified cache security group must not be associated with any clusters. - // - // CacheParameterGroupName is a required field - CacheParameterGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteCacheParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCacheParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCacheParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCacheParameterGroupInput"} - if s.CacheParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *DeleteCacheParameterGroupInput) SetCacheParameterGroupName(v string) *DeleteCacheParameterGroupInput { - s.CacheParameterGroupName = &v - return s -} - -type DeleteCacheParameterGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCacheParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCacheParameterGroupOutput) GoString() string { - return s.String() -} - -// Represents the input of a DeleteCacheSecurityGroup operation. -type DeleteCacheSecurityGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the cache security group to delete. - // - // You cannot delete the default security group. - // - // CacheSecurityGroupName is a required field - CacheSecurityGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteCacheSecurityGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCacheSecurityGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCacheSecurityGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCacheSecurityGroupInput"} - if s.CacheSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheSecurityGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. -func (s *DeleteCacheSecurityGroupInput) SetCacheSecurityGroupName(v string) *DeleteCacheSecurityGroupInput { - s.CacheSecurityGroupName = &v - return s -} - -type DeleteCacheSecurityGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCacheSecurityGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCacheSecurityGroupOutput) GoString() string { - return s.String() -} - -// Represents the input of a DeleteCacheSubnetGroup operation. -type DeleteCacheSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the cache subnet group to delete. - // - // Constraints: Must contain no more than 255 alphanumeric characters or hyphens. - // - // CacheSubnetGroupName is a required field - CacheSubnetGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteCacheSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCacheSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCacheSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCacheSubnetGroupInput"} - if s.CacheSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheSubnetGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *DeleteCacheSubnetGroupInput) SetCacheSubnetGroupName(v string) *DeleteCacheSubnetGroupInput { - s.CacheSubnetGroupName = &v - return s -} - -type DeleteCacheSubnetGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCacheSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCacheSubnetGroupOutput) GoString() string { - return s.String() -} - -// Represents the input of a DeleteReplicationGroup operation. -type DeleteReplicationGroupInput struct { - _ struct{} `type:"structure"` - - // The name of a final node group (shard) snapshot. ElastiCache creates the - // snapshot from the primary node in the cluster, rather than one of the replicas; - // this is to ensure that it captures the freshest data. After the final snapshot - // is taken, the replication group is immediately deleted. - FinalSnapshotIdentifier *string `type:"string"` - - // The identifier for the cluster to be deleted. This parameter is not case - // sensitive. - // - // ReplicationGroupId is a required field - ReplicationGroupId *string `type:"string" required:"true"` - - // If set to true, all of the read replicas are deleted, but the primary node - // is retained. - RetainPrimaryCluster *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeleteReplicationGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReplicationGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteReplicationGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteReplicationGroupInput"} - if s.ReplicationGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFinalSnapshotIdentifier sets the FinalSnapshotIdentifier field's value. -func (s *DeleteReplicationGroupInput) SetFinalSnapshotIdentifier(v string) *DeleteReplicationGroupInput { - s.FinalSnapshotIdentifier = &v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *DeleteReplicationGroupInput) SetReplicationGroupId(v string) *DeleteReplicationGroupInput { - s.ReplicationGroupId = &v - return s -} - -// SetRetainPrimaryCluster sets the RetainPrimaryCluster field's value. -func (s *DeleteReplicationGroupInput) SetRetainPrimaryCluster(v bool) *DeleteReplicationGroupInput { - s.RetainPrimaryCluster = &v - return s -} - -type DeleteReplicationGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains all of the attributes of a specific Redis replication group. - ReplicationGroup *ReplicationGroup `type:"structure"` -} - -// String returns the string representation -func (s DeleteReplicationGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReplicationGroupOutput) GoString() string { - return s.String() -} - -// SetReplicationGroup sets the ReplicationGroup field's value. -func (s *DeleteReplicationGroupOutput) SetReplicationGroup(v *ReplicationGroup) *DeleteReplicationGroupOutput { - s.ReplicationGroup = v - return s -} - -// Represents the input of a DeleteSnapshot operation. -type DeleteSnapshotInput struct { - _ struct{} `type:"structure"` - - // The name of the snapshot to be deleted. - // - // SnapshotName is a required field - SnapshotName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotInput"} - if s.SnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSnapshotName sets the SnapshotName field's value. -func (s *DeleteSnapshotInput) SetSnapshotName(v string) *DeleteSnapshotInput { - s.SnapshotName = &v - return s -} - -type DeleteSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Represents a copy of an entire Redis cluster as of the time when the snapshot - // was taken. - Snapshot *Snapshot `type:"structure"` -} - -// String returns the string representation -func (s DeleteSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSnapshotOutput) GoString() string { - return s.String() -} - -// SetSnapshot sets the Snapshot field's value. -func (s *DeleteSnapshotOutput) SetSnapshot(v *Snapshot) *DeleteSnapshotOutput { - s.Snapshot = v - return s -} - -// Represents the input of a DescribeCacheClusters operation. -type DescribeCacheClustersInput struct { - _ struct{} `type:"structure"` - - // The user-supplied cluster identifier. If this parameter is specified, only - // information about that specific cluster is returned. This parameter isn't - // case sensitive. - CacheClusterId *string `type:"string"` - - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - MaxRecords *int64 `type:"integer"` - - // An optional flag that can be included in the DescribeCacheCluster request - // to show only nodes (API/CLI: clusters) that are not members of a replication - // group. In practice, this mean Memcached and single node Redis clusters. - ShowCacheClustersNotInReplicationGroups *bool `type:"boolean"` - - // An optional flag that can be included in the DescribeCacheCluster request - // to retrieve information about the individual cache nodes. - ShowCacheNodeInfo *bool `type:"boolean"` -} - -// String returns the string representation -func (s DescribeCacheClustersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheClustersInput) GoString() string { - return s.String() -} - -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *DescribeCacheClustersInput) SetCacheClusterId(v string) *DescribeCacheClustersInput { - s.CacheClusterId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCacheClustersInput) SetMarker(v string) *DescribeCacheClustersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeCacheClustersInput) SetMaxRecords(v int64) *DescribeCacheClustersInput { - s.MaxRecords = &v - return s -} - -// SetShowCacheClustersNotInReplicationGroups sets the ShowCacheClustersNotInReplicationGroups field's value. -func (s *DescribeCacheClustersInput) SetShowCacheClustersNotInReplicationGroups(v bool) *DescribeCacheClustersInput { - s.ShowCacheClustersNotInReplicationGroups = &v - return s -} - -// SetShowCacheNodeInfo sets the ShowCacheNodeInfo field's value. -func (s *DescribeCacheClustersInput) SetShowCacheNodeInfo(v bool) *DescribeCacheClustersInput { - s.ShowCacheNodeInfo = &v - return s -} - -// Represents the output of a DescribeCacheClusters operation. -type DescribeCacheClustersOutput struct { - _ struct{} `type:"structure"` - - // A list of clusters. Each item in the list contains detailed information about - // one cluster. - CacheClusters []*CacheCluster `locationNameList:"CacheCluster" type:"list"` - - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeCacheClustersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheClustersOutput) GoString() string { - return s.String() -} - -// SetCacheClusters sets the CacheClusters field's value. -func (s *DescribeCacheClustersOutput) SetCacheClusters(v []*CacheCluster) *DescribeCacheClustersOutput { - s.CacheClusters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCacheClustersOutput) SetMarker(v string) *DescribeCacheClustersOutput { - s.Marker = &v - return s -} - -// Represents the input of a DescribeCacheEngineVersions operation. -type DescribeCacheEngineVersionsInput struct { - _ struct{} `type:"structure"` - - // The name of a specific cache parameter group family to return details for. - // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 - // - // Constraints: - // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - CacheParameterGroupFamily *string `type:"string"` - - // If true, specifies that only the default version of the specified engine - // or engine and major version combination is to be returned. - DefaultOnly *bool `type:"boolean"` - - // The cache engine to return. Valid values: memcached | redis - Engine *string `type:"string"` - - // The cache engine version to return. - // - // Example: 1.4.14 - EngineVersion *string `type:"string"` - - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeCacheEngineVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheEngineVersionsInput) GoString() string { - return s.String() -} - -// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. -func (s *DescribeCacheEngineVersionsInput) SetCacheParameterGroupFamily(v string) *DescribeCacheEngineVersionsInput { - s.CacheParameterGroupFamily = &v - return s -} - -// SetDefaultOnly sets the DefaultOnly field's value. -func (s *DescribeCacheEngineVersionsInput) SetDefaultOnly(v bool) *DescribeCacheEngineVersionsInput { - s.DefaultOnly = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DescribeCacheEngineVersionsInput) SetEngine(v string) *DescribeCacheEngineVersionsInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DescribeCacheEngineVersionsInput) SetEngineVersion(v string) *DescribeCacheEngineVersionsInput { - s.EngineVersion = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCacheEngineVersionsInput) SetMarker(v string) *DescribeCacheEngineVersionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeCacheEngineVersionsInput) SetMaxRecords(v int64) *DescribeCacheEngineVersionsInput { - s.MaxRecords = &v - return s -} - -// Represents the output of a DescribeCacheEngineVersions operation. -type DescribeCacheEngineVersionsOutput struct { - _ struct{} `type:"structure"` - - // A list of cache engine version details. Each element in the list contains - // detailed information about one cache engine version. - CacheEngineVersions []*CacheEngineVersion `locationNameList:"CacheEngineVersion" type:"list"` - - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeCacheEngineVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheEngineVersionsOutput) GoString() string { - return s.String() -} - -// SetCacheEngineVersions sets the CacheEngineVersions field's value. -func (s *DescribeCacheEngineVersionsOutput) SetCacheEngineVersions(v []*CacheEngineVersion) *DescribeCacheEngineVersionsOutput { - s.CacheEngineVersions = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCacheEngineVersionsOutput) SetMarker(v string) *DescribeCacheEngineVersionsOutput { - s.Marker = &v - return s -} - -// Represents the input of a DescribeCacheParameterGroups operation. -type DescribeCacheParameterGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of a specific cache parameter group to return details for. - CacheParameterGroupName *string `type:"string"` - - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeCacheParameterGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheParameterGroupsInput) GoString() string { - return s.String() -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *DescribeCacheParameterGroupsInput) SetCacheParameterGroupName(v string) *DescribeCacheParameterGroupsInput { - s.CacheParameterGroupName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCacheParameterGroupsInput) SetMarker(v string) *DescribeCacheParameterGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeCacheParameterGroupsInput) SetMaxRecords(v int64) *DescribeCacheParameterGroupsInput { - s.MaxRecords = &v - return s -} - -// Represents the output of a DescribeCacheParameterGroups operation. -type DescribeCacheParameterGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of cache parameter groups. Each element in the list contains detailed - // information about one cache parameter group. - CacheParameterGroups []*CacheParameterGroup `locationNameList:"CacheParameterGroup" type:"list"` - - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeCacheParameterGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheParameterGroupsOutput) GoString() string { - return s.String() -} - -// SetCacheParameterGroups sets the CacheParameterGroups field's value. -func (s *DescribeCacheParameterGroupsOutput) SetCacheParameterGroups(v []*CacheParameterGroup) *DescribeCacheParameterGroupsOutput { - s.CacheParameterGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCacheParameterGroupsOutput) SetMarker(v string) *DescribeCacheParameterGroupsOutput { - s.Marker = &v - return s -} - -// Represents the input of a DescribeCacheParameters operation. -type DescribeCacheParametersInput struct { - _ struct{} `type:"structure"` - - // The name of a specific cache parameter group to return details for. - // - // CacheParameterGroupName is a required field - CacheParameterGroupName *string `type:"string" required:"true"` - - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - MaxRecords *int64 `type:"integer"` - - // The parameter types to return. - // - // Valid values: user | system | engine-default - Source *string `type:"string"` -} - -// String returns the string representation -func (s DescribeCacheParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCacheParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCacheParametersInput"} - if s.CacheParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *DescribeCacheParametersInput) SetCacheParameterGroupName(v string) *DescribeCacheParametersInput { - s.CacheParameterGroupName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCacheParametersInput) SetMarker(v string) *DescribeCacheParametersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeCacheParametersInput) SetMaxRecords(v int64) *DescribeCacheParametersInput { - s.MaxRecords = &v - return s -} - -// SetSource sets the Source field's value. -func (s *DescribeCacheParametersInput) SetSource(v string) *DescribeCacheParametersInput { - s.Source = &v - return s -} - -// Represents the output of a DescribeCacheParameters operation. -type DescribeCacheParametersOutput struct { - _ struct{} `type:"structure"` - - // A list of parameters specific to a particular cache node type. Each element - // in the list contains detailed information about one parameter. - CacheNodeTypeSpecificParameters []*CacheNodeTypeSpecificParameter `locationNameList:"CacheNodeTypeSpecificParameter" type:"list"` - - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` - - // A list of Parameter instances. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` -} - -// String returns the string representation -func (s DescribeCacheParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheParametersOutput) GoString() string { - return s.String() -} - -// SetCacheNodeTypeSpecificParameters sets the CacheNodeTypeSpecificParameters field's value. -func (s *DescribeCacheParametersOutput) SetCacheNodeTypeSpecificParameters(v []*CacheNodeTypeSpecificParameter) *DescribeCacheParametersOutput { - s.CacheNodeTypeSpecificParameters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCacheParametersOutput) SetMarker(v string) *DescribeCacheParametersOutput { - s.Marker = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DescribeCacheParametersOutput) SetParameters(v []*Parameter) *DescribeCacheParametersOutput { - s.Parameters = v - return s -} - -// Represents the input of a DescribeCacheSecurityGroups operation. -type DescribeCacheSecurityGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of the cache security group to return details for. - CacheSecurityGroupName *string `type:"string"` - - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeCacheSecurityGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheSecurityGroupsInput) GoString() string { - return s.String() -} - -// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. -func (s *DescribeCacheSecurityGroupsInput) SetCacheSecurityGroupName(v string) *DescribeCacheSecurityGroupsInput { - s.CacheSecurityGroupName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCacheSecurityGroupsInput) SetMarker(v string) *DescribeCacheSecurityGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeCacheSecurityGroupsInput) SetMaxRecords(v int64) *DescribeCacheSecurityGroupsInput { - s.MaxRecords = &v - return s -} - -// Represents the output of a DescribeCacheSecurityGroups operation. -type DescribeCacheSecurityGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of cache security groups. Each element in the list contains detailed - // information about one group. - CacheSecurityGroups []*CacheSecurityGroup `locationNameList:"CacheSecurityGroup" type:"list"` - - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeCacheSecurityGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheSecurityGroupsOutput) GoString() string { - return s.String() -} - -// SetCacheSecurityGroups sets the CacheSecurityGroups field's value. -func (s *DescribeCacheSecurityGroupsOutput) SetCacheSecurityGroups(v []*CacheSecurityGroup) *DescribeCacheSecurityGroupsOutput { - s.CacheSecurityGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCacheSecurityGroupsOutput) SetMarker(v string) *DescribeCacheSecurityGroupsOutput { - s.Marker = &v - return s -} - -// Represents the input of a DescribeCacheSubnetGroups operation. -type DescribeCacheSubnetGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of the cache subnet group to return details for. - CacheSubnetGroupName *string `type:"string"` - - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeCacheSubnetGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheSubnetGroupsInput) GoString() string { - return s.String() -} - -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *DescribeCacheSubnetGroupsInput) SetCacheSubnetGroupName(v string) *DescribeCacheSubnetGroupsInput { - s.CacheSubnetGroupName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCacheSubnetGroupsInput) SetMarker(v string) *DescribeCacheSubnetGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeCacheSubnetGroupsInput) SetMaxRecords(v int64) *DescribeCacheSubnetGroupsInput { - s.MaxRecords = &v - return s -} - -// Represents the output of a DescribeCacheSubnetGroups operation. -type DescribeCacheSubnetGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of cache subnet groups. Each element in the list contains detailed - // information about one group. - CacheSubnetGroups []*CacheSubnetGroup `locationNameList:"CacheSubnetGroup" type:"list"` - - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeCacheSubnetGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheSubnetGroupsOutput) GoString() string { - return s.String() -} - -// SetCacheSubnetGroups sets the CacheSubnetGroups field's value. -func (s *DescribeCacheSubnetGroupsOutput) SetCacheSubnetGroups(v []*CacheSubnetGroup) *DescribeCacheSubnetGroupsOutput { - s.CacheSubnetGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCacheSubnetGroupsOutput) SetMarker(v string) *DescribeCacheSubnetGroupsOutput { - s.Marker = &v - return s -} - -// Represents the input of a DescribeEngineDefaultParameters operation. -type DescribeEngineDefaultParametersInput struct { - _ struct{} `type:"structure"` - - // The name of the cache parameter group family. - // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 - // - // CacheParameterGroupFamily is a required field - CacheParameterGroupFamily *string `type:"string" required:"true"` - - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeEngineDefaultParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEngineDefaultParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEngineDefaultParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEngineDefaultParametersInput"} - if s.CacheParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupFamily")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. -func (s *DescribeEngineDefaultParametersInput) SetCacheParameterGroupFamily(v string) *DescribeEngineDefaultParametersInput { - s.CacheParameterGroupFamily = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEngineDefaultParametersInput) SetMarker(v string) *DescribeEngineDefaultParametersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEngineDefaultParametersInput) SetMaxRecords(v int64) *DescribeEngineDefaultParametersInput { - s.MaxRecords = &v - return s -} - -type DescribeEngineDefaultParametersOutput struct { - _ struct{} `type:"structure"` - - // Represents the output of a DescribeEngineDefaultParameters operation. - EngineDefaults *EngineDefaults `type:"structure"` -} - -// String returns the string representation -func (s DescribeEngineDefaultParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEngineDefaultParametersOutput) GoString() string { - return s.String() -} - -// SetEngineDefaults sets the EngineDefaults field's value. -func (s *DescribeEngineDefaultParametersOutput) SetEngineDefaults(v *EngineDefaults) *DescribeEngineDefaultParametersOutput { - s.EngineDefaults = v - return s -} - -// Represents the input of a DescribeEvents operation. -type DescribeEventsInput struct { - _ struct{} `type:"structure"` - - // The number of minutes worth of events to retrieve. - Duration *int64 `type:"integer"` - - // The end of the time interval for which to retrieve events, specified in ISO - // 8601 format. - // - // Example: 2017-03-30T07:03:49.555Z - EndTime *time.Time `type:"timestamp"` - - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - MaxRecords *int64 `type:"integer"` - - // The identifier of the event source for which events are returned. If not - // specified, all sources are included in the response. - SourceIdentifier *string `type:"string"` - - // The event source to retrieve events for. If no value is specified, all events - // are returned. - SourceType *string `type:"string" enum:"SourceType"` - - // The beginning of the time interval to retrieve events for, specified in ISO - // 8601 format. - // - // Example: 2017-03-30T07:03:49.555Z - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s DescribeEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsInput) GoString() string { - return s.String() -} - -// SetDuration sets the Duration field's value. -func (s *DescribeEventsInput) SetDuration(v int64) *DescribeEventsInput { - s.Duration = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *DescribeEventsInput) SetEndTime(v time.Time) *DescribeEventsInput { - s.EndTime = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventsInput) SetMarker(v string) *DescribeEventsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEventsInput) SetMaxRecords(v int64) *DescribeEventsInput { - s.MaxRecords = &v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *DescribeEventsInput) SetSourceIdentifier(v string) *DescribeEventsInput { - s.SourceIdentifier = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *DescribeEventsInput) SetSourceType(v string) *DescribeEventsInput { - s.SourceType = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeEventsInput) SetStartTime(v time.Time) *DescribeEventsInput { - s.StartTime = &v - return s -} - -// Represents the output of a DescribeEvents operation. -type DescribeEventsOutput struct { - _ struct{} `type:"structure"` - - // A list of events. Each element in the list contains detailed information - // about one event. - Events []*Event `locationNameList:"Event" type:"list"` - - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { - s.Events = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventsOutput) SetMarker(v string) *DescribeEventsOutput { - s.Marker = &v - return s -} - -// Represents the input of a DescribeReplicationGroups operation. -type DescribeReplicationGroupsInput struct { - _ struct{} `type:"structure"` - - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - MaxRecords *int64 `type:"integer"` - - // The identifier for the replication group to be described. This parameter - // is not case sensitive. - // - // If you do not specify this parameter, information about all replication groups - // is returned. - ReplicationGroupId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeReplicationGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReplicationGroupsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReplicationGroupsInput) SetMarker(v string) *DescribeReplicationGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReplicationGroupsInput) SetMaxRecords(v int64) *DescribeReplicationGroupsInput { - s.MaxRecords = &v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *DescribeReplicationGroupsInput) SetReplicationGroupId(v string) *DescribeReplicationGroupsInput { - s.ReplicationGroupId = &v - return s -} - -// Represents the output of a DescribeReplicationGroups operation. -type DescribeReplicationGroupsOutput struct { - _ struct{} `type:"structure"` - - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` - - // A list of replication groups. Each item in the list contains detailed information - // about one replication group. - ReplicationGroups []*ReplicationGroup `locationNameList:"ReplicationGroup" type:"list"` -} - -// String returns the string representation -func (s DescribeReplicationGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReplicationGroupsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReplicationGroupsOutput) SetMarker(v string) *DescribeReplicationGroupsOutput { - s.Marker = &v - return s -} - -// SetReplicationGroups sets the ReplicationGroups field's value. -func (s *DescribeReplicationGroupsOutput) SetReplicationGroups(v []*ReplicationGroup) *DescribeReplicationGroupsOutput { - s.ReplicationGroups = v - return s -} - -// Represents the input of a DescribeReservedCacheNodes operation. -type DescribeReservedCacheNodesInput struct { - _ struct{} `type:"structure"` - - // The cache node type filter value. Use this parameter to show only those reservations - // matching the specified cache node type. - // - // The following node types are supported by ElastiCache. Generally speaking, - // the current generation types provide more memory and computational power - // at lower cost when compared to their equivalent previous generation counterparts. - // - // * General purpose: - // - // Current generation: - // - // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium - // - // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - // - // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge - // - // Previous generation: (not recommended) - // - // T1 node types:cache.t1.micro - // - // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge - // - // * Compute optimized: - // - // Previous generation: (not recommended) - // - // C1 node types:cache.c1.xlarge - // - // * Memory optimized: - // - // Current generation: - // - // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, - // cache.r3.8xlarge - // - // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, - // cache.r4.8xlarge, cache.r4.16xlarge - // - // Previous generation: (not recommended) - // - // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge - // - // Notes: - // - // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon - // VPC). - // - // * Redis (cluster mode disabled): Redis backup/restore is not supported - // on T1 and T2 instances. - // - // * Redis (cluster mode enabled): Backup/restore is not supported on T1 - // instances. - // - // * Redis Append-only files (AOF) functionality is not supported for T1 - // or T2 instances. - // - // For a complete listing of node types and specifications, see: - // - // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) - // - // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // - // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) - CacheNodeType *string `type:"string"` - - // The duration filter value, specified in years or seconds. Use this parameter - // to show only reservations for this duration. - // - // Valid Values: 1 | 3 | 31536000 | 94608000 - Duration *string `type:"string"` - - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - MaxRecords *int64 `type:"integer"` - - // The offering type filter value. Use this parameter to show only the available - // offerings matching the specified offering type. - // - // Valid values: "Light Utilization"|"Medium Utilization"|"Heavy Utilization" - OfferingType *string `type:"string"` - - // The product description filter value. Use this parameter to show only those - // reservations matching the specified product description. - ProductDescription *string `type:"string"` - - // The reserved cache node identifier filter value. Use this parameter to show - // only the reservation that matches the specified reservation ID. - ReservedCacheNodeId *string `type:"string"` - - // The offering identifier filter value. Use this parameter to show only purchased - // reservations matching the specified offering identifier. - ReservedCacheNodesOfferingId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeReservedCacheNodesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedCacheNodesInput) GoString() string { - return s.String() -} - -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *DescribeReservedCacheNodesInput) SetCacheNodeType(v string) *DescribeReservedCacheNodesInput { - s.CacheNodeType = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *DescribeReservedCacheNodesInput) SetDuration(v string) *DescribeReservedCacheNodesInput { - s.Duration = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReservedCacheNodesInput) SetMarker(v string) *DescribeReservedCacheNodesInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReservedCacheNodesInput) SetMaxRecords(v int64) *DescribeReservedCacheNodesInput { - s.MaxRecords = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *DescribeReservedCacheNodesInput) SetOfferingType(v string) *DescribeReservedCacheNodesInput { - s.OfferingType = &v - return s -} - -// SetProductDescription sets the ProductDescription field's value. -func (s *DescribeReservedCacheNodesInput) SetProductDescription(v string) *DescribeReservedCacheNodesInput { - s.ProductDescription = &v - return s -} - -// SetReservedCacheNodeId sets the ReservedCacheNodeId field's value. -func (s *DescribeReservedCacheNodesInput) SetReservedCacheNodeId(v string) *DescribeReservedCacheNodesInput { - s.ReservedCacheNodeId = &v - return s -} - -// SetReservedCacheNodesOfferingId sets the ReservedCacheNodesOfferingId field's value. -func (s *DescribeReservedCacheNodesInput) SetReservedCacheNodesOfferingId(v string) *DescribeReservedCacheNodesInput { - s.ReservedCacheNodesOfferingId = &v - return s -} - -// Represents the input of a DescribeReservedCacheNodesOfferings operation. -type DescribeReservedCacheNodesOfferingsInput struct { - _ struct{} `type:"structure"` - - // The cache node type filter value. Use this parameter to show only the available - // offerings matching the specified cache node type. - // - // The following node types are supported by ElastiCache. Generally speaking, - // the current generation types provide more memory and computational power - // at lower cost when compared to their equivalent previous generation counterparts. - // - // * General purpose: - // - // Current generation: - // - // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium - // - // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - // - // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge - // - // Previous generation: (not recommended) - // - // T1 node types:cache.t1.micro - // - // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge - // - // * Compute optimized: - // - // Previous generation: (not recommended) - // - // C1 node types:cache.c1.xlarge - // - // * Memory optimized: - // - // Current generation: - // - // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, - // cache.r3.8xlarge - // - // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, - // cache.r4.8xlarge, cache.r4.16xlarge - // - // Previous generation: (not recommended) - // - // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge - // - // Notes: - // - // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon - // VPC). - // - // * Redis (cluster mode disabled): Redis backup/restore is not supported - // on T1 and T2 instances. - // - // * Redis (cluster mode enabled): Backup/restore is not supported on T1 - // instances. - // - // * Redis Append-only files (AOF) functionality is not supported for T1 - // or T2 instances. - // - // For a complete listing of node types and specifications, see: - // - // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) - // - // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // - // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) - CacheNodeType *string `type:"string"` - - // Duration filter value, specified in years or seconds. Use this parameter - // to show only reservations for a given duration. - // - // Valid Values: 1 | 3 | 31536000 | 94608000 - Duration *string `type:"string"` - - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - MaxRecords *int64 `type:"integer"` - - // The offering type filter value. Use this parameter to show only the available - // offerings matching the specified offering type. - // - // Valid Values: "Light Utilization"|"Medium Utilization"|"Heavy Utilization" - OfferingType *string `type:"string"` - - // The product description filter value. Use this parameter to show only the - // available offerings matching the specified product description. - ProductDescription *string `type:"string"` - - // The offering identifier filter value. Use this parameter to show only the - // available offering that matches the specified reservation identifier. - // - // Example: 438012d3-4052-4cc7-b2e3-8d3372e0e706 - ReservedCacheNodesOfferingId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeReservedCacheNodesOfferingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedCacheNodesOfferingsInput) GoString() string { - return s.String() -} - -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *DescribeReservedCacheNodesOfferingsInput) SetCacheNodeType(v string) *DescribeReservedCacheNodesOfferingsInput { - s.CacheNodeType = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *DescribeReservedCacheNodesOfferingsInput) SetDuration(v string) *DescribeReservedCacheNodesOfferingsInput { - s.Duration = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReservedCacheNodesOfferingsInput) SetMarker(v string) *DescribeReservedCacheNodesOfferingsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReservedCacheNodesOfferingsInput) SetMaxRecords(v int64) *DescribeReservedCacheNodesOfferingsInput { - s.MaxRecords = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *DescribeReservedCacheNodesOfferingsInput) SetOfferingType(v string) *DescribeReservedCacheNodesOfferingsInput { - s.OfferingType = &v - return s -} - -// SetProductDescription sets the ProductDescription field's value. -func (s *DescribeReservedCacheNodesOfferingsInput) SetProductDescription(v string) *DescribeReservedCacheNodesOfferingsInput { - s.ProductDescription = &v - return s -} - -// SetReservedCacheNodesOfferingId sets the ReservedCacheNodesOfferingId field's value. -func (s *DescribeReservedCacheNodesOfferingsInput) SetReservedCacheNodesOfferingId(v string) *DescribeReservedCacheNodesOfferingsInput { - s.ReservedCacheNodesOfferingId = &v - return s -} - -// Represents the output of a DescribeReservedCacheNodesOfferings operation. -type DescribeReservedCacheNodesOfferingsOutput struct { - _ struct{} `type:"structure"` - - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` - - // A list of reserved cache node offerings. Each element in the list contains - // detailed information about one offering. - ReservedCacheNodesOfferings []*ReservedCacheNodesOffering `locationNameList:"ReservedCacheNodesOffering" type:"list"` -} - -// String returns the string representation -func (s DescribeReservedCacheNodesOfferingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedCacheNodesOfferingsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReservedCacheNodesOfferingsOutput) SetMarker(v string) *DescribeReservedCacheNodesOfferingsOutput { - s.Marker = &v - return s -} - -// SetReservedCacheNodesOfferings sets the ReservedCacheNodesOfferings field's value. -func (s *DescribeReservedCacheNodesOfferingsOutput) SetReservedCacheNodesOfferings(v []*ReservedCacheNodesOffering) *DescribeReservedCacheNodesOfferingsOutput { - s.ReservedCacheNodesOfferings = v - return s -} - -// Represents the output of a DescribeReservedCacheNodes operation. -type DescribeReservedCacheNodesOutput struct { - _ struct{} `type:"structure"` - - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` - - // A list of reserved cache nodes. Each element in the list contains detailed - // information about one node. - ReservedCacheNodes []*ReservedCacheNode `locationNameList:"ReservedCacheNode" type:"list"` -} - -// String returns the string representation -func (s DescribeReservedCacheNodesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedCacheNodesOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReservedCacheNodesOutput) SetMarker(v string) *DescribeReservedCacheNodesOutput { - s.Marker = &v - return s -} - -// SetReservedCacheNodes sets the ReservedCacheNodes field's value. -func (s *DescribeReservedCacheNodesOutput) SetReservedCacheNodes(v []*ReservedCacheNode) *DescribeReservedCacheNodesOutput { - s.ReservedCacheNodes = v - return s -} - -// Represents the input of a DescribeSnapshotsMessage operation. -type DescribeSnapshotsInput struct { - _ struct{} `type:"structure"` - - // A user-supplied cluster identifier. If this parameter is specified, only - // snapshots associated with that specific cluster are described. - CacheClusterId *string `type:"string"` - - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 50 - // - // Constraints: minimum 20; maximum 50. - MaxRecords *int64 `type:"integer"` - - // A user-supplied replication group identifier. If this parameter is specified, - // only snapshots associated with that specific replication group are described. - ReplicationGroupId *string `type:"string"` - - // A Boolean value which if true, the node group (shard) configuration is included - // in the snapshot description. - ShowNodeGroupConfig *bool `type:"boolean"` - - // A user-supplied name of the snapshot. If this parameter is specified, only - // this snapshot are described. - SnapshotName *string `type:"string"` - - // If set to system, the output shows snapshots that were automatically created - // by ElastiCache. If set to user the output shows snapshots that were manually - // created. If omitted, the output shows both automatically and manually created - // snapshots. - SnapshotSource *string `type:"string"` -} - -// String returns the string representation -func (s DescribeSnapshotsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSnapshotsInput) GoString() string { - return s.String() -} - -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *DescribeSnapshotsInput) SetCacheClusterId(v string) *DescribeSnapshotsInput { - s.CacheClusterId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeSnapshotsInput) SetMarker(v string) *DescribeSnapshotsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeSnapshotsInput) SetMaxRecords(v int64) *DescribeSnapshotsInput { - s.MaxRecords = &v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *DescribeSnapshotsInput) SetReplicationGroupId(v string) *DescribeSnapshotsInput { - s.ReplicationGroupId = &v - return s -} - -// SetShowNodeGroupConfig sets the ShowNodeGroupConfig field's value. -func (s *DescribeSnapshotsInput) SetShowNodeGroupConfig(v bool) *DescribeSnapshotsInput { - s.ShowNodeGroupConfig = &v - return s -} - -// SetSnapshotName sets the SnapshotName field's value. -func (s *DescribeSnapshotsInput) SetSnapshotName(v string) *DescribeSnapshotsInput { - s.SnapshotName = &v - return s -} - -// SetSnapshotSource sets the SnapshotSource field's value. -func (s *DescribeSnapshotsInput) SetSnapshotSource(v string) *DescribeSnapshotsInput { - s.SnapshotSource = &v - return s -} - -// Represents the output of a DescribeSnapshots operation. -type DescribeSnapshotsOutput struct { - _ struct{} `type:"structure"` - - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // A list of snapshots. Each item in the list contains detailed information - // about one snapshot. - Snapshots []*Snapshot `locationNameList:"Snapshot" type:"list"` -} - -// String returns the string representation -func (s DescribeSnapshotsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSnapshotsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeSnapshotsOutput) SetMarker(v string) *DescribeSnapshotsOutput { - s.Marker = &v - return s -} - -// SetSnapshots sets the Snapshots field's value. -func (s *DescribeSnapshotsOutput) SetSnapshots(v []*Snapshot) *DescribeSnapshotsOutput { - s.Snapshots = v - return s -} - -// Provides ownership and status information for an Amazon EC2 security group. -type EC2SecurityGroup struct { - _ struct{} `type:"structure"` - - // The name of the Amazon EC2 security group. - EC2SecurityGroupName *string `type:"string"` - - // The AWS account ID of the Amazon EC2 security group owner. - EC2SecurityGroupOwnerId *string `type:"string"` - - // The status of the Amazon EC2 security group. - Status *string `type:"string"` -} - -// String returns the string representation -func (s EC2SecurityGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EC2SecurityGroup) GoString() string { - return s.String() -} - -// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. -func (s *EC2SecurityGroup) SetEC2SecurityGroupName(v string) *EC2SecurityGroup { - s.EC2SecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. -func (s *EC2SecurityGroup) SetEC2SecurityGroupOwnerId(v string) *EC2SecurityGroup { - s.EC2SecurityGroupOwnerId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *EC2SecurityGroup) SetStatus(v string) *EC2SecurityGroup { - s.Status = &v - return s -} - -// Represents the information required for client programs to connect to a cache -// node. -type Endpoint struct { - _ struct{} `type:"structure"` - - // The DNS hostname of the cache node. - Address *string `type:"string"` - - // The port number that the cache engine is listening on. - Port *int64 `type:"integer"` -} - -// String returns the string representation -func (s Endpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Endpoint) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *Endpoint) SetAddress(v string) *Endpoint { - s.Address = &v - return s -} - -// SetPort sets the Port field's value. -func (s *Endpoint) SetPort(v int64) *Endpoint { - s.Port = &v - return s -} - -// Represents the output of a DescribeEngineDefaultParameters operation. -type EngineDefaults struct { - _ struct{} `type:"structure"` - - // A list of parameters specific to a particular cache node type. Each element - // in the list contains detailed information about one parameter. - CacheNodeTypeSpecificParameters []*CacheNodeTypeSpecificParameter `locationNameList:"CacheNodeTypeSpecificParameter" type:"list"` - - // Specifies the name of the cache parameter group family to which the engine - // default parameters apply. - // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 - CacheParameterGroupFamily *string `type:"string"` - - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` - - // Contains a list of engine default parameters. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` -} - -// String returns the string representation -func (s EngineDefaults) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EngineDefaults) GoString() string { - return s.String() -} - -// SetCacheNodeTypeSpecificParameters sets the CacheNodeTypeSpecificParameters field's value. -func (s *EngineDefaults) SetCacheNodeTypeSpecificParameters(v []*CacheNodeTypeSpecificParameter) *EngineDefaults { - s.CacheNodeTypeSpecificParameters = v - return s -} - -// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. -func (s *EngineDefaults) SetCacheParameterGroupFamily(v string) *EngineDefaults { - s.CacheParameterGroupFamily = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *EngineDefaults) SetMarker(v string) *EngineDefaults { - s.Marker = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *EngineDefaults) SetParameters(v []*Parameter) *EngineDefaults { - s.Parameters = v - return s -} - -// Represents a single occurrence of something interesting within the system. -// Some examples of events are creating a cluster, adding or removing a cache -// node, or rebooting a node. -type Event struct { - _ struct{} `type:"structure"` - - // The date and time when the event occurred. - Date *time.Time `type:"timestamp"` - - // The text of the event. - Message *string `type:"string"` - - // The identifier for the source of the event. For example, if the event occurred - // at the cluster level, the identifier would be the name of the cluster. - SourceIdentifier *string `type:"string"` - - // Specifies the origin of this event - a cluster, a parameter group, a security - // group, etc. - SourceType *string `type:"string" enum:"SourceType"` -} - -// String returns the string representation -func (s Event) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Event) GoString() string { - return s.String() -} - -// SetDate sets the Date field's value. -func (s *Event) SetDate(v time.Time) *Event { - s.Date = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *Event) SetMessage(v string) *Event { - s.Message = &v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *Event) SetSourceIdentifier(v string) *Event { - s.SourceIdentifier = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *Event) SetSourceType(v string) *Event { - s.SourceType = &v - return s -} - -type IncreaseReplicaCountInput struct { - _ struct{} `type:"structure"` - - // If True, the number of replica nodes is increased immediately. If False, - // the number of replica nodes is increased during the next maintenance window. - // - // ApplyImmediately is a required field - ApplyImmediately *bool `type:"boolean" required:"true"` - - // The number of read replica nodes you want at the completion of this operation. - // For Redis (cluster mode disabled) replication groups, this is the number - // of replica nodes in the replication group. For Redis (cluster mode enabled) - // replication groups, this is the number of replica nodes in each of the replication - // group's node groups. - NewReplicaCount *int64 `type:"integer"` - - // A list of ConfigureShard objects that can be used to configure each shard - // in a Redis (cluster mode enabled) replication group. The ConfigureShard has - // three members: NewReplicaCount, NodeGroupId, and PreferredAvailabilityZones. - ReplicaConfiguration []*ConfigureShard `locationNameList:"ConfigureShard" type:"list"` - - // The id of the replication group to which you want to add replica nodes. - // - // ReplicationGroupId is a required field - ReplicationGroupId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s IncreaseReplicaCountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IncreaseReplicaCountInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IncreaseReplicaCountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IncreaseReplicaCountInput"} - if s.ApplyImmediately == nil { - invalidParams.Add(request.NewErrParamRequired("ApplyImmediately")) - } - if s.ReplicationGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) - } - if s.ReplicaConfiguration != nil { - for i, v := range s.ReplicaConfiguration { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaConfiguration", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *IncreaseReplicaCountInput) SetApplyImmediately(v bool) *IncreaseReplicaCountInput { - s.ApplyImmediately = &v - return s -} - -// SetNewReplicaCount sets the NewReplicaCount field's value. -func (s *IncreaseReplicaCountInput) SetNewReplicaCount(v int64) *IncreaseReplicaCountInput { - s.NewReplicaCount = &v - return s -} - -// SetReplicaConfiguration sets the ReplicaConfiguration field's value. -func (s *IncreaseReplicaCountInput) SetReplicaConfiguration(v []*ConfigureShard) *IncreaseReplicaCountInput { - s.ReplicaConfiguration = v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *IncreaseReplicaCountInput) SetReplicationGroupId(v string) *IncreaseReplicaCountInput { - s.ReplicationGroupId = &v - return s -} - -type IncreaseReplicaCountOutput struct { - _ struct{} `type:"structure"` - - // Contains all of the attributes of a specific Redis replication group. - ReplicationGroup *ReplicationGroup `type:"structure"` -} - -// String returns the string representation -func (s IncreaseReplicaCountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IncreaseReplicaCountOutput) GoString() string { - return s.String() -} - -// SetReplicationGroup sets the ReplicationGroup field's value. -func (s *IncreaseReplicaCountOutput) SetReplicationGroup(v *ReplicationGroup) *IncreaseReplicaCountOutput { - s.ReplicationGroup = v - return s -} - -// The input parameters for the ListAllowedNodeTypeModifications operation. -type ListAllowedNodeTypeModificationsInput struct { - _ struct{} `type:"structure"` - - // The name of the cluster you want to scale up to a larger node instanced type. - // ElastiCache uses the cluster id to identify the current node type of this - // cluster and from that to create a list of node types you can scale up to. - // - // You must provide a value for either the CacheClusterId or the ReplicationGroupId. - CacheClusterId *string `type:"string"` - - // The name of the replication group want to scale up to a larger node type. - // ElastiCache uses the replication group id to identify the current node type - // being used by this replication group, and from that to create a list of node - // types you can scale up to. - // - // You must provide a value for either the CacheClusterId or the ReplicationGroupId. - ReplicationGroupId *string `type:"string"` -} - -// String returns the string representation -func (s ListAllowedNodeTypeModificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAllowedNodeTypeModificationsInput) GoString() string { - return s.String() -} - -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *ListAllowedNodeTypeModificationsInput) SetCacheClusterId(v string) *ListAllowedNodeTypeModificationsInput { - s.CacheClusterId = &v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *ListAllowedNodeTypeModificationsInput) SetReplicationGroupId(v string) *ListAllowedNodeTypeModificationsInput { - s.ReplicationGroupId = &v - return s -} - -// Represents the allowed node types you can use to modify your cluster or replication -// group. -type ListAllowedNodeTypeModificationsOutput struct { - _ struct{} `type:"structure"` - - // A string list, each element of which specifies a cache node type which you - // can use to scale your cluster or replication group. - // - // When scaling up a Redis cluster or replication group using ModifyCacheCluster - // or ModifyReplicationGroup, use a value from this list for the CacheNodeType - // parameter. - ScaleUpModifications []*string `type:"list"` -} - -// String returns the string representation -func (s ListAllowedNodeTypeModificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAllowedNodeTypeModificationsOutput) GoString() string { - return s.String() -} - -// SetScaleUpModifications sets the ScaleUpModifications field's value. -func (s *ListAllowedNodeTypeModificationsOutput) SetScaleUpModifications(v []*string) *ListAllowedNodeTypeModificationsOutput { - s.ScaleUpModifications = v - return s -} - -// The input parameters for the ListTagsForResource operation. -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource for which you want the list - // of tags, for example arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster - // or arn:aws:elasticache:us-west-2:0123456789:snapshot:mySnapshot. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS - // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // ResourceName is a required field - ResourceName *string `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.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *ListTagsForResourceInput) SetResourceName(v string) *ListTagsForResourceInput { - s.ResourceName = &v - return s -} - -// Represents the input of a ModifyCacheCluster operation. -type ModifyCacheClusterInput struct { - _ struct{} `type:"structure"` - - // Specifies whether the new nodes in this Memcached cluster are all created - // in a single Availability Zone or created across multiple Availability Zones. - // - // Valid values: single-az | cross-az. - // - // This option is only supported for Memcached clusters. - // - // You cannot specify single-az if the Memcached cluster already has cache nodes - // in different Availability Zones. If cross-az is specified, existing Memcached - // nodes remain in their current Availability Zone. - // - // Only newly created nodes are located in different Availability Zones. For - // instructions on how to move existing Memcached nodes to different Availability - // Zones, see the Availability Zone Considerations section of Cache Node Considerations - // for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/CacheNode.Memcached.html). - AZMode *string `type:"string" enum:"AZMode"` - - // If true, this parameter causes the modifications in this request and any - // pending modifications to be applied, asynchronously and as soon as possible, - // regardless of the PreferredMaintenanceWindow setting for the cluster. - // - // If false, changes to the cluster are applied on the next maintenance reboot, - // or the next failure reboot, whichever occurs first. - // - // If you perform a ModifyCacheCluster before a pending modification is applied, - // the pending modification is replaced by the newer modification. - // - // Valid values: true | false - // - // Default: false - ApplyImmediately *bool `type:"boolean"` - - // This parameter is currently disabled. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The cluster identifier. This value is stored as a lowercase string. - // - // CacheClusterId is a required field - CacheClusterId *string `type:"string" required:"true"` - - // A list of cache node IDs to be removed. A node ID is a numeric identifier - // (0001, 0002, etc.). This parameter is only valid when NumCacheNodes is less - // than the existing number of cache nodes. The number of cache node IDs supplied - // in this parameter must match the difference between the existing number of - // cache nodes in the cluster or pending cache nodes, whichever is greater, - // and the value of NumCacheNodes in the request. - // - // For example: If you have 3 active cache nodes, 7 pending cache nodes, and - // the number of cache nodes in this ModifyCacheCluster call is 5, you must - // list 2 (7 - 5) cache node IDs to remove. - CacheNodeIdsToRemove []*string `locationNameList:"CacheNodeId" type:"list"` - - // A valid cache node type that you want to scale this cluster up to. - CacheNodeType *string `type:"string"` - - // The name of the cache parameter group to apply to this cluster. This change - // is asynchronously applied as soon as possible for parameters when the ApplyImmediately - // parameter is specified as true for this request. - CacheParameterGroupName *string `type:"string"` - - // A list of cache security group names to authorize on this cluster. This change - // is asynchronously applied as soon as possible. - // - // You can use this parameter only with clusters that are created outside of - // an Amazon Virtual Private Cloud (Amazon VPC). - // - // Constraints: Must contain no more than 255 alphanumeric characters. Must - // not be "Default". - CacheSecurityGroupNames []*string `locationNameList:"CacheSecurityGroupName" type:"list"` - - // The upgraded version of the cache engine to be run on the cache nodes. - // - // Important: You can upgrade to a newer engine version (see Selecting a Cache - // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)), - // but you cannot downgrade to an earlier engine version. If you want to use - // an earlier engine version, you must delete the existing cluster and create - // it anew with the earlier engine version. - EngineVersion *string `type:"string"` - - // The list of Availability Zones where the new Memcached cache nodes are created. - // - // This parameter is only valid when NumCacheNodes in the request is greater - // than the sum of the number of active cache nodes and the number of cache - // nodes pending creation (which may be zero). The number of Availability Zones - // supplied in this list must match the cache nodes being added in this request. - // - // This option is only supported on Memcached clusters. - // - // Scenarios: - // - // * Scenario 1: You have 3 active nodes and wish to add 2 nodes. Specify - // NumCacheNodes=5 (3 + 2) and optionally specify two Availability Zones - // for the two new nodes. - // - // * Scenario 2: You have 3 active nodes and 2 nodes pending creation (from - // the scenario 1 call) and want to add 1 more node. Specify NumCacheNodes=6 - // ((3 + 2) + 1) and optionally specify an Availability Zone for the new - // node. - // - // * Scenario 3: You want to cancel all pending operations. Specify NumCacheNodes=3 - // to cancel all pending operations. - // - // The Availability Zone placement of nodes pending creation cannot be modified. - // If you wish to cancel any nodes pending creation, add 0 nodes by setting - // NumCacheNodes to the number of current nodes. - // - // If cross-az is specified, existing Memcached nodes remain in their current - // Availability Zone. Only newly created nodes can be located in different Availability - // Zones. For guidance on how to move existing Memcached nodes to different - // Availability Zones, see the Availability Zone Considerations section of Cache - // Node Considerations for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/CacheNode.Memcached.html). - // - // Impact of new add/remove requests upon pending requests - // - // * Scenario-1 - // - // Pending Action: Delete - // - // New Request: Delete - // - // Result: The new delete, pending or immediate, replaces the pending delete. - // - // * Scenario-2 - // - // Pending Action: Delete - // - // New Request: Create - // - // Result: The new create, pending or immediate, replaces the pending delete. - // - // * Scenario-3 - // - // Pending Action: Create - // - // New Request: Delete - // - // Result: The new delete, pending or immediate, replaces the pending create. - // - // * Scenario-4 - // - // Pending Action: Create - // - // New Request: Create - // - // Result: The new create is added to the pending create. - // - // Important: If the new create request is Apply Immediately - Yes, all creates - // are performed immediately. If the new create request is Apply Immediately - // - No, all creates are pending. - NewAvailabilityZones []*string `locationNameList:"PreferredAvailabilityZone" type:"list"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications - // are sent. - // - // The Amazon SNS topic owner must be same as the cluster owner. - NotificationTopicArn *string `type:"string"` - - // The status of the Amazon SNS notification topic. Notifications are sent only - // if the status is active. - // - // Valid values: active | inactive - NotificationTopicStatus *string `type:"string"` - - // The number of cache nodes that the cluster should have. If the value for - // NumCacheNodes is greater than the sum of the number of current cache nodes - // and the number of cache nodes pending creation (which may be zero), more - // nodes are added. If the value is less than the number of existing cache nodes, - // nodes are removed. If the value is equal to the number of current cache nodes, - // any pending add or remove requests are canceled. - // - // If you are removing cache nodes, you must use the CacheNodeIdsToRemove parameter - // to provide the IDs of the specific cache nodes to remove. - // - // For clusters running Redis, this value must be 1. For clusters running Memcached, - // this value must be between 1 and 20. - // - // Adding or removing Memcached cache nodes can be applied immediately or as - // a pending operation (see ApplyImmediately). - // - // A pending operation to modify the number of cache nodes in a cluster during - // its maintenance window, whether by adding or removing nodes in accordance - // with the scale out architecture, is not queued. The customer's latest request - // to add or remove nodes to the cluster overrides any previous pending operations - // to modify the number of cache nodes in the cluster. For example, a request - // to remove 2 nodes would override a previous pending operation to remove 3 - // nodes. Similarly, a request to add 2 nodes would override a previous pending - // operation to remove 3 nodes and vice versa. As Memcached cache nodes may - // now be provisioned in different Availability Zones with flexible cache node - // placement, a request to add nodes does not automatically override a previous - // pending operation to add nodes. The customer can modify the previous pending - // operation to add more nodes or explicitly cancel the pending request and - // retry the new request. To cancel pending operations to modify the number - // of cache nodes in a cluster, use the ModifyCacheCluster request and set NumCacheNodes - // equal to the number of cache nodes currently in the cluster. - NumCacheNodes *int64 `type:"integer"` - - // Specifies the weekly time range during which maintenance on the cluster is - // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi - // (24H Clock UTC). The minimum maintenance window is a 60 minute period. - // - // Valid values for ddd are: - // - // * sun - // - // * mon - // - // * tue - // - // * wed - // - // * thu - // - // * fri - // - // * sat - // - // Example: sun:23:00-mon:01:30 - PreferredMaintenanceWindow *string `type:"string"` - - // Specifies the VPC Security Groups associated with the cluster. - // - // This parameter can be used only with clusters that are created in an Amazon - // Virtual Private Cloud (Amazon VPC). - SecurityGroupIds []*string `locationNameList:"SecurityGroupId" type:"list"` - - // The number of days for which ElastiCache retains automatic cluster snapshots - // before deleting them. For example, if you set SnapshotRetentionLimit to 5, - // a snapshot that was taken today is retained for 5 days before being deleted. - // - // If the value of SnapshotRetentionLimit is set to zero (0), backups are turned - // off. - SnapshotRetentionLimit *int64 `type:"integer"` - - // The daily time range (in UTC) during which ElastiCache begins taking a daily - // snapshot of your cluster. - SnapshotWindow *string `type:"string"` -} - -// String returns the string representation -func (s ModifyCacheClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyCacheClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyCacheClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyCacheClusterInput"} - if s.CacheClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("CacheClusterId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAZMode sets the AZMode field's value. -func (s *ModifyCacheClusterInput) SetAZMode(v string) *ModifyCacheClusterInput { - s.AZMode = &v - return s -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *ModifyCacheClusterInput) SetApplyImmediately(v bool) *ModifyCacheClusterInput { - s.ApplyImmediately = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *ModifyCacheClusterInput) SetAutoMinorVersionUpgrade(v bool) *ModifyCacheClusterInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *ModifyCacheClusterInput) SetCacheClusterId(v string) *ModifyCacheClusterInput { - s.CacheClusterId = &v - return s -} - -// SetCacheNodeIdsToRemove sets the CacheNodeIdsToRemove field's value. -func (s *ModifyCacheClusterInput) SetCacheNodeIdsToRemove(v []*string) *ModifyCacheClusterInput { - s.CacheNodeIdsToRemove = v - return s -} - -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *ModifyCacheClusterInput) SetCacheNodeType(v string) *ModifyCacheClusterInput { - s.CacheNodeType = &v - return s -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *ModifyCacheClusterInput) SetCacheParameterGroupName(v string) *ModifyCacheClusterInput { - s.CacheParameterGroupName = &v - return s -} - -// SetCacheSecurityGroupNames sets the CacheSecurityGroupNames field's value. -func (s *ModifyCacheClusterInput) SetCacheSecurityGroupNames(v []*string) *ModifyCacheClusterInput { - s.CacheSecurityGroupNames = v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *ModifyCacheClusterInput) SetEngineVersion(v string) *ModifyCacheClusterInput { - s.EngineVersion = &v - return s -} - -// SetNewAvailabilityZones sets the NewAvailabilityZones field's value. -func (s *ModifyCacheClusterInput) SetNewAvailabilityZones(v []*string) *ModifyCacheClusterInput { - s.NewAvailabilityZones = v - return s -} - -// SetNotificationTopicArn sets the NotificationTopicArn field's value. -func (s *ModifyCacheClusterInput) SetNotificationTopicArn(v string) *ModifyCacheClusterInput { - s.NotificationTopicArn = &v - return s -} - -// SetNotificationTopicStatus sets the NotificationTopicStatus field's value. -func (s *ModifyCacheClusterInput) SetNotificationTopicStatus(v string) *ModifyCacheClusterInput { - s.NotificationTopicStatus = &v - return s -} - -// SetNumCacheNodes sets the NumCacheNodes field's value. -func (s *ModifyCacheClusterInput) SetNumCacheNodes(v int64) *ModifyCacheClusterInput { - s.NumCacheNodes = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *ModifyCacheClusterInput) SetPreferredMaintenanceWindow(v string) *ModifyCacheClusterInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *ModifyCacheClusterInput) SetSecurityGroupIds(v []*string) *ModifyCacheClusterInput { - s.SecurityGroupIds = v - return s -} - -// SetSnapshotRetentionLimit sets the SnapshotRetentionLimit field's value. -func (s *ModifyCacheClusterInput) SetSnapshotRetentionLimit(v int64) *ModifyCacheClusterInput { - s.SnapshotRetentionLimit = &v - return s -} - -// SetSnapshotWindow sets the SnapshotWindow field's value. -func (s *ModifyCacheClusterInput) SetSnapshotWindow(v string) *ModifyCacheClusterInput { - s.SnapshotWindow = &v - return s -} - -type ModifyCacheClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains all of the attributes of a specific cluster. - CacheCluster *CacheCluster `type:"structure"` -} - -// String returns the string representation -func (s ModifyCacheClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyCacheClusterOutput) GoString() string { - return s.String() -} - -// SetCacheCluster sets the CacheCluster field's value. -func (s *ModifyCacheClusterOutput) SetCacheCluster(v *CacheCluster) *ModifyCacheClusterOutput { - s.CacheCluster = v - return s -} - -// Represents the input of a ModifyCacheParameterGroup operation. -type ModifyCacheParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the cache parameter group to modify. - // - // CacheParameterGroupName is a required field - CacheParameterGroupName *string `type:"string" required:"true"` - - // An array of parameter names and values for the parameter update. You must - // supply at least one parameter name and value; subsequent arguments are optional. - // A maximum of 20 parameters may be modified per request. - // - // ParameterNameValues is a required field - ParameterNameValues []*ParameterNameValue `locationNameList:"ParameterNameValue" type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyCacheParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyCacheParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyCacheParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyCacheParameterGroupInput"} - if s.CacheParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) - } - if s.ParameterNameValues == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterNameValues")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *ModifyCacheParameterGroupInput) SetCacheParameterGroupName(v string) *ModifyCacheParameterGroupInput { - s.CacheParameterGroupName = &v - return s -} - -// SetParameterNameValues sets the ParameterNameValues field's value. -func (s *ModifyCacheParameterGroupInput) SetParameterNameValues(v []*ParameterNameValue) *ModifyCacheParameterGroupInput { - s.ParameterNameValues = v - return s -} - -// Represents the input of a ModifyCacheSubnetGroup operation. -type ModifyCacheSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // A description of the cache subnet group. - CacheSubnetGroupDescription *string `type:"string"` - - // The name for the cache subnet group. This value is stored as a lowercase - // string. - // - // Constraints: Must contain no more than 255 alphanumeric characters or hyphens. - // - // Example: mysubnetgroup - // - // CacheSubnetGroupName is a required field - CacheSubnetGroupName *string `type:"string" required:"true"` - - // The EC2 subnet IDs for the cache subnet group. - SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list"` -} - -// String returns the string representation -func (s ModifyCacheSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyCacheSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyCacheSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyCacheSubnetGroupInput"} - if s.CacheSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheSubnetGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheSubnetGroupDescription sets the CacheSubnetGroupDescription field's value. -func (s *ModifyCacheSubnetGroupInput) SetCacheSubnetGroupDescription(v string) *ModifyCacheSubnetGroupInput { - s.CacheSubnetGroupDescription = &v - return s -} - -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *ModifyCacheSubnetGroupInput) SetCacheSubnetGroupName(v string) *ModifyCacheSubnetGroupInput { - s.CacheSubnetGroupName = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *ModifyCacheSubnetGroupInput) SetSubnetIds(v []*string) *ModifyCacheSubnetGroupInput { - s.SubnetIds = v - return s -} - -type ModifyCacheSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // Represents the output of one of the following operations: - // - // * CreateCacheSubnetGroup - // - // * ModifyCacheSubnetGroup - CacheSubnetGroup *CacheSubnetGroup `type:"structure"` -} - -// String returns the string representation -func (s ModifyCacheSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyCacheSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetCacheSubnetGroup sets the CacheSubnetGroup field's value. -func (s *ModifyCacheSubnetGroupOutput) SetCacheSubnetGroup(v *CacheSubnetGroup) *ModifyCacheSubnetGroupOutput { - s.CacheSubnetGroup = v - return s -} - -// Represents the input of a ModifyReplicationGroups operation. -type ModifyReplicationGroupInput struct { - _ struct{} `type:"structure"` - - // If true, this parameter causes the modifications in this request and any - // pending modifications to be applied, asynchronously and as soon as possible, - // regardless of the PreferredMaintenanceWindow setting for the replication - // group. - // - // If false, changes to the nodes in the replication group are applied on the - // next maintenance reboot, or the next failure reboot, whichever occurs first. - // - // Valid values: true | false - // - // Default: false - ApplyImmediately *bool `type:"boolean"` - - // This parameter is currently disabled. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // Determines whether a read replica is automatically promoted to read/write - // primary if the existing primary encounters a failure. - // - // Valid values: true | false - // - // Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover - // on: - // - // * Redis versions earlier than 2.8.6. - // - // * Redis (cluster mode disabled): T1 and T2 cache node types. - // - // * Redis (cluster mode enabled): T1 node types. - AutomaticFailoverEnabled *bool `type:"boolean"` - - // A valid cache node type that you want to scale this replication group to. - CacheNodeType *string `type:"string"` - - // The name of the cache parameter group to apply to all of the clusters in - // this replication group. This change is asynchronously applied as soon as - // possible for parameters when the ApplyImmediately parameter is specified - // as true for this request. - CacheParameterGroupName *string `type:"string"` - - // A list of cache security group names to authorize for the clusters in this - // replication group. This change is asynchronously applied as soon as possible. - // - // This parameter can be used only with replication group containing clusters - // running outside of an Amazon Virtual Private Cloud (Amazon VPC). - // - // Constraints: Must contain no more than 255 alphanumeric characters. Must - // not be Default. - CacheSecurityGroupNames []*string `locationNameList:"CacheSecurityGroupName" type:"list"` - - // The upgraded version of the cache engine to be run on the clusters in the - // replication group. - // - // Important: You can upgrade to a newer engine version (see Selecting a Cache - // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)), - // but you cannot downgrade to an earlier engine version. If you want to use - // an earlier engine version, you must delete the existing replication group - // and create it anew with the earlier engine version. - EngineVersion *string `type:"string"` - - // Deprecated. This parameter is not used. - // - // Deprecated: NodeGroupId has been deprecated - NodeGroupId *string `deprecated:"true" type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications - // are sent. - // - // The Amazon SNS topic owner must be same as the replication group owner. - NotificationTopicArn *string `type:"string"` - - // The status of the Amazon SNS notification topic for the replication group. - // Notifications are sent only if the status is active. - // - // Valid values: active | inactive - NotificationTopicStatus *string `type:"string"` - - // Specifies the weekly time range during which maintenance on the cluster is - // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi - // (24H Clock UTC). The minimum maintenance window is a 60 minute period. - // - // Valid values for ddd are: - // - // * sun - // - // * mon - // - // * tue - // - // * wed - // - // * thu - // - // * fri - // - // * sat - // - // Example: sun:23:00-mon:01:30 - PreferredMaintenanceWindow *string `type:"string"` - - // For replication groups with a single primary, if this parameter is specified, - // ElastiCache promotes the specified cluster in the specified replication group - // to the primary role. The nodes of all other clusters in the replication group - // are read replicas. - PrimaryClusterId *string `type:"string"` - - // A description for the replication group. Maximum length is 255 characters. - ReplicationGroupDescription *string `type:"string"` - - // The identifier of the replication group to modify. - // - // ReplicationGroupId is a required field - ReplicationGroupId *string `type:"string" required:"true"` - - // Specifies the VPC Security Groups associated with the clusters in the replication - // group. - // - // This parameter can be used only with replication group containing clusters - // running in an Amazon Virtual Private Cloud (Amazon VPC). - SecurityGroupIds []*string `locationNameList:"SecurityGroupId" type:"list"` - - // The number of days for which ElastiCache retains automatic node group (shard) - // snapshots before deleting them. For example, if you set SnapshotRetentionLimit - // to 5, a snapshot that was taken today is retained for 5 days before being - // deleted. - // - // Important If the value of SnapshotRetentionLimit is set to zero (0), backups - // are turned off. - SnapshotRetentionLimit *int64 `type:"integer"` - - // The daily time range (in UTC) during which ElastiCache begins taking a daily - // snapshot of the node group (shard) specified by SnapshottingClusterId. - // - // Example: 05:00-09:00 - // - // If you do not specify this parameter, ElastiCache automatically chooses an - // appropriate time range. - SnapshotWindow *string `type:"string"` - - // The cluster ID that is used as the daily snapshot source for the replication - // group. This parameter cannot be set for Redis (cluster mode enabled) replication - // groups. - SnapshottingClusterId *string `type:"string"` -} - -// String returns the string representation -func (s ModifyReplicationGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyReplicationGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyReplicationGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyReplicationGroupInput"} - if s.ReplicationGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *ModifyReplicationGroupInput) SetApplyImmediately(v bool) *ModifyReplicationGroupInput { - s.ApplyImmediately = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *ModifyReplicationGroupInput) SetAutoMinorVersionUpgrade(v bool) *ModifyReplicationGroupInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAutomaticFailoverEnabled sets the AutomaticFailoverEnabled field's value. -func (s *ModifyReplicationGroupInput) SetAutomaticFailoverEnabled(v bool) *ModifyReplicationGroupInput { - s.AutomaticFailoverEnabled = &v - return s -} - -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *ModifyReplicationGroupInput) SetCacheNodeType(v string) *ModifyReplicationGroupInput { - s.CacheNodeType = &v - return s -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *ModifyReplicationGroupInput) SetCacheParameterGroupName(v string) *ModifyReplicationGroupInput { - s.CacheParameterGroupName = &v - return s -} - -// SetCacheSecurityGroupNames sets the CacheSecurityGroupNames field's value. -func (s *ModifyReplicationGroupInput) SetCacheSecurityGroupNames(v []*string) *ModifyReplicationGroupInput { - s.CacheSecurityGroupNames = v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *ModifyReplicationGroupInput) SetEngineVersion(v string) *ModifyReplicationGroupInput { - s.EngineVersion = &v - return s -} - -// SetNodeGroupId sets the NodeGroupId field's value. -func (s *ModifyReplicationGroupInput) SetNodeGroupId(v string) *ModifyReplicationGroupInput { - s.NodeGroupId = &v - return s -} - -// SetNotificationTopicArn sets the NotificationTopicArn field's value. -func (s *ModifyReplicationGroupInput) SetNotificationTopicArn(v string) *ModifyReplicationGroupInput { - s.NotificationTopicArn = &v - return s -} - -// SetNotificationTopicStatus sets the NotificationTopicStatus field's value. -func (s *ModifyReplicationGroupInput) SetNotificationTopicStatus(v string) *ModifyReplicationGroupInput { - s.NotificationTopicStatus = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *ModifyReplicationGroupInput) SetPreferredMaintenanceWindow(v string) *ModifyReplicationGroupInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPrimaryClusterId sets the PrimaryClusterId field's value. -func (s *ModifyReplicationGroupInput) SetPrimaryClusterId(v string) *ModifyReplicationGroupInput { - s.PrimaryClusterId = &v - return s -} - -// SetReplicationGroupDescription sets the ReplicationGroupDescription field's value. -func (s *ModifyReplicationGroupInput) SetReplicationGroupDescription(v string) *ModifyReplicationGroupInput { - s.ReplicationGroupDescription = &v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *ModifyReplicationGroupInput) SetReplicationGroupId(v string) *ModifyReplicationGroupInput { - s.ReplicationGroupId = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *ModifyReplicationGroupInput) SetSecurityGroupIds(v []*string) *ModifyReplicationGroupInput { - s.SecurityGroupIds = v - return s -} - -// SetSnapshotRetentionLimit sets the SnapshotRetentionLimit field's value. -func (s *ModifyReplicationGroupInput) SetSnapshotRetentionLimit(v int64) *ModifyReplicationGroupInput { - s.SnapshotRetentionLimit = &v - return s -} - -// SetSnapshotWindow sets the SnapshotWindow field's value. -func (s *ModifyReplicationGroupInput) SetSnapshotWindow(v string) *ModifyReplicationGroupInput { - s.SnapshotWindow = &v - return s -} - -// SetSnapshottingClusterId sets the SnapshottingClusterId field's value. -func (s *ModifyReplicationGroupInput) SetSnapshottingClusterId(v string) *ModifyReplicationGroupInput { - s.SnapshottingClusterId = &v - return s -} - -type ModifyReplicationGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains all of the attributes of a specific Redis replication group. - ReplicationGroup *ReplicationGroup `type:"structure"` -} - -// String returns the string representation -func (s ModifyReplicationGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyReplicationGroupOutput) GoString() string { - return s.String() -} - -// SetReplicationGroup sets the ReplicationGroup field's value. -func (s *ModifyReplicationGroupOutput) SetReplicationGroup(v *ReplicationGroup) *ModifyReplicationGroupOutput { - s.ReplicationGroup = v - return s -} - -// Represents the input for a ModifyReplicationGroupShardConfiguration operation. -type ModifyReplicationGroupShardConfigurationInput struct { - _ struct{} `type:"structure"` - - // Indicates that the shard reconfiguration process begins immediately. At present, - // the only permitted value for this parameter is true. - // - // Value: true - // - // ApplyImmediately is a required field - ApplyImmediately *bool `type:"boolean" required:"true"` - - // The number of node groups (shards) that results from the modification of - // the shard configuration. - // - // NodeGroupCount is a required field - NodeGroupCount *int64 `type:"integer" required:"true"` - - // If the value of NodeGroupCount is less than the current number of node groups - // (shards), the NodeGroupsToRemove or NodeGroupsToRetain is a required list - // of node group ids to remove from or retain in the cluster. - // - // ElastiCache for Redis will attempt to remove all node groups listed by NodeGroupsToRemove - // from the cluster. - NodeGroupsToRemove []*string `locationNameList:"NodeGroupToRemove" type:"list"` - - // If the value of NodeGroupCount is less than the current number of node groups - // (shards), the NodeGroupsToRemove or NodeGroupsToRetain is a required list - // of node group ids to remove from or retain in the cluster. - // - // ElastiCache for Redis will attempt to remove all node groups except those - // listed by NodeGroupsToRetain from the cluster. - NodeGroupsToRetain []*string `locationNameList:"NodeGroupToRetain" type:"list"` - - // The name of the Redis (cluster mode enabled) cluster (replication group) - // on which the shards are to be configured. - // - // ReplicationGroupId is a required field - ReplicationGroupId *string `type:"string" required:"true"` - - // Specifies the preferred availability zones for each node group in the cluster. - // If the value of NodeGroupCount is greater than the current number of node - // groups (shards), you can use this parameter to specify the preferred availability - // zones of the cluster's shards. If you omit this parameter ElastiCache selects - // availability zones for you. - // - // You can specify this parameter only if the value of NodeGroupCount is greater - // than the current number of node groups (shards). - ReshardingConfiguration []*ReshardingConfiguration `locationNameList:"ReshardingConfiguration" type:"list"` -} - -// String returns the string representation -func (s ModifyReplicationGroupShardConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyReplicationGroupShardConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyReplicationGroupShardConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyReplicationGroupShardConfigurationInput"} - if s.ApplyImmediately == nil { - invalidParams.Add(request.NewErrParamRequired("ApplyImmediately")) - } - if s.NodeGroupCount == nil { - invalidParams.Add(request.NewErrParamRequired("NodeGroupCount")) - } - if s.ReplicationGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) - } - if s.ReshardingConfiguration != nil { - for i, v := range s.ReshardingConfiguration { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReshardingConfiguration", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *ModifyReplicationGroupShardConfigurationInput) SetApplyImmediately(v bool) *ModifyReplicationGroupShardConfigurationInput { - s.ApplyImmediately = &v - return s -} - -// SetNodeGroupCount sets the NodeGroupCount field's value. -func (s *ModifyReplicationGroupShardConfigurationInput) SetNodeGroupCount(v int64) *ModifyReplicationGroupShardConfigurationInput { - s.NodeGroupCount = &v - return s -} - -// SetNodeGroupsToRemove sets the NodeGroupsToRemove field's value. -func (s *ModifyReplicationGroupShardConfigurationInput) SetNodeGroupsToRemove(v []*string) *ModifyReplicationGroupShardConfigurationInput { - s.NodeGroupsToRemove = v - return s -} - -// SetNodeGroupsToRetain sets the NodeGroupsToRetain field's value. -func (s *ModifyReplicationGroupShardConfigurationInput) SetNodeGroupsToRetain(v []*string) *ModifyReplicationGroupShardConfigurationInput { - s.NodeGroupsToRetain = v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *ModifyReplicationGroupShardConfigurationInput) SetReplicationGroupId(v string) *ModifyReplicationGroupShardConfigurationInput { - s.ReplicationGroupId = &v - return s -} - -// SetReshardingConfiguration sets the ReshardingConfiguration field's value. -func (s *ModifyReplicationGroupShardConfigurationInput) SetReshardingConfiguration(v []*ReshardingConfiguration) *ModifyReplicationGroupShardConfigurationInput { - s.ReshardingConfiguration = v - return s -} - -type ModifyReplicationGroupShardConfigurationOutput struct { - _ struct{} `type:"structure"` - - // Contains all of the attributes of a specific Redis replication group. - ReplicationGroup *ReplicationGroup `type:"structure"` -} - -// String returns the string representation -func (s ModifyReplicationGroupShardConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyReplicationGroupShardConfigurationOutput) GoString() string { - return s.String() -} - -// SetReplicationGroup sets the ReplicationGroup field's value. -func (s *ModifyReplicationGroupShardConfigurationOutput) SetReplicationGroup(v *ReplicationGroup) *ModifyReplicationGroupShardConfigurationOutput { - s.ReplicationGroup = v - return s -} - -// Represents a collection of cache nodes in a replication group. One node in -// the node group is the read/write primary node. All the other nodes are read-only -// Replica nodes. -type NodeGroup struct { - _ struct{} `type:"structure"` - - // The identifier for the node group (shard). A Redis (cluster mode disabled) - // replication group contains only 1 node group; therefore, the node group ID - // is 0001. A Redis (cluster mode enabled) replication group contains 1 to 15 - // node groups numbered 0001 to 0015. - NodeGroupId *string `type:"string"` - - // A list containing information about individual nodes within the node group - // (shard). - NodeGroupMembers []*NodeGroupMember `locationNameList:"NodeGroupMember" type:"list"` - - // The endpoint of the primary node in this node group (shard). - PrimaryEndpoint *Endpoint `type:"structure"` - - // The keyspace for this node group (shard). - Slots *string `type:"string"` - - // The current state of this replication group - creating, available, etc. - Status *string `type:"string"` -} - -// String returns the string representation -func (s NodeGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NodeGroup) GoString() string { - return s.String() -} - -// SetNodeGroupId sets the NodeGroupId field's value. -func (s *NodeGroup) SetNodeGroupId(v string) *NodeGroup { - s.NodeGroupId = &v - return s -} - -// SetNodeGroupMembers sets the NodeGroupMembers field's value. -func (s *NodeGroup) SetNodeGroupMembers(v []*NodeGroupMember) *NodeGroup { - s.NodeGroupMembers = v - return s -} - -// SetPrimaryEndpoint sets the PrimaryEndpoint field's value. -func (s *NodeGroup) SetPrimaryEndpoint(v *Endpoint) *NodeGroup { - s.PrimaryEndpoint = v - return s -} - -// SetSlots sets the Slots field's value. -func (s *NodeGroup) SetSlots(v string) *NodeGroup { - s.Slots = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *NodeGroup) SetStatus(v string) *NodeGroup { - s.Status = &v - return s -} - -// Node group (shard) configuration options. Each node group (shard) configuration -// has the following: Slots, PrimaryAvailabilityZone, ReplicaAvailabilityZones, -// ReplicaCount. -type NodeGroupConfiguration struct { - _ struct{} `type:"structure"` - - // The 4-digit id for the node group these configuration values apply to. - NodeGroupId *string `min:"1" type:"string"` - - // The Availability Zone where the primary node of this node group (shard) is - // launched. - PrimaryAvailabilityZone *string `type:"string"` - - // A list of Availability Zones to be used for the read replicas. The number - // of Availability Zones in this list must match the value of ReplicaCount or - // ReplicasPerNodeGroup if not specified. - ReplicaAvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // The number of read replica nodes in this node group (shard). - ReplicaCount *int64 `type:"integer"` - - // A string that specifies the keyspace for a particular node group. Keyspaces - // range from 0 to 16,383. The string is in the format startkey-endkey. - // - // Example: "0-3999" - Slots *string `type:"string"` -} - -// String returns the string representation -func (s NodeGroupConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NodeGroupConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NodeGroupConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NodeGroupConfiguration"} - if s.NodeGroupId != nil && len(*s.NodeGroupId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NodeGroupId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNodeGroupId sets the NodeGroupId field's value. -func (s *NodeGroupConfiguration) SetNodeGroupId(v string) *NodeGroupConfiguration { - s.NodeGroupId = &v - return s -} - -// SetPrimaryAvailabilityZone sets the PrimaryAvailabilityZone field's value. -func (s *NodeGroupConfiguration) SetPrimaryAvailabilityZone(v string) *NodeGroupConfiguration { - s.PrimaryAvailabilityZone = &v - return s -} - -// SetReplicaAvailabilityZones sets the ReplicaAvailabilityZones field's value. -func (s *NodeGroupConfiguration) SetReplicaAvailabilityZones(v []*string) *NodeGroupConfiguration { - s.ReplicaAvailabilityZones = v - return s -} - -// SetReplicaCount sets the ReplicaCount field's value. -func (s *NodeGroupConfiguration) SetReplicaCount(v int64) *NodeGroupConfiguration { - s.ReplicaCount = &v - return s -} - -// SetSlots sets the Slots field's value. -func (s *NodeGroupConfiguration) SetSlots(v string) *NodeGroupConfiguration { - s.Slots = &v - return s -} - -// Represents a single node within a node group (shard). -type NodeGroupMember struct { - _ struct{} `type:"structure"` - - // The ID of the cluster to which the node belongs. - CacheClusterId *string `type:"string"` - - // The ID of the node within its cluster. A node ID is a numeric identifier - // (0001, 0002, etc.). - CacheNodeId *string `type:"string"` - - // The role that is currently assigned to the node - primary or replica. This - // member is only applicable for Redis (cluster mode disabled) replication groups. - CurrentRole *string `type:"string"` - - // The name of the Availability Zone in which the node is located. - PreferredAvailabilityZone *string `type:"string"` - - // The information required for client programs to connect to a node for read - // operations. The read endpoint is only applicable on Redis (cluster mode disabled) - // clusters. - ReadEndpoint *Endpoint `type:"structure"` -} - -// String returns the string representation -func (s NodeGroupMember) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NodeGroupMember) GoString() string { - return s.String() -} - -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *NodeGroupMember) SetCacheClusterId(v string) *NodeGroupMember { - s.CacheClusterId = &v - return s -} - -// SetCacheNodeId sets the CacheNodeId field's value. -func (s *NodeGroupMember) SetCacheNodeId(v string) *NodeGroupMember { - s.CacheNodeId = &v - return s -} - -// SetCurrentRole sets the CurrentRole field's value. -func (s *NodeGroupMember) SetCurrentRole(v string) *NodeGroupMember { - s.CurrentRole = &v - return s -} - -// SetPreferredAvailabilityZone sets the PreferredAvailabilityZone field's value. -func (s *NodeGroupMember) SetPreferredAvailabilityZone(v string) *NodeGroupMember { - s.PreferredAvailabilityZone = &v - return s -} - -// SetReadEndpoint sets the ReadEndpoint field's value. -func (s *NodeGroupMember) SetReadEndpoint(v *Endpoint) *NodeGroupMember { - s.ReadEndpoint = v - return s -} - -// Represents an individual cache node in a snapshot of a cluster. -type NodeSnapshot struct { - _ struct{} `type:"structure"` - - // A unique identifier for the source cluster. - CacheClusterId *string `type:"string"` - - // The date and time when the cache node was created in the source cluster. - CacheNodeCreateTime *time.Time `type:"timestamp"` - - // The cache node identifier for the node in the source cluster. - CacheNodeId *string `type:"string"` - - // The size of the cache on the source cache node. - CacheSize *string `type:"string"` - - // The configuration for the source node group (shard). - NodeGroupConfiguration *NodeGroupConfiguration `type:"structure"` - - // A unique identifier for the source node group (shard). - NodeGroupId *string `type:"string"` - - // The date and time when the source node's metadata and cache data set was - // obtained for the snapshot. - SnapshotCreateTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s NodeSnapshot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NodeSnapshot) GoString() string { - return s.String() -} - -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *NodeSnapshot) SetCacheClusterId(v string) *NodeSnapshot { - s.CacheClusterId = &v - return s -} - -// SetCacheNodeCreateTime sets the CacheNodeCreateTime field's value. -func (s *NodeSnapshot) SetCacheNodeCreateTime(v time.Time) *NodeSnapshot { - s.CacheNodeCreateTime = &v - return s -} - -// SetCacheNodeId sets the CacheNodeId field's value. -func (s *NodeSnapshot) SetCacheNodeId(v string) *NodeSnapshot { - s.CacheNodeId = &v - return s -} - -// SetCacheSize sets the CacheSize field's value. -func (s *NodeSnapshot) SetCacheSize(v string) *NodeSnapshot { - s.CacheSize = &v - return s -} - -// SetNodeGroupConfiguration sets the NodeGroupConfiguration field's value. -func (s *NodeSnapshot) SetNodeGroupConfiguration(v *NodeGroupConfiguration) *NodeSnapshot { - s.NodeGroupConfiguration = v - return s -} - -// SetNodeGroupId sets the NodeGroupId field's value. -func (s *NodeSnapshot) SetNodeGroupId(v string) *NodeSnapshot { - s.NodeGroupId = &v - return s -} - -// SetSnapshotCreateTime sets the SnapshotCreateTime field's value. -func (s *NodeSnapshot) SetSnapshotCreateTime(v time.Time) *NodeSnapshot { - s.SnapshotCreateTime = &v - return s -} - -// Describes a notification topic and its status. Notification topics are used -// for publishing ElastiCache events to subscribers using Amazon Simple Notification -// Service (SNS). -type NotificationConfiguration struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that identifies the topic. - TopicArn *string `type:"string"` - - // The current state of the topic. - TopicStatus *string `type:"string"` -} - -// String returns the string representation -func (s NotificationConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NotificationConfiguration) GoString() string { - return s.String() -} - -// SetTopicArn sets the TopicArn field's value. -func (s *NotificationConfiguration) SetTopicArn(v string) *NotificationConfiguration { - s.TopicArn = &v - return s -} - -// SetTopicStatus sets the TopicStatus field's value. -func (s *NotificationConfiguration) SetTopicStatus(v string) *NotificationConfiguration { - s.TopicStatus = &v - return s -} - -// Describes an individual setting that controls some aspect of ElastiCache -// behavior. -type Parameter struct { - _ struct{} `type:"structure"` - - // The valid range of values for the parameter. - AllowedValues *string `type:"string"` - - // Indicates whether a change to the parameter is applied immediately or requires - // a reboot for the change to be applied. You can force a reboot or wait until - // the next maintenance window's reboot. For more information, see Rebooting - // a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html). - ChangeType *string `type:"string" enum:"ChangeType"` - - // The valid data type for the parameter. - DataType *string `type:"string"` - - // A description of the parameter. - Description *string `type:"string"` - - // Indicates whether (true) or not (false) the parameter can be modified. Some - // parameters have security or operational implications that prevent them from - // being changed. - IsModifiable *bool `type:"boolean"` - - // The earliest cache engine version to which the parameter can apply. - MinimumEngineVersion *string `type:"string"` - - // The name of the parameter. - ParameterName *string `type:"string"` - - // The value of the parameter. - ParameterValue *string `type:"string"` - - // The source of the parameter. - Source *string `type:"string"` -} - -// String returns the string representation -func (s Parameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Parameter) GoString() string { - return s.String() -} - -// SetAllowedValues sets the AllowedValues field's value. -func (s *Parameter) SetAllowedValues(v string) *Parameter { - s.AllowedValues = &v - return s -} - -// SetChangeType sets the ChangeType field's value. -func (s *Parameter) SetChangeType(v string) *Parameter { - s.ChangeType = &v - return s -} - -// SetDataType sets the DataType field's value. -func (s *Parameter) SetDataType(v string) *Parameter { - s.DataType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Parameter) SetDescription(v string) *Parameter { - s.Description = &v - return s -} - -// SetIsModifiable sets the IsModifiable field's value. -func (s *Parameter) SetIsModifiable(v bool) *Parameter { - s.IsModifiable = &v - return s -} - -// SetMinimumEngineVersion sets the MinimumEngineVersion field's value. -func (s *Parameter) SetMinimumEngineVersion(v string) *Parameter { - s.MinimumEngineVersion = &v - return s -} - -// SetParameterName sets the ParameterName field's value. -func (s *Parameter) SetParameterName(v string) *Parameter { - s.ParameterName = &v - return s -} - -// SetParameterValue sets the ParameterValue field's value. -func (s *Parameter) SetParameterValue(v string) *Parameter { - s.ParameterValue = &v - return s -} - -// SetSource sets the Source field's value. -func (s *Parameter) SetSource(v string) *Parameter { - s.Source = &v - return s -} - -// Describes a name-value pair that is used to update the value of a parameter. -type ParameterNameValue struct { - _ struct{} `type:"structure"` - - // The name of the parameter. - ParameterName *string `type:"string"` - - // The value of the parameter. - ParameterValue *string `type:"string"` -} - -// String returns the string representation -func (s ParameterNameValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterNameValue) GoString() string { - return s.String() -} - -// SetParameterName sets the ParameterName field's value. -func (s *ParameterNameValue) SetParameterName(v string) *ParameterNameValue { - s.ParameterName = &v - return s -} - -// SetParameterValue sets the ParameterValue field's value. -func (s *ParameterNameValue) SetParameterValue(v string) *ParameterNameValue { - s.ParameterValue = &v - return s -} - -// A group of settings that are applied to the cluster in the future, or that -// are currently being applied. -type PendingModifiedValues struct { - _ struct{} `type:"structure"` - - // A list of cache node IDs that are being removed (or will be removed) from - // the cluster. A node ID is a 4-digit numeric identifier (0001, 0002, etc.). - CacheNodeIdsToRemove []*string `locationNameList:"CacheNodeId" type:"list"` - - // The cache node type that this cluster or replication group is scaled to. - CacheNodeType *string `type:"string"` - - // The new cache engine version that the cluster runs. - EngineVersion *string `type:"string"` - - // The new number of cache nodes for the cluster. - // - // For clusters running Redis, this value must be 1. For clusters running Memcached, - // this value must be between 1 and 20. - NumCacheNodes *int64 `type:"integer"` -} - -// String returns the string representation -func (s PendingModifiedValues) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingModifiedValues) GoString() string { - return s.String() -} - -// SetCacheNodeIdsToRemove sets the CacheNodeIdsToRemove field's value. -func (s *PendingModifiedValues) SetCacheNodeIdsToRemove(v []*string) *PendingModifiedValues { - s.CacheNodeIdsToRemove = v - return s -} - -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *PendingModifiedValues) SetCacheNodeType(v string) *PendingModifiedValues { - s.CacheNodeType = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *PendingModifiedValues) SetEngineVersion(v string) *PendingModifiedValues { - s.EngineVersion = &v - return s -} - -// SetNumCacheNodes sets the NumCacheNodes field's value. -func (s *PendingModifiedValues) SetNumCacheNodes(v int64) *PendingModifiedValues { - s.NumCacheNodes = &v - return s -} - -// Represents the input of a PurchaseReservedCacheNodesOffering operation. -type PurchaseReservedCacheNodesOfferingInput struct { - _ struct{} `type:"structure"` - - // The number of cache node instances to reserve. - // - // Default: 1 - CacheNodeCount *int64 `type:"integer"` - - // A customer-specified identifier to track this reservation. - // - // The Reserved Cache Node ID is an unique customer-specified identifier to - // track this reservation. If this parameter is not specified, ElastiCache automatically - // generates an identifier for the reservation. - // - // Example: myreservationID - ReservedCacheNodeId *string `type:"string"` - - // The ID of the reserved cache node offering to purchase. - // - // Example: 438012d3-4052-4cc7-b2e3-8d3372e0e706 - // - // ReservedCacheNodesOfferingId is a required field - ReservedCacheNodesOfferingId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PurchaseReservedCacheNodesOfferingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseReservedCacheNodesOfferingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseReservedCacheNodesOfferingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseReservedCacheNodesOfferingInput"} - if s.ReservedCacheNodesOfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedCacheNodesOfferingId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheNodeCount sets the CacheNodeCount field's value. -func (s *PurchaseReservedCacheNodesOfferingInput) SetCacheNodeCount(v int64) *PurchaseReservedCacheNodesOfferingInput { - s.CacheNodeCount = &v - return s -} - -// SetReservedCacheNodeId sets the ReservedCacheNodeId field's value. -func (s *PurchaseReservedCacheNodesOfferingInput) SetReservedCacheNodeId(v string) *PurchaseReservedCacheNodesOfferingInput { - s.ReservedCacheNodeId = &v - return s -} - -// SetReservedCacheNodesOfferingId sets the ReservedCacheNodesOfferingId field's value. -func (s *PurchaseReservedCacheNodesOfferingInput) SetReservedCacheNodesOfferingId(v string) *PurchaseReservedCacheNodesOfferingInput { - s.ReservedCacheNodesOfferingId = &v - return s -} - -type PurchaseReservedCacheNodesOfferingOutput struct { - _ struct{} `type:"structure"` - - // Represents the output of a PurchaseReservedCacheNodesOffering operation. - ReservedCacheNode *ReservedCacheNode `type:"structure"` -} - -// String returns the string representation -func (s PurchaseReservedCacheNodesOfferingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseReservedCacheNodesOfferingOutput) GoString() string { - return s.String() -} - -// SetReservedCacheNode sets the ReservedCacheNode field's value. -func (s *PurchaseReservedCacheNodesOfferingOutput) SetReservedCacheNode(v *ReservedCacheNode) *PurchaseReservedCacheNodesOfferingOutput { - s.ReservedCacheNode = v - return s -} - -// Represents the input of a RebootCacheCluster operation. -type RebootCacheClusterInput struct { - _ struct{} `type:"structure"` - - // The cluster identifier. This parameter is stored as a lowercase string. - // - // CacheClusterId is a required field - CacheClusterId *string `type:"string" required:"true"` - - // A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, - // 0002, etc.). To reboot an entire cluster, specify all of the cache node IDs. - // - // CacheNodeIdsToReboot is a required field - CacheNodeIdsToReboot []*string `locationNameList:"CacheNodeId" type:"list" required:"true"` -} - -// String returns the string representation -func (s RebootCacheClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootCacheClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootCacheClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootCacheClusterInput"} - if s.CacheClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("CacheClusterId")) - } - if s.CacheNodeIdsToReboot == nil { - invalidParams.Add(request.NewErrParamRequired("CacheNodeIdsToReboot")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *RebootCacheClusterInput) SetCacheClusterId(v string) *RebootCacheClusterInput { - s.CacheClusterId = &v - return s -} - -// SetCacheNodeIdsToReboot sets the CacheNodeIdsToReboot field's value. -func (s *RebootCacheClusterInput) SetCacheNodeIdsToReboot(v []*string) *RebootCacheClusterInput { - s.CacheNodeIdsToReboot = v - return s -} - -type RebootCacheClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains all of the attributes of a specific cluster. - CacheCluster *CacheCluster `type:"structure"` -} - -// String returns the string representation -func (s RebootCacheClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootCacheClusterOutput) GoString() string { - return s.String() -} - -// SetCacheCluster sets the CacheCluster field's value. -func (s *RebootCacheClusterOutput) SetCacheCluster(v *CacheCluster) *RebootCacheClusterOutput { - s.CacheCluster = v - return s -} - -// Contains the specific price and frequency of a recurring charges for a reserved -// cache node, or for a reserved cache node offering. -type RecurringCharge struct { - _ struct{} `type:"structure"` - - // The monetary amount of the recurring charge. - RecurringChargeAmount *float64 `type:"double"` - - // The frequency of the recurring charge. - RecurringChargeFrequency *string `type:"string"` -} - -// String returns the string representation -func (s RecurringCharge) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecurringCharge) GoString() string { - return s.String() -} - -// SetRecurringChargeAmount sets the RecurringChargeAmount field's value. -func (s *RecurringCharge) SetRecurringChargeAmount(v float64) *RecurringCharge { - s.RecurringChargeAmount = &v - return s -} - -// SetRecurringChargeFrequency sets the RecurringChargeFrequency field's value. -func (s *RecurringCharge) SetRecurringChargeFrequency(v string) *RecurringCharge { - s.RecurringChargeFrequency = &v - return s -} - -// Represents the input of a RemoveTagsFromResource operation. -type RemoveTagsFromResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource from which you want the tags - // removed, for example arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster - // or arn:aws:elasticache:us-west-2:0123456789:snapshot:mySnapshot. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS - // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // ResourceName is a required field - ResourceName *string `type:"string" required:"true"` - - // A list of TagKeys identifying the tags you want removed from the named resource. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsFromResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *RemoveTagsFromResourceInput) SetResourceName(v string) *RemoveTagsFromResourceInput { - s.ResourceName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsFromResourceInput) SetTagKeys(v []*string) *RemoveTagsFromResourceInput { - s.TagKeys = v - return s -} - -// Contains all of the attributes of a specific Redis replication group. -type ReplicationGroup struct { - _ struct{} `type:"structure"` - - // A flag that enables encryption at-rest when set to true. - // - // You cannot modify the value of AtRestEncryptionEnabled after the cluster - // is created. To enable encryption at-rest on a cluster you must set AtRestEncryptionEnabled - // to true when you create a cluster. - // - // Required: Only available when creating a replication group in an Amazon VPC - // using redis version 3.2.6 or 4.x. - // - // Default: false - AtRestEncryptionEnabled *bool `type:"boolean"` - - // A flag that enables using an AuthToken (password) when issuing Redis commands. - // - // Default: false - AuthTokenEnabled *bool `type:"boolean"` - - // Indicates the status of Multi-AZ with automatic failover for this Redis replication - // group. - // - // Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover - // on: - // - // * Redis versions earlier than 2.8.6. - // - // * Redis (cluster mode disabled): T1 and T2 cache node types. - // - // * Redis (cluster mode enabled): T1 node types. - AutomaticFailover *string `type:"string" enum:"AutomaticFailoverStatus"` - - // The name of the compute and memory capacity node type for each node in the - // replication group. - CacheNodeType *string `type:"string"` - - // A flag indicating whether or not this replication group is cluster enabled; - // i.e., whether its data can be partitioned across multiple shards (API/CLI: - // node groups). - // - // Valid values: true | false - ClusterEnabled *bool `type:"boolean"` - - // The configuration endpoint for this replication group. Use the configuration - // endpoint to connect to this replication group. - ConfigurationEndpoint *Endpoint `type:"structure"` - - // The user supplied description of the replication group. - Description *string `type:"string"` - - // The names of all the cache clusters that are part of this replication group. - MemberClusters []*string `locationNameList:"ClusterId" type:"list"` - - // A list of node groups in this replication group. For Redis (cluster mode - // disabled) replication groups, this is a single-element list. For Redis (cluster - // mode enabled) replication groups, the list contains an entry for each node - // group (shard). - NodeGroups []*NodeGroup `locationNameList:"NodeGroup" type:"list"` - - // A group of settings to be applied to the replication group, either immediately - // or during the next maintenance window. - PendingModifiedValues *ReplicationGroupPendingModifiedValues `type:"structure"` - - // The identifier for the replication group. - ReplicationGroupId *string `type:"string"` - - // The number of days for which ElastiCache retains automatic cluster snapshots - // before deleting them. For example, if you set SnapshotRetentionLimit to 5, - // a snapshot that was taken today is retained for 5 days before being deleted. - // - // If the value of SnapshotRetentionLimit is set to zero (0), backups are turned - // off. - SnapshotRetentionLimit *int64 `type:"integer"` - - // The daily time range (in UTC) during which ElastiCache begins taking a daily - // snapshot of your node group (shard). - // - // Example: 05:00-09:00 - // - // If you do not specify this parameter, ElastiCache automatically chooses an - // appropriate time range. - // - // This parameter is only valid if the Engine parameter is redis. - SnapshotWindow *string `type:"string"` - - // The cluster ID that is used as the daily snapshot source for the replication - // group. - SnapshottingClusterId *string `type:"string"` - - // The current state of this replication group - creating, available, modifying, - // deleting, create-failed, snapshotting. - Status *string `type:"string"` - - // A flag that enables in-transit encryption when set to true. - // - // You cannot modify the value of TransitEncryptionEnabled after the cluster - // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled - // to true when you create a cluster. - // - // Required: Only available when creating a replication group in an Amazon VPC - // using redis version 3.2.6 or 4.x. - // - // Default: false - TransitEncryptionEnabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s ReplicationGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplicationGroup) GoString() string { - return s.String() -} - -// SetAtRestEncryptionEnabled sets the AtRestEncryptionEnabled field's value. -func (s *ReplicationGroup) SetAtRestEncryptionEnabled(v bool) *ReplicationGroup { - s.AtRestEncryptionEnabled = &v - return s -} - -// SetAuthTokenEnabled sets the AuthTokenEnabled field's value. -func (s *ReplicationGroup) SetAuthTokenEnabled(v bool) *ReplicationGroup { - s.AuthTokenEnabled = &v - return s -} - -// SetAutomaticFailover sets the AutomaticFailover field's value. -func (s *ReplicationGroup) SetAutomaticFailover(v string) *ReplicationGroup { - s.AutomaticFailover = &v - return s -} - -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *ReplicationGroup) SetCacheNodeType(v string) *ReplicationGroup { - s.CacheNodeType = &v - return s -} - -// SetClusterEnabled sets the ClusterEnabled field's value. -func (s *ReplicationGroup) SetClusterEnabled(v bool) *ReplicationGroup { - s.ClusterEnabled = &v - return s -} - -// SetConfigurationEndpoint sets the ConfigurationEndpoint field's value. -func (s *ReplicationGroup) SetConfigurationEndpoint(v *Endpoint) *ReplicationGroup { - s.ConfigurationEndpoint = v - return s -} - -// SetDescription sets the Description field's value. -func (s *ReplicationGroup) SetDescription(v string) *ReplicationGroup { - s.Description = &v - return s -} - -// SetMemberClusters sets the MemberClusters field's value. -func (s *ReplicationGroup) SetMemberClusters(v []*string) *ReplicationGroup { - s.MemberClusters = v - return s -} - -// SetNodeGroups sets the NodeGroups field's value. -func (s *ReplicationGroup) SetNodeGroups(v []*NodeGroup) *ReplicationGroup { - s.NodeGroups = v - return s -} - -// SetPendingModifiedValues sets the PendingModifiedValues field's value. -func (s *ReplicationGroup) SetPendingModifiedValues(v *ReplicationGroupPendingModifiedValues) *ReplicationGroup { - s.PendingModifiedValues = v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *ReplicationGroup) SetReplicationGroupId(v string) *ReplicationGroup { - s.ReplicationGroupId = &v - return s -} - -// SetSnapshotRetentionLimit sets the SnapshotRetentionLimit field's value. -func (s *ReplicationGroup) SetSnapshotRetentionLimit(v int64) *ReplicationGroup { - s.SnapshotRetentionLimit = &v - return s -} - -// SetSnapshotWindow sets the SnapshotWindow field's value. -func (s *ReplicationGroup) SetSnapshotWindow(v string) *ReplicationGroup { - s.SnapshotWindow = &v - return s -} - -// SetSnapshottingClusterId sets the SnapshottingClusterId field's value. -func (s *ReplicationGroup) SetSnapshottingClusterId(v string) *ReplicationGroup { - s.SnapshottingClusterId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ReplicationGroup) SetStatus(v string) *ReplicationGroup { - s.Status = &v - return s -} - -// SetTransitEncryptionEnabled sets the TransitEncryptionEnabled field's value. -func (s *ReplicationGroup) SetTransitEncryptionEnabled(v bool) *ReplicationGroup { - s.TransitEncryptionEnabled = &v - return s -} - -// The settings to be applied to the Redis replication group, either immediately -// or during the next maintenance window. -type ReplicationGroupPendingModifiedValues struct { - _ struct{} `type:"structure"` - - // Indicates the status of Multi-AZ with automatic failover for this Redis replication - // group. - // - // Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover - // on: - // - // * Redis versions earlier than 2.8.6. - // - // * Redis (cluster mode disabled): T1 and T2 cache node types. - // - // * Redis (cluster mode enabled): T1 node types. - AutomaticFailoverStatus *string `type:"string" enum:"PendingAutomaticFailoverStatus"` - - // The primary cluster ID that is applied immediately (if --apply-immediately - // was specified), or during the next maintenance window. - PrimaryClusterId *string `type:"string"` - - // The status of an online resharding operation. - Resharding *ReshardingStatus `type:"structure"` -} - -// String returns the string representation -func (s ReplicationGroupPendingModifiedValues) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplicationGroupPendingModifiedValues) GoString() string { - return s.String() -} - -// SetAutomaticFailoverStatus sets the AutomaticFailoverStatus field's value. -func (s *ReplicationGroupPendingModifiedValues) SetAutomaticFailoverStatus(v string) *ReplicationGroupPendingModifiedValues { - s.AutomaticFailoverStatus = &v - return s -} - -// SetPrimaryClusterId sets the PrimaryClusterId field's value. -func (s *ReplicationGroupPendingModifiedValues) SetPrimaryClusterId(v string) *ReplicationGroupPendingModifiedValues { - s.PrimaryClusterId = &v - return s -} - -// SetResharding sets the Resharding field's value. -func (s *ReplicationGroupPendingModifiedValues) SetResharding(v *ReshardingStatus) *ReplicationGroupPendingModifiedValues { - s.Resharding = v - return s -} - -// Represents the output of a PurchaseReservedCacheNodesOffering operation. -type ReservedCacheNode struct { - _ struct{} `type:"structure"` - - // The number of cache nodes that have been reserved. - CacheNodeCount *int64 `type:"integer"` - - // The cache node type for the reserved cache nodes. - // - // The following node types are supported by ElastiCache. Generally speaking, - // the current generation types provide more memory and computational power - // at lower cost when compared to their equivalent previous generation counterparts. - // - // * General purpose: - // - // Current generation: - // - // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium - // - // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - // - // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge - // - // Previous generation: (not recommended) - // - // T1 node types:cache.t1.micro - // - // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge - // - // * Compute optimized: - // - // Previous generation: (not recommended) - // - // C1 node types:cache.c1.xlarge - // - // * Memory optimized: - // - // Current generation: - // - // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, - // cache.r3.8xlarge - // - // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, - // cache.r4.8xlarge, cache.r4.16xlarge - // - // Previous generation: (not recommended) - // - // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge - // - // Notes: - // - // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon - // VPC). - // - // * Redis (cluster mode disabled): Redis backup/restore is not supported - // on T1 and T2 instances. - // - // * Redis (cluster mode enabled): Backup/restore is not supported on T1 - // instances. - // - // * Redis Append-only files (AOF) functionality is not supported for T1 - // or T2 instances. - // - // For a complete listing of node types and specifications, see: - // - // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) - // - // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // - // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) - CacheNodeType *string `type:"string"` - - // The duration of the reservation in seconds. - Duration *int64 `type:"integer"` - - // The fixed price charged for this reserved cache node. - FixedPrice *float64 `type:"double"` - - // The offering type of this reserved cache node. - OfferingType *string `type:"string"` - - // The description of the reserved cache node. - ProductDescription *string `type:"string"` - - // The recurring price charged to run this reserved cache node. - RecurringCharges []*RecurringCharge `locationNameList:"RecurringCharge" type:"list"` - - // The Amazon Resource Name (ARN) of the reserved cache node. - // - // Example: arn:aws:elasticache:us-east-1:123456789012:reserved-instance:ri-2017-03-27-08-33-25-582 - ReservationARN *string `type:"string"` - - // The unique identifier for the reservation. - ReservedCacheNodeId *string `type:"string"` - - // The offering identifier. - ReservedCacheNodesOfferingId *string `type:"string"` - - // The time the reservation started. - StartTime *time.Time `type:"timestamp"` - - // The state of the reserved cache node. - State *string `type:"string"` - - // The hourly price charged for this reserved cache node. - UsagePrice *float64 `type:"double"` -} - -// String returns the string representation -func (s ReservedCacheNode) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedCacheNode) GoString() string { - return s.String() -} - -// SetCacheNodeCount sets the CacheNodeCount field's value. -func (s *ReservedCacheNode) SetCacheNodeCount(v int64) *ReservedCacheNode { - s.CacheNodeCount = &v - return s -} - -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *ReservedCacheNode) SetCacheNodeType(v string) *ReservedCacheNode { - s.CacheNodeType = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *ReservedCacheNode) SetDuration(v int64) *ReservedCacheNode { - s.Duration = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *ReservedCacheNode) SetFixedPrice(v float64) *ReservedCacheNode { - s.FixedPrice = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *ReservedCacheNode) SetOfferingType(v string) *ReservedCacheNode { - s.OfferingType = &v - return s -} - -// SetProductDescription sets the ProductDescription field's value. -func (s *ReservedCacheNode) SetProductDescription(v string) *ReservedCacheNode { - s.ProductDescription = &v - return s -} - -// SetRecurringCharges sets the RecurringCharges field's value. -func (s *ReservedCacheNode) SetRecurringCharges(v []*RecurringCharge) *ReservedCacheNode { - s.RecurringCharges = v - return s -} - -// SetReservationARN sets the ReservationARN field's value. -func (s *ReservedCacheNode) SetReservationARN(v string) *ReservedCacheNode { - s.ReservationARN = &v - return s -} - -// SetReservedCacheNodeId sets the ReservedCacheNodeId field's value. -func (s *ReservedCacheNode) SetReservedCacheNodeId(v string) *ReservedCacheNode { - s.ReservedCacheNodeId = &v - return s -} - -// SetReservedCacheNodesOfferingId sets the ReservedCacheNodesOfferingId field's value. -func (s *ReservedCacheNode) SetReservedCacheNodesOfferingId(v string) *ReservedCacheNode { - s.ReservedCacheNodesOfferingId = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *ReservedCacheNode) SetStartTime(v time.Time) *ReservedCacheNode { - s.StartTime = &v - return s -} - -// SetState sets the State field's value. -func (s *ReservedCacheNode) SetState(v string) *ReservedCacheNode { - s.State = &v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *ReservedCacheNode) SetUsagePrice(v float64) *ReservedCacheNode { - s.UsagePrice = &v - return s -} - -// Describes all of the attributes of a reserved cache node offering. -type ReservedCacheNodesOffering struct { - _ struct{} `type:"structure"` - - // The cache node type for the reserved cache node. - // - // The following node types are supported by ElastiCache. Generally speaking, - // the current generation types provide more memory and computational power - // at lower cost when compared to their equivalent previous generation counterparts. - // - // * General purpose: - // - // Current generation: - // - // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium - // - // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - // - // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge - // - // Previous generation: (not recommended) - // - // T1 node types:cache.t1.micro - // - // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge - // - // * Compute optimized: - // - // Previous generation: (not recommended) - // - // C1 node types:cache.c1.xlarge - // - // * Memory optimized: - // - // Current generation: - // - // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, - // cache.r3.8xlarge - // - // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, - // cache.r4.8xlarge, cache.r4.16xlarge - // - // Previous generation: (not recommended) - // - // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge - // - // Notes: - // - // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon - // VPC). - // - // * Redis (cluster mode disabled): Redis backup/restore is not supported - // on T1 and T2 instances. - // - // * Redis (cluster mode enabled): Backup/restore is not supported on T1 - // instances. - // - // * Redis Append-only files (AOF) functionality is not supported for T1 - // or T2 instances. - // - // For a complete listing of node types and specifications, see: - // - // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) - // - // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // - // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) - CacheNodeType *string `type:"string"` - - // The duration of the offering. in seconds. - Duration *int64 `type:"integer"` - - // The fixed price charged for this offering. - FixedPrice *float64 `type:"double"` - - // The offering type. - OfferingType *string `type:"string"` - - // The cache engine used by the offering. - ProductDescription *string `type:"string"` - - // The recurring price charged to run this reserved cache node. - RecurringCharges []*RecurringCharge `locationNameList:"RecurringCharge" type:"list"` - - // A unique identifier for the reserved cache node offering. - ReservedCacheNodesOfferingId *string `type:"string"` - - // The hourly price charged for this offering. - UsagePrice *float64 `type:"double"` -} - -// String returns the string representation -func (s ReservedCacheNodesOffering) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedCacheNodesOffering) GoString() string { - return s.String() -} - -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *ReservedCacheNodesOffering) SetCacheNodeType(v string) *ReservedCacheNodesOffering { - s.CacheNodeType = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *ReservedCacheNodesOffering) SetDuration(v int64) *ReservedCacheNodesOffering { - s.Duration = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *ReservedCacheNodesOffering) SetFixedPrice(v float64) *ReservedCacheNodesOffering { - s.FixedPrice = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *ReservedCacheNodesOffering) SetOfferingType(v string) *ReservedCacheNodesOffering { - s.OfferingType = &v - return s -} - -// SetProductDescription sets the ProductDescription field's value. -func (s *ReservedCacheNodesOffering) SetProductDescription(v string) *ReservedCacheNodesOffering { - s.ProductDescription = &v - return s -} - -// SetRecurringCharges sets the RecurringCharges field's value. -func (s *ReservedCacheNodesOffering) SetRecurringCharges(v []*RecurringCharge) *ReservedCacheNodesOffering { - s.RecurringCharges = v - return s -} - -// SetReservedCacheNodesOfferingId sets the ReservedCacheNodesOfferingId field's value. -func (s *ReservedCacheNodesOffering) SetReservedCacheNodesOfferingId(v string) *ReservedCacheNodesOffering { - s.ReservedCacheNodesOfferingId = &v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *ReservedCacheNodesOffering) SetUsagePrice(v float64) *ReservedCacheNodesOffering { - s.UsagePrice = &v - return s -} - -// Represents the input of a ResetCacheParameterGroup operation. -type ResetCacheParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the cache parameter group to reset. - // - // CacheParameterGroupName is a required field - CacheParameterGroupName *string `type:"string" required:"true"` - - // An array of parameter names to reset to their default values. If ResetAllParameters - // is true, do not use ParameterNameValues. If ResetAllParameters is false, - // you must specify the name of at least one parameter to reset. - ParameterNameValues []*ParameterNameValue `locationNameList:"ParameterNameValue" type:"list"` - - // If true, all parameters in the cache parameter group are reset to their default - // values. If false, only the parameters listed by ParameterNameValues are reset - // to their default values. - // - // Valid values: true | false - ResetAllParameters *bool `type:"boolean"` -} - -// String returns the string representation -func (s ResetCacheParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetCacheParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetCacheParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetCacheParameterGroupInput"} - if s.CacheParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *ResetCacheParameterGroupInput) SetCacheParameterGroupName(v string) *ResetCacheParameterGroupInput { - s.CacheParameterGroupName = &v - return s -} - -// SetParameterNameValues sets the ParameterNameValues field's value. -func (s *ResetCacheParameterGroupInput) SetParameterNameValues(v []*ParameterNameValue) *ResetCacheParameterGroupInput { - s.ParameterNameValues = v - return s -} - -// SetResetAllParameters sets the ResetAllParameters field's value. -func (s *ResetCacheParameterGroupInput) SetResetAllParameters(v bool) *ResetCacheParameterGroupInput { - s.ResetAllParameters = &v - return s -} - -// A list of PreferredAvailabilityZones objects that specifies the configuration -// of a node group in the resharded cluster. -type ReshardingConfiguration struct { - _ struct{} `type:"structure"` - - // The 4-digit id for the node group these configuration values apply to. - NodeGroupId *string `min:"1" type:"string"` - - // A list of preferred availability zones for the nodes in this cluster. - PreferredAvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` -} - -// String returns the string representation -func (s ReshardingConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReshardingConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReshardingConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReshardingConfiguration"} - if s.NodeGroupId != nil && len(*s.NodeGroupId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NodeGroupId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNodeGroupId sets the NodeGroupId field's value. -func (s *ReshardingConfiguration) SetNodeGroupId(v string) *ReshardingConfiguration { - s.NodeGroupId = &v - return s -} - -// SetPreferredAvailabilityZones sets the PreferredAvailabilityZones field's value. -func (s *ReshardingConfiguration) SetPreferredAvailabilityZones(v []*string) *ReshardingConfiguration { - s.PreferredAvailabilityZones = v - return s -} - -// The status of an online resharding operation. -type ReshardingStatus struct { - _ struct{} `type:"structure"` - - // Represents the progress of an online resharding operation. - SlotMigration *SlotMigration `type:"structure"` -} - -// String returns the string representation -func (s ReshardingStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReshardingStatus) GoString() string { - return s.String() -} - -// SetSlotMigration sets the SlotMigration field's value. -func (s *ReshardingStatus) SetSlotMigration(v *SlotMigration) *ReshardingStatus { - s.SlotMigration = v - return s -} - -// Represents the input of a RevokeCacheSecurityGroupIngress operation. -type RevokeCacheSecurityGroupIngressInput struct { - _ struct{} `type:"structure"` - - // The name of the cache security group to revoke ingress from. - // - // CacheSecurityGroupName is a required field - CacheSecurityGroupName *string `type:"string" required:"true"` - - // The name of the Amazon EC2 security group to revoke access from. - // - // EC2SecurityGroupName is a required field - EC2SecurityGroupName *string `type:"string" required:"true"` - - // The AWS account number of the Amazon EC2 security group owner. Note that - // this is not the same thing as an AWS access key ID - you must provide a valid - // AWS account number for this parameter. - // - // EC2SecurityGroupOwnerId is a required field - EC2SecurityGroupOwnerId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RevokeCacheSecurityGroupIngressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeCacheSecurityGroupIngressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RevokeCacheSecurityGroupIngressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RevokeCacheSecurityGroupIngressInput"} - if s.CacheSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheSecurityGroupName")) - } - if s.EC2SecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("EC2SecurityGroupName")) - } - if s.EC2SecurityGroupOwnerId == nil { - invalidParams.Add(request.NewErrParamRequired("EC2SecurityGroupOwnerId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. -func (s *RevokeCacheSecurityGroupIngressInput) SetCacheSecurityGroupName(v string) *RevokeCacheSecurityGroupIngressInput { - s.CacheSecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. -func (s *RevokeCacheSecurityGroupIngressInput) SetEC2SecurityGroupName(v string) *RevokeCacheSecurityGroupIngressInput { - s.EC2SecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. -func (s *RevokeCacheSecurityGroupIngressInput) SetEC2SecurityGroupOwnerId(v string) *RevokeCacheSecurityGroupIngressInput { - s.EC2SecurityGroupOwnerId = &v - return s -} - -type RevokeCacheSecurityGroupIngressOutput struct { - _ struct{} `type:"structure"` - - // Represents the output of one of the following operations: - // - // * AuthorizeCacheSecurityGroupIngress - // - // * CreateCacheSecurityGroup - // - // * RevokeCacheSecurityGroupIngress - CacheSecurityGroup *CacheSecurityGroup `type:"structure"` -} - -// String returns the string representation -func (s RevokeCacheSecurityGroupIngressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeCacheSecurityGroupIngressOutput) GoString() string { - return s.String() -} - -// SetCacheSecurityGroup sets the CacheSecurityGroup field's value. -func (s *RevokeCacheSecurityGroupIngressOutput) SetCacheSecurityGroup(v *CacheSecurityGroup) *RevokeCacheSecurityGroupIngressOutput { - s.CacheSecurityGroup = v - return s -} - -// Represents a single cache security group and its status. -type SecurityGroupMembership struct { - _ struct{} `type:"structure"` - - // The identifier of the cache security group. - SecurityGroupId *string `type:"string"` - - // The status of the cache security group membership. The status changes whenever - // a cache security group is modified, or when the cache security groups assigned - // to a cluster are modified. - Status *string `type:"string"` -} - -// String returns the string representation -func (s SecurityGroupMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecurityGroupMembership) GoString() string { - return s.String() -} - -// SetSecurityGroupId sets the SecurityGroupId field's value. -func (s *SecurityGroupMembership) SetSecurityGroupId(v string) *SecurityGroupMembership { - s.SecurityGroupId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SecurityGroupMembership) SetStatus(v string) *SecurityGroupMembership { - s.Status = &v - return s -} - -// Represents the progress of an online resharding operation. -type SlotMigration struct { - _ struct{} `type:"structure"` - - // The percentage of the slot migration that is complete. - ProgressPercentage *float64 `type:"double"` -} - -// String returns the string representation -func (s SlotMigration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SlotMigration) GoString() string { - return s.String() -} - -// SetProgressPercentage sets the ProgressPercentage field's value. -func (s *SlotMigration) SetProgressPercentage(v float64) *SlotMigration { - s.ProgressPercentage = &v - return s -} - -// Represents a copy of an entire Redis cluster as of the time when the snapshot -// was taken. -type Snapshot struct { - _ struct{} `type:"structure"` - - // This parameter is currently disabled. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // Indicates the status of Multi-AZ with automatic failover for the source Redis - // replication group. - // - // Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover - // on: - // - // * Redis versions earlier than 2.8.6. - // - // * Redis (cluster mode disabled): T1 and T2 cache node types. - // - // * Redis (cluster mode enabled): T1 node types. - AutomaticFailover *string `type:"string" enum:"AutomaticFailoverStatus"` - - // The date and time when the source cluster was created. - CacheClusterCreateTime *time.Time `type:"timestamp"` - - // The user-supplied identifier of the source cluster. - CacheClusterId *string `type:"string"` - - // The name of the compute and memory capacity node type for the source cluster. - // - // The following node types are supported by ElastiCache. Generally speaking, - // the current generation types provide more memory and computational power - // at lower cost when compared to their equivalent previous generation counterparts. - // - // * General purpose: - // - // Current generation: - // - // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium - // - // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge - // - // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge - // - // Previous generation: (not recommended) - // - // T1 node types:cache.t1.micro - // - // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge - // - // * Compute optimized: - // - // Previous generation: (not recommended) - // - // C1 node types:cache.c1.xlarge - // - // * Memory optimized: - // - // Current generation: - // - // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, - // cache.r3.8xlarge - // - // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, - // cache.r4.8xlarge, cache.r4.16xlarge - // - // Previous generation: (not recommended) - // - // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge - // - // Notes: - // - // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon - // VPC). - // - // * Redis (cluster mode disabled): Redis backup/restore is not supported - // on T1 and T2 instances. - // - // * Redis (cluster mode enabled): Backup/restore is not supported on T1 - // instances. - // - // * Redis Append-only files (AOF) functionality is not supported for T1 - // or T2 instances. - // - // For a complete listing of node types and specifications, see: - // - // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) - // - // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // - // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) - CacheNodeType *string `type:"string"` - - // The cache parameter group that is associated with the source cluster. - CacheParameterGroupName *string `type:"string"` - - // The name of the cache subnet group associated with the source cluster. - CacheSubnetGroupName *string `type:"string"` - - // The name of the cache engine (memcached or redis) used by the source cluster. - Engine *string `type:"string"` - - // The version of the cache engine version that is used by the source cluster. - EngineVersion *string `type:"string"` - - // A list of the cache nodes in the source cluster. - NodeSnapshots []*NodeSnapshot `locationNameList:"NodeSnapshot" type:"list"` - - // The number of cache nodes in the source cluster. - // - // For clusters running Redis, this value must be 1. For clusters running Memcached, - // this value must be between 1 and 20. - NumCacheNodes *int64 `type:"integer"` - - // The number of node groups (shards) in this snapshot. When restoring from - // a snapshot, the number of node groups (shards) in the snapshot and in the - // restored replication group must be the same. - NumNodeGroups *int64 `type:"integer"` - - // The port number used by each cache nodes in the source cluster. - Port *int64 `type:"integer"` - - // The name of the Availability Zone in which the source cluster is located. - PreferredAvailabilityZone *string `type:"string"` - - // Specifies the weekly time range during which maintenance on the cluster is - // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi - // (24H Clock UTC). The minimum maintenance window is a 60 minute period. - // - // Valid values for ddd are: - // - // * sun - // - // * mon - // - // * tue - // - // * wed - // - // * thu - // - // * fri - // - // * sat - // - // Example: sun:23:00-mon:01:30 - PreferredMaintenanceWindow *string `type:"string"` - - // A description of the source replication group. - ReplicationGroupDescription *string `type:"string"` - - // The unique identifier of the source replication group. - ReplicationGroupId *string `type:"string"` - - // The name of a snapshot. For an automatic snapshot, the name is system-generated. - // For a manual snapshot, this is the user-provided name. - SnapshotName *string `type:"string"` - - // For an automatic snapshot, the number of days for which ElastiCache retains - // the snapshot before deleting it. - // - // For manual snapshots, this field reflects the SnapshotRetentionLimit for - // the source cluster when the snapshot was created. This field is otherwise - // ignored: Manual snapshots do not expire, and can only be deleted using the - // DeleteSnapshot operation. - // - // Important If the value of SnapshotRetentionLimit is set to zero (0), backups - // are turned off. - SnapshotRetentionLimit *int64 `type:"integer"` - - // Indicates whether the snapshot is from an automatic backup (automated) or - // was created manually (manual). - SnapshotSource *string `type:"string"` - - // The status of the snapshot. Valid values: creating | available | restoring - // | copying | deleting. - SnapshotStatus *string `type:"string"` - - // The daily time range during which ElastiCache takes daily snapshots of the - // source cluster. - SnapshotWindow *string `type:"string"` - - // The Amazon Resource Name (ARN) for the topic used by the source cluster for - // publishing notifications. - TopicArn *string `type:"string"` - - // The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet - // group for the source cluster. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s Snapshot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Snapshot) GoString() string { - return s.String() -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *Snapshot) SetAutoMinorVersionUpgrade(v bool) *Snapshot { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAutomaticFailover sets the AutomaticFailover field's value. -func (s *Snapshot) SetAutomaticFailover(v string) *Snapshot { - s.AutomaticFailover = &v - return s -} - -// SetCacheClusterCreateTime sets the CacheClusterCreateTime field's value. -func (s *Snapshot) SetCacheClusterCreateTime(v time.Time) *Snapshot { - s.CacheClusterCreateTime = &v - return s -} - -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *Snapshot) SetCacheClusterId(v string) *Snapshot { - s.CacheClusterId = &v - return s -} - -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *Snapshot) SetCacheNodeType(v string) *Snapshot { - s.CacheNodeType = &v - return s -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *Snapshot) SetCacheParameterGroupName(v string) *Snapshot { - s.CacheParameterGroupName = &v - return s -} - -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *Snapshot) SetCacheSubnetGroupName(v string) *Snapshot { - s.CacheSubnetGroupName = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *Snapshot) SetEngine(v string) *Snapshot { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *Snapshot) SetEngineVersion(v string) *Snapshot { - s.EngineVersion = &v - return s -} - -// SetNodeSnapshots sets the NodeSnapshots field's value. -func (s *Snapshot) SetNodeSnapshots(v []*NodeSnapshot) *Snapshot { - s.NodeSnapshots = v - return s -} - -// SetNumCacheNodes sets the NumCacheNodes field's value. -func (s *Snapshot) SetNumCacheNodes(v int64) *Snapshot { - s.NumCacheNodes = &v - return s -} - -// SetNumNodeGroups sets the NumNodeGroups field's value. -func (s *Snapshot) SetNumNodeGroups(v int64) *Snapshot { - s.NumNodeGroups = &v - return s -} - -// SetPort sets the Port field's value. -func (s *Snapshot) SetPort(v int64) *Snapshot { - s.Port = &v - return s -} - -// SetPreferredAvailabilityZone sets the PreferredAvailabilityZone field's value. -func (s *Snapshot) SetPreferredAvailabilityZone(v string) *Snapshot { - s.PreferredAvailabilityZone = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *Snapshot) SetPreferredMaintenanceWindow(v string) *Snapshot { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetReplicationGroupDescription sets the ReplicationGroupDescription field's value. -func (s *Snapshot) SetReplicationGroupDescription(v string) *Snapshot { - s.ReplicationGroupDescription = &v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *Snapshot) SetReplicationGroupId(v string) *Snapshot { - s.ReplicationGroupId = &v - return s -} - -// SetSnapshotName sets the SnapshotName field's value. -func (s *Snapshot) SetSnapshotName(v string) *Snapshot { - s.SnapshotName = &v - return s -} - -// SetSnapshotRetentionLimit sets the SnapshotRetentionLimit field's value. -func (s *Snapshot) SetSnapshotRetentionLimit(v int64) *Snapshot { - s.SnapshotRetentionLimit = &v - return s -} - -// SetSnapshotSource sets the SnapshotSource field's value. -func (s *Snapshot) SetSnapshotSource(v string) *Snapshot { - s.SnapshotSource = &v - return s -} - -// SetSnapshotStatus sets the SnapshotStatus field's value. -func (s *Snapshot) SetSnapshotStatus(v string) *Snapshot { - s.SnapshotStatus = &v - return s -} - -// SetSnapshotWindow sets the SnapshotWindow field's value. -func (s *Snapshot) SetSnapshotWindow(v string) *Snapshot { - s.SnapshotWindow = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *Snapshot) SetTopicArn(v string) *Snapshot { - s.TopicArn = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *Snapshot) SetVpcId(v string) *Snapshot { - s.VpcId = &v - return s -} - -// Represents the subnet associated with a cluster. This parameter refers to -// subnets defined in Amazon Virtual Private Cloud (Amazon VPC) and used with -// ElastiCache. -type Subnet struct { - _ struct{} `type:"structure"` - - // The Availability Zone associated with the subnet. - SubnetAvailabilityZone *AvailabilityZone `type:"structure"` - - // The unique identifier for the subnet. - SubnetIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s Subnet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Subnet) GoString() string { - return s.String() -} - -// SetSubnetAvailabilityZone sets the SubnetAvailabilityZone field's value. -func (s *Subnet) SetSubnetAvailabilityZone(v *AvailabilityZone) *Subnet { - s.SubnetAvailabilityZone = v - return s -} - -// SetSubnetIdentifier sets the SubnetIdentifier field's value. -func (s *Subnet) SetSubnetIdentifier(v string) *Subnet { - s.SubnetIdentifier = &v - return s -} - -// A cost allocation Tag that can be added to an ElastiCache cluster or replication -// group. Tags are composed of a Key/Value pair. A tag with a null Value is -// permitted. -type Tag struct { - _ struct{} `type:"structure"` - - // The key for the tag. May not be null. - Key *string `type:"string"` - - // The tag's value. May be null. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Represents the output from the AddTagsToResource, ListTagsForResource, and -// RemoveTagsFromResource operations. -type TagListMessage struct { - _ struct{} `type:"structure"` - - // A list of cost allocation tags as key-value pairs. - TagList []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s TagListMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagListMessage) GoString() string { - return s.String() -} - -// SetTagList sets the TagList field's value. -func (s *TagListMessage) SetTagList(v []*Tag) *TagListMessage { - s.TagList = v - return s -} - -type TestFailoverInput struct { - _ struct{} `type:"structure"` - - // The name of the node group (called shard in the console) in this replication - // group on which automatic failover is to be tested. You may test automatic - // failover on up to 5 node groups in any rolling 24-hour period. - // - // NodeGroupId is a required field - NodeGroupId *string `min:"1" type:"string" required:"true"` - - // The name of the replication group (console: cluster) whose automatic failover - // is being tested by this operation. - // - // ReplicationGroupId is a required field - ReplicationGroupId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s TestFailoverInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestFailoverInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TestFailoverInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TestFailoverInput"} - if s.NodeGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("NodeGroupId")) - } - if s.NodeGroupId != nil && len(*s.NodeGroupId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NodeGroupId", 1)) - } - if s.ReplicationGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNodeGroupId sets the NodeGroupId field's value. -func (s *TestFailoverInput) SetNodeGroupId(v string) *TestFailoverInput { - s.NodeGroupId = &v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *TestFailoverInput) SetReplicationGroupId(v string) *TestFailoverInput { - s.ReplicationGroupId = &v - return s -} - -type TestFailoverOutput struct { - _ struct{} `type:"structure"` - - // Contains all of the attributes of a specific Redis replication group. - ReplicationGroup *ReplicationGroup `type:"structure"` -} - -// String returns the string representation -func (s TestFailoverOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestFailoverOutput) GoString() string { - return s.String() -} - -// SetReplicationGroup sets the ReplicationGroup field's value. -func (s *TestFailoverOutput) SetReplicationGroup(v *ReplicationGroup) *TestFailoverOutput { - s.ReplicationGroup = v - return s -} - -const ( - // AZModeSingleAz is a AZMode enum value - AZModeSingleAz = "single-az" - - // AZModeCrossAz is a AZMode enum value - AZModeCrossAz = "cross-az" -) - -const ( - // AutomaticFailoverStatusEnabled is a AutomaticFailoverStatus enum value - AutomaticFailoverStatusEnabled = "enabled" - - // AutomaticFailoverStatusDisabled is a AutomaticFailoverStatus enum value - AutomaticFailoverStatusDisabled = "disabled" - - // AutomaticFailoverStatusEnabling is a AutomaticFailoverStatus enum value - AutomaticFailoverStatusEnabling = "enabling" - - // AutomaticFailoverStatusDisabling is a AutomaticFailoverStatus enum value - AutomaticFailoverStatusDisabling = "disabling" -) - -const ( - // ChangeTypeImmediate is a ChangeType enum value - ChangeTypeImmediate = "immediate" - - // ChangeTypeRequiresReboot is a ChangeType enum value - ChangeTypeRequiresReboot = "requires-reboot" -) - -const ( - // PendingAutomaticFailoverStatusEnabled is a PendingAutomaticFailoverStatus enum value - PendingAutomaticFailoverStatusEnabled = "enabled" - - // PendingAutomaticFailoverStatusDisabled is a PendingAutomaticFailoverStatus enum value - PendingAutomaticFailoverStatusDisabled = "disabled" -) - -const ( - // SourceTypeCacheCluster is a SourceType enum value - SourceTypeCacheCluster = "cache-cluster" - - // SourceTypeCacheParameterGroup is a SourceType enum value - SourceTypeCacheParameterGroup = "cache-parameter-group" - - // SourceTypeCacheSecurityGroup is a SourceType enum value - SourceTypeCacheSecurityGroup = "cache-security-group" - - // SourceTypeCacheSubnetGroup is a SourceType enum value - SourceTypeCacheSubnetGroup = "cache-subnet-group" - - // SourceTypeReplicationGroup is a SourceType enum value - SourceTypeReplicationGroup = "replication-group" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/doc.go deleted file mode 100644 index 317affdc7..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/doc.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package elasticache provides the client and types for making API -// requests to Amazon ElastiCache. -// -// Amazon ElastiCache is a web service that makes it easier to set up, operate, -// and scale a distributed cache in the cloud. -// -// With ElastiCache, customers get all of the benefits of a high-performance, -// in-memory cache with less of the administrative burden involved in launching -// and managing a distributed cache. The service makes setup, scaling, and cluster -// failure handling much simpler than in a self-managed cache deployment. -// -// In addition, through integration with Amazon CloudWatch, customers get enhanced -// visibility into the key performance statistics associated with their cache -// and can receive alarms if a part of their cache runs hot. -// -// See https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02 for more information on this service. -// -// See elasticache package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elasticache/ -// -// Using the Client -// -// To contact Amazon ElastiCache with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon ElastiCache client ElastiCache for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elasticache/#New -package elasticache diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go deleted file mode 100644 index e35a9ece8..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go +++ /dev/null @@ -1,326 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elasticache - -const ( - - // ErrCodeAPICallRateForCustomerExceededFault for service response error code - // "APICallRateForCustomerExceeded". - // - // The customer has exceeded the allowed rate of API calls. - ErrCodeAPICallRateForCustomerExceededFault = "APICallRateForCustomerExceeded" - - // ErrCodeAuthorizationAlreadyExistsFault for service response error code - // "AuthorizationAlreadyExists". - // - // The specified Amazon EC2 security group is already authorized for the specified - // cache security group. - ErrCodeAuthorizationAlreadyExistsFault = "AuthorizationAlreadyExists" - - // ErrCodeAuthorizationNotFoundFault for service response error code - // "AuthorizationNotFound". - // - // The specified Amazon EC2 security group is not authorized for the specified - // cache security group. - ErrCodeAuthorizationNotFoundFault = "AuthorizationNotFound" - - // ErrCodeCacheClusterAlreadyExistsFault for service response error code - // "CacheClusterAlreadyExists". - // - // You already have a cluster with the given identifier. - ErrCodeCacheClusterAlreadyExistsFault = "CacheClusterAlreadyExists" - - // ErrCodeCacheClusterNotFoundFault for service response error code - // "CacheClusterNotFound". - // - // The requested cluster ID does not refer to an existing cluster. - ErrCodeCacheClusterNotFoundFault = "CacheClusterNotFound" - - // ErrCodeCacheParameterGroupAlreadyExistsFault for service response error code - // "CacheParameterGroupAlreadyExists". - // - // A cache parameter group with the requested name already exists. - ErrCodeCacheParameterGroupAlreadyExistsFault = "CacheParameterGroupAlreadyExists" - - // ErrCodeCacheParameterGroupNotFoundFault for service response error code - // "CacheParameterGroupNotFound". - // - // The requested cache parameter group name does not refer to an existing cache - // parameter group. - ErrCodeCacheParameterGroupNotFoundFault = "CacheParameterGroupNotFound" - - // ErrCodeCacheParameterGroupQuotaExceededFault for service response error code - // "CacheParameterGroupQuotaExceeded". - // - // The request cannot be processed because it would exceed the maximum number - // of cache security groups. - ErrCodeCacheParameterGroupQuotaExceededFault = "CacheParameterGroupQuotaExceeded" - - // ErrCodeCacheSecurityGroupAlreadyExistsFault for service response error code - // "CacheSecurityGroupAlreadyExists". - // - // A cache security group with the specified name already exists. - ErrCodeCacheSecurityGroupAlreadyExistsFault = "CacheSecurityGroupAlreadyExists" - - // ErrCodeCacheSecurityGroupNotFoundFault for service response error code - // "CacheSecurityGroupNotFound". - // - // The requested cache security group name does not refer to an existing cache - // security group. - ErrCodeCacheSecurityGroupNotFoundFault = "CacheSecurityGroupNotFound" - - // ErrCodeCacheSecurityGroupQuotaExceededFault for service response error code - // "QuotaExceeded.CacheSecurityGroup". - // - // The request cannot be processed because it would exceed the allowed number - // of cache security groups. - ErrCodeCacheSecurityGroupQuotaExceededFault = "QuotaExceeded.CacheSecurityGroup" - - // ErrCodeCacheSubnetGroupAlreadyExistsFault for service response error code - // "CacheSubnetGroupAlreadyExists". - // - // The requested cache subnet group name is already in use by an existing cache - // subnet group. - ErrCodeCacheSubnetGroupAlreadyExistsFault = "CacheSubnetGroupAlreadyExists" - - // ErrCodeCacheSubnetGroupInUse for service response error code - // "CacheSubnetGroupInUse". - // - // The requested cache subnet group is currently in use. - ErrCodeCacheSubnetGroupInUse = "CacheSubnetGroupInUse" - - // ErrCodeCacheSubnetGroupNotFoundFault for service response error code - // "CacheSubnetGroupNotFoundFault". - // - // The requested cache subnet group name does not refer to an existing cache - // subnet group. - ErrCodeCacheSubnetGroupNotFoundFault = "CacheSubnetGroupNotFoundFault" - - // ErrCodeCacheSubnetGroupQuotaExceededFault for service response error code - // "CacheSubnetGroupQuotaExceeded". - // - // The request cannot be processed because it would exceed the allowed number - // of cache subnet groups. - ErrCodeCacheSubnetGroupQuotaExceededFault = "CacheSubnetGroupQuotaExceeded" - - // ErrCodeCacheSubnetQuotaExceededFault for service response error code - // "CacheSubnetQuotaExceededFault". - // - // The request cannot be processed because it would exceed the allowed number - // of subnets in a cache subnet group. - ErrCodeCacheSubnetQuotaExceededFault = "CacheSubnetQuotaExceededFault" - - // ErrCodeClusterQuotaForCustomerExceededFault for service response error code - // "ClusterQuotaForCustomerExceeded". - // - // The request cannot be processed because it would exceed the allowed number - // of clusters per customer. - ErrCodeClusterQuotaForCustomerExceededFault = "ClusterQuotaForCustomerExceeded" - - // ErrCodeInsufficientCacheClusterCapacityFault for service response error code - // "InsufficientCacheClusterCapacity". - // - // The requested cache node type is not available in the specified Availability - // Zone. - ErrCodeInsufficientCacheClusterCapacityFault = "InsufficientCacheClusterCapacity" - - // ErrCodeInvalidARNFault for service response error code - // "InvalidARN". - // - // The requested Amazon Resource Name (ARN) does not refer to an existing resource. - ErrCodeInvalidARNFault = "InvalidARN" - - // ErrCodeInvalidCacheClusterStateFault for service response error code - // "InvalidCacheClusterState". - // - // The requested cluster is not in the available state. - ErrCodeInvalidCacheClusterStateFault = "InvalidCacheClusterState" - - // ErrCodeInvalidCacheParameterGroupStateFault for service response error code - // "InvalidCacheParameterGroupState". - // - // The current state of the cache parameter group does not allow the requested - // operation to occur. - ErrCodeInvalidCacheParameterGroupStateFault = "InvalidCacheParameterGroupState" - - // ErrCodeInvalidCacheSecurityGroupStateFault for service response error code - // "InvalidCacheSecurityGroupState". - // - // The current state of the cache security group does not allow deletion. - ErrCodeInvalidCacheSecurityGroupStateFault = "InvalidCacheSecurityGroupState" - - // ErrCodeInvalidParameterCombinationException for service response error code - // "InvalidParameterCombination". - // - // Two or more incompatible parameters were specified. - ErrCodeInvalidParameterCombinationException = "InvalidParameterCombination" - - // ErrCodeInvalidParameterValueException for service response error code - // "InvalidParameterValue". - // - // The value for a parameter is invalid. - ErrCodeInvalidParameterValueException = "InvalidParameterValue" - - // ErrCodeInvalidReplicationGroupStateFault for service response error code - // "InvalidReplicationGroupState". - // - // The requested replication group is not in the available state. - ErrCodeInvalidReplicationGroupStateFault = "InvalidReplicationGroupState" - - // ErrCodeInvalidSnapshotStateFault for service response error code - // "InvalidSnapshotState". - // - // The current state of the snapshot does not allow the requested operation - // to occur. - ErrCodeInvalidSnapshotStateFault = "InvalidSnapshotState" - - // ErrCodeInvalidSubnet for service response error code - // "InvalidSubnet". - // - // An invalid subnet identifier was specified. - ErrCodeInvalidSubnet = "InvalidSubnet" - - // ErrCodeInvalidVPCNetworkStateFault for service response error code - // "InvalidVPCNetworkStateFault". - // - // The VPC network is in an invalid state. - ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault" - - // ErrCodeNoOperationFault for service response error code - // "NoOperationFault". - // - // The operation was not performed because no changes were required. - ErrCodeNoOperationFault = "NoOperationFault" - - // ErrCodeNodeGroupNotFoundFault for service response error code - // "NodeGroupNotFoundFault". - // - // The node group specified by the NodeGroupId parameter could not be found. - // Please verify that the node group exists and that you spelled the NodeGroupId - // value correctly. - ErrCodeNodeGroupNotFoundFault = "NodeGroupNotFoundFault" - - // ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault for service response error code - // "NodeGroupsPerReplicationGroupQuotaExceeded". - // - // The request cannot be processed because it would exceed the maximum allowed - // number of node groups (shards) in a single replication group. The default - // maximum is 15 - ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault = "NodeGroupsPerReplicationGroupQuotaExceeded" - - // ErrCodeNodeQuotaForClusterExceededFault for service response error code - // "NodeQuotaForClusterExceeded". - // - // The request cannot be processed because it would exceed the allowed number - // of cache nodes in a single cluster. - ErrCodeNodeQuotaForClusterExceededFault = "NodeQuotaForClusterExceeded" - - // ErrCodeNodeQuotaForCustomerExceededFault for service response error code - // "NodeQuotaForCustomerExceeded". - // - // The request cannot be processed because it would exceed the allowed number - // of cache nodes per customer. - ErrCodeNodeQuotaForCustomerExceededFault = "NodeQuotaForCustomerExceeded" - - // ErrCodeReplicationGroupAlreadyExistsFault for service response error code - // "ReplicationGroupAlreadyExists". - // - // The specified replication group already exists. - ErrCodeReplicationGroupAlreadyExistsFault = "ReplicationGroupAlreadyExists" - - // ErrCodeReplicationGroupNotFoundFault for service response error code - // "ReplicationGroupNotFoundFault". - // - // The specified replication group does not exist. - ErrCodeReplicationGroupNotFoundFault = "ReplicationGroupNotFoundFault" - - // ErrCodeReservedCacheNodeAlreadyExistsFault for service response error code - // "ReservedCacheNodeAlreadyExists". - // - // You already have a reservation with the given identifier. - ErrCodeReservedCacheNodeAlreadyExistsFault = "ReservedCacheNodeAlreadyExists" - - // ErrCodeReservedCacheNodeNotFoundFault for service response error code - // "ReservedCacheNodeNotFound". - // - // The requested reserved cache node was not found. - ErrCodeReservedCacheNodeNotFoundFault = "ReservedCacheNodeNotFound" - - // ErrCodeReservedCacheNodeQuotaExceededFault for service response error code - // "ReservedCacheNodeQuotaExceeded". - // - // The request cannot be processed because it would exceed the user's cache - // node quota. - ErrCodeReservedCacheNodeQuotaExceededFault = "ReservedCacheNodeQuotaExceeded" - - // ErrCodeReservedCacheNodesOfferingNotFoundFault for service response error code - // "ReservedCacheNodesOfferingNotFound". - // - // The requested cache node offering does not exist. - ErrCodeReservedCacheNodesOfferingNotFoundFault = "ReservedCacheNodesOfferingNotFound" - - // ErrCodeServiceLinkedRoleNotFoundFault for service response error code - // "ServiceLinkedRoleNotFoundFault". - // - // The specified service linked role (SLR) was not found. - ErrCodeServiceLinkedRoleNotFoundFault = "ServiceLinkedRoleNotFoundFault" - - // ErrCodeSnapshotAlreadyExistsFault for service response error code - // "SnapshotAlreadyExistsFault". - // - // You already have a snapshot with the given name. - ErrCodeSnapshotAlreadyExistsFault = "SnapshotAlreadyExistsFault" - - // ErrCodeSnapshotFeatureNotSupportedFault for service response error code - // "SnapshotFeatureNotSupportedFault". - // - // You attempted one of the following operations: - // - // * Creating a snapshot of a Redis cluster running on a cache.t1.micro cache - // node. - // - // * Creating a snapshot of a cluster that is running Memcached rather than - // Redis. - // - // Neither of these are supported by ElastiCache. - ErrCodeSnapshotFeatureNotSupportedFault = "SnapshotFeatureNotSupportedFault" - - // ErrCodeSnapshotNotFoundFault for service response error code - // "SnapshotNotFoundFault". - // - // The requested snapshot name does not refer to an existing snapshot. - ErrCodeSnapshotNotFoundFault = "SnapshotNotFoundFault" - - // ErrCodeSnapshotQuotaExceededFault for service response error code - // "SnapshotQuotaExceededFault". - // - // The request cannot be processed because it would exceed the maximum number - // of snapshots. - ErrCodeSnapshotQuotaExceededFault = "SnapshotQuotaExceededFault" - - // ErrCodeSubnetInUse for service response error code - // "SubnetInUse". - // - // The requested subnet is being used by another cache subnet group. - ErrCodeSubnetInUse = "SubnetInUse" - - // ErrCodeTagNotFoundFault for service response error code - // "TagNotFound". - // - // The requested tag was not found on this resource. - ErrCodeTagNotFoundFault = "TagNotFound" - - // ErrCodeTagQuotaPerResourceExceeded for service response error code - // "TagQuotaPerResourceExceeded". - // - // The request cannot be processed because it would cause the resource to have - // more than the allowed number of tags. The maximum number of tags permitted - // on a resource is 50. - ErrCodeTagQuotaPerResourceExceeded = "TagQuotaPerResourceExceeded" - - // ErrCodeTestFailoverNotAvailableFault for service response error code - // "TestFailoverNotAvailableFault". - // - // The TestFailover action is not available. - ErrCodeTestFailoverNotAvailableFault = "TestFailoverNotAvailableFault" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/service.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/service.go deleted file mode 100644 index fd5f8c517..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elasticache - -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/query" -) - -// ElastiCache provides the API operation methods for making requests to -// Amazon ElastiCache. See this package's package overview docs -// for details on the service. -// -// ElastiCache methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ElastiCache 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 = "elasticache" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "ElastiCache" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ElastiCache client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a ElastiCache client from just a session. -// svc := elasticache.New(mySession) -// -// // Create a ElastiCache client with additional configuration -// svc := elasticache.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ElastiCache { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ElastiCache { - svc := &ElastiCache{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-02-02", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ElastiCache operation and runs any -// custom request initialization. -func (c *ElastiCache) 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/elasticache/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/waiters.go deleted file mode 100644 index 4304726d7..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/waiters.go +++ /dev/null @@ -1,264 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elasticache - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilCacheClusterAvailable uses the Amazon ElastiCache API operation -// DescribeCacheClusters to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ElastiCache) WaitUntilCacheClusterAvailable(input *DescribeCacheClustersInput) error { - return c.WaitUntilCacheClusterAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilCacheClusterAvailableWithContext is an extended version of WaitUntilCacheClusterAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) WaitUntilCacheClusterAvailableWithContext(ctx aws.Context, input *DescribeCacheClustersInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilCacheClusterAvailable", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus", - Expected: "deleted", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus", - Expected: "deleting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus", - Expected: "incompatible-network", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus", - Expected: "restore-failed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeCacheClustersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeCacheClustersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilCacheClusterDeleted uses the Amazon ElastiCache API operation -// DescribeCacheClusters to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ElastiCache) WaitUntilCacheClusterDeleted(input *DescribeCacheClustersInput) error { - return c.WaitUntilCacheClusterDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilCacheClusterDeletedWithContext is an extended version of WaitUntilCacheClusterDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) WaitUntilCacheClusterDeletedWithContext(ctx aws.Context, input *DescribeCacheClustersInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilCacheClusterDeleted", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus", - Expected: "deleted", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "CacheClusterNotFound", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus", - Expected: "creating", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus", - Expected: "incompatible-network", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus", - Expected: "modifying", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus", - Expected: "restore-failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus", - Expected: "snapshotting", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeCacheClustersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeCacheClustersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilReplicationGroupAvailable uses the Amazon ElastiCache API operation -// DescribeReplicationGroups to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ElastiCache) WaitUntilReplicationGroupAvailable(input *DescribeReplicationGroupsInput) error { - return c.WaitUntilReplicationGroupAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilReplicationGroupAvailableWithContext is an extended version of WaitUntilReplicationGroupAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) WaitUntilReplicationGroupAvailableWithContext(ctx aws.Context, input *DescribeReplicationGroupsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilReplicationGroupAvailable", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "ReplicationGroups[].Status", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationGroups[].Status", - Expected: "deleted", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeReplicationGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilReplicationGroupDeleted uses the Amazon ElastiCache API operation -// DescribeReplicationGroups to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ElastiCache) WaitUntilReplicationGroupDeleted(input *DescribeReplicationGroupsInput) error { - return c.WaitUntilReplicationGroupDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilReplicationGroupDeletedWithContext is an extended version of WaitUntilReplicationGroupDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElastiCache) WaitUntilReplicationGroupDeletedWithContext(ctx aws.Context, input *DescribeReplicationGroupsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilReplicationGroupDeleted", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "ReplicationGroups[].Status", - Expected: "deleted", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationGroups[].Status", - Expected: "available", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ReplicationGroupNotFoundFault", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeReplicationGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} 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 deleted file mode 100644 index a91da3f52..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go +++ /dev/null @@ -1,11767 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elasticbeanstalk - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/query" -) - -const opAbortEnvironmentUpdate = "AbortEnvironmentUpdate" - -// AbortEnvironmentUpdateRequest generates a "aws/request.Request" representing the -// client's request for the AbortEnvironmentUpdate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AbortEnvironmentUpdate for more information on using the AbortEnvironmentUpdate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AbortEnvironmentUpdateRequest method. -// req, resp := client.AbortEnvironmentUpdateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/AbortEnvironmentUpdate -func (c *ElasticBeanstalk) AbortEnvironmentUpdateRequest(input *AbortEnvironmentUpdateInput) (req *request.Request, output *AbortEnvironmentUpdateOutput) { - op := &request.Operation{ - Name: opAbortEnvironmentUpdate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AbortEnvironmentUpdateInput{} - } - - output = &AbortEnvironmentUpdateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AbortEnvironmentUpdate API operation for AWS Elastic Beanstalk. -// -// Cancels in-progress environment configuration update or application version -// 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 Elastic Beanstalk's -// API operation AbortEnvironmentUpdate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/AbortEnvironmentUpdate -func (c *ElasticBeanstalk) AbortEnvironmentUpdate(input *AbortEnvironmentUpdateInput) (*AbortEnvironmentUpdateOutput, error) { - req, out := c.AbortEnvironmentUpdateRequest(input) - return out, req.Send() -} - -// AbortEnvironmentUpdateWithContext is the same as AbortEnvironmentUpdate with the addition of -// the ability to pass a context and additional request options. -// -// See AbortEnvironmentUpdate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) AbortEnvironmentUpdateWithContext(ctx aws.Context, input *AbortEnvironmentUpdateInput, opts ...request.Option) (*AbortEnvironmentUpdateOutput, error) { - req, out := c.AbortEnvironmentUpdateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opApplyEnvironmentManagedAction = "ApplyEnvironmentManagedAction" - -// ApplyEnvironmentManagedActionRequest generates a "aws/request.Request" representing the -// client's request for the ApplyEnvironmentManagedAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ApplyEnvironmentManagedAction for more information on using the ApplyEnvironmentManagedAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ApplyEnvironmentManagedActionRequest method. -// req, resp := client.ApplyEnvironmentManagedActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ApplyEnvironmentManagedAction -func (c *ElasticBeanstalk) ApplyEnvironmentManagedActionRequest(input *ApplyEnvironmentManagedActionInput) (req *request.Request, output *ApplyEnvironmentManagedActionOutput) { - op := &request.Operation{ - Name: opApplyEnvironmentManagedAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ApplyEnvironmentManagedActionInput{} - } - - output = &ApplyEnvironmentManagedActionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ApplyEnvironmentManagedAction API operation for AWS Elastic Beanstalk. -// -// Applies a scheduled managed action immediately. A managed action can be applied -// only if its status is Scheduled. Get the status and action ID of a managed -// action with DescribeEnvironmentManagedActions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation ApplyEnvironmentManagedAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ElasticBeanstalkServiceException" -// A generic service exception has occurred. -// -// * ErrCodeManagedActionInvalidStateException "ManagedActionInvalidStateException" -// Cannot modify the managed action in its current state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ApplyEnvironmentManagedAction -func (c *ElasticBeanstalk) ApplyEnvironmentManagedAction(input *ApplyEnvironmentManagedActionInput) (*ApplyEnvironmentManagedActionOutput, error) { - req, out := c.ApplyEnvironmentManagedActionRequest(input) - return out, req.Send() -} - -// ApplyEnvironmentManagedActionWithContext is the same as ApplyEnvironmentManagedAction with the addition of -// the ability to pass a context and additional request options. -// -// See ApplyEnvironmentManagedAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) ApplyEnvironmentManagedActionWithContext(ctx aws.Context, input *ApplyEnvironmentManagedActionInput, opts ...request.Option) (*ApplyEnvironmentManagedActionOutput, error) { - req, out := c.ApplyEnvironmentManagedActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCheckDNSAvailability = "CheckDNSAvailability" - -// CheckDNSAvailabilityRequest generates a "aws/request.Request" representing the -// client's request for the CheckDNSAvailability operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CheckDNSAvailability for more information on using the CheckDNSAvailability -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CheckDNSAvailabilityRequest method. -// req, resp := client.CheckDNSAvailabilityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CheckDNSAvailability -func (c *ElasticBeanstalk) CheckDNSAvailabilityRequest(input *CheckDNSAvailabilityInput) (req *request.Request, output *CheckDNSAvailabilityOutput) { - op := &request.Operation{ - Name: opCheckDNSAvailability, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CheckDNSAvailabilityInput{} - } - - output = &CheckDNSAvailabilityOutput{} - req = c.newRequest(op, input, output) - return -} - -// CheckDNSAvailability API operation for AWS Elastic Beanstalk. -// -// Checks if the specified CNAME is available. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation CheckDNSAvailability for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CheckDNSAvailability -func (c *ElasticBeanstalk) CheckDNSAvailability(input *CheckDNSAvailabilityInput) (*CheckDNSAvailabilityOutput, error) { - req, out := c.CheckDNSAvailabilityRequest(input) - return out, req.Send() -} - -// CheckDNSAvailabilityWithContext is the same as CheckDNSAvailability with the addition of -// the ability to pass a context and additional request options. -// -// See CheckDNSAvailability for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) CheckDNSAvailabilityWithContext(ctx aws.Context, input *CheckDNSAvailabilityInput, opts ...request.Option) (*CheckDNSAvailabilityOutput, error) { - req, out := c.CheckDNSAvailabilityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opComposeEnvironments = "ComposeEnvironments" - -// ComposeEnvironmentsRequest generates a "aws/request.Request" representing the -// client's request for the ComposeEnvironments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ComposeEnvironments for more information on using the ComposeEnvironments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ComposeEnvironmentsRequest method. -// req, resp := client.ComposeEnvironmentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ComposeEnvironments -func (c *ElasticBeanstalk) ComposeEnvironmentsRequest(input *ComposeEnvironmentsInput) (req *request.Request, output *EnvironmentDescriptionsMessage) { - op := &request.Operation{ - Name: opComposeEnvironments, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ComposeEnvironmentsInput{} - } - - output = &EnvironmentDescriptionsMessage{} - req = c.newRequest(op, input, output) - return -} - -// ComposeEnvironments API operation for AWS Elastic Beanstalk. -// -// Create or update a group of environments that each run a separate component -// of a single application. Takes a list of version labels that specify application -// source bundles for each of the environments to create or update. The name -// of each environment and other required information must be included in the -// source bundles in an environment manifest named env.yaml. See Compose Environments -// (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-mgmt-compose.html) -// for details. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation ComposeEnvironments for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyEnvironmentsException "TooManyEnvironmentsException" -// The specified account has reached its limit of environments. -// -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ComposeEnvironments -func (c *ElasticBeanstalk) ComposeEnvironments(input *ComposeEnvironmentsInput) (*EnvironmentDescriptionsMessage, error) { - req, out := c.ComposeEnvironmentsRequest(input) - return out, req.Send() -} - -// ComposeEnvironmentsWithContext is the same as ComposeEnvironments with the addition of -// the ability to pass a context and additional request options. -// -// See ComposeEnvironments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) ComposeEnvironmentsWithContext(ctx aws.Context, input *ComposeEnvironmentsInput, opts ...request.Option) (*EnvironmentDescriptionsMessage, error) { - req, out := c.ComposeEnvironmentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateApplication = "CreateApplication" - -// CreateApplicationRequest generates a "aws/request.Request" representing the -// client's request for the CreateApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateApplication for more information on using the CreateApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateApplicationRequest method. -// req, resp := client.CreateApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CreateApplication -func (c *ElasticBeanstalk) CreateApplicationRequest(input *CreateApplicationInput) (req *request.Request, output *ApplicationDescriptionMessage) { - op := &request.Operation{ - Name: opCreateApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateApplicationInput{} - } - - output = &ApplicationDescriptionMessage{} - req = c.newRequest(op, input, output) - return -} - -// CreateApplication API operation for AWS Elastic Beanstalk. -// -// Creates an application that has one configuration template named default -// and no application versions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation CreateApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyApplicationsException "TooManyApplicationsException" -// The specified account has reached its limit of applications. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CreateApplication -func (c *ElasticBeanstalk) CreateApplication(input *CreateApplicationInput) (*ApplicationDescriptionMessage, error) { - req, out := c.CreateApplicationRequest(input) - return out, req.Send() -} - -// CreateApplicationWithContext is the same as CreateApplication with the addition of -// the ability to pass a context and additional request options. -// -// See CreateApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) CreateApplicationWithContext(ctx aws.Context, input *CreateApplicationInput, opts ...request.Option) (*ApplicationDescriptionMessage, error) { - req, out := c.CreateApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateApplicationVersion = "CreateApplicationVersion" - -// CreateApplicationVersionRequest generates a "aws/request.Request" representing the -// client's request for the CreateApplicationVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateApplicationVersion for more information on using the CreateApplicationVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateApplicationVersionRequest method. -// req, resp := client.CreateApplicationVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CreateApplicationVersion -func (c *ElasticBeanstalk) CreateApplicationVersionRequest(input *CreateApplicationVersionInput) (req *request.Request, output *ApplicationVersionDescriptionMessage) { - op := &request.Operation{ - Name: opCreateApplicationVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateApplicationVersionInput{} - } - - output = &ApplicationVersionDescriptionMessage{} - req = c.newRequest(op, input, output) - return -} - -// CreateApplicationVersion API operation for AWS Elastic Beanstalk. -// -// Creates an application version for the specified application. You can create -// an application version from a source bundle in Amazon S3, a commit in AWS -// CodeCommit, or the output of an AWS CodeBuild build as follows: -// -// Specify a commit in an AWS CodeCommit repository with SourceBuildInformation. -// -// Specify a build in an AWS CodeBuild with SourceBuildInformation and BuildConfiguration. -// -// Specify a source bundle in S3 with SourceBundle -// -// Omit both SourceBuildInformation and SourceBundle to use the default sample -// application. -// -// Once you create an application version with a specified Amazon S3 bucket -// and key location, you cannot change that Amazon S3 location. If you change -// the Amazon S3 location, you receive an exception when you attempt to launch -// an environment from the application 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 Elastic Beanstalk's -// API operation CreateApplicationVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyApplicationsException "TooManyApplicationsException" -// The specified account has reached its limit of applications. -// -// * ErrCodeTooManyApplicationVersionsException "TooManyApplicationVersionsException" -// The specified account has reached its limit of application versions. -// -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// * ErrCodeS3LocationNotInServiceRegionException "S3LocationNotInServiceRegionException" -// The specified S3 bucket does not belong to the S3 region in which the service -// is running. The following regions are supported: -// -// * IAD/us-east-1 -// -// * PDX/us-west-2 -// -// * DUB/eu-west-1 -// -// * ErrCodeCodeBuildNotInServiceRegionException "CodeBuildNotInServiceRegionException" -// AWS CodeBuild is not available in the specified region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CreateApplicationVersion -func (c *ElasticBeanstalk) CreateApplicationVersion(input *CreateApplicationVersionInput) (*ApplicationVersionDescriptionMessage, error) { - req, out := c.CreateApplicationVersionRequest(input) - return out, req.Send() -} - -// CreateApplicationVersionWithContext is the same as CreateApplicationVersion with the addition of -// the ability to pass a context and additional request options. -// -// See CreateApplicationVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) CreateApplicationVersionWithContext(ctx aws.Context, input *CreateApplicationVersionInput, opts ...request.Option) (*ApplicationVersionDescriptionMessage, error) { - req, out := c.CreateApplicationVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateConfigurationTemplate = "CreateConfigurationTemplate" - -// CreateConfigurationTemplateRequest generates a "aws/request.Request" representing the -// client's request for the CreateConfigurationTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateConfigurationTemplate for more information on using the CreateConfigurationTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateConfigurationTemplateRequest method. -// req, resp := client.CreateConfigurationTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CreateConfigurationTemplate -func (c *ElasticBeanstalk) CreateConfigurationTemplateRequest(input *CreateConfigurationTemplateInput) (req *request.Request, output *ConfigurationSettingsDescription) { - op := &request.Operation{ - Name: opCreateConfigurationTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateConfigurationTemplateInput{} - } - - output = &ConfigurationSettingsDescription{} - req = c.newRequest(op, input, output) - return -} - -// CreateConfigurationTemplate API operation for AWS Elastic Beanstalk. -// -// Creates a configuration template. Templates are associated with a specific -// application and are used to deploy different versions of the application -// with the same configuration settings. -// -// Templates aren't associated with any environment. The EnvironmentName response -// element is always null. -// -// Related Topics -// -// * DescribeConfigurationOptions -// -// * DescribeConfigurationSettings -// -// * ListAvailableSolutionStacks -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation CreateConfigurationTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// * ErrCodeTooManyBucketsException "TooManyBucketsException" -// The specified account has reached its limit of Amazon S3 buckets. -// -// * ErrCodeTooManyConfigurationTemplatesException "TooManyConfigurationTemplatesException" -// The specified account has reached its limit of configuration templates. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CreateConfigurationTemplate -func (c *ElasticBeanstalk) CreateConfigurationTemplate(input *CreateConfigurationTemplateInput) (*ConfigurationSettingsDescription, error) { - req, out := c.CreateConfigurationTemplateRequest(input) - return out, req.Send() -} - -// CreateConfigurationTemplateWithContext is the same as CreateConfigurationTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See CreateConfigurationTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) CreateConfigurationTemplateWithContext(ctx aws.Context, input *CreateConfigurationTemplateInput, opts ...request.Option) (*ConfigurationSettingsDescription, error) { - req, out := c.CreateConfigurationTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateEnvironment = "CreateEnvironment" - -// CreateEnvironmentRequest generates a "aws/request.Request" representing the -// client's request for the CreateEnvironment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateEnvironment for more information on using the CreateEnvironment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateEnvironmentRequest method. -// req, resp := client.CreateEnvironmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CreateEnvironment -func (c *ElasticBeanstalk) CreateEnvironmentRequest(input *CreateEnvironmentInput) (req *request.Request, output *EnvironmentDescription) { - op := &request.Operation{ - Name: opCreateEnvironment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateEnvironmentInput{} - } - - output = &EnvironmentDescription{} - req = c.newRequest(op, input, output) - return -} - -// CreateEnvironment API operation for AWS Elastic Beanstalk. -// -// Launches an environment for the specified application using the specified -// configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation CreateEnvironment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyEnvironmentsException "TooManyEnvironmentsException" -// The specified account has reached its limit of environments. -// -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CreateEnvironment -func (c *ElasticBeanstalk) CreateEnvironment(input *CreateEnvironmentInput) (*EnvironmentDescription, error) { - req, out := c.CreateEnvironmentRequest(input) - return out, req.Send() -} - -// CreateEnvironmentWithContext is the same as CreateEnvironment with the addition of -// the ability to pass a context and additional request options. -// -// See CreateEnvironment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) CreateEnvironmentWithContext(ctx aws.Context, input *CreateEnvironmentInput, opts ...request.Option) (*EnvironmentDescription, error) { - req, out := c.CreateEnvironmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePlatformVersion = "CreatePlatformVersion" - -// CreatePlatformVersionRequest generates a "aws/request.Request" representing the -// client's request for the CreatePlatformVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePlatformVersion for more information on using the CreatePlatformVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePlatformVersionRequest method. -// req, resp := client.CreatePlatformVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CreatePlatformVersion -func (c *ElasticBeanstalk) CreatePlatformVersionRequest(input *CreatePlatformVersionInput) (req *request.Request, output *CreatePlatformVersionOutput) { - op := &request.Operation{ - Name: opCreatePlatformVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePlatformVersionInput{} - } - - output = &CreatePlatformVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePlatformVersion API operation for AWS Elastic Beanstalk. -// -// Create a new version of your custom platform. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation CreatePlatformVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// * ErrCodeServiceException "ElasticBeanstalkServiceException" -// A generic service exception has occurred. -// -// * ErrCodeTooManyPlatformsException "TooManyPlatformsException" -// You have exceeded the maximum number of allowed platforms associated with -// the account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CreatePlatformVersion -func (c *ElasticBeanstalk) CreatePlatformVersion(input *CreatePlatformVersionInput) (*CreatePlatformVersionOutput, error) { - req, out := c.CreatePlatformVersionRequest(input) - return out, req.Send() -} - -// CreatePlatformVersionWithContext is the same as CreatePlatformVersion with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePlatformVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) CreatePlatformVersionWithContext(ctx aws.Context, input *CreatePlatformVersionInput, opts ...request.Option) (*CreatePlatformVersionOutput, error) { - req, out := c.CreatePlatformVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStorageLocation = "CreateStorageLocation" - -// CreateStorageLocationRequest generates a "aws/request.Request" representing the -// client's request for the CreateStorageLocation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateStorageLocation for more information on using the CreateStorageLocation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateStorageLocationRequest method. -// req, resp := client.CreateStorageLocationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CreateStorageLocation -func (c *ElasticBeanstalk) CreateStorageLocationRequest(input *CreateStorageLocationInput) (req *request.Request, output *CreateStorageLocationOutput) { - op := &request.Operation{ - Name: opCreateStorageLocation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateStorageLocationInput{} - } - - output = &CreateStorageLocationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateStorageLocation API operation for AWS Elastic Beanstalk. -// -// Creates a bucket in Amazon S3 to store application versions, logs, and other -// files used by Elastic Beanstalk environments. The Elastic Beanstalk console -// and EB CLI call this API the first time you create an environment in a region. -// If the storage location already exists, CreateStorageLocation still returns -// the bucket name but does not create a new bucket. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation CreateStorageLocation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyBucketsException "TooManyBucketsException" -// The specified account has reached its limit of Amazon S3 buckets. -// -// * ErrCodeS3SubscriptionRequiredException "S3SubscriptionRequiredException" -// The specified account does not have a subscription to Amazon S3. -// -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CreateStorageLocation -func (c *ElasticBeanstalk) CreateStorageLocation(input *CreateStorageLocationInput) (*CreateStorageLocationOutput, error) { - req, out := c.CreateStorageLocationRequest(input) - return out, req.Send() -} - -// CreateStorageLocationWithContext is the same as CreateStorageLocation with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStorageLocation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) CreateStorageLocationWithContext(ctx aws.Context, input *CreateStorageLocationInput, opts ...request.Option) (*CreateStorageLocationOutput, error) { - req, out := c.CreateStorageLocationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApplication = "DeleteApplication" - -// DeleteApplicationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApplication for more information on using the DeleteApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApplicationRequest method. -// req, resp := client.DeleteApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DeleteApplication -func (c *ElasticBeanstalk) DeleteApplicationRequest(input *DeleteApplicationInput) (req *request.Request, output *DeleteApplicationOutput) { - op := &request.Operation{ - Name: opDeleteApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteApplicationInput{} - } - - output = &DeleteApplicationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteApplication API operation for AWS Elastic Beanstalk. -// -// Deletes the specified application along with all associated versions and -// configurations. The application versions will not be deleted from your Amazon -// S3 bucket. -// -// You cannot delete an application that has a running environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DeleteApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOperationInProgressException "OperationInProgressFailure" -// Unable to perform the specified operation because another operation that -// effects an element in this activity is already in progress. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DeleteApplication -func (c *ElasticBeanstalk) DeleteApplication(input *DeleteApplicationInput) (*DeleteApplicationOutput, error) { - req, out := c.DeleteApplicationRequest(input) - return out, req.Send() -} - -// DeleteApplicationWithContext is the same as DeleteApplication with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DeleteApplicationWithContext(ctx aws.Context, input *DeleteApplicationInput, opts ...request.Option) (*DeleteApplicationOutput, error) { - req, out := c.DeleteApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApplicationVersion = "DeleteApplicationVersion" - -// DeleteApplicationVersionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApplicationVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApplicationVersion for more information on using the DeleteApplicationVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApplicationVersionRequest method. -// req, resp := client.DeleteApplicationVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DeleteApplicationVersion -func (c *ElasticBeanstalk) DeleteApplicationVersionRequest(input *DeleteApplicationVersionInput) (req *request.Request, output *DeleteApplicationVersionOutput) { - op := &request.Operation{ - Name: opDeleteApplicationVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteApplicationVersionInput{} - } - - output = &DeleteApplicationVersionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteApplicationVersion API operation for AWS Elastic Beanstalk. -// -// Deletes the specified version from the specified application. -// -// You cannot delete an application version that is associated with a running -// environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DeleteApplicationVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSourceBundleDeletionException "SourceBundleDeletionFailure" -// Unable to delete the Amazon S3 source bundle associated with the application -// version. The application version was deleted successfully. -// -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// * ErrCodeOperationInProgressException "OperationInProgressFailure" -// Unable to perform the specified operation because another operation that -// effects an element in this activity is already in progress. -// -// * ErrCodeS3LocationNotInServiceRegionException "S3LocationNotInServiceRegionException" -// The specified S3 bucket does not belong to the S3 region in which the service -// is running. The following regions are supported: -// -// * IAD/us-east-1 -// -// * PDX/us-west-2 -// -// * DUB/eu-west-1 -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DeleteApplicationVersion -func (c *ElasticBeanstalk) DeleteApplicationVersion(input *DeleteApplicationVersionInput) (*DeleteApplicationVersionOutput, error) { - req, out := c.DeleteApplicationVersionRequest(input) - return out, req.Send() -} - -// DeleteApplicationVersionWithContext is the same as DeleteApplicationVersion with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApplicationVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DeleteApplicationVersionWithContext(ctx aws.Context, input *DeleteApplicationVersionInput, opts ...request.Option) (*DeleteApplicationVersionOutput, error) { - req, out := c.DeleteApplicationVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteConfigurationTemplate = "DeleteConfigurationTemplate" - -// DeleteConfigurationTemplateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteConfigurationTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteConfigurationTemplate for more information on using the DeleteConfigurationTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteConfigurationTemplateRequest method. -// req, resp := client.DeleteConfigurationTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DeleteConfigurationTemplate -func (c *ElasticBeanstalk) DeleteConfigurationTemplateRequest(input *DeleteConfigurationTemplateInput) (req *request.Request, output *DeleteConfigurationTemplateOutput) { - op := &request.Operation{ - Name: opDeleteConfigurationTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteConfigurationTemplateInput{} - } - - output = &DeleteConfigurationTemplateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteConfigurationTemplate API operation for AWS Elastic Beanstalk. -// -// Deletes the specified configuration template. -// -// When you launch an environment using a configuration template, the environment -// gets a copy of the template. You can delete or modify the environment's copy -// of the template without affecting the running environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DeleteConfigurationTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOperationInProgressException "OperationInProgressFailure" -// Unable to perform the specified operation because another operation that -// effects an element in this activity is already in progress. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DeleteConfigurationTemplate -func (c *ElasticBeanstalk) DeleteConfigurationTemplate(input *DeleteConfigurationTemplateInput) (*DeleteConfigurationTemplateOutput, error) { - req, out := c.DeleteConfigurationTemplateRequest(input) - return out, req.Send() -} - -// DeleteConfigurationTemplateWithContext is the same as DeleteConfigurationTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteConfigurationTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DeleteConfigurationTemplateWithContext(ctx aws.Context, input *DeleteConfigurationTemplateInput, opts ...request.Option) (*DeleteConfigurationTemplateOutput, error) { - req, out := c.DeleteConfigurationTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEnvironmentConfiguration = "DeleteEnvironmentConfiguration" - -// DeleteEnvironmentConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEnvironmentConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEnvironmentConfiguration for more information on using the DeleteEnvironmentConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEnvironmentConfigurationRequest method. -// req, resp := client.DeleteEnvironmentConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DeleteEnvironmentConfiguration -func (c *ElasticBeanstalk) DeleteEnvironmentConfigurationRequest(input *DeleteEnvironmentConfigurationInput) (req *request.Request, output *DeleteEnvironmentConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteEnvironmentConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteEnvironmentConfigurationInput{} - } - - output = &DeleteEnvironmentConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteEnvironmentConfiguration API operation for AWS Elastic Beanstalk. -// -// Deletes the draft configuration associated with the running environment. -// -// Updating a running environment with any configuration changes creates a draft -// configuration set. You can get the draft configuration using DescribeConfigurationSettings -// while the update is in progress or if the update fails. The DeploymentStatus -// for the draft configuration indicates whether the deployment is in process -// or has failed. The draft configuration remains in existence until it is deleted -// with this action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DeleteEnvironmentConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DeleteEnvironmentConfiguration -func (c *ElasticBeanstalk) DeleteEnvironmentConfiguration(input *DeleteEnvironmentConfigurationInput) (*DeleteEnvironmentConfigurationOutput, error) { - req, out := c.DeleteEnvironmentConfigurationRequest(input) - return out, req.Send() -} - -// DeleteEnvironmentConfigurationWithContext is the same as DeleteEnvironmentConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEnvironmentConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DeleteEnvironmentConfigurationWithContext(ctx aws.Context, input *DeleteEnvironmentConfigurationInput, opts ...request.Option) (*DeleteEnvironmentConfigurationOutput, error) { - req, out := c.DeleteEnvironmentConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePlatformVersion = "DeletePlatformVersion" - -// DeletePlatformVersionRequest generates a "aws/request.Request" representing the -// client's request for the DeletePlatformVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePlatformVersion for more information on using the DeletePlatformVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePlatformVersionRequest method. -// req, resp := client.DeletePlatformVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DeletePlatformVersion -func (c *ElasticBeanstalk) DeletePlatformVersionRequest(input *DeletePlatformVersionInput) (req *request.Request, output *DeletePlatformVersionOutput) { - op := &request.Operation{ - Name: opDeletePlatformVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePlatformVersionInput{} - } - - output = &DeletePlatformVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeletePlatformVersion API operation for AWS Elastic Beanstalk. -// -// Deletes the specified version of a custom platform. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DeletePlatformVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOperationInProgressException "OperationInProgressFailure" -// Unable to perform the specified operation because another operation that -// effects an element in this activity is already in progress. -// -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// * ErrCodeServiceException "ElasticBeanstalkServiceException" -// A generic service exception has occurred. -// -// * ErrCodePlatformVersionStillReferencedException "PlatformVersionStillReferencedException" -// You cannot delete the platform version because there are still environments -// running on it. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DeletePlatformVersion -func (c *ElasticBeanstalk) DeletePlatformVersion(input *DeletePlatformVersionInput) (*DeletePlatformVersionOutput, error) { - req, out := c.DeletePlatformVersionRequest(input) - return out, req.Send() -} - -// DeletePlatformVersionWithContext is the same as DeletePlatformVersion with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePlatformVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DeletePlatformVersionWithContext(ctx aws.Context, input *DeletePlatformVersionInput, opts ...request.Option) (*DeletePlatformVersionOutput, error) { - req, out := c.DeletePlatformVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccountAttributes = "DescribeAccountAttributes" - -// DescribeAccountAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccountAttributes for more information on using the DescribeAccountAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAccountAttributesRequest method. -// req, resp := client.DescribeAccountAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeAccountAttributes -func (c *ElasticBeanstalk) DescribeAccountAttributesRequest(input *DescribeAccountAttributesInput) (req *request.Request, output *DescribeAccountAttributesOutput) { - op := &request.Operation{ - Name: opDescribeAccountAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAccountAttributesInput{} - } - - output = &DescribeAccountAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccountAttributes API operation for AWS Elastic Beanstalk. -// -// Returns attributes related to AWS Elastic Beanstalk that are associated with -// the calling AWS account. -// -// The result currently has one set of attributes—resource quotas. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DescribeAccountAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeAccountAttributes -func (c *ElasticBeanstalk) DescribeAccountAttributes(input *DescribeAccountAttributesInput) (*DescribeAccountAttributesOutput, error) { - req, out := c.DescribeAccountAttributesRequest(input) - return out, req.Send() -} - -// DescribeAccountAttributesWithContext is the same as DescribeAccountAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DescribeAccountAttributesWithContext(ctx aws.Context, input *DescribeAccountAttributesInput, opts ...request.Option) (*DescribeAccountAttributesOutput, error) { - req, out := c.DescribeAccountAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeApplicationVersions = "DescribeApplicationVersions" - -// DescribeApplicationVersionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeApplicationVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeApplicationVersions for more information on using the DescribeApplicationVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeApplicationVersionsRequest method. -// req, resp := client.DescribeApplicationVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeApplicationVersions -func (c *ElasticBeanstalk) DescribeApplicationVersionsRequest(input *DescribeApplicationVersionsInput) (req *request.Request, output *DescribeApplicationVersionsOutput) { - op := &request.Operation{ - Name: opDescribeApplicationVersions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeApplicationVersionsInput{} - } - - output = &DescribeApplicationVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeApplicationVersions API operation for AWS Elastic Beanstalk. -// -// Retrieve a list of application versions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DescribeApplicationVersions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeApplicationVersions -func (c *ElasticBeanstalk) DescribeApplicationVersions(input *DescribeApplicationVersionsInput) (*DescribeApplicationVersionsOutput, error) { - req, out := c.DescribeApplicationVersionsRequest(input) - return out, req.Send() -} - -// DescribeApplicationVersionsWithContext is the same as DescribeApplicationVersions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeApplicationVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DescribeApplicationVersionsWithContext(ctx aws.Context, input *DescribeApplicationVersionsInput, opts ...request.Option) (*DescribeApplicationVersionsOutput, error) { - req, out := c.DescribeApplicationVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeApplications = "DescribeApplications" - -// DescribeApplicationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeApplications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeApplications for more information on using the DescribeApplications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeApplicationsRequest method. -// req, resp := client.DescribeApplicationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeApplications -func (c *ElasticBeanstalk) DescribeApplicationsRequest(input *DescribeApplicationsInput) (req *request.Request, output *DescribeApplicationsOutput) { - op := &request.Operation{ - Name: opDescribeApplications, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeApplicationsInput{} - } - - output = &DescribeApplicationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeApplications API operation for AWS Elastic Beanstalk. -// -// Returns the descriptions of existing applications. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DescribeApplications for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeApplications -func (c *ElasticBeanstalk) DescribeApplications(input *DescribeApplicationsInput) (*DescribeApplicationsOutput, error) { - req, out := c.DescribeApplicationsRequest(input) - return out, req.Send() -} - -// DescribeApplicationsWithContext is the same as DescribeApplications with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeApplications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DescribeApplicationsWithContext(ctx aws.Context, input *DescribeApplicationsInput, opts ...request.Option) (*DescribeApplicationsOutput, error) { - req, out := c.DescribeApplicationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConfigurationOptions = "DescribeConfigurationOptions" - -// DescribeConfigurationOptionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConfigurationOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConfigurationOptions for more information on using the DescribeConfigurationOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConfigurationOptionsRequest method. -// req, resp := client.DescribeConfigurationOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeConfigurationOptions -func (c *ElasticBeanstalk) DescribeConfigurationOptionsRequest(input *DescribeConfigurationOptionsInput) (req *request.Request, output *DescribeConfigurationOptionsOutput) { - op := &request.Operation{ - Name: opDescribeConfigurationOptions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConfigurationOptionsInput{} - } - - output = &DescribeConfigurationOptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConfigurationOptions API operation for AWS Elastic Beanstalk. -// -// Describes the configuration options that are used in a particular configuration -// template or environment, or that a specified solution stack defines. The -// description includes the values the options, their default values, and an -// indication of the required action on a running environment if an option value -// is changed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DescribeConfigurationOptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyBucketsException "TooManyBucketsException" -// The specified account has reached its limit of Amazon S3 buckets. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeConfigurationOptions -func (c *ElasticBeanstalk) DescribeConfigurationOptions(input *DescribeConfigurationOptionsInput) (*DescribeConfigurationOptionsOutput, error) { - req, out := c.DescribeConfigurationOptionsRequest(input) - return out, req.Send() -} - -// DescribeConfigurationOptionsWithContext is the same as DescribeConfigurationOptions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConfigurationOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DescribeConfigurationOptionsWithContext(ctx aws.Context, input *DescribeConfigurationOptionsInput, opts ...request.Option) (*DescribeConfigurationOptionsOutput, error) { - req, out := c.DescribeConfigurationOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConfigurationSettings = "DescribeConfigurationSettings" - -// DescribeConfigurationSettingsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConfigurationSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConfigurationSettings for more information on using the DescribeConfigurationSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConfigurationSettingsRequest method. -// req, resp := client.DescribeConfigurationSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeConfigurationSettings -func (c *ElasticBeanstalk) DescribeConfigurationSettingsRequest(input *DescribeConfigurationSettingsInput) (req *request.Request, output *DescribeConfigurationSettingsOutput) { - op := &request.Operation{ - Name: opDescribeConfigurationSettings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConfigurationSettingsInput{} - } - - output = &DescribeConfigurationSettingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConfigurationSettings API operation for AWS Elastic Beanstalk. -// -// Returns a description of the settings for the specified configuration set, -// that is, either a configuration template or the configuration set associated -// with a running environment. -// -// When describing the settings for the configuration set associated with a -// running environment, it is possible to receive two sets of setting descriptions. -// One is the deployed configuration set, and the other is a draft configuration -// of an environment that is either in the process of deployment or that failed -// to deploy. -// -// Related Topics -// -// * DeleteEnvironmentConfiguration -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DescribeConfigurationSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyBucketsException "TooManyBucketsException" -// The specified account has reached its limit of Amazon S3 buckets. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeConfigurationSettings -func (c *ElasticBeanstalk) DescribeConfigurationSettings(input *DescribeConfigurationSettingsInput) (*DescribeConfigurationSettingsOutput, error) { - req, out := c.DescribeConfigurationSettingsRequest(input) - return out, req.Send() -} - -// DescribeConfigurationSettingsWithContext is the same as DescribeConfigurationSettings with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConfigurationSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DescribeConfigurationSettingsWithContext(ctx aws.Context, input *DescribeConfigurationSettingsInput, opts ...request.Option) (*DescribeConfigurationSettingsOutput, error) { - req, out := c.DescribeConfigurationSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEnvironmentHealth = "DescribeEnvironmentHealth" - -// DescribeEnvironmentHealthRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEnvironmentHealth operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEnvironmentHealth for more information on using the DescribeEnvironmentHealth -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEnvironmentHealthRequest method. -// req, resp := client.DescribeEnvironmentHealthRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironmentHealth -func (c *ElasticBeanstalk) DescribeEnvironmentHealthRequest(input *DescribeEnvironmentHealthInput) (req *request.Request, output *DescribeEnvironmentHealthOutput) { - op := &request.Operation{ - Name: opDescribeEnvironmentHealth, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEnvironmentHealthInput{} - } - - output = &DescribeEnvironmentHealthOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEnvironmentHealth API operation for AWS Elastic Beanstalk. -// -// Returns information about the overall health of the specified environment. -// The DescribeEnvironmentHealth operation is only available with AWS Elastic -// Beanstalk Enhanced Health. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DescribeEnvironmentHealth for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more input parameters is not valid. Please correct the input parameters -// and try the operation again. -// -// * ErrCodeServiceException "ElasticBeanstalkServiceException" -// A generic service exception has occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironmentHealth -func (c *ElasticBeanstalk) DescribeEnvironmentHealth(input *DescribeEnvironmentHealthInput) (*DescribeEnvironmentHealthOutput, error) { - req, out := c.DescribeEnvironmentHealthRequest(input) - return out, req.Send() -} - -// DescribeEnvironmentHealthWithContext is the same as DescribeEnvironmentHealth with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEnvironmentHealth for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DescribeEnvironmentHealthWithContext(ctx aws.Context, input *DescribeEnvironmentHealthInput, opts ...request.Option) (*DescribeEnvironmentHealthOutput, error) { - req, out := c.DescribeEnvironmentHealthRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEnvironmentManagedActionHistory = "DescribeEnvironmentManagedActionHistory" - -// DescribeEnvironmentManagedActionHistoryRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEnvironmentManagedActionHistory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEnvironmentManagedActionHistory for more information on using the DescribeEnvironmentManagedActionHistory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEnvironmentManagedActionHistoryRequest method. -// req, resp := client.DescribeEnvironmentManagedActionHistoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironmentManagedActionHistory -func (c *ElasticBeanstalk) DescribeEnvironmentManagedActionHistoryRequest(input *DescribeEnvironmentManagedActionHistoryInput) (req *request.Request, output *DescribeEnvironmentManagedActionHistoryOutput) { - op := &request.Operation{ - Name: opDescribeEnvironmentManagedActionHistory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEnvironmentManagedActionHistoryInput{} - } - - output = &DescribeEnvironmentManagedActionHistoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEnvironmentManagedActionHistory API operation for AWS Elastic Beanstalk. -// -// Lists an environment's completed and failed managed actions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DescribeEnvironmentManagedActionHistory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ElasticBeanstalkServiceException" -// A generic service exception has occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironmentManagedActionHistory -func (c *ElasticBeanstalk) DescribeEnvironmentManagedActionHistory(input *DescribeEnvironmentManagedActionHistoryInput) (*DescribeEnvironmentManagedActionHistoryOutput, error) { - req, out := c.DescribeEnvironmentManagedActionHistoryRequest(input) - return out, req.Send() -} - -// DescribeEnvironmentManagedActionHistoryWithContext is the same as DescribeEnvironmentManagedActionHistory with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEnvironmentManagedActionHistory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DescribeEnvironmentManagedActionHistoryWithContext(ctx aws.Context, input *DescribeEnvironmentManagedActionHistoryInput, opts ...request.Option) (*DescribeEnvironmentManagedActionHistoryOutput, error) { - req, out := c.DescribeEnvironmentManagedActionHistoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEnvironmentManagedActions = "DescribeEnvironmentManagedActions" - -// DescribeEnvironmentManagedActionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEnvironmentManagedActions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEnvironmentManagedActions for more information on using the DescribeEnvironmentManagedActions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEnvironmentManagedActionsRequest method. -// req, resp := client.DescribeEnvironmentManagedActionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironmentManagedActions -func (c *ElasticBeanstalk) DescribeEnvironmentManagedActionsRequest(input *DescribeEnvironmentManagedActionsInput) (req *request.Request, output *DescribeEnvironmentManagedActionsOutput) { - op := &request.Operation{ - Name: opDescribeEnvironmentManagedActions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEnvironmentManagedActionsInput{} - } - - output = &DescribeEnvironmentManagedActionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEnvironmentManagedActions API operation for AWS Elastic Beanstalk. -// -// Lists an environment's upcoming and in-progress managed actions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DescribeEnvironmentManagedActions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ElasticBeanstalkServiceException" -// A generic service exception has occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironmentManagedActions -func (c *ElasticBeanstalk) DescribeEnvironmentManagedActions(input *DescribeEnvironmentManagedActionsInput) (*DescribeEnvironmentManagedActionsOutput, error) { - req, out := c.DescribeEnvironmentManagedActionsRequest(input) - return out, req.Send() -} - -// DescribeEnvironmentManagedActionsWithContext is the same as DescribeEnvironmentManagedActions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEnvironmentManagedActions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DescribeEnvironmentManagedActionsWithContext(ctx aws.Context, input *DescribeEnvironmentManagedActionsInput, opts ...request.Option) (*DescribeEnvironmentManagedActionsOutput, error) { - req, out := c.DescribeEnvironmentManagedActionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEnvironmentResources = "DescribeEnvironmentResources" - -// DescribeEnvironmentResourcesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEnvironmentResources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEnvironmentResources for more information on using the DescribeEnvironmentResources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEnvironmentResourcesRequest method. -// req, resp := client.DescribeEnvironmentResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironmentResources -func (c *ElasticBeanstalk) DescribeEnvironmentResourcesRequest(input *DescribeEnvironmentResourcesInput) (req *request.Request, output *DescribeEnvironmentResourcesOutput) { - op := &request.Operation{ - Name: opDescribeEnvironmentResources, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEnvironmentResourcesInput{} - } - - output = &DescribeEnvironmentResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEnvironmentResources API operation for AWS Elastic Beanstalk. -// -// Returns AWS resources for this environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DescribeEnvironmentResources for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironmentResources -func (c *ElasticBeanstalk) DescribeEnvironmentResources(input *DescribeEnvironmentResourcesInput) (*DescribeEnvironmentResourcesOutput, error) { - req, out := c.DescribeEnvironmentResourcesRequest(input) - return out, req.Send() -} - -// DescribeEnvironmentResourcesWithContext is the same as DescribeEnvironmentResources with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEnvironmentResources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DescribeEnvironmentResourcesWithContext(ctx aws.Context, input *DescribeEnvironmentResourcesInput, opts ...request.Option) (*DescribeEnvironmentResourcesOutput, error) { - req, out := c.DescribeEnvironmentResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEnvironments = "DescribeEnvironments" - -// DescribeEnvironmentsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEnvironments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEnvironments for more information on using the DescribeEnvironments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEnvironmentsRequest method. -// req, resp := client.DescribeEnvironmentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironments -func (c *ElasticBeanstalk) DescribeEnvironmentsRequest(input *DescribeEnvironmentsInput) (req *request.Request, output *EnvironmentDescriptionsMessage) { - op := &request.Operation{ - Name: opDescribeEnvironments, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEnvironmentsInput{} - } - - output = &EnvironmentDescriptionsMessage{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEnvironments API operation for AWS Elastic Beanstalk. -// -// Returns descriptions for existing environments. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DescribeEnvironments for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironments -func (c *ElasticBeanstalk) DescribeEnvironments(input *DescribeEnvironmentsInput) (*EnvironmentDescriptionsMessage, error) { - req, out := c.DescribeEnvironmentsRequest(input) - return out, req.Send() -} - -// DescribeEnvironmentsWithContext is the same as DescribeEnvironments with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEnvironments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DescribeEnvironmentsWithContext(ctx aws.Context, input *DescribeEnvironmentsInput, opts ...request.Option) (*EnvironmentDescriptionsMessage, error) { - req, out := c.DescribeEnvironmentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEvents = "DescribeEvents" - -// DescribeEventsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEvents for more information on using the DescribeEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventsRequest method. -// req, resp := client.DescribeEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEvents -func (c *ElasticBeanstalk) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Request, output *DescribeEventsOutput) { - op := &request.Operation{ - Name: opDescribeEvents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEventsInput{} - } - - output = &DescribeEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEvents API operation for AWS Elastic Beanstalk. -// -// Returns list of event descriptions matching criteria up to the last 6 weeks. -// -// This action returns the most recent 1,000 events from the specified NextToken. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DescribeEvents for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEvents -func (c *ElasticBeanstalk) DescribeEvents(input *DescribeEventsInput) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - return out, req.Send() -} - -// DescribeEventsWithContext is the same as DescribeEvents with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DescribeEventsWithContext(ctx aws.Context, input *DescribeEventsInput, opts ...request.Option) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEventsPages iterates over the pages of a DescribeEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEvents 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 DescribeEvents operation. -// pageNum := 0 -// err := client.DescribeEventsPages(params, -// func(page *DescribeEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElasticBeanstalk) DescribeEventsPages(input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool) error { - return c.DescribeEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEventsPagesWithContext same as DescribeEventsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeInstancesHealth = "DescribeInstancesHealth" - -// DescribeInstancesHealthRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInstancesHealth operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInstancesHealth for more information on using the DescribeInstancesHealth -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInstancesHealthRequest method. -// req, resp := client.DescribeInstancesHealthRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeInstancesHealth -func (c *ElasticBeanstalk) DescribeInstancesHealthRequest(input *DescribeInstancesHealthInput) (req *request.Request, output *DescribeInstancesHealthOutput) { - op := &request.Operation{ - Name: opDescribeInstancesHealth, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInstancesHealthInput{} - } - - output = &DescribeInstancesHealthOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInstancesHealth API operation for AWS Elastic Beanstalk. -// -// Retrieves detailed information about the health of instances in your AWS -// Elastic Beanstalk. This operation requires enhanced health reporting (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DescribeInstancesHealth for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more input parameters is not valid. Please correct the input parameters -// and try the operation again. -// -// * ErrCodeServiceException "ElasticBeanstalkServiceException" -// A generic service exception has occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeInstancesHealth -func (c *ElasticBeanstalk) DescribeInstancesHealth(input *DescribeInstancesHealthInput) (*DescribeInstancesHealthOutput, error) { - req, out := c.DescribeInstancesHealthRequest(input) - return out, req.Send() -} - -// DescribeInstancesHealthWithContext is the same as DescribeInstancesHealth with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInstancesHealth for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DescribeInstancesHealthWithContext(ctx aws.Context, input *DescribeInstancesHealthInput, opts ...request.Option) (*DescribeInstancesHealthOutput, error) { - req, out := c.DescribeInstancesHealthRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribePlatformVersion = "DescribePlatformVersion" - -// DescribePlatformVersionRequest generates a "aws/request.Request" representing the -// client's request for the DescribePlatformVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePlatformVersion for more information on using the DescribePlatformVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePlatformVersionRequest method. -// req, resp := client.DescribePlatformVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribePlatformVersion -func (c *ElasticBeanstalk) DescribePlatformVersionRequest(input *DescribePlatformVersionInput) (req *request.Request, output *DescribePlatformVersionOutput) { - op := &request.Operation{ - Name: opDescribePlatformVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePlatformVersionInput{} - } - - output = &DescribePlatformVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePlatformVersion API operation for AWS Elastic Beanstalk. -// -// Describes the version of the platform. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation DescribePlatformVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// * ErrCodeServiceException "ElasticBeanstalkServiceException" -// A generic service exception has occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribePlatformVersion -func (c *ElasticBeanstalk) DescribePlatformVersion(input *DescribePlatformVersionInput) (*DescribePlatformVersionOutput, error) { - req, out := c.DescribePlatformVersionRequest(input) - return out, req.Send() -} - -// DescribePlatformVersionWithContext is the same as DescribePlatformVersion with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePlatformVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) DescribePlatformVersionWithContext(ctx aws.Context, input *DescribePlatformVersionInput, opts ...request.Option) (*DescribePlatformVersionOutput, error) { - req, out := c.DescribePlatformVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAvailableSolutionStacks = "ListAvailableSolutionStacks" - -// ListAvailableSolutionStacksRequest generates a "aws/request.Request" representing the -// client's request for the ListAvailableSolutionStacks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAvailableSolutionStacks for more information on using the ListAvailableSolutionStacks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAvailableSolutionStacksRequest method. -// req, resp := client.ListAvailableSolutionStacksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ListAvailableSolutionStacks -func (c *ElasticBeanstalk) ListAvailableSolutionStacksRequest(input *ListAvailableSolutionStacksInput) (req *request.Request, output *ListAvailableSolutionStacksOutput) { - op := &request.Operation{ - Name: opListAvailableSolutionStacks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListAvailableSolutionStacksInput{} - } - - output = &ListAvailableSolutionStacksOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAvailableSolutionStacks API operation for AWS Elastic Beanstalk. -// -// Returns a list of the available solution stack names, with the public version -// first and then in reverse chronological order. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation ListAvailableSolutionStacks for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ListAvailableSolutionStacks -func (c *ElasticBeanstalk) ListAvailableSolutionStacks(input *ListAvailableSolutionStacksInput) (*ListAvailableSolutionStacksOutput, error) { - req, out := c.ListAvailableSolutionStacksRequest(input) - return out, req.Send() -} - -// ListAvailableSolutionStacksWithContext is the same as ListAvailableSolutionStacks with the addition of -// the ability to pass a context and additional request options. -// -// See ListAvailableSolutionStacks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) ListAvailableSolutionStacksWithContext(ctx aws.Context, input *ListAvailableSolutionStacksInput, opts ...request.Option) (*ListAvailableSolutionStacksOutput, error) { - req, out := c.ListAvailableSolutionStacksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPlatformVersions = "ListPlatformVersions" - -// ListPlatformVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListPlatformVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPlatformVersions for more information on using the ListPlatformVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPlatformVersionsRequest method. -// req, resp := client.ListPlatformVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ListPlatformVersions -func (c *ElasticBeanstalk) ListPlatformVersionsRequest(input *ListPlatformVersionsInput) (req *request.Request, output *ListPlatformVersionsOutput) { - op := &request.Operation{ - Name: opListPlatformVersions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListPlatformVersionsInput{} - } - - output = &ListPlatformVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPlatformVersions API operation for AWS Elastic Beanstalk. -// -// Lists the available platforms. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation ListPlatformVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// * ErrCodeServiceException "ElasticBeanstalkServiceException" -// A generic service exception has occurred. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ListPlatformVersions -func (c *ElasticBeanstalk) ListPlatformVersions(input *ListPlatformVersionsInput) (*ListPlatformVersionsOutput, error) { - req, out := c.ListPlatformVersionsRequest(input) - return out, req.Send() -} - -// ListPlatformVersionsWithContext is the same as ListPlatformVersions with the addition of -// the ability to pass a context and additional request options. -// -// See ListPlatformVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) ListPlatformVersionsWithContext(ctx aws.Context, input *ListPlatformVersionsInput, opts ...request.Option) (*ListPlatformVersionsOutput, error) { - req, out := c.ListPlatformVersionsRequest(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/elasticbeanstalk-2010-12-01/ListTagsForResource -func (c *ElasticBeanstalk) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for AWS Elastic Beanstalk. -// -// Returns the tags applied to an AWS Elastic Beanstalk resource. The response -// contains a list of tag key-value pairs. -// -// Currently, Elastic Beanstalk only supports tagging of Elastic Beanstalk environments. -// For details about environment tagging, see Tagging Resources in Your Elastic -// Beanstalk Environment (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.tagging.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource doesn't exist for the specified Amazon Resource Name (ARN). -// -// * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" -// The type of the specified Amazon Resource Name (ARN) isn't supported for -// this operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ListTagsForResource -func (c *ElasticBeanstalk) 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 *ElasticBeanstalk) 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 opRebuildEnvironment = "RebuildEnvironment" - -// RebuildEnvironmentRequest generates a "aws/request.Request" representing the -// client's request for the RebuildEnvironment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebuildEnvironment for more information on using the RebuildEnvironment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebuildEnvironmentRequest method. -// req, resp := client.RebuildEnvironmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/RebuildEnvironment -func (c *ElasticBeanstalk) RebuildEnvironmentRequest(input *RebuildEnvironmentInput) (req *request.Request, output *RebuildEnvironmentOutput) { - op := &request.Operation{ - Name: opRebuildEnvironment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RebuildEnvironmentInput{} - } - - output = &RebuildEnvironmentOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RebuildEnvironment API operation for AWS Elastic Beanstalk. -// -// Deletes and recreates all of the AWS resources (for example: the Auto Scaling -// group, load balancer, etc.) for a specified environment and forces a restart. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation RebuildEnvironment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/RebuildEnvironment -func (c *ElasticBeanstalk) RebuildEnvironment(input *RebuildEnvironmentInput) (*RebuildEnvironmentOutput, error) { - req, out := c.RebuildEnvironmentRequest(input) - return out, req.Send() -} - -// RebuildEnvironmentWithContext is the same as RebuildEnvironment with the addition of -// the ability to pass a context and additional request options. -// -// See RebuildEnvironment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) RebuildEnvironmentWithContext(ctx aws.Context, input *RebuildEnvironmentInput, opts ...request.Option) (*RebuildEnvironmentOutput, error) { - req, out := c.RebuildEnvironmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRequestEnvironmentInfo = "RequestEnvironmentInfo" - -// RequestEnvironmentInfoRequest generates a "aws/request.Request" representing the -// client's request for the RequestEnvironmentInfo operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RequestEnvironmentInfo for more information on using the RequestEnvironmentInfo -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RequestEnvironmentInfoRequest method. -// req, resp := client.RequestEnvironmentInfoRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/RequestEnvironmentInfo -func (c *ElasticBeanstalk) RequestEnvironmentInfoRequest(input *RequestEnvironmentInfoInput) (req *request.Request, output *RequestEnvironmentInfoOutput) { - op := &request.Operation{ - Name: opRequestEnvironmentInfo, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RequestEnvironmentInfoInput{} - } - - output = &RequestEnvironmentInfoOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RequestEnvironmentInfo API operation for AWS Elastic Beanstalk. -// -// Initiates a request to compile the specified type of information of the deployed -// environment. -// -// Setting the InfoType to tail compiles the last lines from the application -// server log files of every Amazon EC2 instance in your environment. -// -// Setting the InfoType to bundle compresses the application server log files -// for every Amazon EC2 instance into a .zip file. Legacy and .NET containers -// do not support bundle logs. -// -// Use RetrieveEnvironmentInfo to obtain the set of logs. -// -// Related Topics -// -// * RetrieveEnvironmentInfo -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation RequestEnvironmentInfo for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/RequestEnvironmentInfo -func (c *ElasticBeanstalk) RequestEnvironmentInfo(input *RequestEnvironmentInfoInput) (*RequestEnvironmentInfoOutput, error) { - req, out := c.RequestEnvironmentInfoRequest(input) - return out, req.Send() -} - -// RequestEnvironmentInfoWithContext is the same as RequestEnvironmentInfo with the addition of -// the ability to pass a context and additional request options. -// -// See RequestEnvironmentInfo for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) RequestEnvironmentInfoWithContext(ctx aws.Context, input *RequestEnvironmentInfoInput, opts ...request.Option) (*RequestEnvironmentInfoOutput, error) { - req, out := c.RequestEnvironmentInfoRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestartAppServer = "RestartAppServer" - -// RestartAppServerRequest generates a "aws/request.Request" representing the -// client's request for the RestartAppServer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestartAppServer for more information on using the RestartAppServer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestartAppServerRequest method. -// req, resp := client.RestartAppServerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/RestartAppServer -func (c *ElasticBeanstalk) RestartAppServerRequest(input *RestartAppServerInput) (req *request.Request, output *RestartAppServerOutput) { - op := &request.Operation{ - Name: opRestartAppServer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestartAppServerInput{} - } - - output = &RestartAppServerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RestartAppServer API operation for AWS Elastic Beanstalk. -// -// Causes the environment to restart the application container server running -// on each Amazon EC2 instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation RestartAppServer for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/RestartAppServer -func (c *ElasticBeanstalk) RestartAppServer(input *RestartAppServerInput) (*RestartAppServerOutput, error) { - req, out := c.RestartAppServerRequest(input) - return out, req.Send() -} - -// RestartAppServerWithContext is the same as RestartAppServer with the addition of -// the ability to pass a context and additional request options. -// -// See RestartAppServer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) RestartAppServerWithContext(ctx aws.Context, input *RestartAppServerInput, opts ...request.Option) (*RestartAppServerOutput, error) { - req, out := c.RestartAppServerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRetrieveEnvironmentInfo = "RetrieveEnvironmentInfo" - -// RetrieveEnvironmentInfoRequest generates a "aws/request.Request" representing the -// client's request for the RetrieveEnvironmentInfo operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RetrieveEnvironmentInfo for more information on using the RetrieveEnvironmentInfo -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RetrieveEnvironmentInfoRequest method. -// req, resp := client.RetrieveEnvironmentInfoRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/RetrieveEnvironmentInfo -func (c *ElasticBeanstalk) RetrieveEnvironmentInfoRequest(input *RetrieveEnvironmentInfoInput) (req *request.Request, output *RetrieveEnvironmentInfoOutput) { - op := &request.Operation{ - Name: opRetrieveEnvironmentInfo, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RetrieveEnvironmentInfoInput{} - } - - output = &RetrieveEnvironmentInfoOutput{} - req = c.newRequest(op, input, output) - return -} - -// RetrieveEnvironmentInfo API operation for AWS Elastic Beanstalk. -// -// Retrieves the compiled information from a RequestEnvironmentInfo request. -// -// Related Topics -// -// * RequestEnvironmentInfo -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation RetrieveEnvironmentInfo for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/RetrieveEnvironmentInfo -func (c *ElasticBeanstalk) RetrieveEnvironmentInfo(input *RetrieveEnvironmentInfoInput) (*RetrieveEnvironmentInfoOutput, error) { - req, out := c.RetrieveEnvironmentInfoRequest(input) - return out, req.Send() -} - -// RetrieveEnvironmentInfoWithContext is the same as RetrieveEnvironmentInfo with the addition of -// the ability to pass a context and additional request options. -// -// See RetrieveEnvironmentInfo for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) RetrieveEnvironmentInfoWithContext(ctx aws.Context, input *RetrieveEnvironmentInfoInput, opts ...request.Option) (*RetrieveEnvironmentInfoOutput, error) { - req, out := c.RetrieveEnvironmentInfoRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSwapEnvironmentCNAMEs = "SwapEnvironmentCNAMEs" - -// SwapEnvironmentCNAMEsRequest generates a "aws/request.Request" representing the -// client's request for the SwapEnvironmentCNAMEs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SwapEnvironmentCNAMEs for more information on using the SwapEnvironmentCNAMEs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SwapEnvironmentCNAMEsRequest method. -// req, resp := client.SwapEnvironmentCNAMEsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/SwapEnvironmentCNAMEs -func (c *ElasticBeanstalk) SwapEnvironmentCNAMEsRequest(input *SwapEnvironmentCNAMEsInput) (req *request.Request, output *SwapEnvironmentCNAMEsOutput) { - op := &request.Operation{ - Name: opSwapEnvironmentCNAMEs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SwapEnvironmentCNAMEsInput{} - } - - output = &SwapEnvironmentCNAMEsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SwapEnvironmentCNAMEs API operation for AWS Elastic Beanstalk. -// -// Swaps the CNAMEs of two environments. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation SwapEnvironmentCNAMEs for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/SwapEnvironmentCNAMEs -func (c *ElasticBeanstalk) SwapEnvironmentCNAMEs(input *SwapEnvironmentCNAMEsInput) (*SwapEnvironmentCNAMEsOutput, error) { - req, out := c.SwapEnvironmentCNAMEsRequest(input) - return out, req.Send() -} - -// SwapEnvironmentCNAMEsWithContext is the same as SwapEnvironmentCNAMEs with the addition of -// the ability to pass a context and additional request options. -// -// See SwapEnvironmentCNAMEs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) SwapEnvironmentCNAMEsWithContext(ctx aws.Context, input *SwapEnvironmentCNAMEsInput, opts ...request.Option) (*SwapEnvironmentCNAMEsOutput, error) { - req, out := c.SwapEnvironmentCNAMEsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTerminateEnvironment = "TerminateEnvironment" - -// TerminateEnvironmentRequest generates a "aws/request.Request" representing the -// client's request for the TerminateEnvironment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TerminateEnvironment for more information on using the TerminateEnvironment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TerminateEnvironmentRequest method. -// req, resp := client.TerminateEnvironmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/TerminateEnvironment -func (c *ElasticBeanstalk) TerminateEnvironmentRequest(input *TerminateEnvironmentInput) (req *request.Request, output *EnvironmentDescription) { - op := &request.Operation{ - Name: opTerminateEnvironment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TerminateEnvironmentInput{} - } - - output = &EnvironmentDescription{} - req = c.newRequest(op, input, output) - return -} - -// TerminateEnvironment API operation for AWS Elastic Beanstalk. -// -// Terminates the specified environment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation TerminateEnvironment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/TerminateEnvironment -func (c *ElasticBeanstalk) TerminateEnvironment(input *TerminateEnvironmentInput) (*EnvironmentDescription, error) { - req, out := c.TerminateEnvironmentRequest(input) - return out, req.Send() -} - -// TerminateEnvironmentWithContext is the same as TerminateEnvironment with the addition of -// the ability to pass a context and additional request options. -// -// See TerminateEnvironment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) TerminateEnvironmentWithContext(ctx aws.Context, input *TerminateEnvironmentInput, opts ...request.Option) (*EnvironmentDescription, error) { - req, out := c.TerminateEnvironmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApplication = "UpdateApplication" - -// UpdateApplicationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApplication for more information on using the UpdateApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApplicationRequest method. -// req, resp := client.UpdateApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateApplication -func (c *ElasticBeanstalk) UpdateApplicationRequest(input *UpdateApplicationInput) (req *request.Request, output *ApplicationDescriptionMessage) { - op := &request.Operation{ - Name: opUpdateApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateApplicationInput{} - } - - output = &ApplicationDescriptionMessage{} - req = c.newRequest(op, input, output) - return -} - -// UpdateApplication API operation for AWS Elastic Beanstalk. -// -// Updates the specified application to have the specified properties. -// -// If a property (for example, description) is not provided, the value remains -// unchanged. To clear these properties, specify an empty string. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation UpdateApplication for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateApplication -func (c *ElasticBeanstalk) UpdateApplication(input *UpdateApplicationInput) (*ApplicationDescriptionMessage, error) { - req, out := c.UpdateApplicationRequest(input) - return out, req.Send() -} - -// UpdateApplicationWithContext is the same as UpdateApplication with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) UpdateApplicationWithContext(ctx aws.Context, input *UpdateApplicationInput, opts ...request.Option) (*ApplicationDescriptionMessage, error) { - req, out := c.UpdateApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApplicationResourceLifecycle = "UpdateApplicationResourceLifecycle" - -// UpdateApplicationResourceLifecycleRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApplicationResourceLifecycle operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApplicationResourceLifecycle for more information on using the UpdateApplicationResourceLifecycle -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApplicationResourceLifecycleRequest method. -// req, resp := client.UpdateApplicationResourceLifecycleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateApplicationResourceLifecycle -func (c *ElasticBeanstalk) UpdateApplicationResourceLifecycleRequest(input *UpdateApplicationResourceLifecycleInput) (req *request.Request, output *UpdateApplicationResourceLifecycleOutput) { - op := &request.Operation{ - Name: opUpdateApplicationResourceLifecycle, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateApplicationResourceLifecycleInput{} - } - - output = &UpdateApplicationResourceLifecycleOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateApplicationResourceLifecycle API operation for AWS Elastic Beanstalk. -// -// Modifies lifecycle settings for an application. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation UpdateApplicationResourceLifecycle for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateApplicationResourceLifecycle -func (c *ElasticBeanstalk) UpdateApplicationResourceLifecycle(input *UpdateApplicationResourceLifecycleInput) (*UpdateApplicationResourceLifecycleOutput, error) { - req, out := c.UpdateApplicationResourceLifecycleRequest(input) - return out, req.Send() -} - -// UpdateApplicationResourceLifecycleWithContext is the same as UpdateApplicationResourceLifecycle with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApplicationResourceLifecycle for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) UpdateApplicationResourceLifecycleWithContext(ctx aws.Context, input *UpdateApplicationResourceLifecycleInput, opts ...request.Option) (*UpdateApplicationResourceLifecycleOutput, error) { - req, out := c.UpdateApplicationResourceLifecycleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApplicationVersion = "UpdateApplicationVersion" - -// UpdateApplicationVersionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApplicationVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApplicationVersion for more information on using the UpdateApplicationVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApplicationVersionRequest method. -// req, resp := client.UpdateApplicationVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateApplicationVersion -func (c *ElasticBeanstalk) UpdateApplicationVersionRequest(input *UpdateApplicationVersionInput) (req *request.Request, output *ApplicationVersionDescriptionMessage) { - op := &request.Operation{ - Name: opUpdateApplicationVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateApplicationVersionInput{} - } - - output = &ApplicationVersionDescriptionMessage{} - req = c.newRequest(op, input, output) - return -} - -// UpdateApplicationVersion API operation for AWS Elastic Beanstalk. -// -// Updates the specified application version to have the specified properties. -// -// If a property (for example, description) is not provided, the value remains -// unchanged. To clear properties, specify an empty string. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation UpdateApplicationVersion for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateApplicationVersion -func (c *ElasticBeanstalk) UpdateApplicationVersion(input *UpdateApplicationVersionInput) (*ApplicationVersionDescriptionMessage, error) { - req, out := c.UpdateApplicationVersionRequest(input) - return out, req.Send() -} - -// UpdateApplicationVersionWithContext is the same as UpdateApplicationVersion with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApplicationVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) UpdateApplicationVersionWithContext(ctx aws.Context, input *UpdateApplicationVersionInput, opts ...request.Option) (*ApplicationVersionDescriptionMessage, error) { - req, out := c.UpdateApplicationVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateConfigurationTemplate = "UpdateConfigurationTemplate" - -// UpdateConfigurationTemplateRequest generates a "aws/request.Request" representing the -// client's request for the UpdateConfigurationTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateConfigurationTemplate for more information on using the UpdateConfigurationTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateConfigurationTemplateRequest method. -// req, resp := client.UpdateConfigurationTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateConfigurationTemplate -func (c *ElasticBeanstalk) UpdateConfigurationTemplateRequest(input *UpdateConfigurationTemplateInput) (req *request.Request, output *ConfigurationSettingsDescription) { - op := &request.Operation{ - Name: opUpdateConfigurationTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateConfigurationTemplateInput{} - } - - output = &ConfigurationSettingsDescription{} - req = c.newRequest(op, input, output) - return -} - -// UpdateConfigurationTemplate API operation for AWS Elastic Beanstalk. -// -// Updates the specified configuration template to have the specified properties -// or configuration option values. -// -// If a property (for example, ApplicationName) is not provided, its value remains -// unchanged. To clear such properties, specify an empty string. -// -// Related Topics -// -// * DescribeConfigurationOptions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation UpdateConfigurationTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// * ErrCodeTooManyBucketsException "TooManyBucketsException" -// The specified account has reached its limit of Amazon S3 buckets. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateConfigurationTemplate -func (c *ElasticBeanstalk) UpdateConfigurationTemplate(input *UpdateConfigurationTemplateInput) (*ConfigurationSettingsDescription, error) { - req, out := c.UpdateConfigurationTemplateRequest(input) - return out, req.Send() -} - -// UpdateConfigurationTemplateWithContext is the same as UpdateConfigurationTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateConfigurationTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) UpdateConfigurationTemplateWithContext(ctx aws.Context, input *UpdateConfigurationTemplateInput, opts ...request.Option) (*ConfigurationSettingsDescription, error) { - req, out := c.UpdateConfigurationTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateEnvironment = "UpdateEnvironment" - -// UpdateEnvironmentRequest generates a "aws/request.Request" representing the -// client's request for the UpdateEnvironment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateEnvironment for more information on using the UpdateEnvironment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateEnvironmentRequest method. -// req, resp := client.UpdateEnvironmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateEnvironment -func (c *ElasticBeanstalk) UpdateEnvironmentRequest(input *UpdateEnvironmentInput) (req *request.Request, output *EnvironmentDescription) { - op := &request.Operation{ - Name: opUpdateEnvironment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateEnvironmentInput{} - } - - output = &EnvironmentDescription{} - req = c.newRequest(op, input, output) - return -} - -// UpdateEnvironment API operation for AWS Elastic Beanstalk. -// -// Updates the environment description, deploys a new application version, updates -// the configuration settings to an entirely new configuration template, or -// updates select configuration option values in the running environment. -// -// Attempting to update both the release and configuration is not allowed and -// AWS Elastic Beanstalk returns an InvalidParameterCombination error. -// -// When updating the configuration settings to a new template or individual -// settings, a draft configuration is created and DescribeConfigurationSettings -// for this environment returns two setting descriptions with different DeploymentStatus -// values. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation UpdateEnvironment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// * ErrCodeTooManyBucketsException "TooManyBucketsException" -// The specified account has reached its limit of Amazon S3 buckets. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateEnvironment -func (c *ElasticBeanstalk) UpdateEnvironment(input *UpdateEnvironmentInput) (*EnvironmentDescription, error) { - req, out := c.UpdateEnvironmentRequest(input) - return out, req.Send() -} - -// UpdateEnvironmentWithContext is the same as UpdateEnvironment with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateEnvironment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) UpdateEnvironmentWithContext(ctx aws.Context, input *UpdateEnvironmentInput, opts ...request.Option) (*EnvironmentDescription, error) { - req, out := c.UpdateEnvironmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateTagsForResource = "UpdateTagsForResource" - -// UpdateTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the UpdateTagsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateTagsForResource for more information on using the UpdateTagsForResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateTagsForResourceRequest method. -// req, resp := client.UpdateTagsForResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateTagsForResource -func (c *ElasticBeanstalk) UpdateTagsForResourceRequest(input *UpdateTagsForResourceInput) (req *request.Request, output *UpdateTagsForResourceOutput) { - op := &request.Operation{ - Name: opUpdateTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateTagsForResourceInput{} - } - - output = &UpdateTagsForResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateTagsForResource API operation for AWS Elastic Beanstalk. -// -// Update the list of tags applied to an AWS Elastic Beanstalk resource. Two -// lists can be passed: TagsToAdd for tags to add or update, and TagsToRemove. -// -// Currently, Elastic Beanstalk only supports tagging of Elastic Beanstalk environments. -// For details about environment tagging, see Tagging Resources in Your Elastic -// Beanstalk Environment (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.tagging.html). -// -// If you create a custom IAM user policy to control permission to this operation, -// specify one of the following two virtual actions (or both) instead of the -// API operation name: -// -// elasticbeanstalk:AddTagsControls permission to call UpdateTagsForResource -// and pass a list of tags to add in the TagsToAdd parameter. -// -// elasticbeanstalk:RemoveTagsControls permission to call UpdateTagsForResource -// and pass a list of tag keys to remove in the TagsToRemove parameter. -// -// For details about creating a custom user policy, see Creating a Custom User -// Policy (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.iam.managed-policies.html#AWSHowTo.iam.policies). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation UpdateTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// * ErrCodeOperationInProgressException "OperationInProgressFailure" -// Unable to perform the specified operation because another operation that -// effects an element in this activity is already in progress. -// -// * ErrCodeTooManyTagsException "TooManyTagsException" -// The number of tags in the resource would exceed the number of tags that each -// resource can have. -// -// To calculate this, the operation considers both the number of tags the resource -// already has and the tags this operation would add if it succeeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// A resource doesn't exist for the specified Amazon Resource Name (ARN). -// -// * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" -// The type of the specified Amazon Resource Name (ARN) isn't supported for -// this operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateTagsForResource -func (c *ElasticBeanstalk) UpdateTagsForResource(input *UpdateTagsForResourceInput) (*UpdateTagsForResourceOutput, error) { - req, out := c.UpdateTagsForResourceRequest(input) - return out, req.Send() -} - -// UpdateTagsForResourceWithContext is the same as UpdateTagsForResource with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateTagsForResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) UpdateTagsForResourceWithContext(ctx aws.Context, input *UpdateTagsForResourceInput, opts ...request.Option) (*UpdateTagsForResourceOutput, error) { - req, out := c.UpdateTagsForResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opValidateConfigurationSettings = "ValidateConfigurationSettings" - -// ValidateConfigurationSettingsRequest generates a "aws/request.Request" representing the -// client's request for the ValidateConfigurationSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ValidateConfigurationSettings for more information on using the ValidateConfigurationSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ValidateConfigurationSettingsRequest method. -// req, resp := client.ValidateConfigurationSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ValidateConfigurationSettings -func (c *ElasticBeanstalk) ValidateConfigurationSettingsRequest(input *ValidateConfigurationSettingsInput) (req *request.Request, output *ValidateConfigurationSettingsOutput) { - op := &request.Operation{ - Name: opValidateConfigurationSettings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ValidateConfigurationSettingsInput{} - } - - output = &ValidateConfigurationSettingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ValidateConfigurationSettings API operation for AWS Elastic Beanstalk. -// -// Takes a set of configuration settings and either a configuration template -// or environment, and determines whether those values are valid. -// -// This action returns a list of messages indicating any errors or warnings -// associated with the selection of option values. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elastic Beanstalk's -// API operation ValidateConfigurationSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one or more -// AWS services. -// -// * ErrCodeTooManyBucketsException "TooManyBucketsException" -// The specified account has reached its limit of Amazon S3 buckets. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ValidateConfigurationSettings -func (c *ElasticBeanstalk) ValidateConfigurationSettings(input *ValidateConfigurationSettingsInput) (*ValidateConfigurationSettingsOutput, error) { - req, out := c.ValidateConfigurationSettingsRequest(input) - return out, req.Send() -} - -// ValidateConfigurationSettingsWithContext is the same as ValidateConfigurationSettings with the addition of -// the ability to pass a context and additional request options. -// -// See ValidateConfigurationSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticBeanstalk) ValidateConfigurationSettingsWithContext(ctx aws.Context, input *ValidateConfigurationSettingsInput, opts ...request.Option) (*ValidateConfigurationSettingsOutput, error) { - req, out := c.ValidateConfigurationSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AbortEnvironmentUpdateInput struct { - _ struct{} `type:"structure"` - - // This specifies the ID of the environment with the in-progress update that - // you want to cancel. - EnvironmentId *string `type:"string"` - - // This specifies the name of the environment with the in-progress update that - // you want to cancel. - EnvironmentName *string `min:"4" type:"string"` -} - -// String returns the string representation -func (s AbortEnvironmentUpdateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AbortEnvironmentUpdateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AbortEnvironmentUpdateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AbortEnvironmentUpdateInput"} - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *AbortEnvironmentUpdateInput) SetEnvironmentId(v string) *AbortEnvironmentUpdateInput { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *AbortEnvironmentUpdateInput) SetEnvironmentName(v string) *AbortEnvironmentUpdateInput { - s.EnvironmentName = &v - return s -} - -type AbortEnvironmentUpdateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AbortEnvironmentUpdateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AbortEnvironmentUpdateOutput) GoString() string { - return s.String() -} - -// Describes the properties of an application. -type ApplicationDescription struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the application. - ApplicationArn *string `type:"string"` - - // The name of the application. - ApplicationName *string `min:"1" type:"string"` - - // The names of the configuration templates associated with this application. - ConfigurationTemplates []*string `type:"list"` - - // The date when the application was created. - DateCreated *time.Time `type:"timestamp"` - - // The date when the application was last modified. - DateUpdated *time.Time `type:"timestamp"` - - // User-defined description of the application. - Description *string `type:"string"` - - // The lifecycle settings for the application. - ResourceLifecycleConfig *ApplicationResourceLifecycleConfig `type:"structure"` - - // The names of the versions for this application. - Versions []*string `type:"list"` -} - -// String returns the string representation -func (s ApplicationDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationDescription) GoString() string { - return s.String() -} - -// SetApplicationArn sets the ApplicationArn field's value. -func (s *ApplicationDescription) SetApplicationArn(v string) *ApplicationDescription { - s.ApplicationArn = &v - return s -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *ApplicationDescription) SetApplicationName(v string) *ApplicationDescription { - s.ApplicationName = &v - return s -} - -// SetConfigurationTemplates sets the ConfigurationTemplates field's value. -func (s *ApplicationDescription) SetConfigurationTemplates(v []*string) *ApplicationDescription { - s.ConfigurationTemplates = v - return s -} - -// SetDateCreated sets the DateCreated field's value. -func (s *ApplicationDescription) SetDateCreated(v time.Time) *ApplicationDescription { - s.DateCreated = &v - return s -} - -// SetDateUpdated sets the DateUpdated field's value. -func (s *ApplicationDescription) SetDateUpdated(v time.Time) *ApplicationDescription { - s.DateUpdated = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ApplicationDescription) SetDescription(v string) *ApplicationDescription { - s.Description = &v - return s -} - -// SetResourceLifecycleConfig sets the ResourceLifecycleConfig field's value. -func (s *ApplicationDescription) SetResourceLifecycleConfig(v *ApplicationResourceLifecycleConfig) *ApplicationDescription { - s.ResourceLifecycleConfig = v - return s -} - -// SetVersions sets the Versions field's value. -func (s *ApplicationDescription) SetVersions(v []*string) *ApplicationDescription { - s.Versions = v - return s -} - -// Result message containing a single description of an application. -type ApplicationDescriptionMessage struct { - _ struct{} `type:"structure"` - - // The ApplicationDescription of the application. - Application *ApplicationDescription `type:"structure"` -} - -// String returns the string representation -func (s ApplicationDescriptionMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationDescriptionMessage) GoString() string { - return s.String() -} - -// SetApplication sets the Application field's value. -func (s *ApplicationDescriptionMessage) SetApplication(v *ApplicationDescription) *ApplicationDescriptionMessage { - s.Application = v - return s -} - -// Application request metrics for an AWS Elastic Beanstalk environment. -type ApplicationMetrics struct { - _ struct{} `type:"structure"` - - // The amount of time that the metrics cover (usually 10 seconds). For example, - // you might have 5 requests (request_count) within the most recent time slice - // of 10 seconds (duration). - Duration *int64 `type:"integer"` - - // Represents the average latency for the slowest X percent of requests over - // the last 10 seconds. Latencies are in seconds with one millisecond resolution. - Latency *Latency `type:"structure"` - - // Average number of requests handled by the web server per second over the - // last 10 seconds. - RequestCount *int64 `type:"integer"` - - // Represents the percentage of requests over the last 10 seconds that resulted - // in each type of status code response. - StatusCodes *StatusCodes `type:"structure"` -} - -// String returns the string representation -func (s ApplicationMetrics) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationMetrics) GoString() string { - return s.String() -} - -// SetDuration sets the Duration field's value. -func (s *ApplicationMetrics) SetDuration(v int64) *ApplicationMetrics { - s.Duration = &v - return s -} - -// SetLatency sets the Latency field's value. -func (s *ApplicationMetrics) SetLatency(v *Latency) *ApplicationMetrics { - s.Latency = v - return s -} - -// SetRequestCount sets the RequestCount field's value. -func (s *ApplicationMetrics) SetRequestCount(v int64) *ApplicationMetrics { - s.RequestCount = &v - return s -} - -// SetStatusCodes sets the StatusCodes field's value. -func (s *ApplicationMetrics) SetStatusCodes(v *StatusCodes) *ApplicationMetrics { - s.StatusCodes = v - return s -} - -// The resource lifecycle configuration for an application. Defines lifecycle -// settings for resources that belong to the application, and the service role -// that Elastic Beanstalk assumes in order to apply lifecycle settings. The -// version lifecycle configuration defines lifecycle settings for application -// versions. -type ApplicationResourceLifecycleConfig struct { - _ struct{} `type:"structure"` - - // The ARN of an IAM service role that Elastic Beanstalk has permission to assume. - // - // The ServiceRole property is required the first time that you provide a VersionLifecycleConfig - // for the application in one of the supporting calls (CreateApplication or - // UpdateApplicationResourceLifecycle). After you provide it once, in either - // one of the calls, Elastic Beanstalk persists the Service Role with the application, - // and you don't need to specify it again in subsequent UpdateApplicationResourceLifecycle - // calls. You can, however, specify it in subsequent calls to change the Service - // Role to another value. - ServiceRole *string `type:"string"` - - // The application version lifecycle configuration. - VersionLifecycleConfig *ApplicationVersionLifecycleConfig `type:"structure"` -} - -// String returns the string representation -func (s ApplicationResourceLifecycleConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationResourceLifecycleConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ApplicationResourceLifecycleConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ApplicationResourceLifecycleConfig"} - if s.VersionLifecycleConfig != nil { - if err := s.VersionLifecycleConfig.Validate(); err != nil { - invalidParams.AddNested("VersionLifecycleConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *ApplicationResourceLifecycleConfig) SetServiceRole(v string) *ApplicationResourceLifecycleConfig { - s.ServiceRole = &v - return s -} - -// SetVersionLifecycleConfig sets the VersionLifecycleConfig field's value. -func (s *ApplicationResourceLifecycleConfig) SetVersionLifecycleConfig(v *ApplicationVersionLifecycleConfig) *ApplicationResourceLifecycleConfig { - s.VersionLifecycleConfig = v - return s -} - -// Describes the properties of an application version. -type ApplicationVersionDescription struct { - _ struct{} `type:"structure"` - - // The name of the application to which the application version belongs. - ApplicationName *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the application version. - ApplicationVersionArn *string `type:"string"` - - // Reference to the artifact from the AWS CodeBuild build. - BuildArn *string `type:"string"` - - // The creation date of the application version. - DateCreated *time.Time `type:"timestamp"` - - // The last modified date of the application version. - DateUpdated *time.Time `type:"timestamp"` - - // The description of the application version. - Description *string `type:"string"` - - // If the version's source code was retrieved from AWS CodeCommit, the location - // of the source code for the application version. - SourceBuildInformation *SourceBuildInformation `type:"structure"` - - // The storage location of the application version's source bundle in Amazon - // S3. - SourceBundle *S3Location `type:"structure"` - - // The processing status of the application version. Reflects the state of the - // application version during its creation. Many of the values are only applicable - // if you specified True for the Process parameter of the CreateApplicationVersion - // action. The following list describes the possible values. - // - // * Unprocessed – Application version wasn't pre-processed or validated. - // Elastic Beanstalk will validate configuration files during deployment - // of the application version to an environment. - // - // * Processing – Elastic Beanstalk is currently processing the application - // version. - // - // * Building – Application version is currently undergoing an AWS CodeBuild - // build. - // - // * Processed – Elastic Beanstalk was successfully pre-processed and validated. - // - // * Failed – Either the AWS CodeBuild build failed or configuration files - // didn't pass validation. This application version isn't usable. - Status *string `type:"string" enum:"ApplicationVersionStatus"` - - // A unique identifier for the application version. - VersionLabel *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ApplicationVersionDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationVersionDescription) GoString() string { - return s.String() -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *ApplicationVersionDescription) SetApplicationName(v string) *ApplicationVersionDescription { - s.ApplicationName = &v - return s -} - -// SetApplicationVersionArn sets the ApplicationVersionArn field's value. -func (s *ApplicationVersionDescription) SetApplicationVersionArn(v string) *ApplicationVersionDescription { - s.ApplicationVersionArn = &v - return s -} - -// SetBuildArn sets the BuildArn field's value. -func (s *ApplicationVersionDescription) SetBuildArn(v string) *ApplicationVersionDescription { - s.BuildArn = &v - return s -} - -// SetDateCreated sets the DateCreated field's value. -func (s *ApplicationVersionDescription) SetDateCreated(v time.Time) *ApplicationVersionDescription { - s.DateCreated = &v - return s -} - -// SetDateUpdated sets the DateUpdated field's value. -func (s *ApplicationVersionDescription) SetDateUpdated(v time.Time) *ApplicationVersionDescription { - s.DateUpdated = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ApplicationVersionDescription) SetDescription(v string) *ApplicationVersionDescription { - s.Description = &v - return s -} - -// SetSourceBuildInformation sets the SourceBuildInformation field's value. -func (s *ApplicationVersionDescription) SetSourceBuildInformation(v *SourceBuildInformation) *ApplicationVersionDescription { - s.SourceBuildInformation = v - return s -} - -// SetSourceBundle sets the SourceBundle field's value. -func (s *ApplicationVersionDescription) SetSourceBundle(v *S3Location) *ApplicationVersionDescription { - s.SourceBundle = v - return s -} - -// SetStatus sets the Status field's value. -func (s *ApplicationVersionDescription) SetStatus(v string) *ApplicationVersionDescription { - s.Status = &v - return s -} - -// SetVersionLabel sets the VersionLabel field's value. -func (s *ApplicationVersionDescription) SetVersionLabel(v string) *ApplicationVersionDescription { - s.VersionLabel = &v - return s -} - -// Result message wrapping a single description of an application version. -type ApplicationVersionDescriptionMessage struct { - _ struct{} `type:"structure"` - - // The ApplicationVersionDescription of the application version. - ApplicationVersion *ApplicationVersionDescription `type:"structure"` -} - -// String returns the string representation -func (s ApplicationVersionDescriptionMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationVersionDescriptionMessage) GoString() string { - return s.String() -} - -// SetApplicationVersion sets the ApplicationVersion field's value. -func (s *ApplicationVersionDescriptionMessage) SetApplicationVersion(v *ApplicationVersionDescription) *ApplicationVersionDescriptionMessage { - s.ApplicationVersion = v - return s -} - -// The application version lifecycle settings for an application. Defines the -// rules that Elastic Beanstalk applies to an application's versions in order -// to avoid hitting the per-region limit for application versions. -// -// When Elastic Beanstalk deletes an application version from its database, -// you can no longer deploy that version to an environment. The source bundle -// remains in S3 unless you configure the rule to delete it. -type ApplicationVersionLifecycleConfig struct { - _ struct{} `type:"structure"` - - // Specify a max age rule to restrict the length of time that application versions - // are retained for an application. - MaxAgeRule *MaxAgeRule `type:"structure"` - - // Specify a max count rule to restrict the number of application versions that - // are retained for an application. - MaxCountRule *MaxCountRule `type:"structure"` -} - -// String returns the string representation -func (s ApplicationVersionLifecycleConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationVersionLifecycleConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ApplicationVersionLifecycleConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ApplicationVersionLifecycleConfig"} - if s.MaxAgeRule != nil { - if err := s.MaxAgeRule.Validate(); err != nil { - invalidParams.AddNested("MaxAgeRule", err.(request.ErrInvalidParams)) - } - } - if s.MaxCountRule != nil { - if err := s.MaxCountRule.Validate(); err != nil { - invalidParams.AddNested("MaxCountRule", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxAgeRule sets the MaxAgeRule field's value. -func (s *ApplicationVersionLifecycleConfig) SetMaxAgeRule(v *MaxAgeRule) *ApplicationVersionLifecycleConfig { - s.MaxAgeRule = v - return s -} - -// SetMaxCountRule sets the MaxCountRule field's value. -func (s *ApplicationVersionLifecycleConfig) SetMaxCountRule(v *MaxCountRule) *ApplicationVersionLifecycleConfig { - s.MaxCountRule = v - return s -} - -// Request to execute a scheduled managed action immediately. -type ApplyEnvironmentManagedActionInput struct { - _ struct{} `type:"structure"` - - // The action ID of the scheduled managed action to execute. - // - // ActionId is a required field - ActionId *string `type:"string" required:"true"` - - // The environment ID of the target environment. - EnvironmentId *string `type:"string"` - - // The name of the target environment. - EnvironmentName *string `type:"string"` -} - -// String returns the string representation -func (s ApplyEnvironmentManagedActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplyEnvironmentManagedActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ApplyEnvironmentManagedActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ApplyEnvironmentManagedActionInput"} - if s.ActionId == nil { - invalidParams.Add(request.NewErrParamRequired("ActionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionId sets the ActionId field's value. -func (s *ApplyEnvironmentManagedActionInput) SetActionId(v string) *ApplyEnvironmentManagedActionInput { - s.ActionId = &v - return s -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *ApplyEnvironmentManagedActionInput) SetEnvironmentId(v string) *ApplyEnvironmentManagedActionInput { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *ApplyEnvironmentManagedActionInput) SetEnvironmentName(v string) *ApplyEnvironmentManagedActionInput { - s.EnvironmentName = &v - return s -} - -// The result message containing information about the managed action. -type ApplyEnvironmentManagedActionOutput struct { - _ struct{} `type:"structure"` - - // A description of the managed action. - ActionDescription *string `type:"string"` - - // The action ID of the managed action. - ActionId *string `type:"string"` - - // The type of managed action. - ActionType *string `type:"string" enum:"ActionType"` - - // The status of the managed action. - Status *string `type:"string"` -} - -// String returns the string representation -func (s ApplyEnvironmentManagedActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplyEnvironmentManagedActionOutput) GoString() string { - return s.String() -} - -// SetActionDescription sets the ActionDescription field's value. -func (s *ApplyEnvironmentManagedActionOutput) SetActionDescription(v string) *ApplyEnvironmentManagedActionOutput { - s.ActionDescription = &v - return s -} - -// SetActionId sets the ActionId field's value. -func (s *ApplyEnvironmentManagedActionOutput) SetActionId(v string) *ApplyEnvironmentManagedActionOutput { - s.ActionId = &v - return s -} - -// SetActionType sets the ActionType field's value. -func (s *ApplyEnvironmentManagedActionOutput) SetActionType(v string) *ApplyEnvironmentManagedActionOutput { - s.ActionType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ApplyEnvironmentManagedActionOutput) SetStatus(v string) *ApplyEnvironmentManagedActionOutput { - s.Status = &v - return s -} - -// Describes an Auto Scaling launch configuration. -type AutoScalingGroup struct { - _ struct{} `type:"structure"` - - // The name of the AutoScalingGroup . - Name *string `type:"string"` -} - -// String returns the string representation -func (s AutoScalingGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AutoScalingGroup) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *AutoScalingGroup) SetName(v string) *AutoScalingGroup { - s.Name = &v - return s -} - -// Settings for an AWS CodeBuild build. -type BuildConfiguration struct { - _ struct{} `type:"structure"` - - // The name of the artifact of the CodeBuild build. If provided, Elastic Beanstalk - // stores the build artifact in the S3 location S3-bucket/resources/application-name/codebuild/codebuild-version-label-artifact-name.zip. - // If not provided, Elastic Beanstalk stores the build artifact in the S3 location - // S3-bucket/resources/application-name/codebuild/codebuild-version-label.zip. - ArtifactName *string `type:"string"` - - // The Amazon Resource Name (ARN) of the AWS Identity and Access Management - // (IAM) role that enables AWS CodeBuild to interact with dependent AWS services - // on behalf of the AWS account. - // - // CodeBuildServiceRole is a required field - CodeBuildServiceRole *string `type:"string" required:"true"` - - // Information about the compute resources the build project will use. - // - // * BUILD_GENERAL1_SMALL: Use up to 3 GB memory and 2 vCPUs for builds - // - // * BUILD_GENERAL1_MEDIUM: Use up to 7 GB memory and 4 vCPUs for builds - // - // * BUILD_GENERAL1_LARGE: Use up to 15 GB memory and 8 vCPUs for builds - ComputeType *string `type:"string" enum:"ComputeType"` - - // The ID of the Docker image to use for this build project. - // - // Image is a required field - Image *string `type:"string" required:"true"` - - // How long in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until - // timing out any related build that does not get marked as completed. The default - // is 60 minutes. - TimeoutInMinutes *int64 `type:"integer"` -} - -// String returns the string representation -func (s BuildConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BuildConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BuildConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BuildConfiguration"} - if s.CodeBuildServiceRole == nil { - invalidParams.Add(request.NewErrParamRequired("CodeBuildServiceRole")) - } - if s.Image == nil { - invalidParams.Add(request.NewErrParamRequired("Image")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArtifactName sets the ArtifactName field's value. -func (s *BuildConfiguration) SetArtifactName(v string) *BuildConfiguration { - s.ArtifactName = &v - return s -} - -// SetCodeBuildServiceRole sets the CodeBuildServiceRole field's value. -func (s *BuildConfiguration) SetCodeBuildServiceRole(v string) *BuildConfiguration { - s.CodeBuildServiceRole = &v - return s -} - -// SetComputeType sets the ComputeType field's value. -func (s *BuildConfiguration) SetComputeType(v string) *BuildConfiguration { - s.ComputeType = &v - return s -} - -// SetImage sets the Image field's value. -func (s *BuildConfiguration) SetImage(v string) *BuildConfiguration { - s.Image = &v - return s -} - -// SetTimeoutInMinutes sets the TimeoutInMinutes field's value. -func (s *BuildConfiguration) SetTimeoutInMinutes(v int64) *BuildConfiguration { - s.TimeoutInMinutes = &v - return s -} - -// The builder used to build the custom platform. -type Builder struct { - _ struct{} `type:"structure"` - - // The ARN of the builder. - ARN *string `type:"string"` -} - -// String returns the string representation -func (s Builder) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Builder) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *Builder) SetARN(v string) *Builder { - s.ARN = &v - return s -} - -// CPU utilization metrics for an instance. -type CPUUtilization struct { - _ struct{} `type:"structure"` - - // Available on Linux environments only. - // - // Percentage of time that the CPU has spent in the I/O Wait state over the - // last 10 seconds. - IOWait *float64 `type:"double"` - - // Available on Linux environments only. - // - // Percentage of time that the CPU has spent in the IRQ state over the last - // 10 seconds. - IRQ *float64 `type:"double"` - - // Percentage of time that the CPU has spent in the Idle state over the last - // 10 seconds. - Idle *float64 `type:"double"` - - // Available on Linux environments only. - // - // Percentage of time that the CPU has spent in the Nice state over the last - // 10 seconds. - Nice *float64 `type:"double"` - - // Available on Windows environments only. - // - // Percentage of time that the CPU has spent in the Privileged state over the - // last 10 seconds. - Privileged *float64 `type:"double"` - - // Available on Linux environments only. - // - // Percentage of time that the CPU has spent in the SoftIRQ state over the last - // 10 seconds. - SoftIRQ *float64 `type:"double"` - - // Available on Linux environments only. - // - // Percentage of time that the CPU has spent in the System state over the last - // 10 seconds. - System *float64 `type:"double"` - - // Percentage of time that the CPU has spent in the User state over the last - // 10 seconds. - User *float64 `type:"double"` -} - -// String returns the string representation -func (s CPUUtilization) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CPUUtilization) GoString() string { - return s.String() -} - -// SetIOWait sets the IOWait field's value. -func (s *CPUUtilization) SetIOWait(v float64) *CPUUtilization { - s.IOWait = &v - return s -} - -// SetIRQ sets the IRQ field's value. -func (s *CPUUtilization) SetIRQ(v float64) *CPUUtilization { - s.IRQ = &v - return s -} - -// SetIdle sets the Idle field's value. -func (s *CPUUtilization) SetIdle(v float64) *CPUUtilization { - s.Idle = &v - return s -} - -// SetNice sets the Nice field's value. -func (s *CPUUtilization) SetNice(v float64) *CPUUtilization { - s.Nice = &v - return s -} - -// SetPrivileged sets the Privileged field's value. -func (s *CPUUtilization) SetPrivileged(v float64) *CPUUtilization { - s.Privileged = &v - return s -} - -// SetSoftIRQ sets the SoftIRQ field's value. -func (s *CPUUtilization) SetSoftIRQ(v float64) *CPUUtilization { - s.SoftIRQ = &v - return s -} - -// SetSystem sets the System field's value. -func (s *CPUUtilization) SetSystem(v float64) *CPUUtilization { - s.System = &v - return s -} - -// SetUser sets the User field's value. -func (s *CPUUtilization) SetUser(v float64) *CPUUtilization { - s.User = &v - return s -} - -// Results message indicating whether a CNAME is available. -type CheckDNSAvailabilityInput struct { - _ struct{} `type:"structure"` - - // The prefix used when this CNAME is reserved. - // - // CNAMEPrefix is a required field - CNAMEPrefix *string `min:"4" type:"string" required:"true"` -} - -// String returns the string representation -func (s CheckDNSAvailabilityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CheckDNSAvailabilityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CheckDNSAvailabilityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CheckDNSAvailabilityInput"} - if s.CNAMEPrefix == nil { - invalidParams.Add(request.NewErrParamRequired("CNAMEPrefix")) - } - if s.CNAMEPrefix != nil && len(*s.CNAMEPrefix) < 4 { - invalidParams.Add(request.NewErrParamMinLen("CNAMEPrefix", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCNAMEPrefix sets the CNAMEPrefix field's value. -func (s *CheckDNSAvailabilityInput) SetCNAMEPrefix(v string) *CheckDNSAvailabilityInput { - s.CNAMEPrefix = &v - return s -} - -// Indicates if the specified CNAME is available. -type CheckDNSAvailabilityOutput struct { - _ struct{} `type:"structure"` - - // Indicates if the specified CNAME is available: - // - // * true : The CNAME is available. - // - // * false : The CNAME is not available. - Available *bool `type:"boolean"` - - // The fully qualified CNAME to reserve when CreateEnvironment is called with - // the provided prefix. - FullyQualifiedCNAME *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CheckDNSAvailabilityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CheckDNSAvailabilityOutput) GoString() string { - return s.String() -} - -// SetAvailable sets the Available field's value. -func (s *CheckDNSAvailabilityOutput) SetAvailable(v bool) *CheckDNSAvailabilityOutput { - s.Available = &v - return s -} - -// SetFullyQualifiedCNAME sets the FullyQualifiedCNAME field's value. -func (s *CheckDNSAvailabilityOutput) SetFullyQualifiedCNAME(v string) *CheckDNSAvailabilityOutput { - s.FullyQualifiedCNAME = &v - return s -} - -// Request to create or update a group of environments. -type ComposeEnvironmentsInput struct { - _ struct{} `type:"structure"` - - // The name of the application to which the specified source bundles belong. - ApplicationName *string `min:"1" type:"string"` - - // The name of the group to which the target environments belong. Specify a - // group name only if the environment name defined in each target environment's - // manifest ends with a + (plus) character. See Environment Manifest (env.yaml) - // (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html) - // for details. - GroupName *string `min:"1" type:"string"` - - // A list of version labels, specifying one or more application source bundles - // that belong to the target application. Each source bundle must include an - // environment manifest that specifies the name of the environment and the name - // of the solution stack to use, and optionally can specify environment links - // to create. - VersionLabels []*string `type:"list"` -} - -// String returns the string representation -func (s ComposeEnvironmentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComposeEnvironmentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ComposeEnvironmentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ComposeEnvironmentsInput"} - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *ComposeEnvironmentsInput) SetApplicationName(v string) *ComposeEnvironmentsInput { - s.ApplicationName = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *ComposeEnvironmentsInput) SetGroupName(v string) *ComposeEnvironmentsInput { - s.GroupName = &v - return s -} - -// SetVersionLabels sets the VersionLabels field's value. -func (s *ComposeEnvironmentsInput) SetVersionLabels(v []*string) *ComposeEnvironmentsInput { - s.VersionLabels = v - return s -} - -// Describes the possible values for a configuration option. -type ConfigurationOptionDescription struct { - _ struct{} `type:"structure"` - - // An indication of which action is required if the value for this configuration - // option changes: - // - // * NoInterruption : There is no interruption to the environment or application - // availability. - // - // * RestartEnvironment : The environment is entirely restarted, all AWS - // resources are deleted and recreated, and the environment is unavailable - // during the process. - // - // * RestartApplicationServer : The environment is available the entire time. - // However, a short application outage occurs when the application servers - // on the running Amazon EC2 instances are restarted. - ChangeSeverity *string `type:"string"` - - // The default value for this configuration option. - DefaultValue *string `type:"string"` - - // If specified, the configuration option must be a string value no longer than - // this value. - MaxLength *int64 `type:"integer"` - - // If specified, the configuration option must be a numeric value less than - // this value. - MaxValue *int64 `type:"integer"` - - // If specified, the configuration option must be a numeric value greater than - // this value. - MinValue *int64 `type:"integer"` - - // The name of the configuration option. - Name *string `type:"string"` - - // A unique namespace identifying the option's associated AWS resource. - Namespace *string `type:"string"` - - // If specified, the configuration option must be a string value that satisfies - // this regular expression. - Regex *OptionRestrictionRegex `type:"structure"` - - // An indication of whether the user defined this configuration option: - // - // * true : This configuration option was defined by the user. It is a valid - // choice for specifying if this as an Option to Remove when updating configuration - // settings. - // - // * false : This configuration was not defined by the user. - // - // Constraint: You can remove only UserDefined options from a configuration. - // - // Valid Values: true | false - UserDefined *bool `type:"boolean"` - - // If specified, values for the configuration option are selected from this - // list. - ValueOptions []*string `type:"list"` - - // An indication of which type of values this option has and whether it is allowable - // to select one or more than one of the possible values: - // - // * Scalar : Values for this option are a single selection from the possible - // values, or an unformatted string, or numeric value governed by the MIN/MAX/Regex - // constraints. - // - // * List : Values for this option are multiple selections from the possible - // values. - // - // * Boolean : Values for this option are either true or false . - // - // * Json : Values for this option are a JSON representation of a ConfigDocument. - ValueType *string `type:"string" enum:"ConfigurationOptionValueType"` -} - -// String returns the string representation -func (s ConfigurationOptionDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigurationOptionDescription) GoString() string { - return s.String() -} - -// SetChangeSeverity sets the ChangeSeverity field's value. -func (s *ConfigurationOptionDescription) SetChangeSeverity(v string) *ConfigurationOptionDescription { - s.ChangeSeverity = &v - return s -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *ConfigurationOptionDescription) SetDefaultValue(v string) *ConfigurationOptionDescription { - s.DefaultValue = &v - return s -} - -// SetMaxLength sets the MaxLength field's value. -func (s *ConfigurationOptionDescription) SetMaxLength(v int64) *ConfigurationOptionDescription { - s.MaxLength = &v - return s -} - -// SetMaxValue sets the MaxValue field's value. -func (s *ConfigurationOptionDescription) SetMaxValue(v int64) *ConfigurationOptionDescription { - s.MaxValue = &v - return s -} - -// SetMinValue sets the MinValue field's value. -func (s *ConfigurationOptionDescription) SetMinValue(v int64) *ConfigurationOptionDescription { - s.MinValue = &v - return s -} - -// SetName sets the Name field's value. -func (s *ConfigurationOptionDescription) SetName(v string) *ConfigurationOptionDescription { - s.Name = &v - return s -} - -// SetNamespace sets the Namespace field's value. -func (s *ConfigurationOptionDescription) SetNamespace(v string) *ConfigurationOptionDescription { - s.Namespace = &v - return s -} - -// SetRegex sets the Regex field's value. -func (s *ConfigurationOptionDescription) SetRegex(v *OptionRestrictionRegex) *ConfigurationOptionDescription { - s.Regex = v - return s -} - -// SetUserDefined sets the UserDefined field's value. -func (s *ConfigurationOptionDescription) SetUserDefined(v bool) *ConfigurationOptionDescription { - s.UserDefined = &v - return s -} - -// SetValueOptions sets the ValueOptions field's value. -func (s *ConfigurationOptionDescription) SetValueOptions(v []*string) *ConfigurationOptionDescription { - s.ValueOptions = v - return s -} - -// SetValueType sets the ValueType field's value. -func (s *ConfigurationOptionDescription) SetValueType(v string) *ConfigurationOptionDescription { - s.ValueType = &v - return s -} - -// A specification identifying an individual configuration option along with -// its current value. For a list of possible option values, go to Option Values -// (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html) -// in the AWS Elastic Beanstalk Developer Guide. -type ConfigurationOptionSetting struct { - _ struct{} `type:"structure"` - - // A unique namespace identifying the option's associated AWS resource. - Namespace *string `type:"string"` - - // The name of the configuration option. - OptionName *string `type:"string"` - - // A unique resource name for a time-based scaling configuration option. - ResourceName *string `min:"1" type:"string"` - - // The current value for the configuration option. - Value *string `type:"string"` -} - -// String returns the string representation -func (s ConfigurationOptionSetting) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigurationOptionSetting) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfigurationOptionSetting) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfigurationOptionSetting"} - if s.ResourceName != nil && len(*s.ResourceName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNamespace sets the Namespace field's value. -func (s *ConfigurationOptionSetting) SetNamespace(v string) *ConfigurationOptionSetting { - s.Namespace = &v - return s -} - -// SetOptionName sets the OptionName field's value. -func (s *ConfigurationOptionSetting) SetOptionName(v string) *ConfigurationOptionSetting { - s.OptionName = &v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *ConfigurationOptionSetting) SetResourceName(v string) *ConfigurationOptionSetting { - s.ResourceName = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ConfigurationOptionSetting) SetValue(v string) *ConfigurationOptionSetting { - s.Value = &v - return s -} - -// Describes the settings for a configuration set. -type ConfigurationSettingsDescription struct { - _ struct{} `type:"structure"` - - // The name of the application associated with this configuration set. - ApplicationName *string `min:"1" type:"string"` - - // The date (in UTC time) when this configuration set was created. - DateCreated *time.Time `type:"timestamp"` - - // The date (in UTC time) when this configuration set was last modified. - DateUpdated *time.Time `type:"timestamp"` - - // If this configuration set is associated with an environment, the DeploymentStatus - // parameter indicates the deployment status of this configuration set: - // - // * null: This configuration is not associated with a running environment. - // - // * pending: This is a draft configuration that is not deployed to the associated - // environment but is in the process of deploying. - // - // * deployed: This is the configuration that is currently deployed to the - // associated running environment. - // - // * failed: This is a draft configuration that failed to successfully deploy. - DeploymentStatus *string `type:"string" enum:"ConfigurationDeploymentStatus"` - - // Describes this configuration set. - Description *string `type:"string"` - - // If not null, the name of the environment for this configuration set. - EnvironmentName *string `min:"4" type:"string"` - - // A list of the configuration options and their values in this configuration - // set. - OptionSettings []*ConfigurationOptionSetting `type:"list"` - - // The ARN of the platform. - PlatformArn *string `type:"string"` - - // The name of the solution stack this configuration set uses. - SolutionStackName *string `type:"string"` - - // If not null, the name of the configuration template for this configuration - // set. - TemplateName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ConfigurationSettingsDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigurationSettingsDescription) GoString() string { - return s.String() -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *ConfigurationSettingsDescription) SetApplicationName(v string) *ConfigurationSettingsDescription { - s.ApplicationName = &v - return s -} - -// SetDateCreated sets the DateCreated field's value. -func (s *ConfigurationSettingsDescription) SetDateCreated(v time.Time) *ConfigurationSettingsDescription { - s.DateCreated = &v - return s -} - -// SetDateUpdated sets the DateUpdated field's value. -func (s *ConfigurationSettingsDescription) SetDateUpdated(v time.Time) *ConfigurationSettingsDescription { - s.DateUpdated = &v - return s -} - -// SetDeploymentStatus sets the DeploymentStatus field's value. -func (s *ConfigurationSettingsDescription) SetDeploymentStatus(v string) *ConfigurationSettingsDescription { - s.DeploymentStatus = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ConfigurationSettingsDescription) SetDescription(v string) *ConfigurationSettingsDescription { - s.Description = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *ConfigurationSettingsDescription) SetEnvironmentName(v string) *ConfigurationSettingsDescription { - s.EnvironmentName = &v - return s -} - -// SetOptionSettings sets the OptionSettings field's value. -func (s *ConfigurationSettingsDescription) SetOptionSettings(v []*ConfigurationOptionSetting) *ConfigurationSettingsDescription { - s.OptionSettings = v - return s -} - -// SetPlatformArn sets the PlatformArn field's value. -func (s *ConfigurationSettingsDescription) SetPlatformArn(v string) *ConfigurationSettingsDescription { - s.PlatformArn = &v - return s -} - -// SetSolutionStackName sets the SolutionStackName field's value. -func (s *ConfigurationSettingsDescription) SetSolutionStackName(v string) *ConfigurationSettingsDescription { - s.SolutionStackName = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *ConfigurationSettingsDescription) SetTemplateName(v string) *ConfigurationSettingsDescription { - s.TemplateName = &v - return s -} - -// Request to create an application. -type CreateApplicationInput struct { - _ struct{} `type:"structure"` - - // The name of the application. - // - // Constraint: This name must be unique within your account. If the specified - // name already exists, the action returns an InvalidParameterValue error. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Describes the application. - Description *string `type:"string"` - - // Specify an application resource lifecycle configuration to prevent your application - // from accumulating too many versions. - ResourceLifecycleConfig *ApplicationResourceLifecycleConfig `type:"structure"` -} - -// String returns the string representation -func (s CreateApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateApplicationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.ResourceLifecycleConfig != nil { - if err := s.ResourceLifecycleConfig.Validate(); err != nil { - invalidParams.AddNested("ResourceLifecycleConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *CreateApplicationInput) SetApplicationName(v string) *CreateApplicationInput { - s.ApplicationName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateApplicationInput) SetDescription(v string) *CreateApplicationInput { - s.Description = &v - return s -} - -// SetResourceLifecycleConfig sets the ResourceLifecycleConfig field's value. -func (s *CreateApplicationInput) SetResourceLifecycleConfig(v *ApplicationResourceLifecycleConfig) *CreateApplicationInput { - s.ResourceLifecycleConfig = v - return s -} - -type CreateApplicationVersionInput struct { - _ struct{} `type:"structure"` - - // The name of the application. If no application is found with this name, and - // AutoCreateApplication is false, returns an InvalidParameterValue error. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Set to true to create an application with the specified name if it doesn't - // already exist. - AutoCreateApplication *bool `type:"boolean"` - - // Settings for an AWS CodeBuild build. - BuildConfiguration *BuildConfiguration `type:"structure"` - - // Describes this version. - Description *string `type:"string"` - - // Pre-processes and validates the environment manifest (env.yaml) and configuration - // files (*.config files in the .ebextensions folder) in the source bundle. - // Validating configuration files can identify issues prior to deploying the - // application version to an environment. - // - // You must turn processing on for application versions that you create using - // AWS CodeBuild or AWS CodeCommit. For application versions built from a source - // bundle in Amazon S3, processing is optional. - // - // The Process option validates Elastic Beanstalk configuration files. It doesn't - // validate your application's configuration files, like proxy server or Docker - // configuration. - Process *bool `type:"boolean"` - - // Specify a commit in an AWS CodeCommit Git repository to use as the source - // code for the application version. - SourceBuildInformation *SourceBuildInformation `type:"structure"` - - // The Amazon S3 bucket and key that identify the location of the source bundle - // for this version. - // - // The Amazon S3 bucket must be in the same region as the environment. - // - // Specify a source bundle in S3 or a commit in an AWS CodeCommit repository - // (with SourceBuildInformation), but not both. If neither SourceBundle nor - // SourceBuildInformation are provided, Elastic Beanstalk uses a sample application. - SourceBundle *S3Location `type:"structure"` - - // A label identifying this version. - // - // Constraint: Must be unique per application. If an application version already - // exists with this label for the specified application, AWS Elastic Beanstalk - // returns an InvalidParameterValue error. - // - // VersionLabel is a required field - VersionLabel *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateApplicationVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApplicationVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateApplicationVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateApplicationVersionInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.VersionLabel == nil { - invalidParams.Add(request.NewErrParamRequired("VersionLabel")) - } - if s.VersionLabel != nil && len(*s.VersionLabel) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VersionLabel", 1)) - } - if s.BuildConfiguration != nil { - if err := s.BuildConfiguration.Validate(); err != nil { - invalidParams.AddNested("BuildConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.SourceBuildInformation != nil { - if err := s.SourceBuildInformation.Validate(); err != nil { - invalidParams.AddNested("SourceBuildInformation", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *CreateApplicationVersionInput) SetApplicationName(v string) *CreateApplicationVersionInput { - s.ApplicationName = &v - return s -} - -// SetAutoCreateApplication sets the AutoCreateApplication field's value. -func (s *CreateApplicationVersionInput) SetAutoCreateApplication(v bool) *CreateApplicationVersionInput { - s.AutoCreateApplication = &v - return s -} - -// SetBuildConfiguration sets the BuildConfiguration field's value. -func (s *CreateApplicationVersionInput) SetBuildConfiguration(v *BuildConfiguration) *CreateApplicationVersionInput { - s.BuildConfiguration = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateApplicationVersionInput) SetDescription(v string) *CreateApplicationVersionInput { - s.Description = &v - return s -} - -// SetProcess sets the Process field's value. -func (s *CreateApplicationVersionInput) SetProcess(v bool) *CreateApplicationVersionInput { - s.Process = &v - return s -} - -// SetSourceBuildInformation sets the SourceBuildInformation field's value. -func (s *CreateApplicationVersionInput) SetSourceBuildInformation(v *SourceBuildInformation) *CreateApplicationVersionInput { - s.SourceBuildInformation = v - return s -} - -// SetSourceBundle sets the SourceBundle field's value. -func (s *CreateApplicationVersionInput) SetSourceBundle(v *S3Location) *CreateApplicationVersionInput { - s.SourceBundle = v - return s -} - -// SetVersionLabel sets the VersionLabel field's value. -func (s *CreateApplicationVersionInput) SetVersionLabel(v string) *CreateApplicationVersionInput { - s.VersionLabel = &v - return s -} - -// Request to create a configuration template. -type CreateConfigurationTemplateInput struct { - _ struct{} `type:"structure"` - - // The name of the application to associate with this configuration template. - // If no application is found with this name, AWS Elastic Beanstalk returns - // an InvalidParameterValue error. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Describes this configuration. - Description *string `type:"string"` - - // The ID of the environment used with this configuration template. - EnvironmentId *string `type:"string"` - - // If specified, AWS Elastic Beanstalk sets the specified configuration option - // to the requested value. The new value overrides the value obtained from the - // solution stack or the source configuration template. - OptionSettings []*ConfigurationOptionSetting `type:"list"` - - // The ARN of the custom platform. - PlatformArn *string `type:"string"` - - // The name of the solution stack used by this configuration. The solution stack - // specifies the operating system, architecture, and application server for - // a configuration template. It determines the set of configuration options - // as well as the possible and default values. - // - // Use ListAvailableSolutionStacks to obtain a list of available solution stacks. - // - // A solution stack name or a source configuration parameter must be specified, - // otherwise AWS Elastic Beanstalk returns an InvalidParameterValue error. - // - // If a solution stack name is not specified and the source configuration parameter - // is specified, AWS Elastic Beanstalk uses the same solution stack as the source - // configuration template. - SolutionStackName *string `type:"string"` - - // If specified, AWS Elastic Beanstalk uses the configuration values from the - // specified configuration template to create a new configuration. - // - // Values specified in the OptionSettings parameter of this call overrides any - // values obtained from the SourceConfiguration. - // - // If no configuration template is found, returns an InvalidParameterValue error. - // - // Constraint: If both the solution stack name parameter and the source configuration - // parameters are specified, the solution stack of the source configuration - // template must match the specified solution stack name or else AWS Elastic - // Beanstalk returns an InvalidParameterCombination error. - SourceConfiguration *SourceConfiguration `type:"structure"` - - // The name of the configuration template. - // - // Constraint: This name must be unique per application. - // - // Default: If a configuration template already exists with this name, AWS Elastic - // Beanstalk returns an InvalidParameterValue error. - // - // TemplateName is a required field - TemplateName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateConfigurationTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConfigurationTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateConfigurationTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateConfigurationTemplateInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.TemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateName")) - } - if s.TemplateName != nil && len(*s.TemplateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) - } - if s.OptionSettings != nil { - for i, v := range s.OptionSettings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionSettings", i), err.(request.ErrInvalidParams)) - } - } - } - if s.SourceConfiguration != nil { - if err := s.SourceConfiguration.Validate(); err != nil { - invalidParams.AddNested("SourceConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *CreateConfigurationTemplateInput) SetApplicationName(v string) *CreateConfigurationTemplateInput { - s.ApplicationName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateConfigurationTemplateInput) SetDescription(v string) *CreateConfigurationTemplateInput { - s.Description = &v - return s -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *CreateConfigurationTemplateInput) SetEnvironmentId(v string) *CreateConfigurationTemplateInput { - s.EnvironmentId = &v - return s -} - -// SetOptionSettings sets the OptionSettings field's value. -func (s *CreateConfigurationTemplateInput) SetOptionSettings(v []*ConfigurationOptionSetting) *CreateConfigurationTemplateInput { - s.OptionSettings = v - return s -} - -// SetPlatformArn sets the PlatformArn field's value. -func (s *CreateConfigurationTemplateInput) SetPlatformArn(v string) *CreateConfigurationTemplateInput { - s.PlatformArn = &v - return s -} - -// SetSolutionStackName sets the SolutionStackName field's value. -func (s *CreateConfigurationTemplateInput) SetSolutionStackName(v string) *CreateConfigurationTemplateInput { - s.SolutionStackName = &v - return s -} - -// SetSourceConfiguration sets the SourceConfiguration field's value. -func (s *CreateConfigurationTemplateInput) SetSourceConfiguration(v *SourceConfiguration) *CreateConfigurationTemplateInput { - s.SourceConfiguration = v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *CreateConfigurationTemplateInput) SetTemplateName(v string) *CreateConfigurationTemplateInput { - s.TemplateName = &v - return s -} - -type CreateEnvironmentInput struct { - _ struct{} `type:"structure"` - - // The name of the application that contains the version to be deployed. - // - // If no application is found with this name, CreateEnvironment returns an InvalidParameterValue - // error. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // If specified, the environment attempts to use this value as the prefix for - // the CNAME. If not specified, the CNAME is generated automatically by appending - // a random alphanumeric string to the environment name. - CNAMEPrefix *string `min:"4" type:"string"` - - // Describes this environment. - Description *string `type:"string"` - - // A unique name for the deployment environment. Used in the application URL. - // - // Constraint: Must be from 4 to 40 characters in length. The name can contain - // only letters, numbers, and hyphens. It cannot start or end with a hyphen. - // This name must be unique within a region in your account. If the specified - // name already exists in the region, AWS Elastic Beanstalk returns an InvalidParameterValue - // error. - // - // Default: If the CNAME parameter is not specified, the environment name becomes - // part of the CNAME, and therefore part of the visible URL for your application. - EnvironmentName *string `min:"4" type:"string"` - - // The name of the group to which the target environment belongs. Specify a - // group name only if the environment's name is specified in an environment - // manifest and not with the environment name parameter. See Environment Manifest - // (env.yaml) (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html) - // for details. - GroupName *string `min:"1" type:"string"` - - // If specified, AWS Elastic Beanstalk sets the specified configuration options - // to the requested value in the configuration set for the new environment. - // These override the values obtained from the solution stack or the configuration - // template. - OptionSettings []*ConfigurationOptionSetting `type:"list"` - - // A list of custom user-defined configuration options to remove from the configuration - // set for this new environment. - OptionsToRemove []*OptionSpecification `type:"list"` - - // The ARN of the platform. - PlatformArn *string `type:"string"` - - // This is an alternative to specifying a template name. If specified, AWS Elastic - // Beanstalk sets the configuration values to the default values associated - // with the specified solution stack. - // - // For a list of current solution stacks, see Elastic Beanstalk Supported Platforms - // (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html). - SolutionStackName *string `type:"string"` - - // This specifies the tags applied to resources in the environment. - Tags []*Tag `type:"list"` - - // The name of the configuration template to use in deployment. If no configuration - // template is found with this name, AWS Elastic Beanstalk returns an InvalidParameterValue - // error. - TemplateName *string `min:"1" type:"string"` - - // This specifies the tier to use for creating this environment. - Tier *EnvironmentTier `type:"structure"` - - // The name of the application version to deploy. - // - // If the specified application has no associated application versions, AWS - // Elastic Beanstalk UpdateEnvironment returns an InvalidParameterValue error. - // - // Default: If not specified, AWS Elastic Beanstalk attempts to launch the sample - // application in the container. - VersionLabel *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateEnvironmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEnvironmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateEnvironmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateEnvironmentInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.CNAMEPrefix != nil && len(*s.CNAMEPrefix) < 4 { - invalidParams.Add(request.NewErrParamMinLen("CNAMEPrefix", 4)) - } - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.TemplateName != nil && len(*s.TemplateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) - } - if s.VersionLabel != nil && len(*s.VersionLabel) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VersionLabel", 1)) - } - if s.OptionSettings != nil { - for i, v := range s.OptionSettings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionSettings", i), err.(request.ErrInvalidParams)) - } - } - } - if s.OptionsToRemove != nil { - for i, v := range s.OptionsToRemove { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionsToRemove", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *CreateEnvironmentInput) SetApplicationName(v string) *CreateEnvironmentInput { - s.ApplicationName = &v - return s -} - -// SetCNAMEPrefix sets the CNAMEPrefix field's value. -func (s *CreateEnvironmentInput) SetCNAMEPrefix(v string) *CreateEnvironmentInput { - s.CNAMEPrefix = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateEnvironmentInput) SetDescription(v string) *CreateEnvironmentInput { - s.Description = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *CreateEnvironmentInput) SetEnvironmentName(v string) *CreateEnvironmentInput { - s.EnvironmentName = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *CreateEnvironmentInput) SetGroupName(v string) *CreateEnvironmentInput { - s.GroupName = &v - return s -} - -// SetOptionSettings sets the OptionSettings field's value. -func (s *CreateEnvironmentInput) SetOptionSettings(v []*ConfigurationOptionSetting) *CreateEnvironmentInput { - s.OptionSettings = v - return s -} - -// SetOptionsToRemove sets the OptionsToRemove field's value. -func (s *CreateEnvironmentInput) SetOptionsToRemove(v []*OptionSpecification) *CreateEnvironmentInput { - s.OptionsToRemove = v - return s -} - -// SetPlatformArn sets the PlatformArn field's value. -func (s *CreateEnvironmentInput) SetPlatformArn(v string) *CreateEnvironmentInput { - s.PlatformArn = &v - return s -} - -// SetSolutionStackName sets the SolutionStackName field's value. -func (s *CreateEnvironmentInput) SetSolutionStackName(v string) *CreateEnvironmentInput { - s.SolutionStackName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateEnvironmentInput) SetTags(v []*Tag) *CreateEnvironmentInput { - s.Tags = v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *CreateEnvironmentInput) SetTemplateName(v string) *CreateEnvironmentInput { - s.TemplateName = &v - return s -} - -// SetTier sets the Tier field's value. -func (s *CreateEnvironmentInput) SetTier(v *EnvironmentTier) *CreateEnvironmentInput { - s.Tier = v - return s -} - -// SetVersionLabel sets the VersionLabel field's value. -func (s *CreateEnvironmentInput) SetVersionLabel(v string) *CreateEnvironmentInput { - s.VersionLabel = &v - return s -} - -// Request to create a new platform version. -type CreatePlatformVersionInput struct { - _ struct{} `type:"structure"` - - // The name of the builder environment. - EnvironmentName *string `min:"4" type:"string"` - - // The configuration option settings to apply to the builder environment. - OptionSettings []*ConfigurationOptionSetting `type:"list"` - - // The location of the platform definition archive in Amazon S3. - // - // PlatformDefinitionBundle is a required field - PlatformDefinitionBundle *S3Location `type:"structure" required:"true"` - - // The name of your custom platform. - // - // PlatformName is a required field - PlatformName *string `type:"string" required:"true"` - - // The number, such as 1.0.2, for the new platform version. - // - // PlatformVersion is a required field - PlatformVersion *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreatePlatformVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePlatformVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePlatformVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePlatformVersionInput"} - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - if s.PlatformDefinitionBundle == nil { - invalidParams.Add(request.NewErrParamRequired("PlatformDefinitionBundle")) - } - if s.PlatformName == nil { - invalidParams.Add(request.NewErrParamRequired("PlatformName")) - } - if s.PlatformVersion == nil { - invalidParams.Add(request.NewErrParamRequired("PlatformVersion")) - } - if s.OptionSettings != nil { - for i, v := range s.OptionSettings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionSettings", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *CreatePlatformVersionInput) SetEnvironmentName(v string) *CreatePlatformVersionInput { - s.EnvironmentName = &v - return s -} - -// SetOptionSettings sets the OptionSettings field's value. -func (s *CreatePlatformVersionInput) SetOptionSettings(v []*ConfigurationOptionSetting) *CreatePlatformVersionInput { - s.OptionSettings = v - return s -} - -// SetPlatformDefinitionBundle sets the PlatformDefinitionBundle field's value. -func (s *CreatePlatformVersionInput) SetPlatformDefinitionBundle(v *S3Location) *CreatePlatformVersionInput { - s.PlatformDefinitionBundle = v - return s -} - -// SetPlatformName sets the PlatformName field's value. -func (s *CreatePlatformVersionInput) SetPlatformName(v string) *CreatePlatformVersionInput { - s.PlatformName = &v - return s -} - -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *CreatePlatformVersionInput) SetPlatformVersion(v string) *CreatePlatformVersionInput { - s.PlatformVersion = &v - return s -} - -type CreatePlatformVersionOutput struct { - _ struct{} `type:"structure"` - - // The builder used to create the custom platform. - Builder *Builder `type:"structure"` - - // Detailed information about the new version of the custom platform. - PlatformSummary *PlatformSummary `type:"structure"` -} - -// String returns the string representation -func (s CreatePlatformVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePlatformVersionOutput) GoString() string { - return s.String() -} - -// SetBuilder sets the Builder field's value. -func (s *CreatePlatformVersionOutput) SetBuilder(v *Builder) *CreatePlatformVersionOutput { - s.Builder = v - return s -} - -// SetPlatformSummary sets the PlatformSummary field's value. -func (s *CreatePlatformVersionOutput) SetPlatformSummary(v *PlatformSummary) *CreatePlatformVersionOutput { - s.PlatformSummary = v - return s -} - -type CreateStorageLocationInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateStorageLocationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStorageLocationInput) GoString() string { - return s.String() -} - -// Results of a CreateStorageLocationResult call. -type CreateStorageLocationOutput struct { - _ struct{} `type:"structure"` - - // The name of the Amazon S3 bucket created. - S3Bucket *string `type:"string"` -} - -// String returns the string representation -func (s CreateStorageLocationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStorageLocationOutput) GoString() string { - return s.String() -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *CreateStorageLocationOutput) SetS3Bucket(v string) *CreateStorageLocationOutput { - s.S3Bucket = &v - return s -} - -// A custom AMI available to platforms. -type CustomAmi struct { - _ struct{} `type:"structure"` - - // THe ID of the image used to create the custom AMI. - ImageId *string `type:"string"` - - // The type of virtualization used to create the custom AMI. - VirtualizationType *string `type:"string"` -} - -// String returns the string representation -func (s CustomAmi) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CustomAmi) GoString() string { - return s.String() -} - -// SetImageId sets the ImageId field's value. -func (s *CustomAmi) SetImageId(v string) *CustomAmi { - s.ImageId = &v - return s -} - -// SetVirtualizationType sets the VirtualizationType field's value. -func (s *CustomAmi) SetVirtualizationType(v string) *CustomAmi { - s.VirtualizationType = &v - return s -} - -// Request to delete an application. -type DeleteApplicationInput struct { - _ struct{} `type:"structure"` - - // The name of the application to delete. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // When set to true, running environments will be terminated before deleting - // the application. - TerminateEnvByForce *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeleteApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DeleteApplicationInput) SetApplicationName(v string) *DeleteApplicationInput { - s.ApplicationName = &v - return s -} - -// SetTerminateEnvByForce sets the TerminateEnvByForce field's value. -func (s *DeleteApplicationInput) SetTerminateEnvByForce(v bool) *DeleteApplicationInput { - s.TerminateEnvByForce = &v - return s -} - -type DeleteApplicationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationOutput) GoString() string { - return s.String() -} - -// Request to delete an application version. -type DeleteApplicationVersionInput struct { - _ struct{} `type:"structure"` - - // The name of the application to which the version belongs. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Set to true to delete the source bundle from your storage bucket. Otherwise, - // the application version is deleted only from Elastic Beanstalk and the source - // bundle remains in Amazon S3. - DeleteSourceBundle *bool `type:"boolean"` - - // The label of the version to delete. - // - // VersionLabel is a required field - VersionLabel *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteApplicationVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApplicationVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationVersionInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.VersionLabel == nil { - invalidParams.Add(request.NewErrParamRequired("VersionLabel")) - } - if s.VersionLabel != nil && len(*s.VersionLabel) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VersionLabel", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DeleteApplicationVersionInput) SetApplicationName(v string) *DeleteApplicationVersionInput { - s.ApplicationName = &v - return s -} - -// SetDeleteSourceBundle sets the DeleteSourceBundle field's value. -func (s *DeleteApplicationVersionInput) SetDeleteSourceBundle(v bool) *DeleteApplicationVersionInput { - s.DeleteSourceBundle = &v - return s -} - -// SetVersionLabel sets the VersionLabel field's value. -func (s *DeleteApplicationVersionInput) SetVersionLabel(v string) *DeleteApplicationVersionInput { - s.VersionLabel = &v - return s -} - -type DeleteApplicationVersionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteApplicationVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationVersionOutput) GoString() string { - return s.String() -} - -// Request to delete a configuration template. -type DeleteConfigurationTemplateInput struct { - _ struct{} `type:"structure"` - - // The name of the application to delete the configuration template from. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // The name of the configuration template to delete. - // - // TemplateName is a required field - TemplateName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteConfigurationTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConfigurationTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteConfigurationTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteConfigurationTemplateInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.TemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateName")) - } - if s.TemplateName != nil && len(*s.TemplateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DeleteConfigurationTemplateInput) SetApplicationName(v string) *DeleteConfigurationTemplateInput { - s.ApplicationName = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *DeleteConfigurationTemplateInput) SetTemplateName(v string) *DeleteConfigurationTemplateInput { - s.TemplateName = &v - return s -} - -type DeleteConfigurationTemplateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteConfigurationTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConfigurationTemplateOutput) GoString() string { - return s.String() -} - -// Request to delete a draft environment configuration. -type DeleteEnvironmentConfigurationInput struct { - _ struct{} `type:"structure"` - - // The name of the application the environment is associated with. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // The name of the environment to delete the draft configuration from. - // - // EnvironmentName is a required field - EnvironmentName *string `min:"4" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEnvironmentConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEnvironmentConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEnvironmentConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEnvironmentConfigurationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.EnvironmentName == nil { - invalidParams.Add(request.NewErrParamRequired("EnvironmentName")) - } - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DeleteEnvironmentConfigurationInput) SetApplicationName(v string) *DeleteEnvironmentConfigurationInput { - s.ApplicationName = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *DeleteEnvironmentConfigurationInput) SetEnvironmentName(v string) *DeleteEnvironmentConfigurationInput { - s.EnvironmentName = &v - return s -} - -type DeleteEnvironmentConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteEnvironmentConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEnvironmentConfigurationOutput) GoString() string { - return s.String() -} - -type DeletePlatformVersionInput struct { - _ struct{} `type:"structure"` - - // The ARN of the version of the custom platform. - PlatformArn *string `type:"string"` -} - -// String returns the string representation -func (s DeletePlatformVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePlatformVersionInput) GoString() string { - return s.String() -} - -// SetPlatformArn sets the PlatformArn field's value. -func (s *DeletePlatformVersionInput) SetPlatformArn(v string) *DeletePlatformVersionInput { - s.PlatformArn = &v - return s -} - -type DeletePlatformVersionOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about the version of the custom platform. - PlatformSummary *PlatformSummary `type:"structure"` -} - -// String returns the string representation -func (s DeletePlatformVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePlatformVersionOutput) GoString() string { - return s.String() -} - -// SetPlatformSummary sets the PlatformSummary field's value. -func (s *DeletePlatformVersionOutput) SetPlatformSummary(v *PlatformSummary) *DeletePlatformVersionOutput { - s.PlatformSummary = v - return s -} - -// Information about an application version deployment. -type Deployment struct { - _ struct{} `type:"structure"` - - // The ID of the deployment. This number increases by one each time that you - // deploy source code or change instance configuration settings. - DeploymentId *int64 `type:"long"` - - // For in-progress deployments, the time that the deployment started. - // - // For completed deployments, the time that the deployment ended. - DeploymentTime *time.Time `type:"timestamp"` - - // The status of the deployment: - // - // * In Progress : The deployment is in progress. - // - // * Deployed : The deployment succeeded. - // - // * Failed : The deployment failed. - Status *string `type:"string"` - - // The version label of the application version in the deployment. - VersionLabel *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() -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *Deployment) SetDeploymentId(v int64) *Deployment { - s.DeploymentId = &v - return s -} - -// SetDeploymentTime sets the DeploymentTime field's value. -func (s *Deployment) SetDeploymentTime(v time.Time) *Deployment { - s.DeploymentTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Deployment) SetStatus(v string) *Deployment { - s.Status = &v - return s -} - -// SetVersionLabel sets the VersionLabel field's value. -func (s *Deployment) SetVersionLabel(v string) *Deployment { - s.VersionLabel = &v - return s -} - -type DescribeAccountAttributesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeAccountAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountAttributesInput) GoString() string { - return s.String() -} - -type DescribeAccountAttributesOutput struct { - _ struct{} `type:"structure"` - - // The Elastic Beanstalk resource quotas associated with the calling AWS account. - ResourceQuotas *ResourceQuotas `type:"structure"` -} - -// String returns the string representation -func (s DescribeAccountAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountAttributesOutput) GoString() string { - return s.String() -} - -// SetResourceQuotas sets the ResourceQuotas field's value. -func (s *DescribeAccountAttributesOutput) SetResourceQuotas(v *ResourceQuotas) *DescribeAccountAttributesOutput { - s.ResourceQuotas = v - return s -} - -// Request to describe application versions. -type DescribeApplicationVersionsInput struct { - _ struct{} `type:"structure"` - - // Specify an application name to show only application versions for that application. - ApplicationName *string `min:"1" type:"string"` - - // For a paginated request. Specify a maximum number of application versions - // to include in each response. - // - // If no MaxRecords is specified, all available application versions are retrieved - // in a single response. - MaxRecords *int64 `min:"1" type:"integer"` - - // For a paginated request. Specify a token from a previous response page to - // retrieve the next response page. All other parameter values must be identical - // to the ones specified in the initial request. - // - // If no NextToken is specified, the first page is retrieved. - NextToken *string `type:"string"` - - // Specify a version label to show a specific application version. - VersionLabels []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeApplicationVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeApplicationVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeApplicationVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeApplicationVersionsInput"} - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.MaxRecords != nil && *s.MaxRecords < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DescribeApplicationVersionsInput) SetApplicationName(v string) *DescribeApplicationVersionsInput { - s.ApplicationName = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeApplicationVersionsInput) SetMaxRecords(v int64) *DescribeApplicationVersionsInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeApplicationVersionsInput) SetNextToken(v string) *DescribeApplicationVersionsInput { - s.NextToken = &v - return s -} - -// SetVersionLabels sets the VersionLabels field's value. -func (s *DescribeApplicationVersionsInput) SetVersionLabels(v []*string) *DescribeApplicationVersionsInput { - s.VersionLabels = v - return s -} - -// Result message wrapping a list of application version descriptions. -type DescribeApplicationVersionsOutput struct { - _ struct{} `type:"structure"` - - // List of ApplicationVersionDescription objects sorted in order of creation. - ApplicationVersions []*ApplicationVersionDescription `type:"list"` - - // In a paginated request, the token that you can pass in a subsequent request - // to get the next response page. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeApplicationVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeApplicationVersionsOutput) GoString() string { - return s.String() -} - -// SetApplicationVersions sets the ApplicationVersions field's value. -func (s *DescribeApplicationVersionsOutput) SetApplicationVersions(v []*ApplicationVersionDescription) *DescribeApplicationVersionsOutput { - s.ApplicationVersions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeApplicationVersionsOutput) SetNextToken(v string) *DescribeApplicationVersionsOutput { - s.NextToken = &v - return s -} - -// Request to describe one or more applications. -type DescribeApplicationsInput struct { - _ struct{} `type:"structure"` - - // If specified, AWS Elastic Beanstalk restricts the returned descriptions to - // only include those with the specified names. - ApplicationNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeApplicationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeApplicationsInput) GoString() string { - return s.String() -} - -// SetApplicationNames sets the ApplicationNames field's value. -func (s *DescribeApplicationsInput) SetApplicationNames(v []*string) *DescribeApplicationsInput { - s.ApplicationNames = v - return s -} - -// Result message containing a list of application descriptions. -type DescribeApplicationsOutput struct { - _ struct{} `type:"structure"` - - // This parameter contains a list of ApplicationDescription. - Applications []*ApplicationDescription `type:"list"` -} - -// String returns the string representation -func (s DescribeApplicationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeApplicationsOutput) GoString() string { - return s.String() -} - -// SetApplications sets the Applications field's value. -func (s *DescribeApplicationsOutput) SetApplications(v []*ApplicationDescription) *DescribeApplicationsOutput { - s.Applications = v - return s -} - -// Result message containing a list of application version descriptions. -type DescribeConfigurationOptionsInput struct { - _ struct{} `type:"structure"` - - // The name of the application associated with the configuration template or - // environment. Only needed if you want to describe the configuration options - // associated with either the configuration template or environment. - ApplicationName *string `min:"1" type:"string"` - - // The name of the environment whose configuration options you want to describe. - EnvironmentName *string `min:"4" type:"string"` - - // If specified, restricts the descriptions to only the specified options. - Options []*OptionSpecification `type:"list"` - - // The ARN of the custom platform. - PlatformArn *string `type:"string"` - - // The name of the solution stack whose configuration options you want to describe. - SolutionStackName *string `type:"string"` - - // The name of the configuration template whose configuration options you want - // to describe. - TemplateName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeConfigurationOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeConfigurationOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeConfigurationOptionsInput"} - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - if s.TemplateName != nil && len(*s.TemplateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) - } - if s.Options != nil { - for i, v := range s.Options { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Options", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DescribeConfigurationOptionsInput) SetApplicationName(v string) *DescribeConfigurationOptionsInput { - s.ApplicationName = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *DescribeConfigurationOptionsInput) SetEnvironmentName(v string) *DescribeConfigurationOptionsInput { - s.EnvironmentName = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *DescribeConfigurationOptionsInput) SetOptions(v []*OptionSpecification) *DescribeConfigurationOptionsInput { - s.Options = v - return s -} - -// SetPlatformArn sets the PlatformArn field's value. -func (s *DescribeConfigurationOptionsInput) SetPlatformArn(v string) *DescribeConfigurationOptionsInput { - s.PlatformArn = &v - return s -} - -// SetSolutionStackName sets the SolutionStackName field's value. -func (s *DescribeConfigurationOptionsInput) SetSolutionStackName(v string) *DescribeConfigurationOptionsInput { - s.SolutionStackName = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *DescribeConfigurationOptionsInput) SetTemplateName(v string) *DescribeConfigurationOptionsInput { - s.TemplateName = &v - return s -} - -// Describes the settings for a specified configuration set. -type DescribeConfigurationOptionsOutput struct { - _ struct{} `type:"structure"` - - // A list of ConfigurationOptionDescription. - Options []*ConfigurationOptionDescription `type:"list"` - - // The ARN of the platform. - PlatformArn *string `type:"string"` - - // The name of the solution stack these configuration options belong to. - SolutionStackName *string `type:"string"` -} - -// String returns the string representation -func (s DescribeConfigurationOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationOptionsOutput) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *DescribeConfigurationOptionsOutput) SetOptions(v []*ConfigurationOptionDescription) *DescribeConfigurationOptionsOutput { - s.Options = v - return s -} - -// SetPlatformArn sets the PlatformArn field's value. -func (s *DescribeConfigurationOptionsOutput) SetPlatformArn(v string) *DescribeConfigurationOptionsOutput { - s.PlatformArn = &v - return s -} - -// SetSolutionStackName sets the SolutionStackName field's value. -func (s *DescribeConfigurationOptionsOutput) SetSolutionStackName(v string) *DescribeConfigurationOptionsOutput { - s.SolutionStackName = &v - return s -} - -// Result message containing all of the configuration settings for a specified -// solution stack or configuration template. -type DescribeConfigurationSettingsInput struct { - _ struct{} `type:"structure"` - - // The application for the environment or configuration template. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // The name of the environment to describe. - // - // Condition: You must specify either this or a TemplateName, but not both. - // If you specify both, AWS Elastic Beanstalk returns an InvalidParameterCombination - // error. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentName *string `min:"4" type:"string"` - - // The name of the configuration template to describe. - // - // Conditional: You must specify either this parameter or an EnvironmentName, - // but not both. If you specify both, AWS Elastic Beanstalk returns an InvalidParameterCombination - // error. If you do not specify either, AWS Elastic Beanstalk returns a MissingRequiredParameter - // error. - TemplateName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeConfigurationSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationSettingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeConfigurationSettingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeConfigurationSettingsInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - if s.TemplateName != nil && len(*s.TemplateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DescribeConfigurationSettingsInput) SetApplicationName(v string) *DescribeConfigurationSettingsInput { - s.ApplicationName = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *DescribeConfigurationSettingsInput) SetEnvironmentName(v string) *DescribeConfigurationSettingsInput { - s.EnvironmentName = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *DescribeConfigurationSettingsInput) SetTemplateName(v string) *DescribeConfigurationSettingsInput { - s.TemplateName = &v - return s -} - -// The results from a request to change the configuration settings of an environment. -type DescribeConfigurationSettingsOutput struct { - _ struct{} `type:"structure"` - - // A list of ConfigurationSettingsDescription. - ConfigurationSettings []*ConfigurationSettingsDescription `type:"list"` -} - -// String returns the string representation -func (s DescribeConfigurationSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationSettingsOutput) GoString() string { - return s.String() -} - -// SetConfigurationSettings sets the ConfigurationSettings field's value. -func (s *DescribeConfigurationSettingsOutput) SetConfigurationSettings(v []*ConfigurationSettingsDescription) *DescribeConfigurationSettingsOutput { - s.ConfigurationSettings = v - return s -} - -// See the example below to learn how to create a request body. -type DescribeEnvironmentHealthInput struct { - _ struct{} `type:"structure"` - - // Specify the response elements to return. To retrieve all attributes, set - // to All. If no attribute names are specified, returns the name of the environment. - AttributeNames []*string `type:"list"` - - // Specify the environment by ID. - // - // You must specify either this or an EnvironmentName, or both. - EnvironmentId *string `type:"string"` - - // Specify the environment by name. - // - // You must specify either this or an EnvironmentName, or both. - EnvironmentName *string `min:"4" type:"string"` -} - -// String returns the string representation -func (s DescribeEnvironmentHealthInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentHealthInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEnvironmentHealthInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEnvironmentHealthInput"} - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeNames sets the AttributeNames field's value. -func (s *DescribeEnvironmentHealthInput) SetAttributeNames(v []*string) *DescribeEnvironmentHealthInput { - s.AttributeNames = v - return s -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *DescribeEnvironmentHealthInput) SetEnvironmentId(v string) *DescribeEnvironmentHealthInput { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *DescribeEnvironmentHealthInput) SetEnvironmentName(v string) *DescribeEnvironmentHealthInput { - s.EnvironmentName = &v - return s -} - -// Health details for an AWS Elastic Beanstalk environment. -type DescribeEnvironmentHealthOutput struct { - _ struct{} `type:"structure"` - - // Application request metrics for the environment. - ApplicationMetrics *ApplicationMetrics `type:"structure"` - - // Descriptions of the data that contributed to the environment's current health - // status. - Causes []*string `type:"list"` - - // The health color (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-status.html) - // of the environment. - Color *string `type:"string"` - - // The environment's name. - EnvironmentName *string `min:"4" type:"string"` - - // The health status (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-status.html) - // of the environment. For example, Ok. - HealthStatus *string `type:"string"` - - // Summary health information for the instances in the environment. - InstancesHealth *InstanceHealthSummary `type:"structure"` - - // The date and time that the health information was retrieved. - RefreshedAt *time.Time `type:"timestamp"` - - // The environment's operational status. Ready, Launching, Updating, Terminating, - // or Terminated. - Status *string `type:"string" enum:"EnvironmentHealth"` -} - -// String returns the string representation -func (s DescribeEnvironmentHealthOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentHealthOutput) GoString() string { - return s.String() -} - -// SetApplicationMetrics sets the ApplicationMetrics field's value. -func (s *DescribeEnvironmentHealthOutput) SetApplicationMetrics(v *ApplicationMetrics) *DescribeEnvironmentHealthOutput { - s.ApplicationMetrics = v - return s -} - -// SetCauses sets the Causes field's value. -func (s *DescribeEnvironmentHealthOutput) SetCauses(v []*string) *DescribeEnvironmentHealthOutput { - s.Causes = v - return s -} - -// SetColor sets the Color field's value. -func (s *DescribeEnvironmentHealthOutput) SetColor(v string) *DescribeEnvironmentHealthOutput { - s.Color = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *DescribeEnvironmentHealthOutput) SetEnvironmentName(v string) *DescribeEnvironmentHealthOutput { - s.EnvironmentName = &v - return s -} - -// SetHealthStatus sets the HealthStatus field's value. -func (s *DescribeEnvironmentHealthOutput) SetHealthStatus(v string) *DescribeEnvironmentHealthOutput { - s.HealthStatus = &v - return s -} - -// SetInstancesHealth sets the InstancesHealth field's value. -func (s *DescribeEnvironmentHealthOutput) SetInstancesHealth(v *InstanceHealthSummary) *DescribeEnvironmentHealthOutput { - s.InstancesHealth = v - return s -} - -// SetRefreshedAt sets the RefreshedAt field's value. -func (s *DescribeEnvironmentHealthOutput) SetRefreshedAt(v time.Time) *DescribeEnvironmentHealthOutput { - s.RefreshedAt = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeEnvironmentHealthOutput) SetStatus(v string) *DescribeEnvironmentHealthOutput { - s.Status = &v - return s -} - -// Request to list completed and failed managed actions. -type DescribeEnvironmentManagedActionHistoryInput struct { - _ struct{} `type:"structure"` - - // The environment ID of the target environment. - EnvironmentId *string `type:"string"` - - // The name of the target environment. - EnvironmentName *string `min:"4" type:"string"` - - // The maximum number of items to return for a single request. - MaxItems *int64 `type:"integer"` - - // The pagination token returned by a previous request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEnvironmentManagedActionHistoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentManagedActionHistoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEnvironmentManagedActionHistoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEnvironmentManagedActionHistoryInput"} - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *DescribeEnvironmentManagedActionHistoryInput) SetEnvironmentId(v string) *DescribeEnvironmentManagedActionHistoryInput { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *DescribeEnvironmentManagedActionHistoryInput) SetEnvironmentName(v string) *DescribeEnvironmentManagedActionHistoryInput { - s.EnvironmentName = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *DescribeEnvironmentManagedActionHistoryInput) SetMaxItems(v int64) *DescribeEnvironmentManagedActionHistoryInput { - s.MaxItems = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEnvironmentManagedActionHistoryInput) SetNextToken(v string) *DescribeEnvironmentManagedActionHistoryInput { - s.NextToken = &v - return s -} - -// A result message containing a list of completed and failed managed actions. -type DescribeEnvironmentManagedActionHistoryOutput struct { - _ struct{} `type:"structure"` - - // A list of completed and failed managed actions. - ManagedActionHistoryItems []*ManagedActionHistoryItem `min:"1" type:"list"` - - // A pagination token that you pass to DescribeEnvironmentManagedActionHistory - // to get the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEnvironmentManagedActionHistoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentManagedActionHistoryOutput) GoString() string { - return s.String() -} - -// SetManagedActionHistoryItems sets the ManagedActionHistoryItems field's value. -func (s *DescribeEnvironmentManagedActionHistoryOutput) SetManagedActionHistoryItems(v []*ManagedActionHistoryItem) *DescribeEnvironmentManagedActionHistoryOutput { - s.ManagedActionHistoryItems = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEnvironmentManagedActionHistoryOutput) SetNextToken(v string) *DescribeEnvironmentManagedActionHistoryOutput { - s.NextToken = &v - return s -} - -// Request to list an environment's upcoming and in-progress managed actions. -type DescribeEnvironmentManagedActionsInput struct { - _ struct{} `type:"structure"` - - // The environment ID of the target environment. - EnvironmentId *string `type:"string"` - - // The name of the target environment. - EnvironmentName *string `type:"string"` - - // To show only actions with a particular status, specify a status. - Status *string `type:"string" enum:"ActionStatus"` -} - -// String returns the string representation -func (s DescribeEnvironmentManagedActionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentManagedActionsInput) GoString() string { - return s.String() -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *DescribeEnvironmentManagedActionsInput) SetEnvironmentId(v string) *DescribeEnvironmentManagedActionsInput { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *DescribeEnvironmentManagedActionsInput) SetEnvironmentName(v string) *DescribeEnvironmentManagedActionsInput { - s.EnvironmentName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeEnvironmentManagedActionsInput) SetStatus(v string) *DescribeEnvironmentManagedActionsInput { - s.Status = &v - return s -} - -// The result message containing a list of managed actions. -type DescribeEnvironmentManagedActionsOutput struct { - _ struct{} `type:"structure"` - - // A list of upcoming and in-progress managed actions. - ManagedActions []*ManagedAction `min:"1" type:"list"` -} - -// String returns the string representation -func (s DescribeEnvironmentManagedActionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentManagedActionsOutput) GoString() string { - return s.String() -} - -// SetManagedActions sets the ManagedActions field's value. -func (s *DescribeEnvironmentManagedActionsOutput) SetManagedActions(v []*ManagedAction) *DescribeEnvironmentManagedActionsOutput { - s.ManagedActions = v - return s -} - -// Request to describe the resources in an environment. -type DescribeEnvironmentResourcesInput struct { - _ struct{} `type:"structure"` - - // The ID of the environment to retrieve AWS resource usage data. - // - // Condition: You must specify either this or an EnvironmentName, or both. If - // you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentId *string `type:"string"` - - // The name of the environment to retrieve AWS resource usage data. - // - // Condition: You must specify either this or an EnvironmentId, or both. If - // you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentName *string `min:"4" type:"string"` -} - -// String returns the string representation -func (s DescribeEnvironmentResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEnvironmentResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEnvironmentResourcesInput"} - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *DescribeEnvironmentResourcesInput) SetEnvironmentId(v string) *DescribeEnvironmentResourcesInput { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *DescribeEnvironmentResourcesInput) SetEnvironmentName(v string) *DescribeEnvironmentResourcesInput { - s.EnvironmentName = &v - return s -} - -// Result message containing a list of environment resource descriptions. -type DescribeEnvironmentResourcesOutput struct { - _ struct{} `type:"structure"` - - // A list of EnvironmentResourceDescription. - EnvironmentResources *EnvironmentResourceDescription `type:"structure"` -} - -// String returns the string representation -func (s DescribeEnvironmentResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentResourcesOutput) GoString() string { - return s.String() -} - -// SetEnvironmentResources sets the EnvironmentResources field's value. -func (s *DescribeEnvironmentResourcesOutput) SetEnvironmentResources(v *EnvironmentResourceDescription) *DescribeEnvironmentResourcesOutput { - s.EnvironmentResources = v - return s -} - -// Request to describe one or more environments. -type DescribeEnvironmentsInput struct { - _ struct{} `type:"structure"` - - // If specified, AWS Elastic Beanstalk restricts the returned descriptions to - // include only those that are associated with this application. - ApplicationName *string `min:"1" type:"string"` - - // If specified, AWS Elastic Beanstalk restricts the returned descriptions to - // include only those that have the specified IDs. - EnvironmentIds []*string `type:"list"` - - // If specified, AWS Elastic Beanstalk restricts the returned descriptions to - // include only those that have the specified names. - EnvironmentNames []*string `type:"list"` - - // Indicates whether to include deleted environments: - // - // true: Environments that have been deleted after IncludedDeletedBackTo are - // displayed. - // - // false: Do not include deleted environments. - IncludeDeleted *bool `type:"boolean"` - - // If specified when IncludeDeleted is set to true, then environments deleted - // after this date are displayed. - IncludedDeletedBackTo *time.Time `type:"timestamp"` - - // For a paginated request. Specify a maximum number of environments to include - // in each response. - // - // If no MaxRecords is specified, all available environments are retrieved in - // a single response. - MaxRecords *int64 `min:"1" type:"integer"` - - // For a paginated request. Specify a token from a previous response page to - // retrieve the next response page. All other parameter values must be identical - // to the ones specified in the initial request. - // - // If no NextToken is specified, the first page is retrieved. - NextToken *string `type:"string"` - - // If specified, AWS Elastic Beanstalk restricts the returned descriptions to - // include only those that are associated with this application version. - VersionLabel *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeEnvironmentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEnvironmentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEnvironmentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEnvironmentsInput"} - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.MaxRecords != nil && *s.MaxRecords < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1)) - } - if s.VersionLabel != nil && len(*s.VersionLabel) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VersionLabel", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DescribeEnvironmentsInput) SetApplicationName(v string) *DescribeEnvironmentsInput { - s.ApplicationName = &v - return s -} - -// SetEnvironmentIds sets the EnvironmentIds field's value. -func (s *DescribeEnvironmentsInput) SetEnvironmentIds(v []*string) *DescribeEnvironmentsInput { - s.EnvironmentIds = v - return s -} - -// SetEnvironmentNames sets the EnvironmentNames field's value. -func (s *DescribeEnvironmentsInput) SetEnvironmentNames(v []*string) *DescribeEnvironmentsInput { - s.EnvironmentNames = v - return s -} - -// SetIncludeDeleted sets the IncludeDeleted field's value. -func (s *DescribeEnvironmentsInput) SetIncludeDeleted(v bool) *DescribeEnvironmentsInput { - s.IncludeDeleted = &v - return s -} - -// SetIncludedDeletedBackTo sets the IncludedDeletedBackTo field's value. -func (s *DescribeEnvironmentsInput) SetIncludedDeletedBackTo(v time.Time) *DescribeEnvironmentsInput { - s.IncludedDeletedBackTo = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEnvironmentsInput) SetMaxRecords(v int64) *DescribeEnvironmentsInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEnvironmentsInput) SetNextToken(v string) *DescribeEnvironmentsInput { - s.NextToken = &v - return s -} - -// SetVersionLabel sets the VersionLabel field's value. -func (s *DescribeEnvironmentsInput) SetVersionLabel(v string) *DescribeEnvironmentsInput { - s.VersionLabel = &v - return s -} - -// Request to retrieve a list of events for an environment. -type DescribeEventsInput struct { - _ struct{} `type:"structure"` - - // If specified, AWS Elastic Beanstalk restricts the returned descriptions to - // include only those associated with this application. - ApplicationName *string `min:"1" type:"string"` - - // If specified, AWS Elastic Beanstalk restricts the returned descriptions to - // those that occur up to, but not including, the EndTime. - EndTime *time.Time `type:"timestamp"` - - // If specified, AWS Elastic Beanstalk restricts the returned descriptions to - // those associated with this environment. - EnvironmentId *string `type:"string"` - - // If specified, AWS Elastic Beanstalk restricts the returned descriptions to - // those associated with this environment. - EnvironmentName *string `min:"4" type:"string"` - - // Specifies the maximum number of events that can be returned, beginning with - // the most recent event. - MaxRecords *int64 `min:"1" type:"integer"` - - // Pagination token. If specified, the events return the next batch of results. - NextToken *string `type:"string"` - - // The ARN of the version of the custom platform. - PlatformArn *string `type:"string"` - - // If specified, AWS Elastic Beanstalk restricts the described events to include - // only those associated with this request ID. - RequestId *string `type:"string"` - - // If specified, limits the events returned from this call to include only those - // with the specified severity or higher. - Severity *string `type:"string" enum:"EventSeverity"` - - // If specified, AWS Elastic Beanstalk restricts the returned descriptions to - // those that occur on or after this time. - StartTime *time.Time `type:"timestamp"` - - // If specified, AWS Elastic Beanstalk restricts the returned descriptions to - // those that are associated with this environment configuration. - TemplateName *string `min:"1" type:"string"` - - // If specified, AWS Elastic Beanstalk restricts the returned descriptions to - // those associated with this application version. - VersionLabel *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventsInput"} - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - if s.MaxRecords != nil && *s.MaxRecords < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1)) - } - if s.TemplateName != nil && len(*s.TemplateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) - } - if s.VersionLabel != nil && len(*s.VersionLabel) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VersionLabel", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DescribeEventsInput) SetApplicationName(v string) *DescribeEventsInput { - s.ApplicationName = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *DescribeEventsInput) SetEndTime(v time.Time) *DescribeEventsInput { - s.EndTime = &v - return s -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *DescribeEventsInput) SetEnvironmentId(v string) *DescribeEventsInput { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *DescribeEventsInput) SetEnvironmentName(v string) *DescribeEventsInput { - s.EnvironmentName = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEventsInput) SetMaxRecords(v int64) *DescribeEventsInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEventsInput) SetNextToken(v string) *DescribeEventsInput { - s.NextToken = &v - return s -} - -// SetPlatformArn sets the PlatformArn field's value. -func (s *DescribeEventsInput) SetPlatformArn(v string) *DescribeEventsInput { - s.PlatformArn = &v - return s -} - -// SetRequestId sets the RequestId field's value. -func (s *DescribeEventsInput) SetRequestId(v string) *DescribeEventsInput { - s.RequestId = &v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *DescribeEventsInput) SetSeverity(v string) *DescribeEventsInput { - s.Severity = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeEventsInput) SetStartTime(v time.Time) *DescribeEventsInput { - s.StartTime = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *DescribeEventsInput) SetTemplateName(v string) *DescribeEventsInput { - s.TemplateName = &v - return s -} - -// SetVersionLabel sets the VersionLabel field's value. -func (s *DescribeEventsInput) SetVersionLabel(v string) *DescribeEventsInput { - s.VersionLabel = &v - return s -} - -// Result message wrapping a list of event descriptions. -type DescribeEventsOutput struct { - _ struct{} `type:"structure"` - - // A list of EventDescription. - Events []*EventDescription `type:"list"` - - // If returned, this indicates that there are more results to obtain. Use this - // token in the next DescribeEvents call to get the next batch of events. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *DescribeEventsOutput) SetEvents(v []*EventDescription) *DescribeEventsOutput { - s.Events = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEventsOutput) SetNextToken(v string) *DescribeEventsOutput { - s.NextToken = &v - return s -} - -// Parameters for a call to DescribeInstancesHealth. -type DescribeInstancesHealthInput struct { - _ struct{} `type:"structure"` - - // Specifies the response elements you wish to receive. To retrieve all attributes, - // set to All. If no attribute names are specified, returns a list of instances. - AttributeNames []*string `type:"list"` - - // Specify the AWS Elastic Beanstalk environment by ID. - EnvironmentId *string `type:"string"` - - // Specify the AWS Elastic Beanstalk environment by name. - EnvironmentName *string `min:"4" type:"string"` - - // Specify the pagination token returned by a previous call. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeInstancesHealthInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstancesHealthInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInstancesHealthInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInstancesHealthInput"} - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeNames sets the AttributeNames field's value. -func (s *DescribeInstancesHealthInput) SetAttributeNames(v []*string) *DescribeInstancesHealthInput { - s.AttributeNames = v - return s -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *DescribeInstancesHealthInput) SetEnvironmentId(v string) *DescribeInstancesHealthInput { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *DescribeInstancesHealthInput) SetEnvironmentName(v string) *DescribeInstancesHealthInput { - s.EnvironmentName = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstancesHealthInput) SetNextToken(v string) *DescribeInstancesHealthInput { - s.NextToken = &v - return s -} - -// Detailed health information about the Amazon EC2 instances in an AWS Elastic -// Beanstalk environment. -type DescribeInstancesHealthOutput struct { - _ struct{} `type:"structure"` - - // Detailed health information about each instance. - // - // The output differs slightly between Linux and Windows environments. There - // is a difference in the members that are supported under the - // type. - InstanceHealthList []*SingleInstanceHealth `type:"list"` - - // Pagination token for the next page of results, if available. - NextToken *string `min:"1" type:"string"` - - // The date and time that the health information was retrieved. - RefreshedAt *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s DescribeInstancesHealthOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstancesHealthOutput) GoString() string { - return s.String() -} - -// SetInstanceHealthList sets the InstanceHealthList field's value. -func (s *DescribeInstancesHealthOutput) SetInstanceHealthList(v []*SingleInstanceHealth) *DescribeInstancesHealthOutput { - s.InstanceHealthList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstancesHealthOutput) SetNextToken(v string) *DescribeInstancesHealthOutput { - s.NextToken = &v - return s -} - -// SetRefreshedAt sets the RefreshedAt field's value. -func (s *DescribeInstancesHealthOutput) SetRefreshedAt(v time.Time) *DescribeInstancesHealthOutput { - s.RefreshedAt = &v - return s -} - -type DescribePlatformVersionInput struct { - _ struct{} `type:"structure"` - - // The ARN of the version of the platform. - PlatformArn *string `type:"string"` -} - -// String returns the string representation -func (s DescribePlatformVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePlatformVersionInput) GoString() string { - return s.String() -} - -// SetPlatformArn sets the PlatformArn field's value. -func (s *DescribePlatformVersionInput) SetPlatformArn(v string) *DescribePlatformVersionInput { - s.PlatformArn = &v - return s -} - -type DescribePlatformVersionOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about the version of the platform. - PlatformDescription *PlatformDescription `type:"structure"` -} - -// String returns the string representation -func (s DescribePlatformVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePlatformVersionOutput) GoString() string { - return s.String() -} - -// SetPlatformDescription sets the PlatformDescription field's value. -func (s *DescribePlatformVersionOutput) SetPlatformDescription(v *PlatformDescription) *DescribePlatformVersionOutput { - s.PlatformDescription = v - return s -} - -// Describes the properties of an environment. -type EnvironmentDescription struct { - _ struct{} `type:"structure"` - - // Indicates if there is an in-progress environment configuration update or - // application version deployment that you can cancel. - // - // true: There is an update in progress. - // - // false: There are no updates currently in progress. - AbortableOperationInProgress *bool `type:"boolean"` - - // The name of the application associated with this environment. - ApplicationName *string `min:"1" type:"string"` - - // The URL to the CNAME for this environment. - CNAME *string `min:"1" type:"string"` - - // The creation date for this environment. - DateCreated *time.Time `type:"timestamp"` - - // The last modified date for this environment. - DateUpdated *time.Time `type:"timestamp"` - - // Describes this environment. - Description *string `type:"string"` - - // For load-balanced, autoscaling environments, the URL to the LoadBalancer. - // For single-instance environments, the IP address of the instance. - EndpointURL *string `type:"string"` - - // The environment's Amazon Resource Name (ARN), which can be used in other - // API requests that require an ARN. - EnvironmentArn *string `type:"string"` - - // The ID of this environment. - EnvironmentId *string `type:"string"` - - // A list of links to other environments in the same group. - EnvironmentLinks []*EnvironmentLink `type:"list"` - - // The name of this environment. - EnvironmentName *string `min:"4" type:"string"` - - // Describes the health status of the environment. AWS Elastic Beanstalk indicates - // the failure levels for a running environment: - // - // * Red: Indicates the environment is not responsive. Occurs when three - // or more consecutive failures occur for an environment. - // - // * Yellow: Indicates that something is wrong. Occurs when two consecutive - // failures occur for an environment. - // - // * Green: Indicates the environment is healthy and fully functional. - // - // * Grey: Default health for a new environment. The environment is not fully - // launched and health checks have not started or health checks are suspended - // during an UpdateEnvironment or RestartEnvironment request. - // - // Default: Grey - Health *string `type:"string" enum:"EnvironmentHealth"` - - // Returns the health status of the application running in your environment. - // For more information, see Health Colors and Statuses (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-status.html). - HealthStatus *string `type:"string" enum:"EnvironmentHealthStatus"` - - // The ARN of the platform. - PlatformArn *string `type:"string"` - - // The description of the AWS resources used by this environment. - Resources *EnvironmentResourcesDescription `type:"structure"` - - // The name of the SolutionStack deployed with this environment. - SolutionStackName *string `type:"string"` - - // The current operational status of the environment: - // - // * Launching: Environment is in the process of initial deployment. - // - // * Updating: Environment is in the process of updating its configuration - // settings or application version. - // - // * Ready: Environment is available to have an action performed on it, such - // as update or terminate. - // - // * Terminating: Environment is in the shut-down process. - // - // * Terminated: Environment is not running. - Status *string `type:"string" enum:"EnvironmentStatus"` - - // The name of the configuration template used to originally launch this environment. - TemplateName *string `min:"1" type:"string"` - - // Describes the current tier of this environment. - Tier *EnvironmentTier `type:"structure"` - - // The application version deployed in this environment. - VersionLabel *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s EnvironmentDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentDescription) GoString() string { - return s.String() -} - -// SetAbortableOperationInProgress sets the AbortableOperationInProgress field's value. -func (s *EnvironmentDescription) SetAbortableOperationInProgress(v bool) *EnvironmentDescription { - s.AbortableOperationInProgress = &v - return s -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *EnvironmentDescription) SetApplicationName(v string) *EnvironmentDescription { - s.ApplicationName = &v - return s -} - -// SetCNAME sets the CNAME field's value. -func (s *EnvironmentDescription) SetCNAME(v string) *EnvironmentDescription { - s.CNAME = &v - return s -} - -// SetDateCreated sets the DateCreated field's value. -func (s *EnvironmentDescription) SetDateCreated(v time.Time) *EnvironmentDescription { - s.DateCreated = &v - return s -} - -// SetDateUpdated sets the DateUpdated field's value. -func (s *EnvironmentDescription) SetDateUpdated(v time.Time) *EnvironmentDescription { - s.DateUpdated = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *EnvironmentDescription) SetDescription(v string) *EnvironmentDescription { - s.Description = &v - return s -} - -// SetEndpointURL sets the EndpointURL field's value. -func (s *EnvironmentDescription) SetEndpointURL(v string) *EnvironmentDescription { - s.EndpointURL = &v - return s -} - -// SetEnvironmentArn sets the EnvironmentArn field's value. -func (s *EnvironmentDescription) SetEnvironmentArn(v string) *EnvironmentDescription { - s.EnvironmentArn = &v - return s -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *EnvironmentDescription) SetEnvironmentId(v string) *EnvironmentDescription { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentLinks sets the EnvironmentLinks field's value. -func (s *EnvironmentDescription) SetEnvironmentLinks(v []*EnvironmentLink) *EnvironmentDescription { - s.EnvironmentLinks = v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *EnvironmentDescription) SetEnvironmentName(v string) *EnvironmentDescription { - s.EnvironmentName = &v - return s -} - -// SetHealth sets the Health field's value. -func (s *EnvironmentDescription) SetHealth(v string) *EnvironmentDescription { - s.Health = &v - return s -} - -// SetHealthStatus sets the HealthStatus field's value. -func (s *EnvironmentDescription) SetHealthStatus(v string) *EnvironmentDescription { - s.HealthStatus = &v - return s -} - -// SetPlatformArn sets the PlatformArn field's value. -func (s *EnvironmentDescription) SetPlatformArn(v string) *EnvironmentDescription { - s.PlatformArn = &v - return s -} - -// SetResources sets the Resources field's value. -func (s *EnvironmentDescription) SetResources(v *EnvironmentResourcesDescription) *EnvironmentDescription { - s.Resources = v - return s -} - -// SetSolutionStackName sets the SolutionStackName field's value. -func (s *EnvironmentDescription) SetSolutionStackName(v string) *EnvironmentDescription { - s.SolutionStackName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *EnvironmentDescription) SetStatus(v string) *EnvironmentDescription { - s.Status = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *EnvironmentDescription) SetTemplateName(v string) *EnvironmentDescription { - s.TemplateName = &v - return s -} - -// SetTier sets the Tier field's value. -func (s *EnvironmentDescription) SetTier(v *EnvironmentTier) *EnvironmentDescription { - s.Tier = v - return s -} - -// SetVersionLabel sets the VersionLabel field's value. -func (s *EnvironmentDescription) SetVersionLabel(v string) *EnvironmentDescription { - s.VersionLabel = &v - return s -} - -// Result message containing a list of environment descriptions. -type EnvironmentDescriptionsMessage struct { - _ struct{} `type:"structure"` - - // Returns an EnvironmentDescription list. - Environments []*EnvironmentDescription `type:"list"` - - // In a paginated request, the token that you can pass in a subsequent request - // to get the next response page. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s EnvironmentDescriptionsMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentDescriptionsMessage) GoString() string { - return s.String() -} - -// SetEnvironments sets the Environments field's value. -func (s *EnvironmentDescriptionsMessage) SetEnvironments(v []*EnvironmentDescription) *EnvironmentDescriptionsMessage { - s.Environments = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *EnvironmentDescriptionsMessage) SetNextToken(v string) *EnvironmentDescriptionsMessage { - s.NextToken = &v - return s -} - -// The information retrieved from the Amazon EC2 instances. -type EnvironmentInfoDescription struct { - _ struct{} `type:"structure"` - - // The Amazon EC2 Instance ID for this information. - Ec2InstanceId *string `type:"string"` - - // The type of information retrieved. - InfoType *string `type:"string" enum:"EnvironmentInfoType"` - - // The retrieved information. Currently contains a presigned Amazon S3 URL. - // The files are deleted after 15 minutes. - // - // Anyone in possession of this URL can access the files before they are deleted. - // Make the URL available only to trusted parties. - Message *string `type:"string"` - - // The time stamp when this information was retrieved. - SampleTimestamp *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s EnvironmentInfoDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentInfoDescription) GoString() string { - return s.String() -} - -// SetEc2InstanceId sets the Ec2InstanceId field's value. -func (s *EnvironmentInfoDescription) SetEc2InstanceId(v string) *EnvironmentInfoDescription { - s.Ec2InstanceId = &v - return s -} - -// SetInfoType sets the InfoType field's value. -func (s *EnvironmentInfoDescription) SetInfoType(v string) *EnvironmentInfoDescription { - s.InfoType = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *EnvironmentInfoDescription) SetMessage(v string) *EnvironmentInfoDescription { - s.Message = &v - return s -} - -// SetSampleTimestamp sets the SampleTimestamp field's value. -func (s *EnvironmentInfoDescription) SetSampleTimestamp(v time.Time) *EnvironmentInfoDescription { - s.SampleTimestamp = &v - return s -} - -// A link to another environment, defined in the environment's manifest. Links -// provide connection information in system properties that can be used to connect -// to another environment in the same group. See Environment Manifest (env.yaml) -// (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html) -// for details. -type EnvironmentLink struct { - _ struct{} `type:"structure"` - - // The name of the linked environment (the dependency). - EnvironmentName *string `type:"string"` - - // The name of the link. - LinkName *string `type:"string"` -} - -// String returns the string representation -func (s EnvironmentLink) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentLink) GoString() string { - return s.String() -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *EnvironmentLink) SetEnvironmentName(v string) *EnvironmentLink { - s.EnvironmentName = &v - return s -} - -// SetLinkName sets the LinkName field's value. -func (s *EnvironmentLink) SetLinkName(v string) *EnvironmentLink { - s.LinkName = &v - return s -} - -// Describes the AWS resources in use by this environment. This data is live. -type EnvironmentResourceDescription struct { - _ struct{} `type:"structure"` - - // The AutoScalingGroups used by this environment. - AutoScalingGroups []*AutoScalingGroup `type:"list"` - - // The name of the environment. - EnvironmentName *string `min:"4" type:"string"` - - // The Amazon EC2 instances used by this environment. - Instances []*Instance `type:"list"` - - // The Auto Scaling launch configurations in use by this environment. - LaunchConfigurations []*LaunchConfiguration `type:"list"` - - // The Amazon EC2 launch templates in use by this environment. - LaunchTemplates []*LaunchTemplate `type:"list"` - - // The LoadBalancers in use by this environment. - LoadBalancers []*LoadBalancer `type:"list"` - - // The queues used by this environment. - Queues []*Queue `type:"list"` - - // The AutoScaling triggers in use by this environment. - Triggers []*Trigger `type:"list"` -} - -// String returns the string representation -func (s EnvironmentResourceDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentResourceDescription) GoString() string { - return s.String() -} - -// SetAutoScalingGroups sets the AutoScalingGroups field's value. -func (s *EnvironmentResourceDescription) SetAutoScalingGroups(v []*AutoScalingGroup) *EnvironmentResourceDescription { - s.AutoScalingGroups = v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *EnvironmentResourceDescription) SetEnvironmentName(v string) *EnvironmentResourceDescription { - s.EnvironmentName = &v - return s -} - -// SetInstances sets the Instances field's value. -func (s *EnvironmentResourceDescription) SetInstances(v []*Instance) *EnvironmentResourceDescription { - s.Instances = v - return s -} - -// SetLaunchConfigurations sets the LaunchConfigurations field's value. -func (s *EnvironmentResourceDescription) SetLaunchConfigurations(v []*LaunchConfiguration) *EnvironmentResourceDescription { - s.LaunchConfigurations = v - return s -} - -// SetLaunchTemplates sets the LaunchTemplates field's value. -func (s *EnvironmentResourceDescription) SetLaunchTemplates(v []*LaunchTemplate) *EnvironmentResourceDescription { - s.LaunchTemplates = v - return s -} - -// SetLoadBalancers sets the LoadBalancers field's value. -func (s *EnvironmentResourceDescription) SetLoadBalancers(v []*LoadBalancer) *EnvironmentResourceDescription { - s.LoadBalancers = v - return s -} - -// SetQueues sets the Queues field's value. -func (s *EnvironmentResourceDescription) SetQueues(v []*Queue) *EnvironmentResourceDescription { - s.Queues = v - return s -} - -// SetTriggers sets the Triggers field's value. -func (s *EnvironmentResourceDescription) SetTriggers(v []*Trigger) *EnvironmentResourceDescription { - s.Triggers = v - return s -} - -// Describes the AWS resources in use by this environment. This data is not -// live data. -type EnvironmentResourcesDescription struct { - _ struct{} `type:"structure"` - - // Describes the LoadBalancer. - LoadBalancer *LoadBalancerDescription `type:"structure"` -} - -// String returns the string representation -func (s EnvironmentResourcesDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentResourcesDescription) GoString() string { - return s.String() -} - -// SetLoadBalancer sets the LoadBalancer field's value. -func (s *EnvironmentResourcesDescription) SetLoadBalancer(v *LoadBalancerDescription) *EnvironmentResourcesDescription { - s.LoadBalancer = v - return s -} - -// Describes the properties of an environment tier -type EnvironmentTier struct { - _ struct{} `type:"structure"` - - // The name of this environment tier. - // - // Valid values: - // - // * For Web server tier – WebServer - // - // * For Worker tier – Worker - Name *string `type:"string"` - - // The type of this environment tier. - // - // Valid values: - // - // * For Web server tier – Standard - // - // * For Worker tier – SQS/HTTP - Type *string `type:"string"` - - // The version of this environment tier. When you don't set a value to it, Elastic - // Beanstalk uses the latest compatible worker tier version. - // - // This member is deprecated. Any specific version that you set may become out - // of date. We recommend leaving it unspecified. - Version *string `type:"string"` -} - -// String returns the string representation -func (s EnvironmentTier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentTier) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *EnvironmentTier) SetName(v string) *EnvironmentTier { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *EnvironmentTier) SetType(v string) *EnvironmentTier { - s.Type = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *EnvironmentTier) SetVersion(v string) *EnvironmentTier { - s.Version = &v - return s -} - -// Describes an event. -type EventDescription struct { - _ struct{} `type:"structure"` - - // The application associated with the event. - ApplicationName *string `min:"1" type:"string"` - - // The name of the environment associated with this event. - EnvironmentName *string `min:"4" type:"string"` - - // The date when the event occurred. - EventDate *time.Time `type:"timestamp"` - - // The event message. - Message *string `type:"string"` - - // The ARN of the platform. - PlatformArn *string `type:"string"` - - // The web service request ID for the activity of this event. - RequestId *string `type:"string"` - - // The severity level of this event. - Severity *string `type:"string" enum:"EventSeverity"` - - // The name of the configuration associated with this event. - TemplateName *string `min:"1" type:"string"` - - // The release label for the application version associated with this event. - VersionLabel *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s EventDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventDescription) GoString() string { - return s.String() -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *EventDescription) SetApplicationName(v string) *EventDescription { - s.ApplicationName = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *EventDescription) SetEnvironmentName(v string) *EventDescription { - s.EnvironmentName = &v - return s -} - -// SetEventDate sets the EventDate field's value. -func (s *EventDescription) SetEventDate(v time.Time) *EventDescription { - s.EventDate = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *EventDescription) SetMessage(v string) *EventDescription { - s.Message = &v - return s -} - -// SetPlatformArn sets the PlatformArn field's value. -func (s *EventDescription) SetPlatformArn(v string) *EventDescription { - s.PlatformArn = &v - return s -} - -// SetRequestId sets the RequestId field's value. -func (s *EventDescription) SetRequestId(v string) *EventDescription { - s.RequestId = &v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *EventDescription) SetSeverity(v string) *EventDescription { - s.Severity = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *EventDescription) SetTemplateName(v string) *EventDescription { - s.TemplateName = &v - return s -} - -// SetVersionLabel sets the VersionLabel field's value. -func (s *EventDescription) SetVersionLabel(v string) *EventDescription { - s.VersionLabel = &v - return s -} - -// The description of an Amazon EC2 instance. -type Instance struct { - _ struct{} `type:"structure"` - - // The ID of the Amazon EC2 instance. - Id *string `type:"string"` -} - -// String returns the string representation -func (s Instance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Instance) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *Instance) SetId(v string) *Instance { - s.Id = &v - return s -} - -// Represents summary information about the health of an instance. For more -// information, see Health Colors and Statuses (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-status.html). -type InstanceHealthSummary struct { - _ struct{} `type:"structure"` - - // Red. The health agent is reporting a high number of request failures or other - // issues for an instance or environment. - Degraded *int64 `type:"integer"` - - // Green. An operation is in progress on an instance. - Info *int64 `type:"integer"` - - // Grey. AWS Elastic Beanstalk and the health agent are reporting no data on - // an instance. - NoData *int64 `type:"integer"` - - // Green. An instance is passing health checks and the health agent is not reporting - // any problems. - Ok *int64 `type:"integer"` - - // Grey. An operation is in progress on an instance within the command timeout. - Pending *int64 `type:"integer"` - - // Red. The health agent is reporting a very high number of request failures - // or other issues for an instance or environment. - Severe *int64 `type:"integer"` - - // Grey. AWS Elastic Beanstalk and the health agent are reporting an insufficient - // amount of data on an instance. - Unknown *int64 `type:"integer"` - - // Yellow. The health agent is reporting a moderate number of request failures - // or other issues for an instance or environment. - Warning *int64 `type:"integer"` -} - -// String returns the string representation -func (s InstanceHealthSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceHealthSummary) GoString() string { - return s.String() -} - -// SetDegraded sets the Degraded field's value. -func (s *InstanceHealthSummary) SetDegraded(v int64) *InstanceHealthSummary { - s.Degraded = &v - return s -} - -// SetInfo sets the Info field's value. -func (s *InstanceHealthSummary) SetInfo(v int64) *InstanceHealthSummary { - s.Info = &v - return s -} - -// SetNoData sets the NoData field's value. -func (s *InstanceHealthSummary) SetNoData(v int64) *InstanceHealthSummary { - s.NoData = &v - return s -} - -// SetOk sets the Ok field's value. -func (s *InstanceHealthSummary) SetOk(v int64) *InstanceHealthSummary { - s.Ok = &v - return s -} - -// SetPending sets the Pending field's value. -func (s *InstanceHealthSummary) SetPending(v int64) *InstanceHealthSummary { - s.Pending = &v - return s -} - -// SetSevere sets the Severe field's value. -func (s *InstanceHealthSummary) SetSevere(v int64) *InstanceHealthSummary { - s.Severe = &v - return s -} - -// SetUnknown sets the Unknown field's value. -func (s *InstanceHealthSummary) SetUnknown(v int64) *InstanceHealthSummary { - s.Unknown = &v - return s -} - -// SetWarning sets the Warning field's value. -func (s *InstanceHealthSummary) SetWarning(v int64) *InstanceHealthSummary { - s.Warning = &v - return s -} - -// Represents the average latency for the slowest X percent of requests over -// the last 10 seconds. -type Latency struct { - _ struct{} `type:"structure"` - - // The average latency for the slowest 90 percent of requests over the last - // 10 seconds. - P10 *float64 `type:"double"` - - // The average latency for the slowest 50 percent of requests over the last - // 10 seconds. - P50 *float64 `type:"double"` - - // The average latency for the slowest 25 percent of requests over the last - // 10 seconds. - P75 *float64 `type:"double"` - - // The average latency for the slowest 15 percent of requests over the last - // 10 seconds. - P85 *float64 `type:"double"` - - // The average latency for the slowest 10 percent of requests over the last - // 10 seconds. - P90 *float64 `type:"double"` - - // The average latency for the slowest 5 percent of requests over the last 10 - // seconds. - P95 *float64 `type:"double"` - - // The average latency for the slowest 1 percent of requests over the last 10 - // seconds. - P99 *float64 `type:"double"` - - // The average latency for the slowest 0.1 percent of requests over the last - // 10 seconds. - P999 *float64 `type:"double"` -} - -// String returns the string representation -func (s Latency) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Latency) GoString() string { - return s.String() -} - -// SetP10 sets the P10 field's value. -func (s *Latency) SetP10(v float64) *Latency { - s.P10 = &v - return s -} - -// SetP50 sets the P50 field's value. -func (s *Latency) SetP50(v float64) *Latency { - s.P50 = &v - return s -} - -// SetP75 sets the P75 field's value. -func (s *Latency) SetP75(v float64) *Latency { - s.P75 = &v - return s -} - -// SetP85 sets the P85 field's value. -func (s *Latency) SetP85(v float64) *Latency { - s.P85 = &v - return s -} - -// SetP90 sets the P90 field's value. -func (s *Latency) SetP90(v float64) *Latency { - s.P90 = &v - return s -} - -// SetP95 sets the P95 field's value. -func (s *Latency) SetP95(v float64) *Latency { - s.P95 = &v - return s -} - -// SetP99 sets the P99 field's value. -func (s *Latency) SetP99(v float64) *Latency { - s.P99 = &v - return s -} - -// SetP999 sets the P999 field's value. -func (s *Latency) SetP999(v float64) *Latency { - s.P999 = &v - return s -} - -// Describes an Auto Scaling launch configuration. -type LaunchConfiguration struct { - _ struct{} `type:"structure"` - - // The name of the launch configuration. - Name *string `type:"string"` -} - -// String returns the string representation -func (s LaunchConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchConfiguration) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *LaunchConfiguration) SetName(v string) *LaunchConfiguration { - s.Name = &v - return s -} - -// Describes an Amazon EC2 launch template. -type LaunchTemplate struct { - _ struct{} `type:"structure"` - - // The ID of the launch template. - Id *string `type:"string"` -} - -// String returns the string representation -func (s LaunchTemplate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplate) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *LaunchTemplate) SetId(v string) *LaunchTemplate { - s.Id = &v - return s -} - -type ListAvailableSolutionStacksInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ListAvailableSolutionStacksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAvailableSolutionStacksInput) GoString() string { - return s.String() -} - -// A list of available AWS Elastic Beanstalk solution stacks. -type ListAvailableSolutionStacksOutput struct { - _ struct{} `type:"structure"` - - // A list of available solution stacks and their SolutionStackDescription. - SolutionStackDetails []*SolutionStackDescription `type:"list"` - - // A list of available solution stacks. - SolutionStacks []*string `type:"list"` -} - -// String returns the string representation -func (s ListAvailableSolutionStacksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAvailableSolutionStacksOutput) GoString() string { - return s.String() -} - -// SetSolutionStackDetails sets the SolutionStackDetails field's value. -func (s *ListAvailableSolutionStacksOutput) SetSolutionStackDetails(v []*SolutionStackDescription) *ListAvailableSolutionStacksOutput { - s.SolutionStackDetails = v - return s -} - -// SetSolutionStacks sets the SolutionStacks field's value. -func (s *ListAvailableSolutionStacksOutput) SetSolutionStacks(v []*string) *ListAvailableSolutionStacksOutput { - s.SolutionStacks = v - return s -} - -type ListPlatformVersionsInput struct { - _ struct{} `type:"structure"` - - // List only the platforms where the platform member value relates to one of - // the supplied values. - Filters []*PlatformFilter `type:"list"` - - // The maximum number of platform values returned in one call. - MaxRecords *int64 `min:"1" type:"integer"` - - // The starting index into the remaining list of platforms. Use the NextToken - // value from a previous ListPlatformVersion call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListPlatformVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPlatformVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPlatformVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPlatformVersionsInput"} - if s.MaxRecords != nil && *s.MaxRecords < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListPlatformVersionsInput) SetFilters(v []*PlatformFilter) *ListPlatformVersionsInput { - s.Filters = v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *ListPlatformVersionsInput) SetMaxRecords(v int64) *ListPlatformVersionsInput { - s.MaxRecords = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPlatformVersionsInput) SetNextToken(v string) *ListPlatformVersionsInput { - s.NextToken = &v - return s -} - -type ListPlatformVersionsOutput struct { - _ struct{} `type:"structure"` - - // The starting index into the remaining list of platforms. if this value is - // not null, you can use it in a subsequent ListPlatformVersion call. - NextToken *string `type:"string"` - - // Detailed information about the platforms. - PlatformSummaryList []*PlatformSummary `type:"list"` -} - -// String returns the string representation -func (s ListPlatformVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPlatformVersionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPlatformVersionsOutput) SetNextToken(v string) *ListPlatformVersionsOutput { - s.NextToken = &v - return s -} - -// SetPlatformSummaryList sets the PlatformSummaryList field's value. -func (s *ListPlatformVersionsOutput) SetPlatformSummaryList(v []*PlatformSummary) *ListPlatformVersionsOutput { - s.PlatformSummaryList = v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resouce for which a tag list is requested. - // - // Must be the ARN of an Elastic Beanstalk environment. - // - // ResourceArn is a required field - ResourceArn *string `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 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 Amazon Resource Name (ARN) of the resouce for which a tag list was requested. - ResourceArn *string `type:"string"` - - // A list of tag key-value pairs. - ResourceTags []*Tag `type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ListTagsForResourceOutput) SetResourceArn(v string) *ListTagsForResourceOutput { - s.ResourceArn = &v - return s -} - -// SetResourceTags sets the ResourceTags field's value. -func (s *ListTagsForResourceOutput) SetResourceTags(v []*Tag) *ListTagsForResourceOutput { - s.ResourceTags = v - return s -} - -// Describes the properties of a Listener for the LoadBalancer. -type Listener struct { - _ struct{} `type:"structure"` - - // The port that is used by the Listener. - Port *int64 `type:"integer"` - - // The protocol that is used by the Listener. - Protocol *string `type:"string"` -} - -// String returns the string representation -func (s Listener) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Listener) GoString() string { - return s.String() -} - -// SetPort sets the Port field's value. -func (s *Listener) SetPort(v int64) *Listener { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *Listener) SetProtocol(v string) *Listener { - s.Protocol = &v - return s -} - -// Describes a LoadBalancer. -type LoadBalancer struct { - _ struct{} `type:"structure"` - - // The name of the LoadBalancer. - Name *string `type:"string"` -} - -// String returns the string representation -func (s LoadBalancer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancer) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *LoadBalancer) SetName(v string) *LoadBalancer { - s.Name = &v - return s -} - -// Describes the details of a LoadBalancer. -type LoadBalancerDescription struct { - _ struct{} `type:"structure"` - - // The domain name of the LoadBalancer. - Domain *string `type:"string"` - - // A list of Listeners used by the LoadBalancer. - Listeners []*Listener `type:"list"` - - // The name of the LoadBalancer. - LoadBalancerName *string `type:"string"` -} - -// String returns the string representation -func (s LoadBalancerDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancerDescription) GoString() string { - return s.String() -} - -// SetDomain sets the Domain field's value. -func (s *LoadBalancerDescription) SetDomain(v string) *LoadBalancerDescription { - s.Domain = &v - return s -} - -// SetListeners sets the Listeners field's value. -func (s *LoadBalancerDescription) SetListeners(v []*Listener) *LoadBalancerDescription { - s.Listeners = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *LoadBalancerDescription) SetLoadBalancerName(v string) *LoadBalancerDescription { - s.LoadBalancerName = &v - return s -} - -// The record of an upcoming or in-progress managed action. -type ManagedAction struct { - _ struct{} `type:"structure"` - - // A description of the managed action. - ActionDescription *string `type:"string"` - - // A unique identifier for the managed action. - ActionId *string `type:"string"` - - // The type of managed action. - ActionType *string `type:"string" enum:"ActionType"` - - // The status of the managed action. If the action is Scheduled, you can apply - // it immediately with ApplyEnvironmentManagedAction. - Status *string `type:"string" enum:"ActionStatus"` - - // The start time of the maintenance window in which the managed action will - // execute. - WindowStartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s ManagedAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ManagedAction) GoString() string { - return s.String() -} - -// SetActionDescription sets the ActionDescription field's value. -func (s *ManagedAction) SetActionDescription(v string) *ManagedAction { - s.ActionDescription = &v - return s -} - -// SetActionId sets the ActionId field's value. -func (s *ManagedAction) SetActionId(v string) *ManagedAction { - s.ActionId = &v - return s -} - -// SetActionType sets the ActionType field's value. -func (s *ManagedAction) SetActionType(v string) *ManagedAction { - s.ActionType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ManagedAction) SetStatus(v string) *ManagedAction { - s.Status = &v - return s -} - -// SetWindowStartTime sets the WindowStartTime field's value. -func (s *ManagedAction) SetWindowStartTime(v time.Time) *ManagedAction { - s.WindowStartTime = &v - return s -} - -// The record of a completed or failed managed action. -type ManagedActionHistoryItem struct { - _ struct{} `type:"structure"` - - // A description of the managed action. - ActionDescription *string `type:"string"` - - // A unique identifier for the managed action. - ActionId *string `type:"string"` - - // The type of the managed action. - ActionType *string `type:"string" enum:"ActionType"` - - // The date and time that the action started executing. - ExecutedTime *time.Time `type:"timestamp"` - - // If the action failed, a description of the failure. - FailureDescription *string `type:"string"` - - // If the action failed, the type of failure. - FailureType *string `type:"string" enum:"FailureType"` - - // The date and time that the action finished executing. - FinishedTime *time.Time `type:"timestamp"` - - // The status of the action. - Status *string `type:"string" enum:"ActionHistoryStatus"` -} - -// String returns the string representation -func (s ManagedActionHistoryItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ManagedActionHistoryItem) GoString() string { - return s.String() -} - -// SetActionDescription sets the ActionDescription field's value. -func (s *ManagedActionHistoryItem) SetActionDescription(v string) *ManagedActionHistoryItem { - s.ActionDescription = &v - return s -} - -// SetActionId sets the ActionId field's value. -func (s *ManagedActionHistoryItem) SetActionId(v string) *ManagedActionHistoryItem { - s.ActionId = &v - return s -} - -// SetActionType sets the ActionType field's value. -func (s *ManagedActionHistoryItem) SetActionType(v string) *ManagedActionHistoryItem { - s.ActionType = &v - return s -} - -// SetExecutedTime sets the ExecutedTime field's value. -func (s *ManagedActionHistoryItem) SetExecutedTime(v time.Time) *ManagedActionHistoryItem { - s.ExecutedTime = &v - return s -} - -// SetFailureDescription sets the FailureDescription field's value. -func (s *ManagedActionHistoryItem) SetFailureDescription(v string) *ManagedActionHistoryItem { - s.FailureDescription = &v - return s -} - -// SetFailureType sets the FailureType field's value. -func (s *ManagedActionHistoryItem) SetFailureType(v string) *ManagedActionHistoryItem { - s.FailureType = &v - return s -} - -// SetFinishedTime sets the FinishedTime field's value. -func (s *ManagedActionHistoryItem) SetFinishedTime(v time.Time) *ManagedActionHistoryItem { - s.FinishedTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ManagedActionHistoryItem) SetStatus(v string) *ManagedActionHistoryItem { - s.Status = &v - return s -} - -// A lifecycle rule that deletes application versions after the specified number -// of days. -type MaxAgeRule struct { - _ struct{} `type:"structure"` - - // Set to true to delete a version's source bundle from Amazon S3 when Elastic - // Beanstalk deletes the application version. - DeleteSourceFromS3 *bool `type:"boolean"` - - // Specify true to apply the rule, or false to disable it. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // Specify the number of days to retain an application versions. - MaxAgeInDays *int64 `type:"integer"` -} - -// String returns the string representation -func (s MaxAgeRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaxAgeRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MaxAgeRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MaxAgeRule"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeleteSourceFromS3 sets the DeleteSourceFromS3 field's value. -func (s *MaxAgeRule) SetDeleteSourceFromS3(v bool) *MaxAgeRule { - s.DeleteSourceFromS3 = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *MaxAgeRule) SetEnabled(v bool) *MaxAgeRule { - s.Enabled = &v - return s -} - -// SetMaxAgeInDays sets the MaxAgeInDays field's value. -func (s *MaxAgeRule) SetMaxAgeInDays(v int64) *MaxAgeRule { - s.MaxAgeInDays = &v - return s -} - -// A lifecycle rule that deletes the oldest application version when the maximum -// count is exceeded. -type MaxCountRule struct { - _ struct{} `type:"structure"` - - // Set to true to delete a version's source bundle from Amazon S3 when Elastic - // Beanstalk deletes the application version. - DeleteSourceFromS3 *bool `type:"boolean"` - - // Specify true to apply the rule, or false to disable it. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // Specify the maximum number of application versions to retain. - MaxCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s MaxCountRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaxCountRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MaxCountRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MaxCountRule"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeleteSourceFromS3 sets the DeleteSourceFromS3 field's value. -func (s *MaxCountRule) SetDeleteSourceFromS3(v bool) *MaxCountRule { - s.DeleteSourceFromS3 = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *MaxCountRule) SetEnabled(v bool) *MaxCountRule { - s.Enabled = &v - return s -} - -// SetMaxCount sets the MaxCount field's value. -func (s *MaxCountRule) SetMaxCount(v int64) *MaxCountRule { - s.MaxCount = &v - return s -} - -// A regular expression representing a restriction on a string configuration -// option value. -type OptionRestrictionRegex struct { - _ struct{} `type:"structure"` - - // A unique name representing this regular expression. - Label *string `type:"string"` - - // The regular expression pattern that a string configuration option value with - // this restriction must match. - Pattern *string `type:"string"` -} - -// String returns the string representation -func (s OptionRestrictionRegex) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OptionRestrictionRegex) GoString() string { - return s.String() -} - -// SetLabel sets the Label field's value. -func (s *OptionRestrictionRegex) SetLabel(v string) *OptionRestrictionRegex { - s.Label = &v - return s -} - -// SetPattern sets the Pattern field's value. -func (s *OptionRestrictionRegex) SetPattern(v string) *OptionRestrictionRegex { - s.Pattern = &v - return s -} - -// A specification identifying an individual configuration option. -type OptionSpecification struct { - _ struct{} `type:"structure"` - - // A unique namespace identifying the option's associated AWS resource. - Namespace *string `type:"string"` - - // The name of the configuration option. - OptionName *string `type:"string"` - - // A unique resource name for a time-based scaling configuration option. - ResourceName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s OptionSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OptionSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OptionSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OptionSpecification"} - if s.ResourceName != nil && len(*s.ResourceName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNamespace sets the Namespace field's value. -func (s *OptionSpecification) SetNamespace(v string) *OptionSpecification { - s.Namespace = &v - return s -} - -// SetOptionName sets the OptionName field's value. -func (s *OptionSpecification) SetOptionName(v string) *OptionSpecification { - s.OptionName = &v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *OptionSpecification) SetResourceName(v string) *OptionSpecification { - s.ResourceName = &v - return s -} - -// Detailed information about a platform. -type PlatformDescription struct { - _ struct{} `type:"structure"` - - // The custom AMIs supported by the platform. - CustomAmiList []*CustomAmi `type:"list"` - - // The date when the platform was created. - DateCreated *time.Time `type:"timestamp"` - - // The date when the platform was last updated. - DateUpdated *time.Time `type:"timestamp"` - - // The description of the platform. - Description *string `type:"string"` - - // The frameworks supported by the platform. - Frameworks []*PlatformFramework `type:"list"` - - // Information about the maintainer of the platform. - Maintainer *string `type:"string"` - - // The operating system used by the platform. - OperatingSystemName *string `type:"string"` - - // The version of the operating system used by the platform. - OperatingSystemVersion *string `type:"string"` - - // The ARN of the platform. - PlatformArn *string `type:"string"` - - // The category of the platform. - PlatformCategory *string `type:"string"` - - // The name of the platform. - PlatformName *string `type:"string"` - - // The AWS account ID of the person who created the platform. - PlatformOwner *string `type:"string"` - - // The status of the platform. - PlatformStatus *string `type:"string" enum:"PlatformStatus"` - - // The version of the platform. - PlatformVersion *string `type:"string"` - - // The programming languages supported by the platform. - ProgrammingLanguages []*PlatformProgrammingLanguage `type:"list"` - - // The name of the solution stack used by the platform. - SolutionStackName *string `type:"string"` - - // The additions supported by the platform. - SupportedAddonList []*string `type:"list"` - - // The tiers supported by the platform. - SupportedTierList []*string `type:"list"` -} - -// String returns the string representation -func (s PlatformDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlatformDescription) GoString() string { - return s.String() -} - -// SetCustomAmiList sets the CustomAmiList field's value. -func (s *PlatformDescription) SetCustomAmiList(v []*CustomAmi) *PlatformDescription { - s.CustomAmiList = v - return s -} - -// SetDateCreated sets the DateCreated field's value. -func (s *PlatformDescription) SetDateCreated(v time.Time) *PlatformDescription { - s.DateCreated = &v - return s -} - -// SetDateUpdated sets the DateUpdated field's value. -func (s *PlatformDescription) SetDateUpdated(v time.Time) *PlatformDescription { - s.DateUpdated = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PlatformDescription) SetDescription(v string) *PlatformDescription { - s.Description = &v - return s -} - -// SetFrameworks sets the Frameworks field's value. -func (s *PlatformDescription) SetFrameworks(v []*PlatformFramework) *PlatformDescription { - s.Frameworks = v - return s -} - -// SetMaintainer sets the Maintainer field's value. -func (s *PlatformDescription) SetMaintainer(v string) *PlatformDescription { - s.Maintainer = &v - return s -} - -// SetOperatingSystemName sets the OperatingSystemName field's value. -func (s *PlatformDescription) SetOperatingSystemName(v string) *PlatformDescription { - s.OperatingSystemName = &v - return s -} - -// SetOperatingSystemVersion sets the OperatingSystemVersion field's value. -func (s *PlatformDescription) SetOperatingSystemVersion(v string) *PlatformDescription { - s.OperatingSystemVersion = &v - return s -} - -// SetPlatformArn sets the PlatformArn field's value. -func (s *PlatformDescription) SetPlatformArn(v string) *PlatformDescription { - s.PlatformArn = &v - return s -} - -// SetPlatformCategory sets the PlatformCategory field's value. -func (s *PlatformDescription) SetPlatformCategory(v string) *PlatformDescription { - s.PlatformCategory = &v - return s -} - -// SetPlatformName sets the PlatformName field's value. -func (s *PlatformDescription) SetPlatformName(v string) *PlatformDescription { - s.PlatformName = &v - return s -} - -// SetPlatformOwner sets the PlatformOwner field's value. -func (s *PlatformDescription) SetPlatformOwner(v string) *PlatformDescription { - s.PlatformOwner = &v - return s -} - -// SetPlatformStatus sets the PlatformStatus field's value. -func (s *PlatformDescription) SetPlatformStatus(v string) *PlatformDescription { - s.PlatformStatus = &v - return s -} - -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *PlatformDescription) SetPlatformVersion(v string) *PlatformDescription { - s.PlatformVersion = &v - return s -} - -// SetProgrammingLanguages sets the ProgrammingLanguages field's value. -func (s *PlatformDescription) SetProgrammingLanguages(v []*PlatformProgrammingLanguage) *PlatformDescription { - s.ProgrammingLanguages = v - return s -} - -// SetSolutionStackName sets the SolutionStackName field's value. -func (s *PlatformDescription) SetSolutionStackName(v string) *PlatformDescription { - s.SolutionStackName = &v - return s -} - -// SetSupportedAddonList sets the SupportedAddonList field's value. -func (s *PlatformDescription) SetSupportedAddonList(v []*string) *PlatformDescription { - s.SupportedAddonList = v - return s -} - -// SetSupportedTierList sets the SupportedTierList field's value. -func (s *PlatformDescription) SetSupportedTierList(v []*string) *PlatformDescription { - s.SupportedTierList = v - return s -} - -// Specify criteria to restrict the results when listing custom platforms. -// -// The filter is evaluated as the expression: -// -// TypeOperatorValues[i] -type PlatformFilter struct { - _ struct{} `type:"structure"` - - // The operator to apply to the Type with each of the Values. - // - // Valid Values: = (equal to) | != (not equal to) | < (less than) | <= (less - // than or equal to) | > (greater than) | >= (greater than or equal to) | contains - // | begins_with | ends_with - Operator *string `type:"string"` - - // The custom platform attribute to which the filter values are applied. - // - // Valid Values: PlatformName | PlatformVersion | PlatformStatus | PlatformOwner - Type *string `type:"string"` - - // The list of values applied to the custom platform attribute. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s PlatformFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlatformFilter) GoString() string { - return s.String() -} - -// SetOperator sets the Operator field's value. -func (s *PlatformFilter) SetOperator(v string) *PlatformFilter { - s.Operator = &v - return s -} - -// SetType sets the Type field's value. -func (s *PlatformFilter) SetType(v string) *PlatformFilter { - s.Type = &v - return s -} - -// SetValues sets the Values field's value. -func (s *PlatformFilter) SetValues(v []*string) *PlatformFilter { - s.Values = v - return s -} - -// A framework supported by the custom platform. -type PlatformFramework struct { - _ struct{} `type:"structure"` - - // The name of the framework. - Name *string `type:"string"` - - // The version of the framework. - Version *string `type:"string"` -} - -// String returns the string representation -func (s PlatformFramework) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlatformFramework) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *PlatformFramework) SetName(v string) *PlatformFramework { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *PlatformFramework) SetVersion(v string) *PlatformFramework { - s.Version = &v - return s -} - -// A programming language supported by the platform. -type PlatformProgrammingLanguage struct { - _ struct{} `type:"structure"` - - // The name of the programming language. - Name *string `type:"string"` - - // The version of the programming language. - Version *string `type:"string"` -} - -// String returns the string representation -func (s PlatformProgrammingLanguage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlatformProgrammingLanguage) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *PlatformProgrammingLanguage) SetName(v string) *PlatformProgrammingLanguage { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *PlatformProgrammingLanguage) SetVersion(v string) *PlatformProgrammingLanguage { - s.Version = &v - return s -} - -// Detailed information about a platform. -type PlatformSummary struct { - _ struct{} `type:"structure"` - - // The operating system used by the platform. - OperatingSystemName *string `type:"string"` - - // The version of the operating system used by the platform. - OperatingSystemVersion *string `type:"string"` - - // The ARN of the platform. - PlatformArn *string `type:"string"` - - // The category of platform. - PlatformCategory *string `type:"string"` - - // The AWS account ID of the person who created the platform. - PlatformOwner *string `type:"string"` - - // The status of the platform. You can create an environment from the platform - // once it is ready. - PlatformStatus *string `type:"string" enum:"PlatformStatus"` - - // The additions associated with the platform. - SupportedAddonList []*string `type:"list"` - - // The tiers in which the platform runs. - SupportedTierList []*string `type:"list"` -} - -// String returns the string representation -func (s PlatformSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlatformSummary) GoString() string { - return s.String() -} - -// SetOperatingSystemName sets the OperatingSystemName field's value. -func (s *PlatformSummary) SetOperatingSystemName(v string) *PlatformSummary { - s.OperatingSystemName = &v - return s -} - -// SetOperatingSystemVersion sets the OperatingSystemVersion field's value. -func (s *PlatformSummary) SetOperatingSystemVersion(v string) *PlatformSummary { - s.OperatingSystemVersion = &v - return s -} - -// SetPlatformArn sets the PlatformArn field's value. -func (s *PlatformSummary) SetPlatformArn(v string) *PlatformSummary { - s.PlatformArn = &v - return s -} - -// SetPlatformCategory sets the PlatformCategory field's value. -func (s *PlatformSummary) SetPlatformCategory(v string) *PlatformSummary { - s.PlatformCategory = &v - return s -} - -// SetPlatformOwner sets the PlatformOwner field's value. -func (s *PlatformSummary) SetPlatformOwner(v string) *PlatformSummary { - s.PlatformOwner = &v - return s -} - -// SetPlatformStatus sets the PlatformStatus field's value. -func (s *PlatformSummary) SetPlatformStatus(v string) *PlatformSummary { - s.PlatformStatus = &v - return s -} - -// SetSupportedAddonList sets the SupportedAddonList field's value. -func (s *PlatformSummary) SetSupportedAddonList(v []*string) *PlatformSummary { - s.SupportedAddonList = v - return s -} - -// SetSupportedTierList sets the SupportedTierList field's value. -func (s *PlatformSummary) SetSupportedTierList(v []*string) *PlatformSummary { - s.SupportedTierList = v - return s -} - -// Describes a queue. -type Queue struct { - _ struct{} `type:"structure"` - - // The name of the queue. - Name *string `type:"string"` - - // The URL of the queue. - URL *string `type:"string"` -} - -// String returns the string representation -func (s Queue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Queue) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *Queue) SetName(v string) *Queue { - s.Name = &v - return s -} - -// SetURL sets the URL field's value. -func (s *Queue) SetURL(v string) *Queue { - s.URL = &v - return s -} - -type RebuildEnvironmentInput struct { - _ struct{} `type:"structure"` - - // The ID of the environment to rebuild. - // - // Condition: You must specify either this or an EnvironmentName, or both. If - // you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentId *string `type:"string"` - - // The name of the environment to rebuild. - // - // Condition: You must specify either this or an EnvironmentId, or both. If - // you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentName *string `min:"4" type:"string"` -} - -// String returns the string representation -func (s RebuildEnvironmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebuildEnvironmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebuildEnvironmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebuildEnvironmentInput"} - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *RebuildEnvironmentInput) SetEnvironmentId(v string) *RebuildEnvironmentInput { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *RebuildEnvironmentInput) SetEnvironmentName(v string) *RebuildEnvironmentInput { - s.EnvironmentName = &v - return s -} - -type RebuildEnvironmentOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RebuildEnvironmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebuildEnvironmentOutput) GoString() string { - return s.String() -} - -// Request to retrieve logs from an environment and store them in your Elastic -// Beanstalk storage bucket. -type RequestEnvironmentInfoInput struct { - _ struct{} `type:"structure"` - - // The ID of the environment of the requested data. - // - // If no such environment is found, RequestEnvironmentInfo returns an InvalidParameterValue - // error. - // - // Condition: You must specify either this or an EnvironmentName, or both. If - // you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentId *string `type:"string"` - - // The name of the environment of the requested data. - // - // If no such environment is found, RequestEnvironmentInfo returns an InvalidParameterValue - // error. - // - // Condition: You must specify either this or an EnvironmentId, or both. If - // you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentName *string `min:"4" type:"string"` - - // The type of information to request. - // - // InfoType is a required field - InfoType *string `type:"string" required:"true" enum:"EnvironmentInfoType"` -} - -// String returns the string representation -func (s RequestEnvironmentInfoInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestEnvironmentInfoInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestEnvironmentInfoInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestEnvironmentInfoInput"} - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - if s.InfoType == nil { - invalidParams.Add(request.NewErrParamRequired("InfoType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *RequestEnvironmentInfoInput) SetEnvironmentId(v string) *RequestEnvironmentInfoInput { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *RequestEnvironmentInfoInput) SetEnvironmentName(v string) *RequestEnvironmentInfoInput { - s.EnvironmentName = &v - return s -} - -// SetInfoType sets the InfoType field's value. -func (s *RequestEnvironmentInfoInput) SetInfoType(v string) *RequestEnvironmentInfoInput { - s.InfoType = &v - return s -} - -type RequestEnvironmentInfoOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RequestEnvironmentInfoOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestEnvironmentInfoOutput) GoString() string { - return s.String() -} - -// The AWS Elastic Beanstalk quota information for a single resource type in -// an AWS account. It reflects the resource's limits for this account. -type ResourceQuota struct { - _ struct{} `type:"structure"` - - // The maximum number of instances of this Elastic Beanstalk resource type that - // an AWS account can use. - Maximum *int64 `type:"integer"` -} - -// String returns the string representation -func (s ResourceQuota) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceQuota) GoString() string { - return s.String() -} - -// SetMaximum sets the Maximum field's value. -func (s *ResourceQuota) SetMaximum(v int64) *ResourceQuota { - s.Maximum = &v - return s -} - -// A set of per-resource AWS Elastic Beanstalk quotas associated with an AWS -// account. They reflect Elastic Beanstalk resource limits for this account. -type ResourceQuotas struct { - _ struct{} `type:"structure"` - - // The quota for applications in the AWS account. - ApplicationQuota *ResourceQuota `type:"structure"` - - // The quota for application versions in the AWS account. - ApplicationVersionQuota *ResourceQuota `type:"structure"` - - // The quota for configuration templates in the AWS account. - ConfigurationTemplateQuota *ResourceQuota `type:"structure"` - - // The quota for custom platforms in the AWS account. - CustomPlatformQuota *ResourceQuota `type:"structure"` - - // The quota for environments in the AWS account. - EnvironmentQuota *ResourceQuota `type:"structure"` -} - -// String returns the string representation -func (s ResourceQuotas) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceQuotas) GoString() string { - return s.String() -} - -// SetApplicationQuota sets the ApplicationQuota field's value. -func (s *ResourceQuotas) SetApplicationQuota(v *ResourceQuota) *ResourceQuotas { - s.ApplicationQuota = v - return s -} - -// SetApplicationVersionQuota sets the ApplicationVersionQuota field's value. -func (s *ResourceQuotas) SetApplicationVersionQuota(v *ResourceQuota) *ResourceQuotas { - s.ApplicationVersionQuota = v - return s -} - -// SetConfigurationTemplateQuota sets the ConfigurationTemplateQuota field's value. -func (s *ResourceQuotas) SetConfigurationTemplateQuota(v *ResourceQuota) *ResourceQuotas { - s.ConfigurationTemplateQuota = v - return s -} - -// SetCustomPlatformQuota sets the CustomPlatformQuota field's value. -func (s *ResourceQuotas) SetCustomPlatformQuota(v *ResourceQuota) *ResourceQuotas { - s.CustomPlatformQuota = v - return s -} - -// SetEnvironmentQuota sets the EnvironmentQuota field's value. -func (s *ResourceQuotas) SetEnvironmentQuota(v *ResourceQuota) *ResourceQuotas { - s.EnvironmentQuota = v - return s -} - -type RestartAppServerInput struct { - _ struct{} `type:"structure"` - - // The ID of the environment to restart the server for. - // - // Condition: You must specify either this or an EnvironmentName, or both. If - // you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentId *string `type:"string"` - - // The name of the environment to restart the server for. - // - // Condition: You must specify either this or an EnvironmentId, or both. If - // you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentName *string `min:"4" type:"string"` -} - -// String returns the string representation -func (s RestartAppServerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestartAppServerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestartAppServerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestartAppServerInput"} - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *RestartAppServerInput) SetEnvironmentId(v string) *RestartAppServerInput { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *RestartAppServerInput) SetEnvironmentName(v string) *RestartAppServerInput { - s.EnvironmentName = &v - return s -} - -type RestartAppServerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RestartAppServerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestartAppServerOutput) GoString() string { - return s.String() -} - -// Request to download logs retrieved with RequestEnvironmentInfo. -type RetrieveEnvironmentInfoInput struct { - _ struct{} `type:"structure"` - - // The ID of the data's environment. - // - // If no such environment is found, returns an InvalidParameterValue error. - // - // Condition: You must specify either this or an EnvironmentName, or both. If - // you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentId *string `type:"string"` - - // The name of the data's environment. - // - // If no such environment is found, returns an InvalidParameterValue error. - // - // Condition: You must specify either this or an EnvironmentId, or both. If - // you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentName *string `min:"4" type:"string"` - - // The type of information to retrieve. - // - // InfoType is a required field - InfoType *string `type:"string" required:"true" enum:"EnvironmentInfoType"` -} - -// String returns the string representation -func (s RetrieveEnvironmentInfoInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RetrieveEnvironmentInfoInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RetrieveEnvironmentInfoInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RetrieveEnvironmentInfoInput"} - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - if s.InfoType == nil { - invalidParams.Add(request.NewErrParamRequired("InfoType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *RetrieveEnvironmentInfoInput) SetEnvironmentId(v string) *RetrieveEnvironmentInfoInput { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *RetrieveEnvironmentInfoInput) SetEnvironmentName(v string) *RetrieveEnvironmentInfoInput { - s.EnvironmentName = &v - return s -} - -// SetInfoType sets the InfoType field's value. -func (s *RetrieveEnvironmentInfoInput) SetInfoType(v string) *RetrieveEnvironmentInfoInput { - s.InfoType = &v - return s -} - -// Result message containing a description of the requested environment info. -type RetrieveEnvironmentInfoOutput struct { - _ struct{} `type:"structure"` - - // The EnvironmentInfoDescription of the environment. - EnvironmentInfo []*EnvironmentInfoDescription `type:"list"` -} - -// String returns the string representation -func (s RetrieveEnvironmentInfoOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RetrieveEnvironmentInfoOutput) GoString() string { - return s.String() -} - -// SetEnvironmentInfo sets the EnvironmentInfo field's value. -func (s *RetrieveEnvironmentInfoOutput) SetEnvironmentInfo(v []*EnvironmentInfoDescription) *RetrieveEnvironmentInfoOutput { - s.EnvironmentInfo = v - return s -} - -// The bucket and key of an item stored in Amazon S3. -type S3Location struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket where the data is located. - S3Bucket *string `type:"string"` - - // The Amazon S3 key where the data is located. - S3Key *string `type:"string"` -} - -// String returns the string representation -func (s S3Location) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Location) GoString() string { - return s.String() -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *S3Location) SetS3Bucket(v string) *S3Location { - s.S3Bucket = &v - return s -} - -// SetS3Key sets the S3Key field's value. -func (s *S3Location) SetS3Key(v string) *S3Location { - s.S3Key = &v - return s -} - -// Detailed health information about an Amazon EC2 instance in your Elastic -// Beanstalk environment. -type SingleInstanceHealth struct { - _ struct{} `type:"structure"` - - // Request metrics from your application. - ApplicationMetrics *ApplicationMetrics `type:"structure"` - - // The availability zone in which the instance runs. - AvailabilityZone *string `type:"string"` - - // Represents the causes, which provide more information about the current health - // status. - Causes []*string `type:"list"` - - // Represents the color indicator that gives you information about the health - // of the EC2 instance. For more information, see Health Colors and Statuses - // (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-status.html). - Color *string `type:"string"` - - // Information about the most recent deployment to an instance. - Deployment *Deployment `type:"structure"` - - // Returns the health status of the specified instance. For more information, - // see Health Colors and Statuses (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-status.html). - HealthStatus *string `type:"string"` - - // The ID of the Amazon EC2 instance. - InstanceId *string `min:"1" type:"string"` - - // The instance's type. - InstanceType *string `type:"string"` - - // The time at which the EC2 instance was launched. - LaunchedAt *time.Time `type:"timestamp"` - - // Operating system metrics from the instance. - System *SystemStatus `type:"structure"` -} - -// String returns the string representation -func (s SingleInstanceHealth) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SingleInstanceHealth) GoString() string { - return s.String() -} - -// SetApplicationMetrics sets the ApplicationMetrics field's value. -func (s *SingleInstanceHealth) SetApplicationMetrics(v *ApplicationMetrics) *SingleInstanceHealth { - s.ApplicationMetrics = v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *SingleInstanceHealth) SetAvailabilityZone(v string) *SingleInstanceHealth { - s.AvailabilityZone = &v - return s -} - -// SetCauses sets the Causes field's value. -func (s *SingleInstanceHealth) SetCauses(v []*string) *SingleInstanceHealth { - s.Causes = v - return s -} - -// SetColor sets the Color field's value. -func (s *SingleInstanceHealth) SetColor(v string) *SingleInstanceHealth { - s.Color = &v - return s -} - -// SetDeployment sets the Deployment field's value. -func (s *SingleInstanceHealth) SetDeployment(v *Deployment) *SingleInstanceHealth { - s.Deployment = v - return s -} - -// SetHealthStatus sets the HealthStatus field's value. -func (s *SingleInstanceHealth) SetHealthStatus(v string) *SingleInstanceHealth { - s.HealthStatus = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *SingleInstanceHealth) SetInstanceId(v string) *SingleInstanceHealth { - s.InstanceId = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *SingleInstanceHealth) SetInstanceType(v string) *SingleInstanceHealth { - s.InstanceType = &v - return s -} - -// SetLaunchedAt sets the LaunchedAt field's value. -func (s *SingleInstanceHealth) SetLaunchedAt(v time.Time) *SingleInstanceHealth { - s.LaunchedAt = &v - return s -} - -// SetSystem sets the System field's value. -func (s *SingleInstanceHealth) SetSystem(v *SystemStatus) *SingleInstanceHealth { - s.System = v - return s -} - -// Describes the solution stack. -type SolutionStackDescription struct { - _ struct{} `type:"structure"` - - // The permitted file types allowed for a solution stack. - PermittedFileTypes []*string `type:"list"` - - // The name of the solution stack. - SolutionStackName *string `type:"string"` -} - -// String returns the string representation -func (s SolutionStackDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SolutionStackDescription) GoString() string { - return s.String() -} - -// SetPermittedFileTypes sets the PermittedFileTypes field's value. -func (s *SolutionStackDescription) SetPermittedFileTypes(v []*string) *SolutionStackDescription { - s.PermittedFileTypes = v - return s -} - -// SetSolutionStackName sets the SolutionStackName field's value. -func (s *SolutionStackDescription) SetSolutionStackName(v string) *SolutionStackDescription { - s.SolutionStackName = &v - return s -} - -// Location of the source code for an application version. -type SourceBuildInformation struct { - _ struct{} `type:"structure"` - - // The location of the source code, as a formatted string, depending on the - // value of SourceRepository - // - // * For CodeCommit, the format is the repository name and commit ID, separated - // by a forward slash. For example, my-git-repo/265cfa0cf6af46153527f55d6503ec030551f57a. - // - // * For S3, the format is the S3 bucket name and object key, separated by - // a forward slash. For example, my-s3-bucket/Folders/my-source-file. - // - // SourceLocation is a required field - SourceLocation *string `min:"3" type:"string" required:"true"` - - // Location where the repository is stored. - // - // * CodeCommit - // - // * S3 - // - // SourceRepository is a required field - SourceRepository *string `type:"string" required:"true" enum:"SourceRepository"` - - // The type of repository. - // - // * Git - // - // * Zip - // - // SourceType is a required field - SourceType *string `type:"string" required:"true" enum:"SourceType"` -} - -// String returns the string representation -func (s SourceBuildInformation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SourceBuildInformation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SourceBuildInformation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SourceBuildInformation"} - if s.SourceLocation == nil { - invalidParams.Add(request.NewErrParamRequired("SourceLocation")) - } - if s.SourceLocation != nil && len(*s.SourceLocation) < 3 { - invalidParams.Add(request.NewErrParamMinLen("SourceLocation", 3)) - } - if s.SourceRepository == nil { - invalidParams.Add(request.NewErrParamRequired("SourceRepository")) - } - if s.SourceType == nil { - invalidParams.Add(request.NewErrParamRequired("SourceType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceLocation sets the SourceLocation field's value. -func (s *SourceBuildInformation) SetSourceLocation(v string) *SourceBuildInformation { - s.SourceLocation = &v - return s -} - -// SetSourceRepository sets the SourceRepository field's value. -func (s *SourceBuildInformation) SetSourceRepository(v string) *SourceBuildInformation { - s.SourceRepository = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *SourceBuildInformation) SetSourceType(v string) *SourceBuildInformation { - s.SourceType = &v - return s -} - -// A specification for an environment configuration -type SourceConfiguration struct { - _ struct{} `type:"structure"` - - // The name of the application associated with the configuration. - ApplicationName *string `min:"1" type:"string"` - - // The name of the configuration template. - TemplateName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s SourceConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SourceConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SourceConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SourceConfiguration"} - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.TemplateName != nil && len(*s.TemplateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *SourceConfiguration) SetApplicationName(v string) *SourceConfiguration { - s.ApplicationName = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *SourceConfiguration) SetTemplateName(v string) *SourceConfiguration { - s.TemplateName = &v - return s -} - -// Represents the percentage of requests over the last 10 seconds that resulted -// in each type of status code response. For more information, see Status Code -// Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html). -type StatusCodes struct { - _ struct{} `type:"structure"` - - // The percentage of requests over the last 10 seconds that resulted in a 2xx - // (200, 201, etc.) status code. - Status2xx *int64 `type:"integer"` - - // The percentage of requests over the last 10 seconds that resulted in a 3xx - // (300, 301, etc.) status code. - Status3xx *int64 `type:"integer"` - - // The percentage of requests over the last 10 seconds that resulted in a 4xx - // (400, 401, etc.) status code. - Status4xx *int64 `type:"integer"` - - // The percentage of requests over the last 10 seconds that resulted in a 5xx - // (500, 501, etc.) status code. - Status5xx *int64 `type:"integer"` -} - -// String returns the string representation -func (s StatusCodes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StatusCodes) GoString() string { - return s.String() -} - -// SetStatus2xx sets the Status2xx field's value. -func (s *StatusCodes) SetStatus2xx(v int64) *StatusCodes { - s.Status2xx = &v - return s -} - -// SetStatus3xx sets the Status3xx field's value. -func (s *StatusCodes) SetStatus3xx(v int64) *StatusCodes { - s.Status3xx = &v - return s -} - -// SetStatus4xx sets the Status4xx field's value. -func (s *StatusCodes) SetStatus4xx(v int64) *StatusCodes { - s.Status4xx = &v - return s -} - -// SetStatus5xx sets the Status5xx field's value. -func (s *StatusCodes) SetStatus5xx(v int64) *StatusCodes { - s.Status5xx = &v - return s -} - -// Swaps the CNAMEs of two environments. -type SwapEnvironmentCNAMEsInput struct { - _ struct{} `type:"structure"` - - // The ID of the destination environment. - // - // Condition: You must specify at least the DestinationEnvironmentID or the - // DestinationEnvironmentName. You may also specify both. You must specify the - // SourceEnvironmentId with the DestinationEnvironmentId. - DestinationEnvironmentId *string `type:"string"` - - // The name of the destination environment. - // - // Condition: You must specify at least the DestinationEnvironmentID or the - // DestinationEnvironmentName. You may also specify both. You must specify the - // SourceEnvironmentName with the DestinationEnvironmentName. - DestinationEnvironmentName *string `min:"4" type:"string"` - - // The ID of the source environment. - // - // Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. - // You may also specify both. If you specify the SourceEnvironmentId, you must - // specify the DestinationEnvironmentId. - SourceEnvironmentId *string `type:"string"` - - // The name of the source environment. - // - // Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. - // You may also specify both. If you specify the SourceEnvironmentName, you - // must specify the DestinationEnvironmentName. - SourceEnvironmentName *string `min:"4" type:"string"` -} - -// String returns the string representation -func (s SwapEnvironmentCNAMEsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SwapEnvironmentCNAMEsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SwapEnvironmentCNAMEsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SwapEnvironmentCNAMEsInput"} - if s.DestinationEnvironmentName != nil && len(*s.DestinationEnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("DestinationEnvironmentName", 4)) - } - if s.SourceEnvironmentName != nil && len(*s.SourceEnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("SourceEnvironmentName", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationEnvironmentId sets the DestinationEnvironmentId field's value. -func (s *SwapEnvironmentCNAMEsInput) SetDestinationEnvironmentId(v string) *SwapEnvironmentCNAMEsInput { - s.DestinationEnvironmentId = &v - return s -} - -// SetDestinationEnvironmentName sets the DestinationEnvironmentName field's value. -func (s *SwapEnvironmentCNAMEsInput) SetDestinationEnvironmentName(v string) *SwapEnvironmentCNAMEsInput { - s.DestinationEnvironmentName = &v - return s -} - -// SetSourceEnvironmentId sets the SourceEnvironmentId field's value. -func (s *SwapEnvironmentCNAMEsInput) SetSourceEnvironmentId(v string) *SwapEnvironmentCNAMEsInput { - s.SourceEnvironmentId = &v - return s -} - -// SetSourceEnvironmentName sets the SourceEnvironmentName field's value. -func (s *SwapEnvironmentCNAMEsInput) SetSourceEnvironmentName(v string) *SwapEnvironmentCNAMEsInput { - s.SourceEnvironmentName = &v - return s -} - -type SwapEnvironmentCNAMEsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SwapEnvironmentCNAMEsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SwapEnvironmentCNAMEsOutput) GoString() string { - return s.String() -} - -// CPU utilization and load average metrics for an Amazon EC2 instance. -type SystemStatus struct { - _ struct{} `type:"structure"` - - // CPU utilization metrics for the instance. - CPUUtilization *CPUUtilization `type:"structure"` - - // Load average in the last 1-minute, 5-minute, and 15-minute periods. For more - // information, see Operating System Metrics (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-metrics.html#health-enhanced-metrics-os). - LoadAverage []*float64 `type:"list"` -} - -// String returns the string representation -func (s SystemStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SystemStatus) GoString() string { - return s.String() -} - -// SetCPUUtilization sets the CPUUtilization field's value. -func (s *SystemStatus) SetCPUUtilization(v *CPUUtilization) *SystemStatus { - s.CPUUtilization = v - return s -} - -// SetLoadAverage sets the LoadAverage field's value. -func (s *SystemStatus) SetLoadAverage(v []*float64) *SystemStatus { - s.LoadAverage = v - return s -} - -// Describes a tag applied to a resource in an environment. -type Tag struct { - _ struct{} `type:"structure"` - - // The key of the tag. - Key *string `min:"1" type:"string"` - - // The value of the tag. - Value *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Request to terminate an environment. -type TerminateEnvironmentInput struct { - _ struct{} `type:"structure"` - - // The ID of the environment to terminate. - // - // Condition: You must specify either this or an EnvironmentName, or both. If - // you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentId *string `type:"string"` - - // The name of the environment to terminate. - // - // Condition: You must specify either this or an EnvironmentId, or both. If - // you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentName *string `min:"4" type:"string"` - - // Terminates the target environment even if another environment in the same - // group is dependent on it. - ForceTerminate *bool `type:"boolean"` - - // Indicates whether the associated AWS resources should shut down when the - // environment is terminated: - // - // * true: The specified environment as well as the associated AWS resources, - // such as Auto Scaling group and LoadBalancer, are terminated. - // - // * false: AWS Elastic Beanstalk resource management is removed from the - // environment, but the AWS resources continue to operate. - // - // For more information, see the AWS Elastic Beanstalk User Guide. (http://docs.aws.amazon.com/elasticbeanstalk/latest/ug/) - // - // Default: true - // - // Valid Values: true | false - TerminateResources *bool `type:"boolean"` -} - -// String returns the string representation -func (s TerminateEnvironmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateEnvironmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TerminateEnvironmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TerminateEnvironmentInput"} - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *TerminateEnvironmentInput) SetEnvironmentId(v string) *TerminateEnvironmentInput { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *TerminateEnvironmentInput) SetEnvironmentName(v string) *TerminateEnvironmentInput { - s.EnvironmentName = &v - return s -} - -// SetForceTerminate sets the ForceTerminate field's value. -func (s *TerminateEnvironmentInput) SetForceTerminate(v bool) *TerminateEnvironmentInput { - s.ForceTerminate = &v - return s -} - -// SetTerminateResources sets the TerminateResources field's value. -func (s *TerminateEnvironmentInput) SetTerminateResources(v bool) *TerminateEnvironmentInput { - s.TerminateResources = &v - return s -} - -// Describes a trigger. -type Trigger struct { - _ struct{} `type:"structure"` - - // The name of the trigger. - Name *string `type:"string"` -} - -// String returns the string representation -func (s Trigger) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Trigger) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *Trigger) SetName(v string) *Trigger { - s.Name = &v - return s -} - -// Request to update an application. -type UpdateApplicationInput struct { - _ struct{} `type:"structure"` - - // The name of the application to update. If no such application is found, UpdateApplication - // returns an InvalidParameterValue error. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // A new description for the application. - // - // Default: If not specified, AWS Elastic Beanstalk does not update the description. - Description *string `type:"string"` -} - -// String returns the string representation -func (s UpdateApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *UpdateApplicationInput) SetApplicationName(v string) *UpdateApplicationInput { - s.ApplicationName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateApplicationInput) SetDescription(v string) *UpdateApplicationInput { - s.Description = &v - return s -} - -type UpdateApplicationResourceLifecycleInput struct { - _ struct{} `type:"structure"` - - // The name of the application. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // The lifecycle configuration. - // - // ResourceLifecycleConfig is a required field - ResourceLifecycleConfig *ApplicationResourceLifecycleConfig `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateApplicationResourceLifecycleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApplicationResourceLifecycleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApplicationResourceLifecycleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationResourceLifecycleInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.ResourceLifecycleConfig == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceLifecycleConfig")) - } - if s.ResourceLifecycleConfig != nil { - if err := s.ResourceLifecycleConfig.Validate(); err != nil { - invalidParams.AddNested("ResourceLifecycleConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *UpdateApplicationResourceLifecycleInput) SetApplicationName(v string) *UpdateApplicationResourceLifecycleInput { - s.ApplicationName = &v - return s -} - -// SetResourceLifecycleConfig sets the ResourceLifecycleConfig field's value. -func (s *UpdateApplicationResourceLifecycleInput) SetResourceLifecycleConfig(v *ApplicationResourceLifecycleConfig) *UpdateApplicationResourceLifecycleInput { - s.ResourceLifecycleConfig = v - return s -} - -type UpdateApplicationResourceLifecycleOutput struct { - _ struct{} `type:"structure"` - - // The name of the application. - ApplicationName *string `min:"1" type:"string"` - - // The lifecycle configuration. - ResourceLifecycleConfig *ApplicationResourceLifecycleConfig `type:"structure"` -} - -// String returns the string representation -func (s UpdateApplicationResourceLifecycleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApplicationResourceLifecycleOutput) GoString() string { - return s.String() -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *UpdateApplicationResourceLifecycleOutput) SetApplicationName(v string) *UpdateApplicationResourceLifecycleOutput { - s.ApplicationName = &v - return s -} - -// SetResourceLifecycleConfig sets the ResourceLifecycleConfig field's value. -func (s *UpdateApplicationResourceLifecycleOutput) SetResourceLifecycleConfig(v *ApplicationResourceLifecycleConfig) *UpdateApplicationResourceLifecycleOutput { - s.ResourceLifecycleConfig = v - return s -} - -type UpdateApplicationVersionInput struct { - _ struct{} `type:"structure"` - - // The name of the application associated with this version. - // - // If no application is found with this name, UpdateApplication returns an InvalidParameterValue - // error. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // A new description for this version. - Description *string `type:"string"` - - // The name of the version to update. - // - // If no application version is found with this label, UpdateApplication returns - // an InvalidParameterValue error. - // - // VersionLabel is a required field - VersionLabel *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateApplicationVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApplicationVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApplicationVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationVersionInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.VersionLabel == nil { - invalidParams.Add(request.NewErrParamRequired("VersionLabel")) - } - if s.VersionLabel != nil && len(*s.VersionLabel) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VersionLabel", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *UpdateApplicationVersionInput) SetApplicationName(v string) *UpdateApplicationVersionInput { - s.ApplicationName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateApplicationVersionInput) SetDescription(v string) *UpdateApplicationVersionInput { - s.Description = &v - return s -} - -// SetVersionLabel sets the VersionLabel field's value. -func (s *UpdateApplicationVersionInput) SetVersionLabel(v string) *UpdateApplicationVersionInput { - s.VersionLabel = &v - return s -} - -// The result message containing the options for the specified solution stack. -type UpdateConfigurationTemplateInput struct { - _ struct{} `type:"structure"` - - // The name of the application associated with the configuration template to - // update. - // - // If no application is found with this name, UpdateConfigurationTemplate returns - // an InvalidParameterValue error. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // A new description for the configuration. - Description *string `type:"string"` - - // A list of configuration option settings to update with the new specified - // option value. - OptionSettings []*ConfigurationOptionSetting `type:"list"` - - // A list of configuration options to remove from the configuration set. - // - // Constraint: You can remove only UserDefined configuration options. - OptionsToRemove []*OptionSpecification `type:"list"` - - // The name of the configuration template to update. - // - // If no configuration template is found with this name, UpdateConfigurationTemplate - // returns an InvalidParameterValue error. - // - // TemplateName is a required field - TemplateName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateConfigurationTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConfigurationTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateConfigurationTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateConfigurationTemplateInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.TemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateName")) - } - if s.TemplateName != nil && len(*s.TemplateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) - } - if s.OptionSettings != nil { - for i, v := range s.OptionSettings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionSettings", i), err.(request.ErrInvalidParams)) - } - } - } - if s.OptionsToRemove != nil { - for i, v := range s.OptionsToRemove { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionsToRemove", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *UpdateConfigurationTemplateInput) SetApplicationName(v string) *UpdateConfigurationTemplateInput { - s.ApplicationName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateConfigurationTemplateInput) SetDescription(v string) *UpdateConfigurationTemplateInput { - s.Description = &v - return s -} - -// SetOptionSettings sets the OptionSettings field's value. -func (s *UpdateConfigurationTemplateInput) SetOptionSettings(v []*ConfigurationOptionSetting) *UpdateConfigurationTemplateInput { - s.OptionSettings = v - return s -} - -// SetOptionsToRemove sets the OptionsToRemove field's value. -func (s *UpdateConfigurationTemplateInput) SetOptionsToRemove(v []*OptionSpecification) *UpdateConfigurationTemplateInput { - s.OptionsToRemove = v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *UpdateConfigurationTemplateInput) SetTemplateName(v string) *UpdateConfigurationTemplateInput { - s.TemplateName = &v - return s -} - -// Request to update an environment. -type UpdateEnvironmentInput struct { - _ struct{} `type:"structure"` - - // The name of the application with which the environment is associated. - ApplicationName *string `min:"1" type:"string"` - - // If this parameter is specified, AWS Elastic Beanstalk updates the description - // of this environment. - Description *string `type:"string"` - - // The ID of the environment to update. - // - // If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue - // error. - // - // Condition: You must specify either this or an EnvironmentName, or both. If - // you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentId *string `type:"string"` - - // The name of the environment to update. If no environment with this name exists, - // AWS Elastic Beanstalk returns an InvalidParameterValue error. - // - // Condition: You must specify either this or an EnvironmentId, or both. If - // you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter - // error. - EnvironmentName *string `min:"4" type:"string"` - - // The name of the group to which the target environment belongs. Specify a - // group name only if the environment's name is specified in an environment - // manifest and not with the environment name or environment ID parameters. - // See Environment Manifest (env.yaml) (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html) - // for details. - GroupName *string `min:"1" type:"string"` - - // If specified, AWS Elastic Beanstalk updates the configuration set associated - // with the running environment and sets the specified configuration options - // to the requested value. - OptionSettings []*ConfigurationOptionSetting `type:"list"` - - // A list of custom user-defined configuration options to remove from the configuration - // set for this environment. - OptionsToRemove []*OptionSpecification `type:"list"` - - // The ARN of the platform, if used. - PlatformArn *string `type:"string"` - - // This specifies the platform version that the environment will run after the - // environment is updated. - SolutionStackName *string `type:"string"` - - // If this parameter is specified, AWS Elastic Beanstalk deploys this configuration - // template to the environment. If no such configuration template is found, - // AWS Elastic Beanstalk returns an InvalidParameterValue error. - TemplateName *string `min:"1" type:"string"` - - // This specifies the tier to use to update the environment. - // - // Condition: At this time, if you change the tier version, name, or type, AWS - // Elastic Beanstalk returns InvalidParameterValue error. - Tier *EnvironmentTier `type:"structure"` - - // If this parameter is specified, AWS Elastic Beanstalk deploys the named application - // version to the environment. If no such application version is found, returns - // an InvalidParameterValue error. - VersionLabel *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateEnvironmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEnvironmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateEnvironmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateEnvironmentInput"} - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.TemplateName != nil && len(*s.TemplateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) - } - if s.VersionLabel != nil && len(*s.VersionLabel) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VersionLabel", 1)) - } - if s.OptionSettings != nil { - for i, v := range s.OptionSettings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionSettings", i), err.(request.ErrInvalidParams)) - } - } - } - if s.OptionsToRemove != nil { - for i, v := range s.OptionsToRemove { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionsToRemove", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *UpdateEnvironmentInput) SetApplicationName(v string) *UpdateEnvironmentInput { - s.ApplicationName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateEnvironmentInput) SetDescription(v string) *UpdateEnvironmentInput { - s.Description = &v - return s -} - -// SetEnvironmentId sets the EnvironmentId field's value. -func (s *UpdateEnvironmentInput) SetEnvironmentId(v string) *UpdateEnvironmentInput { - s.EnvironmentId = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *UpdateEnvironmentInput) SetEnvironmentName(v string) *UpdateEnvironmentInput { - s.EnvironmentName = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *UpdateEnvironmentInput) SetGroupName(v string) *UpdateEnvironmentInput { - s.GroupName = &v - return s -} - -// SetOptionSettings sets the OptionSettings field's value. -func (s *UpdateEnvironmentInput) SetOptionSettings(v []*ConfigurationOptionSetting) *UpdateEnvironmentInput { - s.OptionSettings = v - return s -} - -// SetOptionsToRemove sets the OptionsToRemove field's value. -func (s *UpdateEnvironmentInput) SetOptionsToRemove(v []*OptionSpecification) *UpdateEnvironmentInput { - s.OptionsToRemove = v - return s -} - -// SetPlatformArn sets the PlatformArn field's value. -func (s *UpdateEnvironmentInput) SetPlatformArn(v string) *UpdateEnvironmentInput { - s.PlatformArn = &v - return s -} - -// SetSolutionStackName sets the SolutionStackName field's value. -func (s *UpdateEnvironmentInput) SetSolutionStackName(v string) *UpdateEnvironmentInput { - s.SolutionStackName = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *UpdateEnvironmentInput) SetTemplateName(v string) *UpdateEnvironmentInput { - s.TemplateName = &v - return s -} - -// SetTier sets the Tier field's value. -func (s *UpdateEnvironmentInput) SetTier(v *EnvironmentTier) *UpdateEnvironmentInput { - s.Tier = v - return s -} - -// SetVersionLabel sets the VersionLabel field's value. -func (s *UpdateEnvironmentInput) SetVersionLabel(v string) *UpdateEnvironmentInput { - s.VersionLabel = &v - return s -} - -type UpdateTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resouce to be updated. - // - // Must be the ARN of an Elastic Beanstalk environment. - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` - - // A list of tags to add or update. - // - // If a key of an existing tag is added, the tag's value is updated. - TagsToAdd []*Tag `type:"list"` - - // A list of tag keys to remove. - // - // If a tag key doesn't exist, it is silently ignored. - TagsToRemove []*string `type:"list"` -} - -// String returns the string representation -func (s UpdateTagsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTagsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateTagsForResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.TagsToAdd != nil { - for i, v := range s.TagsToAdd { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsToAdd", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *UpdateTagsForResourceInput) SetResourceArn(v string) *UpdateTagsForResourceInput { - s.ResourceArn = &v - return s -} - -// SetTagsToAdd sets the TagsToAdd field's value. -func (s *UpdateTagsForResourceInput) SetTagsToAdd(v []*Tag) *UpdateTagsForResourceInput { - s.TagsToAdd = v - return s -} - -// SetTagsToRemove sets the TagsToRemove field's value. -func (s *UpdateTagsForResourceInput) SetTagsToRemove(v []*string) *UpdateTagsForResourceInput { - s.TagsToRemove = v - return s -} - -type UpdateTagsForResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTagsForResourceOutput) GoString() string { - return s.String() -} - -// A list of validation messages for a specified configuration template. -type ValidateConfigurationSettingsInput struct { - _ struct{} `type:"structure"` - - // The name of the application that the configuration template or environment - // belongs to. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // The name of the environment to validate the settings against. - // - // Condition: You cannot specify both this and a configuration template name. - EnvironmentName *string `min:"4" type:"string"` - - // A list of the options and desired values to evaluate. - // - // OptionSettings is a required field - OptionSettings []*ConfigurationOptionSetting `type:"list" required:"true"` - - // The name of the configuration template to validate the settings against. - // - // Condition: You cannot specify both this and an environment name. - TemplateName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ValidateConfigurationSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidateConfigurationSettingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ValidateConfigurationSettingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ValidateConfigurationSettingsInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) - } - if s.OptionSettings == nil { - invalidParams.Add(request.NewErrParamRequired("OptionSettings")) - } - if s.TemplateName != nil && len(*s.TemplateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) - } - if s.OptionSettings != nil { - for i, v := range s.OptionSettings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionSettings", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *ValidateConfigurationSettingsInput) SetApplicationName(v string) *ValidateConfigurationSettingsInput { - s.ApplicationName = &v - return s -} - -// SetEnvironmentName sets the EnvironmentName field's value. -func (s *ValidateConfigurationSettingsInput) SetEnvironmentName(v string) *ValidateConfigurationSettingsInput { - s.EnvironmentName = &v - return s -} - -// SetOptionSettings sets the OptionSettings field's value. -func (s *ValidateConfigurationSettingsInput) SetOptionSettings(v []*ConfigurationOptionSetting) *ValidateConfigurationSettingsInput { - s.OptionSettings = v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *ValidateConfigurationSettingsInput) SetTemplateName(v string) *ValidateConfigurationSettingsInput { - s.TemplateName = &v - return s -} - -// Provides a list of validation messages. -type ValidateConfigurationSettingsOutput struct { - _ struct{} `type:"structure"` - - // A list of ValidationMessage. - Messages []*ValidationMessage `type:"list"` -} - -// String returns the string representation -func (s ValidateConfigurationSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidateConfigurationSettingsOutput) GoString() string { - return s.String() -} - -// SetMessages sets the Messages field's value. -func (s *ValidateConfigurationSettingsOutput) SetMessages(v []*ValidationMessage) *ValidateConfigurationSettingsOutput { - s.Messages = v - return s -} - -// An error or warning for a desired configuration option value. -type ValidationMessage struct { - _ struct{} `type:"structure"` - - // A message describing the error or warning. - Message *string `type:"string"` - - // The namespace to which the option belongs. - Namespace *string `type:"string"` - - // The name of the option. - OptionName *string `type:"string"` - - // An indication of the severity of this message: - // - // * error: This message indicates that this is not a valid setting for an - // option. - // - // * warning: This message is providing information you should take into - // account. - Severity *string `type:"string" enum:"ValidationSeverity"` -} - -// String returns the string representation -func (s ValidationMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidationMessage) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *ValidationMessage) SetMessage(v string) *ValidationMessage { - s.Message = &v - return s -} - -// SetNamespace sets the Namespace field's value. -func (s *ValidationMessage) SetNamespace(v string) *ValidationMessage { - s.Namespace = &v - return s -} - -// SetOptionName sets the OptionName field's value. -func (s *ValidationMessage) SetOptionName(v string) *ValidationMessage { - s.OptionName = &v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *ValidationMessage) SetSeverity(v string) *ValidationMessage { - s.Severity = &v - return s -} - -const ( - // ActionHistoryStatusCompleted is a ActionHistoryStatus enum value - ActionHistoryStatusCompleted = "Completed" - - // ActionHistoryStatusFailed is a ActionHistoryStatus enum value - ActionHistoryStatusFailed = "Failed" - - // ActionHistoryStatusUnknown is a ActionHistoryStatus enum value - ActionHistoryStatusUnknown = "Unknown" -) - -const ( - // ActionStatusScheduled is a ActionStatus enum value - ActionStatusScheduled = "Scheduled" - - // ActionStatusPending is a ActionStatus enum value - ActionStatusPending = "Pending" - - // ActionStatusRunning is a ActionStatus enum value - ActionStatusRunning = "Running" - - // ActionStatusUnknown is a ActionStatus enum value - ActionStatusUnknown = "Unknown" -) - -const ( - // ActionTypeInstanceRefresh is a ActionType enum value - ActionTypeInstanceRefresh = "InstanceRefresh" - - // ActionTypePlatformUpdate is a ActionType enum value - ActionTypePlatformUpdate = "PlatformUpdate" - - // ActionTypeUnknown is a ActionType enum value - ActionTypeUnknown = "Unknown" -) - -const ( - // ApplicationVersionStatusProcessed is a ApplicationVersionStatus enum value - ApplicationVersionStatusProcessed = "Processed" - - // ApplicationVersionStatusUnprocessed is a ApplicationVersionStatus enum value - ApplicationVersionStatusUnprocessed = "Unprocessed" - - // ApplicationVersionStatusFailed is a ApplicationVersionStatus enum value - ApplicationVersionStatusFailed = "Failed" - - // ApplicationVersionStatusProcessing is a ApplicationVersionStatus enum value - ApplicationVersionStatusProcessing = "Processing" - - // ApplicationVersionStatusBuilding is a ApplicationVersionStatus enum value - ApplicationVersionStatusBuilding = "Building" -) - -const ( - // ComputeTypeBuildGeneral1Small is a ComputeType enum value - ComputeTypeBuildGeneral1Small = "BUILD_GENERAL1_SMALL" - - // ComputeTypeBuildGeneral1Medium is a ComputeType enum value - ComputeTypeBuildGeneral1Medium = "BUILD_GENERAL1_MEDIUM" - - // ComputeTypeBuildGeneral1Large is a ComputeType enum value - ComputeTypeBuildGeneral1Large = "BUILD_GENERAL1_LARGE" -) - -const ( - // ConfigurationDeploymentStatusDeployed is a ConfigurationDeploymentStatus enum value - ConfigurationDeploymentStatusDeployed = "deployed" - - // ConfigurationDeploymentStatusPending is a ConfigurationDeploymentStatus enum value - ConfigurationDeploymentStatusPending = "pending" - - // ConfigurationDeploymentStatusFailed is a ConfigurationDeploymentStatus enum value - ConfigurationDeploymentStatusFailed = "failed" -) - -const ( - // ConfigurationOptionValueTypeScalar is a ConfigurationOptionValueType enum value - ConfigurationOptionValueTypeScalar = "Scalar" - - // ConfigurationOptionValueTypeList is a ConfigurationOptionValueType enum value - ConfigurationOptionValueTypeList = "List" -) - -const ( - // EnvironmentHealthGreen is a EnvironmentHealth enum value - EnvironmentHealthGreen = "Green" - - // EnvironmentHealthYellow is a EnvironmentHealth enum value - EnvironmentHealthYellow = "Yellow" - - // EnvironmentHealthRed is a EnvironmentHealth enum value - EnvironmentHealthRed = "Red" - - // EnvironmentHealthGrey is a EnvironmentHealth enum value - EnvironmentHealthGrey = "Grey" -) - -const ( - // EnvironmentHealthAttributeStatus is a EnvironmentHealthAttribute enum value - EnvironmentHealthAttributeStatus = "Status" - - // EnvironmentHealthAttributeColor is a EnvironmentHealthAttribute enum value - EnvironmentHealthAttributeColor = "Color" - - // EnvironmentHealthAttributeCauses is a EnvironmentHealthAttribute enum value - EnvironmentHealthAttributeCauses = "Causes" - - // EnvironmentHealthAttributeApplicationMetrics is a EnvironmentHealthAttribute enum value - EnvironmentHealthAttributeApplicationMetrics = "ApplicationMetrics" - - // EnvironmentHealthAttributeInstancesHealth is a EnvironmentHealthAttribute enum value - EnvironmentHealthAttributeInstancesHealth = "InstancesHealth" - - // EnvironmentHealthAttributeAll is a EnvironmentHealthAttribute enum value - EnvironmentHealthAttributeAll = "All" - - // EnvironmentHealthAttributeHealthStatus is a EnvironmentHealthAttribute enum value - EnvironmentHealthAttributeHealthStatus = "HealthStatus" - - // EnvironmentHealthAttributeRefreshedAt is a EnvironmentHealthAttribute enum value - EnvironmentHealthAttributeRefreshedAt = "RefreshedAt" -) - -const ( - // EnvironmentHealthStatusNoData is a EnvironmentHealthStatus enum value - EnvironmentHealthStatusNoData = "NoData" - - // EnvironmentHealthStatusUnknown is a EnvironmentHealthStatus enum value - EnvironmentHealthStatusUnknown = "Unknown" - - // EnvironmentHealthStatusPending is a EnvironmentHealthStatus enum value - EnvironmentHealthStatusPending = "Pending" - - // EnvironmentHealthStatusOk is a EnvironmentHealthStatus enum value - EnvironmentHealthStatusOk = "Ok" - - // EnvironmentHealthStatusInfo is a EnvironmentHealthStatus enum value - EnvironmentHealthStatusInfo = "Info" - - // EnvironmentHealthStatusWarning is a EnvironmentHealthStatus enum value - EnvironmentHealthStatusWarning = "Warning" - - // EnvironmentHealthStatusDegraded is a EnvironmentHealthStatus enum value - EnvironmentHealthStatusDegraded = "Degraded" - - // EnvironmentHealthStatusSevere is a EnvironmentHealthStatus enum value - EnvironmentHealthStatusSevere = "Severe" - - // EnvironmentHealthStatusSuspended is a EnvironmentHealthStatus enum value - EnvironmentHealthStatusSuspended = "Suspended" -) - -const ( - // EnvironmentInfoTypeTail is a EnvironmentInfoType enum value - EnvironmentInfoTypeTail = "tail" - - // EnvironmentInfoTypeBundle is a EnvironmentInfoType enum value - EnvironmentInfoTypeBundle = "bundle" -) - -const ( - // EnvironmentStatusLaunching is a EnvironmentStatus enum value - EnvironmentStatusLaunching = "Launching" - - // EnvironmentStatusUpdating is a EnvironmentStatus enum value - EnvironmentStatusUpdating = "Updating" - - // EnvironmentStatusReady is a EnvironmentStatus enum value - EnvironmentStatusReady = "Ready" - - // EnvironmentStatusTerminating is a EnvironmentStatus enum value - EnvironmentStatusTerminating = "Terminating" - - // EnvironmentStatusTerminated is a EnvironmentStatus enum value - EnvironmentStatusTerminated = "Terminated" -) - -const ( - // EventSeverityTrace is a EventSeverity enum value - EventSeverityTrace = "TRACE" - - // EventSeverityDebug is a EventSeverity enum value - EventSeverityDebug = "DEBUG" - - // EventSeverityInfo is a EventSeverity enum value - EventSeverityInfo = "INFO" - - // EventSeverityWarn is a EventSeverity enum value - EventSeverityWarn = "WARN" - - // EventSeverityError is a EventSeverity enum value - EventSeverityError = "ERROR" - - // EventSeverityFatal is a EventSeverity enum value - EventSeverityFatal = "FATAL" -) - -const ( - // FailureTypeUpdateCancelled is a FailureType enum value - FailureTypeUpdateCancelled = "UpdateCancelled" - - // FailureTypeCancellationFailed is a FailureType enum value - FailureTypeCancellationFailed = "CancellationFailed" - - // FailureTypeRollbackFailed is a FailureType enum value - FailureTypeRollbackFailed = "RollbackFailed" - - // FailureTypeRollbackSuccessful is a FailureType enum value - FailureTypeRollbackSuccessful = "RollbackSuccessful" - - // FailureTypeInternalFailure is a FailureType enum value - FailureTypeInternalFailure = "InternalFailure" - - // FailureTypeInvalidEnvironmentState is a FailureType enum value - FailureTypeInvalidEnvironmentState = "InvalidEnvironmentState" - - // FailureTypePermissionsError is a FailureType enum value - FailureTypePermissionsError = "PermissionsError" -) - -const ( - // InstancesHealthAttributeHealthStatus is a InstancesHealthAttribute enum value - InstancesHealthAttributeHealthStatus = "HealthStatus" - - // InstancesHealthAttributeColor is a InstancesHealthAttribute enum value - InstancesHealthAttributeColor = "Color" - - // InstancesHealthAttributeCauses is a InstancesHealthAttribute enum value - InstancesHealthAttributeCauses = "Causes" - - // InstancesHealthAttributeApplicationMetrics is a InstancesHealthAttribute enum value - InstancesHealthAttributeApplicationMetrics = "ApplicationMetrics" - - // InstancesHealthAttributeRefreshedAt is a InstancesHealthAttribute enum value - InstancesHealthAttributeRefreshedAt = "RefreshedAt" - - // InstancesHealthAttributeLaunchedAt is a InstancesHealthAttribute enum value - InstancesHealthAttributeLaunchedAt = "LaunchedAt" - - // InstancesHealthAttributeSystem is a InstancesHealthAttribute enum value - InstancesHealthAttributeSystem = "System" - - // InstancesHealthAttributeDeployment is a InstancesHealthAttribute enum value - InstancesHealthAttributeDeployment = "Deployment" - - // InstancesHealthAttributeAvailabilityZone is a InstancesHealthAttribute enum value - InstancesHealthAttributeAvailabilityZone = "AvailabilityZone" - - // InstancesHealthAttributeInstanceType is a InstancesHealthAttribute enum value - InstancesHealthAttributeInstanceType = "InstanceType" - - // InstancesHealthAttributeAll is a InstancesHealthAttribute enum value - InstancesHealthAttributeAll = "All" -) - -const ( - // PlatformStatusCreating is a PlatformStatus enum value - PlatformStatusCreating = "Creating" - - // PlatformStatusFailed is a PlatformStatus enum value - PlatformStatusFailed = "Failed" - - // PlatformStatusReady is a PlatformStatus enum value - PlatformStatusReady = "Ready" - - // PlatformStatusDeleting is a PlatformStatus enum value - PlatformStatusDeleting = "Deleting" - - // PlatformStatusDeleted is a PlatformStatus enum value - PlatformStatusDeleted = "Deleted" -) - -const ( - // SourceRepositoryCodeCommit is a SourceRepository enum value - SourceRepositoryCodeCommit = "CodeCommit" - - // SourceRepositoryS3 is a SourceRepository enum value - SourceRepositoryS3 = "S3" -) - -const ( - // SourceTypeGit is a SourceType enum value - SourceTypeGit = "Git" - - // SourceTypeZip is a SourceType enum value - SourceTypeZip = "Zip" -) - -const ( - // ValidationSeverityError is a ValidationSeverity enum value - ValidationSeverityError = "error" - - // ValidationSeverityWarning is a ValidationSeverity enum value - ValidationSeverityWarning = "warning" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/doc.go deleted file mode 100644 index cab013a58..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/doc.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package elasticbeanstalk provides the client and types for making API -// requests to AWS Elastic Beanstalk. -// -// AWS Elastic Beanstalk makes it easy for you to create, deploy, and manage -// scalable, fault-tolerant applications running on the Amazon Web Services -// cloud. -// -// For more information about this product, go to the AWS Elastic Beanstalk -// (http://aws.amazon.com/elasticbeanstalk/) details page. The location of the -// latest AWS Elastic Beanstalk WSDL is http://elasticbeanstalk.s3.amazonaws.com/doc/2010-12-01/AWSElasticBeanstalk.wsdl -// (http://elasticbeanstalk.s3.amazonaws.com/doc/2010-12-01/AWSElasticBeanstalk.wsdl). -// To install the Software Development Kits (SDKs), Integrated Development Environment -// (IDE) Toolkits, and command line tools that enable you to access the API, -// go to Tools for Amazon Web Services (http://aws.amazon.com/tools/). -// -// Endpoints -// -// For a list of region-specific endpoints that AWS Elastic Beanstalk supports, -// go to Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region) -// in the Amazon Web Services Glossary. -// -// See https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01 for more information on this service. -// -// See elasticbeanstalk package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elasticbeanstalk/ -// -// Using the Client -// -// To contact AWS Elastic Beanstalk 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 Elastic Beanstalk client ElasticBeanstalk for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elasticbeanstalk/#New -package elasticbeanstalk diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go deleted file mode 100644 index d13041287..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elasticbeanstalk - -const ( - - // ErrCodeCodeBuildNotInServiceRegionException for service response error code - // "CodeBuildNotInServiceRegionException". - // - // AWS CodeBuild is not available in the specified region. - ErrCodeCodeBuildNotInServiceRegionException = "CodeBuildNotInServiceRegionException" - - // ErrCodeInsufficientPrivilegesException for service response error code - // "InsufficientPrivilegesException". - // - // The specified account does not have sufficient privileges for one or more - // AWS services. - ErrCodeInsufficientPrivilegesException = "InsufficientPrivilegesException" - - // ErrCodeInvalidRequestException for service response error code - // "InvalidRequestException". - // - // One or more input parameters is not valid. Please correct the input parameters - // and try the operation again. - ErrCodeInvalidRequestException = "InvalidRequestException" - - // ErrCodeManagedActionInvalidStateException for service response error code - // "ManagedActionInvalidStateException". - // - // Cannot modify the managed action in its current state. - ErrCodeManagedActionInvalidStateException = "ManagedActionInvalidStateException" - - // ErrCodeOperationInProgressException for service response error code - // "OperationInProgressFailure". - // - // Unable to perform the specified operation because another operation that - // effects an element in this activity is already in progress. - ErrCodeOperationInProgressException = "OperationInProgressFailure" - - // ErrCodePlatformVersionStillReferencedException for service response error code - // "PlatformVersionStillReferencedException". - // - // You cannot delete the platform version because there are still environments - // running on it. - ErrCodePlatformVersionStillReferencedException = "PlatformVersionStillReferencedException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // A resource doesn't exist for the specified Amazon Resource Name (ARN). - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeResourceTypeNotSupportedException for service response error code - // "ResourceTypeNotSupportedException". - // - // The type of the specified Amazon Resource Name (ARN) isn't supported for - // this operation. - ErrCodeResourceTypeNotSupportedException = "ResourceTypeNotSupportedException" - - // ErrCodeS3LocationNotInServiceRegionException for service response error code - // "S3LocationNotInServiceRegionException". - // - // The specified S3 bucket does not belong to the S3 region in which the service - // is running. The following regions are supported: - // - // * IAD/us-east-1 - // - // * PDX/us-west-2 - // - // * DUB/eu-west-1 - ErrCodeS3LocationNotInServiceRegionException = "S3LocationNotInServiceRegionException" - - // ErrCodeS3SubscriptionRequiredException for service response error code - // "S3SubscriptionRequiredException". - // - // The specified account does not have a subscription to Amazon S3. - ErrCodeS3SubscriptionRequiredException = "S3SubscriptionRequiredException" - - // ErrCodeServiceException for service response error code - // "ElasticBeanstalkServiceException". - // - // A generic service exception has occurred. - ErrCodeServiceException = "ElasticBeanstalkServiceException" - - // ErrCodeSourceBundleDeletionException for service response error code - // "SourceBundleDeletionFailure". - // - // Unable to delete the Amazon S3 source bundle associated with the application - // version. The application version was deleted successfully. - ErrCodeSourceBundleDeletionException = "SourceBundleDeletionFailure" - - // ErrCodeTooManyApplicationVersionsException for service response error code - // "TooManyApplicationVersionsException". - // - // The specified account has reached its limit of application versions. - ErrCodeTooManyApplicationVersionsException = "TooManyApplicationVersionsException" - - // ErrCodeTooManyApplicationsException for service response error code - // "TooManyApplicationsException". - // - // The specified account has reached its limit of applications. - ErrCodeTooManyApplicationsException = "TooManyApplicationsException" - - // ErrCodeTooManyBucketsException for service response error code - // "TooManyBucketsException". - // - // The specified account has reached its limit of Amazon S3 buckets. - ErrCodeTooManyBucketsException = "TooManyBucketsException" - - // ErrCodeTooManyConfigurationTemplatesException for service response error code - // "TooManyConfigurationTemplatesException". - // - // The specified account has reached its limit of configuration templates. - ErrCodeTooManyConfigurationTemplatesException = "TooManyConfigurationTemplatesException" - - // ErrCodeTooManyEnvironmentsException for service response error code - // "TooManyEnvironmentsException". - // - // The specified account has reached its limit of environments. - ErrCodeTooManyEnvironmentsException = "TooManyEnvironmentsException" - - // ErrCodeTooManyPlatformsException for service response error code - // "TooManyPlatformsException". - // - // You have exceeded the maximum number of allowed platforms associated with - // the account. - ErrCodeTooManyPlatformsException = "TooManyPlatformsException" - - // ErrCodeTooManyTagsException for service response error code - // "TooManyTagsException". - // - // The number of tags in the resource would exceed the number of tags that each - // resource can have. - // - // To calculate this, the operation considers both the number of tags the resource - // already has and the tags this operation would add if it succeeded. - ErrCodeTooManyTagsException = "TooManyTagsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go deleted file mode 100644 index 12e8b1c81..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elasticbeanstalk - -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/query" -) - -// ElasticBeanstalk provides the API operation methods for making requests to -// AWS Elastic Beanstalk. See this package's package overview docs -// for details on the service. -// -// ElasticBeanstalk methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ElasticBeanstalk 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 = "elasticbeanstalk" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Elastic Beanstalk" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ElasticBeanstalk client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a ElasticBeanstalk client from just a session. -// svc := elasticbeanstalk.New(mySession) -// -// // Create a ElasticBeanstalk client with additional configuration -// svc := elasticbeanstalk.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ElasticBeanstalk { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ElasticBeanstalk { - svc := &ElasticBeanstalk{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2010-12-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ElasticBeanstalk operation and runs any -// custom request initialization. -func (c *ElasticBeanstalk) 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/elasticsearchservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go deleted file mode 100644 index 611b16d86..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go +++ /dev/null @@ -1,6673 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elasticsearchservice - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opAddTags = "AddTags" - -// AddTagsRequest generates a "aws/request.Request" representing the -// client's request for the AddTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTags for more information on using the AddTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsRequest method. -// req, resp := client.AddTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) { - op := &request.Operation{ - Name: opAddTags, - HTTPMethod: "POST", - HTTPPath: "/2015-01-01/tags", - } - - if input == nil { - input = &AddTagsInput{} - } - - output = &AddTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTags API operation for Amazon Elasticsearch Service. -// -// Attaches tags to an existing Elasticsearch domain. Tags are a set of case-sensitive -// key value pairs. An Elasticsearch domain may have up to 10 tags. See Tagging -// Amazon Elasticsearch Service Domains for more information. (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-managedomains.html#es-managedomains-awsresorcetagging) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation AddTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// An exception for trying to create more than allowed resources or sub-resources. -// Gives http status code of 409. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -func (c *ElasticsearchService) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - return out, req.Send() -} - -// AddTagsWithContext is the same as AddTags with the addition of -// the ability to pass a context and additional request options. -// -// See AddTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelElasticsearchServiceSoftwareUpdate = "CancelElasticsearchServiceSoftwareUpdate" - -// CancelElasticsearchServiceSoftwareUpdateRequest generates a "aws/request.Request" representing the -// client's request for the CancelElasticsearchServiceSoftwareUpdate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelElasticsearchServiceSoftwareUpdate for more information on using the CancelElasticsearchServiceSoftwareUpdate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelElasticsearchServiceSoftwareUpdateRequest method. -// req, resp := client.CancelElasticsearchServiceSoftwareUpdateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) CancelElasticsearchServiceSoftwareUpdateRequest(input *CancelElasticsearchServiceSoftwareUpdateInput) (req *request.Request, output *CancelElasticsearchServiceSoftwareUpdateOutput) { - op := &request.Operation{ - Name: opCancelElasticsearchServiceSoftwareUpdate, - HTTPMethod: "POST", - HTTPPath: "/2015-01-01/es/serviceSoftwareUpdate/cancel", - } - - if input == nil { - input = &CancelElasticsearchServiceSoftwareUpdateInput{} - } - - output = &CancelElasticsearchServiceSoftwareUpdateOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelElasticsearchServiceSoftwareUpdate API operation for Amazon Elasticsearch Service. -// -// Cancels a scheduled service software update for an Amazon ES domain. You -// can only perform this operation before the AutomatedUpdateDate and when the -// UpdateStatus is in the PENDING_UPDATE state. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation CancelElasticsearchServiceSoftwareUpdate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -func (c *ElasticsearchService) CancelElasticsearchServiceSoftwareUpdate(input *CancelElasticsearchServiceSoftwareUpdateInput) (*CancelElasticsearchServiceSoftwareUpdateOutput, error) { - req, out := c.CancelElasticsearchServiceSoftwareUpdateRequest(input) - return out, req.Send() -} - -// CancelElasticsearchServiceSoftwareUpdateWithContext is the same as CancelElasticsearchServiceSoftwareUpdate with the addition of -// the ability to pass a context and additional request options. -// -// See CancelElasticsearchServiceSoftwareUpdate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) CancelElasticsearchServiceSoftwareUpdateWithContext(ctx aws.Context, input *CancelElasticsearchServiceSoftwareUpdateInput, opts ...request.Option) (*CancelElasticsearchServiceSoftwareUpdateOutput, error) { - req, out := c.CancelElasticsearchServiceSoftwareUpdateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateElasticsearchDomain = "CreateElasticsearchDomain" - -// CreateElasticsearchDomainRequest generates a "aws/request.Request" representing the -// client's request for the CreateElasticsearchDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateElasticsearchDomain for more information on using the CreateElasticsearchDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateElasticsearchDomainRequest method. -// req, resp := client.CreateElasticsearchDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) CreateElasticsearchDomainRequest(input *CreateElasticsearchDomainInput) (req *request.Request, output *CreateElasticsearchDomainOutput) { - op := &request.Operation{ - Name: opCreateElasticsearchDomain, - HTTPMethod: "POST", - HTTPPath: "/2015-01-01/es/domain", - } - - if input == nil { - input = &CreateElasticsearchDomainInput{} - } - - output = &CreateElasticsearchDomainOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateElasticsearchDomain API operation for Amazon Elasticsearch Service. -// -// Creates a new Elasticsearch domain. For more information, see Creating Elasticsearch -// Domains (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomains) -// in the Amazon Elasticsearch Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation CreateElasticsearchDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeDisabledOperationException "DisabledOperationException" -// An error occured because the client wanted to access a not supported operation. -// Gives http status code of 409. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -// * ErrCodeInvalidTypeException "InvalidTypeException" -// An exception for trying to create or access sub-resource that is either invalid -// or not supported. Gives http status code of 409. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// An exception for trying to create more than allowed resources or sub-resources. -// Gives http status code of 409. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// An exception for creating a resource that already exists. Gives http status -// code of 400. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -func (c *ElasticsearchService) CreateElasticsearchDomain(input *CreateElasticsearchDomainInput) (*CreateElasticsearchDomainOutput, error) { - req, out := c.CreateElasticsearchDomainRequest(input) - return out, req.Send() -} - -// CreateElasticsearchDomainWithContext is the same as CreateElasticsearchDomain with the addition of -// the ability to pass a context and additional request options. -// -// See CreateElasticsearchDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) CreateElasticsearchDomainWithContext(ctx aws.Context, input *CreateElasticsearchDomainInput, opts ...request.Option) (*CreateElasticsearchDomainOutput, error) { - req, out := c.CreateElasticsearchDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteElasticsearchDomain = "DeleteElasticsearchDomain" - -// DeleteElasticsearchDomainRequest generates a "aws/request.Request" representing the -// client's request for the DeleteElasticsearchDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteElasticsearchDomain for more information on using the DeleteElasticsearchDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteElasticsearchDomainRequest method. -// req, resp := client.DeleteElasticsearchDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) DeleteElasticsearchDomainRequest(input *DeleteElasticsearchDomainInput) (req *request.Request, output *DeleteElasticsearchDomainOutput) { - op := &request.Operation{ - Name: opDeleteElasticsearchDomain, - HTTPMethod: "DELETE", - HTTPPath: "/2015-01-01/es/domain/{DomainName}", - } - - if input == nil { - input = &DeleteElasticsearchDomainInput{} - } - - output = &DeleteElasticsearchDomainOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteElasticsearchDomain API operation for Amazon Elasticsearch Service. -// -// Permanently deletes the specified Elasticsearch domain and all of its data. -// Once a domain is deleted, it cannot be recovered. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation DeleteElasticsearchDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -func (c *ElasticsearchService) DeleteElasticsearchDomain(input *DeleteElasticsearchDomainInput) (*DeleteElasticsearchDomainOutput, error) { - req, out := c.DeleteElasticsearchDomainRequest(input) - return out, req.Send() -} - -// DeleteElasticsearchDomainWithContext is the same as DeleteElasticsearchDomain with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteElasticsearchDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) DeleteElasticsearchDomainWithContext(ctx aws.Context, input *DeleteElasticsearchDomainInput, opts ...request.Option) (*DeleteElasticsearchDomainOutput, error) { - req, out := c.DeleteElasticsearchDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteElasticsearchServiceRole = "DeleteElasticsearchServiceRole" - -// DeleteElasticsearchServiceRoleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteElasticsearchServiceRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteElasticsearchServiceRole for more information on using the DeleteElasticsearchServiceRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteElasticsearchServiceRoleRequest method. -// req, resp := client.DeleteElasticsearchServiceRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) DeleteElasticsearchServiceRoleRequest(input *DeleteElasticsearchServiceRoleInput) (req *request.Request, output *DeleteElasticsearchServiceRoleOutput) { - op := &request.Operation{ - Name: opDeleteElasticsearchServiceRole, - HTTPMethod: "DELETE", - HTTPPath: "/2015-01-01/es/role", - } - - if input == nil { - input = &DeleteElasticsearchServiceRoleInput{} - } - - output = &DeleteElasticsearchServiceRoleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteElasticsearchServiceRole API operation for Amazon Elasticsearch Service. -// -// Deletes the service-linked role that Elasticsearch Service uses to manage -// and maintain VPC domains. Role deletion will fail if any existing VPC domains -// use the role. You must delete any such Elasticsearch domains before deleting -// the role. See Deleting Elasticsearch Service Role (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-enabling-slr) -// in VPC Endpoints for Amazon Elasticsearch Service Domains. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation DeleteElasticsearchServiceRole for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -func (c *ElasticsearchService) DeleteElasticsearchServiceRole(input *DeleteElasticsearchServiceRoleInput) (*DeleteElasticsearchServiceRoleOutput, error) { - req, out := c.DeleteElasticsearchServiceRoleRequest(input) - return out, req.Send() -} - -// DeleteElasticsearchServiceRoleWithContext is the same as DeleteElasticsearchServiceRole with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteElasticsearchServiceRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) DeleteElasticsearchServiceRoleWithContext(ctx aws.Context, input *DeleteElasticsearchServiceRoleInput, opts ...request.Option) (*DeleteElasticsearchServiceRoleOutput, error) { - req, out := c.DeleteElasticsearchServiceRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeElasticsearchDomain = "DescribeElasticsearchDomain" - -// DescribeElasticsearchDomainRequest generates a "aws/request.Request" representing the -// client's request for the DescribeElasticsearchDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeElasticsearchDomain for more information on using the DescribeElasticsearchDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeElasticsearchDomainRequest method. -// req, resp := client.DescribeElasticsearchDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) DescribeElasticsearchDomainRequest(input *DescribeElasticsearchDomainInput) (req *request.Request, output *DescribeElasticsearchDomainOutput) { - op := &request.Operation{ - Name: opDescribeElasticsearchDomain, - HTTPMethod: "GET", - HTTPPath: "/2015-01-01/es/domain/{DomainName}", - } - - if input == nil { - input = &DescribeElasticsearchDomainInput{} - } - - output = &DescribeElasticsearchDomainOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeElasticsearchDomain API operation for Amazon Elasticsearch Service. -// -// Returns domain configuration information about the specified Elasticsearch -// domain, including the domain ID, domain endpoint, and domain 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 Amazon Elasticsearch Service's -// API operation DescribeElasticsearchDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -func (c *ElasticsearchService) DescribeElasticsearchDomain(input *DescribeElasticsearchDomainInput) (*DescribeElasticsearchDomainOutput, error) { - req, out := c.DescribeElasticsearchDomainRequest(input) - return out, req.Send() -} - -// DescribeElasticsearchDomainWithContext is the same as DescribeElasticsearchDomain with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeElasticsearchDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) DescribeElasticsearchDomainWithContext(ctx aws.Context, input *DescribeElasticsearchDomainInput, opts ...request.Option) (*DescribeElasticsearchDomainOutput, error) { - req, out := c.DescribeElasticsearchDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeElasticsearchDomainConfig = "DescribeElasticsearchDomainConfig" - -// DescribeElasticsearchDomainConfigRequest generates a "aws/request.Request" representing the -// client's request for the DescribeElasticsearchDomainConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeElasticsearchDomainConfig for more information on using the DescribeElasticsearchDomainConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeElasticsearchDomainConfigRequest method. -// req, resp := client.DescribeElasticsearchDomainConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) DescribeElasticsearchDomainConfigRequest(input *DescribeElasticsearchDomainConfigInput) (req *request.Request, output *DescribeElasticsearchDomainConfigOutput) { - op := &request.Operation{ - Name: opDescribeElasticsearchDomainConfig, - HTTPMethod: "GET", - HTTPPath: "/2015-01-01/es/domain/{DomainName}/config", - } - - if input == nil { - input = &DescribeElasticsearchDomainConfigInput{} - } - - output = &DescribeElasticsearchDomainConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeElasticsearchDomainConfig API operation for Amazon Elasticsearch Service. -// -// Provides cluster configuration information about the specified Elasticsearch -// domain, such as the state, creation date, update version, and update date -// for cluster options. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation DescribeElasticsearchDomainConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -func (c *ElasticsearchService) DescribeElasticsearchDomainConfig(input *DescribeElasticsearchDomainConfigInput) (*DescribeElasticsearchDomainConfigOutput, error) { - req, out := c.DescribeElasticsearchDomainConfigRequest(input) - return out, req.Send() -} - -// DescribeElasticsearchDomainConfigWithContext is the same as DescribeElasticsearchDomainConfig with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeElasticsearchDomainConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) DescribeElasticsearchDomainConfigWithContext(ctx aws.Context, input *DescribeElasticsearchDomainConfigInput, opts ...request.Option) (*DescribeElasticsearchDomainConfigOutput, error) { - req, out := c.DescribeElasticsearchDomainConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeElasticsearchDomains = "DescribeElasticsearchDomains" - -// DescribeElasticsearchDomainsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeElasticsearchDomains operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeElasticsearchDomains for more information on using the DescribeElasticsearchDomains -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeElasticsearchDomainsRequest method. -// req, resp := client.DescribeElasticsearchDomainsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) DescribeElasticsearchDomainsRequest(input *DescribeElasticsearchDomainsInput) (req *request.Request, output *DescribeElasticsearchDomainsOutput) { - op := &request.Operation{ - Name: opDescribeElasticsearchDomains, - HTTPMethod: "POST", - HTTPPath: "/2015-01-01/es/domain-info", - } - - if input == nil { - input = &DescribeElasticsearchDomainsInput{} - } - - output = &DescribeElasticsearchDomainsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeElasticsearchDomains API operation for Amazon Elasticsearch Service. -// -// Returns domain configuration information about the specified Elasticsearch -// domains, including the domain ID, domain endpoint, and domain 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 Amazon Elasticsearch Service's -// API operation DescribeElasticsearchDomains for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -func (c *ElasticsearchService) DescribeElasticsearchDomains(input *DescribeElasticsearchDomainsInput) (*DescribeElasticsearchDomainsOutput, error) { - req, out := c.DescribeElasticsearchDomainsRequest(input) - return out, req.Send() -} - -// DescribeElasticsearchDomainsWithContext is the same as DescribeElasticsearchDomains with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeElasticsearchDomains for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) DescribeElasticsearchDomainsWithContext(ctx aws.Context, input *DescribeElasticsearchDomainsInput, opts ...request.Option) (*DescribeElasticsearchDomainsOutput, error) { - req, out := c.DescribeElasticsearchDomainsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeElasticsearchInstanceTypeLimits = "DescribeElasticsearchInstanceTypeLimits" - -// DescribeElasticsearchInstanceTypeLimitsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeElasticsearchInstanceTypeLimits operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeElasticsearchInstanceTypeLimits for more information on using the DescribeElasticsearchInstanceTypeLimits -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeElasticsearchInstanceTypeLimitsRequest method. -// req, resp := client.DescribeElasticsearchInstanceTypeLimitsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) DescribeElasticsearchInstanceTypeLimitsRequest(input *DescribeElasticsearchInstanceTypeLimitsInput) (req *request.Request, output *DescribeElasticsearchInstanceTypeLimitsOutput) { - op := &request.Operation{ - Name: opDescribeElasticsearchInstanceTypeLimits, - HTTPMethod: "GET", - HTTPPath: "/2015-01-01/es/instanceTypeLimits/{ElasticsearchVersion}/{InstanceType}", - } - - if input == nil { - input = &DescribeElasticsearchInstanceTypeLimitsInput{} - } - - output = &DescribeElasticsearchInstanceTypeLimitsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeElasticsearchInstanceTypeLimits API operation for Amazon Elasticsearch Service. -// -// Describe Elasticsearch Limits for a given InstanceType and ElasticsearchVersion. -// When modifying existing Domain, specify the DomainName to know what Limits -// are supported for modifying. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation DescribeElasticsearchInstanceTypeLimits for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -// * ErrCodeInvalidTypeException "InvalidTypeException" -// An exception for trying to create or access sub-resource that is either invalid -// or not supported. Gives http status code of 409. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// An exception for trying to create more than allowed resources or sub-resources. -// Gives http status code of 409. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -func (c *ElasticsearchService) DescribeElasticsearchInstanceTypeLimits(input *DescribeElasticsearchInstanceTypeLimitsInput) (*DescribeElasticsearchInstanceTypeLimitsOutput, error) { - req, out := c.DescribeElasticsearchInstanceTypeLimitsRequest(input) - return out, req.Send() -} - -// DescribeElasticsearchInstanceTypeLimitsWithContext is the same as DescribeElasticsearchInstanceTypeLimits with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeElasticsearchInstanceTypeLimits for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) DescribeElasticsearchInstanceTypeLimitsWithContext(ctx aws.Context, input *DescribeElasticsearchInstanceTypeLimitsInput, opts ...request.Option) (*DescribeElasticsearchInstanceTypeLimitsOutput, error) { - req, out := c.DescribeElasticsearchInstanceTypeLimitsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeReservedElasticsearchInstanceOfferings = "DescribeReservedElasticsearchInstanceOfferings" - -// DescribeReservedElasticsearchInstanceOfferingsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservedElasticsearchInstanceOfferings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReservedElasticsearchInstanceOfferings for more information on using the DescribeReservedElasticsearchInstanceOfferings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReservedElasticsearchInstanceOfferingsRequest method. -// req, resp := client.DescribeReservedElasticsearchInstanceOfferingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsRequest(input *DescribeReservedElasticsearchInstanceOfferingsInput) (req *request.Request, output *DescribeReservedElasticsearchInstanceOfferingsOutput) { - op := &request.Operation{ - Name: opDescribeReservedElasticsearchInstanceOfferings, - HTTPMethod: "GET", - HTTPPath: "/2015-01-01/es/reservedInstanceOfferings", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReservedElasticsearchInstanceOfferingsInput{} - } - - output = &DescribeReservedElasticsearchInstanceOfferingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReservedElasticsearchInstanceOfferings API operation for Amazon Elasticsearch Service. -// -// Lists available reserved Elasticsearch instance offerings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation DescribeReservedElasticsearchInstanceOfferings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -// * ErrCodeDisabledOperationException "DisabledOperationException" -// An error occured because the client wanted to access a not supported operation. -// Gives http status code of 409. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferings(input *DescribeReservedElasticsearchInstanceOfferingsInput) (*DescribeReservedElasticsearchInstanceOfferingsOutput, error) { - req, out := c.DescribeReservedElasticsearchInstanceOfferingsRequest(input) - return out, req.Send() -} - -// DescribeReservedElasticsearchInstanceOfferingsWithContext is the same as DescribeReservedElasticsearchInstanceOfferings with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReservedElasticsearchInstanceOfferings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsWithContext(ctx aws.Context, input *DescribeReservedElasticsearchInstanceOfferingsInput, opts ...request.Option) (*DescribeReservedElasticsearchInstanceOfferingsOutput, error) { - req, out := c.DescribeReservedElasticsearchInstanceOfferingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReservedElasticsearchInstanceOfferingsPages iterates over the pages of a DescribeReservedElasticsearchInstanceOfferings operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReservedElasticsearchInstanceOfferings method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeReservedElasticsearchInstanceOfferings operation. -// pageNum := 0 -// err := client.DescribeReservedElasticsearchInstanceOfferingsPages(params, -// func(page *DescribeReservedElasticsearchInstanceOfferingsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsPages(input *DescribeReservedElasticsearchInstanceOfferingsInput, fn func(*DescribeReservedElasticsearchInstanceOfferingsOutput, bool) bool) error { - return c.DescribeReservedElasticsearchInstanceOfferingsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReservedElasticsearchInstanceOfferingsPagesWithContext same as DescribeReservedElasticsearchInstanceOfferingsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsPagesWithContext(ctx aws.Context, input *DescribeReservedElasticsearchInstanceOfferingsInput, fn func(*DescribeReservedElasticsearchInstanceOfferingsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReservedElasticsearchInstanceOfferingsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReservedElasticsearchInstanceOfferingsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedElasticsearchInstanceOfferingsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeReservedElasticsearchInstances = "DescribeReservedElasticsearchInstances" - -// DescribeReservedElasticsearchInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservedElasticsearchInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReservedElasticsearchInstances for more information on using the DescribeReservedElasticsearchInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReservedElasticsearchInstancesRequest method. -// req, resp := client.DescribeReservedElasticsearchInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) DescribeReservedElasticsearchInstancesRequest(input *DescribeReservedElasticsearchInstancesInput) (req *request.Request, output *DescribeReservedElasticsearchInstancesOutput) { - op := &request.Operation{ - Name: opDescribeReservedElasticsearchInstances, - HTTPMethod: "GET", - HTTPPath: "/2015-01-01/es/reservedInstances", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReservedElasticsearchInstancesInput{} - } - - output = &DescribeReservedElasticsearchInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReservedElasticsearchInstances API operation for Amazon Elasticsearch Service. -// -// Returns information about reserved Elasticsearch instances for this account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation DescribeReservedElasticsearchInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -// * ErrCodeDisabledOperationException "DisabledOperationException" -// An error occured because the client wanted to access a not supported operation. -// Gives http status code of 409. -// -func (c *ElasticsearchService) DescribeReservedElasticsearchInstances(input *DescribeReservedElasticsearchInstancesInput) (*DescribeReservedElasticsearchInstancesOutput, error) { - req, out := c.DescribeReservedElasticsearchInstancesRequest(input) - return out, req.Send() -} - -// DescribeReservedElasticsearchInstancesWithContext is the same as DescribeReservedElasticsearchInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReservedElasticsearchInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) DescribeReservedElasticsearchInstancesWithContext(ctx aws.Context, input *DescribeReservedElasticsearchInstancesInput, opts ...request.Option) (*DescribeReservedElasticsearchInstancesOutput, error) { - req, out := c.DescribeReservedElasticsearchInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReservedElasticsearchInstancesPages iterates over the pages of a DescribeReservedElasticsearchInstances operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReservedElasticsearchInstances method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeReservedElasticsearchInstances operation. -// pageNum := 0 -// err := client.DescribeReservedElasticsearchInstancesPages(params, -// func(page *DescribeReservedElasticsearchInstancesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElasticsearchService) DescribeReservedElasticsearchInstancesPages(input *DescribeReservedElasticsearchInstancesInput, fn func(*DescribeReservedElasticsearchInstancesOutput, bool) bool) error { - return c.DescribeReservedElasticsearchInstancesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReservedElasticsearchInstancesPagesWithContext same as DescribeReservedElasticsearchInstancesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) DescribeReservedElasticsearchInstancesPagesWithContext(ctx aws.Context, input *DescribeReservedElasticsearchInstancesInput, fn func(*DescribeReservedElasticsearchInstancesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReservedElasticsearchInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReservedElasticsearchInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedElasticsearchInstancesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetCompatibleElasticsearchVersions = "GetCompatibleElasticsearchVersions" - -// GetCompatibleElasticsearchVersionsRequest generates a "aws/request.Request" representing the -// client's request for the GetCompatibleElasticsearchVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCompatibleElasticsearchVersions for more information on using the GetCompatibleElasticsearchVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCompatibleElasticsearchVersionsRequest method. -// req, resp := client.GetCompatibleElasticsearchVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) GetCompatibleElasticsearchVersionsRequest(input *GetCompatibleElasticsearchVersionsInput) (req *request.Request, output *GetCompatibleElasticsearchVersionsOutput) { - op := &request.Operation{ - Name: opGetCompatibleElasticsearchVersions, - HTTPMethod: "GET", - HTTPPath: "/2015-01-01/es/compatibleVersions", - } - - if input == nil { - input = &GetCompatibleElasticsearchVersionsInput{} - } - - output = &GetCompatibleElasticsearchVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCompatibleElasticsearchVersions API operation for Amazon Elasticsearch Service. -// -// Returns a list of upgrade compatible Elastisearch versions. You can optionally -// pass a DomainName to get all upgrade compatible Elasticsearch versions for -// that specific domain. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation GetCompatibleElasticsearchVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeDisabledOperationException "DisabledOperationException" -// An error occured because the client wanted to access a not supported operation. -// Gives http status code of 409. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -func (c *ElasticsearchService) GetCompatibleElasticsearchVersions(input *GetCompatibleElasticsearchVersionsInput) (*GetCompatibleElasticsearchVersionsOutput, error) { - req, out := c.GetCompatibleElasticsearchVersionsRequest(input) - return out, req.Send() -} - -// GetCompatibleElasticsearchVersionsWithContext is the same as GetCompatibleElasticsearchVersions with the addition of -// the ability to pass a context and additional request options. -// -// See GetCompatibleElasticsearchVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) GetCompatibleElasticsearchVersionsWithContext(ctx aws.Context, input *GetCompatibleElasticsearchVersionsInput, opts ...request.Option) (*GetCompatibleElasticsearchVersionsOutput, error) { - req, out := c.GetCompatibleElasticsearchVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUpgradeHistory = "GetUpgradeHistory" - -// GetUpgradeHistoryRequest generates a "aws/request.Request" representing the -// client's request for the GetUpgradeHistory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUpgradeHistory for more information on using the GetUpgradeHistory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUpgradeHistoryRequest method. -// req, resp := client.GetUpgradeHistoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) GetUpgradeHistoryRequest(input *GetUpgradeHistoryInput) (req *request.Request, output *GetUpgradeHistoryOutput) { - op := &request.Operation{ - Name: opGetUpgradeHistory, - HTTPMethod: "GET", - HTTPPath: "/2015-01-01/es/upgradeDomain/{DomainName}/history", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetUpgradeHistoryInput{} - } - - output = &GetUpgradeHistoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUpgradeHistory API operation for Amazon Elasticsearch Service. -// -// Retrieves the complete history of the last 10 upgrades that were performed -// on the domain. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation GetUpgradeHistory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeDisabledOperationException "DisabledOperationException" -// An error occured because the client wanted to access a not supported operation. -// Gives http status code of 409. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -func (c *ElasticsearchService) GetUpgradeHistory(input *GetUpgradeHistoryInput) (*GetUpgradeHistoryOutput, error) { - req, out := c.GetUpgradeHistoryRequest(input) - return out, req.Send() -} - -// GetUpgradeHistoryWithContext is the same as GetUpgradeHistory with the addition of -// the ability to pass a context and additional request options. -// -// See GetUpgradeHistory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) GetUpgradeHistoryWithContext(ctx aws.Context, input *GetUpgradeHistoryInput, opts ...request.Option) (*GetUpgradeHistoryOutput, error) { - req, out := c.GetUpgradeHistoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetUpgradeHistoryPages iterates over the pages of a GetUpgradeHistory operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetUpgradeHistory 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 GetUpgradeHistory operation. -// pageNum := 0 -// err := client.GetUpgradeHistoryPages(params, -// func(page *GetUpgradeHistoryOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElasticsearchService) GetUpgradeHistoryPages(input *GetUpgradeHistoryInput, fn func(*GetUpgradeHistoryOutput, bool) bool) error { - return c.GetUpgradeHistoryPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetUpgradeHistoryPagesWithContext same as GetUpgradeHistoryPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) GetUpgradeHistoryPagesWithContext(ctx aws.Context, input *GetUpgradeHistoryInput, fn func(*GetUpgradeHistoryOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetUpgradeHistoryInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetUpgradeHistoryRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetUpgradeHistoryOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetUpgradeStatus = "GetUpgradeStatus" - -// GetUpgradeStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetUpgradeStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUpgradeStatus for more information on using the GetUpgradeStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUpgradeStatusRequest method. -// req, resp := client.GetUpgradeStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) GetUpgradeStatusRequest(input *GetUpgradeStatusInput) (req *request.Request, output *GetUpgradeStatusOutput) { - op := &request.Operation{ - Name: opGetUpgradeStatus, - HTTPMethod: "GET", - HTTPPath: "/2015-01-01/es/upgradeDomain/{DomainName}/status", - } - - if input == nil { - input = &GetUpgradeStatusInput{} - } - - output = &GetUpgradeStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUpgradeStatus API operation for Amazon Elasticsearch Service. -// -// Retrieves the latest status of the last upgrade or upgrade eligibility check -// that was performed on the domain. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation GetUpgradeStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeDisabledOperationException "DisabledOperationException" -// An error occured because the client wanted to access a not supported operation. -// Gives http status code of 409. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -func (c *ElasticsearchService) GetUpgradeStatus(input *GetUpgradeStatusInput) (*GetUpgradeStatusOutput, error) { - req, out := c.GetUpgradeStatusRequest(input) - return out, req.Send() -} - -// GetUpgradeStatusWithContext is the same as GetUpgradeStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetUpgradeStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) GetUpgradeStatusWithContext(ctx aws.Context, input *GetUpgradeStatusInput, opts ...request.Option) (*GetUpgradeStatusOutput, error) { - req, out := c.GetUpgradeStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDomainNames = "ListDomainNames" - -// ListDomainNamesRequest generates a "aws/request.Request" representing the -// client's request for the ListDomainNames operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDomainNames for more information on using the ListDomainNames -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDomainNamesRequest method. -// req, resp := client.ListDomainNamesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) ListDomainNamesRequest(input *ListDomainNamesInput) (req *request.Request, output *ListDomainNamesOutput) { - op := &request.Operation{ - Name: opListDomainNames, - HTTPMethod: "GET", - HTTPPath: "/2015-01-01/domain", - } - - if input == nil { - input = &ListDomainNamesInput{} - } - - output = &ListDomainNamesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDomainNames API operation for Amazon Elasticsearch Service. -// -// Returns the name of all Elasticsearch domains owned by the current user's -// account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation ListDomainNames for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -func (c *ElasticsearchService) ListDomainNames(input *ListDomainNamesInput) (*ListDomainNamesOutput, error) { - req, out := c.ListDomainNamesRequest(input) - return out, req.Send() -} - -// ListDomainNamesWithContext is the same as ListDomainNames with the addition of -// the ability to pass a context and additional request options. -// -// See ListDomainNames for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) ListDomainNamesWithContext(ctx aws.Context, input *ListDomainNamesInput, opts ...request.Option) (*ListDomainNamesOutput, error) { - req, out := c.ListDomainNamesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListElasticsearchInstanceTypes = "ListElasticsearchInstanceTypes" - -// ListElasticsearchInstanceTypesRequest generates a "aws/request.Request" representing the -// client's request for the ListElasticsearchInstanceTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListElasticsearchInstanceTypes for more information on using the ListElasticsearchInstanceTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListElasticsearchInstanceTypesRequest method. -// req, resp := client.ListElasticsearchInstanceTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) ListElasticsearchInstanceTypesRequest(input *ListElasticsearchInstanceTypesInput) (req *request.Request, output *ListElasticsearchInstanceTypesOutput) { - op := &request.Operation{ - Name: opListElasticsearchInstanceTypes, - HTTPMethod: "GET", - HTTPPath: "/2015-01-01/es/instanceTypes/{ElasticsearchVersion}", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListElasticsearchInstanceTypesInput{} - } - - output = &ListElasticsearchInstanceTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListElasticsearchInstanceTypes API operation for Amazon Elasticsearch Service. -// -// List all Elasticsearch instance types that are supported for given ElasticsearchVersion -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation ListElasticsearchInstanceTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -func (c *ElasticsearchService) ListElasticsearchInstanceTypes(input *ListElasticsearchInstanceTypesInput) (*ListElasticsearchInstanceTypesOutput, error) { - req, out := c.ListElasticsearchInstanceTypesRequest(input) - return out, req.Send() -} - -// ListElasticsearchInstanceTypesWithContext is the same as ListElasticsearchInstanceTypes with the addition of -// the ability to pass a context and additional request options. -// -// See ListElasticsearchInstanceTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) ListElasticsearchInstanceTypesWithContext(ctx aws.Context, input *ListElasticsearchInstanceTypesInput, opts ...request.Option) (*ListElasticsearchInstanceTypesOutput, error) { - req, out := c.ListElasticsearchInstanceTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListElasticsearchInstanceTypesPages iterates over the pages of a ListElasticsearchInstanceTypes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListElasticsearchInstanceTypes method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListElasticsearchInstanceTypes operation. -// pageNum := 0 -// err := client.ListElasticsearchInstanceTypesPages(params, -// func(page *ListElasticsearchInstanceTypesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElasticsearchService) ListElasticsearchInstanceTypesPages(input *ListElasticsearchInstanceTypesInput, fn func(*ListElasticsearchInstanceTypesOutput, bool) bool) error { - return c.ListElasticsearchInstanceTypesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListElasticsearchInstanceTypesPagesWithContext same as ListElasticsearchInstanceTypesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) ListElasticsearchInstanceTypesPagesWithContext(ctx aws.Context, input *ListElasticsearchInstanceTypesInput, fn func(*ListElasticsearchInstanceTypesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListElasticsearchInstanceTypesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListElasticsearchInstanceTypesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListElasticsearchInstanceTypesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListElasticsearchVersions = "ListElasticsearchVersions" - -// ListElasticsearchVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListElasticsearchVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListElasticsearchVersions for more information on using the ListElasticsearchVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListElasticsearchVersionsRequest method. -// req, resp := client.ListElasticsearchVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) ListElasticsearchVersionsRequest(input *ListElasticsearchVersionsInput) (req *request.Request, output *ListElasticsearchVersionsOutput) { - op := &request.Operation{ - Name: opListElasticsearchVersions, - HTTPMethod: "GET", - HTTPPath: "/2015-01-01/es/versions", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListElasticsearchVersionsInput{} - } - - output = &ListElasticsearchVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListElasticsearchVersions API operation for Amazon Elasticsearch Service. -// -// List all supported Elasticsearch versions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation ListElasticsearchVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -func (c *ElasticsearchService) ListElasticsearchVersions(input *ListElasticsearchVersionsInput) (*ListElasticsearchVersionsOutput, error) { - req, out := c.ListElasticsearchVersionsRequest(input) - return out, req.Send() -} - -// ListElasticsearchVersionsWithContext is the same as ListElasticsearchVersions with the addition of -// the ability to pass a context and additional request options. -// -// See ListElasticsearchVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) ListElasticsearchVersionsWithContext(ctx aws.Context, input *ListElasticsearchVersionsInput, opts ...request.Option) (*ListElasticsearchVersionsOutput, error) { - req, out := c.ListElasticsearchVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListElasticsearchVersionsPages iterates over the pages of a ListElasticsearchVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListElasticsearchVersions 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 ListElasticsearchVersions operation. -// pageNum := 0 -// err := client.ListElasticsearchVersionsPages(params, -// func(page *ListElasticsearchVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElasticsearchService) ListElasticsearchVersionsPages(input *ListElasticsearchVersionsInput, fn func(*ListElasticsearchVersionsOutput, bool) bool) error { - return c.ListElasticsearchVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListElasticsearchVersionsPagesWithContext same as ListElasticsearchVersionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) ListElasticsearchVersionsPagesWithContext(ctx aws.Context, input *ListElasticsearchVersionsInput, fn func(*ListElasticsearchVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListElasticsearchVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListElasticsearchVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListElasticsearchVersionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTags = "ListTags" - -// ListTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTags for more information on using the ListTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsRequest method. -// req, resp := client.ListTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { - op := &request.Operation{ - Name: opListTags, - HTTPMethod: "GET", - HTTPPath: "/2015-01-01/tags/", - } - - if input == nil { - input = &ListTagsInput{} - } - - output = &ListTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTags API operation for Amazon Elasticsearch Service. -// -// Returns all tags for the given Elasticsearch domain. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation ListTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -func (c *ElasticsearchService) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - return out, req.Send() -} - -// ListTagsWithContext is the same as ListTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPurchaseReservedElasticsearchInstanceOffering = "PurchaseReservedElasticsearchInstanceOffering" - -// PurchaseReservedElasticsearchInstanceOfferingRequest generates a "aws/request.Request" representing the -// client's request for the PurchaseReservedElasticsearchInstanceOffering operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PurchaseReservedElasticsearchInstanceOffering for more information on using the PurchaseReservedElasticsearchInstanceOffering -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PurchaseReservedElasticsearchInstanceOfferingRequest method. -// req, resp := client.PurchaseReservedElasticsearchInstanceOfferingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) PurchaseReservedElasticsearchInstanceOfferingRequest(input *PurchaseReservedElasticsearchInstanceOfferingInput) (req *request.Request, output *PurchaseReservedElasticsearchInstanceOfferingOutput) { - op := &request.Operation{ - Name: opPurchaseReservedElasticsearchInstanceOffering, - HTTPMethod: "POST", - HTTPPath: "/2015-01-01/es/purchaseReservedInstanceOffering", - } - - if input == nil { - input = &PurchaseReservedElasticsearchInstanceOfferingInput{} - } - - output = &PurchaseReservedElasticsearchInstanceOfferingOutput{} - req = c.newRequest(op, input, output) - return -} - -// PurchaseReservedElasticsearchInstanceOffering API operation for Amazon Elasticsearch Service. -// -// Allows you to purchase reserved Elasticsearch instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation PurchaseReservedElasticsearchInstanceOffering for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// An exception for creating a resource that already exists. Gives http status -// code of 400. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// An exception for trying to create more than allowed resources or sub-resources. -// Gives http status code of 409. -// -// * ErrCodeDisabledOperationException "DisabledOperationException" -// An error occured because the client wanted to access a not supported operation. -// Gives http status code of 409. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -func (c *ElasticsearchService) PurchaseReservedElasticsearchInstanceOffering(input *PurchaseReservedElasticsearchInstanceOfferingInput) (*PurchaseReservedElasticsearchInstanceOfferingOutput, error) { - req, out := c.PurchaseReservedElasticsearchInstanceOfferingRequest(input) - return out, req.Send() -} - -// PurchaseReservedElasticsearchInstanceOfferingWithContext is the same as PurchaseReservedElasticsearchInstanceOffering with the addition of -// the ability to pass a context and additional request options. -// -// See PurchaseReservedElasticsearchInstanceOffering for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) PurchaseReservedElasticsearchInstanceOfferingWithContext(ctx aws.Context, input *PurchaseReservedElasticsearchInstanceOfferingInput, opts ...request.Option) (*PurchaseReservedElasticsearchInstanceOfferingOutput, error) { - req, out := c.PurchaseReservedElasticsearchInstanceOfferingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTags = "RemoveTags" - -// RemoveTagsRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTags for more information on using the RemoveTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsRequest method. -// req, resp := client.RemoveTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) { - op := &request.Operation{ - Name: opRemoveTags, - HTTPMethod: "POST", - HTTPPath: "/2015-01-01/tags-removal", - } - - if input == nil { - input = &RemoveTagsInput{} - } - - output = &RemoveTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTags API operation for Amazon Elasticsearch Service. -// -// Removes the specified set of tags from the specified Elasticsearch domain. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation RemoveTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -func (c *ElasticsearchService) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - return out, req.Send() -} - -// RemoveTagsWithContext is the same as RemoveTags with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartElasticsearchServiceSoftwareUpdate = "StartElasticsearchServiceSoftwareUpdate" - -// StartElasticsearchServiceSoftwareUpdateRequest generates a "aws/request.Request" representing the -// client's request for the StartElasticsearchServiceSoftwareUpdate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartElasticsearchServiceSoftwareUpdate for more information on using the StartElasticsearchServiceSoftwareUpdate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartElasticsearchServiceSoftwareUpdateRequest method. -// req, resp := client.StartElasticsearchServiceSoftwareUpdateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) StartElasticsearchServiceSoftwareUpdateRequest(input *StartElasticsearchServiceSoftwareUpdateInput) (req *request.Request, output *StartElasticsearchServiceSoftwareUpdateOutput) { - op := &request.Operation{ - Name: opStartElasticsearchServiceSoftwareUpdate, - HTTPMethod: "POST", - HTTPPath: "/2015-01-01/es/serviceSoftwareUpdate/start", - } - - if input == nil { - input = &StartElasticsearchServiceSoftwareUpdateInput{} - } - - output = &StartElasticsearchServiceSoftwareUpdateOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartElasticsearchServiceSoftwareUpdate API operation for Amazon Elasticsearch Service. -// -// Schedules a service software update for an Amazon ES domain. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation StartElasticsearchServiceSoftwareUpdate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -func (c *ElasticsearchService) StartElasticsearchServiceSoftwareUpdate(input *StartElasticsearchServiceSoftwareUpdateInput) (*StartElasticsearchServiceSoftwareUpdateOutput, error) { - req, out := c.StartElasticsearchServiceSoftwareUpdateRequest(input) - return out, req.Send() -} - -// StartElasticsearchServiceSoftwareUpdateWithContext is the same as StartElasticsearchServiceSoftwareUpdate with the addition of -// the ability to pass a context and additional request options. -// -// See StartElasticsearchServiceSoftwareUpdate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) StartElasticsearchServiceSoftwareUpdateWithContext(ctx aws.Context, input *StartElasticsearchServiceSoftwareUpdateInput, opts ...request.Option) (*StartElasticsearchServiceSoftwareUpdateOutput, error) { - req, out := c.StartElasticsearchServiceSoftwareUpdateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateElasticsearchDomainConfig = "UpdateElasticsearchDomainConfig" - -// UpdateElasticsearchDomainConfigRequest generates a "aws/request.Request" representing the -// client's request for the UpdateElasticsearchDomainConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateElasticsearchDomainConfig for more information on using the UpdateElasticsearchDomainConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateElasticsearchDomainConfigRequest method. -// req, resp := client.UpdateElasticsearchDomainConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) UpdateElasticsearchDomainConfigRequest(input *UpdateElasticsearchDomainConfigInput) (req *request.Request, output *UpdateElasticsearchDomainConfigOutput) { - op := &request.Operation{ - Name: opUpdateElasticsearchDomainConfig, - HTTPMethod: "POST", - HTTPPath: "/2015-01-01/es/domain/{DomainName}/config", - } - - if input == nil { - input = &UpdateElasticsearchDomainConfigInput{} - } - - output = &UpdateElasticsearchDomainConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateElasticsearchDomainConfig API operation for Amazon Elasticsearch Service. -// -// Modifies the cluster configuration of the specified Elasticsearch domain, -// setting as setting the instance type and the number of instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation UpdateElasticsearchDomainConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -// * ErrCodeInvalidTypeException "InvalidTypeException" -// An exception for trying to create or access sub-resource that is either invalid -// or not supported. Gives http status code of 409. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// An exception for trying to create more than allowed resources or sub-resources. -// Gives http status code of 409. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -func (c *ElasticsearchService) UpdateElasticsearchDomainConfig(input *UpdateElasticsearchDomainConfigInput) (*UpdateElasticsearchDomainConfigOutput, error) { - req, out := c.UpdateElasticsearchDomainConfigRequest(input) - return out, req.Send() -} - -// UpdateElasticsearchDomainConfigWithContext is the same as UpdateElasticsearchDomainConfig with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateElasticsearchDomainConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) UpdateElasticsearchDomainConfigWithContext(ctx aws.Context, input *UpdateElasticsearchDomainConfigInput, opts ...request.Option) (*UpdateElasticsearchDomainConfigOutput, error) { - req, out := c.UpdateElasticsearchDomainConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpgradeElasticsearchDomain = "UpgradeElasticsearchDomain" - -// UpgradeElasticsearchDomainRequest generates a "aws/request.Request" representing the -// client's request for the UpgradeElasticsearchDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpgradeElasticsearchDomain for more information on using the UpgradeElasticsearchDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpgradeElasticsearchDomainRequest method. -// req, resp := client.UpgradeElasticsearchDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticsearchService) UpgradeElasticsearchDomainRequest(input *UpgradeElasticsearchDomainInput) (req *request.Request, output *UpgradeElasticsearchDomainOutput) { - op := &request.Operation{ - Name: opUpgradeElasticsearchDomain, - HTTPMethod: "POST", - HTTPPath: "/2015-01-01/es/upgradeDomain", - } - - if input == nil { - input = &UpgradeElasticsearchDomainInput{} - } - - output = &UpgradeElasticsearchDomainOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpgradeElasticsearchDomain API operation for Amazon Elasticsearch Service. -// -// Allows you to either upgrade your domain or perform an Upgrade eligibility -// check to a compatible Elasticsearch 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 Elasticsearch Service's -// API operation UpgradeElasticsearchDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBaseException "BaseException" -// An error occurred while processing the request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An exception for accessing or deleting a resource that does not exist. Gives -// http status code of 400. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// An exception for creating a resource that already exists. Gives http status -// code of 400. -// -// * ErrCodeDisabledOperationException "DisabledOperationException" -// An error occured because the client wanted to access a not supported operation. -// Gives http status code of 409. -// -// * ErrCodeValidationException "ValidationException" -// An exception for missing / invalid input fields. Gives http status code of -// 400. -// -// * ErrCodeInternalException "InternalException" -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -func (c *ElasticsearchService) UpgradeElasticsearchDomain(input *UpgradeElasticsearchDomainInput) (*UpgradeElasticsearchDomainOutput, error) { - req, out := c.UpgradeElasticsearchDomainRequest(input) - return out, req.Send() -} - -// UpgradeElasticsearchDomainWithContext is the same as UpgradeElasticsearchDomain with the addition of -// the ability to pass a context and additional request options. -// -// See UpgradeElasticsearchDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticsearchService) UpgradeElasticsearchDomainWithContext(ctx aws.Context, input *UpgradeElasticsearchDomainInput, opts ...request.Option) (*UpgradeElasticsearchDomainOutput, error) { - req, out := c.UpgradeElasticsearchDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// The configured access rules for the domain's document and search endpoints, -// and the current status of those rules. -type AccessPoliciesStatus struct { - _ struct{} `type:"structure"` - - // The access policy configured for the Elasticsearch domain. Access policies - // may be resource-based, IP-based, or IAM-based. See Configuring Access Policies - // (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-access-policies)for - // more information. - // - // Options is a required field - Options *string `type:"string" required:"true"` - - // The status of the access policy for the Elasticsearch domain. See OptionStatus - // for the status information that's included. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s AccessPoliciesStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccessPoliciesStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *AccessPoliciesStatus) SetOptions(v string) *AccessPoliciesStatus { - s.Options = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AccessPoliciesStatus) SetStatus(v *OptionStatus) *AccessPoliciesStatus { - s.Status = v - return s -} - -// Container for the parameters to the AddTags operation. Specify the tags that -// you want to attach to the Elasticsearch domain. -type AddTagsInput struct { - _ struct{} `type:"structure"` - - // Specify the ARN for which you want to add the tags. - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // List of Tag that need to be added for the Elasticsearch domain. - // - // TagList is a required field - TagList []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"} - if s.ARN == nil { - invalidParams.Add(request.NewErrParamRequired("ARN")) - } - if s.TagList == nil { - invalidParams.Add(request.NewErrParamRequired("TagList")) - } - if s.TagList != nil { - for i, v := range s.TagList { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetARN sets the ARN field's value. -func (s *AddTagsInput) SetARN(v string) *AddTagsInput { - s.ARN = &v - return s -} - -// SetTagList sets the TagList field's value. -func (s *AddTagsInput) SetTagList(v []*Tag) *AddTagsInput { - s.TagList = v - return s -} - -type AddTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsOutput) GoString() string { - return s.String() -} - -// List of limits that are specific to a given InstanceType and for each of -// it's InstanceRole . -type AdditionalLimit struct { - _ struct{} `type:"structure"` - - // Name of Additional Limit is specific to a given InstanceType and for each - // of it's InstanceRole etc. Attributes and their details: MaximumNumberOfDataNodesSupported - // This attribute will be present in Master node only to specify how much data - // nodes upto which given ESPartitionInstanceTypecan support as master node. MaximumNumberOfDataNodesWithoutMasterNode - // This attribute will be present in Data node only to specify how much data - // nodes of given ESPartitionInstanceType - LimitName *string `type:"string"` - - // Value for given AdditionalLimit$LimitName . - LimitValues []*string `type:"list"` -} - -// String returns the string representation -func (s AdditionalLimit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdditionalLimit) GoString() string { - return s.String() -} - -// SetLimitName sets the LimitName field's value. -func (s *AdditionalLimit) SetLimitName(v string) *AdditionalLimit { - s.LimitName = &v - return s -} - -// SetLimitValues sets the LimitValues field's value. -func (s *AdditionalLimit) SetLimitValues(v []*string) *AdditionalLimit { - s.LimitValues = v - return s -} - -// Status of the advanced options for the specified Elasticsearch domain. Currently, -// the following advanced options are available: -// -// * Option to allow references to indices in an HTTP request body. Must -// be false when configuring access to individual sub-resources. By default, -// the value is true. See Configuration Advanced Options (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-advanced-options) -// for more information. -// * Option to specify the percentage of heap space that is allocated to -// field data. By default, this setting is unbounded. -// For more information, see Configuring Advanced Options (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-advanced-options). -type AdvancedOptionsStatus struct { - _ struct{} `type:"structure"` - - // Specifies the status of advanced options for the specified Elasticsearch - // domain. - // - // Options is a required field - Options map[string]*string `type:"map" required:"true"` - - // Specifies the status of OptionStatus for advanced options for the specified - // Elasticsearch domain. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s AdvancedOptionsStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdvancedOptionsStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *AdvancedOptionsStatus) SetOptions(v map[string]*string) *AdvancedOptionsStatus { - s.Options = v - return s -} - -// SetStatus sets the Status field's value. -func (s *AdvancedOptionsStatus) SetStatus(v *OptionStatus) *AdvancedOptionsStatus { - s.Status = v - return s -} - -// Container for the parameters to the CancelElasticsearchServiceSoftwareUpdate -// operation. Specifies the name of the Elasticsearch domain that you wish to -// cancel a service software update on. -type CancelElasticsearchServiceSoftwareUpdateInput struct { - _ struct{} `type:"structure"` - - // The name of the domain that you want to stop the latest service software - // update on. - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelElasticsearchServiceSoftwareUpdateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelElasticsearchServiceSoftwareUpdateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelElasticsearchServiceSoftwareUpdateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelElasticsearchServiceSoftwareUpdateInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *CancelElasticsearchServiceSoftwareUpdateInput) SetDomainName(v string) *CancelElasticsearchServiceSoftwareUpdateInput { - s.DomainName = &v - return s -} - -// The result of a CancelElasticsearchServiceSoftwareUpdate operation. Contains -// the status of the update. -type CancelElasticsearchServiceSoftwareUpdateOutput struct { - _ struct{} `type:"structure"` - - // The current status of the Elasticsearch service software update. - ServiceSoftwareOptions *ServiceSoftwareOptions `type:"structure"` -} - -// String returns the string representation -func (s CancelElasticsearchServiceSoftwareUpdateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelElasticsearchServiceSoftwareUpdateOutput) GoString() string { - return s.String() -} - -// SetServiceSoftwareOptions sets the ServiceSoftwareOptions field's value. -func (s *CancelElasticsearchServiceSoftwareUpdateOutput) SetServiceSoftwareOptions(v *ServiceSoftwareOptions) *CancelElasticsearchServiceSoftwareUpdateOutput { - s.ServiceSoftwareOptions = v - return s -} - -// Options to specify the Cognito user and identity pools for Kibana authentication. -// For more information, see Amazon Cognito Authentication for Kibana (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html). -type CognitoOptions struct { - _ struct{} `type:"structure"` - - // Specifies the option to enable Cognito for Kibana authentication. - Enabled *bool `type:"boolean"` - - // Specifies the Cognito identity pool ID for Kibana authentication. - IdentityPoolId *string `min:"1" type:"string"` - - // Specifies the role ARN that provides Elasticsearch permissions for accessing - // Cognito resources. - RoleArn *string `min:"20" type:"string"` - - // Specifies the Cognito user pool ID for Kibana authentication. - UserPoolId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CognitoOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CognitoOptions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CognitoOptions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CognitoOptions"} - if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *CognitoOptions) SetEnabled(v bool) *CognitoOptions { - s.Enabled = &v - return s -} - -// SetIdentityPoolId sets the IdentityPoolId field's value. -func (s *CognitoOptions) SetIdentityPoolId(v string) *CognitoOptions { - s.IdentityPoolId = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CognitoOptions) SetRoleArn(v string) *CognitoOptions { - s.RoleArn = &v - return s -} - -// SetUserPoolId sets the UserPoolId field's value. -func (s *CognitoOptions) SetUserPoolId(v string) *CognitoOptions { - s.UserPoolId = &v - return s -} - -// Status of the Cognito options for the specified Elasticsearch domain. -type CognitoOptionsStatus struct { - _ struct{} `type:"structure"` - - // Specifies the Cognito options for the specified Elasticsearch domain. - // - // Options is a required field - Options *CognitoOptions `type:"structure" required:"true"` - - // Specifies the status of the Cognito options for the specified Elasticsearch - // domain. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CognitoOptionsStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CognitoOptionsStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *CognitoOptionsStatus) SetOptions(v *CognitoOptions) *CognitoOptionsStatus { - s.Options = v - return s -} - -// SetStatus sets the Status field's value. -func (s *CognitoOptionsStatus) SetStatus(v *OptionStatus) *CognitoOptionsStatus { - s.Status = v - return s -} - -// A map from an ElasticsearchVersion to a list of compatible ElasticsearchVersion -// s to which the domain can be upgraded. -type CompatibleVersionsMap struct { - _ struct{} `type:"structure"` - - // The current version of Elasticsearch on which a domain is. - SourceVersion *string `type:"string"` - - // List of supported elastic search versions. - TargetVersions []*string `type:"list"` -} - -// String returns the string representation -func (s CompatibleVersionsMap) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CompatibleVersionsMap) GoString() string { - return s.String() -} - -// SetSourceVersion sets the SourceVersion field's value. -func (s *CompatibleVersionsMap) SetSourceVersion(v string) *CompatibleVersionsMap { - s.SourceVersion = &v - return s -} - -// SetTargetVersions sets the TargetVersions field's value. -func (s *CompatibleVersionsMap) SetTargetVersions(v []*string) *CompatibleVersionsMap { - s.TargetVersions = v - return s -} - -type CreateElasticsearchDomainInput struct { - _ struct{} `type:"structure"` - - // IAM access policy as a JSON-formatted string. - AccessPolicies *string `type:"string"` - - // Option to allow references to indices in an HTTP request body. Must be false - // when configuring access to individual sub-resources. By default, the value - // is true. See Configuration Advanced Options (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-advanced-options) - // for more information. - AdvancedOptions map[string]*string `type:"map"` - - // Options to specify the Cognito user and identity pools for Kibana authentication. - // For more information, see Amazon Cognito Authentication for Kibana (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html). - CognitoOptions *CognitoOptions `type:"structure"` - - // The name of the Elasticsearch domain that you are creating. Domain names - // are unique across the domains owned by an account within an AWS region. Domain - // names must start with a letter or number and can contain the following characters: - // a-z (lowercase), 0-9, and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - // Options to enable, disable and specify the type and size of EBS storage volumes. - EBSOptions *EBSOptions `type:"structure"` - - // Configuration options for an Elasticsearch domain. Specifies the instance - // type and number of instances in the domain cluster. - ElasticsearchClusterConfig *ElasticsearchClusterConfig `type:"structure"` - - // String of format X.Y to specify version for the Elasticsearch domain eg. - // "1.5" or "2.3". For more information, see Creating Elasticsearch Domains - // (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomains) - // in the Amazon Elasticsearch Service Developer Guide. - ElasticsearchVersion *string `type:"string"` - - // Specifies the Encryption At Rest Options. - EncryptionAtRestOptions *EncryptionAtRestOptions `type:"structure"` - - // Map of LogType and LogPublishingOption, each containing options to publish - // a given type of Elasticsearch log. - LogPublishingOptions map[string]*LogPublishingOption `type:"map"` - - // Specifies the NodeToNodeEncryptionOptions. - NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptions `type:"structure"` - - // Option to set time, in UTC format, of the daily automated snapshot. Default - // value is 0 hours. - SnapshotOptions *SnapshotOptions `type:"structure"` - - // Options to specify the subnets and security groups for VPC endpoint. For - // more information, see Creating a VPC (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-creating-vpc) - // in VPC Endpoints for Amazon Elasticsearch Service Domains - VPCOptions *VPCOptions `type:"structure"` -} - -// String returns the string representation -func (s CreateElasticsearchDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateElasticsearchDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateElasticsearchDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateElasticsearchDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.CognitoOptions != nil { - if err := s.CognitoOptions.Validate(); err != nil { - invalidParams.AddNested("CognitoOptions", err.(request.ErrInvalidParams)) - } - } - if s.EncryptionAtRestOptions != nil { - if err := s.EncryptionAtRestOptions.Validate(); err != nil { - invalidParams.AddNested("EncryptionAtRestOptions", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessPolicies sets the AccessPolicies field's value. -func (s *CreateElasticsearchDomainInput) SetAccessPolicies(v string) *CreateElasticsearchDomainInput { - s.AccessPolicies = &v - return s -} - -// SetAdvancedOptions sets the AdvancedOptions field's value. -func (s *CreateElasticsearchDomainInput) SetAdvancedOptions(v map[string]*string) *CreateElasticsearchDomainInput { - s.AdvancedOptions = v - return s -} - -// SetCognitoOptions sets the CognitoOptions field's value. -func (s *CreateElasticsearchDomainInput) SetCognitoOptions(v *CognitoOptions) *CreateElasticsearchDomainInput { - s.CognitoOptions = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *CreateElasticsearchDomainInput) SetDomainName(v string) *CreateElasticsearchDomainInput { - s.DomainName = &v - return s -} - -// SetEBSOptions sets the EBSOptions field's value. -func (s *CreateElasticsearchDomainInput) SetEBSOptions(v *EBSOptions) *CreateElasticsearchDomainInput { - s.EBSOptions = v - return s -} - -// SetElasticsearchClusterConfig sets the ElasticsearchClusterConfig field's value. -func (s *CreateElasticsearchDomainInput) SetElasticsearchClusterConfig(v *ElasticsearchClusterConfig) *CreateElasticsearchDomainInput { - s.ElasticsearchClusterConfig = v - return s -} - -// SetElasticsearchVersion sets the ElasticsearchVersion field's value. -func (s *CreateElasticsearchDomainInput) SetElasticsearchVersion(v string) *CreateElasticsearchDomainInput { - s.ElasticsearchVersion = &v - return s -} - -// SetEncryptionAtRestOptions sets the EncryptionAtRestOptions field's value. -func (s *CreateElasticsearchDomainInput) SetEncryptionAtRestOptions(v *EncryptionAtRestOptions) *CreateElasticsearchDomainInput { - s.EncryptionAtRestOptions = v - return s -} - -// SetLogPublishingOptions sets the LogPublishingOptions field's value. -func (s *CreateElasticsearchDomainInput) SetLogPublishingOptions(v map[string]*LogPublishingOption) *CreateElasticsearchDomainInput { - s.LogPublishingOptions = v - return s -} - -// SetNodeToNodeEncryptionOptions sets the NodeToNodeEncryptionOptions field's value. -func (s *CreateElasticsearchDomainInput) SetNodeToNodeEncryptionOptions(v *NodeToNodeEncryptionOptions) *CreateElasticsearchDomainInput { - s.NodeToNodeEncryptionOptions = v - return s -} - -// SetSnapshotOptions sets the SnapshotOptions field's value. -func (s *CreateElasticsearchDomainInput) SetSnapshotOptions(v *SnapshotOptions) *CreateElasticsearchDomainInput { - s.SnapshotOptions = v - return s -} - -// SetVPCOptions sets the VPCOptions field's value. -func (s *CreateElasticsearchDomainInput) SetVPCOptions(v *VPCOptions) *CreateElasticsearchDomainInput { - s.VPCOptions = v - return s -} - -// The result of a CreateElasticsearchDomain operation. Contains the status -// of the newly created Elasticsearch domain. -type CreateElasticsearchDomainOutput struct { - _ struct{} `type:"structure"` - - // The status of the newly created Elasticsearch domain. - DomainStatus *ElasticsearchDomainStatus `type:"structure"` -} - -// String returns the string representation -func (s CreateElasticsearchDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateElasticsearchDomainOutput) GoString() string { - return s.String() -} - -// SetDomainStatus sets the DomainStatus field's value. -func (s *CreateElasticsearchDomainOutput) SetDomainStatus(v *ElasticsearchDomainStatus) *CreateElasticsearchDomainOutput { - s.DomainStatus = v - return s -} - -// Container for the parameters to the DeleteElasticsearchDomain operation. -// Specifies the name of the Elasticsearch domain that you want to delete. -type DeleteElasticsearchDomainInput struct { - _ struct{} `type:"structure"` - - // The name of the Elasticsearch domain that you want to permanently delete. - // - // DomainName is a required field - DomainName *string `location:"uri" locationName:"DomainName" min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteElasticsearchDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteElasticsearchDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteElasticsearchDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteElasticsearchDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteElasticsearchDomainInput) SetDomainName(v string) *DeleteElasticsearchDomainInput { - s.DomainName = &v - return s -} - -// The result of a DeleteElasticsearchDomain request. Contains the status of -// the pending deletion, or no status if the domain and all of its resources -// have been deleted. -type DeleteElasticsearchDomainOutput struct { - _ struct{} `type:"structure"` - - // The status of the Elasticsearch domain being deleted. - DomainStatus *ElasticsearchDomainStatus `type:"structure"` -} - -// String returns the string representation -func (s DeleteElasticsearchDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteElasticsearchDomainOutput) GoString() string { - return s.String() -} - -// SetDomainStatus sets the DomainStatus field's value. -func (s *DeleteElasticsearchDomainOutput) SetDomainStatus(v *ElasticsearchDomainStatus) *DeleteElasticsearchDomainOutput { - s.DomainStatus = v - return s -} - -type DeleteElasticsearchServiceRoleInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteElasticsearchServiceRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteElasticsearchServiceRoleInput) GoString() string { - return s.String() -} - -type DeleteElasticsearchServiceRoleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteElasticsearchServiceRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteElasticsearchServiceRoleOutput) GoString() string { - return s.String() -} - -// Container for the parameters to the DescribeElasticsearchDomainConfig operation. -// Specifies the domain name for which you want configuration information. -type DescribeElasticsearchDomainConfigInput struct { - _ struct{} `type:"structure"` - - // The Elasticsearch domain that you want to get information about. - // - // DomainName is a required field - DomainName *string `location:"uri" locationName:"DomainName" min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeElasticsearchDomainConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeElasticsearchDomainConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeElasticsearchDomainConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeElasticsearchDomainConfigInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DescribeElasticsearchDomainConfigInput) SetDomainName(v string) *DescribeElasticsearchDomainConfigInput { - s.DomainName = &v - return s -} - -// The result of a DescribeElasticsearchDomainConfig request. Contains the configuration -// information of the requested domain. -type DescribeElasticsearchDomainConfigOutput struct { - _ struct{} `type:"structure"` - - // The configuration information of the domain requested in the DescribeElasticsearchDomainConfig - // request. - // - // DomainConfig is a required field - DomainConfig *ElasticsearchDomainConfig `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeElasticsearchDomainConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeElasticsearchDomainConfigOutput) GoString() string { - return s.String() -} - -// SetDomainConfig sets the DomainConfig field's value. -func (s *DescribeElasticsearchDomainConfigOutput) SetDomainConfig(v *ElasticsearchDomainConfig) *DescribeElasticsearchDomainConfigOutput { - s.DomainConfig = v - return s -} - -// Container for the parameters to the DescribeElasticsearchDomain operation. -type DescribeElasticsearchDomainInput struct { - _ struct{} `type:"structure"` - - // The name of the Elasticsearch domain for which you want information. - // - // DomainName is a required field - DomainName *string `location:"uri" locationName:"DomainName" min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeElasticsearchDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeElasticsearchDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeElasticsearchDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeElasticsearchDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DescribeElasticsearchDomainInput) SetDomainName(v string) *DescribeElasticsearchDomainInput { - s.DomainName = &v - return s -} - -// The result of a DescribeElasticsearchDomain request. Contains the status -// of the domain specified in the request. -type DescribeElasticsearchDomainOutput struct { - _ struct{} `type:"structure"` - - // The current status of the Elasticsearch domain. - // - // DomainStatus is a required field - DomainStatus *ElasticsearchDomainStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeElasticsearchDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeElasticsearchDomainOutput) GoString() string { - return s.String() -} - -// SetDomainStatus sets the DomainStatus field's value. -func (s *DescribeElasticsearchDomainOutput) SetDomainStatus(v *ElasticsearchDomainStatus) *DescribeElasticsearchDomainOutput { - s.DomainStatus = v - return s -} - -// Container for the parameters to the DescribeElasticsearchDomains operation. -// By default, the API returns the status of all Elasticsearch domains. -type DescribeElasticsearchDomainsInput struct { - _ struct{} `type:"structure"` - - // The Elasticsearch domains for which you want information. - // - // DomainNames is a required field - DomainNames []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeElasticsearchDomainsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeElasticsearchDomainsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeElasticsearchDomainsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeElasticsearchDomainsInput"} - if s.DomainNames == nil { - invalidParams.Add(request.NewErrParamRequired("DomainNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainNames sets the DomainNames field's value. -func (s *DescribeElasticsearchDomainsInput) SetDomainNames(v []*string) *DescribeElasticsearchDomainsInput { - s.DomainNames = v - return s -} - -// The result of a DescribeElasticsearchDomains request. Contains the status -// of the specified domains or all domains owned by the account. -type DescribeElasticsearchDomainsOutput struct { - _ struct{} `type:"structure"` - - // The status of the domains requested in the DescribeElasticsearchDomains request. - // - // DomainStatusList is a required field - DomainStatusList []*ElasticsearchDomainStatus `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeElasticsearchDomainsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeElasticsearchDomainsOutput) GoString() string { - return s.String() -} - -// SetDomainStatusList sets the DomainStatusList field's value. -func (s *DescribeElasticsearchDomainsOutput) SetDomainStatusList(v []*ElasticsearchDomainStatus) *DescribeElasticsearchDomainsOutput { - s.DomainStatusList = v - return s -} - -// Container for the parameters to DescribeElasticsearchInstanceTypeLimits operation. -type DescribeElasticsearchInstanceTypeLimitsInput struct { - _ struct{} `type:"structure"` - - // DomainName represents the name of the Domain that we are trying to modify. - // This should be present only if we are querying for Elasticsearch Limits for - // existing domain. - DomainName *string `location:"querystring" locationName:"domainName" min:"3" type:"string"` - - // Version of Elasticsearch for which Limits are needed. - // - // ElasticsearchVersion is a required field - ElasticsearchVersion *string `location:"uri" locationName:"ElasticsearchVersion" type:"string" required:"true"` - - // The instance type for an Elasticsearch cluster for which Elasticsearch Limits - // are needed. - // - // InstanceType is a required field - InstanceType *string `location:"uri" locationName:"InstanceType" type:"string" required:"true" enum:"ESPartitionInstanceType"` -} - -// String returns the string representation -func (s DescribeElasticsearchInstanceTypeLimitsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeElasticsearchInstanceTypeLimitsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeElasticsearchInstanceTypeLimitsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeElasticsearchInstanceTypeLimitsInput"} - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.ElasticsearchVersion == nil { - invalidParams.Add(request.NewErrParamRequired("ElasticsearchVersion")) - } - if s.ElasticsearchVersion != nil && len(*s.ElasticsearchVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ElasticsearchVersion", 1)) - } - if s.InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceType")) - } - if s.InstanceType != nil && len(*s.InstanceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceType", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DescribeElasticsearchInstanceTypeLimitsInput) SetDomainName(v string) *DescribeElasticsearchInstanceTypeLimitsInput { - s.DomainName = &v - return s -} - -// SetElasticsearchVersion sets the ElasticsearchVersion field's value. -func (s *DescribeElasticsearchInstanceTypeLimitsInput) SetElasticsearchVersion(v string) *DescribeElasticsearchInstanceTypeLimitsInput { - s.ElasticsearchVersion = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *DescribeElasticsearchInstanceTypeLimitsInput) SetInstanceType(v string) *DescribeElasticsearchInstanceTypeLimitsInput { - s.InstanceType = &v - return s -} - -// Container for the parameters received from DescribeElasticsearchInstanceTypeLimits -// operation. -type DescribeElasticsearchInstanceTypeLimitsOutput struct { - _ struct{} `type:"structure"` - - // Map of Role of the Instance and Limits that are applicable. Role performed - // by given Instance in Elasticsearch can be one of the following: Data: If - // the given InstanceType is used as Data node - // Master: If the given InstanceType is used as Master node - LimitsByRole map[string]*Limits `type:"map"` -} - -// String returns the string representation -func (s DescribeElasticsearchInstanceTypeLimitsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeElasticsearchInstanceTypeLimitsOutput) GoString() string { - return s.String() -} - -// SetLimitsByRole sets the LimitsByRole field's value. -func (s *DescribeElasticsearchInstanceTypeLimitsOutput) SetLimitsByRole(v map[string]*Limits) *DescribeElasticsearchInstanceTypeLimitsOutput { - s.LimitsByRole = v - return s -} - -// Container for parameters to DescribeReservedElasticsearchInstanceOfferings -type DescribeReservedElasticsearchInstanceOfferingsInput struct { - _ struct{} `type:"structure"` - - // Set this value to limit the number of results returned. If not specified, - // defaults to 100. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` - - // NextToken should be sent in case if earlier API call produced result containing - // NextToken. It is used for pagination. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The offering identifier filter value. Use this parameter to show only the - // available offering that matches the specified reservation identifier. - ReservedElasticsearchInstanceOfferingId *string `location:"querystring" locationName:"offeringId" type:"string"` -} - -// String returns the string representation -func (s DescribeReservedElasticsearchInstanceOfferingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedElasticsearchInstanceOfferingsInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeReservedElasticsearchInstanceOfferingsInput) SetMaxResults(v int64) *DescribeReservedElasticsearchInstanceOfferingsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeReservedElasticsearchInstanceOfferingsInput) SetNextToken(v string) *DescribeReservedElasticsearchInstanceOfferingsInput { - s.NextToken = &v - return s -} - -// SetReservedElasticsearchInstanceOfferingId sets the ReservedElasticsearchInstanceOfferingId field's value. -func (s *DescribeReservedElasticsearchInstanceOfferingsInput) SetReservedElasticsearchInstanceOfferingId(v string) *DescribeReservedElasticsearchInstanceOfferingsInput { - s.ReservedElasticsearchInstanceOfferingId = &v - return s -} - -// Container for results from DescribeReservedElasticsearchInstanceOfferings -type DescribeReservedElasticsearchInstanceOfferingsOutput struct { - _ struct{} `type:"structure"` - - // Provides an identifier to allow retrieval of paginated results. - NextToken *string `type:"string"` - - // List of reserved Elasticsearch instance offerings - ReservedElasticsearchInstanceOfferings []*ReservedElasticsearchInstanceOffering `type:"list"` -} - -// String returns the string representation -func (s DescribeReservedElasticsearchInstanceOfferingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedElasticsearchInstanceOfferingsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeReservedElasticsearchInstanceOfferingsOutput) SetNextToken(v string) *DescribeReservedElasticsearchInstanceOfferingsOutput { - s.NextToken = &v - return s -} - -// SetReservedElasticsearchInstanceOfferings sets the ReservedElasticsearchInstanceOfferings field's value. -func (s *DescribeReservedElasticsearchInstanceOfferingsOutput) SetReservedElasticsearchInstanceOfferings(v []*ReservedElasticsearchInstanceOffering) *DescribeReservedElasticsearchInstanceOfferingsOutput { - s.ReservedElasticsearchInstanceOfferings = v - return s -} - -// Container for parameters to DescribeReservedElasticsearchInstances -type DescribeReservedElasticsearchInstancesInput struct { - _ struct{} `type:"structure"` - - // Set this value to limit the number of results returned. If not specified, - // defaults to 100. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` - - // NextToken should be sent in case if earlier API call produced result containing - // NextToken. It is used for pagination. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The reserved instance identifier filter value. Use this parameter to show - // only the reservation that matches the specified reserved Elasticsearch instance - // ID. - ReservedElasticsearchInstanceId *string `location:"querystring" locationName:"reservationId" type:"string"` -} - -// String returns the string representation -func (s DescribeReservedElasticsearchInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedElasticsearchInstancesInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeReservedElasticsearchInstancesInput) SetMaxResults(v int64) *DescribeReservedElasticsearchInstancesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeReservedElasticsearchInstancesInput) SetNextToken(v string) *DescribeReservedElasticsearchInstancesInput { - s.NextToken = &v - return s -} - -// SetReservedElasticsearchInstanceId sets the ReservedElasticsearchInstanceId field's value. -func (s *DescribeReservedElasticsearchInstancesInput) SetReservedElasticsearchInstanceId(v string) *DescribeReservedElasticsearchInstancesInput { - s.ReservedElasticsearchInstanceId = &v - return s -} - -// Container for results from DescribeReservedElasticsearchInstances -type DescribeReservedElasticsearchInstancesOutput struct { - _ struct{} `type:"structure"` - - // Provides an identifier to allow retrieval of paginated results. - NextToken *string `type:"string"` - - // List of reserved Elasticsearch instances. - ReservedElasticsearchInstances []*ReservedElasticsearchInstance `type:"list"` -} - -// String returns the string representation -func (s DescribeReservedElasticsearchInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedElasticsearchInstancesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeReservedElasticsearchInstancesOutput) SetNextToken(v string) *DescribeReservedElasticsearchInstancesOutput { - s.NextToken = &v - return s -} - -// SetReservedElasticsearchInstances sets the ReservedElasticsearchInstances field's value. -func (s *DescribeReservedElasticsearchInstancesOutput) SetReservedElasticsearchInstances(v []*ReservedElasticsearchInstance) *DescribeReservedElasticsearchInstancesOutput { - s.ReservedElasticsearchInstances = v - return s -} - -type DomainInfo struct { - _ struct{} `type:"structure"` - - // Specifies the DomainName. - DomainName *string `min:"3" type:"string"` -} - -// String returns the string representation -func (s DomainInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainInfo) GoString() string { - return s.String() -} - -// SetDomainName sets the DomainName field's value. -func (s *DomainInfo) SetDomainName(v string) *DomainInfo { - s.DomainName = &v - return s -} - -// Options to enable, disable, and specify the properties of EBS storage volumes. -// For more information, see Configuring EBS-based Storage (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-ebs). -type EBSOptions struct { - _ struct{} `type:"structure"` - - // Specifies whether EBS-based storage is enabled. - EBSEnabled *bool `type:"boolean"` - - // Specifies the IOPD for a Provisioned IOPS EBS volume (SSD). - Iops *int64 `type:"integer"` - - // Integer to specify the size of an EBS volume. - VolumeSize *int64 `type:"integer"` - - // Specifies the volume type for EBS-based storage. - VolumeType *string `type:"string" enum:"VolumeType"` -} - -// String returns the string representation -func (s EBSOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EBSOptions) GoString() string { - return s.String() -} - -// SetEBSEnabled sets the EBSEnabled field's value. -func (s *EBSOptions) SetEBSEnabled(v bool) *EBSOptions { - s.EBSEnabled = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *EBSOptions) SetIops(v int64) *EBSOptions { - s.Iops = &v - return s -} - -// SetVolumeSize sets the VolumeSize field's value. -func (s *EBSOptions) SetVolumeSize(v int64) *EBSOptions { - s.VolumeSize = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *EBSOptions) SetVolumeType(v string) *EBSOptions { - s.VolumeType = &v - return s -} - -// Status of the EBS options for the specified Elasticsearch domain. -type EBSOptionsStatus struct { - _ struct{} `type:"structure"` - - // Specifies the EBS options for the specified Elasticsearch domain. - // - // Options is a required field - Options *EBSOptions `type:"structure" required:"true"` - - // Specifies the status of the EBS options for the specified Elasticsearch domain. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s EBSOptionsStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EBSOptionsStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *EBSOptionsStatus) SetOptions(v *EBSOptions) *EBSOptionsStatus { - s.Options = v - return s -} - -// SetStatus sets the Status field's value. -func (s *EBSOptionsStatus) SetStatus(v *OptionStatus) *EBSOptionsStatus { - s.Status = v - return s -} - -// Specifies the configuration for the domain cluster, such as the type and -// number of instances. -type ElasticsearchClusterConfig struct { - _ struct{} `type:"structure"` - - // Total number of dedicated master nodes, active and on standby, for the cluster. - DedicatedMasterCount *int64 `type:"integer"` - - // A boolean value to indicate whether a dedicated master node is enabled. See - // About Dedicated Master Nodes (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-managedomains.html#es-managedomains-dedicatedmasternodes) - // for more information. - DedicatedMasterEnabled *bool `type:"boolean"` - - // The instance type for a dedicated master node. - DedicatedMasterType *string `type:"string" enum:"ESPartitionInstanceType"` - - // The number of instances in the specified domain cluster. - InstanceCount *int64 `type:"integer"` - - // The instance type for an Elasticsearch cluster. - InstanceType *string `type:"string" enum:"ESPartitionInstanceType"` - - // A boolean value to indicate whether zone awareness is enabled. See About - // Zone Awareness (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-managedomains.html#es-managedomains-zoneawareness) - // for more information. - ZoneAwarenessEnabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s ElasticsearchClusterConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticsearchClusterConfig) GoString() string { - return s.String() -} - -// SetDedicatedMasterCount sets the DedicatedMasterCount field's value. -func (s *ElasticsearchClusterConfig) SetDedicatedMasterCount(v int64) *ElasticsearchClusterConfig { - s.DedicatedMasterCount = &v - return s -} - -// SetDedicatedMasterEnabled sets the DedicatedMasterEnabled field's value. -func (s *ElasticsearchClusterConfig) SetDedicatedMasterEnabled(v bool) *ElasticsearchClusterConfig { - s.DedicatedMasterEnabled = &v - return s -} - -// SetDedicatedMasterType sets the DedicatedMasterType field's value. -func (s *ElasticsearchClusterConfig) SetDedicatedMasterType(v string) *ElasticsearchClusterConfig { - s.DedicatedMasterType = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *ElasticsearchClusterConfig) SetInstanceCount(v int64) *ElasticsearchClusterConfig { - s.InstanceCount = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ElasticsearchClusterConfig) SetInstanceType(v string) *ElasticsearchClusterConfig { - s.InstanceType = &v - return s -} - -// SetZoneAwarenessEnabled sets the ZoneAwarenessEnabled field's value. -func (s *ElasticsearchClusterConfig) SetZoneAwarenessEnabled(v bool) *ElasticsearchClusterConfig { - s.ZoneAwarenessEnabled = &v - return s -} - -// Specifies the configuration status for the specified Elasticsearch domain. -type ElasticsearchClusterConfigStatus struct { - _ struct{} `type:"structure"` - - // Specifies the cluster configuration for the specified Elasticsearch domain. - // - // Options is a required field - Options *ElasticsearchClusterConfig `type:"structure" required:"true"` - - // Specifies the status of the configuration for the specified Elasticsearch - // domain. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ElasticsearchClusterConfigStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticsearchClusterConfigStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *ElasticsearchClusterConfigStatus) SetOptions(v *ElasticsearchClusterConfig) *ElasticsearchClusterConfigStatus { - s.Options = v - return s -} - -// SetStatus sets the Status field's value. -func (s *ElasticsearchClusterConfigStatus) SetStatus(v *OptionStatus) *ElasticsearchClusterConfigStatus { - s.Status = v - return s -} - -// The configuration of an Elasticsearch domain. -type ElasticsearchDomainConfig struct { - _ struct{} `type:"structure"` - - // IAM access policy as a JSON-formatted string. - AccessPolicies *AccessPoliciesStatus `type:"structure"` - - // Specifies the AdvancedOptions for the domain. See Configuring Advanced Options - // (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-advanced-options) - // for more information. - AdvancedOptions *AdvancedOptionsStatus `type:"structure"` - - // The CognitoOptions for the specified domain. For more information, see Amazon - // Cognito Authentication for Kibana (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html). - CognitoOptions *CognitoOptionsStatus `type:"structure"` - - // Specifies the EBSOptions for the Elasticsearch domain. - EBSOptions *EBSOptionsStatus `type:"structure"` - - // Specifies the ElasticsearchClusterConfig for the Elasticsearch domain. - ElasticsearchClusterConfig *ElasticsearchClusterConfigStatus `type:"structure"` - - // String of format X.Y to specify version for the Elasticsearch domain. - ElasticsearchVersion *ElasticsearchVersionStatus `type:"structure"` - - // Specifies the EncryptionAtRestOptions for the Elasticsearch domain. - EncryptionAtRestOptions *EncryptionAtRestOptionsStatus `type:"structure"` - - // Log publishing options for the given domain. - LogPublishingOptions *LogPublishingOptionsStatus `type:"structure"` - - // Specifies the NodeToNodeEncryptionOptions for the Elasticsearch domain. - NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptionsStatus `type:"structure"` - - // Specifies the SnapshotOptions for the Elasticsearch domain. - SnapshotOptions *SnapshotOptionsStatus `type:"structure"` - - // The VPCOptions for the specified domain. For more information, see VPC Endpoints - // for Amazon Elasticsearch Service Domains (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html). - VPCOptions *VPCDerivedInfoStatus `type:"structure"` -} - -// String returns the string representation -func (s ElasticsearchDomainConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticsearchDomainConfig) GoString() string { - return s.String() -} - -// SetAccessPolicies sets the AccessPolicies field's value. -func (s *ElasticsearchDomainConfig) SetAccessPolicies(v *AccessPoliciesStatus) *ElasticsearchDomainConfig { - s.AccessPolicies = v - return s -} - -// SetAdvancedOptions sets the AdvancedOptions field's value. -func (s *ElasticsearchDomainConfig) SetAdvancedOptions(v *AdvancedOptionsStatus) *ElasticsearchDomainConfig { - s.AdvancedOptions = v - return s -} - -// SetCognitoOptions sets the CognitoOptions field's value. -func (s *ElasticsearchDomainConfig) SetCognitoOptions(v *CognitoOptionsStatus) *ElasticsearchDomainConfig { - s.CognitoOptions = v - return s -} - -// SetEBSOptions sets the EBSOptions field's value. -func (s *ElasticsearchDomainConfig) SetEBSOptions(v *EBSOptionsStatus) *ElasticsearchDomainConfig { - s.EBSOptions = v - return s -} - -// SetElasticsearchClusterConfig sets the ElasticsearchClusterConfig field's value. -func (s *ElasticsearchDomainConfig) SetElasticsearchClusterConfig(v *ElasticsearchClusterConfigStatus) *ElasticsearchDomainConfig { - s.ElasticsearchClusterConfig = v - return s -} - -// SetElasticsearchVersion sets the ElasticsearchVersion field's value. -func (s *ElasticsearchDomainConfig) SetElasticsearchVersion(v *ElasticsearchVersionStatus) *ElasticsearchDomainConfig { - s.ElasticsearchVersion = v - return s -} - -// SetEncryptionAtRestOptions sets the EncryptionAtRestOptions field's value. -func (s *ElasticsearchDomainConfig) SetEncryptionAtRestOptions(v *EncryptionAtRestOptionsStatus) *ElasticsearchDomainConfig { - s.EncryptionAtRestOptions = v - return s -} - -// SetLogPublishingOptions sets the LogPublishingOptions field's value. -func (s *ElasticsearchDomainConfig) SetLogPublishingOptions(v *LogPublishingOptionsStatus) *ElasticsearchDomainConfig { - s.LogPublishingOptions = v - return s -} - -// SetNodeToNodeEncryptionOptions sets the NodeToNodeEncryptionOptions field's value. -func (s *ElasticsearchDomainConfig) SetNodeToNodeEncryptionOptions(v *NodeToNodeEncryptionOptionsStatus) *ElasticsearchDomainConfig { - s.NodeToNodeEncryptionOptions = v - return s -} - -// SetSnapshotOptions sets the SnapshotOptions field's value. -func (s *ElasticsearchDomainConfig) SetSnapshotOptions(v *SnapshotOptionsStatus) *ElasticsearchDomainConfig { - s.SnapshotOptions = v - return s -} - -// SetVPCOptions sets the VPCOptions field's value. -func (s *ElasticsearchDomainConfig) SetVPCOptions(v *VPCDerivedInfoStatus) *ElasticsearchDomainConfig { - s.VPCOptions = v - return s -} - -// The current status of an Elasticsearch domain. -type ElasticsearchDomainStatus struct { - _ struct{} `type:"structure"` - - // The Amazon resource name (ARN) of an Elasticsearch domain. See Identifiers - // for IAM Entities (http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?Using_Identifiers.html) - // in Using AWS Identity and Access Management for more information. - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // IAM access policy as a JSON-formatted string. - AccessPolicies *string `type:"string"` - - // Specifies the status of the AdvancedOptions - AdvancedOptions map[string]*string `type:"map"` - - // The CognitoOptions for the specified domain. For more information, see Amazon - // Cognito Authentication for Kibana (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html). - CognitoOptions *CognitoOptions `type:"structure"` - - // The domain creation status. True if the creation of an Elasticsearch domain - // is complete. False if domain creation is still in progress. - Created *bool `type:"boolean"` - - // The domain deletion status. True if a delete request has been received for - // the domain but resource cleanup is still in progress. False if the domain - // has not been deleted. Once domain deletion is complete, the status of the - // domain is no longer returned. - Deleted *bool `type:"boolean"` - - // The unique identifier for the specified Elasticsearch domain. - // - // DomainId is a required field - DomainId *string `min:"1" type:"string" required:"true"` - - // The name of an Elasticsearch domain. Domain names are unique across the domains - // owned by an account within an AWS region. Domain names start with a letter - // or number and can contain the following characters: a-z (lowercase), 0-9, - // and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - // The EBSOptions for the specified domain. See Configuring EBS-based Storage - // (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-ebs) - // for more information. - EBSOptions *EBSOptions `type:"structure"` - - // The type and number of instances in the domain cluster. - // - // ElasticsearchClusterConfig is a required field - ElasticsearchClusterConfig *ElasticsearchClusterConfig `type:"structure" required:"true"` - - ElasticsearchVersion *string `type:"string"` - - // Specifies the status of the EncryptionAtRestOptions. - EncryptionAtRestOptions *EncryptionAtRestOptions `type:"structure"` - - // The Elasticsearch domain endpoint that you use to submit index and search - // requests. - Endpoint *string `type:"string"` - - // Map containing the Elasticsearch domain endpoints used to submit index and - // search requests. Example key, value: 'vpc','vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.us-east-1.es.amazonaws.com'. - Endpoints map[string]*string `type:"map"` - - // Log publishing options for the given domain. - LogPublishingOptions map[string]*LogPublishingOption `type:"map"` - - // Specifies the status of the NodeToNodeEncryptionOptions. - NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptions `type:"structure"` - - // The status of the Elasticsearch domain configuration. True if Amazon Elasticsearch - // Service is processing configuration changes. False if the configuration is - // active. - Processing *bool `type:"boolean"` - - // The current status of the Elasticsearch domain's service software. - ServiceSoftwareOptions *ServiceSoftwareOptions `type:"structure"` - - // Specifies the status of the SnapshotOptions - SnapshotOptions *SnapshotOptions `type:"structure"` - - // The status of an Elasticsearch domain version upgrade. True if Amazon Elasticsearch - // Service is undergoing a version upgrade. False if the configuration is active. - UpgradeProcessing *bool `type:"boolean"` - - // The VPCOptions for the specified domain. For more information, see VPC Endpoints - // for Amazon Elasticsearch Service Domains (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html). - VPCOptions *VPCDerivedInfo `type:"structure"` -} - -// String returns the string representation -func (s ElasticsearchDomainStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticsearchDomainStatus) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *ElasticsearchDomainStatus) SetARN(v string) *ElasticsearchDomainStatus { - s.ARN = &v - return s -} - -// SetAccessPolicies sets the AccessPolicies field's value. -func (s *ElasticsearchDomainStatus) SetAccessPolicies(v string) *ElasticsearchDomainStatus { - s.AccessPolicies = &v - return s -} - -// SetAdvancedOptions sets the AdvancedOptions field's value. -func (s *ElasticsearchDomainStatus) SetAdvancedOptions(v map[string]*string) *ElasticsearchDomainStatus { - s.AdvancedOptions = v - return s -} - -// SetCognitoOptions sets the CognitoOptions field's value. -func (s *ElasticsearchDomainStatus) SetCognitoOptions(v *CognitoOptions) *ElasticsearchDomainStatus { - s.CognitoOptions = v - return s -} - -// SetCreated sets the Created field's value. -func (s *ElasticsearchDomainStatus) SetCreated(v bool) *ElasticsearchDomainStatus { - s.Created = &v - return s -} - -// SetDeleted sets the Deleted field's value. -func (s *ElasticsearchDomainStatus) SetDeleted(v bool) *ElasticsearchDomainStatus { - s.Deleted = &v - return s -} - -// SetDomainId sets the DomainId field's value. -func (s *ElasticsearchDomainStatus) SetDomainId(v string) *ElasticsearchDomainStatus { - s.DomainId = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *ElasticsearchDomainStatus) SetDomainName(v string) *ElasticsearchDomainStatus { - s.DomainName = &v - return s -} - -// SetEBSOptions sets the EBSOptions field's value. -func (s *ElasticsearchDomainStatus) SetEBSOptions(v *EBSOptions) *ElasticsearchDomainStatus { - s.EBSOptions = v - return s -} - -// SetElasticsearchClusterConfig sets the ElasticsearchClusterConfig field's value. -func (s *ElasticsearchDomainStatus) SetElasticsearchClusterConfig(v *ElasticsearchClusterConfig) *ElasticsearchDomainStatus { - s.ElasticsearchClusterConfig = v - return s -} - -// SetElasticsearchVersion sets the ElasticsearchVersion field's value. -func (s *ElasticsearchDomainStatus) SetElasticsearchVersion(v string) *ElasticsearchDomainStatus { - s.ElasticsearchVersion = &v - return s -} - -// SetEncryptionAtRestOptions sets the EncryptionAtRestOptions field's value. -func (s *ElasticsearchDomainStatus) SetEncryptionAtRestOptions(v *EncryptionAtRestOptions) *ElasticsearchDomainStatus { - s.EncryptionAtRestOptions = v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *ElasticsearchDomainStatus) SetEndpoint(v string) *ElasticsearchDomainStatus { - s.Endpoint = &v - return s -} - -// SetEndpoints sets the Endpoints field's value. -func (s *ElasticsearchDomainStatus) SetEndpoints(v map[string]*string) *ElasticsearchDomainStatus { - s.Endpoints = v - return s -} - -// SetLogPublishingOptions sets the LogPublishingOptions field's value. -func (s *ElasticsearchDomainStatus) SetLogPublishingOptions(v map[string]*LogPublishingOption) *ElasticsearchDomainStatus { - s.LogPublishingOptions = v - return s -} - -// SetNodeToNodeEncryptionOptions sets the NodeToNodeEncryptionOptions field's value. -func (s *ElasticsearchDomainStatus) SetNodeToNodeEncryptionOptions(v *NodeToNodeEncryptionOptions) *ElasticsearchDomainStatus { - s.NodeToNodeEncryptionOptions = v - return s -} - -// SetProcessing sets the Processing field's value. -func (s *ElasticsearchDomainStatus) SetProcessing(v bool) *ElasticsearchDomainStatus { - s.Processing = &v - return s -} - -// SetServiceSoftwareOptions sets the ServiceSoftwareOptions field's value. -func (s *ElasticsearchDomainStatus) SetServiceSoftwareOptions(v *ServiceSoftwareOptions) *ElasticsearchDomainStatus { - s.ServiceSoftwareOptions = v - return s -} - -// SetSnapshotOptions sets the SnapshotOptions field's value. -func (s *ElasticsearchDomainStatus) SetSnapshotOptions(v *SnapshotOptions) *ElasticsearchDomainStatus { - s.SnapshotOptions = v - return s -} - -// SetUpgradeProcessing sets the UpgradeProcessing field's value. -func (s *ElasticsearchDomainStatus) SetUpgradeProcessing(v bool) *ElasticsearchDomainStatus { - s.UpgradeProcessing = &v - return s -} - -// SetVPCOptions sets the VPCOptions field's value. -func (s *ElasticsearchDomainStatus) SetVPCOptions(v *VPCDerivedInfo) *ElasticsearchDomainStatus { - s.VPCOptions = v - return s -} - -// Status of the Elasticsearch version options for the specified Elasticsearch -// domain. -type ElasticsearchVersionStatus struct { - _ struct{} `type:"structure"` - - // Specifies the Elasticsearch version for the specified Elasticsearch domain. - // - // Options is a required field - Options *string `type:"string" required:"true"` - - // Specifies the status of the Elasticsearch version options for the specified - // Elasticsearch domain. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ElasticsearchVersionStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticsearchVersionStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *ElasticsearchVersionStatus) SetOptions(v string) *ElasticsearchVersionStatus { - s.Options = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ElasticsearchVersionStatus) SetStatus(v *OptionStatus) *ElasticsearchVersionStatus { - s.Status = v - return s -} - -// Specifies the Encryption At Rest Options. -type EncryptionAtRestOptions struct { - _ struct{} `type:"structure"` - - // Specifies the option to enable Encryption At Rest. - Enabled *bool `type:"boolean"` - - // Specifies the KMS Key ID for Encryption At Rest options. - KmsKeyId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s EncryptionAtRestOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EncryptionAtRestOptions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EncryptionAtRestOptions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EncryptionAtRestOptions"} - if s.KmsKeyId != nil && len(*s.KmsKeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KmsKeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *EncryptionAtRestOptions) SetEnabled(v bool) *EncryptionAtRestOptions { - s.Enabled = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *EncryptionAtRestOptions) SetKmsKeyId(v string) *EncryptionAtRestOptions { - s.KmsKeyId = &v - return s -} - -// Status of the Encryption At Rest options for the specified Elasticsearch -// domain. -type EncryptionAtRestOptionsStatus struct { - _ struct{} `type:"structure"` - - // Specifies the Encryption At Rest options for the specified Elasticsearch - // domain. - // - // Options is a required field - Options *EncryptionAtRestOptions `type:"structure" required:"true"` - - // Specifies the status of the Encryption At Rest options for the specified - // Elasticsearch domain. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s EncryptionAtRestOptionsStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EncryptionAtRestOptionsStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *EncryptionAtRestOptionsStatus) SetOptions(v *EncryptionAtRestOptions) *EncryptionAtRestOptionsStatus { - s.Options = v - return s -} - -// SetStatus sets the Status field's value. -func (s *EncryptionAtRestOptionsStatus) SetStatus(v *OptionStatus) *EncryptionAtRestOptionsStatus { - s.Status = v - return s -} - -// Container for request parameters to GetCompatibleElasticsearchVersions operation. -type GetCompatibleElasticsearchVersionsInput struct { - _ struct{} `type:"structure"` - - // The name of an Elasticsearch domain. Domain names are unique across the domains - // owned by an account within an AWS region. Domain names start with a letter - // or number and can contain the following characters: a-z (lowercase), 0-9, - // and - (hyphen). - DomainName *string `location:"querystring" locationName:"domainName" min:"3" type:"string"` -} - -// String returns the string representation -func (s GetCompatibleElasticsearchVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCompatibleElasticsearchVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCompatibleElasticsearchVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCompatibleElasticsearchVersionsInput"} - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *GetCompatibleElasticsearchVersionsInput) SetDomainName(v string) *GetCompatibleElasticsearchVersionsInput { - s.DomainName = &v - return s -} - -// Container for response returned by GetCompatibleElasticsearchVersions operation. -type GetCompatibleElasticsearchVersionsOutput struct { - _ struct{} `type:"structure"` - - // A map of compatible Elasticsearch versions returned as part of the GetCompatibleElasticsearchVersions - // operation. - CompatibleElasticsearchVersions []*CompatibleVersionsMap `type:"list"` -} - -// String returns the string representation -func (s GetCompatibleElasticsearchVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCompatibleElasticsearchVersionsOutput) GoString() string { - return s.String() -} - -// SetCompatibleElasticsearchVersions sets the CompatibleElasticsearchVersions field's value. -func (s *GetCompatibleElasticsearchVersionsOutput) SetCompatibleElasticsearchVersions(v []*CompatibleVersionsMap) *GetCompatibleElasticsearchVersionsOutput { - s.CompatibleElasticsearchVersions = v - return s -} - -// Container for request parameters to GetUpgradeHistory operation. -type GetUpgradeHistoryInput struct { - _ struct{} `type:"structure"` - - // The name of an Elasticsearch domain. Domain names are unique across the domains - // owned by an account within an AWS region. Domain names start with a letter - // or number and can contain the following characters: a-z (lowercase), 0-9, - // and - (hyphen). - // - // DomainName is a required field - DomainName *string `location:"uri" locationName:"DomainName" min:"3" type:"string" required:"true"` - - // Set this value to limit the number of results returned. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` - - // Paginated APIs accepts NextToken input to returns next page results and provides - // a NextToken output in the response which can be used by the client to retrieve - // more results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetUpgradeHistoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUpgradeHistoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUpgradeHistoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUpgradeHistoryInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *GetUpgradeHistoryInput) SetDomainName(v string) *GetUpgradeHistoryInput { - s.DomainName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetUpgradeHistoryInput) SetMaxResults(v int64) *GetUpgradeHistoryInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetUpgradeHistoryInput) SetNextToken(v string) *GetUpgradeHistoryInput { - s.NextToken = &v - return s -} - -// Container for response returned by GetUpgradeHistory operation. -type GetUpgradeHistoryOutput struct { - _ struct{} `type:"structure"` - - // Pagination token that needs to be supplied to the next call to get the next - // page of results - NextToken *string `type:"string"` - - // A list of UpgradeHistory objects corresponding to each Upgrade or Upgrade - // Eligibility Check performed on a domain returned as part of GetUpgradeHistoryResponse - // object. - UpgradeHistories []*UpgradeHistory `type:"list"` -} - -// String returns the string representation -func (s GetUpgradeHistoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUpgradeHistoryOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetUpgradeHistoryOutput) SetNextToken(v string) *GetUpgradeHistoryOutput { - s.NextToken = &v - return s -} - -// SetUpgradeHistories sets the UpgradeHistories field's value. -func (s *GetUpgradeHistoryOutput) SetUpgradeHistories(v []*UpgradeHistory) *GetUpgradeHistoryOutput { - s.UpgradeHistories = v - return s -} - -// Container for request parameters to GetUpgradeStatus operation. -type GetUpgradeStatusInput struct { - _ struct{} `type:"structure"` - - // The name of an Elasticsearch domain. Domain names are unique across the domains - // owned by an account within an AWS region. Domain names start with a letter - // or number and can contain the following characters: a-z (lowercase), 0-9, - // and - (hyphen). - // - // DomainName is a required field - DomainName *string `location:"uri" locationName:"DomainName" min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetUpgradeStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUpgradeStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUpgradeStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUpgradeStatusInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *GetUpgradeStatusInput) SetDomainName(v string) *GetUpgradeStatusInput { - s.DomainName = &v - return s -} - -// Container for response returned by GetUpgradeStatus operation. -type GetUpgradeStatusOutput struct { - _ struct{} `type:"structure"` - - // One of 4 statuses that a step can go through returned as part of the GetUpgradeStatusResponse - // object. The status can take one of the following values: In Progress - // Succeeded - // Succeeded with Issues - // Failed - StepStatus *string `type:"string" enum:"UpgradeStatus"` - - // A string that describes the update briefly - UpgradeName *string `type:"string"` - - // Represents one of 3 steps that an Upgrade or Upgrade Eligibility Check does - // through: PreUpgradeCheck - // Snapshot - // Upgrade - UpgradeStep *string `type:"string" enum:"UpgradeStep"` -} - -// String returns the string representation -func (s GetUpgradeStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUpgradeStatusOutput) GoString() string { - return s.String() -} - -// SetStepStatus sets the StepStatus field's value. -func (s *GetUpgradeStatusOutput) SetStepStatus(v string) *GetUpgradeStatusOutput { - s.StepStatus = &v - return s -} - -// SetUpgradeName sets the UpgradeName field's value. -func (s *GetUpgradeStatusOutput) SetUpgradeName(v string) *GetUpgradeStatusOutput { - s.UpgradeName = &v - return s -} - -// SetUpgradeStep sets the UpgradeStep field's value. -func (s *GetUpgradeStatusOutput) SetUpgradeStep(v string) *GetUpgradeStatusOutput { - s.UpgradeStep = &v - return s -} - -// InstanceCountLimits represents the limits on number of instances that be -// created in Amazon Elasticsearch for given InstanceType. -type InstanceCountLimits struct { - _ struct{} `type:"structure"` - - // Maximum number of Instances that can be instantiated for given InstanceType. - MaximumInstanceCount *int64 `type:"integer"` - - // Minimum number of Instances that can be instantiated for given InstanceType. - MinimumInstanceCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s InstanceCountLimits) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceCountLimits) GoString() string { - return s.String() -} - -// SetMaximumInstanceCount sets the MaximumInstanceCount field's value. -func (s *InstanceCountLimits) SetMaximumInstanceCount(v int64) *InstanceCountLimits { - s.MaximumInstanceCount = &v - return s -} - -// SetMinimumInstanceCount sets the MinimumInstanceCount field's value. -func (s *InstanceCountLimits) SetMinimumInstanceCount(v int64) *InstanceCountLimits { - s.MinimumInstanceCount = &v - return s -} - -// InstanceLimits represents the list of instance related attributes that are -// available for given InstanceType. -type InstanceLimits struct { - _ struct{} `type:"structure"` - - // InstanceCountLimits represents the limits on number of instances that be - // created in Amazon Elasticsearch for given InstanceType. - InstanceCountLimits *InstanceCountLimits `type:"structure"` -} - -// String returns the string representation -func (s InstanceLimits) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceLimits) GoString() string { - return s.String() -} - -// SetInstanceCountLimits sets the InstanceCountLimits field's value. -func (s *InstanceLimits) SetInstanceCountLimits(v *InstanceCountLimits) *InstanceLimits { - s.InstanceCountLimits = v - return s -} - -// Limits for given InstanceType and for each of it's role. Limits contains following StorageTypes, InstanceLimitsand AdditionalLimits -type Limits struct { - _ struct{} `type:"structure"` - - // List of additional limits that are specific to a given InstanceType and for - // each of it's InstanceRole . - AdditionalLimits []*AdditionalLimit `type:"list"` - - // InstanceLimits represents the list of instance related attributes that are - // available for given InstanceType. - InstanceLimits *InstanceLimits `type:"structure"` - - // StorageType represents the list of storage related types and attributes that - // are available for given InstanceType. - StorageTypes []*StorageType `type:"list"` -} - -// String returns the string representation -func (s Limits) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Limits) GoString() string { - return s.String() -} - -// SetAdditionalLimits sets the AdditionalLimits field's value. -func (s *Limits) SetAdditionalLimits(v []*AdditionalLimit) *Limits { - s.AdditionalLimits = v - return s -} - -// SetInstanceLimits sets the InstanceLimits field's value. -func (s *Limits) SetInstanceLimits(v *InstanceLimits) *Limits { - s.InstanceLimits = v - return s -} - -// SetStorageTypes sets the StorageTypes field's value. -func (s *Limits) SetStorageTypes(v []*StorageType) *Limits { - s.StorageTypes = v - return s -} - -type ListDomainNamesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ListDomainNamesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDomainNamesInput) GoString() string { - return s.String() -} - -// The result of a ListDomainNames operation. Contains the names of all Elasticsearch -// domains owned by this account. -type ListDomainNamesOutput struct { - _ struct{} `type:"structure"` - - // List of Elasticsearch domain names. - DomainNames []*DomainInfo `type:"list"` -} - -// String returns the string representation -func (s ListDomainNamesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDomainNamesOutput) GoString() string { - return s.String() -} - -// SetDomainNames sets the DomainNames field's value. -func (s *ListDomainNamesOutput) SetDomainNames(v []*DomainInfo) *ListDomainNamesOutput { - s.DomainNames = v - return s -} - -// Container for the parameters to the ListElasticsearchInstanceTypes operation. -type ListElasticsearchInstanceTypesInput struct { - _ struct{} `type:"structure"` - - // DomainName represents the name of the Domain that we are trying to modify. - // This should be present only if we are querying for list of available Elasticsearch - // instance types when modifying existing domain. - DomainName *string `location:"querystring" locationName:"domainName" min:"3" type:"string"` - - // Version of Elasticsearch for which list of supported elasticsearch instance - // types are needed. - // - // ElasticsearchVersion is a required field - ElasticsearchVersion *string `location:"uri" locationName:"ElasticsearchVersion" type:"string" required:"true"` - - // Set this value to limit the number of results returned. Value provided must - // be greater than 30 else it wont be honored. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` - - // NextToken should be sent in case if earlier API call produced result containing - // NextToken. It is used for pagination. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListElasticsearchInstanceTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListElasticsearchInstanceTypesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListElasticsearchInstanceTypesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListElasticsearchInstanceTypesInput"} - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.ElasticsearchVersion == nil { - invalidParams.Add(request.NewErrParamRequired("ElasticsearchVersion")) - } - if s.ElasticsearchVersion != nil && len(*s.ElasticsearchVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ElasticsearchVersion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *ListElasticsearchInstanceTypesInput) SetDomainName(v string) *ListElasticsearchInstanceTypesInput { - s.DomainName = &v - return s -} - -// SetElasticsearchVersion sets the ElasticsearchVersion field's value. -func (s *ListElasticsearchInstanceTypesInput) SetElasticsearchVersion(v string) *ListElasticsearchInstanceTypesInput { - s.ElasticsearchVersion = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListElasticsearchInstanceTypesInput) SetMaxResults(v int64) *ListElasticsearchInstanceTypesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListElasticsearchInstanceTypesInput) SetNextToken(v string) *ListElasticsearchInstanceTypesInput { - s.NextToken = &v - return s -} - -// Container for the parameters returned by ListElasticsearchInstanceTypes operation. -type ListElasticsearchInstanceTypesOutput struct { - _ struct{} `type:"structure"` - - // List of instance types supported by Amazon Elasticsearch service for given - // ElasticsearchVersion - ElasticsearchInstanceTypes []*string `type:"list"` - - // In case if there are more results available NextToken would be present, make - // further request to the same API with received NextToken to paginate remaining - // results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListElasticsearchInstanceTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListElasticsearchInstanceTypesOutput) GoString() string { - return s.String() -} - -// SetElasticsearchInstanceTypes sets the ElasticsearchInstanceTypes field's value. -func (s *ListElasticsearchInstanceTypesOutput) SetElasticsearchInstanceTypes(v []*string) *ListElasticsearchInstanceTypesOutput { - s.ElasticsearchInstanceTypes = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListElasticsearchInstanceTypesOutput) SetNextToken(v string) *ListElasticsearchInstanceTypesOutput { - s.NextToken = &v - return s -} - -// Container for the parameters to the ListElasticsearchVersions operation. -// Use MaxResults to control the maximum number of results to retrieve in a -// single call. -// -// Use NextToken in response to retrieve more results. If the received response -// does not contain a NextToken, then there are no more results to retrieve. -type ListElasticsearchVersionsInput struct { - _ struct{} `type:"structure"` - - // Set this value to limit the number of results returned. Value provided must - // be greater than 10 else it wont be honored. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` - - // Paginated APIs accepts NextToken input to returns next page results and provides - // a NextToken output in the response which can be used by the client to retrieve - // more results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListElasticsearchVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListElasticsearchVersionsInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListElasticsearchVersionsInput) SetMaxResults(v int64) *ListElasticsearchVersionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListElasticsearchVersionsInput) SetNextToken(v string) *ListElasticsearchVersionsInput { - s.NextToken = &v - return s -} - -// Container for the parameters for response received from ListElasticsearchVersions -// operation. -type ListElasticsearchVersionsOutput struct { - _ struct{} `type:"structure"` - - // List of supported elastic search versions. - ElasticsearchVersions []*string `type:"list"` - - // Paginated APIs accepts NextToken input to returns next page results and provides - // a NextToken output in the response which can be used by the client to retrieve - // more results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListElasticsearchVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListElasticsearchVersionsOutput) GoString() string { - return s.String() -} - -// SetElasticsearchVersions sets the ElasticsearchVersions field's value. -func (s *ListElasticsearchVersionsOutput) SetElasticsearchVersions(v []*string) *ListElasticsearchVersionsOutput { - s.ElasticsearchVersions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListElasticsearchVersionsOutput) SetNextToken(v string) *ListElasticsearchVersionsOutput { - s.NextToken = &v - return s -} - -// Container for the parameters to the ListTags operation. Specify the ARN for -// the Elasticsearch domain to which the tags are attached that you want to -// view are attached. -type ListTagsInput struct { - _ struct{} `type:"structure"` - - // Specify the ARN for the Elasticsearch domain to which the tags are attached - // that you want to view. - // - // ARN is a required field - ARN *string `location:"querystring" locationName:"arn" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} - if s.ARN == nil { - invalidParams.Add(request.NewErrParamRequired("ARN")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetARN sets the ARN field's value. -func (s *ListTagsInput) SetARN(v string) *ListTagsInput { - s.ARN = &v - return s -} - -// The result of a ListTags operation. Contains tags for all requested Elasticsearch -// domains. -type ListTagsOutput struct { - _ struct{} `type:"structure"` - - // List of Tag for the requested Elasticsearch domain. - TagList []*Tag `type:"list"` -} - -// String returns the string representation -func (s ListTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsOutput) GoString() string { - return s.String() -} - -// SetTagList sets the TagList field's value. -func (s *ListTagsOutput) SetTagList(v []*Tag) *ListTagsOutput { - s.TagList = v - return s -} - -// Log Publishing option that is set for given domain. Attributes and their details: CloudWatchLogsLogGroupArn: ARN of the Cloudwatch -// log group to which log needs to be published. -// Enabled: Whether the log publishing for given log type is enabled or not -type LogPublishingOption struct { - _ struct{} `type:"structure"` - - // ARN of the Cloudwatch log group to which log needs to be published. - CloudWatchLogsLogGroupArn *string `type:"string"` - - // Specifies whether given log publishing option is enabled or not. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s LogPublishingOption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LogPublishingOption) GoString() string { - return s.String() -} - -// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value. -func (s *LogPublishingOption) SetCloudWatchLogsLogGroupArn(v string) *LogPublishingOption { - s.CloudWatchLogsLogGroupArn = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *LogPublishingOption) SetEnabled(v bool) *LogPublishingOption { - s.Enabled = &v - return s -} - -// The configured log publishing options for the domain and their current status. -type LogPublishingOptionsStatus struct { - _ struct{} `type:"structure"` - - // The log publishing options configured for the Elasticsearch domain. - Options map[string]*LogPublishingOption `type:"map"` - - // The status of the log publishing options for the Elasticsearch domain. See - // OptionStatus for the status information that's included. - Status *OptionStatus `type:"structure"` -} - -// String returns the string representation -func (s LogPublishingOptionsStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LogPublishingOptionsStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *LogPublishingOptionsStatus) SetOptions(v map[string]*LogPublishingOption) *LogPublishingOptionsStatus { - s.Options = v - return s -} - -// SetStatus sets the Status field's value. -func (s *LogPublishingOptionsStatus) SetStatus(v *OptionStatus) *LogPublishingOptionsStatus { - s.Status = v - return s -} - -// Specifies the node-to-node encryption options. -type NodeToNodeEncryptionOptions struct { - _ struct{} `type:"structure"` - - // Specify true to enable node-to-node encryption. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s NodeToNodeEncryptionOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NodeToNodeEncryptionOptions) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *NodeToNodeEncryptionOptions) SetEnabled(v bool) *NodeToNodeEncryptionOptions { - s.Enabled = &v - return s -} - -// Status of the node-to-node encryption options for the specified Elasticsearch -// domain. -type NodeToNodeEncryptionOptionsStatus struct { - _ struct{} `type:"structure"` - - // Specifies the node-to-node encryption options for the specified Elasticsearch - // domain. - // - // Options is a required field - Options *NodeToNodeEncryptionOptions `type:"structure" required:"true"` - - // Specifies the status of the node-to-node encryption options for the specified - // Elasticsearch domain. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s NodeToNodeEncryptionOptionsStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NodeToNodeEncryptionOptionsStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *NodeToNodeEncryptionOptionsStatus) SetOptions(v *NodeToNodeEncryptionOptions) *NodeToNodeEncryptionOptionsStatus { - s.Options = v - return s -} - -// SetStatus sets the Status field's value. -func (s *NodeToNodeEncryptionOptionsStatus) SetStatus(v *OptionStatus) *NodeToNodeEncryptionOptionsStatus { - s.Status = v - return s -} - -// Provides the current status of the entity. -type OptionStatus struct { - _ struct{} `type:"structure"` - - // Timestamp which tells the creation date for the entity. - // - // CreationDate is a required field - CreationDate *time.Time `type:"timestamp" required:"true"` - - // Indicates whether the Elasticsearch domain is being deleted. - PendingDeletion *bool `type:"boolean"` - - // Provides the OptionState for the Elasticsearch domain. - // - // State is a required field - State *string `type:"string" required:"true" enum:"OptionState"` - - // Timestamp which tells the last updated time for the entity. - // - // UpdateDate is a required field - UpdateDate *time.Time `type:"timestamp" required:"true"` - - // Specifies the latest version for the entity. - UpdateVersion *int64 `type:"integer"` -} - -// String returns the string representation -func (s OptionStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OptionStatus) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *OptionStatus) SetCreationDate(v time.Time) *OptionStatus { - s.CreationDate = &v - return s -} - -// SetPendingDeletion sets the PendingDeletion field's value. -func (s *OptionStatus) SetPendingDeletion(v bool) *OptionStatus { - s.PendingDeletion = &v - return s -} - -// SetState sets the State field's value. -func (s *OptionStatus) SetState(v string) *OptionStatus { - s.State = &v - return s -} - -// SetUpdateDate sets the UpdateDate field's value. -func (s *OptionStatus) SetUpdateDate(v time.Time) *OptionStatus { - s.UpdateDate = &v - return s -} - -// SetUpdateVersion sets the UpdateVersion field's value. -func (s *OptionStatus) SetUpdateVersion(v int64) *OptionStatus { - s.UpdateVersion = &v - return s -} - -// Container for parameters to PurchaseReservedElasticsearchInstanceOffering -type PurchaseReservedElasticsearchInstanceOfferingInput struct { - _ struct{} `type:"structure"` - - // The number of Elasticsearch instances to reserve. - InstanceCount *int64 `min:"1" type:"integer"` - - // A customer-specified identifier to track this reservation. - // - // ReservationName is a required field - ReservationName *string `min:"5" type:"string" required:"true"` - - // The ID of the reserved Elasticsearch instance offering to purchase. - // - // ReservedElasticsearchInstanceOfferingId is a required field - ReservedElasticsearchInstanceOfferingId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PurchaseReservedElasticsearchInstanceOfferingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseReservedElasticsearchInstanceOfferingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseReservedElasticsearchInstanceOfferingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseReservedElasticsearchInstanceOfferingInput"} - if s.InstanceCount != nil && *s.InstanceCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("InstanceCount", 1)) - } - if s.ReservationName == nil { - invalidParams.Add(request.NewErrParamRequired("ReservationName")) - } - if s.ReservationName != nil && len(*s.ReservationName) < 5 { - invalidParams.Add(request.NewErrParamMinLen("ReservationName", 5)) - } - if s.ReservedElasticsearchInstanceOfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedElasticsearchInstanceOfferingId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *PurchaseReservedElasticsearchInstanceOfferingInput) SetInstanceCount(v int64) *PurchaseReservedElasticsearchInstanceOfferingInput { - s.InstanceCount = &v - return s -} - -// SetReservationName sets the ReservationName field's value. -func (s *PurchaseReservedElasticsearchInstanceOfferingInput) SetReservationName(v string) *PurchaseReservedElasticsearchInstanceOfferingInput { - s.ReservationName = &v - return s -} - -// SetReservedElasticsearchInstanceOfferingId sets the ReservedElasticsearchInstanceOfferingId field's value. -func (s *PurchaseReservedElasticsearchInstanceOfferingInput) SetReservedElasticsearchInstanceOfferingId(v string) *PurchaseReservedElasticsearchInstanceOfferingInput { - s.ReservedElasticsearchInstanceOfferingId = &v - return s -} - -// Represents the output of a PurchaseReservedElasticsearchInstanceOffering -// operation. -type PurchaseReservedElasticsearchInstanceOfferingOutput struct { - _ struct{} `type:"structure"` - - // The customer-specified identifier used to track this reservation. - ReservationName *string `min:"5" type:"string"` - - // Details of the reserved Elasticsearch instance which was purchased. - ReservedElasticsearchInstanceId *string `type:"string"` -} - -// String returns the string representation -func (s PurchaseReservedElasticsearchInstanceOfferingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseReservedElasticsearchInstanceOfferingOutput) GoString() string { - return s.String() -} - -// SetReservationName sets the ReservationName field's value. -func (s *PurchaseReservedElasticsearchInstanceOfferingOutput) SetReservationName(v string) *PurchaseReservedElasticsearchInstanceOfferingOutput { - s.ReservationName = &v - return s -} - -// SetReservedElasticsearchInstanceId sets the ReservedElasticsearchInstanceId field's value. -func (s *PurchaseReservedElasticsearchInstanceOfferingOutput) SetReservedElasticsearchInstanceId(v string) *PurchaseReservedElasticsearchInstanceOfferingOutput { - s.ReservedElasticsearchInstanceId = &v - return s -} - -// Contains the specific price and frequency of a recurring charges for a reserved -// Elasticsearch instance, or for a reserved Elasticsearch instance offering. -type RecurringCharge struct { - _ struct{} `type:"structure"` - - // The monetary amount of the recurring charge. - RecurringChargeAmount *float64 `type:"double"` - - // The frequency of the recurring charge. - RecurringChargeFrequency *string `type:"string"` -} - -// String returns the string representation -func (s RecurringCharge) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecurringCharge) GoString() string { - return s.String() -} - -// SetRecurringChargeAmount sets the RecurringChargeAmount field's value. -func (s *RecurringCharge) SetRecurringChargeAmount(v float64) *RecurringCharge { - s.RecurringChargeAmount = &v - return s -} - -// SetRecurringChargeFrequency sets the RecurringChargeFrequency field's value. -func (s *RecurringCharge) SetRecurringChargeFrequency(v string) *RecurringCharge { - s.RecurringChargeFrequency = &v - return s -} - -// Container for the parameters to the RemoveTags operation. Specify the ARN -// for the Elasticsearch domain from which you want to remove the specified -// TagKey. -type RemoveTagsInput struct { - _ struct{} `type:"structure"` - - // Specifies the ARN for the Elasticsearch domain from which you want to delete - // the specified tags. - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // Specifies the TagKey list which you want to remove from the Elasticsearch - // domain. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"} - if s.ARN == nil { - invalidParams.Add(request.NewErrParamRequired("ARN")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetARN sets the ARN field's value. -func (s *RemoveTagsInput) SetARN(v string) *RemoveTagsInput { - s.ARN = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsInput) SetTagKeys(v []*string) *RemoveTagsInput { - s.TagKeys = v - return s -} - -type RemoveTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsOutput) GoString() string { - return s.String() -} - -// Details of a reserved Elasticsearch instance. -type ReservedElasticsearchInstance struct { - _ struct{} `type:"structure"` - - // The currency code for the reserved Elasticsearch instance offering. - CurrencyCode *string `type:"string"` - - // The duration, in seconds, for which the Elasticsearch instance is reserved. - Duration *int64 `type:"integer"` - - // The number of Elasticsearch instances that have been reserved. - ElasticsearchInstanceCount *int64 `type:"integer"` - - // The Elasticsearch instance type offered by the reserved instance offering. - ElasticsearchInstanceType *string `type:"string" enum:"ESPartitionInstanceType"` - - // The upfront fixed charge you will paid to purchase the specific reserved - // Elasticsearch instance offering. - FixedPrice *float64 `type:"double"` - - // The payment option as defined in the reserved Elasticsearch instance offering. - PaymentOption *string `type:"string" enum:"ReservedElasticsearchInstancePaymentOption"` - - // The charge to your account regardless of whether you are creating any domains - // using the instance offering. - RecurringCharges []*RecurringCharge `type:"list"` - - // The customer-specified identifier to track this reservation. - ReservationName *string `min:"5" type:"string"` - - // The unique identifier for the reservation. - ReservedElasticsearchInstanceId *string `type:"string"` - - // The offering identifier. - ReservedElasticsearchInstanceOfferingId *string `type:"string"` - - // The time the reservation started. - StartTime *time.Time `type:"timestamp"` - - // The state of the reserved Elasticsearch instance. - State *string `type:"string"` - - // The rate you are charged for each hour for the domain that is using this - // reserved instance. - UsagePrice *float64 `type:"double"` -} - -// String returns the string representation -func (s ReservedElasticsearchInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedElasticsearchInstance) GoString() string { - return s.String() -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *ReservedElasticsearchInstance) SetCurrencyCode(v string) *ReservedElasticsearchInstance { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *ReservedElasticsearchInstance) SetDuration(v int64) *ReservedElasticsearchInstance { - s.Duration = &v - return s -} - -// SetElasticsearchInstanceCount sets the ElasticsearchInstanceCount field's value. -func (s *ReservedElasticsearchInstance) SetElasticsearchInstanceCount(v int64) *ReservedElasticsearchInstance { - s.ElasticsearchInstanceCount = &v - return s -} - -// SetElasticsearchInstanceType sets the ElasticsearchInstanceType field's value. -func (s *ReservedElasticsearchInstance) SetElasticsearchInstanceType(v string) *ReservedElasticsearchInstance { - s.ElasticsearchInstanceType = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *ReservedElasticsearchInstance) SetFixedPrice(v float64) *ReservedElasticsearchInstance { - s.FixedPrice = &v - return s -} - -// SetPaymentOption sets the PaymentOption field's value. -func (s *ReservedElasticsearchInstance) SetPaymentOption(v string) *ReservedElasticsearchInstance { - s.PaymentOption = &v - return s -} - -// SetRecurringCharges sets the RecurringCharges field's value. -func (s *ReservedElasticsearchInstance) SetRecurringCharges(v []*RecurringCharge) *ReservedElasticsearchInstance { - s.RecurringCharges = v - return s -} - -// SetReservationName sets the ReservationName field's value. -func (s *ReservedElasticsearchInstance) SetReservationName(v string) *ReservedElasticsearchInstance { - s.ReservationName = &v - return s -} - -// SetReservedElasticsearchInstanceId sets the ReservedElasticsearchInstanceId field's value. -func (s *ReservedElasticsearchInstance) SetReservedElasticsearchInstanceId(v string) *ReservedElasticsearchInstance { - s.ReservedElasticsearchInstanceId = &v - return s -} - -// SetReservedElasticsearchInstanceOfferingId sets the ReservedElasticsearchInstanceOfferingId field's value. -func (s *ReservedElasticsearchInstance) SetReservedElasticsearchInstanceOfferingId(v string) *ReservedElasticsearchInstance { - s.ReservedElasticsearchInstanceOfferingId = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *ReservedElasticsearchInstance) SetStartTime(v time.Time) *ReservedElasticsearchInstance { - s.StartTime = &v - return s -} - -// SetState sets the State field's value. -func (s *ReservedElasticsearchInstance) SetState(v string) *ReservedElasticsearchInstance { - s.State = &v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *ReservedElasticsearchInstance) SetUsagePrice(v float64) *ReservedElasticsearchInstance { - s.UsagePrice = &v - return s -} - -// Details of a reserved Elasticsearch instance offering. -type ReservedElasticsearchInstanceOffering struct { - _ struct{} `type:"structure"` - - // The currency code for the reserved Elasticsearch instance offering. - CurrencyCode *string `type:"string"` - - // The duration, in seconds, for which the offering will reserve the Elasticsearch - // instance. - Duration *int64 `type:"integer"` - - // The Elasticsearch instance type offered by the reserved instance offering. - ElasticsearchInstanceType *string `type:"string" enum:"ESPartitionInstanceType"` - - // The upfront fixed charge you will pay to purchase the specific reserved Elasticsearch - // instance offering. - FixedPrice *float64 `type:"double"` - - // Payment option for the reserved Elasticsearch instance offering - PaymentOption *string `type:"string" enum:"ReservedElasticsearchInstancePaymentOption"` - - // The charge to your account regardless of whether you are creating any domains - // using the instance offering. - RecurringCharges []*RecurringCharge `type:"list"` - - // The Elasticsearch reserved instance offering identifier. - ReservedElasticsearchInstanceOfferingId *string `type:"string"` - - // The rate you are charged for each hour the domain that is using the offering - // is running. - UsagePrice *float64 `type:"double"` -} - -// String returns the string representation -func (s ReservedElasticsearchInstanceOffering) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedElasticsearchInstanceOffering) GoString() string { - return s.String() -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *ReservedElasticsearchInstanceOffering) SetCurrencyCode(v string) *ReservedElasticsearchInstanceOffering { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *ReservedElasticsearchInstanceOffering) SetDuration(v int64) *ReservedElasticsearchInstanceOffering { - s.Duration = &v - return s -} - -// SetElasticsearchInstanceType sets the ElasticsearchInstanceType field's value. -func (s *ReservedElasticsearchInstanceOffering) SetElasticsearchInstanceType(v string) *ReservedElasticsearchInstanceOffering { - s.ElasticsearchInstanceType = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *ReservedElasticsearchInstanceOffering) SetFixedPrice(v float64) *ReservedElasticsearchInstanceOffering { - s.FixedPrice = &v - return s -} - -// SetPaymentOption sets the PaymentOption field's value. -func (s *ReservedElasticsearchInstanceOffering) SetPaymentOption(v string) *ReservedElasticsearchInstanceOffering { - s.PaymentOption = &v - return s -} - -// SetRecurringCharges sets the RecurringCharges field's value. -func (s *ReservedElasticsearchInstanceOffering) SetRecurringCharges(v []*RecurringCharge) *ReservedElasticsearchInstanceOffering { - s.RecurringCharges = v - return s -} - -// SetReservedElasticsearchInstanceOfferingId sets the ReservedElasticsearchInstanceOfferingId field's value. -func (s *ReservedElasticsearchInstanceOffering) SetReservedElasticsearchInstanceOfferingId(v string) *ReservedElasticsearchInstanceOffering { - s.ReservedElasticsearchInstanceOfferingId = &v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *ReservedElasticsearchInstanceOffering) SetUsagePrice(v float64) *ReservedElasticsearchInstanceOffering { - s.UsagePrice = &v - return s -} - -// The current options of an Elasticsearch domain service software options. -type ServiceSoftwareOptions struct { - _ struct{} `type:"structure"` - - // Timestamp, in Epoch time, until which you can manually request a service - // software update. After this date, we automatically update your service software. - AutomatedUpdateDate *time.Time `type:"timestamp"` - - // True if you are able to cancel your service software version update. False - // if you are not able to cancel your service software version. - Cancellable *bool `type:"boolean"` - - // The current service software version that is present on the domain. - CurrentVersion *string `type:"string"` - - // The description of the UpdateStatus. - Description *string `type:"string"` - - // The new service software version if one is available. - NewVersion *string `type:"string"` - - // True if you are able to update you service software version. False if you - // are not able to update your service software version. - UpdateAvailable *bool `type:"boolean"` - - // The status of your service software update. This field can take the following - // values: ELIGIBLE, PENDING_UPDATE, IN_PROGRESS, COMPLETED, and NOT_ELIGIBLE. - UpdateStatus *string `type:"string" enum:"DeploymentStatus"` -} - -// String returns the string representation -func (s ServiceSoftwareOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceSoftwareOptions) GoString() string { - return s.String() -} - -// SetAutomatedUpdateDate sets the AutomatedUpdateDate field's value. -func (s *ServiceSoftwareOptions) SetAutomatedUpdateDate(v time.Time) *ServiceSoftwareOptions { - s.AutomatedUpdateDate = &v - return s -} - -// SetCancellable sets the Cancellable field's value. -func (s *ServiceSoftwareOptions) SetCancellable(v bool) *ServiceSoftwareOptions { - s.Cancellable = &v - return s -} - -// SetCurrentVersion sets the CurrentVersion field's value. -func (s *ServiceSoftwareOptions) SetCurrentVersion(v string) *ServiceSoftwareOptions { - s.CurrentVersion = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ServiceSoftwareOptions) SetDescription(v string) *ServiceSoftwareOptions { - s.Description = &v - return s -} - -// SetNewVersion sets the NewVersion field's value. -func (s *ServiceSoftwareOptions) SetNewVersion(v string) *ServiceSoftwareOptions { - s.NewVersion = &v - return s -} - -// SetUpdateAvailable sets the UpdateAvailable field's value. -func (s *ServiceSoftwareOptions) SetUpdateAvailable(v bool) *ServiceSoftwareOptions { - s.UpdateAvailable = &v - return s -} - -// SetUpdateStatus sets the UpdateStatus field's value. -func (s *ServiceSoftwareOptions) SetUpdateStatus(v string) *ServiceSoftwareOptions { - s.UpdateStatus = &v - return s -} - -// Specifies the time, in UTC format, when the service takes a daily automated -// snapshot of the specified Elasticsearch domain. Default value is 0 hours. -type SnapshotOptions struct { - _ struct{} `type:"structure"` - - // Specifies the time, in UTC format, when the service takes a daily automated - // snapshot of the specified Elasticsearch domain. Default value is 0 hours. - AutomatedSnapshotStartHour *int64 `type:"integer"` -} - -// String returns the string representation -func (s SnapshotOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SnapshotOptions) GoString() string { - return s.String() -} - -// SetAutomatedSnapshotStartHour sets the AutomatedSnapshotStartHour field's value. -func (s *SnapshotOptions) SetAutomatedSnapshotStartHour(v int64) *SnapshotOptions { - s.AutomatedSnapshotStartHour = &v - return s -} - -// Status of a daily automated snapshot. -type SnapshotOptionsStatus struct { - _ struct{} `type:"structure"` - - // Specifies the daily snapshot options specified for the Elasticsearch domain. - // - // Options is a required field - Options *SnapshotOptions `type:"structure" required:"true"` - - // Specifies the status of a daily automated snapshot. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s SnapshotOptionsStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SnapshotOptionsStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *SnapshotOptionsStatus) SetOptions(v *SnapshotOptions) *SnapshotOptionsStatus { - s.Options = v - return s -} - -// SetStatus sets the Status field's value. -func (s *SnapshotOptionsStatus) SetStatus(v *OptionStatus) *SnapshotOptionsStatus { - s.Status = v - return s -} - -// Container for the parameters to the StartElasticsearchServiceSoftwareUpdate -// operation. Specifies the name of the Elasticsearch domain that you wish to -// schedule a service software update on. -type StartElasticsearchServiceSoftwareUpdateInput struct { - _ struct{} `type:"structure"` - - // The name of the domain that you want to update to the latest service software. - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartElasticsearchServiceSoftwareUpdateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartElasticsearchServiceSoftwareUpdateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartElasticsearchServiceSoftwareUpdateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartElasticsearchServiceSoftwareUpdateInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *StartElasticsearchServiceSoftwareUpdateInput) SetDomainName(v string) *StartElasticsearchServiceSoftwareUpdateInput { - s.DomainName = &v - return s -} - -// The result of a StartElasticsearchServiceSoftwareUpdate operation. Contains -// the status of the update. -type StartElasticsearchServiceSoftwareUpdateOutput struct { - _ struct{} `type:"structure"` - - // The current status of the Elasticsearch service software update. - ServiceSoftwareOptions *ServiceSoftwareOptions `type:"structure"` -} - -// String returns the string representation -func (s StartElasticsearchServiceSoftwareUpdateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartElasticsearchServiceSoftwareUpdateOutput) GoString() string { - return s.String() -} - -// SetServiceSoftwareOptions sets the ServiceSoftwareOptions field's value. -func (s *StartElasticsearchServiceSoftwareUpdateOutput) SetServiceSoftwareOptions(v *ServiceSoftwareOptions) *StartElasticsearchServiceSoftwareUpdateOutput { - s.ServiceSoftwareOptions = v - return s -} - -// StorageTypes represents the list of storage related types and their attributes -// that are available for given InstanceType. -type StorageType struct { - _ struct{} `type:"structure"` - - // SubType of the given storage type. List of available sub-storage options: - // For "instance" storageType we wont have any storageSubType, in case of "ebs" - // storageType we will have following valid storageSubTypes standard - // gp2 - // io1 - // Refer VolumeType for more information regarding above EBS storage options. - StorageSubTypeName *string `type:"string"` - - // List of limits that are applicable for given storage type. - StorageTypeLimits []*StorageTypeLimit `type:"list"` - - // Type of the storage. List of available storage options: instance - // Inbuilt storage available for the given Instance ebs - // Elastic block storage that would be attached to the given Instance - StorageTypeName *string `type:"string"` -} - -// String returns the string representation -func (s StorageType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StorageType) GoString() string { - return s.String() -} - -// SetStorageSubTypeName sets the StorageSubTypeName field's value. -func (s *StorageType) SetStorageSubTypeName(v string) *StorageType { - s.StorageSubTypeName = &v - return s -} - -// SetStorageTypeLimits sets the StorageTypeLimits field's value. -func (s *StorageType) SetStorageTypeLimits(v []*StorageTypeLimit) *StorageType { - s.StorageTypeLimits = v - return s -} - -// SetStorageTypeName sets the StorageTypeName field's value. -func (s *StorageType) SetStorageTypeName(v string) *StorageType { - s.StorageTypeName = &v - return s -} - -// Limits that are applicable for given storage type. -type StorageTypeLimit struct { - _ struct{} `type:"structure"` - - // Name of storage limits that are applicable for given storage type. If StorageType - // is ebs, following storage options are applicable MinimumVolumeSize - // Minimum amount of volume size that is applicable for given storage type.It - // can be empty if it is not applicable. MaximumVolumeSize - // Maximum amount of volume size that is applicable for given storage type.It - // can be empty if it is not applicable. MaximumIops - // Maximum amount of Iops that is applicable for given storage type.It can - // be empty if it is not applicable. MinimumIops - // Minimum amount of Iops that is applicable for given storage type.It can - // be empty if it is not applicable. - LimitName *string `type:"string"` - - // Values for the StorageTypeLimit$LimitName . - LimitValues []*string `type:"list"` -} - -// String returns the string representation -func (s StorageTypeLimit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StorageTypeLimit) GoString() string { - return s.String() -} - -// SetLimitName sets the LimitName field's value. -func (s *StorageTypeLimit) SetLimitName(v string) *StorageTypeLimit { - s.LimitName = &v - return s -} - -// SetLimitValues sets the LimitValues field's value. -func (s *StorageTypeLimit) SetLimitValues(v []*string) *StorageTypeLimit { - s.LimitValues = v - return s -} - -// Specifies a key value pair for a resource tag. -type Tag struct { - _ struct{} `type:"structure"` - - // Specifies the TagKey, the name of the tag. Tag keys must be unique for the - // Elasticsearch domain to which they are attached. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // Specifies the TagValue, the value assigned to the corresponding tag key. - // Tag values can be null and do not have to be unique in a tag set. For example, - // you can have a key value pair in a tag set of project : Trinity and cost-center - // : Trinity - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Container for the parameters to the UpdateElasticsearchDomain operation. -// Specifies the type and number of instances in the domain cluster. -type UpdateElasticsearchDomainConfigInput struct { - _ struct{} `type:"structure"` - - // IAM access policy as a JSON-formatted string. - AccessPolicies *string `type:"string"` - - // Modifies the advanced option to allow references to indices in an HTTP request - // body. Must be false when configuring access to individual sub-resources. - // By default, the value is true. See Configuration Advanced Options (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-advanced-options) - // for more information. - AdvancedOptions map[string]*string `type:"map"` - - // Options to specify the Cognito user and identity pools for Kibana authentication. - // For more information, see Amazon Cognito Authentication for Kibana (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html). - CognitoOptions *CognitoOptions `type:"structure"` - - // The name of the Elasticsearch domain that you are updating. - // - // DomainName is a required field - DomainName *string `location:"uri" locationName:"DomainName" min:"3" type:"string" required:"true"` - - // Specify the type and size of the EBS volume that you want to use. - EBSOptions *EBSOptions `type:"structure"` - - // The type and number of instances to instantiate for the domain cluster. - ElasticsearchClusterConfig *ElasticsearchClusterConfig `type:"structure"` - - // Map of LogType and LogPublishingOption, each containing options to publish - // a given type of Elasticsearch log. - LogPublishingOptions map[string]*LogPublishingOption `type:"map"` - - // Option to set the time, in UTC format, for the daily automated snapshot. - // Default value is 0 hours. - SnapshotOptions *SnapshotOptions `type:"structure"` - - // Options to specify the subnets and security groups for VPC endpoint. For - // more information, see Creating a VPC (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-creating-vpc) - // in VPC Endpoints for Amazon Elasticsearch Service Domains - VPCOptions *VPCOptions `type:"structure"` -} - -// String returns the string representation -func (s UpdateElasticsearchDomainConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateElasticsearchDomainConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateElasticsearchDomainConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateElasticsearchDomainConfigInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.CognitoOptions != nil { - if err := s.CognitoOptions.Validate(); err != nil { - invalidParams.AddNested("CognitoOptions", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessPolicies sets the AccessPolicies field's value. -func (s *UpdateElasticsearchDomainConfigInput) SetAccessPolicies(v string) *UpdateElasticsearchDomainConfigInput { - s.AccessPolicies = &v - return s -} - -// SetAdvancedOptions sets the AdvancedOptions field's value. -func (s *UpdateElasticsearchDomainConfigInput) SetAdvancedOptions(v map[string]*string) *UpdateElasticsearchDomainConfigInput { - s.AdvancedOptions = v - return s -} - -// SetCognitoOptions sets the CognitoOptions field's value. -func (s *UpdateElasticsearchDomainConfigInput) SetCognitoOptions(v *CognitoOptions) *UpdateElasticsearchDomainConfigInput { - s.CognitoOptions = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *UpdateElasticsearchDomainConfigInput) SetDomainName(v string) *UpdateElasticsearchDomainConfigInput { - s.DomainName = &v - return s -} - -// SetEBSOptions sets the EBSOptions field's value. -func (s *UpdateElasticsearchDomainConfigInput) SetEBSOptions(v *EBSOptions) *UpdateElasticsearchDomainConfigInput { - s.EBSOptions = v - return s -} - -// SetElasticsearchClusterConfig sets the ElasticsearchClusterConfig field's value. -func (s *UpdateElasticsearchDomainConfigInput) SetElasticsearchClusterConfig(v *ElasticsearchClusterConfig) *UpdateElasticsearchDomainConfigInput { - s.ElasticsearchClusterConfig = v - return s -} - -// SetLogPublishingOptions sets the LogPublishingOptions field's value. -func (s *UpdateElasticsearchDomainConfigInput) SetLogPublishingOptions(v map[string]*LogPublishingOption) *UpdateElasticsearchDomainConfigInput { - s.LogPublishingOptions = v - return s -} - -// SetSnapshotOptions sets the SnapshotOptions field's value. -func (s *UpdateElasticsearchDomainConfigInput) SetSnapshotOptions(v *SnapshotOptions) *UpdateElasticsearchDomainConfigInput { - s.SnapshotOptions = v - return s -} - -// SetVPCOptions sets the VPCOptions field's value. -func (s *UpdateElasticsearchDomainConfigInput) SetVPCOptions(v *VPCOptions) *UpdateElasticsearchDomainConfigInput { - s.VPCOptions = v - return s -} - -// The result of an UpdateElasticsearchDomain request. Contains the status of -// the Elasticsearch domain being updated. -type UpdateElasticsearchDomainConfigOutput struct { - _ struct{} `type:"structure"` - - // The status of the updated Elasticsearch domain. - // - // DomainConfig is a required field - DomainConfig *ElasticsearchDomainConfig `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateElasticsearchDomainConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateElasticsearchDomainConfigOutput) GoString() string { - return s.String() -} - -// SetDomainConfig sets the DomainConfig field's value. -func (s *UpdateElasticsearchDomainConfigOutput) SetDomainConfig(v *ElasticsearchDomainConfig) *UpdateElasticsearchDomainConfigOutput { - s.DomainConfig = v - return s -} - -// Container for request parameters to UpgradeElasticsearchDomain operation. -type UpgradeElasticsearchDomainInput struct { - _ struct{} `type:"structure"` - - // The name of an Elasticsearch domain. Domain names are unique across the domains - // owned by an account within an AWS region. Domain names start with a letter - // or number and can contain the following characters: a-z (lowercase), 0-9, - // and - (hyphen). - // - // DomainName is a required field - DomainName *string `min:"3" type:"string" required:"true"` - - // This flag, when set to True, indicates that an Upgrade Eligibility Check - // needs to be performed. This will not actually perform the Upgrade. - PerformCheckOnly *bool `type:"boolean"` - - // The version of Elasticsearch that you intend to upgrade the domain to. - // - // TargetVersion is a required field - TargetVersion *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpgradeElasticsearchDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpgradeElasticsearchDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpgradeElasticsearchDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpgradeElasticsearchDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.TargetVersion == nil { - invalidParams.Add(request.NewErrParamRequired("TargetVersion")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *UpgradeElasticsearchDomainInput) SetDomainName(v string) *UpgradeElasticsearchDomainInput { - s.DomainName = &v - return s -} - -// SetPerformCheckOnly sets the PerformCheckOnly field's value. -func (s *UpgradeElasticsearchDomainInput) SetPerformCheckOnly(v bool) *UpgradeElasticsearchDomainInput { - s.PerformCheckOnly = &v - return s -} - -// SetTargetVersion sets the TargetVersion field's value. -func (s *UpgradeElasticsearchDomainInput) SetTargetVersion(v string) *UpgradeElasticsearchDomainInput { - s.TargetVersion = &v - return s -} - -// Container for response returned by UpgradeElasticsearchDomain operation. -type UpgradeElasticsearchDomainOutput struct { - _ struct{} `type:"structure"` - - // The name of an Elasticsearch domain. Domain names are unique across the domains - // owned by an account within an AWS region. Domain names start with a letter - // or number and can contain the following characters: a-z (lowercase), 0-9, - // and - (hyphen). - DomainName *string `min:"3" type:"string"` - - // This flag, when set to True, indicates that an Upgrade Eligibility Check - // needs to be performed. This will not actually perform the Upgrade. - PerformCheckOnly *bool `type:"boolean"` - - // The version of Elasticsearch that you intend to upgrade the domain to. - TargetVersion *string `type:"string"` -} - -// String returns the string representation -func (s UpgradeElasticsearchDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpgradeElasticsearchDomainOutput) GoString() string { - return s.String() -} - -// SetDomainName sets the DomainName field's value. -func (s *UpgradeElasticsearchDomainOutput) SetDomainName(v string) *UpgradeElasticsearchDomainOutput { - s.DomainName = &v - return s -} - -// SetPerformCheckOnly sets the PerformCheckOnly field's value. -func (s *UpgradeElasticsearchDomainOutput) SetPerformCheckOnly(v bool) *UpgradeElasticsearchDomainOutput { - s.PerformCheckOnly = &v - return s -} - -// SetTargetVersion sets the TargetVersion field's value. -func (s *UpgradeElasticsearchDomainOutput) SetTargetVersion(v string) *UpgradeElasticsearchDomainOutput { - s.TargetVersion = &v - return s -} - -// History of the last 10 Upgrades and Upgrade Eligibility Checks. -type UpgradeHistory struct { - _ struct{} `type:"structure"` - - // UTC Timestamp at which the Upgrade API call was made in "yyyy-MM-ddTHH:mm:ssZ" - // format. - StartTimestamp *time.Time `type:"timestamp"` - - // A list of UpgradeStepItem s representing information about each step performed - // as pard of a specific Upgrade or Upgrade Eligibility Check. - StepsList []*UpgradeStepItem `type:"list"` - - // A string that describes the update briefly - UpgradeName *string `type:"string"` - - // The overall status of the update. The status can take one of the following - // values: In Progress - // Succeeded - // Succeeded with Issues - // Failed - UpgradeStatus *string `type:"string" enum:"UpgradeStatus"` -} - -// String returns the string representation -func (s UpgradeHistory) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpgradeHistory) GoString() string { - return s.String() -} - -// SetStartTimestamp sets the StartTimestamp field's value. -func (s *UpgradeHistory) SetStartTimestamp(v time.Time) *UpgradeHistory { - s.StartTimestamp = &v - return s -} - -// SetStepsList sets the StepsList field's value. -func (s *UpgradeHistory) SetStepsList(v []*UpgradeStepItem) *UpgradeHistory { - s.StepsList = v - return s -} - -// SetUpgradeName sets the UpgradeName field's value. -func (s *UpgradeHistory) SetUpgradeName(v string) *UpgradeHistory { - s.UpgradeName = &v - return s -} - -// SetUpgradeStatus sets the UpgradeStatus field's value. -func (s *UpgradeHistory) SetUpgradeStatus(v string) *UpgradeHistory { - s.UpgradeStatus = &v - return s -} - -// Represents a single step of the Upgrade or Upgrade Eligibility Check workflow. -type UpgradeStepItem struct { - _ struct{} `type:"structure"` - - // A list of strings containing detailed information about the errors encountered - // in a particular step. - Issues []*string `type:"list"` - - // The Floating point value representing progress percentage of a particular - // step. - ProgressPercent *float64 `type:"double"` - - // Represents one of 3 steps that an Upgrade or Upgrade Eligibility Check does - // through: PreUpgradeCheck - // Snapshot - // Upgrade - UpgradeStep *string `type:"string" enum:"UpgradeStep"` - - // The status of a particular step during an upgrade. The status can take one - // of the following values: In Progress - // Succeeded - // Succeeded with Issues - // Failed - UpgradeStepStatus *string `type:"string" enum:"UpgradeStatus"` -} - -// String returns the string representation -func (s UpgradeStepItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpgradeStepItem) GoString() string { - return s.String() -} - -// SetIssues sets the Issues field's value. -func (s *UpgradeStepItem) SetIssues(v []*string) *UpgradeStepItem { - s.Issues = v - return s -} - -// SetProgressPercent sets the ProgressPercent field's value. -func (s *UpgradeStepItem) SetProgressPercent(v float64) *UpgradeStepItem { - s.ProgressPercent = &v - return s -} - -// SetUpgradeStep sets the UpgradeStep field's value. -func (s *UpgradeStepItem) SetUpgradeStep(v string) *UpgradeStepItem { - s.UpgradeStep = &v - return s -} - -// SetUpgradeStepStatus sets the UpgradeStepStatus field's value. -func (s *UpgradeStepItem) SetUpgradeStepStatus(v string) *UpgradeStepItem { - s.UpgradeStepStatus = &v - return s -} - -// Options to specify the subnets and security groups for VPC endpoint. For -// more information, see VPC Endpoints for Amazon Elasticsearch Service Domains -// (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html). -type VPCDerivedInfo struct { - _ struct{} `type:"structure"` - - // The availability zones for the Elasticsearch domain. Exists only if the domain - // was created with VPCOptions. - AvailabilityZones []*string `type:"list"` - - // Specifies the security groups for VPC endpoint. - SecurityGroupIds []*string `type:"list"` - - // Specifies the subnets for VPC endpoint. - SubnetIds []*string `type:"list"` - - // The VPC Id for the Elasticsearch domain. Exists only if the domain was created - // with VPCOptions. - VPCId *string `type:"string"` -} - -// String returns the string representation -func (s VPCDerivedInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VPCDerivedInfo) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *VPCDerivedInfo) SetAvailabilityZones(v []*string) *VPCDerivedInfo { - s.AvailabilityZones = v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *VPCDerivedInfo) SetSecurityGroupIds(v []*string) *VPCDerivedInfo { - s.SecurityGroupIds = v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *VPCDerivedInfo) SetSubnetIds(v []*string) *VPCDerivedInfo { - s.SubnetIds = v - return s -} - -// SetVPCId sets the VPCId field's value. -func (s *VPCDerivedInfo) SetVPCId(v string) *VPCDerivedInfo { - s.VPCId = &v - return s -} - -// Status of the VPC options for the specified Elasticsearch domain. -type VPCDerivedInfoStatus struct { - _ struct{} `type:"structure"` - - // Specifies the VPC options for the specified Elasticsearch domain. - // - // Options is a required field - Options *VPCDerivedInfo `type:"structure" required:"true"` - - // Specifies the status of the VPC options for the specified Elasticsearch domain. - // - // Status is a required field - Status *OptionStatus `type:"structure" required:"true"` -} - -// String returns the string representation -func (s VPCDerivedInfoStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VPCDerivedInfoStatus) GoString() string { - return s.String() -} - -// SetOptions sets the Options field's value. -func (s *VPCDerivedInfoStatus) SetOptions(v *VPCDerivedInfo) *VPCDerivedInfoStatus { - s.Options = v - return s -} - -// SetStatus sets the Status field's value. -func (s *VPCDerivedInfoStatus) SetStatus(v *OptionStatus) *VPCDerivedInfoStatus { - s.Status = v - return s -} - -// Options to specify the subnets and security groups for VPC endpoint. For -// more information, see VPC Endpoints for Amazon Elasticsearch Service Domains -// (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html). -type VPCOptions struct { - _ struct{} `type:"structure"` - - // Specifies the security groups for VPC endpoint. - SecurityGroupIds []*string `type:"list"` - - // Specifies the subnets for VPC endpoint. - SubnetIds []*string `type:"list"` -} - -// String returns the string representation -func (s VPCOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VPCOptions) GoString() string { - return s.String() -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *VPCOptions) SetSecurityGroupIds(v []*string) *VPCOptions { - s.SecurityGroupIds = v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *VPCOptions) SetSubnetIds(v []*string) *VPCOptions { - s.SubnetIds = v - return s -} - -const ( - // DeploymentStatusPendingUpdate is a DeploymentStatus enum value - DeploymentStatusPendingUpdate = "PENDING_UPDATE" - - // DeploymentStatusInProgress is a DeploymentStatus enum value - DeploymentStatusInProgress = "IN_PROGRESS" - - // DeploymentStatusCompleted is a DeploymentStatus enum value - DeploymentStatusCompleted = "COMPLETED" - - // DeploymentStatusNotEligible is a DeploymentStatus enum value - DeploymentStatusNotEligible = "NOT_ELIGIBLE" - - // DeploymentStatusEligible is a DeploymentStatus enum value - DeploymentStatusEligible = "ELIGIBLE" -) - -const ( - // ESPartitionInstanceTypeM3MediumElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeM3MediumElasticsearch = "m3.medium.elasticsearch" - - // ESPartitionInstanceTypeM3LargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeM3LargeElasticsearch = "m3.large.elasticsearch" - - // ESPartitionInstanceTypeM3XlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeM3XlargeElasticsearch = "m3.xlarge.elasticsearch" - - // ESPartitionInstanceTypeM32xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeM32xlargeElasticsearch = "m3.2xlarge.elasticsearch" - - // ESPartitionInstanceTypeM4LargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeM4LargeElasticsearch = "m4.large.elasticsearch" - - // ESPartitionInstanceTypeM4XlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeM4XlargeElasticsearch = "m4.xlarge.elasticsearch" - - // ESPartitionInstanceTypeM42xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeM42xlargeElasticsearch = "m4.2xlarge.elasticsearch" - - // ESPartitionInstanceTypeM44xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeM44xlargeElasticsearch = "m4.4xlarge.elasticsearch" - - // ESPartitionInstanceTypeM410xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeM410xlargeElasticsearch = "m4.10xlarge.elasticsearch" - - // ESPartitionInstanceTypeT2MicroElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeT2MicroElasticsearch = "t2.micro.elasticsearch" - - // ESPartitionInstanceTypeT2SmallElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeT2SmallElasticsearch = "t2.small.elasticsearch" - - // ESPartitionInstanceTypeT2MediumElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeT2MediumElasticsearch = "t2.medium.elasticsearch" - - // ESPartitionInstanceTypeR3LargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeR3LargeElasticsearch = "r3.large.elasticsearch" - - // ESPartitionInstanceTypeR3XlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeR3XlargeElasticsearch = "r3.xlarge.elasticsearch" - - // ESPartitionInstanceTypeR32xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeR32xlargeElasticsearch = "r3.2xlarge.elasticsearch" - - // ESPartitionInstanceTypeR34xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeR34xlargeElasticsearch = "r3.4xlarge.elasticsearch" - - // ESPartitionInstanceTypeR38xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeR38xlargeElasticsearch = "r3.8xlarge.elasticsearch" - - // ESPartitionInstanceTypeI2XlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeI2XlargeElasticsearch = "i2.xlarge.elasticsearch" - - // ESPartitionInstanceTypeI22xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeI22xlargeElasticsearch = "i2.2xlarge.elasticsearch" - - // ESPartitionInstanceTypeD2XlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeD2XlargeElasticsearch = "d2.xlarge.elasticsearch" - - // ESPartitionInstanceTypeD22xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeD22xlargeElasticsearch = "d2.2xlarge.elasticsearch" - - // ESPartitionInstanceTypeD24xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeD24xlargeElasticsearch = "d2.4xlarge.elasticsearch" - - // ESPartitionInstanceTypeD28xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeD28xlargeElasticsearch = "d2.8xlarge.elasticsearch" - - // ESPartitionInstanceTypeC4LargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeC4LargeElasticsearch = "c4.large.elasticsearch" - - // ESPartitionInstanceTypeC4XlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeC4XlargeElasticsearch = "c4.xlarge.elasticsearch" - - // ESPartitionInstanceTypeC42xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeC42xlargeElasticsearch = "c4.2xlarge.elasticsearch" - - // ESPartitionInstanceTypeC44xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeC44xlargeElasticsearch = "c4.4xlarge.elasticsearch" - - // ESPartitionInstanceTypeC48xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeC48xlargeElasticsearch = "c4.8xlarge.elasticsearch" - - // ESPartitionInstanceTypeR4LargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeR4LargeElasticsearch = "r4.large.elasticsearch" - - // ESPartitionInstanceTypeR4XlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeR4XlargeElasticsearch = "r4.xlarge.elasticsearch" - - // ESPartitionInstanceTypeR42xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeR42xlargeElasticsearch = "r4.2xlarge.elasticsearch" - - // ESPartitionInstanceTypeR44xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeR44xlargeElasticsearch = "r4.4xlarge.elasticsearch" - - // ESPartitionInstanceTypeR48xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeR48xlargeElasticsearch = "r4.8xlarge.elasticsearch" - - // ESPartitionInstanceTypeR416xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeR416xlargeElasticsearch = "r4.16xlarge.elasticsearch" - - // ESPartitionInstanceTypeI3LargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeI3LargeElasticsearch = "i3.large.elasticsearch" - - // ESPartitionInstanceTypeI3XlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeI3XlargeElasticsearch = "i3.xlarge.elasticsearch" - - // ESPartitionInstanceTypeI32xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeI32xlargeElasticsearch = "i3.2xlarge.elasticsearch" - - // ESPartitionInstanceTypeI34xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeI34xlargeElasticsearch = "i3.4xlarge.elasticsearch" - - // ESPartitionInstanceTypeI38xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeI38xlargeElasticsearch = "i3.8xlarge.elasticsearch" - - // ESPartitionInstanceTypeI316xlargeElasticsearch is a ESPartitionInstanceType enum value - ESPartitionInstanceTypeI316xlargeElasticsearch = "i3.16xlarge.elasticsearch" -) - -// Type of Log File, it can be one of the following: INDEX_SLOW_LOGS: Index -// slow logs contain insert requests that took more time than configured index -// query log threshold to execute. -// SEARCH_SLOW_LOGS: Search slow logs contain search queries that took more -// time than configured search query log threshold to execute. -// ES_APPLICATION_LOGS: Elasticsearch application logs contain information about -// errors and warnings raised during the operation of the service and can be -// useful for troubleshooting. -const ( - // LogTypeIndexSlowLogs is a LogType enum value - LogTypeIndexSlowLogs = "INDEX_SLOW_LOGS" - - // LogTypeSearchSlowLogs is a LogType enum value - LogTypeSearchSlowLogs = "SEARCH_SLOW_LOGS" - - // LogTypeEsApplicationLogs is a LogType enum value - LogTypeEsApplicationLogs = "ES_APPLICATION_LOGS" -) - -// The state of a requested change. One of the following: -// -// * Processing: The request change is still in-process. -// * Active: The request change is processed and deployed to the Elasticsearch -// domain. -const ( - // OptionStateRequiresIndexDocuments is a OptionState enum value - OptionStateRequiresIndexDocuments = "RequiresIndexDocuments" - - // OptionStateProcessing is a OptionState enum value - OptionStateProcessing = "Processing" - - // OptionStateActive is a OptionState enum value - OptionStateActive = "Active" -) - -const ( - // ReservedElasticsearchInstancePaymentOptionAllUpfront is a ReservedElasticsearchInstancePaymentOption enum value - ReservedElasticsearchInstancePaymentOptionAllUpfront = "ALL_UPFRONT" - - // ReservedElasticsearchInstancePaymentOptionPartialUpfront is a ReservedElasticsearchInstancePaymentOption enum value - ReservedElasticsearchInstancePaymentOptionPartialUpfront = "PARTIAL_UPFRONT" - - // ReservedElasticsearchInstancePaymentOptionNoUpfront is a ReservedElasticsearchInstancePaymentOption enum value - ReservedElasticsearchInstancePaymentOptionNoUpfront = "NO_UPFRONT" -) - -const ( - // UpgradeStatusInProgress is a UpgradeStatus enum value - UpgradeStatusInProgress = "IN_PROGRESS" - - // UpgradeStatusSucceeded is a UpgradeStatus enum value - UpgradeStatusSucceeded = "SUCCEEDED" - - // UpgradeStatusSucceededWithIssues is a UpgradeStatus enum value - UpgradeStatusSucceededWithIssues = "SUCCEEDED_WITH_ISSUES" - - // UpgradeStatusFailed is a UpgradeStatus enum value - UpgradeStatusFailed = "FAILED" -) - -const ( - // UpgradeStepPreUpgradeCheck is a UpgradeStep enum value - UpgradeStepPreUpgradeCheck = "PRE_UPGRADE_CHECK" - - // UpgradeStepSnapshot is a UpgradeStep enum value - UpgradeStepSnapshot = "SNAPSHOT" - - // UpgradeStepUpgrade is a UpgradeStep enum value - UpgradeStepUpgrade = "UPGRADE" -) - -// The type of EBS volume, standard, gp2, or io1. See Configuring EBS-based -// Storage (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-ebs)for -// more information. -const ( - // VolumeTypeStandard is a VolumeType enum value - VolumeTypeStandard = "standard" - - // VolumeTypeGp2 is a VolumeType enum value - VolumeTypeGp2 = "gp2" - - // VolumeTypeIo1 is a VolumeType enum value - VolumeTypeIo1 = "io1" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/doc.go deleted file mode 100644 index 944fadc20..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/doc.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package elasticsearchservice provides the client and types for making API -// requests to Amazon Elasticsearch Service. -// -// Use the Amazon Elasticsearch configuration API to create, configure, and -// manage Elasticsearch domains. -// -// The endpoint for configuration service requests is region-specific: es.region.amazonaws.com. -// For example, es.us-east-1.amazonaws.com. For a current list of supported -// regions and endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticsearch-service-regions). -// -// See elasticsearchservice package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elasticsearchservice/ -// -// Using the Client -// -// To contact Amazon Elasticsearch Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Elasticsearch Service client ElasticsearchService for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elasticsearchservice/#New -package elasticsearchservice diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/errors.go deleted file mode 100644 index 332cf8d4f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/errors.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elasticsearchservice - -const ( - - // ErrCodeBaseException for service response error code - // "BaseException". - // - // An error occurred while processing the request. - ErrCodeBaseException = "BaseException" - - // ErrCodeDisabledOperationException for service response error code - // "DisabledOperationException". - // - // An error occured because the client wanted to access a not supported operation. - // Gives http status code of 409. - ErrCodeDisabledOperationException = "DisabledOperationException" - - // ErrCodeInternalException for service response error code - // "InternalException". - // - // The request processing has failed because of an unknown error, exception - // or failure (the failure is internal to the service) . Gives http status code - // of 500. - ErrCodeInternalException = "InternalException" - - // ErrCodeInvalidTypeException for service response error code - // "InvalidTypeException". - // - // An exception for trying to create or access sub-resource that is either invalid - // or not supported. Gives http status code of 409. - ErrCodeInvalidTypeException = "InvalidTypeException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // An exception for trying to create more than allowed resources or sub-resources. - // Gives http status code of 409. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeResourceAlreadyExistsException for service response error code - // "ResourceAlreadyExistsException". - // - // An exception for creating a resource that already exists. Gives http status - // code of 400. - ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // An exception for accessing or deleting a resource that does not exist. Gives - // http status code of 400. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeValidationException for service response error code - // "ValidationException". - // - // An exception for missing / invalid input fields. Gives http status code of - // 400. - ErrCodeValidationException = "ValidationException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/service.go deleted file mode 100644 index d2f8f3827..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elasticsearchservice - -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" -) - -// ElasticsearchService provides the API operation methods for making requests to -// Amazon Elasticsearch Service. See this package's package overview docs -// for details on the service. -// -// ElasticsearchService methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ElasticsearchService 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 = "es" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Elasticsearch Service" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ElasticsearchService client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a ElasticsearchService client from just a session. -// svc := elasticsearchservice.New(mySession) -// -// // Create a ElasticsearchService client with additional configuration -// svc := elasticsearchservice.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ElasticsearchService { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ElasticsearchService { - svc := &ElasticsearchService{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-01-01", - }, - 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 ElasticsearchService operation and runs any -// custom request initialization. -func (c *ElasticsearchService) 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/elastictranscoder/api.go b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go deleted file mode 100644 index ec140ae0b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go +++ /dev/null @@ -1,8062 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elastictranscoder - -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 opCancelJob = "CancelJob" - -// CancelJobRequest generates a "aws/request.Request" representing the -// client's request for the CancelJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelJob for more information on using the CancelJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelJobRequest method. -// req, resp := client.CancelJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) CancelJobRequest(input *CancelJobInput) (req *request.Request, output *CancelJobOutput) { - op := &request.Operation{ - Name: opCancelJob, - HTTPMethod: "DELETE", - HTTPPath: "/2012-09-25/jobs/{Id}", - } - - if input == nil { - input = &CancelJobInput{} - } - - output = &CancelJobOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CancelJob API operation for Amazon Elastic Transcoder. -// -// The CancelJob operation cancels an unfinished job. -// -// You can only cancel a job that has a status of Submitted. To prevent a pipeline -// from starting to process a job while you're getting the job identifier, use -// UpdatePipelineStatus to temporarily pause the pipeline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation CancelJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource does not exist or is not available. For example, the -// pipeline to which you're trying to add a job doesn't exist or is still being -// created. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource you are attempting to change is in use. For example, you are -// attempting to delete a pipeline that is currently in use. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) CancelJob(input *CancelJobInput) (*CancelJobOutput, error) { - req, out := c.CancelJobRequest(input) - return out, req.Send() -} - -// CancelJobWithContext is the same as CancelJob with the addition of -// the ability to pass a context and additional request options. -// -// See CancelJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) CancelJobWithContext(ctx aws.Context, input *CancelJobInput, opts ...request.Option) (*CancelJobOutput, error) { - req, out := c.CancelJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateJob = "CreateJob" - -// CreateJobRequest generates a "aws/request.Request" representing the -// client's request for the CreateJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateJob for more information on using the CreateJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateJobRequest method. -// req, resp := client.CreateJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) CreateJobRequest(input *CreateJobInput) (req *request.Request, output *CreateJobResponse) { - op := &request.Operation{ - Name: opCreateJob, - HTTPMethod: "POST", - HTTPPath: "/2012-09-25/jobs", - } - - if input == nil { - input = &CreateJobInput{} - } - - output = &CreateJobResponse{} - req = c.newRequest(op, input, output) - return -} - -// CreateJob API operation for Amazon Elastic Transcoder. -// -// When you create a job, Elastic Transcoder returns JSON data that includes -// the values that you specified plus information about the job that is created. -// -// If you have specified more than one output for your jobs (for example, one -// output for the Kindle Fire and another output for the Apple iPhone 4s), you -// currently must use the Elastic Transcoder API to list the jobs (as opposed -// to the AWS Console). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation CreateJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource does not exist or is not available. For example, the -// pipeline to which you're trying to add a job doesn't exist or is still being -// created. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Too many operations for a given AWS account. For example, the number of pipelines -// exceeds the maximum allowed. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) CreateJob(input *CreateJobInput) (*CreateJobResponse, error) { - req, out := c.CreateJobRequest(input) - return out, req.Send() -} - -// CreateJobWithContext is the same as CreateJob with the addition of -// the ability to pass a context and additional request options. -// -// See CreateJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) CreateJobWithContext(ctx aws.Context, input *CreateJobInput, opts ...request.Option) (*CreateJobResponse, error) { - req, out := c.CreateJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePipeline = "CreatePipeline" - -// CreatePipelineRequest generates a "aws/request.Request" representing the -// client's request for the CreatePipeline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePipeline for more information on using the CreatePipeline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePipelineRequest method. -// req, resp := client.CreatePipelineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) CreatePipelineRequest(input *CreatePipelineInput) (req *request.Request, output *CreatePipelineOutput) { - op := &request.Operation{ - Name: opCreatePipeline, - HTTPMethod: "POST", - HTTPPath: "/2012-09-25/pipelines", - } - - if input == nil { - input = &CreatePipelineInput{} - } - - output = &CreatePipelineOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePipeline API operation for Amazon Elastic Transcoder. -// -// The CreatePipeline operation creates a pipeline with settings that you specify. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation CreatePipeline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource does not exist or is not available. For example, the -// pipeline to which you're trying to add a job doesn't exist or is still being -// created. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Too many operations for a given AWS account. For example, the number of pipelines -// exceeds the maximum allowed. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) CreatePipeline(input *CreatePipelineInput) (*CreatePipelineOutput, error) { - req, out := c.CreatePipelineRequest(input) - return out, req.Send() -} - -// CreatePipelineWithContext is the same as CreatePipeline with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePipeline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) CreatePipelineWithContext(ctx aws.Context, input *CreatePipelineInput, opts ...request.Option) (*CreatePipelineOutput, error) { - req, out := c.CreatePipelineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePreset = "CreatePreset" - -// CreatePresetRequest generates a "aws/request.Request" representing the -// client's request for the CreatePreset operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePreset for more information on using the CreatePreset -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePresetRequest method. -// req, resp := client.CreatePresetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) CreatePresetRequest(input *CreatePresetInput) (req *request.Request, output *CreatePresetOutput) { - op := &request.Operation{ - Name: opCreatePreset, - HTTPMethod: "POST", - HTTPPath: "/2012-09-25/presets", - } - - if input == nil { - input = &CreatePresetInput{} - } - - output = &CreatePresetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePreset API operation for Amazon Elastic Transcoder. -// -// The CreatePreset operation creates a preset with settings that you specify. -// -// Elastic Transcoder checks the CreatePreset settings to ensure that they meet -// Elastic Transcoder requirements and to determine whether they comply with -// H.264 standards. If your settings are not valid for Elastic Transcoder, Elastic -// Transcoder returns an HTTP 400 response (ValidationException) and does not -// create the preset. If the settings are valid for Elastic Transcoder but aren't -// strictly compliant with the H.264 standard, Elastic Transcoder creates the -// preset and returns a warning message in the response. This helps you determine -// whether your settings comply with the H.264 standard while giving you greater -// flexibility with respect to the video that Elastic Transcoder produces. -// -// Elastic Transcoder uses the H.264 video-compression format. For more information, -// see the International Telecommunication Union publication Recommendation -// ITU-T H.264: Advanced video coding for generic audiovisual 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 Amazon Elastic Transcoder's -// API operation CreatePreset for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Too many operations for a given AWS account. For example, the number of pipelines -// exceeds the maximum allowed. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) CreatePreset(input *CreatePresetInput) (*CreatePresetOutput, error) { - req, out := c.CreatePresetRequest(input) - return out, req.Send() -} - -// CreatePresetWithContext is the same as CreatePreset with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePreset for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) CreatePresetWithContext(ctx aws.Context, input *CreatePresetInput, opts ...request.Option) (*CreatePresetOutput, error) { - req, out := c.CreatePresetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePipeline = "DeletePipeline" - -// DeletePipelineRequest generates a "aws/request.Request" representing the -// client's request for the DeletePipeline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePipeline for more information on using the DeletePipeline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePipelineRequest method. -// req, resp := client.DeletePipelineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) DeletePipelineRequest(input *DeletePipelineInput) (req *request.Request, output *DeletePipelineOutput) { - op := &request.Operation{ - Name: opDeletePipeline, - HTTPMethod: "DELETE", - HTTPPath: "/2012-09-25/pipelines/{Id}", - } - - if input == nil { - input = &DeletePipelineInput{} - } - - output = &DeletePipelineOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePipeline API operation for Amazon Elastic Transcoder. -// -// The DeletePipeline operation removes a pipeline. -// -// You can only delete a pipeline that has never been used or that is not currently -// in use (doesn't contain any active jobs). If the pipeline is currently in -// use, DeletePipeline returns an error. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation DeletePipeline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource does not exist or is not available. For example, the -// pipeline to which you're trying to add a job doesn't exist or is still being -// created. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource you are attempting to change is in use. For example, you are -// attempting to delete a pipeline that is currently in use. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) DeletePipeline(input *DeletePipelineInput) (*DeletePipelineOutput, error) { - req, out := c.DeletePipelineRequest(input) - return out, req.Send() -} - -// DeletePipelineWithContext is the same as DeletePipeline with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePipeline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) DeletePipelineWithContext(ctx aws.Context, input *DeletePipelineInput, opts ...request.Option) (*DeletePipelineOutput, error) { - req, out := c.DeletePipelineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePreset = "DeletePreset" - -// DeletePresetRequest generates a "aws/request.Request" representing the -// client's request for the DeletePreset operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePreset for more information on using the DeletePreset -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePresetRequest method. -// req, resp := client.DeletePresetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) DeletePresetRequest(input *DeletePresetInput) (req *request.Request, output *DeletePresetOutput) { - op := &request.Operation{ - Name: opDeletePreset, - HTTPMethod: "DELETE", - HTTPPath: "/2012-09-25/presets/{Id}", - } - - if input == nil { - input = &DeletePresetInput{} - } - - output = &DeletePresetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePreset API operation for Amazon Elastic Transcoder. -// -// The DeletePreset operation removes a preset that you've added in an AWS region. -// -// You can't delete the default presets that are included with Elastic Transcoder. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation DeletePreset for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource does not exist or is not available. For example, the -// pipeline to which you're trying to add a job doesn't exist or is still being -// created. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) DeletePreset(input *DeletePresetInput) (*DeletePresetOutput, error) { - req, out := c.DeletePresetRequest(input) - return out, req.Send() -} - -// DeletePresetWithContext is the same as DeletePreset with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePreset for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) DeletePresetWithContext(ctx aws.Context, input *DeletePresetInput, opts ...request.Option) (*DeletePresetOutput, error) { - req, out := c.DeletePresetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListJobsByPipeline = "ListJobsByPipeline" - -// ListJobsByPipelineRequest generates a "aws/request.Request" representing the -// client's request for the ListJobsByPipeline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListJobsByPipeline for more information on using the ListJobsByPipeline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListJobsByPipelineRequest method. -// req, resp := client.ListJobsByPipelineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) ListJobsByPipelineRequest(input *ListJobsByPipelineInput) (req *request.Request, output *ListJobsByPipelineOutput) { - op := &request.Operation{ - Name: opListJobsByPipeline, - HTTPMethod: "GET", - HTTPPath: "/2012-09-25/jobsByPipeline/{PipelineId}", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListJobsByPipelineInput{} - } - - output = &ListJobsByPipelineOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListJobsByPipeline API operation for Amazon Elastic Transcoder. -// -// The ListJobsByPipeline operation gets a list of the jobs currently in a pipeline. -// -// Elastic Transcoder returns all of the jobs currently in the specified pipeline. -// The response body contains one element for each job that satisfies the search -// criteria. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation ListJobsByPipeline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource does not exist or is not available. For example, the -// pipeline to which you're trying to add a job doesn't exist or is still being -// created. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) ListJobsByPipeline(input *ListJobsByPipelineInput) (*ListJobsByPipelineOutput, error) { - req, out := c.ListJobsByPipelineRequest(input) - return out, req.Send() -} - -// ListJobsByPipelineWithContext is the same as ListJobsByPipeline with the addition of -// the ability to pass a context and additional request options. -// -// See ListJobsByPipeline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) ListJobsByPipelineWithContext(ctx aws.Context, input *ListJobsByPipelineInput, opts ...request.Option) (*ListJobsByPipelineOutput, error) { - req, out := c.ListJobsByPipelineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListJobsByPipelinePages iterates over the pages of a ListJobsByPipeline operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListJobsByPipeline 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 ListJobsByPipeline operation. -// pageNum := 0 -// err := client.ListJobsByPipelinePages(params, -// func(page *ListJobsByPipelineOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElasticTranscoder) ListJobsByPipelinePages(input *ListJobsByPipelineInput, fn func(*ListJobsByPipelineOutput, bool) bool) error { - return c.ListJobsByPipelinePagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListJobsByPipelinePagesWithContext same as ListJobsByPipelinePages 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 *ElasticTranscoder) ListJobsByPipelinePagesWithContext(ctx aws.Context, input *ListJobsByPipelineInput, fn func(*ListJobsByPipelineOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListJobsByPipelineInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListJobsByPipelineRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobsByPipelineOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListJobsByStatus = "ListJobsByStatus" - -// ListJobsByStatusRequest generates a "aws/request.Request" representing the -// client's request for the ListJobsByStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListJobsByStatus for more information on using the ListJobsByStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListJobsByStatusRequest method. -// req, resp := client.ListJobsByStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) ListJobsByStatusRequest(input *ListJobsByStatusInput) (req *request.Request, output *ListJobsByStatusOutput) { - op := &request.Operation{ - Name: opListJobsByStatus, - HTTPMethod: "GET", - HTTPPath: "/2012-09-25/jobsByStatus/{Status}", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListJobsByStatusInput{} - } - - output = &ListJobsByStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListJobsByStatus API operation for Amazon Elastic Transcoder. -// -// The ListJobsByStatus operation gets a list of jobs that have a specified -// status. The response body contains one element for each job that satisfies -// the search criteria. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation ListJobsByStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource does not exist or is not available. For example, the -// pipeline to which you're trying to add a job doesn't exist or is still being -// created. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) ListJobsByStatus(input *ListJobsByStatusInput) (*ListJobsByStatusOutput, error) { - req, out := c.ListJobsByStatusRequest(input) - return out, req.Send() -} - -// ListJobsByStatusWithContext is the same as ListJobsByStatus with the addition of -// the ability to pass a context and additional request options. -// -// See ListJobsByStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) ListJobsByStatusWithContext(ctx aws.Context, input *ListJobsByStatusInput, opts ...request.Option) (*ListJobsByStatusOutput, error) { - req, out := c.ListJobsByStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListJobsByStatusPages iterates over the pages of a ListJobsByStatus operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListJobsByStatus 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 ListJobsByStatus operation. -// pageNum := 0 -// err := client.ListJobsByStatusPages(params, -// func(page *ListJobsByStatusOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElasticTranscoder) ListJobsByStatusPages(input *ListJobsByStatusInput, fn func(*ListJobsByStatusOutput, bool) bool) error { - return c.ListJobsByStatusPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListJobsByStatusPagesWithContext same as ListJobsByStatusPages 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 *ElasticTranscoder) ListJobsByStatusPagesWithContext(ctx aws.Context, input *ListJobsByStatusInput, fn func(*ListJobsByStatusOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListJobsByStatusInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListJobsByStatusRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobsByStatusOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListPipelines = "ListPipelines" - -// ListPipelinesRequest generates a "aws/request.Request" representing the -// client's request for the ListPipelines operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPipelines for more information on using the ListPipelines -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPipelinesRequest method. -// req, resp := client.ListPipelinesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) ListPipelinesRequest(input *ListPipelinesInput) (req *request.Request, output *ListPipelinesOutput) { - op := &request.Operation{ - Name: opListPipelines, - HTTPMethod: "GET", - HTTPPath: "/2012-09-25/pipelines", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListPipelinesInput{} - } - - output = &ListPipelinesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPipelines API operation for Amazon Elastic Transcoder. -// -// The ListPipelines operation gets a list of the pipelines associated with -// the current AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation ListPipelines for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) ListPipelines(input *ListPipelinesInput) (*ListPipelinesOutput, error) { - req, out := c.ListPipelinesRequest(input) - return out, req.Send() -} - -// ListPipelinesWithContext is the same as ListPipelines with the addition of -// the ability to pass a context and additional request options. -// -// See ListPipelines for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) ListPipelinesWithContext(ctx aws.Context, input *ListPipelinesInput, opts ...request.Option) (*ListPipelinesOutput, error) { - req, out := c.ListPipelinesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPipelinesPages iterates over the pages of a ListPipelines operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPipelines 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 ListPipelines operation. -// pageNum := 0 -// err := client.ListPipelinesPages(params, -// func(page *ListPipelinesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElasticTranscoder) ListPipelinesPages(input *ListPipelinesInput, fn func(*ListPipelinesOutput, bool) bool) error { - return c.ListPipelinesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPipelinesPagesWithContext same as ListPipelinesPages 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 *ElasticTranscoder) ListPipelinesPagesWithContext(ctx aws.Context, input *ListPipelinesInput, fn func(*ListPipelinesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPipelinesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPipelinesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPipelinesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListPresets = "ListPresets" - -// ListPresetsRequest generates a "aws/request.Request" representing the -// client's request for the ListPresets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPresets for more information on using the ListPresets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPresetsRequest method. -// req, resp := client.ListPresetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) ListPresetsRequest(input *ListPresetsInput) (req *request.Request, output *ListPresetsOutput) { - op := &request.Operation{ - Name: opListPresets, - HTTPMethod: "GET", - HTTPPath: "/2012-09-25/presets", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListPresetsInput{} - } - - output = &ListPresetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPresets API operation for Amazon Elastic Transcoder. -// -// The ListPresets operation gets a list of the default presets included with -// Elastic Transcoder and the presets that you've added in an AWS region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation ListPresets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) ListPresets(input *ListPresetsInput) (*ListPresetsOutput, error) { - req, out := c.ListPresetsRequest(input) - return out, req.Send() -} - -// ListPresetsWithContext is the same as ListPresets with the addition of -// the ability to pass a context and additional request options. -// -// See ListPresets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) ListPresetsWithContext(ctx aws.Context, input *ListPresetsInput, opts ...request.Option) (*ListPresetsOutput, error) { - req, out := c.ListPresetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPresetsPages iterates over the pages of a ListPresets operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPresets method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListPresets operation. -// pageNum := 0 -// err := client.ListPresetsPages(params, -// func(page *ListPresetsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ElasticTranscoder) ListPresetsPages(input *ListPresetsInput, fn func(*ListPresetsOutput, bool) bool) error { - return c.ListPresetsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPresetsPagesWithContext same as ListPresetsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) ListPresetsPagesWithContext(ctx aws.Context, input *ListPresetsInput, fn func(*ListPresetsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPresetsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPresetsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPresetsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opReadJob = "ReadJob" - -// ReadJobRequest generates a "aws/request.Request" representing the -// client's request for the ReadJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReadJob for more information on using the ReadJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReadJobRequest method. -// req, resp := client.ReadJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) ReadJobRequest(input *ReadJobInput) (req *request.Request, output *ReadJobOutput) { - op := &request.Operation{ - Name: opReadJob, - HTTPMethod: "GET", - HTTPPath: "/2012-09-25/jobs/{Id}", - } - - if input == nil { - input = &ReadJobInput{} - } - - output = &ReadJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// ReadJob API operation for Amazon Elastic Transcoder. -// -// The ReadJob operation returns detailed information about a job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation ReadJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource does not exist or is not available. For example, the -// pipeline to which you're trying to add a job doesn't exist or is still being -// created. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) ReadJob(input *ReadJobInput) (*ReadJobOutput, error) { - req, out := c.ReadJobRequest(input) - return out, req.Send() -} - -// ReadJobWithContext is the same as ReadJob with the addition of -// the ability to pass a context and additional request options. -// -// See ReadJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) ReadJobWithContext(ctx aws.Context, input *ReadJobInput, opts ...request.Option) (*ReadJobOutput, error) { - req, out := c.ReadJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReadPipeline = "ReadPipeline" - -// ReadPipelineRequest generates a "aws/request.Request" representing the -// client's request for the ReadPipeline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReadPipeline for more information on using the ReadPipeline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReadPipelineRequest method. -// req, resp := client.ReadPipelineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) ReadPipelineRequest(input *ReadPipelineInput) (req *request.Request, output *ReadPipelineOutput) { - op := &request.Operation{ - Name: opReadPipeline, - HTTPMethod: "GET", - HTTPPath: "/2012-09-25/pipelines/{Id}", - } - - if input == nil { - input = &ReadPipelineInput{} - } - - output = &ReadPipelineOutput{} - req = c.newRequest(op, input, output) - return -} - -// ReadPipeline API operation for Amazon Elastic Transcoder. -// -// The ReadPipeline operation gets detailed information about a pipeline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation ReadPipeline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource does not exist or is not available. For example, the -// pipeline to which you're trying to add a job doesn't exist or is still being -// created. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) ReadPipeline(input *ReadPipelineInput) (*ReadPipelineOutput, error) { - req, out := c.ReadPipelineRequest(input) - return out, req.Send() -} - -// ReadPipelineWithContext is the same as ReadPipeline with the addition of -// the ability to pass a context and additional request options. -// -// See ReadPipeline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) ReadPipelineWithContext(ctx aws.Context, input *ReadPipelineInput, opts ...request.Option) (*ReadPipelineOutput, error) { - req, out := c.ReadPipelineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReadPreset = "ReadPreset" - -// ReadPresetRequest generates a "aws/request.Request" representing the -// client's request for the ReadPreset operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReadPreset for more information on using the ReadPreset -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReadPresetRequest method. -// req, resp := client.ReadPresetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) ReadPresetRequest(input *ReadPresetInput) (req *request.Request, output *ReadPresetOutput) { - op := &request.Operation{ - Name: opReadPreset, - HTTPMethod: "GET", - HTTPPath: "/2012-09-25/presets/{Id}", - } - - if input == nil { - input = &ReadPresetInput{} - } - - output = &ReadPresetOutput{} - req = c.newRequest(op, input, output) - return -} - -// ReadPreset API operation for Amazon Elastic Transcoder. -// -// The ReadPreset operation gets detailed information about a preset. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation ReadPreset for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource does not exist or is not available. For example, the -// pipeline to which you're trying to add a job doesn't exist or is still being -// created. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) ReadPreset(input *ReadPresetInput) (*ReadPresetOutput, error) { - req, out := c.ReadPresetRequest(input) - return out, req.Send() -} - -// ReadPresetWithContext is the same as ReadPreset with the addition of -// the ability to pass a context and additional request options. -// -// See ReadPreset for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) ReadPresetWithContext(ctx aws.Context, input *ReadPresetInput, opts ...request.Option) (*ReadPresetOutput, error) { - req, out := c.ReadPresetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTestRole = "TestRole" - -// TestRoleRequest generates a "aws/request.Request" representing the -// client's request for the TestRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TestRole for more information on using the TestRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TestRoleRequest method. -// req, resp := client.TestRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// Deprecated: TestRole has been deprecated -func (c *ElasticTranscoder) TestRoleRequest(input *TestRoleInput) (req *request.Request, output *TestRoleOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, TestRole, has been deprecated") - } - op := &request.Operation{ - Name: opTestRole, - HTTPMethod: "POST", - HTTPPath: "/2012-09-25/roleTests", - } - - if input == nil { - input = &TestRoleInput{} - } - - output = &TestRoleOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestRole API operation for Amazon Elastic Transcoder. -// -// The TestRole operation tests the IAM role used to create the pipeline. -// -// The TestRole action lets you determine whether the IAM role you are using -// has sufficient permissions to let Elastic Transcoder perform tasks associated -// with the transcoding process. The action attempts to assume the specified -// IAM role, checks read access to the input and output buckets, and tries to -// send a test notification to Amazon SNS topics that you specify. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation TestRole for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource does not exist or is not available. For example, the -// pipeline to which you're trying to add a job doesn't exist or is still being -// created. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -// -// Deprecated: TestRole has been deprecated -func (c *ElasticTranscoder) TestRole(input *TestRoleInput) (*TestRoleOutput, error) { - req, out := c.TestRoleRequest(input) - return out, req.Send() -} - -// TestRoleWithContext is the same as TestRole with the addition of -// the ability to pass a context and additional request options. -// -// See TestRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: TestRoleWithContext has been deprecated -func (c *ElasticTranscoder) TestRoleWithContext(ctx aws.Context, input *TestRoleInput, opts ...request.Option) (*TestRoleOutput, error) { - req, out := c.TestRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdatePipeline = "UpdatePipeline" - -// UpdatePipelineRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePipeline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdatePipeline for more information on using the UpdatePipeline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdatePipelineRequest method. -// req, resp := client.UpdatePipelineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) UpdatePipelineRequest(input *UpdatePipelineInput) (req *request.Request, output *UpdatePipelineOutput) { - op := &request.Operation{ - Name: opUpdatePipeline, - HTTPMethod: "PUT", - HTTPPath: "/2012-09-25/pipelines/{Id}", - } - - if input == nil { - input = &UpdatePipelineInput{} - } - - output = &UpdatePipelineOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdatePipeline API operation for Amazon Elastic Transcoder. -// -// Use the UpdatePipeline operation to update settings for a pipeline. -// -// When you change pipeline settings, your changes take effect immediately. -// Jobs that you have already submitted and that Elastic Transcoder has not -// started to process are affected in addition to jobs that you submit after -// you change settings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation UpdatePipeline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource you are attempting to change is in use. For example, you are -// attempting to delete a pipeline that is currently in use. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource does not exist or is not available. For example, the -// pipeline to which you're trying to add a job doesn't exist or is still being -// created. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) UpdatePipeline(input *UpdatePipelineInput) (*UpdatePipelineOutput, error) { - req, out := c.UpdatePipelineRequest(input) - return out, req.Send() -} - -// UpdatePipelineWithContext is the same as UpdatePipeline with the addition of -// the ability to pass a context and additional request options. -// -// See UpdatePipeline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) UpdatePipelineWithContext(ctx aws.Context, input *UpdatePipelineInput, opts ...request.Option) (*UpdatePipelineOutput, error) { - req, out := c.UpdatePipelineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdatePipelineNotifications = "UpdatePipelineNotifications" - -// UpdatePipelineNotificationsRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePipelineNotifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdatePipelineNotifications for more information on using the UpdatePipelineNotifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdatePipelineNotificationsRequest method. -// req, resp := client.UpdatePipelineNotificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) UpdatePipelineNotificationsRequest(input *UpdatePipelineNotificationsInput) (req *request.Request, output *UpdatePipelineNotificationsOutput) { - op := &request.Operation{ - Name: opUpdatePipelineNotifications, - HTTPMethod: "POST", - HTTPPath: "/2012-09-25/pipelines/{Id}/notifications", - } - - if input == nil { - input = &UpdatePipelineNotificationsInput{} - } - - output = &UpdatePipelineNotificationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdatePipelineNotifications API operation for Amazon Elastic Transcoder. -// -// With the UpdatePipelineNotifications operation, you can update Amazon Simple -// Notification Service (Amazon SNS) notifications for a pipeline. -// -// When you update notifications for a pipeline, Elastic Transcoder returns -// the values that you specified in the request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation UpdatePipelineNotifications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource does not exist or is not available. For example, the -// pipeline to which you're trying to add a job doesn't exist or is still being -// created. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource you are attempting to change is in use. For example, you are -// attempting to delete a pipeline that is currently in use. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) UpdatePipelineNotifications(input *UpdatePipelineNotificationsInput) (*UpdatePipelineNotificationsOutput, error) { - req, out := c.UpdatePipelineNotificationsRequest(input) - return out, req.Send() -} - -// UpdatePipelineNotificationsWithContext is the same as UpdatePipelineNotifications with the addition of -// the ability to pass a context and additional request options. -// -// See UpdatePipelineNotifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) UpdatePipelineNotificationsWithContext(ctx aws.Context, input *UpdatePipelineNotificationsInput, opts ...request.Option) (*UpdatePipelineNotificationsOutput, error) { - req, out := c.UpdatePipelineNotificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdatePipelineStatus = "UpdatePipelineStatus" - -// UpdatePipelineStatusRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePipelineStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdatePipelineStatus for more information on using the UpdatePipelineStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdatePipelineStatusRequest method. -// req, resp := client.UpdatePipelineStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *ElasticTranscoder) UpdatePipelineStatusRequest(input *UpdatePipelineStatusInput) (req *request.Request, output *UpdatePipelineStatusOutput) { - op := &request.Operation{ - Name: opUpdatePipelineStatus, - HTTPMethod: "POST", - HTTPPath: "/2012-09-25/pipelines/{Id}/status", - } - - if input == nil { - input = &UpdatePipelineStatusInput{} - } - - output = &UpdatePipelineStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdatePipelineStatus API operation for Amazon Elastic Transcoder. -// -// The UpdatePipelineStatus operation pauses or reactivates a pipeline, so that -// the pipeline stops or restarts the processing of jobs. -// -// Changing the pipeline status is useful if you want to cancel one or more -// jobs. You can't cancel jobs after Elastic Transcoder has started processing -// them; if you pause the pipeline to which you submitted the jobs, you have -// more time to get the job IDs for the jobs that you want to cancel, and to -// send a CancelJob request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic Transcoder's -// API operation UpdatePipelineStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// One or more required parameter values were not provided in the request. -// -// * ErrCodeIncompatibleVersionException "IncompatibleVersionException" -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource does not exist or is not available. For example, the -// pipeline to which you're trying to add a job doesn't exist or is still being -// created. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource you are attempting to change is in use. For example, you are -// attempting to delete a pipeline that is currently in use. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// General authentication failure. The request was not signed correctly. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// Elastic Transcoder encountered an unexpected exception while trying to fulfill -// the request. -// -func (c *ElasticTranscoder) UpdatePipelineStatus(input *UpdatePipelineStatusInput) (*UpdatePipelineStatusOutput, error) { - req, out := c.UpdatePipelineStatusRequest(input) - return out, req.Send() -} - -// UpdatePipelineStatusWithContext is the same as UpdatePipelineStatus with the addition of -// the ability to pass a context and additional request options. -// -// See UpdatePipelineStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) UpdatePipelineStatusWithContext(ctx aws.Context, input *UpdatePipelineStatusInput, opts ...request.Option) (*UpdatePipelineStatusOutput, error) { - req, out := c.UpdatePipelineStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// The file to be used as album art. There can be multiple artworks associated -// with an audio file, to a maximum of 20. -// -// To remove artwork or leave the artwork empty, you can either set Artwork -// to null, or set the Merge Policy to "Replace" and use an empty Artwork array. -// -// To pass through existing artwork unchanged, set the Merge Policy to "Prepend", -// "Append", or "Fallback", and use an empty Artwork array. -type Artwork struct { - _ struct{} `type:"structure"` - - // The format of album art, if any. Valid formats are .jpg and .png. - AlbumArtFormat *string `type:"string"` - - // The encryption settings, if any, that you want Elastic Transcoder to apply - // to your artwork. - Encryption *Encryption `type:"structure"` - - // The name of the file to be used as album art. To determine which Amazon S3 - // bucket contains the specified file, Elastic Transcoder checks the pipeline - // specified by PipelineId; the InputBucket object in that pipeline identifies - // the bucket. - // - // If the file name includes a prefix, for example, cooking/pie.jpg, include - // the prefix in the key. If the file isn't in the specified bucket, Elastic - // Transcoder returns an error. - InputKey *string `min:"1" type:"string"` - - // The maximum height of the output album art in pixels. If you specify auto, - // Elastic Transcoder uses 600 as the default value. If you specify a numeric - // value, enter an even integer between 32 and 3072, inclusive. - MaxHeight *string `type:"string"` - - // The maximum width of the output album art in pixels. If you specify auto, - // Elastic Transcoder uses 600 as the default value. If you specify a numeric - // value, enter an even integer between 32 and 4096, inclusive. - MaxWidth *string `type:"string"` - - // When you set PaddingPolicy to Pad, Elastic Transcoder may add white bars - // to the top and bottom and/or left and right sides of the output album art - // to make the total size of the output art match the values that you specified - // for MaxWidth and MaxHeight. - PaddingPolicy *string `type:"string"` - - // Specify one of the following values to control scaling of the output album - // art: - // - // * Fit: Elastic Transcoder scales the output art so it matches the value - // that you specified in either MaxWidth or MaxHeight without exceeding the - // other value. - // - // * Fill: Elastic Transcoder scales the output art so it matches the value - // that you specified in either MaxWidth or MaxHeight and matches or exceeds - // the other value. Elastic Transcoder centers the output art and then crops - // it in the dimension (if any) that exceeds the maximum value. - // - // * Stretch: Elastic Transcoder stretches the output art to match the values - // that you specified for MaxWidth and MaxHeight. If the relative proportions - // of the input art and the output art are different, the output art will - // be distorted. - // - // * Keep: Elastic Transcoder does not scale the output art. If either dimension - // of the input art exceeds the values that you specified for MaxWidth and - // MaxHeight, Elastic Transcoder crops the output art. - // - // * ShrinkToFit: Elastic Transcoder scales the output art down so that its - // dimensions match the values that you specified for at least one of MaxWidth - // and MaxHeight without exceeding either value. If you specify this option, - // Elastic Transcoder does not scale the art up. - // - // * ShrinkToFill Elastic Transcoder scales the output art down so that its - // dimensions match the values that you specified for at least one of MaxWidth - // and MaxHeight without dropping below either value. If you specify this - // option, Elastic Transcoder does not scale the art up. - SizingPolicy *string `type:"string"` -} - -// String returns the string representation -func (s Artwork) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Artwork) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Artwork) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Artwork"} - if s.InputKey != nil && len(*s.InputKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputKey", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlbumArtFormat sets the AlbumArtFormat field's value. -func (s *Artwork) SetAlbumArtFormat(v string) *Artwork { - s.AlbumArtFormat = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *Artwork) SetEncryption(v *Encryption) *Artwork { - s.Encryption = v - return s -} - -// SetInputKey sets the InputKey field's value. -func (s *Artwork) SetInputKey(v string) *Artwork { - s.InputKey = &v - return s -} - -// SetMaxHeight sets the MaxHeight field's value. -func (s *Artwork) SetMaxHeight(v string) *Artwork { - s.MaxHeight = &v - return s -} - -// SetMaxWidth sets the MaxWidth field's value. -func (s *Artwork) SetMaxWidth(v string) *Artwork { - s.MaxWidth = &v - return s -} - -// SetPaddingPolicy sets the PaddingPolicy field's value. -func (s *Artwork) SetPaddingPolicy(v string) *Artwork { - s.PaddingPolicy = &v - return s -} - -// SetSizingPolicy sets the SizingPolicy field's value. -func (s *Artwork) SetSizingPolicy(v string) *Artwork { - s.SizingPolicy = &v - return s -} - -// Options associated with your audio codec. -type AudioCodecOptions struct { - _ struct{} `type:"structure"` - - // You can only choose an audio bit depth when you specify flac or pcm for the - // value of Audio:Codec. - // - // The bit depth of a sample is how many bits of information are included in - // the audio samples. The higher the bit depth, the better the audio, but the - // larger the file. - // - // Valid values are 16 and 24. - // - // The most common bit depth is 24. - BitDepth *string `type:"string"` - - // You can only choose an audio bit order when you specify pcm for the value - // of Audio:Codec. - // - // The order the bits of a PCM sample are stored in. - // - // The supported value is LittleEndian. - BitOrder *string `type:"string"` - - // You can only choose an audio profile when you specify AAC for the value of - // Audio:Codec. - // - // Specify the AAC profile for the output file. Elastic Transcoder supports - // the following profiles: - // - // * auto: If you specify auto, Elastic Transcoder selects the profile based - // on the bit rate selected for the output file. - // - // * AAC-LC: The most common AAC profile. Use for bit rates larger than 64 - // kbps. - // - // * HE-AAC: Not supported on some older players and devices. Use for bit - // rates between 40 and 80 kbps. - // - // * HE-AACv2: Not supported on some players and devices. Use for bit rates - // less than 48 kbps. - // - // All outputs in a Smooth playlist must have the same value for Profile. - // - // If you created any presets before AAC profiles were added, Elastic Transcoder - // automatically updated your presets to use AAC-LC. You can change the value - // as required. - Profile *string `type:"string"` - - // You can only choose whether an audio sample is signed when you specify pcm - // for the value of Audio:Codec. - // - // Whether audio samples are represented with negative and positive numbers - // (signed) or only positive numbers (unsigned). - // - // The supported value is Signed. - Signed *string `type:"string"` -} - -// String returns the string representation -func (s AudioCodecOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioCodecOptions) GoString() string { - return s.String() -} - -// SetBitDepth sets the BitDepth field's value. -func (s *AudioCodecOptions) SetBitDepth(v string) *AudioCodecOptions { - s.BitDepth = &v - return s -} - -// SetBitOrder sets the BitOrder field's value. -func (s *AudioCodecOptions) SetBitOrder(v string) *AudioCodecOptions { - s.BitOrder = &v - return s -} - -// SetProfile sets the Profile field's value. -func (s *AudioCodecOptions) SetProfile(v string) *AudioCodecOptions { - s.Profile = &v - return s -} - -// SetSigned sets the Signed field's value. -func (s *AudioCodecOptions) SetSigned(v string) *AudioCodecOptions { - s.Signed = &v - return s -} - -// Parameters required for transcoding audio. -type AudioParameters struct { - _ struct{} `type:"structure"` - - // The method of organizing audio channels and tracks. Use Audio:Channels to - // specify the number of channels in your output, and Audio:AudioPackingMode - // to specify the number of tracks and their relation to the channels. If you - // do not specify an Audio:AudioPackingMode, Elastic Transcoder uses SingleTrack. - // - // The following values are valid: - // - // SingleTrack, OneChannelPerTrack, and OneChannelPerTrackWithMosTo8Tracks - // - // When you specify SingleTrack, Elastic Transcoder creates a single track for - // your output. The track can have up to eight channels. Use SingleTrack for - // all non-mxf containers. - // - // The outputs of SingleTrack for a specific channel value and inputs are as - // follows: - // - // * 0 channels with any input: Audio omitted from the output - // - // * 1, 2, or auto channels with no audio input: Audio omitted from the output - // - // * 1 channel with any input with audio: One track with one channel, downmixed - // if necessary - // - // * 2 channels with one track with one channel: One track with two identical - // channels - // - // * 2 or auto channels with two tracks with one channel each: One track - // with two channels - // - // * 2 or auto channels with one track with two channels: One track with - // two channels - // - // * 2 channels with one track with multiple channels: One track with two - // channels - // - // * auto channels with one track with one channel: One track with one channel - // - // * auto channels with one track with multiple channels: One track with - // multiple channels - // - // When you specify OneChannelPerTrack, Elastic Transcoder creates a new track - // for every channel in your output. Your output can have up to eight single-channel - // tracks. - // - // The outputs of OneChannelPerTrack for a specific channel value and inputs - // are as follows: - // - // * 0 channels with any input: Audio omitted from the output - // - // * 1, 2, or auto channels with no audio input: Audio omitted from the output - // - // * 1 channel with any input with audio: One track with one channel, downmixed - // if necessary - // - // * 2 channels with one track with one channel: Two tracks with one identical - // channel each - // - // * 2 or auto channels with two tracks with one channel each: Two tracks - // with one channel each - // - // * 2 or auto channels with one track with two channels: Two tracks with - // one channel each - // - // * 2 channels with one track with multiple channels: Two tracks with one - // channel each - // - // * auto channels with one track with one channel: One track with one channel - // - // * auto channels with one track with multiple channels: Up to eight tracks - // with one channel each - // - // When you specify OneChannelPerTrackWithMosTo8Tracks, Elastic Transcoder creates - // eight single-channel tracks for your output. All tracks that do not contain - // audio data from an input channel are MOS, or Mit Out Sound, tracks. - // - // The outputs of OneChannelPerTrackWithMosTo8Tracks for a specific channel - // value and inputs are as follows: - // - // * 0 channels with any input: Audio omitted from the output - // - // * 1, 2, or auto channels with no audio input: Audio omitted from the output - // - // * 1 channel with any input with audio: One track with one channel, downmixed - // if necessary, plus six MOS tracks - // - // * 2 channels with one track with one channel: Two tracks with one identical - // channel each, plus six MOS tracks - // - // * 2 or auto channels with two tracks with one channel each: Two tracks - // with one channel each, plus six MOS tracks - // - // * 2 or auto channels with one track with two channels: Two tracks with - // one channel each, plus six MOS tracks - // - // * 2 channels with one track with multiple channels: Two tracks with one - // channel each, plus six MOS tracks - // - // * auto channels with one track with one channel: One track with one channel, - // plus seven MOS tracks - // - // * auto channels with one track with multiple channels: Up to eight tracks - // with one channel each, plus MOS tracks until there are eight tracks in - // all - AudioPackingMode *string `type:"string"` - - // The bit rate of the audio stream in the output file, in kilobits/second. - // Enter an integer between 64 and 320, inclusive. - BitRate *string `type:"string"` - - // The number of audio channels in the output file. The following values are - // valid: - // - // auto, 0, 1, 2 - // - // One channel carries the information played by a single speaker. For example, - // a stereo track with two channels sends one channel to the left speaker, and - // the other channel to the right speaker. The output channels are organized - // into tracks. If you want Elastic Transcoder to automatically detect the number - // of audio channels in the input file and use that value for the output file, - // select auto. - // - // The output of a specific channel value and inputs are as follows: - // - // * auto channel specified, with any input: Pass through up to eight input - // channels. - // - // * 0 channels specified, with any input: Audio omitted from the output. - // - // * 1 channel specified, with at least one input channel: Mono sound. - // - // * 2 channels specified, with any input: Two identical mono channels or - // stereo. For more information about tracks, see Audio:AudioPackingMode. - // - // For more information about how Elastic Transcoder organizes channels and - // tracks, see Audio:AudioPackingMode. - Channels *string `type:"string"` - - // The audio codec for the output file. Valid values include aac, flac, mp2, - // mp3, pcm, and vorbis. - Codec *string `type:"string"` - - // If you specified AAC for Audio:Codec, this is the AAC compression profile - // to use. Valid values include: - // - // auto, AAC-LC, HE-AAC, HE-AACv2 - // - // If you specify auto, Elastic Transcoder chooses a profile based on the bit - // rate of the output file. - CodecOptions *AudioCodecOptions `type:"structure"` - - // The sample rate of the audio stream in the output file, in Hertz. Valid values - // include: - // - // auto, 22050, 32000, 44100, 48000, 96000 - // - // If you specify auto, Elastic Transcoder automatically detects the sample - // rate. - SampleRate *string `type:"string"` -} - -// String returns the string representation -func (s AudioParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioParameters) GoString() string { - return s.String() -} - -// SetAudioPackingMode sets the AudioPackingMode field's value. -func (s *AudioParameters) SetAudioPackingMode(v string) *AudioParameters { - s.AudioPackingMode = &v - return s -} - -// SetBitRate sets the BitRate field's value. -func (s *AudioParameters) SetBitRate(v string) *AudioParameters { - s.BitRate = &v - return s -} - -// SetChannels sets the Channels field's value. -func (s *AudioParameters) SetChannels(v string) *AudioParameters { - s.Channels = &v - return s -} - -// SetCodec sets the Codec field's value. -func (s *AudioParameters) SetCodec(v string) *AudioParameters { - s.Codec = &v - return s -} - -// SetCodecOptions sets the CodecOptions field's value. -func (s *AudioParameters) SetCodecOptions(v *AudioCodecOptions) *AudioParameters { - s.CodecOptions = v - return s -} - -// SetSampleRate sets the SampleRate field's value. -func (s *AudioParameters) SetSampleRate(v string) *AudioParameters { - s.SampleRate = &v - return s -} - -// The CancelJobRequest structure. -type CancelJobInput struct { - _ struct{} `type:"structure"` - - // The identifier of the job that you want to cancel. - // - // To get a list of the jobs (including their jobId) that have a status of Submitted, - // use the ListJobsByStatus API action. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelJobInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *CancelJobInput) SetId(v string) *CancelJobInput { - s.Id = &v - return s -} - -// The response body contains a JSON object. If the job is successfully canceled, -// the value of Success is true. -type CancelJobOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CancelJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelJobOutput) GoString() string { - return s.String() -} - -// The file format of the output captions. If you leave this value blank, Elastic -// Transcoder returns an error. -type CaptionFormat struct { - _ struct{} `type:"structure"` - - // The encryption settings, if any, that you want Elastic Transcoder to apply - // to your caption formats. - Encryption *Encryption `type:"structure"` - - // The format you specify determines whether Elastic Transcoder generates an - // embedded or sidecar caption for this output. - // - // * Valid Embedded Caption Formats: - // - // for FLAC: None - // - // For MP3: None - // - // For MP4: mov-text - // - // For MPEG-TS: None - // - // For ogg: None - // - // For webm: None - // - // * Valid Sidecar Caption Formats: Elastic Transcoder supports dfxp (first - // div element only), scc, srt, and webvtt. If you want ttml or smpte-tt - // compatible captions, specify dfxp as your output format. - // - // For FMP4: dfxp - // - // Non-FMP4 outputs: All sidecar types - // - // fmp4 captions have an extension of .ismt - Format *string `type:"string"` - - // The prefix for caption filenames, in the form description-{language}, where: - // - // * description is a description of the video. - // - // * {language} is a literal value that Elastic Transcoder replaces with - // the two- or three-letter code for the language of the caption in the output - // file names. - // - // If you don't include {language} in the file name pattern, Elastic Transcoder - // automatically appends "{language}" to the value that you specify for the - // description. In addition, Elastic Transcoder automatically appends the count - // to the end of the segment files. - // - // For example, suppose you're transcoding into srt format. When you enter "Sydney-{language}-sunrise", - // and the language of the captions is English (en), the name of the first caption - // file is be Sydney-en-sunrise00000.srt. - Pattern *string `type:"string"` -} - -// String returns the string representation -func (s CaptionFormat) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CaptionFormat) GoString() string { - return s.String() -} - -// SetEncryption sets the Encryption field's value. -func (s *CaptionFormat) SetEncryption(v *Encryption) *CaptionFormat { - s.Encryption = v - return s -} - -// SetFormat sets the Format field's value. -func (s *CaptionFormat) SetFormat(v string) *CaptionFormat { - s.Format = &v - return s -} - -// SetPattern sets the Pattern field's value. -func (s *CaptionFormat) SetPattern(v string) *CaptionFormat { - s.Pattern = &v - return s -} - -// A source file for the input sidecar captions used during the transcoding -// process. -type CaptionSource struct { - _ struct{} `type:"structure"` - - // The encryption settings, if any, that Elastic Transcoder needs to decyrpt - // your caption sources, or that you want Elastic Transcoder to apply to your - // caption sources. - Encryption *Encryption `type:"structure"` - - // The name of the sidecar caption file that you want Elastic Transcoder to - // include in the output file. - Key *string `min:"1" type:"string"` - - // The label of the caption shown in the player when choosing a language. We - // recommend that you put the caption language name here, in the language of - // the captions. - Label *string `min:"1" type:"string"` - - // A string that specifies the language of the caption. If you specified multiple - // inputs with captions, the caption language must match in order to be included - // in the output. Specify this as one of: - // - // * 2-character ISO 639-1 code - // - // * 3-character ISO 639-2 code - // - // For more information on ISO language codes and language names, see the List - // of ISO 639-1 codes. - Language *string `min:"1" type:"string"` - - // For clip generation or captions that do not start at the same time as the - // associated video file, the TimeOffset tells Elastic Transcoder how much of - // the video to encode before including captions. - // - // Specify the TimeOffset in the form [+-]SS.sss or [+-]HH:mm:SS.ss. - TimeOffset *string `type:"string"` -} - -// String returns the string representation -func (s CaptionSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CaptionSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CaptionSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CaptionSource"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Label != nil && len(*s.Label) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Label", 1)) - } - if s.Language != nil && len(*s.Language) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Language", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryption sets the Encryption field's value. -func (s *CaptionSource) SetEncryption(v *Encryption) *CaptionSource { - s.Encryption = v - return s -} - -// SetKey sets the Key field's value. -func (s *CaptionSource) SetKey(v string) *CaptionSource { - s.Key = &v - return s -} - -// SetLabel sets the Label field's value. -func (s *CaptionSource) SetLabel(v string) *CaptionSource { - s.Label = &v - return s -} - -// SetLanguage sets the Language field's value. -func (s *CaptionSource) SetLanguage(v string) *CaptionSource { - s.Language = &v - return s -} - -// SetTimeOffset sets the TimeOffset field's value. -func (s *CaptionSource) SetTimeOffset(v string) *CaptionSource { - s.TimeOffset = &v - return s -} - -// The captions to be created, if any. -type Captions struct { - _ struct{} `type:"structure"` - - // The array of file formats for the output captions. If you leave this value - // blank, Elastic Transcoder returns an error. - CaptionFormats []*CaptionFormat `type:"list"` - - // Source files for the input sidecar captions used during the transcoding process. - // To omit all sidecar captions, leave CaptionSources blank. - // - // Deprecated: CaptionSources has been deprecated - CaptionSources []*CaptionSource `deprecated:"true" type:"list"` - - // A policy that determines how Elastic Transcoder handles the existence of - // multiple captions. - // - // * MergeOverride: Elastic Transcoder transcodes both embedded and sidecar - // captions into outputs. If captions for a language are embedded in the - // input file and also appear in a sidecar file, Elastic Transcoder uses - // the sidecar captions and ignores the embedded captions for that language. - // - // * MergeRetain: Elastic Transcoder transcodes both embedded and sidecar - // captions into outputs. If captions for a language are embedded in the - // input file and also appear in a sidecar file, Elastic Transcoder uses - // the embedded captions and ignores the sidecar captions for that language. - // If CaptionSources is empty, Elastic Transcoder omits all sidecar captions - // from the output files. - // - // * Override: Elastic Transcoder transcodes only the sidecar captions that - // you specify in CaptionSources. - // - // MergePolicy cannot be null. - // - // Deprecated: MergePolicy has been deprecated - MergePolicy *string `deprecated:"true" type:"string"` -} - -// String returns the string representation -func (s Captions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Captions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Captions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Captions"} - if s.CaptionSources != nil { - for i, v := range s.CaptionSources { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionSources", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCaptionFormats sets the CaptionFormats field's value. -func (s *Captions) SetCaptionFormats(v []*CaptionFormat) *Captions { - s.CaptionFormats = v - return s -} - -// SetCaptionSources sets the CaptionSources field's value. -func (s *Captions) SetCaptionSources(v []*CaptionSource) *Captions { - s.CaptionSources = v - return s -} - -// SetMergePolicy sets the MergePolicy field's value. -func (s *Captions) SetMergePolicy(v string) *Captions { - s.MergePolicy = &v - return s -} - -// Settings for one clip in a composition. All jobs in a playlist must have -// the same clip settings. -// -// Deprecated: Clip has been deprecated -type Clip struct { - _ struct{} `deprecated:"true" type:"structure"` - - // Settings that determine when a clip begins and how long it lasts. - TimeSpan *TimeSpan `type:"structure"` -} - -// String returns the string representation -func (s Clip) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Clip) GoString() string { - return s.String() -} - -// SetTimeSpan sets the TimeSpan field's value. -func (s *Clip) SetTimeSpan(v *TimeSpan) *Clip { - s.TimeSpan = v - return s -} - -// The CreateJobRequest structure. -type CreateJobInput struct { - _ struct{} `type:"structure"` - - // A section of the request body that provides information about the file that - // is being transcoded. - Input *JobInput `type:"structure"` - - // A section of the request body that provides information about the files that - // are being transcoded. - Inputs []*JobInput `type:"list"` - - // A section of the request body that provides information about the transcoded - // (target) file. We strongly recommend that you use the Outputs syntax instead - // of the Output syntax. - Output *CreateJobOutput `type:"structure"` - - // The value, if any, that you want Elastic Transcoder to prepend to the names - // of all files that this job creates, including output files, thumbnails, and - // playlists. - OutputKeyPrefix *string `min:"1" type:"string"` - - // A section of the request body that provides information about the transcoded - // (target) files. We recommend that you use the Outputs syntax instead of the - // Output syntax. - Outputs []*CreateJobOutput `type:"list"` - - // The Id of the pipeline that you want Elastic Transcoder to use for transcoding. - // The pipeline determines several settings, including the Amazon S3 bucket - // from which Elastic Transcoder gets the files to transcode and the bucket - // into which Elastic Transcoder puts the transcoded files. - // - // PipelineId is a required field - PipelineId *string `type:"string" required:"true"` - - // If you specify a preset in PresetId for which the value of Container is fmp4 - // (Fragmented MP4) or ts (MPEG-TS), Playlists contains information about the - // master playlists that you want Elastic Transcoder to create. - // - // The maximum number of master playlists in a job is 30. - Playlists []*CreateJobPlaylist `type:"list"` - - // User-defined metadata that you want to associate with an Elastic Transcoder - // job. You specify metadata in key/value pairs, and you can add up to 10 key/value - // pairs per job. Elastic Transcoder does not guarantee that key/value pairs - // are returned in the same order in which you specify them. - UserMetadata map[string]*string `type:"map"` -} - -// String returns the string representation -func (s CreateJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateJobInput"} - if s.OutputKeyPrefix != nil && len(*s.OutputKeyPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OutputKeyPrefix", 1)) - } - if s.PipelineId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineId")) - } - if s.Input != nil { - if err := s.Input.Validate(); err != nil { - invalidParams.AddNested("Input", err.(request.ErrInvalidParams)) - } - } - if s.Inputs != nil { - for i, v := range s.Inputs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Inputs", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Output != nil { - if err := s.Output.Validate(); err != nil { - invalidParams.AddNested("Output", err.(request.ErrInvalidParams)) - } - } - if s.Outputs != nil { - for i, v := range s.Outputs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Outputs", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Playlists != nil { - for i, v := range s.Playlists { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Playlists", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInput sets the Input field's value. -func (s *CreateJobInput) SetInput(v *JobInput) *CreateJobInput { - s.Input = v - return s -} - -// SetInputs sets the Inputs field's value. -func (s *CreateJobInput) SetInputs(v []*JobInput) *CreateJobInput { - s.Inputs = v - return s -} - -// SetOutput sets the Output field's value. -func (s *CreateJobInput) SetOutput(v *CreateJobOutput) *CreateJobInput { - s.Output = v - return s -} - -// SetOutputKeyPrefix sets the OutputKeyPrefix field's value. -func (s *CreateJobInput) SetOutputKeyPrefix(v string) *CreateJobInput { - s.OutputKeyPrefix = &v - return s -} - -// SetOutputs sets the Outputs field's value. -func (s *CreateJobInput) SetOutputs(v []*CreateJobOutput) *CreateJobInput { - s.Outputs = v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *CreateJobInput) SetPipelineId(v string) *CreateJobInput { - s.PipelineId = &v - return s -} - -// SetPlaylists sets the Playlists field's value. -func (s *CreateJobInput) SetPlaylists(v []*CreateJobPlaylist) *CreateJobInput { - s.Playlists = v - return s -} - -// SetUserMetadata sets the UserMetadata field's value. -func (s *CreateJobInput) SetUserMetadata(v map[string]*string) *CreateJobInput { - s.UserMetadata = v - return s -} - -// The CreateJobOutput structure. -type CreateJobOutput struct { - _ struct{} `type:"structure"` - - // Information about the album art that you want Elastic Transcoder to add to - // the file during transcoding. You can specify up to twenty album artworks - // for each output. Settings for each artwork must be defined in the job for - // the current output. - AlbumArt *JobAlbumArt `type:"structure"` - - // You can configure Elastic Transcoder to transcode captions, or subtitles, - // from one format to another. All captions must be in UTF-8. Elastic Transcoder - // supports two types of captions: - // - // * Embedded: Embedded captions are included in the same file as the audio - // and video. Elastic Transcoder supports only one embedded caption per language, - // to a maximum of 300 embedded captions per file. - // - // Valid input values include: CEA-608 (EIA-608, first non-empty channel only), - // CEA-708 (EIA-708, first non-empty channel only), and mov-text - // - // Valid outputs include: mov-text - // - // Elastic Transcoder supports a maximum of one embedded format per output. - // - // * Sidecar: Sidecar captions are kept in a separate metadata file from - // the audio and video data. Sidecar captions require a player that is capable - // of understanding the relationship between the video file and the sidecar - // file. Elastic Transcoder supports only one sidecar caption per language, - // to a maximum of 20 sidecar captions per file. - // - // Valid input values include: dfxp (first div element only), ebu-tt, scc, smpt, - // srt, ttml (first div element only), and webvtt - // - // Valid outputs include: dfxp (first div element only), scc, srt, and webvtt. - // - // If you want ttml or smpte-tt compatible captions, specify dfxp as your output - // format. - // - // Elastic Transcoder does not support OCR (Optical Character Recognition), - // does not accept pictures as a valid input for captions, and is not available - // for audio-only transcoding. Elastic Transcoder does not preserve text formatting - // (for example, italics) during the transcoding process. - // - // To remove captions or leave the captions empty, set Captions to null. To - // pass through existing captions unchanged, set the MergePolicy to MergeRetain, - // and pass in a null CaptionSources array. - // - // For more information on embedded files, see the Subtitles Wikipedia page. - // - // For more information on sidecar files, see the Extensible Metadata Platform - // and Sidecar file Wikipedia pages. - Captions *Captions `type:"structure"` - - // You can create an output file that contains an excerpt from the input file. - // This excerpt, called a clip, can come from the beginning, middle, or end - // of the file. The Composition object contains settings for the clips that - // make up an output file. For the current release, you can only specify settings - // for a single clip per output file. The Composition object cannot be null. - // - // Deprecated: Composition has been deprecated - Composition []*Clip `deprecated:"true" type:"list"` - - // You can specify encryption settings for any output files that you want to - // use for a transcoding job. This includes the output file and any watermarks, - // thumbnails, album art, or captions that you want to use. You must specify - // encryption settings for each file individually. - Encryption *Encryption `type:"structure"` - - // The name to assign to the transcoded file. Elastic Transcoder saves the file - // in the Amazon S3 bucket specified by the OutputBucket object in the pipeline - // that is specified by the pipeline ID. If a file with the specified name already - // exists in the output bucket, the job fails. - Key *string `min:"1" type:"string"` - - // The Id of the preset to use for this job. The preset determines the audio, - // video, and thumbnail settings that Elastic Transcoder uses for transcoding. - PresetId *string `type:"string"` - - // The number of degrees clockwise by which you want Elastic Transcoder to rotate - // the output relative to the input. Enter one of the following values: auto, - // 0, 90, 180, 270. The value auto generally works only if the file that you're - // transcoding contains rotation metadata. - Rotate *string `type:"string"` - - // (Outputs in Fragmented MP4 or MPEG-TS format only. - // - // If you specify a preset in PresetId for which the value of Container is fmp4 - // (Fragmented MP4) or ts (MPEG-TS), SegmentDuration is the target maximum duration - // of each segment in seconds. For HLSv3 format playlists, each media segment - // is stored in a separate .ts file. For HLSv4 and Smooth playlists, all media - // segments for an output are stored in a single file. Each segment is approximately - // the length of the SegmentDuration, though individual segments might be shorter - // or longer. - // - // The range of valid values is 1 to 60 seconds. If the duration of the video - // is not evenly divisible by SegmentDuration, the duration of the last segment - // is the remainder of total length/SegmentDuration. - // - // Elastic Transcoder creates an output-specific playlist for each output HLS - // output that you specify in OutputKeys. To add an output to the master playlist - // for this job, include it in the OutputKeys of the associated playlist. - SegmentDuration *string `type:"string"` - - // The encryption settings, if any, that you want Elastic Transcoder to apply - // to your thumbnail. - ThumbnailEncryption *Encryption `type:"structure"` - - // Whether you want Elastic Transcoder to create thumbnails for your videos - // and, if so, how you want Elastic Transcoder to name the files. - // - // If you don't want Elastic Transcoder to create thumbnails, specify "". - // - // If you do want Elastic Transcoder to create thumbnails, specify the information - // that you want to include in the file name for each thumbnail. You can specify - // the following values in any sequence: - // - // * {count} (Required): If you want to create thumbnails, you must include - // {count} in the ThumbnailPattern object. Wherever you specify {count}, - // Elastic Transcoder adds a five-digit sequence number (beginning with 00001) - // to thumbnail file names. The number indicates where a given thumbnail - // appears in the sequence of thumbnails for a transcoded file. - // - // If you specify a literal value and/or {resolution} but you omit {count}, - // Elastic Transcoder returns a validation error and does not create the - // job. - // - // * Literal values (Optional): You can specify literal values anywhere in - // the ThumbnailPattern object. For example, you can include them as a file - // name prefix or as a delimiter between {resolution} and {count}. - // - // * {resolution} (Optional): If you want Elastic Transcoder to include the - // resolution in the file name, include {resolution} in the ThumbnailPattern - // object. - // - // When creating thumbnails, Elastic Transcoder automatically saves the files - // in the format (.jpg or .png) that appears in the preset that you specified - // in the PresetID value of CreateJobOutput. Elastic Transcoder also appends - // the applicable file name extension. - ThumbnailPattern *string `type:"string"` - - // Information about the watermarks that you want Elastic Transcoder to add - // to the video during transcoding. You can specify up to four watermarks for - // each output. Settings for each watermark must be defined in the preset for - // the current output. - Watermarks []*JobWatermark `type:"list"` -} - -// String returns the string representation -func (s CreateJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJobOutput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateJobOutput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateJobOutput"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.AlbumArt != nil { - if err := s.AlbumArt.Validate(); err != nil { - invalidParams.AddNested("AlbumArt", err.(request.ErrInvalidParams)) - } - } - if s.Captions != nil { - if err := s.Captions.Validate(); err != nil { - invalidParams.AddNested("Captions", err.(request.ErrInvalidParams)) - } - } - if s.Watermarks != nil { - for i, v := range s.Watermarks { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Watermarks", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlbumArt sets the AlbumArt field's value. -func (s *CreateJobOutput) SetAlbumArt(v *JobAlbumArt) *CreateJobOutput { - s.AlbumArt = v - return s -} - -// SetCaptions sets the Captions field's value. -func (s *CreateJobOutput) SetCaptions(v *Captions) *CreateJobOutput { - s.Captions = v - return s -} - -// SetComposition sets the Composition field's value. -func (s *CreateJobOutput) SetComposition(v []*Clip) *CreateJobOutput { - s.Composition = v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *CreateJobOutput) SetEncryption(v *Encryption) *CreateJobOutput { - s.Encryption = v - return s -} - -// SetKey sets the Key field's value. -func (s *CreateJobOutput) SetKey(v string) *CreateJobOutput { - s.Key = &v - return s -} - -// SetPresetId sets the PresetId field's value. -func (s *CreateJobOutput) SetPresetId(v string) *CreateJobOutput { - s.PresetId = &v - return s -} - -// SetRotate sets the Rotate field's value. -func (s *CreateJobOutput) SetRotate(v string) *CreateJobOutput { - s.Rotate = &v - return s -} - -// SetSegmentDuration sets the SegmentDuration field's value. -func (s *CreateJobOutput) SetSegmentDuration(v string) *CreateJobOutput { - s.SegmentDuration = &v - return s -} - -// SetThumbnailEncryption sets the ThumbnailEncryption field's value. -func (s *CreateJobOutput) SetThumbnailEncryption(v *Encryption) *CreateJobOutput { - s.ThumbnailEncryption = v - return s -} - -// SetThumbnailPattern sets the ThumbnailPattern field's value. -func (s *CreateJobOutput) SetThumbnailPattern(v string) *CreateJobOutput { - s.ThumbnailPattern = &v - return s -} - -// SetWatermarks sets the Watermarks field's value. -func (s *CreateJobOutput) SetWatermarks(v []*JobWatermark) *CreateJobOutput { - s.Watermarks = v - return s -} - -// Information about the master playlist. -type CreateJobPlaylist struct { - _ struct{} `type:"structure"` - - // The format of the output playlist. Valid formats include HLSv3, HLSv4, and - // Smooth. - Format *string `type:"string"` - - // The HLS content protection settings, if any, that you want Elastic Transcoder - // to apply to the output files associated with this playlist. - HlsContentProtection *HlsContentProtection `type:"structure"` - - // The name that you want Elastic Transcoder to assign to the master playlist, - // for example, nyc-vacation.m3u8. If the name includes a / character, the section - // of the name before the last / must be identical for all Name objects. If - // you create more than one master playlist, the values of all Name objects - // must be unique. - // - // Elastic Transcoder automatically appends the relevant file extension to the - // file name (.m3u8 for HLSv3 and HLSv4 playlists, and .ism and .ismc for Smooth - // playlists). If you include a file extension in Name, the file name will have - // two extensions. - Name *string `min:"1" type:"string"` - - // For each output in this job that you want to include in a master playlist, - // the value of the Outputs:Key object. - // - // * If your output is not HLS or does not have a segment duration set, the - // name of the output file is a concatenation of OutputKeyPrefix and Outputs:Key: - // - // OutputKeyPrefixOutputs:Key - // - // * If your output is HLSv3 and has a segment duration set, or is not included - // in a playlist, Elastic Transcoder creates an output playlist file with - // a file extension of .m3u8, and a series of .ts files that include a five-digit - // sequential counter beginning with 00000: - // - // OutputKeyPrefixOutputs:Key.m3u8 - // - // OutputKeyPrefixOutputs:Key00000.ts - // - // * If your output is HLSv4, has a segment duration set, and is included - // in an HLSv4 playlist, Elastic Transcoder creates an output playlist file - // with a file extension of _v4.m3u8. If the output is video, Elastic Transcoder - // also creates an output file with an extension of _iframe.m3u8: - // - // OutputKeyPrefixOutputs:Key_v4.m3u8 - // - // OutputKeyPrefixOutputs:Key_iframe.m3u8 - // - // OutputKeyPrefixOutputs:Key.ts - // - // Elastic Transcoder automatically appends the relevant file extension to the - // file name. If you include a file extension in Output Key, the file name will - // have two extensions. - // - // If you include more than one output in a playlist, any segment duration settings, - // clip settings, or caption settings must be the same for all outputs in the - // playlist. For Smooth playlists, the Audio:Profile, Video:Profile, and Video:FrameRate - // to Video:KeyframesMaxDist ratio must be the same for all outputs. - OutputKeys []*string `type:"list"` - - // The DRM settings, if any, that you want Elastic Transcoder to apply to the - // output files associated with this playlist. - PlayReadyDrm *PlayReadyDrm `type:"structure"` -} - -// String returns the string representation -func (s CreateJobPlaylist) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJobPlaylist) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateJobPlaylist) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateJobPlaylist"} - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.PlayReadyDrm != nil { - if err := s.PlayReadyDrm.Validate(); err != nil { - invalidParams.AddNested("PlayReadyDrm", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFormat sets the Format field's value. -func (s *CreateJobPlaylist) SetFormat(v string) *CreateJobPlaylist { - s.Format = &v - return s -} - -// SetHlsContentProtection sets the HlsContentProtection field's value. -func (s *CreateJobPlaylist) SetHlsContentProtection(v *HlsContentProtection) *CreateJobPlaylist { - s.HlsContentProtection = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateJobPlaylist) SetName(v string) *CreateJobPlaylist { - s.Name = &v - return s -} - -// SetOutputKeys sets the OutputKeys field's value. -func (s *CreateJobPlaylist) SetOutputKeys(v []*string) *CreateJobPlaylist { - s.OutputKeys = v - return s -} - -// SetPlayReadyDrm sets the PlayReadyDrm field's value. -func (s *CreateJobPlaylist) SetPlayReadyDrm(v *PlayReadyDrm) *CreateJobPlaylist { - s.PlayReadyDrm = v - return s -} - -// The CreateJobResponse structure. -type CreateJobResponse struct { - _ struct{} `type:"structure"` - - // A section of the response body that provides information about the job that - // is created. - Job *Job `type:"structure"` -} - -// String returns the string representation -func (s CreateJobResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJobResponse) GoString() string { - return s.String() -} - -// SetJob sets the Job field's value. -func (s *CreateJobResponse) SetJob(v *Job) *CreateJobResponse { - s.Job = v - return s -} - -// The CreatePipelineRequest structure. -type CreatePipelineInput struct { - _ struct{} `type:"structure"` - - // The AWS Key Management Service (AWS KMS) key that you want to use with this - // pipeline. - // - // If you use either s3 or s3-aws-kms as your Encryption:Mode, you don't need - // to provide a key with your job because a default key, known as an AWS-KMS - // key, is created for you automatically. You need to provide an AWS-KMS key - // only if you want to use a non-default AWS-KMS key, or if you are using an - // Encryption:Mode of aes-cbc-pkcs7, aes-ctr, or aes-gcm. - AwsKmsKeyArn *string `type:"string"` - - // The optional ContentConfig object specifies information about the Amazon - // S3 bucket in which you want Elastic Transcoder to save transcoded files and - // playlists: which bucket to use, which users you want to have access to the - // files, the type of access you want users to have, and the storage class that - // you want to assign to the files. - // - // If you specify values for ContentConfig, you must also specify values for - // ThumbnailConfig. - // - // If you specify values for ContentConfig and ThumbnailConfig, omit the OutputBucket - // object. - // - // * Bucket: The Amazon S3 bucket in which you want Elastic Transcoder to - // save transcoded files and playlists. - // - // * Permissions (Optional): The Permissions object specifies which users - // you want to have access to transcoded files and the type of access you - // want them to have. You can grant permissions to a maximum of 30 users - // and/or predefined Amazon S3 groups. - // - // * Grantee Type: Specify the type of value that appears in the Grantee - // object: - // - // Canonical: The value in the Grantee object is either the canonical user ID - // for an AWS account or an origin access identity for an Amazon CloudFront - // distribution. For more information about canonical user IDs, see Access - // Control List (ACL) Overview in the Amazon Simple Storage Service Developer - // Guide. For more information about using CloudFront origin access identities - // to require that users use CloudFront URLs instead of Amazon S3 URLs, see - // Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content. - // - // A canonical user ID is not the same as an AWS account number. - // - // Email: The value in the Grantee object is the registered email address of - // an AWS account. - // - // Group: The value in the Grantee object is one of the following predefined - // Amazon S3 groups: AllUsers, AuthenticatedUsers, or LogDelivery. - // - // * Grantee: The AWS user or group that you want to have access to transcoded - // files and playlists. To identify the user or group, you can specify the - // canonical user ID for an AWS account, an origin access identity for a - // CloudFront distribution, the registered email address of an AWS account, - // or a predefined Amazon S3 group - // - // * Access: The permission that you want to give to the AWS user that you - // specified in Grantee. Permissions are granted on the files that Elastic - // Transcoder adds to the bucket, including playlists and video files. Valid - // values include: - // - // READ: The grantee can read the objects and metadata for objects that Elastic - // Transcoder adds to the Amazon S3 bucket. - // - // READ_ACP: The grantee can read the object ACL for objects that Elastic Transcoder - // adds to the Amazon S3 bucket. - // - // WRITE_ACP: The grantee can write the ACL for the objects that Elastic Transcoder - // adds to the Amazon S3 bucket. - // - // FULL_CONTROL: The grantee has READ, READ_ACP, and WRITE_ACP permissions for - // the objects that Elastic Transcoder adds to the Amazon S3 bucket. - // - // * StorageClass: The Amazon S3 storage class, Standard or ReducedRedundancy, - // that you want Elastic Transcoder to assign to the video files and playlists - // that it stores in your Amazon S3 bucket. - ContentConfig *PipelineOutputConfig `type:"structure"` - - // The Amazon S3 bucket in which you saved the media files that you want to - // transcode. - // - // InputBucket is a required field - InputBucket *string `type:"string" required:"true"` - - // The name of the pipeline. We recommend that the name be unique within the - // AWS account, but uniqueness is not enforced. - // - // Constraints: Maximum 40 characters. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The Amazon Simple Notification Service (Amazon SNS) topic that you want to - // notify to report job status. - // - // To receive notifications, you must also subscribe to the new topic in the - // Amazon SNS console. - // - // * Progressing: The topic ARN for the Amazon Simple Notification Service - // (Amazon SNS) topic that you want to notify when Elastic Transcoder has - // started to process a job in this pipeline. This is the ARN that Amazon - // SNS returned when you created the topic. For more information, see Create - // a Topic in the Amazon Simple Notification Service Developer Guide. - // - // * Complete: The topic ARN for the Amazon SNS topic that you want to notify - // when Elastic Transcoder has finished processing a job in this pipeline. - // This is the ARN that Amazon SNS returned when you created the topic. - // - // * Warning: The topic ARN for the Amazon SNS topic that you want to notify - // when Elastic Transcoder encounters a warning condition while processing - // a job in this pipeline. This is the ARN that Amazon SNS returned when - // you created the topic. - // - // * Error: The topic ARN for the Amazon SNS topic that you want to notify - // when Elastic Transcoder encounters an error condition while processing - // a job in this pipeline. This is the ARN that Amazon SNS returned when - // you created the topic. - Notifications *Notifications `type:"structure"` - - // The Amazon S3 bucket in which you want Elastic Transcoder to save the transcoded - // files. (Use this, or use ContentConfig:Bucket plus ThumbnailConfig:Bucket.) - // - // Specify this value when all of the following are true: - // - // * You want to save transcoded files, thumbnails (if any), and playlists - // (if any) together in one bucket. - // - // * You do not want to specify the users or groups who have access to the - // transcoded files, thumbnails, and playlists. - // - // * You do not want to specify the permissions that Elastic Transcoder grants - // to the files. - // - // When Elastic Transcoder saves files in OutputBucket, it grants full control - // over the files only to the AWS account that owns the role that is specified - // by Role. - // - // * You want to associate the transcoded files and thumbnails with the Amazon - // S3 Standard storage class. - // - // If you want to save transcoded files and playlists in one bucket and thumbnails - // in another bucket, specify which users can access the transcoded files or - // the permissions the users have, or change the Amazon S3 storage class, omit - // OutputBucket and specify values for ContentConfig and ThumbnailConfig instead. - OutputBucket *string `type:"string"` - - // The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder - // to use to create the pipeline. - // - // Role is a required field - Role *string `type:"string" required:"true"` - - // The ThumbnailConfig object specifies several values, including the Amazon - // S3 bucket in which you want Elastic Transcoder to save thumbnail files, which - // users you want to have access to the files, the type of access you want users - // to have, and the storage class that you want to assign to the files. - // - // If you specify values for ContentConfig, you must also specify values for - // ThumbnailConfig even if you don't want to create thumbnails. - // - // If you specify values for ContentConfig and ThumbnailConfig, omit the OutputBucket - // object. - // - // * Bucket: The Amazon S3 bucket in which you want Elastic Transcoder to - // save thumbnail files. - // - // * Permissions (Optional): The Permissions object specifies which users - // and/or predefined Amazon S3 groups you want to have access to thumbnail - // files, and the type of access you want them to have. You can grant permissions - // to a maximum of 30 users and/or predefined Amazon S3 groups. - // - // * GranteeType: Specify the type of value that appears in the Grantee object: - // - // - // Canonical: The value in the Grantee object is either the canonical user ID - // for an AWS account or an origin access identity for an Amazon CloudFront - // distribution. - // - // A canonical user ID is not the same as an AWS account number. - // - // Email: The value in the Grantee object is the registered email address of - // an AWS account. - // - // Group: The value in the Grantee object is one of the following predefined - // Amazon S3 groups: AllUsers, AuthenticatedUsers, or LogDelivery. - // - // * Grantee: The AWS user or group that you want to have access to thumbnail - // files. To identify the user or group, you can specify the canonical user - // ID for an AWS account, an origin access identity for a CloudFront distribution, - // the registered email address of an AWS account, or a predefined Amazon - // S3 group. - // - // * Access: The permission that you want to give to the AWS user that you - // specified in Grantee. Permissions are granted on the thumbnail files that - // Elastic Transcoder adds to the bucket. Valid values include: - // - // READ: The grantee can read the thumbnails and metadata for objects that Elastic - // Transcoder adds to the Amazon S3 bucket. - // - // READ_ACP: The grantee can read the object ACL for thumbnails that Elastic - // Transcoder adds to the Amazon S3 bucket. - // - // WRITE_ACP: The grantee can write the ACL for the thumbnails that Elastic - // Transcoder adds to the Amazon S3 bucket. - // - // FULL_CONTROL: The grantee has READ, READ_ACP, and WRITE_ACP permissions for - // the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket. - // - // * StorageClass: The Amazon S3 storage class, Standard or ReducedRedundancy, - // that you want Elastic Transcoder to assign to the thumbnails that it stores - // in your Amazon S3 bucket. - ThumbnailConfig *PipelineOutputConfig `type:"structure"` -} - -// String returns the string representation -func (s CreatePipelineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePipelineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePipelineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePipelineInput"} - if s.InputBucket == nil { - invalidParams.Add(request.NewErrParamRequired("InputBucket")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Role == nil { - invalidParams.Add(request.NewErrParamRequired("Role")) - } - if s.ContentConfig != nil { - if err := s.ContentConfig.Validate(); err != nil { - invalidParams.AddNested("ContentConfig", err.(request.ErrInvalidParams)) - } - } - if s.ThumbnailConfig != nil { - if err := s.ThumbnailConfig.Validate(); err != nil { - invalidParams.AddNested("ThumbnailConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAwsKmsKeyArn sets the AwsKmsKeyArn field's value. -func (s *CreatePipelineInput) SetAwsKmsKeyArn(v string) *CreatePipelineInput { - s.AwsKmsKeyArn = &v - return s -} - -// SetContentConfig sets the ContentConfig field's value. -func (s *CreatePipelineInput) SetContentConfig(v *PipelineOutputConfig) *CreatePipelineInput { - s.ContentConfig = v - return s -} - -// SetInputBucket sets the InputBucket field's value. -func (s *CreatePipelineInput) SetInputBucket(v string) *CreatePipelineInput { - s.InputBucket = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreatePipelineInput) SetName(v string) *CreatePipelineInput { - s.Name = &v - return s -} - -// SetNotifications sets the Notifications field's value. -func (s *CreatePipelineInput) SetNotifications(v *Notifications) *CreatePipelineInput { - s.Notifications = v - return s -} - -// SetOutputBucket sets the OutputBucket field's value. -func (s *CreatePipelineInput) SetOutputBucket(v string) *CreatePipelineInput { - s.OutputBucket = &v - return s -} - -// SetRole sets the Role field's value. -func (s *CreatePipelineInput) SetRole(v string) *CreatePipelineInput { - s.Role = &v - return s -} - -// SetThumbnailConfig sets the ThumbnailConfig field's value. -func (s *CreatePipelineInput) SetThumbnailConfig(v *PipelineOutputConfig) *CreatePipelineInput { - s.ThumbnailConfig = v - return s -} - -// When you create a pipeline, Elastic Transcoder returns the values that you -// specified in the request. -type CreatePipelineOutput struct { - _ struct{} `type:"structure"` - - // A section of the response body that provides information about the pipeline - // that is created. - Pipeline *Pipeline `type:"structure"` - - // Elastic Transcoder returns a warning if the resources used by your pipeline - // are not in the same region as the pipeline. - // - // Using resources in the same region, such as your Amazon S3 buckets, Amazon - // SNS notification topics, and AWS KMS key, reduces processing time and prevents - // cross-regional charges. - Warnings []*Warning `type:"list"` -} - -// String returns the string representation -func (s CreatePipelineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePipelineOutput) GoString() string { - return s.String() -} - -// SetPipeline sets the Pipeline field's value. -func (s *CreatePipelineOutput) SetPipeline(v *Pipeline) *CreatePipelineOutput { - s.Pipeline = v - return s -} - -// SetWarnings sets the Warnings field's value. -func (s *CreatePipelineOutput) SetWarnings(v []*Warning) *CreatePipelineOutput { - s.Warnings = v - return s -} - -// The CreatePresetRequest structure. -type CreatePresetInput struct { - _ struct{} `type:"structure"` - - // A section of the request body that specifies the audio parameters. - Audio *AudioParameters `type:"structure"` - - // The container type for the output file. Valid values include flac, flv, fmp4, - // gif, mp3, mp4, mpg, mxf, oga, ogg, ts, and webm. - // - // Container is a required field - Container *string `type:"string" required:"true"` - - // A description of the preset. - Description *string `type:"string"` - - // The name of the preset. We recommend that the name be unique within the AWS - // account, but uniqueness is not enforced. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // A section of the request body that specifies the thumbnail parameters, if - // any. - Thumbnails *Thumbnails `type:"structure"` - - // A section of the request body that specifies the video parameters. - Video *VideoParameters `type:"structure"` -} - -// String returns the string representation -func (s CreatePresetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePresetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePresetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePresetInput"} - if s.Container == nil { - invalidParams.Add(request.NewErrParamRequired("Container")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Video != nil { - if err := s.Video.Validate(); err != nil { - invalidParams.AddNested("Video", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudio sets the Audio field's value. -func (s *CreatePresetInput) SetAudio(v *AudioParameters) *CreatePresetInput { - s.Audio = v - return s -} - -// SetContainer sets the Container field's value. -func (s *CreatePresetInput) SetContainer(v string) *CreatePresetInput { - s.Container = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreatePresetInput) SetDescription(v string) *CreatePresetInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreatePresetInput) SetName(v string) *CreatePresetInput { - s.Name = &v - return s -} - -// SetThumbnails sets the Thumbnails field's value. -func (s *CreatePresetInput) SetThumbnails(v *Thumbnails) *CreatePresetInput { - s.Thumbnails = v - return s -} - -// SetVideo sets the Video field's value. -func (s *CreatePresetInput) SetVideo(v *VideoParameters) *CreatePresetInput { - s.Video = v - return s -} - -// The CreatePresetResponse structure. -type CreatePresetOutput struct { - _ struct{} `type:"structure"` - - // A section of the response body that provides information about the preset - // that is created. - Preset *Preset `type:"structure"` - - // If the preset settings don't comply with the standards for the video codec - // but Elastic Transcoder created the preset, this message explains the reason - // the preset settings don't meet the standard. Elastic Transcoder created the - // preset because the settings might produce acceptable output. - Warning *string `type:"string"` -} - -// String returns the string representation -func (s CreatePresetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePresetOutput) GoString() string { - return s.String() -} - -// SetPreset sets the Preset field's value. -func (s *CreatePresetOutput) SetPreset(v *Preset) *CreatePresetOutput { - s.Preset = v - return s -} - -// SetWarning sets the Warning field's value. -func (s *CreatePresetOutput) SetWarning(v string) *CreatePresetOutput { - s.Warning = &v - return s -} - -// The DeletePipelineRequest structure. -type DeletePipelineInput struct { - _ struct{} `type:"structure"` - - // The identifier of the pipeline that you want to delete. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePipelineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePipelineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePipelineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePipelineInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeletePipelineInput) SetId(v string) *DeletePipelineInput { - s.Id = &v - return s -} - -// The DeletePipelineResponse structure. -type DeletePipelineOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePipelineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePipelineOutput) GoString() string { - return s.String() -} - -// The DeletePresetRequest structure. -type DeletePresetInput struct { - _ struct{} `type:"structure"` - - // The identifier of the preset for which you want to get detailed information. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePresetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePresetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePresetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePresetInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeletePresetInput) SetId(v string) *DeletePresetInput { - s.Id = &v - return s -} - -// The DeletePresetResponse structure. -type DeletePresetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePresetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePresetOutput) GoString() string { - return s.String() -} - -// The detected properties of the input file. Elastic Transcoder identifies -// these values from the input file. -type DetectedProperties struct { - _ struct{} `type:"structure"` - - // The detected duration of the input file, in milliseconds. - DurationMillis *int64 `type:"long"` - - // The detected file size of the input file, in bytes. - FileSize *int64 `type:"long"` - - // The detected frame rate of the input file, in frames per second. - FrameRate *string `type:"string"` - - // The detected height of the input file, in pixels. - Height *int64 `type:"integer"` - - // The detected width of the input file, in pixels. - Width *int64 `type:"integer"` -} - -// String returns the string representation -func (s DetectedProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetectedProperties) GoString() string { - return s.String() -} - -// SetDurationMillis sets the DurationMillis field's value. -func (s *DetectedProperties) SetDurationMillis(v int64) *DetectedProperties { - s.DurationMillis = &v - return s -} - -// SetFileSize sets the FileSize field's value. -func (s *DetectedProperties) SetFileSize(v int64) *DetectedProperties { - s.FileSize = &v - return s -} - -// SetFrameRate sets the FrameRate field's value. -func (s *DetectedProperties) SetFrameRate(v string) *DetectedProperties { - s.FrameRate = &v - return s -} - -// SetHeight sets the Height field's value. -func (s *DetectedProperties) SetHeight(v int64) *DetectedProperties { - s.Height = &v - return s -} - -// SetWidth sets the Width field's value. -func (s *DetectedProperties) SetWidth(v int64) *DetectedProperties { - s.Width = &v - return s -} - -// The encryption settings, if any, that are used for decrypting your input -// files or encrypting your output files. If your input file is encrypted, you -// must specify the mode that Elastic Transcoder uses to decrypt your file, -// otherwise you must specify the mode you want Elastic Transcoder to use to -// encrypt your output files. -type Encryption struct { - _ struct{} `type:"structure"` - - // The series of random bits created by a random bit generator, unique for every - // encryption operation, that you used to encrypt your input files or that you - // want Elastic Transcoder to use to encrypt your output files. The initialization - // vector must be base64-encoded, and it must be exactly 16 bytes long before - // being base64-encoded. - InitializationVector *string `type:"string"` - - // The data encryption key that you want Elastic Transcoder to use to encrypt - // your output file, or that was used to encrypt your input file. The key must - // be base64-encoded and it must be one of the following bit lengths before - // being base64-encoded: - // - // 128, 192, or 256. - // - // The key must also be encrypted by using the Amazon Key Management Service. - Key *string `type:"string"` - - // The MD5 digest of the key that you used to encrypt your input file, or that - // you want Elastic Transcoder to use to encrypt your output file. Elastic Transcoder - // uses the key digest as a checksum to make sure your key was not corrupted - // in transit. The key MD5 must be base64-encoded, and it must be exactly 16 - // bytes long before being base64-encoded. - KeyMd5 *string `type:"string"` - - // The specific server-side encryption mode that you want Elastic Transcoder - // to use when decrypting your input files or encrypting your output files. - // Elastic Transcoder supports the following options: - // - // * s3: Amazon S3 creates and manages the keys used for encrypting your - // files. - // - // * s3-aws-kms: Amazon S3 calls the Amazon Key Management Service, which - // creates and manages the keys that are used for encrypting your files. - // If you specify s3-aws-kms and you don't want to use the default key, you - // must add the AWS-KMS key that you want to use to your pipeline. - // - // * aes-cbc-pkcs7: A padded cipher-block mode of operation originally used - // for HLS files. - // - // * aes-ctr: AES Counter Mode. - // - // * aes-gcm: AES Galois Counter Mode, a mode of operation that is an authenticated - // encryption format, meaning that a file, key, or initialization vector - // that has been tampered with fails the decryption process. - // - // For all three AES options, you must provide the following settings, which - // must be base64-encoded: - // - // * Key - // - // * Key MD5 - // - // * Initialization Vector - // - // For the AES modes, your private encryption keys and your unencrypted data - // are never stored by AWS; therefore, it is important that you safely manage - // your encryption keys. If you lose them, you won't be able to unencrypt your - // data. - Mode *string `type:"string"` -} - -// String returns the string representation -func (s Encryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Encryption) GoString() string { - return s.String() -} - -// SetInitializationVector sets the InitializationVector field's value. -func (s *Encryption) SetInitializationVector(v string) *Encryption { - s.InitializationVector = &v - return s -} - -// SetKey sets the Key field's value. -func (s *Encryption) SetKey(v string) *Encryption { - s.Key = &v - return s -} - -// SetKeyMd5 sets the KeyMd5 field's value. -func (s *Encryption) SetKeyMd5(v string) *Encryption { - s.KeyMd5 = &v - return s -} - -// SetMode sets the Mode field's value. -func (s *Encryption) SetMode(v string) *Encryption { - s.Mode = &v - return s -} - -// The HLS content protection settings, if any, that you want Elastic Transcoder -// to apply to your output files. -type HlsContentProtection struct { - _ struct{} `type:"structure"` - - // If Elastic Transcoder is generating your key for you, you must leave this - // field blank. - // - // The series of random bits created by a random bit generator, unique for every - // encryption operation, that you want Elastic Transcoder to use to encrypt - // your output files. The initialization vector must be base64-encoded, and - // it must be exactly 16 bytes before being base64-encoded. - InitializationVector *string `type:"string"` - - // If you want Elastic Transcoder to generate a key for you, leave this field - // blank. - // - // If you choose to supply your own key, you must encrypt the key by using AWS - // KMS. The key must be base64-encoded, and it must be one of the following - // bit lengths before being base64-encoded: - // - // 128, 192, or 256. - Key *string `type:"string"` - - // If Elastic Transcoder is generating your key for you, you must leave this - // field blank. - // - // The MD5 digest of the key that you want Elastic Transcoder to use to encrypt - // your output file, and that you want Elastic Transcoder to use as a checksum - // to make sure your key was not corrupted in transit. The key MD5 must be base64-encoded, - // and it must be exactly 16 bytes before being base64- encoded. - KeyMd5 *string `type:"string"` - - // Specify whether you want Elastic Transcoder to write your HLS license key - // to an Amazon S3 bucket. If you choose WithVariantPlaylists, LicenseAcquisitionUrl - // must be left blank and Elastic Transcoder writes your data key into the same - // bucket as the associated playlist. - KeyStoragePolicy *string `type:"string"` - - // The location of the license key required to decrypt your HLS playlist. The - // URL must be an absolute path, and is referenced in the URI attribute of the - // EXT-X-KEY metadata tag in the playlist file. - LicenseAcquisitionUrl *string `type:"string"` - - // The content protection method for your output. The only valid value is: aes-128. - // - // This value is written into the method attribute of the EXT-X-KEY metadata - // tag in the output playlist. - Method *string `type:"string"` -} - -// String returns the string representation -func (s HlsContentProtection) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsContentProtection) GoString() string { - return s.String() -} - -// SetInitializationVector sets the InitializationVector field's value. -func (s *HlsContentProtection) SetInitializationVector(v string) *HlsContentProtection { - s.InitializationVector = &v - return s -} - -// SetKey sets the Key field's value. -func (s *HlsContentProtection) SetKey(v string) *HlsContentProtection { - s.Key = &v - return s -} - -// SetKeyMd5 sets the KeyMd5 field's value. -func (s *HlsContentProtection) SetKeyMd5(v string) *HlsContentProtection { - s.KeyMd5 = &v - return s -} - -// SetKeyStoragePolicy sets the KeyStoragePolicy field's value. -func (s *HlsContentProtection) SetKeyStoragePolicy(v string) *HlsContentProtection { - s.KeyStoragePolicy = &v - return s -} - -// SetLicenseAcquisitionUrl sets the LicenseAcquisitionUrl field's value. -func (s *HlsContentProtection) SetLicenseAcquisitionUrl(v string) *HlsContentProtection { - s.LicenseAcquisitionUrl = &v - return s -} - -// SetMethod sets the Method field's value. -func (s *HlsContentProtection) SetMethod(v string) *HlsContentProtection { - s.Method = &v - return s -} - -// The captions to be created, if any. -type InputCaptions struct { - _ struct{} `type:"structure"` - - // Source files for the input sidecar captions used during the transcoding process. - // To omit all sidecar captions, leave CaptionSources blank. - CaptionSources []*CaptionSource `type:"list"` - - // A policy that determines how Elastic Transcoder handles the existence of - // multiple captions. - // - // * MergeOverride: Elastic Transcoder transcodes both embedded and sidecar - // captions into outputs. If captions for a language are embedded in the - // input file and also appear in a sidecar file, Elastic Transcoder uses - // the sidecar captions and ignores the embedded captions for that language. - // - // * MergeRetain: Elastic Transcoder transcodes both embedded and sidecar - // captions into outputs. If captions for a language are embedded in the - // input file and also appear in a sidecar file, Elastic Transcoder uses - // the embedded captions and ignores the sidecar captions for that language. - // If CaptionSources is empty, Elastic Transcoder omits all sidecar captions - // from the output files. - // - // * Override: Elastic Transcoder transcodes only the sidecar captions that - // you specify in CaptionSources. - // - // MergePolicy cannot be null. - MergePolicy *string `type:"string"` -} - -// String returns the string representation -func (s InputCaptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputCaptions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputCaptions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputCaptions"} - if s.CaptionSources != nil { - for i, v := range s.CaptionSources { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionSources", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCaptionSources sets the CaptionSources field's value. -func (s *InputCaptions) SetCaptionSources(v []*CaptionSource) *InputCaptions { - s.CaptionSources = v - return s -} - -// SetMergePolicy sets the MergePolicy field's value. -func (s *InputCaptions) SetMergePolicy(v string) *InputCaptions { - s.MergePolicy = &v - return s -} - -// A section of the response body that provides information about the job that -// is created. -type Job struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the job. - Arn *string `type:"string"` - - // The identifier that Elastic Transcoder assigned to the job. You use this - // value to get settings for the job or to delete the job. - Id *string `type:"string"` - - // A section of the request or response body that provides information about - // the file that is being transcoded. - Input *JobInput `type:"structure"` - - // Information about the files that you're transcoding. If you specified multiple - // files for this job, Elastic Transcoder stitches the files together to make - // one output. - Inputs []*JobInput `type:"list"` - - // If you specified one output for a job, information about that output. If - // you specified multiple outputs for a job, the Output object lists information - // about the first output. This duplicates the information that is listed for - // the first output in the Outputs object. - // - // Outputs recommended instead. - // - // A section of the request or response body that provides information about - // the transcoded (target) file. - Output *JobOutput `type:"structure"` - - // The value, if any, that you want Elastic Transcoder to prepend to the names - // of all files that this job creates, including output files, thumbnails, and - // playlists. We recommend that you add a / or some other delimiter to the end - // of the OutputKeyPrefix. - OutputKeyPrefix *string `min:"1" type:"string"` - - // Information about the output files. We recommend that you use the Outputs - // syntax for all jobs, even when you want Elastic Transcoder to transcode a - // file into only one format. Do not use both the Outputs and Output syntaxes - // in the same request. You can create a maximum of 30 outputs per job. - // - // If you specify more than one output for a job, Elastic Transcoder creates - // the files for each output in the order in which you specify them in the job. - Outputs []*JobOutput `type:"list"` - - // The Id of the pipeline that you want Elastic Transcoder to use for transcoding. - // The pipeline determines several settings, including the Amazon S3 bucket - // from which Elastic Transcoder gets the files to transcode and the bucket - // into which Elastic Transcoder puts the transcoded files. - PipelineId *string `type:"string"` - - // Outputs in Fragmented MP4 or MPEG-TS format only. - // - // If you specify a preset in PresetId for which the value of Container is fmp4 - // (Fragmented MP4) or ts (MPEG-TS), Playlists contains information about the - // master playlists that you want Elastic Transcoder to create. - // - // The maximum number of master playlists in a job is 30. - Playlists []*Playlist `type:"list"` - - // The status of the job: Submitted, Progressing, Complete, Canceled, or Error. - Status *string `type:"string"` - - // Details about the timing of a job. - Timing *Timing `type:"structure"` - - // User-defined metadata that you want to associate with an Elastic Transcoder - // job. You specify metadata in key/value pairs, and you can add up to 10 key/value - // pairs per job. Elastic Transcoder does not guarantee that key/value pairs - // are returned in the same order in which you specify them. - // - // Metadata keys and values must use characters from the following list: - // - // * 0-9 - // - // * A-Z and a-z - // - // * Space - // - // * The following symbols: _.:/=+-%@ - UserMetadata map[string]*string `type:"map"` -} - -// String returns the string representation -func (s Job) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Job) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Job) SetArn(v string) *Job { - s.Arn = &v - return s -} - -// SetId sets the Id field's value. -func (s *Job) SetId(v string) *Job { - s.Id = &v - return s -} - -// SetInput sets the Input field's value. -func (s *Job) SetInput(v *JobInput) *Job { - s.Input = v - return s -} - -// SetInputs sets the Inputs field's value. -func (s *Job) SetInputs(v []*JobInput) *Job { - s.Inputs = v - return s -} - -// SetOutput sets the Output field's value. -func (s *Job) SetOutput(v *JobOutput) *Job { - s.Output = v - return s -} - -// SetOutputKeyPrefix sets the OutputKeyPrefix field's value. -func (s *Job) SetOutputKeyPrefix(v string) *Job { - s.OutputKeyPrefix = &v - return s -} - -// SetOutputs sets the Outputs field's value. -func (s *Job) SetOutputs(v []*JobOutput) *Job { - s.Outputs = v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *Job) SetPipelineId(v string) *Job { - s.PipelineId = &v - return s -} - -// SetPlaylists sets the Playlists field's value. -func (s *Job) SetPlaylists(v []*Playlist) *Job { - s.Playlists = v - return s -} - -// SetStatus sets the Status field's value. -func (s *Job) SetStatus(v string) *Job { - s.Status = &v - return s -} - -// SetTiming sets the Timing field's value. -func (s *Job) SetTiming(v *Timing) *Job { - s.Timing = v - return s -} - -// SetUserMetadata sets the UserMetadata field's value. -func (s *Job) SetUserMetadata(v map[string]*string) *Job { - s.UserMetadata = v - return s -} - -// The .jpg or .png file associated with an audio file. -type JobAlbumArt struct { - _ struct{} `type:"structure"` - - // The file to be used as album art. There can be multiple artworks associated - // with an audio file, to a maximum of 20. Valid formats are .jpg and .png - Artwork []*Artwork `type:"list"` - - // A policy that determines how Elastic Transcoder handles the existence of - // multiple album artwork files. - // - // * Replace: The specified album art replaces any existing album art. - // - // * Prepend: The specified album art is placed in front of any existing - // album art. - // - // * Append: The specified album art is placed after any existing album art. - // - // * Fallback: If the original input file contains artwork, Elastic Transcoder - // uses that artwork for the output. If the original input does not contain - // artwork, Elastic Transcoder uses the specified album art file. - MergePolicy *string `type:"string"` -} - -// String returns the string representation -func (s JobAlbumArt) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobAlbumArt) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *JobAlbumArt) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "JobAlbumArt"} - if s.Artwork != nil { - for i, v := range s.Artwork { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Artwork", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArtwork sets the Artwork field's value. -func (s *JobAlbumArt) SetArtwork(v []*Artwork) *JobAlbumArt { - s.Artwork = v - return s -} - -// SetMergePolicy sets the MergePolicy field's value. -func (s *JobAlbumArt) SetMergePolicy(v string) *JobAlbumArt { - s.MergePolicy = &v - return s -} - -// Information about the file that you're transcoding. -type JobInput struct { - _ struct{} `type:"structure"` - - // The aspect ratio of the input file. If you want Elastic Transcoder to automatically - // detect the aspect ratio of the input file, specify auto. If you want to specify - // the aspect ratio for the output file, enter one of the following values: - // - // 1:1, 4:3, 3:2, 16:9 - // - // If you specify a value other than auto, Elastic Transcoder disables automatic - // detection of the aspect ratio. - AspectRatio *string `type:"string"` - - // The container type for the input file. If you want Elastic Transcoder to - // automatically detect the container type of the input file, specify auto. - // If you want to specify the container type for the input file, enter one of - // the following values: - // - // 3gp, aac, asf, avi, divx, flv, m4a, mkv, mov, mp3, mp4, mpeg, mpeg-ps, mpeg-ts, - // mxf, ogg, vob, wav, webm - Container *string `type:"string"` - - // The detected properties of the input file. - DetectedProperties *DetectedProperties `type:"structure"` - - // The encryption settings, if any, that are used for decrypting your input - // files. If your input file is encrypted, you must specify the mode that Elastic - // Transcoder uses to decrypt your file. - Encryption *Encryption `type:"structure"` - - // The frame rate of the input file. If you want Elastic Transcoder to automatically - // detect the frame rate of the input file, specify auto. If you want to specify - // the frame rate for the input file, enter one of the following values: - // - // 10, 15, 23.97, 24, 25, 29.97, 30, 60 - // - // If you specify a value other than auto, Elastic Transcoder disables automatic - // detection of the frame rate. - FrameRate *string `type:"string"` - - // You can configure Elastic Transcoder to transcode captions, or subtitles, - // from one format to another. All captions must be in UTF-8. Elastic Transcoder - // supports two types of captions: - // - // * Embedded: Embedded captions are included in the same file as the audio - // and video. Elastic Transcoder supports only one embedded caption per language, - // to a maximum of 300 embedded captions per file. - // - // Valid input values include: CEA-608 (EIA-608, first non-empty channel only), - // CEA-708 (EIA-708, first non-empty channel only), and mov-text - // - // Valid outputs include: mov-text - // - // Elastic Transcoder supports a maximum of one embedded format per output. - // - // * Sidecar: Sidecar captions are kept in a separate metadata file from - // the audio and video data. Sidecar captions require a player that is capable - // of understanding the relationship between the video file and the sidecar - // file. Elastic Transcoder supports only one sidecar caption per language, - // to a maximum of 20 sidecar captions per file. - // - // Valid input values include: dfxp (first div element only), ebu-tt, scc, smpt, - // srt, ttml (first div element only), and webvtt - // - // Valid outputs include: dfxp (first div element only), scc, srt, and webvtt. - // - // If you want ttml or smpte-tt compatible captions, specify dfxp as your output - // format. - // - // Elastic Transcoder does not support OCR (Optical Character Recognition), - // does not accept pictures as a valid input for captions, and is not available - // for audio-only transcoding. Elastic Transcoder does not preserve text formatting - // (for example, italics) during the transcoding process. - // - // To remove captions or leave the captions empty, set Captions to null. To - // pass through existing captions unchanged, set the MergePolicy to MergeRetain, - // and pass in a null CaptionSources array. - // - // For more information on embedded files, see the Subtitles Wikipedia page. - // - // For more information on sidecar files, see the Extensible Metadata Platform - // and Sidecar file Wikipedia pages. - InputCaptions *InputCaptions `type:"structure"` - - // Whether the input file is interlaced. If you want Elastic Transcoder to automatically - // detect whether the input file is interlaced, specify auto. If you want to - // specify whether the input file is interlaced, enter one of the following - // values: - // - // true, false - // - // If you specify a value other than auto, Elastic Transcoder disables automatic - // detection of interlacing. - Interlaced *string `type:"string"` - - // The name of the file to transcode. Elsewhere in the body of the JSON block - // is the the ID of the pipeline to use for processing the job. The InputBucket - // object in that pipeline tells Elastic Transcoder which Amazon S3 bucket to - // get the file from. - // - // If the file name includes a prefix, such as cooking/lasagna.mpg, include - // the prefix in the key. If the file isn't in the specified bucket, Elastic - // Transcoder returns an error. - Key *string `min:"1" type:"string"` - - // This value must be auto, which causes Elastic Transcoder to automatically - // detect the resolution of the input file. - Resolution *string `type:"string"` - - // Settings for clipping an input. Each input can have different clip settings. - TimeSpan *TimeSpan `type:"structure"` -} - -// String returns the string representation -func (s JobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *JobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "JobInput"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.InputCaptions != nil { - if err := s.InputCaptions.Validate(); err != nil { - invalidParams.AddNested("InputCaptions", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAspectRatio sets the AspectRatio field's value. -func (s *JobInput) SetAspectRatio(v string) *JobInput { - s.AspectRatio = &v - return s -} - -// SetContainer sets the Container field's value. -func (s *JobInput) SetContainer(v string) *JobInput { - s.Container = &v - return s -} - -// SetDetectedProperties sets the DetectedProperties field's value. -func (s *JobInput) SetDetectedProperties(v *DetectedProperties) *JobInput { - s.DetectedProperties = v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *JobInput) SetEncryption(v *Encryption) *JobInput { - s.Encryption = v - return s -} - -// SetFrameRate sets the FrameRate field's value. -func (s *JobInput) SetFrameRate(v string) *JobInput { - s.FrameRate = &v - return s -} - -// SetInputCaptions sets the InputCaptions field's value. -func (s *JobInput) SetInputCaptions(v *InputCaptions) *JobInput { - s.InputCaptions = v - return s -} - -// SetInterlaced sets the Interlaced field's value. -func (s *JobInput) SetInterlaced(v string) *JobInput { - s.Interlaced = &v - return s -} - -// SetKey sets the Key field's value. -func (s *JobInput) SetKey(v string) *JobInput { - s.Key = &v - return s -} - -// SetResolution sets the Resolution field's value. -func (s *JobInput) SetResolution(v string) *JobInput { - s.Resolution = &v - return s -} - -// SetTimeSpan sets the TimeSpan field's value. -func (s *JobInput) SetTimeSpan(v *TimeSpan) *JobInput { - s.TimeSpan = v - return s -} - -// Outputs recommended instead. -// -// If you specified one output for a job, information about that output. If -// you specified multiple outputs for a job, the Output object lists information -// about the first output. This duplicates the information that is listed for -// the first output in the Outputs object. -type JobOutput struct { - _ struct{} `type:"structure"` - - // The album art to be associated with the output file, if any. - AlbumArt *JobAlbumArt `type:"structure"` - - // If Elastic Transcoder used a preset with a ColorSpaceConversionMode to transcode - // the output file, the AppliedColorSpaceConversion parameter shows the conversion - // used. If no ColorSpaceConversionMode was defined in the preset, this parameter - // is not be included in the job response. - AppliedColorSpaceConversion *string `type:"string"` - - // You can configure Elastic Transcoder to transcode captions, or subtitles, - // from one format to another. All captions must be in UTF-8. Elastic Transcoder - // supports two types of captions: - // - // * Embedded: Embedded captions are included in the same file as the audio - // and video. Elastic Transcoder supports only one embedded caption per language, - // to a maximum of 300 embedded captions per file. - // - // Valid input values include: CEA-608 (EIA-608, first non-empty channel only), - // CEA-708 (EIA-708, first non-empty channel only), and mov-text - // - // Valid outputs include: mov-text - // - // Elastic Transcoder supports a maximum of one embedded format per output. - // - // * Sidecar: Sidecar captions are kept in a separate metadata file from - // the audio and video data. Sidecar captions require a player that is capable - // of understanding the relationship between the video file and the sidecar - // file. Elastic Transcoder supports only one sidecar caption per language, - // to a maximum of 20 sidecar captions per file. - // - // Valid input values include: dfxp (first div element only), ebu-tt, scc, smpt, - // srt, ttml (first div element only), and webvtt - // - // Valid outputs include: dfxp (first div element only), scc, srt, and webvtt. - // - // If you want ttml or smpte-tt compatible captions, specify dfxp as your output - // format. - // - // Elastic Transcoder does not support OCR (Optical Character Recognition), - // does not accept pictures as a valid input for captions, and is not available - // for audio-only transcoding. Elastic Transcoder does not preserve text formatting - // (for example, italics) during the transcoding process. - // - // To remove captions or leave the captions empty, set Captions to null. To - // pass through existing captions unchanged, set the MergePolicy to MergeRetain, - // and pass in a null CaptionSources array. - // - // For more information on embedded files, see the Subtitles Wikipedia page. - // - // For more information on sidecar files, see the Extensible Metadata Platform - // and Sidecar file Wikipedia pages. - Captions *Captions `type:"structure"` - - // You can create an output file that contains an excerpt from the input file. - // This excerpt, called a clip, can come from the beginning, middle, or end - // of the file. The Composition object contains settings for the clips that - // make up an output file. For the current release, you can only specify settings - // for a single clip per output file. The Composition object cannot be null. - // - // Deprecated: Composition has been deprecated - Composition []*Clip `deprecated:"true" type:"list"` - - // Duration of the output file, in seconds. - Duration *int64 `type:"long"` - - // Duration of the output file, in milliseconds. - DurationMillis *int64 `type:"long"` - - // The encryption settings, if any, that you want Elastic Transcoder to apply - // to your output files. If you choose to use encryption, you must specify a - // mode to use. If you choose not to use encryption, Elastic Transcoder writes - // an unencrypted file to your Amazon S3 bucket. - Encryption *Encryption `type:"structure"` - - // File size of the output file, in bytes. - FileSize *int64 `type:"long"` - - // Frame rate of the output file, in frames per second. - FrameRate *string `type:"string"` - - // Height of the output file, in pixels. - Height *int64 `type:"integer"` - - // A sequential counter, starting with 1, that identifies an output among the - // outputs from the current job. In the Output syntax, this value is always - // 1. - Id *string `type:"string"` - - // The name to assign to the transcoded file. Elastic Transcoder saves the file - // in the Amazon S3 bucket specified by the OutputBucket object in the pipeline - // that is specified by the pipeline ID. - Key *string `min:"1" type:"string"` - - // The value of the Id object for the preset that you want to use for this job. - // The preset determines the audio, video, and thumbnail settings that Elastic - // Transcoder uses for transcoding. To use a preset that you created, specify - // the preset ID that Elastic Transcoder returned in the response when you created - // the preset. You can also use the Elastic Transcoder system presets, which - // you can get with ListPresets. - PresetId *string `type:"string"` - - // The number of degrees clockwise by which you want Elastic Transcoder to rotate - // the output relative to the input. Enter one of the following values: - // - // auto, 0, 90, 180, 270 - // - // The value auto generally works only if the file that you're transcoding contains - // rotation metadata. - Rotate *string `type:"string"` - - // (Outputs in Fragmented MP4 or MPEG-TS format only. - // - // If you specify a preset in PresetId for which the value of Container is fmp4 - // (Fragmented MP4) or ts (MPEG-TS), SegmentDuration is the target maximum duration - // of each segment in seconds. For HLSv3 format playlists, each media segment - // is stored in a separate .ts file. For HLSv4, MPEG-DASH, and Smooth playlists, - // all media segments for an output are stored in a single file. Each segment - // is approximately the length of the SegmentDuration, though individual segments - // might be shorter or longer. - // - // The range of valid values is 1 to 60 seconds. If the duration of the video - // is not evenly divisible by SegmentDuration, the duration of the last segment - // is the remainder of total length/SegmentDuration. - // - // Elastic Transcoder creates an output-specific playlist for each output HLS - // output that you specify in OutputKeys. To add an output to the master playlist - // for this job, include it in the OutputKeys of the associated playlist. - SegmentDuration *string `type:"string"` - - // The status of one output in a job. If you specified only one output for the - // job, Outputs:Status is always the same as Job:Status. If you specified more - // than one output: - // - // * Job:Status and Outputs:Status for all of the outputs is Submitted until - // Elastic Transcoder starts to process the first output. - // - // * When Elastic Transcoder starts to process the first output, Outputs:Status - // for that output and Job:Status both change to Progressing. For each output, - // the value of Outputs:Status remains Submitted until Elastic Transcoder - // starts to process the output. - // - // * Job:Status remains Progressing until all of the outputs reach a terminal - // status, either Complete or Error. - // - // * When all of the outputs reach a terminal status, Job:Status changes - // to Complete only if Outputs:Status for all of the outputs is Complete. - // If Outputs:Status for one or more outputs is Error, the terminal status - // for Job:Status is also Error. - // - // The value of Status is one of the following: Submitted, Progressing, Complete, - // Canceled, or Error. - Status *string `type:"string"` - - // Information that further explains Status. - StatusDetail *string `type:"string"` - - // The encryption settings, if any, that you want Elastic Transcoder to apply - // to your thumbnail. - ThumbnailEncryption *Encryption `type:"structure"` - - // Whether you want Elastic Transcoder to create thumbnails for your videos - // and, if so, how you want Elastic Transcoder to name the files. - // - // If you don't want Elastic Transcoder to create thumbnails, specify "". - // - // If you do want Elastic Transcoder to create thumbnails, specify the information - // that you want to include in the file name for each thumbnail. You can specify - // the following values in any sequence: - // - // * {count} (Required): If you want to create thumbnails, you must include - // {count} in the ThumbnailPattern object. Wherever you specify {count}, - // Elastic Transcoder adds a five-digit sequence number (beginning with 00001) - // to thumbnail file names. The number indicates where a given thumbnail - // appears in the sequence of thumbnails for a transcoded file. - // - // If you specify a literal value and/or {resolution} but you omit {count}, - // Elastic Transcoder returns a validation error and does not create the - // job. - // - // * Literal values (Optional): You can specify literal values anywhere in - // the ThumbnailPattern object. For example, you can include them as a file - // name prefix or as a delimiter between {resolution} and {count}. - // - // * {resolution} (Optional): If you want Elastic Transcoder to include the - // resolution in the file name, include {resolution} in the ThumbnailPattern - // object. - // - // When creating thumbnails, Elastic Transcoder automatically saves the files - // in the format (.jpg or .png) that appears in the preset that you specified - // in the PresetID value of CreateJobOutput. Elastic Transcoder also appends - // the applicable file name extension. - ThumbnailPattern *string `type:"string"` - - // Information about the watermarks that you want Elastic Transcoder to add - // to the video during transcoding. You can specify up to four watermarks for - // each output. Settings for each watermark must be defined in the preset that - // you specify in Preset for the current output. - // - // Watermarks are added to the output video in the sequence in which you list - // them in the job output—the first watermark in the list is added to the output - // video first, the second watermark in the list is added next, and so on. As - // a result, if the settings in a preset cause Elastic Transcoder to place all - // watermarks in the same location, the second watermark that you add covers - // the first one, the third one covers the second, and the fourth one covers - // the third. - Watermarks []*JobWatermark `type:"list"` - - // Specifies the width of the output file in pixels. - Width *int64 `type:"integer"` -} - -// String returns the string representation -func (s JobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobOutput) GoString() string { - return s.String() -} - -// SetAlbumArt sets the AlbumArt field's value. -func (s *JobOutput) SetAlbumArt(v *JobAlbumArt) *JobOutput { - s.AlbumArt = v - return s -} - -// SetAppliedColorSpaceConversion sets the AppliedColorSpaceConversion field's value. -func (s *JobOutput) SetAppliedColorSpaceConversion(v string) *JobOutput { - s.AppliedColorSpaceConversion = &v - return s -} - -// SetCaptions sets the Captions field's value. -func (s *JobOutput) SetCaptions(v *Captions) *JobOutput { - s.Captions = v - return s -} - -// SetComposition sets the Composition field's value. -func (s *JobOutput) SetComposition(v []*Clip) *JobOutput { - s.Composition = v - return s -} - -// SetDuration sets the Duration field's value. -func (s *JobOutput) SetDuration(v int64) *JobOutput { - s.Duration = &v - return s -} - -// SetDurationMillis sets the DurationMillis field's value. -func (s *JobOutput) SetDurationMillis(v int64) *JobOutput { - s.DurationMillis = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *JobOutput) SetEncryption(v *Encryption) *JobOutput { - s.Encryption = v - return s -} - -// SetFileSize sets the FileSize field's value. -func (s *JobOutput) SetFileSize(v int64) *JobOutput { - s.FileSize = &v - return s -} - -// SetFrameRate sets the FrameRate field's value. -func (s *JobOutput) SetFrameRate(v string) *JobOutput { - s.FrameRate = &v - return s -} - -// SetHeight sets the Height field's value. -func (s *JobOutput) SetHeight(v int64) *JobOutput { - s.Height = &v - return s -} - -// SetId sets the Id field's value. -func (s *JobOutput) SetId(v string) *JobOutput { - s.Id = &v - return s -} - -// SetKey sets the Key field's value. -func (s *JobOutput) SetKey(v string) *JobOutput { - s.Key = &v - return s -} - -// SetPresetId sets the PresetId field's value. -func (s *JobOutput) SetPresetId(v string) *JobOutput { - s.PresetId = &v - return s -} - -// SetRotate sets the Rotate field's value. -func (s *JobOutput) SetRotate(v string) *JobOutput { - s.Rotate = &v - return s -} - -// SetSegmentDuration sets the SegmentDuration field's value. -func (s *JobOutput) SetSegmentDuration(v string) *JobOutput { - s.SegmentDuration = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *JobOutput) SetStatus(v string) *JobOutput { - s.Status = &v - return s -} - -// SetStatusDetail sets the StatusDetail field's value. -func (s *JobOutput) SetStatusDetail(v string) *JobOutput { - s.StatusDetail = &v - return s -} - -// SetThumbnailEncryption sets the ThumbnailEncryption field's value. -func (s *JobOutput) SetThumbnailEncryption(v *Encryption) *JobOutput { - s.ThumbnailEncryption = v - return s -} - -// SetThumbnailPattern sets the ThumbnailPattern field's value. -func (s *JobOutput) SetThumbnailPattern(v string) *JobOutput { - s.ThumbnailPattern = &v - return s -} - -// SetWatermarks sets the Watermarks field's value. -func (s *JobOutput) SetWatermarks(v []*JobWatermark) *JobOutput { - s.Watermarks = v - return s -} - -// SetWidth sets the Width field's value. -func (s *JobOutput) SetWidth(v int64) *JobOutput { - s.Width = &v - return s -} - -// Watermarks can be in .png or .jpg format. If you want to display a watermark -// that is not rectangular, use the .png format, which supports transparency. -type JobWatermark struct { - _ struct{} `type:"structure"` - - // The encryption settings, if any, that you want Elastic Transcoder to apply - // to your watermarks. - Encryption *Encryption `type:"structure"` - - // The name of the .png or .jpg file that you want to use for the watermark. - // To determine which Amazon S3 bucket contains the specified file, Elastic - // Transcoder checks the pipeline specified by Pipeline; the Input Bucket object - // in that pipeline identifies the bucket. - // - // If the file name includes a prefix, for example, logos/128x64.png, include - // the prefix in the key. If the file isn't in the specified bucket, Elastic - // Transcoder returns an error. - InputKey *string `min:"1" type:"string"` - - // The ID of the watermark settings that Elastic Transcoder uses to add watermarks - // to the video during transcoding. The settings are in the preset specified - // by Preset for the current output. In that preset, the value of Watermarks - // Id tells Elastic Transcoder which settings to use. - PresetWatermarkId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s JobWatermark) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobWatermark) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *JobWatermark) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "JobWatermark"} - if s.InputKey != nil && len(*s.InputKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputKey", 1)) - } - if s.PresetWatermarkId != nil && len(*s.PresetWatermarkId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PresetWatermarkId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryption sets the Encryption field's value. -func (s *JobWatermark) SetEncryption(v *Encryption) *JobWatermark { - s.Encryption = v - return s -} - -// SetInputKey sets the InputKey field's value. -func (s *JobWatermark) SetInputKey(v string) *JobWatermark { - s.InputKey = &v - return s -} - -// SetPresetWatermarkId sets the PresetWatermarkId field's value. -func (s *JobWatermark) SetPresetWatermarkId(v string) *JobWatermark { - s.PresetWatermarkId = &v - return s -} - -// The ListJobsByPipelineRequest structure. -type ListJobsByPipelineInput struct { - _ struct{} `type:"structure"` - - // To list jobs in chronological order by the date and time that they were submitted, - // enter true. To list jobs in reverse chronological order, enter false. - Ascending *string `location:"querystring" locationName:"Ascending" type:"string"` - - // When Elastic Transcoder returns more than one page of results, use pageToken - // in subsequent GET requests to get each successive page of results. - PageToken *string `location:"querystring" locationName:"PageToken" type:"string"` - - // The ID of the pipeline for which you want to get job information. - // - // PipelineId is a required field - PipelineId *string `location:"uri" locationName:"PipelineId" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListJobsByPipelineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobsByPipelineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListJobsByPipelineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListJobsByPipelineInput"} - if s.PipelineId == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineId")) - } - if s.PipelineId != nil && len(*s.PipelineId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAscending sets the Ascending field's value. -func (s *ListJobsByPipelineInput) SetAscending(v string) *ListJobsByPipelineInput { - s.Ascending = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListJobsByPipelineInput) SetPageToken(v string) *ListJobsByPipelineInput { - s.PageToken = &v - return s -} - -// SetPipelineId sets the PipelineId field's value. -func (s *ListJobsByPipelineInput) SetPipelineId(v string) *ListJobsByPipelineInput { - s.PipelineId = &v - return s -} - -// The ListJobsByPipelineResponse structure. -type ListJobsByPipelineOutput struct { - _ struct{} `type:"structure"` - - // An array of Job objects that are in the specified pipeline. - Jobs []*Job `type:"list"` - - // A value that you use to access the second and subsequent pages of results, - // if any. When the jobs in the specified pipeline fit on one page or when you've - // reached the last page of results, the value of NextPageToken is null. - NextPageToken *string `type:"string"` -} - -// String returns the string representation -func (s ListJobsByPipelineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobsByPipelineOutput) GoString() string { - return s.String() -} - -// SetJobs sets the Jobs field's value. -func (s *ListJobsByPipelineOutput) SetJobs(v []*Job) *ListJobsByPipelineOutput { - s.Jobs = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListJobsByPipelineOutput) SetNextPageToken(v string) *ListJobsByPipelineOutput { - s.NextPageToken = &v - return s -} - -// The ListJobsByStatusRequest structure. -type ListJobsByStatusInput struct { - _ struct{} `type:"structure"` - - // To list jobs in chronological order by the date and time that they were submitted, - // enter true. To list jobs in reverse chronological order, enter false. - Ascending *string `location:"querystring" locationName:"Ascending" type:"string"` - - // When Elastic Transcoder returns more than one page of results, use pageToken - // in subsequent GET requests to get each successive page of results. - PageToken *string `location:"querystring" locationName:"PageToken" type:"string"` - - // To get information about all of the jobs associated with the current AWS - // account that have a given status, specify the following status: Submitted, - // Progressing, Complete, Canceled, or Error. - // - // Status is a required field - Status *string `location:"uri" locationName:"Status" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListJobsByStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobsByStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListJobsByStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListJobsByStatusInput"} - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.Status != nil && len(*s.Status) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Status", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAscending sets the Ascending field's value. -func (s *ListJobsByStatusInput) SetAscending(v string) *ListJobsByStatusInput { - s.Ascending = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListJobsByStatusInput) SetPageToken(v string) *ListJobsByStatusInput { - s.PageToken = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ListJobsByStatusInput) SetStatus(v string) *ListJobsByStatusInput { - s.Status = &v - return s -} - -// The ListJobsByStatusResponse structure. -type ListJobsByStatusOutput struct { - _ struct{} `type:"structure"` - - // An array of Job objects that have the specified status. - Jobs []*Job `type:"list"` - - // A value that you use to access the second and subsequent pages of results, - // if any. When the jobs in the specified pipeline fit on one page or when you've - // reached the last page of results, the value of NextPageToken is null. - NextPageToken *string `type:"string"` -} - -// String returns the string representation -func (s ListJobsByStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobsByStatusOutput) GoString() string { - return s.String() -} - -// SetJobs sets the Jobs field's value. -func (s *ListJobsByStatusOutput) SetJobs(v []*Job) *ListJobsByStatusOutput { - s.Jobs = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListJobsByStatusOutput) SetNextPageToken(v string) *ListJobsByStatusOutput { - s.NextPageToken = &v - return s -} - -// The ListPipelineRequest structure. -type ListPipelinesInput struct { - _ struct{} `type:"structure"` - - // To list pipelines in chronological order by the date and time that they were - // created, enter true. To list pipelines in reverse chronological order, enter - // false. - Ascending *string `location:"querystring" locationName:"Ascending" type:"string"` - - // When Elastic Transcoder returns more than one page of results, use pageToken - // in subsequent GET requests to get each successive page of results. - PageToken *string `location:"querystring" locationName:"PageToken" type:"string"` -} - -// String returns the string representation -func (s ListPipelinesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPipelinesInput) GoString() string { - return s.String() -} - -// SetAscending sets the Ascending field's value. -func (s *ListPipelinesInput) SetAscending(v string) *ListPipelinesInput { - s.Ascending = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListPipelinesInput) SetPageToken(v string) *ListPipelinesInput { - s.PageToken = &v - return s -} - -// A list of the pipelines associated with the current AWS account. -type ListPipelinesOutput struct { - _ struct{} `type:"structure"` - - // A value that you use to access the second and subsequent pages of results, - // if any. When the pipelines fit on one page or when you've reached the last - // page of results, the value of NextPageToken is null. - NextPageToken *string `type:"string"` - - // An array of Pipeline objects. - Pipelines []*Pipeline `type:"list"` -} - -// String returns the string representation -func (s ListPipelinesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPipelinesOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListPipelinesOutput) SetNextPageToken(v string) *ListPipelinesOutput { - s.NextPageToken = &v - return s -} - -// SetPipelines sets the Pipelines field's value. -func (s *ListPipelinesOutput) SetPipelines(v []*Pipeline) *ListPipelinesOutput { - s.Pipelines = v - return s -} - -// The ListPresetsRequest structure. -type ListPresetsInput struct { - _ struct{} `type:"structure"` - - // To list presets in chronological order by the date and time that they were - // created, enter true. To list presets in reverse chronological order, enter - // false. - Ascending *string `location:"querystring" locationName:"Ascending" type:"string"` - - // When Elastic Transcoder returns more than one page of results, use pageToken - // in subsequent GET requests to get each successive page of results. - PageToken *string `location:"querystring" locationName:"PageToken" type:"string"` -} - -// String returns the string representation -func (s ListPresetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPresetsInput) GoString() string { - return s.String() -} - -// SetAscending sets the Ascending field's value. -func (s *ListPresetsInput) SetAscending(v string) *ListPresetsInput { - s.Ascending = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListPresetsInput) SetPageToken(v string) *ListPresetsInput { - s.PageToken = &v - return s -} - -// The ListPresetsResponse structure. -type ListPresetsOutput struct { - _ struct{} `type:"structure"` - - // A value that you use to access the second and subsequent pages of results, - // if any. When the presets fit on one page or when you've reached the last - // page of results, the value of NextPageToken is null. - NextPageToken *string `type:"string"` - - // An array of Preset objects. - Presets []*Preset `type:"list"` -} - -// String returns the string representation -func (s ListPresetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPresetsOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListPresetsOutput) SetNextPageToken(v string) *ListPresetsOutput { - s.NextPageToken = &v - return s -} - -// SetPresets sets the Presets field's value. -func (s *ListPresetsOutput) SetPresets(v []*Preset) *ListPresetsOutput { - s.Presets = v - return s -} - -// The Amazon Simple Notification Service (Amazon SNS) topic or topics to notify -// in order to report job status. -// -// To receive notifications, you must also subscribe to the new topic in the -// Amazon SNS console. -type Notifications struct { - _ struct{} `type:"structure"` - - // The Amazon SNS topic that you want to notify when Elastic Transcoder has - // finished processing the job. - Completed *string `type:"string"` - - // The Amazon SNS topic that you want to notify when Elastic Transcoder encounters - // an error condition. - Error *string `type:"string"` - - // The Amazon Simple Notification Service (Amazon SNS) topic that you want to - // notify when Elastic Transcoder has started to process the job. - Progressing *string `type:"string"` - - // The Amazon SNS topic that you want to notify when Elastic Transcoder encounters - // a warning condition. - Warning *string `type:"string"` -} - -// String returns the string representation -func (s Notifications) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Notifications) GoString() string { - return s.String() -} - -// SetCompleted sets the Completed field's value. -func (s *Notifications) SetCompleted(v string) *Notifications { - s.Completed = &v - return s -} - -// SetError sets the Error field's value. -func (s *Notifications) SetError(v string) *Notifications { - s.Error = &v - return s -} - -// SetProgressing sets the Progressing field's value. -func (s *Notifications) SetProgressing(v string) *Notifications { - s.Progressing = &v - return s -} - -// SetWarning sets the Warning field's value. -func (s *Notifications) SetWarning(v string) *Notifications { - s.Warning = &v - return s -} - -// The Permission structure. -type Permission struct { - _ struct{} `type:"structure"` - - // The permission that you want to give to the AWS user that is listed in Grantee. - // Valid values include: - // - // * READ: The grantee can read the thumbnails and metadata for thumbnails - // that Elastic Transcoder adds to the Amazon S3 bucket. - // - // * READ_ACP: The grantee can read the object ACL for thumbnails that Elastic - // Transcoder adds to the Amazon S3 bucket. - // - // * WRITE_ACP: The grantee can write the ACL for the thumbnails that Elastic - // Transcoder adds to the Amazon S3 bucket. - // - // * FULL_CONTROL: The grantee has READ, READ_ACP, and WRITE_ACP permissions - // for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket. - Access []*string `type:"list"` - - // The AWS user or group that you want to have access to transcoded files and - // playlists. To identify the user or group, you can specify the canonical user - // ID for an AWS account, an origin access identity for a CloudFront distribution, - // the registered email address of an AWS account, or a predefined Amazon S3 - // group. - Grantee *string `min:"1" type:"string"` - - // The type of value that appears in the Grantee object: - // - // * Canonical: Either the canonical user ID for an AWS account or an origin - // access identity for an Amazon CloudFront distribution. - // - // A canonical user ID is not the same as an AWS account number. - // - // * Email: The registered email address of an AWS account. - // - // * Group: One of the following predefined Amazon S3 groups: AllUsers, AuthenticatedUsers, - // or LogDelivery. - GranteeType *string `type:"string"` -} - -// String returns the string representation -func (s Permission) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Permission) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Permission) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Permission"} - if s.Grantee != nil && len(*s.Grantee) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Grantee", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccess sets the Access field's value. -func (s *Permission) SetAccess(v []*string) *Permission { - s.Access = v - return s -} - -// SetGrantee sets the Grantee field's value. -func (s *Permission) SetGrantee(v string) *Permission { - s.Grantee = &v - return s -} - -// SetGranteeType sets the GranteeType field's value. -func (s *Permission) SetGranteeType(v string) *Permission { - s.GranteeType = &v - return s -} - -// The pipeline (queue) that is used to manage jobs. -type Pipeline struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the pipeline. - Arn *string `type:"string"` - - // The AWS Key Management Service (AWS KMS) key that you want to use with this - // pipeline. - // - // If you use either s3 or s3-aws-kms as your Encryption:Mode, you don't need - // to provide a key with your job because a default key, known as an AWS-KMS - // key, is created for you automatically. You need to provide an AWS-KMS key - // only if you want to use a non-default AWS-KMS key, or if you are using an - // Encryption:Mode of aes-cbc-pkcs7, aes-ctr, or aes-gcm. - AwsKmsKeyArn *string `type:"string"` - - // Information about the Amazon S3 bucket in which you want Elastic Transcoder - // to save transcoded files and playlists. Either you specify both ContentConfig - // and ThumbnailConfig, or you specify OutputBucket. - // - // * Bucket: The Amazon S3 bucket in which you want Elastic Transcoder to - // save transcoded files and playlists. - // - // * Permissions: A list of the users and/or predefined Amazon S3 groups - // you want to have access to transcoded files and playlists, and the type - // of access that you want them to have. - // - // GranteeType: The type of value that appears in the Grantee object: - // - // Canonical: Either the canonical user ID for an AWS account or an origin access - // identity for an Amazon CloudFront distribution. - // - // Email: The registered email address of an AWS account. - // - // Group: One of the following predefined Amazon S3 groups: AllUsers, AuthenticatedUsers, - // or LogDelivery. - // - // Grantee: The AWS user or group that you want to have access to transcoded - // files and playlists. - // - // Access: The permission that you want to give to the AWS user that is listed - // in Grantee. Valid values include: - // - // READ: The grantee can read the objects and metadata for objects that Elastic - // Transcoder adds to the Amazon S3 bucket. - // - // READ_ACP: The grantee can read the object ACL for objects that Elastic Transcoder - // adds to the Amazon S3 bucket. - // - // WRITE_ACP: The grantee can write the ACL for the objects that Elastic Transcoder - // adds to the Amazon S3 bucket. - // - // FULL_CONTROL: The grantee has READ, READ_ACP, and WRITE_ACP permissions for - // the objects that Elastic Transcoder adds to the Amazon S3 bucket. - // - // * StorageClass: The Amazon S3 storage class, Standard or ReducedRedundancy, - // that you want Elastic Transcoder to assign to the video files and playlists - // that it stores in your Amazon S3 bucket. - ContentConfig *PipelineOutputConfig `type:"structure"` - - // The identifier for the pipeline. You use this value to identify the pipeline - // in which you want to perform a variety of operations, such as creating a - // job or a preset. - Id *string `type:"string"` - - // The Amazon S3 bucket from which Elastic Transcoder gets media files for transcoding - // and the graphics files, if any, that you want to use for watermarks. - InputBucket *string `type:"string"` - - // The name of the pipeline. We recommend that the name be unique within the - // AWS account, but uniqueness is not enforced. - // - // Constraints: Maximum 40 characters - Name *string `min:"1" type:"string"` - - // The Amazon Simple Notification Service (Amazon SNS) topic that you want to - // notify to report job status. - // - // To receive notifications, you must also subscribe to the new topic in the - // Amazon SNS console. - // - // * Progressing (optional): The Amazon Simple Notification Service (Amazon - // SNS) topic that you want to notify when Elastic Transcoder has started - // to process the job. - // - // * Complete (optional): The Amazon SNS topic that you want to notify when - // Elastic Transcoder has finished processing the job. - // - // * Warning (optional): The Amazon SNS topic that you want to notify when - // Elastic Transcoder encounters a warning condition. - // - // * Error (optional): The Amazon SNS topic that you want to notify when - // Elastic Transcoder encounters an error condition. - Notifications *Notifications `type:"structure"` - - // The Amazon S3 bucket in which you want Elastic Transcoder to save transcoded - // files, thumbnails, and playlists. Either you specify this value, or you specify - // both ContentConfig and ThumbnailConfig. - OutputBucket *string `type:"string"` - - // The IAM Amazon Resource Name (ARN) for the role that Elastic Transcoder uses - // to transcode jobs for this pipeline. - Role *string `type:"string"` - - // The current status of the pipeline: - // - // * Active: The pipeline is processing jobs. - // - // * Paused: The pipeline is not currently processing jobs. - Status *string `type:"string"` - - // Information about the Amazon S3 bucket in which you want Elastic Transcoder - // to save thumbnail files. Either you specify both ContentConfig and ThumbnailConfig, - // or you specify OutputBucket. - // - // * Bucket: The Amazon S3 bucket in which you want Elastic Transcoder to - // save thumbnail files. - // - // * Permissions: A list of the users and/or predefined Amazon S3 groups - // you want to have access to thumbnail files, and the type of access that - // you want them to have. - // - // GranteeType: The type of value that appears in the Grantee object: - // - // Canonical: Either the canonical user ID for an AWS account or an origin access - // identity for an Amazon CloudFront distribution. - // - // A canonical user ID is not the same as an AWS account number. - // - // Email: The registered email address of an AWS account. - // - // Group: One of the following predefined Amazon S3 groups: AllUsers, AuthenticatedUsers, - // or LogDelivery. - // - // Grantee: The AWS user or group that you want to have access to thumbnail - // files. - // - // Access: The permission that you want to give to the AWS user that is listed - // in Grantee. Valid values include: - // - // READ: The grantee can read the thumbnails and metadata for thumbnails that - // Elastic Transcoder adds to the Amazon S3 bucket. - // - // READ_ACP: The grantee can read the object ACL for thumbnails that Elastic - // Transcoder adds to the Amazon S3 bucket. - // - // WRITE_ACP: The grantee can write the ACL for the thumbnails that Elastic - // Transcoder adds to the Amazon S3 bucket. - // - // FULL_CONTROL: The grantee has READ, READ_ACP, and WRITE_ACP permissions for - // the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket. - // - // * StorageClass: The Amazon S3 storage class, Standard or ReducedRedundancy, - // that you want Elastic Transcoder to assign to the thumbnails that it stores - // in your Amazon S3 bucket. - ThumbnailConfig *PipelineOutputConfig `type:"structure"` -} - -// String returns the string representation -func (s Pipeline) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Pipeline) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Pipeline) SetArn(v string) *Pipeline { - s.Arn = &v - return s -} - -// SetAwsKmsKeyArn sets the AwsKmsKeyArn field's value. -func (s *Pipeline) SetAwsKmsKeyArn(v string) *Pipeline { - s.AwsKmsKeyArn = &v - return s -} - -// SetContentConfig sets the ContentConfig field's value. -func (s *Pipeline) SetContentConfig(v *PipelineOutputConfig) *Pipeline { - s.ContentConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *Pipeline) SetId(v string) *Pipeline { - s.Id = &v - return s -} - -// SetInputBucket sets the InputBucket field's value. -func (s *Pipeline) SetInputBucket(v string) *Pipeline { - s.InputBucket = &v - return s -} - -// SetName sets the Name field's value. -func (s *Pipeline) SetName(v string) *Pipeline { - s.Name = &v - return s -} - -// SetNotifications sets the Notifications field's value. -func (s *Pipeline) SetNotifications(v *Notifications) *Pipeline { - s.Notifications = v - return s -} - -// SetOutputBucket sets the OutputBucket field's value. -func (s *Pipeline) SetOutputBucket(v string) *Pipeline { - s.OutputBucket = &v - return s -} - -// SetRole sets the Role field's value. -func (s *Pipeline) SetRole(v string) *Pipeline { - s.Role = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Pipeline) SetStatus(v string) *Pipeline { - s.Status = &v - return s -} - -// SetThumbnailConfig sets the ThumbnailConfig field's value. -func (s *Pipeline) SetThumbnailConfig(v *PipelineOutputConfig) *Pipeline { - s.ThumbnailConfig = v - return s -} - -// The PipelineOutputConfig structure. -type PipelineOutputConfig struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket in which you want Elastic Transcoder to save the transcoded - // files. Specify this value when all of the following are true: - // - // * You want to save transcoded files, thumbnails (if any), and playlists - // (if any) together in one bucket. - // - // * You do not want to specify the users or groups who have access to the - // transcoded files, thumbnails, and playlists. - // - // * You do not want to specify the permissions that Elastic Transcoder grants - // to the files. - // - // * You want to associate the transcoded files and thumbnails with the Amazon - // S3 Standard storage class. - // - // If you want to save transcoded files and playlists in one bucket and thumbnails - // in another bucket, specify which users can access the transcoded files or - // the permissions the users have, or change the Amazon S3 storage class, omit - // OutputBucket and specify values for ContentConfig and ThumbnailConfig instead. - Bucket *string `type:"string"` - - // Optional. The Permissions object specifies which users and/or predefined - // Amazon S3 groups you want to have access to transcoded files and playlists, - // and the type of access you want them to have. You can grant permissions to - // a maximum of 30 users and/or predefined Amazon S3 groups. - // - // If you include Permissions, Elastic Transcoder grants only the permissions - // that you specify. It does not grant full permissions to the owner of the - // role specified by Role. If you want that user to have full control, you must - // explicitly grant full control to the user. - // - // If you omit Permissions, Elastic Transcoder grants full control over the - // transcoded files and playlists to the owner of the role specified by Role, - // and grants no other permissions to any other user or group. - Permissions []*Permission `type:"list"` - - // The Amazon S3 storage class, Standard or ReducedRedundancy, that you want - // Elastic Transcoder to assign to the video files and playlists that it stores - // in your Amazon S3 bucket. - StorageClass *string `type:"string"` -} - -// String returns the string representation -func (s PipelineOutputConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PipelineOutputConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PipelineOutputConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PipelineOutputConfig"} - if s.Permissions != nil { - for i, v := range s.Permissions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Permissions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PipelineOutputConfig) SetBucket(v string) *PipelineOutputConfig { - s.Bucket = &v - return s -} - -// SetPermissions sets the Permissions field's value. -func (s *PipelineOutputConfig) SetPermissions(v []*Permission) *PipelineOutputConfig { - s.Permissions = v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *PipelineOutputConfig) SetStorageClass(v string) *PipelineOutputConfig { - s.StorageClass = &v - return s -} - -// The PlayReady DRM settings, if any, that you want Elastic Transcoder to apply -// to the output files associated with this playlist. -// -// PlayReady DRM encrypts your media files using aes-ctr encryption. -// -// If you use DRM for an HLSv3 playlist, your outputs must have a master playlist. -type PlayReadyDrm struct { - _ struct{} `type:"structure"` - - // The type of DRM, if any, that you want Elastic Transcoder to apply to the - // output files associated with this playlist. - Format *string `type:"string"` - - // The series of random bits created by a random bit generator, unique for every - // encryption operation, that you want Elastic Transcoder to use to encrypt - // your files. The initialization vector must be base64-encoded, and it must - // be exactly 8 bytes long before being base64-encoded. If no initialization - // vector is provided, Elastic Transcoder generates one for you. - InitializationVector *string `type:"string"` - - // The DRM key for your file, provided by your DRM license provider. The key - // must be base64-encoded, and it must be one of the following bit lengths before - // being base64-encoded: - // - // 128, 192, or 256. - // - // The key must also be encrypted by using AWS KMS. - Key *string `type:"string"` - - // The ID for your DRM key, so that your DRM license provider knows which key - // to provide. - // - // The key ID must be provided in big endian, and Elastic Transcoder converts - // it to little endian before inserting it into the PlayReady DRM headers. If - // you are unsure whether your license server provides your key ID in big or - // little endian, check with your DRM provider. - KeyId *string `type:"string"` - - // The MD5 digest of the key used for DRM on your file, and that you want Elastic - // Transcoder to use as a checksum to make sure your key was not corrupted in - // transit. The key MD5 must be base64-encoded, and it must be exactly 16 bytes - // before being base64-encoded. - KeyMd5 *string `type:"string"` - - // The location of the license key required to play DRM content. The URL must - // be an absolute path, and is referenced by the PlayReady header. The PlayReady - // header is referenced in the protection header of the client manifest for - // Smooth Streaming outputs, and in the EXT-X-DXDRM and EXT-XDXDRMINFO metadata - // tags for HLS playlist outputs. An example URL looks like this: https://www.example.com/exampleKey/ - LicenseAcquisitionUrl *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PlayReadyDrm) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlayReadyDrm) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PlayReadyDrm) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PlayReadyDrm"} - if s.LicenseAcquisitionUrl != nil && len(*s.LicenseAcquisitionUrl) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LicenseAcquisitionUrl", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFormat sets the Format field's value. -func (s *PlayReadyDrm) SetFormat(v string) *PlayReadyDrm { - s.Format = &v - return s -} - -// SetInitializationVector sets the InitializationVector field's value. -func (s *PlayReadyDrm) SetInitializationVector(v string) *PlayReadyDrm { - s.InitializationVector = &v - return s -} - -// SetKey sets the Key field's value. -func (s *PlayReadyDrm) SetKey(v string) *PlayReadyDrm { - s.Key = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *PlayReadyDrm) SetKeyId(v string) *PlayReadyDrm { - s.KeyId = &v - return s -} - -// SetKeyMd5 sets the KeyMd5 field's value. -func (s *PlayReadyDrm) SetKeyMd5(v string) *PlayReadyDrm { - s.KeyMd5 = &v - return s -} - -// SetLicenseAcquisitionUrl sets the LicenseAcquisitionUrl field's value. -func (s *PlayReadyDrm) SetLicenseAcquisitionUrl(v string) *PlayReadyDrm { - s.LicenseAcquisitionUrl = &v - return s -} - -// Use Only for Fragmented MP4 or MPEG-TS Outputs. If you specify a preset for -// which the value of Container is fmp4 (Fragmented MP4) or ts (MPEG-TS), Playlists -// contains information about the master playlists that you want Elastic Transcoder -// to create. We recommend that you create only one master playlist per output -// format. The maximum number of master playlists in a job is 30. -type Playlist struct { - _ struct{} `type:"structure"` - - // The format of the output playlist. Valid formats include HLSv3, HLSv4, and - // Smooth. - Format *string `type:"string"` - - // The HLS content protection settings, if any, that you want Elastic Transcoder - // to apply to the output files associated with this playlist. - HlsContentProtection *HlsContentProtection `type:"structure"` - - // The name that you want Elastic Transcoder to assign to the master playlist, - // for example, nyc-vacation.m3u8. If the name includes a / character, the section - // of the name before the last / must be identical for all Name objects. If - // you create more than one master playlist, the values of all Name objects - // must be unique. - // - // Elastic Transcoder automatically appends the relevant file extension to the - // file name (.m3u8 for HLSv3 and HLSv4 playlists, and .ism and .ismc for Smooth - // playlists). If you include a file extension in Name, the file name will have - // two extensions. - Name *string `min:"1" type:"string"` - - // For each output in this job that you want to include in a master playlist, - // the value of the Outputs:Key object. - // - // * If your output is not HLS or does not have a segment duration set, the - // name of the output file is a concatenation of OutputKeyPrefix and Outputs:Key: - // - // OutputKeyPrefixOutputs:Key - // - // * If your output is HLSv3 and has a segment duration set, or is not included - // in a playlist, Elastic Transcoder creates an output playlist file with - // a file extension of .m3u8, and a series of .ts files that include a five-digit - // sequential counter beginning with 00000: - // - // OutputKeyPrefixOutputs:Key.m3u8 - // - // OutputKeyPrefixOutputs:Key00000.ts - // - // * If your output is HLSv4, has a segment duration set, and is included - // in an HLSv4 playlist, Elastic Transcoder creates an output playlist file - // with a file extension of _v4.m3u8. If the output is video, Elastic Transcoder - // also creates an output file with an extension of _iframe.m3u8: - // - // OutputKeyPrefixOutputs:Key_v4.m3u8 - // - // OutputKeyPrefixOutputs:Key_iframe.m3u8 - // - // OutputKeyPrefixOutputs:Key.ts - // - // Elastic Transcoder automatically appends the relevant file extension to the - // file name. If you include a file extension in Output Key, the file name will - // have two extensions. - // - // If you include more than one output in a playlist, any segment duration settings, - // clip settings, or caption settings must be the same for all outputs in the - // playlist. For Smooth playlists, the Audio:Profile, Video:Profile, and Video:FrameRate - // to Video:KeyframesMaxDist ratio must be the same for all outputs. - OutputKeys []*string `type:"list"` - - // The DRM settings, if any, that you want Elastic Transcoder to apply to the - // output files associated with this playlist. - PlayReadyDrm *PlayReadyDrm `type:"structure"` - - // The status of the job with which the playlist is associated. - Status *string `type:"string"` - - // Information that further explains the status. - StatusDetail *string `type:"string"` -} - -// String returns the string representation -func (s Playlist) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Playlist) GoString() string { - return s.String() -} - -// SetFormat sets the Format field's value. -func (s *Playlist) SetFormat(v string) *Playlist { - s.Format = &v - return s -} - -// SetHlsContentProtection sets the HlsContentProtection field's value. -func (s *Playlist) SetHlsContentProtection(v *HlsContentProtection) *Playlist { - s.HlsContentProtection = v - return s -} - -// SetName sets the Name field's value. -func (s *Playlist) SetName(v string) *Playlist { - s.Name = &v - return s -} - -// SetOutputKeys sets the OutputKeys field's value. -func (s *Playlist) SetOutputKeys(v []*string) *Playlist { - s.OutputKeys = v - return s -} - -// SetPlayReadyDrm sets the PlayReadyDrm field's value. -func (s *Playlist) SetPlayReadyDrm(v *PlayReadyDrm) *Playlist { - s.PlayReadyDrm = v - return s -} - -// SetStatus sets the Status field's value. -func (s *Playlist) SetStatus(v string) *Playlist { - s.Status = &v - return s -} - -// SetStatusDetail sets the StatusDetail field's value. -func (s *Playlist) SetStatusDetail(v string) *Playlist { - s.StatusDetail = &v - return s -} - -// Presets are templates that contain most of the settings for transcoding media -// files from one format to another. Elastic Transcoder includes some default -// presets for common formats, for example, several iPod and iPhone versions. -// You can also create your own presets for formats that aren't included among -// the default presets. You specify which preset you want to use when you create -// a job. -type Preset struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the preset. - Arn *string `type:"string"` - - // A section of the response body that provides information about the audio - // preset values. - Audio *AudioParameters `type:"structure"` - - // The container type for the output file. Valid values include flac, flv, fmp4, - // gif, mp3, mp4, mpg, mxf, oga, ogg, ts, and webm. - Container *string `type:"string"` - - // A description of the preset. - Description *string `type:"string"` - - // Identifier for the new preset. You use this value to get settings for the - // preset or to delete it. - Id *string `type:"string"` - - // The name of the preset. - Name *string `min:"1" type:"string"` - - // A section of the response body that provides information about the thumbnail - // preset values, if any. - Thumbnails *Thumbnails `type:"structure"` - - // Whether the preset is a default preset provided by Elastic Transcoder (System) - // or a preset that you have defined (Custom). - Type *string `type:"string"` - - // A section of the response body that provides information about the video - // preset values. - Video *VideoParameters `type:"structure"` -} - -// String returns the string representation -func (s Preset) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Preset) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Preset) SetArn(v string) *Preset { - s.Arn = &v - return s -} - -// SetAudio sets the Audio field's value. -func (s *Preset) SetAudio(v *AudioParameters) *Preset { - s.Audio = v - return s -} - -// SetContainer sets the Container field's value. -func (s *Preset) SetContainer(v string) *Preset { - s.Container = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Preset) SetDescription(v string) *Preset { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *Preset) SetId(v string) *Preset { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *Preset) SetName(v string) *Preset { - s.Name = &v - return s -} - -// SetThumbnails sets the Thumbnails field's value. -func (s *Preset) SetThumbnails(v *Thumbnails) *Preset { - s.Thumbnails = v - return s -} - -// SetType sets the Type field's value. -func (s *Preset) SetType(v string) *Preset { - s.Type = &v - return s -} - -// SetVideo sets the Video field's value. -func (s *Preset) SetVideo(v *VideoParameters) *Preset { - s.Video = v - return s -} - -// Settings for the size, location, and opacity of graphics that you want Elastic -// Transcoder to overlay over videos that are transcoded using this preset. -// You can specify settings for up to four watermarks. Watermarks appear in -// the specified size and location, and with the specified opacity for the duration -// of the transcoded video. -// -// Watermarks can be in .png or .jpg format. If you want to display a watermark -// that is not rectangular, use the .png format, which supports transparency. -// -// When you create a job that uses this preset, you specify the .png or .jpg -// graphics that you want Elastic Transcoder to include in the transcoded videos. -// You can specify fewer graphics in the job than you specify watermark settings -// in the preset, which allows you to use the same preset for up to four watermarks -// that have different dimensions. -type PresetWatermark struct { - _ struct{} `type:"structure"` - - // The horizontal position of the watermark unless you specify a non-zero value - // for HorizontalOffset: - // - // * Left: The left edge of the watermark is aligned with the left border - // of the video. - // - // * Right: The right edge of the watermark is aligned with the right border - // of the video. - // - // * Center: The watermark is centered between the left and right borders. - HorizontalAlign *string `type:"string"` - - // The amount by which you want the horizontal position of the watermark to - // be offset from the position specified by HorizontalAlign: - // - // * number of pixels (px): The minimum value is 0 pixels, and the maximum - // value is the value of MaxWidth. - // - // * integer percentage (%): The range of valid values is 0 to 100. - // - // For example, if you specify Left for HorizontalAlign and 5px for HorizontalOffset, - // the left side of the watermark appears 5 pixels from the left border of the - // output video. - // - // HorizontalOffset is only valid when the value of HorizontalAlign is Left - // or Right. If you specify an offset that causes the watermark to extend beyond - // the left or right border and Elastic Transcoder has not added black bars, - // the watermark is cropped. If Elastic Transcoder has added black bars, the - // watermark extends into the black bars. If the watermark extends beyond the - // black bars, it is cropped. - // - // Use the value of Target to specify whether you want to include the black - // bars that are added by Elastic Transcoder, if any, in the offset calculation. - HorizontalOffset *string `type:"string"` - - // A unique identifier for the settings for one watermark. The value of Id can - // be up to 40 characters long. - Id *string `min:"1" type:"string"` - - // The maximum height of the watermark in one of the following formats: - // - // * number of pixels (px): The minimum value is 16 pixels, and the maximum - // value is the value of MaxHeight. - // - // * integer percentage (%): The range of valid values is 0 to 100. Use the - // value of Target to specify whether you want Elastic Transcoder to include - // the black bars that are added by Elastic Transcoder, if any, in the calculation. - // - // If you specify the value in pixels, it must be less than or equal to the - // value of MaxHeight. - MaxHeight *string `type:"string"` - - // The maximum width of the watermark in one of the following formats: - // - // * number of pixels (px): The minimum value is 16 pixels, and the maximum - // value is the value of MaxWidth. - // - // * integer percentage (%): The range of valid values is 0 to 100. Use the - // value of Target to specify whether you want Elastic Transcoder to include - // the black bars that are added by Elastic Transcoder, if any, in the calculation. - // - // If you specify the value in pixels, it must be less than or equal to the - // value of MaxWidth. - MaxWidth *string `type:"string"` - - // A percentage that indicates how much you want a watermark to obscure the - // video in the location where it appears. Valid values are 0 (the watermark - // is invisible) to 100 (the watermark completely obscures the video in the - // specified location). The datatype of Opacity is float. - // - // Elastic Transcoder supports transparent .png graphics. If you use a transparent - // .png, the transparent portion of the video appears as if you had specified - // a value of 0 for Opacity. The .jpg file format doesn't support transparency. - Opacity *string `type:"string"` - - // A value that controls scaling of the watermark: - // - // * Fit: Elastic Transcoder scales the watermark so it matches the value - // that you specified in either MaxWidth or MaxHeight without exceeding the - // other value. - // - // * Stretch: Elastic Transcoder stretches the watermark to match the values - // that you specified for MaxWidth and MaxHeight. If the relative proportions - // of the watermark and the values of MaxWidth and MaxHeight are different, - // the watermark will be distorted. - // - // * ShrinkToFit: Elastic Transcoder scales the watermark down so that its - // dimensions match the values that you specified for at least one of MaxWidth - // and MaxHeight without exceeding either value. If you specify this option, - // Elastic Transcoder does not scale the watermark up. - SizingPolicy *string `type:"string"` - - // A value that determines how Elastic Transcoder interprets values that you - // specified for HorizontalOffset, VerticalOffset, MaxWidth, and MaxHeight: - // - // * Content: HorizontalOffset and VerticalOffset values are calculated based - // on the borders of the video excluding black bars added by Elastic Transcoder, - // if any. In addition, MaxWidth and MaxHeight, if specified as a percentage, - // are calculated based on the borders of the video excluding black bars - // added by Elastic Transcoder, if any. - // - // * Frame: HorizontalOffset and VerticalOffset values are calculated based - // on the borders of the video including black bars added by Elastic Transcoder, - // if any. In addition, MaxWidth and MaxHeight, if specified as a percentage, - // are calculated based on the borders of the video including black bars - // added by Elastic Transcoder, if any. - Target *string `type:"string"` - - // The vertical position of the watermark unless you specify a non-zero value - // for VerticalOffset: - // - // * Top: The top edge of the watermark is aligned with the top border of - // the video. - // - // * Bottom: The bottom edge of the watermark is aligned with the bottom - // border of the video. - // - // * Center: The watermark is centered between the top and bottom borders. - VerticalAlign *string `type:"string"` - - // VerticalOffset - // - // The amount by which you want the vertical position of the watermark to be - // offset from the position specified by VerticalAlign: - // - // * number of pixels (px): The minimum value is 0 pixels, and the maximum - // value is the value of MaxHeight. - // - // * integer percentage (%): The range of valid values is 0 to 100. - // - // For example, if you specify Top for VerticalAlign and 5px for VerticalOffset, - // the top of the watermark appears 5 pixels from the top border of the output - // video. - // - // VerticalOffset is only valid when the value of VerticalAlign is Top or Bottom. - // - // If you specify an offset that causes the watermark to extend beyond the top - // or bottom border and Elastic Transcoder has not added black bars, the watermark - // is cropped. If Elastic Transcoder has added black bars, the watermark extends - // into the black bars. If the watermark extends beyond the black bars, it is - // cropped. - // - // Use the value of Target to specify whether you want Elastic Transcoder to - // include the black bars that are added by Elastic Transcoder, if any, in the - // offset calculation. - VerticalOffset *string `type:"string"` -} - -// String returns the string representation -func (s PresetWatermark) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PresetWatermark) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PresetWatermark) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PresetWatermark"} - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHorizontalAlign sets the HorizontalAlign field's value. -func (s *PresetWatermark) SetHorizontalAlign(v string) *PresetWatermark { - s.HorizontalAlign = &v - return s -} - -// SetHorizontalOffset sets the HorizontalOffset field's value. -func (s *PresetWatermark) SetHorizontalOffset(v string) *PresetWatermark { - s.HorizontalOffset = &v - return s -} - -// SetId sets the Id field's value. -func (s *PresetWatermark) SetId(v string) *PresetWatermark { - s.Id = &v - return s -} - -// SetMaxHeight sets the MaxHeight field's value. -func (s *PresetWatermark) SetMaxHeight(v string) *PresetWatermark { - s.MaxHeight = &v - return s -} - -// SetMaxWidth sets the MaxWidth field's value. -func (s *PresetWatermark) SetMaxWidth(v string) *PresetWatermark { - s.MaxWidth = &v - return s -} - -// SetOpacity sets the Opacity field's value. -func (s *PresetWatermark) SetOpacity(v string) *PresetWatermark { - s.Opacity = &v - return s -} - -// SetSizingPolicy sets the SizingPolicy field's value. -func (s *PresetWatermark) SetSizingPolicy(v string) *PresetWatermark { - s.SizingPolicy = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *PresetWatermark) SetTarget(v string) *PresetWatermark { - s.Target = &v - return s -} - -// SetVerticalAlign sets the VerticalAlign field's value. -func (s *PresetWatermark) SetVerticalAlign(v string) *PresetWatermark { - s.VerticalAlign = &v - return s -} - -// SetVerticalOffset sets the VerticalOffset field's value. -func (s *PresetWatermark) SetVerticalOffset(v string) *PresetWatermark { - s.VerticalOffset = &v - return s -} - -// The ReadJobRequest structure. -type ReadJobInput struct { - _ struct{} `type:"structure"` - - // The identifier of the job for which you want to get detailed information. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s ReadJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReadJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReadJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReadJobInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *ReadJobInput) SetId(v string) *ReadJobInput { - s.Id = &v - return s -} - -// The ReadJobResponse structure. -type ReadJobOutput struct { - _ struct{} `type:"structure"` - - // A section of the response body that provides information about the job. - Job *Job `type:"structure"` -} - -// String returns the string representation -func (s ReadJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReadJobOutput) GoString() string { - return s.String() -} - -// SetJob sets the Job field's value. -func (s *ReadJobOutput) SetJob(v *Job) *ReadJobOutput { - s.Job = v - return s -} - -// The ReadPipelineRequest structure. -type ReadPipelineInput struct { - _ struct{} `type:"structure"` - - // The identifier of the pipeline to read. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s ReadPipelineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReadPipelineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReadPipelineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReadPipelineInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *ReadPipelineInput) SetId(v string) *ReadPipelineInput { - s.Id = &v - return s -} - -// The ReadPipelineResponse structure. -type ReadPipelineOutput struct { - _ struct{} `type:"structure"` - - // A section of the response body that provides information about the pipeline. - Pipeline *Pipeline `type:"structure"` - - // Elastic Transcoder returns a warning if the resources used by your pipeline - // are not in the same region as the pipeline. - // - // Using resources in the same region, such as your Amazon S3 buckets, Amazon - // SNS notification topics, and AWS KMS key, reduces processing time and prevents - // cross-regional charges. - Warnings []*Warning `type:"list"` -} - -// String returns the string representation -func (s ReadPipelineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReadPipelineOutput) GoString() string { - return s.String() -} - -// SetPipeline sets the Pipeline field's value. -func (s *ReadPipelineOutput) SetPipeline(v *Pipeline) *ReadPipelineOutput { - s.Pipeline = v - return s -} - -// SetWarnings sets the Warnings field's value. -func (s *ReadPipelineOutput) SetWarnings(v []*Warning) *ReadPipelineOutput { - s.Warnings = v - return s -} - -// The ReadPresetRequest structure. -type ReadPresetInput struct { - _ struct{} `type:"structure"` - - // The identifier of the preset for which you want to get detailed information. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s ReadPresetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReadPresetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReadPresetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReadPresetInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *ReadPresetInput) SetId(v string) *ReadPresetInput { - s.Id = &v - return s -} - -// The ReadPresetResponse structure. -type ReadPresetOutput struct { - _ struct{} `type:"structure"` - - // A section of the response body that provides information about the preset. - Preset *Preset `type:"structure"` -} - -// String returns the string representation -func (s ReadPresetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReadPresetOutput) GoString() string { - return s.String() -} - -// SetPreset sets the Preset field's value. -func (s *ReadPresetOutput) SetPreset(v *Preset) *ReadPresetOutput { - s.Preset = v - return s -} - -// The TestRoleRequest structure. -// -// Deprecated: TestRoleInput has been deprecated -type TestRoleInput struct { - _ struct{} `deprecated:"true" type:"structure"` - - // The Amazon S3 bucket that contains media files to be transcoded. The action - // attempts to read from this bucket. - // - // InputBucket is a required field - InputBucket *string `type:"string" required:"true"` - - // The Amazon S3 bucket that Elastic Transcoder writes transcoded media files - // to. The action attempts to read from this bucket. - // - // OutputBucket is a required field - OutputBucket *string `type:"string" required:"true"` - - // The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder - // to test. - // - // Role is a required field - Role *string `type:"string" required:"true"` - - // The ARNs of one or more Amazon Simple Notification Service (Amazon SNS) topics - // that you want the action to send a test notification to. - // - // Topics is a required field - Topics []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s TestRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TestRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TestRoleInput"} - if s.InputBucket == nil { - invalidParams.Add(request.NewErrParamRequired("InputBucket")) - } - if s.OutputBucket == nil { - invalidParams.Add(request.NewErrParamRequired("OutputBucket")) - } - if s.Role == nil { - invalidParams.Add(request.NewErrParamRequired("Role")) - } - if s.Topics == nil { - invalidParams.Add(request.NewErrParamRequired("Topics")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputBucket sets the InputBucket field's value. -func (s *TestRoleInput) SetInputBucket(v string) *TestRoleInput { - s.InputBucket = &v - return s -} - -// SetOutputBucket sets the OutputBucket field's value. -func (s *TestRoleInput) SetOutputBucket(v string) *TestRoleInput { - s.OutputBucket = &v - return s -} - -// SetRole sets the Role field's value. -func (s *TestRoleInput) SetRole(v string) *TestRoleInput { - s.Role = &v - return s -} - -// SetTopics sets the Topics field's value. -func (s *TestRoleInput) SetTopics(v []*string) *TestRoleInput { - s.Topics = v - return s -} - -// The TestRoleResponse structure. -// -// Deprecated: TestRoleOutput has been deprecated -type TestRoleOutput struct { - _ struct{} `deprecated:"true" type:"structure"` - - // If the Success element contains false, this value is an array of one or more - // error messages that were generated during the test process. - Messages []*string `type:"list"` - - // If the operation is successful, this value is true; otherwise, the value - // is false. - Success *string `type:"string"` -} - -// String returns the string representation -func (s TestRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestRoleOutput) GoString() string { - return s.String() -} - -// SetMessages sets the Messages field's value. -func (s *TestRoleOutput) SetMessages(v []*string) *TestRoleOutput { - s.Messages = v - return s -} - -// SetSuccess sets the Success field's value. -func (s *TestRoleOutput) SetSuccess(v string) *TestRoleOutput { - s.Success = &v - return s -} - -// Thumbnails for videos. -type Thumbnails struct { - _ struct{} `type:"structure"` - - // To better control resolution and aspect ratio of thumbnails, we recommend - // that you use the values MaxWidth, MaxHeight, SizingPolicy, and PaddingPolicy - // instead of Resolution and AspectRatio. The two groups of settings are mutually - // exclusive. Do not use them together. - // - // The aspect ratio of thumbnails. Valid values include: - // - // auto, 1:1, 4:3, 3:2, 16:9 - // - // If you specify auto, Elastic Transcoder tries to preserve the aspect ratio - // of the video in the output file. - AspectRatio *string `type:"string"` - - // The format of thumbnails, if any. Valid values are jpg and png. - // - // You specify whether you want Elastic Transcoder to create thumbnails when - // you create a job. - Format *string `type:"string"` - - // The approximate number of seconds between thumbnails. Specify an integer - // value. - Interval *string `type:"string"` - - // The maximum height of thumbnails in pixels. If you specify auto, Elastic - // Transcoder uses 1080 (Full HD) as the default value. If you specify a numeric - // value, enter an even integer between 32 and 3072. - MaxHeight *string `type:"string"` - - // The maximum width of thumbnails in pixels. If you specify auto, Elastic Transcoder - // uses 1920 (Full HD) as the default value. If you specify a numeric value, - // enter an even integer between 32 and 4096. - MaxWidth *string `type:"string"` - - // When you set PaddingPolicy to Pad, Elastic Transcoder may add black bars - // to the top and bottom and/or left and right sides of thumbnails to make the - // total size of the thumbnails match the values that you specified for thumbnail - // MaxWidth and MaxHeight settings. - PaddingPolicy *string `type:"string"` - - // To better control resolution and aspect ratio of thumbnails, we recommend - // that you use the values MaxWidth, MaxHeight, SizingPolicy, and PaddingPolicy - // instead of Resolution and AspectRatio. The two groups of settings are mutually - // exclusive. Do not use them together. - // - // The width and height of thumbnail files in pixels. Specify a value in the - // format width x height where both values are even integers. The values cannot - // exceed the width and height that you specified in the Video:Resolution object. - Resolution *string `type:"string"` - - // Specify one of the following values to control scaling of thumbnails: - // - // * Fit: Elastic Transcoder scales thumbnails so they match the value that - // you specified in thumbnail MaxWidth or MaxHeight settings without exceeding - // the other value. - // - // * Fill: Elastic Transcoder scales thumbnails so they match the value that - // you specified in thumbnail MaxWidth or MaxHeight settings and matches - // or exceeds the other value. Elastic Transcoder centers the image in thumbnails - // and then crops in the dimension (if any) that exceeds the maximum value. - // - // * Stretch: Elastic Transcoder stretches thumbnails to match the values - // that you specified for thumbnail MaxWidth and MaxHeight settings. If the - // relative proportions of the input video and thumbnails are different, - // the thumbnails will be distorted. - // - // * Keep: Elastic Transcoder does not scale thumbnails. If either dimension - // of the input video exceeds the values that you specified for thumbnail - // MaxWidth and MaxHeight settings, Elastic Transcoder crops the thumbnails. - // - // * ShrinkToFit: Elastic Transcoder scales thumbnails down so that their - // dimensions match the values that you specified for at least one of thumbnail - // MaxWidth and MaxHeight without exceeding either value. If you specify - // this option, Elastic Transcoder does not scale thumbnails up. - // - // * ShrinkToFill: Elastic Transcoder scales thumbnails down so that their - // dimensions match the values that you specified for at least one of MaxWidth - // and MaxHeight without dropping below either value. If you specify this - // option, Elastic Transcoder does not scale thumbnails up. - SizingPolicy *string `type:"string"` -} - -// String returns the string representation -func (s Thumbnails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Thumbnails) GoString() string { - return s.String() -} - -// SetAspectRatio sets the AspectRatio field's value. -func (s *Thumbnails) SetAspectRatio(v string) *Thumbnails { - s.AspectRatio = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *Thumbnails) SetFormat(v string) *Thumbnails { - s.Format = &v - return s -} - -// SetInterval sets the Interval field's value. -func (s *Thumbnails) SetInterval(v string) *Thumbnails { - s.Interval = &v - return s -} - -// SetMaxHeight sets the MaxHeight field's value. -func (s *Thumbnails) SetMaxHeight(v string) *Thumbnails { - s.MaxHeight = &v - return s -} - -// SetMaxWidth sets the MaxWidth field's value. -func (s *Thumbnails) SetMaxWidth(v string) *Thumbnails { - s.MaxWidth = &v - return s -} - -// SetPaddingPolicy sets the PaddingPolicy field's value. -func (s *Thumbnails) SetPaddingPolicy(v string) *Thumbnails { - s.PaddingPolicy = &v - return s -} - -// SetResolution sets the Resolution field's value. -func (s *Thumbnails) SetResolution(v string) *Thumbnails { - s.Resolution = &v - return s -} - -// SetSizingPolicy sets the SizingPolicy field's value. -func (s *Thumbnails) SetSizingPolicy(v string) *Thumbnails { - s.SizingPolicy = &v - return s -} - -// Settings that determine when a clip begins and how long it lasts. -type TimeSpan struct { - _ struct{} `type:"structure"` - - // The duration of the clip. The format can be either HH:mm:ss.SSS (maximum - // value: 23:59:59.999; SSS is thousandths of a second) or sssss.SSS (maximum - // value: 86399.999). If you don't specify a value, Elastic Transcoder creates - // an output file from StartTime to the end of the file. - // - // If you specify a value longer than the duration of the input file, Elastic - // Transcoder transcodes the file and returns a warning message. - Duration *string `type:"string"` - - // The place in the input file where you want a clip to start. The format can - // be either HH:mm:ss.SSS (maximum value: 23:59:59.999; SSS is thousandths of - // a second) or sssss.SSS (maximum value: 86399.999). If you don't specify a - // value, Elastic Transcoder starts at the beginning of the input file. - StartTime *string `type:"string"` -} - -// String returns the string representation -func (s TimeSpan) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimeSpan) GoString() string { - return s.String() -} - -// SetDuration sets the Duration field's value. -func (s *TimeSpan) SetDuration(v string) *TimeSpan { - s.Duration = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *TimeSpan) SetStartTime(v string) *TimeSpan { - s.StartTime = &v - return s -} - -// Details about the timing of a job. -type Timing struct { - _ struct{} `type:"structure"` - - // The time the job finished transcoding, in epoch milliseconds. - FinishTimeMillis *int64 `type:"long"` - - // The time the job began transcoding, in epoch milliseconds. - StartTimeMillis *int64 `type:"long"` - - // The time the job was submitted to Elastic Transcoder, in epoch milliseconds. - SubmitTimeMillis *int64 `type:"long"` -} - -// String returns the string representation -func (s Timing) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Timing) GoString() string { - return s.String() -} - -// SetFinishTimeMillis sets the FinishTimeMillis field's value. -func (s *Timing) SetFinishTimeMillis(v int64) *Timing { - s.FinishTimeMillis = &v - return s -} - -// SetStartTimeMillis sets the StartTimeMillis field's value. -func (s *Timing) SetStartTimeMillis(v int64) *Timing { - s.StartTimeMillis = &v - return s -} - -// SetSubmitTimeMillis sets the SubmitTimeMillis field's value. -func (s *Timing) SetSubmitTimeMillis(v int64) *Timing { - s.SubmitTimeMillis = &v - return s -} - -// The UpdatePipelineRequest structure. -type UpdatePipelineInput struct { - _ struct{} `type:"structure"` - - // The AWS Key Management Service (AWS KMS) key that you want to use with this - // pipeline. - // - // If you use either s3 or s3-aws-kms as your Encryption:Mode, you don't need - // to provide a key with your job because a default key, known as an AWS-KMS - // key, is created for you automatically. You need to provide an AWS-KMS key - // only if you want to use a non-default AWS-KMS key, or if you are using an - // Encryption:Mode of aes-cbc-pkcs7, aes-ctr, or aes-gcm. - AwsKmsKeyArn *string `type:"string"` - - // The optional ContentConfig object specifies information about the Amazon - // S3 bucket in which you want Elastic Transcoder to save transcoded files and - // playlists: which bucket to use, which users you want to have access to the - // files, the type of access you want users to have, and the storage class that - // you want to assign to the files. - // - // If you specify values for ContentConfig, you must also specify values for - // ThumbnailConfig. - // - // If you specify values for ContentConfig and ThumbnailConfig, omit the OutputBucket - // object. - // - // * Bucket: The Amazon S3 bucket in which you want Elastic Transcoder to - // save transcoded files and playlists. - // - // * Permissions (Optional): The Permissions object specifies which users - // you want to have access to transcoded files and the type of access you - // want them to have. You can grant permissions to a maximum of 30 users - // and/or predefined Amazon S3 groups. - // - // * Grantee Type: Specify the type of value that appears in the Grantee - // object: - // - // Canonical: The value in the Grantee object is either the canonical user ID - // for an AWS account or an origin access identity for an Amazon CloudFront - // distribution. For more information about canonical user IDs, see Access - // Control List (ACL) Overview in the Amazon Simple Storage Service Developer - // Guide. For more information about using CloudFront origin access identities - // to require that users use CloudFront URLs instead of Amazon S3 URLs, see - // Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content. - // - // A canonical user ID is not the same as an AWS account number. - // - // Email: The value in the Grantee object is the registered email address of - // an AWS account. - // - // Group: The value in the Grantee object is one of the following predefined - // Amazon S3 groups: AllUsers, AuthenticatedUsers, or LogDelivery. - // - // * Grantee: The AWS user or group that you want to have access to transcoded - // files and playlists. To identify the user or group, you can specify the - // canonical user ID for an AWS account, an origin access identity for a - // CloudFront distribution, the registered email address of an AWS account, - // or a predefined Amazon S3 group - // - // * Access: The permission that you want to give to the AWS user that you - // specified in Grantee. Permissions are granted on the files that Elastic - // Transcoder adds to the bucket, including playlists and video files. Valid - // values include: - // - // READ: The grantee can read the objects and metadata for objects that Elastic - // Transcoder adds to the Amazon S3 bucket. - // - // READ_ACP: The grantee can read the object ACL for objects that Elastic Transcoder - // adds to the Amazon S3 bucket. - // - // WRITE_ACP: The grantee can write the ACL for the objects that Elastic Transcoder - // adds to the Amazon S3 bucket. - // - // FULL_CONTROL: The grantee has READ, READ_ACP, and WRITE_ACP permissions for - // the objects that Elastic Transcoder adds to the Amazon S3 bucket. - // - // * StorageClass: The Amazon S3 storage class, Standard or ReducedRedundancy, - // that you want Elastic Transcoder to assign to the video files and playlists - // that it stores in your Amazon S3 bucket. - ContentConfig *PipelineOutputConfig `type:"structure"` - - // The ID of the pipeline that you want to update. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The Amazon S3 bucket in which you saved the media files that you want to - // transcode and the graphics that you want to use as watermarks. - InputBucket *string `type:"string"` - - // The name of the pipeline. We recommend that the name be unique within the - // AWS account, but uniqueness is not enforced. - // - // Constraints: Maximum 40 characters - Name *string `min:"1" type:"string"` - - // The topic ARN for the Amazon Simple Notification Service (Amazon SNS) topic - // that you want to notify to report job status. - // - // To receive notifications, you must also subscribe to the new topic in the - // Amazon SNS console. - // - // * Progressing: The topic ARN for the Amazon Simple Notification Service - // (Amazon SNS) topic that you want to notify when Elastic Transcoder has - // started to process jobs that are added to this pipeline. This is the ARN - // that Amazon SNS returned when you created the topic. - // - // * Complete: The topic ARN for the Amazon SNS topic that you want to notify - // when Elastic Transcoder has finished processing a job. This is the ARN - // that Amazon SNS returned when you created the topic. - // - // * Warning: The topic ARN for the Amazon SNS topic that you want to notify - // when Elastic Transcoder encounters a warning condition. This is the ARN - // that Amazon SNS returned when you created the topic. - // - // * Error: The topic ARN for the Amazon SNS topic that you want to notify - // when Elastic Transcoder encounters an error condition. This is the ARN - // that Amazon SNS returned when you created the topic. - Notifications *Notifications `type:"structure"` - - // The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder - // to use to transcode jobs for this pipeline. - Role *string `type:"string"` - - // The ThumbnailConfig object specifies several values, including the Amazon - // S3 bucket in which you want Elastic Transcoder to save thumbnail files, which - // users you want to have access to the files, the type of access you want users - // to have, and the storage class that you want to assign to the files. - // - // If you specify values for ContentConfig, you must also specify values for - // ThumbnailConfig even if you don't want to create thumbnails. - // - // If you specify values for ContentConfig and ThumbnailConfig, omit the OutputBucket - // object. - // - // * Bucket: The Amazon S3 bucket in which you want Elastic Transcoder to - // save thumbnail files. - // - // * Permissions (Optional): The Permissions object specifies which users - // and/or predefined Amazon S3 groups you want to have access to thumbnail - // files, and the type of access you want them to have. You can grant permissions - // to a maximum of 30 users and/or predefined Amazon S3 groups. - // - // * GranteeType: Specify the type of value that appears in the Grantee object: - // - // Canonical: The value in the Grantee object is either the canonical user ID - // for an AWS account or an origin access identity for an Amazon CloudFront - // distribution. - // - // A canonical user ID is not the same as an AWS account number. - // - // Email: The value in the Grantee object is the registered email address of - // an AWS account. - // - // Group: The value in the Grantee object is one of the following predefined - // Amazon S3 groups: AllUsers, AuthenticatedUsers, or LogDelivery. - // - // * Grantee: The AWS user or group that you want to have access to thumbnail - // files. To identify the user or group, you can specify the canonical user - // ID for an AWS account, an origin access identity for a CloudFront distribution, - // the registered email address of an AWS account, or a predefined Amazon - // S3 group. - // - // * Access: The permission that you want to give to the AWS user that you - // specified in Grantee. Permissions are granted on the thumbnail files that - // Elastic Transcoder adds to the bucket. Valid values include: - // - // READ: The grantee can read the thumbnails and metadata for objects that Elastic - // Transcoder adds to the Amazon S3 bucket. - // - // READ_ACP: The grantee can read the object ACL for thumbnails that Elastic - // Transcoder adds to the Amazon S3 bucket. - // - // WRITE_ACP: The grantee can write the ACL for the thumbnails that Elastic - // Transcoder adds to the Amazon S3 bucket. - // - // FULL_CONTROL: The grantee has READ, READ_ACP, and WRITE_ACP permissions for - // the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket. - // - // * StorageClass: The Amazon S3 storage class, Standard or ReducedRedundancy, - // that you want Elastic Transcoder to assign to the thumbnails that it stores - // in your Amazon S3 bucket. - ThumbnailConfig *PipelineOutputConfig `type:"structure"` -} - -// String returns the string representation -func (s UpdatePipelineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePipelineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdatePipelineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdatePipelineInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.ContentConfig != nil { - if err := s.ContentConfig.Validate(); err != nil { - invalidParams.AddNested("ContentConfig", err.(request.ErrInvalidParams)) - } - } - if s.ThumbnailConfig != nil { - if err := s.ThumbnailConfig.Validate(); err != nil { - invalidParams.AddNested("ThumbnailConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAwsKmsKeyArn sets the AwsKmsKeyArn field's value. -func (s *UpdatePipelineInput) SetAwsKmsKeyArn(v string) *UpdatePipelineInput { - s.AwsKmsKeyArn = &v - return s -} - -// SetContentConfig sets the ContentConfig field's value. -func (s *UpdatePipelineInput) SetContentConfig(v *PipelineOutputConfig) *UpdatePipelineInput { - s.ContentConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *UpdatePipelineInput) SetId(v string) *UpdatePipelineInput { - s.Id = &v - return s -} - -// SetInputBucket sets the InputBucket field's value. -func (s *UpdatePipelineInput) SetInputBucket(v string) *UpdatePipelineInput { - s.InputBucket = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdatePipelineInput) SetName(v string) *UpdatePipelineInput { - s.Name = &v - return s -} - -// SetNotifications sets the Notifications field's value. -func (s *UpdatePipelineInput) SetNotifications(v *Notifications) *UpdatePipelineInput { - s.Notifications = v - return s -} - -// SetRole sets the Role field's value. -func (s *UpdatePipelineInput) SetRole(v string) *UpdatePipelineInput { - s.Role = &v - return s -} - -// SetThumbnailConfig sets the ThumbnailConfig field's value. -func (s *UpdatePipelineInput) SetThumbnailConfig(v *PipelineOutputConfig) *UpdatePipelineInput { - s.ThumbnailConfig = v - return s -} - -// The UpdatePipelineNotificationsRequest structure. -type UpdatePipelineNotificationsInput struct { - _ struct{} `type:"structure"` - - // The identifier of the pipeline for which you want to change notification - // settings. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The topic ARN for the Amazon Simple Notification Service (Amazon SNS) topic - // that you want to notify to report job status. - // - // To receive notifications, you must also subscribe to the new topic in the - // Amazon SNS console. - // - // * Progressing: The topic ARN for the Amazon Simple Notification Service - // (Amazon SNS) topic that you want to notify when Elastic Transcoder has - // started to process jobs that are added to this pipeline. This is the ARN - // that Amazon SNS returned when you created the topic. - // - // * Complete: The topic ARN for the Amazon SNS topic that you want to notify - // when Elastic Transcoder has finished processing a job. This is the ARN - // that Amazon SNS returned when you created the topic. - // - // * Warning: The topic ARN for the Amazon SNS topic that you want to notify - // when Elastic Transcoder encounters a warning condition. This is the ARN - // that Amazon SNS returned when you created the topic. - // - // * Error: The topic ARN for the Amazon SNS topic that you want to notify - // when Elastic Transcoder encounters an error condition. This is the ARN - // that Amazon SNS returned when you created the topic. - // - // Notifications is a required field - Notifications *Notifications `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdatePipelineNotificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePipelineNotificationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdatePipelineNotificationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdatePipelineNotificationsInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Notifications == nil { - invalidParams.Add(request.NewErrParamRequired("Notifications")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *UpdatePipelineNotificationsInput) SetId(v string) *UpdatePipelineNotificationsInput { - s.Id = &v - return s -} - -// SetNotifications sets the Notifications field's value. -func (s *UpdatePipelineNotificationsInput) SetNotifications(v *Notifications) *UpdatePipelineNotificationsInput { - s.Notifications = v - return s -} - -// The UpdatePipelineNotificationsResponse structure. -type UpdatePipelineNotificationsOutput struct { - _ struct{} `type:"structure"` - - // A section of the response body that provides information about the pipeline - // associated with this notification. - Pipeline *Pipeline `type:"structure"` -} - -// String returns the string representation -func (s UpdatePipelineNotificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePipelineNotificationsOutput) GoString() string { - return s.String() -} - -// SetPipeline sets the Pipeline field's value. -func (s *UpdatePipelineNotificationsOutput) SetPipeline(v *Pipeline) *UpdatePipelineNotificationsOutput { - s.Pipeline = v - return s -} - -// When you update a pipeline, Elastic Transcoder returns the values that you -// specified in the request. -type UpdatePipelineOutput struct { - _ struct{} `type:"structure"` - - // The pipeline updated by this UpdatePipelineResponse call. - Pipeline *Pipeline `type:"structure"` - - // Elastic Transcoder returns a warning if the resources used by your pipeline - // are not in the same region as the pipeline. - // - // Using resources in the same region, such as your Amazon S3 buckets, Amazon - // SNS notification topics, and AWS KMS key, reduces processing time and prevents - // cross-regional charges. - Warnings []*Warning `type:"list"` -} - -// String returns the string representation -func (s UpdatePipelineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePipelineOutput) GoString() string { - return s.String() -} - -// SetPipeline sets the Pipeline field's value. -func (s *UpdatePipelineOutput) SetPipeline(v *Pipeline) *UpdatePipelineOutput { - s.Pipeline = v - return s -} - -// SetWarnings sets the Warnings field's value. -func (s *UpdatePipelineOutput) SetWarnings(v []*Warning) *UpdatePipelineOutput { - s.Warnings = v - return s -} - -// The UpdatePipelineStatusRequest structure. -type UpdatePipelineStatusInput struct { - _ struct{} `type:"structure"` - - // The identifier of the pipeline to update. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The desired status of the pipeline: - // - // * Active: The pipeline is processing jobs. - // - // * Paused: The pipeline is not currently processing jobs. - // - // Status is a required field - Status *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdatePipelineStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePipelineStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdatePipelineStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdatePipelineStatusInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *UpdatePipelineStatusInput) SetId(v string) *UpdatePipelineStatusInput { - s.Id = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdatePipelineStatusInput) SetStatus(v string) *UpdatePipelineStatusInput { - s.Status = &v - return s -} - -// When you update status for a pipeline, Elastic Transcoder returns the values -// that you specified in the request. -type UpdatePipelineStatusOutput struct { - _ struct{} `type:"structure"` - - // A section of the response body that provides information about the pipeline. - Pipeline *Pipeline `type:"structure"` -} - -// String returns the string representation -func (s UpdatePipelineStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePipelineStatusOutput) GoString() string { - return s.String() -} - -// SetPipeline sets the Pipeline field's value. -func (s *UpdatePipelineStatusOutput) SetPipeline(v *Pipeline) *UpdatePipelineStatusOutput { - s.Pipeline = v - return s -} - -// The VideoParameters structure. -type VideoParameters struct { - _ struct{} `type:"structure"` - - // To better control resolution and aspect ratio of output videos, we recommend - // that you use the values MaxWidth, MaxHeight, SizingPolicy, PaddingPolicy, - // and DisplayAspectRatio instead of Resolution and AspectRatio. The two groups - // of settings are mutually exclusive. Do not use them together. - // - // The display aspect ratio of the video in the output file. Valid values include: - // - // auto, 1:1, 4:3, 3:2, 16:9 - // - // If you specify auto, Elastic Transcoder tries to preserve the aspect ratio - // of the input file. - // - // If you specify an aspect ratio for the output file that differs from aspect - // ratio of the input file, Elastic Transcoder adds pillarboxing (black bars - // on the sides) or letterboxing (black bars on the top and bottom) to maintain - // the aspect ratio of the active region of the video. - AspectRatio *string `type:"string"` - - // The bit rate of the video stream in the output file, in kilobits/second. - // Valid values depend on the values of Level and Profile. If you specify auto, - // Elastic Transcoder uses the detected bit rate of the input source. If you - // specify a value other than auto, we recommend that you specify a value less - // than or equal to the maximum H.264-compliant value listed for your level - // and profile: - // - // Level - Maximum video bit rate in kilobits/second (baseline and main Profile) - // : maximum video bit rate in kilobits/second (high Profile) - // - // * 1 - 64 : 80 - // - // * 1b - 128 : 160 - // - // * 1.1 - 192 : 240 - // - // * 1.2 - 384 : 480 - // - // * 1.3 - 768 : 960 - // - // * 2 - 2000 : 2500 - // - // * 3 - 10000 : 12500 - // - // * 3.1 - 14000 : 17500 - // - // * 3.2 - 20000 : 25000 - // - // * 4 - 20000 : 25000 - // - // * 4.1 - 50000 : 62500 - BitRate *string `type:"string"` - - // The video codec for the output file. Valid values include gif, H.264, mpeg2, - // vp8, and vp9. You can only specify vp8 and vp9 when the container type is - // webm, gif when the container type is gif, and mpeg2 when the container type - // is mpg. - Codec *string `type:"string"` - - // Profile (H.264/VP8/VP9 Only) - // - // The H.264 profile that you want to use for the output file. Elastic Transcoder - // supports the following profiles: - // - // * baseline: The profile most commonly used for videoconferencing and for - // mobile applications. - // - // * main: The profile used for standard-definition digital TV broadcasts. - // - // * high: The profile used for high-definition digital TV broadcasts and - // for Blu-ray discs. - // - // Level (H.264 Only) - // - // The H.264 level that you want to use for the output file. Elastic Transcoder - // supports the following levels: - // - // 1, 1b, 1.1, 1.2, 1.3, 2, 2.1, 2.2, 3, 3.1, 3.2, 4, 4.1 - // - // MaxReferenceFrames (H.264 Only) - // - // Applicable only when the value of Video:Codec is H.264. The maximum number - // of previously decoded frames to use as a reference for decoding future frames. - // Valid values are integers 0 through 16, but we recommend that you not use - // a value greater than the following: - // - // Min(Floor(Maximum decoded picture buffer in macroblocks * 256 / (Width in - // pixels * Height in pixels)), 16) - // - // where Width in pixels and Height in pixels represent either MaxWidth and - // MaxHeight, or Resolution. Maximum decoded picture buffer in macroblocks depends - // on the value of the Level object. See the list below. (A macroblock is a - // block of pixels measuring 16x16.) - // - // * 1 - 396 - // - // * 1b - 396 - // - // * 1.1 - 900 - // - // * 1.2 - 2376 - // - // * 1.3 - 2376 - // - // * 2 - 2376 - // - // * 2.1 - 4752 - // - // * 2.2 - 8100 - // - // * 3 - 8100 - // - // * 3.1 - 18000 - // - // * 3.2 - 20480 - // - // * 4 - 32768 - // - // * 4.1 - 32768 - // - // MaxBitRate (Optional, H.264/MPEG2/VP8/VP9 only) - // - // The maximum number of bits per second in a video buffer; the size of the - // buffer is specified by BufferSize. Specify a value between 16 and 62,500. - // You can reduce the bandwidth required to stream a video by reducing the maximum - // bit rate, but this also reduces the quality of the video. - // - // BufferSize (Optional, H.264/MPEG2/VP8/VP9 only) - // - // The maximum number of bits in any x seconds of the output video. This window - // is commonly 10 seconds, the standard segment duration when you're using FMP4 - // or MPEG-TS for the container type of the output video. Specify an integer - // greater than 0. If you specify MaxBitRate and omit BufferSize, Elastic Transcoder - // sets BufferSize to 10 times the value of MaxBitRate. - // - // InterlacedMode (Optional, H.264/MPEG2 Only) - // - // The interlace mode for the output video. - // - // Interlaced video is used to double the perceived frame rate for a video by - // interlacing two fields (one field on every other line, the other field on - // the other lines) so that the human eye registers multiple pictures per frame. - // Interlacing reduces the bandwidth required for transmitting a video, but - // can result in blurred images and flickering. - // - // Valid values include Progressive (no interlacing, top to bottom), TopFirst - // (top field first), BottomFirst (bottom field first), and Auto. - // - // If InterlaceMode is not specified, Elastic Transcoder uses Progressive for - // the output. If Auto is specified, Elastic Transcoder interlaces the output. - // - // ColorSpaceConversionMode (Optional, H.264/MPEG2 Only) - // - // The color space conversion Elastic Transcoder applies to the output video. - // Color spaces are the algorithms used by the computer to store information - // about how to render color. Bt.601 is the standard for standard definition - // video, while Bt.709 is the standard for high definition video. - // - // Valid values include None, Bt709toBt601, Bt601toBt709, and Auto. - // - // If you chose Auto for ColorSpaceConversionMode and your output is interlaced, - // your frame rate is one of 23.97, 24, 25, 29.97, 50, or 60, your SegmentDuration - // is null, and you are using one of the resolution changes from the list below, - // Elastic Transcoder applies the following color space conversions: - // - // * Standard to HD, 720x480 to 1920x1080 - Elastic Transcoder applies Bt601ToBt709 - // - // * Standard to HD, 720x576 to 1920x1080 - Elastic Transcoder applies Bt601ToBt709 - // - // * HD to Standard, 1920x1080 to 720x480 - Elastic Transcoder applies Bt709ToBt601 - // - // * HD to Standard, 1920x1080 to 720x576 - Elastic Transcoder applies Bt709ToBt601 - // - // Elastic Transcoder may change the behavior of the ColorspaceConversionModeAuto - // mode in the future. All outputs in a playlist must use the same ColorSpaceConversionMode. - // - // If you do not specify a ColorSpaceConversionMode, Elastic Transcoder does - // not change the color space of a file. If you are unsure what ColorSpaceConversionMode - // was applied to your output file, you can check the AppliedColorSpaceConversion - // parameter included in your job response. If your job does not have an AppliedColorSpaceConversion - // in its response, no ColorSpaceConversionMode was applied. - // - // ChromaSubsampling - // - // The sampling pattern for the chroma (color) channels of the output video. - // Valid values include yuv420p and yuv422p. - // - // yuv420p samples the chroma information of every other horizontal and every - // other vertical line, yuv422p samples the color information of every horizontal - // line and every other vertical line. - // - // LoopCount (Gif Only) - // - // The number of times you want the output gif to loop. Valid values include - // Infinite and integers between 0 and 100, inclusive. - CodecOptions map[string]*string `type:"map"` - - // The value that Elastic Transcoder adds to the metadata in the output file. - DisplayAspectRatio *string `type:"string"` - - // Applicable only when the value of Video:Codec is one of H.264, MPEG2, or - // VP8. - // - // Whether to use a fixed value for FixedGOP. Valid values are true and false: - // - // * true: Elastic Transcoder uses the value of KeyframesMaxDist for the - // distance between key frames (the number of frames in a group of pictures, - // or GOP). - // - // * false: The distance between key frames can vary. - // - // FixedGOP must be set to true for fmp4 containers. - FixedGOP *string `type:"string"` - - // The frames per second for the video stream in the output file. Valid values - // include: - // - // auto, 10, 15, 23.97, 24, 25, 29.97, 30, 60 - // - // If you specify auto, Elastic Transcoder uses the detected frame rate of the - // input source. If you specify a frame rate, we recommend that you perform - // the following calculation: - // - // Frame rate = maximum recommended decoding speed in luma samples/second / - // (width in pixels * height in pixels) - // - // where: - // - // * width in pixels and height in pixels represent the Resolution of the - // output video. - // - // * maximum recommended decoding speed in Luma samples/second is less than - // or equal to the maximum value listed in the following table, based on - // the value that you specified for Level. - // - // The maximum recommended decoding speed in Luma samples/second for each level - // is described in the following list (Level - Decoding speed): - // - // * 1 - 380160 - // - // * 1b - 380160 - // - // * 1.1 - 76800 - // - // * 1.2 - 1536000 - // - // * 1.3 - 3041280 - // - // * 2 - 3041280 - // - // * 2.1 - 5068800 - // - // * 2.2 - 5184000 - // - // * 3 - 10368000 - // - // * 3.1 - 27648000 - // - // * 3.2 - 55296000 - // - // * 4 - 62914560 - // - // * 4.1 - 62914560 - FrameRate *string `type:"string"` - - // Applicable only when the value of Video:Codec is one of H.264, MPEG2, or - // VP8. - // - // The maximum number of frames between key frames. Key frames are fully encoded - // frames; the frames between key frames are encoded based, in part, on the - // content of the key frames. The value is an integer formatted as a string; - // valid values are between 1 (every frame is a key frame) and 100000, inclusive. - // A higher value results in higher compression but may also discernibly decrease - // video quality. - // - // For Smooth outputs, the FrameRate must have a constant ratio to the KeyframesMaxDist. - // This allows Smooth playlists to switch between different quality levels while - // the file is being played. - // - // For example, an input file can have a FrameRate of 30 with a KeyframesMaxDist - // of 90. The output file then needs to have a ratio of 1:3. Valid outputs would - // have FrameRate of 30, 25, and 10, and KeyframesMaxDist of 90, 75, and 30, - // respectively. - // - // Alternately, this can be achieved by setting FrameRate to auto and having - // the same values for MaxFrameRate and KeyframesMaxDist. - KeyframesMaxDist *string `type:"string"` - - // If you specify auto for FrameRate, Elastic Transcoder uses the frame rate - // of the input video for the frame rate of the output video. Specify the maximum - // frame rate that you want Elastic Transcoder to use when the frame rate of - // the input video is greater than the desired maximum frame rate of the output - // video. Valid values include: 10, 15, 23.97, 24, 25, 29.97, 30, 60. - MaxFrameRate *string `type:"string"` - - // The maximum height of the output video in pixels. If you specify auto, Elastic - // Transcoder uses 1080 (Full HD) as the default value. If you specify a numeric - // value, enter an even integer between 96 and 3072. - MaxHeight *string `type:"string"` - - // The maximum width of the output video in pixels. If you specify auto, Elastic - // Transcoder uses 1920 (Full HD) as the default value. If you specify a numeric - // value, enter an even integer between 128 and 4096. - MaxWidth *string `type:"string"` - - // When you set PaddingPolicy to Pad, Elastic Transcoder may add black bars - // to the top and bottom and/or left and right sides of the output video to - // make the total size of the output video match the values that you specified - // for MaxWidth and MaxHeight. - PaddingPolicy *string `type:"string"` - - // To better control resolution and aspect ratio of output videos, we recommend - // that you use the values MaxWidth, MaxHeight, SizingPolicy, PaddingPolicy, - // and DisplayAspectRatio instead of Resolution and AspectRatio. The two groups - // of settings are mutually exclusive. Do not use them together. - // - // The width and height of the video in the output file, in pixels. Valid values - // are auto and width x height: - // - // * auto: Elastic Transcoder attempts to preserve the width and height of - // the input file, subject to the following rules. - // - // * width x height: The width and height of the output video in pixels. - // - // Note the following about specifying the width and height: - // - // * The width must be an even integer between 128 and 4096, inclusive. - // - // * The height must be an even integer between 96 and 3072, inclusive. - // - // * If you specify a resolution that is less than the resolution of the - // input file, Elastic Transcoder rescales the output file to the lower resolution. - // - // * If you specify a resolution that is greater than the resolution of the - // input file, Elastic Transcoder rescales the output to the higher resolution. - // - // * We recommend that you specify a resolution for which the product of - // width and height is less than or equal to the applicable value in the - // following list (List - Max width x height value): - // - // 1 - 25344 - // - // 1b - 25344 - // - // 1.1 - 101376 - // - // 1.2 - 101376 - // - // 1.3 - 101376 - // - // 2 - 101376 - // - // 2.1 - 202752 - // - // 2.2 - 404720 - // - // 3 - 404720 - // - // 3.1 - 921600 - // - // 3.2 - 1310720 - // - // 4 - 2097152 - // - // 4.1 - 2097152 - Resolution *string `type:"string"` - - // Specify one of the following values to control scaling of the output video: - // - // * Fit: Elastic Transcoder scales the output video so it matches the value - // that you specified in either MaxWidth or MaxHeight without exceeding the - // other value. - // - // * Fill: Elastic Transcoder scales the output video so it matches the value - // that you specified in either MaxWidth or MaxHeight and matches or exceeds - // the other value. Elastic Transcoder centers the output video and then - // crops it in the dimension (if any) that exceeds the maximum value. - // - // * Stretch: Elastic Transcoder stretches the output video to match the - // values that you specified for MaxWidth and MaxHeight. If the relative - // proportions of the input video and the output video are different, the - // output video will be distorted. - // - // * Keep: Elastic Transcoder does not scale the output video. If either - // dimension of the input video exceeds the values that you specified for - // MaxWidth and MaxHeight, Elastic Transcoder crops the output video. - // - // * ShrinkToFit: Elastic Transcoder scales the output video down so that - // its dimensions match the values that you specified for at least one of - // MaxWidth and MaxHeight without exceeding either value. If you specify - // this option, Elastic Transcoder does not scale the video up. - // - // * ShrinkToFill: Elastic Transcoder scales the output video down so that - // its dimensions match the values that you specified for at least one of - // MaxWidth and MaxHeight without dropping below either value. If you specify - // this option, Elastic Transcoder does not scale the video up. - SizingPolicy *string `type:"string"` - - // Settings for the size, location, and opacity of graphics that you want Elastic - // Transcoder to overlay over videos that are transcoded using this preset. - // You can specify settings for up to four watermarks. Watermarks appear in - // the specified size and location, and with the specified opacity for the duration - // of the transcoded video. - // - // Watermarks can be in .png or .jpg format. If you want to display a watermark - // that is not rectangular, use the .png format, which supports transparency. - // - // When you create a job that uses this preset, you specify the .png or .jpg - // graphics that you want Elastic Transcoder to include in the transcoded videos. - // You can specify fewer graphics in the job than you specify watermark settings - // in the preset, which allows you to use the same preset for up to four watermarks - // that have different dimensions. - Watermarks []*PresetWatermark `type:"list"` -} - -// String returns the string representation -func (s VideoParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VideoParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VideoParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VideoParameters"} - if s.Watermarks != nil { - for i, v := range s.Watermarks { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Watermarks", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAspectRatio sets the AspectRatio field's value. -func (s *VideoParameters) SetAspectRatio(v string) *VideoParameters { - s.AspectRatio = &v - return s -} - -// SetBitRate sets the BitRate field's value. -func (s *VideoParameters) SetBitRate(v string) *VideoParameters { - s.BitRate = &v - return s -} - -// SetCodec sets the Codec field's value. -func (s *VideoParameters) SetCodec(v string) *VideoParameters { - s.Codec = &v - return s -} - -// SetCodecOptions sets the CodecOptions field's value. -func (s *VideoParameters) SetCodecOptions(v map[string]*string) *VideoParameters { - s.CodecOptions = v - return s -} - -// SetDisplayAspectRatio sets the DisplayAspectRatio field's value. -func (s *VideoParameters) SetDisplayAspectRatio(v string) *VideoParameters { - s.DisplayAspectRatio = &v - return s -} - -// SetFixedGOP sets the FixedGOP field's value. -func (s *VideoParameters) SetFixedGOP(v string) *VideoParameters { - s.FixedGOP = &v - return s -} - -// SetFrameRate sets the FrameRate field's value. -func (s *VideoParameters) SetFrameRate(v string) *VideoParameters { - s.FrameRate = &v - return s -} - -// SetKeyframesMaxDist sets the KeyframesMaxDist field's value. -func (s *VideoParameters) SetKeyframesMaxDist(v string) *VideoParameters { - s.KeyframesMaxDist = &v - return s -} - -// SetMaxFrameRate sets the MaxFrameRate field's value. -func (s *VideoParameters) SetMaxFrameRate(v string) *VideoParameters { - s.MaxFrameRate = &v - return s -} - -// SetMaxHeight sets the MaxHeight field's value. -func (s *VideoParameters) SetMaxHeight(v string) *VideoParameters { - s.MaxHeight = &v - return s -} - -// SetMaxWidth sets the MaxWidth field's value. -func (s *VideoParameters) SetMaxWidth(v string) *VideoParameters { - s.MaxWidth = &v - return s -} - -// SetPaddingPolicy sets the PaddingPolicy field's value. -func (s *VideoParameters) SetPaddingPolicy(v string) *VideoParameters { - s.PaddingPolicy = &v - return s -} - -// SetResolution sets the Resolution field's value. -func (s *VideoParameters) SetResolution(v string) *VideoParameters { - s.Resolution = &v - return s -} - -// SetSizingPolicy sets the SizingPolicy field's value. -func (s *VideoParameters) SetSizingPolicy(v string) *VideoParameters { - s.SizingPolicy = &v - return s -} - -// SetWatermarks sets the Watermarks field's value. -func (s *VideoParameters) SetWatermarks(v []*PresetWatermark) *VideoParameters { - s.Watermarks = v - return s -} - -// Elastic Transcoder returns a warning if the resources used by your pipeline -// are not in the same region as the pipeline. -// -// Using resources in the same region, such as your Amazon S3 buckets, Amazon -// SNS notification topics, and AWS KMS key, reduces processing time and prevents -// cross-regional charges. -type Warning struct { - _ struct{} `type:"structure"` - - // The code of the cross-regional warning. - Code *string `type:"string"` - - // The message explaining what resources are in a different region from the - // pipeline. - // - // AWS KMS keys must be in the same region as the pipeline. - Message *string `type:"string"` -} - -// String returns the string representation -func (s Warning) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Warning) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *Warning) SetCode(v string) *Warning { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *Warning) SetMessage(v string) *Warning { - s.Message = &v - return s -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/doc.go deleted file mode 100644 index 436dd5827..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/doc.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package elastictranscoder provides the client and types for making API -// requests to Amazon Elastic Transcoder. -// -// The AWS Elastic Transcoder Service. -// -// See elastictranscoder package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elastictranscoder/ -// -// Using the Client -// -// To contact Amazon Elastic Transcoder with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Elastic Transcoder client ElasticTranscoder for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elastictranscoder/#New -package elastictranscoder diff --git a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/errors.go deleted file mode 100644 index 7c670785c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/errors.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elastictranscoder - -const ( - - // ErrCodeAccessDeniedException for service response error code - // "AccessDeniedException". - // - // General authentication failure. The request was not signed correctly. - ErrCodeAccessDeniedException = "AccessDeniedException" - - // ErrCodeIncompatibleVersionException for service response error code - // "IncompatibleVersionException". - ErrCodeIncompatibleVersionException = "IncompatibleVersionException" - - // ErrCodeInternalServiceException for service response error code - // "InternalServiceException". - // - // Elastic Transcoder encountered an unexpected exception while trying to fulfill - // the request. - ErrCodeInternalServiceException = "InternalServiceException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // Too many operations for a given AWS account. For example, the number of pipelines - // exceeds the maximum allowed. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUseException". - // - // The resource you are attempting to change is in use. For example, you are - // attempting to delete a pipeline that is currently in use. - ErrCodeResourceInUseException = "ResourceInUseException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The requested resource does not exist or is not available. For example, the - // pipeline to which you're trying to add a job doesn't exist or is still being - // created. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeValidationException for service response error code - // "ValidationException". - // - // One or more required parameter values were not provided in the request. - ErrCodeValidationException = "ValidationException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/service.go b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/service.go deleted file mode 100644 index 30acb8d1b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elastictranscoder - -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" -) - -// ElasticTranscoder provides the API operation methods for making requests to -// Amazon Elastic Transcoder. See this package's package overview docs -// for details on the service. -// -// ElasticTranscoder methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ElasticTranscoder 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 = "elastictranscoder" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Elastic Transcoder" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ElasticTranscoder client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a ElasticTranscoder client from just a session. -// svc := elastictranscoder.New(mySession) -// -// // Create a ElasticTranscoder client with additional configuration -// svc := elastictranscoder.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ElasticTranscoder { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ElasticTranscoder { - svc := &ElasticTranscoder{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2012-09-25", - }, - 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 ElasticTranscoder operation and runs any -// custom request initialization. -func (c *ElasticTranscoder) 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/elastictranscoder/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/waiters.go deleted file mode 100644 index a482fa797..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/waiters.go +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elastictranscoder - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilJobComplete uses the Amazon Elastic Transcoder API operation -// ReadJob to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ElasticTranscoder) WaitUntilJobComplete(input *ReadJobInput) error { - return c.WaitUntilJobCompleteWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilJobCompleteWithContext is an extended version of WaitUntilJobComplete. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ElasticTranscoder) WaitUntilJobCompleteWithContext(ctx aws.Context, input *ReadJobInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilJobComplete", - MaxAttempts: 120, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Job.Status", - Expected: "Complete", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Job.Status", - Expected: "Canceled", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Job.Status", - Expected: "Error", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *ReadJobInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ReadJobRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go deleted file mode 100644 index c1028cae5..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go +++ /dev/null @@ -1,6496 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elb - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/query" -) - -const opAddTags = "AddTags" - -// AddTagsRequest generates a "aws/request.Request" representing the -// client's request for the AddTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTags for more information on using the AddTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsRequest method. -// req, resp := client.AddTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AddTags -func (c *ELB) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) { - op := &request.Operation{ - Name: opAddTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsInput{} - } - - output = &AddTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTags API operation for Elastic Load Balancing. -// -// Adds the specified tags to the specified load balancer. Each load balancer -// can have a maximum of 10 tags. -// -// Each tag consists of a key and an optional value. If a tag with the same -// key is already associated with the load balancer, AddTags updates its value. -// -// For more information, see Tag Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/add-remove-tags.html) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation AddTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeTooManyTagsException "TooManyTags" -// The quota for the number of tags that can be assigned to a load balancer -// has been reached. -// -// * ErrCodeDuplicateTagKeysException "DuplicateTagKeys" -// A tag key was specified more than once. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AddTags -func (c *ELB) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - return out, req.Send() -} - -// AddTagsWithContext is the same as AddTags with the addition of -// the ability to pass a context and additional request options. -// -// See AddTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opApplySecurityGroupsToLoadBalancer = "ApplySecurityGroupsToLoadBalancer" - -// ApplySecurityGroupsToLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the ApplySecurityGroupsToLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ApplySecurityGroupsToLoadBalancer for more information on using the ApplySecurityGroupsToLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ApplySecurityGroupsToLoadBalancerRequest method. -// req, resp := client.ApplySecurityGroupsToLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ApplySecurityGroupsToLoadBalancer -func (c *ELB) ApplySecurityGroupsToLoadBalancerRequest(input *ApplySecurityGroupsToLoadBalancerInput) (req *request.Request, output *ApplySecurityGroupsToLoadBalancerOutput) { - op := &request.Operation{ - Name: opApplySecurityGroupsToLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ApplySecurityGroupsToLoadBalancerInput{} - } - - output = &ApplySecurityGroupsToLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// ApplySecurityGroupsToLoadBalancer API operation for Elastic Load Balancing. -// -// Associates one or more security groups with your load balancer in a virtual -// private cloud (VPC). The specified security groups override the previously -// associated security groups. -// -// For more information, see Security Groups for Load Balancers in a VPC (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-groups.html#elb-vpc-security-groups) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation ApplySecurityGroupsToLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// * ErrCodeInvalidSecurityGroupException "InvalidSecurityGroup" -// One or more of the specified security groups do not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ApplySecurityGroupsToLoadBalancer -func (c *ELB) ApplySecurityGroupsToLoadBalancer(input *ApplySecurityGroupsToLoadBalancerInput) (*ApplySecurityGroupsToLoadBalancerOutput, error) { - req, out := c.ApplySecurityGroupsToLoadBalancerRequest(input) - return out, req.Send() -} - -// ApplySecurityGroupsToLoadBalancerWithContext is the same as ApplySecurityGroupsToLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See ApplySecurityGroupsToLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) ApplySecurityGroupsToLoadBalancerWithContext(ctx aws.Context, input *ApplySecurityGroupsToLoadBalancerInput, opts ...request.Option) (*ApplySecurityGroupsToLoadBalancerOutput, error) { - req, out := c.ApplySecurityGroupsToLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachLoadBalancerToSubnets = "AttachLoadBalancerToSubnets" - -// AttachLoadBalancerToSubnetsRequest generates a "aws/request.Request" representing the -// client's request for the AttachLoadBalancerToSubnets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachLoadBalancerToSubnets for more information on using the AttachLoadBalancerToSubnets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachLoadBalancerToSubnetsRequest method. -// req, resp := client.AttachLoadBalancerToSubnetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AttachLoadBalancerToSubnets -func (c *ELB) AttachLoadBalancerToSubnetsRequest(input *AttachLoadBalancerToSubnetsInput) (req *request.Request, output *AttachLoadBalancerToSubnetsOutput) { - op := &request.Operation{ - Name: opAttachLoadBalancerToSubnets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachLoadBalancerToSubnetsInput{} - } - - output = &AttachLoadBalancerToSubnetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// AttachLoadBalancerToSubnets API operation for Elastic Load Balancing. -// -// Adds one or more subnets to the set of configured subnets for the specified -// load balancer. -// -// The load balancer evenly distributes requests across all registered subnets. -// For more information, see Add or Remove Subnets for Your Load Balancer in -// a VPC (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-manage-subnets.html) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation AttachLoadBalancerToSubnets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// * ErrCodeSubnetNotFoundException "SubnetNotFound" -// One or more of the specified subnets do not exist. -// -// * ErrCodeInvalidSubnetException "InvalidSubnet" -// The specified VPC has no associated Internet gateway. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AttachLoadBalancerToSubnets -func (c *ELB) AttachLoadBalancerToSubnets(input *AttachLoadBalancerToSubnetsInput) (*AttachLoadBalancerToSubnetsOutput, error) { - req, out := c.AttachLoadBalancerToSubnetsRequest(input) - return out, req.Send() -} - -// AttachLoadBalancerToSubnetsWithContext is the same as AttachLoadBalancerToSubnets with the addition of -// the ability to pass a context and additional request options. -// -// See AttachLoadBalancerToSubnets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) AttachLoadBalancerToSubnetsWithContext(ctx aws.Context, input *AttachLoadBalancerToSubnetsInput, opts ...request.Option) (*AttachLoadBalancerToSubnetsOutput, error) { - req, out := c.AttachLoadBalancerToSubnetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opConfigureHealthCheck = "ConfigureHealthCheck" - -// ConfigureHealthCheckRequest generates a "aws/request.Request" representing the -// client's request for the ConfigureHealthCheck operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ConfigureHealthCheck for more information on using the ConfigureHealthCheck -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ConfigureHealthCheckRequest method. -// req, resp := client.ConfigureHealthCheckRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ConfigureHealthCheck -func (c *ELB) ConfigureHealthCheckRequest(input *ConfigureHealthCheckInput) (req *request.Request, output *ConfigureHealthCheckOutput) { - op := &request.Operation{ - Name: opConfigureHealthCheck, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ConfigureHealthCheckInput{} - } - - output = &ConfigureHealthCheckOutput{} - req = c.newRequest(op, input, output) - return -} - -// ConfigureHealthCheck API operation for Elastic Load Balancing. -// -// Specifies the health check settings to use when evaluating the health state -// of your EC2 instances. -// -// For more information, see Configure Health Checks for Your Load Balancer -// (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-healthchecks.html) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation ConfigureHealthCheck for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ConfigureHealthCheck -func (c *ELB) ConfigureHealthCheck(input *ConfigureHealthCheckInput) (*ConfigureHealthCheckOutput, error) { - req, out := c.ConfigureHealthCheckRequest(input) - return out, req.Send() -} - -// ConfigureHealthCheckWithContext is the same as ConfigureHealthCheck with the addition of -// the ability to pass a context and additional request options. -// -// See ConfigureHealthCheck for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) ConfigureHealthCheckWithContext(ctx aws.Context, input *ConfigureHealthCheckInput, opts ...request.Option) (*ConfigureHealthCheckOutput, error) { - req, out := c.ConfigureHealthCheckRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAppCookieStickinessPolicy = "CreateAppCookieStickinessPolicy" - -// CreateAppCookieStickinessPolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreateAppCookieStickinessPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAppCookieStickinessPolicy for more information on using the CreateAppCookieStickinessPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAppCookieStickinessPolicyRequest method. -// req, resp := client.CreateAppCookieStickinessPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateAppCookieStickinessPolicy -func (c *ELB) CreateAppCookieStickinessPolicyRequest(input *CreateAppCookieStickinessPolicyInput) (req *request.Request, output *CreateAppCookieStickinessPolicyOutput) { - op := &request.Operation{ - Name: opCreateAppCookieStickinessPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAppCookieStickinessPolicyInput{} - } - - output = &CreateAppCookieStickinessPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateAppCookieStickinessPolicy API operation for Elastic Load Balancing. -// -// Generates a stickiness policy with sticky session lifetimes that follow that -// of an application-generated cookie. This policy can be associated only with -// HTTP/HTTPS listeners. -// -// This policy is similar to the policy created by CreateLBCookieStickinessPolicy, -// except that the lifetime of the special Elastic Load Balancing cookie, AWSELB, -// follows the lifetime of the application-generated cookie specified in the -// policy configuration. The load balancer only inserts a new stickiness cookie -// when the application response includes a new application cookie. -// -// If the application cookie is explicitly removed or expires, the session stops -// being sticky until a new application cookie is issued. -// -// For more information, see Application-Controlled Session Stickiness (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-application) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation CreateAppCookieStickinessPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeDuplicatePolicyNameException "DuplicatePolicyName" -// A policy with the specified name already exists for this load balancer. -// -// * ErrCodeTooManyPoliciesException "TooManyPolicies" -// The quota for the number of policies for this load balancer has been reached. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateAppCookieStickinessPolicy -func (c *ELB) CreateAppCookieStickinessPolicy(input *CreateAppCookieStickinessPolicyInput) (*CreateAppCookieStickinessPolicyOutput, error) { - req, out := c.CreateAppCookieStickinessPolicyRequest(input) - return out, req.Send() -} - -// CreateAppCookieStickinessPolicyWithContext is the same as CreateAppCookieStickinessPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAppCookieStickinessPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) CreateAppCookieStickinessPolicyWithContext(ctx aws.Context, input *CreateAppCookieStickinessPolicyInput, opts ...request.Option) (*CreateAppCookieStickinessPolicyOutput, error) { - req, out := c.CreateAppCookieStickinessPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLBCookieStickinessPolicy = "CreateLBCookieStickinessPolicy" - -// CreateLBCookieStickinessPolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreateLBCookieStickinessPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLBCookieStickinessPolicy for more information on using the CreateLBCookieStickinessPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLBCookieStickinessPolicyRequest method. -// req, resp := client.CreateLBCookieStickinessPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLBCookieStickinessPolicy -func (c *ELB) CreateLBCookieStickinessPolicyRequest(input *CreateLBCookieStickinessPolicyInput) (req *request.Request, output *CreateLBCookieStickinessPolicyOutput) { - op := &request.Operation{ - Name: opCreateLBCookieStickinessPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLBCookieStickinessPolicyInput{} - } - - output = &CreateLBCookieStickinessPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateLBCookieStickinessPolicy API operation for Elastic Load Balancing. -// -// Generates a stickiness policy with sticky session lifetimes controlled by -// the lifetime of the browser (user-agent) or a specified expiration period. -// This policy can be associated only with HTTP/HTTPS listeners. -// -// When a load balancer implements this policy, the load balancer uses a special -// cookie to track the instance for each request. When the load balancer receives -// a request, it first checks to see if this cookie is present in the request. -// If so, the load balancer sends the request to the application server specified -// in the cookie. If not, the load balancer sends the request to a server that -// is chosen based on the existing load-balancing algorithm. -// -// A cookie is inserted into the response for binding subsequent requests from -// the same user to that server. The validity of the cookie is based on the -// cookie expiration time, which is specified in the policy configuration. -// -// For more information, see Duration-Based Session Stickiness (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation CreateLBCookieStickinessPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeDuplicatePolicyNameException "DuplicatePolicyName" -// A policy with the specified name already exists for this load balancer. -// -// * ErrCodeTooManyPoliciesException "TooManyPolicies" -// The quota for the number of policies for this load balancer has been reached. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLBCookieStickinessPolicy -func (c *ELB) CreateLBCookieStickinessPolicy(input *CreateLBCookieStickinessPolicyInput) (*CreateLBCookieStickinessPolicyOutput, error) { - req, out := c.CreateLBCookieStickinessPolicyRequest(input) - return out, req.Send() -} - -// CreateLBCookieStickinessPolicyWithContext is the same as CreateLBCookieStickinessPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLBCookieStickinessPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) CreateLBCookieStickinessPolicyWithContext(ctx aws.Context, input *CreateLBCookieStickinessPolicyInput, opts ...request.Option) (*CreateLBCookieStickinessPolicyOutput, error) { - req, out := c.CreateLBCookieStickinessPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLoadBalancer = "CreateLoadBalancer" - -// CreateLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the CreateLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLoadBalancer for more information on using the CreateLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLoadBalancerRequest method. -// req, resp := client.CreateLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancer -func (c *ELB) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *request.Request, output *CreateLoadBalancerOutput) { - op := &request.Operation{ - Name: opCreateLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLoadBalancerInput{} - } - - output = &CreateLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLoadBalancer API operation for Elastic Load Balancing. -// -// Creates a Classic Load Balancer. -// -// You can add listeners, security groups, subnets, and tags when you create -// your load balancer, or you can add them later using CreateLoadBalancerListeners, -// ApplySecurityGroupsToLoadBalancer, AttachLoadBalancerToSubnets, and AddTags. -// -// To describe your current load balancers, see DescribeLoadBalancers. When -// you are finished with a load balancer, you can delete it using DeleteLoadBalancer. -// -// You can create up to 20 load balancers per region per account. You can request -// an increase for the number of load balancers for your account. For more information, -// see Limits for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-limits.html) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation CreateLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDuplicateAccessPointNameException "DuplicateLoadBalancerName" -// The specified load balancer name already exists for this account. -// -// * ErrCodeTooManyAccessPointsException "TooManyLoadBalancers" -// The quota for the number of load balancers has been reached. -// -// * ErrCodeCertificateNotFoundException "CertificateNotFound" -// The specified ARN does not refer to a valid SSL certificate in AWS Identity -// and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if -// you recently uploaded the certificate to IAM, this error might indicate that -// the certificate is not fully available yet. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// * ErrCodeSubnetNotFoundException "SubnetNotFound" -// One or more of the specified subnets do not exist. -// -// * ErrCodeInvalidSubnetException "InvalidSubnet" -// The specified VPC has no associated Internet gateway. -// -// * ErrCodeInvalidSecurityGroupException "InvalidSecurityGroup" -// One or more of the specified security groups do not exist. -// -// * ErrCodeInvalidSchemeException "InvalidScheme" -// The specified value for the schema is not valid. You can only specify a scheme -// for load balancers in a VPC. -// -// * ErrCodeTooManyTagsException "TooManyTags" -// The quota for the number of tags that can be assigned to a load balancer -// has been reached. -// -// * ErrCodeDuplicateTagKeysException "DuplicateTagKeys" -// A tag key was specified more than once. -// -// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol or signature version is not supported. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermitted" -// This operation is not allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancer -func (c *ELB) CreateLoadBalancer(input *CreateLoadBalancerInput) (*CreateLoadBalancerOutput, error) { - req, out := c.CreateLoadBalancerRequest(input) - return out, req.Send() -} - -// CreateLoadBalancerWithContext is the same as CreateLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) CreateLoadBalancerWithContext(ctx aws.Context, input *CreateLoadBalancerInput, opts ...request.Option) (*CreateLoadBalancerOutput, error) { - req, out := c.CreateLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLoadBalancerListeners = "CreateLoadBalancerListeners" - -// CreateLoadBalancerListenersRequest generates a "aws/request.Request" representing the -// client's request for the CreateLoadBalancerListeners operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLoadBalancerListeners for more information on using the CreateLoadBalancerListeners -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLoadBalancerListenersRequest method. -// req, resp := client.CreateLoadBalancerListenersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancerListeners -func (c *ELB) CreateLoadBalancerListenersRequest(input *CreateLoadBalancerListenersInput) (req *request.Request, output *CreateLoadBalancerListenersOutput) { - op := &request.Operation{ - Name: opCreateLoadBalancerListeners, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLoadBalancerListenersInput{} - } - - output = &CreateLoadBalancerListenersOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateLoadBalancerListeners API operation for Elastic Load Balancing. -// -// Creates one or more listeners for the specified load balancer. If a listener -// with the specified port does not already exist, it is created; otherwise, -// the properties of the new listener must match the properties of the existing -// listener. -// -// For more information, see Listeners for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation CreateLoadBalancerListeners for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeDuplicateListenerException "DuplicateListener" -// A listener already exists for the specified load balancer name and port, -// but with a different instance port, protocol, or SSL certificate. -// -// * ErrCodeCertificateNotFoundException "CertificateNotFound" -// The specified ARN does not refer to a valid SSL certificate in AWS Identity -// and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if -// you recently uploaded the certificate to IAM, this error might indicate that -// the certificate is not fully available yet. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol or signature version is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancerListeners -func (c *ELB) CreateLoadBalancerListeners(input *CreateLoadBalancerListenersInput) (*CreateLoadBalancerListenersOutput, error) { - req, out := c.CreateLoadBalancerListenersRequest(input) - return out, req.Send() -} - -// CreateLoadBalancerListenersWithContext is the same as CreateLoadBalancerListeners with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLoadBalancerListeners for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) CreateLoadBalancerListenersWithContext(ctx aws.Context, input *CreateLoadBalancerListenersInput, opts ...request.Option) (*CreateLoadBalancerListenersOutput, error) { - req, out := c.CreateLoadBalancerListenersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLoadBalancerPolicy = "CreateLoadBalancerPolicy" - -// CreateLoadBalancerPolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreateLoadBalancerPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLoadBalancerPolicy for more information on using the CreateLoadBalancerPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLoadBalancerPolicyRequest method. -// req, resp := client.CreateLoadBalancerPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancerPolicy -func (c *ELB) CreateLoadBalancerPolicyRequest(input *CreateLoadBalancerPolicyInput) (req *request.Request, output *CreateLoadBalancerPolicyOutput) { - op := &request.Operation{ - Name: opCreateLoadBalancerPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLoadBalancerPolicyInput{} - } - - output = &CreateLoadBalancerPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateLoadBalancerPolicy API operation for Elastic Load Balancing. -// -// Creates a policy with the specified attributes for the specified load balancer. -// -// Policies are settings that are saved for your load balancer and that can -// be applied to the listener or the application server, depending on the policy -// type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation CreateLoadBalancerPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodePolicyTypeNotFoundException "PolicyTypeNotFound" -// One or more of the specified policy types do not exist. -// -// * ErrCodeDuplicatePolicyNameException "DuplicatePolicyName" -// A policy with the specified name already exists for this load balancer. -// -// * ErrCodeTooManyPoliciesException "TooManyPolicies" -// The quota for the number of policies for this load balancer has been reached. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancerPolicy -func (c *ELB) CreateLoadBalancerPolicy(input *CreateLoadBalancerPolicyInput) (*CreateLoadBalancerPolicyOutput, error) { - req, out := c.CreateLoadBalancerPolicyRequest(input) - return out, req.Send() -} - -// CreateLoadBalancerPolicyWithContext is the same as CreateLoadBalancerPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLoadBalancerPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) CreateLoadBalancerPolicyWithContext(ctx aws.Context, input *CreateLoadBalancerPolicyInput, opts ...request.Option) (*CreateLoadBalancerPolicyOutput, error) { - req, out := c.CreateLoadBalancerPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLoadBalancer = "DeleteLoadBalancer" - -// DeleteLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLoadBalancer for more information on using the DeleteLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLoadBalancerRequest method. -// req, resp := client.DeleteLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancer -func (c *ELB) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req *request.Request, output *DeleteLoadBalancerOutput) { - op := &request.Operation{ - Name: opDeleteLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLoadBalancerInput{} - } - - output = &DeleteLoadBalancerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLoadBalancer API operation for Elastic Load Balancing. -// -// Deletes the specified load balancer. -// -// If you are attempting to recreate a load balancer, you must reconfigure all -// settings. The DNS name associated with a deleted load balancer are no longer -// usable. The name and associated DNS record of the deleted load balancer no -// longer exist and traffic sent to any of its IP addresses is no longer delivered -// to your instances. -// -// If the load balancer does not exist or has already been deleted, the call -// to DeleteLoadBalancer still succeeds. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DeleteLoadBalancer for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancer -func (c *ELB) DeleteLoadBalancer(input *DeleteLoadBalancerInput) (*DeleteLoadBalancerOutput, error) { - req, out := c.DeleteLoadBalancerRequest(input) - return out, req.Send() -} - -// DeleteLoadBalancerWithContext is the same as DeleteLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) DeleteLoadBalancerWithContext(ctx aws.Context, input *DeleteLoadBalancerInput, opts ...request.Option) (*DeleteLoadBalancerOutput, error) { - req, out := c.DeleteLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLoadBalancerListeners = "DeleteLoadBalancerListeners" - -// DeleteLoadBalancerListenersRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoadBalancerListeners operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLoadBalancerListeners for more information on using the DeleteLoadBalancerListeners -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLoadBalancerListenersRequest method. -// req, resp := client.DeleteLoadBalancerListenersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancerListeners -func (c *ELB) DeleteLoadBalancerListenersRequest(input *DeleteLoadBalancerListenersInput) (req *request.Request, output *DeleteLoadBalancerListenersOutput) { - op := &request.Operation{ - Name: opDeleteLoadBalancerListeners, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLoadBalancerListenersInput{} - } - - output = &DeleteLoadBalancerListenersOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLoadBalancerListeners API operation for Elastic Load Balancing. -// -// Deletes the specified listeners from the specified load balancer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DeleteLoadBalancerListeners for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancerListeners -func (c *ELB) DeleteLoadBalancerListeners(input *DeleteLoadBalancerListenersInput) (*DeleteLoadBalancerListenersOutput, error) { - req, out := c.DeleteLoadBalancerListenersRequest(input) - return out, req.Send() -} - -// DeleteLoadBalancerListenersWithContext is the same as DeleteLoadBalancerListeners with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLoadBalancerListeners for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) DeleteLoadBalancerListenersWithContext(ctx aws.Context, input *DeleteLoadBalancerListenersInput, opts ...request.Option) (*DeleteLoadBalancerListenersOutput, error) { - req, out := c.DeleteLoadBalancerListenersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLoadBalancerPolicy = "DeleteLoadBalancerPolicy" - -// DeleteLoadBalancerPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoadBalancerPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLoadBalancerPolicy for more information on using the DeleteLoadBalancerPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLoadBalancerPolicyRequest method. -// req, resp := client.DeleteLoadBalancerPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancerPolicy -func (c *ELB) DeleteLoadBalancerPolicyRequest(input *DeleteLoadBalancerPolicyInput) (req *request.Request, output *DeleteLoadBalancerPolicyOutput) { - op := &request.Operation{ - Name: opDeleteLoadBalancerPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLoadBalancerPolicyInput{} - } - - output = &DeleteLoadBalancerPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLoadBalancerPolicy API operation for Elastic Load Balancing. -// -// Deletes the specified policy from the specified load balancer. This policy -// must not be enabled for any listeners. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DeleteLoadBalancerPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancerPolicy -func (c *ELB) DeleteLoadBalancerPolicy(input *DeleteLoadBalancerPolicyInput) (*DeleteLoadBalancerPolicyOutput, error) { - req, out := c.DeleteLoadBalancerPolicyRequest(input) - return out, req.Send() -} - -// DeleteLoadBalancerPolicyWithContext is the same as DeleteLoadBalancerPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLoadBalancerPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) DeleteLoadBalancerPolicyWithContext(ctx aws.Context, input *DeleteLoadBalancerPolicyInput, opts ...request.Option) (*DeleteLoadBalancerPolicyOutput, error) { - req, out := c.DeleteLoadBalancerPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterInstancesFromLoadBalancer = "DeregisterInstancesFromLoadBalancer" - -// DeregisterInstancesFromLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterInstancesFromLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterInstancesFromLoadBalancer for more information on using the DeregisterInstancesFromLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterInstancesFromLoadBalancerRequest method. -// req, resp := client.DeregisterInstancesFromLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeregisterInstancesFromLoadBalancer -func (c *ELB) DeregisterInstancesFromLoadBalancerRequest(input *DeregisterInstancesFromLoadBalancerInput) (req *request.Request, output *DeregisterInstancesFromLoadBalancerOutput) { - op := &request.Operation{ - Name: opDeregisterInstancesFromLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterInstancesFromLoadBalancerInput{} - } - - output = &DeregisterInstancesFromLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeregisterInstancesFromLoadBalancer API operation for Elastic Load Balancing. -// -// Deregisters the specified instances from the specified load balancer. After -// the instance is deregistered, it no longer receives traffic from the load -// balancer. -// -// You can use DescribeLoadBalancers to verify that the instance is deregistered -// from the load balancer. -// -// For more information, see Register or De-Register EC2 Instances (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-deregister-register-instances.html) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DeregisterInstancesFromLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeInvalidEndPointException "InvalidInstance" -// The specified endpoint is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeregisterInstancesFromLoadBalancer -func (c *ELB) DeregisterInstancesFromLoadBalancer(input *DeregisterInstancesFromLoadBalancerInput) (*DeregisterInstancesFromLoadBalancerOutput, error) { - req, out := c.DeregisterInstancesFromLoadBalancerRequest(input) - return out, req.Send() -} - -// DeregisterInstancesFromLoadBalancerWithContext is the same as DeregisterInstancesFromLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterInstancesFromLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) DeregisterInstancesFromLoadBalancerWithContext(ctx aws.Context, input *DeregisterInstancesFromLoadBalancerInput, opts ...request.Option) (*DeregisterInstancesFromLoadBalancerOutput, error) { - req, out := c.DeregisterInstancesFromLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccountLimits = "DescribeAccountLimits" - -// DescribeAccountLimitsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountLimits operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccountLimits for more information on using the DescribeAccountLimits -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAccountLimitsRequest method. -// req, resp := client.DescribeAccountLimitsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeAccountLimits -func (c *ELB) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) (req *request.Request, output *DescribeAccountLimitsOutput) { - op := &request.Operation{ - Name: opDescribeAccountLimits, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAccountLimitsInput{} - } - - output = &DescribeAccountLimitsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccountLimits API operation for Elastic Load Balancing. -// -// Describes the current Elastic Load Balancing resource limits for your AWS -// account. -// -// For more information, see Limits for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-limits.html) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeAccountLimits for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeAccountLimits -func (c *ELB) DescribeAccountLimits(input *DescribeAccountLimitsInput) (*DescribeAccountLimitsOutput, error) { - req, out := c.DescribeAccountLimitsRequest(input) - return out, req.Send() -} - -// DescribeAccountLimitsWithContext is the same as DescribeAccountLimits with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountLimits for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) DescribeAccountLimitsWithContext(ctx aws.Context, input *DescribeAccountLimitsInput, opts ...request.Option) (*DescribeAccountLimitsOutput, error) { - req, out := c.DescribeAccountLimitsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInstanceHealth = "DescribeInstanceHealth" - -// DescribeInstanceHealthRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInstanceHealth operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInstanceHealth for more information on using the DescribeInstanceHealth -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInstanceHealthRequest method. -// req, resp := client.DescribeInstanceHealthRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeInstanceHealth -func (c *ELB) DescribeInstanceHealthRequest(input *DescribeInstanceHealthInput) (req *request.Request, output *DescribeInstanceHealthOutput) { - op := &request.Operation{ - Name: opDescribeInstanceHealth, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInstanceHealthInput{} - } - - output = &DescribeInstanceHealthOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInstanceHealth API operation for Elastic Load Balancing. -// -// Describes the state of the specified instances with respect to the specified -// load balancer. If no instances are specified, the call describes the state -// of all instances that are currently registered with the load balancer. If -// instances are specified, their state is returned even if they are no longer -// registered with the load balancer. The state of terminated instances is not -// returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeInstanceHealth for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeInvalidEndPointException "InvalidInstance" -// The specified endpoint is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeInstanceHealth -func (c *ELB) DescribeInstanceHealth(input *DescribeInstanceHealthInput) (*DescribeInstanceHealthOutput, error) { - req, out := c.DescribeInstanceHealthRequest(input) - return out, req.Send() -} - -// DescribeInstanceHealthWithContext is the same as DescribeInstanceHealth with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInstanceHealth for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) DescribeInstanceHealthWithContext(ctx aws.Context, input *DescribeInstanceHealthInput, opts ...request.Option) (*DescribeInstanceHealthOutput, error) { - req, out := c.DescribeInstanceHealthRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLoadBalancerAttributes = "DescribeLoadBalancerAttributes" - -// DescribeLoadBalancerAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBalancerAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLoadBalancerAttributes for more information on using the DescribeLoadBalancerAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLoadBalancerAttributesRequest method. -// req, resp := client.DescribeLoadBalancerAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerAttributes -func (c *ELB) DescribeLoadBalancerAttributesRequest(input *DescribeLoadBalancerAttributesInput) (req *request.Request, output *DescribeLoadBalancerAttributesOutput) { - op := &request.Operation{ - Name: opDescribeLoadBalancerAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLoadBalancerAttributesInput{} - } - - output = &DescribeLoadBalancerAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBalancerAttributes API operation for Elastic Load Balancing. -// -// Describes the attributes for the specified load balancer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeLoadBalancerAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeLoadBalancerAttributeNotFoundException "LoadBalancerAttributeNotFound" -// The specified load balancer attribute does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerAttributes -func (c *ELB) DescribeLoadBalancerAttributes(input *DescribeLoadBalancerAttributesInput) (*DescribeLoadBalancerAttributesOutput, error) { - req, out := c.DescribeLoadBalancerAttributesRequest(input) - return out, req.Send() -} - -// DescribeLoadBalancerAttributesWithContext is the same as DescribeLoadBalancerAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBalancerAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) DescribeLoadBalancerAttributesWithContext(ctx aws.Context, input *DescribeLoadBalancerAttributesInput, opts ...request.Option) (*DescribeLoadBalancerAttributesOutput, error) { - req, out := c.DescribeLoadBalancerAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLoadBalancerPolicies = "DescribeLoadBalancerPolicies" - -// DescribeLoadBalancerPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBalancerPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLoadBalancerPolicies for more information on using the DescribeLoadBalancerPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLoadBalancerPoliciesRequest method. -// req, resp := client.DescribeLoadBalancerPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerPolicies -func (c *ELB) DescribeLoadBalancerPoliciesRequest(input *DescribeLoadBalancerPoliciesInput) (req *request.Request, output *DescribeLoadBalancerPoliciesOutput) { - op := &request.Operation{ - Name: opDescribeLoadBalancerPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLoadBalancerPoliciesInput{} - } - - output = &DescribeLoadBalancerPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBalancerPolicies API operation for Elastic Load Balancing. -// -// Describes the specified policies. -// -// If you specify a load balancer name, the action returns the descriptions -// of all policies created for the load balancer. If you specify a policy name -// associated with your load balancer, the action returns the description of -// that policy. If you don't specify a load balancer name, the action returns -// descriptions of the specified sample policies, or descriptions of all sample -// policies. The names of the sample policies have the ELBSample- prefix. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeLoadBalancerPolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodePolicyNotFoundException "PolicyNotFound" -// One or more of the specified policies do not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerPolicies -func (c *ELB) DescribeLoadBalancerPolicies(input *DescribeLoadBalancerPoliciesInput) (*DescribeLoadBalancerPoliciesOutput, error) { - req, out := c.DescribeLoadBalancerPoliciesRequest(input) - return out, req.Send() -} - -// DescribeLoadBalancerPoliciesWithContext is the same as DescribeLoadBalancerPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBalancerPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) DescribeLoadBalancerPoliciesWithContext(ctx aws.Context, input *DescribeLoadBalancerPoliciesInput, opts ...request.Option) (*DescribeLoadBalancerPoliciesOutput, error) { - req, out := c.DescribeLoadBalancerPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLoadBalancerPolicyTypes = "DescribeLoadBalancerPolicyTypes" - -// DescribeLoadBalancerPolicyTypesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBalancerPolicyTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLoadBalancerPolicyTypes for more information on using the DescribeLoadBalancerPolicyTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLoadBalancerPolicyTypesRequest method. -// req, resp := client.DescribeLoadBalancerPolicyTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerPolicyTypes -func (c *ELB) DescribeLoadBalancerPolicyTypesRequest(input *DescribeLoadBalancerPolicyTypesInput) (req *request.Request, output *DescribeLoadBalancerPolicyTypesOutput) { - op := &request.Operation{ - Name: opDescribeLoadBalancerPolicyTypes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLoadBalancerPolicyTypesInput{} - } - - output = &DescribeLoadBalancerPolicyTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBalancerPolicyTypes API operation for Elastic Load Balancing. -// -// Describes the specified load balancer policy types or all load balancer policy -// types. -// -// The description of each type indicates how it can be used. For example, some -// policies can be used only with layer 7 listeners, some policies can be used -// only with layer 4 listeners, and some policies can be used only with your -// EC2 instances. -// -// You can use CreateLoadBalancerPolicy to create a policy configuration for -// any of these policy types. Then, depending on the policy type, use either -// SetLoadBalancerPoliciesOfListener or SetLoadBalancerPoliciesForBackendServer -// to set the policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeLoadBalancerPolicyTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodePolicyTypeNotFoundException "PolicyTypeNotFound" -// One or more of the specified policy types do not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerPolicyTypes -func (c *ELB) DescribeLoadBalancerPolicyTypes(input *DescribeLoadBalancerPolicyTypesInput) (*DescribeLoadBalancerPolicyTypesOutput, error) { - req, out := c.DescribeLoadBalancerPolicyTypesRequest(input) - return out, req.Send() -} - -// DescribeLoadBalancerPolicyTypesWithContext is the same as DescribeLoadBalancerPolicyTypes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBalancerPolicyTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) DescribeLoadBalancerPolicyTypesWithContext(ctx aws.Context, input *DescribeLoadBalancerPolicyTypesInput, opts ...request.Option) (*DescribeLoadBalancerPolicyTypesOutput, error) { - req, out := c.DescribeLoadBalancerPolicyTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLoadBalancers = "DescribeLoadBalancers" - -// DescribeLoadBalancersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBalancers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLoadBalancers for more information on using the DescribeLoadBalancers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLoadBalancersRequest method. -// req, resp := client.DescribeLoadBalancersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancers -func (c *ELB) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *request.Request, output *DescribeLoadBalancersOutput) { - op := &request.Operation{ - Name: opDescribeLoadBalancers, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeLoadBalancersInput{} - } - - output = &DescribeLoadBalancersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBalancers API operation for Elastic Load Balancing. -// -// Describes the specified the load balancers. If no load balancers are specified, -// the call describes all of your load balancers. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeLoadBalancers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeDependencyThrottleException "DependencyThrottle" -// A request made by Elastic Load Balancing to another service exceeds the maximum -// request rate permitted for your account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancers -func (c *ELB) DescribeLoadBalancers(input *DescribeLoadBalancersInput) (*DescribeLoadBalancersOutput, error) { - req, out := c.DescribeLoadBalancersRequest(input) - return out, req.Send() -} - -// DescribeLoadBalancersWithContext is the same as DescribeLoadBalancers with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBalancers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) DescribeLoadBalancersWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.Option) (*DescribeLoadBalancersOutput, error) { - req, out := c.DescribeLoadBalancersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeLoadBalancersPages iterates over the pages of a DescribeLoadBalancers operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeLoadBalancers 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 DescribeLoadBalancers operation. -// pageNum := 0 -// err := client.DescribeLoadBalancersPages(params, -// func(page *DescribeLoadBalancersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ELB) DescribeLoadBalancersPages(input *DescribeLoadBalancersInput, fn func(*DescribeLoadBalancersOutput, bool) bool) error { - return c.DescribeLoadBalancersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeLoadBalancersPagesWithContext same as DescribeLoadBalancersPages 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 *ELB) DescribeLoadBalancersPagesWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, fn func(*DescribeLoadBalancersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeLoadBalancersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLoadBalancersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeLoadBalancersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeTags = "DescribeTags" - -// DescribeTagsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTags for more information on using the DescribeTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTagsRequest method. -// req, resp := client.DescribeTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeTags -func (c *ELB) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { - op := &request.Operation{ - Name: opDescribeTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTagsInput{} - } - - output = &DescribeTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTags API operation for Elastic Load Balancing. -// -// Describes the tags associated with the specified load balancers. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeTags -func (c *ELB) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - return out, req.Send() -} - -// DescribeTagsWithContext is the same as DescribeTags with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachLoadBalancerFromSubnets = "DetachLoadBalancerFromSubnets" - -// DetachLoadBalancerFromSubnetsRequest generates a "aws/request.Request" representing the -// client's request for the DetachLoadBalancerFromSubnets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachLoadBalancerFromSubnets for more information on using the DetachLoadBalancerFromSubnets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachLoadBalancerFromSubnetsRequest method. -// req, resp := client.DetachLoadBalancerFromSubnetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DetachLoadBalancerFromSubnets -func (c *ELB) DetachLoadBalancerFromSubnetsRequest(input *DetachLoadBalancerFromSubnetsInput) (req *request.Request, output *DetachLoadBalancerFromSubnetsOutput) { - op := &request.Operation{ - Name: opDetachLoadBalancerFromSubnets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachLoadBalancerFromSubnetsInput{} - } - - output = &DetachLoadBalancerFromSubnetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DetachLoadBalancerFromSubnets API operation for Elastic Load Balancing. -// -// Removes the specified subnets from the set of configured subnets for the -// load balancer. -// -// After a subnet is removed, all EC2 instances registered with the load balancer -// in the removed subnet go into the OutOfService state. Then, the load balancer -// balances the traffic among the remaining routable subnets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DetachLoadBalancerFromSubnets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DetachLoadBalancerFromSubnets -func (c *ELB) DetachLoadBalancerFromSubnets(input *DetachLoadBalancerFromSubnetsInput) (*DetachLoadBalancerFromSubnetsOutput, error) { - req, out := c.DetachLoadBalancerFromSubnetsRequest(input) - return out, req.Send() -} - -// DetachLoadBalancerFromSubnetsWithContext is the same as DetachLoadBalancerFromSubnets with the addition of -// the ability to pass a context and additional request options. -// -// See DetachLoadBalancerFromSubnets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) DetachLoadBalancerFromSubnetsWithContext(ctx aws.Context, input *DetachLoadBalancerFromSubnetsInput, opts ...request.Option) (*DetachLoadBalancerFromSubnetsOutput, error) { - req, out := c.DetachLoadBalancerFromSubnetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableAvailabilityZonesForLoadBalancer = "DisableAvailabilityZonesForLoadBalancer" - -// DisableAvailabilityZonesForLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the DisableAvailabilityZonesForLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableAvailabilityZonesForLoadBalancer for more information on using the DisableAvailabilityZonesForLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableAvailabilityZonesForLoadBalancerRequest method. -// req, resp := client.DisableAvailabilityZonesForLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DisableAvailabilityZonesForLoadBalancer -func (c *ELB) DisableAvailabilityZonesForLoadBalancerRequest(input *DisableAvailabilityZonesForLoadBalancerInput) (req *request.Request, output *DisableAvailabilityZonesForLoadBalancerOutput) { - op := &request.Operation{ - Name: opDisableAvailabilityZonesForLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableAvailabilityZonesForLoadBalancerInput{} - } - - output = &DisableAvailabilityZonesForLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisableAvailabilityZonesForLoadBalancer API operation for Elastic Load Balancing. -// -// Removes the specified Availability Zones from the set of Availability Zones -// for the specified load balancer in EC2-Classic or a default VPC. -// -// For load balancers in a non-default VPC, use DetachLoadBalancerFromSubnets. -// -// There must be at least one Availability Zone registered with a load balancer -// at all times. After an Availability Zone is removed, all instances registered -// with the load balancer that are in the removed Availability Zone go into -// the OutOfService state. Then, the load balancer attempts to equally balance -// the traffic among its remaining Availability Zones. -// -// For more information, see Add or Remove Availability Zones (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-az.html) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DisableAvailabilityZonesForLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DisableAvailabilityZonesForLoadBalancer -func (c *ELB) DisableAvailabilityZonesForLoadBalancer(input *DisableAvailabilityZonesForLoadBalancerInput) (*DisableAvailabilityZonesForLoadBalancerOutput, error) { - req, out := c.DisableAvailabilityZonesForLoadBalancerRequest(input) - return out, req.Send() -} - -// DisableAvailabilityZonesForLoadBalancerWithContext is the same as DisableAvailabilityZonesForLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See DisableAvailabilityZonesForLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) DisableAvailabilityZonesForLoadBalancerWithContext(ctx aws.Context, input *DisableAvailabilityZonesForLoadBalancerInput, opts ...request.Option) (*DisableAvailabilityZonesForLoadBalancerOutput, error) { - req, out := c.DisableAvailabilityZonesForLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableAvailabilityZonesForLoadBalancer = "EnableAvailabilityZonesForLoadBalancer" - -// EnableAvailabilityZonesForLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the EnableAvailabilityZonesForLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableAvailabilityZonesForLoadBalancer for more information on using the EnableAvailabilityZonesForLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableAvailabilityZonesForLoadBalancerRequest method. -// req, resp := client.EnableAvailabilityZonesForLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/EnableAvailabilityZonesForLoadBalancer -func (c *ELB) EnableAvailabilityZonesForLoadBalancerRequest(input *EnableAvailabilityZonesForLoadBalancerInput) (req *request.Request, output *EnableAvailabilityZonesForLoadBalancerOutput) { - op := &request.Operation{ - Name: opEnableAvailabilityZonesForLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableAvailabilityZonesForLoadBalancerInput{} - } - - output = &EnableAvailabilityZonesForLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// EnableAvailabilityZonesForLoadBalancer API operation for Elastic Load Balancing. -// -// Adds the specified Availability Zones to the set of Availability Zones for -// the specified load balancer in EC2-Classic or a default VPC. -// -// For load balancers in a non-default VPC, use AttachLoadBalancerToSubnets. -// -// The load balancer evenly distributes requests across all its registered Availability -// Zones that contain instances. For more information, see Add or Remove Availability -// Zones (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-az.html) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation EnableAvailabilityZonesForLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/EnableAvailabilityZonesForLoadBalancer -func (c *ELB) EnableAvailabilityZonesForLoadBalancer(input *EnableAvailabilityZonesForLoadBalancerInput) (*EnableAvailabilityZonesForLoadBalancerOutput, error) { - req, out := c.EnableAvailabilityZonesForLoadBalancerRequest(input) - return out, req.Send() -} - -// EnableAvailabilityZonesForLoadBalancerWithContext is the same as EnableAvailabilityZonesForLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See EnableAvailabilityZonesForLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) EnableAvailabilityZonesForLoadBalancerWithContext(ctx aws.Context, input *EnableAvailabilityZonesForLoadBalancerInput, opts ...request.Option) (*EnableAvailabilityZonesForLoadBalancerOutput, error) { - req, out := c.EnableAvailabilityZonesForLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyLoadBalancerAttributes = "ModifyLoadBalancerAttributes" - -// ModifyLoadBalancerAttributesRequest generates a "aws/request.Request" representing the -// client's request for the ModifyLoadBalancerAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyLoadBalancerAttributes for more information on using the ModifyLoadBalancerAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyLoadBalancerAttributesRequest method. -// req, resp := client.ModifyLoadBalancerAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ModifyLoadBalancerAttributes -func (c *ELB) ModifyLoadBalancerAttributesRequest(input *ModifyLoadBalancerAttributesInput) (req *request.Request, output *ModifyLoadBalancerAttributesOutput) { - op := &request.Operation{ - Name: opModifyLoadBalancerAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyLoadBalancerAttributesInput{} - } - - output = &ModifyLoadBalancerAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyLoadBalancerAttributes API operation for Elastic Load Balancing. -// -// Modifies the attributes of the specified load balancer. -// -// You can modify the load balancer attributes, such as AccessLogs, ConnectionDraining, -// and CrossZoneLoadBalancing by either enabling or disabling them. Or, you -// can modify the load balancer attribute ConnectionSettings by specifying an -// idle connection timeout value for your load balancer. -// -// For more information, see the following in the Classic Load Balancers Guide: -// -// * Cross-Zone Load Balancing (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-crosszone-lb.html) -// -// * Connection Draining (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html) -// -// * Access Logs (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/access-log-collection.html) -// -// * Idle Connection Timeout (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation ModifyLoadBalancerAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeLoadBalancerAttributeNotFoundException "LoadBalancerAttributeNotFound" -// The specified load balancer attribute does not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ModifyLoadBalancerAttributes -func (c *ELB) ModifyLoadBalancerAttributes(input *ModifyLoadBalancerAttributesInput) (*ModifyLoadBalancerAttributesOutput, error) { - req, out := c.ModifyLoadBalancerAttributesRequest(input) - return out, req.Send() -} - -// ModifyLoadBalancerAttributesWithContext is the same as ModifyLoadBalancerAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyLoadBalancerAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) ModifyLoadBalancerAttributesWithContext(ctx aws.Context, input *ModifyLoadBalancerAttributesInput, opts ...request.Option) (*ModifyLoadBalancerAttributesOutput, error) { - req, out := c.ModifyLoadBalancerAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterInstancesWithLoadBalancer = "RegisterInstancesWithLoadBalancer" - -// RegisterInstancesWithLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the RegisterInstancesWithLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterInstancesWithLoadBalancer for more information on using the RegisterInstancesWithLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterInstancesWithLoadBalancerRequest method. -// req, resp := client.RegisterInstancesWithLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/RegisterInstancesWithLoadBalancer -func (c *ELB) RegisterInstancesWithLoadBalancerRequest(input *RegisterInstancesWithLoadBalancerInput) (req *request.Request, output *RegisterInstancesWithLoadBalancerOutput) { - op := &request.Operation{ - Name: opRegisterInstancesWithLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterInstancesWithLoadBalancerInput{} - } - - output = &RegisterInstancesWithLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterInstancesWithLoadBalancer API operation for Elastic Load Balancing. -// -// Adds the specified instances to the specified load balancer. -// -// The instance must be a running instance in the same network as the load balancer -// (EC2-Classic or the same VPC). If you have EC2-Classic instances and a load -// balancer in a VPC with ClassicLink enabled, you can link the EC2-Classic -// instances to that VPC and then register the linked EC2-Classic instances -// with the load balancer in the VPC. -// -// Note that RegisterInstanceWithLoadBalancer completes when the request has -// been registered. Instance registration takes a little time to complete. To -// check the state of the registered instances, use DescribeLoadBalancers or -// DescribeInstanceHealth. -// -// After the instance is registered, it starts receiving traffic and requests -// from the load balancer. Any instance that is not in one of the Availability -// Zones registered for the load balancer is moved to the OutOfService state. -// If an Availability Zone is added to the load balancer later, any instances -// registered with the load balancer move to the InService state. -// -// To deregister instances from a load balancer, use DeregisterInstancesFromLoadBalancer. -// -// For more information, see Register or De-Register EC2 Instances (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-deregister-register-instances.html) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation RegisterInstancesWithLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeInvalidEndPointException "InvalidInstance" -// The specified endpoint is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/RegisterInstancesWithLoadBalancer -func (c *ELB) RegisterInstancesWithLoadBalancer(input *RegisterInstancesWithLoadBalancerInput) (*RegisterInstancesWithLoadBalancerOutput, error) { - req, out := c.RegisterInstancesWithLoadBalancerRequest(input) - return out, req.Send() -} - -// RegisterInstancesWithLoadBalancerWithContext is the same as RegisterInstancesWithLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterInstancesWithLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) RegisterInstancesWithLoadBalancerWithContext(ctx aws.Context, input *RegisterInstancesWithLoadBalancerInput, opts ...request.Option) (*RegisterInstancesWithLoadBalancerOutput, error) { - req, out := c.RegisterInstancesWithLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTags = "RemoveTags" - -// RemoveTagsRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTags for more information on using the RemoveTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsRequest method. -// req, resp := client.RemoveTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/RemoveTags -func (c *ELB) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) { - op := &request.Operation{ - Name: opRemoveTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsInput{} - } - - output = &RemoveTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTags API operation for Elastic Load Balancing. -// -// Removes one or more tags from the specified load balancer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation RemoveTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/RemoveTags -func (c *ELB) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - return out, req.Send() -} - -// RemoveTagsWithContext is the same as RemoveTags with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetLoadBalancerListenerSSLCertificate = "SetLoadBalancerListenerSSLCertificate" - -// SetLoadBalancerListenerSSLCertificateRequest generates a "aws/request.Request" representing the -// client's request for the SetLoadBalancerListenerSSLCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetLoadBalancerListenerSSLCertificate for more information on using the SetLoadBalancerListenerSSLCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetLoadBalancerListenerSSLCertificateRequest method. -// req, resp := client.SetLoadBalancerListenerSSLCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerListenerSSLCertificate -func (c *ELB) SetLoadBalancerListenerSSLCertificateRequest(input *SetLoadBalancerListenerSSLCertificateInput) (req *request.Request, output *SetLoadBalancerListenerSSLCertificateOutput) { - op := &request.Operation{ - Name: opSetLoadBalancerListenerSSLCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetLoadBalancerListenerSSLCertificateInput{} - } - - output = &SetLoadBalancerListenerSSLCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetLoadBalancerListenerSSLCertificate API operation for Elastic Load Balancing. -// -// Sets the certificate that terminates the specified listener's SSL connections. -// The specified certificate replaces any prior certificate that was used on -// the same load balancer and port. -// -// For more information about updating your SSL certificate, see Replace the -// SSL Certificate for Your Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-update-ssl-cert.html) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation SetLoadBalancerListenerSSLCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCertificateNotFoundException "CertificateNotFound" -// The specified ARN does not refer to a valid SSL certificate in AWS Identity -// and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if -// you recently uploaded the certificate to IAM, this error might indicate that -// the certificate is not fully available yet. -// -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeListenerNotFoundException "ListenerNotFound" -// The load balancer does not have a listener configured at the specified port. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol or signature version is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerListenerSSLCertificate -func (c *ELB) SetLoadBalancerListenerSSLCertificate(input *SetLoadBalancerListenerSSLCertificateInput) (*SetLoadBalancerListenerSSLCertificateOutput, error) { - req, out := c.SetLoadBalancerListenerSSLCertificateRequest(input) - return out, req.Send() -} - -// SetLoadBalancerListenerSSLCertificateWithContext is the same as SetLoadBalancerListenerSSLCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See SetLoadBalancerListenerSSLCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) SetLoadBalancerListenerSSLCertificateWithContext(ctx aws.Context, input *SetLoadBalancerListenerSSLCertificateInput, opts ...request.Option) (*SetLoadBalancerListenerSSLCertificateOutput, error) { - req, out := c.SetLoadBalancerListenerSSLCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetLoadBalancerPoliciesForBackendServer = "SetLoadBalancerPoliciesForBackendServer" - -// SetLoadBalancerPoliciesForBackendServerRequest generates a "aws/request.Request" representing the -// client's request for the SetLoadBalancerPoliciesForBackendServer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetLoadBalancerPoliciesForBackendServer for more information on using the SetLoadBalancerPoliciesForBackendServer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetLoadBalancerPoliciesForBackendServerRequest method. -// req, resp := client.SetLoadBalancerPoliciesForBackendServerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerPoliciesForBackendServer -func (c *ELB) SetLoadBalancerPoliciesForBackendServerRequest(input *SetLoadBalancerPoliciesForBackendServerInput) (req *request.Request, output *SetLoadBalancerPoliciesForBackendServerOutput) { - op := &request.Operation{ - Name: opSetLoadBalancerPoliciesForBackendServer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetLoadBalancerPoliciesForBackendServerInput{} - } - - output = &SetLoadBalancerPoliciesForBackendServerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetLoadBalancerPoliciesForBackendServer API operation for Elastic Load Balancing. -// -// Replaces the set of policies associated with the specified port on which -// the EC2 instance is listening with a new set of policies. At this time, only -// the back-end server authentication policy type can be applied to the instance -// ports; this policy type is composed of multiple public key policies. -// -// Each time you use SetLoadBalancerPoliciesForBackendServer to enable the policies, -// use the PolicyNames parameter to list the policies that you want to enable. -// -// You can use DescribeLoadBalancers or DescribeLoadBalancerPolicies to verify -// that the policy is associated with the EC2 instance. -// -// For more information about enabling back-end instance authentication, see -// Configure Back-end Instance Authentication (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-create-https-ssl-load-balancer.html#configure_backendauth_clt) -// in the Classic Load Balancers Guide. For more information about Proxy Protocol, -// see Configure Proxy Protocol Support (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation SetLoadBalancerPoliciesForBackendServer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodePolicyNotFoundException "PolicyNotFound" -// One or more of the specified policies do not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerPoliciesForBackendServer -func (c *ELB) SetLoadBalancerPoliciesForBackendServer(input *SetLoadBalancerPoliciesForBackendServerInput) (*SetLoadBalancerPoliciesForBackendServerOutput, error) { - req, out := c.SetLoadBalancerPoliciesForBackendServerRequest(input) - return out, req.Send() -} - -// SetLoadBalancerPoliciesForBackendServerWithContext is the same as SetLoadBalancerPoliciesForBackendServer with the addition of -// the ability to pass a context and additional request options. -// -// See SetLoadBalancerPoliciesForBackendServer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) SetLoadBalancerPoliciesForBackendServerWithContext(ctx aws.Context, input *SetLoadBalancerPoliciesForBackendServerInput, opts ...request.Option) (*SetLoadBalancerPoliciesForBackendServerOutput, error) { - req, out := c.SetLoadBalancerPoliciesForBackendServerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetLoadBalancerPoliciesOfListener = "SetLoadBalancerPoliciesOfListener" - -// SetLoadBalancerPoliciesOfListenerRequest generates a "aws/request.Request" representing the -// client's request for the SetLoadBalancerPoliciesOfListener operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetLoadBalancerPoliciesOfListener for more information on using the SetLoadBalancerPoliciesOfListener -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetLoadBalancerPoliciesOfListenerRequest method. -// req, resp := client.SetLoadBalancerPoliciesOfListenerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerPoliciesOfListener -func (c *ELB) SetLoadBalancerPoliciesOfListenerRequest(input *SetLoadBalancerPoliciesOfListenerInput) (req *request.Request, output *SetLoadBalancerPoliciesOfListenerOutput) { - op := &request.Operation{ - Name: opSetLoadBalancerPoliciesOfListener, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetLoadBalancerPoliciesOfListenerInput{} - } - - output = &SetLoadBalancerPoliciesOfListenerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetLoadBalancerPoliciesOfListener API operation for Elastic Load Balancing. -// -// Replaces the current set of policies for the specified load balancer port -// with the specified set of policies. -// -// To enable back-end server authentication, use SetLoadBalancerPoliciesForBackendServer. -// -// For more information about setting policies, see Update the SSL Negotiation -// Configuration (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/ssl-config-update.html), -// Duration-Based Session Stickiness (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration), -// and Application-Controlled Session Stickiness (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-application) -// in the Classic Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation SetLoadBalancerPoliciesOfListener for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodePolicyNotFoundException "PolicyNotFound" -// One or more of the specified policies do not exist. -// -// * ErrCodeListenerNotFoundException "ListenerNotFound" -// The load balancer does not have a listener configured at the specified port. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerPoliciesOfListener -func (c *ELB) SetLoadBalancerPoliciesOfListener(input *SetLoadBalancerPoliciesOfListenerInput) (*SetLoadBalancerPoliciesOfListenerOutput, error) { - req, out := c.SetLoadBalancerPoliciesOfListenerRequest(input) - return out, req.Send() -} - -// SetLoadBalancerPoliciesOfListenerWithContext is the same as SetLoadBalancerPoliciesOfListener with the addition of -// the ability to pass a context and additional request options. -// -// See SetLoadBalancerPoliciesOfListener for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) SetLoadBalancerPoliciesOfListenerWithContext(ctx aws.Context, input *SetLoadBalancerPoliciesOfListenerInput, opts ...request.Option) (*SetLoadBalancerPoliciesOfListenerOutput, error) { - req, out := c.SetLoadBalancerPoliciesOfListenerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Information about the AccessLog attribute. -type AccessLog struct { - _ struct{} `type:"structure"` - - // The interval for publishing the access logs. You can specify an interval - // of either 5 minutes or 60 minutes. - // - // Default: 60 minutes - EmitInterval *int64 `type:"integer"` - - // Specifies whether access logs are enabled for the load balancer. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // The name of the Amazon S3 bucket where the access logs are stored. - S3BucketName *string `type:"string"` - - // The logical hierarchy you created for your Amazon S3 bucket, for example - // my-bucket-prefix/prod. If the prefix is not provided, the log is placed at - // the root level of the bucket. - S3BucketPrefix *string `type:"string"` -} - -// String returns the string representation -func (s AccessLog) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccessLog) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AccessLog) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AccessLog"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEmitInterval sets the EmitInterval field's value. -func (s *AccessLog) SetEmitInterval(v int64) *AccessLog { - s.EmitInterval = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *AccessLog) SetEnabled(v bool) *AccessLog { - s.Enabled = &v - return s -} - -// SetS3BucketName sets the S3BucketName field's value. -func (s *AccessLog) SetS3BucketName(v string) *AccessLog { - s.S3BucketName = &v - return s -} - -// SetS3BucketPrefix sets the S3BucketPrefix field's value. -func (s *AccessLog) SetS3BucketPrefix(v string) *AccessLog { - s.S3BucketPrefix = &v - return s -} - -// Contains the parameters for AddTags. -type AddTagsInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. You can specify one load balancer only. - // - // LoadBalancerNames is a required field - LoadBalancerNames []*string `type:"list" required:"true"` - - // The tags. - // - // Tags is a required field - Tags []*Tag `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"} - if s.LoadBalancerNames == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerNames sets the LoadBalancerNames field's value. -func (s *AddTagsInput) SetLoadBalancerNames(v []*string) *AddTagsInput { - s.LoadBalancerNames = v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsInput) SetTags(v []*Tag) *AddTagsInput { - s.Tags = v - return s -} - -// Contains the output of AddTags. -type AddTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsOutput) GoString() string { - return s.String() -} - -// This data type is reserved. -type AdditionalAttribute struct { - _ struct{} `type:"structure"` - - // This parameter is reserved. - Key *string `type:"string"` - - // This parameter is reserved. - Value *string `type:"string"` -} - -// String returns the string representation -func (s AdditionalAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AdditionalAttribute) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *AdditionalAttribute) SetKey(v string) *AdditionalAttribute { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *AdditionalAttribute) SetValue(v string) *AdditionalAttribute { - s.Value = &v - return s -} - -// Information about a policy for application-controlled session stickiness. -type AppCookieStickinessPolicy struct { - _ struct{} `type:"structure"` - - // The name of the application cookie used for stickiness. - CookieName *string `type:"string"` - - // The mnemonic name for the policy being created. The name must be unique within - // a set of policies for this load balancer. - PolicyName *string `type:"string"` -} - -// String returns the string representation -func (s AppCookieStickinessPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AppCookieStickinessPolicy) GoString() string { - return s.String() -} - -// SetCookieName sets the CookieName field's value. -func (s *AppCookieStickinessPolicy) SetCookieName(v string) *AppCookieStickinessPolicy { - s.CookieName = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *AppCookieStickinessPolicy) SetPolicyName(v string) *AppCookieStickinessPolicy { - s.PolicyName = &v - return s -} - -// Contains the parameters for ApplySecurityGroupsToLoadBalancer. -type ApplySecurityGroupsToLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The IDs of the security groups to associate with the load balancer. Note - // that you cannot specify the name of the security group. - // - // SecurityGroups is a required field - SecurityGroups []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s ApplySecurityGroupsToLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplySecurityGroupsToLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ApplySecurityGroupsToLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ApplySecurityGroupsToLoadBalancerInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.SecurityGroups == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityGroups")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *ApplySecurityGroupsToLoadBalancerInput) SetLoadBalancerName(v string) *ApplySecurityGroupsToLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *ApplySecurityGroupsToLoadBalancerInput) SetSecurityGroups(v []*string) *ApplySecurityGroupsToLoadBalancerInput { - s.SecurityGroups = v - return s -} - -// Contains the output of ApplySecurityGroupsToLoadBalancer. -type ApplySecurityGroupsToLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // The IDs of the security groups associated with the load balancer. - SecurityGroups []*string `type:"list"` -} - -// String returns the string representation -func (s ApplySecurityGroupsToLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplySecurityGroupsToLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *ApplySecurityGroupsToLoadBalancerOutput) SetSecurityGroups(v []*string) *ApplySecurityGroupsToLoadBalancerOutput { - s.SecurityGroups = v - return s -} - -// Contains the parameters for AttachLoaBalancerToSubnets. -type AttachLoadBalancerToSubnetsInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The IDs of the subnets to add. You can add only one subnet per Availability - // Zone. - // - // Subnets is a required field - Subnets []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s AttachLoadBalancerToSubnetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachLoadBalancerToSubnetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachLoadBalancerToSubnetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancerToSubnetsInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.Subnets == nil { - invalidParams.Add(request.NewErrParamRequired("Subnets")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *AttachLoadBalancerToSubnetsInput) SetLoadBalancerName(v string) *AttachLoadBalancerToSubnetsInput { - s.LoadBalancerName = &v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *AttachLoadBalancerToSubnetsInput) SetSubnets(v []*string) *AttachLoadBalancerToSubnetsInput { - s.Subnets = v - return s -} - -// Contains the output of AttachLoadBalancerToSubnets. -type AttachLoadBalancerToSubnetsOutput struct { - _ struct{} `type:"structure"` - - // The IDs of the subnets attached to the load balancer. - Subnets []*string `type:"list"` -} - -// String returns the string representation -func (s AttachLoadBalancerToSubnetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachLoadBalancerToSubnetsOutput) GoString() string { - return s.String() -} - -// SetSubnets sets the Subnets field's value. -func (s *AttachLoadBalancerToSubnetsOutput) SetSubnets(v []*string) *AttachLoadBalancerToSubnetsOutput { - s.Subnets = v - return s -} - -// Information about the configuration of an EC2 instance. -type BackendServerDescription struct { - _ struct{} `type:"structure"` - - // The port on which the EC2 instance is listening. - InstancePort *int64 `min:"1" type:"integer"` - - // The names of the policies enabled for the EC2 instance. - PolicyNames []*string `type:"list"` -} - -// String returns the string representation -func (s BackendServerDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BackendServerDescription) GoString() string { - return s.String() -} - -// SetInstancePort sets the InstancePort field's value. -func (s *BackendServerDescription) SetInstancePort(v int64) *BackendServerDescription { - s.InstancePort = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *BackendServerDescription) SetPolicyNames(v []*string) *BackendServerDescription { - s.PolicyNames = v - return s -} - -// Contains the parameters for ConfigureHealthCheck. -type ConfigureHealthCheckInput struct { - _ struct{} `type:"structure"` - - // The configuration information. - // - // HealthCheck is a required field - HealthCheck *HealthCheck `type:"structure" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ConfigureHealthCheckInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigureHealthCheckInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfigureHealthCheckInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfigureHealthCheckInput"} - if s.HealthCheck == nil { - invalidParams.Add(request.NewErrParamRequired("HealthCheck")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.HealthCheck != nil { - if err := s.HealthCheck.Validate(); err != nil { - invalidParams.AddNested("HealthCheck", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthCheck sets the HealthCheck field's value. -func (s *ConfigureHealthCheckInput) SetHealthCheck(v *HealthCheck) *ConfigureHealthCheckInput { - s.HealthCheck = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *ConfigureHealthCheckInput) SetLoadBalancerName(v string) *ConfigureHealthCheckInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output of ConfigureHealthCheck. -type ConfigureHealthCheckOutput struct { - _ struct{} `type:"structure"` - - // The updated health check. - HealthCheck *HealthCheck `type:"structure"` -} - -// String returns the string representation -func (s ConfigureHealthCheckOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigureHealthCheckOutput) GoString() string { - return s.String() -} - -// SetHealthCheck sets the HealthCheck field's value. -func (s *ConfigureHealthCheckOutput) SetHealthCheck(v *HealthCheck) *ConfigureHealthCheckOutput { - s.HealthCheck = v - return s -} - -// Information about the ConnectionDraining attribute. -type ConnectionDraining struct { - _ struct{} `type:"structure"` - - // Specifies whether connection draining is enabled for the load balancer. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // The maximum time, in seconds, to keep the existing connections open before - // deregistering the instances. - Timeout *int64 `type:"integer"` -} - -// String returns the string representation -func (s ConnectionDraining) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConnectionDraining) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConnectionDraining) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConnectionDraining"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *ConnectionDraining) SetEnabled(v bool) *ConnectionDraining { - s.Enabled = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *ConnectionDraining) SetTimeout(v int64) *ConnectionDraining { - s.Timeout = &v - return s -} - -// Information about the ConnectionSettings attribute. -type ConnectionSettings struct { - _ struct{} `type:"structure"` - - // The time, in seconds, that the connection is allowed to be idle (no data - // has been sent over the connection) before it is closed by the load balancer. - // - // IdleTimeout is a required field - IdleTimeout *int64 `min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s ConnectionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConnectionSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConnectionSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConnectionSettings"} - if s.IdleTimeout == nil { - invalidParams.Add(request.NewErrParamRequired("IdleTimeout")) - } - if s.IdleTimeout != nil && *s.IdleTimeout < 1 { - invalidParams.Add(request.NewErrParamMinValue("IdleTimeout", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdleTimeout sets the IdleTimeout field's value. -func (s *ConnectionSettings) SetIdleTimeout(v int64) *ConnectionSettings { - s.IdleTimeout = &v - return s -} - -// Contains the parameters for CreateAppCookieStickinessPolicy. -type CreateAppCookieStickinessPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the application cookie used for stickiness. - // - // CookieName is a required field - CookieName *string `type:"string" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The name of the policy being created. Policy names must consist of alphanumeric - // characters and dashes (-). This name must be unique within the set of policies - // for this load balancer. - // - // PolicyName is a required field - PolicyName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateAppCookieStickinessPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAppCookieStickinessPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAppCookieStickinessPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAppCookieStickinessPolicyInput"} - if s.CookieName == nil { - invalidParams.Add(request.NewErrParamRequired("CookieName")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCookieName sets the CookieName field's value. -func (s *CreateAppCookieStickinessPolicyInput) SetCookieName(v string) *CreateAppCookieStickinessPolicyInput { - s.CookieName = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateAppCookieStickinessPolicyInput) SetLoadBalancerName(v string) *CreateAppCookieStickinessPolicyInput { - s.LoadBalancerName = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *CreateAppCookieStickinessPolicyInput) SetPolicyName(v string) *CreateAppCookieStickinessPolicyInput { - s.PolicyName = &v - return s -} - -// Contains the output for CreateAppCookieStickinessPolicy. -type CreateAppCookieStickinessPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateAppCookieStickinessPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAppCookieStickinessPolicyOutput) GoString() string { - return s.String() -} - -// Contains the parameters for CreateLBCookieStickinessPolicy. -type CreateLBCookieStickinessPolicyInput struct { - _ struct{} `type:"structure"` - - // The time period, in seconds, after which the cookie should be considered - // stale. If you do not specify this parameter, the default value is 0, which - // indicates that the sticky session should last for the duration of the browser - // session. - CookieExpirationPeriod *int64 `type:"long"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The name of the policy being created. Policy names must consist of alphanumeric - // characters and dashes (-). This name must be unique within the set of policies - // for this load balancer. - // - // PolicyName is a required field - PolicyName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateLBCookieStickinessPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLBCookieStickinessPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLBCookieStickinessPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLBCookieStickinessPolicyInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCookieExpirationPeriod sets the CookieExpirationPeriod field's value. -func (s *CreateLBCookieStickinessPolicyInput) SetCookieExpirationPeriod(v int64) *CreateLBCookieStickinessPolicyInput { - s.CookieExpirationPeriod = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateLBCookieStickinessPolicyInput) SetLoadBalancerName(v string) *CreateLBCookieStickinessPolicyInput { - s.LoadBalancerName = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *CreateLBCookieStickinessPolicyInput) SetPolicyName(v string) *CreateLBCookieStickinessPolicyInput { - s.PolicyName = &v - return s -} - -// Contains the output for CreateLBCookieStickinessPolicy. -type CreateLBCookieStickinessPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateLBCookieStickinessPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLBCookieStickinessPolicyOutput) GoString() string { - return s.String() -} - -// Contains the parameters for CreateLoadBalancer. -type CreateLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // One or more Availability Zones from the same region as the load balancer. - // - // You must specify at least one Availability Zone. - // - // You can add more Availability Zones after you create the load balancer using - // EnableAvailabilityZonesForLoadBalancer. - AvailabilityZones []*string `type:"list"` - - // The listeners. - // - // For more information, see Listeners for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html) - // in the Classic Load Balancers Guide. - // - // Listeners is a required field - Listeners []*Listener `type:"list" required:"true"` - - // The name of the load balancer. - // - // This name must be unique within your set of load balancers for the region, - // must have a maximum of 32 characters, must contain only alphanumeric characters - // or hyphens, and cannot begin or end with a hyphen. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The type of a load balancer. Valid only for load balancers in a VPC. - // - // By default, Elastic Load Balancing creates an Internet-facing load balancer - // with a DNS name that resolves to public IP addresses. For more information - // about Internet-facing and Internal load balancers, see Load Balancer Scheme - // (http://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/how-elastic-load-balancing-works.html#load-balancer-scheme) - // in the Elastic Load Balancing User Guide. - // - // Specify internal to create a load balancer with a DNS name that resolves - // to private IP addresses. - Scheme *string `type:"string"` - - // The IDs of the security groups to assign to the load balancer. - SecurityGroups []*string `type:"list"` - - // The IDs of the subnets in your VPC to attach to the load balancer. Specify - // one subnet per Availability Zone specified in AvailabilityZones. - Subnets []*string `type:"list"` - - // A list of tags to assign to the load balancer. - // - // For more information about tagging your load balancer, see Tag Your Classic - // Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/add-remove-tags.html) - // in the Classic Load Balancers Guide. - Tags []*Tag `min:"1" type:"list"` -} - -// String returns the string representation -func (s CreateLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerInput"} - if s.Listeners == nil { - invalidParams.Add(request.NewErrParamRequired("Listeners")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Listeners != nil { - for i, v := range s.Listeners { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Listeners", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *CreateLoadBalancerInput) SetAvailabilityZones(v []*string) *CreateLoadBalancerInput { - s.AvailabilityZones = v - return s -} - -// SetListeners sets the Listeners field's value. -func (s *CreateLoadBalancerInput) SetListeners(v []*Listener) *CreateLoadBalancerInput { - s.Listeners = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateLoadBalancerInput) SetLoadBalancerName(v string) *CreateLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// SetScheme sets the Scheme field's value. -func (s *CreateLoadBalancerInput) SetScheme(v string) *CreateLoadBalancerInput { - s.Scheme = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *CreateLoadBalancerInput) SetSecurityGroups(v []*string) *CreateLoadBalancerInput { - s.SecurityGroups = v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *CreateLoadBalancerInput) SetSubnets(v []*string) *CreateLoadBalancerInput { - s.Subnets = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateLoadBalancerInput) SetTags(v []*Tag) *CreateLoadBalancerInput { - s.Tags = v - return s -} - -// Contains the parameters for CreateLoadBalancerListeners. -type CreateLoadBalancerListenersInput struct { - _ struct{} `type:"structure"` - - // The listeners. - // - // Listeners is a required field - Listeners []*Listener `type:"list" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateLoadBalancerListenersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLoadBalancerListenersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoadBalancerListenersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerListenersInput"} - if s.Listeners == nil { - invalidParams.Add(request.NewErrParamRequired("Listeners")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.Listeners != nil { - for i, v := range s.Listeners { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Listeners", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetListeners sets the Listeners field's value. -func (s *CreateLoadBalancerListenersInput) SetListeners(v []*Listener) *CreateLoadBalancerListenersInput { - s.Listeners = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateLoadBalancerListenersInput) SetLoadBalancerName(v string) *CreateLoadBalancerListenersInput { - s.LoadBalancerName = &v - return s -} - -// Contains the parameters for CreateLoadBalancerListener. -type CreateLoadBalancerListenersOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateLoadBalancerListenersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLoadBalancerListenersOutput) GoString() string { - return s.String() -} - -// Contains the output for CreateLoadBalancer. -type CreateLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // The DNS name of the load balancer. - DNSName *string `type:"string"` -} - -// String returns the string representation -func (s CreateLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetDNSName sets the DNSName field's value. -func (s *CreateLoadBalancerOutput) SetDNSName(v string) *CreateLoadBalancerOutput { - s.DNSName = &v - return s -} - -// Contains the parameters for CreateLoadBalancerPolicy. -type CreateLoadBalancerPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The policy attributes. - PolicyAttributes []*PolicyAttribute `type:"list"` - - // The name of the load balancer policy to be created. This name must be unique - // within the set of policies for this load balancer. - // - // PolicyName is a required field - PolicyName *string `type:"string" required:"true"` - - // The name of the base policy type. To get the list of policy types, use DescribeLoadBalancerPolicyTypes. - // - // PolicyTypeName is a required field - PolicyTypeName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateLoadBalancerPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLoadBalancerPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoadBalancerPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerPolicyInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyTypeName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyTypeName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateLoadBalancerPolicyInput) SetLoadBalancerName(v string) *CreateLoadBalancerPolicyInput { - s.LoadBalancerName = &v - return s -} - -// SetPolicyAttributes sets the PolicyAttributes field's value. -func (s *CreateLoadBalancerPolicyInput) SetPolicyAttributes(v []*PolicyAttribute) *CreateLoadBalancerPolicyInput { - s.PolicyAttributes = v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *CreateLoadBalancerPolicyInput) SetPolicyName(v string) *CreateLoadBalancerPolicyInput { - s.PolicyName = &v - return s -} - -// SetPolicyTypeName sets the PolicyTypeName field's value. -func (s *CreateLoadBalancerPolicyInput) SetPolicyTypeName(v string) *CreateLoadBalancerPolicyInput { - s.PolicyTypeName = &v - return s -} - -// Contains the output of CreateLoadBalancerPolicy. -type CreateLoadBalancerPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateLoadBalancerPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLoadBalancerPolicyOutput) GoString() string { - return s.String() -} - -// Information about the CrossZoneLoadBalancing attribute. -type CrossZoneLoadBalancing struct { - _ struct{} `type:"structure"` - - // Specifies whether cross-zone load balancing is enabled for the load balancer. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s CrossZoneLoadBalancing) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CrossZoneLoadBalancing) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CrossZoneLoadBalancing) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CrossZoneLoadBalancing"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *CrossZoneLoadBalancing) SetEnabled(v bool) *CrossZoneLoadBalancing { - s.Enabled = &v - return s -} - -// Contains the parameters for DeleteLoadBalancer. -type DeleteLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DeleteLoadBalancerInput) SetLoadBalancerName(v string) *DeleteLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// Contains the parameters for DeleteLoadBalancerListeners. -type DeleteLoadBalancerListenersInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The client port numbers of the listeners. - // - // LoadBalancerPorts is a required field - LoadBalancerPorts []*int64 `type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteLoadBalancerListenersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLoadBalancerListenersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoadBalancerListenersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerListenersInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.LoadBalancerPorts == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerPorts")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DeleteLoadBalancerListenersInput) SetLoadBalancerName(v string) *DeleteLoadBalancerListenersInput { - s.LoadBalancerName = &v - return s -} - -// SetLoadBalancerPorts sets the LoadBalancerPorts field's value. -func (s *DeleteLoadBalancerListenersInput) SetLoadBalancerPorts(v []*int64) *DeleteLoadBalancerListenersInput { - s.LoadBalancerPorts = v - return s -} - -// Contains the output of DeleteLoadBalancerListeners. -type DeleteLoadBalancerListenersOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLoadBalancerListenersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLoadBalancerListenersOutput) GoString() string { - return s.String() -} - -// Contains the output of DeleteLoadBalancer. -type DeleteLoadBalancerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLoadBalancerOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DeleteLoadBalancerPolicy. -type DeleteLoadBalancerPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The name of the policy. - // - // PolicyName is a required field - PolicyName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLoadBalancerPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLoadBalancerPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoadBalancerPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerPolicyInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DeleteLoadBalancerPolicyInput) SetLoadBalancerName(v string) *DeleteLoadBalancerPolicyInput { - s.LoadBalancerName = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteLoadBalancerPolicyInput) SetPolicyName(v string) *DeleteLoadBalancerPolicyInput { - s.PolicyName = &v - return s -} - -// Contains the output of DeleteLoadBalancerPolicy. -type DeleteLoadBalancerPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLoadBalancerPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLoadBalancerPolicyOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DeregisterInstancesFromLoadBalancer. -type DeregisterInstancesFromLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The IDs of the instances. - // - // Instances is a required field - Instances []*Instance `type:"list" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterInstancesFromLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterInstancesFromLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterInstancesFromLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterInstancesFromLoadBalancerInput"} - if s.Instances == nil { - invalidParams.Add(request.NewErrParamRequired("Instances")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstances sets the Instances field's value. -func (s *DeregisterInstancesFromLoadBalancerInput) SetInstances(v []*Instance) *DeregisterInstancesFromLoadBalancerInput { - s.Instances = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DeregisterInstancesFromLoadBalancerInput) SetLoadBalancerName(v string) *DeregisterInstancesFromLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output of DeregisterInstancesFromLoadBalancer. -type DeregisterInstancesFromLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // The remaining instances registered with the load balancer. - Instances []*Instance `type:"list"` -} - -// String returns the string representation -func (s DeregisterInstancesFromLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterInstancesFromLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetInstances sets the Instances field's value. -func (s *DeregisterInstancesFromLoadBalancerOutput) SetInstances(v []*Instance) *DeregisterInstancesFromLoadBalancerOutput { - s.Instances = v - return s -} - -type DescribeAccountLimitsInput struct { - _ struct{} `type:"structure"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The maximum number of results to return with this call. - PageSize *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s DescribeAccountLimitsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountLimitsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAccountLimitsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAccountLimitsInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *DescribeAccountLimitsInput) SetMarker(v string) *DescribeAccountLimitsInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeAccountLimitsInput) SetPageSize(v int64) *DescribeAccountLimitsInput { - s.PageSize = &v - return s -} - -type DescribeAccountLimitsOutput struct { - _ struct{} `type:"structure"` - - // Information about the limits. - Limits []*Limit `type:"list"` - - // The marker to use when requesting the next set of results. If there are no - // additional results, the string is empty. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAccountLimitsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountLimitsOutput) GoString() string { - return s.String() -} - -// SetLimits sets the Limits field's value. -func (s *DescribeAccountLimitsOutput) SetLimits(v []*Limit) *DescribeAccountLimitsOutput { - s.Limits = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeAccountLimitsOutput) SetNextMarker(v string) *DescribeAccountLimitsOutput { - s.NextMarker = &v - return s -} - -// Contains the parameters for DescribeInstanceHealth. -type DescribeInstanceHealthInput struct { - _ struct{} `type:"structure"` - - // The IDs of the instances. - Instances []*Instance `type:"list"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeInstanceHealthInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstanceHealthInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInstanceHealthInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInstanceHealthInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstances sets the Instances field's value. -func (s *DescribeInstanceHealthInput) SetInstances(v []*Instance) *DescribeInstanceHealthInput { - s.Instances = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DescribeInstanceHealthInput) SetLoadBalancerName(v string) *DescribeInstanceHealthInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output for DescribeInstanceHealth. -type DescribeInstanceHealthOutput struct { - _ struct{} `type:"structure"` - - // Information about the health of the instances. - InstanceStates []*InstanceState `type:"list"` -} - -// String returns the string representation -func (s DescribeInstanceHealthOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstanceHealthOutput) GoString() string { - return s.String() -} - -// SetInstanceStates sets the InstanceStates field's value. -func (s *DescribeInstanceHealthOutput) SetInstanceStates(v []*InstanceState) *DescribeInstanceHealthOutput { - s.InstanceStates = v - return s -} - -// Contains the parameters for DescribeLoadBalancerAttributes. -type DescribeLoadBalancerAttributesInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeLoadBalancerAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancerAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLoadBalancerAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancerAttributesInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DescribeLoadBalancerAttributesInput) SetLoadBalancerName(v string) *DescribeLoadBalancerAttributesInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output of DescribeLoadBalancerAttributes. -type DescribeLoadBalancerAttributesOutput struct { - _ struct{} `type:"structure"` - - // Information about the load balancer attributes. - LoadBalancerAttributes *LoadBalancerAttributes `type:"structure"` -} - -// String returns the string representation -func (s DescribeLoadBalancerAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancerAttributesOutput) GoString() string { - return s.String() -} - -// SetLoadBalancerAttributes sets the LoadBalancerAttributes field's value. -func (s *DescribeLoadBalancerAttributesOutput) SetLoadBalancerAttributes(v *LoadBalancerAttributes) *DescribeLoadBalancerAttributesOutput { - s.LoadBalancerAttributes = v - return s -} - -// Contains the parameters for DescribeLoadBalancerPolicies. -type DescribeLoadBalancerPoliciesInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - LoadBalancerName *string `type:"string"` - - // The names of the policies. - PolicyNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeLoadBalancerPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancerPoliciesInput) GoString() string { - return s.String() -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DescribeLoadBalancerPoliciesInput) SetLoadBalancerName(v string) *DescribeLoadBalancerPoliciesInput { - s.LoadBalancerName = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *DescribeLoadBalancerPoliciesInput) SetPolicyNames(v []*string) *DescribeLoadBalancerPoliciesInput { - s.PolicyNames = v - return s -} - -// Contains the output of DescribeLoadBalancerPolicies. -type DescribeLoadBalancerPoliciesOutput struct { - _ struct{} `type:"structure"` - - // Information about the policies. - PolicyDescriptions []*PolicyDescription `type:"list"` -} - -// String returns the string representation -func (s DescribeLoadBalancerPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancerPoliciesOutput) GoString() string { - return s.String() -} - -// SetPolicyDescriptions sets the PolicyDescriptions field's value. -func (s *DescribeLoadBalancerPoliciesOutput) SetPolicyDescriptions(v []*PolicyDescription) *DescribeLoadBalancerPoliciesOutput { - s.PolicyDescriptions = v - return s -} - -// Contains the parameters for DescribeLoadBalancerPolicyTypes. -type DescribeLoadBalancerPolicyTypesInput struct { - _ struct{} `type:"structure"` - - // The names of the policy types. If no names are specified, describes all policy - // types defined by Elastic Load Balancing. - PolicyTypeNames []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeLoadBalancerPolicyTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancerPolicyTypesInput) GoString() string { - return s.String() -} - -// SetPolicyTypeNames sets the PolicyTypeNames field's value. -func (s *DescribeLoadBalancerPolicyTypesInput) SetPolicyTypeNames(v []*string) *DescribeLoadBalancerPolicyTypesInput { - s.PolicyTypeNames = v - return s -} - -// Contains the output of DescribeLoadBalancerPolicyTypes. -type DescribeLoadBalancerPolicyTypesOutput struct { - _ struct{} `type:"structure"` - - // Information about the policy types. - PolicyTypeDescriptions []*PolicyTypeDescription `type:"list"` -} - -// String returns the string representation -func (s DescribeLoadBalancerPolicyTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancerPolicyTypesOutput) GoString() string { - return s.String() -} - -// SetPolicyTypeDescriptions sets the PolicyTypeDescriptions field's value. -func (s *DescribeLoadBalancerPolicyTypesOutput) SetPolicyTypeDescriptions(v []*PolicyTypeDescription) *DescribeLoadBalancerPolicyTypesOutput { - s.PolicyTypeDescriptions = v - return s -} - -// Contains the parameters for DescribeLoadBalancers. -type DescribeLoadBalancersInput struct { - _ struct{} `type:"structure"` - - // The names of the load balancers. - LoadBalancerNames []*string `type:"list"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The maximum number of results to return with this call (a number from 1 to - // 400). The default is 400. - PageSize *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s DescribeLoadBalancersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLoadBalancersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancersInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerNames sets the LoadBalancerNames field's value. -func (s *DescribeLoadBalancersInput) SetLoadBalancerNames(v []*string) *DescribeLoadBalancersInput { - s.LoadBalancerNames = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeLoadBalancersInput) SetMarker(v string) *DescribeLoadBalancersInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeLoadBalancersInput) SetPageSize(v int64) *DescribeLoadBalancersInput { - s.PageSize = &v - return s -} - -// Contains the parameters for DescribeLoadBalancers. -type DescribeLoadBalancersOutput struct { - _ struct{} `type:"structure"` - - // Information about the load balancers. - LoadBalancerDescriptions []*LoadBalancerDescription `type:"list"` - - // The marker to use when requesting the next set of results. If there are no - // additional results, the string is empty. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeLoadBalancersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancersOutput) GoString() string { - return s.String() -} - -// SetLoadBalancerDescriptions sets the LoadBalancerDescriptions field's value. -func (s *DescribeLoadBalancersOutput) SetLoadBalancerDescriptions(v []*LoadBalancerDescription) *DescribeLoadBalancersOutput { - s.LoadBalancerDescriptions = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeLoadBalancersOutput) SetNextMarker(v string) *DescribeLoadBalancersOutput { - s.NextMarker = &v - return s -} - -// Contains the parameters for DescribeTags. -type DescribeTagsInput struct { - _ struct{} `type:"structure"` - - // The names of the load balancers. - // - // LoadBalancerNames is a required field - LoadBalancerNames []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"} - if s.LoadBalancerNames == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames")) - } - if s.LoadBalancerNames != nil && len(s.LoadBalancerNames) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LoadBalancerNames", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerNames sets the LoadBalancerNames field's value. -func (s *DescribeTagsInput) SetLoadBalancerNames(v []*string) *DescribeTagsInput { - s.LoadBalancerNames = v - return s -} - -// Contains the output for DescribeTags. -type DescribeTagsOutput struct { - _ struct{} `type:"structure"` - - // Information about the tags. - TagDescriptions []*TagDescription `type:"list"` -} - -// String returns the string representation -func (s DescribeTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsOutput) GoString() string { - return s.String() -} - -// SetTagDescriptions sets the TagDescriptions field's value. -func (s *DescribeTagsOutput) SetTagDescriptions(v []*TagDescription) *DescribeTagsOutput { - s.TagDescriptions = v - return s -} - -// Contains the parameters for DetachLoadBalancerFromSubnets. -type DetachLoadBalancerFromSubnetsInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The IDs of the subnets. - // - // Subnets is a required field - Subnets []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DetachLoadBalancerFromSubnetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachLoadBalancerFromSubnetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachLoadBalancerFromSubnetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachLoadBalancerFromSubnetsInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.Subnets == nil { - invalidParams.Add(request.NewErrParamRequired("Subnets")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DetachLoadBalancerFromSubnetsInput) SetLoadBalancerName(v string) *DetachLoadBalancerFromSubnetsInput { - s.LoadBalancerName = &v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *DetachLoadBalancerFromSubnetsInput) SetSubnets(v []*string) *DetachLoadBalancerFromSubnetsInput { - s.Subnets = v - return s -} - -// Contains the output of DetachLoadBalancerFromSubnets. -type DetachLoadBalancerFromSubnetsOutput struct { - _ struct{} `type:"structure"` - - // The IDs of the remaining subnets for the load balancer. - Subnets []*string `type:"list"` -} - -// String returns the string representation -func (s DetachLoadBalancerFromSubnetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachLoadBalancerFromSubnetsOutput) GoString() string { - return s.String() -} - -// SetSubnets sets the Subnets field's value. -func (s *DetachLoadBalancerFromSubnetsOutput) SetSubnets(v []*string) *DetachLoadBalancerFromSubnetsOutput { - s.Subnets = v - return s -} - -// Contains the parameters for DisableAvailabilityZonesForLoadBalancer. -type DisableAvailabilityZonesForLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The Availability Zones. - // - // AvailabilityZones is a required field - AvailabilityZones []*string `type:"list" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableAvailabilityZonesForLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableAvailabilityZonesForLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableAvailabilityZonesForLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableAvailabilityZonesForLoadBalancerInput"} - if s.AvailabilityZones == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZones")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DisableAvailabilityZonesForLoadBalancerInput) SetAvailabilityZones(v []*string) *DisableAvailabilityZonesForLoadBalancerInput { - s.AvailabilityZones = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DisableAvailabilityZonesForLoadBalancerInput) SetLoadBalancerName(v string) *DisableAvailabilityZonesForLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output for DisableAvailabilityZonesForLoadBalancer. -type DisableAvailabilityZonesForLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // The remaining Availability Zones for the load balancer. - AvailabilityZones []*string `type:"list"` -} - -// String returns the string representation -func (s DisableAvailabilityZonesForLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableAvailabilityZonesForLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DisableAvailabilityZonesForLoadBalancerOutput) SetAvailabilityZones(v []*string) *DisableAvailabilityZonesForLoadBalancerOutput { - s.AvailabilityZones = v - return s -} - -// Contains the parameters for EnableAvailabilityZonesForLoadBalancer. -type EnableAvailabilityZonesForLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The Availability Zones. These must be in the same region as the load balancer. - // - // AvailabilityZones is a required field - AvailabilityZones []*string `type:"list" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s EnableAvailabilityZonesForLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableAvailabilityZonesForLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableAvailabilityZonesForLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableAvailabilityZonesForLoadBalancerInput"} - if s.AvailabilityZones == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZones")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *EnableAvailabilityZonesForLoadBalancerInput) SetAvailabilityZones(v []*string) *EnableAvailabilityZonesForLoadBalancerInput { - s.AvailabilityZones = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *EnableAvailabilityZonesForLoadBalancerInput) SetLoadBalancerName(v string) *EnableAvailabilityZonesForLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output of EnableAvailabilityZonesForLoadBalancer. -type EnableAvailabilityZonesForLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // The updated list of Availability Zones for the load balancer. - AvailabilityZones []*string `type:"list"` -} - -// String returns the string representation -func (s EnableAvailabilityZonesForLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableAvailabilityZonesForLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *EnableAvailabilityZonesForLoadBalancerOutput) SetAvailabilityZones(v []*string) *EnableAvailabilityZonesForLoadBalancerOutput { - s.AvailabilityZones = v - return s -} - -// Information about a health check. -type HealthCheck struct { - _ struct{} `type:"structure"` - - // The number of consecutive health checks successes required before moving - // the instance to the Healthy state. - // - // HealthyThreshold is a required field - HealthyThreshold *int64 `min:"2" type:"integer" required:"true"` - - // The approximate interval, in seconds, between health checks of an individual - // instance. - // - // Interval is a required field - Interval *int64 `min:"5" type:"integer" required:"true"` - - // The instance being checked. The protocol is either TCP, HTTP, HTTPS, or SSL. - // The range of valid ports is one (1) through 65535. - // - // TCP is the default, specified as a TCP: port pair, for example "TCP:5000". - // In this case, a health check simply attempts to open a TCP connection to - // the instance on the specified port. Failure to connect within the configured - // timeout is considered unhealthy. - // - // SSL is also specified as SSL: port pair, for example, SSL:5000. - // - // For HTTP/HTTPS, you must include a ping path in the string. HTTP is specified - // as a HTTP:port;/;PathToPing; grouping, for example "HTTP:80/weather/us/wa/seattle". - // In this case, a HTTP GET request is issued to the instance on the given port - // and path. Any answer other than "200 OK" within the timeout period is considered - // unhealthy. - // - // The total length of the HTTP ping target must be 1024 16-bit Unicode characters - // or less. - // - // Target is a required field - Target *string `type:"string" required:"true"` - - // The amount of time, in seconds, during which no response means a failed health - // check. - // - // This value must be less than the Interval value. - // - // Timeout is a required field - Timeout *int64 `min:"2" type:"integer" required:"true"` - - // The number of consecutive health check failures required before moving the - // instance to the Unhealthy state. - // - // UnhealthyThreshold is a required field - UnhealthyThreshold *int64 `min:"2" type:"integer" required:"true"` -} - -// String returns the string representation -func (s HealthCheck) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HealthCheck) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HealthCheck) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HealthCheck"} - if s.HealthyThreshold == nil { - invalidParams.Add(request.NewErrParamRequired("HealthyThreshold")) - } - if s.HealthyThreshold != nil && *s.HealthyThreshold < 2 { - invalidParams.Add(request.NewErrParamMinValue("HealthyThreshold", 2)) - } - if s.Interval == nil { - invalidParams.Add(request.NewErrParamRequired("Interval")) - } - if s.Interval != nil && *s.Interval < 5 { - invalidParams.Add(request.NewErrParamMinValue("Interval", 5)) - } - if s.Target == nil { - invalidParams.Add(request.NewErrParamRequired("Target")) - } - if s.Timeout == nil { - invalidParams.Add(request.NewErrParamRequired("Timeout")) - } - if s.Timeout != nil && *s.Timeout < 2 { - invalidParams.Add(request.NewErrParamMinValue("Timeout", 2)) - } - if s.UnhealthyThreshold == nil { - invalidParams.Add(request.NewErrParamRequired("UnhealthyThreshold")) - } - if s.UnhealthyThreshold != nil && *s.UnhealthyThreshold < 2 { - invalidParams.Add(request.NewErrParamMinValue("UnhealthyThreshold", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthyThreshold sets the HealthyThreshold field's value. -func (s *HealthCheck) SetHealthyThreshold(v int64) *HealthCheck { - s.HealthyThreshold = &v - return s -} - -// SetInterval sets the Interval field's value. -func (s *HealthCheck) SetInterval(v int64) *HealthCheck { - s.Interval = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *HealthCheck) SetTarget(v string) *HealthCheck { - s.Target = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *HealthCheck) SetTimeout(v int64) *HealthCheck { - s.Timeout = &v - return s -} - -// SetUnhealthyThreshold sets the UnhealthyThreshold field's value. -func (s *HealthCheck) SetUnhealthyThreshold(v int64) *HealthCheck { - s.UnhealthyThreshold = &v - return s -} - -// The ID of an EC2 instance. -type Instance struct { - _ struct{} `type:"structure"` - - // The instance ID. - InstanceId *string `type:"string"` -} - -// String returns the string representation -func (s Instance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Instance) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *Instance) SetInstanceId(v string) *Instance { - s.InstanceId = &v - return s -} - -// Information about the state of an EC2 instance. -type InstanceState struct { - _ struct{} `type:"structure"` - - // A description of the instance state. This string can contain one or more - // of the following messages. - // - // * N/A - // - // * A transient error occurred. Please try again later. - // - // * Instance has failed at least the UnhealthyThreshold number of health - // checks consecutively. - // - // * Instance has not passed the configured HealthyThreshold number of health - // checks consecutively. - // - // * Instance registration is still in progress. - // - // * Instance is in the EC2 Availability Zone for which LoadBalancer is not - // configured to route traffic to. - // - // * Instance is not currently registered with the LoadBalancer. - // - // * Instance deregistration currently in progress. - // - // * Disable Availability Zone is currently in progress. - // - // * Instance is in pending state. - // - // * Instance is in stopped state. - // - // * Instance is in terminated state. - Description *string `type:"string"` - - // The ID of the instance. - InstanceId *string `type:"string"` - - // Information about the cause of OutOfService instances. Specifically, whether - // the cause is Elastic Load Balancing or the instance. - // - // Valid values: ELB | Instance | N/A - ReasonCode *string `type:"string"` - - // The current state of the instance. - // - // Valid values: InService | OutOfService | Unknown - State *string `type:"string"` -} - -// String returns the string representation -func (s InstanceState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceState) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *InstanceState) SetDescription(v string) *InstanceState { - s.Description = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceState) SetInstanceId(v string) *InstanceState { - s.InstanceId = &v - return s -} - -// SetReasonCode sets the ReasonCode field's value. -func (s *InstanceState) SetReasonCode(v string) *InstanceState { - s.ReasonCode = &v - return s -} - -// SetState sets the State field's value. -func (s *InstanceState) SetState(v string) *InstanceState { - s.State = &v - return s -} - -// Information about a policy for duration-based session stickiness. -type LBCookieStickinessPolicy struct { - _ struct{} `type:"structure"` - - // The time period, in seconds, after which the cookie should be considered - // stale. If this parameter is not specified, the stickiness session lasts for - // the duration of the browser session. - CookieExpirationPeriod *int64 `type:"long"` - - // The name of the policy. This name must be unique within the set of policies - // for this load balancer. - PolicyName *string `type:"string"` -} - -// String returns the string representation -func (s LBCookieStickinessPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LBCookieStickinessPolicy) GoString() string { - return s.String() -} - -// SetCookieExpirationPeriod sets the CookieExpirationPeriod field's value. -func (s *LBCookieStickinessPolicy) SetCookieExpirationPeriod(v int64) *LBCookieStickinessPolicy { - s.CookieExpirationPeriod = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *LBCookieStickinessPolicy) SetPolicyName(v string) *LBCookieStickinessPolicy { - s.PolicyName = &v - return s -} - -// Information about an Elastic Load Balancing resource limit for your AWS account. -type Limit struct { - _ struct{} `type:"structure"` - - // The maximum value of the limit. - Max *string `type:"string"` - - // The name of the limit. The possible values are: - // - // * classic-listeners - // - // * classic-load-balancers - // - // * classic-registered-instances - Name *string `type:"string"` -} - -// String returns the string representation -func (s Limit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Limit) GoString() string { - return s.String() -} - -// SetMax sets the Max field's value. -func (s *Limit) SetMax(v string) *Limit { - s.Max = &v - return s -} - -// SetName sets the Name field's value. -func (s *Limit) SetName(v string) *Limit { - s.Name = &v - return s -} - -// Information about a listener. -// -// For information about the protocols and the ports supported by Elastic Load -// Balancing, see Listeners for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html) -// in the Classic Load Balancers Guide. -type Listener struct { - _ struct{} `type:"structure"` - - // The port on which the instance is listening. - // - // InstancePort is a required field - InstancePort *int64 `min:"1" type:"integer" required:"true"` - - // The protocol to use for routing traffic to instances: HTTP, HTTPS, TCP, or - // SSL. - // - // If the front-end protocol is HTTP, HTTPS, TCP, or SSL, InstanceProtocol must - // be at the same protocol. - // - // If there is another listener with the same InstancePort whose InstanceProtocol - // is secure, (HTTPS or SSL), the listener's InstanceProtocol must also be secure. - // - // If there is another listener with the same InstancePort whose InstanceProtocol - // is HTTP or TCP, the listener's InstanceProtocol must be HTTP or TCP. - InstanceProtocol *string `type:"string"` - - // The port on which the load balancer is listening. On EC2-VPC, you can specify - // any port from the range 1-65535. On EC2-Classic, you can specify any port - // from the following list: 25, 80, 443, 465, 587, 1024-65535. - // - // LoadBalancerPort is a required field - LoadBalancerPort *int64 `type:"integer" required:"true"` - - // The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, - // or SSL. - // - // Protocol is a required field - Protocol *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the server certificate. - SSLCertificateId *string `type:"string"` -} - -// String returns the string representation -func (s Listener) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Listener) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Listener) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Listener"} - if s.InstancePort == nil { - invalidParams.Add(request.NewErrParamRequired("InstancePort")) - } - if s.InstancePort != nil && *s.InstancePort < 1 { - invalidParams.Add(request.NewErrParamMinValue("InstancePort", 1)) - } - if s.LoadBalancerPort == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerPort")) - } - if s.Protocol == nil { - invalidParams.Add(request.NewErrParamRequired("Protocol")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstancePort sets the InstancePort field's value. -func (s *Listener) SetInstancePort(v int64) *Listener { - s.InstancePort = &v - return s -} - -// SetInstanceProtocol sets the InstanceProtocol field's value. -func (s *Listener) SetInstanceProtocol(v string) *Listener { - s.InstanceProtocol = &v - return s -} - -// SetLoadBalancerPort sets the LoadBalancerPort field's value. -func (s *Listener) SetLoadBalancerPort(v int64) *Listener { - s.LoadBalancerPort = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *Listener) SetProtocol(v string) *Listener { - s.Protocol = &v - return s -} - -// SetSSLCertificateId sets the SSLCertificateId field's value. -func (s *Listener) SetSSLCertificateId(v string) *Listener { - s.SSLCertificateId = &v - return s -} - -// The policies enabled for a listener. -type ListenerDescription struct { - _ struct{} `type:"structure"` - - // The listener. - Listener *Listener `type:"structure"` - - // The policies. If there are no policies enabled, the list is empty. - PolicyNames []*string `type:"list"` -} - -// String returns the string representation -func (s ListenerDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListenerDescription) GoString() string { - return s.String() -} - -// SetListener sets the Listener field's value. -func (s *ListenerDescription) SetListener(v *Listener) *ListenerDescription { - s.Listener = v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *ListenerDescription) SetPolicyNames(v []*string) *ListenerDescription { - s.PolicyNames = v - return s -} - -// The attributes for a load balancer. -type LoadBalancerAttributes struct { - _ struct{} `type:"structure"` - - // If enabled, the load balancer captures detailed information of all requests - // and delivers the information to the Amazon S3 bucket that you specify. - // - // For more information, see Enable Access Logs (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html) - // in the Classic Load Balancers Guide. - AccessLog *AccessLog `type:"structure"` - - // This parameter is reserved. - AdditionalAttributes []*AdditionalAttribute `type:"list"` - - // If enabled, the load balancer allows existing requests to complete before - // the load balancer shifts traffic away from a deregistered or unhealthy instance. - // - // For more information, see Configure Connection Draining (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html) - // in the Classic Load Balancers Guide. - ConnectionDraining *ConnectionDraining `type:"structure"` - - // If enabled, the load balancer allows the connections to remain idle (no data - // is sent over the connection) for the specified duration. - // - // By default, Elastic Load Balancing maintains a 60-second idle connection - // timeout for both front-end and back-end connections of your load balancer. - // For more information, see Configure Idle Connection Timeout (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html) - // in the Classic Load Balancers Guide. - ConnectionSettings *ConnectionSettings `type:"structure"` - - // If enabled, the load balancer routes the request traffic evenly across all - // instances regardless of the Availability Zones. - // - // For more information, see Configure Cross-Zone Load Balancing (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-crosszone-lb.html) - // in the Classic Load Balancers Guide. - CrossZoneLoadBalancing *CrossZoneLoadBalancing `type:"structure"` -} - -// String returns the string representation -func (s LoadBalancerAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancerAttributes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LoadBalancerAttributes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LoadBalancerAttributes"} - if s.AccessLog != nil { - if err := s.AccessLog.Validate(); err != nil { - invalidParams.AddNested("AccessLog", err.(request.ErrInvalidParams)) - } - } - if s.ConnectionDraining != nil { - if err := s.ConnectionDraining.Validate(); err != nil { - invalidParams.AddNested("ConnectionDraining", err.(request.ErrInvalidParams)) - } - } - if s.ConnectionSettings != nil { - if err := s.ConnectionSettings.Validate(); err != nil { - invalidParams.AddNested("ConnectionSettings", err.(request.ErrInvalidParams)) - } - } - if s.CrossZoneLoadBalancing != nil { - if err := s.CrossZoneLoadBalancing.Validate(); err != nil { - invalidParams.AddNested("CrossZoneLoadBalancing", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessLog sets the AccessLog field's value. -func (s *LoadBalancerAttributes) SetAccessLog(v *AccessLog) *LoadBalancerAttributes { - s.AccessLog = v - return s -} - -// SetAdditionalAttributes sets the AdditionalAttributes field's value. -func (s *LoadBalancerAttributes) SetAdditionalAttributes(v []*AdditionalAttribute) *LoadBalancerAttributes { - s.AdditionalAttributes = v - return s -} - -// SetConnectionDraining sets the ConnectionDraining field's value. -func (s *LoadBalancerAttributes) SetConnectionDraining(v *ConnectionDraining) *LoadBalancerAttributes { - s.ConnectionDraining = v - return s -} - -// SetConnectionSettings sets the ConnectionSettings field's value. -func (s *LoadBalancerAttributes) SetConnectionSettings(v *ConnectionSettings) *LoadBalancerAttributes { - s.ConnectionSettings = v - return s -} - -// SetCrossZoneLoadBalancing sets the CrossZoneLoadBalancing field's value. -func (s *LoadBalancerAttributes) SetCrossZoneLoadBalancing(v *CrossZoneLoadBalancing) *LoadBalancerAttributes { - s.CrossZoneLoadBalancing = v - return s -} - -// Information about a load balancer. -type LoadBalancerDescription struct { - _ struct{} `type:"structure"` - - // The Availability Zones for the load balancer. - AvailabilityZones []*string `type:"list"` - - // Information about your EC2 instances. - BackendServerDescriptions []*BackendServerDescription `type:"list"` - - // The DNS name of the load balancer. - // - // For more information, see Configure a Custom Domain Name (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/using-domain-names-with-elb.html) - // in the Classic Load Balancers Guide. - CanonicalHostedZoneName *string `type:"string"` - - // The ID of the Amazon Route 53 hosted zone for the load balancer. - CanonicalHostedZoneNameID *string `type:"string"` - - // The date and time the load balancer was created. - CreatedTime *time.Time `type:"timestamp"` - - // The DNS name of the load balancer. - DNSName *string `type:"string"` - - // Information about the health checks conducted on the load balancer. - HealthCheck *HealthCheck `type:"structure"` - - // The IDs of the instances for the load balancer. - Instances []*Instance `type:"list"` - - // The listeners for the load balancer. - ListenerDescriptions []*ListenerDescription `type:"list"` - - // The name of the load balancer. - LoadBalancerName *string `type:"string"` - - // The policies defined for the load balancer. - Policies *Policies `type:"structure"` - - // The type of load balancer. Valid only for load balancers in a VPC. - // - // If Scheme is internet-facing, the load balancer has a public DNS name that - // resolves to a public IP address. - // - // If Scheme is internal, the load balancer has a public DNS name that resolves - // to a private IP address. - Scheme *string `type:"string"` - - // The security groups for the load balancer. Valid only for load balancers - // in a VPC. - SecurityGroups []*string `type:"list"` - - // The security group for the load balancer, which you can use as part of your - // inbound rules for your registered instances. To only allow traffic from load - // balancers, add a security group rule that specifies this source security - // group as the inbound source. - SourceSecurityGroup *SourceSecurityGroup `type:"structure"` - - // The IDs of the subnets for the load balancer. - Subnets []*string `type:"list"` - - // The ID of the VPC for the load balancer. - VPCId *string `type:"string"` -} - -// String returns the string representation -func (s LoadBalancerDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancerDescription) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *LoadBalancerDescription) SetAvailabilityZones(v []*string) *LoadBalancerDescription { - s.AvailabilityZones = v - return s -} - -// SetBackendServerDescriptions sets the BackendServerDescriptions field's value. -func (s *LoadBalancerDescription) SetBackendServerDescriptions(v []*BackendServerDescription) *LoadBalancerDescription { - s.BackendServerDescriptions = v - return s -} - -// SetCanonicalHostedZoneName sets the CanonicalHostedZoneName field's value. -func (s *LoadBalancerDescription) SetCanonicalHostedZoneName(v string) *LoadBalancerDescription { - s.CanonicalHostedZoneName = &v - return s -} - -// SetCanonicalHostedZoneNameID sets the CanonicalHostedZoneNameID field's value. -func (s *LoadBalancerDescription) SetCanonicalHostedZoneNameID(v string) *LoadBalancerDescription { - s.CanonicalHostedZoneNameID = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *LoadBalancerDescription) SetCreatedTime(v time.Time) *LoadBalancerDescription { - s.CreatedTime = &v - return s -} - -// SetDNSName sets the DNSName field's value. -func (s *LoadBalancerDescription) SetDNSName(v string) *LoadBalancerDescription { - s.DNSName = &v - return s -} - -// SetHealthCheck sets the HealthCheck field's value. -func (s *LoadBalancerDescription) SetHealthCheck(v *HealthCheck) *LoadBalancerDescription { - s.HealthCheck = v - return s -} - -// SetInstances sets the Instances field's value. -func (s *LoadBalancerDescription) SetInstances(v []*Instance) *LoadBalancerDescription { - s.Instances = v - return s -} - -// SetListenerDescriptions sets the ListenerDescriptions field's value. -func (s *LoadBalancerDescription) SetListenerDescriptions(v []*ListenerDescription) *LoadBalancerDescription { - s.ListenerDescriptions = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *LoadBalancerDescription) SetLoadBalancerName(v string) *LoadBalancerDescription { - s.LoadBalancerName = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *LoadBalancerDescription) SetPolicies(v *Policies) *LoadBalancerDescription { - s.Policies = v - return s -} - -// SetScheme sets the Scheme field's value. -func (s *LoadBalancerDescription) SetScheme(v string) *LoadBalancerDescription { - s.Scheme = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *LoadBalancerDescription) SetSecurityGroups(v []*string) *LoadBalancerDescription { - s.SecurityGroups = v - return s -} - -// SetSourceSecurityGroup sets the SourceSecurityGroup field's value. -func (s *LoadBalancerDescription) SetSourceSecurityGroup(v *SourceSecurityGroup) *LoadBalancerDescription { - s.SourceSecurityGroup = v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *LoadBalancerDescription) SetSubnets(v []*string) *LoadBalancerDescription { - s.Subnets = v - return s -} - -// SetVPCId sets the VPCId field's value. -func (s *LoadBalancerDescription) SetVPCId(v string) *LoadBalancerDescription { - s.VPCId = &v - return s -} - -// Contains the parameters for ModifyLoadBalancerAttributes. -type ModifyLoadBalancerAttributesInput struct { - _ struct{} `type:"structure"` - - // The attributes for the load balancer. - // - // LoadBalancerAttributes is a required field - LoadBalancerAttributes *LoadBalancerAttributes `type:"structure" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyLoadBalancerAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyLoadBalancerAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyLoadBalancerAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyLoadBalancerAttributesInput"} - if s.LoadBalancerAttributes == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerAttributes")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.LoadBalancerAttributes != nil { - if err := s.LoadBalancerAttributes.Validate(); err != nil { - invalidParams.AddNested("LoadBalancerAttributes", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerAttributes sets the LoadBalancerAttributes field's value. -func (s *ModifyLoadBalancerAttributesInput) SetLoadBalancerAttributes(v *LoadBalancerAttributes) *ModifyLoadBalancerAttributesInput { - s.LoadBalancerAttributes = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *ModifyLoadBalancerAttributesInput) SetLoadBalancerName(v string) *ModifyLoadBalancerAttributesInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output of ModifyLoadBalancerAttributes. -type ModifyLoadBalancerAttributesOutput struct { - _ struct{} `type:"structure"` - - // Information about the load balancer attributes. - LoadBalancerAttributes *LoadBalancerAttributes `type:"structure"` - - // The name of the load balancer. - LoadBalancerName *string `type:"string"` -} - -// String returns the string representation -func (s ModifyLoadBalancerAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyLoadBalancerAttributesOutput) GoString() string { - return s.String() -} - -// SetLoadBalancerAttributes sets the LoadBalancerAttributes field's value. -func (s *ModifyLoadBalancerAttributesOutput) SetLoadBalancerAttributes(v *LoadBalancerAttributes) *ModifyLoadBalancerAttributesOutput { - s.LoadBalancerAttributes = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *ModifyLoadBalancerAttributesOutput) SetLoadBalancerName(v string) *ModifyLoadBalancerAttributesOutput { - s.LoadBalancerName = &v - return s -} - -// The policies for a load balancer. -type Policies struct { - _ struct{} `type:"structure"` - - // The stickiness policies created using CreateAppCookieStickinessPolicy. - AppCookieStickinessPolicies []*AppCookieStickinessPolicy `type:"list"` - - // The stickiness policies created using CreateLBCookieStickinessPolicy. - LBCookieStickinessPolicies []*LBCookieStickinessPolicy `type:"list"` - - // The policies other than the stickiness policies. - OtherPolicies []*string `type:"list"` -} - -// String returns the string representation -func (s Policies) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Policies) GoString() string { - return s.String() -} - -// SetAppCookieStickinessPolicies sets the AppCookieStickinessPolicies field's value. -func (s *Policies) SetAppCookieStickinessPolicies(v []*AppCookieStickinessPolicy) *Policies { - s.AppCookieStickinessPolicies = v - return s -} - -// SetLBCookieStickinessPolicies sets the LBCookieStickinessPolicies field's value. -func (s *Policies) SetLBCookieStickinessPolicies(v []*LBCookieStickinessPolicy) *Policies { - s.LBCookieStickinessPolicies = v - return s -} - -// SetOtherPolicies sets the OtherPolicies field's value. -func (s *Policies) SetOtherPolicies(v []*string) *Policies { - s.OtherPolicies = v - return s -} - -// Information about a policy attribute. -type PolicyAttribute struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - AttributeName *string `type:"string"` - - // The value of the attribute. - AttributeValue *string `type:"string"` -} - -// String returns the string representation -func (s PolicyAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PolicyAttribute) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *PolicyAttribute) SetAttributeName(v string) *PolicyAttribute { - s.AttributeName = &v - return s -} - -// SetAttributeValue sets the AttributeValue field's value. -func (s *PolicyAttribute) SetAttributeValue(v string) *PolicyAttribute { - s.AttributeValue = &v - return s -} - -// Information about a policy attribute. -type PolicyAttributeDescription struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - AttributeName *string `type:"string"` - - // The value of the attribute. - AttributeValue *string `type:"string"` -} - -// String returns the string representation -func (s PolicyAttributeDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PolicyAttributeDescription) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *PolicyAttributeDescription) SetAttributeName(v string) *PolicyAttributeDescription { - s.AttributeName = &v - return s -} - -// SetAttributeValue sets the AttributeValue field's value. -func (s *PolicyAttributeDescription) SetAttributeValue(v string) *PolicyAttributeDescription { - s.AttributeValue = &v - return s -} - -// Information about a policy attribute type. -type PolicyAttributeTypeDescription struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - AttributeName *string `type:"string"` - - // The type of the attribute. For example, Boolean or Integer. - AttributeType *string `type:"string"` - - // The cardinality of the attribute. - // - // Valid values: - // - // * ONE(1) : Single value required - // - // * ZERO_OR_ONE(0..1) : Up to one value is allowed - // - // * ZERO_OR_MORE(0..*) : Optional. Multiple values are allowed - // - // * ONE_OR_MORE(1..*0) : Required. Multiple values are allowed - Cardinality *string `type:"string"` - - // The default value of the attribute, if applicable. - DefaultValue *string `type:"string"` - - // A description of the attribute. - Description *string `type:"string"` -} - -// String returns the string representation -func (s PolicyAttributeTypeDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PolicyAttributeTypeDescription) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *PolicyAttributeTypeDescription) SetAttributeName(v string) *PolicyAttributeTypeDescription { - s.AttributeName = &v - return s -} - -// SetAttributeType sets the AttributeType field's value. -func (s *PolicyAttributeTypeDescription) SetAttributeType(v string) *PolicyAttributeTypeDescription { - s.AttributeType = &v - return s -} - -// SetCardinality sets the Cardinality field's value. -func (s *PolicyAttributeTypeDescription) SetCardinality(v string) *PolicyAttributeTypeDescription { - s.Cardinality = &v - return s -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *PolicyAttributeTypeDescription) SetDefaultValue(v string) *PolicyAttributeTypeDescription { - s.DefaultValue = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PolicyAttributeTypeDescription) SetDescription(v string) *PolicyAttributeTypeDescription { - s.Description = &v - return s -} - -// Information about a policy. -type PolicyDescription struct { - _ struct{} `type:"structure"` - - // The policy attributes. - PolicyAttributeDescriptions []*PolicyAttributeDescription `type:"list"` - - // The name of the policy. - PolicyName *string `type:"string"` - - // The name of the policy type. - PolicyTypeName *string `type:"string"` -} - -// String returns the string representation -func (s PolicyDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PolicyDescription) GoString() string { - return s.String() -} - -// SetPolicyAttributeDescriptions sets the PolicyAttributeDescriptions field's value. -func (s *PolicyDescription) SetPolicyAttributeDescriptions(v []*PolicyAttributeDescription) *PolicyDescription { - s.PolicyAttributeDescriptions = v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PolicyDescription) SetPolicyName(v string) *PolicyDescription { - s.PolicyName = &v - return s -} - -// SetPolicyTypeName sets the PolicyTypeName field's value. -func (s *PolicyDescription) SetPolicyTypeName(v string) *PolicyDescription { - s.PolicyTypeName = &v - return s -} - -// Information about a policy type. -type PolicyTypeDescription struct { - _ struct{} `type:"structure"` - - // A description of the policy type. - Description *string `type:"string"` - - // The description of the policy attributes associated with the policies defined - // by Elastic Load Balancing. - PolicyAttributeTypeDescriptions []*PolicyAttributeTypeDescription `type:"list"` - - // The name of the policy type. - PolicyTypeName *string `type:"string"` -} - -// String returns the string representation -func (s PolicyTypeDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PolicyTypeDescription) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *PolicyTypeDescription) SetDescription(v string) *PolicyTypeDescription { - s.Description = &v - return s -} - -// SetPolicyAttributeTypeDescriptions sets the PolicyAttributeTypeDescriptions field's value. -func (s *PolicyTypeDescription) SetPolicyAttributeTypeDescriptions(v []*PolicyAttributeTypeDescription) *PolicyTypeDescription { - s.PolicyAttributeTypeDescriptions = v - return s -} - -// SetPolicyTypeName sets the PolicyTypeName field's value. -func (s *PolicyTypeDescription) SetPolicyTypeName(v string) *PolicyTypeDescription { - s.PolicyTypeName = &v - return s -} - -// Contains the parameters for RegisterInstancesWithLoadBalancer. -type RegisterInstancesWithLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The IDs of the instances. - // - // Instances is a required field - Instances []*Instance `type:"list" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterInstancesWithLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterInstancesWithLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterInstancesWithLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterInstancesWithLoadBalancerInput"} - if s.Instances == nil { - invalidParams.Add(request.NewErrParamRequired("Instances")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstances sets the Instances field's value. -func (s *RegisterInstancesWithLoadBalancerInput) SetInstances(v []*Instance) *RegisterInstancesWithLoadBalancerInput { - s.Instances = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *RegisterInstancesWithLoadBalancerInput) SetLoadBalancerName(v string) *RegisterInstancesWithLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output of RegisterInstancesWithLoadBalancer. -type RegisterInstancesWithLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // The updated list of instances for the load balancer. - Instances []*Instance `type:"list"` -} - -// String returns the string representation -func (s RegisterInstancesWithLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterInstancesWithLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetInstances sets the Instances field's value. -func (s *RegisterInstancesWithLoadBalancerOutput) SetInstances(v []*Instance) *RegisterInstancesWithLoadBalancerOutput { - s.Instances = v - return s -} - -// Contains the parameters for RemoveTags. -type RemoveTagsInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. You can specify a maximum of one load balancer - // name. - // - // LoadBalancerNames is a required field - LoadBalancerNames []*string `type:"list" required:"true"` - - // The list of tag keys to remove. - // - // Tags is a required field - Tags []*TagKeyOnly `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"} - if s.LoadBalancerNames == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerNames sets the LoadBalancerNames field's value. -func (s *RemoveTagsInput) SetLoadBalancerNames(v []*string) *RemoveTagsInput { - s.LoadBalancerNames = v - return s -} - -// SetTags sets the Tags field's value. -func (s *RemoveTagsInput) SetTags(v []*TagKeyOnly) *RemoveTagsInput { - s.Tags = v - return s -} - -// Contains the output of RemoveTags. -type RemoveTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsOutput) GoString() string { - return s.String() -} - -// Contains the parameters for SetLoadBalancerListenerSSLCertificate. -type SetLoadBalancerListenerSSLCertificateInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The port that uses the specified SSL certificate. - // - // LoadBalancerPort is a required field - LoadBalancerPort *int64 `type:"integer" required:"true"` - - // The Amazon Resource Name (ARN) of the SSL certificate. - // - // SSLCertificateId is a required field - SSLCertificateId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SetLoadBalancerListenerSSLCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetLoadBalancerListenerSSLCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetLoadBalancerListenerSSLCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetLoadBalancerListenerSSLCertificateInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.LoadBalancerPort == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerPort")) - } - if s.SSLCertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("SSLCertificateId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *SetLoadBalancerListenerSSLCertificateInput) SetLoadBalancerName(v string) *SetLoadBalancerListenerSSLCertificateInput { - s.LoadBalancerName = &v - return s -} - -// SetLoadBalancerPort sets the LoadBalancerPort field's value. -func (s *SetLoadBalancerListenerSSLCertificateInput) SetLoadBalancerPort(v int64) *SetLoadBalancerListenerSSLCertificateInput { - s.LoadBalancerPort = &v - return s -} - -// SetSSLCertificateId sets the SSLCertificateId field's value. -func (s *SetLoadBalancerListenerSSLCertificateInput) SetSSLCertificateId(v string) *SetLoadBalancerListenerSSLCertificateInput { - s.SSLCertificateId = &v - return s -} - -// Contains the output of SetLoadBalancerListenerSSLCertificate. -type SetLoadBalancerListenerSSLCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetLoadBalancerListenerSSLCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetLoadBalancerListenerSSLCertificateOutput) GoString() string { - return s.String() -} - -// Contains the parameters for SetLoadBalancerPoliciesForBackendServer. -type SetLoadBalancerPoliciesForBackendServerInput struct { - _ struct{} `type:"structure"` - - // The port number associated with the EC2 instance. - // - // InstancePort is a required field - InstancePort *int64 `type:"integer" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The names of the policies. If the list is empty, then all current polices - // are removed from the EC2 instance. - // - // PolicyNames is a required field - PolicyNames []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s SetLoadBalancerPoliciesForBackendServerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetLoadBalancerPoliciesForBackendServerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetLoadBalancerPoliciesForBackendServerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetLoadBalancerPoliciesForBackendServerInput"} - if s.InstancePort == nil { - invalidParams.Add(request.NewErrParamRequired("InstancePort")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.PolicyNames == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstancePort sets the InstancePort field's value. -func (s *SetLoadBalancerPoliciesForBackendServerInput) SetInstancePort(v int64) *SetLoadBalancerPoliciesForBackendServerInput { - s.InstancePort = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *SetLoadBalancerPoliciesForBackendServerInput) SetLoadBalancerName(v string) *SetLoadBalancerPoliciesForBackendServerInput { - s.LoadBalancerName = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *SetLoadBalancerPoliciesForBackendServerInput) SetPolicyNames(v []*string) *SetLoadBalancerPoliciesForBackendServerInput { - s.PolicyNames = v - return s -} - -// Contains the output of SetLoadBalancerPoliciesForBackendServer. -type SetLoadBalancerPoliciesForBackendServerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetLoadBalancerPoliciesForBackendServerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetLoadBalancerPoliciesForBackendServerOutput) GoString() string { - return s.String() -} - -// Contains the parameters for SetLoadBalancePoliciesOfListener. -type SetLoadBalancerPoliciesOfListenerInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The external port of the load balancer. - // - // LoadBalancerPort is a required field - LoadBalancerPort *int64 `type:"integer" required:"true"` - - // The names of the policies. This list must include all policies to be enabled. - // If you omit a policy that is currently enabled, it is disabled. If the list - // is empty, all current policies are disabled. - // - // PolicyNames is a required field - PolicyNames []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s SetLoadBalancerPoliciesOfListenerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetLoadBalancerPoliciesOfListenerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetLoadBalancerPoliciesOfListenerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetLoadBalancerPoliciesOfListenerInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.LoadBalancerPort == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerPort")) - } - if s.PolicyNames == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *SetLoadBalancerPoliciesOfListenerInput) SetLoadBalancerName(v string) *SetLoadBalancerPoliciesOfListenerInput { - s.LoadBalancerName = &v - return s -} - -// SetLoadBalancerPort sets the LoadBalancerPort field's value. -func (s *SetLoadBalancerPoliciesOfListenerInput) SetLoadBalancerPort(v int64) *SetLoadBalancerPoliciesOfListenerInput { - s.LoadBalancerPort = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *SetLoadBalancerPoliciesOfListenerInput) SetPolicyNames(v []*string) *SetLoadBalancerPoliciesOfListenerInput { - s.PolicyNames = v - return s -} - -// Contains the output of SetLoadBalancePoliciesOfListener. -type SetLoadBalancerPoliciesOfListenerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetLoadBalancerPoliciesOfListenerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetLoadBalancerPoliciesOfListenerOutput) GoString() string { - return s.String() -} - -// Information about a source security group. -type SourceSecurityGroup struct { - _ struct{} `type:"structure"` - - // The name of the security group. - GroupName *string `type:"string"` - - // The owner of the security group. - OwnerAlias *string `type:"string"` -} - -// String returns the string representation -func (s SourceSecurityGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SourceSecurityGroup) GoString() string { - return s.String() -} - -// SetGroupName sets the GroupName field's value. -func (s *SourceSecurityGroup) SetGroupName(v string) *SourceSecurityGroup { - s.GroupName = &v - return s -} - -// SetOwnerAlias sets the OwnerAlias field's value. -func (s *SourceSecurityGroup) SetOwnerAlias(v string) *SourceSecurityGroup { - s.OwnerAlias = &v - return s -} - -// Information about a tag. -type Tag struct { - _ struct{} `type:"structure"` - - // The key of the tag. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The value of the tag. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// The tags associated with a load balancer. -type TagDescription struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - LoadBalancerName *string `type:"string"` - - // The tags. - Tags []*Tag `min:"1" type:"list"` -} - -// String returns the string representation -func (s TagDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagDescription) GoString() string { - return s.String() -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *TagDescription) SetLoadBalancerName(v string) *TagDescription { - s.LoadBalancerName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagDescription) SetTags(v []*Tag) *TagDescription { - s.Tags = v - return s -} - -// The key of a tag. -type TagKeyOnly struct { - _ struct{} `type:"structure"` - - // The name of the key. - Key *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s TagKeyOnly) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagKeyOnly) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagKeyOnly) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagKeyOnly"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *TagKeyOnly) SetKey(v string) *TagKeyOnly { - s.Key = &v - return s -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elb/doc.go deleted file mode 100644 index 0b93ed474..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/doc.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package elb provides the client and types for making API -// requests to Elastic Load Balancing. -// -// A load balancer can distribute incoming traffic across your EC2 instances. -// This enables you to increase the availability of your application. The load -// balancer also monitors the health of its registered instances and ensures -// that it routes traffic only to healthy instances. You configure your load -// balancer to accept incoming traffic by specifying one or more listeners, -// which are configured with a protocol and port number for connections from -// clients to the load balancer and a protocol and port number for connections -// from the load balancer to the instances. -// -// Elastic Load Balancing supports three types of load balancers: Application -// Load Balancers, Network Load Balancers, and Classic Load Balancers. You can -// select a load balancer based on your application needs. For more information, -// see the Elastic Load Balancing User Guide (http://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/). -// -// This reference covers the 2012-06-01 API, which supports Classic Load Balancers. -// The 2015-12-01 API supports Application Load Balancers and Network Load Balancers. -// -// To get started, create a load balancer with one or more listeners using CreateLoadBalancer. -// Register your instances with the load balancer using RegisterInstancesWithLoadBalancer. -// -// All Elastic Load Balancing operations are idempotent, which means that they -// complete at most one time. If you repeat an operation, it succeeds with a -// 200 OK response code. -// -// See https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01 for more information on this service. -// -// See elb package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elb/ -// -// Using the Client -// -// To contact Elastic Load Balancing 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 Elastic Load Balancing client ELB for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elb/#New -package elb diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elb/errors.go deleted file mode 100644 index 14f1e6717..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/errors.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elb - -const ( - - // ErrCodeAccessPointNotFoundException for service response error code - // "LoadBalancerNotFound". - // - // The specified load balancer does not exist. - ErrCodeAccessPointNotFoundException = "LoadBalancerNotFound" - - // ErrCodeCertificateNotFoundException for service response error code - // "CertificateNotFound". - // - // The specified ARN does not refer to a valid SSL certificate in AWS Identity - // and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if - // you recently uploaded the certificate to IAM, this error might indicate that - // the certificate is not fully available yet. - ErrCodeCertificateNotFoundException = "CertificateNotFound" - - // ErrCodeDependencyThrottleException for service response error code - // "DependencyThrottle". - // - // A request made by Elastic Load Balancing to another service exceeds the maximum - // request rate permitted for your account. - ErrCodeDependencyThrottleException = "DependencyThrottle" - - // ErrCodeDuplicateAccessPointNameException for service response error code - // "DuplicateLoadBalancerName". - // - // The specified load balancer name already exists for this account. - ErrCodeDuplicateAccessPointNameException = "DuplicateLoadBalancerName" - - // ErrCodeDuplicateListenerException for service response error code - // "DuplicateListener". - // - // A listener already exists for the specified load balancer name and port, - // but with a different instance port, protocol, or SSL certificate. - ErrCodeDuplicateListenerException = "DuplicateListener" - - // ErrCodeDuplicatePolicyNameException for service response error code - // "DuplicatePolicyName". - // - // A policy with the specified name already exists for this load balancer. - ErrCodeDuplicatePolicyNameException = "DuplicatePolicyName" - - // ErrCodeDuplicateTagKeysException for service response error code - // "DuplicateTagKeys". - // - // A tag key was specified more than once. - ErrCodeDuplicateTagKeysException = "DuplicateTagKeys" - - // ErrCodeInvalidConfigurationRequestException for service response error code - // "InvalidConfigurationRequest". - // - // The requested configuration change is not valid. - ErrCodeInvalidConfigurationRequestException = "InvalidConfigurationRequest" - - // ErrCodeInvalidEndPointException for service response error code - // "InvalidInstance". - // - // The specified endpoint is not valid. - ErrCodeInvalidEndPointException = "InvalidInstance" - - // ErrCodeInvalidSchemeException for service response error code - // "InvalidScheme". - // - // The specified value for the schema is not valid. You can only specify a scheme - // for load balancers in a VPC. - ErrCodeInvalidSchemeException = "InvalidScheme" - - // ErrCodeInvalidSecurityGroupException for service response error code - // "InvalidSecurityGroup". - // - // One or more of the specified security groups do not exist. - ErrCodeInvalidSecurityGroupException = "InvalidSecurityGroup" - - // ErrCodeInvalidSubnetException for service response error code - // "InvalidSubnet". - // - // The specified VPC has no associated Internet gateway. - ErrCodeInvalidSubnetException = "InvalidSubnet" - - // ErrCodeListenerNotFoundException for service response error code - // "ListenerNotFound". - // - // The load balancer does not have a listener configured at the specified port. - ErrCodeListenerNotFoundException = "ListenerNotFound" - - // ErrCodeLoadBalancerAttributeNotFoundException for service response error code - // "LoadBalancerAttributeNotFound". - // - // The specified load balancer attribute does not exist. - ErrCodeLoadBalancerAttributeNotFoundException = "LoadBalancerAttributeNotFound" - - // ErrCodeOperationNotPermittedException for service response error code - // "OperationNotPermitted". - // - // This operation is not allowed. - ErrCodeOperationNotPermittedException = "OperationNotPermitted" - - // ErrCodePolicyNotFoundException for service response error code - // "PolicyNotFound". - // - // One or more of the specified policies do not exist. - ErrCodePolicyNotFoundException = "PolicyNotFound" - - // ErrCodePolicyTypeNotFoundException for service response error code - // "PolicyTypeNotFound". - // - // One or more of the specified policy types do not exist. - ErrCodePolicyTypeNotFoundException = "PolicyTypeNotFound" - - // ErrCodeSubnetNotFoundException for service response error code - // "SubnetNotFound". - // - // One or more of the specified subnets do not exist. - ErrCodeSubnetNotFoundException = "SubnetNotFound" - - // ErrCodeTooManyAccessPointsException for service response error code - // "TooManyLoadBalancers". - // - // The quota for the number of load balancers has been reached. - ErrCodeTooManyAccessPointsException = "TooManyLoadBalancers" - - // ErrCodeTooManyPoliciesException for service response error code - // "TooManyPolicies". - // - // The quota for the number of policies for this load balancer has been reached. - ErrCodeTooManyPoliciesException = "TooManyPolicies" - - // ErrCodeTooManyTagsException for service response error code - // "TooManyTags". - // - // The quota for the number of tags that can be assigned to a load balancer - // has been reached. - ErrCodeTooManyTagsException = "TooManyTags" - - // ErrCodeUnsupportedProtocolException for service response error code - // "UnsupportedProtocol". - // - // The specified protocol or signature version is not supported. - ErrCodeUnsupportedProtocolException = "UnsupportedProtocol" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/service.go b/vendor/github.com/aws/aws-sdk-go/service/elb/service.go deleted file mode 100644 index 5dfdd322c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elb - -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/query" -) - -// ELB provides the API operation methods for making requests to -// Elastic Load Balancing. See this package's package overview docs -// for details on the service. -// -// ELB methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ELB 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 = "elasticloadbalancing" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Elastic Load Balancing" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ELB client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a ELB client from just a session. -// svc := elb.New(mySession) -// -// // Create a ELB client with additional configuration -// svc := elb.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ELB { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ELB { - svc := &ELB{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2012-06-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ELB operation and runs any -// custom request initialization. -func (c *ELB) 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/elb/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/elb/waiters.go deleted file mode 100644 index bdf449d36..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/waiters.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elb - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilAnyInstanceInService uses the Elastic Load Balancing API operation -// DescribeInstanceHealth to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELB) WaitUntilAnyInstanceInService(input *DescribeInstanceHealthInput) error { - return c.WaitUntilAnyInstanceInServiceWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilAnyInstanceInServiceWithContext is an extended version of WaitUntilAnyInstanceInService. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) WaitUntilAnyInstanceInServiceWithContext(ctx aws.Context, input *DescribeInstanceHealthInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilAnyInstanceInService", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "InstanceStates[].State", - Expected: "InService", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstanceHealthInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstanceHealthRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInstanceDeregistered uses the Elastic Load Balancing API operation -// DescribeInstanceHealth to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELB) WaitUntilInstanceDeregistered(input *DescribeInstanceHealthInput) error { - return c.WaitUntilInstanceDeregisteredWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceDeregisteredWithContext is an extended version of WaitUntilInstanceDeregistered. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) WaitUntilInstanceDeregisteredWithContext(ctx aws.Context, input *DescribeInstanceHealthInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceDeregistered", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "InstanceStates[].State", - Expected: "OutOfService", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidInstance", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstanceHealthInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstanceHealthRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInstanceInService uses the Elastic Load Balancing API operation -// DescribeInstanceHealth to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELB) WaitUntilInstanceInService(input *DescribeInstanceHealthInput) error { - return c.WaitUntilInstanceInServiceWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceInServiceWithContext is an extended version of WaitUntilInstanceInService. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELB) WaitUntilInstanceInServiceWithContext(ctx aws.Context, input *DescribeInstanceHealthInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceInService", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "InstanceStates[].State", - Expected: "InService", - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidInstance", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstanceHealthInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstanceHealthRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go deleted file mode 100644 index 89d85401b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go +++ /dev/null @@ -1,8704 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elbv2 - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/query" -) - -const opAddListenerCertificates = "AddListenerCertificates" - -// AddListenerCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the AddListenerCertificates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddListenerCertificates for more information on using the AddListenerCertificates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddListenerCertificatesRequest method. -// req, resp := client.AddListenerCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddListenerCertificates -func (c *ELBV2) AddListenerCertificatesRequest(input *AddListenerCertificatesInput) (req *request.Request, output *AddListenerCertificatesOutput) { - op := &request.Operation{ - Name: opAddListenerCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddListenerCertificatesInput{} - } - - output = &AddListenerCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddListenerCertificates API operation for Elastic Load Balancing. -// -// Adds the specified certificate to the specified HTTPS listener. -// -// If the certificate was already added, the call is successful but the certificate -// is not added again. -// -// To list the certificates for your listener, use DescribeListenerCertificates. -// To remove certificates from your listener, use RemoveListenerCertificates. -// To specify the default SSL server certificate, use ModifyListener. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation AddListenerCertificates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// * ErrCodeTooManyCertificatesException "TooManyCertificates" -// You've reached the limit on the number of certificates per load balancer. -// -// * ErrCodeCertificateNotFoundException "CertificateNotFound" -// The specified certificate does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddListenerCertificates -func (c *ELBV2) AddListenerCertificates(input *AddListenerCertificatesInput) (*AddListenerCertificatesOutput, error) { - req, out := c.AddListenerCertificatesRequest(input) - return out, req.Send() -} - -// AddListenerCertificatesWithContext is the same as AddListenerCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See AddListenerCertificates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) AddListenerCertificatesWithContext(ctx aws.Context, input *AddListenerCertificatesInput, opts ...request.Option) (*AddListenerCertificatesOutput, error) { - req, out := c.AddListenerCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddTags = "AddTags" - -// AddTagsRequest generates a "aws/request.Request" representing the -// client's request for the AddTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTags for more information on using the AddTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsRequest method. -// req, resp := client.AddTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddTags -func (c *ELBV2) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) { - op := &request.Operation{ - Name: opAddTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsInput{} - } - - output = &AddTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTags API operation for Elastic Load Balancing. -// -// Adds the specified tags to the specified Elastic Load Balancing resource. -// You can tag your Application Load Balancers, Network Load Balancers, and -// your target groups. -// -// Each tag consists of a key and an optional value. If a resource already has -// a tag with the same key, AddTags updates its value. -// -// To list the current tags for your resources, use DescribeTags. To remove -// tags from your resources, use RemoveTags. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation AddTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDuplicateTagKeysException "DuplicateTagKeys" -// A tag key was specified more than once. -// -// * ErrCodeTooManyTagsException "TooManyTags" -// You've reached the limit on the number of tags per load balancer. -// -// * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddTags -func (c *ELBV2) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - return out, req.Send() -} - -// AddTagsWithContext is the same as AddTags with the addition of -// the ability to pass a context and additional request options. -// -// See AddTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateListener = "CreateListener" - -// CreateListenerRequest generates a "aws/request.Request" representing the -// client's request for the CreateListener operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateListener for more information on using the CreateListener -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateListenerRequest method. -// req, resp := client.CreateListenerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateListener -func (c *ELBV2) CreateListenerRequest(input *CreateListenerInput) (req *request.Request, output *CreateListenerOutput) { - op := &request.Operation{ - Name: opCreateListener, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateListenerInput{} - } - - output = &CreateListenerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateListener API operation for Elastic Load Balancing. -// -// Creates a listener for the specified Application Load Balancer or Network -// Load Balancer. -// -// To update a listener, use ModifyListener. When you are finished with a listener, -// you can delete it using DeleteListener. If you are finished with both the -// listener and the load balancer, you can delete them both using DeleteLoadBalancer. -// -// This operation is idempotent, which means that it completes at most one time. -// If you attempt to create multiple listeners with the same settings, each -// call succeeds. -// -// For more information, see Listeners for Your Application Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html) -// in the Application Load Balancers Guide and Listeners for Your Network Load -// Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-listeners.html) -// in the Network Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation CreateListener for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDuplicateListenerException "DuplicateListener" -// A listener with the specified port already exists. -// -// * ErrCodeTooManyListenersException "TooManyListeners" -// You've reached the limit on the number of listeners per load balancer. -// -// * ErrCodeTooManyCertificatesException "TooManyCertificates" -// You've reached the limit on the number of certificates per load balancer. -// -// * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// * ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit" -// You've reached the limit on the number of load balancers per target group. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// * ErrCodeIncompatibleProtocolsException "IncompatibleProtocols" -// The specified configuration is not valid with this protocol. -// -// * ErrCodeSSLPolicyNotFoundException "SSLPolicyNotFound" -// The specified SSL policy does not exist. -// -// * ErrCodeCertificateNotFoundException "CertificateNotFound" -// The specified certificate does not exist. -// -// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol is not supported. -// -// * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId" -// You've reached the limit on the number of times a target can be registered -// with a load balancer. -// -// * ErrCodeTooManyTargetsException "TooManyTargets" -// You've reached the limit on the number of targets. -// -// * ErrCodeTooManyActionsException "TooManyActions" -// You've reached the limit on the number of actions per rule. -// -// * ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction" -// The requested action is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateListener -func (c *ELBV2) CreateListener(input *CreateListenerInput) (*CreateListenerOutput, error) { - req, out := c.CreateListenerRequest(input) - return out, req.Send() -} - -// CreateListenerWithContext is the same as CreateListener with the addition of -// the ability to pass a context and additional request options. -// -// See CreateListener for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) CreateListenerWithContext(ctx aws.Context, input *CreateListenerInput, opts ...request.Option) (*CreateListenerOutput, error) { - req, out := c.CreateListenerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLoadBalancer = "CreateLoadBalancer" - -// CreateLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the CreateLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLoadBalancer for more information on using the CreateLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLoadBalancerRequest method. -// req, resp := client.CreateLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateLoadBalancer -func (c *ELBV2) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *request.Request, output *CreateLoadBalancerOutput) { - op := &request.Operation{ - Name: opCreateLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLoadBalancerInput{} - } - - output = &CreateLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLoadBalancer API operation for Elastic Load Balancing. -// -// Creates an Application Load Balancer or a Network Load Balancer. -// -// When you create a load balancer, you can specify security groups, public -// subnets, IP address type, and tags. Otherwise, you could do so later using -// SetSecurityGroups, SetSubnets, SetIpAddressType, and AddTags. -// -// To create listeners for your load balancer, use CreateListener. To describe -// your current load balancers, see DescribeLoadBalancers. When you are finished -// with a load balancer, you can delete it using DeleteLoadBalancer. -// -// For limit information, see Limits for Your Application Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html) -// in the Application Load Balancers Guide and Limits for Your Network Load -// Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-limits.html) -// in the Network Load Balancers Guide. -// -// This operation is idempotent, which means that it completes at most one time. -// If you attempt to create multiple load balancers with the same settings, -// each call succeeds. -// -// For more information, see Application Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html) -// in the Application Load Balancers Guide and Network Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html) -// in the Network Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation CreateLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDuplicateLoadBalancerNameException "DuplicateLoadBalancerName" -// A load balancer with the specified name already exists. -// -// * ErrCodeTooManyLoadBalancersException "TooManyLoadBalancers" -// You've reached the limit on the number of load balancers for your AWS account. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// * ErrCodeSubnetNotFoundException "SubnetNotFound" -// The specified subnet does not exist. -// -// * ErrCodeInvalidSubnetException "InvalidSubnet" -// The specified subnet is out of available addresses. -// -// * ErrCodeInvalidSecurityGroupException "InvalidSecurityGroup" -// The specified security group does not exist. -// -// * ErrCodeInvalidSchemeException "InvalidScheme" -// The requested scheme is not valid. -// -// * ErrCodeTooManyTagsException "TooManyTags" -// You've reached the limit on the number of tags per load balancer. -// -// * ErrCodeDuplicateTagKeysException "DuplicateTagKeys" -// A tag key was specified more than once. -// -// * ErrCodeResourceInUseException "ResourceInUse" -// A specified resource is in use. -// -// * ErrCodeAllocationIdNotFoundException "AllocationIdNotFound" -// The specified allocation ID does not exist. -// -// * ErrCodeAvailabilityZoneNotSupportedException "AvailabilityZoneNotSupported" -// The specified Availability Zone is not supported. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermitted" -// This operation is not allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateLoadBalancer -func (c *ELBV2) CreateLoadBalancer(input *CreateLoadBalancerInput) (*CreateLoadBalancerOutput, error) { - req, out := c.CreateLoadBalancerRequest(input) - return out, req.Send() -} - -// CreateLoadBalancerWithContext is the same as CreateLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) CreateLoadBalancerWithContext(ctx aws.Context, input *CreateLoadBalancerInput, opts ...request.Option) (*CreateLoadBalancerOutput, error) { - req, out := c.CreateLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRule = "CreateRule" - -// CreateRuleRequest generates a "aws/request.Request" representing the -// client's request for the CreateRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRule for more information on using the CreateRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRuleRequest method. -// req, resp := client.CreateRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateRule -func (c *ELBV2) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, output *CreateRuleOutput) { - op := &request.Operation{ - Name: opCreateRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRuleInput{} - } - - output = &CreateRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRule API operation for Elastic Load Balancing. -// -// Creates a rule for the specified listener. The listener must be associated -// with an Application Load Balancer. -// -// Rules are evaluated in priority order, from the lowest value to the highest -// value. When the conditions for a rule are met, its actions are performed. -// If the conditions for no rules are met, the actions for the default rule -// are performed. For more information, see Listener Rules (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#listener-rules) -// in the Application Load Balancers Guide. -// -// To view your current rules, use DescribeRules. To update a rule, use ModifyRule. -// To set the priorities of your rules, use SetRulePriorities. To delete a rule, -// use DeleteRule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation CreateRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodePriorityInUseException "PriorityInUse" -// The specified priority is in use. -// -// * ErrCodeTooManyTargetGroupsException "TooManyTargetGroups" -// You've reached the limit on the number of target groups for your AWS account. -// -// * ErrCodeTooManyRulesException "TooManyRules" -// You've reached the limit on the number of rules per load balancer. -// -// * ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit" -// You've reached the limit on the number of load balancers per target group. -// -// * ErrCodeIncompatibleProtocolsException "IncompatibleProtocols" -// The specified configuration is not valid with this protocol. -// -// * ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId" -// You've reached the limit on the number of times a target can be registered -// with a load balancer. -// -// * ErrCodeTooManyTargetsException "TooManyTargets" -// You've reached the limit on the number of targets. -// -// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol is not supported. -// -// * ErrCodeTooManyActionsException "TooManyActions" -// You've reached the limit on the number of actions per rule. -// -// * ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction" -// The requested action is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateRule -func (c *ELBV2) CreateRule(input *CreateRuleInput) (*CreateRuleOutput, error) { - req, out := c.CreateRuleRequest(input) - return out, req.Send() -} - -// CreateRuleWithContext is the same as CreateRule with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) CreateRuleWithContext(ctx aws.Context, input *CreateRuleInput, opts ...request.Option) (*CreateRuleOutput, error) { - req, out := c.CreateRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTargetGroup = "CreateTargetGroup" - -// CreateTargetGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateTargetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTargetGroup for more information on using the CreateTargetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTargetGroupRequest method. -// req, resp := client.CreateTargetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateTargetGroup -func (c *ELBV2) CreateTargetGroupRequest(input *CreateTargetGroupInput) (req *request.Request, output *CreateTargetGroupOutput) { - op := &request.Operation{ - Name: opCreateTargetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTargetGroupInput{} - } - - output = &CreateTargetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTargetGroup API operation for Elastic Load Balancing. -// -// Creates a target group. -// -// To register targets with the target group, use RegisterTargets. To update -// the health check settings for the target group, use ModifyTargetGroup. To -// monitor the health of targets in the target group, use DescribeTargetHealth. -// -// To route traffic to the targets in a target group, specify the target group -// in an action using CreateListener or CreateRule. -// -// To delete a target group, use DeleteTargetGroup. -// -// This operation is idempotent, which means that it completes at most one time. -// If you attempt to create multiple target groups with the same settings, each -// call succeeds. -// -// For more information, see Target Groups for Your Application Load Balancers -// (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html) -// in the Application Load Balancers Guide or Target Groups for Your Network -// Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html) -// in the Network Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation CreateTargetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDuplicateTargetGroupNameException "DuplicateTargetGroupName" -// A target group with the specified name already exists. -// -// * ErrCodeTooManyTargetGroupsException "TooManyTargetGroups" -// You've reached the limit on the number of target groups for your AWS account. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateTargetGroup -func (c *ELBV2) CreateTargetGroup(input *CreateTargetGroupInput) (*CreateTargetGroupOutput, error) { - req, out := c.CreateTargetGroupRequest(input) - return out, req.Send() -} - -// CreateTargetGroupWithContext is the same as CreateTargetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTargetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) CreateTargetGroupWithContext(ctx aws.Context, input *CreateTargetGroupInput, opts ...request.Option) (*CreateTargetGroupOutput, error) { - req, out := c.CreateTargetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteListener = "DeleteListener" - -// DeleteListenerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteListener operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteListener for more information on using the DeleteListener -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteListenerRequest method. -// req, resp := client.DeleteListenerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteListener -func (c *ELBV2) DeleteListenerRequest(input *DeleteListenerInput) (req *request.Request, output *DeleteListenerOutput) { - op := &request.Operation{ - Name: opDeleteListener, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteListenerInput{} - } - - output = &DeleteListenerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteListener API operation for Elastic Load Balancing. -// -// Deletes the specified listener. -// -// Alternatively, your listener is deleted when you delete the load balancer -// to which it is attached, using DeleteLoadBalancer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DeleteListener for usage and error information. -// -// Returned Error Codes: -// * ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteListener -func (c *ELBV2) DeleteListener(input *DeleteListenerInput) (*DeleteListenerOutput, error) { - req, out := c.DeleteListenerRequest(input) - return out, req.Send() -} - -// DeleteListenerWithContext is the same as DeleteListener with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteListener for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DeleteListenerWithContext(ctx aws.Context, input *DeleteListenerInput, opts ...request.Option) (*DeleteListenerOutput, error) { - req, out := c.DeleteListenerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLoadBalancer = "DeleteLoadBalancer" - -// DeleteLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLoadBalancer for more information on using the DeleteLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLoadBalancerRequest method. -// req, resp := client.DeleteLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteLoadBalancer -func (c *ELBV2) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req *request.Request, output *DeleteLoadBalancerOutput) { - op := &request.Operation{ - Name: opDeleteLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLoadBalancerInput{} - } - - output = &DeleteLoadBalancerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLoadBalancer API operation for Elastic Load Balancing. -// -// Deletes the specified Application Load Balancer or Network Load Balancer -// and its attached listeners. -// -// You can't delete a load balancer if deletion protection is enabled. If the -// load balancer does not exist or has already been deleted, the call succeeds. -// -// Deleting a load balancer does not affect its registered targets. For example, -// your EC2 instances continue to run and are still registered to their target -// groups. If you no longer need these EC2 instances, you can stop or terminate -// them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DeleteLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermitted" -// This operation is not allowed. -// -// * ErrCodeResourceInUseException "ResourceInUse" -// A specified resource is in use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteLoadBalancer -func (c *ELBV2) DeleteLoadBalancer(input *DeleteLoadBalancerInput) (*DeleteLoadBalancerOutput, error) { - req, out := c.DeleteLoadBalancerRequest(input) - return out, req.Send() -} - -// DeleteLoadBalancerWithContext is the same as DeleteLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DeleteLoadBalancerWithContext(ctx aws.Context, input *DeleteLoadBalancerInput, opts ...request.Option) (*DeleteLoadBalancerOutput, error) { - req, out := c.DeleteLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRule = "DeleteRule" - -// DeleteRuleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRule for more information on using the DeleteRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRuleRequest method. -// req, resp := client.DeleteRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteRule -func (c *ELBV2) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, output *DeleteRuleOutput) { - op := &request.Operation{ - Name: opDeleteRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRuleInput{} - } - - output = &DeleteRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRule API operation for Elastic Load Balancing. -// -// Deletes the specified rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DeleteRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRuleNotFoundException "RuleNotFound" -// The specified rule does not exist. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermitted" -// This operation is not allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteRule -func (c *ELBV2) DeleteRule(input *DeleteRuleInput) (*DeleteRuleOutput, error) { - req, out := c.DeleteRuleRequest(input) - return out, req.Send() -} - -// DeleteRuleWithContext is the same as DeleteRule with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DeleteRuleWithContext(ctx aws.Context, input *DeleteRuleInput, opts ...request.Option) (*DeleteRuleOutput, error) { - req, out := c.DeleteRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTargetGroup = "DeleteTargetGroup" - -// DeleteTargetGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTargetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTargetGroup for more information on using the DeleteTargetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTargetGroupRequest method. -// req, resp := client.DeleteTargetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteTargetGroup -func (c *ELBV2) DeleteTargetGroupRequest(input *DeleteTargetGroupInput) (req *request.Request, output *DeleteTargetGroupOutput) { - op := &request.Operation{ - Name: opDeleteTargetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTargetGroupInput{} - } - - output = &DeleteTargetGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTargetGroup API operation for Elastic Load Balancing. -// -// Deletes the specified target group. -// -// You can delete a target group if it is not referenced by any actions. Deleting -// a target group also deletes any associated health checks. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DeleteTargetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUseException "ResourceInUse" -// A specified resource is in use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteTargetGroup -func (c *ELBV2) DeleteTargetGroup(input *DeleteTargetGroupInput) (*DeleteTargetGroupOutput, error) { - req, out := c.DeleteTargetGroupRequest(input) - return out, req.Send() -} - -// DeleteTargetGroupWithContext is the same as DeleteTargetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTargetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DeleteTargetGroupWithContext(ctx aws.Context, input *DeleteTargetGroupInput, opts ...request.Option) (*DeleteTargetGroupOutput, error) { - req, out := c.DeleteTargetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterTargets = "DeregisterTargets" - -// DeregisterTargetsRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterTargets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterTargets for more information on using the DeregisterTargets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterTargetsRequest method. -// req, resp := client.DeregisterTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeregisterTargets -func (c *ELBV2) DeregisterTargetsRequest(input *DeregisterTargetsInput) (req *request.Request, output *DeregisterTargetsOutput) { - op := &request.Operation{ - Name: opDeregisterTargets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterTargetsInput{} - } - - output = &DeregisterTargetsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterTargets API operation for Elastic Load Balancing. -// -// Deregisters the specified targets from the specified target group. After -// the targets are deregistered, they no longer receive traffic from the load -// balancer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DeregisterTargets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// * ErrCodeInvalidTargetException "InvalidTarget" -// The specified target does not exist, is not in the same VPC as the target -// group, or has an unsupported instance type. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeregisterTargets -func (c *ELBV2) DeregisterTargets(input *DeregisterTargetsInput) (*DeregisterTargetsOutput, error) { - req, out := c.DeregisterTargetsRequest(input) - return out, req.Send() -} - -// DeregisterTargetsWithContext is the same as DeregisterTargets with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterTargets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DeregisterTargetsWithContext(ctx aws.Context, input *DeregisterTargetsInput, opts ...request.Option) (*DeregisterTargetsOutput, error) { - req, out := c.DeregisterTargetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccountLimits = "DescribeAccountLimits" - -// DescribeAccountLimitsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountLimits operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccountLimits for more information on using the DescribeAccountLimits -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAccountLimitsRequest method. -// req, resp := client.DescribeAccountLimitsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeAccountLimits -func (c *ELBV2) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) (req *request.Request, output *DescribeAccountLimitsOutput) { - op := &request.Operation{ - Name: opDescribeAccountLimits, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAccountLimitsInput{} - } - - output = &DescribeAccountLimitsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccountLimits API operation for Elastic Load Balancing. -// -// Describes the current Elastic Load Balancing resource limits for your AWS -// account. -// -// For more information, see Limits for Your Application Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html) -// in the Application Load Balancer Guide or Limits for Your Network Load Balancers -// (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-limits.html) -// in the Network Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeAccountLimits for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeAccountLimits -func (c *ELBV2) DescribeAccountLimits(input *DescribeAccountLimitsInput) (*DescribeAccountLimitsOutput, error) { - req, out := c.DescribeAccountLimitsRequest(input) - return out, req.Send() -} - -// DescribeAccountLimitsWithContext is the same as DescribeAccountLimits with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountLimits for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DescribeAccountLimitsWithContext(ctx aws.Context, input *DescribeAccountLimitsInput, opts ...request.Option) (*DescribeAccountLimitsOutput, error) { - req, out := c.DescribeAccountLimitsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeListenerCertificates = "DescribeListenerCertificates" - -// DescribeListenerCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeListenerCertificates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeListenerCertificates for more information on using the DescribeListenerCertificates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeListenerCertificatesRequest method. -// req, resp := client.DescribeListenerCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListenerCertificates -func (c *ELBV2) DescribeListenerCertificatesRequest(input *DescribeListenerCertificatesInput) (req *request.Request, output *DescribeListenerCertificatesOutput) { - op := &request.Operation{ - Name: opDescribeListenerCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeListenerCertificatesInput{} - } - - output = &DescribeListenerCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeListenerCertificates API operation for Elastic Load Balancing. -// -// Describes the certificates for the specified HTTPS listener. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeListenerCertificates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListenerCertificates -func (c *ELBV2) DescribeListenerCertificates(input *DescribeListenerCertificatesInput) (*DescribeListenerCertificatesOutput, error) { - req, out := c.DescribeListenerCertificatesRequest(input) - return out, req.Send() -} - -// DescribeListenerCertificatesWithContext is the same as DescribeListenerCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeListenerCertificates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DescribeListenerCertificatesWithContext(ctx aws.Context, input *DescribeListenerCertificatesInput, opts ...request.Option) (*DescribeListenerCertificatesOutput, error) { - req, out := c.DescribeListenerCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeListeners = "DescribeListeners" - -// DescribeListenersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeListeners operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeListeners for more information on using the DescribeListeners -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeListenersRequest method. -// req, resp := client.DescribeListenersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListeners -func (c *ELBV2) DescribeListenersRequest(input *DescribeListenersInput) (req *request.Request, output *DescribeListenersOutput) { - op := &request.Operation{ - Name: opDescribeListeners, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeListenersInput{} - } - - output = &DescribeListenersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeListeners API operation for Elastic Load Balancing. -// -// Describes the specified listeners or the listeners for the specified Application -// Load Balancer or Network Load Balancer. You must specify either a load balancer -// or one or more listeners. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeListeners for usage and error information. -// -// Returned Error Codes: -// * ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListeners -func (c *ELBV2) DescribeListeners(input *DescribeListenersInput) (*DescribeListenersOutput, error) { - req, out := c.DescribeListenersRequest(input) - return out, req.Send() -} - -// DescribeListenersWithContext is the same as DescribeListeners with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeListeners for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DescribeListenersWithContext(ctx aws.Context, input *DescribeListenersInput, opts ...request.Option) (*DescribeListenersOutput, error) { - req, out := c.DescribeListenersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeListenersPages iterates over the pages of a DescribeListeners operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeListeners 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 DescribeListeners operation. -// pageNum := 0 -// err := client.DescribeListenersPages(params, -// func(page *DescribeListenersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ELBV2) DescribeListenersPages(input *DescribeListenersInput, fn func(*DescribeListenersOutput, bool) bool) error { - return c.DescribeListenersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeListenersPagesWithContext same as DescribeListenersPages 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 *ELBV2) DescribeListenersPagesWithContext(ctx aws.Context, input *DescribeListenersInput, fn func(*DescribeListenersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeListenersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeListenersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeListenersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeLoadBalancerAttributes = "DescribeLoadBalancerAttributes" - -// DescribeLoadBalancerAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBalancerAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLoadBalancerAttributes for more information on using the DescribeLoadBalancerAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLoadBalancerAttributesRequest method. -// req, resp := client.DescribeLoadBalancerAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeLoadBalancerAttributes -func (c *ELBV2) DescribeLoadBalancerAttributesRequest(input *DescribeLoadBalancerAttributesInput) (req *request.Request, output *DescribeLoadBalancerAttributesOutput) { - op := &request.Operation{ - Name: opDescribeLoadBalancerAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLoadBalancerAttributesInput{} - } - - output = &DescribeLoadBalancerAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBalancerAttributes API operation for Elastic Load Balancing. -// -// Describes the attributes for the specified Application Load Balancer or Network -// Load Balancer. -// -// For more information, see Load Balancer Attributes (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#load-balancer-attributes) -// in the Application Load Balancers Guide or Load Balancer Attributes (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#load-balancer-attributes) -// in the Network Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeLoadBalancerAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeLoadBalancerAttributes -func (c *ELBV2) DescribeLoadBalancerAttributes(input *DescribeLoadBalancerAttributesInput) (*DescribeLoadBalancerAttributesOutput, error) { - req, out := c.DescribeLoadBalancerAttributesRequest(input) - return out, req.Send() -} - -// DescribeLoadBalancerAttributesWithContext is the same as DescribeLoadBalancerAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBalancerAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DescribeLoadBalancerAttributesWithContext(ctx aws.Context, input *DescribeLoadBalancerAttributesInput, opts ...request.Option) (*DescribeLoadBalancerAttributesOutput, error) { - req, out := c.DescribeLoadBalancerAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLoadBalancers = "DescribeLoadBalancers" - -// DescribeLoadBalancersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBalancers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLoadBalancers for more information on using the DescribeLoadBalancers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLoadBalancersRequest method. -// req, resp := client.DescribeLoadBalancersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeLoadBalancers -func (c *ELBV2) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *request.Request, output *DescribeLoadBalancersOutput) { - op := &request.Operation{ - Name: opDescribeLoadBalancers, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeLoadBalancersInput{} - } - - output = &DescribeLoadBalancersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBalancers API operation for Elastic Load Balancing. -// -// Describes the specified load balancers or all of your load balancers. -// -// To describe the listeners for a load balancer, use DescribeListeners. To -// describe the attributes for a load balancer, use DescribeLoadBalancerAttributes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeLoadBalancers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeLoadBalancers -func (c *ELBV2) DescribeLoadBalancers(input *DescribeLoadBalancersInput) (*DescribeLoadBalancersOutput, error) { - req, out := c.DescribeLoadBalancersRequest(input) - return out, req.Send() -} - -// DescribeLoadBalancersWithContext is the same as DescribeLoadBalancers with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBalancers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DescribeLoadBalancersWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.Option) (*DescribeLoadBalancersOutput, error) { - req, out := c.DescribeLoadBalancersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeLoadBalancersPages iterates over the pages of a DescribeLoadBalancers operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeLoadBalancers 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 DescribeLoadBalancers operation. -// pageNum := 0 -// err := client.DescribeLoadBalancersPages(params, -// func(page *DescribeLoadBalancersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ELBV2) DescribeLoadBalancersPages(input *DescribeLoadBalancersInput, fn func(*DescribeLoadBalancersOutput, bool) bool) error { - return c.DescribeLoadBalancersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeLoadBalancersPagesWithContext same as DescribeLoadBalancersPages 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 *ELBV2) DescribeLoadBalancersPagesWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, fn func(*DescribeLoadBalancersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeLoadBalancersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLoadBalancersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeLoadBalancersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeRules = "DescribeRules" - -// DescribeRulesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRules operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRules for more information on using the DescribeRules -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRulesRequest method. -// req, resp := client.DescribeRulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeRules -func (c *ELBV2) DescribeRulesRequest(input *DescribeRulesInput) (req *request.Request, output *DescribeRulesOutput) { - op := &request.Operation{ - Name: opDescribeRules, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeRulesInput{} - } - - output = &DescribeRulesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRules API operation for Elastic Load Balancing. -// -// Describes the specified rules or the rules for the specified listener. You -// must specify either a listener or one or more rules. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeRules for usage and error information. -// -// Returned Error Codes: -// * ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// * ErrCodeRuleNotFoundException "RuleNotFound" -// The specified rule does not exist. -// -// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeRules -func (c *ELBV2) DescribeRules(input *DescribeRulesInput) (*DescribeRulesOutput, error) { - req, out := c.DescribeRulesRequest(input) - return out, req.Send() -} - -// DescribeRulesWithContext is the same as DescribeRules with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRules for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DescribeRulesWithContext(ctx aws.Context, input *DescribeRulesInput, opts ...request.Option) (*DescribeRulesOutput, error) { - req, out := c.DescribeRulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSSLPolicies = "DescribeSSLPolicies" - -// DescribeSSLPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSSLPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSSLPolicies for more information on using the DescribeSSLPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSSLPoliciesRequest method. -// req, resp := client.DescribeSSLPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeSSLPolicies -func (c *ELBV2) DescribeSSLPoliciesRequest(input *DescribeSSLPoliciesInput) (req *request.Request, output *DescribeSSLPoliciesOutput) { - op := &request.Operation{ - Name: opDescribeSSLPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSSLPoliciesInput{} - } - - output = &DescribeSSLPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSSLPolicies API operation for Elastic Load Balancing. -// -// Describes the specified policies or all policies used for SSL negotiation. -// -// For more information, see Security Policies (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) -// in the Application Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeSSLPolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSSLPolicyNotFoundException "SSLPolicyNotFound" -// The specified SSL policy does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeSSLPolicies -func (c *ELBV2) DescribeSSLPolicies(input *DescribeSSLPoliciesInput) (*DescribeSSLPoliciesOutput, error) { - req, out := c.DescribeSSLPoliciesRequest(input) - return out, req.Send() -} - -// DescribeSSLPoliciesWithContext is the same as DescribeSSLPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSSLPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DescribeSSLPoliciesWithContext(ctx aws.Context, input *DescribeSSLPoliciesInput, opts ...request.Option) (*DescribeSSLPoliciesOutput, error) { - req, out := c.DescribeSSLPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTags = "DescribeTags" - -// DescribeTagsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTags for more information on using the DescribeTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTagsRequest method. -// req, resp := client.DescribeTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTags -func (c *ELBV2) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { - op := &request.Operation{ - Name: opDescribeTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTagsInput{} - } - - output = &DescribeTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTags API operation for Elastic Load Balancing. -// -// Describes the tags for the specified resources. You can describe the tags -// for one or more Application Load Balancers, Network Load Balancers, and target -// 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 Elastic Load Balancing's -// API operation DescribeTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// * ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// * ErrCodeRuleNotFoundException "RuleNotFound" -// The specified rule does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTags -func (c *ELBV2) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - return out, req.Send() -} - -// DescribeTagsWithContext is the same as DescribeTags with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTargetGroupAttributes = "DescribeTargetGroupAttributes" - -// DescribeTargetGroupAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTargetGroupAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTargetGroupAttributes for more information on using the DescribeTargetGroupAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTargetGroupAttributesRequest method. -// req, resp := client.DescribeTargetGroupAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetGroupAttributes -func (c *ELBV2) DescribeTargetGroupAttributesRequest(input *DescribeTargetGroupAttributesInput) (req *request.Request, output *DescribeTargetGroupAttributesOutput) { - op := &request.Operation{ - Name: opDescribeTargetGroupAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTargetGroupAttributesInput{} - } - - output = &DescribeTargetGroupAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTargetGroupAttributes API operation for Elastic Load Balancing. -// -// Describes the attributes for the specified target group. -// -// For more information, see Target Group Attributes (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#target-group-attributes) -// in the Application Load Balancers Guide or Target Group Attributes (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#target-group-attributes) -// in the Network Load Balancers Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeTargetGroupAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetGroupAttributes -func (c *ELBV2) DescribeTargetGroupAttributes(input *DescribeTargetGroupAttributesInput) (*DescribeTargetGroupAttributesOutput, error) { - req, out := c.DescribeTargetGroupAttributesRequest(input) - return out, req.Send() -} - -// DescribeTargetGroupAttributesWithContext is the same as DescribeTargetGroupAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTargetGroupAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DescribeTargetGroupAttributesWithContext(ctx aws.Context, input *DescribeTargetGroupAttributesInput, opts ...request.Option) (*DescribeTargetGroupAttributesOutput, error) { - req, out := c.DescribeTargetGroupAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTargetGroups = "DescribeTargetGroups" - -// DescribeTargetGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTargetGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTargetGroups for more information on using the DescribeTargetGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTargetGroupsRequest method. -// req, resp := client.DescribeTargetGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetGroups -func (c *ELBV2) DescribeTargetGroupsRequest(input *DescribeTargetGroupsInput) (req *request.Request, output *DescribeTargetGroupsOutput) { - op := &request.Operation{ - Name: opDescribeTargetGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeTargetGroupsInput{} - } - - output = &DescribeTargetGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTargetGroups API operation for Elastic Load Balancing. -// -// Describes the specified target groups or all of your target groups. By default, -// all target groups are described. Alternatively, you can specify one of the -// following to filter the results: the ARN of the load balancer, the names -// of one or more target groups, or the ARNs of one or more target groups. -// -// To describe the targets for a target group, use DescribeTargetHealth. To -// describe the attributes of a target group, use DescribeTargetGroupAttributes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeTargetGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetGroups -func (c *ELBV2) DescribeTargetGroups(input *DescribeTargetGroupsInput) (*DescribeTargetGroupsOutput, error) { - req, out := c.DescribeTargetGroupsRequest(input) - return out, req.Send() -} - -// DescribeTargetGroupsWithContext is the same as DescribeTargetGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTargetGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DescribeTargetGroupsWithContext(ctx aws.Context, input *DescribeTargetGroupsInput, opts ...request.Option) (*DescribeTargetGroupsOutput, error) { - req, out := c.DescribeTargetGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeTargetGroupsPages iterates over the pages of a DescribeTargetGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeTargetGroups 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 DescribeTargetGroups operation. -// pageNum := 0 -// err := client.DescribeTargetGroupsPages(params, -// func(page *DescribeTargetGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ELBV2) DescribeTargetGroupsPages(input *DescribeTargetGroupsInput, fn func(*DescribeTargetGroupsOutput, bool) bool) error { - return c.DescribeTargetGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeTargetGroupsPagesWithContext same as DescribeTargetGroupsPages 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 *ELBV2) DescribeTargetGroupsPagesWithContext(ctx aws.Context, input *DescribeTargetGroupsInput, fn func(*DescribeTargetGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeTargetGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTargetGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTargetGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeTargetHealth = "DescribeTargetHealth" - -// DescribeTargetHealthRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTargetHealth operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTargetHealth for more information on using the DescribeTargetHealth -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTargetHealthRequest method. -// req, resp := client.DescribeTargetHealthRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetHealth -func (c *ELBV2) DescribeTargetHealthRequest(input *DescribeTargetHealthInput) (req *request.Request, output *DescribeTargetHealthOutput) { - op := &request.Operation{ - Name: opDescribeTargetHealth, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTargetHealthInput{} - } - - output = &DescribeTargetHealthOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTargetHealth API operation for Elastic Load Balancing. -// -// Describes the health of the specified targets or all of your targets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation DescribeTargetHealth for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidTargetException "InvalidTarget" -// The specified target does not exist, is not in the same VPC as the target -// group, or has an unsupported instance type. -// -// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// * ErrCodeHealthUnavailableException "HealthUnavailable" -// The health of the specified targets could not be retrieved due to an internal -// error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetHealth -func (c *ELBV2) DescribeTargetHealth(input *DescribeTargetHealthInput) (*DescribeTargetHealthOutput, error) { - req, out := c.DescribeTargetHealthRequest(input) - return out, req.Send() -} - -// DescribeTargetHealthWithContext is the same as DescribeTargetHealth with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTargetHealth for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) DescribeTargetHealthWithContext(ctx aws.Context, input *DescribeTargetHealthInput, opts ...request.Option) (*DescribeTargetHealthOutput, error) { - req, out := c.DescribeTargetHealthRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyListener = "ModifyListener" - -// ModifyListenerRequest generates a "aws/request.Request" representing the -// client's request for the ModifyListener operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyListener for more information on using the ModifyListener -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyListenerRequest method. -// req, resp := client.ModifyListenerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyListener -func (c *ELBV2) ModifyListenerRequest(input *ModifyListenerInput) (req *request.Request, output *ModifyListenerOutput) { - op := &request.Operation{ - Name: opModifyListener, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyListenerInput{} - } - - output = &ModifyListenerOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyListener API operation for Elastic Load Balancing. -// -// Modifies the specified properties of the specified listener. -// -// Any properties that you do not specify retain their current values. However, -// changing the protocol from HTTPS to HTTP, or from TLS to TCP, removes the -// security policy and server certificate properties. If you change the protocol -// from HTTP to HTTPS, or from TCP to TLS, you must add the security policy -// and server certificate properties. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation ModifyListener for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDuplicateListenerException "DuplicateListener" -// A listener with the specified port already exists. -// -// * ErrCodeTooManyListenersException "TooManyListeners" -// You've reached the limit on the number of listeners per load balancer. -// -// * ErrCodeTooManyCertificatesException "TooManyCertificates" -// You've reached the limit on the number of certificates per load balancer. -// -// * ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// * ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit" -// You've reached the limit on the number of load balancers per target group. -// -// * ErrCodeIncompatibleProtocolsException "IncompatibleProtocols" -// The specified configuration is not valid with this protocol. -// -// * ErrCodeSSLPolicyNotFoundException "SSLPolicyNotFound" -// The specified SSL policy does not exist. -// -// * ErrCodeCertificateNotFoundException "CertificateNotFound" -// The specified certificate does not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol is not supported. -// -// * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId" -// You've reached the limit on the number of times a target can be registered -// with a load balancer. -// -// * ErrCodeTooManyTargetsException "TooManyTargets" -// You've reached the limit on the number of targets. -// -// * ErrCodeTooManyActionsException "TooManyActions" -// You've reached the limit on the number of actions per rule. -// -// * ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction" -// The requested action is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyListener -func (c *ELBV2) ModifyListener(input *ModifyListenerInput) (*ModifyListenerOutput, error) { - req, out := c.ModifyListenerRequest(input) - return out, req.Send() -} - -// ModifyListenerWithContext is the same as ModifyListener with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyListener for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) ModifyListenerWithContext(ctx aws.Context, input *ModifyListenerInput, opts ...request.Option) (*ModifyListenerOutput, error) { - req, out := c.ModifyListenerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyLoadBalancerAttributes = "ModifyLoadBalancerAttributes" - -// ModifyLoadBalancerAttributesRequest generates a "aws/request.Request" representing the -// client's request for the ModifyLoadBalancerAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyLoadBalancerAttributes for more information on using the ModifyLoadBalancerAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyLoadBalancerAttributesRequest method. -// req, resp := client.ModifyLoadBalancerAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyLoadBalancerAttributes -func (c *ELBV2) ModifyLoadBalancerAttributesRequest(input *ModifyLoadBalancerAttributesInput) (req *request.Request, output *ModifyLoadBalancerAttributesOutput) { - op := &request.Operation{ - Name: opModifyLoadBalancerAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyLoadBalancerAttributesInput{} - } - - output = &ModifyLoadBalancerAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyLoadBalancerAttributes API operation for Elastic Load Balancing. -// -// Modifies the specified attributes of the specified Application Load Balancer -// or Network Load Balancer. -// -// If any of the specified attributes can't be modified as requested, the call -// fails. Any existing attributes that you do not modify retain their current -// values. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation ModifyLoadBalancerAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyLoadBalancerAttributes -func (c *ELBV2) ModifyLoadBalancerAttributes(input *ModifyLoadBalancerAttributesInput) (*ModifyLoadBalancerAttributesOutput, error) { - req, out := c.ModifyLoadBalancerAttributesRequest(input) - return out, req.Send() -} - -// ModifyLoadBalancerAttributesWithContext is the same as ModifyLoadBalancerAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyLoadBalancerAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) ModifyLoadBalancerAttributesWithContext(ctx aws.Context, input *ModifyLoadBalancerAttributesInput, opts ...request.Option) (*ModifyLoadBalancerAttributesOutput, error) { - req, out := c.ModifyLoadBalancerAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyRule = "ModifyRule" - -// ModifyRuleRequest generates a "aws/request.Request" representing the -// client's request for the ModifyRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyRule for more information on using the ModifyRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyRuleRequest method. -// req, resp := client.ModifyRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyRule -func (c *ELBV2) ModifyRuleRequest(input *ModifyRuleInput) (req *request.Request, output *ModifyRuleOutput) { - op := &request.Operation{ - Name: opModifyRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyRuleInput{} - } - - output = &ModifyRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyRule API operation for Elastic Load Balancing. -// -// Modifies the specified rule. -// -// Any existing properties that you do not modify retain their current values. -// -// To modify the actions for the default rule, use ModifyListener. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation ModifyRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit" -// You've reached the limit on the number of load balancers per target group. -// -// * ErrCodeIncompatibleProtocolsException "IncompatibleProtocols" -// The specified configuration is not valid with this protocol. -// -// * ErrCodeRuleNotFoundException "RuleNotFound" -// The specified rule does not exist. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermitted" -// This operation is not allowed. -// -// * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId" -// You've reached the limit on the number of times a target can be registered -// with a load balancer. -// -// * ErrCodeTooManyTargetsException "TooManyTargets" -// You've reached the limit on the number of targets. -// -// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol is not supported. -// -// * ErrCodeTooManyActionsException "TooManyActions" -// You've reached the limit on the number of actions per rule. -// -// * ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction" -// The requested action is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyRule -func (c *ELBV2) ModifyRule(input *ModifyRuleInput) (*ModifyRuleOutput, error) { - req, out := c.ModifyRuleRequest(input) - return out, req.Send() -} - -// ModifyRuleWithContext is the same as ModifyRule with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) ModifyRuleWithContext(ctx aws.Context, input *ModifyRuleInput, opts ...request.Option) (*ModifyRuleOutput, error) { - req, out := c.ModifyRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyTargetGroup = "ModifyTargetGroup" - -// ModifyTargetGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyTargetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyTargetGroup for more information on using the ModifyTargetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyTargetGroupRequest method. -// req, resp := client.ModifyTargetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroup -func (c *ELBV2) ModifyTargetGroupRequest(input *ModifyTargetGroupInput) (req *request.Request, output *ModifyTargetGroupOutput) { - op := &request.Operation{ - Name: opModifyTargetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyTargetGroupInput{} - } - - output = &ModifyTargetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyTargetGroup API operation for Elastic Load Balancing. -// -// Modifies the health checks used when evaluating the health state of the targets -// in the specified target group. -// -// To monitor the health of the targets, use DescribeTargetHealth. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation ModifyTargetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroup -func (c *ELBV2) ModifyTargetGroup(input *ModifyTargetGroupInput) (*ModifyTargetGroupOutput, error) { - req, out := c.ModifyTargetGroupRequest(input) - return out, req.Send() -} - -// ModifyTargetGroupWithContext is the same as ModifyTargetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyTargetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) ModifyTargetGroupWithContext(ctx aws.Context, input *ModifyTargetGroupInput, opts ...request.Option) (*ModifyTargetGroupOutput, error) { - req, out := c.ModifyTargetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyTargetGroupAttributes = "ModifyTargetGroupAttributes" - -// ModifyTargetGroupAttributesRequest generates a "aws/request.Request" representing the -// client's request for the ModifyTargetGroupAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyTargetGroupAttributes for more information on using the ModifyTargetGroupAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyTargetGroupAttributesRequest method. -// req, resp := client.ModifyTargetGroupAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroupAttributes -func (c *ELBV2) ModifyTargetGroupAttributesRequest(input *ModifyTargetGroupAttributesInput) (req *request.Request, output *ModifyTargetGroupAttributesOutput) { - op := &request.Operation{ - Name: opModifyTargetGroupAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyTargetGroupAttributesInput{} - } - - output = &ModifyTargetGroupAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyTargetGroupAttributes API operation for Elastic Load Balancing. -// -// Modifies the specified attributes of the specified target 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 Elastic Load Balancing's -// API operation ModifyTargetGroupAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroupAttributes -func (c *ELBV2) ModifyTargetGroupAttributes(input *ModifyTargetGroupAttributesInput) (*ModifyTargetGroupAttributesOutput, error) { - req, out := c.ModifyTargetGroupAttributesRequest(input) - return out, req.Send() -} - -// ModifyTargetGroupAttributesWithContext is the same as ModifyTargetGroupAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyTargetGroupAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) ModifyTargetGroupAttributesWithContext(ctx aws.Context, input *ModifyTargetGroupAttributesInput, opts ...request.Option) (*ModifyTargetGroupAttributesOutput, error) { - req, out := c.ModifyTargetGroupAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterTargets = "RegisterTargets" - -// RegisterTargetsRequest generates a "aws/request.Request" representing the -// client's request for the RegisterTargets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterTargets for more information on using the RegisterTargets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterTargetsRequest method. -// req, resp := client.RegisterTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RegisterTargets -func (c *ELBV2) RegisterTargetsRequest(input *RegisterTargetsInput) (req *request.Request, output *RegisterTargetsOutput) { - op := &request.Operation{ - Name: opRegisterTargets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterTargetsInput{} - } - - output = &RegisterTargetsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RegisterTargets API operation for Elastic Load Balancing. -// -// Registers the specified targets with the specified target group. -// -// If the target is an EC2 instance, it must be in the running state when you -// register it. -// -// By default, the load balancer routes requests to registered targets using -// the protocol and port for the target group. Alternatively, you can override -// the port for a target when you register it. You can register each EC2 instance -// or IP address with the same target group multiple times using different ports. -// -// With a Network Load Balancer, you cannot register instances by instance ID -// if they have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, -// G1, G2, HI1, HS1, M1, M2, M3, and T1. You can register instances of these -// types by IP address. -// -// To remove a target from a target group, use DeregisterTargets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation RegisterTargets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// * ErrCodeTooManyTargetsException "TooManyTargets" -// You've reached the limit on the number of targets. -// -// * ErrCodeInvalidTargetException "InvalidTarget" -// The specified target does not exist, is not in the same VPC as the target -// group, or has an unsupported instance type. -// -// * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId" -// You've reached the limit on the number of times a target can be registered -// with a load balancer. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RegisterTargets -func (c *ELBV2) RegisterTargets(input *RegisterTargetsInput) (*RegisterTargetsOutput, error) { - req, out := c.RegisterTargetsRequest(input) - return out, req.Send() -} - -// RegisterTargetsWithContext is the same as RegisterTargets with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterTargets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) RegisterTargetsWithContext(ctx aws.Context, input *RegisterTargetsInput, opts ...request.Option) (*RegisterTargetsOutput, error) { - req, out := c.RegisterTargetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveListenerCertificates = "RemoveListenerCertificates" - -// RemoveListenerCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the RemoveListenerCertificates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveListenerCertificates for more information on using the RemoveListenerCertificates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveListenerCertificatesRequest method. -// req, resp := client.RemoveListenerCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveListenerCertificates -func (c *ELBV2) RemoveListenerCertificatesRequest(input *RemoveListenerCertificatesInput) (req *request.Request, output *RemoveListenerCertificatesOutput) { - op := &request.Operation{ - Name: opRemoveListenerCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveListenerCertificatesInput{} - } - - output = &RemoveListenerCertificatesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveListenerCertificates API operation for Elastic Load Balancing. -// -// Removes the specified certificate from the specified HTTPS listener. -// -// You can't remove the default certificate for a listener. To replace the default -// certificate, call ModifyListener. -// -// To list the certificates for your listener, use DescribeListenerCertificates. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation RemoveListenerCertificates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermitted" -// This operation is not allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveListenerCertificates -func (c *ELBV2) RemoveListenerCertificates(input *RemoveListenerCertificatesInput) (*RemoveListenerCertificatesOutput, error) { - req, out := c.RemoveListenerCertificatesRequest(input) - return out, req.Send() -} - -// RemoveListenerCertificatesWithContext is the same as RemoveListenerCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveListenerCertificates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) RemoveListenerCertificatesWithContext(ctx aws.Context, input *RemoveListenerCertificatesInput, opts ...request.Option) (*RemoveListenerCertificatesOutput, error) { - req, out := c.RemoveListenerCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTags = "RemoveTags" - -// RemoveTagsRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTags for more information on using the RemoveTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsRequest method. -// req, resp := client.RemoveTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveTags -func (c *ELBV2) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) { - op := &request.Operation{ - Name: opRemoveTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsInput{} - } - - output = &RemoveTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTags API operation for Elastic Load Balancing. -// -// Removes the specified tags from the specified Elastic Load Balancing resource. -// -// To list the current tags for your resources, use DescribeTags. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation RemoveTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// * ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// * ErrCodeRuleNotFoundException "RuleNotFound" -// The specified rule does not exist. -// -// * ErrCodeTooManyTagsException "TooManyTags" -// You've reached the limit on the number of tags per load balancer. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveTags -func (c *ELBV2) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - return out, req.Send() -} - -// RemoveTagsWithContext is the same as RemoveTags with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetIpAddressType = "SetIpAddressType" - -// SetIpAddressTypeRequest generates a "aws/request.Request" representing the -// client's request for the SetIpAddressType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetIpAddressType for more information on using the SetIpAddressType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetIpAddressTypeRequest method. -// req, resp := client.SetIpAddressTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetIpAddressType -func (c *ELBV2) SetIpAddressTypeRequest(input *SetIpAddressTypeInput) (req *request.Request, output *SetIpAddressTypeOutput) { - op := &request.Operation{ - Name: opSetIpAddressType, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetIpAddressTypeInput{} - } - - output = &SetIpAddressTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetIpAddressType API operation for Elastic Load Balancing. -// -// Sets the type of IP addresses used by the subnets of the specified Application -// Load Balancer or Network Load Balancer. -// -// Network Load Balancers must use ipv4. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation SetIpAddressType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// * ErrCodeInvalidSubnetException "InvalidSubnet" -// The specified subnet is out of available addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetIpAddressType -func (c *ELBV2) SetIpAddressType(input *SetIpAddressTypeInput) (*SetIpAddressTypeOutput, error) { - req, out := c.SetIpAddressTypeRequest(input) - return out, req.Send() -} - -// SetIpAddressTypeWithContext is the same as SetIpAddressType with the addition of -// the ability to pass a context and additional request options. -// -// See SetIpAddressType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) SetIpAddressTypeWithContext(ctx aws.Context, input *SetIpAddressTypeInput, opts ...request.Option) (*SetIpAddressTypeOutput, error) { - req, out := c.SetIpAddressTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetRulePriorities = "SetRulePriorities" - -// SetRulePrioritiesRequest generates a "aws/request.Request" representing the -// client's request for the SetRulePriorities operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetRulePriorities for more information on using the SetRulePriorities -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetRulePrioritiesRequest method. -// req, resp := client.SetRulePrioritiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetRulePriorities -func (c *ELBV2) SetRulePrioritiesRequest(input *SetRulePrioritiesInput) (req *request.Request, output *SetRulePrioritiesOutput) { - op := &request.Operation{ - Name: opSetRulePriorities, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetRulePrioritiesInput{} - } - - output = &SetRulePrioritiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetRulePriorities API operation for Elastic Load Balancing. -// -// Sets the priorities of the specified rules. -// -// You can reorder the rules as long as there are no priority conflicts in the -// new order. Any existing rules that you do not specify retain their current -// priority. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation SetRulePriorities for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRuleNotFoundException "RuleNotFound" -// The specified rule does not exist. -// -// * ErrCodePriorityInUseException "PriorityInUse" -// The specified priority is in use. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermitted" -// This operation is not allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetRulePriorities -func (c *ELBV2) SetRulePriorities(input *SetRulePrioritiesInput) (*SetRulePrioritiesOutput, error) { - req, out := c.SetRulePrioritiesRequest(input) - return out, req.Send() -} - -// SetRulePrioritiesWithContext is the same as SetRulePriorities with the addition of -// the ability to pass a context and additional request options. -// -// See SetRulePriorities for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) SetRulePrioritiesWithContext(ctx aws.Context, input *SetRulePrioritiesInput, opts ...request.Option) (*SetRulePrioritiesOutput, error) { - req, out := c.SetRulePrioritiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetSecurityGroups = "SetSecurityGroups" - -// SetSecurityGroupsRequest generates a "aws/request.Request" representing the -// client's request for the SetSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetSecurityGroups for more information on using the SetSecurityGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetSecurityGroupsRequest method. -// req, resp := client.SetSecurityGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSecurityGroups -func (c *ELBV2) SetSecurityGroupsRequest(input *SetSecurityGroupsInput) (req *request.Request, output *SetSecurityGroupsOutput) { - op := &request.Operation{ - Name: opSetSecurityGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetSecurityGroupsInput{} - } - - output = &SetSecurityGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetSecurityGroups API operation for Elastic Load Balancing. -// -// Associates the specified security groups with the specified Application Load -// Balancer. The specified security groups override the previously associated -// security groups. -// -// You can't specify a security group for a Network Load Balancer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation SetSecurityGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// * ErrCodeInvalidSecurityGroupException "InvalidSecurityGroup" -// The specified security group does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSecurityGroups -func (c *ELBV2) SetSecurityGroups(input *SetSecurityGroupsInput) (*SetSecurityGroupsOutput, error) { - req, out := c.SetSecurityGroupsRequest(input) - return out, req.Send() -} - -// SetSecurityGroupsWithContext is the same as SetSecurityGroups with the addition of -// the ability to pass a context and additional request options. -// -// See SetSecurityGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) SetSecurityGroupsWithContext(ctx aws.Context, input *SetSecurityGroupsInput, opts ...request.Option) (*SetSecurityGroupsOutput, error) { - req, out := c.SetSecurityGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetSubnets = "SetSubnets" - -// SetSubnetsRequest generates a "aws/request.Request" representing the -// client's request for the SetSubnets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetSubnets for more information on using the SetSubnets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetSubnetsRequest method. -// req, resp := client.SetSubnetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSubnets -func (c *ELBV2) SetSubnetsRequest(input *SetSubnetsInput) (req *request.Request, output *SetSubnetsOutput) { - op := &request.Operation{ - Name: opSetSubnets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetSubnetsInput{} - } - - output = &SetSubnetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetSubnets API operation for Elastic Load Balancing. -// -// Enables the Availability Zone for the specified public subnets for the specified -// Application Load Balancer. The specified subnets replace the previously enabled -// subnets. -// -// You can't change the subnets for a Network Load Balancer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Elastic Load Balancing's -// API operation SetSubnets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// * ErrCodeSubnetNotFoundException "SubnetNotFound" -// The specified subnet does not exist. -// -// * ErrCodeInvalidSubnetException "InvalidSubnet" -// The specified subnet is out of available addresses. -// -// * ErrCodeAllocationIdNotFoundException "AllocationIdNotFound" -// The specified allocation ID does not exist. -// -// * ErrCodeAvailabilityZoneNotSupportedException "AvailabilityZoneNotSupported" -// The specified Availability Zone is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSubnets -func (c *ELBV2) SetSubnets(input *SetSubnetsInput) (*SetSubnetsOutput, error) { - req, out := c.SetSubnetsRequest(input) - return out, req.Send() -} - -// SetSubnetsWithContext is the same as SetSubnets with the addition of -// the ability to pass a context and additional request options. -// -// See SetSubnets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) SetSubnetsWithContext(ctx aws.Context, input *SetSubnetsInput, opts ...request.Option) (*SetSubnetsOutput, error) { - req, out := c.SetSubnetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Information about an action. -type Action struct { - _ struct{} `type:"structure"` - - // [HTTPS listeners] Information for using Amazon Cognito to authenticate users. - // Specify only when Type is authenticate-cognito. - AuthenticateCognitoConfig *AuthenticateCognitoActionConfig `type:"structure"` - - // [HTTPS listeners] Information about an identity provider that is compliant - // with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc. - AuthenticateOidcConfig *AuthenticateOidcActionConfig `type:"structure"` - - // [Application Load Balancer] Information for creating an action that returns - // a custom HTTP response. Specify only when Type is fixed-response. - FixedResponseConfig *FixedResponseActionConfig `type:"structure"` - - // The order for the action. This value is required for rules with multiple - // actions. The action with the lowest value for order is performed first. The - // final action to be performed must be a forward or a fixed-response action. - Order *int64 `min:"1" type:"integer"` - - // [Application Load Balancer] Information for creating a redirect action. Specify - // only when Type is redirect. - RedirectConfig *RedirectActionConfig `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. Specify only when Type - // is forward. - TargetGroupArn *string `type:"string"` - - // The type of action. Each rule must include exactly one of the following types - // of actions: forward, fixed-response, or redirect. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"ActionTypeEnum"` -} - -// String returns the string representation -func (s Action) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Action) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Action) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Action"} - if s.Order != nil && *s.Order < 1 { - invalidParams.Add(request.NewErrParamMinValue("Order", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.AuthenticateCognitoConfig != nil { - if err := s.AuthenticateCognitoConfig.Validate(); err != nil { - invalidParams.AddNested("AuthenticateCognitoConfig", err.(request.ErrInvalidParams)) - } - } - if s.AuthenticateOidcConfig != nil { - if err := s.AuthenticateOidcConfig.Validate(); err != nil { - invalidParams.AddNested("AuthenticateOidcConfig", err.(request.ErrInvalidParams)) - } - } - if s.FixedResponseConfig != nil { - if err := s.FixedResponseConfig.Validate(); err != nil { - invalidParams.AddNested("FixedResponseConfig", err.(request.ErrInvalidParams)) - } - } - if s.RedirectConfig != nil { - if err := s.RedirectConfig.Validate(); err != nil { - invalidParams.AddNested("RedirectConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticateCognitoConfig sets the AuthenticateCognitoConfig field's value. -func (s *Action) SetAuthenticateCognitoConfig(v *AuthenticateCognitoActionConfig) *Action { - s.AuthenticateCognitoConfig = v - return s -} - -// SetAuthenticateOidcConfig sets the AuthenticateOidcConfig field's value. -func (s *Action) SetAuthenticateOidcConfig(v *AuthenticateOidcActionConfig) *Action { - s.AuthenticateOidcConfig = v - return s -} - -// SetFixedResponseConfig sets the FixedResponseConfig field's value. -func (s *Action) SetFixedResponseConfig(v *FixedResponseActionConfig) *Action { - s.FixedResponseConfig = v - return s -} - -// SetOrder sets the Order field's value. -func (s *Action) SetOrder(v int64) *Action { - s.Order = &v - return s -} - -// SetRedirectConfig sets the RedirectConfig field's value. -func (s *Action) SetRedirectConfig(v *RedirectActionConfig) *Action { - s.RedirectConfig = v - return s -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *Action) SetTargetGroupArn(v string) *Action { - s.TargetGroupArn = &v - return s -} - -// SetType sets the Type field's value. -func (s *Action) SetType(v string) *Action { - s.Type = &v - return s -} - -type AddListenerCertificatesInput struct { - _ struct{} `type:"structure"` - - // The certificate to add. You can specify one certificate per call. Set CertificateArn - // to the certificate ARN but do not set IsDefault. - // - // Certificates is a required field - Certificates []*Certificate `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AddListenerCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddListenerCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddListenerCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddListenerCertificatesInput"} - if s.Certificates == nil { - invalidParams.Add(request.NewErrParamRequired("Certificates")) - } - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificates sets the Certificates field's value. -func (s *AddListenerCertificatesInput) SetCertificates(v []*Certificate) *AddListenerCertificatesInput { - s.Certificates = v - return s -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *AddListenerCertificatesInput) SetListenerArn(v string) *AddListenerCertificatesInput { - s.ListenerArn = &v - return s -} - -type AddListenerCertificatesOutput struct { - _ struct{} `type:"structure"` - - // Information about the certificates. - Certificates []*Certificate `type:"list"` -} - -// String returns the string representation -func (s AddListenerCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddListenerCertificatesOutput) GoString() string { - return s.String() -} - -// SetCertificates sets the Certificates field's value. -func (s *AddListenerCertificatesOutput) SetCertificates(v []*Certificate) *AddListenerCertificatesOutput { - s.Certificates = v - return s -} - -type AddTagsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource. - // - // ResourceArns is a required field - ResourceArns []*string `type:"list" required:"true"` - - // The tags. Each resource can have a maximum of 10 tags. - // - // Tags is a required field - Tags []*Tag `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"} - if s.ResourceArns == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArns")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *AddTagsInput) SetResourceArns(v []*string) *AddTagsInput { - s.ResourceArns = v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsInput) SetTags(v []*Tag) *AddTagsInput { - s.Tags = v - return s -} - -type AddTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsOutput) GoString() string { - return s.String() -} - -// Request parameters to use when integrating with Amazon Cognito to authenticate -// users. -type AuthenticateCognitoActionConfig struct { - _ struct{} `type:"structure"` - - // The query parameters (up to 10) to include in the redirect request to the - // authorization endpoint. - AuthenticationRequestExtraParams map[string]*string `type:"map"` - - // The behavior if the user is not authenticated. The following are possible - // values: - // - // * deny - Return an HTTP 401 Unauthorized error. - // - // * allow - Allow the request to be forwarded to the target. - // - // authenticate - OnUnauthenticatedRequest *string `type:"string" enum:"AuthenticateCognitoActionConditionalBehaviorEnum"` - - // The set of user claims to be requested from the IdP. The default is openid. - // - // To verify which scope values your IdP supports and how to separate multiple - // values, see the documentation for your IdP. - Scope *string `type:"string"` - - // The name of the cookie used to maintain session information. The default - // is AWSELBAuthSessionCookie. - SessionCookieName *string `type:"string"` - - // The maximum duration of the authentication session, in seconds. The default - // is 604800 seconds (7 days). - SessionTimeout *int64 `type:"long"` - - // The Amazon Resource Name (ARN) of the Amazon Cognito user pool. - // - // UserPoolArn is a required field - UserPoolArn *string `type:"string" required:"true"` - - // The ID of the Amazon Cognito user pool client. - // - // UserPoolClientId is a required field - UserPoolClientId *string `type:"string" required:"true"` - - // The domain prefix or fully-qualified domain name of the Amazon Cognito user - // pool. - // - // UserPoolDomain is a required field - UserPoolDomain *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AuthenticateCognitoActionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthenticateCognitoActionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AuthenticateCognitoActionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuthenticateCognitoActionConfig"} - if s.UserPoolArn == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolArn")) - } - if s.UserPoolClientId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolClientId")) - } - if s.UserPoolDomain == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolDomain")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticationRequestExtraParams sets the AuthenticationRequestExtraParams field's value. -func (s *AuthenticateCognitoActionConfig) SetAuthenticationRequestExtraParams(v map[string]*string) *AuthenticateCognitoActionConfig { - s.AuthenticationRequestExtraParams = v - return s -} - -// SetOnUnauthenticatedRequest sets the OnUnauthenticatedRequest field's value. -func (s *AuthenticateCognitoActionConfig) SetOnUnauthenticatedRequest(v string) *AuthenticateCognitoActionConfig { - s.OnUnauthenticatedRequest = &v - return s -} - -// SetScope sets the Scope field's value. -func (s *AuthenticateCognitoActionConfig) SetScope(v string) *AuthenticateCognitoActionConfig { - s.Scope = &v - return s -} - -// SetSessionCookieName sets the SessionCookieName field's value. -func (s *AuthenticateCognitoActionConfig) SetSessionCookieName(v string) *AuthenticateCognitoActionConfig { - s.SessionCookieName = &v - return s -} - -// SetSessionTimeout sets the SessionTimeout field's value. -func (s *AuthenticateCognitoActionConfig) SetSessionTimeout(v int64) *AuthenticateCognitoActionConfig { - s.SessionTimeout = &v - return s -} - -// SetUserPoolArn sets the UserPoolArn field's value. -func (s *AuthenticateCognitoActionConfig) SetUserPoolArn(v string) *AuthenticateCognitoActionConfig { - s.UserPoolArn = &v - return s -} - -// SetUserPoolClientId sets the UserPoolClientId field's value. -func (s *AuthenticateCognitoActionConfig) SetUserPoolClientId(v string) *AuthenticateCognitoActionConfig { - s.UserPoolClientId = &v - return s -} - -// SetUserPoolDomain sets the UserPoolDomain field's value. -func (s *AuthenticateCognitoActionConfig) SetUserPoolDomain(v string) *AuthenticateCognitoActionConfig { - s.UserPoolDomain = &v - return s -} - -// Request parameters when using an identity provider (IdP) that is compliant -// with OpenID Connect (OIDC) to authenticate users. -type AuthenticateOidcActionConfig struct { - _ struct{} `type:"structure"` - - // The query parameters (up to 10) to include in the redirect request to the - // authorization endpoint. - AuthenticationRequestExtraParams map[string]*string `type:"map"` - - // The authorization endpoint of the IdP. This must be a full URL, including - // the HTTPS protocol, the domain, and the path. - // - // AuthorizationEndpoint is a required field - AuthorizationEndpoint *string `type:"string" required:"true"` - - // The OAuth 2.0 client identifier. - // - // ClientId is a required field - ClientId *string `type:"string" required:"true"` - - // The OAuth 2.0 client secret. - // - // ClientSecret is a required field - ClientSecret *string `type:"string" required:"true"` - - // The OIDC issuer identifier of the IdP. This must be a full URL, including - // the HTTPS protocol, the domain, and the path. - // - // Issuer is a required field - Issuer *string `type:"string" required:"true"` - - // The behavior if the user is not authenticated. The following are possible - // values: - // - // * deny - Return an HTTP 401 Unauthorized error. - // - // * allow - Allow the request to be forwarded to the target. - // - // authenticate - OnUnauthenticatedRequest *string `type:"string" enum:"AuthenticateOidcActionConditionalBehaviorEnum"` - - // The set of user claims to be requested from the IdP. The default is openid. - // - // To verify which scope values your IdP supports and how to separate multiple - // values, see the documentation for your IdP. - Scope *string `type:"string"` - - // The name of the cookie used to maintain session information. The default - // is AWSELBAuthSessionCookie. - SessionCookieName *string `type:"string"` - - // The maximum duration of the authentication session, in seconds. The default - // is 604800 seconds (7 days). - SessionTimeout *int64 `type:"long"` - - // The token endpoint of the IdP. This must be a full URL, including the HTTPS - // protocol, the domain, and the path. - // - // TokenEndpoint is a required field - TokenEndpoint *string `type:"string" required:"true"` - - // The user info endpoint of the IdP. This must be a full URL, including the - // HTTPS protocol, the domain, and the path. - // - // UserInfoEndpoint is a required field - UserInfoEndpoint *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AuthenticateOidcActionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthenticateOidcActionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AuthenticateOidcActionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuthenticateOidcActionConfig"} - if s.AuthorizationEndpoint == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizationEndpoint")) - } - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.ClientSecret == nil { - invalidParams.Add(request.NewErrParamRequired("ClientSecret")) - } - if s.Issuer == nil { - invalidParams.Add(request.NewErrParamRequired("Issuer")) - } - if s.TokenEndpoint == nil { - invalidParams.Add(request.NewErrParamRequired("TokenEndpoint")) - } - if s.UserInfoEndpoint == nil { - invalidParams.Add(request.NewErrParamRequired("UserInfoEndpoint")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticationRequestExtraParams sets the AuthenticationRequestExtraParams field's value. -func (s *AuthenticateOidcActionConfig) SetAuthenticationRequestExtraParams(v map[string]*string) *AuthenticateOidcActionConfig { - s.AuthenticationRequestExtraParams = v - return s -} - -// SetAuthorizationEndpoint sets the AuthorizationEndpoint field's value. -func (s *AuthenticateOidcActionConfig) SetAuthorizationEndpoint(v string) *AuthenticateOidcActionConfig { - s.AuthorizationEndpoint = &v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *AuthenticateOidcActionConfig) SetClientId(v string) *AuthenticateOidcActionConfig { - s.ClientId = &v - return s -} - -// SetClientSecret sets the ClientSecret field's value. -func (s *AuthenticateOidcActionConfig) SetClientSecret(v string) *AuthenticateOidcActionConfig { - s.ClientSecret = &v - return s -} - -// SetIssuer sets the Issuer field's value. -func (s *AuthenticateOidcActionConfig) SetIssuer(v string) *AuthenticateOidcActionConfig { - s.Issuer = &v - return s -} - -// SetOnUnauthenticatedRequest sets the OnUnauthenticatedRequest field's value. -func (s *AuthenticateOidcActionConfig) SetOnUnauthenticatedRequest(v string) *AuthenticateOidcActionConfig { - s.OnUnauthenticatedRequest = &v - return s -} - -// SetScope sets the Scope field's value. -func (s *AuthenticateOidcActionConfig) SetScope(v string) *AuthenticateOidcActionConfig { - s.Scope = &v - return s -} - -// SetSessionCookieName sets the SessionCookieName field's value. -func (s *AuthenticateOidcActionConfig) SetSessionCookieName(v string) *AuthenticateOidcActionConfig { - s.SessionCookieName = &v - return s -} - -// SetSessionTimeout sets the SessionTimeout field's value. -func (s *AuthenticateOidcActionConfig) SetSessionTimeout(v int64) *AuthenticateOidcActionConfig { - s.SessionTimeout = &v - return s -} - -// SetTokenEndpoint sets the TokenEndpoint field's value. -func (s *AuthenticateOidcActionConfig) SetTokenEndpoint(v string) *AuthenticateOidcActionConfig { - s.TokenEndpoint = &v - return s -} - -// SetUserInfoEndpoint sets the UserInfoEndpoint field's value. -func (s *AuthenticateOidcActionConfig) SetUserInfoEndpoint(v string) *AuthenticateOidcActionConfig { - s.UserInfoEndpoint = &v - return s -} - -// Information about an Availability Zone. -type AvailabilityZone struct { - _ struct{} `type:"structure"` - - // [Network Load Balancers] The static IP address. - LoadBalancerAddresses []*LoadBalancerAddress `type:"list"` - - // The ID of the subnet. - SubnetId *string `type:"string"` - - // The name of the Availability Zone. - ZoneName *string `type:"string"` -} - -// String returns the string representation -func (s AvailabilityZone) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailabilityZone) GoString() string { - return s.String() -} - -// SetLoadBalancerAddresses sets the LoadBalancerAddresses field's value. -func (s *AvailabilityZone) SetLoadBalancerAddresses(v []*LoadBalancerAddress) *AvailabilityZone { - s.LoadBalancerAddresses = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *AvailabilityZone) SetSubnetId(v string) *AvailabilityZone { - s.SubnetId = &v - return s -} - -// SetZoneName sets the ZoneName field's value. -func (s *AvailabilityZone) SetZoneName(v string) *AvailabilityZone { - s.ZoneName = &v - return s -} - -// Information about an SSL server certificate. -type Certificate struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the certificate. - CertificateArn *string `type:"string"` - - // Indicates whether the certificate is the default certificate. Do not set - // IsDefault when specifying a certificate as an input parameter. - IsDefault *bool `type:"boolean"` -} - -// String returns the string representation -func (s Certificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Certificate) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *Certificate) SetCertificateArn(v string) *Certificate { - s.CertificateArn = &v - return s -} - -// SetIsDefault sets the IsDefault field's value. -func (s *Certificate) SetIsDefault(v bool) *Certificate { - s.IsDefault = &v - return s -} - -// Information about a cipher used in a policy. -type Cipher struct { - _ struct{} `type:"structure"` - - // The name of the cipher. - Name *string `type:"string"` - - // The priority of the cipher. - Priority *int64 `type:"integer"` -} - -// String returns the string representation -func (s Cipher) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Cipher) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *Cipher) SetName(v string) *Cipher { - s.Name = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *Cipher) SetPriority(v int64) *Cipher { - s.Priority = &v - return s -} - -type CreateListenerInput struct { - _ struct{} `type:"structure"` - - // [HTTPS and TLS listeners] The default SSL server certificate. You must provide - // exactly one certificate. Set CertificateArn to the certificate ARN but do - // not set IsDefault. - // - // To create a certificate list, use AddListenerCertificates. - Certificates []*Certificate `type:"list"` - - // The actions for the default rule. The rule must include one forward action - // or one or more fixed-response actions. - // - // If the action type is forward, you specify a target group. The protocol of - // the target group must be HTTP or HTTPS for an Application Load Balancer. - // The protocol of the target group must be TCP or TLS for a Network Load Balancer. - // - // [HTTPS listeners] If the action type is authenticate-oidc, you authenticate - // users through an identity provider that is OpenID Connect (OIDC) compliant. - // - // [HTTPS listeners] If the action type is authenticate-cognito, you authenticate - // users through the user pools supported by Amazon Cognito. - // - // [Application Load Balancer] If the action type is redirect, you redirect - // specified client requests from one URL to another. - // - // [Application Load Balancer] If the action type is fixed-response, you drop - // specified client requests and return a custom HTTP response. - // - // DefaultActions is a required field - DefaultActions []*Action `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the load balancer. - // - // LoadBalancerArn is a required field - LoadBalancerArn *string `type:"string" required:"true"` - - // The port on which the load balancer is listening. - // - // Port is a required field - Port *int64 `min:"1" type:"integer" required:"true"` - - // The protocol for connections from clients to the load balancer. For Application - // Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load - // Balancers, the supported protocols are TCP and TLS. - // - // Protocol is a required field - Protocol *string `type:"string" required:"true" enum:"ProtocolEnum"` - - // [HTTPS and TLS listeners] The security policy that defines which ciphers - // and protocols are supported. The default is the current predefined security - // policy. - SslPolicy *string `type:"string"` -} - -// String returns the string representation -func (s CreateListenerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateListenerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateListenerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateListenerInput"} - if s.DefaultActions == nil { - invalidParams.Add(request.NewErrParamRequired("DefaultActions")) - } - if s.LoadBalancerArn == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) - } - if s.Port == nil { - invalidParams.Add(request.NewErrParamRequired("Port")) - } - if s.Port != nil && *s.Port < 1 { - invalidParams.Add(request.NewErrParamMinValue("Port", 1)) - } - if s.Protocol == nil { - invalidParams.Add(request.NewErrParamRequired("Protocol")) - } - if s.DefaultActions != nil { - for i, v := range s.DefaultActions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DefaultActions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificates sets the Certificates field's value. -func (s *CreateListenerInput) SetCertificates(v []*Certificate) *CreateListenerInput { - s.Certificates = v - return s -} - -// SetDefaultActions sets the DefaultActions field's value. -func (s *CreateListenerInput) SetDefaultActions(v []*Action) *CreateListenerInput { - s.DefaultActions = v - return s -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *CreateListenerInput) SetLoadBalancerArn(v string) *CreateListenerInput { - s.LoadBalancerArn = &v - return s -} - -// SetPort sets the Port field's value. -func (s *CreateListenerInput) SetPort(v int64) *CreateListenerInput { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *CreateListenerInput) SetProtocol(v string) *CreateListenerInput { - s.Protocol = &v - return s -} - -// SetSslPolicy sets the SslPolicy field's value. -func (s *CreateListenerInput) SetSslPolicy(v string) *CreateListenerInput { - s.SslPolicy = &v - return s -} - -type CreateListenerOutput struct { - _ struct{} `type:"structure"` - - // Information about the listener. - Listeners []*Listener `type:"list"` -} - -// String returns the string representation -func (s CreateListenerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateListenerOutput) GoString() string { - return s.String() -} - -// SetListeners sets the Listeners field's value. -func (s *CreateListenerOutput) SetListeners(v []*Listener) *CreateListenerOutput { - s.Listeners = v - return s -} - -type CreateLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // [Application Load Balancers] The type of IP addresses used by the subnets - // for your load balancer. The possible values are ipv4 (for IPv4 addresses) - // and dualstack (for IPv4 and IPv6 addresses). Internal load balancers must - // use ipv4. - IpAddressType *string `type:"string" enum:"IpAddressType"` - - // The name of the load balancer. - // - // This name must be unique per region per account, can have a maximum of 32 - // characters, must contain only alphanumeric characters or hyphens, must not - // begin or end with a hyphen, and must not begin with "internal-". - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The nodes of an Internet-facing load balancer have public IP addresses. The - // DNS name of an Internet-facing load balancer is publicly resolvable to the - // public IP addresses of the nodes. Therefore, Internet-facing load balancers - // can route requests from clients over the internet. - // - // The nodes of an internal load balancer have only private IP addresses. The - // DNS name of an internal load balancer is publicly resolvable to the private - // IP addresses of the nodes. Therefore, internal load balancers can only route - // requests from clients with access to the VPC for the load balancer. - // - // The default is an Internet-facing load balancer. - Scheme *string `type:"string" enum:"LoadBalancerSchemeEnum"` - - // [Application Load Balancers] The IDs of the security groups for the load - // balancer. - SecurityGroups []*string `type:"list"` - - // The IDs of the public subnets. You can specify only one subnet per Availability - // Zone. You must specify either subnets or subnet mappings. - // - // [Application Load Balancers] You must specify subnets from at least two Availability - // Zones. You cannot specify Elastic IP addresses for your subnets. - // - // [Network Load Balancers] You can specify subnets from one or more Availability - // Zones. You can specify one Elastic IP address per subnet. - SubnetMappings []*SubnetMapping `type:"list"` - - // The IDs of the public subnets. You can specify only one subnet per Availability - // Zone. You must specify either subnets or subnet mappings. - // - // [Application Load Balancers] You must specify subnets from at least two Availability - // Zones. - // - // [Network Load Balancers] You can specify subnets from one or more Availability - // Zones. - Subnets []*string `type:"list"` - - // One or more tags to assign to the load balancer. - Tags []*Tag `min:"1" type:"list"` - - // The type of load balancer. The default is application. - Type *string `type:"string" enum:"LoadBalancerTypeEnum"` -} - -// String returns the string representation -func (s CreateLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *CreateLoadBalancerInput) SetIpAddressType(v string) *CreateLoadBalancerInput { - s.IpAddressType = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateLoadBalancerInput) SetName(v string) *CreateLoadBalancerInput { - s.Name = &v - return s -} - -// SetScheme sets the Scheme field's value. -func (s *CreateLoadBalancerInput) SetScheme(v string) *CreateLoadBalancerInput { - s.Scheme = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *CreateLoadBalancerInput) SetSecurityGroups(v []*string) *CreateLoadBalancerInput { - s.SecurityGroups = v - return s -} - -// SetSubnetMappings sets the SubnetMappings field's value. -func (s *CreateLoadBalancerInput) SetSubnetMappings(v []*SubnetMapping) *CreateLoadBalancerInput { - s.SubnetMappings = v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *CreateLoadBalancerInput) SetSubnets(v []*string) *CreateLoadBalancerInput { - s.Subnets = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateLoadBalancerInput) SetTags(v []*Tag) *CreateLoadBalancerInput { - s.Tags = v - return s -} - -// SetType sets the Type field's value. -func (s *CreateLoadBalancerInput) SetType(v string) *CreateLoadBalancerInput { - s.Type = &v - return s -} - -type CreateLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // Information about the load balancer. - LoadBalancers []*LoadBalancer `type:"list"` -} - -// String returns the string representation -func (s CreateLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetLoadBalancers sets the LoadBalancers field's value. -func (s *CreateLoadBalancerOutput) SetLoadBalancers(v []*LoadBalancer) *CreateLoadBalancerOutput { - s.LoadBalancers = v - return s -} - -type CreateRuleInput struct { - _ struct{} `type:"structure"` - - // The actions. Each rule must include exactly one of the following types of - // actions: forward, fixed-response, or redirect. - // - // If the action type is forward, you specify a target group. The protocol of - // the target group must be HTTP or HTTPS for an Application Load Balancer. - // The protocol of the target group must be TCP or TLS for a Network Load Balancer. - // - // [HTTPS listeners] If the action type is authenticate-oidc, you authenticate - // users through an identity provider that is OpenID Connect (OIDC) compliant. - // - // [HTTPS listeners] If the action type is authenticate-cognito, you authenticate - // users through the user pools supported by Amazon Cognito. - // - // [Application Load Balancer] If the action type is redirect, you redirect - // specified client requests from one URL to another. - // - // [Application Load Balancer] If the action type is fixed-response, you drop - // specified client requests and return a custom HTTP response. - // - // Actions is a required field - Actions []*Action `type:"list" required:"true"` - - // The conditions. Each condition specifies a field name and a single value. - // - // If the field name is host-header, you can specify a single host name (for - // example, my.example.com). A host name is case insensitive, can be up to 128 - // characters in length, and can contain any of the following characters. You - // can include up to three wildcard characters. - // - // * A-Z, a-z, 0-9 - // - // * - . - // - // * * (matches 0 or more characters) - // - // * ? (matches exactly 1 character) - // - // If the field name is path-pattern, you can specify a single path pattern. - // A path pattern is case-sensitive, can be up to 128 characters in length, - // and can contain any of the following characters. You can include up to three - // wildcard characters. - // - // * A-Z, a-z, 0-9 - // - // * _ - . $ / ~ " ' @ : + - // - // * & (using &) - // - // * * (matches 0 or more characters) - // - // * ? (matches exactly 1 character) - // - // Conditions is a required field - Conditions []*RuleCondition `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *string `type:"string" required:"true"` - - // The rule priority. A listener can't have multiple rules with the same priority. - // - // Priority is a required field - Priority *int64 `min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s CreateRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRuleInput"} - if s.Actions == nil { - invalidParams.Add(request.NewErrParamRequired("Actions")) - } - if s.Conditions == nil { - invalidParams.Add(request.NewErrParamRequired("Conditions")) - } - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - if s.Priority == nil { - invalidParams.Add(request.NewErrParamRequired("Priority")) - } - if s.Priority != nil && *s.Priority < 1 { - invalidParams.Add(request.NewErrParamMinValue("Priority", 1)) - } - if s.Actions != nil { - for i, v := range s.Actions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Actions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActions sets the Actions field's value. -func (s *CreateRuleInput) SetActions(v []*Action) *CreateRuleInput { - s.Actions = v - return s -} - -// SetConditions sets the Conditions field's value. -func (s *CreateRuleInput) SetConditions(v []*RuleCondition) *CreateRuleInput { - s.Conditions = v - return s -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *CreateRuleInput) SetListenerArn(v string) *CreateRuleInput { - s.ListenerArn = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *CreateRuleInput) SetPriority(v int64) *CreateRuleInput { - s.Priority = &v - return s -} - -type CreateRuleOutput struct { - _ struct{} `type:"structure"` - - // Information about the rule. - Rules []*Rule `type:"list"` -} - -// String returns the string representation -func (s CreateRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRuleOutput) GoString() string { - return s.String() -} - -// SetRules sets the Rules field's value. -func (s *CreateRuleOutput) SetRules(v []*Rule) *CreateRuleOutput { - s.Rules = v - return s -} - -type CreateTargetGroupInput struct { - _ struct{} `type:"structure"` - - // Indicates whether health checks are enabled. If the target type is instance - // or ip, the default is true. If the target type is lambda, the default is - // false. - HealthCheckEnabled *bool `type:"boolean"` - - // The approximate amount of time, in seconds, between health checks of an individual - // target. For Application Load Balancers, the range is 5–300 seconds. For Network - // Load Balancers, the supported values are 10 or 30 seconds. If the target - // type is instance or ip, the default is 30 seconds. If the target type is - // lambda, the default is 35 seconds. - HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"` - - // [HTTP/HTTPS health checks] The ping path that is the destination on the targets - // for health checks. The default is /. - HealthCheckPath *string `min:"1" type:"string"` - - // The port the load balancer uses when performing health checks on targets. - // The default is traffic-port, which is the port on which each target receives - // traffic from the load balancer. - HealthCheckPort *string `type:"string"` - - // The protocol the load balancer uses when performing health checks on targets. - // For Application Load Balancers, the default is HTTP. For Network Load Balancers, - // the default is TCP. The TCP protocol is supported for health checks only - // if the protocol of the target group is TCP or TLS. The TLS protocol is not - // supported for health checks. - HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"` - - // The amount of time, in seconds, during which no response from a target means - // a failed health check. For Application Load Balancers, the range is 2–120 - // seconds and the default is 5 seconds if the target type is instance or ip - // and 30 seconds if the target type is lambda. For Network Load Balancers, - // this is 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP - // health checks. - HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"` - - // The number of consecutive health checks successes required before considering - // an unhealthy target healthy. For Application Load Balancers, the default - // is 5. For Network Load Balancers, the default is 3. - HealthyThresholdCount *int64 `min:"2" type:"integer"` - - // [HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful - // response from a target. - Matcher *Matcher `type:"structure"` - - // The name of the target group. - // - // This name must be unique per region per account, can have a maximum of 32 - // characters, must contain only alphanumeric characters or hyphens, and must - // not begin or end with a hyphen. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The port on which the targets receive traffic. This port is used unless you - // specify a port override when registering the target. If the target is a Lambda - // function, this parameter does not apply. - Port *int64 `min:"1" type:"integer"` - - // The protocol to use for routing traffic to the targets. For Application Load - // Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, - // the supported protocols are TCP and TLS. If the target is a Lambda function, - // this parameter does not apply. - Protocol *string `type:"string" enum:"ProtocolEnum"` - - // The type of target that you must specify when registering targets with this - // target group. You can't specify targets for a target group using more than - // one target type. - // - // * instance - Targets are specified by instance ID. This is the default - // value. - // - // * ip - Targets are specified by IP address. You can specify IP addresses - // from the subnets of the virtual private cloud (VPC) for the target group, - // the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and - // the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable - // IP addresses. - // - // * lambda - The target groups contains a single Lambda function. - TargetType *string `type:"string" enum:"TargetTypeEnum"` - - // The number of consecutive health check failures required before considering - // a target unhealthy. For Application Load Balancers, the default is 2. For - // Network Load Balancers, this value must be the same as the healthy threshold - // count. - UnhealthyThresholdCount *int64 `min:"2" type:"integer"` - - // The identifier of the virtual private cloud (VPC). If the target is a Lambda - // function, this parameter does not apply. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s CreateTargetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTargetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTargetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTargetGroupInput"} - if s.HealthCheckIntervalSeconds != nil && *s.HealthCheckIntervalSeconds < 5 { - invalidParams.Add(request.NewErrParamMinValue("HealthCheckIntervalSeconds", 5)) - } - if s.HealthCheckPath != nil && len(*s.HealthCheckPath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HealthCheckPath", 1)) - } - if s.HealthCheckTimeoutSeconds != nil && *s.HealthCheckTimeoutSeconds < 2 { - invalidParams.Add(request.NewErrParamMinValue("HealthCheckTimeoutSeconds", 2)) - } - if s.HealthyThresholdCount != nil && *s.HealthyThresholdCount < 2 { - invalidParams.Add(request.NewErrParamMinValue("HealthyThresholdCount", 2)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Port != nil && *s.Port < 1 { - invalidParams.Add(request.NewErrParamMinValue("Port", 1)) - } - if s.UnhealthyThresholdCount != nil && *s.UnhealthyThresholdCount < 2 { - invalidParams.Add(request.NewErrParamMinValue("UnhealthyThresholdCount", 2)) - } - if s.Matcher != nil { - if err := s.Matcher.Validate(); err != nil { - invalidParams.AddNested("Matcher", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthCheckEnabled sets the HealthCheckEnabled field's value. -func (s *CreateTargetGroupInput) SetHealthCheckEnabled(v bool) *CreateTargetGroupInput { - s.HealthCheckEnabled = &v - return s -} - -// SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. -func (s *CreateTargetGroupInput) SetHealthCheckIntervalSeconds(v int64) *CreateTargetGroupInput { - s.HealthCheckIntervalSeconds = &v - return s -} - -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *CreateTargetGroupInput) SetHealthCheckPath(v string) *CreateTargetGroupInput { - s.HealthCheckPath = &v - return s -} - -// SetHealthCheckPort sets the HealthCheckPort field's value. -func (s *CreateTargetGroupInput) SetHealthCheckPort(v string) *CreateTargetGroupInput { - s.HealthCheckPort = &v - return s -} - -// SetHealthCheckProtocol sets the HealthCheckProtocol field's value. -func (s *CreateTargetGroupInput) SetHealthCheckProtocol(v string) *CreateTargetGroupInput { - s.HealthCheckProtocol = &v - return s -} - -// SetHealthCheckTimeoutSeconds sets the HealthCheckTimeoutSeconds field's value. -func (s *CreateTargetGroupInput) SetHealthCheckTimeoutSeconds(v int64) *CreateTargetGroupInput { - s.HealthCheckTimeoutSeconds = &v - return s -} - -// SetHealthyThresholdCount sets the HealthyThresholdCount field's value. -func (s *CreateTargetGroupInput) SetHealthyThresholdCount(v int64) *CreateTargetGroupInput { - s.HealthyThresholdCount = &v - return s -} - -// SetMatcher sets the Matcher field's value. -func (s *CreateTargetGroupInput) SetMatcher(v *Matcher) *CreateTargetGroupInput { - s.Matcher = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateTargetGroupInput) SetName(v string) *CreateTargetGroupInput { - s.Name = &v - return s -} - -// SetPort sets the Port field's value. -func (s *CreateTargetGroupInput) SetPort(v int64) *CreateTargetGroupInput { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *CreateTargetGroupInput) SetProtocol(v string) *CreateTargetGroupInput { - s.Protocol = &v - return s -} - -// SetTargetType sets the TargetType field's value. -func (s *CreateTargetGroupInput) SetTargetType(v string) *CreateTargetGroupInput { - s.TargetType = &v - return s -} - -// SetUnhealthyThresholdCount sets the UnhealthyThresholdCount field's value. -func (s *CreateTargetGroupInput) SetUnhealthyThresholdCount(v int64) *CreateTargetGroupInput { - s.UnhealthyThresholdCount = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CreateTargetGroupInput) SetVpcId(v string) *CreateTargetGroupInput { - s.VpcId = &v - return s -} - -type CreateTargetGroupOutput struct { - _ struct{} `type:"structure"` - - // Information about the target group. - TargetGroups []*TargetGroup `type:"list"` -} - -// String returns the string representation -func (s CreateTargetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTargetGroupOutput) GoString() string { - return s.String() -} - -// SetTargetGroups sets the TargetGroups field's value. -func (s *CreateTargetGroupOutput) SetTargetGroups(v []*TargetGroup) *CreateTargetGroupOutput { - s.TargetGroups = v - return s -} - -type DeleteListenerInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteListenerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteListenerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteListenerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteListenerInput"} - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *DeleteListenerInput) SetListenerArn(v string) *DeleteListenerInput { - s.ListenerArn = &v - return s -} - -type DeleteListenerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteListenerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteListenerOutput) GoString() string { - return s.String() -} - -type DeleteLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the load balancer. - // - // LoadBalancerArn is a required field - LoadBalancerArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerInput"} - if s.LoadBalancerArn == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *DeleteLoadBalancerInput) SetLoadBalancerArn(v string) *DeleteLoadBalancerInput { - s.LoadBalancerArn = &v - return s -} - -type DeleteLoadBalancerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLoadBalancerOutput) GoString() string { - return s.String() -} - -type DeleteRuleInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the rule. - // - // RuleArn is a required field - RuleArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRuleInput"} - if s.RuleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RuleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleArn sets the RuleArn field's value. -func (s *DeleteRuleInput) SetRuleArn(v string) *DeleteRuleInput { - s.RuleArn = &v - return s -} - -type DeleteRuleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRuleOutput) GoString() string { - return s.String() -} - -type DeleteTargetGroupInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTargetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTargetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTargetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTargetGroupInput"} - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *DeleteTargetGroupInput) SetTargetGroupArn(v string) *DeleteTargetGroupInput { - s.TargetGroupArn = &v - return s -} - -type DeleteTargetGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTargetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTargetGroupOutput) GoString() string { - return s.String() -} - -type DeregisterTargetsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *string `type:"string" required:"true"` - - // The targets. If you specified a port override when you registered a target, - // you must specify both the target ID and the port when you deregister it. - // - // Targets is a required field - Targets []*TargetDescription `type:"list" required:"true"` -} - -// String returns the string representation -func (s DeregisterTargetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterTargetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterTargetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterTargetsInput"} - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) - } - if s.Targets == nil { - invalidParams.Add(request.NewErrParamRequired("Targets")) - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *DeregisterTargetsInput) SetTargetGroupArn(v string) *DeregisterTargetsInput { - s.TargetGroupArn = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *DeregisterTargetsInput) SetTargets(v []*TargetDescription) *DeregisterTargetsInput { - s.Targets = v - return s -} - -type DeregisterTargetsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeregisterTargetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterTargetsOutput) GoString() string { - return s.String() -} - -type DescribeAccountLimitsInput struct { - _ struct{} `type:"structure"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The maximum number of results to return with this call. - PageSize *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s DescribeAccountLimitsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountLimitsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAccountLimitsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAccountLimitsInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *DescribeAccountLimitsInput) SetMarker(v string) *DescribeAccountLimitsInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeAccountLimitsInput) SetPageSize(v int64) *DescribeAccountLimitsInput { - s.PageSize = &v - return s -} - -type DescribeAccountLimitsOutput struct { - _ struct{} `type:"structure"` - - // Information about the limits. - Limits []*Limit `type:"list"` - - // The marker to use when requesting the next set of results. If there are no - // additional results, the string is empty. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAccountLimitsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountLimitsOutput) GoString() string { - return s.String() -} - -// SetLimits sets the Limits field's value. -func (s *DescribeAccountLimitsOutput) SetLimits(v []*Limit) *DescribeAccountLimitsOutput { - s.Limits = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeAccountLimitsOutput) SetNextMarker(v string) *DescribeAccountLimitsOutput { - s.NextMarker = &v - return s -} - -type DescribeListenerCertificatesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Names (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *string `type:"string" required:"true"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The maximum number of results to return with this call. - PageSize *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s DescribeListenerCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeListenerCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeListenerCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeListenerCertificatesInput"} - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *DescribeListenerCertificatesInput) SetListenerArn(v string) *DescribeListenerCertificatesInput { - s.ListenerArn = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeListenerCertificatesInput) SetMarker(v string) *DescribeListenerCertificatesInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeListenerCertificatesInput) SetPageSize(v int64) *DescribeListenerCertificatesInput { - s.PageSize = &v - return s -} - -type DescribeListenerCertificatesOutput struct { - _ struct{} `type:"structure"` - - // Information about the certificates. - Certificates []*Certificate `type:"list"` - - // The marker to use when requesting the next set of results. If there are no - // additional results, the string is empty. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeListenerCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeListenerCertificatesOutput) GoString() string { - return s.String() -} - -// SetCertificates sets the Certificates field's value. -func (s *DescribeListenerCertificatesOutput) SetCertificates(v []*Certificate) *DescribeListenerCertificatesOutput { - s.Certificates = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeListenerCertificatesOutput) SetNextMarker(v string) *DescribeListenerCertificatesOutput { - s.NextMarker = &v - return s -} - -type DescribeListenersInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Names (ARN) of the listeners. - ListenerArns []*string `type:"list"` - - // The Amazon Resource Name (ARN) of the load balancer. - LoadBalancerArn *string `type:"string"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The maximum number of results to return with this call. - PageSize *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s DescribeListenersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeListenersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeListenersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeListenersInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetListenerArns sets the ListenerArns field's value. -func (s *DescribeListenersInput) SetListenerArns(v []*string) *DescribeListenersInput { - s.ListenerArns = v - return s -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *DescribeListenersInput) SetLoadBalancerArn(v string) *DescribeListenersInput { - s.LoadBalancerArn = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeListenersInput) SetMarker(v string) *DescribeListenersInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeListenersInput) SetPageSize(v int64) *DescribeListenersInput { - s.PageSize = &v - return s -} - -type DescribeListenersOutput struct { - _ struct{} `type:"structure"` - - // Information about the listeners. - Listeners []*Listener `type:"list"` - - // The marker to use when requesting the next set of results. If there are no - // additional results, the string is empty. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeListenersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeListenersOutput) GoString() string { - return s.String() -} - -// SetListeners sets the Listeners field's value. -func (s *DescribeListenersOutput) SetListeners(v []*Listener) *DescribeListenersOutput { - s.Listeners = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeListenersOutput) SetNextMarker(v string) *DescribeListenersOutput { - s.NextMarker = &v - return s -} - -type DescribeLoadBalancerAttributesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the load balancer. - // - // LoadBalancerArn is a required field - LoadBalancerArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeLoadBalancerAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancerAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLoadBalancerAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancerAttributesInput"} - if s.LoadBalancerArn == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *DescribeLoadBalancerAttributesInput) SetLoadBalancerArn(v string) *DescribeLoadBalancerAttributesInput { - s.LoadBalancerArn = &v - return s -} - -type DescribeLoadBalancerAttributesOutput struct { - _ struct{} `type:"structure"` - - // Information about the load balancer attributes. - Attributes []*LoadBalancerAttribute `type:"list"` -} - -// String returns the string representation -func (s DescribeLoadBalancerAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancerAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *DescribeLoadBalancerAttributesOutput) SetAttributes(v []*LoadBalancerAttribute) *DescribeLoadBalancerAttributesOutput { - s.Attributes = v - return s -} - -type DescribeLoadBalancersInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Names (ARN) of the load balancers. You can specify up - // to 20 load balancers in a single call. - LoadBalancerArns []*string `type:"list"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The names of the load balancers. - Names []*string `type:"list"` - - // The maximum number of results to return with this call. - PageSize *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s DescribeLoadBalancersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLoadBalancersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancersInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerArns sets the LoadBalancerArns field's value. -func (s *DescribeLoadBalancersInput) SetLoadBalancerArns(v []*string) *DescribeLoadBalancersInput { - s.LoadBalancerArns = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeLoadBalancersInput) SetMarker(v string) *DescribeLoadBalancersInput { - s.Marker = &v - return s -} - -// SetNames sets the Names field's value. -func (s *DescribeLoadBalancersInput) SetNames(v []*string) *DescribeLoadBalancersInput { - s.Names = v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeLoadBalancersInput) SetPageSize(v int64) *DescribeLoadBalancersInput { - s.PageSize = &v - return s -} - -type DescribeLoadBalancersOutput struct { - _ struct{} `type:"structure"` - - // Information about the load balancers. - LoadBalancers []*LoadBalancer `type:"list"` - - // The marker to use when requesting the next set of results. If there are no - // additional results, the string is empty. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeLoadBalancersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBalancersOutput) GoString() string { - return s.String() -} - -// SetLoadBalancers sets the LoadBalancers field's value. -func (s *DescribeLoadBalancersOutput) SetLoadBalancers(v []*LoadBalancer) *DescribeLoadBalancersOutput { - s.LoadBalancers = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeLoadBalancersOutput) SetNextMarker(v string) *DescribeLoadBalancersOutput { - s.NextMarker = &v - return s -} - -type DescribeRulesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the listener. - ListenerArn *string `type:"string"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The maximum number of results to return with this call. - PageSize *int64 `min:"1" type:"integer"` - - // The Amazon Resource Names (ARN) of the rules. - RuleArns []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeRulesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRulesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRulesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRulesInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *DescribeRulesInput) SetListenerArn(v string) *DescribeRulesInput { - s.ListenerArn = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeRulesInput) SetMarker(v string) *DescribeRulesInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeRulesInput) SetPageSize(v int64) *DescribeRulesInput { - s.PageSize = &v - return s -} - -// SetRuleArns sets the RuleArns field's value. -func (s *DescribeRulesInput) SetRuleArns(v []*string) *DescribeRulesInput { - s.RuleArns = v - return s -} - -type DescribeRulesOutput struct { - _ struct{} `type:"structure"` - - // The marker to use when requesting the next set of results. If there are no - // additional results, the string is empty. - NextMarker *string `type:"string"` - - // Information about the rules. - Rules []*Rule `type:"list"` -} - -// String returns the string representation -func (s DescribeRulesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRulesOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeRulesOutput) SetNextMarker(v string) *DescribeRulesOutput { - s.NextMarker = &v - return s -} - -// SetRules sets the Rules field's value. -func (s *DescribeRulesOutput) SetRules(v []*Rule) *DescribeRulesOutput { - s.Rules = v - return s -} - -type DescribeSSLPoliciesInput struct { - _ struct{} `type:"structure"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The names of the policies. - Names []*string `type:"list"` - - // The maximum number of results to return with this call. - PageSize *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s DescribeSSLPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSSLPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSSLPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSSLPoliciesInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *DescribeSSLPoliciesInput) SetMarker(v string) *DescribeSSLPoliciesInput { - s.Marker = &v - return s -} - -// SetNames sets the Names field's value. -func (s *DescribeSSLPoliciesInput) SetNames(v []*string) *DescribeSSLPoliciesInput { - s.Names = v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeSSLPoliciesInput) SetPageSize(v int64) *DescribeSSLPoliciesInput { - s.PageSize = &v - return s -} - -type DescribeSSLPoliciesOutput struct { - _ struct{} `type:"structure"` - - // The marker to use when requesting the next set of results. If there are no - // additional results, the string is empty. - NextMarker *string `type:"string"` - - // Information about the policies. - SslPolicies []*SslPolicy `type:"list"` -} - -// String returns the string representation -func (s DescribeSSLPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSSLPoliciesOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeSSLPoliciesOutput) SetNextMarker(v string) *DescribeSSLPoliciesOutput { - s.NextMarker = &v - return s -} - -// SetSslPolicies sets the SslPolicies field's value. -func (s *DescribeSSLPoliciesOutput) SetSslPolicies(v []*SslPolicy) *DescribeSSLPoliciesOutput { - s.SslPolicies = v - return s -} - -type DescribeTagsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Names (ARN) of the resources. - // - // ResourceArns is a required field - ResourceArns []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"} - if s.ResourceArns == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArns")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *DescribeTagsInput) SetResourceArns(v []*string) *DescribeTagsInput { - s.ResourceArns = v - return s -} - -type DescribeTagsOutput struct { - _ struct{} `type:"structure"` - - // Information about the tags. - TagDescriptions []*TagDescription `type:"list"` -} - -// String returns the string representation -func (s DescribeTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsOutput) GoString() string { - return s.String() -} - -// SetTagDescriptions sets the TagDescriptions field's value. -func (s *DescribeTagsOutput) SetTagDescriptions(v []*TagDescription) *DescribeTagsOutput { - s.TagDescriptions = v - return s -} - -type DescribeTargetGroupAttributesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeTargetGroupAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTargetGroupAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTargetGroupAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTargetGroupAttributesInput"} - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *DescribeTargetGroupAttributesInput) SetTargetGroupArn(v string) *DescribeTargetGroupAttributesInput { - s.TargetGroupArn = &v - return s -} - -type DescribeTargetGroupAttributesOutput struct { - _ struct{} `type:"structure"` - - // Information about the target group attributes - Attributes []*TargetGroupAttribute `type:"list"` -} - -// String returns the string representation -func (s DescribeTargetGroupAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTargetGroupAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *DescribeTargetGroupAttributesOutput) SetAttributes(v []*TargetGroupAttribute) *DescribeTargetGroupAttributesOutput { - s.Attributes = v - return s -} - -type DescribeTargetGroupsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the load balancer. - LoadBalancerArn *string `type:"string"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The names of the target groups. - Names []*string `type:"list"` - - // The maximum number of results to return with this call. - PageSize *int64 `min:"1" type:"integer"` - - // The Amazon Resource Names (ARN) of the target groups. - TargetGroupArns []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeTargetGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTargetGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTargetGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTargetGroupsInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *DescribeTargetGroupsInput) SetLoadBalancerArn(v string) *DescribeTargetGroupsInput { - s.LoadBalancerArn = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTargetGroupsInput) SetMarker(v string) *DescribeTargetGroupsInput { - s.Marker = &v - return s -} - -// SetNames sets the Names field's value. -func (s *DescribeTargetGroupsInput) SetNames(v []*string) *DescribeTargetGroupsInput { - s.Names = v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeTargetGroupsInput) SetPageSize(v int64) *DescribeTargetGroupsInput { - s.PageSize = &v - return s -} - -// SetTargetGroupArns sets the TargetGroupArns field's value. -func (s *DescribeTargetGroupsInput) SetTargetGroupArns(v []*string) *DescribeTargetGroupsInput { - s.TargetGroupArns = v - return s -} - -type DescribeTargetGroupsOutput struct { - _ struct{} `type:"structure"` - - // The marker to use when requesting the next set of results. If there are no - // additional results, the string is empty. - NextMarker *string `type:"string"` - - // Information about the target groups. - TargetGroups []*TargetGroup `type:"list"` -} - -// String returns the string representation -func (s DescribeTargetGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTargetGroupsOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeTargetGroupsOutput) SetNextMarker(v string) *DescribeTargetGroupsOutput { - s.NextMarker = &v - return s -} - -// SetTargetGroups sets the TargetGroups field's value. -func (s *DescribeTargetGroupsOutput) SetTargetGroups(v []*TargetGroup) *DescribeTargetGroupsOutput { - s.TargetGroups = v - return s -} - -type DescribeTargetHealthInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *string `type:"string" required:"true"` - - // The targets. - Targets []*TargetDescription `type:"list"` -} - -// String returns the string representation -func (s DescribeTargetHealthInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTargetHealthInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTargetHealthInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTargetHealthInput"} - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *DescribeTargetHealthInput) SetTargetGroupArn(v string) *DescribeTargetHealthInput { - s.TargetGroupArn = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *DescribeTargetHealthInput) SetTargets(v []*TargetDescription) *DescribeTargetHealthInput { - s.Targets = v - return s -} - -type DescribeTargetHealthOutput struct { - _ struct{} `type:"structure"` - - // Information about the health of the targets. - TargetHealthDescriptions []*TargetHealthDescription `type:"list"` -} - -// String returns the string representation -func (s DescribeTargetHealthOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTargetHealthOutput) GoString() string { - return s.String() -} - -// SetTargetHealthDescriptions sets the TargetHealthDescriptions field's value. -func (s *DescribeTargetHealthOutput) SetTargetHealthDescriptions(v []*TargetHealthDescription) *DescribeTargetHealthOutput { - s.TargetHealthDescriptions = v - return s -} - -// Information about an action that returns a custom HTTP response. -type FixedResponseActionConfig struct { - _ struct{} `type:"structure"` - - // The content type. - // - // Valid Values: text/plain | text/css | text/html | application/javascript - // | application/json - ContentType *string `type:"string"` - - // The message. - MessageBody *string `type:"string"` - - // The HTTP response code (2XX, 4XX, or 5XX). - // - // StatusCode is a required field - StatusCode *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s FixedResponseActionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FixedResponseActionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FixedResponseActionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FixedResponseActionConfig"} - if s.StatusCode == nil { - invalidParams.Add(request.NewErrParamRequired("StatusCode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContentType sets the ContentType field's value. -func (s *FixedResponseActionConfig) SetContentType(v string) *FixedResponseActionConfig { - s.ContentType = &v - return s -} - -// SetMessageBody sets the MessageBody field's value. -func (s *FixedResponseActionConfig) SetMessageBody(v string) *FixedResponseActionConfig { - s.MessageBody = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *FixedResponseActionConfig) SetStatusCode(v string) *FixedResponseActionConfig { - s.StatusCode = &v - return s -} - -// Information about an Elastic Load Balancing resource limit for your AWS account. -type Limit struct { - _ struct{} `type:"structure"` - - // The maximum value of the limit. - Max *string `type:"string"` - - // The name of the limit. The possible values are: - // - // * application-load-balancers - // - // * listeners-per-application-load-balancer - // - // * listeners-per-network-load-balancer - // - // * network-load-balancers - // - // * rules-per-application-load-balancer - // - // * target-groups - // - // * targets-per-application-load-balancer - // - // * targets-per-availability-zone-per-network-load-balancer - // - // * targets-per-network-load-balancer - Name *string `type:"string"` -} - -// String returns the string representation -func (s Limit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Limit) GoString() string { - return s.String() -} - -// SetMax sets the Max field's value. -func (s *Limit) SetMax(v string) *Limit { - s.Max = &v - return s -} - -// SetName sets the Name field's value. -func (s *Limit) SetName(v string) *Limit { - s.Name = &v - return s -} - -// Information about a listener. -type Listener struct { - _ struct{} `type:"structure"` - - // The SSL server certificate. You must provide a certificate if the protocol - // is HTTPS or TLS. - Certificates []*Certificate `type:"list"` - - // The default actions for the listener. - DefaultActions []*Action `type:"list"` - - // The Amazon Resource Name (ARN) of the listener. - ListenerArn *string `type:"string"` - - // The Amazon Resource Name (ARN) of the load balancer. - LoadBalancerArn *string `type:"string"` - - // The port on which the load balancer is listening. - Port *int64 `min:"1" type:"integer"` - - // The protocol for connections from clients to the load balancer. - Protocol *string `type:"string" enum:"ProtocolEnum"` - - // The security policy that defines which ciphers and protocols are supported. - // The default is the current predefined security policy. - SslPolicy *string `type:"string"` -} - -// String returns the string representation -func (s Listener) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Listener) GoString() string { - return s.String() -} - -// SetCertificates sets the Certificates field's value. -func (s *Listener) SetCertificates(v []*Certificate) *Listener { - s.Certificates = v - return s -} - -// SetDefaultActions sets the DefaultActions field's value. -func (s *Listener) SetDefaultActions(v []*Action) *Listener { - s.DefaultActions = v - return s -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *Listener) SetListenerArn(v string) *Listener { - s.ListenerArn = &v - return s -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *Listener) SetLoadBalancerArn(v string) *Listener { - s.LoadBalancerArn = &v - return s -} - -// SetPort sets the Port field's value. -func (s *Listener) SetPort(v int64) *Listener { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *Listener) SetProtocol(v string) *Listener { - s.Protocol = &v - return s -} - -// SetSslPolicy sets the SslPolicy field's value. -func (s *Listener) SetSslPolicy(v string) *Listener { - s.SslPolicy = &v - return s -} - -// Information about a load balancer. -type LoadBalancer struct { - _ struct{} `type:"structure"` - - // The Availability Zones for the load balancer. - AvailabilityZones []*AvailabilityZone `type:"list"` - - // The ID of the Amazon Route 53 hosted zone associated with the load balancer. - CanonicalHostedZoneId *string `type:"string"` - - // The date and time the load balancer was created. - CreatedTime *time.Time `type:"timestamp"` - - // The public DNS name of the load balancer. - DNSName *string `type:"string"` - - // The type of IP addresses used by the subnets for your load balancer. The - // possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and - // IPv6 addresses). - IpAddressType *string `type:"string" enum:"IpAddressType"` - - // The Amazon Resource Name (ARN) of the load balancer. - LoadBalancerArn *string `type:"string"` - - // The name of the load balancer. - LoadBalancerName *string `type:"string"` - - // The nodes of an Internet-facing load balancer have public IP addresses. The - // DNS name of an Internet-facing load balancer is publicly resolvable to the - // public IP addresses of the nodes. Therefore, Internet-facing load balancers - // can route requests from clients over the internet. - // - // The nodes of an internal load balancer have only private IP addresses. The - // DNS name of an internal load balancer is publicly resolvable to the private - // IP addresses of the nodes. Therefore, internal load balancers can only route - // requests from clients with access to the VPC for the load balancer. - Scheme *string `type:"string" enum:"LoadBalancerSchemeEnum"` - - // The IDs of the security groups for the load balancer. - SecurityGroups []*string `type:"list"` - - // The state of the load balancer. - State *LoadBalancerState `type:"structure"` - - // The type of load balancer. - Type *string `type:"string" enum:"LoadBalancerTypeEnum"` - - // The ID of the VPC for the load balancer. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s LoadBalancer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancer) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *LoadBalancer) SetAvailabilityZones(v []*AvailabilityZone) *LoadBalancer { - s.AvailabilityZones = v - return s -} - -// SetCanonicalHostedZoneId sets the CanonicalHostedZoneId field's value. -func (s *LoadBalancer) SetCanonicalHostedZoneId(v string) *LoadBalancer { - s.CanonicalHostedZoneId = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *LoadBalancer) SetCreatedTime(v time.Time) *LoadBalancer { - s.CreatedTime = &v - return s -} - -// SetDNSName sets the DNSName field's value. -func (s *LoadBalancer) SetDNSName(v string) *LoadBalancer { - s.DNSName = &v - return s -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *LoadBalancer) SetIpAddressType(v string) *LoadBalancer { - s.IpAddressType = &v - return s -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *LoadBalancer) SetLoadBalancerArn(v string) *LoadBalancer { - s.LoadBalancerArn = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *LoadBalancer) SetLoadBalancerName(v string) *LoadBalancer { - s.LoadBalancerName = &v - return s -} - -// SetScheme sets the Scheme field's value. -func (s *LoadBalancer) SetScheme(v string) *LoadBalancer { - s.Scheme = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *LoadBalancer) SetSecurityGroups(v []*string) *LoadBalancer { - s.SecurityGroups = v - return s -} - -// SetState sets the State field's value. -func (s *LoadBalancer) SetState(v *LoadBalancerState) *LoadBalancer { - s.State = v - return s -} - -// SetType sets the Type field's value. -func (s *LoadBalancer) SetType(v string) *LoadBalancer { - s.Type = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *LoadBalancer) SetVpcId(v string) *LoadBalancer { - s.VpcId = &v - return s -} - -// Information about a static IP address for a load balancer. -type LoadBalancerAddress struct { - _ struct{} `type:"structure"` - - // [Network Load Balancers] The allocation ID of the Elastic IP address. - AllocationId *string `type:"string"` - - // The static IP address. - IpAddress *string `type:"string"` -} - -// String returns the string representation -func (s LoadBalancerAddress) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancerAddress) GoString() string { - return s.String() -} - -// SetAllocationId sets the AllocationId field's value. -func (s *LoadBalancerAddress) SetAllocationId(v string) *LoadBalancerAddress { - s.AllocationId = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *LoadBalancerAddress) SetIpAddress(v string) *LoadBalancerAddress { - s.IpAddress = &v - return s -} - -// Information about a load balancer attribute. -type LoadBalancerAttribute struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - // - // The following attributes are supported by both Application Load Balancers - // and Network Load Balancers: - // - // * deletion_protection.enabled - Indicates whether deletion protection - // is enabled. The value is true or false. The default is false. - // - // The following attributes are supported by only Application Load Balancers: - // - // * access_logs.s3.enabled - Indicates whether access logs are enabled. - // The value is true or false. The default is false. - // - // * access_logs.s3.bucket - The name of the S3 bucket for the access logs. - // This attribute is required if access logs are enabled. The bucket must - // exist in the same region as the load balancer and have a bucket policy - // that grants Elastic Load Balancing permissions to write to the bucket. - // - // * access_logs.s3.prefix - The prefix for the location in the S3 bucket - // for the access logs. - // - // * idle_timeout.timeout_seconds - The idle timeout value, in seconds. The - // valid range is 1-4000 seconds. The default is 60 seconds. - // - // * routing.http2.enabled - Indicates whether HTTP/2 is enabled. The value - // is true or false. The default is true. - // - // The following attributes are supported by only Network Load Balancers: - // - // * load_balancing.cross_zone.enabled - Indicates whether cross-zone load - // balancing is enabled. The value is true or false. The default is false. - Key *string `type:"string"` - - // The value of the attribute. - Value *string `type:"string"` -} - -// String returns the string representation -func (s LoadBalancerAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancerAttribute) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *LoadBalancerAttribute) SetKey(v string) *LoadBalancerAttribute { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *LoadBalancerAttribute) SetValue(v string) *LoadBalancerAttribute { - s.Value = &v - return s -} - -// Information about the state of the load balancer. -type LoadBalancerState struct { - _ struct{} `type:"structure"` - - // The state code. The initial state of the load balancer is provisioning. After - // the load balancer is fully set up and ready to route traffic, its state is - // active. If the load balancer could not be set up, its state is failed. - Code *string `type:"string" enum:"LoadBalancerStateEnum"` - - // A description of the state. - Reason *string `type:"string"` -} - -// String returns the string representation -func (s LoadBalancerState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancerState) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *LoadBalancerState) SetCode(v string) *LoadBalancerState { - s.Code = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *LoadBalancerState) SetReason(v string) *LoadBalancerState { - s.Reason = &v - return s -} - -// Information to use when checking for a successful response from a target. -type Matcher struct { - _ struct{} `type:"structure"` - - // The HTTP codes. - // - // For Application Load Balancers, you can specify values between 200 and 499, - // and the default value is 200. You can specify multiple values (for example, - // "200,202") or a range of values (for example, "200-299"). - // - // For Network Load Balancers, this is 200–399. - // - // HttpCode is a required field - HttpCode *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Matcher) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Matcher) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Matcher) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Matcher"} - if s.HttpCode == nil { - invalidParams.Add(request.NewErrParamRequired("HttpCode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHttpCode sets the HttpCode field's value. -func (s *Matcher) SetHttpCode(v string) *Matcher { - s.HttpCode = &v - return s -} - -type ModifyListenerInput struct { - _ struct{} `type:"structure"` - - // [HTTPS and TLS listeners] The default SSL server certificate. You must provide - // exactly one certificate. Set CertificateArn to the certificate ARN but do - // not set IsDefault. - // - // To create a certificate list, use AddListenerCertificates. - Certificates []*Certificate `type:"list"` - - // The actions for the default rule. The rule must include one forward action - // or one or more fixed-response actions. - // - // If the action type is forward, you specify a target group. The protocol of - // the target group must be HTTP or HTTPS for an Application Load Balancer. - // The protocol of the target group must be TCP or TLS for a Network Load Balancer. - // - // [HTTPS listeners] If the action type is authenticate-oidc, you authenticate - // users through an identity provider that is OpenID Connect (OIDC) compliant. - // - // [HTTPS listeners] If the action type is authenticate-cognito, you authenticate - // users through the user pools supported by Amazon Cognito. - // - // [Application Load Balancer] If the action type is redirect, you redirect - // specified client requests from one URL to another. - // - // [Application Load Balancer] If the action type is fixed-response, you drop - // specified client requests and return a custom HTTP response. - DefaultActions []*Action `type:"list"` - - // The Amazon Resource Name (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *string `type:"string" required:"true"` - - // The port for connections from clients to the load balancer. - Port *int64 `min:"1" type:"integer"` - - // The protocol for connections from clients to the load balancer. Application - // Load Balancers support the HTTP and HTTPS protocols. Network Load Balancers - // support the TCP and TLS protocols. - Protocol *string `type:"string" enum:"ProtocolEnum"` - - // [HTTPS and TLS listeners] The security policy that defines which protocols - // and ciphers are supported. For more information, see Security Policies (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) - // in the Application Load Balancers Guide. - SslPolicy *string `type:"string"` -} - -// String returns the string representation -func (s ModifyListenerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyListenerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyListenerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyListenerInput"} - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - if s.Port != nil && *s.Port < 1 { - invalidParams.Add(request.NewErrParamMinValue("Port", 1)) - } - if s.DefaultActions != nil { - for i, v := range s.DefaultActions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DefaultActions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificates sets the Certificates field's value. -func (s *ModifyListenerInput) SetCertificates(v []*Certificate) *ModifyListenerInput { - s.Certificates = v - return s -} - -// SetDefaultActions sets the DefaultActions field's value. -func (s *ModifyListenerInput) SetDefaultActions(v []*Action) *ModifyListenerInput { - s.DefaultActions = v - return s -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *ModifyListenerInput) SetListenerArn(v string) *ModifyListenerInput { - s.ListenerArn = &v - return s -} - -// SetPort sets the Port field's value. -func (s *ModifyListenerInput) SetPort(v int64) *ModifyListenerInput { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *ModifyListenerInput) SetProtocol(v string) *ModifyListenerInput { - s.Protocol = &v - return s -} - -// SetSslPolicy sets the SslPolicy field's value. -func (s *ModifyListenerInput) SetSslPolicy(v string) *ModifyListenerInput { - s.SslPolicy = &v - return s -} - -type ModifyListenerOutput struct { - _ struct{} `type:"structure"` - - // Information about the modified listener. - Listeners []*Listener `type:"list"` -} - -// String returns the string representation -func (s ModifyListenerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyListenerOutput) GoString() string { - return s.String() -} - -// SetListeners sets the Listeners field's value. -func (s *ModifyListenerOutput) SetListeners(v []*Listener) *ModifyListenerOutput { - s.Listeners = v - return s -} - -type ModifyLoadBalancerAttributesInput struct { - _ struct{} `type:"structure"` - - // The load balancer attributes. - // - // Attributes is a required field - Attributes []*LoadBalancerAttribute `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the load balancer. - // - // LoadBalancerArn is a required field - LoadBalancerArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyLoadBalancerAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyLoadBalancerAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyLoadBalancerAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyLoadBalancerAttributesInput"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.LoadBalancerArn == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *ModifyLoadBalancerAttributesInput) SetAttributes(v []*LoadBalancerAttribute) *ModifyLoadBalancerAttributesInput { - s.Attributes = v - return s -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *ModifyLoadBalancerAttributesInput) SetLoadBalancerArn(v string) *ModifyLoadBalancerAttributesInput { - s.LoadBalancerArn = &v - return s -} - -type ModifyLoadBalancerAttributesOutput struct { - _ struct{} `type:"structure"` - - // Information about the load balancer attributes. - Attributes []*LoadBalancerAttribute `type:"list"` -} - -// String returns the string representation -func (s ModifyLoadBalancerAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyLoadBalancerAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *ModifyLoadBalancerAttributesOutput) SetAttributes(v []*LoadBalancerAttribute) *ModifyLoadBalancerAttributesOutput { - s.Attributes = v - return s -} - -type ModifyRuleInput struct { - _ struct{} `type:"structure"` - - // The actions. - // - // If the action type is forward, you specify a target group. The protocol of - // the target group must be HTTP or HTTPS for an Application Load Balancer. - // The protocol of the target group must be TCP or TLS for a Network Load Balancer. - // - // [HTTPS listeners] If the action type is authenticate-oidc, you authenticate - // users through an identity provider that is OpenID Connect (OIDC) compliant. - // - // [HTTPS listeners] If the action type is authenticate-cognito, you authenticate - // users through the user pools supported by Amazon Cognito. - // - // [Application Load Balancer] If the action type is redirect, you redirect - // specified client requests from one URL to another. - // - // [Application Load Balancer] If the action type is fixed-response, you drop - // specified client requests and return a custom HTTP response. - Actions []*Action `type:"list"` - - // The conditions. Each condition specifies a field name and a single value. - // - // If the field name is host-header, you can specify a single host name (for - // example, my.example.com). A host name is case insensitive, can be up to 128 - // characters in length, and can contain any of the following characters. You - // can include up to three wildcard characters. - // - // * A-Z, a-z, 0-9 - // - // * - . - // - // * * (matches 0 or more characters) - // - // * ? (matches exactly 1 character) - // - // If the field name is path-pattern, you can specify a single path pattern. - // A path pattern is case-sensitive, can be up to 128 characters in length, - // and can contain any of the following characters. You can include up to three - // wildcard characters. - // - // * A-Z, a-z, 0-9 - // - // * _ - . $ / ~ " ' @ : + - // - // * & (using &) - // - // * * (matches 0 or more characters) - // - // * ? (matches exactly 1 character) - Conditions []*RuleCondition `type:"list"` - - // The Amazon Resource Name (ARN) of the rule. - // - // RuleArn is a required field - RuleArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyRuleInput"} - if s.RuleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RuleArn")) - } - if s.Actions != nil { - for i, v := range s.Actions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Actions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActions sets the Actions field's value. -func (s *ModifyRuleInput) SetActions(v []*Action) *ModifyRuleInput { - s.Actions = v - return s -} - -// SetConditions sets the Conditions field's value. -func (s *ModifyRuleInput) SetConditions(v []*RuleCondition) *ModifyRuleInput { - s.Conditions = v - return s -} - -// SetRuleArn sets the RuleArn field's value. -func (s *ModifyRuleInput) SetRuleArn(v string) *ModifyRuleInput { - s.RuleArn = &v - return s -} - -type ModifyRuleOutput struct { - _ struct{} `type:"structure"` - - // Information about the modified rule. - Rules []*Rule `type:"list"` -} - -// String returns the string representation -func (s ModifyRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyRuleOutput) GoString() string { - return s.String() -} - -// SetRules sets the Rules field's value. -func (s *ModifyRuleOutput) SetRules(v []*Rule) *ModifyRuleOutput { - s.Rules = v - return s -} - -type ModifyTargetGroupAttributesInput struct { - _ struct{} `type:"structure"` - - // The attributes. - // - // Attributes is a required field - Attributes []*TargetGroupAttribute `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyTargetGroupAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyTargetGroupAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyTargetGroupAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyTargetGroupAttributesInput"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *ModifyTargetGroupAttributesInput) SetAttributes(v []*TargetGroupAttribute) *ModifyTargetGroupAttributesInput { - s.Attributes = v - return s -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *ModifyTargetGroupAttributesInput) SetTargetGroupArn(v string) *ModifyTargetGroupAttributesInput { - s.TargetGroupArn = &v - return s -} - -type ModifyTargetGroupAttributesOutput struct { - _ struct{} `type:"structure"` - - // Information about the attributes. - Attributes []*TargetGroupAttribute `type:"list"` -} - -// String returns the string representation -func (s ModifyTargetGroupAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyTargetGroupAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *ModifyTargetGroupAttributesOutput) SetAttributes(v []*TargetGroupAttribute) *ModifyTargetGroupAttributesOutput { - s.Attributes = v - return s -} - -type ModifyTargetGroupInput struct { - _ struct{} `type:"structure"` - - // Indicates whether health checks are enabled. - HealthCheckEnabled *bool `type:"boolean"` - - // The approximate amount of time, in seconds, between health checks of an individual - // target. For Application Load Balancers, the range is 5–300 seconds. For Network - // Load Balancers, the supported values are 10 or 30 seconds. - // - // If the protocol of the target group is TCP, you can't modify this setting. - HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"` - - // [HTTP/HTTPS health checks] The ping path that is the destination for the - // health check request. - HealthCheckPath *string `min:"1" type:"string"` - - // The port the load balancer uses when performing health checks on targets. - HealthCheckPort *string `type:"string"` - - // The protocol the load balancer uses when performing health checks on targets. - // The TCP protocol is supported for health checks only if the protocol of the - // target group is TCP or TLS. The TLS protocol is not supported for health - // checks. - // - // If the protocol of the target group is TCP, you can't modify this setting. - HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"` - - // [HTTP/HTTPS health checks] The amount of time, in seconds, during which no - // response means a failed health check. - // - // If the protocol of the target group is TCP, you can't modify this setting. - HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"` - - // The number of consecutive health checks successes required before considering - // an unhealthy target healthy. - HealthyThresholdCount *int64 `min:"2" type:"integer"` - - // [HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful - // response from a target. - // - // If the protocol of the target group is TCP, you can't modify this setting. - Matcher *Matcher `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *string `type:"string" required:"true"` - - // The number of consecutive health check failures required before considering - // the target unhealthy. For Network Load Balancers, this value must be the - // same as the healthy threshold count. - UnhealthyThresholdCount *int64 `min:"2" type:"integer"` -} - -// String returns the string representation -func (s ModifyTargetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyTargetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyTargetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyTargetGroupInput"} - if s.HealthCheckIntervalSeconds != nil && *s.HealthCheckIntervalSeconds < 5 { - invalidParams.Add(request.NewErrParamMinValue("HealthCheckIntervalSeconds", 5)) - } - if s.HealthCheckPath != nil && len(*s.HealthCheckPath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HealthCheckPath", 1)) - } - if s.HealthCheckTimeoutSeconds != nil && *s.HealthCheckTimeoutSeconds < 2 { - invalidParams.Add(request.NewErrParamMinValue("HealthCheckTimeoutSeconds", 2)) - } - if s.HealthyThresholdCount != nil && *s.HealthyThresholdCount < 2 { - invalidParams.Add(request.NewErrParamMinValue("HealthyThresholdCount", 2)) - } - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) - } - if s.UnhealthyThresholdCount != nil && *s.UnhealthyThresholdCount < 2 { - invalidParams.Add(request.NewErrParamMinValue("UnhealthyThresholdCount", 2)) - } - if s.Matcher != nil { - if err := s.Matcher.Validate(); err != nil { - invalidParams.AddNested("Matcher", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthCheckEnabled sets the HealthCheckEnabled field's value. -func (s *ModifyTargetGroupInput) SetHealthCheckEnabled(v bool) *ModifyTargetGroupInput { - s.HealthCheckEnabled = &v - return s -} - -// SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. -func (s *ModifyTargetGroupInput) SetHealthCheckIntervalSeconds(v int64) *ModifyTargetGroupInput { - s.HealthCheckIntervalSeconds = &v - return s -} - -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *ModifyTargetGroupInput) SetHealthCheckPath(v string) *ModifyTargetGroupInput { - s.HealthCheckPath = &v - return s -} - -// SetHealthCheckPort sets the HealthCheckPort field's value. -func (s *ModifyTargetGroupInput) SetHealthCheckPort(v string) *ModifyTargetGroupInput { - s.HealthCheckPort = &v - return s -} - -// SetHealthCheckProtocol sets the HealthCheckProtocol field's value. -func (s *ModifyTargetGroupInput) SetHealthCheckProtocol(v string) *ModifyTargetGroupInput { - s.HealthCheckProtocol = &v - return s -} - -// SetHealthCheckTimeoutSeconds sets the HealthCheckTimeoutSeconds field's value. -func (s *ModifyTargetGroupInput) SetHealthCheckTimeoutSeconds(v int64) *ModifyTargetGroupInput { - s.HealthCheckTimeoutSeconds = &v - return s -} - -// SetHealthyThresholdCount sets the HealthyThresholdCount field's value. -func (s *ModifyTargetGroupInput) SetHealthyThresholdCount(v int64) *ModifyTargetGroupInput { - s.HealthyThresholdCount = &v - return s -} - -// SetMatcher sets the Matcher field's value. -func (s *ModifyTargetGroupInput) SetMatcher(v *Matcher) *ModifyTargetGroupInput { - s.Matcher = v - return s -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *ModifyTargetGroupInput) SetTargetGroupArn(v string) *ModifyTargetGroupInput { - s.TargetGroupArn = &v - return s -} - -// SetUnhealthyThresholdCount sets the UnhealthyThresholdCount field's value. -func (s *ModifyTargetGroupInput) SetUnhealthyThresholdCount(v int64) *ModifyTargetGroupInput { - s.UnhealthyThresholdCount = &v - return s -} - -type ModifyTargetGroupOutput struct { - _ struct{} `type:"structure"` - - // Information about the modified target group. - TargetGroups []*TargetGroup `type:"list"` -} - -// String returns the string representation -func (s ModifyTargetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyTargetGroupOutput) GoString() string { - return s.String() -} - -// SetTargetGroups sets the TargetGroups field's value. -func (s *ModifyTargetGroupOutput) SetTargetGroups(v []*TargetGroup) *ModifyTargetGroupOutput { - s.TargetGroups = v - return s -} - -// Information about a redirect action. -// -// A URI consists of the following components: protocol://hostname:port/path?query. -// You must modify at least one of the following components to avoid a redirect -// loop: protocol, hostname, port, or path. Any components that you do not modify -// retain their original values. -// -// You can reuse URI components using the following reserved keywords: -// -// * #{protocol} -// -// * #{host} -// -// * #{port} -// -// * #{path} (the leading "/" is removed) -// -// * #{query} -// -// For example, you can change the path to "/new/#{path}", the hostname to "example.#{host}", -// or the query to "#{query}&value=xyz". -type RedirectActionConfig struct { - _ struct{} `type:"structure"` - - // The hostname. This component is not percent-encoded. The hostname can contain - // #{host}. - Host *string `min:"1" type:"string"` - - // The absolute path, starting with the leading "/". This component is not percent-encoded. - // The path can contain #{host}, #{path}, and #{port}. - Path *string `min:"1" type:"string"` - - // The port. You can specify a value from 1 to 65535 or #{port}. - Port *string `type:"string"` - - // The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect - // HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You cannot redirect HTTPS - // to HTTP. - Protocol *string `type:"string"` - - // The query parameters, URL-encoded when necessary, but not percent-encoded. - // Do not include the leading "?", as it is automatically added. You can specify - // any of the reserved keywords. - Query *string `type:"string"` - - // The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary - // (HTTP 302). - // - // StatusCode is a required field - StatusCode *string `type:"string" required:"true" enum:"RedirectActionStatusCodeEnum"` -} - -// String returns the string representation -func (s RedirectActionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RedirectActionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RedirectActionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RedirectActionConfig"} - if s.Host != nil && len(*s.Host) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Host", 1)) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.StatusCode == nil { - invalidParams.Add(request.NewErrParamRequired("StatusCode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHost sets the Host field's value. -func (s *RedirectActionConfig) SetHost(v string) *RedirectActionConfig { - s.Host = &v - return s -} - -// SetPath sets the Path field's value. -func (s *RedirectActionConfig) SetPath(v string) *RedirectActionConfig { - s.Path = &v - return s -} - -// SetPort sets the Port field's value. -func (s *RedirectActionConfig) SetPort(v string) *RedirectActionConfig { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *RedirectActionConfig) SetProtocol(v string) *RedirectActionConfig { - s.Protocol = &v - return s -} - -// SetQuery sets the Query field's value. -func (s *RedirectActionConfig) SetQuery(v string) *RedirectActionConfig { - s.Query = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *RedirectActionConfig) SetStatusCode(v string) *RedirectActionConfig { - s.StatusCode = &v - return s -} - -type RegisterTargetsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *string `type:"string" required:"true"` - - // The targets. - // - // To register a target by instance ID, specify the instance ID. To register - // a target by IP address, specify the IP address. To register a Lambda function, - // specify the ARN of the Lambda function. - // - // Targets is a required field - Targets []*TargetDescription `type:"list" required:"true"` -} - -// String returns the string representation -func (s RegisterTargetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterTargetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterTargetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterTargetsInput"} - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) - } - if s.Targets == nil { - invalidParams.Add(request.NewErrParamRequired("Targets")) - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *RegisterTargetsInput) SetTargetGroupArn(v string) *RegisterTargetsInput { - s.TargetGroupArn = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *RegisterTargetsInput) SetTargets(v []*TargetDescription) *RegisterTargetsInput { - s.Targets = v - return s -} - -type RegisterTargetsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RegisterTargetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterTargetsOutput) GoString() string { - return s.String() -} - -type RemoveListenerCertificatesInput struct { - _ struct{} `type:"structure"` - - // The certificate to remove. You can specify one certificate per call. Set - // CertificateArn to the certificate ARN but do not set IsDefault. - // - // Certificates is a required field - Certificates []*Certificate `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RemoveListenerCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveListenerCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveListenerCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveListenerCertificatesInput"} - if s.Certificates == nil { - invalidParams.Add(request.NewErrParamRequired("Certificates")) - } - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificates sets the Certificates field's value. -func (s *RemoveListenerCertificatesInput) SetCertificates(v []*Certificate) *RemoveListenerCertificatesInput { - s.Certificates = v - return s -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *RemoveListenerCertificatesInput) SetListenerArn(v string) *RemoveListenerCertificatesInput { - s.ListenerArn = &v - return s -} - -type RemoveListenerCertificatesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveListenerCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveListenerCertificatesOutput) GoString() string { - return s.String() -} - -type RemoveTagsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource. - // - // ResourceArns is a required field - ResourceArns []*string `type:"list" required:"true"` - - // The tag keys for the tags to remove. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"} - if s.ResourceArns == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArns")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *RemoveTagsInput) SetResourceArns(v []*string) *RemoveTagsInput { - s.ResourceArns = v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsInput) SetTagKeys(v []*string) *RemoveTagsInput { - s.TagKeys = v - return s -} - -type RemoveTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsOutput) GoString() string { - return s.String() -} - -// Information about a rule. -type Rule struct { - _ struct{} `type:"structure"` - - // The actions. - Actions []*Action `type:"list"` - - // The conditions. - Conditions []*RuleCondition `type:"list"` - - // Indicates whether this is the default rule. - IsDefault *bool `type:"boolean"` - - // The priority. - Priority *string `type:"string"` - - // The Amazon Resource Name (ARN) of the rule. - RuleArn *string `type:"string"` -} - -// String returns the string representation -func (s Rule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Rule) GoString() string { - return s.String() -} - -// SetActions sets the Actions field's value. -func (s *Rule) SetActions(v []*Action) *Rule { - s.Actions = v - return s -} - -// SetConditions sets the Conditions field's value. -func (s *Rule) SetConditions(v []*RuleCondition) *Rule { - s.Conditions = v - return s -} - -// SetIsDefault sets the IsDefault field's value. -func (s *Rule) SetIsDefault(v bool) *Rule { - s.IsDefault = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *Rule) SetPriority(v string) *Rule { - s.Priority = &v - return s -} - -// SetRuleArn sets the RuleArn field's value. -func (s *Rule) SetRuleArn(v string) *Rule { - s.RuleArn = &v - return s -} - -// Information about a condition for a rule. -type RuleCondition struct { - _ struct{} `type:"structure"` - - // The name of the field. The possible values are host-header and path-pattern. - Field *string `type:"string"` - - // The condition value. - // - // If the field name is host-header, you can specify a single host name (for - // example, my.example.com). A host name is case insensitive, can be up to 128 - // characters in length, and can contain any of the following characters. You - // can include up to three wildcard characters. - // - // * A-Z, a-z, 0-9 - // - // * - . - // - // * * (matches 0 or more characters) - // - // * ? (matches exactly 1 character) - // - // If the field name is path-pattern, you can specify a single path pattern - // (for example, /img/*). A path pattern is case-sensitive, can be up to 128 - // characters in length, and can contain any of the following characters. You - // can include up to three wildcard characters. - // - // * A-Z, a-z, 0-9 - // - // * _ - . $ / ~ " ' @ : + - // - // * & (using &) - // - // * * (matches 0 or more characters) - // - // * ? (matches exactly 1 character) - Values []*string `type:"list"` -} - -// String returns the string representation -func (s RuleCondition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RuleCondition) GoString() string { - return s.String() -} - -// SetField sets the Field field's value. -func (s *RuleCondition) SetField(v string) *RuleCondition { - s.Field = &v - return s -} - -// SetValues sets the Values field's value. -func (s *RuleCondition) SetValues(v []*string) *RuleCondition { - s.Values = v - return s -} - -// Information about the priorities for the rules for a listener. -type RulePriorityPair struct { - _ struct{} `type:"structure"` - - // The rule priority. - Priority *int64 `min:"1" type:"integer"` - - // The Amazon Resource Name (ARN) of the rule. - RuleArn *string `type:"string"` -} - -// String returns the string representation -func (s RulePriorityPair) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RulePriorityPair) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RulePriorityPair) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RulePriorityPair"} - if s.Priority != nil && *s.Priority < 1 { - invalidParams.Add(request.NewErrParamMinValue("Priority", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPriority sets the Priority field's value. -func (s *RulePriorityPair) SetPriority(v int64) *RulePriorityPair { - s.Priority = &v - return s -} - -// SetRuleArn sets the RuleArn field's value. -func (s *RulePriorityPair) SetRuleArn(v string) *RulePriorityPair { - s.RuleArn = &v - return s -} - -type SetIpAddressTypeInput struct { - _ struct{} `type:"structure"` - - // The IP address type. The possible values are ipv4 (for IPv4 addresses) and - // dualstack (for IPv4 and IPv6 addresses). Internal load balancers must use - // ipv4. - // - // IpAddressType is a required field - IpAddressType *string `type:"string" required:"true" enum:"IpAddressType"` - - // The Amazon Resource Name (ARN) of the load balancer. - // - // LoadBalancerArn is a required field - LoadBalancerArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SetIpAddressTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetIpAddressTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetIpAddressTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetIpAddressTypeInput"} - if s.IpAddressType == nil { - invalidParams.Add(request.NewErrParamRequired("IpAddressType")) - } - if s.LoadBalancerArn == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *SetIpAddressTypeInput) SetIpAddressType(v string) *SetIpAddressTypeInput { - s.IpAddressType = &v - return s -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *SetIpAddressTypeInput) SetLoadBalancerArn(v string) *SetIpAddressTypeInput { - s.LoadBalancerArn = &v - return s -} - -type SetIpAddressTypeOutput struct { - _ struct{} `type:"structure"` - - // The IP address type. - IpAddressType *string `type:"string" enum:"IpAddressType"` -} - -// String returns the string representation -func (s SetIpAddressTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetIpAddressTypeOutput) GoString() string { - return s.String() -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *SetIpAddressTypeOutput) SetIpAddressType(v string) *SetIpAddressTypeOutput { - s.IpAddressType = &v - return s -} - -type SetRulePrioritiesInput struct { - _ struct{} `type:"structure"` - - // The rule priorities. - // - // RulePriorities is a required field - RulePriorities []*RulePriorityPair `type:"list" required:"true"` -} - -// String returns the string representation -func (s SetRulePrioritiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetRulePrioritiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetRulePrioritiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetRulePrioritiesInput"} - if s.RulePriorities == nil { - invalidParams.Add(request.NewErrParamRequired("RulePriorities")) - } - if s.RulePriorities != nil { - for i, v := range s.RulePriorities { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RulePriorities", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRulePriorities sets the RulePriorities field's value. -func (s *SetRulePrioritiesInput) SetRulePriorities(v []*RulePriorityPair) *SetRulePrioritiesInput { - s.RulePriorities = v - return s -} - -type SetRulePrioritiesOutput struct { - _ struct{} `type:"structure"` - - // Information about the rules. - Rules []*Rule `type:"list"` -} - -// String returns the string representation -func (s SetRulePrioritiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetRulePrioritiesOutput) GoString() string { - return s.String() -} - -// SetRules sets the Rules field's value. -func (s *SetRulePrioritiesOutput) SetRules(v []*Rule) *SetRulePrioritiesOutput { - s.Rules = v - return s -} - -type SetSecurityGroupsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the load balancer. - // - // LoadBalancerArn is a required field - LoadBalancerArn *string `type:"string" required:"true"` - - // The IDs of the security groups. - // - // SecurityGroups is a required field - SecurityGroups []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s SetSecurityGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetSecurityGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetSecurityGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetSecurityGroupsInput"} - if s.LoadBalancerArn == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) - } - if s.SecurityGroups == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityGroups")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *SetSecurityGroupsInput) SetLoadBalancerArn(v string) *SetSecurityGroupsInput { - s.LoadBalancerArn = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *SetSecurityGroupsInput) SetSecurityGroups(v []*string) *SetSecurityGroupsInput { - s.SecurityGroups = v - return s -} - -type SetSecurityGroupsOutput struct { - _ struct{} `type:"structure"` - - // The IDs of the security groups associated with the load balancer. - SecurityGroupIds []*string `type:"list"` -} - -// String returns the string representation -func (s SetSecurityGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetSecurityGroupsOutput) GoString() string { - return s.String() -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *SetSecurityGroupsOutput) SetSecurityGroupIds(v []*string) *SetSecurityGroupsOutput { - s.SecurityGroupIds = v - return s -} - -type SetSubnetsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the load balancer. - // - // LoadBalancerArn is a required field - LoadBalancerArn *string `type:"string" required:"true"` - - // The IDs of the public subnets. You must specify subnets from at least two - // Availability Zones. You can specify only one subnet per Availability Zone. - // You must specify either subnets or subnet mappings. - // - // You cannot specify Elastic IP addresses for your subnets. - SubnetMappings []*SubnetMapping `type:"list"` - - // The IDs of the public subnets. You must specify subnets from at least two - // Availability Zones. You can specify only one subnet per Availability Zone. - // You must specify either subnets or subnet mappings. - Subnets []*string `type:"list"` -} - -// String returns the string representation -func (s SetSubnetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetSubnetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetSubnetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetSubnetsInput"} - if s.LoadBalancerArn == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *SetSubnetsInput) SetLoadBalancerArn(v string) *SetSubnetsInput { - s.LoadBalancerArn = &v - return s -} - -// SetSubnetMappings sets the SubnetMappings field's value. -func (s *SetSubnetsInput) SetSubnetMappings(v []*SubnetMapping) *SetSubnetsInput { - s.SubnetMappings = v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *SetSubnetsInput) SetSubnets(v []*string) *SetSubnetsInput { - s.Subnets = v - return s -} - -type SetSubnetsOutput struct { - _ struct{} `type:"structure"` - - // Information about the subnet and Availability Zone. - AvailabilityZones []*AvailabilityZone `type:"list"` -} - -// String returns the string representation -func (s SetSubnetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetSubnetsOutput) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *SetSubnetsOutput) SetAvailabilityZones(v []*AvailabilityZone) *SetSubnetsOutput { - s.AvailabilityZones = v - return s -} - -// Information about a policy used for SSL negotiation. -type SslPolicy struct { - _ struct{} `type:"structure"` - - // The ciphers. - Ciphers []*Cipher `type:"list"` - - // The name of the policy. - Name *string `type:"string"` - - // The protocols. - SslProtocols []*string `type:"list"` -} - -// String returns the string representation -func (s SslPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SslPolicy) GoString() string { - return s.String() -} - -// SetCiphers sets the Ciphers field's value. -func (s *SslPolicy) SetCiphers(v []*Cipher) *SslPolicy { - s.Ciphers = v - return s -} - -// SetName sets the Name field's value. -func (s *SslPolicy) SetName(v string) *SslPolicy { - s.Name = &v - return s -} - -// SetSslProtocols sets the SslProtocols field's value. -func (s *SslPolicy) SetSslProtocols(v []*string) *SslPolicy { - s.SslProtocols = v - return s -} - -// Information about a subnet mapping. -type SubnetMapping struct { - _ struct{} `type:"structure"` - - // [Network Load Balancers] The allocation ID of the Elastic IP address. - AllocationId *string `type:"string"` - - // The ID of the subnet. - SubnetId *string `type:"string"` -} - -// String returns the string representation -func (s SubnetMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubnetMapping) GoString() string { - return s.String() -} - -// SetAllocationId sets the AllocationId field's value. -func (s *SubnetMapping) SetAllocationId(v string) *SubnetMapping { - s.AllocationId = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *SubnetMapping) SetSubnetId(v string) *SubnetMapping { - s.SubnetId = &v - return s -} - -// Information about a tag. -type Tag struct { - _ struct{} `type:"structure"` - - // The key of the tag. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The value of the tag. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// The tags associated with a resource. -type TagDescription struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource. - ResourceArn *string `type:"string"` - - // Information about the tags. - Tags []*Tag `min:"1" type:"list"` -} - -// String returns the string representation -func (s TagDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagDescription) GoString() string { - return s.String() -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TagDescription) SetResourceArn(v string) *TagDescription { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagDescription) SetTags(v []*Tag) *TagDescription { - s.Tags = v - return s -} - -// Information about a target. -type TargetDescription struct { - _ struct{} `type:"structure"` - - // An Availability Zone or all. This determines whether the target receives - // traffic from the load balancer nodes in the specified Availability Zone or - // from all enabled Availability Zones for the load balancer. - // - // This parameter is not supported if the target type of the target group is - // instance. - // - // If the target type is ip and the IP address is in a subnet of the VPC for - // the target group, the Availability Zone is automatically detected and this - // parameter is optional. If the IP address is outside the VPC, this parameter - // is required. - // - // With an Application Load Balancer, if the target type is ip and the IP address - // is outside the VPC for the target group, the only supported value is all. - // - // If the target type is lambda, this parameter is optional and the only supported - // value is all. - AvailabilityZone *string `type:"string"` - - // The ID of the target. If the target type of the target group is instance, - // specify an instance ID. If the target type is ip, specify an IP address. - // If the target type is lambda, specify the ARN of the Lambda function. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The port on which the target is listening. - Port *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s TargetDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetDescription) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetDescription) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetDescription"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Port != nil && *s.Port < 1 { - invalidParams.Add(request.NewErrParamMinValue("Port", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *TargetDescription) SetAvailabilityZone(v string) *TargetDescription { - s.AvailabilityZone = &v - return s -} - -// SetId sets the Id field's value. -func (s *TargetDescription) SetId(v string) *TargetDescription { - s.Id = &v - return s -} - -// SetPort sets the Port field's value. -func (s *TargetDescription) SetPort(v int64) *TargetDescription { - s.Port = &v - return s -} - -// Information about a target group. -type TargetGroup struct { - _ struct{} `type:"structure"` - - // Indicates whether health checks are enabled. - HealthCheckEnabled *bool `type:"boolean"` - - // The approximate amount of time, in seconds, between health checks of an individual - // target. - HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"` - - // The destination for the health check request. - HealthCheckPath *string `min:"1" type:"string"` - - // The port to use to connect with the target. - HealthCheckPort *string `type:"string"` - - // The protocol to use to connect with the target. - HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"` - - // The amount of time, in seconds, during which no response means a failed health - // check. - HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"` - - // The number of consecutive health checks successes required before considering - // an unhealthy target healthy. - HealthyThresholdCount *int64 `min:"2" type:"integer"` - - // The Amazon Resource Names (ARN) of the load balancers that route traffic - // to this target group. - LoadBalancerArns []*string `type:"list"` - - // The HTTP codes to use when checking for a successful response from a target. - Matcher *Matcher `type:"structure"` - - // The port on which the targets are listening. - Port *int64 `min:"1" type:"integer"` - - // The protocol to use for routing traffic to the targets. - Protocol *string `type:"string" enum:"ProtocolEnum"` - - // The Amazon Resource Name (ARN) of the target group. - TargetGroupArn *string `type:"string"` - - // The name of the target group. - TargetGroupName *string `type:"string"` - - // The type of target that you must specify when registering targets with this - // target group. The possible values are instance (targets are specified by - // instance ID) or ip (targets are specified by IP address). - TargetType *string `type:"string" enum:"TargetTypeEnum"` - - // The number of consecutive health check failures required before considering - // the target unhealthy. - UnhealthyThresholdCount *int64 `min:"2" type:"integer"` - - // The ID of the VPC for the targets. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s TargetGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetGroup) GoString() string { - return s.String() -} - -// SetHealthCheckEnabled sets the HealthCheckEnabled field's value. -func (s *TargetGroup) SetHealthCheckEnabled(v bool) *TargetGroup { - s.HealthCheckEnabled = &v - return s -} - -// SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. -func (s *TargetGroup) SetHealthCheckIntervalSeconds(v int64) *TargetGroup { - s.HealthCheckIntervalSeconds = &v - return s -} - -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *TargetGroup) SetHealthCheckPath(v string) *TargetGroup { - s.HealthCheckPath = &v - return s -} - -// SetHealthCheckPort sets the HealthCheckPort field's value. -func (s *TargetGroup) SetHealthCheckPort(v string) *TargetGroup { - s.HealthCheckPort = &v - return s -} - -// SetHealthCheckProtocol sets the HealthCheckProtocol field's value. -func (s *TargetGroup) SetHealthCheckProtocol(v string) *TargetGroup { - s.HealthCheckProtocol = &v - return s -} - -// SetHealthCheckTimeoutSeconds sets the HealthCheckTimeoutSeconds field's value. -func (s *TargetGroup) SetHealthCheckTimeoutSeconds(v int64) *TargetGroup { - s.HealthCheckTimeoutSeconds = &v - return s -} - -// SetHealthyThresholdCount sets the HealthyThresholdCount field's value. -func (s *TargetGroup) SetHealthyThresholdCount(v int64) *TargetGroup { - s.HealthyThresholdCount = &v - return s -} - -// SetLoadBalancerArns sets the LoadBalancerArns field's value. -func (s *TargetGroup) SetLoadBalancerArns(v []*string) *TargetGroup { - s.LoadBalancerArns = v - return s -} - -// SetMatcher sets the Matcher field's value. -func (s *TargetGroup) SetMatcher(v *Matcher) *TargetGroup { - s.Matcher = v - return s -} - -// SetPort sets the Port field's value. -func (s *TargetGroup) SetPort(v int64) *TargetGroup { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *TargetGroup) SetProtocol(v string) *TargetGroup { - s.Protocol = &v - return s -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *TargetGroup) SetTargetGroupArn(v string) *TargetGroup { - s.TargetGroupArn = &v - return s -} - -// SetTargetGroupName sets the TargetGroupName field's value. -func (s *TargetGroup) SetTargetGroupName(v string) *TargetGroup { - s.TargetGroupName = &v - return s -} - -// SetTargetType sets the TargetType field's value. -func (s *TargetGroup) SetTargetType(v string) *TargetGroup { - s.TargetType = &v - return s -} - -// SetUnhealthyThresholdCount sets the UnhealthyThresholdCount field's value. -func (s *TargetGroup) SetUnhealthyThresholdCount(v int64) *TargetGroup { - s.UnhealthyThresholdCount = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *TargetGroup) SetVpcId(v string) *TargetGroup { - s.VpcId = &v - return s -} - -// Information about a target group attribute. -type TargetGroupAttribute struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - // - // The following attribute is supported by both Application Load Balancers and - // Network Load Balancers: - // - // * deregistration_delay.timeout_seconds - The amount of time, in seconds, - // for Elastic Load Balancing to wait before changing the state of a deregistering - // target from draining to unused. The range is 0-3600 seconds. The default - // value is 300 seconds. If the target is a Lambda function, this attribute - // is not supported. - // - // The following attributes are supported by Application Load Balancers if the - // target is not a Lambda function: - // - // * slow_start.duration_seconds - The time period, in seconds, during which - // a newly registered target receives a linearly increasing share of the - // traffic to the target group. After this time period ends, the target receives - // its full share of traffic. The range is 30-900 seconds (15 minutes). Slow - // start mode is disabled by default. - // - // * stickiness.enabled - Indicates whether sticky sessions are enabled. - // The value is true or false. The default is false. - // - // * stickiness.type - The type of sticky sessions. The possible value is - // lb_cookie. - // - // * stickiness.lb_cookie.duration_seconds - The time period, in seconds, - // during which requests from a client should be routed to the same target. - // After this time period expires, the load balancer-generated cookie is - // considered stale. The range is 1 second to 1 week (604800 seconds). The - // default value is 1 day (86400 seconds). - // - // The following attribute is supported only if the target is a Lambda function. - // - // * lambda.multi_value_headers.enabled - Indicates whether the request and - // response headers exchanged between the load balancer and the Lambda function - // include arrays of values or strings. The value is true or false. The default - // is false. If the value is false and the request contains a duplicate header - // field name or query parameter key, the load balancer uses the last value - // sent by the client. - // - // The following attribute is supported only by Network Load Balancers: - // - // * proxy_protocol_v2.enabled - Indicates whether Proxy Protocol version - // 2 is enabled. The value is true or false. The default is false. - Key *string `type:"string"` - - // The value of the attribute. - Value *string `type:"string"` -} - -// String returns the string representation -func (s TargetGroupAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetGroupAttribute) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *TargetGroupAttribute) SetKey(v string) *TargetGroupAttribute { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *TargetGroupAttribute) SetValue(v string) *TargetGroupAttribute { - s.Value = &v - return s -} - -// Information about the current health of a target. -type TargetHealth struct { - _ struct{} `type:"structure"` - - // A description of the target health that provides additional details. If the - // state is healthy, a description is not provided. - Description *string `type:"string"` - - // The reason code. - // - // If the target state is healthy, a reason code is not provided. - // - // If the target state is initial, the reason code can be one of the following - // values: - // - // * Elb.RegistrationInProgress - The target is in the process of being registered - // with the load balancer. - // - // * Elb.InitialHealthChecking - The load balancer is still sending the target - // the minimum number of health checks required to determine its health status. - // - // If the target state is unhealthy, the reason code can be one of the following - // values: - // - // * Target.ResponseCodeMismatch - The health checks did not return an expected - // HTTP code. - // - // * Target.Timeout - The health check requests timed out. - // - // * Target.FailedHealthChecks - The health checks failed because the connection - // to the target timed out, the target response was malformed, or the target - // failed the health check for an unknown reason. - // - // * Elb.InternalError - The health checks failed due to an internal error. - // - // If the target state is unused, the reason code can be one of the following - // values: - // - // * Target.NotRegistered - The target is not registered with the target - // group. - // - // * Target.NotInUse - The target group is not used by any load balancer - // or the target is in an Availability Zone that is not enabled for its load - // balancer. - // - // * Target.IpUnusable - The target IP address is reserved for use by a load - // balancer. - // - // * Target.InvalidState - The target is in the stopped or terminated state. - // - // If the target state is draining, the reason code can be the following value: - // - // * Target.DeregistrationInProgress - The target is in the process of being - // deregistered and the deregistration delay period has not expired. - // - // If the target state is unavailable, the reason code can be the following - // value: - // - // * Target.HealthCheckDisabled - Health checks are disabled for the target - // group. - Reason *string `type:"string" enum:"TargetHealthReasonEnum"` - - // The state of the target. - State *string `type:"string" enum:"TargetHealthStateEnum"` -} - -// String returns the string representation -func (s TargetHealth) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetHealth) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *TargetHealth) SetDescription(v string) *TargetHealth { - s.Description = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *TargetHealth) SetReason(v string) *TargetHealth { - s.Reason = &v - return s -} - -// SetState sets the State field's value. -func (s *TargetHealth) SetState(v string) *TargetHealth { - s.State = &v - return s -} - -// Information about the health of a target. -type TargetHealthDescription struct { - _ struct{} `type:"structure"` - - // The port to use to connect with the target. - HealthCheckPort *string `type:"string"` - - // The description of the target. - Target *TargetDescription `type:"structure"` - - // The health information for the target. - TargetHealth *TargetHealth `type:"structure"` -} - -// String returns the string representation -func (s TargetHealthDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetHealthDescription) GoString() string { - return s.String() -} - -// SetHealthCheckPort sets the HealthCheckPort field's value. -func (s *TargetHealthDescription) SetHealthCheckPort(v string) *TargetHealthDescription { - s.HealthCheckPort = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *TargetHealthDescription) SetTarget(v *TargetDescription) *TargetHealthDescription { - s.Target = v - return s -} - -// SetTargetHealth sets the TargetHealth field's value. -func (s *TargetHealthDescription) SetTargetHealth(v *TargetHealth) *TargetHealthDescription { - s.TargetHealth = v - return s -} - -const ( - // ActionTypeEnumForward is a ActionTypeEnum enum value - ActionTypeEnumForward = "forward" - - // ActionTypeEnumAuthenticateOidc is a ActionTypeEnum enum value - ActionTypeEnumAuthenticateOidc = "authenticate-oidc" - - // ActionTypeEnumAuthenticateCognito is a ActionTypeEnum enum value - ActionTypeEnumAuthenticateCognito = "authenticate-cognito" - - // ActionTypeEnumRedirect is a ActionTypeEnum enum value - ActionTypeEnumRedirect = "redirect" - - // ActionTypeEnumFixedResponse is a ActionTypeEnum enum value - ActionTypeEnumFixedResponse = "fixed-response" -) - -const ( - // AuthenticateCognitoActionConditionalBehaviorEnumDeny is a AuthenticateCognitoActionConditionalBehaviorEnum enum value - AuthenticateCognitoActionConditionalBehaviorEnumDeny = "deny" - - // AuthenticateCognitoActionConditionalBehaviorEnumAllow is a AuthenticateCognitoActionConditionalBehaviorEnum enum value - AuthenticateCognitoActionConditionalBehaviorEnumAllow = "allow" - - // AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate is a AuthenticateCognitoActionConditionalBehaviorEnum enum value - AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate = "authenticate" -) - -const ( - // AuthenticateOidcActionConditionalBehaviorEnumDeny is a AuthenticateOidcActionConditionalBehaviorEnum enum value - AuthenticateOidcActionConditionalBehaviorEnumDeny = "deny" - - // AuthenticateOidcActionConditionalBehaviorEnumAllow is a AuthenticateOidcActionConditionalBehaviorEnum enum value - AuthenticateOidcActionConditionalBehaviorEnumAllow = "allow" - - // AuthenticateOidcActionConditionalBehaviorEnumAuthenticate is a AuthenticateOidcActionConditionalBehaviorEnum enum value - AuthenticateOidcActionConditionalBehaviorEnumAuthenticate = "authenticate" -) - -const ( - // IpAddressTypeIpv4 is a IpAddressType enum value - IpAddressTypeIpv4 = "ipv4" - - // IpAddressTypeDualstack is a IpAddressType enum value - IpAddressTypeDualstack = "dualstack" -) - -const ( - // LoadBalancerSchemeEnumInternetFacing is a LoadBalancerSchemeEnum enum value - LoadBalancerSchemeEnumInternetFacing = "internet-facing" - - // LoadBalancerSchemeEnumInternal is a LoadBalancerSchemeEnum enum value - LoadBalancerSchemeEnumInternal = "internal" -) - -const ( - // LoadBalancerStateEnumActive is a LoadBalancerStateEnum enum value - LoadBalancerStateEnumActive = "active" - - // LoadBalancerStateEnumProvisioning is a LoadBalancerStateEnum enum value - LoadBalancerStateEnumProvisioning = "provisioning" - - // LoadBalancerStateEnumActiveImpaired is a LoadBalancerStateEnum enum value - LoadBalancerStateEnumActiveImpaired = "active_impaired" - - // LoadBalancerStateEnumFailed is a LoadBalancerStateEnum enum value - LoadBalancerStateEnumFailed = "failed" -) - -const ( - // LoadBalancerTypeEnumApplication is a LoadBalancerTypeEnum enum value - LoadBalancerTypeEnumApplication = "application" - - // LoadBalancerTypeEnumNetwork is a LoadBalancerTypeEnum enum value - LoadBalancerTypeEnumNetwork = "network" -) - -const ( - // ProtocolEnumHttp is a ProtocolEnum enum value - ProtocolEnumHttp = "HTTP" - - // ProtocolEnumHttps is a ProtocolEnum enum value - ProtocolEnumHttps = "HTTPS" - - // ProtocolEnumTcp is a ProtocolEnum enum value - ProtocolEnumTcp = "TCP" - - // ProtocolEnumTls is a ProtocolEnum enum value - ProtocolEnumTls = "TLS" -) - -const ( - // RedirectActionStatusCodeEnumHttp301 is a RedirectActionStatusCodeEnum enum value - RedirectActionStatusCodeEnumHttp301 = "HTTP_301" - - // RedirectActionStatusCodeEnumHttp302 is a RedirectActionStatusCodeEnum enum value - RedirectActionStatusCodeEnumHttp302 = "HTTP_302" -) - -const ( - // TargetHealthReasonEnumElbRegistrationInProgress is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumElbRegistrationInProgress = "Elb.RegistrationInProgress" - - // TargetHealthReasonEnumElbInitialHealthChecking is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumElbInitialHealthChecking = "Elb.InitialHealthChecking" - - // TargetHealthReasonEnumTargetResponseCodeMismatch is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetResponseCodeMismatch = "Target.ResponseCodeMismatch" - - // TargetHealthReasonEnumTargetTimeout is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetTimeout = "Target.Timeout" - - // TargetHealthReasonEnumTargetFailedHealthChecks is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetFailedHealthChecks = "Target.FailedHealthChecks" - - // TargetHealthReasonEnumTargetNotRegistered is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetNotRegistered = "Target.NotRegistered" - - // TargetHealthReasonEnumTargetNotInUse is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetNotInUse = "Target.NotInUse" - - // TargetHealthReasonEnumTargetDeregistrationInProgress is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetDeregistrationInProgress = "Target.DeregistrationInProgress" - - // TargetHealthReasonEnumTargetInvalidState is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetInvalidState = "Target.InvalidState" - - // TargetHealthReasonEnumTargetIpUnusable is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetIpUnusable = "Target.IpUnusable" - - // TargetHealthReasonEnumTargetHealthCheckDisabled is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetHealthCheckDisabled = "Target.HealthCheckDisabled" - - // TargetHealthReasonEnumElbInternalError is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumElbInternalError = "Elb.InternalError" -) - -const ( - // TargetHealthStateEnumInitial is a TargetHealthStateEnum enum value - TargetHealthStateEnumInitial = "initial" - - // TargetHealthStateEnumHealthy is a TargetHealthStateEnum enum value - TargetHealthStateEnumHealthy = "healthy" - - // TargetHealthStateEnumUnhealthy is a TargetHealthStateEnum enum value - TargetHealthStateEnumUnhealthy = "unhealthy" - - // TargetHealthStateEnumUnused is a TargetHealthStateEnum enum value - TargetHealthStateEnumUnused = "unused" - - // TargetHealthStateEnumDraining is a TargetHealthStateEnum enum value - TargetHealthStateEnumDraining = "draining" - - // TargetHealthStateEnumUnavailable is a TargetHealthStateEnum enum value - TargetHealthStateEnumUnavailable = "unavailable" -) - -const ( - // TargetTypeEnumInstance is a TargetTypeEnum enum value - TargetTypeEnumInstance = "instance" - - // TargetTypeEnumIp is a TargetTypeEnum enum value - TargetTypeEnumIp = "ip" - - // TargetTypeEnumLambda is a TargetTypeEnum enum value - TargetTypeEnumLambda = "lambda" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go deleted file mode 100644 index cae80a951..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package elbv2 provides the client and types for making API -// requests to Elastic Load Balancing. -// -// A load balancer distributes incoming traffic across targets, such as your -// EC2 instances. This enables you to increase the availability of your application. -// The load balancer also monitors the health of its registered targets and -// ensures that it routes traffic only to healthy targets. You configure your -// load balancer to accept incoming traffic by specifying one or more listeners, -// which are configured with a protocol and port number for connections from -// clients to the load balancer. You configure a target group with a protocol -// and port number for connections from the load balancer to the targets, and -// with health check settings to be used when checking the health status of -// the targets. -// -// Elastic Load Balancing supports the following types of load balancers: Application -// Load Balancers, Network Load Balancers, and Classic Load Balancers. -// -// An Application Load Balancer makes routing and load balancing decisions at -// the application layer (HTTP/HTTPS). A Network Load Balancer makes routing -// and load balancing decisions at the transport layer (TCP/TLS). Both Application -// Load Balancers and Network Load Balancers can route requests to one or more -// ports on each EC2 instance or container instance in your virtual private -// cloud (VPC). -// -// A Classic Load Balancer makes routing and load balancing decisions either -// at the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS), and -// supports either EC2-Classic or a VPC. For more information, see the Elastic -// Load Balancing User Guide (http://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/). -// -// This reference covers the 2015-12-01 API, which supports Application Load -// Balancers and Network Load Balancers. The 2012-06-01 API supports Classic -// Load Balancers. -// -// To get started, complete the following tasks: -// -// Create a load balancer using CreateLoadBalancer. -// -// Create a target group using CreateTargetGroup. -// -// Register targets for the target group using RegisterTargets. -// -// Create one or more listeners for your load balancer using CreateListener. -// -// To delete a load balancer and its related resources, complete the following -// tasks: -// -// Delete the load balancer using DeleteLoadBalancer. -// -// Delete the target group using DeleteTargetGroup. -// -// All Elastic Load Balancing operations are idempotent, which means that they -// complete at most one time. If you repeat an operation, it succeeds. -// -// See https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01 for more information on this service. -// -// See elbv2 package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elbv2/ -// -// Using the Client -// -// To contact Elastic Load Balancing 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 Elastic Load Balancing client ELBV2 for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elbv2/#New -package elbv2 diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go deleted file mode 100644 index b813ebeff..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go +++ /dev/null @@ -1,219 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elbv2 - -const ( - - // ErrCodeAllocationIdNotFoundException for service response error code - // "AllocationIdNotFound". - // - // The specified allocation ID does not exist. - ErrCodeAllocationIdNotFoundException = "AllocationIdNotFound" - - // ErrCodeAvailabilityZoneNotSupportedException for service response error code - // "AvailabilityZoneNotSupported". - // - // The specified Availability Zone is not supported. - ErrCodeAvailabilityZoneNotSupportedException = "AvailabilityZoneNotSupported" - - // ErrCodeCertificateNotFoundException for service response error code - // "CertificateNotFound". - // - // The specified certificate does not exist. - ErrCodeCertificateNotFoundException = "CertificateNotFound" - - // ErrCodeDuplicateListenerException for service response error code - // "DuplicateListener". - // - // A listener with the specified port already exists. - ErrCodeDuplicateListenerException = "DuplicateListener" - - // ErrCodeDuplicateLoadBalancerNameException for service response error code - // "DuplicateLoadBalancerName". - // - // A load balancer with the specified name already exists. - ErrCodeDuplicateLoadBalancerNameException = "DuplicateLoadBalancerName" - - // ErrCodeDuplicateTagKeysException for service response error code - // "DuplicateTagKeys". - // - // A tag key was specified more than once. - ErrCodeDuplicateTagKeysException = "DuplicateTagKeys" - - // ErrCodeDuplicateTargetGroupNameException for service response error code - // "DuplicateTargetGroupName". - // - // A target group with the specified name already exists. - ErrCodeDuplicateTargetGroupNameException = "DuplicateTargetGroupName" - - // ErrCodeHealthUnavailableException for service response error code - // "HealthUnavailable". - // - // The health of the specified targets could not be retrieved due to an internal - // error. - ErrCodeHealthUnavailableException = "HealthUnavailable" - - // ErrCodeIncompatibleProtocolsException for service response error code - // "IncompatibleProtocols". - // - // The specified configuration is not valid with this protocol. - ErrCodeIncompatibleProtocolsException = "IncompatibleProtocols" - - // ErrCodeInvalidConfigurationRequestException for service response error code - // "InvalidConfigurationRequest". - // - // The requested configuration is not valid. - ErrCodeInvalidConfigurationRequestException = "InvalidConfigurationRequest" - - // ErrCodeInvalidLoadBalancerActionException for service response error code - // "InvalidLoadBalancerAction". - // - // The requested action is not valid. - ErrCodeInvalidLoadBalancerActionException = "InvalidLoadBalancerAction" - - // ErrCodeInvalidSchemeException for service response error code - // "InvalidScheme". - // - // The requested scheme is not valid. - ErrCodeInvalidSchemeException = "InvalidScheme" - - // ErrCodeInvalidSecurityGroupException for service response error code - // "InvalidSecurityGroup". - // - // The specified security group does not exist. - ErrCodeInvalidSecurityGroupException = "InvalidSecurityGroup" - - // ErrCodeInvalidSubnetException for service response error code - // "InvalidSubnet". - // - // The specified subnet is out of available addresses. - ErrCodeInvalidSubnetException = "InvalidSubnet" - - // ErrCodeInvalidTargetException for service response error code - // "InvalidTarget". - // - // The specified target does not exist, is not in the same VPC as the target - // group, or has an unsupported instance type. - ErrCodeInvalidTargetException = "InvalidTarget" - - // ErrCodeListenerNotFoundException for service response error code - // "ListenerNotFound". - // - // The specified listener does not exist. - ErrCodeListenerNotFoundException = "ListenerNotFound" - - // ErrCodeLoadBalancerNotFoundException for service response error code - // "LoadBalancerNotFound". - // - // The specified load balancer does not exist. - ErrCodeLoadBalancerNotFoundException = "LoadBalancerNotFound" - - // ErrCodeOperationNotPermittedException for service response error code - // "OperationNotPermitted". - // - // This operation is not allowed. - ErrCodeOperationNotPermittedException = "OperationNotPermitted" - - // ErrCodePriorityInUseException for service response error code - // "PriorityInUse". - // - // The specified priority is in use. - ErrCodePriorityInUseException = "PriorityInUse" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUse". - // - // A specified resource is in use. - ErrCodeResourceInUseException = "ResourceInUse" - - // ErrCodeRuleNotFoundException for service response error code - // "RuleNotFound". - // - // The specified rule does not exist. - ErrCodeRuleNotFoundException = "RuleNotFound" - - // ErrCodeSSLPolicyNotFoundException for service response error code - // "SSLPolicyNotFound". - // - // The specified SSL policy does not exist. - ErrCodeSSLPolicyNotFoundException = "SSLPolicyNotFound" - - // ErrCodeSubnetNotFoundException for service response error code - // "SubnetNotFound". - // - // The specified subnet does not exist. - ErrCodeSubnetNotFoundException = "SubnetNotFound" - - // ErrCodeTargetGroupAssociationLimitException for service response error code - // "TargetGroupAssociationLimit". - // - // You've reached the limit on the number of load balancers per target group. - ErrCodeTargetGroupAssociationLimitException = "TargetGroupAssociationLimit" - - // ErrCodeTargetGroupNotFoundException for service response error code - // "TargetGroupNotFound". - // - // The specified target group does not exist. - ErrCodeTargetGroupNotFoundException = "TargetGroupNotFound" - - // ErrCodeTooManyActionsException for service response error code - // "TooManyActions". - // - // You've reached the limit on the number of actions per rule. - ErrCodeTooManyActionsException = "TooManyActions" - - // ErrCodeTooManyCertificatesException for service response error code - // "TooManyCertificates". - // - // You've reached the limit on the number of certificates per load balancer. - ErrCodeTooManyCertificatesException = "TooManyCertificates" - - // ErrCodeTooManyListenersException for service response error code - // "TooManyListeners". - // - // You've reached the limit on the number of listeners per load balancer. - ErrCodeTooManyListenersException = "TooManyListeners" - - // ErrCodeTooManyLoadBalancersException for service response error code - // "TooManyLoadBalancers". - // - // You've reached the limit on the number of load balancers for your AWS account. - ErrCodeTooManyLoadBalancersException = "TooManyLoadBalancers" - - // ErrCodeTooManyRegistrationsForTargetIdException for service response error code - // "TooManyRegistrationsForTargetId". - // - // You've reached the limit on the number of times a target can be registered - // with a load balancer. - ErrCodeTooManyRegistrationsForTargetIdException = "TooManyRegistrationsForTargetId" - - // ErrCodeTooManyRulesException for service response error code - // "TooManyRules". - // - // You've reached the limit on the number of rules per load balancer. - ErrCodeTooManyRulesException = "TooManyRules" - - // ErrCodeTooManyTagsException for service response error code - // "TooManyTags". - // - // You've reached the limit on the number of tags per load balancer. - ErrCodeTooManyTagsException = "TooManyTags" - - // ErrCodeTooManyTargetGroupsException for service response error code - // "TooManyTargetGroups". - // - // You've reached the limit on the number of target groups for your AWS account. - ErrCodeTooManyTargetGroupsException = "TooManyTargetGroups" - - // ErrCodeTooManyTargetsException for service response error code - // "TooManyTargets". - // - // You've reached the limit on the number of targets. - ErrCodeTooManyTargetsException = "TooManyTargets" - - // ErrCodeUnsupportedProtocolException for service response error code - // "UnsupportedProtocol". - // - // The specified protocol is not supported. - ErrCodeUnsupportedProtocolException = "UnsupportedProtocol" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go deleted file mode 100644 index ad97e8df8..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elbv2 - -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/query" -) - -// ELBV2 provides the API operation methods for making requests to -// Elastic Load Balancing. See this package's package overview docs -// for details on the service. -// -// ELBV2 methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ELBV2 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 = "elasticloadbalancing" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Elastic Load Balancing v2" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ELBV2 client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a ELBV2 client from just a session. -// svc := elbv2.New(mySession) -// -// // Create a ELBV2 client with additional configuration -// svc := elbv2.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ELBV2 { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ELBV2 { - svc := &ELBV2{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-12-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ELBV2 operation and runs any -// custom request initialization. -func (c *ELBV2) 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/elbv2/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/waiters.go deleted file mode 100644 index f08f1aaf2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/waiters.go +++ /dev/null @@ -1,270 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elbv2 - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilLoadBalancerAvailable uses the Elastic Load Balancing v2 API operation -// DescribeLoadBalancers to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELBV2) WaitUntilLoadBalancerAvailable(input *DescribeLoadBalancersInput) error { - return c.WaitUntilLoadBalancerAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilLoadBalancerAvailableWithContext is an extended version of WaitUntilLoadBalancerAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) WaitUntilLoadBalancerAvailableWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilLoadBalancerAvailable", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "LoadBalancers[].State.Code", - Expected: "active", - }, - { - State: request.RetryWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "LoadBalancers[].State.Code", - Expected: "provisioning", - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "LoadBalancerNotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeLoadBalancersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLoadBalancersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilLoadBalancerExists uses the Elastic Load Balancing v2 API operation -// DescribeLoadBalancers to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELBV2) WaitUntilLoadBalancerExists(input *DescribeLoadBalancersInput) error { - return c.WaitUntilLoadBalancerExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilLoadBalancerExistsWithContext is an extended version of WaitUntilLoadBalancerExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) WaitUntilLoadBalancerExistsWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilLoadBalancerExists", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "LoadBalancerNotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeLoadBalancersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLoadBalancersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilLoadBalancersDeleted uses the Elastic Load Balancing v2 API operation -// DescribeLoadBalancers to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELBV2) WaitUntilLoadBalancersDeleted(input *DescribeLoadBalancersInput) error { - return c.WaitUntilLoadBalancersDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilLoadBalancersDeletedWithContext is an extended version of WaitUntilLoadBalancersDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) WaitUntilLoadBalancersDeletedWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilLoadBalancersDeleted", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.RetryWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "LoadBalancers[].State.Code", - Expected: "active", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "LoadBalancerNotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeLoadBalancersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLoadBalancersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilTargetDeregistered uses the Elastic Load Balancing v2 API operation -// DescribeTargetHealth to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELBV2) WaitUntilTargetDeregistered(input *DescribeTargetHealthInput) error { - return c.WaitUntilTargetDeregisteredWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilTargetDeregisteredWithContext is an extended version of WaitUntilTargetDeregistered. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) WaitUntilTargetDeregisteredWithContext(ctx aws.Context, input *DescribeTargetHealthInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilTargetDeregistered", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidTarget", - }, - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "TargetHealthDescriptions[].TargetHealth.State", - Expected: "unused", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeTargetHealthInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTargetHealthRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilTargetInService uses the Elastic Load Balancing v2 API operation -// DescribeTargetHealth to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELBV2) WaitUntilTargetInService(input *DescribeTargetHealthInput) error { - return c.WaitUntilTargetInServiceWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilTargetInServiceWithContext is an extended version of WaitUntilTargetInService. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ELBV2) WaitUntilTargetInServiceWithContext(ctx aws.Context, input *DescribeTargetHealthInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilTargetInService", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "TargetHealthDescriptions[].TargetHealth.State", - Expected: "healthy", - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidInstance", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeTargetHealthInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTargetHealthRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go deleted file mode 100644 index 6f844686a..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go +++ /dev/null @@ -1,10761 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package emr - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAddInstanceFleet = "AddInstanceFleet" - -// AddInstanceFleetRequest generates a "aws/request.Request" representing the -// client's request for the AddInstanceFleet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddInstanceFleet for more information on using the AddInstanceFleet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddInstanceFleetRequest method. -// req, resp := client.AddInstanceFleetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddInstanceFleet -func (c *EMR) AddInstanceFleetRequest(input *AddInstanceFleetInput) (req *request.Request, output *AddInstanceFleetOutput) { - op := &request.Operation{ - Name: opAddInstanceFleet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddInstanceFleetInput{} - } - - output = &AddInstanceFleetOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddInstanceFleet API operation for Amazon Elastic MapReduce. -// -// Adds an instance fleet to a running cluster. -// -// The instance fleet configuration is available only in Amazon EMR versions -// 4.8.0 and later, excluding 5.0.x. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation AddInstanceFleet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddInstanceFleet -func (c *EMR) AddInstanceFleet(input *AddInstanceFleetInput) (*AddInstanceFleetOutput, error) { - req, out := c.AddInstanceFleetRequest(input) - return out, req.Send() -} - -// AddInstanceFleetWithContext is the same as AddInstanceFleet with the addition of -// the ability to pass a context and additional request options. -// -// See AddInstanceFleet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) AddInstanceFleetWithContext(ctx aws.Context, input *AddInstanceFleetInput, opts ...request.Option) (*AddInstanceFleetOutput, error) { - req, out := c.AddInstanceFleetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddInstanceGroups = "AddInstanceGroups" - -// AddInstanceGroupsRequest generates a "aws/request.Request" representing the -// client's request for the AddInstanceGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddInstanceGroups for more information on using the AddInstanceGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddInstanceGroupsRequest method. -// req, resp := client.AddInstanceGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddInstanceGroups -func (c *EMR) AddInstanceGroupsRequest(input *AddInstanceGroupsInput) (req *request.Request, output *AddInstanceGroupsOutput) { - op := &request.Operation{ - Name: opAddInstanceGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddInstanceGroupsInput{} - } - - output = &AddInstanceGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddInstanceGroups API operation for Amazon Elastic MapReduce. -// -// Adds one or more instance groups to a running cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation AddInstanceGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// Indicates that an error occurred while processing the request and that the -// request was not completed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddInstanceGroups -func (c *EMR) AddInstanceGroups(input *AddInstanceGroupsInput) (*AddInstanceGroupsOutput, error) { - req, out := c.AddInstanceGroupsRequest(input) - return out, req.Send() -} - -// AddInstanceGroupsWithContext is the same as AddInstanceGroups with the addition of -// the ability to pass a context and additional request options. -// -// See AddInstanceGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) AddInstanceGroupsWithContext(ctx aws.Context, input *AddInstanceGroupsInput, opts ...request.Option) (*AddInstanceGroupsOutput, error) { - req, out := c.AddInstanceGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddJobFlowSteps = "AddJobFlowSteps" - -// AddJobFlowStepsRequest generates a "aws/request.Request" representing the -// client's request for the AddJobFlowSteps operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddJobFlowSteps for more information on using the AddJobFlowSteps -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddJobFlowStepsRequest method. -// req, resp := client.AddJobFlowStepsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddJobFlowSteps -func (c *EMR) AddJobFlowStepsRequest(input *AddJobFlowStepsInput) (req *request.Request, output *AddJobFlowStepsOutput) { - op := &request.Operation{ - Name: opAddJobFlowSteps, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddJobFlowStepsInput{} - } - - output = &AddJobFlowStepsOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddJobFlowSteps API operation for Amazon Elastic MapReduce. -// -// AddJobFlowSteps adds new steps to a running cluster. A maximum of 256 steps -// are allowed in each job flow. -// -// If your cluster is long-running (such as a Hive data warehouse) or complex, -// you may require more than 256 steps to process your data. You can bypass -// the 256-step limitation in various ways, including using SSH to connect to -// the master node and submitting queries directly to the software running on -// the master node, such as Hive and Hadoop. For more information on how to -// do this, see Add More than 256 Steps to a Cluster (http://docs.aws.amazon.com/emr/latest/ManagementGuide/AddMoreThan256Steps.html) -// in the Amazon EMR Management Guide. -// -// A step specifies the location of a JAR file stored either on the master node -// of the cluster or in Amazon S3. Each step is performed by the main function -// of the main class of the JAR file. The main class can be specified either -// in the manifest of the JAR or by using the MainFunction parameter of the -// step. -// -// Amazon EMR executes each step in the order listed. For a step to be considered -// complete, the main function must exit with a zero exit code and all Hadoop -// jobs started while the step was running must have completed and run successfully. -// -// You can only add steps to a cluster that is in one of the following states: -// STARTING, BOOTSTRAPPING, RUNNING, or WAITING. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation AddJobFlowSteps for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// Indicates that an error occurred while processing the request and that the -// request was not completed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddJobFlowSteps -func (c *EMR) AddJobFlowSteps(input *AddJobFlowStepsInput) (*AddJobFlowStepsOutput, error) { - req, out := c.AddJobFlowStepsRequest(input) - return out, req.Send() -} - -// AddJobFlowStepsWithContext is the same as AddJobFlowSteps with the addition of -// the ability to pass a context and additional request options. -// -// See AddJobFlowSteps for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) AddJobFlowStepsWithContext(ctx aws.Context, input *AddJobFlowStepsInput, opts ...request.Option) (*AddJobFlowStepsOutput, error) { - req, out := c.AddJobFlowStepsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddTags = "AddTags" - -// AddTagsRequest generates a "aws/request.Request" representing the -// client's request for the AddTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTags for more information on using the AddTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsRequest method. -// req, resp := client.AddTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddTags -func (c *EMR) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) { - op := &request.Operation{ - Name: opAddTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsInput{} - } - - output = &AddTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTags API operation for Amazon Elastic MapReduce. -// -// Adds tags to an Amazon EMR resource. Tags make it easier to associate clusters -// in various ways, such as grouping clusters to track your Amazon EMR resource -// allocation costs. For more information, see Tag Clusters (http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation AddTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddTags -func (c *EMR) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - return out, req.Send() -} - -// AddTagsWithContext is the same as AddTags with the addition of -// the ability to pass a context and additional request options. -// -// See AddTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelSteps = "CancelSteps" - -// CancelStepsRequest generates a "aws/request.Request" representing the -// client's request for the CancelSteps operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelSteps for more information on using the CancelSteps -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelStepsRequest method. -// req, resp := client.CancelStepsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CancelSteps -func (c *EMR) CancelStepsRequest(input *CancelStepsInput) (req *request.Request, output *CancelStepsOutput) { - op := &request.Operation{ - Name: opCancelSteps, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelStepsInput{} - } - - output = &CancelStepsOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelSteps API operation for Amazon Elastic MapReduce. -// -// Cancels a pending step or steps in a running cluster. Available only in Amazon -// EMR versions 4.8.0 and later, excluding version 5.0.0. A maximum of 256 steps -// are allowed in each CancelSteps request. CancelSteps is idempotent but asynchronous; -// it does not guarantee a step will be canceled, even if the request is successfully -// submitted. You can only cancel steps that are in a PENDING state. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation CancelSteps for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// Indicates that an error occurred while processing the request and that the -// request was not completed. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CancelSteps -func (c *EMR) CancelSteps(input *CancelStepsInput) (*CancelStepsOutput, error) { - req, out := c.CancelStepsRequest(input) - return out, req.Send() -} - -// CancelStepsWithContext is the same as CancelSteps with the addition of -// the ability to pass a context and additional request options. -// -// See CancelSteps for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) CancelStepsWithContext(ctx aws.Context, input *CancelStepsInput, opts ...request.Option) (*CancelStepsOutput, error) { - req, out := c.CancelStepsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSecurityConfiguration = "CreateSecurityConfiguration" - -// CreateSecurityConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the CreateSecurityConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSecurityConfiguration for more information on using the CreateSecurityConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSecurityConfigurationRequest method. -// req, resp := client.CreateSecurityConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CreateSecurityConfiguration -func (c *EMR) CreateSecurityConfigurationRequest(input *CreateSecurityConfigurationInput) (req *request.Request, output *CreateSecurityConfigurationOutput) { - op := &request.Operation{ - Name: opCreateSecurityConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSecurityConfigurationInput{} - } - - output = &CreateSecurityConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSecurityConfiguration API operation for Amazon Elastic MapReduce. -// -// Creates a security configuration, which is stored in the service and can -// be specified when a cluster is created. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation CreateSecurityConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CreateSecurityConfiguration -func (c *EMR) CreateSecurityConfiguration(input *CreateSecurityConfigurationInput) (*CreateSecurityConfigurationOutput, error) { - req, out := c.CreateSecurityConfigurationRequest(input) - return out, req.Send() -} - -// CreateSecurityConfigurationWithContext is the same as CreateSecurityConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSecurityConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) CreateSecurityConfigurationWithContext(ctx aws.Context, input *CreateSecurityConfigurationInput, opts ...request.Option) (*CreateSecurityConfigurationOutput, error) { - req, out := c.CreateSecurityConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSecurityConfiguration = "DeleteSecurityConfiguration" - -// DeleteSecurityConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSecurityConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSecurityConfiguration for more information on using the DeleteSecurityConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSecurityConfigurationRequest method. -// req, resp := client.DeleteSecurityConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DeleteSecurityConfiguration -func (c *EMR) DeleteSecurityConfigurationRequest(input *DeleteSecurityConfigurationInput) (req *request.Request, output *DeleteSecurityConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteSecurityConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSecurityConfigurationInput{} - } - - output = &DeleteSecurityConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSecurityConfiguration API operation for Amazon Elastic MapReduce. -// -// Deletes a security configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation DeleteSecurityConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DeleteSecurityConfiguration -func (c *EMR) DeleteSecurityConfiguration(input *DeleteSecurityConfigurationInput) (*DeleteSecurityConfigurationOutput, error) { - req, out := c.DeleteSecurityConfigurationRequest(input) - return out, req.Send() -} - -// DeleteSecurityConfigurationWithContext is the same as DeleteSecurityConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSecurityConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) DeleteSecurityConfigurationWithContext(ctx aws.Context, input *DeleteSecurityConfigurationInput, opts ...request.Option) (*DeleteSecurityConfigurationOutput, error) { - req, out := c.DeleteSecurityConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCluster = "DescribeCluster" - -// DescribeClusterRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCluster for more information on using the DescribeCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClusterRequest method. -// req, resp := client.DescribeClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeCluster -func (c *EMR) DescribeClusterRequest(input *DescribeClusterInput) (req *request.Request, output *DescribeClusterOutput) { - op := &request.Operation{ - Name: opDescribeCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeClusterInput{} - } - - output = &DescribeClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCluster API operation for Amazon Elastic MapReduce. -// -// Provides cluster-level details including status, hardware and software configuration, -// VPC settings, and so on. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation DescribeCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeCluster -func (c *EMR) DescribeCluster(input *DescribeClusterInput) (*DescribeClusterOutput, error) { - req, out := c.DescribeClusterRequest(input) - return out, req.Send() -} - -// DescribeClusterWithContext is the same as DescribeCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) DescribeClusterWithContext(ctx aws.Context, input *DescribeClusterInput, opts ...request.Option) (*DescribeClusterOutput, error) { - req, out := c.DescribeClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeJobFlows = "DescribeJobFlows" - -// DescribeJobFlowsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeJobFlows operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeJobFlows for more information on using the DescribeJobFlows -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeJobFlowsRequest method. -// req, resp := client.DescribeJobFlowsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeJobFlows -// -// Deprecated: DescribeJobFlows has been deprecated -func (c *EMR) DescribeJobFlowsRequest(input *DescribeJobFlowsInput) (req *request.Request, output *DescribeJobFlowsOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, DescribeJobFlows, has been deprecated") - } - op := &request.Operation{ - Name: opDescribeJobFlows, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeJobFlowsInput{} - } - - output = &DescribeJobFlowsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeJobFlows API operation for Amazon Elastic MapReduce. -// -// This API is deprecated and will eventually be removed. We recommend you use -// ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions -// instead. -// -// DescribeJobFlows returns a list of job flows that match all of the supplied -// parameters. The parameters can include a list of job flow IDs, job flow states, -// and restrictions on job flow creation date and time. -// -// Regardless of supplied parameters, only job flows created within the last -// two months are returned. -// -// If no parameters are supplied, then job flows matching either of the following -// criteria are returned: -// -// * Job flows created and completed in the last two weeks -// -// * Job flows created within the last two months that are in one of the -// following states: RUNNING, WAITING, SHUTTING_DOWN, STARTING -// -// Amazon EMR can return a maximum of 512 job flow descriptions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation DescribeJobFlows for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// Indicates that an error occurred while processing the request and that the -// request was not completed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeJobFlows -// -// Deprecated: DescribeJobFlows has been deprecated -func (c *EMR) DescribeJobFlows(input *DescribeJobFlowsInput) (*DescribeJobFlowsOutput, error) { - req, out := c.DescribeJobFlowsRequest(input) - return out, req.Send() -} - -// DescribeJobFlowsWithContext is the same as DescribeJobFlows with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeJobFlows for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: DescribeJobFlowsWithContext has been deprecated -func (c *EMR) DescribeJobFlowsWithContext(ctx aws.Context, input *DescribeJobFlowsInput, opts ...request.Option) (*DescribeJobFlowsOutput, error) { - req, out := c.DescribeJobFlowsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSecurityConfiguration = "DescribeSecurityConfiguration" - -// DescribeSecurityConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSecurityConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSecurityConfiguration for more information on using the DescribeSecurityConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSecurityConfigurationRequest method. -// req, resp := client.DescribeSecurityConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeSecurityConfiguration -func (c *EMR) DescribeSecurityConfigurationRequest(input *DescribeSecurityConfigurationInput) (req *request.Request, output *DescribeSecurityConfigurationOutput) { - op := &request.Operation{ - Name: opDescribeSecurityConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSecurityConfigurationInput{} - } - - output = &DescribeSecurityConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSecurityConfiguration API operation for Amazon Elastic MapReduce. -// -// Provides the details of a security configuration by returning the configuration -// JSON. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation DescribeSecurityConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeSecurityConfiguration -func (c *EMR) DescribeSecurityConfiguration(input *DescribeSecurityConfigurationInput) (*DescribeSecurityConfigurationOutput, error) { - req, out := c.DescribeSecurityConfigurationRequest(input) - return out, req.Send() -} - -// DescribeSecurityConfigurationWithContext is the same as DescribeSecurityConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSecurityConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) DescribeSecurityConfigurationWithContext(ctx aws.Context, input *DescribeSecurityConfigurationInput, opts ...request.Option) (*DescribeSecurityConfigurationOutput, error) { - req, out := c.DescribeSecurityConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStep = "DescribeStep" - -// DescribeStepRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStep operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStep for more information on using the DescribeStep -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStepRequest method. -// req, resp := client.DescribeStepRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeStep -func (c *EMR) DescribeStepRequest(input *DescribeStepInput) (req *request.Request, output *DescribeStepOutput) { - op := &request.Operation{ - Name: opDescribeStep, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStepInput{} - } - - output = &DescribeStepOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStep API operation for Amazon Elastic MapReduce. -// -// Provides more detail about the cluster step. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation DescribeStep for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeStep -func (c *EMR) DescribeStep(input *DescribeStepInput) (*DescribeStepOutput, error) { - req, out := c.DescribeStepRequest(input) - return out, req.Send() -} - -// DescribeStepWithContext is the same as DescribeStep with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStep for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) DescribeStepWithContext(ctx aws.Context, input *DescribeStepInput, opts ...request.Option) (*DescribeStepOutput, error) { - req, out := c.DescribeStepRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListBootstrapActions = "ListBootstrapActions" - -// ListBootstrapActionsRequest generates a "aws/request.Request" representing the -// client's request for the ListBootstrapActions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListBootstrapActions for more information on using the ListBootstrapActions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListBootstrapActionsRequest method. -// req, resp := client.ListBootstrapActionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListBootstrapActions -func (c *EMR) ListBootstrapActionsRequest(input *ListBootstrapActionsInput) (req *request.Request, output *ListBootstrapActionsOutput) { - op := &request.Operation{ - Name: opListBootstrapActions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListBootstrapActionsInput{} - } - - output = &ListBootstrapActionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBootstrapActions API operation for Amazon Elastic MapReduce. -// -// Provides information about the bootstrap actions associated with a cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation ListBootstrapActions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListBootstrapActions -func (c *EMR) ListBootstrapActions(input *ListBootstrapActionsInput) (*ListBootstrapActionsOutput, error) { - req, out := c.ListBootstrapActionsRequest(input) - return out, req.Send() -} - -// ListBootstrapActionsWithContext is the same as ListBootstrapActions with the addition of -// the ability to pass a context and additional request options. -// -// See ListBootstrapActions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) ListBootstrapActionsWithContext(ctx aws.Context, input *ListBootstrapActionsInput, opts ...request.Option) (*ListBootstrapActionsOutput, error) { - req, out := c.ListBootstrapActionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListBootstrapActionsPages iterates over the pages of a ListBootstrapActions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListBootstrapActions 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 ListBootstrapActions operation. -// pageNum := 0 -// err := client.ListBootstrapActionsPages(params, -// func(page *ListBootstrapActionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EMR) ListBootstrapActionsPages(input *ListBootstrapActionsInput, fn func(*ListBootstrapActionsOutput, bool) bool) error { - return c.ListBootstrapActionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListBootstrapActionsPagesWithContext same as ListBootstrapActionsPages 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 *EMR) ListBootstrapActionsPagesWithContext(ctx aws.Context, input *ListBootstrapActionsInput, fn func(*ListBootstrapActionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListBootstrapActionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListBootstrapActionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBootstrapActionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListClusters = "ListClusters" - -// ListClustersRequest generates a "aws/request.Request" representing the -// client's request for the ListClusters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListClusters for more information on using the ListClusters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListClustersRequest method. -// req, resp := client.ListClustersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListClusters -func (c *EMR) ListClustersRequest(input *ListClustersInput) (req *request.Request, output *ListClustersOutput) { - op := &request.Operation{ - Name: opListClusters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListClustersInput{} - } - - output = &ListClustersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListClusters API operation for Amazon Elastic MapReduce. -// -// Provides the status of all clusters visible to this AWS account. Allows you -// to filter the list of clusters based on certain criteria; for example, filtering -// by cluster creation date and time or by status. This call returns a maximum -// of 50 clusters per call, but returns a marker to track the paging of the -// cluster list across multiple ListClusters calls. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation ListClusters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListClusters -func (c *EMR) ListClusters(input *ListClustersInput) (*ListClustersOutput, error) { - req, out := c.ListClustersRequest(input) - return out, req.Send() -} - -// ListClustersWithContext is the same as ListClusters with the addition of -// the ability to pass a context and additional request options. -// -// See ListClusters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) ListClustersWithContext(ctx aws.Context, input *ListClustersInput, opts ...request.Option) (*ListClustersOutput, error) { - req, out := c.ListClustersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListClustersPages iterates over the pages of a ListClusters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListClusters 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 ListClusters operation. -// pageNum := 0 -// err := client.ListClustersPages(params, -// func(page *ListClustersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EMR) ListClustersPages(input *ListClustersInput, fn func(*ListClustersOutput, bool) bool) error { - return c.ListClustersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListClustersPagesWithContext same as ListClustersPages 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 *EMR) ListClustersPagesWithContext(ctx aws.Context, input *ListClustersInput, fn func(*ListClustersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListClustersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListClustersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListClustersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListInstanceFleets = "ListInstanceFleets" - -// ListInstanceFleetsRequest generates a "aws/request.Request" representing the -// client's request for the ListInstanceFleets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListInstanceFleets for more information on using the ListInstanceFleets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListInstanceFleetsRequest method. -// req, resp := client.ListInstanceFleetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceFleets -func (c *EMR) ListInstanceFleetsRequest(input *ListInstanceFleetsInput) (req *request.Request, output *ListInstanceFleetsOutput) { - op := &request.Operation{ - Name: opListInstanceFleets, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListInstanceFleetsInput{} - } - - output = &ListInstanceFleetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInstanceFleets API operation for Amazon Elastic MapReduce. -// -// Lists all available details about the instance fleets in a cluster. -// -// The instance fleet configuration is available only in Amazon EMR versions -// 4.8.0 and later, excluding 5.0.x versions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation ListInstanceFleets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceFleets -func (c *EMR) ListInstanceFleets(input *ListInstanceFleetsInput) (*ListInstanceFleetsOutput, error) { - req, out := c.ListInstanceFleetsRequest(input) - return out, req.Send() -} - -// ListInstanceFleetsWithContext is the same as ListInstanceFleets with the addition of -// the ability to pass a context and additional request options. -// -// See ListInstanceFleets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) ListInstanceFleetsWithContext(ctx aws.Context, input *ListInstanceFleetsInput, opts ...request.Option) (*ListInstanceFleetsOutput, error) { - req, out := c.ListInstanceFleetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInstanceFleetsPages iterates over the pages of a ListInstanceFleets operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInstanceFleets 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 ListInstanceFleets operation. -// pageNum := 0 -// err := client.ListInstanceFleetsPages(params, -// func(page *ListInstanceFleetsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EMR) ListInstanceFleetsPages(input *ListInstanceFleetsInput, fn func(*ListInstanceFleetsOutput, bool) bool) error { - return c.ListInstanceFleetsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInstanceFleetsPagesWithContext same as ListInstanceFleetsPages 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 *EMR) ListInstanceFleetsPagesWithContext(ctx aws.Context, input *ListInstanceFleetsInput, fn func(*ListInstanceFleetsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInstanceFleetsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInstanceFleetsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInstanceFleetsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListInstanceGroups = "ListInstanceGroups" - -// ListInstanceGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ListInstanceGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListInstanceGroups for more information on using the ListInstanceGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListInstanceGroupsRequest method. -// req, resp := client.ListInstanceGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceGroups -func (c *EMR) ListInstanceGroupsRequest(input *ListInstanceGroupsInput) (req *request.Request, output *ListInstanceGroupsOutput) { - op := &request.Operation{ - Name: opListInstanceGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListInstanceGroupsInput{} - } - - output = &ListInstanceGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInstanceGroups API operation for Amazon Elastic MapReduce. -// -// Provides all available details about the instance groups in a cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation ListInstanceGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceGroups -func (c *EMR) ListInstanceGroups(input *ListInstanceGroupsInput) (*ListInstanceGroupsOutput, error) { - req, out := c.ListInstanceGroupsRequest(input) - return out, req.Send() -} - -// ListInstanceGroupsWithContext is the same as ListInstanceGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ListInstanceGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) ListInstanceGroupsWithContext(ctx aws.Context, input *ListInstanceGroupsInput, opts ...request.Option) (*ListInstanceGroupsOutput, error) { - req, out := c.ListInstanceGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInstanceGroupsPages iterates over the pages of a ListInstanceGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInstanceGroups 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 ListInstanceGroups operation. -// pageNum := 0 -// err := client.ListInstanceGroupsPages(params, -// func(page *ListInstanceGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EMR) ListInstanceGroupsPages(input *ListInstanceGroupsInput, fn func(*ListInstanceGroupsOutput, bool) bool) error { - return c.ListInstanceGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInstanceGroupsPagesWithContext same as ListInstanceGroupsPages 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 *EMR) ListInstanceGroupsPagesWithContext(ctx aws.Context, input *ListInstanceGroupsInput, fn func(*ListInstanceGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInstanceGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInstanceGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInstanceGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListInstances = "ListInstances" - -// ListInstancesRequest generates a "aws/request.Request" representing the -// client's request for the ListInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListInstances for more information on using the ListInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListInstancesRequest method. -// req, resp := client.ListInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstances -func (c *EMR) ListInstancesRequest(input *ListInstancesInput) (req *request.Request, output *ListInstancesOutput) { - op := &request.Operation{ - Name: opListInstances, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListInstancesInput{} - } - - output = &ListInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInstances API operation for Amazon Elastic MapReduce. -// -// Provides information for all active EC2 instances and EC2 instances terminated -// in the last 30 days, up to a maximum of 2,000. EC2 instances in any of the -// following states are considered active: AWAITING_FULFILLMENT, PROVISIONING, -// BOOTSTRAPPING, RUNNING. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation ListInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstances -func (c *EMR) ListInstances(input *ListInstancesInput) (*ListInstancesOutput, error) { - req, out := c.ListInstancesRequest(input) - return out, req.Send() -} - -// ListInstancesWithContext is the same as ListInstances with the addition of -// the ability to pass a context and additional request options. -// -// See ListInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) ListInstancesWithContext(ctx aws.Context, input *ListInstancesInput, opts ...request.Option) (*ListInstancesOutput, error) { - req, out := c.ListInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInstancesPages iterates over the pages of a ListInstances operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInstances 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 ListInstances operation. -// pageNum := 0 -// err := client.ListInstancesPages(params, -// func(page *ListInstancesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EMR) ListInstancesPages(input *ListInstancesInput, fn func(*ListInstancesOutput, bool) bool) error { - return c.ListInstancesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInstancesPagesWithContext same as ListInstancesPages 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 *EMR) ListInstancesPagesWithContext(ctx aws.Context, input *ListInstancesInput, fn func(*ListInstancesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInstancesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListSecurityConfigurations = "ListSecurityConfigurations" - -// ListSecurityConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the ListSecurityConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSecurityConfigurations for more information on using the ListSecurityConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSecurityConfigurationsRequest method. -// req, resp := client.ListSecurityConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSecurityConfigurations -func (c *EMR) ListSecurityConfigurationsRequest(input *ListSecurityConfigurationsInput) (req *request.Request, output *ListSecurityConfigurationsOutput) { - op := &request.Operation{ - Name: opListSecurityConfigurations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListSecurityConfigurationsInput{} - } - - output = &ListSecurityConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSecurityConfigurations API operation for Amazon Elastic MapReduce. -// -// Lists all the security configurations visible to this account, providing -// their creation dates and times, and their names. This call returns a maximum -// of 50 clusters per call, but returns a marker to track the paging of the -// cluster list across multiple ListSecurityConfigurations calls. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation ListSecurityConfigurations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSecurityConfigurations -func (c *EMR) ListSecurityConfigurations(input *ListSecurityConfigurationsInput) (*ListSecurityConfigurationsOutput, error) { - req, out := c.ListSecurityConfigurationsRequest(input) - return out, req.Send() -} - -// ListSecurityConfigurationsWithContext is the same as ListSecurityConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See ListSecurityConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) ListSecurityConfigurationsWithContext(ctx aws.Context, input *ListSecurityConfigurationsInput, opts ...request.Option) (*ListSecurityConfigurationsOutput, error) { - req, out := c.ListSecurityConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSteps = "ListSteps" - -// ListStepsRequest generates a "aws/request.Request" representing the -// client's request for the ListSteps operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSteps for more information on using the ListSteps -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListStepsRequest method. -// req, resp := client.ListStepsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSteps -func (c *EMR) ListStepsRequest(input *ListStepsInput) (req *request.Request, output *ListStepsOutput) { - op := &request.Operation{ - Name: opListSteps, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListStepsInput{} - } - - output = &ListStepsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSteps API operation for Amazon Elastic MapReduce. -// -// Provides a list of steps for the cluster in reverse order unless you specify -// stepIds with the request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation ListSteps for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSteps -func (c *EMR) ListSteps(input *ListStepsInput) (*ListStepsOutput, error) { - req, out := c.ListStepsRequest(input) - return out, req.Send() -} - -// ListStepsWithContext is the same as ListSteps with the addition of -// the ability to pass a context and additional request options. -// -// See ListSteps for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) ListStepsWithContext(ctx aws.Context, input *ListStepsInput, opts ...request.Option) (*ListStepsOutput, error) { - req, out := c.ListStepsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListStepsPages iterates over the pages of a ListSteps operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListSteps 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 ListSteps operation. -// pageNum := 0 -// err := client.ListStepsPages(params, -// func(page *ListStepsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *EMR) ListStepsPages(input *ListStepsInput, fn func(*ListStepsOutput, bool) bool) error { - return c.ListStepsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListStepsPagesWithContext same as ListStepsPages 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 *EMR) ListStepsPagesWithContext(ctx aws.Context, input *ListStepsInput, fn func(*ListStepsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListStepsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListStepsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStepsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opModifyInstanceFleet = "ModifyInstanceFleet" - -// ModifyInstanceFleetRequest generates a "aws/request.Request" representing the -// client's request for the ModifyInstanceFleet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyInstanceFleet for more information on using the ModifyInstanceFleet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyInstanceFleetRequest method. -// req, resp := client.ModifyInstanceFleetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyInstanceFleet -func (c *EMR) ModifyInstanceFleetRequest(input *ModifyInstanceFleetInput) (req *request.Request, output *ModifyInstanceFleetOutput) { - op := &request.Operation{ - Name: opModifyInstanceFleet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyInstanceFleetInput{} - } - - output = &ModifyInstanceFleetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyInstanceFleet API operation for Amazon Elastic MapReduce. -// -// Modifies the target On-Demand and target Spot capacities for the instance -// fleet with the specified InstanceFleetID within the cluster specified using -// ClusterID. The call either succeeds or fails atomically. -// -// The instance fleet configuration is available only in Amazon EMR versions -// 4.8.0 and later, excluding 5.0.x versions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation ModifyInstanceFleet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyInstanceFleet -func (c *EMR) ModifyInstanceFleet(input *ModifyInstanceFleetInput) (*ModifyInstanceFleetOutput, error) { - req, out := c.ModifyInstanceFleetRequest(input) - return out, req.Send() -} - -// ModifyInstanceFleetWithContext is the same as ModifyInstanceFleet with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyInstanceFleet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) ModifyInstanceFleetWithContext(ctx aws.Context, input *ModifyInstanceFleetInput, opts ...request.Option) (*ModifyInstanceFleetOutput, error) { - req, out := c.ModifyInstanceFleetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyInstanceGroups = "ModifyInstanceGroups" - -// ModifyInstanceGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ModifyInstanceGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyInstanceGroups for more information on using the ModifyInstanceGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyInstanceGroupsRequest method. -// req, resp := client.ModifyInstanceGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyInstanceGroups -func (c *EMR) ModifyInstanceGroupsRequest(input *ModifyInstanceGroupsInput) (req *request.Request, output *ModifyInstanceGroupsOutput) { - op := &request.Operation{ - Name: opModifyInstanceGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyInstanceGroupsInput{} - } - - output = &ModifyInstanceGroupsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyInstanceGroups API operation for Amazon Elastic MapReduce. -// -// ModifyInstanceGroups modifies the number of nodes and configuration settings -// of an instance group. The input parameters include the new target instance -// count for the group and the instance group ID. The call will either succeed -// or fail atomically. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation ModifyInstanceGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// Indicates that an error occurred while processing the request and that the -// request was not completed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyInstanceGroups -func (c *EMR) ModifyInstanceGroups(input *ModifyInstanceGroupsInput) (*ModifyInstanceGroupsOutput, error) { - req, out := c.ModifyInstanceGroupsRequest(input) - return out, req.Send() -} - -// ModifyInstanceGroupsWithContext is the same as ModifyInstanceGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyInstanceGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) ModifyInstanceGroupsWithContext(ctx aws.Context, input *ModifyInstanceGroupsInput, opts ...request.Option) (*ModifyInstanceGroupsOutput, error) { - req, out := c.ModifyInstanceGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutAutoScalingPolicy = "PutAutoScalingPolicy" - -// PutAutoScalingPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutAutoScalingPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutAutoScalingPolicy for more information on using the PutAutoScalingPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutAutoScalingPolicyRequest method. -// req, resp := client.PutAutoScalingPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutAutoScalingPolicy -func (c *EMR) PutAutoScalingPolicyRequest(input *PutAutoScalingPolicyInput) (req *request.Request, output *PutAutoScalingPolicyOutput) { - op := &request.Operation{ - Name: opPutAutoScalingPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutAutoScalingPolicyInput{} - } - - output = &PutAutoScalingPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutAutoScalingPolicy API operation for Amazon Elastic MapReduce. -// -// Creates or updates an automatic scaling policy for a core instance group -// or task instance group in an Amazon EMR cluster. The automatic scaling policy -// defines how an instance group dynamically adds and terminates EC2 instances -// in response to the value of a CloudWatch metric. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation PutAutoScalingPolicy for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutAutoScalingPolicy -func (c *EMR) PutAutoScalingPolicy(input *PutAutoScalingPolicyInput) (*PutAutoScalingPolicyOutput, error) { - req, out := c.PutAutoScalingPolicyRequest(input) - return out, req.Send() -} - -// PutAutoScalingPolicyWithContext is the same as PutAutoScalingPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutAutoScalingPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) PutAutoScalingPolicyWithContext(ctx aws.Context, input *PutAutoScalingPolicyInput, opts ...request.Option) (*PutAutoScalingPolicyOutput, error) { - req, out := c.PutAutoScalingPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveAutoScalingPolicy = "RemoveAutoScalingPolicy" - -// RemoveAutoScalingPolicyRequest generates a "aws/request.Request" representing the -// client's request for the RemoveAutoScalingPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveAutoScalingPolicy for more information on using the RemoveAutoScalingPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveAutoScalingPolicyRequest method. -// req, resp := client.RemoveAutoScalingPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveAutoScalingPolicy -func (c *EMR) RemoveAutoScalingPolicyRequest(input *RemoveAutoScalingPolicyInput) (req *request.Request, output *RemoveAutoScalingPolicyOutput) { - op := &request.Operation{ - Name: opRemoveAutoScalingPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveAutoScalingPolicyInput{} - } - - output = &RemoveAutoScalingPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveAutoScalingPolicy API operation for Amazon Elastic MapReduce. -// -// Removes an automatic scaling policy from a specified instance group within -// an EMR cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation RemoveAutoScalingPolicy for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveAutoScalingPolicy -func (c *EMR) RemoveAutoScalingPolicy(input *RemoveAutoScalingPolicyInput) (*RemoveAutoScalingPolicyOutput, error) { - req, out := c.RemoveAutoScalingPolicyRequest(input) - return out, req.Send() -} - -// RemoveAutoScalingPolicyWithContext is the same as RemoveAutoScalingPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveAutoScalingPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) RemoveAutoScalingPolicyWithContext(ctx aws.Context, input *RemoveAutoScalingPolicyInput, opts ...request.Option) (*RemoveAutoScalingPolicyOutput, error) { - req, out := c.RemoveAutoScalingPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTags = "RemoveTags" - -// RemoveTagsRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTags for more information on using the RemoveTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsRequest method. -// req, resp := client.RemoveTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveTags -func (c *EMR) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) { - op := &request.Operation{ - Name: opRemoveTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsInput{} - } - - output = &RemoveTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTags API operation for Amazon Elastic MapReduce. -// -// Removes tags from an Amazon EMR resource. Tags make it easier to associate -// clusters in various ways, such as grouping clusters to track your Amazon -// EMR resource allocation costs. For more information, see Tag Clusters (http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html). -// -// The following example removes the stack tag with value Prod from a cluster: -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation RemoveTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerException "InternalServerException" -// This exception occurs when there is an internal failure in the EMR service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception occurs when there is something wrong with user input. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveTags -func (c *EMR) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - return out, req.Send() -} - -// RemoveTagsWithContext is the same as RemoveTags with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRunJobFlow = "RunJobFlow" - -// RunJobFlowRequest generates a "aws/request.Request" representing the -// client's request for the RunJobFlow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RunJobFlow for more information on using the RunJobFlow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RunJobFlowRequest method. -// req, resp := client.RunJobFlowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RunJobFlow -func (c *EMR) RunJobFlowRequest(input *RunJobFlowInput) (req *request.Request, output *RunJobFlowOutput) { - op := &request.Operation{ - Name: opRunJobFlow, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RunJobFlowInput{} - } - - output = &RunJobFlowOutput{} - req = c.newRequest(op, input, output) - return -} - -// RunJobFlow API operation for Amazon Elastic MapReduce. -// -// RunJobFlow creates and starts running a new cluster (job flow). The cluster -// runs the steps specified. After the steps complete, the cluster stops and -// the HDFS partition is lost. To prevent loss of data, configure the last step -// of the job flow to store results in Amazon S3. If the JobFlowInstancesConfigKeepJobFlowAliveWhenNoSteps -// parameter is set to TRUE, the cluster transitions to the WAITING state rather -// than shutting down after the steps have completed. -// -// For additional protection, you can set the JobFlowInstancesConfigTerminationProtected -// parameter to TRUE to lock the cluster and prevent it from being terminated -// by API call, user intervention, or in the event of a job flow error. -// -// A maximum of 256 steps are allowed in each job flow. -// -// If your cluster is long-running (such as a Hive data warehouse) or complex, -// you may require more than 256 steps to process your data. You can bypass -// the 256-step limitation in various ways, including using the SSH shell to -// connect to the master node and submitting queries directly to the software -// running on the master node, such as Hive and Hadoop. For more information -// on how to do this, see Add More than 256 Steps to a Cluster (http://docs.aws.amazon.com/emr/latest/ManagementGuide/AddMoreThan256Steps.html) -// in the Amazon EMR Management Guide. -// -// For long running clusters, we recommend that you periodically store your -// results. -// -// The instance fleets configuration is available only in Amazon EMR versions -// 4.8.0 and later, excluding 5.0.x versions. The RunJobFlow request can contain -// InstanceFleets parameters or InstanceGroups parameters, but not both. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation RunJobFlow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// Indicates that an error occurred while processing the request and that the -// request was not completed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RunJobFlow -func (c *EMR) RunJobFlow(input *RunJobFlowInput) (*RunJobFlowOutput, error) { - req, out := c.RunJobFlowRequest(input) - return out, req.Send() -} - -// RunJobFlowWithContext is the same as RunJobFlow with the addition of -// the ability to pass a context and additional request options. -// -// See RunJobFlow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) RunJobFlowWithContext(ctx aws.Context, input *RunJobFlowInput, opts ...request.Option) (*RunJobFlowOutput, error) { - req, out := c.RunJobFlowRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetTerminationProtection = "SetTerminationProtection" - -// SetTerminationProtectionRequest generates a "aws/request.Request" representing the -// client's request for the SetTerminationProtection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetTerminationProtection for more information on using the SetTerminationProtection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetTerminationProtectionRequest method. -// req, resp := client.SetTerminationProtectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/SetTerminationProtection -func (c *EMR) SetTerminationProtectionRequest(input *SetTerminationProtectionInput) (req *request.Request, output *SetTerminationProtectionOutput) { - op := &request.Operation{ - Name: opSetTerminationProtection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetTerminationProtectionInput{} - } - - output = &SetTerminationProtectionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetTerminationProtection API operation for Amazon Elastic MapReduce. -// -// SetTerminationProtection locks a cluster (job flow) so the EC2 instances -// in the cluster cannot be terminated by user intervention, an API call, or -// in the event of a job-flow error. The cluster still terminates upon successful -// completion of the job flow. Calling SetTerminationProtection on a cluster -// is similar to calling the Amazon EC2 DisableAPITermination API on all EC2 -// instances in a cluster. -// -// SetTerminationProtection is used to prevent accidental termination of a cluster -// and to ensure that in the event of an error, the instances persist so that -// you can recover any data stored in their ephemeral instance storage. -// -// To terminate a cluster that has been locked by setting SetTerminationProtection -// to true, you must first unlock the job flow by a subsequent call to SetTerminationProtection -// in which you set the value to false. -// -// For more information, seeManaging Cluster Termination (http://docs.aws.amazon.com/emr/latest/ManagementGuide/UsingEMR_TerminationProtection.html) -// in the Amazon EMR Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation SetTerminationProtection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// Indicates that an error occurred while processing the request and that the -// request was not completed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/SetTerminationProtection -func (c *EMR) SetTerminationProtection(input *SetTerminationProtectionInput) (*SetTerminationProtectionOutput, error) { - req, out := c.SetTerminationProtectionRequest(input) - return out, req.Send() -} - -// SetTerminationProtectionWithContext is the same as SetTerminationProtection with the addition of -// the ability to pass a context and additional request options. -// -// See SetTerminationProtection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) SetTerminationProtectionWithContext(ctx aws.Context, input *SetTerminationProtectionInput, opts ...request.Option) (*SetTerminationProtectionOutput, error) { - req, out := c.SetTerminationProtectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetVisibleToAllUsers = "SetVisibleToAllUsers" - -// SetVisibleToAllUsersRequest generates a "aws/request.Request" representing the -// client's request for the SetVisibleToAllUsers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetVisibleToAllUsers for more information on using the SetVisibleToAllUsers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetVisibleToAllUsersRequest method. -// req, resp := client.SetVisibleToAllUsersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/SetVisibleToAllUsers -func (c *EMR) SetVisibleToAllUsersRequest(input *SetVisibleToAllUsersInput) (req *request.Request, output *SetVisibleToAllUsersOutput) { - op := &request.Operation{ - Name: opSetVisibleToAllUsers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetVisibleToAllUsersInput{} - } - - output = &SetVisibleToAllUsersOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetVisibleToAllUsers API operation for Amazon Elastic MapReduce. -// -// Sets whether all AWS Identity and Access Management (IAM) users under your -// account can access the specified clusters (job flows). This action works -// on running clusters. You can also set the visibility of a cluster when you -// launch it using the VisibleToAllUsers parameter of RunJobFlow. The SetVisibleToAllUsers -// action can be called only by an IAM user who created the cluster or the AWS -// account that owns the cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation SetVisibleToAllUsers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// Indicates that an error occurred while processing the request and that the -// request was not completed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/SetVisibleToAllUsers -func (c *EMR) SetVisibleToAllUsers(input *SetVisibleToAllUsersInput) (*SetVisibleToAllUsersOutput, error) { - req, out := c.SetVisibleToAllUsersRequest(input) - return out, req.Send() -} - -// SetVisibleToAllUsersWithContext is the same as SetVisibleToAllUsers with the addition of -// the ability to pass a context and additional request options. -// -// See SetVisibleToAllUsers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) SetVisibleToAllUsersWithContext(ctx aws.Context, input *SetVisibleToAllUsersInput, opts ...request.Option) (*SetVisibleToAllUsersOutput, error) { - req, out := c.SetVisibleToAllUsersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTerminateJobFlows = "TerminateJobFlows" - -// TerminateJobFlowsRequest generates a "aws/request.Request" representing the -// client's request for the TerminateJobFlows operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TerminateJobFlows for more information on using the TerminateJobFlows -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TerminateJobFlowsRequest method. -// req, resp := client.TerminateJobFlowsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/TerminateJobFlows -func (c *EMR) TerminateJobFlowsRequest(input *TerminateJobFlowsInput) (req *request.Request, output *TerminateJobFlowsOutput) { - op := &request.Operation{ - Name: opTerminateJobFlows, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TerminateJobFlowsInput{} - } - - output = &TerminateJobFlowsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TerminateJobFlows API operation for Amazon Elastic MapReduce. -// -// TerminateJobFlows shuts a list of clusters (job flows) down. When a job flow -// is shut down, any step not yet completed is canceled and the EC2 instances -// on which the cluster is running are stopped. Any log files not already saved -// are uploaded to Amazon S3 if a LogUri was specified when the cluster was -// created. -// -// The maximum number of clusters allowed is 10. The call to TerminateJobFlows -// is asynchronous. Depending on the configuration of the cluster, it may take -// up to 1-5 minutes for the cluster to completely terminate and release allocated -// resources, such as Amazon EC2 instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic MapReduce's -// API operation TerminateJobFlows for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// Indicates that an error occurred while processing the request and that the -// request was not completed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/TerminateJobFlows -func (c *EMR) TerminateJobFlows(input *TerminateJobFlowsInput) (*TerminateJobFlowsOutput, error) { - req, out := c.TerminateJobFlowsRequest(input) - return out, req.Send() -} - -// TerminateJobFlowsWithContext is the same as TerminateJobFlows with the addition of -// the ability to pass a context and additional request options. -// -// See TerminateJobFlows for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) TerminateJobFlowsWithContext(ctx aws.Context, input *TerminateJobFlowsInput, opts ...request.Option) (*TerminateJobFlowsOutput, error) { - req, out := c.TerminateJobFlowsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AddInstanceFleetInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the cluster. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` - - // Specifies the configuration of the instance fleet. - // - // InstanceFleet is a required field - InstanceFleet *InstanceFleetConfig `type:"structure" required:"true"` -} - -// String returns the string representation -func (s AddInstanceFleetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddInstanceFleetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddInstanceFleetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddInstanceFleetInput"} - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - if s.InstanceFleet == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceFleet")) - } - if s.InstanceFleet != nil { - if err := s.InstanceFleet.Validate(); err != nil { - invalidParams.AddNested("InstanceFleet", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterId sets the ClusterId field's value. -func (s *AddInstanceFleetInput) SetClusterId(v string) *AddInstanceFleetInput { - s.ClusterId = &v - return s -} - -// SetInstanceFleet sets the InstanceFleet field's value. -func (s *AddInstanceFleetInput) SetInstanceFleet(v *InstanceFleetConfig) *AddInstanceFleetInput { - s.InstanceFleet = v - return s -} - -type AddInstanceFleetOutput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the cluster. - ClusterId *string `type:"string"` - - // The unique identifier of the instance fleet. - InstanceFleetId *string `type:"string"` -} - -// String returns the string representation -func (s AddInstanceFleetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddInstanceFleetOutput) GoString() string { - return s.String() -} - -// SetClusterId sets the ClusterId field's value. -func (s *AddInstanceFleetOutput) SetClusterId(v string) *AddInstanceFleetOutput { - s.ClusterId = &v - return s -} - -// SetInstanceFleetId sets the InstanceFleetId field's value. -func (s *AddInstanceFleetOutput) SetInstanceFleetId(v string) *AddInstanceFleetOutput { - s.InstanceFleetId = &v - return s -} - -// Input to an AddInstanceGroups call. -type AddInstanceGroupsInput struct { - _ struct{} `type:"structure"` - - // Instance groups to add. - // - // InstanceGroups is a required field - InstanceGroups []*InstanceGroupConfig `type:"list" required:"true"` - - // Job flow in which to add the instance groups. - // - // JobFlowId is a required field - JobFlowId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AddInstanceGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddInstanceGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddInstanceGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddInstanceGroupsInput"} - if s.InstanceGroups == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceGroups")) - } - if s.JobFlowId == nil { - invalidParams.Add(request.NewErrParamRequired("JobFlowId")) - } - if s.InstanceGroups != nil { - for i, v := range s.InstanceGroups { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InstanceGroups", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceGroups sets the InstanceGroups field's value. -func (s *AddInstanceGroupsInput) SetInstanceGroups(v []*InstanceGroupConfig) *AddInstanceGroupsInput { - s.InstanceGroups = v - return s -} - -// SetJobFlowId sets the JobFlowId field's value. -func (s *AddInstanceGroupsInput) SetJobFlowId(v string) *AddInstanceGroupsInput { - s.JobFlowId = &v - return s -} - -// Output from an AddInstanceGroups call. -type AddInstanceGroupsOutput struct { - _ struct{} `type:"structure"` - - // Instance group IDs of the newly created instance groups. - InstanceGroupIds []*string `type:"list"` - - // The job flow ID in which the instance groups are added. - JobFlowId *string `type:"string"` -} - -// String returns the string representation -func (s AddInstanceGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddInstanceGroupsOutput) GoString() string { - return s.String() -} - -// SetInstanceGroupIds sets the InstanceGroupIds field's value. -func (s *AddInstanceGroupsOutput) SetInstanceGroupIds(v []*string) *AddInstanceGroupsOutput { - s.InstanceGroupIds = v - return s -} - -// SetJobFlowId sets the JobFlowId field's value. -func (s *AddInstanceGroupsOutput) SetJobFlowId(v string) *AddInstanceGroupsOutput { - s.JobFlowId = &v - return s -} - -// The input argument to the AddJobFlowSteps operation. -type AddJobFlowStepsInput struct { - _ struct{} `type:"structure"` - - // A string that uniquely identifies the job flow. This identifier is returned - // by RunJobFlow and can also be obtained from ListClusters. - // - // JobFlowId is a required field - JobFlowId *string `type:"string" required:"true"` - - // A list of StepConfig to be executed by the job flow. - // - // Steps is a required field - Steps []*StepConfig `type:"list" required:"true"` -} - -// String returns the string representation -func (s AddJobFlowStepsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddJobFlowStepsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddJobFlowStepsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddJobFlowStepsInput"} - if s.JobFlowId == nil { - invalidParams.Add(request.NewErrParamRequired("JobFlowId")) - } - if s.Steps == nil { - invalidParams.Add(request.NewErrParamRequired("Steps")) - } - if s.Steps != nil { - for i, v := range s.Steps { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Steps", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobFlowId sets the JobFlowId field's value. -func (s *AddJobFlowStepsInput) SetJobFlowId(v string) *AddJobFlowStepsInput { - s.JobFlowId = &v - return s -} - -// SetSteps sets the Steps field's value. -func (s *AddJobFlowStepsInput) SetSteps(v []*StepConfig) *AddJobFlowStepsInput { - s.Steps = v - return s -} - -// The output for the AddJobFlowSteps operation. -type AddJobFlowStepsOutput struct { - _ struct{} `type:"structure"` - - // The identifiers of the list of steps added to the job flow. - StepIds []*string `type:"list"` -} - -// String returns the string representation -func (s AddJobFlowStepsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddJobFlowStepsOutput) GoString() string { - return s.String() -} - -// SetStepIds sets the StepIds field's value. -func (s *AddJobFlowStepsOutput) SetStepIds(v []*string) *AddJobFlowStepsOutput { - s.StepIds = v - return s -} - -// This input identifies a cluster and a list of tags to attach. -type AddTagsInput struct { - _ struct{} `type:"structure"` - - // The Amazon EMR resource identifier to which tags will be added. This value - // must be a cluster identifier. - // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` - - // A list of tags to associate with a cluster and propagate to EC2 instances. - // Tags are user-defined key/value pairs that consist of a required key string - // with a maximum of 128 characters, and an optional value string with a maximum - // of 256 characters. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *AddTagsInput) SetResourceId(v string) *AddTagsInput { - s.ResourceId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsInput) SetTags(v []*Tag) *AddTagsInput { - s.Tags = v - return s -} - -// This output indicates the result of adding tags to a resource. -type AddTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsOutput) GoString() string { - return s.String() -} - -// With Amazon EMR release version 4.0 and later, the only accepted parameter -// is the application name. To pass arguments to applications, you use configuration -// classifications specified using configuration JSON objects. For more information, -// see Configuring Applications (http://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html). -// -// With earlier Amazon EMR releases, the application is any Amazon or third-party -// software that you can add to the cluster. This structure contains a list -// of strings that indicates the software to use with the cluster and accepts -// a user argument list. Amazon EMR accepts and forwards the argument list to -// the corresponding installation script as bootstrap action argument. -type Application struct { - _ struct{} `type:"structure"` - - // This option is for advanced users only. This is meta information about third-party - // applications that third-party vendors use for testing purposes. - AdditionalInfo map[string]*string `type:"map"` - - // Arguments for Amazon EMR to pass to the application. - Args []*string `type:"list"` - - // The name of the application. - Name *string `type:"string"` - - // The version of the application. - Version *string `type:"string"` -} - -// String returns the string representation -func (s Application) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Application) GoString() string { - return s.String() -} - -// SetAdditionalInfo sets the AdditionalInfo field's value. -func (s *Application) SetAdditionalInfo(v map[string]*string) *Application { - s.AdditionalInfo = v - return s -} - -// SetArgs sets the Args field's value. -func (s *Application) SetArgs(v []*string) *Application { - s.Args = v - return s -} - -// SetName sets the Name field's value. -func (s *Application) SetName(v string) *Application { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *Application) SetVersion(v string) *Application { - s.Version = &v - return s -} - -// An automatic scaling policy for a core instance group or task instance group -// in an Amazon EMR cluster. An automatic scaling policy defines how an instance -// group dynamically adds and terminates EC2 instances in response to the value -// of a CloudWatch metric. See PutAutoScalingPolicy. -type AutoScalingPolicy struct { - _ struct{} `type:"structure"` - - // The upper and lower EC2 instance limits for an automatic scaling policy. - // Automatic scaling activity will not cause an instance group to grow above - // or below these limits. - // - // Constraints is a required field - Constraints *ScalingConstraints `type:"structure" required:"true"` - - // The scale-in and scale-out rules that comprise the automatic scaling policy. - // - // Rules is a required field - Rules []*ScalingRule `type:"list" required:"true"` -} - -// String returns the string representation -func (s AutoScalingPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AutoScalingPolicy) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AutoScalingPolicy) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AutoScalingPolicy"} - if s.Constraints == nil { - invalidParams.Add(request.NewErrParamRequired("Constraints")) - } - if s.Rules == nil { - invalidParams.Add(request.NewErrParamRequired("Rules")) - } - if s.Constraints != nil { - if err := s.Constraints.Validate(); err != nil { - invalidParams.AddNested("Constraints", err.(request.ErrInvalidParams)) - } - } - if s.Rules != nil { - for i, v := range s.Rules { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConstraints sets the Constraints field's value. -func (s *AutoScalingPolicy) SetConstraints(v *ScalingConstraints) *AutoScalingPolicy { - s.Constraints = v - return s -} - -// SetRules sets the Rules field's value. -func (s *AutoScalingPolicy) SetRules(v []*ScalingRule) *AutoScalingPolicy { - s.Rules = v - return s -} - -// An automatic scaling policy for a core instance group or task instance group -// in an Amazon EMR cluster. The automatic scaling policy defines how an instance -// group dynamically adds and terminates EC2 instances in response to the value -// of a CloudWatch metric. See PutAutoScalingPolicy. -type AutoScalingPolicyDescription struct { - _ struct{} `type:"structure"` - - // The upper and lower EC2 instance limits for an automatic scaling policy. - // Automatic scaling activity will not cause an instance group to grow above - // or below these limits. - Constraints *ScalingConstraints `type:"structure"` - - // The scale-in and scale-out rules that comprise the automatic scaling policy. - Rules []*ScalingRule `type:"list"` - - // The status of an automatic scaling policy. - Status *AutoScalingPolicyStatus `type:"structure"` -} - -// String returns the string representation -func (s AutoScalingPolicyDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AutoScalingPolicyDescription) GoString() string { - return s.String() -} - -// SetConstraints sets the Constraints field's value. -func (s *AutoScalingPolicyDescription) SetConstraints(v *ScalingConstraints) *AutoScalingPolicyDescription { - s.Constraints = v - return s -} - -// SetRules sets the Rules field's value. -func (s *AutoScalingPolicyDescription) SetRules(v []*ScalingRule) *AutoScalingPolicyDescription { - s.Rules = v - return s -} - -// SetStatus sets the Status field's value. -func (s *AutoScalingPolicyDescription) SetStatus(v *AutoScalingPolicyStatus) *AutoScalingPolicyDescription { - s.Status = v - return s -} - -// The reason for an AutoScalingPolicyStatus change. -type AutoScalingPolicyStateChangeReason struct { - _ struct{} `type:"structure"` - - // The code indicating the reason for the change in status.USER_REQUEST indicates - // that the scaling policy status was changed by a user. PROVISION_FAILURE indicates - // that the status change was because the policy failed to provision. CLEANUP_FAILURE - // indicates an error. - Code *string `type:"string" enum:"AutoScalingPolicyStateChangeReasonCode"` - - // A friendly, more verbose message that accompanies an automatic scaling policy - // state change. - Message *string `type:"string"` -} - -// String returns the string representation -func (s AutoScalingPolicyStateChangeReason) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AutoScalingPolicyStateChangeReason) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *AutoScalingPolicyStateChangeReason) SetCode(v string) *AutoScalingPolicyStateChangeReason { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *AutoScalingPolicyStateChangeReason) SetMessage(v string) *AutoScalingPolicyStateChangeReason { - s.Message = &v - return s -} - -// The status of an automatic scaling policy. -type AutoScalingPolicyStatus struct { - _ struct{} `type:"structure"` - - // Indicates the status of the automatic scaling policy. - State *string `type:"string" enum:"AutoScalingPolicyState"` - - // The reason for a change in status. - StateChangeReason *AutoScalingPolicyStateChangeReason `type:"structure"` -} - -// String returns the string representation -func (s AutoScalingPolicyStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AutoScalingPolicyStatus) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *AutoScalingPolicyStatus) SetState(v string) *AutoScalingPolicyStatus { - s.State = &v - return s -} - -// SetStateChangeReason sets the StateChangeReason field's value. -func (s *AutoScalingPolicyStatus) SetStateChangeReason(v *AutoScalingPolicyStateChangeReason) *AutoScalingPolicyStatus { - s.StateChangeReason = v - return s -} - -// Configuration of a bootstrap action. -type BootstrapActionConfig struct { - _ struct{} `type:"structure"` - - // The name of the bootstrap action. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The script run by the bootstrap action. - // - // ScriptBootstrapAction is a required field - ScriptBootstrapAction *ScriptBootstrapActionConfig `type:"structure" required:"true"` -} - -// String returns the string representation -func (s BootstrapActionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BootstrapActionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BootstrapActionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BootstrapActionConfig"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.ScriptBootstrapAction == nil { - invalidParams.Add(request.NewErrParamRequired("ScriptBootstrapAction")) - } - if s.ScriptBootstrapAction != nil { - if err := s.ScriptBootstrapAction.Validate(); err != nil { - invalidParams.AddNested("ScriptBootstrapAction", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *BootstrapActionConfig) SetName(v string) *BootstrapActionConfig { - s.Name = &v - return s -} - -// SetScriptBootstrapAction sets the ScriptBootstrapAction field's value. -func (s *BootstrapActionConfig) SetScriptBootstrapAction(v *ScriptBootstrapActionConfig) *BootstrapActionConfig { - s.ScriptBootstrapAction = v - return s -} - -// Reports the configuration of a bootstrap action in a cluster (job flow). -type BootstrapActionDetail struct { - _ struct{} `type:"structure"` - - // A description of the bootstrap action. - BootstrapActionConfig *BootstrapActionConfig `type:"structure"` -} - -// String returns the string representation -func (s BootstrapActionDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BootstrapActionDetail) GoString() string { - return s.String() -} - -// SetBootstrapActionConfig sets the BootstrapActionConfig field's value. -func (s *BootstrapActionDetail) SetBootstrapActionConfig(v *BootstrapActionConfig) *BootstrapActionDetail { - s.BootstrapActionConfig = v - return s -} - -// Specification of the status of a CancelSteps request. Available only in Amazon -// EMR version 4.8.0 and later, excluding version 5.0.0. -type CancelStepsInfo struct { - _ struct{} `type:"structure"` - - // The reason for the failure if the CancelSteps request fails. - Reason *string `type:"string"` - - // The status of a CancelSteps Request. The value may be SUBMITTED or FAILED. - Status *string `type:"string" enum:"CancelStepsRequestStatus"` - - // The encrypted StepId of a step. - StepId *string `type:"string"` -} - -// String returns the string representation -func (s CancelStepsInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelStepsInfo) GoString() string { - return s.String() -} - -// SetReason sets the Reason field's value. -func (s *CancelStepsInfo) SetReason(v string) *CancelStepsInfo { - s.Reason = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CancelStepsInfo) SetStatus(v string) *CancelStepsInfo { - s.Status = &v - return s -} - -// SetStepId sets the StepId field's value. -func (s *CancelStepsInfo) SetStepId(v string) *CancelStepsInfo { - s.StepId = &v - return s -} - -// The input argument to the CancelSteps operation. -type CancelStepsInput struct { - _ struct{} `type:"structure"` - - // The ClusterID for which specified steps will be canceled. Use RunJobFlow - // and ListClusters to get ClusterIDs. - ClusterId *string `type:"string"` - - // The list of StepIDs to cancel. Use ListSteps to get steps and their states - // for the specified cluster. - StepIds []*string `type:"list"` -} - -// String returns the string representation -func (s CancelStepsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelStepsInput) GoString() string { - return s.String() -} - -// SetClusterId sets the ClusterId field's value. -func (s *CancelStepsInput) SetClusterId(v string) *CancelStepsInput { - s.ClusterId = &v - return s -} - -// SetStepIds sets the StepIds field's value. -func (s *CancelStepsInput) SetStepIds(v []*string) *CancelStepsInput { - s.StepIds = v - return s -} - -// The output for the CancelSteps operation. -type CancelStepsOutput struct { - _ struct{} `type:"structure"` - - // A list of CancelStepsInfo, which shows the status of specified cancel requests - // for each StepID specified. - CancelStepsInfoList []*CancelStepsInfo `type:"list"` -} - -// String returns the string representation -func (s CancelStepsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelStepsOutput) GoString() string { - return s.String() -} - -// SetCancelStepsInfoList sets the CancelStepsInfoList field's value. -func (s *CancelStepsOutput) SetCancelStepsInfoList(v []*CancelStepsInfo) *CancelStepsOutput { - s.CancelStepsInfoList = v - return s -} - -// The definition of a CloudWatch metric alarm, which determines when an automatic -// scaling activity is triggered. When the defined alarm conditions are satisfied, -// scaling activity begins. -type CloudWatchAlarmDefinition struct { - _ struct{} `type:"structure"` - - // Determines how the metric specified by MetricName is compared to the value - // specified by Threshold. - // - // ComparisonOperator is a required field - ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"` - - // A CloudWatch metric dimension. - Dimensions []*MetricDimension `type:"list"` - - // The number of periods, expressed in seconds using Period, during which the - // alarm condition must exist before the alarm triggers automatic scaling activity. - // The default value is 1. - EvaluationPeriods *int64 `type:"integer"` - - // The name of the CloudWatch metric that is watched to determine an alarm condition. - // - // MetricName is a required field - MetricName *string `type:"string" required:"true"` - - // The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce. - Namespace *string `type:"string"` - - // The period, in seconds, over which the statistic is applied. EMR CloudWatch - // metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch - // metric is specified, specify 300. - // - // Period is a required field - Period *int64 `type:"integer" required:"true"` - - // The statistic to apply to the metric associated with the alarm. The default - // is AVERAGE. - Statistic *string `type:"string" enum:"Statistic"` - - // The value against which the specified statistic is compared. - // - // Threshold is a required field - Threshold *float64 `type:"double" required:"true"` - - // The unit of measure associated with the CloudWatch metric being watched. - // The value specified for Unit must correspond to the units specified in the - // CloudWatch metric. - Unit *string `type:"string" enum:"Unit"` -} - -// String returns the string representation -func (s CloudWatchAlarmDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudWatchAlarmDefinition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CloudWatchAlarmDefinition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloudWatchAlarmDefinition"} - if s.ComparisonOperator == nil { - invalidParams.Add(request.NewErrParamRequired("ComparisonOperator")) - } - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.Period == nil { - invalidParams.Add(request.NewErrParamRequired("Period")) - } - if s.Threshold == nil { - invalidParams.Add(request.NewErrParamRequired("Threshold")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComparisonOperator sets the ComparisonOperator field's value. -func (s *CloudWatchAlarmDefinition) SetComparisonOperator(v string) *CloudWatchAlarmDefinition { - s.ComparisonOperator = &v - return s -} - -// SetDimensions sets the Dimensions field's value. -func (s *CloudWatchAlarmDefinition) SetDimensions(v []*MetricDimension) *CloudWatchAlarmDefinition { - s.Dimensions = v - return s -} - -// SetEvaluationPeriods sets the EvaluationPeriods field's value. -func (s *CloudWatchAlarmDefinition) SetEvaluationPeriods(v int64) *CloudWatchAlarmDefinition { - s.EvaluationPeriods = &v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *CloudWatchAlarmDefinition) SetMetricName(v string) *CloudWatchAlarmDefinition { - s.MetricName = &v - return s -} - -// SetNamespace sets the Namespace field's value. -func (s *CloudWatchAlarmDefinition) SetNamespace(v string) *CloudWatchAlarmDefinition { - s.Namespace = &v - return s -} - -// SetPeriod sets the Period field's value. -func (s *CloudWatchAlarmDefinition) SetPeriod(v int64) *CloudWatchAlarmDefinition { - s.Period = &v - return s -} - -// SetStatistic sets the Statistic field's value. -func (s *CloudWatchAlarmDefinition) SetStatistic(v string) *CloudWatchAlarmDefinition { - s.Statistic = &v - return s -} - -// SetThreshold sets the Threshold field's value. -func (s *CloudWatchAlarmDefinition) SetThreshold(v float64) *CloudWatchAlarmDefinition { - s.Threshold = &v - return s -} - -// SetUnit sets the Unit field's value. -func (s *CloudWatchAlarmDefinition) SetUnit(v string) *CloudWatchAlarmDefinition { - s.Unit = &v - return s -} - -// The detailed description of the cluster. -type Cluster struct { - _ struct{} `type:"structure"` - - // The applications installed on this cluster. - Applications []*Application `type:"list"` - - // An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. - // The IAM role provides permissions that the automatic scaling feature requires - // to launch and terminate EC2 instances in an instance group. - AutoScalingRole *string `type:"string"` - - // Specifies whether the cluster should terminate after completing all steps. - AutoTerminate *bool `type:"boolean"` - - // Applies only to Amazon EMR releases 4.x and later. The list of Configurations - // supplied to the EMR cluster. - Configurations []*Configuration `type:"list"` - - // Available only in Amazon EMR version 5.7.0 and later. The ID of a custom - // Amazon EBS-backed Linux AMI if the cluster uses a custom AMI. - CustomAmiId *string `type:"string"` - - // The size, in GiB, of the EBS root device volume of the Linux AMI that is - // used for each EC2 instance. Available in Amazon EMR version 4.x and later. - EbsRootVolumeSize *int64 `type:"integer"` - - // Provides information about the EC2 instances in a cluster grouped by category. - // For example, key name, subnet ID, IAM instance profile, and so on. - Ec2InstanceAttributes *Ec2InstanceAttributes `type:"structure"` - - // The unique identifier for the cluster. - Id *string `type:"string"` - - // The instance fleet configuration is available only in Amazon EMR versions - // 4.8.0 and later, excluding 5.0.x versions. - // - // The instance group configuration of the cluster. A value of INSTANCE_GROUP - // indicates a uniform instance group configuration. A value of INSTANCE_FLEET - // indicates an instance fleets configuration. - InstanceCollectionType *string `type:"string" enum:"InstanceCollectionType"` - - // Attributes for Kerberos configuration when Kerberos authentication is enabled - // using a security configuration. For more information see Use Kerberos Authentication - // (http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html) - // in the EMR Management Guide. - KerberosAttributes *KerberosAttributes `type:"structure"` - - // The path to the Amazon S3 location where logs for this cluster are stored. - LogUri *string `type:"string"` - - // The DNS name of the master node. If the cluster is on a private subnet, this - // is the private DNS name. On a public subnet, this is the public DNS name. - MasterPublicDnsName *string `type:"string"` - - // The name of the cluster. - Name *string `type:"string"` - - // An approximation of the cost of the cluster, represented in m1.small/hours. - // This value is incremented one time for every hour an m1.small instance runs. - // Larger instances are weighted more, so an EC2 instance that is roughly four - // times more expensive would result in the normalized instance hours being - // incremented by four. This result is only an approximation and does not reflect - // the actual billing rate. - NormalizedInstanceHours *int64 `type:"integer"` - - // The Amazon EMR release label, which determines the version of open-source - // application packages installed on the cluster. Release labels are in the - // form emr-x.x.x, where x.x.x is an Amazon EMR release version, for example, - // emr-5.14.0. For more information about Amazon EMR release versions and included - // application versions and features, see http://docs.aws.amazon.com/emr/latest/ReleaseGuide/ - // (http://docs.aws.amazon.com/emr/latest/ReleaseGuide/). The release label - // applies only to Amazon EMR releases versions 4.x and later. Earlier versions - // use AmiVersion. - ReleaseLabel *string `type:"string"` - - // Applies only when CustomAmiID is used. Specifies the type of updates that - // are applied from the Amazon Linux AMI package repositories when an instance - // boots using the AMI. - RepoUpgradeOnBoot *string `type:"string" enum:"RepoUpgradeOnBoot"` - - // The AMI version requested for this cluster. - RequestedAmiVersion *string `type:"string"` - - // The AMI version running on this cluster. - RunningAmiVersion *string `type:"string"` - - // The way that individual Amazon EC2 instances terminate when an automatic - // scale-in activity occurs or an instance group is resized. TERMINATE_AT_INSTANCE_HOUR - // indicates that Amazon EMR terminates nodes at the instance-hour boundary, - // regardless of when the request to terminate the instance was submitted. This - // option is only available with Amazon EMR 5.1.0 and later and is the default - // for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates - // that Amazon EMR blacklists and drains tasks from nodes before terminating - // the Amazon EC2 instances, regardless of the instance-hour boundary. With - // either behavior, Amazon EMR removes the least active nodes first and blocks - // instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION - // is available only in Amazon EMR version 4.1.0 and later, and is the default - // for versions of Amazon EMR earlier than 5.1.0. - ScaleDownBehavior *string `type:"string" enum:"ScaleDownBehavior"` - - // The name of the security configuration applied to the cluster. - SecurityConfiguration *string `type:"string"` - - // The IAM role that will be assumed by the Amazon EMR service to access AWS - // resources on your behalf. - ServiceRole *string `type:"string"` - - // The current status details about the cluster. - Status *ClusterStatus `type:"structure"` - - // A list of tags associated with a cluster. - Tags []*Tag `type:"list"` - - // Indicates whether Amazon EMR will lock the cluster to prevent the EC2 instances - // from being terminated by an API call or user intervention, or in the event - // of a cluster error. - TerminationProtected *bool `type:"boolean"` - - // Indicates whether the cluster is visible to all IAM users of the AWS account - // associated with the cluster. If this value is set to true, all IAM users - // of that AWS account can view and manage the cluster if they have the proper - // policy permissions set. If this value is false, only the IAM user that created - // the cluster can view and manage it. This value can be changed using the SetVisibleToAllUsers - // action. - VisibleToAllUsers *bool `type:"boolean"` -} - -// String returns the string representation -func (s Cluster) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Cluster) GoString() string { - return s.String() -} - -// SetApplications sets the Applications field's value. -func (s *Cluster) SetApplications(v []*Application) *Cluster { - s.Applications = v - return s -} - -// SetAutoScalingRole sets the AutoScalingRole field's value. -func (s *Cluster) SetAutoScalingRole(v string) *Cluster { - s.AutoScalingRole = &v - return s -} - -// SetAutoTerminate sets the AutoTerminate field's value. -func (s *Cluster) SetAutoTerminate(v bool) *Cluster { - s.AutoTerminate = &v - return s -} - -// SetConfigurations sets the Configurations field's value. -func (s *Cluster) SetConfigurations(v []*Configuration) *Cluster { - s.Configurations = v - return s -} - -// SetCustomAmiId sets the CustomAmiId field's value. -func (s *Cluster) SetCustomAmiId(v string) *Cluster { - s.CustomAmiId = &v - return s -} - -// SetEbsRootVolumeSize sets the EbsRootVolumeSize field's value. -func (s *Cluster) SetEbsRootVolumeSize(v int64) *Cluster { - s.EbsRootVolumeSize = &v - return s -} - -// SetEc2InstanceAttributes sets the Ec2InstanceAttributes field's value. -func (s *Cluster) SetEc2InstanceAttributes(v *Ec2InstanceAttributes) *Cluster { - s.Ec2InstanceAttributes = v - return s -} - -// SetId sets the Id field's value. -func (s *Cluster) SetId(v string) *Cluster { - s.Id = &v - return s -} - -// SetInstanceCollectionType sets the InstanceCollectionType field's value. -func (s *Cluster) SetInstanceCollectionType(v string) *Cluster { - s.InstanceCollectionType = &v - return s -} - -// SetKerberosAttributes sets the KerberosAttributes field's value. -func (s *Cluster) SetKerberosAttributes(v *KerberosAttributes) *Cluster { - s.KerberosAttributes = v - return s -} - -// SetLogUri sets the LogUri field's value. -func (s *Cluster) SetLogUri(v string) *Cluster { - s.LogUri = &v - return s -} - -// SetMasterPublicDnsName sets the MasterPublicDnsName field's value. -func (s *Cluster) SetMasterPublicDnsName(v string) *Cluster { - s.MasterPublicDnsName = &v - return s -} - -// SetName sets the Name field's value. -func (s *Cluster) SetName(v string) *Cluster { - s.Name = &v - return s -} - -// SetNormalizedInstanceHours sets the NormalizedInstanceHours field's value. -func (s *Cluster) SetNormalizedInstanceHours(v int64) *Cluster { - s.NormalizedInstanceHours = &v - return s -} - -// SetReleaseLabel sets the ReleaseLabel field's value. -func (s *Cluster) SetReleaseLabel(v string) *Cluster { - s.ReleaseLabel = &v - return s -} - -// SetRepoUpgradeOnBoot sets the RepoUpgradeOnBoot field's value. -func (s *Cluster) SetRepoUpgradeOnBoot(v string) *Cluster { - s.RepoUpgradeOnBoot = &v - return s -} - -// SetRequestedAmiVersion sets the RequestedAmiVersion field's value. -func (s *Cluster) SetRequestedAmiVersion(v string) *Cluster { - s.RequestedAmiVersion = &v - return s -} - -// SetRunningAmiVersion sets the RunningAmiVersion field's value. -func (s *Cluster) SetRunningAmiVersion(v string) *Cluster { - s.RunningAmiVersion = &v - return s -} - -// SetScaleDownBehavior sets the ScaleDownBehavior field's value. -func (s *Cluster) SetScaleDownBehavior(v string) *Cluster { - s.ScaleDownBehavior = &v - return s -} - -// SetSecurityConfiguration sets the SecurityConfiguration field's value. -func (s *Cluster) SetSecurityConfiguration(v string) *Cluster { - s.SecurityConfiguration = &v - return s -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *Cluster) SetServiceRole(v string) *Cluster { - s.ServiceRole = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Cluster) SetStatus(v *ClusterStatus) *Cluster { - s.Status = v - return s -} - -// SetTags sets the Tags field's value. -func (s *Cluster) SetTags(v []*Tag) *Cluster { - s.Tags = v - return s -} - -// SetTerminationProtected sets the TerminationProtected field's value. -func (s *Cluster) SetTerminationProtected(v bool) *Cluster { - s.TerminationProtected = &v - return s -} - -// SetVisibleToAllUsers sets the VisibleToAllUsers field's value. -func (s *Cluster) SetVisibleToAllUsers(v bool) *Cluster { - s.VisibleToAllUsers = &v - return s -} - -// The reason that the cluster changed to its current state. -type ClusterStateChangeReason struct { - _ struct{} `type:"structure"` - - // The programmatic code for the state change reason. - Code *string `type:"string" enum:"ClusterStateChangeReasonCode"` - - // The descriptive message for the state change reason. - Message *string `type:"string"` -} - -// String returns the string representation -func (s ClusterStateChangeReason) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterStateChangeReason) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *ClusterStateChangeReason) SetCode(v string) *ClusterStateChangeReason { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ClusterStateChangeReason) SetMessage(v string) *ClusterStateChangeReason { - s.Message = &v - return s -} - -// The detailed status of the cluster. -type ClusterStatus struct { - _ struct{} `type:"structure"` - - // The current state of the cluster. - State *string `type:"string" enum:"ClusterState"` - - // The reason for the cluster status change. - StateChangeReason *ClusterStateChangeReason `type:"structure"` - - // A timeline that represents the status of a cluster over the lifetime of the - // cluster. - Timeline *ClusterTimeline `type:"structure"` -} - -// String returns the string representation -func (s ClusterStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterStatus) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *ClusterStatus) SetState(v string) *ClusterStatus { - s.State = &v - return s -} - -// SetStateChangeReason sets the StateChangeReason field's value. -func (s *ClusterStatus) SetStateChangeReason(v *ClusterStateChangeReason) *ClusterStatus { - s.StateChangeReason = v - return s -} - -// SetTimeline sets the Timeline field's value. -func (s *ClusterStatus) SetTimeline(v *ClusterTimeline) *ClusterStatus { - s.Timeline = v - return s -} - -// The summary description of the cluster. -type ClusterSummary struct { - _ struct{} `type:"structure"` - - // The unique identifier for the cluster. - Id *string `type:"string"` - - // The name of the cluster. - Name *string `type:"string"` - - // An approximation of the cost of the cluster, represented in m1.small/hours. - // This value is incremented one time for every hour an m1.small instance runs. - // Larger instances are weighted more, so an EC2 instance that is roughly four - // times more expensive would result in the normalized instance hours being - // incremented by four. This result is only an approximation and does not reflect - // the actual billing rate. - NormalizedInstanceHours *int64 `type:"integer"` - - // The details about the current status of the cluster. - Status *ClusterStatus `type:"structure"` -} - -// String returns the string representation -func (s ClusterSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterSummary) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *ClusterSummary) SetId(v string) *ClusterSummary { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *ClusterSummary) SetName(v string) *ClusterSummary { - s.Name = &v - return s -} - -// SetNormalizedInstanceHours sets the NormalizedInstanceHours field's value. -func (s *ClusterSummary) SetNormalizedInstanceHours(v int64) *ClusterSummary { - s.NormalizedInstanceHours = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ClusterSummary) SetStatus(v *ClusterStatus) *ClusterSummary { - s.Status = v - return s -} - -// Represents the timeline of the cluster's lifecycle. -type ClusterTimeline struct { - _ struct{} `type:"structure"` - - // The creation date and time of the cluster. - CreationDateTime *time.Time `type:"timestamp"` - - // The date and time when the cluster was terminated. - EndDateTime *time.Time `type:"timestamp"` - - // The date and time when the cluster was ready to execute steps. - ReadyDateTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s ClusterTimeline) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterTimeline) GoString() string { - return s.String() -} - -// SetCreationDateTime sets the CreationDateTime field's value. -func (s *ClusterTimeline) SetCreationDateTime(v time.Time) *ClusterTimeline { - s.CreationDateTime = &v - return s -} - -// SetEndDateTime sets the EndDateTime field's value. -func (s *ClusterTimeline) SetEndDateTime(v time.Time) *ClusterTimeline { - s.EndDateTime = &v - return s -} - -// SetReadyDateTime sets the ReadyDateTime field's value. -func (s *ClusterTimeline) SetReadyDateTime(v time.Time) *ClusterTimeline { - s.ReadyDateTime = &v - return s -} - -// An entity describing an executable that runs on a cluster. -type Command struct { - _ struct{} `type:"structure"` - - // Arguments for Amazon EMR to pass to the command for execution. - Args []*string `type:"list"` - - // The name of the command. - Name *string `type:"string"` - - // The Amazon S3 location of the command script. - ScriptPath *string `type:"string"` -} - -// String returns the string representation -func (s Command) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Command) GoString() string { - return s.String() -} - -// SetArgs sets the Args field's value. -func (s *Command) SetArgs(v []*string) *Command { - s.Args = v - return s -} - -// SetName sets the Name field's value. -func (s *Command) SetName(v string) *Command { - s.Name = &v - return s -} - -// SetScriptPath sets the ScriptPath field's value. -func (s *Command) SetScriptPath(v string) *Command { - s.ScriptPath = &v - return s -} - -// Amazon EMR releases 4.x or later. -// -// An optional configuration specification to be used when provisioning cluster -// instances, which can include configurations for applications and software -// bundled with Amazon EMR. A configuration consists of a classification, properties, -// and optional nested configurations. A classification refers to an application-specific -// configuration file. Properties are the settings you want to change in that -// file. For more information, see Configuring Applications (http://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html). -type Configuration struct { - _ struct{} `type:"structure"` - - // The classification within a configuration. - Classification *string `type:"string"` - - // A list of additional configurations to apply within a configuration object. - Configurations []*Configuration `type:"list"` - - // A set of properties specified within a configuration classification. - Properties map[string]*string `type:"map"` -} - -// String returns the string representation -func (s Configuration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Configuration) GoString() string { - return s.String() -} - -// SetClassification sets the Classification field's value. -func (s *Configuration) SetClassification(v string) *Configuration { - s.Classification = &v - return s -} - -// SetConfigurations sets the Configurations field's value. -func (s *Configuration) SetConfigurations(v []*Configuration) *Configuration { - s.Configurations = v - return s -} - -// SetProperties sets the Properties field's value. -func (s *Configuration) SetProperties(v map[string]*string) *Configuration { - s.Properties = v - return s -} - -type CreateSecurityConfigurationInput struct { - _ struct{} `type:"structure"` - - // The name of the security configuration. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The security configuration details in JSON format. For JSON parameters and - // examples, see Use Security Configurations to Set Up Cluster Security (http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-security-configurations.html) - // in the Amazon EMR Management Guide. - // - // SecurityConfiguration is a required field - SecurityConfiguration *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateSecurityConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSecurityConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSecurityConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSecurityConfigurationInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.SecurityConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityConfiguration")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *CreateSecurityConfigurationInput) SetName(v string) *CreateSecurityConfigurationInput { - s.Name = &v - return s -} - -// SetSecurityConfiguration sets the SecurityConfiguration field's value. -func (s *CreateSecurityConfigurationInput) SetSecurityConfiguration(v string) *CreateSecurityConfigurationInput { - s.SecurityConfiguration = &v - return s -} - -type CreateSecurityConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The date and time the security configuration was created. - // - // CreationDateTime is a required field - CreationDateTime *time.Time `type:"timestamp" required:"true"` - - // The name of the security configuration. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateSecurityConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSecurityConfigurationOutput) GoString() string { - return s.String() -} - -// SetCreationDateTime sets the CreationDateTime field's value. -func (s *CreateSecurityConfigurationOutput) SetCreationDateTime(v time.Time) *CreateSecurityConfigurationOutput { - s.CreationDateTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateSecurityConfigurationOutput) SetName(v string) *CreateSecurityConfigurationOutput { - s.Name = &v - return s -} - -type DeleteSecurityConfigurationInput struct { - _ struct{} `type:"structure"` - - // The name of the security configuration. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSecurityConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSecurityConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSecurityConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSecurityConfigurationInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteSecurityConfigurationInput) SetName(v string) *DeleteSecurityConfigurationInput { - s.Name = &v - return s -} - -type DeleteSecurityConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteSecurityConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSecurityConfigurationOutput) GoString() string { - return s.String() -} - -// This input determines which cluster to describe. -type DescribeClusterInput struct { - _ struct{} `type:"structure"` - - // The identifier of the cluster to describe. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeClusterInput"} - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterId sets the ClusterId field's value. -func (s *DescribeClusterInput) SetClusterId(v string) *DescribeClusterInput { - s.ClusterId = &v - return s -} - -// This output contains the description of the cluster. -type DescribeClusterOutput struct { - _ struct{} `type:"structure"` - - // This output contains the details for the requested cluster. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s DescribeClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *DescribeClusterOutput) SetCluster(v *Cluster) *DescribeClusterOutput { - s.Cluster = v - return s -} - -// The input for the DescribeJobFlows operation. -type DescribeJobFlowsInput struct { - _ struct{} `type:"structure"` - - // Return only job flows created after this date and time. - CreatedAfter *time.Time `type:"timestamp"` - - // Return only job flows created before this date and time. - CreatedBefore *time.Time `type:"timestamp"` - - // Return only job flows whose job flow ID is contained in this list. - JobFlowIds []*string `type:"list"` - - // Return only job flows whose state is contained in this list. - JobFlowStates []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeJobFlowsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeJobFlowsInput) GoString() string { - return s.String() -} - -// SetCreatedAfter sets the CreatedAfter field's value. -func (s *DescribeJobFlowsInput) SetCreatedAfter(v time.Time) *DescribeJobFlowsInput { - s.CreatedAfter = &v - return s -} - -// SetCreatedBefore sets the CreatedBefore field's value. -func (s *DescribeJobFlowsInput) SetCreatedBefore(v time.Time) *DescribeJobFlowsInput { - s.CreatedBefore = &v - return s -} - -// SetJobFlowIds sets the JobFlowIds field's value. -func (s *DescribeJobFlowsInput) SetJobFlowIds(v []*string) *DescribeJobFlowsInput { - s.JobFlowIds = v - return s -} - -// SetJobFlowStates sets the JobFlowStates field's value. -func (s *DescribeJobFlowsInput) SetJobFlowStates(v []*string) *DescribeJobFlowsInput { - s.JobFlowStates = v - return s -} - -// The output for the DescribeJobFlows operation. -type DescribeJobFlowsOutput struct { - _ struct{} `type:"structure"` - - // A list of job flows matching the parameters supplied. - JobFlows []*JobFlowDetail `type:"list"` -} - -// String returns the string representation -func (s DescribeJobFlowsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeJobFlowsOutput) GoString() string { - return s.String() -} - -// SetJobFlows sets the JobFlows field's value. -func (s *DescribeJobFlowsOutput) SetJobFlows(v []*JobFlowDetail) *DescribeJobFlowsOutput { - s.JobFlows = v - return s -} - -type DescribeSecurityConfigurationInput struct { - _ struct{} `type:"structure"` - - // The name of the security configuration. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeSecurityConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSecurityConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSecurityConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSecurityConfigurationInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DescribeSecurityConfigurationInput) SetName(v string) *DescribeSecurityConfigurationInput { - s.Name = &v - return s -} - -type DescribeSecurityConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The date and time the security configuration was created - CreationDateTime *time.Time `type:"timestamp"` - - // The name of the security configuration. - Name *string `type:"string"` - - // The security configuration details in JSON format. - SecurityConfiguration *string `type:"string"` -} - -// String returns the string representation -func (s DescribeSecurityConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSecurityConfigurationOutput) GoString() string { - return s.String() -} - -// SetCreationDateTime sets the CreationDateTime field's value. -func (s *DescribeSecurityConfigurationOutput) SetCreationDateTime(v time.Time) *DescribeSecurityConfigurationOutput { - s.CreationDateTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeSecurityConfigurationOutput) SetName(v string) *DescribeSecurityConfigurationOutput { - s.Name = &v - return s -} - -// SetSecurityConfiguration sets the SecurityConfiguration field's value. -func (s *DescribeSecurityConfigurationOutput) SetSecurityConfiguration(v string) *DescribeSecurityConfigurationOutput { - s.SecurityConfiguration = &v - return s -} - -// This input determines which step to describe. -type DescribeStepInput struct { - _ struct{} `type:"structure"` - - // The identifier of the cluster with steps to describe. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` - - // The identifier of the step to describe. - // - // StepId is a required field - StepId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeStepInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStepInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStepInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStepInput"} - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - if s.StepId == nil { - invalidParams.Add(request.NewErrParamRequired("StepId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterId sets the ClusterId field's value. -func (s *DescribeStepInput) SetClusterId(v string) *DescribeStepInput { - s.ClusterId = &v - return s -} - -// SetStepId sets the StepId field's value. -func (s *DescribeStepInput) SetStepId(v string) *DescribeStepInput { - s.StepId = &v - return s -} - -// This output contains the description of the cluster step. -type DescribeStepOutput struct { - _ struct{} `type:"structure"` - - // The step details for the requested step identifier. - Step *Step `type:"structure"` -} - -// String returns the string representation -func (s DescribeStepOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStepOutput) GoString() string { - return s.String() -} - -// SetStep sets the Step field's value. -func (s *DescribeStepOutput) SetStep(v *Step) *DescribeStepOutput { - s.Step = v - return s -} - -// Configuration of requested EBS block device associated with the instance -// group. -type EbsBlockDevice struct { - _ struct{} `type:"structure"` - - // The device name that is exposed to the instance, such as /dev/sdh. - Device *string `type:"string"` - - // EBS volume specifications such as volume type, IOPS, and size (GiB) that - // will be requested for the EBS volume attached to an EC2 instance in the cluster. - VolumeSpecification *VolumeSpecification `type:"structure"` -} - -// String returns the string representation -func (s EbsBlockDevice) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EbsBlockDevice) GoString() string { - return s.String() -} - -// SetDevice sets the Device field's value. -func (s *EbsBlockDevice) SetDevice(v string) *EbsBlockDevice { - s.Device = &v - return s -} - -// SetVolumeSpecification sets the VolumeSpecification field's value. -func (s *EbsBlockDevice) SetVolumeSpecification(v *VolumeSpecification) *EbsBlockDevice { - s.VolumeSpecification = v - return s -} - -// Configuration of requested EBS block device associated with the instance -// group with count of volumes that will be associated to every instance. -type EbsBlockDeviceConfig struct { - _ struct{} `type:"structure"` - - // EBS volume specifications such as volume type, IOPS, and size (GiB) that - // will be requested for the EBS volume attached to an EC2 instance in the cluster. - // - // VolumeSpecification is a required field - VolumeSpecification *VolumeSpecification `type:"structure" required:"true"` - - // Number of EBS volumes with a specific volume configuration that will be associated - // with every instance in the instance group - VolumesPerInstance *int64 `type:"integer"` -} - -// String returns the string representation -func (s EbsBlockDeviceConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EbsBlockDeviceConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EbsBlockDeviceConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EbsBlockDeviceConfig"} - if s.VolumeSpecification == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeSpecification")) - } - if s.VolumeSpecification != nil { - if err := s.VolumeSpecification.Validate(); err != nil { - invalidParams.AddNested("VolumeSpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVolumeSpecification sets the VolumeSpecification field's value. -func (s *EbsBlockDeviceConfig) SetVolumeSpecification(v *VolumeSpecification) *EbsBlockDeviceConfig { - s.VolumeSpecification = v - return s -} - -// SetVolumesPerInstance sets the VolumesPerInstance field's value. -func (s *EbsBlockDeviceConfig) SetVolumesPerInstance(v int64) *EbsBlockDeviceConfig { - s.VolumesPerInstance = &v - return s -} - -// The Amazon EBS configuration of a cluster instance. -type EbsConfiguration struct { - _ struct{} `type:"structure"` - - // An array of Amazon EBS volume specifications attached to a cluster instance. - EbsBlockDeviceConfigs []*EbsBlockDeviceConfig `type:"list"` - - // Indicates whether an Amazon EBS volume is EBS-optimized. - EbsOptimized *bool `type:"boolean"` -} - -// String returns the string representation -func (s EbsConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EbsConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EbsConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EbsConfiguration"} - if s.EbsBlockDeviceConfigs != nil { - for i, v := range s.EbsBlockDeviceConfigs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EbsBlockDeviceConfigs", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEbsBlockDeviceConfigs sets the EbsBlockDeviceConfigs field's value. -func (s *EbsConfiguration) SetEbsBlockDeviceConfigs(v []*EbsBlockDeviceConfig) *EbsConfiguration { - s.EbsBlockDeviceConfigs = v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *EbsConfiguration) SetEbsOptimized(v bool) *EbsConfiguration { - s.EbsOptimized = &v - return s -} - -// EBS block device that's attached to an EC2 instance. -type EbsVolume struct { - _ struct{} `type:"structure"` - - // The device name that is exposed to the instance, such as /dev/sdh. - Device *string `type:"string"` - - // The volume identifier of the EBS volume. - VolumeId *string `type:"string"` -} - -// String returns the string representation -func (s EbsVolume) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EbsVolume) GoString() string { - return s.String() -} - -// SetDevice sets the Device field's value. -func (s *EbsVolume) SetDevice(v string) *EbsVolume { - s.Device = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *EbsVolume) SetVolumeId(v string) *EbsVolume { - s.VolumeId = &v - return s -} - -// Provides information about the EC2 instances in a cluster grouped by category. -// For example, key name, subnet ID, IAM instance profile, and so on. -type Ec2InstanceAttributes struct { - _ struct{} `type:"structure"` - - // A list of additional Amazon EC2 security group IDs for the master node. - AdditionalMasterSecurityGroups []*string `type:"list"` - - // A list of additional Amazon EC2 security group IDs for the core and task - // nodes. - AdditionalSlaveSecurityGroups []*string `type:"list"` - - // The Availability Zone in which the cluster will run. - Ec2AvailabilityZone *string `type:"string"` - - // The name of the Amazon EC2 key pair to use when connecting with SSH into - // the master node as a user named "hadoop". - Ec2KeyName *string `type:"string"` - - // To launch the cluster in Amazon VPC, set this parameter to the identifier - // of the Amazon VPC subnet where you want the cluster to launch. If you do - // not specify this value, the cluster is launched in the normal AWS cloud, - // outside of a VPC. - // - // Amazon VPC currently does not support cluster compute quadruple extra large - // (cc1.4xlarge) instances. Thus, you cannot specify the cc1.4xlarge instance - // type for nodes of a cluster launched in a VPC. - Ec2SubnetId *string `type:"string"` - - // The identifier of the Amazon EC2 security group for the master node. - EmrManagedMasterSecurityGroup *string `type:"string"` - - // The identifier of the Amazon EC2 security group for the core and task nodes. - EmrManagedSlaveSecurityGroup *string `type:"string"` - - // The IAM role that was specified when the cluster was launched. The EC2 instances - // of the cluster assume this role. - IamInstanceProfile *string `type:"string"` - - // Applies to clusters configured with the instance fleets option. Specifies - // one or more Availability Zones in which to launch EC2 cluster instances when - // the EC2-Classic network configuration is supported. Amazon EMR chooses the - // Availability Zone with the best fit from among the list of RequestedEc2AvailabilityZones, - // and then launches all cluster instances within that Availability Zone. If - // you do not specify this value, Amazon EMR chooses the Availability Zone for - // you. RequestedEc2SubnetIDs and RequestedEc2AvailabilityZones cannot be specified - // together. - RequestedEc2AvailabilityZones []*string `type:"list"` - - // Applies to clusters configured with the instance fleets option. Specifies - // the unique identifier of one or more Amazon EC2 subnets in which to launch - // EC2 cluster instances. Subnets must exist within the same VPC. Amazon EMR - // chooses the EC2 subnet with the best fit from among the list of RequestedEc2SubnetIds, - // and then launches all cluster instances within that Subnet. If this value - // is not specified, and the account and region support EC2-Classic networks, - // the cluster launches instances in the EC2-Classic network and uses RequestedEc2AvailabilityZones - // instead of this setting. If EC2-Classic is not supported, and no Subnet is - // specified, Amazon EMR chooses the subnet for you. RequestedEc2SubnetIDs and - // RequestedEc2AvailabilityZones cannot be specified together. - RequestedEc2SubnetIds []*string `type:"list"` - - // The identifier of the Amazon EC2 security group for the Amazon EMR service - // to access clusters in VPC private subnets. - ServiceAccessSecurityGroup *string `type:"string"` -} - -// String returns the string representation -func (s Ec2InstanceAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Ec2InstanceAttributes) GoString() string { - return s.String() -} - -// SetAdditionalMasterSecurityGroups sets the AdditionalMasterSecurityGroups field's value. -func (s *Ec2InstanceAttributes) SetAdditionalMasterSecurityGroups(v []*string) *Ec2InstanceAttributes { - s.AdditionalMasterSecurityGroups = v - return s -} - -// SetAdditionalSlaveSecurityGroups sets the AdditionalSlaveSecurityGroups field's value. -func (s *Ec2InstanceAttributes) SetAdditionalSlaveSecurityGroups(v []*string) *Ec2InstanceAttributes { - s.AdditionalSlaveSecurityGroups = v - return s -} - -// SetEc2AvailabilityZone sets the Ec2AvailabilityZone field's value. -func (s *Ec2InstanceAttributes) SetEc2AvailabilityZone(v string) *Ec2InstanceAttributes { - s.Ec2AvailabilityZone = &v - return s -} - -// SetEc2KeyName sets the Ec2KeyName field's value. -func (s *Ec2InstanceAttributes) SetEc2KeyName(v string) *Ec2InstanceAttributes { - s.Ec2KeyName = &v - return s -} - -// SetEc2SubnetId sets the Ec2SubnetId field's value. -func (s *Ec2InstanceAttributes) SetEc2SubnetId(v string) *Ec2InstanceAttributes { - s.Ec2SubnetId = &v - return s -} - -// SetEmrManagedMasterSecurityGroup sets the EmrManagedMasterSecurityGroup field's value. -func (s *Ec2InstanceAttributes) SetEmrManagedMasterSecurityGroup(v string) *Ec2InstanceAttributes { - s.EmrManagedMasterSecurityGroup = &v - return s -} - -// SetEmrManagedSlaveSecurityGroup sets the EmrManagedSlaveSecurityGroup field's value. -func (s *Ec2InstanceAttributes) SetEmrManagedSlaveSecurityGroup(v string) *Ec2InstanceAttributes { - s.EmrManagedSlaveSecurityGroup = &v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *Ec2InstanceAttributes) SetIamInstanceProfile(v string) *Ec2InstanceAttributes { - s.IamInstanceProfile = &v - return s -} - -// SetRequestedEc2AvailabilityZones sets the RequestedEc2AvailabilityZones field's value. -func (s *Ec2InstanceAttributes) SetRequestedEc2AvailabilityZones(v []*string) *Ec2InstanceAttributes { - s.RequestedEc2AvailabilityZones = v - return s -} - -// SetRequestedEc2SubnetIds sets the RequestedEc2SubnetIds field's value. -func (s *Ec2InstanceAttributes) SetRequestedEc2SubnetIds(v []*string) *Ec2InstanceAttributes { - s.RequestedEc2SubnetIds = v - return s -} - -// SetServiceAccessSecurityGroup sets the ServiceAccessSecurityGroup field's value. -func (s *Ec2InstanceAttributes) SetServiceAccessSecurityGroup(v string) *Ec2InstanceAttributes { - s.ServiceAccessSecurityGroup = &v - return s -} - -// The details of the step failure. The service attempts to detect the root -// cause for many common failures. -type FailureDetails struct { - _ struct{} `type:"structure"` - - // The path to the log file where the step failure root cause was originally - // recorded. - LogFile *string `type:"string"` - - // The descriptive message including the error the EMR service has identified - // as the cause of step failure. This is text from an error log that describes - // the root cause of the failure. - Message *string `type:"string"` - - // The reason for the step failure. In the case where the service cannot successfully - // determine the root cause of the failure, it returns "Unknown Error" as a - // reason. - Reason *string `type:"string"` -} - -// String returns the string representation -func (s FailureDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailureDetails) GoString() string { - return s.String() -} - -// SetLogFile sets the LogFile field's value. -func (s *FailureDetails) SetLogFile(v string) *FailureDetails { - s.LogFile = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *FailureDetails) SetMessage(v string) *FailureDetails { - s.Message = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *FailureDetails) SetReason(v string) *FailureDetails { - s.Reason = &v - return s -} - -// A job flow step consisting of a JAR file whose main function will be executed. -// The main function submits a job for Hadoop to execute and waits for the job -// to finish or fail. -type HadoopJarStepConfig struct { - _ struct{} `type:"structure"` - - // A list of command line arguments passed to the JAR file's main function when - // executed. - Args []*string `type:"list"` - - // A path to a JAR file run during the step. - // - // Jar is a required field - Jar *string `type:"string" required:"true"` - - // The name of the main class in the specified Java file. If not specified, - // the JAR file should specify a Main-Class in its manifest file. - MainClass *string `type:"string"` - - // A list of Java properties that are set when the step runs. You can use these - // properties to pass key value pairs to your main function. - Properties []*KeyValue `type:"list"` -} - -// String returns the string representation -func (s HadoopJarStepConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HadoopJarStepConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HadoopJarStepConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HadoopJarStepConfig"} - if s.Jar == nil { - invalidParams.Add(request.NewErrParamRequired("Jar")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArgs sets the Args field's value. -func (s *HadoopJarStepConfig) SetArgs(v []*string) *HadoopJarStepConfig { - s.Args = v - return s -} - -// SetJar sets the Jar field's value. -func (s *HadoopJarStepConfig) SetJar(v string) *HadoopJarStepConfig { - s.Jar = &v - return s -} - -// SetMainClass sets the MainClass field's value. -func (s *HadoopJarStepConfig) SetMainClass(v string) *HadoopJarStepConfig { - s.MainClass = &v - return s -} - -// SetProperties sets the Properties field's value. -func (s *HadoopJarStepConfig) SetProperties(v []*KeyValue) *HadoopJarStepConfig { - s.Properties = v - return s -} - -// A cluster step consisting of a JAR file whose main function will be executed. -// The main function submits a job for Hadoop to execute and waits for the job -// to finish or fail. -type HadoopStepConfig struct { - _ struct{} `type:"structure"` - - // The list of command line arguments to pass to the JAR file's main function - // for execution. - Args []*string `type:"list"` - - // The path to the JAR file that runs during the step. - Jar *string `type:"string"` - - // The name of the main class in the specified Java file. If not specified, - // the JAR file should specify a main class in its manifest file. - MainClass *string `type:"string"` - - // The list of Java properties that are set when the step runs. You can use - // these properties to pass key value pairs to your main function. - Properties map[string]*string `type:"map"` -} - -// String returns the string representation -func (s HadoopStepConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HadoopStepConfig) GoString() string { - return s.String() -} - -// SetArgs sets the Args field's value. -func (s *HadoopStepConfig) SetArgs(v []*string) *HadoopStepConfig { - s.Args = v - return s -} - -// SetJar sets the Jar field's value. -func (s *HadoopStepConfig) SetJar(v string) *HadoopStepConfig { - s.Jar = &v - return s -} - -// SetMainClass sets the MainClass field's value. -func (s *HadoopStepConfig) SetMainClass(v string) *HadoopStepConfig { - s.MainClass = &v - return s -} - -// SetProperties sets the Properties field's value. -func (s *HadoopStepConfig) SetProperties(v map[string]*string) *HadoopStepConfig { - s.Properties = v - return s -} - -// Represents an EC2 instance provisioned as part of cluster. -type Instance struct { - _ struct{} `type:"structure"` - - // The list of EBS volumes that are attached to this instance. - EbsVolumes []*EbsVolume `type:"list"` - - // The unique identifier of the instance in Amazon EC2. - Ec2InstanceId *string `type:"string"` - - // The unique identifier for the instance in Amazon EMR. - Id *string `type:"string"` - - // The unique identifier of the instance fleet to which an EC2 instance belongs. - InstanceFleetId *string `type:"string"` - - // The identifier of the instance group to which this instance belongs. - InstanceGroupId *string `type:"string"` - - // The EC2 instance type, for example m3.xlarge. - InstanceType *string `min:"1" type:"string"` - - // The instance purchasing option. Valid values are ON_DEMAND or SPOT. - Market *string `type:"string" enum:"MarketType"` - - // The private DNS name of the instance. - PrivateDnsName *string `type:"string"` - - // The private IP address of the instance. - PrivateIpAddress *string `type:"string"` - - // The public DNS name of the instance. - PublicDnsName *string `type:"string"` - - // The public IP address of the instance. - PublicIpAddress *string `type:"string"` - - // The current status of the instance. - Status *InstanceStatus `type:"structure"` -} - -// String returns the string representation -func (s Instance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Instance) GoString() string { - return s.String() -} - -// SetEbsVolumes sets the EbsVolumes field's value. -func (s *Instance) SetEbsVolumes(v []*EbsVolume) *Instance { - s.EbsVolumes = v - return s -} - -// SetEc2InstanceId sets the Ec2InstanceId field's value. -func (s *Instance) SetEc2InstanceId(v string) *Instance { - s.Ec2InstanceId = &v - return s -} - -// SetId sets the Id field's value. -func (s *Instance) SetId(v string) *Instance { - s.Id = &v - return s -} - -// SetInstanceFleetId sets the InstanceFleetId field's value. -func (s *Instance) SetInstanceFleetId(v string) *Instance { - s.InstanceFleetId = &v - return s -} - -// SetInstanceGroupId sets the InstanceGroupId field's value. -func (s *Instance) SetInstanceGroupId(v string) *Instance { - s.InstanceGroupId = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *Instance) SetInstanceType(v string) *Instance { - s.InstanceType = &v - return s -} - -// SetMarket sets the Market field's value. -func (s *Instance) SetMarket(v string) *Instance { - s.Market = &v - return s -} - -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *Instance) SetPrivateDnsName(v string) *Instance { - s.PrivateDnsName = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *Instance) SetPrivateIpAddress(v string) *Instance { - s.PrivateIpAddress = &v - return s -} - -// SetPublicDnsName sets the PublicDnsName field's value. -func (s *Instance) SetPublicDnsName(v string) *Instance { - s.PublicDnsName = &v - return s -} - -// SetPublicIpAddress sets the PublicIpAddress field's value. -func (s *Instance) SetPublicIpAddress(v string) *Instance { - s.PublicIpAddress = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Instance) SetStatus(v *InstanceStatus) *Instance { - s.Status = v - return s -} - -// Describes an instance fleet, which is a group of EC2 instances that host -// a particular node type (master, core, or task) in an Amazon EMR cluster. -// Instance fleets can consist of a mix of instance types and On-Demand and -// Spot instances, which are provisioned to meet a defined target capacity. -// -// The instance fleet configuration is available only in Amazon EMR versions -// 4.8.0 and later, excluding 5.0.x versions. -type InstanceFleet struct { - _ struct{} `type:"structure"` - - // The unique identifier of the instance fleet. - Id *string `type:"string"` - - // The node type that the instance fleet hosts. Valid values are MASTER, CORE, - // or TASK. - InstanceFleetType *string `type:"string" enum:"InstanceFleetType"` - - // The specification for the instance types that comprise an instance fleet. - // Up to five unique instance specifications may be defined for each instance - // fleet. - InstanceTypeSpecifications []*InstanceTypeSpecification `type:"list"` - - // Describes the launch specification for an instance fleet. - LaunchSpecifications *InstanceFleetProvisioningSpecifications `type:"structure"` - - // A friendly name for the instance fleet. - Name *string `type:"string"` - - // The number of On-Demand units that have been provisioned for the instance - // fleet to fulfill TargetOnDemandCapacity. This provisioned capacity might - // be less than or greater than TargetOnDemandCapacity. - ProvisionedOnDemandCapacity *int64 `type:"integer"` - - // The number of Spot units that have been provisioned for this instance fleet - // to fulfill TargetSpotCapacity. This provisioned capacity might be less than - // or greater than TargetSpotCapacity. - ProvisionedSpotCapacity *int64 `type:"integer"` - - // The current status of the instance fleet. - Status *InstanceFleetStatus `type:"structure"` - - // The target capacity of On-Demand units for the instance fleet, which determines - // how many On-Demand instances to provision. When the instance fleet launches, - // Amazon EMR tries to provision On-Demand instances as specified by InstanceTypeConfig. - // Each instance configuration has a specified WeightedCapacity. When an On-Demand - // instance is provisioned, the WeightedCapacity units count toward the target - // capacity. Amazon EMR provisions instances until the target capacity is totally - // fulfilled, even if this results in an overage. For example, if there are - // 2 units remaining to fulfill capacity, and Amazon EMR can only provision - // an instance with a WeightedCapacity of 5 units, the instance is provisioned, - // and the target capacity is exceeded by 3 units. You can use InstanceFleet$ProvisionedOnDemandCapacity - // to determine the Spot capacity units that have been provisioned for the instance - // fleet. - // - // If not specified or set to 0, only Spot instances are provisioned for the - // instance fleet using TargetSpotCapacity. At least one of TargetSpotCapacity - // and TargetOnDemandCapacity should be greater than 0. For a master instance - // fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, - // and its value must be 1. - TargetOnDemandCapacity *int64 `type:"integer"` - - // The target capacity of Spot units for the instance fleet, which determines - // how many Spot instances to provision. When the instance fleet launches, Amazon - // EMR tries to provision Spot instances as specified by InstanceTypeConfig. - // Each instance configuration has a specified WeightedCapacity. When a Spot - // instance is provisioned, the WeightedCapacity units count toward the target - // capacity. Amazon EMR provisions instances until the target capacity is totally - // fulfilled, even if this results in an overage. For example, if there are - // 2 units remaining to fulfill capacity, and Amazon EMR can only provision - // an instance with a WeightedCapacity of 5 units, the instance is provisioned, - // and the target capacity is exceeded by 3 units. You can use InstanceFleet$ProvisionedSpotCapacity - // to determine the Spot capacity units that have been provisioned for the instance - // fleet. - // - // If not specified or set to 0, only On-Demand instances are provisioned for - // the instance fleet. At least one of TargetSpotCapacity and TargetOnDemandCapacity - // should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity - // and TargetOnDemandCapacity can be specified, and its value must be 1. - TargetSpotCapacity *int64 `type:"integer"` -} - -// String returns the string representation -func (s InstanceFleet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceFleet) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *InstanceFleet) SetId(v string) *InstanceFleet { - s.Id = &v - return s -} - -// SetInstanceFleetType sets the InstanceFleetType field's value. -func (s *InstanceFleet) SetInstanceFleetType(v string) *InstanceFleet { - s.InstanceFleetType = &v - return s -} - -// SetInstanceTypeSpecifications sets the InstanceTypeSpecifications field's value. -func (s *InstanceFleet) SetInstanceTypeSpecifications(v []*InstanceTypeSpecification) *InstanceFleet { - s.InstanceTypeSpecifications = v - return s -} - -// SetLaunchSpecifications sets the LaunchSpecifications field's value. -func (s *InstanceFleet) SetLaunchSpecifications(v *InstanceFleetProvisioningSpecifications) *InstanceFleet { - s.LaunchSpecifications = v - return s -} - -// SetName sets the Name field's value. -func (s *InstanceFleet) SetName(v string) *InstanceFleet { - s.Name = &v - return s -} - -// SetProvisionedOnDemandCapacity sets the ProvisionedOnDemandCapacity field's value. -func (s *InstanceFleet) SetProvisionedOnDemandCapacity(v int64) *InstanceFleet { - s.ProvisionedOnDemandCapacity = &v - return s -} - -// SetProvisionedSpotCapacity sets the ProvisionedSpotCapacity field's value. -func (s *InstanceFleet) SetProvisionedSpotCapacity(v int64) *InstanceFleet { - s.ProvisionedSpotCapacity = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *InstanceFleet) SetStatus(v *InstanceFleetStatus) *InstanceFleet { - s.Status = v - return s -} - -// SetTargetOnDemandCapacity sets the TargetOnDemandCapacity field's value. -func (s *InstanceFleet) SetTargetOnDemandCapacity(v int64) *InstanceFleet { - s.TargetOnDemandCapacity = &v - return s -} - -// SetTargetSpotCapacity sets the TargetSpotCapacity field's value. -func (s *InstanceFleet) SetTargetSpotCapacity(v int64) *InstanceFleet { - s.TargetSpotCapacity = &v - return s -} - -// The configuration that defines an instance fleet. -// -// The instance fleet configuration is available only in Amazon EMR versions -// 4.8.0 and later, excluding 5.0.x versions. -type InstanceFleetConfig struct { - _ struct{} `type:"structure"` - - // The node type that the instance fleet hosts. Valid values are MASTER,CORE,and - // TASK. - // - // InstanceFleetType is a required field - InstanceFleetType *string `type:"string" required:"true" enum:"InstanceFleetType"` - - // The instance type configurations that define the EC2 instances in the instance - // fleet. - InstanceTypeConfigs []*InstanceTypeConfig `type:"list"` - - // The launch specification for the instance fleet. - LaunchSpecifications *InstanceFleetProvisioningSpecifications `type:"structure"` - - // The friendly name of the instance fleet. - Name *string `type:"string"` - - // The target capacity of On-Demand units for the instance fleet, which determines - // how many On-Demand instances to provision. When the instance fleet launches, - // Amazon EMR tries to provision On-Demand instances as specified by InstanceTypeConfig. - // Each instance configuration has a specified WeightedCapacity. When an On-Demand - // instance is provisioned, the WeightedCapacity units count toward the target - // capacity. Amazon EMR provisions instances until the target capacity is totally - // fulfilled, even if this results in an overage. For example, if there are - // 2 units remaining to fulfill capacity, and Amazon EMR can only provision - // an instance with a WeightedCapacity of 5 units, the instance is provisioned, - // and the target capacity is exceeded by 3 units. - // - // If not specified or set to 0, only Spot instances are provisioned for the - // instance fleet using TargetSpotCapacity. At least one of TargetSpotCapacity - // and TargetOnDemandCapacity should be greater than 0. For a master instance - // fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, - // and its value must be 1. - TargetOnDemandCapacity *int64 `type:"integer"` - - // The target capacity of Spot units for the instance fleet, which determines - // how many Spot instances to provision. When the instance fleet launches, Amazon - // EMR tries to provision Spot instances as specified by InstanceTypeConfig. - // Each instance configuration has a specified WeightedCapacity. When a Spot - // instance is provisioned, the WeightedCapacity units count toward the target - // capacity. Amazon EMR provisions instances until the target capacity is totally - // fulfilled, even if this results in an overage. For example, if there are - // 2 units remaining to fulfill capacity, and Amazon EMR can only provision - // an instance with a WeightedCapacity of 5 units, the instance is provisioned, - // and the target capacity is exceeded by 3 units. - // - // If not specified or set to 0, only On-Demand instances are provisioned for - // the instance fleet. At least one of TargetSpotCapacity and TargetOnDemandCapacity - // should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity - // and TargetOnDemandCapacity can be specified, and its value must be 1. - TargetSpotCapacity *int64 `type:"integer"` -} - -// String returns the string representation -func (s InstanceFleetConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceFleetConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstanceFleetConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstanceFleetConfig"} - if s.InstanceFleetType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceFleetType")) - } - if s.InstanceTypeConfigs != nil { - for i, v := range s.InstanceTypeConfigs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InstanceTypeConfigs", i), err.(request.ErrInvalidParams)) - } - } - } - if s.LaunchSpecifications != nil { - if err := s.LaunchSpecifications.Validate(); err != nil { - invalidParams.AddNested("LaunchSpecifications", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceFleetType sets the InstanceFleetType field's value. -func (s *InstanceFleetConfig) SetInstanceFleetType(v string) *InstanceFleetConfig { - s.InstanceFleetType = &v - return s -} - -// SetInstanceTypeConfigs sets the InstanceTypeConfigs field's value. -func (s *InstanceFleetConfig) SetInstanceTypeConfigs(v []*InstanceTypeConfig) *InstanceFleetConfig { - s.InstanceTypeConfigs = v - return s -} - -// SetLaunchSpecifications sets the LaunchSpecifications field's value. -func (s *InstanceFleetConfig) SetLaunchSpecifications(v *InstanceFleetProvisioningSpecifications) *InstanceFleetConfig { - s.LaunchSpecifications = v - return s -} - -// SetName sets the Name field's value. -func (s *InstanceFleetConfig) SetName(v string) *InstanceFleetConfig { - s.Name = &v - return s -} - -// SetTargetOnDemandCapacity sets the TargetOnDemandCapacity field's value. -func (s *InstanceFleetConfig) SetTargetOnDemandCapacity(v int64) *InstanceFleetConfig { - s.TargetOnDemandCapacity = &v - return s -} - -// SetTargetSpotCapacity sets the TargetSpotCapacity field's value. -func (s *InstanceFleetConfig) SetTargetSpotCapacity(v int64) *InstanceFleetConfig { - s.TargetSpotCapacity = &v - return s -} - -// Configuration parameters for an instance fleet modification request. -// -// The instance fleet configuration is available only in Amazon EMR versions -// 4.8.0 and later, excluding 5.0.x versions. -type InstanceFleetModifyConfig struct { - _ struct{} `type:"structure"` - - // A unique identifier for the instance fleet. - // - // InstanceFleetId is a required field - InstanceFleetId *string `type:"string" required:"true"` - - // The target capacity of On-Demand units for the instance fleet. For more information - // see InstanceFleetConfig$TargetOnDemandCapacity. - TargetOnDemandCapacity *int64 `type:"integer"` - - // The target capacity of Spot units for the instance fleet. For more information, - // see InstanceFleetConfig$TargetSpotCapacity. - TargetSpotCapacity *int64 `type:"integer"` -} - -// String returns the string representation -func (s InstanceFleetModifyConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceFleetModifyConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstanceFleetModifyConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstanceFleetModifyConfig"} - if s.InstanceFleetId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceFleetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceFleetId sets the InstanceFleetId field's value. -func (s *InstanceFleetModifyConfig) SetInstanceFleetId(v string) *InstanceFleetModifyConfig { - s.InstanceFleetId = &v - return s -} - -// SetTargetOnDemandCapacity sets the TargetOnDemandCapacity field's value. -func (s *InstanceFleetModifyConfig) SetTargetOnDemandCapacity(v int64) *InstanceFleetModifyConfig { - s.TargetOnDemandCapacity = &v - return s -} - -// SetTargetSpotCapacity sets the TargetSpotCapacity field's value. -func (s *InstanceFleetModifyConfig) SetTargetSpotCapacity(v int64) *InstanceFleetModifyConfig { - s.TargetSpotCapacity = &v - return s -} - -// The launch specification for Spot instances in the fleet, which determines -// the defined duration and provisioning timeout behavior. -// -// The instance fleet configuration is available only in Amazon EMR versions -// 4.8.0 and later, excluding 5.0.x versions. -type InstanceFleetProvisioningSpecifications struct { - _ struct{} `type:"structure"` - - // The launch specification for Spot instances in the fleet, which determines - // the defined duration and provisioning timeout behavior. - // - // SpotSpecification is a required field - SpotSpecification *SpotProvisioningSpecification `type:"structure" required:"true"` -} - -// String returns the string representation -func (s InstanceFleetProvisioningSpecifications) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceFleetProvisioningSpecifications) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstanceFleetProvisioningSpecifications) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstanceFleetProvisioningSpecifications"} - if s.SpotSpecification == nil { - invalidParams.Add(request.NewErrParamRequired("SpotSpecification")) - } - if s.SpotSpecification != nil { - if err := s.SpotSpecification.Validate(); err != nil { - invalidParams.AddNested("SpotSpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSpotSpecification sets the SpotSpecification field's value. -func (s *InstanceFleetProvisioningSpecifications) SetSpotSpecification(v *SpotProvisioningSpecification) *InstanceFleetProvisioningSpecifications { - s.SpotSpecification = v - return s -} - -// Provides status change reason details for the instance fleet. -// -// The instance fleet configuration is available only in Amazon EMR versions -// 4.8.0 and later, excluding 5.0.x versions. -type InstanceFleetStateChangeReason struct { - _ struct{} `type:"structure"` - - // A code corresponding to the reason the state change occurred. - Code *string `type:"string" enum:"InstanceFleetStateChangeReasonCode"` - - // An explanatory message. - Message *string `type:"string"` -} - -// String returns the string representation -func (s InstanceFleetStateChangeReason) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceFleetStateChangeReason) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *InstanceFleetStateChangeReason) SetCode(v string) *InstanceFleetStateChangeReason { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *InstanceFleetStateChangeReason) SetMessage(v string) *InstanceFleetStateChangeReason { - s.Message = &v - return s -} - -// The status of the instance fleet. -// -// The instance fleet configuration is available only in Amazon EMR versions -// 4.8.0 and later, excluding 5.0.x versions. -type InstanceFleetStatus struct { - _ struct{} `type:"structure"` - - // A code representing the instance fleet status. - // - // * PROVISIONING—The instance fleet is provisioning EC2 resources and is - // not yet ready to run jobs. - // - // * BOOTSTRAPPING—EC2 instances and other resources have been provisioned - // and the bootstrap actions specified for the instances are underway. - // - // * RUNNING—EC2 instances and other resources are running. They are either - // executing jobs or waiting to execute jobs. - // - // * RESIZING—A resize operation is underway. EC2 instances are either being - // added or removed. - // - // * SUSPENDED—A resize operation could not complete. Existing EC2 instances - // are running, but instances can't be added or removed. - // - // * TERMINATING—The instance fleet is terminating EC2 instances. - // - // * TERMINATED—The instance fleet is no longer active, and all EC2 instances - // have been terminated. - State *string `type:"string" enum:"InstanceFleetState"` - - // Provides status change reason details for the instance fleet. - StateChangeReason *InstanceFleetStateChangeReason `type:"structure"` - - // Provides historical timestamps for the instance fleet, including the time - // of creation, the time it became ready to run jobs, and the time of termination. - Timeline *InstanceFleetTimeline `type:"structure"` -} - -// String returns the string representation -func (s InstanceFleetStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceFleetStatus) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *InstanceFleetStatus) SetState(v string) *InstanceFleetStatus { - s.State = &v - return s -} - -// SetStateChangeReason sets the StateChangeReason field's value. -func (s *InstanceFleetStatus) SetStateChangeReason(v *InstanceFleetStateChangeReason) *InstanceFleetStatus { - s.StateChangeReason = v - return s -} - -// SetTimeline sets the Timeline field's value. -func (s *InstanceFleetStatus) SetTimeline(v *InstanceFleetTimeline) *InstanceFleetStatus { - s.Timeline = v - return s -} - -// Provides historical timestamps for the instance fleet, including the time -// of creation, the time it became ready to run jobs, and the time of termination. -// -// The instance fleet configuration is available only in Amazon EMR versions -// 4.8.0 and later, excluding 5.0.x versions. -type InstanceFleetTimeline struct { - _ struct{} `type:"structure"` - - // The time and date the instance fleet was created. - CreationDateTime *time.Time `type:"timestamp"` - - // The time and date the instance fleet terminated. - EndDateTime *time.Time `type:"timestamp"` - - // The time and date the instance fleet was ready to run jobs. - ReadyDateTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s InstanceFleetTimeline) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceFleetTimeline) GoString() string { - return s.String() -} - -// SetCreationDateTime sets the CreationDateTime field's value. -func (s *InstanceFleetTimeline) SetCreationDateTime(v time.Time) *InstanceFleetTimeline { - s.CreationDateTime = &v - return s -} - -// SetEndDateTime sets the EndDateTime field's value. -func (s *InstanceFleetTimeline) SetEndDateTime(v time.Time) *InstanceFleetTimeline { - s.EndDateTime = &v - return s -} - -// SetReadyDateTime sets the ReadyDateTime field's value. -func (s *InstanceFleetTimeline) SetReadyDateTime(v time.Time) *InstanceFleetTimeline { - s.ReadyDateTime = &v - return s -} - -// This entity represents an instance group, which is a group of instances that -// have common purpose. For example, CORE instance group is used for HDFS. -type InstanceGroup struct { - _ struct{} `type:"structure"` - - // An automatic scaling policy for a core instance group or task instance group - // in an Amazon EMR cluster. The automatic scaling policy defines how an instance - // group dynamically adds and terminates EC2 instances in response to the value - // of a CloudWatch metric. See PutAutoScalingPolicy. - AutoScalingPolicy *AutoScalingPolicyDescription `type:"structure"` - - // The maximum Spot price your are willing to pay for EC2 instances. - // - // An optional, nullable field that applies if the MarketType for the instance - // group is specified as SPOT. Specify the maximum spot price in USD. If the - // value is NULL and SPOT is specified, the maximum Spot price is set equal - // to the On-Demand price. - BidPrice *string `type:"string"` - - // Amazon EMR releases 4.x or later. - // - // The list of configurations supplied for an EMR cluster instance group. You - // can specify a separate configuration for each instance group (master, core, - // and task). - Configurations []*Configuration `type:"list"` - - // The EBS block devices that are mapped to this instance group. - EbsBlockDevices []*EbsBlockDevice `type:"list"` - - // If the instance group is EBS-optimized. An Amazon EBS-optimized instance - // uses an optimized configuration stack and provides additional, dedicated - // capacity for Amazon EBS I/O. - EbsOptimized *bool `type:"boolean"` - - // The identifier of the instance group. - Id *string `type:"string"` - - // The type of the instance group. Valid values are MASTER, CORE or TASK. - InstanceGroupType *string `type:"string" enum:"InstanceGroupType"` - - // The EC2 instance type for all instances in the instance group. - InstanceType *string `min:"1" type:"string"` - - // The marketplace to provision instances for this group. Valid values are ON_DEMAND - // or SPOT. - Market *string `type:"string" enum:"MarketType"` - - // The name of the instance group. - Name *string `type:"string"` - - // The target number of instances for the instance group. - RequestedInstanceCount *int64 `type:"integer"` - - // The number of instances currently running in this instance group. - RunningInstanceCount *int64 `type:"integer"` - - // Policy for customizing shrink operations. - ShrinkPolicy *ShrinkPolicy `type:"structure"` - - // The current status of the instance group. - Status *InstanceGroupStatus `type:"structure"` -} - -// String returns the string representation -func (s InstanceGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceGroup) GoString() string { - return s.String() -} - -// SetAutoScalingPolicy sets the AutoScalingPolicy field's value. -func (s *InstanceGroup) SetAutoScalingPolicy(v *AutoScalingPolicyDescription) *InstanceGroup { - s.AutoScalingPolicy = v - return s -} - -// SetBidPrice sets the BidPrice field's value. -func (s *InstanceGroup) SetBidPrice(v string) *InstanceGroup { - s.BidPrice = &v - return s -} - -// SetConfigurations sets the Configurations field's value. -func (s *InstanceGroup) SetConfigurations(v []*Configuration) *InstanceGroup { - s.Configurations = v - return s -} - -// SetEbsBlockDevices sets the EbsBlockDevices field's value. -func (s *InstanceGroup) SetEbsBlockDevices(v []*EbsBlockDevice) *InstanceGroup { - s.EbsBlockDevices = v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *InstanceGroup) SetEbsOptimized(v bool) *InstanceGroup { - s.EbsOptimized = &v - return s -} - -// SetId sets the Id field's value. -func (s *InstanceGroup) SetId(v string) *InstanceGroup { - s.Id = &v - return s -} - -// SetInstanceGroupType sets the InstanceGroupType field's value. -func (s *InstanceGroup) SetInstanceGroupType(v string) *InstanceGroup { - s.InstanceGroupType = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *InstanceGroup) SetInstanceType(v string) *InstanceGroup { - s.InstanceType = &v - return s -} - -// SetMarket sets the Market field's value. -func (s *InstanceGroup) SetMarket(v string) *InstanceGroup { - s.Market = &v - return s -} - -// SetName sets the Name field's value. -func (s *InstanceGroup) SetName(v string) *InstanceGroup { - s.Name = &v - return s -} - -// SetRequestedInstanceCount sets the RequestedInstanceCount field's value. -func (s *InstanceGroup) SetRequestedInstanceCount(v int64) *InstanceGroup { - s.RequestedInstanceCount = &v - return s -} - -// SetRunningInstanceCount sets the RunningInstanceCount field's value. -func (s *InstanceGroup) SetRunningInstanceCount(v int64) *InstanceGroup { - s.RunningInstanceCount = &v - return s -} - -// SetShrinkPolicy sets the ShrinkPolicy field's value. -func (s *InstanceGroup) SetShrinkPolicy(v *ShrinkPolicy) *InstanceGroup { - s.ShrinkPolicy = v - return s -} - -// SetStatus sets the Status field's value. -func (s *InstanceGroup) SetStatus(v *InstanceGroupStatus) *InstanceGroup { - s.Status = v - return s -} - -// Configuration defining a new instance group. -type InstanceGroupConfig struct { - _ struct{} `type:"structure"` - - // An automatic scaling policy for a core instance group or task instance group - // in an Amazon EMR cluster. The automatic scaling policy defines how an instance - // group dynamically adds and terminates EC2 instances in response to the value - // of a CloudWatch metric. See PutAutoScalingPolicy. - AutoScalingPolicy *AutoScalingPolicy `type:"structure"` - - // The maximum Spot price your are willing to pay for EC2 instances. - // - // An optional, nullable field that applies if the MarketType for the instance - // group is specified as SPOT. Specify the maximum spot price in USD. If the - // value is NULL and SPOT is specified, the maximum Spot price is set equal - // to the On-Demand price. - BidPrice *string `type:"string"` - - // Amazon EMR releases 4.x or later. - // - // The list of configurations supplied for an EMR cluster instance group. You - // can specify a separate configuration for each instance group (master, core, - // and task). - Configurations []*Configuration `type:"list"` - - // EBS configurations that will be attached to each EC2 instance in the instance - // group. - EbsConfiguration *EbsConfiguration `type:"structure"` - - // Target number of instances for the instance group. - // - // InstanceCount is a required field - InstanceCount *int64 `type:"integer" required:"true"` - - // The role of the instance group in the cluster. - // - // InstanceRole is a required field - InstanceRole *string `type:"string" required:"true" enum:"InstanceRoleType"` - - // The EC2 instance type for all instances in the instance group. - // - // InstanceType is a required field - InstanceType *string `min:"1" type:"string" required:"true"` - - // Market type of the EC2 instances used to create a cluster node. - Market *string `type:"string" enum:"MarketType"` - - // Friendly name given to the instance group. - Name *string `type:"string"` -} - -// String returns the string representation -func (s InstanceGroupConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceGroupConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstanceGroupConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstanceGroupConfig"} - if s.InstanceCount == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceCount")) - } - if s.InstanceRole == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceRole")) - } - if s.InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceType")) - } - if s.InstanceType != nil && len(*s.InstanceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceType", 1)) - } - if s.AutoScalingPolicy != nil { - if err := s.AutoScalingPolicy.Validate(); err != nil { - invalidParams.AddNested("AutoScalingPolicy", err.(request.ErrInvalidParams)) - } - } - if s.EbsConfiguration != nil { - if err := s.EbsConfiguration.Validate(); err != nil { - invalidParams.AddNested("EbsConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingPolicy sets the AutoScalingPolicy field's value. -func (s *InstanceGroupConfig) SetAutoScalingPolicy(v *AutoScalingPolicy) *InstanceGroupConfig { - s.AutoScalingPolicy = v - return s -} - -// SetBidPrice sets the BidPrice field's value. -func (s *InstanceGroupConfig) SetBidPrice(v string) *InstanceGroupConfig { - s.BidPrice = &v - return s -} - -// SetConfigurations sets the Configurations field's value. -func (s *InstanceGroupConfig) SetConfigurations(v []*Configuration) *InstanceGroupConfig { - s.Configurations = v - return s -} - -// SetEbsConfiguration sets the EbsConfiguration field's value. -func (s *InstanceGroupConfig) SetEbsConfiguration(v *EbsConfiguration) *InstanceGroupConfig { - s.EbsConfiguration = v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *InstanceGroupConfig) SetInstanceCount(v int64) *InstanceGroupConfig { - s.InstanceCount = &v - return s -} - -// SetInstanceRole sets the InstanceRole field's value. -func (s *InstanceGroupConfig) SetInstanceRole(v string) *InstanceGroupConfig { - s.InstanceRole = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *InstanceGroupConfig) SetInstanceType(v string) *InstanceGroupConfig { - s.InstanceType = &v - return s -} - -// SetMarket sets the Market field's value. -func (s *InstanceGroupConfig) SetMarket(v string) *InstanceGroupConfig { - s.Market = &v - return s -} - -// SetName sets the Name field's value. -func (s *InstanceGroupConfig) SetName(v string) *InstanceGroupConfig { - s.Name = &v - return s -} - -// Detailed information about an instance group. -type InstanceGroupDetail struct { - _ struct{} `type:"structure"` - - // The maximum Spot price your are willing to pay for EC2 instances. - // - // An optional, nullable field that applies if the MarketType for the instance - // group is specified as SPOT. Specified in USD. If the value is NULL and SPOT - // is specified, the maximum Spot price is set equal to the On-Demand price. - BidPrice *string `type:"string"` - - // The date/time the instance group was created. - // - // CreationDateTime is a required field - CreationDateTime *time.Time `type:"timestamp" required:"true"` - - // The date/time the instance group was terminated. - EndDateTime *time.Time `type:"timestamp"` - - // Unique identifier for the instance group. - InstanceGroupId *string `type:"string"` - - // Target number of instances to run in the instance group. - // - // InstanceRequestCount is a required field - InstanceRequestCount *int64 `type:"integer" required:"true"` - - // Instance group role in the cluster - // - // InstanceRole is a required field - InstanceRole *string `type:"string" required:"true" enum:"InstanceRoleType"` - - // Actual count of running instances. - // - // InstanceRunningCount is a required field - InstanceRunningCount *int64 `type:"integer" required:"true"` - - // EC2 instance type. - // - // InstanceType is a required field - InstanceType *string `min:"1" type:"string" required:"true"` - - // Details regarding the state of the instance group. - LastStateChangeReason *string `type:"string"` - - // Market type of the EC2 instances used to create a cluster node. - // - // Market is a required field - Market *string `type:"string" required:"true" enum:"MarketType"` - - // Friendly name for the instance group. - Name *string `type:"string"` - - // The date/time the instance group was available to the cluster. - ReadyDateTime *time.Time `type:"timestamp"` - - // The date/time the instance group was started. - StartDateTime *time.Time `type:"timestamp"` - - // State of instance group. The following values are deprecated: STARTING, TERMINATED, - // and FAILED. - // - // State is a required field - State *string `type:"string" required:"true" enum:"InstanceGroupState"` -} - -// String returns the string representation -func (s InstanceGroupDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceGroupDetail) GoString() string { - return s.String() -} - -// SetBidPrice sets the BidPrice field's value. -func (s *InstanceGroupDetail) SetBidPrice(v string) *InstanceGroupDetail { - s.BidPrice = &v - return s -} - -// SetCreationDateTime sets the CreationDateTime field's value. -func (s *InstanceGroupDetail) SetCreationDateTime(v time.Time) *InstanceGroupDetail { - s.CreationDateTime = &v - return s -} - -// SetEndDateTime sets the EndDateTime field's value. -func (s *InstanceGroupDetail) SetEndDateTime(v time.Time) *InstanceGroupDetail { - s.EndDateTime = &v - return s -} - -// SetInstanceGroupId sets the InstanceGroupId field's value. -func (s *InstanceGroupDetail) SetInstanceGroupId(v string) *InstanceGroupDetail { - s.InstanceGroupId = &v - return s -} - -// SetInstanceRequestCount sets the InstanceRequestCount field's value. -func (s *InstanceGroupDetail) SetInstanceRequestCount(v int64) *InstanceGroupDetail { - s.InstanceRequestCount = &v - return s -} - -// SetInstanceRole sets the InstanceRole field's value. -func (s *InstanceGroupDetail) SetInstanceRole(v string) *InstanceGroupDetail { - s.InstanceRole = &v - return s -} - -// SetInstanceRunningCount sets the InstanceRunningCount field's value. -func (s *InstanceGroupDetail) SetInstanceRunningCount(v int64) *InstanceGroupDetail { - s.InstanceRunningCount = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *InstanceGroupDetail) SetInstanceType(v string) *InstanceGroupDetail { - s.InstanceType = &v - return s -} - -// SetLastStateChangeReason sets the LastStateChangeReason field's value. -func (s *InstanceGroupDetail) SetLastStateChangeReason(v string) *InstanceGroupDetail { - s.LastStateChangeReason = &v - return s -} - -// SetMarket sets the Market field's value. -func (s *InstanceGroupDetail) SetMarket(v string) *InstanceGroupDetail { - s.Market = &v - return s -} - -// SetName sets the Name field's value. -func (s *InstanceGroupDetail) SetName(v string) *InstanceGroupDetail { - s.Name = &v - return s -} - -// SetReadyDateTime sets the ReadyDateTime field's value. -func (s *InstanceGroupDetail) SetReadyDateTime(v time.Time) *InstanceGroupDetail { - s.ReadyDateTime = &v - return s -} - -// SetStartDateTime sets the StartDateTime field's value. -func (s *InstanceGroupDetail) SetStartDateTime(v time.Time) *InstanceGroupDetail { - s.StartDateTime = &v - return s -} - -// SetState sets the State field's value. -func (s *InstanceGroupDetail) SetState(v string) *InstanceGroupDetail { - s.State = &v - return s -} - -// Modify an instance group size. -type InstanceGroupModifyConfig struct { - _ struct{} `type:"structure"` - - // The EC2 InstanceIds to terminate. After you terminate the instances, the - // instance group will not return to its original requested size. - EC2InstanceIdsToTerminate []*string `type:"list"` - - // Target size for the instance group. - InstanceCount *int64 `type:"integer"` - - // Unique ID of the instance group to expand or shrink. - // - // InstanceGroupId is a required field - InstanceGroupId *string `type:"string" required:"true"` - - // Policy for customizing shrink operations. - ShrinkPolicy *ShrinkPolicy `type:"structure"` -} - -// String returns the string representation -func (s InstanceGroupModifyConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceGroupModifyConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstanceGroupModifyConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstanceGroupModifyConfig"} - if s.InstanceGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceGroupId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEC2InstanceIdsToTerminate sets the EC2InstanceIdsToTerminate field's value. -func (s *InstanceGroupModifyConfig) SetEC2InstanceIdsToTerminate(v []*string) *InstanceGroupModifyConfig { - s.EC2InstanceIdsToTerminate = v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *InstanceGroupModifyConfig) SetInstanceCount(v int64) *InstanceGroupModifyConfig { - s.InstanceCount = &v - return s -} - -// SetInstanceGroupId sets the InstanceGroupId field's value. -func (s *InstanceGroupModifyConfig) SetInstanceGroupId(v string) *InstanceGroupModifyConfig { - s.InstanceGroupId = &v - return s -} - -// SetShrinkPolicy sets the ShrinkPolicy field's value. -func (s *InstanceGroupModifyConfig) SetShrinkPolicy(v *ShrinkPolicy) *InstanceGroupModifyConfig { - s.ShrinkPolicy = v - return s -} - -// The status change reason details for the instance group. -type InstanceGroupStateChangeReason struct { - _ struct{} `type:"structure"` - - // The programmable code for the state change reason. - Code *string `type:"string" enum:"InstanceGroupStateChangeReasonCode"` - - // The status change reason description. - Message *string `type:"string"` -} - -// String returns the string representation -func (s InstanceGroupStateChangeReason) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceGroupStateChangeReason) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *InstanceGroupStateChangeReason) SetCode(v string) *InstanceGroupStateChangeReason { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *InstanceGroupStateChangeReason) SetMessage(v string) *InstanceGroupStateChangeReason { - s.Message = &v - return s -} - -// The details of the instance group status. -type InstanceGroupStatus struct { - _ struct{} `type:"structure"` - - // The current state of the instance group. - State *string `type:"string" enum:"InstanceGroupState"` - - // The status change reason details for the instance group. - StateChangeReason *InstanceGroupStateChangeReason `type:"structure"` - - // The timeline of the instance group status over time. - Timeline *InstanceGroupTimeline `type:"structure"` -} - -// String returns the string representation -func (s InstanceGroupStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceGroupStatus) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *InstanceGroupStatus) SetState(v string) *InstanceGroupStatus { - s.State = &v - return s -} - -// SetStateChangeReason sets the StateChangeReason field's value. -func (s *InstanceGroupStatus) SetStateChangeReason(v *InstanceGroupStateChangeReason) *InstanceGroupStatus { - s.StateChangeReason = v - return s -} - -// SetTimeline sets the Timeline field's value. -func (s *InstanceGroupStatus) SetTimeline(v *InstanceGroupTimeline) *InstanceGroupStatus { - s.Timeline = v - return s -} - -// The timeline of the instance group lifecycle. -type InstanceGroupTimeline struct { - _ struct{} `type:"structure"` - - // The creation date and time of the instance group. - CreationDateTime *time.Time `type:"timestamp"` - - // The date and time when the instance group terminated. - EndDateTime *time.Time `type:"timestamp"` - - // The date and time when the instance group became ready to perform tasks. - ReadyDateTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s InstanceGroupTimeline) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceGroupTimeline) GoString() string { - return s.String() -} - -// SetCreationDateTime sets the CreationDateTime field's value. -func (s *InstanceGroupTimeline) SetCreationDateTime(v time.Time) *InstanceGroupTimeline { - s.CreationDateTime = &v - return s -} - -// SetEndDateTime sets the EndDateTime field's value. -func (s *InstanceGroupTimeline) SetEndDateTime(v time.Time) *InstanceGroupTimeline { - s.EndDateTime = &v - return s -} - -// SetReadyDateTime sets the ReadyDateTime field's value. -func (s *InstanceGroupTimeline) SetReadyDateTime(v time.Time) *InstanceGroupTimeline { - s.ReadyDateTime = &v - return s -} - -// Custom policy for requesting termination protection or termination of specific -// instances when shrinking an instance group. -type InstanceResizePolicy struct { - _ struct{} `type:"structure"` - - // Decommissioning timeout override for the specific list of instances to be - // terminated. - InstanceTerminationTimeout *int64 `type:"integer"` - - // Specific list of instances to be protected when shrinking an instance group. - InstancesToProtect []*string `type:"list"` - - // Specific list of instances to be terminated when shrinking an instance group. - InstancesToTerminate []*string `type:"list"` -} - -// String returns the string representation -func (s InstanceResizePolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceResizePolicy) GoString() string { - return s.String() -} - -// SetInstanceTerminationTimeout sets the InstanceTerminationTimeout field's value. -func (s *InstanceResizePolicy) SetInstanceTerminationTimeout(v int64) *InstanceResizePolicy { - s.InstanceTerminationTimeout = &v - return s -} - -// SetInstancesToProtect sets the InstancesToProtect field's value. -func (s *InstanceResizePolicy) SetInstancesToProtect(v []*string) *InstanceResizePolicy { - s.InstancesToProtect = v - return s -} - -// SetInstancesToTerminate sets the InstancesToTerminate field's value. -func (s *InstanceResizePolicy) SetInstancesToTerminate(v []*string) *InstanceResizePolicy { - s.InstancesToTerminate = v - return s -} - -// The details of the status change reason for the instance. -type InstanceStateChangeReason struct { - _ struct{} `type:"structure"` - - // The programmable code for the state change reason. - Code *string `type:"string" enum:"InstanceStateChangeReasonCode"` - - // The status change reason description. - Message *string `type:"string"` -} - -// String returns the string representation -func (s InstanceStateChangeReason) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceStateChangeReason) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *InstanceStateChangeReason) SetCode(v string) *InstanceStateChangeReason { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *InstanceStateChangeReason) SetMessage(v string) *InstanceStateChangeReason { - s.Message = &v - return s -} - -// The instance status details. -type InstanceStatus struct { - _ struct{} `type:"structure"` - - // The current state of the instance. - State *string `type:"string" enum:"InstanceState"` - - // The details of the status change reason for the instance. - StateChangeReason *InstanceStateChangeReason `type:"structure"` - - // The timeline of the instance status over time. - Timeline *InstanceTimeline `type:"structure"` -} - -// String returns the string representation -func (s InstanceStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceStatus) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *InstanceStatus) SetState(v string) *InstanceStatus { - s.State = &v - return s -} - -// SetStateChangeReason sets the StateChangeReason field's value. -func (s *InstanceStatus) SetStateChangeReason(v *InstanceStateChangeReason) *InstanceStatus { - s.StateChangeReason = v - return s -} - -// SetTimeline sets the Timeline field's value. -func (s *InstanceStatus) SetTimeline(v *InstanceTimeline) *InstanceStatus { - s.Timeline = v - return s -} - -// The timeline of the instance lifecycle. -type InstanceTimeline struct { - _ struct{} `type:"structure"` - - // The creation date and time of the instance. - CreationDateTime *time.Time `type:"timestamp"` - - // The date and time when the instance was terminated. - EndDateTime *time.Time `type:"timestamp"` - - // The date and time when the instance was ready to perform tasks. - ReadyDateTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s InstanceTimeline) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceTimeline) GoString() string { - return s.String() -} - -// SetCreationDateTime sets the CreationDateTime field's value. -func (s *InstanceTimeline) SetCreationDateTime(v time.Time) *InstanceTimeline { - s.CreationDateTime = &v - return s -} - -// SetEndDateTime sets the EndDateTime field's value. -func (s *InstanceTimeline) SetEndDateTime(v time.Time) *InstanceTimeline { - s.EndDateTime = &v - return s -} - -// SetReadyDateTime sets the ReadyDateTime field's value. -func (s *InstanceTimeline) SetReadyDateTime(v time.Time) *InstanceTimeline { - s.ReadyDateTime = &v - return s -} - -// An instance type configuration for each instance type in an instance fleet, -// which determines the EC2 instances Amazon EMR attempts to provision to fulfill -// On-Demand and Spot target capacities. There can be a maximum of 5 instance -// type configurations in a fleet. -// -// The instance fleet configuration is available only in Amazon EMR versions -// 4.8.0 and later, excluding 5.0.x versions. -type InstanceTypeConfig struct { - _ struct{} `type:"structure"` - - // The bid price for each EC2 Spot instance type as defined by InstanceType. - // Expressed in USD. If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice - // is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%. - BidPrice *string `type:"string"` - - // The bid price, as a percentage of On-Demand price, for each EC2 Spot instance - // as defined by InstanceType. Expressed as a number (for example, 20 specifies - // 20%). If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, - // BidPriceAsPercentageOfOnDemandPrice defaults to 100%. - BidPriceAsPercentageOfOnDemandPrice *float64 `type:"double"` - - // A configuration classification that applies when provisioning cluster instances, - // which can include configurations for applications and software that run on - // the cluster. - Configurations []*Configuration `type:"list"` - - // The configuration of Amazon Elastic Block Storage (EBS) attached to each - // instance as defined by InstanceType. - EbsConfiguration *EbsConfiguration `type:"structure"` - - // An EC2 instance type, such as m3.xlarge. - // - // InstanceType is a required field - InstanceType *string `min:"1" type:"string" required:"true"` - - // The number of units that a provisioned instance of this type provides toward - // fulfilling the target capacities defined in InstanceFleetConfig. This value - // is 1 for a master instance fleet, and must be 1 or greater for core and task - // instance fleets. Defaults to 1 if not specified. - WeightedCapacity *int64 `type:"integer"` -} - -// String returns the string representation -func (s InstanceTypeConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceTypeConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstanceTypeConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstanceTypeConfig"} - if s.InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceType")) - } - if s.InstanceType != nil && len(*s.InstanceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceType", 1)) - } - if s.EbsConfiguration != nil { - if err := s.EbsConfiguration.Validate(); err != nil { - invalidParams.AddNested("EbsConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBidPrice sets the BidPrice field's value. -func (s *InstanceTypeConfig) SetBidPrice(v string) *InstanceTypeConfig { - s.BidPrice = &v - return s -} - -// SetBidPriceAsPercentageOfOnDemandPrice sets the BidPriceAsPercentageOfOnDemandPrice field's value. -func (s *InstanceTypeConfig) SetBidPriceAsPercentageOfOnDemandPrice(v float64) *InstanceTypeConfig { - s.BidPriceAsPercentageOfOnDemandPrice = &v - return s -} - -// SetConfigurations sets the Configurations field's value. -func (s *InstanceTypeConfig) SetConfigurations(v []*Configuration) *InstanceTypeConfig { - s.Configurations = v - return s -} - -// SetEbsConfiguration sets the EbsConfiguration field's value. -func (s *InstanceTypeConfig) SetEbsConfiguration(v *EbsConfiguration) *InstanceTypeConfig { - s.EbsConfiguration = v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *InstanceTypeConfig) SetInstanceType(v string) *InstanceTypeConfig { - s.InstanceType = &v - return s -} - -// SetWeightedCapacity sets the WeightedCapacity field's value. -func (s *InstanceTypeConfig) SetWeightedCapacity(v int64) *InstanceTypeConfig { - s.WeightedCapacity = &v - return s -} - -// The configuration specification for each instance type in an instance fleet. -// -// The instance fleet configuration is available only in Amazon EMR versions -// 4.8.0 and later, excluding 5.0.x versions. -type InstanceTypeSpecification struct { - _ struct{} `type:"structure"` - - // The bid price for each EC2 Spot instance type as defined by InstanceType. - // Expressed in USD. - BidPrice *string `type:"string"` - - // The bid price, as a percentage of On-Demand price, for each EC2 Spot instance - // as defined by InstanceType. Expressed as a number (for example, 20 specifies - // 20%). - BidPriceAsPercentageOfOnDemandPrice *float64 `type:"double"` - - // A configuration classification that applies when provisioning cluster instances, - // which can include configurations for applications and software bundled with - // Amazon EMR. - Configurations []*Configuration `type:"list"` - - // The configuration of Amazon Elastic Block Storage (EBS) attached to each - // instance as defined by InstanceType. - EbsBlockDevices []*EbsBlockDevice `type:"list"` - - // Evaluates to TRUE when the specified InstanceType is EBS-optimized. - EbsOptimized *bool `type:"boolean"` - - // The EC2 instance type, for example m3.xlarge. - InstanceType *string `min:"1" type:"string"` - - // The number of units that a provisioned instance of this type provides toward - // fulfilling the target capacities defined in InstanceFleetConfig. Capacity - // values represent performance characteristics such as vCPUs, memory, or I/O. - // If not specified, the default value is 1. - WeightedCapacity *int64 `type:"integer"` -} - -// String returns the string representation -func (s InstanceTypeSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceTypeSpecification) GoString() string { - return s.String() -} - -// SetBidPrice sets the BidPrice field's value. -func (s *InstanceTypeSpecification) SetBidPrice(v string) *InstanceTypeSpecification { - s.BidPrice = &v - return s -} - -// SetBidPriceAsPercentageOfOnDemandPrice sets the BidPriceAsPercentageOfOnDemandPrice field's value. -func (s *InstanceTypeSpecification) SetBidPriceAsPercentageOfOnDemandPrice(v float64) *InstanceTypeSpecification { - s.BidPriceAsPercentageOfOnDemandPrice = &v - return s -} - -// SetConfigurations sets the Configurations field's value. -func (s *InstanceTypeSpecification) SetConfigurations(v []*Configuration) *InstanceTypeSpecification { - s.Configurations = v - return s -} - -// SetEbsBlockDevices sets the EbsBlockDevices field's value. -func (s *InstanceTypeSpecification) SetEbsBlockDevices(v []*EbsBlockDevice) *InstanceTypeSpecification { - s.EbsBlockDevices = v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *InstanceTypeSpecification) SetEbsOptimized(v bool) *InstanceTypeSpecification { - s.EbsOptimized = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *InstanceTypeSpecification) SetInstanceType(v string) *InstanceTypeSpecification { - s.InstanceType = &v - return s -} - -// SetWeightedCapacity sets the WeightedCapacity field's value. -func (s *InstanceTypeSpecification) SetWeightedCapacity(v int64) *InstanceTypeSpecification { - s.WeightedCapacity = &v - return s -} - -// A description of a cluster (job flow). -type JobFlowDetail struct { - _ struct{} `type:"structure"` - - // Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases - // 4.0 and later, ReleaseLabel is used. To specify a custom AMI, use CustomAmiID. - AmiVersion *string `type:"string"` - - // An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. - // The IAM role provides a way for the automatic scaling feature to get the - // required permissions it needs to launch and terminate EC2 instances in an - // instance group. - AutoScalingRole *string `type:"string"` - - // A list of the bootstrap actions run by the job flow. - BootstrapActions []*BootstrapActionDetail `type:"list"` - - // Describes the execution status of the job flow. - // - // ExecutionStatusDetail is a required field - ExecutionStatusDetail *JobFlowExecutionStatusDetail `type:"structure" required:"true"` - - // Describes the Amazon EC2 instances of the job flow. - // - // Instances is a required field - Instances *JobFlowInstancesDetail `type:"structure" required:"true"` - - // The job flow identifier. - // - // JobFlowId is a required field - JobFlowId *string `type:"string" required:"true"` - - // The IAM role that was specified when the job flow was launched. The EC2 instances - // of the job flow assume this role. - JobFlowRole *string `type:"string"` - - // The location in Amazon S3 where log files for the job are stored. - LogUri *string `type:"string"` - - // The name of the job flow. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The way that individual Amazon EC2 instances terminate when an automatic - // scale-in activity occurs or an instance group is resized. TERMINATE_AT_INSTANCE_HOUR - // indicates that Amazon EMR terminates nodes at the instance-hour boundary, - // regardless of when the request to terminate the instance was submitted. This - // option is only available with Amazon EMR 5.1.0 and later and is the default - // for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates - // that Amazon EMR blacklists and drains tasks from nodes before terminating - // the Amazon EC2 instances, regardless of the instance-hour boundary. With - // either behavior, Amazon EMR removes the least active nodes first and blocks - // instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION - // available only in Amazon EMR version 4.1.0 and later, and is the default - // for versions of Amazon EMR earlier than 5.1.0. - ScaleDownBehavior *string `type:"string" enum:"ScaleDownBehavior"` - - // The IAM role that will be assumed by the Amazon EMR service to access AWS - // resources on your behalf. - ServiceRole *string `type:"string"` - - // A list of steps run by the job flow. - Steps []*StepDetail `type:"list"` - - // A list of strings set by third party software when the job flow is launched. - // If you are not using third party software to manage the job flow this value - // is empty. - SupportedProducts []*string `type:"list"` - - // Specifies whether the cluster is visible to all IAM users of the AWS account - // associated with the cluster. If this value is set to true, all IAM users - // of that AWS account can view and (if they have the proper policy permissions - // set) manage the cluster. If it is set to false, only the IAM user that created - // the cluster can view and manage it. This value can be changed using the SetVisibleToAllUsers - // action. - VisibleToAllUsers *bool `type:"boolean"` -} - -// String returns the string representation -func (s JobFlowDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobFlowDetail) GoString() string { - return s.String() -} - -// SetAmiVersion sets the AmiVersion field's value. -func (s *JobFlowDetail) SetAmiVersion(v string) *JobFlowDetail { - s.AmiVersion = &v - return s -} - -// SetAutoScalingRole sets the AutoScalingRole field's value. -func (s *JobFlowDetail) SetAutoScalingRole(v string) *JobFlowDetail { - s.AutoScalingRole = &v - return s -} - -// SetBootstrapActions sets the BootstrapActions field's value. -func (s *JobFlowDetail) SetBootstrapActions(v []*BootstrapActionDetail) *JobFlowDetail { - s.BootstrapActions = v - return s -} - -// SetExecutionStatusDetail sets the ExecutionStatusDetail field's value. -func (s *JobFlowDetail) SetExecutionStatusDetail(v *JobFlowExecutionStatusDetail) *JobFlowDetail { - s.ExecutionStatusDetail = v - return s -} - -// SetInstances sets the Instances field's value. -func (s *JobFlowDetail) SetInstances(v *JobFlowInstancesDetail) *JobFlowDetail { - s.Instances = v - return s -} - -// SetJobFlowId sets the JobFlowId field's value. -func (s *JobFlowDetail) SetJobFlowId(v string) *JobFlowDetail { - s.JobFlowId = &v - return s -} - -// SetJobFlowRole sets the JobFlowRole field's value. -func (s *JobFlowDetail) SetJobFlowRole(v string) *JobFlowDetail { - s.JobFlowRole = &v - return s -} - -// SetLogUri sets the LogUri field's value. -func (s *JobFlowDetail) SetLogUri(v string) *JobFlowDetail { - s.LogUri = &v - return s -} - -// SetName sets the Name field's value. -func (s *JobFlowDetail) SetName(v string) *JobFlowDetail { - s.Name = &v - return s -} - -// SetScaleDownBehavior sets the ScaleDownBehavior field's value. -func (s *JobFlowDetail) SetScaleDownBehavior(v string) *JobFlowDetail { - s.ScaleDownBehavior = &v - return s -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *JobFlowDetail) SetServiceRole(v string) *JobFlowDetail { - s.ServiceRole = &v - return s -} - -// SetSteps sets the Steps field's value. -func (s *JobFlowDetail) SetSteps(v []*StepDetail) *JobFlowDetail { - s.Steps = v - return s -} - -// SetSupportedProducts sets the SupportedProducts field's value. -func (s *JobFlowDetail) SetSupportedProducts(v []*string) *JobFlowDetail { - s.SupportedProducts = v - return s -} - -// SetVisibleToAllUsers sets the VisibleToAllUsers field's value. -func (s *JobFlowDetail) SetVisibleToAllUsers(v bool) *JobFlowDetail { - s.VisibleToAllUsers = &v - return s -} - -// Describes the status of the cluster (job flow). -type JobFlowExecutionStatusDetail struct { - _ struct{} `type:"structure"` - - // The creation date and time of the job flow. - // - // CreationDateTime is a required field - CreationDateTime *time.Time `type:"timestamp" required:"true"` - - // The completion date and time of the job flow. - EndDateTime *time.Time `type:"timestamp"` - - // Description of the job flow last changed state. - LastStateChangeReason *string `type:"string"` - - // The date and time when the job flow was ready to start running bootstrap - // actions. - ReadyDateTime *time.Time `type:"timestamp"` - - // The start date and time of the job flow. - StartDateTime *time.Time `type:"timestamp"` - - // The state of the job flow. - // - // State is a required field - State *string `type:"string" required:"true" enum:"JobFlowExecutionState"` -} - -// String returns the string representation -func (s JobFlowExecutionStatusDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobFlowExecutionStatusDetail) GoString() string { - return s.String() -} - -// SetCreationDateTime sets the CreationDateTime field's value. -func (s *JobFlowExecutionStatusDetail) SetCreationDateTime(v time.Time) *JobFlowExecutionStatusDetail { - s.CreationDateTime = &v - return s -} - -// SetEndDateTime sets the EndDateTime field's value. -func (s *JobFlowExecutionStatusDetail) SetEndDateTime(v time.Time) *JobFlowExecutionStatusDetail { - s.EndDateTime = &v - return s -} - -// SetLastStateChangeReason sets the LastStateChangeReason field's value. -func (s *JobFlowExecutionStatusDetail) SetLastStateChangeReason(v string) *JobFlowExecutionStatusDetail { - s.LastStateChangeReason = &v - return s -} - -// SetReadyDateTime sets the ReadyDateTime field's value. -func (s *JobFlowExecutionStatusDetail) SetReadyDateTime(v time.Time) *JobFlowExecutionStatusDetail { - s.ReadyDateTime = &v - return s -} - -// SetStartDateTime sets the StartDateTime field's value. -func (s *JobFlowExecutionStatusDetail) SetStartDateTime(v time.Time) *JobFlowExecutionStatusDetail { - s.StartDateTime = &v - return s -} - -// SetState sets the State field's value. -func (s *JobFlowExecutionStatusDetail) SetState(v string) *JobFlowExecutionStatusDetail { - s.State = &v - return s -} - -// A description of the Amazon EC2 instance on which the cluster (job flow) -// runs. A valid JobFlowInstancesConfig must contain either InstanceGroups or -// InstanceFleets, which is the recommended configuration. They cannot be used -// together. You may also have MasterInstanceType, SlaveInstanceType, and InstanceCount -// (all three must be present), but we don't recommend this configuration. -type JobFlowInstancesConfig struct { - _ struct{} `type:"structure"` - - // A list of additional Amazon EC2 security group IDs for the master node. - AdditionalMasterSecurityGroups []*string `type:"list"` - - // A list of additional Amazon EC2 security group IDs for the core and task - // nodes. - AdditionalSlaveSecurityGroups []*string `type:"list"` - - // The name of the EC2 key pair that can be used to ssh to the master node as - // the user called "hadoop." - Ec2KeyName *string `type:"string"` - - // Applies to clusters that use the uniform instance group configuration. To - // launch the cluster in Amazon Virtual Private Cloud (Amazon VPC), set this - // parameter to the identifier of the Amazon VPC subnet where you want the cluster - // to launch. If you do not specify this value, the cluster launches in the - // normal Amazon Web Services cloud, outside of an Amazon VPC, if the account - // launching the cluster supports EC2 Classic networks in the region where the - // cluster launches. - // - // Amazon VPC currently does not support cluster compute quadruple extra large - // (cc1.4xlarge) instances. Thus you cannot specify the cc1.4xlarge instance - // type for clusters launched in an Amazon VPC. - Ec2SubnetId *string `type:"string"` - - // Applies to clusters that use the instance fleet configuration. When multiple - // EC2 subnet IDs are specified, Amazon EMR evaluates them and launches instances - // in the optimal subnet. - // - // The instance fleet configuration is available only in Amazon EMR versions - // 4.8.0 and later, excluding 5.0.x versions. - Ec2SubnetIds []*string `type:"list"` - - // The identifier of the Amazon EC2 security group for the master node. - EmrManagedMasterSecurityGroup *string `type:"string"` - - // The identifier of the Amazon EC2 security group for the core and task nodes. - EmrManagedSlaveSecurityGroup *string `type:"string"` - - // Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop - // version for the cluster. Valid inputs are "0.18" (deprecated), "0.20" (deprecated), - // "0.20.205" (deprecated), "1.0.3", "2.2.0", or "2.4.0". If you do not set - // this value, the default of 0.18 is used, unless the AmiVersion parameter - // is set in the RunJobFlow call, in which case the default version of Hadoop - // for that AMI version is used. - HadoopVersion *string `type:"string"` - - // The number of EC2 instances in the cluster. - InstanceCount *int64 `type:"integer"` - - // The instance fleet configuration is available only in Amazon EMR versions - // 4.8.0 and later, excluding 5.0.x versions. - // - // Describes the EC2 instances and instance configurations for clusters that - // use the instance fleet configuration. - InstanceFleets []*InstanceFleetConfig `type:"list"` - - // Configuration for the instance groups in a cluster. - InstanceGroups []*InstanceGroupConfig `type:"list"` - - // Specifies whether the cluster should remain available after completing all - // steps. - KeepJobFlowAliveWhenNoSteps *bool `type:"boolean"` - - // The EC2 instance type of the master node. - MasterInstanceType *string `min:"1" type:"string"` - - // The Availability Zone in which the cluster runs. - Placement *PlacementType `type:"structure"` - - // The identifier of the Amazon EC2 security group for the Amazon EMR service - // to access clusters in VPC private subnets. - ServiceAccessSecurityGroup *string `type:"string"` - - // The EC2 instance type of the core and task nodes. - SlaveInstanceType *string `min:"1" type:"string"` - - // Specifies whether to lock the cluster to prevent the Amazon EC2 instances - // from being terminated by API call, user intervention, or in the event of - // a job-flow error. - TerminationProtected *bool `type:"boolean"` -} - -// String returns the string representation -func (s JobFlowInstancesConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobFlowInstancesConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *JobFlowInstancesConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "JobFlowInstancesConfig"} - if s.MasterInstanceType != nil && len(*s.MasterInstanceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MasterInstanceType", 1)) - } - if s.SlaveInstanceType != nil && len(*s.SlaveInstanceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SlaveInstanceType", 1)) - } - if s.InstanceFleets != nil { - for i, v := range s.InstanceFleets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InstanceFleets", i), err.(request.ErrInvalidParams)) - } - } - } - if s.InstanceGroups != nil { - for i, v := range s.InstanceGroups { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InstanceGroups", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdditionalMasterSecurityGroups sets the AdditionalMasterSecurityGroups field's value. -func (s *JobFlowInstancesConfig) SetAdditionalMasterSecurityGroups(v []*string) *JobFlowInstancesConfig { - s.AdditionalMasterSecurityGroups = v - return s -} - -// SetAdditionalSlaveSecurityGroups sets the AdditionalSlaveSecurityGroups field's value. -func (s *JobFlowInstancesConfig) SetAdditionalSlaveSecurityGroups(v []*string) *JobFlowInstancesConfig { - s.AdditionalSlaveSecurityGroups = v - return s -} - -// SetEc2KeyName sets the Ec2KeyName field's value. -func (s *JobFlowInstancesConfig) SetEc2KeyName(v string) *JobFlowInstancesConfig { - s.Ec2KeyName = &v - return s -} - -// SetEc2SubnetId sets the Ec2SubnetId field's value. -func (s *JobFlowInstancesConfig) SetEc2SubnetId(v string) *JobFlowInstancesConfig { - s.Ec2SubnetId = &v - return s -} - -// SetEc2SubnetIds sets the Ec2SubnetIds field's value. -func (s *JobFlowInstancesConfig) SetEc2SubnetIds(v []*string) *JobFlowInstancesConfig { - s.Ec2SubnetIds = v - return s -} - -// SetEmrManagedMasterSecurityGroup sets the EmrManagedMasterSecurityGroup field's value. -func (s *JobFlowInstancesConfig) SetEmrManagedMasterSecurityGroup(v string) *JobFlowInstancesConfig { - s.EmrManagedMasterSecurityGroup = &v - return s -} - -// SetEmrManagedSlaveSecurityGroup sets the EmrManagedSlaveSecurityGroup field's value. -func (s *JobFlowInstancesConfig) SetEmrManagedSlaveSecurityGroup(v string) *JobFlowInstancesConfig { - s.EmrManagedSlaveSecurityGroup = &v - return s -} - -// SetHadoopVersion sets the HadoopVersion field's value. -func (s *JobFlowInstancesConfig) SetHadoopVersion(v string) *JobFlowInstancesConfig { - s.HadoopVersion = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *JobFlowInstancesConfig) SetInstanceCount(v int64) *JobFlowInstancesConfig { - s.InstanceCount = &v - return s -} - -// SetInstanceFleets sets the InstanceFleets field's value. -func (s *JobFlowInstancesConfig) SetInstanceFleets(v []*InstanceFleetConfig) *JobFlowInstancesConfig { - s.InstanceFleets = v - return s -} - -// SetInstanceGroups sets the InstanceGroups field's value. -func (s *JobFlowInstancesConfig) SetInstanceGroups(v []*InstanceGroupConfig) *JobFlowInstancesConfig { - s.InstanceGroups = v - return s -} - -// SetKeepJobFlowAliveWhenNoSteps sets the KeepJobFlowAliveWhenNoSteps field's value. -func (s *JobFlowInstancesConfig) SetKeepJobFlowAliveWhenNoSteps(v bool) *JobFlowInstancesConfig { - s.KeepJobFlowAliveWhenNoSteps = &v - return s -} - -// SetMasterInstanceType sets the MasterInstanceType field's value. -func (s *JobFlowInstancesConfig) SetMasterInstanceType(v string) *JobFlowInstancesConfig { - s.MasterInstanceType = &v - return s -} - -// SetPlacement sets the Placement field's value. -func (s *JobFlowInstancesConfig) SetPlacement(v *PlacementType) *JobFlowInstancesConfig { - s.Placement = v - return s -} - -// SetServiceAccessSecurityGroup sets the ServiceAccessSecurityGroup field's value. -func (s *JobFlowInstancesConfig) SetServiceAccessSecurityGroup(v string) *JobFlowInstancesConfig { - s.ServiceAccessSecurityGroup = &v - return s -} - -// SetSlaveInstanceType sets the SlaveInstanceType field's value. -func (s *JobFlowInstancesConfig) SetSlaveInstanceType(v string) *JobFlowInstancesConfig { - s.SlaveInstanceType = &v - return s -} - -// SetTerminationProtected sets the TerminationProtected field's value. -func (s *JobFlowInstancesConfig) SetTerminationProtected(v bool) *JobFlowInstancesConfig { - s.TerminationProtected = &v - return s -} - -// Specify the type of Amazon EC2 instances that the cluster (job flow) runs -// on. -type JobFlowInstancesDetail struct { - _ struct{} `type:"structure"` - - // The name of an Amazon EC2 key pair that can be used to ssh to the master - // node. - Ec2KeyName *string `type:"string"` - - // For clusters launched within Amazon Virtual Private Cloud, this is the identifier - // of the subnet where the cluster was launched. - Ec2SubnetId *string `type:"string"` - - // The Hadoop version for the cluster. - HadoopVersion *string `type:"string"` - - // The number of Amazon EC2 instances in the cluster. If the value is 1, the - // same instance serves as both the master and core and task node. If the value - // is greater than 1, one instance is the master node and all others are core - // and task nodes. - // - // InstanceCount is a required field - InstanceCount *int64 `type:"integer" required:"true"` - - // Details about the instance groups in a cluster. - InstanceGroups []*InstanceGroupDetail `type:"list"` - - // Specifies whether the cluster should remain available after completing all - // steps. - KeepJobFlowAliveWhenNoSteps *bool `type:"boolean"` - - // The Amazon EC2 instance identifier of the master node. - MasterInstanceId *string `type:"string"` - - // The Amazon EC2 master node instance type. - // - // MasterInstanceType is a required field - MasterInstanceType *string `min:"1" type:"string" required:"true"` - - // The DNS name of the master node. If the cluster is on a private subnet, this - // is the private DNS name. On a public subnet, this is the public DNS name. - MasterPublicDnsName *string `type:"string"` - - // An approximation of the cost of the cluster, represented in m1.small/hours. - // This value is incremented one time for every hour that an m1.small runs. - // Larger instances are weighted more, so an Amazon EC2 instance that is roughly - // four times more expensive would result in the normalized instance hours being - // incremented by four. This result is only an approximation and does not reflect - // the actual billing rate. - NormalizedInstanceHours *int64 `type:"integer"` - - // The Amazon EC2 Availability Zone for the cluster. - Placement *PlacementType `type:"structure"` - - // The Amazon EC2 core and task node instance type. - // - // SlaveInstanceType is a required field - SlaveInstanceType *string `min:"1" type:"string" required:"true"` - - // Specifies whether the Amazon EC2 instances in the cluster are protected from - // termination by API calls, user intervention, or in the event of a job-flow - // error. - TerminationProtected *bool `type:"boolean"` -} - -// String returns the string representation -func (s JobFlowInstancesDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobFlowInstancesDetail) GoString() string { - return s.String() -} - -// SetEc2KeyName sets the Ec2KeyName field's value. -func (s *JobFlowInstancesDetail) SetEc2KeyName(v string) *JobFlowInstancesDetail { - s.Ec2KeyName = &v - return s -} - -// SetEc2SubnetId sets the Ec2SubnetId field's value. -func (s *JobFlowInstancesDetail) SetEc2SubnetId(v string) *JobFlowInstancesDetail { - s.Ec2SubnetId = &v - return s -} - -// SetHadoopVersion sets the HadoopVersion field's value. -func (s *JobFlowInstancesDetail) SetHadoopVersion(v string) *JobFlowInstancesDetail { - s.HadoopVersion = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *JobFlowInstancesDetail) SetInstanceCount(v int64) *JobFlowInstancesDetail { - s.InstanceCount = &v - return s -} - -// SetInstanceGroups sets the InstanceGroups field's value. -func (s *JobFlowInstancesDetail) SetInstanceGroups(v []*InstanceGroupDetail) *JobFlowInstancesDetail { - s.InstanceGroups = v - return s -} - -// SetKeepJobFlowAliveWhenNoSteps sets the KeepJobFlowAliveWhenNoSteps field's value. -func (s *JobFlowInstancesDetail) SetKeepJobFlowAliveWhenNoSteps(v bool) *JobFlowInstancesDetail { - s.KeepJobFlowAliveWhenNoSteps = &v - return s -} - -// SetMasterInstanceId sets the MasterInstanceId field's value. -func (s *JobFlowInstancesDetail) SetMasterInstanceId(v string) *JobFlowInstancesDetail { - s.MasterInstanceId = &v - return s -} - -// SetMasterInstanceType sets the MasterInstanceType field's value. -func (s *JobFlowInstancesDetail) SetMasterInstanceType(v string) *JobFlowInstancesDetail { - s.MasterInstanceType = &v - return s -} - -// SetMasterPublicDnsName sets the MasterPublicDnsName field's value. -func (s *JobFlowInstancesDetail) SetMasterPublicDnsName(v string) *JobFlowInstancesDetail { - s.MasterPublicDnsName = &v - return s -} - -// SetNormalizedInstanceHours sets the NormalizedInstanceHours field's value. -func (s *JobFlowInstancesDetail) SetNormalizedInstanceHours(v int64) *JobFlowInstancesDetail { - s.NormalizedInstanceHours = &v - return s -} - -// SetPlacement sets the Placement field's value. -func (s *JobFlowInstancesDetail) SetPlacement(v *PlacementType) *JobFlowInstancesDetail { - s.Placement = v - return s -} - -// SetSlaveInstanceType sets the SlaveInstanceType field's value. -func (s *JobFlowInstancesDetail) SetSlaveInstanceType(v string) *JobFlowInstancesDetail { - s.SlaveInstanceType = &v - return s -} - -// SetTerminationProtected sets the TerminationProtected field's value. -func (s *JobFlowInstancesDetail) SetTerminationProtected(v bool) *JobFlowInstancesDetail { - s.TerminationProtected = &v - return s -} - -// Attributes for Kerberos configuration when Kerberos authentication is enabled -// using a security configuration. For more information see Use Kerberos Authentication -// (http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html) -// in the EMR Management Guide. -type KerberosAttributes struct { - _ struct{} `type:"structure"` - - // The Active Directory password for ADDomainJoinUser. - ADDomainJoinPassword *string `type:"string"` - - // Required only when establishing a cross-realm trust with an Active Directory - // domain. A user with sufficient privileges to join resources to the domain. - ADDomainJoinUser *string `type:"string"` - - // Required only when establishing a cross-realm trust with a KDC in a different - // realm. The cross-realm principal password, which must be identical across - // realms. - CrossRealmTrustPrincipalPassword *string `type:"string"` - - // The password used within the cluster for the kadmin service on the cluster-dedicated - // KDC, which maintains Kerberos principals, password policies, and keytabs - // for the cluster. - // - // KdcAdminPassword is a required field - KdcAdminPassword *string `type:"string" required:"true"` - - // The name of the Kerberos realm to which all nodes in a cluster belong. For - // example, EC2.INTERNAL. - // - // Realm is a required field - Realm *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s KerberosAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KerberosAttributes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KerberosAttributes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KerberosAttributes"} - if s.KdcAdminPassword == nil { - invalidParams.Add(request.NewErrParamRequired("KdcAdminPassword")) - } - if s.Realm == nil { - invalidParams.Add(request.NewErrParamRequired("Realm")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetADDomainJoinPassword sets the ADDomainJoinPassword field's value. -func (s *KerberosAttributes) SetADDomainJoinPassword(v string) *KerberosAttributes { - s.ADDomainJoinPassword = &v - return s -} - -// SetADDomainJoinUser sets the ADDomainJoinUser field's value. -func (s *KerberosAttributes) SetADDomainJoinUser(v string) *KerberosAttributes { - s.ADDomainJoinUser = &v - return s -} - -// SetCrossRealmTrustPrincipalPassword sets the CrossRealmTrustPrincipalPassword field's value. -func (s *KerberosAttributes) SetCrossRealmTrustPrincipalPassword(v string) *KerberosAttributes { - s.CrossRealmTrustPrincipalPassword = &v - return s -} - -// SetKdcAdminPassword sets the KdcAdminPassword field's value. -func (s *KerberosAttributes) SetKdcAdminPassword(v string) *KerberosAttributes { - s.KdcAdminPassword = &v - return s -} - -// SetRealm sets the Realm field's value. -func (s *KerberosAttributes) SetRealm(v string) *KerberosAttributes { - s.Realm = &v - return s -} - -// A key value pair. -type KeyValue struct { - _ struct{} `type:"structure"` - - // The unique identifier of a key value pair. - Key *string `type:"string"` - - // The value part of the identified key. - Value *string `type:"string"` -} - -// String returns the string representation -func (s KeyValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KeyValue) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *KeyValue) SetKey(v string) *KeyValue { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *KeyValue) SetValue(v string) *KeyValue { - s.Value = &v - return s -} - -// This input determines which bootstrap actions to retrieve. -type ListBootstrapActionsInput struct { - _ struct{} `type:"structure"` - - // The cluster identifier for the bootstrap actions to list. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` - - // The pagination token that indicates the next set of results to retrieve. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s ListBootstrapActionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBootstrapActionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBootstrapActionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBootstrapActionsInput"} - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterId sets the ClusterId field's value. -func (s *ListBootstrapActionsInput) SetClusterId(v string) *ListBootstrapActionsInput { - s.ClusterId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListBootstrapActionsInput) SetMarker(v string) *ListBootstrapActionsInput { - s.Marker = &v - return s -} - -// This output contains the bootstrap actions detail. -type ListBootstrapActionsOutput struct { - _ struct{} `type:"structure"` - - // The bootstrap actions associated with the cluster. - BootstrapActions []*Command `type:"list"` - - // The pagination token that indicates the next set of results to retrieve. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s ListBootstrapActionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBootstrapActionsOutput) GoString() string { - return s.String() -} - -// SetBootstrapActions sets the BootstrapActions field's value. -func (s *ListBootstrapActionsOutput) SetBootstrapActions(v []*Command) *ListBootstrapActionsOutput { - s.BootstrapActions = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListBootstrapActionsOutput) SetMarker(v string) *ListBootstrapActionsOutput { - s.Marker = &v - return s -} - -// This input determines how the ListClusters action filters the list of clusters -// that it returns. -type ListClustersInput struct { - _ struct{} `type:"structure"` - - // The cluster state filters to apply when listing clusters. - ClusterStates []*string `type:"list"` - - // The creation date and time beginning value filter for listing clusters. - CreatedAfter *time.Time `type:"timestamp"` - - // The creation date and time end value filter for listing clusters. - CreatedBefore *time.Time `type:"timestamp"` - - // The pagination token that indicates the next set of results to retrieve. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s ListClustersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListClustersInput) GoString() string { - return s.String() -} - -// SetClusterStates sets the ClusterStates field's value. -func (s *ListClustersInput) SetClusterStates(v []*string) *ListClustersInput { - s.ClusterStates = v - return s -} - -// SetCreatedAfter sets the CreatedAfter field's value. -func (s *ListClustersInput) SetCreatedAfter(v time.Time) *ListClustersInput { - s.CreatedAfter = &v - return s -} - -// SetCreatedBefore sets the CreatedBefore field's value. -func (s *ListClustersInput) SetCreatedBefore(v time.Time) *ListClustersInput { - s.CreatedBefore = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListClustersInput) SetMarker(v string) *ListClustersInput { - s.Marker = &v - return s -} - -// This contains a ClusterSummaryList with the cluster details; for example, -// the cluster IDs, names, and status. -type ListClustersOutput struct { - _ struct{} `type:"structure"` - - // The list of clusters for the account based on the given filters. - Clusters []*ClusterSummary `type:"list"` - - // The pagination token that indicates the next set of results to retrieve. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s ListClustersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListClustersOutput) GoString() string { - return s.String() -} - -// SetClusters sets the Clusters field's value. -func (s *ListClustersOutput) SetClusters(v []*ClusterSummary) *ListClustersOutput { - s.Clusters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListClustersOutput) SetMarker(v string) *ListClustersOutput { - s.Marker = &v - return s -} - -type ListInstanceFleetsInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the cluster. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` - - // The pagination token that indicates the next set of results to retrieve. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s ListInstanceFleetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInstanceFleetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInstanceFleetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInstanceFleetsInput"} - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterId sets the ClusterId field's value. -func (s *ListInstanceFleetsInput) SetClusterId(v string) *ListInstanceFleetsInput { - s.ClusterId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceFleetsInput) SetMarker(v string) *ListInstanceFleetsInput { - s.Marker = &v - return s -} - -type ListInstanceFleetsOutput struct { - _ struct{} `type:"structure"` - - // The list of instance fleets for the cluster and given filters. - InstanceFleets []*InstanceFleet `type:"list"` - - // The pagination token that indicates the next set of results to retrieve. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s ListInstanceFleetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInstanceFleetsOutput) GoString() string { - return s.String() -} - -// SetInstanceFleets sets the InstanceFleets field's value. -func (s *ListInstanceFleetsOutput) SetInstanceFleets(v []*InstanceFleet) *ListInstanceFleetsOutput { - s.InstanceFleets = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceFleetsOutput) SetMarker(v string) *ListInstanceFleetsOutput { - s.Marker = &v - return s -} - -// This input determines which instance groups to retrieve. -type ListInstanceGroupsInput struct { - _ struct{} `type:"structure"` - - // The identifier of the cluster for which to list the instance groups. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` - - // The pagination token that indicates the next set of results to retrieve. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s ListInstanceGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInstanceGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInstanceGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInstanceGroupsInput"} - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterId sets the ClusterId field's value. -func (s *ListInstanceGroupsInput) SetClusterId(v string) *ListInstanceGroupsInput { - s.ClusterId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceGroupsInput) SetMarker(v string) *ListInstanceGroupsInput { - s.Marker = &v - return s -} - -// This input determines which instance groups to retrieve. -type ListInstanceGroupsOutput struct { - _ struct{} `type:"structure"` - - // The list of instance groups for the cluster and given filters. - InstanceGroups []*InstanceGroup `type:"list"` - - // The pagination token that indicates the next set of results to retrieve. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s ListInstanceGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInstanceGroupsOutput) GoString() string { - return s.String() -} - -// SetInstanceGroups sets the InstanceGroups field's value. -func (s *ListInstanceGroupsOutput) SetInstanceGroups(v []*InstanceGroup) *ListInstanceGroupsOutput { - s.InstanceGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceGroupsOutput) SetMarker(v string) *ListInstanceGroupsOutput { - s.Marker = &v - return s -} - -// This input determines which instances to list. -type ListInstancesInput struct { - _ struct{} `type:"structure"` - - // The identifier of the cluster for which to list the instances. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` - - // The unique identifier of the instance fleet. - InstanceFleetId *string `type:"string"` - - // The node type of the instance fleet. For example MASTER, CORE, or TASK. - InstanceFleetType *string `type:"string" enum:"InstanceFleetType"` - - // The identifier of the instance group for which to list the instances. - InstanceGroupId *string `type:"string"` - - // The type of instance group for which to list the instances. - InstanceGroupTypes []*string `type:"list"` - - // A list of instance states that will filter the instances returned with this - // request. - InstanceStates []*string `type:"list"` - - // The pagination token that indicates the next set of results to retrieve. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s ListInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInstancesInput"} - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterId sets the ClusterId field's value. -func (s *ListInstancesInput) SetClusterId(v string) *ListInstancesInput { - s.ClusterId = &v - return s -} - -// SetInstanceFleetId sets the InstanceFleetId field's value. -func (s *ListInstancesInput) SetInstanceFleetId(v string) *ListInstancesInput { - s.InstanceFleetId = &v - return s -} - -// SetInstanceFleetType sets the InstanceFleetType field's value. -func (s *ListInstancesInput) SetInstanceFleetType(v string) *ListInstancesInput { - s.InstanceFleetType = &v - return s -} - -// SetInstanceGroupId sets the InstanceGroupId field's value. -func (s *ListInstancesInput) SetInstanceGroupId(v string) *ListInstancesInput { - s.InstanceGroupId = &v - return s -} - -// SetInstanceGroupTypes sets the InstanceGroupTypes field's value. -func (s *ListInstancesInput) SetInstanceGroupTypes(v []*string) *ListInstancesInput { - s.InstanceGroupTypes = v - return s -} - -// SetInstanceStates sets the InstanceStates field's value. -func (s *ListInstancesInput) SetInstanceStates(v []*string) *ListInstancesInput { - s.InstanceStates = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInstancesInput) SetMarker(v string) *ListInstancesInput { - s.Marker = &v - return s -} - -// This output contains the list of instances. -type ListInstancesOutput struct { - _ struct{} `type:"structure"` - - // The list of instances for the cluster and given filters. - Instances []*Instance `type:"list"` - - // The pagination token that indicates the next set of results to retrieve. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s ListInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInstancesOutput) GoString() string { - return s.String() -} - -// SetInstances sets the Instances field's value. -func (s *ListInstancesOutput) SetInstances(v []*Instance) *ListInstancesOutput { - s.Instances = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInstancesOutput) SetMarker(v string) *ListInstancesOutput { - s.Marker = &v - return s -} - -type ListSecurityConfigurationsInput struct { - _ struct{} `type:"structure"` - - // The pagination token that indicates the set of results to retrieve. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s ListSecurityConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSecurityConfigurationsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListSecurityConfigurationsInput) SetMarker(v string) *ListSecurityConfigurationsInput { - s.Marker = &v - return s -} - -type ListSecurityConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // A pagination token that indicates the next set of results to retrieve. Include - // the marker in the next ListSecurityConfiguration call to retrieve the next - // page of results, if required. - Marker *string `type:"string"` - - // The creation date and time, and name, of each security configuration. - SecurityConfigurations []*SecurityConfigurationSummary `type:"list"` -} - -// String returns the string representation -func (s ListSecurityConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSecurityConfigurationsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListSecurityConfigurationsOutput) SetMarker(v string) *ListSecurityConfigurationsOutput { - s.Marker = &v - return s -} - -// SetSecurityConfigurations sets the SecurityConfigurations field's value. -func (s *ListSecurityConfigurationsOutput) SetSecurityConfigurations(v []*SecurityConfigurationSummary) *ListSecurityConfigurationsOutput { - s.SecurityConfigurations = v - return s -} - -// This input determines which steps to list. -type ListStepsInput struct { - _ struct{} `type:"structure"` - - // The identifier of the cluster for which to list the steps. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` - - // The pagination token that indicates the next set of results to retrieve. - Marker *string `type:"string"` - - // The filter to limit the step list based on the identifier of the steps. - StepIds []*string `type:"list"` - - // The filter to limit the step list based on certain states. - StepStates []*string `type:"list"` -} - -// String returns the string representation -func (s ListStepsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStepsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListStepsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListStepsInput"} - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterId sets the ClusterId field's value. -func (s *ListStepsInput) SetClusterId(v string) *ListStepsInput { - s.ClusterId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListStepsInput) SetMarker(v string) *ListStepsInput { - s.Marker = &v - return s -} - -// SetStepIds sets the StepIds field's value. -func (s *ListStepsInput) SetStepIds(v []*string) *ListStepsInput { - s.StepIds = v - return s -} - -// SetStepStates sets the StepStates field's value. -func (s *ListStepsInput) SetStepStates(v []*string) *ListStepsInput { - s.StepStates = v - return s -} - -// This output contains the list of steps returned in reverse order. This means -// that the last step is the first element in the list. -type ListStepsOutput struct { - _ struct{} `type:"structure"` - - // The pagination token that indicates the next set of results to retrieve. - Marker *string `type:"string"` - - // The filtered list of steps for the cluster. - Steps []*StepSummary `type:"list"` -} - -// String returns the string representation -func (s ListStepsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStepsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListStepsOutput) SetMarker(v string) *ListStepsOutput { - s.Marker = &v - return s -} - -// SetSteps sets the Steps field's value. -func (s *ListStepsOutput) SetSteps(v []*StepSummary) *ListStepsOutput { - s.Steps = v - return s -} - -// A CloudWatch dimension, which is specified using a Key (known as a Name in -// CloudWatch), Value pair. By default, Amazon EMR uses one dimension whose -// Key is JobFlowID and Value is a variable representing the cluster ID, which -// is ${emr.clusterId}. This enables the rule to bootstrap when the cluster -// ID becomes available. -type MetricDimension struct { - _ struct{} `type:"structure"` - - // The dimension name. - Key *string `type:"string"` - - // The dimension value. - Value *string `type:"string"` -} - -// String returns the string representation -func (s MetricDimension) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricDimension) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *MetricDimension) SetKey(v string) *MetricDimension { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *MetricDimension) SetValue(v string) *MetricDimension { - s.Value = &v - return s -} - -type ModifyInstanceFleetInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the cluster. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` - - // The unique identifier of the instance fleet. - // - // InstanceFleet is a required field - InstanceFleet *InstanceFleetModifyConfig `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ModifyInstanceFleetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyInstanceFleetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyInstanceFleetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceFleetInput"} - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - if s.InstanceFleet == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceFleet")) - } - if s.InstanceFleet != nil { - if err := s.InstanceFleet.Validate(); err != nil { - invalidParams.AddNested("InstanceFleet", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterId sets the ClusterId field's value. -func (s *ModifyInstanceFleetInput) SetClusterId(v string) *ModifyInstanceFleetInput { - s.ClusterId = &v - return s -} - -// SetInstanceFleet sets the InstanceFleet field's value. -func (s *ModifyInstanceFleetInput) SetInstanceFleet(v *InstanceFleetModifyConfig) *ModifyInstanceFleetInput { - s.InstanceFleet = v - return s -} - -type ModifyInstanceFleetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyInstanceFleetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyInstanceFleetOutput) GoString() string { - return s.String() -} - -// Change the size of some instance groups. -type ModifyInstanceGroupsInput struct { - _ struct{} `type:"structure"` - - // The ID of the cluster to which the instance group belongs. - ClusterId *string `type:"string"` - - // Instance groups to change. - InstanceGroups []*InstanceGroupModifyConfig `type:"list"` -} - -// String returns the string representation -func (s ModifyInstanceGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyInstanceGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyInstanceGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceGroupsInput"} - if s.InstanceGroups != nil { - for i, v := range s.InstanceGroups { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InstanceGroups", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterId sets the ClusterId field's value. -func (s *ModifyInstanceGroupsInput) SetClusterId(v string) *ModifyInstanceGroupsInput { - s.ClusterId = &v - return s -} - -// SetInstanceGroups sets the InstanceGroups field's value. -func (s *ModifyInstanceGroupsInput) SetInstanceGroups(v []*InstanceGroupModifyConfig) *ModifyInstanceGroupsInput { - s.InstanceGroups = v - return s -} - -type ModifyInstanceGroupsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyInstanceGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyInstanceGroupsOutput) GoString() string { - return s.String() -} - -// The Amazon EC2 Availability Zone configuration of the cluster (job flow). -type PlacementType struct { - _ struct{} `type:"structure"` - - // The Amazon EC2 Availability Zone for the cluster. AvailabilityZone is used - // for uniform instance groups, while AvailabilityZones (plural) is used for - // instance fleets. - AvailabilityZone *string `type:"string"` - - // When multiple Availability Zones are specified, Amazon EMR evaluates them - // and launches instances in the optimal Availability Zone. AvailabilityZones - // is used for instance fleets, while AvailabilityZone (singular) is used for - // uniform instance groups. - // - // The instance fleet configuration is available only in Amazon EMR versions - // 4.8.0 and later, excluding 5.0.x versions. - AvailabilityZones []*string `type:"list"` -} - -// String returns the string representation -func (s PlacementType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlacementType) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *PlacementType) SetAvailabilityZone(v string) *PlacementType { - s.AvailabilityZone = &v - return s -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *PlacementType) SetAvailabilityZones(v []*string) *PlacementType { - s.AvailabilityZones = v - return s -} - -type PutAutoScalingPolicyInput struct { - _ struct{} `type:"structure"` - - // Specifies the definition of the automatic scaling policy. - // - // AutoScalingPolicy is a required field - AutoScalingPolicy *AutoScalingPolicy `type:"structure" required:"true"` - - // Specifies the ID of a cluster. The instance group to which the automatic - // scaling policy is applied is within this cluster. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` - - // Specifies the ID of the instance group to which the automatic scaling policy - // is applied. - // - // InstanceGroupId is a required field - InstanceGroupId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PutAutoScalingPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutAutoScalingPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutAutoScalingPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutAutoScalingPolicyInput"} - if s.AutoScalingPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("AutoScalingPolicy")) - } - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - if s.InstanceGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceGroupId")) - } - if s.AutoScalingPolicy != nil { - if err := s.AutoScalingPolicy.Validate(); err != nil { - invalidParams.AddNested("AutoScalingPolicy", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingPolicy sets the AutoScalingPolicy field's value. -func (s *PutAutoScalingPolicyInput) SetAutoScalingPolicy(v *AutoScalingPolicy) *PutAutoScalingPolicyInput { - s.AutoScalingPolicy = v - return s -} - -// SetClusterId sets the ClusterId field's value. -func (s *PutAutoScalingPolicyInput) SetClusterId(v string) *PutAutoScalingPolicyInput { - s.ClusterId = &v - return s -} - -// SetInstanceGroupId sets the InstanceGroupId field's value. -func (s *PutAutoScalingPolicyInput) SetInstanceGroupId(v string) *PutAutoScalingPolicyInput { - s.InstanceGroupId = &v - return s -} - -type PutAutoScalingPolicyOutput struct { - _ struct{} `type:"structure"` - - // The automatic scaling policy definition. - AutoScalingPolicy *AutoScalingPolicyDescription `type:"structure"` - - // Specifies the ID of a cluster. The instance group to which the automatic - // scaling policy is applied is within this cluster. - ClusterId *string `type:"string"` - - // Specifies the ID of the instance group to which the scaling policy is applied. - InstanceGroupId *string `type:"string"` -} - -// String returns the string representation -func (s PutAutoScalingPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutAutoScalingPolicyOutput) GoString() string { - return s.String() -} - -// SetAutoScalingPolicy sets the AutoScalingPolicy field's value. -func (s *PutAutoScalingPolicyOutput) SetAutoScalingPolicy(v *AutoScalingPolicyDescription) *PutAutoScalingPolicyOutput { - s.AutoScalingPolicy = v - return s -} - -// SetClusterId sets the ClusterId field's value. -func (s *PutAutoScalingPolicyOutput) SetClusterId(v string) *PutAutoScalingPolicyOutput { - s.ClusterId = &v - return s -} - -// SetInstanceGroupId sets the InstanceGroupId field's value. -func (s *PutAutoScalingPolicyOutput) SetInstanceGroupId(v string) *PutAutoScalingPolicyOutput { - s.InstanceGroupId = &v - return s -} - -type RemoveAutoScalingPolicyInput struct { - _ struct{} `type:"structure"` - - // Specifies the ID of a cluster. The instance group to which the automatic - // scaling policy is applied is within this cluster. - // - // ClusterId is a required field - ClusterId *string `type:"string" required:"true"` - - // Specifies the ID of the instance group to which the scaling policy is applied. - // - // InstanceGroupId is a required field - InstanceGroupId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RemoveAutoScalingPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveAutoScalingPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveAutoScalingPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveAutoScalingPolicyInput"} - if s.ClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterId")) - } - if s.InstanceGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceGroupId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterId sets the ClusterId field's value. -func (s *RemoveAutoScalingPolicyInput) SetClusterId(v string) *RemoveAutoScalingPolicyInput { - s.ClusterId = &v - return s -} - -// SetInstanceGroupId sets the InstanceGroupId field's value. -func (s *RemoveAutoScalingPolicyInput) SetInstanceGroupId(v string) *RemoveAutoScalingPolicyInput { - s.InstanceGroupId = &v - return s -} - -type RemoveAutoScalingPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveAutoScalingPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveAutoScalingPolicyOutput) GoString() string { - return s.String() -} - -// This input identifies a cluster and a list of tags to remove. -type RemoveTagsInput struct { - _ struct{} `type:"structure"` - - // The Amazon EMR resource identifier from which tags will be removed. This - // value must be a cluster identifier. - // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` - - // A list of tag keys to remove from a resource. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *RemoveTagsInput) SetResourceId(v string) *RemoveTagsInput { - s.ResourceId = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsInput) SetTagKeys(v []*string) *RemoveTagsInput { - s.TagKeys = v - return s -} - -// This output indicates the result of removing tags from a resource. -type RemoveTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsOutput) GoString() string { - return s.String() -} - -// Input to the RunJobFlow operation. -type RunJobFlowInput struct { - _ struct{} `type:"structure"` - - // A JSON string for selecting additional features. - AdditionalInfo *string `type:"string"` - - // Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases - // 4.0 and later, ReleaseLabel is used. To specify a custom AMI, use CustomAmiID. - AmiVersion *string `type:"string"` - - // Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of - // applications for Amazon EMR to install and configure when launching the cluster. - // For a list of applications available for each Amazon EMR release version, - // see the Amazon EMR Release Guide (http://docs.aws.amazon.com/emr/latest/ReleaseGuide/). - Applications []*Application `type:"list"` - - // An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. - // The IAM role provides permissions that the automatic scaling feature requires - // to launch and terminate EC2 instances in an instance group. - AutoScalingRole *string `type:"string"` - - // A list of bootstrap actions to run before Hadoop starts on the cluster nodes. - BootstrapActions []*BootstrapActionConfig `type:"list"` - - // For Amazon EMR releases 4.0 and later. The list of configurations supplied - // for the EMR cluster you are creating. - Configurations []*Configuration `type:"list"` - - // Available only in Amazon EMR version 5.7.0 and later. The ID of a custom - // Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when - // it launches cluster EC2 instances. For more information about custom AMIs - // in Amazon EMR, see Using a Custom AMI (http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html) - // in the Amazon EMR Management Guide. If omitted, the cluster uses the base - // Linux AMI for the ReleaseLabel specified. For Amazon EMR versions 2.x and - // 3.x, use AmiVersion instead. - // - // For information about creating a custom AMI, see Creating an Amazon EBS-Backed - // Linux AMI (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html) - // in the Amazon Elastic Compute Cloud User Guide for Linux Instances. For information - // about finding an AMI ID, see Finding a Linux AMI (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html). - CustomAmiId *string `type:"string"` - - // The size, in GiB, of the EBS root device volume of the Linux AMI that is - // used for each EC2 instance. Available in Amazon EMR version 4.x and later. - EbsRootVolumeSize *int64 `type:"integer"` - - // A specification of the number and type of Amazon EC2 instances. - // - // Instances is a required field - Instances *JobFlowInstancesConfig `type:"structure" required:"true"` - - // Also called instance profile and EC2 role. An IAM role for an EMR cluster. - // The EC2 instances of the cluster assume this role. The default role is EMR_EC2_DefaultRole. - // In order to use the default role, you must have already created it using - // the CLI or console. - JobFlowRole *string `type:"string"` - - // Attributes for Kerberos configuration when Kerberos authentication is enabled - // using a security configuration. For more information see Use Kerberos Authentication - // (http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html) - // in the EMR Management Guide. - KerberosAttributes *KerberosAttributes `type:"structure"` - - // The location in Amazon S3 to write the log files of the job flow. If a value - // is not provided, logs are not created. - LogUri *string `type:"string"` - - // The name of the job flow. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, - // use Applications. - // - // A list of strings that indicates third-party software to use with the job - // flow that accepts a user argument list. EMR accepts and forwards the argument - // list to the corresponding installation script as bootstrap action arguments. - // For more information, see "Launch a Job Flow on the MapR Distribution for - // Hadoop" in the Amazon EMR Developer Guide (http://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf). - // Supported values are: - // - // * "mapr-m3" - launch the cluster using MapR M3 Edition. - // - // * "mapr-m5" - launch the cluster using MapR M5 Edition. - // - // * "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - // - launch the job flow using MapR M3 or M5 Edition respectively. - // - // * "mapr-m7" - launch the cluster using MapR M7 Edition. - // - // * "hunk" - launch the cluster with the Hunk Big Data Analtics Platform. - // - // * "hue"- launch the cluster with Hue installed. - // - // * "spark" - launch the cluster with Apache Spark installed. - // - // * "ganglia" - launch the cluster with the Ganglia Monitoring System installed. - NewSupportedProducts []*SupportedProductConfig `type:"list"` - - // The Amazon EMR release label, which determines the version of open-source - // application packages installed on the cluster. Release labels are in the - // form emr-x.x.x, where x.x.x is an Amazon EMR release version, for example, - // emr-5.14.0. For more information about Amazon EMR release versions and included - // application versions and features, see http://docs.aws.amazon.com/emr/latest/ReleaseGuide/ - // (http://docs.aws.amazon.com/emr/latest/ReleaseGuide/). The release label - // applies only to Amazon EMR releases versions 4.x and later. Earlier versions - // use AmiVersion. - ReleaseLabel *string `type:"string"` - - // Applies only when CustomAmiID is used. Specifies which updates from the Amazon - // Linux AMI package repositories to apply automatically when the instance boots - // using the AMI. If omitted, the default is SECURITY, which indicates that - // only security updates are applied. If NONE is specified, no updates are applied, - // and all updates must be applied manually. - RepoUpgradeOnBoot *string `type:"string" enum:"RepoUpgradeOnBoot"` - - // Specifies the way that individual Amazon EC2 instances terminate when an - // automatic scale-in activity occurs or an instance group is resized. TERMINATE_AT_INSTANCE_HOUR - // indicates that Amazon EMR terminates nodes at the instance-hour boundary, - // regardless of when the request to terminate the instance was submitted. This - // option is only available with Amazon EMR 5.1.0 and later and is the default - // for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates - // that Amazon EMR blacklists and drains tasks from nodes before terminating - // the Amazon EC2 instances, regardless of the instance-hour boundary. With - // either behavior, Amazon EMR removes the least active nodes first and blocks - // instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION - // available only in Amazon EMR version 4.1.0 and later, and is the default - // for versions of Amazon EMR earlier than 5.1.0. - ScaleDownBehavior *string `type:"string" enum:"ScaleDownBehavior"` - - // The name of a security configuration to apply to the cluster. - SecurityConfiguration *string `type:"string"` - - // The IAM role that will be assumed by the Amazon EMR service to access AWS - // resources on your behalf. - ServiceRole *string `type:"string"` - - // A list of steps to run. - Steps []*StepConfig `type:"list"` - - // For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, - // use Applications. - // - // A list of strings that indicates third-party software to use. For more information, - // see the Amazon EMR Developer Guide (http://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf). - // Currently supported values are: - // - // * "mapr-m3" - launch the job flow using MapR M3 Edition. - // - // * "mapr-m5" - launch the job flow using MapR M5 Edition. - SupportedProducts []*string `type:"list"` - - // A list of tags to associate with a cluster and propagate to Amazon EC2 instances. - Tags []*Tag `type:"list"` - - // Whether the cluster is visible to all IAM users of the AWS account associated - // with the cluster. If this value is set to true, all IAM users of that AWS - // account can view and (if they have the proper policy permissions set) manage - // the cluster. If it is set to false, only the IAM user that created the cluster - // can view and manage it. - VisibleToAllUsers *bool `type:"boolean"` -} - -// String returns the string representation -func (s RunJobFlowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RunJobFlowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RunJobFlowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RunJobFlowInput"} - if s.Instances == nil { - invalidParams.Add(request.NewErrParamRequired("Instances")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.BootstrapActions != nil { - for i, v := range s.BootstrapActions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "BootstrapActions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Instances != nil { - if err := s.Instances.Validate(); err != nil { - invalidParams.AddNested("Instances", err.(request.ErrInvalidParams)) - } - } - if s.KerberosAttributes != nil { - if err := s.KerberosAttributes.Validate(); err != nil { - invalidParams.AddNested("KerberosAttributes", err.(request.ErrInvalidParams)) - } - } - if s.Steps != nil { - for i, v := range s.Steps { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Steps", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdditionalInfo sets the AdditionalInfo field's value. -func (s *RunJobFlowInput) SetAdditionalInfo(v string) *RunJobFlowInput { - s.AdditionalInfo = &v - return s -} - -// SetAmiVersion sets the AmiVersion field's value. -func (s *RunJobFlowInput) SetAmiVersion(v string) *RunJobFlowInput { - s.AmiVersion = &v - return s -} - -// SetApplications sets the Applications field's value. -func (s *RunJobFlowInput) SetApplications(v []*Application) *RunJobFlowInput { - s.Applications = v - return s -} - -// SetAutoScalingRole sets the AutoScalingRole field's value. -func (s *RunJobFlowInput) SetAutoScalingRole(v string) *RunJobFlowInput { - s.AutoScalingRole = &v - return s -} - -// SetBootstrapActions sets the BootstrapActions field's value. -func (s *RunJobFlowInput) SetBootstrapActions(v []*BootstrapActionConfig) *RunJobFlowInput { - s.BootstrapActions = v - return s -} - -// SetConfigurations sets the Configurations field's value. -func (s *RunJobFlowInput) SetConfigurations(v []*Configuration) *RunJobFlowInput { - s.Configurations = v - return s -} - -// SetCustomAmiId sets the CustomAmiId field's value. -func (s *RunJobFlowInput) SetCustomAmiId(v string) *RunJobFlowInput { - s.CustomAmiId = &v - return s -} - -// SetEbsRootVolumeSize sets the EbsRootVolumeSize field's value. -func (s *RunJobFlowInput) SetEbsRootVolumeSize(v int64) *RunJobFlowInput { - s.EbsRootVolumeSize = &v - return s -} - -// SetInstances sets the Instances field's value. -func (s *RunJobFlowInput) SetInstances(v *JobFlowInstancesConfig) *RunJobFlowInput { - s.Instances = v - return s -} - -// SetJobFlowRole sets the JobFlowRole field's value. -func (s *RunJobFlowInput) SetJobFlowRole(v string) *RunJobFlowInput { - s.JobFlowRole = &v - return s -} - -// SetKerberosAttributes sets the KerberosAttributes field's value. -func (s *RunJobFlowInput) SetKerberosAttributes(v *KerberosAttributes) *RunJobFlowInput { - s.KerberosAttributes = v - return s -} - -// SetLogUri sets the LogUri field's value. -func (s *RunJobFlowInput) SetLogUri(v string) *RunJobFlowInput { - s.LogUri = &v - return s -} - -// SetName sets the Name field's value. -func (s *RunJobFlowInput) SetName(v string) *RunJobFlowInput { - s.Name = &v - return s -} - -// SetNewSupportedProducts sets the NewSupportedProducts field's value. -func (s *RunJobFlowInput) SetNewSupportedProducts(v []*SupportedProductConfig) *RunJobFlowInput { - s.NewSupportedProducts = v - return s -} - -// SetReleaseLabel sets the ReleaseLabel field's value. -func (s *RunJobFlowInput) SetReleaseLabel(v string) *RunJobFlowInput { - s.ReleaseLabel = &v - return s -} - -// SetRepoUpgradeOnBoot sets the RepoUpgradeOnBoot field's value. -func (s *RunJobFlowInput) SetRepoUpgradeOnBoot(v string) *RunJobFlowInput { - s.RepoUpgradeOnBoot = &v - return s -} - -// SetScaleDownBehavior sets the ScaleDownBehavior field's value. -func (s *RunJobFlowInput) SetScaleDownBehavior(v string) *RunJobFlowInput { - s.ScaleDownBehavior = &v - return s -} - -// SetSecurityConfiguration sets the SecurityConfiguration field's value. -func (s *RunJobFlowInput) SetSecurityConfiguration(v string) *RunJobFlowInput { - s.SecurityConfiguration = &v - return s -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *RunJobFlowInput) SetServiceRole(v string) *RunJobFlowInput { - s.ServiceRole = &v - return s -} - -// SetSteps sets the Steps field's value. -func (s *RunJobFlowInput) SetSteps(v []*StepConfig) *RunJobFlowInput { - s.Steps = v - return s -} - -// SetSupportedProducts sets the SupportedProducts field's value. -func (s *RunJobFlowInput) SetSupportedProducts(v []*string) *RunJobFlowInput { - s.SupportedProducts = v - return s -} - -// SetTags sets the Tags field's value. -func (s *RunJobFlowInput) SetTags(v []*Tag) *RunJobFlowInput { - s.Tags = v - return s -} - -// SetVisibleToAllUsers sets the VisibleToAllUsers field's value. -func (s *RunJobFlowInput) SetVisibleToAllUsers(v bool) *RunJobFlowInput { - s.VisibleToAllUsers = &v - return s -} - -// The result of the RunJobFlow operation. -type RunJobFlowOutput struct { - _ struct{} `type:"structure"` - - // An unique identifier for the job flow. - JobFlowId *string `type:"string"` -} - -// String returns the string representation -func (s RunJobFlowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RunJobFlowOutput) GoString() string { - return s.String() -} - -// SetJobFlowId sets the JobFlowId field's value. -func (s *RunJobFlowOutput) SetJobFlowId(v string) *RunJobFlowOutput { - s.JobFlowId = &v - return s -} - -// The type of adjustment the automatic scaling activity makes when triggered, -// and the periodicity of the adjustment. -type ScalingAction struct { - _ struct{} `type:"structure"` - - // Not available for instance groups. Instance groups use the market type specified - // for the group. - Market *string `type:"string" enum:"MarketType"` - - // The type of adjustment the automatic scaling activity makes when triggered, - // and the periodicity of the adjustment. - // - // SimpleScalingPolicyConfiguration is a required field - SimpleScalingPolicyConfiguration *SimpleScalingPolicyConfiguration `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ScalingAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalingAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScalingAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScalingAction"} - if s.SimpleScalingPolicyConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("SimpleScalingPolicyConfiguration")) - } - if s.SimpleScalingPolicyConfiguration != nil { - if err := s.SimpleScalingPolicyConfiguration.Validate(); err != nil { - invalidParams.AddNested("SimpleScalingPolicyConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarket sets the Market field's value. -func (s *ScalingAction) SetMarket(v string) *ScalingAction { - s.Market = &v - return s -} - -// SetSimpleScalingPolicyConfiguration sets the SimpleScalingPolicyConfiguration field's value. -func (s *ScalingAction) SetSimpleScalingPolicyConfiguration(v *SimpleScalingPolicyConfiguration) *ScalingAction { - s.SimpleScalingPolicyConfiguration = v - return s -} - -// The upper and lower EC2 instance limits for an automatic scaling policy. -// Automatic scaling activities triggered by automatic scaling rules will not -// cause an instance group to grow above or below these limits. -type ScalingConstraints struct { - _ struct{} `type:"structure"` - - // The upper boundary of EC2 instances in an instance group beyond which scaling - // activities are not allowed to grow. Scale-out activities will not add instances - // beyond this boundary. - // - // MaxCapacity is a required field - MaxCapacity *int64 `type:"integer" required:"true"` - - // The lower boundary of EC2 instances in an instance group below which scaling - // activities are not allowed to shrink. Scale-in activities will not terminate - // instances below this boundary. - // - // MinCapacity is a required field - MinCapacity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s ScalingConstraints) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalingConstraints) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScalingConstraints) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScalingConstraints"} - if s.MaxCapacity == nil { - invalidParams.Add(request.NewErrParamRequired("MaxCapacity")) - } - if s.MinCapacity == nil { - invalidParams.Add(request.NewErrParamRequired("MinCapacity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxCapacity sets the MaxCapacity field's value. -func (s *ScalingConstraints) SetMaxCapacity(v int64) *ScalingConstraints { - s.MaxCapacity = &v - return s -} - -// SetMinCapacity sets the MinCapacity field's value. -func (s *ScalingConstraints) SetMinCapacity(v int64) *ScalingConstraints { - s.MinCapacity = &v - return s -} - -// A scale-in or scale-out rule that defines scaling activity, including the -// CloudWatch metric alarm that triggers activity, how EC2 instances are added -// or removed, and the periodicity of adjustments. The automatic scaling policy -// for an instance group can comprise one or more automatic scaling rules. -type ScalingRule struct { - _ struct{} `type:"structure"` - - // The conditions that trigger an automatic scaling activity. - // - // Action is a required field - Action *ScalingAction `type:"structure" required:"true"` - - // A friendly, more verbose description of the automatic scaling rule. - Description *string `type:"string"` - - // The name used to identify an automatic scaling rule. Rule names must be unique - // within a scaling policy. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The CloudWatch alarm definition that determines when automatic scaling activity - // is triggered. - // - // Trigger is a required field - Trigger *ScalingTrigger `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ScalingRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalingRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScalingRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScalingRule"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Trigger == nil { - invalidParams.Add(request.NewErrParamRequired("Trigger")) - } - if s.Action != nil { - if err := s.Action.Validate(); err != nil { - invalidParams.AddNested("Action", err.(request.ErrInvalidParams)) - } - } - if s.Trigger != nil { - if err := s.Trigger.Validate(); err != nil { - invalidParams.AddNested("Trigger", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *ScalingRule) SetAction(v *ScalingAction) *ScalingRule { - s.Action = v - return s -} - -// SetDescription sets the Description field's value. -func (s *ScalingRule) SetDescription(v string) *ScalingRule { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *ScalingRule) SetName(v string) *ScalingRule { - s.Name = &v - return s -} - -// SetTrigger sets the Trigger field's value. -func (s *ScalingRule) SetTrigger(v *ScalingTrigger) *ScalingRule { - s.Trigger = v - return s -} - -// The conditions that trigger an automatic scaling activity. -type ScalingTrigger struct { - _ struct{} `type:"structure"` - - // The definition of a CloudWatch metric alarm. When the defined alarm conditions - // are met along with other trigger parameters, scaling activity begins. - // - // CloudWatchAlarmDefinition is a required field - CloudWatchAlarmDefinition *CloudWatchAlarmDefinition `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ScalingTrigger) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalingTrigger) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScalingTrigger) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScalingTrigger"} - if s.CloudWatchAlarmDefinition == nil { - invalidParams.Add(request.NewErrParamRequired("CloudWatchAlarmDefinition")) - } - if s.CloudWatchAlarmDefinition != nil { - if err := s.CloudWatchAlarmDefinition.Validate(); err != nil { - invalidParams.AddNested("CloudWatchAlarmDefinition", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchAlarmDefinition sets the CloudWatchAlarmDefinition field's value. -func (s *ScalingTrigger) SetCloudWatchAlarmDefinition(v *CloudWatchAlarmDefinition) *ScalingTrigger { - s.CloudWatchAlarmDefinition = v - return s -} - -// Configuration of the script to run during a bootstrap action. -type ScriptBootstrapActionConfig struct { - _ struct{} `type:"structure"` - - // A list of command line arguments to pass to the bootstrap action script. - Args []*string `type:"list"` - - // Location of the script to run during a bootstrap action. Can be either a - // location in Amazon S3 or on a local file system. - // - // Path is a required field - Path *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ScriptBootstrapActionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScriptBootstrapActionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScriptBootstrapActionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScriptBootstrapActionConfig"} - if s.Path == nil { - invalidParams.Add(request.NewErrParamRequired("Path")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArgs sets the Args field's value. -func (s *ScriptBootstrapActionConfig) SetArgs(v []*string) *ScriptBootstrapActionConfig { - s.Args = v - return s -} - -// SetPath sets the Path field's value. -func (s *ScriptBootstrapActionConfig) SetPath(v string) *ScriptBootstrapActionConfig { - s.Path = &v - return s -} - -// The creation date and time, and name, of a security configuration. -type SecurityConfigurationSummary struct { - _ struct{} `type:"structure"` - - // The date and time the security configuration was created. - CreationDateTime *time.Time `type:"timestamp"` - - // The name of the security configuration. - Name *string `type:"string"` -} - -// String returns the string representation -func (s SecurityConfigurationSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecurityConfigurationSummary) GoString() string { - return s.String() -} - -// SetCreationDateTime sets the CreationDateTime field's value. -func (s *SecurityConfigurationSummary) SetCreationDateTime(v time.Time) *SecurityConfigurationSummary { - s.CreationDateTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *SecurityConfigurationSummary) SetName(v string) *SecurityConfigurationSummary { - s.Name = &v - return s -} - -// The input argument to the TerminationProtection operation. -type SetTerminationProtectionInput struct { - _ struct{} `type:"structure"` - - // A list of strings that uniquely identify the clusters to protect. This identifier - // is returned by RunJobFlow and can also be obtained from DescribeJobFlows - // . - // - // JobFlowIds is a required field - JobFlowIds []*string `type:"list" required:"true"` - - // A Boolean that indicates whether to protect the cluster and prevent the Amazon - // EC2 instances in the cluster from shutting down due to API calls, user intervention, - // or job-flow error. - // - // TerminationProtected is a required field - TerminationProtected *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s SetTerminationProtectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetTerminationProtectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetTerminationProtectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetTerminationProtectionInput"} - if s.JobFlowIds == nil { - invalidParams.Add(request.NewErrParamRequired("JobFlowIds")) - } - if s.TerminationProtected == nil { - invalidParams.Add(request.NewErrParamRequired("TerminationProtected")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobFlowIds sets the JobFlowIds field's value. -func (s *SetTerminationProtectionInput) SetJobFlowIds(v []*string) *SetTerminationProtectionInput { - s.JobFlowIds = v - return s -} - -// SetTerminationProtected sets the TerminationProtected field's value. -func (s *SetTerminationProtectionInput) SetTerminationProtected(v bool) *SetTerminationProtectionInput { - s.TerminationProtected = &v - return s -} - -type SetTerminationProtectionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetTerminationProtectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetTerminationProtectionOutput) GoString() string { - return s.String() -} - -// The input to the SetVisibleToAllUsers action. -type SetVisibleToAllUsersInput struct { - _ struct{} `type:"structure"` - - // Identifiers of the job flows to receive the new visibility setting. - // - // JobFlowIds is a required field - JobFlowIds []*string `type:"list" required:"true"` - - // Whether the specified clusters are visible to all IAM users of the AWS account - // associated with the cluster. If this value is set to True, all IAM users - // of that AWS account can view and, if they have the proper IAM policy permissions - // set, manage the clusters. If it is set to False, only the IAM user that created - // a cluster can view and manage it. - // - // VisibleToAllUsers is a required field - VisibleToAllUsers *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s SetVisibleToAllUsersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetVisibleToAllUsersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetVisibleToAllUsersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetVisibleToAllUsersInput"} - if s.JobFlowIds == nil { - invalidParams.Add(request.NewErrParamRequired("JobFlowIds")) - } - if s.VisibleToAllUsers == nil { - invalidParams.Add(request.NewErrParamRequired("VisibleToAllUsers")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobFlowIds sets the JobFlowIds field's value. -func (s *SetVisibleToAllUsersInput) SetJobFlowIds(v []*string) *SetVisibleToAllUsersInput { - s.JobFlowIds = v - return s -} - -// SetVisibleToAllUsers sets the VisibleToAllUsers field's value. -func (s *SetVisibleToAllUsersInput) SetVisibleToAllUsers(v bool) *SetVisibleToAllUsersInput { - s.VisibleToAllUsers = &v - return s -} - -type SetVisibleToAllUsersOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetVisibleToAllUsersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetVisibleToAllUsersOutput) GoString() string { - return s.String() -} - -// Policy for customizing shrink operations. Allows configuration of decommissioning -// timeout and targeted instance shrinking. -type ShrinkPolicy struct { - _ struct{} `type:"structure"` - - // The desired timeout for decommissioning an instance. Overrides the default - // YARN decommissioning timeout. - DecommissionTimeout *int64 `type:"integer"` - - // Custom policy for requesting termination protection or termination of specific - // instances when shrinking an instance group. - InstanceResizePolicy *InstanceResizePolicy `type:"structure"` -} - -// String returns the string representation -func (s ShrinkPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ShrinkPolicy) GoString() string { - return s.String() -} - -// SetDecommissionTimeout sets the DecommissionTimeout field's value. -func (s *ShrinkPolicy) SetDecommissionTimeout(v int64) *ShrinkPolicy { - s.DecommissionTimeout = &v - return s -} - -// SetInstanceResizePolicy sets the InstanceResizePolicy field's value. -func (s *ShrinkPolicy) SetInstanceResizePolicy(v *InstanceResizePolicy) *ShrinkPolicy { - s.InstanceResizePolicy = v - return s -} - -// An automatic scaling configuration, which describes how the policy adds or -// removes instances, the cooldown period, and the number of EC2 instances that -// will be added each time the CloudWatch metric alarm condition is satisfied. -type SimpleScalingPolicyConfiguration struct { - _ struct{} `type:"structure"` - - // The way in which EC2 instances are added (if ScalingAdjustment is a positive - // number) or terminated (if ScalingAdjustment is a negative number) each time - // the scaling activity is triggered. CHANGE_IN_CAPACITY is the default. CHANGE_IN_CAPACITY - // indicates that the EC2 instance count increments or decrements by ScalingAdjustment, - // which should be expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates - // the instance count increments or decrements by the percentage specified by - // ScalingAdjustment, which should be expressed as an integer. For example, - // 20 indicates an increase in 20% increments of cluster capacity. EXACT_CAPACITY - // indicates the scaling activity results in an instance group with the number - // of EC2 instances specified by ScalingAdjustment, which should be expressed - // as a positive integer. - AdjustmentType *string `type:"string" enum:"AdjustmentType"` - - // The amount of time, in seconds, after a scaling activity completes before - // any further trigger-related scaling activities can start. The default value - // is 0. - CoolDown *int64 `type:"integer"` - - // The amount by which to scale in or scale out, based on the specified AdjustmentType. - // A positive value adds to the instance group's EC2 instance count while a - // negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY, - // the number should only be a positive integer. If AdjustmentType is set to - // PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an - // integer. For example, -20 indicates a decrease in 20% increments of cluster - // capacity. - // - // ScalingAdjustment is a required field - ScalingAdjustment *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s SimpleScalingPolicyConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SimpleScalingPolicyConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SimpleScalingPolicyConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SimpleScalingPolicyConfiguration"} - if s.ScalingAdjustment == nil { - invalidParams.Add(request.NewErrParamRequired("ScalingAdjustment")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdjustmentType sets the AdjustmentType field's value. -func (s *SimpleScalingPolicyConfiguration) SetAdjustmentType(v string) *SimpleScalingPolicyConfiguration { - s.AdjustmentType = &v - return s -} - -// SetCoolDown sets the CoolDown field's value. -func (s *SimpleScalingPolicyConfiguration) SetCoolDown(v int64) *SimpleScalingPolicyConfiguration { - s.CoolDown = &v - return s -} - -// SetScalingAdjustment sets the ScalingAdjustment field's value. -func (s *SimpleScalingPolicyConfiguration) SetScalingAdjustment(v int64) *SimpleScalingPolicyConfiguration { - s.ScalingAdjustment = &v - return s -} - -// The launch specification for Spot instances in the instance fleet, which -// determines the defined duration and provisioning timeout behavior. -// -// The instance fleet configuration is available only in Amazon EMR versions -// 4.8.0 and later, excluding 5.0.x versions. -type SpotProvisioningSpecification struct { - _ struct{} `type:"structure"` - - // The defined duration for Spot instances (also known as Spot blocks) in minutes. - // When specified, the Spot instance does not terminate before the defined duration - // expires, and defined duration pricing for Spot instances applies. Valid values - // are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as - // a Spot instance receives its instance ID. At the end of the duration, Amazon - // EC2 marks the Spot instance for termination and provides a Spot instance - // termination notice, which gives the instance a two-minute warning before - // it terminates. - BlockDurationMinutes *int64 `type:"integer"` - - // The action to take when TargetSpotCapacity has not been fulfilled when the - // TimeoutDurationMinutes has expired; that is, when all Spot instances could - // not be provisioned within the Spot provisioning timeout. Valid values are - // TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies - // that if no Spot instances are available, On-Demand Instances should be provisioned - // to fulfill any remaining Spot capacity. - // - // TimeoutAction is a required field - TimeoutAction *string `type:"string" required:"true" enum:"SpotProvisioningTimeoutAction"` - - // The spot provisioning timeout period in minutes. If Spot instances are not - // provisioned within this time period, the TimeOutAction is taken. Minimum - // value is 5 and maximum value is 1440. The timeout applies only during initial - // provisioning, when the cluster is first created. - // - // TimeoutDurationMinutes is a required field - TimeoutDurationMinutes *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s SpotProvisioningSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpotProvisioningSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SpotProvisioningSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SpotProvisioningSpecification"} - if s.TimeoutAction == nil { - invalidParams.Add(request.NewErrParamRequired("TimeoutAction")) - } - if s.TimeoutDurationMinutes == nil { - invalidParams.Add(request.NewErrParamRequired("TimeoutDurationMinutes")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. -func (s *SpotProvisioningSpecification) SetBlockDurationMinutes(v int64) *SpotProvisioningSpecification { - s.BlockDurationMinutes = &v - return s -} - -// SetTimeoutAction sets the TimeoutAction field's value. -func (s *SpotProvisioningSpecification) SetTimeoutAction(v string) *SpotProvisioningSpecification { - s.TimeoutAction = &v - return s -} - -// SetTimeoutDurationMinutes sets the TimeoutDurationMinutes field's value. -func (s *SpotProvisioningSpecification) SetTimeoutDurationMinutes(v int64) *SpotProvisioningSpecification { - s.TimeoutDurationMinutes = &v - return s -} - -// This represents a step in a cluster. -type Step struct { - _ struct{} `type:"structure"` - - // The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, - // CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward - // compatibility. We recommend using TERMINATE_CLUSTER instead. - ActionOnFailure *string `type:"string" enum:"ActionOnFailure"` - - // The Hadoop job configuration of the cluster step. - Config *HadoopStepConfig `type:"structure"` - - // The identifier of the cluster step. - Id *string `type:"string"` - - // The name of the cluster step. - Name *string `type:"string"` - - // The current execution status details of the cluster step. - Status *StepStatus `type:"structure"` -} - -// String returns the string representation -func (s Step) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Step) GoString() string { - return s.String() -} - -// SetActionOnFailure sets the ActionOnFailure field's value. -func (s *Step) SetActionOnFailure(v string) *Step { - s.ActionOnFailure = &v - return s -} - -// SetConfig sets the Config field's value. -func (s *Step) SetConfig(v *HadoopStepConfig) *Step { - s.Config = v - return s -} - -// SetId sets the Id field's value. -func (s *Step) SetId(v string) *Step { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *Step) SetName(v string) *Step { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Step) SetStatus(v *StepStatus) *Step { - s.Status = v - return s -} - -// Specification of a cluster (job flow) step. -type StepConfig struct { - _ struct{} `type:"structure"` - - // The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, - // CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward - // compatibility. We recommend using TERMINATE_CLUSTER instead. - ActionOnFailure *string `type:"string" enum:"ActionOnFailure"` - - // The JAR file used for the step. - // - // HadoopJarStep is a required field - HadoopJarStep *HadoopJarStepConfig `type:"structure" required:"true"` - - // The name of the step. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StepConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StepConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StepConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StepConfig"} - if s.HadoopJarStep == nil { - invalidParams.Add(request.NewErrParamRequired("HadoopJarStep")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.HadoopJarStep != nil { - if err := s.HadoopJarStep.Validate(); err != nil { - invalidParams.AddNested("HadoopJarStep", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionOnFailure sets the ActionOnFailure field's value. -func (s *StepConfig) SetActionOnFailure(v string) *StepConfig { - s.ActionOnFailure = &v - return s -} - -// SetHadoopJarStep sets the HadoopJarStep field's value. -func (s *StepConfig) SetHadoopJarStep(v *HadoopJarStepConfig) *StepConfig { - s.HadoopJarStep = v - return s -} - -// SetName sets the Name field's value. -func (s *StepConfig) SetName(v string) *StepConfig { - s.Name = &v - return s -} - -// Combines the execution state and configuration of a step. -type StepDetail struct { - _ struct{} `type:"structure"` - - // The description of the step status. - // - // ExecutionStatusDetail is a required field - ExecutionStatusDetail *StepExecutionStatusDetail `type:"structure" required:"true"` - - // The step configuration. - // - // StepConfig is a required field - StepConfig *StepConfig `type:"structure" required:"true"` -} - -// String returns the string representation -func (s StepDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StepDetail) GoString() string { - return s.String() -} - -// SetExecutionStatusDetail sets the ExecutionStatusDetail field's value. -func (s *StepDetail) SetExecutionStatusDetail(v *StepExecutionStatusDetail) *StepDetail { - s.ExecutionStatusDetail = v - return s -} - -// SetStepConfig sets the StepConfig field's value. -func (s *StepDetail) SetStepConfig(v *StepConfig) *StepDetail { - s.StepConfig = v - return s -} - -// The execution state of a step. -type StepExecutionStatusDetail struct { - _ struct{} `type:"structure"` - - // The creation date and time of the step. - // - // CreationDateTime is a required field - CreationDateTime *time.Time `type:"timestamp" required:"true"` - - // The completion date and time of the step. - EndDateTime *time.Time `type:"timestamp"` - - // A description of the step's current state. - LastStateChangeReason *string `type:"string"` - - // The start date and time of the step. - StartDateTime *time.Time `type:"timestamp"` - - // The state of the step. - // - // State is a required field - State *string `type:"string" required:"true" enum:"StepExecutionState"` -} - -// String returns the string representation -func (s StepExecutionStatusDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StepExecutionStatusDetail) GoString() string { - return s.String() -} - -// SetCreationDateTime sets the CreationDateTime field's value. -func (s *StepExecutionStatusDetail) SetCreationDateTime(v time.Time) *StepExecutionStatusDetail { - s.CreationDateTime = &v - return s -} - -// SetEndDateTime sets the EndDateTime field's value. -func (s *StepExecutionStatusDetail) SetEndDateTime(v time.Time) *StepExecutionStatusDetail { - s.EndDateTime = &v - return s -} - -// SetLastStateChangeReason sets the LastStateChangeReason field's value. -func (s *StepExecutionStatusDetail) SetLastStateChangeReason(v string) *StepExecutionStatusDetail { - s.LastStateChangeReason = &v - return s -} - -// SetStartDateTime sets the StartDateTime field's value. -func (s *StepExecutionStatusDetail) SetStartDateTime(v time.Time) *StepExecutionStatusDetail { - s.StartDateTime = &v - return s -} - -// SetState sets the State field's value. -func (s *StepExecutionStatusDetail) SetState(v string) *StepExecutionStatusDetail { - s.State = &v - return s -} - -// The details of the step state change reason. -type StepStateChangeReason struct { - _ struct{} `type:"structure"` - - // The programmable code for the state change reason. Note: Currently, the service - // provides no code for the state change. - Code *string `type:"string" enum:"StepStateChangeReasonCode"` - - // The descriptive message for the state change reason. - Message *string `type:"string"` -} - -// String returns the string representation -func (s StepStateChangeReason) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StepStateChangeReason) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *StepStateChangeReason) SetCode(v string) *StepStateChangeReason { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *StepStateChangeReason) SetMessage(v string) *StepStateChangeReason { - s.Message = &v - return s -} - -// The execution status details of the cluster step. -type StepStatus struct { - _ struct{} `type:"structure"` - - // The details for the step failure including reason, message, and log file - // path where the root cause was identified. - FailureDetails *FailureDetails `type:"structure"` - - // The execution state of the cluster step. - State *string `type:"string" enum:"StepState"` - - // The reason for the step execution status change. - StateChangeReason *StepStateChangeReason `type:"structure"` - - // The timeline of the cluster step status over time. - Timeline *StepTimeline `type:"structure"` -} - -// String returns the string representation -func (s StepStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StepStatus) GoString() string { - return s.String() -} - -// SetFailureDetails sets the FailureDetails field's value. -func (s *StepStatus) SetFailureDetails(v *FailureDetails) *StepStatus { - s.FailureDetails = v - return s -} - -// SetState sets the State field's value. -func (s *StepStatus) SetState(v string) *StepStatus { - s.State = &v - return s -} - -// SetStateChangeReason sets the StateChangeReason field's value. -func (s *StepStatus) SetStateChangeReason(v *StepStateChangeReason) *StepStatus { - s.StateChangeReason = v - return s -} - -// SetTimeline sets the Timeline field's value. -func (s *StepStatus) SetTimeline(v *StepTimeline) *StepStatus { - s.Timeline = v - return s -} - -// The summary of the cluster step. -type StepSummary struct { - _ struct{} `type:"structure"` - - // The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, - // CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is available for backward - // compatibility. We recommend using TERMINATE_CLUSTER instead. - ActionOnFailure *string `type:"string" enum:"ActionOnFailure"` - - // The Hadoop job configuration of the cluster step. - Config *HadoopStepConfig `type:"structure"` - - // The identifier of the cluster step. - Id *string `type:"string"` - - // The name of the cluster step. - Name *string `type:"string"` - - // The current execution status details of the cluster step. - Status *StepStatus `type:"structure"` -} - -// String returns the string representation -func (s StepSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StepSummary) GoString() string { - return s.String() -} - -// SetActionOnFailure sets the ActionOnFailure field's value. -func (s *StepSummary) SetActionOnFailure(v string) *StepSummary { - s.ActionOnFailure = &v - return s -} - -// SetConfig sets the Config field's value. -func (s *StepSummary) SetConfig(v *HadoopStepConfig) *StepSummary { - s.Config = v - return s -} - -// SetId sets the Id field's value. -func (s *StepSummary) SetId(v string) *StepSummary { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *StepSummary) SetName(v string) *StepSummary { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StepSummary) SetStatus(v *StepStatus) *StepSummary { - s.Status = v - return s -} - -// The timeline of the cluster step lifecycle. -type StepTimeline struct { - _ struct{} `type:"structure"` - - // The date and time when the cluster step was created. - CreationDateTime *time.Time `type:"timestamp"` - - // The date and time when the cluster step execution completed or failed. - EndDateTime *time.Time `type:"timestamp"` - - // The date and time when the cluster step execution started. - StartDateTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s StepTimeline) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StepTimeline) GoString() string { - return s.String() -} - -// SetCreationDateTime sets the CreationDateTime field's value. -func (s *StepTimeline) SetCreationDateTime(v time.Time) *StepTimeline { - s.CreationDateTime = &v - return s -} - -// SetEndDateTime sets the EndDateTime field's value. -func (s *StepTimeline) SetEndDateTime(v time.Time) *StepTimeline { - s.EndDateTime = &v - return s -} - -// SetStartDateTime sets the StartDateTime field's value. -func (s *StepTimeline) SetStartDateTime(v time.Time) *StepTimeline { - s.StartDateTime = &v - return s -} - -// The list of supported product configurations which allow user-supplied arguments. -// EMR accepts these arguments and forwards them to the corresponding installation -// script as bootstrap action arguments. -type SupportedProductConfig struct { - _ struct{} `type:"structure"` - - // The list of user-supplied arguments. - Args []*string `type:"list"` - - // The name of the product configuration. - Name *string `type:"string"` -} - -// String returns the string representation -func (s SupportedProductConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SupportedProductConfig) GoString() string { - return s.String() -} - -// SetArgs sets the Args field's value. -func (s *SupportedProductConfig) SetArgs(v []*string) *SupportedProductConfig { - s.Args = v - return s -} - -// SetName sets the Name field's value. -func (s *SupportedProductConfig) SetName(v string) *SupportedProductConfig { - s.Name = &v - return s -} - -// A key/value pair containing user-defined metadata that you can associate -// with an Amazon EMR resource. Tags make it easier to associate clusters in -// various ways, such as grouping clusters to track your Amazon EMR resource -// allocation costs. For more information, see Tag Clusters (http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html). -type Tag struct { - _ struct{} `type:"structure"` - - // A user-defined key, which is the minimum required information for a valid - // tag. For more information, see Tag (http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html). - Key *string `type:"string"` - - // A user-defined value, which is optional in a tag. For more information, see - // Tag Clusters (http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html). - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Input to the TerminateJobFlows operation. -type TerminateJobFlowsInput struct { - _ struct{} `type:"structure"` - - // A list of job flows to be shutdown. - // - // JobFlowIds is a required field - JobFlowIds []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s TerminateJobFlowsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateJobFlowsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TerminateJobFlowsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TerminateJobFlowsInput"} - if s.JobFlowIds == nil { - invalidParams.Add(request.NewErrParamRequired("JobFlowIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobFlowIds sets the JobFlowIds field's value. -func (s *TerminateJobFlowsInput) SetJobFlowIds(v []*string) *TerminateJobFlowsInput { - s.JobFlowIds = v - return s -} - -type TerminateJobFlowsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TerminateJobFlowsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateJobFlowsOutput) GoString() string { - return s.String() -} - -// EBS volume specifications such as volume type, IOPS, and size (GiB) that -// will be requested for the EBS volume attached to an EC2 instance in the cluster. -type VolumeSpecification struct { - _ struct{} `type:"structure"` - - // The number of I/O operations per second (IOPS) that the volume supports. - Iops *int64 `type:"integer"` - - // The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. - // If the volume type is EBS-optimized, the minimum value is 10. - // - // SizeInGB is a required field - SizeInGB *int64 `type:"integer" required:"true"` - - // The volume type. Volume types supported are gp2, io1, standard. - // - // VolumeType is a required field - VolumeType *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s VolumeSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VolumeSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VolumeSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VolumeSpecification"} - if s.SizeInGB == nil { - invalidParams.Add(request.NewErrParamRequired("SizeInGB")) - } - if s.VolumeType == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIops sets the Iops field's value. -func (s *VolumeSpecification) SetIops(v int64) *VolumeSpecification { - s.Iops = &v - return s -} - -// SetSizeInGB sets the SizeInGB field's value. -func (s *VolumeSpecification) SetSizeInGB(v int64) *VolumeSpecification { - s.SizeInGB = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *VolumeSpecification) SetVolumeType(v string) *VolumeSpecification { - s.VolumeType = &v - return s -} - -const ( - // ActionOnFailureTerminateJobFlow is a ActionOnFailure enum value - ActionOnFailureTerminateJobFlow = "TERMINATE_JOB_FLOW" - - // ActionOnFailureTerminateCluster is a ActionOnFailure enum value - ActionOnFailureTerminateCluster = "TERMINATE_CLUSTER" - - // ActionOnFailureCancelAndWait is a ActionOnFailure enum value - ActionOnFailureCancelAndWait = "CANCEL_AND_WAIT" - - // ActionOnFailureContinue is a ActionOnFailure enum value - ActionOnFailureContinue = "CONTINUE" -) - -const ( - // AdjustmentTypeChangeInCapacity is a AdjustmentType enum value - AdjustmentTypeChangeInCapacity = "CHANGE_IN_CAPACITY" - - // AdjustmentTypePercentChangeInCapacity is a AdjustmentType enum value - AdjustmentTypePercentChangeInCapacity = "PERCENT_CHANGE_IN_CAPACITY" - - // AdjustmentTypeExactCapacity is a AdjustmentType enum value - AdjustmentTypeExactCapacity = "EXACT_CAPACITY" -) - -const ( - // AutoScalingPolicyStatePending is a AutoScalingPolicyState enum value - AutoScalingPolicyStatePending = "PENDING" - - // AutoScalingPolicyStateAttaching is a AutoScalingPolicyState enum value - AutoScalingPolicyStateAttaching = "ATTACHING" - - // AutoScalingPolicyStateAttached is a AutoScalingPolicyState enum value - AutoScalingPolicyStateAttached = "ATTACHED" - - // AutoScalingPolicyStateDetaching is a AutoScalingPolicyState enum value - AutoScalingPolicyStateDetaching = "DETACHING" - - // AutoScalingPolicyStateDetached is a AutoScalingPolicyState enum value - AutoScalingPolicyStateDetached = "DETACHED" - - // AutoScalingPolicyStateFailed is a AutoScalingPolicyState enum value - AutoScalingPolicyStateFailed = "FAILED" -) - -const ( - // AutoScalingPolicyStateChangeReasonCodeUserRequest is a AutoScalingPolicyStateChangeReasonCode enum value - AutoScalingPolicyStateChangeReasonCodeUserRequest = "USER_REQUEST" - - // AutoScalingPolicyStateChangeReasonCodeProvisionFailure is a AutoScalingPolicyStateChangeReasonCode enum value - AutoScalingPolicyStateChangeReasonCodeProvisionFailure = "PROVISION_FAILURE" - - // AutoScalingPolicyStateChangeReasonCodeCleanupFailure is a AutoScalingPolicyStateChangeReasonCode enum value - AutoScalingPolicyStateChangeReasonCodeCleanupFailure = "CLEANUP_FAILURE" -) - -const ( - // CancelStepsRequestStatusSubmitted is a CancelStepsRequestStatus enum value - CancelStepsRequestStatusSubmitted = "SUBMITTED" - - // CancelStepsRequestStatusFailed is a CancelStepsRequestStatus enum value - CancelStepsRequestStatusFailed = "FAILED" -) - -const ( - // ClusterStateStarting is a ClusterState enum value - ClusterStateStarting = "STARTING" - - // ClusterStateBootstrapping is a ClusterState enum value - ClusterStateBootstrapping = "BOOTSTRAPPING" - - // ClusterStateRunning is a ClusterState enum value - ClusterStateRunning = "RUNNING" - - // ClusterStateWaiting is a ClusterState enum value - ClusterStateWaiting = "WAITING" - - // ClusterStateTerminating is a ClusterState enum value - ClusterStateTerminating = "TERMINATING" - - // ClusterStateTerminated is a ClusterState enum value - ClusterStateTerminated = "TERMINATED" - - // ClusterStateTerminatedWithErrors is a ClusterState enum value - ClusterStateTerminatedWithErrors = "TERMINATED_WITH_ERRORS" -) - -const ( - // ClusterStateChangeReasonCodeInternalError is a ClusterStateChangeReasonCode enum value - ClusterStateChangeReasonCodeInternalError = "INTERNAL_ERROR" - - // ClusterStateChangeReasonCodeValidationError is a ClusterStateChangeReasonCode enum value - ClusterStateChangeReasonCodeValidationError = "VALIDATION_ERROR" - - // ClusterStateChangeReasonCodeInstanceFailure is a ClusterStateChangeReasonCode enum value - ClusterStateChangeReasonCodeInstanceFailure = "INSTANCE_FAILURE" - - // ClusterStateChangeReasonCodeInstanceFleetTimeout is a ClusterStateChangeReasonCode enum value - ClusterStateChangeReasonCodeInstanceFleetTimeout = "INSTANCE_FLEET_TIMEOUT" - - // ClusterStateChangeReasonCodeBootstrapFailure is a ClusterStateChangeReasonCode enum value - ClusterStateChangeReasonCodeBootstrapFailure = "BOOTSTRAP_FAILURE" - - // ClusterStateChangeReasonCodeUserRequest is a ClusterStateChangeReasonCode enum value - ClusterStateChangeReasonCodeUserRequest = "USER_REQUEST" - - // ClusterStateChangeReasonCodeStepFailure is a ClusterStateChangeReasonCode enum value - ClusterStateChangeReasonCodeStepFailure = "STEP_FAILURE" - - // ClusterStateChangeReasonCodeAllStepsCompleted is a ClusterStateChangeReasonCode enum value - ClusterStateChangeReasonCodeAllStepsCompleted = "ALL_STEPS_COMPLETED" -) - -const ( - // ComparisonOperatorGreaterThanOrEqual is a ComparisonOperator enum value - ComparisonOperatorGreaterThanOrEqual = "GREATER_THAN_OR_EQUAL" - - // ComparisonOperatorGreaterThan is a ComparisonOperator enum value - ComparisonOperatorGreaterThan = "GREATER_THAN" - - // ComparisonOperatorLessThan is a ComparisonOperator enum value - ComparisonOperatorLessThan = "LESS_THAN" - - // ComparisonOperatorLessThanOrEqual is a ComparisonOperator enum value - ComparisonOperatorLessThanOrEqual = "LESS_THAN_OR_EQUAL" -) - -const ( - // InstanceCollectionTypeInstanceFleet is a InstanceCollectionType enum value - InstanceCollectionTypeInstanceFleet = "INSTANCE_FLEET" - - // InstanceCollectionTypeInstanceGroup is a InstanceCollectionType enum value - InstanceCollectionTypeInstanceGroup = "INSTANCE_GROUP" -) - -const ( - // InstanceFleetStateProvisioning is a InstanceFleetState enum value - InstanceFleetStateProvisioning = "PROVISIONING" - - // InstanceFleetStateBootstrapping is a InstanceFleetState enum value - InstanceFleetStateBootstrapping = "BOOTSTRAPPING" - - // InstanceFleetStateRunning is a InstanceFleetState enum value - InstanceFleetStateRunning = "RUNNING" - - // InstanceFleetStateResizing is a InstanceFleetState enum value - InstanceFleetStateResizing = "RESIZING" - - // InstanceFleetStateSuspended is a InstanceFleetState enum value - InstanceFleetStateSuspended = "SUSPENDED" - - // InstanceFleetStateTerminating is a InstanceFleetState enum value - InstanceFleetStateTerminating = "TERMINATING" - - // InstanceFleetStateTerminated is a InstanceFleetState enum value - InstanceFleetStateTerminated = "TERMINATED" -) - -const ( - // InstanceFleetStateChangeReasonCodeInternalError is a InstanceFleetStateChangeReasonCode enum value - InstanceFleetStateChangeReasonCodeInternalError = "INTERNAL_ERROR" - - // InstanceFleetStateChangeReasonCodeValidationError is a InstanceFleetStateChangeReasonCode enum value - InstanceFleetStateChangeReasonCodeValidationError = "VALIDATION_ERROR" - - // InstanceFleetStateChangeReasonCodeInstanceFailure is a InstanceFleetStateChangeReasonCode enum value - InstanceFleetStateChangeReasonCodeInstanceFailure = "INSTANCE_FAILURE" - - // InstanceFleetStateChangeReasonCodeClusterTerminated is a InstanceFleetStateChangeReasonCode enum value - InstanceFleetStateChangeReasonCodeClusterTerminated = "CLUSTER_TERMINATED" -) - -const ( - // InstanceFleetTypeMaster is a InstanceFleetType enum value - InstanceFleetTypeMaster = "MASTER" - - // InstanceFleetTypeCore is a InstanceFleetType enum value - InstanceFleetTypeCore = "CORE" - - // InstanceFleetTypeTask is a InstanceFleetType enum value - InstanceFleetTypeTask = "TASK" -) - -const ( - // InstanceGroupStateProvisioning is a InstanceGroupState enum value - InstanceGroupStateProvisioning = "PROVISIONING" - - // InstanceGroupStateBootstrapping is a InstanceGroupState enum value - InstanceGroupStateBootstrapping = "BOOTSTRAPPING" - - // InstanceGroupStateRunning is a InstanceGroupState enum value - InstanceGroupStateRunning = "RUNNING" - - // InstanceGroupStateResizing is a InstanceGroupState enum value - InstanceGroupStateResizing = "RESIZING" - - // InstanceGroupStateSuspended is a InstanceGroupState enum value - InstanceGroupStateSuspended = "SUSPENDED" - - // InstanceGroupStateTerminating is a InstanceGroupState enum value - InstanceGroupStateTerminating = "TERMINATING" - - // InstanceGroupStateTerminated is a InstanceGroupState enum value - InstanceGroupStateTerminated = "TERMINATED" - - // InstanceGroupStateArrested is a InstanceGroupState enum value - InstanceGroupStateArrested = "ARRESTED" - - // InstanceGroupStateShuttingDown is a InstanceGroupState enum value - InstanceGroupStateShuttingDown = "SHUTTING_DOWN" - - // InstanceGroupStateEnded is a InstanceGroupState enum value - InstanceGroupStateEnded = "ENDED" -) - -const ( - // InstanceGroupStateChangeReasonCodeInternalError is a InstanceGroupStateChangeReasonCode enum value - InstanceGroupStateChangeReasonCodeInternalError = "INTERNAL_ERROR" - - // InstanceGroupStateChangeReasonCodeValidationError is a InstanceGroupStateChangeReasonCode enum value - InstanceGroupStateChangeReasonCodeValidationError = "VALIDATION_ERROR" - - // InstanceGroupStateChangeReasonCodeInstanceFailure is a InstanceGroupStateChangeReasonCode enum value - InstanceGroupStateChangeReasonCodeInstanceFailure = "INSTANCE_FAILURE" - - // InstanceGroupStateChangeReasonCodeClusterTerminated is a InstanceGroupStateChangeReasonCode enum value - InstanceGroupStateChangeReasonCodeClusterTerminated = "CLUSTER_TERMINATED" -) - -const ( - // InstanceGroupTypeMaster is a InstanceGroupType enum value - InstanceGroupTypeMaster = "MASTER" - - // InstanceGroupTypeCore is a InstanceGroupType enum value - InstanceGroupTypeCore = "CORE" - - // InstanceGroupTypeTask is a InstanceGroupType enum value - InstanceGroupTypeTask = "TASK" -) - -const ( - // InstanceRoleTypeMaster is a InstanceRoleType enum value - InstanceRoleTypeMaster = "MASTER" - - // InstanceRoleTypeCore is a InstanceRoleType enum value - InstanceRoleTypeCore = "CORE" - - // InstanceRoleTypeTask is a InstanceRoleType enum value - InstanceRoleTypeTask = "TASK" -) - -const ( - // InstanceStateAwaitingFulfillment is a InstanceState enum value - InstanceStateAwaitingFulfillment = "AWAITING_FULFILLMENT" - - // InstanceStateProvisioning is a InstanceState enum value - InstanceStateProvisioning = "PROVISIONING" - - // InstanceStateBootstrapping is a InstanceState enum value - InstanceStateBootstrapping = "BOOTSTRAPPING" - - // InstanceStateRunning is a InstanceState enum value - InstanceStateRunning = "RUNNING" - - // InstanceStateTerminated is a InstanceState enum value - InstanceStateTerminated = "TERMINATED" -) - -const ( - // InstanceStateChangeReasonCodeInternalError is a InstanceStateChangeReasonCode enum value - InstanceStateChangeReasonCodeInternalError = "INTERNAL_ERROR" - - // InstanceStateChangeReasonCodeValidationError is a InstanceStateChangeReasonCode enum value - InstanceStateChangeReasonCodeValidationError = "VALIDATION_ERROR" - - // InstanceStateChangeReasonCodeInstanceFailure is a InstanceStateChangeReasonCode enum value - InstanceStateChangeReasonCodeInstanceFailure = "INSTANCE_FAILURE" - - // InstanceStateChangeReasonCodeBootstrapFailure is a InstanceStateChangeReasonCode enum value - InstanceStateChangeReasonCodeBootstrapFailure = "BOOTSTRAP_FAILURE" - - // InstanceStateChangeReasonCodeClusterTerminated is a InstanceStateChangeReasonCode enum value - InstanceStateChangeReasonCodeClusterTerminated = "CLUSTER_TERMINATED" -) - -// The type of instance. -const ( - // JobFlowExecutionStateStarting is a JobFlowExecutionState enum value - JobFlowExecutionStateStarting = "STARTING" - - // JobFlowExecutionStateBootstrapping is a JobFlowExecutionState enum value - JobFlowExecutionStateBootstrapping = "BOOTSTRAPPING" - - // JobFlowExecutionStateRunning is a JobFlowExecutionState enum value - JobFlowExecutionStateRunning = "RUNNING" - - // JobFlowExecutionStateWaiting is a JobFlowExecutionState enum value - JobFlowExecutionStateWaiting = "WAITING" - - // JobFlowExecutionStateShuttingDown is a JobFlowExecutionState enum value - JobFlowExecutionStateShuttingDown = "SHUTTING_DOWN" - - // JobFlowExecutionStateTerminated is a JobFlowExecutionState enum value - JobFlowExecutionStateTerminated = "TERMINATED" - - // JobFlowExecutionStateCompleted is a JobFlowExecutionState enum value - JobFlowExecutionStateCompleted = "COMPLETED" - - // JobFlowExecutionStateFailed is a JobFlowExecutionState enum value - JobFlowExecutionStateFailed = "FAILED" -) - -const ( - // MarketTypeOnDemand is a MarketType enum value - MarketTypeOnDemand = "ON_DEMAND" - - // MarketTypeSpot is a MarketType enum value - MarketTypeSpot = "SPOT" -) - -const ( - // RepoUpgradeOnBootSecurity is a RepoUpgradeOnBoot enum value - RepoUpgradeOnBootSecurity = "SECURITY" - - // RepoUpgradeOnBootNone is a RepoUpgradeOnBoot enum value - RepoUpgradeOnBootNone = "NONE" -) - -const ( - // ScaleDownBehaviorTerminateAtInstanceHour is a ScaleDownBehavior enum value - ScaleDownBehaviorTerminateAtInstanceHour = "TERMINATE_AT_INSTANCE_HOUR" - - // ScaleDownBehaviorTerminateAtTaskCompletion is a ScaleDownBehavior enum value - ScaleDownBehaviorTerminateAtTaskCompletion = "TERMINATE_AT_TASK_COMPLETION" -) - -const ( - // SpotProvisioningTimeoutActionSwitchToOnDemand is a SpotProvisioningTimeoutAction enum value - SpotProvisioningTimeoutActionSwitchToOnDemand = "SWITCH_TO_ON_DEMAND" - - // SpotProvisioningTimeoutActionTerminateCluster is a SpotProvisioningTimeoutAction enum value - SpotProvisioningTimeoutActionTerminateCluster = "TERMINATE_CLUSTER" -) - -const ( - // StatisticSampleCount is a Statistic enum value - StatisticSampleCount = "SAMPLE_COUNT" - - // StatisticAverage is a Statistic enum value - StatisticAverage = "AVERAGE" - - // StatisticSum is a Statistic enum value - StatisticSum = "SUM" - - // StatisticMinimum is a Statistic enum value - StatisticMinimum = "MINIMUM" - - // StatisticMaximum is a Statistic enum value - StatisticMaximum = "MAXIMUM" -) - -const ( - // StepExecutionStatePending is a StepExecutionState enum value - StepExecutionStatePending = "PENDING" - - // StepExecutionStateRunning is a StepExecutionState enum value - StepExecutionStateRunning = "RUNNING" - - // StepExecutionStateContinue is a StepExecutionState enum value - StepExecutionStateContinue = "CONTINUE" - - // StepExecutionStateCompleted is a StepExecutionState enum value - StepExecutionStateCompleted = "COMPLETED" - - // StepExecutionStateCancelled is a StepExecutionState enum value - StepExecutionStateCancelled = "CANCELLED" - - // StepExecutionStateFailed is a StepExecutionState enum value - StepExecutionStateFailed = "FAILED" - - // StepExecutionStateInterrupted is a StepExecutionState enum value - StepExecutionStateInterrupted = "INTERRUPTED" -) - -const ( - // StepStatePending is a StepState enum value - StepStatePending = "PENDING" - - // StepStateCancelPending is a StepState enum value - StepStateCancelPending = "CANCEL_PENDING" - - // StepStateRunning is a StepState enum value - StepStateRunning = "RUNNING" - - // StepStateCompleted is a StepState enum value - StepStateCompleted = "COMPLETED" - - // StepStateCancelled is a StepState enum value - StepStateCancelled = "CANCELLED" - - // StepStateFailed is a StepState enum value - StepStateFailed = "FAILED" - - // StepStateInterrupted is a StepState enum value - StepStateInterrupted = "INTERRUPTED" -) - -const ( - // StepStateChangeReasonCodeNone is a StepStateChangeReasonCode enum value - StepStateChangeReasonCodeNone = "NONE" -) - -const ( - // UnitNone is a Unit enum value - UnitNone = "NONE" - - // UnitSeconds is a Unit enum value - UnitSeconds = "SECONDS" - - // UnitMicroSeconds is a Unit enum value - UnitMicroSeconds = "MICRO_SECONDS" - - // UnitMilliSeconds is a Unit enum value - UnitMilliSeconds = "MILLI_SECONDS" - - // UnitBytes is a Unit enum value - UnitBytes = "BYTES" - - // UnitKiloBytes is a Unit enum value - UnitKiloBytes = "KILO_BYTES" - - // UnitMegaBytes is a Unit enum value - UnitMegaBytes = "MEGA_BYTES" - - // UnitGigaBytes is a Unit enum value - UnitGigaBytes = "GIGA_BYTES" - - // UnitTeraBytes is a Unit enum value - UnitTeraBytes = "TERA_BYTES" - - // UnitBits is a Unit enum value - UnitBits = "BITS" - - // UnitKiloBits is a Unit enum value - UnitKiloBits = "KILO_BITS" - - // UnitMegaBits is a Unit enum value - UnitMegaBits = "MEGA_BITS" - - // UnitGigaBits is a Unit enum value - UnitGigaBits = "GIGA_BITS" - - // UnitTeraBits is a Unit enum value - UnitTeraBits = "TERA_BITS" - - // UnitPercent is a Unit enum value - UnitPercent = "PERCENT" - - // UnitCount is a Unit enum value - UnitCount = "COUNT" - - // UnitBytesPerSecond is a Unit enum value - UnitBytesPerSecond = "BYTES_PER_SECOND" - - // UnitKiloBytesPerSecond is a Unit enum value - UnitKiloBytesPerSecond = "KILO_BYTES_PER_SECOND" - - // UnitMegaBytesPerSecond is a Unit enum value - UnitMegaBytesPerSecond = "MEGA_BYTES_PER_SECOND" - - // UnitGigaBytesPerSecond is a Unit enum value - UnitGigaBytesPerSecond = "GIGA_BYTES_PER_SECOND" - - // UnitTeraBytesPerSecond is a Unit enum value - UnitTeraBytesPerSecond = "TERA_BYTES_PER_SECOND" - - // UnitBitsPerSecond is a Unit enum value - UnitBitsPerSecond = "BITS_PER_SECOND" - - // UnitKiloBitsPerSecond is a Unit enum value - UnitKiloBitsPerSecond = "KILO_BITS_PER_SECOND" - - // UnitMegaBitsPerSecond is a Unit enum value - UnitMegaBitsPerSecond = "MEGA_BITS_PER_SECOND" - - // UnitGigaBitsPerSecond is a Unit enum value - UnitGigaBitsPerSecond = "GIGA_BITS_PER_SECOND" - - // UnitTeraBitsPerSecond is a Unit enum value - UnitTeraBitsPerSecond = "TERA_BITS_PER_SECOND" - - // UnitCountPerSecond is a Unit enum value - UnitCountPerSecond = "COUNT_PER_SECOND" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/doc.go b/vendor/github.com/aws/aws-sdk-go/service/emr/doc.go deleted file mode 100644 index 772b2d093..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/doc.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package emr provides the client and types for making API -// requests to Amazon Elastic MapReduce. -// -// Amazon EMR is a web service that makes it easy to process large amounts of -// data efficiently. Amazon EMR uses Hadoop processing combined with several -// AWS products to do tasks such as web indexing, data mining, log file analysis, -// machine learning, scientific simulation, and data warehousing. -// -// See https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31 for more information on this service. -// -// See emr package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/emr/ -// -// Using the Client -// -// To contact Amazon Elastic MapReduce with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Elastic MapReduce client EMR for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/emr/#New -package emr diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/errors.go b/vendor/github.com/aws/aws-sdk-go/service/emr/errors.go deleted file mode 100644 index b4bf33708..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/errors.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package emr - -const ( - - // ErrCodeInternalServerError for service response error code - // "InternalServerError". - // - // Indicates that an error occurred while processing the request and that the - // request was not completed. - ErrCodeInternalServerError = "InternalServerError" - - // ErrCodeInternalServerException for service response error code - // "InternalServerException". - // - // This exception occurs when there is an internal failure in the EMR service. - ErrCodeInternalServerException = "InternalServerException" - - // ErrCodeInvalidRequestException for service response error code - // "InvalidRequestException". - // - // This exception occurs when there is something wrong with user input. - ErrCodeInvalidRequestException = "InvalidRequestException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/service.go b/vendor/github.com/aws/aws-sdk-go/service/emr/service.go deleted file mode 100644 index 92735a793..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package emr - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// EMR provides the API operation methods for making requests to -// Amazon Elastic MapReduce. See this package's package overview docs -// for details on the service. -// -// EMR methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type EMR 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 = "elasticmapreduce" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "EMR" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the EMR client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a EMR client from just a session. -// svc := emr.New(mySession) -// -// // Create a EMR client with additional configuration -// svc := emr.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *EMR { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *EMR { - svc := &EMR{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2009-03-31", - JSONVersion: "1.1", - TargetPrefix: "ElasticMapReduce", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a EMR operation and runs any -// custom request initialization. -func (c *EMR) 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/emr/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/emr/waiters.go deleted file mode 100644 index d99d11202..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/waiters.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package emr - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilClusterRunning uses the Amazon EMR API operation -// DescribeCluster to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EMR) WaitUntilClusterRunning(input *DescribeClusterInput) error { - return c.WaitUntilClusterRunningWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilClusterRunningWithContext is an extended version of WaitUntilClusterRunning. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) WaitUntilClusterRunningWithContext(ctx aws.Context, input *DescribeClusterInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilClusterRunning", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Cluster.Status.State", - Expected: "RUNNING", - }, - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Cluster.Status.State", - Expected: "WAITING", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Cluster.Status.State", - Expected: "TERMINATING", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Cluster.Status.State", - Expected: "TERMINATED", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Cluster.Status.State", - Expected: "TERMINATED_WITH_ERRORS", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeClusterInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClusterRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilClusterTerminated uses the Amazon EMR API operation -// DescribeCluster to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EMR) WaitUntilClusterTerminated(input *DescribeClusterInput) error { - return c.WaitUntilClusterTerminatedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilClusterTerminatedWithContext is an extended version of WaitUntilClusterTerminated. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) WaitUntilClusterTerminatedWithContext(ctx aws.Context, input *DescribeClusterInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilClusterTerminated", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Cluster.Status.State", - Expected: "TERMINATED", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Cluster.Status.State", - Expected: "TERMINATED_WITH_ERRORS", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeClusterInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClusterRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilStepComplete uses the Amazon EMR API operation -// DescribeStep to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *EMR) WaitUntilStepComplete(input *DescribeStepInput) error { - return c.WaitUntilStepCompleteWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilStepCompleteWithContext is an extended version of WaitUntilStepComplete. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EMR) WaitUntilStepCompleteWithContext(ctx aws.Context, input *DescribeStepInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilStepComplete", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Step.Status.State", - Expected: "COMPLETED", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Step.Status.State", - Expected: "FAILED", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Step.Status.State", - Expected: "CANCELLED", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeStepInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeStepRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go deleted file mode 100644 index 509168174..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go +++ /dev/null @@ -1,6619 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package firehose - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateDeliveryStream = "CreateDeliveryStream" - -// CreateDeliveryStreamRequest generates a "aws/request.Request" representing the -// client's request for the CreateDeliveryStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDeliveryStream for more information on using the CreateDeliveryStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDeliveryStreamRequest method. -// req, resp := client.CreateDeliveryStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/CreateDeliveryStream -func (c *Firehose) CreateDeliveryStreamRequest(input *CreateDeliveryStreamInput) (req *request.Request, output *CreateDeliveryStreamOutput) { - op := &request.Operation{ - Name: opCreateDeliveryStream, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDeliveryStreamInput{} - } - - output = &CreateDeliveryStreamOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDeliveryStream API operation for Amazon Kinesis Firehose. -// -// Creates a Kinesis Data Firehose delivery stream. -// -// By default, you can create up to 50 delivery streams per AWS Region. -// -// This is an asynchronous operation that immediately returns. The initial status -// of the delivery stream is CREATING. After the delivery stream is created, -// its status is ACTIVE and it now accepts data. Attempts to send data to a -// delivery stream that is not in the ACTIVE state cause an exception. To check -// the state of a delivery stream, use DescribeDeliveryStream. -// -// A Kinesis Data Firehose delivery stream can be configured to receive records -// directly from providers using PutRecord or PutRecordBatch, or it can be configured -// to use an existing Kinesis stream as its source. To specify a Kinesis data -// stream as input, set the DeliveryStreamType parameter to KinesisStreamAsSource, -// and provide the Kinesis stream Amazon Resource Name (ARN) and role ARN in -// the KinesisStreamSourceConfiguration parameter. -// -// A delivery stream is configured with a single destination: Amazon S3, Amazon -// ES, Amazon Redshift, or Splunk. You must specify only one of the following -// destination configuration parameters: ExtendedS3DestinationConfiguration, -// S3DestinationConfiguration, ElasticsearchDestinationConfiguration, RedshiftDestinationConfiguration, -// or SplunkDestinationConfiguration. -// -// When you specify S3DestinationConfiguration, you can also provide the following -// optional values: BufferingHints, EncryptionConfiguration, and CompressionFormat. -// By default, if no BufferingHints value is provided, Kinesis Data Firehose -// buffers data up to 5 MB or for 5 minutes, whichever condition is satisfied -// first. BufferingHints is a hint, so there are some cases where the service -// cannot adhere to these conditions strictly. For example, record boundaries -// might be such that the size is a little over or under the configured buffering -// size. By default, no encryption is performed. We strongly recommend that -// you enable encryption to ensure secure data storage in Amazon S3. -// -// A few notes about Amazon Redshift as a destination: -// -// * An Amazon Redshift destination requires an S3 bucket as intermediate -// location. Kinesis Data Firehose first delivers data to Amazon S3 and then -// uses COPY syntax to load data into an Amazon Redshift table. This is specified -// in the RedshiftDestinationConfiguration.S3Configuration parameter. -// -// * The compression formats SNAPPY or ZIP cannot be specified in RedshiftDestinationConfiguration.S3Configuration -// because the Amazon Redshift COPY operation that reads from the S3 bucket -// doesn't support these compression formats. -// -// * We strongly recommend that you use the user name and password you provide -// exclusively with Kinesis Data Firehose, and that the permissions for the -// account are restricted for Amazon Redshift INSERT permissions. -// -// Kinesis Data Firehose assumes the IAM role that is configured as part of -// the destination. The role should allow the Kinesis Data Firehose principal -// to assume the role, and the role should have permissions that allow the service -// to deliver the data. For more information, see Grant Kinesis Data Firehose -// Access to an Amazon S3 Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) -// in the Amazon Kinesis Data Firehose Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Firehose's -// API operation CreateDeliveryStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// The specified input parameter has a value that is not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have already reached the limit for a requested resource. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is already in use and not available for this operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/CreateDeliveryStream -func (c *Firehose) CreateDeliveryStream(input *CreateDeliveryStreamInput) (*CreateDeliveryStreamOutput, error) { - req, out := c.CreateDeliveryStreamRequest(input) - return out, req.Send() -} - -// CreateDeliveryStreamWithContext is the same as CreateDeliveryStream with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDeliveryStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Firehose) CreateDeliveryStreamWithContext(ctx aws.Context, input *CreateDeliveryStreamInput, opts ...request.Option) (*CreateDeliveryStreamOutput, error) { - req, out := c.CreateDeliveryStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDeliveryStream = "DeleteDeliveryStream" - -// DeleteDeliveryStreamRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDeliveryStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDeliveryStream for more information on using the DeleteDeliveryStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDeliveryStreamRequest method. -// req, resp := client.DeleteDeliveryStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/DeleteDeliveryStream -func (c *Firehose) DeleteDeliveryStreamRequest(input *DeleteDeliveryStreamInput) (req *request.Request, output *DeleteDeliveryStreamOutput) { - op := &request.Operation{ - Name: opDeleteDeliveryStream, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDeliveryStreamInput{} - } - - output = &DeleteDeliveryStreamOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDeliveryStream API operation for Amazon Kinesis Firehose. -// -// Deletes a delivery stream and its data. -// -// You can delete a delivery stream only if it is in ACTIVE or DELETING state, -// and not in the CREATING state. While the deletion request is in process, -// the delivery stream is in the DELETING state. -// -// To check the state of a delivery stream, use DescribeDeliveryStream. -// -// While the delivery stream is DELETING state, the service might continue to -// accept the records, but it doesn't make any guarantees with respect to delivering -// the data. Therefore, as a best practice, you should first stop any applications -// that are sending records before deleting a delivery stream. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Firehose's -// API operation DeleteDeliveryStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is already in use and not available for this operation. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/DeleteDeliveryStream -func (c *Firehose) DeleteDeliveryStream(input *DeleteDeliveryStreamInput) (*DeleteDeliveryStreamOutput, error) { - req, out := c.DeleteDeliveryStreamRequest(input) - return out, req.Send() -} - -// DeleteDeliveryStreamWithContext is the same as DeleteDeliveryStream with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDeliveryStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Firehose) DeleteDeliveryStreamWithContext(ctx aws.Context, input *DeleteDeliveryStreamInput, opts ...request.Option) (*DeleteDeliveryStreamOutput, error) { - req, out := c.DeleteDeliveryStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDeliveryStream = "DescribeDeliveryStream" - -// DescribeDeliveryStreamRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDeliveryStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDeliveryStream for more information on using the DescribeDeliveryStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDeliveryStreamRequest method. -// req, resp := client.DescribeDeliveryStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/DescribeDeliveryStream -func (c *Firehose) DescribeDeliveryStreamRequest(input *DescribeDeliveryStreamInput) (req *request.Request, output *DescribeDeliveryStreamOutput) { - op := &request.Operation{ - Name: opDescribeDeliveryStream, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDeliveryStreamInput{} - } - - output = &DescribeDeliveryStreamOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDeliveryStream API operation for Amazon Kinesis Firehose. -// -// Describes the specified delivery stream and gets the status. For example, -// after your delivery stream is created, call DescribeDeliveryStream to see -// whether the delivery stream is ACTIVE and therefore ready for data to be -// sent to it. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Firehose's -// API operation DescribeDeliveryStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/DescribeDeliveryStream -func (c *Firehose) DescribeDeliveryStream(input *DescribeDeliveryStreamInput) (*DescribeDeliveryStreamOutput, error) { - req, out := c.DescribeDeliveryStreamRequest(input) - return out, req.Send() -} - -// DescribeDeliveryStreamWithContext is the same as DescribeDeliveryStream with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDeliveryStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Firehose) DescribeDeliveryStreamWithContext(ctx aws.Context, input *DescribeDeliveryStreamInput, opts ...request.Option) (*DescribeDeliveryStreamOutput, error) { - req, out := c.DescribeDeliveryStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDeliveryStreams = "ListDeliveryStreams" - -// ListDeliveryStreamsRequest generates a "aws/request.Request" representing the -// client's request for the ListDeliveryStreams operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDeliveryStreams for more information on using the ListDeliveryStreams -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDeliveryStreamsRequest method. -// req, resp := client.ListDeliveryStreamsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/ListDeliveryStreams -func (c *Firehose) ListDeliveryStreamsRequest(input *ListDeliveryStreamsInput) (req *request.Request, output *ListDeliveryStreamsOutput) { - op := &request.Operation{ - Name: opListDeliveryStreams, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListDeliveryStreamsInput{} - } - - output = &ListDeliveryStreamsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDeliveryStreams API operation for Amazon Kinesis Firehose. -// -// Lists your delivery streams in alphabetical order of their names. -// -// The number of delivery streams might be too large to return using a single -// call to ListDeliveryStreams. You can limit the number of delivery streams -// returned, using the Limit parameter. To determine whether there are more -// delivery streams to list, check the value of HasMoreDeliveryStreams in the -// output. If there are more delivery streams to list, you can request them -// by calling this operation again and setting the ExclusiveStartDeliveryStreamName -// parameter to the name of the last delivery stream returned in the last call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Firehose's -// API operation ListDeliveryStreams for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/ListDeliveryStreams -func (c *Firehose) ListDeliveryStreams(input *ListDeliveryStreamsInput) (*ListDeliveryStreamsOutput, error) { - req, out := c.ListDeliveryStreamsRequest(input) - return out, req.Send() -} - -// ListDeliveryStreamsWithContext is the same as ListDeliveryStreams with the addition of -// the ability to pass a context and additional request options. -// -// See ListDeliveryStreams for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Firehose) ListDeliveryStreamsWithContext(ctx aws.Context, input *ListDeliveryStreamsInput, opts ...request.Option) (*ListDeliveryStreamsOutput, error) { - req, out := c.ListDeliveryStreamsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTagsForDeliveryStream = "ListTagsForDeliveryStream" - -// ListTagsForDeliveryStreamRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForDeliveryStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTagsForDeliveryStream for more information on using the ListTagsForDeliveryStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsForDeliveryStreamRequest method. -// req, resp := client.ListTagsForDeliveryStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/ListTagsForDeliveryStream -func (c *Firehose) ListTagsForDeliveryStreamRequest(input *ListTagsForDeliveryStreamInput) (req *request.Request, output *ListTagsForDeliveryStreamOutput) { - op := &request.Operation{ - Name: opListTagsForDeliveryStream, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForDeliveryStreamInput{} - } - - output = &ListTagsForDeliveryStreamOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForDeliveryStream API operation for Amazon Kinesis Firehose. -// -// Lists the tags for the specified delivery stream. This operation has a limit -// of five transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Firehose's -// API operation ListTagsForDeliveryStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// The specified input parameter has a value that is not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have already reached the limit for a requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/ListTagsForDeliveryStream -func (c *Firehose) ListTagsForDeliveryStream(input *ListTagsForDeliveryStreamInput) (*ListTagsForDeliveryStreamOutput, error) { - req, out := c.ListTagsForDeliveryStreamRequest(input) - return out, req.Send() -} - -// ListTagsForDeliveryStreamWithContext is the same as ListTagsForDeliveryStream with the addition of -// the ability to pass a context and additional request options. -// -// See ListTagsForDeliveryStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Firehose) ListTagsForDeliveryStreamWithContext(ctx aws.Context, input *ListTagsForDeliveryStreamInput, opts ...request.Option) (*ListTagsForDeliveryStreamOutput, error) { - req, out := c.ListTagsForDeliveryStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutRecord = "PutRecord" - -// PutRecordRequest generates a "aws/request.Request" representing the -// client's request for the PutRecord operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutRecord for more information on using the PutRecord -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutRecordRequest method. -// req, resp := client.PutRecordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/PutRecord -func (c *Firehose) PutRecordRequest(input *PutRecordInput) (req *request.Request, output *PutRecordOutput) { - op := &request.Operation{ - Name: opPutRecord, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutRecordInput{} - } - - output = &PutRecordOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutRecord API operation for Amazon Kinesis Firehose. -// -// Writes a single data record into an Amazon Kinesis Data Firehose delivery -// stream. To write multiple data records into a delivery stream, use PutRecordBatch. -// Applications using these operations are referred to as producers. -// -// By default, each delivery stream can take in up to 2,000 transactions per -// second, 5,000 records per second, or 5 MB per second. If you use PutRecord -// and PutRecordBatch, the limits are an aggregate across these two operations -// for each delivery stream. For more information about limits and how to request -// an increase, see Amazon Kinesis Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). -// -// You must specify the name of the delivery stream and the data record when -// using PutRecord. The data record consists of a data blob that can be up to -// 1,000 KB in size, and any kind of data. For example, it can be a segment -// from a log file, geographic location data, website clickstream data, and -// so on. -// -// Kinesis Data Firehose buffers records before delivering them to the destination. -// To disambiguate the data blobs at the destination, a common solution is to -// use delimiters in the data, such as a newline (\n) or some other character -// unique within the data. This allows the consumer application to parse individual -// data items when reading the data from the destination. -// -// The PutRecord operation returns a RecordId, which is a unique string assigned -// to each record. Producer applications can use this ID for purposes such as -// auditability and investigation. -// -// If the PutRecord operation throws a ServiceUnavailableException, back off -// and retry. If the exception persists, it is possible that the throughput -// limits have been exceeded for the delivery stream. -// -// Data records sent to Kinesis Data Firehose are stored for 24 hours from the -// time they are added to a delivery stream as it tries to send the records -// to the destination. If the destination is unreachable for more than 24 hours, -// the data is no longer available. -// -// Don't concatenate two or more base64 strings to form the data fields of your -// records. Instead, concatenate the raw data, then perform base64 encoding. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Firehose's -// API operation PutRecord for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// The specified input parameter has a value that is not valid. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable. Back off and retry the operation. If you continue -// to see the exception, throughput limits for the delivery stream may have -// been exceeded. For more information about limits and how to request an increase, -// see Amazon Kinesis Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/PutRecord -func (c *Firehose) PutRecord(input *PutRecordInput) (*PutRecordOutput, error) { - req, out := c.PutRecordRequest(input) - return out, req.Send() -} - -// PutRecordWithContext is the same as PutRecord with the addition of -// the ability to pass a context and additional request options. -// -// See PutRecord for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Firehose) PutRecordWithContext(ctx aws.Context, input *PutRecordInput, opts ...request.Option) (*PutRecordOutput, error) { - req, out := c.PutRecordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutRecordBatch = "PutRecordBatch" - -// PutRecordBatchRequest generates a "aws/request.Request" representing the -// client's request for the PutRecordBatch operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutRecordBatch for more information on using the PutRecordBatch -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutRecordBatchRequest method. -// req, resp := client.PutRecordBatchRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/PutRecordBatch -func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *request.Request, output *PutRecordBatchOutput) { - op := &request.Operation{ - Name: opPutRecordBatch, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutRecordBatchInput{} - } - - output = &PutRecordBatchOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutRecordBatch API operation for Amazon Kinesis Firehose. -// -// Writes multiple data records into a delivery stream in a single call, which -// can achieve higher throughput per producer than when writing single records. -// To write single data records into a delivery stream, use PutRecord. Applications -// using these operations are referred to as producers. -// -// By default, each delivery stream can take in up to 2,000 transactions per -// second, 5,000 records per second, or 5 MB per second. If you use PutRecord -// and PutRecordBatch, the limits are an aggregate across these two operations -// for each delivery stream. For more information about limits, see Amazon Kinesis -// Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). -// -// Each PutRecordBatch request supports up to 500 records. Each record in the -// request can be as large as 1,000 KB (before 64-bit encoding), up to a limit -// of 4 MB for the entire request. These limits cannot be changed. -// -// You must specify the name of the delivery stream and the data record when -// using PutRecord. The data record consists of a data blob that can be up to -// 1,000 KB in size, and any kind of data. For example, it could be a segment -// from a log file, geographic location data, website clickstream data, and -// so on. -// -// Kinesis Data Firehose buffers records before delivering them to the destination. -// To disambiguate the data blobs at the destination, a common solution is to -// use delimiters in the data, such as a newline (\n) or some other character -// unique within the data. This allows the consumer application to parse individual -// data items when reading the data from the destination. -// -// The PutRecordBatch response includes a count of failed records, FailedPutCount, -// and an array of responses, RequestResponses. Even if the PutRecordBatch call -// succeeds, the value of FailedPutCount may be greater than 0, indicating that -// there are records for which the operation didn't succeed. Each entry in the -// RequestResponses array provides additional information about the processed -// record. It directly correlates with a record in the request array using the -// same ordering, from the top to the bottom. The response array always includes -// the same number of records as the request array. RequestResponses includes -// both successfully and unsuccessfully processed records. Kinesis Data Firehose -// tries to process all records in each PutRecordBatch request. A single record -// failure does not stop the processing of subsequent records. -// -// A successfully processed record includes a RecordId value, which is unique -// for the record. An unsuccessfully processed record includes ErrorCode and -// ErrorMessage values. ErrorCode reflects the type of error, and is one of -// the following values: ServiceUnavailableException or InternalFailure. ErrorMessage -// provides more detailed information about the error. -// -// If there is an internal server error or a timeout, the write might have completed -// or it might have failed. If FailedPutCount is greater than 0, retry the request, -// resending only those records that might have failed processing. This minimizes -// the possible duplicate records and also reduces the total bytes sent (and -// corresponding charges). We recommend that you handle any duplicates at the -// destination. -// -// If PutRecordBatch throws ServiceUnavailableException, back off and retry. -// If the exception persists, it is possible that the throughput limits have -// been exceeded for the delivery stream. -// -// Data records sent to Kinesis Data Firehose are stored for 24 hours from the -// time they are added to a delivery stream as it attempts to send the records -// to the destination. If the destination is unreachable for more than 24 hours, -// the data is no longer available. -// -// Don't concatenate two or more base64 strings to form the data fields of your -// records. Instead, concatenate the raw data, then perform base64 encoding. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Firehose's -// API operation PutRecordBatch for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// The specified input parameter has a value that is not valid. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable. Back off and retry the operation. If you continue -// to see the exception, throughput limits for the delivery stream may have -// been exceeded. For more information about limits and how to request an increase, -// see Amazon Kinesis Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/PutRecordBatch -func (c *Firehose) PutRecordBatch(input *PutRecordBatchInput) (*PutRecordBatchOutput, error) { - req, out := c.PutRecordBatchRequest(input) - return out, req.Send() -} - -// PutRecordBatchWithContext is the same as PutRecordBatch with the addition of -// the ability to pass a context and additional request options. -// -// See PutRecordBatch for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Firehose) PutRecordBatchWithContext(ctx aws.Context, input *PutRecordBatchInput, opts ...request.Option) (*PutRecordBatchOutput, error) { - req, out := c.PutRecordBatchRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartDeliveryStreamEncryption = "StartDeliveryStreamEncryption" - -// StartDeliveryStreamEncryptionRequest generates a "aws/request.Request" representing the -// client's request for the StartDeliveryStreamEncryption operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartDeliveryStreamEncryption for more information on using the StartDeliveryStreamEncryption -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartDeliveryStreamEncryptionRequest method. -// req, resp := client.StartDeliveryStreamEncryptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/StartDeliveryStreamEncryption -func (c *Firehose) StartDeliveryStreamEncryptionRequest(input *StartDeliveryStreamEncryptionInput) (req *request.Request, output *StartDeliveryStreamEncryptionOutput) { - op := &request.Operation{ - Name: opStartDeliveryStreamEncryption, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartDeliveryStreamEncryptionInput{} - } - - output = &StartDeliveryStreamEncryptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartDeliveryStreamEncryption API operation for Amazon Kinesis Firehose. -// -// Enables server-side encryption (SSE) for the delivery stream. -// -// This operation is asynchronous. It returns immediately. When you invoke it, -// Kinesis Data Firehose first sets the status of the stream to ENABLING, and -// then to ENABLED. You can continue to read and write data to your stream while -// its status is ENABLING, but the data is not encrypted. It can take up to -// 5 seconds after the encryption status changes to ENABLED before all records -// written to the delivery stream are encrypted. To find out whether a record -// or a batch of records was encrypted, check the response elements PutRecordOutput$Encrypted -// and PutRecordBatchOutput$Encrypted, respectively. -// -// To check the encryption state of a delivery stream, use DescribeDeliveryStream. -// -// You can only enable SSE for a delivery stream that uses DirectPut as its -// source. -// -// The StartDeliveryStreamEncryption and StopDeliveryStreamEncryption operations -// have a combined limit of 25 calls per delivery stream per 24 hours. For example, -// you reach the limit if you call StartDeliveryStreamEncryption 13 times and -// StopDeliveryStreamEncryption 12 times for the same delivery stream in a 24-hour -// period. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Firehose's -// API operation StartDeliveryStreamEncryption for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is already in use and not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// The specified input parameter has a value that is not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have already reached the limit for a requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/StartDeliveryStreamEncryption -func (c *Firehose) StartDeliveryStreamEncryption(input *StartDeliveryStreamEncryptionInput) (*StartDeliveryStreamEncryptionOutput, error) { - req, out := c.StartDeliveryStreamEncryptionRequest(input) - return out, req.Send() -} - -// StartDeliveryStreamEncryptionWithContext is the same as StartDeliveryStreamEncryption with the addition of -// the ability to pass a context and additional request options. -// -// See StartDeliveryStreamEncryption for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Firehose) StartDeliveryStreamEncryptionWithContext(ctx aws.Context, input *StartDeliveryStreamEncryptionInput, opts ...request.Option) (*StartDeliveryStreamEncryptionOutput, error) { - req, out := c.StartDeliveryStreamEncryptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopDeliveryStreamEncryption = "StopDeliveryStreamEncryption" - -// StopDeliveryStreamEncryptionRequest generates a "aws/request.Request" representing the -// client's request for the StopDeliveryStreamEncryption operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopDeliveryStreamEncryption for more information on using the StopDeliveryStreamEncryption -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopDeliveryStreamEncryptionRequest method. -// req, resp := client.StopDeliveryStreamEncryptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/StopDeliveryStreamEncryption -func (c *Firehose) StopDeliveryStreamEncryptionRequest(input *StopDeliveryStreamEncryptionInput) (req *request.Request, output *StopDeliveryStreamEncryptionOutput) { - op := &request.Operation{ - Name: opStopDeliveryStreamEncryption, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopDeliveryStreamEncryptionInput{} - } - - output = &StopDeliveryStreamEncryptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopDeliveryStreamEncryption API operation for Amazon Kinesis Firehose. -// -// Disables server-side encryption (SSE) for the delivery stream. -// -// This operation is asynchronous. It returns immediately. When you invoke it, -// Kinesis Data Firehose first sets the status of the stream to DISABLING, and -// then to DISABLED. You can continue to read and write data to your stream -// while its status is DISABLING. It can take up to 5 seconds after the encryption -// status changes to DISABLED before all records written to the delivery stream -// are no longer subject to encryption. To find out whether a record or a batch -// of records was encrypted, check the response elements PutRecordOutput$Encrypted -// and PutRecordBatchOutput$Encrypted, respectively. -// -// To check the encryption state of a delivery stream, use DescribeDeliveryStream. -// -// The StartDeliveryStreamEncryption and StopDeliveryStreamEncryption operations -// have a combined limit of 25 calls per delivery stream per 24 hours. For example, -// you reach the limit if you call StartDeliveryStreamEncryption 13 times and -// StopDeliveryStreamEncryption 12 times for the same delivery stream in a 24-hour -// period. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Firehose's -// API operation StopDeliveryStreamEncryption for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is already in use and not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// The specified input parameter has a value that is not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have already reached the limit for a requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/StopDeliveryStreamEncryption -func (c *Firehose) StopDeliveryStreamEncryption(input *StopDeliveryStreamEncryptionInput) (*StopDeliveryStreamEncryptionOutput, error) { - req, out := c.StopDeliveryStreamEncryptionRequest(input) - return out, req.Send() -} - -// StopDeliveryStreamEncryptionWithContext is the same as StopDeliveryStreamEncryption with the addition of -// the ability to pass a context and additional request options. -// -// See StopDeliveryStreamEncryption for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Firehose) StopDeliveryStreamEncryptionWithContext(ctx aws.Context, input *StopDeliveryStreamEncryptionInput, opts ...request.Option) (*StopDeliveryStreamEncryptionOutput, error) { - req, out := c.StopDeliveryStreamEncryptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagDeliveryStream = "TagDeliveryStream" - -// TagDeliveryStreamRequest generates a "aws/request.Request" representing the -// client's request for the TagDeliveryStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagDeliveryStream for more information on using the TagDeliveryStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TagDeliveryStreamRequest method. -// req, resp := client.TagDeliveryStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/TagDeliveryStream -func (c *Firehose) TagDeliveryStreamRequest(input *TagDeliveryStreamInput) (req *request.Request, output *TagDeliveryStreamOutput) { - op := &request.Operation{ - Name: opTagDeliveryStream, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagDeliveryStreamInput{} - } - - output = &TagDeliveryStreamOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagDeliveryStream API operation for Amazon Kinesis Firehose. -// -// Adds or updates tags for the specified delivery stream. A tag is a key-value -// pair that you can define and assign to AWS resources. If you specify a tag -// that already exists, the tag value is replaced with the value that you specify -// in the request. Tags are metadata. For example, you can add friendly names -// and descriptions or other types of information that can help you distinguish -// the delivery stream. For more information about tags, see Using Cost Allocation -// Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) -// in the AWS Billing and Cost Management User Guide. -// -// Each delivery stream can have up to 50 tags. -// -// This operation has a limit of five transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Firehose's -// API operation TagDeliveryStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is already in use and not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// The specified input parameter has a value that is not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have already reached the limit for a requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/TagDeliveryStream -func (c *Firehose) TagDeliveryStream(input *TagDeliveryStreamInput) (*TagDeliveryStreamOutput, error) { - req, out := c.TagDeliveryStreamRequest(input) - return out, req.Send() -} - -// TagDeliveryStreamWithContext is the same as TagDeliveryStream with the addition of -// the ability to pass a context and additional request options. -// -// See TagDeliveryStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Firehose) TagDeliveryStreamWithContext(ctx aws.Context, input *TagDeliveryStreamInput, opts ...request.Option) (*TagDeliveryStreamOutput, error) { - req, out := c.TagDeliveryStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagDeliveryStream = "UntagDeliveryStream" - -// UntagDeliveryStreamRequest generates a "aws/request.Request" representing the -// client's request for the UntagDeliveryStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagDeliveryStream for more information on using the UntagDeliveryStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UntagDeliveryStreamRequest method. -// req, resp := client.UntagDeliveryStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/UntagDeliveryStream -func (c *Firehose) UntagDeliveryStreamRequest(input *UntagDeliveryStreamInput) (req *request.Request, output *UntagDeliveryStreamOutput) { - op := &request.Operation{ - Name: opUntagDeliveryStream, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagDeliveryStreamInput{} - } - - output = &UntagDeliveryStreamOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagDeliveryStream API operation for Amazon Kinesis Firehose. -// -// Removes tags from the specified delivery stream. Removed tags are deleted, -// and you can't recover them after this operation successfully completes. -// -// If you specify a tag that doesn't exist, the operation ignores it. -// -// This operation has a limit of five transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Firehose's -// API operation UntagDeliveryStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is already in use and not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// The specified input parameter has a value that is not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You have already reached the limit for a requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/UntagDeliveryStream -func (c *Firehose) UntagDeliveryStream(input *UntagDeliveryStreamInput) (*UntagDeliveryStreamOutput, error) { - req, out := c.UntagDeliveryStreamRequest(input) - return out, req.Send() -} - -// UntagDeliveryStreamWithContext is the same as UntagDeliveryStream with the addition of -// the ability to pass a context and additional request options. -// -// See UntagDeliveryStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Firehose) UntagDeliveryStreamWithContext(ctx aws.Context, input *UntagDeliveryStreamInput, opts ...request.Option) (*UntagDeliveryStreamOutput, error) { - req, out := c.UntagDeliveryStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDestination = "UpdateDestination" - -// UpdateDestinationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDestination operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDestination for more information on using the UpdateDestination -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDestinationRequest method. -// req, resp := client.UpdateDestinationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/UpdateDestination -func (c *Firehose) UpdateDestinationRequest(input *UpdateDestinationInput) (req *request.Request, output *UpdateDestinationOutput) { - op := &request.Operation{ - Name: opUpdateDestination, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateDestinationInput{} - } - - output = &UpdateDestinationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateDestination API operation for Amazon Kinesis Firehose. -// -// Updates the specified destination of the specified delivery stream. -// -// Use this operation to change the destination type (for example, to replace -// the Amazon S3 destination with Amazon Redshift) or change the parameters -// associated with a destination (for example, to change the bucket name of -// the Amazon S3 destination). The update might not occur immediately. The target -// delivery stream remains active while the configurations are updated, so data -// writes to the delivery stream can continue during this process. The updated -// configurations are usually effective within a few minutes. -// -// Switching between Amazon ES and other services is not supported. For an Amazon -// ES destination, you can only update to another Amazon ES destination. -// -// If the destination type is the same, Kinesis Data Firehose merges the configuration -// parameters specified with the destination configuration that already exists -// on the delivery stream. If any of the parameters are not specified in the -// call, the existing values are retained. For example, in the Amazon S3 destination, -// if EncryptionConfiguration is not specified, then the existing EncryptionConfiguration -// is maintained on the destination. -// -// If the destination type is not the same, for example, changing the destination -// from Amazon S3 to Amazon Redshift, Kinesis Data Firehose does not merge any -// parameters. In this case, all parameters must be specified. -// -// Kinesis Data Firehose uses CurrentDeliveryStreamVersionId to avoid race conditions -// and conflicting merges. This is a required field, and the service updates -// the configuration only if the existing configuration has a version ID that -// matches. After the update is applied successfully, the version ID is updated, -// and can be retrieved using DescribeDeliveryStream. Use the new version ID -// to set CurrentDeliveryStreamVersionId in the next call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Firehose's -// API operation UpdateDestination for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// The specified input parameter has a value that is not valid. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is already in use and not available for this operation. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource could not be found. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification has already happened. Fetch VersionId again and use -// it to update the destination. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/UpdateDestination -func (c *Firehose) UpdateDestination(input *UpdateDestinationInput) (*UpdateDestinationOutput, error) { - req, out := c.UpdateDestinationRequest(input) - return out, req.Send() -} - -// UpdateDestinationWithContext is the same as UpdateDestination with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDestination for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Firehose) UpdateDestinationWithContext(ctx aws.Context, input *UpdateDestinationInput, opts ...request.Option) (*UpdateDestinationOutput, error) { - req, out := c.UpdateDestinationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Describes hints for the buffering to perform before delivering data to the -// destination. These options are treated as hints, and therefore Kinesis Data -// Firehose might choose to use different values when it is optimal. -type BufferingHints struct { - _ struct{} `type:"structure"` - - // Buffer incoming data for the specified period of time, in seconds, before - // delivering it to the destination. The default value is 300. - IntervalInSeconds *int64 `min:"60" type:"integer"` - - // Buffer incoming data to the specified size, in MBs, before delivering it - // to the destination. The default value is 5. - // - // We recommend setting this parameter to a value greater than the amount of - // data you typically ingest into the delivery stream in 10 seconds. For example, - // if you typically ingest data at 1 MB/sec, the value should be 10 MB or higher. - SizeInMBs *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s BufferingHints) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BufferingHints) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BufferingHints) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BufferingHints"} - if s.IntervalInSeconds != nil && *s.IntervalInSeconds < 60 { - invalidParams.Add(request.NewErrParamMinValue("IntervalInSeconds", 60)) - } - if s.SizeInMBs != nil && *s.SizeInMBs < 1 { - invalidParams.Add(request.NewErrParamMinValue("SizeInMBs", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIntervalInSeconds sets the IntervalInSeconds field's value. -func (s *BufferingHints) SetIntervalInSeconds(v int64) *BufferingHints { - s.IntervalInSeconds = &v - return s -} - -// SetSizeInMBs sets the SizeInMBs field's value. -func (s *BufferingHints) SetSizeInMBs(v int64) *BufferingHints { - s.SizeInMBs = &v - return s -} - -// Describes the Amazon CloudWatch logging options for your delivery stream. -type CloudWatchLoggingOptions struct { - _ struct{} `type:"structure"` - - // Enables or disables CloudWatch logging. - Enabled *bool `type:"boolean"` - - // The CloudWatch group name for logging. This value is required if CloudWatch - // logging is enabled. - LogGroupName *string `type:"string"` - - // The CloudWatch log stream name for logging. This value is required if CloudWatch - // logging is enabled. - LogStreamName *string `type:"string"` -} - -// String returns the string representation -func (s CloudWatchLoggingOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudWatchLoggingOptions) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *CloudWatchLoggingOptions) SetEnabled(v bool) *CloudWatchLoggingOptions { - s.Enabled = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *CloudWatchLoggingOptions) SetLogGroupName(v string) *CloudWatchLoggingOptions { - s.LogGroupName = &v - return s -} - -// SetLogStreamName sets the LogStreamName field's value. -func (s *CloudWatchLoggingOptions) SetLogStreamName(v string) *CloudWatchLoggingOptions { - s.LogStreamName = &v - return s -} - -// Describes a COPY command for Amazon Redshift. -type CopyCommand struct { - _ struct{} `type:"structure"` - - // Optional parameters to use with the Amazon Redshift COPY command. For more - // information, see the "Optional Parameters" section of Amazon Redshift COPY - // command (http://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html). Some - // possible examples that would apply to Kinesis Data Firehose are as follows: - // - // delimiter '\t' lzop; - fields are delimited with "\t" (TAB character) and - // compressed using lzop. - // - // delimiter '|' - fields are delimited with "|" (this is the default delimiter). - // - // delimiter '|' escape - the delimiter should be escaped. - // - // fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' - // - fields are fixed width in the source, with each width specified after every - // column in the table. - // - // JSON 's3://mybucket/jsonpaths.txt' - data is in JSON format, and the path - // specified is the format of the data. - // - // For more examples, see Amazon Redshift COPY command examples (http://docs.aws.amazon.com/redshift/latest/dg/r_COPY_command_examples.html). - CopyOptions *string `type:"string"` - - // A comma-separated list of column names. - DataTableColumns *string `type:"string"` - - // The name of the target table. The table must already exist in the database. - // - // DataTableName is a required field - DataTableName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyCommand) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyCommand) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyCommand) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyCommand"} - if s.DataTableName == nil { - invalidParams.Add(request.NewErrParamRequired("DataTableName")) - } - if s.DataTableName != nil && len(*s.DataTableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DataTableName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCopyOptions sets the CopyOptions field's value. -func (s *CopyCommand) SetCopyOptions(v string) *CopyCommand { - s.CopyOptions = &v - return s -} - -// SetDataTableColumns sets the DataTableColumns field's value. -func (s *CopyCommand) SetDataTableColumns(v string) *CopyCommand { - s.DataTableColumns = &v - return s -} - -// SetDataTableName sets the DataTableName field's value. -func (s *CopyCommand) SetDataTableName(v string) *CopyCommand { - s.DataTableName = &v - return s -} - -type CreateDeliveryStreamInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery stream. This name must be unique per AWS account - // in the same AWS Region. If the delivery streams are in different accounts - // or different Regions, you can have multiple delivery streams with the same - // name. - // - // DeliveryStreamName is a required field - DeliveryStreamName *string `min:"1" type:"string" required:"true"` - - // The delivery stream type. This parameter can be one of the following values: - // - // * DirectPut: Provider applications access the delivery stream directly. - // - // * KinesisStreamAsSource: The delivery stream uses a Kinesis data stream - // as a source. - DeliveryStreamType *string `type:"string" enum:"DeliveryStreamType"` - - // The destination in Amazon ES. You can specify only one destination. - ElasticsearchDestinationConfiguration *ElasticsearchDestinationConfiguration `type:"structure"` - - // The destination in Amazon S3. You can specify only one destination. - ExtendedS3DestinationConfiguration *ExtendedS3DestinationConfiguration `type:"structure"` - - // When a Kinesis data stream is used as the source for the delivery stream, - // a KinesisStreamSourceConfiguration containing the Kinesis data stream Amazon - // Resource Name (ARN) and the role ARN for the source stream. - KinesisStreamSourceConfiguration *KinesisStreamSourceConfiguration `type:"structure"` - - // The destination in Amazon Redshift. You can specify only one destination. - RedshiftDestinationConfiguration *RedshiftDestinationConfiguration `type:"structure"` - - // [Deprecated] The destination in Amazon S3. You can specify only one destination. - // - // Deprecated: S3DestinationConfiguration has been deprecated - S3DestinationConfiguration *S3DestinationConfiguration `deprecated:"true" type:"structure"` - - // The destination in Splunk. You can specify only one destination. - SplunkDestinationConfiguration *SplunkDestinationConfiguration `type:"structure"` - - // A set of tags to assign to the delivery stream. A tag is a key-value pair - // that you can define and assign to AWS resources. Tags are metadata. For example, - // you can add friendly names and descriptions or other types of information - // that can help you distinguish the delivery stream. For more information about - // tags, see Using Cost Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) - // in the AWS Billing and Cost Management User Guide. - // - // You can specify up to 50 tags when creating a delivery stream. - Tags []*Tag `min:"1" type:"list"` -} - -// String returns the string representation -func (s CreateDeliveryStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDeliveryStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDeliveryStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDeliveryStreamInput"} - if s.DeliveryStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) - } - if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.ElasticsearchDestinationConfiguration != nil { - if err := s.ElasticsearchDestinationConfiguration.Validate(); err != nil { - invalidParams.AddNested("ElasticsearchDestinationConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.ExtendedS3DestinationConfiguration != nil { - if err := s.ExtendedS3DestinationConfiguration.Validate(); err != nil { - invalidParams.AddNested("ExtendedS3DestinationConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.KinesisStreamSourceConfiguration != nil { - if err := s.KinesisStreamSourceConfiguration.Validate(); err != nil { - invalidParams.AddNested("KinesisStreamSourceConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.RedshiftDestinationConfiguration != nil { - if err := s.RedshiftDestinationConfiguration.Validate(); err != nil { - invalidParams.AddNested("RedshiftDestinationConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.S3DestinationConfiguration != nil { - if err := s.S3DestinationConfiguration.Validate(); err != nil { - invalidParams.AddNested("S3DestinationConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.SplunkDestinationConfiguration != nil { - if err := s.SplunkDestinationConfiguration.Validate(); err != nil { - invalidParams.AddNested("SplunkDestinationConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryStreamName sets the DeliveryStreamName field's value. -func (s *CreateDeliveryStreamInput) SetDeliveryStreamName(v string) *CreateDeliveryStreamInput { - s.DeliveryStreamName = &v - return s -} - -// SetDeliveryStreamType sets the DeliveryStreamType field's value. -func (s *CreateDeliveryStreamInput) SetDeliveryStreamType(v string) *CreateDeliveryStreamInput { - s.DeliveryStreamType = &v - return s -} - -// SetElasticsearchDestinationConfiguration sets the ElasticsearchDestinationConfiguration field's value. -func (s *CreateDeliveryStreamInput) SetElasticsearchDestinationConfiguration(v *ElasticsearchDestinationConfiguration) *CreateDeliveryStreamInput { - s.ElasticsearchDestinationConfiguration = v - return s -} - -// SetExtendedS3DestinationConfiguration sets the ExtendedS3DestinationConfiguration field's value. -func (s *CreateDeliveryStreamInput) SetExtendedS3DestinationConfiguration(v *ExtendedS3DestinationConfiguration) *CreateDeliveryStreamInput { - s.ExtendedS3DestinationConfiguration = v - return s -} - -// SetKinesisStreamSourceConfiguration sets the KinesisStreamSourceConfiguration field's value. -func (s *CreateDeliveryStreamInput) SetKinesisStreamSourceConfiguration(v *KinesisStreamSourceConfiguration) *CreateDeliveryStreamInput { - s.KinesisStreamSourceConfiguration = v - return s -} - -// SetRedshiftDestinationConfiguration sets the RedshiftDestinationConfiguration field's value. -func (s *CreateDeliveryStreamInput) SetRedshiftDestinationConfiguration(v *RedshiftDestinationConfiguration) *CreateDeliveryStreamInput { - s.RedshiftDestinationConfiguration = v - return s -} - -// SetS3DestinationConfiguration sets the S3DestinationConfiguration field's value. -func (s *CreateDeliveryStreamInput) SetS3DestinationConfiguration(v *S3DestinationConfiguration) *CreateDeliveryStreamInput { - s.S3DestinationConfiguration = v - return s -} - -// SetSplunkDestinationConfiguration sets the SplunkDestinationConfiguration field's value. -func (s *CreateDeliveryStreamInput) SetSplunkDestinationConfiguration(v *SplunkDestinationConfiguration) *CreateDeliveryStreamInput { - s.SplunkDestinationConfiguration = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDeliveryStreamInput) SetTags(v []*Tag) *CreateDeliveryStreamInput { - s.Tags = v - return s -} - -type CreateDeliveryStreamOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the delivery stream. - DeliveryStreamARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateDeliveryStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDeliveryStreamOutput) GoString() string { - return s.String() -} - -// SetDeliveryStreamARN sets the DeliveryStreamARN field's value. -func (s *CreateDeliveryStreamOutput) SetDeliveryStreamARN(v string) *CreateDeliveryStreamOutput { - s.DeliveryStreamARN = &v - return s -} - -// Specifies that you want Kinesis Data Firehose to convert data from the JSON -// format to the Parquet or ORC format before writing it to Amazon S3. Kinesis -// Data Firehose uses the serializer and deserializer that you specify, in addition -// to the column information from the AWS Glue table, to deserialize your input -// data from JSON and then serialize it to the Parquet or ORC format. For more -// information, see Kinesis Data Firehose Record Format Conversion (https://docs.aws.amazon.com/firehose/latest/dev/record-format-conversion.html). -type DataFormatConversionConfiguration struct { - _ struct{} `type:"structure"` - - // Defaults to true. Set it to false if you want to disable format conversion - // while preserving the configuration details. - Enabled *bool `type:"boolean"` - - // Specifies the deserializer that you want Kinesis Data Firehose to use to - // convert the format of your data from JSON. - InputFormatConfiguration *InputFormatConfiguration `type:"structure"` - - // Specifies the serializer that you want Kinesis Data Firehose to use to convert - // the format of your data to the Parquet or ORC format. - OutputFormatConfiguration *OutputFormatConfiguration `type:"structure"` - - // Specifies the AWS Glue Data Catalog table that contains the column information. - SchemaConfiguration *SchemaConfiguration `type:"structure"` -} - -// String returns the string representation -func (s DataFormatConversionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DataFormatConversionConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DataFormatConversionConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DataFormatConversionConfiguration"} - if s.OutputFormatConfiguration != nil { - if err := s.OutputFormatConfiguration.Validate(); err != nil { - invalidParams.AddNested("OutputFormatConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *DataFormatConversionConfiguration) SetEnabled(v bool) *DataFormatConversionConfiguration { - s.Enabled = &v - return s -} - -// SetInputFormatConfiguration sets the InputFormatConfiguration field's value. -func (s *DataFormatConversionConfiguration) SetInputFormatConfiguration(v *InputFormatConfiguration) *DataFormatConversionConfiguration { - s.InputFormatConfiguration = v - return s -} - -// SetOutputFormatConfiguration sets the OutputFormatConfiguration field's value. -func (s *DataFormatConversionConfiguration) SetOutputFormatConfiguration(v *OutputFormatConfiguration) *DataFormatConversionConfiguration { - s.OutputFormatConfiguration = v - return s -} - -// SetSchemaConfiguration sets the SchemaConfiguration field's value. -func (s *DataFormatConversionConfiguration) SetSchemaConfiguration(v *SchemaConfiguration) *DataFormatConversionConfiguration { - s.SchemaConfiguration = v - return s -} - -type DeleteDeliveryStreamInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery stream. - // - // DeliveryStreamName is a required field - DeliveryStreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDeliveryStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDeliveryStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDeliveryStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDeliveryStreamInput"} - if s.DeliveryStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) - } - if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryStreamName sets the DeliveryStreamName field's value. -func (s *DeleteDeliveryStreamInput) SetDeliveryStreamName(v string) *DeleteDeliveryStreamInput { - s.DeliveryStreamName = &v - return s -} - -type DeleteDeliveryStreamOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDeliveryStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDeliveryStreamOutput) GoString() string { - return s.String() -} - -// Contains information about a delivery stream. -type DeliveryStreamDescription struct { - _ struct{} `type:"structure"` - - // The date and time that the delivery stream was created. - CreateTimestamp *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the delivery stream. For more information, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // DeliveryStreamARN is a required field - DeliveryStreamARN *string `min:"1" type:"string" required:"true"` - - // Indicates the server-side encryption (SSE) status for the delivery stream. - DeliveryStreamEncryptionConfiguration *DeliveryStreamEncryptionConfiguration `type:"structure"` - - // The name of the delivery stream. - // - // DeliveryStreamName is a required field - DeliveryStreamName *string `min:"1" type:"string" required:"true"` - - // The status of the delivery stream. - // - // DeliveryStreamStatus is a required field - DeliveryStreamStatus *string `type:"string" required:"true" enum:"DeliveryStreamStatus"` - - // The delivery stream type. This can be one of the following values: - // - // * DirectPut: Provider applications access the delivery stream directly. - // - // * KinesisStreamAsSource: The delivery stream uses a Kinesis data stream - // as a source. - // - // DeliveryStreamType is a required field - DeliveryStreamType *string `type:"string" required:"true" enum:"DeliveryStreamType"` - - // The destinations. - // - // Destinations is a required field - Destinations []*DestinationDescription `type:"list" required:"true"` - - // Indicates whether there are more destinations available to list. - // - // HasMoreDestinations is a required field - HasMoreDestinations *bool `type:"boolean" required:"true"` - - // The date and time that the delivery stream was last updated. - LastUpdateTimestamp *time.Time `type:"timestamp"` - - // If the DeliveryStreamType parameter is KinesisStreamAsSource, a SourceDescription - // object describing the source Kinesis data stream. - Source *SourceDescription `type:"structure"` - - // Each time the destination is updated for a delivery stream, the version ID - // is changed, and the current version ID is required when updating the destination. - // This is so that the service knows it is applying the changes to the correct - // version of the delivery stream. - // - // VersionId is a required field - VersionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeliveryStreamDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeliveryStreamDescription) GoString() string { - return s.String() -} - -// SetCreateTimestamp sets the CreateTimestamp field's value. -func (s *DeliveryStreamDescription) SetCreateTimestamp(v time.Time) *DeliveryStreamDescription { - s.CreateTimestamp = &v - return s -} - -// SetDeliveryStreamARN sets the DeliveryStreamARN field's value. -func (s *DeliveryStreamDescription) SetDeliveryStreamARN(v string) *DeliveryStreamDescription { - s.DeliveryStreamARN = &v - return s -} - -// SetDeliveryStreamEncryptionConfiguration sets the DeliveryStreamEncryptionConfiguration field's value. -func (s *DeliveryStreamDescription) SetDeliveryStreamEncryptionConfiguration(v *DeliveryStreamEncryptionConfiguration) *DeliveryStreamDescription { - s.DeliveryStreamEncryptionConfiguration = v - return s -} - -// SetDeliveryStreamName sets the DeliveryStreamName field's value. -func (s *DeliveryStreamDescription) SetDeliveryStreamName(v string) *DeliveryStreamDescription { - s.DeliveryStreamName = &v - return s -} - -// SetDeliveryStreamStatus sets the DeliveryStreamStatus field's value. -func (s *DeliveryStreamDescription) SetDeliveryStreamStatus(v string) *DeliveryStreamDescription { - s.DeliveryStreamStatus = &v - return s -} - -// SetDeliveryStreamType sets the DeliveryStreamType field's value. -func (s *DeliveryStreamDescription) SetDeliveryStreamType(v string) *DeliveryStreamDescription { - s.DeliveryStreamType = &v - return s -} - -// SetDestinations sets the Destinations field's value. -func (s *DeliveryStreamDescription) SetDestinations(v []*DestinationDescription) *DeliveryStreamDescription { - s.Destinations = v - return s -} - -// SetHasMoreDestinations sets the HasMoreDestinations field's value. -func (s *DeliveryStreamDescription) SetHasMoreDestinations(v bool) *DeliveryStreamDescription { - s.HasMoreDestinations = &v - return s -} - -// SetLastUpdateTimestamp sets the LastUpdateTimestamp field's value. -func (s *DeliveryStreamDescription) SetLastUpdateTimestamp(v time.Time) *DeliveryStreamDescription { - s.LastUpdateTimestamp = &v - return s -} - -// SetSource sets the Source field's value. -func (s *DeliveryStreamDescription) SetSource(v *SourceDescription) *DeliveryStreamDescription { - s.Source = v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *DeliveryStreamDescription) SetVersionId(v string) *DeliveryStreamDescription { - s.VersionId = &v - return s -} - -// Indicates the server-side encryption (SSE) status for the delivery stream. -type DeliveryStreamEncryptionConfiguration struct { - _ struct{} `type:"structure"` - - // For a full description of the different values of this status, see StartDeliveryStreamEncryption - // and StopDeliveryStreamEncryption. - Status *string `type:"string" enum:"DeliveryStreamEncryptionStatus"` -} - -// String returns the string representation -func (s DeliveryStreamEncryptionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeliveryStreamEncryptionConfiguration) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *DeliveryStreamEncryptionConfiguration) SetStatus(v string) *DeliveryStreamEncryptionConfiguration { - s.Status = &v - return s -} - -type DescribeDeliveryStreamInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery stream. - // - // DeliveryStreamName is a required field - DeliveryStreamName *string `min:"1" type:"string" required:"true"` - - // The ID of the destination to start returning the destination information. - // Kinesis Data Firehose supports one destination per delivery stream. - ExclusiveStartDestinationId *string `min:"1" type:"string"` - - // The limit on the number of destinations to return. You can have one destination - // per delivery stream. - Limit *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s DescribeDeliveryStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDeliveryStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDeliveryStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDeliveryStreamInput"} - if s.DeliveryStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) - } - if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) - } - if s.ExclusiveStartDestinationId != nil && len(*s.ExclusiveStartDestinationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartDestinationId", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryStreamName sets the DeliveryStreamName field's value. -func (s *DescribeDeliveryStreamInput) SetDeliveryStreamName(v string) *DescribeDeliveryStreamInput { - s.DeliveryStreamName = &v - return s -} - -// SetExclusiveStartDestinationId sets the ExclusiveStartDestinationId field's value. -func (s *DescribeDeliveryStreamInput) SetExclusiveStartDestinationId(v string) *DescribeDeliveryStreamInput { - s.ExclusiveStartDestinationId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeDeliveryStreamInput) SetLimit(v int64) *DescribeDeliveryStreamInput { - s.Limit = &v - return s -} - -type DescribeDeliveryStreamOutput struct { - _ struct{} `type:"structure"` - - // Information about the delivery stream. - // - // DeliveryStreamDescription is a required field - DeliveryStreamDescription *DeliveryStreamDescription `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeDeliveryStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDeliveryStreamOutput) GoString() string { - return s.String() -} - -// SetDeliveryStreamDescription sets the DeliveryStreamDescription field's value. -func (s *DescribeDeliveryStreamOutput) SetDeliveryStreamDescription(v *DeliveryStreamDescription) *DescribeDeliveryStreamOutput { - s.DeliveryStreamDescription = v - return s -} - -// The deserializer you want Kinesis Data Firehose to use for converting the -// input data from JSON. Kinesis Data Firehose then serializes the data to its -// final format using the Serializer. Kinesis Data Firehose supports two types -// of deserializers: the Apache Hive JSON SerDe (https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-JSON) -// and the OpenX JSON SerDe (https://github.com/rcongiu/Hive-JSON-Serde). -type Deserializer struct { - _ struct{} `type:"structure"` - - // The native Hive / HCatalog JsonSerDe. Used by Kinesis Data Firehose for deserializing - // data, which means converting it from the JSON format in preparation for serializing - // it to the Parquet or ORC format. This is one of two deserializers you can - // choose, depending on which one offers the functionality you need. The other - // option is the OpenX SerDe. - HiveJsonSerDe *HiveJsonSerDe `type:"structure"` - - // The OpenX SerDe. Used by Kinesis Data Firehose for deserializing data, which - // means converting it from the JSON format in preparation for serializing it - // to the Parquet or ORC format. This is one of two deserializers you can choose, - // depending on which one offers the functionality you need. The other option - // is the native Hive / HCatalog JsonSerDe. - OpenXJsonSerDe *OpenXJsonSerDe `type:"structure"` -} - -// String returns the string representation -func (s Deserializer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Deserializer) GoString() string { - return s.String() -} - -// SetHiveJsonSerDe sets the HiveJsonSerDe field's value. -func (s *Deserializer) SetHiveJsonSerDe(v *HiveJsonSerDe) *Deserializer { - s.HiveJsonSerDe = v - return s -} - -// SetOpenXJsonSerDe sets the OpenXJsonSerDe field's value. -func (s *Deserializer) SetOpenXJsonSerDe(v *OpenXJsonSerDe) *Deserializer { - s.OpenXJsonSerDe = v - return s -} - -// Describes the destination for a delivery stream. -type DestinationDescription struct { - _ struct{} `type:"structure"` - - // The ID of the destination. - // - // DestinationId is a required field - DestinationId *string `min:"1" type:"string" required:"true"` - - // The destination in Amazon ES. - ElasticsearchDestinationDescription *ElasticsearchDestinationDescription `type:"structure"` - - // The destination in Amazon S3. - ExtendedS3DestinationDescription *ExtendedS3DestinationDescription `type:"structure"` - - // The destination in Amazon Redshift. - RedshiftDestinationDescription *RedshiftDestinationDescription `type:"structure"` - - // [Deprecated] The destination in Amazon S3. - S3DestinationDescription *S3DestinationDescription `type:"structure"` - - // The destination in Splunk. - SplunkDestinationDescription *SplunkDestinationDescription `type:"structure"` -} - -// String returns the string representation -func (s DestinationDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DestinationDescription) GoString() string { - return s.String() -} - -// SetDestinationId sets the DestinationId field's value. -func (s *DestinationDescription) SetDestinationId(v string) *DestinationDescription { - s.DestinationId = &v - return s -} - -// SetElasticsearchDestinationDescription sets the ElasticsearchDestinationDescription field's value. -func (s *DestinationDescription) SetElasticsearchDestinationDescription(v *ElasticsearchDestinationDescription) *DestinationDescription { - s.ElasticsearchDestinationDescription = v - return s -} - -// SetExtendedS3DestinationDescription sets the ExtendedS3DestinationDescription field's value. -func (s *DestinationDescription) SetExtendedS3DestinationDescription(v *ExtendedS3DestinationDescription) *DestinationDescription { - s.ExtendedS3DestinationDescription = v - return s -} - -// SetRedshiftDestinationDescription sets the RedshiftDestinationDescription field's value. -func (s *DestinationDescription) SetRedshiftDestinationDescription(v *RedshiftDestinationDescription) *DestinationDescription { - s.RedshiftDestinationDescription = v - return s -} - -// SetS3DestinationDescription sets the S3DestinationDescription field's value. -func (s *DestinationDescription) SetS3DestinationDescription(v *S3DestinationDescription) *DestinationDescription { - s.S3DestinationDescription = v - return s -} - -// SetSplunkDestinationDescription sets the SplunkDestinationDescription field's value. -func (s *DestinationDescription) SetSplunkDestinationDescription(v *SplunkDestinationDescription) *DestinationDescription { - s.SplunkDestinationDescription = v - return s -} - -// Describes the buffering to perform before delivering data to the Amazon ES -// destination. -type ElasticsearchBufferingHints struct { - _ struct{} `type:"structure"` - - // Buffer incoming data for the specified period of time, in seconds, before - // delivering it to the destination. The default value is 300 (5 minutes). - IntervalInSeconds *int64 `min:"60" type:"integer"` - - // Buffer incoming data to the specified size, in MBs, before delivering it - // to the destination. The default value is 5. - // - // We recommend setting this parameter to a value greater than the amount of - // data you typically ingest into the delivery stream in 10 seconds. For example, - // if you typically ingest data at 1 MB/sec, the value should be 10 MB or higher. - SizeInMBs *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s ElasticsearchBufferingHints) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticsearchBufferingHints) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ElasticsearchBufferingHints) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ElasticsearchBufferingHints"} - if s.IntervalInSeconds != nil && *s.IntervalInSeconds < 60 { - invalidParams.Add(request.NewErrParamMinValue("IntervalInSeconds", 60)) - } - if s.SizeInMBs != nil && *s.SizeInMBs < 1 { - invalidParams.Add(request.NewErrParamMinValue("SizeInMBs", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIntervalInSeconds sets the IntervalInSeconds field's value. -func (s *ElasticsearchBufferingHints) SetIntervalInSeconds(v int64) *ElasticsearchBufferingHints { - s.IntervalInSeconds = &v - return s -} - -// SetSizeInMBs sets the SizeInMBs field's value. -func (s *ElasticsearchBufferingHints) SetSizeInMBs(v int64) *ElasticsearchBufferingHints { - s.SizeInMBs = &v - return s -} - -// Describes the configuration of a destination in Amazon ES. -type ElasticsearchDestinationConfiguration struct { - _ struct{} `type:"structure"` - - // The buffering options. If no value is specified, the default values for ElasticsearchBufferingHints - // are used. - BufferingHints *ElasticsearchBufferingHints `type:"structure"` - - // The Amazon CloudWatch logging options for your delivery stream. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The ARN of the Amazon ES domain. The IAM role must have permissions for DescribeElasticsearchDomain, - // DescribeElasticsearchDomains, and DescribeElasticsearchDomainConfig after - // assuming the role specified in RoleARN. For more information, see Amazon - // Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // DomainARN is a required field - DomainARN *string `min:"1" type:"string" required:"true"` - - // The Elasticsearch index name. - // - // IndexName is a required field - IndexName *string `min:"1" type:"string" required:"true"` - - // The Elasticsearch index rotation period. Index rotation appends a timestamp - // to the IndexName to facilitate the expiration of old data. For more information, - // see Index Rotation for the Amazon ES Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). - // The default value is OneDay. - IndexRotationPeriod *string `type:"string" enum:"ElasticsearchIndexRotationPeriod"` - - // The data processing configuration. - ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - - // The retry behavior in case Kinesis Data Firehose is unable to deliver documents - // to Amazon ES. The default value is 300 (5 minutes). - RetryOptions *ElasticsearchRetryOptions `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data - // Firehose for calling the Amazon ES Configuration API and for indexing documents. - // For more information, see Grant Kinesis Data Firehose Access to an Amazon - // S3 Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) - // and Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` - - // Defines how documents should be delivered to Amazon S3. When it is set to - // FailedDocumentsOnly, Kinesis Data Firehose writes any documents that could - // not be indexed to the configured Amazon S3 destination, with elasticsearch-failed/ - // appended to the key prefix. When set to AllDocuments, Kinesis Data Firehose - // delivers all incoming records to Amazon S3, and also writes failed documents - // with elasticsearch-failed/ appended to the prefix. For more information, - // see Amazon S3 Backup for the Amazon ES Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-s3-backup). - // Default value is FailedDocumentsOnly. - S3BackupMode *string `type:"string" enum:"ElasticsearchS3BackupMode"` - - // The configuration for the backup Amazon S3 location. - // - // S3Configuration is a required field - S3Configuration *S3DestinationConfiguration `type:"structure" required:"true"` - - // The Elasticsearch type name. For Elasticsearch 6.x, there can be only one - // type per index. If you try to specify a new type for an existing index that - // already has another type, Kinesis Data Firehose returns an error during run - // time. - // - // TypeName is a required field - TypeName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ElasticsearchDestinationConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticsearchDestinationConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ElasticsearchDestinationConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ElasticsearchDestinationConfiguration"} - if s.DomainARN == nil { - invalidParams.Add(request.NewErrParamRequired("DomainARN")) - } - if s.DomainARN != nil && len(*s.DomainARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainARN", 1)) - } - if s.IndexName == nil { - invalidParams.Add(request.NewErrParamRequired("IndexName")) - } - if s.IndexName != nil && len(*s.IndexName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IndexName", 1)) - } - if s.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - if s.S3Configuration == nil { - invalidParams.Add(request.NewErrParamRequired("S3Configuration")) - } - if s.TypeName == nil { - invalidParams.Add(request.NewErrParamRequired("TypeName")) - } - if s.TypeName != nil && len(*s.TypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) - } - if s.BufferingHints != nil { - if err := s.BufferingHints.Validate(); err != nil { - invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams)) - } - } - if s.ProcessingConfiguration != nil { - if err := s.ProcessingConfiguration.Validate(); err != nil { - invalidParams.AddNested("ProcessingConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.S3Configuration != nil { - if err := s.S3Configuration.Validate(); err != nil { - invalidParams.AddNested("S3Configuration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBufferingHints sets the BufferingHints field's value. -func (s *ElasticsearchDestinationConfiguration) SetBufferingHints(v *ElasticsearchBufferingHints) *ElasticsearchDestinationConfiguration { - s.BufferingHints = v - return s -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *ElasticsearchDestinationConfiguration) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *ElasticsearchDestinationConfiguration { - s.CloudWatchLoggingOptions = v - return s -} - -// SetDomainARN sets the DomainARN field's value. -func (s *ElasticsearchDestinationConfiguration) SetDomainARN(v string) *ElasticsearchDestinationConfiguration { - s.DomainARN = &v - return s -} - -// SetIndexName sets the IndexName field's value. -func (s *ElasticsearchDestinationConfiguration) SetIndexName(v string) *ElasticsearchDestinationConfiguration { - s.IndexName = &v - return s -} - -// SetIndexRotationPeriod sets the IndexRotationPeriod field's value. -func (s *ElasticsearchDestinationConfiguration) SetIndexRotationPeriod(v string) *ElasticsearchDestinationConfiguration { - s.IndexRotationPeriod = &v - return s -} - -// SetProcessingConfiguration sets the ProcessingConfiguration field's value. -func (s *ElasticsearchDestinationConfiguration) SetProcessingConfiguration(v *ProcessingConfiguration) *ElasticsearchDestinationConfiguration { - s.ProcessingConfiguration = v - return s -} - -// SetRetryOptions sets the RetryOptions field's value. -func (s *ElasticsearchDestinationConfiguration) SetRetryOptions(v *ElasticsearchRetryOptions) *ElasticsearchDestinationConfiguration { - s.RetryOptions = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *ElasticsearchDestinationConfiguration) SetRoleARN(v string) *ElasticsearchDestinationConfiguration { - s.RoleARN = &v - return s -} - -// SetS3BackupMode sets the S3BackupMode field's value. -func (s *ElasticsearchDestinationConfiguration) SetS3BackupMode(v string) *ElasticsearchDestinationConfiguration { - s.S3BackupMode = &v - return s -} - -// SetS3Configuration sets the S3Configuration field's value. -func (s *ElasticsearchDestinationConfiguration) SetS3Configuration(v *S3DestinationConfiguration) *ElasticsearchDestinationConfiguration { - s.S3Configuration = v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *ElasticsearchDestinationConfiguration) SetTypeName(v string) *ElasticsearchDestinationConfiguration { - s.TypeName = &v - return s -} - -// The destination description in Amazon ES. -type ElasticsearchDestinationDescription struct { - _ struct{} `type:"structure"` - - // The buffering options. - BufferingHints *ElasticsearchBufferingHints `type:"structure"` - - // The Amazon CloudWatch logging options. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The ARN of the Amazon ES domain. For more information, see Amazon Resource - // Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - DomainARN *string `min:"1" type:"string"` - - // The Elasticsearch index name. - IndexName *string `min:"1" type:"string"` - - // The Elasticsearch index rotation period - IndexRotationPeriod *string `type:"string" enum:"ElasticsearchIndexRotationPeriod"` - - // The data processing configuration. - ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - - // The Amazon ES retry options. - RetryOptions *ElasticsearchRetryOptions `type:"structure"` - - // The Amazon Resource Name (ARN) of the AWS credentials. For more information, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - RoleARN *string `min:"1" type:"string"` - - // The Amazon S3 backup mode. - S3BackupMode *string `type:"string" enum:"ElasticsearchS3BackupMode"` - - // The Amazon S3 destination. - S3DestinationDescription *S3DestinationDescription `type:"structure"` - - // The Elasticsearch type name. - TypeName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ElasticsearchDestinationDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticsearchDestinationDescription) GoString() string { - return s.String() -} - -// SetBufferingHints sets the BufferingHints field's value. -func (s *ElasticsearchDestinationDescription) SetBufferingHints(v *ElasticsearchBufferingHints) *ElasticsearchDestinationDescription { - s.BufferingHints = v - return s -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *ElasticsearchDestinationDescription) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *ElasticsearchDestinationDescription { - s.CloudWatchLoggingOptions = v - return s -} - -// SetDomainARN sets the DomainARN field's value. -func (s *ElasticsearchDestinationDescription) SetDomainARN(v string) *ElasticsearchDestinationDescription { - s.DomainARN = &v - return s -} - -// SetIndexName sets the IndexName field's value. -func (s *ElasticsearchDestinationDescription) SetIndexName(v string) *ElasticsearchDestinationDescription { - s.IndexName = &v - return s -} - -// SetIndexRotationPeriod sets the IndexRotationPeriod field's value. -func (s *ElasticsearchDestinationDescription) SetIndexRotationPeriod(v string) *ElasticsearchDestinationDescription { - s.IndexRotationPeriod = &v - return s -} - -// SetProcessingConfiguration sets the ProcessingConfiguration field's value. -func (s *ElasticsearchDestinationDescription) SetProcessingConfiguration(v *ProcessingConfiguration) *ElasticsearchDestinationDescription { - s.ProcessingConfiguration = v - return s -} - -// SetRetryOptions sets the RetryOptions field's value. -func (s *ElasticsearchDestinationDescription) SetRetryOptions(v *ElasticsearchRetryOptions) *ElasticsearchDestinationDescription { - s.RetryOptions = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *ElasticsearchDestinationDescription) SetRoleARN(v string) *ElasticsearchDestinationDescription { - s.RoleARN = &v - return s -} - -// SetS3BackupMode sets the S3BackupMode field's value. -func (s *ElasticsearchDestinationDescription) SetS3BackupMode(v string) *ElasticsearchDestinationDescription { - s.S3BackupMode = &v - return s -} - -// SetS3DestinationDescription sets the S3DestinationDescription field's value. -func (s *ElasticsearchDestinationDescription) SetS3DestinationDescription(v *S3DestinationDescription) *ElasticsearchDestinationDescription { - s.S3DestinationDescription = v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *ElasticsearchDestinationDescription) SetTypeName(v string) *ElasticsearchDestinationDescription { - s.TypeName = &v - return s -} - -// Describes an update for a destination in Amazon ES. -type ElasticsearchDestinationUpdate struct { - _ struct{} `type:"structure"` - - // The buffering options. If no value is specified, ElasticsearchBufferingHints - // object default values are used. - BufferingHints *ElasticsearchBufferingHints `type:"structure"` - - // The CloudWatch logging options for your delivery stream. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The ARN of the Amazon ES domain. The IAM role must have permissions for DescribeElasticsearchDomain, - // DescribeElasticsearchDomains, and DescribeElasticsearchDomainConfig after - // assuming the IAM role specified in RoleARN. For more information, see Amazon - // Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - DomainARN *string `min:"1" type:"string"` - - // The Elasticsearch index name. - IndexName *string `min:"1" type:"string"` - - // The Elasticsearch index rotation period. Index rotation appends a timestamp - // to IndexName to facilitate the expiration of old data. For more information, - // see Index Rotation for the Amazon ES Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). - // Default value is OneDay. - IndexRotationPeriod *string `type:"string" enum:"ElasticsearchIndexRotationPeriod"` - - // The data processing configuration. - ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - - // The retry behavior in case Kinesis Data Firehose is unable to deliver documents - // to Amazon ES. The default value is 300 (5 minutes). - RetryOptions *ElasticsearchRetryOptions `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data - // Firehose for calling the Amazon ES Configuration API and for indexing documents. - // For more information, see Grant Kinesis Data Firehose Access to an Amazon - // S3 Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) - // and Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - RoleARN *string `min:"1" type:"string"` - - // The Amazon S3 destination. - S3Update *S3DestinationUpdate `type:"structure"` - - // The Elasticsearch type name. For Elasticsearch 6.x, there can be only one - // type per index. If you try to specify a new type for an existing index that - // already has another type, Kinesis Data Firehose returns an error during runtime. - TypeName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ElasticsearchDestinationUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticsearchDestinationUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ElasticsearchDestinationUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ElasticsearchDestinationUpdate"} - if s.DomainARN != nil && len(*s.DomainARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainARN", 1)) - } - if s.IndexName != nil && len(*s.IndexName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IndexName", 1)) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - if s.TypeName != nil && len(*s.TypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) - } - if s.BufferingHints != nil { - if err := s.BufferingHints.Validate(); err != nil { - invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams)) - } - } - if s.ProcessingConfiguration != nil { - if err := s.ProcessingConfiguration.Validate(); err != nil { - invalidParams.AddNested("ProcessingConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.S3Update != nil { - if err := s.S3Update.Validate(); err != nil { - invalidParams.AddNested("S3Update", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBufferingHints sets the BufferingHints field's value. -func (s *ElasticsearchDestinationUpdate) SetBufferingHints(v *ElasticsearchBufferingHints) *ElasticsearchDestinationUpdate { - s.BufferingHints = v - return s -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *ElasticsearchDestinationUpdate) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *ElasticsearchDestinationUpdate { - s.CloudWatchLoggingOptions = v - return s -} - -// SetDomainARN sets the DomainARN field's value. -func (s *ElasticsearchDestinationUpdate) SetDomainARN(v string) *ElasticsearchDestinationUpdate { - s.DomainARN = &v - return s -} - -// SetIndexName sets the IndexName field's value. -func (s *ElasticsearchDestinationUpdate) SetIndexName(v string) *ElasticsearchDestinationUpdate { - s.IndexName = &v - return s -} - -// SetIndexRotationPeriod sets the IndexRotationPeriod field's value. -func (s *ElasticsearchDestinationUpdate) SetIndexRotationPeriod(v string) *ElasticsearchDestinationUpdate { - s.IndexRotationPeriod = &v - return s -} - -// SetProcessingConfiguration sets the ProcessingConfiguration field's value. -func (s *ElasticsearchDestinationUpdate) SetProcessingConfiguration(v *ProcessingConfiguration) *ElasticsearchDestinationUpdate { - s.ProcessingConfiguration = v - return s -} - -// SetRetryOptions sets the RetryOptions field's value. -func (s *ElasticsearchDestinationUpdate) SetRetryOptions(v *ElasticsearchRetryOptions) *ElasticsearchDestinationUpdate { - s.RetryOptions = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *ElasticsearchDestinationUpdate) SetRoleARN(v string) *ElasticsearchDestinationUpdate { - s.RoleARN = &v - return s -} - -// SetS3Update sets the S3Update field's value. -func (s *ElasticsearchDestinationUpdate) SetS3Update(v *S3DestinationUpdate) *ElasticsearchDestinationUpdate { - s.S3Update = v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *ElasticsearchDestinationUpdate) SetTypeName(v string) *ElasticsearchDestinationUpdate { - s.TypeName = &v - return s -} - -// Configures retry behavior in case Kinesis Data Firehose is unable to deliver -// documents to Amazon ES. -type ElasticsearchRetryOptions struct { - _ struct{} `type:"structure"` - - // After an initial failure to deliver to Amazon ES, the total amount of time - // during which Kinesis Data Firehose retries delivery (including the first - // attempt). After this time has elapsed, the failed documents are written to - // Amazon S3. Default value is 300 seconds (5 minutes). A value of 0 (zero) - // results in no retries. - DurationInSeconds *int64 `type:"integer"` -} - -// String returns the string representation -func (s ElasticsearchRetryOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticsearchRetryOptions) GoString() string { - return s.String() -} - -// SetDurationInSeconds sets the DurationInSeconds field's value. -func (s *ElasticsearchRetryOptions) SetDurationInSeconds(v int64) *ElasticsearchRetryOptions { - s.DurationInSeconds = &v - return s -} - -// Describes the encryption for a destination in Amazon S3. -type EncryptionConfiguration struct { - _ struct{} `type:"structure"` - - // The encryption key. - KMSEncryptionConfig *KMSEncryptionConfig `type:"structure"` - - // Specifically override existing encryption information to ensure that no encryption - // is used. - NoEncryptionConfig *string `type:"string" enum:"NoEncryptionConfig"` -} - -// String returns the string representation -func (s EncryptionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EncryptionConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EncryptionConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EncryptionConfiguration"} - if s.KMSEncryptionConfig != nil { - if err := s.KMSEncryptionConfig.Validate(); err != nil { - invalidParams.AddNested("KMSEncryptionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKMSEncryptionConfig sets the KMSEncryptionConfig field's value. -func (s *EncryptionConfiguration) SetKMSEncryptionConfig(v *KMSEncryptionConfig) *EncryptionConfiguration { - s.KMSEncryptionConfig = v - return s -} - -// SetNoEncryptionConfig sets the NoEncryptionConfig field's value. -func (s *EncryptionConfiguration) SetNoEncryptionConfig(v string) *EncryptionConfiguration { - s.NoEncryptionConfig = &v - return s -} - -// Describes the configuration of a destination in Amazon S3. -type ExtendedS3DestinationConfiguration struct { - _ struct{} `type:"structure"` - - // The ARN of the S3 bucket. For more information, see Amazon Resource Names - // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // BucketARN is a required field - BucketARN *string `min:"1" type:"string" required:"true"` - - // The buffering option. - BufferingHints *BufferingHints `type:"structure"` - - // The Amazon CloudWatch logging options for your delivery stream. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The compression format. If no value is specified, the default is UNCOMPRESSED. - CompressionFormat *string `type:"string" enum:"CompressionFormat"` - - // The serializer, deserializer, and schema for converting data from the JSON - // format to the Parquet or ORC format before writing it to Amazon S3. - DataFormatConversionConfiguration *DataFormatConversionConfiguration `type:"structure"` - - // The encryption configuration. If no value is specified, the default is no - // encryption. - EncryptionConfiguration *EncryptionConfiguration `type:"structure"` - - // A prefix that Kinesis Data Firehose evaluates and adds to failed records - // before writing them to S3. This prefix appears immediately following the - // bucket name. - ErrorOutputPrefix *string `type:"string"` - - // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // Amazon S3 files. You can specify an extra prefix to be added in front of - // the time format prefix. If the prefix ends with a slash, it appears as a - // folder in the S3 bucket. For more information, see Amazon S3 Object Name - // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) - // in the Amazon Kinesis Data Firehose Developer Guide. - Prefix *string `type:"string"` - - // The data processing configuration. - ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - - // The Amazon Resource Name (ARN) of the AWS credentials. For more information, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` - - // The configuration for backup in Amazon S3. - S3BackupConfiguration *S3DestinationConfiguration `type:"structure"` - - // The Amazon S3 backup mode. - S3BackupMode *string `type:"string" enum:"S3BackupMode"` -} - -// String returns the string representation -func (s ExtendedS3DestinationConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExtendedS3DestinationConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExtendedS3DestinationConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExtendedS3DestinationConfiguration"} - if s.BucketARN == nil { - invalidParams.Add(request.NewErrParamRequired("BucketARN")) - } - if s.BucketARN != nil && len(*s.BucketARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BucketARN", 1)) - } - if s.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - if s.BufferingHints != nil { - if err := s.BufferingHints.Validate(); err != nil { - invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams)) - } - } - if s.DataFormatConversionConfiguration != nil { - if err := s.DataFormatConversionConfiguration.Validate(); err != nil { - invalidParams.AddNested("DataFormatConversionConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.EncryptionConfiguration != nil { - if err := s.EncryptionConfiguration.Validate(); err != nil { - invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.ProcessingConfiguration != nil { - if err := s.ProcessingConfiguration.Validate(); err != nil { - invalidParams.AddNested("ProcessingConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.S3BackupConfiguration != nil { - if err := s.S3BackupConfiguration.Validate(); err != nil { - invalidParams.AddNested("S3BackupConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketARN sets the BucketARN field's value. -func (s *ExtendedS3DestinationConfiguration) SetBucketARN(v string) *ExtendedS3DestinationConfiguration { - s.BucketARN = &v - return s -} - -// SetBufferingHints sets the BufferingHints field's value. -func (s *ExtendedS3DestinationConfiguration) SetBufferingHints(v *BufferingHints) *ExtendedS3DestinationConfiguration { - s.BufferingHints = v - return s -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *ExtendedS3DestinationConfiguration) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *ExtendedS3DestinationConfiguration { - s.CloudWatchLoggingOptions = v - return s -} - -// SetCompressionFormat sets the CompressionFormat field's value. -func (s *ExtendedS3DestinationConfiguration) SetCompressionFormat(v string) *ExtendedS3DestinationConfiguration { - s.CompressionFormat = &v - return s -} - -// SetDataFormatConversionConfiguration sets the DataFormatConversionConfiguration field's value. -func (s *ExtendedS3DestinationConfiguration) SetDataFormatConversionConfiguration(v *DataFormatConversionConfiguration) *ExtendedS3DestinationConfiguration { - s.DataFormatConversionConfiguration = v - return s -} - -// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. -func (s *ExtendedS3DestinationConfiguration) SetEncryptionConfiguration(v *EncryptionConfiguration) *ExtendedS3DestinationConfiguration { - s.EncryptionConfiguration = v - return s -} - -// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. -func (s *ExtendedS3DestinationConfiguration) SetErrorOutputPrefix(v string) *ExtendedS3DestinationConfiguration { - s.ErrorOutputPrefix = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *ExtendedS3DestinationConfiguration) SetPrefix(v string) *ExtendedS3DestinationConfiguration { - s.Prefix = &v - return s -} - -// SetProcessingConfiguration sets the ProcessingConfiguration field's value. -func (s *ExtendedS3DestinationConfiguration) SetProcessingConfiguration(v *ProcessingConfiguration) *ExtendedS3DestinationConfiguration { - s.ProcessingConfiguration = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *ExtendedS3DestinationConfiguration) SetRoleARN(v string) *ExtendedS3DestinationConfiguration { - s.RoleARN = &v - return s -} - -// SetS3BackupConfiguration sets the S3BackupConfiguration field's value. -func (s *ExtendedS3DestinationConfiguration) SetS3BackupConfiguration(v *S3DestinationConfiguration) *ExtendedS3DestinationConfiguration { - s.S3BackupConfiguration = v - return s -} - -// SetS3BackupMode sets the S3BackupMode field's value. -func (s *ExtendedS3DestinationConfiguration) SetS3BackupMode(v string) *ExtendedS3DestinationConfiguration { - s.S3BackupMode = &v - return s -} - -// Describes a destination in Amazon S3. -type ExtendedS3DestinationDescription struct { - _ struct{} `type:"structure"` - - // The ARN of the S3 bucket. For more information, see Amazon Resource Names - // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // BucketARN is a required field - BucketARN *string `min:"1" type:"string" required:"true"` - - // The buffering option. - // - // BufferingHints is a required field - BufferingHints *BufferingHints `type:"structure" required:"true"` - - // The Amazon CloudWatch logging options for your delivery stream. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The compression format. If no value is specified, the default is UNCOMPRESSED. - // - // CompressionFormat is a required field - CompressionFormat *string `type:"string" required:"true" enum:"CompressionFormat"` - - // The serializer, deserializer, and schema for converting data from the JSON - // format to the Parquet or ORC format before writing it to Amazon S3. - DataFormatConversionConfiguration *DataFormatConversionConfiguration `type:"structure"` - - // The encryption configuration. If no value is specified, the default is no - // encryption. - // - // EncryptionConfiguration is a required field - EncryptionConfiguration *EncryptionConfiguration `type:"structure" required:"true"` - - // A prefix that Kinesis Data Firehose evaluates and adds to failed records - // before writing them to S3. This prefix appears immediately following the - // bucket name. - ErrorOutputPrefix *string `type:"string"` - - // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // Amazon S3 files. You can specify an extra prefix to be added in front of - // the time format prefix. If the prefix ends with a slash, it appears as a - // folder in the S3 bucket. For more information, see Amazon S3 Object Name - // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) - // in the Amazon Kinesis Data Firehose Developer Guide. - Prefix *string `type:"string"` - - // The data processing configuration. - ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - - // The Amazon Resource Name (ARN) of the AWS credentials. For more information, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` - - // The configuration for backup in Amazon S3. - S3BackupDescription *S3DestinationDescription `type:"structure"` - - // The Amazon S3 backup mode. - S3BackupMode *string `type:"string" enum:"S3BackupMode"` -} - -// String returns the string representation -func (s ExtendedS3DestinationDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExtendedS3DestinationDescription) GoString() string { - return s.String() -} - -// SetBucketARN sets the BucketARN field's value. -func (s *ExtendedS3DestinationDescription) SetBucketARN(v string) *ExtendedS3DestinationDescription { - s.BucketARN = &v - return s -} - -// SetBufferingHints sets the BufferingHints field's value. -func (s *ExtendedS3DestinationDescription) SetBufferingHints(v *BufferingHints) *ExtendedS3DestinationDescription { - s.BufferingHints = v - return s -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *ExtendedS3DestinationDescription) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *ExtendedS3DestinationDescription { - s.CloudWatchLoggingOptions = v - return s -} - -// SetCompressionFormat sets the CompressionFormat field's value. -func (s *ExtendedS3DestinationDescription) SetCompressionFormat(v string) *ExtendedS3DestinationDescription { - s.CompressionFormat = &v - return s -} - -// SetDataFormatConversionConfiguration sets the DataFormatConversionConfiguration field's value. -func (s *ExtendedS3DestinationDescription) SetDataFormatConversionConfiguration(v *DataFormatConversionConfiguration) *ExtendedS3DestinationDescription { - s.DataFormatConversionConfiguration = v - return s -} - -// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. -func (s *ExtendedS3DestinationDescription) SetEncryptionConfiguration(v *EncryptionConfiguration) *ExtendedS3DestinationDescription { - s.EncryptionConfiguration = v - return s -} - -// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. -func (s *ExtendedS3DestinationDescription) SetErrorOutputPrefix(v string) *ExtendedS3DestinationDescription { - s.ErrorOutputPrefix = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *ExtendedS3DestinationDescription) SetPrefix(v string) *ExtendedS3DestinationDescription { - s.Prefix = &v - return s -} - -// SetProcessingConfiguration sets the ProcessingConfiguration field's value. -func (s *ExtendedS3DestinationDescription) SetProcessingConfiguration(v *ProcessingConfiguration) *ExtendedS3DestinationDescription { - s.ProcessingConfiguration = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *ExtendedS3DestinationDescription) SetRoleARN(v string) *ExtendedS3DestinationDescription { - s.RoleARN = &v - return s -} - -// SetS3BackupDescription sets the S3BackupDescription field's value. -func (s *ExtendedS3DestinationDescription) SetS3BackupDescription(v *S3DestinationDescription) *ExtendedS3DestinationDescription { - s.S3BackupDescription = v - return s -} - -// SetS3BackupMode sets the S3BackupMode field's value. -func (s *ExtendedS3DestinationDescription) SetS3BackupMode(v string) *ExtendedS3DestinationDescription { - s.S3BackupMode = &v - return s -} - -// Describes an update for a destination in Amazon S3. -type ExtendedS3DestinationUpdate struct { - _ struct{} `type:"structure"` - - // The ARN of the S3 bucket. For more information, see Amazon Resource Names - // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - BucketARN *string `min:"1" type:"string"` - - // The buffering option. - BufferingHints *BufferingHints `type:"structure"` - - // The Amazon CloudWatch logging options for your delivery stream. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The compression format. If no value is specified, the default is UNCOMPRESSED. - CompressionFormat *string `type:"string" enum:"CompressionFormat"` - - // The serializer, deserializer, and schema for converting data from the JSON - // format to the Parquet or ORC format before writing it to Amazon S3. - DataFormatConversionConfiguration *DataFormatConversionConfiguration `type:"structure"` - - // The encryption configuration. If no value is specified, the default is no - // encryption. - EncryptionConfiguration *EncryptionConfiguration `type:"structure"` - - // A prefix that Kinesis Data Firehose evaluates and adds to failed records - // before writing them to S3. This prefix appears immediately following the - // bucket name. - ErrorOutputPrefix *string `type:"string"` - - // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // Amazon S3 files. You can specify an extra prefix to be added in front of - // the time format prefix. If the prefix ends with a slash, it appears as a - // folder in the S3 bucket. For more information, see Amazon S3 Object Name - // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) - // in the Amazon Kinesis Data Firehose Developer Guide. - Prefix *string `type:"string"` - - // The data processing configuration. - ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - - // The Amazon Resource Name (ARN) of the AWS credentials. For more information, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - RoleARN *string `min:"1" type:"string"` - - // Enables or disables Amazon S3 backup mode. - S3BackupMode *string `type:"string" enum:"S3BackupMode"` - - // The Amazon S3 destination for backup. - S3BackupUpdate *S3DestinationUpdate `type:"structure"` -} - -// String returns the string representation -func (s ExtendedS3DestinationUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExtendedS3DestinationUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExtendedS3DestinationUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExtendedS3DestinationUpdate"} - if s.BucketARN != nil && len(*s.BucketARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BucketARN", 1)) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - if s.BufferingHints != nil { - if err := s.BufferingHints.Validate(); err != nil { - invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams)) - } - } - if s.DataFormatConversionConfiguration != nil { - if err := s.DataFormatConversionConfiguration.Validate(); err != nil { - invalidParams.AddNested("DataFormatConversionConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.EncryptionConfiguration != nil { - if err := s.EncryptionConfiguration.Validate(); err != nil { - invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.ProcessingConfiguration != nil { - if err := s.ProcessingConfiguration.Validate(); err != nil { - invalidParams.AddNested("ProcessingConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.S3BackupUpdate != nil { - if err := s.S3BackupUpdate.Validate(); err != nil { - invalidParams.AddNested("S3BackupUpdate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketARN sets the BucketARN field's value. -func (s *ExtendedS3DestinationUpdate) SetBucketARN(v string) *ExtendedS3DestinationUpdate { - s.BucketARN = &v - return s -} - -// SetBufferingHints sets the BufferingHints field's value. -func (s *ExtendedS3DestinationUpdate) SetBufferingHints(v *BufferingHints) *ExtendedS3DestinationUpdate { - s.BufferingHints = v - return s -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *ExtendedS3DestinationUpdate) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *ExtendedS3DestinationUpdate { - s.CloudWatchLoggingOptions = v - return s -} - -// SetCompressionFormat sets the CompressionFormat field's value. -func (s *ExtendedS3DestinationUpdate) SetCompressionFormat(v string) *ExtendedS3DestinationUpdate { - s.CompressionFormat = &v - return s -} - -// SetDataFormatConversionConfiguration sets the DataFormatConversionConfiguration field's value. -func (s *ExtendedS3DestinationUpdate) SetDataFormatConversionConfiguration(v *DataFormatConversionConfiguration) *ExtendedS3DestinationUpdate { - s.DataFormatConversionConfiguration = v - return s -} - -// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. -func (s *ExtendedS3DestinationUpdate) SetEncryptionConfiguration(v *EncryptionConfiguration) *ExtendedS3DestinationUpdate { - s.EncryptionConfiguration = v - return s -} - -// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. -func (s *ExtendedS3DestinationUpdate) SetErrorOutputPrefix(v string) *ExtendedS3DestinationUpdate { - s.ErrorOutputPrefix = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *ExtendedS3DestinationUpdate) SetPrefix(v string) *ExtendedS3DestinationUpdate { - s.Prefix = &v - return s -} - -// SetProcessingConfiguration sets the ProcessingConfiguration field's value. -func (s *ExtendedS3DestinationUpdate) SetProcessingConfiguration(v *ProcessingConfiguration) *ExtendedS3DestinationUpdate { - s.ProcessingConfiguration = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *ExtendedS3DestinationUpdate) SetRoleARN(v string) *ExtendedS3DestinationUpdate { - s.RoleARN = &v - return s -} - -// SetS3BackupMode sets the S3BackupMode field's value. -func (s *ExtendedS3DestinationUpdate) SetS3BackupMode(v string) *ExtendedS3DestinationUpdate { - s.S3BackupMode = &v - return s -} - -// SetS3BackupUpdate sets the S3BackupUpdate field's value. -func (s *ExtendedS3DestinationUpdate) SetS3BackupUpdate(v *S3DestinationUpdate) *ExtendedS3DestinationUpdate { - s.S3BackupUpdate = v - return s -} - -// The native Hive / HCatalog JsonSerDe. Used by Kinesis Data Firehose for deserializing -// data, which means converting it from the JSON format in preparation for serializing -// it to the Parquet or ORC format. This is one of two deserializers you can -// choose, depending on which one offers the functionality you need. The other -// option is the OpenX SerDe. -type HiveJsonSerDe struct { - _ struct{} `type:"structure"` - - // Indicates how you want Kinesis Data Firehose to parse the date and timestamps - // that may be present in your input data JSON. To specify these format strings, - // follow the pattern syntax of JodaTime's DateTimeFormat format strings. For - // more information, see Class DateTimeFormat (https://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html). - // You can also use the special value millis to parse timestamps in epoch milliseconds. - // If you don't specify a format, Kinesis Data Firehose uses java.sql.Timestamp::valueOf - // by default. - TimestampFormats []*string `type:"list"` -} - -// String returns the string representation -func (s HiveJsonSerDe) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HiveJsonSerDe) GoString() string { - return s.String() -} - -// SetTimestampFormats sets the TimestampFormats field's value. -func (s *HiveJsonSerDe) SetTimestampFormats(v []*string) *HiveJsonSerDe { - s.TimestampFormats = v - return s -} - -// Specifies the deserializer you want to use to convert the format of the input -// data. -type InputFormatConfiguration struct { - _ struct{} `type:"structure"` - - // Specifies which deserializer to use. You can choose either the Apache Hive - // JSON SerDe or the OpenX JSON SerDe. If both are non-null, the server rejects - // the request. - Deserializer *Deserializer `type:"structure"` -} - -// String returns the string representation -func (s InputFormatConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputFormatConfiguration) GoString() string { - return s.String() -} - -// SetDeserializer sets the Deserializer field's value. -func (s *InputFormatConfiguration) SetDeserializer(v *Deserializer) *InputFormatConfiguration { - s.Deserializer = v - return s -} - -// Describes an encryption key for a destination in Amazon S3. -type KMSEncryptionConfig struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the encryption key. Must belong to the - // same AWS Region as the destination Amazon S3 bucket. For more information, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // AWSKMSKeyARN is a required field - AWSKMSKeyARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s KMSEncryptionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KMSEncryptionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KMSEncryptionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KMSEncryptionConfig"} - if s.AWSKMSKeyARN == nil { - invalidParams.Add(request.NewErrParamRequired("AWSKMSKeyARN")) - } - if s.AWSKMSKeyARN != nil && len(*s.AWSKMSKeyARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AWSKMSKeyARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAWSKMSKeyARN sets the AWSKMSKeyARN field's value. -func (s *KMSEncryptionConfig) SetAWSKMSKeyARN(v string) *KMSEncryptionConfig { - s.AWSKMSKeyARN = &v - return s -} - -// The stream and role Amazon Resource Names (ARNs) for a Kinesis data stream -// used as the source for a delivery stream. -type KinesisStreamSourceConfiguration struct { - _ struct{} `type:"structure"` - - // The ARN of the source Kinesis data stream. For more information, see Amazon - // Kinesis Data Streams ARN Format (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). - // - // KinesisStreamARN is a required field - KinesisStreamARN *string `min:"1" type:"string" required:"true"` - - // The ARN of the role that provides access to the source Kinesis data stream. - // For more information, see AWS Identity and Access Management (IAM) ARN Format - // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam). - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s KinesisStreamSourceConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisStreamSourceConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KinesisStreamSourceConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KinesisStreamSourceConfiguration"} - if s.KinesisStreamARN == nil { - invalidParams.Add(request.NewErrParamRequired("KinesisStreamARN")) - } - if s.KinesisStreamARN != nil && len(*s.KinesisStreamARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KinesisStreamARN", 1)) - } - if s.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKinesisStreamARN sets the KinesisStreamARN field's value. -func (s *KinesisStreamSourceConfiguration) SetKinesisStreamARN(v string) *KinesisStreamSourceConfiguration { - s.KinesisStreamARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *KinesisStreamSourceConfiguration) SetRoleARN(v string) *KinesisStreamSourceConfiguration { - s.RoleARN = &v - return s -} - -// Details about a Kinesis data stream used as the source for a Kinesis Data -// Firehose delivery stream. -type KinesisStreamSourceDescription struct { - _ struct{} `type:"structure"` - - // Kinesis Data Firehose starts retrieving records from the Kinesis data stream - // starting with this timestamp. - DeliveryStartTimestamp *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the source Kinesis data stream. For more - // information, see Amazon Kinesis Data Streams ARN Format (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). - KinesisStreamARN *string `min:"1" type:"string"` - - // The ARN of the role used by the source Kinesis data stream. For more information, - // see AWS Identity and Access Management (IAM) ARN Format (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam). - RoleARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s KinesisStreamSourceDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisStreamSourceDescription) GoString() string { - return s.String() -} - -// SetDeliveryStartTimestamp sets the DeliveryStartTimestamp field's value. -func (s *KinesisStreamSourceDescription) SetDeliveryStartTimestamp(v time.Time) *KinesisStreamSourceDescription { - s.DeliveryStartTimestamp = &v - return s -} - -// SetKinesisStreamARN sets the KinesisStreamARN field's value. -func (s *KinesisStreamSourceDescription) SetKinesisStreamARN(v string) *KinesisStreamSourceDescription { - s.KinesisStreamARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *KinesisStreamSourceDescription) SetRoleARN(v string) *KinesisStreamSourceDescription { - s.RoleARN = &v - return s -} - -type ListDeliveryStreamsInput struct { - _ struct{} `type:"structure"` - - // The delivery stream type. This can be one of the following values: - // - // * DirectPut: Provider applications access the delivery stream directly. - // - // * KinesisStreamAsSource: The delivery stream uses a Kinesis data stream - // as a source. - // - // This parameter is optional. If this parameter is omitted, delivery streams - // of all types are returned. - DeliveryStreamType *string `type:"string" enum:"DeliveryStreamType"` - - // The list of delivery streams returned by this call to ListDeliveryStreams - // will start with the delivery stream whose name comes alphabetically immediately - // after the name you specify in ExclusiveStartDeliveryStreamName. - ExclusiveStartDeliveryStreamName *string `min:"1" type:"string"` - - // The maximum number of delivery streams to list. The default value is 10. - Limit *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListDeliveryStreamsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDeliveryStreamsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDeliveryStreamsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDeliveryStreamsInput"} - if s.ExclusiveStartDeliveryStreamName != nil && len(*s.ExclusiveStartDeliveryStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartDeliveryStreamName", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryStreamType sets the DeliveryStreamType field's value. -func (s *ListDeliveryStreamsInput) SetDeliveryStreamType(v string) *ListDeliveryStreamsInput { - s.DeliveryStreamType = &v - return s -} - -// SetExclusiveStartDeliveryStreamName sets the ExclusiveStartDeliveryStreamName field's value. -func (s *ListDeliveryStreamsInput) SetExclusiveStartDeliveryStreamName(v string) *ListDeliveryStreamsInput { - s.ExclusiveStartDeliveryStreamName = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListDeliveryStreamsInput) SetLimit(v int64) *ListDeliveryStreamsInput { - s.Limit = &v - return s -} - -type ListDeliveryStreamsOutput struct { - _ struct{} `type:"structure"` - - // The names of the delivery streams. - // - // DeliveryStreamNames is a required field - DeliveryStreamNames []*string `type:"list" required:"true"` - - // Indicates whether there are more delivery streams available to list. - // - // HasMoreDeliveryStreams is a required field - HasMoreDeliveryStreams *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s ListDeliveryStreamsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDeliveryStreamsOutput) GoString() string { - return s.String() -} - -// SetDeliveryStreamNames sets the DeliveryStreamNames field's value. -func (s *ListDeliveryStreamsOutput) SetDeliveryStreamNames(v []*string) *ListDeliveryStreamsOutput { - s.DeliveryStreamNames = v - return s -} - -// SetHasMoreDeliveryStreams sets the HasMoreDeliveryStreams field's value. -func (s *ListDeliveryStreamsOutput) SetHasMoreDeliveryStreams(v bool) *ListDeliveryStreamsOutput { - s.HasMoreDeliveryStreams = &v - return s -} - -type ListTagsForDeliveryStreamInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery stream whose tags you want to list. - // - // DeliveryStreamName is a required field - DeliveryStreamName *string `min:"1" type:"string" required:"true"` - - // The key to use as the starting point for the list of tags. If you set this - // parameter, ListTagsForDeliveryStream gets all tags that occur after ExclusiveStartTagKey. - ExclusiveStartTagKey *string `min:"1" type:"string"` - - // The number of tags to return. If this number is less than the total number - // of tags associated with the delivery stream, HasMoreTags is set to true in - // the response. To list additional tags, set ExclusiveStartTagKey to the last - // key in the response. - Limit *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListTagsForDeliveryStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForDeliveryStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForDeliveryStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForDeliveryStreamInput"} - if s.DeliveryStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) - } - if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) - } - if s.ExclusiveStartTagKey != nil && len(*s.ExclusiveStartTagKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartTagKey", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryStreamName sets the DeliveryStreamName field's value. -func (s *ListTagsForDeliveryStreamInput) SetDeliveryStreamName(v string) *ListTagsForDeliveryStreamInput { - s.DeliveryStreamName = &v - return s -} - -// SetExclusiveStartTagKey sets the ExclusiveStartTagKey field's value. -func (s *ListTagsForDeliveryStreamInput) SetExclusiveStartTagKey(v string) *ListTagsForDeliveryStreamInput { - s.ExclusiveStartTagKey = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListTagsForDeliveryStreamInput) SetLimit(v int64) *ListTagsForDeliveryStreamInput { - s.Limit = &v - return s -} - -type ListTagsForDeliveryStreamOutput struct { - _ struct{} `type:"structure"` - - // If this is true in the response, more tags are available. To list the remaining - // tags, set ExclusiveStartTagKey to the key of the last tag returned and call - // ListTagsForDeliveryStream again. - // - // HasMoreTags is a required field - HasMoreTags *bool `type:"boolean" required:"true"` - - // A list of tags associated with DeliveryStreamName, starting with the first - // tag after ExclusiveStartTagKey and up to the specified Limit. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s ListTagsForDeliveryStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForDeliveryStreamOutput) GoString() string { - return s.String() -} - -// SetHasMoreTags sets the HasMoreTags field's value. -func (s *ListTagsForDeliveryStreamOutput) SetHasMoreTags(v bool) *ListTagsForDeliveryStreamOutput { - s.HasMoreTags = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForDeliveryStreamOutput) SetTags(v []*Tag) *ListTagsForDeliveryStreamOutput { - s.Tags = v - return s -} - -// The OpenX SerDe. Used by Kinesis Data Firehose for deserializing data, which -// means converting it from the JSON format in preparation for serializing it -// to the Parquet or ORC format. This is one of two deserializers you can choose, -// depending on which one offers the functionality you need. The other option -// is the native Hive / HCatalog JsonSerDe. -type OpenXJsonSerDe struct { - _ struct{} `type:"structure"` - - // When set to true, which is the default, Kinesis Data Firehose converts JSON - // keys to lowercase before deserializing them. - CaseInsensitive *bool `type:"boolean"` - - // Maps column names to JSON keys that aren't identical to the column names. - // This is useful when the JSON contains keys that are Hive keywords. For example, - // timestamp is a Hive keyword. If you have a JSON key named timestamp, set - // this parameter to {"ts": "timestamp"} to map this key to a column named ts. - ColumnToJsonKeyMappings map[string]*string `type:"map"` - - // When set to true, specifies that the names of the keys include dots and that - // you want Kinesis Data Firehose to replace them with underscores. This is - // useful because Apache Hive does not allow dots in column names. For example, - // if the JSON contains a key whose name is "a.b", you can define the column - // name to be "a_b" when using this option. - // - // The default is false. - ConvertDotsInJsonKeysToUnderscores *bool `type:"boolean"` -} - -// String returns the string representation -func (s OpenXJsonSerDe) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OpenXJsonSerDe) GoString() string { - return s.String() -} - -// SetCaseInsensitive sets the CaseInsensitive field's value. -func (s *OpenXJsonSerDe) SetCaseInsensitive(v bool) *OpenXJsonSerDe { - s.CaseInsensitive = &v - return s -} - -// SetColumnToJsonKeyMappings sets the ColumnToJsonKeyMappings field's value. -func (s *OpenXJsonSerDe) SetColumnToJsonKeyMappings(v map[string]*string) *OpenXJsonSerDe { - s.ColumnToJsonKeyMappings = v - return s -} - -// SetConvertDotsInJsonKeysToUnderscores sets the ConvertDotsInJsonKeysToUnderscores field's value. -func (s *OpenXJsonSerDe) SetConvertDotsInJsonKeysToUnderscores(v bool) *OpenXJsonSerDe { - s.ConvertDotsInJsonKeysToUnderscores = &v - return s -} - -// A serializer to use for converting data to the ORC format before storing -// it in Amazon S3. For more information, see Apache ORC (https://orc.apache.org/docs/). -type OrcSerDe struct { - _ struct{} `type:"structure"` - - // The Hadoop Distributed File System (HDFS) block size. This is useful if you - // intend to copy the data from Amazon S3 to HDFS before querying. The default - // is 256 MiB and the minimum is 64 MiB. Kinesis Data Firehose uses this value - // for padding calculations. - BlockSizeBytes *int64 `min:"6.7108864e+07" type:"integer"` - - // The column names for which you want Kinesis Data Firehose to create bloom - // filters. The default is null. - BloomFilterColumns []*string `type:"list"` - - // The Bloom filter false positive probability (FPP). The lower the FPP, the - // bigger the Bloom filter. The default value is 0.05, the minimum is 0, and - // the maximum is 1. - BloomFilterFalsePositiveProbability *float64 `type:"double"` - - // The compression code to use over data blocks. The default is SNAPPY. - Compression *string `type:"string" enum:"OrcCompression"` - - // Represents the fraction of the total number of non-null rows. To turn off - // dictionary encoding, set this fraction to a number that is less than the - // number of distinct keys in a dictionary. To always use dictionary encoding, - // set this threshold to 1. - DictionaryKeyThreshold *float64 `type:"double"` - - // Set this to true to indicate that you want stripes to be padded to the HDFS - // block boundaries. This is useful if you intend to copy the data from Amazon - // S3 to HDFS before querying. The default is false. - EnablePadding *bool `type:"boolean"` - - // The version of the file to write. The possible values are V0_11 and V0_12. - // The default is V0_12. - FormatVersion *string `type:"string" enum:"OrcFormatVersion"` - - // A number between 0 and 1 that defines the tolerance for block padding as - // a decimal fraction of stripe size. The default value is 0.05, which means - // 5 percent of stripe size. - // - // For the default values of 64 MiB ORC stripes and 256 MiB HDFS blocks, the - // default block padding tolerance of 5 percent reserves a maximum of 3.2 MiB - // for padding within the 256 MiB block. In such a case, if the available size - // within the block is more than 3.2 MiB, a new, smaller stripe is inserted - // to fit within that space. This ensures that no stripe crosses block boundaries - // and causes remote reads within a node-local task. - // - // Kinesis Data Firehose ignores this parameter when OrcSerDe$EnablePadding - // is false. - PaddingTolerance *float64 `type:"double"` - - // The number of rows between index entries. The default is 10,000 and the minimum - // is 1,000. - RowIndexStride *int64 `min:"1000" type:"integer"` - - // The number of bytes in each stripe. The default is 64 MiB and the minimum - // is 8 MiB. - StripeSizeBytes *int64 `min:"8.388608e+06" type:"integer"` -} - -// String returns the string representation -func (s OrcSerDe) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OrcSerDe) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OrcSerDe) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OrcSerDe"} - if s.BlockSizeBytes != nil && *s.BlockSizeBytes < 6.7108864e+07 { - invalidParams.Add(request.NewErrParamMinValue("BlockSizeBytes", 6.7108864e+07)) - } - if s.RowIndexStride != nil && *s.RowIndexStride < 1000 { - invalidParams.Add(request.NewErrParamMinValue("RowIndexStride", 1000)) - } - if s.StripeSizeBytes != nil && *s.StripeSizeBytes < 8.388608e+06 { - invalidParams.Add(request.NewErrParamMinValue("StripeSizeBytes", 8.388608e+06)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBlockSizeBytes sets the BlockSizeBytes field's value. -func (s *OrcSerDe) SetBlockSizeBytes(v int64) *OrcSerDe { - s.BlockSizeBytes = &v - return s -} - -// SetBloomFilterColumns sets the BloomFilterColumns field's value. -func (s *OrcSerDe) SetBloomFilterColumns(v []*string) *OrcSerDe { - s.BloomFilterColumns = v - return s -} - -// SetBloomFilterFalsePositiveProbability sets the BloomFilterFalsePositiveProbability field's value. -func (s *OrcSerDe) SetBloomFilterFalsePositiveProbability(v float64) *OrcSerDe { - s.BloomFilterFalsePositiveProbability = &v - return s -} - -// SetCompression sets the Compression field's value. -func (s *OrcSerDe) SetCompression(v string) *OrcSerDe { - s.Compression = &v - return s -} - -// SetDictionaryKeyThreshold sets the DictionaryKeyThreshold field's value. -func (s *OrcSerDe) SetDictionaryKeyThreshold(v float64) *OrcSerDe { - s.DictionaryKeyThreshold = &v - return s -} - -// SetEnablePadding sets the EnablePadding field's value. -func (s *OrcSerDe) SetEnablePadding(v bool) *OrcSerDe { - s.EnablePadding = &v - return s -} - -// SetFormatVersion sets the FormatVersion field's value. -func (s *OrcSerDe) SetFormatVersion(v string) *OrcSerDe { - s.FormatVersion = &v - return s -} - -// SetPaddingTolerance sets the PaddingTolerance field's value. -func (s *OrcSerDe) SetPaddingTolerance(v float64) *OrcSerDe { - s.PaddingTolerance = &v - return s -} - -// SetRowIndexStride sets the RowIndexStride field's value. -func (s *OrcSerDe) SetRowIndexStride(v int64) *OrcSerDe { - s.RowIndexStride = &v - return s -} - -// SetStripeSizeBytes sets the StripeSizeBytes field's value. -func (s *OrcSerDe) SetStripeSizeBytes(v int64) *OrcSerDe { - s.StripeSizeBytes = &v - return s -} - -// Specifies the serializer that you want Kinesis Data Firehose to use to convert -// the format of your data before it writes it to Amazon S3. -type OutputFormatConfiguration struct { - _ struct{} `type:"structure"` - - // Specifies which serializer to use. You can choose either the ORC SerDe or - // the Parquet SerDe. If both are non-null, the server rejects the request. - Serializer *Serializer `type:"structure"` -} - -// String returns the string representation -func (s OutputFormatConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputFormatConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OutputFormatConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OutputFormatConfiguration"} - if s.Serializer != nil { - if err := s.Serializer.Validate(); err != nil { - invalidParams.AddNested("Serializer", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSerializer sets the Serializer field's value. -func (s *OutputFormatConfiguration) SetSerializer(v *Serializer) *OutputFormatConfiguration { - s.Serializer = v - return s -} - -// A serializer to use for converting data to the Parquet format before storing -// it in Amazon S3. For more information, see Apache Parquet (https://parquet.apache.org/documentation/latest/). -type ParquetSerDe struct { - _ struct{} `type:"structure"` - - // The Hadoop Distributed File System (HDFS) block size. This is useful if you - // intend to copy the data from Amazon S3 to HDFS before querying. The default - // is 256 MiB and the minimum is 64 MiB. Kinesis Data Firehose uses this value - // for padding calculations. - BlockSizeBytes *int64 `min:"6.7108864e+07" type:"integer"` - - // The compression code to use over data blocks. The possible values are UNCOMPRESSED, - // SNAPPY, and GZIP, with the default being SNAPPY. Use SNAPPY for higher decompression - // speed. Use GZIP if the compression ration is more important than speed. - Compression *string `type:"string" enum:"ParquetCompression"` - - // Indicates whether to enable dictionary compression. - EnableDictionaryCompression *bool `type:"boolean"` - - // The maximum amount of padding to apply. This is useful if you intend to copy - // the data from Amazon S3 to HDFS before querying. The default is 0. - MaxPaddingBytes *int64 `type:"integer"` - - // The Parquet page size. Column chunks are divided into pages. A page is conceptually - // an indivisible unit (in terms of compression and encoding). The minimum value - // is 64 KiB and the default is 1 MiB. - PageSizeBytes *int64 `min:"65536" type:"integer"` - - // Indicates the version of row format to output. The possible values are V1 - // and V2. The default is V1. - WriterVersion *string `type:"string" enum:"ParquetWriterVersion"` -} - -// String returns the string representation -func (s ParquetSerDe) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParquetSerDe) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ParquetSerDe) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ParquetSerDe"} - if s.BlockSizeBytes != nil && *s.BlockSizeBytes < 6.7108864e+07 { - invalidParams.Add(request.NewErrParamMinValue("BlockSizeBytes", 6.7108864e+07)) - } - if s.PageSizeBytes != nil && *s.PageSizeBytes < 65536 { - invalidParams.Add(request.NewErrParamMinValue("PageSizeBytes", 65536)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBlockSizeBytes sets the BlockSizeBytes field's value. -func (s *ParquetSerDe) SetBlockSizeBytes(v int64) *ParquetSerDe { - s.BlockSizeBytes = &v - return s -} - -// SetCompression sets the Compression field's value. -func (s *ParquetSerDe) SetCompression(v string) *ParquetSerDe { - s.Compression = &v - return s -} - -// SetEnableDictionaryCompression sets the EnableDictionaryCompression field's value. -func (s *ParquetSerDe) SetEnableDictionaryCompression(v bool) *ParquetSerDe { - s.EnableDictionaryCompression = &v - return s -} - -// SetMaxPaddingBytes sets the MaxPaddingBytes field's value. -func (s *ParquetSerDe) SetMaxPaddingBytes(v int64) *ParquetSerDe { - s.MaxPaddingBytes = &v - return s -} - -// SetPageSizeBytes sets the PageSizeBytes field's value. -func (s *ParquetSerDe) SetPageSizeBytes(v int64) *ParquetSerDe { - s.PageSizeBytes = &v - return s -} - -// SetWriterVersion sets the WriterVersion field's value. -func (s *ParquetSerDe) SetWriterVersion(v string) *ParquetSerDe { - s.WriterVersion = &v - return s -} - -// Describes a data processing configuration. -type ProcessingConfiguration struct { - _ struct{} `type:"structure"` - - // Enables or disables data processing. - Enabled *bool `type:"boolean"` - - // The data processors. - Processors []*Processor `type:"list"` -} - -// String returns the string representation -func (s ProcessingConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProcessingConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProcessingConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProcessingConfiguration"} - if s.Processors != nil { - for i, v := range s.Processors { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Processors", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *ProcessingConfiguration) SetEnabled(v bool) *ProcessingConfiguration { - s.Enabled = &v - return s -} - -// SetProcessors sets the Processors field's value. -func (s *ProcessingConfiguration) SetProcessors(v []*Processor) *ProcessingConfiguration { - s.Processors = v - return s -} - -// Describes a data processor. -type Processor struct { - _ struct{} `type:"structure"` - - // The processor parameters. - Parameters []*ProcessorParameter `type:"list"` - - // The type of processor. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"ProcessorType"` -} - -// String returns the string representation -func (s Processor) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Processor) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Processor) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Processor"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Parameters != nil { - for i, v := range s.Parameters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Parameters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParameters sets the Parameters field's value. -func (s *Processor) SetParameters(v []*ProcessorParameter) *Processor { - s.Parameters = v - return s -} - -// SetType sets the Type field's value. -func (s *Processor) SetType(v string) *Processor { - s.Type = &v - return s -} - -// Describes the processor parameter. -type ProcessorParameter struct { - _ struct{} `type:"structure"` - - // The name of the parameter. - // - // ParameterName is a required field - ParameterName *string `type:"string" required:"true" enum:"ProcessorParameterName"` - - // The parameter value. - // - // ParameterValue is a required field - ParameterValue *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ProcessorParameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProcessorParameter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProcessorParameter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProcessorParameter"} - if s.ParameterName == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterName")) - } - if s.ParameterValue == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterValue")) - } - if s.ParameterValue != nil && len(*s.ParameterValue) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ParameterValue", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParameterName sets the ParameterName field's value. -func (s *ProcessorParameter) SetParameterName(v string) *ProcessorParameter { - s.ParameterName = &v - return s -} - -// SetParameterValue sets the ParameterValue field's value. -func (s *ProcessorParameter) SetParameterValue(v string) *ProcessorParameter { - s.ParameterValue = &v - return s -} - -type PutRecordBatchInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery stream. - // - // DeliveryStreamName is a required field - DeliveryStreamName *string `min:"1" type:"string" required:"true"` - - // One or more records. - // - // Records is a required field - Records []*Record `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s PutRecordBatchInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRecordBatchInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutRecordBatchInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutRecordBatchInput"} - if s.DeliveryStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) - } - if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) - } - if s.Records == nil { - invalidParams.Add(request.NewErrParamRequired("Records")) - } - if s.Records != nil && len(s.Records) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Records", 1)) - } - if s.Records != nil { - for i, v := range s.Records { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Records", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryStreamName sets the DeliveryStreamName field's value. -func (s *PutRecordBatchInput) SetDeliveryStreamName(v string) *PutRecordBatchInput { - s.DeliveryStreamName = &v - return s -} - -// SetRecords sets the Records field's value. -func (s *PutRecordBatchInput) SetRecords(v []*Record) *PutRecordBatchInput { - s.Records = v - return s -} - -type PutRecordBatchOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether server-side encryption (SSE) was enabled during this operation. - Encrypted *bool `type:"boolean"` - - // The number of records that might have failed processing. This number might - // be greater than 0 even if the PutRecordBatch call succeeds. Check FailedPutCount - // to determine whether there are records that you need to resend. - // - // FailedPutCount is a required field - FailedPutCount *int64 `type:"integer" required:"true"` - - // The results array. For each record, the index of the response element is - // the same as the index used in the request array. - // - // RequestResponses is a required field - RequestResponses []*PutRecordBatchResponseEntry `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s PutRecordBatchOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRecordBatchOutput) GoString() string { - return s.String() -} - -// SetEncrypted sets the Encrypted field's value. -func (s *PutRecordBatchOutput) SetEncrypted(v bool) *PutRecordBatchOutput { - s.Encrypted = &v - return s -} - -// SetFailedPutCount sets the FailedPutCount field's value. -func (s *PutRecordBatchOutput) SetFailedPutCount(v int64) *PutRecordBatchOutput { - s.FailedPutCount = &v - return s -} - -// SetRequestResponses sets the RequestResponses field's value. -func (s *PutRecordBatchOutput) SetRequestResponses(v []*PutRecordBatchResponseEntry) *PutRecordBatchOutput { - s.RequestResponses = v - return s -} - -// Contains the result for an individual record from a PutRecordBatch request. -// If the record is successfully added to your delivery stream, it receives -// a record ID. If the record fails to be added to your delivery stream, the -// result includes an error code and an error message. -type PutRecordBatchResponseEntry struct { - _ struct{} `type:"structure"` - - // The error code for an individual record result. - ErrorCode *string `type:"string"` - - // The error message for an individual record result. - ErrorMessage *string `type:"string"` - - // The ID of the record. - RecordId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PutRecordBatchResponseEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRecordBatchResponseEntry) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *PutRecordBatchResponseEntry) SetErrorCode(v string) *PutRecordBatchResponseEntry { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *PutRecordBatchResponseEntry) SetErrorMessage(v string) *PutRecordBatchResponseEntry { - s.ErrorMessage = &v - return s -} - -// SetRecordId sets the RecordId field's value. -func (s *PutRecordBatchResponseEntry) SetRecordId(v string) *PutRecordBatchResponseEntry { - s.RecordId = &v - return s -} - -type PutRecordInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery stream. - // - // DeliveryStreamName is a required field - DeliveryStreamName *string `min:"1" type:"string" required:"true"` - - // The record. - // - // Record is a required field - Record *Record `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PutRecordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRecordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutRecordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutRecordInput"} - if s.DeliveryStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) - } - if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) - } - if s.Record == nil { - invalidParams.Add(request.NewErrParamRequired("Record")) - } - if s.Record != nil { - if err := s.Record.Validate(); err != nil { - invalidParams.AddNested("Record", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryStreamName sets the DeliveryStreamName field's value. -func (s *PutRecordInput) SetDeliveryStreamName(v string) *PutRecordInput { - s.DeliveryStreamName = &v - return s -} - -// SetRecord sets the Record field's value. -func (s *PutRecordInput) SetRecord(v *Record) *PutRecordInput { - s.Record = v - return s -} - -type PutRecordOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether server-side encryption (SSE) was enabled during this operation. - Encrypted *bool `type:"boolean"` - - // The ID of the record. - // - // RecordId is a required field - RecordId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutRecordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRecordOutput) GoString() string { - return s.String() -} - -// SetEncrypted sets the Encrypted field's value. -func (s *PutRecordOutput) SetEncrypted(v bool) *PutRecordOutput { - s.Encrypted = &v - return s -} - -// SetRecordId sets the RecordId field's value. -func (s *PutRecordOutput) SetRecordId(v string) *PutRecordOutput { - s.RecordId = &v - return s -} - -// The unit of data in a delivery stream. -type Record struct { - _ struct{} `type:"structure"` - - // The data blob, which is base64-encoded when the blob is serialized. The maximum - // size of the data blob, before base64-encoding, is 1,000 KiB. - // - // Data is automatically base64 encoded/decoded by the SDK. - // - // Data is a required field - Data []byte `type:"blob" required:"true"` -} - -// String returns the string representation -func (s Record) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Record) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Record) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Record"} - if s.Data == nil { - invalidParams.Add(request.NewErrParamRequired("Data")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetData sets the Data field's value. -func (s *Record) SetData(v []byte) *Record { - s.Data = v - return s -} - -// Describes the configuration of a destination in Amazon Redshift. -type RedshiftDestinationConfiguration struct { - _ struct{} `type:"structure"` - - // The CloudWatch logging options for your delivery stream. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The database connection string. - // - // ClusterJDBCURL is a required field - ClusterJDBCURL *string `min:"1" type:"string" required:"true"` - - // The COPY command. - // - // CopyCommand is a required field - CopyCommand *CopyCommand `type:"structure" required:"true"` - - // The user password. - // - // Password is a required field - Password *string `min:"6" type:"string" required:"true" sensitive:"true"` - - // The data processing configuration. - ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - - // The retry behavior in case Kinesis Data Firehose is unable to deliver documents - // to Amazon Redshift. Default value is 3600 (60 minutes). - RetryOptions *RedshiftRetryOptions `type:"structure"` - - // The Amazon Resource Name (ARN) of the AWS credentials. For more information, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` - - // The configuration for backup in Amazon S3. - S3BackupConfiguration *S3DestinationConfiguration `type:"structure"` - - // The Amazon S3 backup mode. - S3BackupMode *string `type:"string" enum:"RedshiftS3BackupMode"` - - // The configuration for the intermediate Amazon S3 location from which Amazon - // Redshift obtains data. Restrictions are described in the topic for CreateDeliveryStream. - // - // The compression formats SNAPPY or ZIP cannot be specified in RedshiftDestinationConfiguration.S3Configuration - // because the Amazon Redshift COPY operation that reads from the S3 bucket - // doesn't support these compression formats. - // - // S3Configuration is a required field - S3Configuration *S3DestinationConfiguration `type:"structure" required:"true"` - - // The name of the user. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s RedshiftDestinationConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RedshiftDestinationConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RedshiftDestinationConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RedshiftDestinationConfiguration"} - if s.ClusterJDBCURL == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterJDBCURL")) - } - if s.ClusterJDBCURL != nil && len(*s.ClusterJDBCURL) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClusterJDBCURL", 1)) - } - if s.CopyCommand == nil { - invalidParams.Add(request.NewErrParamRequired("CopyCommand")) - } - if s.Password == nil { - invalidParams.Add(request.NewErrParamRequired("Password")) - } - if s.Password != nil && len(*s.Password) < 6 { - invalidParams.Add(request.NewErrParamMinLen("Password", 6)) - } - if s.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - if s.S3Configuration == nil { - invalidParams.Add(request.NewErrParamRequired("S3Configuration")) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - if s.CopyCommand != nil { - if err := s.CopyCommand.Validate(); err != nil { - invalidParams.AddNested("CopyCommand", err.(request.ErrInvalidParams)) - } - } - if s.ProcessingConfiguration != nil { - if err := s.ProcessingConfiguration.Validate(); err != nil { - invalidParams.AddNested("ProcessingConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.S3BackupConfiguration != nil { - if err := s.S3BackupConfiguration.Validate(); err != nil { - invalidParams.AddNested("S3BackupConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.S3Configuration != nil { - if err := s.S3Configuration.Validate(); err != nil { - invalidParams.AddNested("S3Configuration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *RedshiftDestinationConfiguration) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *RedshiftDestinationConfiguration { - s.CloudWatchLoggingOptions = v - return s -} - -// SetClusterJDBCURL sets the ClusterJDBCURL field's value. -func (s *RedshiftDestinationConfiguration) SetClusterJDBCURL(v string) *RedshiftDestinationConfiguration { - s.ClusterJDBCURL = &v - return s -} - -// SetCopyCommand sets the CopyCommand field's value. -func (s *RedshiftDestinationConfiguration) SetCopyCommand(v *CopyCommand) *RedshiftDestinationConfiguration { - s.CopyCommand = v - return s -} - -// SetPassword sets the Password field's value. -func (s *RedshiftDestinationConfiguration) SetPassword(v string) *RedshiftDestinationConfiguration { - s.Password = &v - return s -} - -// SetProcessingConfiguration sets the ProcessingConfiguration field's value. -func (s *RedshiftDestinationConfiguration) SetProcessingConfiguration(v *ProcessingConfiguration) *RedshiftDestinationConfiguration { - s.ProcessingConfiguration = v - return s -} - -// SetRetryOptions sets the RetryOptions field's value. -func (s *RedshiftDestinationConfiguration) SetRetryOptions(v *RedshiftRetryOptions) *RedshiftDestinationConfiguration { - s.RetryOptions = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *RedshiftDestinationConfiguration) SetRoleARN(v string) *RedshiftDestinationConfiguration { - s.RoleARN = &v - return s -} - -// SetS3BackupConfiguration sets the S3BackupConfiguration field's value. -func (s *RedshiftDestinationConfiguration) SetS3BackupConfiguration(v *S3DestinationConfiguration) *RedshiftDestinationConfiguration { - s.S3BackupConfiguration = v - return s -} - -// SetS3BackupMode sets the S3BackupMode field's value. -func (s *RedshiftDestinationConfiguration) SetS3BackupMode(v string) *RedshiftDestinationConfiguration { - s.S3BackupMode = &v - return s -} - -// SetS3Configuration sets the S3Configuration field's value. -func (s *RedshiftDestinationConfiguration) SetS3Configuration(v *S3DestinationConfiguration) *RedshiftDestinationConfiguration { - s.S3Configuration = v - return s -} - -// SetUsername sets the Username field's value. -func (s *RedshiftDestinationConfiguration) SetUsername(v string) *RedshiftDestinationConfiguration { - s.Username = &v - return s -} - -// Describes a destination in Amazon Redshift. -type RedshiftDestinationDescription struct { - _ struct{} `type:"structure"` - - // The Amazon CloudWatch logging options for your delivery stream. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The database connection string. - // - // ClusterJDBCURL is a required field - ClusterJDBCURL *string `min:"1" type:"string" required:"true"` - - // The COPY command. - // - // CopyCommand is a required field - CopyCommand *CopyCommand `type:"structure" required:"true"` - - // The data processing configuration. - ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - - // The retry behavior in case Kinesis Data Firehose is unable to deliver documents - // to Amazon Redshift. Default value is 3600 (60 minutes). - RetryOptions *RedshiftRetryOptions `type:"structure"` - - // The Amazon Resource Name (ARN) of the AWS credentials. For more information, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` - - // The configuration for backup in Amazon S3. - S3BackupDescription *S3DestinationDescription `type:"structure"` - - // The Amazon S3 backup mode. - S3BackupMode *string `type:"string" enum:"RedshiftS3BackupMode"` - - // The Amazon S3 destination. - // - // S3DestinationDescription is a required field - S3DestinationDescription *S3DestinationDescription `type:"structure" required:"true"` - - // The name of the user. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s RedshiftDestinationDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RedshiftDestinationDescription) GoString() string { - return s.String() -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *RedshiftDestinationDescription) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *RedshiftDestinationDescription { - s.CloudWatchLoggingOptions = v - return s -} - -// SetClusterJDBCURL sets the ClusterJDBCURL field's value. -func (s *RedshiftDestinationDescription) SetClusterJDBCURL(v string) *RedshiftDestinationDescription { - s.ClusterJDBCURL = &v - return s -} - -// SetCopyCommand sets the CopyCommand field's value. -func (s *RedshiftDestinationDescription) SetCopyCommand(v *CopyCommand) *RedshiftDestinationDescription { - s.CopyCommand = v - return s -} - -// SetProcessingConfiguration sets the ProcessingConfiguration field's value. -func (s *RedshiftDestinationDescription) SetProcessingConfiguration(v *ProcessingConfiguration) *RedshiftDestinationDescription { - s.ProcessingConfiguration = v - return s -} - -// SetRetryOptions sets the RetryOptions field's value. -func (s *RedshiftDestinationDescription) SetRetryOptions(v *RedshiftRetryOptions) *RedshiftDestinationDescription { - s.RetryOptions = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *RedshiftDestinationDescription) SetRoleARN(v string) *RedshiftDestinationDescription { - s.RoleARN = &v - return s -} - -// SetS3BackupDescription sets the S3BackupDescription field's value. -func (s *RedshiftDestinationDescription) SetS3BackupDescription(v *S3DestinationDescription) *RedshiftDestinationDescription { - s.S3BackupDescription = v - return s -} - -// SetS3BackupMode sets the S3BackupMode field's value. -func (s *RedshiftDestinationDescription) SetS3BackupMode(v string) *RedshiftDestinationDescription { - s.S3BackupMode = &v - return s -} - -// SetS3DestinationDescription sets the S3DestinationDescription field's value. -func (s *RedshiftDestinationDescription) SetS3DestinationDescription(v *S3DestinationDescription) *RedshiftDestinationDescription { - s.S3DestinationDescription = v - return s -} - -// SetUsername sets the Username field's value. -func (s *RedshiftDestinationDescription) SetUsername(v string) *RedshiftDestinationDescription { - s.Username = &v - return s -} - -// Describes an update for a destination in Amazon Redshift. -type RedshiftDestinationUpdate struct { - _ struct{} `type:"structure"` - - // The Amazon CloudWatch logging options for your delivery stream. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The database connection string. - ClusterJDBCURL *string `min:"1" type:"string"` - - // The COPY command. - CopyCommand *CopyCommand `type:"structure"` - - // The user password. - Password *string `min:"6" type:"string" sensitive:"true"` - - // The data processing configuration. - ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - - // The retry behavior in case Kinesis Data Firehose is unable to deliver documents - // to Amazon Redshift. Default value is 3600 (60 minutes). - RetryOptions *RedshiftRetryOptions `type:"structure"` - - // The Amazon Resource Name (ARN) of the AWS credentials. For more information, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - RoleARN *string `min:"1" type:"string"` - - // The Amazon S3 backup mode. - S3BackupMode *string `type:"string" enum:"RedshiftS3BackupMode"` - - // The Amazon S3 destination for backup. - S3BackupUpdate *S3DestinationUpdate `type:"structure"` - - // The Amazon S3 destination. - // - // The compression formats SNAPPY or ZIP cannot be specified in RedshiftDestinationUpdate.S3Update - // because the Amazon Redshift COPY operation that reads from the S3 bucket - // doesn't support these compression formats. - S3Update *S3DestinationUpdate `type:"structure"` - - // The name of the user. - Username *string `min:"1" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s RedshiftDestinationUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RedshiftDestinationUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RedshiftDestinationUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RedshiftDestinationUpdate"} - if s.ClusterJDBCURL != nil && len(*s.ClusterJDBCURL) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClusterJDBCURL", 1)) - } - if s.Password != nil && len(*s.Password) < 6 { - invalidParams.Add(request.NewErrParamMinLen("Password", 6)) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - if s.CopyCommand != nil { - if err := s.CopyCommand.Validate(); err != nil { - invalidParams.AddNested("CopyCommand", err.(request.ErrInvalidParams)) - } - } - if s.ProcessingConfiguration != nil { - if err := s.ProcessingConfiguration.Validate(); err != nil { - invalidParams.AddNested("ProcessingConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.S3BackupUpdate != nil { - if err := s.S3BackupUpdate.Validate(); err != nil { - invalidParams.AddNested("S3BackupUpdate", err.(request.ErrInvalidParams)) - } - } - if s.S3Update != nil { - if err := s.S3Update.Validate(); err != nil { - invalidParams.AddNested("S3Update", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *RedshiftDestinationUpdate) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *RedshiftDestinationUpdate { - s.CloudWatchLoggingOptions = v - return s -} - -// SetClusterJDBCURL sets the ClusterJDBCURL field's value. -func (s *RedshiftDestinationUpdate) SetClusterJDBCURL(v string) *RedshiftDestinationUpdate { - s.ClusterJDBCURL = &v - return s -} - -// SetCopyCommand sets the CopyCommand field's value. -func (s *RedshiftDestinationUpdate) SetCopyCommand(v *CopyCommand) *RedshiftDestinationUpdate { - s.CopyCommand = v - return s -} - -// SetPassword sets the Password field's value. -func (s *RedshiftDestinationUpdate) SetPassword(v string) *RedshiftDestinationUpdate { - s.Password = &v - return s -} - -// SetProcessingConfiguration sets the ProcessingConfiguration field's value. -func (s *RedshiftDestinationUpdate) SetProcessingConfiguration(v *ProcessingConfiguration) *RedshiftDestinationUpdate { - s.ProcessingConfiguration = v - return s -} - -// SetRetryOptions sets the RetryOptions field's value. -func (s *RedshiftDestinationUpdate) SetRetryOptions(v *RedshiftRetryOptions) *RedshiftDestinationUpdate { - s.RetryOptions = v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *RedshiftDestinationUpdate) SetRoleARN(v string) *RedshiftDestinationUpdate { - s.RoleARN = &v - return s -} - -// SetS3BackupMode sets the S3BackupMode field's value. -func (s *RedshiftDestinationUpdate) SetS3BackupMode(v string) *RedshiftDestinationUpdate { - s.S3BackupMode = &v - return s -} - -// SetS3BackupUpdate sets the S3BackupUpdate field's value. -func (s *RedshiftDestinationUpdate) SetS3BackupUpdate(v *S3DestinationUpdate) *RedshiftDestinationUpdate { - s.S3BackupUpdate = v - return s -} - -// SetS3Update sets the S3Update field's value. -func (s *RedshiftDestinationUpdate) SetS3Update(v *S3DestinationUpdate) *RedshiftDestinationUpdate { - s.S3Update = v - return s -} - -// SetUsername sets the Username field's value. -func (s *RedshiftDestinationUpdate) SetUsername(v string) *RedshiftDestinationUpdate { - s.Username = &v - return s -} - -// Configures retry behavior in case Kinesis Data Firehose is unable to deliver -// documents to Amazon Redshift. -type RedshiftRetryOptions struct { - _ struct{} `type:"structure"` - - // The length of time during which Kinesis Data Firehose retries delivery after - // a failure, starting from the initial request and including the first attempt. - // The default value is 3600 seconds (60 minutes). Kinesis Data Firehose does - // not retry if the value of DurationInSeconds is 0 (zero) or if the first delivery - // attempt takes longer than the current value. - DurationInSeconds *int64 `type:"integer"` -} - -// String returns the string representation -func (s RedshiftRetryOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RedshiftRetryOptions) GoString() string { - return s.String() -} - -// SetDurationInSeconds sets the DurationInSeconds field's value. -func (s *RedshiftRetryOptions) SetDurationInSeconds(v int64) *RedshiftRetryOptions { - s.DurationInSeconds = &v - return s -} - -// Describes the configuration of a destination in Amazon S3. -type S3DestinationConfiguration struct { - _ struct{} `type:"structure"` - - // The ARN of the S3 bucket. For more information, see Amazon Resource Names - // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // BucketARN is a required field - BucketARN *string `min:"1" type:"string" required:"true"` - - // The buffering option. If no value is specified, BufferingHints object default - // values are used. - BufferingHints *BufferingHints `type:"structure"` - - // The CloudWatch logging options for your delivery stream. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The compression format. If no value is specified, the default is UNCOMPRESSED. - // - // The compression formats SNAPPY or ZIP cannot be specified for Amazon Redshift - // destinations because they are not supported by the Amazon Redshift COPY operation - // that reads from the S3 bucket. - CompressionFormat *string `type:"string" enum:"CompressionFormat"` - - // The encryption configuration. If no value is specified, the default is no - // encryption. - EncryptionConfiguration *EncryptionConfiguration `type:"structure"` - - // A prefix that Kinesis Data Firehose evaluates and adds to failed records - // before writing them to S3. This prefix appears immediately following the - // bucket name. - ErrorOutputPrefix *string `type:"string"` - - // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // Amazon S3 files. You can specify an extra prefix to be added in front of - // the time format prefix. If the prefix ends with a slash, it appears as a - // folder in the S3 bucket. For more information, see Amazon S3 Object Name - // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) - // in the Amazon Kinesis Data Firehose Developer Guide. - Prefix *string `type:"string"` - - // The Amazon Resource Name (ARN) of the AWS credentials. For more information, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s S3DestinationConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3DestinationConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3DestinationConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3DestinationConfiguration"} - if s.BucketARN == nil { - invalidParams.Add(request.NewErrParamRequired("BucketARN")) - } - if s.BucketARN != nil && len(*s.BucketARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BucketARN", 1)) - } - if s.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - if s.BufferingHints != nil { - if err := s.BufferingHints.Validate(); err != nil { - invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams)) - } - } - if s.EncryptionConfiguration != nil { - if err := s.EncryptionConfiguration.Validate(); err != nil { - invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketARN sets the BucketARN field's value. -func (s *S3DestinationConfiguration) SetBucketARN(v string) *S3DestinationConfiguration { - s.BucketARN = &v - return s -} - -// SetBufferingHints sets the BufferingHints field's value. -func (s *S3DestinationConfiguration) SetBufferingHints(v *BufferingHints) *S3DestinationConfiguration { - s.BufferingHints = v - return s -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *S3DestinationConfiguration) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *S3DestinationConfiguration { - s.CloudWatchLoggingOptions = v - return s -} - -// SetCompressionFormat sets the CompressionFormat field's value. -func (s *S3DestinationConfiguration) SetCompressionFormat(v string) *S3DestinationConfiguration { - s.CompressionFormat = &v - return s -} - -// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. -func (s *S3DestinationConfiguration) SetEncryptionConfiguration(v *EncryptionConfiguration) *S3DestinationConfiguration { - s.EncryptionConfiguration = v - return s -} - -// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. -func (s *S3DestinationConfiguration) SetErrorOutputPrefix(v string) *S3DestinationConfiguration { - s.ErrorOutputPrefix = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *S3DestinationConfiguration) SetPrefix(v string) *S3DestinationConfiguration { - s.Prefix = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *S3DestinationConfiguration) SetRoleARN(v string) *S3DestinationConfiguration { - s.RoleARN = &v - return s -} - -// Describes a destination in Amazon S3. -type S3DestinationDescription struct { - _ struct{} `type:"structure"` - - // The ARN of the S3 bucket. For more information, see Amazon Resource Names - // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // BucketARN is a required field - BucketARN *string `min:"1" type:"string" required:"true"` - - // The buffering option. If no value is specified, BufferingHints object default - // values are used. - // - // BufferingHints is a required field - BufferingHints *BufferingHints `type:"structure" required:"true"` - - // The Amazon CloudWatch logging options for your delivery stream. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The compression format. If no value is specified, the default is UNCOMPRESSED. - // - // CompressionFormat is a required field - CompressionFormat *string `type:"string" required:"true" enum:"CompressionFormat"` - - // The encryption configuration. If no value is specified, the default is no - // encryption. - // - // EncryptionConfiguration is a required field - EncryptionConfiguration *EncryptionConfiguration `type:"structure" required:"true"` - - // A prefix that Kinesis Data Firehose evaluates and adds to failed records - // before writing them to S3. This prefix appears immediately following the - // bucket name. - ErrorOutputPrefix *string `type:"string"` - - // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // Amazon S3 files. You can specify an extra prefix to be added in front of - // the time format prefix. If the prefix ends with a slash, it appears as a - // folder in the S3 bucket. For more information, see Amazon S3 Object Name - // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) - // in the Amazon Kinesis Data Firehose Developer Guide. - Prefix *string `type:"string"` - - // The Amazon Resource Name (ARN) of the AWS credentials. For more information, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s S3DestinationDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3DestinationDescription) GoString() string { - return s.String() -} - -// SetBucketARN sets the BucketARN field's value. -func (s *S3DestinationDescription) SetBucketARN(v string) *S3DestinationDescription { - s.BucketARN = &v - return s -} - -// SetBufferingHints sets the BufferingHints field's value. -func (s *S3DestinationDescription) SetBufferingHints(v *BufferingHints) *S3DestinationDescription { - s.BufferingHints = v - return s -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *S3DestinationDescription) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *S3DestinationDescription { - s.CloudWatchLoggingOptions = v - return s -} - -// SetCompressionFormat sets the CompressionFormat field's value. -func (s *S3DestinationDescription) SetCompressionFormat(v string) *S3DestinationDescription { - s.CompressionFormat = &v - return s -} - -// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. -func (s *S3DestinationDescription) SetEncryptionConfiguration(v *EncryptionConfiguration) *S3DestinationDescription { - s.EncryptionConfiguration = v - return s -} - -// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. -func (s *S3DestinationDescription) SetErrorOutputPrefix(v string) *S3DestinationDescription { - s.ErrorOutputPrefix = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *S3DestinationDescription) SetPrefix(v string) *S3DestinationDescription { - s.Prefix = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *S3DestinationDescription) SetRoleARN(v string) *S3DestinationDescription { - s.RoleARN = &v - return s -} - -// Describes an update for a destination in Amazon S3. -type S3DestinationUpdate struct { - _ struct{} `type:"structure"` - - // The ARN of the S3 bucket. For more information, see Amazon Resource Names - // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - BucketARN *string `min:"1" type:"string"` - - // The buffering option. If no value is specified, BufferingHints object default - // values are used. - BufferingHints *BufferingHints `type:"structure"` - - // The CloudWatch logging options for your delivery stream. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The compression format. If no value is specified, the default is UNCOMPRESSED. - // - // The compression formats SNAPPY or ZIP cannot be specified for Amazon Redshift - // destinations because they are not supported by the Amazon Redshift COPY operation - // that reads from the S3 bucket. - CompressionFormat *string `type:"string" enum:"CompressionFormat"` - - // The encryption configuration. If no value is specified, the default is no - // encryption. - EncryptionConfiguration *EncryptionConfiguration `type:"structure"` - - // A prefix that Kinesis Data Firehose evaluates and adds to failed records - // before writing them to S3. This prefix appears immediately following the - // bucket name. - ErrorOutputPrefix *string `type:"string"` - - // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // Amazon S3 files. You can specify an extra prefix to be added in front of - // the time format prefix. If the prefix ends with a slash, it appears as a - // folder in the S3 bucket. For more information, see Amazon S3 Object Name - // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) - // in the Amazon Kinesis Data Firehose Developer Guide. - Prefix *string `type:"string"` - - // The Amazon Resource Name (ARN) of the AWS credentials. For more information, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - RoleARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s S3DestinationUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3DestinationUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3DestinationUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3DestinationUpdate"} - if s.BucketARN != nil && len(*s.BucketARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BucketARN", 1)) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - if s.BufferingHints != nil { - if err := s.BufferingHints.Validate(); err != nil { - invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams)) - } - } - if s.EncryptionConfiguration != nil { - if err := s.EncryptionConfiguration.Validate(); err != nil { - invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketARN sets the BucketARN field's value. -func (s *S3DestinationUpdate) SetBucketARN(v string) *S3DestinationUpdate { - s.BucketARN = &v - return s -} - -// SetBufferingHints sets the BufferingHints field's value. -func (s *S3DestinationUpdate) SetBufferingHints(v *BufferingHints) *S3DestinationUpdate { - s.BufferingHints = v - return s -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *S3DestinationUpdate) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *S3DestinationUpdate { - s.CloudWatchLoggingOptions = v - return s -} - -// SetCompressionFormat sets the CompressionFormat field's value. -func (s *S3DestinationUpdate) SetCompressionFormat(v string) *S3DestinationUpdate { - s.CompressionFormat = &v - return s -} - -// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. -func (s *S3DestinationUpdate) SetEncryptionConfiguration(v *EncryptionConfiguration) *S3DestinationUpdate { - s.EncryptionConfiguration = v - return s -} - -// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. -func (s *S3DestinationUpdate) SetErrorOutputPrefix(v string) *S3DestinationUpdate { - s.ErrorOutputPrefix = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *S3DestinationUpdate) SetPrefix(v string) *S3DestinationUpdate { - s.Prefix = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *S3DestinationUpdate) SetRoleARN(v string) *S3DestinationUpdate { - s.RoleARN = &v - return s -} - -// Specifies the schema to which you want Kinesis Data Firehose to configure -// your data before it writes it to Amazon S3. -type SchemaConfiguration struct { - _ struct{} `type:"structure"` - - // The ID of the AWS Glue Data Catalog. If you don't supply this, the AWS account - // ID is used by default. - CatalogId *string `type:"string"` - - // Specifies the name of the AWS Glue database that contains the schema for - // the output data. - DatabaseName *string `type:"string"` - - // If you don't specify an AWS Region, the default is the current Region. - Region *string `type:"string"` - - // The role that Kinesis Data Firehose can use to access AWS Glue. This role - // must be in the same account you use for Kinesis Data Firehose. Cross-account - // roles aren't allowed. - RoleARN *string `type:"string"` - - // Specifies the AWS Glue table that contains the column information that constitutes - // your data schema. - TableName *string `type:"string"` - - // Specifies the table version for the output data schema. If you don't specify - // this version ID, or if you set it to LATEST, Kinesis Data Firehose uses the - // most recent version. This means that any updates to the table are automatically - // picked up. - VersionId *string `type:"string"` -} - -// String returns the string representation -func (s SchemaConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SchemaConfiguration) GoString() string { - return s.String() -} - -// SetCatalogId sets the CatalogId field's value. -func (s *SchemaConfiguration) SetCatalogId(v string) *SchemaConfiguration { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *SchemaConfiguration) SetDatabaseName(v string) *SchemaConfiguration { - s.DatabaseName = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *SchemaConfiguration) SetRegion(v string) *SchemaConfiguration { - s.Region = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *SchemaConfiguration) SetRoleARN(v string) *SchemaConfiguration { - s.RoleARN = &v - return s -} - -// SetTableName sets the TableName field's value. -func (s *SchemaConfiguration) SetTableName(v string) *SchemaConfiguration { - s.TableName = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *SchemaConfiguration) SetVersionId(v string) *SchemaConfiguration { - s.VersionId = &v - return s -} - -// The serializer that you want Kinesis Data Firehose to use to convert data -// to the target format before writing it to Amazon S3. Kinesis Data Firehose -// supports two types of serializers: the ORC SerDe (https://hive.apache.org/javadocs/r1.2.2/api/org/apache/hadoop/hive/ql/io/orc/OrcSerde.html) -// and the Parquet SerDe (https://hive.apache.org/javadocs/r1.2.2/api/org/apache/hadoop/hive/ql/io/parquet/serde/ParquetHiveSerDe.html). -type Serializer struct { - _ struct{} `type:"structure"` - - // A serializer to use for converting data to the ORC format before storing - // it in Amazon S3. For more information, see Apache ORC (https://orc.apache.org/docs/). - OrcSerDe *OrcSerDe `type:"structure"` - - // A serializer to use for converting data to the Parquet format before storing - // it in Amazon S3. For more information, see Apache Parquet (https://parquet.apache.org/documentation/latest/). - ParquetSerDe *ParquetSerDe `type:"structure"` -} - -// String returns the string representation -func (s Serializer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Serializer) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Serializer) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Serializer"} - if s.OrcSerDe != nil { - if err := s.OrcSerDe.Validate(); err != nil { - invalidParams.AddNested("OrcSerDe", err.(request.ErrInvalidParams)) - } - } - if s.ParquetSerDe != nil { - if err := s.ParquetSerDe.Validate(); err != nil { - invalidParams.AddNested("ParquetSerDe", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOrcSerDe sets the OrcSerDe field's value. -func (s *Serializer) SetOrcSerDe(v *OrcSerDe) *Serializer { - s.OrcSerDe = v - return s -} - -// SetParquetSerDe sets the ParquetSerDe field's value. -func (s *Serializer) SetParquetSerDe(v *ParquetSerDe) *Serializer { - s.ParquetSerDe = v - return s -} - -// Details about a Kinesis data stream used as the source for a Kinesis Data -// Firehose delivery stream. -type SourceDescription struct { - _ struct{} `type:"structure"` - - // The KinesisStreamSourceDescription value for the source Kinesis data stream. - KinesisStreamSourceDescription *KinesisStreamSourceDescription `type:"structure"` -} - -// String returns the string representation -func (s SourceDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SourceDescription) GoString() string { - return s.String() -} - -// SetKinesisStreamSourceDescription sets the KinesisStreamSourceDescription field's value. -func (s *SourceDescription) SetKinesisStreamSourceDescription(v *KinesisStreamSourceDescription) *SourceDescription { - s.KinesisStreamSourceDescription = v - return s -} - -// Describes the configuration of a destination in Splunk. -type SplunkDestinationConfiguration struct { - _ struct{} `type:"structure"` - - // The Amazon CloudWatch logging options for your delivery stream. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The amount of time that Kinesis Data Firehose waits to receive an acknowledgment - // from Splunk after it sends it data. At the end of the timeout period, Kinesis - // Data Firehose either tries to send the data again or considers it an error, - // based on your retry settings. - HECAcknowledgmentTimeoutInSeconds *int64 `min:"180" type:"integer"` - - // The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose sends - // your data. - // - // HECEndpoint is a required field - HECEndpoint *string `type:"string" required:"true"` - - // This type can be either "Raw" or "Event." - // - // HECEndpointType is a required field - HECEndpointType *string `type:"string" required:"true" enum:"HECEndpointType"` - - // This is a GUID that you obtain from your Splunk cluster when you create a - // new HEC endpoint. - // - // HECToken is a required field - HECToken *string `type:"string" required:"true"` - - // The data processing configuration. - ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - - // The retry behavior in case Kinesis Data Firehose is unable to deliver data - // to Splunk, or if it doesn't receive an acknowledgment of receipt from Splunk. - RetryOptions *SplunkRetryOptions `type:"structure"` - - // Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly, - // Kinesis Data Firehose writes any data that could not be indexed to the configured - // Amazon S3 destination. When set to AllDocuments, Kinesis Data Firehose delivers - // all incoming records to Amazon S3, and also writes failed documents to Amazon - // S3. Default value is FailedDocumentsOnly. - S3BackupMode *string `type:"string" enum:"SplunkS3BackupMode"` - - // The configuration for the backup Amazon S3 location. - // - // S3Configuration is a required field - S3Configuration *S3DestinationConfiguration `type:"structure" required:"true"` -} - -// String returns the string representation -func (s SplunkDestinationConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SplunkDestinationConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SplunkDestinationConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SplunkDestinationConfiguration"} - if s.HECAcknowledgmentTimeoutInSeconds != nil && *s.HECAcknowledgmentTimeoutInSeconds < 180 { - invalidParams.Add(request.NewErrParamMinValue("HECAcknowledgmentTimeoutInSeconds", 180)) - } - if s.HECEndpoint == nil { - invalidParams.Add(request.NewErrParamRequired("HECEndpoint")) - } - if s.HECEndpointType == nil { - invalidParams.Add(request.NewErrParamRequired("HECEndpointType")) - } - if s.HECToken == nil { - invalidParams.Add(request.NewErrParamRequired("HECToken")) - } - if s.S3Configuration == nil { - invalidParams.Add(request.NewErrParamRequired("S3Configuration")) - } - if s.ProcessingConfiguration != nil { - if err := s.ProcessingConfiguration.Validate(); err != nil { - invalidParams.AddNested("ProcessingConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.S3Configuration != nil { - if err := s.S3Configuration.Validate(); err != nil { - invalidParams.AddNested("S3Configuration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *SplunkDestinationConfiguration) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *SplunkDestinationConfiguration { - s.CloudWatchLoggingOptions = v - return s -} - -// SetHECAcknowledgmentTimeoutInSeconds sets the HECAcknowledgmentTimeoutInSeconds field's value. -func (s *SplunkDestinationConfiguration) SetHECAcknowledgmentTimeoutInSeconds(v int64) *SplunkDestinationConfiguration { - s.HECAcknowledgmentTimeoutInSeconds = &v - return s -} - -// SetHECEndpoint sets the HECEndpoint field's value. -func (s *SplunkDestinationConfiguration) SetHECEndpoint(v string) *SplunkDestinationConfiguration { - s.HECEndpoint = &v - return s -} - -// SetHECEndpointType sets the HECEndpointType field's value. -func (s *SplunkDestinationConfiguration) SetHECEndpointType(v string) *SplunkDestinationConfiguration { - s.HECEndpointType = &v - return s -} - -// SetHECToken sets the HECToken field's value. -func (s *SplunkDestinationConfiguration) SetHECToken(v string) *SplunkDestinationConfiguration { - s.HECToken = &v - return s -} - -// SetProcessingConfiguration sets the ProcessingConfiguration field's value. -func (s *SplunkDestinationConfiguration) SetProcessingConfiguration(v *ProcessingConfiguration) *SplunkDestinationConfiguration { - s.ProcessingConfiguration = v - return s -} - -// SetRetryOptions sets the RetryOptions field's value. -func (s *SplunkDestinationConfiguration) SetRetryOptions(v *SplunkRetryOptions) *SplunkDestinationConfiguration { - s.RetryOptions = v - return s -} - -// SetS3BackupMode sets the S3BackupMode field's value. -func (s *SplunkDestinationConfiguration) SetS3BackupMode(v string) *SplunkDestinationConfiguration { - s.S3BackupMode = &v - return s -} - -// SetS3Configuration sets the S3Configuration field's value. -func (s *SplunkDestinationConfiguration) SetS3Configuration(v *S3DestinationConfiguration) *SplunkDestinationConfiguration { - s.S3Configuration = v - return s -} - -// Describes a destination in Splunk. -type SplunkDestinationDescription struct { - _ struct{} `type:"structure"` - - // The Amazon CloudWatch logging options for your delivery stream. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The amount of time that Kinesis Data Firehose waits to receive an acknowledgment - // from Splunk after it sends it data. At the end of the timeout period, Kinesis - // Data Firehose either tries to send the data again or considers it an error, - // based on your retry settings. - HECAcknowledgmentTimeoutInSeconds *int64 `min:"180" type:"integer"` - - // The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose sends - // your data. - HECEndpoint *string `type:"string"` - - // This type can be either "Raw" or "Event." - HECEndpointType *string `type:"string" enum:"HECEndpointType"` - - // A GUID you obtain from your Splunk cluster when you create a new HEC endpoint. - HECToken *string `type:"string"` - - // The data processing configuration. - ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - - // The retry behavior in case Kinesis Data Firehose is unable to deliver data - // to Splunk or if it doesn't receive an acknowledgment of receipt from Splunk. - RetryOptions *SplunkRetryOptions `type:"structure"` - - // Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly, - // Kinesis Data Firehose writes any data that could not be indexed to the configured - // Amazon S3 destination. When set to AllDocuments, Kinesis Data Firehose delivers - // all incoming records to Amazon S3, and also writes failed documents to Amazon - // S3. Default value is FailedDocumentsOnly. - S3BackupMode *string `type:"string" enum:"SplunkS3BackupMode"` - - // The Amazon S3 destination.> - S3DestinationDescription *S3DestinationDescription `type:"structure"` -} - -// String returns the string representation -func (s SplunkDestinationDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SplunkDestinationDescription) GoString() string { - return s.String() -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *SplunkDestinationDescription) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *SplunkDestinationDescription { - s.CloudWatchLoggingOptions = v - return s -} - -// SetHECAcknowledgmentTimeoutInSeconds sets the HECAcknowledgmentTimeoutInSeconds field's value. -func (s *SplunkDestinationDescription) SetHECAcknowledgmentTimeoutInSeconds(v int64) *SplunkDestinationDescription { - s.HECAcknowledgmentTimeoutInSeconds = &v - return s -} - -// SetHECEndpoint sets the HECEndpoint field's value. -func (s *SplunkDestinationDescription) SetHECEndpoint(v string) *SplunkDestinationDescription { - s.HECEndpoint = &v - return s -} - -// SetHECEndpointType sets the HECEndpointType field's value. -func (s *SplunkDestinationDescription) SetHECEndpointType(v string) *SplunkDestinationDescription { - s.HECEndpointType = &v - return s -} - -// SetHECToken sets the HECToken field's value. -func (s *SplunkDestinationDescription) SetHECToken(v string) *SplunkDestinationDescription { - s.HECToken = &v - return s -} - -// SetProcessingConfiguration sets the ProcessingConfiguration field's value. -func (s *SplunkDestinationDescription) SetProcessingConfiguration(v *ProcessingConfiguration) *SplunkDestinationDescription { - s.ProcessingConfiguration = v - return s -} - -// SetRetryOptions sets the RetryOptions field's value. -func (s *SplunkDestinationDescription) SetRetryOptions(v *SplunkRetryOptions) *SplunkDestinationDescription { - s.RetryOptions = v - return s -} - -// SetS3BackupMode sets the S3BackupMode field's value. -func (s *SplunkDestinationDescription) SetS3BackupMode(v string) *SplunkDestinationDescription { - s.S3BackupMode = &v - return s -} - -// SetS3DestinationDescription sets the S3DestinationDescription field's value. -func (s *SplunkDestinationDescription) SetS3DestinationDescription(v *S3DestinationDescription) *SplunkDestinationDescription { - s.S3DestinationDescription = v - return s -} - -// Describes an update for a destination in Splunk. -type SplunkDestinationUpdate struct { - _ struct{} `type:"structure"` - - // The Amazon CloudWatch logging options for your delivery stream. - CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - - // The amount of time that Kinesis Data Firehose waits to receive an acknowledgment - // from Splunk after it sends data. At the end of the timeout period, Kinesis - // Data Firehose either tries to send the data again or considers it an error, - // based on your retry settings. - HECAcknowledgmentTimeoutInSeconds *int64 `min:"180" type:"integer"` - - // The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose sends - // your data. - HECEndpoint *string `type:"string"` - - // This type can be either "Raw" or "Event." - HECEndpointType *string `type:"string" enum:"HECEndpointType"` - - // A GUID that you obtain from your Splunk cluster when you create a new HEC - // endpoint. - HECToken *string `type:"string"` - - // The data processing configuration. - ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - - // The retry behavior in case Kinesis Data Firehose is unable to deliver data - // to Splunk or if it doesn't receive an acknowledgment of receipt from Splunk. - RetryOptions *SplunkRetryOptions `type:"structure"` - - // Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly, - // Kinesis Data Firehose writes any data that could not be indexed to the configured - // Amazon S3 destination. When set to AllDocuments, Kinesis Data Firehose delivers - // all incoming records to Amazon S3, and also writes failed documents to Amazon - // S3. Default value is FailedDocumentsOnly. - S3BackupMode *string `type:"string" enum:"SplunkS3BackupMode"` - - // Your update to the configuration of the backup Amazon S3 location. - S3Update *S3DestinationUpdate `type:"structure"` -} - -// String returns the string representation -func (s SplunkDestinationUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SplunkDestinationUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SplunkDestinationUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SplunkDestinationUpdate"} - if s.HECAcknowledgmentTimeoutInSeconds != nil && *s.HECAcknowledgmentTimeoutInSeconds < 180 { - invalidParams.Add(request.NewErrParamMinValue("HECAcknowledgmentTimeoutInSeconds", 180)) - } - if s.ProcessingConfiguration != nil { - if err := s.ProcessingConfiguration.Validate(); err != nil { - invalidParams.AddNested("ProcessingConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.S3Update != nil { - if err := s.S3Update.Validate(); err != nil { - invalidParams.AddNested("S3Update", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *SplunkDestinationUpdate) SetCloudWatchLoggingOptions(v *CloudWatchLoggingOptions) *SplunkDestinationUpdate { - s.CloudWatchLoggingOptions = v - return s -} - -// SetHECAcknowledgmentTimeoutInSeconds sets the HECAcknowledgmentTimeoutInSeconds field's value. -func (s *SplunkDestinationUpdate) SetHECAcknowledgmentTimeoutInSeconds(v int64) *SplunkDestinationUpdate { - s.HECAcknowledgmentTimeoutInSeconds = &v - return s -} - -// SetHECEndpoint sets the HECEndpoint field's value. -func (s *SplunkDestinationUpdate) SetHECEndpoint(v string) *SplunkDestinationUpdate { - s.HECEndpoint = &v - return s -} - -// SetHECEndpointType sets the HECEndpointType field's value. -func (s *SplunkDestinationUpdate) SetHECEndpointType(v string) *SplunkDestinationUpdate { - s.HECEndpointType = &v - return s -} - -// SetHECToken sets the HECToken field's value. -func (s *SplunkDestinationUpdate) SetHECToken(v string) *SplunkDestinationUpdate { - s.HECToken = &v - return s -} - -// SetProcessingConfiguration sets the ProcessingConfiguration field's value. -func (s *SplunkDestinationUpdate) SetProcessingConfiguration(v *ProcessingConfiguration) *SplunkDestinationUpdate { - s.ProcessingConfiguration = v - return s -} - -// SetRetryOptions sets the RetryOptions field's value. -func (s *SplunkDestinationUpdate) SetRetryOptions(v *SplunkRetryOptions) *SplunkDestinationUpdate { - s.RetryOptions = v - return s -} - -// SetS3BackupMode sets the S3BackupMode field's value. -func (s *SplunkDestinationUpdate) SetS3BackupMode(v string) *SplunkDestinationUpdate { - s.S3BackupMode = &v - return s -} - -// SetS3Update sets the S3Update field's value. -func (s *SplunkDestinationUpdate) SetS3Update(v *S3DestinationUpdate) *SplunkDestinationUpdate { - s.S3Update = v - return s -} - -// Configures retry behavior in case Kinesis Data Firehose is unable to deliver -// documents to Splunk, or if it doesn't receive an acknowledgment from Splunk. -type SplunkRetryOptions struct { - _ struct{} `type:"structure"` - - // The total amount of time that Kinesis Data Firehose spends on retries. This - // duration starts after the initial attempt to send data to Splunk fails. It - // doesn't include the periods during which Kinesis Data Firehose waits for - // acknowledgment from Splunk after each attempt. - DurationInSeconds *int64 `type:"integer"` -} - -// String returns the string representation -func (s SplunkRetryOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SplunkRetryOptions) GoString() string { - return s.String() -} - -// SetDurationInSeconds sets the DurationInSeconds field's value. -func (s *SplunkRetryOptions) SetDurationInSeconds(v int64) *SplunkRetryOptions { - s.DurationInSeconds = &v - return s -} - -type StartDeliveryStreamEncryptionInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery stream for which you want to enable server-side - // encryption (SSE). - // - // DeliveryStreamName is a required field - DeliveryStreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartDeliveryStreamEncryptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartDeliveryStreamEncryptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartDeliveryStreamEncryptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartDeliveryStreamEncryptionInput"} - if s.DeliveryStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) - } - if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryStreamName sets the DeliveryStreamName field's value. -func (s *StartDeliveryStreamEncryptionInput) SetDeliveryStreamName(v string) *StartDeliveryStreamEncryptionInput { - s.DeliveryStreamName = &v - return s -} - -type StartDeliveryStreamEncryptionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StartDeliveryStreamEncryptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartDeliveryStreamEncryptionOutput) GoString() string { - return s.String() -} - -type StopDeliveryStreamEncryptionInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery stream for which you want to disable server-side - // encryption (SSE). - // - // DeliveryStreamName is a required field - DeliveryStreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopDeliveryStreamEncryptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopDeliveryStreamEncryptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopDeliveryStreamEncryptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopDeliveryStreamEncryptionInput"} - if s.DeliveryStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) - } - if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryStreamName sets the DeliveryStreamName field's value. -func (s *StopDeliveryStreamEncryptionInput) SetDeliveryStreamName(v string) *StopDeliveryStreamEncryptionInput { - s.DeliveryStreamName = &v - return s -} - -type StopDeliveryStreamEncryptionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopDeliveryStreamEncryptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopDeliveryStreamEncryptionOutput) GoString() string { - return s.String() -} - -// Metadata that you can assign to a delivery stream, consisting of a key-value -// pair. -type Tag struct { - _ struct{} `type:"structure"` - - // A unique identifier for the tag. Maximum length: 128 characters. Valid characters: - // Unicode letters, digits, white space, _ . / = + - % @ - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // An optional string, which you can use to describe or define the tag. Maximum - // length: 256 characters. Valid characters: Unicode letters, digits, white - // space, _ . / = + - % @ - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagDeliveryStreamInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery stream to which you want to add the tags. - // - // DeliveryStreamName is a required field - DeliveryStreamName *string `min:"1" type:"string" required:"true"` - - // A set of key-value pairs to use to create the tags. - // - // Tags is a required field - Tags []*Tag `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s TagDeliveryStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagDeliveryStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagDeliveryStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagDeliveryStreamInput"} - if s.DeliveryStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) - } - if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryStreamName sets the DeliveryStreamName field's value. -func (s *TagDeliveryStreamInput) SetDeliveryStreamName(v string) *TagDeliveryStreamInput { - s.DeliveryStreamName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagDeliveryStreamInput) SetTags(v []*Tag) *TagDeliveryStreamInput { - s.Tags = v - return s -} - -type TagDeliveryStreamOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagDeliveryStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagDeliveryStreamOutput) GoString() string { - return s.String() -} - -type UntagDeliveryStreamInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery stream. - // - // DeliveryStreamName is a required field - DeliveryStreamName *string `min:"1" type:"string" required:"true"` - - // A list of tag keys. Each corresponding tag is removed from the delivery stream. - // - // TagKeys is a required field - TagKeys []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s UntagDeliveryStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagDeliveryStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagDeliveryStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagDeliveryStreamInput"} - if s.DeliveryStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) - } - if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - if s.TagKeys != nil && len(s.TagKeys) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryStreamName sets the DeliveryStreamName field's value. -func (s *UntagDeliveryStreamInput) SetDeliveryStreamName(v string) *UntagDeliveryStreamInput { - s.DeliveryStreamName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagDeliveryStreamInput) SetTagKeys(v []*string) *UntagDeliveryStreamInput { - s.TagKeys = v - return s -} - -type UntagDeliveryStreamOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagDeliveryStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagDeliveryStreamOutput) GoString() string { - return s.String() -} - -type UpdateDestinationInput struct { - _ struct{} `type:"structure"` - - // Obtain this value from the VersionId result of DeliveryStreamDescription. - // This value is required, and helps the service perform conditional operations. - // For example, if there is an interleaving update and this value is null, then - // the update destination fails. After the update is successful, the VersionId - // value is updated. The service then performs a merge of the old configuration - // with the new configuration. - // - // CurrentDeliveryStreamVersionId is a required field - CurrentDeliveryStreamVersionId *string `min:"1" type:"string" required:"true"` - - // The name of the delivery stream. - // - // DeliveryStreamName is a required field - DeliveryStreamName *string `min:"1" type:"string" required:"true"` - - // The ID of the destination. - // - // DestinationId is a required field - DestinationId *string `min:"1" type:"string" required:"true"` - - // Describes an update for a destination in Amazon ES. - ElasticsearchDestinationUpdate *ElasticsearchDestinationUpdate `type:"structure"` - - // Describes an update for a destination in Amazon S3. - ExtendedS3DestinationUpdate *ExtendedS3DestinationUpdate `type:"structure"` - - // Describes an update for a destination in Amazon Redshift. - RedshiftDestinationUpdate *RedshiftDestinationUpdate `type:"structure"` - - // [Deprecated] Describes an update for a destination in Amazon S3. - // - // Deprecated: S3DestinationUpdate has been deprecated - S3DestinationUpdate *S3DestinationUpdate `deprecated:"true" type:"structure"` - - // Describes an update for a destination in Splunk. - SplunkDestinationUpdate *SplunkDestinationUpdate `type:"structure"` -} - -// String returns the string representation -func (s UpdateDestinationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDestinationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDestinationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDestinationInput"} - if s.CurrentDeliveryStreamVersionId == nil { - invalidParams.Add(request.NewErrParamRequired("CurrentDeliveryStreamVersionId")) - } - if s.CurrentDeliveryStreamVersionId != nil && len(*s.CurrentDeliveryStreamVersionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CurrentDeliveryStreamVersionId", 1)) - } - if s.DeliveryStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) - } - if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) - } - if s.DestinationId == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationId")) - } - if s.DestinationId != nil && len(*s.DestinationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DestinationId", 1)) - } - if s.ElasticsearchDestinationUpdate != nil { - if err := s.ElasticsearchDestinationUpdate.Validate(); err != nil { - invalidParams.AddNested("ElasticsearchDestinationUpdate", err.(request.ErrInvalidParams)) - } - } - if s.ExtendedS3DestinationUpdate != nil { - if err := s.ExtendedS3DestinationUpdate.Validate(); err != nil { - invalidParams.AddNested("ExtendedS3DestinationUpdate", err.(request.ErrInvalidParams)) - } - } - if s.RedshiftDestinationUpdate != nil { - if err := s.RedshiftDestinationUpdate.Validate(); err != nil { - invalidParams.AddNested("RedshiftDestinationUpdate", err.(request.ErrInvalidParams)) - } - } - if s.S3DestinationUpdate != nil { - if err := s.S3DestinationUpdate.Validate(); err != nil { - invalidParams.AddNested("S3DestinationUpdate", err.(request.ErrInvalidParams)) - } - } - if s.SplunkDestinationUpdate != nil { - if err := s.SplunkDestinationUpdate.Validate(); err != nil { - invalidParams.AddNested("SplunkDestinationUpdate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCurrentDeliveryStreamVersionId sets the CurrentDeliveryStreamVersionId field's value. -func (s *UpdateDestinationInput) SetCurrentDeliveryStreamVersionId(v string) *UpdateDestinationInput { - s.CurrentDeliveryStreamVersionId = &v - return s -} - -// SetDeliveryStreamName sets the DeliveryStreamName field's value. -func (s *UpdateDestinationInput) SetDeliveryStreamName(v string) *UpdateDestinationInput { - s.DeliveryStreamName = &v - return s -} - -// SetDestinationId sets the DestinationId field's value. -func (s *UpdateDestinationInput) SetDestinationId(v string) *UpdateDestinationInput { - s.DestinationId = &v - return s -} - -// SetElasticsearchDestinationUpdate sets the ElasticsearchDestinationUpdate field's value. -func (s *UpdateDestinationInput) SetElasticsearchDestinationUpdate(v *ElasticsearchDestinationUpdate) *UpdateDestinationInput { - s.ElasticsearchDestinationUpdate = v - return s -} - -// SetExtendedS3DestinationUpdate sets the ExtendedS3DestinationUpdate field's value. -func (s *UpdateDestinationInput) SetExtendedS3DestinationUpdate(v *ExtendedS3DestinationUpdate) *UpdateDestinationInput { - s.ExtendedS3DestinationUpdate = v - return s -} - -// SetRedshiftDestinationUpdate sets the RedshiftDestinationUpdate field's value. -func (s *UpdateDestinationInput) SetRedshiftDestinationUpdate(v *RedshiftDestinationUpdate) *UpdateDestinationInput { - s.RedshiftDestinationUpdate = v - return s -} - -// SetS3DestinationUpdate sets the S3DestinationUpdate field's value. -func (s *UpdateDestinationInput) SetS3DestinationUpdate(v *S3DestinationUpdate) *UpdateDestinationInput { - s.S3DestinationUpdate = v - return s -} - -// SetSplunkDestinationUpdate sets the SplunkDestinationUpdate field's value. -func (s *UpdateDestinationInput) SetSplunkDestinationUpdate(v *SplunkDestinationUpdate) *UpdateDestinationInput { - s.SplunkDestinationUpdate = v - return s -} - -type UpdateDestinationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateDestinationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDestinationOutput) GoString() string { - return s.String() -} - -const ( - // CompressionFormatUncompressed is a CompressionFormat enum value - CompressionFormatUncompressed = "UNCOMPRESSED" - - // CompressionFormatGzip is a CompressionFormat enum value - CompressionFormatGzip = "GZIP" - - // CompressionFormatZip is a CompressionFormat enum value - CompressionFormatZip = "ZIP" - - // CompressionFormatSnappy is a CompressionFormat enum value - CompressionFormatSnappy = "Snappy" -) - -const ( - // DeliveryStreamEncryptionStatusEnabled is a DeliveryStreamEncryptionStatus enum value - DeliveryStreamEncryptionStatusEnabled = "ENABLED" - - // DeliveryStreamEncryptionStatusEnabling is a DeliveryStreamEncryptionStatus enum value - DeliveryStreamEncryptionStatusEnabling = "ENABLING" - - // DeliveryStreamEncryptionStatusDisabled is a DeliveryStreamEncryptionStatus enum value - DeliveryStreamEncryptionStatusDisabled = "DISABLED" - - // DeliveryStreamEncryptionStatusDisabling is a DeliveryStreamEncryptionStatus enum value - DeliveryStreamEncryptionStatusDisabling = "DISABLING" -) - -const ( - // DeliveryStreamStatusCreating is a DeliveryStreamStatus enum value - DeliveryStreamStatusCreating = "CREATING" - - // DeliveryStreamStatusDeleting is a DeliveryStreamStatus enum value - DeliveryStreamStatusDeleting = "DELETING" - - // DeliveryStreamStatusActive is a DeliveryStreamStatus enum value - DeliveryStreamStatusActive = "ACTIVE" -) - -const ( - // DeliveryStreamTypeDirectPut is a DeliveryStreamType enum value - DeliveryStreamTypeDirectPut = "DirectPut" - - // DeliveryStreamTypeKinesisStreamAsSource is a DeliveryStreamType enum value - DeliveryStreamTypeKinesisStreamAsSource = "KinesisStreamAsSource" -) - -const ( - // ElasticsearchIndexRotationPeriodNoRotation is a ElasticsearchIndexRotationPeriod enum value - ElasticsearchIndexRotationPeriodNoRotation = "NoRotation" - - // ElasticsearchIndexRotationPeriodOneHour is a ElasticsearchIndexRotationPeriod enum value - ElasticsearchIndexRotationPeriodOneHour = "OneHour" - - // ElasticsearchIndexRotationPeriodOneDay is a ElasticsearchIndexRotationPeriod enum value - ElasticsearchIndexRotationPeriodOneDay = "OneDay" - - // ElasticsearchIndexRotationPeriodOneWeek is a ElasticsearchIndexRotationPeriod enum value - ElasticsearchIndexRotationPeriodOneWeek = "OneWeek" - - // ElasticsearchIndexRotationPeriodOneMonth is a ElasticsearchIndexRotationPeriod enum value - ElasticsearchIndexRotationPeriodOneMonth = "OneMonth" -) - -const ( - // ElasticsearchS3BackupModeFailedDocumentsOnly is a ElasticsearchS3BackupMode enum value - ElasticsearchS3BackupModeFailedDocumentsOnly = "FailedDocumentsOnly" - - // ElasticsearchS3BackupModeAllDocuments is a ElasticsearchS3BackupMode enum value - ElasticsearchS3BackupModeAllDocuments = "AllDocuments" -) - -const ( - // HECEndpointTypeRaw is a HECEndpointType enum value - HECEndpointTypeRaw = "Raw" - - // HECEndpointTypeEvent is a HECEndpointType enum value - HECEndpointTypeEvent = "Event" -) - -const ( - // NoEncryptionConfigNoEncryption is a NoEncryptionConfig enum value - NoEncryptionConfigNoEncryption = "NoEncryption" -) - -const ( - // OrcCompressionNone is a OrcCompression enum value - OrcCompressionNone = "NONE" - - // OrcCompressionZlib is a OrcCompression enum value - OrcCompressionZlib = "ZLIB" - - // OrcCompressionSnappy is a OrcCompression enum value - OrcCompressionSnappy = "SNAPPY" -) - -const ( - // OrcFormatVersionV011 is a OrcFormatVersion enum value - OrcFormatVersionV011 = "V0_11" - - // OrcFormatVersionV012 is a OrcFormatVersion enum value - OrcFormatVersionV012 = "V0_12" -) - -const ( - // ParquetCompressionUncompressed is a ParquetCompression enum value - ParquetCompressionUncompressed = "UNCOMPRESSED" - - // ParquetCompressionGzip is a ParquetCompression enum value - ParquetCompressionGzip = "GZIP" - - // ParquetCompressionSnappy is a ParquetCompression enum value - ParquetCompressionSnappy = "SNAPPY" -) - -const ( - // ParquetWriterVersionV1 is a ParquetWriterVersion enum value - ParquetWriterVersionV1 = "V1" - - // ParquetWriterVersionV2 is a ParquetWriterVersion enum value - ParquetWriterVersionV2 = "V2" -) - -const ( - // ProcessorParameterNameLambdaArn is a ProcessorParameterName enum value - ProcessorParameterNameLambdaArn = "LambdaArn" - - // ProcessorParameterNameNumberOfRetries is a ProcessorParameterName enum value - ProcessorParameterNameNumberOfRetries = "NumberOfRetries" - - // ProcessorParameterNameRoleArn is a ProcessorParameterName enum value - ProcessorParameterNameRoleArn = "RoleArn" - - // ProcessorParameterNameBufferSizeInMbs is a ProcessorParameterName enum value - ProcessorParameterNameBufferSizeInMbs = "BufferSizeInMBs" - - // ProcessorParameterNameBufferIntervalInSeconds is a ProcessorParameterName enum value - ProcessorParameterNameBufferIntervalInSeconds = "BufferIntervalInSeconds" -) - -const ( - // ProcessorTypeLambda is a ProcessorType enum value - ProcessorTypeLambda = "Lambda" -) - -const ( - // RedshiftS3BackupModeDisabled is a RedshiftS3BackupMode enum value - RedshiftS3BackupModeDisabled = "Disabled" - - // RedshiftS3BackupModeEnabled is a RedshiftS3BackupMode enum value - RedshiftS3BackupModeEnabled = "Enabled" -) - -const ( - // S3BackupModeDisabled is a S3BackupMode enum value - S3BackupModeDisabled = "Disabled" - - // S3BackupModeEnabled is a S3BackupMode enum value - S3BackupModeEnabled = "Enabled" -) - -const ( - // SplunkS3BackupModeFailedEventsOnly is a SplunkS3BackupMode enum value - SplunkS3BackupModeFailedEventsOnly = "FailedEventsOnly" - - // SplunkS3BackupModeAllEvents is a SplunkS3BackupMode enum value - SplunkS3BackupModeAllEvents = "AllEvents" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go deleted file mode 100644 index 32bec009c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package firehose provides the client and types for making API -// requests to Amazon Kinesis Firehose. -// -// Amazon Kinesis Data Firehose is a fully managed service that delivers real-time -// streaming data to destinations such as Amazon Simple Storage Service (Amazon -// S3), Amazon Elasticsearch Service (Amazon ES), Amazon Redshift, and Splunk. -// -// See https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04 for more information on this service. -// -// See firehose package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/firehose/ -// -// Using the Client -// -// To contact Amazon Kinesis Firehose with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Kinesis Firehose client Firehose for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/firehose/#New -package firehose diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/errors.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/errors.go deleted file mode 100644 index d70656e3e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/errors.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package firehose - -const ( - - // ErrCodeConcurrentModificationException for service response error code - // "ConcurrentModificationException". - // - // Another modification has already happened. Fetch VersionId again and use - // it to update the destination. - ErrCodeConcurrentModificationException = "ConcurrentModificationException" - - // ErrCodeInvalidArgumentException for service response error code - // "InvalidArgumentException". - // - // The specified input parameter has a value that is not valid. - ErrCodeInvalidArgumentException = "InvalidArgumentException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // You have already reached the limit for a requested resource. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUseException". - // - // The resource is already in use and not available for this operation. - ErrCodeResourceInUseException = "ResourceInUseException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The specified resource could not be found. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeServiceUnavailableException for service response error code - // "ServiceUnavailableException". - // - // The service is unavailable. Back off and retry the operation. If you continue - // to see the exception, throughput limits for the delivery stream may have - // been exceeded. For more information about limits and how to request an increase, - // see Amazon Kinesis Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). - ErrCodeServiceUnavailableException = "ServiceUnavailableException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go deleted file mode 100644 index bcdf23dff..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package firehose - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// Firehose provides the API operation methods for making requests to -// Amazon Kinesis Firehose. See this package's package overview docs -// for details on the service. -// -// Firehose methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Firehose 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 = "firehose" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Firehose" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Firehose client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Firehose client from just a session. -// svc := firehose.New(mySession) -// -// // Create a Firehose client with additional configuration -// svc := firehose.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Firehose { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Firehose { - svc := &Firehose{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-08-04", - JSONVersion: "1.1", - TargetPrefix: "Firehose_20150804", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Firehose operation and runs any -// custom request initialization. -func (c *Firehose) 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/fms/api.go b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go deleted file mode 100644 index 4c2b2be53..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go +++ /dev/null @@ -1,2754 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package fms - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAssociateAdminAccount = "AssociateAdminAccount" - -// AssociateAdminAccountRequest generates a "aws/request.Request" representing the -// client's request for the AssociateAdminAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateAdminAccount for more information on using the AssociateAdminAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateAdminAccountRequest method. -// req, resp := client.AssociateAdminAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/AssociateAdminAccount -func (c *FMS) AssociateAdminAccountRequest(input *AssociateAdminAccountInput) (req *request.Request, output *AssociateAdminAccountOutput) { - op := &request.Operation{ - Name: opAssociateAdminAccount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateAdminAccountInput{} - } - - output = &AssociateAdminAccountOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssociateAdminAccount API operation for Firewall Management Service. -// -// Sets the AWS Firewall Manager administrator account. AWS Firewall Manager -// must be associated with the master account your AWS organization or associated -// with a member account that has the appropriate permissions. If the account -// ID that you submit is not an AWS Organizations master account, AWS Firewall -// Manager will set the appropriate permissions for the given member account. -// -// The account that you associate with AWS Firewall Manager is called the AWS -// Firewall Manager administrator account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Firewall Management Service's -// API operation AssociateAdminAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The operation failed because there was nothing to do. For example, you might -// have submitted an AssociateAdminAccount request, but the account ID that -// you submitted was already set as the AWS Firewall Manager administrator. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The parameters of the request were invalid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/AssociateAdminAccount -func (c *FMS) AssociateAdminAccount(input *AssociateAdminAccountInput) (*AssociateAdminAccountOutput, error) { - req, out := c.AssociateAdminAccountRequest(input) - return out, req.Send() -} - -// AssociateAdminAccountWithContext is the same as AssociateAdminAccount with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateAdminAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FMS) AssociateAdminAccountWithContext(ctx aws.Context, input *AssociateAdminAccountInput, opts ...request.Option) (*AssociateAdminAccountOutput, error) { - req, out := c.AssociateAdminAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteNotificationChannel = "DeleteNotificationChannel" - -// DeleteNotificationChannelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteNotificationChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteNotificationChannel for more information on using the DeleteNotificationChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteNotificationChannelRequest method. -// req, resp := client.DeleteNotificationChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteNotificationChannel -func (c *FMS) DeleteNotificationChannelRequest(input *DeleteNotificationChannelInput) (req *request.Request, output *DeleteNotificationChannelOutput) { - op := &request.Operation{ - Name: opDeleteNotificationChannel, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteNotificationChannelInput{} - } - - output = &DeleteNotificationChannelOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteNotificationChannel API operation for Firewall Management Service. -// -// Deletes an AWS Firewall Manager association with the IAM role and the Amazon -// Simple Notification Service (SNS) topic that is used to record AWS Firewall -// Manager SNS logs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Firewall Management Service's -// API operation DeleteNotificationChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The operation failed because there was nothing to do. For example, you might -// have submitted an AssociateAdminAccount request, but the account ID that -// you submitted was already set as the AWS Firewall Manager administrator. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteNotificationChannel -func (c *FMS) DeleteNotificationChannel(input *DeleteNotificationChannelInput) (*DeleteNotificationChannelOutput, error) { - req, out := c.DeleteNotificationChannelRequest(input) - return out, req.Send() -} - -// DeleteNotificationChannelWithContext is the same as DeleteNotificationChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteNotificationChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FMS) DeleteNotificationChannelWithContext(ctx aws.Context, input *DeleteNotificationChannelInput, opts ...request.Option) (*DeleteNotificationChannelOutput, error) { - req, out := c.DeleteNotificationChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePolicy = "DeletePolicy" - -// DeletePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeletePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePolicy for more information on using the DeletePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePolicyRequest method. -// req, resp := client.DeletePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeletePolicy -func (c *FMS) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) { - op := &request.Operation{ - Name: opDeletePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePolicyInput{} - } - - output = &DeletePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePolicy API operation for Firewall Management Service. -// -// Permanently deletes an AWS Firewall Manager policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Firewall Management Service's -// API operation DeletePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The operation failed because there was nothing to do. For example, you might -// have submitted an AssociateAdminAccount request, but the account ID that -// you submitted was already set as the AWS Firewall Manager administrator. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeletePolicy -func (c *FMS) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) { - req, out := c.DeletePolicyRequest(input) - return out, req.Send() -} - -// DeletePolicyWithContext is the same as DeletePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FMS) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) { - req, out := c.DeletePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateAdminAccount = "DisassociateAdminAccount" - -// DisassociateAdminAccountRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateAdminAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateAdminAccount for more information on using the DisassociateAdminAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateAdminAccountRequest method. -// req, resp := client.DisassociateAdminAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateAdminAccount -func (c *FMS) DisassociateAdminAccountRequest(input *DisassociateAdminAccountInput) (req *request.Request, output *DisassociateAdminAccountOutput) { - op := &request.Operation{ - Name: opDisassociateAdminAccount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateAdminAccountInput{} - } - - output = &DisassociateAdminAccountOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateAdminAccount API operation for Firewall Management Service. -// -// Disassociates the account that has been set as the AWS Firewall Manager administrator -// account. To set a different account as the administrator account, you must -// submit an AssociateAdminAccount request . -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Firewall Management Service's -// API operation DisassociateAdminAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The operation failed because there was nothing to do. For example, you might -// have submitted an AssociateAdminAccount request, but the account ID that -// you submitted was already set as the AWS Firewall Manager administrator. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateAdminAccount -func (c *FMS) DisassociateAdminAccount(input *DisassociateAdminAccountInput) (*DisassociateAdminAccountOutput, error) { - req, out := c.DisassociateAdminAccountRequest(input) - return out, req.Send() -} - -// DisassociateAdminAccountWithContext is the same as DisassociateAdminAccount with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateAdminAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FMS) DisassociateAdminAccountWithContext(ctx aws.Context, input *DisassociateAdminAccountInput, opts ...request.Option) (*DisassociateAdminAccountOutput, error) { - req, out := c.DisassociateAdminAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAdminAccount = "GetAdminAccount" - -// GetAdminAccountRequest generates a "aws/request.Request" representing the -// client's request for the GetAdminAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAdminAccount for more information on using the GetAdminAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAdminAccountRequest method. -// req, resp := client.GetAdminAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAdminAccount -func (c *FMS) GetAdminAccountRequest(input *GetAdminAccountInput) (req *request.Request, output *GetAdminAccountOutput) { - op := &request.Operation{ - Name: opGetAdminAccount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAdminAccountInput{} - } - - output = &GetAdminAccountOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAdminAccount API operation for Firewall Management Service. -// -// Returns the AWS Organizations master account that is associated with AWS -// Firewall Manager as the AWS Firewall Manager administrator. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Firewall Management Service's -// API operation GetAdminAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The operation failed because there was nothing to do. For example, you might -// have submitted an AssociateAdminAccount request, but the account ID that -// you submitted was already set as the AWS Firewall Manager administrator. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAdminAccount -func (c *FMS) GetAdminAccount(input *GetAdminAccountInput) (*GetAdminAccountOutput, error) { - req, out := c.GetAdminAccountRequest(input) - return out, req.Send() -} - -// GetAdminAccountWithContext is the same as GetAdminAccount with the addition of -// the ability to pass a context and additional request options. -// -// See GetAdminAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FMS) GetAdminAccountWithContext(ctx aws.Context, input *GetAdminAccountInput, opts ...request.Option) (*GetAdminAccountOutput, error) { - req, out := c.GetAdminAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetComplianceDetail = "GetComplianceDetail" - -// GetComplianceDetailRequest generates a "aws/request.Request" representing the -// client's request for the GetComplianceDetail operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetComplianceDetail for more information on using the GetComplianceDetail -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetComplianceDetailRequest method. -// req, resp := client.GetComplianceDetailRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetComplianceDetail -func (c *FMS) GetComplianceDetailRequest(input *GetComplianceDetailInput) (req *request.Request, output *GetComplianceDetailOutput) { - op := &request.Operation{ - Name: opGetComplianceDetail, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetComplianceDetailInput{} - } - - output = &GetComplianceDetailOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetComplianceDetail API operation for Firewall Management Service. -// -// Returns detailed compliance information about the specified member account. -// Details include resources that are in and out of compliance with the specified -// policy. Resources are considered non-compliant if the specified policy has -// not been applied to them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Firewall Management Service's -// API operation GetComplianceDetail for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetComplianceDetail -func (c *FMS) GetComplianceDetail(input *GetComplianceDetailInput) (*GetComplianceDetailOutput, error) { - req, out := c.GetComplianceDetailRequest(input) - return out, req.Send() -} - -// GetComplianceDetailWithContext is the same as GetComplianceDetail with the addition of -// the ability to pass a context and additional request options. -// -// See GetComplianceDetail for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FMS) GetComplianceDetailWithContext(ctx aws.Context, input *GetComplianceDetailInput, opts ...request.Option) (*GetComplianceDetailOutput, error) { - req, out := c.GetComplianceDetailRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetNotificationChannel = "GetNotificationChannel" - -// GetNotificationChannelRequest generates a "aws/request.Request" representing the -// client's request for the GetNotificationChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetNotificationChannel for more information on using the GetNotificationChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetNotificationChannelRequest method. -// req, resp := client.GetNotificationChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetNotificationChannel -func (c *FMS) GetNotificationChannelRequest(input *GetNotificationChannelInput) (req *request.Request, output *GetNotificationChannelOutput) { - op := &request.Operation{ - Name: opGetNotificationChannel, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetNotificationChannelInput{} - } - - output = &GetNotificationChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetNotificationChannel API operation for Firewall Management Service. -// -// Returns information about the Amazon Simple Notification Service (SNS) topic -// that is used to record AWS Firewall Manager SNS logs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Firewall Management Service's -// API operation GetNotificationChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The operation failed because there was nothing to do. For example, you might -// have submitted an AssociateAdminAccount request, but the account ID that -// you submitted was already set as the AWS Firewall Manager administrator. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetNotificationChannel -func (c *FMS) GetNotificationChannel(input *GetNotificationChannelInput) (*GetNotificationChannelOutput, error) { - req, out := c.GetNotificationChannelRequest(input) - return out, req.Send() -} - -// GetNotificationChannelWithContext is the same as GetNotificationChannel with the addition of -// the ability to pass a context and additional request options. -// -// See GetNotificationChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FMS) GetNotificationChannelWithContext(ctx aws.Context, input *GetNotificationChannelInput, opts ...request.Option) (*GetNotificationChannelOutput, error) { - req, out := c.GetNotificationChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPolicy = "GetPolicy" - -// GetPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPolicy for more information on using the GetPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPolicyRequest method. -// req, resp := client.GetPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetPolicy -func (c *FMS) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) { - op := &request.Operation{ - Name: opGetPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPolicyInput{} - } - - output = &GetPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPolicy API operation for Firewall Management Service. -// -// Returns information about the specified AWS Firewall Manager policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Firewall Management Service's -// API operation GetPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The operation failed because there was nothing to do. For example, you might -// have submitted an AssociateAdminAccount request, but the account ID that -// you submitted was already set as the AWS Firewall Manager administrator. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidTypeException "InvalidTypeException" -// The value of the Type parameter is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetPolicy -func (c *FMS) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) { - req, out := c.GetPolicyRequest(input) - return out, req.Send() -} - -// GetPolicyWithContext is the same as GetPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FMS) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) { - req, out := c.GetPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListComplianceStatus = "ListComplianceStatus" - -// ListComplianceStatusRequest generates a "aws/request.Request" representing the -// client's request for the ListComplianceStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListComplianceStatus for more information on using the ListComplianceStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListComplianceStatusRequest method. -// req, resp := client.ListComplianceStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListComplianceStatus -func (c *FMS) ListComplianceStatusRequest(input *ListComplianceStatusInput) (req *request.Request, output *ListComplianceStatusOutput) { - op := &request.Operation{ - Name: opListComplianceStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListComplianceStatusInput{} - } - - output = &ListComplianceStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListComplianceStatus API operation for Firewall Management Service. -// -// Returns an array of PolicyComplianceStatus objects in the response. Use PolicyComplianceStatus -// to get a summary of which member accounts are protected by the specified -// policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Firewall Management Service's -// API operation ListComplianceStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListComplianceStatus -func (c *FMS) ListComplianceStatus(input *ListComplianceStatusInput) (*ListComplianceStatusOutput, error) { - req, out := c.ListComplianceStatusRequest(input) - return out, req.Send() -} - -// ListComplianceStatusWithContext is the same as ListComplianceStatus with the addition of -// the ability to pass a context and additional request options. -// -// See ListComplianceStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FMS) ListComplianceStatusWithContext(ctx aws.Context, input *ListComplianceStatusInput, opts ...request.Option) (*ListComplianceStatusOutput, error) { - req, out := c.ListComplianceStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListMemberAccounts = "ListMemberAccounts" - -// ListMemberAccountsRequest generates a "aws/request.Request" representing the -// client's request for the ListMemberAccounts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListMemberAccounts for more information on using the ListMemberAccounts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListMemberAccountsRequest method. -// req, resp := client.ListMemberAccountsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListMemberAccounts -func (c *FMS) ListMemberAccountsRequest(input *ListMemberAccountsInput) (req *request.Request, output *ListMemberAccountsOutput) { - op := &request.Operation{ - Name: opListMemberAccounts, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListMemberAccountsInput{} - } - - output = &ListMemberAccountsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListMemberAccounts API operation for Firewall Management Service. -// -// Returns a MemberAccounts object that lists the member accounts in the administrator's -// AWS organization. -// -// The ListMemberAccounts must be submitted by the account that is set as the -// AWS Firewall Manager administrator. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Firewall Management Service's -// API operation ListMemberAccounts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListMemberAccounts -func (c *FMS) ListMemberAccounts(input *ListMemberAccountsInput) (*ListMemberAccountsOutput, error) { - req, out := c.ListMemberAccountsRequest(input) - return out, req.Send() -} - -// ListMemberAccountsWithContext is the same as ListMemberAccounts with the addition of -// the ability to pass a context and additional request options. -// -// See ListMemberAccounts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FMS) ListMemberAccountsWithContext(ctx aws.Context, input *ListMemberAccountsInput, opts ...request.Option) (*ListMemberAccountsOutput, error) { - req, out := c.ListMemberAccountsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPolicies = "ListPolicies" - -// ListPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPolicies for more information on using the ListPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPoliciesRequest method. -// req, resp := client.ListPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListPolicies -func (c *FMS) ListPoliciesRequest(input *ListPoliciesInput) (req *request.Request, output *ListPoliciesOutput) { - op := &request.Operation{ - Name: opListPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListPoliciesInput{} - } - - output = &ListPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPolicies API operation for Firewall Management Service. -// -// Returns an array of PolicySummary objects in the response. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Firewall Management Service's -// API operation ListPolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The operation failed because there was nothing to do. For example, you might -// have submitted an AssociateAdminAccount request, but the account ID that -// you submitted was already set as the AWS Firewall Manager administrator. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// policy objects that you can create for an AWS account. For more information, -// see Firewall Manager Limits (http://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html) -// in the AWS WAF Developer Guide. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListPolicies -func (c *FMS) ListPolicies(input *ListPoliciesInput) (*ListPoliciesOutput, error) { - req, out := c.ListPoliciesRequest(input) - return out, req.Send() -} - -// ListPoliciesWithContext is the same as ListPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FMS) ListPoliciesWithContext(ctx aws.Context, input *ListPoliciesInput, opts ...request.Option) (*ListPoliciesOutput, error) { - req, out := c.ListPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutNotificationChannel = "PutNotificationChannel" - -// PutNotificationChannelRequest generates a "aws/request.Request" representing the -// client's request for the PutNotificationChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutNotificationChannel for more information on using the PutNotificationChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutNotificationChannelRequest method. -// req, resp := client.PutNotificationChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutNotificationChannel -func (c *FMS) PutNotificationChannelRequest(input *PutNotificationChannelInput) (req *request.Request, output *PutNotificationChannelOutput) { - op := &request.Operation{ - Name: opPutNotificationChannel, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutNotificationChannelInput{} - } - - output = &PutNotificationChannelOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutNotificationChannel API operation for Firewall Management Service. -// -// Designates the IAM role and Amazon Simple Notification Service (SNS) topic -// that AWS Firewall Manager uses to record SNS logs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Firewall Management Service's -// API operation PutNotificationChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The operation failed because there was nothing to do. For example, you might -// have submitted an AssociateAdminAccount request, but the account ID that -// you submitted was already set as the AWS Firewall Manager administrator. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutNotificationChannel -func (c *FMS) PutNotificationChannel(input *PutNotificationChannelInput) (*PutNotificationChannelOutput, error) { - req, out := c.PutNotificationChannelRequest(input) - return out, req.Send() -} - -// PutNotificationChannelWithContext is the same as PutNotificationChannel with the addition of -// the ability to pass a context and additional request options. -// -// See PutNotificationChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FMS) PutNotificationChannelWithContext(ctx aws.Context, input *PutNotificationChannelInput, opts ...request.Option) (*PutNotificationChannelOutput, error) { - req, out := c.PutNotificationChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutPolicy = "PutPolicy" - -// PutPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutPolicy for more information on using the PutPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutPolicyRequest method. -// req, resp := client.PutPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy -func (c *FMS) PutPolicyRequest(input *PutPolicyInput) (req *request.Request, output *PutPolicyOutput) { - op := &request.Operation{ - Name: opPutPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutPolicyInput{} - } - - output = &PutPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutPolicy API operation for Firewall Management Service. -// -// Creates an AWS Firewall Manager policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Firewall Management Service's -// API operation PutPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidOperationException "InvalidOperationException" -// The operation failed because there was nothing to do. For example, you might -// have submitted an AssociateAdminAccount request, but the account ID that -// you submitted was already set as the AWS Firewall Manager administrator. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The parameters of the request were invalid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// policy objects that you can create for an AWS account. For more information, -// see Firewall Manager Limits (http://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html) -// in the AWS WAF Developer Guide. -// -// * ErrCodeInternalErrorException "InternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidTypeException "InvalidTypeException" -// The value of the Type parameter is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy -func (c *FMS) PutPolicy(input *PutPolicyInput) (*PutPolicyOutput, error) { - req, out := c.PutPolicyRequest(input) - return out, req.Send() -} - -// PutPolicyWithContext is the same as PutPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FMS) PutPolicyWithContext(ctx aws.Context, input *PutPolicyInput, opts ...request.Option) (*PutPolicyOutput, error) { - req, out := c.PutPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AssociateAdminAccountInput struct { - _ struct{} `type:"structure"` - - // The AWS account ID to associate with AWS Firewall Manager as the AWS Firewall - // Manager administrator account. This can be an AWS Organizations master account - // or a member account. For more information about AWS Organizations and master - // accounts, see Managing the AWS Accounts in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts.html). - // - // AdminAccount is a required field - AdminAccount *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateAdminAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateAdminAccountInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateAdminAccountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateAdminAccountInput"} - if s.AdminAccount == nil { - invalidParams.Add(request.NewErrParamRequired("AdminAccount")) - } - if s.AdminAccount != nil && len(*s.AdminAccount) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AdminAccount", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdminAccount sets the AdminAccount field's value. -func (s *AssociateAdminAccountInput) SetAdminAccount(v string) *AssociateAdminAccountInput { - s.AdminAccount = &v - return s -} - -type AssociateAdminAccountOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssociateAdminAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateAdminAccountOutput) GoString() string { - return s.String() -} - -// Details of the resource that is not protected by the policy. -type ComplianceViolator struct { - _ struct{} `type:"structure"` - - // The resource ID. - ResourceId *string `min:"1" type:"string"` - - // The resource type. This is in the format shown in AWS Resource Types Reference - // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html). - // Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution. - ResourceType *string `min:"1" type:"string"` - - // The reason that the resource is not protected by the policy. - ViolationReason *string `type:"string" enum:"ViolationReason"` -} - -// String returns the string representation -func (s ComplianceViolator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComplianceViolator) GoString() string { - return s.String() -} - -// SetResourceId sets the ResourceId field's value. -func (s *ComplianceViolator) SetResourceId(v string) *ComplianceViolator { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ComplianceViolator) SetResourceType(v string) *ComplianceViolator { - s.ResourceType = &v - return s -} - -// SetViolationReason sets the ViolationReason field's value. -func (s *ComplianceViolator) SetViolationReason(v string) *ComplianceViolator { - s.ViolationReason = &v - return s -} - -type DeleteNotificationChannelInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteNotificationChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNotificationChannelInput) GoString() string { - return s.String() -} - -type DeleteNotificationChannelOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteNotificationChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNotificationChannelOutput) GoString() string { - return s.String() -} - -type DeletePolicyInput struct { - _ struct{} `type:"structure"` - - // If True, the request will also delete all web ACLs in this policy. Associated - // resources will no longer be protected by web ACLs in this policy. - DeleteAllPolicyResources *bool `type:"boolean"` - - // The ID of the policy that you want to delete. PolicyId is returned by PutPolicy - // and by ListPolicies. - // - // PolicyId is a required field - PolicyId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"} - if s.PolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyId")) - } - if s.PolicyId != nil && len(*s.PolicyId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeleteAllPolicyResources sets the DeleteAllPolicyResources field's value. -func (s *DeletePolicyInput) SetDeleteAllPolicyResources(v bool) *DeletePolicyInput { - s.DeleteAllPolicyResources = &v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *DeletePolicyInput) SetPolicyId(v string) *DeletePolicyInput { - s.PolicyId = &v - return s -} - -type DeletePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePolicyOutput) GoString() string { - return s.String() -} - -type DisassociateAdminAccountInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateAdminAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateAdminAccountInput) GoString() string { - return s.String() -} - -type DisassociateAdminAccountOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateAdminAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateAdminAccountOutput) GoString() string { - return s.String() -} - -// Describes the compliance status for the account. An account is considered -// non-compliant if it includes resources that are not protected by the specified -// policy. -type EvaluationResult struct { - _ struct{} `type:"structure"` - - // Describes an AWS account's compliance with the AWS Firewall Manager policy. - ComplianceStatus *string `type:"string" enum:"PolicyComplianceStatusType"` - - // Indicates that over 100 resources are non-compliant with the AWS Firewall - // Manager policy. - EvaluationLimitExceeded *bool `type:"boolean"` - - // Number of resources that are non-compliant with the specified policy. A resource - // is considered non-compliant if it is not associated with the specified policy. - ViolatorCount *int64 `type:"long"` -} - -// String returns the string representation -func (s EvaluationResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EvaluationResult) GoString() string { - return s.String() -} - -// SetComplianceStatus sets the ComplianceStatus field's value. -func (s *EvaluationResult) SetComplianceStatus(v string) *EvaluationResult { - s.ComplianceStatus = &v - return s -} - -// SetEvaluationLimitExceeded sets the EvaluationLimitExceeded field's value. -func (s *EvaluationResult) SetEvaluationLimitExceeded(v bool) *EvaluationResult { - s.EvaluationLimitExceeded = &v - return s -} - -// SetViolatorCount sets the ViolatorCount field's value. -func (s *EvaluationResult) SetViolatorCount(v int64) *EvaluationResult { - s.ViolatorCount = &v - return s -} - -type GetAdminAccountInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetAdminAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAdminAccountInput) GoString() string { - return s.String() -} - -type GetAdminAccountOutput struct { - _ struct{} `type:"structure"` - - // The AWS account that is set as the AWS Firewall Manager administrator. - AdminAccount *string `min:"1" type:"string"` - - // The status of the AWS account that you set as the AWS Firewall Manager administrator. - RoleStatus *string `type:"string" enum:"AccountRoleStatus"` -} - -// String returns the string representation -func (s GetAdminAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAdminAccountOutput) GoString() string { - return s.String() -} - -// SetAdminAccount sets the AdminAccount field's value. -func (s *GetAdminAccountOutput) SetAdminAccount(v string) *GetAdminAccountOutput { - s.AdminAccount = &v - return s -} - -// SetRoleStatus sets the RoleStatus field's value. -func (s *GetAdminAccountOutput) SetRoleStatus(v string) *GetAdminAccountOutput { - s.RoleStatus = &v - return s -} - -type GetComplianceDetailInput struct { - _ struct{} `type:"structure"` - - // The AWS account that owns the resources that you want to get the details - // for. - // - // MemberAccount is a required field - MemberAccount *string `min:"1" type:"string" required:"true"` - - // The ID of the policy that you want to get the details for. PolicyId is returned - // by PutPolicy and by ListPolicies. - // - // PolicyId is a required field - PolicyId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetComplianceDetailInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetComplianceDetailInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetComplianceDetailInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetComplianceDetailInput"} - if s.MemberAccount == nil { - invalidParams.Add(request.NewErrParamRequired("MemberAccount")) - } - if s.MemberAccount != nil && len(*s.MemberAccount) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MemberAccount", 1)) - } - if s.PolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyId")) - } - if s.PolicyId != nil && len(*s.PolicyId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMemberAccount sets the MemberAccount field's value. -func (s *GetComplianceDetailInput) SetMemberAccount(v string) *GetComplianceDetailInput { - s.MemberAccount = &v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *GetComplianceDetailInput) SetPolicyId(v string) *GetComplianceDetailInput { - s.PolicyId = &v - return s -} - -type GetComplianceDetailOutput struct { - _ struct{} `type:"structure"` - - // Information about the resources and the policy that you specified in the - // GetComplianceDetail request. - PolicyComplianceDetail *PolicyComplianceDetail `type:"structure"` -} - -// String returns the string representation -func (s GetComplianceDetailOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetComplianceDetailOutput) GoString() string { - return s.String() -} - -// SetPolicyComplianceDetail sets the PolicyComplianceDetail field's value. -func (s *GetComplianceDetailOutput) SetPolicyComplianceDetail(v *PolicyComplianceDetail) *GetComplianceDetailOutput { - s.PolicyComplianceDetail = v - return s -} - -type GetNotificationChannelInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetNotificationChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetNotificationChannelInput) GoString() string { - return s.String() -} - -type GetNotificationChannelOutput struct { - _ struct{} `type:"structure"` - - // The IAM role that is used by AWS Firewall Manager to record activity to SNS. - SnsRoleName *string `min:"1" type:"string"` - - // The SNS topic that records AWS Firewall Manager activity. - SnsTopicArn *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetNotificationChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetNotificationChannelOutput) GoString() string { - return s.String() -} - -// SetSnsRoleName sets the SnsRoleName field's value. -func (s *GetNotificationChannelOutput) SetSnsRoleName(v string) *GetNotificationChannelOutput { - s.SnsRoleName = &v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *GetNotificationChannelOutput) SetSnsTopicArn(v string) *GetNotificationChannelOutput { - s.SnsTopicArn = &v - return s -} - -type GetPolicyInput struct { - _ struct{} `type:"structure"` - - // The ID of the AWS Firewall Manager policy that you want the details for. - // - // PolicyId is a required field - PolicyId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"} - if s.PolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyId")) - } - if s.PolicyId != nil && len(*s.PolicyId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyId sets the PolicyId field's value. -func (s *GetPolicyInput) SetPolicyId(v string) *GetPolicyInput { - s.PolicyId = &v - return s -} - -type GetPolicyOutput struct { - _ struct{} `type:"structure"` - - // Information about the specified AWS Firewall Manager policy. - Policy *Policy `type:"structure"` - - // The Amazon Resource Name (ARN) of the specified policy. - PolicyArn *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *GetPolicyOutput) SetPolicy(v *Policy) *GetPolicyOutput { - s.Policy = v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *GetPolicyOutput) SetPolicyArn(v string) *GetPolicyOutput { - s.PolicyArn = &v - return s -} - -type ListComplianceStatusInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of PolicyComplianceStatus objects that you want AWS - // Firewall Manager to return for this request. If you have more PolicyComplianceStatus - // objects than the number that you specify for MaxResults, the response includes - // a NextToken value that you can use to get another batch of PolicyComplianceStatus - // objects. - MaxResults *int64 `min:"1" type:"integer"` - - // If you specify a value for MaxResults and you have more PolicyComplianceStatus - // objects than the number that you specify for MaxResults, AWS Firewall Manager - // returns a NextToken value in the response that allows you to list another - // group of PolicyComplianceStatus objects. For the second and subsequent ListComplianceStatus - // requests, specify the value of NextToken from the previous response to get - // information about another batch of PolicyComplianceStatus objects. - NextToken *string `min:"1" type:"string"` - - // The ID of the AWS Firewall Manager policy that you want the details for. - // - // PolicyId is a required field - PolicyId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListComplianceStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListComplianceStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListComplianceStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListComplianceStatusInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.PolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyId")) - } - if s.PolicyId != nil && len(*s.PolicyId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListComplianceStatusInput) SetMaxResults(v int64) *ListComplianceStatusInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListComplianceStatusInput) SetNextToken(v string) *ListComplianceStatusInput { - s.NextToken = &v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *ListComplianceStatusInput) SetPolicyId(v string) *ListComplianceStatusInput { - s.PolicyId = &v - return s -} - -type ListComplianceStatusOutput struct { - _ struct{} `type:"structure"` - - // If you have more PolicyComplianceStatus objects than the number that you - // specified for MaxResults in the request, the response includes a NextToken - // value. To list more PolicyComplianceStatus objects, submit another ListComplianceStatus - // request, and specify the NextToken value from the response in the NextToken - // value in the next request. - NextToken *string `min:"1" type:"string"` - - // An array of PolicyComplianceStatus objects. - PolicyComplianceStatusList []*PolicyComplianceStatus `type:"list"` -} - -// String returns the string representation -func (s ListComplianceStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListComplianceStatusOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListComplianceStatusOutput) SetNextToken(v string) *ListComplianceStatusOutput { - s.NextToken = &v - return s -} - -// SetPolicyComplianceStatusList sets the PolicyComplianceStatusList field's value. -func (s *ListComplianceStatusOutput) SetPolicyComplianceStatusList(v []*PolicyComplianceStatus) *ListComplianceStatusOutput { - s.PolicyComplianceStatusList = v - return s -} - -type ListMemberAccountsInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of member account IDs that you want AWS Firewall Manager - // to return for this request. If you have more IDs than the number that you - // specify for MaxResults, the response includes a NextToken value that you - // can use to get another batch of member account IDs. - MaxResults *int64 `min:"1" type:"integer"` - - // If you specify a value for MaxResults and you have more account IDs than - // the number that you specify for MaxResults, AWS Firewall Manager returns - // a NextToken value in the response that allows you to list another group of - // IDs. For the second and subsequent ListMemberAccountsRequest requests, specify - // the value of NextToken from the previous response to get information about - // another batch of member account IDs. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListMemberAccountsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListMemberAccountsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListMemberAccountsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListMemberAccountsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListMemberAccountsInput) SetMaxResults(v int64) *ListMemberAccountsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListMemberAccountsInput) SetNextToken(v string) *ListMemberAccountsInput { - s.NextToken = &v - return s -} - -type ListMemberAccountsOutput struct { - _ struct{} `type:"structure"` - - // An array of account IDs. - MemberAccounts []*string `type:"list"` - - // If you have more member account IDs than the number that you specified for - // MaxResults in the request, the response includes a NextToken value. To list - // more IDs, submit another ListMemberAccounts request, and specify the NextToken - // value from the response in the NextToken value in the next request. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListMemberAccountsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListMemberAccountsOutput) GoString() string { - return s.String() -} - -// SetMemberAccounts sets the MemberAccounts field's value. -func (s *ListMemberAccountsOutput) SetMemberAccounts(v []*string) *ListMemberAccountsOutput { - s.MemberAccounts = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListMemberAccountsOutput) SetNextToken(v string) *ListMemberAccountsOutput { - s.NextToken = &v - return s -} - -type ListPoliciesInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of PolicySummary objects that you want AWS Firewall - // Manager to return for this request. If you have more PolicySummary objects - // than the number that you specify for MaxResults, the response includes a - // NextToken value that you can use to get another batch of PolicySummary objects. - MaxResults *int64 `min:"1" type:"integer"` - - // If you specify a value for MaxResults and you have more PolicySummary objects - // than the number that you specify for MaxResults, AWS Firewall Manager returns - // a NextToken value in the response that allows you to list another group of - // PolicySummary objects. For the second and subsequent ListPolicies requests, - // specify the value of NextToken from the previous response to get information - // about another batch of PolicySummary objects. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPoliciesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListPoliciesInput) SetMaxResults(v int64) *ListPoliciesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPoliciesInput) SetNextToken(v string) *ListPoliciesInput { - s.NextToken = &v - return s -} - -type ListPoliciesOutput struct { - _ struct{} `type:"structure"` - - // If you have more PolicySummary objects than the number that you specified - // for MaxResults in the request, the response includes a NextToken value. To - // list more PolicySummary objects, submit another ListPolicies request, and - // specify the NextToken value from the response in the NextToken value in the - // next request. - NextToken *string `min:"1" type:"string"` - - // An array of PolicySummary objects. - PolicyList []*PolicySummary `type:"list"` -} - -// String returns the string representation -func (s ListPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPoliciesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPoliciesOutput) SetNextToken(v string) *ListPoliciesOutput { - s.NextToken = &v - return s -} - -// SetPolicyList sets the PolicyList field's value. -func (s *ListPoliciesOutput) SetPolicyList(v []*PolicySummary) *ListPoliciesOutput { - s.PolicyList = v - return s -} - -// An AWS Firewall Manager policy. -type Policy struct { - _ struct{} `type:"structure"` - - // Specifies the AWS account IDs to exclude from the policy. The IncludeMap - // values are evaluated first, with all the appropriate account IDs added to - // the policy. Then the accounts listed in ExcludeMap are removed, resulting - // in the final list of accounts to add to the policy. - // - // The key to the map is ACCOUNT. For example, a valid ExcludeMap would be {“ACCOUNT” - // : [“accountID1”, “accountID2”]}. - ExcludeMap map[string][]*string `type:"map"` - - // If set to True, resources with the tags that are specified in the ResourceTag - // array are not protected by the policy. If set to False, and the ResourceTag - // array is not null, only resources with the specified tags are associated - // with the policy. - // - // ExcludeResourceTags is a required field - ExcludeResourceTags *bool `type:"boolean" required:"true"` - - // Specifies the AWS account IDs to include in the policy. If IncludeMap is - // null, all accounts in the organization in AWS Organizations are included - // in the policy. If IncludeMap is not null, only values listed in IncludeMap - // are included in the policy. - // - // The key to the map is ACCOUNT. For example, a valid IncludeMap would be {“ACCOUNT” - // : [“accountID1”, “accountID2”]}. - IncludeMap map[string][]*string `type:"map"` - - // The ID of the AWS Firewall Manager policy. - PolicyId *string `min:"36" type:"string"` - - // The friendly name of the AWS Firewall Manager policy. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // A unique identifier for each update to the policy. When issuing a PutPolicy - // request, the PolicyUpdateToken in the request must match the PolicyUpdateToken - // of the current policy version. To get the PolicyUpdateToken of the current - // policy version, use a GetPolicy request. - PolicyUpdateToken *string `min:"1" type:"string"` - - // Indicates if the policy should be automatically applied to new resources. - // - // RemediationEnabled is a required field - RemediationEnabled *bool `type:"boolean" required:"true"` - - // An array of ResourceTag objects. - ResourceTags []*ResourceTag `type:"list"` - - // The type of resource to protect with the policy, either an Application Load - // Balancer or a CloudFront distribution. This is in the format shown in AWS - // Resource Types Reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html). - // Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution. - // - // ResourceType is a required field - ResourceType *string `min:"1" type:"string" required:"true"` - - // Details about the security service that is being used to protect the resources. - // - // SecurityServicePolicyData is a required field - SecurityServicePolicyData *SecurityServicePolicyData `type:"structure" required:"true"` -} - -// String returns the string representation -func (s Policy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Policy) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Policy) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Policy"} - if s.ExcludeResourceTags == nil { - invalidParams.Add(request.NewErrParamRequired("ExcludeResourceTags")) - } - if s.PolicyId != nil && len(*s.PolicyId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.PolicyUpdateToken != nil && len(*s.PolicyUpdateToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyUpdateToken", 1)) - } - if s.RemediationEnabled == nil { - invalidParams.Add(request.NewErrParamRequired("RemediationEnabled")) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - if s.ResourceType != nil && len(*s.ResourceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) - } - if s.SecurityServicePolicyData == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityServicePolicyData")) - } - if s.ResourceTags != nil { - for i, v := range s.ResourceTags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceTags", i), err.(request.ErrInvalidParams)) - } - } - } - if s.SecurityServicePolicyData != nil { - if err := s.SecurityServicePolicyData.Validate(); err != nil { - invalidParams.AddNested("SecurityServicePolicyData", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExcludeMap sets the ExcludeMap field's value. -func (s *Policy) SetExcludeMap(v map[string][]*string) *Policy { - s.ExcludeMap = v - return s -} - -// SetExcludeResourceTags sets the ExcludeResourceTags field's value. -func (s *Policy) SetExcludeResourceTags(v bool) *Policy { - s.ExcludeResourceTags = &v - return s -} - -// SetIncludeMap sets the IncludeMap field's value. -func (s *Policy) SetIncludeMap(v map[string][]*string) *Policy { - s.IncludeMap = v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *Policy) SetPolicyId(v string) *Policy { - s.PolicyId = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *Policy) SetPolicyName(v string) *Policy { - s.PolicyName = &v - return s -} - -// SetPolicyUpdateToken sets the PolicyUpdateToken field's value. -func (s *Policy) SetPolicyUpdateToken(v string) *Policy { - s.PolicyUpdateToken = &v - return s -} - -// SetRemediationEnabled sets the RemediationEnabled field's value. -func (s *Policy) SetRemediationEnabled(v bool) *Policy { - s.RemediationEnabled = &v - return s -} - -// SetResourceTags sets the ResourceTags field's value. -func (s *Policy) SetResourceTags(v []*ResourceTag) *Policy { - s.ResourceTags = v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *Policy) SetResourceType(v string) *Policy { - s.ResourceType = &v - return s -} - -// SetSecurityServicePolicyData sets the SecurityServicePolicyData field's value. -func (s *Policy) SetSecurityServicePolicyData(v *SecurityServicePolicyData) *Policy { - s.SecurityServicePolicyData = v - return s -} - -// Describes the non-compliant resources in a member account for a specific -// AWS Firewall Manager policy. A maximum of 100 entries are displayed. If more -// than 100 resources are non-compliant, EvaluationLimitExceeded is set to True. -type PolicyComplianceDetail struct { - _ struct{} `type:"structure"` - - // Indicates if over 100 resources are non-compliant with the AWS Firewall Manager - // policy. - EvaluationLimitExceeded *bool `type:"boolean"` - - // A time stamp that indicates when the returned information should be considered - // out-of-date. - ExpiredAt *time.Time `type:"timestamp"` - - // Details about problems with dependent services, such as AWS WAF or AWS Config, - // that are causing a resource to be non-compliant. The details include the - // name of the dependent service and the error message received that indicates - // the problem with the service. - IssueInfoMap map[string]*string `type:"map"` - - // The AWS account ID. - MemberAccount *string `min:"1" type:"string"` - - // The ID of the AWS Firewall Manager policy. - PolicyId *string `min:"36" type:"string"` - - // The AWS account that created the AWS Firewall Manager policy. - PolicyOwner *string `min:"1" type:"string"` - - // An array of resources that are not protected by the policy. - Violators []*ComplianceViolator `type:"list"` -} - -// String returns the string representation -func (s PolicyComplianceDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PolicyComplianceDetail) GoString() string { - return s.String() -} - -// SetEvaluationLimitExceeded sets the EvaluationLimitExceeded field's value. -func (s *PolicyComplianceDetail) SetEvaluationLimitExceeded(v bool) *PolicyComplianceDetail { - s.EvaluationLimitExceeded = &v - return s -} - -// SetExpiredAt sets the ExpiredAt field's value. -func (s *PolicyComplianceDetail) SetExpiredAt(v time.Time) *PolicyComplianceDetail { - s.ExpiredAt = &v - return s -} - -// SetIssueInfoMap sets the IssueInfoMap field's value. -func (s *PolicyComplianceDetail) SetIssueInfoMap(v map[string]*string) *PolicyComplianceDetail { - s.IssueInfoMap = v - return s -} - -// SetMemberAccount sets the MemberAccount field's value. -func (s *PolicyComplianceDetail) SetMemberAccount(v string) *PolicyComplianceDetail { - s.MemberAccount = &v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *PolicyComplianceDetail) SetPolicyId(v string) *PolicyComplianceDetail { - s.PolicyId = &v - return s -} - -// SetPolicyOwner sets the PolicyOwner field's value. -func (s *PolicyComplianceDetail) SetPolicyOwner(v string) *PolicyComplianceDetail { - s.PolicyOwner = &v - return s -} - -// SetViolators sets the Violators field's value. -func (s *PolicyComplianceDetail) SetViolators(v []*ComplianceViolator) *PolicyComplianceDetail { - s.Violators = v - return s -} - -// Indicates whether the account is compliant with the specified policy. An -// account is considered non-compliant if it includes resources that are not -// protected by the policy. -type PolicyComplianceStatus struct { - _ struct{} `type:"structure"` - - // An array of EvaluationResult objects. - EvaluationResults []*EvaluationResult `type:"list"` - - // Details about problems with dependent services, such as AWS WAF or AWS Config, - // that are causing a resource to be non-compliant. The details include the - // name of the dependent service and the error message received that indicates - // the problem with the service. - IssueInfoMap map[string]*string `type:"map"` - - // Time stamp of the last update to the EvaluationResult objects. - LastUpdated *time.Time `type:"timestamp"` - - // The member account ID. - MemberAccount *string `min:"1" type:"string"` - - // The ID of the AWS Firewall Manager policy. - PolicyId *string `min:"36" type:"string"` - - // The friendly name of the AWS Firewall Manager policy. - PolicyName *string `min:"1" type:"string"` - - // The AWS account that created the AWS Firewall Manager policy. - PolicyOwner *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PolicyComplianceStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PolicyComplianceStatus) GoString() string { - return s.String() -} - -// SetEvaluationResults sets the EvaluationResults field's value. -func (s *PolicyComplianceStatus) SetEvaluationResults(v []*EvaluationResult) *PolicyComplianceStatus { - s.EvaluationResults = v - return s -} - -// SetIssueInfoMap sets the IssueInfoMap field's value. -func (s *PolicyComplianceStatus) SetIssueInfoMap(v map[string]*string) *PolicyComplianceStatus { - s.IssueInfoMap = v - return s -} - -// SetLastUpdated sets the LastUpdated field's value. -func (s *PolicyComplianceStatus) SetLastUpdated(v time.Time) *PolicyComplianceStatus { - s.LastUpdated = &v - return s -} - -// SetMemberAccount sets the MemberAccount field's value. -func (s *PolicyComplianceStatus) SetMemberAccount(v string) *PolicyComplianceStatus { - s.MemberAccount = &v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *PolicyComplianceStatus) SetPolicyId(v string) *PolicyComplianceStatus { - s.PolicyId = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PolicyComplianceStatus) SetPolicyName(v string) *PolicyComplianceStatus { - s.PolicyName = &v - return s -} - -// SetPolicyOwner sets the PolicyOwner field's value. -func (s *PolicyComplianceStatus) SetPolicyOwner(v string) *PolicyComplianceStatus { - s.PolicyOwner = &v - return s -} - -// Details of the AWS Firewall Manager policy. -type PolicySummary struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the specified policy. - PolicyArn *string `min:"1" type:"string"` - - // The ID of the specified policy. - PolicyId *string `min:"36" type:"string"` - - // The friendly name of the specified policy. - PolicyName *string `min:"1" type:"string"` - - // Indicates if the policy should be automatically applied to new resources. - RemediationEnabled *bool `type:"boolean"` - - // The type of resource to protect with the policy, either an Application Load - // Balancer or a CloudFront distribution. This is in the format shown in AWS - // Resource Types Reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html). - // Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution. - ResourceType *string `min:"1" type:"string"` - - // The service that the policy is using to protect the resources. This value - // is WAF. - SecurityServiceType *string `type:"string" enum:"SecurityServiceType"` -} - -// String returns the string representation -func (s PolicySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PolicySummary) GoString() string { - return s.String() -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *PolicySummary) SetPolicyArn(v string) *PolicySummary { - s.PolicyArn = &v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *PolicySummary) SetPolicyId(v string) *PolicySummary { - s.PolicyId = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PolicySummary) SetPolicyName(v string) *PolicySummary { - s.PolicyName = &v - return s -} - -// SetRemediationEnabled sets the RemediationEnabled field's value. -func (s *PolicySummary) SetRemediationEnabled(v bool) *PolicySummary { - s.RemediationEnabled = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *PolicySummary) SetResourceType(v string) *PolicySummary { - s.ResourceType = &v - return s -} - -// SetSecurityServiceType sets the SecurityServiceType field's value. -func (s *PolicySummary) SetSecurityServiceType(v string) *PolicySummary { - s.SecurityServiceType = &v - return s -} - -type PutNotificationChannelInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM role that allows Amazon SNS to - // record AWS Firewall Manager activity. - // - // SnsRoleName is a required field - SnsRoleName *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the SNS topic that collects notifications - // from AWS Firewall Manager. - // - // SnsTopicArn is a required field - SnsTopicArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutNotificationChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutNotificationChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutNotificationChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutNotificationChannelInput"} - if s.SnsRoleName == nil { - invalidParams.Add(request.NewErrParamRequired("SnsRoleName")) - } - if s.SnsRoleName != nil && len(*s.SnsRoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SnsRoleName", 1)) - } - if s.SnsTopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("SnsTopicArn")) - } - if s.SnsTopicArn != nil && len(*s.SnsTopicArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SnsTopicArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSnsRoleName sets the SnsRoleName field's value. -func (s *PutNotificationChannelInput) SetSnsRoleName(v string) *PutNotificationChannelInput { - s.SnsRoleName = &v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *PutNotificationChannelInput) SetSnsTopicArn(v string) *PutNotificationChannelInput { - s.SnsTopicArn = &v - return s -} - -type PutNotificationChannelOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutNotificationChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutNotificationChannelOutput) GoString() string { - return s.String() -} - -type PutPolicyInput struct { - _ struct{} `type:"structure"` - - // The details of the AWS Firewall Manager policy to be created. - // - // Policy is a required field - Policy *Policy `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PutPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutPolicyInput"} - if s.Policy == nil { - invalidParams.Add(request.NewErrParamRequired("Policy")) - } - if s.Policy != nil { - if err := s.Policy.Validate(); err != nil { - invalidParams.AddNested("Policy", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicy sets the Policy field's value. -func (s *PutPolicyInput) SetPolicy(v *Policy) *PutPolicyInput { - s.Policy = v - return s -} - -type PutPolicyOutput struct { - _ struct{} `type:"structure"` - - // The details of the AWS Firewall Manager policy that was created. - Policy *Policy `type:"structure"` - - // The Amazon Resource Name (ARN) of the policy that was created. - PolicyArn *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PutPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *PutPolicyOutput) SetPolicy(v *Policy) *PutPolicyOutput { - s.Policy = v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *PutPolicyOutput) SetPolicyArn(v string) *PutPolicyOutput { - s.PolicyArn = &v - return s -} - -// The resource tags that AWS Firewall Manager uses to determine if a particular -// resource should be included or excluded from protection by the AWS Firewall -// Manager policy. Tags enable you to categorize your AWS resources in different -// ways, for example, by purpose, owner, or environment. Each tag consists of -// a key and an optional value, both of which you define. Tags are combined -// with an "OR." That is, if you add more than one tag, if any of the tags matches, -// the resource is considered a match for the include or exclude. Working with -// Tag Editor (https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/tag-editor.html). -type ResourceTag struct { - _ struct{} `type:"structure"` - - // The resource tag key. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The resource tag value. - Value *string `type:"string"` -} - -// String returns the string representation -func (s ResourceTag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceTag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceTag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceTag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *ResourceTag) SetKey(v string) *ResourceTag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ResourceTag) SetValue(v string) *ResourceTag { - s.Value = &v - return s -} - -// Details about the security service that is being used to protect the resources. -type SecurityServicePolicyData struct { - _ struct{} `type:"structure"` - - // Details about the service. This contains WAF data in JSON format, as shown - // in the following example: - // - // ManagedServiceData": "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\": \"12345678-1bcd-9012-efga-0987654321ab\", - // \"overrideAction\" : {\"type\": \"COUNT\"}}], \"defaultAction\": {\"type\": - // \"BLOCK\"}} - ManagedServiceData *string `min:"1" type:"string"` - - // The service that the policy is using to protect the resources. This value - // is WAF. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"SecurityServiceType"` -} - -// String returns the string representation -func (s SecurityServicePolicyData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecurityServicePolicyData) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SecurityServicePolicyData) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SecurityServicePolicyData"} - if s.ManagedServiceData != nil && len(*s.ManagedServiceData) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ManagedServiceData", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetManagedServiceData sets the ManagedServiceData field's value. -func (s *SecurityServicePolicyData) SetManagedServiceData(v string) *SecurityServicePolicyData { - s.ManagedServiceData = &v - return s -} - -// SetType sets the Type field's value. -func (s *SecurityServicePolicyData) SetType(v string) *SecurityServicePolicyData { - s.Type = &v - return s -} - -const ( - // AccountRoleStatusReady is a AccountRoleStatus enum value - AccountRoleStatusReady = "READY" - - // AccountRoleStatusCreating is a AccountRoleStatus enum value - AccountRoleStatusCreating = "CREATING" - - // AccountRoleStatusPendingDeletion is a AccountRoleStatus enum value - AccountRoleStatusPendingDeletion = "PENDING_DELETION" - - // AccountRoleStatusDeleting is a AccountRoleStatus enum value - AccountRoleStatusDeleting = "DELETING" - - // AccountRoleStatusDeleted is a AccountRoleStatus enum value - AccountRoleStatusDeleted = "DELETED" -) - -const ( - // CustomerPolicyScopeIdTypeAccount is a CustomerPolicyScopeIdType enum value - CustomerPolicyScopeIdTypeAccount = "ACCOUNT" -) - -const ( - // DependentServiceNameAwsconfig is a DependentServiceName enum value - DependentServiceNameAwsconfig = "AWSCONFIG" - - // DependentServiceNameAwswaf is a DependentServiceName enum value - DependentServiceNameAwswaf = "AWSWAF" -) - -const ( - // PolicyComplianceStatusTypeCompliant is a PolicyComplianceStatusType enum value - PolicyComplianceStatusTypeCompliant = "COMPLIANT" - - // PolicyComplianceStatusTypeNonCompliant is a PolicyComplianceStatusType enum value - PolicyComplianceStatusTypeNonCompliant = "NON_COMPLIANT" -) - -const ( - // SecurityServiceTypeWaf is a SecurityServiceType enum value - SecurityServiceTypeWaf = "WAF" -) - -const ( - // ViolationReasonWebAclMissingRuleGroup is a ViolationReason enum value - ViolationReasonWebAclMissingRuleGroup = "WEB_ACL_MISSING_RULE_GROUP" - - // ViolationReasonResourceMissingWebAcl is a ViolationReason enum value - ViolationReasonResourceMissingWebAcl = "RESOURCE_MISSING_WEB_ACL" - - // ViolationReasonResourceIncorrectWebAcl is a ViolationReason enum value - ViolationReasonResourceIncorrectWebAcl = "RESOURCE_INCORRECT_WEB_ACL" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/doc.go b/vendor/github.com/aws/aws-sdk-go/service/fms/doc.go deleted file mode 100644 index baae6d87f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/fms/doc.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package fms provides the client and types for making API -// requests to Firewall Management Service. -// -// This is the AWS Firewall Manager API Reference. This guide is for developers -// who need detailed information about the AWS Firewall Manager API actions, -// data types, and errors. For detailed information about AWS Firewall Manager -// features, see the AWS Firewall Manager Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/fms-chapter.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01 for more information on this service. -// -// See fms package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/fms/ -// -// Using the Client -// -// To contact Firewall Management Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Firewall Management Service client FMS for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/fms/#New -package fms diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go b/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go deleted file mode 100644 index c63fd3c5b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package fms - -const ( - - // ErrCodeInternalErrorException for service response error code - // "InternalErrorException". - // - // The operation failed because of a system problem, even though the request - // was valid. Retry your request. - ErrCodeInternalErrorException = "InternalErrorException" - - // ErrCodeInvalidInputException for service response error code - // "InvalidInputException". - // - // The parameters of the request were invalid. - ErrCodeInvalidInputException = "InvalidInputException" - - // ErrCodeInvalidOperationException for service response error code - // "InvalidOperationException". - // - // The operation failed because there was nothing to do. For example, you might - // have submitted an AssociateAdminAccount request, but the account ID that - // you submitted was already set as the AWS Firewall Manager administrator. - ErrCodeInvalidOperationException = "InvalidOperationException" - - // ErrCodeInvalidTypeException for service response error code - // "InvalidTypeException". - // - // The value of the Type parameter is invalid. - ErrCodeInvalidTypeException = "InvalidTypeException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The operation exceeds a resource limit, for example, the maximum number of - // policy objects that you can create for an AWS account. For more information, - // see Firewall Manager Limits (http://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html) - // in the AWS WAF Developer Guide. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The specified resource was not found. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/service.go b/vendor/github.com/aws/aws-sdk-go/service/fms/service.go deleted file mode 100644 index 6103e57fd..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/fms/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package fms - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// FMS provides the API operation methods for making requests to -// Firewall Management Service. See this package's package overview docs -// for details on the service. -// -// FMS methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type FMS struct { - *client.Client -} - -// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) - -// Service information constants -const ( - ServiceName = "fms" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "FMS" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the FMS client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a FMS client from just a session. -// svc := fms.New(mySession) -// -// // Create a FMS client with additional configuration -// svc := fms.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *FMS { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *FMS { - svc := &FMS{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-01-01", - JSONVersion: "1.1", - TargetPrefix: "AWSFMS_20180101", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a FMS operation and runs any -// custom request initialization. -func (c *FMS) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/fsx/api.go b/vendor/github.com/aws/aws-sdk-go/service/fsx/api.go deleted file mode 100644 index 6c43a4417..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/fsx/api.go +++ /dev/null @@ -1,3646 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package fsx - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateBackup = "CreateBackup" - -// CreateBackupRequest generates a "aws/request.Request" representing the -// client's request for the CreateBackup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateBackup for more information on using the CreateBackup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateBackupRequest method. -// req, resp := client.CreateBackupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CreateBackup -func (c *FSx) CreateBackupRequest(input *CreateBackupInput) (req *request.Request, output *CreateBackupOutput) { - op := &request.Operation{ - Name: opCreateBackup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateBackupInput{} - } - - output = &CreateBackupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateBackup API operation for Amazon FSx. -// -// Creates a backup of an existing Amazon FSx for Windows File Server file system. -// Creating regular backups for your file system is a best practice that complements -// the replication that Amazon FSx for Windows File Server performs for your -// file system. It also enables you to restore from user modification of data. -// -// If a backup with the specified client request token exists, and the parameters -// match, this operation returns the description of the existing backup. If -// a backup specified client request token exists, and the parameters don't -// match, this operation returns IncompatibleParameterError. If a backup with -// the specified client request token doesn't exist, CreateBackup does the following: -// -// * Creates a new Amazon FSx backup with an assigned ID, and an initial -// lifecycle state of CREATING. -// -// * Returns the description of the backup. -// -// By using the idempotent operation, you can retry a CreateBackup operation -// without the risk of creating an extra backup. This approach can be useful -// when an initial call fails in a way that makes it unclear whether a backup -// was created. If you use the same client request token and the initial call -// created a backup, the operation returns a successful result because all the -// parameters are the same. -// -// The CreateFileSystem operation returns while the backup's lifecycle state -// is still CREATING. You can check the file system creation status by calling -// the DescribeBackups operation, which returns the backup state along with -// other information. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon FSx's -// API operation CreateBackup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// A generic error indicating a failure with a client request. -// -// * ErrCodeFileSystemNotFound "FileSystemNotFound" -// No Amazon FSx file systems were found based upon supplied parameters. -// -// * ErrCodeBackupInProgress "BackupInProgress" -// Another backup is already under way. Wait for completion before initiating -// additional backups of this file system. -// -// * ErrCodeIncompatibleParameterError "IncompatibleParameterError" -// The error returned when a second request is received with the same client -// request token but different parameters settings. A client request token should -// always uniquely identify a single request. -// -// * ErrCodeServiceLimitExceeded "ServiceLimitExceeded" -// An error indicating that a particular service limit was exceeded. You can -// increase some service limits by contacting AWS Support. -// -// * ErrCodeInternalServerError "InternalServerError" -// A generic error indicating a server-side failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CreateBackup -func (c *FSx) CreateBackup(input *CreateBackupInput) (*CreateBackupOutput, error) { - req, out := c.CreateBackupRequest(input) - return out, req.Send() -} - -// CreateBackupWithContext is the same as CreateBackup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateBackup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FSx) CreateBackupWithContext(ctx aws.Context, input *CreateBackupInput, opts ...request.Option) (*CreateBackupOutput, error) { - req, out := c.CreateBackupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFileSystem = "CreateFileSystem" - -// CreateFileSystemRequest generates a "aws/request.Request" representing the -// client's request for the CreateFileSystem operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFileSystem for more information on using the CreateFileSystem -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateFileSystemRequest method. -// req, resp := client.CreateFileSystemRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CreateFileSystem -func (c *FSx) CreateFileSystemRequest(input *CreateFileSystemInput) (req *request.Request, output *CreateFileSystemOutput) { - op := &request.Operation{ - Name: opCreateFileSystem, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateFileSystemInput{} - } - - output = &CreateFileSystemOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFileSystem API operation for Amazon FSx. -// -// Creates a new, empty Amazon FSx file system. -// -// If a file system with the specified client request token exists and the parameters -// match, CreateFileSystem returns the description of the existing file system. -// If a file system specified client request token exists and the parameters -// don't match, this call returns IncompatibleParameterError. If a file system -// with the specified client request token doesn't exist, CreateFileSystem does -// the following: -// -// * Creates a new, empty Amazon FSx file system with an assigned ID, and -// an initial lifecycle state of CREATING. -// -// * Returns the description of the file system. -// -// This operation requires a client request token in the request that Amazon -// FSx uses to ensure idempotent creation. This means that calling the operation -// multiple times with the same client request token has no effect. By using -// the idempotent operation, you can retry a CreateFileSystem operation without -// the risk of creating an extra file system. This approach can be useful when -// an initial call fails in a way that makes it unclear whether a file system -// was created. Examples are if a transport level timeout occurred, or your -// connection was reset. If you use the same client request token and the initial -// call created a file system, the client receives success as long as the parameters -// are the same. -// -// The CreateFileSystem call returns while the file system's lifecycle state -// is still CREATING. You can check the file-system creation status by calling -// the DescribeFileSystems operation, which returns the file system state along -// with other information. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon FSx's -// API operation CreateFileSystem for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// A generic error indicating a failure with a client request. -// -// * ErrCodeActiveDirectoryError "ActiveDirectoryError" -// An Active Directory error. -// -// * ErrCodeIncompatibleParameterError "IncompatibleParameterError" -// The error returned when a second request is received with the same client -// request token but different parameters settings. A client request token should -// always uniquely identify a single request. -// -// * ErrCodeInvalidImportPath "InvalidImportPath" -// The path provided for data repository import isn't valid. -// -// * ErrCodeInvalidNetworkSettings "InvalidNetworkSettings" -// One or more network settings specified in the request are invalid. InvalidVpcId -// means that the ID passed for the virtual private cloud (VPC) is invalid. -// InvalidSubnetIds returns the list of IDs for subnets that are either invalid -// or not part of the VPC specified. InvalidSecurityGroupIds returns the list -// of IDs for security groups that are either invalid or not part of the VPC -// specified. -// -// * ErrCodeServiceLimitExceeded "ServiceLimitExceeded" -// An error indicating that a particular service limit was exceeded. You can -// increase some service limits by contacting AWS Support. -// -// * ErrCodeInternalServerError "InternalServerError" -// A generic error indicating a server-side failure. -// -// * ErrCodeMissingFileSystemConfiguration "MissingFileSystemConfiguration" -// File system configuration is required for this operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CreateFileSystem -func (c *FSx) CreateFileSystem(input *CreateFileSystemInput) (*CreateFileSystemOutput, error) { - req, out := c.CreateFileSystemRequest(input) - return out, req.Send() -} - -// CreateFileSystemWithContext is the same as CreateFileSystem with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFileSystem for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FSx) CreateFileSystemWithContext(ctx aws.Context, input *CreateFileSystemInput, opts ...request.Option) (*CreateFileSystemOutput, error) { - req, out := c.CreateFileSystemRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFileSystemFromBackup = "CreateFileSystemFromBackup" - -// CreateFileSystemFromBackupRequest generates a "aws/request.Request" representing the -// client's request for the CreateFileSystemFromBackup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFileSystemFromBackup for more information on using the CreateFileSystemFromBackup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateFileSystemFromBackupRequest method. -// req, resp := client.CreateFileSystemFromBackupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CreateFileSystemFromBackup -func (c *FSx) CreateFileSystemFromBackupRequest(input *CreateFileSystemFromBackupInput) (req *request.Request, output *CreateFileSystemFromBackupOutput) { - op := &request.Operation{ - Name: opCreateFileSystemFromBackup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateFileSystemFromBackupInput{} - } - - output = &CreateFileSystemFromBackupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFileSystemFromBackup API operation for Amazon FSx. -// -// Creates a new Amazon FSx file system from an existing Amazon FSx for Windows -// File Server backup. -// -// If a file system with the specified client request token exists and the parameters -// match, this call returns the description of the existing file system. If -// a client request token specified by the file system exists and the parameters -// don't match, this call returns IncompatibleParameterError. If a file system -// with the specified client request token doesn't exist, this operation does -// the following: -// -// * Creates a new Amazon FSx file system from backup with an assigned ID, -// and an initial lifecycle state of CREATING. -// -// * Returns the description of the file system. -// -// Parameters like Active Directory, default share name, automatic backup, and -// backup settings default to the parameters of the file system that was backed -// up, unless overridden. You can explicitly supply other settings. -// -// By using the idempotent operation, you can retry a CreateFileSystemFromBackup -// call without the risk of creating an extra file system. This approach can -// be useful when an initial call fails in a way that makes it unclear whether -// a file system was created. Examples are if a transport level timeout occurred, -// or your connection was reset. If you use the same client request token and -// the initial call created a file system, the client receives success as long -// as the parameters are the same. -// -// The CreateFileSystemFromBackup call returns while the file system's lifecycle -// state is still CREATING. You can check the file-system creation status by -// calling the DescribeFileSystems operation, which returns the file system -// state along with other information. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon FSx's -// API operation CreateFileSystemFromBackup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// A generic error indicating a failure with a client request. -// -// * ErrCodeActiveDirectoryError "ActiveDirectoryError" -// An Active Directory error. -// -// * ErrCodeIncompatibleParameterError "IncompatibleParameterError" -// The error returned when a second request is received with the same client -// request token but different parameters settings. A client request token should -// always uniquely identify a single request. -// -// * ErrCodeInvalidNetworkSettings "InvalidNetworkSettings" -// One or more network settings specified in the request are invalid. InvalidVpcId -// means that the ID passed for the virtual private cloud (VPC) is invalid. -// InvalidSubnetIds returns the list of IDs for subnets that are either invalid -// or not part of the VPC specified. InvalidSecurityGroupIds returns the list -// of IDs for security groups that are either invalid or not part of the VPC -// specified. -// -// * ErrCodeServiceLimitExceeded "ServiceLimitExceeded" -// An error indicating that a particular service limit was exceeded. You can -// increase some service limits by contacting AWS Support. -// -// * ErrCodeBackupNotFound "BackupNotFound" -// No Amazon FSx backups were found based upon the supplied parameters. -// -// * ErrCodeInternalServerError "InternalServerError" -// A generic error indicating a server-side failure. -// -// * ErrCodeMissingFileSystemConfiguration "MissingFileSystemConfiguration" -// File system configuration is required for this operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CreateFileSystemFromBackup -func (c *FSx) CreateFileSystemFromBackup(input *CreateFileSystemFromBackupInput) (*CreateFileSystemFromBackupOutput, error) { - req, out := c.CreateFileSystemFromBackupRequest(input) - return out, req.Send() -} - -// CreateFileSystemFromBackupWithContext is the same as CreateFileSystemFromBackup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFileSystemFromBackup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FSx) CreateFileSystemFromBackupWithContext(ctx aws.Context, input *CreateFileSystemFromBackupInput, opts ...request.Option) (*CreateFileSystemFromBackupOutput, error) { - req, out := c.CreateFileSystemFromBackupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBackup = "DeleteBackup" - -// DeleteBackupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBackup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBackup for more information on using the DeleteBackup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBackupRequest method. -// req, resp := client.DeleteBackupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DeleteBackup -func (c *FSx) DeleteBackupRequest(input *DeleteBackupInput) (req *request.Request, output *DeleteBackupOutput) { - op := &request.Operation{ - Name: opDeleteBackup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteBackupInput{} - } - - output = &DeleteBackupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteBackup API operation for Amazon FSx. -// -// Deletes an Amazon FSx for Windows File Server backup, deleting its contents. -// After deletion, the backup no longer exists, and its data is gone. -// -// The DeleteBackup call returns instantly. The backup will not show up in later -// DescribeBackups calls. -// -// The data in a deleted backup is also deleted and can't be recovered by any -// means. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon FSx's -// API operation DeleteBackup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// A generic error indicating a failure with a client request. -// -// * ErrCodeBackupNotFound "BackupNotFound" -// No Amazon FSx backups were found based upon the supplied parameters. -// -// * ErrCodeBackupRestoring "BackupRestoring" -// You can't delete a backup while it's being used to restore a file system. -// -// * ErrCodeIncompatibleParameterError "IncompatibleParameterError" -// The error returned when a second request is received with the same client -// request token but different parameters settings. A client request token should -// always uniquely identify a single request. -// -// * ErrCodeInternalServerError "InternalServerError" -// A generic error indicating a server-side failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DeleteBackup -func (c *FSx) DeleteBackup(input *DeleteBackupInput) (*DeleteBackupOutput, error) { - req, out := c.DeleteBackupRequest(input) - return out, req.Send() -} - -// DeleteBackupWithContext is the same as DeleteBackup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBackup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FSx) DeleteBackupWithContext(ctx aws.Context, input *DeleteBackupInput, opts ...request.Option) (*DeleteBackupOutput, error) { - req, out := c.DeleteBackupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFileSystem = "DeleteFileSystem" - -// DeleteFileSystemRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFileSystem operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFileSystem for more information on using the DeleteFileSystem -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFileSystemRequest method. -// req, resp := client.DeleteFileSystemRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DeleteFileSystem -func (c *FSx) DeleteFileSystemRequest(input *DeleteFileSystemInput) (req *request.Request, output *DeleteFileSystemOutput) { - op := &request.Operation{ - Name: opDeleteFileSystem, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteFileSystemInput{} - } - - output = &DeleteFileSystemOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteFileSystem API operation for Amazon FSx. -// -// Deletes a file system, deleting its contents. After deletion, the file system -// no longer exists, and its data is gone. Any existing automatic backups will -// also be deleted. -// -// By default, when you delete an Amazon FSx for Windows File Server file system, -// a final backup is created upon deletion. This final backup is not subject -// to the file system's retention policy, and must be manually deleted. -// -// The DeleteFileSystem action returns while the file system has the DELETING -// status. You can check the file system deletion status by calling the DescribeFileSystems -// action, which returns a list of file systems in your account. If you pass -// the file system ID for a deleted file system, the DescribeFileSystems returns -// a FileSystemNotFound error. -// -// The data in a deleted file system is also deleted and can't be recovered -// by any means. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon FSx's -// API operation DeleteFileSystem for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// A generic error indicating a failure with a client request. -// -// * ErrCodeIncompatibleParameterError "IncompatibleParameterError" -// The error returned when a second request is received with the same client -// request token but different parameters settings. A client request token should -// always uniquely identify a single request. -// -// * ErrCodeFileSystemNotFound "FileSystemNotFound" -// No Amazon FSx file systems were found based upon supplied parameters. -// -// * ErrCodeServiceLimitExceeded "ServiceLimitExceeded" -// An error indicating that a particular service limit was exceeded. You can -// increase some service limits by contacting AWS Support. -// -// * ErrCodeInternalServerError "InternalServerError" -// A generic error indicating a server-side failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DeleteFileSystem -func (c *FSx) DeleteFileSystem(input *DeleteFileSystemInput) (*DeleteFileSystemOutput, error) { - req, out := c.DeleteFileSystemRequest(input) - return out, req.Send() -} - -// DeleteFileSystemWithContext is the same as DeleteFileSystem with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFileSystem for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FSx) DeleteFileSystemWithContext(ctx aws.Context, input *DeleteFileSystemInput, opts ...request.Option) (*DeleteFileSystemOutput, error) { - req, out := c.DeleteFileSystemRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeBackups = "DescribeBackups" - -// DescribeBackupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeBackups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeBackups for more information on using the DescribeBackups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeBackupsRequest method. -// req, resp := client.DescribeBackupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DescribeBackups -func (c *FSx) DescribeBackupsRequest(input *DescribeBackupsInput) (req *request.Request, output *DescribeBackupsOutput) { - op := &request.Operation{ - Name: opDescribeBackups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeBackupsInput{} - } - - output = &DescribeBackupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeBackups API operation for Amazon FSx. -// -// Returns the description of specific Amazon FSx for Windows File Server backups, -// if a BackupIds value is provided for that backup. Otherwise, it returns all -// backups owned by your AWS account in the AWS Region of the endpoint that -// you're calling. -// -// When retrieving all backups, you can optionally specify the MaxResults parameter -// to limit the number of backups in a response. If more backups remain, Amazon -// FSx returns a NextToken value in the response. In this case, send a later -// request with the NextToken request parameter set to the value of NextToken -// from the last response. -// -// This action is used in an iterative process to retrieve a list of your backups. -// DescribeBackups is called first without a NextTokenvalue. Then the action -// continues to be called with the NextToken parameter set to the value of the -// last NextToken value until a response has no NextToken. -// -// When using this action, keep the following in mind: -// -// * The implementation might return fewer than MaxResults file system descriptions -// while still including a NextToken value. -// -// * The order of backups returned in the response of one DescribeBackups -// call and the order of backups returned across the responses of a multi-call -// iteration is unspecified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon FSx's -// API operation DescribeBackups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// A generic error indicating a failure with a client request. -// -// * ErrCodeFileSystemNotFound "FileSystemNotFound" -// No Amazon FSx file systems were found based upon supplied parameters. -// -// * ErrCodeBackupNotFound "BackupNotFound" -// No Amazon FSx backups were found based upon the supplied parameters. -// -// * ErrCodeInternalServerError "InternalServerError" -// A generic error indicating a server-side failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DescribeBackups -func (c *FSx) DescribeBackups(input *DescribeBackupsInput) (*DescribeBackupsOutput, error) { - req, out := c.DescribeBackupsRequest(input) - return out, req.Send() -} - -// DescribeBackupsWithContext is the same as DescribeBackups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeBackups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FSx) DescribeBackupsWithContext(ctx aws.Context, input *DescribeBackupsInput, opts ...request.Option) (*DescribeBackupsOutput, error) { - req, out := c.DescribeBackupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeBackupsPages iterates over the pages of a DescribeBackups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeBackups method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeBackups operation. -// pageNum := 0 -// err := client.DescribeBackupsPages(params, -// func(page *DescribeBackupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *FSx) DescribeBackupsPages(input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool) error { - return c.DescribeBackupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeBackupsPagesWithContext same as DescribeBackupsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FSx) DescribeBackupsPagesWithContext(ctx aws.Context, input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeBackupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeBackupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeBackupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeFileSystems = "DescribeFileSystems" - -// DescribeFileSystemsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFileSystems operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFileSystems for more information on using the DescribeFileSystems -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFileSystemsRequest method. -// req, resp := client.DescribeFileSystemsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DescribeFileSystems -func (c *FSx) DescribeFileSystemsRequest(input *DescribeFileSystemsInput) (req *request.Request, output *DescribeFileSystemsOutput) { - op := &request.Operation{ - Name: opDescribeFileSystems, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeFileSystemsInput{} - } - - output = &DescribeFileSystemsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFileSystems API operation for Amazon FSx. -// -// Returns the description of specific Amazon FSx file systems, if a FileSystemIds -// value is provided for that file system. Otherwise, it returns descriptions -// of all file systems owned by your AWS account in the AWS Region of the endpoint -// that you're calling. -// -// When retrieving all file system descriptions, you can optionally specify -// the MaxResults parameter to limit the number of descriptions in a response. -// If more file system descriptions remain, Amazon FSx returns a NextToken value -// in the response. In this case, send a later request with the NextToken request -// parameter set to the value of NextToken from the last response. -// -// This action is used in an iterative process to retrieve a list of your file -// system descriptions. DescribeFileSystems is called first without a NextTokenvalue. -// Then the action continues to be called with the NextToken parameter set to -// the value of the last NextToken value until a response has no NextToken. -// -// When using this action, keep the following in mind: -// -// * The implementation might return fewer than MaxResults file system descriptions -// while still including a NextToken value. -// -// * The order of file systems returned in the response of one DescribeFileSystems -// call and the order of file systems returned across the responses of a -// multicall iteration is unspecified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon FSx's -// API operation DescribeFileSystems for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// A generic error indicating a failure with a client request. -// -// * ErrCodeFileSystemNotFound "FileSystemNotFound" -// No Amazon FSx file systems were found based upon supplied parameters. -// -// * ErrCodeInternalServerError "InternalServerError" -// A generic error indicating a server-side failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DescribeFileSystems -func (c *FSx) DescribeFileSystems(input *DescribeFileSystemsInput) (*DescribeFileSystemsOutput, error) { - req, out := c.DescribeFileSystemsRequest(input) - return out, req.Send() -} - -// DescribeFileSystemsWithContext is the same as DescribeFileSystems with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFileSystems for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FSx) DescribeFileSystemsWithContext(ctx aws.Context, input *DescribeFileSystemsInput, opts ...request.Option) (*DescribeFileSystemsOutput, error) { - req, out := c.DescribeFileSystemsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeFileSystemsPages iterates over the pages of a DescribeFileSystems operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeFileSystems 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 DescribeFileSystems operation. -// pageNum := 0 -// err := client.DescribeFileSystemsPages(params, -// func(page *DescribeFileSystemsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *FSx) DescribeFileSystemsPages(input *DescribeFileSystemsInput, fn func(*DescribeFileSystemsOutput, bool) bool) error { - return c.DescribeFileSystemsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeFileSystemsPagesWithContext same as DescribeFileSystemsPages 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 *FSx) DescribeFileSystemsPagesWithContext(ctx aws.Context, input *DescribeFileSystemsInput, fn func(*DescribeFileSystemsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeFileSystemsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeFileSystemsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeFileSystemsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTagsForResource = "ListTagsForResource" - -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the 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/fsx-2018-03-01/ListTagsForResource -func (c *FSx) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for Amazon FSx. -// -// Lists tags for an Amazon FSx file systems and backups in the case of Amazon -// FSx for Windows File Server. -// -// When retrieving all tags, you can optionally specify the MaxResults parameter -// to limit the number of tags in a response. If more tags remain, Amazon FSx -// returns a NextToken value in the response. In this case, send a later request -// with the NextToken request parameter set to the value of NextToken from the -// last response. -// -// This action is used in an iterative process to retrieve a list of your tags. -// ListTagsForResource is called first without a NextTokenvalue. Then the action -// continues to be called with the NextToken parameter set to the value of the -// last NextToken value until a response has no NextToken. -// -// When using this action, keep the following in mind: -// -// * The implementation might return fewer than MaxResults file system descriptions -// while still including a NextToken value. -// -// * The order of tags returned in the response of one ListTagsForResource -// call and the order of tags returned across the responses of a multi-call -// iteration is unspecified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon FSx's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// A generic error indicating a failure with a client request. -// -// * ErrCodeInternalServerError "InternalServerError" -// A generic error indicating a server-side failure. -// -// * ErrCodeResourceNotFound "ResourceNotFound" -// The resource specified by the Amazon Resource Name (ARN) can't be found. -// -// * ErrCodeNotServiceResourceError "NotServiceResourceError" -// The resource specified for the tagging operation is not a resource type owned -// by Amazon FSx. Use the API of the relevant service to perform the operation. -// -// * ErrCodeResourceDoesNotSupportTagging "ResourceDoesNotSupportTagging" -// The resource specified does not support tagging. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/ListTagsForResource -func (c *FSx) 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 *FSx) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagResource = "TagResource" - -// TagResourceRequest generates a "aws/request.Request" representing the -// client's request for the TagResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the 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/fsx-2018-03-01/TagResource -func (c *FSx) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for Amazon FSx. -// -// Tags an Amazon FSx resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon FSx's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// A generic error indicating a failure with a client request. -// -// * ErrCodeInternalServerError "InternalServerError" -// A generic error indicating a server-side failure. -// -// * ErrCodeResourceNotFound "ResourceNotFound" -// The resource specified by the Amazon Resource Name (ARN) can't be found. -// -// * ErrCodeNotServiceResourceError "NotServiceResourceError" -// The resource specified for the tagging operation is not a resource type owned -// by Amazon FSx. Use the API of the relevant service to perform the operation. -// -// * ErrCodeResourceDoesNotSupportTagging "ResourceDoesNotSupportTagging" -// The resource specified does not support tagging. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/TagResource -func (c *FSx) 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 *FSx) 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/fsx-2018-03-01/UntagResource -func (c *FSx) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for Amazon FSx. -// -// This action removes a tag from an Amazon FSx resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon FSx's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// A generic error indicating a failure with a client request. -// -// * ErrCodeInternalServerError "InternalServerError" -// A generic error indicating a server-side failure. -// -// * ErrCodeResourceNotFound "ResourceNotFound" -// The resource specified by the Amazon Resource Name (ARN) can't be found. -// -// * ErrCodeNotServiceResourceError "NotServiceResourceError" -// The resource specified for the tagging operation is not a resource type owned -// by Amazon FSx. Use the API of the relevant service to perform the operation. -// -// * ErrCodeResourceDoesNotSupportTagging "ResourceDoesNotSupportTagging" -// The resource specified does not support tagging. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/UntagResource -func (c *FSx) 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 *FSx) 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 opUpdateFileSystem = "UpdateFileSystem" - -// UpdateFileSystemRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFileSystem operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFileSystem for more information on using the UpdateFileSystem -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFileSystemRequest method. -// req, resp := client.UpdateFileSystemRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/UpdateFileSystem -func (c *FSx) UpdateFileSystemRequest(input *UpdateFileSystemInput) (req *request.Request, output *UpdateFileSystemOutput) { - op := &request.Operation{ - Name: opUpdateFileSystem, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateFileSystemInput{} - } - - output = &UpdateFileSystemOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFileSystem API operation for Amazon FSx. -// -// Updates a file system configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon FSx's -// API operation UpdateFileSystem for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequest "BadRequest" -// A generic error indicating a failure with a client request. -// -// * ErrCodeIncompatibleParameterError "IncompatibleParameterError" -// The error returned when a second request is received with the same client -// request token but different parameters settings. A client request token should -// always uniquely identify a single request. -// -// * ErrCodeInternalServerError "InternalServerError" -// A generic error indicating a server-side failure. -// -// * ErrCodeFileSystemNotFound "FileSystemNotFound" -// No Amazon FSx file systems were found based upon supplied parameters. -// -// * ErrCodeMissingFileSystemConfiguration "MissingFileSystemConfiguration" -// File system configuration is required for this operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/UpdateFileSystem -func (c *FSx) UpdateFileSystem(input *UpdateFileSystemInput) (*UpdateFileSystemOutput, error) { - req, out := c.UpdateFileSystemRequest(input) - return out, req.Send() -} - -// UpdateFileSystemWithContext is the same as UpdateFileSystem with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFileSystem for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *FSx) UpdateFileSystemWithContext(ctx aws.Context, input *UpdateFileSystemInput, opts ...request.Option) (*UpdateFileSystemOutput, error) { - req, out := c.UpdateFileSystemRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// A backup of an Amazon FSx for Windows File Server file system. You can create -// a new file system from a backup to protect against data loss. -type Backup struct { - _ struct{} `type:"structure"` - - // The ID of the backup. - // - // BackupId is a required field - BackupId *string `min:"12" type:"string" required:"true"` - - // The time when a particular backup was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // Details explaining any failures that occur when creating a backup. - FailureDetails *BackupFailureDetails `type:"structure"` - - // Metadata of the file system associated with the backup. This metadata is - // persisted even if the file system is deleted. - // - // FileSystem is a required field - FileSystem *FileSystem `type:"structure" required:"true"` - - // The ID of the AWS Key Management Service (AWS KMS) key used to encrypt this - // backup's data. - KmsKeyId *string `min:"1" type:"string"` - - // The lifecycle status of the backup. - // - // Lifecycle is a required field - Lifecycle *string `type:"string" required:"true" enum:"BackupLifecycle"` - - // The current percent of progress of an asynchronous task. - ProgressPercent *int64 `type:"integer"` - - // The Amazon Resource Name (ARN) for the backup resource. - ResourceARN *string `min:"8" type:"string"` - - // Tags associated with a particular file system. - Tags []*Tag `min:"1" type:"list"` - - // The type of the backup. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"BackupType"` -} - -// String returns the string representation -func (s Backup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Backup) GoString() string { - return s.String() -} - -// SetBackupId sets the BackupId field's value. -func (s *Backup) SetBackupId(v string) *Backup { - s.BackupId = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *Backup) SetCreationTime(v time.Time) *Backup { - s.CreationTime = &v - return s -} - -// SetFailureDetails sets the FailureDetails field's value. -func (s *Backup) SetFailureDetails(v *BackupFailureDetails) *Backup { - s.FailureDetails = v - return s -} - -// SetFileSystem sets the FileSystem field's value. -func (s *Backup) SetFileSystem(v *FileSystem) *Backup { - s.FileSystem = v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *Backup) SetKmsKeyId(v string) *Backup { - s.KmsKeyId = &v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *Backup) SetLifecycle(v string) *Backup { - s.Lifecycle = &v - return s -} - -// SetProgressPercent sets the ProgressPercent field's value. -func (s *Backup) SetProgressPercent(v int64) *Backup { - s.ProgressPercent = &v - return s -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *Backup) SetResourceARN(v string) *Backup { - s.ResourceARN = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Backup) SetTags(v []*Tag) *Backup { - s.Tags = v - return s -} - -// SetType sets the Type field's value. -func (s *Backup) SetType(v string) *Backup { - s.Type = &v - return s -} - -// If backup creation fails, this structure contains the details of that failure. -type BackupFailureDetails struct { - _ struct{} `type:"structure"` - - // A message describing the backup creation failure. - Message *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s BackupFailureDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BackupFailureDetails) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *BackupFailureDetails) SetMessage(v string) *BackupFailureDetails { - s.Message = &v - return s -} - -// The request object for the CreateBackup operation. -type CreateBackupInput struct { - _ struct{} `type:"structure"` - - // (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to - // ensure idempotent creation. This string is automatically filled on your behalf - // when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK. - ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // The ID of the file system to back up. - // - // FileSystemId is a required field - FileSystemId *string `min:"11" type:"string" required:"true"` - - // The tags to apply to the backup at backup creation. The key value of the - // Name tag appears in the console as the backup name. - Tags []*Tag `min:"1" type:"list"` -} - -// String returns the string representation -func (s CreateBackupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBackupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateBackupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateBackupInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) - } - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 11 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 11)) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *CreateBackupInput) SetClientRequestToken(v string) *CreateBackupInput { - s.ClientRequestToken = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *CreateBackupInput) SetFileSystemId(v string) *CreateBackupInput { - s.FileSystemId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateBackupInput) SetTags(v []*Tag) *CreateBackupInput { - s.Tags = v - return s -} - -// The response object for the CreateBackup operation. -type CreateBackupOutput struct { - _ struct{} `type:"structure"` - - // A description of the backup. - Backup *Backup `type:"structure"` -} - -// String returns the string representation -func (s CreateBackupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBackupOutput) GoString() string { - return s.String() -} - -// SetBackup sets the Backup field's value. -func (s *CreateBackupOutput) SetBackup(v *Backup) *CreateBackupOutput { - s.Backup = v - return s -} - -// The request object for the CreateFileSystemFromBackup operation. -type CreateFileSystemFromBackupInput struct { - _ struct{} `type:"structure"` - - // The ID of the backup. - // - // BackupId is a required field - BackupId *string `min:"12" type:"string" required:"true"` - - // (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to - // ensure idempotent creation. This string is automatically filled on your behalf - // when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK. - ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // A list of IDs for the security groups that apply to the specified network - // interfaces created for file system access. These security groups apply to - // all network interfaces. This value isn't returned in later describe requests. - SecurityGroupIds []*string `type:"list"` - - // A list of IDs for the subnets that the file system will be accessible from. - // Currently, you can specify only one subnet. The file server is also launched - // in that subnet's Availability Zone. - // - // SubnetIds is a required field - SubnetIds []*string `type:"list" required:"true"` - - // The tags to be applied to the file system at file system creation. The key - // value of the Name tag appears in the console as the file system name. - Tags []*Tag `min:"1" type:"list"` - - // The configuration for this Microsoft Windows file system. - WindowsConfiguration *CreateFileSystemWindowsConfiguration `type:"structure"` -} - -// String returns the string representation -func (s CreateFileSystemFromBackupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFileSystemFromBackupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFileSystemFromBackupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemFromBackupInput"} - if s.BackupId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupId")) - } - if s.BackupId != nil && len(*s.BackupId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("BackupId", 12)) - } - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - if s.WindowsConfiguration != nil { - if err := s.WindowsConfiguration.Validate(); err != nil { - invalidParams.AddNested("WindowsConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupId sets the BackupId field's value. -func (s *CreateFileSystemFromBackupInput) SetBackupId(v string) *CreateFileSystemFromBackupInput { - s.BackupId = &v - return s -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *CreateFileSystemFromBackupInput) SetClientRequestToken(v string) *CreateFileSystemFromBackupInput { - s.ClientRequestToken = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *CreateFileSystemFromBackupInput) SetSecurityGroupIds(v []*string) *CreateFileSystemFromBackupInput { - s.SecurityGroupIds = v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateFileSystemFromBackupInput) SetSubnetIds(v []*string) *CreateFileSystemFromBackupInput { - s.SubnetIds = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateFileSystemFromBackupInput) SetTags(v []*Tag) *CreateFileSystemFromBackupInput { - s.Tags = v - return s -} - -// SetWindowsConfiguration sets the WindowsConfiguration field's value. -func (s *CreateFileSystemFromBackupInput) SetWindowsConfiguration(v *CreateFileSystemWindowsConfiguration) *CreateFileSystemFromBackupInput { - s.WindowsConfiguration = v - return s -} - -// The response object for the CreateFileSystemFromBackup operation. -type CreateFileSystemFromBackupOutput struct { - _ struct{} `type:"structure"` - - // A description of the file system. - FileSystem *FileSystem `type:"structure"` -} - -// String returns the string representation -func (s CreateFileSystemFromBackupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFileSystemFromBackupOutput) GoString() string { - return s.String() -} - -// SetFileSystem sets the FileSystem field's value. -func (s *CreateFileSystemFromBackupOutput) SetFileSystem(v *FileSystem) *CreateFileSystemFromBackupOutput { - s.FileSystem = v - return s -} - -// The request object for the CreateFileSystem operation. -type CreateFileSystemInput struct { - _ struct{} `type:"structure"` - - // (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to - // ensure idempotent creation. This string is automatically filled on your behalf - // when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK. - ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // The type of file system. - // - // FileSystemType is a required field - FileSystemType *string `type:"string" required:"true" enum:"FileSystemType"` - - // The ID of your AWS Key Management Service (AWS KMS) key. This ID is used - // to encrypt the data in your file system at rest. For more information, see - // Encrypt (http://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html) - // in the AWS Key Management Service API Reference. - KmsKeyId *string `min:"1" type:"string"` - - // The configuration object for Lustre file systems used in the CreateFileSystem - // operation. - LustreConfiguration *CreateFileSystemLustreConfiguration `type:"structure"` - - // A list of IDs for the security groups that apply to the specified network - // interfaces created for file system access. These security groups will apply - // to all network interfaces. This list isn't returned in later describe requests. - SecurityGroupIds []*string `type:"list"` - - // The storage capacity of the file system. - // - // For Windows file systems, the storage capacity has a minimum of 300 GiB, - // and a maximum of 65,536 GiB. - // - // For Lustre file systems, the storage capacity has a minimum of 3,600 GiB. - // Storage capacity is provisioned in increments of 3,600 GiB. - // - // StorageCapacity is a required field - StorageCapacity *int64 `min:"300" type:"integer" required:"true"` - - // A list of IDs for the subnets that the file system will be accessible from. - // File systems support only one subnet. The file server is also launched in - // that subnet's Availability Zone. - // - // SubnetIds is a required field - SubnetIds []*string `type:"list" required:"true"` - - // The tags to be applied to the file system at file system creation. The key - // value of the Name tag appears in the console as the file system name. - Tags []*Tag `min:"1" type:"list"` - - // The configuration for this Microsoft Windows file system. - WindowsConfiguration *CreateFileSystemWindowsConfiguration `type:"structure"` -} - -// String returns the string representation -func (s CreateFileSystemInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFileSystemInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFileSystemInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) - } - if s.FileSystemType == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemType")) - } - if s.KmsKeyId != nil && len(*s.KmsKeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KmsKeyId", 1)) - } - if s.StorageCapacity == nil { - invalidParams.Add(request.NewErrParamRequired("StorageCapacity")) - } - if s.StorageCapacity != nil && *s.StorageCapacity < 300 { - invalidParams.Add(request.NewErrParamMinValue("StorageCapacity", 300)) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.LustreConfiguration != nil { - if err := s.LustreConfiguration.Validate(); err != nil { - invalidParams.AddNested("LustreConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - if s.WindowsConfiguration != nil { - if err := s.WindowsConfiguration.Validate(); err != nil { - invalidParams.AddNested("WindowsConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *CreateFileSystemInput) SetClientRequestToken(v string) *CreateFileSystemInput { - s.ClientRequestToken = &v - return s -} - -// SetFileSystemType sets the FileSystemType field's value. -func (s *CreateFileSystemInput) SetFileSystemType(v string) *CreateFileSystemInput { - s.FileSystemType = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateFileSystemInput) SetKmsKeyId(v string) *CreateFileSystemInput { - s.KmsKeyId = &v - return s -} - -// SetLustreConfiguration sets the LustreConfiguration field's value. -func (s *CreateFileSystemInput) SetLustreConfiguration(v *CreateFileSystemLustreConfiguration) *CreateFileSystemInput { - s.LustreConfiguration = v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *CreateFileSystemInput) SetSecurityGroupIds(v []*string) *CreateFileSystemInput { - s.SecurityGroupIds = v - return s -} - -// SetStorageCapacity sets the StorageCapacity field's value. -func (s *CreateFileSystemInput) SetStorageCapacity(v int64) *CreateFileSystemInput { - s.StorageCapacity = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateFileSystemInput) SetSubnetIds(v []*string) *CreateFileSystemInput { - s.SubnetIds = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateFileSystemInput) SetTags(v []*Tag) *CreateFileSystemInput { - s.Tags = v - return s -} - -// SetWindowsConfiguration sets the WindowsConfiguration field's value. -func (s *CreateFileSystemInput) SetWindowsConfiguration(v *CreateFileSystemWindowsConfiguration) *CreateFileSystemInput { - s.WindowsConfiguration = v - return s -} - -// The configuration object for Lustre file systems used in the CreateFileSystem -// operation. -type CreateFileSystemLustreConfiguration struct { - _ struct{} `type:"structure"` - - // (Optional) The path to the Amazon S3 bucket (and optional prefix) that you're - // using as the data repository for your FSx for Lustre file system, for example - // s3://import-bucket/optional-prefix. If you specify a prefix after the Amazon - // S3 bucket name, only object keys with that prefix are loaded into the file - // system. - ImportPath *string `min:"3" type:"string"` - - // (Optional) For files imported from a data repository, this value determines - // the stripe count and maximum amount of data per file (in MiB) stored on a - // single physical disk. The maximum number of disks that a single file can - // be striped across is limited by the total number of disks that make up the - // file system. - // - // The chunk size default is 1,024 MiB (1 GiB) and can go as high as 512,000 - // MiB (500 GiB). Amazon S3 objects have a maximum size of 5 TB. - ImportedFileChunkSize *int64 `min:"1" type:"integer"` - - // The preferred time to perform weekly maintenance, in the UTC time zone. - WeeklyMaintenanceStartTime *string `min:"7" type:"string"` -} - -// String returns the string representation -func (s CreateFileSystemLustreConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFileSystemLustreConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFileSystemLustreConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemLustreConfiguration"} - if s.ImportPath != nil && len(*s.ImportPath) < 3 { - invalidParams.Add(request.NewErrParamMinLen("ImportPath", 3)) - } - if s.ImportedFileChunkSize != nil && *s.ImportedFileChunkSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("ImportedFileChunkSize", 1)) - } - if s.WeeklyMaintenanceStartTime != nil && len(*s.WeeklyMaintenanceStartTime) < 7 { - invalidParams.Add(request.NewErrParamMinLen("WeeklyMaintenanceStartTime", 7)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetImportPath sets the ImportPath field's value. -func (s *CreateFileSystemLustreConfiguration) SetImportPath(v string) *CreateFileSystemLustreConfiguration { - s.ImportPath = &v - return s -} - -// SetImportedFileChunkSize sets the ImportedFileChunkSize field's value. -func (s *CreateFileSystemLustreConfiguration) SetImportedFileChunkSize(v int64) *CreateFileSystemLustreConfiguration { - s.ImportedFileChunkSize = &v - return s -} - -// SetWeeklyMaintenanceStartTime sets the WeeklyMaintenanceStartTime field's value. -func (s *CreateFileSystemLustreConfiguration) SetWeeklyMaintenanceStartTime(v string) *CreateFileSystemLustreConfiguration { - s.WeeklyMaintenanceStartTime = &v - return s -} - -// The response object for the CreateFileSystem operation. -type CreateFileSystemOutput struct { - _ struct{} `type:"structure"` - - // A description of the file system. - FileSystem *FileSystem `type:"structure"` -} - -// String returns the string representation -func (s CreateFileSystemOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFileSystemOutput) GoString() string { - return s.String() -} - -// SetFileSystem sets the FileSystem field's value. -func (s *CreateFileSystemOutput) SetFileSystem(v *FileSystem) *CreateFileSystemOutput { - s.FileSystem = v - return s -} - -// The configuration object for the Microsoft Windows file system used in CreateFileSystem -// and CreateFileSystemFromBackup operations. -type CreateFileSystemWindowsConfiguration struct { - _ struct{} `type:"structure"` - - // The ID for an existing Microsoft Active Directory instance that the file - // system should join when it's created. - ActiveDirectoryId *string `min:"12" type:"string"` - - // The number of days to retain automatic backups. The default is to retain - // backups for 7 days. Setting this value to 0 disables the creation of automatic - // backups. The maximum retention period for backups is 35 days. - AutomaticBackupRetentionDays *int64 `type:"integer"` - - // A boolean flag indicating whether tags on the file system should be copied - // to backups. This value defaults to false. If it's set to true, all tags on - // the file system are copied to all automatic backups and any user-initiated - // backups where the user doesn't specify any tags. If this value is true, and - // you specify one or more tags, only the specified tags are copied to backups. - CopyTagsToBackups *bool `type:"boolean"` - - // The preferred time to take daily automatic backups, in the UTC time zone. - DailyAutomaticBackupStartTime *string `min:"5" type:"string"` - - // The throughput of an Amazon FSx file system, measured in megabytes per second. - // - // ThroughputCapacity is a required field - ThroughputCapacity *int64 `min:"8" type:"integer" required:"true"` - - // The preferred start time to perform weekly maintenance, in the UTC time zone. - WeeklyMaintenanceStartTime *string `min:"7" type:"string"` -} - -// String returns the string representation -func (s CreateFileSystemWindowsConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFileSystemWindowsConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFileSystemWindowsConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemWindowsConfiguration"} - if s.ActiveDirectoryId != nil && len(*s.ActiveDirectoryId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("ActiveDirectoryId", 12)) - } - if s.DailyAutomaticBackupStartTime != nil && len(*s.DailyAutomaticBackupStartTime) < 5 { - invalidParams.Add(request.NewErrParamMinLen("DailyAutomaticBackupStartTime", 5)) - } - if s.ThroughputCapacity == nil { - invalidParams.Add(request.NewErrParamRequired("ThroughputCapacity")) - } - if s.ThroughputCapacity != nil && *s.ThroughputCapacity < 8 { - invalidParams.Add(request.NewErrParamMinValue("ThroughputCapacity", 8)) - } - if s.WeeklyMaintenanceStartTime != nil && len(*s.WeeklyMaintenanceStartTime) < 7 { - invalidParams.Add(request.NewErrParamMinLen("WeeklyMaintenanceStartTime", 7)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActiveDirectoryId sets the ActiveDirectoryId field's value. -func (s *CreateFileSystemWindowsConfiguration) SetActiveDirectoryId(v string) *CreateFileSystemWindowsConfiguration { - s.ActiveDirectoryId = &v - return s -} - -// SetAutomaticBackupRetentionDays sets the AutomaticBackupRetentionDays field's value. -func (s *CreateFileSystemWindowsConfiguration) SetAutomaticBackupRetentionDays(v int64) *CreateFileSystemWindowsConfiguration { - s.AutomaticBackupRetentionDays = &v - return s -} - -// SetCopyTagsToBackups sets the CopyTagsToBackups field's value. -func (s *CreateFileSystemWindowsConfiguration) SetCopyTagsToBackups(v bool) *CreateFileSystemWindowsConfiguration { - s.CopyTagsToBackups = &v - return s -} - -// SetDailyAutomaticBackupStartTime sets the DailyAutomaticBackupStartTime field's value. -func (s *CreateFileSystemWindowsConfiguration) SetDailyAutomaticBackupStartTime(v string) *CreateFileSystemWindowsConfiguration { - s.DailyAutomaticBackupStartTime = &v - return s -} - -// SetThroughputCapacity sets the ThroughputCapacity field's value. -func (s *CreateFileSystemWindowsConfiguration) SetThroughputCapacity(v int64) *CreateFileSystemWindowsConfiguration { - s.ThroughputCapacity = &v - return s -} - -// SetWeeklyMaintenanceStartTime sets the WeeklyMaintenanceStartTime field's value. -func (s *CreateFileSystemWindowsConfiguration) SetWeeklyMaintenanceStartTime(v string) *CreateFileSystemWindowsConfiguration { - s.WeeklyMaintenanceStartTime = &v - return s -} - -// The data repository configuration object for Lustre file systems returned -// in the response of the CreateFileSystem operation. -type DataRepositoryConfiguration struct { - _ struct{} `type:"structure"` - - // The Amazon S3 commit path to use for storing new and changed Lustre file - // system files as part of the archive operation from the file system to Amazon - // S3. The value is s3://import-bucket/FSxLustre[creationtimestamp]. The timestamp - // is presented in UTC format, for example s3://import-bucket/FSxLustre20181105T222312Z. - // Files are archived to a different prefix in the Amazon S3 bucket, preventing - // input data from being overwritten. - ExportPath *string `min:"3" type:"string"` - - // The import path to the Amazon S3 bucket (and optional prefix) that you're - // using as the data repository for your FSx for Lustre file system, for example - // s3://import-bucket/optional-prefix. If a prefix is specified after the Amazon - // S3 bucket name, only object keys with that prefix are loaded into the file - // system. - ImportPath *string `min:"3" type:"string"` - - // For files imported from a data repository, this value determines the stripe - // count and maximum amount of data per file (in MiB) stored on a single physical - // disk. The maximum number of disks that a single file can be striped across - // is limited by the total number of disks that make up the file system. - // - // The default chunk size is 1,024 MiB (1 GiB) and can go as high as 512,000 - // MiB (500 GiB). Amazon S3 objects have a maximum size of 5 TB. - ImportedFileChunkSize *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s DataRepositoryConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DataRepositoryConfiguration) GoString() string { - return s.String() -} - -// SetExportPath sets the ExportPath field's value. -func (s *DataRepositoryConfiguration) SetExportPath(v string) *DataRepositoryConfiguration { - s.ExportPath = &v - return s -} - -// SetImportPath sets the ImportPath field's value. -func (s *DataRepositoryConfiguration) SetImportPath(v string) *DataRepositoryConfiguration { - s.ImportPath = &v - return s -} - -// SetImportedFileChunkSize sets the ImportedFileChunkSize field's value. -func (s *DataRepositoryConfiguration) SetImportedFileChunkSize(v int64) *DataRepositoryConfiguration { - s.ImportedFileChunkSize = &v - return s -} - -// The request object for DeleteBackup operation. -type DeleteBackupInput struct { - _ struct{} `type:"structure"` - - // The ID of the backup you want to delete. - // - // BackupId is a required field - BackupId *string `min:"12" type:"string" required:"true"` - - // (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to - // ensure idempotent deletion. This is automatically filled on your behalf when - // using the AWS CLI or SDK. - ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` -} - -// String returns the string representation -func (s DeleteBackupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBackupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBackupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBackupInput"} - if s.BackupId == nil { - invalidParams.Add(request.NewErrParamRequired("BackupId")) - } - if s.BackupId != nil && len(*s.BackupId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("BackupId", 12)) - } - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupId sets the BackupId field's value. -func (s *DeleteBackupInput) SetBackupId(v string) *DeleteBackupInput { - s.BackupId = &v - return s -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *DeleteBackupInput) SetClientRequestToken(v string) *DeleteBackupInput { - s.ClientRequestToken = &v - return s -} - -// The response object for DeleteBackup operation. -type DeleteBackupOutput struct { - _ struct{} `type:"structure"` - - // The ID of the backup deleted. - BackupId *string `min:"12" type:"string"` - - // The lifecycle of the backup. Should be DELETED. - Lifecycle *string `type:"string" enum:"BackupLifecycle"` -} - -// String returns the string representation -func (s DeleteBackupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBackupOutput) GoString() string { - return s.String() -} - -// SetBackupId sets the BackupId field's value. -func (s *DeleteBackupOutput) SetBackupId(v string) *DeleteBackupOutput { - s.BackupId = &v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *DeleteBackupOutput) SetLifecycle(v string) *DeleteBackupOutput { - s.Lifecycle = &v - return s -} - -// The request object for DeleteFileSystem operation. -type DeleteFileSystemInput struct { - _ struct{} `type:"structure"` - - // (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to - // ensure idempotent deletion. This is automatically filled on your behalf when - // using the AWS CLI or SDK. - ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // The ID of the file system you want to delete. - // - // FileSystemId is a required field - FileSystemId *string `min:"11" type:"string" required:"true"` - - // The configuration object for the Microsoft Windows file system used in the - // DeleteFileSystem operation. - WindowsConfiguration *DeleteFileSystemWindowsConfiguration `type:"structure"` -} - -// String returns the string representation -func (s DeleteFileSystemInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFileSystemInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFileSystemInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFileSystemInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) - } - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 11 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 11)) - } - if s.WindowsConfiguration != nil { - if err := s.WindowsConfiguration.Validate(); err != nil { - invalidParams.AddNested("WindowsConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *DeleteFileSystemInput) SetClientRequestToken(v string) *DeleteFileSystemInput { - s.ClientRequestToken = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DeleteFileSystemInput) SetFileSystemId(v string) *DeleteFileSystemInput { - s.FileSystemId = &v - return s -} - -// SetWindowsConfiguration sets the WindowsConfiguration field's value. -func (s *DeleteFileSystemInput) SetWindowsConfiguration(v *DeleteFileSystemWindowsConfiguration) *DeleteFileSystemInput { - s.WindowsConfiguration = v - return s -} - -// The response object for the DeleteFileSystem operation. -type DeleteFileSystemOutput struct { - _ struct{} `type:"structure"` - - // The ID of the file system being deleted. - FileSystemId *string `min:"11" type:"string"` - - // The file system lifecycle for the deletion request. Should be DELETING. - Lifecycle *string `type:"string" enum:"FileSystemLifecycle"` - - // The response object for the Microsoft Windows file system used in the DeleteFileSystem - // operation. - WindowsResponse *DeleteFileSystemWindowsResponse `type:"structure"` -} - -// String returns the string representation -func (s DeleteFileSystemOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFileSystemOutput) GoString() string { - return s.String() -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DeleteFileSystemOutput) SetFileSystemId(v string) *DeleteFileSystemOutput { - s.FileSystemId = &v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *DeleteFileSystemOutput) SetLifecycle(v string) *DeleteFileSystemOutput { - s.Lifecycle = &v - return s -} - -// SetWindowsResponse sets the WindowsResponse field's value. -func (s *DeleteFileSystemOutput) SetWindowsResponse(v *DeleteFileSystemWindowsResponse) *DeleteFileSystemOutput { - s.WindowsResponse = v - return s -} - -// The configuration object for the Microsoft Windows file system used in the -// DeleteFileSystem operation. -type DeleteFileSystemWindowsConfiguration struct { - _ struct{} `type:"structure"` - - // A set of tags for your final backup. - FinalBackupTags []*Tag `min:"1" type:"list"` - - // By default, Amazon FSx for Windows takes a final backup on your behalf when - // the DeleteFileSystem operation is invoked. Doing this helps protect you from - // data loss, and we highly recommend taking the final backup. If you want to - // skip this backup, use this flag to do so. - SkipFinalBackup *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeleteFileSystemWindowsConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFileSystemWindowsConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFileSystemWindowsConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFileSystemWindowsConfiguration"} - if s.FinalBackupTags != nil && len(s.FinalBackupTags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FinalBackupTags", 1)) - } - if s.FinalBackupTags != nil { - for i, v := range s.FinalBackupTags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "FinalBackupTags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFinalBackupTags sets the FinalBackupTags field's value. -func (s *DeleteFileSystemWindowsConfiguration) SetFinalBackupTags(v []*Tag) *DeleteFileSystemWindowsConfiguration { - s.FinalBackupTags = v - return s -} - -// SetSkipFinalBackup sets the SkipFinalBackup field's value. -func (s *DeleteFileSystemWindowsConfiguration) SetSkipFinalBackup(v bool) *DeleteFileSystemWindowsConfiguration { - s.SkipFinalBackup = &v - return s -} - -// The response object for the Microsoft Windows file system used in the DeleteFileSystem -// operation. -type DeleteFileSystemWindowsResponse struct { - _ struct{} `type:"structure"` - - // The ID of the final backup for this file system. - FinalBackupId *string `min:"12" type:"string"` - - // The set of tags applied to the final backup. - FinalBackupTags []*Tag `min:"1" type:"list"` -} - -// String returns the string representation -func (s DeleteFileSystemWindowsResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFileSystemWindowsResponse) GoString() string { - return s.String() -} - -// SetFinalBackupId sets the FinalBackupId field's value. -func (s *DeleteFileSystemWindowsResponse) SetFinalBackupId(v string) *DeleteFileSystemWindowsResponse { - s.FinalBackupId = &v - return s -} - -// SetFinalBackupTags sets the FinalBackupTags field's value. -func (s *DeleteFileSystemWindowsResponse) SetFinalBackupTags(v []*Tag) *DeleteFileSystemWindowsResponse { - s.FinalBackupTags = v - return s -} - -// The request object for DescribeBackups operation. -type DescribeBackupsInput struct { - _ struct{} `type:"structure"` - - // (Optional) IDs of the backups you want to retrieve (String). This overrides - // any filters. If any IDs are not found, BackupNotFound will be thrown. - BackupIds []*string `type:"list"` - - // (Optional) Filters structure. Supported names are file-system-id and backup-type. - Filters []*Filter `type:"list"` - - // (Optional) Maximum number of backups to return in the response (integer). - // This parameter value must be greater than 0. The number of items that Amazon - // FSx returns is the minimum of the MaxResults parameter specified in the request - // and the service's internal maximum number of items per page. - MaxResults *int64 `min:"1" type:"integer"` - - // (Optional) Opaque pagination token returned from a previous DescribeBackups - // operation (String). If a token present, the action continues the list from - // where the returning call left off. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeBackupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBackupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeBackupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeBackupsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupIds sets the BackupIds field's value. -func (s *DescribeBackupsInput) SetBackupIds(v []*string) *DescribeBackupsInput { - s.BackupIds = v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeBackupsInput) SetFilters(v []*Filter) *DescribeBackupsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeBackupsInput) SetMaxResults(v int64) *DescribeBackupsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeBackupsInput) SetNextToken(v string) *DescribeBackupsInput { - s.NextToken = &v - return s -} - -// Response object for DescribeBackups operation. -type DescribeBackupsOutput struct { - _ struct{} `type:"structure"` - - // Any array of backups. - Backups []*Backup `type:"list"` - - // This is present if there are more backups than returned in the response (String). - // You can use the NextToken value in the later request to fetch the backups. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeBackupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBackupsOutput) GoString() string { - return s.String() -} - -// SetBackups sets the Backups field's value. -func (s *DescribeBackupsOutput) SetBackups(v []*Backup) *DescribeBackupsOutput { - s.Backups = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeBackupsOutput) SetNextToken(v string) *DescribeBackupsOutput { - s.NextToken = &v - return s -} - -// The request object for DescribeFileSystems operation. -type DescribeFileSystemsInput struct { - _ struct{} `type:"structure"` - - // (Optional) IDs of the file systems whose descriptions you want to retrieve - // (String). - FileSystemIds []*string `type:"list"` - - // (Optional) Maximum number of file systems to return in the response (integer). - // This parameter value must be greater than 0. The number of items that Amazon - // FSx returns is the minimum of the MaxResults parameter specified in the request - // and the service's internal maximum number of items per page. - MaxResults *int64 `min:"1" type:"integer"` - - // (Optional) Opaque pagination token returned from a previous DescribeFileSystems - // operation (String). If a token present, the action continues the list from - // where the returning call left off. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeFileSystemsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFileSystemsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFileSystemsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFileSystemsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemIds sets the FileSystemIds field's value. -func (s *DescribeFileSystemsInput) SetFileSystemIds(v []*string) *DescribeFileSystemsInput { - s.FileSystemIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeFileSystemsInput) SetMaxResults(v int64) *DescribeFileSystemsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFileSystemsInput) SetNextToken(v string) *DescribeFileSystemsInput { - s.NextToken = &v - return s -} - -// The response object for DescribeFileSystems operation. -type DescribeFileSystemsOutput struct { - _ struct{} `type:"structure"` - - // An array of file system descriptions. - FileSystems []*FileSystem `type:"list"` - - // Present if there are more file systems than returned in the response (String). - // You can use the NextToken value in the later request to fetch the descriptions. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeFileSystemsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFileSystemsOutput) GoString() string { - return s.String() -} - -// SetFileSystems sets the FileSystems field's value. -func (s *DescribeFileSystemsOutput) SetFileSystems(v []*FileSystem) *DescribeFileSystemsOutput { - s.FileSystems = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFileSystemsOutput) SetNextToken(v string) *DescribeFileSystemsOutput { - s.NextToken = &v - return s -} - -// A description of a specific Amazon FSx file system. -type FileSystem struct { - _ struct{} `type:"structure"` - - // The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z), - // also known as Unix time. - CreationTime *time.Time `type:"timestamp"` - - // The DNS name for the file system. - DNSName *string `min:"16" type:"string"` - - // Structure providing details of any failures that occur when creating the - // file system has failed. - FailureDetails *FileSystemFailureDetails `type:"structure"` - - // The eight-digit ID of the file system that was automatically assigned by - // Amazon FSx. - FileSystemId *string `min:"11" type:"string"` - - // Type of file system. Currently the only supported type is WINDOWS. - FileSystemType *string `type:"string" enum:"FileSystemType"` - - // The ID of the AWS Key Management Service (AWS KMS) key used to encrypt the - // file system's data for an Amazon FSx for Windows File Server file system. - KmsKeyId *string `min:"1" type:"string"` - - // The lifecycle status of the file system. - Lifecycle *string `type:"string" enum:"FileSystemLifecycle"` - - // The configuration for the Amazon FSx for Lustre file system. - LustreConfiguration *LustreFileSystemConfiguration `type:"structure"` - - // The IDs of the elastic network interface from which a specific file system - // is accessible. The elastic network interface is automatically created in - // the same VPC that the Amazon FSx file system was created in. For more information, - // see Elastic Network Interfaces (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html) - // in the Amazon EC2 User Guide. - // - // For an Amazon FSx for Windows File Server file system, you can have one network - // interface Id. For an Amazon FSx for Lustre file system, you can have more - // than one. - NetworkInterfaceIds []*string `type:"list"` - - // The AWS account that created the file system. If the file system was created - // by an IAM user, the AWS account to which the IAM user belongs is the owner. - OwnerId *string `min:"12" type:"string"` - - // The resource ARN of the file system. - ResourceARN *string `min:"8" type:"string"` - - // The storage capacity of the file system in gigabytes. - StorageCapacity *int64 `min:"300" type:"integer"` - - // The IDs of the subnets to contain the endpoint for the file system. One and - // only one is supported. The file system is launched in the Availability Zone - // associated with this subnet. - SubnetIds []*string `type:"list"` - - // The tags to associate with the file system. For more information, see Tagging - // Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) - // in the Amazon EC2 User Guide. - Tags []*Tag `min:"1" type:"list"` - - // The ID of the primary VPC for the file system. - VpcId *string `min:"12" type:"string"` - - // The configuration for this Microsoft Windows file system. - WindowsConfiguration *WindowsFileSystemConfiguration `type:"structure"` -} - -// String returns the string representation -func (s FileSystem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FileSystem) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *FileSystem) SetCreationTime(v time.Time) *FileSystem { - s.CreationTime = &v - return s -} - -// SetDNSName sets the DNSName field's value. -func (s *FileSystem) SetDNSName(v string) *FileSystem { - s.DNSName = &v - return s -} - -// SetFailureDetails sets the FailureDetails field's value. -func (s *FileSystem) SetFailureDetails(v *FileSystemFailureDetails) *FileSystem { - s.FailureDetails = v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *FileSystem) SetFileSystemId(v string) *FileSystem { - s.FileSystemId = &v - return s -} - -// SetFileSystemType sets the FileSystemType field's value. -func (s *FileSystem) SetFileSystemType(v string) *FileSystem { - s.FileSystemType = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *FileSystem) SetKmsKeyId(v string) *FileSystem { - s.KmsKeyId = &v - return s -} - -// SetLifecycle sets the Lifecycle field's value. -func (s *FileSystem) SetLifecycle(v string) *FileSystem { - s.Lifecycle = &v - return s -} - -// SetLustreConfiguration sets the LustreConfiguration field's value. -func (s *FileSystem) SetLustreConfiguration(v *LustreFileSystemConfiguration) *FileSystem { - s.LustreConfiguration = v - return s -} - -// SetNetworkInterfaceIds sets the NetworkInterfaceIds field's value. -func (s *FileSystem) SetNetworkInterfaceIds(v []*string) *FileSystem { - s.NetworkInterfaceIds = v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *FileSystem) SetOwnerId(v string) *FileSystem { - s.OwnerId = &v - return s -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *FileSystem) SetResourceARN(v string) *FileSystem { - s.ResourceARN = &v - return s -} - -// SetStorageCapacity sets the StorageCapacity field's value. -func (s *FileSystem) SetStorageCapacity(v int64) *FileSystem { - s.StorageCapacity = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *FileSystem) SetSubnetIds(v []*string) *FileSystem { - s.SubnetIds = v - return s -} - -// SetTags sets the Tags field's value. -func (s *FileSystem) SetTags(v []*Tag) *FileSystem { - s.Tags = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *FileSystem) SetVpcId(v string) *FileSystem { - s.VpcId = &v - return s -} - -// SetWindowsConfiguration sets the WindowsConfiguration field's value. -func (s *FileSystem) SetWindowsConfiguration(v *WindowsFileSystemConfiguration) *FileSystem { - s.WindowsConfiguration = v - return s -} - -// Structure providing details of any failures that occur when creating the -// file system has failed. -type FileSystemFailureDetails struct { - _ struct{} `type:"structure"` - - // Message describing the failures that occurred during file system creation. - Message *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s FileSystemFailureDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FileSystemFailureDetails) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *FileSystemFailureDetails) SetMessage(v string) *FileSystemFailureDetails { - s.Message = &v - return s -} - -// A filter used to restrict the results of describe calls. You can use multiple -// filters to return results that meet all applied filter requirements. -type Filter struct { - _ struct{} `type:"structure"` - - // The name for this filter. - Name *string `type:"string" enum:"FilterName"` - - // The values of the filter. These are all the values for any of the applied - // filters. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s Filter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Filter) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *Filter) SetName(v string) *Filter { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *Filter) SetValues(v []*string) *Filter { - s.Values = v - return s -} - -// The request object for ListTagsForResource operation. -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // (Optional) Maximum number of tags to return in the response (integer). This - // parameter value must be greater than 0. The number of items that Amazon FSx - // returns is the minimum of the MaxResults parameter specified in the request - // and the service's internal maximum number of items per page. - MaxResults *int64 `min:"1" type:"integer"` - - // (Optional) Opaque pagination token returned from a previous ListTagsForResource - // operation (String). If a token present, the action continues the list from - // where the returning call left off. - NextToken *string `min:"1" type:"string"` - - // The ARN of the Amazon FSx resource that will have its tags listed. - // - // ResourceARN is a required field - ResourceARN *string `min:"8" 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.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.ResourceARN == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceARN")) - } - if s.ResourceARN != nil && len(*s.ResourceARN) < 8 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 8)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { - s.NextToken = &v - return s -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { - s.ResourceARN = &v - return s -} - -// The response object for ListTagsForResource operation. -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // This is present if there are more tags than returned in the response (String). - // You can use the NextToken value in the later request to fetch the tags. - NextToken *string `min:"1" type:"string"` - - // A list of tags on the resource. - Tags []*Tag `min:"1" type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { - s.NextToken = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -// The configuration for the Amazon FSx for Lustre file system. -type LustreFileSystemConfiguration struct { - _ struct{} `type:"structure"` - - // The data repository configuration object for Lustre file systems returned - // in the response of the CreateFileSystem operation. - DataRepositoryConfiguration *DataRepositoryConfiguration `type:"structure"` - - // The UTC time that you want to begin your weekly maintenance window. - WeeklyMaintenanceStartTime *string `min:"7" type:"string"` -} - -// String returns the string representation -func (s LustreFileSystemConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LustreFileSystemConfiguration) GoString() string { - return s.String() -} - -// SetDataRepositoryConfiguration sets the DataRepositoryConfiguration field's value. -func (s *LustreFileSystemConfiguration) SetDataRepositoryConfiguration(v *DataRepositoryConfiguration) *LustreFileSystemConfiguration { - s.DataRepositoryConfiguration = v - return s -} - -// SetWeeklyMaintenanceStartTime sets the WeeklyMaintenanceStartTime field's value. -func (s *LustreFileSystemConfiguration) SetWeeklyMaintenanceStartTime(v string) *LustreFileSystemConfiguration { - s.WeeklyMaintenanceStartTime = &v - return s -} - -// Specifies a key-value pair for a resource tag. -type Tag struct { - _ struct{} `type:"structure"` - - // A value that specifies the TagKey, the name of the tag. Tag keys must be - // unique for the resource to which they are attached. - Key *string `min:"1" type:"string"` - - // A value that specifies the TagValue, the value assigned to the corresponding - // tag key. Tag values can be null and don't have to be unique in a tag set. - // For example, you can have a key-value pair in a tag set of finances : April - // and also of payroll : April. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// The request object for the TagResource operation. -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the Amazon FSx resource that you want to - // tag. - // - // ResourceARN is a required field - ResourceARN *string `min:"8" type:"string" required:"true"` - - // A list of tags for the resource. If a tag with a given key already exists, - // the value is replaced by the one specified in this parameter. - // - // Tags is a required field - Tags []*Tag `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceARN == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceARN")) - } - if s.ResourceARN != nil && len(*s.ResourceARN) < 8 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 8)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput { - s.ResourceARN = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -// The response object for the TagResource operation. -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -// The request object for UntagResource action. -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The ARN of the Amazon FSx resource to untag. - // - // ResourceARN is a required field - ResourceARN *string `min:"8" type:"string" required:"true"` - - // A list of keys of tags on the resource to untag. In case the tag key doesn't - // exist, the call will still succeed to be idempotent. - // - // TagKeys is a required field - TagKeys []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s UntagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} - if s.ResourceARN == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceARN")) - } - if s.ResourceARN != nil && len(*s.ResourceARN) < 8 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 8)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - if s.TagKeys != nil && len(s.TagKeys) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput { - s.ResourceARN = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -// The response object for UntagResource action. -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() -} - -// The request object for the UpdateFileSystem operation. -type UpdateFileSystemInput struct { - _ struct{} `type:"structure"` - - // (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to - // ensure idempotent updates. This string is automatically filled on your behalf - // when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK. - ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // The globally unique ID of the file system, assigned by Amazon FSx. - // - // FileSystemId is a required field - FileSystemId *string `min:"11" type:"string" required:"true"` - - // The configuration object for Amazon FSx for Lustre file systems used in the - // UpdateFileSystem operation. - LustreConfiguration *UpdateFileSystemLustreConfiguration `type:"structure"` - - // The configuration for this Microsoft Windows file system. The only supported - // options are for backup and maintenance. - WindowsConfiguration *UpdateFileSystemWindowsConfiguration `type:"structure"` -} - -// String returns the string representation -func (s UpdateFileSystemInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFileSystemInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFileSystemInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFileSystemInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) - } - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 11 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 11)) - } - if s.LustreConfiguration != nil { - if err := s.LustreConfiguration.Validate(); err != nil { - invalidParams.AddNested("LustreConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.WindowsConfiguration != nil { - if err := s.WindowsConfiguration.Validate(); err != nil { - invalidParams.AddNested("WindowsConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *UpdateFileSystemInput) SetClientRequestToken(v string) *UpdateFileSystemInput { - s.ClientRequestToken = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *UpdateFileSystemInput) SetFileSystemId(v string) *UpdateFileSystemInput { - s.FileSystemId = &v - return s -} - -// SetLustreConfiguration sets the LustreConfiguration field's value. -func (s *UpdateFileSystemInput) SetLustreConfiguration(v *UpdateFileSystemLustreConfiguration) *UpdateFileSystemInput { - s.LustreConfiguration = v - return s -} - -// SetWindowsConfiguration sets the WindowsConfiguration field's value. -func (s *UpdateFileSystemInput) SetWindowsConfiguration(v *UpdateFileSystemWindowsConfiguration) *UpdateFileSystemInput { - s.WindowsConfiguration = v - return s -} - -// The configuration object for Amazon FSx for Lustre file systems used in the -// UpdateFileSystem operation. -type UpdateFileSystemLustreConfiguration struct { - _ struct{} `type:"structure"` - - // The preferred time to perform weekly maintenance, in the UTC time zone. - WeeklyMaintenanceStartTime *string `min:"7" type:"string"` -} - -// String returns the string representation -func (s UpdateFileSystemLustreConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFileSystemLustreConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFileSystemLustreConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFileSystemLustreConfiguration"} - if s.WeeklyMaintenanceStartTime != nil && len(*s.WeeklyMaintenanceStartTime) < 7 { - invalidParams.Add(request.NewErrParamMinLen("WeeklyMaintenanceStartTime", 7)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWeeklyMaintenanceStartTime sets the WeeklyMaintenanceStartTime field's value. -func (s *UpdateFileSystemLustreConfiguration) SetWeeklyMaintenanceStartTime(v string) *UpdateFileSystemLustreConfiguration { - s.WeeklyMaintenanceStartTime = &v - return s -} - -// The response object for the UpdateFileSystem operation. -type UpdateFileSystemOutput struct { - _ struct{} `type:"structure"` - - // A description of the file system. - FileSystem *FileSystem `type:"structure"` -} - -// String returns the string representation -func (s UpdateFileSystemOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFileSystemOutput) GoString() string { - return s.String() -} - -// SetFileSystem sets the FileSystem field's value. -func (s *UpdateFileSystemOutput) SetFileSystem(v *FileSystem) *UpdateFileSystemOutput { - s.FileSystem = v - return s -} - -// The configuration object for the Microsoft Windows file system used in the -// UpdateFileSystem operation. -type UpdateFileSystemWindowsConfiguration struct { - _ struct{} `type:"structure"` - - // The number of days to retain automatic backups. Setting this to 0 disables - // automatic backups. You can retain automatic backups for a maximum of 35 days. - AutomaticBackupRetentionDays *int64 `type:"integer"` - - // The preferred time to take daily automatic backups, in the UTC time zone. - DailyAutomaticBackupStartTime *string `min:"5" type:"string"` - - // The preferred time to perform weekly maintenance, in the UTC time zone. - WeeklyMaintenanceStartTime *string `min:"7" type:"string"` -} - -// String returns the string representation -func (s UpdateFileSystemWindowsConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFileSystemWindowsConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFileSystemWindowsConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFileSystemWindowsConfiguration"} - if s.DailyAutomaticBackupStartTime != nil && len(*s.DailyAutomaticBackupStartTime) < 5 { - invalidParams.Add(request.NewErrParamMinLen("DailyAutomaticBackupStartTime", 5)) - } - if s.WeeklyMaintenanceStartTime != nil && len(*s.WeeklyMaintenanceStartTime) < 7 { - invalidParams.Add(request.NewErrParamMinLen("WeeklyMaintenanceStartTime", 7)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutomaticBackupRetentionDays sets the AutomaticBackupRetentionDays field's value. -func (s *UpdateFileSystemWindowsConfiguration) SetAutomaticBackupRetentionDays(v int64) *UpdateFileSystemWindowsConfiguration { - s.AutomaticBackupRetentionDays = &v - return s -} - -// SetDailyAutomaticBackupStartTime sets the DailyAutomaticBackupStartTime field's value. -func (s *UpdateFileSystemWindowsConfiguration) SetDailyAutomaticBackupStartTime(v string) *UpdateFileSystemWindowsConfiguration { - s.DailyAutomaticBackupStartTime = &v - return s -} - -// SetWeeklyMaintenanceStartTime sets the WeeklyMaintenanceStartTime field's value. -func (s *UpdateFileSystemWindowsConfiguration) SetWeeklyMaintenanceStartTime(v string) *UpdateFileSystemWindowsConfiguration { - s.WeeklyMaintenanceStartTime = &v - return s -} - -// The configuration for this Microsoft Windows file system. -type WindowsFileSystemConfiguration struct { - _ struct{} `type:"structure"` - - // The ID for an existing Microsoft Active Directory instance that the file - // system should join when it's created. - ActiveDirectoryId *string `min:"12" type:"string"` - - // The number of days to retain automatic backups. Setting this to 0 disables - // automatic backups. You can retain automatic backups for a maximum of 35 days. - AutomaticBackupRetentionDays *int64 `type:"integer"` - - // A boolean flag indicating whether tags on the file system should be copied - // to backups. This value defaults to false. If it's set to true, all tags on - // the file system are copied to all automatic backups and any user-initiated - // backups where the user doesn't specify any tags. If this value is true, and - // you specify one or more tags, only the specified tags are copied to backups. - CopyTagsToBackups *bool `type:"boolean"` - - // The preferred time to take daily automatic backups, in the UTC time zone. - DailyAutomaticBackupStartTime *string `min:"5" type:"string"` - - // The list of maintenance operations in progress for this file system. - MaintenanceOperationsInProgress []*string `type:"list"` - - // The throughput of an Amazon FSx file system, measured in megabytes per second. - ThroughputCapacity *int64 `min:"8" type:"integer"` - - // The preferred time to perform weekly maintenance, in the UTC time zone. - WeeklyMaintenanceStartTime *string `min:"7" type:"string"` -} - -// String returns the string representation -func (s WindowsFileSystemConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WindowsFileSystemConfiguration) GoString() string { - return s.String() -} - -// SetActiveDirectoryId sets the ActiveDirectoryId field's value. -func (s *WindowsFileSystemConfiguration) SetActiveDirectoryId(v string) *WindowsFileSystemConfiguration { - s.ActiveDirectoryId = &v - return s -} - -// SetAutomaticBackupRetentionDays sets the AutomaticBackupRetentionDays field's value. -func (s *WindowsFileSystemConfiguration) SetAutomaticBackupRetentionDays(v int64) *WindowsFileSystemConfiguration { - s.AutomaticBackupRetentionDays = &v - return s -} - -// SetCopyTagsToBackups sets the CopyTagsToBackups field's value. -func (s *WindowsFileSystemConfiguration) SetCopyTagsToBackups(v bool) *WindowsFileSystemConfiguration { - s.CopyTagsToBackups = &v - return s -} - -// SetDailyAutomaticBackupStartTime sets the DailyAutomaticBackupStartTime field's value. -func (s *WindowsFileSystemConfiguration) SetDailyAutomaticBackupStartTime(v string) *WindowsFileSystemConfiguration { - s.DailyAutomaticBackupStartTime = &v - return s -} - -// SetMaintenanceOperationsInProgress sets the MaintenanceOperationsInProgress field's value. -func (s *WindowsFileSystemConfiguration) SetMaintenanceOperationsInProgress(v []*string) *WindowsFileSystemConfiguration { - s.MaintenanceOperationsInProgress = v - return s -} - -// SetThroughputCapacity sets the ThroughputCapacity field's value. -func (s *WindowsFileSystemConfiguration) SetThroughputCapacity(v int64) *WindowsFileSystemConfiguration { - s.ThroughputCapacity = &v - return s -} - -// SetWeeklyMaintenanceStartTime sets the WeeklyMaintenanceStartTime field's value. -func (s *WindowsFileSystemConfiguration) SetWeeklyMaintenanceStartTime(v string) *WindowsFileSystemConfiguration { - s.WeeklyMaintenanceStartTime = &v - return s -} - -// The type of error relating to Microsoft Active Directory. NOT_FOUND means -// that no directory was found by specifying the given directory. INCOMPATIBLE_MODE -// means that the directory specified is not a Microsoft AD directory. WRONG_VPC -// means that the specified directory isn't accessible from the specified VPC. -// WRONG_STAGE means that the specified directory isn't currently in the ACTIVE -// state. -const ( - // ActiveDirectoryErrorTypeDomainNotFound is a ActiveDirectoryErrorType enum value - ActiveDirectoryErrorTypeDomainNotFound = "DOMAIN_NOT_FOUND" - - // ActiveDirectoryErrorTypeIncompatibleDomainMode is a ActiveDirectoryErrorType enum value - ActiveDirectoryErrorTypeIncompatibleDomainMode = "INCOMPATIBLE_DOMAIN_MODE" - - // ActiveDirectoryErrorTypeWrongVpc is a ActiveDirectoryErrorType enum value - ActiveDirectoryErrorTypeWrongVpc = "WRONG_VPC" - - // ActiveDirectoryErrorTypeInvalidDomainStage is a ActiveDirectoryErrorType enum value - ActiveDirectoryErrorTypeInvalidDomainStage = "INVALID_DOMAIN_STAGE" -) - -// The lifecycle status of the backup. -const ( - // BackupLifecycleAvailable is a BackupLifecycle enum value - BackupLifecycleAvailable = "AVAILABLE" - - // BackupLifecycleCreating is a BackupLifecycle enum value - BackupLifecycleCreating = "CREATING" - - // BackupLifecycleDeleted is a BackupLifecycle enum value - BackupLifecycleDeleted = "DELETED" - - // BackupLifecycleFailed is a BackupLifecycle enum value - BackupLifecycleFailed = "FAILED" -) - -// The type of the backup. -const ( - // BackupTypeAutomatic is a BackupType enum value - BackupTypeAutomatic = "AUTOMATIC" - - // BackupTypeUserInitiated is a BackupType enum value - BackupTypeUserInitiated = "USER_INITIATED" -) - -// The lifecycle status of the file system. -const ( - // FileSystemLifecycleAvailable is a FileSystemLifecycle enum value - FileSystemLifecycleAvailable = "AVAILABLE" - - // FileSystemLifecycleCreating is a FileSystemLifecycle enum value - FileSystemLifecycleCreating = "CREATING" - - // FileSystemLifecycleFailed is a FileSystemLifecycle enum value - FileSystemLifecycleFailed = "FAILED" - - // FileSystemLifecycleDeleting is a FileSystemLifecycle enum value - FileSystemLifecycleDeleting = "DELETING" -) - -// An enumeration specifying the currently ongoing maintenance operation. -const ( - // FileSystemMaintenanceOperationPatching is a FileSystemMaintenanceOperation enum value - FileSystemMaintenanceOperationPatching = "PATCHING" - - // FileSystemMaintenanceOperationBackingUp is a FileSystemMaintenanceOperation enum value - FileSystemMaintenanceOperationBackingUp = "BACKING_UP" -) - -// The type of file system. -const ( - // FileSystemTypeWindows is a FileSystemType enum value - FileSystemTypeWindows = "WINDOWS" - - // FileSystemTypeLustre is a FileSystemType enum value - FileSystemTypeLustre = "LUSTRE" -) - -// The name for a filter. -const ( - // FilterNameFileSystemId is a FilterName enum value - FilterNameFileSystemId = "file-system-id" - - // FilterNameBackupType is a FilterName enum value - FilterNameBackupType = "backup-type" -) - -// The types of limits on your service utilization. Limits include file system -// count, total throughput capacity, total storage, and total user-initiated -// backups. These limits apply for a specific account in a specific AWS Region. -// You can increase some of them by contacting AWS Support. -const ( - // ServiceLimitFileSystemCount is a ServiceLimit enum value - ServiceLimitFileSystemCount = "FILE_SYSTEM_COUNT" - - // ServiceLimitTotalThroughputCapacity is a ServiceLimit enum value - ServiceLimitTotalThroughputCapacity = "TOTAL_THROUGHPUT_CAPACITY" - - // ServiceLimitTotalStorage is a ServiceLimit enum value - ServiceLimitTotalStorage = "TOTAL_STORAGE" - - // ServiceLimitTotalUserInitiatedBackups is a ServiceLimit enum value - ServiceLimitTotalUserInitiatedBackups = "TOTAL_USER_INITIATED_BACKUPS" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/fsx/doc.go b/vendor/github.com/aws/aws-sdk-go/service/fsx/doc.go deleted file mode 100644 index 0c23c396c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/fsx/doc.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package fsx provides the client and types for making API -// requests to Amazon FSx. -// -// Amazon FSx is a fully managed service that makes it easy for storage and -// application administrators to launch and use shared file storage. -// -// See https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01 for more information on this service. -// -// See fsx package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/fsx/ -// -// Using the Client -// -// To contact Amazon FSx with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon FSx client FSx for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/fsx/#New -package fsx diff --git a/vendor/github.com/aws/aws-sdk-go/service/fsx/errors.go b/vendor/github.com/aws/aws-sdk-go/service/fsx/errors.go deleted file mode 100644 index 1a7801fb4..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/fsx/errors.go +++ /dev/null @@ -1,106 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package fsx - -const ( - - // ErrCodeActiveDirectoryError for service response error code - // "ActiveDirectoryError". - // - // An Active Directory error. - ErrCodeActiveDirectoryError = "ActiveDirectoryError" - - // ErrCodeBackupInProgress for service response error code - // "BackupInProgress". - // - // Another backup is already under way. Wait for completion before initiating - // additional backups of this file system. - ErrCodeBackupInProgress = "BackupInProgress" - - // ErrCodeBackupNotFound for service response error code - // "BackupNotFound". - // - // No Amazon FSx backups were found based upon the supplied parameters. - ErrCodeBackupNotFound = "BackupNotFound" - - // ErrCodeBackupRestoring for service response error code - // "BackupRestoring". - // - // You can't delete a backup while it's being used to restore a file system. - ErrCodeBackupRestoring = "BackupRestoring" - - // ErrCodeBadRequest for service response error code - // "BadRequest". - // - // A generic error indicating a failure with a client request. - ErrCodeBadRequest = "BadRequest" - - // ErrCodeFileSystemNotFound for service response error code - // "FileSystemNotFound". - // - // No Amazon FSx file systems were found based upon supplied parameters. - ErrCodeFileSystemNotFound = "FileSystemNotFound" - - // ErrCodeIncompatibleParameterError for service response error code - // "IncompatibleParameterError". - // - // The error returned when a second request is received with the same client - // request token but different parameters settings. A client request token should - // always uniquely identify a single request. - ErrCodeIncompatibleParameterError = "IncompatibleParameterError" - - // ErrCodeInternalServerError for service response error code - // "InternalServerError". - // - // A generic error indicating a server-side failure. - ErrCodeInternalServerError = "InternalServerError" - - // ErrCodeInvalidImportPath for service response error code - // "InvalidImportPath". - // - // The path provided for data repository import isn't valid. - ErrCodeInvalidImportPath = "InvalidImportPath" - - // ErrCodeInvalidNetworkSettings for service response error code - // "InvalidNetworkSettings". - // - // One or more network settings specified in the request are invalid. InvalidVpcId - // means that the ID passed for the virtual private cloud (VPC) is invalid. - // InvalidSubnetIds returns the list of IDs for subnets that are either invalid - // or not part of the VPC specified. InvalidSecurityGroupIds returns the list - // of IDs for security groups that are either invalid or not part of the VPC - // specified. - ErrCodeInvalidNetworkSettings = "InvalidNetworkSettings" - - // ErrCodeMissingFileSystemConfiguration for service response error code - // "MissingFileSystemConfiguration". - // - // File system configuration is required for this operation. - ErrCodeMissingFileSystemConfiguration = "MissingFileSystemConfiguration" - - // ErrCodeNotServiceResourceError for service response error code - // "NotServiceResourceError". - // - // The resource specified for the tagging operation is not a resource type owned - // by Amazon FSx. Use the API of the relevant service to perform the operation. - ErrCodeNotServiceResourceError = "NotServiceResourceError" - - // ErrCodeResourceDoesNotSupportTagging for service response error code - // "ResourceDoesNotSupportTagging". - // - // The resource specified does not support tagging. - ErrCodeResourceDoesNotSupportTagging = "ResourceDoesNotSupportTagging" - - // ErrCodeResourceNotFound for service response error code - // "ResourceNotFound". - // - // The resource specified by the Amazon Resource Name (ARN) can't be found. - ErrCodeResourceNotFound = "ResourceNotFound" - - // ErrCodeServiceLimitExceeded for service response error code - // "ServiceLimitExceeded". - // - // An error indicating that a particular service limit was exceeded. You can - // increase some service limits by contacting AWS Support. - ErrCodeServiceLimitExceeded = "ServiceLimitExceeded" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/fsx/service.go b/vendor/github.com/aws/aws-sdk-go/service/fsx/service.go deleted file mode 100644 index 544a82e1b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/fsx/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package fsx - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// FSx provides the API operation methods for making requests to -// Amazon FSx. See this package's package overview docs -// for details on the service. -// -// FSx methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type FSx 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 = "FSx" // Name of service. - EndpointsID = "fsx" // ID to lookup a service endpoint with. - ServiceID = "FSx" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the FSx 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 FSx client from just a session. -// svc := fsx.New(mySession) -// -// // Create a FSx client with additional configuration -// svc := fsx.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *FSx { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *FSx { - svc := &FSx{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-03-01", - JSONVersion: "1.1", - TargetPrefix: "AWSSimbaAPIService_v20180301", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a FSx operation and runs any -// custom request initialization. -func (c *FSx) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go deleted file mode 100644 index 60d1aca41..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go +++ /dev/null @@ -1,19732 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package gamelift - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAcceptMatch = "AcceptMatch" - -// AcceptMatchRequest generates a "aws/request.Request" representing the -// client's request for the AcceptMatch operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcceptMatch for more information on using the AcceptMatch -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcceptMatchRequest method. -// req, resp := client.AcceptMatchRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/AcceptMatch -func (c *GameLift) AcceptMatchRequest(input *AcceptMatchInput) (req *request.Request, output *AcceptMatchOutput) { - op := &request.Operation{ - Name: opAcceptMatch, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AcceptMatchInput{} - } - - output = &AcceptMatchOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AcceptMatch API operation for Amazon GameLift. -// -// Registers a player's acceptance or rejection of a proposed FlexMatch match. -// A matchmaking configuration may require player acceptance; if so, then matches -// built with that configuration cannot be completed unless all players accept -// the proposed match within a specified time limit. -// -// When FlexMatch builds a match, all the matchmaking tickets involved in the -// proposed match are placed into status REQUIRES_ACCEPTANCE. This is a trigger -// for your game to get acceptance from all players in the ticket. Acceptances -// are only valid for tickets when they are in this status; all other acceptances -// result in an error. -// -// To register acceptance, specify the ticket ID, a response, and one or more -// players. Once all players have registered acceptance, the matchmaking tickets -// advance to status PLACING, where a new game session is created for the match. -// -// If any player rejects the match, or if acceptances are not received before -// a specified timeout, the proposed match is dropped. The matchmaking tickets -// are then handled in one of two ways: For tickets where all players accepted -// the match, the ticket status is returned to SEARCHING to find a new match. -// For tickets where one or more players failed to accept the match, the ticket -// status is set to FAILED, and processing is terminated. A new matchmaking -// request for these players can be submitted as needed. -// -// Matchmaking-related operations include: -// -// * StartMatchmaking -// -// * DescribeMatchmaking -// -// * StopMatchmaking -// -// * AcceptMatch -// -// * StartMatchBackfill -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation AcceptMatch for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/AcceptMatch -func (c *GameLift) AcceptMatch(input *AcceptMatchInput) (*AcceptMatchOutput, error) { - req, out := c.AcceptMatchRequest(input) - return out, req.Send() -} - -// AcceptMatchWithContext is the same as AcceptMatch with the addition of -// the ability to pass a context and additional request options. -// -// See AcceptMatch for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) AcceptMatchWithContext(ctx aws.Context, input *AcceptMatchInput, opts ...request.Option) (*AcceptMatchOutput, error) { - req, out := c.AcceptMatchRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAlias = "CreateAlias" - -// CreateAliasRequest generates a "aws/request.Request" representing the -// client's request for the CreateAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAlias for more information on using the CreateAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAliasRequest method. -// req, resp := client.CreateAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateAlias -func (c *GameLift) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *CreateAliasOutput) { - op := &request.Operation{ - Name: opCreateAlias, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAliasInput{} - } - - output = &CreateAliasOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAlias API operation for Amazon GameLift. -// -// Creates an alias for a fleet. In most situations, you can use an alias ID -// in place of a fleet ID. By using a fleet alias instead of a specific fleet -// ID, you can switch gameplay and players to a new fleet without changing your -// game client or other game components. For example, for games in production, -// using an alias allows you to seamlessly redirect your player base to a new -// game server update. -// -// Amazon GameLift supports two types of routing strategies for aliases: simple -// and terminal. A simple alias points to an active fleet. A terminal alias -// is used to display messaging or link to a URL instead of routing players -// to an active fleet. For example, you might use a terminal alias when a game -// version is no longer supported and you want to direct players to an upgrade -// site. -// -// To create a fleet alias, specify an alias name, routing strategy, and optional -// description. Each simple alias can point to only one fleet, but a fleet can -// have multiple aliases. If successful, a new alias record is returned, including -// an alias ID, which you can reference when creating a game session. You can -// reassign an alias to another fleet by calling UpdateAlias. -// -// Alias-related operations include: -// -// * CreateAlias -// -// * ListAliases -// -// * DescribeAlias -// -// * UpdateAlias -// -// * DeleteAlias -// -// * ResolveAlias -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation CreateAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested operation would cause the resource to exceed the allowed service -// limit. Resolve the issue before retrying. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateAlias -func (c *GameLift) CreateAlias(input *CreateAliasInput) (*CreateAliasOutput, error) { - req, out := c.CreateAliasRequest(input) - return out, req.Send() -} - -// CreateAliasWithContext is the same as CreateAlias with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) CreateAliasWithContext(ctx aws.Context, input *CreateAliasInput, opts ...request.Option) (*CreateAliasOutput, error) { - req, out := c.CreateAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateBuild = "CreateBuild" - -// CreateBuildRequest generates a "aws/request.Request" representing the -// client's request for the CreateBuild operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateBuild for more information on using the CreateBuild -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateBuildRequest method. -// req, resp := client.CreateBuildRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateBuild -func (c *GameLift) CreateBuildRequest(input *CreateBuildInput) (req *request.Request, output *CreateBuildOutput) { - op := &request.Operation{ - Name: opCreateBuild, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateBuildInput{} - } - - output = &CreateBuildOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateBuild API operation for Amazon GameLift. -// -// Creates a new Amazon GameLift build record for your game server binary files -// and points to the location of your game server build files in an Amazon Simple -// Storage Service (Amazon S3) location. -// -// Game server binaries must be combined into a .zip file for use with Amazon -// GameLift. See Uploading Your Game (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-intro.html) -// for more information. -// -// To create new builds quickly and easily, use the AWS CLI command upload-build -// (http://docs.aws.amazon.com/cli/latest/reference/gamelift/upload-build.html). -// This helper command uploads your build and creates a new build record in -// one step, and automatically handles the necessary permissions. See Upload -// Build Files to Amazon GameLift (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html) -// for more help. -// -// The CreateBuild operation should be used only when you need to manually upload -// your build files, as in the following scenarios: -// -// * Store a build file in an Amazon S3 bucket under your own AWS account. -// To use this option, you must first give Amazon GameLift access to that -// Amazon S3 bucket. See Create a Build with Files in Amazon S3 (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html#gamelift-build-cli-uploading-create-build) -// for detailed help. To create a new build record using files in your Amazon -// S3 bucket, call CreateBuild and specify a build name, operating system, -// and the storage location of your game build. -// -// * Upload a build file directly to Amazon GameLift's Amazon S3 account. -// To use this option, you first call CreateBuild with a build name and operating -// system. This action creates a new build record and returns an Amazon S3 -// storage location (bucket and key only) and temporary access credentials. -// Use the credentials to manually upload your build file to the storage -// location (see the Amazon S3 topic Uploading Objects (http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadingObjects.html)). -// You can upload files to a location only once. -// -// If successful, this operation creates a new build record with a unique build -// ID and places it in INITIALIZED status. You can use DescribeBuild to check -// the status of your build. A build must be in READY status before it can be -// used to create fleets. -// -// Build-related operations include: -// -// * CreateBuild -// -// * ListBuilds -// -// * DescribeBuild -// -// * UpdateBuild -// -// * DeleteBuild -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation CreateBuild for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateBuild -func (c *GameLift) CreateBuild(input *CreateBuildInput) (*CreateBuildOutput, error) { - req, out := c.CreateBuildRequest(input) - return out, req.Send() -} - -// CreateBuildWithContext is the same as CreateBuild with the addition of -// the ability to pass a context and additional request options. -// -// See CreateBuild for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) CreateBuildWithContext(ctx aws.Context, input *CreateBuildInput, opts ...request.Option) (*CreateBuildOutput, error) { - req, out := c.CreateBuildRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFleet = "CreateFleet" - -// CreateFleetRequest generates a "aws/request.Request" representing the -// client's request for the CreateFleet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFleet for more information on using the CreateFleet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateFleetRequest method. -// req, resp := client.CreateFleetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateFleet -func (c *GameLift) CreateFleetRequest(input *CreateFleetInput) (req *request.Request, output *CreateFleetOutput) { - op := &request.Operation{ - Name: opCreateFleet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateFleetInput{} - } - - output = &CreateFleetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFleet API operation for Amazon GameLift. -// -// Creates a new fleet to run your game servers. A fleet is a set of Amazon -// Elastic Compute Cloud (Amazon EC2) instances, each of which can run multiple -// server processes to host game sessions. You set up a fleet to use instances -// with certain hardware specifications (see Amazon EC2 Instance Types (http://aws.amazon.com/ec2/instance-types/) -// for more information), and deploy your game build to run on each instance. -// -// To create a new fleet, you must specify the following: (1) a fleet name, -// (2) the build ID of a successfully uploaded game build, (3) an EC2 instance -// type, and (4) a run-time configuration, which describes the server processes -// to run on each instance in the fleet. If you don't specify a fleet type (on-demand -// or spot), the new fleet uses on-demand instances by default. -// -// You can also configure the new fleet with the following settings: -// -// * Fleet description -// -// * Access permissions for inbound traffic -// -// * Fleet-wide game session protection -// -// * Resource usage limits -// -// * VPC peering connection (see VPC Peering with Amazon GameLift Fleets -// (http://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html)) -// -// If you use Amazon CloudWatch for metrics, you can add the new fleet to a -// metric group. By adding multiple fleets to a metric group, you can view aggregated -// metrics for all the fleets in the group. -// -// If the CreateFleet call is successful, Amazon GameLift performs the following -// tasks. You can track the process of a fleet by checking the fleet status -// or by monitoring fleet creation events: -// -// * Creates a fleet record. Status: NEW. -// -// * Begins writing events to the fleet event log, which can be accessed -// in the Amazon GameLift console. -// -// Sets the fleet's target capacity to 1 (desired instances), which triggers -// Amazon GameLift to start one new EC2 instance. -// -// * Downloads the game build to the new instance and installs it. Statuses: -// DOWNLOADING, VALIDATING, BUILDING. -// -// * Starts launching server processes on the instance. If the fleet is configured -// to run multiple server processes per instance, Amazon GameLift staggers -// each launch by a few seconds. Status: ACTIVATING. -// -// * Sets the fleet's status to ACTIVE as soon as one server process is ready -// to host a game session. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation CreateFleet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested operation would cause the resource to exceed the allowed service -// limit. Resolve the issue before retrying. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateFleet -func (c *GameLift) CreateFleet(input *CreateFleetInput) (*CreateFleetOutput, error) { - req, out := c.CreateFleetRequest(input) - return out, req.Send() -} - -// CreateFleetWithContext is the same as CreateFleet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFleet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) CreateFleetWithContext(ctx aws.Context, input *CreateFleetInput, opts ...request.Option) (*CreateFleetOutput, error) { - req, out := c.CreateFleetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateGameSession = "CreateGameSession" - -// CreateGameSessionRequest generates a "aws/request.Request" representing the -// client's request for the CreateGameSession operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateGameSession for more information on using the CreateGameSession -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateGameSessionRequest method. -// req, resp := client.CreateGameSessionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateGameSession -func (c *GameLift) CreateGameSessionRequest(input *CreateGameSessionInput) (req *request.Request, output *CreateGameSessionOutput) { - op := &request.Operation{ - Name: opCreateGameSession, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateGameSessionInput{} - } - - output = &CreateGameSessionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateGameSession API operation for Amazon GameLift. -// -// Creates a multiplayer game session for players. This action creates a game -// session record and assigns an available server process in the specified fleet -// to host the game session. A fleet must have an ACTIVE status before a game -// session can be created in it. -// -// To create a game session, specify either fleet ID or alias ID and indicate -// a maximum number of players to allow in the game session. You can also provide -// a name and game-specific properties for this game session. If successful, -// a GameSession object is returned containing the game session properties and -// other settings you specified. -// -// Idempotency tokens. You can add a token that uniquely identifies game session -// requests. This is useful for ensuring that game session requests are idempotent. -// Multiple requests with the same idempotency token are processed only once; -// subsequent requests return the original result. All response values are the -// same with the exception of game session status, which may change. -// -// Resource creation limits. If you are creating a game session on a fleet with -// a resource creation limit policy in force, then you must specify a creator -// ID. Without this ID, Amazon GameLift has no way to evaluate the policy for -// this new game session request. -// -// Player acceptance policy. By default, newly created game sessions are open -// to new players. You can restrict new player access by using UpdateGameSession -// to change the game session's player session creation policy. -// -// Game session logs. Logs are retained for all active game sessions for 14 -// days. To access the logs, call GetGameSessionLogUrl to download the log files. -// -// Available in Amazon GameLift Local. -// -// Game-session-related operations include: -// -// * CreateGameSession -// -// * DescribeGameSessions -// -// * DescribeGameSessionDetails -// -// * SearchGameSessions -// -// * UpdateGameSession -// -// * GetGameSessionLogUrl -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation CreateGameSession for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidFleetStatusException "InvalidFleetStatusException" -// The requested operation would cause a conflict with the current state of -// a resource associated with the request and/or the fleet. Resolve the conflict -// before retrying. -// -// * ErrCodeTerminalRoutingStrategyException "TerminalRoutingStrategyException" -// The service is unable to resolve the routing for a particular alias because -// it has a terminal RoutingStrategy associated with it. The message returned -// in this exception is the message defined in the routing strategy itself. -// Such requests should only be retried if the routing strategy for the specified -// alias is modified. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeFleetCapacityExceededException "FleetCapacityExceededException" -// The specified fleet has no available instances to fulfill a CreateGameSession -// request. Clients can retry such requests immediately or after a waiting period. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested operation would cause the resource to exceed the allowed service -// limit. Resolve the issue before retrying. -// -// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" -// A game session with this custom ID string already exists in this fleet. Resolve -// this conflict before retrying this request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateGameSession -func (c *GameLift) CreateGameSession(input *CreateGameSessionInput) (*CreateGameSessionOutput, error) { - req, out := c.CreateGameSessionRequest(input) - return out, req.Send() -} - -// CreateGameSessionWithContext is the same as CreateGameSession with the addition of -// the ability to pass a context and additional request options. -// -// See CreateGameSession for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) CreateGameSessionWithContext(ctx aws.Context, input *CreateGameSessionInput, opts ...request.Option) (*CreateGameSessionOutput, error) { - req, out := c.CreateGameSessionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateGameSessionQueue = "CreateGameSessionQueue" - -// CreateGameSessionQueueRequest generates a "aws/request.Request" representing the -// client's request for the CreateGameSessionQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateGameSessionQueue for more information on using the CreateGameSessionQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateGameSessionQueueRequest method. -// req, resp := client.CreateGameSessionQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateGameSessionQueue -func (c *GameLift) CreateGameSessionQueueRequest(input *CreateGameSessionQueueInput) (req *request.Request, output *CreateGameSessionQueueOutput) { - op := &request.Operation{ - Name: opCreateGameSessionQueue, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateGameSessionQueueInput{} - } - - output = &CreateGameSessionQueueOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateGameSessionQueue API operation for Amazon GameLift. -// -// Establishes a new queue for processing requests to place new game sessions. -// A queue identifies where new game sessions can be hosted -- by specifying -// a list of destinations (fleets or aliases) -- and how long requests can wait -// in the queue before timing out. You can set up a queue to try to place game -// sessions on fleets in multiple regions. To add placement requests to a queue, -// call StartGameSessionPlacement and reference the queue name. -// -// Destination order. When processing a request for a game session, Amazon GameLift -// tries each destination in order until it finds one with available resources -// to host the new game session. A queue's default order is determined by how -// destinations are listed. The default order is overridden when a game session -// placement request provides player latency information. Player latency information -// enables Amazon GameLift to prioritize destinations where players report the -// lowest average latency, as a result placing the new game session where the -// majority of players will have the best possible gameplay experience. -// -// Player latency policies. For placement requests containing player latency -// information, use player latency policies to protect individual players from -// very high latencies. With a latency cap, even when a destination can deliver -// a low latency for most players, the game is not placed where any individual -// player is reporting latency higher than a policy's maximum. A queue can have -// multiple latency policies, which are enforced consecutively starting with -// the policy with the lowest latency cap. Use multiple policies to gradually -// relax latency controls; for example, you might set a policy with a low latency -// cap for the first 60 seconds, a second policy with a higher cap for the next -// 60 seconds, etc. -// -// To create a new queue, provide a name, timeout value, a list of destinations -// and, if desired, a set of latency policies. If successful, a new queue object -// is returned. -// -// Queue-related operations include: -// -// * CreateGameSessionQueue -// -// * DescribeGameSessionQueues -// -// * UpdateGameSessionQueue -// -// * DeleteGameSessionQueue -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation CreateGameSessionQueue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested operation would cause the resource to exceed the allowed service -// limit. Resolve the issue before retrying. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateGameSessionQueue -func (c *GameLift) CreateGameSessionQueue(input *CreateGameSessionQueueInput) (*CreateGameSessionQueueOutput, error) { - req, out := c.CreateGameSessionQueueRequest(input) - return out, req.Send() -} - -// CreateGameSessionQueueWithContext is the same as CreateGameSessionQueue with the addition of -// the ability to pass a context and additional request options. -// -// See CreateGameSessionQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) CreateGameSessionQueueWithContext(ctx aws.Context, input *CreateGameSessionQueueInput, opts ...request.Option) (*CreateGameSessionQueueOutput, error) { - req, out := c.CreateGameSessionQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateMatchmakingConfiguration = "CreateMatchmakingConfiguration" - -// CreateMatchmakingConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the CreateMatchmakingConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateMatchmakingConfiguration for more information on using the CreateMatchmakingConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateMatchmakingConfigurationRequest method. -// req, resp := client.CreateMatchmakingConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateMatchmakingConfiguration -func (c *GameLift) CreateMatchmakingConfigurationRequest(input *CreateMatchmakingConfigurationInput) (req *request.Request, output *CreateMatchmakingConfigurationOutput) { - op := &request.Operation{ - Name: opCreateMatchmakingConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateMatchmakingConfigurationInput{} - } - - output = &CreateMatchmakingConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateMatchmakingConfiguration API operation for Amazon GameLift. -// -// Defines a new matchmaking configuration for use with FlexMatch. A matchmaking -// configuration sets out guidelines for matching players and getting the matches -// into games. You can set up multiple matchmaking configurations to handle -// the scenarios needed for your game. Each matchmaking ticket (StartMatchmaking -// or StartMatchBackfill) specifies a configuration for the match and provides -// player attributes to support the configuration being used. -// -// To create a matchmaking configuration, at a minimum you must specify the -// following: configuration name; a rule set that governs how to evaluate players -// and find acceptable matches; a game session queue to use when placing a new -// game session for the match; and the maximum time allowed for a matchmaking -// attempt. -// -// Player acceptance -- In each configuration, you have the option to require -// that all players accept participation in a proposed match. To enable this -// feature, set AcceptanceRequired to true and specify a time limit for player -// acceptance. Players have the option to accept or reject a proposed match, -// and a match does not move ahead to game session placement unless all matched -// players accept. -// -// Matchmaking status notification -- There are two ways to track the progress -// of matchmaking tickets: (1) polling ticket status with DescribeMatchmaking; -// or (2) receiving notifications with Amazon Simple Notification Service (SNS). -// To use notifications, you first need to set up an SNS topic to receive the -// notifications, and provide the topic ARN in the matchmaking configuration -// (see Setting up Notifications for Matchmaking (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-notification.html)). -// Since notifications promise only "best effort" delivery, we recommend calling -// DescribeMatchmaking if no notifications are received within 30 seconds. -// -// Operations related to match configurations and rule sets include: -// -// * CreateMatchmakingConfiguration -// -// * DescribeMatchmakingConfigurations -// -// * UpdateMatchmakingConfiguration -// -// * DeleteMatchmakingConfiguration -// -// * CreateMatchmakingRuleSet -// -// * DescribeMatchmakingRuleSets -// -// * ValidateMatchmakingRuleSet -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation CreateMatchmakingConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested operation would cause the resource to exceed the allowed service -// limit. Resolve the issue before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateMatchmakingConfiguration -func (c *GameLift) CreateMatchmakingConfiguration(input *CreateMatchmakingConfigurationInput) (*CreateMatchmakingConfigurationOutput, error) { - req, out := c.CreateMatchmakingConfigurationRequest(input) - return out, req.Send() -} - -// CreateMatchmakingConfigurationWithContext is the same as CreateMatchmakingConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See CreateMatchmakingConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) CreateMatchmakingConfigurationWithContext(ctx aws.Context, input *CreateMatchmakingConfigurationInput, opts ...request.Option) (*CreateMatchmakingConfigurationOutput, error) { - req, out := c.CreateMatchmakingConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateMatchmakingRuleSet = "CreateMatchmakingRuleSet" - -// CreateMatchmakingRuleSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateMatchmakingRuleSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateMatchmakingRuleSet for more information on using the CreateMatchmakingRuleSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateMatchmakingRuleSetRequest method. -// req, resp := client.CreateMatchmakingRuleSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateMatchmakingRuleSet -func (c *GameLift) CreateMatchmakingRuleSetRequest(input *CreateMatchmakingRuleSetInput) (req *request.Request, output *CreateMatchmakingRuleSetOutput) { - op := &request.Operation{ - Name: opCreateMatchmakingRuleSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateMatchmakingRuleSetInput{} - } - - output = &CreateMatchmakingRuleSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateMatchmakingRuleSet API operation for Amazon GameLift. -// -// Creates a new rule set for FlexMatch matchmaking. A rule set describes the -// type of match to create, such as the number and size of teams, and sets the -// parameters for acceptable player matches, such as minimum skill level or -// character type. Rule sets are used in matchmaking configurations, which define -// how matchmaking requests are handled. Each MatchmakingConfiguration uses -// one rule set; you can set up multiple rule sets to handle the scenarios that -// suit your game (such as for different game modes), and create a separate -// matchmaking configuration for each rule set. See additional information on -// rule set content in the MatchmakingRuleSet structure. For help creating rule -// sets, including useful examples, see the topic Adding FlexMatch to Your -// Game (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-intro.html). -// -// Once created, matchmaking rule sets cannot be changed or deleted, so we recommend -// checking the rule set syntax using ValidateMatchmakingRuleSet before creating -// the rule set. -// -// To create a matchmaking rule set, provide the set of rules and a unique name. -// Rule sets must be defined in the same region as the matchmaking configuration -// they will be used with. Rule sets cannot be edited or deleted. If you need -// to change a rule set, create a new one with the necessary edits and then -// update matchmaking configurations to use the new rule set. -// -// Operations related to match configurations and rule sets include: -// -// * CreateMatchmakingConfiguration -// -// * DescribeMatchmakingConfigurations -// -// * UpdateMatchmakingConfiguration -// -// * DeleteMatchmakingConfiguration -// -// * CreateMatchmakingRuleSet -// -// * DescribeMatchmakingRuleSets -// -// * ValidateMatchmakingRuleSet -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation CreateMatchmakingRuleSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateMatchmakingRuleSet -func (c *GameLift) CreateMatchmakingRuleSet(input *CreateMatchmakingRuleSetInput) (*CreateMatchmakingRuleSetOutput, error) { - req, out := c.CreateMatchmakingRuleSetRequest(input) - return out, req.Send() -} - -// CreateMatchmakingRuleSetWithContext is the same as CreateMatchmakingRuleSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateMatchmakingRuleSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) CreateMatchmakingRuleSetWithContext(ctx aws.Context, input *CreateMatchmakingRuleSetInput, opts ...request.Option) (*CreateMatchmakingRuleSetOutput, error) { - req, out := c.CreateMatchmakingRuleSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePlayerSession = "CreatePlayerSession" - -// CreatePlayerSessionRequest generates a "aws/request.Request" representing the -// client's request for the CreatePlayerSession operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePlayerSession for more information on using the CreatePlayerSession -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePlayerSessionRequest method. -// req, resp := client.CreatePlayerSessionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreatePlayerSession -func (c *GameLift) CreatePlayerSessionRequest(input *CreatePlayerSessionInput) (req *request.Request, output *CreatePlayerSessionOutput) { - op := &request.Operation{ - Name: opCreatePlayerSession, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePlayerSessionInput{} - } - - output = &CreatePlayerSessionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePlayerSession API operation for Amazon GameLift. -// -// Adds a player to a game session and creates a player session record. Before -// a player can be added, a game session must have an ACTIVE status, have a -// creation policy of ALLOW_ALL, and have an open player slot. To add a group -// of players to a game session, use CreatePlayerSessions. -// -// To create a player session, specify a game session ID, player ID, and optionally -// a string of player data. If successful, the player is added to the game session -// and a new PlayerSession object is returned. Player sessions cannot be updated. -// -// Available in Amazon GameLift Local. -// -// Player-session-related operations include: -// -// * CreatePlayerSession -// -// * CreatePlayerSessions -// -// * DescribePlayerSessions -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation CreatePlayerSession for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidGameSessionStatusException "InvalidGameSessionStatusException" -// The requested operation would cause a conflict with the current state of -// a resource associated with the request and/or the game instance. Resolve -// the conflict before retrying. -// -// * ErrCodeGameSessionFullException "GameSessionFullException" -// The game instance is currently full and cannot allow the requested player(s) -// to join. Clients can retry such requests immediately or after a waiting period. -// -// * ErrCodeTerminalRoutingStrategyException "TerminalRoutingStrategyException" -// The service is unable to resolve the routing for a particular alias because -// it has a terminal RoutingStrategy associated with it. The message returned -// in this exception is the message defined in the routing strategy itself. -// Such requests should only be retried if the routing strategy for the specified -// alias is modified. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreatePlayerSession -func (c *GameLift) CreatePlayerSession(input *CreatePlayerSessionInput) (*CreatePlayerSessionOutput, error) { - req, out := c.CreatePlayerSessionRequest(input) - return out, req.Send() -} - -// CreatePlayerSessionWithContext is the same as CreatePlayerSession with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePlayerSession for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) CreatePlayerSessionWithContext(ctx aws.Context, input *CreatePlayerSessionInput, opts ...request.Option) (*CreatePlayerSessionOutput, error) { - req, out := c.CreatePlayerSessionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePlayerSessions = "CreatePlayerSessions" - -// CreatePlayerSessionsRequest generates a "aws/request.Request" representing the -// client's request for the CreatePlayerSessions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePlayerSessions for more information on using the CreatePlayerSessions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePlayerSessionsRequest method. -// req, resp := client.CreatePlayerSessionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreatePlayerSessions -func (c *GameLift) CreatePlayerSessionsRequest(input *CreatePlayerSessionsInput) (req *request.Request, output *CreatePlayerSessionsOutput) { - op := &request.Operation{ - Name: opCreatePlayerSessions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePlayerSessionsInput{} - } - - output = &CreatePlayerSessionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePlayerSessions API operation for Amazon GameLift. -// -// Adds a group of players to a game session. This action is useful with a team -// matching feature. Before players can be added, a game session must have an -// ACTIVE status, have a creation policy of ALLOW_ALL, and have an open player -// slot. To add a single player to a game session, use CreatePlayerSession. -// -// To create player sessions, specify a game session ID, a list of player IDs, -// and optionally a set of player data strings. If successful, the players are -// added to the game session and a set of new PlayerSession objects is returned. -// Player sessions cannot be updated. -// -// Available in Amazon GameLift Local. -// -// Player-session-related operations include: -// -// * CreatePlayerSession -// -// * CreatePlayerSessions -// -// * DescribePlayerSessions -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation CreatePlayerSessions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidGameSessionStatusException "InvalidGameSessionStatusException" -// The requested operation would cause a conflict with the current state of -// a resource associated with the request and/or the game instance. Resolve -// the conflict before retrying. -// -// * ErrCodeGameSessionFullException "GameSessionFullException" -// The game instance is currently full and cannot allow the requested player(s) -// to join. Clients can retry such requests immediately or after a waiting period. -// -// * ErrCodeTerminalRoutingStrategyException "TerminalRoutingStrategyException" -// The service is unable to resolve the routing for a particular alias because -// it has a terminal RoutingStrategy associated with it. The message returned -// in this exception is the message defined in the routing strategy itself. -// Such requests should only be retried if the routing strategy for the specified -// alias is modified. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreatePlayerSessions -func (c *GameLift) CreatePlayerSessions(input *CreatePlayerSessionsInput) (*CreatePlayerSessionsOutput, error) { - req, out := c.CreatePlayerSessionsRequest(input) - return out, req.Send() -} - -// CreatePlayerSessionsWithContext is the same as CreatePlayerSessions with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePlayerSessions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) CreatePlayerSessionsWithContext(ctx aws.Context, input *CreatePlayerSessionsInput, opts ...request.Option) (*CreatePlayerSessionsOutput, error) { - req, out := c.CreatePlayerSessionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVpcPeeringAuthorization = "CreateVpcPeeringAuthorization" - -// CreateVpcPeeringAuthorizationRequest generates a "aws/request.Request" representing the -// client's request for the CreateVpcPeeringAuthorization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVpcPeeringAuthorization for more information on using the CreateVpcPeeringAuthorization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVpcPeeringAuthorizationRequest method. -// req, resp := client.CreateVpcPeeringAuthorizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateVpcPeeringAuthorization -func (c *GameLift) CreateVpcPeeringAuthorizationRequest(input *CreateVpcPeeringAuthorizationInput) (req *request.Request, output *CreateVpcPeeringAuthorizationOutput) { - op := &request.Operation{ - Name: opCreateVpcPeeringAuthorization, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateVpcPeeringAuthorizationInput{} - } - - output = &CreateVpcPeeringAuthorizationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVpcPeeringAuthorization API operation for Amazon GameLift. -// -// Requests authorization to create or delete a peer connection between the -// VPC for your Amazon GameLift fleet and a virtual private cloud (VPC) in your -// AWS account. VPC peering enables the game servers on your fleet to communicate -// directly with other AWS resources. Once you've received authorization, call -// CreateVpcPeeringConnection to establish the peering connection. For more -// information, see VPC Peering with Amazon GameLift Fleets (http://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html). -// -// You can peer with VPCs that are owned by any AWS account you have access -// to, including the account that you use to manage your Amazon GameLift fleets. -// You cannot peer with VPCs that are in different regions. -// -// To request authorization to create a connection, call this operation from -// the AWS account with the VPC that you want to peer to your Amazon GameLift -// fleet. For example, to enable your game servers to retrieve data from a DynamoDB -// table, use the account that manages that DynamoDB resource. Identify the -// following values: (1) The ID of the VPC that you want to peer with, and (2) -// the ID of the AWS account that you use to manage Amazon GameLift. If successful, -// VPC peering is authorized for the specified VPC. -// -// To request authorization to delete a connection, call this operation from -// the AWS account with the VPC that is peered with your Amazon GameLift fleet. -// Identify the following values: (1) VPC ID that you want to delete the peering -// connection for, and (2) ID of the AWS account that you use to manage Amazon -// GameLift. -// -// The authorization remains valid for 24 hours unless it is canceled by a call -// to DeleteVpcPeeringAuthorization. You must create or delete the peering connection -// while the authorization is valid. -// -// VPC peering connection operations include: -// -// * CreateVpcPeeringAuthorization -// -// * DescribeVpcPeeringAuthorizations -// -// * DeleteVpcPeeringAuthorization -// -// * CreateVpcPeeringConnection -// -// * DescribeVpcPeeringConnections -// -// * DeleteVpcPeeringConnection -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation CreateVpcPeeringAuthorization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateVpcPeeringAuthorization -func (c *GameLift) CreateVpcPeeringAuthorization(input *CreateVpcPeeringAuthorizationInput) (*CreateVpcPeeringAuthorizationOutput, error) { - req, out := c.CreateVpcPeeringAuthorizationRequest(input) - return out, req.Send() -} - -// CreateVpcPeeringAuthorizationWithContext is the same as CreateVpcPeeringAuthorization with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVpcPeeringAuthorization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) CreateVpcPeeringAuthorizationWithContext(ctx aws.Context, input *CreateVpcPeeringAuthorizationInput, opts ...request.Option) (*CreateVpcPeeringAuthorizationOutput, error) { - req, out := c.CreateVpcPeeringAuthorizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection" - -// CreateVpcPeeringConnectionRequest generates a "aws/request.Request" representing the -// client's request for the CreateVpcPeeringConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVpcPeeringConnection for more information on using the CreateVpcPeeringConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVpcPeeringConnectionRequest method. -// req, resp := client.CreateVpcPeeringConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateVpcPeeringConnection -func (c *GameLift) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConnectionInput) (req *request.Request, output *CreateVpcPeeringConnectionOutput) { - op := &request.Operation{ - Name: opCreateVpcPeeringConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateVpcPeeringConnectionInput{} - } - - output = &CreateVpcPeeringConnectionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateVpcPeeringConnection API operation for Amazon GameLift. -// -// Establishes a VPC peering connection between a virtual private cloud (VPC) -// in an AWS account with the VPC for your Amazon GameLift fleet. VPC peering -// enables the game servers on your fleet to communicate directly with other -// AWS resources. You can peer with VPCs in any AWS account that you have access -// to, including the account that you use to manage your Amazon GameLift fleets. -// You cannot peer with VPCs that are in different regions. For more information, -// see VPC Peering with Amazon GameLift Fleets (http://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html). -// -// Before calling this operation to establish the peering connection, you first -// need to call CreateVpcPeeringAuthorization and identify the VPC you want -// to peer with. Once the authorization for the specified VPC is issued, you -// have 24 hours to establish the connection. These two operations handle all -// tasks necessary to peer the two VPCs, including acceptance, updating routing -// tables, etc. -// -// To establish the connection, call this operation from the AWS account that -// is used to manage the Amazon GameLift fleets. Identify the following values: -// (1) The ID of the fleet you want to be enable a VPC peering connection for; -// (2) The AWS account with the VPC that you want to peer with; and (3) The -// ID of the VPC you want to peer with. This operation is asynchronous. If successful, -// a VpcPeeringConnection request is created. You can use continuous polling -// to track the request's status using DescribeVpcPeeringConnections, or by -// monitoring fleet events for success or failure using DescribeFleetEvents. -// -// VPC peering connection operations include: -// -// * CreateVpcPeeringAuthorization -// -// * DescribeVpcPeeringAuthorizations -// -// * DeleteVpcPeeringAuthorization -// -// * CreateVpcPeeringConnection -// -// * DescribeVpcPeeringConnections -// -// * DeleteVpcPeeringConnection -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation CreateVpcPeeringConnection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateVpcPeeringConnection -func (c *GameLift) CreateVpcPeeringConnection(input *CreateVpcPeeringConnectionInput) (*CreateVpcPeeringConnectionOutput, error) { - req, out := c.CreateVpcPeeringConnectionRequest(input) - return out, req.Send() -} - -// CreateVpcPeeringConnectionWithContext is the same as CreateVpcPeeringConnection with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVpcPeeringConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) CreateVpcPeeringConnectionWithContext(ctx aws.Context, input *CreateVpcPeeringConnectionInput, opts ...request.Option) (*CreateVpcPeeringConnectionOutput, error) { - req, out := c.CreateVpcPeeringConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAlias = "DeleteAlias" - -// DeleteAliasRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAlias for more information on using the DeleteAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAliasRequest method. -// req, resp := client.DeleteAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteAlias -func (c *GameLift) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, output *DeleteAliasOutput) { - op := &request.Operation{ - Name: opDeleteAlias, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAliasInput{} - } - - output = &DeleteAliasOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAlias API operation for Amazon GameLift. -// -// Deletes an alias. This action removes all record of the alias. Game clients -// attempting to access a server process using the deleted alias receive an -// error. To delete an alias, specify the alias ID to be deleted. -// -// Alias-related operations include: -// -// * CreateAlias -// -// * ListAliases -// -// * DescribeAlias -// -// * UpdateAlias -// -// * DeleteAlias -// -// * ResolveAlias -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DeleteAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteAlias -func (c *GameLift) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) { - req, out := c.DeleteAliasRequest(input) - return out, req.Send() -} - -// DeleteAliasWithContext is the same as DeleteAlias with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DeleteAliasWithContext(ctx aws.Context, input *DeleteAliasInput, opts ...request.Option) (*DeleteAliasOutput, error) { - req, out := c.DeleteAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBuild = "DeleteBuild" - -// DeleteBuildRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBuild operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBuild for more information on using the DeleteBuild -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBuildRequest method. -// req, resp := client.DeleteBuildRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteBuild -func (c *GameLift) DeleteBuildRequest(input *DeleteBuildInput) (req *request.Request, output *DeleteBuildOutput) { - op := &request.Operation{ - Name: opDeleteBuild, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteBuildInput{} - } - - output = &DeleteBuildOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBuild API operation for Amazon GameLift. -// -// Deletes a build. This action permanently deletes the build record and any -// uploaded build files. -// -// To delete a build, specify its ID. Deleting a build does not affect the status -// of any active fleets using the build, but you can no longer create new fleets -// with the deleted build. -// -// Build-related operations include: -// -// * CreateBuild -// -// * ListBuilds -// -// * DescribeBuild -// -// * UpdateBuild -// -// * DeleteBuild -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DeleteBuild for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteBuild -func (c *GameLift) DeleteBuild(input *DeleteBuildInput) (*DeleteBuildOutput, error) { - req, out := c.DeleteBuildRequest(input) - return out, req.Send() -} - -// DeleteBuildWithContext is the same as DeleteBuild with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBuild for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DeleteBuildWithContext(ctx aws.Context, input *DeleteBuildInput, opts ...request.Option) (*DeleteBuildOutput, error) { - req, out := c.DeleteBuildRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFleet = "DeleteFleet" - -// DeleteFleetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFleet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFleet for more information on using the DeleteFleet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFleetRequest method. -// req, resp := client.DeleteFleetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteFleet -func (c *GameLift) DeleteFleetRequest(input *DeleteFleetInput) (req *request.Request, output *DeleteFleetOutput) { - op := &request.Operation{ - Name: opDeleteFleet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteFleetInput{} - } - - output = &DeleteFleetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteFleet API operation for Amazon GameLift. -// -// Deletes everything related to a fleet. Before deleting a fleet, you must -// set the fleet's desired capacity to zero. See UpdateFleetCapacity. -// -// This action removes the fleet's resources and the fleet record. Once a fleet -// is deleted, you can no longer use that fleet. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DeleteFleet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidFleetStatusException "InvalidFleetStatusException" -// The requested operation would cause a conflict with the current state of -// a resource associated with the request and/or the fleet. Resolve the conflict -// before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteFleet -func (c *GameLift) DeleteFleet(input *DeleteFleetInput) (*DeleteFleetOutput, error) { - req, out := c.DeleteFleetRequest(input) - return out, req.Send() -} - -// DeleteFleetWithContext is the same as DeleteFleet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFleet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DeleteFleetWithContext(ctx aws.Context, input *DeleteFleetInput, opts ...request.Option) (*DeleteFleetOutput, error) { - req, out := c.DeleteFleetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteGameSessionQueue = "DeleteGameSessionQueue" - -// DeleteGameSessionQueueRequest generates a "aws/request.Request" representing the -// client's request for the DeleteGameSessionQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteGameSessionQueue for more information on using the DeleteGameSessionQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteGameSessionQueueRequest method. -// req, resp := client.DeleteGameSessionQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteGameSessionQueue -func (c *GameLift) DeleteGameSessionQueueRequest(input *DeleteGameSessionQueueInput) (req *request.Request, output *DeleteGameSessionQueueOutput) { - op := &request.Operation{ - Name: opDeleteGameSessionQueue, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteGameSessionQueueInput{} - } - - output = &DeleteGameSessionQueueOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteGameSessionQueue API operation for Amazon GameLift. -// -// Deletes a game session queue. This action means that any StartGameSessionPlacement -// requests that reference this queue will fail. To delete a queue, specify -// the queue name. -// -// Queue-related operations include: -// -// * CreateGameSessionQueue -// -// * DescribeGameSessionQueues -// -// * UpdateGameSessionQueue -// -// * DeleteGameSessionQueue -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DeleteGameSessionQueue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteGameSessionQueue -func (c *GameLift) DeleteGameSessionQueue(input *DeleteGameSessionQueueInput) (*DeleteGameSessionQueueOutput, error) { - req, out := c.DeleteGameSessionQueueRequest(input) - return out, req.Send() -} - -// DeleteGameSessionQueueWithContext is the same as DeleteGameSessionQueue with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteGameSessionQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DeleteGameSessionQueueWithContext(ctx aws.Context, input *DeleteGameSessionQueueInput, opts ...request.Option) (*DeleteGameSessionQueueOutput, error) { - req, out := c.DeleteGameSessionQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteMatchmakingConfiguration = "DeleteMatchmakingConfiguration" - -// DeleteMatchmakingConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMatchmakingConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteMatchmakingConfiguration for more information on using the DeleteMatchmakingConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteMatchmakingConfigurationRequest method. -// req, resp := client.DeleteMatchmakingConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteMatchmakingConfiguration -func (c *GameLift) DeleteMatchmakingConfigurationRequest(input *DeleteMatchmakingConfigurationInput) (req *request.Request, output *DeleteMatchmakingConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteMatchmakingConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteMatchmakingConfigurationInput{} - } - - output = &DeleteMatchmakingConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteMatchmakingConfiguration API operation for Amazon GameLift. -// -// Permanently removes a FlexMatch matchmaking configuration. To delete, specify -// the configuration name. A matchmaking configuration cannot be deleted if -// it is being used in any active matchmaking tickets. -// -// Operations related to match configurations and rule sets include: -// -// * CreateMatchmakingConfiguration -// -// * DescribeMatchmakingConfigurations -// -// * UpdateMatchmakingConfiguration -// -// * DeleteMatchmakingConfiguration -// -// * CreateMatchmakingRuleSet -// -// * DescribeMatchmakingRuleSets -// -// * ValidateMatchmakingRuleSet -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DeleteMatchmakingConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteMatchmakingConfiguration -func (c *GameLift) DeleteMatchmakingConfiguration(input *DeleteMatchmakingConfigurationInput) (*DeleteMatchmakingConfigurationOutput, error) { - req, out := c.DeleteMatchmakingConfigurationRequest(input) - return out, req.Send() -} - -// DeleteMatchmakingConfigurationWithContext is the same as DeleteMatchmakingConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteMatchmakingConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DeleteMatchmakingConfigurationWithContext(ctx aws.Context, input *DeleteMatchmakingConfigurationInput, opts ...request.Option) (*DeleteMatchmakingConfigurationOutput, error) { - req, out := c.DeleteMatchmakingConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteScalingPolicy = "DeleteScalingPolicy" - -// DeleteScalingPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteScalingPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteScalingPolicy for more information on using the DeleteScalingPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteScalingPolicyRequest method. -// req, resp := client.DeleteScalingPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteScalingPolicy -func (c *GameLift) DeleteScalingPolicyRequest(input *DeleteScalingPolicyInput) (req *request.Request, output *DeleteScalingPolicyOutput) { - op := &request.Operation{ - Name: opDeleteScalingPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteScalingPolicyInput{} - } - - output = &DeleteScalingPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteScalingPolicy API operation for Amazon GameLift. -// -// Deletes a fleet scaling policy. This action means that the policy is no longer -// in force and removes all record of it. To delete a scaling policy, specify -// both the scaling policy name and the fleet ID it is associated with. -// -// To temporarily suspend scaling policies, call StopFleetActions. This operation -// suspends all policies for the fleet. -// -// Operations related to fleet capacity scaling include: -// -// * DescribeFleetCapacity -// -// * UpdateFleetCapacity -// -// * DescribeEC2InstanceLimits -// -// * Manage scaling policies: -// -// PutScalingPolicy (auto-scaling) -// -// DescribeScalingPolicies (auto-scaling) -// -// DeleteScalingPolicy (auto-scaling) -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DeleteScalingPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteScalingPolicy -func (c *GameLift) DeleteScalingPolicy(input *DeleteScalingPolicyInput) (*DeleteScalingPolicyOutput, error) { - req, out := c.DeleteScalingPolicyRequest(input) - return out, req.Send() -} - -// DeleteScalingPolicyWithContext is the same as DeleteScalingPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteScalingPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DeleteScalingPolicyWithContext(ctx aws.Context, input *DeleteScalingPolicyInput, opts ...request.Option) (*DeleteScalingPolicyOutput, error) { - req, out := c.DeleteScalingPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVpcPeeringAuthorization = "DeleteVpcPeeringAuthorization" - -// DeleteVpcPeeringAuthorizationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVpcPeeringAuthorization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVpcPeeringAuthorization for more information on using the DeleteVpcPeeringAuthorization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVpcPeeringAuthorizationRequest method. -// req, resp := client.DeleteVpcPeeringAuthorizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteVpcPeeringAuthorization -func (c *GameLift) DeleteVpcPeeringAuthorizationRequest(input *DeleteVpcPeeringAuthorizationInput) (req *request.Request, output *DeleteVpcPeeringAuthorizationOutput) { - op := &request.Operation{ - Name: opDeleteVpcPeeringAuthorization, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVpcPeeringAuthorizationInput{} - } - - output = &DeleteVpcPeeringAuthorizationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVpcPeeringAuthorization API operation for Amazon GameLift. -// -// Cancels a pending VPC peering authorization for the specified VPC. If the -// authorization has already been used to create a peering connection, call -// DeleteVpcPeeringConnection to remove the connection. -// -// VPC peering connection operations include: -// -// * CreateVpcPeeringAuthorization -// -// * DescribeVpcPeeringAuthorizations -// -// * DeleteVpcPeeringAuthorization -// -// * CreateVpcPeeringConnection -// -// * DescribeVpcPeeringConnections -// -// * DeleteVpcPeeringConnection -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DeleteVpcPeeringAuthorization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteVpcPeeringAuthorization -func (c *GameLift) DeleteVpcPeeringAuthorization(input *DeleteVpcPeeringAuthorizationInput) (*DeleteVpcPeeringAuthorizationOutput, error) { - req, out := c.DeleteVpcPeeringAuthorizationRequest(input) - return out, req.Send() -} - -// DeleteVpcPeeringAuthorizationWithContext is the same as DeleteVpcPeeringAuthorization with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVpcPeeringAuthorization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DeleteVpcPeeringAuthorizationWithContext(ctx aws.Context, input *DeleteVpcPeeringAuthorizationInput, opts ...request.Option) (*DeleteVpcPeeringAuthorizationOutput, error) { - req, out := c.DeleteVpcPeeringAuthorizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection" - -// DeleteVpcPeeringConnectionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVpcPeeringConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVpcPeeringConnection for more information on using the DeleteVpcPeeringConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVpcPeeringConnectionRequest method. -// req, resp := client.DeleteVpcPeeringConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteVpcPeeringConnection -func (c *GameLift) DeleteVpcPeeringConnectionRequest(input *DeleteVpcPeeringConnectionInput) (req *request.Request, output *DeleteVpcPeeringConnectionOutput) { - op := &request.Operation{ - Name: opDeleteVpcPeeringConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVpcPeeringConnectionInput{} - } - - output = &DeleteVpcPeeringConnectionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVpcPeeringConnection API operation for Amazon GameLift. -// -// Removes a VPC peering connection. To delete the connection, you must have -// a valid authorization for the VPC peering connection that you want to delete. -// You can check for an authorization by calling DescribeVpcPeeringAuthorizations -// or request a new one using CreateVpcPeeringAuthorization. -// -// Once a valid authorization exists, call this operation from the AWS account -// that is used to manage the Amazon GameLift fleets. Identify the connection -// to delete by the connection ID and fleet ID. If successful, the connection -// is removed. -// -// VPC peering connection operations include: -// -// * CreateVpcPeeringAuthorization -// -// * DescribeVpcPeeringAuthorizations -// -// * DeleteVpcPeeringAuthorization -// -// * CreateVpcPeeringConnection -// -// * DescribeVpcPeeringConnections -// -// * DeleteVpcPeeringConnection -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DeleteVpcPeeringConnection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteVpcPeeringConnection -func (c *GameLift) DeleteVpcPeeringConnection(input *DeleteVpcPeeringConnectionInput) (*DeleteVpcPeeringConnectionOutput, error) { - req, out := c.DeleteVpcPeeringConnectionRequest(input) - return out, req.Send() -} - -// DeleteVpcPeeringConnectionWithContext is the same as DeleteVpcPeeringConnection with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVpcPeeringConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DeleteVpcPeeringConnectionWithContext(ctx aws.Context, input *DeleteVpcPeeringConnectionInput, opts ...request.Option) (*DeleteVpcPeeringConnectionOutput, error) { - req, out := c.DeleteVpcPeeringConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAlias = "DescribeAlias" - -// DescribeAliasRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAlias for more information on using the DescribeAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAliasRequest method. -// req, resp := client.DescribeAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeAlias -func (c *GameLift) DescribeAliasRequest(input *DescribeAliasInput) (req *request.Request, output *DescribeAliasOutput) { - op := &request.Operation{ - Name: opDescribeAlias, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAliasInput{} - } - - output = &DescribeAliasOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAlias API operation for Amazon GameLift. -// -// Retrieves properties for an alias. This operation returns all alias metadata -// and settings. To get an alias's target fleet ID only, use ResolveAlias. -// -// To get alias properties, specify the alias ID. If successful, the requested -// alias record is returned. -// -// Alias-related operations include: -// -// * CreateAlias -// -// * ListAliases -// -// * DescribeAlias -// -// * UpdateAlias -// -// * DeleteAlias -// -// * ResolveAlias -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeAlias -func (c *GameLift) DescribeAlias(input *DescribeAliasInput) (*DescribeAliasOutput, error) { - req, out := c.DescribeAliasRequest(input) - return out, req.Send() -} - -// DescribeAliasWithContext is the same as DescribeAlias with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeAliasWithContext(ctx aws.Context, input *DescribeAliasInput, opts ...request.Option) (*DescribeAliasOutput, error) { - req, out := c.DescribeAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeBuild = "DescribeBuild" - -// DescribeBuildRequest generates a "aws/request.Request" representing the -// client's request for the DescribeBuild operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeBuild for more information on using the DescribeBuild -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeBuildRequest method. -// req, resp := client.DescribeBuildRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeBuild -func (c *GameLift) DescribeBuildRequest(input *DescribeBuildInput) (req *request.Request, output *DescribeBuildOutput) { - op := &request.Operation{ - Name: opDescribeBuild, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeBuildInput{} - } - - output = &DescribeBuildOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeBuild API operation for Amazon GameLift. -// -// Retrieves properties for a build. To request a build record, specify a build -// ID. If successful, an object containing the build properties is returned. -// -// Build-related operations include: -// -// * CreateBuild -// -// * ListBuilds -// -// * DescribeBuild -// -// * UpdateBuild -// -// * DeleteBuild -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeBuild for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeBuild -func (c *GameLift) DescribeBuild(input *DescribeBuildInput) (*DescribeBuildOutput, error) { - req, out := c.DescribeBuildRequest(input) - return out, req.Send() -} - -// DescribeBuildWithContext is the same as DescribeBuild with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeBuild for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeBuildWithContext(ctx aws.Context, input *DescribeBuildInput, opts ...request.Option) (*DescribeBuildOutput, error) { - req, out := c.DescribeBuildRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEC2InstanceLimits = "DescribeEC2InstanceLimits" - -// DescribeEC2InstanceLimitsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEC2InstanceLimits operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEC2InstanceLimits for more information on using the DescribeEC2InstanceLimits -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEC2InstanceLimitsRequest method. -// req, resp := client.DescribeEC2InstanceLimitsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeEC2InstanceLimits -func (c *GameLift) DescribeEC2InstanceLimitsRequest(input *DescribeEC2InstanceLimitsInput) (req *request.Request, output *DescribeEC2InstanceLimitsOutput) { - op := &request.Operation{ - Name: opDescribeEC2InstanceLimits, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEC2InstanceLimitsInput{} - } - - output = &DescribeEC2InstanceLimitsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEC2InstanceLimits API operation for Amazon GameLift. -// -// Retrieves the following information for the specified EC2 instance type: -// -// * maximum number of instances allowed per AWS account (service limit) -// -// * current usage level for the AWS account -// -// Service limits vary depending on region. Available regions for Amazon GameLift -// can be found in the AWS Management Console for Amazon GameLift (see the drop-down -// list in the upper right corner). -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeEC2InstanceLimits for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeEC2InstanceLimits -func (c *GameLift) DescribeEC2InstanceLimits(input *DescribeEC2InstanceLimitsInput) (*DescribeEC2InstanceLimitsOutput, error) { - req, out := c.DescribeEC2InstanceLimitsRequest(input) - return out, req.Send() -} - -// DescribeEC2InstanceLimitsWithContext is the same as DescribeEC2InstanceLimits with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEC2InstanceLimits for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeEC2InstanceLimitsWithContext(ctx aws.Context, input *DescribeEC2InstanceLimitsInput, opts ...request.Option) (*DescribeEC2InstanceLimitsOutput, error) { - req, out := c.DescribeEC2InstanceLimitsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFleetAttributes = "DescribeFleetAttributes" - -// DescribeFleetAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFleetAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFleetAttributes for more information on using the DescribeFleetAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFleetAttributesRequest method. -// req, resp := client.DescribeFleetAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeFleetAttributes -func (c *GameLift) DescribeFleetAttributesRequest(input *DescribeFleetAttributesInput) (req *request.Request, output *DescribeFleetAttributesOutput) { - op := &request.Operation{ - Name: opDescribeFleetAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeFleetAttributesInput{} - } - - output = &DescribeFleetAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFleetAttributes API operation for Amazon GameLift. -// -// Retrieves fleet properties, including metadata, status, and configuration, -// for one or more fleets. You can request attributes for all fleets, or specify -// a list of one or more fleet IDs. When requesting multiple fleets, use the -// pagination parameters to retrieve results as a set of sequential pages. If -// successful, a FleetAttributes object is returned for each requested fleet -// ID. When specifying a list of fleet IDs, attribute objects are returned only -// for fleets that currently exist. -// -// Some API actions may limit the number of fleet IDs allowed in one request. -// If a request exceeds this limit, the request fails and the error message -// includes the maximum allowed. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeFleetAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeFleetAttributes -func (c *GameLift) DescribeFleetAttributes(input *DescribeFleetAttributesInput) (*DescribeFleetAttributesOutput, error) { - req, out := c.DescribeFleetAttributesRequest(input) - return out, req.Send() -} - -// DescribeFleetAttributesWithContext is the same as DescribeFleetAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFleetAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeFleetAttributesWithContext(ctx aws.Context, input *DescribeFleetAttributesInput, opts ...request.Option) (*DescribeFleetAttributesOutput, error) { - req, out := c.DescribeFleetAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFleetCapacity = "DescribeFleetCapacity" - -// DescribeFleetCapacityRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFleetCapacity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFleetCapacity for more information on using the DescribeFleetCapacity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFleetCapacityRequest method. -// req, resp := client.DescribeFleetCapacityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeFleetCapacity -func (c *GameLift) DescribeFleetCapacityRequest(input *DescribeFleetCapacityInput) (req *request.Request, output *DescribeFleetCapacityOutput) { - op := &request.Operation{ - Name: opDescribeFleetCapacity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeFleetCapacityInput{} - } - - output = &DescribeFleetCapacityOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFleetCapacity API operation for Amazon GameLift. -// -// Retrieves the current status of fleet capacity for one or more fleets. This -// information includes the number of instances that have been requested for -// the fleet and the number currently active. You can request capacity for all -// fleets, or specify a list of one or more fleet IDs. When requesting multiple -// fleets, use the pagination parameters to retrieve results as a set of sequential -// pages. If successful, a FleetCapacity object is returned for each requested -// fleet ID. When specifying a list of fleet IDs, attribute objects are returned -// only for fleets that currently exist. -// -// Some API actions may limit the number of fleet IDs allowed in one request. -// If a request exceeds this limit, the request fails and the error message -// includes the maximum allowed. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeFleetCapacity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeFleetCapacity -func (c *GameLift) DescribeFleetCapacity(input *DescribeFleetCapacityInput) (*DescribeFleetCapacityOutput, error) { - req, out := c.DescribeFleetCapacityRequest(input) - return out, req.Send() -} - -// DescribeFleetCapacityWithContext is the same as DescribeFleetCapacity with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFleetCapacity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeFleetCapacityWithContext(ctx aws.Context, input *DescribeFleetCapacityInput, opts ...request.Option) (*DescribeFleetCapacityOutput, error) { - req, out := c.DescribeFleetCapacityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFleetEvents = "DescribeFleetEvents" - -// DescribeFleetEventsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFleetEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFleetEvents for more information on using the DescribeFleetEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFleetEventsRequest method. -// req, resp := client.DescribeFleetEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeFleetEvents -func (c *GameLift) DescribeFleetEventsRequest(input *DescribeFleetEventsInput) (req *request.Request, output *DescribeFleetEventsOutput) { - op := &request.Operation{ - Name: opDescribeFleetEvents, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeFleetEventsInput{} - } - - output = &DescribeFleetEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFleetEvents API operation for Amazon GameLift. -// -// Retrieves entries from the specified fleet's event log. You can specify a -// time range to limit the result set. Use the pagination parameters to retrieve -// results as a set of sequential pages. If successful, a collection of event -// log entries matching the request are returned. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeFleetEvents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeFleetEvents -func (c *GameLift) DescribeFleetEvents(input *DescribeFleetEventsInput) (*DescribeFleetEventsOutput, error) { - req, out := c.DescribeFleetEventsRequest(input) - return out, req.Send() -} - -// DescribeFleetEventsWithContext is the same as DescribeFleetEvents with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFleetEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeFleetEventsWithContext(ctx aws.Context, input *DescribeFleetEventsInput, opts ...request.Option) (*DescribeFleetEventsOutput, error) { - req, out := c.DescribeFleetEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFleetPortSettings = "DescribeFleetPortSettings" - -// DescribeFleetPortSettingsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFleetPortSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFleetPortSettings for more information on using the DescribeFleetPortSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFleetPortSettingsRequest method. -// req, resp := client.DescribeFleetPortSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeFleetPortSettings -func (c *GameLift) DescribeFleetPortSettingsRequest(input *DescribeFleetPortSettingsInput) (req *request.Request, output *DescribeFleetPortSettingsOutput) { - op := &request.Operation{ - Name: opDescribeFleetPortSettings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeFleetPortSettingsInput{} - } - - output = &DescribeFleetPortSettingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFleetPortSettings API operation for Amazon GameLift. -// -// Retrieves the inbound connection permissions for a fleet. Connection permissions -// include a range of IP addresses and port settings that incoming traffic can -// use to access server processes in the fleet. To get a fleet's inbound connection -// permissions, specify a fleet ID. If successful, a collection of IpPermission -// objects is returned for the requested fleet ID. If the requested fleet has -// been deleted, the result set is empty. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeFleetPortSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeFleetPortSettings -func (c *GameLift) DescribeFleetPortSettings(input *DescribeFleetPortSettingsInput) (*DescribeFleetPortSettingsOutput, error) { - req, out := c.DescribeFleetPortSettingsRequest(input) - return out, req.Send() -} - -// DescribeFleetPortSettingsWithContext is the same as DescribeFleetPortSettings with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFleetPortSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeFleetPortSettingsWithContext(ctx aws.Context, input *DescribeFleetPortSettingsInput, opts ...request.Option) (*DescribeFleetPortSettingsOutput, error) { - req, out := c.DescribeFleetPortSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFleetUtilization = "DescribeFleetUtilization" - -// DescribeFleetUtilizationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFleetUtilization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFleetUtilization for more information on using the DescribeFleetUtilization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFleetUtilizationRequest method. -// req, resp := client.DescribeFleetUtilizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeFleetUtilization -func (c *GameLift) DescribeFleetUtilizationRequest(input *DescribeFleetUtilizationInput) (req *request.Request, output *DescribeFleetUtilizationOutput) { - op := &request.Operation{ - Name: opDescribeFleetUtilization, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeFleetUtilizationInput{} - } - - output = &DescribeFleetUtilizationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFleetUtilization API operation for Amazon GameLift. -// -// Retrieves utilization statistics for one or more fleets. You can request -// utilization data for all fleets, or specify a list of one or more fleet IDs. -// When requesting multiple fleets, use the pagination parameters to retrieve -// results as a set of sequential pages. If successful, a FleetUtilization object -// is returned for each requested fleet ID. When specifying a list of fleet -// IDs, utilization objects are returned only for fleets that currently exist. -// -// Some API actions may limit the number of fleet IDs allowed in one request. -// If a request exceeds this limit, the request fails and the error message -// includes the maximum allowed. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeFleetUtilization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeFleetUtilization -func (c *GameLift) DescribeFleetUtilization(input *DescribeFleetUtilizationInput) (*DescribeFleetUtilizationOutput, error) { - req, out := c.DescribeFleetUtilizationRequest(input) - return out, req.Send() -} - -// DescribeFleetUtilizationWithContext is the same as DescribeFleetUtilization with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFleetUtilization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeFleetUtilizationWithContext(ctx aws.Context, input *DescribeFleetUtilizationInput, opts ...request.Option) (*DescribeFleetUtilizationOutput, error) { - req, out := c.DescribeFleetUtilizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeGameSessionDetails = "DescribeGameSessionDetails" - -// DescribeGameSessionDetailsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeGameSessionDetails operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeGameSessionDetails for more information on using the DescribeGameSessionDetails -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeGameSessionDetailsRequest method. -// req, resp := client.DescribeGameSessionDetailsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeGameSessionDetails -func (c *GameLift) DescribeGameSessionDetailsRequest(input *DescribeGameSessionDetailsInput) (req *request.Request, output *DescribeGameSessionDetailsOutput) { - op := &request.Operation{ - Name: opDescribeGameSessionDetails, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeGameSessionDetailsInput{} - } - - output = &DescribeGameSessionDetailsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeGameSessionDetails API operation for Amazon GameLift. -// -// Retrieves properties, including the protection policy in force, for one or -// more game sessions. This action can be used in several ways: (1) provide -// a GameSessionId or GameSessionArn to request details for a specific game -// session; (2) provide either a FleetId or an AliasId to request properties -// for all game sessions running on a fleet. -// -// To get game session record(s), specify just one of the following: game session -// ID, fleet ID, or alias ID. You can filter this request by game session status. -// Use the pagination parameters to retrieve results as a set of sequential -// pages. If successful, a GameSessionDetail object is returned for each session -// matching the request. -// -// Game-session-related operations include: -// -// * CreateGameSession -// -// * DescribeGameSessions -// -// * DescribeGameSessionDetails -// -// * SearchGameSessions -// -// * UpdateGameSession -// -// * GetGameSessionLogUrl -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeGameSessionDetails for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeTerminalRoutingStrategyException "TerminalRoutingStrategyException" -// The service is unable to resolve the routing for a particular alias because -// it has a terminal RoutingStrategy associated with it. The message returned -// in this exception is the message defined in the routing strategy itself. -// Such requests should only be retried if the routing strategy for the specified -// alias is modified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeGameSessionDetails -func (c *GameLift) DescribeGameSessionDetails(input *DescribeGameSessionDetailsInput) (*DescribeGameSessionDetailsOutput, error) { - req, out := c.DescribeGameSessionDetailsRequest(input) - return out, req.Send() -} - -// DescribeGameSessionDetailsWithContext is the same as DescribeGameSessionDetails with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeGameSessionDetails for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeGameSessionDetailsWithContext(ctx aws.Context, input *DescribeGameSessionDetailsInput, opts ...request.Option) (*DescribeGameSessionDetailsOutput, error) { - req, out := c.DescribeGameSessionDetailsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeGameSessionPlacement = "DescribeGameSessionPlacement" - -// DescribeGameSessionPlacementRequest generates a "aws/request.Request" representing the -// client's request for the DescribeGameSessionPlacement operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeGameSessionPlacement for more information on using the DescribeGameSessionPlacement -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeGameSessionPlacementRequest method. -// req, resp := client.DescribeGameSessionPlacementRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeGameSessionPlacement -func (c *GameLift) DescribeGameSessionPlacementRequest(input *DescribeGameSessionPlacementInput) (req *request.Request, output *DescribeGameSessionPlacementOutput) { - op := &request.Operation{ - Name: opDescribeGameSessionPlacement, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeGameSessionPlacementInput{} - } - - output = &DescribeGameSessionPlacementOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeGameSessionPlacement API operation for Amazon GameLift. -// -// Retrieves properties and current status of a game session placement request. -// To get game session placement details, specify the placement ID. If successful, -// a GameSessionPlacement object is returned. -// -// Game-session-related operations include: -// -// * CreateGameSession -// -// * DescribeGameSessions -// -// * DescribeGameSessionDetails -// -// * SearchGameSessions -// -// * UpdateGameSession -// -// * GetGameSessionLogUrl -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeGameSessionPlacement for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeGameSessionPlacement -func (c *GameLift) DescribeGameSessionPlacement(input *DescribeGameSessionPlacementInput) (*DescribeGameSessionPlacementOutput, error) { - req, out := c.DescribeGameSessionPlacementRequest(input) - return out, req.Send() -} - -// DescribeGameSessionPlacementWithContext is the same as DescribeGameSessionPlacement with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeGameSessionPlacement for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeGameSessionPlacementWithContext(ctx aws.Context, input *DescribeGameSessionPlacementInput, opts ...request.Option) (*DescribeGameSessionPlacementOutput, error) { - req, out := c.DescribeGameSessionPlacementRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeGameSessionQueues = "DescribeGameSessionQueues" - -// DescribeGameSessionQueuesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeGameSessionQueues operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeGameSessionQueues for more information on using the DescribeGameSessionQueues -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeGameSessionQueuesRequest method. -// req, resp := client.DescribeGameSessionQueuesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeGameSessionQueues -func (c *GameLift) DescribeGameSessionQueuesRequest(input *DescribeGameSessionQueuesInput) (req *request.Request, output *DescribeGameSessionQueuesOutput) { - op := &request.Operation{ - Name: opDescribeGameSessionQueues, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeGameSessionQueuesInput{} - } - - output = &DescribeGameSessionQueuesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeGameSessionQueues API operation for Amazon GameLift. -// -// Retrieves the properties for one or more game session queues. When requesting -// multiple queues, use the pagination parameters to retrieve results as a set -// of sequential pages. If successful, a GameSessionQueue object is returned -// for each requested queue. When specifying a list of queues, objects are returned -// only for queues that currently exist in the region. -// -// Queue-related operations include: -// -// * CreateGameSessionQueue -// -// * DescribeGameSessionQueues -// -// * UpdateGameSessionQueue -// -// * DeleteGameSessionQueue -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeGameSessionQueues for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeGameSessionQueues -func (c *GameLift) DescribeGameSessionQueues(input *DescribeGameSessionQueuesInput) (*DescribeGameSessionQueuesOutput, error) { - req, out := c.DescribeGameSessionQueuesRequest(input) - return out, req.Send() -} - -// DescribeGameSessionQueuesWithContext is the same as DescribeGameSessionQueues with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeGameSessionQueues for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeGameSessionQueuesWithContext(ctx aws.Context, input *DescribeGameSessionQueuesInput, opts ...request.Option) (*DescribeGameSessionQueuesOutput, error) { - req, out := c.DescribeGameSessionQueuesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeGameSessions = "DescribeGameSessions" - -// DescribeGameSessionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeGameSessions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeGameSessions for more information on using the DescribeGameSessions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeGameSessionsRequest method. -// req, resp := client.DescribeGameSessionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeGameSessions -func (c *GameLift) DescribeGameSessionsRequest(input *DescribeGameSessionsInput) (req *request.Request, output *DescribeGameSessionsOutput) { - op := &request.Operation{ - Name: opDescribeGameSessions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeGameSessionsInput{} - } - - output = &DescribeGameSessionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeGameSessions API operation for Amazon GameLift. -// -// Retrieves a set of one or more game sessions. Request a specific game session -// or request all game sessions on a fleet. Alternatively, use SearchGameSessions -// to request a set of active game sessions that are filtered by certain criteria. -// To retrieve protection policy settings for game sessions, use DescribeGameSessionDetails. -// -// To get game sessions, specify one of the following: game session ID, fleet -// ID, or alias ID. You can filter this request by game session status. Use -// the pagination parameters to retrieve results as a set of sequential pages. -// If successful, a GameSession object is returned for each game session matching -// the request. -// -// Available in Amazon GameLift Local. -// -// Game-session-related operations include: -// -// * CreateGameSession -// -// * DescribeGameSessions -// -// * DescribeGameSessionDetails -// -// * SearchGameSessions -// -// * UpdateGameSession -// -// * GetGameSessionLogUrl -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeGameSessions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeTerminalRoutingStrategyException "TerminalRoutingStrategyException" -// The service is unable to resolve the routing for a particular alias because -// it has a terminal RoutingStrategy associated with it. The message returned -// in this exception is the message defined in the routing strategy itself. -// Such requests should only be retried if the routing strategy for the specified -// alias is modified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeGameSessions -func (c *GameLift) DescribeGameSessions(input *DescribeGameSessionsInput) (*DescribeGameSessionsOutput, error) { - req, out := c.DescribeGameSessionsRequest(input) - return out, req.Send() -} - -// DescribeGameSessionsWithContext is the same as DescribeGameSessions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeGameSessions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeGameSessionsWithContext(ctx aws.Context, input *DescribeGameSessionsInput, opts ...request.Option) (*DescribeGameSessionsOutput, error) { - req, out := c.DescribeGameSessionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInstances = "DescribeInstances" - -// DescribeInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInstances for more information on using the DescribeInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInstancesRequest method. -// req, resp := client.DescribeInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeInstances -func (c *GameLift) DescribeInstancesRequest(input *DescribeInstancesInput) (req *request.Request, output *DescribeInstancesOutput) { - op := &request.Operation{ - Name: opDescribeInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInstancesInput{} - } - - output = &DescribeInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInstances API operation for Amazon GameLift. -// -// Retrieves information about a fleet's instances, including instance IDs. -// Use this action to get details on all instances in the fleet or get details -// on one specific instance. -// -// To get a specific instance, specify fleet ID and instance ID. To get all -// instances in a fleet, specify a fleet ID only. Use the pagination parameters -// to retrieve results as a set of sequential pages. If successful, an Instance -// object is returned for each result. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeInstances -func (c *GameLift) DescribeInstances(input *DescribeInstancesInput) (*DescribeInstancesOutput, error) { - req, out := c.DescribeInstancesRequest(input) - return out, req.Send() -} - -// DescribeInstancesWithContext is the same as DescribeInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeInstancesWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.Option) (*DescribeInstancesOutput, error) { - req, out := c.DescribeInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMatchmaking = "DescribeMatchmaking" - -// DescribeMatchmakingRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMatchmaking operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMatchmaking for more information on using the DescribeMatchmaking -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMatchmakingRequest method. -// req, resp := client.DescribeMatchmakingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeMatchmaking -func (c *GameLift) DescribeMatchmakingRequest(input *DescribeMatchmakingInput) (req *request.Request, output *DescribeMatchmakingOutput) { - op := &request.Operation{ - Name: opDescribeMatchmaking, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMatchmakingInput{} - } - - output = &DescribeMatchmakingOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMatchmaking API operation for Amazon GameLift. -// -// Retrieves one or more matchmaking tickets. Use this operation to retrieve -// ticket information, including status and--once a successful match is made--acquire -// connection information for the resulting new game session. -// -// You can use this operation to track the progress of matchmaking requests -// (through polling) as an alternative to using event notifications. See more -// details on tracking matchmaking requests through polling or notifications -// in StartMatchmaking. -// -// To request matchmaking tickets, provide a list of up to 10 ticket IDs. If -// the request is successful, a ticket object is returned for each requested -// ID that currently exists. -// -// Matchmaking-related operations include: -// -// * StartMatchmaking -// -// * DescribeMatchmaking -// -// * StopMatchmaking -// -// * AcceptMatch -// -// * StartMatchBackfill -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeMatchmaking for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeMatchmaking -func (c *GameLift) DescribeMatchmaking(input *DescribeMatchmakingInput) (*DescribeMatchmakingOutput, error) { - req, out := c.DescribeMatchmakingRequest(input) - return out, req.Send() -} - -// DescribeMatchmakingWithContext is the same as DescribeMatchmaking with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMatchmaking for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeMatchmakingWithContext(ctx aws.Context, input *DescribeMatchmakingInput, opts ...request.Option) (*DescribeMatchmakingOutput, error) { - req, out := c.DescribeMatchmakingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMatchmakingConfigurations = "DescribeMatchmakingConfigurations" - -// DescribeMatchmakingConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMatchmakingConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMatchmakingConfigurations for more information on using the DescribeMatchmakingConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMatchmakingConfigurationsRequest method. -// req, resp := client.DescribeMatchmakingConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeMatchmakingConfigurations -func (c *GameLift) DescribeMatchmakingConfigurationsRequest(input *DescribeMatchmakingConfigurationsInput) (req *request.Request, output *DescribeMatchmakingConfigurationsOutput) { - op := &request.Operation{ - Name: opDescribeMatchmakingConfigurations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMatchmakingConfigurationsInput{} - } - - output = &DescribeMatchmakingConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMatchmakingConfigurations API operation for Amazon GameLift. -// -// Retrieves the details of FlexMatch matchmaking configurations. with this -// operation, you have the following options: (1) retrieve all existing configurations, -// (2) provide the names of one or more configurations to retrieve, or (3) retrieve -// all configurations that use a specified rule set name. When requesting multiple -// items, use the pagination parameters to retrieve results as a set of sequential -// pages. If successful, a configuration is returned for each requested name. -// When specifying a list of names, only configurations that currently exist -// are returned. -// -// Operations related to match configurations and rule sets include: -// -// * CreateMatchmakingConfiguration -// -// * DescribeMatchmakingConfigurations -// -// * UpdateMatchmakingConfiguration -// -// * DeleteMatchmakingConfiguration -// -// * CreateMatchmakingRuleSet -// -// * DescribeMatchmakingRuleSets -// -// * ValidateMatchmakingRuleSet -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeMatchmakingConfigurations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeMatchmakingConfigurations -func (c *GameLift) DescribeMatchmakingConfigurations(input *DescribeMatchmakingConfigurationsInput) (*DescribeMatchmakingConfigurationsOutput, error) { - req, out := c.DescribeMatchmakingConfigurationsRequest(input) - return out, req.Send() -} - -// DescribeMatchmakingConfigurationsWithContext is the same as DescribeMatchmakingConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMatchmakingConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeMatchmakingConfigurationsWithContext(ctx aws.Context, input *DescribeMatchmakingConfigurationsInput, opts ...request.Option) (*DescribeMatchmakingConfigurationsOutput, error) { - req, out := c.DescribeMatchmakingConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMatchmakingRuleSets = "DescribeMatchmakingRuleSets" - -// DescribeMatchmakingRuleSetsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMatchmakingRuleSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMatchmakingRuleSets for more information on using the DescribeMatchmakingRuleSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMatchmakingRuleSetsRequest method. -// req, resp := client.DescribeMatchmakingRuleSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeMatchmakingRuleSets -func (c *GameLift) DescribeMatchmakingRuleSetsRequest(input *DescribeMatchmakingRuleSetsInput) (req *request.Request, output *DescribeMatchmakingRuleSetsOutput) { - op := &request.Operation{ - Name: opDescribeMatchmakingRuleSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMatchmakingRuleSetsInput{} - } - - output = &DescribeMatchmakingRuleSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMatchmakingRuleSets API operation for Amazon GameLift. -// -// Retrieves the details for FlexMatch matchmaking rule sets. You can request -// all existing rule sets for the region, or provide a list of one or more rule -// set names. When requesting multiple items, use the pagination parameters -// to retrieve results as a set of sequential pages. If successful, a rule set -// is returned for each requested name. -// -// Operations related to match configurations and rule sets include: -// -// * CreateMatchmakingConfiguration -// -// * DescribeMatchmakingConfigurations -// -// * UpdateMatchmakingConfiguration -// -// * DeleteMatchmakingConfiguration -// -// * CreateMatchmakingRuleSet -// -// * DescribeMatchmakingRuleSets -// -// * ValidateMatchmakingRuleSet -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeMatchmakingRuleSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeMatchmakingRuleSets -func (c *GameLift) DescribeMatchmakingRuleSets(input *DescribeMatchmakingRuleSetsInput) (*DescribeMatchmakingRuleSetsOutput, error) { - req, out := c.DescribeMatchmakingRuleSetsRequest(input) - return out, req.Send() -} - -// DescribeMatchmakingRuleSetsWithContext is the same as DescribeMatchmakingRuleSets with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMatchmakingRuleSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeMatchmakingRuleSetsWithContext(ctx aws.Context, input *DescribeMatchmakingRuleSetsInput, opts ...request.Option) (*DescribeMatchmakingRuleSetsOutput, error) { - req, out := c.DescribeMatchmakingRuleSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribePlayerSessions = "DescribePlayerSessions" - -// DescribePlayerSessionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribePlayerSessions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePlayerSessions for more information on using the DescribePlayerSessions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePlayerSessionsRequest method. -// req, resp := client.DescribePlayerSessionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribePlayerSessions -func (c *GameLift) DescribePlayerSessionsRequest(input *DescribePlayerSessionsInput) (req *request.Request, output *DescribePlayerSessionsOutput) { - op := &request.Operation{ - Name: opDescribePlayerSessions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePlayerSessionsInput{} - } - - output = &DescribePlayerSessionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePlayerSessions API operation for Amazon GameLift. -// -// Retrieves properties for one or more player sessions. This action can be -// used in several ways: (1) provide a PlayerSessionId to request properties -// for a specific player session; (2) provide a GameSessionId to request properties -// for all player sessions in the specified game session; (3) provide a PlayerId -// to request properties for all player sessions of a specified player. -// -// To get game session record(s), specify only one of the following: a player -// session ID, a game session ID, or a player ID. You can filter this request -// by player session status. Use the pagination parameters to retrieve results -// as a set of sequential pages. If successful, a PlayerSession object is returned -// for each session matching the request. -// -// Available in Amazon GameLift Local. -// -// Player-session-related operations include: -// -// * CreatePlayerSession -// -// * CreatePlayerSessions -// -// * DescribePlayerSessions -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribePlayerSessions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribePlayerSessions -func (c *GameLift) DescribePlayerSessions(input *DescribePlayerSessionsInput) (*DescribePlayerSessionsOutput, error) { - req, out := c.DescribePlayerSessionsRequest(input) - return out, req.Send() -} - -// DescribePlayerSessionsWithContext is the same as DescribePlayerSessions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePlayerSessions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribePlayerSessionsWithContext(ctx aws.Context, input *DescribePlayerSessionsInput, opts ...request.Option) (*DescribePlayerSessionsOutput, error) { - req, out := c.DescribePlayerSessionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeRuntimeConfiguration = "DescribeRuntimeConfiguration" - -// DescribeRuntimeConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRuntimeConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRuntimeConfiguration for more information on using the DescribeRuntimeConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRuntimeConfigurationRequest method. -// req, resp := client.DescribeRuntimeConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeRuntimeConfiguration -func (c *GameLift) DescribeRuntimeConfigurationRequest(input *DescribeRuntimeConfigurationInput) (req *request.Request, output *DescribeRuntimeConfigurationOutput) { - op := &request.Operation{ - Name: opDescribeRuntimeConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeRuntimeConfigurationInput{} - } - - output = &DescribeRuntimeConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRuntimeConfiguration API operation for Amazon GameLift. -// -// Retrieves the current run-time configuration for the specified fleet. The -// run-time configuration tells Amazon GameLift how to launch server processes -// on instances in the fleet. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeRuntimeConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeRuntimeConfiguration -func (c *GameLift) DescribeRuntimeConfiguration(input *DescribeRuntimeConfigurationInput) (*DescribeRuntimeConfigurationOutput, error) { - req, out := c.DescribeRuntimeConfigurationRequest(input) - return out, req.Send() -} - -// DescribeRuntimeConfigurationWithContext is the same as DescribeRuntimeConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRuntimeConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeRuntimeConfigurationWithContext(ctx aws.Context, input *DescribeRuntimeConfigurationInput, opts ...request.Option) (*DescribeRuntimeConfigurationOutput, error) { - req, out := c.DescribeRuntimeConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeScalingPolicies = "DescribeScalingPolicies" - -// DescribeScalingPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeScalingPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeScalingPolicies for more information on using the DescribeScalingPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeScalingPoliciesRequest method. -// req, resp := client.DescribeScalingPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeScalingPolicies -func (c *GameLift) DescribeScalingPoliciesRequest(input *DescribeScalingPoliciesInput) (req *request.Request, output *DescribeScalingPoliciesOutput) { - op := &request.Operation{ - Name: opDescribeScalingPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeScalingPoliciesInput{} - } - - output = &DescribeScalingPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeScalingPolicies API operation for Amazon GameLift. -// -// Retrieves all scaling policies applied to a fleet. -// -// To get a fleet's scaling policies, specify the fleet ID. You can filter this -// request by policy status, such as to retrieve only active scaling policies. -// Use the pagination parameters to retrieve results as a set of sequential -// pages. If successful, set of ScalingPolicy objects is returned for the fleet. -// -// A fleet may have all of its scaling policies suspended (StopFleetActions). -// This action does not affect the status of the scaling policies, which remains -// ACTIVE. To see whether a fleet's scaling policies are in force or suspended, -// call DescribeFleetAttributes and check the stopped actions. -// -// Operations related to fleet capacity scaling include: -// -// * DescribeFleetCapacity -// -// * UpdateFleetCapacity -// -// * DescribeEC2InstanceLimits -// -// * Manage scaling policies: -// -// PutScalingPolicy (auto-scaling) -// -// DescribeScalingPolicies (auto-scaling) -// -// DeleteScalingPolicy (auto-scaling) -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeScalingPolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeScalingPolicies -func (c *GameLift) DescribeScalingPolicies(input *DescribeScalingPoliciesInput) (*DescribeScalingPoliciesOutput, error) { - req, out := c.DescribeScalingPoliciesRequest(input) - return out, req.Send() -} - -// DescribeScalingPoliciesWithContext is the same as DescribeScalingPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeScalingPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeScalingPoliciesWithContext(ctx aws.Context, input *DescribeScalingPoliciesInput, opts ...request.Option) (*DescribeScalingPoliciesOutput, error) { - req, out := c.DescribeScalingPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpcPeeringAuthorizations = "DescribeVpcPeeringAuthorizations" - -// DescribeVpcPeeringAuthorizationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpcPeeringAuthorizations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpcPeeringAuthorizations for more information on using the DescribeVpcPeeringAuthorizations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpcPeeringAuthorizationsRequest method. -// req, resp := client.DescribeVpcPeeringAuthorizationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeVpcPeeringAuthorizations -func (c *GameLift) DescribeVpcPeeringAuthorizationsRequest(input *DescribeVpcPeeringAuthorizationsInput) (req *request.Request, output *DescribeVpcPeeringAuthorizationsOutput) { - op := &request.Operation{ - Name: opDescribeVpcPeeringAuthorizations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpcPeeringAuthorizationsInput{} - } - - output = &DescribeVpcPeeringAuthorizationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpcPeeringAuthorizations API operation for Amazon GameLift. -// -// Retrieves valid VPC peering authorizations that are pending for the AWS account. -// This operation returns all VPC peering authorizations and requests for peering. -// This includes those initiated and received by this account. -// -// VPC peering connection operations include: -// -// * CreateVpcPeeringAuthorization -// -// * DescribeVpcPeeringAuthorizations -// -// * DeleteVpcPeeringAuthorization -// -// * CreateVpcPeeringConnection -// -// * DescribeVpcPeeringConnections -// -// * DeleteVpcPeeringConnection -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeVpcPeeringAuthorizations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeVpcPeeringAuthorizations -func (c *GameLift) DescribeVpcPeeringAuthorizations(input *DescribeVpcPeeringAuthorizationsInput) (*DescribeVpcPeeringAuthorizationsOutput, error) { - req, out := c.DescribeVpcPeeringAuthorizationsRequest(input) - return out, req.Send() -} - -// DescribeVpcPeeringAuthorizationsWithContext is the same as DescribeVpcPeeringAuthorizations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpcPeeringAuthorizations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeVpcPeeringAuthorizationsWithContext(ctx aws.Context, input *DescribeVpcPeeringAuthorizationsInput, opts ...request.Option) (*DescribeVpcPeeringAuthorizationsOutput, error) { - req, out := c.DescribeVpcPeeringAuthorizationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections" - -// DescribeVpcPeeringConnectionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVpcPeeringConnections operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVpcPeeringConnections for more information on using the DescribeVpcPeeringConnections -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVpcPeeringConnectionsRequest method. -// req, resp := client.DescribeVpcPeeringConnectionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeVpcPeeringConnections -func (c *GameLift) DescribeVpcPeeringConnectionsRequest(input *DescribeVpcPeeringConnectionsInput) (req *request.Request, output *DescribeVpcPeeringConnectionsOutput) { - op := &request.Operation{ - Name: opDescribeVpcPeeringConnections, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVpcPeeringConnectionsInput{} - } - - output = &DescribeVpcPeeringConnectionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVpcPeeringConnections API operation for Amazon GameLift. -// -// Retrieves information on VPC peering connections. Use this operation to get -// peering information for all fleets or for one specific fleet ID. -// -// To retrieve connection information, call this operation from the AWS account -// that is used to manage the Amazon GameLift fleets. Specify a fleet ID or -// leave the parameter empty to retrieve all connection records. If successful, -// the retrieved information includes both active and pending connections. Active -// connections identify the IpV4 CIDR block that the VPC uses to connect. -// -// VPC peering connection operations include: -// -// * CreateVpcPeeringAuthorization -// -// * DescribeVpcPeeringAuthorizations -// -// * DeleteVpcPeeringAuthorization -// -// * CreateVpcPeeringConnection -// -// * DescribeVpcPeeringConnections -// -// * DeleteVpcPeeringConnection -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation DescribeVpcPeeringConnections for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeVpcPeeringConnections -func (c *GameLift) DescribeVpcPeeringConnections(input *DescribeVpcPeeringConnectionsInput) (*DescribeVpcPeeringConnectionsOutput, error) { - req, out := c.DescribeVpcPeeringConnectionsRequest(input) - return out, req.Send() -} - -// DescribeVpcPeeringConnectionsWithContext is the same as DescribeVpcPeeringConnections with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVpcPeeringConnections for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) DescribeVpcPeeringConnectionsWithContext(ctx aws.Context, input *DescribeVpcPeeringConnectionsInput, opts ...request.Option) (*DescribeVpcPeeringConnectionsOutput, error) { - req, out := c.DescribeVpcPeeringConnectionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetGameSessionLogUrl = "GetGameSessionLogUrl" - -// GetGameSessionLogUrlRequest generates a "aws/request.Request" representing the -// client's request for the GetGameSessionLogUrl operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetGameSessionLogUrl for more information on using the GetGameSessionLogUrl -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetGameSessionLogUrlRequest method. -// req, resp := client.GetGameSessionLogUrlRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/GetGameSessionLogUrl -func (c *GameLift) GetGameSessionLogUrlRequest(input *GetGameSessionLogUrlInput) (req *request.Request, output *GetGameSessionLogUrlOutput) { - op := &request.Operation{ - Name: opGetGameSessionLogUrl, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetGameSessionLogUrlInput{} - } - - output = &GetGameSessionLogUrlOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGameSessionLogUrl API operation for Amazon GameLift. -// -// Retrieves the location of stored game session logs for a specified game session. -// When a game session is terminated, Amazon GameLift automatically stores the -// logs in Amazon S3 and retains them for 14 days. Use this URL to download -// the logs. -// -// See the AWS Service Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_gamelift) -// page for maximum log file sizes. Log files that exceed this limit are not -// saved. -// -// Game-session-related operations include: -// -// * CreateGameSession -// -// * DescribeGameSessions -// -// * DescribeGameSessionDetails -// -// * SearchGameSessions -// -// * UpdateGameSession -// -// * GetGameSessionLogUrl -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation GetGameSessionLogUrl for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/GetGameSessionLogUrl -func (c *GameLift) GetGameSessionLogUrl(input *GetGameSessionLogUrlInput) (*GetGameSessionLogUrlOutput, error) { - req, out := c.GetGameSessionLogUrlRequest(input) - return out, req.Send() -} - -// GetGameSessionLogUrlWithContext is the same as GetGameSessionLogUrl with the addition of -// the ability to pass a context and additional request options. -// -// See GetGameSessionLogUrl for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) GetGameSessionLogUrlWithContext(ctx aws.Context, input *GetGameSessionLogUrlInput, opts ...request.Option) (*GetGameSessionLogUrlOutput, error) { - req, out := c.GetGameSessionLogUrlRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInstanceAccess = "GetInstanceAccess" - -// GetInstanceAccessRequest generates a "aws/request.Request" representing the -// client's request for the GetInstanceAccess operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInstanceAccess for more information on using the GetInstanceAccess -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInstanceAccessRequest method. -// req, resp := client.GetInstanceAccessRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/GetInstanceAccess -func (c *GameLift) GetInstanceAccessRequest(input *GetInstanceAccessInput) (req *request.Request, output *GetInstanceAccessOutput) { - op := &request.Operation{ - Name: opGetInstanceAccess, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInstanceAccessInput{} - } - - output = &GetInstanceAccessOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInstanceAccess API operation for Amazon GameLift. -// -// Requests remote access to a fleet instance. Remote access is useful for debugging, -// gathering benchmarking data, or watching activity in real time. -// -// Access requires credentials that match the operating system of the instance. -// For a Windows instance, Amazon GameLift returns a user name and password -// as strings for use with a Windows Remote Desktop client. For a Linux instance, -// Amazon GameLift returns a user name and RSA private key, also as strings, -// for use with an SSH client. The private key must be saved in the proper format -// to a .pem file before using. If you're making this request using the AWS -// CLI, saving the secret can be handled as part of the GetInstanceAccess request. -// (See the example later in this topic). For more information on remote access, -// see Remotely Accessing an Instance (http://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-remote-access.html). -// -// To request access to a specific instance, specify the IDs of the instance -// and the fleet it belongs to. If successful, an InstanceAccess object is returned -// containing the instance's IP address and a set of credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation GetInstanceAccess for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/GetInstanceAccess -func (c *GameLift) GetInstanceAccess(input *GetInstanceAccessInput) (*GetInstanceAccessOutput, error) { - req, out := c.GetInstanceAccessRequest(input) - return out, req.Send() -} - -// GetInstanceAccessWithContext is the same as GetInstanceAccess with the addition of -// the ability to pass a context and additional request options. -// -// See GetInstanceAccess for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) GetInstanceAccessWithContext(ctx aws.Context, input *GetInstanceAccessInput, opts ...request.Option) (*GetInstanceAccessOutput, error) { - req, out := c.GetInstanceAccessRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAliases = "ListAliases" - -// ListAliasesRequest generates a "aws/request.Request" representing the -// client's request for the ListAliases operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAliases for more information on using the ListAliases -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAliasesRequest method. -// req, resp := client.ListAliasesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListAliases -func (c *GameLift) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, output *ListAliasesOutput) { - op := &request.Operation{ - Name: opListAliases, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListAliasesInput{} - } - - output = &ListAliasesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAliases API operation for Amazon GameLift. -// -// Retrieves all aliases for this AWS account. You can filter the result set -// by alias name and/or routing strategy type. Use the pagination parameters -// to retrieve results in sequential pages. -// -// Returned aliases are not listed in any particular order. -// -// Alias-related operations include: -// -// * CreateAlias -// -// * ListAliases -// -// * DescribeAlias -// -// * UpdateAlias -// -// * DeleteAlias -// -// * ResolveAlias -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation ListAliases for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListAliases -func (c *GameLift) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) { - req, out := c.ListAliasesRequest(input) - return out, req.Send() -} - -// ListAliasesWithContext is the same as ListAliases with the addition of -// the ability to pass a context and additional request options. -// -// See ListAliases for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) ListAliasesWithContext(ctx aws.Context, input *ListAliasesInput, opts ...request.Option) (*ListAliasesOutput, error) { - req, out := c.ListAliasesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListBuilds = "ListBuilds" - -// ListBuildsRequest generates a "aws/request.Request" representing the -// client's request for the ListBuilds operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListBuilds for more information on using the ListBuilds -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListBuildsRequest method. -// req, resp := client.ListBuildsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListBuilds -func (c *GameLift) ListBuildsRequest(input *ListBuildsInput) (req *request.Request, output *ListBuildsOutput) { - op := &request.Operation{ - Name: opListBuilds, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListBuildsInput{} - } - - output = &ListBuildsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBuilds API operation for Amazon GameLift. -// -// Retrieves build records for all builds associated with the AWS account in -// use. You can limit results to builds that are in a specific status by using -// the Status parameter. Use the pagination parameters to retrieve results in -// a set of sequential pages. -// -// Build records are not listed in any particular order. -// -// Build-related operations include: -// -// * CreateBuild -// -// * ListBuilds -// -// * DescribeBuild -// -// * UpdateBuild -// -// * DeleteBuild -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation ListBuilds for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListBuilds -func (c *GameLift) ListBuilds(input *ListBuildsInput) (*ListBuildsOutput, error) { - req, out := c.ListBuildsRequest(input) - return out, req.Send() -} - -// ListBuildsWithContext is the same as ListBuilds with the addition of -// the ability to pass a context and additional request options. -// -// See ListBuilds for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) ListBuildsWithContext(ctx aws.Context, input *ListBuildsInput, opts ...request.Option) (*ListBuildsOutput, error) { - req, out := c.ListBuildsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListFleets = "ListFleets" - -// ListFleetsRequest generates a "aws/request.Request" representing the -// client's request for the ListFleets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListFleets for more information on using the ListFleets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListFleetsRequest method. -// req, resp := client.ListFleetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListFleets -func (c *GameLift) ListFleetsRequest(input *ListFleetsInput) (req *request.Request, output *ListFleetsOutput) { - op := &request.Operation{ - Name: opListFleets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListFleetsInput{} - } - - output = &ListFleetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListFleets API operation for Amazon GameLift. -// -// Retrieves a collection of fleet records for this AWS account. You can filter -// the result set by build ID. Use the pagination parameters to retrieve results -// in sequential pages. -// -// Fleet records are not listed in any particular order. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation ListFleets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListFleets -func (c *GameLift) ListFleets(input *ListFleetsInput) (*ListFleetsOutput, error) { - req, out := c.ListFleetsRequest(input) - return out, req.Send() -} - -// ListFleetsWithContext is the same as ListFleets with the addition of -// the ability to pass a context and additional request options. -// -// See ListFleets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) ListFleetsWithContext(ctx aws.Context, input *ListFleetsInput, opts ...request.Option) (*ListFleetsOutput, error) { - req, out := c.ListFleetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutScalingPolicy = "PutScalingPolicy" - -// PutScalingPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutScalingPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutScalingPolicy for more information on using the PutScalingPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutScalingPolicyRequest method. -// req, resp := client.PutScalingPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/PutScalingPolicy -func (c *GameLift) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req *request.Request, output *PutScalingPolicyOutput) { - op := &request.Operation{ - Name: opPutScalingPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutScalingPolicyInput{} - } - - output = &PutScalingPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutScalingPolicy API operation for Amazon GameLift. -// -// Creates or updates a scaling policy for a fleet. Scaling policies are used -// to automatically scale a fleet's hosting capacity to meet player demand. -// An active scaling policy instructs Amazon GameLift to track a fleet metric -// and automatically change the fleet's capacity when a certain threshold is -// reached. There are two types of scaling policies: target-based and rule-based. -// Use a target-based policy to quickly and efficiently manage fleet scaling; -// this option is the most commonly used. Use rule-based policies when you need -// to exert fine-grained control over auto-scaling. -// -// Fleets can have multiple scaling policies of each type in force at the same -// time; you can have one target-based policy, one or multiple rule-based scaling -// policies, or both. We recommend caution, however, because multiple auto-scaling -// policies can have unintended consequences. -// -// You can temporarily suspend all scaling policies for a fleet by calling StopFleetActions -// with the fleet action AUTO_SCALING. To resume scaling policies, call StartFleetActions -// with the same fleet action. To stop just one scaling policy--or to permanently -// remove it, you must delete the policy with DeleteScalingPolicy. -// -// Learn more about how to work with auto-scaling in Set Up Fleet Automatic -// Scaling (http://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-autoscaling.html). -// -// Target-based policy -// -// A target-based policy tracks a single metric: PercentAvailableGameSessions. -// This metric tells us how much of a fleet's hosting capacity is ready to host -// game sessions but is not currently in use. This is the fleet's buffer; it -// measures the additional player demand that the fleet could handle at current -// capacity. With a target-based policy, you set your ideal buffer size and -// leave it to Amazon GameLift to take whatever action is needed to maintain -// that target. -// -// For example, you might choose to maintain a 10% buffer for a fleet that has -// the capacity to host 100 simultaneous game sessions. This policy tells Amazon -// GameLift to take action whenever the fleet's available capacity falls below -// or rises above 10 game sessions. Amazon GameLift will start new instances -// or stop unused instances in order to return to the 10% buffer. -// -// To create or update a target-based policy, specify a fleet ID and name, and -// set the policy type to "TargetBased". Specify the metric to track (PercentAvailableGameSessions) -// and reference a TargetConfiguration object with your desired buffer value. -// Exclude all other parameters. On a successful request, the policy name is -// returned. The scaling policy is automatically in force as soon as it's successfully -// created. If the fleet's auto-scaling actions are temporarily suspended, the -// new policy will be in force once the fleet actions are restarted. -// -// Rule-based policy -// -// A rule-based policy tracks specified fleet metric, sets a threshold value, -// and specifies the type of action to initiate when triggered. With a rule-based -// policy, you can select from several available fleet metrics. Each policy -// specifies whether to scale up or scale down (and by how much), so you need -// one policy for each type of action. -// -// For example, a policy may make the following statement: "If the percentage -// of idle instances is greater than 20% for more than 15 minutes, then reduce -// the fleet capacity by 10%." -// -// A policy's rule statement has the following structure: -// -// If [MetricName] is [ComparisonOperator][Threshold] for [EvaluationPeriods] -// minutes, then [ScalingAdjustmentType] to/by [ScalingAdjustment]. -// -// To implement the example, the rule statement would look like this: -// -// If [PercentIdleInstances] is [GreaterThanThreshold][20] for [15] minutes, -// then [PercentChangeInCapacity] to/by [10]. -// -// To create or update a scaling policy, specify a unique combination of name -// and fleet ID, and set the policy type to "RuleBased". Specify the parameter -// values for a policy rule statement. On a successful request, the policy name -// is returned. Scaling policies are automatically in force as soon as they're -// successfully created. If the fleet's auto-scaling actions are temporarily -// suspended, the new policy will be in force once the fleet actions are restarted. -// -// Operations related to fleet capacity scaling include: -// -// * DescribeFleetCapacity -// -// * UpdateFleetCapacity -// -// * DescribeEC2InstanceLimits -// -// * Manage scaling policies: -// -// PutScalingPolicy (auto-scaling) -// -// DescribeScalingPolicies (auto-scaling) -// -// DeleteScalingPolicy (auto-scaling) -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation PutScalingPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/PutScalingPolicy -func (c *GameLift) PutScalingPolicy(input *PutScalingPolicyInput) (*PutScalingPolicyOutput, error) { - req, out := c.PutScalingPolicyRequest(input) - return out, req.Send() -} - -// PutScalingPolicyWithContext is the same as PutScalingPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutScalingPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) PutScalingPolicyWithContext(ctx aws.Context, input *PutScalingPolicyInput, opts ...request.Option) (*PutScalingPolicyOutput, error) { - req, out := c.PutScalingPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRequestUploadCredentials = "RequestUploadCredentials" - -// RequestUploadCredentialsRequest generates a "aws/request.Request" representing the -// client's request for the RequestUploadCredentials operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RequestUploadCredentials for more information on using the RequestUploadCredentials -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RequestUploadCredentialsRequest method. -// req, resp := client.RequestUploadCredentialsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/RequestUploadCredentials -func (c *GameLift) RequestUploadCredentialsRequest(input *RequestUploadCredentialsInput) (req *request.Request, output *RequestUploadCredentialsOutput) { - op := &request.Operation{ - Name: opRequestUploadCredentials, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RequestUploadCredentialsInput{} - } - - output = &RequestUploadCredentialsOutput{} - req = c.newRequest(op, input, output) - return -} - -// RequestUploadCredentials API operation for Amazon GameLift. -// -// Retrieves a fresh set of credentials for use when uploading a new set of -// game build files to Amazon GameLift's Amazon S3. This is done as part of -// the build creation process; see CreateBuild. -// -// To request new credentials, specify the build ID as returned with an initial -// CreateBuild request. If successful, a new set of credentials are returned, -// along with the S3 storage location associated with the build ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation RequestUploadCredentials for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/RequestUploadCredentials -func (c *GameLift) RequestUploadCredentials(input *RequestUploadCredentialsInput) (*RequestUploadCredentialsOutput, error) { - req, out := c.RequestUploadCredentialsRequest(input) - return out, req.Send() -} - -// RequestUploadCredentialsWithContext is the same as RequestUploadCredentials with the addition of -// the ability to pass a context and additional request options. -// -// See RequestUploadCredentials for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) RequestUploadCredentialsWithContext(ctx aws.Context, input *RequestUploadCredentialsInput, opts ...request.Option) (*RequestUploadCredentialsOutput, error) { - req, out := c.RequestUploadCredentialsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResolveAlias = "ResolveAlias" - -// ResolveAliasRequest generates a "aws/request.Request" representing the -// client's request for the ResolveAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResolveAlias for more information on using the ResolveAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResolveAliasRequest method. -// req, resp := client.ResolveAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ResolveAlias -func (c *GameLift) ResolveAliasRequest(input *ResolveAliasInput) (req *request.Request, output *ResolveAliasOutput) { - op := &request.Operation{ - Name: opResolveAlias, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResolveAliasInput{} - } - - output = &ResolveAliasOutput{} - req = c.newRequest(op, input, output) - return -} - -// ResolveAlias API operation for Amazon GameLift. -// -// Retrieves the fleet ID that a specified alias is currently pointing to. -// -// Alias-related operations include: -// -// * CreateAlias -// -// * ListAliases -// -// * DescribeAlias -// -// * UpdateAlias -// -// * DeleteAlias -// -// * ResolveAlias -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation ResolveAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeTerminalRoutingStrategyException "TerminalRoutingStrategyException" -// The service is unable to resolve the routing for a particular alias because -// it has a terminal RoutingStrategy associated with it. The message returned -// in this exception is the message defined in the routing strategy itself. -// Such requests should only be retried if the routing strategy for the specified -// alias is modified. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ResolveAlias -func (c *GameLift) ResolveAlias(input *ResolveAliasInput) (*ResolveAliasOutput, error) { - req, out := c.ResolveAliasRequest(input) - return out, req.Send() -} - -// ResolveAliasWithContext is the same as ResolveAlias with the addition of -// the ability to pass a context and additional request options. -// -// See ResolveAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) ResolveAliasWithContext(ctx aws.Context, input *ResolveAliasInput, opts ...request.Option) (*ResolveAliasOutput, error) { - req, out := c.ResolveAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSearchGameSessions = "SearchGameSessions" - -// SearchGameSessionsRequest generates a "aws/request.Request" representing the -// client's request for the SearchGameSessions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SearchGameSessions for more information on using the SearchGameSessions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SearchGameSessionsRequest method. -// req, resp := client.SearchGameSessionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/SearchGameSessions -func (c *GameLift) SearchGameSessionsRequest(input *SearchGameSessionsInput) (req *request.Request, output *SearchGameSessionsOutput) { - op := &request.Operation{ - Name: opSearchGameSessions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SearchGameSessionsInput{} - } - - output = &SearchGameSessionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// SearchGameSessions API operation for Amazon GameLift. -// -// Retrieves all active game sessions that match a set of search criteria and -// sorts them in a specified order. You can search or sort by the following -// game session attributes: -// -// * gameSessionId -- Unique identifier for the game session. You can use -// either a GameSessionId or GameSessionArn value. -// -// * gameSessionName -- Name assigned to a game session. This value is set -// when requesting a new game session with CreateGameSession or updating -// with UpdateGameSession. Game session names do not need to be unique to -// a game session. -// -// * gameSessionProperties -- Custom data defined in a game session's GameProperty -// parameter. GameProperty values are stored as key:value pairs; the filter -// expression must indicate the key and a string to search the data values -// for. For example, to search for game sessions with custom data containing -// the key:value pair "gameMode:brawl", specify the following: gameSessionProperties.gameMode -// = "brawl". All custom data values are searched as strings. -// -// * maximumSessions -- Maximum number of player sessions allowed for a game -// session. This value is set when requesting a new game session with CreateGameSession -// or updating with UpdateGameSession. -// -// * creationTimeMillis -- Value indicating when a game session was created. -// It is expressed in Unix time as milliseconds. -// -// * playerSessionCount -- Number of players currently connected to a game -// session. This value changes rapidly as players join the session or drop -// out. -// -// * hasAvailablePlayerSessions -- Boolean value indicating whether a game -// session has reached its maximum number of players. It is highly recommended -// that all search requests include this filter attribute to optimize search -// performance and return only sessions that players can join. -// -// Returned values for playerSessionCount and hasAvailablePlayerSessions change -// quickly as players join sessions and others drop out. Results should be considered -// a snapshot in time. Be sure to refresh search results often, and handle sessions -// that fill up before a player can join. -// -// To search or sort, specify either a fleet ID or an alias ID, and provide -// a search filter expression, a sort expression, or both. If successful, a -// collection of GameSession objects matching the request is returned. Use the -// pagination parameters to retrieve results as a set of sequential pages. -// -// You can search for game sessions one fleet at a time only. To find game sessions -// across multiple fleets, you must search each fleet separately and combine -// the results. This search feature finds only game sessions that are in ACTIVE -// status. To locate games in statuses other than active, use DescribeGameSessionDetails. -// -// Game-session-related operations include: -// -// * CreateGameSession -// -// * DescribeGameSessions -// -// * DescribeGameSessionDetails -// -// * SearchGameSessions -// -// * UpdateGameSession -// -// * GetGameSessionLogUrl -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation SearchGameSessions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeTerminalRoutingStrategyException "TerminalRoutingStrategyException" -// The service is unable to resolve the routing for a particular alias because -// it has a terminal RoutingStrategy associated with it. The message returned -// in this exception is the message defined in the routing strategy itself. -// Such requests should only be retried if the routing strategy for the specified -// alias is modified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/SearchGameSessions -func (c *GameLift) SearchGameSessions(input *SearchGameSessionsInput) (*SearchGameSessionsOutput, error) { - req, out := c.SearchGameSessionsRequest(input) - return out, req.Send() -} - -// SearchGameSessionsWithContext is the same as SearchGameSessions with the addition of -// the ability to pass a context and additional request options. -// -// See SearchGameSessions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) SearchGameSessionsWithContext(ctx aws.Context, input *SearchGameSessionsInput, opts ...request.Option) (*SearchGameSessionsOutput, error) { - req, out := c.SearchGameSessionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartFleetActions = "StartFleetActions" - -// StartFleetActionsRequest generates a "aws/request.Request" representing the -// client's request for the StartFleetActions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartFleetActions for more information on using the StartFleetActions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartFleetActionsRequest method. -// req, resp := client.StartFleetActionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StartFleetActions -func (c *GameLift) StartFleetActionsRequest(input *StartFleetActionsInput) (req *request.Request, output *StartFleetActionsOutput) { - op := &request.Operation{ - Name: opStartFleetActions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartFleetActionsInput{} - } - - output = &StartFleetActionsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartFleetActions API operation for Amazon GameLift. -// -// Resumes activity on a fleet that was suspended with StopFleetActions. Currently, -// this operation is used to restart a fleet's auto-scaling activity. -// -// To start fleet actions, specify the fleet ID and the type of actions to restart. -// When auto-scaling fleet actions are restarted, Amazon GameLift once again -// initiates scaling events as triggered by the fleet's scaling policies. If -// actions on the fleet were never stopped, this operation will have no effect. -// You can view a fleet's stopped actions using DescribeFleetAttributes. -// -// Operations related to fleet capacity scaling include: -// -// * DescribeFleetCapacity -// -// * UpdateFleetCapacity -// -// * DescribeEC2InstanceLimits -// -// * Manage scaling policies: -// -// PutScalingPolicy (auto-scaling) -// -// DescribeScalingPolicies (auto-scaling) -// -// DeleteScalingPolicy (auto-scaling) -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation StartFleetActions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StartFleetActions -func (c *GameLift) StartFleetActions(input *StartFleetActionsInput) (*StartFleetActionsOutput, error) { - req, out := c.StartFleetActionsRequest(input) - return out, req.Send() -} - -// StartFleetActionsWithContext is the same as StartFleetActions with the addition of -// the ability to pass a context and additional request options. -// -// See StartFleetActions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) StartFleetActionsWithContext(ctx aws.Context, input *StartFleetActionsInput, opts ...request.Option) (*StartFleetActionsOutput, error) { - req, out := c.StartFleetActionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartGameSessionPlacement = "StartGameSessionPlacement" - -// StartGameSessionPlacementRequest generates a "aws/request.Request" representing the -// client's request for the StartGameSessionPlacement operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartGameSessionPlacement for more information on using the StartGameSessionPlacement -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartGameSessionPlacementRequest method. -// req, resp := client.StartGameSessionPlacementRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StartGameSessionPlacement -func (c *GameLift) StartGameSessionPlacementRequest(input *StartGameSessionPlacementInput) (req *request.Request, output *StartGameSessionPlacementOutput) { - op := &request.Operation{ - Name: opStartGameSessionPlacement, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartGameSessionPlacementInput{} - } - - output = &StartGameSessionPlacementOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartGameSessionPlacement API operation for Amazon GameLift. -// -// Places a request for a new game session in a queue (see CreateGameSessionQueue). -// When processing a placement request, Amazon GameLift searches for available -// resources on the queue's destinations, scanning each until it finds resources -// or the placement request times out. -// -// A game session placement request can also request player sessions. When a -// new game session is successfully created, Amazon GameLift creates a player -// session for each player included in the request. -// -// When placing a game session, by default Amazon GameLift tries each fleet -// in the order they are listed in the queue configuration. Ideally, a queue's -// destinations are listed in preference order. -// -// Alternatively, when requesting a game session with players, you can also -// provide latency data for each player in relevant regions. Latency data indicates -// the performance lag a player experiences when connected to a fleet in the -// region. Amazon GameLift uses latency data to reorder the list of destinations -// to place the game session in a region with minimal lag. If latency data is -// provided for multiple players, Amazon GameLift calculates each region's average -// lag for all players and reorders to get the best game play across all players. -// -// To place a new game session request, specify the following: -// -// * The queue name and a set of game session properties and settings -// -// * A unique ID (such as a UUID) for the placement. You use this ID to track -// the status of the placement request -// -// * (Optional) A set of IDs and player data for each player you want to -// join to the new game session -// -// * Latency data for all players (if you want to optimize game play for -// the players) -// -// If successful, a new game session placement is created. -// -// To track the status of a placement request, call DescribeGameSessionPlacement -// and check the request's status. If the status is FULFILLED, a new game session -// has been created and a game session ARN and region are referenced. If the -// placement request times out, you can resubmit the request or retry it with -// a different queue. -// -// Game-session-related operations include: -// -// * CreateGameSession -// -// * DescribeGameSessions -// -// * DescribeGameSessionDetails -// -// * SearchGameSessions -// -// * UpdateGameSession -// -// * GetGameSessionLogUrl -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation StartGameSessionPlacement for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StartGameSessionPlacement -func (c *GameLift) StartGameSessionPlacement(input *StartGameSessionPlacementInput) (*StartGameSessionPlacementOutput, error) { - req, out := c.StartGameSessionPlacementRequest(input) - return out, req.Send() -} - -// StartGameSessionPlacementWithContext is the same as StartGameSessionPlacement with the addition of -// the ability to pass a context and additional request options. -// -// See StartGameSessionPlacement for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) StartGameSessionPlacementWithContext(ctx aws.Context, input *StartGameSessionPlacementInput, opts ...request.Option) (*StartGameSessionPlacementOutput, error) { - req, out := c.StartGameSessionPlacementRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartMatchBackfill = "StartMatchBackfill" - -// StartMatchBackfillRequest generates a "aws/request.Request" representing the -// client's request for the StartMatchBackfill operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartMatchBackfill for more information on using the StartMatchBackfill -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartMatchBackfillRequest method. -// req, resp := client.StartMatchBackfillRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StartMatchBackfill -func (c *GameLift) StartMatchBackfillRequest(input *StartMatchBackfillInput) (req *request.Request, output *StartMatchBackfillOutput) { - op := &request.Operation{ - Name: opStartMatchBackfill, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartMatchBackfillInput{} - } - - output = &StartMatchBackfillOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartMatchBackfill API operation for Amazon GameLift. -// -// Finds new players to fill open slots in an existing game session. This operation -// can be used to add players to matched games that start with fewer than the -// maximum number of players or to replace players when they drop out. By backfilling -// with the same matchmaker used to create the original match, you ensure that -// new players meet the match criteria and maintain a consistent experience -// throughout the game session. You can backfill a match anytime after a game -// session has been created. -// -// To request a match backfill, specify a unique ticket ID, the existing game -// session's ARN, a matchmaking configuration, and a set of data that describes -// all current players in the game session. If successful, a match backfill -// ticket is created and returned with status set to QUEUED. The ticket is placed -// in the matchmaker's ticket pool and processed. Track the status of the ticket -// to respond as needed. For more detail how to set up backfilling, see Backfill -// Existing Games with FlexMatch (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-backfill.html). -// -// The process of finding backfill matches is essentially identical to the initial -// matchmaking process. The matchmaker searches the pool and groups tickets -// together to form potential matches, allowing only one backfill ticket per -// potential match. Once the a match is formed, the matchmaker creates player -// sessions for the new players. All tickets in the match are updated with the -// game session's connection information, and the GameSession object is updated -// to include matchmaker data on the new players. For more detail on how match -// backfill requests are processed, see How Amazon GameLift FlexMatch Works -// (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-intro.html). -// -// Matchmaking-related operations include: -// -// * StartMatchmaking -// -// * DescribeMatchmaking -// -// * StopMatchmaking -// -// * AcceptMatch -// -// * StartMatchBackfill -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation StartMatchBackfill for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StartMatchBackfill -func (c *GameLift) StartMatchBackfill(input *StartMatchBackfillInput) (*StartMatchBackfillOutput, error) { - req, out := c.StartMatchBackfillRequest(input) - return out, req.Send() -} - -// StartMatchBackfillWithContext is the same as StartMatchBackfill with the addition of -// the ability to pass a context and additional request options. -// -// See StartMatchBackfill for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) StartMatchBackfillWithContext(ctx aws.Context, input *StartMatchBackfillInput, opts ...request.Option) (*StartMatchBackfillOutput, error) { - req, out := c.StartMatchBackfillRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartMatchmaking = "StartMatchmaking" - -// StartMatchmakingRequest generates a "aws/request.Request" representing the -// client's request for the StartMatchmaking operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartMatchmaking for more information on using the StartMatchmaking -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartMatchmakingRequest method. -// req, resp := client.StartMatchmakingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StartMatchmaking -func (c *GameLift) StartMatchmakingRequest(input *StartMatchmakingInput) (req *request.Request, output *StartMatchmakingOutput) { - op := &request.Operation{ - Name: opStartMatchmaking, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartMatchmakingInput{} - } - - output = &StartMatchmakingOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartMatchmaking API operation for Amazon GameLift. -// -// Uses FlexMatch to create a game match for a group of players based on custom -// matchmaking rules, and starts a new game for the matched players. Each matchmaking -// request specifies the type of match to build (team configuration, rules for -// an acceptable match, etc.). The request also specifies the players to find -// a match for and where to host the new game session for optimal performance. -// A matchmaking request might start with a single player or a group of players -// who want to play together. FlexMatch finds additional players as needed to -// fill the match. Match type, rules, and the queue used to place a new game -// session are defined in a MatchmakingConfiguration. For complete information -// on setting up and using FlexMatch, see the topic Adding FlexMatch to Your -// Game (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-intro.html). -// -// To start matchmaking, provide a unique ticket ID, specify a matchmaking configuration, -// and include the players to be matched. You must also include a set of player -// attributes relevant for the matchmaking configuration. If successful, a matchmaking -// ticket is returned with status set to QUEUED. Track the status of the ticket -// to respond as needed and acquire game session connection information for -// successfully completed matches. -// -// Tracking ticket status -- A couple of options are available for tracking -// the status of matchmaking requests: -// -// * Polling -- Call DescribeMatchmaking. This operation returns the full -// ticket object, including current status and (for completed tickets) game -// session connection info. We recommend polling no more than once every -// 10 seconds. -// -// * Notifications -- Get event notifications for changes in ticket status -// using Amazon Simple Notification Service (SNS). Notifications are easy -// to set up (see CreateMatchmakingConfiguration) and typically deliver match -// status changes faster and more efficiently than polling. We recommend -// that you use polling to back up to notifications (since delivery is not -// guaranteed) and call DescribeMatchmaking only when notifications are not -// received within 30 seconds. -// -// Processing a matchmaking request -- FlexMatch handles a matchmaking request -// as follows: -// -// Your client code submits a StartMatchmaking request for one or more players -// and tracks the status of the request ticket. -// -// FlexMatch uses this ticket and others in process to build an acceptable match. -// When a potential match is identified, all tickets in the proposed match are -// advanced to the next status. -// -// If the match requires player acceptance (set in the matchmaking configuration), -// the tickets move into status REQUIRES_ACCEPTANCE. This status triggers your -// client code to solicit acceptance from all players in every ticket involved -// in the match, and then call AcceptMatch for each player. If any player rejects -// or fails to accept the match before a specified timeout, the proposed match -// is dropped (see AcceptMatch for more details). -// -// Once a match is proposed and accepted, the matchmaking tickets move into -// status PLACING. FlexMatch locates resources for a new game session using -// the game session queue (set in the matchmaking configuration) and creates -// the game session based on the match data. -// -// When the match is successfully placed, the matchmaking tickets move into -// COMPLETED status. Connection information (including game session endpoint -// and player session) is added to the matchmaking tickets. Matched players -// can use the connection information to join the game. -// -// Matchmaking-related operations include: -// -// * StartMatchmaking -// -// * DescribeMatchmaking -// -// * StopMatchmaking -// -// * AcceptMatch -// -// * StartMatchBackfill -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation StartMatchmaking for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StartMatchmaking -func (c *GameLift) StartMatchmaking(input *StartMatchmakingInput) (*StartMatchmakingOutput, error) { - req, out := c.StartMatchmakingRequest(input) - return out, req.Send() -} - -// StartMatchmakingWithContext is the same as StartMatchmaking with the addition of -// the ability to pass a context and additional request options. -// -// See StartMatchmaking for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) StartMatchmakingWithContext(ctx aws.Context, input *StartMatchmakingInput, opts ...request.Option) (*StartMatchmakingOutput, error) { - req, out := c.StartMatchmakingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopFleetActions = "StopFleetActions" - -// StopFleetActionsRequest generates a "aws/request.Request" representing the -// client's request for the StopFleetActions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopFleetActions for more information on using the StopFleetActions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopFleetActionsRequest method. -// req, resp := client.StopFleetActionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StopFleetActions -func (c *GameLift) StopFleetActionsRequest(input *StopFleetActionsInput) (req *request.Request, output *StopFleetActionsOutput) { - op := &request.Operation{ - Name: opStopFleetActions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopFleetActionsInput{} - } - - output = &StopFleetActionsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopFleetActions API operation for Amazon GameLift. -// -// Suspends activity on a fleet. Currently, this operation is used to stop a -// fleet's auto-scaling activity. It is used to temporarily stop scaling events -// triggered by the fleet's scaling policies. The policies can be retained and -// auto-scaling activity can be restarted using StartFleetActions. You can view -// a fleet's stopped actions using DescribeFleetAttributes. -// -// To stop fleet actions, specify the fleet ID and the type of actions to suspend. -// When auto-scaling fleet actions are stopped, Amazon GameLift no longer initiates -// scaling events except to maintain the fleet's desired instances setting (FleetCapacity. -// Changes to the fleet's capacity must be done manually using UpdateFleetCapacity. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation StopFleetActions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StopFleetActions -func (c *GameLift) StopFleetActions(input *StopFleetActionsInput) (*StopFleetActionsOutput, error) { - req, out := c.StopFleetActionsRequest(input) - return out, req.Send() -} - -// StopFleetActionsWithContext is the same as StopFleetActions with the addition of -// the ability to pass a context and additional request options. -// -// See StopFleetActions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) StopFleetActionsWithContext(ctx aws.Context, input *StopFleetActionsInput, opts ...request.Option) (*StopFleetActionsOutput, error) { - req, out := c.StopFleetActionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopGameSessionPlacement = "StopGameSessionPlacement" - -// StopGameSessionPlacementRequest generates a "aws/request.Request" representing the -// client's request for the StopGameSessionPlacement operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopGameSessionPlacement for more information on using the StopGameSessionPlacement -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopGameSessionPlacementRequest method. -// req, resp := client.StopGameSessionPlacementRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StopGameSessionPlacement -func (c *GameLift) StopGameSessionPlacementRequest(input *StopGameSessionPlacementInput) (req *request.Request, output *StopGameSessionPlacementOutput) { - op := &request.Operation{ - Name: opStopGameSessionPlacement, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopGameSessionPlacementInput{} - } - - output = &StopGameSessionPlacementOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopGameSessionPlacement API operation for Amazon GameLift. -// -// Cancels a game session placement that is in PENDING status. To stop a placement, -// provide the placement ID values. If successful, the placement is moved to -// CANCELLED status. -// -// Game-session-related operations include: -// -// * CreateGameSession -// -// * DescribeGameSessions -// -// * DescribeGameSessionDetails -// -// * SearchGameSessions -// -// * UpdateGameSession -// -// * GetGameSessionLogUrl -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation StopGameSessionPlacement for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StopGameSessionPlacement -func (c *GameLift) StopGameSessionPlacement(input *StopGameSessionPlacementInput) (*StopGameSessionPlacementOutput, error) { - req, out := c.StopGameSessionPlacementRequest(input) - return out, req.Send() -} - -// StopGameSessionPlacementWithContext is the same as StopGameSessionPlacement with the addition of -// the ability to pass a context and additional request options. -// -// See StopGameSessionPlacement for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) StopGameSessionPlacementWithContext(ctx aws.Context, input *StopGameSessionPlacementInput, opts ...request.Option) (*StopGameSessionPlacementOutput, error) { - req, out := c.StopGameSessionPlacementRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopMatchmaking = "StopMatchmaking" - -// StopMatchmakingRequest generates a "aws/request.Request" representing the -// client's request for the StopMatchmaking operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopMatchmaking for more information on using the StopMatchmaking -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopMatchmakingRequest method. -// req, resp := client.StopMatchmakingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StopMatchmaking -func (c *GameLift) StopMatchmakingRequest(input *StopMatchmakingInput) (req *request.Request, output *StopMatchmakingOutput) { - op := &request.Operation{ - Name: opStopMatchmaking, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopMatchmakingInput{} - } - - output = &StopMatchmakingOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopMatchmaking API operation for Amazon GameLift. -// -// Cancels a matchmaking ticket that is currently being processed. To stop the -// matchmaking operation, specify the ticket ID. If successful, work on the -// ticket is stopped, and the ticket status is changed to CANCELLED. -// -// Matchmaking-related operations include: -// -// * StartMatchmaking -// -// * DescribeMatchmaking -// -// * StopMatchmaking -// -// * AcceptMatch -// -// * StartMatchBackfill -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation StopMatchmaking for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StopMatchmaking -func (c *GameLift) StopMatchmaking(input *StopMatchmakingInput) (*StopMatchmakingOutput, error) { - req, out := c.StopMatchmakingRequest(input) - return out, req.Send() -} - -// StopMatchmakingWithContext is the same as StopMatchmaking with the addition of -// the ability to pass a context and additional request options. -// -// See StopMatchmaking for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) StopMatchmakingWithContext(ctx aws.Context, input *StopMatchmakingInput, opts ...request.Option) (*StopMatchmakingOutput, error) { - req, out := c.StopMatchmakingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAlias = "UpdateAlias" - -// UpdateAliasRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAlias for more information on using the UpdateAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAliasRequest method. -// req, resp := client.UpdateAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateAlias -func (c *GameLift) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output *UpdateAliasOutput) { - op := &request.Operation{ - Name: opUpdateAlias, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAliasInput{} - } - - output = &UpdateAliasOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateAlias API operation for Amazon GameLift. -// -// Updates properties for an alias. To update properties, specify the alias -// ID to be updated and provide the information to be changed. To reassign an -// alias to another fleet, provide an updated routing strategy. If successful, -// the updated alias record is returned. -// -// Alias-related operations include: -// -// * CreateAlias -// -// * ListAliases -// -// * DescribeAlias -// -// * UpdateAlias -// -// * DeleteAlias -// -// * ResolveAlias -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation UpdateAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateAlias -func (c *GameLift) UpdateAlias(input *UpdateAliasInput) (*UpdateAliasOutput, error) { - req, out := c.UpdateAliasRequest(input) - return out, req.Send() -} - -// UpdateAliasWithContext is the same as UpdateAlias with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) UpdateAliasWithContext(ctx aws.Context, input *UpdateAliasInput, opts ...request.Option) (*UpdateAliasOutput, error) { - req, out := c.UpdateAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateBuild = "UpdateBuild" - -// UpdateBuildRequest generates a "aws/request.Request" representing the -// client's request for the UpdateBuild operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateBuild for more information on using the UpdateBuild -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateBuildRequest method. -// req, resp := client.UpdateBuildRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateBuild -func (c *GameLift) UpdateBuildRequest(input *UpdateBuildInput) (req *request.Request, output *UpdateBuildOutput) { - op := &request.Operation{ - Name: opUpdateBuild, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateBuildInput{} - } - - output = &UpdateBuildOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateBuild API operation for Amazon GameLift. -// -// Updates metadata in a build record, including the build name and version. -// To update the metadata, specify the build ID to update and provide the new -// values. If successful, a build object containing the updated metadata is -// returned. -// -// Build-related operations include: -// -// * CreateBuild -// -// * ListBuilds -// -// * DescribeBuild -// -// * UpdateBuild -// -// * DeleteBuild -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation UpdateBuild for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateBuild -func (c *GameLift) UpdateBuild(input *UpdateBuildInput) (*UpdateBuildOutput, error) { - req, out := c.UpdateBuildRequest(input) - return out, req.Send() -} - -// UpdateBuildWithContext is the same as UpdateBuild with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateBuild for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) UpdateBuildWithContext(ctx aws.Context, input *UpdateBuildInput, opts ...request.Option) (*UpdateBuildOutput, error) { - req, out := c.UpdateBuildRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFleetAttributes = "UpdateFleetAttributes" - -// UpdateFleetAttributesRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFleetAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFleetAttributes for more information on using the UpdateFleetAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFleetAttributesRequest method. -// req, resp := client.UpdateFleetAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateFleetAttributes -func (c *GameLift) UpdateFleetAttributesRequest(input *UpdateFleetAttributesInput) (req *request.Request, output *UpdateFleetAttributesOutput) { - op := &request.Operation{ - Name: opUpdateFleetAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateFleetAttributesInput{} - } - - output = &UpdateFleetAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFleetAttributes API operation for Amazon GameLift. -// -// Updates fleet properties, including name and description, for a fleet. To -// update metadata, specify the fleet ID and the property values that you want -// to change. If successful, the fleet ID for the updated fleet is returned. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation UpdateFleetAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. -// -// * ErrCodeInvalidFleetStatusException "InvalidFleetStatusException" -// The requested operation would cause a conflict with the current state of -// a resource associated with the request and/or the fleet. Resolve the conflict -// before retrying. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested operation would cause the resource to exceed the allowed service -// limit. Resolve the issue before retrying. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateFleetAttributes -func (c *GameLift) UpdateFleetAttributes(input *UpdateFleetAttributesInput) (*UpdateFleetAttributesOutput, error) { - req, out := c.UpdateFleetAttributesRequest(input) - return out, req.Send() -} - -// UpdateFleetAttributesWithContext is the same as UpdateFleetAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFleetAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) UpdateFleetAttributesWithContext(ctx aws.Context, input *UpdateFleetAttributesInput, opts ...request.Option) (*UpdateFleetAttributesOutput, error) { - req, out := c.UpdateFleetAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFleetCapacity = "UpdateFleetCapacity" - -// UpdateFleetCapacityRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFleetCapacity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFleetCapacity for more information on using the UpdateFleetCapacity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFleetCapacityRequest method. -// req, resp := client.UpdateFleetCapacityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateFleetCapacity -func (c *GameLift) UpdateFleetCapacityRequest(input *UpdateFleetCapacityInput) (req *request.Request, output *UpdateFleetCapacityOutput) { - op := &request.Operation{ - Name: opUpdateFleetCapacity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateFleetCapacityInput{} - } - - output = &UpdateFleetCapacityOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFleetCapacity API operation for Amazon GameLift. -// -// Updates capacity settings for a fleet. Use this action to specify the number -// of EC2 instances (hosts) that you want this fleet to contain. Before calling -// this action, you may want to call DescribeEC2InstanceLimits to get the maximum -// capacity based on the fleet's EC2 instance type. -// -// Specify minimum and maximum number of instances. Amazon GameLift will not -// change fleet capacity to values fall outside of this range. This is particularly -// important when using auto-scaling (see PutScalingPolicy) to allow capacity -// to adjust based on player demand while imposing limits on automatic adjustments. -// -// To update fleet capacity, specify the fleet ID and the number of instances -// you want the fleet to host. If successful, Amazon GameLift starts or terminates -// instances so that the fleet's active instance count matches the desired instance -// count. You can view a fleet's current capacity information by calling DescribeFleetCapacity. -// If the desired instance count is higher than the instance type's limit, the -// "Limit Exceeded" exception occurs. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation UpdateFleetCapacity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested operation would cause the resource to exceed the allowed service -// limit. Resolve the issue before retrying. -// -// * ErrCodeInvalidFleetStatusException "InvalidFleetStatusException" -// The requested operation would cause a conflict with the current state of -// a resource associated with the request and/or the fleet. Resolve the conflict -// before retrying. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateFleetCapacity -func (c *GameLift) UpdateFleetCapacity(input *UpdateFleetCapacityInput) (*UpdateFleetCapacityOutput, error) { - req, out := c.UpdateFleetCapacityRequest(input) - return out, req.Send() -} - -// UpdateFleetCapacityWithContext is the same as UpdateFleetCapacity with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFleetCapacity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) UpdateFleetCapacityWithContext(ctx aws.Context, input *UpdateFleetCapacityInput, opts ...request.Option) (*UpdateFleetCapacityOutput, error) { - req, out := c.UpdateFleetCapacityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFleetPortSettings = "UpdateFleetPortSettings" - -// UpdateFleetPortSettingsRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFleetPortSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFleetPortSettings for more information on using the UpdateFleetPortSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFleetPortSettingsRequest method. -// req, resp := client.UpdateFleetPortSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateFleetPortSettings -func (c *GameLift) UpdateFleetPortSettingsRequest(input *UpdateFleetPortSettingsInput) (req *request.Request, output *UpdateFleetPortSettingsOutput) { - op := &request.Operation{ - Name: opUpdateFleetPortSettings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateFleetPortSettingsInput{} - } - - output = &UpdateFleetPortSettingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFleetPortSettings API operation for Amazon GameLift. -// -// Updates port settings for a fleet. To update settings, specify the fleet -// ID to be updated and list the permissions you want to update. List the permissions -// you want to add in InboundPermissionAuthorizations, and permissions you want -// to remove in InboundPermissionRevocations. Permissions to be removed must -// match existing fleet permissions. If successful, the fleet ID for the updated -// fleet is returned. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation UpdateFleetPortSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. -// -// * ErrCodeInvalidFleetStatusException "InvalidFleetStatusException" -// The requested operation would cause a conflict with the current state of -// a resource associated with the request and/or the fleet. Resolve the conflict -// before retrying. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested operation would cause the resource to exceed the allowed service -// limit. Resolve the issue before retrying. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateFleetPortSettings -func (c *GameLift) UpdateFleetPortSettings(input *UpdateFleetPortSettingsInput) (*UpdateFleetPortSettingsOutput, error) { - req, out := c.UpdateFleetPortSettingsRequest(input) - return out, req.Send() -} - -// UpdateFleetPortSettingsWithContext is the same as UpdateFleetPortSettings with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFleetPortSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) UpdateFleetPortSettingsWithContext(ctx aws.Context, input *UpdateFleetPortSettingsInput, opts ...request.Option) (*UpdateFleetPortSettingsOutput, error) { - req, out := c.UpdateFleetPortSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateGameSession = "UpdateGameSession" - -// UpdateGameSessionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateGameSession operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateGameSession for more information on using the UpdateGameSession -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateGameSessionRequest method. -// req, resp := client.UpdateGameSessionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateGameSession -func (c *GameLift) UpdateGameSessionRequest(input *UpdateGameSessionInput) (req *request.Request, output *UpdateGameSessionOutput) { - op := &request.Operation{ - Name: opUpdateGameSession, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateGameSessionInput{} - } - - output = &UpdateGameSessionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateGameSession API operation for Amazon GameLift. -// -// Updates game session properties. This includes the session name, maximum -// player count, protection policy, which controls whether or not an active -// game session can be terminated during a scale-down event, and the player -// session creation policy, which controls whether or not new players can join -// the session. To update a game session, specify the game session ID and the -// values you want to change. If successful, an updated GameSession object is -// returned. -// -// Game-session-related operations include: -// -// * CreateGameSession -// -// * DescribeGameSessions -// -// * DescribeGameSessionDetails -// -// * SearchGameSessions -// -// * UpdateGameSession -// -// * GetGameSessionLogUrl -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation UpdateGameSession for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeConflictException "ConflictException" -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeInvalidGameSessionStatusException "InvalidGameSessionStatusException" -// The requested operation would cause a conflict with the current state of -// a resource associated with the request and/or the game instance. Resolve -// the conflict before retrying. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateGameSession -func (c *GameLift) UpdateGameSession(input *UpdateGameSessionInput) (*UpdateGameSessionOutput, error) { - req, out := c.UpdateGameSessionRequest(input) - return out, req.Send() -} - -// UpdateGameSessionWithContext is the same as UpdateGameSession with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateGameSession for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) UpdateGameSessionWithContext(ctx aws.Context, input *UpdateGameSessionInput, opts ...request.Option) (*UpdateGameSessionOutput, error) { - req, out := c.UpdateGameSessionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateGameSessionQueue = "UpdateGameSessionQueue" - -// UpdateGameSessionQueueRequest generates a "aws/request.Request" representing the -// client's request for the UpdateGameSessionQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateGameSessionQueue for more information on using the UpdateGameSessionQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateGameSessionQueueRequest method. -// req, resp := client.UpdateGameSessionQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateGameSessionQueue -func (c *GameLift) UpdateGameSessionQueueRequest(input *UpdateGameSessionQueueInput) (req *request.Request, output *UpdateGameSessionQueueOutput) { - op := &request.Operation{ - Name: opUpdateGameSessionQueue, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateGameSessionQueueInput{} - } - - output = &UpdateGameSessionQueueOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateGameSessionQueue API operation for Amazon GameLift. -// -// Updates settings for a game session queue, which determines how new game -// session requests in the queue are processed. To update settings, specify -// the queue name to be updated and provide the new settings. When updating -// destinations, provide a complete list of destinations. -// -// Queue-related operations include: -// -// * CreateGameSessionQueue -// -// * DescribeGameSessionQueues -// -// * UpdateGameSessionQueue -// -// * DeleteGameSessionQueue -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation UpdateGameSessionQueue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateGameSessionQueue -func (c *GameLift) UpdateGameSessionQueue(input *UpdateGameSessionQueueInput) (*UpdateGameSessionQueueOutput, error) { - req, out := c.UpdateGameSessionQueueRequest(input) - return out, req.Send() -} - -// UpdateGameSessionQueueWithContext is the same as UpdateGameSessionQueue with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateGameSessionQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) UpdateGameSessionQueueWithContext(ctx aws.Context, input *UpdateGameSessionQueueInput, opts ...request.Option) (*UpdateGameSessionQueueOutput, error) { - req, out := c.UpdateGameSessionQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateMatchmakingConfiguration = "UpdateMatchmakingConfiguration" - -// UpdateMatchmakingConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateMatchmakingConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateMatchmakingConfiguration for more information on using the UpdateMatchmakingConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateMatchmakingConfigurationRequest method. -// req, resp := client.UpdateMatchmakingConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateMatchmakingConfiguration -func (c *GameLift) UpdateMatchmakingConfigurationRequest(input *UpdateMatchmakingConfigurationInput) (req *request.Request, output *UpdateMatchmakingConfigurationOutput) { - op := &request.Operation{ - Name: opUpdateMatchmakingConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateMatchmakingConfigurationInput{} - } - - output = &UpdateMatchmakingConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateMatchmakingConfiguration API operation for Amazon GameLift. -// -// Updates settings for a FlexMatch matchmaking configuration. To update settings, -// specify the configuration name to be updated and provide the new settings. -// -// Operations related to match configurations and rule sets include: -// -// * CreateMatchmakingConfiguration -// -// * DescribeMatchmakingConfigurations -// -// * UpdateMatchmakingConfiguration -// -// * DeleteMatchmakingConfiguration -// -// * CreateMatchmakingRuleSet -// -// * DescribeMatchmakingRuleSets -// -// * ValidateMatchmakingRuleSet -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation UpdateMatchmakingConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateMatchmakingConfiguration -func (c *GameLift) UpdateMatchmakingConfiguration(input *UpdateMatchmakingConfigurationInput) (*UpdateMatchmakingConfigurationOutput, error) { - req, out := c.UpdateMatchmakingConfigurationRequest(input) - return out, req.Send() -} - -// UpdateMatchmakingConfigurationWithContext is the same as UpdateMatchmakingConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateMatchmakingConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) UpdateMatchmakingConfigurationWithContext(ctx aws.Context, input *UpdateMatchmakingConfigurationInput, opts ...request.Option) (*UpdateMatchmakingConfigurationOutput, error) { - req, out := c.UpdateMatchmakingConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRuntimeConfiguration = "UpdateRuntimeConfiguration" - -// UpdateRuntimeConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRuntimeConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRuntimeConfiguration for more information on using the UpdateRuntimeConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRuntimeConfigurationRequest method. -// req, resp := client.UpdateRuntimeConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateRuntimeConfiguration -func (c *GameLift) UpdateRuntimeConfigurationRequest(input *UpdateRuntimeConfigurationInput) (req *request.Request, output *UpdateRuntimeConfigurationOutput) { - op := &request.Operation{ - Name: opUpdateRuntimeConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRuntimeConfigurationInput{} - } - - output = &UpdateRuntimeConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRuntimeConfiguration API operation for Amazon GameLift. -// -// Updates the current run-time configuration for the specified fleet, which -// tells Amazon GameLift how to launch server processes on instances in the -// fleet. You can update a fleet's run-time configuration at any time after -// the fleet is created; it does not need to be in an ACTIVE status. -// -// To update run-time configuration, specify the fleet ID and provide a RuntimeConfiguration -// object with the updated collection of server process configurations. -// -// Each instance in a Amazon GameLift fleet checks regularly for an updated -// run-time configuration and changes how it launches server processes to comply -// with the latest version. Existing server processes are not affected by the -// update; they continue to run until they end, while Amazon GameLift simply -// adds new server processes to fit the current run-time configuration. As a -// result, the run-time configuration changes are applied gradually as existing -// processes shut down and new processes are launched in Amazon GameLift's normal -// process recycling activity. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation UpdateRuntimeConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. -// -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * ErrCodeInvalidFleetStatusException "InvalidFleetStatusException" -// The requested operation would cause a conflict with the current state of -// a resource associated with the request and/or the fleet. Resolve the conflict -// before retrying. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateRuntimeConfiguration -func (c *GameLift) UpdateRuntimeConfiguration(input *UpdateRuntimeConfigurationInput) (*UpdateRuntimeConfigurationOutput, error) { - req, out := c.UpdateRuntimeConfigurationRequest(input) - return out, req.Send() -} - -// UpdateRuntimeConfigurationWithContext is the same as UpdateRuntimeConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRuntimeConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) UpdateRuntimeConfigurationWithContext(ctx aws.Context, input *UpdateRuntimeConfigurationInput, opts ...request.Option) (*UpdateRuntimeConfigurationOutput, error) { - req, out := c.UpdateRuntimeConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opValidateMatchmakingRuleSet = "ValidateMatchmakingRuleSet" - -// ValidateMatchmakingRuleSetRequest generates a "aws/request.Request" representing the -// client's request for the ValidateMatchmakingRuleSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ValidateMatchmakingRuleSet for more information on using the ValidateMatchmakingRuleSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ValidateMatchmakingRuleSetRequest method. -// req, resp := client.ValidateMatchmakingRuleSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ValidateMatchmakingRuleSet -func (c *GameLift) ValidateMatchmakingRuleSetRequest(input *ValidateMatchmakingRuleSetInput) (req *request.Request, output *ValidateMatchmakingRuleSetOutput) { - op := &request.Operation{ - Name: opValidateMatchmakingRuleSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ValidateMatchmakingRuleSetInput{} - } - - output = &ValidateMatchmakingRuleSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// ValidateMatchmakingRuleSet API operation for Amazon GameLift. -// -// Validates the syntax of a matchmaking rule or rule set. This operation checks -// that the rule set uses syntactically correct JSON and that it conforms to -// allowed property expressions. To validate syntax, provide a rule set string. -// -// Operations related to match configurations and rule sets include: -// -// * CreateMatchmakingConfiguration -// -// * DescribeMatchmakingConfigurations -// -// * UpdateMatchmakingConfiguration -// -// * DeleteMatchmakingConfiguration -// -// * CreateMatchmakingRuleSet -// -// * DescribeMatchmakingRuleSets -// -// * ValidateMatchmakingRuleSet -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GameLift's -// API operation ValidateMatchmakingRuleSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// -// * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ValidateMatchmakingRuleSet -func (c *GameLift) ValidateMatchmakingRuleSet(input *ValidateMatchmakingRuleSetInput) (*ValidateMatchmakingRuleSetOutput, error) { - req, out := c.ValidateMatchmakingRuleSetRequest(input) - return out, req.Send() -} - -// ValidateMatchmakingRuleSetWithContext is the same as ValidateMatchmakingRuleSet with the addition of -// the ability to pass a context and additional request options. -// -// See ValidateMatchmakingRuleSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GameLift) ValidateMatchmakingRuleSetWithContext(ctx aws.Context, input *ValidateMatchmakingRuleSetInput, opts ...request.Option) (*ValidateMatchmakingRuleSetOutput, error) { - req, out := c.ValidateMatchmakingRuleSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Represents the input for a request action. -type AcceptMatchInput struct { - _ struct{} `type:"structure"` - - // Player response to the proposed match. - // - // AcceptanceType is a required field - AcceptanceType *string `type:"string" required:"true" enum:"AcceptanceType"` - - // Unique identifier for a player delivering the response. This parameter can - // include one or multiple player IDs. - // - // PlayerIds is a required field - PlayerIds []*string `type:"list" required:"true"` - - // Unique identifier for a matchmaking ticket. The ticket must be in status - // REQUIRES_ACCEPTANCE; otherwise this request will fail. - // - // TicketId is a required field - TicketId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AcceptMatchInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptMatchInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AcceptMatchInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AcceptMatchInput"} - if s.AcceptanceType == nil { - invalidParams.Add(request.NewErrParamRequired("AcceptanceType")) - } - if s.PlayerIds == nil { - invalidParams.Add(request.NewErrParamRequired("PlayerIds")) - } - if s.TicketId == nil { - invalidParams.Add(request.NewErrParamRequired("TicketId")) - } - if s.TicketId != nil && len(*s.TicketId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TicketId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptanceType sets the AcceptanceType field's value. -func (s *AcceptMatchInput) SetAcceptanceType(v string) *AcceptMatchInput { - s.AcceptanceType = &v - return s -} - -// SetPlayerIds sets the PlayerIds field's value. -func (s *AcceptMatchInput) SetPlayerIds(v []*string) *AcceptMatchInput { - s.PlayerIds = v - return s -} - -// SetTicketId sets the TicketId field's value. -func (s *AcceptMatchInput) SetTicketId(v string) *AcceptMatchInput { - s.TicketId = &v - return s -} - -type AcceptMatchOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AcceptMatchOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptMatchOutput) GoString() string { - return s.String() -} - -// Properties describing a fleet alias. -// -// Alias-related operations include: -// -// * CreateAlias -// -// * ListAliases -// -// * DescribeAlias -// -// * UpdateAlias -// -// * DeleteAlias -// -// * ResolveAlias -type Alias struct { - _ struct{} `type:"structure"` - - // Unique identifier for an alias; alias ARNs are unique across all regions. - AliasArn *string `min:"1" type:"string"` - - // Unique identifier for an alias; alias IDs are unique within a region. - AliasId *string `type:"string"` - - // Time stamp indicating when this data object was created. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp"` - - // Human-readable description of an alias. - Description *string `type:"string"` - - // Time stamp indicating when this data object was last modified. Format is - // a number expressed in Unix time as milliseconds (for example "1469498468.057"). - LastUpdatedTime *time.Time `type:"timestamp"` - - // Descriptive label that is associated with an alias. Alias names do not need - // to be unique. - Name *string `min:"1" type:"string"` - - // Alias configuration for the alias, including routing type and settings. - RoutingStrategy *RoutingStrategy `type:"structure"` -} - -// String returns the string representation -func (s Alias) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Alias) GoString() string { - return s.String() -} - -// SetAliasArn sets the AliasArn field's value. -func (s *Alias) SetAliasArn(v string) *Alias { - s.AliasArn = &v - return s -} - -// SetAliasId sets the AliasId field's value. -func (s *Alias) SetAliasId(v string) *Alias { - s.AliasId = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *Alias) SetCreationTime(v time.Time) *Alias { - s.CreationTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Alias) SetDescription(v string) *Alias { - s.Description = &v - return s -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *Alias) SetLastUpdatedTime(v time.Time) *Alias { - s.LastUpdatedTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *Alias) SetName(v string) *Alias { - s.Name = &v - return s -} - -// SetRoutingStrategy sets the RoutingStrategy field's value. -func (s *Alias) SetRoutingStrategy(v *RoutingStrategy) *Alias { - s.RoutingStrategy = v - return s -} - -// Values for use in Player attribute key:value pairs. This object lets you -// specify an attribute value using any of the valid data types: string, number, -// string array or data map. Each AttributeValue object can use only one of -// the available properties. -type AttributeValue struct { - _ struct{} `type:"structure"` - - // For number values, expressed as double. - N *float64 `type:"double"` - - // For single string values. Maximum string length is 100 characters. - S *string `min:"1" type:"string"` - - // For a map of up to 10 data type:value pairs. Maximum length for each string - // value is 100 characters. - SDM map[string]*float64 `type:"map"` - - // For a list of up to 10 strings. Maximum length for each string is 100 characters. - // Duplicate values are not recognized; all occurrences of the repeated value - // after the first of a repeated value are ignored. - SL []*string `type:"list"` -} - -// String returns the string representation -func (s AttributeValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttributeValue) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttributeValue) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttributeValue"} - if s.S != nil && len(*s.S) < 1 { - invalidParams.Add(request.NewErrParamMinLen("S", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetN sets the N field's value. -func (s *AttributeValue) SetN(v float64) *AttributeValue { - s.N = &v - return s -} - -// SetS sets the S field's value. -func (s *AttributeValue) SetS(v string) *AttributeValue { - s.S = &v - return s -} - -// SetSDM sets the SDM field's value. -func (s *AttributeValue) SetSDM(v map[string]*float64) *AttributeValue { - s.SDM = v - return s -} - -// SetSL sets the SL field's value. -func (s *AttributeValue) SetSL(v []*string) *AttributeValue { - s.SL = v - return s -} - -// Temporary access credentials used for uploading game build files to Amazon -// GameLift. They are valid for a limited time. If they expire before you upload -// your game build, get a new set by calling RequestUploadCredentials. -type AwsCredentials struct { - _ struct{} `type:"structure" sensitive:"true"` - - // Temporary key allowing access to the Amazon GameLift S3 account. - AccessKeyId *string `min:"1" type:"string"` - - // Temporary secret key allowing access to the Amazon GameLift S3 account. - SecretAccessKey *string `min:"1" type:"string"` - - // Token used to associate a specific build ID with the files uploaded using - // these credentials. - SessionToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s AwsCredentials) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AwsCredentials) GoString() string { - return s.String() -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *AwsCredentials) SetAccessKeyId(v string) *AwsCredentials { - s.AccessKeyId = &v - return s -} - -// SetSecretAccessKey sets the SecretAccessKey field's value. -func (s *AwsCredentials) SetSecretAccessKey(v string) *AwsCredentials { - s.SecretAccessKey = &v - return s -} - -// SetSessionToken sets the SessionToken field's value. -func (s *AwsCredentials) SetSessionToken(v string) *AwsCredentials { - s.SessionToken = &v - return s -} - -// Properties describing a game build. -// -// Build-related operations include: -// -// * CreateBuild -// -// * ListBuilds -// -// * DescribeBuild -// -// * UpdateBuild -// -// * DeleteBuild -type Build struct { - _ struct{} `type:"structure"` - - // Unique identifier for a build. - BuildId *string `type:"string"` - - // Time stamp indicating when this data object was created. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp"` - - // Descriptive label that is associated with a build. Build names do not need - // to be unique. It can be set using CreateBuild or UpdateBuild. - Name *string `type:"string"` - - // Operating system that the game server binaries are built to run on. This - // value determines the type of fleet resources that you can use for this build. - OperatingSystem *string `type:"string" enum:"OperatingSystem"` - - // File size of the uploaded game build, expressed in bytes. When the build - // status is INITIALIZED, this value is 0. - SizeOnDisk *int64 `min:"1" type:"long"` - - // Current status of the build. - // - // Possible build statuses include the following: - // - // * INITIALIZED -- A new build has been defined, but no files have been - // uploaded. You cannot create fleets for builds that are in this status. - // When a build is successfully created, the build status is set to this - // value. - // - // * READY -- The game build has been successfully uploaded. You can now - // create new fleets for this build. - // - // * FAILED -- The game build upload failed. You cannot create new fleets - // for this build. - Status *string `type:"string" enum:"BuildStatus"` - - // Version that is associated with this build. Version strings do not need to - // be unique. This value can be set using CreateBuild or UpdateBuild. - Version *string `type:"string"` -} - -// String returns the string representation -func (s Build) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Build) GoString() string { - return s.String() -} - -// SetBuildId sets the BuildId field's value. -func (s *Build) SetBuildId(v string) *Build { - s.BuildId = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *Build) SetCreationTime(v time.Time) *Build { - s.CreationTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *Build) SetName(v string) *Build { - s.Name = &v - return s -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *Build) SetOperatingSystem(v string) *Build { - s.OperatingSystem = &v - return s -} - -// SetSizeOnDisk sets the SizeOnDisk field's value. -func (s *Build) SetSizeOnDisk(v int64) *Build { - s.SizeOnDisk = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Build) SetStatus(v string) *Build { - s.Status = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *Build) SetVersion(v string) *Build { - s.Version = &v - return s -} - -// Represents the input for a request action. -type CreateAliasInput struct { - _ struct{} `type:"structure"` - - // Human-readable description of an alias. - Description *string `min:"1" type:"string"` - - // Descriptive label that is associated with an alias. Alias names do not need - // to be unique. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // Object that specifies the fleet and routing type to use for the alias. - // - // RoutingStrategy is a required field - RoutingStrategy *RoutingStrategy `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"} - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.RoutingStrategy == nil { - invalidParams.Add(request.NewErrParamRequired("RoutingStrategy")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateAliasInput) SetDescription(v string) *CreateAliasInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateAliasInput) SetName(v string) *CreateAliasInput { - s.Name = &v - return s -} - -// SetRoutingStrategy sets the RoutingStrategy field's value. -func (s *CreateAliasInput) SetRoutingStrategy(v *RoutingStrategy) *CreateAliasInput { - s.RoutingStrategy = v - return s -} - -// Represents the returned data in response to a request action. -type CreateAliasOutput struct { - _ struct{} `type:"structure"` - - // Object that describes the newly created alias record. - Alias *Alias `type:"structure"` -} - -// String returns the string representation -func (s CreateAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAliasOutput) GoString() string { - return s.String() -} - -// SetAlias sets the Alias field's value. -func (s *CreateAliasOutput) SetAlias(v *Alias) *CreateAliasOutput { - s.Alias = v - return s -} - -// Represents the input for a request action. -type CreateBuildInput struct { - _ struct{} `type:"structure"` - - // Descriptive label that is associated with a build. Build names do not need - // to be unique. You can use UpdateBuild to change this value later. - Name *string `min:"1" type:"string"` - - // Operating system that the game server binaries are built to run on. This - // value determines the type of fleet resources that you can use for this build. - // If your game build contains multiple executables, they all must run on the - // same operating system. If an operating system is not specified when creating - // a build, Amazon GameLift uses the default value (WINDOWS_2012). This value - // cannot be changed later. - OperatingSystem *string `type:"string" enum:"OperatingSystem"` - - // Information indicating where your game build files are stored. Use this parameter - // only when creating a build with files stored in an Amazon S3 bucket that - // you own. The storage location must specify an Amazon S3 bucket name and key, - // as well as a role ARN that you set up to allow Amazon GameLift to access - // your Amazon S3 bucket. The S3 bucket must be in the same region that you - // want to create a new build in. - StorageLocation *S3Location `type:"structure"` - - // Version that is associated with this build. Version strings do not need to - // be unique. You can use UpdateBuild to change this value later. - Version *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateBuildInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBuildInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateBuildInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateBuildInput"} - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - if s.StorageLocation != nil { - if err := s.StorageLocation.Validate(); err != nil { - invalidParams.AddNested("StorageLocation", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *CreateBuildInput) SetName(v string) *CreateBuildInput { - s.Name = &v - return s -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *CreateBuildInput) SetOperatingSystem(v string) *CreateBuildInput { - s.OperatingSystem = &v - return s -} - -// SetStorageLocation sets the StorageLocation field's value. -func (s *CreateBuildInput) SetStorageLocation(v *S3Location) *CreateBuildInput { - s.StorageLocation = v - return s -} - -// SetVersion sets the Version field's value. -func (s *CreateBuildInput) SetVersion(v string) *CreateBuildInput { - s.Version = &v - return s -} - -// Represents the returned data in response to a request action. -type CreateBuildOutput struct { - _ struct{} `type:"structure"` - - // The newly created build record, including a unique build ID and status. - Build *Build `type:"structure"` - - // Amazon S3 location for your game build file, including bucket name and key. - StorageLocation *S3Location `type:"structure"` - - // This element is returned only when the operation is called without a storage - // location. It contains credentials to use when you are uploading a build file - // to an Amazon S3 bucket that is owned by Amazon GameLift. Credentials have - // a limited life span. To refresh these credentials, call RequestUploadCredentials. - UploadCredentials *AwsCredentials `type:"structure" sensitive:"true"` -} - -// String returns the string representation -func (s CreateBuildOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBuildOutput) GoString() string { - return s.String() -} - -// SetBuild sets the Build field's value. -func (s *CreateBuildOutput) SetBuild(v *Build) *CreateBuildOutput { - s.Build = v - return s -} - -// SetStorageLocation sets the StorageLocation field's value. -func (s *CreateBuildOutput) SetStorageLocation(v *S3Location) *CreateBuildOutput { - s.StorageLocation = v - return s -} - -// SetUploadCredentials sets the UploadCredentials field's value. -func (s *CreateBuildOutput) SetUploadCredentials(v *AwsCredentials) *CreateBuildOutput { - s.UploadCredentials = v - return s -} - -// Represents the input for a request action. -type CreateFleetInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a build to be deployed on the new fleet. The build - // must have been successfully uploaded to Amazon GameLift and be in a READY - // status. This fleet setting cannot be changed once the fleet is created. - // - // BuildId is a required field - BuildId *string `type:"string" required:"true"` - - // Human-readable description of a fleet. - Description *string `min:"1" type:"string"` - - // Range of IP addresses and port settings that permit inbound traffic to access - // server processes running on the fleet. If no inbound permissions are set, - // including both IP address range and port range, the server processes in the - // fleet cannot accept connections. You can specify one or more sets of permissions - // for a fleet. - EC2InboundPermissions []*IpPermission `type:"list"` - - // Name of an EC2 instance type that is supported in Amazon GameLift. A fleet - // instance type determines the computing resources of each instance in the - // fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift - // supports the following EC2 instance types. See Amazon EC2 Instance Types - // (http://aws.amazon.com/ec2/instance-types/) for detailed descriptions. - // - // EC2InstanceType is a required field - EC2InstanceType *string `type:"string" required:"true" enum:"EC2InstanceType"` - - // Indicates whether to use on-demand instances or spot instances for this fleet. - // If empty, the default is ON_DEMAND. Both categories of instances use identical - // hardware and configurations, based on the instance type selected for this - // fleet. You can acquire on-demand instances at any time for a fixed price - // and keep them as long as you need them. Spot instances have lower prices, - // but spot pricing is variable, and while in use they can be interrupted (with - // a two-minute notification). Learn more about Amazon GameLift spot instances - // with at Choose Computing Resources (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-ec2-instances.html). - FleetType *string `type:"string" enum:"FleetType"` - - // This parameter is no longer used. Instead, to specify where Amazon GameLift - // should store log files once a server process shuts down, use the Amazon GameLift - // server API ProcessReady() and specify one or more directory paths in logParameters. - // See more information in the Server API Reference (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api-ref.html#gamelift-sdk-server-api-ref-dataypes-process). - LogPaths []*string `type:"list"` - - // Name of a metric group to add this fleet to. A metric group tracks metrics - // across all fleets in the group. Use an existing metric group name to add - // this fleet to the group, or use a new name to create a new metric group. - // A fleet can only be included in one metric group at a time. - MetricGroups []*string `type:"list"` - - // Descriptive label that is associated with a fleet. Fleet names do not need - // to be unique. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // Game session protection policy to apply to all instances in this fleet. If - // this parameter is not set, instances in this fleet default to no protection. - // You can change a fleet's protection policy using UpdateFleetAttributes, but - // this change will only affect sessions created after the policy change. You - // can also set protection for individual instances using UpdateGameSession. - // - // * NoProtection -- The game session can be terminated during a scale-down - // event. - // - // * FullProtection -- If the game session is in an ACTIVE status, it cannot - // be terminated during a scale-down event. - NewGameSessionProtectionPolicy *string `type:"string" enum:"ProtectionPolicy"` - - // Unique identifier for the AWS account with the VPC that you want to peer - // your Amazon GameLift fleet with. You can find your Account ID in the AWS - // Management Console under account settings. - PeerVpcAwsAccountId *string `min:"1" type:"string"` - - // Unique identifier for a VPC with resources to be accessed by your Amazon - // GameLift fleet. The VPC must be in the same region where your fleet is deployed. - // To get VPC information, including IDs, use the Virtual Private Cloud service - // tools, including the VPC Dashboard in the AWS Management Console. - PeerVpcId *string `min:"1" type:"string"` - - // Policy that limits the number of game sessions an individual player can create - // over a span of time for this fleet. - ResourceCreationLimitPolicy *ResourceCreationLimitPolicy `type:"structure"` - - // Instructions for launching server processes on each instance in the fleet. - // The run-time configuration for a fleet has a collection of server process - // configurations, one for each type of server process to run on an instance. - // A server process configuration specifies the location of the server executable, - // launch parameters, and the number of concurrent processes with that configuration - // to maintain on each instance. A CreateFleet request must include a run-time - // configuration with at least one server process configuration; otherwise the - // request fails with an invalid request exception. (This parameter replaces - // the parameters ServerLaunchPath and ServerLaunchParameters; requests that - // contain values for these parameters instead of a run-time configuration will - // continue to work.) - RuntimeConfiguration *RuntimeConfiguration `type:"structure"` - - // This parameter is no longer used. Instead, specify server launch parameters - // in the RuntimeConfiguration parameter. (Requests that specify a server launch - // path and launch parameters instead of a run-time configuration will continue - // to work.) - ServerLaunchParameters *string `min:"1" type:"string"` - - // This parameter is no longer used. Instead, specify a server launch path using - // the RuntimeConfiguration parameter. (Requests that specify a server launch - // path and launch parameters instead of a run-time configuration will continue - // to work.) - ServerLaunchPath *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateFleetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFleetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFleetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFleetInput"} - if s.BuildId == nil { - invalidParams.Add(request.NewErrParamRequired("BuildId")) - } - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.EC2InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("EC2InstanceType")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.PeerVpcAwsAccountId != nil && len(*s.PeerVpcAwsAccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PeerVpcAwsAccountId", 1)) - } - if s.PeerVpcId != nil && len(*s.PeerVpcId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PeerVpcId", 1)) - } - if s.ServerLaunchParameters != nil && len(*s.ServerLaunchParameters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerLaunchParameters", 1)) - } - if s.ServerLaunchPath != nil && len(*s.ServerLaunchPath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerLaunchPath", 1)) - } - if s.EC2InboundPermissions != nil { - for i, v := range s.EC2InboundPermissions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EC2InboundPermissions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.RuntimeConfiguration != nil { - if err := s.RuntimeConfiguration.Validate(); err != nil { - invalidParams.AddNested("RuntimeConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBuildId sets the BuildId field's value. -func (s *CreateFleetInput) SetBuildId(v string) *CreateFleetInput { - s.BuildId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateFleetInput) SetDescription(v string) *CreateFleetInput { - s.Description = &v - return s -} - -// SetEC2InboundPermissions sets the EC2InboundPermissions field's value. -func (s *CreateFleetInput) SetEC2InboundPermissions(v []*IpPermission) *CreateFleetInput { - s.EC2InboundPermissions = v - return s -} - -// SetEC2InstanceType sets the EC2InstanceType field's value. -func (s *CreateFleetInput) SetEC2InstanceType(v string) *CreateFleetInput { - s.EC2InstanceType = &v - return s -} - -// SetFleetType sets the FleetType field's value. -func (s *CreateFleetInput) SetFleetType(v string) *CreateFleetInput { - s.FleetType = &v - return s -} - -// SetLogPaths sets the LogPaths field's value. -func (s *CreateFleetInput) SetLogPaths(v []*string) *CreateFleetInput { - s.LogPaths = v - return s -} - -// SetMetricGroups sets the MetricGroups field's value. -func (s *CreateFleetInput) SetMetricGroups(v []*string) *CreateFleetInput { - s.MetricGroups = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateFleetInput) SetName(v string) *CreateFleetInput { - s.Name = &v - return s -} - -// SetNewGameSessionProtectionPolicy sets the NewGameSessionProtectionPolicy field's value. -func (s *CreateFleetInput) SetNewGameSessionProtectionPolicy(v string) *CreateFleetInput { - s.NewGameSessionProtectionPolicy = &v - return s -} - -// SetPeerVpcAwsAccountId sets the PeerVpcAwsAccountId field's value. -func (s *CreateFleetInput) SetPeerVpcAwsAccountId(v string) *CreateFleetInput { - s.PeerVpcAwsAccountId = &v - return s -} - -// SetPeerVpcId sets the PeerVpcId field's value. -func (s *CreateFleetInput) SetPeerVpcId(v string) *CreateFleetInput { - s.PeerVpcId = &v - return s -} - -// SetResourceCreationLimitPolicy sets the ResourceCreationLimitPolicy field's value. -func (s *CreateFleetInput) SetResourceCreationLimitPolicy(v *ResourceCreationLimitPolicy) *CreateFleetInput { - s.ResourceCreationLimitPolicy = v - return s -} - -// SetRuntimeConfiguration sets the RuntimeConfiguration field's value. -func (s *CreateFleetInput) SetRuntimeConfiguration(v *RuntimeConfiguration) *CreateFleetInput { - s.RuntimeConfiguration = v - return s -} - -// SetServerLaunchParameters sets the ServerLaunchParameters field's value. -func (s *CreateFleetInput) SetServerLaunchParameters(v string) *CreateFleetInput { - s.ServerLaunchParameters = &v - return s -} - -// SetServerLaunchPath sets the ServerLaunchPath field's value. -func (s *CreateFleetInput) SetServerLaunchPath(v string) *CreateFleetInput { - s.ServerLaunchPath = &v - return s -} - -// Represents the returned data in response to a request action. -type CreateFleetOutput struct { - _ struct{} `type:"structure"` - - // Properties for the newly created fleet. - FleetAttributes *FleetAttributes `type:"structure"` -} - -// String returns the string representation -func (s CreateFleetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFleetOutput) GoString() string { - return s.String() -} - -// SetFleetAttributes sets the FleetAttributes field's value. -func (s *CreateFleetOutput) SetFleetAttributes(v *FleetAttributes) *CreateFleetOutput { - s.FleetAttributes = v - return s -} - -// Represents the input for a request action. -type CreateGameSessionInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for an alias associated with the fleet to create a game - // session in. Each request must reference either a fleet ID or alias ID, but - // not both. - AliasId *string `type:"string"` - - // Unique identifier for a player or entity creating the game session. This - // ID is used to enforce a resource protection policy (if one exists) that limits - // the number of concurrent active game sessions one player can have. - CreatorId *string `min:"1" type:"string"` - - // Unique identifier for a fleet to create a game session in. Each request must - // reference either a fleet ID or alias ID, but not both. - FleetId *string `type:"string"` - - // Set of custom properties for a game session, formatted as key:value pairs. - // These properties are passed to a game server process in the GameSession object - // with a request to start a new game session (see Start a Game Session (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). - GameProperties []*GameProperty `type:"list"` - - // Set of custom game session properties, formatted as a single string value. - // This data is passed to a game server process in the GameSession object with - // a request to start a new game session (see Start a Game Session (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). - GameSessionData *string `min:"1" type:"string"` - - // This parameter is no longer preferred. Please use IdempotencyToken instead. - // Custom string that uniquely identifies a request for a new game session. - // Maximum token length is 48 characters. If provided, this string is included - // in the new game session's ID. (A game session ARN has the following format: - // arn:aws:gamelift:::gamesession//.) - GameSessionId *string `min:"1" type:"string"` - - // Custom string that uniquely identifies a request for a new game session. - // Maximum token length is 48 characters. If provided, this string is included - // in the new game session's ID. (A game session ARN has the following format: - // arn:aws:gamelift:::gamesession//.) Idempotency tokens remain in use for 30 days after a game session - // has ended; game session objects are retained for this time period and then - // deleted. - IdempotencyToken *string `min:"1" type:"string"` - - // Maximum number of players that can be connected simultaneously to the game - // session. - // - // MaximumPlayerSessionCount is a required field - MaximumPlayerSessionCount *int64 `type:"integer" required:"true"` - - // Descriptive label that is associated with a game session. Session names do - // not need to be unique. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateGameSessionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateGameSessionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateGameSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateGameSessionInput"} - if s.CreatorId != nil && len(*s.CreatorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CreatorId", 1)) - } - if s.GameSessionData != nil && len(*s.GameSessionData) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionData", 1)) - } - if s.GameSessionId != nil && len(*s.GameSessionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionId", 1)) - } - if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) - } - if s.MaximumPlayerSessionCount == nil { - invalidParams.Add(request.NewErrParamRequired("MaximumPlayerSessionCount")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.GameProperties != nil { - for i, v := range s.GameProperties { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GameProperties", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliasId sets the AliasId field's value. -func (s *CreateGameSessionInput) SetAliasId(v string) *CreateGameSessionInput { - s.AliasId = &v - return s -} - -// SetCreatorId sets the CreatorId field's value. -func (s *CreateGameSessionInput) SetCreatorId(v string) *CreateGameSessionInput { - s.CreatorId = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *CreateGameSessionInput) SetFleetId(v string) *CreateGameSessionInput { - s.FleetId = &v - return s -} - -// SetGameProperties sets the GameProperties field's value. -func (s *CreateGameSessionInput) SetGameProperties(v []*GameProperty) *CreateGameSessionInput { - s.GameProperties = v - return s -} - -// SetGameSessionData sets the GameSessionData field's value. -func (s *CreateGameSessionInput) SetGameSessionData(v string) *CreateGameSessionInput { - s.GameSessionData = &v - return s -} - -// SetGameSessionId sets the GameSessionId field's value. -func (s *CreateGameSessionInput) SetGameSessionId(v string) *CreateGameSessionInput { - s.GameSessionId = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *CreateGameSessionInput) SetIdempotencyToken(v string) *CreateGameSessionInput { - s.IdempotencyToken = &v - return s -} - -// SetMaximumPlayerSessionCount sets the MaximumPlayerSessionCount field's value. -func (s *CreateGameSessionInput) SetMaximumPlayerSessionCount(v int64) *CreateGameSessionInput { - s.MaximumPlayerSessionCount = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateGameSessionInput) SetName(v string) *CreateGameSessionInput { - s.Name = &v - return s -} - -// Represents the returned data in response to a request action. -type CreateGameSessionOutput struct { - _ struct{} `type:"structure"` - - // Object that describes the newly created game session record. - GameSession *GameSession `type:"structure"` -} - -// String returns the string representation -func (s CreateGameSessionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateGameSessionOutput) GoString() string { - return s.String() -} - -// SetGameSession sets the GameSession field's value. -func (s *CreateGameSessionOutput) SetGameSession(v *GameSession) *CreateGameSessionOutput { - s.GameSession = v - return s -} - -// Represents the input for a request action. -type CreateGameSessionQueueInput struct { - _ struct{} `type:"structure"` - - // List of fleets that can be used to fulfill game session placement requests - // in the queue. Fleets are identified by either a fleet ARN or a fleet alias - // ARN. Destinations are listed in default preference order. - Destinations []*GameSessionQueueDestination `type:"list"` - - // Descriptive label that is associated with game session queue. Queue names - // must be unique within each region. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // Collection of latency policies to apply when processing game sessions placement - // requests with player latency information. Multiple policies are evaluated - // in order of the maximum latency value, starting with the lowest latency values. - // With just one policy, it is enforced at the start of the game session placement - // for the duration period. With multiple policies, each policy is enforced - // consecutively for its duration period. For example, a queue might enforce - // a 60-second policy followed by a 120-second policy, and then no policy for - // the remainder of the placement. A player latency policy must set a value - // for MaximumIndividualPlayerLatencyMilliseconds; if none is set, this API - // requests will fail. - PlayerLatencyPolicies []*PlayerLatencyPolicy `type:"list"` - - // Maximum time, in seconds, that a new game session placement request remains - // in the queue. When a request exceeds this time, the game session placement - // changes to a TIMED_OUT status. - TimeoutInSeconds *int64 `type:"integer"` -} - -// String returns the string representation -func (s CreateGameSessionQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateGameSessionQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateGameSessionQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateGameSessionQueueInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Destinations != nil { - for i, v := range s.Destinations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Destinations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinations sets the Destinations field's value. -func (s *CreateGameSessionQueueInput) SetDestinations(v []*GameSessionQueueDestination) *CreateGameSessionQueueInput { - s.Destinations = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateGameSessionQueueInput) SetName(v string) *CreateGameSessionQueueInput { - s.Name = &v - return s -} - -// SetPlayerLatencyPolicies sets the PlayerLatencyPolicies field's value. -func (s *CreateGameSessionQueueInput) SetPlayerLatencyPolicies(v []*PlayerLatencyPolicy) *CreateGameSessionQueueInput { - s.PlayerLatencyPolicies = v - return s -} - -// SetTimeoutInSeconds sets the TimeoutInSeconds field's value. -func (s *CreateGameSessionQueueInput) SetTimeoutInSeconds(v int64) *CreateGameSessionQueueInput { - s.TimeoutInSeconds = &v - return s -} - -// Represents the returned data in response to a request action. -type CreateGameSessionQueueOutput struct { - _ struct{} `type:"structure"` - - // Object that describes the newly created game session queue. - GameSessionQueue *GameSessionQueue `type:"structure"` -} - -// String returns the string representation -func (s CreateGameSessionQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateGameSessionQueueOutput) GoString() string { - return s.String() -} - -// SetGameSessionQueue sets the GameSessionQueue field's value. -func (s *CreateGameSessionQueueOutput) SetGameSessionQueue(v *GameSessionQueue) *CreateGameSessionQueueOutput { - s.GameSessionQueue = v - return s -} - -// Represents the input for a request action. -type CreateMatchmakingConfigurationInput struct { - _ struct{} `type:"structure"` - - // Flag that determines whether or not a match that was created with this configuration - // must be accepted by the matched players. To require acceptance, set to TRUE. - // - // AcceptanceRequired is a required field - AcceptanceRequired *bool `type:"boolean" required:"true"` - - // Length of time (in seconds) to wait for players to accept a proposed match. - // If any player rejects the match or fails to accept before the timeout, the - // ticket continues to look for an acceptable match. - AcceptanceTimeoutSeconds *int64 `min:"1" type:"integer"` - - // Number of player slots in a match to keep open for future players. For example, - // if the configuration's rule set specifies a match for a single 12-person - // team, and the additional player count is set to 2, only 10 players are selected - // for the match. - AdditionalPlayerCount *int64 `type:"integer"` - - // Information to attached to all events related to the matchmaking configuration. - CustomEventData *string `type:"string"` - - // Meaningful description of the matchmaking configuration. - Description *string `min:"1" type:"string"` - - // Set of custom properties for a game session, formatted as key:value pairs. - // These properties are passed to a game server process in the GameSession object - // with a request to start a new game session (see Start a Game Session (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). - // This information is added to the new GameSession object that is created for - // a successful match. - GameProperties []*GameProperty `type:"list"` - - // Set of custom game session properties, formatted as a single string value. - // This data is passed to a game server process in the GameSession object with - // a request to start a new game session (see Start a Game Session (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). - // This information is added to the new GameSession object that is created for - // a successful match. - GameSessionData *string `min:"1" type:"string"` - - // Amazon Resource Name (ARN (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) - // that is assigned to a game session queue and uniquely identifies it. Format - // is arn:aws:gamelift:::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. - // These queues are used when placing game sessions for matches that are created - // with this matchmaking configuration. Queues can be located in any region. - // - // GameSessionQueueArns is a required field - GameSessionQueueArns []*string `type:"list" required:"true"` - - // Unique identifier for a matchmaking configuration. This name is used to identify - // the configuration associated with a matchmaking request or ticket. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // SNS topic ARN that is set up to receive matchmaking notifications. - NotificationTarget *string `type:"string"` - - // Maximum duration, in seconds, that a matchmaking ticket can remain in process - // before timing out. Requests that time out can be resubmitted as needed. - // - // RequestTimeoutSeconds is a required field - RequestTimeoutSeconds *int64 `min:"1" type:"integer" required:"true"` - - // Unique identifier for a matchmaking rule set to use with this configuration. - // A matchmaking configuration can only use rule sets that are defined in the - // same region. - // - // RuleSetName is a required field - RuleSetName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateMatchmakingConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMatchmakingConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateMatchmakingConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateMatchmakingConfigurationInput"} - if s.AcceptanceRequired == nil { - invalidParams.Add(request.NewErrParamRequired("AcceptanceRequired")) - } - if s.AcceptanceTimeoutSeconds != nil && *s.AcceptanceTimeoutSeconds < 1 { - invalidParams.Add(request.NewErrParamMinValue("AcceptanceTimeoutSeconds", 1)) - } - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.GameSessionData != nil && len(*s.GameSessionData) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionData", 1)) - } - if s.GameSessionQueueArns == nil { - invalidParams.Add(request.NewErrParamRequired("GameSessionQueueArns")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.RequestTimeoutSeconds == nil { - invalidParams.Add(request.NewErrParamRequired("RequestTimeoutSeconds")) - } - if s.RequestTimeoutSeconds != nil && *s.RequestTimeoutSeconds < 1 { - invalidParams.Add(request.NewErrParamMinValue("RequestTimeoutSeconds", 1)) - } - if s.RuleSetName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleSetName")) - } - if s.RuleSetName != nil && len(*s.RuleSetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleSetName", 1)) - } - if s.GameProperties != nil { - for i, v := range s.GameProperties { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GameProperties", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptanceRequired sets the AcceptanceRequired field's value. -func (s *CreateMatchmakingConfigurationInput) SetAcceptanceRequired(v bool) *CreateMatchmakingConfigurationInput { - s.AcceptanceRequired = &v - return s -} - -// SetAcceptanceTimeoutSeconds sets the AcceptanceTimeoutSeconds field's value. -func (s *CreateMatchmakingConfigurationInput) SetAcceptanceTimeoutSeconds(v int64) *CreateMatchmakingConfigurationInput { - s.AcceptanceTimeoutSeconds = &v - return s -} - -// SetAdditionalPlayerCount sets the AdditionalPlayerCount field's value. -func (s *CreateMatchmakingConfigurationInput) SetAdditionalPlayerCount(v int64) *CreateMatchmakingConfigurationInput { - s.AdditionalPlayerCount = &v - return s -} - -// SetCustomEventData sets the CustomEventData field's value. -func (s *CreateMatchmakingConfigurationInput) SetCustomEventData(v string) *CreateMatchmakingConfigurationInput { - s.CustomEventData = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateMatchmakingConfigurationInput) SetDescription(v string) *CreateMatchmakingConfigurationInput { - s.Description = &v - return s -} - -// SetGameProperties sets the GameProperties field's value. -func (s *CreateMatchmakingConfigurationInput) SetGameProperties(v []*GameProperty) *CreateMatchmakingConfigurationInput { - s.GameProperties = v - return s -} - -// SetGameSessionData sets the GameSessionData field's value. -func (s *CreateMatchmakingConfigurationInput) SetGameSessionData(v string) *CreateMatchmakingConfigurationInput { - s.GameSessionData = &v - return s -} - -// SetGameSessionQueueArns sets the GameSessionQueueArns field's value. -func (s *CreateMatchmakingConfigurationInput) SetGameSessionQueueArns(v []*string) *CreateMatchmakingConfigurationInput { - s.GameSessionQueueArns = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateMatchmakingConfigurationInput) SetName(v string) *CreateMatchmakingConfigurationInput { - s.Name = &v - return s -} - -// SetNotificationTarget sets the NotificationTarget field's value. -func (s *CreateMatchmakingConfigurationInput) SetNotificationTarget(v string) *CreateMatchmakingConfigurationInput { - s.NotificationTarget = &v - return s -} - -// SetRequestTimeoutSeconds sets the RequestTimeoutSeconds field's value. -func (s *CreateMatchmakingConfigurationInput) SetRequestTimeoutSeconds(v int64) *CreateMatchmakingConfigurationInput { - s.RequestTimeoutSeconds = &v - return s -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *CreateMatchmakingConfigurationInput) SetRuleSetName(v string) *CreateMatchmakingConfigurationInput { - s.RuleSetName = &v - return s -} - -// Represents the returned data in response to a request action. -type CreateMatchmakingConfigurationOutput struct { - _ struct{} `type:"structure"` - - // Object that describes the newly created matchmaking configuration. - Configuration *MatchmakingConfiguration `type:"structure"` -} - -// String returns the string representation -func (s CreateMatchmakingConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMatchmakingConfigurationOutput) GoString() string { - return s.String() -} - -// SetConfiguration sets the Configuration field's value. -func (s *CreateMatchmakingConfigurationOutput) SetConfiguration(v *MatchmakingConfiguration) *CreateMatchmakingConfigurationOutput { - s.Configuration = v - return s -} - -// Represents the input for a request action. -type CreateMatchmakingRuleSetInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a matchmaking rule set. This name is used to identify - // the rule set associated with a matchmaking configuration. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // Collection of matchmaking rules, formatted as a JSON string. (Note that comments - // are not allowed in JSON, but most elements support a description field.) - // - // RuleSetBody is a required field - RuleSetBody *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateMatchmakingRuleSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMatchmakingRuleSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateMatchmakingRuleSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateMatchmakingRuleSetInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.RuleSetBody == nil { - invalidParams.Add(request.NewErrParamRequired("RuleSetBody")) - } - if s.RuleSetBody != nil && len(*s.RuleSetBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleSetBody", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *CreateMatchmakingRuleSetInput) SetName(v string) *CreateMatchmakingRuleSetInput { - s.Name = &v - return s -} - -// SetRuleSetBody sets the RuleSetBody field's value. -func (s *CreateMatchmakingRuleSetInput) SetRuleSetBody(v string) *CreateMatchmakingRuleSetInput { - s.RuleSetBody = &v - return s -} - -// Represents the returned data in response to a request action. -type CreateMatchmakingRuleSetOutput struct { - _ struct{} `type:"structure"` - - // Object that describes the newly created matchmaking rule set. - // - // RuleSet is a required field - RuleSet *MatchmakingRuleSet `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateMatchmakingRuleSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMatchmakingRuleSetOutput) GoString() string { - return s.String() -} - -// SetRuleSet sets the RuleSet field's value. -func (s *CreateMatchmakingRuleSetOutput) SetRuleSet(v *MatchmakingRuleSet) *CreateMatchmakingRuleSetOutput { - s.RuleSet = v - return s -} - -// Represents the input for a request action. -type CreatePlayerSessionInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for the game session to add a player to. - // - // GameSessionId is a required field - GameSessionId *string `min:"1" type:"string" required:"true"` - - // Developer-defined information related to a player. Amazon GameLift does not - // use this data, so it can be formatted as needed for use in the game. - PlayerData *string `min:"1" type:"string"` - - // Unique identifier for a player. Player IDs are developer-defined. - // - // PlayerId is a required field - PlayerId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreatePlayerSessionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePlayerSessionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePlayerSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePlayerSessionInput"} - if s.GameSessionId == nil { - invalidParams.Add(request.NewErrParamRequired("GameSessionId")) - } - if s.GameSessionId != nil && len(*s.GameSessionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionId", 1)) - } - if s.PlayerData != nil && len(*s.PlayerData) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlayerData", 1)) - } - if s.PlayerId == nil { - invalidParams.Add(request.NewErrParamRequired("PlayerId")) - } - if s.PlayerId != nil && len(*s.PlayerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlayerId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGameSessionId sets the GameSessionId field's value. -func (s *CreatePlayerSessionInput) SetGameSessionId(v string) *CreatePlayerSessionInput { - s.GameSessionId = &v - return s -} - -// SetPlayerData sets the PlayerData field's value. -func (s *CreatePlayerSessionInput) SetPlayerData(v string) *CreatePlayerSessionInput { - s.PlayerData = &v - return s -} - -// SetPlayerId sets the PlayerId field's value. -func (s *CreatePlayerSessionInput) SetPlayerId(v string) *CreatePlayerSessionInput { - s.PlayerId = &v - return s -} - -// Represents the returned data in response to a request action. -type CreatePlayerSessionOutput struct { - _ struct{} `type:"structure"` - - // Object that describes the newly created player session record. - PlayerSession *PlayerSession `type:"structure"` -} - -// String returns the string representation -func (s CreatePlayerSessionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePlayerSessionOutput) GoString() string { - return s.String() -} - -// SetPlayerSession sets the PlayerSession field's value. -func (s *CreatePlayerSessionOutput) SetPlayerSession(v *PlayerSession) *CreatePlayerSessionOutput { - s.PlayerSession = v - return s -} - -// Represents the input for a request action. -type CreatePlayerSessionsInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for the game session to add players to. - // - // GameSessionId is a required field - GameSessionId *string `min:"1" type:"string" required:"true"` - - // Map of string pairs, each specifying a player ID and a set of developer-defined - // information related to the player. Amazon GameLift does not use this data, - // so it can be formatted as needed for use in the game. Player data strings - // for player IDs not included in the PlayerIds parameter are ignored. - PlayerDataMap map[string]*string `type:"map"` - - // List of unique identifiers for the players to be added. - // - // PlayerIds is a required field - PlayerIds []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreatePlayerSessionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePlayerSessionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePlayerSessionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePlayerSessionsInput"} - if s.GameSessionId == nil { - invalidParams.Add(request.NewErrParamRequired("GameSessionId")) - } - if s.GameSessionId != nil && len(*s.GameSessionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionId", 1)) - } - if s.PlayerIds == nil { - invalidParams.Add(request.NewErrParamRequired("PlayerIds")) - } - if s.PlayerIds != nil && len(s.PlayerIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlayerIds", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGameSessionId sets the GameSessionId field's value. -func (s *CreatePlayerSessionsInput) SetGameSessionId(v string) *CreatePlayerSessionsInput { - s.GameSessionId = &v - return s -} - -// SetPlayerDataMap sets the PlayerDataMap field's value. -func (s *CreatePlayerSessionsInput) SetPlayerDataMap(v map[string]*string) *CreatePlayerSessionsInput { - s.PlayerDataMap = v - return s -} - -// SetPlayerIds sets the PlayerIds field's value. -func (s *CreatePlayerSessionsInput) SetPlayerIds(v []*string) *CreatePlayerSessionsInput { - s.PlayerIds = v - return s -} - -// Represents the returned data in response to a request action. -type CreatePlayerSessionsOutput struct { - _ struct{} `type:"structure"` - - // Collection of player session objects created for the added players. - PlayerSessions []*PlayerSession `type:"list"` -} - -// String returns the string representation -func (s CreatePlayerSessionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePlayerSessionsOutput) GoString() string { - return s.String() -} - -// SetPlayerSessions sets the PlayerSessions field's value. -func (s *CreatePlayerSessionsOutput) SetPlayerSessions(v []*PlayerSession) *CreatePlayerSessionsOutput { - s.PlayerSessions = v - return s -} - -// Represents the input for a request action. -type CreateVpcPeeringAuthorizationInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for the AWS account that you use to manage your Amazon - // GameLift fleet. You can find your Account ID in the AWS Management Console - // under account settings. - // - // GameLiftAwsAccountId is a required field - GameLiftAwsAccountId *string `min:"1" type:"string" required:"true"` - - // Unique identifier for a VPC with resources to be accessed by your Amazon - // GameLift fleet. The VPC must be in the same region where your fleet is deployed. - // To get VPC information, including IDs, use the Virtual Private Cloud service - // tools, including the VPC Dashboard in the AWS Management Console. - // - // PeerVpcId is a required field - PeerVpcId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateVpcPeeringAuthorizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcPeeringAuthorizationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpcPeeringAuthorizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpcPeeringAuthorizationInput"} - if s.GameLiftAwsAccountId == nil { - invalidParams.Add(request.NewErrParamRequired("GameLiftAwsAccountId")) - } - if s.GameLiftAwsAccountId != nil && len(*s.GameLiftAwsAccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameLiftAwsAccountId", 1)) - } - if s.PeerVpcId == nil { - invalidParams.Add(request.NewErrParamRequired("PeerVpcId")) - } - if s.PeerVpcId != nil && len(*s.PeerVpcId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PeerVpcId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGameLiftAwsAccountId sets the GameLiftAwsAccountId field's value. -func (s *CreateVpcPeeringAuthorizationInput) SetGameLiftAwsAccountId(v string) *CreateVpcPeeringAuthorizationInput { - s.GameLiftAwsAccountId = &v - return s -} - -// SetPeerVpcId sets the PeerVpcId field's value. -func (s *CreateVpcPeeringAuthorizationInput) SetPeerVpcId(v string) *CreateVpcPeeringAuthorizationInput { - s.PeerVpcId = &v - return s -} - -// Represents the returned data in response to a request action. -type CreateVpcPeeringAuthorizationOutput struct { - _ struct{} `type:"structure"` - - // Details on the requested VPC peering authorization, including expiration. - VpcPeeringAuthorization *VpcPeeringAuthorization `type:"structure"` -} - -// String returns the string representation -func (s CreateVpcPeeringAuthorizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcPeeringAuthorizationOutput) GoString() string { - return s.String() -} - -// SetVpcPeeringAuthorization sets the VpcPeeringAuthorization field's value. -func (s *CreateVpcPeeringAuthorizationOutput) SetVpcPeeringAuthorization(v *VpcPeeringAuthorization) *CreateVpcPeeringAuthorizationOutput { - s.VpcPeeringAuthorization = v - return s -} - -// Represents the input for a request action. -type CreateVpcPeeringConnectionInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet. This tells Amazon GameLift which GameLift - // VPC to peer with. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // Unique identifier for the AWS account with the VPC that you want to peer - // your Amazon GameLift fleet with. You can find your Account ID in the AWS - // Management Console under account settings. - // - // PeerVpcAwsAccountId is a required field - PeerVpcAwsAccountId *string `min:"1" type:"string" required:"true"` - - // Unique identifier for a VPC with resources to be accessed by your Amazon - // GameLift fleet. The VPC must be in the same region where your fleet is deployed. - // To get VPC information, including IDs, use the Virtual Private Cloud service - // tools, including the VPC Dashboard in the AWS Management Console. - // - // PeerVpcId is a required field - PeerVpcId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateVpcPeeringConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcPeeringConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpcPeeringConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpcPeeringConnectionInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.PeerVpcAwsAccountId == nil { - invalidParams.Add(request.NewErrParamRequired("PeerVpcAwsAccountId")) - } - if s.PeerVpcAwsAccountId != nil && len(*s.PeerVpcAwsAccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PeerVpcAwsAccountId", 1)) - } - if s.PeerVpcId == nil { - invalidParams.Add(request.NewErrParamRequired("PeerVpcId")) - } - if s.PeerVpcId != nil && len(*s.PeerVpcId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PeerVpcId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetId sets the FleetId field's value. -func (s *CreateVpcPeeringConnectionInput) SetFleetId(v string) *CreateVpcPeeringConnectionInput { - s.FleetId = &v - return s -} - -// SetPeerVpcAwsAccountId sets the PeerVpcAwsAccountId field's value. -func (s *CreateVpcPeeringConnectionInput) SetPeerVpcAwsAccountId(v string) *CreateVpcPeeringConnectionInput { - s.PeerVpcAwsAccountId = &v - return s -} - -// SetPeerVpcId sets the PeerVpcId field's value. -func (s *CreateVpcPeeringConnectionInput) SetPeerVpcId(v string) *CreateVpcPeeringConnectionInput { - s.PeerVpcId = &v - return s -} - -type CreateVpcPeeringConnectionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateVpcPeeringConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVpcPeeringConnectionOutput) GoString() string { - return s.String() -} - -// Represents the input for a request action. -type DeleteAliasInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet alias. Specify the alias you want to delete. - // - // AliasId is a required field - AliasId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAliasInput"} - if s.AliasId == nil { - invalidParams.Add(request.NewErrParamRequired("AliasId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliasId sets the AliasId field's value. -func (s *DeleteAliasInput) SetAliasId(v string) *DeleteAliasInput { - s.AliasId = &v - return s -} - -type DeleteAliasOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAliasOutput) GoString() string { - return s.String() -} - -// Represents the input for a request action. -type DeleteBuildInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a build to delete. - // - // BuildId is a required field - BuildId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBuildInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBuildInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBuildInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBuildInput"} - if s.BuildId == nil { - invalidParams.Add(request.NewErrParamRequired("BuildId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBuildId sets the BuildId field's value. -func (s *DeleteBuildInput) SetBuildId(v string) *DeleteBuildInput { - s.BuildId = &v - return s -} - -type DeleteBuildOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteBuildOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBuildOutput) GoString() string { - return s.String() -} - -// Represents the input for a request action. -type DeleteFleetInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet to be deleted. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteFleetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFleetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFleetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFleetInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetId sets the FleetId field's value. -func (s *DeleteFleetInput) SetFleetId(v string) *DeleteFleetInput { - s.FleetId = &v - return s -} - -type DeleteFleetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteFleetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFleetOutput) GoString() string { - return s.String() -} - -// Represents the input for a request action. -type DeleteGameSessionQueueInput struct { - _ struct{} `type:"structure"` - - // Descriptive label that is associated with game session queue. Queue names - // must be unique within each region. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteGameSessionQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGameSessionQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteGameSessionQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteGameSessionQueueInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteGameSessionQueueInput) SetName(v string) *DeleteGameSessionQueueInput { - s.Name = &v - return s -} - -type DeleteGameSessionQueueOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteGameSessionQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGameSessionQueueOutput) GoString() string { - return s.String() -} - -// Represents the input for a request action. -type DeleteMatchmakingConfigurationInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a matchmaking configuration - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteMatchmakingConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMatchmakingConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMatchmakingConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMatchmakingConfigurationInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteMatchmakingConfigurationInput) SetName(v string) *DeleteMatchmakingConfigurationInput { - s.Name = &v - return s -} - -type DeleteMatchmakingConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteMatchmakingConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMatchmakingConfigurationOutput) GoString() string { - return s.String() -} - -// Represents the input for a request action. -type DeleteScalingPolicyInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet to be deleted. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // Descriptive label that is associated with a scaling policy. Policy names - // do not need to be unique. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteScalingPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteScalingPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteScalingPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteScalingPolicyInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetId sets the FleetId field's value. -func (s *DeleteScalingPolicyInput) SetFleetId(v string) *DeleteScalingPolicyInput { - s.FleetId = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteScalingPolicyInput) SetName(v string) *DeleteScalingPolicyInput { - s.Name = &v - return s -} - -type DeleteScalingPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteScalingPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteScalingPolicyOutput) GoString() string { - return s.String() -} - -// Represents the input for a request action. -type DeleteVpcPeeringAuthorizationInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for the AWS account that you use to manage your Amazon - // GameLift fleet. You can find your Account ID in the AWS Management Console - // under account settings. - // - // GameLiftAwsAccountId is a required field - GameLiftAwsAccountId *string `min:"1" type:"string" required:"true"` - - // Unique identifier for a VPC with resources to be accessed by your Amazon - // GameLift fleet. The VPC must be in the same region where your fleet is deployed. - // To get VPC information, including IDs, use the Virtual Private Cloud service - // tools, including the VPC Dashboard in the AWS Management Console. - // - // PeerVpcId is a required field - PeerVpcId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVpcPeeringAuthorizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcPeeringAuthorizationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpcPeeringAuthorizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpcPeeringAuthorizationInput"} - if s.GameLiftAwsAccountId == nil { - invalidParams.Add(request.NewErrParamRequired("GameLiftAwsAccountId")) - } - if s.GameLiftAwsAccountId != nil && len(*s.GameLiftAwsAccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameLiftAwsAccountId", 1)) - } - if s.PeerVpcId == nil { - invalidParams.Add(request.NewErrParamRequired("PeerVpcId")) - } - if s.PeerVpcId != nil && len(*s.PeerVpcId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PeerVpcId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGameLiftAwsAccountId sets the GameLiftAwsAccountId field's value. -func (s *DeleteVpcPeeringAuthorizationInput) SetGameLiftAwsAccountId(v string) *DeleteVpcPeeringAuthorizationInput { - s.GameLiftAwsAccountId = &v - return s -} - -// SetPeerVpcId sets the PeerVpcId field's value. -func (s *DeleteVpcPeeringAuthorizationInput) SetPeerVpcId(v string) *DeleteVpcPeeringAuthorizationInput { - s.PeerVpcId = &v - return s -} - -type DeleteVpcPeeringAuthorizationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteVpcPeeringAuthorizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcPeeringAuthorizationOutput) GoString() string { - return s.String() -} - -// Represents the input for a request action. -type DeleteVpcPeeringConnectionInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet. This value must match the fleet ID referenced - // in the VPC peering connection record. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // Unique identifier for a VPC peering connection. This value is included in - // the VpcPeeringConnection object, which can be retrieved by calling DescribeVpcPeeringConnections. - // - // VpcPeeringConnectionId is a required field - VpcPeeringConnectionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVpcPeeringConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcPeeringConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpcPeeringConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpcPeeringConnectionInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.VpcPeeringConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcPeeringConnectionId")) - } - if s.VpcPeeringConnectionId != nil && len(*s.VpcPeeringConnectionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VpcPeeringConnectionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetId sets the FleetId field's value. -func (s *DeleteVpcPeeringConnectionInput) SetFleetId(v string) *DeleteVpcPeeringConnectionInput { - s.FleetId = &v - return s -} - -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *DeleteVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *DeleteVpcPeeringConnectionInput { - s.VpcPeeringConnectionId = &v - return s -} - -type DeleteVpcPeeringConnectionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteVpcPeeringConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVpcPeeringConnectionOutput) GoString() string { - return s.String() -} - -// Represents the input for a request action. -type DescribeAliasInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet alias. Specify the alias you want to retrieve. - // - // AliasId is a required field - AliasId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAliasInput"} - if s.AliasId == nil { - invalidParams.Add(request.NewErrParamRequired("AliasId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliasId sets the AliasId field's value. -func (s *DescribeAliasInput) SetAliasId(v string) *DescribeAliasInput { - s.AliasId = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeAliasOutput struct { - _ struct{} `type:"structure"` - - // Object that contains the requested alias. - Alias *Alias `type:"structure"` -} - -// String returns the string representation -func (s DescribeAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAliasOutput) GoString() string { - return s.String() -} - -// SetAlias sets the Alias field's value. -func (s *DescribeAliasOutput) SetAlias(v *Alias) *DescribeAliasOutput { - s.Alias = v - return s -} - -// Represents the input for a request action. -type DescribeBuildInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a build to retrieve properties for. - // - // BuildId is a required field - BuildId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeBuildInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBuildInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeBuildInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeBuildInput"} - if s.BuildId == nil { - invalidParams.Add(request.NewErrParamRequired("BuildId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBuildId sets the BuildId field's value. -func (s *DescribeBuildInput) SetBuildId(v string) *DescribeBuildInput { - s.BuildId = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeBuildOutput struct { - _ struct{} `type:"structure"` - - // Set of properties describing the requested build. - Build *Build `type:"structure"` -} - -// String returns the string representation -func (s DescribeBuildOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBuildOutput) GoString() string { - return s.String() -} - -// SetBuild sets the Build field's value. -func (s *DescribeBuildOutput) SetBuild(v *Build) *DescribeBuildOutput { - s.Build = v - return s -} - -// Represents the input for a request action. -type DescribeEC2InstanceLimitsInput struct { - _ struct{} `type:"structure"` - - // Name of an EC2 instance type that is supported in Amazon GameLift. A fleet - // instance type determines the computing resources of each instance in the - // fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift - // supports the following EC2 instance types. See Amazon EC2 Instance Types - // (http://aws.amazon.com/ec2/instance-types/) for detailed descriptions. Leave - // this parameter blank to retrieve limits for all types. - EC2InstanceType *string `type:"string" enum:"EC2InstanceType"` -} - -// String returns the string representation -func (s DescribeEC2InstanceLimitsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEC2InstanceLimitsInput) GoString() string { - return s.String() -} - -// SetEC2InstanceType sets the EC2InstanceType field's value. -func (s *DescribeEC2InstanceLimitsInput) SetEC2InstanceType(v string) *DescribeEC2InstanceLimitsInput { - s.EC2InstanceType = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeEC2InstanceLimitsOutput struct { - _ struct{} `type:"structure"` - - // Object that contains the maximum number of instances for the specified instance - // type. - EC2InstanceLimits []*EC2InstanceLimit `type:"list"` -} - -// String returns the string representation -func (s DescribeEC2InstanceLimitsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEC2InstanceLimitsOutput) GoString() string { - return s.String() -} - -// SetEC2InstanceLimits sets the EC2InstanceLimits field's value. -func (s *DescribeEC2InstanceLimitsOutput) SetEC2InstanceLimits(v []*EC2InstanceLimit) *DescribeEC2InstanceLimitsOutput { - s.EC2InstanceLimits = v - return s -} - -// Represents the input for a request action. -type DescribeFleetAttributesInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet(s) to retrieve attributes for. To request attributes - // for all fleets, leave this parameter empty. - FleetIds []*string `min:"1" type:"list"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. This parameter is ignored when - // the request specifies one or a list of fleet IDs. - Limit *int64 `min:"1" type:"integer"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. This parameter - // is ignored when the request specifies one or a list of fleet IDs. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeFleetAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFleetAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFleetAttributesInput"} - if s.FleetIds != nil && len(s.FleetIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FleetIds", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetIds sets the FleetIds field's value. -func (s *DescribeFleetAttributesInput) SetFleetIds(v []*string) *DescribeFleetAttributesInput { - s.FleetIds = v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeFleetAttributesInput) SetLimit(v int64) *DescribeFleetAttributesInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetAttributesInput) SetNextToken(v string) *DescribeFleetAttributesInput { - s.NextToken = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeFleetAttributesOutput struct { - _ struct{} `type:"structure"` - - // Collection of objects containing attribute metadata for each requested fleet - // ID. - FleetAttributes []*FleetAttributes `type:"list"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeFleetAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetAttributesOutput) GoString() string { - return s.String() -} - -// SetFleetAttributes sets the FleetAttributes field's value. -func (s *DescribeFleetAttributesOutput) SetFleetAttributes(v []*FleetAttributes) *DescribeFleetAttributesOutput { - s.FleetAttributes = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetAttributesOutput) SetNextToken(v string) *DescribeFleetAttributesOutput { - s.NextToken = &v - return s -} - -// Represents the input for a request action. -type DescribeFleetCapacityInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet(s) to retrieve capacity information for. To - // request capacity information for all fleets, leave this parameter empty. - FleetIds []*string `min:"1" type:"list"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. This parameter is ignored when - // the request specifies one or a list of fleet IDs. - Limit *int64 `min:"1" type:"integer"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. This parameter - // is ignored when the request specifies one or a list of fleet IDs. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeFleetCapacityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetCapacityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFleetCapacityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFleetCapacityInput"} - if s.FleetIds != nil && len(s.FleetIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FleetIds", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetIds sets the FleetIds field's value. -func (s *DescribeFleetCapacityInput) SetFleetIds(v []*string) *DescribeFleetCapacityInput { - s.FleetIds = v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeFleetCapacityInput) SetLimit(v int64) *DescribeFleetCapacityInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetCapacityInput) SetNextToken(v string) *DescribeFleetCapacityInput { - s.NextToken = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeFleetCapacityOutput struct { - _ struct{} `type:"structure"` - - // Collection of objects containing capacity information for each requested - // fleet ID. Leave this parameter empty to retrieve capacity information for - // all fleets. - FleetCapacity []*FleetCapacity `type:"list"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeFleetCapacityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetCapacityOutput) GoString() string { - return s.String() -} - -// SetFleetCapacity sets the FleetCapacity field's value. -func (s *DescribeFleetCapacityOutput) SetFleetCapacity(v []*FleetCapacity) *DescribeFleetCapacityOutput { - s.FleetCapacity = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetCapacityOutput) SetNextToken(v string) *DescribeFleetCapacityOutput { - s.NextToken = &v - return s -} - -// Represents the input for a request action. -type DescribeFleetEventsInput struct { - _ struct{} `type:"structure"` - - // Most recent date to retrieve event logs for. If no end time is specified, - // this call returns entries from the specified start time up to the present. - // Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057"). - EndTime *time.Time `type:"timestamp"` - - // Unique identifier for a fleet to get event logs for. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. - Limit *int64 `min:"1" type:"integer"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. - NextToken *string `min:"1" type:"string"` - - // Earliest date to retrieve event logs for. If no start time is specified, - // this call returns entries starting from when the fleet was created to the - // specified end time. Format is a number expressed in Unix time as milliseconds - // (ex: "1469498468.057"). - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s DescribeFleetEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFleetEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFleetEventsInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndTime sets the EndTime field's value. -func (s *DescribeFleetEventsInput) SetEndTime(v time.Time) *DescribeFleetEventsInput { - s.EndTime = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *DescribeFleetEventsInput) SetFleetId(v string) *DescribeFleetEventsInput { - s.FleetId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeFleetEventsInput) SetLimit(v int64) *DescribeFleetEventsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetEventsInput) SetNextToken(v string) *DescribeFleetEventsInput { - s.NextToken = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeFleetEventsInput) SetStartTime(v time.Time) *DescribeFleetEventsInput { - s.StartTime = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeFleetEventsOutput struct { - _ struct{} `type:"structure"` - - // Collection of objects containing event log entries for the specified fleet. - Events []*Event `type:"list"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeFleetEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetEventsOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *DescribeFleetEventsOutput) SetEvents(v []*Event) *DescribeFleetEventsOutput { - s.Events = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetEventsOutput) SetNextToken(v string) *DescribeFleetEventsOutput { - s.NextToken = &v - return s -} - -// Represents the input for a request action. -type DescribeFleetPortSettingsInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet to retrieve port settings for. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeFleetPortSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetPortSettingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFleetPortSettingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFleetPortSettingsInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetId sets the FleetId field's value. -func (s *DescribeFleetPortSettingsInput) SetFleetId(v string) *DescribeFleetPortSettingsInput { - s.FleetId = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeFleetPortSettingsOutput struct { - _ struct{} `type:"structure"` - - // Object that contains port settings for the requested fleet ID. - InboundPermissions []*IpPermission `type:"list"` -} - -// String returns the string representation -func (s DescribeFleetPortSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetPortSettingsOutput) GoString() string { - return s.String() -} - -// SetInboundPermissions sets the InboundPermissions field's value. -func (s *DescribeFleetPortSettingsOutput) SetInboundPermissions(v []*IpPermission) *DescribeFleetPortSettingsOutput { - s.InboundPermissions = v - return s -} - -// Represents the input for a request action. -type DescribeFleetUtilizationInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet(s) to retrieve utilization data for. To request - // utilization data for all fleets, leave this parameter empty. - FleetIds []*string `min:"1" type:"list"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. This parameter is ignored when - // the request specifies one or a list of fleet IDs. - Limit *int64 `min:"1" type:"integer"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. This parameter - // is ignored when the request specifies one or a list of fleet IDs. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeFleetUtilizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetUtilizationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFleetUtilizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFleetUtilizationInput"} - if s.FleetIds != nil && len(s.FleetIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FleetIds", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetIds sets the FleetIds field's value. -func (s *DescribeFleetUtilizationInput) SetFleetIds(v []*string) *DescribeFleetUtilizationInput { - s.FleetIds = v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeFleetUtilizationInput) SetLimit(v int64) *DescribeFleetUtilizationInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetUtilizationInput) SetNextToken(v string) *DescribeFleetUtilizationInput { - s.NextToken = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeFleetUtilizationOutput struct { - _ struct{} `type:"structure"` - - // Collection of objects containing utilization information for each requested - // fleet ID. - FleetUtilization []*FleetUtilization `type:"list"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeFleetUtilizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetUtilizationOutput) GoString() string { - return s.String() -} - -// SetFleetUtilization sets the FleetUtilization field's value. -func (s *DescribeFleetUtilizationOutput) SetFleetUtilization(v []*FleetUtilization) *DescribeFleetUtilizationOutput { - s.FleetUtilization = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetUtilizationOutput) SetNextToken(v string) *DescribeFleetUtilizationOutput { - s.NextToken = &v - return s -} - -// Represents the input for a request action. -type DescribeGameSessionDetailsInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for an alias associated with the fleet to retrieve all - // game sessions for. - AliasId *string `type:"string"` - - // Unique identifier for a fleet to retrieve all game sessions active on the - // fleet. - FleetId *string `type:"string"` - - // Unique identifier for the game session to retrieve. - GameSessionId *string `min:"1" type:"string"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. - Limit *int64 `min:"1" type:"integer"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. - NextToken *string `min:"1" type:"string"` - - // Game session status to filter results on. Possible game session statuses - // include ACTIVE, TERMINATED, ACTIVATING and TERMINATING (the last two are - // transitory). - StatusFilter *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeGameSessionDetailsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeGameSessionDetailsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeGameSessionDetailsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeGameSessionDetailsInput"} - if s.GameSessionId != nil && len(*s.GameSessionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionId", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.StatusFilter != nil && len(*s.StatusFilter) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatusFilter", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliasId sets the AliasId field's value. -func (s *DescribeGameSessionDetailsInput) SetAliasId(v string) *DescribeGameSessionDetailsInput { - s.AliasId = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *DescribeGameSessionDetailsInput) SetFleetId(v string) *DescribeGameSessionDetailsInput { - s.FleetId = &v - return s -} - -// SetGameSessionId sets the GameSessionId field's value. -func (s *DescribeGameSessionDetailsInput) SetGameSessionId(v string) *DescribeGameSessionDetailsInput { - s.GameSessionId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeGameSessionDetailsInput) SetLimit(v int64) *DescribeGameSessionDetailsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeGameSessionDetailsInput) SetNextToken(v string) *DescribeGameSessionDetailsInput { - s.NextToken = &v - return s -} - -// SetStatusFilter sets the StatusFilter field's value. -func (s *DescribeGameSessionDetailsInput) SetStatusFilter(v string) *DescribeGameSessionDetailsInput { - s.StatusFilter = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeGameSessionDetailsOutput struct { - _ struct{} `type:"structure"` - - // Collection of objects containing game session properties and the protection - // policy currently in force for each session matching the request. - GameSessionDetails []*GameSessionDetail `type:"list"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeGameSessionDetailsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeGameSessionDetailsOutput) GoString() string { - return s.String() -} - -// SetGameSessionDetails sets the GameSessionDetails field's value. -func (s *DescribeGameSessionDetailsOutput) SetGameSessionDetails(v []*GameSessionDetail) *DescribeGameSessionDetailsOutput { - s.GameSessionDetails = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeGameSessionDetailsOutput) SetNextToken(v string) *DescribeGameSessionDetailsOutput { - s.NextToken = &v - return s -} - -// Represents the input for a request action. -type DescribeGameSessionPlacementInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a game session placement to retrieve. - // - // PlacementId is a required field - PlacementId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeGameSessionPlacementInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeGameSessionPlacementInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeGameSessionPlacementInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeGameSessionPlacementInput"} - if s.PlacementId == nil { - invalidParams.Add(request.NewErrParamRequired("PlacementId")) - } - if s.PlacementId != nil && len(*s.PlacementId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlacementId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPlacementId sets the PlacementId field's value. -func (s *DescribeGameSessionPlacementInput) SetPlacementId(v string) *DescribeGameSessionPlacementInput { - s.PlacementId = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeGameSessionPlacementOutput struct { - _ struct{} `type:"structure"` - - // Object that describes the requested game session placement. - GameSessionPlacement *GameSessionPlacement `type:"structure"` -} - -// String returns the string representation -func (s DescribeGameSessionPlacementOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeGameSessionPlacementOutput) GoString() string { - return s.String() -} - -// SetGameSessionPlacement sets the GameSessionPlacement field's value. -func (s *DescribeGameSessionPlacementOutput) SetGameSessionPlacement(v *GameSessionPlacement) *DescribeGameSessionPlacementOutput { - s.GameSessionPlacement = v - return s -} - -// Represents the input for a request action. -type DescribeGameSessionQueuesInput struct { - _ struct{} `type:"structure"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. - Limit *int64 `min:"1" type:"integer"` - - // List of queue names to retrieve information for. To request settings for - // all queues, leave this parameter empty. - Names []*string `type:"list"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeGameSessionQueuesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeGameSessionQueuesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeGameSessionQueuesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeGameSessionQueuesInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *DescribeGameSessionQueuesInput) SetLimit(v int64) *DescribeGameSessionQueuesInput { - s.Limit = &v - return s -} - -// SetNames sets the Names field's value. -func (s *DescribeGameSessionQueuesInput) SetNames(v []*string) *DescribeGameSessionQueuesInput { - s.Names = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeGameSessionQueuesInput) SetNextToken(v string) *DescribeGameSessionQueuesInput { - s.NextToken = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeGameSessionQueuesOutput struct { - _ struct{} `type:"structure"` - - // Collection of objects that describes the requested game session queues. - GameSessionQueues []*GameSessionQueue `type:"list"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeGameSessionQueuesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeGameSessionQueuesOutput) GoString() string { - return s.String() -} - -// SetGameSessionQueues sets the GameSessionQueues field's value. -func (s *DescribeGameSessionQueuesOutput) SetGameSessionQueues(v []*GameSessionQueue) *DescribeGameSessionQueuesOutput { - s.GameSessionQueues = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeGameSessionQueuesOutput) SetNextToken(v string) *DescribeGameSessionQueuesOutput { - s.NextToken = &v - return s -} - -// Represents the input for a request action. -type DescribeGameSessionsInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for an alias associated with the fleet to retrieve all - // game sessions for. - AliasId *string `type:"string"` - - // Unique identifier for a fleet to retrieve all game sessions for. - FleetId *string `type:"string"` - - // Unique identifier for the game session to retrieve. You can use either a - // GameSessionId or GameSessionArn value. - GameSessionId *string `min:"1" type:"string"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. - Limit *int64 `min:"1" type:"integer"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. - NextToken *string `min:"1" type:"string"` - - // Game session status to filter results on. Possible game session statuses - // include ACTIVE, TERMINATED, ACTIVATING, and TERMINATING (the last two are - // transitory). - StatusFilter *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeGameSessionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeGameSessionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeGameSessionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeGameSessionsInput"} - if s.GameSessionId != nil && len(*s.GameSessionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionId", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.StatusFilter != nil && len(*s.StatusFilter) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatusFilter", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliasId sets the AliasId field's value. -func (s *DescribeGameSessionsInput) SetAliasId(v string) *DescribeGameSessionsInput { - s.AliasId = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *DescribeGameSessionsInput) SetFleetId(v string) *DescribeGameSessionsInput { - s.FleetId = &v - return s -} - -// SetGameSessionId sets the GameSessionId field's value. -func (s *DescribeGameSessionsInput) SetGameSessionId(v string) *DescribeGameSessionsInput { - s.GameSessionId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeGameSessionsInput) SetLimit(v int64) *DescribeGameSessionsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeGameSessionsInput) SetNextToken(v string) *DescribeGameSessionsInput { - s.NextToken = &v - return s -} - -// SetStatusFilter sets the StatusFilter field's value. -func (s *DescribeGameSessionsInput) SetStatusFilter(v string) *DescribeGameSessionsInput { - s.StatusFilter = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeGameSessionsOutput struct { - _ struct{} `type:"structure"` - - // Collection of objects containing game session properties for each session - // matching the request. - GameSessions []*GameSession `type:"list"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeGameSessionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeGameSessionsOutput) GoString() string { - return s.String() -} - -// SetGameSessions sets the GameSessions field's value. -func (s *DescribeGameSessionsOutput) SetGameSessions(v []*GameSession) *DescribeGameSessionsOutput { - s.GameSessions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeGameSessionsOutput) SetNextToken(v string) *DescribeGameSessionsOutput { - s.NextToken = &v - return s -} - -// Represents the input for a request action. -type DescribeInstancesInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet to retrieve instance information for. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // Unique identifier for an instance to retrieve. Specify an instance ID or - // leave blank to retrieve all instances in the fleet. - InstanceId *string `type:"string"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. - Limit *int64 `min:"1" type:"integer"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInstancesInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetId sets the FleetId field's value. -func (s *DescribeInstancesInput) SetFleetId(v string) *DescribeInstancesInput { - s.FleetId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DescribeInstancesInput) SetInstanceId(v string) *DescribeInstancesInput { - s.InstanceId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeInstancesInput) SetLimit(v int64) *DescribeInstancesInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstancesInput) SetNextToken(v string) *DescribeInstancesInput { - s.NextToken = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeInstancesOutput struct { - _ struct{} `type:"structure"` - - // Collection of objects containing properties for each instance returned. - Instances []*Instance `type:"list"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstancesOutput) GoString() string { - return s.String() -} - -// SetInstances sets the Instances field's value. -func (s *DescribeInstancesOutput) SetInstances(v []*Instance) *DescribeInstancesOutput { - s.Instances = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstancesOutput) SetNextToken(v string) *DescribeInstancesOutput { - s.NextToken = &v - return s -} - -// Represents the input for a request action. -type DescribeMatchmakingConfigurationsInput struct { - _ struct{} `type:"structure"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. This parameter is limited to 10. - Limit *int64 `min:"1" type:"integer"` - - // Unique identifier for a matchmaking configuration(s) to retrieve. To request - // all existing configurations, leave this parameter empty. - Names []*string `type:"list"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. - NextToken *string `min:"1" type:"string"` - - // Unique identifier for a matchmaking rule set. Use this parameter to retrieve - // all matchmaking configurations that use this rule set. - RuleSetName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeMatchmakingConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMatchmakingConfigurationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMatchmakingConfigurationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMatchmakingConfigurationsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.RuleSetName != nil && len(*s.RuleSetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleSetName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *DescribeMatchmakingConfigurationsInput) SetLimit(v int64) *DescribeMatchmakingConfigurationsInput { - s.Limit = &v - return s -} - -// SetNames sets the Names field's value. -func (s *DescribeMatchmakingConfigurationsInput) SetNames(v []*string) *DescribeMatchmakingConfigurationsInput { - s.Names = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMatchmakingConfigurationsInput) SetNextToken(v string) *DescribeMatchmakingConfigurationsInput { - s.NextToken = &v - return s -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *DescribeMatchmakingConfigurationsInput) SetRuleSetName(v string) *DescribeMatchmakingConfigurationsInput { - s.RuleSetName = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeMatchmakingConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // Collection of requested matchmaking configuration objects. - Configurations []*MatchmakingConfiguration `type:"list"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeMatchmakingConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMatchmakingConfigurationsOutput) GoString() string { - return s.String() -} - -// SetConfigurations sets the Configurations field's value. -func (s *DescribeMatchmakingConfigurationsOutput) SetConfigurations(v []*MatchmakingConfiguration) *DescribeMatchmakingConfigurationsOutput { - s.Configurations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMatchmakingConfigurationsOutput) SetNextToken(v string) *DescribeMatchmakingConfigurationsOutput { - s.NextToken = &v - return s -} - -// Represents the input for a request action. -type DescribeMatchmakingInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a matchmaking ticket. You can include up to 10 ID values. - // - // TicketIds is a required field - TicketIds []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeMatchmakingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMatchmakingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMatchmakingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMatchmakingInput"} - if s.TicketIds == nil { - invalidParams.Add(request.NewErrParamRequired("TicketIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTicketIds sets the TicketIds field's value. -func (s *DescribeMatchmakingInput) SetTicketIds(v []*string) *DescribeMatchmakingInput { - s.TicketIds = v - return s -} - -// Represents the returned data in response to a request action. -type DescribeMatchmakingOutput struct { - _ struct{} `type:"structure"` - - // Collection of existing matchmaking ticket objects matching the request. - TicketList []*MatchmakingTicket `type:"list"` -} - -// String returns the string representation -func (s DescribeMatchmakingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMatchmakingOutput) GoString() string { - return s.String() -} - -// SetTicketList sets the TicketList field's value. -func (s *DescribeMatchmakingOutput) SetTicketList(v []*MatchmakingTicket) *DescribeMatchmakingOutput { - s.TicketList = v - return s -} - -// Represents the input for a request action. -type DescribeMatchmakingRuleSetsInput struct { - _ struct{} `type:"structure"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. - Limit *int64 `min:"1" type:"integer"` - - // Unique identifier for a matchmaking rule set. This name is used to identify - // the rule set associated with a matchmaking configuration. - Names []*string `min:"1" type:"list"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeMatchmakingRuleSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMatchmakingRuleSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMatchmakingRuleSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMatchmakingRuleSetsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Names != nil && len(s.Names) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Names", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *DescribeMatchmakingRuleSetsInput) SetLimit(v int64) *DescribeMatchmakingRuleSetsInput { - s.Limit = &v - return s -} - -// SetNames sets the Names field's value. -func (s *DescribeMatchmakingRuleSetsInput) SetNames(v []*string) *DescribeMatchmakingRuleSetsInput { - s.Names = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMatchmakingRuleSetsInput) SetNextToken(v string) *DescribeMatchmakingRuleSetsInput { - s.NextToken = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeMatchmakingRuleSetsOutput struct { - _ struct{} `type:"structure"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` - - // Collection of requested matchmaking rule set objects. - // - // RuleSets is a required field - RuleSets []*MatchmakingRuleSet `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeMatchmakingRuleSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMatchmakingRuleSetsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMatchmakingRuleSetsOutput) SetNextToken(v string) *DescribeMatchmakingRuleSetsOutput { - s.NextToken = &v - return s -} - -// SetRuleSets sets the RuleSets field's value. -func (s *DescribeMatchmakingRuleSetsOutput) SetRuleSets(v []*MatchmakingRuleSet) *DescribeMatchmakingRuleSetsOutput { - s.RuleSets = v - return s -} - -// Represents the input for a request action. -type DescribePlayerSessionsInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for the game session to retrieve player sessions for. - GameSessionId *string `min:"1" type:"string"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. If a player session ID is specified, - // this parameter is ignored. - Limit *int64 `min:"1" type:"integer"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. If a player session - // ID is specified, this parameter is ignored. - NextToken *string `min:"1" type:"string"` - - // Unique identifier for a player to retrieve player sessions for. - PlayerId *string `min:"1" type:"string"` - - // Unique identifier for a player session to retrieve. - PlayerSessionId *string `type:"string"` - - // Player session status to filter results on. - // - // Possible player session statuses include the following: - // - // * RESERVED -- The player session request has been received, but the player - // has not yet connected to the server process and/or been validated. - // - // * ACTIVE -- The player has been validated by the server process and is - // currently connected. - // - // * COMPLETED -- The player connection has been dropped. - // - // * TIMEDOUT -- A player session request was received, but the player did - // not connect and/or was not validated within the timeout limit (60 seconds). - PlayerSessionStatusFilter *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribePlayerSessionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePlayerSessionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribePlayerSessionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribePlayerSessionsInput"} - if s.GameSessionId != nil && len(*s.GameSessionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionId", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.PlayerId != nil && len(*s.PlayerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlayerId", 1)) - } - if s.PlayerSessionStatusFilter != nil && len(*s.PlayerSessionStatusFilter) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlayerSessionStatusFilter", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGameSessionId sets the GameSessionId field's value. -func (s *DescribePlayerSessionsInput) SetGameSessionId(v string) *DescribePlayerSessionsInput { - s.GameSessionId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribePlayerSessionsInput) SetLimit(v int64) *DescribePlayerSessionsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePlayerSessionsInput) SetNextToken(v string) *DescribePlayerSessionsInput { - s.NextToken = &v - return s -} - -// SetPlayerId sets the PlayerId field's value. -func (s *DescribePlayerSessionsInput) SetPlayerId(v string) *DescribePlayerSessionsInput { - s.PlayerId = &v - return s -} - -// SetPlayerSessionId sets the PlayerSessionId field's value. -func (s *DescribePlayerSessionsInput) SetPlayerSessionId(v string) *DescribePlayerSessionsInput { - s.PlayerSessionId = &v - return s -} - -// SetPlayerSessionStatusFilter sets the PlayerSessionStatusFilter field's value. -func (s *DescribePlayerSessionsInput) SetPlayerSessionStatusFilter(v string) *DescribePlayerSessionsInput { - s.PlayerSessionStatusFilter = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribePlayerSessionsOutput struct { - _ struct{} `type:"structure"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` - - // Collection of objects containing properties for each player session that - // matches the request. - PlayerSessions []*PlayerSession `type:"list"` -} - -// String returns the string representation -func (s DescribePlayerSessionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePlayerSessionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePlayerSessionsOutput) SetNextToken(v string) *DescribePlayerSessionsOutput { - s.NextToken = &v - return s -} - -// SetPlayerSessions sets the PlayerSessions field's value. -func (s *DescribePlayerSessionsOutput) SetPlayerSessions(v []*PlayerSession) *DescribePlayerSessionsOutput { - s.PlayerSessions = v - return s -} - -// Represents the input for a request action. -type DescribeRuntimeConfigurationInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet to get the run-time configuration for. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeRuntimeConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRuntimeConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRuntimeConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRuntimeConfigurationInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetId sets the FleetId field's value. -func (s *DescribeRuntimeConfigurationInput) SetFleetId(v string) *DescribeRuntimeConfigurationInput { - s.FleetId = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeRuntimeConfigurationOutput struct { - _ struct{} `type:"structure"` - - // Instructions describing how server processes should be launched and maintained - // on each instance in the fleet. - RuntimeConfiguration *RuntimeConfiguration `type:"structure"` -} - -// String returns the string representation -func (s DescribeRuntimeConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRuntimeConfigurationOutput) GoString() string { - return s.String() -} - -// SetRuntimeConfiguration sets the RuntimeConfiguration field's value. -func (s *DescribeRuntimeConfigurationOutput) SetRuntimeConfiguration(v *RuntimeConfiguration) *DescribeRuntimeConfigurationOutput { - s.RuntimeConfiguration = v - return s -} - -// Represents the input for a request action. -type DescribeScalingPoliciesInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet to retrieve scaling policies for. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. - Limit *int64 `min:"1" type:"integer"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. - NextToken *string `min:"1" type:"string"` - - // Scaling policy status to filter results on. A scaling policy is only in force - // when in an ACTIVE status. - // - // * ACTIVE -- The scaling policy is currently in force. - // - // * UPDATEREQUESTED -- A request to update the scaling policy has been received. - // - // * UPDATING -- A change is being made to the scaling policy. - // - // * DELETEREQUESTED -- A request to delete the scaling policy has been received. - // - // * DELETING -- The scaling policy is being deleted. - // - // * DELETED -- The scaling policy has been deleted. - // - // * ERROR -- An error occurred in creating the policy. It should be removed - // and recreated. - StatusFilter *string `type:"string" enum:"ScalingStatusType"` -} - -// String returns the string representation -func (s DescribeScalingPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScalingPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeScalingPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeScalingPoliciesInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetId sets the FleetId field's value. -func (s *DescribeScalingPoliciesInput) SetFleetId(v string) *DescribeScalingPoliciesInput { - s.FleetId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeScalingPoliciesInput) SetLimit(v int64) *DescribeScalingPoliciesInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScalingPoliciesInput) SetNextToken(v string) *DescribeScalingPoliciesInput { - s.NextToken = &v - return s -} - -// SetStatusFilter sets the StatusFilter field's value. -func (s *DescribeScalingPoliciesInput) SetStatusFilter(v string) *DescribeScalingPoliciesInput { - s.StatusFilter = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeScalingPoliciesOutput struct { - _ struct{} `type:"structure"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` - - // Collection of objects containing the scaling policies matching the request. - ScalingPolicies []*ScalingPolicy `type:"list"` -} - -// String returns the string representation -func (s DescribeScalingPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScalingPoliciesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScalingPoliciesOutput) SetNextToken(v string) *DescribeScalingPoliciesOutput { - s.NextToken = &v - return s -} - -// SetScalingPolicies sets the ScalingPolicies field's value. -func (s *DescribeScalingPoliciesOutput) SetScalingPolicies(v []*ScalingPolicy) *DescribeScalingPoliciesOutput { - s.ScalingPolicies = v - return s -} - -type DescribeVpcPeeringAuthorizationsInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeVpcPeeringAuthorizationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcPeeringAuthorizationsInput) GoString() string { - return s.String() -} - -type DescribeVpcPeeringAuthorizationsOutput struct { - _ struct{} `type:"structure"` - - // Collection of objects that describe all valid VPC peering operations for - // the current AWS account. - VpcPeeringAuthorizations []*VpcPeeringAuthorization `type:"list"` -} - -// String returns the string representation -func (s DescribeVpcPeeringAuthorizationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcPeeringAuthorizationsOutput) GoString() string { - return s.String() -} - -// SetVpcPeeringAuthorizations sets the VpcPeeringAuthorizations field's value. -func (s *DescribeVpcPeeringAuthorizationsOutput) SetVpcPeeringAuthorizations(v []*VpcPeeringAuthorization) *DescribeVpcPeeringAuthorizationsOutput { - s.VpcPeeringAuthorizations = v - return s -} - -// Represents the input for a request action. -type DescribeVpcPeeringConnectionsInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet. - FleetId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeVpcPeeringConnectionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcPeeringConnectionsInput) GoString() string { - return s.String() -} - -// SetFleetId sets the FleetId field's value. -func (s *DescribeVpcPeeringConnectionsInput) SetFleetId(v string) *DescribeVpcPeeringConnectionsInput { - s.FleetId = &v - return s -} - -// Represents the returned data in response to a request action. -type DescribeVpcPeeringConnectionsOutput struct { - _ struct{} `type:"structure"` - - // Collection of VPC peering connection records that match the request. - VpcPeeringConnections []*VpcPeeringConnection `type:"list"` -} - -// String returns the string representation -func (s DescribeVpcPeeringConnectionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcPeeringConnectionsOutput) GoString() string { - return s.String() -} - -// SetVpcPeeringConnections sets the VpcPeeringConnections field's value. -func (s *DescribeVpcPeeringConnectionsOutput) SetVpcPeeringConnections(v []*VpcPeeringConnection) *DescribeVpcPeeringConnectionsOutput { - s.VpcPeeringConnections = v - return s -} - -// Player information for use when creating player sessions using a game session -// placement request with StartGameSessionPlacement. -type DesiredPlayerSession struct { - _ struct{} `type:"structure"` - - // Developer-defined information related to a player. Amazon GameLift does not - // use this data, so it can be formatted as needed for use in the game. - PlayerData *string `min:"1" type:"string"` - - // Unique identifier for a player to associate with the player session. - PlayerId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DesiredPlayerSession) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DesiredPlayerSession) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DesiredPlayerSession) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DesiredPlayerSession"} - if s.PlayerData != nil && len(*s.PlayerData) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlayerData", 1)) - } - if s.PlayerId != nil && len(*s.PlayerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlayerId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPlayerData sets the PlayerData field's value. -func (s *DesiredPlayerSession) SetPlayerData(v string) *DesiredPlayerSession { - s.PlayerData = &v - return s -} - -// SetPlayerId sets the PlayerId field's value. -func (s *DesiredPlayerSession) SetPlayerId(v string) *DesiredPlayerSession { - s.PlayerId = &v - return s -} - -// Current status of fleet capacity. The number of active instances should match -// or be in the process of matching the number of desired instances. Pending -// and terminating counts are non-zero only if fleet capacity is adjusting to -// an UpdateFleetCapacity request, or if access to resources is temporarily -// affected. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -type EC2InstanceCounts struct { - _ struct{} `type:"structure"` - - // Actual number of active instances in the fleet. - ACTIVE *int64 `type:"integer"` - - // Ideal number of active instances in the fleet. - DESIRED *int64 `type:"integer"` - - // Number of active instances in the fleet that are not currently hosting a - // game session. - IDLE *int64 `type:"integer"` - - // Maximum value allowed for the fleet's instance count. - MAXIMUM *int64 `type:"integer"` - - // Minimum value allowed for the fleet's instance count. - MINIMUM *int64 `type:"integer"` - - // Number of instances in the fleet that are starting but not yet active. - PENDING *int64 `type:"integer"` - - // Number of instances in the fleet that are no longer active but haven't yet - // been terminated. - TERMINATING *int64 `type:"integer"` -} - -// String returns the string representation -func (s EC2InstanceCounts) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EC2InstanceCounts) GoString() string { - return s.String() -} - -// SetACTIVE sets the ACTIVE field's value. -func (s *EC2InstanceCounts) SetACTIVE(v int64) *EC2InstanceCounts { - s.ACTIVE = &v - return s -} - -// SetDESIRED sets the DESIRED field's value. -func (s *EC2InstanceCounts) SetDESIRED(v int64) *EC2InstanceCounts { - s.DESIRED = &v - return s -} - -// SetIDLE sets the IDLE field's value. -func (s *EC2InstanceCounts) SetIDLE(v int64) *EC2InstanceCounts { - s.IDLE = &v - return s -} - -// SetMAXIMUM sets the MAXIMUM field's value. -func (s *EC2InstanceCounts) SetMAXIMUM(v int64) *EC2InstanceCounts { - s.MAXIMUM = &v - return s -} - -// SetMINIMUM sets the MINIMUM field's value. -func (s *EC2InstanceCounts) SetMINIMUM(v int64) *EC2InstanceCounts { - s.MINIMUM = &v - return s -} - -// SetPENDING sets the PENDING field's value. -func (s *EC2InstanceCounts) SetPENDING(v int64) *EC2InstanceCounts { - s.PENDING = &v - return s -} - -// SetTERMINATING sets the TERMINATING field's value. -func (s *EC2InstanceCounts) SetTERMINATING(v int64) *EC2InstanceCounts { - s.TERMINATING = &v - return s -} - -// Maximum number of instances allowed based on the Amazon Elastic Compute Cloud -// (Amazon EC2) instance type. Instance limits can be retrieved by calling DescribeEC2InstanceLimits. -type EC2InstanceLimit struct { - _ struct{} `type:"structure"` - - // Number of instances of the specified type that are currently in use by this - // AWS account. - CurrentInstances *int64 `type:"integer"` - - // Name of an EC2 instance type that is supported in Amazon GameLift. A fleet - // instance type determines the computing resources of each instance in the - // fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift - // supports the following EC2 instance types. See Amazon EC2 Instance Types - // (http://aws.amazon.com/ec2/instance-types/) for detailed descriptions. - EC2InstanceType *string `type:"string" enum:"EC2InstanceType"` - - // Number of instances allowed. - InstanceLimit *int64 `type:"integer"` -} - -// String returns the string representation -func (s EC2InstanceLimit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EC2InstanceLimit) GoString() string { - return s.String() -} - -// SetCurrentInstances sets the CurrentInstances field's value. -func (s *EC2InstanceLimit) SetCurrentInstances(v int64) *EC2InstanceLimit { - s.CurrentInstances = &v - return s -} - -// SetEC2InstanceType sets the EC2InstanceType field's value. -func (s *EC2InstanceLimit) SetEC2InstanceType(v string) *EC2InstanceLimit { - s.EC2InstanceType = &v - return s -} - -// SetInstanceLimit sets the InstanceLimit field's value. -func (s *EC2InstanceLimit) SetInstanceLimit(v int64) *EC2InstanceLimit { - s.InstanceLimit = &v - return s -} - -// Log entry describing an event that involves Amazon GameLift resources (such -// as a fleet). In addition to tracking activity, event codes and messages can -// provide additional information for troubleshooting and debugging problems. -type Event struct { - _ struct{} `type:"structure"` - - // Type of event being logged. The following events are currently in use: - // - // Fleet creation events: - // - // * FLEET_CREATED -- A fleet record was successfully created with a status - // of NEW. Event messaging includes the fleet ID. - // - // * FLEET_STATE_DOWNLOADING -- Fleet status changed from NEW to DOWNLOADING. - // The compressed build has started downloading to a fleet instance for installation. - // - // * FLEET_BINARY_DOWNLOAD_FAILED -- The build failed to download to the - // fleet instance. - // - // * FLEET_CREATION_EXTRACTING_BUILD – The game server build was successfully - // downloaded to an instance, and the build files are now being extracted - // from the uploaded build and saved to an instance. Failure at this stage - // prevents a fleet from moving to ACTIVE status. Logs for this stage display - // a list of the files that are extracted and saved on the instance. Access - // the logs by using the URL in PreSignedLogUrl. - // - // * FLEET_CREATION_RUNNING_INSTALLER – The game server build files were - // successfully extracted, and the Amazon GameLift is now running the build's - // install script (if one is included). Failure in this stage prevents a - // fleet from moving to ACTIVE status. Logs for this stage list the installation - // steps and whether or not the install completed successfully. Access the - // logs by using the URL in PreSignedLogUrl. - // - // * FLEET_CREATION_VALIDATING_RUNTIME_CONFIG -- The build process was successful, - // and the Amazon GameLift is now verifying that the game server launch paths, - // which are specified in the fleet's run-time configuration, exist. If any - // listed launch path exists, Amazon GameLift tries to launch a game server - // process and waits for the process to report ready. Failures in this stage - // prevent a fleet from moving to ACTIVE status. Logs for this stage list - // the launch paths in the run-time configuration and indicate whether each - // is found. Access the logs by using the URL in PreSignedLogUrl. - // - // * FLEET_STATE_VALIDATING -- Fleet status changed from DOWNLOADING to VALIDATING. - // - // * FLEET_VALIDATION_LAUNCH_PATH_NOT_FOUND -- Validation of the run-time - // configuration failed because the executable specified in a launch path - // does not exist on the instance. - // - // * FLEET_STATE_BUILDING -- Fleet status changed from VALIDATING to BUILDING. - // - // * FLEET_VALIDATION_EXECUTABLE_RUNTIME_FAILURE -- Validation of the run-time - // configuration failed because the executable specified in a launch path - // failed to run on the fleet instance. - // - // * FLEET_STATE_ACTIVATING -- Fleet status changed from BUILDING to ACTIVATING. - // - // - // * FLEET_ACTIVATION_FAILED - The fleet failed to successfully complete - // one of the steps in the fleet activation process. This event code indicates - // that the game build was successfully downloaded to a fleet instance, built, - // and validated, but was not able to start a server process. A possible - // reason for failure is that the game server is not reporting "process ready" - // to the Amazon GameLift service. - // - // * FLEET_STATE_ACTIVE -- The fleet's status changed from ACTIVATING to - // ACTIVE. The fleet is now ready to host game sessions. - // - // VPC peering events: - // - // * FLEET_VPC_PEERING_SUCCEEDED -- A VPC peering connection has been established - // between the VPC for an Amazon GameLift fleet and a VPC in your AWS account. - // - // * FLEET_VPC_PEERING_FAILED -- A requested VPC peering connection has failed. - // Event details and status information (see DescribeVpcPeeringConnections) - // provide additional detail. A common reason for peering failure is that - // the two VPCs have overlapping CIDR blocks of IPv4 addresses. To resolve - // this, change the CIDR block for the VPC in your AWS account. For more - // information on VPC peering failures, see http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/invalid-peering-configurations.html - // (http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/invalid-peering-configurations.html) - // - // * FLEET_VPC_PEERING_DELETED -- A VPC peering connection has been successfully - // deleted. - // - // Spot instance events: - // - // * INSTANCE_INTERRUPTED -- A spot instance was interrupted by EC2 with - // a two-minute notification. - // - // Other fleet events: - // - // * FLEET_SCALING_EVENT -- A change was made to the fleet's capacity settings - // (desired instances, minimum/maximum scaling limits). Event messaging includes - // the new capacity settings. - // - // * FLEET_NEW_GAME_SESSION_PROTECTION_POLICY_UPDATED -- A change was made - // to the fleet's game session protection policy setting. Event messaging - // includes both the old and new policy setting. - // - // * FLEET_DELETED -- A request to delete a fleet was initiated. - // - // * GENERIC_EVENT -- An unspecified event has occurred. - EventCode *string `type:"string" enum:"EventCode"` - - // Unique identifier for a fleet event. - EventId *string `min:"1" type:"string"` - - // Time stamp indicating when this event occurred. Format is a number expressed - // in Unix time as milliseconds (for example "1469498468.057"). - EventTime *time.Time `type:"timestamp"` - - // Additional information related to the event. - Message *string `min:"1" type:"string"` - - // Location of stored logs with additional detail that is related to the event. - // This is useful for debugging issues. The URL is valid for 15 minutes. You - // can also access fleet creation logs through the Amazon GameLift console. - PreSignedLogUrl *string `min:"1" type:"string"` - - // Unique identifier for an event resource, such as a fleet ID. - ResourceId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s Event) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Event) GoString() string { - return s.String() -} - -// SetEventCode sets the EventCode field's value. -func (s *Event) SetEventCode(v string) *Event { - s.EventCode = &v - return s -} - -// SetEventId sets the EventId field's value. -func (s *Event) SetEventId(v string) *Event { - s.EventId = &v - return s -} - -// SetEventTime sets the EventTime field's value. -func (s *Event) SetEventTime(v time.Time) *Event { - s.EventTime = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *Event) SetMessage(v string) *Event { - s.Message = &v - return s -} - -// SetPreSignedLogUrl sets the PreSignedLogUrl field's value. -func (s *Event) SetPreSignedLogUrl(v string) *Event { - s.PreSignedLogUrl = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *Event) SetResourceId(v string) *Event { - s.ResourceId = &v - return s -} - -// General properties describing a fleet. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -type FleetAttributes struct { - _ struct{} `type:"structure"` - - // Unique identifier for a build. - BuildId *string `type:"string"` - - // Time stamp indicating when this data object was created. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp"` - - // Human-readable description of the fleet. - Description *string `min:"1" type:"string"` - - // Identifier for a fleet that is unique across all regions. - FleetArn *string `min:"1" type:"string"` - - // Unique identifier for a fleet. - FleetId *string `type:"string"` - - // Indicates whether the fleet uses on-demand or spot instances. A spot instance - // in use may be interrupted with a two-minute notification. - FleetType *string `type:"string" enum:"FleetType"` - - // EC2 instance type indicating the computing resources of each instance in - // the fleet, including CPU, memory, storage, and networking capacity. See Amazon - // EC2 Instance Types (http://aws.amazon.com/ec2/instance-types/) for detailed - // descriptions. - InstanceType *string `type:"string" enum:"EC2InstanceType"` - - // Location of default log files. When a server process is shut down, Amazon - // GameLift captures and stores any log files in this location. These logs are - // in addition to game session logs; see more on game session logs in the Amazon - // GameLift Developer Guide (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-api-server-code). - // If no default log path for a fleet is specified, Amazon GameLift automatically - // uploads logs that are stored on each instance at C:\game\logs (for Windows) - // or /local/game/logs (for Linux). Use the Amazon GameLift console to access - // stored logs. - LogPaths []*string `type:"list"` - - // Names of metric groups that this fleet is included in. In Amazon CloudWatch, - // you can view metrics for an individual fleet or aggregated metrics for fleets - // that are in a fleet metric group. A fleet can be included in only one metric - // group at a time. - MetricGroups []*string `type:"list"` - - // Descriptive label that is associated with a fleet. Fleet names do not need - // to be unique. - Name *string `min:"1" type:"string"` - - // Type of game session protection to set for all new instances started in the - // fleet. - // - // * NoProtection -- The game session can be terminated during a scale-down - // event. - // - // * FullProtection -- If the game session is in an ACTIVE status, it cannot - // be terminated during a scale-down event. - NewGameSessionProtectionPolicy *string `type:"string" enum:"ProtectionPolicy"` - - // Operating system of the fleet's computing resources. A fleet's operating - // system depends on the OS specified for the build that is deployed on this - // fleet. - OperatingSystem *string `type:"string" enum:"OperatingSystem"` - - // Fleet policy to limit the number of game sessions an individual player can - // create over a span of time. - ResourceCreationLimitPolicy *ResourceCreationLimitPolicy `type:"structure"` - - // Game server launch parameters specified for fleets created before 2016-08-04 - // (or AWS SDK v. 0.12.16). Server launch parameters for fleets created after - // this date are specified in the fleet's RuntimeConfiguration. - ServerLaunchParameters *string `min:"1" type:"string"` - - // Path to a game server executable in the fleet's build, specified for fleets - // created before 2016-08-04 (or AWS SDK v. 0.12.16). Server launch paths for - // fleets created after this date are specified in the fleet's RuntimeConfiguration. - ServerLaunchPath *string `min:"1" type:"string"` - - // Current status of the fleet. - // - // Possible fleet statuses include the following: - // - // * NEW -- A new fleet has been defined and desired instances is set to - // 1. - // - // * DOWNLOADING/VALIDATING/BUILDING/ACTIVATING -- Amazon GameLift is setting - // up the new fleet, creating new instances with the game build and starting - // server processes. - // - // * ACTIVE -- Hosts can now accept game sessions. - // - // * ERROR -- An error occurred when downloading, validating, building, or - // activating the fleet. - // - // * DELETING -- Hosts are responding to a delete fleet request. - // - // * TERMINATED -- The fleet no longer exists. - Status *string `type:"string" enum:"FleetStatus"` - - // List of fleet actions that have been suspended using StopFleetActions. This - // includes auto-scaling. - StoppedActions []*string `min:"1" type:"list"` - - // Time stamp indicating when this data object was terminated. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). - TerminationTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s FleetAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FleetAttributes) GoString() string { - return s.String() -} - -// SetBuildId sets the BuildId field's value. -func (s *FleetAttributes) SetBuildId(v string) *FleetAttributes { - s.BuildId = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *FleetAttributes) SetCreationTime(v time.Time) *FleetAttributes { - s.CreationTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *FleetAttributes) SetDescription(v string) *FleetAttributes { - s.Description = &v - return s -} - -// SetFleetArn sets the FleetArn field's value. -func (s *FleetAttributes) SetFleetArn(v string) *FleetAttributes { - s.FleetArn = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *FleetAttributes) SetFleetId(v string) *FleetAttributes { - s.FleetId = &v - return s -} - -// SetFleetType sets the FleetType field's value. -func (s *FleetAttributes) SetFleetType(v string) *FleetAttributes { - s.FleetType = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *FleetAttributes) SetInstanceType(v string) *FleetAttributes { - s.InstanceType = &v - return s -} - -// SetLogPaths sets the LogPaths field's value. -func (s *FleetAttributes) SetLogPaths(v []*string) *FleetAttributes { - s.LogPaths = v - return s -} - -// SetMetricGroups sets the MetricGroups field's value. -func (s *FleetAttributes) SetMetricGroups(v []*string) *FleetAttributes { - s.MetricGroups = v - return s -} - -// SetName sets the Name field's value. -func (s *FleetAttributes) SetName(v string) *FleetAttributes { - s.Name = &v - return s -} - -// SetNewGameSessionProtectionPolicy sets the NewGameSessionProtectionPolicy field's value. -func (s *FleetAttributes) SetNewGameSessionProtectionPolicy(v string) *FleetAttributes { - s.NewGameSessionProtectionPolicy = &v - return s -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *FleetAttributes) SetOperatingSystem(v string) *FleetAttributes { - s.OperatingSystem = &v - return s -} - -// SetResourceCreationLimitPolicy sets the ResourceCreationLimitPolicy field's value. -func (s *FleetAttributes) SetResourceCreationLimitPolicy(v *ResourceCreationLimitPolicy) *FleetAttributes { - s.ResourceCreationLimitPolicy = v - return s -} - -// SetServerLaunchParameters sets the ServerLaunchParameters field's value. -func (s *FleetAttributes) SetServerLaunchParameters(v string) *FleetAttributes { - s.ServerLaunchParameters = &v - return s -} - -// SetServerLaunchPath sets the ServerLaunchPath field's value. -func (s *FleetAttributes) SetServerLaunchPath(v string) *FleetAttributes { - s.ServerLaunchPath = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *FleetAttributes) SetStatus(v string) *FleetAttributes { - s.Status = &v - return s -} - -// SetStoppedActions sets the StoppedActions field's value. -func (s *FleetAttributes) SetStoppedActions(v []*string) *FleetAttributes { - s.StoppedActions = v - return s -} - -// SetTerminationTime sets the TerminationTime field's value. -func (s *FleetAttributes) SetTerminationTime(v time.Time) *FleetAttributes { - s.TerminationTime = &v - return s -} - -// Information about the fleet's capacity. Fleet capacity is measured in EC2 -// instances. By default, new fleets have a capacity of one instance, but can -// be updated as needed. The maximum number of instances for a fleet is determined -// by the fleet's instance type. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -type FleetCapacity struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet. - FleetId *string `type:"string"` - - // Current status of fleet capacity. - InstanceCounts *EC2InstanceCounts `type:"structure"` - - // Name of an EC2 instance type that is supported in Amazon GameLift. A fleet - // instance type determines the computing resources of each instance in the - // fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift - // supports the following EC2 instance types. See Amazon EC2 Instance Types - // (http://aws.amazon.com/ec2/instance-types/) for detailed descriptions. - InstanceType *string `type:"string" enum:"EC2InstanceType"` -} - -// String returns the string representation -func (s FleetCapacity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FleetCapacity) GoString() string { - return s.String() -} - -// SetFleetId sets the FleetId field's value. -func (s *FleetCapacity) SetFleetId(v string) *FleetCapacity { - s.FleetId = &v - return s -} - -// SetInstanceCounts sets the InstanceCounts field's value. -func (s *FleetCapacity) SetInstanceCounts(v *EC2InstanceCounts) *FleetCapacity { - s.InstanceCounts = v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *FleetCapacity) SetInstanceType(v string) *FleetCapacity { - s.InstanceType = &v - return s -} - -// Current status of fleet utilization, including the number of game and player -// sessions being hosted. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -type FleetUtilization struct { - _ struct{} `type:"structure"` - - // Number of active game sessions currently being hosted on all instances in - // the fleet. - ActiveGameSessionCount *int64 `type:"integer"` - - // Number of server processes in an ACTIVE status currently running across all - // instances in the fleet - ActiveServerProcessCount *int64 `type:"integer"` - - // Number of active player sessions currently being hosted on all instances - // in the fleet. - CurrentPlayerSessionCount *int64 `type:"integer"` - - // Unique identifier for a fleet. - FleetId *string `type:"string"` - - // Maximum players allowed across all game sessions currently being hosted on - // all instances in the fleet. - MaximumPlayerSessionCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s FleetUtilization) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FleetUtilization) GoString() string { - return s.String() -} - -// SetActiveGameSessionCount sets the ActiveGameSessionCount field's value. -func (s *FleetUtilization) SetActiveGameSessionCount(v int64) *FleetUtilization { - s.ActiveGameSessionCount = &v - return s -} - -// SetActiveServerProcessCount sets the ActiveServerProcessCount field's value. -func (s *FleetUtilization) SetActiveServerProcessCount(v int64) *FleetUtilization { - s.ActiveServerProcessCount = &v - return s -} - -// SetCurrentPlayerSessionCount sets the CurrentPlayerSessionCount field's value. -func (s *FleetUtilization) SetCurrentPlayerSessionCount(v int64) *FleetUtilization { - s.CurrentPlayerSessionCount = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *FleetUtilization) SetFleetId(v string) *FleetUtilization { - s.FleetId = &v - return s -} - -// SetMaximumPlayerSessionCount sets the MaximumPlayerSessionCount field's value. -func (s *FleetUtilization) SetMaximumPlayerSessionCount(v int64) *FleetUtilization { - s.MaximumPlayerSessionCount = &v - return s -} - -// Set of key-value pairs that contain information about a game session. When -// included in a game session request, these properties communicate details -// to be used when setting up the new game session, such as to specify a game -// mode, level, or map. Game properties are passed to the game server process -// when initiating a new game session; the server process uses the properties -// as appropriate. For more information, see the Amazon GameLift Developer -// Guide (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-client-api.html#gamelift-sdk-client-api-create). -type GameProperty struct { - _ struct{} `type:"structure"` - - // Game property identifier. - // - // Key is a required field - Key *string `type:"string" required:"true"` - - // Game property value. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GameProperty) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GameProperty) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GameProperty) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GameProperty"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *GameProperty) SetKey(v string) *GameProperty { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *GameProperty) SetValue(v string) *GameProperty { - s.Value = &v - return s -} - -// Properties describing a game session. -// -// A game session in ACTIVE status can host players. When a game session ends, -// its status is set to TERMINATED. -// -// Once the session ends, the game session object is retained for 30 days. This -// means you can reuse idempotency token values after this time. Game session -// logs are retained for 14 days. -// -// Game-session-related operations include: -// -// * CreateGameSession -// -// * DescribeGameSessions -// -// * DescribeGameSessionDetails -// -// * SearchGameSessions -// -// * UpdateGameSession -// -// * GetGameSessionLogUrl -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -type GameSession struct { - _ struct{} `type:"structure"` - - // Time stamp indicating when this data object was created. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp"` - - // Unique identifier for a player. This ID is used to enforce a resource protection - // policy (if one exists), that limits the number of game sessions a player - // can create. - CreatorId *string `min:"1" type:"string"` - - // Number of players currently in the game session. - CurrentPlayerSessionCount *int64 `type:"integer"` - - // Unique identifier for a fleet that the game session is running on. - FleetId *string `type:"string"` - - // Set of custom properties for a game session, formatted as key:value pairs. - // These properties are passed to a game server process in the GameSession object - // with a request to start a new game session (see Start a Game Session (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). - // You can search for active game sessions based on this custom data with SearchGameSessions. - GameProperties []*GameProperty `type:"list"` - - // Set of custom game session properties, formatted as a single string value. - // This data is passed to a game server process in the GameSession object with - // a request to start a new game session (see Start a Game Session (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). - GameSessionData *string `min:"1" type:"string"` - - // Unique identifier for the game session. A game session ARN has the following - // format: arn:aws:gamelift:::gamesession//. - GameSessionId *string `min:"1" type:"string"` - - // IP address of the game session. To connect to a Amazon GameLift game server, - // an app needs both the IP address and port number. - IpAddress *string `type:"string"` - - // Information about the matchmaking process that was used to create the game - // session. It is in JSON syntax, formatted as a string. In addition the matchmaking - // configuration used, it contains data on all players assigned to the match, - // including player attributes and team assignments. For more details on matchmaker - // data, see Match Data (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-server.html#match-server-data). - // Matchmaker data is useful when requesting match backfills, and is updated - // whenever new players are added during a successful backfill (see StartMatchBackfill). - MatchmakerData *string `min:"1" type:"string"` - - // Maximum number of players that can be connected simultaneously to the game - // session. - MaximumPlayerSessionCount *int64 `type:"integer"` - - // Descriptive label that is associated with a game session. Session names do - // not need to be unique. - Name *string `min:"1" type:"string"` - - // Indicates whether or not the game session is accepting new players. - PlayerSessionCreationPolicy *string `type:"string" enum:"PlayerSessionCreationPolicy"` - - // Port number for the game session. To connect to a Amazon GameLift game server, - // an app needs both the IP address and port number. - Port *int64 `min:"1" type:"integer"` - - // Current status of the game session. A game session must have an ACTIVE status - // to have player sessions. - Status *string `type:"string" enum:"GameSessionStatus"` - - // Provides additional information about game session status. INTERRUPTED indicates - // that the game session was hosted on a spot instance that was reclaimed, causing - // the active game session to be terminated. - StatusReason *string `type:"string" enum:"GameSessionStatusReason"` - - // Time stamp indicating when this data object was terminated. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). - TerminationTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s GameSession) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GameSession) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *GameSession) SetCreationTime(v time.Time) *GameSession { - s.CreationTime = &v - return s -} - -// SetCreatorId sets the CreatorId field's value. -func (s *GameSession) SetCreatorId(v string) *GameSession { - s.CreatorId = &v - return s -} - -// SetCurrentPlayerSessionCount sets the CurrentPlayerSessionCount field's value. -func (s *GameSession) SetCurrentPlayerSessionCount(v int64) *GameSession { - s.CurrentPlayerSessionCount = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *GameSession) SetFleetId(v string) *GameSession { - s.FleetId = &v - return s -} - -// SetGameProperties sets the GameProperties field's value. -func (s *GameSession) SetGameProperties(v []*GameProperty) *GameSession { - s.GameProperties = v - return s -} - -// SetGameSessionData sets the GameSessionData field's value. -func (s *GameSession) SetGameSessionData(v string) *GameSession { - s.GameSessionData = &v - return s -} - -// SetGameSessionId sets the GameSessionId field's value. -func (s *GameSession) SetGameSessionId(v string) *GameSession { - s.GameSessionId = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *GameSession) SetIpAddress(v string) *GameSession { - s.IpAddress = &v - return s -} - -// SetMatchmakerData sets the MatchmakerData field's value. -func (s *GameSession) SetMatchmakerData(v string) *GameSession { - s.MatchmakerData = &v - return s -} - -// SetMaximumPlayerSessionCount sets the MaximumPlayerSessionCount field's value. -func (s *GameSession) SetMaximumPlayerSessionCount(v int64) *GameSession { - s.MaximumPlayerSessionCount = &v - return s -} - -// SetName sets the Name field's value. -func (s *GameSession) SetName(v string) *GameSession { - s.Name = &v - return s -} - -// SetPlayerSessionCreationPolicy sets the PlayerSessionCreationPolicy field's value. -func (s *GameSession) SetPlayerSessionCreationPolicy(v string) *GameSession { - s.PlayerSessionCreationPolicy = &v - return s -} - -// SetPort sets the Port field's value. -func (s *GameSession) SetPort(v int64) *GameSession { - s.Port = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GameSession) SetStatus(v string) *GameSession { - s.Status = &v - return s -} - -// SetStatusReason sets the StatusReason field's value. -func (s *GameSession) SetStatusReason(v string) *GameSession { - s.StatusReason = &v - return s -} - -// SetTerminationTime sets the TerminationTime field's value. -func (s *GameSession) SetTerminationTime(v time.Time) *GameSession { - s.TerminationTime = &v - return s -} - -// Connection information for the new game session that is created with matchmaking. -// (with StartMatchmaking). Once a match is set, the FlexMatch engine places -// the match and creates a new game session for it. This information, including -// the game session endpoint and player sessions for each player in the original -// matchmaking request, is added to the MatchmakingTicket, which can be retrieved -// by calling DescribeMatchmaking. -type GameSessionConnectionInfo struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) - // that is assigned to a game session and uniquely identifies it. - GameSessionArn *string `min:"1" type:"string"` - - // IP address of the game session. To connect to a Amazon GameLift game server, - // an app needs both the IP address and port number. - IpAddress *string `type:"string"` - - // Collection of player session IDs, one for each player ID that was included - // in the original matchmaking request. - MatchedPlayerSessions []*MatchedPlayerSession `type:"list"` - - // Port number for the game session. To connect to a Amazon GameLift game server, - // an app needs both the IP address and port number. - Port *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s GameSessionConnectionInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GameSessionConnectionInfo) GoString() string { - return s.String() -} - -// SetGameSessionArn sets the GameSessionArn field's value. -func (s *GameSessionConnectionInfo) SetGameSessionArn(v string) *GameSessionConnectionInfo { - s.GameSessionArn = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *GameSessionConnectionInfo) SetIpAddress(v string) *GameSessionConnectionInfo { - s.IpAddress = &v - return s -} - -// SetMatchedPlayerSessions sets the MatchedPlayerSessions field's value. -func (s *GameSessionConnectionInfo) SetMatchedPlayerSessions(v []*MatchedPlayerSession) *GameSessionConnectionInfo { - s.MatchedPlayerSessions = v - return s -} - -// SetPort sets the Port field's value. -func (s *GameSessionConnectionInfo) SetPort(v int64) *GameSessionConnectionInfo { - s.Port = &v - return s -} - -// A game session's properties plus the protection policy currently in force. -type GameSessionDetail struct { - _ struct{} `type:"structure"` - - // Object that describes a game session. - GameSession *GameSession `type:"structure"` - - // Current status of protection for the game session. - // - // * NoProtection -- The game session can be terminated during a scale-down - // event. - // - // * FullProtection -- If the game session is in an ACTIVE status, it cannot - // be terminated during a scale-down event. - ProtectionPolicy *string `type:"string" enum:"ProtectionPolicy"` -} - -// String returns the string representation -func (s GameSessionDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GameSessionDetail) GoString() string { - return s.String() -} - -// SetGameSession sets the GameSession field's value. -func (s *GameSessionDetail) SetGameSession(v *GameSession) *GameSessionDetail { - s.GameSession = v - return s -} - -// SetProtectionPolicy sets the ProtectionPolicy field's value. -func (s *GameSessionDetail) SetProtectionPolicy(v string) *GameSessionDetail { - s.ProtectionPolicy = &v - return s -} - -// Object that describes a StartGameSessionPlacement request. This object includes -// the full details of the original request plus the current status and start/end -// time stamps. -// -// Game session placement-related operations include: -// -// * StartGameSessionPlacement -// -// * DescribeGameSessionPlacement -// -// * StopGameSessionPlacement -type GameSessionPlacement struct { - _ struct{} `type:"structure"` - - // Time stamp indicating when this request was completed, canceled, or timed - // out. - EndTime *time.Time `type:"timestamp"` - - // Set of custom properties for a game session, formatted as key:value pairs. - // These properties are passed to a game server process in the GameSession object - // with a request to start a new game session (see Start a Game Session (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). - GameProperties []*GameProperty `type:"list"` - - // Identifier for the game session created by this placement request. This value - // is set once the new game session is placed (placement status is FULFILLED). - // This identifier is unique across all regions. You can use this value as a - // GameSessionId value as needed. - GameSessionArn *string `min:"1" type:"string"` - - // Set of custom game session properties, formatted as a single string value. - // This data is passed to a game server process in the GameSession object with - // a request to start a new game session (see Start a Game Session (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). - GameSessionData *string `min:"1" type:"string"` - - // Unique identifier for the game session. This value is set once the new game - // session is placed (placement status is FULFILLED). - GameSessionId *string `min:"1" type:"string"` - - // Descriptive label that is associated with a game session. Session names do - // not need to be unique. - GameSessionName *string `min:"1" type:"string"` - - // Descriptive label that is associated with game session queue. Queue names - // must be unique within each region. - GameSessionQueueName *string `min:"1" type:"string"` - - // Name of the region where the game session created by this placement request - // is running. This value is set once the new game session is placed (placement - // status is FULFILLED). - GameSessionRegion *string `min:"1" type:"string"` - - // IP address of the game session. To connect to a Amazon GameLift game server, - // an app needs both the IP address and port number. This value is set once - // the new game session is placed (placement status is FULFILLED). - IpAddress *string `type:"string"` - - // Information on the matchmaking process for this game. Data is in JSON syntax, - // formatted as a string. It identifies the matchmaking configuration used to - // create the match, and contains data on all players assigned to the match, - // including player attributes and team assignments. For more details on matchmaker - // data, see Match Data (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-server.html#match-server-data). - MatchmakerData *string `min:"1" type:"string"` - - // Maximum number of players that can be connected simultaneously to the game - // session. - MaximumPlayerSessionCount *int64 `type:"integer"` - - // Collection of information on player sessions created in response to the game - // session placement request. These player sessions are created only once a - // new game session is successfully placed (placement status is FULFILLED). - // This information includes the player ID (as provided in the placement request) - // and the corresponding player session ID. Retrieve full player sessions by - // calling DescribePlayerSessions with the player session ID. - PlacedPlayerSessions []*PlacedPlayerSession `type:"list"` - - // Unique identifier for a game session placement. - PlacementId *string `min:"1" type:"string"` - - // Set of values, expressed in milliseconds, indicating the amount of latency - // that a player experiences when connected to AWS regions. - PlayerLatencies []*PlayerLatency `type:"list"` - - // Port number for the game session. To connect to a Amazon GameLift game server, - // an app needs both the IP address and port number. This value is set once - // the new game session is placed (placement status is FULFILLED). - Port *int64 `min:"1" type:"integer"` - - // Time stamp indicating when this request was placed in the queue. Format is - // a number expressed in Unix time as milliseconds (for example "1469498468.057"). - StartTime *time.Time `type:"timestamp"` - - // Current status of the game session placement request. - // - // * PENDING -- The placement request is currently in the queue waiting to - // be processed. - // - // * FULFILLED -- A new game session and player sessions (if requested) have - // been successfully created. Values for GameSessionArn and GameSessionRegion - // are available. - // - // * CANCELLED -- The placement request was canceled with a call to StopGameSessionPlacement. - // - // * TIMED_OUT -- A new game session was not successfully created before - // the time limit expired. You can resubmit the placement request as needed. - Status *string `type:"string" enum:"GameSessionPlacementState"` -} - -// String returns the string representation -func (s GameSessionPlacement) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GameSessionPlacement) GoString() string { - return s.String() -} - -// SetEndTime sets the EndTime field's value. -func (s *GameSessionPlacement) SetEndTime(v time.Time) *GameSessionPlacement { - s.EndTime = &v - return s -} - -// SetGameProperties sets the GameProperties field's value. -func (s *GameSessionPlacement) SetGameProperties(v []*GameProperty) *GameSessionPlacement { - s.GameProperties = v - return s -} - -// SetGameSessionArn sets the GameSessionArn field's value. -func (s *GameSessionPlacement) SetGameSessionArn(v string) *GameSessionPlacement { - s.GameSessionArn = &v - return s -} - -// SetGameSessionData sets the GameSessionData field's value. -func (s *GameSessionPlacement) SetGameSessionData(v string) *GameSessionPlacement { - s.GameSessionData = &v - return s -} - -// SetGameSessionId sets the GameSessionId field's value. -func (s *GameSessionPlacement) SetGameSessionId(v string) *GameSessionPlacement { - s.GameSessionId = &v - return s -} - -// SetGameSessionName sets the GameSessionName field's value. -func (s *GameSessionPlacement) SetGameSessionName(v string) *GameSessionPlacement { - s.GameSessionName = &v - return s -} - -// SetGameSessionQueueName sets the GameSessionQueueName field's value. -func (s *GameSessionPlacement) SetGameSessionQueueName(v string) *GameSessionPlacement { - s.GameSessionQueueName = &v - return s -} - -// SetGameSessionRegion sets the GameSessionRegion field's value. -func (s *GameSessionPlacement) SetGameSessionRegion(v string) *GameSessionPlacement { - s.GameSessionRegion = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *GameSessionPlacement) SetIpAddress(v string) *GameSessionPlacement { - s.IpAddress = &v - return s -} - -// SetMatchmakerData sets the MatchmakerData field's value. -func (s *GameSessionPlacement) SetMatchmakerData(v string) *GameSessionPlacement { - s.MatchmakerData = &v - return s -} - -// SetMaximumPlayerSessionCount sets the MaximumPlayerSessionCount field's value. -func (s *GameSessionPlacement) SetMaximumPlayerSessionCount(v int64) *GameSessionPlacement { - s.MaximumPlayerSessionCount = &v - return s -} - -// SetPlacedPlayerSessions sets the PlacedPlayerSessions field's value. -func (s *GameSessionPlacement) SetPlacedPlayerSessions(v []*PlacedPlayerSession) *GameSessionPlacement { - s.PlacedPlayerSessions = v - return s -} - -// SetPlacementId sets the PlacementId field's value. -func (s *GameSessionPlacement) SetPlacementId(v string) *GameSessionPlacement { - s.PlacementId = &v - return s -} - -// SetPlayerLatencies sets the PlayerLatencies field's value. -func (s *GameSessionPlacement) SetPlayerLatencies(v []*PlayerLatency) *GameSessionPlacement { - s.PlayerLatencies = v - return s -} - -// SetPort sets the Port field's value. -func (s *GameSessionPlacement) SetPort(v int64) *GameSessionPlacement { - s.Port = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *GameSessionPlacement) SetStartTime(v time.Time) *GameSessionPlacement { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GameSessionPlacement) SetStatus(v string) *GameSessionPlacement { - s.Status = &v - return s -} - -// Configuration of a queue that is used to process game session placement requests. -// The queue configuration identifies several game features: -// -// * The destinations where a new game session can potentially be hosted. -// Amazon GameLift tries these destinations in an order based on either the -// queue's default order or player latency information, if provided in a -// placement request. With latency information, Amazon GameLift can place -// game sessions where the majority of players are reporting the lowest possible -// latency. -// -// * The length of time that placement requests can wait in the queue before -// timing out. -// -// * A set of optional latency policies that protect individual players from -// high latencies, preventing game sessions from being placed where any individual -// player is reporting latency higher than a policy's maximum. -// -// Queue-related operations include: -// -// * CreateGameSessionQueue -// -// * DescribeGameSessionQueues -// -// * UpdateGameSessionQueue -// -// * DeleteGameSessionQueue -type GameSessionQueue struct { - _ struct{} `type:"structure"` - - // List of fleets that can be used to fulfill game session placement requests - // in the queue. Fleets are identified by either a fleet ARN or a fleet alias - // ARN. Destinations are listed in default preference order. - Destinations []*GameSessionQueueDestination `type:"list"` - - // Amazon Resource Name (ARN (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) - // that is assigned to a game session queue and uniquely identifies it. Format - // is arn:aws:gamelift:::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. - GameSessionQueueArn *string `min:"1" type:"string"` - - // Descriptive label that is associated with game session queue. Queue names - // must be unique within each region. - Name *string `min:"1" type:"string"` - - // Collection of latency policies to apply when processing game sessions placement - // requests with player latency information. Multiple policies are evaluated - // in order of the maximum latency value, starting with the lowest latency values. - // With just one policy, it is enforced at the start of the game session placement - // for the duration period. With multiple policies, each policy is enforced - // consecutively for its duration period. For example, a queue might enforce - // a 60-second policy followed by a 120-second policy, and then no policy for - // the remainder of the placement. - PlayerLatencyPolicies []*PlayerLatencyPolicy `type:"list"` - - // Maximum time, in seconds, that a new game session placement request remains - // in the queue. When a request exceeds this time, the game session placement - // changes to a TIMED_OUT status. - TimeoutInSeconds *int64 `type:"integer"` -} - -// String returns the string representation -func (s GameSessionQueue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GameSessionQueue) GoString() string { - return s.String() -} - -// SetDestinations sets the Destinations field's value. -func (s *GameSessionQueue) SetDestinations(v []*GameSessionQueueDestination) *GameSessionQueue { - s.Destinations = v - return s -} - -// SetGameSessionQueueArn sets the GameSessionQueueArn field's value. -func (s *GameSessionQueue) SetGameSessionQueueArn(v string) *GameSessionQueue { - s.GameSessionQueueArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *GameSessionQueue) SetName(v string) *GameSessionQueue { - s.Name = &v - return s -} - -// SetPlayerLatencyPolicies sets the PlayerLatencyPolicies field's value. -func (s *GameSessionQueue) SetPlayerLatencyPolicies(v []*PlayerLatencyPolicy) *GameSessionQueue { - s.PlayerLatencyPolicies = v - return s -} - -// SetTimeoutInSeconds sets the TimeoutInSeconds field's value. -func (s *GameSessionQueue) SetTimeoutInSeconds(v int64) *GameSessionQueue { - s.TimeoutInSeconds = &v - return s -} - -// Fleet designated in a game session queue. Requests for new game sessions -// in the queue are fulfilled by starting a new game session on any destination -// configured for a queue. -// -// Queue-related operations include: -// -// * CreateGameSessionQueue -// -// * DescribeGameSessionQueues -// -// * UpdateGameSessionQueue -// -// * DeleteGameSessionQueue -type GameSessionQueueDestination struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) assigned to fleet or fleet alias. ARNs, which - // include a fleet ID or alias ID and a region name, provide a unique identifier - // across all regions. - DestinationArn *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GameSessionQueueDestination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GameSessionQueueDestination) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GameSessionQueueDestination) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GameSessionQueueDestination"} - if s.DestinationArn != nil && len(*s.DestinationArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DestinationArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationArn sets the DestinationArn field's value. -func (s *GameSessionQueueDestination) SetDestinationArn(v string) *GameSessionQueueDestination { - s.DestinationArn = &v - return s -} - -// Represents the input for a request action. -type GetGameSessionLogUrlInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for the game session to get logs for. - // - // GameSessionId is a required field - GameSessionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetGameSessionLogUrlInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGameSessionLogUrlInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetGameSessionLogUrlInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetGameSessionLogUrlInput"} - if s.GameSessionId == nil { - invalidParams.Add(request.NewErrParamRequired("GameSessionId")) - } - if s.GameSessionId != nil && len(*s.GameSessionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGameSessionId sets the GameSessionId field's value. -func (s *GetGameSessionLogUrlInput) SetGameSessionId(v string) *GetGameSessionLogUrlInput { - s.GameSessionId = &v - return s -} - -// Represents the returned data in response to a request action. -type GetGameSessionLogUrlOutput struct { - _ struct{} `type:"structure"` - - // Location of the requested game session logs, available for download. - PreSignedUrl *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetGameSessionLogUrlOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGameSessionLogUrlOutput) GoString() string { - return s.String() -} - -// SetPreSignedUrl sets the PreSignedUrl field's value. -func (s *GetGameSessionLogUrlOutput) SetPreSignedUrl(v string) *GetGameSessionLogUrlOutput { - s.PreSignedUrl = &v - return s -} - -// Represents the input for a request action. -type GetInstanceAccessInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet that contains the instance you want access - // to. The fleet can be in any of the following statuses: ACTIVATING, ACTIVE, - // or ERROR. Fleets with an ERROR status may be accessible for a short time - // before they are deleted. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // Unique identifier for an instance you want to get access to. You can access - // an instance in any status. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetInstanceAccessInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceAccessInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceAccessInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceAccessInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetId sets the FleetId field's value. -func (s *GetInstanceAccessInput) SetFleetId(v string) *GetInstanceAccessInput { - s.FleetId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetInstanceAccessInput) SetInstanceId(v string) *GetInstanceAccessInput { - s.InstanceId = &v - return s -} - -// Represents the returned data in response to a request action. -type GetInstanceAccessOutput struct { - _ struct{} `type:"structure"` - - // Object that contains connection information for a fleet instance, including - // IP address and access credentials. - InstanceAccess *InstanceAccess `type:"structure"` -} - -// String returns the string representation -func (s GetInstanceAccessOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceAccessOutput) GoString() string { - return s.String() -} - -// SetInstanceAccess sets the InstanceAccess field's value. -func (s *GetInstanceAccessOutput) SetInstanceAccess(v *InstanceAccess) *GetInstanceAccessOutput { - s.InstanceAccess = v - return s -} - -// Properties that describe an instance of a virtual computing resource that -// hosts one or more game servers. A fleet may contain zero or more instances. -type Instance struct { - _ struct{} `type:"structure"` - - // Time stamp indicating when this data object was created. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp"` - - // Unique identifier for a fleet that the instance is in. - FleetId *string `type:"string"` - - // Unique identifier for an instance. - InstanceId *string `type:"string"` - - // IP address assigned to the instance. - IpAddress *string `type:"string"` - - // Operating system that is running on this instance. - OperatingSystem *string `type:"string" enum:"OperatingSystem"` - - // Current status of the instance. Possible statuses include the following: - // - // * PENDING -- The instance is in the process of being created and launching - // server processes as defined in the fleet's run-time configuration. - // - // * ACTIVE -- The instance has been successfully created and at least one - // server process has successfully launched and reported back to Amazon GameLift - // that it is ready to host a game session. The instance is now considered - // ready to host game sessions. - // - // * TERMINATING -- The instance is in the process of shutting down. This - // may happen to reduce capacity during a scaling down event or to recycle - // resources in the event of a problem. - Status *string `type:"string" enum:"InstanceStatus"` - - // EC2 instance type that defines the computing resources of this instance. - Type *string `type:"string" enum:"EC2InstanceType"` -} - -// String returns the string representation -func (s Instance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Instance) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *Instance) SetCreationTime(v time.Time) *Instance { - s.CreationTime = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *Instance) SetFleetId(v string) *Instance { - s.FleetId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *Instance) SetInstanceId(v string) *Instance { - s.InstanceId = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *Instance) SetIpAddress(v string) *Instance { - s.IpAddress = &v - return s -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *Instance) SetOperatingSystem(v string) *Instance { - s.OperatingSystem = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Instance) SetStatus(v string) *Instance { - s.Status = &v - return s -} - -// SetType sets the Type field's value. -func (s *Instance) SetType(v string) *Instance { - s.Type = &v - return s -} - -// Information required to remotely connect to a fleet instance. Access is requested -// by calling GetInstanceAccess. -type InstanceAccess struct { - _ struct{} `type:"structure"` - - // Credentials required to access the instance. - Credentials *InstanceCredentials `type:"structure" sensitive:"true"` - - // Unique identifier for a fleet containing the instance being accessed. - FleetId *string `type:"string"` - - // Unique identifier for an instance being accessed. - InstanceId *string `type:"string"` - - // IP address assigned to the instance. - IpAddress *string `type:"string"` - - // Operating system that is running on the instance. - OperatingSystem *string `type:"string" enum:"OperatingSystem"` -} - -// String returns the string representation -func (s InstanceAccess) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceAccess) GoString() string { - return s.String() -} - -// SetCredentials sets the Credentials field's value. -func (s *InstanceAccess) SetCredentials(v *InstanceCredentials) *InstanceAccess { - s.Credentials = v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *InstanceAccess) SetFleetId(v string) *InstanceAccess { - s.FleetId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceAccess) SetInstanceId(v string) *InstanceAccess { - s.InstanceId = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *InstanceAccess) SetIpAddress(v string) *InstanceAccess { - s.IpAddress = &v - return s -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *InstanceAccess) SetOperatingSystem(v string) *InstanceAccess { - s.OperatingSystem = &v - return s -} - -// Set of credentials required to remotely access a fleet instance. Access credentials -// are requested by calling GetInstanceAccess and returned in an InstanceAccess -// object. -type InstanceCredentials struct { - _ struct{} `type:"structure" sensitive:"true"` - - // Secret string. For Windows instances, the secret is a password for use with - // Windows Remote Desktop. For Linux instances, it is a private key (which must - // be saved as a .pem file) for use with SSH. - Secret *string `min:"1" type:"string"` - - // User login string. - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s InstanceCredentials) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceCredentials) GoString() string { - return s.String() -} - -// SetSecret sets the Secret field's value. -func (s *InstanceCredentials) SetSecret(v string) *InstanceCredentials { - s.Secret = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *InstanceCredentials) SetUserName(v string) *InstanceCredentials { - s.UserName = &v - return s -} - -// A range of IP addresses and port settings that allow inbound traffic to connect -// to server processes on Amazon GameLift. Each game session hosted on a fleet -// is assigned a unique combination of IP address and port number, which must -// fall into the fleet's allowed ranges. This combination is included in the -// GameSession object. -type IpPermission struct { - _ struct{} `type:"structure"` - - // Starting value for a range of allowed port numbers. - // - // FromPort is a required field - FromPort *int64 `min:"1" type:"integer" required:"true"` - - // Range of allowed IP addresses. This value must be expressed in CIDR notation. - // Example: "000.000.000.000/[subnet mask]" or optionally the shortened version - // "0.0.0.0/[subnet mask]". - // - // IpRange is a required field - IpRange *string `type:"string" required:"true"` - - // Network communication protocol used by the fleet. - // - // Protocol is a required field - Protocol *string `type:"string" required:"true" enum:"IpProtocol"` - - // Ending value for a range of allowed port numbers. Port numbers are end-inclusive. - // This value must be higher than FromPort. - // - // ToPort is a required field - ToPort *int64 `min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s IpPermission) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IpPermission) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IpPermission) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IpPermission"} - if s.FromPort == nil { - invalidParams.Add(request.NewErrParamRequired("FromPort")) - } - if s.FromPort != nil && *s.FromPort < 1 { - invalidParams.Add(request.NewErrParamMinValue("FromPort", 1)) - } - if s.IpRange == nil { - invalidParams.Add(request.NewErrParamRequired("IpRange")) - } - if s.Protocol == nil { - invalidParams.Add(request.NewErrParamRequired("Protocol")) - } - if s.ToPort == nil { - invalidParams.Add(request.NewErrParamRequired("ToPort")) - } - if s.ToPort != nil && *s.ToPort < 1 { - invalidParams.Add(request.NewErrParamMinValue("ToPort", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFromPort sets the FromPort field's value. -func (s *IpPermission) SetFromPort(v int64) *IpPermission { - s.FromPort = &v - return s -} - -// SetIpRange sets the IpRange field's value. -func (s *IpPermission) SetIpRange(v string) *IpPermission { - s.IpRange = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *IpPermission) SetProtocol(v string) *IpPermission { - s.Protocol = &v - return s -} - -// SetToPort sets the ToPort field's value. -func (s *IpPermission) SetToPort(v int64) *IpPermission { - s.ToPort = &v - return s -} - -// Represents the input for a request action. -type ListAliasesInput struct { - _ struct{} `type:"structure"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. - Limit *int64 `min:"1" type:"integer"` - - // Descriptive label that is associated with an alias. Alias names do not need - // to be unique. - Name *string `min:"1" type:"string"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. - NextToken *string `min:"1" type:"string"` - - // Type of routing to filter results on. Use this parameter to retrieve only - // aliases of a certain type. To retrieve all aliases, leave this parameter - // empty. - // - // Possible routing types include the following: - // - // * SIMPLE -- The alias resolves to one specific fleet. Use this type when - // routing to active fleets. - // - // * TERMINAL -- The alias does not resolve to a fleet but instead can be - // used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException - // with the RoutingStrategy message embedded. - RoutingStrategyType *string `type:"string" enum:"RoutingStrategyType"` -} - -// String returns the string representation -func (s ListAliasesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAliasesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAliasesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAliasesInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListAliasesInput) SetLimit(v int64) *ListAliasesInput { - s.Limit = &v - return s -} - -// SetName sets the Name field's value. -func (s *ListAliasesInput) SetName(v string) *ListAliasesInput { - s.Name = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAliasesInput) SetNextToken(v string) *ListAliasesInput { - s.NextToken = &v - return s -} - -// SetRoutingStrategyType sets the RoutingStrategyType field's value. -func (s *ListAliasesInput) SetRoutingStrategyType(v string) *ListAliasesInput { - s.RoutingStrategyType = &v - return s -} - -// Represents the returned data in response to a request action. -type ListAliasesOutput struct { - _ struct{} `type:"structure"` - - // Collection of alias records that match the list request. - Aliases []*Alias `type:"list"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListAliasesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAliasesOutput) GoString() string { - return s.String() -} - -// SetAliases sets the Aliases field's value. -func (s *ListAliasesOutput) SetAliases(v []*Alias) *ListAliasesOutput { - s.Aliases = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAliasesOutput) SetNextToken(v string) *ListAliasesOutput { - s.NextToken = &v - return s -} - -// Represents the input for a request action. -type ListBuildsInput struct { - _ struct{} `type:"structure"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. - Limit *int64 `min:"1" type:"integer"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. - NextToken *string `min:"1" type:"string"` - - // Build status to filter results by. To retrieve all builds, leave this parameter - // empty. - // - // Possible build statuses include the following: - // - // * INITIALIZED -- A new build has been defined, but no files have been - // uploaded. You cannot create fleets for builds that are in this status. - // When a build is successfully created, the build status is set to this - // value. - // - // * READY -- The game build has been successfully uploaded. You can now - // create new fleets for this build. - // - // * FAILED -- The game build upload failed. You cannot create new fleets - // for this build. - Status *string `type:"string" enum:"BuildStatus"` -} - -// String returns the string representation -func (s ListBuildsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBuildsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBuildsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBuildsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListBuildsInput) SetLimit(v int64) *ListBuildsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBuildsInput) SetNextToken(v string) *ListBuildsInput { - s.NextToken = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ListBuildsInput) SetStatus(v string) *ListBuildsInput { - s.Status = &v - return s -} - -// Represents the returned data in response to a request action. -type ListBuildsOutput struct { - _ struct{} `type:"structure"` - - // Collection of build records that match the request. - Builds []*Build `type:"list"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListBuildsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBuildsOutput) GoString() string { - return s.String() -} - -// SetBuilds sets the Builds field's value. -func (s *ListBuildsOutput) SetBuilds(v []*Build) *ListBuildsOutput { - s.Builds = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBuildsOutput) SetNextToken(v string) *ListBuildsOutput { - s.NextToken = &v - return s -} - -// Represents the input for a request action. -type ListFleetsInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a build to return fleets for. Use this parameter to - // return only fleets using the specified build. To retrieve all fleets, leave - // this parameter empty. - BuildId *string `type:"string"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. - Limit *int64 `min:"1" type:"integer"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListFleetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFleetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListFleetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListFleetsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBuildId sets the BuildId field's value. -func (s *ListFleetsInput) SetBuildId(v string) *ListFleetsInput { - s.BuildId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListFleetsInput) SetLimit(v int64) *ListFleetsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListFleetsInput) SetNextToken(v string) *ListFleetsInput { - s.NextToken = &v - return s -} - -// Represents the returned data in response to a request action. -type ListFleetsOutput struct { - _ struct{} `type:"structure"` - - // Set of fleet IDs matching the list request. You can retrieve additional information - // about all returned fleets by passing this result set to a call to DescribeFleetAttributes, - // DescribeFleetCapacity, or DescribeFleetUtilization. - FleetIds []*string `min:"1" type:"list"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListFleetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFleetsOutput) GoString() string { - return s.String() -} - -// SetFleetIds sets the FleetIds field's value. -func (s *ListFleetsOutput) SetFleetIds(v []*string) *ListFleetsOutput { - s.FleetIds = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListFleetsOutput) SetNextToken(v string) *ListFleetsOutput { - s.NextToken = &v - return s -} - -// Represents a new player session that is created as a result of a successful -// FlexMatch match. A successful match automatically creates new player sessions -// for every player ID in the original matchmaking request. -// -// When players connect to the match's game session, they must include both -// player ID and player session ID in order to claim their assigned player slot. -type MatchedPlayerSession struct { - _ struct{} `type:"structure"` - - // Unique identifier for a player - PlayerId *string `min:"1" type:"string"` - - // Unique identifier for a player session - PlayerSessionId *string `type:"string"` -} - -// String returns the string representation -func (s MatchedPlayerSession) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MatchedPlayerSession) GoString() string { - return s.String() -} - -// SetPlayerId sets the PlayerId field's value. -func (s *MatchedPlayerSession) SetPlayerId(v string) *MatchedPlayerSession { - s.PlayerId = &v - return s -} - -// SetPlayerSessionId sets the PlayerSessionId field's value. -func (s *MatchedPlayerSession) SetPlayerSessionId(v string) *MatchedPlayerSession { - s.PlayerSessionId = &v - return s -} - -// Guidelines for use with FlexMatch to match players into games. All matchmaking -// requests must specify a matchmaking configuration. -type MatchmakingConfiguration struct { - _ struct{} `type:"structure"` - - // Flag that determines whether or not a match that was created with this configuration - // must be accepted by the matched players. To require acceptance, set to TRUE. - AcceptanceRequired *bool `type:"boolean"` - - // Length of time (in seconds) to wait for players to accept a proposed match. - // If any player rejects the match or fails to accept before the timeout, the - // ticket continues to look for an acceptable match. - AcceptanceTimeoutSeconds *int64 `min:"1" type:"integer"` - - // Number of player slots in a match to keep open for future players. For example, - // if the configuration's rule set specifies a match for a single 12-person - // team, and the additional player count is set to 2, only 10 players are selected - // for the match. - AdditionalPlayerCount *int64 `type:"integer"` - - // Time stamp indicating when this data object was created. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp"` - - // Information to attached to all events related to the matchmaking configuration. - CustomEventData *string `type:"string"` - - // Descriptive label that is associated with matchmaking configuration. - Description *string `min:"1" type:"string"` - - // Set of custom properties for a game session, formatted as key:value pairs. - // These properties are passed to a game server process in the GameSession object - // with a request to start a new game session (see Start a Game Session (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). - // This information is added to the new GameSession object that is created for - // a successful match. - GameProperties []*GameProperty `type:"list"` - - // Set of custom game session properties, formatted as a single string value. - // This data is passed to a game server process in the GameSession object with - // a request to start a new game session (see Start a Game Session (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). - // This information is added to the new GameSession object that is created for - // a successful match. - GameSessionData *string `min:"1" type:"string"` - - // Amazon Resource Name (ARN (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) - // that is assigned to a game session queue and uniquely identifies it. Format - // is arn:aws:gamelift:::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. - // These queues are used when placing game sessions for matches that are created - // with this matchmaking configuration. Queues can be located in any region. - GameSessionQueueArns []*string `type:"list"` - - // Unique identifier for a matchmaking configuration. This name is used to identify - // the configuration associated with a matchmaking request or ticket. - Name *string `min:"1" type:"string"` - - // SNS topic ARN that is set up to receive matchmaking notifications. - NotificationTarget *string `type:"string"` - - // Maximum duration, in seconds, that a matchmaking ticket can remain in process - // before timing out. Requests that time out can be resubmitted as needed. - RequestTimeoutSeconds *int64 `min:"1" type:"integer"` - - // Unique identifier for a matchmaking rule set to use with this configuration. - // A matchmaking configuration can only use rule sets that are defined in the - // same region. - RuleSetName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s MatchmakingConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MatchmakingConfiguration) GoString() string { - return s.String() -} - -// SetAcceptanceRequired sets the AcceptanceRequired field's value. -func (s *MatchmakingConfiguration) SetAcceptanceRequired(v bool) *MatchmakingConfiguration { - s.AcceptanceRequired = &v - return s -} - -// SetAcceptanceTimeoutSeconds sets the AcceptanceTimeoutSeconds field's value. -func (s *MatchmakingConfiguration) SetAcceptanceTimeoutSeconds(v int64) *MatchmakingConfiguration { - s.AcceptanceTimeoutSeconds = &v - return s -} - -// SetAdditionalPlayerCount sets the AdditionalPlayerCount field's value. -func (s *MatchmakingConfiguration) SetAdditionalPlayerCount(v int64) *MatchmakingConfiguration { - s.AdditionalPlayerCount = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *MatchmakingConfiguration) SetCreationTime(v time.Time) *MatchmakingConfiguration { - s.CreationTime = &v - return s -} - -// SetCustomEventData sets the CustomEventData field's value. -func (s *MatchmakingConfiguration) SetCustomEventData(v string) *MatchmakingConfiguration { - s.CustomEventData = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *MatchmakingConfiguration) SetDescription(v string) *MatchmakingConfiguration { - s.Description = &v - return s -} - -// SetGameProperties sets the GameProperties field's value. -func (s *MatchmakingConfiguration) SetGameProperties(v []*GameProperty) *MatchmakingConfiguration { - s.GameProperties = v - return s -} - -// SetGameSessionData sets the GameSessionData field's value. -func (s *MatchmakingConfiguration) SetGameSessionData(v string) *MatchmakingConfiguration { - s.GameSessionData = &v - return s -} - -// SetGameSessionQueueArns sets the GameSessionQueueArns field's value. -func (s *MatchmakingConfiguration) SetGameSessionQueueArns(v []*string) *MatchmakingConfiguration { - s.GameSessionQueueArns = v - return s -} - -// SetName sets the Name field's value. -func (s *MatchmakingConfiguration) SetName(v string) *MatchmakingConfiguration { - s.Name = &v - return s -} - -// SetNotificationTarget sets the NotificationTarget field's value. -func (s *MatchmakingConfiguration) SetNotificationTarget(v string) *MatchmakingConfiguration { - s.NotificationTarget = &v - return s -} - -// SetRequestTimeoutSeconds sets the RequestTimeoutSeconds field's value. -func (s *MatchmakingConfiguration) SetRequestTimeoutSeconds(v int64) *MatchmakingConfiguration { - s.RequestTimeoutSeconds = &v - return s -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *MatchmakingConfiguration) SetRuleSetName(v string) *MatchmakingConfiguration { - s.RuleSetName = &v - return s -} - -// Set of rule statements, used with FlexMatch, that determine how to build -// a certain kind of player match. Each rule set describes a type of group to -// be created and defines the parameters for acceptable player matches. Rule -// sets are used in MatchmakingConfiguration objects. -// -// A rule set may define the following elements for a match. For detailed information -// and examples showing how to construct a rule set, see Build a FlexMatch Rule -// Set (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-rulesets.html). -// -// * Teams -- Required. A rule set must define one or multiple teams for -// the match and set minimum and maximum team sizes. For example, a rule -// set might describe a 4x4 match that requires all eight slots to be filled. -// -// -// * Player attributes -- Optional. These attributes specify a set of player -// characteristics to evaluate when looking for a match. Matchmaking requests -// that use a rule set with player attributes must provide the corresponding -// attribute values. For example, an attribute might specify a player's skill -// or level. -// -// * Rules -- Optional. Rules define how to evaluate potential players for -// a match based on player attributes. A rule might specify minimum requirements -// for individual players, teams, or entire matches. For example, a rule -// might require each player to meet a certain skill level, each team to -// have at least one player in a certain role, or the match to have a minimum -// average skill level. or may describe an entire group--such as all teams -// must be evenly matched or have at least one player in a certain role. -// -// -// * Expansions -- Optional. Expansions allow you to relax the rules after -// a period of time when no acceptable matches are found. This feature lets -// you balance getting players into games in a reasonable amount of time -// instead of making them wait indefinitely for the best possible match. -// For example, you might use an expansion to increase the maximum skill -// variance between players after 30 seconds. -type MatchmakingRuleSet struct { - _ struct{} `type:"structure"` - - // Time stamp indicating when this data object was created. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp"` - - // Collection of matchmaking rules, formatted as a JSON string. (Note that comments14 - // are not allowed in JSON, but most elements support a description field.) - // - // RuleSetBody is a required field - RuleSetBody *string `min:"1" type:"string" required:"true"` - - // Unique identifier for a matchmaking rule set - RuleSetName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s MatchmakingRuleSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MatchmakingRuleSet) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *MatchmakingRuleSet) SetCreationTime(v time.Time) *MatchmakingRuleSet { - s.CreationTime = &v - return s -} - -// SetRuleSetBody sets the RuleSetBody field's value. -func (s *MatchmakingRuleSet) SetRuleSetBody(v string) *MatchmakingRuleSet { - s.RuleSetBody = &v - return s -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *MatchmakingRuleSet) SetRuleSetName(v string) *MatchmakingRuleSet { - s.RuleSetName = &v - return s -} - -// Ticket generated to track the progress of a matchmaking request. Each ticket -// is uniquely identified by a ticket ID, supplied by the requester, when creating -// a matchmaking request with StartMatchmaking. Tickets can be retrieved by -// calling DescribeMatchmaking with the ticket ID. -type MatchmakingTicket struct { - _ struct{} `type:"structure"` - - // Name of the MatchmakingConfiguration that is used with this ticket. Matchmaking - // configurations determine how players are grouped into a match and how a new - // game session is created for the match. - ConfigurationName *string `min:"1" type:"string"` - - // Time stamp indicating when this matchmaking request stopped being processed - // due to success, failure, or cancellation. Format is a number expressed in - // Unix time as milliseconds (for example "1469498468.057"). - EndTime *time.Time `type:"timestamp"` - - // Average amount of time (in seconds) that players are currently waiting for - // a match. If there is not enough recent data, this property may be empty. - EstimatedWaitTime *int64 `type:"integer"` - - // Identifier and connection information of the game session created for the - // match. This information is added to the ticket only after the matchmaking - // request has been successfully completed. - GameSessionConnectionInfo *GameSessionConnectionInfo `type:"structure"` - - // A set of Player objects, each representing a player to find matches for. - // Players are identified by a unique player ID and may include latency data - // for use during matchmaking. If the ticket is in status COMPLETED, the Player - // objects include the team the players were assigned to in the resulting match. - Players []*Player `type:"list"` - - // Time stamp indicating when this matchmaking request was received. Format - // is a number expressed in Unix time as milliseconds (for example "1469498468.057"). - StartTime *time.Time `type:"timestamp"` - - // Current status of the matchmaking request. - // - // * QUEUED -- The matchmaking request has been received and is currently - // waiting to be processed. - // - // * SEARCHING -- The matchmaking request is currently being processed. - // - // * REQUIRES_ACCEPTANCE -- A match has been proposed and the players must - // accept the match (see AcceptMatch). This status is used only with requests - // that use a matchmaking configuration with a player acceptance requirement. - // - // * PLACING -- The FlexMatch engine has matched players and is in the process - // of placing a new game session for the match. - // - // * COMPLETED -- Players have been matched and a game session is ready to - // host the players. A ticket in this state contains the necessary connection - // information for players. - // - // * FAILED -- The matchmaking request was not completed. Tickets with players - // who fail to accept a proposed match are placed in FAILED status. - // - // * CANCELLED -- The matchmaking request was canceled with a call to StopMatchmaking. - // - // * TIMED_OUT -- The matchmaking request was not successful within the duration - // specified in the matchmaking configuration. - // - // Matchmaking requests that fail to successfully complete (statuses FAILED, - // CANCELLED, TIMED_OUT) can be resubmitted as new requests with new ticket - // IDs. - Status *string `type:"string" enum:"MatchmakingConfigurationStatus"` - - // Additional information about the current status. - StatusMessage *string `type:"string"` - - // Code to explain the current status. For example, a status reason may indicate - // when a ticket has returned to SEARCHING status after a proposed match fails - // to receive player acceptances. - StatusReason *string `type:"string"` - - // Unique identifier for a matchmaking ticket. - TicketId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s MatchmakingTicket) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MatchmakingTicket) GoString() string { - return s.String() -} - -// SetConfigurationName sets the ConfigurationName field's value. -func (s *MatchmakingTicket) SetConfigurationName(v string) *MatchmakingTicket { - s.ConfigurationName = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *MatchmakingTicket) SetEndTime(v time.Time) *MatchmakingTicket { - s.EndTime = &v - return s -} - -// SetEstimatedWaitTime sets the EstimatedWaitTime field's value. -func (s *MatchmakingTicket) SetEstimatedWaitTime(v int64) *MatchmakingTicket { - s.EstimatedWaitTime = &v - return s -} - -// SetGameSessionConnectionInfo sets the GameSessionConnectionInfo field's value. -func (s *MatchmakingTicket) SetGameSessionConnectionInfo(v *GameSessionConnectionInfo) *MatchmakingTicket { - s.GameSessionConnectionInfo = v - return s -} - -// SetPlayers sets the Players field's value. -func (s *MatchmakingTicket) SetPlayers(v []*Player) *MatchmakingTicket { - s.Players = v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *MatchmakingTicket) SetStartTime(v time.Time) *MatchmakingTicket { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *MatchmakingTicket) SetStatus(v string) *MatchmakingTicket { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *MatchmakingTicket) SetStatusMessage(v string) *MatchmakingTicket { - s.StatusMessage = &v - return s -} - -// SetStatusReason sets the StatusReason field's value. -func (s *MatchmakingTicket) SetStatusReason(v string) *MatchmakingTicket { - s.StatusReason = &v - return s -} - -// SetTicketId sets the TicketId field's value. -func (s *MatchmakingTicket) SetTicketId(v string) *MatchmakingTicket { - s.TicketId = &v - return s -} - -// Information about a player session that was created as part of a StartGameSessionPlacement -// request. This object contains only the player ID and player session ID. To -// retrieve full details on a player session, call DescribePlayerSessions with -// the player session ID. -// -// Player-session-related operations include: -// -// * CreatePlayerSession -// -// * CreatePlayerSessions -// -// * DescribePlayerSessions -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -type PlacedPlayerSession struct { - _ struct{} `type:"structure"` - - // Unique identifier for a player that is associated with this player session. - PlayerId *string `min:"1" type:"string"` - - // Unique identifier for a player session. - PlayerSessionId *string `type:"string"` -} - -// String returns the string representation -func (s PlacedPlayerSession) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlacedPlayerSession) GoString() string { - return s.String() -} - -// SetPlayerId sets the PlayerId field's value. -func (s *PlacedPlayerSession) SetPlayerId(v string) *PlacedPlayerSession { - s.PlayerId = &v - return s -} - -// SetPlayerSessionId sets the PlayerSessionId field's value. -func (s *PlacedPlayerSession) SetPlayerSessionId(v string) *PlacedPlayerSession { - s.PlayerSessionId = &v - return s -} - -// Represents a player in matchmaking. When starting a matchmaking request, -// a player has a player ID, attributes, and may have latency data. Team information -// is added after a match has been successfully completed. -type Player struct { - _ struct{} `type:"structure"` - - // Set of values, expressed in milliseconds, indicating the amount of latency - // that a player experiences when connected to AWS regions. If this property - // is present, FlexMatch considers placing the match only in regions for which - // latency is reported. - // - // If a matchmaker has a rule that evaluates player latency, players must report - // latency in order to be matched. If no latency is reported in this scenario, - // FlexMatch assumes that no regions are available to the player and the ticket - // is not matchable. - LatencyInMs map[string]*int64 `type:"map"` - - // Collection of key:value pairs containing player information for use in matchmaking. - // Player attribute keys must match the playerAttributes used in a matchmaking - // rule set. Example: "PlayerAttributes": {"skill": {"N": "23"}, "gameMode": - // {"S": "deathmatch"}}. - PlayerAttributes map[string]*AttributeValue `type:"map"` - - // Unique identifier for a player - PlayerId *string `min:"1" type:"string"` - - // Name of the team that the player is assigned to in a match. Team names are - // defined in a matchmaking rule set. - Team *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s Player) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Player) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Player) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Player"} - if s.PlayerId != nil && len(*s.PlayerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlayerId", 1)) - } - if s.Team != nil && len(*s.Team) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Team", 1)) - } - if s.PlayerAttributes != nil { - for i, v := range s.PlayerAttributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PlayerAttributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLatencyInMs sets the LatencyInMs field's value. -func (s *Player) SetLatencyInMs(v map[string]*int64) *Player { - s.LatencyInMs = v - return s -} - -// SetPlayerAttributes sets the PlayerAttributes field's value. -func (s *Player) SetPlayerAttributes(v map[string]*AttributeValue) *Player { - s.PlayerAttributes = v - return s -} - -// SetPlayerId sets the PlayerId field's value. -func (s *Player) SetPlayerId(v string) *Player { - s.PlayerId = &v - return s -} - -// SetTeam sets the Team field's value. -func (s *Player) SetTeam(v string) *Player { - s.Team = &v - return s -} - -// Regional latency information for a player, used when requesting a new game -// session with StartGameSessionPlacement. This value indicates the amount of -// time lag that exists when the player is connected to a fleet in the specified -// region. The relative difference between a player's latency values for multiple -// regions are used to determine which fleets are best suited to place a new -// game session for the player. -type PlayerLatency struct { - _ struct{} `type:"structure"` - - // Amount of time that represents the time lag experienced by the player when - // connected to the specified region. - LatencyInMilliseconds *float64 `type:"float"` - - // Unique identifier for a player associated with the latency data. - PlayerId *string `min:"1" type:"string"` - - // Name of the region that is associated with the latency value. - RegionIdentifier *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PlayerLatency) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlayerLatency) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PlayerLatency) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PlayerLatency"} - if s.PlayerId != nil && len(*s.PlayerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlayerId", 1)) - } - if s.RegionIdentifier != nil && len(*s.RegionIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RegionIdentifier", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLatencyInMilliseconds sets the LatencyInMilliseconds field's value. -func (s *PlayerLatency) SetLatencyInMilliseconds(v float64) *PlayerLatency { - s.LatencyInMilliseconds = &v - return s -} - -// SetPlayerId sets the PlayerId field's value. -func (s *PlayerLatency) SetPlayerId(v string) *PlayerLatency { - s.PlayerId = &v - return s -} - -// SetRegionIdentifier sets the RegionIdentifier field's value. -func (s *PlayerLatency) SetRegionIdentifier(v string) *PlayerLatency { - s.RegionIdentifier = &v - return s -} - -// Queue setting that determines the highest latency allowed for individual -// players when placing a game session. When a latency policy is in force, a -// game session cannot be placed at any destination in a region where a player -// is reporting latency higher than the cap. Latency policies are only enforced -// when the placement request contains player latency information. -// -// Queue-related operations include: -// -// * CreateGameSessionQueue -// -// * DescribeGameSessionQueues -// -// * UpdateGameSessionQueue -// -// * DeleteGameSessionQueue -type PlayerLatencyPolicy struct { - _ struct{} `type:"structure"` - - // The maximum latency value that is allowed for any player, in milliseconds. - // All policies must have a value set for this property. - MaximumIndividualPlayerLatencyMilliseconds *int64 `type:"integer"` - - // The length of time, in seconds, that the policy is enforced while placing - // a new game session. A null value for this property means that the policy - // is enforced until the queue times out. - PolicyDurationSeconds *int64 `type:"integer"` -} - -// String returns the string representation -func (s PlayerLatencyPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlayerLatencyPolicy) GoString() string { - return s.String() -} - -// SetMaximumIndividualPlayerLatencyMilliseconds sets the MaximumIndividualPlayerLatencyMilliseconds field's value. -func (s *PlayerLatencyPolicy) SetMaximumIndividualPlayerLatencyMilliseconds(v int64) *PlayerLatencyPolicy { - s.MaximumIndividualPlayerLatencyMilliseconds = &v - return s -} - -// SetPolicyDurationSeconds sets the PolicyDurationSeconds field's value. -func (s *PlayerLatencyPolicy) SetPolicyDurationSeconds(v int64) *PlayerLatencyPolicy { - s.PolicyDurationSeconds = &v - return s -} - -// Properties describing a player session. Player session objects are created -// either by creating a player session for a specific game session, or as part -// of a game session placement. A player session represents either a player -// reservation for a game session (status RESERVED) or actual player activity -// in a game session (status ACTIVE). A player session object (including player -// data) is automatically passed to a game session when the player connects -// to the game session and is validated. -// -// When a player disconnects, the player session status changes to COMPLETED. -// Once the session ends, the player session object is retained for 30 days -// and then removed. -// -// Player-session-related operations include: -// -// * CreatePlayerSession -// -// * CreatePlayerSessions -// -// * DescribePlayerSessions -// -// * Game session placements -// -// StartGameSessionPlacement -// -// DescribeGameSessionPlacement -// -// StopGameSessionPlacement -type PlayerSession struct { - _ struct{} `type:"structure"` - - // Time stamp indicating when this data object was created. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp"` - - // Unique identifier for a fleet that the player's game session is running on. - FleetId *string `type:"string"` - - // Unique identifier for the game session that the player session is connected - // to. - GameSessionId *string `min:"1" type:"string"` - - // IP address of the game session. To connect to a Amazon GameLift game server, - // an app needs both the IP address and port number. - IpAddress *string `type:"string"` - - // Developer-defined information related to a player. Amazon GameLift does not - // use this data, so it can be formatted as needed for use in the game. - PlayerData *string `min:"1" type:"string"` - - // Unique identifier for a player that is associated with this player session. - PlayerId *string `min:"1" type:"string"` - - // Unique identifier for a player session. - PlayerSessionId *string `type:"string"` - - // Port number for the game session. To connect to a Amazon GameLift server - // process, an app needs both the IP address and port number. - Port *int64 `min:"1" type:"integer"` - - // Current status of the player session. - // - // Possible player session statuses include the following: - // - // * RESERVED -- The player session request has been received, but the player - // has not yet connected to the server process and/or been validated. - // - // * ACTIVE -- The player has been validated by the server process and is - // currently connected. - // - // * COMPLETED -- The player connection has been dropped. - // - // * TIMEDOUT -- A player session request was received, but the player did - // not connect and/or was not validated within the timeout limit (60 seconds). - Status *string `type:"string" enum:"PlayerSessionStatus"` - - // Time stamp indicating when this data object was terminated. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). - TerminationTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s PlayerSession) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlayerSession) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *PlayerSession) SetCreationTime(v time.Time) *PlayerSession { - s.CreationTime = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *PlayerSession) SetFleetId(v string) *PlayerSession { - s.FleetId = &v - return s -} - -// SetGameSessionId sets the GameSessionId field's value. -func (s *PlayerSession) SetGameSessionId(v string) *PlayerSession { - s.GameSessionId = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *PlayerSession) SetIpAddress(v string) *PlayerSession { - s.IpAddress = &v - return s -} - -// SetPlayerData sets the PlayerData field's value. -func (s *PlayerSession) SetPlayerData(v string) *PlayerSession { - s.PlayerData = &v - return s -} - -// SetPlayerId sets the PlayerId field's value. -func (s *PlayerSession) SetPlayerId(v string) *PlayerSession { - s.PlayerId = &v - return s -} - -// SetPlayerSessionId sets the PlayerSessionId field's value. -func (s *PlayerSession) SetPlayerSessionId(v string) *PlayerSession { - s.PlayerSessionId = &v - return s -} - -// SetPort sets the Port field's value. -func (s *PlayerSession) SetPort(v int64) *PlayerSession { - s.Port = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *PlayerSession) SetStatus(v string) *PlayerSession { - s.Status = &v - return s -} - -// SetTerminationTime sets the TerminationTime field's value. -func (s *PlayerSession) SetTerminationTime(v time.Time) *PlayerSession { - s.TerminationTime = &v - return s -} - -// Represents the input for a request action. -type PutScalingPolicyInput struct { - _ struct{} `type:"structure"` - - // Comparison operator to use when measuring the metric against the threshold - // value. - ComparisonOperator *string `type:"string" enum:"ComparisonOperatorType"` - - // Length of time (in minutes) the metric must be at or beyond the threshold - // before a scaling event is triggered. - EvaluationPeriods *int64 `min:"1" type:"integer"` - - // Unique identifier for a fleet to apply this policy to. The fleet cannot be - // in any of the following statuses: ERROR or DELETING. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // Name of the Amazon GameLift-defined metric that is used to trigger a scaling - // adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon - // GameLift with Amazon CloudWatch (http://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-cloudwatch.html). - // - // * ActivatingGameSessions -- Game sessions in the process of being created. - // - // * ActiveGameSessions -- Game sessions that are currently running. - // - // * ActiveInstances -- Fleet instances that are currently running at least - // one game session. - // - // * AvailableGameSessions -- Additional game sessions that fleet could host - // simultaneously, given current capacity. - // - // * AvailablePlayerSessions -- Empty player slots in currently active game - // sessions. This includes game sessions that are not currently accepting - // players. Reserved player slots are not included. - // - // * CurrentPlayerSessions -- Player slots in active game sessions that are - // being used by a player or are reserved for a player. - // - // * IdleInstances -- Active instances that are currently hosting zero game - // sessions. - // - // * PercentAvailableGameSessions -- Unused percentage of the total number - // of game sessions that a fleet could host simultaneously, given current - // capacity. Use this metric for a target-based scaling policy. - // - // * PercentIdleInstances -- Percentage of the total number of active instances - // that are hosting zero game sessions. - // - // * QueueDepth -- Pending game session placement requests, in any queue, - // where the current fleet is the top-priority destination. - // - // * WaitTime -- Current wait time for pending game session placement requests, - // in any queue, where the current fleet is the top-priority destination. - // - // MetricName is a required field - MetricName *string `type:"string" required:"true" enum:"MetricName"` - - // Descriptive label that is associated with a scaling policy. Policy names - // do not need to be unique. A fleet can have only one scaling policy with the - // same name. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // Type of scaling policy to create. For a target-based policy, set the parameter - // MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. - // For a rule-based policy set the following parameters: MetricName, ComparisonOperator, - // Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment. - PolicyType *string `type:"string" enum:"PolicyType"` - - // Amount of adjustment to make, based on the scaling adjustment type. - ScalingAdjustment *int64 `type:"integer"` - - // Type of adjustment to make to a fleet's instance count (see FleetCapacity): - // - // * ChangeInCapacity -- add (or subtract) the scaling adjustment value from - // the current instance count. Positive values scale up while negative values - // scale down. - // - // * ExactCapacity -- set the instance count to the scaling adjustment value. - // - // * PercentChangeInCapacity -- increase or reduce the current instance count - // by the scaling adjustment, read as a percentage. Positive values scale - // up while negative values scale down; for example, a value of "-10" scales - // the fleet down by 10%. - ScalingAdjustmentType *string `type:"string" enum:"ScalingAdjustmentType"` - - // Object that contains settings for a target-based scaling policy. - TargetConfiguration *TargetConfiguration `type:"structure"` - - // Metric value used to trigger a scaling event. - Threshold *float64 `type:"double"` -} - -// String returns the string representation -func (s PutScalingPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutScalingPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutScalingPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutScalingPolicyInput"} - if s.EvaluationPeriods != nil && *s.EvaluationPeriods < 1 { - invalidParams.Add(request.NewErrParamMinValue("EvaluationPeriods", 1)) - } - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.TargetConfiguration != nil { - if err := s.TargetConfiguration.Validate(); err != nil { - invalidParams.AddNested("TargetConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComparisonOperator sets the ComparisonOperator field's value. -func (s *PutScalingPolicyInput) SetComparisonOperator(v string) *PutScalingPolicyInput { - s.ComparisonOperator = &v - return s -} - -// SetEvaluationPeriods sets the EvaluationPeriods field's value. -func (s *PutScalingPolicyInput) SetEvaluationPeriods(v int64) *PutScalingPolicyInput { - s.EvaluationPeriods = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *PutScalingPolicyInput) SetFleetId(v string) *PutScalingPolicyInput { - s.FleetId = &v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *PutScalingPolicyInput) SetMetricName(v string) *PutScalingPolicyInput { - s.MetricName = &v - return s -} - -// SetName sets the Name field's value. -func (s *PutScalingPolicyInput) SetName(v string) *PutScalingPolicyInput { - s.Name = &v - return s -} - -// SetPolicyType sets the PolicyType field's value. -func (s *PutScalingPolicyInput) SetPolicyType(v string) *PutScalingPolicyInput { - s.PolicyType = &v - return s -} - -// SetScalingAdjustment sets the ScalingAdjustment field's value. -func (s *PutScalingPolicyInput) SetScalingAdjustment(v int64) *PutScalingPolicyInput { - s.ScalingAdjustment = &v - return s -} - -// SetScalingAdjustmentType sets the ScalingAdjustmentType field's value. -func (s *PutScalingPolicyInput) SetScalingAdjustmentType(v string) *PutScalingPolicyInput { - s.ScalingAdjustmentType = &v - return s -} - -// SetTargetConfiguration sets the TargetConfiguration field's value. -func (s *PutScalingPolicyInput) SetTargetConfiguration(v *TargetConfiguration) *PutScalingPolicyInput { - s.TargetConfiguration = v - return s -} - -// SetThreshold sets the Threshold field's value. -func (s *PutScalingPolicyInput) SetThreshold(v float64) *PutScalingPolicyInput { - s.Threshold = &v - return s -} - -// Represents the returned data in response to a request action. -type PutScalingPolicyOutput struct { - _ struct{} `type:"structure"` - - // Descriptive label that is associated with a scaling policy. Policy names - // do not need to be unique. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PutScalingPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutScalingPolicyOutput) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *PutScalingPolicyOutput) SetName(v string) *PutScalingPolicyOutput { - s.Name = &v - return s -} - -// Represents the input for a request action. -type RequestUploadCredentialsInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a build to get credentials for. - // - // BuildId is a required field - BuildId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RequestUploadCredentialsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestUploadCredentialsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestUploadCredentialsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestUploadCredentialsInput"} - if s.BuildId == nil { - invalidParams.Add(request.NewErrParamRequired("BuildId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBuildId sets the BuildId field's value. -func (s *RequestUploadCredentialsInput) SetBuildId(v string) *RequestUploadCredentialsInput { - s.BuildId = &v - return s -} - -// Represents the returned data in response to a request action. -type RequestUploadCredentialsOutput struct { - _ struct{} `type:"structure"` - - // Amazon S3 path and key, identifying where the game build files are stored. - StorageLocation *S3Location `type:"structure"` - - // AWS credentials required when uploading a game build to the storage location. - // These credentials have a limited lifespan and are valid only for the build - // they were issued for. - UploadCredentials *AwsCredentials `type:"structure" sensitive:"true"` -} - -// String returns the string representation -func (s RequestUploadCredentialsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestUploadCredentialsOutput) GoString() string { - return s.String() -} - -// SetStorageLocation sets the StorageLocation field's value. -func (s *RequestUploadCredentialsOutput) SetStorageLocation(v *S3Location) *RequestUploadCredentialsOutput { - s.StorageLocation = v - return s -} - -// SetUploadCredentials sets the UploadCredentials field's value. -func (s *RequestUploadCredentialsOutput) SetUploadCredentials(v *AwsCredentials) *RequestUploadCredentialsOutput { - s.UploadCredentials = v - return s -} - -// Represents the input for a request action. -type ResolveAliasInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for the alias you want to resolve. - // - // AliasId is a required field - AliasId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ResolveAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResolveAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResolveAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResolveAliasInput"} - if s.AliasId == nil { - invalidParams.Add(request.NewErrParamRequired("AliasId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliasId sets the AliasId field's value. -func (s *ResolveAliasInput) SetAliasId(v string) *ResolveAliasInput { - s.AliasId = &v - return s -} - -// Represents the returned data in response to a request action. -type ResolveAliasOutput struct { - _ struct{} `type:"structure"` - - // Fleet identifier that is associated with the requested alias. - FleetId *string `type:"string"` -} - -// String returns the string representation -func (s ResolveAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResolveAliasOutput) GoString() string { - return s.String() -} - -// SetFleetId sets the FleetId field's value. -func (s *ResolveAliasOutput) SetFleetId(v string) *ResolveAliasOutput { - s.FleetId = &v - return s -} - -// Policy that limits the number of game sessions a player can create on the -// same fleet. This optional policy gives game owners control over how players -// can consume available game server resources. A resource creation policy makes -// the following statement: "An individual player can create a maximum number -// of new game sessions within a specified time period". -// -// The policy is evaluated when a player tries to create a new game session. -// For example, with a policy of 10 new game sessions and a time period of 60 -// minutes, on receiving a CreateGameSession request, Amazon GameLift checks -// that the player (identified by CreatorId) has created fewer than 10 game -// sessions in the past 60 minutes. -type ResourceCreationLimitPolicy struct { - _ struct{} `type:"structure"` - - // Maximum number of game sessions that an individual can create during the - // policy period. - NewGameSessionsPerCreator *int64 `type:"integer"` - - // Time span used in evaluating the resource creation limit policy. - PolicyPeriodInMinutes *int64 `type:"integer"` -} - -// String returns the string representation -func (s ResourceCreationLimitPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceCreationLimitPolicy) GoString() string { - return s.String() -} - -// SetNewGameSessionsPerCreator sets the NewGameSessionsPerCreator field's value. -func (s *ResourceCreationLimitPolicy) SetNewGameSessionsPerCreator(v int64) *ResourceCreationLimitPolicy { - s.NewGameSessionsPerCreator = &v - return s -} - -// SetPolicyPeriodInMinutes sets the PolicyPeriodInMinutes field's value. -func (s *ResourceCreationLimitPolicy) SetPolicyPeriodInMinutes(v int64) *ResourceCreationLimitPolicy { - s.PolicyPeriodInMinutes = &v - return s -} - -// Routing configuration for a fleet alias. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -type RoutingStrategy struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet that the alias points to. - FleetId *string `type:"string"` - - // Message text to be used with a terminal routing strategy. - Message *string `type:"string"` - - // Type of routing strategy. - // - // Possible routing types include the following: - // - // * SIMPLE -- The alias resolves to one specific fleet. Use this type when - // routing to active fleets. - // - // * TERMINAL -- The alias does not resolve to a fleet but instead can be - // used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException - // with the RoutingStrategy message embedded. - Type *string `type:"string" enum:"RoutingStrategyType"` -} - -// String returns the string representation -func (s RoutingStrategy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RoutingStrategy) GoString() string { - return s.String() -} - -// SetFleetId sets the FleetId field's value. -func (s *RoutingStrategy) SetFleetId(v string) *RoutingStrategy { - s.FleetId = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *RoutingStrategy) SetMessage(v string) *RoutingStrategy { - s.Message = &v - return s -} - -// SetType sets the Type field's value. -func (s *RoutingStrategy) SetType(v string) *RoutingStrategy { - s.Type = &v - return s -} - -// A collection of server process configurations that describe what processes -// to run on each instance in a fleet. All fleets must have a run-time configuration. -// Each instance in the fleet launches the server processes specified in the -// run-time configuration and launches new ones as existing processes end. Each -// instance regularly checks for an updated run-time configuration and follows -// the new instructions. -// -// The run-time configuration enables the instances in a fleet to run multiple -// processes simultaneously. Potential scenarios are as follows: (1) Run multiple -// processes of a single game server executable to maximize usage of your hosting -// resources. (2) Run one or more processes of different build executables, -// such as your game server executable and a related program, or two or more -// different versions of a game server. (3) Run multiple processes of a single -// game server but with different launch parameters, for example to run one -// process on each instance in debug mode. -// -// A Amazon GameLift instance is limited to 50 processes running simultaneously. -// A run-time configuration must specify fewer than this limit. To calculate -// the total number of processes specified in a run-time configuration, add -// the values of the ConcurrentExecutions parameter for each ServerProcess object -// in the run-time configuration. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * DeleteFleet -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetCapacity -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeEC2InstanceLimits -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -type RuntimeConfiguration struct { - _ struct{} `type:"structure"` - - // Maximum amount of time (in seconds) that a game session can remain in status - // ACTIVATING. If the game session is not active before the timeout, activation - // is terminated and the game session status is changed to TERMINATED. - GameSessionActivationTimeoutSeconds *int64 `min:"1" type:"integer"` - - // Maximum number of game sessions with status ACTIVATING to allow on an instance - // simultaneously. This setting limits the amount of instance resources that - // can be used for new game activations at any one time. - MaxConcurrentGameSessionActivations *int64 `min:"1" type:"integer"` - - // Collection of server process configurations that describe which server processes - // to run on each instance in a fleet. - ServerProcesses []*ServerProcess `min:"1" type:"list"` -} - -// String returns the string representation -func (s RuntimeConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RuntimeConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RuntimeConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RuntimeConfiguration"} - if s.GameSessionActivationTimeoutSeconds != nil && *s.GameSessionActivationTimeoutSeconds < 1 { - invalidParams.Add(request.NewErrParamMinValue("GameSessionActivationTimeoutSeconds", 1)) - } - if s.MaxConcurrentGameSessionActivations != nil && *s.MaxConcurrentGameSessionActivations < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxConcurrentGameSessionActivations", 1)) - } - if s.ServerProcesses != nil && len(s.ServerProcesses) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerProcesses", 1)) - } - if s.ServerProcesses != nil { - for i, v := range s.ServerProcesses { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ServerProcesses", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGameSessionActivationTimeoutSeconds sets the GameSessionActivationTimeoutSeconds field's value. -func (s *RuntimeConfiguration) SetGameSessionActivationTimeoutSeconds(v int64) *RuntimeConfiguration { - s.GameSessionActivationTimeoutSeconds = &v - return s -} - -// SetMaxConcurrentGameSessionActivations sets the MaxConcurrentGameSessionActivations field's value. -func (s *RuntimeConfiguration) SetMaxConcurrentGameSessionActivations(v int64) *RuntimeConfiguration { - s.MaxConcurrentGameSessionActivations = &v - return s -} - -// SetServerProcesses sets the ServerProcesses field's value. -func (s *RuntimeConfiguration) SetServerProcesses(v []*ServerProcess) *RuntimeConfiguration { - s.ServerProcesses = v - return s -} - -// Location in Amazon Simple Storage Service (Amazon S3) where build files can -// be stored for access by Amazon GameLift. This location is specified in a -// CreateBuild request. For more details, see the Create a Build with Files -// in Amazon S3 (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html#gamelift-build-cli-uploading-create-build). -type S3Location struct { - _ struct{} `type:"structure"` - - // Amazon S3 bucket identifier. This is the name of your S3 bucket. - Bucket *string `min:"1" type:"string"` - - // Name of the zip file containing your build files. - Key *string `min:"1" type:"string"` - - // Amazon Resource Name (ARN (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) - // for the access role that allows Amazon GameLift to access your S3 bucket. - RoleArn *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s S3Location) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Location) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3Location) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3Location"} - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.RoleArn != nil && len(*s.RoleArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *S3Location) SetBucket(v string) *S3Location { - s.Bucket = &v - return s -} - -// SetKey sets the Key field's value. -func (s *S3Location) SetKey(v string) *S3Location { - s.Key = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *S3Location) SetRoleArn(v string) *S3Location { - s.RoleArn = &v - return s -} - -// Rule that controls how a fleet is scaled. Scaling policies are uniquely identified -// by the combination of name and fleet ID. -// -// Operations related to fleet capacity scaling include: -// -// * DescribeFleetCapacity -// -// * UpdateFleetCapacity -// -// * DescribeEC2InstanceLimits -// -// * Manage scaling policies: -// -// PutScalingPolicy (auto-scaling) -// -// DescribeScalingPolicies (auto-scaling) -// -// DeleteScalingPolicy (auto-scaling) -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -type ScalingPolicy struct { - _ struct{} `type:"structure"` - - // Comparison operator to use when measuring a metric against the threshold - // value. - ComparisonOperator *string `type:"string" enum:"ComparisonOperatorType"` - - // Length of time (in minutes) the metric must be at or beyond the threshold - // before a scaling event is triggered. - EvaluationPeriods *int64 `min:"1" type:"integer"` - - // Unique identifier for a fleet that is associated with this scaling policy. - FleetId *string `type:"string"` - - // Name of the Amazon GameLift-defined metric that is used to trigger a scaling - // adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon - // GameLift with Amazon CloudWatch (http://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-cloudwatch.html). - // - // * ActivatingGameSessions -- Game sessions in the process of being created. - // - // * ActiveGameSessions -- Game sessions that are currently running. - // - // * ActiveInstances -- Fleet instances that are currently running at least - // one game session. - // - // * AvailableGameSessions -- Additional game sessions that fleet could host - // simultaneously, given current capacity. - // - // * AvailablePlayerSessions -- Empty player slots in currently active game - // sessions. This includes game sessions that are not currently accepting - // players. Reserved player slots are not included. - // - // * CurrentPlayerSessions -- Player slots in active game sessions that are - // being used by a player or are reserved for a player. - // - // * IdleInstances -- Active instances that are currently hosting zero game - // sessions. - // - // * PercentAvailableGameSessions -- Unused percentage of the total number - // of game sessions that a fleet could host simultaneously, given current - // capacity. Use this metric for a target-based scaling policy. - // - // * PercentIdleInstances -- Percentage of the total number of active instances - // that are hosting zero game sessions. - // - // * QueueDepth -- Pending game session placement requests, in any queue, - // where the current fleet is the top-priority destination. - // - // * WaitTime -- Current wait time for pending game session placement requests, - // in any queue, where the current fleet is the top-priority destination. - MetricName *string `type:"string" enum:"MetricName"` - - // Descriptive label that is associated with a scaling policy. Policy names - // do not need to be unique. - Name *string `min:"1" type:"string"` - - // Type of scaling policy to create. For a target-based policy, set the parameter - // MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. - // For a rule-based policy set the following parameters: MetricName, ComparisonOperator, - // Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment. - PolicyType *string `type:"string" enum:"PolicyType"` - - // Amount of adjustment to make, based on the scaling adjustment type. - ScalingAdjustment *int64 `type:"integer"` - - // Type of adjustment to make to a fleet's instance count (see FleetCapacity): - // - // * ChangeInCapacity -- add (or subtract) the scaling adjustment value from - // the current instance count. Positive values scale up while negative values - // scale down. - // - // * ExactCapacity -- set the instance count to the scaling adjustment value. - // - // * PercentChangeInCapacity -- increase or reduce the current instance count - // by the scaling adjustment, read as a percentage. Positive values scale - // up while negative values scale down. - ScalingAdjustmentType *string `type:"string" enum:"ScalingAdjustmentType"` - - // Current status of the scaling policy. The scaling policy can be in force - // only when in an ACTIVE status. Scaling policies can be suspended for individual - // fleets (see StopFleetActions; if suspended for a fleet, the policy status - // does not change. View a fleet's stopped actions by calling DescribeFleetCapacity. - // - // * ACTIVE -- The scaling policy can be used for auto-scaling a fleet. - // - // * UPDATE_REQUESTED -- A request to update the scaling policy has been - // received. - // - // * UPDATING -- A change is being made to the scaling policy. - // - // * DELETE_REQUESTED -- A request to delete the scaling policy has been - // received. - // - // * DELETING -- The scaling policy is being deleted. - // - // * DELETED -- The scaling policy has been deleted. - // - // * ERROR -- An error occurred in creating the policy. It should be removed - // and recreated. - Status *string `type:"string" enum:"ScalingStatusType"` - - // Object that contains settings for a target-based scaling policy. - TargetConfiguration *TargetConfiguration `type:"structure"` - - // Metric value used to trigger a scaling event. - Threshold *float64 `type:"double"` -} - -// String returns the string representation -func (s ScalingPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalingPolicy) GoString() string { - return s.String() -} - -// SetComparisonOperator sets the ComparisonOperator field's value. -func (s *ScalingPolicy) SetComparisonOperator(v string) *ScalingPolicy { - s.ComparisonOperator = &v - return s -} - -// SetEvaluationPeriods sets the EvaluationPeriods field's value. -func (s *ScalingPolicy) SetEvaluationPeriods(v int64) *ScalingPolicy { - s.EvaluationPeriods = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *ScalingPolicy) SetFleetId(v string) *ScalingPolicy { - s.FleetId = &v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *ScalingPolicy) SetMetricName(v string) *ScalingPolicy { - s.MetricName = &v - return s -} - -// SetName sets the Name field's value. -func (s *ScalingPolicy) SetName(v string) *ScalingPolicy { - s.Name = &v - return s -} - -// SetPolicyType sets the PolicyType field's value. -func (s *ScalingPolicy) SetPolicyType(v string) *ScalingPolicy { - s.PolicyType = &v - return s -} - -// SetScalingAdjustment sets the ScalingAdjustment field's value. -func (s *ScalingPolicy) SetScalingAdjustment(v int64) *ScalingPolicy { - s.ScalingAdjustment = &v - return s -} - -// SetScalingAdjustmentType sets the ScalingAdjustmentType field's value. -func (s *ScalingPolicy) SetScalingAdjustmentType(v string) *ScalingPolicy { - s.ScalingAdjustmentType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ScalingPolicy) SetStatus(v string) *ScalingPolicy { - s.Status = &v - return s -} - -// SetTargetConfiguration sets the TargetConfiguration field's value. -func (s *ScalingPolicy) SetTargetConfiguration(v *TargetConfiguration) *ScalingPolicy { - s.TargetConfiguration = v - return s -} - -// SetThreshold sets the Threshold field's value. -func (s *ScalingPolicy) SetThreshold(v float64) *ScalingPolicy { - s.Threshold = &v - return s -} - -// Represents the input for a request action. -type SearchGameSessionsInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for an alias associated with the fleet to search for active - // game sessions. Each request must reference either a fleet ID or alias ID, - // but not both. - AliasId *string `type:"string"` - - // String containing the search criteria for the session search. If no filter - // expression is included, the request returns results for all game sessions - // in the fleet that are in ACTIVE status. - // - // A filter expression can contain one or multiple conditions. Each condition - // consists of the following: - // - // * Operand -- Name of a game session attribute. Valid values are gameSessionName, - // gameSessionId, gameSessionProperties, maximumSessions, creationTimeMillis, - // playerSessionCount, hasAvailablePlayerSessions. - // - // * Comparator -- Valid comparators are: =, <>, <, >, <=, >=. - // - // * Value -- Value to be searched for. Values may be numbers, boolean values - // (true/false) or strings depending on the operand. String values are case - // sensitive and must be enclosed in single quotes. Special characters must - // be escaped. Boolean and string values can only be used with the comparators - // = and <>. For example, the following filter expression searches on gameSessionName: - // "FilterExpression": "gameSessionName = 'Matt\\'s Awesome Game 1'". - // - // To chain multiple conditions in a single expression, use the logical keywords - // AND, OR, and NOT and parentheses as needed. For example: x AND y AND NOT - // z, NOT (x OR y). - // - // Session search evaluates conditions from left to right using the following - // precedence rules: - // - // =, <>, <, >, <=, >= - // - // Parentheses - // - // NOT - // - // AND - // - // OR - // - // For example, this filter expression retrieves game sessions hosting at least - // ten players that have an open player slot: "maximumSessions>=10 AND hasAvailablePlayerSessions=true". - FilterExpression *string `min:"1" type:"string"` - - // Unique identifier for a fleet to search for active game sessions. Each request - // must reference either a fleet ID or alias ID, but not both. - FleetId *string `type:"string"` - - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. The maximum number of results returned - // is 20, even if this value is not set or is set higher than 20. - Limit *int64 `min:"1" type:"integer"` - - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. - NextToken *string `min:"1" type:"string"` - - // Instructions on how to sort the search results. If no sort expression is - // included, the request returns results in random order. A sort expression - // consists of the following elements: - // - // * Operand -- Name of a game session attribute. Valid values are gameSessionName, - // gameSessionId, gameSessionProperties, maximumSessions, creationTimeMillis, - // playerSessionCount, hasAvailablePlayerSessions. - // - // * Order -- Valid sort orders are ASC (ascending) and DESC (descending). - // - // For example, this sort expression returns the oldest active sessions first: - // "SortExpression": "creationTimeMillis ASC". Results with a null value for - // the sort operand are returned at the end of the list. - SortExpression *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s SearchGameSessionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchGameSessionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SearchGameSessionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SearchGameSessionsInput"} - if s.FilterExpression != nil && len(*s.FilterExpression) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterExpression", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.SortExpression != nil && len(*s.SortExpression) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SortExpression", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliasId sets the AliasId field's value. -func (s *SearchGameSessionsInput) SetAliasId(v string) *SearchGameSessionsInput { - s.AliasId = &v - return s -} - -// SetFilterExpression sets the FilterExpression field's value. -func (s *SearchGameSessionsInput) SetFilterExpression(v string) *SearchGameSessionsInput { - s.FilterExpression = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *SearchGameSessionsInput) SetFleetId(v string) *SearchGameSessionsInput { - s.FleetId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *SearchGameSessionsInput) SetLimit(v int64) *SearchGameSessionsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *SearchGameSessionsInput) SetNextToken(v string) *SearchGameSessionsInput { - s.NextToken = &v - return s -} - -// SetSortExpression sets the SortExpression field's value. -func (s *SearchGameSessionsInput) SetSortExpression(v string) *SearchGameSessionsInput { - s.SortExpression = &v - return s -} - -// Represents the returned data in response to a request action. -type SearchGameSessionsOutput struct { - _ struct{} `type:"structure"` - - // Collection of objects containing game session properties for each session - // matching the request. - GameSessions []*GameSession `type:"list"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s SearchGameSessionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchGameSessionsOutput) GoString() string { - return s.String() -} - -// SetGameSessions sets the GameSessions field's value. -func (s *SearchGameSessionsOutput) SetGameSessions(v []*GameSession) *SearchGameSessionsOutput { - s.GameSessions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *SearchGameSessionsOutput) SetNextToken(v string) *SearchGameSessionsOutput { - s.NextToken = &v - return s -} - -// A set of instructions for launching server processes on each instance in -// a fleet. Each instruction set identifies the location of the server executable, -// optional launch parameters, and the number of server processes with this -// configuration to maintain concurrently on the instance. Server process configurations -// make up a fleet's RuntimeConfiguration. -type ServerProcess struct { - _ struct{} `type:"structure"` - - // Number of server processes using this configuration to run concurrently on - // an instance. - // - // ConcurrentExecutions is a required field - ConcurrentExecutions *int64 `min:"1" type:"integer" required:"true"` - - // Location of the server executable in a game build. All game builds are installed - // on instances at the root : for Windows instances C:\game, and for Linux instances - // /local/game. A Windows game build with an executable file located at MyGame\latest\server.exe - // must have a launch path of "C:\game\MyGame\latest\server.exe". A Linux game - // build with an executable file located at MyGame/latest/server.exe must have - // a launch path of "/local/game/MyGame/latest/server.exe". - // - // LaunchPath is a required field - LaunchPath *string `min:"1" type:"string" required:"true"` - - // Optional list of parameters to pass to the server executable on launch. - Parameters *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ServerProcess) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServerProcess) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ServerProcess) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ServerProcess"} - if s.ConcurrentExecutions == nil { - invalidParams.Add(request.NewErrParamRequired("ConcurrentExecutions")) - } - if s.ConcurrentExecutions != nil && *s.ConcurrentExecutions < 1 { - invalidParams.Add(request.NewErrParamMinValue("ConcurrentExecutions", 1)) - } - if s.LaunchPath == nil { - invalidParams.Add(request.NewErrParamRequired("LaunchPath")) - } - if s.LaunchPath != nil && len(*s.LaunchPath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LaunchPath", 1)) - } - if s.Parameters != nil && len(*s.Parameters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Parameters", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConcurrentExecutions sets the ConcurrentExecutions field's value. -func (s *ServerProcess) SetConcurrentExecutions(v int64) *ServerProcess { - s.ConcurrentExecutions = &v - return s -} - -// SetLaunchPath sets the LaunchPath field's value. -func (s *ServerProcess) SetLaunchPath(v string) *ServerProcess { - s.LaunchPath = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ServerProcess) SetParameters(v string) *ServerProcess { - s.Parameters = &v - return s -} - -type StartFleetActionsInput struct { - _ struct{} `type:"structure"` - - // List of actions to restart on the fleet. - // - // Actions is a required field - Actions []*string `min:"1" type:"list" required:"true"` - - // Unique identifier for a fleet - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StartFleetActionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartFleetActionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartFleetActionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartFleetActionsInput"} - if s.Actions == nil { - invalidParams.Add(request.NewErrParamRequired("Actions")) - } - if s.Actions != nil && len(s.Actions) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Actions", 1)) - } - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActions sets the Actions field's value. -func (s *StartFleetActionsInput) SetActions(v []*string) *StartFleetActionsInput { - s.Actions = v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *StartFleetActionsInput) SetFleetId(v string) *StartFleetActionsInput { - s.FleetId = &v - return s -} - -type StartFleetActionsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StartFleetActionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartFleetActionsOutput) GoString() string { - return s.String() -} - -// Represents the input for a request action. -type StartGameSessionPlacementInput struct { - _ struct{} `type:"structure"` - - // Set of information on each player to create a player session for. - DesiredPlayerSessions []*DesiredPlayerSession `type:"list"` - - // Set of custom properties for a game session, formatted as key:value pairs. - // These properties are passed to a game server process in the GameSession object - // with a request to start a new game session (see Start a Game Session (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). - GameProperties []*GameProperty `type:"list"` - - // Set of custom game session properties, formatted as a single string value. - // This data is passed to a game server process in the GameSession object with - // a request to start a new game session (see Start a Game Session (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). - GameSessionData *string `min:"1" type:"string"` - - // Descriptive label that is associated with a game session. Session names do - // not need to be unique. - GameSessionName *string `min:"1" type:"string"` - - // Name of the queue to use to place the new game session. - // - // GameSessionQueueName is a required field - GameSessionQueueName *string `min:"1" type:"string" required:"true"` - - // Maximum number of players that can be connected simultaneously to the game - // session. - // - // MaximumPlayerSessionCount is a required field - MaximumPlayerSessionCount *int64 `type:"integer" required:"true"` - - // Unique identifier to assign to the new game session placement. This value - // is developer-defined. The value must be unique across all regions and cannot - // be reused unless you are resubmitting a canceled or timed-out placement request. - // - // PlacementId is a required field - PlacementId *string `min:"1" type:"string" required:"true"` - - // Set of values, expressed in milliseconds, indicating the amount of latency - // that a player experiences when connected to AWS regions. This information - // is used to try to place the new game session where it can offer the best - // possible gameplay experience for the players. - PlayerLatencies []*PlayerLatency `type:"list"` -} - -// String returns the string representation -func (s StartGameSessionPlacementInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartGameSessionPlacementInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartGameSessionPlacementInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartGameSessionPlacementInput"} - if s.GameSessionData != nil && len(*s.GameSessionData) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionData", 1)) - } - if s.GameSessionName != nil && len(*s.GameSessionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionName", 1)) - } - if s.GameSessionQueueName == nil { - invalidParams.Add(request.NewErrParamRequired("GameSessionQueueName")) - } - if s.GameSessionQueueName != nil && len(*s.GameSessionQueueName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionQueueName", 1)) - } - if s.MaximumPlayerSessionCount == nil { - invalidParams.Add(request.NewErrParamRequired("MaximumPlayerSessionCount")) - } - if s.PlacementId == nil { - invalidParams.Add(request.NewErrParamRequired("PlacementId")) - } - if s.PlacementId != nil && len(*s.PlacementId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlacementId", 1)) - } - if s.DesiredPlayerSessions != nil { - for i, v := range s.DesiredPlayerSessions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DesiredPlayerSessions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.GameProperties != nil { - for i, v := range s.GameProperties { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GameProperties", i), err.(request.ErrInvalidParams)) - } - } - } - if s.PlayerLatencies != nil { - for i, v := range s.PlayerLatencies { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PlayerLatencies", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDesiredPlayerSessions sets the DesiredPlayerSessions field's value. -func (s *StartGameSessionPlacementInput) SetDesiredPlayerSessions(v []*DesiredPlayerSession) *StartGameSessionPlacementInput { - s.DesiredPlayerSessions = v - return s -} - -// SetGameProperties sets the GameProperties field's value. -func (s *StartGameSessionPlacementInput) SetGameProperties(v []*GameProperty) *StartGameSessionPlacementInput { - s.GameProperties = v - return s -} - -// SetGameSessionData sets the GameSessionData field's value. -func (s *StartGameSessionPlacementInput) SetGameSessionData(v string) *StartGameSessionPlacementInput { - s.GameSessionData = &v - return s -} - -// SetGameSessionName sets the GameSessionName field's value. -func (s *StartGameSessionPlacementInput) SetGameSessionName(v string) *StartGameSessionPlacementInput { - s.GameSessionName = &v - return s -} - -// SetGameSessionQueueName sets the GameSessionQueueName field's value. -func (s *StartGameSessionPlacementInput) SetGameSessionQueueName(v string) *StartGameSessionPlacementInput { - s.GameSessionQueueName = &v - return s -} - -// SetMaximumPlayerSessionCount sets the MaximumPlayerSessionCount field's value. -func (s *StartGameSessionPlacementInput) SetMaximumPlayerSessionCount(v int64) *StartGameSessionPlacementInput { - s.MaximumPlayerSessionCount = &v - return s -} - -// SetPlacementId sets the PlacementId field's value. -func (s *StartGameSessionPlacementInput) SetPlacementId(v string) *StartGameSessionPlacementInput { - s.PlacementId = &v - return s -} - -// SetPlayerLatencies sets the PlayerLatencies field's value. -func (s *StartGameSessionPlacementInput) SetPlayerLatencies(v []*PlayerLatency) *StartGameSessionPlacementInput { - s.PlayerLatencies = v - return s -} - -// Represents the returned data in response to a request action. -type StartGameSessionPlacementOutput struct { - _ struct{} `type:"structure"` - - // Object that describes the newly created game session placement. This object - // includes all the information provided in the request, as well as start/end - // time stamps and placement status. - GameSessionPlacement *GameSessionPlacement `type:"structure"` -} - -// String returns the string representation -func (s StartGameSessionPlacementOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartGameSessionPlacementOutput) GoString() string { - return s.String() -} - -// SetGameSessionPlacement sets the GameSessionPlacement field's value. -func (s *StartGameSessionPlacementOutput) SetGameSessionPlacement(v *GameSessionPlacement) *StartGameSessionPlacementOutput { - s.GameSessionPlacement = v - return s -} - -// Represents the input for a request action. -type StartMatchBackfillInput struct { - _ struct{} `type:"structure"` - - // Name of the matchmaker to use for this request. The name of the matchmaker - // that was used with the original game session is listed in the GameSession - // object, MatchmakerData property. This property contains a matchmaking configuration - // ARN value, which includes the matchmaker name. (In the ARN value "arn:aws:gamelift:us-west-2:111122223333:matchmakingconfiguration/MM-4v4", - // the matchmaking configuration name is "MM-4v4".) Use only the name for this - // parameter. - // - // ConfigurationName is a required field - ConfigurationName *string `min:"1" type:"string" required:"true"` - - // Amazon Resource Name (ARN (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) - // that is assigned to a game session and uniquely identifies it. - // - // GameSessionArn is a required field - GameSessionArn *string `min:"1" type:"string" required:"true"` - - // Match information on all players that are currently assigned to the game - // session. This information is used by the matchmaker to find new players and - // add them to the existing game. - // - // * PlayerID, PlayerAttributes, Team -\\- This information is maintained - // in the GameSession object, MatchmakerData property, for all players who - // are currently assigned to the game session. The matchmaker data is in - // JSON syntax, formatted as a string. For more details, see Match Data - // (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-server.html#match-server-data). - // - // - // * LatencyInMs -\\- If the matchmaker uses player latency, include a latency - // value, in milliseconds, for the region that the game session is currently - // in. Do not include latency values for any other region. - // - // Players is a required field - Players []*Player `type:"list" required:"true"` - - // Unique identifier for a matchmaking ticket. If no ticket ID is specified - // here, Amazon GameLift will generate one in the form of a UUID. Use this identifier - // to track the match backfill ticket status and retrieve match results. - TicketId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s StartMatchBackfillInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartMatchBackfillInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartMatchBackfillInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartMatchBackfillInput"} - if s.ConfigurationName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationName")) - } - if s.ConfigurationName != nil && len(*s.ConfigurationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationName", 1)) - } - if s.GameSessionArn == nil { - invalidParams.Add(request.NewErrParamRequired("GameSessionArn")) - } - if s.GameSessionArn != nil && len(*s.GameSessionArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionArn", 1)) - } - if s.Players == nil { - invalidParams.Add(request.NewErrParamRequired("Players")) - } - if s.TicketId != nil && len(*s.TicketId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TicketId", 1)) - } - if s.Players != nil { - for i, v := range s.Players { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Players", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationName sets the ConfigurationName field's value. -func (s *StartMatchBackfillInput) SetConfigurationName(v string) *StartMatchBackfillInput { - s.ConfigurationName = &v - return s -} - -// SetGameSessionArn sets the GameSessionArn field's value. -func (s *StartMatchBackfillInput) SetGameSessionArn(v string) *StartMatchBackfillInput { - s.GameSessionArn = &v - return s -} - -// SetPlayers sets the Players field's value. -func (s *StartMatchBackfillInput) SetPlayers(v []*Player) *StartMatchBackfillInput { - s.Players = v - return s -} - -// SetTicketId sets the TicketId field's value. -func (s *StartMatchBackfillInput) SetTicketId(v string) *StartMatchBackfillInput { - s.TicketId = &v - return s -} - -// Represents the returned data in response to a request action. -type StartMatchBackfillOutput struct { - _ struct{} `type:"structure"` - - // Ticket representing the backfill matchmaking request. This object includes - // the information in the request, ticket status, and match results as generated - // during the matchmaking process. - MatchmakingTicket *MatchmakingTicket `type:"structure"` -} - -// String returns the string representation -func (s StartMatchBackfillOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartMatchBackfillOutput) GoString() string { - return s.String() -} - -// SetMatchmakingTicket sets the MatchmakingTicket field's value. -func (s *StartMatchBackfillOutput) SetMatchmakingTicket(v *MatchmakingTicket) *StartMatchBackfillOutput { - s.MatchmakingTicket = v - return s -} - -// Represents the input for a request action. -type StartMatchmakingInput struct { - _ struct{} `type:"structure"` - - // Name of the matchmaking configuration to use for this request. Matchmaking - // configurations must exist in the same region as this request. - // - // ConfigurationName is a required field - ConfigurationName *string `min:"1" type:"string" required:"true"` - - // Information on each player to be matched. This information must include a - // player ID, and may contain player attributes and latency data to be used - // in the matchmaking process. After a successful match, Player objects contain - // the name of the team the player is assigned to. - // - // Players is a required field - Players []*Player `type:"list" required:"true"` - - // Unique identifier for a matchmaking ticket. If no ticket ID is specified - // here, Amazon GameLift will generate one in the form of a UUID. Use this identifier - // to track the matchmaking ticket status and retrieve match results. - TicketId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s StartMatchmakingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartMatchmakingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartMatchmakingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartMatchmakingInput"} - if s.ConfigurationName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationName")) - } - if s.ConfigurationName != nil && len(*s.ConfigurationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationName", 1)) - } - if s.Players == nil { - invalidParams.Add(request.NewErrParamRequired("Players")) - } - if s.TicketId != nil && len(*s.TicketId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TicketId", 1)) - } - if s.Players != nil { - for i, v := range s.Players { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Players", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationName sets the ConfigurationName field's value. -func (s *StartMatchmakingInput) SetConfigurationName(v string) *StartMatchmakingInput { - s.ConfigurationName = &v - return s -} - -// SetPlayers sets the Players field's value. -func (s *StartMatchmakingInput) SetPlayers(v []*Player) *StartMatchmakingInput { - s.Players = v - return s -} - -// SetTicketId sets the TicketId field's value. -func (s *StartMatchmakingInput) SetTicketId(v string) *StartMatchmakingInput { - s.TicketId = &v - return s -} - -// Represents the returned data in response to a request action. -type StartMatchmakingOutput struct { - _ struct{} `type:"structure"` - - // Ticket representing the matchmaking request. This object include the information - // included in the request, ticket status, and match results as generated during - // the matchmaking process. - MatchmakingTicket *MatchmakingTicket `type:"structure"` -} - -// String returns the string representation -func (s StartMatchmakingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartMatchmakingOutput) GoString() string { - return s.String() -} - -// SetMatchmakingTicket sets the MatchmakingTicket field's value. -func (s *StartMatchmakingOutput) SetMatchmakingTicket(v *MatchmakingTicket) *StartMatchmakingOutput { - s.MatchmakingTicket = v - return s -} - -type StopFleetActionsInput struct { - _ struct{} `type:"structure"` - - // List of actions to suspend on the fleet. - // - // Actions is a required field - Actions []*string `min:"1" type:"list" required:"true"` - - // Unique identifier for a fleet - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StopFleetActionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopFleetActionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopFleetActionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopFleetActionsInput"} - if s.Actions == nil { - invalidParams.Add(request.NewErrParamRequired("Actions")) - } - if s.Actions != nil && len(s.Actions) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Actions", 1)) - } - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActions sets the Actions field's value. -func (s *StopFleetActionsInput) SetActions(v []*string) *StopFleetActionsInput { - s.Actions = v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *StopFleetActionsInput) SetFleetId(v string) *StopFleetActionsInput { - s.FleetId = &v - return s -} - -type StopFleetActionsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopFleetActionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopFleetActionsOutput) GoString() string { - return s.String() -} - -// Represents the input for a request action. -type StopGameSessionPlacementInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a game session placement to cancel. - // - // PlacementId is a required field - PlacementId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopGameSessionPlacementInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopGameSessionPlacementInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopGameSessionPlacementInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopGameSessionPlacementInput"} - if s.PlacementId == nil { - invalidParams.Add(request.NewErrParamRequired("PlacementId")) - } - if s.PlacementId != nil && len(*s.PlacementId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlacementId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPlacementId sets the PlacementId field's value. -func (s *StopGameSessionPlacementInput) SetPlacementId(v string) *StopGameSessionPlacementInput { - s.PlacementId = &v - return s -} - -// Represents the returned data in response to a request action. -type StopGameSessionPlacementOutput struct { - _ struct{} `type:"structure"` - - // Object that describes the canceled game session placement, with CANCELLED - // status and an end time stamp. - GameSessionPlacement *GameSessionPlacement `type:"structure"` -} - -// String returns the string representation -func (s StopGameSessionPlacementOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopGameSessionPlacementOutput) GoString() string { - return s.String() -} - -// SetGameSessionPlacement sets the GameSessionPlacement field's value. -func (s *StopGameSessionPlacementOutput) SetGameSessionPlacement(v *GameSessionPlacement) *StopGameSessionPlacementOutput { - s.GameSessionPlacement = v - return s -} - -// Represents the input for a request action. -type StopMatchmakingInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a matchmaking ticket. - // - // TicketId is a required field - TicketId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopMatchmakingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopMatchmakingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopMatchmakingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopMatchmakingInput"} - if s.TicketId == nil { - invalidParams.Add(request.NewErrParamRequired("TicketId")) - } - if s.TicketId != nil && len(*s.TicketId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TicketId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTicketId sets the TicketId field's value. -func (s *StopMatchmakingInput) SetTicketId(v string) *StopMatchmakingInput { - s.TicketId = &v - return s -} - -type StopMatchmakingOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopMatchmakingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopMatchmakingOutput) GoString() string { - return s.String() -} - -// Settings for a target-based scaling policy (see ScalingPolicy. A target-based -// policy tracks a particular fleet metric specifies a target value for the -// metric. As player usage changes, the policy triggers Amazon GameLift to adjust -// capacity so that the metric returns to the target value. The target configuration -// specifies settings as needed for the target based policy, including the target -// value. -// -// Operations related to fleet capacity scaling include: -// -// * DescribeFleetCapacity -// -// * UpdateFleetCapacity -// -// * DescribeEC2InstanceLimits -// -// * Manage scaling policies: -// -// PutScalingPolicy (auto-scaling) -// -// DescribeScalingPolicies (auto-scaling) -// -// DeleteScalingPolicy (auto-scaling) -// -// * Manage fleet actions: -// -// StartFleetActions -// -// StopFleetActions -type TargetConfiguration struct { - _ struct{} `type:"structure"` - - // Desired value to use with a target-based scaling policy. The value must be - // relevant for whatever metric the scaling policy is using. For example, in - // a policy using the metric PercentAvailableGameSessions, the target value - // should be the preferred size of the fleet's buffer (the percent of capacity - // that should be idle and ready for new game sessions). - // - // TargetValue is a required field - TargetValue *float64 `type:"double" required:"true"` -} - -// String returns the string representation -func (s TargetConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetConfiguration"} - if s.TargetValue == nil { - invalidParams.Add(request.NewErrParamRequired("TargetValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetValue sets the TargetValue field's value. -func (s *TargetConfiguration) SetTargetValue(v float64) *TargetConfiguration { - s.TargetValue = &v - return s -} - -// Represents the input for a request action. -type UpdateAliasInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet alias. Specify the alias you want to update. - // - // AliasId is a required field - AliasId *string `type:"string" required:"true"` - - // Human-readable description of an alias. - Description *string `min:"1" type:"string"` - - // Descriptive label that is associated with an alias. Alias names do not need - // to be unique. - Name *string `min:"1" type:"string"` - - // Object that specifies the fleet and routing type to use for the alias. - RoutingStrategy *RoutingStrategy `type:"structure"` -} - -// String returns the string representation -func (s UpdateAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAliasInput"} - if s.AliasId == nil { - invalidParams.Add(request.NewErrParamRequired("AliasId")) - } - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliasId sets the AliasId field's value. -func (s *UpdateAliasInput) SetAliasId(v string) *UpdateAliasInput { - s.AliasId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateAliasInput) SetDescription(v string) *UpdateAliasInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateAliasInput) SetName(v string) *UpdateAliasInput { - s.Name = &v - return s -} - -// SetRoutingStrategy sets the RoutingStrategy field's value. -func (s *UpdateAliasInput) SetRoutingStrategy(v *RoutingStrategy) *UpdateAliasInput { - s.RoutingStrategy = v - return s -} - -// Represents the returned data in response to a request action. -type UpdateAliasOutput struct { - _ struct{} `type:"structure"` - - // Object that contains the updated alias configuration. - Alias *Alias `type:"structure"` -} - -// String returns the string representation -func (s UpdateAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAliasOutput) GoString() string { - return s.String() -} - -// SetAlias sets the Alias field's value. -func (s *UpdateAliasOutput) SetAlias(v *Alias) *UpdateAliasOutput { - s.Alias = v - return s -} - -// Represents the input for a request action. -type UpdateBuildInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a build to update. - // - // BuildId is a required field - BuildId *string `type:"string" required:"true"` - - // Descriptive label that is associated with a build. Build names do not need - // to be unique. - Name *string `min:"1" type:"string"` - - // Version that is associated with this build. Version strings do not need to - // be unique. - Version *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateBuildInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBuildInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateBuildInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateBuildInput"} - if s.BuildId == nil { - invalidParams.Add(request.NewErrParamRequired("BuildId")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBuildId sets the BuildId field's value. -func (s *UpdateBuildInput) SetBuildId(v string) *UpdateBuildInput { - s.BuildId = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateBuildInput) SetName(v string) *UpdateBuildInput { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *UpdateBuildInput) SetVersion(v string) *UpdateBuildInput { - s.Version = &v - return s -} - -// Represents the returned data in response to a request action. -type UpdateBuildOutput struct { - _ struct{} `type:"structure"` - - // Object that contains the updated build record. - Build *Build `type:"structure"` -} - -// String returns the string representation -func (s UpdateBuildOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBuildOutput) GoString() string { - return s.String() -} - -// SetBuild sets the Build field's value. -func (s *UpdateBuildOutput) SetBuild(v *Build) *UpdateBuildOutput { - s.Build = v - return s -} - -// Represents the input for a request action. -type UpdateFleetAttributesInput struct { - _ struct{} `type:"structure"` - - // Human-readable description of a fleet. - Description *string `min:"1" type:"string"` - - // Unique identifier for a fleet to update attribute metadata for. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // Names of metric groups to include this fleet in. Amazon CloudWatch uses a - // fleet metric group is to aggregate metrics from multiple fleets. Use an existing - // metric group name to add this fleet to the group. Or use a new name to create - // a new metric group. A fleet can only be included in one metric group at a - // time. - MetricGroups []*string `type:"list"` - - // Descriptive label that is associated with a fleet. Fleet names do not need - // to be unique. - Name *string `min:"1" type:"string"` - - // Game session protection policy to apply to all new instances created in this - // fleet. Instances that already exist are not affected. You can set protection - // for individual instances using UpdateGameSession. - // - // * NoProtection -- The game session can be terminated during a scale-down - // event. - // - // * FullProtection -- If the game session is in an ACTIVE status, it cannot - // be terminated during a scale-down event. - NewGameSessionProtectionPolicy *string `type:"string" enum:"ProtectionPolicy"` - - // Policy that limits the number of game sessions an individual player can create - // over a span of time. - ResourceCreationLimitPolicy *ResourceCreationLimitPolicy `type:"structure"` -} - -// String returns the string representation -func (s UpdateFleetAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFleetAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFleetAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFleetAttributesInput"} - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateFleetAttributesInput) SetDescription(v string) *UpdateFleetAttributesInput { - s.Description = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *UpdateFleetAttributesInput) SetFleetId(v string) *UpdateFleetAttributesInput { - s.FleetId = &v - return s -} - -// SetMetricGroups sets the MetricGroups field's value. -func (s *UpdateFleetAttributesInput) SetMetricGroups(v []*string) *UpdateFleetAttributesInput { - s.MetricGroups = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateFleetAttributesInput) SetName(v string) *UpdateFleetAttributesInput { - s.Name = &v - return s -} - -// SetNewGameSessionProtectionPolicy sets the NewGameSessionProtectionPolicy field's value. -func (s *UpdateFleetAttributesInput) SetNewGameSessionProtectionPolicy(v string) *UpdateFleetAttributesInput { - s.NewGameSessionProtectionPolicy = &v - return s -} - -// SetResourceCreationLimitPolicy sets the ResourceCreationLimitPolicy field's value. -func (s *UpdateFleetAttributesInput) SetResourceCreationLimitPolicy(v *ResourceCreationLimitPolicy) *UpdateFleetAttributesInput { - s.ResourceCreationLimitPolicy = v - return s -} - -// Represents the returned data in response to a request action. -type UpdateFleetAttributesOutput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet that was updated. - FleetId *string `type:"string"` -} - -// String returns the string representation -func (s UpdateFleetAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFleetAttributesOutput) GoString() string { - return s.String() -} - -// SetFleetId sets the FleetId field's value. -func (s *UpdateFleetAttributesOutput) SetFleetId(v string) *UpdateFleetAttributesOutput { - s.FleetId = &v - return s -} - -// Represents the input for a request action. -type UpdateFleetCapacityInput struct { - _ struct{} `type:"structure"` - - // Number of EC2 instances you want this fleet to host. - DesiredInstances *int64 `type:"integer"` - - // Unique identifier for a fleet to update capacity for. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // Maximum value allowed for the fleet's instance count. Default if not set - // is 1. - MaxSize *int64 `type:"integer"` - - // Minimum value allowed for the fleet's instance count. Default if not set - // is 0. - MinSize *int64 `type:"integer"` -} - -// String returns the string representation -func (s UpdateFleetCapacityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFleetCapacityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFleetCapacityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFleetCapacityInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDesiredInstances sets the DesiredInstances field's value. -func (s *UpdateFleetCapacityInput) SetDesiredInstances(v int64) *UpdateFleetCapacityInput { - s.DesiredInstances = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *UpdateFleetCapacityInput) SetFleetId(v string) *UpdateFleetCapacityInput { - s.FleetId = &v - return s -} - -// SetMaxSize sets the MaxSize field's value. -func (s *UpdateFleetCapacityInput) SetMaxSize(v int64) *UpdateFleetCapacityInput { - s.MaxSize = &v - return s -} - -// SetMinSize sets the MinSize field's value. -func (s *UpdateFleetCapacityInput) SetMinSize(v int64) *UpdateFleetCapacityInput { - s.MinSize = &v - return s -} - -// Represents the returned data in response to a request action. -type UpdateFleetCapacityOutput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet that was updated. - FleetId *string `type:"string"` -} - -// String returns the string representation -func (s UpdateFleetCapacityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFleetCapacityOutput) GoString() string { - return s.String() -} - -// SetFleetId sets the FleetId field's value. -func (s *UpdateFleetCapacityOutput) SetFleetId(v string) *UpdateFleetCapacityOutput { - s.FleetId = &v - return s -} - -// Represents the input for a request action. -type UpdateFleetPortSettingsInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet to update port settings for. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // Collection of port settings to be added to the fleet record. - InboundPermissionAuthorizations []*IpPermission `type:"list"` - - // Collection of port settings to be removed from the fleet record. - InboundPermissionRevocations []*IpPermission `type:"list"` -} - -// String returns the string representation -func (s UpdateFleetPortSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFleetPortSettingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFleetPortSettingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFleetPortSettingsInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.InboundPermissionAuthorizations != nil { - for i, v := range s.InboundPermissionAuthorizations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InboundPermissionAuthorizations", i), err.(request.ErrInvalidParams)) - } - } - } - if s.InboundPermissionRevocations != nil { - for i, v := range s.InboundPermissionRevocations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InboundPermissionRevocations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetId sets the FleetId field's value. -func (s *UpdateFleetPortSettingsInput) SetFleetId(v string) *UpdateFleetPortSettingsInput { - s.FleetId = &v - return s -} - -// SetInboundPermissionAuthorizations sets the InboundPermissionAuthorizations field's value. -func (s *UpdateFleetPortSettingsInput) SetInboundPermissionAuthorizations(v []*IpPermission) *UpdateFleetPortSettingsInput { - s.InboundPermissionAuthorizations = v - return s -} - -// SetInboundPermissionRevocations sets the InboundPermissionRevocations field's value. -func (s *UpdateFleetPortSettingsInput) SetInboundPermissionRevocations(v []*IpPermission) *UpdateFleetPortSettingsInput { - s.InboundPermissionRevocations = v - return s -} - -// Represents the returned data in response to a request action. -type UpdateFleetPortSettingsOutput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet that was updated. - FleetId *string `type:"string"` -} - -// String returns the string representation -func (s UpdateFleetPortSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFleetPortSettingsOutput) GoString() string { - return s.String() -} - -// SetFleetId sets the FleetId field's value. -func (s *UpdateFleetPortSettingsOutput) SetFleetId(v string) *UpdateFleetPortSettingsOutput { - s.FleetId = &v - return s -} - -// Represents the input for a request action. -type UpdateGameSessionInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for the game session to update. - // - // GameSessionId is a required field - GameSessionId *string `min:"1" type:"string" required:"true"` - - // Maximum number of players that can be connected simultaneously to the game - // session. - MaximumPlayerSessionCount *int64 `type:"integer"` - - // Descriptive label that is associated with a game session. Session names do - // not need to be unique. - Name *string `min:"1" type:"string"` - - // Policy determining whether or not the game session accepts new players. - PlayerSessionCreationPolicy *string `type:"string" enum:"PlayerSessionCreationPolicy"` - - // Game session protection policy to apply to this game session only. - // - // * NoProtection -- The game session can be terminated during a scale-down - // event. - // - // * FullProtection -- If the game session is in an ACTIVE status, it cannot - // be terminated during a scale-down event. - ProtectionPolicy *string `type:"string" enum:"ProtectionPolicy"` -} - -// String returns the string representation -func (s UpdateGameSessionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGameSessionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateGameSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateGameSessionInput"} - if s.GameSessionId == nil { - invalidParams.Add(request.NewErrParamRequired("GameSessionId")) - } - if s.GameSessionId != nil && len(*s.GameSessionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionId", 1)) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGameSessionId sets the GameSessionId field's value. -func (s *UpdateGameSessionInput) SetGameSessionId(v string) *UpdateGameSessionInput { - s.GameSessionId = &v - return s -} - -// SetMaximumPlayerSessionCount sets the MaximumPlayerSessionCount field's value. -func (s *UpdateGameSessionInput) SetMaximumPlayerSessionCount(v int64) *UpdateGameSessionInput { - s.MaximumPlayerSessionCount = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateGameSessionInput) SetName(v string) *UpdateGameSessionInput { - s.Name = &v - return s -} - -// SetPlayerSessionCreationPolicy sets the PlayerSessionCreationPolicy field's value. -func (s *UpdateGameSessionInput) SetPlayerSessionCreationPolicy(v string) *UpdateGameSessionInput { - s.PlayerSessionCreationPolicy = &v - return s -} - -// SetProtectionPolicy sets the ProtectionPolicy field's value. -func (s *UpdateGameSessionInput) SetProtectionPolicy(v string) *UpdateGameSessionInput { - s.ProtectionPolicy = &v - return s -} - -// Represents the returned data in response to a request action. -type UpdateGameSessionOutput struct { - _ struct{} `type:"structure"` - - // Object that contains the updated game session metadata. - GameSession *GameSession `type:"structure"` -} - -// String returns the string representation -func (s UpdateGameSessionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGameSessionOutput) GoString() string { - return s.String() -} - -// SetGameSession sets the GameSession field's value. -func (s *UpdateGameSessionOutput) SetGameSession(v *GameSession) *UpdateGameSessionOutput { - s.GameSession = v - return s -} - -// Represents the input for a request action. -type UpdateGameSessionQueueInput struct { - _ struct{} `type:"structure"` - - // List of fleets that can be used to fulfill game session placement requests - // in the queue. Fleets are identified by either a fleet ARN or a fleet alias - // ARN. Destinations are listed in default preference order. When updating this - // list, provide a complete list of destinations. - Destinations []*GameSessionQueueDestination `type:"list"` - - // Descriptive label that is associated with game session queue. Queue names - // must be unique within each region. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // Collection of latency policies to apply when processing game sessions placement - // requests with player latency information. Multiple policies are evaluated - // in order of the maximum latency value, starting with the lowest latency values. - // With just one policy, it is enforced at the start of the game session placement - // for the duration period. With multiple policies, each policy is enforced - // consecutively for its duration period. For example, a queue might enforce - // a 60-second policy followed by a 120-second policy, and then no policy for - // the remainder of the placement. When updating policies, provide a complete - // collection of policies. - PlayerLatencyPolicies []*PlayerLatencyPolicy `type:"list"` - - // Maximum time, in seconds, that a new game session placement request remains - // in the queue. When a request exceeds this time, the game session placement - // changes to a TIMED_OUT status. - TimeoutInSeconds *int64 `type:"integer"` -} - -// String returns the string representation -func (s UpdateGameSessionQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGameSessionQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateGameSessionQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateGameSessionQueueInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Destinations != nil { - for i, v := range s.Destinations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Destinations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinations sets the Destinations field's value. -func (s *UpdateGameSessionQueueInput) SetDestinations(v []*GameSessionQueueDestination) *UpdateGameSessionQueueInput { - s.Destinations = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateGameSessionQueueInput) SetName(v string) *UpdateGameSessionQueueInput { - s.Name = &v - return s -} - -// SetPlayerLatencyPolicies sets the PlayerLatencyPolicies field's value. -func (s *UpdateGameSessionQueueInput) SetPlayerLatencyPolicies(v []*PlayerLatencyPolicy) *UpdateGameSessionQueueInput { - s.PlayerLatencyPolicies = v - return s -} - -// SetTimeoutInSeconds sets the TimeoutInSeconds field's value. -func (s *UpdateGameSessionQueueInput) SetTimeoutInSeconds(v int64) *UpdateGameSessionQueueInput { - s.TimeoutInSeconds = &v - return s -} - -// Represents the returned data in response to a request action. -type UpdateGameSessionQueueOutput struct { - _ struct{} `type:"structure"` - - // Object that describes the newly updated game session queue. - GameSessionQueue *GameSessionQueue `type:"structure"` -} - -// String returns the string representation -func (s UpdateGameSessionQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGameSessionQueueOutput) GoString() string { - return s.String() -} - -// SetGameSessionQueue sets the GameSessionQueue field's value. -func (s *UpdateGameSessionQueueOutput) SetGameSessionQueue(v *GameSessionQueue) *UpdateGameSessionQueueOutput { - s.GameSessionQueue = v - return s -} - -// Represents the input for a request action. -type UpdateMatchmakingConfigurationInput struct { - _ struct{} `type:"structure"` - - // Flag that determines whether or not a match that was created with this configuration - // must be accepted by the matched players. To require acceptance, set to TRUE. - AcceptanceRequired *bool `type:"boolean"` - - // Length of time (in seconds) to wait for players to accept a proposed match. - // If any player rejects the match or fails to accept before the timeout, the - // ticket continues to look for an acceptable match. - AcceptanceTimeoutSeconds *int64 `min:"1" type:"integer"` - - // Number of player slots in a match to keep open for future players. For example, - // if the configuration's rule set specifies a match for a single 12-person - // team, and the additional player count is set to 2, only 10 players are selected - // for the match. - AdditionalPlayerCount *int64 `type:"integer"` - - // Information to attached to all events related to the matchmaking configuration. - CustomEventData *string `type:"string"` - - // Descriptive label that is associated with matchmaking configuration. - Description *string `min:"1" type:"string"` - - // Set of custom properties for a game session, formatted as key:value pairs. - // These properties are passed to a game server process in the GameSession object - // with a request to start a new game session (see Start a Game Session (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). - // This information is added to the new GameSession object that is created for - // a successful match. - GameProperties []*GameProperty `type:"list"` - - // Set of custom game session properties, formatted as a single string value. - // This data is passed to a game server process in the GameSession object with - // a request to start a new game session (see Start a Game Session (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). - // This information is added to the new GameSession object that is created for - // a successful match. - GameSessionData *string `min:"1" type:"string"` - - // Amazon Resource Name (ARN (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) - // that is assigned to a game session queue and uniquely identifies it. Format - // is arn:aws:gamelift:::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. - // These queues are used when placing game sessions for matches that are created - // with this matchmaking configuration. Queues can be located in any region. - GameSessionQueueArns []*string `type:"list"` - - // Unique identifier for a matchmaking configuration to update. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // SNS topic ARN that is set up to receive matchmaking notifications. See Setting - // up Notifications for Matchmaking (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-notification.html) - // for more information. - NotificationTarget *string `type:"string"` - - // Maximum duration, in seconds, that a matchmaking ticket can remain in process - // before timing out. Requests that time out can be resubmitted as needed. - RequestTimeoutSeconds *int64 `min:"1" type:"integer"` - - // Unique identifier for a matchmaking rule set to use with this configuration. - // A matchmaking configuration can only use rule sets that are defined in the - // same region. - RuleSetName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateMatchmakingConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateMatchmakingConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateMatchmakingConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateMatchmakingConfigurationInput"} - if s.AcceptanceTimeoutSeconds != nil && *s.AcceptanceTimeoutSeconds < 1 { - invalidParams.Add(request.NewErrParamMinValue("AcceptanceTimeoutSeconds", 1)) - } - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.GameSessionData != nil && len(*s.GameSessionData) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GameSessionData", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.RequestTimeoutSeconds != nil && *s.RequestTimeoutSeconds < 1 { - invalidParams.Add(request.NewErrParamMinValue("RequestTimeoutSeconds", 1)) - } - if s.RuleSetName != nil && len(*s.RuleSetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleSetName", 1)) - } - if s.GameProperties != nil { - for i, v := range s.GameProperties { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GameProperties", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptanceRequired sets the AcceptanceRequired field's value. -func (s *UpdateMatchmakingConfigurationInput) SetAcceptanceRequired(v bool) *UpdateMatchmakingConfigurationInput { - s.AcceptanceRequired = &v - return s -} - -// SetAcceptanceTimeoutSeconds sets the AcceptanceTimeoutSeconds field's value. -func (s *UpdateMatchmakingConfigurationInput) SetAcceptanceTimeoutSeconds(v int64) *UpdateMatchmakingConfigurationInput { - s.AcceptanceTimeoutSeconds = &v - return s -} - -// SetAdditionalPlayerCount sets the AdditionalPlayerCount field's value. -func (s *UpdateMatchmakingConfigurationInput) SetAdditionalPlayerCount(v int64) *UpdateMatchmakingConfigurationInput { - s.AdditionalPlayerCount = &v - return s -} - -// SetCustomEventData sets the CustomEventData field's value. -func (s *UpdateMatchmakingConfigurationInput) SetCustomEventData(v string) *UpdateMatchmakingConfigurationInput { - s.CustomEventData = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateMatchmakingConfigurationInput) SetDescription(v string) *UpdateMatchmakingConfigurationInput { - s.Description = &v - return s -} - -// SetGameProperties sets the GameProperties field's value. -func (s *UpdateMatchmakingConfigurationInput) SetGameProperties(v []*GameProperty) *UpdateMatchmakingConfigurationInput { - s.GameProperties = v - return s -} - -// SetGameSessionData sets the GameSessionData field's value. -func (s *UpdateMatchmakingConfigurationInput) SetGameSessionData(v string) *UpdateMatchmakingConfigurationInput { - s.GameSessionData = &v - return s -} - -// SetGameSessionQueueArns sets the GameSessionQueueArns field's value. -func (s *UpdateMatchmakingConfigurationInput) SetGameSessionQueueArns(v []*string) *UpdateMatchmakingConfigurationInput { - s.GameSessionQueueArns = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateMatchmakingConfigurationInput) SetName(v string) *UpdateMatchmakingConfigurationInput { - s.Name = &v - return s -} - -// SetNotificationTarget sets the NotificationTarget field's value. -func (s *UpdateMatchmakingConfigurationInput) SetNotificationTarget(v string) *UpdateMatchmakingConfigurationInput { - s.NotificationTarget = &v - return s -} - -// SetRequestTimeoutSeconds sets the RequestTimeoutSeconds field's value. -func (s *UpdateMatchmakingConfigurationInput) SetRequestTimeoutSeconds(v int64) *UpdateMatchmakingConfigurationInput { - s.RequestTimeoutSeconds = &v - return s -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *UpdateMatchmakingConfigurationInput) SetRuleSetName(v string) *UpdateMatchmakingConfigurationInput { - s.RuleSetName = &v - return s -} - -// Represents the returned data in response to a request action. -type UpdateMatchmakingConfigurationOutput struct { - _ struct{} `type:"structure"` - - // Object that describes the updated matchmaking configuration. - Configuration *MatchmakingConfiguration `type:"structure"` -} - -// String returns the string representation -func (s UpdateMatchmakingConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateMatchmakingConfigurationOutput) GoString() string { - return s.String() -} - -// SetConfiguration sets the Configuration field's value. -func (s *UpdateMatchmakingConfigurationOutput) SetConfiguration(v *MatchmakingConfiguration) *UpdateMatchmakingConfigurationOutput { - s.Configuration = v - return s -} - -// Represents the input for a request action. -type UpdateRuntimeConfigurationInput struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet to update run-time configuration for. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // Instructions for launching server processes on each instance in the fleet. - // The run-time configuration for a fleet has a collection of server process - // configurations, one for each type of server process to run on an instance. - // A server process configuration specifies the location of the server executable, - // launch parameters, and the number of concurrent processes with that configuration - // to maintain on each instance. - // - // RuntimeConfiguration is a required field - RuntimeConfiguration *RuntimeConfiguration `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateRuntimeConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRuntimeConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRuntimeConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRuntimeConfigurationInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.RuntimeConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("RuntimeConfiguration")) - } - if s.RuntimeConfiguration != nil { - if err := s.RuntimeConfiguration.Validate(); err != nil { - invalidParams.AddNested("RuntimeConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetId sets the FleetId field's value. -func (s *UpdateRuntimeConfigurationInput) SetFleetId(v string) *UpdateRuntimeConfigurationInput { - s.FleetId = &v - return s -} - -// SetRuntimeConfiguration sets the RuntimeConfiguration field's value. -func (s *UpdateRuntimeConfigurationInput) SetRuntimeConfiguration(v *RuntimeConfiguration) *UpdateRuntimeConfigurationInput { - s.RuntimeConfiguration = v - return s -} - -// Represents the returned data in response to a request action. -type UpdateRuntimeConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The run-time configuration currently in force. If the update was successful, - // this object matches the one in the request. - RuntimeConfiguration *RuntimeConfiguration `type:"structure"` -} - -// String returns the string representation -func (s UpdateRuntimeConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRuntimeConfigurationOutput) GoString() string { - return s.String() -} - -// SetRuntimeConfiguration sets the RuntimeConfiguration field's value. -func (s *UpdateRuntimeConfigurationOutput) SetRuntimeConfiguration(v *RuntimeConfiguration) *UpdateRuntimeConfigurationOutput { - s.RuntimeConfiguration = v - return s -} - -// Represents the input for a request action. -type ValidateMatchmakingRuleSetInput struct { - _ struct{} `type:"structure"` - - // Collection of matchmaking rules to validate, formatted as a JSON string. - // - // RuleSetBody is a required field - RuleSetBody *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ValidateMatchmakingRuleSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidateMatchmakingRuleSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ValidateMatchmakingRuleSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ValidateMatchmakingRuleSetInput"} - if s.RuleSetBody == nil { - invalidParams.Add(request.NewErrParamRequired("RuleSetBody")) - } - if s.RuleSetBody != nil && len(*s.RuleSetBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleSetBody", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleSetBody sets the RuleSetBody field's value. -func (s *ValidateMatchmakingRuleSetInput) SetRuleSetBody(v string) *ValidateMatchmakingRuleSetInput { - s.RuleSetBody = &v - return s -} - -// Represents the returned data in response to a request action. -type ValidateMatchmakingRuleSetOutput struct { - _ struct{} `type:"structure"` - - // Response indicating whether or not the rule set is valid. - Valid *bool `type:"boolean"` -} - -// String returns the string representation -func (s ValidateMatchmakingRuleSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidateMatchmakingRuleSetOutput) GoString() string { - return s.String() -} - -// SetValid sets the Valid field's value. -func (s *ValidateMatchmakingRuleSetOutput) SetValid(v bool) *ValidateMatchmakingRuleSetOutput { - s.Valid = &v - return s -} - -// Represents an authorization for a VPC peering connection between the VPC -// for an Amazon GameLift fleet and another VPC on an account you have access -// to. This authorization must exist and be valid for the peering connection -// to be established. Authorizations are valid for 24 hours after they are issued. -// -// VPC peering connection operations include: -// -// * CreateVpcPeeringAuthorization -// -// * DescribeVpcPeeringAuthorizations -// -// * DeleteVpcPeeringAuthorization -// -// * CreateVpcPeeringConnection -// -// * DescribeVpcPeeringConnections -// -// * DeleteVpcPeeringConnection -type VpcPeeringAuthorization struct { - _ struct{} `type:"structure"` - - // Time stamp indicating when this authorization was issued. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp"` - - // Time stamp indicating when this authorization expires (24 hours after issuance). - // Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). - ExpirationTime *time.Time `type:"timestamp"` - - // Unique identifier for the AWS account that you use to manage your Amazon - // GameLift fleet. You can find your Account ID in the AWS Management Console - // under account settings. - GameLiftAwsAccountId *string `min:"1" type:"string"` - - PeerVpcAwsAccountId *string `min:"1" type:"string"` - - // Unique identifier for a VPC with resources to be accessed by your Amazon - // GameLift fleet. The VPC must be in the same region where your fleet is deployed. - // To get VPC information, including IDs, use the Virtual Private Cloud service - // tools, including the VPC Dashboard in the AWS Management Console. - PeerVpcId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s VpcPeeringAuthorization) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcPeeringAuthorization) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *VpcPeeringAuthorization) SetCreationTime(v time.Time) *VpcPeeringAuthorization { - s.CreationTime = &v - return s -} - -// SetExpirationTime sets the ExpirationTime field's value. -func (s *VpcPeeringAuthorization) SetExpirationTime(v time.Time) *VpcPeeringAuthorization { - s.ExpirationTime = &v - return s -} - -// SetGameLiftAwsAccountId sets the GameLiftAwsAccountId field's value. -func (s *VpcPeeringAuthorization) SetGameLiftAwsAccountId(v string) *VpcPeeringAuthorization { - s.GameLiftAwsAccountId = &v - return s -} - -// SetPeerVpcAwsAccountId sets the PeerVpcAwsAccountId field's value. -func (s *VpcPeeringAuthorization) SetPeerVpcAwsAccountId(v string) *VpcPeeringAuthorization { - s.PeerVpcAwsAccountId = &v - return s -} - -// SetPeerVpcId sets the PeerVpcId field's value. -func (s *VpcPeeringAuthorization) SetPeerVpcId(v string) *VpcPeeringAuthorization { - s.PeerVpcId = &v - return s -} - -// Represents a peering connection between a VPC on one of your AWS accounts -// and the VPC for your Amazon GameLift fleets. This record may be for an active -// peering connection or a pending connection that has not yet been established. -// -// VPC peering connection operations include: -// -// * CreateVpcPeeringAuthorization -// -// * DescribeVpcPeeringAuthorizations -// -// * DeleteVpcPeeringAuthorization -// -// * CreateVpcPeeringConnection -// -// * DescribeVpcPeeringConnections -// -// * DeleteVpcPeeringConnection -type VpcPeeringConnection struct { - _ struct{} `type:"structure"` - - // Unique identifier for a fleet. This ID determines the ID of the Amazon GameLift - // VPC for your fleet. - FleetId *string `type:"string"` - - // Unique identifier for the VPC that contains the Amazon GameLift fleet for - // this connection. This VPC is managed by Amazon GameLift and does not appear - // in your AWS account. - GameLiftVpcId *string `min:"1" type:"string"` - - // CIDR block of IPv4 addresses assigned to the VPC peering connection for the - // GameLift VPC. The peered VPC also has an IPv4 CIDR block associated with - // it; these blocks cannot overlap or the peering connection cannot be created. - IpV4CidrBlock *string `min:"1" type:"string"` - - // Unique identifier for a VPC with resources to be accessed by your Amazon - // GameLift fleet. The VPC must be in the same region where your fleet is deployed. - // To get VPC information, including IDs, use the Virtual Private Cloud service - // tools, including the VPC Dashboard in the AWS Management Console. - PeerVpcId *string `min:"1" type:"string"` - - // Object that contains status information about the connection. Status indicates - // if a connection is pending, successful, or failed. - Status *VpcPeeringConnectionStatus `type:"structure"` - - // Unique identifier that is automatically assigned to the connection record. - // This ID is referenced in VPC peering connection events, and is used when - // deleting a connection with DeleteVpcPeeringConnection. - VpcPeeringConnectionId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s VpcPeeringConnection) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcPeeringConnection) GoString() string { - return s.String() -} - -// SetFleetId sets the FleetId field's value. -func (s *VpcPeeringConnection) SetFleetId(v string) *VpcPeeringConnection { - s.FleetId = &v - return s -} - -// SetGameLiftVpcId sets the GameLiftVpcId field's value. -func (s *VpcPeeringConnection) SetGameLiftVpcId(v string) *VpcPeeringConnection { - s.GameLiftVpcId = &v - return s -} - -// SetIpV4CidrBlock sets the IpV4CidrBlock field's value. -func (s *VpcPeeringConnection) SetIpV4CidrBlock(v string) *VpcPeeringConnection { - s.IpV4CidrBlock = &v - return s -} - -// SetPeerVpcId sets the PeerVpcId field's value. -func (s *VpcPeeringConnection) SetPeerVpcId(v string) *VpcPeeringConnection { - s.PeerVpcId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *VpcPeeringConnection) SetStatus(v *VpcPeeringConnectionStatus) *VpcPeeringConnection { - s.Status = v - return s -} - -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *VpcPeeringConnection) SetVpcPeeringConnectionId(v string) *VpcPeeringConnection { - s.VpcPeeringConnectionId = &v - return s -} - -// Represents status information for a VPC peering connection. Status is associated -// with a VpcPeeringConnection object. Status codes and messages are provided -// from EC2 (see VpcPeeringConnectionStateReason (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_VpcPeeringConnectionStateReason.html)). -// Connection status information is also communicated as a fleet Event. -type VpcPeeringConnectionStatus struct { - _ struct{} `type:"structure"` - - // Code indicating the status of a VPC peering connection. - Code *string `min:"1" type:"string"` - - // Additional messaging associated with the connection status. - Message *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s VpcPeeringConnectionStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcPeeringConnectionStatus) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *VpcPeeringConnectionStatus) SetCode(v string) *VpcPeeringConnectionStatus { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *VpcPeeringConnectionStatus) SetMessage(v string) *VpcPeeringConnectionStatus { - s.Message = &v - return s -} - -const ( - // AcceptanceTypeAccept is a AcceptanceType enum value - AcceptanceTypeAccept = "ACCEPT" - - // AcceptanceTypeReject is a AcceptanceType enum value - AcceptanceTypeReject = "REJECT" -) - -const ( - // BuildStatusInitialized is a BuildStatus enum value - BuildStatusInitialized = "INITIALIZED" - - // BuildStatusReady is a BuildStatus enum value - BuildStatusReady = "READY" - - // BuildStatusFailed is a BuildStatus enum value - BuildStatusFailed = "FAILED" -) - -const ( - // ComparisonOperatorTypeGreaterThanOrEqualToThreshold is a ComparisonOperatorType enum value - ComparisonOperatorTypeGreaterThanOrEqualToThreshold = "GreaterThanOrEqualToThreshold" - - // ComparisonOperatorTypeGreaterThanThreshold is a ComparisonOperatorType enum value - ComparisonOperatorTypeGreaterThanThreshold = "GreaterThanThreshold" - - // ComparisonOperatorTypeLessThanThreshold is a ComparisonOperatorType enum value - ComparisonOperatorTypeLessThanThreshold = "LessThanThreshold" - - // ComparisonOperatorTypeLessThanOrEqualToThreshold is a ComparisonOperatorType enum value - ComparisonOperatorTypeLessThanOrEqualToThreshold = "LessThanOrEqualToThreshold" -) - -const ( - // EC2InstanceTypeT2Micro is a EC2InstanceType enum value - EC2InstanceTypeT2Micro = "t2.micro" - - // EC2InstanceTypeT2Small is a EC2InstanceType enum value - EC2InstanceTypeT2Small = "t2.small" - - // EC2InstanceTypeT2Medium is a EC2InstanceType enum value - EC2InstanceTypeT2Medium = "t2.medium" - - // EC2InstanceTypeT2Large is a EC2InstanceType enum value - EC2InstanceTypeT2Large = "t2.large" - - // EC2InstanceTypeC3Large is a EC2InstanceType enum value - EC2InstanceTypeC3Large = "c3.large" - - // EC2InstanceTypeC3Xlarge is a EC2InstanceType enum value - EC2InstanceTypeC3Xlarge = "c3.xlarge" - - // EC2InstanceTypeC32xlarge is a EC2InstanceType enum value - EC2InstanceTypeC32xlarge = "c3.2xlarge" - - // EC2InstanceTypeC34xlarge is a EC2InstanceType enum value - EC2InstanceTypeC34xlarge = "c3.4xlarge" - - // EC2InstanceTypeC38xlarge is a EC2InstanceType enum value - EC2InstanceTypeC38xlarge = "c3.8xlarge" - - // EC2InstanceTypeC4Large is a EC2InstanceType enum value - EC2InstanceTypeC4Large = "c4.large" - - // EC2InstanceTypeC4Xlarge is a EC2InstanceType enum value - EC2InstanceTypeC4Xlarge = "c4.xlarge" - - // EC2InstanceTypeC42xlarge is a EC2InstanceType enum value - EC2InstanceTypeC42xlarge = "c4.2xlarge" - - // EC2InstanceTypeC44xlarge is a EC2InstanceType enum value - EC2InstanceTypeC44xlarge = "c4.4xlarge" - - // EC2InstanceTypeC48xlarge is a EC2InstanceType enum value - EC2InstanceTypeC48xlarge = "c4.8xlarge" - - // EC2InstanceTypeR3Large is a EC2InstanceType enum value - EC2InstanceTypeR3Large = "r3.large" - - // EC2InstanceTypeR3Xlarge is a EC2InstanceType enum value - EC2InstanceTypeR3Xlarge = "r3.xlarge" - - // EC2InstanceTypeR32xlarge is a EC2InstanceType enum value - EC2InstanceTypeR32xlarge = "r3.2xlarge" - - // EC2InstanceTypeR34xlarge is a EC2InstanceType enum value - EC2InstanceTypeR34xlarge = "r3.4xlarge" - - // EC2InstanceTypeR38xlarge is a EC2InstanceType enum value - EC2InstanceTypeR38xlarge = "r3.8xlarge" - - // EC2InstanceTypeR4Large is a EC2InstanceType enum value - EC2InstanceTypeR4Large = "r4.large" - - // EC2InstanceTypeR4Xlarge is a EC2InstanceType enum value - EC2InstanceTypeR4Xlarge = "r4.xlarge" - - // EC2InstanceTypeR42xlarge is a EC2InstanceType enum value - EC2InstanceTypeR42xlarge = "r4.2xlarge" - - // EC2InstanceTypeR44xlarge is a EC2InstanceType enum value - EC2InstanceTypeR44xlarge = "r4.4xlarge" - - // EC2InstanceTypeR48xlarge is a EC2InstanceType enum value - EC2InstanceTypeR48xlarge = "r4.8xlarge" - - // EC2InstanceTypeR416xlarge is a EC2InstanceType enum value - EC2InstanceTypeR416xlarge = "r4.16xlarge" - - // EC2InstanceTypeM3Medium is a EC2InstanceType enum value - EC2InstanceTypeM3Medium = "m3.medium" - - // EC2InstanceTypeM3Large is a EC2InstanceType enum value - EC2InstanceTypeM3Large = "m3.large" - - // EC2InstanceTypeM3Xlarge is a EC2InstanceType enum value - EC2InstanceTypeM3Xlarge = "m3.xlarge" - - // EC2InstanceTypeM32xlarge is a EC2InstanceType enum value - EC2InstanceTypeM32xlarge = "m3.2xlarge" - - // EC2InstanceTypeM4Large is a EC2InstanceType enum value - EC2InstanceTypeM4Large = "m4.large" - - // EC2InstanceTypeM4Xlarge is a EC2InstanceType enum value - EC2InstanceTypeM4Xlarge = "m4.xlarge" - - // EC2InstanceTypeM42xlarge is a EC2InstanceType enum value - EC2InstanceTypeM42xlarge = "m4.2xlarge" - - // EC2InstanceTypeM44xlarge is a EC2InstanceType enum value - EC2InstanceTypeM44xlarge = "m4.4xlarge" - - // EC2InstanceTypeM410xlarge is a EC2InstanceType enum value - EC2InstanceTypeM410xlarge = "m4.10xlarge" -) - -const ( - // EventCodeGenericEvent is a EventCode enum value - EventCodeGenericEvent = "GENERIC_EVENT" - - // EventCodeFleetCreated is a EventCode enum value - EventCodeFleetCreated = "FLEET_CREATED" - - // EventCodeFleetDeleted is a EventCode enum value - EventCodeFleetDeleted = "FLEET_DELETED" - - // EventCodeFleetScalingEvent is a EventCode enum value - EventCodeFleetScalingEvent = "FLEET_SCALING_EVENT" - - // EventCodeFleetStateDownloading is a EventCode enum value - EventCodeFleetStateDownloading = "FLEET_STATE_DOWNLOADING" - - // EventCodeFleetStateValidating is a EventCode enum value - EventCodeFleetStateValidating = "FLEET_STATE_VALIDATING" - - // EventCodeFleetStateBuilding is a EventCode enum value - EventCodeFleetStateBuilding = "FLEET_STATE_BUILDING" - - // EventCodeFleetStateActivating is a EventCode enum value - EventCodeFleetStateActivating = "FLEET_STATE_ACTIVATING" - - // EventCodeFleetStateActive is a EventCode enum value - EventCodeFleetStateActive = "FLEET_STATE_ACTIVE" - - // EventCodeFleetStateError is a EventCode enum value - EventCodeFleetStateError = "FLEET_STATE_ERROR" - - // EventCodeFleetInitializationFailed is a EventCode enum value - EventCodeFleetInitializationFailed = "FLEET_INITIALIZATION_FAILED" - - // EventCodeFleetBinaryDownloadFailed is a EventCode enum value - EventCodeFleetBinaryDownloadFailed = "FLEET_BINARY_DOWNLOAD_FAILED" - - // EventCodeFleetValidationLaunchPathNotFound is a EventCode enum value - EventCodeFleetValidationLaunchPathNotFound = "FLEET_VALIDATION_LAUNCH_PATH_NOT_FOUND" - - // EventCodeFleetValidationExecutableRuntimeFailure is a EventCode enum value - EventCodeFleetValidationExecutableRuntimeFailure = "FLEET_VALIDATION_EXECUTABLE_RUNTIME_FAILURE" - - // EventCodeFleetValidationTimedOut is a EventCode enum value - EventCodeFleetValidationTimedOut = "FLEET_VALIDATION_TIMED_OUT" - - // EventCodeFleetActivationFailed is a EventCode enum value - EventCodeFleetActivationFailed = "FLEET_ACTIVATION_FAILED" - - // EventCodeFleetActivationFailedNoInstances is a EventCode enum value - EventCodeFleetActivationFailedNoInstances = "FLEET_ACTIVATION_FAILED_NO_INSTANCES" - - // EventCodeFleetNewGameSessionProtectionPolicyUpdated is a EventCode enum value - EventCodeFleetNewGameSessionProtectionPolicyUpdated = "FLEET_NEW_GAME_SESSION_PROTECTION_POLICY_UPDATED" - - // EventCodeServerProcessInvalidPath is a EventCode enum value - EventCodeServerProcessInvalidPath = "SERVER_PROCESS_INVALID_PATH" - - // EventCodeServerProcessSdkInitializationTimeout is a EventCode enum value - EventCodeServerProcessSdkInitializationTimeout = "SERVER_PROCESS_SDK_INITIALIZATION_TIMEOUT" - - // EventCodeServerProcessProcessReadyTimeout is a EventCode enum value - EventCodeServerProcessProcessReadyTimeout = "SERVER_PROCESS_PROCESS_READY_TIMEOUT" - - // EventCodeServerProcessCrashed is a EventCode enum value - EventCodeServerProcessCrashed = "SERVER_PROCESS_CRASHED" - - // EventCodeServerProcessTerminatedUnhealthy is a EventCode enum value - EventCodeServerProcessTerminatedUnhealthy = "SERVER_PROCESS_TERMINATED_UNHEALTHY" - - // EventCodeServerProcessForceTerminated is a EventCode enum value - EventCodeServerProcessForceTerminated = "SERVER_PROCESS_FORCE_TERMINATED" - - // EventCodeServerProcessProcessExitTimeout is a EventCode enum value - EventCodeServerProcessProcessExitTimeout = "SERVER_PROCESS_PROCESS_EXIT_TIMEOUT" - - // EventCodeGameSessionActivationTimeout is a EventCode enum value - EventCodeGameSessionActivationTimeout = "GAME_SESSION_ACTIVATION_TIMEOUT" - - // EventCodeFleetCreationExtractingBuild is a EventCode enum value - EventCodeFleetCreationExtractingBuild = "FLEET_CREATION_EXTRACTING_BUILD" - - // EventCodeFleetCreationRunningInstaller is a EventCode enum value - EventCodeFleetCreationRunningInstaller = "FLEET_CREATION_RUNNING_INSTALLER" - - // EventCodeFleetCreationValidatingRuntimeConfig is a EventCode enum value - EventCodeFleetCreationValidatingRuntimeConfig = "FLEET_CREATION_VALIDATING_RUNTIME_CONFIG" - - // EventCodeFleetVpcPeeringSucceeded is a EventCode enum value - EventCodeFleetVpcPeeringSucceeded = "FLEET_VPC_PEERING_SUCCEEDED" - - // EventCodeFleetVpcPeeringFailed is a EventCode enum value - EventCodeFleetVpcPeeringFailed = "FLEET_VPC_PEERING_FAILED" - - // EventCodeFleetVpcPeeringDeleted is a EventCode enum value - EventCodeFleetVpcPeeringDeleted = "FLEET_VPC_PEERING_DELETED" - - // EventCodeInstanceInterrupted is a EventCode enum value - EventCodeInstanceInterrupted = "INSTANCE_INTERRUPTED" -) - -const ( - // FleetActionAutoScaling is a FleetAction enum value - FleetActionAutoScaling = "AUTO_SCALING" -) - -const ( - // FleetStatusNew is a FleetStatus enum value - FleetStatusNew = "NEW" - - // FleetStatusDownloading is a FleetStatus enum value - FleetStatusDownloading = "DOWNLOADING" - - // FleetStatusValidating is a FleetStatus enum value - FleetStatusValidating = "VALIDATING" - - // FleetStatusBuilding is a FleetStatus enum value - FleetStatusBuilding = "BUILDING" - - // FleetStatusActivating is a FleetStatus enum value - FleetStatusActivating = "ACTIVATING" - - // FleetStatusActive is a FleetStatus enum value - FleetStatusActive = "ACTIVE" - - // FleetStatusDeleting is a FleetStatus enum value - FleetStatusDeleting = "DELETING" - - // FleetStatusError is a FleetStatus enum value - FleetStatusError = "ERROR" - - // FleetStatusTerminated is a FleetStatus enum value - FleetStatusTerminated = "TERMINATED" -) - -const ( - // FleetTypeOnDemand is a FleetType enum value - FleetTypeOnDemand = "ON_DEMAND" - - // FleetTypeSpot is a FleetType enum value - FleetTypeSpot = "SPOT" -) - -const ( - // GameSessionPlacementStatePending is a GameSessionPlacementState enum value - GameSessionPlacementStatePending = "PENDING" - - // GameSessionPlacementStateFulfilled is a GameSessionPlacementState enum value - GameSessionPlacementStateFulfilled = "FULFILLED" - - // GameSessionPlacementStateCancelled is a GameSessionPlacementState enum value - GameSessionPlacementStateCancelled = "CANCELLED" - - // GameSessionPlacementStateTimedOut is a GameSessionPlacementState enum value - GameSessionPlacementStateTimedOut = "TIMED_OUT" -) - -const ( - // GameSessionStatusActive is a GameSessionStatus enum value - GameSessionStatusActive = "ACTIVE" - - // GameSessionStatusActivating is a GameSessionStatus enum value - GameSessionStatusActivating = "ACTIVATING" - - // GameSessionStatusTerminated is a GameSessionStatus enum value - GameSessionStatusTerminated = "TERMINATED" - - // GameSessionStatusTerminating is a GameSessionStatus enum value - GameSessionStatusTerminating = "TERMINATING" - - // GameSessionStatusError is a GameSessionStatus enum value - GameSessionStatusError = "ERROR" -) - -const ( - // GameSessionStatusReasonInterrupted is a GameSessionStatusReason enum value - GameSessionStatusReasonInterrupted = "INTERRUPTED" -) - -const ( - // InstanceStatusPending is a InstanceStatus enum value - InstanceStatusPending = "PENDING" - - // InstanceStatusActive is a InstanceStatus enum value - InstanceStatusActive = "ACTIVE" - - // InstanceStatusTerminating is a InstanceStatus enum value - InstanceStatusTerminating = "TERMINATING" -) - -const ( - // IpProtocolTcp is a IpProtocol enum value - IpProtocolTcp = "TCP" - - // IpProtocolUdp is a IpProtocol enum value - IpProtocolUdp = "UDP" -) - -const ( - // MatchmakingConfigurationStatusCancelled is a MatchmakingConfigurationStatus enum value - MatchmakingConfigurationStatusCancelled = "CANCELLED" - - // MatchmakingConfigurationStatusCompleted is a MatchmakingConfigurationStatus enum value - MatchmakingConfigurationStatusCompleted = "COMPLETED" - - // MatchmakingConfigurationStatusFailed is a MatchmakingConfigurationStatus enum value - MatchmakingConfigurationStatusFailed = "FAILED" - - // MatchmakingConfigurationStatusPlacing is a MatchmakingConfigurationStatus enum value - MatchmakingConfigurationStatusPlacing = "PLACING" - - // MatchmakingConfigurationStatusQueued is a MatchmakingConfigurationStatus enum value - MatchmakingConfigurationStatusQueued = "QUEUED" - - // MatchmakingConfigurationStatusRequiresAcceptance is a MatchmakingConfigurationStatus enum value - MatchmakingConfigurationStatusRequiresAcceptance = "REQUIRES_ACCEPTANCE" - - // MatchmakingConfigurationStatusSearching is a MatchmakingConfigurationStatus enum value - MatchmakingConfigurationStatusSearching = "SEARCHING" - - // MatchmakingConfigurationStatusTimedOut is a MatchmakingConfigurationStatus enum value - MatchmakingConfigurationStatusTimedOut = "TIMED_OUT" -) - -const ( - // MetricNameActivatingGameSessions is a MetricName enum value - MetricNameActivatingGameSessions = "ActivatingGameSessions" - - // MetricNameActiveGameSessions is a MetricName enum value - MetricNameActiveGameSessions = "ActiveGameSessions" - - // MetricNameActiveInstances is a MetricName enum value - MetricNameActiveInstances = "ActiveInstances" - - // MetricNameAvailableGameSessions is a MetricName enum value - MetricNameAvailableGameSessions = "AvailableGameSessions" - - // MetricNameAvailablePlayerSessions is a MetricName enum value - MetricNameAvailablePlayerSessions = "AvailablePlayerSessions" - - // MetricNameCurrentPlayerSessions is a MetricName enum value - MetricNameCurrentPlayerSessions = "CurrentPlayerSessions" - - // MetricNameIdleInstances is a MetricName enum value - MetricNameIdleInstances = "IdleInstances" - - // MetricNamePercentAvailableGameSessions is a MetricName enum value - MetricNamePercentAvailableGameSessions = "PercentAvailableGameSessions" - - // MetricNamePercentIdleInstances is a MetricName enum value - MetricNamePercentIdleInstances = "PercentIdleInstances" - - // MetricNameQueueDepth is a MetricName enum value - MetricNameQueueDepth = "QueueDepth" - - // MetricNameWaitTime is a MetricName enum value - MetricNameWaitTime = "WaitTime" -) - -const ( - // OperatingSystemWindows2012 is a OperatingSystem enum value - OperatingSystemWindows2012 = "WINDOWS_2012" - - // OperatingSystemAmazonLinux is a OperatingSystem enum value - OperatingSystemAmazonLinux = "AMAZON_LINUX" -) - -const ( - // PlayerSessionCreationPolicyAcceptAll is a PlayerSessionCreationPolicy enum value - PlayerSessionCreationPolicyAcceptAll = "ACCEPT_ALL" - - // PlayerSessionCreationPolicyDenyAll is a PlayerSessionCreationPolicy enum value - PlayerSessionCreationPolicyDenyAll = "DENY_ALL" -) - -const ( - // PlayerSessionStatusReserved is a PlayerSessionStatus enum value - PlayerSessionStatusReserved = "RESERVED" - - // PlayerSessionStatusActive is a PlayerSessionStatus enum value - PlayerSessionStatusActive = "ACTIVE" - - // PlayerSessionStatusCompleted is a PlayerSessionStatus enum value - PlayerSessionStatusCompleted = "COMPLETED" - - // PlayerSessionStatusTimedout is a PlayerSessionStatus enum value - PlayerSessionStatusTimedout = "TIMEDOUT" -) - -const ( - // PolicyTypeRuleBased is a PolicyType enum value - PolicyTypeRuleBased = "RuleBased" - - // PolicyTypeTargetBased is a PolicyType enum value - PolicyTypeTargetBased = "TargetBased" -) - -const ( - // ProtectionPolicyNoProtection is a ProtectionPolicy enum value - ProtectionPolicyNoProtection = "NoProtection" - - // ProtectionPolicyFullProtection is a ProtectionPolicy enum value - ProtectionPolicyFullProtection = "FullProtection" -) - -const ( - // RoutingStrategyTypeSimple is a RoutingStrategyType enum value - RoutingStrategyTypeSimple = "SIMPLE" - - // RoutingStrategyTypeTerminal is a RoutingStrategyType enum value - RoutingStrategyTypeTerminal = "TERMINAL" -) - -const ( - // ScalingAdjustmentTypeChangeInCapacity is a ScalingAdjustmentType enum value - ScalingAdjustmentTypeChangeInCapacity = "ChangeInCapacity" - - // ScalingAdjustmentTypeExactCapacity is a ScalingAdjustmentType enum value - ScalingAdjustmentTypeExactCapacity = "ExactCapacity" - - // ScalingAdjustmentTypePercentChangeInCapacity is a ScalingAdjustmentType enum value - ScalingAdjustmentTypePercentChangeInCapacity = "PercentChangeInCapacity" -) - -const ( - // ScalingStatusTypeActive is a ScalingStatusType enum value - ScalingStatusTypeActive = "ACTIVE" - - // ScalingStatusTypeUpdateRequested is a ScalingStatusType enum value - ScalingStatusTypeUpdateRequested = "UPDATE_REQUESTED" - - // ScalingStatusTypeUpdating is a ScalingStatusType enum value - ScalingStatusTypeUpdating = "UPDATING" - - // ScalingStatusTypeDeleteRequested is a ScalingStatusType enum value - ScalingStatusTypeDeleteRequested = "DELETE_REQUESTED" - - // ScalingStatusTypeDeleting is a ScalingStatusType enum value - ScalingStatusTypeDeleting = "DELETING" - - // ScalingStatusTypeDeleted is a ScalingStatusType enum value - ScalingStatusTypeDeleted = "DELETED" - - // ScalingStatusTypeError is a ScalingStatusType enum value - ScalingStatusTypeError = "ERROR" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go deleted file mode 100644 index def8e0510..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go +++ /dev/null @@ -1,312 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package gamelift provides the client and types for making API -// requests to Amazon GameLift. -// -// Amazon GameLift is a managed service for developers who need a scalable, -// dedicated server solution for their multiplayer games. Use Amazon GameLift -// for these tasks: (1) set up computing resources and deploy your game servers, -// (2) run game sessions and get players into games, (3) automatically scale -// your resources to meet player demand and manage costs, and (4) track in-depth -// metrics on game server performance and player usage. -// -// The Amazon GameLift service API includes two important function sets: -// -// * Manage game sessions and player access -- Retrieve information on available -// game sessions; create new game sessions; send player requests to join -// a game session. -// -// * Configure and manage game server resources -- Manage builds, fleets, -// queues, and aliases; set auto-scaling policies; retrieve logs and metrics. -// -// This reference guide describes the low-level service API for Amazon GameLift. -// You can use the API functionality with these tools: -// -// * The Amazon Web Services software development kit (AWS SDK (http://aws.amazon.com/tools/#sdk)) -// is available in multiple languages (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-supported.html#gamelift-supported-clients) -// including C++ and C#. Use the SDK to access the API programmatically from -// an application, such as a game client. -// -// * The AWS command-line interface (http://aws.amazon.com/cli/) (CLI) tool -// is primarily useful for handling administrative actions, such as setting -// up and managing Amazon GameLift settings and resources. You can use the -// AWS CLI to manage all of your AWS services. -// -// * The AWS Management Console (https://console.aws.amazon.com/gamelift/home) -// for Amazon GameLift provides a web interface to manage your Amazon GameLift -// settings and resources. The console includes a dashboard for tracking -// key resources, including builds and fleets, and displays usage and performance -// metrics for your games as customizable graphs. -// -// * Amazon GameLift Local is a tool for testing your game's integration -// with Amazon GameLift before deploying it on the service. This tools supports -// a subset of key API actions, which can be called from either the AWS CLI -// or programmatically. See Testing an Integration (http://docs.aws.amazon.com/gamelift/latest/developerguide/integration-testing-local.html). -// -// Learn more -// -// * Developer Guide (http://docs.aws.amazon.com/gamelift/latest/developerguide/) -// -- Read about Amazon GameLift features and how to use them. -// -// * Tutorials (https://gamedev.amazon.com/forums/tutorials) -- Get started -// fast with walkthroughs and sample projects. -// -// * GameDev Blog (http://aws.amazon.com/blogs/gamedev/) -- Stay up to date -// with new features and techniques. -// -// * GameDev Forums (https://gamedev.amazon.com/forums/spaces/123/gamelift-discussion.html) -// -- Connect with the GameDev community. -// -// * Release notes (http://aws.amazon.com/releasenotes/Amazon-GameLift/) -// and document history (http://docs.aws.amazon.com/gamelift/latest/developerguide/doc-history.html) -// -- Stay current with updates to the Amazon GameLift service, SDKs, and -// documentation. -// -// API SUMMARY -// -// This list offers a functional overview of the Amazon GameLift service API. -// -// Managing Games and Players -// -// Use these actions to start new game sessions, find existing game sessions, -// track game session status and other information, and enable player access -// to game sessions. -// -// * Discover existing game sessions -// -// SearchGameSessions -- Retrieve all available game sessions or search for -// game sessions that match a set of criteria. -// -// * Start new game sessions -// -// Start new games with Queues to find the best available hosting resources -// across multiple regions, minimize player latency, and balance game session -// activity for efficiency and cost effectiveness. -// -// StartGameSessionPlacement -- Request a new game session placement and add -// one or more players to it. -// -// DescribeGameSessionPlacement -- Get details on a placement request, including -// status. -// -// StopGameSessionPlacement -- Cancel a placement request. -// -// CreateGameSession -- Start a new game session on a specific fleet. Available -// in Amazon GameLift Local. -// -// * Match players to game sessions with FlexMatch matchmaking -// -// StartMatchmaking -- Request matchmaking for one players or a group who want -// to play together. -// -// StartMatchBackfill - Request additional player matches to fill empty slots -// in an existing game session. -// -// DescribeMatchmaking -- Get details on a matchmaking request, including status. -// -// AcceptMatch -- Register that a player accepts a proposed match, for matches -// that require player acceptance. -// -// StopMatchmaking -- Cancel a matchmaking request. -// -// * Manage game session data -// -// DescribeGameSessions -- Retrieve metadata for one or more game sessions, -// including length of time active and current player count. Available in -// Amazon GameLift Local. -// -// DescribeGameSessionDetails -- Retrieve metadata and the game session protection -// setting for one or more game sessions. -// -// UpdateGameSession -- Change game session settings, such as maximum player -// count and join policy. -// -// GetGameSessionLogUrl -- Get the location of saved logs for a game session. -// -// * Manage player sessions -// -// CreatePlayerSession -- Send a request for a player to join a game session. -// Available in Amazon GameLift Local. -// -// CreatePlayerSessions -- Send a request for multiple players to join a game -// session. Available in Amazon GameLift Local. -// -// DescribePlayerSessions -- Get details on player activity, including status, -// playing time, and player data. Available in Amazon GameLift Local. -// -// Setting Up and Managing Game Servers -// -// When setting up Amazon GameLift resources for your game, you first create -// a game build (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-intro.html) -// and upload it to Amazon GameLift. You can then use these actions to configure -// and manage a fleet of resources to run your game servers, scale capacity -// to meet player demand, access performance and utilization metrics, and more. -// -// * Manage game builds -// -// CreateBuild -- Create a new build using files stored in an Amazon S3 bucket. -// To create a build and upload files from a local path, use the AWS CLI -// command upload-build. -// -// ListBuilds -- Get a list of all builds uploaded to a Amazon GameLift region. -// -// DescribeBuild -- Retrieve information associated with a build. -// -// UpdateBuild -- Change build metadata, including build name and version. -// -// DeleteBuild -- Remove a build from Amazon GameLift. -// -// * Manage fleets -// -// CreateFleet -- Configure and activate a new fleet to run a build's game servers. -// -// ListFleets -- Get a list of all fleet IDs in a Amazon GameLift region (all -// statuses). -// -// DeleteFleet -- Terminate a fleet that is no longer running game servers or -// hosting players. -// -// View / update fleet configurations. -// -// DescribeFleetAttributes / UpdateFleetAttributes -- View or change a fleet's -// metadata and settings for game session protection and resource creation -// limits. -// -// DescribeFleetPortSettings / UpdateFleetPortSettings -- View or change the -// inbound permissions (IP address and port setting ranges) allowed for a -// fleet. -// -// DescribeRuntimeConfiguration / UpdateRuntimeConfiguration -- View or change -// what server processes (and how many) to run on each instance in a fleet. -// -// * Control fleet capacity -// -// DescribeEC2InstanceLimits -- Retrieve maximum number of instances allowed -// for the current AWS account and the current usage level. -// -// DescribeFleetCapacity / UpdateFleetCapacity -- Retrieve the capacity settings -// and the current number of instances in a fleet; adjust fleet capacity -// settings to scale up or down. -// -// Autoscale -- Manage auto-scaling rules and apply them to a fleet. -// -// PutScalingPolicy -- Create a new auto-scaling policy, or update an existing -// one. -// -// DescribeScalingPolicies -- Retrieve an existing auto-scaling policy. -// -// DeleteScalingPolicy -- Delete an auto-scaling policy and stop it from affecting -// a fleet's capacity. -// -// StartFleetActions -- Restart a fleet's auto-scaling policies. -// -// StopFleetActions -- Suspend a fleet's auto-scaling policies. -// -// * Manage VPC peering connections for fleets -// -// CreateVpcPeeringAuthorization -- Authorize a peering connection to one of -// your VPCs. -// -// DescribeVpcPeeringAuthorizations -- Retrieve valid peering connection authorizations. -// -// -// DeleteVpcPeeringAuthorization -- Delete a peering connection authorization. -// -// CreateVpcPeeringConnection -- Establish a peering connection between the -// VPC for a Amazon GameLift fleet and one of your VPCs. -// -// DescribeVpcPeeringConnections -- Retrieve information on active or pending -// VPC peering connections with a Amazon GameLift fleet. -// -// DeleteVpcPeeringConnection -- Delete a VPC peering connection with a Amazon -// GameLift fleet. -// -// * Access fleet activity statistics -// -// DescribeFleetUtilization -- Get current data on the number of server processes, -// game sessions, and players currently active on a fleet. -// -// DescribeFleetEvents -- Get a fleet's logged events for a specified time span. -// -// DescribeGameSessions -- Retrieve metadata associated with one or more game -// sessions, including length of time active and current player count. -// -// * Remotely access an instance -// -// DescribeInstances -- Get information on each instance in a fleet, including -// instance ID, IP address, and status. -// -// GetInstanceAccess -- Request access credentials needed to remotely connect -// to a specified instance in a fleet. -// -// * Manage fleet aliases -// -// CreateAlias -- Define a new alias and optionally assign it to a fleet. -// -// ListAliases -- Get all fleet aliases defined in a Amazon GameLift region. -// -// DescribeAlias -- Retrieve information on an existing alias. -// -// UpdateAlias -- Change settings for a alias, such as redirecting it from one -// fleet to another. -// -// DeleteAlias -- Remove an alias from the region. -// -// ResolveAlias -- Get the fleet ID that a specified alias points to. -// -// * Manage game session queues -// -// CreateGameSessionQueue -- Create a queue for processing requests for new -// game sessions. -// -// DescribeGameSessionQueues -- Retrieve game session queues defined in a Amazon -// GameLift region. -// -// UpdateGameSessionQueue -- Change the configuration of a game session queue. -// -// DeleteGameSessionQueue -- Remove a game session queue from the region. -// -// * Manage FlexMatch resources -// -// CreateMatchmakingConfiguration -- Create a matchmaking configuration with -// instructions for building a player group and placing in a new game session. -// -// -// DescribeMatchmakingConfigurations -- Retrieve matchmaking configurations -// defined a Amazon GameLift region. -// -// UpdateMatchmakingConfiguration -- Change settings for matchmaking configuration. -// queue. -// -// DeleteMatchmakingConfiguration -- Remove a matchmaking configuration from -// the region. -// -// CreateMatchmakingRuleSet -- Create a set of rules to use when searching for -// player matches. -// -// DescribeMatchmakingRuleSets -- Retrieve matchmaking rule sets defined in -// a Amazon GameLift region. -// -// ValidateMatchmakingRuleSet -- Verify syntax for a set of matchmaking rules. -// -// See https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01 for more information on this service. -// -// See gamelift package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/gamelift/ -// -// Using the Client -// -// To contact Amazon GameLift with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon GameLift client GameLift for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/gamelift/#New -package gamelift diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/errors.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/errors.go deleted file mode 100644 index d04e78d0d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/errors.go +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package gamelift - -const ( - - // ErrCodeConflictException for service response error code - // "ConflictException". - // - // The requested operation would cause a conflict with the current state of - // a service resource associated with the request. Resolve the conflict before - // retrying this request. - ErrCodeConflictException = "ConflictException" - - // ErrCodeFleetCapacityExceededException for service response error code - // "FleetCapacityExceededException". - // - // The specified fleet has no available instances to fulfill a CreateGameSession - // request. Clients can retry such requests immediately or after a waiting period. - ErrCodeFleetCapacityExceededException = "FleetCapacityExceededException" - - // ErrCodeGameSessionFullException for service response error code - // "GameSessionFullException". - // - // The game instance is currently full and cannot allow the requested player(s) - // to join. Clients can retry such requests immediately or after a waiting period. - ErrCodeGameSessionFullException = "GameSessionFullException" - - // ErrCodeIdempotentParameterMismatchException for service response error code - // "IdempotentParameterMismatchException". - // - // A game session with this custom ID string already exists in this fleet. Resolve - // this conflict before retrying this request. - ErrCodeIdempotentParameterMismatchException = "IdempotentParameterMismatchException" - - // ErrCodeInternalServiceException for service response error code - // "InternalServiceException". - // - // The service encountered an unrecoverable internal failure while processing - // the request. Clients can retry such requests immediately or after a waiting - // period. - ErrCodeInternalServiceException = "InternalServiceException" - - // ErrCodeInvalidFleetStatusException for service response error code - // "InvalidFleetStatusException". - // - // The requested operation would cause a conflict with the current state of - // a resource associated with the request and/or the fleet. Resolve the conflict - // before retrying. - ErrCodeInvalidFleetStatusException = "InvalidFleetStatusException" - - // ErrCodeInvalidGameSessionStatusException for service response error code - // "InvalidGameSessionStatusException". - // - // The requested operation would cause a conflict with the current state of - // a resource associated with the request and/or the game instance. Resolve - // the conflict before retrying. - ErrCodeInvalidGameSessionStatusException = "InvalidGameSessionStatusException" - - // ErrCodeInvalidRequestException for service response error code - // "InvalidRequestException". - // - // One or more parameter values in the request are invalid. Correct the invalid - // parameter values before retrying. - ErrCodeInvalidRequestException = "InvalidRequestException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The requested operation would cause the resource to exceed the allowed service - // limit. Resolve the issue before retrying. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // A service resource associated with the request could not be found. Clients - // should not retry such requests. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeTerminalRoutingStrategyException for service response error code - // "TerminalRoutingStrategyException". - // - // The service is unable to resolve the routing for a particular alias because - // it has a terminal RoutingStrategy associated with it. The message returned - // in this exception is the message defined in the routing strategy itself. - // Such requests should only be retried if the routing strategy for the specified - // alias is modified. - ErrCodeTerminalRoutingStrategyException = "TerminalRoutingStrategyException" - - // ErrCodeUnauthorizedException for service response error code - // "UnauthorizedException". - // - // The client failed authentication. Clients should not retry such requests. - ErrCodeUnauthorizedException = "UnauthorizedException" - - // ErrCodeUnsupportedRegionException for service response error code - // "UnsupportedRegionException". - // - // The requested operation is not supported in the region specified. - ErrCodeUnsupportedRegionException = "UnsupportedRegionException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/service.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/service.go deleted file mode 100644 index a2361e476..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package gamelift - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// GameLift provides the API operation methods for making requests to -// Amazon GameLift. See this package's package overview docs -// for details on the service. -// -// GameLift methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type GameLift struct { - *client.Client -} - -// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) - -// Service information constants -const ( - ServiceName = "gamelift" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "GameLift" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the GameLift client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a GameLift client from just a session. -// svc := gamelift.New(mySession) -// -// // Create a GameLift client with additional configuration -// svc := gamelift.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *GameLift { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *GameLift { - svc := &GameLift{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-10-01", - JSONVersion: "1.1", - TargetPrefix: "GameLift", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a GameLift operation and runs any -// custom request initialization. -func (c *GameLift) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} 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 deleted file mode 100644 index f6199352f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go +++ /dev/null @@ -1,8572 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package glacier - -import ( - "fmt" - "io" - - "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 opAbortMultipartUpload = "AbortMultipartUpload" - -// AbortMultipartUploadRequest generates a "aws/request.Request" representing the -// client's request for the AbortMultipartUpload operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AbortMultipartUpload for more information on using the AbortMultipartUpload -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AbortMultipartUploadRequest method. -// req, resp := client.AbortMultipartUploadRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) { - op := &request.Operation{ - Name: opAbortMultipartUpload, - HTTPMethod: "DELETE", - HTTPPath: "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}", - } - - if input == nil { - input = &AbortMultipartUploadInput{} - } - - output = &AbortMultipartUploadOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AbortMultipartUpload API operation for Amazon Glacier. -// -// This operation aborts a multipart upload identified by the upload ID. -// -// After the Abort Multipart Upload request succeeds, you cannot upload any -// more parts to the multipart upload or complete the multipart upload. Aborting -// a completed upload fails. However, aborting an already-aborted upload will -// succeed, for a short time. For more information about uploading a part and -// completing a multipart upload, see UploadMultipartPart and CompleteMultipartUpload. -// -// This operation is idempotent. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and underlying REST API, see Working with Archives -// in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html) -// and Abort Multipart Upload (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-abort-upload.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation AbortMultipartUpload for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) { - req, out := c.AbortMultipartUploadRequest(input) - return out, req.Send() -} - -// AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of -// the ability to pass a context and additional request options. -// -// See AbortMultipartUpload for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) { - req, out := c.AbortMultipartUploadRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAbortVaultLock = "AbortVaultLock" - -// AbortVaultLockRequest generates a "aws/request.Request" representing the -// client's request for the AbortVaultLock operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AbortVaultLock for more information on using the AbortVaultLock -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AbortVaultLockRequest method. -// req, resp := client.AbortVaultLockRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) AbortVaultLockRequest(input *AbortVaultLockInput) (req *request.Request, output *AbortVaultLockOutput) { - op := &request.Operation{ - Name: opAbortVaultLock, - HTTPMethod: "DELETE", - HTTPPath: "/{accountId}/vaults/{vaultName}/lock-policy", - } - - if input == nil { - input = &AbortVaultLockInput{} - } - - output = &AbortVaultLockOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AbortVaultLock API operation for Amazon Glacier. -// -// This operation aborts the vault locking process if the vault lock is not -// in the Locked state. If the vault lock is in the Locked state when this operation -// is requested, the operation returns an AccessDeniedException error. Aborting -// the vault locking process removes the vault lock policy from the specified -// vault. -// -// A vault lock is put into the InProgress state by calling InitiateVaultLock. -// A vault lock is put into the Locked state by calling CompleteVaultLock. You -// can get the state of a vault lock by calling GetVaultLock. For more information -// about the vault locking process, see Amazon Glacier Vault Lock (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html). -// For more information about vault lock policies, see Amazon Glacier Access -// Control with Vault Lock Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html). -// -// This operation is idempotent. You can successfully invoke this operation -// multiple times, if the vault lock is in the InProgress state or if there -// is no policy associated with the vault. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation AbortVaultLock for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) AbortVaultLock(input *AbortVaultLockInput) (*AbortVaultLockOutput, error) { - req, out := c.AbortVaultLockRequest(input) - return out, req.Send() -} - -// AbortVaultLockWithContext is the same as AbortVaultLock with the addition of -// the ability to pass a context and additional request options. -// -// See AbortVaultLock for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) AbortVaultLockWithContext(ctx aws.Context, input *AbortVaultLockInput, opts ...request.Option) (*AbortVaultLockOutput, error) { - req, out := c.AbortVaultLockRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddTagsToVault = "AddTagsToVault" - -// AddTagsToVaultRequest generates a "aws/request.Request" representing the -// client's request for the AddTagsToVault operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTagsToVault for more information on using the AddTagsToVault -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsToVaultRequest method. -// req, resp := client.AddTagsToVaultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) AddTagsToVaultRequest(input *AddTagsToVaultInput) (req *request.Request, output *AddTagsToVaultOutput) { - op := &request.Operation{ - Name: opAddTagsToVault, - HTTPMethod: "POST", - HTTPPath: "/{accountId}/vaults/{vaultName}/tags?operation=add", - } - - if input == nil { - input = &AddTagsToVaultInput{} - } - - output = &AddTagsToVaultOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTagsToVault API operation for Amazon Glacier. -// -// This operation adds the specified tags to a vault. Each tag is composed of -// a key and a value. Each vault can have up to 10 tags. If your request would -// cause the tag limit for the vault to be exceeded, the operation throws the -// LimitExceededException error. If a tag already exists on the vault under -// a specified key, the existing key value will be overwritten. For more information -// about tags, see Tagging Amazon Glacier Resources (http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation AddTagsToVault for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Returned if the request results in a vault or account limit being exceeded. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) AddTagsToVault(input *AddTagsToVaultInput) (*AddTagsToVaultOutput, error) { - req, out := c.AddTagsToVaultRequest(input) - return out, req.Send() -} - -// AddTagsToVaultWithContext is the same as AddTagsToVault with the addition of -// the ability to pass a context and additional request options. -// -// See AddTagsToVault for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) AddTagsToVaultWithContext(ctx aws.Context, input *AddTagsToVaultInput, opts ...request.Option) (*AddTagsToVaultOutput, error) { - req, out := c.AddTagsToVaultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCompleteMultipartUpload = "CompleteMultipartUpload" - -// CompleteMultipartUploadRequest generates a "aws/request.Request" representing the -// client's request for the CompleteMultipartUpload operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CompleteMultipartUpload for more information on using the CompleteMultipartUpload -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CompleteMultipartUploadRequest method. -// req, resp := client.CompleteMultipartUploadRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *ArchiveCreationOutput) { - op := &request.Operation{ - Name: opCompleteMultipartUpload, - HTTPMethod: "POST", - HTTPPath: "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}", - } - - if input == nil { - input = &CompleteMultipartUploadInput{} - } - - output = &ArchiveCreationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CompleteMultipartUpload API operation for Amazon Glacier. -// -// You call this operation to inform Amazon Glacier that all the archive parts -// have been uploaded and that Amazon Glacier can now assemble the archive from -// the uploaded parts. After assembling and saving the archive to the vault, -// Amazon Glacier returns the URI path of the newly created archive resource. -// Using the URI path, you can then access the archive. After you upload an -// archive, you should save the archive ID returned to retrieve the archive -// at a later point. You can also get the vault inventory to obtain a list of -// archive IDs in a vault. For more information, see InitiateJob. -// -// In the request, you must include the computed SHA256 tree hash of the entire -// archive you have uploaded. For information about computing a SHA256 tree -// hash, see Computing Checksums (http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html). -// On the server side, Amazon Glacier also constructs the SHA256 tree hash of -// the assembled archive. If the values match, Amazon Glacier saves the archive -// to the vault; otherwise, it returns an error, and the operation fails. The -// ListParts operation returns a list of parts uploaded for a specific multipart -// upload. It includes checksum information for each uploaded part that can -// be used to debug a bad checksum issue. -// -// Additionally, Amazon Glacier also checks for any missing content ranges when -// assembling the archive, if missing content ranges are found, Amazon Glacier -// returns an error and the operation fails. -// -// Complete Multipart Upload is an idempotent operation. After your first successful -// complete multipart upload, if you call the operation again within a short -// period, the operation will succeed and return the same archive ID. This is -// useful in the event you experience a network issue that causes an aborted -// connection or receive a 500 server error, in which case you can repeat your -// Complete Multipart Upload request and get the same archive ID without creating -// duplicate archives. Note, however, that after the multipart upload completes, -// you cannot call the List Parts operation and the multipart upload will not -// appear in List Multipart Uploads response, even if idempotent complete is -// possible. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and underlying REST API, see Uploading Large Archives -// in Parts (Multipart Upload) (http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html) -// and Complete Multipart Upload (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-complete-upload.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation CompleteMultipartUpload for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*ArchiveCreationOutput, error) { - req, out := c.CompleteMultipartUploadRequest(input) - return out, req.Send() -} - -// CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of -// the ability to pass a context and additional request options. -// -// See CompleteMultipartUpload for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*ArchiveCreationOutput, error) { - req, out := c.CompleteMultipartUploadRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCompleteVaultLock = "CompleteVaultLock" - -// CompleteVaultLockRequest generates a "aws/request.Request" representing the -// client's request for the CompleteVaultLock operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CompleteVaultLock for more information on using the CompleteVaultLock -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CompleteVaultLockRequest method. -// req, resp := client.CompleteVaultLockRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) CompleteVaultLockRequest(input *CompleteVaultLockInput) (req *request.Request, output *CompleteVaultLockOutput) { - op := &request.Operation{ - Name: opCompleteVaultLock, - HTTPMethod: "POST", - HTTPPath: "/{accountId}/vaults/{vaultName}/lock-policy/{lockId}", - } - - if input == nil { - input = &CompleteVaultLockInput{} - } - - output = &CompleteVaultLockOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CompleteVaultLock API operation for Amazon Glacier. -// -// This operation completes the vault locking process by transitioning the vault -// lock from the InProgress state to the Locked state, which causes the vault -// lock policy to become unchangeable. A vault lock is put into the InProgress -// state by calling InitiateVaultLock. You can obtain the state of the vault -// lock by calling GetVaultLock. For more information about the vault locking -// process, Amazon Glacier Vault Lock (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html). -// -// This operation is idempotent. This request is always successful if the vault -// lock is in the Locked state and the provided lock ID matches the lock ID -// originally used to lock the vault. -// -// If an invalid lock ID is passed in the request when the vault lock is in -// the Locked state, the operation returns an AccessDeniedException error. If -// an invalid lock ID is passed in the request when the vault lock is in the -// InProgress state, the operation throws an InvalidParameter error. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation CompleteVaultLock for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) CompleteVaultLock(input *CompleteVaultLockInput) (*CompleteVaultLockOutput, error) { - req, out := c.CompleteVaultLockRequest(input) - return out, req.Send() -} - -// CompleteVaultLockWithContext is the same as CompleteVaultLock with the addition of -// the ability to pass a context and additional request options. -// -// See CompleteVaultLock for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) CompleteVaultLockWithContext(ctx aws.Context, input *CompleteVaultLockInput, opts ...request.Option) (*CompleteVaultLockOutput, error) { - req, out := c.CompleteVaultLockRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVault = "CreateVault" - -// CreateVaultRequest generates a "aws/request.Request" representing the -// client's request for the CreateVault operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVault for more information on using the CreateVault -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVaultRequest method. -// req, resp := client.CreateVaultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) CreateVaultRequest(input *CreateVaultInput) (req *request.Request, output *CreateVaultOutput) { - op := &request.Operation{ - Name: opCreateVault, - HTTPMethod: "PUT", - HTTPPath: "/{accountId}/vaults/{vaultName}", - } - - if input == nil { - input = &CreateVaultInput{} - } - - output = &CreateVaultOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVault API operation for Amazon Glacier. -// -// This operation creates a new vault with the specified name. The name of the -// vault must be unique within a region for an AWS account. You can create up -// to 1,000 vaults per account. If you need to create more vaults, contact Amazon -// Glacier. -// -// You must use the following guidelines when naming a vault. -// -// * Names can be between 1 and 255 characters long. -// -// * Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), -// and '.' (period). -// -// This operation is idempotent. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and underlying REST API, see Creating a Vault -// in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/creating-vaults.html) -// and Create Vault (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-put.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation CreateVault for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Returned if the request results in a vault or account limit being exceeded. -// -func (c *Glacier) CreateVault(input *CreateVaultInput) (*CreateVaultOutput, error) { - req, out := c.CreateVaultRequest(input) - return out, req.Send() -} - -// CreateVaultWithContext is the same as CreateVault with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVault for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) CreateVaultWithContext(ctx aws.Context, input *CreateVaultInput, opts ...request.Option) (*CreateVaultOutput, error) { - req, out := c.CreateVaultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteArchive = "DeleteArchive" - -// DeleteArchiveRequest generates a "aws/request.Request" representing the -// client's request for the DeleteArchive operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteArchive for more information on using the DeleteArchive -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteArchiveRequest method. -// req, resp := client.DeleteArchiveRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) DeleteArchiveRequest(input *DeleteArchiveInput) (req *request.Request, output *DeleteArchiveOutput) { - op := &request.Operation{ - Name: opDeleteArchive, - HTTPMethod: "DELETE", - HTTPPath: "/{accountId}/vaults/{vaultName}/archives/{archiveId}", - } - - if input == nil { - input = &DeleteArchiveInput{} - } - - output = &DeleteArchiveOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteArchive API operation for Amazon Glacier. -// -// This operation deletes an archive from a vault. Subsequent requests to initiate -// a retrieval of this archive will fail. Archive retrievals that are in progress -// for this archive ID may or may not succeed according to the following scenarios: -// -// * If the archive retrieval job is actively preparing the data for download -// when Amazon Glacier receives the delete archive request, the archival -// retrieval operation might fail. -// -// * If the archive retrieval job has successfully prepared the archive for -// download when Amazon Glacier receives the delete archive request, you -// will be able to download the output. -// -// This operation is idempotent. Attempting to delete an already-deleted archive -// does not result in an error. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and underlying REST API, see Deleting an Archive -// in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/deleting-an-archive.html) -// and Delete Archive (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-delete.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation DeleteArchive for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) DeleteArchive(input *DeleteArchiveInput) (*DeleteArchiveOutput, error) { - req, out := c.DeleteArchiveRequest(input) - return out, req.Send() -} - -// DeleteArchiveWithContext is the same as DeleteArchive with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteArchive for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) DeleteArchiveWithContext(ctx aws.Context, input *DeleteArchiveInput, opts ...request.Option) (*DeleteArchiveOutput, error) { - req, out := c.DeleteArchiveRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVault = "DeleteVault" - -// DeleteVaultRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVault operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVault for more information on using the DeleteVault -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVaultRequest method. -// req, resp := client.DeleteVaultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) DeleteVaultRequest(input *DeleteVaultInput) (req *request.Request, output *DeleteVaultOutput) { - op := &request.Operation{ - Name: opDeleteVault, - HTTPMethod: "DELETE", - HTTPPath: "/{accountId}/vaults/{vaultName}", - } - - if input == nil { - input = &DeleteVaultInput{} - } - - output = &DeleteVaultOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVault API operation for Amazon Glacier. -// -// This operation deletes a vault. Amazon Glacier will delete a vault only if -// there are no archives in the vault as of the last inventory and there have -// been no writes to the vault since the last inventory. If either of these -// conditions is not satisfied, the vault deletion fails (that is, the vault -// is not removed) and Amazon Glacier returns an error. You can use DescribeVault -// to return the number of archives in a vault, and you can use Initiate a Job -// (POST jobs) (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html) -// to initiate a new inventory retrieval for a vault. The inventory contains -// the archive IDs you use to delete archives using Delete Archive (DELETE archive) -// (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-delete.html). -// -// This operation is idempotent. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and underlying REST API, see Deleting a Vault -// in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/deleting-vaults.html) -// and Delete Vault (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-delete.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation DeleteVault for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) DeleteVault(input *DeleteVaultInput) (*DeleteVaultOutput, error) { - req, out := c.DeleteVaultRequest(input) - return out, req.Send() -} - -// DeleteVaultWithContext is the same as DeleteVault with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVault for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) DeleteVaultWithContext(ctx aws.Context, input *DeleteVaultInput, opts ...request.Option) (*DeleteVaultOutput, error) { - req, out := c.DeleteVaultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVaultAccessPolicy = "DeleteVaultAccessPolicy" - -// DeleteVaultAccessPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVaultAccessPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVaultAccessPolicy for more information on using the DeleteVaultAccessPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVaultAccessPolicyRequest method. -// req, resp := client.DeleteVaultAccessPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) DeleteVaultAccessPolicyRequest(input *DeleteVaultAccessPolicyInput) (req *request.Request, output *DeleteVaultAccessPolicyOutput) { - op := &request.Operation{ - Name: opDeleteVaultAccessPolicy, - HTTPMethod: "DELETE", - HTTPPath: "/{accountId}/vaults/{vaultName}/access-policy", - } - - if input == nil { - input = &DeleteVaultAccessPolicyInput{} - } - - output = &DeleteVaultAccessPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVaultAccessPolicy API operation for Amazon Glacier. -// -// This operation deletes the access policy associated with the specified vault. -// The operation is eventually consistent; that is, it might take some time -// for Amazon Glacier to completely remove the access policy, and you might -// still see the effect of the policy for a short time after you send the delete -// request. -// -// This operation is idempotent. You can invoke delete multiple times, even -// if there is no policy associated with the vault. For more information about -// vault access policies, see Amazon Glacier Access Control with Vault Access -// Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation DeleteVaultAccessPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) DeleteVaultAccessPolicy(input *DeleteVaultAccessPolicyInput) (*DeleteVaultAccessPolicyOutput, error) { - req, out := c.DeleteVaultAccessPolicyRequest(input) - return out, req.Send() -} - -// DeleteVaultAccessPolicyWithContext is the same as DeleteVaultAccessPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVaultAccessPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) DeleteVaultAccessPolicyWithContext(ctx aws.Context, input *DeleteVaultAccessPolicyInput, opts ...request.Option) (*DeleteVaultAccessPolicyOutput, error) { - req, out := c.DeleteVaultAccessPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVaultNotifications = "DeleteVaultNotifications" - -// DeleteVaultNotificationsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVaultNotifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVaultNotifications for more information on using the DeleteVaultNotifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVaultNotificationsRequest method. -// req, resp := client.DeleteVaultNotificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) DeleteVaultNotificationsRequest(input *DeleteVaultNotificationsInput) (req *request.Request, output *DeleteVaultNotificationsOutput) { - op := &request.Operation{ - Name: opDeleteVaultNotifications, - HTTPMethod: "DELETE", - HTTPPath: "/{accountId}/vaults/{vaultName}/notification-configuration", - } - - if input == nil { - input = &DeleteVaultNotificationsInput{} - } - - output = &DeleteVaultNotificationsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVaultNotifications API operation for Amazon Glacier. -// -// This operation deletes the notification configuration set for a vault. The -// operation is eventually consistent; that is, it might take some time for -// Amazon Glacier to completely disable the notifications and you might still -// receive some notifications for a short time after you send the delete request. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and underlying REST API, see Configuring Vault -// Notifications in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html) -// and Delete Vault Notification Configuration (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-delete.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation DeleteVaultNotifications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) DeleteVaultNotifications(input *DeleteVaultNotificationsInput) (*DeleteVaultNotificationsOutput, error) { - req, out := c.DeleteVaultNotificationsRequest(input) - return out, req.Send() -} - -// DeleteVaultNotificationsWithContext is the same as DeleteVaultNotifications with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVaultNotifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) DeleteVaultNotificationsWithContext(ctx aws.Context, input *DeleteVaultNotificationsInput, opts ...request.Option) (*DeleteVaultNotificationsOutput, error) { - req, out := c.DeleteVaultNotificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeJob = "DescribeJob" - -// DescribeJobRequest generates a "aws/request.Request" representing the -// client's request for the DescribeJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeJob for more information on using the DescribeJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeJobRequest method. -// req, resp := client.DescribeJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) DescribeJobRequest(input *DescribeJobInput) (req *request.Request, output *JobDescription) { - op := &request.Operation{ - Name: opDescribeJob, - HTTPMethod: "GET", - HTTPPath: "/{accountId}/vaults/{vaultName}/jobs/{jobId}", - } - - if input == nil { - input = &DescribeJobInput{} - } - - output = &JobDescription{} - req = c.newRequest(op, input, output) - return -} - -// DescribeJob API operation for Amazon Glacier. -// -// This operation returns information about a job you previously initiated, -// including the job initiation date, the user who initiated the job, the job -// status code/message and the Amazon SNS topic to notify after Amazon Glacier -// completes the job. For more information about initiating a job, see InitiateJob. -// -// This operation enables you to check the status of your job. However, it is -// strongly recommended that you set up an Amazon SNS topic and specify it in -// your initiate job request so that Amazon Glacier can notify the topic after -// it completes the job. -// -// A job ID will not expire for at least 24 hours after Amazon Glacier completes -// the job. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For more information about using this operation, see the documentation for -// the underlying REST API Describe Job (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-describe-job-get.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation DescribeJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) DescribeJob(input *DescribeJobInput) (*JobDescription, error) { - req, out := c.DescribeJobRequest(input) - return out, req.Send() -} - -// DescribeJobWithContext is the same as DescribeJob with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) DescribeJobWithContext(ctx aws.Context, input *DescribeJobInput, opts ...request.Option) (*JobDescription, error) { - req, out := c.DescribeJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVault = "DescribeVault" - -// DescribeVaultRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVault operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVault for more information on using the DescribeVault -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVaultRequest method. -// req, resp := client.DescribeVaultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) DescribeVaultRequest(input *DescribeVaultInput) (req *request.Request, output *DescribeVaultOutput) { - op := &request.Operation{ - Name: opDescribeVault, - HTTPMethod: "GET", - HTTPPath: "/{accountId}/vaults/{vaultName}", - } - - if input == nil { - input = &DescribeVaultInput{} - } - - output = &DescribeVaultOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVault API operation for Amazon Glacier. -// -// This operation returns information about a vault, including the vault's Amazon -// Resource Name (ARN), the date the vault was created, the number of archives -// it contains, and the total size of all the archives in the vault. The number -// of archives and their total size are as of the last inventory generation. -// This means that if you add or remove an archive from a vault, and then immediately -// use Describe Vault, the change in contents will not be immediately reflected. -// If you want to retrieve the latest inventory of the vault, use InitiateJob. -// Amazon Glacier generates vault inventories approximately daily. For more -// information, see Downloading a Vault Inventory in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-inventory.html). -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and underlying REST API, see Retrieving Vault -// Metadata in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/retrieving-vault-info.html) -// and Describe Vault (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-get.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation DescribeVault for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) DescribeVault(input *DescribeVaultInput) (*DescribeVaultOutput, error) { - req, out := c.DescribeVaultRequest(input) - return out, req.Send() -} - -// DescribeVaultWithContext is the same as DescribeVault with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVault for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) DescribeVaultWithContext(ctx aws.Context, input *DescribeVaultInput, opts ...request.Option) (*DescribeVaultOutput, error) { - req, out := c.DescribeVaultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDataRetrievalPolicy = "GetDataRetrievalPolicy" - -// GetDataRetrievalPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetDataRetrievalPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDataRetrievalPolicy for more information on using the GetDataRetrievalPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDataRetrievalPolicyRequest method. -// req, resp := client.GetDataRetrievalPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) GetDataRetrievalPolicyRequest(input *GetDataRetrievalPolicyInput) (req *request.Request, output *GetDataRetrievalPolicyOutput) { - op := &request.Operation{ - Name: opGetDataRetrievalPolicy, - HTTPMethod: "GET", - HTTPPath: "/{accountId}/policies/data-retrieval", - } - - if input == nil { - input = &GetDataRetrievalPolicyInput{} - } - - output = &GetDataRetrievalPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDataRetrievalPolicy API operation for Amazon Glacier. -// -// This operation returns the current data retrieval policy for the account -// and region specified in the GET request. For more information about data -// retrieval policies, see Amazon Glacier Data Retrieval Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/data-retrieval-policy.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation GetDataRetrievalPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) GetDataRetrievalPolicy(input *GetDataRetrievalPolicyInput) (*GetDataRetrievalPolicyOutput, error) { - req, out := c.GetDataRetrievalPolicyRequest(input) - return out, req.Send() -} - -// GetDataRetrievalPolicyWithContext is the same as GetDataRetrievalPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetDataRetrievalPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) GetDataRetrievalPolicyWithContext(ctx aws.Context, input *GetDataRetrievalPolicyInput, opts ...request.Option) (*GetDataRetrievalPolicyOutput, error) { - req, out := c.GetDataRetrievalPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetJobOutput = "GetJobOutput" - -// GetJobOutputRequest generates a "aws/request.Request" representing the -// client's request for the GetJobOutput operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetJobOutput for more information on using the GetJobOutput -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetJobOutputRequest method. -// req, resp := client.GetJobOutputRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) GetJobOutputRequest(input *GetJobOutputInput) (req *request.Request, output *GetJobOutputOutput) { - op := &request.Operation{ - Name: opGetJobOutput, - HTTPMethod: "GET", - HTTPPath: "/{accountId}/vaults/{vaultName}/jobs/{jobId}/output", - } - - if input == nil { - input = &GetJobOutputInput{} - } - - output = &GetJobOutputOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetJobOutput API operation for Amazon Glacier. -// -// This operation downloads the output of the job you initiated using InitiateJob. -// Depending on the job type you specified when you initiated the job, the output -// will be either the content of an archive or a vault inventory. -// -// You can download all the job output or download a portion of the output by -// specifying a byte range. In the case of an archive retrieval job, depending -// on the byte range you specify, Amazon Glacier returns the checksum for the -// portion of the data. You can compute the checksum on the client and verify -// that the values match to ensure the portion you downloaded is the correct -// data. -// -// A job ID will not expire for at least 24 hours after Amazon Glacier completes -// the job. That a byte range. For both archive and inventory retrieval jobs, -// you should verify the downloaded size against the size returned in the headers -// from the Get Job Output response. -// -// For archive retrieval jobs, you should also verify that the size is what -// you expected. If you download a portion of the output, the expected size -// is based on the range of bytes you specified. For example, if you specify -// a range of bytes=0-1048575, you should verify your download size is 1,048,576 -// bytes. If you download an entire archive, the expected size is the size of -// the archive when you uploaded it to Amazon Glacier The expected size is also -// returned in the headers from the Get Job Output response. -// -// In the case of an archive retrieval job, depending on the byte range you -// specify, Amazon Glacier returns the checksum for the portion of the data. -// To ensure the portion you downloaded is the correct data, compute the checksum -// on the client, verify that the values match, and verify that the size is -// what you expected. -// -// A job ID does not expire for at least 24 hours after Amazon Glacier completes -// the job. That is, you can download the job output within the 24 hours period -// after Amazon Glacier completes the job. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and the underlying REST API, see Downloading a -// Vault Inventory (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-inventory.html), -// Downloading an Archive (http://docs.aws.amazon.com/amazonglacier/latest/dev/downloading-an-archive.html), -// and Get Job Output (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-job-output-get.html) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation GetJobOutput for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) GetJobOutput(input *GetJobOutputInput) (*GetJobOutputOutput, error) { - req, out := c.GetJobOutputRequest(input) - return out, req.Send() -} - -// GetJobOutputWithContext is the same as GetJobOutput with the addition of -// the ability to pass a context and additional request options. -// -// See GetJobOutput for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) GetJobOutputWithContext(ctx aws.Context, input *GetJobOutputInput, opts ...request.Option) (*GetJobOutputOutput, error) { - req, out := c.GetJobOutputRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetVaultAccessPolicy = "GetVaultAccessPolicy" - -// GetVaultAccessPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetVaultAccessPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetVaultAccessPolicy for more information on using the GetVaultAccessPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetVaultAccessPolicyRequest method. -// req, resp := client.GetVaultAccessPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) GetVaultAccessPolicyRequest(input *GetVaultAccessPolicyInput) (req *request.Request, output *GetVaultAccessPolicyOutput) { - op := &request.Operation{ - Name: opGetVaultAccessPolicy, - HTTPMethod: "GET", - HTTPPath: "/{accountId}/vaults/{vaultName}/access-policy", - } - - if input == nil { - input = &GetVaultAccessPolicyInput{} - } - - output = &GetVaultAccessPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetVaultAccessPolicy API operation for Amazon Glacier. -// -// This operation retrieves the access-policy subresource set on the vault; -// for more information on setting this subresource, see Set Vault Access Policy -// (PUT access-policy) (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-SetVaultAccessPolicy.html). -// If there is no access policy set on the vault, the operation returns a 404 -// Not found error. For more information about vault access policies, see Amazon -// Glacier Access Control with Vault Access Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation GetVaultAccessPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) GetVaultAccessPolicy(input *GetVaultAccessPolicyInput) (*GetVaultAccessPolicyOutput, error) { - req, out := c.GetVaultAccessPolicyRequest(input) - return out, req.Send() -} - -// GetVaultAccessPolicyWithContext is the same as GetVaultAccessPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetVaultAccessPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) GetVaultAccessPolicyWithContext(ctx aws.Context, input *GetVaultAccessPolicyInput, opts ...request.Option) (*GetVaultAccessPolicyOutput, error) { - req, out := c.GetVaultAccessPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetVaultLock = "GetVaultLock" - -// GetVaultLockRequest generates a "aws/request.Request" representing the -// client's request for the GetVaultLock operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetVaultLock for more information on using the GetVaultLock -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetVaultLockRequest method. -// req, resp := client.GetVaultLockRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) GetVaultLockRequest(input *GetVaultLockInput) (req *request.Request, output *GetVaultLockOutput) { - op := &request.Operation{ - Name: opGetVaultLock, - HTTPMethod: "GET", - HTTPPath: "/{accountId}/vaults/{vaultName}/lock-policy", - } - - if input == nil { - input = &GetVaultLockInput{} - } - - output = &GetVaultLockOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetVaultLock API operation for Amazon Glacier. -// -// This operation retrieves the following attributes from the lock-policy subresource -// set on the specified vault: -// -// * The vault lock policy set on the vault. -// -// * The state of the vault lock, which is either InProgess or Locked. -// -// * When the lock ID expires. The lock ID is used to complete the vault -// locking process. -// -// * When the vault lock was initiated and put into the InProgress state. -// -// A vault lock is put into the InProgress state by calling InitiateVaultLock. -// A vault lock is put into the Locked state by calling CompleteVaultLock. You -// can abort the vault locking process by calling AbortVaultLock. For more information -// about the vault locking process, Amazon Glacier Vault Lock (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html). -// -// If there is no vault lock policy set on the vault, the operation returns -// a 404 Not found error. For more information about vault lock policies, Amazon -// Glacier Access Control with Vault Lock Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation GetVaultLock for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) GetVaultLock(input *GetVaultLockInput) (*GetVaultLockOutput, error) { - req, out := c.GetVaultLockRequest(input) - return out, req.Send() -} - -// GetVaultLockWithContext is the same as GetVaultLock with the addition of -// the ability to pass a context and additional request options. -// -// See GetVaultLock for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) GetVaultLockWithContext(ctx aws.Context, input *GetVaultLockInput, opts ...request.Option) (*GetVaultLockOutput, error) { - req, out := c.GetVaultLockRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetVaultNotifications = "GetVaultNotifications" - -// GetVaultNotificationsRequest generates a "aws/request.Request" representing the -// client's request for the GetVaultNotifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetVaultNotifications for more information on using the GetVaultNotifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetVaultNotificationsRequest method. -// req, resp := client.GetVaultNotificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) GetVaultNotificationsRequest(input *GetVaultNotificationsInput) (req *request.Request, output *GetVaultNotificationsOutput) { - op := &request.Operation{ - Name: opGetVaultNotifications, - HTTPMethod: "GET", - HTTPPath: "/{accountId}/vaults/{vaultName}/notification-configuration", - } - - if input == nil { - input = &GetVaultNotificationsInput{} - } - - output = &GetVaultNotificationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetVaultNotifications API operation for Amazon Glacier. -// -// This operation retrieves the notification-configuration subresource of the -// specified vault. -// -// For information about setting a notification configuration on a vault, see -// SetVaultNotifications. If a notification configuration for a vault is not -// set, the operation returns a 404 Not Found error. For more information about -// vault notifications, see Configuring Vault Notifications in Amazon Glacier -// (http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html). -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and underlying REST API, see Configuring Vault -// Notifications in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html) -// and Get Vault Notification Configuration (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-get.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation GetVaultNotifications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) GetVaultNotifications(input *GetVaultNotificationsInput) (*GetVaultNotificationsOutput, error) { - req, out := c.GetVaultNotificationsRequest(input) - return out, req.Send() -} - -// GetVaultNotificationsWithContext is the same as GetVaultNotifications with the addition of -// the ability to pass a context and additional request options. -// -// See GetVaultNotifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) GetVaultNotificationsWithContext(ctx aws.Context, input *GetVaultNotificationsInput, opts ...request.Option) (*GetVaultNotificationsOutput, error) { - req, out := c.GetVaultNotificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInitiateJob = "InitiateJob" - -// InitiateJobRequest generates a "aws/request.Request" representing the -// client's request for the InitiateJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See InitiateJob for more information on using the InitiateJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the InitiateJobRequest method. -// req, resp := client.InitiateJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) InitiateJobRequest(input *InitiateJobInput) (req *request.Request, output *InitiateJobOutput) { - op := &request.Operation{ - Name: opInitiateJob, - HTTPMethod: "POST", - HTTPPath: "/{accountId}/vaults/{vaultName}/jobs", - } - - if input == nil { - input = &InitiateJobInput{} - } - - output = &InitiateJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// InitiateJob API operation for Amazon Glacier. -// -// This operation initiates a job of the specified type, which can be a select, -// an archival retrieval, or a vault retrieval. For more information about using -// this operation, see the documentation for the underlying REST API Initiate -// a Job (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation InitiateJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodePolicyEnforcedException "PolicyEnforcedException" -// Returned if a retrieval job would exceed the current data policy's retrieval -// rate limit. For more information about data retrieval policies, -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeInsufficientCapacityException "InsufficientCapacityException" -// Returned if there is insufficient capacity to process this expedited request. -// This error only applies to expedited retrievals and not to standard or bulk -// retrievals. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) InitiateJob(input *InitiateJobInput) (*InitiateJobOutput, error) { - req, out := c.InitiateJobRequest(input) - return out, req.Send() -} - -// InitiateJobWithContext is the same as InitiateJob with the addition of -// the ability to pass a context and additional request options. -// -// See InitiateJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) InitiateJobWithContext(ctx aws.Context, input *InitiateJobInput, opts ...request.Option) (*InitiateJobOutput, error) { - req, out := c.InitiateJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInitiateMultipartUpload = "InitiateMultipartUpload" - -// InitiateMultipartUploadRequest generates a "aws/request.Request" representing the -// client's request for the InitiateMultipartUpload operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See InitiateMultipartUpload for more information on using the InitiateMultipartUpload -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the InitiateMultipartUploadRequest method. -// req, resp := client.InitiateMultipartUploadRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) InitiateMultipartUploadRequest(input *InitiateMultipartUploadInput) (req *request.Request, output *InitiateMultipartUploadOutput) { - op := &request.Operation{ - Name: opInitiateMultipartUpload, - HTTPMethod: "POST", - HTTPPath: "/{accountId}/vaults/{vaultName}/multipart-uploads", - } - - if input == nil { - input = &InitiateMultipartUploadInput{} - } - - output = &InitiateMultipartUploadOutput{} - req = c.newRequest(op, input, output) - return -} - -// InitiateMultipartUpload API operation for Amazon Glacier. -// -// This operation initiates a multipart upload. Amazon Glacier creates a multipart -// upload resource and returns its ID in the response. The multipart upload -// ID is used in subsequent requests to upload parts of an archive (see UploadMultipartPart). -// -// When you initiate a multipart upload, you specify the part size in number -// of bytes. The part size must be a megabyte (1024 KB) multiplied by a power -// of 2-for example, 1048576 (1 MB), 2097152 (2 MB), 4194304 (4 MB), 8388608 -// (8 MB), and so on. The minimum allowable part size is 1 MB, and the maximum -// is 4 GB. -// -// Every part you upload to this resource (see UploadMultipartPart), except -// the last one, must have the same size. The last one can be the same size -// or smaller. For example, suppose you want to upload a 16.2 MB file. If you -// initiate the multipart upload with a part size of 4 MB, you will upload four -// parts of 4 MB each and one part of 0.2 MB. -// -// You don't need to know the size of the archive when you start a multipart -// upload because Amazon Glacier does not require you to specify the overall -// archive size. -// -// After you complete the multipart upload, Amazon Glacier removes the multipart -// upload resource referenced by the ID. Amazon Glacier also removes the multipart -// upload resource if you cancel the multipart upload or it may be removed if -// there is no activity for a period of 24 hours. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and underlying REST API, see Uploading Large Archives -// in Parts (Multipart Upload) (http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html) -// and Initiate Multipart Upload (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-initiate-upload.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation InitiateMultipartUpload for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) InitiateMultipartUpload(input *InitiateMultipartUploadInput) (*InitiateMultipartUploadOutput, error) { - req, out := c.InitiateMultipartUploadRequest(input) - return out, req.Send() -} - -// InitiateMultipartUploadWithContext is the same as InitiateMultipartUpload with the addition of -// the ability to pass a context and additional request options. -// -// See InitiateMultipartUpload for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) InitiateMultipartUploadWithContext(ctx aws.Context, input *InitiateMultipartUploadInput, opts ...request.Option) (*InitiateMultipartUploadOutput, error) { - req, out := c.InitiateMultipartUploadRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInitiateVaultLock = "InitiateVaultLock" - -// InitiateVaultLockRequest generates a "aws/request.Request" representing the -// client's request for the InitiateVaultLock operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See InitiateVaultLock for more information on using the InitiateVaultLock -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the InitiateVaultLockRequest method. -// req, resp := client.InitiateVaultLockRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) InitiateVaultLockRequest(input *InitiateVaultLockInput) (req *request.Request, output *InitiateVaultLockOutput) { - op := &request.Operation{ - Name: opInitiateVaultLock, - HTTPMethod: "POST", - HTTPPath: "/{accountId}/vaults/{vaultName}/lock-policy", - } - - if input == nil { - input = &InitiateVaultLockInput{} - } - - output = &InitiateVaultLockOutput{} - req = c.newRequest(op, input, output) - return -} - -// InitiateVaultLock API operation for Amazon Glacier. -// -// This operation initiates the vault locking process by doing the following: -// -// * Installing a vault lock policy on the specified vault. -// -// * Setting the lock state of vault lock to InProgress. -// -// * Returning a lock ID, which is used to complete the vault locking process. -// -// You can set one vault lock policy for each vault and this policy can be up -// to 20 KB in size. For more information about vault lock policies, see Amazon -// Glacier Access Control with Vault Lock Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html). -// -// You must complete the vault locking process within 24 hours after the vault -// lock enters the InProgress state. After the 24 hour window ends, the lock -// ID expires, the vault automatically exits the InProgress state, and the vault -// lock policy is removed from the vault. You call CompleteVaultLock to complete -// the vault locking process by setting the state of the vault lock to Locked. -// -// After a vault lock is in the Locked state, you cannot initiate a new vault -// lock for the vault. -// -// You can abort the vault locking process by calling AbortVaultLock. You can -// get the state of the vault lock by calling GetVaultLock. For more information -// about the vault locking process, Amazon Glacier Vault Lock (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html). -// -// If this operation is called when the vault lock is in the InProgress state, -// the operation returns an AccessDeniedException error. When the vault lock -// is in the InProgress state you must call AbortVaultLock before you can initiate -// a new vault lock policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation InitiateVaultLock for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) InitiateVaultLock(input *InitiateVaultLockInput) (*InitiateVaultLockOutput, error) { - req, out := c.InitiateVaultLockRequest(input) - return out, req.Send() -} - -// InitiateVaultLockWithContext is the same as InitiateVaultLock with the addition of -// the ability to pass a context and additional request options. -// -// See InitiateVaultLock for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) InitiateVaultLockWithContext(ctx aws.Context, input *InitiateVaultLockInput, opts ...request.Option) (*InitiateVaultLockOutput, error) { - req, out := c.InitiateVaultLockRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListJobs = "ListJobs" - -// ListJobsRequest generates a "aws/request.Request" representing the -// client's request for the ListJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListJobs for more information on using the ListJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListJobsRequest method. -// req, resp := client.ListJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) ListJobsRequest(input *ListJobsInput) (req *request.Request, output *ListJobsOutput) { - op := &request.Operation{ - Name: opListJobs, - HTTPMethod: "GET", - HTTPPath: "/{accountId}/vaults/{vaultName}/jobs", - Paginator: &request.Paginator{ - InputTokens: []string{"marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListJobsInput{} - } - - output = &ListJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListJobs API operation for Amazon Glacier. -// -// This operation lists jobs for a vault, including jobs that are in-progress -// and jobs that have recently finished. The List Job operation returns a list -// of these jobs sorted by job initiation time. -// -// Amazon Glacier retains recently completed jobs for a period before deleting -// them; however, it eventually removes completed jobs. The output of completed -// jobs can be retrieved. Retaining completed jobs for a period of time after -// they have completed enables you to get a job output in the event you miss -// the job completion notification or your first attempt to download it fails. -// For example, suppose you start an archive retrieval job to download an archive. -// After the job completes, you start to download the archive but encounter -// a network error. In this scenario, you can retry and download the archive -// while the job exists. -// -// The List Jobs operation supports pagination. You should always check the -// response Marker field. If there are no more jobs to list, the Marker field -// is set to null. If there are more jobs to list, the Marker field is set to -// a non-null value, which you can use to continue the pagination of the list. -// To return a list of jobs that begins at a specific job, set the marker request -// parameter to the Marker value for that job that you obtained from a previous -// List Jobs request. -// -// You can set a maximum limit for the number of jobs returned in the response -// by specifying the limit parameter in the request. The default limit is 50. -// The number of jobs returned might be fewer than the limit, but the number -// of returned jobs never exceeds the limit. -// -// Additionally, you can filter the jobs list returned by specifying the optional -// statuscode parameter or completed parameter, or both. Using the statuscode -// parameter, you can specify to return only jobs that match either the InProgress, -// Succeeded, or Failed status. Using the completed parameter, you can specify -// to return only jobs that were completed (true) or jobs that were not completed -// (false). -// -// For more information about using this operation, see the documentation for -// the underlying REST API List Jobs (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-jobs-get.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation ListJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) ListJobs(input *ListJobsInput) (*ListJobsOutput, error) { - req, out := c.ListJobsRequest(input) - return out, req.Send() -} - -// ListJobsWithContext is the same as ListJobs with the addition of -// the ability to pass a context and additional request options. -// -// See ListJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) ListJobsWithContext(ctx aws.Context, input *ListJobsInput, opts ...request.Option) (*ListJobsOutput, error) { - req, out := c.ListJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListJobsPages iterates over the pages of a ListJobs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListJobs method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListJobs operation. -// pageNum := 0 -// err := client.ListJobsPages(params, -// func(page *ListJobsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glacier) ListJobsPages(input *ListJobsInput, fn func(*ListJobsOutput, bool) bool) error { - return c.ListJobsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListJobsPagesWithContext same as ListJobsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) ListJobsPagesWithContext(ctx aws.Context, input *ListJobsInput, fn func(*ListJobsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListJobsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListJobsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListMultipartUploads = "ListMultipartUploads" - -// ListMultipartUploadsRequest generates a "aws/request.Request" representing the -// client's request for the ListMultipartUploads operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListMultipartUploads for more information on using the ListMultipartUploads -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListMultipartUploadsRequest method. -// req, resp := client.ListMultipartUploadsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) { - op := &request.Operation{ - Name: opListMultipartUploads, - HTTPMethod: "GET", - HTTPPath: "/{accountId}/vaults/{vaultName}/multipart-uploads", - Paginator: &request.Paginator{ - InputTokens: []string{"marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListMultipartUploadsInput{} - } - - output = &ListMultipartUploadsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListMultipartUploads API operation for Amazon Glacier. -// -// This operation lists in-progress multipart uploads for the specified vault. -// An in-progress multipart upload is a multipart upload that has been initiated -// by an InitiateMultipartUpload request, but has not yet been completed or -// aborted. The list returned in the List Multipart Upload response has no guaranteed -// order. -// -// The List Multipart Uploads operation supports pagination. By default, this -// operation returns up to 50 multipart uploads in the response. You should -// always check the response for a marker at which to continue the list; if -// there are no more items the marker is null. To return a list of multipart -// uploads that begins at a specific upload, set the marker request parameter -// to the value you obtained from a previous List Multipart Upload request. -// You can also limit the number of uploads returned in the response by specifying -// the limit parameter in the request. -// -// Note the difference between this operation and listing parts (ListParts). -// The List Multipart Uploads operation lists all multipart uploads for a vault -// and does not require a multipart upload ID. The List Parts operation requires -// a multipart upload ID since parts are associated with a single upload. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and the underlying REST API, see Working with -// Archives in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html) -// and List Multipart Uploads (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-list-uploads.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation ListMultipartUploads for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) { - req, out := c.ListMultipartUploadsRequest(input) - return out, req.Send() -} - -// ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of -// the ability to pass a context and additional request options. -// -// See ListMultipartUploads for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) { - req, out := c.ListMultipartUploadsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListMultipartUploads 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 ListMultipartUploads operation. -// pageNum := 0 -// err := client.ListMultipartUploadsPages(params, -// func(page *ListMultipartUploadsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glacier) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error { - return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages 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 *Glacier) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListMultipartUploadsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListMultipartUploadsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListParts = "ListParts" - -// ListPartsRequest generates a "aws/request.Request" representing the -// client's request for the ListParts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListParts for more information on using the ListParts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPartsRequest method. -// req, resp := client.ListPartsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) { - op := &request.Operation{ - Name: opListParts, - HTTPMethod: "GET", - HTTPPath: "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}", - Paginator: &request.Paginator{ - InputTokens: []string{"marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListPartsInput{} - } - - output = &ListPartsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListParts API operation for Amazon Glacier. -// -// This operation lists the parts of an archive that have been uploaded in a -// specific multipart upload. You can make this request at any time during an -// in-progress multipart upload before you complete the upload (see CompleteMultipartUpload. -// List Parts returns an error for completed uploads. The list returned in the -// List Parts response is sorted by part range. -// -// The List Parts operation supports pagination. By default, this operation -// returns up to 50 uploaded parts in the response. You should always check -// the response for a marker at which to continue the list; if there are no -// more items the marker is null. To return a list of parts that begins at a -// specific part, set the marker request parameter to the value you obtained -// from a previous List Parts request. You can also limit the number of parts -// returned in the response by specifying the limit parameter in the request. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and the underlying REST API, see Working with -// Archives in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html) -// and List Parts (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-list-parts.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation ListParts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) ListParts(input *ListPartsInput) (*ListPartsOutput, error) { - req, out := c.ListPartsRequest(input) - return out, req.Send() -} - -// ListPartsWithContext is the same as ListParts with the addition of -// the ability to pass a context and additional request options. -// -// See ListParts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) { - req, out := c.ListPartsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPartsPages iterates over the pages of a ListParts operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListParts 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 ListParts operation. -// pageNum := 0 -// err := client.ListPartsPages(params, -// func(page *ListPartsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glacier) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error { - return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPartsPagesWithContext same as ListPartsPages 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 *Glacier) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPartsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPartsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListProvisionedCapacity = "ListProvisionedCapacity" - -// ListProvisionedCapacityRequest generates a "aws/request.Request" representing the -// client's request for the ListProvisionedCapacity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListProvisionedCapacity for more information on using the ListProvisionedCapacity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListProvisionedCapacityRequest method. -// req, resp := client.ListProvisionedCapacityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) ListProvisionedCapacityRequest(input *ListProvisionedCapacityInput) (req *request.Request, output *ListProvisionedCapacityOutput) { - op := &request.Operation{ - Name: opListProvisionedCapacity, - HTTPMethod: "GET", - HTTPPath: "/{accountId}/provisioned-capacity", - } - - if input == nil { - input = &ListProvisionedCapacityInput{} - } - - output = &ListProvisionedCapacityOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListProvisionedCapacity API operation for Amazon Glacier. -// -// This operation lists the provisioned capacity units for the specified AWS -// account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation ListProvisionedCapacity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) ListProvisionedCapacity(input *ListProvisionedCapacityInput) (*ListProvisionedCapacityOutput, error) { - req, out := c.ListProvisionedCapacityRequest(input) - return out, req.Send() -} - -// ListProvisionedCapacityWithContext is the same as ListProvisionedCapacity with the addition of -// the ability to pass a context and additional request options. -// -// See ListProvisionedCapacity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) ListProvisionedCapacityWithContext(ctx aws.Context, input *ListProvisionedCapacityInput, opts ...request.Option) (*ListProvisionedCapacityOutput, error) { - req, out := c.ListProvisionedCapacityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTagsForVault = "ListTagsForVault" - -// ListTagsForVaultRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForVault operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTagsForVault for more information on using the ListTagsForVault -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsForVaultRequest method. -// req, resp := client.ListTagsForVaultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) ListTagsForVaultRequest(input *ListTagsForVaultInput) (req *request.Request, output *ListTagsForVaultOutput) { - op := &request.Operation{ - Name: opListTagsForVault, - HTTPMethod: "GET", - HTTPPath: "/{accountId}/vaults/{vaultName}/tags", - } - - if input == nil { - input = &ListTagsForVaultInput{} - } - - output = &ListTagsForVaultOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForVault API operation for Amazon Glacier. -// -// This operation lists all the tags attached to a vault. The operation returns -// an empty map if there are no tags. For more information about tags, see Tagging -// Amazon Glacier Resources (http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation ListTagsForVault for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) ListTagsForVault(input *ListTagsForVaultInput) (*ListTagsForVaultOutput, error) { - req, out := c.ListTagsForVaultRequest(input) - return out, req.Send() -} - -// ListTagsForVaultWithContext is the same as ListTagsForVault with the addition of -// the ability to pass a context and additional request options. -// -// See ListTagsForVault for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) ListTagsForVaultWithContext(ctx aws.Context, input *ListTagsForVaultInput, opts ...request.Option) (*ListTagsForVaultOutput, error) { - req, out := c.ListTagsForVaultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListVaults = "ListVaults" - -// ListVaultsRequest generates a "aws/request.Request" representing the -// client's request for the ListVaults operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListVaults for more information on using the ListVaults -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListVaultsRequest method. -// req, resp := client.ListVaultsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) ListVaultsRequest(input *ListVaultsInput) (req *request.Request, output *ListVaultsOutput) { - op := &request.Operation{ - Name: opListVaults, - HTTPMethod: "GET", - HTTPPath: "/{accountId}/vaults", - Paginator: &request.Paginator{ - InputTokens: []string{"marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListVaultsInput{} - } - - output = &ListVaultsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListVaults API operation for Amazon Glacier. -// -// This operation lists all vaults owned by the calling user's account. The -// list returned in the response is ASCII-sorted by vault name. -// -// By default, this operation returns up to 10 items. If there are more vaults -// to list, the response marker field contains the vault Amazon Resource Name -// (ARN) at which to continue the list with a new List Vaults request; otherwise, -// the marker field is null. To return a list of vaults that begins at a specific -// vault, set the marker request parameter to the vault ARN you obtained from -// a previous List Vaults request. You can also limit the number of vaults returned -// in the response by specifying the limit parameter in the request. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and underlying REST API, see Retrieving Vault -// Metadata in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/retrieving-vault-info.html) -// and List Vaults (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vaults-get.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation ListVaults for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) ListVaults(input *ListVaultsInput) (*ListVaultsOutput, error) { - req, out := c.ListVaultsRequest(input) - return out, req.Send() -} - -// ListVaultsWithContext is the same as ListVaults with the addition of -// the ability to pass a context and additional request options. -// -// See ListVaults for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) ListVaultsWithContext(ctx aws.Context, input *ListVaultsInput, opts ...request.Option) (*ListVaultsOutput, error) { - req, out := c.ListVaultsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListVaultsPages iterates over the pages of a ListVaults operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListVaults 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 ListVaults operation. -// pageNum := 0 -// err := client.ListVaultsPages(params, -// func(page *ListVaultsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glacier) ListVaultsPages(input *ListVaultsInput, fn func(*ListVaultsOutput, bool) bool) error { - return c.ListVaultsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListVaultsPagesWithContext same as ListVaultsPages 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 *Glacier) ListVaultsPagesWithContext(ctx aws.Context, input *ListVaultsInput, fn func(*ListVaultsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListVaultsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListVaultsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListVaultsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opPurchaseProvisionedCapacity = "PurchaseProvisionedCapacity" - -// PurchaseProvisionedCapacityRequest generates a "aws/request.Request" representing the -// client's request for the PurchaseProvisionedCapacity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PurchaseProvisionedCapacity for more information on using the PurchaseProvisionedCapacity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PurchaseProvisionedCapacityRequest method. -// req, resp := client.PurchaseProvisionedCapacityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) PurchaseProvisionedCapacityRequest(input *PurchaseProvisionedCapacityInput) (req *request.Request, output *PurchaseProvisionedCapacityOutput) { - op := &request.Operation{ - Name: opPurchaseProvisionedCapacity, - HTTPMethod: "POST", - HTTPPath: "/{accountId}/provisioned-capacity", - } - - if input == nil { - input = &PurchaseProvisionedCapacityInput{} - } - - output = &PurchaseProvisionedCapacityOutput{} - req = c.newRequest(op, input, output) - return -} - -// PurchaseProvisionedCapacity API operation for Amazon Glacier. -// -// This operation purchases a provisioned capacity unit for an AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation PurchaseProvisionedCapacity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Returned if the request results in a vault or account limit being exceeded. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) PurchaseProvisionedCapacity(input *PurchaseProvisionedCapacityInput) (*PurchaseProvisionedCapacityOutput, error) { - req, out := c.PurchaseProvisionedCapacityRequest(input) - return out, req.Send() -} - -// PurchaseProvisionedCapacityWithContext is the same as PurchaseProvisionedCapacity with the addition of -// the ability to pass a context and additional request options. -// -// See PurchaseProvisionedCapacity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) PurchaseProvisionedCapacityWithContext(ctx aws.Context, input *PurchaseProvisionedCapacityInput, opts ...request.Option) (*PurchaseProvisionedCapacityOutput, error) { - req, out := c.PurchaseProvisionedCapacityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTagsFromVault = "RemoveTagsFromVault" - -// RemoveTagsFromVaultRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTagsFromVault operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTagsFromVault for more information on using the RemoveTagsFromVault -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsFromVaultRequest method. -// req, resp := client.RemoveTagsFromVaultRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) RemoveTagsFromVaultRequest(input *RemoveTagsFromVaultInput) (req *request.Request, output *RemoveTagsFromVaultOutput) { - op := &request.Operation{ - Name: opRemoveTagsFromVault, - HTTPMethod: "POST", - HTTPPath: "/{accountId}/vaults/{vaultName}/tags?operation=remove", - } - - if input == nil { - input = &RemoveTagsFromVaultInput{} - } - - output = &RemoveTagsFromVaultOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTagsFromVault API operation for Amazon Glacier. -// -// This operation removes one or more tags from the set of tags attached to -// a vault. For more information about tags, see Tagging Amazon Glacier Resources -// (http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html). This -// operation is idempotent. The operation will be successful, even if there -// are no tags attached to the vault. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation RemoveTagsFromVault for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) RemoveTagsFromVault(input *RemoveTagsFromVaultInput) (*RemoveTagsFromVaultOutput, error) { - req, out := c.RemoveTagsFromVaultRequest(input) - return out, req.Send() -} - -// RemoveTagsFromVaultWithContext is the same as RemoveTagsFromVault with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTagsFromVault for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) RemoveTagsFromVaultWithContext(ctx aws.Context, input *RemoveTagsFromVaultInput, opts ...request.Option) (*RemoveTagsFromVaultOutput, error) { - req, out := c.RemoveTagsFromVaultRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetDataRetrievalPolicy = "SetDataRetrievalPolicy" - -// SetDataRetrievalPolicyRequest generates a "aws/request.Request" representing the -// client's request for the SetDataRetrievalPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetDataRetrievalPolicy for more information on using the SetDataRetrievalPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetDataRetrievalPolicyRequest method. -// req, resp := client.SetDataRetrievalPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) SetDataRetrievalPolicyRequest(input *SetDataRetrievalPolicyInput) (req *request.Request, output *SetDataRetrievalPolicyOutput) { - op := &request.Operation{ - Name: opSetDataRetrievalPolicy, - HTTPMethod: "PUT", - HTTPPath: "/{accountId}/policies/data-retrieval", - } - - if input == nil { - input = &SetDataRetrievalPolicyInput{} - } - - output = &SetDataRetrievalPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetDataRetrievalPolicy API operation for Amazon Glacier. -// -// This operation sets and then enacts a data retrieval policy in the region -// specified in the PUT request. You can set one policy per region for an AWS -// account. The policy is enacted within a few minutes of a successful PUT operation. -// -// The set policy operation does not affect retrieval jobs that were in progress -// before the policy was enacted. For more information about data retrieval -// policies, see Amazon Glacier Data Retrieval Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/data-retrieval-policy.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation SetDataRetrievalPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) SetDataRetrievalPolicy(input *SetDataRetrievalPolicyInput) (*SetDataRetrievalPolicyOutput, error) { - req, out := c.SetDataRetrievalPolicyRequest(input) - return out, req.Send() -} - -// SetDataRetrievalPolicyWithContext is the same as SetDataRetrievalPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See SetDataRetrievalPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) SetDataRetrievalPolicyWithContext(ctx aws.Context, input *SetDataRetrievalPolicyInput, opts ...request.Option) (*SetDataRetrievalPolicyOutput, error) { - req, out := c.SetDataRetrievalPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetVaultAccessPolicy = "SetVaultAccessPolicy" - -// SetVaultAccessPolicyRequest generates a "aws/request.Request" representing the -// client's request for the SetVaultAccessPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetVaultAccessPolicy for more information on using the SetVaultAccessPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetVaultAccessPolicyRequest method. -// req, resp := client.SetVaultAccessPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) SetVaultAccessPolicyRequest(input *SetVaultAccessPolicyInput) (req *request.Request, output *SetVaultAccessPolicyOutput) { - op := &request.Operation{ - Name: opSetVaultAccessPolicy, - HTTPMethod: "PUT", - HTTPPath: "/{accountId}/vaults/{vaultName}/access-policy", - } - - if input == nil { - input = &SetVaultAccessPolicyInput{} - } - - output = &SetVaultAccessPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetVaultAccessPolicy API operation for Amazon Glacier. -// -// This operation configures an access policy for a vault and will overwrite -// an existing policy. To configure a vault access policy, send a PUT request -// to the access-policy subresource of the vault. An access policy is specific -// to a vault and is also called a vault subresource. You can set one access -// policy per vault and the policy can be up to 20 KB in size. For more information -// about vault access policies, see Amazon Glacier Access Control with Vault -// Access Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation SetVaultAccessPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) SetVaultAccessPolicy(input *SetVaultAccessPolicyInput) (*SetVaultAccessPolicyOutput, error) { - req, out := c.SetVaultAccessPolicyRequest(input) - return out, req.Send() -} - -// SetVaultAccessPolicyWithContext is the same as SetVaultAccessPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See SetVaultAccessPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) SetVaultAccessPolicyWithContext(ctx aws.Context, input *SetVaultAccessPolicyInput, opts ...request.Option) (*SetVaultAccessPolicyOutput, error) { - req, out := c.SetVaultAccessPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetVaultNotifications = "SetVaultNotifications" - -// SetVaultNotificationsRequest generates a "aws/request.Request" representing the -// client's request for the SetVaultNotifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetVaultNotifications for more information on using the SetVaultNotifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetVaultNotificationsRequest method. -// req, resp := client.SetVaultNotificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) SetVaultNotificationsRequest(input *SetVaultNotificationsInput) (req *request.Request, output *SetVaultNotificationsOutput) { - op := &request.Operation{ - Name: opSetVaultNotifications, - HTTPMethod: "PUT", - HTTPPath: "/{accountId}/vaults/{vaultName}/notification-configuration", - } - - if input == nil { - input = &SetVaultNotificationsInput{} - } - - output = &SetVaultNotificationsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetVaultNotifications API operation for Amazon Glacier. -// -// This operation configures notifications that will be sent when specific events -// happen to a vault. By default, you don't get any notifications. -// -// To configure vault notifications, send a PUT request to the notification-configuration -// subresource of the vault. The request should include a JSON document that -// provides an Amazon SNS topic and specific events for which you want Amazon -// Glacier to send notifications to the topic. -// -// Amazon SNS topics must grant permission to the vault to be allowed to publish -// notifications to the topic. You can configure a vault to publish a notification -// for the following vault events: -// -// * ArchiveRetrievalCompleted This event occurs when a job that was initiated -// for an archive retrieval is completed (InitiateJob). The status of the -// completed job can be "Succeeded" or "Failed". The notification sent to -// the SNS topic is the same output as returned from DescribeJob. -// -// * InventoryRetrievalCompleted This event occurs when a job that was initiated -// for an inventory retrieval is completed (InitiateJob). The status of the -// completed job can be "Succeeded" or "Failed". The notification sent to -// the SNS topic is the same output as returned from DescribeJob. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and underlying REST API, see Configuring Vault -// Notifications in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html) -// and Set Vault Notification Configuration (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-put.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation SetVaultNotifications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) SetVaultNotifications(input *SetVaultNotificationsInput) (*SetVaultNotificationsOutput, error) { - req, out := c.SetVaultNotificationsRequest(input) - return out, req.Send() -} - -// SetVaultNotificationsWithContext is the same as SetVaultNotifications with the addition of -// the ability to pass a context and additional request options. -// -// See SetVaultNotifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) SetVaultNotificationsWithContext(ctx aws.Context, input *SetVaultNotificationsInput, opts ...request.Option) (*SetVaultNotificationsOutput, error) { - req, out := c.SetVaultNotificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUploadArchive = "UploadArchive" - -// UploadArchiveRequest generates a "aws/request.Request" representing the -// client's request for the UploadArchive operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UploadArchive for more information on using the UploadArchive -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UploadArchiveRequest method. -// req, resp := client.UploadArchiveRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) UploadArchiveRequest(input *UploadArchiveInput) (req *request.Request, output *ArchiveCreationOutput) { - op := &request.Operation{ - Name: opUploadArchive, - HTTPMethod: "POST", - HTTPPath: "/{accountId}/vaults/{vaultName}/archives", - } - - if input == nil { - input = &UploadArchiveInput{} - } - - output = &ArchiveCreationOutput{} - req = c.newRequest(op, input, output) - return -} - -// UploadArchive API operation for Amazon Glacier. -// -// This operation adds an archive to a vault. This is a synchronous operation, -// and for a successful upload, your data is durably persisted. Amazon Glacier -// returns the archive ID in the x-amz-archive-id header of the response. -// -// You must use the archive ID to access your data in Amazon Glacier. After -// you upload an archive, you should save the archive ID returned so that you -// can retrieve or delete the archive later. Besides saving the archive ID, -// you can also index it and give it a friendly name to allow for better searching. -// You can also use the optional archive description field to specify how the -// archive is referred to in an external index of archives, such as you might -// create in Amazon DynamoDB. You can also get the vault inventory to obtain -// a list of archive IDs in a vault. For more information, see InitiateJob. -// -// You must provide a SHA256 tree hash of the data you are uploading. For information -// about computing a SHA256 tree hash, see Computing Checksums (http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html). -// -// You can optionally specify an archive description of up to 1,024 printable -// ASCII characters. You can get the archive description when you either retrieve -// the archive or get the vault inventory. For more information, see InitiateJob. -// Amazon Glacier does not interpret the description in any way. An archive -// description does not need to be unique. You cannot use the description to -// retrieve or sort the archive list. -// -// Archives are immutable. After you upload an archive, you cannot edit the -// archive or its description. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and underlying REST API, see Uploading an Archive -// in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-an-archive.html) -// and Upload Archive (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-post.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation UploadArchive for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeRequestTimeoutException "RequestTimeoutException" -// Returned if, when uploading an archive, Amazon Glacier times out while receiving -// the upload. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) UploadArchive(input *UploadArchiveInput) (*ArchiveCreationOutput, error) { - req, out := c.UploadArchiveRequest(input) - return out, req.Send() -} - -// UploadArchiveWithContext is the same as UploadArchive with the addition of -// the ability to pass a context and additional request options. -// -// See UploadArchive for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) UploadArchiveWithContext(ctx aws.Context, input *UploadArchiveInput, opts ...request.Option) (*ArchiveCreationOutput, error) { - req, out := c.UploadArchiveRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUploadMultipartPart = "UploadMultipartPart" - -// UploadMultipartPartRequest generates a "aws/request.Request" representing the -// client's request for the UploadMultipartPart operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UploadMultipartPart for more information on using the UploadMultipartPart -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UploadMultipartPartRequest method. -// req, resp := client.UploadMultipartPartRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *Glacier) UploadMultipartPartRequest(input *UploadMultipartPartInput) (req *request.Request, output *UploadMultipartPartOutput) { - op := &request.Operation{ - Name: opUploadMultipartPart, - HTTPMethod: "PUT", - HTTPPath: "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}", - } - - if input == nil { - input = &UploadMultipartPartInput{} - } - - output = &UploadMultipartPartOutput{} - req = c.newRequest(op, input, output) - return -} - -// UploadMultipartPart API operation for Amazon Glacier. -// -// This operation uploads a part of an archive. You can upload archive parts -// in any order. You can also upload them in parallel. You can upload up to -// 10,000 parts for a multipart upload. -// -// Amazon Glacier rejects your upload part request if any of the following conditions -// is true: -// -// * SHA256 tree hash does not matchTo ensure that part data is not corrupted -// in transmission, you compute a SHA256 tree hash of the part and include -// it in your request. Upon receiving the part data, Amazon Glacier also -// computes a SHA256 tree hash. If these hash values don't match, the operation -// fails. For information about computing a SHA256 tree hash, see Computing -// Checksums (http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html). -// -// * Part size does not matchThe size of each part except the last must match -// the size specified in the corresponding InitiateMultipartUpload request. -// The size of the last part must be the same size as, or smaller than, the -// specified size. -// -// If you upload a part whose size is smaller than the part size you specified -// in your initiate multipart upload request and that part is not the last -// part, then the upload part request will succeed. However, the subsequent -// Complete Multipart Upload request will fail. -// -// * Range does not alignThe byte range value in the request does not align -// with the part size specified in the corresponding initiate request. For -// example, if you specify a part size of 4194304 bytes (4 MB), then 0 to -// 4194303 bytes (4 MB - 1) and 4194304 (4 MB) to 8388607 (8 MB - 1) are -// valid part ranges. However, if you set a range value of 2 MB to 6 MB, -// the range does not align with the part size and the upload will fail. -// -// -// This operation is idempotent. If you upload the same part multiple times, -// the data included in the most recent request overwrites the previously uploaded -// data. -// -// An AWS account has full permission to perform all operations (actions). However, -// AWS Identity and Access Management (IAM) users don't have any permissions -// by default. You must grant them explicit permission to perform specific actions. -// For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). -// -// For conceptual information and underlying REST API, see Uploading Large Archives -// in Parts (Multipart Upload) (http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html) -// and Upload Part (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-upload-part.html) -// in the Amazon Glacier Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Glacier's -// API operation UploadMultipartPart for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Returned if the specified resource (such as a vault, upload ID, or job ID) -// doesn't exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// Returned if a parameter of the request is incorrectly specified. -// -// * ErrCodeMissingParameterValueException "MissingParameterValueException" -// Returned if a required header or parameter is missing from the request. -// -// * ErrCodeRequestTimeoutException "RequestTimeoutException" -// Returned if, when uploading an archive, Amazon Glacier times out while receiving -// the upload. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returned if the service cannot complete the request. -// -func (c *Glacier) UploadMultipartPart(input *UploadMultipartPartInput) (*UploadMultipartPartOutput, error) { - req, out := c.UploadMultipartPartRequest(input) - return out, req.Send() -} - -// UploadMultipartPartWithContext is the same as UploadMultipartPart with the addition of -// the ability to pass a context and additional request options. -// -// See UploadMultipartPart for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) UploadMultipartPartWithContext(ctx aws.Context, input *UploadMultipartPartInput, opts ...request.Option) (*UploadMultipartPartOutput, error) { - req, out := c.UploadMultipartPartRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Provides options to abort a multipart upload identified by the upload ID. -// -// For information about the underlying REST API, see Abort Multipart Upload -// (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-abort-upload.html). -// For conceptual information, see Working with Archives in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html). -type AbortMultipartUploadInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The upload ID of the multipart upload to delete. - // - // UploadId is a required field - UploadId *string `location:"uri" locationName:"uploadId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s AbortMultipartUploadInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AbortMultipartUploadInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AbortMultipartUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.UploadId == nil { - invalidParams.Add(request.NewErrParamRequired("UploadId")) - } - if s.UploadId != nil && len(*s.UploadId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UploadId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *AbortMultipartUploadInput) SetAccountId(v string) *AbortMultipartUploadInput { - s.AccountId = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput { - s.UploadId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *AbortMultipartUploadInput) SetVaultName(v string) *AbortMultipartUploadInput { - s.VaultName = &v - return s -} - -type AbortMultipartUploadOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AbortMultipartUploadOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AbortMultipartUploadOutput) GoString() string { - return s.String() -} - -// The input values for AbortVaultLock. -type AbortVaultLockInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID. This value must match the AWS - // account ID associated with the credentials used to sign the request. You - // can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you specify your account ID, do - // not include any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s AbortVaultLockInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AbortVaultLockInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AbortVaultLockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AbortVaultLockInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *AbortVaultLockInput) SetAccountId(v string) *AbortVaultLockInput { - s.AccountId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *AbortVaultLockInput) SetVaultName(v string) *AbortVaultLockInput { - s.VaultName = &v - return s -} - -type AbortVaultLockOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AbortVaultLockOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AbortVaultLockOutput) GoString() string { - return s.String() -} - -// The input values for AddTagsToVault. -type AddTagsToVaultInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The tags to add to the vault. Each tag is composed of a key and a value. - // The value can be an empty string. - Tags map[string]*string `type:"map"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s AddTagsToVaultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToVaultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsToVaultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsToVaultInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *AddTagsToVaultInput) SetAccountId(v string) *AddTagsToVaultInput { - s.AccountId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsToVaultInput) SetTags(v map[string]*string) *AddTagsToVaultInput { - s.Tags = v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *AddTagsToVaultInput) SetVaultName(v string) *AddTagsToVaultInput { - s.VaultName = &v - return s -} - -type AddTagsToVaultOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsToVaultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToVaultOutput) GoString() string { - return s.String() -} - -// Contains the Amazon Glacier response to your request. -// -// For information about the underlying REST API, see Upload Archive (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-post.html). -// For conceptual information, see Working with Archives in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html). -type ArchiveCreationOutput struct { - _ struct{} `type:"structure"` - - // The ID of the archive. This value is also included as part of the location. - ArchiveId *string `location:"header" locationName:"x-amz-archive-id" type:"string"` - - // The checksum of the archive computed by Amazon Glacier. - Checksum *string `location:"header" locationName:"x-amz-sha256-tree-hash" type:"string"` - - // The relative URI path of the newly added archive resource. - Location *string `location:"header" locationName:"Location" type:"string"` -} - -// String returns the string representation -func (s ArchiveCreationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ArchiveCreationOutput) GoString() string { - return s.String() -} - -// SetArchiveId sets the ArchiveId field's value. -func (s *ArchiveCreationOutput) SetArchiveId(v string) *ArchiveCreationOutput { - s.ArchiveId = &v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *ArchiveCreationOutput) SetChecksum(v string) *ArchiveCreationOutput { - s.Checksum = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *ArchiveCreationOutput) SetLocation(v string) *ArchiveCreationOutput { - s.Location = &v - return s -} - -// Contains information about the comma-separated value (CSV) file to select -// from. -type CSVInput struct { - _ struct{} `type:"structure"` - - // A single character used to indicate that a row should be ignored when the - // character is present at the start of that row. - Comments *string `type:"string"` - - // A value used to separate individual fields from each other within a record. - FieldDelimiter *string `type:"string"` - - // Describes the first line of input. Valid values are None, Ignore, and Use. - FileHeaderInfo *string `type:"string" enum:"FileHeaderInfo"` - - // A value used as an escape character where the field delimiter is part of - // the value. - QuoteCharacter *string `type:"string"` - - // A single character used for escaping the quotation-mark character inside - // an already escaped value. - QuoteEscapeCharacter *string `type:"string"` - - // A value used to separate individual records from each other. - RecordDelimiter *string `type:"string"` -} - -// String returns the string representation -func (s CSVInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CSVInput) GoString() string { - return s.String() -} - -// SetComments sets the Comments field's value. -func (s *CSVInput) SetComments(v string) *CSVInput { - s.Comments = &v - return s -} - -// SetFieldDelimiter sets the FieldDelimiter field's value. -func (s *CSVInput) SetFieldDelimiter(v string) *CSVInput { - s.FieldDelimiter = &v - return s -} - -// SetFileHeaderInfo sets the FileHeaderInfo field's value. -func (s *CSVInput) SetFileHeaderInfo(v string) *CSVInput { - s.FileHeaderInfo = &v - return s -} - -// SetQuoteCharacter sets the QuoteCharacter field's value. -func (s *CSVInput) SetQuoteCharacter(v string) *CSVInput { - s.QuoteCharacter = &v - return s -} - -// SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value. -func (s *CSVInput) SetQuoteEscapeCharacter(v string) *CSVInput { - s.QuoteEscapeCharacter = &v - return s -} - -// SetRecordDelimiter sets the RecordDelimiter field's value. -func (s *CSVInput) SetRecordDelimiter(v string) *CSVInput { - s.RecordDelimiter = &v - return s -} - -// Contains information about the comma-separated value (CSV) file that the -// job results are stored in. -type CSVOutput struct { - _ struct{} `type:"structure"` - - // A value used to separate individual fields from each other within a record. - FieldDelimiter *string `type:"string"` - - // A value used as an escape character where the field delimiter is part of - // the value. - QuoteCharacter *string `type:"string"` - - // A single character used for escaping the quotation-mark character inside - // an already escaped value. - QuoteEscapeCharacter *string `type:"string"` - - // A value that indicates whether all output fields should be contained within - // quotation marks. - QuoteFields *string `type:"string" enum:"QuoteFields"` - - // A value used to separate individual records from each other. - RecordDelimiter *string `type:"string"` -} - -// String returns the string representation -func (s CSVOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CSVOutput) GoString() string { - return s.String() -} - -// SetFieldDelimiter sets the FieldDelimiter field's value. -func (s *CSVOutput) SetFieldDelimiter(v string) *CSVOutput { - s.FieldDelimiter = &v - return s -} - -// SetQuoteCharacter sets the QuoteCharacter field's value. -func (s *CSVOutput) SetQuoteCharacter(v string) *CSVOutput { - s.QuoteCharacter = &v - return s -} - -// SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value. -func (s *CSVOutput) SetQuoteEscapeCharacter(v string) *CSVOutput { - s.QuoteEscapeCharacter = &v - return s -} - -// SetQuoteFields sets the QuoteFields field's value. -func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput { - s.QuoteFields = &v - return s -} - -// SetRecordDelimiter sets the RecordDelimiter field's value. -func (s *CSVOutput) SetRecordDelimiter(v string) *CSVOutput { - s.RecordDelimiter = &v - return s -} - -// Provides options to complete a multipart upload operation. This informs Amazon -// Glacier that all the archive parts have been uploaded and Amazon Glacier -// can now assemble the archive from the uploaded parts. After assembling and -// saving the archive to the vault, Amazon Glacier returns the URI path of the -// newly created archive resource. -type CompleteMultipartUploadInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The total size, in bytes, of the entire archive. This value should be the - // sum of all the sizes of the individual parts that you uploaded. - ArchiveSize *string `location:"header" locationName:"x-amz-archive-size" type:"string"` - - // The SHA256 tree hash of the entire archive. It is the tree hash of SHA256 - // tree hash of the individual parts. If the value you specify in the request - // does not match the SHA256 tree hash of the final assembled archive as computed - // by Amazon Glacier, Amazon Glacier returns an error and the request fails. - Checksum *string `location:"header" locationName:"x-amz-sha256-tree-hash" type:"string"` - - // The upload ID of the multipart upload. - // - // UploadId is a required field - UploadId *string `location:"uri" locationName:"uploadId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s CompleteMultipartUploadInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CompleteMultipartUploadInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CompleteMultipartUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.UploadId == nil { - invalidParams.Add(request.NewErrParamRequired("UploadId")) - } - if s.UploadId != nil && len(*s.UploadId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UploadId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *CompleteMultipartUploadInput) SetAccountId(v string) *CompleteMultipartUploadInput { - s.AccountId = &v - return s -} - -// SetArchiveSize sets the ArchiveSize field's value. -func (s *CompleteMultipartUploadInput) SetArchiveSize(v string) *CompleteMultipartUploadInput { - s.ArchiveSize = &v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *CompleteMultipartUploadInput) SetChecksum(v string) *CompleteMultipartUploadInput { - s.Checksum = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput { - s.UploadId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *CompleteMultipartUploadInput) SetVaultName(v string) *CompleteMultipartUploadInput { - s.VaultName = &v - return s -} - -// The input values for CompleteVaultLock. -type CompleteVaultLockInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID. This value must match the AWS - // account ID associated with the credentials used to sign the request. You - // can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you specify your account ID, do - // not include any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The lockId value is the lock ID obtained from a InitiateVaultLock request. - // - // LockId is a required field - LockId *string `location:"uri" locationName:"lockId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s CompleteVaultLockInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CompleteVaultLockInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CompleteVaultLockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CompleteVaultLockInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.LockId == nil { - invalidParams.Add(request.NewErrParamRequired("LockId")) - } - if s.LockId != nil && len(*s.LockId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LockId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *CompleteVaultLockInput) SetAccountId(v string) *CompleteVaultLockInput { - s.AccountId = &v - return s -} - -// SetLockId sets the LockId field's value. -func (s *CompleteVaultLockInput) SetLockId(v string) *CompleteVaultLockInput { - s.LockId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *CompleteVaultLockInput) SetVaultName(v string) *CompleteVaultLockInput { - s.VaultName = &v - return s -} - -type CompleteVaultLockOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CompleteVaultLockOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CompleteVaultLockOutput) GoString() string { - return s.String() -} - -// Provides options to create a vault. -type CreateVaultInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID. This value must match the AWS - // account ID associated with the credentials used to sign the request. You - // can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you specify your account ID, do - // not include any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateVaultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVaultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVaultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVaultInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *CreateVaultInput) SetAccountId(v string) *CreateVaultInput { - s.AccountId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *CreateVaultInput) SetVaultName(v string) *CreateVaultInput { - s.VaultName = &v - return s -} - -// Contains the Amazon Glacier response to your request. -type CreateVaultOutput struct { - _ struct{} `type:"structure"` - - // The URI of the vault that was created. - Location *string `location:"header" locationName:"Location" type:"string"` -} - -// String returns the string representation -func (s CreateVaultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVaultOutput) GoString() string { - return s.String() -} - -// SetLocation sets the Location field's value. -func (s *CreateVaultOutput) SetLocation(v string) *CreateVaultOutput { - s.Location = &v - return s -} - -// Data retrieval policy. -type DataRetrievalPolicy struct { - _ struct{} `type:"structure"` - - // The policy rule. Although this is a list type, currently there must be only - // one rule, which contains a Strategy field and optionally a BytesPerHour field. - Rules []*DataRetrievalRule `type:"list"` -} - -// String returns the string representation -func (s DataRetrievalPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DataRetrievalPolicy) GoString() string { - return s.String() -} - -// SetRules sets the Rules field's value. -func (s *DataRetrievalPolicy) SetRules(v []*DataRetrievalRule) *DataRetrievalPolicy { - s.Rules = v - return s -} - -// Data retrieval policy rule. -type DataRetrievalRule struct { - _ struct{} `type:"structure"` - - // The maximum number of bytes that can be retrieved in an hour. - // - // This field is required only if the value of the Strategy field is BytesPerHour. - // Your PUT operation will be rejected if the Strategy field is not set to BytesPerHour - // and you set this field. - BytesPerHour *int64 `type:"long"` - - // The type of data retrieval policy to set. - // - // Valid values: BytesPerHour|FreeTier|None - Strategy *string `type:"string"` -} - -// String returns the string representation -func (s DataRetrievalRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DataRetrievalRule) GoString() string { - return s.String() -} - -// SetBytesPerHour sets the BytesPerHour field's value. -func (s *DataRetrievalRule) SetBytesPerHour(v int64) *DataRetrievalRule { - s.BytesPerHour = &v - return s -} - -// SetStrategy sets the Strategy field's value. -func (s *DataRetrievalRule) SetStrategy(v string) *DataRetrievalRule { - s.Strategy = &v - return s -} - -// Provides options for deleting an archive from an Amazon Glacier vault. -type DeleteArchiveInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The ID of the archive to delete. - // - // ArchiveId is a required field - ArchiveId *string `location:"uri" locationName:"archiveId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteArchiveInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteArchiveInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteArchiveInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteArchiveInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.ArchiveId == nil { - invalidParams.Add(request.NewErrParamRequired("ArchiveId")) - } - if s.ArchiveId != nil && len(*s.ArchiveId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ArchiveId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DeleteArchiveInput) SetAccountId(v string) *DeleteArchiveInput { - s.AccountId = &v - return s -} - -// SetArchiveId sets the ArchiveId field's value. -func (s *DeleteArchiveInput) SetArchiveId(v string) *DeleteArchiveInput { - s.ArchiveId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *DeleteArchiveInput) SetVaultName(v string) *DeleteArchiveInput { - s.VaultName = &v - return s -} - -type DeleteArchiveOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteArchiveOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteArchiveOutput) GoString() string { - return s.String() -} - -// DeleteVaultAccessPolicy input. -type DeleteVaultAccessPolicyInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVaultAccessPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVaultAccessPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVaultAccessPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVaultAccessPolicyInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DeleteVaultAccessPolicyInput) SetAccountId(v string) *DeleteVaultAccessPolicyInput { - s.AccountId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *DeleteVaultAccessPolicyInput) SetVaultName(v string) *DeleteVaultAccessPolicyInput { - s.VaultName = &v - return s -} - -type DeleteVaultAccessPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteVaultAccessPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVaultAccessPolicyOutput) GoString() string { - return s.String() -} - -// Provides options for deleting a vault from Amazon Glacier. -type DeleteVaultInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVaultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVaultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVaultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVaultInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DeleteVaultInput) SetAccountId(v string) *DeleteVaultInput { - s.AccountId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *DeleteVaultInput) SetVaultName(v string) *DeleteVaultInput { - s.VaultName = &v - return s -} - -// Provides options for deleting a vault notification configuration from an -// Amazon Glacier vault. -type DeleteVaultNotificationsInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVaultNotificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVaultNotificationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVaultNotificationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVaultNotificationsInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DeleteVaultNotificationsInput) SetAccountId(v string) *DeleteVaultNotificationsInput { - s.AccountId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *DeleteVaultNotificationsInput) SetVaultName(v string) *DeleteVaultNotificationsInput { - s.VaultName = &v - return s -} - -type DeleteVaultNotificationsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteVaultNotificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVaultNotificationsOutput) GoString() string { - return s.String() -} - -type DeleteVaultOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteVaultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVaultOutput) GoString() string { - return s.String() -} - -// Provides options for retrieving a job description. -type DescribeJobInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The ID of the job to describe. - // - // JobId is a required field - JobId *string `location:"uri" locationName:"jobId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeJobInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DescribeJobInput) SetAccountId(v string) *DescribeJobInput { - s.AccountId = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *DescribeJobInput) SetJobId(v string) *DescribeJobInput { - s.JobId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *DescribeJobInput) SetVaultName(v string) *DescribeJobInput { - s.VaultName = &v - return s -} - -// Provides options for retrieving metadata for a specific vault in Amazon Glacier. -type DescribeVaultInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeVaultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVaultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeVaultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeVaultInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DescribeVaultInput) SetAccountId(v string) *DescribeVaultInput { - s.AccountId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *DescribeVaultInput) SetVaultName(v string) *DescribeVaultInput { - s.VaultName = &v - return s -} - -// Contains the Amazon Glacier response to your request. -type DescribeVaultOutput struct { - _ struct{} `type:"structure"` - - // The Universal Coordinated Time (UTC) date when the vault was created. This - // value should be a string in the ISO 8601 date format, for example 2012-03-20T17:03:43.221Z. - CreationDate *string `type:"string"` - - // The Universal Coordinated Time (UTC) date when Amazon Glacier completed the - // last vault inventory. This value should be a string in the ISO 8601 date - // format, for example 2012-03-20T17:03:43.221Z. - LastInventoryDate *string `type:"string"` - - // The number of archives in the vault as of the last inventory date. This field - // will return null if an inventory has not yet run on the vault, for example - // if you just created the vault. - NumberOfArchives *int64 `type:"long"` - - // Total size, in bytes, of the archives in the vault as of the last inventory - // date. This field will return null if an inventory has not yet run on the - // vault, for example if you just created the vault. - SizeInBytes *int64 `type:"long"` - - // The Amazon Resource Name (ARN) of the vault. - VaultARN *string `type:"string"` - - // The name of the vault. - VaultName *string `type:"string"` -} - -// String returns the string representation -func (s DescribeVaultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVaultOutput) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *DescribeVaultOutput) SetCreationDate(v string) *DescribeVaultOutput { - s.CreationDate = &v - return s -} - -// SetLastInventoryDate sets the LastInventoryDate field's value. -func (s *DescribeVaultOutput) SetLastInventoryDate(v string) *DescribeVaultOutput { - s.LastInventoryDate = &v - return s -} - -// SetNumberOfArchives sets the NumberOfArchives field's value. -func (s *DescribeVaultOutput) SetNumberOfArchives(v int64) *DescribeVaultOutput { - s.NumberOfArchives = &v - return s -} - -// SetSizeInBytes sets the SizeInBytes field's value. -func (s *DescribeVaultOutput) SetSizeInBytes(v int64) *DescribeVaultOutput { - s.SizeInBytes = &v - return s -} - -// SetVaultARN sets the VaultARN field's value. -func (s *DescribeVaultOutput) SetVaultARN(v string) *DescribeVaultOutput { - s.VaultARN = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *DescribeVaultOutput) SetVaultName(v string) *DescribeVaultOutput { - s.VaultName = &v - return s -} - -// Contains information about the encryption used to store the job results in -// Amazon S3. -type Encryption struct { - _ struct{} `type:"structure"` - - // The server-side encryption algorithm used when storing job results in Amazon - // S3, for example AES256 or aws:kms. - EncryptionType *string `type:"string" enum:"EncryptionType"` - - // Optional. If the encryption type is aws:kms, you can use this value to specify - // the encryption context for the job results. - KMSContext *string `type:"string"` - - // The AWS KMS key ID to use for object encryption. All GET and PUT requests - // for an object protected by AWS KMS fail if not made by using Secure Sockets - // Layer (SSL) or Signature Version 4. - KMSKeyId *string `type:"string"` -} - -// String returns the string representation -func (s Encryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Encryption) GoString() string { - return s.String() -} - -// SetEncryptionType sets the EncryptionType field's value. -func (s *Encryption) SetEncryptionType(v string) *Encryption { - s.EncryptionType = &v - return s -} - -// SetKMSContext sets the KMSContext field's value. -func (s *Encryption) SetKMSContext(v string) *Encryption { - s.KMSContext = &v - return s -} - -// SetKMSKeyId sets the KMSKeyId field's value. -func (s *Encryption) SetKMSKeyId(v string) *Encryption { - s.KMSKeyId = &v - return s -} - -// Input for GetDataRetrievalPolicy. -type GetDataRetrievalPolicyInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID. This value must match the AWS - // account ID associated with the credentials used to sign the request. You - // can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you specify your account ID, do - // not include any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDataRetrievalPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDataRetrievalPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDataRetrievalPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDataRetrievalPolicyInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *GetDataRetrievalPolicyInput) SetAccountId(v string) *GetDataRetrievalPolicyInput { - s.AccountId = &v - return s -} - -// Contains the Amazon Glacier response to the GetDataRetrievalPolicy request. -type GetDataRetrievalPolicyOutput struct { - _ struct{} `type:"structure"` - - // Contains the returned data retrieval policy in JSON format. - Policy *DataRetrievalPolicy `type:"structure"` -} - -// String returns the string representation -func (s GetDataRetrievalPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDataRetrievalPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *GetDataRetrievalPolicyOutput) SetPolicy(v *DataRetrievalPolicy) *GetDataRetrievalPolicyOutput { - s.Policy = v - return s -} - -// Provides options for downloading output of an Amazon Glacier job. -type GetJobOutputInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The job ID whose data is downloaded. - // - // JobId is a required field - JobId *string `location:"uri" locationName:"jobId" type:"string" required:"true"` - - // The range of bytes to retrieve from the output. For example, if you want - // to download the first 1,048,576 bytes, specify the range as bytes=0-1048575. - // By default, this operation downloads the entire output. - // - // If the job output is large, then you can use a range to retrieve a portion - // of the output. This allows you to download the entire output in smaller chunks - // of bytes. For example, suppose you have 1 GB of job output you want to download - // and you decide to download 128 MB chunks of data at a time, which is a total - // of eight Get Job Output requests. You use the following process to download - // the job output: - // - // Download a 128 MB chunk of output by specifying the appropriate byte range. - // Verify that all 128 MB of data was received. - // - // Along with the data, the response includes a SHA256 tree hash of the payload. - // You compute the checksum of the payload on the client and compare it with - // the checksum you received in the response to ensure you received all the - // expected data. - // - // Repeat steps 1 and 2 for all the eight 128 MB chunks of output data, each - // time specifying the appropriate byte range. - // - // After downloading all the parts of the job output, you have a list of eight - // checksum values. Compute the tree hash of these values to find the checksum - // of the entire output. Using the DescribeJob API, obtain job information of - // the job that provided you the output. The response includes the checksum - // of the entire archive stored in Amazon Glacier. You compare this value with - // the checksum you computed to ensure you have downloaded the entire archive - // content with no errors. - Range *string `location:"header" locationName:"Range" type:"string"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetJobOutputInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobOutputInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetJobOutputInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetJobOutputInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *GetJobOutputInput) SetAccountId(v string) *GetJobOutputInput { - s.AccountId = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *GetJobOutputInput) SetJobId(v string) *GetJobOutputInput { - s.JobId = &v - return s -} - -// SetRange sets the Range field's value. -func (s *GetJobOutputInput) SetRange(v string) *GetJobOutputInput { - s.Range = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *GetJobOutputInput) SetVaultName(v string) *GetJobOutputInput { - s.VaultName = &v - return s -} - -// Contains the Amazon Glacier response to your request. -type GetJobOutputOutput struct { - _ struct{} `type:"structure" payload:"Body"` - - // Indicates the range units accepted. For more information, see RFC2616 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). - AcceptRanges *string `location:"header" locationName:"Accept-Ranges" type:"string"` - - // The description of an archive. - ArchiveDescription *string `location:"header" locationName:"x-amz-archive-description" type:"string"` - - // The job data, either archive data or inventory data. - Body io.ReadCloser `locationName:"body" type:"blob"` - - // The checksum of the data in the response. This header is returned only when - // retrieving the output for an archive retrieval job. Furthermore, this header - // appears only under the following conditions: - // - // * You get the entire range of the archive. - // - // * You request a range to return of the archive that starts and ends on - // a multiple of 1 MB. For example, if you have an 3.1 MB archive and you - // specify a range to return that starts at 1 MB and ends at 2 MB, then the - // x-amz-sha256-tree-hash is returned as a response header. - // - // * You request a range of the archive to return that starts on a multiple - // of 1 MB and goes to the end of the archive. For example, if you have a - // 3.1 MB archive and you specify a range that starts at 2 MB and ends at - // 3.1 MB (the end of the archive), then the x-amz-sha256-tree-hash is returned - // as a response header. - Checksum *string `location:"header" locationName:"x-amz-sha256-tree-hash" type:"string"` - - // The range of bytes returned by Amazon Glacier. If only partial output is - // downloaded, the response provides the range of bytes Amazon Glacier returned. - // For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB. - ContentRange *string `location:"header" locationName:"Content-Range" type:"string"` - - // The Content-Type depends on whether the job output is an archive or a vault - // inventory. For archive data, the Content-Type is application/octet-stream. - // For vault inventory, if you requested CSV format when you initiated the job, - // the Content-Type is text/csv. Otherwise, by default, vault inventory is returned - // as JSON, and the Content-Type is application/json. - ContentType *string `location:"header" locationName:"Content-Type" type:"string"` - - // The HTTP response code for a job output request. The value depends on whether - // a range was specified in the request. - Status *int64 `location:"statusCode" locationName:"status" type:"integer"` -} - -// String returns the string representation -func (s GetJobOutputOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobOutputOutput) GoString() string { - return s.String() -} - -// SetAcceptRanges sets the AcceptRanges field's value. -func (s *GetJobOutputOutput) SetAcceptRanges(v string) *GetJobOutputOutput { - s.AcceptRanges = &v - return s -} - -// SetArchiveDescription sets the ArchiveDescription field's value. -func (s *GetJobOutputOutput) SetArchiveDescription(v string) *GetJobOutputOutput { - s.ArchiveDescription = &v - return s -} - -// SetBody sets the Body field's value. -func (s *GetJobOutputOutput) SetBody(v io.ReadCloser) *GetJobOutputOutput { - s.Body = v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *GetJobOutputOutput) SetChecksum(v string) *GetJobOutputOutput { - s.Checksum = &v - return s -} - -// SetContentRange sets the ContentRange field's value. -func (s *GetJobOutputOutput) SetContentRange(v string) *GetJobOutputOutput { - s.ContentRange = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *GetJobOutputOutput) SetContentType(v string) *GetJobOutputOutput { - s.ContentType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetJobOutputOutput) SetStatus(v int64) *GetJobOutputOutput { - s.Status = &v - return s -} - -// Input for GetVaultAccessPolicy. -type GetVaultAccessPolicyInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetVaultAccessPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetVaultAccessPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetVaultAccessPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetVaultAccessPolicyInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *GetVaultAccessPolicyInput) SetAccountId(v string) *GetVaultAccessPolicyInput { - s.AccountId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *GetVaultAccessPolicyInput) SetVaultName(v string) *GetVaultAccessPolicyInput { - s.VaultName = &v - return s -} - -// Output for GetVaultAccessPolicy. -type GetVaultAccessPolicyOutput struct { - _ struct{} `type:"structure" payload:"Policy"` - - // Contains the returned vault access policy as a JSON string. - Policy *VaultAccessPolicy `locationName:"policy" type:"structure"` -} - -// String returns the string representation -func (s GetVaultAccessPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetVaultAccessPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *GetVaultAccessPolicyOutput) SetPolicy(v *VaultAccessPolicy) *GetVaultAccessPolicyOutput { - s.Policy = v - return s -} - -// The input values for GetVaultLock. -type GetVaultLockInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetVaultLockInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetVaultLockInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetVaultLockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetVaultLockInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *GetVaultLockInput) SetAccountId(v string) *GetVaultLockInput { - s.AccountId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *GetVaultLockInput) SetVaultName(v string) *GetVaultLockInput { - s.VaultName = &v - return s -} - -// Contains the Amazon Glacier response to your request. -type GetVaultLockOutput struct { - _ struct{} `type:"structure"` - - // The UTC date and time at which the vault lock was put into the InProgress - // state. - CreationDate *string `type:"string"` - - // The UTC date and time at which the lock ID expires. This value can be null - // if the vault lock is in a Locked state. - ExpirationDate *string `type:"string"` - - // The vault lock policy as a JSON string, which uses "\" as an escape character. - Policy *string `type:"string"` - - // The state of the vault lock. InProgress or Locked. - State *string `type:"string"` -} - -// String returns the string representation -func (s GetVaultLockOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetVaultLockOutput) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *GetVaultLockOutput) SetCreationDate(v string) *GetVaultLockOutput { - s.CreationDate = &v - return s -} - -// SetExpirationDate sets the ExpirationDate field's value. -func (s *GetVaultLockOutput) SetExpirationDate(v string) *GetVaultLockOutput { - s.ExpirationDate = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *GetVaultLockOutput) SetPolicy(v string) *GetVaultLockOutput { - s.Policy = &v - return s -} - -// SetState sets the State field's value. -func (s *GetVaultLockOutput) SetState(v string) *GetVaultLockOutput { - s.State = &v - return s -} - -// Provides options for retrieving the notification configuration set on an -// Amazon Glacier vault. -type GetVaultNotificationsInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetVaultNotificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetVaultNotificationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetVaultNotificationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetVaultNotificationsInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *GetVaultNotificationsInput) SetAccountId(v string) *GetVaultNotificationsInput { - s.AccountId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *GetVaultNotificationsInput) SetVaultName(v string) *GetVaultNotificationsInput { - s.VaultName = &v - return s -} - -// Contains the Amazon Glacier response to your request. -type GetVaultNotificationsOutput struct { - _ struct{} `type:"structure" payload:"VaultNotificationConfig"` - - // Returns the notification configuration set on the vault. - VaultNotificationConfig *VaultNotificationConfig `locationName:"vaultNotificationConfig" type:"structure"` -} - -// String returns the string representation -func (s GetVaultNotificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetVaultNotificationsOutput) GoString() string { - return s.String() -} - -// SetVaultNotificationConfig sets the VaultNotificationConfig field's value. -func (s *GetVaultNotificationsOutput) SetVaultNotificationConfig(v *VaultNotificationConfig) *GetVaultNotificationsOutput { - s.VaultNotificationConfig = v - return s -} - -// Contains information about a grant. -type Grant struct { - _ struct{} `type:"structure"` - - // The grantee. - Grantee *Grantee `type:"structure"` - - // Specifies the permission given to the grantee. - Permission *string `type:"string" enum:"Permission"` -} - -// String returns the string representation -func (s Grant) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Grant) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Grant) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Grant"} - if s.Grantee != nil { - if err := s.Grantee.Validate(); err != nil { - invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGrantee sets the Grantee field's value. -func (s *Grant) SetGrantee(v *Grantee) *Grant { - s.Grantee = v - return s -} - -// SetPermission sets the Permission field's value. -func (s *Grant) SetPermission(v string) *Grant { - s.Permission = &v - return s -} - -// Contains information about the grantee. -type Grantee struct { - _ struct{} `type:"structure"` - - // Screen name of the grantee. - DisplayName *string `type:"string"` - - // Email address of the grantee. - EmailAddress *string `type:"string"` - - // The canonical user ID of the grantee. - ID *string `type:"string"` - - // Type of grantee - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"Type"` - - // URI of the grantee group. - URI *string `type:"string"` -} - -// String returns the string representation -func (s Grantee) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Grantee) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Grantee) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Grantee"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDisplayName sets the DisplayName field's value. -func (s *Grantee) SetDisplayName(v string) *Grantee { - s.DisplayName = &v - return s -} - -// SetEmailAddress sets the EmailAddress field's value. -func (s *Grantee) SetEmailAddress(v string) *Grantee { - s.EmailAddress = &v - return s -} - -// SetID sets the ID field's value. -func (s *Grantee) SetID(v string) *Grantee { - s.ID = &v - return s -} - -// SetType sets the Type field's value. -func (s *Grantee) SetType(v string) *Grantee { - s.Type = &v - return s -} - -// SetURI sets the URI field's value. -func (s *Grantee) SetURI(v string) *Grantee { - s.URI = &v - return s -} - -// Provides options for initiating an Amazon Glacier job. -type InitiateJobInput struct { - _ struct{} `type:"structure" payload:"JobParameters"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // Provides options for specifying job information. - JobParameters *JobParameters `locationName:"jobParameters" type:"structure"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s InitiateJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InitiateJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InitiateJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InitiateJobInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - if s.JobParameters != nil { - if err := s.JobParameters.Validate(); err != nil { - invalidParams.AddNested("JobParameters", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *InitiateJobInput) SetAccountId(v string) *InitiateJobInput { - s.AccountId = &v - return s -} - -// SetJobParameters sets the JobParameters field's value. -func (s *InitiateJobInput) SetJobParameters(v *JobParameters) *InitiateJobInput { - s.JobParameters = v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *InitiateJobInput) SetVaultName(v string) *InitiateJobInput { - s.VaultName = &v - return s -} - -// Contains the Amazon Glacier response to your request. -type InitiateJobOutput struct { - _ struct{} `type:"structure"` - - // The ID of the job. - JobId *string `location:"header" locationName:"x-amz-job-id" type:"string"` - - // The path to the location of where the select results are stored. - JobOutputPath *string `location:"header" locationName:"x-amz-job-output-path" type:"string"` - - // The relative URI path of the job. - Location *string `location:"header" locationName:"Location" type:"string"` -} - -// String returns the string representation -func (s InitiateJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InitiateJobOutput) GoString() string { - return s.String() -} - -// SetJobId sets the JobId field's value. -func (s *InitiateJobOutput) SetJobId(v string) *InitiateJobOutput { - s.JobId = &v - return s -} - -// SetJobOutputPath sets the JobOutputPath field's value. -func (s *InitiateJobOutput) SetJobOutputPath(v string) *InitiateJobOutput { - s.JobOutputPath = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *InitiateJobOutput) SetLocation(v string) *InitiateJobOutput { - s.Location = &v - return s -} - -// Provides options for initiating a multipart upload to an Amazon Glacier vault. -type InitiateMultipartUploadInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The archive description that you are uploading in parts. - // - // The part size must be a megabyte (1024 KB) multiplied by a power of 2, for - // example 1048576 (1 MB), 2097152 (2 MB), 4194304 (4 MB), 8388608 (8 MB), and - // so on. The minimum allowable part size is 1 MB, and the maximum is 4 GB (4096 - // MB). - ArchiveDescription *string `location:"header" locationName:"x-amz-archive-description" type:"string"` - - // The size of each part except the last, in bytes. The last part can be smaller - // than this part size. - PartSize *string `location:"header" locationName:"x-amz-part-size" type:"string"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s InitiateMultipartUploadInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InitiateMultipartUploadInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InitiateMultipartUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InitiateMultipartUploadInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *InitiateMultipartUploadInput) SetAccountId(v string) *InitiateMultipartUploadInput { - s.AccountId = &v - return s -} - -// SetArchiveDescription sets the ArchiveDescription field's value. -func (s *InitiateMultipartUploadInput) SetArchiveDescription(v string) *InitiateMultipartUploadInput { - s.ArchiveDescription = &v - return s -} - -// SetPartSize sets the PartSize field's value. -func (s *InitiateMultipartUploadInput) SetPartSize(v string) *InitiateMultipartUploadInput { - s.PartSize = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *InitiateMultipartUploadInput) SetVaultName(v string) *InitiateMultipartUploadInput { - s.VaultName = &v - return s -} - -// The Amazon Glacier response to your request. -type InitiateMultipartUploadOutput struct { - _ struct{} `type:"structure"` - - // The relative URI path of the multipart upload ID Amazon Glacier created. - Location *string `location:"header" locationName:"Location" type:"string"` - - // The ID of the multipart upload. This value is also included as part of the - // location. - UploadId *string `location:"header" locationName:"x-amz-multipart-upload-id" type:"string"` -} - -// String returns the string representation -func (s InitiateMultipartUploadOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InitiateMultipartUploadOutput) GoString() string { - return s.String() -} - -// SetLocation sets the Location field's value. -func (s *InitiateMultipartUploadOutput) SetLocation(v string) *InitiateMultipartUploadOutput { - s.Location = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *InitiateMultipartUploadOutput) SetUploadId(v string) *InitiateMultipartUploadOutput { - s.UploadId = &v - return s -} - -// The input values for InitiateVaultLock. -type InitiateVaultLockInput struct { - _ struct{} `type:"structure" payload:"Policy"` - - // The AccountId value is the AWS account ID. This value must match the AWS - // account ID associated with the credentials used to sign the request. You - // can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you specify your account ID, do - // not include any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The vault lock policy as a JSON string, which uses "\" as an escape character. - Policy *VaultLockPolicy `locationName:"policy" type:"structure"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s InitiateVaultLockInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InitiateVaultLockInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InitiateVaultLockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InitiateVaultLockInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *InitiateVaultLockInput) SetAccountId(v string) *InitiateVaultLockInput { - s.AccountId = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *InitiateVaultLockInput) SetPolicy(v *VaultLockPolicy) *InitiateVaultLockInput { - s.Policy = v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *InitiateVaultLockInput) SetVaultName(v string) *InitiateVaultLockInput { - s.VaultName = &v - return s -} - -// Contains the Amazon Glacier response to your request. -type InitiateVaultLockOutput struct { - _ struct{} `type:"structure"` - - // The lock ID, which is used to complete the vault locking process. - LockId *string `location:"header" locationName:"x-amz-lock-id" type:"string"` -} - -// String returns the string representation -func (s InitiateVaultLockOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InitiateVaultLockOutput) GoString() string { - return s.String() -} - -// SetLockId sets the LockId field's value. -func (s *InitiateVaultLockOutput) SetLockId(v string) *InitiateVaultLockOutput { - s.LockId = &v - return s -} - -// Describes how the archive is serialized. -type InputSerialization struct { - _ struct{} `type:"structure"` - - // Describes the serialization of a CSV-encoded object. - Csv *CSVInput `locationName:"csv" type:"structure"` -} - -// String returns the string representation -func (s InputSerialization) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputSerialization) GoString() string { - return s.String() -} - -// SetCsv sets the Csv field's value. -func (s *InputSerialization) SetCsv(v *CSVInput) *InputSerialization { - s.Csv = v - return s -} - -// Describes the options for a range inventory retrieval job. -type InventoryRetrievalJobDescription struct { - _ struct{} `type:"structure"` - - // The end of the date range in UTC for vault inventory retrieval that includes - // archives created before this date. This value should be a string in the ISO - // 8601 date format, for example 2013-03-20T17:03:43Z. - EndDate *string `type:"string"` - - // The output format for the vault inventory list, which is set by the InitiateJob - // request when initiating a job to retrieve a vault inventory. Valid values - // are CSV and JSON. - Format *string `type:"string"` - - // The maximum number of inventory items returned per vault inventory retrieval - // request. This limit is set when initiating the job with the a InitiateJob - // request. - Limit *string `type:"string"` - - // An opaque string that represents where to continue pagination of the vault - // inventory retrieval results. You use the marker in a new InitiateJob request - // to obtain additional inventory items. If there are no more inventory items, - // this value is null. For more information, see Range Inventory Retrieval - // (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html#api-initiate-job-post-vault-inventory-list-filtering). - Marker *string `type:"string"` - - // The start of the date range in Universal Coordinated Time (UTC) for vault - // inventory retrieval that includes archives created on or after this date. - // This value should be a string in the ISO 8601 date format, for example 2013-03-20T17:03:43Z. - StartDate *string `type:"string"` -} - -// String returns the string representation -func (s InventoryRetrievalJobDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InventoryRetrievalJobDescription) GoString() string { - return s.String() -} - -// SetEndDate sets the EndDate field's value. -func (s *InventoryRetrievalJobDescription) SetEndDate(v string) *InventoryRetrievalJobDescription { - s.EndDate = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *InventoryRetrievalJobDescription) SetFormat(v string) *InventoryRetrievalJobDescription { - s.Format = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *InventoryRetrievalJobDescription) SetLimit(v string) *InventoryRetrievalJobDescription { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *InventoryRetrievalJobDescription) SetMarker(v string) *InventoryRetrievalJobDescription { - s.Marker = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *InventoryRetrievalJobDescription) SetStartDate(v string) *InventoryRetrievalJobDescription { - s.StartDate = &v - return s -} - -// Provides options for specifying a range inventory retrieval job. -type InventoryRetrievalJobInput struct { - _ struct{} `type:"structure"` - - // The end of the date range in UTC for vault inventory retrieval that includes - // archives created before this date. This value should be a string in the ISO - // 8601 date format, for example 2013-03-20T17:03:43Z. - EndDate *string `type:"string"` - - // Specifies the maximum number of inventory items returned per vault inventory - // retrieval request. Valid values are greater than or equal to 1. - Limit *string `type:"string"` - - // An opaque string that represents where to continue pagination of the vault - // inventory retrieval results. You use the marker in a new InitiateJob request - // to obtain additional inventory items. If there are no more inventory items, - // this value is null. - Marker *string `type:"string"` - - // The start of the date range in UTC for vault inventory retrieval that includes - // archives created on or after this date. This value should be a string in - // the ISO 8601 date format, for example 2013-03-20T17:03:43Z. - StartDate *string `type:"string"` -} - -// String returns the string representation -func (s InventoryRetrievalJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InventoryRetrievalJobInput) GoString() string { - return s.String() -} - -// SetEndDate sets the EndDate field's value. -func (s *InventoryRetrievalJobInput) SetEndDate(v string) *InventoryRetrievalJobInput { - s.EndDate = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *InventoryRetrievalJobInput) SetLimit(v string) *InventoryRetrievalJobInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *InventoryRetrievalJobInput) SetMarker(v string) *InventoryRetrievalJobInput { - s.Marker = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *InventoryRetrievalJobInput) SetStartDate(v string) *InventoryRetrievalJobInput { - s.StartDate = &v - return s -} - -// Contains the description of an Amazon Glacier job. -type JobDescription struct { - _ struct{} `type:"structure"` - - // The job type. This value is either ArchiveRetrieval, InventoryRetrieval, - // or Select. - Action *string `type:"string" enum:"ActionCode"` - - // The archive ID requested for a select job or archive retrieval. Otherwise, - // this field is null. - ArchiveId *string `type:"string"` - - // The SHA256 tree hash of the entire archive for an archive retrieval. For - // inventory retrieval or select jobs, this field is null. - ArchiveSHA256TreeHash *string `type:"string"` - - // For an archive retrieval job, this value is the size in bytes of the archive - // being requested for download. For an inventory retrieval or select job, this - // value is null. - ArchiveSizeInBytes *int64 `type:"long"` - - // The job status. When a job is completed, you get the job's output using Get - // Job Output (GET output). - Completed *bool `type:"boolean"` - - // The UTC time that the job request completed. While the job is in progress, - // the value is null. - CompletionDate *string `type:"string"` - - // The UTC date when the job was created. This value is a string representation - // of ISO 8601 date format, for example "2012-03-20T17:03:43.221Z". - CreationDate *string `type:"string"` - - // Parameters used for range inventory retrieval. - InventoryRetrievalParameters *InventoryRetrievalJobDescription `type:"structure"` - - // For an inventory retrieval job, this value is the size in bytes of the inventory - // requested for download. For an archive retrieval or select job, this value - // is null. - InventorySizeInBytes *int64 `type:"long"` - - // The job description provided when initiating the job. - JobDescription *string `type:"string"` - - // An opaque string that identifies an Amazon Glacier job. - JobId *string `type:"string"` - - // Contains the job output location. - JobOutputPath *string `type:"string"` - - // Contains the location where the data from the select job is stored. - OutputLocation *OutputLocation `type:"structure"` - - // The retrieved byte range for archive retrieval jobs in the form StartByteValue-EndByteValue. - // If no range was specified in the archive retrieval, then the whole archive - // is retrieved. In this case, StartByteValue equals 0 and EndByteValue equals - // the size of the archive minus 1. For inventory retrieval or select jobs, - // this field is null. - RetrievalByteRange *string `type:"string"` - - // For an archive retrieval job, this value is the checksum of the archive. - // Otherwise, this value is null. - // - // The SHA256 tree hash value for the requested range of an archive. If the - // InitiateJob request for an archive specified a tree-hash aligned range, then - // this field returns a value. - // - // If the whole archive is retrieved, this value is the same as the ArchiveSHA256TreeHash - // value. - // - // This field is null for the following: - // - // * Archive retrieval jobs that specify a range that is not tree-hash aligned - // - // * Archival jobs that specify a range that is equal to the whole archive, - // when the job status is InProgress - // - // * Inventory jobs - // - // * Select jobs - SHA256TreeHash *string `type:"string"` - - // An Amazon SNS topic that receives notification. - SNSTopic *string `type:"string"` - - // Contains the parameters used for a select. - SelectParameters *SelectParameters `type:"structure"` - - // The status code can be InProgress, Succeeded, or Failed, and indicates the - // status of the job. - StatusCode *string `type:"string" enum:"StatusCode"` - - // A friendly message that describes the job status. - StatusMessage *string `type:"string"` - - // The tier to use for a select or an archive retrieval. Valid values are Expedited, - // Standard, or Bulk. Standard is the default. - Tier *string `type:"string"` - - // The Amazon Resource Name (ARN) of the vault from which an archive retrieval - // was requested. - VaultARN *string `type:"string"` -} - -// String returns the string representation -func (s JobDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobDescription) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *JobDescription) SetAction(v string) *JobDescription { - s.Action = &v - return s -} - -// SetArchiveId sets the ArchiveId field's value. -func (s *JobDescription) SetArchiveId(v string) *JobDescription { - s.ArchiveId = &v - return s -} - -// SetArchiveSHA256TreeHash sets the ArchiveSHA256TreeHash field's value. -func (s *JobDescription) SetArchiveSHA256TreeHash(v string) *JobDescription { - s.ArchiveSHA256TreeHash = &v - return s -} - -// SetArchiveSizeInBytes sets the ArchiveSizeInBytes field's value. -func (s *JobDescription) SetArchiveSizeInBytes(v int64) *JobDescription { - s.ArchiveSizeInBytes = &v - return s -} - -// SetCompleted sets the Completed field's value. -func (s *JobDescription) SetCompleted(v bool) *JobDescription { - s.Completed = &v - return s -} - -// SetCompletionDate sets the CompletionDate field's value. -func (s *JobDescription) SetCompletionDate(v string) *JobDescription { - s.CompletionDate = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *JobDescription) SetCreationDate(v string) *JobDescription { - s.CreationDate = &v - return s -} - -// SetInventoryRetrievalParameters sets the InventoryRetrievalParameters field's value. -func (s *JobDescription) SetInventoryRetrievalParameters(v *InventoryRetrievalJobDescription) *JobDescription { - s.InventoryRetrievalParameters = v - return s -} - -// SetInventorySizeInBytes sets the InventorySizeInBytes field's value. -func (s *JobDescription) SetInventorySizeInBytes(v int64) *JobDescription { - s.InventorySizeInBytes = &v - return s -} - -// SetJobDescription sets the JobDescription field's value. -func (s *JobDescription) SetJobDescription(v string) *JobDescription { - s.JobDescription = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *JobDescription) SetJobId(v string) *JobDescription { - s.JobId = &v - return s -} - -// SetJobOutputPath sets the JobOutputPath field's value. -func (s *JobDescription) SetJobOutputPath(v string) *JobDescription { - s.JobOutputPath = &v - return s -} - -// SetOutputLocation sets the OutputLocation field's value. -func (s *JobDescription) SetOutputLocation(v *OutputLocation) *JobDescription { - s.OutputLocation = v - return s -} - -// SetRetrievalByteRange sets the RetrievalByteRange field's value. -func (s *JobDescription) SetRetrievalByteRange(v string) *JobDescription { - s.RetrievalByteRange = &v - return s -} - -// SetSHA256TreeHash sets the SHA256TreeHash field's value. -func (s *JobDescription) SetSHA256TreeHash(v string) *JobDescription { - s.SHA256TreeHash = &v - return s -} - -// SetSNSTopic sets the SNSTopic field's value. -func (s *JobDescription) SetSNSTopic(v string) *JobDescription { - s.SNSTopic = &v - return s -} - -// SetSelectParameters sets the SelectParameters field's value. -func (s *JobDescription) SetSelectParameters(v *SelectParameters) *JobDescription { - s.SelectParameters = v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *JobDescription) SetStatusCode(v string) *JobDescription { - s.StatusCode = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *JobDescription) SetStatusMessage(v string) *JobDescription { - s.StatusMessage = &v - return s -} - -// SetTier sets the Tier field's value. -func (s *JobDescription) SetTier(v string) *JobDescription { - s.Tier = &v - return s -} - -// SetVaultARN sets the VaultARN field's value. -func (s *JobDescription) SetVaultARN(v string) *JobDescription { - s.VaultARN = &v - return s -} - -// Provides options for defining a job. -type JobParameters struct { - _ struct{} `type:"structure"` - - // The ID of the archive that you want to retrieve. This field is required only - // if Type is set to select or archive-retrievalcode>. An error occurs if you - // specify this request parameter for an inventory retrieval job request. - ArchiveId *string `type:"string"` - - // The optional description for the job. The description must be less than or - // equal to 1,024 bytes. The allowable characters are 7-bit ASCII without control - // codes-specifically, ASCII values 32-126 decimal or 0x20-0x7E hexadecimal. - Description *string `type:"string"` - - // When initiating a job to retrieve a vault inventory, you can optionally add - // this parameter to your request to specify the output format. If you are initiating - // an inventory job and do not specify a Format field, JSON is the default format. - // Valid values are "CSV" and "JSON". - Format *string `type:"string"` - - // Input parameters used for range inventory retrieval. - InventoryRetrievalParameters *InventoryRetrievalJobInput `type:"structure"` - - // Contains information about the location where the select job results are - // stored. - OutputLocation *OutputLocation `type:"structure"` - - // The byte range to retrieve for an archive retrieval. in the form "StartByteValue-EndByteValue" - // If not specified, the whole archive is retrieved. If specified, the byte - // range must be megabyte (1024*1024) aligned which means that StartByteValue - // must be divisible by 1 MB and EndByteValue plus 1 must be divisible by 1 - // MB or be the end of the archive specified as the archive byte size value - // minus 1. If RetrievalByteRange is not megabyte aligned, this operation returns - // a 400 response. - // - // An error occurs if you specify this field for an inventory retrieval job - // request. - RetrievalByteRange *string `type:"string"` - - // The Amazon SNS topic ARN to which Amazon Glacier sends a notification when - // the job is completed and the output is ready for you to download. The specified - // topic publishes the notification to its subscribers. The SNS topic must exist. - SNSTopic *string `type:"string"` - - // Contains the parameters that define a job. - SelectParameters *SelectParameters `type:"structure"` - - // The tier to use for a select or an archive retrieval job. Valid values are - // Expedited, Standard, or Bulk. Standard is the default. - Tier *string `type:"string"` - - // The job type. You can initiate a job to perform a select query on an archive, - // retrieve an archive, or get an inventory of a vault. Valid values are "select", - // "archive-retrieval" and "inventory-retrieval". - Type *string `type:"string"` -} - -// String returns the string representation -func (s JobParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *JobParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "JobParameters"} - if s.OutputLocation != nil { - if err := s.OutputLocation.Validate(); err != nil { - invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArchiveId sets the ArchiveId field's value. -func (s *JobParameters) SetArchiveId(v string) *JobParameters { - s.ArchiveId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *JobParameters) SetDescription(v string) *JobParameters { - s.Description = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *JobParameters) SetFormat(v string) *JobParameters { - s.Format = &v - return s -} - -// SetInventoryRetrievalParameters sets the InventoryRetrievalParameters field's value. -func (s *JobParameters) SetInventoryRetrievalParameters(v *InventoryRetrievalJobInput) *JobParameters { - s.InventoryRetrievalParameters = v - return s -} - -// SetOutputLocation sets the OutputLocation field's value. -func (s *JobParameters) SetOutputLocation(v *OutputLocation) *JobParameters { - s.OutputLocation = v - return s -} - -// SetRetrievalByteRange sets the RetrievalByteRange field's value. -func (s *JobParameters) SetRetrievalByteRange(v string) *JobParameters { - s.RetrievalByteRange = &v - return s -} - -// SetSNSTopic sets the SNSTopic field's value. -func (s *JobParameters) SetSNSTopic(v string) *JobParameters { - s.SNSTopic = &v - return s -} - -// SetSelectParameters sets the SelectParameters field's value. -func (s *JobParameters) SetSelectParameters(v *SelectParameters) *JobParameters { - s.SelectParameters = v - return s -} - -// SetTier sets the Tier field's value. -func (s *JobParameters) SetTier(v string) *JobParameters { - s.Tier = &v - return s -} - -// SetType sets the Type field's value. -func (s *JobParameters) SetType(v string) *JobParameters { - s.Type = &v - return s -} - -// Provides options for retrieving a job list for an Amazon Glacier vault. -type ListJobsInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The state of the jobs to return. You can specify true or false. - Completed *string `location:"querystring" locationName:"completed" type:"string"` - - // The maximum number of jobs to be returned. The default limit is 50. The number - // of jobs returned might be fewer than the specified limit, but the number - // of returned jobs never exceeds the limit. - Limit *string `location:"querystring" locationName:"limit" type:"string"` - - // An opaque string used for pagination. This value specifies the job at which - // the listing of jobs should begin. Get the marker value from a previous List - // Jobs response. You only need to include the marker if you are continuing - // the pagination of results started in a previous List Jobs request. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The type of job status to return. You can specify the following values: InProgress, - // Succeeded, or Failed. - Statuscode *string `location:"querystring" locationName:"statuscode" type:"string"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListJobsInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *ListJobsInput) SetAccountId(v string) *ListJobsInput { - s.AccountId = &v - return s -} - -// SetCompleted sets the Completed field's value. -func (s *ListJobsInput) SetCompleted(v string) *ListJobsInput { - s.Completed = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListJobsInput) SetLimit(v string) *ListJobsInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListJobsInput) SetMarker(v string) *ListJobsInput { - s.Marker = &v - return s -} - -// SetStatuscode sets the Statuscode field's value. -func (s *ListJobsInput) SetStatuscode(v string) *ListJobsInput { - s.Statuscode = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *ListJobsInput) SetVaultName(v string) *ListJobsInput { - s.VaultName = &v - return s -} - -// Contains the Amazon Glacier response to your request. -type ListJobsOutput struct { - _ struct{} `type:"structure"` - - // A list of job objects. Each job object contains metadata describing the job. - JobList []*JobDescription `type:"list"` - - // An opaque string used for pagination that specifies the job at which the - // listing of jobs should begin. You get the marker value from a previous List - // Jobs response. You only need to include the marker if you are continuing - // the pagination of the results started in a previous List Jobs request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s ListJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobsOutput) GoString() string { - return s.String() -} - -// SetJobList sets the JobList field's value. -func (s *ListJobsOutput) SetJobList(v []*JobDescription) *ListJobsOutput { - s.JobList = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListJobsOutput) SetMarker(v string) *ListJobsOutput { - s.Marker = &v - return s -} - -// Provides options for retrieving list of in-progress multipart uploads for -// an Amazon Glacier vault. -type ListMultipartUploadsInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // Specifies the maximum number of uploads returned in the response body. If - // this value is not specified, the List Uploads operation returns up to 50 - // uploads. - Limit *string `location:"querystring" locationName:"limit" type:"string"` - - // An opaque string used for pagination. This value specifies the upload at - // which the listing of uploads should begin. Get the marker value from a previous - // List Uploads response. You need only include the marker if you are continuing - // the pagination of results started in a previous List Uploads request. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListMultipartUploadsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListMultipartUploadsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListMultipartUploadsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *ListMultipartUploadsInput) SetAccountId(v string) *ListMultipartUploadsInput { - s.AccountId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListMultipartUploadsInput) SetLimit(v string) *ListMultipartUploadsInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListMultipartUploadsInput) SetMarker(v string) *ListMultipartUploadsInput { - s.Marker = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *ListMultipartUploadsInput) SetVaultName(v string) *ListMultipartUploadsInput { - s.VaultName = &v - return s -} - -// Contains the Amazon Glacier response to your request. -type ListMultipartUploadsOutput struct { - _ struct{} `type:"structure"` - - // An opaque string that represents where to continue pagination of the results. - // You use the marker in a new List Multipart Uploads request to obtain more - // uploads in the list. If there are no more uploads, this value is null. - Marker *string `type:"string"` - - // A list of in-progress multipart uploads. - UploadsList []*UploadListElement `type:"list"` -} - -// String returns the string representation -func (s ListMultipartUploadsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListMultipartUploadsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListMultipartUploadsOutput) SetMarker(v string) *ListMultipartUploadsOutput { - s.Marker = &v - return s -} - -// SetUploadsList sets the UploadsList field's value. -func (s *ListMultipartUploadsOutput) SetUploadsList(v []*UploadListElement) *ListMultipartUploadsOutput { - s.UploadsList = v - return s -} - -// Provides options for retrieving a list of parts of an archive that have been -// uploaded in a specific multipart upload. -type ListPartsInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The maximum number of parts to be returned. The default limit is 50. The - // number of parts returned might be fewer than the specified limit, but the - // number of returned parts never exceeds the limit. - Limit *string `location:"querystring" locationName:"limit" type:"string"` - - // An opaque string used for pagination. This value specifies the part at which - // the listing of parts should begin. Get the marker value from the response - // of a previous List Parts response. You need only include the marker if you - // are continuing the pagination of results started in a previous List Parts - // request. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The upload ID of the multipart upload. - // - // UploadId is a required field - UploadId *string `location:"uri" locationName:"uploadId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListPartsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPartsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPartsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.UploadId == nil { - invalidParams.Add(request.NewErrParamRequired("UploadId")) - } - if s.UploadId != nil && len(*s.UploadId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UploadId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *ListPartsInput) SetAccountId(v string) *ListPartsInput { - s.AccountId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListPartsInput) SetLimit(v string) *ListPartsInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPartsInput) SetMarker(v string) *ListPartsInput { - s.Marker = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput { - s.UploadId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *ListPartsInput) SetVaultName(v string) *ListPartsInput { - s.VaultName = &v - return s -} - -// Contains the Amazon Glacier response to your request. -type ListPartsOutput struct { - _ struct{} `type:"structure"` - - // The description of the archive that was specified in the Initiate Multipart - // Upload request. - ArchiveDescription *string `type:"string"` - - // The UTC time at which the multipart upload was initiated. - CreationDate *string `type:"string"` - - // An opaque string that represents where to continue pagination of the results. - // You use the marker in a new List Parts request to obtain more jobs in the - // list. If there are no more parts, this value is null. - Marker *string `type:"string"` - - // The ID of the upload to which the parts are associated. - MultipartUploadId *string `type:"string"` - - // The part size in bytes. This is the same value that you specified in the - // Initiate Multipart Upload request. - PartSizeInBytes *int64 `type:"long"` - - // A list of the part sizes of the multipart upload. Each object in the array - // contains a RangeBytes and sha256-tree-hash name/value pair. - Parts []*PartListElement `type:"list"` - - // The Amazon Resource Name (ARN) of the vault to which the multipart upload - // was initiated. - VaultARN *string `type:"string"` -} - -// String returns the string representation -func (s ListPartsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPartsOutput) GoString() string { - return s.String() -} - -// SetArchiveDescription sets the ArchiveDescription field's value. -func (s *ListPartsOutput) SetArchiveDescription(v string) *ListPartsOutput { - s.ArchiveDescription = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *ListPartsOutput) SetCreationDate(v string) *ListPartsOutput { - s.CreationDate = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPartsOutput) SetMarker(v string) *ListPartsOutput { - s.Marker = &v - return s -} - -// SetMultipartUploadId sets the MultipartUploadId field's value. -func (s *ListPartsOutput) SetMultipartUploadId(v string) *ListPartsOutput { - s.MultipartUploadId = &v - return s -} - -// SetPartSizeInBytes sets the PartSizeInBytes field's value. -func (s *ListPartsOutput) SetPartSizeInBytes(v int64) *ListPartsOutput { - s.PartSizeInBytes = &v - return s -} - -// SetParts sets the Parts field's value. -func (s *ListPartsOutput) SetParts(v []*PartListElement) *ListPartsOutput { - s.Parts = v - return s -} - -// SetVaultARN sets the VaultARN field's value. -func (s *ListPartsOutput) SetVaultARN(v string) *ListPartsOutput { - s.VaultARN = &v - return s -} - -type ListProvisionedCapacityInput struct { - _ struct{} `type:"structure"` - - // The AWS account ID of the account that owns the vault. You can either specify - // an AWS account ID or optionally a single '-' (hyphen), in which case Amazon - // Glacier uses the AWS account ID associated with the credentials used to sign - // the request. If you use an account ID, don't include any hyphens ('-') in - // the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListProvisionedCapacityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListProvisionedCapacityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListProvisionedCapacityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListProvisionedCapacityInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *ListProvisionedCapacityInput) SetAccountId(v string) *ListProvisionedCapacityInput { - s.AccountId = &v - return s -} - -type ListProvisionedCapacityOutput struct { - _ struct{} `type:"structure"` - - // The response body contains the following JSON fields. - ProvisionedCapacityList []*ProvisionedCapacityDescription `type:"list"` -} - -// String returns the string representation -func (s ListProvisionedCapacityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListProvisionedCapacityOutput) GoString() string { - return s.String() -} - -// SetProvisionedCapacityList sets the ProvisionedCapacityList field's value. -func (s *ListProvisionedCapacityOutput) SetProvisionedCapacityList(v []*ProvisionedCapacityDescription) *ListProvisionedCapacityOutput { - s.ProvisionedCapacityList = v - return s -} - -// The input value for ListTagsForVaultInput. -type ListTagsForVaultInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsForVaultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForVaultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForVaultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForVaultInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *ListTagsForVaultInput) SetAccountId(v string) *ListTagsForVaultInput { - s.AccountId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *ListTagsForVaultInput) SetVaultName(v string) *ListTagsForVaultInput { - s.VaultName = &v - return s -} - -// Contains the Amazon Glacier response to your request. -type ListTagsForVaultOutput struct { - _ struct{} `type:"structure"` - - // The tags attached to the vault. Each tag is composed of a key and a value. - Tags map[string]*string `type:"map"` -} - -// String returns the string representation -func (s ListTagsForVaultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForVaultOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForVaultOutput) SetTags(v map[string]*string) *ListTagsForVaultOutput { - s.Tags = v - return s -} - -// Provides options to retrieve the vault list owned by the calling user's account. -// The list provides metadata information for each vault. -type ListVaultsInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID. This value must match the AWS - // account ID associated with the credentials used to sign the request. You - // can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you specify your account ID, do - // not include any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The maximum number of vaults to be returned. The default limit is 10. The - // number of vaults returned might be fewer than the specified limit, but the - // number of returned vaults never exceeds the limit. - Limit *string `location:"querystring" locationName:"limit" type:"string"` - - // A string used for pagination. The marker specifies the vault ARN after which - // the listing of vaults should begin. - Marker *string `location:"querystring" locationName:"marker" type:"string"` -} - -// String returns the string representation -func (s ListVaultsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVaultsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListVaultsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListVaultsInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *ListVaultsInput) SetAccountId(v string) *ListVaultsInput { - s.AccountId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListVaultsInput) SetLimit(v string) *ListVaultsInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListVaultsInput) SetMarker(v string) *ListVaultsInput { - s.Marker = &v - return s -} - -// Contains the Amazon Glacier response to your request. -type ListVaultsOutput struct { - _ struct{} `type:"structure"` - - // The vault ARN at which to continue pagination of the results. You use the - // marker in another List Vaults request to obtain more vaults in the list. - Marker *string `type:"string"` - - // List of vaults. - VaultList []*DescribeVaultOutput `type:"list"` -} - -// String returns the string representation -func (s ListVaultsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVaultsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListVaultsOutput) SetMarker(v string) *ListVaultsOutput { - s.Marker = &v - return s -} - -// SetVaultList sets the VaultList field's value. -func (s *ListVaultsOutput) SetVaultList(v []*DescribeVaultOutput) *ListVaultsOutput { - s.VaultList = v - return s -} - -// Contains information about the location where the select job results are -// stored. -type OutputLocation struct { - _ struct{} `type:"structure"` - - // Describes an S3 location that will receive the results of the job request. - S3 *S3Location `type:"structure"` -} - -// String returns the string representation -func (s OutputLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputLocation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OutputLocation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OutputLocation"} - if s.S3 != nil { - if err := s.S3.Validate(); err != nil { - invalidParams.AddNested("S3", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3 sets the S3 field's value. -func (s *OutputLocation) SetS3(v *S3Location) *OutputLocation { - s.S3 = v - return s -} - -// Describes how the select output is serialized. -type OutputSerialization struct { - _ struct{} `type:"structure"` - - // Describes the serialization of CSV-encoded query results. - Csv *CSVOutput `locationName:"csv" type:"structure"` -} - -// String returns the string representation -func (s OutputSerialization) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputSerialization) GoString() string { - return s.String() -} - -// SetCsv sets the Csv field's value. -func (s *OutputSerialization) SetCsv(v *CSVOutput) *OutputSerialization { - s.Csv = v - return s -} - -// A list of the part sizes of the multipart upload. -type PartListElement struct { - _ struct{} `type:"structure"` - - // The byte range of a part, inclusive of the upper value of the range. - RangeInBytes *string `type:"string"` - - // The SHA256 tree hash value that Amazon Glacier calculated for the part. This - // field is never null. - SHA256TreeHash *string `type:"string"` -} - -// String returns the string representation -func (s PartListElement) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PartListElement) GoString() string { - return s.String() -} - -// SetRangeInBytes sets the RangeInBytes field's value. -func (s *PartListElement) SetRangeInBytes(v string) *PartListElement { - s.RangeInBytes = &v - return s -} - -// SetSHA256TreeHash sets the SHA256TreeHash field's value. -func (s *PartListElement) SetSHA256TreeHash(v string) *PartListElement { - s.SHA256TreeHash = &v - return s -} - -// The definition for a provisioned capacity unit. -type ProvisionedCapacityDescription struct { - _ struct{} `type:"structure"` - - // The ID that identifies the provisioned capacity unit. - CapacityId *string `type:"string"` - - // The date that the provisioned capacity unit expires, in Universal Coordinated - // Time (UTC). - ExpirationDate *string `type:"string"` - - // The date that the provisioned capacity unit was purchased, in Universal Coordinated - // Time (UTC). - StartDate *string `type:"string"` -} - -// String returns the string representation -func (s ProvisionedCapacityDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisionedCapacityDescription) GoString() string { - return s.String() -} - -// SetCapacityId sets the CapacityId field's value. -func (s *ProvisionedCapacityDescription) SetCapacityId(v string) *ProvisionedCapacityDescription { - s.CapacityId = &v - return s -} - -// SetExpirationDate sets the ExpirationDate field's value. -func (s *ProvisionedCapacityDescription) SetExpirationDate(v string) *ProvisionedCapacityDescription { - s.ExpirationDate = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *ProvisionedCapacityDescription) SetStartDate(v string) *ProvisionedCapacityDescription { - s.StartDate = &v - return s -} - -type PurchaseProvisionedCapacityInput struct { - _ struct{} `type:"structure"` - - // The AWS account ID of the account that owns the vault. You can either specify - // an AWS account ID or optionally a single '-' (hyphen), in which case Amazon - // Glacier uses the AWS account ID associated with the credentials used to sign - // the request. If you use an account ID, don't include any hyphens ('-') in - // the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` -} - -// String returns the string representation -func (s PurchaseProvisionedCapacityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseProvisionedCapacityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseProvisionedCapacityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseProvisionedCapacityInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *PurchaseProvisionedCapacityInput) SetAccountId(v string) *PurchaseProvisionedCapacityInput { - s.AccountId = &v - return s -} - -type PurchaseProvisionedCapacityOutput struct { - _ struct{} `type:"structure"` - - // The ID that identifies the provisioned capacity unit. - CapacityId *string `location:"header" locationName:"x-amz-capacity-id" type:"string"` -} - -// String returns the string representation -func (s PurchaseProvisionedCapacityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseProvisionedCapacityOutput) GoString() string { - return s.String() -} - -// SetCapacityId sets the CapacityId field's value. -func (s *PurchaseProvisionedCapacityOutput) SetCapacityId(v string) *PurchaseProvisionedCapacityOutput { - s.CapacityId = &v - return s -} - -// The input value for RemoveTagsFromVaultInput. -type RemoveTagsFromVaultInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // A list of tag keys. Each corresponding tag is removed from the vault. - TagKeys []*string `type:"list"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsFromVaultInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromVaultInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsFromVaultInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromVaultInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *RemoveTagsFromVaultInput) SetAccountId(v string) *RemoveTagsFromVaultInput { - s.AccountId = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsFromVaultInput) SetTagKeys(v []*string) *RemoveTagsFromVaultInput { - s.TagKeys = v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *RemoveTagsFromVaultInput) SetVaultName(v string) *RemoveTagsFromVaultInput { - s.VaultName = &v - return s -} - -type RemoveTagsFromVaultOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsFromVaultOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromVaultOutput) GoString() string { - return s.String() -} - -// Contains information about the location in Amazon S3 where the select job -// results are stored. -type S3Location struct { - _ struct{} `type:"structure"` - - // A list of grants that control access to the staged results. - AccessControlList []*Grant `type:"list"` - - // The name of the Amazon S3 bucket where the job results are stored. - BucketName *string `type:"string"` - - // The canned access control list (ACL) to apply to the job results. - CannedACL *string `type:"string" enum:"CannedACL"` - - // Contains information about the encryption used to store the job results in - // Amazon S3. - Encryption *Encryption `type:"structure"` - - // The prefix that is prepended to the results for this request. - Prefix *string `type:"string"` - - // The storage class used to store the job results. - StorageClass *string `type:"string" enum:"StorageClass"` - - // The tag-set that is applied to the job results. - Tagging map[string]*string `type:"map"` - - // A map of metadata to store with the job results in Amazon S3. - UserMetadata map[string]*string `type:"map"` -} - -// String returns the string representation -func (s S3Location) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Location) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3Location) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3Location"} - if s.AccessControlList != nil { - for i, v := range s.AccessControlList { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccessControlList", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessControlList sets the AccessControlList field's value. -func (s *S3Location) SetAccessControlList(v []*Grant) *S3Location { - s.AccessControlList = v - return s -} - -// SetBucketName sets the BucketName field's value. -func (s *S3Location) SetBucketName(v string) *S3Location { - s.BucketName = &v - return s -} - -// SetCannedACL sets the CannedACL field's value. -func (s *S3Location) SetCannedACL(v string) *S3Location { - s.CannedACL = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *S3Location) SetEncryption(v *Encryption) *S3Location { - s.Encryption = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *S3Location) SetPrefix(v string) *S3Location { - s.Prefix = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *S3Location) SetStorageClass(v string) *S3Location { - s.StorageClass = &v - return s -} - -// SetTagging sets the Tagging field's value. -func (s *S3Location) SetTagging(v map[string]*string) *S3Location { - s.Tagging = v - return s -} - -// SetUserMetadata sets the UserMetadata field's value. -func (s *S3Location) SetUserMetadata(v map[string]*string) *S3Location { - s.UserMetadata = v - return s -} - -// Contains information about the parameters used for a select. -type SelectParameters struct { - _ struct{} `type:"structure"` - - // The expression that is used to select the object. - Expression *string `type:"string"` - - // The type of the provided expression, for example SQL. - ExpressionType *string `type:"string" enum:"ExpressionType"` - - // Describes the serialization format of the object. - InputSerialization *InputSerialization `type:"structure"` - - // Describes how the results of the select job are serialized. - OutputSerialization *OutputSerialization `type:"structure"` -} - -// String returns the string representation -func (s SelectParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SelectParameters) GoString() string { - return s.String() -} - -// SetExpression sets the Expression field's value. -func (s *SelectParameters) SetExpression(v string) *SelectParameters { - s.Expression = &v - return s -} - -// SetExpressionType sets the ExpressionType field's value. -func (s *SelectParameters) SetExpressionType(v string) *SelectParameters { - s.ExpressionType = &v - return s -} - -// SetInputSerialization sets the InputSerialization field's value. -func (s *SelectParameters) SetInputSerialization(v *InputSerialization) *SelectParameters { - s.InputSerialization = v - return s -} - -// SetOutputSerialization sets the OutputSerialization field's value. -func (s *SelectParameters) SetOutputSerialization(v *OutputSerialization) *SelectParameters { - s.OutputSerialization = v - return s -} - -// SetDataRetrievalPolicy input. -type SetDataRetrievalPolicyInput struct { - _ struct{} `type:"structure"` - - // The AccountId value is the AWS account ID. This value must match the AWS - // account ID associated with the credentials used to sign the request. You - // can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you specify your account ID, do - // not include any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The data retrieval policy in JSON format. - Policy *DataRetrievalPolicy `type:"structure"` -} - -// String returns the string representation -func (s SetDataRetrievalPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetDataRetrievalPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetDataRetrievalPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetDataRetrievalPolicyInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *SetDataRetrievalPolicyInput) SetAccountId(v string) *SetDataRetrievalPolicyInput { - s.AccountId = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *SetDataRetrievalPolicyInput) SetPolicy(v *DataRetrievalPolicy) *SetDataRetrievalPolicyInput { - s.Policy = v - return s -} - -type SetDataRetrievalPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetDataRetrievalPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetDataRetrievalPolicyOutput) GoString() string { - return s.String() -} - -// SetVaultAccessPolicy input. -type SetVaultAccessPolicyInput struct { - _ struct{} `type:"structure" payload:"Policy"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The vault access policy as a JSON string. - Policy *VaultAccessPolicy `locationName:"policy" type:"structure"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s SetVaultAccessPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetVaultAccessPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetVaultAccessPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetVaultAccessPolicyInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *SetVaultAccessPolicyInput) SetAccountId(v string) *SetVaultAccessPolicyInput { - s.AccountId = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *SetVaultAccessPolicyInput) SetPolicy(v *VaultAccessPolicy) *SetVaultAccessPolicyInput { - s.Policy = v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *SetVaultAccessPolicyInput) SetVaultName(v string) *SetVaultAccessPolicyInput { - s.VaultName = &v - return s -} - -type SetVaultAccessPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetVaultAccessPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetVaultAccessPolicyOutput) GoString() string { - return s.String() -} - -// Provides options to configure notifications that will be sent when specific -// events happen to a vault. -type SetVaultNotificationsInput struct { - _ struct{} `type:"structure" payload:"VaultNotificationConfig"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` - - // Provides options for specifying notification configuration. - VaultNotificationConfig *VaultNotificationConfig `locationName:"vaultNotificationConfig" type:"structure"` -} - -// String returns the string representation -func (s SetVaultNotificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetVaultNotificationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetVaultNotificationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetVaultNotificationsInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *SetVaultNotificationsInput) SetAccountId(v string) *SetVaultNotificationsInput { - s.AccountId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *SetVaultNotificationsInput) SetVaultName(v string) *SetVaultNotificationsInput { - s.VaultName = &v - return s -} - -// SetVaultNotificationConfig sets the VaultNotificationConfig field's value. -func (s *SetVaultNotificationsInput) SetVaultNotificationConfig(v *VaultNotificationConfig) *SetVaultNotificationsInput { - s.VaultNotificationConfig = v - return s -} - -type SetVaultNotificationsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetVaultNotificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetVaultNotificationsOutput) GoString() string { - return s.String() -} - -// Provides options to add an archive to a vault. -type UploadArchiveInput struct { - _ struct{} `type:"structure" payload:"Body"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The optional description of the archive you are uploading. - ArchiveDescription *string `location:"header" locationName:"x-amz-archive-description" type:"string"` - - // The data to upload. - Body io.ReadSeeker `locationName:"body" type:"blob"` - - // The SHA256 tree hash of the data being uploaded. - Checksum *string `location:"header" locationName:"x-amz-sha256-tree-hash" type:"string"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s UploadArchiveInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UploadArchiveInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UploadArchiveInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UploadArchiveInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *UploadArchiveInput) SetAccountId(v string) *UploadArchiveInput { - s.AccountId = &v - return s -} - -// SetArchiveDescription sets the ArchiveDescription field's value. -func (s *UploadArchiveInput) SetArchiveDescription(v string) *UploadArchiveInput { - s.ArchiveDescription = &v - return s -} - -// SetBody sets the Body field's value. -func (s *UploadArchiveInput) SetBody(v io.ReadSeeker) *UploadArchiveInput { - s.Body = v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *UploadArchiveInput) SetChecksum(v string) *UploadArchiveInput { - s.Checksum = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *UploadArchiveInput) SetVaultName(v string) *UploadArchiveInput { - s.VaultName = &v - return s -} - -// A list of in-progress multipart uploads for a vault. -type UploadListElement struct { - _ struct{} `type:"structure"` - - // The description of the archive that was specified in the Initiate Multipart - // Upload request. - ArchiveDescription *string `type:"string"` - - // The UTC time at which the multipart upload was initiated. - CreationDate *string `type:"string"` - - // The ID of a multipart upload. - MultipartUploadId *string `type:"string"` - - // The part size, in bytes, specified in the Initiate Multipart Upload request. - // This is the size of all the parts in the upload except the last part, which - // may be smaller than this size. - PartSizeInBytes *int64 `type:"long"` - - // The Amazon Resource Name (ARN) of the vault that contains the archive. - VaultARN *string `type:"string"` -} - -// String returns the string representation -func (s UploadListElement) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UploadListElement) GoString() string { - return s.String() -} - -// SetArchiveDescription sets the ArchiveDescription field's value. -func (s *UploadListElement) SetArchiveDescription(v string) *UploadListElement { - s.ArchiveDescription = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *UploadListElement) SetCreationDate(v string) *UploadListElement { - s.CreationDate = &v - return s -} - -// SetMultipartUploadId sets the MultipartUploadId field's value. -func (s *UploadListElement) SetMultipartUploadId(v string) *UploadListElement { - s.MultipartUploadId = &v - return s -} - -// SetPartSizeInBytes sets the PartSizeInBytes field's value. -func (s *UploadListElement) SetPartSizeInBytes(v int64) *UploadListElement { - s.PartSizeInBytes = &v - return s -} - -// SetVaultARN sets the VaultARN field's value. -func (s *UploadListElement) SetVaultARN(v string) *UploadListElement { - s.VaultARN = &v - return s -} - -// Provides options to upload a part of an archive in a multipart upload operation. -type UploadMultipartPartInput struct { - _ struct{} `type:"structure" payload:"Body"` - - // The AccountId value is the AWS account ID of the account that owns the vault. - // You can either specify an AWS account ID or optionally a single '-' (hyphen), - // in which case Amazon Glacier uses the AWS account ID associated with the - // credentials used to sign the request. If you use an account ID, do not include - // any hyphens ('-') in the ID. - // - // AccountId is a required field - AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"` - - // The data to upload. - Body io.ReadSeeker `locationName:"body" type:"blob"` - - // The SHA256 tree hash of the data being uploaded. - Checksum *string `location:"header" locationName:"x-amz-sha256-tree-hash" type:"string"` - - // Identifies the range of bytes in the assembled archive that will be uploaded - // in this part. Amazon Glacier uses this information to assemble the archive - // in the proper sequence. The format of this header follows RFC 2616. An example - // header is Content-Range:bytes 0-4194303/*. - Range *string `location:"header" locationName:"Content-Range" type:"string"` - - // The upload ID of the multipart upload. - // - // UploadId is a required field - UploadId *string `location:"uri" locationName:"uploadId" type:"string" required:"true"` - - // The name of the vault. - // - // VaultName is a required field - VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"` -} - -// String returns the string representation -func (s UploadMultipartPartInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UploadMultipartPartInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UploadMultipartPartInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UploadMultipartPartInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.UploadId == nil { - invalidParams.Add(request.NewErrParamRequired("UploadId")) - } - if s.UploadId != nil && len(*s.UploadId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UploadId", 1)) - } - if s.VaultName == nil { - invalidParams.Add(request.NewErrParamRequired("VaultName")) - } - if s.VaultName != nil && len(*s.VaultName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *UploadMultipartPartInput) SetAccountId(v string) *UploadMultipartPartInput { - s.AccountId = &v - return s -} - -// SetBody sets the Body field's value. -func (s *UploadMultipartPartInput) SetBody(v io.ReadSeeker) *UploadMultipartPartInput { - s.Body = v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *UploadMultipartPartInput) SetChecksum(v string) *UploadMultipartPartInput { - s.Checksum = &v - return s -} - -// SetRange sets the Range field's value. -func (s *UploadMultipartPartInput) SetRange(v string) *UploadMultipartPartInput { - s.Range = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *UploadMultipartPartInput) SetUploadId(v string) *UploadMultipartPartInput { - s.UploadId = &v - return s -} - -// SetVaultName sets the VaultName field's value. -func (s *UploadMultipartPartInput) SetVaultName(v string) *UploadMultipartPartInput { - s.VaultName = &v - return s -} - -// Contains the Amazon Glacier response to your request. -type UploadMultipartPartOutput struct { - _ struct{} `type:"structure"` - - // The SHA256 tree hash that Amazon Glacier computed for the uploaded part. - Checksum *string `location:"header" locationName:"x-amz-sha256-tree-hash" type:"string"` -} - -// String returns the string representation -func (s UploadMultipartPartOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UploadMultipartPartOutput) GoString() string { - return s.String() -} - -// SetChecksum sets the Checksum field's value. -func (s *UploadMultipartPartOutput) SetChecksum(v string) *UploadMultipartPartOutput { - s.Checksum = &v - return s -} - -// Contains the vault access policy. -type VaultAccessPolicy struct { - _ struct{} `type:"structure"` - - // The vault access policy. - Policy *string `type:"string"` -} - -// String returns the string representation -func (s VaultAccessPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VaultAccessPolicy) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *VaultAccessPolicy) SetPolicy(v string) *VaultAccessPolicy { - s.Policy = &v - return s -} - -// Contains the vault lock policy. -type VaultLockPolicy struct { - _ struct{} `type:"structure"` - - // The vault lock policy. - Policy *string `type:"string"` -} - -// String returns the string representation -func (s VaultLockPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VaultLockPolicy) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *VaultLockPolicy) SetPolicy(v string) *VaultLockPolicy { - s.Policy = &v - return s -} - -// Represents a vault's notification configuration. -type VaultNotificationConfig struct { - _ struct{} `type:"structure"` - - // A list of one or more events for which Amazon Glacier will send a notification - // to the specified Amazon SNS topic. - Events []*string `type:"list"` - - // The Amazon Simple Notification Service (Amazon SNS) topic Amazon Resource - // Name (ARN). - SNSTopic *string `type:"string"` -} - -// String returns the string representation -func (s VaultNotificationConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VaultNotificationConfig) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *VaultNotificationConfig) SetEvents(v []*string) *VaultNotificationConfig { - s.Events = v - return s -} - -// SetSNSTopic sets the SNSTopic field's value. -func (s *VaultNotificationConfig) SetSNSTopic(v string) *VaultNotificationConfig { - s.SNSTopic = &v - return s -} - -const ( - // ActionCodeArchiveRetrieval is a ActionCode enum value - ActionCodeArchiveRetrieval = "ArchiveRetrieval" - - // ActionCodeInventoryRetrieval is a ActionCode enum value - ActionCodeInventoryRetrieval = "InventoryRetrieval" - - // ActionCodeSelect is a ActionCode enum value - ActionCodeSelect = "Select" -) - -const ( - // CannedACLPrivate is a CannedACL enum value - CannedACLPrivate = "private" - - // CannedACLPublicRead is a CannedACL enum value - CannedACLPublicRead = "public-read" - - // CannedACLPublicReadWrite is a CannedACL enum value - CannedACLPublicReadWrite = "public-read-write" - - // CannedACLAwsExecRead is a CannedACL enum value - CannedACLAwsExecRead = "aws-exec-read" - - // CannedACLAuthenticatedRead is a CannedACL enum value - CannedACLAuthenticatedRead = "authenticated-read" - - // CannedACLBucketOwnerRead is a CannedACL enum value - CannedACLBucketOwnerRead = "bucket-owner-read" - - // CannedACLBucketOwnerFullControl is a CannedACL enum value - CannedACLBucketOwnerFullControl = "bucket-owner-full-control" -) - -const ( - // EncryptionTypeAwsKms is a EncryptionType enum value - EncryptionTypeAwsKms = "aws:kms" - - // EncryptionTypeAes256 is a EncryptionType enum value - EncryptionTypeAes256 = "AES256" -) - -const ( - // ExpressionTypeSql is a ExpressionType enum value - ExpressionTypeSql = "SQL" -) - -const ( - // FileHeaderInfoUse is a FileHeaderInfo enum value - FileHeaderInfoUse = "USE" - - // FileHeaderInfoIgnore is a FileHeaderInfo enum value - FileHeaderInfoIgnore = "IGNORE" - - // FileHeaderInfoNone is a FileHeaderInfo enum value - FileHeaderInfoNone = "NONE" -) - -const ( - // PermissionFullControl is a Permission enum value - PermissionFullControl = "FULL_CONTROL" - - // PermissionWrite is a Permission enum value - PermissionWrite = "WRITE" - - // PermissionWriteAcp is a Permission enum value - PermissionWriteAcp = "WRITE_ACP" - - // PermissionRead is a Permission enum value - PermissionRead = "READ" - - // PermissionReadAcp is a Permission enum value - PermissionReadAcp = "READ_ACP" -) - -const ( - // QuoteFieldsAlways is a QuoteFields enum value - QuoteFieldsAlways = "ALWAYS" - - // QuoteFieldsAsneeded is a QuoteFields enum value - QuoteFieldsAsneeded = "ASNEEDED" -) - -const ( - // StatusCodeInProgress is a StatusCode enum value - StatusCodeInProgress = "InProgress" - - // StatusCodeSucceeded is a StatusCode enum value - StatusCodeSucceeded = "Succeeded" - - // StatusCodeFailed is a StatusCode enum value - StatusCodeFailed = "Failed" -) - -const ( - // StorageClassStandard is a StorageClass enum value - StorageClassStandard = "STANDARD" - - // StorageClassReducedRedundancy is a StorageClass enum value - StorageClassReducedRedundancy = "REDUCED_REDUNDANCY" - - // StorageClassStandardIa is a StorageClass enum value - StorageClassStandardIa = "STANDARD_IA" -) - -const ( - // TypeAmazonCustomerByEmail is a Type enum value - TypeAmazonCustomerByEmail = "AmazonCustomerByEmail" - - // TypeCanonicalUser is a Type enum value - TypeCanonicalUser = "CanonicalUser" - - // TypeGroup is a Type enum value - TypeGroup = "Group" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/customizations.go deleted file mode 100644 index 613606019..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/customizations.go +++ /dev/null @@ -1,54 +0,0 @@ -package glacier - -import ( - "encoding/hex" - "reflect" - - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" -) - -var ( - defaultAccountID = "-" -) - -func init() { - initRequest = func(r *request.Request) { - r.Handlers.Validate.PushFront(addAccountID) - r.Handlers.Validate.PushFront(copyParams) // this happens first - r.Handlers.Build.PushBack(addChecksum) - r.Handlers.Build.PushBack(addAPIVersion) - } -} - -func copyParams(r *request.Request) { - r.Params = awsutil.CopyOf(r.Params) -} - -func addAccountID(r *request.Request) { - if !r.ParamsFilled() { - return - } - - v := reflect.Indirect(reflect.ValueOf(r.Params)) - if f := v.FieldByName("AccountId"); f.IsNil() { - f.Set(reflect.ValueOf(&defaultAccountID)) - } -} - -func addChecksum(r *request.Request) { - if r.Body == nil || r.HTTPRequest.Header.Get("X-Amz-Sha256-Tree-Hash") != "" { - return - } - - h := ComputeHashes(r.Body) - hstr := hex.EncodeToString(h.TreeHash) - r.HTTPRequest.Header.Set("X-Amz-Sha256-Tree-Hash", hstr) - - hLstr := hex.EncodeToString(h.LinearHash) - r.HTTPRequest.Header.Set("X-Amz-Content-Sha256", hLstr) -} - -func addAPIVersion(r *request.Request) { - r.HTTPRequest.Header.Set("X-Amz-Glacier-Version", r.ClientInfo.APIVersion) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/doc.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/doc.go deleted file mode 100644 index 80c74d848..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/doc.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package glacier provides the client and types for making API -// requests to Amazon Glacier. -// -// Amazon Glacier is a storage solution for "cold data." -// -// Amazon Glacier is an extremely low-cost storage service that provides secure, -// durable, and easy-to-use storage for data backup and archival. With Amazon -// Glacier, customers can store their data cost effectively for months, years, -// or decades. Amazon Glacier also enables customers to offload the administrative -// burdens of operating and scaling storage to AWS, so they don't have to worry -// about capacity planning, hardware provisioning, data replication, hardware -// failure and recovery, or time-consuming hardware migrations. -// -// Amazon Glacier is a great storage choice when low storage cost is paramount -// and your data is rarely retrieved. If your application requires fast or frequent -// access to your data, consider using Amazon S3. For more information, see -// Amazon Simple Storage Service (Amazon S3) (http://aws.amazon.com/s3/). -// -// You can store any kind of data in any format. There is no maximum limit on -// the total amount of data you can store in Amazon Glacier. -// -// If you are a first-time user of Amazon Glacier, we recommend that you begin -// by reading the following sections in the Amazon Glacier Developer Guide: -// -// * What is Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/introduction.html) -// - This section of the Developer Guide describes the underlying data model, -// the operations it supports, and the AWS SDKs that you can use to interact -// with the service. -// -// * Getting Started with Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/amazon-glacier-getting-started.html) -// - The Getting Started section walks you through the process of creating -// a vault, uploading archives, creating jobs to download archives, retrieving -// the job output, and deleting archives. -// -// See glacier package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/glacier/ -// -// Using the Client -// -// To contact Amazon Glacier with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Glacier client Glacier for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/glacier/#New -package glacier diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/errors.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/errors.go deleted file mode 100644 index c47e3bb30..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/errors.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package glacier - -const ( - - // ErrCodeInsufficientCapacityException for service response error code - // "InsufficientCapacityException". - // - // Returned if there is insufficient capacity to process this expedited request. - // This error only applies to expedited retrievals and not to standard or bulk - // retrievals. - ErrCodeInsufficientCapacityException = "InsufficientCapacityException" - - // ErrCodeInvalidParameterValueException for service response error code - // "InvalidParameterValueException". - // - // Returned if a parameter of the request is incorrectly specified. - ErrCodeInvalidParameterValueException = "InvalidParameterValueException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // Returned if the request results in a vault or account limit being exceeded. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeMissingParameterValueException for service response error code - // "MissingParameterValueException". - // - // Returned if a required header or parameter is missing from the request. - ErrCodeMissingParameterValueException = "MissingParameterValueException" - - // ErrCodePolicyEnforcedException for service response error code - // "PolicyEnforcedException". - // - // Returned if a retrieval job would exceed the current data policy's retrieval - // rate limit. For more information about data retrieval policies, - ErrCodePolicyEnforcedException = "PolicyEnforcedException" - - // ErrCodeRequestTimeoutException for service response error code - // "RequestTimeoutException". - // - // Returned if, when uploading an archive, Amazon Glacier times out while receiving - // the upload. - ErrCodeRequestTimeoutException = "RequestTimeoutException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // Returned if the specified resource (such as a vault, upload ID, or job ID) - // doesn't exist. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeServiceUnavailableException for service response error code - // "ServiceUnavailableException". - // - // Returned if the service cannot complete the request. - ErrCodeServiceUnavailableException = "ServiceUnavailableException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/service.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/service.go deleted file mode 100644 index 85e6e367b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package glacier - -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" -) - -// Glacier provides the API operation methods for making requests to -// Amazon Glacier. See this package's package overview docs -// for details on the service. -// -// Glacier methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Glacier 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 = "glacier" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Glacier" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Glacier client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Glacier client from just a session. -// svc := glacier.New(mySession) -// -// // Create a Glacier client with additional configuration -// svc := glacier.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Glacier { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Glacier { - svc := &Glacier{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2012-06-01", - }, - 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 Glacier operation and runs any -// custom request initialization. -func (c *Glacier) 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/glacier/treehash.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/treehash.go deleted file mode 100644 index 1d7534fbd..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/treehash.go +++ /dev/null @@ -1,79 +0,0 @@ -package glacier - -import ( - "crypto/sha256" - "io" - - "github.com/aws/aws-sdk-go/internal/sdkio" -) - -const bufsize = 1024 * 1024 - -// Hash contains information about the tree-hash and linear hash of a -// Glacier payload. This structure is generated by ComputeHashes(). -type Hash struct { - TreeHash []byte - LinearHash []byte -} - -// ComputeHashes computes the tree-hash and linear hash of a seekable reader r. -// -// See http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html for more information. -func ComputeHashes(r io.ReadSeeker) Hash { - start, _ := r.Seek(0, sdkio.SeekCurrent) // Read the whole stream - defer r.Seek(start, sdkio.SeekStart) // Rewind stream at end - - buf := make([]byte, bufsize) - hashes := [][]byte{} - hsh := sha256.New() - - for { - // Build leaf nodes in 1MB chunks - n, err := io.ReadAtLeast(r, buf, bufsize) - if n == 0 { - break - } - - tmpHash := sha256.Sum256(buf[:n]) - hashes = append(hashes, tmpHash[:]) - hsh.Write(buf[:n]) // Track linear hash while we're at it - - if err != nil { - break // This is the last chunk - } - } - - return Hash{ - LinearHash: hsh.Sum(nil), - TreeHash: ComputeTreeHash(hashes), - } -} - -// ComputeTreeHash builds a tree hash root node given a slice of -// hashes. Glacier tree hash to be derived from SHA256 hashes of 1MB -// chucks of the data. -// -// See http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html for more information. -func ComputeTreeHash(hashes [][]byte) []byte { - if hashes == nil || len(hashes) == 0 { - return nil - } - - for len(hashes) > 1 { - tmpHashes := [][]byte{} - - for i := 0; i < len(hashes); i += 2 { - if i+1 <= len(hashes)-1 { - tmpHash := append(append([]byte{}, hashes[i]...), hashes[i+1]...) - tmpSum := sha256.Sum256(tmpHash) - tmpHashes = append(tmpHashes, tmpSum[:]) - } else { - tmpHashes = append(tmpHashes, hashes[i]) - } - } - - hashes = tmpHashes - } - - return hashes[0] -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/waiters.go deleted file mode 100644 index c8306cafc..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/waiters.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package glacier - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilVaultExists uses the Amazon Glacier API operation -// DescribeVault to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *Glacier) WaitUntilVaultExists(input *DescribeVaultInput) error { - return c.WaitUntilVaultExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilVaultExistsWithContext is an extended version of WaitUntilVaultExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) WaitUntilVaultExistsWithContext(ctx aws.Context, input *DescribeVaultInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilVaultExists", - MaxAttempts: 15, - Delay: request.ConstantWaiterDelay(3 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ResourceNotFoundException", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeVaultInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeVaultRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilVaultNotExists uses the Amazon Glacier API operation -// DescribeVault to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *Glacier) WaitUntilVaultNotExists(input *DescribeVaultInput) error { - return c.WaitUntilVaultNotExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilVaultNotExistsWithContext is an extended version of WaitUntilVaultNotExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glacier) WaitUntilVaultNotExistsWithContext(ctx aws.Context, input *DescribeVaultInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilVaultNotExists", - MaxAttempts: 15, - Delay: request.ConstantWaiterDelay(3 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.RetryWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ResourceNotFoundException", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeVaultInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeVaultRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/api.go b/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/api.go deleted file mode 100644 index ac7d30d2d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/api.go +++ /dev/null @@ -1,3617 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package globalaccelerator - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateAccelerator = "CreateAccelerator" - -// CreateAcceleratorRequest generates a "aws/request.Request" representing the -// client's request for the CreateAccelerator operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAccelerator for more information on using the CreateAccelerator -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAcceleratorRequest method. -// req, resp := client.CreateAcceleratorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateAccelerator -func (c *GlobalAccelerator) CreateAcceleratorRequest(input *CreateAcceleratorInput) (req *request.Request, output *CreateAcceleratorOutput) { - op := &request.Operation{ - Name: opCreateAccelerator, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAcceleratorInput{} - } - - output = &CreateAcceleratorOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAccelerator API operation for AWS Global Accelerator. -// -// Create an accelerator. An accelerator includes one or more listeners that -// process inbound connections and direct traffic to one or more endpoint groups, -// each of which includes endpoints, such as Network Load Balancers. To see -// an AWS CLI example of creating an accelerator, scroll down to Example. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation CreateAccelerator for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// An argument that you specified is invalid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Processing your request would cause you to exceed an AWS Global Accelerator -// limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateAccelerator -func (c *GlobalAccelerator) CreateAccelerator(input *CreateAcceleratorInput) (*CreateAcceleratorOutput, error) { - req, out := c.CreateAcceleratorRequest(input) - return out, req.Send() -} - -// CreateAcceleratorWithContext is the same as CreateAccelerator with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAccelerator for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) CreateAcceleratorWithContext(ctx aws.Context, input *CreateAcceleratorInput, opts ...request.Option) (*CreateAcceleratorOutput, error) { - req, out := c.CreateAcceleratorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateEndpointGroup = "CreateEndpointGroup" - -// CreateEndpointGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateEndpointGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateEndpointGroup for more information on using the CreateEndpointGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateEndpointGroupRequest method. -// req, resp := client.CreateEndpointGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateEndpointGroup -func (c *GlobalAccelerator) CreateEndpointGroupRequest(input *CreateEndpointGroupInput) (req *request.Request, output *CreateEndpointGroupOutput) { - op := &request.Operation{ - Name: opCreateEndpointGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateEndpointGroupInput{} - } - - output = &CreateEndpointGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateEndpointGroup API operation for AWS Global Accelerator. -// -// Create an endpoint group for the specified listener. An endpoint group is -// a collection of endpoints in one AWS Region. To see an AWS CLI example of -// creating an endpoint group, scroll down to Example. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation CreateEndpointGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" -// The accelerator that you specified doesn't exist. -// -// * ErrCodeEndpointGroupAlreadyExistsException "EndpointGroupAlreadyExistsException" -// The endpoint group that you specified already exists. -// -// * ErrCodeListenerNotFoundException "ListenerNotFoundException" -// The listener that you specified doesn't exist. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// An argument that you specified is invalid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Processing your request would cause you to exceed an AWS Global Accelerator -// limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateEndpointGroup -func (c *GlobalAccelerator) CreateEndpointGroup(input *CreateEndpointGroupInput) (*CreateEndpointGroupOutput, error) { - req, out := c.CreateEndpointGroupRequest(input) - return out, req.Send() -} - -// CreateEndpointGroupWithContext is the same as CreateEndpointGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateEndpointGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) CreateEndpointGroupWithContext(ctx aws.Context, input *CreateEndpointGroupInput, opts ...request.Option) (*CreateEndpointGroupOutput, error) { - req, out := c.CreateEndpointGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateListener = "CreateListener" - -// CreateListenerRequest generates a "aws/request.Request" representing the -// client's request for the CreateListener operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateListener for more information on using the CreateListener -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateListenerRequest method. -// req, resp := client.CreateListenerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateListener -func (c *GlobalAccelerator) CreateListenerRequest(input *CreateListenerInput) (req *request.Request, output *CreateListenerOutput) { - op := &request.Operation{ - Name: opCreateListener, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateListenerInput{} - } - - output = &CreateListenerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateListener API operation for AWS Global Accelerator. -// -// Create a listener to process inbound connections from clients to an accelerator. -// Connections arrive to assigned static IP addresses on a port, port range, -// or list of port ranges that you specify. To see an AWS CLI example of creating -// a listener, scroll down to Example. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation CreateListener for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// An argument that you specified is invalid. -// -// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" -// The accelerator that you specified doesn't exist. -// -// * ErrCodeInvalidPortRangeException "InvalidPortRangeException" -// The port numbers that you specified are not valid numbers or are not unique -// for this accelerator. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Processing your request would cause you to exceed an AWS Global Accelerator -// limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateListener -func (c *GlobalAccelerator) CreateListener(input *CreateListenerInput) (*CreateListenerOutput, error) { - req, out := c.CreateListenerRequest(input) - return out, req.Send() -} - -// CreateListenerWithContext is the same as CreateListener with the addition of -// the ability to pass a context and additional request options. -// -// See CreateListener for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) CreateListenerWithContext(ctx aws.Context, input *CreateListenerInput, opts ...request.Option) (*CreateListenerOutput, error) { - req, out := c.CreateListenerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAccelerator = "DeleteAccelerator" - -// DeleteAcceleratorRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAccelerator operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAccelerator for more information on using the DeleteAccelerator -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAcceleratorRequest method. -// req, resp := client.DeleteAcceleratorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteAccelerator -func (c *GlobalAccelerator) DeleteAcceleratorRequest(input *DeleteAcceleratorInput) (req *request.Request, output *DeleteAcceleratorOutput) { - op := &request.Operation{ - Name: opDeleteAccelerator, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAcceleratorInput{} - } - - output = &DeleteAcceleratorOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAccelerator API operation for AWS Global Accelerator. -// -// Delete an accelerator. Note: before you can delete an accelerator, you must -// disable it and remove all dependent resources (listeners and endpoint 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 Global Accelerator's -// API operation DeleteAccelerator for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" -// The accelerator that you specified doesn't exist. -// -// * ErrCodeAcceleratorNotDisabledException "AcceleratorNotDisabledException" -// The accelerator that you specified could not be disabled. -// -// * ErrCodeAssociatedListenerFoundException "AssociatedListenerFoundException" -// The accelerator that you specified has a listener associated with it. You -// must remove all dependent resources from an accelerator before you can delete -// it. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// An argument that you specified is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteAccelerator -func (c *GlobalAccelerator) DeleteAccelerator(input *DeleteAcceleratorInput) (*DeleteAcceleratorOutput, error) { - req, out := c.DeleteAcceleratorRequest(input) - return out, req.Send() -} - -// DeleteAcceleratorWithContext is the same as DeleteAccelerator with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAccelerator for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) DeleteAcceleratorWithContext(ctx aws.Context, input *DeleteAcceleratorInput, opts ...request.Option) (*DeleteAcceleratorOutput, error) { - req, out := c.DeleteAcceleratorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEndpointGroup = "DeleteEndpointGroup" - -// DeleteEndpointGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEndpointGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEndpointGroup for more information on using the DeleteEndpointGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEndpointGroupRequest method. -// req, resp := client.DeleteEndpointGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteEndpointGroup -func (c *GlobalAccelerator) DeleteEndpointGroupRequest(input *DeleteEndpointGroupInput) (req *request.Request, output *DeleteEndpointGroupOutput) { - op := &request.Operation{ - Name: opDeleteEndpointGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteEndpointGroupInput{} - } - - output = &DeleteEndpointGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteEndpointGroup API operation for AWS Global Accelerator. -// -// Delete an endpoint group from a listener. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation DeleteEndpointGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEndpointGroupNotFoundException "EndpointGroupNotFoundException" -// The endpoint group that you specified doesn't exist. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteEndpointGroup -func (c *GlobalAccelerator) DeleteEndpointGroup(input *DeleteEndpointGroupInput) (*DeleteEndpointGroupOutput, error) { - req, out := c.DeleteEndpointGroupRequest(input) - return out, req.Send() -} - -// DeleteEndpointGroupWithContext is the same as DeleteEndpointGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEndpointGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) DeleteEndpointGroupWithContext(ctx aws.Context, input *DeleteEndpointGroupInput, opts ...request.Option) (*DeleteEndpointGroupOutput, error) { - req, out := c.DeleteEndpointGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteListener = "DeleteListener" - -// DeleteListenerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteListener operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteListener for more information on using the DeleteListener -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteListenerRequest method. -// req, resp := client.DeleteListenerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteListener -func (c *GlobalAccelerator) DeleteListenerRequest(input *DeleteListenerInput) (req *request.Request, output *DeleteListenerOutput) { - op := &request.Operation{ - Name: opDeleteListener, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteListenerInput{} - } - - output = &DeleteListenerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteListener API operation for AWS Global Accelerator. -// -// Delete a listener from an accelerator. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation DeleteListener for usage and error information. -// -// Returned Error Codes: -// * ErrCodeListenerNotFoundException "ListenerNotFoundException" -// The listener that you specified doesn't exist. -// -// * ErrCodeAssociatedEndpointGroupFoundException "AssociatedEndpointGroupFoundException" -// The listener that you specified has an endpoint group associated with it. -// You must remove all dependent resources from a listener before you can delete -// it. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteListener -func (c *GlobalAccelerator) DeleteListener(input *DeleteListenerInput) (*DeleteListenerOutput, error) { - req, out := c.DeleteListenerRequest(input) - return out, req.Send() -} - -// DeleteListenerWithContext is the same as DeleteListener with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteListener for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) DeleteListenerWithContext(ctx aws.Context, input *DeleteListenerInput, opts ...request.Option) (*DeleteListenerOutput, error) { - req, out := c.DeleteListenerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccelerator = "DescribeAccelerator" - -// DescribeAcceleratorRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccelerator operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccelerator for more information on using the DescribeAccelerator -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAcceleratorRequest method. -// req, resp := client.DescribeAcceleratorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAccelerator -func (c *GlobalAccelerator) DescribeAcceleratorRequest(input *DescribeAcceleratorInput) (req *request.Request, output *DescribeAcceleratorOutput) { - op := &request.Operation{ - Name: opDescribeAccelerator, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAcceleratorInput{} - } - - output = &DescribeAcceleratorOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccelerator API operation for AWS Global Accelerator. -// -// Describe an accelerator. To see an AWS CLI example of describing an accelerator, -// scroll down to Example. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation DescribeAccelerator for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" -// The accelerator that you specified doesn't exist. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// An argument that you specified is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAccelerator -func (c *GlobalAccelerator) DescribeAccelerator(input *DescribeAcceleratorInput) (*DescribeAcceleratorOutput, error) { - req, out := c.DescribeAcceleratorRequest(input) - return out, req.Send() -} - -// DescribeAcceleratorWithContext is the same as DescribeAccelerator with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccelerator for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) DescribeAcceleratorWithContext(ctx aws.Context, input *DescribeAcceleratorInput, opts ...request.Option) (*DescribeAcceleratorOutput, error) { - req, out := c.DescribeAcceleratorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAcceleratorAttributes = "DescribeAcceleratorAttributes" - -// DescribeAcceleratorAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAcceleratorAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAcceleratorAttributes for more information on using the DescribeAcceleratorAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAcceleratorAttributesRequest method. -// req, resp := client.DescribeAcceleratorAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAcceleratorAttributes -func (c *GlobalAccelerator) DescribeAcceleratorAttributesRequest(input *DescribeAcceleratorAttributesInput) (req *request.Request, output *DescribeAcceleratorAttributesOutput) { - op := &request.Operation{ - Name: opDescribeAcceleratorAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAcceleratorAttributesInput{} - } - - output = &DescribeAcceleratorAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAcceleratorAttributes API operation for AWS Global Accelerator. -// -// Describe the attributes of an accelerator. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation DescribeAcceleratorAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" -// The accelerator that you specified doesn't exist. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// An argument that you specified is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAcceleratorAttributes -func (c *GlobalAccelerator) DescribeAcceleratorAttributes(input *DescribeAcceleratorAttributesInput) (*DescribeAcceleratorAttributesOutput, error) { - req, out := c.DescribeAcceleratorAttributesRequest(input) - return out, req.Send() -} - -// DescribeAcceleratorAttributesWithContext is the same as DescribeAcceleratorAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAcceleratorAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) DescribeAcceleratorAttributesWithContext(ctx aws.Context, input *DescribeAcceleratorAttributesInput, opts ...request.Option) (*DescribeAcceleratorAttributesOutput, error) { - req, out := c.DescribeAcceleratorAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEndpointGroup = "DescribeEndpointGroup" - -// DescribeEndpointGroupRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEndpointGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEndpointGroup for more information on using the DescribeEndpointGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEndpointGroupRequest method. -// req, resp := client.DescribeEndpointGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeEndpointGroup -func (c *GlobalAccelerator) DescribeEndpointGroupRequest(input *DescribeEndpointGroupInput) (req *request.Request, output *DescribeEndpointGroupOutput) { - op := &request.Operation{ - Name: opDescribeEndpointGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEndpointGroupInput{} - } - - output = &DescribeEndpointGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEndpointGroup API operation for AWS Global Accelerator. -// -// Describe an endpoint 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 Global Accelerator's -// API operation DescribeEndpointGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEndpointGroupNotFoundException "EndpointGroupNotFoundException" -// The endpoint group that you specified doesn't exist. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeEndpointGroup -func (c *GlobalAccelerator) DescribeEndpointGroup(input *DescribeEndpointGroupInput) (*DescribeEndpointGroupOutput, error) { - req, out := c.DescribeEndpointGroupRequest(input) - return out, req.Send() -} - -// DescribeEndpointGroupWithContext is the same as DescribeEndpointGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEndpointGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) DescribeEndpointGroupWithContext(ctx aws.Context, input *DescribeEndpointGroupInput, opts ...request.Option) (*DescribeEndpointGroupOutput, error) { - req, out := c.DescribeEndpointGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeListener = "DescribeListener" - -// DescribeListenerRequest generates a "aws/request.Request" representing the -// client's request for the DescribeListener operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeListener for more information on using the DescribeListener -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeListenerRequest method. -// req, resp := client.DescribeListenerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeListener -func (c *GlobalAccelerator) DescribeListenerRequest(input *DescribeListenerInput) (req *request.Request, output *DescribeListenerOutput) { - op := &request.Operation{ - Name: opDescribeListener, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeListenerInput{} - } - - output = &DescribeListenerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeListener API operation for AWS Global Accelerator. -// -// Describe a listener. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation DescribeListener for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// An argument that you specified is invalid. -// -// * ErrCodeListenerNotFoundException "ListenerNotFoundException" -// The listener that you specified doesn't exist. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeListener -func (c *GlobalAccelerator) DescribeListener(input *DescribeListenerInput) (*DescribeListenerOutput, error) { - req, out := c.DescribeListenerRequest(input) - return out, req.Send() -} - -// DescribeListenerWithContext is the same as DescribeListener with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeListener for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) DescribeListenerWithContext(ctx aws.Context, input *DescribeListenerInput, opts ...request.Option) (*DescribeListenerOutput, error) { - req, out := c.DescribeListenerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAccelerators = "ListAccelerators" - -// ListAcceleratorsRequest generates a "aws/request.Request" representing the -// client's request for the ListAccelerators operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAccelerators for more information on using the ListAccelerators -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAcceleratorsRequest method. -// req, resp := client.ListAcceleratorsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListAccelerators -func (c *GlobalAccelerator) ListAcceleratorsRequest(input *ListAcceleratorsInput) (req *request.Request, output *ListAcceleratorsOutput) { - op := &request.Operation{ - Name: opListAccelerators, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListAcceleratorsInput{} - } - - output = &ListAcceleratorsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAccelerators API operation for AWS Global Accelerator. -// -// List the accelerators for an AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation ListAccelerators for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// There isn't another item to return. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListAccelerators -func (c *GlobalAccelerator) ListAccelerators(input *ListAcceleratorsInput) (*ListAcceleratorsOutput, error) { - req, out := c.ListAcceleratorsRequest(input) - return out, req.Send() -} - -// ListAcceleratorsWithContext is the same as ListAccelerators with the addition of -// the ability to pass a context and additional request options. -// -// See ListAccelerators for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) ListAcceleratorsWithContext(ctx aws.Context, input *ListAcceleratorsInput, opts ...request.Option) (*ListAcceleratorsOutput, error) { - req, out := c.ListAcceleratorsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListEndpointGroups = "ListEndpointGroups" - -// ListEndpointGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ListEndpointGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListEndpointGroups for more information on using the ListEndpointGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListEndpointGroupsRequest method. -// req, resp := client.ListEndpointGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListEndpointGroups -func (c *GlobalAccelerator) ListEndpointGroupsRequest(input *ListEndpointGroupsInput) (req *request.Request, output *ListEndpointGroupsOutput) { - op := &request.Operation{ - Name: opListEndpointGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListEndpointGroupsInput{} - } - - output = &ListEndpointGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListEndpointGroups API operation for AWS Global Accelerator. -// -// List the endpoint groups that are associated with a listener. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation ListEndpointGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeListenerNotFoundException "ListenerNotFoundException" -// The listener that you specified doesn't exist. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// There isn't another item to return. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// An argument that you specified is invalid. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListEndpointGroups -func (c *GlobalAccelerator) ListEndpointGroups(input *ListEndpointGroupsInput) (*ListEndpointGroupsOutput, error) { - req, out := c.ListEndpointGroupsRequest(input) - return out, req.Send() -} - -// ListEndpointGroupsWithContext is the same as ListEndpointGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ListEndpointGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) ListEndpointGroupsWithContext(ctx aws.Context, input *ListEndpointGroupsInput, opts ...request.Option) (*ListEndpointGroupsOutput, error) { - req, out := c.ListEndpointGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListListeners = "ListListeners" - -// ListListenersRequest generates a "aws/request.Request" representing the -// client's request for the ListListeners operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListListeners for more information on using the ListListeners -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListListenersRequest method. -// req, resp := client.ListListenersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListListeners -func (c *GlobalAccelerator) ListListenersRequest(input *ListListenersInput) (req *request.Request, output *ListListenersOutput) { - op := &request.Operation{ - Name: opListListeners, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListListenersInput{} - } - - output = &ListListenersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListListeners API operation for AWS Global Accelerator. -// -// List the listeners for an accelerator. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation ListListeners for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" -// The accelerator that you specified doesn't exist. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// There isn't another item to return. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListListeners -func (c *GlobalAccelerator) ListListeners(input *ListListenersInput) (*ListListenersOutput, error) { - req, out := c.ListListenersRequest(input) - return out, req.Send() -} - -// ListListenersWithContext is the same as ListListeners with the addition of -// the ability to pass a context and additional request options. -// -// See ListListeners for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) ListListenersWithContext(ctx aws.Context, input *ListListenersInput, opts ...request.Option) (*ListListenersOutput, error) { - req, out := c.ListListenersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAccelerator = "UpdateAccelerator" - -// UpdateAcceleratorRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAccelerator operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAccelerator for more information on using the UpdateAccelerator -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAcceleratorRequest method. -// req, resp := client.UpdateAcceleratorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateAccelerator -func (c *GlobalAccelerator) UpdateAcceleratorRequest(input *UpdateAcceleratorInput) (req *request.Request, output *UpdateAcceleratorOutput) { - op := &request.Operation{ - Name: opUpdateAccelerator, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAcceleratorInput{} - } - - output = &UpdateAcceleratorOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateAccelerator API operation for AWS Global Accelerator. -// -// Update an accelerator. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation UpdateAccelerator for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" -// The accelerator that you specified doesn't exist. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// An argument that you specified is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateAccelerator -func (c *GlobalAccelerator) UpdateAccelerator(input *UpdateAcceleratorInput) (*UpdateAcceleratorOutput, error) { - req, out := c.UpdateAcceleratorRequest(input) - return out, req.Send() -} - -// UpdateAcceleratorWithContext is the same as UpdateAccelerator with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAccelerator for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) UpdateAcceleratorWithContext(ctx aws.Context, input *UpdateAcceleratorInput, opts ...request.Option) (*UpdateAcceleratorOutput, error) { - req, out := c.UpdateAcceleratorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAcceleratorAttributes = "UpdateAcceleratorAttributes" - -// UpdateAcceleratorAttributesRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAcceleratorAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAcceleratorAttributes for more information on using the UpdateAcceleratorAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAcceleratorAttributesRequest method. -// req, resp := client.UpdateAcceleratorAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateAcceleratorAttributes -func (c *GlobalAccelerator) UpdateAcceleratorAttributesRequest(input *UpdateAcceleratorAttributesInput) (req *request.Request, output *UpdateAcceleratorAttributesOutput) { - op := &request.Operation{ - Name: opUpdateAcceleratorAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAcceleratorAttributesInput{} - } - - output = &UpdateAcceleratorAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateAcceleratorAttributes API operation for AWS Global Accelerator. -// -// Update the attributes for an accelerator. To see an AWS CLI example of updating -// an accelerator to enable flow logs, scroll down to Example. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation UpdateAcceleratorAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" -// The accelerator that you specified doesn't exist. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// An argument that you specified is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateAcceleratorAttributes -func (c *GlobalAccelerator) UpdateAcceleratorAttributes(input *UpdateAcceleratorAttributesInput) (*UpdateAcceleratorAttributesOutput, error) { - req, out := c.UpdateAcceleratorAttributesRequest(input) - return out, req.Send() -} - -// UpdateAcceleratorAttributesWithContext is the same as UpdateAcceleratorAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAcceleratorAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) UpdateAcceleratorAttributesWithContext(ctx aws.Context, input *UpdateAcceleratorAttributesInput, opts ...request.Option) (*UpdateAcceleratorAttributesOutput, error) { - req, out := c.UpdateAcceleratorAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateEndpointGroup = "UpdateEndpointGroup" - -// UpdateEndpointGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateEndpointGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateEndpointGroup for more information on using the UpdateEndpointGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateEndpointGroupRequest method. -// req, resp := client.UpdateEndpointGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateEndpointGroup -func (c *GlobalAccelerator) UpdateEndpointGroupRequest(input *UpdateEndpointGroupInput) (req *request.Request, output *UpdateEndpointGroupOutput) { - op := &request.Operation{ - Name: opUpdateEndpointGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateEndpointGroupInput{} - } - - output = &UpdateEndpointGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateEndpointGroup API operation for AWS Global Accelerator. -// -// Update an endpoint group. To see an AWS CLI example of updating an endpoint -// group, scroll down to Example. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation UpdateEndpointGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// An argument that you specified is invalid. -// -// * ErrCodeEndpointGroupNotFoundException "EndpointGroupNotFoundException" -// The endpoint group that you specified doesn't exist. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Processing your request would cause you to exceed an AWS Global Accelerator -// limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateEndpointGroup -func (c *GlobalAccelerator) UpdateEndpointGroup(input *UpdateEndpointGroupInput) (*UpdateEndpointGroupOutput, error) { - req, out := c.UpdateEndpointGroupRequest(input) - return out, req.Send() -} - -// UpdateEndpointGroupWithContext is the same as UpdateEndpointGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateEndpointGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) UpdateEndpointGroupWithContext(ctx aws.Context, input *UpdateEndpointGroupInput, opts ...request.Option) (*UpdateEndpointGroupOutput, error) { - req, out := c.UpdateEndpointGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateListener = "UpdateListener" - -// UpdateListenerRequest generates a "aws/request.Request" representing the -// client's request for the UpdateListener operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateListener for more information on using the UpdateListener -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateListenerRequest method. -// req, resp := client.UpdateListenerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateListener -func (c *GlobalAccelerator) UpdateListenerRequest(input *UpdateListenerInput) (req *request.Request, output *UpdateListenerOutput) { - op := &request.Operation{ - Name: opUpdateListener, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateListenerInput{} - } - - output = &UpdateListenerOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateListener API operation for AWS Global Accelerator. -// -// Update a listener. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Global Accelerator's -// API operation UpdateListener for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// An argument that you specified is invalid. -// -// * ErrCodeInvalidPortRangeException "InvalidPortRangeException" -// The port numbers that you specified are not valid numbers or are not unique -// for this accelerator. -// -// * ErrCodeListenerNotFoundException "ListenerNotFoundException" -// The listener that you specified doesn't exist. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// There was an internal error for AWS Global Accelerator. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Processing your request would cause you to exceed an AWS Global Accelerator -// limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateListener -func (c *GlobalAccelerator) UpdateListener(input *UpdateListenerInput) (*UpdateListenerOutput, error) { - req, out := c.UpdateListenerRequest(input) - return out, req.Send() -} - -// UpdateListenerWithContext is the same as UpdateListener with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateListener for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GlobalAccelerator) UpdateListenerWithContext(ctx aws.Context, input *UpdateListenerInput, opts ...request.Option) (*UpdateListenerOutput, error) { - req, out := c.UpdateListenerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// An accelerator is a complex type that includes one or more listeners that -// process inbound connections and then direct traffic to one or more endpoint -// groups, each of which includes endpoints, such as load balancers. -type Accelerator struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the accelerator. - AcceleratorArn *string `type:"string"` - - // The date and time that the accelerator was created. - CreatedTime *time.Time `type:"timestamp"` - - // Indicates whether theaccelerator is enabled. The value is true or false. - // The default value is true. - // - // If the value is set to true, the accelerator cannot be deleted. If set to - // false, accelerator can be deleted. - Enabled *bool `type:"boolean"` - - // The value for the address type must be IPv4. - IpAddressType *string `type:"string" enum:"IpAddressType"` - - // IP address set associated with the accelerator. - IpSets []*IpSet `type:"list"` - - // The date and time that the accelerator was last modified. - LastModifiedTime *time.Time `type:"timestamp"` - - // The name of the accelerator. The name can have a maximum of 32 characters, - // must contain only alphanumeric characters or hyphens (-), and must not begin - // or end with a hyphen. - Name *string `type:"string"` - - // Describes the deployment status of the accelerator. - Status *string `type:"string" enum:"AcceleratorStatus"` -} - -// String returns the string representation -func (s Accelerator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Accelerator) GoString() string { - return s.String() -} - -// SetAcceleratorArn sets the AcceleratorArn field's value. -func (s *Accelerator) SetAcceleratorArn(v string) *Accelerator { - s.AcceleratorArn = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *Accelerator) SetCreatedTime(v time.Time) *Accelerator { - s.CreatedTime = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *Accelerator) SetEnabled(v bool) *Accelerator { - s.Enabled = &v - return s -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *Accelerator) SetIpAddressType(v string) *Accelerator { - s.IpAddressType = &v - return s -} - -// SetIpSets sets the IpSets field's value. -func (s *Accelerator) SetIpSets(v []*IpSet) *Accelerator { - s.IpSets = v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *Accelerator) SetLastModifiedTime(v time.Time) *Accelerator { - s.LastModifiedTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *Accelerator) SetName(v string) *Accelerator { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Accelerator) SetStatus(v string) *Accelerator { - s.Status = &v - return s -} - -// Attributes of an accelerator. -type AcceleratorAttributes struct { - _ struct{} `type:"structure"` - - // Indicates whether flow logs are enabled. The default value is false. If the - // value is true, FlowLogsS3Bucket and FlowLogsS3Prefix must be specified. - // - // For more information, see Flow Logs (https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html) - // in the AWS Global Accelerator Developer Guide. - FlowLogsEnabled *bool `type:"boolean"` - - // The name of the Amazon S3 bucket for the flow logs. Attribute is required - // if FlowLogsEnabled is true. The bucket must exist and have a bucket policy - // that grants AWS Global Accelerator permission to write to the bucket. - FlowLogsS3Bucket *string `type:"string"` - - // The prefix for the location in the Amazon S3 bucket for the flow logs. Attribute - // is required if FlowLogsEnabled is true. If you don’t specify a prefix, the - // flow logs are stored in the root of the bucket. - FlowLogsS3Prefix *string `type:"string"` -} - -// String returns the string representation -func (s AcceleratorAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceleratorAttributes) GoString() string { - return s.String() -} - -// SetFlowLogsEnabled sets the FlowLogsEnabled field's value. -func (s *AcceleratorAttributes) SetFlowLogsEnabled(v bool) *AcceleratorAttributes { - s.FlowLogsEnabled = &v - return s -} - -// SetFlowLogsS3Bucket sets the FlowLogsS3Bucket field's value. -func (s *AcceleratorAttributes) SetFlowLogsS3Bucket(v string) *AcceleratorAttributes { - s.FlowLogsS3Bucket = &v - return s -} - -// SetFlowLogsS3Prefix sets the FlowLogsS3Prefix field's value. -func (s *AcceleratorAttributes) SetFlowLogsS3Prefix(v string) *AcceleratorAttributes { - s.FlowLogsS3Prefix = &v - return s -} - -type CreateAcceleratorInput struct { - _ struct{} `type:"structure"` - - // Indicates whether an accelerator is enabled. The value is true or false. - // The default value is true. - // - // If the value is set to true, an accelerator cannot be deleted. If set to - // false, the accelerator can be deleted. - Enabled *bool `type:"boolean"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency—that - // is, the uniqueness—of an accelerator. - // - // IdempotencyToken is a required field - IdempotencyToken *string `type:"string" required:"true"` - - // The value for the address type must be IPv4. - IpAddressType *string `type:"string" enum:"IpAddressType"` - - // The name of an accelerator. The name can have a maximum of 32 characters, - // must contain only alphanumeric characters or hyphens (-), and must not begin - // or end with a hyphen. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateAcceleratorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAcceleratorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAcceleratorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAcceleratorInput"} - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *CreateAcceleratorInput) SetEnabled(v bool) *CreateAcceleratorInput { - s.Enabled = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *CreateAcceleratorInput) SetIdempotencyToken(v string) *CreateAcceleratorInput { - s.IdempotencyToken = &v - return s -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *CreateAcceleratorInput) SetIpAddressType(v string) *CreateAcceleratorInput { - s.IpAddressType = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateAcceleratorInput) SetName(v string) *CreateAcceleratorInput { - s.Name = &v - return s -} - -type CreateAcceleratorOutput struct { - _ struct{} `type:"structure"` - - // The accelerator that is created by specifying a listener and the supported - // IP address types. - Accelerator *Accelerator `type:"structure"` -} - -// String returns the string representation -func (s CreateAcceleratorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAcceleratorOutput) GoString() string { - return s.String() -} - -// SetAccelerator sets the Accelerator field's value. -func (s *CreateAcceleratorOutput) SetAccelerator(v *Accelerator) *CreateAcceleratorOutput { - s.Accelerator = v - return s -} - -type CreateEndpointGroupInput struct { - _ struct{} `type:"structure"` - - // The list of endpoint objects. - EndpointConfigurations []*EndpointConfiguration `type:"list"` - - // The name of the AWS Region where the endpoint group is located. A listener - // can have only one endpoint group in a specific Region. - // - // EndpointGroupRegion is a required field - EndpointGroupRegion *string `type:"string" required:"true"` - - // The time—10 seconds or 30 seconds—between each health check for an endpoint. - // The default value is 30. - HealthCheckIntervalSeconds *int64 `min:"10" type:"integer"` - - // If the protocol is HTTP/S, then this specifies the path that is the destination - // for health check targets. The default value is slash (/). - HealthCheckPath *string `type:"string"` - - // The port that AWS Global Accelerator uses to check the health of endpoints - // that are part of this endpoint group. The default port is the listener port - // that this endpoint group is associated with. If listener port is a list of - // ports, Global Accelerator uses the first port in the list. - HealthCheckPort *int64 `min:"1" type:"integer"` - - // The protocol that AWS Global Accelerator uses to check the health of endpoints - // that are part of this endpoint group. The default value is TCP. - HealthCheckProtocol *string `type:"string" enum:"HealthCheckProtocol"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency—that - // is, the uniqueness—of the request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *string `type:"string" required:"true"` - - // The number of consecutive health checks required to set the state of a healthy - // endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default - // value is 3. - ThresholdCount *int64 `min:"1" type:"integer"` - - // The percentage of traffic to send to an AWS Region. Additional traffic is - // distributed to other endpoint groups for this listener. - // - // Use this action to increase (dial up) or decrease (dial down) traffic to - // a specific Region. The percentage is applied to the traffic that would otherwise - // have been routed to the Region based on optimal routing. - // - // The default value is 100. - TrafficDialPercentage *float64 `type:"float"` -} - -// String returns the string representation -func (s CreateEndpointGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEndpointGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateEndpointGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateEndpointGroupInput"} - if s.EndpointGroupRegion == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointGroupRegion")) - } - if s.HealthCheckIntervalSeconds != nil && *s.HealthCheckIntervalSeconds < 10 { - invalidParams.Add(request.NewErrParamMinValue("HealthCheckIntervalSeconds", 10)) - } - if s.HealthCheckPort != nil && *s.HealthCheckPort < 1 { - invalidParams.Add(request.NewErrParamMinValue("HealthCheckPort", 1)) - } - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - if s.ThresholdCount != nil && *s.ThresholdCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("ThresholdCount", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointConfigurations sets the EndpointConfigurations field's value. -func (s *CreateEndpointGroupInput) SetEndpointConfigurations(v []*EndpointConfiguration) *CreateEndpointGroupInput { - s.EndpointConfigurations = v - return s -} - -// SetEndpointGroupRegion sets the EndpointGroupRegion field's value. -func (s *CreateEndpointGroupInput) SetEndpointGroupRegion(v string) *CreateEndpointGroupInput { - s.EndpointGroupRegion = &v - return s -} - -// SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. -func (s *CreateEndpointGroupInput) SetHealthCheckIntervalSeconds(v int64) *CreateEndpointGroupInput { - s.HealthCheckIntervalSeconds = &v - return s -} - -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *CreateEndpointGroupInput) SetHealthCheckPath(v string) *CreateEndpointGroupInput { - s.HealthCheckPath = &v - return s -} - -// SetHealthCheckPort sets the HealthCheckPort field's value. -func (s *CreateEndpointGroupInput) SetHealthCheckPort(v int64) *CreateEndpointGroupInput { - s.HealthCheckPort = &v - return s -} - -// SetHealthCheckProtocol sets the HealthCheckProtocol field's value. -func (s *CreateEndpointGroupInput) SetHealthCheckProtocol(v string) *CreateEndpointGroupInput { - s.HealthCheckProtocol = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *CreateEndpointGroupInput) SetIdempotencyToken(v string) *CreateEndpointGroupInput { - s.IdempotencyToken = &v - return s -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *CreateEndpointGroupInput) SetListenerArn(v string) *CreateEndpointGroupInput { - s.ListenerArn = &v - return s -} - -// SetThresholdCount sets the ThresholdCount field's value. -func (s *CreateEndpointGroupInput) SetThresholdCount(v int64) *CreateEndpointGroupInput { - s.ThresholdCount = &v - return s -} - -// SetTrafficDialPercentage sets the TrafficDialPercentage field's value. -func (s *CreateEndpointGroupInput) SetTrafficDialPercentage(v float64) *CreateEndpointGroupInput { - s.TrafficDialPercentage = &v - return s -} - -type CreateEndpointGroupOutput struct { - _ struct{} `type:"structure"` - - // The information about the endpoint group that was created. - EndpointGroup *EndpointGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateEndpointGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEndpointGroupOutput) GoString() string { - return s.String() -} - -// SetEndpointGroup sets the EndpointGroup field's value. -func (s *CreateEndpointGroupOutput) SetEndpointGroup(v *EndpointGroup) *CreateEndpointGroupOutput { - s.EndpointGroup = v - return s -} - -type CreateListenerInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of your accelerator. - // - // AcceleratorArn is a required field - AcceleratorArn *string `type:"string" required:"true"` - - // Client affinity lets you direct all requests from a user to the same endpoint, - // if you have stateful applications, regardless of the port and protocol of - // the client request. Clienty affinity gives you control over whether to always - // route each client to the same specific endpoint. - // - // AWS Global Accelerator uses a consistent-flow hashing algorithm to choose - // the optimal endpoint for a connection. If client affinity is NONE, Global - // Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, - // source port, destination IP address, destination port, and protocol—to select - // the hash value, and then chooses the best endpoint. However, with this setting, - // if someone uses different ports to connect to Global Accelerator, their connections - // might not be always routed to the same endpoint because the hash value changes. - // - // If you want a given client to always be routed to the same endpoint, set - // client affinity to SOURCE_IP instead. When you use the SOURCE_IP setting, - // Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client) - // IP address and destination IP address—to select the hash value. - // - // The default value is NONE. - ClientAffinity *string `type:"string" enum:"ClientAffinity"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency—that - // is, the uniqueness—of the request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `type:"string" required:"true"` - - // The list of port ranges to support for connections from clients to your accelerator. - // - // PortRanges is a required field - PortRanges []*PortRange `min:"1" type:"list" required:"true"` - - // The protocol for connections from clients to your accelerator. - // - // Protocol is a required field - Protocol *string `type:"string" required:"true" enum:"Protocol"` -} - -// String returns the string representation -func (s CreateListenerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateListenerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateListenerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateListenerInput"} - if s.AcceleratorArn == nil { - invalidParams.Add(request.NewErrParamRequired("AcceleratorArn")) - } - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } - if s.PortRanges == nil { - invalidParams.Add(request.NewErrParamRequired("PortRanges")) - } - if s.PortRanges != nil && len(s.PortRanges) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortRanges", 1)) - } - if s.Protocol == nil { - invalidParams.Add(request.NewErrParamRequired("Protocol")) - } - if s.PortRanges != nil { - for i, v := range s.PortRanges { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PortRanges", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceleratorArn sets the AcceleratorArn field's value. -func (s *CreateListenerInput) SetAcceleratorArn(v string) *CreateListenerInput { - s.AcceleratorArn = &v - return s -} - -// SetClientAffinity sets the ClientAffinity field's value. -func (s *CreateListenerInput) SetClientAffinity(v string) *CreateListenerInput { - s.ClientAffinity = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *CreateListenerInput) SetIdempotencyToken(v string) *CreateListenerInput { - s.IdempotencyToken = &v - return s -} - -// SetPortRanges sets the PortRanges field's value. -func (s *CreateListenerInput) SetPortRanges(v []*PortRange) *CreateListenerInput { - s.PortRanges = v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *CreateListenerInput) SetProtocol(v string) *CreateListenerInput { - s.Protocol = &v - return s -} - -type CreateListenerOutput struct { - _ struct{} `type:"structure"` - - // The listener that you've created. - Listener *Listener `type:"structure"` -} - -// String returns the string representation -func (s CreateListenerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateListenerOutput) GoString() string { - return s.String() -} - -// SetListener sets the Listener field's value. -func (s *CreateListenerOutput) SetListener(v *Listener) *CreateListenerOutput { - s.Listener = v - return s -} - -type DeleteAcceleratorInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of an accelerator. - // - // AcceleratorArn is a required field - AcceleratorArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAcceleratorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAcceleratorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAcceleratorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAcceleratorInput"} - if s.AcceleratorArn == nil { - invalidParams.Add(request.NewErrParamRequired("AcceleratorArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceleratorArn sets the AcceleratorArn field's value. -func (s *DeleteAcceleratorInput) SetAcceleratorArn(v string) *DeleteAcceleratorInput { - s.AcceleratorArn = &v - return s -} - -type DeleteAcceleratorOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAcceleratorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAcceleratorOutput) GoString() string { - return s.String() -} - -type DeleteEndpointGroupInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the endpoint group to delete. - // - // EndpointGroupArn is a required field - EndpointGroupArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEndpointGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEndpointGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEndpointGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointGroupInput"} - if s.EndpointGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointGroupArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointGroupArn sets the EndpointGroupArn field's value. -func (s *DeleteEndpointGroupInput) SetEndpointGroupArn(v string) *DeleteEndpointGroupInput { - s.EndpointGroupArn = &v - return s -} - -type DeleteEndpointGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteEndpointGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEndpointGroupOutput) GoString() string { - return s.String() -} - -type DeleteListenerInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteListenerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteListenerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteListenerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteListenerInput"} - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *DeleteListenerInput) SetListenerArn(v string) *DeleteListenerInput { - s.ListenerArn = &v - return s -} - -type DeleteListenerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteListenerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteListenerOutput) GoString() string { - return s.String() -} - -type DescribeAcceleratorAttributesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the accelerator with the attributes that - // you want to describe. Value is required. - AcceleratorArn *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAcceleratorAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAcceleratorAttributesInput) GoString() string { - return s.String() -} - -// SetAcceleratorArn sets the AcceleratorArn field's value. -func (s *DescribeAcceleratorAttributesInput) SetAcceleratorArn(v string) *DescribeAcceleratorAttributesInput { - s.AcceleratorArn = &v - return s -} - -type DescribeAcceleratorAttributesOutput struct { - _ struct{} `type:"structure"` - - // The attributes of the accelerator. - AcceleratorAttributes *AcceleratorAttributes `type:"structure"` -} - -// String returns the string representation -func (s DescribeAcceleratorAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAcceleratorAttributesOutput) GoString() string { - return s.String() -} - -// SetAcceleratorAttributes sets the AcceleratorAttributes field's value. -func (s *DescribeAcceleratorAttributesOutput) SetAcceleratorAttributes(v *AcceleratorAttributes) *DescribeAcceleratorAttributesOutput { - s.AcceleratorAttributes = v - return s -} - -type DescribeAcceleratorInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the accelerator to describe. - // - // AcceleratorArn is a required field - AcceleratorArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeAcceleratorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAcceleratorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAcceleratorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAcceleratorInput"} - if s.AcceleratorArn == nil { - invalidParams.Add(request.NewErrParamRequired("AcceleratorArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceleratorArn sets the AcceleratorArn field's value. -func (s *DescribeAcceleratorInput) SetAcceleratorArn(v string) *DescribeAcceleratorInput { - s.AcceleratorArn = &v - return s -} - -type DescribeAcceleratorOutput struct { - _ struct{} `type:"structure"` - - // The description of the accelerator. - Accelerator *Accelerator `type:"structure"` -} - -// String returns the string representation -func (s DescribeAcceleratorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAcceleratorOutput) GoString() string { - return s.String() -} - -// SetAccelerator sets the Accelerator field's value. -func (s *DescribeAcceleratorOutput) SetAccelerator(v *Accelerator) *DescribeAcceleratorOutput { - s.Accelerator = v - return s -} - -type DescribeEndpointGroupInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the endpoint group to describe. - // - // EndpointGroupArn is a required field - EndpointGroupArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeEndpointGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEndpointGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEndpointGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEndpointGroupInput"} - if s.EndpointGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointGroupArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointGroupArn sets the EndpointGroupArn field's value. -func (s *DescribeEndpointGroupInput) SetEndpointGroupArn(v string) *DescribeEndpointGroupInput { - s.EndpointGroupArn = &v - return s -} - -type DescribeEndpointGroupOutput struct { - _ struct{} `type:"structure"` - - // The description of an endpoint group. - EndpointGroup *EndpointGroup `type:"structure"` -} - -// String returns the string representation -func (s DescribeEndpointGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEndpointGroupOutput) GoString() string { - return s.String() -} - -// SetEndpointGroup sets the EndpointGroup field's value. -func (s *DescribeEndpointGroupOutput) SetEndpointGroup(v *EndpointGroup) *DescribeEndpointGroupOutput { - s.EndpointGroup = v - return s -} - -type DescribeListenerInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the listener to describe. - // - // ListenerArn is a required field - ListenerArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeListenerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeListenerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeListenerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeListenerInput"} - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *DescribeListenerInput) SetListenerArn(v string) *DescribeListenerInput { - s.ListenerArn = &v - return s -} - -type DescribeListenerOutput struct { - _ struct{} `type:"structure"` - - // The description of a listener. - Listener *Listener `type:"structure"` -} - -// String returns the string representation -func (s DescribeListenerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeListenerOutput) GoString() string { - return s.String() -} - -// SetListener sets the Listener field's value. -func (s *DescribeListenerOutput) SetListener(v *Listener) *DescribeListenerOutput { - s.Listener = v - return s -} - -// A complex type for endpoints. -type EndpointConfiguration struct { - _ struct{} `type:"structure"` - - // An ID for the endpoint. If the endpoint is a Network Load Balancer or Application - // Load Balancer, this is the Amazon Resource Name (ARN) of the resource. If - // the endpoint is an Elastic IP address, this is the Elastic IP address allocation - // ID. - EndpointId *string `type:"string"` - - // The weight associated with the endpoint. When you add weights to endpoints, - // you configure AWS Global Accelerator to route traffic based on proportions - // that you specify. For example, you might specify endpoint weights of 4, 5, - // 5, and 6 (sum=20). The result is that 4/20 of your traffic, on average, is - // routed to the first endpoint, 5/20 is routed both to the second and third - // endpoints, and 6/20 is routed to the last endpoint. For more information, - // see Endpoint Weights (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html) - // in the AWS Global Accelerator Developer Guide. - Weight *int64 `type:"integer"` -} - -// String returns the string representation -func (s EndpointConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointConfiguration) GoString() string { - return s.String() -} - -// SetEndpointId sets the EndpointId field's value. -func (s *EndpointConfiguration) SetEndpointId(v string) *EndpointConfiguration { - s.EndpointId = &v - return s -} - -// SetWeight sets the Weight field's value. -func (s *EndpointConfiguration) SetWeight(v int64) *EndpointConfiguration { - s.Weight = &v - return s -} - -// A complex type for an endpoint. Each endpoint group can include one or more -// endpoints, such as load balancers. -type EndpointDescription struct { - _ struct{} `type:"structure"` - - // An ID for the endpoint. If the endpoint is a Network Load Balancer or Application - // Load Balancer, this is the Amazon Resource Name (ARN) of the resource. If - // the endpoint is an Elastic IP address, this is the Elastic IP address allocation - // ID. - EndpointId *string `type:"string"` - - // The reason code associated with why the endpoint is not healthy. If the endpoint - // state is healthy, a reason code is not provided. - // - // If the endpoint state is unhealthy, the reason code can be one of the following - // values: - // - // * Timeout: The health check requests to the endpoint are timing out before - // returning a status. - // - // * Failed: The health check failed, for example because the endpoint response - // was invalid (malformed). - // - // If the endpoint state is initial, the reason code can be one of the following - // values: - // - // * ProvisioningInProgress: The endpoint is in the process of being provisioned. - // - // * InitialHealthChecking: Global Accelerator is still setting up the minimum - // number of health checks for the endpoint that are required to determine - // its health status. - HealthReason *string `type:"string"` - - // The health status of the endpoint. - HealthState *string `type:"string" enum:"HealthState"` - - // The weight associated with the endpoint. When you add weights to endpoints, - // you configure AWS Global Accelerator to route traffic based on proportions - // that you specify. For example, you might specify endpoint weights of 4, 5, - // 5, and 6 (sum=20). The result is that 4/20 of your traffic, on average, is - // routed to the first endpoint, 5/20 is routed both to the second and third - // endpoints, and 6/20 is routed to the last endpoint. For more information, - // see Endpoint Weights (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html) - // in the AWS Global Accelerator Developer Guide. - Weight *int64 `type:"integer"` -} - -// String returns the string representation -func (s EndpointDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointDescription) GoString() string { - return s.String() -} - -// SetEndpointId sets the EndpointId field's value. -func (s *EndpointDescription) SetEndpointId(v string) *EndpointDescription { - s.EndpointId = &v - return s -} - -// SetHealthReason sets the HealthReason field's value. -func (s *EndpointDescription) SetHealthReason(v string) *EndpointDescription { - s.HealthReason = &v - return s -} - -// SetHealthState sets the HealthState field's value. -func (s *EndpointDescription) SetHealthState(v string) *EndpointDescription { - s.HealthState = &v - return s -} - -// SetWeight sets the Weight field's value. -func (s *EndpointDescription) SetWeight(v int64) *EndpointDescription { - s.Weight = &v - return s -} - -// A complex type for the endpoint group. An AWS Region can have only one endpoint -// group for a specific listener. -type EndpointGroup struct { - _ struct{} `type:"structure"` - - // The list of endpoint objects. - EndpointDescriptions []*EndpointDescription `type:"list"` - - // The Amazon Resource Name (ARN) of the endpoint group. - EndpointGroupArn *string `type:"string"` - - // The AWS Region that this endpoint group belongs. - EndpointGroupRegion *string `type:"string"` - - // The time—10 seconds or 30 seconds—between health checks for each endpoint. - // The default value is 30. - HealthCheckIntervalSeconds *int64 `min:"10" type:"integer"` - - // If the protocol is HTTP/S, then this value provides the ping path that Global - // Accelerator uses for the destination on the endpoints for health checks. - // The default is slash (/). - HealthCheckPath *string `type:"string"` - - // The port that Global Accelerator uses to perform health checks on endpoints - // that are part of this endpoint group. - // - // The default port is the port for the listener that this endpoint group is - // associated with. If the listener port is a list, Global Accelerator uses - // the first specified port in the list of ports. - HealthCheckPort *int64 `min:"1" type:"integer"` - - // The protocol that Global Accelerator uses to perform health checks on endpoints - // that are part of this endpoint group. The default value is TCP. - HealthCheckProtocol *string `type:"string" enum:"HealthCheckProtocol"` - - // The number of consecutive health checks required to set the state of a healthy - // endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default - // value is 3. - ThresholdCount *int64 `min:"1" type:"integer"` - - // The percentage of traffic to send to an AWS Region. Additional traffic is - // distributed to other endpoint groups for this listener. - // - // Use this action to increase (dial up) or decrease (dial down) traffic to - // a specific Region. The percentage is applied to the traffic that would otherwise - // have been routed to the Region based on optimal routing. - // - // The default value is 100. - TrafficDialPercentage *float64 `type:"float"` -} - -// String returns the string representation -func (s EndpointGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointGroup) GoString() string { - return s.String() -} - -// SetEndpointDescriptions sets the EndpointDescriptions field's value. -func (s *EndpointGroup) SetEndpointDescriptions(v []*EndpointDescription) *EndpointGroup { - s.EndpointDescriptions = v - return s -} - -// SetEndpointGroupArn sets the EndpointGroupArn field's value. -func (s *EndpointGroup) SetEndpointGroupArn(v string) *EndpointGroup { - s.EndpointGroupArn = &v - return s -} - -// SetEndpointGroupRegion sets the EndpointGroupRegion field's value. -func (s *EndpointGroup) SetEndpointGroupRegion(v string) *EndpointGroup { - s.EndpointGroupRegion = &v - return s -} - -// SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. -func (s *EndpointGroup) SetHealthCheckIntervalSeconds(v int64) *EndpointGroup { - s.HealthCheckIntervalSeconds = &v - return s -} - -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *EndpointGroup) SetHealthCheckPath(v string) *EndpointGroup { - s.HealthCheckPath = &v - return s -} - -// SetHealthCheckPort sets the HealthCheckPort field's value. -func (s *EndpointGroup) SetHealthCheckPort(v int64) *EndpointGroup { - s.HealthCheckPort = &v - return s -} - -// SetHealthCheckProtocol sets the HealthCheckProtocol field's value. -func (s *EndpointGroup) SetHealthCheckProtocol(v string) *EndpointGroup { - s.HealthCheckProtocol = &v - return s -} - -// SetThresholdCount sets the ThresholdCount field's value. -func (s *EndpointGroup) SetThresholdCount(v int64) *EndpointGroup { - s.ThresholdCount = &v - return s -} - -// SetTrafficDialPercentage sets the TrafficDialPercentage field's value. -func (s *EndpointGroup) SetTrafficDialPercentage(v float64) *EndpointGroup { - s.TrafficDialPercentage = &v - return s -} - -// A complex type for the set of IP addresses for an accelerator. -type IpSet struct { - _ struct{} `type:"structure"` - - // The array of IP addresses in the IP address set. An IP address set can have - // a maximum of two IP addresses. - IpAddresses []*string `type:"list"` - - // The types of IP addresses included in this IP set. - IpFamily *string `type:"string"` -} - -// String returns the string representation -func (s IpSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IpSet) GoString() string { - return s.String() -} - -// SetIpAddresses sets the IpAddresses field's value. -func (s *IpSet) SetIpAddresses(v []*string) *IpSet { - s.IpAddresses = v - return s -} - -// SetIpFamily sets the IpFamily field's value. -func (s *IpSet) SetIpFamily(v string) *IpSet { - s.IpFamily = &v - return s -} - -type ListAcceleratorsInput struct { - _ struct{} `type:"structure"` - - // The number of Global Accelerator objects that you want to return with this - // call. The default value is 10. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of results. You receive this token from a previous - // call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAcceleratorsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAcceleratorsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAcceleratorsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAcceleratorsInput"} - 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 *ListAcceleratorsInput) SetMaxResults(v int64) *ListAcceleratorsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAcceleratorsInput) SetNextToken(v string) *ListAcceleratorsInput { - s.NextToken = &v - return s -} - -type ListAcceleratorsOutput struct { - _ struct{} `type:"structure"` - - // The list of accelerators for a customer account. - Accelerators []*Accelerator `type:"list"` - - // The token for the next set of results. You receive this token from a previous - // call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAcceleratorsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAcceleratorsOutput) GoString() string { - return s.String() -} - -// SetAccelerators sets the Accelerators field's value. -func (s *ListAcceleratorsOutput) SetAccelerators(v []*Accelerator) *ListAcceleratorsOutput { - s.Accelerators = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAcceleratorsOutput) SetNextToken(v string) *ListAcceleratorsOutput { - s.NextToken = &v - return s -} - -type ListEndpointGroupsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *string `type:"string" required:"true"` - - // The number of endpoint group objects that you want to return with this call. - // The default value is 10. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of results. You receive this token from a previous - // call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListEndpointGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEndpointGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListEndpointGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListEndpointGroupsInput"} - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *ListEndpointGroupsInput) SetListenerArn(v string) *ListEndpointGroupsInput { - s.ListenerArn = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListEndpointGroupsInput) SetMaxResults(v int64) *ListEndpointGroupsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEndpointGroupsInput) SetNextToken(v string) *ListEndpointGroupsInput { - s.NextToken = &v - return s -} - -type ListEndpointGroupsOutput struct { - _ struct{} `type:"structure"` - - // The list of the endpoint groups associated with a listener. - EndpointGroups []*EndpointGroup `type:"list"` - - // The token for the next set of results. You receive this token from a previous - // call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListEndpointGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEndpointGroupsOutput) GoString() string { - return s.String() -} - -// SetEndpointGroups sets the EndpointGroups field's value. -func (s *ListEndpointGroupsOutput) SetEndpointGroups(v []*EndpointGroup) *ListEndpointGroupsOutput { - s.EndpointGroups = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEndpointGroupsOutput) SetNextToken(v string) *ListEndpointGroupsOutput { - s.NextToken = &v - return s -} - -type ListListenersInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the accelerator for which you want to list - // listener objects. - // - // AcceleratorArn is a required field - AcceleratorArn *string `type:"string" required:"true"` - - // The number of listener objects that you want to return with this call. The - // default value is 10. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of results. You receive this token from a previous - // call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListListenersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListListenersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListListenersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListListenersInput"} - if s.AcceleratorArn == nil { - invalidParams.Add(request.NewErrParamRequired("AcceleratorArn")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceleratorArn sets the AcceleratorArn field's value. -func (s *ListListenersInput) SetAcceleratorArn(v string) *ListListenersInput { - s.AcceleratorArn = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListListenersInput) SetMaxResults(v int64) *ListListenersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListListenersInput) SetNextToken(v string) *ListListenersInput { - s.NextToken = &v - return s -} - -type ListListenersOutput struct { - _ struct{} `type:"structure"` - - // The list of listeners for an accelerator. - Listeners []*Listener `type:"list"` - - // The token for the next set of results. You receive this token from a previous - // call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListListenersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListListenersOutput) GoString() string { - return s.String() -} - -// SetListeners sets the Listeners field's value. -func (s *ListListenersOutput) SetListeners(v []*Listener) *ListListenersOutput { - s.Listeners = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListListenersOutput) SetNextToken(v string) *ListListenersOutput { - s.NextToken = &v - return s -} - -// A complex type for a listener. -type Listener struct { - _ struct{} `type:"structure"` - - // Client affinity lets you direct all requests from a user to the same endpoint, - // if you have stateful applications, regardless of the port and protocol of - // the client request. Clienty affinity gives you control over whether to always - // route each client to the same specific endpoint. - // - // AWS Global Accelerator uses a consistent-flow hashing algorithm to choose - // the optimal endpoint for a connection. If client affinity is NONE, Global - // Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, - // source port, destination IP address, destination port, and protocol—to select - // the hash value, and then chooses the best endpoint. However, with this setting, - // if someone uses different ports to connect to Global Accelerator, their connections - // might not be always routed to the same endpoint because the hash value changes. - // - // If you want a given client to always be routed to the same endpoint, set - // client affinity to SOURCE_IP instead. When you use the SOURCE_IP setting, - // Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client) - // IP address and destination IP address—to select the hash value. - // - // The default value is NONE. - ClientAffinity *string `type:"string" enum:"ClientAffinity"` - - // The Amazon Resource Name (ARN) of the listener. - ListenerArn *string `type:"string"` - - // The list of port ranges for the connections from clients to the accelerator. - PortRanges []*PortRange `min:"1" type:"list"` - - // The protocol for the connections from clients to the accelerator. - Protocol *string `type:"string" enum:"Protocol"` -} - -// String returns the string representation -func (s Listener) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Listener) GoString() string { - return s.String() -} - -// SetClientAffinity sets the ClientAffinity field's value. -func (s *Listener) SetClientAffinity(v string) *Listener { - s.ClientAffinity = &v - return s -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *Listener) SetListenerArn(v string) *Listener { - s.ListenerArn = &v - return s -} - -// SetPortRanges sets the PortRanges field's value. -func (s *Listener) SetPortRanges(v []*PortRange) *Listener { - s.PortRanges = v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *Listener) SetProtocol(v string) *Listener { - s.Protocol = &v - return s -} - -// A complex type for a range of ports for a listener. -type PortRange struct { - _ struct{} `type:"structure"` - - // The first port in the range of ports, inclusive. - FromPort *int64 `min:"1" type:"integer"` - - // The last port in the range of ports, inclusive. - ToPort *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s PortRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PortRange) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PortRange) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PortRange"} - if s.FromPort != nil && *s.FromPort < 1 { - invalidParams.Add(request.NewErrParamMinValue("FromPort", 1)) - } - if s.ToPort != nil && *s.ToPort < 1 { - invalidParams.Add(request.NewErrParamMinValue("ToPort", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFromPort sets the FromPort field's value. -func (s *PortRange) SetFromPort(v int64) *PortRange { - s.FromPort = &v - return s -} - -// SetToPort sets the ToPort field's value. -func (s *PortRange) SetToPort(v int64) *PortRange { - s.ToPort = &v - return s -} - -type UpdateAcceleratorAttributesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the accelerator that you want to update. - // Attribute is required. - AcceleratorArn *string `type:"string"` - - // Update whether flow logs are enabled. The default value is false. If the - // value is true, FlowLogsS3Bucket and FlowLogsS3Prefix must be specified. - // - // For more information, see Flow Logs (https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html) - // in the AWS Global Accelerator Developer Guide. - FlowLogsEnabled *bool `type:"boolean"` - - // The name of the Amazon S3 bucket for the flow logs. Attribute is required - // if FlowLogsEnabled is true. The bucket must exist and have a bucket policy - // that grants AWS Global Accelerator permission to write to the bucket. - FlowLogsS3Bucket *string `type:"string"` - - // Update the prefix for the location in the Amazon S3 bucket for the flow logs. - // Attribute is required if FlowLogsEnabled is true. If you don’t specify a - // prefix, the flow logs are stored in the root of the bucket. - FlowLogsS3Prefix *string `type:"string"` -} - -// String returns the string representation -func (s UpdateAcceleratorAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAcceleratorAttributesInput) GoString() string { - return s.String() -} - -// SetAcceleratorArn sets the AcceleratorArn field's value. -func (s *UpdateAcceleratorAttributesInput) SetAcceleratorArn(v string) *UpdateAcceleratorAttributesInput { - s.AcceleratorArn = &v - return s -} - -// SetFlowLogsEnabled sets the FlowLogsEnabled field's value. -func (s *UpdateAcceleratorAttributesInput) SetFlowLogsEnabled(v bool) *UpdateAcceleratorAttributesInput { - s.FlowLogsEnabled = &v - return s -} - -// SetFlowLogsS3Bucket sets the FlowLogsS3Bucket field's value. -func (s *UpdateAcceleratorAttributesInput) SetFlowLogsS3Bucket(v string) *UpdateAcceleratorAttributesInput { - s.FlowLogsS3Bucket = &v - return s -} - -// SetFlowLogsS3Prefix sets the FlowLogsS3Prefix field's value. -func (s *UpdateAcceleratorAttributesInput) SetFlowLogsS3Prefix(v string) *UpdateAcceleratorAttributesInput { - s.FlowLogsS3Prefix = &v - return s -} - -type UpdateAcceleratorAttributesOutput struct { - _ struct{} `type:"structure"` - - // Updated attributes for the accelerator. - AcceleratorAttributes *AcceleratorAttributes `type:"structure"` -} - -// String returns the string representation -func (s UpdateAcceleratorAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAcceleratorAttributesOutput) GoString() string { - return s.String() -} - -// SetAcceleratorAttributes sets the AcceleratorAttributes field's value. -func (s *UpdateAcceleratorAttributesOutput) SetAcceleratorAttributes(v *AcceleratorAttributes) *UpdateAcceleratorAttributesOutput { - s.AcceleratorAttributes = v - return s -} - -type UpdateAcceleratorInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the accelerator to update. - // - // AcceleratorArn is a required field - AcceleratorArn *string `type:"string" required:"true"` - - // Indicates whether an accelerator is enabled. The value is true or false. - // The default value is true. - // - // If the value is set to true, the accelerator cannot be deleted. If set to - // false, the accelerator can be deleted. - Enabled *bool `type:"boolean"` - - // The value for the address type must be IPv4. - IpAddressType *string `type:"string" enum:"IpAddressType"` - - // The name of the accelerator. The name can have a maximum of 32 characters, - // must contain only alphanumeric characters or hyphens (-), and must not begin - // or end with a hyphen. - Name *string `type:"string"` -} - -// String returns the string representation -func (s UpdateAcceleratorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAcceleratorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAcceleratorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAcceleratorInput"} - if s.AcceleratorArn == nil { - invalidParams.Add(request.NewErrParamRequired("AcceleratorArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceleratorArn sets the AcceleratorArn field's value. -func (s *UpdateAcceleratorInput) SetAcceleratorArn(v string) *UpdateAcceleratorInput { - s.AcceleratorArn = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *UpdateAcceleratorInput) SetEnabled(v bool) *UpdateAcceleratorInput { - s.Enabled = &v - return s -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *UpdateAcceleratorInput) SetIpAddressType(v string) *UpdateAcceleratorInput { - s.IpAddressType = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateAcceleratorInput) SetName(v string) *UpdateAcceleratorInput { - s.Name = &v - return s -} - -type UpdateAcceleratorOutput struct { - _ struct{} `type:"structure"` - - // Information about the updated accelerator. - Accelerator *Accelerator `type:"structure"` -} - -// String returns the string representation -func (s UpdateAcceleratorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAcceleratorOutput) GoString() string { - return s.String() -} - -// SetAccelerator sets the Accelerator field's value. -func (s *UpdateAcceleratorOutput) SetAccelerator(v *Accelerator) *UpdateAcceleratorOutput { - s.Accelerator = v - return s -} - -type UpdateEndpointGroupInput struct { - _ struct{} `type:"structure"` - - // The list of endpoint objects. - EndpointConfigurations []*EndpointConfiguration `type:"list"` - - // The Amazon Resource Name (ARN) of the endpoint group. - // - // EndpointGroupArn is a required field - EndpointGroupArn *string `type:"string" required:"true"` - - // The time—10 seconds or 30 seconds—between each health check for an endpoint. - // The default value is 30. - HealthCheckIntervalSeconds *int64 `min:"10" type:"integer"` - - // If the protocol is HTTP/S, then this specifies the path that is the destination - // for health check targets. The default value is slash (/). - HealthCheckPath *string `type:"string"` - - // The port that AWS Global Accelerator uses to check the health of endpoints - // that are part of this endpoint group. The default port is the listener port - // that this endpoint group is associated with. If the listener port is a list - // of ports, Global Accelerator uses the first port in the list. - HealthCheckPort *int64 `min:"1" type:"integer"` - - // The protocol that AWS Global Accelerator uses to check the health of endpoints - // that are part of this endpoint group. The default value is TCP. - HealthCheckProtocol *string `type:"string" enum:"HealthCheckProtocol"` - - // The number of consecutive health checks required to set the state of a healthy - // endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default - // value is 3. - ThresholdCount *int64 `min:"1" type:"integer"` - - // The percentage of traffic to send to an AWS Region. Additional traffic is - // distributed to other endpoint groups for this listener. - // - // Use this action to increase (dial up) or decrease (dial down) traffic to - // a specific Region. The percentage is applied to the traffic that would otherwise - // have been routed to the Region based on optimal routing. - // - // The default value is 100. - TrafficDialPercentage *float64 `type:"float"` -} - -// String returns the string representation -func (s UpdateEndpointGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEndpointGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateEndpointGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateEndpointGroupInput"} - if s.EndpointGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointGroupArn")) - } - if s.HealthCheckIntervalSeconds != nil && *s.HealthCheckIntervalSeconds < 10 { - invalidParams.Add(request.NewErrParamMinValue("HealthCheckIntervalSeconds", 10)) - } - if s.HealthCheckPort != nil && *s.HealthCheckPort < 1 { - invalidParams.Add(request.NewErrParamMinValue("HealthCheckPort", 1)) - } - if s.ThresholdCount != nil && *s.ThresholdCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("ThresholdCount", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointConfigurations sets the EndpointConfigurations field's value. -func (s *UpdateEndpointGroupInput) SetEndpointConfigurations(v []*EndpointConfiguration) *UpdateEndpointGroupInput { - s.EndpointConfigurations = v - return s -} - -// SetEndpointGroupArn sets the EndpointGroupArn field's value. -func (s *UpdateEndpointGroupInput) SetEndpointGroupArn(v string) *UpdateEndpointGroupInput { - s.EndpointGroupArn = &v - return s -} - -// SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. -func (s *UpdateEndpointGroupInput) SetHealthCheckIntervalSeconds(v int64) *UpdateEndpointGroupInput { - s.HealthCheckIntervalSeconds = &v - return s -} - -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *UpdateEndpointGroupInput) SetHealthCheckPath(v string) *UpdateEndpointGroupInput { - s.HealthCheckPath = &v - return s -} - -// SetHealthCheckPort sets the HealthCheckPort field's value. -func (s *UpdateEndpointGroupInput) SetHealthCheckPort(v int64) *UpdateEndpointGroupInput { - s.HealthCheckPort = &v - return s -} - -// SetHealthCheckProtocol sets the HealthCheckProtocol field's value. -func (s *UpdateEndpointGroupInput) SetHealthCheckProtocol(v string) *UpdateEndpointGroupInput { - s.HealthCheckProtocol = &v - return s -} - -// SetThresholdCount sets the ThresholdCount field's value. -func (s *UpdateEndpointGroupInput) SetThresholdCount(v int64) *UpdateEndpointGroupInput { - s.ThresholdCount = &v - return s -} - -// SetTrafficDialPercentage sets the TrafficDialPercentage field's value. -func (s *UpdateEndpointGroupInput) SetTrafficDialPercentage(v float64) *UpdateEndpointGroupInput { - s.TrafficDialPercentage = &v - return s -} - -type UpdateEndpointGroupOutput struct { - _ struct{} `type:"structure"` - - // The information about the endpoint group that was updated. - EndpointGroup *EndpointGroup `type:"structure"` -} - -// String returns the string representation -func (s UpdateEndpointGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEndpointGroupOutput) GoString() string { - return s.String() -} - -// SetEndpointGroup sets the EndpointGroup field's value. -func (s *UpdateEndpointGroupOutput) SetEndpointGroup(v *EndpointGroup) *UpdateEndpointGroupOutput { - s.EndpointGroup = v - return s -} - -type UpdateListenerInput struct { - _ struct{} `type:"structure"` - - // Client affinity lets you direct all requests from a user to the same endpoint, - // if you have stateful applications, regardless of the port and protocol of - // the client request. Clienty affinity gives you control over whether to always - // route each client to the same specific endpoint. - // - // AWS Global Accelerator uses a consistent-flow hashing algorithm to choose - // the optimal endpoint for a connection. If client affinity is NONE, Global - // Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, - // source port, destination IP address, destination port, and protocol—to select - // the hash value, and then chooses the best endpoint. However, with this setting, - // if someone uses different ports to connect to Global Accelerator, their connections - // might not be always routed to the same endpoint because the hash value changes. - // - // If you want a given client to always be routed to the same endpoint, set - // client affinity to SOURCE_IP instead. When you use the SOURCE_IP setting, - // Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client) - // IP address and destination IP address—to select the hash value. - // - // The default value is NONE. - ClientAffinity *string `type:"string" enum:"ClientAffinity"` - - // The Amazon Resource Name (ARN) of the listener to update. - // - // ListenerArn is a required field - ListenerArn *string `type:"string" required:"true"` - - // The updated list of port ranges for the connections from clients to the accelerator. - PortRanges []*PortRange `min:"1" type:"list"` - - // The updated protocol for the connections from clients to the accelerator. - Protocol *string `type:"string" enum:"Protocol"` -} - -// String returns the string representation -func (s UpdateListenerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateListenerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateListenerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateListenerInput"} - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - if s.PortRanges != nil && len(s.PortRanges) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortRanges", 1)) - } - if s.PortRanges != nil { - for i, v := range s.PortRanges { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PortRanges", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientAffinity sets the ClientAffinity field's value. -func (s *UpdateListenerInput) SetClientAffinity(v string) *UpdateListenerInput { - s.ClientAffinity = &v - return s -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *UpdateListenerInput) SetListenerArn(v string) *UpdateListenerInput { - s.ListenerArn = &v - return s -} - -// SetPortRanges sets the PortRanges field's value. -func (s *UpdateListenerInput) SetPortRanges(v []*PortRange) *UpdateListenerInput { - s.PortRanges = v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *UpdateListenerInput) SetProtocol(v string) *UpdateListenerInput { - s.Protocol = &v - return s -} - -type UpdateListenerOutput struct { - _ struct{} `type:"structure"` - - // Information for the updated listener. - Listener *Listener `type:"structure"` -} - -// String returns the string representation -func (s UpdateListenerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateListenerOutput) GoString() string { - return s.String() -} - -// SetListener sets the Listener field's value. -func (s *UpdateListenerOutput) SetListener(v *Listener) *UpdateListenerOutput { - s.Listener = v - return s -} - -const ( - // AcceleratorStatusDeployed is a AcceleratorStatus enum value - AcceleratorStatusDeployed = "DEPLOYED" - - // AcceleratorStatusInProgress is a AcceleratorStatus enum value - AcceleratorStatusInProgress = "IN_PROGRESS" -) - -const ( - // ClientAffinityNone is a ClientAffinity enum value - ClientAffinityNone = "NONE" - - // ClientAffinitySourceIp is a ClientAffinity enum value - ClientAffinitySourceIp = "SOURCE_IP" -) - -const ( - // HealthCheckProtocolTcp is a HealthCheckProtocol enum value - HealthCheckProtocolTcp = "TCP" - - // HealthCheckProtocolHttp is a HealthCheckProtocol enum value - HealthCheckProtocolHttp = "HTTP" - - // HealthCheckProtocolHttps is a HealthCheckProtocol enum value - HealthCheckProtocolHttps = "HTTPS" -) - -const ( - // HealthStateInitial is a HealthState enum value - HealthStateInitial = "INITIAL" - - // HealthStateHealthy is a HealthState enum value - HealthStateHealthy = "HEALTHY" - - // HealthStateUnhealthy is a HealthState enum value - HealthStateUnhealthy = "UNHEALTHY" -) - -const ( - // IpAddressTypeIpv4 is a IpAddressType enum value - IpAddressTypeIpv4 = "IPV4" -) - -const ( - // ProtocolTcp is a Protocol enum value - ProtocolTcp = "TCP" - - // ProtocolUdp is a Protocol enum value - ProtocolUdp = "UDP" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/doc.go b/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/doc.go deleted file mode 100644 index f75f98cf1..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/doc.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package globalaccelerator provides the client and types for making API -// requests to AWS Global Accelerator. -// -// This is the AWS Global Accelerator API Reference. This guide is for developers -// who need detailed information about AWS Global Accelerator API actions, data -// types, and errors. For more information about Global Accelerator features, -// see the AWS Global Accelerator Developer Guide (https://docs.aws.amazon.com/global-accelerator/latest/dg/Welcome.html). -// -// AWS Global Accelerator is a network layer service in which you create accelerators -// to improve availability and performance for internet applications used by -// a global audience. -// -// Global Accelerator provides you with static IP addresses that you associate -// with your accelerator. These IP addresses are anycast from the AWS edge network -// and distribute incoming application traffic across multiple endpoint resources -// in multiple AWS Regions, which increases the availability of your applications. -// Endpoints can be Elastic IP addresses, Network Load Balancers, and Application -// Load Balancers that are located in one AWS Region or multiple Regions. -// -// Global Accelerator uses the AWS global network to route traffic to the optimal -// regional endpoint based on health, client location, and policies that you -// configure. The service reacts instantly to changes in health or configuration -// to ensure that internet traffic from clients is directed to only healthy -// endpoints. -// -// Global Accelerator includes components that work together to help you improve -// performance and availability for your applications: -// -// Static IP addressAWS Global Accelerator provides you with a set of static -// IP addresses which are anycast from the AWS edge network and serve as the -// single fixed entry points for your clients. If you already have Elastic Load -// Balancing or Elastic IP address resources set up for your applications, you -// can easily add those to Global Accelerator to allow the resources to be accessed -// by a Global Accelerator static IP address. -// -// AcceleratorAn accelerator directs traffic to optimal endpoints over the AWS -// global network to improve availability and performance for your internet -// applications that have a global audience. Each accelerator includes one or -// more listeners. -// -// Network zoneA network zone services the static IP addresses for your accelerator -// from a unique IP subnet. Similar to an AWS Availability Zone, a network zone -// is an isolated unit with its own set of physical infrastructure. When you -// configure an accelerator, Global Accelerator allocates two IPv4 addresses -// for it. If one IP address from a network zone becomes unavailable due to -// IP address blocking by certain client networks, or network disruptions, then -// client applications can retry on the healthy static IP address from the other -// isolated network zone. -// -// ListenerA listener processes inbound connections from clients to Global Accelerator, -// based on the protocol and port that you configure. Each listener has one -// or more endpoint groups associated with it, and traffic is forwarded to endpoints -// in one of the groups. You associate endpoint groups with listeners by specifying -// the Regions that you want to distribute traffic to. Traffic is distributed -// to optimal endpoints within the endpoint groups associated with a listener. -// -// Endpoint groupEach endpoint group is associated with a specific AWS Region. -// Endpoint groups include one or more endpoints in the Region. You can increase -// or reduce the percentage of traffic that would be otherwise directed to an -// endpoint group by adjusting a setting called a traffic dial. The traffic -// dial lets you easily do performance testing or blue/green deployment testing -// for new releases across different AWS Regions, for example. -// -// EndpointAn endpoint is an Elastic IP address, Network Load Balancer, or Application -// Load Balancer. Traffic is routed to endpoints based on several factors, including -// the geo-proximity to the user, the health of the endpoint, and the configuration -// options that you choose, such as endpoint weights. For each endpoint, you -// can configure weights, which are numbers that you can use to specify the -// proportion of traffic to route to each one. This can be useful, for example, -// to do performance testing within a Region. -// -// See https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08 for more information on this service. -// -// See globalaccelerator package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/globalaccelerator/ -// -// Using the Client -// -// To contact AWS Global Accelerator 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 Global Accelerator client GlobalAccelerator for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/globalaccelerator/#New -package globalaccelerator diff --git a/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/errors.go b/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/errors.go deleted file mode 100644 index 13aea5e36..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/errors.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package globalaccelerator - -const ( - - // ErrCodeAcceleratorNotDisabledException for service response error code - // "AcceleratorNotDisabledException". - // - // The accelerator that you specified could not be disabled. - ErrCodeAcceleratorNotDisabledException = "AcceleratorNotDisabledException" - - // ErrCodeAcceleratorNotFoundException for service response error code - // "AcceleratorNotFoundException". - // - // The accelerator that you specified doesn't exist. - ErrCodeAcceleratorNotFoundException = "AcceleratorNotFoundException" - - // ErrCodeAssociatedEndpointGroupFoundException for service response error code - // "AssociatedEndpointGroupFoundException". - // - // The listener that you specified has an endpoint group associated with it. - // You must remove all dependent resources from a listener before you can delete - // it. - ErrCodeAssociatedEndpointGroupFoundException = "AssociatedEndpointGroupFoundException" - - // ErrCodeAssociatedListenerFoundException for service response error code - // "AssociatedListenerFoundException". - // - // The accelerator that you specified has a listener associated with it. You - // must remove all dependent resources from an accelerator before you can delete - // it. - ErrCodeAssociatedListenerFoundException = "AssociatedListenerFoundException" - - // ErrCodeEndpointGroupAlreadyExistsException for service response error code - // "EndpointGroupAlreadyExistsException". - // - // The endpoint group that you specified already exists. - ErrCodeEndpointGroupAlreadyExistsException = "EndpointGroupAlreadyExistsException" - - // ErrCodeEndpointGroupNotFoundException for service response error code - // "EndpointGroupNotFoundException". - // - // The endpoint group that you specified doesn't exist. - ErrCodeEndpointGroupNotFoundException = "EndpointGroupNotFoundException" - - // ErrCodeInternalServiceErrorException for service response error code - // "InternalServiceErrorException". - // - // There was an internal error for AWS Global Accelerator. - ErrCodeInternalServiceErrorException = "InternalServiceErrorException" - - // ErrCodeInvalidArgumentException for service response error code - // "InvalidArgumentException". - // - // An argument that you specified is invalid. - ErrCodeInvalidArgumentException = "InvalidArgumentException" - - // ErrCodeInvalidNextTokenException for service response error code - // "InvalidNextTokenException". - // - // There isn't another item to return. - ErrCodeInvalidNextTokenException = "InvalidNextTokenException" - - // ErrCodeInvalidPortRangeException for service response error code - // "InvalidPortRangeException". - // - // The port numbers that you specified are not valid numbers or are not unique - // for this accelerator. - ErrCodeInvalidPortRangeException = "InvalidPortRangeException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // Processing your request would cause you to exceed an AWS Global Accelerator - // limit. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeListenerNotFoundException for service response error code - // "ListenerNotFoundException". - // - // The listener that you specified doesn't exist. - ErrCodeListenerNotFoundException = "ListenerNotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/service.go b/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/service.go deleted file mode 100644 index 31552ab8c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/service.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package globalaccelerator - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// GlobalAccelerator provides the API operation methods for making requests to -// AWS Global Accelerator. See this package's package overview docs -// for details on the service. -// -// GlobalAccelerator methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type GlobalAccelerator 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 = "Global Accelerator" // Name of service. - EndpointsID = "globalaccelerator" // ID to lookup a service endpoint with. - ServiceID = "Global Accelerator" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the GlobalAccelerator 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 GlobalAccelerator client from just a session. -// svc := globalaccelerator.New(mySession) -// -// // Create a GlobalAccelerator client with additional configuration -// svc := globalaccelerator.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *GlobalAccelerator { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "globalaccelerator" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *GlobalAccelerator { - svc := &GlobalAccelerator{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-08-08", - JSONVersion: "1.1", - TargetPrefix: "GlobalAccelerator_V20180706", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a GlobalAccelerator operation and runs any -// custom request initialization. -func (c *GlobalAccelerator) 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/glue/api.go b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go deleted file mode 100644 index 165c29bab..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go +++ /dev/null @@ -1,22216 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package glue - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opBatchCreatePartition = "BatchCreatePartition" - -// BatchCreatePartitionRequest generates a "aws/request.Request" representing the -// client's request for the BatchCreatePartition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchCreatePartition for more information on using the BatchCreatePartition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchCreatePartitionRequest method. -// req, resp := client.BatchCreatePartitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchCreatePartition -func (c *Glue) BatchCreatePartitionRequest(input *BatchCreatePartitionInput) (req *request.Request, output *BatchCreatePartitionOutput) { - op := &request.Operation{ - Name: opBatchCreatePartition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchCreatePartitionInput{} - } - - output = &BatchCreatePartitionOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchCreatePartition API operation for AWS Glue. -// -// Creates one or more partitions in a batch operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation BatchCreatePartition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// A resource to be created or added already exists. -// -// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" -// A resource numerical limit was exceeded. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchCreatePartition -func (c *Glue) BatchCreatePartition(input *BatchCreatePartitionInput) (*BatchCreatePartitionOutput, error) { - req, out := c.BatchCreatePartitionRequest(input) - return out, req.Send() -} - -// BatchCreatePartitionWithContext is the same as BatchCreatePartition with the addition of -// the ability to pass a context and additional request options. -// -// See BatchCreatePartition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) BatchCreatePartitionWithContext(ctx aws.Context, input *BatchCreatePartitionInput, opts ...request.Option) (*BatchCreatePartitionOutput, error) { - req, out := c.BatchCreatePartitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchDeleteConnection = "BatchDeleteConnection" - -// BatchDeleteConnectionRequest generates a "aws/request.Request" representing the -// client's request for the BatchDeleteConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchDeleteConnection for more information on using the BatchDeleteConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchDeleteConnectionRequest method. -// req, resp := client.BatchDeleteConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchDeleteConnection -func (c *Glue) BatchDeleteConnectionRequest(input *BatchDeleteConnectionInput) (req *request.Request, output *BatchDeleteConnectionOutput) { - op := &request.Operation{ - Name: opBatchDeleteConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchDeleteConnectionInput{} - } - - output = &BatchDeleteConnectionOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchDeleteConnection API operation for AWS Glue. -// -// Deletes a list of connection definitions from the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation BatchDeleteConnection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchDeleteConnection -func (c *Glue) BatchDeleteConnection(input *BatchDeleteConnectionInput) (*BatchDeleteConnectionOutput, error) { - req, out := c.BatchDeleteConnectionRequest(input) - return out, req.Send() -} - -// BatchDeleteConnectionWithContext is the same as BatchDeleteConnection with the addition of -// the ability to pass a context and additional request options. -// -// See BatchDeleteConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) BatchDeleteConnectionWithContext(ctx aws.Context, input *BatchDeleteConnectionInput, opts ...request.Option) (*BatchDeleteConnectionOutput, error) { - req, out := c.BatchDeleteConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchDeletePartition = "BatchDeletePartition" - -// BatchDeletePartitionRequest generates a "aws/request.Request" representing the -// client's request for the BatchDeletePartition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchDeletePartition for more information on using the BatchDeletePartition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchDeletePartitionRequest method. -// req, resp := client.BatchDeletePartitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchDeletePartition -func (c *Glue) BatchDeletePartitionRequest(input *BatchDeletePartitionInput) (req *request.Request, output *BatchDeletePartitionOutput) { - op := &request.Operation{ - Name: opBatchDeletePartition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchDeletePartitionInput{} - } - - output = &BatchDeletePartitionOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchDeletePartition API operation for AWS Glue. -// -// Deletes one or more partitions in a batch operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation BatchDeletePartition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchDeletePartition -func (c *Glue) BatchDeletePartition(input *BatchDeletePartitionInput) (*BatchDeletePartitionOutput, error) { - req, out := c.BatchDeletePartitionRequest(input) - return out, req.Send() -} - -// BatchDeletePartitionWithContext is the same as BatchDeletePartition with the addition of -// the ability to pass a context and additional request options. -// -// See BatchDeletePartition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) BatchDeletePartitionWithContext(ctx aws.Context, input *BatchDeletePartitionInput, opts ...request.Option) (*BatchDeletePartitionOutput, error) { - req, out := c.BatchDeletePartitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchDeleteTable = "BatchDeleteTable" - -// BatchDeleteTableRequest generates a "aws/request.Request" representing the -// client's request for the BatchDeleteTable operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchDeleteTable for more information on using the BatchDeleteTable -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchDeleteTableRequest method. -// req, resp := client.BatchDeleteTableRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchDeleteTable -func (c *Glue) BatchDeleteTableRequest(input *BatchDeleteTableInput) (req *request.Request, output *BatchDeleteTableOutput) { - op := &request.Operation{ - Name: opBatchDeleteTable, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchDeleteTableInput{} - } - - output = &BatchDeleteTableOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchDeleteTable API operation for AWS Glue. -// -// Deletes multiple tables at once. -// -// After completing this operation, you will no longer have access to the table -// versions and partitions that belong to the deleted table. AWS Glue deletes -// these "orphaned" resources asynchronously in a timely manner, at the discretion -// of the service. -// -// To ensure immediate deletion of all related resources, before calling BatchDeleteTable, -// use DeleteTableVersion or BatchDeleteTableVersion, and DeletePartition or -// BatchDeletePartition, to delete any resources that belong to the table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation BatchDeleteTable for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchDeleteTable -func (c *Glue) BatchDeleteTable(input *BatchDeleteTableInput) (*BatchDeleteTableOutput, error) { - req, out := c.BatchDeleteTableRequest(input) - return out, req.Send() -} - -// BatchDeleteTableWithContext is the same as BatchDeleteTable with the addition of -// the ability to pass a context and additional request options. -// -// See BatchDeleteTable for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) BatchDeleteTableWithContext(ctx aws.Context, input *BatchDeleteTableInput, opts ...request.Option) (*BatchDeleteTableOutput, error) { - req, out := c.BatchDeleteTableRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchDeleteTableVersion = "BatchDeleteTableVersion" - -// BatchDeleteTableVersionRequest generates a "aws/request.Request" representing the -// client's request for the BatchDeleteTableVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchDeleteTableVersion for more information on using the BatchDeleteTableVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchDeleteTableVersionRequest method. -// req, resp := client.BatchDeleteTableVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchDeleteTableVersion -func (c *Glue) BatchDeleteTableVersionRequest(input *BatchDeleteTableVersionInput) (req *request.Request, output *BatchDeleteTableVersionOutput) { - op := &request.Operation{ - Name: opBatchDeleteTableVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchDeleteTableVersionInput{} - } - - output = &BatchDeleteTableVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchDeleteTableVersion API operation for AWS Glue. -// -// Deletes a specified batch of versions of a table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation BatchDeleteTableVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchDeleteTableVersion -func (c *Glue) BatchDeleteTableVersion(input *BatchDeleteTableVersionInput) (*BatchDeleteTableVersionOutput, error) { - req, out := c.BatchDeleteTableVersionRequest(input) - return out, req.Send() -} - -// BatchDeleteTableVersionWithContext is the same as BatchDeleteTableVersion with the addition of -// the ability to pass a context and additional request options. -// -// See BatchDeleteTableVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) BatchDeleteTableVersionWithContext(ctx aws.Context, input *BatchDeleteTableVersionInput, opts ...request.Option) (*BatchDeleteTableVersionOutput, error) { - req, out := c.BatchDeleteTableVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchGetPartition = "BatchGetPartition" - -// BatchGetPartitionRequest generates a "aws/request.Request" representing the -// client's request for the BatchGetPartition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchGetPartition for more information on using the BatchGetPartition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchGetPartitionRequest method. -// req, resp := client.BatchGetPartitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchGetPartition -func (c *Glue) BatchGetPartitionRequest(input *BatchGetPartitionInput) (req *request.Request, output *BatchGetPartitionOutput) { - op := &request.Operation{ - Name: opBatchGetPartition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchGetPartitionInput{} - } - - output = &BatchGetPartitionOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchGetPartition API operation for AWS Glue. -// -// Retrieves partitions in a batch request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation BatchGetPartition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchGetPartition -func (c *Glue) BatchGetPartition(input *BatchGetPartitionInput) (*BatchGetPartitionOutput, error) { - req, out := c.BatchGetPartitionRequest(input) - return out, req.Send() -} - -// BatchGetPartitionWithContext is the same as BatchGetPartition with the addition of -// the ability to pass a context and additional request options. -// -// See BatchGetPartition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) BatchGetPartitionWithContext(ctx aws.Context, input *BatchGetPartitionInput, opts ...request.Option) (*BatchGetPartitionOutput, error) { - req, out := c.BatchGetPartitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchStopJobRun = "BatchStopJobRun" - -// BatchStopJobRunRequest generates a "aws/request.Request" representing the -// client's request for the BatchStopJobRun operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchStopJobRun for more information on using the BatchStopJobRun -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchStopJobRunRequest method. -// req, resp := client.BatchStopJobRunRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchStopJobRun -func (c *Glue) BatchStopJobRunRequest(input *BatchStopJobRunInput) (req *request.Request, output *BatchStopJobRunOutput) { - op := &request.Operation{ - Name: opBatchStopJobRun, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchStopJobRunInput{} - } - - output = &BatchStopJobRunOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchStopJobRun API operation for AWS Glue. -// -// Stops one or more job runs for a specified job definition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation BatchStopJobRun for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchStopJobRun -func (c *Glue) BatchStopJobRun(input *BatchStopJobRunInput) (*BatchStopJobRunOutput, error) { - req, out := c.BatchStopJobRunRequest(input) - return out, req.Send() -} - -// BatchStopJobRunWithContext is the same as BatchStopJobRun with the addition of -// the ability to pass a context and additional request options. -// -// See BatchStopJobRun for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) BatchStopJobRunWithContext(ctx aws.Context, input *BatchStopJobRunInput, opts ...request.Option) (*BatchStopJobRunOutput, error) { - req, out := c.BatchStopJobRunRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateClassifier = "CreateClassifier" - -// CreateClassifierRequest generates a "aws/request.Request" representing the -// client's request for the CreateClassifier operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateClassifier for more information on using the CreateClassifier -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateClassifierRequest method. -// req, resp := client.CreateClassifierRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateClassifier -func (c *Glue) CreateClassifierRequest(input *CreateClassifierInput) (req *request.Request, output *CreateClassifierOutput) { - op := &request.Operation{ - Name: opCreateClassifier, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateClassifierInput{} - } - - output = &CreateClassifierOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateClassifier API operation for AWS Glue. -// -// Creates a classifier in the user's account. This may be a GrokClassifier, -// an XMLClassifier, or abbrev JsonClassifier, depending on which field of the -// request is present. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation CreateClassifier for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// A resource to be created or added already exists. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateClassifier -func (c *Glue) CreateClassifier(input *CreateClassifierInput) (*CreateClassifierOutput, error) { - req, out := c.CreateClassifierRequest(input) - return out, req.Send() -} - -// CreateClassifierWithContext is the same as CreateClassifier with the addition of -// the ability to pass a context and additional request options. -// -// See CreateClassifier for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) CreateClassifierWithContext(ctx aws.Context, input *CreateClassifierInput, opts ...request.Option) (*CreateClassifierOutput, error) { - req, out := c.CreateClassifierRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateConnection = "CreateConnection" - -// CreateConnectionRequest generates a "aws/request.Request" representing the -// client's request for the CreateConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateConnection for more information on using the CreateConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateConnectionRequest method. -// req, resp := client.CreateConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateConnection -func (c *Glue) CreateConnectionRequest(input *CreateConnectionInput) (req *request.Request, output *CreateConnectionOutput) { - op := &request.Operation{ - Name: opCreateConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateConnectionInput{} - } - - output = &CreateConnectionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateConnection API operation for AWS Glue. -// -// Creates a connection definition in the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation CreateConnection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// A resource to be created or added already exists. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" -// A resource numerical limit was exceeded. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateConnection -func (c *Glue) CreateConnection(input *CreateConnectionInput) (*CreateConnectionOutput, error) { - req, out := c.CreateConnectionRequest(input) - return out, req.Send() -} - -// CreateConnectionWithContext is the same as CreateConnection with the addition of -// the ability to pass a context and additional request options. -// -// See CreateConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) CreateConnectionWithContext(ctx aws.Context, input *CreateConnectionInput, opts ...request.Option) (*CreateConnectionOutput, error) { - req, out := c.CreateConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCrawler = "CreateCrawler" - -// CreateCrawlerRequest generates a "aws/request.Request" representing the -// client's request for the CreateCrawler operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCrawler for more information on using the CreateCrawler -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCrawlerRequest method. -// req, resp := client.CreateCrawlerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateCrawler -func (c *Glue) CreateCrawlerRequest(input *CreateCrawlerInput) (req *request.Request, output *CreateCrawlerOutput) { - op := &request.Operation{ - Name: opCreateCrawler, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCrawlerInput{} - } - - output = &CreateCrawlerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateCrawler API operation for AWS Glue. -// -// Creates a new crawler with specified targets, role, configuration, and optional -// schedule. At least one crawl target must be specified, in the s3Targets field, -// the jdbcTargets field, or the DynamoDBTargets field. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation CreateCrawler for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// A resource to be created or added already exists. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" -// A resource numerical limit was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateCrawler -func (c *Glue) CreateCrawler(input *CreateCrawlerInput) (*CreateCrawlerOutput, error) { - req, out := c.CreateCrawlerRequest(input) - return out, req.Send() -} - -// CreateCrawlerWithContext is the same as CreateCrawler with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCrawler for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) CreateCrawlerWithContext(ctx aws.Context, input *CreateCrawlerInput, opts ...request.Option) (*CreateCrawlerOutput, error) { - req, out := c.CreateCrawlerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDatabase = "CreateDatabase" - -// CreateDatabaseRequest generates a "aws/request.Request" representing the -// client's request for the CreateDatabase operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDatabase for more information on using the CreateDatabase -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDatabaseRequest method. -// req, resp := client.CreateDatabaseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateDatabase -func (c *Glue) CreateDatabaseRequest(input *CreateDatabaseInput) (req *request.Request, output *CreateDatabaseOutput) { - op := &request.Operation{ - Name: opCreateDatabase, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDatabaseInput{} - } - - output = &CreateDatabaseOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateDatabase API operation for AWS Glue. -// -// Creates a new database in a Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation CreateDatabase for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// A resource to be created or added already exists. -// -// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" -// A resource numerical limit was exceeded. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateDatabase -func (c *Glue) CreateDatabase(input *CreateDatabaseInput) (*CreateDatabaseOutput, error) { - req, out := c.CreateDatabaseRequest(input) - return out, req.Send() -} - -// CreateDatabaseWithContext is the same as CreateDatabase with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDatabase for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) CreateDatabaseWithContext(ctx aws.Context, input *CreateDatabaseInput, opts ...request.Option) (*CreateDatabaseOutput, error) { - req, out := c.CreateDatabaseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDevEndpoint = "CreateDevEndpoint" - -// CreateDevEndpointRequest generates a "aws/request.Request" representing the -// client's request for the CreateDevEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDevEndpoint for more information on using the CreateDevEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDevEndpointRequest method. -// req, resp := client.CreateDevEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateDevEndpoint -func (c *Glue) CreateDevEndpointRequest(input *CreateDevEndpointInput) (req *request.Request, output *CreateDevEndpointOutput) { - op := &request.Operation{ - Name: opCreateDevEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDevEndpointInput{} - } - - output = &CreateDevEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDevEndpoint API operation for AWS Glue. -// -// Creates a new DevEndpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation CreateDevEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to a resource was denied. -// -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// A resource to be created or added already exists. -// -// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" -// The same unique identifier was associated with two different records. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeValidationException "ValidationException" -// A value could not be validated. -// -// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" -// A resource numerical limit was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateDevEndpoint -func (c *Glue) CreateDevEndpoint(input *CreateDevEndpointInput) (*CreateDevEndpointOutput, error) { - req, out := c.CreateDevEndpointRequest(input) - return out, req.Send() -} - -// CreateDevEndpointWithContext is the same as CreateDevEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDevEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) CreateDevEndpointWithContext(ctx aws.Context, input *CreateDevEndpointInput, opts ...request.Option) (*CreateDevEndpointOutput, error) { - req, out := c.CreateDevEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateJob = "CreateJob" - -// CreateJobRequest generates a "aws/request.Request" representing the -// client's request for the CreateJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateJob for more information on using the CreateJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateJobRequest method. -// req, resp := client.CreateJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateJob -func (c *Glue) CreateJobRequest(input *CreateJobInput) (req *request.Request, output *CreateJobOutput) { - op := &request.Operation{ - Name: opCreateJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateJobInput{} - } - - output = &CreateJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateJob API operation for AWS Glue. -// -// Creates a new job definition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation CreateJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" -// The same unique identifier was associated with two different records. -// -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// A resource to be created or added already exists. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" -// A resource numerical limit was exceeded. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Two processes are trying to modify a resource simultaneously. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateJob -func (c *Glue) CreateJob(input *CreateJobInput) (*CreateJobOutput, error) { - req, out := c.CreateJobRequest(input) - return out, req.Send() -} - -// CreateJobWithContext is the same as CreateJob with the addition of -// the ability to pass a context and additional request options. -// -// See CreateJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) CreateJobWithContext(ctx aws.Context, input *CreateJobInput, opts ...request.Option) (*CreateJobOutput, error) { - req, out := c.CreateJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePartition = "CreatePartition" - -// CreatePartitionRequest generates a "aws/request.Request" representing the -// client's request for the CreatePartition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePartition for more information on using the CreatePartition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePartitionRequest method. -// req, resp := client.CreatePartitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreatePartition -func (c *Glue) CreatePartitionRequest(input *CreatePartitionInput) (req *request.Request, output *CreatePartitionOutput) { - op := &request.Operation{ - Name: opCreatePartition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePartitionInput{} - } - - output = &CreatePartitionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreatePartition API operation for AWS Glue. -// -// Creates a new partition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation CreatePartition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// A resource to be created or added already exists. -// -// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" -// A resource numerical limit was exceeded. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreatePartition -func (c *Glue) CreatePartition(input *CreatePartitionInput) (*CreatePartitionOutput, error) { - req, out := c.CreatePartitionRequest(input) - return out, req.Send() -} - -// CreatePartitionWithContext is the same as CreatePartition with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePartition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) CreatePartitionWithContext(ctx aws.Context, input *CreatePartitionInput, opts ...request.Option) (*CreatePartitionOutput, error) { - req, out := c.CreatePartitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateScript = "CreateScript" - -// CreateScriptRequest generates a "aws/request.Request" representing the -// client's request for the CreateScript operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateScript for more information on using the CreateScript -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateScriptRequest method. -// req, resp := client.CreateScriptRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateScript -func (c *Glue) CreateScriptRequest(input *CreateScriptInput) (req *request.Request, output *CreateScriptOutput) { - op := &request.Operation{ - Name: opCreateScript, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateScriptInput{} - } - - output = &CreateScriptOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateScript API operation for AWS Glue. -// -// Transforms a directed acyclic graph (DAG) into code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation CreateScript for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateScript -func (c *Glue) CreateScript(input *CreateScriptInput) (*CreateScriptOutput, error) { - req, out := c.CreateScriptRequest(input) - return out, req.Send() -} - -// CreateScriptWithContext is the same as CreateScript with the addition of -// the ability to pass a context and additional request options. -// -// See CreateScript for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) CreateScriptWithContext(ctx aws.Context, input *CreateScriptInput, opts ...request.Option) (*CreateScriptOutput, error) { - req, out := c.CreateScriptRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSecurityConfiguration = "CreateSecurityConfiguration" - -// CreateSecurityConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the CreateSecurityConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSecurityConfiguration for more information on using the CreateSecurityConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSecurityConfigurationRequest method. -// req, resp := client.CreateSecurityConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateSecurityConfiguration -func (c *Glue) CreateSecurityConfigurationRequest(input *CreateSecurityConfigurationInput) (req *request.Request, output *CreateSecurityConfigurationOutput) { - op := &request.Operation{ - Name: opCreateSecurityConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSecurityConfigurationInput{} - } - - output = &CreateSecurityConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSecurityConfiguration API operation for AWS Glue. -// -// Creates a new security configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation CreateSecurityConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// A resource to be created or added already exists. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" -// A resource numerical limit was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateSecurityConfiguration -func (c *Glue) CreateSecurityConfiguration(input *CreateSecurityConfigurationInput) (*CreateSecurityConfigurationOutput, error) { - req, out := c.CreateSecurityConfigurationRequest(input) - return out, req.Send() -} - -// CreateSecurityConfigurationWithContext is the same as CreateSecurityConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSecurityConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) CreateSecurityConfigurationWithContext(ctx aws.Context, input *CreateSecurityConfigurationInput, opts ...request.Option) (*CreateSecurityConfigurationOutput, error) { - req, out := c.CreateSecurityConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTable = "CreateTable" - -// CreateTableRequest generates a "aws/request.Request" representing the -// client's request for the CreateTable operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTable for more information on using the CreateTable -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTableRequest method. -// req, resp := client.CreateTableRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateTable -func (c *Glue) CreateTableRequest(input *CreateTableInput) (req *request.Request, output *CreateTableOutput) { - op := &request.Operation{ - Name: opCreateTable, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTableInput{} - } - - output = &CreateTableOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateTable API operation for AWS Glue. -// -// Creates a new table definition in the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation CreateTable for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// A resource to be created or added already exists. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" -// A resource numerical limit was exceeded. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateTable -func (c *Glue) CreateTable(input *CreateTableInput) (*CreateTableOutput, error) { - req, out := c.CreateTableRequest(input) - return out, req.Send() -} - -// CreateTableWithContext is the same as CreateTable with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTable for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) CreateTableWithContext(ctx aws.Context, input *CreateTableInput, opts ...request.Option) (*CreateTableOutput, error) { - req, out := c.CreateTableRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTrigger = "CreateTrigger" - -// CreateTriggerRequest generates a "aws/request.Request" representing the -// client's request for the CreateTrigger operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTrigger for more information on using the CreateTrigger -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTriggerRequest method. -// req, resp := client.CreateTriggerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateTrigger -func (c *Glue) CreateTriggerRequest(input *CreateTriggerInput) (req *request.Request, output *CreateTriggerOutput) { - op := &request.Operation{ - Name: opCreateTrigger, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTriggerInput{} - } - - output = &CreateTriggerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTrigger API operation for AWS Glue. -// -// Creates a new trigger. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation CreateTrigger for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// A resource to be created or added already exists. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" -// The same unique identifier was associated with two different records. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" -// A resource numerical limit was exceeded. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Two processes are trying to modify a resource simultaneously. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateTrigger -func (c *Glue) CreateTrigger(input *CreateTriggerInput) (*CreateTriggerOutput, error) { - req, out := c.CreateTriggerRequest(input) - return out, req.Send() -} - -// CreateTriggerWithContext is the same as CreateTrigger with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTrigger for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) CreateTriggerWithContext(ctx aws.Context, input *CreateTriggerInput, opts ...request.Option) (*CreateTriggerOutput, error) { - req, out := c.CreateTriggerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateUserDefinedFunction = "CreateUserDefinedFunction" - -// CreateUserDefinedFunctionRequest generates a "aws/request.Request" representing the -// client's request for the CreateUserDefinedFunction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateUserDefinedFunction for more information on using the CreateUserDefinedFunction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateUserDefinedFunctionRequest method. -// req, resp := client.CreateUserDefinedFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateUserDefinedFunction -func (c *Glue) CreateUserDefinedFunctionRequest(input *CreateUserDefinedFunctionInput) (req *request.Request, output *CreateUserDefinedFunctionOutput) { - op := &request.Operation{ - Name: opCreateUserDefinedFunction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateUserDefinedFunctionInput{} - } - - output = &CreateUserDefinedFunctionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateUserDefinedFunction API operation for AWS Glue. -// -// Creates a new function definition in the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation CreateUserDefinedFunction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// A resource to be created or added already exists. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" -// A resource numerical limit was exceeded. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreateUserDefinedFunction -func (c *Glue) CreateUserDefinedFunction(input *CreateUserDefinedFunctionInput) (*CreateUserDefinedFunctionOutput, error) { - req, out := c.CreateUserDefinedFunctionRequest(input) - return out, req.Send() -} - -// CreateUserDefinedFunctionWithContext is the same as CreateUserDefinedFunction with the addition of -// the ability to pass a context and additional request options. -// -// See CreateUserDefinedFunction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) CreateUserDefinedFunctionWithContext(ctx aws.Context, input *CreateUserDefinedFunctionInput, opts ...request.Option) (*CreateUserDefinedFunctionOutput, error) { - req, out := c.CreateUserDefinedFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteClassifier = "DeleteClassifier" - -// DeleteClassifierRequest generates a "aws/request.Request" representing the -// client's request for the DeleteClassifier operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteClassifier for more information on using the DeleteClassifier -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteClassifierRequest method. -// req, resp := client.DeleteClassifierRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteClassifier -func (c *Glue) DeleteClassifierRequest(input *DeleteClassifierInput) (req *request.Request, output *DeleteClassifierOutput) { - op := &request.Operation{ - Name: opDeleteClassifier, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteClassifierInput{} - } - - output = &DeleteClassifierOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteClassifier API operation for AWS Glue. -// -// Removes a classifier from the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation DeleteClassifier for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteClassifier -func (c *Glue) DeleteClassifier(input *DeleteClassifierInput) (*DeleteClassifierOutput, error) { - req, out := c.DeleteClassifierRequest(input) - return out, req.Send() -} - -// DeleteClassifierWithContext is the same as DeleteClassifier with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteClassifier for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) DeleteClassifierWithContext(ctx aws.Context, input *DeleteClassifierInput, opts ...request.Option) (*DeleteClassifierOutput, error) { - req, out := c.DeleteClassifierRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteConnection = "DeleteConnection" - -// DeleteConnectionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteConnection for more information on using the DeleteConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteConnectionRequest method. -// req, resp := client.DeleteConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteConnection -func (c *Glue) DeleteConnectionRequest(input *DeleteConnectionInput) (req *request.Request, output *DeleteConnectionOutput) { - op := &request.Operation{ - Name: opDeleteConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteConnectionInput{} - } - - output = &DeleteConnectionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteConnection API operation for AWS Glue. -// -// Deletes a connection from the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation DeleteConnection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteConnection -func (c *Glue) DeleteConnection(input *DeleteConnectionInput) (*DeleteConnectionOutput, error) { - req, out := c.DeleteConnectionRequest(input) - return out, req.Send() -} - -// DeleteConnectionWithContext is the same as DeleteConnection with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) DeleteConnectionWithContext(ctx aws.Context, input *DeleteConnectionInput, opts ...request.Option) (*DeleteConnectionOutput, error) { - req, out := c.DeleteConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCrawler = "DeleteCrawler" - -// DeleteCrawlerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCrawler operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCrawler for more information on using the DeleteCrawler -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCrawlerRequest method. -// req, resp := client.DeleteCrawlerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteCrawler -func (c *Glue) DeleteCrawlerRequest(input *DeleteCrawlerInput) (req *request.Request, output *DeleteCrawlerOutput) { - op := &request.Operation{ - Name: opDeleteCrawler, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCrawlerInput{} - } - - output = &DeleteCrawlerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCrawler API operation for AWS Glue. -// -// Removes a specified crawler from the Data Catalog, unless the crawler state -// is RUNNING. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation DeleteCrawler for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeCrawlerRunningException "CrawlerRunningException" -// The operation cannot be performed because the crawler is already running. -// -// * ErrCodeSchedulerTransitioningException "SchedulerTransitioningException" -// The specified scheduler is transitioning. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteCrawler -func (c *Glue) DeleteCrawler(input *DeleteCrawlerInput) (*DeleteCrawlerOutput, error) { - req, out := c.DeleteCrawlerRequest(input) - return out, req.Send() -} - -// DeleteCrawlerWithContext is the same as DeleteCrawler with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCrawler for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) DeleteCrawlerWithContext(ctx aws.Context, input *DeleteCrawlerInput, opts ...request.Option) (*DeleteCrawlerOutput, error) { - req, out := c.DeleteCrawlerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDatabase = "DeleteDatabase" - -// DeleteDatabaseRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDatabase operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDatabase for more information on using the DeleteDatabase -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDatabaseRequest method. -// req, resp := client.DeleteDatabaseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteDatabase -func (c *Glue) DeleteDatabaseRequest(input *DeleteDatabaseInput) (req *request.Request, output *DeleteDatabaseOutput) { - op := &request.Operation{ - Name: opDeleteDatabase, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDatabaseInput{} - } - - output = &DeleteDatabaseOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDatabase API operation for AWS Glue. -// -// Removes a specified Database from a Data Catalog. -// -// After completing this operation, you will no longer have access to the tables -// (and all table versions and partitions that might belong to the tables) and -// the user-defined functions in the deleted database. AWS Glue deletes these -// "orphaned" resources asynchronously in a timely manner, at the discretion -// of the service. -// -// To ensure immediate deletion of all related resources, before calling DeleteDatabase, -// use DeleteTableVersion or BatchDeleteTableVersion, DeletePartition or BatchDeletePartition, -// DeleteUserDefinedFunction, and DeleteTable or BatchDeleteTable, to delete -// any resources that belong to the database. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation DeleteDatabase for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteDatabase -func (c *Glue) DeleteDatabase(input *DeleteDatabaseInput) (*DeleteDatabaseOutput, error) { - req, out := c.DeleteDatabaseRequest(input) - return out, req.Send() -} - -// DeleteDatabaseWithContext is the same as DeleteDatabase with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDatabase for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) DeleteDatabaseWithContext(ctx aws.Context, input *DeleteDatabaseInput, opts ...request.Option) (*DeleteDatabaseOutput, error) { - req, out := c.DeleteDatabaseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDevEndpoint = "DeleteDevEndpoint" - -// DeleteDevEndpointRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDevEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDevEndpoint for more information on using the DeleteDevEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDevEndpointRequest method. -// req, resp := client.DeleteDevEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteDevEndpoint -func (c *Glue) DeleteDevEndpointRequest(input *DeleteDevEndpointInput) (req *request.Request, output *DeleteDevEndpointOutput) { - op := &request.Operation{ - Name: opDeleteDevEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDevEndpointInput{} - } - - output = &DeleteDevEndpointOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDevEndpoint API operation for AWS Glue. -// -// Deletes a specified DevEndpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation DeleteDevEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteDevEndpoint -func (c *Glue) DeleteDevEndpoint(input *DeleteDevEndpointInput) (*DeleteDevEndpointOutput, error) { - req, out := c.DeleteDevEndpointRequest(input) - return out, req.Send() -} - -// DeleteDevEndpointWithContext is the same as DeleteDevEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDevEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) DeleteDevEndpointWithContext(ctx aws.Context, input *DeleteDevEndpointInput, opts ...request.Option) (*DeleteDevEndpointOutput, error) { - req, out := c.DeleteDevEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteJob = "DeleteJob" - -// DeleteJobRequest generates a "aws/request.Request" representing the -// client's request for the DeleteJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteJob for more information on using the DeleteJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteJobRequest method. -// req, resp := client.DeleteJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteJob -func (c *Glue) DeleteJobRequest(input *DeleteJobInput) (req *request.Request, output *DeleteJobOutput) { - op := &request.Operation{ - Name: opDeleteJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteJobInput{} - } - - output = &DeleteJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteJob API operation for AWS Glue. -// -// Deletes a specified job definition. If the job definition is not found, no -// exception is thrown. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation DeleteJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteJob -func (c *Glue) DeleteJob(input *DeleteJobInput) (*DeleteJobOutput, error) { - req, out := c.DeleteJobRequest(input) - return out, req.Send() -} - -// DeleteJobWithContext is the same as DeleteJob with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) DeleteJobWithContext(ctx aws.Context, input *DeleteJobInput, opts ...request.Option) (*DeleteJobOutput, error) { - req, out := c.DeleteJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePartition = "DeletePartition" - -// DeletePartitionRequest generates a "aws/request.Request" representing the -// client's request for the DeletePartition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePartition for more information on using the DeletePartition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePartitionRequest method. -// req, resp := client.DeletePartitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeletePartition -func (c *Glue) DeletePartitionRequest(input *DeletePartitionInput) (req *request.Request, output *DeletePartitionOutput) { - op := &request.Operation{ - Name: opDeletePartition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePartitionInput{} - } - - output = &DeletePartitionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePartition API operation for AWS Glue. -// -// Deletes a specified partition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation DeletePartition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeletePartition -func (c *Glue) DeletePartition(input *DeletePartitionInput) (*DeletePartitionOutput, error) { - req, out := c.DeletePartitionRequest(input) - return out, req.Send() -} - -// DeletePartitionWithContext is the same as DeletePartition with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePartition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) DeletePartitionWithContext(ctx aws.Context, input *DeletePartitionInput, opts ...request.Option) (*DeletePartitionOutput, error) { - req, out := c.DeletePartitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteResourcePolicy = "DeleteResourcePolicy" - -// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteResourcePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteResourcePolicy for more information on using the DeleteResourcePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteResourcePolicyRequest method. -// req, resp := client.DeleteResourcePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteResourcePolicy -func (c *Glue) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { - op := &request.Operation{ - Name: opDeleteResourcePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteResourcePolicyInput{} - } - - output = &DeleteResourcePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteResourcePolicy API operation for AWS Glue. -// -// Deletes a specified policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation DeleteResourcePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeConditionCheckFailureException "ConditionCheckFailureException" -// A specified condition was not satisfied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteResourcePolicy -func (c *Glue) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { - req, out := c.DeleteResourcePolicyRequest(input) - return out, req.Send() -} - -// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteResourcePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { - req, out := c.DeleteResourcePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSecurityConfiguration = "DeleteSecurityConfiguration" - -// DeleteSecurityConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSecurityConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSecurityConfiguration for more information on using the DeleteSecurityConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSecurityConfigurationRequest method. -// req, resp := client.DeleteSecurityConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteSecurityConfiguration -func (c *Glue) DeleteSecurityConfigurationRequest(input *DeleteSecurityConfigurationInput) (req *request.Request, output *DeleteSecurityConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteSecurityConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSecurityConfigurationInput{} - } - - output = &DeleteSecurityConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSecurityConfiguration API operation for AWS Glue. -// -// Deletes a specified security configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation DeleteSecurityConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteSecurityConfiguration -func (c *Glue) DeleteSecurityConfiguration(input *DeleteSecurityConfigurationInput) (*DeleteSecurityConfigurationOutput, error) { - req, out := c.DeleteSecurityConfigurationRequest(input) - return out, req.Send() -} - -// DeleteSecurityConfigurationWithContext is the same as DeleteSecurityConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSecurityConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) DeleteSecurityConfigurationWithContext(ctx aws.Context, input *DeleteSecurityConfigurationInput, opts ...request.Option) (*DeleteSecurityConfigurationOutput, error) { - req, out := c.DeleteSecurityConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTable = "DeleteTable" - -// DeleteTableRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTable operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTable for more information on using the DeleteTable -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTableRequest method. -// req, resp := client.DeleteTableRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteTable -func (c *Glue) DeleteTableRequest(input *DeleteTableInput) (req *request.Request, output *DeleteTableOutput) { - op := &request.Operation{ - Name: opDeleteTable, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTableInput{} - } - - output = &DeleteTableOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTable API operation for AWS Glue. -// -// Removes a table definition from the Data Catalog. -// -// After completing this operation, you will no longer have access to the table -// versions and partitions that belong to the deleted table. AWS Glue deletes -// these "orphaned" resources asynchronously in a timely manner, at the discretion -// of the service. -// -// To ensure immediate deletion of all related resources, before calling DeleteTable, -// use DeleteTableVersion or BatchDeleteTableVersion, and DeletePartition or -// BatchDeletePartition, to delete any resources that belong to the table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation DeleteTable for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteTable -func (c *Glue) DeleteTable(input *DeleteTableInput) (*DeleteTableOutput, error) { - req, out := c.DeleteTableRequest(input) - return out, req.Send() -} - -// DeleteTableWithContext is the same as DeleteTable with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTable for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) DeleteTableWithContext(ctx aws.Context, input *DeleteTableInput, opts ...request.Option) (*DeleteTableOutput, error) { - req, out := c.DeleteTableRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTableVersion = "DeleteTableVersion" - -// DeleteTableVersionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTableVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTableVersion for more information on using the DeleteTableVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTableVersionRequest method. -// req, resp := client.DeleteTableVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteTableVersion -func (c *Glue) DeleteTableVersionRequest(input *DeleteTableVersionInput) (req *request.Request, output *DeleteTableVersionOutput) { - op := &request.Operation{ - Name: opDeleteTableVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTableVersionInput{} - } - - output = &DeleteTableVersionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTableVersion API operation for AWS Glue. -// -// Deletes a specified version of a table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation DeleteTableVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteTableVersion -func (c *Glue) DeleteTableVersion(input *DeleteTableVersionInput) (*DeleteTableVersionOutput, error) { - req, out := c.DeleteTableVersionRequest(input) - return out, req.Send() -} - -// DeleteTableVersionWithContext is the same as DeleteTableVersion with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTableVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) DeleteTableVersionWithContext(ctx aws.Context, input *DeleteTableVersionInput, opts ...request.Option) (*DeleteTableVersionOutput, error) { - req, out := c.DeleteTableVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTrigger = "DeleteTrigger" - -// DeleteTriggerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTrigger operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTrigger for more information on using the DeleteTrigger -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTriggerRequest method. -// req, resp := client.DeleteTriggerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteTrigger -func (c *Glue) DeleteTriggerRequest(input *DeleteTriggerInput) (req *request.Request, output *DeleteTriggerOutput) { - op := &request.Operation{ - Name: opDeleteTrigger, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTriggerInput{} - } - - output = &DeleteTriggerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteTrigger API operation for AWS Glue. -// -// Deletes a specified trigger. If the trigger is not found, no exception is -// thrown. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation DeleteTrigger for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Two processes are trying to modify a resource simultaneously. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteTrigger -func (c *Glue) DeleteTrigger(input *DeleteTriggerInput) (*DeleteTriggerOutput, error) { - req, out := c.DeleteTriggerRequest(input) - return out, req.Send() -} - -// DeleteTriggerWithContext is the same as DeleteTrigger with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTrigger for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) DeleteTriggerWithContext(ctx aws.Context, input *DeleteTriggerInput, opts ...request.Option) (*DeleteTriggerOutput, error) { - req, out := c.DeleteTriggerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUserDefinedFunction = "DeleteUserDefinedFunction" - -// DeleteUserDefinedFunctionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUserDefinedFunction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUserDefinedFunction for more information on using the DeleteUserDefinedFunction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteUserDefinedFunctionRequest method. -// req, resp := client.DeleteUserDefinedFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteUserDefinedFunction -func (c *Glue) DeleteUserDefinedFunctionRequest(input *DeleteUserDefinedFunctionInput) (req *request.Request, output *DeleteUserDefinedFunctionOutput) { - op := &request.Operation{ - Name: opDeleteUserDefinedFunction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUserDefinedFunctionInput{} - } - - output = &DeleteUserDefinedFunctionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUserDefinedFunction API operation for AWS Glue. -// -// Deletes an existing function definition from the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation DeleteUserDefinedFunction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteUserDefinedFunction -func (c *Glue) DeleteUserDefinedFunction(input *DeleteUserDefinedFunctionInput) (*DeleteUserDefinedFunctionOutput, error) { - req, out := c.DeleteUserDefinedFunctionRequest(input) - return out, req.Send() -} - -// DeleteUserDefinedFunctionWithContext is the same as DeleteUserDefinedFunction with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUserDefinedFunction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) DeleteUserDefinedFunctionWithContext(ctx aws.Context, input *DeleteUserDefinedFunctionInput, opts ...request.Option) (*DeleteUserDefinedFunctionOutput, error) { - req, out := c.DeleteUserDefinedFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCatalogImportStatus = "GetCatalogImportStatus" - -// GetCatalogImportStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetCatalogImportStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCatalogImportStatus for more information on using the GetCatalogImportStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCatalogImportStatusRequest method. -// req, resp := client.GetCatalogImportStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetCatalogImportStatus -func (c *Glue) GetCatalogImportStatusRequest(input *GetCatalogImportStatusInput) (req *request.Request, output *GetCatalogImportStatusOutput) { - op := &request.Operation{ - Name: opGetCatalogImportStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCatalogImportStatusInput{} - } - - output = &GetCatalogImportStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCatalogImportStatus API operation for AWS Glue. -// -// Retrieves the status of a migration operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetCatalogImportStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetCatalogImportStatus -func (c *Glue) GetCatalogImportStatus(input *GetCatalogImportStatusInput) (*GetCatalogImportStatusOutput, error) { - req, out := c.GetCatalogImportStatusRequest(input) - return out, req.Send() -} - -// GetCatalogImportStatusWithContext is the same as GetCatalogImportStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetCatalogImportStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetCatalogImportStatusWithContext(ctx aws.Context, input *GetCatalogImportStatusInput, opts ...request.Option) (*GetCatalogImportStatusOutput, error) { - req, out := c.GetCatalogImportStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetClassifier = "GetClassifier" - -// GetClassifierRequest generates a "aws/request.Request" representing the -// client's request for the GetClassifier operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetClassifier for more information on using the GetClassifier -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetClassifierRequest method. -// req, resp := client.GetClassifierRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetClassifier -func (c *Glue) GetClassifierRequest(input *GetClassifierInput) (req *request.Request, output *GetClassifierOutput) { - op := &request.Operation{ - Name: opGetClassifier, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetClassifierInput{} - } - - output = &GetClassifierOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetClassifier API operation for AWS Glue. -// -// Retrieve a classifier by name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetClassifier for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetClassifier -func (c *Glue) GetClassifier(input *GetClassifierInput) (*GetClassifierOutput, error) { - req, out := c.GetClassifierRequest(input) - return out, req.Send() -} - -// GetClassifierWithContext is the same as GetClassifier with the addition of -// the ability to pass a context and additional request options. -// -// See GetClassifier for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetClassifierWithContext(ctx aws.Context, input *GetClassifierInput, opts ...request.Option) (*GetClassifierOutput, error) { - req, out := c.GetClassifierRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetClassifiers = "GetClassifiers" - -// GetClassifiersRequest generates a "aws/request.Request" representing the -// client's request for the GetClassifiers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetClassifiers for more information on using the GetClassifiers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetClassifiersRequest method. -// req, resp := client.GetClassifiersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetClassifiers -func (c *Glue) GetClassifiersRequest(input *GetClassifiersInput) (req *request.Request, output *GetClassifiersOutput) { - op := &request.Operation{ - Name: opGetClassifiers, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetClassifiersInput{} - } - - output = &GetClassifiersOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetClassifiers API operation for AWS Glue. -// -// Lists all classifier objects in the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetClassifiers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetClassifiers -func (c *Glue) GetClassifiers(input *GetClassifiersInput) (*GetClassifiersOutput, error) { - req, out := c.GetClassifiersRequest(input) - return out, req.Send() -} - -// GetClassifiersWithContext is the same as GetClassifiers with the addition of -// the ability to pass a context and additional request options. -// -// See GetClassifiers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetClassifiersWithContext(ctx aws.Context, input *GetClassifiersInput, opts ...request.Option) (*GetClassifiersOutput, error) { - req, out := c.GetClassifiersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetClassifiersPages iterates over the pages of a GetClassifiers operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetClassifiers 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 GetClassifiers operation. -// pageNum := 0 -// err := client.GetClassifiersPages(params, -// func(page *GetClassifiersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glue) GetClassifiersPages(input *GetClassifiersInput, fn func(*GetClassifiersOutput, bool) bool) error { - return c.GetClassifiersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetClassifiersPagesWithContext same as GetClassifiersPages 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 *Glue) GetClassifiersPagesWithContext(ctx aws.Context, input *GetClassifiersInput, fn func(*GetClassifiersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetClassifiersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetClassifiersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetClassifiersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetConnection = "GetConnection" - -// GetConnectionRequest generates a "aws/request.Request" representing the -// client's request for the GetConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetConnection for more information on using the GetConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetConnectionRequest method. -// req, resp := client.GetConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetConnection -func (c *Glue) GetConnectionRequest(input *GetConnectionInput) (req *request.Request, output *GetConnectionOutput) { - op := &request.Operation{ - Name: opGetConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetConnectionInput{} - } - - output = &GetConnectionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetConnection API operation for AWS Glue. -// -// Retrieves a connection definition from the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetConnection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetConnection -func (c *Glue) GetConnection(input *GetConnectionInput) (*GetConnectionOutput, error) { - req, out := c.GetConnectionRequest(input) - return out, req.Send() -} - -// GetConnectionWithContext is the same as GetConnection with the addition of -// the ability to pass a context and additional request options. -// -// See GetConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetConnectionWithContext(ctx aws.Context, input *GetConnectionInput, opts ...request.Option) (*GetConnectionOutput, error) { - req, out := c.GetConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetConnections = "GetConnections" - -// GetConnectionsRequest generates a "aws/request.Request" representing the -// client's request for the GetConnections operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetConnections for more information on using the GetConnections -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetConnectionsRequest method. -// req, resp := client.GetConnectionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetConnections -func (c *Glue) GetConnectionsRequest(input *GetConnectionsInput) (req *request.Request, output *GetConnectionsOutput) { - op := &request.Operation{ - Name: opGetConnections, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetConnectionsInput{} - } - - output = &GetConnectionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetConnections API operation for AWS Glue. -// -// Retrieves a list of connection definitions from the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetConnections for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetConnections -func (c *Glue) GetConnections(input *GetConnectionsInput) (*GetConnectionsOutput, error) { - req, out := c.GetConnectionsRequest(input) - return out, req.Send() -} - -// GetConnectionsWithContext is the same as GetConnections with the addition of -// the ability to pass a context and additional request options. -// -// See GetConnections for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetConnectionsWithContext(ctx aws.Context, input *GetConnectionsInput, opts ...request.Option) (*GetConnectionsOutput, error) { - req, out := c.GetConnectionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetConnectionsPages iterates over the pages of a GetConnections operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetConnections 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 GetConnections operation. -// pageNum := 0 -// err := client.GetConnectionsPages(params, -// func(page *GetConnectionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glue) GetConnectionsPages(input *GetConnectionsInput, fn func(*GetConnectionsOutput, bool) bool) error { - return c.GetConnectionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetConnectionsPagesWithContext same as GetConnectionsPages 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 *Glue) GetConnectionsPagesWithContext(ctx aws.Context, input *GetConnectionsInput, fn func(*GetConnectionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetConnectionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetConnectionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetConnectionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetCrawler = "GetCrawler" - -// GetCrawlerRequest generates a "aws/request.Request" representing the -// client's request for the GetCrawler operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCrawler for more information on using the GetCrawler -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCrawlerRequest method. -// req, resp := client.GetCrawlerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetCrawler -func (c *Glue) GetCrawlerRequest(input *GetCrawlerInput) (req *request.Request, output *GetCrawlerOutput) { - op := &request.Operation{ - Name: opGetCrawler, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCrawlerInput{} - } - - output = &GetCrawlerOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCrawler API operation for AWS Glue. -// -// Retrieves metadata for a specified crawler. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetCrawler for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetCrawler -func (c *Glue) GetCrawler(input *GetCrawlerInput) (*GetCrawlerOutput, error) { - req, out := c.GetCrawlerRequest(input) - return out, req.Send() -} - -// GetCrawlerWithContext is the same as GetCrawler with the addition of -// the ability to pass a context and additional request options. -// -// See GetCrawler for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetCrawlerWithContext(ctx aws.Context, input *GetCrawlerInput, opts ...request.Option) (*GetCrawlerOutput, error) { - req, out := c.GetCrawlerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCrawlerMetrics = "GetCrawlerMetrics" - -// GetCrawlerMetricsRequest generates a "aws/request.Request" representing the -// client's request for the GetCrawlerMetrics operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCrawlerMetrics for more information on using the GetCrawlerMetrics -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCrawlerMetricsRequest method. -// req, resp := client.GetCrawlerMetricsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetCrawlerMetrics -func (c *Glue) GetCrawlerMetricsRequest(input *GetCrawlerMetricsInput) (req *request.Request, output *GetCrawlerMetricsOutput) { - op := &request.Operation{ - Name: opGetCrawlerMetrics, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetCrawlerMetricsInput{} - } - - output = &GetCrawlerMetricsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCrawlerMetrics API operation for AWS Glue. -// -// Retrieves metrics about specified crawlers. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetCrawlerMetrics for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetCrawlerMetrics -func (c *Glue) GetCrawlerMetrics(input *GetCrawlerMetricsInput) (*GetCrawlerMetricsOutput, error) { - req, out := c.GetCrawlerMetricsRequest(input) - return out, req.Send() -} - -// GetCrawlerMetricsWithContext is the same as GetCrawlerMetrics with the addition of -// the ability to pass a context and additional request options. -// -// See GetCrawlerMetrics for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetCrawlerMetricsWithContext(ctx aws.Context, input *GetCrawlerMetricsInput, opts ...request.Option) (*GetCrawlerMetricsOutput, error) { - req, out := c.GetCrawlerMetricsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetCrawlerMetricsPages iterates over the pages of a GetCrawlerMetrics operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetCrawlerMetrics 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 GetCrawlerMetrics operation. -// pageNum := 0 -// err := client.GetCrawlerMetricsPages(params, -// func(page *GetCrawlerMetricsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glue) GetCrawlerMetricsPages(input *GetCrawlerMetricsInput, fn func(*GetCrawlerMetricsOutput, bool) bool) error { - return c.GetCrawlerMetricsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetCrawlerMetricsPagesWithContext same as GetCrawlerMetricsPages 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 *Glue) GetCrawlerMetricsPagesWithContext(ctx aws.Context, input *GetCrawlerMetricsInput, fn func(*GetCrawlerMetricsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetCrawlerMetricsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetCrawlerMetricsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetCrawlerMetricsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetCrawlers = "GetCrawlers" - -// GetCrawlersRequest generates a "aws/request.Request" representing the -// client's request for the GetCrawlers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCrawlers for more information on using the GetCrawlers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCrawlersRequest method. -// req, resp := client.GetCrawlersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetCrawlers -func (c *Glue) GetCrawlersRequest(input *GetCrawlersInput) (req *request.Request, output *GetCrawlersOutput) { - op := &request.Operation{ - Name: opGetCrawlers, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetCrawlersInput{} - } - - output = &GetCrawlersOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCrawlers API operation for AWS Glue. -// -// Retrieves metadata for all crawlers defined in the customer 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 Glue's -// API operation GetCrawlers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetCrawlers -func (c *Glue) GetCrawlers(input *GetCrawlersInput) (*GetCrawlersOutput, error) { - req, out := c.GetCrawlersRequest(input) - return out, req.Send() -} - -// GetCrawlersWithContext is the same as GetCrawlers with the addition of -// the ability to pass a context and additional request options. -// -// See GetCrawlers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetCrawlersWithContext(ctx aws.Context, input *GetCrawlersInput, opts ...request.Option) (*GetCrawlersOutput, error) { - req, out := c.GetCrawlersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetCrawlersPages iterates over the pages of a GetCrawlers operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetCrawlers 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 GetCrawlers operation. -// pageNum := 0 -// err := client.GetCrawlersPages(params, -// func(page *GetCrawlersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glue) GetCrawlersPages(input *GetCrawlersInput, fn func(*GetCrawlersOutput, bool) bool) error { - return c.GetCrawlersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetCrawlersPagesWithContext same as GetCrawlersPages 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 *Glue) GetCrawlersPagesWithContext(ctx aws.Context, input *GetCrawlersInput, fn func(*GetCrawlersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetCrawlersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetCrawlersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetCrawlersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetDataCatalogEncryptionSettings = "GetDataCatalogEncryptionSettings" - -// GetDataCatalogEncryptionSettingsRequest generates a "aws/request.Request" representing the -// client's request for the GetDataCatalogEncryptionSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDataCatalogEncryptionSettings for more information on using the GetDataCatalogEncryptionSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDataCatalogEncryptionSettingsRequest method. -// req, resp := client.GetDataCatalogEncryptionSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDataCatalogEncryptionSettings -func (c *Glue) GetDataCatalogEncryptionSettingsRequest(input *GetDataCatalogEncryptionSettingsInput) (req *request.Request, output *GetDataCatalogEncryptionSettingsOutput) { - op := &request.Operation{ - Name: opGetDataCatalogEncryptionSettings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDataCatalogEncryptionSettingsInput{} - } - - output = &GetDataCatalogEncryptionSettingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDataCatalogEncryptionSettings API operation for AWS Glue. -// -// Retrieves the security configuration for a specified catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetDataCatalogEncryptionSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDataCatalogEncryptionSettings -func (c *Glue) GetDataCatalogEncryptionSettings(input *GetDataCatalogEncryptionSettingsInput) (*GetDataCatalogEncryptionSettingsOutput, error) { - req, out := c.GetDataCatalogEncryptionSettingsRequest(input) - return out, req.Send() -} - -// GetDataCatalogEncryptionSettingsWithContext is the same as GetDataCatalogEncryptionSettings with the addition of -// the ability to pass a context and additional request options. -// -// See GetDataCatalogEncryptionSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetDataCatalogEncryptionSettingsWithContext(ctx aws.Context, input *GetDataCatalogEncryptionSettingsInput, opts ...request.Option) (*GetDataCatalogEncryptionSettingsOutput, error) { - req, out := c.GetDataCatalogEncryptionSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDatabase = "GetDatabase" - -// GetDatabaseRequest generates a "aws/request.Request" representing the -// client's request for the GetDatabase operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDatabase for more information on using the GetDatabase -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDatabaseRequest method. -// req, resp := client.GetDatabaseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDatabase -func (c *Glue) GetDatabaseRequest(input *GetDatabaseInput) (req *request.Request, output *GetDatabaseOutput) { - op := &request.Operation{ - Name: opGetDatabase, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDatabaseInput{} - } - - output = &GetDatabaseOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDatabase API operation for AWS Glue. -// -// Retrieves the definition of a specified database. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetDatabase for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDatabase -func (c *Glue) GetDatabase(input *GetDatabaseInput) (*GetDatabaseOutput, error) { - req, out := c.GetDatabaseRequest(input) - return out, req.Send() -} - -// GetDatabaseWithContext is the same as GetDatabase with the addition of -// the ability to pass a context and additional request options. -// -// See GetDatabase for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetDatabaseWithContext(ctx aws.Context, input *GetDatabaseInput, opts ...request.Option) (*GetDatabaseOutput, error) { - req, out := c.GetDatabaseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDatabases = "GetDatabases" - -// GetDatabasesRequest generates a "aws/request.Request" representing the -// client's request for the GetDatabases operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDatabases for more information on using the GetDatabases -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDatabasesRequest method. -// req, resp := client.GetDatabasesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDatabases -func (c *Glue) GetDatabasesRequest(input *GetDatabasesInput) (req *request.Request, output *GetDatabasesOutput) { - op := &request.Operation{ - Name: opGetDatabases, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetDatabasesInput{} - } - - output = &GetDatabasesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDatabases API operation for AWS Glue. -// -// Retrieves all Databases defined in a given Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetDatabases for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDatabases -func (c *Glue) GetDatabases(input *GetDatabasesInput) (*GetDatabasesOutput, error) { - req, out := c.GetDatabasesRequest(input) - return out, req.Send() -} - -// GetDatabasesWithContext is the same as GetDatabases with the addition of -// the ability to pass a context and additional request options. -// -// See GetDatabases for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetDatabasesWithContext(ctx aws.Context, input *GetDatabasesInput, opts ...request.Option) (*GetDatabasesOutput, error) { - req, out := c.GetDatabasesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetDatabasesPages iterates over the pages of a GetDatabases operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetDatabases 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 GetDatabases operation. -// pageNum := 0 -// err := client.GetDatabasesPages(params, -// func(page *GetDatabasesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glue) GetDatabasesPages(input *GetDatabasesInput, fn func(*GetDatabasesOutput, bool) bool) error { - return c.GetDatabasesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetDatabasesPagesWithContext same as GetDatabasesPages 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 *Glue) GetDatabasesPagesWithContext(ctx aws.Context, input *GetDatabasesInput, fn func(*GetDatabasesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetDatabasesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetDatabasesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetDatabasesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetDataflowGraph = "GetDataflowGraph" - -// GetDataflowGraphRequest generates a "aws/request.Request" representing the -// client's request for the GetDataflowGraph operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDataflowGraph for more information on using the GetDataflowGraph -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDataflowGraphRequest method. -// req, resp := client.GetDataflowGraphRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDataflowGraph -func (c *Glue) GetDataflowGraphRequest(input *GetDataflowGraphInput) (req *request.Request, output *GetDataflowGraphOutput) { - op := &request.Operation{ - Name: opGetDataflowGraph, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDataflowGraphInput{} - } - - output = &GetDataflowGraphOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDataflowGraph API operation for AWS Glue. -// -// Transforms a Python script into a directed acyclic graph (DAG). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetDataflowGraph for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDataflowGraph -func (c *Glue) GetDataflowGraph(input *GetDataflowGraphInput) (*GetDataflowGraphOutput, error) { - req, out := c.GetDataflowGraphRequest(input) - return out, req.Send() -} - -// GetDataflowGraphWithContext is the same as GetDataflowGraph with the addition of -// the ability to pass a context and additional request options. -// -// See GetDataflowGraph for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetDataflowGraphWithContext(ctx aws.Context, input *GetDataflowGraphInput, opts ...request.Option) (*GetDataflowGraphOutput, error) { - req, out := c.GetDataflowGraphRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDevEndpoint = "GetDevEndpoint" - -// GetDevEndpointRequest generates a "aws/request.Request" representing the -// client's request for the GetDevEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDevEndpoint for more information on using the GetDevEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDevEndpointRequest method. -// req, resp := client.GetDevEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDevEndpoint -func (c *Glue) GetDevEndpointRequest(input *GetDevEndpointInput) (req *request.Request, output *GetDevEndpointOutput) { - op := &request.Operation{ - Name: opGetDevEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDevEndpointInput{} - } - - output = &GetDevEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDevEndpoint API operation for AWS Glue. -// -// Retrieves information about a specified DevEndpoint. -// -// When you create a development endpoint in a virtual private cloud (VPC), -// AWS Glue returns only a private IP address, and the public IP address field -// is not populated. When you create a non-VPC development endpoint, AWS Glue -// returns only a public IP address. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetDevEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDevEndpoint -func (c *Glue) GetDevEndpoint(input *GetDevEndpointInput) (*GetDevEndpointOutput, error) { - req, out := c.GetDevEndpointRequest(input) - return out, req.Send() -} - -// GetDevEndpointWithContext is the same as GetDevEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See GetDevEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetDevEndpointWithContext(ctx aws.Context, input *GetDevEndpointInput, opts ...request.Option) (*GetDevEndpointOutput, error) { - req, out := c.GetDevEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDevEndpoints = "GetDevEndpoints" - -// GetDevEndpointsRequest generates a "aws/request.Request" representing the -// client's request for the GetDevEndpoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDevEndpoints for more information on using the GetDevEndpoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDevEndpointsRequest method. -// req, resp := client.GetDevEndpointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDevEndpoints -func (c *Glue) GetDevEndpointsRequest(input *GetDevEndpointsInput) (req *request.Request, output *GetDevEndpointsOutput) { - op := &request.Operation{ - Name: opGetDevEndpoints, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetDevEndpointsInput{} - } - - output = &GetDevEndpointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDevEndpoints API operation for AWS Glue. -// -// Retrieves all the DevEndpoints in this AWS account. -// -// When you create a development endpoint in a virtual private cloud (VPC), -// AWS Glue returns only a private IP address and the public IP address field -// is not populated. When you create a non-VPC development endpoint, AWS Glue -// returns only a public IP address. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetDevEndpoints for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDevEndpoints -func (c *Glue) GetDevEndpoints(input *GetDevEndpointsInput) (*GetDevEndpointsOutput, error) { - req, out := c.GetDevEndpointsRequest(input) - return out, req.Send() -} - -// GetDevEndpointsWithContext is the same as GetDevEndpoints with the addition of -// the ability to pass a context and additional request options. -// -// See GetDevEndpoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetDevEndpointsWithContext(ctx aws.Context, input *GetDevEndpointsInput, opts ...request.Option) (*GetDevEndpointsOutput, error) { - req, out := c.GetDevEndpointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetDevEndpointsPages iterates over the pages of a GetDevEndpoints operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetDevEndpoints 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 GetDevEndpoints operation. -// pageNum := 0 -// err := client.GetDevEndpointsPages(params, -// func(page *GetDevEndpointsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glue) GetDevEndpointsPages(input *GetDevEndpointsInput, fn func(*GetDevEndpointsOutput, bool) bool) error { - return c.GetDevEndpointsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetDevEndpointsPagesWithContext same as GetDevEndpointsPages 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 *Glue) GetDevEndpointsPagesWithContext(ctx aws.Context, input *GetDevEndpointsInput, fn func(*GetDevEndpointsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetDevEndpointsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetDevEndpointsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetDevEndpointsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetJob = "GetJob" - -// GetJobRequest generates a "aws/request.Request" representing the -// client's request for the GetJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetJob for more information on using the GetJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetJobRequest method. -// req, resp := client.GetJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetJob -func (c *Glue) GetJobRequest(input *GetJobInput) (req *request.Request, output *GetJobOutput) { - op := &request.Operation{ - Name: opGetJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetJobInput{} - } - - output = &GetJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetJob API operation for AWS Glue. -// -// Retrieves an existing job definition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetJob -func (c *Glue) GetJob(input *GetJobInput) (*GetJobOutput, error) { - req, out := c.GetJobRequest(input) - return out, req.Send() -} - -// GetJobWithContext is the same as GetJob with the addition of -// the ability to pass a context and additional request options. -// -// See GetJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetJobWithContext(ctx aws.Context, input *GetJobInput, opts ...request.Option) (*GetJobOutput, error) { - req, out := c.GetJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetJobRun = "GetJobRun" - -// GetJobRunRequest generates a "aws/request.Request" representing the -// client's request for the GetJobRun operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetJobRun for more information on using the GetJobRun -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetJobRunRequest method. -// req, resp := client.GetJobRunRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetJobRun -func (c *Glue) GetJobRunRequest(input *GetJobRunInput) (req *request.Request, output *GetJobRunOutput) { - op := &request.Operation{ - Name: opGetJobRun, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetJobRunInput{} - } - - output = &GetJobRunOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetJobRun API operation for AWS Glue. -// -// Retrieves the metadata for a given job run. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetJobRun for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetJobRun -func (c *Glue) GetJobRun(input *GetJobRunInput) (*GetJobRunOutput, error) { - req, out := c.GetJobRunRequest(input) - return out, req.Send() -} - -// GetJobRunWithContext is the same as GetJobRun with the addition of -// the ability to pass a context and additional request options. -// -// See GetJobRun for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetJobRunWithContext(ctx aws.Context, input *GetJobRunInput, opts ...request.Option) (*GetJobRunOutput, error) { - req, out := c.GetJobRunRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetJobRuns = "GetJobRuns" - -// GetJobRunsRequest generates a "aws/request.Request" representing the -// client's request for the GetJobRuns operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetJobRuns for more information on using the GetJobRuns -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetJobRunsRequest method. -// req, resp := client.GetJobRunsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetJobRuns -func (c *Glue) GetJobRunsRequest(input *GetJobRunsInput) (req *request.Request, output *GetJobRunsOutput) { - op := &request.Operation{ - Name: opGetJobRuns, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetJobRunsInput{} - } - - output = &GetJobRunsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetJobRuns API operation for AWS Glue. -// -// Retrieves metadata for all runs of a given job definition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetJobRuns for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetJobRuns -func (c *Glue) GetJobRuns(input *GetJobRunsInput) (*GetJobRunsOutput, error) { - req, out := c.GetJobRunsRequest(input) - return out, req.Send() -} - -// GetJobRunsWithContext is the same as GetJobRuns with the addition of -// the ability to pass a context and additional request options. -// -// See GetJobRuns for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetJobRunsWithContext(ctx aws.Context, input *GetJobRunsInput, opts ...request.Option) (*GetJobRunsOutput, error) { - req, out := c.GetJobRunsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetJobRunsPages iterates over the pages of a GetJobRuns operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetJobRuns 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 GetJobRuns operation. -// pageNum := 0 -// err := client.GetJobRunsPages(params, -// func(page *GetJobRunsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glue) GetJobRunsPages(input *GetJobRunsInput, fn func(*GetJobRunsOutput, bool) bool) error { - return c.GetJobRunsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetJobRunsPagesWithContext same as GetJobRunsPages 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 *Glue) GetJobRunsPagesWithContext(ctx aws.Context, input *GetJobRunsInput, fn func(*GetJobRunsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetJobRunsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetJobRunsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetJobRunsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetJobs = "GetJobs" - -// GetJobsRequest generates a "aws/request.Request" representing the -// client's request for the GetJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetJobs for more information on using the GetJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetJobsRequest method. -// req, resp := client.GetJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetJobs -func (c *Glue) GetJobsRequest(input *GetJobsInput) (req *request.Request, output *GetJobsOutput) { - op := &request.Operation{ - Name: opGetJobs, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetJobsInput{} - } - - output = &GetJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetJobs API operation for AWS Glue. -// -// Retrieves all current job definitions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetJobs -func (c *Glue) GetJobs(input *GetJobsInput) (*GetJobsOutput, error) { - req, out := c.GetJobsRequest(input) - return out, req.Send() -} - -// GetJobsWithContext is the same as GetJobs with the addition of -// the ability to pass a context and additional request options. -// -// See GetJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetJobsWithContext(ctx aws.Context, input *GetJobsInput, opts ...request.Option) (*GetJobsOutput, error) { - req, out := c.GetJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetJobsPages iterates over the pages of a GetJobs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetJobs 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 GetJobs operation. -// pageNum := 0 -// err := client.GetJobsPages(params, -// func(page *GetJobsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glue) GetJobsPages(input *GetJobsInput, fn func(*GetJobsOutput, bool) bool) error { - return c.GetJobsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetJobsPagesWithContext same as GetJobsPages 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 *Glue) GetJobsPagesWithContext(ctx aws.Context, input *GetJobsInput, fn func(*GetJobsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetJobsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetJobsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetJobsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetMapping = "GetMapping" - -// GetMappingRequest generates a "aws/request.Request" representing the -// client's request for the GetMapping operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMapping for more information on using the GetMapping -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMappingRequest method. -// req, resp := client.GetMappingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetMapping -func (c *Glue) GetMappingRequest(input *GetMappingInput) (req *request.Request, output *GetMappingOutput) { - op := &request.Operation{ - Name: opGetMapping, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetMappingInput{} - } - - output = &GetMappingOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMapping API operation for AWS Glue. -// -// Creates mappings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetMapping for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetMapping -func (c *Glue) GetMapping(input *GetMappingInput) (*GetMappingOutput, error) { - req, out := c.GetMappingRequest(input) - return out, req.Send() -} - -// GetMappingWithContext is the same as GetMapping with the addition of -// the ability to pass a context and additional request options. -// -// See GetMapping for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetMappingWithContext(ctx aws.Context, input *GetMappingInput, opts ...request.Option) (*GetMappingOutput, error) { - req, out := c.GetMappingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPartition = "GetPartition" - -// GetPartitionRequest generates a "aws/request.Request" representing the -// client's request for the GetPartition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPartition for more information on using the GetPartition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPartitionRequest method. -// req, resp := client.GetPartitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetPartition -func (c *Glue) GetPartitionRequest(input *GetPartitionInput) (req *request.Request, output *GetPartitionOutput) { - op := &request.Operation{ - Name: opGetPartition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPartitionInput{} - } - - output = &GetPartitionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPartition API operation for AWS Glue. -// -// Retrieves information about a specified partition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetPartition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetPartition -func (c *Glue) GetPartition(input *GetPartitionInput) (*GetPartitionOutput, error) { - req, out := c.GetPartitionRequest(input) - return out, req.Send() -} - -// GetPartitionWithContext is the same as GetPartition with the addition of -// the ability to pass a context and additional request options. -// -// See GetPartition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetPartitionWithContext(ctx aws.Context, input *GetPartitionInput, opts ...request.Option) (*GetPartitionOutput, error) { - req, out := c.GetPartitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPartitions = "GetPartitions" - -// GetPartitionsRequest generates a "aws/request.Request" representing the -// client's request for the GetPartitions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPartitions for more information on using the GetPartitions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPartitionsRequest method. -// req, resp := client.GetPartitionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetPartitions -func (c *Glue) GetPartitionsRequest(input *GetPartitionsInput) (req *request.Request, output *GetPartitionsOutput) { - op := &request.Operation{ - Name: opGetPartitions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetPartitionsInput{} - } - - output = &GetPartitionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPartitions API operation for AWS Glue. -// -// Retrieves information about the partitions in a table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetPartitions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetPartitions -func (c *Glue) GetPartitions(input *GetPartitionsInput) (*GetPartitionsOutput, error) { - req, out := c.GetPartitionsRequest(input) - return out, req.Send() -} - -// GetPartitionsWithContext is the same as GetPartitions with the addition of -// the ability to pass a context and additional request options. -// -// See GetPartitions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetPartitionsWithContext(ctx aws.Context, input *GetPartitionsInput, opts ...request.Option) (*GetPartitionsOutput, error) { - req, out := c.GetPartitionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetPartitionsPages iterates over the pages of a GetPartitions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetPartitions 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 GetPartitions operation. -// pageNum := 0 -// err := client.GetPartitionsPages(params, -// func(page *GetPartitionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glue) GetPartitionsPages(input *GetPartitionsInput, fn func(*GetPartitionsOutput, bool) bool) error { - return c.GetPartitionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetPartitionsPagesWithContext same as GetPartitionsPages 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 *Glue) GetPartitionsPagesWithContext(ctx aws.Context, input *GetPartitionsInput, fn func(*GetPartitionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetPartitionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetPartitionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetPartitionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetPlan = "GetPlan" - -// GetPlanRequest generates a "aws/request.Request" representing the -// client's request for the GetPlan operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPlan for more information on using the GetPlan -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPlanRequest method. -// req, resp := client.GetPlanRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetPlan -func (c *Glue) GetPlanRequest(input *GetPlanInput) (req *request.Request, output *GetPlanOutput) { - op := &request.Operation{ - Name: opGetPlan, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPlanInput{} - } - - output = &GetPlanOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPlan API operation for AWS Glue. -// -// Gets code to perform a specified mapping. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetPlan for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetPlan -func (c *Glue) GetPlan(input *GetPlanInput) (*GetPlanOutput, error) { - req, out := c.GetPlanRequest(input) - return out, req.Send() -} - -// GetPlanWithContext is the same as GetPlan with the addition of -// the ability to pass a context and additional request options. -// -// See GetPlan for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetPlanWithContext(ctx aws.Context, input *GetPlanInput, opts ...request.Option) (*GetPlanOutput, error) { - req, out := c.GetPlanRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetResourcePolicy = "GetResourcePolicy" - -// GetResourcePolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetResourcePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResourcePolicy for more information on using the GetResourcePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetResourcePolicyRequest method. -// req, resp := client.GetResourcePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetResourcePolicy -func (c *Glue) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { - op := &request.Operation{ - Name: opGetResourcePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetResourcePolicyInput{} - } - - output = &GetResourcePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResourcePolicy API operation for AWS Glue. -// -// Retrieves a specified resource policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetResourcePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetResourcePolicy -func (c *Glue) GetResourcePolicy(input *GetResourcePolicyInput) (*GetResourcePolicyOutput, error) { - req, out := c.GetResourcePolicyRequest(input) - return out, req.Send() -} - -// GetResourcePolicyWithContext is the same as GetResourcePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetResourcePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetResourcePolicyWithContext(ctx aws.Context, input *GetResourcePolicyInput, opts ...request.Option) (*GetResourcePolicyOutput, error) { - req, out := c.GetResourcePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSecurityConfiguration = "GetSecurityConfiguration" - -// GetSecurityConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetSecurityConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSecurityConfiguration for more information on using the GetSecurityConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSecurityConfigurationRequest method. -// req, resp := client.GetSecurityConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetSecurityConfiguration -func (c *Glue) GetSecurityConfigurationRequest(input *GetSecurityConfigurationInput) (req *request.Request, output *GetSecurityConfigurationOutput) { - op := &request.Operation{ - Name: opGetSecurityConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSecurityConfigurationInput{} - } - - output = &GetSecurityConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSecurityConfiguration API operation for AWS Glue. -// -// Retrieves a specified security configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetSecurityConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetSecurityConfiguration -func (c *Glue) GetSecurityConfiguration(input *GetSecurityConfigurationInput) (*GetSecurityConfigurationOutput, error) { - req, out := c.GetSecurityConfigurationRequest(input) - return out, req.Send() -} - -// GetSecurityConfigurationWithContext is the same as GetSecurityConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetSecurityConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetSecurityConfigurationWithContext(ctx aws.Context, input *GetSecurityConfigurationInput, opts ...request.Option) (*GetSecurityConfigurationOutput, error) { - req, out := c.GetSecurityConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSecurityConfigurations = "GetSecurityConfigurations" - -// GetSecurityConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the GetSecurityConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSecurityConfigurations for more information on using the GetSecurityConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSecurityConfigurationsRequest method. -// req, resp := client.GetSecurityConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetSecurityConfigurations -func (c *Glue) GetSecurityConfigurationsRequest(input *GetSecurityConfigurationsInput) (req *request.Request, output *GetSecurityConfigurationsOutput) { - op := &request.Operation{ - Name: opGetSecurityConfigurations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSecurityConfigurationsInput{} - } - - output = &GetSecurityConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSecurityConfigurations API operation for AWS Glue. -// -// Retrieves a list of all security 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 Glue's -// API operation GetSecurityConfigurations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetSecurityConfigurations -func (c *Glue) GetSecurityConfigurations(input *GetSecurityConfigurationsInput) (*GetSecurityConfigurationsOutput, error) { - req, out := c.GetSecurityConfigurationsRequest(input) - return out, req.Send() -} - -// GetSecurityConfigurationsWithContext is the same as GetSecurityConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See GetSecurityConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetSecurityConfigurationsWithContext(ctx aws.Context, input *GetSecurityConfigurationsInput, opts ...request.Option) (*GetSecurityConfigurationsOutput, error) { - req, out := c.GetSecurityConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTable = "GetTable" - -// GetTableRequest generates a "aws/request.Request" representing the -// client's request for the GetTable operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTable for more information on using the GetTable -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTableRequest method. -// req, resp := client.GetTableRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTable -func (c *Glue) GetTableRequest(input *GetTableInput) (req *request.Request, output *GetTableOutput) { - op := &request.Operation{ - Name: opGetTable, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTableInput{} - } - - output = &GetTableOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTable API operation for AWS Glue. -// -// Retrieves the Table definition in a Data Catalog for a specified table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetTable for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTable -func (c *Glue) GetTable(input *GetTableInput) (*GetTableOutput, error) { - req, out := c.GetTableRequest(input) - return out, req.Send() -} - -// GetTableWithContext is the same as GetTable with the addition of -// the ability to pass a context and additional request options. -// -// See GetTable for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetTableWithContext(ctx aws.Context, input *GetTableInput, opts ...request.Option) (*GetTableOutput, error) { - req, out := c.GetTableRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTableVersion = "GetTableVersion" - -// GetTableVersionRequest generates a "aws/request.Request" representing the -// client's request for the GetTableVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTableVersion for more information on using the GetTableVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTableVersionRequest method. -// req, resp := client.GetTableVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTableVersion -func (c *Glue) GetTableVersionRequest(input *GetTableVersionInput) (req *request.Request, output *GetTableVersionOutput) { - op := &request.Operation{ - Name: opGetTableVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTableVersionInput{} - } - - output = &GetTableVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTableVersion API operation for AWS Glue. -// -// Retrieves a specified version of a table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetTableVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTableVersion -func (c *Glue) GetTableVersion(input *GetTableVersionInput) (*GetTableVersionOutput, error) { - req, out := c.GetTableVersionRequest(input) - return out, req.Send() -} - -// GetTableVersionWithContext is the same as GetTableVersion with the addition of -// the ability to pass a context and additional request options. -// -// See GetTableVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetTableVersionWithContext(ctx aws.Context, input *GetTableVersionInput, opts ...request.Option) (*GetTableVersionOutput, error) { - req, out := c.GetTableVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTableVersions = "GetTableVersions" - -// GetTableVersionsRequest generates a "aws/request.Request" representing the -// client's request for the GetTableVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTableVersions for more information on using the GetTableVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTableVersionsRequest method. -// req, resp := client.GetTableVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTableVersions -func (c *Glue) GetTableVersionsRequest(input *GetTableVersionsInput) (req *request.Request, output *GetTableVersionsOutput) { - op := &request.Operation{ - Name: opGetTableVersions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetTableVersionsInput{} - } - - output = &GetTableVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTableVersions API operation for AWS Glue. -// -// Retrieves a list of strings that identify available versions of a specified -// table. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetTableVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTableVersions -func (c *Glue) GetTableVersions(input *GetTableVersionsInput) (*GetTableVersionsOutput, error) { - req, out := c.GetTableVersionsRequest(input) - return out, req.Send() -} - -// GetTableVersionsWithContext is the same as GetTableVersions with the addition of -// the ability to pass a context and additional request options. -// -// See GetTableVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetTableVersionsWithContext(ctx aws.Context, input *GetTableVersionsInput, opts ...request.Option) (*GetTableVersionsOutput, error) { - req, out := c.GetTableVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetTableVersionsPages iterates over the pages of a GetTableVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetTableVersions 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 GetTableVersions operation. -// pageNum := 0 -// err := client.GetTableVersionsPages(params, -// func(page *GetTableVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glue) GetTableVersionsPages(input *GetTableVersionsInput, fn func(*GetTableVersionsOutput, bool) bool) error { - return c.GetTableVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetTableVersionsPagesWithContext same as GetTableVersionsPages 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 *Glue) GetTableVersionsPagesWithContext(ctx aws.Context, input *GetTableVersionsInput, fn func(*GetTableVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetTableVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetTableVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetTableVersionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetTables = "GetTables" - -// GetTablesRequest generates a "aws/request.Request" representing the -// client's request for the GetTables operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTables for more information on using the GetTables -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTablesRequest method. -// req, resp := client.GetTablesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTables -func (c *Glue) GetTablesRequest(input *GetTablesInput) (req *request.Request, output *GetTablesOutput) { - op := &request.Operation{ - Name: opGetTables, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetTablesInput{} - } - - output = &GetTablesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTables API operation for AWS Glue. -// -// Retrieves the definitions of some or all of the tables in a given Database. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetTables for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTables -func (c *Glue) GetTables(input *GetTablesInput) (*GetTablesOutput, error) { - req, out := c.GetTablesRequest(input) - return out, req.Send() -} - -// GetTablesWithContext is the same as GetTables with the addition of -// the ability to pass a context and additional request options. -// -// See GetTables for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetTablesWithContext(ctx aws.Context, input *GetTablesInput, opts ...request.Option) (*GetTablesOutput, error) { - req, out := c.GetTablesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetTablesPages iterates over the pages of a GetTables operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetTables 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 GetTables operation. -// pageNum := 0 -// err := client.GetTablesPages(params, -// func(page *GetTablesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glue) GetTablesPages(input *GetTablesInput, fn func(*GetTablesOutput, bool) bool) error { - return c.GetTablesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetTablesPagesWithContext same as GetTablesPages 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 *Glue) GetTablesPagesWithContext(ctx aws.Context, input *GetTablesInput, fn func(*GetTablesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetTablesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetTablesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetTablesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetTrigger = "GetTrigger" - -// GetTriggerRequest generates a "aws/request.Request" representing the -// client's request for the GetTrigger operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTrigger for more information on using the GetTrigger -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTriggerRequest method. -// req, resp := client.GetTriggerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTrigger -func (c *Glue) GetTriggerRequest(input *GetTriggerInput) (req *request.Request, output *GetTriggerOutput) { - op := &request.Operation{ - Name: opGetTrigger, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTriggerInput{} - } - - output = &GetTriggerOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTrigger API operation for AWS Glue. -// -// Retrieves the definition of a trigger. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetTrigger for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTrigger -func (c *Glue) GetTrigger(input *GetTriggerInput) (*GetTriggerOutput, error) { - req, out := c.GetTriggerRequest(input) - return out, req.Send() -} - -// GetTriggerWithContext is the same as GetTrigger with the addition of -// the ability to pass a context and additional request options. -// -// See GetTrigger for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetTriggerWithContext(ctx aws.Context, input *GetTriggerInput, opts ...request.Option) (*GetTriggerOutput, error) { - req, out := c.GetTriggerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTriggers = "GetTriggers" - -// GetTriggersRequest generates a "aws/request.Request" representing the -// client's request for the GetTriggers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTriggers for more information on using the GetTriggers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTriggersRequest method. -// req, resp := client.GetTriggersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTriggers -func (c *Glue) GetTriggersRequest(input *GetTriggersInput) (req *request.Request, output *GetTriggersOutput) { - op := &request.Operation{ - Name: opGetTriggers, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetTriggersInput{} - } - - output = &GetTriggersOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTriggers API operation for AWS Glue. -// -// Gets all the triggers associated with a 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 Glue's -// API operation GetTriggers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetTriggers -func (c *Glue) GetTriggers(input *GetTriggersInput) (*GetTriggersOutput, error) { - req, out := c.GetTriggersRequest(input) - return out, req.Send() -} - -// GetTriggersWithContext is the same as GetTriggers with the addition of -// the ability to pass a context and additional request options. -// -// See GetTriggers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetTriggersWithContext(ctx aws.Context, input *GetTriggersInput, opts ...request.Option) (*GetTriggersOutput, error) { - req, out := c.GetTriggersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetTriggersPages iterates over the pages of a GetTriggers operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetTriggers 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 GetTriggers operation. -// pageNum := 0 -// err := client.GetTriggersPages(params, -// func(page *GetTriggersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glue) GetTriggersPages(input *GetTriggersInput, fn func(*GetTriggersOutput, bool) bool) error { - return c.GetTriggersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetTriggersPagesWithContext same as GetTriggersPages 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 *Glue) GetTriggersPagesWithContext(ctx aws.Context, input *GetTriggersInput, fn func(*GetTriggersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetTriggersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetTriggersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetTriggersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetUserDefinedFunction = "GetUserDefinedFunction" - -// GetUserDefinedFunctionRequest generates a "aws/request.Request" representing the -// client's request for the GetUserDefinedFunction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUserDefinedFunction for more information on using the GetUserDefinedFunction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUserDefinedFunctionRequest method. -// req, resp := client.GetUserDefinedFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetUserDefinedFunction -func (c *Glue) GetUserDefinedFunctionRequest(input *GetUserDefinedFunctionInput) (req *request.Request, output *GetUserDefinedFunctionOutput) { - op := &request.Operation{ - Name: opGetUserDefinedFunction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetUserDefinedFunctionInput{} - } - - output = &GetUserDefinedFunctionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUserDefinedFunction API operation for AWS Glue. -// -// Retrieves a specified function definition from the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetUserDefinedFunction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetUserDefinedFunction -func (c *Glue) GetUserDefinedFunction(input *GetUserDefinedFunctionInput) (*GetUserDefinedFunctionOutput, error) { - req, out := c.GetUserDefinedFunctionRequest(input) - return out, req.Send() -} - -// GetUserDefinedFunctionWithContext is the same as GetUserDefinedFunction with the addition of -// the ability to pass a context and additional request options. -// -// See GetUserDefinedFunction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetUserDefinedFunctionWithContext(ctx aws.Context, input *GetUserDefinedFunctionInput, opts ...request.Option) (*GetUserDefinedFunctionOutput, error) { - req, out := c.GetUserDefinedFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUserDefinedFunctions = "GetUserDefinedFunctions" - -// GetUserDefinedFunctionsRequest generates a "aws/request.Request" representing the -// client's request for the GetUserDefinedFunctions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUserDefinedFunctions for more information on using the GetUserDefinedFunctions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUserDefinedFunctionsRequest method. -// req, resp := client.GetUserDefinedFunctionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetUserDefinedFunctions -func (c *Glue) GetUserDefinedFunctionsRequest(input *GetUserDefinedFunctionsInput) (req *request.Request, output *GetUserDefinedFunctionsOutput) { - op := &request.Operation{ - Name: opGetUserDefinedFunctions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetUserDefinedFunctionsInput{} - } - - output = &GetUserDefinedFunctionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUserDefinedFunctions API operation for AWS Glue. -// -// Retrieves a multiple function definitions from the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation GetUserDefinedFunctions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetUserDefinedFunctions -func (c *Glue) GetUserDefinedFunctions(input *GetUserDefinedFunctionsInput) (*GetUserDefinedFunctionsOutput, error) { - req, out := c.GetUserDefinedFunctionsRequest(input) - return out, req.Send() -} - -// GetUserDefinedFunctionsWithContext is the same as GetUserDefinedFunctions with the addition of -// the ability to pass a context and additional request options. -// -// See GetUserDefinedFunctions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) GetUserDefinedFunctionsWithContext(ctx aws.Context, input *GetUserDefinedFunctionsInput, opts ...request.Option) (*GetUserDefinedFunctionsOutput, error) { - req, out := c.GetUserDefinedFunctionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetUserDefinedFunctionsPages iterates over the pages of a GetUserDefinedFunctions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetUserDefinedFunctions 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 GetUserDefinedFunctions operation. -// pageNum := 0 -// err := client.GetUserDefinedFunctionsPages(params, -// func(page *GetUserDefinedFunctionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Glue) GetUserDefinedFunctionsPages(input *GetUserDefinedFunctionsInput, fn func(*GetUserDefinedFunctionsOutput, bool) bool) error { - return c.GetUserDefinedFunctionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetUserDefinedFunctionsPagesWithContext same as GetUserDefinedFunctionsPages 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 *Glue) GetUserDefinedFunctionsPagesWithContext(ctx aws.Context, input *GetUserDefinedFunctionsInput, fn func(*GetUserDefinedFunctionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetUserDefinedFunctionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetUserDefinedFunctionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetUserDefinedFunctionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opImportCatalogToGlue = "ImportCatalogToGlue" - -// ImportCatalogToGlueRequest generates a "aws/request.Request" representing the -// client's request for the ImportCatalogToGlue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportCatalogToGlue for more information on using the ImportCatalogToGlue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportCatalogToGlueRequest method. -// req, resp := client.ImportCatalogToGlueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/ImportCatalogToGlue -func (c *Glue) ImportCatalogToGlueRequest(input *ImportCatalogToGlueInput) (req *request.Request, output *ImportCatalogToGlueOutput) { - op := &request.Operation{ - Name: opImportCatalogToGlue, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportCatalogToGlueInput{} - } - - output = &ImportCatalogToGlueOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ImportCatalogToGlue API operation for AWS Glue. -// -// Imports an existing Athena Data Catalog to AWS Glue -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation ImportCatalogToGlue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/ImportCatalogToGlue -func (c *Glue) ImportCatalogToGlue(input *ImportCatalogToGlueInput) (*ImportCatalogToGlueOutput, error) { - req, out := c.ImportCatalogToGlueRequest(input) - return out, req.Send() -} - -// ImportCatalogToGlueWithContext is the same as ImportCatalogToGlue with the addition of -// the ability to pass a context and additional request options. -// -// See ImportCatalogToGlue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) ImportCatalogToGlueWithContext(ctx aws.Context, input *ImportCatalogToGlueInput, opts ...request.Option) (*ImportCatalogToGlueOutput, error) { - req, out := c.ImportCatalogToGlueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutDataCatalogEncryptionSettings = "PutDataCatalogEncryptionSettings" - -// PutDataCatalogEncryptionSettingsRequest generates a "aws/request.Request" representing the -// client's request for the PutDataCatalogEncryptionSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutDataCatalogEncryptionSettings for more information on using the PutDataCatalogEncryptionSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutDataCatalogEncryptionSettingsRequest method. -// req, resp := client.PutDataCatalogEncryptionSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/PutDataCatalogEncryptionSettings -func (c *Glue) PutDataCatalogEncryptionSettingsRequest(input *PutDataCatalogEncryptionSettingsInput) (req *request.Request, output *PutDataCatalogEncryptionSettingsOutput) { - op := &request.Operation{ - Name: opPutDataCatalogEncryptionSettings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutDataCatalogEncryptionSettingsInput{} - } - - output = &PutDataCatalogEncryptionSettingsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutDataCatalogEncryptionSettings API operation for AWS Glue. -// -// Sets the security configuration for a specified catalog. Once the configuration -// has been set, the specified encryption is applied to every catalog write -// thereafter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation PutDataCatalogEncryptionSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/PutDataCatalogEncryptionSettings -func (c *Glue) PutDataCatalogEncryptionSettings(input *PutDataCatalogEncryptionSettingsInput) (*PutDataCatalogEncryptionSettingsOutput, error) { - req, out := c.PutDataCatalogEncryptionSettingsRequest(input) - return out, req.Send() -} - -// PutDataCatalogEncryptionSettingsWithContext is the same as PutDataCatalogEncryptionSettings with the addition of -// the ability to pass a context and additional request options. -// -// See PutDataCatalogEncryptionSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) PutDataCatalogEncryptionSettingsWithContext(ctx aws.Context, input *PutDataCatalogEncryptionSettingsInput, opts ...request.Option) (*PutDataCatalogEncryptionSettingsOutput, error) { - req, out := c.PutDataCatalogEncryptionSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutResourcePolicy = "PutResourcePolicy" - -// PutResourcePolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutResourcePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutResourcePolicy for more information on using the PutResourcePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutResourcePolicyRequest method. -// req, resp := client.PutResourcePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/PutResourcePolicy -func (c *Glue) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) { - op := &request.Operation{ - Name: opPutResourcePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutResourcePolicyInput{} - } - - output = &PutResourcePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutResourcePolicy API operation for AWS Glue. -// -// Sets the Data Catalog resource policy for access control. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation PutResourcePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeConditionCheckFailureException "ConditionCheckFailureException" -// A specified condition was not satisfied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/PutResourcePolicy -func (c *Glue) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { - req, out := c.PutResourcePolicyRequest(input) - return out, req.Send() -} - -// PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutResourcePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) { - req, out := c.PutResourcePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetJobBookmark = "ResetJobBookmark" - -// ResetJobBookmarkRequest generates a "aws/request.Request" representing the -// client's request for the ResetJobBookmark operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetJobBookmark for more information on using the ResetJobBookmark -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetJobBookmarkRequest method. -// req, resp := client.ResetJobBookmarkRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/ResetJobBookmark -func (c *Glue) ResetJobBookmarkRequest(input *ResetJobBookmarkInput) (req *request.Request, output *ResetJobBookmarkOutput) { - op := &request.Operation{ - Name: opResetJobBookmark, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetJobBookmarkInput{} - } - - output = &ResetJobBookmarkOutput{} - req = c.newRequest(op, input, output) - return -} - -// ResetJobBookmark API operation for AWS Glue. -// -// Resets a bookmark entry. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation ResetJobBookmark for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/ResetJobBookmark -func (c *Glue) ResetJobBookmark(input *ResetJobBookmarkInput) (*ResetJobBookmarkOutput, error) { - req, out := c.ResetJobBookmarkRequest(input) - return out, req.Send() -} - -// ResetJobBookmarkWithContext is the same as ResetJobBookmark with the addition of -// the ability to pass a context and additional request options. -// -// See ResetJobBookmark for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) ResetJobBookmarkWithContext(ctx aws.Context, input *ResetJobBookmarkInput, opts ...request.Option) (*ResetJobBookmarkOutput, error) { - req, out := c.ResetJobBookmarkRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartCrawler = "StartCrawler" - -// StartCrawlerRequest generates a "aws/request.Request" representing the -// client's request for the StartCrawler operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartCrawler for more information on using the StartCrawler -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartCrawlerRequest method. -// req, resp := client.StartCrawlerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StartCrawler -func (c *Glue) StartCrawlerRequest(input *StartCrawlerInput) (req *request.Request, output *StartCrawlerOutput) { - op := &request.Operation{ - Name: opStartCrawler, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartCrawlerInput{} - } - - output = &StartCrawlerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartCrawler API operation for AWS Glue. -// -// Starts a crawl using the specified crawler, regardless of what is scheduled. -// If the crawler is already running, returns a CrawlerRunningException (https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-exceptions.html#aws-glue-api-exceptions-CrawlerRunningException). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation StartCrawler for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeCrawlerRunningException "CrawlerRunningException" -// The operation cannot be performed because the crawler is already running. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StartCrawler -func (c *Glue) StartCrawler(input *StartCrawlerInput) (*StartCrawlerOutput, error) { - req, out := c.StartCrawlerRequest(input) - return out, req.Send() -} - -// StartCrawlerWithContext is the same as StartCrawler with the addition of -// the ability to pass a context and additional request options. -// -// See StartCrawler for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) StartCrawlerWithContext(ctx aws.Context, input *StartCrawlerInput, opts ...request.Option) (*StartCrawlerOutput, error) { - req, out := c.StartCrawlerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartCrawlerSchedule = "StartCrawlerSchedule" - -// StartCrawlerScheduleRequest generates a "aws/request.Request" representing the -// client's request for the StartCrawlerSchedule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartCrawlerSchedule for more information on using the StartCrawlerSchedule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartCrawlerScheduleRequest method. -// req, resp := client.StartCrawlerScheduleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StartCrawlerSchedule -func (c *Glue) StartCrawlerScheduleRequest(input *StartCrawlerScheduleInput) (req *request.Request, output *StartCrawlerScheduleOutput) { - op := &request.Operation{ - Name: opStartCrawlerSchedule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartCrawlerScheduleInput{} - } - - output = &StartCrawlerScheduleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartCrawlerSchedule API operation for AWS Glue. -// -// Changes the schedule state of the specified crawler to SCHEDULED, unless -// the crawler is already running or the schedule state is already SCHEDULED. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation StartCrawlerSchedule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeSchedulerRunningException "SchedulerRunningException" -// The specified scheduler is already running. -// -// * ErrCodeSchedulerTransitioningException "SchedulerTransitioningException" -// The specified scheduler is transitioning. -// -// * ErrCodeNoScheduleException "NoScheduleException" -// There is no applicable schedule. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StartCrawlerSchedule -func (c *Glue) StartCrawlerSchedule(input *StartCrawlerScheduleInput) (*StartCrawlerScheduleOutput, error) { - req, out := c.StartCrawlerScheduleRequest(input) - return out, req.Send() -} - -// StartCrawlerScheduleWithContext is the same as StartCrawlerSchedule with the addition of -// the ability to pass a context and additional request options. -// -// See StartCrawlerSchedule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) StartCrawlerScheduleWithContext(ctx aws.Context, input *StartCrawlerScheduleInput, opts ...request.Option) (*StartCrawlerScheduleOutput, error) { - req, out := c.StartCrawlerScheduleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartJobRun = "StartJobRun" - -// StartJobRunRequest generates a "aws/request.Request" representing the -// client's request for the StartJobRun operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartJobRun for more information on using the StartJobRun -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartJobRunRequest method. -// req, resp := client.StartJobRunRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StartJobRun -func (c *Glue) StartJobRunRequest(input *StartJobRunInput) (req *request.Request, output *StartJobRunOutput) { - op := &request.Operation{ - Name: opStartJobRun, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartJobRunInput{} - } - - output = &StartJobRunOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartJobRun API operation for AWS Glue. -// -// Starts a job run using a job definition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation StartJobRun for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" -// A resource numerical limit was exceeded. -// -// * ErrCodeConcurrentRunsExceededException "ConcurrentRunsExceededException" -// Too many jobs are being run concurrently. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StartJobRun -func (c *Glue) StartJobRun(input *StartJobRunInput) (*StartJobRunOutput, error) { - req, out := c.StartJobRunRequest(input) - return out, req.Send() -} - -// StartJobRunWithContext is the same as StartJobRun with the addition of -// the ability to pass a context and additional request options. -// -// See StartJobRun for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) StartJobRunWithContext(ctx aws.Context, input *StartJobRunInput, opts ...request.Option) (*StartJobRunOutput, error) { - req, out := c.StartJobRunRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartTrigger = "StartTrigger" - -// StartTriggerRequest generates a "aws/request.Request" representing the -// client's request for the StartTrigger operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartTrigger for more information on using the StartTrigger -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartTriggerRequest method. -// req, resp := client.StartTriggerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StartTrigger -func (c *Glue) StartTriggerRequest(input *StartTriggerInput) (req *request.Request, output *StartTriggerOutput) { - op := &request.Operation{ - Name: opStartTrigger, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartTriggerInput{} - } - - output = &StartTriggerOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartTrigger API operation for AWS Glue. -// -// Starts an existing trigger. See Triggering Jobs (http://docs.aws.amazon.com/glue/latest/dg/trigger-job.html) -// for information about how different types of trigger are started. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation StartTrigger for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" -// A resource numerical limit was exceeded. -// -// * ErrCodeConcurrentRunsExceededException "ConcurrentRunsExceededException" -// Too many jobs are being run concurrently. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StartTrigger -func (c *Glue) StartTrigger(input *StartTriggerInput) (*StartTriggerOutput, error) { - req, out := c.StartTriggerRequest(input) - return out, req.Send() -} - -// StartTriggerWithContext is the same as StartTrigger with the addition of -// the ability to pass a context and additional request options. -// -// See StartTrigger for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) StartTriggerWithContext(ctx aws.Context, input *StartTriggerInput, opts ...request.Option) (*StartTriggerOutput, error) { - req, out := c.StartTriggerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopCrawler = "StopCrawler" - -// StopCrawlerRequest generates a "aws/request.Request" representing the -// client's request for the StopCrawler operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopCrawler for more information on using the StopCrawler -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopCrawlerRequest method. -// req, resp := client.StopCrawlerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StopCrawler -func (c *Glue) StopCrawlerRequest(input *StopCrawlerInput) (req *request.Request, output *StopCrawlerOutput) { - op := &request.Operation{ - Name: opStopCrawler, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopCrawlerInput{} - } - - output = &StopCrawlerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopCrawler API operation for AWS Glue. -// -// If the specified crawler is running, stops the crawl. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation StopCrawler for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeCrawlerNotRunningException "CrawlerNotRunningException" -// The specified crawler is not running. -// -// * ErrCodeCrawlerStoppingException "CrawlerStoppingException" -// The specified crawler is stopping. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StopCrawler -func (c *Glue) StopCrawler(input *StopCrawlerInput) (*StopCrawlerOutput, error) { - req, out := c.StopCrawlerRequest(input) - return out, req.Send() -} - -// StopCrawlerWithContext is the same as StopCrawler with the addition of -// the ability to pass a context and additional request options. -// -// See StopCrawler for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) StopCrawlerWithContext(ctx aws.Context, input *StopCrawlerInput, opts ...request.Option) (*StopCrawlerOutput, error) { - req, out := c.StopCrawlerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopCrawlerSchedule = "StopCrawlerSchedule" - -// StopCrawlerScheduleRequest generates a "aws/request.Request" representing the -// client's request for the StopCrawlerSchedule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopCrawlerSchedule for more information on using the StopCrawlerSchedule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopCrawlerScheduleRequest method. -// req, resp := client.StopCrawlerScheduleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StopCrawlerSchedule -func (c *Glue) StopCrawlerScheduleRequest(input *StopCrawlerScheduleInput) (req *request.Request, output *StopCrawlerScheduleOutput) { - op := &request.Operation{ - Name: opStopCrawlerSchedule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopCrawlerScheduleInput{} - } - - output = &StopCrawlerScheduleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopCrawlerSchedule API operation for AWS Glue. -// -// Sets the schedule state of the specified crawler to NOT_SCHEDULED, but does -// not stop the crawler if it is already running. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation StopCrawlerSchedule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeSchedulerNotRunningException "SchedulerNotRunningException" -// The specified scheduler is not running. -// -// * ErrCodeSchedulerTransitioningException "SchedulerTransitioningException" -// The specified scheduler is transitioning. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StopCrawlerSchedule -func (c *Glue) StopCrawlerSchedule(input *StopCrawlerScheduleInput) (*StopCrawlerScheduleOutput, error) { - req, out := c.StopCrawlerScheduleRequest(input) - return out, req.Send() -} - -// StopCrawlerScheduleWithContext is the same as StopCrawlerSchedule with the addition of -// the ability to pass a context and additional request options. -// -// See StopCrawlerSchedule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) StopCrawlerScheduleWithContext(ctx aws.Context, input *StopCrawlerScheduleInput, opts ...request.Option) (*StopCrawlerScheduleOutput, error) { - req, out := c.StopCrawlerScheduleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopTrigger = "StopTrigger" - -// StopTriggerRequest generates a "aws/request.Request" representing the -// client's request for the StopTrigger operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopTrigger for more information on using the StopTrigger -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopTriggerRequest method. -// req, resp := client.StopTriggerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StopTrigger -func (c *Glue) StopTriggerRequest(input *StopTriggerInput) (req *request.Request, output *StopTriggerOutput) { - op := &request.Operation{ - Name: opStopTrigger, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopTriggerInput{} - } - - output = &StopTriggerOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopTrigger API operation for AWS Glue. -// -// Stops a specified trigger. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation StopTrigger for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Two processes are trying to modify a resource simultaneously. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StopTrigger -func (c *Glue) StopTrigger(input *StopTriggerInput) (*StopTriggerOutput, error) { - req, out := c.StopTriggerRequest(input) - return out, req.Send() -} - -// StopTriggerWithContext is the same as StopTrigger with the addition of -// the ability to pass a context and additional request options. -// -// See StopTrigger for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) StopTriggerWithContext(ctx aws.Context, input *StopTriggerInput, opts ...request.Option) (*StopTriggerOutput, error) { - req, out := c.StopTriggerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateClassifier = "UpdateClassifier" - -// UpdateClassifierRequest generates a "aws/request.Request" representing the -// client's request for the UpdateClassifier operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateClassifier for more information on using the UpdateClassifier -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateClassifierRequest method. -// req, resp := client.UpdateClassifierRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateClassifier -func (c *Glue) UpdateClassifierRequest(input *UpdateClassifierInput) (req *request.Request, output *UpdateClassifierOutput) { - op := &request.Operation{ - Name: opUpdateClassifier, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateClassifierInput{} - } - - output = &UpdateClassifierOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateClassifier API operation for AWS Glue. -// -// Modifies an existing classifier (a GrokClassifier, XMLClassifier, or JsonClassifier, -// depending on which field is present). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation UpdateClassifier for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeVersionMismatchException "VersionMismatchException" -// There was a version conflict. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateClassifier -func (c *Glue) UpdateClassifier(input *UpdateClassifierInput) (*UpdateClassifierOutput, error) { - req, out := c.UpdateClassifierRequest(input) - return out, req.Send() -} - -// UpdateClassifierWithContext is the same as UpdateClassifier with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateClassifier for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) UpdateClassifierWithContext(ctx aws.Context, input *UpdateClassifierInput, opts ...request.Option) (*UpdateClassifierOutput, error) { - req, out := c.UpdateClassifierRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateConnection = "UpdateConnection" - -// UpdateConnectionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateConnection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateConnection for more information on using the UpdateConnection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateConnectionRequest method. -// req, resp := client.UpdateConnectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateConnection -func (c *Glue) UpdateConnectionRequest(input *UpdateConnectionInput) (req *request.Request, output *UpdateConnectionOutput) { - op := &request.Operation{ - Name: opUpdateConnection, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateConnectionInput{} - } - - output = &UpdateConnectionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateConnection API operation for AWS Glue. -// -// Updates a connection definition in the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation UpdateConnection for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateConnection -func (c *Glue) UpdateConnection(input *UpdateConnectionInput) (*UpdateConnectionOutput, error) { - req, out := c.UpdateConnectionRequest(input) - return out, req.Send() -} - -// UpdateConnectionWithContext is the same as UpdateConnection with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateConnection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) UpdateConnectionWithContext(ctx aws.Context, input *UpdateConnectionInput, opts ...request.Option) (*UpdateConnectionOutput, error) { - req, out := c.UpdateConnectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateCrawler = "UpdateCrawler" - -// UpdateCrawlerRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCrawler operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateCrawler for more information on using the UpdateCrawler -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateCrawlerRequest method. -// req, resp := client.UpdateCrawlerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateCrawler -func (c *Glue) UpdateCrawlerRequest(input *UpdateCrawlerInput) (req *request.Request, output *UpdateCrawlerOutput) { - op := &request.Operation{ - Name: opUpdateCrawler, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateCrawlerInput{} - } - - output = &UpdateCrawlerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateCrawler API operation for AWS Glue. -// -// Updates a crawler. If a crawler is running, you must stop it using StopCrawler -// before updating 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 Glue's -// API operation UpdateCrawler for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeVersionMismatchException "VersionMismatchException" -// There was a version conflict. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeCrawlerRunningException "CrawlerRunningException" -// The operation cannot be performed because the crawler is already running. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateCrawler -func (c *Glue) UpdateCrawler(input *UpdateCrawlerInput) (*UpdateCrawlerOutput, error) { - req, out := c.UpdateCrawlerRequest(input) - return out, req.Send() -} - -// UpdateCrawlerWithContext is the same as UpdateCrawler with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCrawler for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) UpdateCrawlerWithContext(ctx aws.Context, input *UpdateCrawlerInput, opts ...request.Option) (*UpdateCrawlerOutput, error) { - req, out := c.UpdateCrawlerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateCrawlerSchedule = "UpdateCrawlerSchedule" - -// UpdateCrawlerScheduleRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCrawlerSchedule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateCrawlerSchedule for more information on using the UpdateCrawlerSchedule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateCrawlerScheduleRequest method. -// req, resp := client.UpdateCrawlerScheduleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateCrawlerSchedule -func (c *Glue) UpdateCrawlerScheduleRequest(input *UpdateCrawlerScheduleInput) (req *request.Request, output *UpdateCrawlerScheduleOutput) { - op := &request.Operation{ - Name: opUpdateCrawlerSchedule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateCrawlerScheduleInput{} - } - - output = &UpdateCrawlerScheduleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateCrawlerSchedule API operation for AWS Glue. -// -// Updates the schedule of a crawler using a cron expression. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation UpdateCrawlerSchedule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeVersionMismatchException "VersionMismatchException" -// There was a version conflict. -// -// * ErrCodeSchedulerTransitioningException "SchedulerTransitioningException" -// The specified scheduler is transitioning. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateCrawlerSchedule -func (c *Glue) UpdateCrawlerSchedule(input *UpdateCrawlerScheduleInput) (*UpdateCrawlerScheduleOutput, error) { - req, out := c.UpdateCrawlerScheduleRequest(input) - return out, req.Send() -} - -// UpdateCrawlerScheduleWithContext is the same as UpdateCrawlerSchedule with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCrawlerSchedule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) UpdateCrawlerScheduleWithContext(ctx aws.Context, input *UpdateCrawlerScheduleInput, opts ...request.Option) (*UpdateCrawlerScheduleOutput, error) { - req, out := c.UpdateCrawlerScheduleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDatabase = "UpdateDatabase" - -// UpdateDatabaseRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDatabase operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDatabase for more information on using the UpdateDatabase -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDatabaseRequest method. -// req, resp := client.UpdateDatabaseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateDatabase -func (c *Glue) UpdateDatabaseRequest(input *UpdateDatabaseInput) (req *request.Request, output *UpdateDatabaseOutput) { - op := &request.Operation{ - Name: opUpdateDatabase, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateDatabaseInput{} - } - - output = &UpdateDatabaseOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateDatabase API operation for AWS Glue. -// -// Updates an existing database definition in a Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation UpdateDatabase for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateDatabase -func (c *Glue) UpdateDatabase(input *UpdateDatabaseInput) (*UpdateDatabaseOutput, error) { - req, out := c.UpdateDatabaseRequest(input) - return out, req.Send() -} - -// UpdateDatabaseWithContext is the same as UpdateDatabase with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDatabase for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) UpdateDatabaseWithContext(ctx aws.Context, input *UpdateDatabaseInput, opts ...request.Option) (*UpdateDatabaseOutput, error) { - req, out := c.UpdateDatabaseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDevEndpoint = "UpdateDevEndpoint" - -// UpdateDevEndpointRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDevEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDevEndpoint for more information on using the UpdateDevEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDevEndpointRequest method. -// req, resp := client.UpdateDevEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateDevEndpoint -func (c *Glue) UpdateDevEndpointRequest(input *UpdateDevEndpointInput) (req *request.Request, output *UpdateDevEndpointOutput) { - op := &request.Operation{ - Name: opUpdateDevEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateDevEndpointInput{} - } - - output = &UpdateDevEndpointOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateDevEndpoint API operation for AWS Glue. -// -// Updates a specified DevEndpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation UpdateDevEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeValidationException "ValidationException" -// A value could not be validated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateDevEndpoint -func (c *Glue) UpdateDevEndpoint(input *UpdateDevEndpointInput) (*UpdateDevEndpointOutput, error) { - req, out := c.UpdateDevEndpointRequest(input) - return out, req.Send() -} - -// UpdateDevEndpointWithContext is the same as UpdateDevEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDevEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) UpdateDevEndpointWithContext(ctx aws.Context, input *UpdateDevEndpointInput, opts ...request.Option) (*UpdateDevEndpointOutput, error) { - req, out := c.UpdateDevEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateJob = "UpdateJob" - -// UpdateJobRequest generates a "aws/request.Request" representing the -// client's request for the UpdateJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateJob for more information on using the UpdateJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateJobRequest method. -// req, resp := client.UpdateJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateJob -func (c *Glue) UpdateJobRequest(input *UpdateJobInput) (req *request.Request, output *UpdateJobOutput) { - op := &request.Operation{ - Name: opUpdateJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateJobInput{} - } - - output = &UpdateJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateJob API operation for AWS Glue. -// -// Updates an existing job definition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation UpdateJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Two processes are trying to modify a resource simultaneously. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateJob -func (c *Glue) UpdateJob(input *UpdateJobInput) (*UpdateJobOutput, error) { - req, out := c.UpdateJobRequest(input) - return out, req.Send() -} - -// UpdateJobWithContext is the same as UpdateJob with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) UpdateJobWithContext(ctx aws.Context, input *UpdateJobInput, opts ...request.Option) (*UpdateJobOutput, error) { - req, out := c.UpdateJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdatePartition = "UpdatePartition" - -// UpdatePartitionRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePartition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdatePartition for more information on using the UpdatePartition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdatePartitionRequest method. -// req, resp := client.UpdatePartitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdatePartition -func (c *Glue) UpdatePartitionRequest(input *UpdatePartitionInput) (req *request.Request, output *UpdatePartitionOutput) { - op := &request.Operation{ - Name: opUpdatePartition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdatePartitionInput{} - } - - output = &UpdatePartitionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdatePartition API operation for AWS Glue. -// -// Updates a partition. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation UpdatePartition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdatePartition -func (c *Glue) UpdatePartition(input *UpdatePartitionInput) (*UpdatePartitionOutput, error) { - req, out := c.UpdatePartitionRequest(input) - return out, req.Send() -} - -// UpdatePartitionWithContext is the same as UpdatePartition with the addition of -// the ability to pass a context and additional request options. -// -// See UpdatePartition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) UpdatePartitionWithContext(ctx aws.Context, input *UpdatePartitionInput, opts ...request.Option) (*UpdatePartitionOutput, error) { - req, out := c.UpdatePartitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateTable = "UpdateTable" - -// UpdateTableRequest generates a "aws/request.Request" representing the -// client's request for the UpdateTable operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateTable for more information on using the UpdateTable -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateTableRequest method. -// req, resp := client.UpdateTableRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateTable -func (c *Glue) UpdateTableRequest(input *UpdateTableInput) (req *request.Request, output *UpdateTableOutput) { - op := &request.Operation{ - Name: opUpdateTable, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateTableInput{} - } - - output = &UpdateTableOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateTable API operation for AWS Glue. -// -// Updates a metadata table in the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation UpdateTable for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Two processes are trying to modify a resource simultaneously. -// -// * ErrCodeResourceNumberLimitExceededException "ResourceNumberLimitExceededException" -// A resource numerical limit was exceeded. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateTable -func (c *Glue) UpdateTable(input *UpdateTableInput) (*UpdateTableOutput, error) { - req, out := c.UpdateTableRequest(input) - return out, req.Send() -} - -// UpdateTableWithContext is the same as UpdateTable with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateTable for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) UpdateTableWithContext(ctx aws.Context, input *UpdateTableInput, opts ...request.Option) (*UpdateTableOutput, error) { - req, out := c.UpdateTableRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateTrigger = "UpdateTrigger" - -// UpdateTriggerRequest generates a "aws/request.Request" representing the -// client's request for the UpdateTrigger operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateTrigger for more information on using the UpdateTrigger -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateTriggerRequest method. -// req, resp := client.UpdateTriggerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateTrigger -func (c *Glue) UpdateTriggerRequest(input *UpdateTriggerInput) (req *request.Request, output *UpdateTriggerOutput) { - op := &request.Operation{ - Name: opUpdateTrigger, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateTriggerInput{} - } - - output = &UpdateTriggerOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateTrigger API operation for AWS Glue. -// -// Updates a trigger 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 Glue's -// API operation UpdateTrigger for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Two processes are trying to modify a resource simultaneously. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateTrigger -func (c *Glue) UpdateTrigger(input *UpdateTriggerInput) (*UpdateTriggerOutput, error) { - req, out := c.UpdateTriggerRequest(input) - return out, req.Send() -} - -// UpdateTriggerWithContext is the same as UpdateTrigger with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateTrigger for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) UpdateTriggerWithContext(ctx aws.Context, input *UpdateTriggerInput, opts ...request.Option) (*UpdateTriggerOutput, error) { - req, out := c.UpdateTriggerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateUserDefinedFunction = "UpdateUserDefinedFunction" - -// UpdateUserDefinedFunctionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateUserDefinedFunction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateUserDefinedFunction for more information on using the UpdateUserDefinedFunction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateUserDefinedFunctionRequest method. -// req, resp := client.UpdateUserDefinedFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateUserDefinedFunction -func (c *Glue) UpdateUserDefinedFunctionRequest(input *UpdateUserDefinedFunctionInput) (req *request.Request, output *UpdateUserDefinedFunctionOutput) { - op := &request.Operation{ - Name: opUpdateUserDefinedFunction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateUserDefinedFunctionInput{} - } - - output = &UpdateUserDefinedFunctionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateUserDefinedFunction API operation for AWS Glue. -// -// Updates an existing function definition in the Data Catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Glue's -// API operation UpdateUserDefinedFunction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEntityNotFoundException "EntityNotFoundException" -// A specified entity does not exist -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The input provided was not valid. -// -// * ErrCodeInternalServiceException "InternalServiceException" -// An internal service error occurred. -// -// * ErrCodeOperationTimeoutException "OperationTimeoutException" -// The operation timed out. -// -// * ErrCodeEncryptionException "GlueEncryptionException" -// An encryption operation failed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UpdateUserDefinedFunction -func (c *Glue) UpdateUserDefinedFunction(input *UpdateUserDefinedFunctionInput) (*UpdateUserDefinedFunctionOutput, error) { - req, out := c.UpdateUserDefinedFunctionRequest(input) - return out, req.Send() -} - -// UpdateUserDefinedFunctionWithContext is the same as UpdateUserDefinedFunction with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateUserDefinedFunction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Glue) UpdateUserDefinedFunctionWithContext(ctx aws.Context, input *UpdateUserDefinedFunctionInput, opts ...request.Option) (*UpdateUserDefinedFunctionOutput, error) { - req, out := c.UpdateUserDefinedFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Defines an action to be initiated by a trigger. -type Action struct { - _ struct{} `type:"structure"` - - // Arguments to be passed to the job run. - // - // You can specify arguments here that your own job-execution script consumes, - // as well as arguments that AWS Glue itself consumes. - // - // For information about how to specify and consume your own Job arguments, - // see the Calling AWS Glue APIs in Python (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html) - // topic in the developer guide. - // - // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) - // topic in the developer guide. - Arguments map[string]*string `type:"map"` - - // The name of a job to be executed. - JobName *string `min:"1" type:"string"` - - // Specifies configuration properties of a job run notification. - NotificationProperty *NotificationProperty `type:"structure"` - - // The name of the SecurityConfiguration structure to be used with this action. - SecurityConfiguration *string `min:"1" type:"string"` - - // The JobRun timeout in minutes. This is the maximum time that a job run can - // consume resources before it is terminated and enters TIMEOUT status. The - // default is 2,880 minutes (48 hours). This overrides the timeout value set - // in the parent job. - Timeout *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s Action) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Action) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Action) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Action"} - if s.JobName != nil && len(*s.JobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) - } - if s.SecurityConfiguration != nil && len(*s.SecurityConfiguration) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityConfiguration", 1)) - } - if s.Timeout != nil && *s.Timeout < 1 { - invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) - } - if s.NotificationProperty != nil { - if err := s.NotificationProperty.Validate(); err != nil { - invalidParams.AddNested("NotificationProperty", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArguments sets the Arguments field's value. -func (s *Action) SetArguments(v map[string]*string) *Action { - s.Arguments = v - return s -} - -// SetJobName sets the JobName field's value. -func (s *Action) SetJobName(v string) *Action { - s.JobName = &v - return s -} - -// SetNotificationProperty sets the NotificationProperty field's value. -func (s *Action) SetNotificationProperty(v *NotificationProperty) *Action { - s.NotificationProperty = v - return s -} - -// SetSecurityConfiguration sets the SecurityConfiguration field's value. -func (s *Action) SetSecurityConfiguration(v string) *Action { - s.SecurityConfiguration = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *Action) SetTimeout(v int64) *Action { - s.Timeout = &v - return s -} - -type BatchCreatePartitionInput struct { - _ struct{} `type:"structure"` - - // The ID of the catalog in which the partion is to be created. Currently, this - // should be the AWS account ID. - CatalogId *string `min:"1" type:"string"` - - // The name of the metadata database in which the partition is to be created. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // A list of PartitionInput structures that define the partitions to be created. - // - // PartitionInputList is a required field - PartitionInputList []*PartitionInput `type:"list" required:"true"` - - // The name of the metadata table in which the partition is to be created. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s BatchCreatePartitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchCreatePartitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchCreatePartitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchCreatePartitionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.PartitionInputList == nil { - invalidParams.Add(request.NewErrParamRequired("PartitionInputList")) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - if s.TableName != nil && len(*s.TableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) - } - if s.PartitionInputList != nil { - for i, v := range s.PartitionInputList { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PartitionInputList", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *BatchCreatePartitionInput) SetCatalogId(v string) *BatchCreatePartitionInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *BatchCreatePartitionInput) SetDatabaseName(v string) *BatchCreatePartitionInput { - s.DatabaseName = &v - return s -} - -// SetPartitionInputList sets the PartitionInputList field's value. -func (s *BatchCreatePartitionInput) SetPartitionInputList(v []*PartitionInput) *BatchCreatePartitionInput { - s.PartitionInputList = v - return s -} - -// SetTableName sets the TableName field's value. -func (s *BatchCreatePartitionInput) SetTableName(v string) *BatchCreatePartitionInput { - s.TableName = &v - return s -} - -type BatchCreatePartitionOutput struct { - _ struct{} `type:"structure"` - - // Errors encountered when trying to create the requested partitions. - Errors []*PartitionError `type:"list"` -} - -// String returns the string representation -func (s BatchCreatePartitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchCreatePartitionOutput) GoString() string { - return s.String() -} - -// SetErrors sets the Errors field's value. -func (s *BatchCreatePartitionOutput) SetErrors(v []*PartitionError) *BatchCreatePartitionOutput { - s.Errors = v - return s -} - -type BatchDeleteConnectionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog in which the connections reside. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // A list of names of the connections to delete. - // - // ConnectionNameList is a required field - ConnectionNameList []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchDeleteConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchDeleteConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchDeleteConnectionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.ConnectionNameList == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionNameList")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *BatchDeleteConnectionInput) SetCatalogId(v string) *BatchDeleteConnectionInput { - s.CatalogId = &v - return s -} - -// SetConnectionNameList sets the ConnectionNameList field's value. -func (s *BatchDeleteConnectionInput) SetConnectionNameList(v []*string) *BatchDeleteConnectionInput { - s.ConnectionNameList = v - return s -} - -type BatchDeleteConnectionOutput struct { - _ struct{} `type:"structure"` - - // A map of the names of connections that were not successfully deleted to error - // details. - Errors map[string]*ErrorDetail `type:"map"` - - // A list of names of the connection definitions that were successfully deleted. - Succeeded []*string `type:"list"` -} - -// String returns the string representation -func (s BatchDeleteConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteConnectionOutput) GoString() string { - return s.String() -} - -// SetErrors sets the Errors field's value. -func (s *BatchDeleteConnectionOutput) SetErrors(v map[string]*ErrorDetail) *BatchDeleteConnectionOutput { - s.Errors = v - return s -} - -// SetSucceeded sets the Succeeded field's value. -func (s *BatchDeleteConnectionOutput) SetSucceeded(v []*string) *BatchDeleteConnectionOutput { - s.Succeeded = v - return s -} - -type BatchDeletePartitionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the partition to be deleted resides. If - // none is supplied, the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the catalog database in which the table in question resides. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // A list of PartitionInput structures that define the partitions to be deleted. - // - // PartitionsToDelete is a required field - PartitionsToDelete []*PartitionValueList `type:"list" required:"true"` - - // The name of the table where the partitions to be deleted is located. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s BatchDeletePartitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeletePartitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchDeletePartitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchDeletePartitionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.PartitionsToDelete == nil { - invalidParams.Add(request.NewErrParamRequired("PartitionsToDelete")) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - if s.TableName != nil && len(*s.TableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) - } - if s.PartitionsToDelete != nil { - for i, v := range s.PartitionsToDelete { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PartitionsToDelete", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *BatchDeletePartitionInput) SetCatalogId(v string) *BatchDeletePartitionInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *BatchDeletePartitionInput) SetDatabaseName(v string) *BatchDeletePartitionInput { - s.DatabaseName = &v - return s -} - -// SetPartitionsToDelete sets the PartitionsToDelete field's value. -func (s *BatchDeletePartitionInput) SetPartitionsToDelete(v []*PartitionValueList) *BatchDeletePartitionInput { - s.PartitionsToDelete = v - return s -} - -// SetTableName sets the TableName field's value. -func (s *BatchDeletePartitionInput) SetTableName(v string) *BatchDeletePartitionInput { - s.TableName = &v - return s -} - -type BatchDeletePartitionOutput struct { - _ struct{} `type:"structure"` - - // Errors encountered when trying to delete the requested partitions. - Errors []*PartitionError `type:"list"` -} - -// String returns the string representation -func (s BatchDeletePartitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeletePartitionOutput) GoString() string { - return s.String() -} - -// SetErrors sets the Errors field's value. -func (s *BatchDeletePartitionOutput) SetErrors(v []*PartitionError) *BatchDeletePartitionOutput { - s.Errors = v - return s -} - -type BatchDeleteTableInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the table resides. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the catalog database where the tables to delete reside. For Hive - // compatibility, this name is entirely lowercase. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // A list of the table to delete. - // - // TablesToDelete is a required field - TablesToDelete []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchDeleteTableInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteTableInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchDeleteTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchDeleteTableInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.TablesToDelete == nil { - invalidParams.Add(request.NewErrParamRequired("TablesToDelete")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *BatchDeleteTableInput) SetCatalogId(v string) *BatchDeleteTableInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *BatchDeleteTableInput) SetDatabaseName(v string) *BatchDeleteTableInput { - s.DatabaseName = &v - return s -} - -// SetTablesToDelete sets the TablesToDelete field's value. -func (s *BatchDeleteTableInput) SetTablesToDelete(v []*string) *BatchDeleteTableInput { - s.TablesToDelete = v - return s -} - -type BatchDeleteTableOutput struct { - _ struct{} `type:"structure"` - - // A list of errors encountered in attempting to delete the specified tables. - Errors []*TableError `type:"list"` -} - -// String returns the string representation -func (s BatchDeleteTableOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteTableOutput) GoString() string { - return s.String() -} - -// SetErrors sets the Errors field's value. -func (s *BatchDeleteTableOutput) SetErrors(v []*TableError) *BatchDeleteTableOutput { - s.Errors = v - return s -} - -type BatchDeleteTableVersionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the tables reside. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The database in the catalog in which the table resides. For Hive compatibility, - // this name is entirely lowercase. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // The name of the table. For Hive compatibility, this name is entirely lowercase. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` - - // A list of the IDs of versions to be deleted. A VersionId is a string representation - // of an integer. Each version is incremented by 1. - // - // VersionIds is a required field - VersionIds []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchDeleteTableVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteTableVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchDeleteTableVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchDeleteTableVersionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - if s.TableName != nil && len(*s.TableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) - } - if s.VersionIds == nil { - invalidParams.Add(request.NewErrParamRequired("VersionIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *BatchDeleteTableVersionInput) SetCatalogId(v string) *BatchDeleteTableVersionInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *BatchDeleteTableVersionInput) SetDatabaseName(v string) *BatchDeleteTableVersionInput { - s.DatabaseName = &v - return s -} - -// SetTableName sets the TableName field's value. -func (s *BatchDeleteTableVersionInput) SetTableName(v string) *BatchDeleteTableVersionInput { - s.TableName = &v - return s -} - -// SetVersionIds sets the VersionIds field's value. -func (s *BatchDeleteTableVersionInput) SetVersionIds(v []*string) *BatchDeleteTableVersionInput { - s.VersionIds = v - return s -} - -type BatchDeleteTableVersionOutput struct { - _ struct{} `type:"structure"` - - // A list of errors encountered while trying to delete the specified table versions. - Errors []*TableVersionError `type:"list"` -} - -// String returns the string representation -func (s BatchDeleteTableVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteTableVersionOutput) GoString() string { - return s.String() -} - -// SetErrors sets the Errors field's value. -func (s *BatchDeleteTableVersionOutput) SetErrors(v []*TableVersionError) *BatchDeleteTableVersionOutput { - s.Errors = v - return s -} - -type BatchGetPartitionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the partitions in question reside. If none - // is supplied, the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the catalog database where the partitions reside. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // A list of partition values identifying the partitions to retrieve. - // - // PartitionsToGet is a required field - PartitionsToGet []*PartitionValueList `type:"list" required:"true"` - - // The name of the partitions' table. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s BatchGetPartitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetPartitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchGetPartitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchGetPartitionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.PartitionsToGet == nil { - invalidParams.Add(request.NewErrParamRequired("PartitionsToGet")) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - if s.TableName != nil && len(*s.TableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) - } - if s.PartitionsToGet != nil { - for i, v := range s.PartitionsToGet { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PartitionsToGet", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *BatchGetPartitionInput) SetCatalogId(v string) *BatchGetPartitionInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *BatchGetPartitionInput) SetDatabaseName(v string) *BatchGetPartitionInput { - s.DatabaseName = &v - return s -} - -// SetPartitionsToGet sets the PartitionsToGet field's value. -func (s *BatchGetPartitionInput) SetPartitionsToGet(v []*PartitionValueList) *BatchGetPartitionInput { - s.PartitionsToGet = v - return s -} - -// SetTableName sets the TableName field's value. -func (s *BatchGetPartitionInput) SetTableName(v string) *BatchGetPartitionInput { - s.TableName = &v - return s -} - -type BatchGetPartitionOutput struct { - _ struct{} `type:"structure"` - - // A list of the requested partitions. - Partitions []*Partition `type:"list"` - - // A list of the partition values in the request for which partions were not - // returned. - UnprocessedKeys []*PartitionValueList `type:"list"` -} - -// String returns the string representation -func (s BatchGetPartitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchGetPartitionOutput) GoString() string { - return s.String() -} - -// SetPartitions sets the Partitions field's value. -func (s *BatchGetPartitionOutput) SetPartitions(v []*Partition) *BatchGetPartitionOutput { - s.Partitions = v - return s -} - -// SetUnprocessedKeys sets the UnprocessedKeys field's value. -func (s *BatchGetPartitionOutput) SetUnprocessedKeys(v []*PartitionValueList) *BatchGetPartitionOutput { - s.UnprocessedKeys = v - return s -} - -// Records an error that occurred when attempting to stop a specified job run. -type BatchStopJobRunError struct { - _ struct{} `type:"structure"` - - // Specifies details about the error that was encountered. - ErrorDetail *ErrorDetail `type:"structure"` - - // The name of the job definition used in the job run in question. - JobName *string `min:"1" type:"string"` - - // The JobRunId of the job run in question. - JobRunId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s BatchStopJobRunError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchStopJobRunError) GoString() string { - return s.String() -} - -// SetErrorDetail sets the ErrorDetail field's value. -func (s *BatchStopJobRunError) SetErrorDetail(v *ErrorDetail) *BatchStopJobRunError { - s.ErrorDetail = v - return s -} - -// SetJobName sets the JobName field's value. -func (s *BatchStopJobRunError) SetJobName(v string) *BatchStopJobRunError { - s.JobName = &v - return s -} - -// SetJobRunId sets the JobRunId field's value. -func (s *BatchStopJobRunError) SetJobRunId(v string) *BatchStopJobRunError { - s.JobRunId = &v - return s -} - -type BatchStopJobRunInput struct { - _ struct{} `type:"structure"` - - // The name of the job definition for which to stop job runs. - // - // JobName is a required field - JobName *string `min:"1" type:"string" required:"true"` - - // A list of the JobRunIds that should be stopped for that job definition. - // - // JobRunIds is a required field - JobRunIds []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchStopJobRunInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchStopJobRunInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchStopJobRunInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchStopJobRunInput"} - 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.JobRunIds == nil { - invalidParams.Add(request.NewErrParamRequired("JobRunIds")) - } - if s.JobRunIds != nil && len(s.JobRunIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobRunIds", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobName sets the JobName field's value. -func (s *BatchStopJobRunInput) SetJobName(v string) *BatchStopJobRunInput { - s.JobName = &v - return s -} - -// SetJobRunIds sets the JobRunIds field's value. -func (s *BatchStopJobRunInput) SetJobRunIds(v []*string) *BatchStopJobRunInput { - s.JobRunIds = v - return s -} - -type BatchStopJobRunOutput struct { - _ struct{} `type:"structure"` - - // A list of the errors that were encountered in tryng to stop JobRuns, including - // the JobRunId for which each error was encountered and details about the error. - Errors []*BatchStopJobRunError `type:"list"` - - // A list of the JobRuns that were successfully submitted for stopping. - SuccessfulSubmissions []*BatchStopJobRunSuccessfulSubmission `type:"list"` -} - -// String returns the string representation -func (s BatchStopJobRunOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchStopJobRunOutput) GoString() string { - return s.String() -} - -// SetErrors sets the Errors field's value. -func (s *BatchStopJobRunOutput) SetErrors(v []*BatchStopJobRunError) *BatchStopJobRunOutput { - s.Errors = v - return s -} - -// SetSuccessfulSubmissions sets the SuccessfulSubmissions field's value. -func (s *BatchStopJobRunOutput) SetSuccessfulSubmissions(v []*BatchStopJobRunSuccessfulSubmission) *BatchStopJobRunOutput { - s.SuccessfulSubmissions = v - return s -} - -// Records a successful request to stop a specified JobRun. -type BatchStopJobRunSuccessfulSubmission struct { - _ struct{} `type:"structure"` - - // The name of the job definition used in the job run that was stopped. - JobName *string `min:"1" type:"string"` - - // The JobRunId of the job run that was stopped. - JobRunId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s BatchStopJobRunSuccessfulSubmission) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchStopJobRunSuccessfulSubmission) GoString() string { - return s.String() -} - -// SetJobName sets the JobName field's value. -func (s *BatchStopJobRunSuccessfulSubmission) SetJobName(v string) *BatchStopJobRunSuccessfulSubmission { - s.JobName = &v - return s -} - -// SetJobRunId sets the JobRunId field's value. -func (s *BatchStopJobRunSuccessfulSubmission) SetJobRunId(v string) *BatchStopJobRunSuccessfulSubmission { - s.JobRunId = &v - return s -} - -// Specifies a table definition in the Data Catalog. -type CatalogEntry struct { - _ struct{} `type:"structure"` - - // The database in which the table metadata resides. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // The name of the table in question. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CatalogEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CatalogEntry) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CatalogEntry) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CatalogEntry"} - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - if s.TableName != nil && len(*s.TableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *CatalogEntry) SetDatabaseName(v string) *CatalogEntry { - s.DatabaseName = &v - return s -} - -// SetTableName sets the TableName field's value. -func (s *CatalogEntry) SetTableName(v string) *CatalogEntry { - s.TableName = &v - return s -} - -// A structure containing migration status information. -type CatalogImportStatus struct { - _ struct{} `type:"structure"` - - // True if the migration has completed, or False otherwise. - ImportCompleted *bool `type:"boolean"` - - // The time that the migration was started. - ImportTime *time.Time `type:"timestamp"` - - // The name of the person who initiated the migration. - ImportedBy *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CatalogImportStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CatalogImportStatus) GoString() string { - return s.String() -} - -// SetImportCompleted sets the ImportCompleted field's value. -func (s *CatalogImportStatus) SetImportCompleted(v bool) *CatalogImportStatus { - s.ImportCompleted = &v - return s -} - -// SetImportTime sets the ImportTime field's value. -func (s *CatalogImportStatus) SetImportTime(v time.Time) *CatalogImportStatus { - s.ImportTime = &v - return s -} - -// SetImportedBy sets the ImportedBy field's value. -func (s *CatalogImportStatus) SetImportedBy(v string) *CatalogImportStatus { - s.ImportedBy = &v - return s -} - -// Classifiers are triggered during a crawl task. A classifier checks whether -// a given file is in a format it can handle, and if it is, the classifier creates -// a schema in the form of a StructType object that matches that data format. -// -// You can use the standard classifiers that AWS Glue supplies, or you can write -// your own classifiers to best categorize your data sources and specify the -// appropriate schemas to use for them. A classifier can be a grok classifier, -// an XML classifier, or a JSON classifier, as specified in one of the fields -// in the Classifier object. -type Classifier struct { - _ struct{} `type:"structure"` - - // A GrokClassifier object. - GrokClassifier *GrokClassifier `type:"structure"` - - // A JsonClassifier object. - JsonClassifier *JsonClassifier `type:"structure"` - - // An XMLClassifier object. - XMLClassifier *XMLClassifier `type:"structure"` -} - -// String returns the string representation -func (s Classifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Classifier) GoString() string { - return s.String() -} - -// SetGrokClassifier sets the GrokClassifier field's value. -func (s *Classifier) SetGrokClassifier(v *GrokClassifier) *Classifier { - s.GrokClassifier = v - return s -} - -// SetJsonClassifier sets the JsonClassifier field's value. -func (s *Classifier) SetJsonClassifier(v *JsonClassifier) *Classifier { - s.JsonClassifier = v - return s -} - -// SetXMLClassifier sets the XMLClassifier field's value. -func (s *Classifier) SetXMLClassifier(v *XMLClassifier) *Classifier { - s.XMLClassifier = v - return s -} - -// Specifies how CloudWatch data should be encrypted. -type CloudWatchEncryption struct { - _ struct{} `type:"structure"` - - // The encryption mode to use for CloudWatch data. - CloudWatchEncryptionMode *string `type:"string" enum:"CloudWatchEncryptionMode"` - - // The AWS ARN of the KMS key to be used to encrypt the data. - KmsKeyArn *string `type:"string"` -} - -// String returns the string representation -func (s CloudWatchEncryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudWatchEncryption) GoString() string { - return s.String() -} - -// SetCloudWatchEncryptionMode sets the CloudWatchEncryptionMode field's value. -func (s *CloudWatchEncryption) SetCloudWatchEncryptionMode(v string) *CloudWatchEncryption { - s.CloudWatchEncryptionMode = &v - return s -} - -// SetKmsKeyArn sets the KmsKeyArn field's value. -func (s *CloudWatchEncryption) SetKmsKeyArn(v string) *CloudWatchEncryption { - s.KmsKeyArn = &v - return s -} - -// Represents a directional edge in a directed acyclic graph (DAG). -type CodeGenEdge struct { - _ struct{} `type:"structure"` - - // The ID of the node at which the edge starts. - // - // Source is a required field - Source *string `min:"1" type:"string" required:"true"` - - // The ID of the node at which the edge ends. - // - // Target is a required field - Target *string `min:"1" type:"string" required:"true"` - - // The target of the edge. - TargetParameter *string `type:"string"` -} - -// String returns the string representation -func (s CodeGenEdge) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CodeGenEdge) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CodeGenEdge) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CodeGenEdge"} - if s.Source == nil { - invalidParams.Add(request.NewErrParamRequired("Source")) - } - if s.Source != nil && len(*s.Source) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Source", 1)) - } - if s.Target == nil { - invalidParams.Add(request.NewErrParamRequired("Target")) - } - if s.Target != nil && len(*s.Target) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Target", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSource sets the Source field's value. -func (s *CodeGenEdge) SetSource(v string) *CodeGenEdge { - s.Source = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *CodeGenEdge) SetTarget(v string) *CodeGenEdge { - s.Target = &v - return s -} - -// SetTargetParameter sets the TargetParameter field's value. -func (s *CodeGenEdge) SetTargetParameter(v string) *CodeGenEdge { - s.TargetParameter = &v - return s -} - -// Represents a node in a directed acyclic graph (DAG) -type CodeGenNode struct { - _ struct{} `type:"structure"` - - // Properties of the node, in the form of name-value pairs. - // - // Args is a required field - Args []*CodeGenNodeArg `type:"list" required:"true"` - - // A node identifier that is unique within the node's graph. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` - - // The line number of the node. - LineNumber *int64 `type:"integer"` - - // The type of node this is. - // - // NodeType is a required field - NodeType *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CodeGenNode) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CodeGenNode) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CodeGenNode) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CodeGenNode"} - if s.Args == nil { - invalidParams.Add(request.NewErrParamRequired("Args")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.NodeType == nil { - invalidParams.Add(request.NewErrParamRequired("NodeType")) - } - if s.Args != nil { - for i, v := range s.Args { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Args", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArgs sets the Args field's value. -func (s *CodeGenNode) SetArgs(v []*CodeGenNodeArg) *CodeGenNode { - s.Args = v - return s -} - -// SetId sets the Id field's value. -func (s *CodeGenNode) SetId(v string) *CodeGenNode { - s.Id = &v - return s -} - -// SetLineNumber sets the LineNumber field's value. -func (s *CodeGenNode) SetLineNumber(v int64) *CodeGenNode { - s.LineNumber = &v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *CodeGenNode) SetNodeType(v string) *CodeGenNode { - s.NodeType = &v - return s -} - -// An argument or property of a node. -type CodeGenNodeArg struct { - _ struct{} `type:"structure"` - - // The name of the argument or property. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // True if the value is used as a parameter. - Param *bool `type:"boolean"` - - // The value of the argument or property. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CodeGenNodeArg) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CodeGenNodeArg) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CodeGenNodeArg) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CodeGenNodeArg"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *CodeGenNodeArg) SetName(v string) *CodeGenNodeArg { - s.Name = &v - return s -} - -// SetParam sets the Param field's value. -func (s *CodeGenNodeArg) SetParam(v bool) *CodeGenNodeArg { - s.Param = &v - return s -} - -// SetValue sets the Value field's value. -func (s *CodeGenNodeArg) SetValue(v string) *CodeGenNodeArg { - s.Value = &v - return s -} - -// A column in a Table. -type Column struct { - _ struct{} `type:"structure"` - - // Free-form text comment. - Comment *string `type:"string"` - - // The name of the Column. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The datatype of data in the Column. - Type *string `type:"string"` -} - -// String returns the string representation -func (s Column) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Column) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Column) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Column"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *Column) SetComment(v string) *Column { - s.Comment = &v - return s -} - -// SetName sets the Name field's value. -func (s *Column) SetName(v string) *Column { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *Column) SetType(v string) *Column { - s.Type = &v - return s -} - -// Defines a condition under which a trigger fires. -type Condition struct { - _ struct{} `type:"structure"` - - // The name of the Job to whose JobRuns this condition applies and on which - // this trigger waits. - JobName *string `min:"1" type:"string"` - - // A logical operator. - LogicalOperator *string `type:"string" enum:"LogicalOperator"` - - // The condition state. Currently, the values supported are SUCCEEDED, STOPPED, - // TIMEOUT and FAILED. - State *string `type:"string" enum:"JobRunState"` -} - -// String returns the string representation -func (s Condition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Condition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Condition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Condition"} - if s.JobName != nil && len(*s.JobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobName sets the JobName field's value. -func (s *Condition) SetJobName(v string) *Condition { - s.JobName = &v - return s -} - -// SetLogicalOperator sets the LogicalOperator field's value. -func (s *Condition) SetLogicalOperator(v string) *Condition { - s.LogicalOperator = &v - return s -} - -// SetState sets the State field's value. -func (s *Condition) SetState(v string) *Condition { - s.State = &v - return s -} - -// Defines a connection to a data source. -type Connection struct { - _ struct{} `type:"structure"` - - // These key-value pairs define parameters for the connection: - // - // * HOST - The host URI: either the fully qualified domain name (FQDN) or - // the IPv4 address of the database host. - // - // * PORT - The port number, between 1024 and 65535, of the port on which - // the database host is listening for database connections. - // - // * USER_NAME - The name under which to log in to the database. The value - // string for USER_NAME is "USERNAME". - // - // * PASSWORD - A password, if one is used, for the user name. - // - // * ENCRYPTED_PASSWORD - When you enable connection password protection - // by setting ConnectionPasswordEncryption in the Data Catalog encryption - // settings, this field stores the key you designate to encrypt the password. - // - // * JDBC_DRIVER_JAR_URI - The S3 path of the a jar file that contains the - // JDBC driver to use. - // - // * JDBC_DRIVER_CLASS_NAME - The class name of the JDBC driver to use. - // - // * JDBC_ENGINE - The name of the JDBC engine to use. - // - // * JDBC_ENGINE_VERSION - The version of the JDBC engine to use. - // - // * CONFIG_FILES - (Reserved for future use). - // - // * INSTANCE_ID - The instance ID to use. - // - // * JDBC_CONNECTION_URL - The URL for the JDBC connection. - // - // * JDBC_ENFORCE_SSL - A Boolean string (true, false) specifying whether - // SSL with hostname matching will be enforced for the JDBC connection on - // the client. The default is false. - ConnectionProperties map[string]*string `type:"map"` - - // The type of the connection. Currently, only JDBC is supported; SFTP is not - // supported. - ConnectionType *string `type:"string" enum:"ConnectionType"` - - // The time this connection definition was created. - CreationTime *time.Time `type:"timestamp"` - - // Description of the connection. - Description *string `type:"string"` - - // The user, group or role that last updated this connection definition. - LastUpdatedBy *string `min:"1" type:"string"` - - // The last time this connection definition was updated. - LastUpdatedTime *time.Time `type:"timestamp"` - - // A list of criteria that can be used in selecting this connection. - MatchCriteria []*string `type:"list"` - - // The name of the connection definition. - Name *string `min:"1" type:"string"` - - // A map of physical connection requirements, such as VPC and SecurityGroup, - // needed for making this connection successfully. - PhysicalConnectionRequirements *PhysicalConnectionRequirements `type:"structure"` -} - -// String returns the string representation -func (s Connection) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Connection) GoString() string { - return s.String() -} - -// SetConnectionProperties sets the ConnectionProperties field's value. -func (s *Connection) SetConnectionProperties(v map[string]*string) *Connection { - s.ConnectionProperties = v - return s -} - -// SetConnectionType sets the ConnectionType field's value. -func (s *Connection) SetConnectionType(v string) *Connection { - s.ConnectionType = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *Connection) SetCreationTime(v time.Time) *Connection { - s.CreationTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Connection) SetDescription(v string) *Connection { - s.Description = &v - return s -} - -// SetLastUpdatedBy sets the LastUpdatedBy field's value. -func (s *Connection) SetLastUpdatedBy(v string) *Connection { - s.LastUpdatedBy = &v - return s -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *Connection) SetLastUpdatedTime(v time.Time) *Connection { - s.LastUpdatedTime = &v - return s -} - -// SetMatchCriteria sets the MatchCriteria field's value. -func (s *Connection) SetMatchCriteria(v []*string) *Connection { - s.MatchCriteria = v - return s -} - -// SetName sets the Name field's value. -func (s *Connection) SetName(v string) *Connection { - s.Name = &v - return s -} - -// SetPhysicalConnectionRequirements sets the PhysicalConnectionRequirements field's value. -func (s *Connection) SetPhysicalConnectionRequirements(v *PhysicalConnectionRequirements) *Connection { - s.PhysicalConnectionRequirements = v - return s -} - -// A structure used to specify a connection to create or update. -type ConnectionInput struct { - _ struct{} `type:"structure"` - - // These key-value pairs define parameters for the connection. - // - // ConnectionProperties is a required field - ConnectionProperties map[string]*string `type:"map" required:"true"` - - // The type of the connection. Currently, only JDBC is supported; SFTP is not - // supported. - // - // ConnectionType is a required field - ConnectionType *string `type:"string" required:"true" enum:"ConnectionType"` - - // Description of the connection. - Description *string `type:"string"` - - // A list of criteria that can be used in selecting this connection. - MatchCriteria []*string `type:"list"` - - // The name of the connection. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // A map of physical connection requirements, such as VPC and SecurityGroup, - // needed for making this connection successfully. - PhysicalConnectionRequirements *PhysicalConnectionRequirements `type:"structure"` -} - -// String returns the string representation -func (s ConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConnectionInput"} - if s.ConnectionProperties == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionProperties")) - } - if s.ConnectionType == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionType")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.PhysicalConnectionRequirements != nil { - if err := s.PhysicalConnectionRequirements.Validate(); err != nil { - invalidParams.AddNested("PhysicalConnectionRequirements", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionProperties sets the ConnectionProperties field's value. -func (s *ConnectionInput) SetConnectionProperties(v map[string]*string) *ConnectionInput { - s.ConnectionProperties = v - return s -} - -// SetConnectionType sets the ConnectionType field's value. -func (s *ConnectionInput) SetConnectionType(v string) *ConnectionInput { - s.ConnectionType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ConnectionInput) SetDescription(v string) *ConnectionInput { - s.Description = &v - return s -} - -// SetMatchCriteria sets the MatchCriteria field's value. -func (s *ConnectionInput) SetMatchCriteria(v []*string) *ConnectionInput { - s.MatchCriteria = v - return s -} - -// SetName sets the Name field's value. -func (s *ConnectionInput) SetName(v string) *ConnectionInput { - s.Name = &v - return s -} - -// SetPhysicalConnectionRequirements sets the PhysicalConnectionRequirements field's value. -func (s *ConnectionInput) SetPhysicalConnectionRequirements(v *PhysicalConnectionRequirements) *ConnectionInput { - s.PhysicalConnectionRequirements = v - return s -} - -// The data structure used by the Data Catalog to encrypt the password as part -// of CreateConnection or UpdateConnection and store it in the ENCRYPTED_PASSWORD -// field in the connection properties. You can enable catalog encryption or -// only password encryption. -// -// When a CreationConnection request arrives containing a password, the Data -// Catalog first encrypts the password using your KMS key, and then encrypts -// the whole connection object again if catalog encryption is also enabled. -// -// This encryption requires that you set KMS key permissions to enable or restrict -// access on the password key according to your security requirements. For example, -// you may want only admin users to have decrypt permission on the password -// key. -type ConnectionPasswordEncryption struct { - _ struct{} `type:"structure"` - - // A KMS key used to protect access to the JDBC source. - // - // All users in your account should be granted the kms:encrypt permission to - // encrypt passwords before storing them in the Data Catalog (through the AWS - // Glue CreateConnection operation). - // - // The decrypt permission should be granted only to KMS key admins and IAM roles - // designated for AWS Glue crawlers. - AwsKmsKeyId *string `min:"1" type:"string"` - - // When the ReturnConnectionPasswordEncrypted flag is set to "true", passwords - // remain encrypted in the responses of GetConnection and GetConnections. This - // encryption takes effect independently from catalog encryption. - // - // ReturnConnectionPasswordEncrypted is a required field - ReturnConnectionPasswordEncrypted *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s ConnectionPasswordEncryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConnectionPasswordEncryption) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConnectionPasswordEncryption) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConnectionPasswordEncryption"} - if s.AwsKmsKeyId != nil && len(*s.AwsKmsKeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AwsKmsKeyId", 1)) - } - if s.ReturnConnectionPasswordEncrypted == nil { - invalidParams.Add(request.NewErrParamRequired("ReturnConnectionPasswordEncrypted")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAwsKmsKeyId sets the AwsKmsKeyId field's value. -func (s *ConnectionPasswordEncryption) SetAwsKmsKeyId(v string) *ConnectionPasswordEncryption { - s.AwsKmsKeyId = &v - return s -} - -// SetReturnConnectionPasswordEncrypted sets the ReturnConnectionPasswordEncrypted field's value. -func (s *ConnectionPasswordEncryption) SetReturnConnectionPasswordEncrypted(v bool) *ConnectionPasswordEncryption { - s.ReturnConnectionPasswordEncrypted = &v - return s -} - -// Specifies the connections used by a job. -type ConnectionsList struct { - _ struct{} `type:"structure"` - - // A list of connections used by the job. - Connections []*string `type:"list"` -} - -// String returns the string representation -func (s ConnectionsList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConnectionsList) GoString() string { - return s.String() -} - -// SetConnections sets the Connections field's value. -func (s *ConnectionsList) SetConnections(v []*string) *ConnectionsList { - s.Connections = v - return s -} - -// Specifies a crawler program that examines a data source and uses classifiers -// to try to determine its schema. If successful, the crawler records metadata -// concerning the data source in the AWS Glue Data Catalog. -type Crawler struct { - _ struct{} `type:"structure"` - - // A list of custom classifiers associated with the crawler. - Classifiers []*string `type:"list"` - - // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a crawler's behavior. For more information, see Configuring - // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). - Configuration *string `type:"string"` - - // If the crawler is running, contains the total time elapsed since the last - // crawl began. - CrawlElapsedTime *int64 `type:"long"` - - // The name of the SecurityConfiguration structure to be used by this Crawler. - CrawlerSecurityConfiguration *string `type:"string"` - - // The time when the crawler was created. - CreationTime *time.Time `type:"timestamp"` - - // The database where metadata is written by this crawler. - DatabaseName *string `type:"string"` - - // A description of the crawler. - Description *string `type:"string"` - - // The status of the last crawl, and potentially error information if an error - // occurred. - LastCrawl *LastCrawlInfo `type:"structure"` - - // The time the crawler was last updated. - LastUpdated *time.Time `type:"timestamp"` - - // The crawler name. - Name *string `min:"1" type:"string"` - - // The IAM role (or ARN of an IAM role) used to access customer resources, such - // as data in Amazon S3. - Role *string `type:"string"` - - // For scheduled crawlers, the schedule when the crawler runs. - Schedule *Schedule `type:"structure"` - - // Sets the behavior when the crawler finds a changed or deleted object. - SchemaChangePolicy *SchemaChangePolicy `type:"structure"` - - // Indicates whether the crawler is running, or whether a run is pending. - State *string `type:"string" enum:"CrawlerState"` - - // The prefix added to the names of tables that are created. - TablePrefix *string `type:"string"` - - // A collection of targets to crawl. - Targets *CrawlerTargets `type:"structure"` - - // The version of the crawler. - Version *int64 `type:"long"` -} - -// String returns the string representation -func (s Crawler) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Crawler) GoString() string { - return s.String() -} - -// SetClassifiers sets the Classifiers field's value. -func (s *Crawler) SetClassifiers(v []*string) *Crawler { - s.Classifiers = v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *Crawler) SetConfiguration(v string) *Crawler { - s.Configuration = &v - return s -} - -// SetCrawlElapsedTime sets the CrawlElapsedTime field's value. -func (s *Crawler) SetCrawlElapsedTime(v int64) *Crawler { - s.CrawlElapsedTime = &v - return s -} - -// SetCrawlerSecurityConfiguration sets the CrawlerSecurityConfiguration field's value. -func (s *Crawler) SetCrawlerSecurityConfiguration(v string) *Crawler { - s.CrawlerSecurityConfiguration = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *Crawler) SetCreationTime(v time.Time) *Crawler { - s.CreationTime = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *Crawler) SetDatabaseName(v string) *Crawler { - s.DatabaseName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Crawler) SetDescription(v string) *Crawler { - s.Description = &v - return s -} - -// SetLastCrawl sets the LastCrawl field's value. -func (s *Crawler) SetLastCrawl(v *LastCrawlInfo) *Crawler { - s.LastCrawl = v - return s -} - -// SetLastUpdated sets the LastUpdated field's value. -func (s *Crawler) SetLastUpdated(v time.Time) *Crawler { - s.LastUpdated = &v - return s -} - -// SetName sets the Name field's value. -func (s *Crawler) SetName(v string) *Crawler { - s.Name = &v - return s -} - -// SetRole sets the Role field's value. -func (s *Crawler) SetRole(v string) *Crawler { - s.Role = &v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *Crawler) SetSchedule(v *Schedule) *Crawler { - s.Schedule = v - return s -} - -// SetSchemaChangePolicy sets the SchemaChangePolicy field's value. -func (s *Crawler) SetSchemaChangePolicy(v *SchemaChangePolicy) *Crawler { - s.SchemaChangePolicy = v - return s -} - -// SetState sets the State field's value. -func (s *Crawler) SetState(v string) *Crawler { - s.State = &v - return s -} - -// SetTablePrefix sets the TablePrefix field's value. -func (s *Crawler) SetTablePrefix(v string) *Crawler { - s.TablePrefix = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *Crawler) SetTargets(v *CrawlerTargets) *Crawler { - s.Targets = v - return s -} - -// SetVersion sets the Version field's value. -func (s *Crawler) SetVersion(v int64) *Crawler { - s.Version = &v - return s -} - -// Metrics for a specified crawler. -type CrawlerMetrics struct { - _ struct{} `type:"structure"` - - // The name of the crawler. - CrawlerName *string `min:"1" type:"string"` - - // The duration of the crawler's most recent run, in seconds. - LastRuntimeSeconds *float64 `type:"double"` - - // The median duration of this crawler's runs, in seconds. - MedianRuntimeSeconds *float64 `type:"double"` - - // True if the crawler is still estimating how long it will take to complete - // this run. - StillEstimating *bool `type:"boolean"` - - // The number of tables created by this crawler. - TablesCreated *int64 `type:"integer"` - - // The number of tables deleted by this crawler. - TablesDeleted *int64 `type:"integer"` - - // The number of tables updated by this crawler. - TablesUpdated *int64 `type:"integer"` - - // The estimated time left to complete a running crawl. - TimeLeftSeconds *float64 `type:"double"` -} - -// String returns the string representation -func (s CrawlerMetrics) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CrawlerMetrics) GoString() string { - return s.String() -} - -// SetCrawlerName sets the CrawlerName field's value. -func (s *CrawlerMetrics) SetCrawlerName(v string) *CrawlerMetrics { - s.CrawlerName = &v - return s -} - -// SetLastRuntimeSeconds sets the LastRuntimeSeconds field's value. -func (s *CrawlerMetrics) SetLastRuntimeSeconds(v float64) *CrawlerMetrics { - s.LastRuntimeSeconds = &v - return s -} - -// SetMedianRuntimeSeconds sets the MedianRuntimeSeconds field's value. -func (s *CrawlerMetrics) SetMedianRuntimeSeconds(v float64) *CrawlerMetrics { - s.MedianRuntimeSeconds = &v - return s -} - -// SetStillEstimating sets the StillEstimating field's value. -func (s *CrawlerMetrics) SetStillEstimating(v bool) *CrawlerMetrics { - s.StillEstimating = &v - return s -} - -// SetTablesCreated sets the TablesCreated field's value. -func (s *CrawlerMetrics) SetTablesCreated(v int64) *CrawlerMetrics { - s.TablesCreated = &v - return s -} - -// SetTablesDeleted sets the TablesDeleted field's value. -func (s *CrawlerMetrics) SetTablesDeleted(v int64) *CrawlerMetrics { - s.TablesDeleted = &v - return s -} - -// SetTablesUpdated sets the TablesUpdated field's value. -func (s *CrawlerMetrics) SetTablesUpdated(v int64) *CrawlerMetrics { - s.TablesUpdated = &v - return s -} - -// SetTimeLeftSeconds sets the TimeLeftSeconds field's value. -func (s *CrawlerMetrics) SetTimeLeftSeconds(v float64) *CrawlerMetrics { - s.TimeLeftSeconds = &v - return s -} - -// Specifies data stores to crawl. -type CrawlerTargets struct { - _ struct{} `type:"structure"` - - // Specifies DynamoDB targets. - DynamoDBTargets []*DynamoDBTarget `type:"list"` - - // Specifies JDBC targets. - JdbcTargets []*JdbcTarget `type:"list"` - - // Specifies Amazon S3 targets. - S3Targets []*S3Target `type:"list"` -} - -// String returns the string representation -func (s CrawlerTargets) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CrawlerTargets) GoString() string { - return s.String() -} - -// SetDynamoDBTargets sets the DynamoDBTargets field's value. -func (s *CrawlerTargets) SetDynamoDBTargets(v []*DynamoDBTarget) *CrawlerTargets { - s.DynamoDBTargets = v - return s -} - -// SetJdbcTargets sets the JdbcTargets field's value. -func (s *CrawlerTargets) SetJdbcTargets(v []*JdbcTarget) *CrawlerTargets { - s.JdbcTargets = v - return s -} - -// SetS3Targets sets the S3Targets field's value. -func (s *CrawlerTargets) SetS3Targets(v []*S3Target) *CrawlerTargets { - s.S3Targets = v - return s -} - -type CreateClassifierInput struct { - _ struct{} `type:"structure"` - - // A GrokClassifier object specifying the classifier to create. - GrokClassifier *CreateGrokClassifierRequest `type:"structure"` - - // A JsonClassifier object specifying the classifier to create. - JsonClassifier *CreateJsonClassifierRequest `type:"structure"` - - // An XMLClassifier object specifying the classifier to create. - XMLClassifier *CreateXMLClassifierRequest `type:"structure"` -} - -// String returns the string representation -func (s CreateClassifierInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClassifierInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateClassifierInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateClassifierInput"} - if s.GrokClassifier != nil { - if err := s.GrokClassifier.Validate(); err != nil { - invalidParams.AddNested("GrokClassifier", err.(request.ErrInvalidParams)) - } - } - if s.JsonClassifier != nil { - if err := s.JsonClassifier.Validate(); err != nil { - invalidParams.AddNested("JsonClassifier", err.(request.ErrInvalidParams)) - } - } - if s.XMLClassifier != nil { - if err := s.XMLClassifier.Validate(); err != nil { - invalidParams.AddNested("XMLClassifier", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGrokClassifier sets the GrokClassifier field's value. -func (s *CreateClassifierInput) SetGrokClassifier(v *CreateGrokClassifierRequest) *CreateClassifierInput { - s.GrokClassifier = v - return s -} - -// SetJsonClassifier sets the JsonClassifier field's value. -func (s *CreateClassifierInput) SetJsonClassifier(v *CreateJsonClassifierRequest) *CreateClassifierInput { - s.JsonClassifier = v - return s -} - -// SetXMLClassifier sets the XMLClassifier field's value. -func (s *CreateClassifierInput) SetXMLClassifier(v *CreateXMLClassifierRequest) *CreateClassifierInput { - s.XMLClassifier = v - return s -} - -type CreateClassifierOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateClassifierOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClassifierOutput) GoString() string { - return s.String() -} - -type CreateConnectionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog in which to create the connection. If none is - // supplied, the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // A ConnectionInput object defining the connection to create. - // - // ConnectionInput is a required field - ConnectionInput *ConnectionInput `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateConnectionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.ConnectionInput == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionInput")) - } - if s.ConnectionInput != nil { - if err := s.ConnectionInput.Validate(); err != nil { - invalidParams.AddNested("ConnectionInput", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *CreateConnectionInput) SetCatalogId(v string) *CreateConnectionInput { - s.CatalogId = &v - return s -} - -// SetConnectionInput sets the ConnectionInput field's value. -func (s *CreateConnectionInput) SetConnectionInput(v *ConnectionInput) *CreateConnectionInput { - s.ConnectionInput = v - return s -} - -type CreateConnectionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConnectionOutput) GoString() string { - return s.String() -} - -type CreateCrawlerInput struct { - _ struct{} `type:"structure"` - - // A list of custom classifiers that the user has registered. By default, all - // built-in classifiers are included in a crawl, but these custom classifiers - // always override the default classifiers for a given classification. - Classifiers []*string `type:"list"` - - // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a crawler's behavior. For more information, see Configuring - // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). - Configuration *string `type:"string"` - - // The name of the SecurityConfiguration structure to be used by this Crawler. - CrawlerSecurityConfiguration *string `type:"string"` - - // The AWS Glue database where results are written, such as: arn:aws:daylight:us-east-1::database/sometable/*. - // - // DatabaseName is a required field - DatabaseName *string `type:"string" required:"true"` - - // A description of the new crawler. - Description *string `type:"string"` - - // Name of the new crawler. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The IAM role (or ARN of an IAM role) used by the new crawler to access customer - // resources. - // - // Role is a required field - Role *string `type:"string" required:"true"` - - // A cron expression used to specify the schedule (see Time-Based Schedules - // for Jobs and Crawlers (http://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 * * ? *). - Schedule *string `type:"string"` - - // Policy for the crawler's update and deletion behavior. - SchemaChangePolicy *SchemaChangePolicy `type:"structure"` - - // The table prefix used for catalog tables that are created. - TablePrefix *string `type:"string"` - - // A list of collection of targets to crawl. - // - // Targets is a required field - Targets *CrawlerTargets `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateCrawlerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCrawlerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCrawlerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCrawlerInput"} - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Role == nil { - invalidParams.Add(request.NewErrParamRequired("Role")) - } - if s.Targets == nil { - invalidParams.Add(request.NewErrParamRequired("Targets")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClassifiers sets the Classifiers field's value. -func (s *CreateCrawlerInput) SetClassifiers(v []*string) *CreateCrawlerInput { - s.Classifiers = v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *CreateCrawlerInput) SetConfiguration(v string) *CreateCrawlerInput { - s.Configuration = &v - return s -} - -// SetCrawlerSecurityConfiguration sets the CrawlerSecurityConfiguration field's value. -func (s *CreateCrawlerInput) SetCrawlerSecurityConfiguration(v string) *CreateCrawlerInput { - s.CrawlerSecurityConfiguration = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *CreateCrawlerInput) SetDatabaseName(v string) *CreateCrawlerInput { - s.DatabaseName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateCrawlerInput) SetDescription(v string) *CreateCrawlerInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateCrawlerInput) SetName(v string) *CreateCrawlerInput { - s.Name = &v - return s -} - -// SetRole sets the Role field's value. -func (s *CreateCrawlerInput) SetRole(v string) *CreateCrawlerInput { - s.Role = &v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *CreateCrawlerInput) SetSchedule(v string) *CreateCrawlerInput { - s.Schedule = &v - return s -} - -// SetSchemaChangePolicy sets the SchemaChangePolicy field's value. -func (s *CreateCrawlerInput) SetSchemaChangePolicy(v *SchemaChangePolicy) *CreateCrawlerInput { - s.SchemaChangePolicy = v - return s -} - -// SetTablePrefix sets the TablePrefix field's value. -func (s *CreateCrawlerInput) SetTablePrefix(v string) *CreateCrawlerInput { - s.TablePrefix = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *CreateCrawlerInput) SetTargets(v *CrawlerTargets) *CreateCrawlerInput { - s.Targets = v - return s -} - -type CreateCrawlerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateCrawlerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCrawlerOutput) GoString() string { - return s.String() -} - -type CreateDatabaseInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog in which to create the database. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // A DatabaseInput object defining the metadata database to create in the catalog. - // - // DatabaseInput is a required field - DatabaseInput *DatabaseInput `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateDatabaseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDatabaseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDatabaseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDatabaseInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseInput == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseInput")) - } - if s.DatabaseInput != nil { - if err := s.DatabaseInput.Validate(); err != nil { - invalidParams.AddNested("DatabaseInput", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *CreateDatabaseInput) SetCatalogId(v string) *CreateDatabaseInput { - s.CatalogId = &v - return s -} - -// SetDatabaseInput sets the DatabaseInput field's value. -func (s *CreateDatabaseInput) SetDatabaseInput(v *DatabaseInput) *CreateDatabaseInput { - s.DatabaseInput = v - return s -} - -type CreateDatabaseOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateDatabaseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDatabaseOutput) GoString() string { - return s.String() -} - -type CreateDevEndpointInput struct { - _ struct{} `type:"structure"` - - // The name to be assigned to the new DevEndpoint. - // - // EndpointName is a required field - EndpointName *string `type:"string" required:"true"` - - // Path to one or more Java Jars in an S3 bucket that should be loaded in your - // DevEndpoint. - ExtraJarsS3Path *string `type:"string"` - - // Path(s) to one or more Python libraries in an S3 bucket that should be loaded - // in your DevEndpoint. Multiple values must be complete paths separated by - // a comma. - // - // Please note that only pure Python libraries can currently be used on a DevEndpoint. - // Libraries that rely on C extensions, such as the pandas (http://pandas.pydata.org/) - // Python data analysis library, are not yet supported. - ExtraPythonLibsS3Path *string `type:"string"` - - // The number of AWS Glue Data Processing Units (DPUs) to allocate to this DevEndpoint. - NumberOfNodes *int64 `type:"integer"` - - // The public key to be used by this DevEndpoint for authentication. This attribute - // is provided for backward compatibility, as the recommended attribute to use - // is public keys. - PublicKey *string `type:"string"` - - // A list of public keys to be used by the DevEndpoints for authentication. - // The use of this attribute is preferred over a single public key because the - // public keys allow you to have a different private key per client. - // - // If you previously created an endpoint with a public key, you must remove - // that key to be able to set a list of public keys: call the UpdateDevEndpoint - // API with the public key content in the deletePublicKeys attribute, and the - // list of new keys in the addPublicKeys attribute. - PublicKeys []*string `type:"list"` - - // The IAM role for the DevEndpoint. - // - // RoleArn is a required field - RoleArn *string `type:"string" required:"true"` - - // The name of the SecurityConfiguration structure to be used with this DevEndpoint. - SecurityConfiguration *string `min:"1" type:"string"` - - // Security group IDs for the security groups to be used by the new DevEndpoint. - SecurityGroupIds []*string `type:"list"` - - // The subnet ID for the new DevEndpoint to use. - SubnetId *string `type:"string"` -} - -// String returns the string representation -func (s CreateDevEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDevEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDevEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDevEndpointInput"} - if s.EndpointName == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointName")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.SecurityConfiguration != nil && len(*s.SecurityConfiguration) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityConfiguration", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointName sets the EndpointName field's value. -func (s *CreateDevEndpointInput) SetEndpointName(v string) *CreateDevEndpointInput { - s.EndpointName = &v - return s -} - -// SetExtraJarsS3Path sets the ExtraJarsS3Path field's value. -func (s *CreateDevEndpointInput) SetExtraJarsS3Path(v string) *CreateDevEndpointInput { - s.ExtraJarsS3Path = &v - return s -} - -// SetExtraPythonLibsS3Path sets the ExtraPythonLibsS3Path field's value. -func (s *CreateDevEndpointInput) SetExtraPythonLibsS3Path(v string) *CreateDevEndpointInput { - s.ExtraPythonLibsS3Path = &v - return s -} - -// SetNumberOfNodes sets the NumberOfNodes field's value. -func (s *CreateDevEndpointInput) SetNumberOfNodes(v int64) *CreateDevEndpointInput { - s.NumberOfNodes = &v - return s -} - -// SetPublicKey sets the PublicKey field's value. -func (s *CreateDevEndpointInput) SetPublicKey(v string) *CreateDevEndpointInput { - s.PublicKey = &v - return s -} - -// SetPublicKeys sets the PublicKeys field's value. -func (s *CreateDevEndpointInput) SetPublicKeys(v []*string) *CreateDevEndpointInput { - s.PublicKeys = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CreateDevEndpointInput) SetRoleArn(v string) *CreateDevEndpointInput { - s.RoleArn = &v - return s -} - -// SetSecurityConfiguration sets the SecurityConfiguration field's value. -func (s *CreateDevEndpointInput) SetSecurityConfiguration(v string) *CreateDevEndpointInput { - s.SecurityConfiguration = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *CreateDevEndpointInput) SetSecurityGroupIds(v []*string) *CreateDevEndpointInput { - s.SecurityGroupIds = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *CreateDevEndpointInput) SetSubnetId(v string) *CreateDevEndpointInput { - s.SubnetId = &v - return s -} - -type CreateDevEndpointOutput struct { - _ struct{} `type:"structure"` - - // The AWS availability zone where this DevEndpoint is located. - AvailabilityZone *string `type:"string"` - - // The point in time at which this DevEndpoint was created. - CreatedTimestamp *time.Time `type:"timestamp"` - - // The name assigned to the new DevEndpoint. - EndpointName *string `type:"string"` - - // Path to one or more Java Jars in an S3 bucket that will be loaded in your - // DevEndpoint. - ExtraJarsS3Path *string `type:"string"` - - // Path(s) to one or more Python libraries in an S3 bucket that will be loaded - // in your DevEndpoint. - ExtraPythonLibsS3Path *string `type:"string"` - - // The reason for a current failure in this DevEndpoint. - FailureReason *string `type:"string"` - - // The number of AWS Glue Data Processing Units (DPUs) allocated to this DevEndpoint. - NumberOfNodes *int64 `type:"integer"` - - // The AWS ARN of the role assigned to the new DevEndpoint. - RoleArn *string `type:"string"` - - // The name of the SecurityConfiguration structure being used with this DevEndpoint. - SecurityConfiguration *string `min:"1" type:"string"` - - // The security groups assigned to the new DevEndpoint. - SecurityGroupIds []*string `type:"list"` - - // The current status of the new DevEndpoint. - Status *string `type:"string"` - - // The subnet ID assigned to the new DevEndpoint. - SubnetId *string `type:"string"` - - // The ID of the VPC used by this DevEndpoint. - VpcId *string `type:"string"` - - // The address of the YARN endpoint used by this DevEndpoint. - YarnEndpointAddress *string `type:"string"` - - // The Apache Zeppelin port for the remote Apache Spark interpreter. - ZeppelinRemoteSparkInterpreterPort *int64 `type:"integer"` -} - -// String returns the string representation -func (s CreateDevEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDevEndpointOutput) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateDevEndpointOutput) SetAvailabilityZone(v string) *CreateDevEndpointOutput { - s.AvailabilityZone = &v - return s -} - -// SetCreatedTimestamp sets the CreatedTimestamp field's value. -func (s *CreateDevEndpointOutput) SetCreatedTimestamp(v time.Time) *CreateDevEndpointOutput { - s.CreatedTimestamp = &v - return s -} - -// SetEndpointName sets the EndpointName field's value. -func (s *CreateDevEndpointOutput) SetEndpointName(v string) *CreateDevEndpointOutput { - s.EndpointName = &v - return s -} - -// SetExtraJarsS3Path sets the ExtraJarsS3Path field's value. -func (s *CreateDevEndpointOutput) SetExtraJarsS3Path(v string) *CreateDevEndpointOutput { - s.ExtraJarsS3Path = &v - return s -} - -// SetExtraPythonLibsS3Path sets the ExtraPythonLibsS3Path field's value. -func (s *CreateDevEndpointOutput) SetExtraPythonLibsS3Path(v string) *CreateDevEndpointOutput { - s.ExtraPythonLibsS3Path = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *CreateDevEndpointOutput) SetFailureReason(v string) *CreateDevEndpointOutput { - s.FailureReason = &v - return s -} - -// SetNumberOfNodes sets the NumberOfNodes field's value. -func (s *CreateDevEndpointOutput) SetNumberOfNodes(v int64) *CreateDevEndpointOutput { - s.NumberOfNodes = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CreateDevEndpointOutput) SetRoleArn(v string) *CreateDevEndpointOutput { - s.RoleArn = &v - return s -} - -// SetSecurityConfiguration sets the SecurityConfiguration field's value. -func (s *CreateDevEndpointOutput) SetSecurityConfiguration(v string) *CreateDevEndpointOutput { - s.SecurityConfiguration = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *CreateDevEndpointOutput) SetSecurityGroupIds(v []*string) *CreateDevEndpointOutput { - s.SecurityGroupIds = v - return s -} - -// SetStatus sets the Status field's value. -func (s *CreateDevEndpointOutput) SetStatus(v string) *CreateDevEndpointOutput { - s.Status = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *CreateDevEndpointOutput) SetSubnetId(v string) *CreateDevEndpointOutput { - s.SubnetId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CreateDevEndpointOutput) SetVpcId(v string) *CreateDevEndpointOutput { - s.VpcId = &v - return s -} - -// SetYarnEndpointAddress sets the YarnEndpointAddress field's value. -func (s *CreateDevEndpointOutput) SetYarnEndpointAddress(v string) *CreateDevEndpointOutput { - s.YarnEndpointAddress = &v - return s -} - -// SetZeppelinRemoteSparkInterpreterPort sets the ZeppelinRemoteSparkInterpreterPort field's value. -func (s *CreateDevEndpointOutput) SetZeppelinRemoteSparkInterpreterPort(v int64) *CreateDevEndpointOutput { - s.ZeppelinRemoteSparkInterpreterPort = &v - return s -} - -// Specifies a grok classifier for CreateClassifier to create. -type CreateGrokClassifierRequest struct { - _ struct{} `type:"structure"` - - // An identifier of the data format that the classifier matches, such as Twitter, - // JSON, Omniture logs, Amazon CloudWatch Logs, and so on. - // - // Classification is a required field - Classification *string `type:"string" required:"true"` - - // Optional custom grok patterns used by this classifier. - CustomPatterns *string `type:"string"` - - // The grok pattern used by this classifier. - // - // GrokPattern is a required field - GrokPattern *string `min:"1" type:"string" required:"true"` - - // The name of the new classifier. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateGrokClassifierRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateGrokClassifierRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateGrokClassifierRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateGrokClassifierRequest"} - if s.Classification == nil { - invalidParams.Add(request.NewErrParamRequired("Classification")) - } - if s.GrokPattern == nil { - invalidParams.Add(request.NewErrParamRequired("GrokPattern")) - } - if s.GrokPattern != nil && len(*s.GrokPattern) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GrokPattern", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClassification sets the Classification field's value. -func (s *CreateGrokClassifierRequest) SetClassification(v string) *CreateGrokClassifierRequest { - s.Classification = &v - return s -} - -// SetCustomPatterns sets the CustomPatterns field's value. -func (s *CreateGrokClassifierRequest) SetCustomPatterns(v string) *CreateGrokClassifierRequest { - s.CustomPatterns = &v - return s -} - -// SetGrokPattern sets the GrokPattern field's value. -func (s *CreateGrokClassifierRequest) SetGrokPattern(v string) *CreateGrokClassifierRequest { - s.GrokPattern = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateGrokClassifierRequest) SetName(v string) *CreateGrokClassifierRequest { - s.Name = &v - return s -} - -type CreateJobInput struct { - _ struct{} `type:"structure"` - - // This parameter is deprecated. Use MaxCapacity instead. - // - // The number of AWS Glue data processing units (DPUs) to allocate to this Job. - // From 2 to 100 DPUs can be allocated; the default is 10. A DPU is a relative - // measure of processing power that consists of 4 vCPUs of compute capacity - // and 16 GB of memory. For more information, see the AWS Glue pricing page - // (https://aws.amazon.com/glue/pricing/). - // - // Deprecated: This property is deprecated, use MaxCapacity instead. - AllocatedCapacity *int64 `deprecated:"true" type:"integer"` - - // The JobCommand that executes this job. - // - // Command is a required field - Command *JobCommand `type:"structure" required:"true"` - - // The connections used for this job. - Connections *ConnectionsList `type:"structure"` - - // The default arguments for this job. - // - // You can specify arguments here that your own job-execution script consumes, - // as well as arguments that AWS Glue itself consumes. - // - // For information about how to specify and consume your own Job arguments, - // see the Calling AWS Glue APIs in Python (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html) - // topic in the developer guide. - // - // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) - // topic in the developer guide. - DefaultArguments map[string]*string `type:"map"` - - // Description of the job being defined. - Description *string `type:"string"` - - // An ExecutionProperty specifying the maximum number of concurrent runs allowed - // for this job. - ExecutionProperty *ExecutionProperty `type:"structure"` - - // This field is reserved for future use. - LogUri *string `type:"string"` - - // AWS Glue supports running jobs on a JobCommand.Name="pythonshell" with allocated - // processing as low as 0.0625 DPU, which can be specified using MaxCapacity. - // Glue ETL jobs running in any other way cannot have fractional DPU allocations. - MaxCapacity *float64 `type:"double"` - - // The maximum number of times to retry this job if it fails. - MaxRetries *int64 `type:"integer"` - - // The name you assign to this job definition. It must be unique in your account. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // Specifies configuration properties of a job notification. - NotificationProperty *NotificationProperty `type:"structure"` - - // The name or ARN of the IAM role associated with this job. - // - // Role is a required field - Role *string `type:"string" required:"true"` - - // The name of the SecurityConfiguration structure to be used with this job. - SecurityConfiguration *string `min:"1" type:"string"` - - // The job timeout in minutes. This is the maximum time that a job run can consume - // resources before it is terminated and enters TIMEOUT status. The default - // is 2,880 minutes (48 hours). - Timeout *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s CreateJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateJobInput"} - if s.Command == nil { - invalidParams.Add(request.NewErrParamRequired("Command")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Role == nil { - invalidParams.Add(request.NewErrParamRequired("Role")) - } - if s.SecurityConfiguration != nil && len(*s.SecurityConfiguration) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityConfiguration", 1)) - } - if s.Timeout != nil && *s.Timeout < 1 { - invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) - } - if s.NotificationProperty != nil { - if err := s.NotificationProperty.Validate(); err != nil { - invalidParams.AddNested("NotificationProperty", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllocatedCapacity sets the AllocatedCapacity field's value. -func (s *CreateJobInput) SetAllocatedCapacity(v int64) *CreateJobInput { - s.AllocatedCapacity = &v - return s -} - -// SetCommand sets the Command field's value. -func (s *CreateJobInput) SetCommand(v *JobCommand) *CreateJobInput { - s.Command = v - return s -} - -// SetConnections sets the Connections field's value. -func (s *CreateJobInput) SetConnections(v *ConnectionsList) *CreateJobInput { - s.Connections = v - return s -} - -// SetDefaultArguments sets the DefaultArguments field's value. -func (s *CreateJobInput) SetDefaultArguments(v map[string]*string) *CreateJobInput { - s.DefaultArguments = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateJobInput) SetDescription(v string) *CreateJobInput { - s.Description = &v - return s -} - -// SetExecutionProperty sets the ExecutionProperty field's value. -func (s *CreateJobInput) SetExecutionProperty(v *ExecutionProperty) *CreateJobInput { - s.ExecutionProperty = v - return s -} - -// SetLogUri sets the LogUri field's value. -func (s *CreateJobInput) SetLogUri(v string) *CreateJobInput { - s.LogUri = &v - return s -} - -// SetMaxCapacity sets the MaxCapacity field's value. -func (s *CreateJobInput) SetMaxCapacity(v float64) *CreateJobInput { - s.MaxCapacity = &v - return s -} - -// SetMaxRetries sets the MaxRetries field's value. -func (s *CreateJobInput) SetMaxRetries(v int64) *CreateJobInput { - s.MaxRetries = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateJobInput) SetName(v string) *CreateJobInput { - s.Name = &v - return s -} - -// SetNotificationProperty sets the NotificationProperty field's value. -func (s *CreateJobInput) SetNotificationProperty(v *NotificationProperty) *CreateJobInput { - s.NotificationProperty = v - return s -} - -// SetRole sets the Role field's value. -func (s *CreateJobInput) SetRole(v string) *CreateJobInput { - s.Role = &v - return s -} - -// SetSecurityConfiguration sets the SecurityConfiguration field's value. -func (s *CreateJobInput) SetSecurityConfiguration(v string) *CreateJobInput { - s.SecurityConfiguration = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *CreateJobInput) SetTimeout(v int64) *CreateJobInput { - s.Timeout = &v - return s -} - -type CreateJobOutput struct { - _ struct{} `type:"structure"` - - // The unique name that was provided for this job definition. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJobOutput) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *CreateJobOutput) SetName(v string) *CreateJobOutput { - s.Name = &v - return s -} - -// Specifies a JSON classifier for CreateClassifier to create. -type CreateJsonClassifierRequest struct { - _ struct{} `type:"structure"` - - // A JsonPath string defining the JSON data for the classifier to classify. - // AWS Glue supports a subset of JsonPath, as described in Writing JsonPath - // Custom Classifiers (https://docs.aws.amazon.com/glue/latest/dg/custom-classifier.html#custom-classifier-json). - // - // JsonPath is a required field - JsonPath *string `type:"string" required:"true"` - - // The name of the classifier. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateJsonClassifierRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJsonClassifierRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateJsonClassifierRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateJsonClassifierRequest"} - if s.JsonPath == nil { - invalidParams.Add(request.NewErrParamRequired("JsonPath")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJsonPath sets the JsonPath field's value. -func (s *CreateJsonClassifierRequest) SetJsonPath(v string) *CreateJsonClassifierRequest { - s.JsonPath = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateJsonClassifierRequest) SetName(v string) *CreateJsonClassifierRequest { - s.Name = &v - return s -} - -type CreatePartitionInput struct { - _ struct{} `type:"structure"` - - // The ID of the catalog in which the partion is to be created. Currently, this - // should be the AWS account ID. - CatalogId *string `min:"1" type:"string"` - - // The name of the metadata database in which the partition is to be created. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // A PartitionInput structure defining the partition to be created. - // - // PartitionInput is a required field - PartitionInput *PartitionInput `type:"structure" required:"true"` - - // The name of the metadata table in which the partition is to be created. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreatePartitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePartitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePartitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePartitionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.PartitionInput == nil { - invalidParams.Add(request.NewErrParamRequired("PartitionInput")) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - if s.TableName != nil && len(*s.TableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) - } - if s.PartitionInput != nil { - if err := s.PartitionInput.Validate(); err != nil { - invalidParams.AddNested("PartitionInput", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *CreatePartitionInput) SetCatalogId(v string) *CreatePartitionInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *CreatePartitionInput) SetDatabaseName(v string) *CreatePartitionInput { - s.DatabaseName = &v - return s -} - -// SetPartitionInput sets the PartitionInput field's value. -func (s *CreatePartitionInput) SetPartitionInput(v *PartitionInput) *CreatePartitionInput { - s.PartitionInput = v - return s -} - -// SetTableName sets the TableName field's value. -func (s *CreatePartitionInput) SetTableName(v string) *CreatePartitionInput { - s.TableName = &v - return s -} - -type CreatePartitionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreatePartitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePartitionOutput) GoString() string { - return s.String() -} - -type CreateScriptInput struct { - _ struct{} `type:"structure"` - - // A list of the edges in the DAG. - DagEdges []*CodeGenEdge `type:"list"` - - // A list of the nodes in the DAG. - DagNodes []*CodeGenNode `type:"list"` - - // The programming language of the resulting code from the DAG. - Language *string `type:"string" enum:"Language"` -} - -// String returns the string representation -func (s CreateScriptInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateScriptInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateScriptInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateScriptInput"} - if s.DagEdges != nil { - for i, v := range s.DagEdges { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DagEdges", i), err.(request.ErrInvalidParams)) - } - } - } - if s.DagNodes != nil { - for i, v := range s.DagNodes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DagNodes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDagEdges sets the DagEdges field's value. -func (s *CreateScriptInput) SetDagEdges(v []*CodeGenEdge) *CreateScriptInput { - s.DagEdges = v - return s -} - -// SetDagNodes sets the DagNodes field's value. -func (s *CreateScriptInput) SetDagNodes(v []*CodeGenNode) *CreateScriptInput { - s.DagNodes = v - return s -} - -// SetLanguage sets the Language field's value. -func (s *CreateScriptInput) SetLanguage(v string) *CreateScriptInput { - s.Language = &v - return s -} - -type CreateScriptOutput struct { - _ struct{} `type:"structure"` - - // The Python script generated from the DAG. - PythonScript *string `type:"string"` - - // The Scala code generated from the DAG. - ScalaCode *string `type:"string"` -} - -// String returns the string representation -func (s CreateScriptOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateScriptOutput) GoString() string { - return s.String() -} - -// SetPythonScript sets the PythonScript field's value. -func (s *CreateScriptOutput) SetPythonScript(v string) *CreateScriptOutput { - s.PythonScript = &v - return s -} - -// SetScalaCode sets the ScalaCode field's value. -func (s *CreateScriptOutput) SetScalaCode(v string) *CreateScriptOutput { - s.ScalaCode = &v - return s -} - -type CreateSecurityConfigurationInput struct { - _ struct{} `type:"structure"` - - // The encryption configuration for the new security configuration. - // - // EncryptionConfiguration is a required field - EncryptionConfiguration *EncryptionConfiguration `type:"structure" required:"true"` - - // The name for the new security configuration. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateSecurityConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSecurityConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSecurityConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSecurityConfigurationInput"} - if s.EncryptionConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("EncryptionConfiguration")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. -func (s *CreateSecurityConfigurationInput) SetEncryptionConfiguration(v *EncryptionConfiguration) *CreateSecurityConfigurationInput { - s.EncryptionConfiguration = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateSecurityConfigurationInput) SetName(v string) *CreateSecurityConfigurationInput { - s.Name = &v - return s -} - -type CreateSecurityConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The time at which the new security configuration was created. - CreatedTimestamp *time.Time `type:"timestamp"` - - // The name assigned to the new security configuration. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateSecurityConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSecurityConfigurationOutput) GoString() string { - return s.String() -} - -// SetCreatedTimestamp sets the CreatedTimestamp field's value. -func (s *CreateSecurityConfigurationOutput) SetCreatedTimestamp(v time.Time) *CreateSecurityConfigurationOutput { - s.CreatedTimestamp = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateSecurityConfigurationOutput) SetName(v string) *CreateSecurityConfigurationOutput { - s.Name = &v - return s -} - -type CreateTableInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog in which to create the Table. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The catalog database in which to create the new table. For Hive compatibility, - // this name is entirely lowercase. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // The TableInput object that defines the metadata table to create in the catalog. - // - // TableInput is a required field - TableInput *TableInput `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateTableInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTableInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTableInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.TableInput == nil { - invalidParams.Add(request.NewErrParamRequired("TableInput")) - } - if s.TableInput != nil { - if err := s.TableInput.Validate(); err != nil { - invalidParams.AddNested("TableInput", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *CreateTableInput) SetCatalogId(v string) *CreateTableInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *CreateTableInput) SetDatabaseName(v string) *CreateTableInput { - s.DatabaseName = &v - return s -} - -// SetTableInput sets the TableInput field's value. -func (s *CreateTableInput) SetTableInput(v *TableInput) *CreateTableInput { - s.TableInput = v - return s -} - -type CreateTableOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateTableOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTableOutput) GoString() string { - return s.String() -} - -type CreateTriggerInput struct { - _ struct{} `type:"structure"` - - // The actions initiated by this trigger when it fires. - // - // Actions is a required field - Actions []*Action `type:"list" required:"true"` - - // A description of the new trigger. - Description *string `type:"string"` - - // The name of the trigger. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // A predicate to specify when the new trigger should fire. - // - // This field is required when the trigger type is CONDITIONAL. - Predicate *Predicate `type:"structure"` - - // A cron expression used to specify the schedule (see Time-Based Schedules - // for Jobs and Crawlers (http://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 * * ? *). - // - // This field is required when the trigger type is SCHEDULED. - Schedule *string `type:"string"` - - // Set to true to start SCHEDULED and CONDITIONAL triggers when created. True - // not supported for ON_DEMAND triggers. - StartOnCreation *bool `type:"boolean"` - - // The type of the new trigger. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"TriggerType"` -} - -// String returns the string representation -func (s CreateTriggerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTriggerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTriggerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTriggerInput"} - if s.Actions == nil { - invalidParams.Add(request.NewErrParamRequired("Actions")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Actions != nil { - for i, v := range s.Actions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Actions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Predicate != nil { - if err := s.Predicate.Validate(); err != nil { - invalidParams.AddNested("Predicate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActions sets the Actions field's value. -func (s *CreateTriggerInput) SetActions(v []*Action) *CreateTriggerInput { - s.Actions = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateTriggerInput) SetDescription(v string) *CreateTriggerInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateTriggerInput) SetName(v string) *CreateTriggerInput { - s.Name = &v - return s -} - -// SetPredicate sets the Predicate field's value. -func (s *CreateTriggerInput) SetPredicate(v *Predicate) *CreateTriggerInput { - s.Predicate = v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *CreateTriggerInput) SetSchedule(v string) *CreateTriggerInput { - s.Schedule = &v - return s -} - -// SetStartOnCreation sets the StartOnCreation field's value. -func (s *CreateTriggerInput) SetStartOnCreation(v bool) *CreateTriggerInput { - s.StartOnCreation = &v - return s -} - -// SetType sets the Type field's value. -func (s *CreateTriggerInput) SetType(v string) *CreateTriggerInput { - s.Type = &v - return s -} - -type CreateTriggerOutput struct { - _ struct{} `type:"structure"` - - // The name of the trigger. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateTriggerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTriggerOutput) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *CreateTriggerOutput) SetName(v string) *CreateTriggerOutput { - s.Name = &v - return s -} - -type CreateUserDefinedFunctionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog in which to create the function. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the catalog database in which to create the function. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // A FunctionInput object that defines the function to create in the Data Catalog. - // - // FunctionInput is a required field - FunctionInput *UserDefinedFunctionInput `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateUserDefinedFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserDefinedFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateUserDefinedFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateUserDefinedFunctionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.FunctionInput == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionInput")) - } - if s.FunctionInput != nil { - if err := s.FunctionInput.Validate(); err != nil { - invalidParams.AddNested("FunctionInput", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *CreateUserDefinedFunctionInput) SetCatalogId(v string) *CreateUserDefinedFunctionInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *CreateUserDefinedFunctionInput) SetDatabaseName(v string) *CreateUserDefinedFunctionInput { - s.DatabaseName = &v - return s -} - -// SetFunctionInput sets the FunctionInput field's value. -func (s *CreateUserDefinedFunctionInput) SetFunctionInput(v *UserDefinedFunctionInput) *CreateUserDefinedFunctionInput { - s.FunctionInput = v - return s -} - -type CreateUserDefinedFunctionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateUserDefinedFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserDefinedFunctionOutput) GoString() string { - return s.String() -} - -// Specifies an XML classifier for CreateClassifier to create. -type CreateXMLClassifierRequest struct { - _ struct{} `type:"structure"` - - // An identifier of the data format that the classifier matches. - // - // Classification is a required field - Classification *string `type:"string" required:"true"` - - // The name of the classifier. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The XML tag designating the element that contains each record in an XML document - // being parsed. Note that this cannot identify a self-closing element (closed - // by />). An empty row element that contains only attributes can be parsed - // as long as it ends with a closing tag (for example, - // is okay, but is not). - RowTag *string `type:"string"` -} - -// String returns the string representation -func (s CreateXMLClassifierRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateXMLClassifierRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateXMLClassifierRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateXMLClassifierRequest"} - if s.Classification == nil { - invalidParams.Add(request.NewErrParamRequired("Classification")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClassification sets the Classification field's value. -func (s *CreateXMLClassifierRequest) SetClassification(v string) *CreateXMLClassifierRequest { - s.Classification = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateXMLClassifierRequest) SetName(v string) *CreateXMLClassifierRequest { - s.Name = &v - return s -} - -// SetRowTag sets the RowTag field's value. -func (s *CreateXMLClassifierRequest) SetRowTag(v string) *CreateXMLClassifierRequest { - s.RowTag = &v - return s -} - -// Contains configuration information for maintaining Data Catalog security. -type DataCatalogEncryptionSettings struct { - _ struct{} `type:"structure"` - - // When password protection is enabled, the Data Catalog uses a customer-provided - // key to encrypt the password as part of CreateConnection or UpdateConnection - // and store it in the ENCRYPTED_PASSWORD field in the connection properties. - // You can enable catalog encryption or only password encryption. - ConnectionPasswordEncryption *ConnectionPasswordEncryption `type:"structure"` - - // Specifies encryption-at-rest configuration for the Data Catalog. - EncryptionAtRest *EncryptionAtRest `type:"structure"` -} - -// String returns the string representation -func (s DataCatalogEncryptionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DataCatalogEncryptionSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DataCatalogEncryptionSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DataCatalogEncryptionSettings"} - if s.ConnectionPasswordEncryption != nil { - if err := s.ConnectionPasswordEncryption.Validate(); err != nil { - invalidParams.AddNested("ConnectionPasswordEncryption", err.(request.ErrInvalidParams)) - } - } - if s.EncryptionAtRest != nil { - if err := s.EncryptionAtRest.Validate(); err != nil { - invalidParams.AddNested("EncryptionAtRest", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionPasswordEncryption sets the ConnectionPasswordEncryption field's value. -func (s *DataCatalogEncryptionSettings) SetConnectionPasswordEncryption(v *ConnectionPasswordEncryption) *DataCatalogEncryptionSettings { - s.ConnectionPasswordEncryption = v - return s -} - -// SetEncryptionAtRest sets the EncryptionAtRest field's value. -func (s *DataCatalogEncryptionSettings) SetEncryptionAtRest(v *EncryptionAtRest) *DataCatalogEncryptionSettings { - s.EncryptionAtRest = v - return s -} - -// The Database object represents a logical grouping of tables that may reside -// in a Hive metastore or an RDBMS. -type Database struct { - _ struct{} `type:"structure"` - - // The time at which the metadata database was created in the catalog. - CreateTime *time.Time `type:"timestamp"` - - // Description of the database. - Description *string `type:"string"` - - // The location of the database (for example, an HDFS path). - LocationUri *string `min:"1" type:"string"` - - // Name of the database. For Hive compatibility, this is folded to lowercase - // when it is stored. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // These key-value pairs define parameters and properties of the database. - Parameters map[string]*string `type:"map"` -} - -// String returns the string representation -func (s Database) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Database) GoString() string { - return s.String() -} - -// SetCreateTime sets the CreateTime field's value. -func (s *Database) SetCreateTime(v time.Time) *Database { - s.CreateTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Database) SetDescription(v string) *Database { - s.Description = &v - return s -} - -// SetLocationUri sets the LocationUri field's value. -func (s *Database) SetLocationUri(v string) *Database { - s.LocationUri = &v - return s -} - -// SetName sets the Name field's value. -func (s *Database) SetName(v string) *Database { - s.Name = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *Database) SetParameters(v map[string]*string) *Database { - s.Parameters = v - return s -} - -// The structure used to create or update a database. -type DatabaseInput struct { - _ struct{} `type:"structure"` - - // Description of the database - Description *string `type:"string"` - - // The location of the database (for example, an HDFS path). - LocationUri *string `min:"1" type:"string"` - - // Name of the database. For Hive compatibility, this is folded to lowercase - // when it is stored. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // Thes key-value pairs define parameters and properties of the database. - Parameters map[string]*string `type:"map"` -} - -// String returns the string representation -func (s DatabaseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DatabaseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DatabaseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DatabaseInput"} - if s.LocationUri != nil && len(*s.LocationUri) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LocationUri", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *DatabaseInput) SetDescription(v string) *DatabaseInput { - s.Description = &v - return s -} - -// SetLocationUri sets the LocationUri field's value. -func (s *DatabaseInput) SetLocationUri(v string) *DatabaseInput { - s.LocationUri = &v - return s -} - -// SetName sets the Name field's value. -func (s *DatabaseInput) SetName(v string) *DatabaseInput { - s.Name = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DatabaseInput) SetParameters(v map[string]*string) *DatabaseInput { - s.Parameters = v - return s -} - -type DeleteClassifierInput struct { - _ struct{} `type:"structure"` - - // Name of the classifier to remove. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteClassifierInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClassifierInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClassifierInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClassifierInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteClassifierInput) SetName(v string) *DeleteClassifierInput { - s.Name = &v - return s -} - -type DeleteClassifierOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteClassifierOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClassifierOutput) GoString() string { - return s.String() -} - -type DeleteConnectionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog in which the connection resides. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the connection to delete. - // - // ConnectionName is a required field - ConnectionName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteConnectionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.ConnectionName == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionName")) - } - if s.ConnectionName != nil && len(*s.ConnectionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConnectionName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *DeleteConnectionInput) SetCatalogId(v string) *DeleteConnectionInput { - s.CatalogId = &v - return s -} - -// SetConnectionName sets the ConnectionName field's value. -func (s *DeleteConnectionInput) SetConnectionName(v string) *DeleteConnectionInput { - s.ConnectionName = &v - return s -} - -type DeleteConnectionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConnectionOutput) GoString() string { - return s.String() -} - -type DeleteCrawlerInput struct { - _ struct{} `type:"structure"` - - // Name of the crawler to remove. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteCrawlerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCrawlerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCrawlerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCrawlerInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteCrawlerInput) SetName(v string) *DeleteCrawlerInput { - s.Name = &v - return s -} - -type DeleteCrawlerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCrawlerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCrawlerOutput) GoString() string { - return s.String() -} - -type DeleteDatabaseInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog in which the database resides. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the Database to delete. For Hive compatibility, this must be - // all lowercase. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDatabaseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDatabaseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDatabaseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDatabaseInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *DeleteDatabaseInput) SetCatalogId(v string) *DeleteDatabaseInput { - s.CatalogId = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteDatabaseInput) SetName(v string) *DeleteDatabaseInput { - s.Name = &v - return s -} - -type DeleteDatabaseOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDatabaseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDatabaseOutput) GoString() string { - return s.String() -} - -type DeleteDevEndpointInput struct { - _ struct{} `type:"structure"` - - // The name of the DevEndpoint. - // - // EndpointName is a required field - EndpointName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDevEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDevEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDevEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDevEndpointInput"} - if s.EndpointName == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointName sets the EndpointName field's value. -func (s *DeleteDevEndpointInput) SetEndpointName(v string) *DeleteDevEndpointInput { - s.EndpointName = &v - return s -} - -type DeleteDevEndpointOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDevEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDevEndpointOutput) GoString() string { - return s.String() -} - -type DeleteJobInput struct { - _ struct{} `type:"structure"` - - // The name of the job definition to delete. - // - // JobName is a required field - JobName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteJobInput"} - if s.JobName == nil { - invalidParams.Add(request.NewErrParamRequired("JobName")) - } - if s.JobName != nil && len(*s.JobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobName sets the JobName field's value. -func (s *DeleteJobInput) SetJobName(v string) *DeleteJobInput { - s.JobName = &v - return s -} - -type DeleteJobOutput struct { - _ struct{} `type:"structure"` - - // The name of the job definition that was deleted. - JobName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteJobOutput) GoString() string { - return s.String() -} - -// SetJobName sets the JobName field's value. -func (s *DeleteJobOutput) SetJobName(v string) *DeleteJobOutput { - s.JobName = &v - return s -} - -type DeletePartitionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the partition to be deleted resides. If - // none is supplied, the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the catalog database in which the table in question resides. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // The values that define the partition. - // - // PartitionValues is a required field - PartitionValues []*string `type:"list" required:"true"` - - // The name of the table where the partition to be deleted is located. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePartitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePartitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePartitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePartitionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.PartitionValues == nil { - invalidParams.Add(request.NewErrParamRequired("PartitionValues")) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - if s.TableName != nil && len(*s.TableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *DeletePartitionInput) SetCatalogId(v string) *DeletePartitionInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *DeletePartitionInput) SetDatabaseName(v string) *DeletePartitionInput { - s.DatabaseName = &v - return s -} - -// SetPartitionValues sets the PartitionValues field's value. -func (s *DeletePartitionInput) SetPartitionValues(v []*string) *DeletePartitionInput { - s.PartitionValues = v - return s -} - -// SetTableName sets the TableName field's value. -func (s *DeletePartitionInput) SetTableName(v string) *DeletePartitionInput { - s.TableName = &v - return s -} - -type DeletePartitionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePartitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePartitionOutput) GoString() string { - return s.String() -} - -type DeleteResourcePolicyInput struct { - _ struct{} `type:"structure"` - - // The hash value returned when this policy was set. - PolicyHashCondition *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteResourcePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResourcePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteResourcePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteResourcePolicyInput"} - if s.PolicyHashCondition != nil && len(*s.PolicyHashCondition) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyHashCondition", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyHashCondition sets the PolicyHashCondition field's value. -func (s *DeleteResourcePolicyInput) SetPolicyHashCondition(v string) *DeleteResourcePolicyInput { - s.PolicyHashCondition = &v - return s -} - -type DeleteResourcePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteResourcePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResourcePolicyOutput) GoString() string { - return s.String() -} - -type DeleteSecurityConfigurationInput struct { - _ struct{} `type:"structure"` - - // The name of the security configuration to delete. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSecurityConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSecurityConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSecurityConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSecurityConfigurationInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteSecurityConfigurationInput) SetName(v string) *DeleteSecurityConfigurationInput { - s.Name = &v - return s -} - -type DeleteSecurityConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteSecurityConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSecurityConfigurationOutput) GoString() string { - return s.String() -} - -type DeleteTableInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the table resides. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the catalog database in which the table resides. For Hive compatibility, - // this name is entirely lowercase. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // The name of the table to be deleted. For Hive compatibility, this name is - // entirely lowercase. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTableInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTableInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTableInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *DeleteTableInput) SetCatalogId(v string) *DeleteTableInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *DeleteTableInput) SetDatabaseName(v string) *DeleteTableInput { - s.DatabaseName = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteTableInput) SetName(v string) *DeleteTableInput { - s.Name = &v - return s -} - -type DeleteTableOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTableOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTableOutput) GoString() string { - return s.String() -} - -type DeleteTableVersionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the tables reside. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The database in the catalog in which the table resides. For Hive compatibility, - // this name is entirely lowercase. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // The name of the table. For Hive compatibility, this name is entirely lowercase. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` - - // The ID of the table version to be deleted. A VersionID is a string representation - // of an integer. Each version is incremented by 1. - // - // VersionId is a required field - VersionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTableVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTableVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTableVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTableVersionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - if s.TableName != nil && len(*s.TableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) - } - if s.VersionId == nil { - invalidParams.Add(request.NewErrParamRequired("VersionId")) - } - if s.VersionId != nil && len(*s.VersionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VersionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *DeleteTableVersionInput) SetCatalogId(v string) *DeleteTableVersionInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *DeleteTableVersionInput) SetDatabaseName(v string) *DeleteTableVersionInput { - s.DatabaseName = &v - return s -} - -// SetTableName sets the TableName field's value. -func (s *DeleteTableVersionInput) SetTableName(v string) *DeleteTableVersionInput { - s.TableName = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *DeleteTableVersionInput) SetVersionId(v string) *DeleteTableVersionInput { - s.VersionId = &v - return s -} - -type DeleteTableVersionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTableVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTableVersionOutput) GoString() string { - return s.String() -} - -type DeleteTriggerInput struct { - _ struct{} `type:"structure"` - - // The name of the trigger to delete. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTriggerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTriggerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTriggerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTriggerInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteTriggerInput) SetName(v string) *DeleteTriggerInput { - s.Name = &v - return s -} - -type DeleteTriggerOutput struct { - _ struct{} `type:"structure"` - - // The name of the trigger that was deleted. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteTriggerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTriggerOutput) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *DeleteTriggerOutput) SetName(v string) *DeleteTriggerOutput { - s.Name = &v - return s -} - -type DeleteUserDefinedFunctionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the function to be deleted is located. If - // none is supplied, the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the catalog database where the function is located. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // The name of the function definition to be deleted. - // - // FunctionName is a required field - FunctionName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteUserDefinedFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserDefinedFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserDefinedFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserDefinedFunctionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *DeleteUserDefinedFunctionInput) SetCatalogId(v string) *DeleteUserDefinedFunctionInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *DeleteUserDefinedFunctionInput) SetDatabaseName(v string) *DeleteUserDefinedFunctionInput { - s.DatabaseName = &v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *DeleteUserDefinedFunctionInput) SetFunctionName(v string) *DeleteUserDefinedFunctionInput { - s.FunctionName = &v - return s -} - -type DeleteUserDefinedFunctionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteUserDefinedFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserDefinedFunctionOutput) GoString() string { - return s.String() -} - -// A development endpoint where a developer can remotely debug ETL scripts. -type DevEndpoint struct { - _ struct{} `type:"structure"` - - // The AWS availability zone where this DevEndpoint is located. - AvailabilityZone *string `type:"string"` - - // The point in time at which this DevEndpoint was created. - CreatedTimestamp *time.Time `type:"timestamp"` - - // The name of the DevEndpoint. - EndpointName *string `type:"string"` - - // Path to one or more Java Jars in an S3 bucket that should be loaded in your - // DevEndpoint. - // - // Please note that only pure Java/Scala libraries can currently be used on - // a DevEndpoint. - ExtraJarsS3Path *string `type:"string"` - - // Path(s) to one or more Python libraries in an S3 bucket that should be loaded - // in your DevEndpoint. Multiple values must be complete paths separated by - // a comma. - // - // Please note that only pure Python libraries can currently be used on a DevEndpoint. - // Libraries that rely on C extensions, such as the pandas (http://pandas.pydata.org/) - // Python data analysis library, are not yet supported. - ExtraPythonLibsS3Path *string `type:"string"` - - // The reason for a current failure in this DevEndpoint. - FailureReason *string `type:"string"` - - // The point in time at which this DevEndpoint was last modified. - LastModifiedTimestamp *time.Time `type:"timestamp"` - - // The status of the last update. - LastUpdateStatus *string `type:"string"` - - // The number of AWS Glue Data Processing Units (DPUs) allocated to this DevEndpoint. - NumberOfNodes *int64 `type:"integer"` - - // A private IP address to access the DevEndpoint within a VPC, if the DevEndpoint - // is created within one. The PrivateAddress field is present only when you - // create the DevEndpoint within your virtual private cloud (VPC). - PrivateAddress *string `type:"string"` - - // The public IP address used by this DevEndpoint. The PublicAddress field is - // present only when you create a non-VPC (virtual private cloud) DevEndpoint. - PublicAddress *string `type:"string"` - - // The public key to be used by this DevEndpoint for authentication. This attribute - // is provided for backward compatibility, as the recommended attribute to use - // is public keys. - PublicKey *string `type:"string"` - - // A list of public keys to be used by the DevEndpoints for authentication. - // The use of this attribute is preferred over a single public key because the - // public keys allow you to have a different private key per client. - // - // If you previously created an endpoint with a public key, you must remove - // that key to be able to set a list of public keys: call the UpdateDevEndpoint - // API with the public key content in the deletePublicKeys attribute, and the - // list of new keys in the addPublicKeys attribute. - PublicKeys []*string `type:"list"` - - // The AWS ARN of the IAM role used in this DevEndpoint. - RoleArn *string `type:"string"` - - // The name of the SecurityConfiguration structure to be used with this DevEndpoint. - SecurityConfiguration *string `min:"1" type:"string"` - - // A list of security group identifiers used in this DevEndpoint. - SecurityGroupIds []*string `type:"list"` - - // The current status of this DevEndpoint. - Status *string `type:"string"` - - // The subnet ID for this DevEndpoint. - SubnetId *string `type:"string"` - - // The ID of the virtual private cloud (VPC) used by this DevEndpoint. - VpcId *string `type:"string"` - - // The YARN endpoint address used by this DevEndpoint. - YarnEndpointAddress *string `type:"string"` - - // The Apache Zeppelin port for the remote Apache Spark interpreter. - ZeppelinRemoteSparkInterpreterPort *int64 `type:"integer"` -} - -// String returns the string representation -func (s DevEndpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DevEndpoint) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *DevEndpoint) SetAvailabilityZone(v string) *DevEndpoint { - s.AvailabilityZone = &v - return s -} - -// SetCreatedTimestamp sets the CreatedTimestamp field's value. -func (s *DevEndpoint) SetCreatedTimestamp(v time.Time) *DevEndpoint { - s.CreatedTimestamp = &v - return s -} - -// SetEndpointName sets the EndpointName field's value. -func (s *DevEndpoint) SetEndpointName(v string) *DevEndpoint { - s.EndpointName = &v - return s -} - -// SetExtraJarsS3Path sets the ExtraJarsS3Path field's value. -func (s *DevEndpoint) SetExtraJarsS3Path(v string) *DevEndpoint { - s.ExtraJarsS3Path = &v - return s -} - -// SetExtraPythonLibsS3Path sets the ExtraPythonLibsS3Path field's value. -func (s *DevEndpoint) SetExtraPythonLibsS3Path(v string) *DevEndpoint { - s.ExtraPythonLibsS3Path = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *DevEndpoint) SetFailureReason(v string) *DevEndpoint { - s.FailureReason = &v - return s -} - -// SetLastModifiedTimestamp sets the LastModifiedTimestamp field's value. -func (s *DevEndpoint) SetLastModifiedTimestamp(v time.Time) *DevEndpoint { - s.LastModifiedTimestamp = &v - return s -} - -// SetLastUpdateStatus sets the LastUpdateStatus field's value. -func (s *DevEndpoint) SetLastUpdateStatus(v string) *DevEndpoint { - s.LastUpdateStatus = &v - return s -} - -// SetNumberOfNodes sets the NumberOfNodes field's value. -func (s *DevEndpoint) SetNumberOfNodes(v int64) *DevEndpoint { - s.NumberOfNodes = &v - return s -} - -// SetPrivateAddress sets the PrivateAddress field's value. -func (s *DevEndpoint) SetPrivateAddress(v string) *DevEndpoint { - s.PrivateAddress = &v - return s -} - -// SetPublicAddress sets the PublicAddress field's value. -func (s *DevEndpoint) SetPublicAddress(v string) *DevEndpoint { - s.PublicAddress = &v - return s -} - -// SetPublicKey sets the PublicKey field's value. -func (s *DevEndpoint) SetPublicKey(v string) *DevEndpoint { - s.PublicKey = &v - return s -} - -// SetPublicKeys sets the PublicKeys field's value. -func (s *DevEndpoint) SetPublicKeys(v []*string) *DevEndpoint { - s.PublicKeys = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DevEndpoint) SetRoleArn(v string) *DevEndpoint { - s.RoleArn = &v - return s -} - -// SetSecurityConfiguration sets the SecurityConfiguration field's value. -func (s *DevEndpoint) SetSecurityConfiguration(v string) *DevEndpoint { - s.SecurityConfiguration = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *DevEndpoint) SetSecurityGroupIds(v []*string) *DevEndpoint { - s.SecurityGroupIds = v - return s -} - -// SetStatus sets the Status field's value. -func (s *DevEndpoint) SetStatus(v string) *DevEndpoint { - s.Status = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *DevEndpoint) SetSubnetId(v string) *DevEndpoint { - s.SubnetId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DevEndpoint) SetVpcId(v string) *DevEndpoint { - s.VpcId = &v - return s -} - -// SetYarnEndpointAddress sets the YarnEndpointAddress field's value. -func (s *DevEndpoint) SetYarnEndpointAddress(v string) *DevEndpoint { - s.YarnEndpointAddress = &v - return s -} - -// SetZeppelinRemoteSparkInterpreterPort sets the ZeppelinRemoteSparkInterpreterPort field's value. -func (s *DevEndpoint) SetZeppelinRemoteSparkInterpreterPort(v int64) *DevEndpoint { - s.ZeppelinRemoteSparkInterpreterPort = &v - return s -} - -// Custom libraries to be loaded into a DevEndpoint. -type DevEndpointCustomLibraries struct { - _ struct{} `type:"structure"` - - // Path to one or more Java Jars in an S3 bucket that should be loaded in your - // DevEndpoint. - // - // Please note that only pure Java/Scala libraries can currently be used on - // a DevEndpoint. - ExtraJarsS3Path *string `type:"string"` - - // Path(s) to one or more Python libraries in an S3 bucket that should be loaded - // in your DevEndpoint. Multiple values must be complete paths separated by - // a comma. - // - // Please note that only pure Python libraries can currently be used on a DevEndpoint. - // Libraries that rely on C extensions, such as the pandas (http://pandas.pydata.org/) - // Python data analysis library, are not yet supported. - ExtraPythonLibsS3Path *string `type:"string"` -} - -// String returns the string representation -func (s DevEndpointCustomLibraries) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DevEndpointCustomLibraries) GoString() string { - return s.String() -} - -// SetExtraJarsS3Path sets the ExtraJarsS3Path field's value. -func (s *DevEndpointCustomLibraries) SetExtraJarsS3Path(v string) *DevEndpointCustomLibraries { - s.ExtraJarsS3Path = &v - return s -} - -// SetExtraPythonLibsS3Path sets the ExtraPythonLibsS3Path field's value. -func (s *DevEndpointCustomLibraries) SetExtraPythonLibsS3Path(v string) *DevEndpointCustomLibraries { - s.ExtraPythonLibsS3Path = &v - return s -} - -// Specifies a DynamoDB table to crawl. -type DynamoDBTarget struct { - _ struct{} `type:"structure"` - - // The name of the DynamoDB table to crawl. - Path *string `type:"string"` -} - -// String returns the string representation -func (s DynamoDBTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DynamoDBTarget) GoString() string { - return s.String() -} - -// SetPath sets the Path field's value. -func (s *DynamoDBTarget) SetPath(v string) *DynamoDBTarget { - s.Path = &v - return s -} - -// Specifies encryption-at-rest configuration for the Data Catalog. -type EncryptionAtRest struct { - _ struct{} `type:"structure"` - - // The encryption-at-rest mode for encrypting Data Catalog data. - // - // CatalogEncryptionMode is a required field - CatalogEncryptionMode *string `type:"string" required:"true" enum:"CatalogEncryptionMode"` - - // The ID of the AWS KMS key to use for encryption at rest. - SseAwsKmsKeyId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s EncryptionAtRest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EncryptionAtRest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EncryptionAtRest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EncryptionAtRest"} - if s.CatalogEncryptionMode == nil { - invalidParams.Add(request.NewErrParamRequired("CatalogEncryptionMode")) - } - if s.SseAwsKmsKeyId != nil && len(*s.SseAwsKmsKeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SseAwsKmsKeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogEncryptionMode sets the CatalogEncryptionMode field's value. -func (s *EncryptionAtRest) SetCatalogEncryptionMode(v string) *EncryptionAtRest { - s.CatalogEncryptionMode = &v - return s -} - -// SetSseAwsKmsKeyId sets the SseAwsKmsKeyId field's value. -func (s *EncryptionAtRest) SetSseAwsKmsKeyId(v string) *EncryptionAtRest { - s.SseAwsKmsKeyId = &v - return s -} - -// Specifies an encryption configuration. -type EncryptionConfiguration struct { - _ struct{} `type:"structure"` - - // The encryption configuration for CloudWatch. - CloudWatchEncryption *CloudWatchEncryption `type:"structure"` - - // The encryption configuration for Job Bookmarks. - JobBookmarksEncryption *JobBookmarksEncryption `type:"structure"` - - // The encryption configuration for S3 data. - S3Encryption []*S3Encryption `type:"list"` -} - -// String returns the string representation -func (s EncryptionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EncryptionConfiguration) GoString() string { - return s.String() -} - -// SetCloudWatchEncryption sets the CloudWatchEncryption field's value. -func (s *EncryptionConfiguration) SetCloudWatchEncryption(v *CloudWatchEncryption) *EncryptionConfiguration { - s.CloudWatchEncryption = v - return s -} - -// SetJobBookmarksEncryption sets the JobBookmarksEncryption field's value. -func (s *EncryptionConfiguration) SetJobBookmarksEncryption(v *JobBookmarksEncryption) *EncryptionConfiguration { - s.JobBookmarksEncryption = v - return s -} - -// SetS3Encryption sets the S3Encryption field's value. -func (s *EncryptionConfiguration) SetS3Encryption(v []*S3Encryption) *EncryptionConfiguration { - s.S3Encryption = v - return s -} - -// Contains details about an error. -type ErrorDetail struct { - _ struct{} `type:"structure"` - - // The code associated with this error. - ErrorCode *string `min:"1" type:"string"` - - // A message describing the error. - ErrorMessage *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() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *ErrorDetail) SetErrorCode(v string) *ErrorDetail { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *ErrorDetail) SetErrorMessage(v string) *ErrorDetail { - s.ErrorMessage = &v - return s -} - -// An execution property of a job. -type ExecutionProperty struct { - _ struct{} `type:"structure"` - - // The maximum number of concurrent runs allowed for the job. The default is - // 1. An error is returned when this threshold is reached. The maximum value - // you can specify is controlled by a service limit. - MaxConcurrentRuns *int64 `type:"integer"` -} - -// String returns the string representation -func (s ExecutionProperty) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecutionProperty) GoString() string { - return s.String() -} - -// SetMaxConcurrentRuns sets the MaxConcurrentRuns field's value. -func (s *ExecutionProperty) SetMaxConcurrentRuns(v int64) *ExecutionProperty { - s.MaxConcurrentRuns = &v - return s -} - -type GetCatalogImportStatusInput struct { - _ struct{} `type:"structure"` - - // The ID of the catalog to migrate. Currently, this should be the AWS account - // ID. - CatalogId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetCatalogImportStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCatalogImportStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCatalogImportStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCatalogImportStatusInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *GetCatalogImportStatusInput) SetCatalogId(v string) *GetCatalogImportStatusInput { - s.CatalogId = &v - return s -} - -type GetCatalogImportStatusOutput struct { - _ struct{} `type:"structure"` - - // The status of the specified catalog migration. - ImportStatus *CatalogImportStatus `type:"structure"` -} - -// String returns the string representation -func (s GetCatalogImportStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCatalogImportStatusOutput) GoString() string { - return s.String() -} - -// SetImportStatus sets the ImportStatus field's value. -func (s *GetCatalogImportStatusOutput) SetImportStatus(v *CatalogImportStatus) *GetCatalogImportStatusOutput { - s.ImportStatus = v - return s -} - -type GetClassifierInput struct { - _ struct{} `type:"structure"` - - // Name of the classifier to retrieve. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetClassifierInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetClassifierInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetClassifierInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetClassifierInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetClassifierInput) SetName(v string) *GetClassifierInput { - s.Name = &v - return s -} - -type GetClassifierOutput struct { - _ struct{} `type:"structure"` - - // The requested classifier. - Classifier *Classifier `type:"structure"` -} - -// String returns the string representation -func (s GetClassifierOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetClassifierOutput) GoString() string { - return s.String() -} - -// SetClassifier sets the Classifier field's value. -func (s *GetClassifierOutput) SetClassifier(v *Classifier) *GetClassifierOutput { - s.Classifier = v - return s -} - -type GetClassifiersInput struct { - _ struct{} `type:"structure"` - - // Size of the list to return (optional). - MaxResults *int64 `min:"1" type:"integer"` - - // An optional continuation token. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetClassifiersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetClassifiersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetClassifiersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetClassifiersInput"} - 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 *GetClassifiersInput) SetMaxResults(v int64) *GetClassifiersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetClassifiersInput) SetNextToken(v string) *GetClassifiersInput { - s.NextToken = &v - return s -} - -type GetClassifiersOutput struct { - _ struct{} `type:"structure"` - - // The requested list of classifier objects. - Classifiers []*Classifier `type:"list"` - - // A continuation token. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetClassifiersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetClassifiersOutput) GoString() string { - return s.String() -} - -// SetClassifiers sets the Classifiers field's value. -func (s *GetClassifiersOutput) SetClassifiers(v []*Classifier) *GetClassifiersOutput { - s.Classifiers = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetClassifiersOutput) SetNextToken(v string) *GetClassifiersOutput { - s.NextToken = &v - return s -} - -type GetConnectionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog in which the connection resides. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // Allow you to retrieve the connection metadata without displaying the password. - // For instance, the AWS Glue console uses this flag to retrieve connections, - // since the console does not display passwords. Set this parameter where the - // caller may not have permission to use the KMS key to decrypt the password, - // but does have permission to access the rest of the connection metadata (that - // is, the other connection properties). - HidePassword *bool `type:"boolean"` - - // The name of the connection definition to retrieve. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetConnectionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *GetConnectionInput) SetCatalogId(v string) *GetConnectionInput { - s.CatalogId = &v - return s -} - -// SetHidePassword sets the HidePassword field's value. -func (s *GetConnectionInput) SetHidePassword(v bool) *GetConnectionInput { - s.HidePassword = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetConnectionInput) SetName(v string) *GetConnectionInput { - s.Name = &v - return s -} - -type GetConnectionOutput struct { - _ struct{} `type:"structure"` - - // The requested connection definition. - Connection *Connection `type:"structure"` -} - -// String returns the string representation -func (s GetConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetConnectionOutput) GoString() string { - return s.String() -} - -// SetConnection sets the Connection field's value. -func (s *GetConnectionOutput) SetConnection(v *Connection) *GetConnectionOutput { - s.Connection = v - return s -} - -// Filters the connection definitions returned by the GetConnections API. -type GetConnectionsFilter struct { - _ struct{} `type:"structure"` - - // The type of connections to return. Currently, only JDBC is supported; SFTP - // is not supported. - ConnectionType *string `type:"string" enum:"ConnectionType"` - - // A criteria string that must match the criteria recorded in the connection - // definition for that connection definition to be returned. - MatchCriteria []*string `type:"list"` -} - -// String returns the string representation -func (s GetConnectionsFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetConnectionsFilter) GoString() string { - return s.String() -} - -// SetConnectionType sets the ConnectionType field's value. -func (s *GetConnectionsFilter) SetConnectionType(v string) *GetConnectionsFilter { - s.ConnectionType = &v - return s -} - -// SetMatchCriteria sets the MatchCriteria field's value. -func (s *GetConnectionsFilter) SetMatchCriteria(v []*string) *GetConnectionsFilter { - s.MatchCriteria = v - return s -} - -type GetConnectionsInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog in which the connections reside. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // A filter that controls which connections will be returned. - Filter *GetConnectionsFilter `type:"structure"` - - // Allow you to retrieve the connection metadata without displaying the password. - // For instance, the AWS Glue console uses this flag to retrieve connections, - // since the console does not display passwords. Set this parameter where the - // caller may not have permission to use the KMS key to decrypt the password, - // but does have permission to access the rest of the connection metadata (that - // is, the other connection properties). - HidePassword *bool `type:"boolean"` - - // The maximum number of connections to return in one response. - MaxResults *int64 `min:"1" type:"integer"` - - // A continuation token, if this is a continuation call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetConnectionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetConnectionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetConnectionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetConnectionsInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *GetConnectionsInput) SetCatalogId(v string) *GetConnectionsInput { - s.CatalogId = &v - return s -} - -// SetFilter sets the Filter field's value. -func (s *GetConnectionsInput) SetFilter(v *GetConnectionsFilter) *GetConnectionsInput { - s.Filter = v - return s -} - -// SetHidePassword sets the HidePassword field's value. -func (s *GetConnectionsInput) SetHidePassword(v bool) *GetConnectionsInput { - s.HidePassword = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetConnectionsInput) SetMaxResults(v int64) *GetConnectionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetConnectionsInput) SetNextToken(v string) *GetConnectionsInput { - s.NextToken = &v - return s -} - -type GetConnectionsOutput struct { - _ struct{} `type:"structure"` - - // A list of requested connection definitions. - ConnectionList []*Connection `type:"list"` - - // A continuation token, if the list of connections returned does not include - // the last of the filtered connections. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetConnectionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetConnectionsOutput) GoString() string { - return s.String() -} - -// SetConnectionList sets the ConnectionList field's value. -func (s *GetConnectionsOutput) SetConnectionList(v []*Connection) *GetConnectionsOutput { - s.ConnectionList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetConnectionsOutput) SetNextToken(v string) *GetConnectionsOutput { - s.NextToken = &v - return s -} - -type GetCrawlerInput struct { - _ struct{} `type:"structure"` - - // Name of the crawler to retrieve metadata for. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCrawlerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCrawlerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCrawlerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCrawlerInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetCrawlerInput) SetName(v string) *GetCrawlerInput { - s.Name = &v - return s -} - -type GetCrawlerMetricsInput struct { - _ struct{} `type:"structure"` - - // A list of the names of crawlers about which to retrieve metrics. - CrawlerNameList []*string `type:"list"` - - // The maximum size of a list to return. - MaxResults *int64 `min:"1" type:"integer"` - - // A continuation token, if this is a continuation call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetCrawlerMetricsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCrawlerMetricsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCrawlerMetricsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCrawlerMetricsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCrawlerNameList sets the CrawlerNameList field's value. -func (s *GetCrawlerMetricsInput) SetCrawlerNameList(v []*string) *GetCrawlerMetricsInput { - s.CrawlerNameList = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetCrawlerMetricsInput) SetMaxResults(v int64) *GetCrawlerMetricsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetCrawlerMetricsInput) SetNextToken(v string) *GetCrawlerMetricsInput { - s.NextToken = &v - return s -} - -type GetCrawlerMetricsOutput struct { - _ struct{} `type:"structure"` - - // A list of metrics for the specified crawler. - CrawlerMetricsList []*CrawlerMetrics `type:"list"` - - // A continuation token, if the returned list does not contain the last metric - // available. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetCrawlerMetricsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCrawlerMetricsOutput) GoString() string { - return s.String() -} - -// SetCrawlerMetricsList sets the CrawlerMetricsList field's value. -func (s *GetCrawlerMetricsOutput) SetCrawlerMetricsList(v []*CrawlerMetrics) *GetCrawlerMetricsOutput { - s.CrawlerMetricsList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetCrawlerMetricsOutput) SetNextToken(v string) *GetCrawlerMetricsOutput { - s.NextToken = &v - return s -} - -type GetCrawlerOutput struct { - _ struct{} `type:"structure"` - - // The metadata for the specified crawler. - Crawler *Crawler `type:"structure"` -} - -// String returns the string representation -func (s GetCrawlerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCrawlerOutput) GoString() string { - return s.String() -} - -// SetCrawler sets the Crawler field's value. -func (s *GetCrawlerOutput) SetCrawler(v *Crawler) *GetCrawlerOutput { - s.Crawler = v - return s -} - -type GetCrawlersInput struct { - _ struct{} `type:"structure"` - - // The number of crawlers to return on each call. - MaxResults *int64 `min:"1" type:"integer"` - - // A continuation token, if this is a continuation request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetCrawlersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCrawlersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCrawlersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCrawlersInput"} - 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 *GetCrawlersInput) SetMaxResults(v int64) *GetCrawlersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetCrawlersInput) SetNextToken(v string) *GetCrawlersInput { - s.NextToken = &v - return s -} - -type GetCrawlersOutput struct { - _ struct{} `type:"structure"` - - // A list of crawler metadata. - Crawlers []*Crawler `type:"list"` - - // A continuation token, if the returned list has not reached the end of those - // defined in this customer account. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetCrawlersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCrawlersOutput) GoString() string { - return s.String() -} - -// SetCrawlers sets the Crawlers field's value. -func (s *GetCrawlersOutput) SetCrawlers(v []*Crawler) *GetCrawlersOutput { - s.Crawlers = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetCrawlersOutput) SetNextToken(v string) *GetCrawlersOutput { - s.NextToken = &v - return s -} - -type GetDataCatalogEncryptionSettingsInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog for which to retrieve the security configuration. - // If none is supplied, the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetDataCatalogEncryptionSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDataCatalogEncryptionSettingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDataCatalogEncryptionSettingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDataCatalogEncryptionSettingsInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *GetDataCatalogEncryptionSettingsInput) SetCatalogId(v string) *GetDataCatalogEncryptionSettingsInput { - s.CatalogId = &v - return s -} - -type GetDataCatalogEncryptionSettingsOutput struct { - _ struct{} `type:"structure"` - - // The requested security configuration. - DataCatalogEncryptionSettings *DataCatalogEncryptionSettings `type:"structure"` -} - -// String returns the string representation -func (s GetDataCatalogEncryptionSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDataCatalogEncryptionSettingsOutput) GoString() string { - return s.String() -} - -// SetDataCatalogEncryptionSettings sets the DataCatalogEncryptionSettings field's value. -func (s *GetDataCatalogEncryptionSettingsOutput) SetDataCatalogEncryptionSettings(v *DataCatalogEncryptionSettings) *GetDataCatalogEncryptionSettingsOutput { - s.DataCatalogEncryptionSettings = v - return s -} - -type GetDatabaseInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog in which the database resides. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the database to retrieve. For Hive compatibility, this should - // be all lowercase. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDatabaseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDatabaseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDatabaseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDatabaseInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *GetDatabaseInput) SetCatalogId(v string) *GetDatabaseInput { - s.CatalogId = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetDatabaseInput) SetName(v string) *GetDatabaseInput { - s.Name = &v - return s -} - -type GetDatabaseOutput struct { - _ struct{} `type:"structure"` - - // The definition of the specified database in the catalog. - Database *Database `type:"structure"` -} - -// String returns the string representation -func (s GetDatabaseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDatabaseOutput) GoString() string { - return s.String() -} - -// SetDatabase sets the Database field's value. -func (s *GetDatabaseOutput) SetDatabase(v *Database) *GetDatabaseOutput { - s.Database = v - return s -} - -type GetDatabasesInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog from which to retrieve Databases. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The maximum number of databases to return in one response. - MaxResults *int64 `min:"1" type:"integer"` - - // A continuation token, if this is a continuation call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetDatabasesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDatabasesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDatabasesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDatabasesInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *GetDatabasesInput) SetCatalogId(v string) *GetDatabasesInput { - s.CatalogId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetDatabasesInput) SetMaxResults(v int64) *GetDatabasesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetDatabasesInput) SetNextToken(v string) *GetDatabasesInput { - s.NextToken = &v - return s -} - -type GetDatabasesOutput struct { - _ struct{} `type:"structure"` - - // A list of Database objects from the specified catalog. - // - // DatabaseList is a required field - DatabaseList []*Database `type:"list" required:"true"` - - // A continuation token for paginating the returned list of tokens, returned - // if the current segment of the list is not the last. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetDatabasesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDatabasesOutput) GoString() string { - return s.String() -} - -// SetDatabaseList sets the DatabaseList field's value. -func (s *GetDatabasesOutput) SetDatabaseList(v []*Database) *GetDatabasesOutput { - s.DatabaseList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetDatabasesOutput) SetNextToken(v string) *GetDatabasesOutput { - s.NextToken = &v - return s -} - -type GetDataflowGraphInput struct { - _ struct{} `type:"structure"` - - // The Python script to transform. - PythonScript *string `type:"string"` -} - -// String returns the string representation -func (s GetDataflowGraphInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDataflowGraphInput) GoString() string { - return s.String() -} - -// SetPythonScript sets the PythonScript field's value. -func (s *GetDataflowGraphInput) SetPythonScript(v string) *GetDataflowGraphInput { - s.PythonScript = &v - return s -} - -type GetDataflowGraphOutput struct { - _ struct{} `type:"structure"` - - // A list of the edges in the resulting DAG. - DagEdges []*CodeGenEdge `type:"list"` - - // A list of the nodes in the resulting DAG. - DagNodes []*CodeGenNode `type:"list"` -} - -// String returns the string representation -func (s GetDataflowGraphOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDataflowGraphOutput) GoString() string { - return s.String() -} - -// SetDagEdges sets the DagEdges field's value. -func (s *GetDataflowGraphOutput) SetDagEdges(v []*CodeGenEdge) *GetDataflowGraphOutput { - s.DagEdges = v - return s -} - -// SetDagNodes sets the DagNodes field's value. -func (s *GetDataflowGraphOutput) SetDagNodes(v []*CodeGenNode) *GetDataflowGraphOutput { - s.DagNodes = v - return s -} - -type GetDevEndpointInput struct { - _ struct{} `type:"structure"` - - // Name of the DevEndpoint for which to retrieve information. - // - // EndpointName is a required field - EndpointName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDevEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDevEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDevEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDevEndpointInput"} - if s.EndpointName == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointName sets the EndpointName field's value. -func (s *GetDevEndpointInput) SetEndpointName(v string) *GetDevEndpointInput { - s.EndpointName = &v - return s -} - -type GetDevEndpointOutput struct { - _ struct{} `type:"structure"` - - // A DevEndpoint definition. - DevEndpoint *DevEndpoint `type:"structure"` -} - -// String returns the string representation -func (s GetDevEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDevEndpointOutput) GoString() string { - return s.String() -} - -// SetDevEndpoint sets the DevEndpoint field's value. -func (s *GetDevEndpointOutput) SetDevEndpoint(v *DevEndpoint) *GetDevEndpointOutput { - s.DevEndpoint = v - return s -} - -type GetDevEndpointsInput struct { - _ struct{} `type:"structure"` - - // The maximum size of information to return. - MaxResults *int64 `min:"1" type:"integer"` - - // A continuation token, if this is a continuation call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetDevEndpointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDevEndpointsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDevEndpointsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDevEndpointsInput"} - 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 *GetDevEndpointsInput) SetMaxResults(v int64) *GetDevEndpointsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetDevEndpointsInput) SetNextToken(v string) *GetDevEndpointsInput { - s.NextToken = &v - return s -} - -type GetDevEndpointsOutput struct { - _ struct{} `type:"structure"` - - // A list of DevEndpoint definitions. - DevEndpoints []*DevEndpoint `type:"list"` - - // A continuation token, if not all DevEndpoint definitions have yet been returned. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetDevEndpointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDevEndpointsOutput) GoString() string { - return s.String() -} - -// SetDevEndpoints sets the DevEndpoints field's value. -func (s *GetDevEndpointsOutput) SetDevEndpoints(v []*DevEndpoint) *GetDevEndpointsOutput { - s.DevEndpoints = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetDevEndpointsOutput) SetNextToken(v string) *GetDevEndpointsOutput { - s.NextToken = &v - return s -} - -type GetJobInput struct { - _ struct{} `type:"structure"` - - // The name of the job definition to retrieve. - // - // JobName is a required field - JobName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetJobInput"} - if s.JobName == nil { - invalidParams.Add(request.NewErrParamRequired("JobName")) - } - if s.JobName != nil && len(*s.JobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobName sets the JobName field's value. -func (s *GetJobInput) SetJobName(v string) *GetJobInput { - s.JobName = &v - return s -} - -type GetJobOutput struct { - _ struct{} `type:"structure"` - - // The requested job definition. - Job *Job `type:"structure"` -} - -// String returns the string representation -func (s GetJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobOutput) GoString() string { - return s.String() -} - -// SetJob sets the Job field's value. -func (s *GetJobOutput) SetJob(v *Job) *GetJobOutput { - s.Job = v - return s -} - -type GetJobRunInput struct { - _ struct{} `type:"structure"` - - // Name of the job definition being run. - // - // JobName is a required field - JobName *string `min:"1" type:"string" required:"true"` - - // True if a list of predecessor runs should be returned. - PredecessorsIncluded *bool `type:"boolean"` - - // The ID of the job run. - // - // RunId is a required field - RunId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetJobRunInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobRunInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetJobRunInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetJobRunInput"} - 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.RunId == nil { - invalidParams.Add(request.NewErrParamRequired("RunId")) - } - if s.RunId != nil && len(*s.RunId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RunId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobName sets the JobName field's value. -func (s *GetJobRunInput) SetJobName(v string) *GetJobRunInput { - s.JobName = &v - return s -} - -// SetPredecessorsIncluded sets the PredecessorsIncluded field's value. -func (s *GetJobRunInput) SetPredecessorsIncluded(v bool) *GetJobRunInput { - s.PredecessorsIncluded = &v - return s -} - -// SetRunId sets the RunId field's value. -func (s *GetJobRunInput) SetRunId(v string) *GetJobRunInput { - s.RunId = &v - return s -} - -type GetJobRunOutput struct { - _ struct{} `type:"structure"` - - // The requested job-run metadata. - JobRun *JobRun `type:"structure"` -} - -// String returns the string representation -func (s GetJobRunOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobRunOutput) GoString() string { - return s.String() -} - -// SetJobRun sets the JobRun field's value. -func (s *GetJobRunOutput) SetJobRun(v *JobRun) *GetJobRunOutput { - s.JobRun = v - return s -} - -type GetJobRunsInput struct { - _ struct{} `type:"structure"` - - // The name of the job definition for which to retrieve all job runs. - // - // JobName is a required field - JobName *string `min:"1" type:"string" required:"true"` - - // The maximum size of the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A continuation token, if this is a continuation call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetJobRunsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobRunsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetJobRunsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetJobRunsInput"} - 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.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobName sets the JobName field's value. -func (s *GetJobRunsInput) SetJobName(v string) *GetJobRunsInput { - s.JobName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetJobRunsInput) SetMaxResults(v int64) *GetJobRunsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetJobRunsInput) SetNextToken(v string) *GetJobRunsInput { - s.NextToken = &v - return s -} - -type GetJobRunsOutput struct { - _ struct{} `type:"structure"` - - // A list of job-run metatdata objects. - JobRuns []*JobRun `type:"list"` - - // A continuation token, if not all reequested job runs have been returned. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetJobRunsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobRunsOutput) GoString() string { - return s.String() -} - -// SetJobRuns sets the JobRuns field's value. -func (s *GetJobRunsOutput) SetJobRuns(v []*JobRun) *GetJobRunsOutput { - s.JobRuns = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetJobRunsOutput) SetNextToken(v string) *GetJobRunsOutput { - s.NextToken = &v - return s -} - -type GetJobsInput struct { - _ struct{} `type:"structure"` - - // The maximum size of the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A continuation token, if this is a continuation call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetJobsInput"} - 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 *GetJobsInput) SetMaxResults(v int64) *GetJobsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetJobsInput) SetNextToken(v string) *GetJobsInput { - s.NextToken = &v - return s -} - -type GetJobsOutput struct { - _ struct{} `type:"structure"` - - // A list of job definitions. - Jobs []*Job `type:"list"` - - // A continuation token, if not all job definitions have yet been returned. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobsOutput) GoString() string { - return s.String() -} - -// SetJobs sets the Jobs field's value. -func (s *GetJobsOutput) SetJobs(v []*Job) *GetJobsOutput { - s.Jobs = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetJobsOutput) SetNextToken(v string) *GetJobsOutput { - s.NextToken = &v - return s -} - -type GetMappingInput struct { - _ struct{} `type:"structure"` - - // Parameters for the mapping. - Location *Location `type:"structure"` - - // A list of target tables. - Sinks []*CatalogEntry `type:"list"` - - // Specifies the source table. - // - // Source is a required field - Source *CatalogEntry `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetMappingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMappingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMappingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMappingInput"} - if s.Source == nil { - invalidParams.Add(request.NewErrParamRequired("Source")) - } - if s.Location != nil { - if err := s.Location.Validate(); err != nil { - invalidParams.AddNested("Location", err.(request.ErrInvalidParams)) - } - } - if s.Sinks != nil { - for i, v := range s.Sinks { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Sinks", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Source != nil { - if err := s.Source.Validate(); err != nil { - invalidParams.AddNested("Source", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLocation sets the Location field's value. -func (s *GetMappingInput) SetLocation(v *Location) *GetMappingInput { - s.Location = v - return s -} - -// SetSinks sets the Sinks field's value. -func (s *GetMappingInput) SetSinks(v []*CatalogEntry) *GetMappingInput { - s.Sinks = v - return s -} - -// SetSource sets the Source field's value. -func (s *GetMappingInput) SetSource(v *CatalogEntry) *GetMappingInput { - s.Source = v - return s -} - -type GetMappingOutput struct { - _ struct{} `type:"structure"` - - // A list of mappings to the specified targets. - // - // Mapping is a required field - Mapping []*MappingEntry `type:"list" required:"true"` -} - -// String returns the string representation -func (s GetMappingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMappingOutput) GoString() string { - return s.String() -} - -// SetMapping sets the Mapping field's value. -func (s *GetMappingOutput) SetMapping(v []*MappingEntry) *GetMappingOutput { - s.Mapping = v - return s -} - -type GetPartitionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the partition in question resides. If none - // is supplied, the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the catalog database where the partition resides. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // The values that define the partition. - // - // PartitionValues is a required field - PartitionValues []*string `type:"list" required:"true"` - - // The name of the partition's table. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPartitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPartitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPartitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPartitionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.PartitionValues == nil { - invalidParams.Add(request.NewErrParamRequired("PartitionValues")) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - if s.TableName != nil && len(*s.TableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *GetPartitionInput) SetCatalogId(v string) *GetPartitionInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *GetPartitionInput) SetDatabaseName(v string) *GetPartitionInput { - s.DatabaseName = &v - return s -} - -// SetPartitionValues sets the PartitionValues field's value. -func (s *GetPartitionInput) SetPartitionValues(v []*string) *GetPartitionInput { - s.PartitionValues = v - return s -} - -// SetTableName sets the TableName field's value. -func (s *GetPartitionInput) SetTableName(v string) *GetPartitionInput { - s.TableName = &v - return s -} - -type GetPartitionOutput struct { - _ struct{} `type:"structure"` - - // The requested information, in the form of a Partition object. - Partition *Partition `type:"structure"` -} - -// String returns the string representation -func (s GetPartitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPartitionOutput) GoString() string { - return s.String() -} - -// SetPartition sets the Partition field's value. -func (s *GetPartitionOutput) SetPartition(v *Partition) *GetPartitionOutput { - s.Partition = v - return s -} - -type GetPartitionsInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the partitions in question reside. If none - // is supplied, the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the catalog database where the partitions reside. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // An expression filtering the partitions to be returned. - // - // The expression uses SQL syntax similar to the SQL WHERE filter clause. The - // SQL statement parser JSQLParser (http://jsqlparser.sourceforge.net/home.php) - // parses the expression. - // - // Operators: The following are the operators that you can use in the Expression - // API call: - // - // =Checks if the values of the two operands are equal or not; if yes, then - // the condition becomes true. - // - // Example: Assume 'variable a' holds 10 and 'variable b' holds 20. - // - // (a = b) is not true. - // - // < >Checks if the values of two operands are equal or not; if the values are - // not equal, then the condition becomes true. - // - // Example: (a < > b) is true. - // - // >Checks if the value of the left operand is greater than the value of the - // right operand; if yes, then the condition becomes true. - // - // Example: (a > b) is not true. - // - // =Checks if the value of the left operand is greater than or equal to the - // value of the right operand; if yes, then the condition becomes true. - // - // Example: (a >= b) is not true. - // - // <=Checks if the value of the left operand is less than or equal to the value - // of the right operand; if yes, then the condition becomes true. - // - // Example: (a <= b) is true. - // - // AND, OR, IN, BETWEEN, LIKE, NOT, IS NULLLogical operators. - // - // Supported Partition Key Types: The following are the the supported partition - // keys. - // - // * string - // - // * date - // - // * timestamp - // - // * int - // - // * bigint - // - // * long - // - // * tinyint - // - // * smallint - // - // * decimal - // - // If an invalid type is encountered, an exception is thrown. - // - // The following list shows the valid operators on each type. When you define - // a crawler, the partitionKey type is created as a STRING, to be compatible - // with the catalog partitions. - // - // Sample API Call: - Expression *string `type:"string"` - - // The maximum number of partitions to return in a single response. - MaxResults *int64 `min:"1" type:"integer"` - - // A continuation token, if this is not the first call to retrieve these partitions. - NextToken *string `type:"string"` - - // The segment of the table's partitions to scan in this request. - Segment *Segment `type:"structure"` - - // The name of the partitions' table. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPartitionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPartitionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPartitionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPartitionsInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - if s.TableName != nil && len(*s.TableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) - } - if s.Segment != nil { - if err := s.Segment.Validate(); err != nil { - invalidParams.AddNested("Segment", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *GetPartitionsInput) SetCatalogId(v string) *GetPartitionsInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *GetPartitionsInput) SetDatabaseName(v string) *GetPartitionsInput { - s.DatabaseName = &v - return s -} - -// SetExpression sets the Expression field's value. -func (s *GetPartitionsInput) SetExpression(v string) *GetPartitionsInput { - s.Expression = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetPartitionsInput) SetMaxResults(v int64) *GetPartitionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetPartitionsInput) SetNextToken(v string) *GetPartitionsInput { - s.NextToken = &v - return s -} - -// SetSegment sets the Segment field's value. -func (s *GetPartitionsInput) SetSegment(v *Segment) *GetPartitionsInput { - s.Segment = v - return s -} - -// SetTableName sets the TableName field's value. -func (s *GetPartitionsInput) SetTableName(v string) *GetPartitionsInput { - s.TableName = &v - return s -} - -type GetPartitionsOutput struct { - _ struct{} `type:"structure"` - - // A continuation token, if the returned list of partitions does not does not - // include the last one. - NextToken *string `type:"string"` - - // A list of requested partitions. - Partitions []*Partition `type:"list"` -} - -// String returns the string representation -func (s GetPartitionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPartitionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetPartitionsOutput) SetNextToken(v string) *GetPartitionsOutput { - s.NextToken = &v - return s -} - -// SetPartitions sets the Partitions field's value. -func (s *GetPartitionsOutput) SetPartitions(v []*Partition) *GetPartitionsOutput { - s.Partitions = v - return s -} - -type GetPlanInput struct { - _ struct{} `type:"structure"` - - // The programming language of the code to perform the mapping. - Language *string `type:"string" enum:"Language"` - - // Parameters for the mapping. - Location *Location `type:"structure"` - - // The list of mappings from a source table to target tables. - // - // Mapping is a required field - Mapping []*MappingEntry `type:"list" required:"true"` - - // The target tables. - Sinks []*CatalogEntry `type:"list"` - - // The source table. - // - // Source is a required field - Source *CatalogEntry `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetPlanInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPlanInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPlanInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPlanInput"} - if s.Mapping == nil { - invalidParams.Add(request.NewErrParamRequired("Mapping")) - } - if s.Source == nil { - invalidParams.Add(request.NewErrParamRequired("Source")) - } - if s.Location != nil { - if err := s.Location.Validate(); err != nil { - invalidParams.AddNested("Location", err.(request.ErrInvalidParams)) - } - } - if s.Sinks != nil { - for i, v := range s.Sinks { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Sinks", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Source != nil { - if err := s.Source.Validate(); err != nil { - invalidParams.AddNested("Source", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLanguage sets the Language field's value. -func (s *GetPlanInput) SetLanguage(v string) *GetPlanInput { - s.Language = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *GetPlanInput) SetLocation(v *Location) *GetPlanInput { - s.Location = v - return s -} - -// SetMapping sets the Mapping field's value. -func (s *GetPlanInput) SetMapping(v []*MappingEntry) *GetPlanInput { - s.Mapping = v - return s -} - -// SetSinks sets the Sinks field's value. -func (s *GetPlanInput) SetSinks(v []*CatalogEntry) *GetPlanInput { - s.Sinks = v - return s -} - -// SetSource sets the Source field's value. -func (s *GetPlanInput) SetSource(v *CatalogEntry) *GetPlanInput { - s.Source = v - return s -} - -type GetPlanOutput struct { - _ struct{} `type:"structure"` - - // A Python script to perform the mapping. - PythonScript *string `type:"string"` - - // Scala code to perform the mapping. - ScalaCode *string `type:"string"` -} - -// String returns the string representation -func (s GetPlanOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPlanOutput) GoString() string { - return s.String() -} - -// SetPythonScript sets the PythonScript field's value. -func (s *GetPlanOutput) SetPythonScript(v string) *GetPlanOutput { - s.PythonScript = &v - return s -} - -// SetScalaCode sets the ScalaCode field's value. -func (s *GetPlanOutput) SetScalaCode(v string) *GetPlanOutput { - s.ScalaCode = &v - return s -} - -type GetResourcePolicyInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetResourcePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourcePolicyInput) GoString() string { - return s.String() -} - -type GetResourcePolicyOutput struct { - _ struct{} `type:"structure"` - - // The date and time at which the policy was created. - CreateTime *time.Time `type:"timestamp"` - - // Contains the hash value associated with this policy. - PolicyHash *string `min:"1" type:"string"` - - // Contains the requested policy document, in JSON format. - PolicyInJson *string `min:"2" type:"string"` - - // The date and time at which the policy was last updated. - UpdateTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s GetResourcePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourcePolicyOutput) GoString() string { - return s.String() -} - -// SetCreateTime sets the CreateTime field's value. -func (s *GetResourcePolicyOutput) SetCreateTime(v time.Time) *GetResourcePolicyOutput { - s.CreateTime = &v - return s -} - -// SetPolicyHash sets the PolicyHash field's value. -func (s *GetResourcePolicyOutput) SetPolicyHash(v string) *GetResourcePolicyOutput { - s.PolicyHash = &v - return s -} - -// SetPolicyInJson sets the PolicyInJson field's value. -func (s *GetResourcePolicyOutput) SetPolicyInJson(v string) *GetResourcePolicyOutput { - s.PolicyInJson = &v - return s -} - -// SetUpdateTime sets the UpdateTime field's value. -func (s *GetResourcePolicyOutput) SetUpdateTime(v time.Time) *GetResourcePolicyOutput { - s.UpdateTime = &v - return s -} - -type GetSecurityConfigurationInput struct { - _ struct{} `type:"structure"` - - // The name of the security configuration to retrieve. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSecurityConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSecurityConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSecurityConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSecurityConfigurationInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetSecurityConfigurationInput) SetName(v string) *GetSecurityConfigurationInput { - s.Name = &v - return s -} - -type GetSecurityConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The requested security configuration - SecurityConfiguration *SecurityConfiguration `type:"structure"` -} - -// String returns the string representation -func (s GetSecurityConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSecurityConfigurationOutput) GoString() string { - return s.String() -} - -// SetSecurityConfiguration sets the SecurityConfiguration field's value. -func (s *GetSecurityConfigurationOutput) SetSecurityConfiguration(v *SecurityConfiguration) *GetSecurityConfigurationOutput { - s.SecurityConfiguration = v - return s -} - -type GetSecurityConfigurationsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return. - MaxResults *int64 `min:"1" type:"integer"` - - // A continuation token, if this is a continuation call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetSecurityConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSecurityConfigurationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSecurityConfigurationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSecurityConfigurationsInput"} - 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 *GetSecurityConfigurationsInput) SetMaxResults(v int64) *GetSecurityConfigurationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetSecurityConfigurationsInput) SetNextToken(v string) *GetSecurityConfigurationsInput { - s.NextToken = &v - return s -} - -type GetSecurityConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // A continuation token, if there are more security configurations to return. - NextToken *string `type:"string"` - - // A list of security configurations. - SecurityConfigurations []*SecurityConfiguration `type:"list"` -} - -// String returns the string representation -func (s GetSecurityConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSecurityConfigurationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetSecurityConfigurationsOutput) SetNextToken(v string) *GetSecurityConfigurationsOutput { - s.NextToken = &v - return s -} - -// SetSecurityConfigurations sets the SecurityConfigurations field's value. -func (s *GetSecurityConfigurationsOutput) SetSecurityConfigurations(v []*SecurityConfiguration) *GetSecurityConfigurationsOutput { - s.SecurityConfigurations = v - return s -} - -type GetTableInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the table resides. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the database in the catalog in which the table resides. For Hive - // compatibility, this name is entirely lowercase. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // The name of the table for which to retrieve the definition. For Hive compatibility, - // this name is entirely lowercase. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTableInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTableInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTableInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *GetTableInput) SetCatalogId(v string) *GetTableInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *GetTableInput) SetDatabaseName(v string) *GetTableInput { - s.DatabaseName = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetTableInput) SetName(v string) *GetTableInput { - s.Name = &v - return s -} - -type GetTableOutput struct { - _ struct{} `type:"structure"` - - // The Table object that defines the specified table. - Table *Table `type:"structure"` -} - -// String returns the string representation -func (s GetTableOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTableOutput) GoString() string { - return s.String() -} - -// SetTable sets the Table field's value. -func (s *GetTableOutput) SetTable(v *Table) *GetTableOutput { - s.Table = v - return s -} - -type GetTableVersionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the tables reside. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The database in the catalog in which the table resides. For Hive compatibility, - // this name is entirely lowercase. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // The name of the table. For Hive compatibility, this name is entirely lowercase. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` - - // The ID value of the table version to be retrieved. A VersionID is a string - // representation of an integer. Each version is incremented by 1. - VersionId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetTableVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTableVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTableVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTableVersionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - if s.TableName != nil && len(*s.TableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) - } - if s.VersionId != nil && len(*s.VersionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VersionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *GetTableVersionInput) SetCatalogId(v string) *GetTableVersionInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *GetTableVersionInput) SetDatabaseName(v string) *GetTableVersionInput { - s.DatabaseName = &v - return s -} - -// SetTableName sets the TableName field's value. -func (s *GetTableVersionInput) SetTableName(v string) *GetTableVersionInput { - s.TableName = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetTableVersionInput) SetVersionId(v string) *GetTableVersionInput { - s.VersionId = &v - return s -} - -type GetTableVersionOutput struct { - _ struct{} `type:"structure"` - - // The requested table version. - TableVersion *TableVersion `type:"structure"` -} - -// String returns the string representation -func (s GetTableVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTableVersionOutput) GoString() string { - return s.String() -} - -// SetTableVersion sets the TableVersion field's value. -func (s *GetTableVersionOutput) SetTableVersion(v *TableVersion) *GetTableVersionOutput { - s.TableVersion = v - return s -} - -type GetTableVersionsInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the tables reside. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The database in the catalog in which the table resides. For Hive compatibility, - // this name is entirely lowercase. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // The maximum number of table versions to return in one response. - MaxResults *int64 `min:"1" type:"integer"` - - // A continuation token, if this is not the first call. - NextToken *string `type:"string"` - - // The name of the table. For Hive compatibility, this name is entirely lowercase. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTableVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTableVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTableVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTableVersionsInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - if s.TableName != nil && len(*s.TableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *GetTableVersionsInput) SetCatalogId(v string) *GetTableVersionsInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *GetTableVersionsInput) SetDatabaseName(v string) *GetTableVersionsInput { - s.DatabaseName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetTableVersionsInput) SetMaxResults(v int64) *GetTableVersionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetTableVersionsInput) SetNextToken(v string) *GetTableVersionsInput { - s.NextToken = &v - return s -} - -// SetTableName sets the TableName field's value. -func (s *GetTableVersionsInput) SetTableName(v string) *GetTableVersionsInput { - s.TableName = &v - return s -} - -type GetTableVersionsOutput struct { - _ struct{} `type:"structure"` - - // A continuation token, if the list of available versions does not include - // the last one. - NextToken *string `type:"string"` - - // A list of strings identifying available versions of the specified table. - TableVersions []*TableVersion `type:"list"` -} - -// String returns the string representation -func (s GetTableVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTableVersionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetTableVersionsOutput) SetNextToken(v string) *GetTableVersionsOutput { - s.NextToken = &v - return s -} - -// SetTableVersions sets the TableVersions field's value. -func (s *GetTableVersionsOutput) SetTableVersions(v []*TableVersion) *GetTableVersionsOutput { - s.TableVersions = v - return s -} - -type GetTablesInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the tables reside. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The database in the catalog whose tables to list. For Hive compatibility, - // this name is entirely lowercase. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // A regular expression pattern. If present, only those tables whose names match - // the pattern are returned. - Expression *string `type:"string"` - - // The maximum number of tables to return in a single response. - MaxResults *int64 `min:"1" type:"integer"` - - // A continuation token, included if this is a continuation call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetTablesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTablesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTablesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTablesInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *GetTablesInput) SetCatalogId(v string) *GetTablesInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *GetTablesInput) SetDatabaseName(v string) *GetTablesInput { - s.DatabaseName = &v - return s -} - -// SetExpression sets the Expression field's value. -func (s *GetTablesInput) SetExpression(v string) *GetTablesInput { - s.Expression = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetTablesInput) SetMaxResults(v int64) *GetTablesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetTablesInput) SetNextToken(v string) *GetTablesInput { - s.NextToken = &v - return s -} - -type GetTablesOutput struct { - _ struct{} `type:"structure"` - - // A continuation token, present if the current list segment is not the last. - NextToken *string `type:"string"` - - // A list of the requested Table objects. - TableList []*Table `type:"list"` -} - -// String returns the string representation -func (s GetTablesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTablesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetTablesOutput) SetNextToken(v string) *GetTablesOutput { - s.NextToken = &v - return s -} - -// SetTableList sets the TableList field's value. -func (s *GetTablesOutput) SetTableList(v []*Table) *GetTablesOutput { - s.TableList = v - return s -} - -type GetTriggerInput struct { - _ struct{} `type:"structure"` - - // The name of the trigger to retrieve. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTriggerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTriggerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTriggerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTriggerInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetTriggerInput) SetName(v string) *GetTriggerInput { - s.Name = &v - return s -} - -type GetTriggerOutput struct { - _ struct{} `type:"structure"` - - // The requested trigger definition. - Trigger *Trigger `type:"structure"` -} - -// String returns the string representation -func (s GetTriggerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTriggerOutput) GoString() string { - return s.String() -} - -// SetTrigger sets the Trigger field's value. -func (s *GetTriggerOutput) SetTrigger(v *Trigger) *GetTriggerOutput { - s.Trigger = v - return s -} - -type GetTriggersInput struct { - _ struct{} `type:"structure"` - - // The name of the job for which to retrieve triggers. The trigger that can - // start this job will be returned, and if there is no such trigger, all triggers - // will be returned. - DependentJobName *string `min:"1" type:"string"` - - // The maximum size of the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A continuation token, if this is a continuation call. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetTriggersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTriggersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTriggersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTriggersInput"} - if s.DependentJobName != nil && len(*s.DependentJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DependentJobName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDependentJobName sets the DependentJobName field's value. -func (s *GetTriggersInput) SetDependentJobName(v string) *GetTriggersInput { - s.DependentJobName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetTriggersInput) SetMaxResults(v int64) *GetTriggersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetTriggersInput) SetNextToken(v string) *GetTriggersInput { - s.NextToken = &v - return s -} - -type GetTriggersOutput struct { - _ struct{} `type:"structure"` - - // A continuation token, if not all the requested triggers have yet been returned. - NextToken *string `type:"string"` - - // A list of triggers for the specified job. - Triggers []*Trigger `type:"list"` -} - -// String returns the string representation -func (s GetTriggersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTriggersOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetTriggersOutput) SetNextToken(v string) *GetTriggersOutput { - s.NextToken = &v - return s -} - -// SetTriggers sets the Triggers field's value. -func (s *GetTriggersOutput) SetTriggers(v []*Trigger) *GetTriggersOutput { - s.Triggers = v - return s -} - -type GetUserDefinedFunctionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the function to be retrieved is located. - // If none is supplied, the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the catalog database where the function is located. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // The name of the function. - // - // FunctionName is a required field - FunctionName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetUserDefinedFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUserDefinedFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUserDefinedFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUserDefinedFunctionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *GetUserDefinedFunctionInput) SetCatalogId(v string) *GetUserDefinedFunctionInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *GetUserDefinedFunctionInput) SetDatabaseName(v string) *GetUserDefinedFunctionInput { - s.DatabaseName = &v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *GetUserDefinedFunctionInput) SetFunctionName(v string) *GetUserDefinedFunctionInput { - s.FunctionName = &v - return s -} - -type GetUserDefinedFunctionOutput struct { - _ struct{} `type:"structure"` - - // The requested function definition. - UserDefinedFunction *UserDefinedFunction `type:"structure"` -} - -// String returns the string representation -func (s GetUserDefinedFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUserDefinedFunctionOutput) GoString() string { - return s.String() -} - -// SetUserDefinedFunction sets the UserDefinedFunction field's value. -func (s *GetUserDefinedFunctionOutput) SetUserDefinedFunction(v *UserDefinedFunction) *GetUserDefinedFunctionOutput { - s.UserDefinedFunction = v - return s -} - -type GetUserDefinedFunctionsInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the functions to be retrieved are located. - // If none is supplied, the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the catalog database where the functions are located. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // The maximum number of functions to return in one response. - MaxResults *int64 `min:"1" type:"integer"` - - // A continuation token, if this is a continuation call. - NextToken *string `type:"string"` - - // An optional function-name pattern string that filters the function definitions - // returned. - // - // Pattern is a required field - Pattern *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetUserDefinedFunctionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUserDefinedFunctionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUserDefinedFunctionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUserDefinedFunctionsInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Pattern == nil { - invalidParams.Add(request.NewErrParamRequired("Pattern")) - } - if s.Pattern != nil && len(*s.Pattern) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Pattern", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *GetUserDefinedFunctionsInput) SetCatalogId(v string) *GetUserDefinedFunctionsInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *GetUserDefinedFunctionsInput) SetDatabaseName(v string) *GetUserDefinedFunctionsInput { - s.DatabaseName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetUserDefinedFunctionsInput) SetMaxResults(v int64) *GetUserDefinedFunctionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetUserDefinedFunctionsInput) SetNextToken(v string) *GetUserDefinedFunctionsInput { - s.NextToken = &v - return s -} - -// SetPattern sets the Pattern field's value. -func (s *GetUserDefinedFunctionsInput) SetPattern(v string) *GetUserDefinedFunctionsInput { - s.Pattern = &v - return s -} - -type GetUserDefinedFunctionsOutput struct { - _ struct{} `type:"structure"` - - // A continuation token, if the list of functions returned does not include - // the last requested function. - NextToken *string `type:"string"` - - // A list of requested function definitions. - UserDefinedFunctions []*UserDefinedFunction `type:"list"` -} - -// String returns the string representation -func (s GetUserDefinedFunctionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUserDefinedFunctionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetUserDefinedFunctionsOutput) SetNextToken(v string) *GetUserDefinedFunctionsOutput { - s.NextToken = &v - return s -} - -// SetUserDefinedFunctions sets the UserDefinedFunctions field's value. -func (s *GetUserDefinedFunctionsOutput) SetUserDefinedFunctions(v []*UserDefinedFunction) *GetUserDefinedFunctionsOutput { - s.UserDefinedFunctions = v - return s -} - -// A classifier that uses grok patterns. -type GrokClassifier struct { - _ struct{} `type:"structure"` - - // An identifier of the data format that the classifier matches, such as Twitter, - // JSON, Omniture logs, and so on. - // - // Classification is a required field - Classification *string `type:"string" required:"true"` - - // The time this classifier was registered. - CreationTime *time.Time `type:"timestamp"` - - // Optional custom grok patterns defined by this classifier. For more information, - // see custom patterns in Writing Custom Classifers (http://docs.aws.amazon.com/glue/latest/dg/custom-classifier.html). - CustomPatterns *string `type:"string"` - - // The grok pattern applied to a data store by this classifier. For more information, - // see built-in patterns in Writing Custom Classifers (http://docs.aws.amazon.com/glue/latest/dg/custom-classifier.html). - // - // GrokPattern is a required field - GrokPattern *string `min:"1" type:"string" required:"true"` - - // The time this classifier was last updated. - LastUpdated *time.Time `type:"timestamp"` - - // The name of the classifier. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The version of this classifier. - Version *int64 `type:"long"` -} - -// String returns the string representation -func (s GrokClassifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GrokClassifier) GoString() string { - return s.String() -} - -// SetClassification sets the Classification field's value. -func (s *GrokClassifier) SetClassification(v string) *GrokClassifier { - s.Classification = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *GrokClassifier) SetCreationTime(v time.Time) *GrokClassifier { - s.CreationTime = &v - return s -} - -// SetCustomPatterns sets the CustomPatterns field's value. -func (s *GrokClassifier) SetCustomPatterns(v string) *GrokClassifier { - s.CustomPatterns = &v - return s -} - -// SetGrokPattern sets the GrokPattern field's value. -func (s *GrokClassifier) SetGrokPattern(v string) *GrokClassifier { - s.GrokPattern = &v - return s -} - -// SetLastUpdated sets the LastUpdated field's value. -func (s *GrokClassifier) SetLastUpdated(v time.Time) *GrokClassifier { - s.LastUpdated = &v - return s -} - -// SetName sets the Name field's value. -func (s *GrokClassifier) SetName(v string) *GrokClassifier { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GrokClassifier) SetVersion(v int64) *GrokClassifier { - s.Version = &v - return s -} - -type ImportCatalogToGlueInput struct { - _ struct{} `type:"structure"` - - // The ID of the catalog to import. Currently, this should be the AWS account - // ID. - CatalogId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ImportCatalogToGlueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportCatalogToGlueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportCatalogToGlueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportCatalogToGlueInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *ImportCatalogToGlueInput) SetCatalogId(v string) *ImportCatalogToGlueInput { - s.CatalogId = &v - return s -} - -type ImportCatalogToGlueOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ImportCatalogToGlueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportCatalogToGlueOutput) GoString() string { - return s.String() -} - -// Specifies a JDBC data store to crawl. -type JdbcTarget struct { - _ struct{} `type:"structure"` - - // The name of the connection to use to connect to the JDBC target. - ConnectionName *string `type:"string"` - - // A list of glob patterns used to exclude from the crawl. For more information, - // see Catalog Tables with a Crawler (http://docs.aws.amazon.com/glue/latest/dg/add-crawler.html). - Exclusions []*string `type:"list"` - - // The path of the JDBC target. - Path *string `type:"string"` -} - -// String returns the string representation -func (s JdbcTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JdbcTarget) GoString() string { - return s.String() -} - -// SetConnectionName sets the ConnectionName field's value. -func (s *JdbcTarget) SetConnectionName(v string) *JdbcTarget { - s.ConnectionName = &v - return s -} - -// SetExclusions sets the Exclusions field's value. -func (s *JdbcTarget) SetExclusions(v []*string) *JdbcTarget { - s.Exclusions = v - return s -} - -// SetPath sets the Path field's value. -func (s *JdbcTarget) SetPath(v string) *JdbcTarget { - s.Path = &v - return s -} - -// Specifies a job definition. -type Job struct { - _ struct{} `type:"structure"` - - // This field is deprecated, use MaxCapacity instead. - // - // The number of AWS Glue data processing units (DPUs) allocated to runs of - // this job. From 2 to 100 DPUs can be allocated; the default is 10. A DPU is - // a relative measure of processing power that consists of 4 vCPUs of compute - // capacity and 16 GB of memory. For more information, see the AWS Glue pricing - // page (https://aws.amazon.com/glue/pricing/). - // - // Deprecated: This property is deprecated, use MaxCapacity instead. - AllocatedCapacity *int64 `deprecated:"true" type:"integer"` - - // The JobCommand that executes this job. - Command *JobCommand `type:"structure"` - - // The connections used for this job. - Connections *ConnectionsList `type:"structure"` - - // The time and date that this job definition was created. - CreatedOn *time.Time `type:"timestamp"` - - // The default arguments for this job, specified as name-value pairs. - // - // You can specify arguments here that your own job-execution script consumes, - // as well as arguments that AWS Glue itself consumes. - // - // For information about how to specify and consume your own Job arguments, - // see the Calling AWS Glue APIs in Python (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html) - // topic in the developer guide. - // - // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) - // topic in the developer guide. - DefaultArguments map[string]*string `type:"map"` - - // Description of the job being defined. - Description *string `type:"string"` - - // An ExecutionProperty specifying the maximum number of concurrent runs allowed - // for this job. - ExecutionProperty *ExecutionProperty `type:"structure"` - - // The last point in time when this job definition was modified. - LastModifiedOn *time.Time `type:"timestamp"` - - // This field is reserved for future use. - LogUri *string `type:"string"` - - // AWS Glue supports running jobs on a JobCommand.Name="pythonshell" with allocated - // processing as low as 0.0625 DPU, which can be specified using MaxCapacity. - // Glue ETL jobs running in any other way cannot have fractional DPU allocations. - MaxCapacity *float64 `type:"double"` - - // The maximum number of times to retry this job after a JobRun fails. - MaxRetries *int64 `type:"integer"` - - // The name you assign to this job definition. - Name *string `min:"1" type:"string"` - - // Specifies configuration properties of a job notification. - NotificationProperty *NotificationProperty `type:"structure"` - - // The name or ARN of the IAM role associated with this job. - Role *string `type:"string"` - - // The name of the SecurityConfiguration structure to be used with this job. - SecurityConfiguration *string `min:"1" type:"string"` - - // The job timeout in minutes. This is the maximum time that a job run can consume - // resources before it is terminated and enters TIMEOUT status. The default - // is 2,880 minutes (48 hours). - Timeout *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s Job) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Job) GoString() string { - return s.String() -} - -// SetAllocatedCapacity sets the AllocatedCapacity field's value. -func (s *Job) SetAllocatedCapacity(v int64) *Job { - s.AllocatedCapacity = &v - return s -} - -// SetCommand sets the Command field's value. -func (s *Job) SetCommand(v *JobCommand) *Job { - s.Command = v - return s -} - -// SetConnections sets the Connections field's value. -func (s *Job) SetConnections(v *ConnectionsList) *Job { - s.Connections = v - return s -} - -// SetCreatedOn sets the CreatedOn field's value. -func (s *Job) SetCreatedOn(v time.Time) *Job { - s.CreatedOn = &v - return s -} - -// SetDefaultArguments sets the DefaultArguments field's value. -func (s *Job) SetDefaultArguments(v map[string]*string) *Job { - s.DefaultArguments = v - return s -} - -// SetDescription sets the Description field's value. -func (s *Job) SetDescription(v string) *Job { - s.Description = &v - return s -} - -// SetExecutionProperty sets the ExecutionProperty field's value. -func (s *Job) SetExecutionProperty(v *ExecutionProperty) *Job { - s.ExecutionProperty = v - return s -} - -// SetLastModifiedOn sets the LastModifiedOn field's value. -func (s *Job) SetLastModifiedOn(v time.Time) *Job { - s.LastModifiedOn = &v - return s -} - -// SetLogUri sets the LogUri field's value. -func (s *Job) SetLogUri(v string) *Job { - s.LogUri = &v - return s -} - -// SetMaxCapacity sets the MaxCapacity field's value. -func (s *Job) SetMaxCapacity(v float64) *Job { - s.MaxCapacity = &v - return s -} - -// SetMaxRetries sets the MaxRetries field's value. -func (s *Job) SetMaxRetries(v int64) *Job { - s.MaxRetries = &v - return s -} - -// SetName sets the Name field's value. -func (s *Job) SetName(v string) *Job { - s.Name = &v - return s -} - -// SetNotificationProperty sets the NotificationProperty field's value. -func (s *Job) SetNotificationProperty(v *NotificationProperty) *Job { - s.NotificationProperty = v - return s -} - -// SetRole sets the Role field's value. -func (s *Job) SetRole(v string) *Job { - s.Role = &v - return s -} - -// SetSecurityConfiguration sets the SecurityConfiguration field's value. -func (s *Job) SetSecurityConfiguration(v string) *Job { - s.SecurityConfiguration = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *Job) SetTimeout(v int64) *Job { - s.Timeout = &v - return s -} - -// Defines a point which a job can resume processing. -type JobBookmarkEntry struct { - _ struct{} `type:"structure"` - - // The attempt ID number. - Attempt *int64 `type:"integer"` - - // The bookmark itself. - JobBookmark *string `type:"string"` - - // Name of the job in question. - JobName *string `type:"string"` - - // The run ID number. - Run *int64 `type:"integer"` - - // Version of the job. - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s JobBookmarkEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobBookmarkEntry) GoString() string { - return s.String() -} - -// SetAttempt sets the Attempt field's value. -func (s *JobBookmarkEntry) SetAttempt(v int64) *JobBookmarkEntry { - s.Attempt = &v - return s -} - -// SetJobBookmark sets the JobBookmark field's value. -func (s *JobBookmarkEntry) SetJobBookmark(v string) *JobBookmarkEntry { - s.JobBookmark = &v - return s -} - -// SetJobName sets the JobName field's value. -func (s *JobBookmarkEntry) SetJobName(v string) *JobBookmarkEntry { - s.JobName = &v - return s -} - -// SetRun sets the Run field's value. -func (s *JobBookmarkEntry) SetRun(v int64) *JobBookmarkEntry { - s.Run = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *JobBookmarkEntry) SetVersion(v int64) *JobBookmarkEntry { - s.Version = &v - return s -} - -// Specifies how Job bookmark data should be encrypted. -type JobBookmarksEncryption struct { - _ struct{} `type:"structure"` - - // The encryption mode to use for Job bookmarks data. - JobBookmarksEncryptionMode *string `type:"string" enum:"JobBookmarksEncryptionMode"` - - // The AWS ARN of the KMS key to be used to encrypt the data. - KmsKeyArn *string `type:"string"` -} - -// String returns the string representation -func (s JobBookmarksEncryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobBookmarksEncryption) GoString() string { - return s.String() -} - -// SetJobBookmarksEncryptionMode sets the JobBookmarksEncryptionMode field's value. -func (s *JobBookmarksEncryption) SetJobBookmarksEncryptionMode(v string) *JobBookmarksEncryption { - s.JobBookmarksEncryptionMode = &v - return s -} - -// SetKmsKeyArn sets the KmsKeyArn field's value. -func (s *JobBookmarksEncryption) SetKmsKeyArn(v string) *JobBookmarksEncryption { - s.KmsKeyArn = &v - return s -} - -// Specifies code executed when a job is run. -type JobCommand struct { - _ struct{} `type:"structure"` - - // The name of the job command: this must be glueetl, for an Apache Spark ETL - // job, or pythonshell, for a Python shell job. - Name *string `type:"string"` - - // Specifies the S3 path to a script that executes a job (required). - ScriptLocation *string `type:"string"` -} - -// String returns the string representation -func (s JobCommand) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobCommand) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *JobCommand) SetName(v string) *JobCommand { - s.Name = &v - return s -} - -// SetScriptLocation sets the ScriptLocation field's value. -func (s *JobCommand) SetScriptLocation(v string) *JobCommand { - s.ScriptLocation = &v - return s -} - -// Contains information about a job run. -type JobRun struct { - _ struct{} `type:"structure"` - - // This field is deprecated, use MaxCapacity instead. - // - // The number of AWS Glue data processing units (DPUs) allocated to this JobRun. - // From 2 to 100 DPUs can be allocated; the default is 10. A DPU is a relative - // measure of processing power that consists of 4 vCPUs of compute capacity - // and 16 GB of memory. For more information, see the AWS Glue pricing page - // (https://aws.amazon.com/glue/pricing/). - // - // Deprecated: This property is deprecated, use MaxCapacity instead. - AllocatedCapacity *int64 `deprecated:"true" type:"integer"` - - // The job arguments associated with this run. These override equivalent default - // arguments set for the job. - // - // You can specify arguments here that your own job-execution script consumes, - // as well as arguments that AWS Glue itself consumes. - // - // For information about how to specify and consume your own job arguments, - // see the Calling AWS Glue APIs in Python (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html) - // topic in the developer guide. - // - // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) - // topic in the developer guide. - Arguments map[string]*string `type:"map"` - - // The number of the attempt to run this job. - Attempt *int64 `type:"integer"` - - // The date and time this job run completed. - CompletedOn *time.Time `type:"timestamp"` - - // An error message associated with this job run. - ErrorMessage *string `type:"string"` - - // The amount of time (in seconds) that the job run consumed resources. - ExecutionTime *int64 `type:"integer"` - - // The ID of this job run. - Id *string `min:"1" type:"string"` - - // The name of the job definition being used in this run. - JobName *string `min:"1" type:"string"` - - // The current state of the job run. - JobRunState *string `type:"string" enum:"JobRunState"` - - // The last time this job run was modified. - LastModifiedOn *time.Time `type:"timestamp"` - - // The name of the log group for secure logging, that can be server-side encrypted - // in CloudWatch using KMS. This name can be /aws-glue/jobs/, in which case - // the default encryption is NONE. If you add a role name and SecurityConfiguration - // name (in other words, /aws-glue/jobs-yourRoleName-yourSecurityConfigurationName/), - // then that security configuration will be used to encrypt the log group. - LogGroupName *string `type:"string"` - - // AWS Glue supports running jobs on a JobCommand.Name="pythonshell" with allocated - // processing as low as 0.0625 DPU, which can be specified using MaxCapacity. - // Glue ETL jobs running in any other way cannot have fractional DPU allocations. - MaxCapacity *float64 `type:"double"` - - // Specifies configuration properties of a job run notification. - NotificationProperty *NotificationProperty `type:"structure"` - - // A list of predecessors to this job run. - PredecessorRuns []*Predecessor `type:"list"` - - // The ID of the previous run of this job. For example, the JobRunId specified - // in the StartJobRun action. - PreviousRunId *string `min:"1" type:"string"` - - // The name of the SecurityConfiguration structure to be used with this job - // run. - SecurityConfiguration *string `min:"1" type:"string"` - - // The date and time at which this job run was started. - StartedOn *time.Time `type:"timestamp"` - - // The JobRun timeout in minutes. This is the maximum time that a job run can - // consume resources before it is terminated and enters TIMEOUT status. The - // default is 2,880 minutes (48 hours). This overrides the timeout value set - // in the parent job. - Timeout *int64 `min:"1" type:"integer"` - - // The name of the trigger that started this job run. - TriggerName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s JobRun) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobRun) GoString() string { - return s.String() -} - -// SetAllocatedCapacity sets the AllocatedCapacity field's value. -func (s *JobRun) SetAllocatedCapacity(v int64) *JobRun { - s.AllocatedCapacity = &v - return s -} - -// SetArguments sets the Arguments field's value. -func (s *JobRun) SetArguments(v map[string]*string) *JobRun { - s.Arguments = v - return s -} - -// SetAttempt sets the Attempt field's value. -func (s *JobRun) SetAttempt(v int64) *JobRun { - s.Attempt = &v - return s -} - -// SetCompletedOn sets the CompletedOn field's value. -func (s *JobRun) SetCompletedOn(v time.Time) *JobRun { - s.CompletedOn = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *JobRun) SetErrorMessage(v string) *JobRun { - s.ErrorMessage = &v - return s -} - -// SetExecutionTime sets the ExecutionTime field's value. -func (s *JobRun) SetExecutionTime(v int64) *JobRun { - s.ExecutionTime = &v - return s -} - -// SetId sets the Id field's value. -func (s *JobRun) SetId(v string) *JobRun { - s.Id = &v - return s -} - -// SetJobName sets the JobName field's value. -func (s *JobRun) SetJobName(v string) *JobRun { - s.JobName = &v - return s -} - -// SetJobRunState sets the JobRunState field's value. -func (s *JobRun) SetJobRunState(v string) *JobRun { - s.JobRunState = &v - return s -} - -// SetLastModifiedOn sets the LastModifiedOn field's value. -func (s *JobRun) SetLastModifiedOn(v time.Time) *JobRun { - s.LastModifiedOn = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *JobRun) SetLogGroupName(v string) *JobRun { - s.LogGroupName = &v - return s -} - -// SetMaxCapacity sets the MaxCapacity field's value. -func (s *JobRun) SetMaxCapacity(v float64) *JobRun { - s.MaxCapacity = &v - return s -} - -// SetNotificationProperty sets the NotificationProperty field's value. -func (s *JobRun) SetNotificationProperty(v *NotificationProperty) *JobRun { - s.NotificationProperty = v - return s -} - -// SetPredecessorRuns sets the PredecessorRuns field's value. -func (s *JobRun) SetPredecessorRuns(v []*Predecessor) *JobRun { - s.PredecessorRuns = v - return s -} - -// SetPreviousRunId sets the PreviousRunId field's value. -func (s *JobRun) SetPreviousRunId(v string) *JobRun { - s.PreviousRunId = &v - return s -} - -// SetSecurityConfiguration sets the SecurityConfiguration field's value. -func (s *JobRun) SetSecurityConfiguration(v string) *JobRun { - s.SecurityConfiguration = &v - return s -} - -// SetStartedOn sets the StartedOn field's value. -func (s *JobRun) SetStartedOn(v time.Time) *JobRun { - s.StartedOn = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *JobRun) SetTimeout(v int64) *JobRun { - s.Timeout = &v - return s -} - -// SetTriggerName sets the TriggerName field's value. -func (s *JobRun) SetTriggerName(v string) *JobRun { - s.TriggerName = &v - return s -} - -// Specifies information used to update an existing job definition. Note that -// the previous job definition will be completely overwritten by this information. -type JobUpdate struct { - _ struct{} `type:"structure"` - - // This field is deprecated. Use MaxCapacity instead. - // - // The number of AWS Glue data processing units (DPUs) to allocate to this Job. - // From 2 to 100 DPUs can be allocated; the default is 10. A DPU is a relative - // measure of processing power that consists of 4 vCPUs of compute capacity - // and 16 GB of memory. For more information, see the AWS Glue pricing page - // (https://aws.amazon.com/glue/pricing/). - // - // Deprecated: This property is deprecated, use MaxCapacity instead. - AllocatedCapacity *int64 `deprecated:"true" type:"integer"` - - // The JobCommand that executes this job (required). - Command *JobCommand `type:"structure"` - - // The connections used for this job. - Connections *ConnectionsList `type:"structure"` - - // The default arguments for this job. - // - // You can specify arguments here that your own job-execution script consumes, - // as well as arguments that AWS Glue itself consumes. - // - // For information about how to specify and consume your own Job arguments, - // see the Calling AWS Glue APIs in Python (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html) - // topic in the developer guide. - // - // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) - // topic in the developer guide. - DefaultArguments map[string]*string `type:"map"` - - // Description of the job being defined. - Description *string `type:"string"` - - // An ExecutionProperty specifying the maximum number of concurrent runs allowed - // for this job. - ExecutionProperty *ExecutionProperty `type:"structure"` - - // This field is reserved for future use. - LogUri *string `type:"string"` - - // AWS Glue supports running jobs on a JobCommand.Name="pythonshell" with allocated - // processing as low as 0.0625 DPU, which can be specified using MaxCapacity. - // Glue ETL jobs running in any other way cannot have fractional DPU allocations. - MaxCapacity *float64 `type:"double"` - - // The maximum number of times to retry this job if it fails. - MaxRetries *int64 `type:"integer"` - - // Specifies configuration properties of a job notification. - NotificationProperty *NotificationProperty `type:"structure"` - - // The name or ARN of the IAM role associated with this job (required). - Role *string `type:"string"` - - // The name of the SecurityConfiguration structure to be used with this job. - SecurityConfiguration *string `min:"1" type:"string"` - - // The job timeout in minutes. This is the maximum time that a job run can consume - // resources before it is terminated and enters TIMEOUT status. The default - // is 2,880 minutes (48 hours). - Timeout *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s JobUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *JobUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "JobUpdate"} - if s.SecurityConfiguration != nil && len(*s.SecurityConfiguration) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityConfiguration", 1)) - } - if s.Timeout != nil && *s.Timeout < 1 { - invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) - } - if s.NotificationProperty != nil { - if err := s.NotificationProperty.Validate(); err != nil { - invalidParams.AddNested("NotificationProperty", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllocatedCapacity sets the AllocatedCapacity field's value. -func (s *JobUpdate) SetAllocatedCapacity(v int64) *JobUpdate { - s.AllocatedCapacity = &v - return s -} - -// SetCommand sets the Command field's value. -func (s *JobUpdate) SetCommand(v *JobCommand) *JobUpdate { - s.Command = v - return s -} - -// SetConnections sets the Connections field's value. -func (s *JobUpdate) SetConnections(v *ConnectionsList) *JobUpdate { - s.Connections = v - return s -} - -// SetDefaultArguments sets the DefaultArguments field's value. -func (s *JobUpdate) SetDefaultArguments(v map[string]*string) *JobUpdate { - s.DefaultArguments = v - return s -} - -// SetDescription sets the Description field's value. -func (s *JobUpdate) SetDescription(v string) *JobUpdate { - s.Description = &v - return s -} - -// SetExecutionProperty sets the ExecutionProperty field's value. -func (s *JobUpdate) SetExecutionProperty(v *ExecutionProperty) *JobUpdate { - s.ExecutionProperty = v - return s -} - -// SetLogUri sets the LogUri field's value. -func (s *JobUpdate) SetLogUri(v string) *JobUpdate { - s.LogUri = &v - return s -} - -// SetMaxCapacity sets the MaxCapacity field's value. -func (s *JobUpdate) SetMaxCapacity(v float64) *JobUpdate { - s.MaxCapacity = &v - return s -} - -// SetMaxRetries sets the MaxRetries field's value. -func (s *JobUpdate) SetMaxRetries(v int64) *JobUpdate { - s.MaxRetries = &v - return s -} - -// SetNotificationProperty sets the NotificationProperty field's value. -func (s *JobUpdate) SetNotificationProperty(v *NotificationProperty) *JobUpdate { - s.NotificationProperty = v - return s -} - -// SetRole sets the Role field's value. -func (s *JobUpdate) SetRole(v string) *JobUpdate { - s.Role = &v - return s -} - -// SetSecurityConfiguration sets the SecurityConfiguration field's value. -func (s *JobUpdate) SetSecurityConfiguration(v string) *JobUpdate { - s.SecurityConfiguration = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *JobUpdate) SetTimeout(v int64) *JobUpdate { - s.Timeout = &v - return s -} - -// A classifier for JSON content. -type JsonClassifier struct { - _ struct{} `type:"structure"` - - // The time this classifier was registered. - CreationTime *time.Time `type:"timestamp"` - - // A JsonPath string defining the JSON data for the classifier to classify. - // AWS Glue supports a subset of JsonPath, as described in Writing JsonPath - // Custom Classifiers (https://docs.aws.amazon.com/glue/latest/dg/custom-classifier.html#custom-classifier-json). - // - // JsonPath is a required field - JsonPath *string `type:"string" required:"true"` - - // The time this classifier was last updated. - LastUpdated *time.Time `type:"timestamp"` - - // The name of the classifier. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The version of this classifier. - Version *int64 `type:"long"` -} - -// String returns the string representation -func (s JsonClassifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JsonClassifier) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *JsonClassifier) SetCreationTime(v time.Time) *JsonClassifier { - s.CreationTime = &v - return s -} - -// SetJsonPath sets the JsonPath field's value. -func (s *JsonClassifier) SetJsonPath(v string) *JsonClassifier { - s.JsonPath = &v - return s -} - -// SetLastUpdated sets the LastUpdated field's value. -func (s *JsonClassifier) SetLastUpdated(v time.Time) *JsonClassifier { - s.LastUpdated = &v - return s -} - -// SetName sets the Name field's value. -func (s *JsonClassifier) SetName(v string) *JsonClassifier { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *JsonClassifier) SetVersion(v int64) *JsonClassifier { - s.Version = &v - return s -} - -// Status and error information about the most recent crawl. -type LastCrawlInfo struct { - _ struct{} `type:"structure"` - - // If an error occurred, the error information about the last crawl. - ErrorMessage *string `type:"string"` - - // The log group for the last crawl. - LogGroup *string `min:"1" type:"string"` - - // The log stream for the last crawl. - LogStream *string `min:"1" type:"string"` - - // The prefix for a message about this crawl. - MessagePrefix *string `min:"1" type:"string"` - - // The time at which the crawl started. - StartTime *time.Time `type:"timestamp"` - - // Status of the last crawl. - Status *string `type:"string" enum:"LastCrawlStatus"` -} - -// String returns the string representation -func (s LastCrawlInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LastCrawlInfo) GoString() string { - return s.String() -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *LastCrawlInfo) SetErrorMessage(v string) *LastCrawlInfo { - s.ErrorMessage = &v - return s -} - -// SetLogGroup sets the LogGroup field's value. -func (s *LastCrawlInfo) SetLogGroup(v string) *LastCrawlInfo { - s.LogGroup = &v - return s -} - -// SetLogStream sets the LogStream field's value. -func (s *LastCrawlInfo) SetLogStream(v string) *LastCrawlInfo { - s.LogStream = &v - return s -} - -// SetMessagePrefix sets the MessagePrefix field's value. -func (s *LastCrawlInfo) SetMessagePrefix(v string) *LastCrawlInfo { - s.MessagePrefix = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *LastCrawlInfo) SetStartTime(v time.Time) *LastCrawlInfo { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *LastCrawlInfo) SetStatus(v string) *LastCrawlInfo { - s.Status = &v - return s -} - -// The location of resources. -type Location struct { - _ struct{} `type:"structure"` - - // A DynamoDB Table location. - DynamoDB []*CodeGenNodeArg `type:"list"` - - // A JDBC location. - Jdbc []*CodeGenNodeArg `type:"list"` - - // An Amazon S3 location. - S3 []*CodeGenNodeArg `type:"list"` -} - -// String returns the string representation -func (s Location) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Location) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Location) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Location"} - if s.DynamoDB != nil { - for i, v := range s.DynamoDB { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DynamoDB", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Jdbc != nil { - for i, v := range s.Jdbc { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Jdbc", i), err.(request.ErrInvalidParams)) - } - } - } - if s.S3 != nil { - for i, v := range s.S3 { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "S3", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDynamoDB sets the DynamoDB field's value. -func (s *Location) SetDynamoDB(v []*CodeGenNodeArg) *Location { - s.DynamoDB = v - return s -} - -// SetJdbc sets the Jdbc field's value. -func (s *Location) SetJdbc(v []*CodeGenNodeArg) *Location { - s.Jdbc = v - return s -} - -// SetS3 sets the S3 field's value. -func (s *Location) SetS3(v []*CodeGenNodeArg) *Location { - s.S3 = v - return s -} - -// Defines a mapping. -type MappingEntry struct { - _ struct{} `type:"structure"` - - // The source path. - SourcePath *string `type:"string"` - - // The name of the source table. - SourceTable *string `type:"string"` - - // The source type. - SourceType *string `type:"string"` - - // The target path. - TargetPath *string `type:"string"` - - // The target table. - TargetTable *string `type:"string"` - - // The target type. - TargetType *string `type:"string"` -} - -// String returns the string representation -func (s MappingEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MappingEntry) GoString() string { - return s.String() -} - -// SetSourcePath sets the SourcePath field's value. -func (s *MappingEntry) SetSourcePath(v string) *MappingEntry { - s.SourcePath = &v - return s -} - -// SetSourceTable sets the SourceTable field's value. -func (s *MappingEntry) SetSourceTable(v string) *MappingEntry { - s.SourceTable = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *MappingEntry) SetSourceType(v string) *MappingEntry { - s.SourceType = &v - return s -} - -// SetTargetPath sets the TargetPath field's value. -func (s *MappingEntry) SetTargetPath(v string) *MappingEntry { - s.TargetPath = &v - return s -} - -// SetTargetTable sets the TargetTable field's value. -func (s *MappingEntry) SetTargetTable(v string) *MappingEntry { - s.TargetTable = &v - return s -} - -// SetTargetType sets the TargetType field's value. -func (s *MappingEntry) SetTargetType(v string) *MappingEntry { - s.TargetType = &v - return s -} - -// Specifies configuration properties of a notification. -type NotificationProperty struct { - _ struct{} `type:"structure"` - - // After a job run starts, the number of minutes to wait before sending a job - // run delay notification. - NotifyDelayAfter *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s NotificationProperty) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NotificationProperty) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NotificationProperty) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NotificationProperty"} - if s.NotifyDelayAfter != nil && *s.NotifyDelayAfter < 1 { - invalidParams.Add(request.NewErrParamMinValue("NotifyDelayAfter", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNotifyDelayAfter sets the NotifyDelayAfter field's value. -func (s *NotificationProperty) SetNotifyDelayAfter(v int64) *NotificationProperty { - s.NotifyDelayAfter = &v - return s -} - -// Specifies the sort order of a sorted column. -type Order struct { - _ struct{} `type:"structure"` - - // The name of the column. - // - // Column is a required field - Column *string `min:"1" type:"string" required:"true"` - - // Indicates that the column is sorted in ascending order (== 1), or in descending - // order (==0). - // - // SortOrder is a required field - SortOrder *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s Order) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Order) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Order) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Order"} - if s.Column == nil { - invalidParams.Add(request.NewErrParamRequired("Column")) - } - if s.Column != nil && len(*s.Column) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Column", 1)) - } - if s.SortOrder == nil { - invalidParams.Add(request.NewErrParamRequired("SortOrder")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetColumn sets the Column field's value. -func (s *Order) SetColumn(v string) *Order { - s.Column = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *Order) SetSortOrder(v int64) *Order { - s.SortOrder = &v - return s -} - -// Represents a slice of table data. -type Partition struct { - _ struct{} `type:"structure"` - - // The time at which the partition was created. - CreationTime *time.Time `type:"timestamp"` - - // The name of the catalog database where the table in question is located. - DatabaseName *string `min:"1" type:"string"` - - // The last time at which the partition was accessed. - LastAccessTime *time.Time `type:"timestamp"` - - // The last time at which column statistics were computed for this partition. - LastAnalyzedTime *time.Time `type:"timestamp"` - - // These key-value pairs define partition parameters. - Parameters map[string]*string `type:"map"` - - // Provides information about the physical location where the partition is stored. - StorageDescriptor *StorageDescriptor `type:"structure"` - - // The name of the table in question. - TableName *string `min:"1" type:"string"` - - // The values of the partition. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s Partition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Partition) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *Partition) SetCreationTime(v time.Time) *Partition { - s.CreationTime = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *Partition) SetDatabaseName(v string) *Partition { - s.DatabaseName = &v - return s -} - -// SetLastAccessTime sets the LastAccessTime field's value. -func (s *Partition) SetLastAccessTime(v time.Time) *Partition { - s.LastAccessTime = &v - return s -} - -// SetLastAnalyzedTime sets the LastAnalyzedTime field's value. -func (s *Partition) SetLastAnalyzedTime(v time.Time) *Partition { - s.LastAnalyzedTime = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *Partition) SetParameters(v map[string]*string) *Partition { - s.Parameters = v - return s -} - -// SetStorageDescriptor sets the StorageDescriptor field's value. -func (s *Partition) SetStorageDescriptor(v *StorageDescriptor) *Partition { - s.StorageDescriptor = v - return s -} - -// SetTableName sets the TableName field's value. -func (s *Partition) SetTableName(v string) *Partition { - s.TableName = &v - return s -} - -// SetValues sets the Values field's value. -func (s *Partition) SetValues(v []*string) *Partition { - s.Values = v - return s -} - -// Contains information about a partition error. -type PartitionError struct { - _ struct{} `type:"structure"` - - // Details about the partition error. - ErrorDetail *ErrorDetail `type:"structure"` - - // The values that define the partition. - PartitionValues []*string `type:"list"` -} - -// String returns the string representation -func (s PartitionError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PartitionError) GoString() string { - return s.String() -} - -// SetErrorDetail sets the ErrorDetail field's value. -func (s *PartitionError) SetErrorDetail(v *ErrorDetail) *PartitionError { - s.ErrorDetail = v - return s -} - -// SetPartitionValues sets the PartitionValues field's value. -func (s *PartitionError) SetPartitionValues(v []*string) *PartitionError { - s.PartitionValues = v - return s -} - -// The structure used to create and update a partion. -type PartitionInput struct { - _ struct{} `type:"structure"` - - // The last time at which the partition was accessed. - LastAccessTime *time.Time `type:"timestamp"` - - // The last time at which column statistics were computed for this partition. - LastAnalyzedTime *time.Time `type:"timestamp"` - - // These key-value pairs define partition parameters. - Parameters map[string]*string `type:"map"` - - // Provides information about the physical location where the partition is stored. - StorageDescriptor *StorageDescriptor `type:"structure"` - - // The values of the partition. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s PartitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PartitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PartitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PartitionInput"} - if s.StorageDescriptor != nil { - if err := s.StorageDescriptor.Validate(); err != nil { - invalidParams.AddNested("StorageDescriptor", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLastAccessTime sets the LastAccessTime field's value. -func (s *PartitionInput) SetLastAccessTime(v time.Time) *PartitionInput { - s.LastAccessTime = &v - return s -} - -// SetLastAnalyzedTime sets the LastAnalyzedTime field's value. -func (s *PartitionInput) SetLastAnalyzedTime(v time.Time) *PartitionInput { - s.LastAnalyzedTime = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *PartitionInput) SetParameters(v map[string]*string) *PartitionInput { - s.Parameters = v - return s -} - -// SetStorageDescriptor sets the StorageDescriptor field's value. -func (s *PartitionInput) SetStorageDescriptor(v *StorageDescriptor) *PartitionInput { - s.StorageDescriptor = v - return s -} - -// SetValues sets the Values field's value. -func (s *PartitionInput) SetValues(v []*string) *PartitionInput { - s.Values = v - return s -} - -// Contains a list of values defining partitions. -type PartitionValueList struct { - _ struct{} `type:"structure"` - - // The list of values. - // - // Values is a required field - Values []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s PartitionValueList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PartitionValueList) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PartitionValueList) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PartitionValueList"} - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetValues sets the Values field's value. -func (s *PartitionValueList) SetValues(v []*string) *PartitionValueList { - s.Values = v - return s -} - -// Specifies the physical requirements for a connection. -type PhysicalConnectionRequirements struct { - _ struct{} `type:"structure"` - - // The connection's availability zone. This field is redundant, since the specified - // subnet implies the availability zone to be used. The field must be populated - // now, but will be deprecated in the future. - AvailabilityZone *string `min:"1" type:"string"` - - // The security group ID list used by the connection. - SecurityGroupIdList []*string `type:"list"` - - // The subnet ID used by the connection. - SubnetId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PhysicalConnectionRequirements) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PhysicalConnectionRequirements) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PhysicalConnectionRequirements) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PhysicalConnectionRequirements"} - if s.AvailabilityZone != nil && len(*s.AvailabilityZone) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AvailabilityZone", 1)) - } - if s.SubnetId != nil && len(*s.SubnetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SubnetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *PhysicalConnectionRequirements) SetAvailabilityZone(v string) *PhysicalConnectionRequirements { - s.AvailabilityZone = &v - return s -} - -// SetSecurityGroupIdList sets the SecurityGroupIdList field's value. -func (s *PhysicalConnectionRequirements) SetSecurityGroupIdList(v []*string) *PhysicalConnectionRequirements { - s.SecurityGroupIdList = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *PhysicalConnectionRequirements) SetSubnetId(v string) *PhysicalConnectionRequirements { - s.SubnetId = &v - return s -} - -// A job run that was used in the predicate of a conditional trigger that triggered -// this job run. -type Predecessor struct { - _ struct{} `type:"structure"` - - // The name of the job definition used by the predecessor job run. - JobName *string `min:"1" type:"string"` - - // The job-run ID of the predecessor job run. - RunId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s Predecessor) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Predecessor) GoString() string { - return s.String() -} - -// SetJobName sets the JobName field's value. -func (s *Predecessor) SetJobName(v string) *Predecessor { - s.JobName = &v - return s -} - -// SetRunId sets the RunId field's value. -func (s *Predecessor) SetRunId(v string) *Predecessor { - s.RunId = &v - return s -} - -// Defines the predicate of the trigger, which determines when it fires. -type Predicate struct { - _ struct{} `type:"structure"` - - // A list of the conditions that determine when the trigger will fire. - Conditions []*Condition `type:"list"` - - // Optional field if only one condition is listed. If multiple conditions are - // listed, then this field is required. - Logical *string `type:"string" enum:"Logical"` -} - -// String returns the string representation -func (s Predicate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Predicate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Predicate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Predicate"} - if s.Conditions != nil { - for i, v := range s.Conditions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Conditions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConditions sets the Conditions field's value. -func (s *Predicate) SetConditions(v []*Condition) *Predicate { - s.Conditions = v - return s -} - -// SetLogical sets the Logical field's value. -func (s *Predicate) SetLogical(v string) *Predicate { - s.Logical = &v - return s -} - -type PutDataCatalogEncryptionSettingsInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog for which to set the security configuration. If - // none is supplied, the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The security configuration to set. - // - // DataCatalogEncryptionSettings is a required field - DataCatalogEncryptionSettings *DataCatalogEncryptionSettings `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PutDataCatalogEncryptionSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutDataCatalogEncryptionSettingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutDataCatalogEncryptionSettingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutDataCatalogEncryptionSettingsInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DataCatalogEncryptionSettings == nil { - invalidParams.Add(request.NewErrParamRequired("DataCatalogEncryptionSettings")) - } - if s.DataCatalogEncryptionSettings != nil { - if err := s.DataCatalogEncryptionSettings.Validate(); err != nil { - invalidParams.AddNested("DataCatalogEncryptionSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *PutDataCatalogEncryptionSettingsInput) SetCatalogId(v string) *PutDataCatalogEncryptionSettingsInput { - s.CatalogId = &v - return s -} - -// SetDataCatalogEncryptionSettings sets the DataCatalogEncryptionSettings field's value. -func (s *PutDataCatalogEncryptionSettingsInput) SetDataCatalogEncryptionSettings(v *DataCatalogEncryptionSettings) *PutDataCatalogEncryptionSettingsInput { - s.DataCatalogEncryptionSettings = v - return s -} - -type PutDataCatalogEncryptionSettingsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutDataCatalogEncryptionSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutDataCatalogEncryptionSettingsOutput) GoString() string { - return s.String() -} - -type PutResourcePolicyInput struct { - _ struct{} `type:"structure"` - - // A value of MUST_EXIST is used to update a policy. A value of NOT_EXIST is - // used to create a new policy. If a value of NONE or a null value is used, - // the call will not depend on the existence of a policy. - PolicyExistsCondition *string `type:"string" enum:"ExistCondition"` - - // This is the hash value returned when the previous policy was set using PutResourcePolicy. - // Its purpose is to prevent concurrent modifications of a policy. Do not use - // this parameter if no previous policy has been set. - PolicyHashCondition *string `min:"1" type:"string"` - - // Contains the policy document to set, in JSON format. - // - // PolicyInJson is a required field - PolicyInJson *string `min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutResourcePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutResourcePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutResourcePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"} - if s.PolicyHashCondition != nil && len(*s.PolicyHashCondition) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyHashCondition", 1)) - } - if s.PolicyInJson == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyInJson")) - } - if s.PolicyInJson != nil && len(*s.PolicyInJson) < 2 { - invalidParams.Add(request.NewErrParamMinLen("PolicyInJson", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyExistsCondition sets the PolicyExistsCondition field's value. -func (s *PutResourcePolicyInput) SetPolicyExistsCondition(v string) *PutResourcePolicyInput { - s.PolicyExistsCondition = &v - return s -} - -// SetPolicyHashCondition sets the PolicyHashCondition field's value. -func (s *PutResourcePolicyInput) SetPolicyHashCondition(v string) *PutResourcePolicyInput { - s.PolicyHashCondition = &v - return s -} - -// SetPolicyInJson sets the PolicyInJson field's value. -func (s *PutResourcePolicyInput) SetPolicyInJson(v string) *PutResourcePolicyInput { - s.PolicyInJson = &v - return s -} - -type PutResourcePolicyOutput struct { - _ struct{} `type:"structure"` - - // A hash of the policy that has just been set. This must be included in a subsequent - // call that overwrites or updates this policy. - PolicyHash *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PutResourcePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutResourcePolicyOutput) GoString() string { - return s.String() -} - -// SetPolicyHash sets the PolicyHash field's value. -func (s *PutResourcePolicyOutput) SetPolicyHash(v string) *PutResourcePolicyOutput { - s.PolicyHash = &v - return s -} - -type ResetJobBookmarkInput struct { - _ struct{} `type:"structure"` - - // The name of the job in question. - // - // JobName is a required field - JobName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ResetJobBookmarkInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetJobBookmarkInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetJobBookmarkInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetJobBookmarkInput"} - if s.JobName == nil { - invalidParams.Add(request.NewErrParamRequired("JobName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobName sets the JobName field's value. -func (s *ResetJobBookmarkInput) SetJobName(v string) *ResetJobBookmarkInput { - s.JobName = &v - return s -} - -type ResetJobBookmarkOutput struct { - _ struct{} `type:"structure"` - - // The reset bookmark entry. - JobBookmarkEntry *JobBookmarkEntry `type:"structure"` -} - -// String returns the string representation -func (s ResetJobBookmarkOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetJobBookmarkOutput) GoString() string { - return s.String() -} - -// SetJobBookmarkEntry sets the JobBookmarkEntry field's value. -func (s *ResetJobBookmarkOutput) SetJobBookmarkEntry(v *JobBookmarkEntry) *ResetJobBookmarkOutput { - s.JobBookmarkEntry = v - return s -} - -// URIs for function resources. -type ResourceUri struct { - _ struct{} `type:"structure"` - - // The type of the resource. - ResourceType *string `type:"string" enum:"ResourceType"` - - // The URI for accessing the resource. - Uri *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ResourceUri) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceUri) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceUri) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceUri"} - if s.Uri != nil && len(*s.Uri) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Uri", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceType sets the ResourceType field's value. -func (s *ResourceUri) SetResourceType(v string) *ResourceUri { - s.ResourceType = &v - return s -} - -// SetUri sets the Uri field's value. -func (s *ResourceUri) SetUri(v string) *ResourceUri { - s.Uri = &v - return s -} - -// Specifies how S3 data should be encrypted. -type S3Encryption struct { - _ struct{} `type:"structure"` - - // The AWS ARN of the KMS key to be used to encrypt the data. - KmsKeyArn *string `type:"string"` - - // The encryption mode to use for S3 data. - S3EncryptionMode *string `type:"string" enum:"S3EncryptionMode"` -} - -// String returns the string representation -func (s S3Encryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Encryption) GoString() string { - return s.String() -} - -// SetKmsKeyArn sets the KmsKeyArn field's value. -func (s *S3Encryption) SetKmsKeyArn(v string) *S3Encryption { - s.KmsKeyArn = &v - return s -} - -// SetS3EncryptionMode sets the S3EncryptionMode field's value. -func (s *S3Encryption) SetS3EncryptionMode(v string) *S3Encryption { - s.S3EncryptionMode = &v - return s -} - -// Specifies a data store in Amazon S3. -type S3Target struct { - _ struct{} `type:"structure"` - - // A list of glob patterns used to exclude from the crawl. For more information, - // see Catalog Tables with a Crawler (http://docs.aws.amazon.com/glue/latest/dg/add-crawler.html). - Exclusions []*string `type:"list"` - - // The path to the Amazon S3 target. - Path *string `type:"string"` -} - -// String returns the string representation -func (s S3Target) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Target) GoString() string { - return s.String() -} - -// SetExclusions sets the Exclusions field's value. -func (s *S3Target) SetExclusions(v []*string) *S3Target { - s.Exclusions = v - return s -} - -// SetPath sets the Path field's value. -func (s *S3Target) SetPath(v string) *S3Target { - s.Path = &v - return s -} - -// A scheduling object using a cron statement to schedule an event. -type Schedule struct { - _ struct{} `type:"structure"` - - // A cron expression used to specify the schedule (see Time-Based Schedules - // for Jobs and Crawlers (http://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 * * ? *). - ScheduleExpression *string `type:"string"` - - // The state of the schedule. - State *string `type:"string" enum:"ScheduleState"` -} - -// String returns the string representation -func (s Schedule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Schedule) GoString() string { - return s.String() -} - -// SetScheduleExpression sets the ScheduleExpression field's value. -func (s *Schedule) SetScheduleExpression(v string) *Schedule { - s.ScheduleExpression = &v - return s -} - -// SetState sets the State field's value. -func (s *Schedule) SetState(v string) *Schedule { - s.State = &v - return s -} - -// Crawler policy for update and deletion behavior. -type SchemaChangePolicy struct { - _ struct{} `type:"structure"` - - // The deletion behavior when the crawler finds a deleted object. - DeleteBehavior *string `type:"string" enum:"DeleteBehavior"` - - // The update behavior when the crawler finds a changed schema. - UpdateBehavior *string `type:"string" enum:"UpdateBehavior"` -} - -// String returns the string representation -func (s SchemaChangePolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SchemaChangePolicy) GoString() string { - return s.String() -} - -// SetDeleteBehavior sets the DeleteBehavior field's value. -func (s *SchemaChangePolicy) SetDeleteBehavior(v string) *SchemaChangePolicy { - s.DeleteBehavior = &v - return s -} - -// SetUpdateBehavior sets the UpdateBehavior field's value. -func (s *SchemaChangePolicy) SetUpdateBehavior(v string) *SchemaChangePolicy { - s.UpdateBehavior = &v - return s -} - -// Specifies a security configuration. -type SecurityConfiguration struct { - _ struct{} `type:"structure"` - - // The time at which this security configuration was created. - CreatedTimeStamp *time.Time `type:"timestamp"` - - // The encryption configuration associated with this security configuration. - EncryptionConfiguration *EncryptionConfiguration `type:"structure"` - - // The name of the security configuration. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s SecurityConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecurityConfiguration) GoString() string { - return s.String() -} - -// SetCreatedTimeStamp sets the CreatedTimeStamp field's value. -func (s *SecurityConfiguration) SetCreatedTimeStamp(v time.Time) *SecurityConfiguration { - s.CreatedTimeStamp = &v - return s -} - -// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. -func (s *SecurityConfiguration) SetEncryptionConfiguration(v *EncryptionConfiguration) *SecurityConfiguration { - s.EncryptionConfiguration = v - return s -} - -// SetName sets the Name field's value. -func (s *SecurityConfiguration) SetName(v string) *SecurityConfiguration { - s.Name = &v - return s -} - -// Defines a non-overlapping region of a table's partitions, allowing multiple -// requests to be executed in parallel. -type Segment struct { - _ struct{} `type:"structure"` - - // The zero-based index number of the this segment. For example, if the total - // number of segments is 4, SegmentNumber values will range from zero through - // three. - // - // SegmentNumber is a required field - SegmentNumber *int64 `type:"integer" required:"true"` - - // The total numer of segments. - // - // TotalSegments is a required field - TotalSegments *int64 `min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s Segment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Segment) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Segment) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Segment"} - if s.SegmentNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SegmentNumber")) - } - if s.TotalSegments == nil { - invalidParams.Add(request.NewErrParamRequired("TotalSegments")) - } - if s.TotalSegments != nil && *s.TotalSegments < 1 { - invalidParams.Add(request.NewErrParamMinValue("TotalSegments", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSegmentNumber sets the SegmentNumber field's value. -func (s *Segment) SetSegmentNumber(v int64) *Segment { - s.SegmentNumber = &v - return s -} - -// SetTotalSegments sets the TotalSegments field's value. -func (s *Segment) SetTotalSegments(v int64) *Segment { - s.TotalSegments = &v - return s -} - -// Information about a serialization/deserialization program (SerDe) which serves -// as an extractor and loader. -type SerDeInfo struct { - _ struct{} `type:"structure"` - - // Name of the SerDe. - Name *string `min:"1" type:"string"` - - // These key-value pairs define initialization parameters for the SerDe. - Parameters map[string]*string `type:"map"` - - // Usually the class that implements the SerDe. An example is: org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe. - SerializationLibrary *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s SerDeInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SerDeInfo) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SerDeInfo) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SerDeInfo"} - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.SerializationLibrary != nil && len(*s.SerializationLibrary) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SerializationLibrary", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *SerDeInfo) SetName(v string) *SerDeInfo { - s.Name = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *SerDeInfo) SetParameters(v map[string]*string) *SerDeInfo { - s.Parameters = v - return s -} - -// SetSerializationLibrary sets the SerializationLibrary field's value. -func (s *SerDeInfo) SetSerializationLibrary(v string) *SerDeInfo { - s.SerializationLibrary = &v - return s -} - -// Specifies skewed values in a table. Skewed are ones that occur with very -// high frequency. -type SkewedInfo struct { - _ struct{} `type:"structure"` - - // A list of names of columns that contain skewed values. - SkewedColumnNames []*string `type:"list"` - - // A mapping of skewed values to the columns that contain them. - SkewedColumnValueLocationMaps map[string]*string `type:"map"` - - // A list of values that appear so frequently as to be considered skewed. - SkewedColumnValues []*string `type:"list"` -} - -// String returns the string representation -func (s SkewedInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SkewedInfo) GoString() string { - return s.String() -} - -// SetSkewedColumnNames sets the SkewedColumnNames field's value. -func (s *SkewedInfo) SetSkewedColumnNames(v []*string) *SkewedInfo { - s.SkewedColumnNames = v - return s -} - -// SetSkewedColumnValueLocationMaps sets the SkewedColumnValueLocationMaps field's value. -func (s *SkewedInfo) SetSkewedColumnValueLocationMaps(v map[string]*string) *SkewedInfo { - s.SkewedColumnValueLocationMaps = v - return s -} - -// SetSkewedColumnValues sets the SkewedColumnValues field's value. -func (s *SkewedInfo) SetSkewedColumnValues(v []*string) *SkewedInfo { - s.SkewedColumnValues = v - return s -} - -type StartCrawlerInput struct { - _ struct{} `type:"structure"` - - // Name of the crawler to start. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartCrawlerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartCrawlerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartCrawlerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartCrawlerInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *StartCrawlerInput) SetName(v string) *StartCrawlerInput { - s.Name = &v - return s -} - -type StartCrawlerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StartCrawlerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartCrawlerOutput) GoString() string { - return s.String() -} - -type StartCrawlerScheduleInput struct { - _ struct{} `type:"structure"` - - // Name of the crawler to schedule. - // - // CrawlerName is a required field - CrawlerName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartCrawlerScheduleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartCrawlerScheduleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartCrawlerScheduleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartCrawlerScheduleInput"} - if s.CrawlerName == nil { - invalidParams.Add(request.NewErrParamRequired("CrawlerName")) - } - if s.CrawlerName != nil && len(*s.CrawlerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CrawlerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCrawlerName sets the CrawlerName field's value. -func (s *StartCrawlerScheduleInput) SetCrawlerName(v string) *StartCrawlerScheduleInput { - s.CrawlerName = &v - return s -} - -type StartCrawlerScheduleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StartCrawlerScheduleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartCrawlerScheduleOutput) GoString() string { - return s.String() -} - -type StartJobRunInput struct { - _ struct{} `type:"structure"` - - // This field is deprecated, use MaxCapacity instead. - // - // The number of AWS Glue data processing units (DPUs) to allocate to this JobRun. - // From 2 to 100 DPUs can be allocated; the default is 10. A DPU is a relative - // measure of processing power that consists of 4 vCPUs of compute capacity - // and 16 GB of memory. For more information, see the AWS Glue pricing page - // (https://aws.amazon.com/glue/pricing/). - // - // Deprecated: This property is deprecated, use MaxCapacity instead. - AllocatedCapacity *int64 `deprecated:"true" type:"integer"` - - // The job arguments specifically for this run. They override the equivalent - // default arguments set for in the job definition itself. - // - // You can specify arguments here that your own job-execution script consumes, - // as well as arguments that AWS Glue itself consumes. - // - // For information about how to specify and consume your own Job arguments, - // see the Calling AWS Glue APIs in Python (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html) - // topic in the developer guide. - // - // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) - // topic in the developer guide. - Arguments map[string]*string `type:"map"` - - // The name of the job definition to use. - // - // JobName is a required field - JobName *string `min:"1" type:"string" required:"true"` - - // The ID of a previous JobRun to retry. - JobRunId *string `min:"1" type:"string"` - - // AWS Glue supports running jobs on a JobCommand.Name="pythonshell" with allocated - // processing as low as 0.0625 DPU, which can be specified using MaxCapacity. - // Glue ETL jobs running in any other way cannot have fractional DPU allocations. - MaxCapacity *float64 `type:"double"` - - // Specifies configuration properties of a job run notification. - NotificationProperty *NotificationProperty `type:"structure"` - - // The name of the SecurityConfiguration structure to be used with this job - // run. - SecurityConfiguration *string `min:"1" type:"string"` - - // The JobRun timeout in minutes. This is the maximum time that a job run can - // consume resources before it is terminated and enters TIMEOUT status. The - // default is 2,880 minutes (48 hours). This overrides the timeout value set - // in the parent job. - Timeout *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s StartJobRunInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartJobRunInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartJobRunInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartJobRunInput"} - 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.JobRunId != nil && len(*s.JobRunId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobRunId", 1)) - } - if s.SecurityConfiguration != nil && len(*s.SecurityConfiguration) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityConfiguration", 1)) - } - if s.Timeout != nil && *s.Timeout < 1 { - invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) - } - if s.NotificationProperty != nil { - if err := s.NotificationProperty.Validate(); err != nil { - invalidParams.AddNested("NotificationProperty", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllocatedCapacity sets the AllocatedCapacity field's value. -func (s *StartJobRunInput) SetAllocatedCapacity(v int64) *StartJobRunInput { - s.AllocatedCapacity = &v - return s -} - -// SetArguments sets the Arguments field's value. -func (s *StartJobRunInput) SetArguments(v map[string]*string) *StartJobRunInput { - s.Arguments = v - return s -} - -// SetJobName sets the JobName field's value. -func (s *StartJobRunInput) SetJobName(v string) *StartJobRunInput { - s.JobName = &v - return s -} - -// SetJobRunId sets the JobRunId field's value. -func (s *StartJobRunInput) SetJobRunId(v string) *StartJobRunInput { - s.JobRunId = &v - return s -} - -// SetMaxCapacity sets the MaxCapacity field's value. -func (s *StartJobRunInput) SetMaxCapacity(v float64) *StartJobRunInput { - s.MaxCapacity = &v - return s -} - -// SetNotificationProperty sets the NotificationProperty field's value. -func (s *StartJobRunInput) SetNotificationProperty(v *NotificationProperty) *StartJobRunInput { - s.NotificationProperty = v - return s -} - -// SetSecurityConfiguration sets the SecurityConfiguration field's value. -func (s *StartJobRunInput) SetSecurityConfiguration(v string) *StartJobRunInput { - s.SecurityConfiguration = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *StartJobRunInput) SetTimeout(v int64) *StartJobRunInput { - s.Timeout = &v - return s -} - -type StartJobRunOutput struct { - _ struct{} `type:"structure"` - - // The ID assigned to this job run. - JobRunId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s StartJobRunOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartJobRunOutput) GoString() string { - return s.String() -} - -// SetJobRunId sets the JobRunId field's value. -func (s *StartJobRunOutput) SetJobRunId(v string) *StartJobRunOutput { - s.JobRunId = &v - return s -} - -type StartTriggerInput struct { - _ struct{} `type:"structure"` - - // The name of the trigger to start. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartTriggerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartTriggerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartTriggerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartTriggerInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *StartTriggerInput) SetName(v string) *StartTriggerInput { - s.Name = &v - return s -} - -type StartTriggerOutput struct { - _ struct{} `type:"structure"` - - // The name of the trigger that was started. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s StartTriggerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartTriggerOutput) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *StartTriggerOutput) SetName(v string) *StartTriggerOutput { - s.Name = &v - return s -} - -type StopCrawlerInput struct { - _ struct{} `type:"structure"` - - // Name of the crawler to stop. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopCrawlerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopCrawlerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopCrawlerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopCrawlerInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *StopCrawlerInput) SetName(v string) *StopCrawlerInput { - s.Name = &v - return s -} - -type StopCrawlerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopCrawlerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopCrawlerOutput) GoString() string { - return s.String() -} - -type StopCrawlerScheduleInput struct { - _ struct{} `type:"structure"` - - // Name of the crawler whose schedule state to set. - // - // CrawlerName is a required field - CrawlerName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopCrawlerScheduleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopCrawlerScheduleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopCrawlerScheduleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopCrawlerScheduleInput"} - if s.CrawlerName == nil { - invalidParams.Add(request.NewErrParamRequired("CrawlerName")) - } - if s.CrawlerName != nil && len(*s.CrawlerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CrawlerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCrawlerName sets the CrawlerName field's value. -func (s *StopCrawlerScheduleInput) SetCrawlerName(v string) *StopCrawlerScheduleInput { - s.CrawlerName = &v - return s -} - -type StopCrawlerScheduleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopCrawlerScheduleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopCrawlerScheduleOutput) GoString() string { - return s.String() -} - -type StopTriggerInput struct { - _ struct{} `type:"structure"` - - // The name of the trigger to stop. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopTriggerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopTriggerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopTriggerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopTriggerInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *StopTriggerInput) SetName(v string) *StopTriggerInput { - s.Name = &v - return s -} - -type StopTriggerOutput struct { - _ struct{} `type:"structure"` - - // The name of the trigger that was stopped. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s StopTriggerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopTriggerOutput) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *StopTriggerOutput) SetName(v string) *StopTriggerOutput { - s.Name = &v - return s -} - -// Describes the physical storage of table data. -type StorageDescriptor struct { - _ struct{} `type:"structure"` - - // A list of reducer grouping columns, clustering columns, and bucketing columns - // in the table. - BucketColumns []*string `type:"list"` - - // A list of the Columns in the table. - Columns []*Column `type:"list"` - - // True if the data in the table is compressed, or False if not. - Compressed *bool `type:"boolean"` - - // The input format: SequenceFileInputFormat (binary), or TextInputFormat, or - // a custom format. - InputFormat *string `type:"string"` - - // The physical location of the table. By default this takes the form of the - // warehouse location, followed by the database location in the warehouse, followed - // by the table name. - Location *string `type:"string"` - - // Must be specified if the table contains any dimension columns. - NumberOfBuckets *int64 `type:"integer"` - - // The output format: SequenceFileOutputFormat (binary), or IgnoreKeyTextOutputFormat, - // or a custom format. - OutputFormat *string `type:"string"` - - // User-supplied properties in key-value form. - Parameters map[string]*string `type:"map"` - - // Serialization/deserialization (SerDe) information. - SerdeInfo *SerDeInfo `type:"structure"` - - // Information about values that appear very frequently in a column (skewed - // values). - SkewedInfo *SkewedInfo `type:"structure"` - - // A list specifying the sort order of each bucket in the table. - SortColumns []*Order `type:"list"` - - // True if the table data is stored in subdirectories, or False if not. - StoredAsSubDirectories *bool `type:"boolean"` -} - -// String returns the string representation -func (s StorageDescriptor) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StorageDescriptor) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StorageDescriptor) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StorageDescriptor"} - if s.Columns != nil { - for i, v := range s.Columns { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Columns", i), err.(request.ErrInvalidParams)) - } - } - } - if s.SerdeInfo != nil { - if err := s.SerdeInfo.Validate(); err != nil { - invalidParams.AddNested("SerdeInfo", err.(request.ErrInvalidParams)) - } - } - if s.SortColumns != nil { - for i, v := range s.SortColumns { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SortColumns", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketColumns sets the BucketColumns field's value. -func (s *StorageDescriptor) SetBucketColumns(v []*string) *StorageDescriptor { - s.BucketColumns = v - return s -} - -// SetColumns sets the Columns field's value. -func (s *StorageDescriptor) SetColumns(v []*Column) *StorageDescriptor { - s.Columns = v - return s -} - -// SetCompressed sets the Compressed field's value. -func (s *StorageDescriptor) SetCompressed(v bool) *StorageDescriptor { - s.Compressed = &v - return s -} - -// SetInputFormat sets the InputFormat field's value. -func (s *StorageDescriptor) SetInputFormat(v string) *StorageDescriptor { - s.InputFormat = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *StorageDescriptor) SetLocation(v string) *StorageDescriptor { - s.Location = &v - return s -} - -// SetNumberOfBuckets sets the NumberOfBuckets field's value. -func (s *StorageDescriptor) SetNumberOfBuckets(v int64) *StorageDescriptor { - s.NumberOfBuckets = &v - return s -} - -// SetOutputFormat sets the OutputFormat field's value. -func (s *StorageDescriptor) SetOutputFormat(v string) *StorageDescriptor { - s.OutputFormat = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *StorageDescriptor) SetParameters(v map[string]*string) *StorageDescriptor { - s.Parameters = v - return s -} - -// SetSerdeInfo sets the SerdeInfo field's value. -func (s *StorageDescriptor) SetSerdeInfo(v *SerDeInfo) *StorageDescriptor { - s.SerdeInfo = v - return s -} - -// SetSkewedInfo sets the SkewedInfo field's value. -func (s *StorageDescriptor) SetSkewedInfo(v *SkewedInfo) *StorageDescriptor { - s.SkewedInfo = v - return s -} - -// SetSortColumns sets the SortColumns field's value. -func (s *StorageDescriptor) SetSortColumns(v []*Order) *StorageDescriptor { - s.SortColumns = v - return s -} - -// SetStoredAsSubDirectories sets the StoredAsSubDirectories field's value. -func (s *StorageDescriptor) SetStoredAsSubDirectories(v bool) *StorageDescriptor { - s.StoredAsSubDirectories = &v - return s -} - -// Represents a collection of related data organized in columns and rows. -type Table struct { - _ struct{} `type:"structure"` - - // Time when the table definition was created in the Data Catalog. - CreateTime *time.Time `type:"timestamp"` - - // Person or entity who created the table. - CreatedBy *string `min:"1" type:"string"` - - // Name of the metadata database where the table metadata resides. For Hive - // compatibility, this must be all lowercase. - DatabaseName *string `min:"1" type:"string"` - - // Description of the table. - Description *string `type:"string"` - - // Last time the table was accessed. This is usually taken from HDFS, and may - // not be reliable. - LastAccessTime *time.Time `type:"timestamp"` - - // Last time column statistics were computed for this table. - LastAnalyzedTime *time.Time `type:"timestamp"` - - // Name of the table. For Hive compatibility, this must be entirely lowercase. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // Owner of the table. - Owner *string `min:"1" type:"string"` - - // These key-value pairs define properties associated with the table. - Parameters map[string]*string `type:"map"` - - // A list of columns by which the table is partitioned. Only primitive types - // are supported as partition keys. - // - // When creating a table used by Athena, and you do not specify any partitionKeys, - // you must at least set the value of partitionKeys to an empty list. For example: - // - // "PartitionKeys": [] - PartitionKeys []*Column `type:"list"` - - // Retention time for this table. - Retention *int64 `type:"integer"` - - // A storage descriptor containing information about the physical storage of - // this table. - StorageDescriptor *StorageDescriptor `type:"structure"` - - // The type of this table (EXTERNAL_TABLE, VIRTUAL_VIEW, etc.). - TableType *string `type:"string"` - - // Last time the table was updated. - UpdateTime *time.Time `type:"timestamp"` - - // If the table is a view, the expanded text of the view; otherwise null. - ViewExpandedText *string `type:"string"` - - // If the table is a view, the original text of the view; otherwise null. - ViewOriginalText *string `type:"string"` -} - -// String returns the string representation -func (s Table) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Table) GoString() string { - return s.String() -} - -// SetCreateTime sets the CreateTime field's value. -func (s *Table) SetCreateTime(v time.Time) *Table { - s.CreateTime = &v - return s -} - -// SetCreatedBy sets the CreatedBy field's value. -func (s *Table) SetCreatedBy(v string) *Table { - s.CreatedBy = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *Table) SetDatabaseName(v string) *Table { - s.DatabaseName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Table) SetDescription(v string) *Table { - s.Description = &v - return s -} - -// SetLastAccessTime sets the LastAccessTime field's value. -func (s *Table) SetLastAccessTime(v time.Time) *Table { - s.LastAccessTime = &v - return s -} - -// SetLastAnalyzedTime sets the LastAnalyzedTime field's value. -func (s *Table) SetLastAnalyzedTime(v time.Time) *Table { - s.LastAnalyzedTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *Table) SetName(v string) *Table { - s.Name = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *Table) SetOwner(v string) *Table { - s.Owner = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *Table) SetParameters(v map[string]*string) *Table { - s.Parameters = v - return s -} - -// SetPartitionKeys sets the PartitionKeys field's value. -func (s *Table) SetPartitionKeys(v []*Column) *Table { - s.PartitionKeys = v - return s -} - -// SetRetention sets the Retention field's value. -func (s *Table) SetRetention(v int64) *Table { - s.Retention = &v - return s -} - -// SetStorageDescriptor sets the StorageDescriptor field's value. -func (s *Table) SetStorageDescriptor(v *StorageDescriptor) *Table { - s.StorageDescriptor = v - return s -} - -// SetTableType sets the TableType field's value. -func (s *Table) SetTableType(v string) *Table { - s.TableType = &v - return s -} - -// SetUpdateTime sets the UpdateTime field's value. -func (s *Table) SetUpdateTime(v time.Time) *Table { - s.UpdateTime = &v - return s -} - -// SetViewExpandedText sets the ViewExpandedText field's value. -func (s *Table) SetViewExpandedText(v string) *Table { - s.ViewExpandedText = &v - return s -} - -// SetViewOriginalText sets the ViewOriginalText field's value. -func (s *Table) SetViewOriginalText(v string) *Table { - s.ViewOriginalText = &v - return s -} - -// An error record for table operations. -type TableError struct { - _ struct{} `type:"structure"` - - // Detail about the error. - ErrorDetail *ErrorDetail `type:"structure"` - - // Name of the table. For Hive compatibility, this must be entirely lowercase. - TableName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s TableError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TableError) GoString() string { - return s.String() -} - -// SetErrorDetail sets the ErrorDetail field's value. -func (s *TableError) SetErrorDetail(v *ErrorDetail) *TableError { - s.ErrorDetail = v - return s -} - -// SetTableName sets the TableName field's value. -func (s *TableError) SetTableName(v string) *TableError { - s.TableName = &v - return s -} - -// Structure used to create or update the table. -type TableInput struct { - _ struct{} `type:"structure"` - - // Description of the table. - Description *string `type:"string"` - - // Last time the table was accessed. - LastAccessTime *time.Time `type:"timestamp"` - - // Last time column statistics were computed for this table. - LastAnalyzedTime *time.Time `type:"timestamp"` - - // Name of the table. For Hive compatibility, this is folded to lowercase when - // it is stored. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // Owner of the table. - Owner *string `min:"1" type:"string"` - - // These key-value pairs define properties associated with the table. - Parameters map[string]*string `type:"map"` - - // A list of columns by which the table is partitioned. Only primitive types - // are supported as partition keys. - // - // When creating a table used by Athena, and you do not specify any partitionKeys, - // you must at least set the value of partitionKeys to an empty list. For example: - // - // "PartitionKeys": [] - PartitionKeys []*Column `type:"list"` - - // Retention time for this table. - Retention *int64 `type:"integer"` - - // A storage descriptor containing information about the physical storage of - // this table. - StorageDescriptor *StorageDescriptor `type:"structure"` - - // The type of this table (EXTERNAL_TABLE, VIRTUAL_VIEW, etc.). - TableType *string `type:"string"` - - // If the table is a view, the expanded text of the view; otherwise null. - ViewExpandedText *string `type:"string"` - - // If the table is a view, the original text of the view; otherwise null. - ViewOriginalText *string `type:"string"` -} - -// String returns the string representation -func (s TableInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TableInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TableInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Owner != nil && len(*s.Owner) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Owner", 1)) - } - if s.PartitionKeys != nil { - for i, v := range s.PartitionKeys { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PartitionKeys", i), err.(request.ErrInvalidParams)) - } - } - } - if s.StorageDescriptor != nil { - if err := s.StorageDescriptor.Validate(); err != nil { - invalidParams.AddNested("StorageDescriptor", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *TableInput) SetDescription(v string) *TableInput { - s.Description = &v - return s -} - -// SetLastAccessTime sets the LastAccessTime field's value. -func (s *TableInput) SetLastAccessTime(v time.Time) *TableInput { - s.LastAccessTime = &v - return s -} - -// SetLastAnalyzedTime sets the LastAnalyzedTime field's value. -func (s *TableInput) SetLastAnalyzedTime(v time.Time) *TableInput { - s.LastAnalyzedTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *TableInput) SetName(v string) *TableInput { - s.Name = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *TableInput) SetOwner(v string) *TableInput { - s.Owner = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *TableInput) SetParameters(v map[string]*string) *TableInput { - s.Parameters = v - return s -} - -// SetPartitionKeys sets the PartitionKeys field's value. -func (s *TableInput) SetPartitionKeys(v []*Column) *TableInput { - s.PartitionKeys = v - return s -} - -// SetRetention sets the Retention field's value. -func (s *TableInput) SetRetention(v int64) *TableInput { - s.Retention = &v - return s -} - -// SetStorageDescriptor sets the StorageDescriptor field's value. -func (s *TableInput) SetStorageDescriptor(v *StorageDescriptor) *TableInput { - s.StorageDescriptor = v - return s -} - -// SetTableType sets the TableType field's value. -func (s *TableInput) SetTableType(v string) *TableInput { - s.TableType = &v - return s -} - -// SetViewExpandedText sets the ViewExpandedText field's value. -func (s *TableInput) SetViewExpandedText(v string) *TableInput { - s.ViewExpandedText = &v - return s -} - -// SetViewOriginalText sets the ViewOriginalText field's value. -func (s *TableInput) SetViewOriginalText(v string) *TableInput { - s.ViewOriginalText = &v - return s -} - -// Specifies a version of a table. -type TableVersion struct { - _ struct{} `type:"structure"` - - // The table in question - Table *Table `type:"structure"` - - // The ID value that identifies this table version. A VersionId is a string - // representation of an integer. Each version is incremented by 1. - VersionId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s TableVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TableVersion) GoString() string { - return s.String() -} - -// SetTable sets the Table field's value. -func (s *TableVersion) SetTable(v *Table) *TableVersion { - s.Table = v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *TableVersion) SetVersionId(v string) *TableVersion { - s.VersionId = &v - return s -} - -// An error record for table-version operations. -type TableVersionError struct { - _ struct{} `type:"structure"` - - // Detail about the error. - ErrorDetail *ErrorDetail `type:"structure"` - - // The name of the table in question. - TableName *string `min:"1" type:"string"` - - // The ID value of the version in question. A VersionID is a string representation - // of an integer. Each version is incremented by 1. - VersionId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s TableVersionError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TableVersionError) GoString() string { - return s.String() -} - -// SetErrorDetail sets the ErrorDetail field's value. -func (s *TableVersionError) SetErrorDetail(v *ErrorDetail) *TableVersionError { - s.ErrorDetail = v - return s -} - -// SetTableName sets the TableName field's value. -func (s *TableVersionError) SetTableName(v string) *TableVersionError { - s.TableName = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *TableVersionError) SetVersionId(v string) *TableVersionError { - s.VersionId = &v - return s -} - -// Information about a specific trigger. -type Trigger struct { - _ struct{} `type:"structure"` - - // The actions initiated by this trigger. - Actions []*Action `type:"list"` - - // A description of this trigger. - Description *string `type:"string"` - - // Reserved for future use. - Id *string `min:"1" type:"string"` - - // Name of the trigger. - Name *string `min:"1" type:"string"` - - // The predicate of this trigger, which defines when it will fire. - Predicate *Predicate `type:"structure"` - - // A cron expression used to specify the schedule (see Time-Based Schedules - // for Jobs and Crawlers (http://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 * * ? *). - Schedule *string `type:"string"` - - // The current state of the trigger. - State *string `type:"string" enum:"TriggerState"` - - // The type of trigger that this is. - Type *string `type:"string" enum:"TriggerType"` -} - -// String returns the string representation -func (s Trigger) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Trigger) GoString() string { - return s.String() -} - -// SetActions sets the Actions field's value. -func (s *Trigger) SetActions(v []*Action) *Trigger { - s.Actions = v - return s -} - -// SetDescription sets the Description field's value. -func (s *Trigger) SetDescription(v string) *Trigger { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *Trigger) SetId(v string) *Trigger { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *Trigger) SetName(v string) *Trigger { - s.Name = &v - return s -} - -// SetPredicate sets the Predicate field's value. -func (s *Trigger) SetPredicate(v *Predicate) *Trigger { - s.Predicate = v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *Trigger) SetSchedule(v string) *Trigger { - s.Schedule = &v - return s -} - -// SetState sets the State field's value. -func (s *Trigger) SetState(v string) *Trigger { - s.State = &v - return s -} - -// SetType sets the Type field's value. -func (s *Trigger) SetType(v string) *Trigger { - s.Type = &v - return s -} - -// A structure used to provide information used to update a trigger. This object -// will update the the previous trigger definition by overwriting it completely. -type TriggerUpdate struct { - _ struct{} `type:"structure"` - - // The actions initiated by this trigger. - Actions []*Action `type:"list"` - - // A description of this trigger. - Description *string `type:"string"` - - // Reserved for future use. - Name *string `min:"1" type:"string"` - - // The predicate of this trigger, which defines when it will fire. - Predicate *Predicate `type:"structure"` - - // A cron expression used to specify the schedule (see Time-Based Schedules - // for Jobs and Crawlers (http://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 * * ? *). - Schedule *string `type:"string"` -} - -// String returns the string representation -func (s TriggerUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TriggerUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TriggerUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TriggerUpdate"} - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Actions != nil { - for i, v := range s.Actions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Actions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Predicate != nil { - if err := s.Predicate.Validate(); err != nil { - invalidParams.AddNested("Predicate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActions sets the Actions field's value. -func (s *TriggerUpdate) SetActions(v []*Action) *TriggerUpdate { - s.Actions = v - return s -} - -// SetDescription sets the Description field's value. -func (s *TriggerUpdate) SetDescription(v string) *TriggerUpdate { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *TriggerUpdate) SetName(v string) *TriggerUpdate { - s.Name = &v - return s -} - -// SetPredicate sets the Predicate field's value. -func (s *TriggerUpdate) SetPredicate(v *Predicate) *TriggerUpdate { - s.Predicate = v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *TriggerUpdate) SetSchedule(v string) *TriggerUpdate { - s.Schedule = &v - return s -} - -type UpdateClassifierInput struct { - _ struct{} `type:"structure"` - - // A GrokClassifier object with updated fields. - GrokClassifier *UpdateGrokClassifierRequest `type:"structure"` - - // A JsonClassifier object with updated fields. - JsonClassifier *UpdateJsonClassifierRequest `type:"structure"` - - // An XMLClassifier object with updated fields. - XMLClassifier *UpdateXMLClassifierRequest `type:"structure"` -} - -// String returns the string representation -func (s UpdateClassifierInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateClassifierInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateClassifierInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateClassifierInput"} - if s.GrokClassifier != nil { - if err := s.GrokClassifier.Validate(); err != nil { - invalidParams.AddNested("GrokClassifier", err.(request.ErrInvalidParams)) - } - } - if s.JsonClassifier != nil { - if err := s.JsonClassifier.Validate(); err != nil { - invalidParams.AddNested("JsonClassifier", err.(request.ErrInvalidParams)) - } - } - if s.XMLClassifier != nil { - if err := s.XMLClassifier.Validate(); err != nil { - invalidParams.AddNested("XMLClassifier", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGrokClassifier sets the GrokClassifier field's value. -func (s *UpdateClassifierInput) SetGrokClassifier(v *UpdateGrokClassifierRequest) *UpdateClassifierInput { - s.GrokClassifier = v - return s -} - -// SetJsonClassifier sets the JsonClassifier field's value. -func (s *UpdateClassifierInput) SetJsonClassifier(v *UpdateJsonClassifierRequest) *UpdateClassifierInput { - s.JsonClassifier = v - return s -} - -// SetXMLClassifier sets the XMLClassifier field's value. -func (s *UpdateClassifierInput) SetXMLClassifier(v *UpdateXMLClassifierRequest) *UpdateClassifierInput { - s.XMLClassifier = v - return s -} - -type UpdateClassifierOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateClassifierOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateClassifierOutput) GoString() string { - return s.String() -} - -type UpdateConnectionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog in which the connection resides. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // A ConnectionInput object that redefines the connection in question. - // - // ConnectionInput is a required field - ConnectionInput *ConnectionInput `type:"structure" required:"true"` - - // The name of the connection definition to update. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateConnectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConnectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateConnectionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.ConnectionInput == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionInput")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.ConnectionInput != nil { - if err := s.ConnectionInput.Validate(); err != nil { - invalidParams.AddNested("ConnectionInput", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *UpdateConnectionInput) SetCatalogId(v string) *UpdateConnectionInput { - s.CatalogId = &v - return s -} - -// SetConnectionInput sets the ConnectionInput field's value. -func (s *UpdateConnectionInput) SetConnectionInput(v *ConnectionInput) *UpdateConnectionInput { - s.ConnectionInput = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateConnectionInput) SetName(v string) *UpdateConnectionInput { - s.Name = &v - return s -} - -type UpdateConnectionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateConnectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConnectionOutput) GoString() string { - return s.String() -} - -type UpdateCrawlerInput struct { - _ struct{} `type:"structure"` - - // A list of custom classifiers that the user has registered. By default, all - // built-in classifiers are included in a crawl, but these custom classifiers - // always override the default classifiers for a given classification. - Classifiers []*string `type:"list"` - - // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a crawler's behavior. For more information, see Configuring - // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). - Configuration *string `type:"string"` - - // The name of the SecurityConfiguration structure to be used by this Crawler. - CrawlerSecurityConfiguration *string `type:"string"` - - // The AWS Glue database where results are stored, such as: arn:aws:daylight:us-east-1::database/sometable/*. - DatabaseName *string `type:"string"` - - // A description of the new crawler. - Description *string `type:"string"` - - // Name of the new crawler. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The IAM role (or ARN of an IAM role) used by the new crawler to access customer - // resources. - Role *string `type:"string"` - - // A cron expression used to specify the schedule (see Time-Based Schedules - // for Jobs and Crawlers (http://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 * * ? *). - Schedule *string `type:"string"` - - // Policy for the crawler's update and deletion behavior. - SchemaChangePolicy *SchemaChangePolicy `type:"structure"` - - // The table prefix used for catalog tables that are created. - TablePrefix *string `type:"string"` - - // A list of targets to crawl. - Targets *CrawlerTargets `type:"structure"` -} - -// String returns the string representation -func (s UpdateCrawlerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCrawlerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCrawlerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCrawlerInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClassifiers sets the Classifiers field's value. -func (s *UpdateCrawlerInput) SetClassifiers(v []*string) *UpdateCrawlerInput { - s.Classifiers = v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *UpdateCrawlerInput) SetConfiguration(v string) *UpdateCrawlerInput { - s.Configuration = &v - return s -} - -// SetCrawlerSecurityConfiguration sets the CrawlerSecurityConfiguration field's value. -func (s *UpdateCrawlerInput) SetCrawlerSecurityConfiguration(v string) *UpdateCrawlerInput { - s.CrawlerSecurityConfiguration = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *UpdateCrawlerInput) SetDatabaseName(v string) *UpdateCrawlerInput { - s.DatabaseName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateCrawlerInput) SetDescription(v string) *UpdateCrawlerInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateCrawlerInput) SetName(v string) *UpdateCrawlerInput { - s.Name = &v - return s -} - -// SetRole sets the Role field's value. -func (s *UpdateCrawlerInput) SetRole(v string) *UpdateCrawlerInput { - s.Role = &v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *UpdateCrawlerInput) SetSchedule(v string) *UpdateCrawlerInput { - s.Schedule = &v - return s -} - -// SetSchemaChangePolicy sets the SchemaChangePolicy field's value. -func (s *UpdateCrawlerInput) SetSchemaChangePolicy(v *SchemaChangePolicy) *UpdateCrawlerInput { - s.SchemaChangePolicy = v - return s -} - -// SetTablePrefix sets the TablePrefix field's value. -func (s *UpdateCrawlerInput) SetTablePrefix(v string) *UpdateCrawlerInput { - s.TablePrefix = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *UpdateCrawlerInput) SetTargets(v *CrawlerTargets) *UpdateCrawlerInput { - s.Targets = v - return s -} - -type UpdateCrawlerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateCrawlerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCrawlerOutput) GoString() string { - return s.String() -} - -type UpdateCrawlerScheduleInput struct { - _ struct{} `type:"structure"` - - // Name of the crawler whose schedule to update. - // - // CrawlerName is a required field - CrawlerName *string `min:"1" type:"string" required:"true"` - - // The updated cron expression used to specify the schedule (see Time-Based - // Schedules for Jobs and Crawlers (http://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 * * ? *). - Schedule *string `type:"string"` -} - -// String returns the string representation -func (s UpdateCrawlerScheduleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCrawlerScheduleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCrawlerScheduleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCrawlerScheduleInput"} - if s.CrawlerName == nil { - invalidParams.Add(request.NewErrParamRequired("CrawlerName")) - } - if s.CrawlerName != nil && len(*s.CrawlerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CrawlerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCrawlerName sets the CrawlerName field's value. -func (s *UpdateCrawlerScheduleInput) SetCrawlerName(v string) *UpdateCrawlerScheduleInput { - s.CrawlerName = &v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *UpdateCrawlerScheduleInput) SetSchedule(v string) *UpdateCrawlerScheduleInput { - s.Schedule = &v - return s -} - -type UpdateCrawlerScheduleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateCrawlerScheduleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCrawlerScheduleOutput) GoString() string { - return s.String() -} - -type UpdateDatabaseInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog in which the metadata database resides. If none - // is supplied, the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // A DatabaseInput object specifying the new definition of the metadata database - // in the catalog. - // - // DatabaseInput is a required field - DatabaseInput *DatabaseInput `type:"structure" required:"true"` - - // The name of the database to update in the catalog. For Hive compatibility, - // this is folded to lowercase. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateDatabaseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDatabaseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDatabaseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDatabaseInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseInput == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseInput")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.DatabaseInput != nil { - if err := s.DatabaseInput.Validate(); err != nil { - invalidParams.AddNested("DatabaseInput", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *UpdateDatabaseInput) SetCatalogId(v string) *UpdateDatabaseInput { - s.CatalogId = &v - return s -} - -// SetDatabaseInput sets the DatabaseInput field's value. -func (s *UpdateDatabaseInput) SetDatabaseInput(v *DatabaseInput) *UpdateDatabaseInput { - s.DatabaseInput = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateDatabaseInput) SetName(v string) *UpdateDatabaseInput { - s.Name = &v - return s -} - -type UpdateDatabaseOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateDatabaseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDatabaseOutput) GoString() string { - return s.String() -} - -type UpdateDevEndpointInput struct { - _ struct{} `type:"structure"` - - // The list of public keys for the DevEndpoint to use. - AddPublicKeys []*string `type:"list"` - - // Custom Python or Java libraries to be loaded in the DevEndpoint. - CustomLibraries *DevEndpointCustomLibraries `type:"structure"` - - // The list of public keys to be deleted from the DevEndpoint. - DeletePublicKeys []*string `type:"list"` - - // The name of the DevEndpoint to be updated. - // - // EndpointName is a required field - EndpointName *string `type:"string" required:"true"` - - // The public key for the DevEndpoint to use. - PublicKey *string `type:"string"` - - // True if the list of custom libraries to be loaded in the development endpoint - // needs to be updated, or False otherwise. - UpdateEtlLibraries *bool `type:"boolean"` -} - -// String returns the string representation -func (s UpdateDevEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDevEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDevEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDevEndpointInput"} - if s.EndpointName == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddPublicKeys sets the AddPublicKeys field's value. -func (s *UpdateDevEndpointInput) SetAddPublicKeys(v []*string) *UpdateDevEndpointInput { - s.AddPublicKeys = v - return s -} - -// SetCustomLibraries sets the CustomLibraries field's value. -func (s *UpdateDevEndpointInput) SetCustomLibraries(v *DevEndpointCustomLibraries) *UpdateDevEndpointInput { - s.CustomLibraries = v - return s -} - -// SetDeletePublicKeys sets the DeletePublicKeys field's value. -func (s *UpdateDevEndpointInput) SetDeletePublicKeys(v []*string) *UpdateDevEndpointInput { - s.DeletePublicKeys = v - return s -} - -// SetEndpointName sets the EndpointName field's value. -func (s *UpdateDevEndpointInput) SetEndpointName(v string) *UpdateDevEndpointInput { - s.EndpointName = &v - return s -} - -// SetPublicKey sets the PublicKey field's value. -func (s *UpdateDevEndpointInput) SetPublicKey(v string) *UpdateDevEndpointInput { - s.PublicKey = &v - return s -} - -// SetUpdateEtlLibraries sets the UpdateEtlLibraries field's value. -func (s *UpdateDevEndpointInput) SetUpdateEtlLibraries(v bool) *UpdateDevEndpointInput { - s.UpdateEtlLibraries = &v - return s -} - -type UpdateDevEndpointOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateDevEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDevEndpointOutput) GoString() string { - return s.String() -} - -// Specifies a grok classifier to update when passed to UpdateClassifier. -type UpdateGrokClassifierRequest struct { - _ struct{} `type:"structure"` - - // An identifier of the data format that the classifier matches, such as Twitter, - // JSON, Omniture logs, Amazon CloudWatch Logs, and so on. - Classification *string `type:"string"` - - // Optional custom grok patterns used by this classifier. - CustomPatterns *string `type:"string"` - - // The grok pattern used by this classifier. - GrokPattern *string `min:"1" type:"string"` - - // The name of the GrokClassifier. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateGrokClassifierRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGrokClassifierRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateGrokClassifierRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateGrokClassifierRequest"} - if s.GrokPattern != nil && len(*s.GrokPattern) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GrokPattern", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClassification sets the Classification field's value. -func (s *UpdateGrokClassifierRequest) SetClassification(v string) *UpdateGrokClassifierRequest { - s.Classification = &v - return s -} - -// SetCustomPatterns sets the CustomPatterns field's value. -func (s *UpdateGrokClassifierRequest) SetCustomPatterns(v string) *UpdateGrokClassifierRequest { - s.CustomPatterns = &v - return s -} - -// SetGrokPattern sets the GrokPattern field's value. -func (s *UpdateGrokClassifierRequest) SetGrokPattern(v string) *UpdateGrokClassifierRequest { - s.GrokPattern = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateGrokClassifierRequest) SetName(v string) *UpdateGrokClassifierRequest { - s.Name = &v - return s -} - -type UpdateJobInput struct { - _ struct{} `type:"structure"` - - // Name of the job definition to update. - // - // JobName is a required field - JobName *string `min:"1" type:"string" required:"true"` - - // Specifies the values with which to update the job definition. - // - // JobUpdate is a required field - JobUpdate *JobUpdate `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateJobInput"} - 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.JobUpdate == nil { - invalidParams.Add(request.NewErrParamRequired("JobUpdate")) - } - if s.JobUpdate != nil { - if err := s.JobUpdate.Validate(); err != nil { - invalidParams.AddNested("JobUpdate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobName sets the JobName field's value. -func (s *UpdateJobInput) SetJobName(v string) *UpdateJobInput { - s.JobName = &v - return s -} - -// SetJobUpdate sets the JobUpdate field's value. -func (s *UpdateJobInput) SetJobUpdate(v *JobUpdate) *UpdateJobInput { - s.JobUpdate = v - return s -} - -type UpdateJobOutput struct { - _ struct{} `type:"structure"` - - // Returns the name of the updated job definition. - JobName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateJobOutput) GoString() string { - return s.String() -} - -// SetJobName sets the JobName field's value. -func (s *UpdateJobOutput) SetJobName(v string) *UpdateJobOutput { - s.JobName = &v - return s -} - -// Specifies a JSON classifier to be updated. -type UpdateJsonClassifierRequest struct { - _ struct{} `type:"structure"` - - // A JsonPath string defining the JSON data for the classifier to classify. - // AWS Glue supports a subset of JsonPath, as described in Writing JsonPath - // Custom Classifiers (https://docs.aws.amazon.com/glue/latest/dg/custom-classifier.html#custom-classifier-json). - JsonPath *string `type:"string"` - - // The name of the classifier. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateJsonClassifierRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateJsonClassifierRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateJsonClassifierRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateJsonClassifierRequest"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJsonPath sets the JsonPath field's value. -func (s *UpdateJsonClassifierRequest) SetJsonPath(v string) *UpdateJsonClassifierRequest { - s.JsonPath = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateJsonClassifierRequest) SetName(v string) *UpdateJsonClassifierRequest { - s.Name = &v - return s -} - -type UpdatePartitionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the partition to be updated resides. If - // none is supplied, the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the catalog database in which the table in question resides. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // The new partition object to which to update the partition. - // - // PartitionInput is a required field - PartitionInput *PartitionInput `type:"structure" required:"true"` - - // A list of the values defining the partition. - // - // PartitionValueList is a required field - PartitionValueList []*string `type:"list" required:"true"` - - // The name of the table where the partition to be updated is located. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdatePartitionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePartitionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdatePartitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdatePartitionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.PartitionInput == nil { - invalidParams.Add(request.NewErrParamRequired("PartitionInput")) - } - if s.PartitionValueList == nil { - invalidParams.Add(request.NewErrParamRequired("PartitionValueList")) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - if s.TableName != nil && len(*s.TableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) - } - if s.PartitionInput != nil { - if err := s.PartitionInput.Validate(); err != nil { - invalidParams.AddNested("PartitionInput", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *UpdatePartitionInput) SetCatalogId(v string) *UpdatePartitionInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *UpdatePartitionInput) SetDatabaseName(v string) *UpdatePartitionInput { - s.DatabaseName = &v - return s -} - -// SetPartitionInput sets the PartitionInput field's value. -func (s *UpdatePartitionInput) SetPartitionInput(v *PartitionInput) *UpdatePartitionInput { - s.PartitionInput = v - return s -} - -// SetPartitionValueList sets the PartitionValueList field's value. -func (s *UpdatePartitionInput) SetPartitionValueList(v []*string) *UpdatePartitionInput { - s.PartitionValueList = v - return s -} - -// SetTableName sets the TableName field's value. -func (s *UpdatePartitionInput) SetTableName(v string) *UpdatePartitionInput { - s.TableName = &v - return s -} - -type UpdatePartitionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdatePartitionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePartitionOutput) GoString() string { - return s.String() -} - -type UpdateTableInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the table resides. If none is supplied, - // the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the catalog database in which the table resides. For Hive compatibility, - // this name is entirely lowercase. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // By default, UpdateTable always creates an archived version of the table before - // updating it. If skipArchive is set to true, however, UpdateTable does not - // create the archived version. - SkipArchive *bool `type:"boolean"` - - // An updated TableInput object to define the metadata table in the catalog. - // - // TableInput is a required field - TableInput *TableInput `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateTableInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTableInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateTableInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.TableInput == nil { - invalidParams.Add(request.NewErrParamRequired("TableInput")) - } - if s.TableInput != nil { - if err := s.TableInput.Validate(); err != nil { - invalidParams.AddNested("TableInput", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *UpdateTableInput) SetCatalogId(v string) *UpdateTableInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *UpdateTableInput) SetDatabaseName(v string) *UpdateTableInput { - s.DatabaseName = &v - return s -} - -// SetSkipArchive sets the SkipArchive field's value. -func (s *UpdateTableInput) SetSkipArchive(v bool) *UpdateTableInput { - s.SkipArchive = &v - return s -} - -// SetTableInput sets the TableInput field's value. -func (s *UpdateTableInput) SetTableInput(v *TableInput) *UpdateTableInput { - s.TableInput = v - return s -} - -type UpdateTableOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateTableOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTableOutput) GoString() string { - return s.String() -} - -type UpdateTriggerInput struct { - _ struct{} `type:"structure"` - - // The name of the trigger to update. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The new values with which to update the trigger. - // - // TriggerUpdate is a required field - TriggerUpdate *TriggerUpdate `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateTriggerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTriggerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateTriggerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateTriggerInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.TriggerUpdate == nil { - invalidParams.Add(request.NewErrParamRequired("TriggerUpdate")) - } - if s.TriggerUpdate != nil { - if err := s.TriggerUpdate.Validate(); err != nil { - invalidParams.AddNested("TriggerUpdate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *UpdateTriggerInput) SetName(v string) *UpdateTriggerInput { - s.Name = &v - return s -} - -// SetTriggerUpdate sets the TriggerUpdate field's value. -func (s *UpdateTriggerInput) SetTriggerUpdate(v *TriggerUpdate) *UpdateTriggerInput { - s.TriggerUpdate = v - return s -} - -type UpdateTriggerOutput struct { - _ struct{} `type:"structure"` - - // The resulting trigger definition. - Trigger *Trigger `type:"structure"` -} - -// String returns the string representation -func (s UpdateTriggerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTriggerOutput) GoString() string { - return s.String() -} - -// SetTrigger sets the Trigger field's value. -func (s *UpdateTriggerOutput) SetTrigger(v *Trigger) *UpdateTriggerOutput { - s.Trigger = v - return s -} - -type UpdateUserDefinedFunctionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Data Catalog where the function to be updated is located. If - // none is supplied, the AWS account ID is used by default. - CatalogId *string `min:"1" type:"string"` - - // The name of the catalog database where the function to be updated is located. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` - - // A FunctionInput object that re-defines the function in the Data Catalog. - // - // FunctionInput is a required field - FunctionInput *UserDefinedFunctionInput `type:"structure" required:"true"` - - // The name of the function. - // - // FunctionName is a required field - FunctionName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateUserDefinedFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserDefinedFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateUserDefinedFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateUserDefinedFunctionInput"} - if s.CatalogId != nil && len(*s.CatalogId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) - } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } - if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) - } - if s.FunctionInput == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionInput")) - } - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.FunctionInput != nil { - if err := s.FunctionInput.Validate(); err != nil { - invalidParams.AddNested("FunctionInput", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCatalogId sets the CatalogId field's value. -func (s *UpdateUserDefinedFunctionInput) SetCatalogId(v string) *UpdateUserDefinedFunctionInput { - s.CatalogId = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *UpdateUserDefinedFunctionInput) SetDatabaseName(v string) *UpdateUserDefinedFunctionInput { - s.DatabaseName = &v - return s -} - -// SetFunctionInput sets the FunctionInput field's value. -func (s *UpdateUserDefinedFunctionInput) SetFunctionInput(v *UserDefinedFunctionInput) *UpdateUserDefinedFunctionInput { - s.FunctionInput = v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *UpdateUserDefinedFunctionInput) SetFunctionName(v string) *UpdateUserDefinedFunctionInput { - s.FunctionName = &v - return s -} - -type UpdateUserDefinedFunctionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateUserDefinedFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserDefinedFunctionOutput) GoString() string { - return s.String() -} - -// Specifies an XML classifier to be updated. -type UpdateXMLClassifierRequest struct { - _ struct{} `type:"structure"` - - // An identifier of the data format that the classifier matches. - Classification *string `type:"string"` - - // The name of the classifier. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The XML tag designating the element that contains each record in an XML document - // being parsed. Note that this cannot identify a self-closing element (closed - // by />). An empty row element that contains only attributes can be parsed - // as long as it ends with a closing tag (for example, - // is okay, but is not). - RowTag *string `type:"string"` -} - -// String returns the string representation -func (s UpdateXMLClassifierRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateXMLClassifierRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateXMLClassifierRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateXMLClassifierRequest"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClassification sets the Classification field's value. -func (s *UpdateXMLClassifierRequest) SetClassification(v string) *UpdateXMLClassifierRequest { - s.Classification = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateXMLClassifierRequest) SetName(v string) *UpdateXMLClassifierRequest { - s.Name = &v - return s -} - -// SetRowTag sets the RowTag field's value. -func (s *UpdateXMLClassifierRequest) SetRowTag(v string) *UpdateXMLClassifierRequest { - s.RowTag = &v - return s -} - -// Represents the equivalent of a Hive user-defined function (UDF) definition. -type UserDefinedFunction struct { - _ struct{} `type:"structure"` - - // The Java class that contains the function code. - ClassName *string `min:"1" type:"string"` - - // The time at which the function was created. - CreateTime *time.Time `type:"timestamp"` - - // The name of the function. - FunctionName *string `min:"1" type:"string"` - - // The owner of the function. - OwnerName *string `min:"1" type:"string"` - - // The owner type. - OwnerType *string `type:"string" enum:"PrincipalType"` - - // The resource URIs for the function. - ResourceUris []*ResourceUri `type:"list"` -} - -// String returns the string representation -func (s UserDefinedFunction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserDefinedFunction) GoString() string { - return s.String() -} - -// SetClassName sets the ClassName field's value. -func (s *UserDefinedFunction) SetClassName(v string) *UserDefinedFunction { - s.ClassName = &v - return s -} - -// SetCreateTime sets the CreateTime field's value. -func (s *UserDefinedFunction) SetCreateTime(v time.Time) *UserDefinedFunction { - s.CreateTime = &v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *UserDefinedFunction) SetFunctionName(v string) *UserDefinedFunction { - s.FunctionName = &v - return s -} - -// SetOwnerName sets the OwnerName field's value. -func (s *UserDefinedFunction) SetOwnerName(v string) *UserDefinedFunction { - s.OwnerName = &v - return s -} - -// SetOwnerType sets the OwnerType field's value. -func (s *UserDefinedFunction) SetOwnerType(v string) *UserDefinedFunction { - s.OwnerType = &v - return s -} - -// SetResourceUris sets the ResourceUris field's value. -func (s *UserDefinedFunction) SetResourceUris(v []*ResourceUri) *UserDefinedFunction { - s.ResourceUris = v - return s -} - -// A structure used to create or updata a user-defined function. -type UserDefinedFunctionInput struct { - _ struct{} `type:"structure"` - - // The Java class that contains the function code. - ClassName *string `min:"1" type:"string"` - - // The name of the function. - FunctionName *string `min:"1" type:"string"` - - // The owner of the function. - OwnerName *string `min:"1" type:"string"` - - // The owner type. - OwnerType *string `type:"string" enum:"PrincipalType"` - - // The resource URIs for the function. - ResourceUris []*ResourceUri `type:"list"` -} - -// String returns the string representation -func (s UserDefinedFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserDefinedFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UserDefinedFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UserDefinedFunctionInput"} - if s.ClassName != nil && len(*s.ClassName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClassName", 1)) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.OwnerName != nil && len(*s.OwnerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OwnerName", 1)) - } - if s.ResourceUris != nil { - for i, v := range s.ResourceUris { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceUris", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClassName sets the ClassName field's value. -func (s *UserDefinedFunctionInput) SetClassName(v string) *UserDefinedFunctionInput { - s.ClassName = &v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *UserDefinedFunctionInput) SetFunctionName(v string) *UserDefinedFunctionInput { - s.FunctionName = &v - return s -} - -// SetOwnerName sets the OwnerName field's value. -func (s *UserDefinedFunctionInput) SetOwnerName(v string) *UserDefinedFunctionInput { - s.OwnerName = &v - return s -} - -// SetOwnerType sets the OwnerType field's value. -func (s *UserDefinedFunctionInput) SetOwnerType(v string) *UserDefinedFunctionInput { - s.OwnerType = &v - return s -} - -// SetResourceUris sets the ResourceUris field's value. -func (s *UserDefinedFunctionInput) SetResourceUris(v []*ResourceUri) *UserDefinedFunctionInput { - s.ResourceUris = v - return s -} - -// A classifier for XML content. -type XMLClassifier struct { - _ struct{} `type:"structure"` - - // An identifier of the data format that the classifier matches. - // - // Classification is a required field - Classification *string `type:"string" required:"true"` - - // The time this classifier was registered. - CreationTime *time.Time `type:"timestamp"` - - // The time this classifier was last updated. - LastUpdated *time.Time `type:"timestamp"` - - // The name of the classifier. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The XML tag designating the element that contains each record in an XML document - // being parsed. Note that this cannot identify a self-closing element (closed - // by />). An empty row element that contains only attributes can be parsed - // as long as it ends with a closing tag (for example, - // is okay, but is not). - RowTag *string `type:"string"` - - // The version of this classifier. - Version *int64 `type:"long"` -} - -// String returns the string representation -func (s XMLClassifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s XMLClassifier) GoString() string { - return s.String() -} - -// SetClassification sets the Classification field's value. -func (s *XMLClassifier) SetClassification(v string) *XMLClassifier { - s.Classification = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *XMLClassifier) SetCreationTime(v time.Time) *XMLClassifier { - s.CreationTime = &v - return s -} - -// SetLastUpdated sets the LastUpdated field's value. -func (s *XMLClassifier) SetLastUpdated(v time.Time) *XMLClassifier { - s.LastUpdated = &v - return s -} - -// SetName sets the Name field's value. -func (s *XMLClassifier) SetName(v string) *XMLClassifier { - s.Name = &v - return s -} - -// SetRowTag sets the RowTag field's value. -func (s *XMLClassifier) SetRowTag(v string) *XMLClassifier { - s.RowTag = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *XMLClassifier) SetVersion(v int64) *XMLClassifier { - s.Version = &v - return s -} - -const ( - // CatalogEncryptionModeDisabled is a CatalogEncryptionMode enum value - CatalogEncryptionModeDisabled = "DISABLED" - - // CatalogEncryptionModeSseKms is a CatalogEncryptionMode enum value - CatalogEncryptionModeSseKms = "SSE-KMS" -) - -const ( - // CloudWatchEncryptionModeDisabled is a CloudWatchEncryptionMode enum value - CloudWatchEncryptionModeDisabled = "DISABLED" - - // CloudWatchEncryptionModeSseKms is a CloudWatchEncryptionMode enum value - CloudWatchEncryptionModeSseKms = "SSE-KMS" -) - -const ( - // ConnectionPropertyKeyHost is a ConnectionPropertyKey enum value - ConnectionPropertyKeyHost = "HOST" - - // ConnectionPropertyKeyPort is a ConnectionPropertyKey enum value - ConnectionPropertyKeyPort = "PORT" - - // ConnectionPropertyKeyUsername is a ConnectionPropertyKey enum value - ConnectionPropertyKeyUsername = "USERNAME" - - // ConnectionPropertyKeyPassword is a ConnectionPropertyKey enum value - ConnectionPropertyKeyPassword = "PASSWORD" - - // ConnectionPropertyKeyEncryptedPassword is a ConnectionPropertyKey enum value - ConnectionPropertyKeyEncryptedPassword = "ENCRYPTED_PASSWORD" - - // ConnectionPropertyKeyJdbcDriverJarUri is a ConnectionPropertyKey enum value - ConnectionPropertyKeyJdbcDriverJarUri = "JDBC_DRIVER_JAR_URI" - - // ConnectionPropertyKeyJdbcDriverClassName is a ConnectionPropertyKey enum value - ConnectionPropertyKeyJdbcDriverClassName = "JDBC_DRIVER_CLASS_NAME" - - // ConnectionPropertyKeyJdbcEngine is a ConnectionPropertyKey enum value - ConnectionPropertyKeyJdbcEngine = "JDBC_ENGINE" - - // ConnectionPropertyKeyJdbcEngineVersion is a ConnectionPropertyKey enum value - ConnectionPropertyKeyJdbcEngineVersion = "JDBC_ENGINE_VERSION" - - // ConnectionPropertyKeyConfigFiles is a ConnectionPropertyKey enum value - ConnectionPropertyKeyConfigFiles = "CONFIG_FILES" - - // ConnectionPropertyKeyInstanceId is a ConnectionPropertyKey enum value - ConnectionPropertyKeyInstanceId = "INSTANCE_ID" - - // ConnectionPropertyKeyJdbcConnectionUrl is a ConnectionPropertyKey enum value - ConnectionPropertyKeyJdbcConnectionUrl = "JDBC_CONNECTION_URL" - - // ConnectionPropertyKeyJdbcEnforceSsl is a ConnectionPropertyKey enum value - ConnectionPropertyKeyJdbcEnforceSsl = "JDBC_ENFORCE_SSL" -) - -const ( - // ConnectionTypeJdbc is a ConnectionType enum value - ConnectionTypeJdbc = "JDBC" - - // ConnectionTypeSftp is a ConnectionType enum value - ConnectionTypeSftp = "SFTP" -) - -const ( - // CrawlerStateReady is a CrawlerState enum value - CrawlerStateReady = "READY" - - // CrawlerStateRunning is a CrawlerState enum value - CrawlerStateRunning = "RUNNING" - - // CrawlerStateStopping is a CrawlerState enum value - CrawlerStateStopping = "STOPPING" -) - -const ( - // DeleteBehaviorLog is a DeleteBehavior enum value - DeleteBehaviorLog = "LOG" - - // DeleteBehaviorDeleteFromDatabase is a DeleteBehavior enum value - DeleteBehaviorDeleteFromDatabase = "DELETE_FROM_DATABASE" - - // DeleteBehaviorDeprecateInDatabase is a DeleteBehavior enum value - DeleteBehaviorDeprecateInDatabase = "DEPRECATE_IN_DATABASE" -) - -const ( - // ExistConditionMustExist is a ExistCondition enum value - ExistConditionMustExist = "MUST_EXIST" - - // ExistConditionNotExist is a ExistCondition enum value - ExistConditionNotExist = "NOT_EXIST" - - // ExistConditionNone is a ExistCondition enum value - ExistConditionNone = "NONE" -) - -const ( - // JobBookmarksEncryptionModeDisabled is a JobBookmarksEncryptionMode enum value - JobBookmarksEncryptionModeDisabled = "DISABLED" - - // JobBookmarksEncryptionModeCseKms is a JobBookmarksEncryptionMode enum value - JobBookmarksEncryptionModeCseKms = "CSE-KMS" -) - -const ( - // JobRunStateStarting is a JobRunState enum value - JobRunStateStarting = "STARTING" - - // JobRunStateRunning is a JobRunState enum value - JobRunStateRunning = "RUNNING" - - // JobRunStateStopping is a JobRunState enum value - JobRunStateStopping = "STOPPING" - - // JobRunStateStopped is a JobRunState enum value - JobRunStateStopped = "STOPPED" - - // JobRunStateSucceeded is a JobRunState enum value - JobRunStateSucceeded = "SUCCEEDED" - - // JobRunStateFailed is a JobRunState enum value - JobRunStateFailed = "FAILED" - - // JobRunStateTimeout is a JobRunState enum value - JobRunStateTimeout = "TIMEOUT" -) - -const ( - // LanguagePython is a Language enum value - LanguagePython = "PYTHON" - - // LanguageScala is a Language enum value - LanguageScala = "SCALA" -) - -const ( - // LastCrawlStatusSucceeded is a LastCrawlStatus enum value - LastCrawlStatusSucceeded = "SUCCEEDED" - - // LastCrawlStatusCancelled is a LastCrawlStatus enum value - LastCrawlStatusCancelled = "CANCELLED" - - // LastCrawlStatusFailed is a LastCrawlStatus enum value - LastCrawlStatusFailed = "FAILED" -) - -const ( - // LogicalAnd is a Logical enum value - LogicalAnd = "AND" - - // LogicalAny is a Logical enum value - LogicalAny = "ANY" -) - -const ( - // LogicalOperatorEquals is a LogicalOperator enum value - LogicalOperatorEquals = "EQUALS" -) - -const ( - // PrincipalTypeUser is a PrincipalType enum value - PrincipalTypeUser = "USER" - - // PrincipalTypeRole is a PrincipalType enum value - PrincipalTypeRole = "ROLE" - - // PrincipalTypeGroup is a PrincipalType enum value - PrincipalTypeGroup = "GROUP" -) - -const ( - // ResourceTypeJar is a ResourceType enum value - ResourceTypeJar = "JAR" - - // ResourceTypeFile is a ResourceType enum value - ResourceTypeFile = "FILE" - - // ResourceTypeArchive is a ResourceType enum value - ResourceTypeArchive = "ARCHIVE" -) - -const ( - // S3EncryptionModeDisabled is a S3EncryptionMode enum value - S3EncryptionModeDisabled = "DISABLED" - - // S3EncryptionModeSseKms is a S3EncryptionMode enum value - S3EncryptionModeSseKms = "SSE-KMS" - - // S3EncryptionModeSseS3 is a S3EncryptionMode enum value - S3EncryptionModeSseS3 = "SSE-S3" -) - -const ( - // ScheduleStateScheduled is a ScheduleState enum value - ScheduleStateScheduled = "SCHEDULED" - - // ScheduleStateNotScheduled is a ScheduleState enum value - ScheduleStateNotScheduled = "NOT_SCHEDULED" - - // ScheduleStateTransitioning is a ScheduleState enum value - ScheduleStateTransitioning = "TRANSITIONING" -) - -const ( - // TriggerStateCreating is a TriggerState enum value - TriggerStateCreating = "CREATING" - - // TriggerStateCreated is a TriggerState enum value - TriggerStateCreated = "CREATED" - - // TriggerStateActivating is a TriggerState enum value - TriggerStateActivating = "ACTIVATING" - - // TriggerStateActivated is a TriggerState enum value - TriggerStateActivated = "ACTIVATED" - - // TriggerStateDeactivating is a TriggerState enum value - TriggerStateDeactivating = "DEACTIVATING" - - // TriggerStateDeactivated is a TriggerState enum value - TriggerStateDeactivated = "DEACTIVATED" - - // TriggerStateDeleting is a TriggerState enum value - TriggerStateDeleting = "DELETING" - - // TriggerStateUpdating is a TriggerState enum value - TriggerStateUpdating = "UPDATING" -) - -const ( - // TriggerTypeScheduled is a TriggerType enum value - TriggerTypeScheduled = "SCHEDULED" - - // TriggerTypeConditional is a TriggerType enum value - TriggerTypeConditional = "CONDITIONAL" - - // TriggerTypeOnDemand is a TriggerType enum value - TriggerTypeOnDemand = "ON_DEMAND" -) - -const ( - // UpdateBehaviorLog is a UpdateBehavior enum value - UpdateBehaviorLog = "LOG" - - // UpdateBehaviorUpdateInDatabase is a UpdateBehavior enum value - UpdateBehaviorUpdateInDatabase = "UPDATE_IN_DATABASE" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/doc.go b/vendor/github.com/aws/aws-sdk-go/service/glue/doc.go deleted file mode 100644 index c25c96ea4..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package glue provides the client and types for making API -// requests to AWS Glue. -// -// Defines the public endpoint for the AWS Glue service. -// -// See https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31 for more information on this service. -// -// See glue package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/glue/ -// -// Using the Client -// -// To contact AWS Glue 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 Glue client Glue for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/glue/#New -package glue diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go b/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go deleted file mode 100644 index a1e9b4d4d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go +++ /dev/null @@ -1,132 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package glue - -const ( - - // ErrCodeAccessDeniedException for service response error code - // "AccessDeniedException". - // - // Access to a resource was denied. - ErrCodeAccessDeniedException = "AccessDeniedException" - - // ErrCodeAlreadyExistsException for service response error code - // "AlreadyExistsException". - // - // A resource to be created or added already exists. - ErrCodeAlreadyExistsException = "AlreadyExistsException" - - // ErrCodeConcurrentModificationException for service response error code - // "ConcurrentModificationException". - // - // Two processes are trying to modify a resource simultaneously. - ErrCodeConcurrentModificationException = "ConcurrentModificationException" - - // ErrCodeConcurrentRunsExceededException for service response error code - // "ConcurrentRunsExceededException". - // - // Too many jobs are being run concurrently. - ErrCodeConcurrentRunsExceededException = "ConcurrentRunsExceededException" - - // ErrCodeConditionCheckFailureException for service response error code - // "ConditionCheckFailureException". - // - // A specified condition was not satisfied. - ErrCodeConditionCheckFailureException = "ConditionCheckFailureException" - - // ErrCodeCrawlerNotRunningException for service response error code - // "CrawlerNotRunningException". - // - // The specified crawler is not running. - ErrCodeCrawlerNotRunningException = "CrawlerNotRunningException" - - // ErrCodeCrawlerRunningException for service response error code - // "CrawlerRunningException". - // - // The operation cannot be performed because the crawler is already running. - ErrCodeCrawlerRunningException = "CrawlerRunningException" - - // ErrCodeCrawlerStoppingException for service response error code - // "CrawlerStoppingException". - // - // The specified crawler is stopping. - ErrCodeCrawlerStoppingException = "CrawlerStoppingException" - - // ErrCodeEncryptionException for service response error code - // "GlueEncryptionException". - // - // An encryption operation failed. - ErrCodeEncryptionException = "GlueEncryptionException" - - // ErrCodeEntityNotFoundException for service response error code - // "EntityNotFoundException". - // - // A specified entity does not exist - ErrCodeEntityNotFoundException = "EntityNotFoundException" - - // ErrCodeIdempotentParameterMismatchException for service response error code - // "IdempotentParameterMismatchException". - // - // The same unique identifier was associated with two different records. - ErrCodeIdempotentParameterMismatchException = "IdempotentParameterMismatchException" - - // ErrCodeInternalServiceException for service response error code - // "InternalServiceException". - // - // An internal service error occurred. - ErrCodeInternalServiceException = "InternalServiceException" - - // ErrCodeInvalidInputException for service response error code - // "InvalidInputException". - // - // The input provided was not valid. - ErrCodeInvalidInputException = "InvalidInputException" - - // ErrCodeNoScheduleException for service response error code - // "NoScheduleException". - // - // There is no applicable schedule. - ErrCodeNoScheduleException = "NoScheduleException" - - // ErrCodeOperationTimeoutException for service response error code - // "OperationTimeoutException". - // - // The operation timed out. - ErrCodeOperationTimeoutException = "OperationTimeoutException" - - // ErrCodeResourceNumberLimitExceededException for service response error code - // "ResourceNumberLimitExceededException". - // - // A resource numerical limit was exceeded. - ErrCodeResourceNumberLimitExceededException = "ResourceNumberLimitExceededException" - - // ErrCodeSchedulerNotRunningException for service response error code - // "SchedulerNotRunningException". - // - // The specified scheduler is not running. - ErrCodeSchedulerNotRunningException = "SchedulerNotRunningException" - - // ErrCodeSchedulerRunningException for service response error code - // "SchedulerRunningException". - // - // The specified scheduler is already running. - ErrCodeSchedulerRunningException = "SchedulerRunningException" - - // ErrCodeSchedulerTransitioningException for service response error code - // "SchedulerTransitioningException". - // - // The specified scheduler is transitioning. - ErrCodeSchedulerTransitioningException = "SchedulerTransitioningException" - - // ErrCodeValidationException for service response error code - // "ValidationException". - // - // A value could not be validated. - ErrCodeValidationException = "ValidationException" - - // ErrCodeVersionMismatchException for service response error code - // "VersionMismatchException". - // - // There was a version conflict. - ErrCodeVersionMismatchException = "VersionMismatchException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/service.go b/vendor/github.com/aws/aws-sdk-go/service/glue/service.go deleted file mode 100644 index 075b0a1df..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package glue - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// Glue provides the API operation methods for making requests to -// AWS Glue. See this package's package overview docs -// for details on the service. -// -// Glue methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Glue 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 = "glue" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Glue" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Glue client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Glue client from just a session. -// svc := glue.New(mySession) -// -// // Create a Glue client with additional configuration -// svc := glue.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Glue { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Glue { - svc := &Glue{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-03-31", - JSONVersion: "1.1", - TargetPrefix: "AWSGlue", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Glue operation and runs any -// custom request initialization. -func (c *Glue) 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 deleted file mode 100644 index 59239f04d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go +++ /dev/null @@ -1,9437 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package guardduty - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opAcceptInvitation = "AcceptInvitation" - -// AcceptInvitationRequest generates a "aws/request.Request" representing the -// client's request for the AcceptInvitation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcceptInvitation for more information on using the AcceptInvitation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcceptInvitationRequest method. -// req, resp := client.AcceptInvitationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/AcceptInvitation -func (c *GuardDuty) AcceptInvitationRequest(input *AcceptInvitationInput) (req *request.Request, output *AcceptInvitationOutput) { - op := &request.Operation{ - Name: opAcceptInvitation, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/master", - } - - if input == nil { - input = &AcceptInvitationInput{} - } - - output = &AcceptInvitationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AcceptInvitation API operation for Amazon GuardDuty. -// -// Accepts the invitation to be monitored by a master GuardDuty account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation AcceptInvitation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/AcceptInvitation -func (c *GuardDuty) AcceptInvitation(input *AcceptInvitationInput) (*AcceptInvitationOutput, error) { - req, out := c.AcceptInvitationRequest(input) - return out, req.Send() -} - -// AcceptInvitationWithContext is the same as AcceptInvitation with the addition of -// the ability to pass a context and additional request options. -// -// See AcceptInvitation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) AcceptInvitationWithContext(ctx aws.Context, input *AcceptInvitationInput, opts ...request.Option) (*AcceptInvitationOutput, error) { - req, out := c.AcceptInvitationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opArchiveFindings = "ArchiveFindings" - -// ArchiveFindingsRequest generates a "aws/request.Request" representing the -// client's request for the ArchiveFindings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ArchiveFindings for more information on using the ArchiveFindings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ArchiveFindingsRequest method. -// req, resp := client.ArchiveFindingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ArchiveFindings -func (c *GuardDuty) ArchiveFindingsRequest(input *ArchiveFindingsInput) (req *request.Request, output *ArchiveFindingsOutput) { - op := &request.Operation{ - Name: opArchiveFindings, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/findings/archive", - } - - if input == nil { - input = &ArchiveFindingsInput{} - } - - output = &ArchiveFindingsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ArchiveFindings API operation for Amazon GuardDuty. -// -// Archives Amazon GuardDuty findings specified by the list of finding IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation ArchiveFindings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ArchiveFindings -func (c *GuardDuty) ArchiveFindings(input *ArchiveFindingsInput) (*ArchiveFindingsOutput, error) { - req, out := c.ArchiveFindingsRequest(input) - return out, req.Send() -} - -// ArchiveFindingsWithContext is the same as ArchiveFindings with the addition of -// the ability to pass a context and additional request options. -// -// See ArchiveFindings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ArchiveFindingsWithContext(ctx aws.Context, input *ArchiveFindingsInput, opts ...request.Option) (*ArchiveFindingsOutput, error) { - req, out := c.ArchiveFindingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDetector = "CreateDetector" - -// CreateDetectorRequest generates a "aws/request.Request" representing the -// client's request for the CreateDetector operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDetector for more information on using the CreateDetector -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDetectorRequest method. -// req, resp := client.CreateDetectorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateDetector -func (c *GuardDuty) CreateDetectorRequest(input *CreateDetectorInput) (req *request.Request, output *CreateDetectorOutput) { - op := &request.Operation{ - Name: opCreateDetector, - HTTPMethod: "POST", - HTTPPath: "/detector", - } - - if input == nil { - input = &CreateDetectorInput{} - } - - output = &CreateDetectorOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDetector API operation for Amazon GuardDuty. -// -// Creates a single Amazon GuardDuty detector. A detector is an object that -// represents the GuardDuty service. A detector must be created in order for -// GuardDuty to become operational. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation CreateDetector for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateDetector -func (c *GuardDuty) CreateDetector(input *CreateDetectorInput) (*CreateDetectorOutput, error) { - req, out := c.CreateDetectorRequest(input) - return out, req.Send() -} - -// CreateDetectorWithContext is the same as CreateDetector with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDetector for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) CreateDetectorWithContext(ctx aws.Context, input *CreateDetectorInput, opts ...request.Option) (*CreateDetectorOutput, error) { - req, out := c.CreateDetectorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFilter = "CreateFilter" - -// CreateFilterRequest generates a "aws/request.Request" representing the -// client's request for the CreateFilter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFilter for more information on using the CreateFilter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateFilterRequest method. -// req, resp := client.CreateFilterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateFilter -func (c *GuardDuty) CreateFilterRequest(input *CreateFilterInput) (req *request.Request, output *CreateFilterOutput) { - op := &request.Operation{ - Name: opCreateFilter, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/filter", - } - - if input == nil { - input = &CreateFilterInput{} - } - - output = &CreateFilterOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFilter API operation for Amazon GuardDuty. -// -// Creates a filter using the specified finding criteria. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation CreateFilter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateFilter -func (c *GuardDuty) CreateFilter(input *CreateFilterInput) (*CreateFilterOutput, error) { - req, out := c.CreateFilterRequest(input) - return out, req.Send() -} - -// CreateFilterWithContext is the same as CreateFilter with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFilter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) CreateFilterWithContext(ctx aws.Context, input *CreateFilterInput, opts ...request.Option) (*CreateFilterOutput, error) { - req, out := c.CreateFilterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateIPSet = "CreateIPSet" - -// CreateIPSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateIPSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateIPSet for more information on using the CreateIPSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateIPSetRequest method. -// req, resp := client.CreateIPSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateIPSet -func (c *GuardDuty) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, output *CreateIPSetOutput) { - op := &request.Operation{ - Name: opCreateIPSet, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/ipset", - } - - if input == nil { - input = &CreateIPSetInput{} - } - - output = &CreateIPSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateIPSet API operation for Amazon GuardDuty. -// -// Creates a new IPSet - a list of trusted IP addresses that have been whitelisted -// for secure communication with AWS infrastructure and applications. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation CreateIPSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateIPSet -func (c *GuardDuty) CreateIPSet(input *CreateIPSetInput) (*CreateIPSetOutput, error) { - req, out := c.CreateIPSetRequest(input) - return out, req.Send() -} - -// CreateIPSetWithContext is the same as CreateIPSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateIPSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) CreateIPSetWithContext(ctx aws.Context, input *CreateIPSetInput, opts ...request.Option) (*CreateIPSetOutput, error) { - req, out := c.CreateIPSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateMembers = "CreateMembers" - -// CreateMembersRequest generates a "aws/request.Request" representing the -// client's request for the CreateMembers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateMembers for more information on using the CreateMembers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateMembersRequest method. -// req, resp := client.CreateMembersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateMembers -func (c *GuardDuty) CreateMembersRequest(input *CreateMembersInput) (req *request.Request, output *CreateMembersOutput) { - op := &request.Operation{ - Name: opCreateMembers, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/member", - } - - if input == nil { - input = &CreateMembersInput{} - } - - output = &CreateMembersOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateMembers API operation for Amazon GuardDuty. -// -// Creates member accounts of the current AWS account by specifying a list of -// AWS account IDs. The current AWS account can then invite these members to -// manage GuardDuty in their accounts. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation CreateMembers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateMembers -func (c *GuardDuty) CreateMembers(input *CreateMembersInput) (*CreateMembersOutput, error) { - req, out := c.CreateMembersRequest(input) - return out, req.Send() -} - -// CreateMembersWithContext is the same as CreateMembers with the addition of -// the ability to pass a context and additional request options. -// -// See CreateMembers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) CreateMembersWithContext(ctx aws.Context, input *CreateMembersInput, opts ...request.Option) (*CreateMembersOutput, error) { - req, out := c.CreateMembersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSampleFindings = "CreateSampleFindings" - -// CreateSampleFindingsRequest generates a "aws/request.Request" representing the -// client's request for the CreateSampleFindings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSampleFindings for more information on using the CreateSampleFindings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSampleFindingsRequest method. -// req, resp := client.CreateSampleFindingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateSampleFindings -func (c *GuardDuty) CreateSampleFindingsRequest(input *CreateSampleFindingsInput) (req *request.Request, output *CreateSampleFindingsOutput) { - op := &request.Operation{ - Name: opCreateSampleFindings, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/findings/create", - } - - if input == nil { - input = &CreateSampleFindingsInput{} - } - - output = &CreateSampleFindingsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateSampleFindings API operation for Amazon GuardDuty. -// -// Generates example findings of types specified by the list of finding types. -// If 'NULL' is specified for findingTypes, the API generates example findings -// of all supported finding types. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation CreateSampleFindings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateSampleFindings -func (c *GuardDuty) CreateSampleFindings(input *CreateSampleFindingsInput) (*CreateSampleFindingsOutput, error) { - req, out := c.CreateSampleFindingsRequest(input) - return out, req.Send() -} - -// CreateSampleFindingsWithContext is the same as CreateSampleFindings with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSampleFindings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) CreateSampleFindingsWithContext(ctx aws.Context, input *CreateSampleFindingsInput, opts ...request.Option) (*CreateSampleFindingsOutput, error) { - req, out := c.CreateSampleFindingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateThreatIntelSet = "CreateThreatIntelSet" - -// CreateThreatIntelSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateThreatIntelSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateThreatIntelSet for more information on using the CreateThreatIntelSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateThreatIntelSetRequest method. -// req, resp := client.CreateThreatIntelSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateThreatIntelSet -func (c *GuardDuty) CreateThreatIntelSetRequest(input *CreateThreatIntelSetInput) (req *request.Request, output *CreateThreatIntelSetOutput) { - op := &request.Operation{ - Name: opCreateThreatIntelSet, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/threatintelset", - } - - if input == nil { - input = &CreateThreatIntelSetInput{} - } - - output = &CreateThreatIntelSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateThreatIntelSet API operation for Amazon GuardDuty. -// -// Create a new ThreatIntelSet. ThreatIntelSets consist of known malicious IP -// addresses. GuardDuty generates findings based on ThreatIntelSets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation CreateThreatIntelSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateThreatIntelSet -func (c *GuardDuty) CreateThreatIntelSet(input *CreateThreatIntelSetInput) (*CreateThreatIntelSetOutput, error) { - req, out := c.CreateThreatIntelSetRequest(input) - return out, req.Send() -} - -// CreateThreatIntelSetWithContext is the same as CreateThreatIntelSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateThreatIntelSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) CreateThreatIntelSetWithContext(ctx aws.Context, input *CreateThreatIntelSetInput, opts ...request.Option) (*CreateThreatIntelSetOutput, error) { - req, out := c.CreateThreatIntelSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeclineInvitations = "DeclineInvitations" - -// DeclineInvitationsRequest generates a "aws/request.Request" representing the -// client's request for the DeclineInvitations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeclineInvitations for more information on using the DeclineInvitations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeclineInvitationsRequest method. -// req, resp := client.DeclineInvitationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeclineInvitations -func (c *GuardDuty) DeclineInvitationsRequest(input *DeclineInvitationsInput) (req *request.Request, output *DeclineInvitationsOutput) { - op := &request.Operation{ - Name: opDeclineInvitations, - HTTPMethod: "POST", - HTTPPath: "/invitation/decline", - } - - if input == nil { - input = &DeclineInvitationsInput{} - } - - output = &DeclineInvitationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeclineInvitations API operation for Amazon GuardDuty. -// -// Declines invitations sent to the current member account by AWS account specified -// by their account IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation DeclineInvitations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeclineInvitations -func (c *GuardDuty) DeclineInvitations(input *DeclineInvitationsInput) (*DeclineInvitationsOutput, error) { - req, out := c.DeclineInvitationsRequest(input) - return out, req.Send() -} - -// DeclineInvitationsWithContext is the same as DeclineInvitations with the addition of -// the ability to pass a context and additional request options. -// -// See DeclineInvitations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) DeclineInvitationsWithContext(ctx aws.Context, input *DeclineInvitationsInput, opts ...request.Option) (*DeclineInvitationsOutput, error) { - req, out := c.DeclineInvitationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDetector = "DeleteDetector" - -// DeleteDetectorRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDetector operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDetector for more information on using the DeleteDetector -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDetectorRequest method. -// req, resp := client.DeleteDetectorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteDetector -func (c *GuardDuty) DeleteDetectorRequest(input *DeleteDetectorInput) (req *request.Request, output *DeleteDetectorOutput) { - op := &request.Operation{ - Name: opDeleteDetector, - HTTPMethod: "DELETE", - HTTPPath: "/detector/{detectorId}", - } - - if input == nil { - input = &DeleteDetectorInput{} - } - - output = &DeleteDetectorOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDetector API operation for Amazon GuardDuty. -// -// Deletes a Amazon GuardDuty detector specified by the detector ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation DeleteDetector for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteDetector -func (c *GuardDuty) DeleteDetector(input *DeleteDetectorInput) (*DeleteDetectorOutput, error) { - req, out := c.DeleteDetectorRequest(input) - return out, req.Send() -} - -// DeleteDetectorWithContext is the same as DeleteDetector with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDetector for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) DeleteDetectorWithContext(ctx aws.Context, input *DeleteDetectorInput, opts ...request.Option) (*DeleteDetectorOutput, error) { - req, out := c.DeleteDetectorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFilter = "DeleteFilter" - -// DeleteFilterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFilter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFilter for more information on using the DeleteFilter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFilterRequest method. -// req, resp := client.DeleteFilterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteFilter -func (c *GuardDuty) DeleteFilterRequest(input *DeleteFilterInput) (req *request.Request, output *DeleteFilterOutput) { - op := &request.Operation{ - Name: opDeleteFilter, - HTTPMethod: "DELETE", - HTTPPath: "/detector/{detectorId}/filter/{filterName}", - } - - if input == nil { - input = &DeleteFilterInput{} - } - - output = &DeleteFilterOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteFilter API operation for Amazon GuardDuty. -// -// Deletes the filter specified by the filter name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation DeleteFilter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteFilter -func (c *GuardDuty) DeleteFilter(input *DeleteFilterInput) (*DeleteFilterOutput, error) { - req, out := c.DeleteFilterRequest(input) - return out, req.Send() -} - -// DeleteFilterWithContext is the same as DeleteFilter with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFilter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) DeleteFilterWithContext(ctx aws.Context, input *DeleteFilterInput, opts ...request.Option) (*DeleteFilterOutput, error) { - req, out := c.DeleteFilterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIPSet = "DeleteIPSet" - -// DeleteIPSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIPSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIPSet for more information on using the DeleteIPSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIPSetRequest method. -// req, resp := client.DeleteIPSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteIPSet -func (c *GuardDuty) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Request, output *DeleteIPSetOutput) { - op := &request.Operation{ - Name: opDeleteIPSet, - HTTPMethod: "DELETE", - HTTPPath: "/detector/{detectorId}/ipset/{ipSetId}", - } - - if input == nil { - input = &DeleteIPSetInput{} - } - - output = &DeleteIPSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteIPSet API operation for Amazon GuardDuty. -// -// Deletes the IPSet specified by the IPSet ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation DeleteIPSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteIPSet -func (c *GuardDuty) DeleteIPSet(input *DeleteIPSetInput) (*DeleteIPSetOutput, error) { - req, out := c.DeleteIPSetRequest(input) - return out, req.Send() -} - -// DeleteIPSetWithContext is the same as DeleteIPSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIPSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) DeleteIPSetWithContext(ctx aws.Context, input *DeleteIPSetInput, opts ...request.Option) (*DeleteIPSetOutput, error) { - req, out := c.DeleteIPSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteInvitations = "DeleteInvitations" - -// DeleteInvitationsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInvitations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteInvitations for more information on using the DeleteInvitations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteInvitationsRequest method. -// req, resp := client.DeleteInvitationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteInvitations -func (c *GuardDuty) DeleteInvitationsRequest(input *DeleteInvitationsInput) (req *request.Request, output *DeleteInvitationsOutput) { - op := &request.Operation{ - Name: opDeleteInvitations, - HTTPMethod: "POST", - HTTPPath: "/invitation/delete", - } - - if input == nil { - input = &DeleteInvitationsInput{} - } - - output = &DeleteInvitationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteInvitations API operation for Amazon GuardDuty. -// -// Deletes invitations sent to the current member account by AWS accounts specified -// by their account IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation DeleteInvitations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteInvitations -func (c *GuardDuty) DeleteInvitations(input *DeleteInvitationsInput) (*DeleteInvitationsOutput, error) { - req, out := c.DeleteInvitationsRequest(input) - return out, req.Send() -} - -// DeleteInvitationsWithContext is the same as DeleteInvitations with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteInvitations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) DeleteInvitationsWithContext(ctx aws.Context, input *DeleteInvitationsInput, opts ...request.Option) (*DeleteInvitationsOutput, error) { - req, out := c.DeleteInvitationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteMembers = "DeleteMembers" - -// DeleteMembersRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMembers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteMembers for more information on using the DeleteMembers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteMembersRequest method. -// req, resp := client.DeleteMembersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteMembers -func (c *GuardDuty) DeleteMembersRequest(input *DeleteMembersInput) (req *request.Request, output *DeleteMembersOutput) { - op := &request.Operation{ - Name: opDeleteMembers, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/member/delete", - } - - if input == nil { - input = &DeleteMembersInput{} - } - - output = &DeleteMembersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteMembers API operation for Amazon GuardDuty. -// -// Deletes GuardDuty member accounts (to the current GuardDuty master account) -// specified by the account IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation DeleteMembers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteMembers -func (c *GuardDuty) DeleteMembers(input *DeleteMembersInput) (*DeleteMembersOutput, error) { - req, out := c.DeleteMembersRequest(input) - return out, req.Send() -} - -// DeleteMembersWithContext is the same as DeleteMembers with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteMembers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) DeleteMembersWithContext(ctx aws.Context, input *DeleteMembersInput, opts ...request.Option) (*DeleteMembersOutput, error) { - req, out := c.DeleteMembersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteThreatIntelSet = "DeleteThreatIntelSet" - -// DeleteThreatIntelSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteThreatIntelSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteThreatIntelSet for more information on using the DeleteThreatIntelSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteThreatIntelSetRequest method. -// req, resp := client.DeleteThreatIntelSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteThreatIntelSet -func (c *GuardDuty) DeleteThreatIntelSetRequest(input *DeleteThreatIntelSetInput) (req *request.Request, output *DeleteThreatIntelSetOutput) { - op := &request.Operation{ - Name: opDeleteThreatIntelSet, - HTTPMethod: "DELETE", - HTTPPath: "/detector/{detectorId}/threatintelset/{threatIntelSetId}", - } - - if input == nil { - input = &DeleteThreatIntelSetInput{} - } - - output = &DeleteThreatIntelSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteThreatIntelSet API operation for Amazon GuardDuty. -// -// Deletes ThreatIntelSet specified by the ThreatIntelSet ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation DeleteThreatIntelSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteThreatIntelSet -func (c *GuardDuty) DeleteThreatIntelSet(input *DeleteThreatIntelSetInput) (*DeleteThreatIntelSetOutput, error) { - req, out := c.DeleteThreatIntelSetRequest(input) - return out, req.Send() -} - -// DeleteThreatIntelSetWithContext is the same as DeleteThreatIntelSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteThreatIntelSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) DeleteThreatIntelSetWithContext(ctx aws.Context, input *DeleteThreatIntelSetInput, opts ...request.Option) (*DeleteThreatIntelSetOutput, error) { - req, out := c.DeleteThreatIntelSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateFromMasterAccount = "DisassociateFromMasterAccount" - -// DisassociateFromMasterAccountRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateFromMasterAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateFromMasterAccount for more information on using the DisassociateFromMasterAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateFromMasterAccountRequest method. -// req, resp := client.DisassociateFromMasterAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DisassociateFromMasterAccount -func (c *GuardDuty) DisassociateFromMasterAccountRequest(input *DisassociateFromMasterAccountInput) (req *request.Request, output *DisassociateFromMasterAccountOutput) { - op := &request.Operation{ - Name: opDisassociateFromMasterAccount, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/master/disassociate", - } - - if input == nil { - input = &DisassociateFromMasterAccountInput{} - } - - output = &DisassociateFromMasterAccountOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateFromMasterAccount API operation for Amazon GuardDuty. -// -// Disassociates the current GuardDuty member account from its master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation DisassociateFromMasterAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DisassociateFromMasterAccount -func (c *GuardDuty) DisassociateFromMasterAccount(input *DisassociateFromMasterAccountInput) (*DisassociateFromMasterAccountOutput, error) { - req, out := c.DisassociateFromMasterAccountRequest(input) - return out, req.Send() -} - -// DisassociateFromMasterAccountWithContext is the same as DisassociateFromMasterAccount with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateFromMasterAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) DisassociateFromMasterAccountWithContext(ctx aws.Context, input *DisassociateFromMasterAccountInput, opts ...request.Option) (*DisassociateFromMasterAccountOutput, error) { - req, out := c.DisassociateFromMasterAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateMembers = "DisassociateMembers" - -// DisassociateMembersRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateMembers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateMembers for more information on using the DisassociateMembers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateMembersRequest method. -// req, resp := client.DisassociateMembersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DisassociateMembers -func (c *GuardDuty) DisassociateMembersRequest(input *DisassociateMembersInput) (req *request.Request, output *DisassociateMembersOutput) { - op := &request.Operation{ - Name: opDisassociateMembers, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/member/disassociate", - } - - if input == nil { - input = &DisassociateMembersInput{} - } - - output = &DisassociateMembersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisassociateMembers API operation for Amazon GuardDuty. -// -// Disassociates GuardDuty member accounts (to the current GuardDuty master -// account) specified by the account IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation DisassociateMembers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DisassociateMembers -func (c *GuardDuty) DisassociateMembers(input *DisassociateMembersInput) (*DisassociateMembersOutput, error) { - req, out := c.DisassociateMembersRequest(input) - return out, req.Send() -} - -// DisassociateMembersWithContext is the same as DisassociateMembers with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateMembers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) DisassociateMembersWithContext(ctx aws.Context, input *DisassociateMembersInput, opts ...request.Option) (*DisassociateMembersOutput, error) { - req, out := c.DisassociateMembersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDetector = "GetDetector" - -// GetDetectorRequest generates a "aws/request.Request" representing the -// client's request for the GetDetector operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDetector for more information on using the GetDetector -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDetectorRequest method. -// req, resp := client.GetDetectorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetDetector -func (c *GuardDuty) GetDetectorRequest(input *GetDetectorInput) (req *request.Request, output *GetDetectorOutput) { - op := &request.Operation{ - Name: opGetDetector, - HTTPMethod: "GET", - HTTPPath: "/detector/{detectorId}", - } - - if input == nil { - input = &GetDetectorInput{} - } - - output = &GetDetectorOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDetector API operation for Amazon GuardDuty. -// -// Retrieves an Amazon GuardDuty detector specified by the detectorId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation GetDetector for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetDetector -func (c *GuardDuty) GetDetector(input *GetDetectorInput) (*GetDetectorOutput, error) { - req, out := c.GetDetectorRequest(input) - return out, req.Send() -} - -// GetDetectorWithContext is the same as GetDetector with the addition of -// the ability to pass a context and additional request options. -// -// See GetDetector for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) GetDetectorWithContext(ctx aws.Context, input *GetDetectorInput, opts ...request.Option) (*GetDetectorOutput, error) { - req, out := c.GetDetectorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFilter = "GetFilter" - -// GetFilterRequest generates a "aws/request.Request" representing the -// client's request for the GetFilter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetFilter for more information on using the GetFilter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetFilterRequest method. -// req, resp := client.GetFilterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFilter -func (c *GuardDuty) GetFilterRequest(input *GetFilterInput) (req *request.Request, output *GetFilterOutput) { - op := &request.Operation{ - Name: opGetFilter, - HTTPMethod: "GET", - HTTPPath: "/detector/{detectorId}/filter/{filterName}", - } - - if input == nil { - input = &GetFilterInput{} - } - - output = &GetFilterOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFilter API operation for Amazon GuardDuty. -// -// Returns the details of the filter specified by the filter name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation GetFilter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFilter -func (c *GuardDuty) GetFilter(input *GetFilterInput) (*GetFilterOutput, error) { - req, out := c.GetFilterRequest(input) - return out, req.Send() -} - -// GetFilterWithContext is the same as GetFilter with the addition of -// the ability to pass a context and additional request options. -// -// See GetFilter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) GetFilterWithContext(ctx aws.Context, input *GetFilterInput, opts ...request.Option) (*GetFilterOutput, error) { - req, out := c.GetFilterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFindings = "GetFindings" - -// GetFindingsRequest generates a "aws/request.Request" representing the -// client's request for the GetFindings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetFindings for more information on using the GetFindings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetFindingsRequest method. -// req, resp := client.GetFindingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFindings -func (c *GuardDuty) GetFindingsRequest(input *GetFindingsInput) (req *request.Request, output *GetFindingsOutput) { - op := &request.Operation{ - Name: opGetFindings, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/findings/get", - } - - if input == nil { - input = &GetFindingsInput{} - } - - output = &GetFindingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFindings API operation for Amazon GuardDuty. -// -// Describes Amazon GuardDuty findings specified by finding IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation GetFindings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFindings -func (c *GuardDuty) GetFindings(input *GetFindingsInput) (*GetFindingsOutput, error) { - req, out := c.GetFindingsRequest(input) - return out, req.Send() -} - -// GetFindingsWithContext is the same as GetFindings with the addition of -// the ability to pass a context and additional request options. -// -// See GetFindings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) GetFindingsWithContext(ctx aws.Context, input *GetFindingsInput, opts ...request.Option) (*GetFindingsOutput, error) { - req, out := c.GetFindingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFindingsStatistics = "GetFindingsStatistics" - -// GetFindingsStatisticsRequest generates a "aws/request.Request" representing the -// client's request for the GetFindingsStatistics operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetFindingsStatistics for more information on using the GetFindingsStatistics -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetFindingsStatisticsRequest method. -// req, resp := client.GetFindingsStatisticsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFindingsStatistics -func (c *GuardDuty) GetFindingsStatisticsRequest(input *GetFindingsStatisticsInput) (req *request.Request, output *GetFindingsStatisticsOutput) { - op := &request.Operation{ - Name: opGetFindingsStatistics, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/findings/statistics", - } - - if input == nil { - input = &GetFindingsStatisticsInput{} - } - - output = &GetFindingsStatisticsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFindingsStatistics API operation for Amazon GuardDuty. -// -// Lists Amazon GuardDuty findings' statistics for the specified detector ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation GetFindingsStatistics for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFindingsStatistics -func (c *GuardDuty) GetFindingsStatistics(input *GetFindingsStatisticsInput) (*GetFindingsStatisticsOutput, error) { - req, out := c.GetFindingsStatisticsRequest(input) - return out, req.Send() -} - -// GetFindingsStatisticsWithContext is the same as GetFindingsStatistics with the addition of -// the ability to pass a context and additional request options. -// -// See GetFindingsStatistics for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) GetFindingsStatisticsWithContext(ctx aws.Context, input *GetFindingsStatisticsInput, opts ...request.Option) (*GetFindingsStatisticsOutput, error) { - req, out := c.GetFindingsStatisticsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIPSet = "GetIPSet" - -// GetIPSetRequest generates a "aws/request.Request" representing the -// client's request for the GetIPSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIPSet for more information on using the GetIPSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIPSetRequest method. -// req, resp := client.GetIPSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetIPSet -func (c *GuardDuty) GetIPSetRequest(input *GetIPSetInput) (req *request.Request, output *GetIPSetOutput) { - op := &request.Operation{ - Name: opGetIPSet, - HTTPMethod: "GET", - HTTPPath: "/detector/{detectorId}/ipset/{ipSetId}", - } - - if input == nil { - input = &GetIPSetInput{} - } - - output = &GetIPSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIPSet API operation for Amazon GuardDuty. -// -// Retrieves the IPSet specified by the IPSet ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation GetIPSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetIPSet -func (c *GuardDuty) GetIPSet(input *GetIPSetInput) (*GetIPSetOutput, error) { - req, out := c.GetIPSetRequest(input) - return out, req.Send() -} - -// GetIPSetWithContext is the same as GetIPSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetIPSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) GetIPSetWithContext(ctx aws.Context, input *GetIPSetInput, opts ...request.Option) (*GetIPSetOutput, error) { - req, out := c.GetIPSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInvitationsCount = "GetInvitationsCount" - -// GetInvitationsCountRequest generates a "aws/request.Request" representing the -// client's request for the GetInvitationsCount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInvitationsCount for more information on using the GetInvitationsCount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInvitationsCountRequest method. -// req, resp := client.GetInvitationsCountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetInvitationsCount -func (c *GuardDuty) GetInvitationsCountRequest(input *GetInvitationsCountInput) (req *request.Request, output *GetInvitationsCountOutput) { - op := &request.Operation{ - Name: opGetInvitationsCount, - HTTPMethod: "GET", - HTTPPath: "/invitation/count", - } - - if input == nil { - input = &GetInvitationsCountInput{} - } - - output = &GetInvitationsCountOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInvitationsCount API operation for Amazon GuardDuty. -// -// Returns the count of all GuardDuty membership invitations that were sent -// to the current member account except the currently accepted invitation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation GetInvitationsCount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetInvitationsCount -func (c *GuardDuty) GetInvitationsCount(input *GetInvitationsCountInput) (*GetInvitationsCountOutput, error) { - req, out := c.GetInvitationsCountRequest(input) - return out, req.Send() -} - -// GetInvitationsCountWithContext is the same as GetInvitationsCount with the addition of -// the ability to pass a context and additional request options. -// -// See GetInvitationsCount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) GetInvitationsCountWithContext(ctx aws.Context, input *GetInvitationsCountInput, opts ...request.Option) (*GetInvitationsCountOutput, error) { - req, out := c.GetInvitationsCountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMasterAccount = "GetMasterAccount" - -// GetMasterAccountRequest generates a "aws/request.Request" representing the -// client's request for the GetMasterAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMasterAccount for more information on using the GetMasterAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMasterAccountRequest method. -// req, resp := client.GetMasterAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetMasterAccount -func (c *GuardDuty) GetMasterAccountRequest(input *GetMasterAccountInput) (req *request.Request, output *GetMasterAccountOutput) { - op := &request.Operation{ - Name: opGetMasterAccount, - HTTPMethod: "GET", - HTTPPath: "/detector/{detectorId}/master", - } - - if input == nil { - input = &GetMasterAccountInput{} - } - - output = &GetMasterAccountOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMasterAccount API operation for Amazon GuardDuty. -// -// Provides the details for the GuardDuty master account to the current GuardDuty -// member account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation GetMasterAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetMasterAccount -func (c *GuardDuty) GetMasterAccount(input *GetMasterAccountInput) (*GetMasterAccountOutput, error) { - req, out := c.GetMasterAccountRequest(input) - return out, req.Send() -} - -// GetMasterAccountWithContext is the same as GetMasterAccount with the addition of -// the ability to pass a context and additional request options. -// -// See GetMasterAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) GetMasterAccountWithContext(ctx aws.Context, input *GetMasterAccountInput, opts ...request.Option) (*GetMasterAccountOutput, error) { - req, out := c.GetMasterAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMembers = "GetMembers" - -// GetMembersRequest generates a "aws/request.Request" representing the -// client's request for the GetMembers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMembers for more information on using the GetMembers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMembersRequest method. -// req, resp := client.GetMembersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetMembers -func (c *GuardDuty) GetMembersRequest(input *GetMembersInput) (req *request.Request, output *GetMembersOutput) { - op := &request.Operation{ - Name: opGetMembers, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/member/get", - } - - if input == nil { - input = &GetMembersInput{} - } - - output = &GetMembersOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMembers API operation for Amazon GuardDuty. -// -// Retrieves GuardDuty member accounts (to the current GuardDuty master account) -// specified by the account IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation GetMembers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetMembers -func (c *GuardDuty) GetMembers(input *GetMembersInput) (*GetMembersOutput, error) { - req, out := c.GetMembersRequest(input) - return out, req.Send() -} - -// GetMembersWithContext is the same as GetMembers with the addition of -// the ability to pass a context and additional request options. -// -// See GetMembers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) GetMembersWithContext(ctx aws.Context, input *GetMembersInput, opts ...request.Option) (*GetMembersOutput, error) { - req, out := c.GetMembersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetThreatIntelSet = "GetThreatIntelSet" - -// GetThreatIntelSetRequest generates a "aws/request.Request" representing the -// client's request for the GetThreatIntelSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetThreatIntelSet for more information on using the GetThreatIntelSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetThreatIntelSetRequest method. -// req, resp := client.GetThreatIntelSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetThreatIntelSet -func (c *GuardDuty) GetThreatIntelSetRequest(input *GetThreatIntelSetInput) (req *request.Request, output *GetThreatIntelSetOutput) { - op := &request.Operation{ - Name: opGetThreatIntelSet, - HTTPMethod: "GET", - HTTPPath: "/detector/{detectorId}/threatintelset/{threatIntelSetId}", - } - - if input == nil { - input = &GetThreatIntelSetInput{} - } - - output = &GetThreatIntelSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetThreatIntelSet API operation for Amazon GuardDuty. -// -// Retrieves the ThreatIntelSet that is specified by the ThreatIntelSet ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation GetThreatIntelSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetThreatIntelSet -func (c *GuardDuty) GetThreatIntelSet(input *GetThreatIntelSetInput) (*GetThreatIntelSetOutput, error) { - req, out := c.GetThreatIntelSetRequest(input) - return out, req.Send() -} - -// GetThreatIntelSetWithContext is the same as GetThreatIntelSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetThreatIntelSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) GetThreatIntelSetWithContext(ctx aws.Context, input *GetThreatIntelSetInput, opts ...request.Option) (*GetThreatIntelSetOutput, error) { - req, out := c.GetThreatIntelSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInviteMembers = "InviteMembers" - -// InviteMembersRequest generates a "aws/request.Request" representing the -// client's request for the InviteMembers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See InviteMembers for more information on using the InviteMembers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the InviteMembersRequest method. -// req, resp := client.InviteMembersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/InviteMembers -func (c *GuardDuty) InviteMembersRequest(input *InviteMembersInput) (req *request.Request, output *InviteMembersOutput) { - op := &request.Operation{ - Name: opInviteMembers, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/member/invite", - } - - if input == nil { - input = &InviteMembersInput{} - } - - output = &InviteMembersOutput{} - req = c.newRequest(op, input, output) - return -} - -// InviteMembers API operation for Amazon GuardDuty. -// -// Invites other AWS accounts (created as members of the current AWS account -// by CreateMembers) to enable GuardDuty and allow the current AWS account to -// view and manage these accounts' GuardDuty findings on their behalf as the -// master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation InviteMembers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/InviteMembers -func (c *GuardDuty) InviteMembers(input *InviteMembersInput) (*InviteMembersOutput, error) { - req, out := c.InviteMembersRequest(input) - return out, req.Send() -} - -// InviteMembersWithContext is the same as InviteMembers with the addition of -// the ability to pass a context and additional request options. -// -// See InviteMembers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) InviteMembersWithContext(ctx aws.Context, input *InviteMembersInput, opts ...request.Option) (*InviteMembersOutput, error) { - req, out := c.InviteMembersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDetectors = "ListDetectors" - -// ListDetectorsRequest generates a "aws/request.Request" representing the -// client's request for the ListDetectors operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDetectors for more information on using the ListDetectors -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDetectorsRequest method. -// req, resp := client.ListDetectorsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListDetectors -func (c *GuardDuty) ListDetectorsRequest(input *ListDetectorsInput) (req *request.Request, output *ListDetectorsOutput) { - op := &request.Operation{ - Name: opListDetectors, - HTTPMethod: "GET", - HTTPPath: "/detector", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListDetectorsInput{} - } - - output = &ListDetectorsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDetectors API operation for Amazon GuardDuty. -// -// Lists detectorIds of all the existing Amazon GuardDuty detector resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation ListDetectors for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListDetectors -func (c *GuardDuty) ListDetectors(input *ListDetectorsInput) (*ListDetectorsOutput, error) { - req, out := c.ListDetectorsRequest(input) - return out, req.Send() -} - -// ListDetectorsWithContext is the same as ListDetectors with the addition of -// the ability to pass a context and additional request options. -// -// See ListDetectors for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ListDetectorsWithContext(ctx aws.Context, input *ListDetectorsInput, opts ...request.Option) (*ListDetectorsOutput, error) { - req, out := c.ListDetectorsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListDetectorsPages iterates over the pages of a ListDetectors operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDetectors 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 ListDetectors operation. -// pageNum := 0 -// err := client.ListDetectorsPages(params, -// func(page *ListDetectorsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *GuardDuty) ListDetectorsPages(input *ListDetectorsInput, fn func(*ListDetectorsOutput, bool) bool) error { - return c.ListDetectorsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDetectorsPagesWithContext same as ListDetectorsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ListDetectorsPagesWithContext(ctx aws.Context, input *ListDetectorsInput, fn func(*ListDetectorsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDetectorsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDetectorsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDetectorsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListFilters = "ListFilters" - -// ListFiltersRequest generates a "aws/request.Request" representing the -// client's request for the ListFilters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListFilters for more information on using the ListFilters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListFiltersRequest method. -// req, resp := client.ListFiltersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListFilters -func (c *GuardDuty) ListFiltersRequest(input *ListFiltersInput) (req *request.Request, output *ListFiltersOutput) { - op := &request.Operation{ - Name: opListFilters, - HTTPMethod: "GET", - HTTPPath: "/detector/{detectorId}/filter", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListFiltersInput{} - } - - output = &ListFiltersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListFilters API operation for Amazon GuardDuty. -// -// Returns a paginated list of the current filters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation ListFilters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListFilters -func (c *GuardDuty) ListFilters(input *ListFiltersInput) (*ListFiltersOutput, error) { - req, out := c.ListFiltersRequest(input) - return out, req.Send() -} - -// ListFiltersWithContext is the same as ListFilters with the addition of -// the ability to pass a context and additional request options. -// -// See ListFilters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ListFiltersWithContext(ctx aws.Context, input *ListFiltersInput, opts ...request.Option) (*ListFiltersOutput, error) { - req, out := c.ListFiltersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListFiltersPages iterates over the pages of a ListFilters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListFilters method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListFilters operation. -// pageNum := 0 -// err := client.ListFiltersPages(params, -// func(page *ListFiltersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *GuardDuty) ListFiltersPages(input *ListFiltersInput, fn func(*ListFiltersOutput, bool) bool) error { - return c.ListFiltersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListFiltersPagesWithContext same as ListFiltersPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ListFiltersPagesWithContext(ctx aws.Context, input *ListFiltersInput, fn func(*ListFiltersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListFiltersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListFiltersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListFiltersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListFindings = "ListFindings" - -// ListFindingsRequest generates a "aws/request.Request" representing the -// client's request for the ListFindings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListFindings for more information on using the ListFindings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListFindingsRequest method. -// req, resp := client.ListFindingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListFindings -func (c *GuardDuty) ListFindingsRequest(input *ListFindingsInput) (req *request.Request, output *ListFindingsOutput) { - op := &request.Operation{ - Name: opListFindings, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/findings", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListFindingsInput{} - } - - output = &ListFindingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListFindings API operation for Amazon GuardDuty. -// -// Lists Amazon GuardDuty findings for the specified detector ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation ListFindings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListFindings -func (c *GuardDuty) ListFindings(input *ListFindingsInput) (*ListFindingsOutput, error) { - req, out := c.ListFindingsRequest(input) - return out, req.Send() -} - -// ListFindingsWithContext is the same as ListFindings with the addition of -// the ability to pass a context and additional request options. -// -// See ListFindings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ListFindingsWithContext(ctx aws.Context, input *ListFindingsInput, opts ...request.Option) (*ListFindingsOutput, error) { - req, out := c.ListFindingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListFindingsPages iterates over the pages of a ListFindings operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListFindings 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 ListFindings operation. -// pageNum := 0 -// err := client.ListFindingsPages(params, -// func(page *ListFindingsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *GuardDuty) ListFindingsPages(input *ListFindingsInput, fn func(*ListFindingsOutput, bool) bool) error { - return c.ListFindingsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListFindingsPagesWithContext same as ListFindingsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ListFindingsPagesWithContext(ctx aws.Context, input *ListFindingsInput, fn func(*ListFindingsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListFindingsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListFindingsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListFindingsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListIPSets = "ListIPSets" - -// ListIPSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListIPSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListIPSets for more information on using the ListIPSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListIPSetsRequest method. -// req, resp := client.ListIPSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListIPSets -func (c *GuardDuty) ListIPSetsRequest(input *ListIPSetsInput) (req *request.Request, output *ListIPSetsOutput) { - op := &request.Operation{ - Name: opListIPSets, - HTTPMethod: "GET", - HTTPPath: "/detector/{detectorId}/ipset", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListIPSetsInput{} - } - - output = &ListIPSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListIPSets API operation for Amazon GuardDuty. -// -// Lists the IPSets of the GuardDuty service specified by the detector ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation ListIPSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListIPSets -func (c *GuardDuty) ListIPSets(input *ListIPSetsInput) (*ListIPSetsOutput, error) { - req, out := c.ListIPSetsRequest(input) - return out, req.Send() -} - -// ListIPSetsWithContext is the same as ListIPSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListIPSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ListIPSetsWithContext(ctx aws.Context, input *ListIPSetsInput, opts ...request.Option) (*ListIPSetsOutput, error) { - req, out := c.ListIPSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListIPSetsPages iterates over the pages of a ListIPSets operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListIPSets 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 ListIPSets operation. -// pageNum := 0 -// err := client.ListIPSetsPages(params, -// func(page *ListIPSetsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *GuardDuty) ListIPSetsPages(input *ListIPSetsInput, fn func(*ListIPSetsOutput, bool) bool) error { - return c.ListIPSetsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListIPSetsPagesWithContext same as ListIPSetsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ListIPSetsPagesWithContext(ctx aws.Context, input *ListIPSetsInput, fn func(*ListIPSetsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListIPSetsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListIPSetsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListIPSetsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListInvitations = "ListInvitations" - -// ListInvitationsRequest generates a "aws/request.Request" representing the -// client's request for the ListInvitations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListInvitations for more information on using the ListInvitations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListInvitationsRequest method. -// req, resp := client.ListInvitationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListInvitations -func (c *GuardDuty) ListInvitationsRequest(input *ListInvitationsInput) (req *request.Request, output *ListInvitationsOutput) { - op := &request.Operation{ - Name: opListInvitations, - HTTPMethod: "GET", - HTTPPath: "/invitation", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListInvitationsInput{} - } - - output = &ListInvitationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInvitations API operation for Amazon GuardDuty. -// -// Lists all GuardDuty membership invitations that were sent to the current -// AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation ListInvitations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListInvitations -func (c *GuardDuty) ListInvitations(input *ListInvitationsInput) (*ListInvitationsOutput, error) { - req, out := c.ListInvitationsRequest(input) - return out, req.Send() -} - -// ListInvitationsWithContext is the same as ListInvitations with the addition of -// the ability to pass a context and additional request options. -// -// See ListInvitations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ListInvitationsWithContext(ctx aws.Context, input *ListInvitationsInput, opts ...request.Option) (*ListInvitationsOutput, error) { - req, out := c.ListInvitationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInvitationsPages iterates over the pages of a ListInvitations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInvitations 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 ListInvitations operation. -// pageNum := 0 -// err := client.ListInvitationsPages(params, -// func(page *ListInvitationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *GuardDuty) ListInvitationsPages(input *ListInvitationsInput, fn func(*ListInvitationsOutput, bool) bool) error { - return c.ListInvitationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInvitationsPagesWithContext same as ListInvitationsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ListInvitationsPagesWithContext(ctx aws.Context, input *ListInvitationsInput, fn func(*ListInvitationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInvitationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInvitationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInvitationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListMembers = "ListMembers" - -// ListMembersRequest generates a "aws/request.Request" representing the -// client's request for the ListMembers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListMembers for more information on using the ListMembers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListMembersRequest method. -// req, resp := client.ListMembersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListMembers -func (c *GuardDuty) ListMembersRequest(input *ListMembersInput) (req *request.Request, output *ListMembersOutput) { - op := &request.Operation{ - Name: opListMembers, - HTTPMethod: "GET", - HTTPPath: "/detector/{detectorId}/member", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListMembersInput{} - } - - output = &ListMembersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListMembers API operation for Amazon GuardDuty. -// -// Lists details about all member accounts for the current GuardDuty master -// account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation ListMembers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListMembers -func (c *GuardDuty) ListMembers(input *ListMembersInput) (*ListMembersOutput, error) { - req, out := c.ListMembersRequest(input) - return out, req.Send() -} - -// ListMembersWithContext is the same as ListMembers with the addition of -// the ability to pass a context and additional request options. -// -// See ListMembers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ListMembersWithContext(ctx aws.Context, input *ListMembersInput, opts ...request.Option) (*ListMembersOutput, error) { - req, out := c.ListMembersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListMembersPages iterates over the pages of a ListMembers operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListMembers method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListMembers operation. -// pageNum := 0 -// err := client.ListMembersPages(params, -// func(page *ListMembersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *GuardDuty) ListMembersPages(input *ListMembersInput, fn func(*ListMembersOutput, bool) bool) error { - return c.ListMembersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListMembersPagesWithContext same as ListMembersPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ListMembersPagesWithContext(ctx aws.Context, input *ListMembersInput, fn func(*ListMembersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListMembersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListMembersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMembersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListThreatIntelSets = "ListThreatIntelSets" - -// ListThreatIntelSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListThreatIntelSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListThreatIntelSets for more information on using the ListThreatIntelSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListThreatIntelSetsRequest method. -// req, resp := client.ListThreatIntelSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListThreatIntelSets -func (c *GuardDuty) ListThreatIntelSetsRequest(input *ListThreatIntelSetsInput) (req *request.Request, output *ListThreatIntelSetsOutput) { - op := &request.Operation{ - Name: opListThreatIntelSets, - HTTPMethod: "GET", - HTTPPath: "/detector/{detectorId}/threatintelset", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListThreatIntelSetsInput{} - } - - output = &ListThreatIntelSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListThreatIntelSets API operation for Amazon GuardDuty. -// -// Lists the ThreatIntelSets of the GuardDuty service specified by the detector -// ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation ListThreatIntelSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListThreatIntelSets -func (c *GuardDuty) ListThreatIntelSets(input *ListThreatIntelSetsInput) (*ListThreatIntelSetsOutput, error) { - req, out := c.ListThreatIntelSetsRequest(input) - return out, req.Send() -} - -// ListThreatIntelSetsWithContext is the same as ListThreatIntelSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListThreatIntelSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ListThreatIntelSetsWithContext(ctx aws.Context, input *ListThreatIntelSetsInput, opts ...request.Option) (*ListThreatIntelSetsOutput, error) { - req, out := c.ListThreatIntelSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListThreatIntelSetsPages iterates over the pages of a ListThreatIntelSets operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListThreatIntelSets 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 ListThreatIntelSets operation. -// pageNum := 0 -// err := client.ListThreatIntelSetsPages(params, -// func(page *ListThreatIntelSetsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *GuardDuty) ListThreatIntelSetsPages(input *ListThreatIntelSetsInput, fn func(*ListThreatIntelSetsOutput, bool) bool) error { - return c.ListThreatIntelSetsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListThreatIntelSetsPagesWithContext same as ListThreatIntelSetsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) ListThreatIntelSetsPagesWithContext(ctx aws.Context, input *ListThreatIntelSetsInput, fn func(*ListThreatIntelSetsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListThreatIntelSetsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListThreatIntelSetsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListThreatIntelSetsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opStartMonitoringMembers = "StartMonitoringMembers" - -// StartMonitoringMembersRequest generates a "aws/request.Request" representing the -// client's request for the StartMonitoringMembers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartMonitoringMembers for more information on using the StartMonitoringMembers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartMonitoringMembersRequest method. -// req, resp := client.StartMonitoringMembersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/StartMonitoringMembers -func (c *GuardDuty) StartMonitoringMembersRequest(input *StartMonitoringMembersInput) (req *request.Request, output *StartMonitoringMembersOutput) { - op := &request.Operation{ - Name: opStartMonitoringMembers, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/member/start", - } - - if input == nil { - input = &StartMonitoringMembersInput{} - } - - output = &StartMonitoringMembersOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartMonitoringMembers API operation for Amazon GuardDuty. -// -// Re-enables GuardDuty to monitor findings of the member accounts specified -// by the account IDs. A master GuardDuty account can run this command after -// disabling GuardDuty from monitoring these members' findings by running StopMonitoringMembers. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation StartMonitoringMembers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/StartMonitoringMembers -func (c *GuardDuty) StartMonitoringMembers(input *StartMonitoringMembersInput) (*StartMonitoringMembersOutput, error) { - req, out := c.StartMonitoringMembersRequest(input) - return out, req.Send() -} - -// StartMonitoringMembersWithContext is the same as StartMonitoringMembers with the addition of -// the ability to pass a context and additional request options. -// -// See StartMonitoringMembers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) StartMonitoringMembersWithContext(ctx aws.Context, input *StartMonitoringMembersInput, opts ...request.Option) (*StartMonitoringMembersOutput, error) { - req, out := c.StartMonitoringMembersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopMonitoringMembers = "StopMonitoringMembers" - -// StopMonitoringMembersRequest generates a "aws/request.Request" representing the -// client's request for the StopMonitoringMembers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopMonitoringMembers for more information on using the StopMonitoringMembers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopMonitoringMembersRequest method. -// req, resp := client.StopMonitoringMembersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/StopMonitoringMembers -func (c *GuardDuty) StopMonitoringMembersRequest(input *StopMonitoringMembersInput) (req *request.Request, output *StopMonitoringMembersOutput) { - op := &request.Operation{ - Name: opStopMonitoringMembers, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/member/stop", - } - - if input == nil { - input = &StopMonitoringMembersInput{} - } - - output = &StopMonitoringMembersOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopMonitoringMembers API operation for Amazon GuardDuty. -// -// Disables GuardDuty from monitoring findings of the member accounts specified -// by the account IDs. After running this command, a master GuardDuty account -// can run StartMonitoringMembers to re-enable GuardDuty to monitor these members’ -// findings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation StopMonitoringMembers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/StopMonitoringMembers -func (c *GuardDuty) StopMonitoringMembers(input *StopMonitoringMembersInput) (*StopMonitoringMembersOutput, error) { - req, out := c.StopMonitoringMembersRequest(input) - return out, req.Send() -} - -// StopMonitoringMembersWithContext is the same as StopMonitoringMembers with the addition of -// the ability to pass a context and additional request options. -// -// See StopMonitoringMembers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) StopMonitoringMembersWithContext(ctx aws.Context, input *StopMonitoringMembersInput, opts ...request.Option) (*StopMonitoringMembersOutput, error) { - req, out := c.StopMonitoringMembersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUnarchiveFindings = "UnarchiveFindings" - -// UnarchiveFindingsRequest generates a "aws/request.Request" representing the -// client's request for the UnarchiveFindings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UnarchiveFindings for more information on using the UnarchiveFindings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UnarchiveFindingsRequest method. -// req, resp := client.UnarchiveFindingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UnarchiveFindings -func (c *GuardDuty) UnarchiveFindingsRequest(input *UnarchiveFindingsInput) (req *request.Request, output *UnarchiveFindingsOutput) { - op := &request.Operation{ - Name: opUnarchiveFindings, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/findings/unarchive", - } - - if input == nil { - input = &UnarchiveFindingsInput{} - } - - output = &UnarchiveFindingsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UnarchiveFindings API operation for Amazon GuardDuty. -// -// Unarchives Amazon GuardDuty findings specified by the list of finding IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation UnarchiveFindings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UnarchiveFindings -func (c *GuardDuty) UnarchiveFindings(input *UnarchiveFindingsInput) (*UnarchiveFindingsOutput, error) { - req, out := c.UnarchiveFindingsRequest(input) - return out, req.Send() -} - -// UnarchiveFindingsWithContext is the same as UnarchiveFindings with the addition of -// the ability to pass a context and additional request options. -// -// See UnarchiveFindings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) UnarchiveFindingsWithContext(ctx aws.Context, input *UnarchiveFindingsInput, opts ...request.Option) (*UnarchiveFindingsOutput, error) { - req, out := c.UnarchiveFindingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDetector = "UpdateDetector" - -// UpdateDetectorRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDetector operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDetector for more information on using the UpdateDetector -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDetectorRequest method. -// req, resp := client.UpdateDetectorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateDetector -func (c *GuardDuty) UpdateDetectorRequest(input *UpdateDetectorInput) (req *request.Request, output *UpdateDetectorOutput) { - op := &request.Operation{ - Name: opUpdateDetector, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}", - } - - if input == nil { - input = &UpdateDetectorInput{} - } - - output = &UpdateDetectorOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateDetector API operation for Amazon GuardDuty. -// -// Updates an Amazon GuardDuty detector specified by the detectorId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation UpdateDetector for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateDetector -func (c *GuardDuty) UpdateDetector(input *UpdateDetectorInput) (*UpdateDetectorOutput, error) { - req, out := c.UpdateDetectorRequest(input) - return out, req.Send() -} - -// UpdateDetectorWithContext is the same as UpdateDetector with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDetector for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) UpdateDetectorWithContext(ctx aws.Context, input *UpdateDetectorInput, opts ...request.Option) (*UpdateDetectorOutput, error) { - req, out := c.UpdateDetectorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFilter = "UpdateFilter" - -// UpdateFilterRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFilter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFilter for more information on using the UpdateFilter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFilterRequest method. -// req, resp := client.UpdateFilterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateFilter -func (c *GuardDuty) UpdateFilterRequest(input *UpdateFilterInput) (req *request.Request, output *UpdateFilterOutput) { - op := &request.Operation{ - Name: opUpdateFilter, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/filter/{filterName}", - } - - if input == nil { - input = &UpdateFilterInput{} - } - - output = &UpdateFilterOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFilter API operation for Amazon GuardDuty. -// -// Updates the filter specified by the filter name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation UpdateFilter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateFilter -func (c *GuardDuty) UpdateFilter(input *UpdateFilterInput) (*UpdateFilterOutput, error) { - req, out := c.UpdateFilterRequest(input) - return out, req.Send() -} - -// UpdateFilterWithContext is the same as UpdateFilter with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFilter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) UpdateFilterWithContext(ctx aws.Context, input *UpdateFilterInput, opts ...request.Option) (*UpdateFilterOutput, error) { - req, out := c.UpdateFilterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFindingsFeedback = "UpdateFindingsFeedback" - -// UpdateFindingsFeedbackRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFindingsFeedback operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFindingsFeedback for more information on using the UpdateFindingsFeedback -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFindingsFeedbackRequest method. -// req, resp := client.UpdateFindingsFeedbackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateFindingsFeedback -func (c *GuardDuty) UpdateFindingsFeedbackRequest(input *UpdateFindingsFeedbackInput) (req *request.Request, output *UpdateFindingsFeedbackOutput) { - op := &request.Operation{ - Name: opUpdateFindingsFeedback, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/findings/feedback", - } - - if input == nil { - input = &UpdateFindingsFeedbackInput{} - } - - output = &UpdateFindingsFeedbackOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateFindingsFeedback API operation for Amazon GuardDuty. -// -// Marks specified Amazon GuardDuty findings as useful or not useful. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation UpdateFindingsFeedback for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateFindingsFeedback -func (c *GuardDuty) UpdateFindingsFeedback(input *UpdateFindingsFeedbackInput) (*UpdateFindingsFeedbackOutput, error) { - req, out := c.UpdateFindingsFeedbackRequest(input) - return out, req.Send() -} - -// UpdateFindingsFeedbackWithContext is the same as UpdateFindingsFeedback with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFindingsFeedback for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) UpdateFindingsFeedbackWithContext(ctx aws.Context, input *UpdateFindingsFeedbackInput, opts ...request.Option) (*UpdateFindingsFeedbackOutput, error) { - req, out := c.UpdateFindingsFeedbackRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateIPSet = "UpdateIPSet" - -// UpdateIPSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateIPSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateIPSet for more information on using the UpdateIPSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateIPSetRequest method. -// req, resp := client.UpdateIPSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateIPSet -func (c *GuardDuty) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, output *UpdateIPSetOutput) { - op := &request.Operation{ - Name: opUpdateIPSet, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/ipset/{ipSetId}", - } - - if input == nil { - input = &UpdateIPSetInput{} - } - - output = &UpdateIPSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateIPSet API operation for Amazon GuardDuty. -// -// Updates the IPSet specified by the IPSet ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation UpdateIPSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateIPSet -func (c *GuardDuty) UpdateIPSet(input *UpdateIPSetInput) (*UpdateIPSetOutput, error) { - req, out := c.UpdateIPSetRequest(input) - return out, req.Send() -} - -// UpdateIPSetWithContext is the same as UpdateIPSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateIPSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) UpdateIPSetWithContext(ctx aws.Context, input *UpdateIPSetInput, opts ...request.Option) (*UpdateIPSetOutput, error) { - req, out := c.UpdateIPSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateThreatIntelSet = "UpdateThreatIntelSet" - -// UpdateThreatIntelSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateThreatIntelSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateThreatIntelSet for more information on using the UpdateThreatIntelSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateThreatIntelSetRequest method. -// req, resp := client.UpdateThreatIntelSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateThreatIntelSet -func (c *GuardDuty) UpdateThreatIntelSetRequest(input *UpdateThreatIntelSetInput) (req *request.Request, output *UpdateThreatIntelSetOutput) { - op := &request.Operation{ - Name: opUpdateThreatIntelSet, - HTTPMethod: "POST", - HTTPPath: "/detector/{detectorId}/threatintelset/{threatIntelSetId}", - } - - if input == nil { - input = &UpdateThreatIntelSetInput{} - } - - output = &UpdateThreatIntelSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateThreatIntelSet API operation for Amazon GuardDuty. -// -// Updates the ThreatIntelSet specified by ThreatIntelSet ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon GuardDuty's -// API operation UpdateThreatIntelSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Error response object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Error response object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateThreatIntelSet -func (c *GuardDuty) UpdateThreatIntelSet(input *UpdateThreatIntelSetInput) (*UpdateThreatIntelSetOutput, error) { - req, out := c.UpdateThreatIntelSetRequest(input) - return out, req.Send() -} - -// UpdateThreatIntelSetWithContext is the same as UpdateThreatIntelSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateThreatIntelSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *GuardDuty) UpdateThreatIntelSetWithContext(ctx aws.Context, input *UpdateThreatIntelSetInput, opts ...request.Option) (*UpdateThreatIntelSetOutput, error) { - req, out := c.UpdateThreatIntelSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// AcceptInvitation request body. -type AcceptInvitationInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // This value is used to validate the master account to the member account. - // - // InvitationId is a required field - InvitationId *string `locationName:"invitationId" type:"string" required:"true"` - - // The account ID of the master GuardDuty account whose invitation you're accepting. - // - // MasterId is a required field - MasterId *string `locationName:"masterId" type:"string" required:"true"` -} - -// String returns the string representation -func (s AcceptInvitationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptInvitationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AcceptInvitationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AcceptInvitationInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.InvitationId == nil { - invalidParams.Add(request.NewErrParamRequired("InvitationId")) - } - if s.MasterId == nil { - invalidParams.Add(request.NewErrParamRequired("MasterId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *AcceptInvitationInput) SetDetectorId(v string) *AcceptInvitationInput { - s.DetectorId = &v - return s -} - -// SetInvitationId sets the InvitationId field's value. -func (s *AcceptInvitationInput) SetInvitationId(v string) *AcceptInvitationInput { - s.InvitationId = &v - return s -} - -// SetMasterId sets the MasterId field's value. -func (s *AcceptInvitationInput) SetMasterId(v string) *AcceptInvitationInput { - s.MasterId = &v - return s -} - -type AcceptInvitationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AcceptInvitationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptInvitationOutput) GoString() string { - return s.String() -} - -// The IAM access key details (IAM user information) of a user that engaged -// in the activity that prompted GuardDuty to generate a finding. -type AccessKeyDetails struct { - _ struct{} `type:"structure"` - - // Access key ID of the user. - AccessKeyId *string `locationName:"accessKeyId" type:"string"` - - // The principal ID of the user. - PrincipalId *string `locationName:"principalId" type:"string"` - - // The name of the user. - UserName *string `locationName:"userName" type:"string"` - - // The type of the user. - UserType *string `locationName:"userType" type:"string"` -} - -// String returns the string representation -func (s AccessKeyDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccessKeyDetails) GoString() string { - return s.String() -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *AccessKeyDetails) SetAccessKeyId(v string) *AccessKeyDetails { - s.AccessKeyId = &v - return s -} - -// SetPrincipalId sets the PrincipalId field's value. -func (s *AccessKeyDetails) SetPrincipalId(v string) *AccessKeyDetails { - s.PrincipalId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *AccessKeyDetails) SetUserName(v string) *AccessKeyDetails { - s.UserName = &v - return s -} - -// SetUserType sets the UserType field's value. -func (s *AccessKeyDetails) SetUserType(v string) *AccessKeyDetails { - s.UserType = &v - return s -} - -// An object containing the member's accountId and email address. -type AccountDetail struct { - _ struct{} `type:"structure"` - - // Member account ID. - // - // AccountId is a required field - AccountId *string `locationName:"accountId" type:"string" required:"true"` - - // Member account's email address. - // - // Email is a required field - Email *string `locationName:"email" type:"string" required:"true"` -} - -// String returns the string representation -func (s AccountDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountDetail) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AccountDetail) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AccountDetail"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.Email == nil { - invalidParams.Add(request.NewErrParamRequired("Email")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *AccountDetail) SetAccountId(v string) *AccountDetail { - s.AccountId = &v - return s -} - -// SetEmail sets the Email field's value. -func (s *AccountDetail) SetEmail(v string) *AccountDetail { - s.Email = &v - return s -} - -// Information about the activity described in a finding. -type Action struct { - _ struct{} `type:"structure"` - - // GuardDuty Finding activity type. - ActionType *string `locationName:"actionType" type:"string"` - - // Information about the AWS_API_CALL action described in this finding. - AwsApiCallAction *AwsApiCallAction `locationName:"awsApiCallAction" type:"structure"` - - // Information about the DNS_REQUEST action described in this finding. - DnsRequestAction *DnsRequestAction `locationName:"dnsRequestAction" type:"structure"` - - // Information about the NETWORK_CONNECTION action described in this finding. - NetworkConnectionAction *NetworkConnectionAction `locationName:"networkConnectionAction" type:"structure"` - - // Information about the PORT_PROBE action described in this finding. - PortProbeAction *PortProbeAction `locationName:"portProbeAction" type:"structure"` -} - -// String returns the string representation -func (s Action) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Action) GoString() string { - return s.String() -} - -// SetActionType sets the ActionType field's value. -func (s *Action) SetActionType(v string) *Action { - s.ActionType = &v - return s -} - -// SetAwsApiCallAction sets the AwsApiCallAction field's value. -func (s *Action) SetAwsApiCallAction(v *AwsApiCallAction) *Action { - s.AwsApiCallAction = v - return s -} - -// SetDnsRequestAction sets the DnsRequestAction field's value. -func (s *Action) SetDnsRequestAction(v *DnsRequestAction) *Action { - s.DnsRequestAction = v - return s -} - -// SetNetworkConnectionAction sets the NetworkConnectionAction field's value. -func (s *Action) SetNetworkConnectionAction(v *NetworkConnectionAction) *Action { - s.NetworkConnectionAction = v - return s -} - -// SetPortProbeAction sets the PortProbeAction field's value. -func (s *Action) SetPortProbeAction(v *PortProbeAction) *Action { - s.PortProbeAction = v - return s -} - -// Archive Findings Request -type ArchiveFindingsInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // IDs of the findings that you want to archive. - // - // FindingIds is a required field - FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` -} - -// String returns the string representation -func (s ArchiveFindingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ArchiveFindingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ArchiveFindingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ArchiveFindingsInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.FindingIds == nil { - invalidParams.Add(request.NewErrParamRequired("FindingIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *ArchiveFindingsInput) SetDetectorId(v string) *ArchiveFindingsInput { - s.DetectorId = &v - return s -} - -// SetFindingIds sets the FindingIds field's value. -func (s *ArchiveFindingsInput) SetFindingIds(v []*string) *ArchiveFindingsInput { - s.FindingIds = v - return s -} - -type ArchiveFindingsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ArchiveFindingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ArchiveFindingsOutput) GoString() string { - return s.String() -} - -// Information about the AWS_API_CALL action described in this finding. -type AwsApiCallAction struct { - _ struct{} `type:"structure"` - - // AWS API name. - Api *string `locationName:"api" type:"string"` - - // AWS API caller type. - CallerType *string `locationName:"callerType" type:"string"` - - // Domain information for the AWS API call. - DomainDetails *DomainDetails `locationName:"domainDetails" type:"structure"` - - // Remote IP information of the connection. - RemoteIpDetails *RemoteIpDetails `locationName:"remoteIpDetails" type:"structure"` - - // AWS service name whose API was invoked. - ServiceName *string `locationName:"serviceName" type:"string"` -} - -// String returns the string representation -func (s AwsApiCallAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AwsApiCallAction) GoString() string { - return s.String() -} - -// SetApi sets the Api field's value. -func (s *AwsApiCallAction) SetApi(v string) *AwsApiCallAction { - s.Api = &v - return s -} - -// SetCallerType sets the CallerType field's value. -func (s *AwsApiCallAction) SetCallerType(v string) *AwsApiCallAction { - s.CallerType = &v - return s -} - -// SetDomainDetails sets the DomainDetails field's value. -func (s *AwsApiCallAction) SetDomainDetails(v *DomainDetails) *AwsApiCallAction { - s.DomainDetails = v - return s -} - -// SetRemoteIpDetails sets the RemoteIpDetails field's value. -func (s *AwsApiCallAction) SetRemoteIpDetails(v *RemoteIpDetails) *AwsApiCallAction { - s.RemoteIpDetails = v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *AwsApiCallAction) SetServiceName(v string) *AwsApiCallAction { - s.ServiceName = &v - return s -} - -// City information of the remote IP address. -type City struct { - _ struct{} `type:"structure"` - - // City name of the remote IP address. - CityName *string `locationName:"cityName" type:"string"` -} - -// String returns the string representation -func (s City) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s City) GoString() string { - return s.String() -} - -// SetCityName sets the CityName field's value. -func (s *City) SetCityName(v string) *City { - s.CityName = &v - return s -} - -// Finding attribute (for example, accountId) for which conditions and values -// must be specified when querying findings. -type Condition struct { - _ struct{} `type:"structure"` - - // Represents the equal condition to be applied to a single field when querying - // for findings. - Eq []*string `locationName:"eq" type:"list"` - - // Represents the greater than condition to be applied to a single field when - // querying for findings. - Gt *int64 `locationName:"gt" type:"integer"` - - // Represents the greater than equal condition to be applied to a single field - // when querying for findings. - Gte *int64 `locationName:"gte" type:"integer"` - - // Represents the less than condition to be applied to a single field when querying - // for findings. - Lt *int64 `locationName:"lt" type:"integer"` - - // Represents the less than equal condition to be applied to a single field - // when querying for findings. - Lte *int64 `locationName:"lte" type:"integer"` - - // Represents the not equal condition to be applied to a single field when querying - // for findings. - Neq []*string `locationName:"neq" type:"list"` -} - -// String returns the string representation -func (s Condition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Condition) GoString() string { - return s.String() -} - -// SetEq sets the Eq field's value. -func (s *Condition) SetEq(v []*string) *Condition { - s.Eq = v - return s -} - -// SetGt sets the Gt field's value. -func (s *Condition) SetGt(v int64) *Condition { - s.Gt = &v - return s -} - -// SetGte sets the Gte field's value. -func (s *Condition) SetGte(v int64) *Condition { - s.Gte = &v - return s -} - -// SetLt sets the Lt field's value. -func (s *Condition) SetLt(v int64) *Condition { - s.Lt = &v - return s -} - -// SetLte sets the Lte field's value. -func (s *Condition) SetLte(v int64) *Condition { - s.Lte = &v - return s -} - -// SetNeq sets the Neq field's value. -func (s *Condition) SetNeq(v []*string) *Condition { - s.Neq = v - return s -} - -// Country information of the remote IP address. -type Country struct { - _ struct{} `type:"structure"` - - // Country code of the remote IP address. - CountryCode *string `locationName:"countryCode" type:"string"` - - // Country name of the remote IP address. - CountryName *string `locationName:"countryName" type:"string"` -} - -// String returns the string representation -func (s Country) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Country) GoString() string { - return s.String() -} - -// SetCountryCode sets the CountryCode field's value. -func (s *Country) SetCountryCode(v string) *Country { - s.CountryCode = &v - return s -} - -// SetCountryName sets the CountryName field's value. -func (s *Country) SetCountryName(v string) *Country { - s.CountryName = &v - return s -} - -// Create Detector Request -type CreateDetectorInput struct { - _ struct{} `type:"structure"` - - // The idempotency token for the create request. - ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - - // A boolean value that specifies whether the detector is to be enabled. - // - // Enable is a required field - Enable *bool `locationName:"enable" type:"boolean" required:"true"` - - // A enum value that specifies how frequently customer got Finding updates published. - FindingPublishingFrequency *string `locationName:"findingPublishingFrequency" type:"string" enum:"FindingPublishingFrequency"` -} - -// String returns the string representation -func (s CreateDetectorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDetectorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDetectorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDetectorInput"} - if s.Enable == nil { - invalidParams.Add(request.NewErrParamRequired("Enable")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateDetectorInput) SetClientToken(v string) *CreateDetectorInput { - s.ClientToken = &v - return s -} - -// SetEnable sets the Enable field's value. -func (s *CreateDetectorInput) SetEnable(v bool) *CreateDetectorInput { - s.Enable = &v - return s -} - -// SetFindingPublishingFrequency sets the FindingPublishingFrequency field's value. -func (s *CreateDetectorInput) SetFindingPublishingFrequency(v string) *CreateDetectorInput { - s.FindingPublishingFrequency = &v - return s -} - -// CreateDetector response object. -type CreateDetectorOutput struct { - _ struct{} `type:"structure"` - - // The unique ID of the created detector. - DetectorId *string `locationName:"detectorId" type:"string"` -} - -// String returns the string representation -func (s CreateDetectorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDetectorOutput) GoString() string { - return s.String() -} - -// SetDetectorId sets the DetectorId field's value. -func (s *CreateDetectorOutput) SetDetectorId(v string) *CreateDetectorOutput { - s.DetectorId = &v - return s -} - -// CreateFilter request object. -type CreateFilterInput struct { - _ struct{} `type:"structure"` - - // Specifies the action that is to be applied to the findings that match the - // filter. - Action *string `locationName:"action" type:"string" enum:"FilterAction"` - - // The idempotency token for the create request. - ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - - // The description of the filter. - Description *string `locationName:"description" type:"string"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // Represents the criteria to be used in the filter for querying findings. - // - // FindingCriteria is a required field - FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure" required:"true"` - - // The name of the filter. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // Specifies the position of the filter in the list of current filters. Also - // specifies the order in which this filter is applied to the findings. - Rank *int64 `locationName:"rank" type:"integer"` -} - -// String returns the string representation -func (s CreateFilterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFilterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFilterInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.FindingCriteria == nil { - invalidParams.Add(request.NewErrParamRequired("FindingCriteria")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *CreateFilterInput) SetAction(v string) *CreateFilterInput { - s.Action = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateFilterInput) SetClientToken(v string) *CreateFilterInput { - s.ClientToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateFilterInput) SetDescription(v string) *CreateFilterInput { - s.Description = &v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *CreateFilterInput) SetDetectorId(v string) *CreateFilterInput { - s.DetectorId = &v - return s -} - -// SetFindingCriteria sets the FindingCriteria field's value. -func (s *CreateFilterInput) SetFindingCriteria(v *FindingCriteria) *CreateFilterInput { - s.FindingCriteria = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateFilterInput) SetName(v string) *CreateFilterInput { - s.Name = &v - return s -} - -// SetRank sets the Rank field's value. -func (s *CreateFilterInput) SetRank(v int64) *CreateFilterInput { - s.Rank = &v - return s -} - -// CreateFilter response object. -type CreateFilterOutput struct { - _ struct{} `type:"structure"` - - // The name of the successfully created filter. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s CreateFilterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFilterOutput) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *CreateFilterOutput) SetName(v string) *CreateFilterOutput { - s.Name = &v - return s -} - -// Create IP Set Request -type CreateIPSetInput struct { - _ struct{} `type:"structure"` - - // A boolean value that indicates whether GuardDuty is to start using the uploaded - // IPSet. - // - // Activate is a required field - Activate *bool `locationName:"activate" type:"boolean" required:"true"` - - // The idempotency token for the create request. - ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // The format of the file that contains the IPSet. - // - // Format is a required field - Format *string `locationName:"format" type:"string" required:"true" enum:"IpSetFormat"` - - // The URI of the file that contains the IPSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key) - // - // Location is a required field - Location *string `locationName:"location" type:"string" required:"true"` - - // The user friendly name to identify the IPSet. This name is displayed in all - // findings that are triggered by activity that involves IP addresses included - // in this IPSet. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateIPSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIPSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateIPSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateIPSetInput"} - if s.Activate == nil { - invalidParams.Add(request.NewErrParamRequired("Activate")) - } - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) - } - if s.Location == nil { - invalidParams.Add(request.NewErrParamRequired("Location")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivate sets the Activate field's value. -func (s *CreateIPSetInput) SetActivate(v bool) *CreateIPSetInput { - s.Activate = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateIPSetInput) SetClientToken(v string) *CreateIPSetInput { - s.ClientToken = &v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *CreateIPSetInput) SetDetectorId(v string) *CreateIPSetInput { - s.DetectorId = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *CreateIPSetInput) SetFormat(v string) *CreateIPSetInput { - s.Format = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateIPSetInput) SetLocation(v string) *CreateIPSetInput { - s.Location = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateIPSetInput) SetName(v string) *CreateIPSetInput { - s.Name = &v - return s -} - -// CreateIPSet response object. -type CreateIPSetOutput struct { - _ struct{} `type:"structure"` - - // The unique identifier for an IP Set - IpSetId *string `locationName:"ipSetId" type:"string"` -} - -// String returns the string representation -func (s CreateIPSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIPSetOutput) GoString() string { - return s.String() -} - -// SetIpSetId sets the IpSetId field's value. -func (s *CreateIPSetOutput) SetIpSetId(v string) *CreateIPSetOutput { - s.IpSetId = &v - return s -} - -// CreateMembers body -type CreateMembersInput struct { - _ struct{} `type:"structure"` - - // A list of account ID and email address pairs of the accounts that you want - // to associate with the master GuardDuty account. - // - // AccountDetails is a required field - AccountDetails []*AccountDetail `locationName:"accountDetails" type:"list" required:"true"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateMembersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMembersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateMembersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateMembersInput"} - if s.AccountDetails == nil { - invalidParams.Add(request.NewErrParamRequired("AccountDetails")) - } - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.AccountDetails != nil { - for i, v := range s.AccountDetails { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccountDetails", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountDetails sets the AccountDetails field's value. -func (s *CreateMembersInput) SetAccountDetails(v []*AccountDetail) *CreateMembersInput { - s.AccountDetails = v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *CreateMembersInput) SetDetectorId(v string) *CreateMembersInput { - s.DetectorId = &v - return s -} - -// CreateMembers response object. -type CreateMembersOutput struct { - _ struct{} `type:"structure"` - - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. - UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list"` -} - -// String returns the string representation -func (s CreateMembersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMembersOutput) GoString() string { - return s.String() -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *CreateMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *CreateMembersOutput { - s.UnprocessedAccounts = v - return s -} - -// Create Sample Findings Request -type CreateSampleFindingsInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // Types of sample findings that you want to generate. - FindingTypes []*string `locationName:"findingTypes" type:"list"` -} - -// String returns the string representation -func (s CreateSampleFindingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSampleFindingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSampleFindingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSampleFindingsInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *CreateSampleFindingsInput) SetDetectorId(v string) *CreateSampleFindingsInput { - s.DetectorId = &v - return s -} - -// SetFindingTypes sets the FindingTypes field's value. -func (s *CreateSampleFindingsInput) SetFindingTypes(v []*string) *CreateSampleFindingsInput { - s.FindingTypes = v - return s -} - -type CreateSampleFindingsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateSampleFindingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSampleFindingsOutput) GoString() string { - return s.String() -} - -// Create Threat Intel Set Request -type CreateThreatIntelSetInput struct { - _ struct{} `type:"structure"` - - // A boolean value that indicates whether GuardDuty is to start using the uploaded - // ThreatIntelSet. - // - // Activate is a required field - Activate *bool `locationName:"activate" type:"boolean" required:"true"` - - // The idempotency token for the create request. - ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // The format of the file that contains the ThreatIntelSet. - // - // Format is a required field - Format *string `locationName:"format" type:"string" required:"true" enum:"ThreatIntelSetFormat"` - - // The URI of the file that contains the ThreatIntelSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key). - // - // Location is a required field - Location *string `locationName:"location" type:"string" required:"true"` - - // A user-friendly ThreatIntelSet name that is displayed in all finding generated - // by activity that involves IP addresses included in this ThreatIntelSet. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateThreatIntelSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateThreatIntelSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateThreatIntelSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateThreatIntelSetInput"} - if s.Activate == nil { - invalidParams.Add(request.NewErrParamRequired("Activate")) - } - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) - } - if s.Location == nil { - invalidParams.Add(request.NewErrParamRequired("Location")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivate sets the Activate field's value. -func (s *CreateThreatIntelSetInput) SetActivate(v bool) *CreateThreatIntelSetInput { - s.Activate = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateThreatIntelSetInput) SetClientToken(v string) *CreateThreatIntelSetInput { - s.ClientToken = &v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *CreateThreatIntelSetInput) SetDetectorId(v string) *CreateThreatIntelSetInput { - s.DetectorId = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *CreateThreatIntelSetInput) SetFormat(v string) *CreateThreatIntelSetInput { - s.Format = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateThreatIntelSetInput) SetLocation(v string) *CreateThreatIntelSetInput { - s.Location = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateThreatIntelSetInput) SetName(v string) *CreateThreatIntelSetInput { - s.Name = &v - return s -} - -// CreateThreatIntelSet response object. -type CreateThreatIntelSetOutput struct { - _ struct{} `type:"structure"` - - // The unique identifier for an threat intel set - ThreatIntelSetId *string `locationName:"threatIntelSetId" type:"string"` -} - -// String returns the string representation -func (s CreateThreatIntelSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateThreatIntelSetOutput) GoString() string { - return s.String() -} - -// SetThreatIntelSetId sets the ThreatIntelSetId field's value. -func (s *CreateThreatIntelSetOutput) SetThreatIntelSetId(v string) *CreateThreatIntelSetOutput { - s.ThreatIntelSetId = &v - return s -} - -// DeclineInvitations request body. -type DeclineInvitationsInput struct { - _ struct{} `type:"structure"` - - // A list of account IDs of the AWS accounts that sent invitations to the current - // member account that you want to decline invitations from. - // - // AccountIds is a required field - AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` -} - -// String returns the string representation -func (s DeclineInvitationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeclineInvitationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeclineInvitationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeclineInvitationsInput"} - if s.AccountIds == nil { - invalidParams.Add(request.NewErrParamRequired("AccountIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountIds sets the AccountIds field's value. -func (s *DeclineInvitationsInput) SetAccountIds(v []*string) *DeclineInvitationsInput { - s.AccountIds = v - return s -} - -// DeclineInvitations response object. -type DeclineInvitationsOutput struct { - _ struct{} `type:"structure"` - - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. - UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list"` -} - -// String returns the string representation -func (s DeclineInvitationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeclineInvitationsOutput) GoString() string { - return s.String() -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *DeclineInvitationsOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *DeclineInvitationsOutput { - s.UnprocessedAccounts = v - return s -} - -type DeleteDetectorInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDetectorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDetectorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDetectorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDetectorInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *DeleteDetectorInput) SetDetectorId(v string) *DeleteDetectorInput { - s.DetectorId = &v - return s -} - -type DeleteDetectorOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDetectorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDetectorOutput) GoString() string { - return s.String() -} - -type DeleteFilterInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // FilterName is a required field - FilterName *string `location:"uri" locationName:"filterName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteFilterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFilterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFilterInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.FilterName == nil { - invalidParams.Add(request.NewErrParamRequired("FilterName")) - } - if s.FilterName != nil && len(*s.FilterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *DeleteFilterInput) SetDetectorId(v string) *DeleteFilterInput { - s.DetectorId = &v - return s -} - -// SetFilterName sets the FilterName field's value. -func (s *DeleteFilterInput) SetFilterName(v string) *DeleteFilterInput { - s.FilterName = &v - return s -} - -type DeleteFilterOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteFilterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFilterOutput) GoString() string { - return s.String() -} - -type DeleteIPSetInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // IpSetId is a required field - IpSetId *string `location:"uri" locationName:"ipSetId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteIPSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIPSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIPSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIPSetInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.IpSetId == nil { - invalidParams.Add(request.NewErrParamRequired("IpSetId")) - } - if s.IpSetId != nil && len(*s.IpSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IpSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *DeleteIPSetInput) SetDetectorId(v string) *DeleteIPSetInput { - s.DetectorId = &v - return s -} - -// SetIpSetId sets the IpSetId field's value. -func (s *DeleteIPSetInput) SetIpSetId(v string) *DeleteIPSetInput { - s.IpSetId = &v - return s -} - -type DeleteIPSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteIPSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIPSetOutput) GoString() string { - return s.String() -} - -// DeleteInvitations request body. -type DeleteInvitationsInput struct { - _ struct{} `type:"structure"` - - // A list of account IDs of the AWS accounts that sent invitations to the current - // member account that you want to delete invitations from. - // - // AccountIds is a required field - AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteInvitationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInvitationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInvitationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInvitationsInput"} - if s.AccountIds == nil { - invalidParams.Add(request.NewErrParamRequired("AccountIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountIds sets the AccountIds field's value. -func (s *DeleteInvitationsInput) SetAccountIds(v []*string) *DeleteInvitationsInput { - s.AccountIds = v - return s -} - -// DeleteInvitations response object. -type DeleteInvitationsOutput struct { - _ struct{} `type:"structure"` - - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. - UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list"` -} - -// String returns the string representation -func (s DeleteInvitationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInvitationsOutput) GoString() string { - return s.String() -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *DeleteInvitationsOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *DeleteInvitationsOutput { - s.UnprocessedAccounts = v - return s -} - -// DeleteMembers request body. -type DeleteMembersInput struct { - _ struct{} `type:"structure"` - - // A list of account IDs of the GuardDuty member accounts that you want to delete. - // - // AccountIds is a required field - AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteMembersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMembersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMembersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMembersInput"} - if s.AccountIds == nil { - invalidParams.Add(request.NewErrParamRequired("AccountIds")) - } - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountIds sets the AccountIds field's value. -func (s *DeleteMembersInput) SetAccountIds(v []*string) *DeleteMembersInput { - s.AccountIds = v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *DeleteMembersInput) SetDetectorId(v string) *DeleteMembersInput { - s.DetectorId = &v - return s -} - -// DeleteMembers response object. -type DeleteMembersOutput struct { - _ struct{} `type:"structure"` - - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. - UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list"` -} - -// String returns the string representation -func (s DeleteMembersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMembersOutput) GoString() string { - return s.String() -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *DeleteMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *DeleteMembersOutput { - s.UnprocessedAccounts = v - return s -} - -type DeleteThreatIntelSetInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // ThreatIntelSetId is a required field - ThreatIntelSetId *string `location:"uri" locationName:"threatIntelSetId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteThreatIntelSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteThreatIntelSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteThreatIntelSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteThreatIntelSetInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.ThreatIntelSetId == nil { - invalidParams.Add(request.NewErrParamRequired("ThreatIntelSetId")) - } - if s.ThreatIntelSetId != nil && len(*s.ThreatIntelSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThreatIntelSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *DeleteThreatIntelSetInput) SetDetectorId(v string) *DeleteThreatIntelSetInput { - s.DetectorId = &v - return s -} - -// SetThreatIntelSetId sets the ThreatIntelSetId field's value. -func (s *DeleteThreatIntelSetInput) SetThreatIntelSetId(v string) *DeleteThreatIntelSetInput { - s.ThreatIntelSetId = &v - return s -} - -type DeleteThreatIntelSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteThreatIntelSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteThreatIntelSetOutput) GoString() string { - return s.String() -} - -type DisassociateFromMasterAccountInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateFromMasterAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateFromMasterAccountInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateFromMasterAccountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateFromMasterAccountInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *DisassociateFromMasterAccountInput) SetDetectorId(v string) *DisassociateFromMasterAccountInput { - s.DetectorId = &v - return s -} - -type DisassociateFromMasterAccountOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateFromMasterAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateFromMasterAccountOutput) GoString() string { - return s.String() -} - -// DisassociateMembers request body. -type DisassociateMembersInput struct { - _ struct{} `type:"structure"` - - // A list of account IDs of the GuardDuty member accounts that you want to disassociate - // from master. - // - // AccountIds is a required field - AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateMembersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateMembersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateMembersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateMembersInput"} - if s.AccountIds == nil { - invalidParams.Add(request.NewErrParamRequired("AccountIds")) - } - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountIds sets the AccountIds field's value. -func (s *DisassociateMembersInput) SetAccountIds(v []*string) *DisassociateMembersInput { - s.AccountIds = v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *DisassociateMembersInput) SetDetectorId(v string) *DisassociateMembersInput { - s.DetectorId = &v - return s -} - -// DisassociateMembers response object. -type DisassociateMembersOutput struct { - _ struct{} `type:"structure"` - - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. - UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list"` -} - -// String returns the string representation -func (s DisassociateMembersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateMembersOutput) GoString() string { - return s.String() -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *DisassociateMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *DisassociateMembersOutput { - s.UnprocessedAccounts = v - return s -} - -// Information about the DNS_REQUEST action described in this finding. -type DnsRequestAction struct { - _ struct{} `type:"structure"` - - // Domain information for the DNS request. - Domain *string `locationName:"domain" type:"string"` -} - -// String returns the string representation -func (s DnsRequestAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DnsRequestAction) GoString() string { - return s.String() -} - -// SetDomain sets the Domain field's value. -func (s *DnsRequestAction) SetDomain(v string) *DnsRequestAction { - s.Domain = &v - return s -} - -// Domain information for the AWS API call. -type DomainDetails struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DomainDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainDetails) GoString() string { - return s.String() -} - -// Representation of a abnormal or suspicious activity. -type Finding struct { - _ struct{} `type:"structure"` - - // AWS account ID where the activity occurred that prompted GuardDuty to generate - // a finding. - // - // AccountId is a required field - AccountId *string `locationName:"accountId" type:"string" required:"true"` - - // The ARN of a finding described by the action. - // - // Arn is a required field - Arn *string `locationName:"arn" type:"string" required:"true"` - - // The confidence level of a finding. - Confidence *float64 `locationName:"confidence" type:"double"` - - // The time stamp at which a finding was generated. - // - // CreatedAt is a required field - CreatedAt *string `locationName:"createdAt" type:"string" required:"true"` - - // The description of a finding. - Description *string `locationName:"description" type:"string"` - - // The identifier that corresponds to a finding described by the action. - // - // Id is a required field - Id *string `locationName:"id" type:"string" required:"true"` - - // The AWS resource partition. - Partition *string `locationName:"partition" type:"string"` - - // The AWS region where the activity occurred that prompted GuardDuty to generate - // a finding. - // - // Region is a required field - Region *string `locationName:"region" type:"string" required:"true"` - - // The AWS resource associated with the activity that prompted GuardDuty to - // generate a finding. - // - // Resource is a required field - Resource *Resource `locationName:"resource" type:"structure" required:"true"` - - // Findings' schema version. - // - // SchemaVersion is a required field - SchemaVersion *string `locationName:"schemaVersion" type:"string" required:"true"` - - // Additional information assigned to the generated finding by GuardDuty. - Service *Service `locationName:"service" type:"structure"` - - // The severity of a finding. - // - // Severity is a required field - Severity *float64 `locationName:"severity" type:"double" required:"true"` - - // The title of a finding. - Title *string `locationName:"title" type:"string"` - - // The type of a finding described by the action. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true"` - - // The time stamp at which a finding was last updated. - // - // UpdatedAt is a required field - UpdatedAt *string `locationName:"updatedAt" type:"string" required:"true"` -} - -// String returns the string representation -func (s Finding) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Finding) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *Finding) SetAccountId(v string) *Finding { - s.AccountId = &v - return s -} - -// SetArn sets the Arn field's value. -func (s *Finding) SetArn(v string) *Finding { - s.Arn = &v - return s -} - -// SetConfidence sets the Confidence field's value. -func (s *Finding) SetConfidence(v float64) *Finding { - s.Confidence = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Finding) SetCreatedAt(v string) *Finding { - s.CreatedAt = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Finding) SetDescription(v string) *Finding { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *Finding) SetId(v string) *Finding { - s.Id = &v - return s -} - -// SetPartition sets the Partition field's value. -func (s *Finding) SetPartition(v string) *Finding { - s.Partition = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *Finding) SetRegion(v string) *Finding { - s.Region = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *Finding) SetResource(v *Resource) *Finding { - s.Resource = v - return s -} - -// SetSchemaVersion sets the SchemaVersion field's value. -func (s *Finding) SetSchemaVersion(v string) *Finding { - s.SchemaVersion = &v - return s -} - -// SetService sets the Service field's value. -func (s *Finding) SetService(v *Service) *Finding { - s.Service = v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *Finding) SetSeverity(v float64) *Finding { - s.Severity = &v - return s -} - -// SetTitle sets the Title field's value. -func (s *Finding) SetTitle(v string) *Finding { - s.Title = &v - return s -} - -// SetType sets the Type field's value. -func (s *Finding) SetType(v string) *Finding { - s.Type = &v - return s -} - -// SetUpdatedAt sets the UpdatedAt field's value. -func (s *Finding) SetUpdatedAt(v string) *Finding { - s.UpdatedAt = &v - return s -} - -// Represents the criteria used for querying findings. -type FindingCriteria struct { - _ struct{} `type:"structure"` - - // Represents a map of finding properties that match specified conditions and - // values when querying findings. - Criterion map[string]*Condition `locationName:"criterion" type:"map"` -} - -// String returns the string representation -func (s FindingCriteria) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FindingCriteria) GoString() string { - return s.String() -} - -// SetCriterion sets the Criterion field's value. -func (s *FindingCriteria) SetCriterion(v map[string]*Condition) *FindingCriteria { - s.Criterion = v - return s -} - -// Finding statistics object. -type FindingStatistics struct { - _ struct{} `type:"structure"` - - // Represents a map of severity to count statistic for a set of findings - CountBySeverity map[string]*int64 `locationName:"countBySeverity" type:"map"` -} - -// String returns the string representation -func (s FindingStatistics) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FindingStatistics) GoString() string { - return s.String() -} - -// SetCountBySeverity sets the CountBySeverity field's value. -func (s *FindingStatistics) SetCountBySeverity(v map[string]*int64) *FindingStatistics { - s.CountBySeverity = v - return s -} - -// Location information of the remote IP address. -type GeoLocation struct { - _ struct{} `type:"structure"` - - // Latitude information of remote IP address. - Lat *float64 `locationName:"lat" type:"double"` - - // Longitude information of remote IP address. - Lon *float64 `locationName:"lon" type:"double"` -} - -// String returns the string representation -func (s GeoLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GeoLocation) GoString() string { - return s.String() -} - -// SetLat sets the Lat field's value. -func (s *GeoLocation) SetLat(v float64) *GeoLocation { - s.Lat = &v - return s -} - -// SetLon sets the Lon field's value. -func (s *GeoLocation) SetLon(v float64) *GeoLocation { - s.Lon = &v - return s -} - -type GetDetectorInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDetectorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDetectorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDetectorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDetectorInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *GetDetectorInput) SetDetectorId(v string) *GetDetectorInput { - s.DetectorId = &v - return s -} - -// GetDetector response object. -type GetDetectorOutput struct { - _ struct{} `type:"structure"` - - // The first time a resource was created. The format will be ISO-8601. - CreatedAt *string `locationName:"createdAt" type:"string"` - - // A enum value that specifies how frequently customer got Finding updates published. - FindingPublishingFrequency *string `locationName:"findingPublishingFrequency" type:"string" enum:"FindingPublishingFrequency"` - - // Customer serviceRole name or ARN for accessing customer resources - ServiceRole *string `locationName:"serviceRole" type:"string"` - - // The status of detector. - Status *string `locationName:"status" type:"string" enum:"DetectorStatus"` - - // The first time a resource was created. The format will be ISO-8601. - UpdatedAt *string `locationName:"updatedAt" type:"string"` -} - -// String returns the string representation -func (s GetDetectorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDetectorOutput) GoString() string { - return s.String() -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *GetDetectorOutput) SetCreatedAt(v string) *GetDetectorOutput { - s.CreatedAt = &v - return s -} - -// SetFindingPublishingFrequency sets the FindingPublishingFrequency field's value. -func (s *GetDetectorOutput) SetFindingPublishingFrequency(v string) *GetDetectorOutput { - s.FindingPublishingFrequency = &v - return s -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *GetDetectorOutput) SetServiceRole(v string) *GetDetectorOutput { - s.ServiceRole = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetDetectorOutput) SetStatus(v string) *GetDetectorOutput { - s.Status = &v - return s -} - -// SetUpdatedAt sets the UpdatedAt field's value. -func (s *GetDetectorOutput) SetUpdatedAt(v string) *GetDetectorOutput { - s.UpdatedAt = &v - return s -} - -type GetFilterInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // FilterName is a required field - FilterName *string `location:"uri" locationName:"filterName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetFilterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFilterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFilterInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.FilterName == nil { - invalidParams.Add(request.NewErrParamRequired("FilterName")) - } - if s.FilterName != nil && len(*s.FilterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *GetFilterInput) SetDetectorId(v string) *GetFilterInput { - s.DetectorId = &v - return s -} - -// SetFilterName sets the FilterName field's value. -func (s *GetFilterInput) SetFilterName(v string) *GetFilterInput { - s.FilterName = &v - return s -} - -// GetFilter response object. -type GetFilterOutput struct { - _ struct{} `type:"structure"` - - // Specifies the action that is to be applied to the findings that match the - // filter. - Action *string `locationName:"action" type:"string" enum:"FilterAction"` - - // The description of the filter. - Description *string `locationName:"description" type:"string"` - - // Represents the criteria to be used in the filter for querying findings. - FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` - - // The name of the filter. - Name *string `locationName:"name" type:"string"` - - // Specifies the position of the filter in the list of current filters. Also - // specifies the order in which this filter is applied to the findings. - Rank *int64 `locationName:"rank" type:"integer"` -} - -// String returns the string representation -func (s GetFilterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFilterOutput) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *GetFilterOutput) SetAction(v string) *GetFilterOutput { - s.Action = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetFilterOutput) SetDescription(v string) *GetFilterOutput { - s.Description = &v - return s -} - -// SetFindingCriteria sets the FindingCriteria field's value. -func (s *GetFilterOutput) SetFindingCriteria(v *FindingCriteria) *GetFilterOutput { - s.FindingCriteria = v - return s -} - -// SetName sets the Name field's value. -func (s *GetFilterOutput) SetName(v string) *GetFilterOutput { - s.Name = &v - return s -} - -// SetRank sets the Rank field's value. -func (s *GetFilterOutput) SetRank(v int64) *GetFilterOutput { - s.Rank = &v - return s -} - -// Get Findings Request -type GetFindingsInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // IDs of the findings that you want to retrieve. - // - // FindingIds is a required field - FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` - - // Represents the criteria used for sorting findings. - SortCriteria *SortCriteria `locationName:"sortCriteria" type:"structure"` -} - -// String returns the string representation -func (s GetFindingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFindingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFindingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFindingsInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.FindingIds == nil { - invalidParams.Add(request.NewErrParamRequired("FindingIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *GetFindingsInput) SetDetectorId(v string) *GetFindingsInput { - s.DetectorId = &v - return s -} - -// SetFindingIds sets the FindingIds field's value. -func (s *GetFindingsInput) SetFindingIds(v []*string) *GetFindingsInput { - s.FindingIds = v - return s -} - -// SetSortCriteria sets the SortCriteria field's value. -func (s *GetFindingsInput) SetSortCriteria(v *SortCriteria) *GetFindingsInput { - s.SortCriteria = v - return s -} - -// GetFindings response object. -type GetFindingsOutput struct { - _ struct{} `type:"structure"` - - // A list of findings. - Findings []*Finding `locationName:"findings" type:"list"` -} - -// String returns the string representation -func (s GetFindingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFindingsOutput) GoString() string { - return s.String() -} - -// SetFindings sets the Findings field's value. -func (s *GetFindingsOutput) SetFindings(v []*Finding) *GetFindingsOutput { - s.Findings = v - return s -} - -// Get Findings Statistics Request -type GetFindingsStatisticsInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // Represents the criteria used for querying findings. - FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` - - // Types of finding statistics to retrieve. - // - // FindingStatisticTypes is a required field - FindingStatisticTypes []*string `locationName:"findingStatisticTypes" type:"list" required:"true"` -} - -// String returns the string representation -func (s GetFindingsStatisticsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFindingsStatisticsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFindingsStatisticsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFindingsStatisticsInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.FindingStatisticTypes == nil { - invalidParams.Add(request.NewErrParamRequired("FindingStatisticTypes")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *GetFindingsStatisticsInput) SetDetectorId(v string) *GetFindingsStatisticsInput { - s.DetectorId = &v - return s -} - -// SetFindingCriteria sets the FindingCriteria field's value. -func (s *GetFindingsStatisticsInput) SetFindingCriteria(v *FindingCriteria) *GetFindingsStatisticsInput { - s.FindingCriteria = v - return s -} - -// SetFindingStatisticTypes sets the FindingStatisticTypes field's value. -func (s *GetFindingsStatisticsInput) SetFindingStatisticTypes(v []*string) *GetFindingsStatisticsInput { - s.FindingStatisticTypes = v - return s -} - -// GetFindingsStatistics response object. -type GetFindingsStatisticsOutput struct { - _ struct{} `type:"structure"` - - // Finding statistics object. - FindingStatistics *FindingStatistics `locationName:"findingStatistics" type:"structure"` -} - -// String returns the string representation -func (s GetFindingsStatisticsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFindingsStatisticsOutput) GoString() string { - return s.String() -} - -// SetFindingStatistics sets the FindingStatistics field's value. -func (s *GetFindingsStatisticsOutput) SetFindingStatistics(v *FindingStatistics) *GetFindingsStatisticsOutput { - s.FindingStatistics = v - return s -} - -type GetIPSetInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // IpSetId is a required field - IpSetId *string `location:"uri" locationName:"ipSetId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetIPSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIPSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIPSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIPSetInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.IpSetId == nil { - invalidParams.Add(request.NewErrParamRequired("IpSetId")) - } - if s.IpSetId != nil && len(*s.IpSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IpSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *GetIPSetInput) SetDetectorId(v string) *GetIPSetInput { - s.DetectorId = &v - return s -} - -// SetIpSetId sets the IpSetId field's value. -func (s *GetIPSetInput) SetIpSetId(v string) *GetIPSetInput { - s.IpSetId = &v - return s -} - -// GetIPSet response object. -type GetIPSetOutput struct { - _ struct{} `type:"structure"` - - // The format of the file that contains the IPSet. - Format *string `locationName:"format" type:"string" enum:"IpSetFormat"` - - // The URI of the file that contains the IPSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key) - Location *string `locationName:"location" type:"string"` - - // The user friendly name to identify the IPSet. This name is displayed in all - // findings that are triggered by activity that involves IP addresses included - // in this IPSet. - Name *string `locationName:"name" type:"string"` - - // The status of ipSet file uploaded. - Status *string `locationName:"status" type:"string" enum:"IpSetStatus"` -} - -// String returns the string representation -func (s GetIPSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIPSetOutput) GoString() string { - return s.String() -} - -// SetFormat sets the Format field's value. -func (s *GetIPSetOutput) SetFormat(v string) *GetIPSetOutput { - s.Format = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *GetIPSetOutput) SetLocation(v string) *GetIPSetOutput { - s.Location = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetIPSetOutput) SetName(v string) *GetIPSetOutput { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetIPSetOutput) SetStatus(v string) *GetIPSetOutput { - s.Status = &v - return s -} - -type GetInvitationsCountInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetInvitationsCountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInvitationsCountInput) GoString() string { - return s.String() -} - -// GetInvitationsCount response object. -type GetInvitationsCountOutput struct { - _ struct{} `type:"structure"` - - // The number of received invitations. - InvitationsCount *int64 `locationName:"invitationsCount" type:"integer"` -} - -// String returns the string representation -func (s GetInvitationsCountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInvitationsCountOutput) GoString() string { - return s.String() -} - -// SetInvitationsCount sets the InvitationsCount field's value. -func (s *GetInvitationsCountOutput) SetInvitationsCount(v int64) *GetInvitationsCountOutput { - s.InvitationsCount = &v - return s -} - -type GetMasterAccountInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetMasterAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMasterAccountInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMasterAccountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMasterAccountInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *GetMasterAccountInput) SetDetectorId(v string) *GetMasterAccountInput { - s.DetectorId = &v - return s -} - -// GetMasterAccount response object. -type GetMasterAccountOutput struct { - _ struct{} `type:"structure"` - - // Contains details about the master account. - Master *Master `locationName:"master" type:"structure"` -} - -// String returns the string representation -func (s GetMasterAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMasterAccountOutput) GoString() string { - return s.String() -} - -// SetMaster sets the Master field's value. -func (s *GetMasterAccountOutput) SetMaster(v *Master) *GetMasterAccountOutput { - s.Master = v - return s -} - -// GetMembers request body. -type GetMembersInput struct { - _ struct{} `type:"structure"` - - // A list of account IDs of the GuardDuty member accounts that you want to describe. - // - // AccountIds is a required field - AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetMembersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMembersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMembersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMembersInput"} - if s.AccountIds == nil { - invalidParams.Add(request.NewErrParamRequired("AccountIds")) - } - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountIds sets the AccountIds field's value. -func (s *GetMembersInput) SetAccountIds(v []*string) *GetMembersInput { - s.AccountIds = v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *GetMembersInput) SetDetectorId(v string) *GetMembersInput { - s.DetectorId = &v - return s -} - -// GetMembers response object. -type GetMembersOutput struct { - _ struct{} `type:"structure"` - - // A list of member descriptions. - Members []*Member `locationName:"members" type:"list"` - - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. - UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list"` -} - -// String returns the string representation -func (s GetMembersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMembersOutput) GoString() string { - return s.String() -} - -// SetMembers sets the Members field's value. -func (s *GetMembersOutput) SetMembers(v []*Member) *GetMembersOutput { - s.Members = v - return s -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *GetMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *GetMembersOutput { - s.UnprocessedAccounts = v - return s -} - -type GetThreatIntelSetInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // ThreatIntelSetId is a required field - ThreatIntelSetId *string `location:"uri" locationName:"threatIntelSetId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetThreatIntelSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetThreatIntelSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetThreatIntelSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetThreatIntelSetInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.ThreatIntelSetId == nil { - invalidParams.Add(request.NewErrParamRequired("ThreatIntelSetId")) - } - if s.ThreatIntelSetId != nil && len(*s.ThreatIntelSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThreatIntelSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *GetThreatIntelSetInput) SetDetectorId(v string) *GetThreatIntelSetInput { - s.DetectorId = &v - return s -} - -// SetThreatIntelSetId sets the ThreatIntelSetId field's value. -func (s *GetThreatIntelSetInput) SetThreatIntelSetId(v string) *GetThreatIntelSetInput { - s.ThreatIntelSetId = &v - return s -} - -// GetThreatIntelSet response object -type GetThreatIntelSetOutput struct { - _ struct{} `type:"structure"` - - // The format of the threatIntelSet. - Format *string `locationName:"format" type:"string" enum:"ThreatIntelSetFormat"` - - // The URI of the file that contains the ThreatIntelSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key). - Location *string `locationName:"location" type:"string"` - - // A user-friendly ThreatIntelSet name that is displayed in all finding generated - // by activity that involves IP addresses included in this ThreatIntelSet. - Name *string `locationName:"name" type:"string"` - - // The status of threatIntelSet file uploaded. - Status *string `locationName:"status" type:"string" enum:"ThreatIntelSetStatus"` -} - -// String returns the string representation -func (s GetThreatIntelSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetThreatIntelSetOutput) GoString() string { - return s.String() -} - -// SetFormat sets the Format field's value. -func (s *GetThreatIntelSetOutput) SetFormat(v string) *GetThreatIntelSetOutput { - s.Format = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *GetThreatIntelSetOutput) SetLocation(v string) *GetThreatIntelSetOutput { - s.Location = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetThreatIntelSetOutput) SetName(v string) *GetThreatIntelSetOutput { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetThreatIntelSetOutput) SetStatus(v string) *GetThreatIntelSetOutput { - s.Status = &v - return s -} - -// The profile information of the EC2 instance. -type IamInstanceProfile struct { - _ struct{} `type:"structure"` - - // AWS EC2 instance profile ARN. - Arn *string `locationName:"arn" type:"string"` - - // AWS EC2 instance profile ID. - Id *string `locationName:"id" type:"string"` -} - -// String returns the string representation -func (s IamInstanceProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IamInstanceProfile) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *IamInstanceProfile) SetArn(v string) *IamInstanceProfile { - s.Arn = &v - return s -} - -// SetId sets the Id field's value. -func (s *IamInstanceProfile) SetId(v string) *IamInstanceProfile { - s.Id = &v - return s -} - -// The information about the EC2 instance associated with the activity that -// prompted GuardDuty to generate a finding. -type InstanceDetails struct { - _ struct{} `type:"structure"` - - // The availability zone of the EC2 instance. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The profile information of the EC2 instance. - IamInstanceProfile *IamInstanceProfile `locationName:"iamInstanceProfile" type:"structure"` - - // The image description of the EC2 instance. - ImageDescription *string `locationName:"imageDescription" type:"string"` - - // The image ID of the EC2 instance. - ImageId *string `locationName:"imageId" type:"string"` - - // The ID of the EC2 instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The state of the EC2 instance. - InstanceState *string `locationName:"instanceState" type:"string"` - - // The type of the EC2 instance. - InstanceType *string `locationName:"instanceType" type:"string"` - - // The launch time of the EC2 instance. - LaunchTime *string `locationName:"launchTime" type:"string"` - - // The network interface information of the EC2 instance. - NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaces" type:"list"` - - // The platform of the EC2 instance. - Platform *string `locationName:"platform" type:"string"` - - // The product code of the EC2 instance. - ProductCodes []*ProductCode `locationName:"productCodes" type:"list"` - - // The tags of the EC2 instance. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s InstanceDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceDetails) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *InstanceDetails) SetAvailabilityZone(v string) *InstanceDetails { - s.AvailabilityZone = &v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *InstanceDetails) SetIamInstanceProfile(v *IamInstanceProfile) *InstanceDetails { - s.IamInstanceProfile = v - return s -} - -// SetImageDescription sets the ImageDescription field's value. -func (s *InstanceDetails) SetImageDescription(v string) *InstanceDetails { - s.ImageDescription = &v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *InstanceDetails) SetImageId(v string) *InstanceDetails { - s.ImageId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceDetails) SetInstanceId(v string) *InstanceDetails { - s.InstanceId = &v - return s -} - -// SetInstanceState sets the InstanceState field's value. -func (s *InstanceDetails) SetInstanceState(v string) *InstanceDetails { - s.InstanceState = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *InstanceDetails) SetInstanceType(v string) *InstanceDetails { - s.InstanceType = &v - return s -} - -// SetLaunchTime sets the LaunchTime field's value. -func (s *InstanceDetails) SetLaunchTime(v string) *InstanceDetails { - s.LaunchTime = &v - return s -} - -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *InstanceDetails) SetNetworkInterfaces(v []*NetworkInterface) *InstanceDetails { - s.NetworkInterfaces = v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *InstanceDetails) SetPlatform(v string) *InstanceDetails { - s.Platform = &v - return s -} - -// SetProductCodes sets the ProductCodes field's value. -func (s *InstanceDetails) SetProductCodes(v []*ProductCode) *InstanceDetails { - s.ProductCodes = v - return s -} - -// SetTags sets the Tags field's value. -func (s *InstanceDetails) SetTags(v []*Tag) *InstanceDetails { - s.Tags = v - return s -} - -// Invitation from an AWS account to become the current account's master. -type Invitation struct { - _ struct{} `type:"structure"` - - // Inviter account ID - AccountId *string `locationName:"accountId" type:"string"` - - // This value is used to validate the inviter account to the member account. - InvitationId *string `locationName:"invitationId" type:"string"` - - // Timestamp at which the invitation was sent - InvitedAt *string `locationName:"invitedAt" type:"string"` - - // The status of the relationship between the inviter and invitee accounts. - RelationshipStatus *string `locationName:"relationshipStatus" type:"string"` -} - -// String returns the string representation -func (s Invitation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Invitation) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *Invitation) SetAccountId(v string) *Invitation { - s.AccountId = &v - return s -} - -// SetInvitationId sets the InvitationId field's value. -func (s *Invitation) SetInvitationId(v string) *Invitation { - s.InvitationId = &v - return s -} - -// SetInvitedAt sets the InvitedAt field's value. -func (s *Invitation) SetInvitedAt(v string) *Invitation { - s.InvitedAt = &v - return s -} - -// SetRelationshipStatus sets the RelationshipStatus field's value. -func (s *Invitation) SetRelationshipStatus(v string) *Invitation { - s.RelationshipStatus = &v - return s -} - -// InviteMembers request body. -type InviteMembersInput struct { - _ struct{} `type:"structure"` - - // A list of account IDs of the accounts that you want to invite to GuardDuty - // as members. - // - // AccountIds is a required field - AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // A boolean value that specifies whether you want to disable email notification - // to the accounts that you’re inviting to GuardDuty as members. - DisableEmailNotification *bool `locationName:"disableEmailNotification" type:"boolean"` - - // The invitation message that you want to send to the accounts that you’re - // inviting to GuardDuty as members. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s InviteMembersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InviteMembersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InviteMembersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InviteMembersInput"} - if s.AccountIds == nil { - invalidParams.Add(request.NewErrParamRequired("AccountIds")) - } - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountIds sets the AccountIds field's value. -func (s *InviteMembersInput) SetAccountIds(v []*string) *InviteMembersInput { - s.AccountIds = v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *InviteMembersInput) SetDetectorId(v string) *InviteMembersInput { - s.DetectorId = &v - return s -} - -// SetDisableEmailNotification sets the DisableEmailNotification field's value. -func (s *InviteMembersInput) SetDisableEmailNotification(v bool) *InviteMembersInput { - s.DisableEmailNotification = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *InviteMembersInput) SetMessage(v string) *InviteMembersInput { - s.Message = &v - return s -} - -// InviteMembers response object. -type InviteMembersOutput struct { - _ struct{} `type:"structure"` - - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. - UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list"` -} - -// String returns the string representation -func (s InviteMembersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InviteMembersOutput) GoString() string { - return s.String() -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *InviteMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *InviteMembersOutput { - s.UnprocessedAccounts = v - return s -} - -type ListDetectorsInput struct { - _ struct{} `type:"structure"` - - // You can use this parameter to indicate the maximum number of items that you - // want in the response. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListDetectorsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDetectorsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDetectorsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDetectorsInput"} - 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 *ListDetectorsInput) SetMaxResults(v int64) *ListDetectorsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDetectorsInput) SetNextToken(v string) *ListDetectorsInput { - s.NextToken = &v - return s -} - -// ListDetectors response object. -type ListDetectorsOutput struct { - _ struct{} `type:"structure"` - - // A list of detector Ids. - DetectorIds []*string `locationName:"detectorIds" type:"list"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the list action. For subsequent calls - // to the action fill nextToken in the request with the value of NextToken from - // the previous response to continue listing data. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListDetectorsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDetectorsOutput) GoString() string { - return s.String() -} - -// SetDetectorIds sets the DetectorIds field's value. -func (s *ListDetectorsOutput) SetDetectorIds(v []*string) *ListDetectorsOutput { - s.DetectorIds = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDetectorsOutput) SetNextToken(v string) *ListDetectorsOutput { - s.NextToken = &v - return s -} - -type ListFiltersInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // You can use this parameter to indicate the maximum number of items that you - // want in the response. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListFiltersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFiltersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListFiltersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListFiltersInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *ListFiltersInput) SetDetectorId(v string) *ListFiltersInput { - s.DetectorId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListFiltersInput) SetMaxResults(v int64) *ListFiltersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListFiltersInput) SetNextToken(v string) *ListFiltersInput { - s.NextToken = &v - return s -} - -// ListFilters response object. -type ListFiltersOutput struct { - _ struct{} `type:"structure"` - - // A list of filter names - FilterNames []*string `locationName:"filterNames" type:"list"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the list action. For subsequent calls - // to the action fill nextToken in the request with the value of NextToken from - // the previous response to continue listing data. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListFiltersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFiltersOutput) GoString() string { - return s.String() -} - -// SetFilterNames sets the FilterNames field's value. -func (s *ListFiltersOutput) SetFilterNames(v []*string) *ListFiltersOutput { - s.FilterNames = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListFiltersOutput) SetNextToken(v string) *ListFiltersOutput { - s.NextToken = &v - return s -} - -// List Findings Request -type ListFindingsInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // Represents the criteria used for querying findings. - FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` - - // You can use this parameter to indicate the maximum number of items you want - // in the response. The default value is 50. The maximum value is 50. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the ListFindings action. For subsequent - // calls to the action fill nextToken in the request with the value of nextToken - // from the previous response to continue listing data. - NextToken *string `locationName:"nextToken" type:"string"` - - // Represents the criteria used for sorting findings. - SortCriteria *SortCriteria `locationName:"sortCriteria" type:"structure"` -} - -// String returns the string representation -func (s ListFindingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFindingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListFindingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListFindingsInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *ListFindingsInput) SetDetectorId(v string) *ListFindingsInput { - s.DetectorId = &v - return s -} - -// SetFindingCriteria sets the FindingCriteria field's value. -func (s *ListFindingsInput) SetFindingCriteria(v *FindingCriteria) *ListFindingsInput { - s.FindingCriteria = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListFindingsInput) SetMaxResults(v int64) *ListFindingsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListFindingsInput) SetNextToken(v string) *ListFindingsInput { - s.NextToken = &v - return s -} - -// SetSortCriteria sets the SortCriteria field's value. -func (s *ListFindingsInput) SetSortCriteria(v *SortCriteria) *ListFindingsInput { - s.SortCriteria = v - return s -} - -// ListFindings response object. -type ListFindingsOutput struct { - _ struct{} `type:"structure"` - - // The list of the Findings. - FindingIds []*string `locationName:"findingIds" type:"list"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the list action. For subsequent calls - // to the action fill nextToken in the request with the value of NextToken from - // the previous response to continue listing data. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListFindingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFindingsOutput) GoString() string { - return s.String() -} - -// SetFindingIds sets the FindingIds field's value. -func (s *ListFindingsOutput) SetFindingIds(v []*string) *ListFindingsOutput { - s.FindingIds = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListFindingsOutput) SetNextToken(v string) *ListFindingsOutput { - s.NextToken = &v - return s -} - -type ListIPSetsInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // You can use this parameter to indicate the maximum number of items that you - // want in the response. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListIPSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIPSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListIPSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListIPSetsInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *ListIPSetsInput) SetDetectorId(v string) *ListIPSetsInput { - s.DetectorId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListIPSetsInput) SetMaxResults(v int64) *ListIPSetsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListIPSetsInput) SetNextToken(v string) *ListIPSetsInput { - s.NextToken = &v - return s -} - -// ListIPSets response object. -type ListIPSetsOutput struct { - _ struct{} `type:"structure"` - - // A list of the IP set IDs - IpSetIds []*string `locationName:"ipSetIds" type:"list"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the list action. For subsequent calls - // to the action fill nextToken in the request with the value of NextToken from - // the previous response to continue listing data. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListIPSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIPSetsOutput) GoString() string { - return s.String() -} - -// SetIpSetIds sets the IpSetIds field's value. -func (s *ListIPSetsOutput) SetIpSetIds(v []*string) *ListIPSetsOutput { - s.IpSetIds = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListIPSetsOutput) SetNextToken(v string) *ListIPSetsOutput { - s.NextToken = &v - return s -} - -type ListInvitationsInput struct { - _ struct{} `type:"structure"` - - // You can use this parameter to indicate the maximum number of items that you - // want in the response. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListInvitationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInvitationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInvitationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInvitationsInput"} - 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 *ListInvitationsInput) SetMaxResults(v int64) *ListInvitationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListInvitationsInput) SetNextToken(v string) *ListInvitationsInput { - s.NextToken = &v - return s -} - -// ListInvitations response object. -type ListInvitationsOutput struct { - _ struct{} `type:"structure"` - - // A list of invitation descriptions. - Invitations []*Invitation `locationName:"invitations" type:"list"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the list action. For subsequent calls - // to the action fill nextToken in the request with the value of NextToken from - // the previous response to continue listing data. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListInvitationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInvitationsOutput) GoString() string { - return s.String() -} - -// SetInvitations sets the Invitations field's value. -func (s *ListInvitationsOutput) SetInvitations(v []*Invitation) *ListInvitationsOutput { - s.Invitations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListInvitationsOutput) SetNextToken(v string) *ListInvitationsOutput { - s.NextToken = &v - return s -} - -type ListMembersInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // You can use this parameter to indicate the maximum number of items that you - // want in the response. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - OnlyAssociated *string `location:"querystring" locationName:"onlyAssociated" type:"string"` -} - -// String returns the string representation -func (s ListMembersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListMembersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListMembersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListMembersInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *ListMembersInput) SetDetectorId(v string) *ListMembersInput { - s.DetectorId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListMembersInput) SetMaxResults(v int64) *ListMembersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListMembersInput) SetNextToken(v string) *ListMembersInput { - s.NextToken = &v - return s -} - -// SetOnlyAssociated sets the OnlyAssociated field's value. -func (s *ListMembersInput) SetOnlyAssociated(v string) *ListMembersInput { - s.OnlyAssociated = &v - return s -} - -// ListMembers response object. -type ListMembersOutput struct { - _ struct{} `type:"structure"` - - // A list of member descriptions. - Members []*Member `locationName:"members" type:"list"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the list action. For subsequent calls - // to the action fill nextToken in the request with the value of NextToken from - // the previous response to continue listing data. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListMembersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListMembersOutput) GoString() string { - return s.String() -} - -// SetMembers sets the Members field's value. -func (s *ListMembersOutput) SetMembers(v []*Member) *ListMembersOutput { - s.Members = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListMembersOutput) SetNextToken(v string) *ListMembersOutput { - s.NextToken = &v - return s -} - -type ListThreatIntelSetsInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // You can use this parameter to indicate the maximum number of items that you - // want in the response. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListThreatIntelSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThreatIntelSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListThreatIntelSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListThreatIntelSetsInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *ListThreatIntelSetsInput) SetDetectorId(v string) *ListThreatIntelSetsInput { - s.DetectorId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListThreatIntelSetsInput) SetMaxResults(v int64) *ListThreatIntelSetsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThreatIntelSetsInput) SetNextToken(v string) *ListThreatIntelSetsInput { - s.NextToken = &v - return s -} - -// ListThreatIntelSets response object. -type ListThreatIntelSetsOutput struct { - _ struct{} `type:"structure"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the list action. For subsequent calls - // to the action fill nextToken in the request with the value of NextToken from - // the previous response to continue listing data. - NextToken *string `locationName:"nextToken" type:"string"` - - // The list of the threat intel set IDs - ThreatIntelSetIds []*string `locationName:"threatIntelSetIds" type:"list"` -} - -// String returns the string representation -func (s ListThreatIntelSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThreatIntelSetsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThreatIntelSetsOutput) SetNextToken(v string) *ListThreatIntelSetsOutput { - s.NextToken = &v - return s -} - -// SetThreatIntelSetIds sets the ThreatIntelSetIds field's value. -func (s *ListThreatIntelSetsOutput) SetThreatIntelSetIds(v []*string) *ListThreatIntelSetsOutput { - s.ThreatIntelSetIds = v - return s -} - -// Local port information of the connection. -type LocalPortDetails struct { - _ struct{} `type:"structure"` - - // Port number of the local connection. - Port *int64 `locationName:"port" type:"integer"` - - // Port name of the local connection. - PortName *string `locationName:"portName" type:"string"` -} - -// String returns the string representation -func (s LocalPortDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LocalPortDetails) GoString() string { - return s.String() -} - -// SetPort sets the Port field's value. -func (s *LocalPortDetails) SetPort(v int64) *LocalPortDetails { - s.Port = &v - return s -} - -// SetPortName sets the PortName field's value. -func (s *LocalPortDetails) SetPortName(v string) *LocalPortDetails { - s.PortName = &v - return s -} - -// Contains details about the master account. -type Master struct { - _ struct{} `type:"structure"` - - // Master account ID - AccountId *string `locationName:"accountId" type:"string"` - - // This value is used to validate the master account to the member account. - InvitationId *string `locationName:"invitationId" type:"string"` - - // Timestamp at which the invitation was sent - InvitedAt *string `locationName:"invitedAt" type:"string"` - - // The status of the relationship between the master and member accounts. - RelationshipStatus *string `locationName:"relationshipStatus" type:"string"` -} - -// String returns the string representation -func (s Master) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Master) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *Master) SetAccountId(v string) *Master { - s.AccountId = &v - return s -} - -// SetInvitationId sets the InvitationId field's value. -func (s *Master) SetInvitationId(v string) *Master { - s.InvitationId = &v - return s -} - -// SetInvitedAt sets the InvitedAt field's value. -func (s *Master) SetInvitedAt(v string) *Master { - s.InvitedAt = &v - return s -} - -// SetRelationshipStatus sets the RelationshipStatus field's value. -func (s *Master) SetRelationshipStatus(v string) *Master { - s.RelationshipStatus = &v - return s -} - -// Contains details about the member account. -type Member struct { - _ struct{} `type:"structure"` - - // AWS account ID. - // - // AccountId is a required field - AccountId *string `locationName:"accountId" type:"string" required:"true"` - - // The unique identifier for a detector. - DetectorId *string `locationName:"detectorId" type:"string"` - - // Member account's email address. - // - // Email is a required field - Email *string `locationName:"email" type:"string" required:"true"` - - // Timestamp at which the invitation was sent - InvitedAt *string `locationName:"invitedAt" type:"string"` - - // The master account ID. - // - // MasterId is a required field - MasterId *string `locationName:"masterId" type:"string" required:"true"` - - // The status of the relationship between the member and the master. - // - // RelationshipStatus is a required field - RelationshipStatus *string `locationName:"relationshipStatus" type:"string" required:"true"` - - // The first time a resource was created. The format will be ISO-8601. - // - // UpdatedAt is a required field - UpdatedAt *string `locationName:"updatedAt" type:"string" required:"true"` -} - -// String returns the string representation -func (s Member) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Member) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *Member) SetAccountId(v string) *Member { - s.AccountId = &v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *Member) SetDetectorId(v string) *Member { - s.DetectorId = &v - return s -} - -// SetEmail sets the Email field's value. -func (s *Member) SetEmail(v string) *Member { - s.Email = &v - return s -} - -// SetInvitedAt sets the InvitedAt field's value. -func (s *Member) SetInvitedAt(v string) *Member { - s.InvitedAt = &v - return s -} - -// SetMasterId sets the MasterId field's value. -func (s *Member) SetMasterId(v string) *Member { - s.MasterId = &v - return s -} - -// SetRelationshipStatus sets the RelationshipStatus field's value. -func (s *Member) SetRelationshipStatus(v string) *Member { - s.RelationshipStatus = &v - return s -} - -// SetUpdatedAt sets the UpdatedAt field's value. -func (s *Member) SetUpdatedAt(v string) *Member { - s.UpdatedAt = &v - return s -} - -// Information about the NETWORK_CONNECTION action described in this finding. -type NetworkConnectionAction struct { - _ struct{} `type:"structure"` - - // Network connection blocked information. - Blocked *bool `locationName:"blocked" type:"boolean"` - - // Network connection direction. - ConnectionDirection *string `locationName:"connectionDirection" type:"string"` - - // Local port information of the connection. - LocalPortDetails *LocalPortDetails `locationName:"localPortDetails" type:"structure"` - - // Network connection protocol. - Protocol *string `locationName:"protocol" type:"string"` - - // Remote IP information of the connection. - RemoteIpDetails *RemoteIpDetails `locationName:"remoteIpDetails" type:"structure"` - - // Remote port information of the connection. - RemotePortDetails *RemotePortDetails `locationName:"remotePortDetails" type:"structure"` -} - -// String returns the string representation -func (s NetworkConnectionAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkConnectionAction) GoString() string { - return s.String() -} - -// SetBlocked sets the Blocked field's value. -func (s *NetworkConnectionAction) SetBlocked(v bool) *NetworkConnectionAction { - s.Blocked = &v - return s -} - -// SetConnectionDirection sets the ConnectionDirection field's value. -func (s *NetworkConnectionAction) SetConnectionDirection(v string) *NetworkConnectionAction { - s.ConnectionDirection = &v - return s -} - -// SetLocalPortDetails sets the LocalPortDetails field's value. -func (s *NetworkConnectionAction) SetLocalPortDetails(v *LocalPortDetails) *NetworkConnectionAction { - s.LocalPortDetails = v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *NetworkConnectionAction) SetProtocol(v string) *NetworkConnectionAction { - s.Protocol = &v - return s -} - -// SetRemoteIpDetails sets the RemoteIpDetails field's value. -func (s *NetworkConnectionAction) SetRemoteIpDetails(v *RemoteIpDetails) *NetworkConnectionAction { - s.RemoteIpDetails = v - return s -} - -// SetRemotePortDetails sets the RemotePortDetails field's value. -func (s *NetworkConnectionAction) SetRemotePortDetails(v *RemotePortDetails) *NetworkConnectionAction { - s.RemotePortDetails = v - return s -} - -// The network interface information of the EC2 instance. -type NetworkInterface struct { - _ struct{} `type:"structure"` - - // A list of EC2 instance IPv6 address information. - Ipv6Addresses []*string `locationName:"ipv6Addresses" type:"list"` - - // The ID of the network interface - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // Private DNS name of the EC2 instance. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - - // Private IP address of the EC2 instance. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // Other private IP address information of the EC2 instance. - PrivateIpAddresses []*PrivateIpAddressDetails `locationName:"privateIpAddresses" type:"list"` - - // Public DNS name of the EC2 instance. - PublicDnsName *string `locationName:"publicDnsName" type:"string"` - - // Public IP address of the EC2 instance. - PublicIp *string `locationName:"publicIp" type:"string"` - - // Security groups associated with the EC2 instance. - SecurityGroups []*SecurityGroup `locationName:"securityGroups" type:"list"` - - // The subnet ID of the EC2 instance. - SubnetId *string `locationName:"subnetId" type:"string"` - - // The VPC ID of the EC2 instance. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s NetworkInterface) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInterface) GoString() string { - return s.String() -} - -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *NetworkInterface) SetIpv6Addresses(v []*string) *NetworkInterface { - s.Ipv6Addresses = v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *NetworkInterface) SetNetworkInterfaceId(v string) *NetworkInterface { - s.NetworkInterfaceId = &v - return s -} - -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *NetworkInterface) SetPrivateDnsName(v string) *NetworkInterface { - s.PrivateDnsName = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *NetworkInterface) SetPrivateIpAddress(v string) *NetworkInterface { - s.PrivateIpAddress = &v - return s -} - -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *NetworkInterface) SetPrivateIpAddresses(v []*PrivateIpAddressDetails) *NetworkInterface { - s.PrivateIpAddresses = v - return s -} - -// SetPublicDnsName sets the PublicDnsName field's value. -func (s *NetworkInterface) SetPublicDnsName(v string) *NetworkInterface { - s.PublicDnsName = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *NetworkInterface) SetPublicIp(v string) *NetworkInterface { - s.PublicIp = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *NetworkInterface) SetSecurityGroups(v []*SecurityGroup) *NetworkInterface { - s.SecurityGroups = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *NetworkInterface) SetSubnetId(v string) *NetworkInterface { - s.SubnetId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *NetworkInterface) SetVpcId(v string) *NetworkInterface { - s.VpcId = &v - return s -} - -// ISP Organization information of the remote IP address. -type Organization struct { - _ struct{} `type:"structure"` - - // Autonomous system number of the internet provider of the remote IP address. - Asn *string `locationName:"asn" type:"string"` - - // Organization that registered this ASN. - AsnOrg *string `locationName:"asnOrg" type:"string"` - - // ISP information for the internet provider. - Isp *string `locationName:"isp" type:"string"` - - // Name of the internet provider. - Org *string `locationName:"org" type:"string"` -} - -// String returns the string representation -func (s Organization) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Organization) GoString() string { - return s.String() -} - -// SetAsn sets the Asn field's value. -func (s *Organization) SetAsn(v string) *Organization { - s.Asn = &v - return s -} - -// SetAsnOrg sets the AsnOrg field's value. -func (s *Organization) SetAsnOrg(v string) *Organization { - s.AsnOrg = &v - return s -} - -// SetIsp sets the Isp field's value. -func (s *Organization) SetIsp(v string) *Organization { - s.Isp = &v - return s -} - -// SetOrg sets the Org field's value. -func (s *Organization) SetOrg(v string) *Organization { - s.Org = &v - return s -} - -// Information about the PORT_PROBE action described in this finding. -type PortProbeAction struct { - _ struct{} `type:"structure"` - - // Port probe blocked information. - Blocked *bool `locationName:"blocked" type:"boolean"` - - // A list of port probe details objects. - PortProbeDetails []*PortProbeDetail `locationName:"portProbeDetails" type:"list"` -} - -// String returns the string representation -func (s PortProbeAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PortProbeAction) GoString() string { - return s.String() -} - -// SetBlocked sets the Blocked field's value. -func (s *PortProbeAction) SetBlocked(v bool) *PortProbeAction { - s.Blocked = &v - return s -} - -// SetPortProbeDetails sets the PortProbeDetails field's value. -func (s *PortProbeAction) SetPortProbeDetails(v []*PortProbeDetail) *PortProbeAction { - s.PortProbeDetails = v - return s -} - -// Details about the port probe finding. -type PortProbeDetail struct { - _ struct{} `type:"structure"` - - // Local port information of the connection. - LocalPortDetails *LocalPortDetails `locationName:"localPortDetails" type:"structure"` - - // Remote IP information of the connection. - RemoteIpDetails *RemoteIpDetails `locationName:"remoteIpDetails" type:"structure"` -} - -// String returns the string representation -func (s PortProbeDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PortProbeDetail) GoString() string { - return s.String() -} - -// SetLocalPortDetails sets the LocalPortDetails field's value. -func (s *PortProbeDetail) SetLocalPortDetails(v *LocalPortDetails) *PortProbeDetail { - s.LocalPortDetails = v - return s -} - -// SetRemoteIpDetails sets the RemoteIpDetails field's value. -func (s *PortProbeDetail) SetRemoteIpDetails(v *RemoteIpDetails) *PortProbeDetail { - s.RemoteIpDetails = v - return s -} - -// Other private IP address information of the EC2 instance. -type PrivateIpAddressDetails struct { - _ struct{} `type:"structure"` - - // Private DNS name of the EC2 instance. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - - // Private IP address of the EC2 instance. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` -} - -// String returns the string representation -func (s PrivateIpAddressDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PrivateIpAddressDetails) GoString() string { - return s.String() -} - -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *PrivateIpAddressDetails) SetPrivateDnsName(v string) *PrivateIpAddressDetails { - s.PrivateDnsName = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *PrivateIpAddressDetails) SetPrivateIpAddress(v string) *PrivateIpAddressDetails { - s.PrivateIpAddress = &v - return s -} - -// The product code of the EC2 instance. -type ProductCode struct { - _ struct{} `type:"structure"` - - // Product code information. - Code *string `locationName:"code" type:"string"` - - // Product code type. - ProductType *string `locationName:"productType" type:"string"` -} - -// String returns the string representation -func (s ProductCode) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProductCode) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *ProductCode) SetCode(v string) *ProductCode { - s.Code = &v - return s -} - -// SetProductType sets the ProductType field's value. -func (s *ProductCode) SetProductType(v string) *ProductCode { - s.ProductType = &v - return s -} - -// Remote IP information of the connection. -type RemoteIpDetails struct { - _ struct{} `type:"structure"` - - // City information of the remote IP address. - City *City `locationName:"city" type:"structure"` - - // Country code of the remote IP address. - Country *Country `locationName:"country" type:"structure"` - - // Location information of the remote IP address. - GeoLocation *GeoLocation `locationName:"geoLocation" type:"structure"` - - // IPV4 remote address of the connection. - IpAddressV4 *string `locationName:"ipAddressV4" type:"string"` - - // ISP Organization information of the remote IP address. - Organization *Organization `locationName:"organization" type:"structure"` -} - -// String returns the string representation -func (s RemoteIpDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoteIpDetails) GoString() string { - return s.String() -} - -// SetCity sets the City field's value. -func (s *RemoteIpDetails) SetCity(v *City) *RemoteIpDetails { - s.City = v - return s -} - -// SetCountry sets the Country field's value. -func (s *RemoteIpDetails) SetCountry(v *Country) *RemoteIpDetails { - s.Country = v - return s -} - -// SetGeoLocation sets the GeoLocation field's value. -func (s *RemoteIpDetails) SetGeoLocation(v *GeoLocation) *RemoteIpDetails { - s.GeoLocation = v - return s -} - -// SetIpAddressV4 sets the IpAddressV4 field's value. -func (s *RemoteIpDetails) SetIpAddressV4(v string) *RemoteIpDetails { - s.IpAddressV4 = &v - return s -} - -// SetOrganization sets the Organization field's value. -func (s *RemoteIpDetails) SetOrganization(v *Organization) *RemoteIpDetails { - s.Organization = v - return s -} - -// Remote port information of the connection. -type RemotePortDetails struct { - _ struct{} `type:"structure"` - - // Port number of the remote connection. - Port *int64 `locationName:"port" type:"integer"` - - // Port name of the remote connection. - PortName *string `locationName:"portName" type:"string"` -} - -// String returns the string representation -func (s RemotePortDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemotePortDetails) GoString() string { - return s.String() -} - -// SetPort sets the Port field's value. -func (s *RemotePortDetails) SetPort(v int64) *RemotePortDetails { - s.Port = &v - return s -} - -// SetPortName sets the PortName field's value. -func (s *RemotePortDetails) SetPortName(v string) *RemotePortDetails { - s.PortName = &v - return s -} - -// The AWS resource associated with the activity that prompted GuardDuty to -// generate a finding. -type Resource struct { - _ struct{} `type:"structure"` - - // The IAM access key details (IAM user information) of a user that engaged - // in the activity that prompted GuardDuty to generate a finding. - AccessKeyDetails *AccessKeyDetails `locationName:"accessKeyDetails" type:"structure"` - - // The information about the EC2 instance associated with the activity that - // prompted GuardDuty to generate a finding. - InstanceDetails *InstanceDetails `locationName:"instanceDetails" type:"structure"` - - // The type of the AWS resource. - ResourceType *string `locationName:"resourceType" type:"string"` -} - -// 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() -} - -// SetAccessKeyDetails sets the AccessKeyDetails field's value. -func (s *Resource) SetAccessKeyDetails(v *AccessKeyDetails) *Resource { - s.AccessKeyDetails = v - return s -} - -// SetInstanceDetails sets the InstanceDetails field's value. -func (s *Resource) SetInstanceDetails(v *InstanceDetails) *Resource { - s.InstanceDetails = v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *Resource) SetResourceType(v string) *Resource { - s.ResourceType = &v - return s -} - -// Security groups associated with the EC2 instance. -type SecurityGroup struct { - _ struct{} `type:"structure"` - - // EC2 instance's security group ID. - GroupId *string `locationName:"groupId" type:"string"` - - // EC2 instance's security group name. - GroupName *string `locationName:"groupName" type:"string"` -} - -// String returns the string representation -func (s SecurityGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecurityGroup) GoString() string { - return s.String() -} - -// SetGroupId sets the GroupId field's value. -func (s *SecurityGroup) SetGroupId(v string) *SecurityGroup { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *SecurityGroup) SetGroupName(v string) *SecurityGroup { - s.GroupName = &v - return s -} - -// Additional information assigned to the generated finding by GuardDuty. -type Service struct { - _ struct{} `type:"structure"` - - // Information about the activity described in a finding. - Action *Action `locationName:"action" type:"structure"` - - // Indicates whether this finding is archived. - Archived *bool `locationName:"archived" type:"boolean"` - - // Total count of the occurrences of this finding type. - Count *int64 `locationName:"count" type:"integer"` - - // Detector ID for the GuardDuty service. - DetectorId *string `locationName:"detectorId" type:"string"` - - // First seen timestamp of the activity that prompted GuardDuty to generate - // this finding. - EventFirstSeen *string `locationName:"eventFirstSeen" type:"string"` - - // Last seen timestamp of the activity that prompted GuardDuty to generate this - // finding. - EventLastSeen *string `locationName:"eventLastSeen" type:"string"` - - // Resource role information for this finding. - ResourceRole *string `locationName:"resourceRole" type:"string"` - - // The name of the AWS service (GuardDuty) that generated a finding. - ServiceName *string `locationName:"serviceName" type:"string"` - - // Feedback left about the finding. - UserFeedback *string `locationName:"userFeedback" type:"string"` -} - -// String returns the string representation -func (s Service) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Service) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *Service) SetAction(v *Action) *Service { - s.Action = v - return s -} - -// SetArchived sets the Archived field's value. -func (s *Service) SetArchived(v bool) *Service { - s.Archived = &v - return s -} - -// SetCount sets the Count field's value. -func (s *Service) SetCount(v int64) *Service { - s.Count = &v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *Service) SetDetectorId(v string) *Service { - s.DetectorId = &v - return s -} - -// SetEventFirstSeen sets the EventFirstSeen field's value. -func (s *Service) SetEventFirstSeen(v string) *Service { - s.EventFirstSeen = &v - return s -} - -// SetEventLastSeen sets the EventLastSeen field's value. -func (s *Service) SetEventLastSeen(v string) *Service { - s.EventLastSeen = &v - return s -} - -// SetResourceRole sets the ResourceRole field's value. -func (s *Service) SetResourceRole(v string) *Service { - s.ResourceRole = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *Service) SetServiceName(v string) *Service { - s.ServiceName = &v - return s -} - -// SetUserFeedback sets the UserFeedback field's value. -func (s *Service) SetUserFeedback(v string) *Service { - s.UserFeedback = &v - return s -} - -// Represents the criteria used for sorting findings. -type SortCriteria struct { - _ struct{} `type:"structure"` - - // Represents the finding attribute (for example, accountId) by which to sort - // findings. - AttributeName *string `locationName:"attributeName" type:"string"` - - // Order by which the sorted findings are to be displayed. - OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"` -} - -// String returns the string representation -func (s SortCriteria) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SortCriteria) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *SortCriteria) SetAttributeName(v string) *SortCriteria { - s.AttributeName = &v - return s -} - -// SetOrderBy sets the OrderBy field's value. -func (s *SortCriteria) SetOrderBy(v string) *SortCriteria { - s.OrderBy = &v - return s -} - -// StartMonitoringMembers request body. -type StartMonitoringMembersInput struct { - _ struct{} `type:"structure"` - - // A list of account IDs of the GuardDuty member accounts whose findings you - // want the master account to monitor. - // - // AccountIds is a required field - AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartMonitoringMembersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartMonitoringMembersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartMonitoringMembersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartMonitoringMembersInput"} - if s.AccountIds == nil { - invalidParams.Add(request.NewErrParamRequired("AccountIds")) - } - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountIds sets the AccountIds field's value. -func (s *StartMonitoringMembersInput) SetAccountIds(v []*string) *StartMonitoringMembersInput { - s.AccountIds = v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *StartMonitoringMembersInput) SetDetectorId(v string) *StartMonitoringMembersInput { - s.DetectorId = &v - return s -} - -// StartMonitoringMembers response object. -type StartMonitoringMembersOutput struct { - _ struct{} `type:"structure"` - - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. - UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list"` -} - -// String returns the string representation -func (s StartMonitoringMembersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartMonitoringMembersOutput) GoString() string { - return s.String() -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *StartMonitoringMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *StartMonitoringMembersOutput { - s.UnprocessedAccounts = v - return s -} - -// StopMonitoringMembers request body. -type StopMonitoringMembersInput struct { - _ struct{} `type:"structure"` - - // A list of account IDs of the GuardDuty member accounts whose findings you - // want the master account to stop monitoring. - // - // AccountIds is a required field - AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopMonitoringMembersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopMonitoringMembersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopMonitoringMembersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopMonitoringMembersInput"} - if s.AccountIds == nil { - invalidParams.Add(request.NewErrParamRequired("AccountIds")) - } - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountIds sets the AccountIds field's value. -func (s *StopMonitoringMembersInput) SetAccountIds(v []*string) *StopMonitoringMembersInput { - s.AccountIds = v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *StopMonitoringMembersInput) SetDetectorId(v string) *StopMonitoringMembersInput { - s.DetectorId = &v - return s -} - -// StopMonitoringMembers response object. -type StopMonitoringMembersOutput struct { - _ struct{} `type:"structure"` - - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. - UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list"` -} - -// String returns the string representation -func (s StopMonitoringMembersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopMonitoringMembersOutput) GoString() string { - return s.String() -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *StopMonitoringMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *StopMonitoringMembersOutput { - s.UnprocessedAccounts = v - return s -} - -// A tag of the EC2 instance. -type Tag struct { - _ struct{} `type:"structure"` - - // EC2 instance tag key. - Key *string `locationName:"key" type:"string"` - - // EC2 instance tag value. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Unrchive Findings Request -type UnarchiveFindingsInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // IDs of the findings that you want to unarchive. - // - // FindingIds is a required field - FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` -} - -// String returns the string representation -func (s UnarchiveFindingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnarchiveFindingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UnarchiveFindingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UnarchiveFindingsInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.FindingIds == nil { - invalidParams.Add(request.NewErrParamRequired("FindingIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *UnarchiveFindingsInput) SetDetectorId(v string) *UnarchiveFindingsInput { - s.DetectorId = &v - return s -} - -// SetFindingIds sets the FindingIds field's value. -func (s *UnarchiveFindingsInput) SetFindingIds(v []*string) *UnarchiveFindingsInput { - s.FindingIds = v - return s -} - -type UnarchiveFindingsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UnarchiveFindingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnarchiveFindingsOutput) GoString() string { - return s.String() -} - -// An object containing the unprocessed account and a result string explaining -// why it was unprocessed. -type UnprocessedAccount struct { - _ struct{} `type:"structure"` - - // AWS Account ID. - // - // AccountId is a required field - AccountId *string `locationName:"accountId" type:"string" required:"true"` - - // A reason why the account hasn't been processed. - // - // Result is a required field - Result *string `locationName:"result" type:"string" required:"true"` -} - -// String returns the string representation -func (s UnprocessedAccount) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnprocessedAccount) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *UnprocessedAccount) SetAccountId(v string) *UnprocessedAccount { - s.AccountId = &v - return s -} - -// SetResult sets the Result field's value. -func (s *UnprocessedAccount) SetResult(v string) *UnprocessedAccount { - s.Result = &v - return s -} - -// Update Detector Request -type UpdateDetectorInput struct { - _ struct{} `type:"structure"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // Updated boolean value for the detector that specifies whether the detector - // is enabled. - Enable *bool `locationName:"enable" type:"boolean"` - - // A enum value that specifies how frequently customer got Finding updates published. - FindingPublishingFrequency *string `locationName:"findingPublishingFrequency" type:"string" enum:"FindingPublishingFrequency"` -} - -// String returns the string representation -func (s UpdateDetectorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDetectorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDetectorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDetectorInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetectorId sets the DetectorId field's value. -func (s *UpdateDetectorInput) SetDetectorId(v string) *UpdateDetectorInput { - s.DetectorId = &v - return s -} - -// SetEnable sets the Enable field's value. -func (s *UpdateDetectorInput) SetEnable(v bool) *UpdateDetectorInput { - s.Enable = &v - return s -} - -// SetFindingPublishingFrequency sets the FindingPublishingFrequency field's value. -func (s *UpdateDetectorInput) SetFindingPublishingFrequency(v string) *UpdateDetectorInput { - s.FindingPublishingFrequency = &v - return s -} - -type UpdateDetectorOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateDetectorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDetectorOutput) GoString() string { - return s.String() -} - -// UpdateFilter request object. -type UpdateFilterInput struct { - _ struct{} `type:"structure"` - - // Specifies the action that is to be applied to the findings that match the - // filter. - Action *string `locationName:"action" type:"string" enum:"FilterAction"` - - // The description of the filter. - Description *string `locationName:"description" type:"string"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // FilterName is a required field - FilterName *string `location:"uri" locationName:"filterName" type:"string" required:"true"` - - // Represents the criteria to be used in the filter for querying findings. - FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` - - // Specifies the position of the filter in the list of current filters. Also - // specifies the order in which this filter is applied to the findings. - Rank *int64 `locationName:"rank" type:"integer"` -} - -// String returns the string representation -func (s UpdateFilterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFilterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFilterInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.FilterName == nil { - invalidParams.Add(request.NewErrParamRequired("FilterName")) - } - if s.FilterName != nil && len(*s.FilterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *UpdateFilterInput) SetAction(v string) *UpdateFilterInput { - s.Action = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateFilterInput) SetDescription(v string) *UpdateFilterInput { - s.Description = &v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *UpdateFilterInput) SetDetectorId(v string) *UpdateFilterInput { - s.DetectorId = &v - return s -} - -// SetFilterName sets the FilterName field's value. -func (s *UpdateFilterInput) SetFilterName(v string) *UpdateFilterInput { - s.FilterName = &v - return s -} - -// SetFindingCriteria sets the FindingCriteria field's value. -func (s *UpdateFilterInput) SetFindingCriteria(v *FindingCriteria) *UpdateFilterInput { - s.FindingCriteria = v - return s -} - -// SetRank sets the Rank field's value. -func (s *UpdateFilterInput) SetRank(v int64) *UpdateFilterInput { - s.Rank = &v - return s -} - -// UpdateFilter response object. -type UpdateFilterOutput struct { - _ struct{} `type:"structure"` - - // The name of the filter. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s UpdateFilterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFilterOutput) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *UpdateFilterOutput) SetName(v string) *UpdateFilterOutput { - s.Name = &v - return s -} - -// Update findings feedback body -type UpdateFindingsFeedbackInput struct { - _ struct{} `type:"structure"` - - // Additional feedback about the GuardDuty findings. - Comments *string `locationName:"comments" type:"string"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // Valid values: USEFUL | NOT_USEFUL - // - // Feedback is a required field - Feedback *string `locationName:"feedback" type:"string" required:"true" enum:"Feedback"` - - // IDs of the findings that you want to mark as useful or not useful. - // - // FindingIds is a required field - FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateFindingsFeedbackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFindingsFeedbackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFindingsFeedbackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFindingsFeedbackInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.Feedback == nil { - invalidParams.Add(request.NewErrParamRequired("Feedback")) - } - if s.FindingIds == nil { - invalidParams.Add(request.NewErrParamRequired("FindingIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComments sets the Comments field's value. -func (s *UpdateFindingsFeedbackInput) SetComments(v string) *UpdateFindingsFeedbackInput { - s.Comments = &v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *UpdateFindingsFeedbackInput) SetDetectorId(v string) *UpdateFindingsFeedbackInput { - s.DetectorId = &v - return s -} - -// SetFeedback sets the Feedback field's value. -func (s *UpdateFindingsFeedbackInput) SetFeedback(v string) *UpdateFindingsFeedbackInput { - s.Feedback = &v - return s -} - -// SetFindingIds sets the FindingIds field's value. -func (s *UpdateFindingsFeedbackInput) SetFindingIds(v []*string) *UpdateFindingsFeedbackInput { - s.FindingIds = v - return s -} - -type UpdateFindingsFeedbackOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateFindingsFeedbackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFindingsFeedbackOutput) GoString() string { - return s.String() -} - -// Update IP Set Request -type UpdateIPSetInput struct { - _ struct{} `type:"structure"` - - // The updated boolean value that specifies whether the IPSet is active or not. - Activate *bool `locationName:"activate" type:"boolean"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // IpSetId is a required field - IpSetId *string `location:"uri" locationName:"ipSetId" type:"string" required:"true"` - - // The updated URI of the file that contains the IPSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key). - Location *string `locationName:"location" type:"string"` - - // The unique ID that specifies the IPSet that you want to update. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s UpdateIPSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIPSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateIPSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateIPSetInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.IpSetId == nil { - invalidParams.Add(request.NewErrParamRequired("IpSetId")) - } - if s.IpSetId != nil && len(*s.IpSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IpSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivate sets the Activate field's value. -func (s *UpdateIPSetInput) SetActivate(v bool) *UpdateIPSetInput { - s.Activate = &v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *UpdateIPSetInput) SetDetectorId(v string) *UpdateIPSetInput { - s.DetectorId = &v - return s -} - -// SetIpSetId sets the IpSetId field's value. -func (s *UpdateIPSetInput) SetIpSetId(v string) *UpdateIPSetInput { - s.IpSetId = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *UpdateIPSetInput) SetLocation(v string) *UpdateIPSetInput { - s.Location = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateIPSetInput) SetName(v string) *UpdateIPSetInput { - s.Name = &v - return s -} - -type UpdateIPSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateIPSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIPSetOutput) GoString() string { - return s.String() -} - -// Update Threat Intel Set Request -type UpdateThreatIntelSetInput struct { - _ struct{} `type:"structure"` - - // The updated boolean value that specifies whether the ThreateIntelSet is active - // or not. - Activate *bool `locationName:"activate" type:"boolean"` - - // DetectorId is a required field - DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - - // The updated URI of the file that contains the ThreateIntelSet. For example - // (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key) - Location *string `locationName:"location" type:"string"` - - // The unique ID that specifies the ThreatIntelSet that you want to update. - Name *string `locationName:"name" type:"string"` - - // ThreatIntelSetId is a required field - ThreatIntelSetId *string `location:"uri" locationName:"threatIntelSetId" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateThreatIntelSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateThreatIntelSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateThreatIntelSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateThreatIntelSetInput"} - if s.DetectorId == nil { - invalidParams.Add(request.NewErrParamRequired("DetectorId")) - } - if s.DetectorId != nil && len(*s.DetectorId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) - } - if s.ThreatIntelSetId == nil { - invalidParams.Add(request.NewErrParamRequired("ThreatIntelSetId")) - } - if s.ThreatIntelSetId != nil && len(*s.ThreatIntelSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThreatIntelSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivate sets the Activate field's value. -func (s *UpdateThreatIntelSetInput) SetActivate(v bool) *UpdateThreatIntelSetInput { - s.Activate = &v - return s -} - -// SetDetectorId sets the DetectorId field's value. -func (s *UpdateThreatIntelSetInput) SetDetectorId(v string) *UpdateThreatIntelSetInput { - s.DetectorId = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *UpdateThreatIntelSetInput) SetLocation(v string) *UpdateThreatIntelSetInput { - s.Location = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateThreatIntelSetInput) SetName(v string) *UpdateThreatIntelSetInput { - s.Name = &v - return s -} - -// SetThreatIntelSetId sets the ThreatIntelSetId field's value. -func (s *UpdateThreatIntelSetInput) SetThreatIntelSetId(v string) *UpdateThreatIntelSetInput { - s.ThreatIntelSetId = &v - return s -} - -type UpdateThreatIntelSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateThreatIntelSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateThreatIntelSetOutput) GoString() string { - return s.String() -} - -// The status of detector. -const ( - // DetectorStatusEnabled is a DetectorStatus enum value - DetectorStatusEnabled = "ENABLED" - - // DetectorStatusDisabled is a DetectorStatus enum value - DetectorStatusDisabled = "DISABLED" -) - -// Finding Feedback Value -const ( - // FeedbackUseful is a Feedback enum value - FeedbackUseful = "USEFUL" - - // FeedbackNotUseful is a Feedback enum value - FeedbackNotUseful = "NOT_USEFUL" -) - -// The action associated with a filter. -const ( - // FilterActionNoop is a FilterAction enum value - FilterActionNoop = "NOOP" - - // FilterActionArchive is a FilterAction enum value - FilterActionArchive = "ARCHIVE" -) - -// A enum value that specifies how frequently customer got Finding updates published. -const ( - // FindingPublishingFrequencyFifteenMinutes is a FindingPublishingFrequency enum value - FindingPublishingFrequencyFifteenMinutes = "FIFTEEN_MINUTES" - - // FindingPublishingFrequencyOneHour is a FindingPublishingFrequency enum value - FindingPublishingFrequencyOneHour = "ONE_HOUR" - - // FindingPublishingFrequencySixHours is a FindingPublishingFrequency enum value - FindingPublishingFrequencySixHours = "SIX_HOURS" -) - -// The types of finding statistics. -const ( - // FindingStatisticTypeCountBySeverity is a FindingStatisticType enum value - FindingStatisticTypeCountBySeverity = "COUNT_BY_SEVERITY" -) - -// The format of the ipSet. -const ( - // IpSetFormatTxt is a IpSetFormat enum value - IpSetFormatTxt = "TXT" - - // IpSetFormatStix is a IpSetFormat enum value - IpSetFormatStix = "STIX" - - // IpSetFormatOtxCsv is a IpSetFormat enum value - IpSetFormatOtxCsv = "OTX_CSV" - - // IpSetFormatAlienVault is a IpSetFormat enum value - IpSetFormatAlienVault = "ALIEN_VAULT" - - // IpSetFormatProofPoint is a IpSetFormat enum value - IpSetFormatProofPoint = "PROOF_POINT" - - // IpSetFormatFireEye is a IpSetFormat enum value - IpSetFormatFireEye = "FIRE_EYE" -) - -// The status of ipSet file uploaded. -const ( - // IpSetStatusInactive is a IpSetStatus enum value - IpSetStatusInactive = "INACTIVE" - - // IpSetStatusActivating is a IpSetStatus enum value - IpSetStatusActivating = "ACTIVATING" - - // IpSetStatusActive is a IpSetStatus enum value - IpSetStatusActive = "ACTIVE" - - // IpSetStatusDeactivating is a IpSetStatus enum value - IpSetStatusDeactivating = "DEACTIVATING" - - // IpSetStatusError is a IpSetStatus enum value - IpSetStatusError = "ERROR" - - // IpSetStatusDeletePending is a IpSetStatus enum value - IpSetStatusDeletePending = "DELETE_PENDING" - - // IpSetStatusDeleted is a IpSetStatus enum value - IpSetStatusDeleted = "DELETED" -) - -const ( - // OrderByAsc is a OrderBy enum value - OrderByAsc = "ASC" - - // OrderByDesc is a OrderBy enum value - OrderByDesc = "DESC" -) - -// The format of the threatIntelSet. -const ( - // ThreatIntelSetFormatTxt is a ThreatIntelSetFormat enum value - ThreatIntelSetFormatTxt = "TXT" - - // ThreatIntelSetFormatStix is a ThreatIntelSetFormat enum value - ThreatIntelSetFormatStix = "STIX" - - // ThreatIntelSetFormatOtxCsv is a ThreatIntelSetFormat enum value - ThreatIntelSetFormatOtxCsv = "OTX_CSV" - - // ThreatIntelSetFormatAlienVault is a ThreatIntelSetFormat enum value - ThreatIntelSetFormatAlienVault = "ALIEN_VAULT" - - // ThreatIntelSetFormatProofPoint is a ThreatIntelSetFormat enum value - ThreatIntelSetFormatProofPoint = "PROOF_POINT" - - // ThreatIntelSetFormatFireEye is a ThreatIntelSetFormat enum value - ThreatIntelSetFormatFireEye = "FIRE_EYE" -) - -// The status of threatIntelSet file uploaded. -const ( - // ThreatIntelSetStatusInactive is a ThreatIntelSetStatus enum value - ThreatIntelSetStatusInactive = "INACTIVE" - - // ThreatIntelSetStatusActivating is a ThreatIntelSetStatus enum value - ThreatIntelSetStatusActivating = "ACTIVATING" - - // ThreatIntelSetStatusActive is a ThreatIntelSetStatus enum value - ThreatIntelSetStatusActive = "ACTIVE" - - // ThreatIntelSetStatusDeactivating is a ThreatIntelSetStatus enum value - ThreatIntelSetStatusDeactivating = "DEACTIVATING" - - // ThreatIntelSetStatusError is a ThreatIntelSetStatus enum value - ThreatIntelSetStatusError = "ERROR" - - // ThreatIntelSetStatusDeletePending is a ThreatIntelSetStatus enum value - ThreatIntelSetStatusDeletePending = "DELETE_PENDING" - - // ThreatIntelSetStatusDeleted is a ThreatIntelSetStatus enum value - ThreatIntelSetStatusDeleted = "DELETED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/doc.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/doc.go deleted file mode 100644 index 91bb16a2e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/doc.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package guardduty provides the client and types for making API -// requests to Amazon GuardDuty. -// -// Assess, monitor, manage, and remediate security issues across your AWS infrastructure, -// applications, and data. -// -// See https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28 for more information on this service. -// -// See guardduty package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/guardduty/ -// -// Using the Client -// -// To contact Amazon GuardDuty with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon GuardDuty client GuardDuty for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/guardduty/#New -package guardduty diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/errors.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/errors.go deleted file mode 100644 index 8f0473b63..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/errors.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package guardduty - -const ( - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - // - // Error response object. - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeInternalServerErrorException for service response error code - // "InternalServerErrorException". - // - // Error response object. - ErrCodeInternalServerErrorException = "InternalServerErrorException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go deleted file mode 100644 index 0ca09946c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package guardduty - -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" -) - -// GuardDuty provides the API operation methods for making requests to -// Amazon GuardDuty. See this package's package overview docs -// for details on the service. -// -// GuardDuty methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type GuardDuty 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 = "guardduty" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "GuardDuty" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the GuardDuty client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a GuardDuty client from just a session. -// svc := guardduty.New(mySession) -// -// // Create a GuardDuty client with additional configuration -// svc := guardduty.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *GuardDuty { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "guardduty" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *GuardDuty { - svc := &GuardDuty{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-11-28", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a GuardDuty operation and runs any -// custom request initialization. -func (c *GuardDuty) 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/inspector/api.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go deleted file mode 100644 index b05d86441..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go +++ /dev/null @@ -1,10010 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package inspector - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAddAttributesToFindings = "AddAttributesToFindings" - -// AddAttributesToFindingsRequest generates a "aws/request.Request" representing the -// client's request for the AddAttributesToFindings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddAttributesToFindings for more information on using the AddAttributesToFindings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddAttributesToFindingsRequest method. -// req, resp := client.AddAttributesToFindingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AddAttributesToFindings -func (c *Inspector) AddAttributesToFindingsRequest(input *AddAttributesToFindingsInput) (req *request.Request, output *AddAttributesToFindingsOutput) { - op := &request.Operation{ - Name: opAddAttributesToFindings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddAttributesToFindingsInput{} - } - - output = &AddAttributesToFindingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddAttributesToFindings API operation for Amazon Inspector. -// -// Assigns attributes (key and value pairs) to the findings that are specified -// by the ARNs of the findings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation AddAttributesToFindings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AddAttributesToFindings -func (c *Inspector) AddAttributesToFindings(input *AddAttributesToFindingsInput) (*AddAttributesToFindingsOutput, error) { - req, out := c.AddAttributesToFindingsRequest(input) - return out, req.Send() -} - -// AddAttributesToFindingsWithContext is the same as AddAttributesToFindings with the addition of -// the ability to pass a context and additional request options. -// -// See AddAttributesToFindings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) AddAttributesToFindingsWithContext(ctx aws.Context, input *AddAttributesToFindingsInput, opts ...request.Option) (*AddAttributesToFindingsOutput, error) { - req, out := c.AddAttributesToFindingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAssessmentTarget = "CreateAssessmentTarget" - -// CreateAssessmentTargetRequest generates a "aws/request.Request" representing the -// client's request for the CreateAssessmentTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAssessmentTarget for more information on using the CreateAssessmentTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAssessmentTargetRequest method. -// req, resp := client.CreateAssessmentTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTarget -func (c *Inspector) CreateAssessmentTargetRequest(input *CreateAssessmentTargetInput) (req *request.Request, output *CreateAssessmentTargetOutput) { - op := &request.Operation{ - Name: opCreateAssessmentTarget, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAssessmentTargetInput{} - } - - output = &CreateAssessmentTargetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAssessmentTarget API operation for Amazon Inspector. -// -// Creates a new assessment target using the ARN of the resource group that -// is generated by CreateResourceGroup. If resourceGroupArn is not specified, -// all EC2 instances in the current AWS account and region are included in the -// assessment target. If the service-linked role (https://docs.aws.amazon.com/inspector/latest/userguide/inspector_slr.html) -// isn’t already registered, this action also creates and registers a service-linked -// role to grant Amazon Inspector access to AWS Services needed to perform security -// assessments. You can create up to 50 assessment targets per AWS account. -// You can run up to 500 concurrent agents per AWS account. For more information, -// see Amazon Inspector Assessment Targets (http://docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation CreateAssessmentTarget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeInvalidCrossAccountRoleException "InvalidCrossAccountRoleException" -// Amazon Inspector cannot assume the cross-account role that it needs to list -// your EC2 instances during the assessment run. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTarget -func (c *Inspector) CreateAssessmentTarget(input *CreateAssessmentTargetInput) (*CreateAssessmentTargetOutput, error) { - req, out := c.CreateAssessmentTargetRequest(input) - return out, req.Send() -} - -// CreateAssessmentTargetWithContext is the same as CreateAssessmentTarget with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAssessmentTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) CreateAssessmentTargetWithContext(ctx aws.Context, input *CreateAssessmentTargetInput, opts ...request.Option) (*CreateAssessmentTargetOutput, error) { - req, out := c.CreateAssessmentTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAssessmentTemplate = "CreateAssessmentTemplate" - -// CreateAssessmentTemplateRequest generates a "aws/request.Request" representing the -// client's request for the CreateAssessmentTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAssessmentTemplate for more information on using the CreateAssessmentTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAssessmentTemplateRequest method. -// req, resp := client.CreateAssessmentTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTemplate -func (c *Inspector) CreateAssessmentTemplateRequest(input *CreateAssessmentTemplateInput) (req *request.Request, output *CreateAssessmentTemplateOutput) { - op := &request.Operation{ - Name: opCreateAssessmentTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAssessmentTemplateInput{} - } - - output = &CreateAssessmentTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAssessmentTemplate API operation for Amazon Inspector. -// -// Creates an assessment template for the assessment target that is specified -// by the ARN of the assessment target. If the service-linked role (https://docs.aws.amazon.com/inspector/latest/userguide/inspector_slr.html) -// isn’t already registered, this action also creates and registers a service-linked -// role to grant Amazon Inspector access to AWS Services needed to perform security -// assessments. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation CreateAssessmentTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTemplate -func (c *Inspector) CreateAssessmentTemplate(input *CreateAssessmentTemplateInput) (*CreateAssessmentTemplateOutput, error) { - req, out := c.CreateAssessmentTemplateRequest(input) - return out, req.Send() -} - -// CreateAssessmentTemplateWithContext is the same as CreateAssessmentTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAssessmentTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) CreateAssessmentTemplateWithContext(ctx aws.Context, input *CreateAssessmentTemplateInput, opts ...request.Option) (*CreateAssessmentTemplateOutput, error) { - req, out := c.CreateAssessmentTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateExclusionsPreview = "CreateExclusionsPreview" - -// CreateExclusionsPreviewRequest generates a "aws/request.Request" representing the -// client's request for the CreateExclusionsPreview operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateExclusionsPreview for more information on using the CreateExclusionsPreview -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateExclusionsPreviewRequest method. -// req, resp := client.CreateExclusionsPreviewRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateExclusionsPreview -func (c *Inspector) CreateExclusionsPreviewRequest(input *CreateExclusionsPreviewInput) (req *request.Request, output *CreateExclusionsPreviewOutput) { - op := &request.Operation{ - Name: opCreateExclusionsPreview, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateExclusionsPreviewInput{} - } - - output = &CreateExclusionsPreviewOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateExclusionsPreview API operation for Amazon Inspector. -// -// Starts the generation of an exclusions preview for the specified assessment -// template. The exclusions preview lists the potential exclusions (ExclusionPreview) -// that Inspector can detect before it runs the assessment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation CreateExclusionsPreview for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodePreviewGenerationInProgressException "PreviewGenerationInProgressException" -// The request is rejected. The specified assessment template is currently generating -// an exclusions preview. -// -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateExclusionsPreview -func (c *Inspector) CreateExclusionsPreview(input *CreateExclusionsPreviewInput) (*CreateExclusionsPreviewOutput, error) { - req, out := c.CreateExclusionsPreviewRequest(input) - return out, req.Send() -} - -// CreateExclusionsPreviewWithContext is the same as CreateExclusionsPreview with the addition of -// the ability to pass a context and additional request options. -// -// See CreateExclusionsPreview for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) CreateExclusionsPreviewWithContext(ctx aws.Context, input *CreateExclusionsPreviewInput, opts ...request.Option) (*CreateExclusionsPreviewOutput, error) { - req, out := c.CreateExclusionsPreviewRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateResourceGroup = "CreateResourceGroup" - -// CreateResourceGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateResourceGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateResourceGroup for more information on using the CreateResourceGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateResourceGroupRequest method. -// req, resp := client.CreateResourceGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateResourceGroup -func (c *Inspector) CreateResourceGroupRequest(input *CreateResourceGroupInput) (req *request.Request, output *CreateResourceGroupOutput) { - op := &request.Operation{ - Name: opCreateResourceGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateResourceGroupInput{} - } - - output = &CreateResourceGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateResourceGroup API operation for Amazon Inspector. -// -// Creates a resource group using the specified set of tags (key and value pairs) -// that are used to select the EC2 instances to be included in an Amazon Inspector -// assessment target. The created resource group is then used to create an Amazon -// Inspector assessment target. For more information, see CreateAssessmentTarget. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation CreateResourceGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateResourceGroup -func (c *Inspector) CreateResourceGroup(input *CreateResourceGroupInput) (*CreateResourceGroupOutput, error) { - req, out := c.CreateResourceGroupRequest(input) - return out, req.Send() -} - -// CreateResourceGroupWithContext is the same as CreateResourceGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateResourceGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) CreateResourceGroupWithContext(ctx aws.Context, input *CreateResourceGroupInput, opts ...request.Option) (*CreateResourceGroupOutput, error) { - req, out := c.CreateResourceGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAssessmentRun = "DeleteAssessmentRun" - -// DeleteAssessmentRunRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAssessmentRun operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAssessmentRun for more information on using the DeleteAssessmentRun -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAssessmentRunRequest method. -// req, resp := client.DeleteAssessmentRunRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentRun -func (c *Inspector) DeleteAssessmentRunRequest(input *DeleteAssessmentRunInput) (req *request.Request, output *DeleteAssessmentRunOutput) { - op := &request.Operation{ - Name: opDeleteAssessmentRun, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAssessmentRunInput{} - } - - output = &DeleteAssessmentRunOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAssessmentRun API operation for Amazon Inspector. -// -// Deletes the assessment run that is specified by the ARN of the assessment -// run. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation DeleteAssessmentRun for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAssessmentRunInProgressException "AssessmentRunInProgressException" -// You cannot perform a specified action if an assessment run is currently in -// progress. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentRun -func (c *Inspector) DeleteAssessmentRun(input *DeleteAssessmentRunInput) (*DeleteAssessmentRunOutput, error) { - req, out := c.DeleteAssessmentRunRequest(input) - return out, req.Send() -} - -// DeleteAssessmentRunWithContext is the same as DeleteAssessmentRun with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAssessmentRun for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) DeleteAssessmentRunWithContext(ctx aws.Context, input *DeleteAssessmentRunInput, opts ...request.Option) (*DeleteAssessmentRunOutput, error) { - req, out := c.DeleteAssessmentRunRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAssessmentTarget = "DeleteAssessmentTarget" - -// DeleteAssessmentTargetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAssessmentTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAssessmentTarget for more information on using the DeleteAssessmentTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAssessmentTargetRequest method. -// req, resp := client.DeleteAssessmentTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTarget -func (c *Inspector) DeleteAssessmentTargetRequest(input *DeleteAssessmentTargetInput) (req *request.Request, output *DeleteAssessmentTargetOutput) { - op := &request.Operation{ - Name: opDeleteAssessmentTarget, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAssessmentTargetInput{} - } - - output = &DeleteAssessmentTargetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAssessmentTarget API operation for Amazon Inspector. -// -// Deletes the assessment target that is specified by the ARN of the assessment -// target. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation DeleteAssessmentTarget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAssessmentRunInProgressException "AssessmentRunInProgressException" -// You cannot perform a specified action if an assessment run is currently in -// progress. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTarget -func (c *Inspector) DeleteAssessmentTarget(input *DeleteAssessmentTargetInput) (*DeleteAssessmentTargetOutput, error) { - req, out := c.DeleteAssessmentTargetRequest(input) - return out, req.Send() -} - -// DeleteAssessmentTargetWithContext is the same as DeleteAssessmentTarget with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAssessmentTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) DeleteAssessmentTargetWithContext(ctx aws.Context, input *DeleteAssessmentTargetInput, opts ...request.Option) (*DeleteAssessmentTargetOutput, error) { - req, out := c.DeleteAssessmentTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAssessmentTemplate = "DeleteAssessmentTemplate" - -// DeleteAssessmentTemplateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAssessmentTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAssessmentTemplate for more information on using the DeleteAssessmentTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAssessmentTemplateRequest method. -// req, resp := client.DeleteAssessmentTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTemplate -func (c *Inspector) DeleteAssessmentTemplateRequest(input *DeleteAssessmentTemplateInput) (req *request.Request, output *DeleteAssessmentTemplateOutput) { - op := &request.Operation{ - Name: opDeleteAssessmentTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAssessmentTemplateInput{} - } - - output = &DeleteAssessmentTemplateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAssessmentTemplate API operation for Amazon Inspector. -// -// Deletes the assessment template that is specified by the ARN of the assessment -// template. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation DeleteAssessmentTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAssessmentRunInProgressException "AssessmentRunInProgressException" -// You cannot perform a specified action if an assessment run is currently in -// progress. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTemplate -func (c *Inspector) DeleteAssessmentTemplate(input *DeleteAssessmentTemplateInput) (*DeleteAssessmentTemplateOutput, error) { - req, out := c.DeleteAssessmentTemplateRequest(input) - return out, req.Send() -} - -// DeleteAssessmentTemplateWithContext is the same as DeleteAssessmentTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAssessmentTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) DeleteAssessmentTemplateWithContext(ctx aws.Context, input *DeleteAssessmentTemplateInput, opts ...request.Option) (*DeleteAssessmentTemplateOutput, error) { - req, out := c.DeleteAssessmentTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAssessmentRuns = "DescribeAssessmentRuns" - -// DescribeAssessmentRunsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAssessmentRuns operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAssessmentRuns for more information on using the DescribeAssessmentRuns -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAssessmentRunsRequest method. -// req, resp := client.DescribeAssessmentRunsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentRuns -func (c *Inspector) DescribeAssessmentRunsRequest(input *DescribeAssessmentRunsInput) (req *request.Request, output *DescribeAssessmentRunsOutput) { - op := &request.Operation{ - Name: opDescribeAssessmentRuns, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAssessmentRunsInput{} - } - - output = &DescribeAssessmentRunsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAssessmentRuns API operation for Amazon Inspector. -// -// Describes the assessment runs that are specified by the ARNs of the assessment -// runs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation DescribeAssessmentRuns for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentRuns -func (c *Inspector) DescribeAssessmentRuns(input *DescribeAssessmentRunsInput) (*DescribeAssessmentRunsOutput, error) { - req, out := c.DescribeAssessmentRunsRequest(input) - return out, req.Send() -} - -// DescribeAssessmentRunsWithContext is the same as DescribeAssessmentRuns with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAssessmentRuns for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) DescribeAssessmentRunsWithContext(ctx aws.Context, input *DescribeAssessmentRunsInput, opts ...request.Option) (*DescribeAssessmentRunsOutput, error) { - req, out := c.DescribeAssessmentRunsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAssessmentTargets = "DescribeAssessmentTargets" - -// DescribeAssessmentTargetsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAssessmentTargets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAssessmentTargets for more information on using the DescribeAssessmentTargets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAssessmentTargetsRequest method. -// req, resp := client.DescribeAssessmentTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTargets -func (c *Inspector) DescribeAssessmentTargetsRequest(input *DescribeAssessmentTargetsInput) (req *request.Request, output *DescribeAssessmentTargetsOutput) { - op := &request.Operation{ - Name: opDescribeAssessmentTargets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAssessmentTargetsInput{} - } - - output = &DescribeAssessmentTargetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAssessmentTargets API operation for Amazon Inspector. -// -// Describes the assessment targets that are specified by the ARNs of the assessment -// targets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation DescribeAssessmentTargets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTargets -func (c *Inspector) DescribeAssessmentTargets(input *DescribeAssessmentTargetsInput) (*DescribeAssessmentTargetsOutput, error) { - req, out := c.DescribeAssessmentTargetsRequest(input) - return out, req.Send() -} - -// DescribeAssessmentTargetsWithContext is the same as DescribeAssessmentTargets with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAssessmentTargets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) DescribeAssessmentTargetsWithContext(ctx aws.Context, input *DescribeAssessmentTargetsInput, opts ...request.Option) (*DescribeAssessmentTargetsOutput, error) { - req, out := c.DescribeAssessmentTargetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAssessmentTemplates = "DescribeAssessmentTemplates" - -// DescribeAssessmentTemplatesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAssessmentTemplates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAssessmentTemplates for more information on using the DescribeAssessmentTemplates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAssessmentTemplatesRequest method. -// req, resp := client.DescribeAssessmentTemplatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTemplates -func (c *Inspector) DescribeAssessmentTemplatesRequest(input *DescribeAssessmentTemplatesInput) (req *request.Request, output *DescribeAssessmentTemplatesOutput) { - op := &request.Operation{ - Name: opDescribeAssessmentTemplates, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAssessmentTemplatesInput{} - } - - output = &DescribeAssessmentTemplatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAssessmentTemplates API operation for Amazon Inspector. -// -// Describes the assessment templates that are specified by the ARNs of the -// assessment templates. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation DescribeAssessmentTemplates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTemplates -func (c *Inspector) DescribeAssessmentTemplates(input *DescribeAssessmentTemplatesInput) (*DescribeAssessmentTemplatesOutput, error) { - req, out := c.DescribeAssessmentTemplatesRequest(input) - return out, req.Send() -} - -// DescribeAssessmentTemplatesWithContext is the same as DescribeAssessmentTemplates with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAssessmentTemplates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) DescribeAssessmentTemplatesWithContext(ctx aws.Context, input *DescribeAssessmentTemplatesInput, opts ...request.Option) (*DescribeAssessmentTemplatesOutput, error) { - req, out := c.DescribeAssessmentTemplatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCrossAccountAccessRole = "DescribeCrossAccountAccessRole" - -// DescribeCrossAccountAccessRoleRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCrossAccountAccessRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCrossAccountAccessRole for more information on using the DescribeCrossAccountAccessRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCrossAccountAccessRoleRequest method. -// req, resp := client.DescribeCrossAccountAccessRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeCrossAccountAccessRole -func (c *Inspector) DescribeCrossAccountAccessRoleRequest(input *DescribeCrossAccountAccessRoleInput) (req *request.Request, output *DescribeCrossAccountAccessRoleOutput) { - op := &request.Operation{ - Name: opDescribeCrossAccountAccessRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCrossAccountAccessRoleInput{} - } - - output = &DescribeCrossAccountAccessRoleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCrossAccountAccessRole API operation for Amazon Inspector. -// -// Describes the IAM role that enables Amazon Inspector to access your AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation DescribeCrossAccountAccessRole for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeCrossAccountAccessRole -func (c *Inspector) DescribeCrossAccountAccessRole(input *DescribeCrossAccountAccessRoleInput) (*DescribeCrossAccountAccessRoleOutput, error) { - req, out := c.DescribeCrossAccountAccessRoleRequest(input) - return out, req.Send() -} - -// DescribeCrossAccountAccessRoleWithContext is the same as DescribeCrossAccountAccessRole with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCrossAccountAccessRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) DescribeCrossAccountAccessRoleWithContext(ctx aws.Context, input *DescribeCrossAccountAccessRoleInput, opts ...request.Option) (*DescribeCrossAccountAccessRoleOutput, error) { - req, out := c.DescribeCrossAccountAccessRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeExclusions = "DescribeExclusions" - -// DescribeExclusionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeExclusions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeExclusions for more information on using the DescribeExclusions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeExclusionsRequest method. -// req, resp := client.DescribeExclusionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeExclusions -func (c *Inspector) DescribeExclusionsRequest(input *DescribeExclusionsInput) (req *request.Request, output *DescribeExclusionsOutput) { - op := &request.Operation{ - Name: opDescribeExclusions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeExclusionsInput{} - } - - output = &DescribeExclusionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeExclusions API operation for Amazon Inspector. -// -// Describes the exclusions that are specified by the exclusions' ARNs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation DescribeExclusions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeExclusions -func (c *Inspector) DescribeExclusions(input *DescribeExclusionsInput) (*DescribeExclusionsOutput, error) { - req, out := c.DescribeExclusionsRequest(input) - return out, req.Send() -} - -// DescribeExclusionsWithContext is the same as DescribeExclusions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeExclusions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) DescribeExclusionsWithContext(ctx aws.Context, input *DescribeExclusionsInput, opts ...request.Option) (*DescribeExclusionsOutput, error) { - req, out := c.DescribeExclusionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFindings = "DescribeFindings" - -// DescribeFindingsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFindings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFindings for more information on using the DescribeFindings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFindingsRequest method. -// req, resp := client.DescribeFindingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeFindings -func (c *Inspector) DescribeFindingsRequest(input *DescribeFindingsInput) (req *request.Request, output *DescribeFindingsOutput) { - op := &request.Operation{ - Name: opDescribeFindings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeFindingsInput{} - } - - output = &DescribeFindingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFindings API operation for Amazon Inspector. -// -// Describes the findings that are specified by the ARNs of the findings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation DescribeFindings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeFindings -func (c *Inspector) DescribeFindings(input *DescribeFindingsInput) (*DescribeFindingsOutput, error) { - req, out := c.DescribeFindingsRequest(input) - return out, req.Send() -} - -// DescribeFindingsWithContext is the same as DescribeFindings with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFindings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) DescribeFindingsWithContext(ctx aws.Context, input *DescribeFindingsInput, opts ...request.Option) (*DescribeFindingsOutput, error) { - req, out := c.DescribeFindingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeResourceGroups = "DescribeResourceGroups" - -// DescribeResourceGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeResourceGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeResourceGroups for more information on using the DescribeResourceGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeResourceGroupsRequest method. -// req, resp := client.DescribeResourceGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeResourceGroups -func (c *Inspector) DescribeResourceGroupsRequest(input *DescribeResourceGroupsInput) (req *request.Request, output *DescribeResourceGroupsOutput) { - op := &request.Operation{ - Name: opDescribeResourceGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeResourceGroupsInput{} - } - - output = &DescribeResourceGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeResourceGroups API operation for Amazon Inspector. -// -// Describes the resource groups that are specified by the ARNs of the resource -// groups. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation DescribeResourceGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeResourceGroups -func (c *Inspector) DescribeResourceGroups(input *DescribeResourceGroupsInput) (*DescribeResourceGroupsOutput, error) { - req, out := c.DescribeResourceGroupsRequest(input) - return out, req.Send() -} - -// DescribeResourceGroupsWithContext is the same as DescribeResourceGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeResourceGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) DescribeResourceGroupsWithContext(ctx aws.Context, input *DescribeResourceGroupsInput, opts ...request.Option) (*DescribeResourceGroupsOutput, error) { - req, out := c.DescribeResourceGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeRulesPackages = "DescribeRulesPackages" - -// DescribeRulesPackagesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRulesPackages operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRulesPackages for more information on using the DescribeRulesPackages -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRulesPackagesRequest method. -// req, resp := client.DescribeRulesPackagesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeRulesPackages -func (c *Inspector) DescribeRulesPackagesRequest(input *DescribeRulesPackagesInput) (req *request.Request, output *DescribeRulesPackagesOutput) { - op := &request.Operation{ - Name: opDescribeRulesPackages, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeRulesPackagesInput{} - } - - output = &DescribeRulesPackagesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRulesPackages API operation for Amazon Inspector. -// -// Describes the rules packages that are specified by the ARNs of the rules -// packages. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation DescribeRulesPackages for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeRulesPackages -func (c *Inspector) DescribeRulesPackages(input *DescribeRulesPackagesInput) (*DescribeRulesPackagesOutput, error) { - req, out := c.DescribeRulesPackagesRequest(input) - return out, req.Send() -} - -// DescribeRulesPackagesWithContext is the same as DescribeRulesPackages with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRulesPackages for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) DescribeRulesPackagesWithContext(ctx aws.Context, input *DescribeRulesPackagesInput, opts ...request.Option) (*DescribeRulesPackagesOutput, error) { - req, out := c.DescribeRulesPackagesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAssessmentReport = "GetAssessmentReport" - -// GetAssessmentReportRequest generates a "aws/request.Request" representing the -// client's request for the GetAssessmentReport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAssessmentReport for more information on using the GetAssessmentReport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAssessmentReportRequest method. -// req, resp := client.GetAssessmentReportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetAssessmentReport -func (c *Inspector) GetAssessmentReportRequest(input *GetAssessmentReportInput) (req *request.Request, output *GetAssessmentReportOutput) { - op := &request.Operation{ - Name: opGetAssessmentReport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAssessmentReportInput{} - } - - output = &GetAssessmentReportOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAssessmentReport API operation for Amazon Inspector. -// -// Produces an assessment report that includes detailed and comprehensive results -// of a specified assessment run. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation GetAssessmentReport for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeAssessmentRunInProgressException "AssessmentRunInProgressException" -// You cannot perform a specified action if an assessment run is currently in -// progress. -// -// * ErrCodeUnsupportedFeatureException "UnsupportedFeatureException" -// Used by the GetAssessmentReport API. The request was rejected because you -// tried to generate a report for an assessment run that existed before reporting -// was supported in Amazon Inspector. You can only generate reports for assessment -// runs that took place or will take place after generating reports in Amazon -// Inspector became available. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetAssessmentReport -func (c *Inspector) GetAssessmentReport(input *GetAssessmentReportInput) (*GetAssessmentReportOutput, error) { - req, out := c.GetAssessmentReportRequest(input) - return out, req.Send() -} - -// GetAssessmentReportWithContext is the same as GetAssessmentReport with the addition of -// the ability to pass a context and additional request options. -// -// See GetAssessmentReport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) GetAssessmentReportWithContext(ctx aws.Context, input *GetAssessmentReportInput, opts ...request.Option) (*GetAssessmentReportOutput, error) { - req, out := c.GetAssessmentReportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetExclusionsPreview = "GetExclusionsPreview" - -// GetExclusionsPreviewRequest generates a "aws/request.Request" representing the -// client's request for the GetExclusionsPreview operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetExclusionsPreview for more information on using the GetExclusionsPreview -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetExclusionsPreviewRequest method. -// req, resp := client.GetExclusionsPreviewRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetExclusionsPreview -func (c *Inspector) GetExclusionsPreviewRequest(input *GetExclusionsPreviewInput) (req *request.Request, output *GetExclusionsPreviewOutput) { - op := &request.Operation{ - Name: opGetExclusionsPreview, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetExclusionsPreviewInput{} - } - - output = &GetExclusionsPreviewOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetExclusionsPreview API operation for Amazon Inspector. -// -// Retrieves the exclusions preview (a list of ExclusionPreview objects) specified -// by the preview token. You can obtain the preview token by running the CreateExclusionsPreview -// API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation GetExclusionsPreview for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetExclusionsPreview -func (c *Inspector) GetExclusionsPreview(input *GetExclusionsPreviewInput) (*GetExclusionsPreviewOutput, error) { - req, out := c.GetExclusionsPreviewRequest(input) - return out, req.Send() -} - -// GetExclusionsPreviewWithContext is the same as GetExclusionsPreview with the addition of -// the ability to pass a context and additional request options. -// -// See GetExclusionsPreview for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) GetExclusionsPreviewWithContext(ctx aws.Context, input *GetExclusionsPreviewInput, opts ...request.Option) (*GetExclusionsPreviewOutput, error) { - req, out := c.GetExclusionsPreviewRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetExclusionsPreviewPages iterates over the pages of a GetExclusionsPreview operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetExclusionsPreview method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a GetExclusionsPreview operation. -// pageNum := 0 -// err := client.GetExclusionsPreviewPages(params, -// func(page *GetExclusionsPreviewOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Inspector) GetExclusionsPreviewPages(input *GetExclusionsPreviewInput, fn func(*GetExclusionsPreviewOutput, bool) bool) error { - return c.GetExclusionsPreviewPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetExclusionsPreviewPagesWithContext same as GetExclusionsPreviewPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) GetExclusionsPreviewPagesWithContext(ctx aws.Context, input *GetExclusionsPreviewInput, fn func(*GetExclusionsPreviewOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetExclusionsPreviewInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetExclusionsPreviewRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetExclusionsPreviewOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetTelemetryMetadata = "GetTelemetryMetadata" - -// GetTelemetryMetadataRequest generates a "aws/request.Request" representing the -// client's request for the GetTelemetryMetadata operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTelemetryMetadata for more information on using the GetTelemetryMetadata -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTelemetryMetadataRequest method. -// req, resp := client.GetTelemetryMetadataRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetTelemetryMetadata -func (c *Inspector) GetTelemetryMetadataRequest(input *GetTelemetryMetadataInput) (req *request.Request, output *GetTelemetryMetadataOutput) { - op := &request.Operation{ - Name: opGetTelemetryMetadata, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTelemetryMetadataInput{} - } - - output = &GetTelemetryMetadataOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTelemetryMetadata API operation for Amazon Inspector. -// -// Information about the data that is collected for the specified assessment -// run. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation GetTelemetryMetadata for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetTelemetryMetadata -func (c *Inspector) GetTelemetryMetadata(input *GetTelemetryMetadataInput) (*GetTelemetryMetadataOutput, error) { - req, out := c.GetTelemetryMetadataRequest(input) - return out, req.Send() -} - -// GetTelemetryMetadataWithContext is the same as GetTelemetryMetadata with the addition of -// the ability to pass a context and additional request options. -// -// See GetTelemetryMetadata for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) GetTelemetryMetadataWithContext(ctx aws.Context, input *GetTelemetryMetadataInput, opts ...request.Option) (*GetTelemetryMetadataOutput, error) { - req, out := c.GetTelemetryMetadataRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAssessmentRunAgents = "ListAssessmentRunAgents" - -// ListAssessmentRunAgentsRequest generates a "aws/request.Request" representing the -// client's request for the ListAssessmentRunAgents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAssessmentRunAgents for more information on using the ListAssessmentRunAgents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAssessmentRunAgentsRequest method. -// req, resp := client.ListAssessmentRunAgentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRunAgents -func (c *Inspector) ListAssessmentRunAgentsRequest(input *ListAssessmentRunAgentsInput) (req *request.Request, output *ListAssessmentRunAgentsOutput) { - op := &request.Operation{ - Name: opListAssessmentRunAgents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListAssessmentRunAgentsInput{} - } - - output = &ListAssessmentRunAgentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAssessmentRunAgents API operation for Amazon Inspector. -// -// Lists the agents of the assessment runs that are specified by the ARNs of -// the assessment runs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation ListAssessmentRunAgents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRunAgents -func (c *Inspector) ListAssessmentRunAgents(input *ListAssessmentRunAgentsInput) (*ListAssessmentRunAgentsOutput, error) { - req, out := c.ListAssessmentRunAgentsRequest(input) - return out, req.Send() -} - -// ListAssessmentRunAgentsWithContext is the same as ListAssessmentRunAgents with the addition of -// the ability to pass a context and additional request options. -// -// See ListAssessmentRunAgents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListAssessmentRunAgentsWithContext(ctx aws.Context, input *ListAssessmentRunAgentsInput, opts ...request.Option) (*ListAssessmentRunAgentsOutput, error) { - req, out := c.ListAssessmentRunAgentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAssessmentRunAgentsPages iterates over the pages of a ListAssessmentRunAgents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAssessmentRunAgents 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 ListAssessmentRunAgents operation. -// pageNum := 0 -// err := client.ListAssessmentRunAgentsPages(params, -// func(page *ListAssessmentRunAgentsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Inspector) ListAssessmentRunAgentsPages(input *ListAssessmentRunAgentsInput, fn func(*ListAssessmentRunAgentsOutput, bool) bool) error { - return c.ListAssessmentRunAgentsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAssessmentRunAgentsPagesWithContext same as ListAssessmentRunAgentsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListAssessmentRunAgentsPagesWithContext(ctx aws.Context, input *ListAssessmentRunAgentsInput, fn func(*ListAssessmentRunAgentsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAssessmentRunAgentsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAssessmentRunAgentsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAssessmentRunAgentsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListAssessmentRuns = "ListAssessmentRuns" - -// ListAssessmentRunsRequest generates a "aws/request.Request" representing the -// client's request for the ListAssessmentRuns operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAssessmentRuns for more information on using the ListAssessmentRuns -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAssessmentRunsRequest method. -// req, resp := client.ListAssessmentRunsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRuns -func (c *Inspector) ListAssessmentRunsRequest(input *ListAssessmentRunsInput) (req *request.Request, output *ListAssessmentRunsOutput) { - op := &request.Operation{ - Name: opListAssessmentRuns, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListAssessmentRunsInput{} - } - - output = &ListAssessmentRunsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAssessmentRuns API operation for Amazon Inspector. -// -// Lists the assessment runs that correspond to the assessment templates that -// are specified by the ARNs of the assessment templates. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation ListAssessmentRuns for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRuns -func (c *Inspector) ListAssessmentRuns(input *ListAssessmentRunsInput) (*ListAssessmentRunsOutput, error) { - req, out := c.ListAssessmentRunsRequest(input) - return out, req.Send() -} - -// ListAssessmentRunsWithContext is the same as ListAssessmentRuns with the addition of -// the ability to pass a context and additional request options. -// -// See ListAssessmentRuns for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListAssessmentRunsWithContext(ctx aws.Context, input *ListAssessmentRunsInput, opts ...request.Option) (*ListAssessmentRunsOutput, error) { - req, out := c.ListAssessmentRunsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAssessmentRunsPages iterates over the pages of a ListAssessmentRuns operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAssessmentRuns 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 ListAssessmentRuns operation. -// pageNum := 0 -// err := client.ListAssessmentRunsPages(params, -// func(page *ListAssessmentRunsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Inspector) ListAssessmentRunsPages(input *ListAssessmentRunsInput, fn func(*ListAssessmentRunsOutput, bool) bool) error { - return c.ListAssessmentRunsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAssessmentRunsPagesWithContext same as ListAssessmentRunsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListAssessmentRunsPagesWithContext(ctx aws.Context, input *ListAssessmentRunsInput, fn func(*ListAssessmentRunsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAssessmentRunsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAssessmentRunsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAssessmentRunsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListAssessmentTargets = "ListAssessmentTargets" - -// ListAssessmentTargetsRequest generates a "aws/request.Request" representing the -// client's request for the ListAssessmentTargets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAssessmentTargets for more information on using the ListAssessmentTargets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAssessmentTargetsRequest method. -// req, resp := client.ListAssessmentTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTargets -func (c *Inspector) ListAssessmentTargetsRequest(input *ListAssessmentTargetsInput) (req *request.Request, output *ListAssessmentTargetsOutput) { - op := &request.Operation{ - Name: opListAssessmentTargets, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListAssessmentTargetsInput{} - } - - output = &ListAssessmentTargetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAssessmentTargets API operation for Amazon Inspector. -// -// Lists the ARNs of the assessment targets within this AWS account. For more -// information about assessment targets, see Amazon Inspector Assessment Targets -// (http://docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation ListAssessmentTargets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTargets -func (c *Inspector) ListAssessmentTargets(input *ListAssessmentTargetsInput) (*ListAssessmentTargetsOutput, error) { - req, out := c.ListAssessmentTargetsRequest(input) - return out, req.Send() -} - -// ListAssessmentTargetsWithContext is the same as ListAssessmentTargets with the addition of -// the ability to pass a context and additional request options. -// -// See ListAssessmentTargets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListAssessmentTargetsWithContext(ctx aws.Context, input *ListAssessmentTargetsInput, opts ...request.Option) (*ListAssessmentTargetsOutput, error) { - req, out := c.ListAssessmentTargetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAssessmentTargetsPages iterates over the pages of a ListAssessmentTargets operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAssessmentTargets 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 ListAssessmentTargets operation. -// pageNum := 0 -// err := client.ListAssessmentTargetsPages(params, -// func(page *ListAssessmentTargetsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Inspector) ListAssessmentTargetsPages(input *ListAssessmentTargetsInput, fn func(*ListAssessmentTargetsOutput, bool) bool) error { - return c.ListAssessmentTargetsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAssessmentTargetsPagesWithContext same as ListAssessmentTargetsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListAssessmentTargetsPagesWithContext(ctx aws.Context, input *ListAssessmentTargetsInput, fn func(*ListAssessmentTargetsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAssessmentTargetsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAssessmentTargetsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAssessmentTargetsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListAssessmentTemplates = "ListAssessmentTemplates" - -// ListAssessmentTemplatesRequest generates a "aws/request.Request" representing the -// client's request for the ListAssessmentTemplates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAssessmentTemplates for more information on using the ListAssessmentTemplates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAssessmentTemplatesRequest method. -// req, resp := client.ListAssessmentTemplatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTemplates -func (c *Inspector) ListAssessmentTemplatesRequest(input *ListAssessmentTemplatesInput) (req *request.Request, output *ListAssessmentTemplatesOutput) { - op := &request.Operation{ - Name: opListAssessmentTemplates, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListAssessmentTemplatesInput{} - } - - output = &ListAssessmentTemplatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAssessmentTemplates API operation for Amazon Inspector. -// -// Lists the assessment templates that correspond to the assessment targets -// that are specified by the ARNs of the assessment targets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation ListAssessmentTemplates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTemplates -func (c *Inspector) ListAssessmentTemplates(input *ListAssessmentTemplatesInput) (*ListAssessmentTemplatesOutput, error) { - req, out := c.ListAssessmentTemplatesRequest(input) - return out, req.Send() -} - -// ListAssessmentTemplatesWithContext is the same as ListAssessmentTemplates with the addition of -// the ability to pass a context and additional request options. -// -// See ListAssessmentTemplates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListAssessmentTemplatesWithContext(ctx aws.Context, input *ListAssessmentTemplatesInput, opts ...request.Option) (*ListAssessmentTemplatesOutput, error) { - req, out := c.ListAssessmentTemplatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAssessmentTemplatesPages iterates over the pages of a ListAssessmentTemplates operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAssessmentTemplates method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListAssessmentTemplates operation. -// pageNum := 0 -// err := client.ListAssessmentTemplatesPages(params, -// func(page *ListAssessmentTemplatesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Inspector) ListAssessmentTemplatesPages(input *ListAssessmentTemplatesInput, fn func(*ListAssessmentTemplatesOutput, bool) bool) error { - return c.ListAssessmentTemplatesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAssessmentTemplatesPagesWithContext same as ListAssessmentTemplatesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListAssessmentTemplatesPagesWithContext(ctx aws.Context, input *ListAssessmentTemplatesInput, fn func(*ListAssessmentTemplatesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAssessmentTemplatesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAssessmentTemplatesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAssessmentTemplatesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListEventSubscriptions = "ListEventSubscriptions" - -// ListEventSubscriptionsRequest generates a "aws/request.Request" representing the -// client's request for the ListEventSubscriptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListEventSubscriptions for more information on using the ListEventSubscriptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListEventSubscriptionsRequest method. -// req, resp := client.ListEventSubscriptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListEventSubscriptions -func (c *Inspector) ListEventSubscriptionsRequest(input *ListEventSubscriptionsInput) (req *request.Request, output *ListEventSubscriptionsOutput) { - op := &request.Operation{ - Name: opListEventSubscriptions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListEventSubscriptionsInput{} - } - - output = &ListEventSubscriptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListEventSubscriptions API operation for Amazon Inspector. -// -// Lists all the event subscriptions for the assessment template that is specified -// by the ARN of the assessment template. For more information, see SubscribeToEvent -// and UnsubscribeFromEvent. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation ListEventSubscriptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListEventSubscriptions -func (c *Inspector) ListEventSubscriptions(input *ListEventSubscriptionsInput) (*ListEventSubscriptionsOutput, error) { - req, out := c.ListEventSubscriptionsRequest(input) - return out, req.Send() -} - -// ListEventSubscriptionsWithContext is the same as ListEventSubscriptions with the addition of -// the ability to pass a context and additional request options. -// -// See ListEventSubscriptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListEventSubscriptionsWithContext(ctx aws.Context, input *ListEventSubscriptionsInput, opts ...request.Option) (*ListEventSubscriptionsOutput, error) { - req, out := c.ListEventSubscriptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListEventSubscriptionsPages iterates over the pages of a ListEventSubscriptions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListEventSubscriptions method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListEventSubscriptions operation. -// pageNum := 0 -// err := client.ListEventSubscriptionsPages(params, -// func(page *ListEventSubscriptionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Inspector) ListEventSubscriptionsPages(input *ListEventSubscriptionsInput, fn func(*ListEventSubscriptionsOutput, bool) bool) error { - return c.ListEventSubscriptionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListEventSubscriptionsPagesWithContext same as ListEventSubscriptionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListEventSubscriptionsPagesWithContext(ctx aws.Context, input *ListEventSubscriptionsInput, fn func(*ListEventSubscriptionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListEventSubscriptionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListEventSubscriptionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEventSubscriptionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListExclusions = "ListExclusions" - -// ListExclusionsRequest generates a "aws/request.Request" representing the -// client's request for the ListExclusions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListExclusions for more information on using the ListExclusions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListExclusionsRequest method. -// req, resp := client.ListExclusionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListExclusions -func (c *Inspector) ListExclusionsRequest(input *ListExclusionsInput) (req *request.Request, output *ListExclusionsOutput) { - op := &request.Operation{ - Name: opListExclusions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListExclusionsInput{} - } - - output = &ListExclusionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListExclusions API operation for Amazon Inspector. -// -// List exclusions that are generated by the assessment run. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation ListExclusions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListExclusions -func (c *Inspector) ListExclusions(input *ListExclusionsInput) (*ListExclusionsOutput, error) { - req, out := c.ListExclusionsRequest(input) - return out, req.Send() -} - -// ListExclusionsWithContext is the same as ListExclusions with the addition of -// the ability to pass a context and additional request options. -// -// See ListExclusions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListExclusionsWithContext(ctx aws.Context, input *ListExclusionsInput, opts ...request.Option) (*ListExclusionsOutput, error) { - req, out := c.ListExclusionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListExclusionsPages iterates over the pages of a ListExclusions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListExclusions method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListExclusions operation. -// pageNum := 0 -// err := client.ListExclusionsPages(params, -// func(page *ListExclusionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Inspector) ListExclusionsPages(input *ListExclusionsInput, fn func(*ListExclusionsOutput, bool) bool) error { - return c.ListExclusionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListExclusionsPagesWithContext same as ListExclusionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListExclusionsPagesWithContext(ctx aws.Context, input *ListExclusionsInput, fn func(*ListExclusionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListExclusionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListExclusionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListExclusionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListFindings = "ListFindings" - -// ListFindingsRequest generates a "aws/request.Request" representing the -// client's request for the ListFindings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListFindings for more information on using the ListFindings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListFindingsRequest method. -// req, resp := client.ListFindingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListFindings -func (c *Inspector) ListFindingsRequest(input *ListFindingsInput) (req *request.Request, output *ListFindingsOutput) { - op := &request.Operation{ - Name: opListFindings, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListFindingsInput{} - } - - output = &ListFindingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListFindings API operation for Amazon Inspector. -// -// Lists findings that are generated by the assessment runs that are specified -// by the ARNs of the assessment runs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation ListFindings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListFindings -func (c *Inspector) ListFindings(input *ListFindingsInput) (*ListFindingsOutput, error) { - req, out := c.ListFindingsRequest(input) - return out, req.Send() -} - -// ListFindingsWithContext is the same as ListFindings with the addition of -// the ability to pass a context and additional request options. -// -// See ListFindings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListFindingsWithContext(ctx aws.Context, input *ListFindingsInput, opts ...request.Option) (*ListFindingsOutput, error) { - req, out := c.ListFindingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListFindingsPages iterates over the pages of a ListFindings operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListFindings 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 ListFindings operation. -// pageNum := 0 -// err := client.ListFindingsPages(params, -// func(page *ListFindingsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Inspector) ListFindingsPages(input *ListFindingsInput, fn func(*ListFindingsOutput, bool) bool) error { - return c.ListFindingsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListFindingsPagesWithContext same as ListFindingsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListFindingsPagesWithContext(ctx aws.Context, input *ListFindingsInput, fn func(*ListFindingsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListFindingsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListFindingsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListFindingsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListRulesPackages = "ListRulesPackages" - -// ListRulesPackagesRequest generates a "aws/request.Request" representing the -// client's request for the ListRulesPackages operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRulesPackages for more information on using the ListRulesPackages -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRulesPackagesRequest method. -// req, resp := client.ListRulesPackagesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListRulesPackages -func (c *Inspector) ListRulesPackagesRequest(input *ListRulesPackagesInput) (req *request.Request, output *ListRulesPackagesOutput) { - op := &request.Operation{ - Name: opListRulesPackages, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListRulesPackagesInput{} - } - - output = &ListRulesPackagesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRulesPackages API operation for Amazon Inspector. -// -// Lists all available Amazon Inspector rules packages. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation ListRulesPackages for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListRulesPackages -func (c *Inspector) ListRulesPackages(input *ListRulesPackagesInput) (*ListRulesPackagesOutput, error) { - req, out := c.ListRulesPackagesRequest(input) - return out, req.Send() -} - -// ListRulesPackagesWithContext is the same as ListRulesPackages with the addition of -// the ability to pass a context and additional request options. -// -// See ListRulesPackages for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListRulesPackagesWithContext(ctx aws.Context, input *ListRulesPackagesInput, opts ...request.Option) (*ListRulesPackagesOutput, error) { - req, out := c.ListRulesPackagesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListRulesPackagesPages iterates over the pages of a ListRulesPackages operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListRulesPackages 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 ListRulesPackages operation. -// pageNum := 0 -// err := client.ListRulesPackagesPages(params, -// func(page *ListRulesPackagesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Inspector) ListRulesPackagesPages(input *ListRulesPackagesInput, fn func(*ListRulesPackagesOutput, bool) bool) error { - return c.ListRulesPackagesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListRulesPackagesPagesWithContext same as ListRulesPackagesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) ListRulesPackagesPagesWithContext(ctx aws.Context, input *ListRulesPackagesInput, fn func(*ListRulesPackagesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListRulesPackagesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListRulesPackagesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRulesPackagesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTagsForResource = "ListTagsForResource" - -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the 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/inspector-2016-02-16/ListTagsForResource -func (c *Inspector) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for Amazon Inspector. -// -// Lists all tags associated with an assessment template. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListTagsForResource -func (c *Inspector) 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 *Inspector) 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 opPreviewAgents = "PreviewAgents" - -// PreviewAgentsRequest generates a "aws/request.Request" representing the -// client's request for the PreviewAgents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PreviewAgents for more information on using the PreviewAgents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PreviewAgentsRequest method. -// req, resp := client.PreviewAgentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/PreviewAgents -func (c *Inspector) PreviewAgentsRequest(input *PreviewAgentsInput) (req *request.Request, output *PreviewAgentsOutput) { - op := &request.Operation{ - Name: opPreviewAgents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &PreviewAgentsInput{} - } - - output = &PreviewAgentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// PreviewAgents API operation for Amazon Inspector. -// -// Previews the agents installed on the EC2 instances that are part of the specified -// assessment target. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation PreviewAgents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeInvalidCrossAccountRoleException "InvalidCrossAccountRoleException" -// Amazon Inspector cannot assume the cross-account role that it needs to list -// your EC2 instances during the assessment run. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/PreviewAgents -func (c *Inspector) PreviewAgents(input *PreviewAgentsInput) (*PreviewAgentsOutput, error) { - req, out := c.PreviewAgentsRequest(input) - return out, req.Send() -} - -// PreviewAgentsWithContext is the same as PreviewAgents with the addition of -// the ability to pass a context and additional request options. -// -// See PreviewAgents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) PreviewAgentsWithContext(ctx aws.Context, input *PreviewAgentsInput, opts ...request.Option) (*PreviewAgentsOutput, error) { - req, out := c.PreviewAgentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// PreviewAgentsPages iterates over the pages of a PreviewAgents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See PreviewAgents 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 PreviewAgents operation. -// pageNum := 0 -// err := client.PreviewAgentsPages(params, -// func(page *PreviewAgentsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Inspector) PreviewAgentsPages(input *PreviewAgentsInput, fn func(*PreviewAgentsOutput, bool) bool) error { - return c.PreviewAgentsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// PreviewAgentsPagesWithContext same as PreviewAgentsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) PreviewAgentsPagesWithContext(ctx aws.Context, input *PreviewAgentsInput, fn func(*PreviewAgentsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *PreviewAgentsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.PreviewAgentsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*PreviewAgentsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opRegisterCrossAccountAccessRole = "RegisterCrossAccountAccessRole" - -// RegisterCrossAccountAccessRoleRequest generates a "aws/request.Request" representing the -// client's request for the RegisterCrossAccountAccessRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterCrossAccountAccessRole for more information on using the RegisterCrossAccountAccessRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterCrossAccountAccessRoleRequest method. -// req, resp := client.RegisterCrossAccountAccessRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RegisterCrossAccountAccessRole -func (c *Inspector) RegisterCrossAccountAccessRoleRequest(input *RegisterCrossAccountAccessRoleInput) (req *request.Request, output *RegisterCrossAccountAccessRoleOutput) { - op := &request.Operation{ - Name: opRegisterCrossAccountAccessRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterCrossAccountAccessRoleInput{} - } - - output = &RegisterCrossAccountAccessRoleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RegisterCrossAccountAccessRole API operation for Amazon Inspector. -// -// Registers the IAM role that grants Amazon Inspector access to AWS Services -// needed to perform security assessments. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation RegisterCrossAccountAccessRole for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeInvalidCrossAccountRoleException "InvalidCrossAccountRoleException" -// Amazon Inspector cannot assume the cross-account role that it needs to list -// your EC2 instances during the assessment run. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RegisterCrossAccountAccessRole -func (c *Inspector) RegisterCrossAccountAccessRole(input *RegisterCrossAccountAccessRoleInput) (*RegisterCrossAccountAccessRoleOutput, error) { - req, out := c.RegisterCrossAccountAccessRoleRequest(input) - return out, req.Send() -} - -// RegisterCrossAccountAccessRoleWithContext is the same as RegisterCrossAccountAccessRole with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterCrossAccountAccessRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) RegisterCrossAccountAccessRoleWithContext(ctx aws.Context, input *RegisterCrossAccountAccessRoleInput, opts ...request.Option) (*RegisterCrossAccountAccessRoleOutput, error) { - req, out := c.RegisterCrossAccountAccessRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveAttributesFromFindings = "RemoveAttributesFromFindings" - -// RemoveAttributesFromFindingsRequest generates a "aws/request.Request" representing the -// client's request for the RemoveAttributesFromFindings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveAttributesFromFindings for more information on using the RemoveAttributesFromFindings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveAttributesFromFindingsRequest method. -// req, resp := client.RemoveAttributesFromFindingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RemoveAttributesFromFindings -func (c *Inspector) RemoveAttributesFromFindingsRequest(input *RemoveAttributesFromFindingsInput) (req *request.Request, output *RemoveAttributesFromFindingsOutput) { - op := &request.Operation{ - Name: opRemoveAttributesFromFindings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveAttributesFromFindingsInput{} - } - - output = &RemoveAttributesFromFindingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// RemoveAttributesFromFindings API operation for Amazon Inspector. -// -// Removes entire attributes (key and value pairs) from the findings that are -// specified by the ARNs of the findings where an attribute with the specified -// key exists. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation RemoveAttributesFromFindings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RemoveAttributesFromFindings -func (c *Inspector) RemoveAttributesFromFindings(input *RemoveAttributesFromFindingsInput) (*RemoveAttributesFromFindingsOutput, error) { - req, out := c.RemoveAttributesFromFindingsRequest(input) - return out, req.Send() -} - -// RemoveAttributesFromFindingsWithContext is the same as RemoveAttributesFromFindings with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveAttributesFromFindings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) RemoveAttributesFromFindingsWithContext(ctx aws.Context, input *RemoveAttributesFromFindingsInput, opts ...request.Option) (*RemoveAttributesFromFindingsOutput, error) { - req, out := c.RemoveAttributesFromFindingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetTagsForResource = "SetTagsForResource" - -// SetTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the SetTagsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetTagsForResource for more information on using the SetTagsForResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetTagsForResourceRequest method. -// req, resp := client.SetTagsForResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SetTagsForResource -func (c *Inspector) SetTagsForResourceRequest(input *SetTagsForResourceInput) (req *request.Request, output *SetTagsForResourceOutput) { - op := &request.Operation{ - Name: opSetTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetTagsForResourceInput{} - } - - output = &SetTagsForResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetTagsForResource API operation for Amazon Inspector. -// -// Sets tags (key and value pairs) to the assessment template that is specified -// by the ARN of the assessment template. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation SetTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SetTagsForResource -func (c *Inspector) SetTagsForResource(input *SetTagsForResourceInput) (*SetTagsForResourceOutput, error) { - req, out := c.SetTagsForResourceRequest(input) - return out, req.Send() -} - -// SetTagsForResourceWithContext is the same as SetTagsForResource with the addition of -// the ability to pass a context and additional request options. -// -// See SetTagsForResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) SetTagsForResourceWithContext(ctx aws.Context, input *SetTagsForResourceInput, opts ...request.Option) (*SetTagsForResourceOutput, error) { - req, out := c.SetTagsForResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartAssessmentRun = "StartAssessmentRun" - -// StartAssessmentRunRequest generates a "aws/request.Request" representing the -// client's request for the StartAssessmentRun operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartAssessmentRun for more information on using the StartAssessmentRun -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartAssessmentRunRequest method. -// req, resp := client.StartAssessmentRunRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/StartAssessmentRun -func (c *Inspector) StartAssessmentRunRequest(input *StartAssessmentRunInput) (req *request.Request, output *StartAssessmentRunOutput) { - op := &request.Operation{ - Name: opStartAssessmentRun, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartAssessmentRunInput{} - } - - output = &StartAssessmentRunOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartAssessmentRun API operation for Amazon Inspector. -// -// Starts the assessment run specified by the ARN of the assessment template. -// For this API to function properly, you must not exceed the limit of running -// up to 500 concurrent agents per AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation StartAssessmentRun for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeInvalidCrossAccountRoleException "InvalidCrossAccountRoleException" -// Amazon Inspector cannot assume the cross-account role that it needs to list -// your EC2 instances during the assessment run. -// -// * ErrCodeAgentsAlreadyRunningAssessmentException "AgentsAlreadyRunningAssessmentException" -// You started an assessment run, but one of the instances is already participating -// in another assessment run. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/StartAssessmentRun -func (c *Inspector) StartAssessmentRun(input *StartAssessmentRunInput) (*StartAssessmentRunOutput, error) { - req, out := c.StartAssessmentRunRequest(input) - return out, req.Send() -} - -// StartAssessmentRunWithContext is the same as StartAssessmentRun with the addition of -// the ability to pass a context and additional request options. -// -// See StartAssessmentRun for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) StartAssessmentRunWithContext(ctx aws.Context, input *StartAssessmentRunInput, opts ...request.Option) (*StartAssessmentRunOutput, error) { - req, out := c.StartAssessmentRunRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopAssessmentRun = "StopAssessmentRun" - -// StopAssessmentRunRequest generates a "aws/request.Request" representing the -// client's request for the StopAssessmentRun operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopAssessmentRun for more information on using the StopAssessmentRun -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopAssessmentRunRequest method. -// req, resp := client.StopAssessmentRunRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/StopAssessmentRun -func (c *Inspector) StopAssessmentRunRequest(input *StopAssessmentRunInput) (req *request.Request, output *StopAssessmentRunOutput) { - op := &request.Operation{ - Name: opStopAssessmentRun, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopAssessmentRunInput{} - } - - output = &StopAssessmentRunOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopAssessmentRun API operation for Amazon Inspector. -// -// Stops the assessment run that is specified by the ARN of the assessment run. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation StopAssessmentRun for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/StopAssessmentRun -func (c *Inspector) StopAssessmentRun(input *StopAssessmentRunInput) (*StopAssessmentRunOutput, error) { - req, out := c.StopAssessmentRunRequest(input) - return out, req.Send() -} - -// StopAssessmentRunWithContext is the same as StopAssessmentRun with the addition of -// the ability to pass a context and additional request options. -// -// See StopAssessmentRun for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) StopAssessmentRunWithContext(ctx aws.Context, input *StopAssessmentRunInput, opts ...request.Option) (*StopAssessmentRunOutput, error) { - req, out := c.StopAssessmentRunRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSubscribeToEvent = "SubscribeToEvent" - -// SubscribeToEventRequest generates a "aws/request.Request" representing the -// client's request for the SubscribeToEvent operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SubscribeToEvent for more information on using the SubscribeToEvent -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SubscribeToEventRequest method. -// req, resp := client.SubscribeToEventRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SubscribeToEvent -func (c *Inspector) SubscribeToEventRequest(input *SubscribeToEventInput) (req *request.Request, output *SubscribeToEventOutput) { - op := &request.Operation{ - Name: opSubscribeToEvent, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SubscribeToEventInput{} - } - - output = &SubscribeToEventOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SubscribeToEvent API operation for Amazon Inspector. -// -// Enables the process of sending Amazon Simple Notification Service (SNS) notifications -// about a specified event to a specified SNS topic. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation SubscribeToEvent for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SubscribeToEvent -func (c *Inspector) SubscribeToEvent(input *SubscribeToEventInput) (*SubscribeToEventOutput, error) { - req, out := c.SubscribeToEventRequest(input) - return out, req.Send() -} - -// SubscribeToEventWithContext is the same as SubscribeToEvent with the addition of -// the ability to pass a context and additional request options. -// -// See SubscribeToEvent for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) SubscribeToEventWithContext(ctx aws.Context, input *SubscribeToEventInput, opts ...request.Option) (*SubscribeToEventOutput, error) { - req, out := c.SubscribeToEventRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUnsubscribeFromEvent = "UnsubscribeFromEvent" - -// UnsubscribeFromEventRequest generates a "aws/request.Request" representing the -// client's request for the UnsubscribeFromEvent operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UnsubscribeFromEvent for more information on using the UnsubscribeFromEvent -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UnsubscribeFromEventRequest method. -// req, resp := client.UnsubscribeFromEventRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/UnsubscribeFromEvent -func (c *Inspector) UnsubscribeFromEventRequest(input *UnsubscribeFromEventInput) (req *request.Request, output *UnsubscribeFromEventOutput) { - op := &request.Operation{ - Name: opUnsubscribeFromEvent, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UnsubscribeFromEventInput{} - } - - output = &UnsubscribeFromEventOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UnsubscribeFromEvent API operation for Amazon Inspector. -// -// Disables the process of sending Amazon Simple Notification Service (SNS) -// notifications about a specified event to a specified SNS topic. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation UnsubscribeFromEvent for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/UnsubscribeFromEvent -func (c *Inspector) UnsubscribeFromEvent(input *UnsubscribeFromEventInput) (*UnsubscribeFromEventOutput, error) { - req, out := c.UnsubscribeFromEventRequest(input) - return out, req.Send() -} - -// UnsubscribeFromEventWithContext is the same as UnsubscribeFromEvent with the addition of -// the ability to pass a context and additional request options. -// -// See UnsubscribeFromEvent for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) UnsubscribeFromEventWithContext(ctx aws.Context, input *UnsubscribeFromEventInput, opts ...request.Option) (*UnsubscribeFromEventOutput, error) { - req, out := c.UnsubscribeFromEventRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAssessmentTarget = "UpdateAssessmentTarget" - -// UpdateAssessmentTargetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAssessmentTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAssessmentTarget for more information on using the UpdateAssessmentTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAssessmentTargetRequest method. -// req, resp := client.UpdateAssessmentTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/UpdateAssessmentTarget -func (c *Inspector) UpdateAssessmentTargetRequest(input *UpdateAssessmentTargetInput) (req *request.Request, output *UpdateAssessmentTargetOutput) { - op := &request.Operation{ - Name: opUpdateAssessmentTarget, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAssessmentTargetInput{} - } - - output = &UpdateAssessmentTargetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateAssessmentTarget API operation for Amazon Inspector. -// -// Updates the assessment target that is specified by the ARN of the assessment -// target. -// -// If resourceGroupArn is not specified, all EC2 instances in the current AWS -// account and region are included in the assessment target. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Inspector's -// API operation UpdateAssessmentTarget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeNoSuchEntityException "NoSuchEntityException" -// The request was rejected because it referenced an entity that does not exist. -// The error code describes the entity. -// -// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException" -// The serice is temporary unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/UpdateAssessmentTarget -func (c *Inspector) UpdateAssessmentTarget(input *UpdateAssessmentTargetInput) (*UpdateAssessmentTargetOutput, error) { - req, out := c.UpdateAssessmentTargetRequest(input) - return out, req.Send() -} - -// UpdateAssessmentTargetWithContext is the same as UpdateAssessmentTarget with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAssessmentTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Inspector) UpdateAssessmentTargetWithContext(ctx aws.Context, input *UpdateAssessmentTargetInput, opts ...request.Option) (*UpdateAssessmentTargetOutput, error) { - req, out := c.UpdateAssessmentTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AddAttributesToFindingsInput struct { - _ struct{} `type:"structure"` - - // The array of attributes that you want to assign to specified findings. - // - // Attributes is a required field - Attributes []*Attribute `locationName:"attributes" type:"list" required:"true"` - - // The ARNs that specify the findings that you want to assign attributes to. - // - // FindingArns is a required field - FindingArns []*string `locationName:"findingArns" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s AddAttributesToFindingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddAttributesToFindingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddAttributesToFindingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddAttributesToFindingsInput"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.FindingArns == nil { - invalidParams.Add(request.NewErrParamRequired("FindingArns")) - } - if s.FindingArns != nil && len(s.FindingArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FindingArns", 1)) - } - if s.Attributes != nil { - for i, v := range s.Attributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *AddAttributesToFindingsInput) SetAttributes(v []*Attribute) *AddAttributesToFindingsInput { - s.Attributes = v - return s -} - -// SetFindingArns sets the FindingArns field's value. -func (s *AddAttributesToFindingsInput) SetFindingArns(v []*string) *AddAttributesToFindingsInput { - s.FindingArns = v - return s -} - -type AddAttributesToFindingsOutput struct { - _ struct{} `type:"structure"` - - // Attribute details that cannot be described. An error code is provided for - // each failed item. - // - // FailedItems is a required field - FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` -} - -// String returns the string representation -func (s AddAttributesToFindingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddAttributesToFindingsOutput) GoString() string { - return s.String() -} - -// SetFailedItems sets the FailedItems field's value. -func (s *AddAttributesToFindingsOutput) SetFailedItems(v map[string]*FailedItemDetails) *AddAttributesToFindingsOutput { - s.FailedItems = v - return s -} - -// Used in the exception error that is thrown if you start an assessment run -// for an assessment target that includes an EC2 instance that is already participating -// in another started assessment run. -type AgentAlreadyRunningAssessment struct { - _ struct{} `type:"structure"` - - // ID of the agent that is running on an EC2 instance that is already participating - // in another started assessment run. - // - // AgentId is a required field - AgentId *string `locationName:"agentId" min:"1" type:"string" required:"true"` - - // The ARN of the assessment run that has already been started. - // - // AssessmentRunArn is a required field - AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AgentAlreadyRunningAssessment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AgentAlreadyRunningAssessment) GoString() string { - return s.String() -} - -// SetAgentId sets the AgentId field's value. -func (s *AgentAlreadyRunningAssessment) SetAgentId(v string) *AgentAlreadyRunningAssessment { - s.AgentId = &v - return s -} - -// SetAssessmentRunArn sets the AssessmentRunArn field's value. -func (s *AgentAlreadyRunningAssessment) SetAssessmentRunArn(v string) *AgentAlreadyRunningAssessment { - s.AssessmentRunArn = &v - return s -} - -// Contains information about an Amazon Inspector agent. This data type is used -// as a request parameter in the ListAssessmentRunAgents action. -type AgentFilter struct { - _ struct{} `type:"structure"` - - // The detailed health state of the agent. Values can be set to IDLE, RUNNING, - // SHUTDOWN, UNHEALTHY, THROTTLED, and UNKNOWN. - // - // AgentHealthCodes is a required field - AgentHealthCodes []*string `locationName:"agentHealthCodes" type:"list" required:"true"` - - // The current health state of the agent. Values can be set to HEALTHY or UNHEALTHY. - // - // AgentHealths is a required field - AgentHealths []*string `locationName:"agentHealths" type:"list" required:"true"` -} - -// String returns the string representation -func (s AgentFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AgentFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AgentFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AgentFilter"} - if s.AgentHealthCodes == nil { - invalidParams.Add(request.NewErrParamRequired("AgentHealthCodes")) - } - if s.AgentHealths == nil { - invalidParams.Add(request.NewErrParamRequired("AgentHealths")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAgentHealthCodes sets the AgentHealthCodes field's value. -func (s *AgentFilter) SetAgentHealthCodes(v []*string) *AgentFilter { - s.AgentHealthCodes = v - return s -} - -// SetAgentHealths sets the AgentHealths field's value. -func (s *AgentFilter) SetAgentHealths(v []*string) *AgentFilter { - s.AgentHealths = v - return s -} - -// Used as a response element in the PreviewAgents action. -type AgentPreview struct { - _ struct{} `type:"structure"` - - // The health status of the Amazon Inspector Agent. - AgentHealth *string `locationName:"agentHealth" type:"string" enum:"AgentHealth"` - - // The ID of the EC2 instance where the agent is installed. - // - // AgentId is a required field - AgentId *string `locationName:"agentId" min:"1" type:"string" required:"true"` - - // The version of the Amazon Inspector Agent. - AgentVersion *string `locationName:"agentVersion" min:"1" type:"string"` - - // The Auto Scaling group for the EC2 instance where the agent is installed. - AutoScalingGroup *string `locationName:"autoScalingGroup" min:"1" type:"string"` - - // The hostname of the EC2 instance on which the Amazon Inspector Agent is installed. - Hostname *string `locationName:"hostname" type:"string"` - - // The IP address of the EC2 instance on which the Amazon Inspector Agent is - // installed. - Ipv4Address *string `locationName:"ipv4Address" min:"7" type:"string"` - - // The kernel version of the operating system running on the EC2 instance on - // which the Amazon Inspector Agent is installed. - KernelVersion *string `locationName:"kernelVersion" min:"1" type:"string"` - - // The operating system running on the EC2 instance on which the Amazon Inspector - // Agent is installed. - OperatingSystem *string `locationName:"operatingSystem" min:"1" type:"string"` -} - -// String returns the string representation -func (s AgentPreview) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AgentPreview) GoString() string { - return s.String() -} - -// SetAgentHealth sets the AgentHealth field's value. -func (s *AgentPreview) SetAgentHealth(v string) *AgentPreview { - s.AgentHealth = &v - return s -} - -// SetAgentId sets the AgentId field's value. -func (s *AgentPreview) SetAgentId(v string) *AgentPreview { - s.AgentId = &v - return s -} - -// SetAgentVersion sets the AgentVersion field's value. -func (s *AgentPreview) SetAgentVersion(v string) *AgentPreview { - s.AgentVersion = &v - return s -} - -// SetAutoScalingGroup sets the AutoScalingGroup field's value. -func (s *AgentPreview) SetAutoScalingGroup(v string) *AgentPreview { - s.AutoScalingGroup = &v - return s -} - -// SetHostname sets the Hostname field's value. -func (s *AgentPreview) SetHostname(v string) *AgentPreview { - s.Hostname = &v - return s -} - -// SetIpv4Address sets the Ipv4Address field's value. -func (s *AgentPreview) SetIpv4Address(v string) *AgentPreview { - s.Ipv4Address = &v - return s -} - -// SetKernelVersion sets the KernelVersion field's value. -func (s *AgentPreview) SetKernelVersion(v string) *AgentPreview { - s.KernelVersion = &v - return s -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *AgentPreview) SetOperatingSystem(v string) *AgentPreview { - s.OperatingSystem = &v - return s -} - -// A snapshot of an Amazon Inspector assessment run that contains the findings -// of the assessment run . -// -// Used as the response element in the DescribeAssessmentRuns action. -type AssessmentRun struct { - _ struct{} `type:"structure"` - - // The ARN of the assessment run. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` - - // The ARN of the assessment template that is associated with the assessment - // run. - // - // AssessmentTemplateArn is a required field - AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"` - - // The assessment run completion time that corresponds to the rules packages - // evaluation completion time or failure. - CompletedAt *time.Time `locationName:"completedAt" type:"timestamp"` - - // The time when StartAssessmentRun was called. - // - // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` - - // A Boolean value (true or false) that specifies whether the process of collecting - // data from the agents is completed. - // - // DataCollected is a required field - DataCollected *bool `locationName:"dataCollected" type:"boolean" required:"true"` - - // The duration of the assessment run. - // - // DurationInSeconds is a required field - DurationInSeconds *int64 `locationName:"durationInSeconds" min:"180" type:"integer" required:"true"` - - // Provides a total count of generated findings per severity. - // - // FindingCounts is a required field - FindingCounts map[string]*int64 `locationName:"findingCounts" type:"map" required:"true"` - - // The auto-generated name for the assessment run. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // A list of notifications for the event subscriptions. A notification about - // a particular generated finding is added to this list only once. - // - // Notifications is a required field - Notifications []*AssessmentRunNotification `locationName:"notifications" type:"list" required:"true"` - - // The rules packages selected for the assessment run. - // - // RulesPackageArns is a required field - RulesPackageArns []*string `locationName:"rulesPackageArns" min:"1" type:"list" required:"true"` - - // The time when StartAssessmentRun was called. - StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` - - // The state of the assessment run. - // - // State is a required field - State *string `locationName:"state" type:"string" required:"true" enum:"AssessmentRunState"` - - // The last time when the assessment run's state changed. - // - // StateChangedAt is a required field - StateChangedAt *time.Time `locationName:"stateChangedAt" type:"timestamp" required:"true"` - - // A list of the assessment run state changes. - // - // StateChanges is a required field - StateChanges []*AssessmentRunStateChange `locationName:"stateChanges" type:"list" required:"true"` - - // The user-defined attributes that are assigned to every generated finding. - // - // UserAttributesForFindings is a required field - UserAttributesForFindings []*Attribute `locationName:"userAttributesForFindings" type:"list" required:"true"` -} - -// String returns the string representation -func (s AssessmentRun) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssessmentRun) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *AssessmentRun) SetArn(v string) *AssessmentRun { - s.Arn = &v - return s -} - -// SetAssessmentTemplateArn sets the AssessmentTemplateArn field's value. -func (s *AssessmentRun) SetAssessmentTemplateArn(v string) *AssessmentRun { - s.AssessmentTemplateArn = &v - return s -} - -// SetCompletedAt sets the CompletedAt field's value. -func (s *AssessmentRun) SetCompletedAt(v time.Time) *AssessmentRun { - s.CompletedAt = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *AssessmentRun) SetCreatedAt(v time.Time) *AssessmentRun { - s.CreatedAt = &v - return s -} - -// SetDataCollected sets the DataCollected field's value. -func (s *AssessmentRun) SetDataCollected(v bool) *AssessmentRun { - s.DataCollected = &v - return s -} - -// SetDurationInSeconds sets the DurationInSeconds field's value. -func (s *AssessmentRun) SetDurationInSeconds(v int64) *AssessmentRun { - s.DurationInSeconds = &v - return s -} - -// SetFindingCounts sets the FindingCounts field's value. -func (s *AssessmentRun) SetFindingCounts(v map[string]*int64) *AssessmentRun { - s.FindingCounts = v - return s -} - -// SetName sets the Name field's value. -func (s *AssessmentRun) SetName(v string) *AssessmentRun { - s.Name = &v - return s -} - -// SetNotifications sets the Notifications field's value. -func (s *AssessmentRun) SetNotifications(v []*AssessmentRunNotification) *AssessmentRun { - s.Notifications = v - return s -} - -// SetRulesPackageArns sets the RulesPackageArns field's value. -func (s *AssessmentRun) SetRulesPackageArns(v []*string) *AssessmentRun { - s.RulesPackageArns = v - return s -} - -// SetStartedAt sets the StartedAt field's value. -func (s *AssessmentRun) SetStartedAt(v time.Time) *AssessmentRun { - s.StartedAt = &v - return s -} - -// SetState sets the State field's value. -func (s *AssessmentRun) SetState(v string) *AssessmentRun { - s.State = &v - return s -} - -// SetStateChangedAt sets the StateChangedAt field's value. -func (s *AssessmentRun) SetStateChangedAt(v time.Time) *AssessmentRun { - s.StateChangedAt = &v - return s -} - -// SetStateChanges sets the StateChanges field's value. -func (s *AssessmentRun) SetStateChanges(v []*AssessmentRunStateChange) *AssessmentRun { - s.StateChanges = v - return s -} - -// SetUserAttributesForFindings sets the UserAttributesForFindings field's value. -func (s *AssessmentRun) SetUserAttributesForFindings(v []*Attribute) *AssessmentRun { - s.UserAttributesForFindings = v - return s -} - -// Contains information about an Amazon Inspector agent. This data type is used -// as a response element in the ListAssessmentRunAgents action. -type AssessmentRunAgent struct { - _ struct{} `type:"structure"` - - // The current health state of the agent. - // - // AgentHealth is a required field - AgentHealth *string `locationName:"agentHealth" type:"string" required:"true" enum:"AgentHealth"` - - // The detailed health state of the agent. - // - // AgentHealthCode is a required field - AgentHealthCode *string `locationName:"agentHealthCode" type:"string" required:"true" enum:"AgentHealthCode"` - - // The description for the agent health code. - AgentHealthDetails *string `locationName:"agentHealthDetails" type:"string"` - - // The AWS account of the EC2 instance where the agent is installed. - // - // AgentId is a required field - AgentId *string `locationName:"agentId" min:"1" type:"string" required:"true"` - - // The ARN of the assessment run that is associated with the agent. - // - // AssessmentRunArn is a required field - AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` - - // The Auto Scaling group of the EC2 instance that is specified by the agent - // ID. - AutoScalingGroup *string `locationName:"autoScalingGroup" min:"1" type:"string"` - - // The Amazon Inspector application data metrics that are collected by the agent. - // - // TelemetryMetadata is a required field - TelemetryMetadata []*TelemetryMetadata `locationName:"telemetryMetadata" type:"list" required:"true"` -} - -// String returns the string representation -func (s AssessmentRunAgent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssessmentRunAgent) GoString() string { - return s.String() -} - -// SetAgentHealth sets the AgentHealth field's value. -func (s *AssessmentRunAgent) SetAgentHealth(v string) *AssessmentRunAgent { - s.AgentHealth = &v - return s -} - -// SetAgentHealthCode sets the AgentHealthCode field's value. -func (s *AssessmentRunAgent) SetAgentHealthCode(v string) *AssessmentRunAgent { - s.AgentHealthCode = &v - return s -} - -// SetAgentHealthDetails sets the AgentHealthDetails field's value. -func (s *AssessmentRunAgent) SetAgentHealthDetails(v string) *AssessmentRunAgent { - s.AgentHealthDetails = &v - return s -} - -// SetAgentId sets the AgentId field's value. -func (s *AssessmentRunAgent) SetAgentId(v string) *AssessmentRunAgent { - s.AgentId = &v - return s -} - -// SetAssessmentRunArn sets the AssessmentRunArn field's value. -func (s *AssessmentRunAgent) SetAssessmentRunArn(v string) *AssessmentRunAgent { - s.AssessmentRunArn = &v - return s -} - -// SetAutoScalingGroup sets the AutoScalingGroup field's value. -func (s *AssessmentRunAgent) SetAutoScalingGroup(v string) *AssessmentRunAgent { - s.AutoScalingGroup = &v - return s -} - -// SetTelemetryMetadata sets the TelemetryMetadata field's value. -func (s *AssessmentRunAgent) SetTelemetryMetadata(v []*TelemetryMetadata) *AssessmentRunAgent { - s.TelemetryMetadata = v - return s -} - -// Used as the request parameter in the ListAssessmentRuns action. -type AssessmentRunFilter struct { - _ struct{} `type:"structure"` - - // For a record to match a filter, the value that is specified for this data - // type property must inclusively match any value between the specified minimum - // and maximum values of the completedAt property of the AssessmentRun data - // type. - CompletionTimeRange *TimestampRange `locationName:"completionTimeRange" type:"structure"` - - // For a record to match a filter, the value that is specified for this data - // type property must inclusively match any value between the specified minimum - // and maximum values of the durationInSeconds property of the AssessmentRun - // data type. - DurationRange *DurationRange `locationName:"durationRange" type:"structure"` - - // For a record to match a filter, an explicit value or a string containing - // a wildcard that is specified for this data type property must match the value - // of the assessmentRunName property of the AssessmentRun data type. - NamePattern *string `locationName:"namePattern" min:"1" type:"string"` - - // For a record to match a filter, the value that is specified for this data - // type property must be contained in the list of values of the rulesPackages - // property of the AssessmentRun data type. - RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list"` - - // For a record to match a filter, the value that is specified for this data - // type property must inclusively match any value between the specified minimum - // and maximum values of the startTime property of the AssessmentRun data type. - StartTimeRange *TimestampRange `locationName:"startTimeRange" type:"structure"` - - // For a record to match a filter, the value that is specified for this data - // type property must match the stateChangedAt property of the AssessmentRun - // data type. - StateChangeTimeRange *TimestampRange `locationName:"stateChangeTimeRange" type:"structure"` - - // For a record to match a filter, one of the values specified for this data - // type property must be the exact match of the value of the assessmentRunState - // property of the AssessmentRun data type. - States []*string `locationName:"states" type:"list"` -} - -// String returns the string representation -func (s AssessmentRunFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssessmentRunFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssessmentRunFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssessmentRunFilter"} - if s.NamePattern != nil && len(*s.NamePattern) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NamePattern", 1)) - } - if s.DurationRange != nil { - if err := s.DurationRange.Validate(); err != nil { - invalidParams.AddNested("DurationRange", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCompletionTimeRange sets the CompletionTimeRange field's value. -func (s *AssessmentRunFilter) SetCompletionTimeRange(v *TimestampRange) *AssessmentRunFilter { - s.CompletionTimeRange = v - return s -} - -// SetDurationRange sets the DurationRange field's value. -func (s *AssessmentRunFilter) SetDurationRange(v *DurationRange) *AssessmentRunFilter { - s.DurationRange = v - return s -} - -// SetNamePattern sets the NamePattern field's value. -func (s *AssessmentRunFilter) SetNamePattern(v string) *AssessmentRunFilter { - s.NamePattern = &v - return s -} - -// SetRulesPackageArns sets the RulesPackageArns field's value. -func (s *AssessmentRunFilter) SetRulesPackageArns(v []*string) *AssessmentRunFilter { - s.RulesPackageArns = v - return s -} - -// SetStartTimeRange sets the StartTimeRange field's value. -func (s *AssessmentRunFilter) SetStartTimeRange(v *TimestampRange) *AssessmentRunFilter { - s.StartTimeRange = v - return s -} - -// SetStateChangeTimeRange sets the StateChangeTimeRange field's value. -func (s *AssessmentRunFilter) SetStateChangeTimeRange(v *TimestampRange) *AssessmentRunFilter { - s.StateChangeTimeRange = v - return s -} - -// SetStates sets the States field's value. -func (s *AssessmentRunFilter) SetStates(v []*string) *AssessmentRunFilter { - s.States = v - return s -} - -// Used as one of the elements of the AssessmentRun data type. -type AssessmentRunNotification struct { - _ struct{} `type:"structure"` - - // The date of the notification. - // - // Date is a required field - Date *time.Time `locationName:"date" type:"timestamp" required:"true"` - - // The Boolean value that specifies whether the notification represents an error. - // - // Error is a required field - Error *bool `locationName:"error" type:"boolean" required:"true"` - - // The event for which a notification is sent. - // - // Event is a required field - Event *string `locationName:"event" type:"string" required:"true" enum:"Event"` - - // The message included in the notification. - Message *string `locationName:"message" type:"string"` - - // The status code of the SNS notification. - SnsPublishStatusCode *string `locationName:"snsPublishStatusCode" type:"string" enum:"AssessmentRunNotificationSnsStatusCode"` - - // The SNS topic to which the SNS notification is sent. - SnsTopicArn *string `locationName:"snsTopicArn" min:"1" type:"string"` -} - -// String returns the string representation -func (s AssessmentRunNotification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssessmentRunNotification) GoString() string { - return s.String() -} - -// SetDate sets the Date field's value. -func (s *AssessmentRunNotification) SetDate(v time.Time) *AssessmentRunNotification { - s.Date = &v - return s -} - -// SetError sets the Error field's value. -func (s *AssessmentRunNotification) SetError(v bool) *AssessmentRunNotification { - s.Error = &v - return s -} - -// SetEvent sets the Event field's value. -func (s *AssessmentRunNotification) SetEvent(v string) *AssessmentRunNotification { - s.Event = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *AssessmentRunNotification) SetMessage(v string) *AssessmentRunNotification { - s.Message = &v - return s -} - -// SetSnsPublishStatusCode sets the SnsPublishStatusCode field's value. -func (s *AssessmentRunNotification) SetSnsPublishStatusCode(v string) *AssessmentRunNotification { - s.SnsPublishStatusCode = &v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *AssessmentRunNotification) SetSnsTopicArn(v string) *AssessmentRunNotification { - s.SnsTopicArn = &v - return s -} - -// Used as one of the elements of the AssessmentRun data type. -type AssessmentRunStateChange struct { - _ struct{} `type:"structure"` - - // The assessment run state. - // - // State is a required field - State *string `locationName:"state" type:"string" required:"true" enum:"AssessmentRunState"` - - // The last time the assessment run state changed. - // - // StateChangedAt is a required field - StateChangedAt *time.Time `locationName:"stateChangedAt" type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s AssessmentRunStateChange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssessmentRunStateChange) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *AssessmentRunStateChange) SetState(v string) *AssessmentRunStateChange { - s.State = &v - return s -} - -// SetStateChangedAt sets the StateChangedAt field's value. -func (s *AssessmentRunStateChange) SetStateChangedAt(v time.Time) *AssessmentRunStateChange { - s.StateChangedAt = &v - return s -} - -// Contains information about an Amazon Inspector application. This data type -// is used as the response element in the DescribeAssessmentTargets action. -type AssessmentTarget struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the Amazon Inspector assessment target. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` - - // The time at which the assessment target is created. - // - // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` - - // The name of the Amazon Inspector assessment target. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The ARN that specifies the resource group that is associated with the assessment - // target. - ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string"` - - // The time at which UpdateAssessmentTarget is called. - // - // UpdatedAt is a required field - UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s AssessmentTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssessmentTarget) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *AssessmentTarget) SetArn(v string) *AssessmentTarget { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *AssessmentTarget) SetCreatedAt(v time.Time) *AssessmentTarget { - s.CreatedAt = &v - return s -} - -// SetName sets the Name field's value. -func (s *AssessmentTarget) SetName(v string) *AssessmentTarget { - s.Name = &v - return s -} - -// SetResourceGroupArn sets the ResourceGroupArn field's value. -func (s *AssessmentTarget) SetResourceGroupArn(v string) *AssessmentTarget { - s.ResourceGroupArn = &v - return s -} - -// SetUpdatedAt sets the UpdatedAt field's value. -func (s *AssessmentTarget) SetUpdatedAt(v time.Time) *AssessmentTarget { - s.UpdatedAt = &v - return s -} - -// Used as the request parameter in the ListAssessmentTargets action. -type AssessmentTargetFilter struct { - _ struct{} `type:"structure"` - - // For a record to match a filter, an explicit value or a string that contains - // a wildcard that is specified for this data type property must match the value - // of the assessmentTargetName property of the AssessmentTarget data type. - AssessmentTargetNamePattern *string `locationName:"assessmentTargetNamePattern" min:"1" type:"string"` -} - -// String returns the string representation -func (s AssessmentTargetFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssessmentTargetFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssessmentTargetFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssessmentTargetFilter"} - if s.AssessmentTargetNamePattern != nil && len(*s.AssessmentTargetNamePattern) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetNamePattern", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentTargetNamePattern sets the AssessmentTargetNamePattern field's value. -func (s *AssessmentTargetFilter) SetAssessmentTargetNamePattern(v string) *AssessmentTargetFilter { - s.AssessmentTargetNamePattern = &v - return s -} - -// Contains information about an Amazon Inspector assessment template. This -// data type is used as the response element in the DescribeAssessmentTemplates -// action. -type AssessmentTemplate struct { - _ struct{} `type:"structure"` - - // The ARN of the assessment template. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` - - // The number of existing assessment runs associated with this assessment template. - // This value can be zero or a positive integer. - // - // AssessmentRunCount is a required field - AssessmentRunCount *int64 `locationName:"assessmentRunCount" type:"integer" required:"true"` - - // The ARN of the assessment target that corresponds to this assessment template. - // - // AssessmentTargetArn is a required field - AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"` - - // The time at which the assessment template is created. - // - // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` - - // The duration in seconds specified for this assessment template. The default - // value is 3600 seconds (one hour). The maximum value is 86400 seconds (one - // day). - // - // DurationInSeconds is a required field - DurationInSeconds *int64 `locationName:"durationInSeconds" min:"180" type:"integer" required:"true"` - - // The Amazon Resource Name (ARN) of the most recent assessment run associated - // with this assessment template. This value exists only when the value of assessmentRunCount - // is greaterpa than zero. - LastAssessmentRunArn *string `locationName:"lastAssessmentRunArn" min:"1" type:"string"` - - // The name of the assessment template. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The rules packages that are specified for this assessment template. - // - // RulesPackageArns is a required field - RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list" required:"true"` - - // The user-defined attributes that are assigned to every generated finding - // from the assessment run that uses this assessment template. - // - // UserAttributesForFindings is a required field - UserAttributesForFindings []*Attribute `locationName:"userAttributesForFindings" type:"list" required:"true"` -} - -// String returns the string representation -func (s AssessmentTemplate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssessmentTemplate) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *AssessmentTemplate) SetArn(v string) *AssessmentTemplate { - s.Arn = &v - return s -} - -// SetAssessmentRunCount sets the AssessmentRunCount field's value. -func (s *AssessmentTemplate) SetAssessmentRunCount(v int64) *AssessmentTemplate { - s.AssessmentRunCount = &v - return s -} - -// SetAssessmentTargetArn sets the AssessmentTargetArn field's value. -func (s *AssessmentTemplate) SetAssessmentTargetArn(v string) *AssessmentTemplate { - s.AssessmentTargetArn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *AssessmentTemplate) SetCreatedAt(v time.Time) *AssessmentTemplate { - s.CreatedAt = &v - return s -} - -// SetDurationInSeconds sets the DurationInSeconds field's value. -func (s *AssessmentTemplate) SetDurationInSeconds(v int64) *AssessmentTemplate { - s.DurationInSeconds = &v - return s -} - -// SetLastAssessmentRunArn sets the LastAssessmentRunArn field's value. -func (s *AssessmentTemplate) SetLastAssessmentRunArn(v string) *AssessmentTemplate { - s.LastAssessmentRunArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *AssessmentTemplate) SetName(v string) *AssessmentTemplate { - s.Name = &v - return s -} - -// SetRulesPackageArns sets the RulesPackageArns field's value. -func (s *AssessmentTemplate) SetRulesPackageArns(v []*string) *AssessmentTemplate { - s.RulesPackageArns = v - return s -} - -// SetUserAttributesForFindings sets the UserAttributesForFindings field's value. -func (s *AssessmentTemplate) SetUserAttributesForFindings(v []*Attribute) *AssessmentTemplate { - s.UserAttributesForFindings = v - return s -} - -// Used as the request parameter in the ListAssessmentTemplates action. -type AssessmentTemplateFilter struct { - _ struct{} `type:"structure"` - - // For a record to match a filter, the value specified for this data type property - // must inclusively match any value between the specified minimum and maximum - // values of the durationInSeconds property of the AssessmentTemplate data type. - DurationRange *DurationRange `locationName:"durationRange" type:"structure"` - - // For a record to match a filter, an explicit value or a string that contains - // a wildcard that is specified for this data type property must match the value - // of the assessmentTemplateName property of the AssessmentTemplate data type. - NamePattern *string `locationName:"namePattern" min:"1" type:"string"` - - // For a record to match a filter, the values that are specified for this data - // type property must be contained in the list of values of the rulesPackageArns - // property of the AssessmentTemplate data type. - RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list"` -} - -// String returns the string representation -func (s AssessmentTemplateFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssessmentTemplateFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssessmentTemplateFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssessmentTemplateFilter"} - if s.NamePattern != nil && len(*s.NamePattern) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NamePattern", 1)) - } - if s.DurationRange != nil { - if err := s.DurationRange.Validate(); err != nil { - invalidParams.AddNested("DurationRange", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDurationRange sets the DurationRange field's value. -func (s *AssessmentTemplateFilter) SetDurationRange(v *DurationRange) *AssessmentTemplateFilter { - s.DurationRange = v - return s -} - -// SetNamePattern sets the NamePattern field's value. -func (s *AssessmentTemplateFilter) SetNamePattern(v string) *AssessmentTemplateFilter { - s.NamePattern = &v - return s -} - -// SetRulesPackageArns sets the RulesPackageArns field's value. -func (s *AssessmentTemplateFilter) SetRulesPackageArns(v []*string) *AssessmentTemplateFilter { - s.RulesPackageArns = v - return s -} - -// A collection of attributes of the host from which the finding is generated. -type AssetAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the agent that is installed on the EC2 instance where the finding - // is generated. - AgentId *string `locationName:"agentId" min:"1" type:"string"` - - // The ID of the Amazon Machine Image (AMI) that is installed on the EC2 instance - // where the finding is generated. - AmiId *string `locationName:"amiId" type:"string"` - - // The Auto Scaling group of the EC2 instance where the finding is generated. - AutoScalingGroup *string `locationName:"autoScalingGroup" min:"1" type:"string"` - - // The hostname of the EC2 instance where the finding is generated. - Hostname *string `locationName:"hostname" type:"string"` - - // The list of IP v4 addresses of the EC2 instance where the finding is generated. - Ipv4Addresses []*string `locationName:"ipv4Addresses" type:"list"` - - // An array of the network interfaces interacting with the EC2 instance where - // the finding is generated. - NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaces" type:"list"` - - // The schema version of this data type. - // - // SchemaVersion is a required field - SchemaVersion *int64 `locationName:"schemaVersion" type:"integer" required:"true"` - - // The tags related to the EC2 instance where the finding is generated. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s AssetAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssetAttributes) GoString() string { - return s.String() -} - -// SetAgentId sets the AgentId field's value. -func (s *AssetAttributes) SetAgentId(v string) *AssetAttributes { - s.AgentId = &v - return s -} - -// SetAmiId sets the AmiId field's value. -func (s *AssetAttributes) SetAmiId(v string) *AssetAttributes { - s.AmiId = &v - return s -} - -// SetAutoScalingGroup sets the AutoScalingGroup field's value. -func (s *AssetAttributes) SetAutoScalingGroup(v string) *AssetAttributes { - s.AutoScalingGroup = &v - return s -} - -// SetHostname sets the Hostname field's value. -func (s *AssetAttributes) SetHostname(v string) *AssetAttributes { - s.Hostname = &v - return s -} - -// SetIpv4Addresses sets the Ipv4Addresses field's value. -func (s *AssetAttributes) SetIpv4Addresses(v []*string) *AssetAttributes { - s.Ipv4Addresses = v - return s -} - -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *AssetAttributes) SetNetworkInterfaces(v []*NetworkInterface) *AssetAttributes { - s.NetworkInterfaces = v - return s -} - -// SetSchemaVersion sets the SchemaVersion field's value. -func (s *AssetAttributes) SetSchemaVersion(v int64) *AssetAttributes { - s.SchemaVersion = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AssetAttributes) SetTags(v []*Tag) *AssetAttributes { - s.Tags = v - return s -} - -// This data type is used as a request parameter in the AddAttributesToFindings -// and CreateAssessmentTemplate actions. -type Attribute struct { - _ struct{} `type:"structure"` - - // The attribute key. - // - // Key is a required field - Key *string `locationName:"key" min:"1" type:"string" required:"true"` - - // The value assigned to the attribute key. - Value *string `locationName:"value" min:"1" type:"string"` -} - -// String returns the string representation -func (s Attribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Attribute) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Attribute) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Attribute"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Attribute) SetKey(v string) *Attribute { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Attribute) SetValue(v string) *Attribute { - s.Value = &v - return s -} - -type CreateAssessmentTargetInput struct { - _ struct{} `type:"structure"` - - // The user-defined name that identifies the assessment target that you want - // to create. The name must be unique within the AWS account. - // - // AssessmentTargetName is a required field - AssessmentTargetName *string `locationName:"assessmentTargetName" min:"1" type:"string" required:"true"` - - // The ARN that specifies the resource group that is used to create the assessment - // target. If resourceGroupArn is not specified, all EC2 instances in the current - // AWS account and region are included in the assessment target. - ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateAssessmentTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAssessmentTargetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAssessmentTargetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAssessmentTargetInput"} - if s.AssessmentTargetName == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentTargetName")) - } - if s.AssessmentTargetName != nil && len(*s.AssessmentTargetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetName", 1)) - } - if s.ResourceGroupArn != nil && len(*s.ResourceGroupArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceGroupArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentTargetName sets the AssessmentTargetName field's value. -func (s *CreateAssessmentTargetInput) SetAssessmentTargetName(v string) *CreateAssessmentTargetInput { - s.AssessmentTargetName = &v - return s -} - -// SetResourceGroupArn sets the ResourceGroupArn field's value. -func (s *CreateAssessmentTargetInput) SetResourceGroupArn(v string) *CreateAssessmentTargetInput { - s.ResourceGroupArn = &v - return s -} - -type CreateAssessmentTargetOutput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the assessment target that is created. - // - // AssessmentTargetArn is a required field - AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateAssessmentTargetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAssessmentTargetOutput) GoString() string { - return s.String() -} - -// SetAssessmentTargetArn sets the AssessmentTargetArn field's value. -func (s *CreateAssessmentTargetOutput) SetAssessmentTargetArn(v string) *CreateAssessmentTargetOutput { - s.AssessmentTargetArn = &v - return s -} - -type CreateAssessmentTemplateInput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the assessment target for which you want to create - // the assessment template. - // - // AssessmentTargetArn is a required field - AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"` - - // The user-defined name that identifies the assessment template that you want - // to create. You can create several assessment templates for an assessment - // target. The names of the assessment templates that correspond to a particular - // assessment target must be unique. - // - // AssessmentTemplateName is a required field - AssessmentTemplateName *string `locationName:"assessmentTemplateName" min:"1" type:"string" required:"true"` - - // The duration of the assessment run in seconds. - // - // DurationInSeconds is a required field - DurationInSeconds *int64 `locationName:"durationInSeconds" min:"180" type:"integer" required:"true"` - - // The ARNs that specify the rules packages that you want to attach to the assessment - // template. - // - // RulesPackageArns is a required field - RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list" required:"true"` - - // The user-defined attributes that are assigned to every finding that is generated - // by the assessment run that uses this assessment template. An attribute is - // a key and value pair (an Attribute object). Within an assessment template, - // each key must be unique. - UserAttributesForFindings []*Attribute `locationName:"userAttributesForFindings" type:"list"` -} - -// String returns the string representation -func (s CreateAssessmentTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAssessmentTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAssessmentTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAssessmentTemplateInput"} - if s.AssessmentTargetArn == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentTargetArn")) - } - if s.AssessmentTargetArn != nil && len(*s.AssessmentTargetArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetArn", 1)) - } - if s.AssessmentTemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateName")) - } - if s.AssessmentTemplateName != nil && len(*s.AssessmentTemplateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateName", 1)) - } - if s.DurationInSeconds == nil { - invalidParams.Add(request.NewErrParamRequired("DurationInSeconds")) - } - if s.DurationInSeconds != nil && *s.DurationInSeconds < 180 { - invalidParams.Add(request.NewErrParamMinValue("DurationInSeconds", 180)) - } - if s.RulesPackageArns == nil { - invalidParams.Add(request.NewErrParamRequired("RulesPackageArns")) - } - if s.UserAttributesForFindings != nil { - for i, v := range s.UserAttributesForFindings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "UserAttributesForFindings", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentTargetArn sets the AssessmentTargetArn field's value. -func (s *CreateAssessmentTemplateInput) SetAssessmentTargetArn(v string) *CreateAssessmentTemplateInput { - s.AssessmentTargetArn = &v - return s -} - -// SetAssessmentTemplateName sets the AssessmentTemplateName field's value. -func (s *CreateAssessmentTemplateInput) SetAssessmentTemplateName(v string) *CreateAssessmentTemplateInput { - s.AssessmentTemplateName = &v - return s -} - -// SetDurationInSeconds sets the DurationInSeconds field's value. -func (s *CreateAssessmentTemplateInput) SetDurationInSeconds(v int64) *CreateAssessmentTemplateInput { - s.DurationInSeconds = &v - return s -} - -// SetRulesPackageArns sets the RulesPackageArns field's value. -func (s *CreateAssessmentTemplateInput) SetRulesPackageArns(v []*string) *CreateAssessmentTemplateInput { - s.RulesPackageArns = v - return s -} - -// SetUserAttributesForFindings sets the UserAttributesForFindings field's value. -func (s *CreateAssessmentTemplateInput) SetUserAttributesForFindings(v []*Attribute) *CreateAssessmentTemplateInput { - s.UserAttributesForFindings = v - return s -} - -type CreateAssessmentTemplateOutput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the assessment template that is created. - // - // AssessmentTemplateArn is a required field - AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateAssessmentTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAssessmentTemplateOutput) GoString() string { - return s.String() -} - -// SetAssessmentTemplateArn sets the AssessmentTemplateArn field's value. -func (s *CreateAssessmentTemplateOutput) SetAssessmentTemplateArn(v string) *CreateAssessmentTemplateOutput { - s.AssessmentTemplateArn = &v - return s -} - -type CreateExclusionsPreviewInput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the assessment template for which you want to create - // an exclusions preview. - // - // AssessmentTemplateArn is a required field - AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateExclusionsPreviewInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateExclusionsPreviewInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateExclusionsPreviewInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateExclusionsPreviewInput"} - if s.AssessmentTemplateArn == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArn")) - } - if s.AssessmentTemplateArn != nil && len(*s.AssessmentTemplateArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentTemplateArn sets the AssessmentTemplateArn field's value. -func (s *CreateExclusionsPreviewInput) SetAssessmentTemplateArn(v string) *CreateExclusionsPreviewInput { - s.AssessmentTemplateArn = &v - return s -} - -type CreateExclusionsPreviewOutput struct { - _ struct{} `type:"structure"` - - // Specifies the unique identifier of the requested exclusions preview. You - // can use the unique identifier to retrieve the exclusions preview when running - // the GetExclusionsPreview API. - // - // PreviewToken is a required field - PreviewToken *string `locationName:"previewToken" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateExclusionsPreviewOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateExclusionsPreviewOutput) GoString() string { - return s.String() -} - -// SetPreviewToken sets the PreviewToken field's value. -func (s *CreateExclusionsPreviewOutput) SetPreviewToken(v string) *CreateExclusionsPreviewOutput { - s.PreviewToken = &v - return s -} - -type CreateResourceGroupInput struct { - _ struct{} `type:"structure"` - - // A collection of keys and an array of possible values, '[{"key":"key1","values":["Value1","Value2"]},{"key":"Key2","values":["Value3"]}]'. - // - // For example,'[{"key":"Name","values":["TestEC2Instance"]}]'. - // - // ResourceGroupTags is a required field - ResourceGroupTags []*ResourceGroupTag `locationName:"resourceGroupTags" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateResourceGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResourceGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateResourceGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateResourceGroupInput"} - if s.ResourceGroupTags == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceGroupTags")) - } - if s.ResourceGroupTags != nil && len(s.ResourceGroupTags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceGroupTags", 1)) - } - if s.ResourceGroupTags != nil { - for i, v := range s.ResourceGroupTags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceGroupTags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceGroupTags sets the ResourceGroupTags field's value. -func (s *CreateResourceGroupInput) SetResourceGroupTags(v []*ResourceGroupTag) *CreateResourceGroupInput { - s.ResourceGroupTags = v - return s -} - -type CreateResourceGroupOutput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the resource group that is created. - // - // ResourceGroupArn is a required field - ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateResourceGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResourceGroupOutput) GoString() string { - return s.String() -} - -// SetResourceGroupArn sets the ResourceGroupArn field's value. -func (s *CreateResourceGroupOutput) SetResourceGroupArn(v string) *CreateResourceGroupOutput { - s.ResourceGroupArn = &v - return s -} - -type DeleteAssessmentRunInput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the assessment run that you want to delete. - // - // AssessmentRunArn is a required field - AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAssessmentRunInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAssessmentRunInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAssessmentRunInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAssessmentRunInput"} - if s.AssessmentRunArn == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn")) - } - if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentRunArn sets the AssessmentRunArn field's value. -func (s *DeleteAssessmentRunInput) SetAssessmentRunArn(v string) *DeleteAssessmentRunInput { - s.AssessmentRunArn = &v - return s -} - -type DeleteAssessmentRunOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAssessmentRunOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAssessmentRunOutput) GoString() string { - return s.String() -} - -type DeleteAssessmentTargetInput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the assessment target that you want to delete. - // - // AssessmentTargetArn is a required field - AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAssessmentTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAssessmentTargetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAssessmentTargetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAssessmentTargetInput"} - if s.AssessmentTargetArn == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentTargetArn")) - } - if s.AssessmentTargetArn != nil && len(*s.AssessmentTargetArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentTargetArn sets the AssessmentTargetArn field's value. -func (s *DeleteAssessmentTargetInput) SetAssessmentTargetArn(v string) *DeleteAssessmentTargetInput { - s.AssessmentTargetArn = &v - return s -} - -type DeleteAssessmentTargetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAssessmentTargetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAssessmentTargetOutput) GoString() string { - return s.String() -} - -type DeleteAssessmentTemplateInput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the assessment template that you want to delete. - // - // AssessmentTemplateArn is a required field - AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAssessmentTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAssessmentTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAssessmentTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAssessmentTemplateInput"} - if s.AssessmentTemplateArn == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArn")) - } - if s.AssessmentTemplateArn != nil && len(*s.AssessmentTemplateArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentTemplateArn sets the AssessmentTemplateArn field's value. -func (s *DeleteAssessmentTemplateInput) SetAssessmentTemplateArn(v string) *DeleteAssessmentTemplateInput { - s.AssessmentTemplateArn = &v - return s -} - -type DeleteAssessmentTemplateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAssessmentTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAssessmentTemplateOutput) GoString() string { - return s.String() -} - -type DescribeAssessmentRunsInput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the assessment run that you want to describe. - // - // AssessmentRunArns is a required field - AssessmentRunArns []*string `locationName:"assessmentRunArns" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeAssessmentRunsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAssessmentRunsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAssessmentRunsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAssessmentRunsInput"} - if s.AssessmentRunArns == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentRunArns")) - } - if s.AssessmentRunArns != nil && len(s.AssessmentRunArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArns", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentRunArns sets the AssessmentRunArns field's value. -func (s *DescribeAssessmentRunsInput) SetAssessmentRunArns(v []*string) *DescribeAssessmentRunsInput { - s.AssessmentRunArns = v - return s -} - -type DescribeAssessmentRunsOutput struct { - _ struct{} `type:"structure"` - - // Information about the assessment run. - // - // AssessmentRuns is a required field - AssessmentRuns []*AssessmentRun `locationName:"assessmentRuns" type:"list" required:"true"` - - // Assessment run details that cannot be described. An error code is provided - // for each failed item. - // - // FailedItems is a required field - FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` -} - -// String returns the string representation -func (s DescribeAssessmentRunsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAssessmentRunsOutput) GoString() string { - return s.String() -} - -// SetAssessmentRuns sets the AssessmentRuns field's value. -func (s *DescribeAssessmentRunsOutput) SetAssessmentRuns(v []*AssessmentRun) *DescribeAssessmentRunsOutput { - s.AssessmentRuns = v - return s -} - -// SetFailedItems sets the FailedItems field's value. -func (s *DescribeAssessmentRunsOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeAssessmentRunsOutput { - s.FailedItems = v - return s -} - -type DescribeAssessmentTargetsInput struct { - _ struct{} `type:"structure"` - - // The ARNs that specifies the assessment targets that you want to describe. - // - // AssessmentTargetArns is a required field - AssessmentTargetArns []*string `locationName:"assessmentTargetArns" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeAssessmentTargetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAssessmentTargetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAssessmentTargetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAssessmentTargetsInput"} - if s.AssessmentTargetArns == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentTargetArns")) - } - if s.AssessmentTargetArns != nil && len(s.AssessmentTargetArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetArns", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentTargetArns sets the AssessmentTargetArns field's value. -func (s *DescribeAssessmentTargetsInput) SetAssessmentTargetArns(v []*string) *DescribeAssessmentTargetsInput { - s.AssessmentTargetArns = v - return s -} - -type DescribeAssessmentTargetsOutput struct { - _ struct{} `type:"structure"` - - // Information about the assessment targets. - // - // AssessmentTargets is a required field - AssessmentTargets []*AssessmentTarget `locationName:"assessmentTargets" type:"list" required:"true"` - - // Assessment target details that cannot be described. An error code is provided - // for each failed item. - // - // FailedItems is a required field - FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` -} - -// String returns the string representation -func (s DescribeAssessmentTargetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAssessmentTargetsOutput) GoString() string { - return s.String() -} - -// SetAssessmentTargets sets the AssessmentTargets field's value. -func (s *DescribeAssessmentTargetsOutput) SetAssessmentTargets(v []*AssessmentTarget) *DescribeAssessmentTargetsOutput { - s.AssessmentTargets = v - return s -} - -// SetFailedItems sets the FailedItems field's value. -func (s *DescribeAssessmentTargetsOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeAssessmentTargetsOutput { - s.FailedItems = v - return s -} - -type DescribeAssessmentTemplatesInput struct { - _ struct{} `type:"structure"` - - // AssessmentTemplateArns is a required field - AssessmentTemplateArns []*string `locationName:"assessmentTemplateArns" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeAssessmentTemplatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAssessmentTemplatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAssessmentTemplatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAssessmentTemplatesInput"} - if s.AssessmentTemplateArns == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArns")) - } - if s.AssessmentTemplateArns != nil && len(s.AssessmentTemplateArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArns", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentTemplateArns sets the AssessmentTemplateArns field's value. -func (s *DescribeAssessmentTemplatesInput) SetAssessmentTemplateArns(v []*string) *DescribeAssessmentTemplatesInput { - s.AssessmentTemplateArns = v - return s -} - -type DescribeAssessmentTemplatesOutput struct { - _ struct{} `type:"structure"` - - // Information about the assessment templates. - // - // AssessmentTemplates is a required field - AssessmentTemplates []*AssessmentTemplate `locationName:"assessmentTemplates" type:"list" required:"true"` - - // Assessment template details that cannot be described. An error code is provided - // for each failed item. - // - // FailedItems is a required field - FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` -} - -// String returns the string representation -func (s DescribeAssessmentTemplatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAssessmentTemplatesOutput) GoString() string { - return s.String() -} - -// SetAssessmentTemplates sets the AssessmentTemplates field's value. -func (s *DescribeAssessmentTemplatesOutput) SetAssessmentTemplates(v []*AssessmentTemplate) *DescribeAssessmentTemplatesOutput { - s.AssessmentTemplates = v - return s -} - -// SetFailedItems sets the FailedItems field's value. -func (s *DescribeAssessmentTemplatesOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeAssessmentTemplatesOutput { - s.FailedItems = v - return s -} - -type DescribeCrossAccountAccessRoleInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeCrossAccountAccessRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCrossAccountAccessRoleInput) GoString() string { - return s.String() -} - -type DescribeCrossAccountAccessRoleOutput struct { - _ struct{} `type:"structure"` - - // The date when the cross-account access role was registered. - // - // RegisteredAt is a required field - RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp" required:"true"` - - // The ARN that specifies the IAM role that Amazon Inspector uses to access - // your AWS account. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"` - - // A Boolean value that specifies whether the IAM role has the necessary policies - // attached to enable Amazon Inspector to access your AWS account. - // - // Valid is a required field - Valid *bool `locationName:"valid" type:"boolean" required:"true"` -} - -// String returns the string representation -func (s DescribeCrossAccountAccessRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCrossAccountAccessRoleOutput) GoString() string { - return s.String() -} - -// SetRegisteredAt sets the RegisteredAt field's value. -func (s *DescribeCrossAccountAccessRoleOutput) SetRegisteredAt(v time.Time) *DescribeCrossAccountAccessRoleOutput { - s.RegisteredAt = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DescribeCrossAccountAccessRoleOutput) SetRoleArn(v string) *DescribeCrossAccountAccessRoleOutput { - s.RoleArn = &v - return s -} - -// SetValid sets the Valid field's value. -func (s *DescribeCrossAccountAccessRoleOutput) SetValid(v bool) *DescribeCrossAccountAccessRoleOutput { - s.Valid = &v - return s -} - -type DescribeExclusionsInput struct { - _ struct{} `type:"structure"` - - // The list of ARNs that specify the exclusions that you want to describe. - // - // ExclusionArns is a required field - ExclusionArns []*string `locationName:"exclusionArns" min:"1" type:"list" required:"true"` - - // The locale into which you want to translate the exclusion's title, description, - // and recommendation. - Locale *string `locationName:"locale" type:"string" enum:"Locale"` -} - -// String returns the string representation -func (s DescribeExclusionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeExclusionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeExclusionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeExclusionsInput"} - if s.ExclusionArns == nil { - invalidParams.Add(request.NewErrParamRequired("ExclusionArns")) - } - if s.ExclusionArns != nil && len(s.ExclusionArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExclusionArns", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExclusionArns sets the ExclusionArns field's value. -func (s *DescribeExclusionsInput) SetExclusionArns(v []*string) *DescribeExclusionsInput { - s.ExclusionArns = v - return s -} - -// SetLocale sets the Locale field's value. -func (s *DescribeExclusionsInput) SetLocale(v string) *DescribeExclusionsInput { - s.Locale = &v - return s -} - -type DescribeExclusionsOutput struct { - _ struct{} `type:"structure"` - - // Information about the exclusions. - // - // Exclusions is a required field - Exclusions map[string]*Exclusion `locationName:"exclusions" min:"1" type:"map" required:"true"` - - // Exclusion details that cannot be described. An error code is provided for - // each failed item. - // - // FailedItems is a required field - FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` -} - -// String returns the string representation -func (s DescribeExclusionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeExclusionsOutput) GoString() string { - return s.String() -} - -// SetExclusions sets the Exclusions field's value. -func (s *DescribeExclusionsOutput) SetExclusions(v map[string]*Exclusion) *DescribeExclusionsOutput { - s.Exclusions = v - return s -} - -// SetFailedItems sets the FailedItems field's value. -func (s *DescribeExclusionsOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeExclusionsOutput { - s.FailedItems = v - return s -} - -type DescribeFindingsInput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the finding that you want to describe. - // - // FindingArns is a required field - FindingArns []*string `locationName:"findingArns" min:"1" type:"list" required:"true"` - - // The locale into which you want to translate a finding description, recommendation, - // and the short description that identifies the finding. - Locale *string `locationName:"locale" type:"string" enum:"Locale"` -} - -// String returns the string representation -func (s DescribeFindingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFindingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFindingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFindingsInput"} - if s.FindingArns == nil { - invalidParams.Add(request.NewErrParamRequired("FindingArns")) - } - if s.FindingArns != nil && len(s.FindingArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FindingArns", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFindingArns sets the FindingArns field's value. -func (s *DescribeFindingsInput) SetFindingArns(v []*string) *DescribeFindingsInput { - s.FindingArns = v - return s -} - -// SetLocale sets the Locale field's value. -func (s *DescribeFindingsInput) SetLocale(v string) *DescribeFindingsInput { - s.Locale = &v - return s -} - -type DescribeFindingsOutput struct { - _ struct{} `type:"structure"` - - // Finding details that cannot be described. An error code is provided for each - // failed item. - // - // FailedItems is a required field - FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` - - // Information about the finding. - // - // Findings is a required field - Findings []*Finding `locationName:"findings" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeFindingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFindingsOutput) GoString() string { - return s.String() -} - -// SetFailedItems sets the FailedItems field's value. -func (s *DescribeFindingsOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeFindingsOutput { - s.FailedItems = v - return s -} - -// SetFindings sets the Findings field's value. -func (s *DescribeFindingsOutput) SetFindings(v []*Finding) *DescribeFindingsOutput { - s.Findings = v - return s -} - -type DescribeResourceGroupsInput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the resource group that you want to describe. - // - // ResourceGroupArns is a required field - ResourceGroupArns []*string `locationName:"resourceGroupArns" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeResourceGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeResourceGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeResourceGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeResourceGroupsInput"} - if s.ResourceGroupArns == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceGroupArns")) - } - if s.ResourceGroupArns != nil && len(s.ResourceGroupArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceGroupArns", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceGroupArns sets the ResourceGroupArns field's value. -func (s *DescribeResourceGroupsInput) SetResourceGroupArns(v []*string) *DescribeResourceGroupsInput { - s.ResourceGroupArns = v - return s -} - -type DescribeResourceGroupsOutput struct { - _ struct{} `type:"structure"` - - // Resource group details that cannot be described. An error code is provided - // for each failed item. - // - // FailedItems is a required field - FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` - - // Information about a resource group. - // - // ResourceGroups is a required field - ResourceGroups []*ResourceGroup `locationName:"resourceGroups" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeResourceGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeResourceGroupsOutput) GoString() string { - return s.String() -} - -// SetFailedItems sets the FailedItems field's value. -func (s *DescribeResourceGroupsOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeResourceGroupsOutput { - s.FailedItems = v - return s -} - -// SetResourceGroups sets the ResourceGroups field's value. -func (s *DescribeResourceGroupsOutput) SetResourceGroups(v []*ResourceGroup) *DescribeResourceGroupsOutput { - s.ResourceGroups = v - return s -} - -type DescribeRulesPackagesInput struct { - _ struct{} `type:"structure"` - - // The locale that you want to translate a rules package description into. - Locale *string `locationName:"locale" type:"string" enum:"Locale"` - - // The ARN that specifies the rules package that you want to describe. - // - // RulesPackageArns is a required field - RulesPackageArns []*string `locationName:"rulesPackageArns" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeRulesPackagesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRulesPackagesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRulesPackagesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRulesPackagesInput"} - if s.RulesPackageArns == nil { - invalidParams.Add(request.NewErrParamRequired("RulesPackageArns")) - } - if s.RulesPackageArns != nil && len(s.RulesPackageArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RulesPackageArns", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLocale sets the Locale field's value. -func (s *DescribeRulesPackagesInput) SetLocale(v string) *DescribeRulesPackagesInput { - s.Locale = &v - return s -} - -// SetRulesPackageArns sets the RulesPackageArns field's value. -func (s *DescribeRulesPackagesInput) SetRulesPackageArns(v []*string) *DescribeRulesPackagesInput { - s.RulesPackageArns = v - return s -} - -type DescribeRulesPackagesOutput struct { - _ struct{} `type:"structure"` - - // Rules package details that cannot be described. An error code is provided - // for each failed item. - // - // FailedItems is a required field - FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` - - // Information about the rules package. - // - // RulesPackages is a required field - RulesPackages []*RulesPackage `locationName:"rulesPackages" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeRulesPackagesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRulesPackagesOutput) GoString() string { - return s.String() -} - -// SetFailedItems sets the FailedItems field's value. -func (s *DescribeRulesPackagesOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeRulesPackagesOutput { - s.FailedItems = v - return s -} - -// SetRulesPackages sets the RulesPackages field's value. -func (s *DescribeRulesPackagesOutput) SetRulesPackages(v []*RulesPackage) *DescribeRulesPackagesOutput { - s.RulesPackages = v - return s -} - -// This data type is used in the AssessmentTemplateFilter data type. -type DurationRange struct { - _ struct{} `type:"structure"` - - // The maximum value of the duration range. Must be less than or equal to 604800 - // seconds (1 week). - MaxSeconds *int64 `locationName:"maxSeconds" min:"180" type:"integer"` - - // The minimum value of the duration range. Must be greater than zero. - MinSeconds *int64 `locationName:"minSeconds" min:"180" type:"integer"` -} - -// String returns the string representation -func (s DurationRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DurationRange) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DurationRange) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DurationRange"} - if s.MaxSeconds != nil && *s.MaxSeconds < 180 { - invalidParams.Add(request.NewErrParamMinValue("MaxSeconds", 180)) - } - if s.MinSeconds != nil && *s.MinSeconds < 180 { - invalidParams.Add(request.NewErrParamMinValue("MinSeconds", 180)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxSeconds sets the MaxSeconds field's value. -func (s *DurationRange) SetMaxSeconds(v int64) *DurationRange { - s.MaxSeconds = &v - return s -} - -// SetMinSeconds sets the MinSeconds field's value. -func (s *DurationRange) SetMinSeconds(v int64) *DurationRange { - s.MinSeconds = &v - return s -} - -// This data type is used in the Subscription data type. -type EventSubscription struct { - _ struct{} `type:"structure"` - - // The event for which Amazon Simple Notification Service (SNS) notifications - // are sent. - // - // Event is a required field - Event *string `locationName:"event" type:"string" required:"true" enum:"Event"` - - // The time at which SubscribeToEvent is called. - // - // SubscribedAt is a required field - SubscribedAt *time.Time `locationName:"subscribedAt" type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s EventSubscription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventSubscription) GoString() string { - return s.String() -} - -// SetEvent sets the Event field's value. -func (s *EventSubscription) SetEvent(v string) *EventSubscription { - s.Event = &v - return s -} - -// SetSubscribedAt sets the SubscribedAt field's value. -func (s *EventSubscription) SetSubscribedAt(v time.Time) *EventSubscription { - s.SubscribedAt = &v - return s -} - -// Contains information about what was excluded from an assessment run. -type Exclusion struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the exclusion. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` - - // The system-defined attributes for the exclusion. - Attributes []*Attribute `locationName:"attributes" type:"list"` - - // The description of the exclusion. - // - // Description is a required field - Description *string `locationName:"description" type:"string" required:"true"` - - // The recommendation for the exclusion. - // - // Recommendation is a required field - Recommendation *string `locationName:"recommendation" type:"string" required:"true"` - - // The AWS resources for which the exclusion pertains. - // - // Scopes is a required field - Scopes []*Scope `locationName:"scopes" min:"1" type:"list" required:"true"` - - // The name of the exclusion. - // - // Title is a required field - Title *string `locationName:"title" type:"string" required:"true"` -} - -// String returns the string representation -func (s Exclusion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Exclusion) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Exclusion) SetArn(v string) *Exclusion { - s.Arn = &v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *Exclusion) SetAttributes(v []*Attribute) *Exclusion { - s.Attributes = v - return s -} - -// SetDescription sets the Description field's value. -func (s *Exclusion) SetDescription(v string) *Exclusion { - s.Description = &v - return s -} - -// SetRecommendation sets the Recommendation field's value. -func (s *Exclusion) SetRecommendation(v string) *Exclusion { - s.Recommendation = &v - return s -} - -// SetScopes sets the Scopes field's value. -func (s *Exclusion) SetScopes(v []*Scope) *Exclusion { - s.Scopes = v - return s -} - -// SetTitle sets the Title field's value. -func (s *Exclusion) SetTitle(v string) *Exclusion { - s.Title = &v - return s -} - -// Contains information about what is excluded from an assessment run given -// the current state of the assessment template. -type ExclusionPreview struct { - _ struct{} `type:"structure"` - - // The system-defined attributes for the exclusion preview. - Attributes []*Attribute `locationName:"attributes" type:"list"` - - // The description of the exclusion preview. - // - // Description is a required field - Description *string `locationName:"description" type:"string" required:"true"` - - // The recommendation for the exclusion preview. - // - // Recommendation is a required field - Recommendation *string `locationName:"recommendation" type:"string" required:"true"` - - // The AWS resources for which the exclusion preview pertains. - // - // Scopes is a required field - Scopes []*Scope `locationName:"scopes" min:"1" type:"list" required:"true"` - - // The name of the exclusion preview. - // - // Title is a required field - Title *string `locationName:"title" type:"string" required:"true"` -} - -// String returns the string representation -func (s ExclusionPreview) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExclusionPreview) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *ExclusionPreview) SetAttributes(v []*Attribute) *ExclusionPreview { - s.Attributes = v - return s -} - -// SetDescription sets the Description field's value. -func (s *ExclusionPreview) SetDescription(v string) *ExclusionPreview { - s.Description = &v - return s -} - -// SetRecommendation sets the Recommendation field's value. -func (s *ExclusionPreview) SetRecommendation(v string) *ExclusionPreview { - s.Recommendation = &v - return s -} - -// SetScopes sets the Scopes field's value. -func (s *ExclusionPreview) SetScopes(v []*Scope) *ExclusionPreview { - s.Scopes = v - return s -} - -// SetTitle sets the Title field's value. -func (s *ExclusionPreview) SetTitle(v string) *ExclusionPreview { - s.Title = &v - return s -} - -// Includes details about the failed items. -type FailedItemDetails struct { - _ struct{} `type:"structure"` - - // The status code of a failed item. - // - // FailureCode is a required field - FailureCode *string `locationName:"failureCode" type:"string" required:"true" enum:"FailedItemErrorCode"` - - // Indicates whether you can immediately retry a request for this item for a - // specified resource. - // - // Retryable is a required field - Retryable *bool `locationName:"retryable" type:"boolean" required:"true"` -} - -// String returns the string representation -func (s FailedItemDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailedItemDetails) GoString() string { - return s.String() -} - -// SetFailureCode sets the FailureCode field's value. -func (s *FailedItemDetails) SetFailureCode(v string) *FailedItemDetails { - s.FailureCode = &v - return s -} - -// SetRetryable sets the Retryable field's value. -func (s *FailedItemDetails) SetRetryable(v bool) *FailedItemDetails { - s.Retryable = &v - return s -} - -// Contains information about an Amazon Inspector finding. This data type is -// used as the response element in the DescribeFindings action. -type Finding struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the finding. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` - - // A collection of attributes of the host from which the finding is generated. - AssetAttributes *AssetAttributes `locationName:"assetAttributes" type:"structure"` - - // The type of the host from which the finding is generated. - AssetType *string `locationName:"assetType" type:"string" enum:"AssetType"` - - // The system-defined attributes for the finding. - // - // Attributes is a required field - Attributes []*Attribute `locationName:"attributes" type:"list" required:"true"` - - // This data element is currently not used. - Confidence *int64 `locationName:"confidence" type:"integer"` - - // The time when the finding was generated. - // - // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` - - // The description of the finding. - Description *string `locationName:"description" type:"string"` - - // The ID of the finding. - Id *string `locationName:"id" type:"string"` - - // This data element is currently not used. - IndicatorOfCompromise *bool `locationName:"indicatorOfCompromise" type:"boolean"` - - // The numeric value of the finding severity. - NumericSeverity *float64 `locationName:"numericSeverity" type:"double"` - - // The recommendation for the finding. - Recommendation *string `locationName:"recommendation" type:"string"` - - // The schema version of this data type. - SchemaVersion *int64 `locationName:"schemaVersion" type:"integer"` - - // The data element is set to "Inspector". - Service *string `locationName:"service" type:"string"` - - // This data type is used in the Finding data type. - ServiceAttributes *ServiceAttributes `locationName:"serviceAttributes" type:"structure"` - - // The finding severity. Values can be set to High, Medium, Low, and Informational. - Severity *string `locationName:"severity" type:"string" enum:"Severity"` - - // The name of the finding. - Title *string `locationName:"title" type:"string"` - - // The time when AddAttributesToFindings is called. - // - // UpdatedAt is a required field - UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" required:"true"` - - // The user-defined attributes that are assigned to the finding. - // - // UserAttributes is a required field - UserAttributes []*Attribute `locationName:"userAttributes" type:"list" required:"true"` -} - -// String returns the string representation -func (s Finding) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Finding) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Finding) SetArn(v string) *Finding { - s.Arn = &v - return s -} - -// SetAssetAttributes sets the AssetAttributes field's value. -func (s *Finding) SetAssetAttributes(v *AssetAttributes) *Finding { - s.AssetAttributes = v - return s -} - -// SetAssetType sets the AssetType field's value. -func (s *Finding) SetAssetType(v string) *Finding { - s.AssetType = &v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *Finding) SetAttributes(v []*Attribute) *Finding { - s.Attributes = v - return s -} - -// SetConfidence sets the Confidence field's value. -func (s *Finding) SetConfidence(v int64) *Finding { - s.Confidence = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Finding) SetCreatedAt(v time.Time) *Finding { - s.CreatedAt = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Finding) SetDescription(v string) *Finding { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *Finding) SetId(v string) *Finding { - s.Id = &v - return s -} - -// SetIndicatorOfCompromise sets the IndicatorOfCompromise field's value. -func (s *Finding) SetIndicatorOfCompromise(v bool) *Finding { - s.IndicatorOfCompromise = &v - return s -} - -// SetNumericSeverity sets the NumericSeverity field's value. -func (s *Finding) SetNumericSeverity(v float64) *Finding { - s.NumericSeverity = &v - return s -} - -// SetRecommendation sets the Recommendation field's value. -func (s *Finding) SetRecommendation(v string) *Finding { - s.Recommendation = &v - return s -} - -// SetSchemaVersion sets the SchemaVersion field's value. -func (s *Finding) SetSchemaVersion(v int64) *Finding { - s.SchemaVersion = &v - return s -} - -// SetService sets the Service field's value. -func (s *Finding) SetService(v string) *Finding { - s.Service = &v - return s -} - -// SetServiceAttributes sets the ServiceAttributes field's value. -func (s *Finding) SetServiceAttributes(v *ServiceAttributes) *Finding { - s.ServiceAttributes = v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *Finding) SetSeverity(v string) *Finding { - s.Severity = &v - return s -} - -// SetTitle sets the Title field's value. -func (s *Finding) SetTitle(v string) *Finding { - s.Title = &v - return s -} - -// SetUpdatedAt sets the UpdatedAt field's value. -func (s *Finding) SetUpdatedAt(v time.Time) *Finding { - s.UpdatedAt = &v - return s -} - -// SetUserAttributes sets the UserAttributes field's value. -func (s *Finding) SetUserAttributes(v []*Attribute) *Finding { - s.UserAttributes = v - return s -} - -// This data type is used as a request parameter in the ListFindings action. -type FindingFilter struct { - _ struct{} `type:"structure"` - - // For a record to match a filter, one of the values that is specified for this - // data type property must be the exact match of the value of the agentId property - // of the Finding data type. - AgentIds []*string `locationName:"agentIds" type:"list"` - - // For a record to match a filter, the list of values that are specified for - // this data type property must be contained in the list of values of the attributes - // property of the Finding data type. - Attributes []*Attribute `locationName:"attributes" type:"list"` - - // For a record to match a filter, one of the values that is specified for this - // data type property must be the exact match of the value of the autoScalingGroup - // property of the Finding data type. - AutoScalingGroups []*string `locationName:"autoScalingGroups" type:"list"` - - // The time range during which the finding is generated. - CreationTimeRange *TimestampRange `locationName:"creationTimeRange" type:"structure"` - - // For a record to match a filter, one of the values that is specified for this - // data type property must be the exact match of the value of the ruleName property - // of the Finding data type. - RuleNames []*string `locationName:"ruleNames" type:"list"` - - // For a record to match a filter, one of the values that is specified for this - // data type property must be the exact match of the value of the rulesPackageArn - // property of the Finding data type. - RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list"` - - // For a record to match a filter, one of the values that is specified for this - // data type property must be the exact match of the value of the severity property - // of the Finding data type. - Severities []*string `locationName:"severities" type:"list"` - - // For a record to match a filter, the value that is specified for this data - // type property must be contained in the list of values of the userAttributes - // property of the Finding data type. - UserAttributes []*Attribute `locationName:"userAttributes" type:"list"` -} - -// String returns the string representation -func (s FindingFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FindingFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FindingFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FindingFilter"} - if s.Attributes != nil { - for i, v := range s.Attributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams)) - } - } - } - if s.UserAttributes != nil { - for i, v := range s.UserAttributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "UserAttributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAgentIds sets the AgentIds field's value. -func (s *FindingFilter) SetAgentIds(v []*string) *FindingFilter { - s.AgentIds = v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *FindingFilter) SetAttributes(v []*Attribute) *FindingFilter { - s.Attributes = v - return s -} - -// SetAutoScalingGroups sets the AutoScalingGroups field's value. -func (s *FindingFilter) SetAutoScalingGroups(v []*string) *FindingFilter { - s.AutoScalingGroups = v - return s -} - -// SetCreationTimeRange sets the CreationTimeRange field's value. -func (s *FindingFilter) SetCreationTimeRange(v *TimestampRange) *FindingFilter { - s.CreationTimeRange = v - return s -} - -// SetRuleNames sets the RuleNames field's value. -func (s *FindingFilter) SetRuleNames(v []*string) *FindingFilter { - s.RuleNames = v - return s -} - -// SetRulesPackageArns sets the RulesPackageArns field's value. -func (s *FindingFilter) SetRulesPackageArns(v []*string) *FindingFilter { - s.RulesPackageArns = v - return s -} - -// SetSeverities sets the Severities field's value. -func (s *FindingFilter) SetSeverities(v []*string) *FindingFilter { - s.Severities = v - return s -} - -// SetUserAttributes sets the UserAttributes field's value. -func (s *FindingFilter) SetUserAttributes(v []*Attribute) *FindingFilter { - s.UserAttributes = v - return s -} - -type GetAssessmentReportInput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the assessment run for which you want to generate - // a report. - // - // AssessmentRunArn is a required field - AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` - - // Specifies the file format (html or pdf) of the assessment report that you - // want to generate. - // - // ReportFileFormat is a required field - ReportFileFormat *string `locationName:"reportFileFormat" type:"string" required:"true" enum:"ReportFileFormat"` - - // Specifies the type of the assessment report that you want to generate. There - // are two types of assessment reports: a finding report and a full report. - // For more information, see Assessment Reports (http://docs.aws.amazon.com/inspector/latest/userguide/inspector_reports.html). - // - // ReportType is a required field - ReportType *string `locationName:"reportType" type:"string" required:"true" enum:"ReportType"` -} - -// String returns the string representation -func (s GetAssessmentReportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAssessmentReportInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAssessmentReportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAssessmentReportInput"} - if s.AssessmentRunArn == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn")) - } - if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1)) - } - if s.ReportFileFormat == nil { - invalidParams.Add(request.NewErrParamRequired("ReportFileFormat")) - } - if s.ReportType == nil { - invalidParams.Add(request.NewErrParamRequired("ReportType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentRunArn sets the AssessmentRunArn field's value. -func (s *GetAssessmentReportInput) SetAssessmentRunArn(v string) *GetAssessmentReportInput { - s.AssessmentRunArn = &v - return s -} - -// SetReportFileFormat sets the ReportFileFormat field's value. -func (s *GetAssessmentReportInput) SetReportFileFormat(v string) *GetAssessmentReportInput { - s.ReportFileFormat = &v - return s -} - -// SetReportType sets the ReportType field's value. -func (s *GetAssessmentReportInput) SetReportType(v string) *GetAssessmentReportInput { - s.ReportType = &v - return s -} - -type GetAssessmentReportOutput struct { - _ struct{} `type:"structure"` - - // Specifies the status of the request to generate an assessment report. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"ReportStatus"` - - // Specifies the URL where you can find the generated assessment report. This - // parameter is only returned if the report is successfully generated. - Url *string `locationName:"url" type:"string"` -} - -// String returns the string representation -func (s GetAssessmentReportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAssessmentReportOutput) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *GetAssessmentReportOutput) SetStatus(v string) *GetAssessmentReportOutput { - s.Status = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *GetAssessmentReportOutput) SetUrl(v string) *GetAssessmentReportOutput { - s.Url = &v - return s -} - -type GetExclusionsPreviewInput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the assessment template for which the exclusions preview - // was requested. - // - // AssessmentTemplateArn is a required field - AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"` - - // The locale into which you want to translate the exclusion's title, description, - // and recommendation. - Locale *string `locationName:"locale" type:"string" enum:"Locale"` - - // You can use this parameter to indicate the maximum number of items you want - // in the response. The default value is 100. The maximum value is 500. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the GetExclusionsPreviewRequest action. - // Subsequent calls to the action fill nextToken in the request with the value - // of nextToken from the previous response to continue listing data. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The unique identifier associated of the exclusions preview. - // - // PreviewToken is a required field - PreviewToken *string `locationName:"previewToken" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetExclusionsPreviewInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetExclusionsPreviewInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetExclusionsPreviewInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetExclusionsPreviewInput"} - if s.AssessmentTemplateArn == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArn")) - } - if s.AssessmentTemplateArn != nil && len(*s.AssessmentTemplateArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArn", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.PreviewToken == nil { - invalidParams.Add(request.NewErrParamRequired("PreviewToken")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentTemplateArn sets the AssessmentTemplateArn field's value. -func (s *GetExclusionsPreviewInput) SetAssessmentTemplateArn(v string) *GetExclusionsPreviewInput { - s.AssessmentTemplateArn = &v - return s -} - -// SetLocale sets the Locale field's value. -func (s *GetExclusionsPreviewInput) SetLocale(v string) *GetExclusionsPreviewInput { - s.Locale = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetExclusionsPreviewInput) SetMaxResults(v int64) *GetExclusionsPreviewInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetExclusionsPreviewInput) SetNextToken(v string) *GetExclusionsPreviewInput { - s.NextToken = &v - return s -} - -// SetPreviewToken sets the PreviewToken field's value. -func (s *GetExclusionsPreviewInput) SetPreviewToken(v string) *GetExclusionsPreviewInput { - s.PreviewToken = &v - return s -} - -type GetExclusionsPreviewOutput struct { - _ struct{} `type:"structure"` - - // Information about the exclusions included in the preview. - ExclusionPreviews []*ExclusionPreview `locationName:"exclusionPreviews" type:"list"` - - // When a response is generated, if there is more data to be listed, this parameters - // is present in the response and contains the value to use for the nextToken - // parameter in a subsequent pagination request. If there is no more data to - // be listed, this parameter is set to null. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // Specifies the status of the request to generate an exclusions preview. - // - // PreviewStatus is a required field - PreviewStatus *string `locationName:"previewStatus" type:"string" required:"true" enum:"PreviewStatus"` -} - -// String returns the string representation -func (s GetExclusionsPreviewOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetExclusionsPreviewOutput) GoString() string { - return s.String() -} - -// SetExclusionPreviews sets the ExclusionPreviews field's value. -func (s *GetExclusionsPreviewOutput) SetExclusionPreviews(v []*ExclusionPreview) *GetExclusionsPreviewOutput { - s.ExclusionPreviews = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetExclusionsPreviewOutput) SetNextToken(v string) *GetExclusionsPreviewOutput { - s.NextToken = &v - return s -} - -// SetPreviewStatus sets the PreviewStatus field's value. -func (s *GetExclusionsPreviewOutput) SetPreviewStatus(v string) *GetExclusionsPreviewOutput { - s.PreviewStatus = &v - return s -} - -type GetTelemetryMetadataInput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the assessment run that has the telemetry data that - // you want to obtain. - // - // AssessmentRunArn is a required field - AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTelemetryMetadataInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTelemetryMetadataInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTelemetryMetadataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTelemetryMetadataInput"} - if s.AssessmentRunArn == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn")) - } - if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentRunArn sets the AssessmentRunArn field's value. -func (s *GetTelemetryMetadataInput) SetAssessmentRunArn(v string) *GetTelemetryMetadataInput { - s.AssessmentRunArn = &v - return s -} - -type GetTelemetryMetadataOutput struct { - _ struct{} `type:"structure"` - - // Telemetry details. - // - // TelemetryMetadata is a required field - TelemetryMetadata []*TelemetryMetadata `locationName:"telemetryMetadata" type:"list" required:"true"` -} - -// String returns the string representation -func (s GetTelemetryMetadataOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTelemetryMetadataOutput) GoString() string { - return s.String() -} - -// SetTelemetryMetadata sets the TelemetryMetadata field's value. -func (s *GetTelemetryMetadataOutput) SetTelemetryMetadata(v []*TelemetryMetadata) *GetTelemetryMetadataOutput { - s.TelemetryMetadata = v - return s -} - -type ListAssessmentRunAgentsInput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the assessment run whose agents you want to list. - // - // AssessmentRunArn is a required field - AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` - - // You can use this parameter to specify a subset of data to be included in - // the action's response. - // - // For a record to match a filter, all specified filter attributes must match. - // When multiple values are specified for a filter attribute, any of the values - // can match. - Filter *AgentFilter `locationName:"filter" type:"structure"` - - // You can use this parameter to indicate the maximum number of items that you - // want in the response. The default value is 10. The maximum value is 500. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the ListAssessmentRunAgents action. - // Subsequent calls to the action fill nextToken in the request with the value - // of NextToken from the previous response to continue listing data. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListAssessmentRunAgentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAssessmentRunAgentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAssessmentRunAgentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAssessmentRunAgentsInput"} - if s.AssessmentRunArn == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn")) - } - if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentRunArn sets the AssessmentRunArn field's value. -func (s *ListAssessmentRunAgentsInput) SetAssessmentRunArn(v string) *ListAssessmentRunAgentsInput { - s.AssessmentRunArn = &v - return s -} - -// SetFilter sets the Filter field's value. -func (s *ListAssessmentRunAgentsInput) SetFilter(v *AgentFilter) *ListAssessmentRunAgentsInput { - s.Filter = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAssessmentRunAgentsInput) SetMaxResults(v int64) *ListAssessmentRunAgentsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAssessmentRunAgentsInput) SetNextToken(v string) *ListAssessmentRunAgentsInput { - s.NextToken = &v - return s -} - -type ListAssessmentRunAgentsOutput struct { - _ struct{} `type:"structure"` - - // A list of ARNs that specifies the agents returned by the action. - // - // AssessmentRunAgents is a required field - AssessmentRunAgents []*AssessmentRunAgent `locationName:"assessmentRunAgents" type:"list" required:"true"` - - // When a response is generated, if there is more data to be listed, this parameter - // is present in the response and contains the value to use for the nextToken - // parameter in a subsequent pagination request. If there is no more data to - // be listed, this parameter is set to null. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListAssessmentRunAgentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAssessmentRunAgentsOutput) GoString() string { - return s.String() -} - -// SetAssessmentRunAgents sets the AssessmentRunAgents field's value. -func (s *ListAssessmentRunAgentsOutput) SetAssessmentRunAgents(v []*AssessmentRunAgent) *ListAssessmentRunAgentsOutput { - s.AssessmentRunAgents = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAssessmentRunAgentsOutput) SetNextToken(v string) *ListAssessmentRunAgentsOutput { - s.NextToken = &v - return s -} - -type ListAssessmentRunsInput struct { - _ struct{} `type:"structure"` - - // The ARNs that specify the assessment templates whose assessment runs you - // want to list. - AssessmentTemplateArns []*string `locationName:"assessmentTemplateArns" type:"list"` - - // You can use this parameter to specify a subset of data to be included in - // the action's response. - // - // For a record to match a filter, all specified filter attributes must match. - // When multiple values are specified for a filter attribute, any of the values - // can match. - Filter *AssessmentRunFilter `locationName:"filter" type:"structure"` - - // You can use this parameter to indicate the maximum number of items that you - // want in the response. The default value is 10. The maximum value is 500. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the ListAssessmentRuns action. Subsequent - // calls to the action fill nextToken in the request with the value of NextToken - // from the previous response to continue listing data. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListAssessmentRunsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAssessmentRunsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAssessmentRunsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAssessmentRunsInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentTemplateArns sets the AssessmentTemplateArns field's value. -func (s *ListAssessmentRunsInput) SetAssessmentTemplateArns(v []*string) *ListAssessmentRunsInput { - s.AssessmentTemplateArns = v - return s -} - -// SetFilter sets the Filter field's value. -func (s *ListAssessmentRunsInput) SetFilter(v *AssessmentRunFilter) *ListAssessmentRunsInput { - s.Filter = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAssessmentRunsInput) SetMaxResults(v int64) *ListAssessmentRunsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAssessmentRunsInput) SetNextToken(v string) *ListAssessmentRunsInput { - s.NextToken = &v - return s -} - -type ListAssessmentRunsOutput struct { - _ struct{} `type:"structure"` - - // A list of ARNs that specifies the assessment runs that are returned by the - // action. - // - // AssessmentRunArns is a required field - AssessmentRunArns []*string `locationName:"assessmentRunArns" type:"list" required:"true"` - - // When a response is generated, if there is more data to be listed, this parameter - // is present in the response and contains the value to use for the nextToken - // parameter in a subsequent pagination request. If there is no more data to - // be listed, this parameter is set to null. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListAssessmentRunsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAssessmentRunsOutput) GoString() string { - return s.String() -} - -// SetAssessmentRunArns sets the AssessmentRunArns field's value. -func (s *ListAssessmentRunsOutput) SetAssessmentRunArns(v []*string) *ListAssessmentRunsOutput { - s.AssessmentRunArns = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAssessmentRunsOutput) SetNextToken(v string) *ListAssessmentRunsOutput { - s.NextToken = &v - return s -} - -type ListAssessmentTargetsInput struct { - _ struct{} `type:"structure"` - - // You can use this parameter to specify a subset of data to be included in - // the action's response. - // - // For a record to match a filter, all specified filter attributes must match. - // When multiple values are specified for a filter attribute, any of the values - // can match. - Filter *AssessmentTargetFilter `locationName:"filter" type:"structure"` - - // You can use this parameter to indicate the maximum number of items you want - // in the response. The default value is 10. The maximum value is 500. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the ListAssessmentTargets action. - // Subsequent calls to the action fill nextToken in the request with the value - // of NextToken from the previous response to continue listing data. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListAssessmentTargetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAssessmentTargetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAssessmentTargetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAssessmentTargetsInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *ListAssessmentTargetsInput) SetFilter(v *AssessmentTargetFilter) *ListAssessmentTargetsInput { - s.Filter = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAssessmentTargetsInput) SetMaxResults(v int64) *ListAssessmentTargetsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAssessmentTargetsInput) SetNextToken(v string) *ListAssessmentTargetsInput { - s.NextToken = &v - return s -} - -type ListAssessmentTargetsOutput struct { - _ struct{} `type:"structure"` - - // A list of ARNs that specifies the assessment targets that are returned by - // the action. - // - // AssessmentTargetArns is a required field - AssessmentTargetArns []*string `locationName:"assessmentTargetArns" type:"list" required:"true"` - - // When a response is generated, if there is more data to be listed, this parameter - // is present in the response and contains the value to use for the nextToken - // parameter in a subsequent pagination request. If there is no more data to - // be listed, this parameter is set to null. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListAssessmentTargetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAssessmentTargetsOutput) GoString() string { - return s.String() -} - -// SetAssessmentTargetArns sets the AssessmentTargetArns field's value. -func (s *ListAssessmentTargetsOutput) SetAssessmentTargetArns(v []*string) *ListAssessmentTargetsOutput { - s.AssessmentTargetArns = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAssessmentTargetsOutput) SetNextToken(v string) *ListAssessmentTargetsOutput { - s.NextToken = &v - return s -} - -type ListAssessmentTemplatesInput struct { - _ struct{} `type:"structure"` - - // A list of ARNs that specifies the assessment targets whose assessment templates - // you want to list. - AssessmentTargetArns []*string `locationName:"assessmentTargetArns" type:"list"` - - // You can use this parameter to specify a subset of data to be included in - // the action's response. - // - // For a record to match a filter, all specified filter attributes must match. - // When multiple values are specified for a filter attribute, any of the values - // can match. - Filter *AssessmentTemplateFilter `locationName:"filter" type:"structure"` - - // You can use this parameter to indicate the maximum number of items you want - // in the response. The default value is 10. The maximum value is 500. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the ListAssessmentTemplates action. - // Subsequent calls to the action fill nextToken in the request with the value - // of NextToken from the previous response to continue listing data. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListAssessmentTemplatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAssessmentTemplatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAssessmentTemplatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAssessmentTemplatesInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentTargetArns sets the AssessmentTargetArns field's value. -func (s *ListAssessmentTemplatesInput) SetAssessmentTargetArns(v []*string) *ListAssessmentTemplatesInput { - s.AssessmentTargetArns = v - return s -} - -// SetFilter sets the Filter field's value. -func (s *ListAssessmentTemplatesInput) SetFilter(v *AssessmentTemplateFilter) *ListAssessmentTemplatesInput { - s.Filter = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAssessmentTemplatesInput) SetMaxResults(v int64) *ListAssessmentTemplatesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAssessmentTemplatesInput) SetNextToken(v string) *ListAssessmentTemplatesInput { - s.NextToken = &v - return s -} - -type ListAssessmentTemplatesOutput struct { - _ struct{} `type:"structure"` - - // A list of ARNs that specifies the assessment templates returned by the action. - // - // AssessmentTemplateArns is a required field - AssessmentTemplateArns []*string `locationName:"assessmentTemplateArns" type:"list" required:"true"` - - // When a response is generated, if there is more data to be listed, this parameter - // is present in the response and contains the value to use for the nextToken - // parameter in a subsequent pagination request. If there is no more data to - // be listed, this parameter is set to null. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListAssessmentTemplatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAssessmentTemplatesOutput) GoString() string { - return s.String() -} - -// SetAssessmentTemplateArns sets the AssessmentTemplateArns field's value. -func (s *ListAssessmentTemplatesOutput) SetAssessmentTemplateArns(v []*string) *ListAssessmentTemplatesOutput { - s.AssessmentTemplateArns = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAssessmentTemplatesOutput) SetNextToken(v string) *ListAssessmentTemplatesOutput { - s.NextToken = &v - return s -} - -type ListEventSubscriptionsInput struct { - _ struct{} `type:"structure"` - - // You can use this parameter to indicate the maximum number of items you want - // in the response. The default value is 10. The maximum value is 500. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the ListEventSubscriptions action. - // Subsequent calls to the action fill nextToken in the request with the value - // of NextToken from the previous response to continue listing data. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The ARN of the assessment template for which you want to list the existing - // event subscriptions. - ResourceArn *string `locationName:"resourceArn" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListEventSubscriptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEventSubscriptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListEventSubscriptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListEventSubscriptionsInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListEventSubscriptionsInput) SetMaxResults(v int64) *ListEventSubscriptionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEventSubscriptionsInput) SetNextToken(v string) *ListEventSubscriptionsInput { - s.NextToken = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ListEventSubscriptionsInput) SetResourceArn(v string) *ListEventSubscriptionsInput { - s.ResourceArn = &v - return s -} - -type ListEventSubscriptionsOutput struct { - _ struct{} `type:"structure"` - - // When a response is generated, if there is more data to be listed, this parameter - // is present in the response and contains the value to use for the nextToken - // parameter in a subsequent pagination request. If there is no more data to - // be listed, this parameter is set to null. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // Details of the returned event subscriptions. - // - // Subscriptions is a required field - Subscriptions []*Subscription `locationName:"subscriptions" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListEventSubscriptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEventSubscriptionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEventSubscriptionsOutput) SetNextToken(v string) *ListEventSubscriptionsOutput { - s.NextToken = &v - return s -} - -// SetSubscriptions sets the Subscriptions field's value. -func (s *ListEventSubscriptionsOutput) SetSubscriptions(v []*Subscription) *ListEventSubscriptionsOutput { - s.Subscriptions = v - return s -} - -type ListExclusionsInput struct { - _ struct{} `type:"structure"` - - // The ARN of the assessment run that generated the exclusions that you want - // to list. - // - // AssessmentRunArn is a required field - AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` - - // You can use this parameter to indicate the maximum number of items you want - // in the response. The default value is 100. The maximum value is 500. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the ListExclusionsRequest action. - // Subsequent calls to the action fill nextToken in the request with the value - // of nextToken from the previous response to continue listing data. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListExclusionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListExclusionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListExclusionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListExclusionsInput"} - if s.AssessmentRunArn == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn")) - } - if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentRunArn sets the AssessmentRunArn field's value. -func (s *ListExclusionsInput) SetAssessmentRunArn(v string) *ListExclusionsInput { - s.AssessmentRunArn = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListExclusionsInput) SetMaxResults(v int64) *ListExclusionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListExclusionsInput) SetNextToken(v string) *ListExclusionsInput { - s.NextToken = &v - return s -} - -type ListExclusionsOutput struct { - _ struct{} `type:"structure"` - - // A list of exclusions' ARNs returned by the action. - // - // ExclusionArns is a required field - ExclusionArns []*string `locationName:"exclusionArns" type:"list" required:"true"` - - // When a response is generated, if there is more data to be listed, this parameters - // is present in the response and contains the value to use for the nextToken - // parameter in a subsequent pagination request. If there is no more data to - // be listed, this parameter is set to null. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListExclusionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListExclusionsOutput) GoString() string { - return s.String() -} - -// SetExclusionArns sets the ExclusionArns field's value. -func (s *ListExclusionsOutput) SetExclusionArns(v []*string) *ListExclusionsOutput { - s.ExclusionArns = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListExclusionsOutput) SetNextToken(v string) *ListExclusionsOutput { - s.NextToken = &v - return s -} - -type ListFindingsInput struct { - _ struct{} `type:"structure"` - - // The ARNs of the assessment runs that generate the findings that you want - // to list. - AssessmentRunArns []*string `locationName:"assessmentRunArns" type:"list"` - - // You can use this parameter to specify a subset of data to be included in - // the action's response. - // - // For a record to match a filter, all specified filter attributes must match. - // When multiple values are specified for a filter attribute, any of the values - // can match. - Filter *FindingFilter `locationName:"filter" type:"structure"` - - // You can use this parameter to indicate the maximum number of items you want - // in the response. The default value is 10. The maximum value is 500. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the ListFindings action. Subsequent - // calls to the action fill nextToken in the request with the value of NextToken - // from the previous response to continue listing data. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListFindingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFindingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListFindingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListFindingsInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentRunArns sets the AssessmentRunArns field's value. -func (s *ListFindingsInput) SetAssessmentRunArns(v []*string) *ListFindingsInput { - s.AssessmentRunArns = v - return s -} - -// SetFilter sets the Filter field's value. -func (s *ListFindingsInput) SetFilter(v *FindingFilter) *ListFindingsInput { - s.Filter = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListFindingsInput) SetMaxResults(v int64) *ListFindingsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListFindingsInput) SetNextToken(v string) *ListFindingsInput { - s.NextToken = &v - return s -} - -type ListFindingsOutput struct { - _ struct{} `type:"structure"` - - // A list of ARNs that specifies the findings returned by the action. - // - // FindingArns is a required field - FindingArns []*string `locationName:"findingArns" type:"list" required:"true"` - - // When a response is generated, if there is more data to be listed, this parameter - // is present in the response and contains the value to use for the nextToken - // parameter in a subsequent pagination request. If there is no more data to - // be listed, this parameter is set to null. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListFindingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFindingsOutput) GoString() string { - return s.String() -} - -// SetFindingArns sets the FindingArns field's value. -func (s *ListFindingsOutput) SetFindingArns(v []*string) *ListFindingsOutput { - s.FindingArns = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListFindingsOutput) SetNextToken(v string) *ListFindingsOutput { - s.NextToken = &v - return s -} - -type ListRulesPackagesInput struct { - _ struct{} `type:"structure"` - - // You can use this parameter to indicate the maximum number of items you want - // in the response. The default value is 10. The maximum value is 500. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the ListRulesPackages action. Subsequent - // calls to the action fill nextToken in the request with the value of NextToken - // from the previous response to continue listing data. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListRulesPackagesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRulesPackagesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRulesPackagesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRulesPackagesInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListRulesPackagesInput) SetMaxResults(v int64) *ListRulesPackagesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRulesPackagesInput) SetNextToken(v string) *ListRulesPackagesInput { - s.NextToken = &v - return s -} - -type ListRulesPackagesOutput struct { - _ struct{} `type:"structure"` - - // When a response is generated, if there is more data to be listed, this parameter - // is present in the response and contains the value to use for the nextToken - // parameter in a subsequent pagination request. If there is no more data to - // be listed, this parameter is set to null. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The list of ARNs that specifies the rules packages returned by the action. - // - // RulesPackageArns is a required field - RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListRulesPackagesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRulesPackagesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRulesPackagesOutput) SetNextToken(v string) *ListRulesPackagesOutput { - s.NextToken = &v - return s -} - -// SetRulesPackageArns sets the RulesPackageArns field's value. -func (s *ListRulesPackagesOutput) SetRulesPackageArns(v []*string) *ListRulesPackagesOutput { - s.RulesPackageArns = v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The ARN that specifies the assessment template whose tags you want to list. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { - s.ResourceArn = &v - return s -} - -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // A collection of key and value pairs. - // - // Tags is a required field - Tags []*Tag `locationName:"tags" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -// Contains information about the network interfaces interacting with an EC2 -// instance. This data type is used as one of the elements of the AssetAttributes -// data type. -type NetworkInterface struct { - _ struct{} `type:"structure"` - - // The IP addresses associated with the network interface. - Ipv6Addresses []*string `locationName:"ipv6Addresses" type:"list"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // The name of a private DNS associated with the network interface. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - - // The private IP address associated with the network interface. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // A list of the private IP addresses associated with the network interface. - // Includes the privateDnsName and privateIpAddress. - PrivateIpAddresses []*PrivateIp `locationName:"privateIpAddresses" type:"list"` - - // The name of a public DNS associated with the network interface. - PublicDnsName *string `locationName:"publicDnsName" type:"string"` - - // The public IP address from which the network interface is reachable. - PublicIp *string `locationName:"publicIp" type:"string"` - - // A list of the security groups associated with the network interface. Includes - // the groupId and groupName. - SecurityGroups []*SecurityGroup `locationName:"securityGroups" type:"list"` - - // The ID of a subnet associated with the network interface. - SubnetId *string `locationName:"subnetId" type:"string"` - - // The ID of a VPC associated with the network interface. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s NetworkInterface) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInterface) GoString() string { - return s.String() -} - -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *NetworkInterface) SetIpv6Addresses(v []*string) *NetworkInterface { - s.Ipv6Addresses = v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *NetworkInterface) SetNetworkInterfaceId(v string) *NetworkInterface { - s.NetworkInterfaceId = &v - return s -} - -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *NetworkInterface) SetPrivateDnsName(v string) *NetworkInterface { - s.PrivateDnsName = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *NetworkInterface) SetPrivateIpAddress(v string) *NetworkInterface { - s.PrivateIpAddress = &v - return s -} - -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *NetworkInterface) SetPrivateIpAddresses(v []*PrivateIp) *NetworkInterface { - s.PrivateIpAddresses = v - return s -} - -// SetPublicDnsName sets the PublicDnsName field's value. -func (s *NetworkInterface) SetPublicDnsName(v string) *NetworkInterface { - s.PublicDnsName = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *NetworkInterface) SetPublicIp(v string) *NetworkInterface { - s.PublicIp = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *NetworkInterface) SetSecurityGroups(v []*SecurityGroup) *NetworkInterface { - s.SecurityGroups = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *NetworkInterface) SetSubnetId(v string) *NetworkInterface { - s.SubnetId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *NetworkInterface) SetVpcId(v string) *NetworkInterface { - s.VpcId = &v - return s -} - -type PreviewAgentsInput struct { - _ struct{} `type:"structure"` - - // You can use this parameter to indicate the maximum number of items you want - // in the response. The default value is 10. The maximum value is 500. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // You can use this parameter when paginating results. Set the value of this - // parameter to null on your first call to the PreviewAgents action. Subsequent - // calls to the action fill nextToken in the request with the value of NextToken - // from the previous response to continue listing data. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The ARN of the assessment target whose agents you want to preview. - // - // PreviewAgentsArn is a required field - PreviewAgentsArn *string `locationName:"previewAgentsArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PreviewAgentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PreviewAgentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PreviewAgentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PreviewAgentsInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.PreviewAgentsArn == nil { - invalidParams.Add(request.NewErrParamRequired("PreviewAgentsArn")) - } - if s.PreviewAgentsArn != nil && len(*s.PreviewAgentsArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PreviewAgentsArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *PreviewAgentsInput) SetMaxResults(v int64) *PreviewAgentsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *PreviewAgentsInput) SetNextToken(v string) *PreviewAgentsInput { - s.NextToken = &v - return s -} - -// SetPreviewAgentsArn sets the PreviewAgentsArn field's value. -func (s *PreviewAgentsInput) SetPreviewAgentsArn(v string) *PreviewAgentsInput { - s.PreviewAgentsArn = &v - return s -} - -type PreviewAgentsOutput struct { - _ struct{} `type:"structure"` - - // The resulting list of agents. - // - // AgentPreviews is a required field - AgentPreviews []*AgentPreview `locationName:"agentPreviews" type:"list" required:"true"` - - // When a response is generated, if there is more data to be listed, this parameter - // is present in the response and contains the value to use for the nextToken - // parameter in a subsequent pagination request. If there is no more data to - // be listed, this parameter is set to null. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s PreviewAgentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PreviewAgentsOutput) GoString() string { - return s.String() -} - -// SetAgentPreviews sets the AgentPreviews field's value. -func (s *PreviewAgentsOutput) SetAgentPreviews(v []*AgentPreview) *PreviewAgentsOutput { - s.AgentPreviews = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *PreviewAgentsOutput) SetNextToken(v string) *PreviewAgentsOutput { - s.NextToken = &v - return s -} - -// Contains information about a private IP address associated with a network -// interface. This data type is used as a response element in the DescribeFindings -// action. -type PrivateIp struct { - _ struct{} `type:"structure"` - - // The DNS name of the private IP address. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - - // The full IP address of the network inteface. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` -} - -// String returns the string representation -func (s PrivateIp) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PrivateIp) GoString() string { - return s.String() -} - -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *PrivateIp) SetPrivateDnsName(v string) *PrivateIp { - s.PrivateDnsName = &v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *PrivateIp) SetPrivateIpAddress(v string) *PrivateIp { - s.PrivateIpAddress = &v - return s -} - -type RegisterCrossAccountAccessRoleInput struct { - _ struct{} `type:"structure"` - - // The ARN of the IAM role that grants Amazon Inspector access to AWS Services - // needed to perform security assessments. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterCrossAccountAccessRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterCrossAccountAccessRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterCrossAccountAccessRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterCrossAccountAccessRoleInput"} - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleArn sets the RoleArn field's value. -func (s *RegisterCrossAccountAccessRoleInput) SetRoleArn(v string) *RegisterCrossAccountAccessRoleInput { - s.RoleArn = &v - return s -} - -type RegisterCrossAccountAccessRoleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RegisterCrossAccountAccessRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterCrossAccountAccessRoleOutput) GoString() string { - return s.String() -} - -type RemoveAttributesFromFindingsInput struct { - _ struct{} `type:"structure"` - - // The array of attribute keys that you want to remove from specified findings. - // - // AttributeKeys is a required field - AttributeKeys []*string `locationName:"attributeKeys" type:"list" required:"true"` - - // The ARNs that specify the findings that you want to remove attributes from. - // - // FindingArns is a required field - FindingArns []*string `locationName:"findingArns" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveAttributesFromFindingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveAttributesFromFindingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveAttributesFromFindingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveAttributesFromFindingsInput"} - if s.AttributeKeys == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeKeys")) - } - if s.FindingArns == nil { - invalidParams.Add(request.NewErrParamRequired("FindingArns")) - } - if s.FindingArns != nil && len(s.FindingArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FindingArns", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeKeys sets the AttributeKeys field's value. -func (s *RemoveAttributesFromFindingsInput) SetAttributeKeys(v []*string) *RemoveAttributesFromFindingsInput { - s.AttributeKeys = v - return s -} - -// SetFindingArns sets the FindingArns field's value. -func (s *RemoveAttributesFromFindingsInput) SetFindingArns(v []*string) *RemoveAttributesFromFindingsInput { - s.FindingArns = v - return s -} - -type RemoveAttributesFromFindingsOutput struct { - _ struct{} `type:"structure"` - - // Attributes details that cannot be described. An error code is provided for - // each failed item. - // - // FailedItems is a required field - FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` -} - -// String returns the string representation -func (s RemoveAttributesFromFindingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveAttributesFromFindingsOutput) GoString() string { - return s.String() -} - -// SetFailedItems sets the FailedItems field's value. -func (s *RemoveAttributesFromFindingsOutput) SetFailedItems(v map[string]*FailedItemDetails) *RemoveAttributesFromFindingsOutput { - s.FailedItems = v - return s -} - -// Contains information about a resource group. The resource group defines a -// set of tags that, when queried, identify the AWS resources that make up the -// assessment target. This data type is used as the response element in the -// DescribeResourceGroups action. -type ResourceGroup struct { - _ struct{} `type:"structure"` - - // The ARN of the resource group. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` - - // The time at which resource group is created. - // - // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` - - // The tags (key and value pairs) of the resource group. This data type property - // is used in the CreateResourceGroup action. - // - // Tags is a required field - Tags []*ResourceGroupTag `locationName:"tags" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s ResourceGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceGroup) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ResourceGroup) SetArn(v string) *ResourceGroup { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *ResourceGroup) SetCreatedAt(v time.Time) *ResourceGroup { - s.CreatedAt = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ResourceGroup) SetTags(v []*ResourceGroupTag) *ResourceGroup { - s.Tags = v - return s -} - -// This data type is used as one of the elements of the ResourceGroup data type. -type ResourceGroupTag struct { - _ struct{} `type:"structure"` - - // A tag key. - // - // Key is a required field - Key *string `locationName:"key" min:"1" type:"string" required:"true"` - - // The value assigned to a tag key. - Value *string `locationName:"value" min:"1" type:"string"` -} - -// String returns the string representation -func (s ResourceGroupTag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceGroupTag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceGroupTag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceGroupTag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *ResourceGroupTag) SetKey(v string) *ResourceGroupTag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ResourceGroupTag) SetValue(v string) *ResourceGroupTag { - s.Value = &v - return s -} - -// Contains information about an Amazon Inspector rules package. This data type -// is used as the response element in the DescribeRulesPackages action. -type RulesPackage struct { - _ struct{} `type:"structure"` - - // The ARN of the rules package. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` - - // The description of the rules package. - Description *string `locationName:"description" type:"string"` - - // The name of the rules package. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The provider of the rules package. - // - // Provider is a required field - Provider *string `locationName:"provider" type:"string" required:"true"` - - // The version ID of the rules package. - // - // Version is a required field - Version *string `locationName:"version" type:"string" required:"true"` -} - -// String returns the string representation -func (s RulesPackage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RulesPackage) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *RulesPackage) SetArn(v string) *RulesPackage { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *RulesPackage) SetDescription(v string) *RulesPackage { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *RulesPackage) SetName(v string) *RulesPackage { - s.Name = &v - return s -} - -// SetProvider sets the Provider field's value. -func (s *RulesPackage) SetProvider(v string) *RulesPackage { - s.Provider = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *RulesPackage) SetVersion(v string) *RulesPackage { - s.Version = &v - return s -} - -// This data type contains key-value pairs that identify various Amazon resources. -type Scope struct { - _ struct{} `type:"structure"` - - // The type of the scope. - Key *string `locationName:"key" type:"string" enum:"ScopeType"` - - // The resource identifier for the specified scope type. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s Scope) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scope) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Scope) SetKey(v string) *Scope { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Scope) SetValue(v string) *Scope { - s.Value = &v - return s -} - -// Contains information about a security group associated with a network interface. -// This data type is used as one of the elements of the NetworkInterface data -// type. -type SecurityGroup struct { - _ struct{} `type:"structure"` - - // The ID of the security group. - GroupId *string `locationName:"groupId" type:"string"` - - // The name of the security group. - GroupName *string `locationName:"groupName" type:"string"` -} - -// String returns the string representation -func (s SecurityGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecurityGroup) GoString() string { - return s.String() -} - -// SetGroupId sets the GroupId field's value. -func (s *SecurityGroup) SetGroupId(v string) *SecurityGroup { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *SecurityGroup) SetGroupName(v string) *SecurityGroup { - s.GroupName = &v - return s -} - -// This data type is used in the Finding data type. -type ServiceAttributes struct { - _ struct{} `type:"structure"` - - // The ARN of the assessment run during which the finding is generated. - AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string"` - - // The ARN of the rules package that is used to generate the finding. - RulesPackageArn *string `locationName:"rulesPackageArn" min:"1" type:"string"` - - // The schema version of this data type. - // - // SchemaVersion is a required field - SchemaVersion *int64 `locationName:"schemaVersion" type:"integer" required:"true"` -} - -// String returns the string representation -func (s ServiceAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceAttributes) GoString() string { - return s.String() -} - -// SetAssessmentRunArn sets the AssessmentRunArn field's value. -func (s *ServiceAttributes) SetAssessmentRunArn(v string) *ServiceAttributes { - s.AssessmentRunArn = &v - return s -} - -// SetRulesPackageArn sets the RulesPackageArn field's value. -func (s *ServiceAttributes) SetRulesPackageArn(v string) *ServiceAttributes { - s.RulesPackageArn = &v - return s -} - -// SetSchemaVersion sets the SchemaVersion field's value. -func (s *ServiceAttributes) SetSchemaVersion(v int64) *ServiceAttributes { - s.SchemaVersion = &v - return s -} - -type SetTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The ARN of the assessment template that you want to set tags to. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` - - // A collection of key and value pairs that you want to set to the assessment - // template. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s SetTagsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetTagsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetTagsForResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *SetTagsForResourceInput) SetResourceArn(v string) *SetTagsForResourceInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *SetTagsForResourceInput) SetTags(v []*Tag) *SetTagsForResourceInput { - s.Tags = v - return s -} - -type SetTagsForResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetTagsForResourceOutput) GoString() string { - return s.String() -} - -type StartAssessmentRunInput struct { - _ struct{} `type:"structure"` - - // You can specify the name for the assessment run. The name must be unique - // for the assessment template whose ARN is used to start the assessment run. - AssessmentRunName *string `locationName:"assessmentRunName" min:"1" type:"string"` - - // The ARN of the assessment template of the assessment run that you want to - // start. - // - // AssessmentTemplateArn is a required field - AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartAssessmentRunInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartAssessmentRunInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartAssessmentRunInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartAssessmentRunInput"} - if s.AssessmentRunName != nil && len(*s.AssessmentRunName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentRunName", 1)) - } - if s.AssessmentTemplateArn == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArn")) - } - if s.AssessmentTemplateArn != nil && len(*s.AssessmentTemplateArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentRunName sets the AssessmentRunName field's value. -func (s *StartAssessmentRunInput) SetAssessmentRunName(v string) *StartAssessmentRunInput { - s.AssessmentRunName = &v - return s -} - -// SetAssessmentTemplateArn sets the AssessmentTemplateArn field's value. -func (s *StartAssessmentRunInput) SetAssessmentTemplateArn(v string) *StartAssessmentRunInput { - s.AssessmentTemplateArn = &v - return s -} - -type StartAssessmentRunOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the assessment run that has been started. - // - // AssessmentRunArn is a required field - AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartAssessmentRunOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartAssessmentRunOutput) GoString() string { - return s.String() -} - -// SetAssessmentRunArn sets the AssessmentRunArn field's value. -func (s *StartAssessmentRunOutput) SetAssessmentRunArn(v string) *StartAssessmentRunOutput { - s.AssessmentRunArn = &v - return s -} - -type StopAssessmentRunInput struct { - _ struct{} `type:"structure"` - - // The ARN of the assessment run that you want to stop. - // - // AssessmentRunArn is a required field - AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` - - // An input option that can be set to either START_EVALUATION or SKIP_EVALUATION. - // START_EVALUATION (the default value), stops the AWS agent from collecting - // data and begins the results evaluation and the findings generation process. - // SKIP_EVALUATION cancels the assessment run immediately, after which no findings - // are generated. - StopAction *string `locationName:"stopAction" type:"string" enum:"StopAction"` -} - -// String returns the string representation -func (s StopAssessmentRunInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopAssessmentRunInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopAssessmentRunInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopAssessmentRunInput"} - if s.AssessmentRunArn == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn")) - } - if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentRunArn sets the AssessmentRunArn field's value. -func (s *StopAssessmentRunInput) SetAssessmentRunArn(v string) *StopAssessmentRunInput { - s.AssessmentRunArn = &v - return s -} - -// SetStopAction sets the StopAction field's value. -func (s *StopAssessmentRunInput) SetStopAction(v string) *StopAssessmentRunInput { - s.StopAction = &v - return s -} - -type StopAssessmentRunOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopAssessmentRunOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopAssessmentRunOutput) GoString() string { - return s.String() -} - -type SubscribeToEventInput struct { - _ struct{} `type:"structure"` - - // The event for which you want to receive SNS notifications. - // - // Event is a required field - Event *string `locationName:"event" type:"string" required:"true" enum:"Event"` - - // The ARN of the assessment template that is used during the event for which - // you want to receive SNS notifications. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` - - // The ARN of the SNS topic to which the SNS notifications are sent. - // - // TopicArn is a required field - TopicArn *string `locationName:"topicArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SubscribeToEventInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubscribeToEventInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SubscribeToEventInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SubscribeToEventInput"} - if s.Event == nil { - invalidParams.Add(request.NewErrParamRequired("Event")) - } - 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.TopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("TopicArn")) - } - if s.TopicArn != nil && len(*s.TopicArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TopicArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEvent sets the Event field's value. -func (s *SubscribeToEventInput) SetEvent(v string) *SubscribeToEventInput { - s.Event = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *SubscribeToEventInput) SetResourceArn(v string) *SubscribeToEventInput { - s.ResourceArn = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *SubscribeToEventInput) SetTopicArn(v string) *SubscribeToEventInput { - s.TopicArn = &v - return s -} - -type SubscribeToEventOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SubscribeToEventOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubscribeToEventOutput) GoString() string { - return s.String() -} - -// This data type is used as a response element in the ListEventSubscriptions -// action. -type Subscription struct { - _ struct{} `type:"structure"` - - // The list of existing event subscriptions. - // - // EventSubscriptions is a required field - EventSubscriptions []*EventSubscription `locationName:"eventSubscriptions" min:"1" type:"list" required:"true"` - - // The ARN of the assessment template that is used during the event for which - // the SNS notification is sent. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` - - // The ARN of the Amazon Simple Notification Service (SNS) topic to which the - // SNS notifications are sent. - // - // TopicArn is a required field - TopicArn *string `locationName:"topicArn" min:"1" 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() -} - -// SetEventSubscriptions sets the EventSubscriptions field's value. -func (s *Subscription) SetEventSubscriptions(v []*EventSubscription) *Subscription { - s.EventSubscriptions = v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *Subscription) SetResourceArn(v string) *Subscription { - s.ResourceArn = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *Subscription) SetTopicArn(v string) *Subscription { - s.TopicArn = &v - return s -} - -// A key and value pair. This data type is used as a request parameter in the -// SetTagsForResource action and a response element in the ListTagsForResource -// action. -type Tag struct { - _ struct{} `type:"structure"` - - // A tag key. - // - // Key is a required field - Key *string `locationName:"key" min:"1" type:"string" required:"true"` - - // A value assigned to a tag key. - Value *string `locationName:"value" min:"1" type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// The metadata about the Amazon Inspector application data metrics collected -// by the agent. This data type is used as the response element in the GetTelemetryMetadata -// action. -type TelemetryMetadata struct { - _ struct{} `type:"structure"` - - // The count of messages that the agent sends to the Amazon Inspector service. - // - // Count is a required field - Count *int64 `locationName:"count" type:"long" required:"true"` - - // The data size of messages that the agent sends to the Amazon Inspector service. - DataSize *int64 `locationName:"dataSize" type:"long"` - - // A specific type of behavioral data that is collected by the agent. - // - // MessageType is a required field - MessageType *string `locationName:"messageType" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TelemetryMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TelemetryMetadata) GoString() string { - return s.String() -} - -// SetCount sets the Count field's value. -func (s *TelemetryMetadata) SetCount(v int64) *TelemetryMetadata { - s.Count = &v - return s -} - -// SetDataSize sets the DataSize field's value. -func (s *TelemetryMetadata) SetDataSize(v int64) *TelemetryMetadata { - s.DataSize = &v - return s -} - -// SetMessageType sets the MessageType field's value. -func (s *TelemetryMetadata) SetMessageType(v string) *TelemetryMetadata { - s.MessageType = &v - return s -} - -// This data type is used in the AssessmentRunFilter data type. -type TimestampRange struct { - _ struct{} `type:"structure"` - - // The minimum value of the timestamp range. - BeginDate *time.Time `locationName:"beginDate" type:"timestamp"` - - // The maximum value of the timestamp range. - EndDate *time.Time `locationName:"endDate" type:"timestamp"` -} - -// String returns the string representation -func (s TimestampRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimestampRange) GoString() string { - return s.String() -} - -// SetBeginDate sets the BeginDate field's value. -func (s *TimestampRange) SetBeginDate(v time.Time) *TimestampRange { - s.BeginDate = &v - return s -} - -// SetEndDate sets the EndDate field's value. -func (s *TimestampRange) SetEndDate(v time.Time) *TimestampRange { - s.EndDate = &v - return s -} - -type UnsubscribeFromEventInput struct { - _ struct{} `type:"structure"` - - // The event for which you want to stop receiving SNS notifications. - // - // Event is a required field - Event *string `locationName:"event" type:"string" required:"true" enum:"Event"` - - // The ARN of the assessment template that is used during the event for which - // you want to stop receiving SNS notifications. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` - - // The ARN of the SNS topic to which SNS notifications are sent. - // - // TopicArn is a required field - TopicArn *string `locationName:"topicArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UnsubscribeFromEventInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnsubscribeFromEventInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UnsubscribeFromEventInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UnsubscribeFromEventInput"} - if s.Event == nil { - invalidParams.Add(request.NewErrParamRequired("Event")) - } - 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.TopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("TopicArn")) - } - if s.TopicArn != nil && len(*s.TopicArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TopicArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEvent sets the Event field's value. -func (s *UnsubscribeFromEventInput) SetEvent(v string) *UnsubscribeFromEventInput { - s.Event = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *UnsubscribeFromEventInput) SetResourceArn(v string) *UnsubscribeFromEventInput { - s.ResourceArn = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *UnsubscribeFromEventInput) SetTopicArn(v string) *UnsubscribeFromEventInput { - s.TopicArn = &v - return s -} - -type UnsubscribeFromEventOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UnsubscribeFromEventOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnsubscribeFromEventOutput) GoString() string { - return s.String() -} - -type UpdateAssessmentTargetInput struct { - _ struct{} `type:"structure"` - - // The ARN of the assessment target that you want to update. - // - // AssessmentTargetArn is a required field - AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"` - - // The name of the assessment target that you want to update. - // - // AssessmentTargetName is a required field - AssessmentTargetName *string `locationName:"assessmentTargetName" min:"1" type:"string" required:"true"` - - // The ARN of the resource group that is used to specify the new resource group - // to associate with the assessment target. - ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateAssessmentTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAssessmentTargetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAssessmentTargetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAssessmentTargetInput"} - if s.AssessmentTargetArn == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentTargetArn")) - } - if s.AssessmentTargetArn != nil && len(*s.AssessmentTargetArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetArn", 1)) - } - if s.AssessmentTargetName == nil { - invalidParams.Add(request.NewErrParamRequired("AssessmentTargetName")) - } - if s.AssessmentTargetName != nil && len(*s.AssessmentTargetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetName", 1)) - } - if s.ResourceGroupArn != nil && len(*s.ResourceGroupArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceGroupArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssessmentTargetArn sets the AssessmentTargetArn field's value. -func (s *UpdateAssessmentTargetInput) SetAssessmentTargetArn(v string) *UpdateAssessmentTargetInput { - s.AssessmentTargetArn = &v - return s -} - -// SetAssessmentTargetName sets the AssessmentTargetName field's value. -func (s *UpdateAssessmentTargetInput) SetAssessmentTargetName(v string) *UpdateAssessmentTargetInput { - s.AssessmentTargetName = &v - return s -} - -// SetResourceGroupArn sets the ResourceGroupArn field's value. -func (s *UpdateAssessmentTargetInput) SetResourceGroupArn(v string) *UpdateAssessmentTargetInput { - s.ResourceGroupArn = &v - return s -} - -type UpdateAssessmentTargetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateAssessmentTargetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAssessmentTargetOutput) GoString() string { - return s.String() -} - -const ( - // AccessDeniedErrorCodeAccessDeniedToAssessmentTarget is a AccessDeniedErrorCode enum value - AccessDeniedErrorCodeAccessDeniedToAssessmentTarget = "ACCESS_DENIED_TO_ASSESSMENT_TARGET" - - // AccessDeniedErrorCodeAccessDeniedToAssessmentTemplate is a AccessDeniedErrorCode enum value - AccessDeniedErrorCodeAccessDeniedToAssessmentTemplate = "ACCESS_DENIED_TO_ASSESSMENT_TEMPLATE" - - // AccessDeniedErrorCodeAccessDeniedToAssessmentRun is a AccessDeniedErrorCode enum value - AccessDeniedErrorCodeAccessDeniedToAssessmentRun = "ACCESS_DENIED_TO_ASSESSMENT_RUN" - - // AccessDeniedErrorCodeAccessDeniedToFinding is a AccessDeniedErrorCode enum value - AccessDeniedErrorCodeAccessDeniedToFinding = "ACCESS_DENIED_TO_FINDING" - - // AccessDeniedErrorCodeAccessDeniedToResourceGroup is a AccessDeniedErrorCode enum value - AccessDeniedErrorCodeAccessDeniedToResourceGroup = "ACCESS_DENIED_TO_RESOURCE_GROUP" - - // AccessDeniedErrorCodeAccessDeniedToRulesPackage is a AccessDeniedErrorCode enum value - AccessDeniedErrorCodeAccessDeniedToRulesPackage = "ACCESS_DENIED_TO_RULES_PACKAGE" - - // AccessDeniedErrorCodeAccessDeniedToSnsTopic is a AccessDeniedErrorCode enum value - AccessDeniedErrorCodeAccessDeniedToSnsTopic = "ACCESS_DENIED_TO_SNS_TOPIC" - - // AccessDeniedErrorCodeAccessDeniedToIamRole is a AccessDeniedErrorCode enum value - AccessDeniedErrorCodeAccessDeniedToIamRole = "ACCESS_DENIED_TO_IAM_ROLE" -) - -const ( - // AgentHealthHealthy is a AgentHealth enum value - AgentHealthHealthy = "HEALTHY" - - // AgentHealthUnhealthy is a AgentHealth enum value - AgentHealthUnhealthy = "UNHEALTHY" - - // AgentHealthUnknown is a AgentHealth enum value - AgentHealthUnknown = "UNKNOWN" -) - -const ( - // AgentHealthCodeIdle is a AgentHealthCode enum value - AgentHealthCodeIdle = "IDLE" - - // AgentHealthCodeRunning is a AgentHealthCode enum value - AgentHealthCodeRunning = "RUNNING" - - // AgentHealthCodeShutdown is a AgentHealthCode enum value - AgentHealthCodeShutdown = "SHUTDOWN" - - // AgentHealthCodeUnhealthy is a AgentHealthCode enum value - AgentHealthCodeUnhealthy = "UNHEALTHY" - - // AgentHealthCodeThrottled is a AgentHealthCode enum value - AgentHealthCodeThrottled = "THROTTLED" - - // AgentHealthCodeUnknown is a AgentHealthCode enum value - AgentHealthCodeUnknown = "UNKNOWN" -) - -const ( - // AssessmentRunNotificationSnsStatusCodeSuccess is a AssessmentRunNotificationSnsStatusCode enum value - AssessmentRunNotificationSnsStatusCodeSuccess = "SUCCESS" - - // AssessmentRunNotificationSnsStatusCodeTopicDoesNotExist is a AssessmentRunNotificationSnsStatusCode enum value - AssessmentRunNotificationSnsStatusCodeTopicDoesNotExist = "TOPIC_DOES_NOT_EXIST" - - // AssessmentRunNotificationSnsStatusCodeAccessDenied is a AssessmentRunNotificationSnsStatusCode enum value - AssessmentRunNotificationSnsStatusCodeAccessDenied = "ACCESS_DENIED" - - // AssessmentRunNotificationSnsStatusCodeInternalError is a AssessmentRunNotificationSnsStatusCode enum value - AssessmentRunNotificationSnsStatusCodeInternalError = "INTERNAL_ERROR" -) - -const ( - // AssessmentRunStateCreated is a AssessmentRunState enum value - AssessmentRunStateCreated = "CREATED" - - // AssessmentRunStateStartDataCollectionPending is a AssessmentRunState enum value - AssessmentRunStateStartDataCollectionPending = "START_DATA_COLLECTION_PENDING" - - // AssessmentRunStateStartDataCollectionInProgress is a AssessmentRunState enum value - AssessmentRunStateStartDataCollectionInProgress = "START_DATA_COLLECTION_IN_PROGRESS" - - // AssessmentRunStateCollectingData is a AssessmentRunState enum value - AssessmentRunStateCollectingData = "COLLECTING_DATA" - - // AssessmentRunStateStopDataCollectionPending is a AssessmentRunState enum value - AssessmentRunStateStopDataCollectionPending = "STOP_DATA_COLLECTION_PENDING" - - // AssessmentRunStateDataCollected is a AssessmentRunState enum value - AssessmentRunStateDataCollected = "DATA_COLLECTED" - - // AssessmentRunStateStartEvaluatingRulesPending is a AssessmentRunState enum value - AssessmentRunStateStartEvaluatingRulesPending = "START_EVALUATING_RULES_PENDING" - - // AssessmentRunStateEvaluatingRules is a AssessmentRunState enum value - AssessmentRunStateEvaluatingRules = "EVALUATING_RULES" - - // AssessmentRunStateFailed is a AssessmentRunState enum value - AssessmentRunStateFailed = "FAILED" - - // AssessmentRunStateError is a AssessmentRunState enum value - AssessmentRunStateError = "ERROR" - - // AssessmentRunStateCompleted is a AssessmentRunState enum value - AssessmentRunStateCompleted = "COMPLETED" - - // AssessmentRunStateCompletedWithErrors is a AssessmentRunState enum value - AssessmentRunStateCompletedWithErrors = "COMPLETED_WITH_ERRORS" - - // AssessmentRunStateCanceled is a AssessmentRunState enum value - AssessmentRunStateCanceled = "CANCELED" -) - -const ( - // AssetTypeEc2Instance is a AssetType enum value - AssetTypeEc2Instance = "ec2-instance" -) - -const ( - // EventAssessmentRunStarted is a Event enum value - EventAssessmentRunStarted = "ASSESSMENT_RUN_STARTED" - - // EventAssessmentRunCompleted is a Event enum value - EventAssessmentRunCompleted = "ASSESSMENT_RUN_COMPLETED" - - // EventAssessmentRunStateChanged is a Event enum value - EventAssessmentRunStateChanged = "ASSESSMENT_RUN_STATE_CHANGED" - - // EventFindingReported is a Event enum value - EventFindingReported = "FINDING_REPORTED" - - // EventOther is a Event enum value - EventOther = "OTHER" -) - -const ( - // FailedItemErrorCodeInvalidArn is a FailedItemErrorCode enum value - FailedItemErrorCodeInvalidArn = "INVALID_ARN" - - // FailedItemErrorCodeDuplicateArn is a FailedItemErrorCode enum value - FailedItemErrorCodeDuplicateArn = "DUPLICATE_ARN" - - // FailedItemErrorCodeItemDoesNotExist is a FailedItemErrorCode enum value - FailedItemErrorCodeItemDoesNotExist = "ITEM_DOES_NOT_EXIST" - - // FailedItemErrorCodeAccessDenied is a FailedItemErrorCode enum value - FailedItemErrorCodeAccessDenied = "ACCESS_DENIED" - - // FailedItemErrorCodeLimitExceeded is a FailedItemErrorCode enum value - FailedItemErrorCodeLimitExceeded = "LIMIT_EXCEEDED" - - // FailedItemErrorCodeInternalError is a FailedItemErrorCode enum value - FailedItemErrorCodeInternalError = "INTERNAL_ERROR" -) - -const ( - // InvalidCrossAccountRoleErrorCodeRoleDoesNotExistOrInvalidTrustRelationship is a InvalidCrossAccountRoleErrorCode enum value - InvalidCrossAccountRoleErrorCodeRoleDoesNotExistOrInvalidTrustRelationship = "ROLE_DOES_NOT_EXIST_OR_INVALID_TRUST_RELATIONSHIP" - - // InvalidCrossAccountRoleErrorCodeRoleDoesNotHaveCorrectPolicy is a InvalidCrossAccountRoleErrorCode enum value - InvalidCrossAccountRoleErrorCodeRoleDoesNotHaveCorrectPolicy = "ROLE_DOES_NOT_HAVE_CORRECT_POLICY" -) - -const ( - // InvalidInputErrorCodeInvalidAssessmentTargetArn is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAssessmentTargetArn = "INVALID_ASSESSMENT_TARGET_ARN" - - // InvalidInputErrorCodeInvalidAssessmentTemplateArn is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAssessmentTemplateArn = "INVALID_ASSESSMENT_TEMPLATE_ARN" - - // InvalidInputErrorCodeInvalidAssessmentRunArn is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAssessmentRunArn = "INVALID_ASSESSMENT_RUN_ARN" - - // InvalidInputErrorCodeInvalidFindingArn is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidFindingArn = "INVALID_FINDING_ARN" - - // InvalidInputErrorCodeInvalidResourceGroupArn is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidResourceGroupArn = "INVALID_RESOURCE_GROUP_ARN" - - // InvalidInputErrorCodeInvalidRulesPackageArn is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidRulesPackageArn = "INVALID_RULES_PACKAGE_ARN" - - // InvalidInputErrorCodeInvalidResourceArn is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidResourceArn = "INVALID_RESOURCE_ARN" - - // InvalidInputErrorCodeInvalidSnsTopicArn is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidSnsTopicArn = "INVALID_SNS_TOPIC_ARN" - - // InvalidInputErrorCodeInvalidIamRoleArn is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidIamRoleArn = "INVALID_IAM_ROLE_ARN" - - // InvalidInputErrorCodeInvalidAssessmentTargetName is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAssessmentTargetName = "INVALID_ASSESSMENT_TARGET_NAME" - - // InvalidInputErrorCodeInvalidAssessmentTargetNamePattern is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAssessmentTargetNamePattern = "INVALID_ASSESSMENT_TARGET_NAME_PATTERN" - - // InvalidInputErrorCodeInvalidAssessmentTemplateName is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAssessmentTemplateName = "INVALID_ASSESSMENT_TEMPLATE_NAME" - - // InvalidInputErrorCodeInvalidAssessmentTemplateNamePattern is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAssessmentTemplateNamePattern = "INVALID_ASSESSMENT_TEMPLATE_NAME_PATTERN" - - // InvalidInputErrorCodeInvalidAssessmentTemplateDuration is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAssessmentTemplateDuration = "INVALID_ASSESSMENT_TEMPLATE_DURATION" - - // InvalidInputErrorCodeInvalidAssessmentTemplateDurationRange is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAssessmentTemplateDurationRange = "INVALID_ASSESSMENT_TEMPLATE_DURATION_RANGE" - - // InvalidInputErrorCodeInvalidAssessmentRunDurationRange is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAssessmentRunDurationRange = "INVALID_ASSESSMENT_RUN_DURATION_RANGE" - - // InvalidInputErrorCodeInvalidAssessmentRunStartTimeRange is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAssessmentRunStartTimeRange = "INVALID_ASSESSMENT_RUN_START_TIME_RANGE" - - // InvalidInputErrorCodeInvalidAssessmentRunCompletionTimeRange is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAssessmentRunCompletionTimeRange = "INVALID_ASSESSMENT_RUN_COMPLETION_TIME_RANGE" - - // InvalidInputErrorCodeInvalidAssessmentRunStateChangeTimeRange is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAssessmentRunStateChangeTimeRange = "INVALID_ASSESSMENT_RUN_STATE_CHANGE_TIME_RANGE" - - // InvalidInputErrorCodeInvalidAssessmentRunState is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAssessmentRunState = "INVALID_ASSESSMENT_RUN_STATE" - - // InvalidInputErrorCodeInvalidTag is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidTag = "INVALID_TAG" - - // InvalidInputErrorCodeInvalidTagKey is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidTagKey = "INVALID_TAG_KEY" - - // InvalidInputErrorCodeInvalidTagValue is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidTagValue = "INVALID_TAG_VALUE" - - // InvalidInputErrorCodeInvalidResourceGroupTagKey is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidResourceGroupTagKey = "INVALID_RESOURCE_GROUP_TAG_KEY" - - // InvalidInputErrorCodeInvalidResourceGroupTagValue is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidResourceGroupTagValue = "INVALID_RESOURCE_GROUP_TAG_VALUE" - - // InvalidInputErrorCodeInvalidAttribute is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAttribute = "INVALID_ATTRIBUTE" - - // InvalidInputErrorCodeInvalidUserAttribute is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidUserAttribute = "INVALID_USER_ATTRIBUTE" - - // InvalidInputErrorCodeInvalidUserAttributeKey is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidUserAttributeKey = "INVALID_USER_ATTRIBUTE_KEY" - - // InvalidInputErrorCodeInvalidUserAttributeValue is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidUserAttributeValue = "INVALID_USER_ATTRIBUTE_VALUE" - - // InvalidInputErrorCodeInvalidPaginationToken is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidPaginationToken = "INVALID_PAGINATION_TOKEN" - - // InvalidInputErrorCodeInvalidMaxResults is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidMaxResults = "INVALID_MAX_RESULTS" - - // InvalidInputErrorCodeInvalidAgentId is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAgentId = "INVALID_AGENT_ID" - - // InvalidInputErrorCodeInvalidAutoScalingGroup is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidAutoScalingGroup = "INVALID_AUTO_SCALING_GROUP" - - // InvalidInputErrorCodeInvalidRuleName is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidRuleName = "INVALID_RULE_NAME" - - // InvalidInputErrorCodeInvalidSeverity is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidSeverity = "INVALID_SEVERITY" - - // InvalidInputErrorCodeInvalidLocale is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidLocale = "INVALID_LOCALE" - - // InvalidInputErrorCodeInvalidEvent is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidEvent = "INVALID_EVENT" - - // InvalidInputErrorCodeAssessmentTargetNameAlreadyTaken is a InvalidInputErrorCode enum value - InvalidInputErrorCodeAssessmentTargetNameAlreadyTaken = "ASSESSMENT_TARGET_NAME_ALREADY_TAKEN" - - // InvalidInputErrorCodeAssessmentTemplateNameAlreadyTaken is a InvalidInputErrorCode enum value - InvalidInputErrorCodeAssessmentTemplateNameAlreadyTaken = "ASSESSMENT_TEMPLATE_NAME_ALREADY_TAKEN" - - // InvalidInputErrorCodeInvalidNumberOfAssessmentTargetArns is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfAssessmentTargetArns = "INVALID_NUMBER_OF_ASSESSMENT_TARGET_ARNS" - - // InvalidInputErrorCodeInvalidNumberOfAssessmentTemplateArns is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfAssessmentTemplateArns = "INVALID_NUMBER_OF_ASSESSMENT_TEMPLATE_ARNS" - - // InvalidInputErrorCodeInvalidNumberOfAssessmentRunArns is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfAssessmentRunArns = "INVALID_NUMBER_OF_ASSESSMENT_RUN_ARNS" - - // InvalidInputErrorCodeInvalidNumberOfFindingArns is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfFindingArns = "INVALID_NUMBER_OF_FINDING_ARNS" - - // InvalidInputErrorCodeInvalidNumberOfResourceGroupArns is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfResourceGroupArns = "INVALID_NUMBER_OF_RESOURCE_GROUP_ARNS" - - // InvalidInputErrorCodeInvalidNumberOfRulesPackageArns is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfRulesPackageArns = "INVALID_NUMBER_OF_RULES_PACKAGE_ARNS" - - // InvalidInputErrorCodeInvalidNumberOfAssessmentRunStates is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfAssessmentRunStates = "INVALID_NUMBER_OF_ASSESSMENT_RUN_STATES" - - // InvalidInputErrorCodeInvalidNumberOfTags is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfTags = "INVALID_NUMBER_OF_TAGS" - - // InvalidInputErrorCodeInvalidNumberOfResourceGroupTags is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfResourceGroupTags = "INVALID_NUMBER_OF_RESOURCE_GROUP_TAGS" - - // InvalidInputErrorCodeInvalidNumberOfAttributes is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfAttributes = "INVALID_NUMBER_OF_ATTRIBUTES" - - // InvalidInputErrorCodeInvalidNumberOfUserAttributes is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfUserAttributes = "INVALID_NUMBER_OF_USER_ATTRIBUTES" - - // InvalidInputErrorCodeInvalidNumberOfAgentIds is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfAgentIds = "INVALID_NUMBER_OF_AGENT_IDS" - - // InvalidInputErrorCodeInvalidNumberOfAutoScalingGroups is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfAutoScalingGroups = "INVALID_NUMBER_OF_AUTO_SCALING_GROUPS" - - // InvalidInputErrorCodeInvalidNumberOfRuleNames is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfRuleNames = "INVALID_NUMBER_OF_RULE_NAMES" - - // InvalidInputErrorCodeInvalidNumberOfSeverities is a InvalidInputErrorCode enum value - InvalidInputErrorCodeInvalidNumberOfSeverities = "INVALID_NUMBER_OF_SEVERITIES" -) - -const ( - // LimitExceededErrorCodeAssessmentTargetLimitExceeded is a LimitExceededErrorCode enum value - LimitExceededErrorCodeAssessmentTargetLimitExceeded = "ASSESSMENT_TARGET_LIMIT_EXCEEDED" - - // LimitExceededErrorCodeAssessmentTemplateLimitExceeded is a LimitExceededErrorCode enum value - LimitExceededErrorCodeAssessmentTemplateLimitExceeded = "ASSESSMENT_TEMPLATE_LIMIT_EXCEEDED" - - // LimitExceededErrorCodeAssessmentRunLimitExceeded is a LimitExceededErrorCode enum value - LimitExceededErrorCodeAssessmentRunLimitExceeded = "ASSESSMENT_RUN_LIMIT_EXCEEDED" - - // LimitExceededErrorCodeResourceGroupLimitExceeded is a LimitExceededErrorCode enum value - LimitExceededErrorCodeResourceGroupLimitExceeded = "RESOURCE_GROUP_LIMIT_EXCEEDED" - - // LimitExceededErrorCodeEventSubscriptionLimitExceeded is a LimitExceededErrorCode enum value - LimitExceededErrorCodeEventSubscriptionLimitExceeded = "EVENT_SUBSCRIPTION_LIMIT_EXCEEDED" -) - -const ( - // LocaleEnUs is a Locale enum value - LocaleEnUs = "EN_US" -) - -const ( - // NoSuchEntityErrorCodeAssessmentTargetDoesNotExist is a NoSuchEntityErrorCode enum value - NoSuchEntityErrorCodeAssessmentTargetDoesNotExist = "ASSESSMENT_TARGET_DOES_NOT_EXIST" - - // NoSuchEntityErrorCodeAssessmentTemplateDoesNotExist is a NoSuchEntityErrorCode enum value - NoSuchEntityErrorCodeAssessmentTemplateDoesNotExist = "ASSESSMENT_TEMPLATE_DOES_NOT_EXIST" - - // NoSuchEntityErrorCodeAssessmentRunDoesNotExist is a NoSuchEntityErrorCode enum value - NoSuchEntityErrorCodeAssessmentRunDoesNotExist = "ASSESSMENT_RUN_DOES_NOT_EXIST" - - // NoSuchEntityErrorCodeFindingDoesNotExist is a NoSuchEntityErrorCode enum value - NoSuchEntityErrorCodeFindingDoesNotExist = "FINDING_DOES_NOT_EXIST" - - // NoSuchEntityErrorCodeResourceGroupDoesNotExist is a NoSuchEntityErrorCode enum value - NoSuchEntityErrorCodeResourceGroupDoesNotExist = "RESOURCE_GROUP_DOES_NOT_EXIST" - - // NoSuchEntityErrorCodeRulesPackageDoesNotExist is a NoSuchEntityErrorCode enum value - NoSuchEntityErrorCodeRulesPackageDoesNotExist = "RULES_PACKAGE_DOES_NOT_EXIST" - - // NoSuchEntityErrorCodeSnsTopicDoesNotExist is a NoSuchEntityErrorCode enum value - NoSuchEntityErrorCodeSnsTopicDoesNotExist = "SNS_TOPIC_DOES_NOT_EXIST" - - // NoSuchEntityErrorCodeIamRoleDoesNotExist is a NoSuchEntityErrorCode enum value - NoSuchEntityErrorCodeIamRoleDoesNotExist = "IAM_ROLE_DOES_NOT_EXIST" -) - -const ( - // PreviewStatusWorkInProgress is a PreviewStatus enum value - PreviewStatusWorkInProgress = "WORK_IN_PROGRESS" - - // PreviewStatusCompleted is a PreviewStatus enum value - PreviewStatusCompleted = "COMPLETED" -) - -const ( - // ReportFileFormatHtml is a ReportFileFormat enum value - ReportFileFormatHtml = "HTML" - - // ReportFileFormatPdf is a ReportFileFormat enum value - ReportFileFormatPdf = "PDF" -) - -const ( - // ReportStatusWorkInProgress is a ReportStatus enum value - ReportStatusWorkInProgress = "WORK_IN_PROGRESS" - - // ReportStatusFailed is a ReportStatus enum value - ReportStatusFailed = "FAILED" - - // ReportStatusCompleted is a ReportStatus enum value - ReportStatusCompleted = "COMPLETED" -) - -const ( - // ReportTypeFinding is a ReportType enum value - ReportTypeFinding = "FINDING" - - // ReportTypeFull is a ReportType enum value - ReportTypeFull = "FULL" -) - -const ( - // ScopeTypeInstanceId is a ScopeType enum value - ScopeTypeInstanceId = "INSTANCE_ID" - - // ScopeTypeRulesPackageArn is a ScopeType enum value - ScopeTypeRulesPackageArn = "RULES_PACKAGE_ARN" -) - -const ( - // SeverityLow is a Severity enum value - SeverityLow = "Low" - - // SeverityMedium is a Severity enum value - SeverityMedium = "Medium" - - // SeverityHigh is a Severity enum value - SeverityHigh = "High" - - // SeverityInformational is a Severity enum value - SeverityInformational = "Informational" - - // SeverityUndefined is a Severity enum value - SeverityUndefined = "Undefined" -) - -const ( - // StopActionStartEvaluation is a StopAction enum value - StopActionStartEvaluation = "START_EVALUATION" - - // StopActionSkipEvaluation is a StopAction enum value - StopActionSkipEvaluation = "SKIP_EVALUATION" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/doc.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/doc.go deleted file mode 100644 index e87a644a6..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/doc.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package inspector provides the client and types for making API -// requests to Amazon Inspector. -// -// Amazon Inspector enables you to analyze the behavior of your AWS resources -// and to identify potential security issues. For more information, see Amazon -// Inspector User Guide (http://docs.aws.amazon.com/inspector/latest/userguide/inspector_introduction.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16 for more information on this service. -// -// See inspector package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/inspector/ -// -// Using the Client -// -// To contact Amazon Inspector with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Inspector client Inspector for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/inspector/#New -package inspector diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go deleted file mode 100644 index 9e106a587..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package inspector - -const ( - - // ErrCodeAccessDeniedException for service response error code - // "AccessDeniedException". - // - // You do not have required permissions to access the requested resource. - ErrCodeAccessDeniedException = "AccessDeniedException" - - // ErrCodeAgentsAlreadyRunningAssessmentException for service response error code - // "AgentsAlreadyRunningAssessmentException". - // - // You started an assessment run, but one of the instances is already participating - // in another assessment run. - ErrCodeAgentsAlreadyRunningAssessmentException = "AgentsAlreadyRunningAssessmentException" - - // ErrCodeAssessmentRunInProgressException for service response error code - // "AssessmentRunInProgressException". - // - // You cannot perform a specified action if an assessment run is currently in - // progress. - ErrCodeAssessmentRunInProgressException = "AssessmentRunInProgressException" - - // ErrCodeInternalException for service response error code - // "InternalException". - // - // Internal server error. - ErrCodeInternalException = "InternalException" - - // ErrCodeInvalidCrossAccountRoleException for service response error code - // "InvalidCrossAccountRoleException". - // - // Amazon Inspector cannot assume the cross-account role that it needs to list - // your EC2 instances during the assessment run. - ErrCodeInvalidCrossAccountRoleException = "InvalidCrossAccountRoleException" - - // ErrCodeInvalidInputException for service response error code - // "InvalidInputException". - // - // The request was rejected because an invalid or out-of-range value was supplied - // for an input parameter. - ErrCodeInvalidInputException = "InvalidInputException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The request was rejected because it attempted to create resources beyond - // the current AWS account limits. The error code describes the limit exceeded. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeNoSuchEntityException for service response error code - // "NoSuchEntityException". - // - // The request was rejected because it referenced an entity that does not exist. - // The error code describes the entity. - ErrCodeNoSuchEntityException = "NoSuchEntityException" - - // ErrCodePreviewGenerationInProgressException for service response error code - // "PreviewGenerationInProgressException". - // - // The request is rejected. The specified assessment template is currently generating - // an exclusions preview. - ErrCodePreviewGenerationInProgressException = "PreviewGenerationInProgressException" - - // ErrCodeServiceTemporarilyUnavailableException for service response error code - // "ServiceTemporarilyUnavailableException". - // - // The serice is temporary unavailable. - ErrCodeServiceTemporarilyUnavailableException = "ServiceTemporarilyUnavailableException" - - // ErrCodeUnsupportedFeatureException for service response error code - // "UnsupportedFeatureException". - // - // Used by the GetAssessmentReport API. The request was rejected because you - // tried to generate a report for an assessment run that existed before reporting - // was supported in Amazon Inspector. You can only generate reports for assessment - // runs that took place or will take place after generating reports in Amazon - // Inspector became available. - ErrCodeUnsupportedFeatureException = "UnsupportedFeatureException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/service.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/service.go deleted file mode 100644 index 2e68b4e4d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package inspector - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// Inspector provides the API operation methods for making requests to -// Amazon Inspector. See this package's package overview docs -// for details on the service. -// -// Inspector methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Inspector 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 = "inspector" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Inspector" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Inspector client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Inspector client from just a session. -// svc := inspector.New(mySession) -// -// // Create a Inspector client with additional configuration -// svc := inspector.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Inspector { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Inspector { - svc := &Inspector{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2016-02-16", - JSONVersion: "1.1", - TargetPrefix: "InspectorService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Inspector operation and runs any -// custom request initialization. -func (c *Inspector) 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/iot/api.go b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go deleted file mode 100644 index 8345e1736..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go +++ /dev/null @@ -1,37268 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package iot - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opAcceptCertificateTransfer = "AcceptCertificateTransfer" - -// AcceptCertificateTransferRequest generates a "aws/request.Request" representing the -// client's request for the AcceptCertificateTransfer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcceptCertificateTransfer for more information on using the AcceptCertificateTransfer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcceptCertificateTransferRequest method. -// req, resp := client.AcceptCertificateTransferRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) AcceptCertificateTransferRequest(input *AcceptCertificateTransferInput) (req *request.Request, output *AcceptCertificateTransferOutput) { - op := &request.Operation{ - Name: opAcceptCertificateTransfer, - HTTPMethod: "PATCH", - HTTPPath: "/accept-certificate-transfer/{certificateId}", - } - - if input == nil { - input = &AcceptCertificateTransferInput{} - } - - output = &AcceptCertificateTransferOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AcceptCertificateTransfer API operation for AWS IoT. -// -// Accepts a pending certificate transfer. The default state of the certificate -// is INACTIVE. -// -// To check for pending certificate transfers, call ListCertificates to enumerate -// your certificates. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation AcceptCertificateTransfer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeTransferAlreadyCompletedException "TransferAlreadyCompletedException" -// You can't revert the certificate transfer because the transfer is already -// complete. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) AcceptCertificateTransfer(input *AcceptCertificateTransferInput) (*AcceptCertificateTransferOutput, error) { - req, out := c.AcceptCertificateTransferRequest(input) - return out, req.Send() -} - -// AcceptCertificateTransferWithContext is the same as AcceptCertificateTransfer with the addition of -// the ability to pass a context and additional request options. -// -// See AcceptCertificateTransfer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) AcceptCertificateTransferWithContext(ctx aws.Context, input *AcceptCertificateTransferInput, opts ...request.Option) (*AcceptCertificateTransferOutput, error) { - req, out := c.AcceptCertificateTransferRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddThingToBillingGroup = "AddThingToBillingGroup" - -// AddThingToBillingGroupRequest generates a "aws/request.Request" representing the -// client's request for the AddThingToBillingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddThingToBillingGroup for more information on using the AddThingToBillingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddThingToBillingGroupRequest method. -// req, resp := client.AddThingToBillingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) AddThingToBillingGroupRequest(input *AddThingToBillingGroupInput) (req *request.Request, output *AddThingToBillingGroupOutput) { - op := &request.Operation{ - Name: opAddThingToBillingGroup, - HTTPMethod: "PUT", - HTTPPath: "/billing-groups/addThingToBillingGroup", - } - - if input == nil { - input = &AddThingToBillingGroupInput{} - } - - output = &AddThingToBillingGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddThingToBillingGroup API operation for AWS IoT. -// -// Adds a thing to a billing 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 IoT's -// API operation AddThingToBillingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) AddThingToBillingGroup(input *AddThingToBillingGroupInput) (*AddThingToBillingGroupOutput, error) { - req, out := c.AddThingToBillingGroupRequest(input) - return out, req.Send() -} - -// AddThingToBillingGroupWithContext is the same as AddThingToBillingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See AddThingToBillingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) AddThingToBillingGroupWithContext(ctx aws.Context, input *AddThingToBillingGroupInput, opts ...request.Option) (*AddThingToBillingGroupOutput, error) { - req, out := c.AddThingToBillingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddThingToThingGroup = "AddThingToThingGroup" - -// AddThingToThingGroupRequest generates a "aws/request.Request" representing the -// client's request for the AddThingToThingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddThingToThingGroup for more information on using the AddThingToThingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddThingToThingGroupRequest method. -// req, resp := client.AddThingToThingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) AddThingToThingGroupRequest(input *AddThingToThingGroupInput) (req *request.Request, output *AddThingToThingGroupOutput) { - op := &request.Operation{ - Name: opAddThingToThingGroup, - HTTPMethod: "PUT", - HTTPPath: "/thing-groups/addThingToThingGroup", - } - - if input == nil { - input = &AddThingToThingGroupInput{} - } - - output = &AddThingToThingGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddThingToThingGroup API operation for AWS IoT. -// -// Adds a thing to a thing 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 IoT's -// API operation AddThingToThingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) AddThingToThingGroup(input *AddThingToThingGroupInput) (*AddThingToThingGroupOutput, error) { - req, out := c.AddThingToThingGroupRequest(input) - return out, req.Send() -} - -// AddThingToThingGroupWithContext is the same as AddThingToThingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See AddThingToThingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) AddThingToThingGroupWithContext(ctx aws.Context, input *AddThingToThingGroupInput, opts ...request.Option) (*AddThingToThingGroupOutput, error) { - req, out := c.AddThingToThingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateTargetsWithJob = "AssociateTargetsWithJob" - -// AssociateTargetsWithJobRequest generates a "aws/request.Request" representing the -// client's request for the AssociateTargetsWithJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateTargetsWithJob for more information on using the AssociateTargetsWithJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateTargetsWithJobRequest method. -// req, resp := client.AssociateTargetsWithJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) AssociateTargetsWithJobRequest(input *AssociateTargetsWithJobInput) (req *request.Request, output *AssociateTargetsWithJobOutput) { - op := &request.Operation{ - Name: opAssociateTargetsWithJob, - HTTPMethod: "POST", - HTTPPath: "/jobs/{jobId}/targets", - } - - if input == nil { - input = &AssociateTargetsWithJobInput{} - } - - output = &AssociateTargetsWithJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateTargetsWithJob API operation for AWS IoT. -// -// Associates a group with a continuous job. The following criteria must be -// met: -// -// * The job must have been created with the targetSelection field set to -// "CONTINUOUS". -// -// * The job status must currently be "IN_PROGRESS". -// -// * The total number of targets associated with a job must not exceed 100. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation AssociateTargetsWithJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) AssociateTargetsWithJob(input *AssociateTargetsWithJobInput) (*AssociateTargetsWithJobOutput, error) { - req, out := c.AssociateTargetsWithJobRequest(input) - return out, req.Send() -} - -// AssociateTargetsWithJobWithContext is the same as AssociateTargetsWithJob with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateTargetsWithJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) AssociateTargetsWithJobWithContext(ctx aws.Context, input *AssociateTargetsWithJobInput, opts ...request.Option) (*AssociateTargetsWithJobOutput, error) { - req, out := c.AssociateTargetsWithJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachPolicy = "AttachPolicy" - -// AttachPolicyRequest generates a "aws/request.Request" representing the -// client's request for the AttachPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachPolicy for more information on using the AttachPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachPolicyRequest method. -// req, resp := client.AttachPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) AttachPolicyRequest(input *AttachPolicyInput) (req *request.Request, output *AttachPolicyOutput) { - op := &request.Operation{ - Name: opAttachPolicy, - HTTPMethod: "PUT", - HTTPPath: "/target-policies/{policyName}", - } - - if input == nil { - input = &AttachPolicyInput{} - } - - output = &AttachPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachPolicy API operation for AWS IoT. -// -// Attaches a policy to the specified target. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation AttachPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -func (c *IoT) AttachPolicy(input *AttachPolicyInput) (*AttachPolicyOutput, error) { - req, out := c.AttachPolicyRequest(input) - return out, req.Send() -} - -// AttachPolicyWithContext is the same as AttachPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See AttachPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) AttachPolicyWithContext(ctx aws.Context, input *AttachPolicyInput, opts ...request.Option) (*AttachPolicyOutput, error) { - req, out := c.AttachPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachPrincipalPolicy = "AttachPrincipalPolicy" - -// AttachPrincipalPolicyRequest generates a "aws/request.Request" representing the -// client's request for the AttachPrincipalPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachPrincipalPolicy for more information on using the AttachPrincipalPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachPrincipalPolicyRequest method. -// req, resp := client.AttachPrincipalPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// Deprecated: AttachPrincipalPolicy has been deprecated -func (c *IoT) AttachPrincipalPolicyRequest(input *AttachPrincipalPolicyInput) (req *request.Request, output *AttachPrincipalPolicyOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, AttachPrincipalPolicy, has been deprecated") - } - op := &request.Operation{ - Name: opAttachPrincipalPolicy, - HTTPMethod: "PUT", - HTTPPath: "/principal-policies/{policyName}", - } - - if input == nil { - input = &AttachPrincipalPolicyInput{} - } - - output = &AttachPrincipalPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachPrincipalPolicy API operation for AWS IoT. -// -// Attaches the specified policy to the specified principal (certificate or -// other credential). -// -// Note: This API is deprecated. Please use AttachPolicy instead. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation AttachPrincipalPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -// -// Deprecated: AttachPrincipalPolicy has been deprecated -func (c *IoT) AttachPrincipalPolicy(input *AttachPrincipalPolicyInput) (*AttachPrincipalPolicyOutput, error) { - req, out := c.AttachPrincipalPolicyRequest(input) - return out, req.Send() -} - -// AttachPrincipalPolicyWithContext is the same as AttachPrincipalPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See AttachPrincipalPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: AttachPrincipalPolicyWithContext has been deprecated -func (c *IoT) AttachPrincipalPolicyWithContext(ctx aws.Context, input *AttachPrincipalPolicyInput, opts ...request.Option) (*AttachPrincipalPolicyOutput, error) { - req, out := c.AttachPrincipalPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachSecurityProfile = "AttachSecurityProfile" - -// AttachSecurityProfileRequest generates a "aws/request.Request" representing the -// client's request for the AttachSecurityProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachSecurityProfile for more information on using the AttachSecurityProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachSecurityProfileRequest method. -// req, resp := client.AttachSecurityProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) AttachSecurityProfileRequest(input *AttachSecurityProfileInput) (req *request.Request, output *AttachSecurityProfileOutput) { - op := &request.Operation{ - Name: opAttachSecurityProfile, - HTTPMethod: "PUT", - HTTPPath: "/security-profiles/{securityProfileName}/targets", - } - - if input == nil { - input = &AttachSecurityProfileInput{} - } - - output = &AttachSecurityProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachSecurityProfile API operation for AWS IoT. -// -// Associates a Device Defender security profile with a thing group or with -// this account. Each thing group or account can have up to five security profiles -// associated with it. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation AttachSecurityProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -// * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of an entity specified with the expectedVersion -// parameter does not match the latest version in the system. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) AttachSecurityProfile(input *AttachSecurityProfileInput) (*AttachSecurityProfileOutput, error) { - req, out := c.AttachSecurityProfileRequest(input) - return out, req.Send() -} - -// AttachSecurityProfileWithContext is the same as AttachSecurityProfile with the addition of -// the ability to pass a context and additional request options. -// -// See AttachSecurityProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) AttachSecurityProfileWithContext(ctx aws.Context, input *AttachSecurityProfileInput, opts ...request.Option) (*AttachSecurityProfileOutput, error) { - req, out := c.AttachSecurityProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachThingPrincipal = "AttachThingPrincipal" - -// AttachThingPrincipalRequest generates a "aws/request.Request" representing the -// client's request for the AttachThingPrincipal operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachThingPrincipal for more information on using the AttachThingPrincipal -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachThingPrincipalRequest method. -// req, resp := client.AttachThingPrincipalRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) AttachThingPrincipalRequest(input *AttachThingPrincipalInput) (req *request.Request, output *AttachThingPrincipalOutput) { - op := &request.Operation{ - Name: opAttachThingPrincipal, - HTTPMethod: "PUT", - HTTPPath: "/things/{thingName}/principals", - } - - if input == nil { - input = &AttachThingPrincipalInput{} - } - - output = &AttachThingPrincipalOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachThingPrincipal API operation for AWS IoT. -// -// Attaches the specified principal to the specified thing. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation AttachThingPrincipal for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) AttachThingPrincipal(input *AttachThingPrincipalInput) (*AttachThingPrincipalOutput, error) { - req, out := c.AttachThingPrincipalRequest(input) - return out, req.Send() -} - -// AttachThingPrincipalWithContext is the same as AttachThingPrincipal with the addition of -// the ability to pass a context and additional request options. -// -// See AttachThingPrincipal for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) AttachThingPrincipalWithContext(ctx aws.Context, input *AttachThingPrincipalInput, opts ...request.Option) (*AttachThingPrincipalOutput, error) { - req, out := c.AttachThingPrincipalRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelAuditTask = "CancelAuditTask" - -// CancelAuditTaskRequest generates a "aws/request.Request" representing the -// client's request for the CancelAuditTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelAuditTask for more information on using the CancelAuditTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelAuditTaskRequest method. -// req, resp := client.CancelAuditTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CancelAuditTaskRequest(input *CancelAuditTaskInput) (req *request.Request, output *CancelAuditTaskOutput) { - op := &request.Operation{ - Name: opCancelAuditTask, - HTTPMethod: "PUT", - HTTPPath: "/audit/tasks/{taskId}/cancel", - } - - if input == nil { - input = &CancelAuditTaskInput{} - } - - output = &CancelAuditTaskOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CancelAuditTask API operation for AWS IoT. -// -// Cancels an audit that is in progress. The audit can be either scheduled or -// on-demand. If the audit is not in progress, an "InvalidRequestException" -// occurs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CancelAuditTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) CancelAuditTask(input *CancelAuditTaskInput) (*CancelAuditTaskOutput, error) { - req, out := c.CancelAuditTaskRequest(input) - return out, req.Send() -} - -// CancelAuditTaskWithContext is the same as CancelAuditTask with the addition of -// the ability to pass a context and additional request options. -// -// See CancelAuditTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CancelAuditTaskWithContext(ctx aws.Context, input *CancelAuditTaskInput, opts ...request.Option) (*CancelAuditTaskOutput, error) { - req, out := c.CancelAuditTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelCertificateTransfer = "CancelCertificateTransfer" - -// CancelCertificateTransferRequest generates a "aws/request.Request" representing the -// client's request for the CancelCertificateTransfer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelCertificateTransfer for more information on using the CancelCertificateTransfer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelCertificateTransferRequest method. -// req, resp := client.CancelCertificateTransferRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CancelCertificateTransferRequest(input *CancelCertificateTransferInput) (req *request.Request, output *CancelCertificateTransferOutput) { - op := &request.Operation{ - Name: opCancelCertificateTransfer, - HTTPMethod: "PATCH", - HTTPPath: "/cancel-certificate-transfer/{certificateId}", - } - - if input == nil { - input = &CancelCertificateTransferInput{} - } - - output = &CancelCertificateTransferOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CancelCertificateTransfer API operation for AWS IoT. -// -// Cancels a pending transfer for the specified certificate. -// -// Note Only the transfer source account can use this operation to cancel a -// transfer. (Transfer destinations can use RejectCertificateTransfer instead.) -// After transfer, AWS IoT returns the certificate to the source account in -// the INACTIVE state. After the destination account has accepted the transfer, -// the transfer cannot be cancelled. -// -// After a certificate transfer is cancelled, the status of the certificate -// changes from PENDING_TRANSFER to INACTIVE. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CancelCertificateTransfer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeTransferAlreadyCompletedException "TransferAlreadyCompletedException" -// You can't revert the certificate transfer because the transfer is already -// complete. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) CancelCertificateTransfer(input *CancelCertificateTransferInput) (*CancelCertificateTransferOutput, error) { - req, out := c.CancelCertificateTransferRequest(input) - return out, req.Send() -} - -// CancelCertificateTransferWithContext is the same as CancelCertificateTransfer with the addition of -// the ability to pass a context and additional request options. -// -// See CancelCertificateTransfer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CancelCertificateTransferWithContext(ctx aws.Context, input *CancelCertificateTransferInput, opts ...request.Option) (*CancelCertificateTransferOutput, error) { - req, out := c.CancelCertificateTransferRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelJob = "CancelJob" - -// CancelJobRequest generates a "aws/request.Request" representing the -// client's request for the CancelJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelJob for more information on using the CancelJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelJobRequest method. -// req, resp := client.CancelJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CancelJobRequest(input *CancelJobInput) (req *request.Request, output *CancelJobOutput) { - op := &request.Operation{ - Name: opCancelJob, - HTTPMethod: "PUT", - HTTPPath: "/jobs/{jobId}/cancel", - } - - if input == nil { - input = &CancelJobInput{} - } - - output = &CancelJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelJob API operation for AWS IoT. -// -// Cancels a 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 IoT's -// API operation CancelJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) CancelJob(input *CancelJobInput) (*CancelJobOutput, error) { - req, out := c.CancelJobRequest(input) - return out, req.Send() -} - -// CancelJobWithContext is the same as CancelJob with the addition of -// the ability to pass a context and additional request options. -// -// See CancelJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CancelJobWithContext(ctx aws.Context, input *CancelJobInput, opts ...request.Option) (*CancelJobOutput, error) { - req, out := c.CancelJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelJobExecution = "CancelJobExecution" - -// CancelJobExecutionRequest generates a "aws/request.Request" representing the -// client's request for the CancelJobExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelJobExecution for more information on using the CancelJobExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelJobExecutionRequest method. -// req, resp := client.CancelJobExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CancelJobExecutionRequest(input *CancelJobExecutionInput) (req *request.Request, output *CancelJobExecutionOutput) { - op := &request.Operation{ - Name: opCancelJobExecution, - HTTPMethod: "PUT", - HTTPPath: "/things/{thingName}/jobs/{jobId}/cancel", - } - - if input == nil { - input = &CancelJobExecutionInput{} - } - - output = &CancelJobExecutionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CancelJobExecution API operation for AWS IoT. -// -// Cancels the execution of a job for a given thing. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CancelJobExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" -// An attempt was made to change to an invalid state, for example by deleting -// a job or a job execution which is "IN_PROGRESS" without setting the force -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of an entity specified with the expectedVersion -// parameter does not match the latest version in the system. -// -func (c *IoT) CancelJobExecution(input *CancelJobExecutionInput) (*CancelJobExecutionOutput, error) { - req, out := c.CancelJobExecutionRequest(input) - return out, req.Send() -} - -// CancelJobExecutionWithContext is the same as CancelJobExecution with the addition of -// the ability to pass a context and additional request options. -// -// See CancelJobExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CancelJobExecutionWithContext(ctx aws.Context, input *CancelJobExecutionInput, opts ...request.Option) (*CancelJobExecutionOutput, error) { - req, out := c.CancelJobExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opClearDefaultAuthorizer = "ClearDefaultAuthorizer" - -// ClearDefaultAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the ClearDefaultAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ClearDefaultAuthorizer for more information on using the ClearDefaultAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ClearDefaultAuthorizerRequest method. -// req, resp := client.ClearDefaultAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ClearDefaultAuthorizerRequest(input *ClearDefaultAuthorizerInput) (req *request.Request, output *ClearDefaultAuthorizerOutput) { - op := &request.Operation{ - Name: opClearDefaultAuthorizer, - HTTPMethod: "DELETE", - HTTPPath: "/default-authorizer", - } - - if input == nil { - input = &ClearDefaultAuthorizerInput{} - } - - output = &ClearDefaultAuthorizerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ClearDefaultAuthorizer API operation for AWS IoT. -// -// Clears the default authorizer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ClearDefaultAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ClearDefaultAuthorizer(input *ClearDefaultAuthorizerInput) (*ClearDefaultAuthorizerOutput, error) { - req, out := c.ClearDefaultAuthorizerRequest(input) - return out, req.Send() -} - -// ClearDefaultAuthorizerWithContext is the same as ClearDefaultAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See ClearDefaultAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ClearDefaultAuthorizerWithContext(ctx aws.Context, input *ClearDefaultAuthorizerInput, opts ...request.Option) (*ClearDefaultAuthorizerOutput, error) { - req, out := c.ClearDefaultAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAuthorizer = "CreateAuthorizer" - -// CreateAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the CreateAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAuthorizer for more information on using the CreateAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAuthorizerRequest method. -// req, resp := client.CreateAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateAuthorizerRequest(input *CreateAuthorizerInput) (req *request.Request, output *CreateAuthorizerOutput) { - op := &request.Operation{ - Name: opCreateAuthorizer, - HTTPMethod: "POST", - HTTPPath: "/authorizer/{authorizerName}", - } - - if input == nil { - input = &CreateAuthorizerInput{} - } - - output = &CreateAuthorizerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAuthorizer API operation for AWS IoT. -// -// Creates an authorizer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CreateAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) CreateAuthorizer(input *CreateAuthorizerInput) (*CreateAuthorizerOutput, error) { - req, out := c.CreateAuthorizerRequest(input) - return out, req.Send() -} - -// CreateAuthorizerWithContext is the same as CreateAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateAuthorizerWithContext(ctx aws.Context, input *CreateAuthorizerInput, opts ...request.Option) (*CreateAuthorizerOutput, error) { - req, out := c.CreateAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateBillingGroup = "CreateBillingGroup" - -// CreateBillingGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateBillingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateBillingGroup for more information on using the CreateBillingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateBillingGroupRequest method. -// req, resp := client.CreateBillingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateBillingGroupRequest(input *CreateBillingGroupInput) (req *request.Request, output *CreateBillingGroupOutput) { - op := &request.Operation{ - Name: opCreateBillingGroup, - HTTPMethod: "POST", - HTTPPath: "/billing-groups/{billingGroupName}", - } - - if input == nil { - input = &CreateBillingGroupInput{} - } - - output = &CreateBillingGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateBillingGroup API operation for AWS IoT. -// -// Creates a billing 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 IoT's -// API operation CreateBillingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) CreateBillingGroup(input *CreateBillingGroupInput) (*CreateBillingGroupOutput, error) { - req, out := c.CreateBillingGroupRequest(input) - return out, req.Send() -} - -// CreateBillingGroupWithContext is the same as CreateBillingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateBillingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateBillingGroupWithContext(ctx aws.Context, input *CreateBillingGroupInput, opts ...request.Option) (*CreateBillingGroupOutput, error) { - req, out := c.CreateBillingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCertificateFromCsr = "CreateCertificateFromCsr" - -// CreateCertificateFromCsrRequest generates a "aws/request.Request" representing the -// client's request for the CreateCertificateFromCsr operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCertificateFromCsr for more information on using the CreateCertificateFromCsr -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCertificateFromCsrRequest method. -// req, resp := client.CreateCertificateFromCsrRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateCertificateFromCsrRequest(input *CreateCertificateFromCsrInput) (req *request.Request, output *CreateCertificateFromCsrOutput) { - op := &request.Operation{ - Name: opCreateCertificateFromCsr, - HTTPMethod: "POST", - HTTPPath: "/certificates", - } - - if input == nil { - input = &CreateCertificateFromCsrInput{} - } - - output = &CreateCertificateFromCsrOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCertificateFromCsr API operation for AWS IoT. -// -// Creates an X.509 certificate using the specified certificate signing request. -// -// Note: The CSR must include a public key that is either an RSA key with a -// length of at least 2048 bits or an ECC key from NIST P-256 or NIST P-384 -// curves. -// -// Note: Reusing the same certificate signing request (CSR) results in a distinct -// certificate. -// -// You can create multiple certificates in a batch by creating a directory, -// copying multiple .csr files into that directory, and then specifying that -// directory on the command line. The following commands show how to create -// a batch of certificates given a batch of CSRs. -// -// Assuming a set of CSRs are located inside of the directory my-csr-directory: -// -// On Linux and OS X, the command is: -// -// $ ls my-csr-directory/ | xargs -I {} aws iot create-certificate-from-csr -// --certificate-signing-request file://my-csr-directory/{} -// -// This command lists all of the CSRs in my-csr-directory and pipes each CSR -// file name to the aws iot create-certificate-from-csr AWS CLI command to create -// a certificate for the corresponding CSR. -// -// The aws iot create-certificate-from-csr part of the command can also be run -// in parallel to speed up the certificate creation process: -// -// $ ls my-csr-directory/ | xargs -P 10 -I {} aws iot create-certificate-from-csr -// --certificate-signing-request file://my-csr-directory/{} -// -// On Windows PowerShell, the command to create certificates for all CSRs in -// my-csr-directory is: -// -// > ls -Name my-csr-directory | %{aws iot create-certificate-from-csr --certificate-signing-request -// file://my-csr-directory/$_} -// -// On a Windows command prompt, the command to create certificates for all CSRs -// in my-csr-directory is: -// -// > forfiles /p my-csr-directory /c "cmd /c aws iot create-certificate-from-csr -// --certificate-signing-request file://@path" -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CreateCertificateFromCsr for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) CreateCertificateFromCsr(input *CreateCertificateFromCsrInput) (*CreateCertificateFromCsrOutput, error) { - req, out := c.CreateCertificateFromCsrRequest(input) - return out, req.Send() -} - -// CreateCertificateFromCsrWithContext is the same as CreateCertificateFromCsr with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCertificateFromCsr for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateCertificateFromCsrWithContext(ctx aws.Context, input *CreateCertificateFromCsrInput, opts ...request.Option) (*CreateCertificateFromCsrOutput, error) { - req, out := c.CreateCertificateFromCsrRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDynamicThingGroup = "CreateDynamicThingGroup" - -// CreateDynamicThingGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateDynamicThingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDynamicThingGroup for more information on using the CreateDynamicThingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDynamicThingGroupRequest method. -// req, resp := client.CreateDynamicThingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateDynamicThingGroupRequest(input *CreateDynamicThingGroupInput) (req *request.Request, output *CreateDynamicThingGroupOutput) { - op := &request.Operation{ - Name: opCreateDynamicThingGroup, - HTTPMethod: "POST", - HTTPPath: "/dynamic-thing-groups/{thingGroupName}", - } - - if input == nil { - input = &CreateDynamicThingGroupInput{} - } - - output = &CreateDynamicThingGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDynamicThingGroup API operation for AWS IoT. -// -// Creates a dynamic thing 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 IoT's -// API operation CreateDynamicThingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidQueryException "InvalidQueryException" -// The query is invalid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -func (c *IoT) CreateDynamicThingGroup(input *CreateDynamicThingGroupInput) (*CreateDynamicThingGroupOutput, error) { - req, out := c.CreateDynamicThingGroupRequest(input) - return out, req.Send() -} - -// CreateDynamicThingGroupWithContext is the same as CreateDynamicThingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDynamicThingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateDynamicThingGroupWithContext(ctx aws.Context, input *CreateDynamicThingGroupInput, opts ...request.Option) (*CreateDynamicThingGroupOutput, error) { - req, out := c.CreateDynamicThingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateJob = "CreateJob" - -// CreateJobRequest generates a "aws/request.Request" representing the -// client's request for the CreateJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateJob for more information on using the CreateJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateJobRequest method. -// req, resp := client.CreateJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateJobRequest(input *CreateJobInput) (req *request.Request, output *CreateJobOutput) { - op := &request.Operation{ - Name: opCreateJob, - HTTPMethod: "PUT", - HTTPPath: "/jobs/{jobId}", - } - - if input == nil { - input = &CreateJobInput{} - } - - output = &CreateJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateJob API operation for AWS IoT. -// -// Creates a 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 IoT's -// API operation CreateJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) CreateJob(input *CreateJobInput) (*CreateJobOutput, error) { - req, out := c.CreateJobRequest(input) - return out, req.Send() -} - -// CreateJobWithContext is the same as CreateJob with the addition of -// the ability to pass a context and additional request options. -// -// See CreateJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateJobWithContext(ctx aws.Context, input *CreateJobInput, opts ...request.Option) (*CreateJobOutput, error) { - req, out := c.CreateJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateKeysAndCertificate = "CreateKeysAndCertificate" - -// CreateKeysAndCertificateRequest generates a "aws/request.Request" representing the -// client's request for the CreateKeysAndCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateKeysAndCertificate for more information on using the CreateKeysAndCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateKeysAndCertificateRequest method. -// req, resp := client.CreateKeysAndCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateKeysAndCertificateRequest(input *CreateKeysAndCertificateInput) (req *request.Request, output *CreateKeysAndCertificateOutput) { - op := &request.Operation{ - Name: opCreateKeysAndCertificate, - HTTPMethod: "POST", - HTTPPath: "/keys-and-certificate", - } - - if input == nil { - input = &CreateKeysAndCertificateInput{} - } - - output = &CreateKeysAndCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateKeysAndCertificate API operation for AWS IoT. -// -// Creates a 2048-bit RSA key pair and issues an X.509 certificate using the -// issued public key. -// -// Note This is the only time AWS IoT issues the private key for this certificate, -// so it is important to keep it in a secure location. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CreateKeysAndCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) CreateKeysAndCertificate(input *CreateKeysAndCertificateInput) (*CreateKeysAndCertificateOutput, error) { - req, out := c.CreateKeysAndCertificateRequest(input) - return out, req.Send() -} - -// CreateKeysAndCertificateWithContext is the same as CreateKeysAndCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See CreateKeysAndCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateKeysAndCertificateWithContext(ctx aws.Context, input *CreateKeysAndCertificateInput, opts ...request.Option) (*CreateKeysAndCertificateOutput, error) { - req, out := c.CreateKeysAndCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateOTAUpdate = "CreateOTAUpdate" - -// CreateOTAUpdateRequest generates a "aws/request.Request" representing the -// client's request for the CreateOTAUpdate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateOTAUpdate for more information on using the CreateOTAUpdate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateOTAUpdateRequest method. -// req, resp := client.CreateOTAUpdateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateOTAUpdateRequest(input *CreateOTAUpdateInput) (req *request.Request, output *CreateOTAUpdateOutput) { - op := &request.Operation{ - Name: opCreateOTAUpdate, - HTTPMethod: "POST", - HTTPPath: "/otaUpdates/{otaUpdateId}", - } - - if input == nil { - input = &CreateOTAUpdateInput{} - } - - output = &CreateOTAUpdateOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateOTAUpdate API operation for AWS IoT. -// -// Creates an AWS IoT OTAUpdate on a target group of things or 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 IoT's -// API operation CreateOTAUpdate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) CreateOTAUpdate(input *CreateOTAUpdateInput) (*CreateOTAUpdateOutput, error) { - req, out := c.CreateOTAUpdateRequest(input) - return out, req.Send() -} - -// CreateOTAUpdateWithContext is the same as CreateOTAUpdate with the addition of -// the ability to pass a context and additional request options. -// -// See CreateOTAUpdate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateOTAUpdateWithContext(ctx aws.Context, input *CreateOTAUpdateInput, opts ...request.Option) (*CreateOTAUpdateOutput, error) { - req, out := c.CreateOTAUpdateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePolicy = "CreatePolicy" - -// CreatePolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreatePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePolicy for more information on using the CreatePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePolicyRequest method. -// req, resp := client.CreatePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreatePolicyRequest(input *CreatePolicyInput) (req *request.Request, output *CreatePolicyOutput) { - op := &request.Operation{ - Name: opCreatePolicy, - HTTPMethod: "POST", - HTTPPath: "/policies/{policyName}", - } - - if input == nil { - input = &CreatePolicyInput{} - } - - output = &CreatePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePolicy API operation for AWS IoT. -// -// Creates an AWS IoT policy. -// -// The created policy is the default version for the policy. This operation -// creates a policy version with a version identifier of 1 and sets 1 as the -// policy's default 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 IoT's -// API operation CreatePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeMalformedPolicyException "MalformedPolicyException" -// The policy documentation is not valid. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) CreatePolicy(input *CreatePolicyInput) (*CreatePolicyOutput, error) { - req, out := c.CreatePolicyRequest(input) - return out, req.Send() -} - -// CreatePolicyWithContext is the same as CreatePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreatePolicyWithContext(ctx aws.Context, input *CreatePolicyInput, opts ...request.Option) (*CreatePolicyOutput, error) { - req, out := c.CreatePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePolicyVersion = "CreatePolicyVersion" - -// CreatePolicyVersionRequest generates a "aws/request.Request" representing the -// client's request for the CreatePolicyVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePolicyVersion for more information on using the CreatePolicyVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePolicyVersionRequest method. -// req, resp := client.CreatePolicyVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreatePolicyVersionRequest(input *CreatePolicyVersionInput) (req *request.Request, output *CreatePolicyVersionOutput) { - op := &request.Operation{ - Name: opCreatePolicyVersion, - HTTPMethod: "POST", - HTTPPath: "/policies/{policyName}/version", - } - - if input == nil { - input = &CreatePolicyVersionInput{} - } - - output = &CreatePolicyVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePolicyVersion API operation for AWS IoT. -// -// Creates a new version of the specified AWS IoT policy. To update a policy, -// create a new policy version. A managed policy can have up to five versions. -// If the policy has five versions, you must use DeletePolicyVersion to delete -// an existing version before you create a new one. -// -// Optionally, you can set the new version as the policy's default version. -// The default version is the operative version (that is, the version that is -// in effect for the certificates to which the policy is attached). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CreatePolicyVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeMalformedPolicyException "MalformedPolicyException" -// The policy documentation is not valid. -// -// * ErrCodeVersionsLimitExceededException "VersionsLimitExceededException" -// The number of policy versions exceeds the limit. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) CreatePolicyVersion(input *CreatePolicyVersionInput) (*CreatePolicyVersionOutput, error) { - req, out := c.CreatePolicyVersionRequest(input) - return out, req.Send() -} - -// CreatePolicyVersionWithContext is the same as CreatePolicyVersion with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePolicyVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreatePolicyVersionWithContext(ctx aws.Context, input *CreatePolicyVersionInput, opts ...request.Option) (*CreatePolicyVersionOutput, error) { - req, out := c.CreatePolicyVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRoleAlias = "CreateRoleAlias" - -// CreateRoleAliasRequest generates a "aws/request.Request" representing the -// client's request for the CreateRoleAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRoleAlias for more information on using the CreateRoleAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRoleAliasRequest method. -// req, resp := client.CreateRoleAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateRoleAliasRequest(input *CreateRoleAliasInput) (req *request.Request, output *CreateRoleAliasOutput) { - op := &request.Operation{ - Name: opCreateRoleAlias, - HTTPMethod: "POST", - HTTPPath: "/role-aliases/{roleAlias}", - } - - if input == nil { - input = &CreateRoleAliasInput{} - } - - output = &CreateRoleAliasOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRoleAlias API operation for AWS IoT. -// -// Creates a role alias. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CreateRoleAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) CreateRoleAlias(input *CreateRoleAliasInput) (*CreateRoleAliasOutput, error) { - req, out := c.CreateRoleAliasRequest(input) - return out, req.Send() -} - -// CreateRoleAliasWithContext is the same as CreateRoleAlias with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRoleAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateRoleAliasWithContext(ctx aws.Context, input *CreateRoleAliasInput, opts ...request.Option) (*CreateRoleAliasOutput, error) { - req, out := c.CreateRoleAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateScheduledAudit = "CreateScheduledAudit" - -// CreateScheduledAuditRequest generates a "aws/request.Request" representing the -// client's request for the CreateScheduledAudit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateScheduledAudit for more information on using the CreateScheduledAudit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateScheduledAuditRequest method. -// req, resp := client.CreateScheduledAuditRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateScheduledAuditRequest(input *CreateScheduledAuditInput) (req *request.Request, output *CreateScheduledAuditOutput) { - op := &request.Operation{ - Name: opCreateScheduledAudit, - HTTPMethod: "POST", - HTTPPath: "/audit/scheduledaudits/{scheduledAuditName}", - } - - if input == nil { - input = &CreateScheduledAuditInput{} - } - - output = &CreateScheduledAuditOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateScheduledAudit API operation for AWS IoT. -// -// Creates a scheduled audit that is run at a specified time interval. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CreateScheduledAudit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -func (c *IoT) CreateScheduledAudit(input *CreateScheduledAuditInput) (*CreateScheduledAuditOutput, error) { - req, out := c.CreateScheduledAuditRequest(input) - return out, req.Send() -} - -// CreateScheduledAuditWithContext is the same as CreateScheduledAudit with the addition of -// the ability to pass a context and additional request options. -// -// See CreateScheduledAudit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateScheduledAuditWithContext(ctx aws.Context, input *CreateScheduledAuditInput, opts ...request.Option) (*CreateScheduledAuditOutput, error) { - req, out := c.CreateScheduledAuditRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSecurityProfile = "CreateSecurityProfile" - -// CreateSecurityProfileRequest generates a "aws/request.Request" representing the -// client's request for the CreateSecurityProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSecurityProfile for more information on using the CreateSecurityProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSecurityProfileRequest method. -// req, resp := client.CreateSecurityProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateSecurityProfileRequest(input *CreateSecurityProfileInput) (req *request.Request, output *CreateSecurityProfileOutput) { - op := &request.Operation{ - Name: opCreateSecurityProfile, - HTTPMethod: "POST", - HTTPPath: "/security-profiles/{securityProfileName}", - } - - if input == nil { - input = &CreateSecurityProfileInput{} - } - - output = &CreateSecurityProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSecurityProfile API operation for AWS IoT. -// -// Creates a Device Defender security profile. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CreateSecurityProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) CreateSecurityProfile(input *CreateSecurityProfileInput) (*CreateSecurityProfileOutput, error) { - req, out := c.CreateSecurityProfileRequest(input) - return out, req.Send() -} - -// CreateSecurityProfileWithContext is the same as CreateSecurityProfile with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSecurityProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateSecurityProfileWithContext(ctx aws.Context, input *CreateSecurityProfileInput, opts ...request.Option) (*CreateSecurityProfileOutput, error) { - req, out := c.CreateSecurityProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStream = "CreateStream" - -// CreateStreamRequest generates a "aws/request.Request" representing the -// client's request for the CreateStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateStream for more information on using the CreateStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateStreamRequest method. -// req, resp := client.CreateStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateStreamRequest(input *CreateStreamInput) (req *request.Request, output *CreateStreamOutput) { - op := &request.Operation{ - Name: opCreateStream, - HTTPMethod: "POST", - HTTPPath: "/streams/{streamId}", - } - - if input == nil { - input = &CreateStreamInput{} - } - - output = &CreateStreamOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateStream API operation for AWS IoT. -// -// Creates a stream for delivering one or more large files in chunks over MQTT. -// A stream transports data bytes in chunks or blocks packaged as MQTT messages -// from a source like S3. You can have one or more files associated with a stream. -// The total size of a file associated with the stream cannot exceed more than -// 2 MB. The stream will be created with version 0. If a stream is created with -// the same streamID as a stream that existed and was deleted within last 90 -// days, we will resurrect that old stream by incrementing the version by 1. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CreateStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) CreateStream(input *CreateStreamInput) (*CreateStreamOutput, error) { - req, out := c.CreateStreamRequest(input) - return out, req.Send() -} - -// CreateStreamWithContext is the same as CreateStream with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateStreamWithContext(ctx aws.Context, input *CreateStreamInput, opts ...request.Option) (*CreateStreamOutput, error) { - req, out := c.CreateStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateThing = "CreateThing" - -// CreateThingRequest generates a "aws/request.Request" representing the -// client's request for the CreateThing operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateThing for more information on using the CreateThing -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateThingRequest method. -// req, resp := client.CreateThingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateThingRequest(input *CreateThingInput) (req *request.Request, output *CreateThingOutput) { - op := &request.Operation{ - Name: opCreateThing, - HTTPMethod: "POST", - HTTPPath: "/things/{thingName}", - } - - if input == nil { - input = &CreateThingInput{} - } - - output = &CreateThingOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateThing API operation for AWS IoT. -// -// Creates a thing record in the registry. -// -// This is a control plane operation. See Authorization (http://docs.aws.amazon.com/iot/latest/developerguide/authorization.html) -// for information about authorizing control plane actions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CreateThing for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) CreateThing(input *CreateThingInput) (*CreateThingOutput, error) { - req, out := c.CreateThingRequest(input) - return out, req.Send() -} - -// CreateThingWithContext is the same as CreateThing with the addition of -// the ability to pass a context and additional request options. -// -// See CreateThing for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateThingWithContext(ctx aws.Context, input *CreateThingInput, opts ...request.Option) (*CreateThingOutput, error) { - req, out := c.CreateThingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateThingGroup = "CreateThingGroup" - -// CreateThingGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateThingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateThingGroup for more information on using the CreateThingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateThingGroupRequest method. -// req, resp := client.CreateThingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateThingGroupRequest(input *CreateThingGroupInput) (req *request.Request, output *CreateThingGroupOutput) { - op := &request.Operation{ - Name: opCreateThingGroup, - HTTPMethod: "POST", - HTTPPath: "/thing-groups/{thingGroupName}", - } - - if input == nil { - input = &CreateThingGroupInput{} - } - - output = &CreateThingGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateThingGroup API operation for AWS IoT. -// -// Create a thing group. -// -// This is a control plane operation. See Authorization (http://docs.aws.amazon.com/iot/latest/developerguide/authorization.html) -// for information about authorizing control plane actions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CreateThingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) CreateThingGroup(input *CreateThingGroupInput) (*CreateThingGroupOutput, error) { - req, out := c.CreateThingGroupRequest(input) - return out, req.Send() -} - -// CreateThingGroupWithContext is the same as CreateThingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateThingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateThingGroupWithContext(ctx aws.Context, input *CreateThingGroupInput, opts ...request.Option) (*CreateThingGroupOutput, error) { - req, out := c.CreateThingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateThingType = "CreateThingType" - -// CreateThingTypeRequest generates a "aws/request.Request" representing the -// client's request for the CreateThingType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateThingType for more information on using the CreateThingType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateThingTypeRequest method. -// req, resp := client.CreateThingTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateThingTypeRequest(input *CreateThingTypeInput) (req *request.Request, output *CreateThingTypeOutput) { - op := &request.Operation{ - Name: opCreateThingType, - HTTPMethod: "POST", - HTTPPath: "/thing-types/{thingTypeName}", - } - - if input == nil { - input = &CreateThingTypeInput{} - } - - output = &CreateThingTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateThingType API operation for AWS IoT. -// -// Creates a new thing type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CreateThingType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -func (c *IoT) CreateThingType(input *CreateThingTypeInput) (*CreateThingTypeOutput, error) { - req, out := c.CreateThingTypeRequest(input) - return out, req.Send() -} - -// CreateThingTypeWithContext is the same as CreateThingType with the addition of -// the ability to pass a context and additional request options. -// -// See CreateThingType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateThingTypeWithContext(ctx aws.Context, input *CreateThingTypeInput, opts ...request.Option) (*CreateThingTypeOutput, error) { - req, out := c.CreateThingTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTopicRule = "CreateTopicRule" - -// CreateTopicRuleRequest generates a "aws/request.Request" representing the -// client's request for the CreateTopicRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTopicRule for more information on using the CreateTopicRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTopicRuleRequest method. -// req, resp := client.CreateTopicRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) CreateTopicRuleRequest(input *CreateTopicRuleInput) (req *request.Request, output *CreateTopicRuleOutput) { - op := &request.Operation{ - Name: opCreateTopicRule, - HTTPMethod: "POST", - HTTPPath: "/rules/{ruleName}", - } - - if input == nil { - input = &CreateTopicRuleInput{} - } - - output = &CreateTopicRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateTopicRule API operation for AWS IoT. -// -// Creates a rule. Creating rules is an administrator-level action. Any user -// who has permission to create rules will be able to access data processed -// by the rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation CreateTopicRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSqlParseException "SqlParseException" -// The Rule-SQL expression can't be parsed correctly. -// -// * ErrCodeInternalException "InternalException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeConflictingResourceUpdateException "ConflictingResourceUpdateException" -// A conflicting resource update exception. This exception is thrown when two -// pending updates cause a conflict. -// -func (c *IoT) CreateTopicRule(input *CreateTopicRuleInput) (*CreateTopicRuleOutput, error) { - req, out := c.CreateTopicRuleRequest(input) - return out, req.Send() -} - -// CreateTopicRuleWithContext is the same as CreateTopicRule with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTopicRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) CreateTopicRuleWithContext(ctx aws.Context, input *CreateTopicRuleInput, opts ...request.Option) (*CreateTopicRuleOutput, error) { - req, out := c.CreateTopicRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAccountAuditConfiguration = "DeleteAccountAuditConfiguration" - -// DeleteAccountAuditConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAccountAuditConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAccountAuditConfiguration for more information on using the DeleteAccountAuditConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAccountAuditConfigurationRequest method. -// req, resp := client.DeleteAccountAuditConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteAccountAuditConfigurationRequest(input *DeleteAccountAuditConfigurationInput) (req *request.Request, output *DeleteAccountAuditConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteAccountAuditConfiguration, - HTTPMethod: "DELETE", - HTTPPath: "/audit/configuration", - } - - if input == nil { - input = &DeleteAccountAuditConfigurationInput{} - } - - output = &DeleteAccountAuditConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAccountAuditConfiguration API operation for AWS IoT. -// -// Restores the default settings for Device Defender audits for this account. -// Any configuration data you entered is deleted and all audit checks are reset -// to disabled. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteAccountAuditConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DeleteAccountAuditConfiguration(input *DeleteAccountAuditConfigurationInput) (*DeleteAccountAuditConfigurationOutput, error) { - req, out := c.DeleteAccountAuditConfigurationRequest(input) - return out, req.Send() -} - -// DeleteAccountAuditConfigurationWithContext is the same as DeleteAccountAuditConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAccountAuditConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteAccountAuditConfigurationWithContext(ctx aws.Context, input *DeleteAccountAuditConfigurationInput, opts ...request.Option) (*DeleteAccountAuditConfigurationOutput, error) { - req, out := c.DeleteAccountAuditConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAuthorizer = "DeleteAuthorizer" - -// DeleteAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAuthorizer for more information on using the DeleteAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAuthorizerRequest method. -// req, resp := client.DeleteAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteAuthorizerRequest(input *DeleteAuthorizerInput) (req *request.Request, output *DeleteAuthorizerOutput) { - op := &request.Operation{ - Name: opDeleteAuthorizer, - HTTPMethod: "DELETE", - HTTPPath: "/authorizer/{authorizerName}", - } - - if input == nil { - input = &DeleteAuthorizerInput{} - } - - output = &DeleteAuthorizerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAuthorizer API operation for AWS IoT. -// -// Deletes an authorizer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDeleteConflictException "DeleteConflictException" -// You can't delete the resource because it is attached to one or more resources. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DeleteAuthorizer(input *DeleteAuthorizerInput) (*DeleteAuthorizerOutput, error) { - req, out := c.DeleteAuthorizerRequest(input) - return out, req.Send() -} - -// DeleteAuthorizerWithContext is the same as DeleteAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteAuthorizerWithContext(ctx aws.Context, input *DeleteAuthorizerInput, opts ...request.Option) (*DeleteAuthorizerOutput, error) { - req, out := c.DeleteAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBillingGroup = "DeleteBillingGroup" - -// DeleteBillingGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBillingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBillingGroup for more information on using the DeleteBillingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBillingGroupRequest method. -// req, resp := client.DeleteBillingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteBillingGroupRequest(input *DeleteBillingGroupInput) (req *request.Request, output *DeleteBillingGroupOutput) { - op := &request.Operation{ - Name: opDeleteBillingGroup, - HTTPMethod: "DELETE", - HTTPPath: "/billing-groups/{billingGroupName}", - } - - if input == nil { - input = &DeleteBillingGroupInput{} - } - - output = &DeleteBillingGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBillingGroup API operation for AWS IoT. -// -// Deletes the billing 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 IoT's -// API operation DeleteBillingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of an entity specified with the expectedVersion -// parameter does not match the latest version in the system. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DeleteBillingGroup(input *DeleteBillingGroupInput) (*DeleteBillingGroupOutput, error) { - req, out := c.DeleteBillingGroupRequest(input) - return out, req.Send() -} - -// DeleteBillingGroupWithContext is the same as DeleteBillingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBillingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteBillingGroupWithContext(ctx aws.Context, input *DeleteBillingGroupInput, opts ...request.Option) (*DeleteBillingGroupOutput, error) { - req, out := c.DeleteBillingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCACertificate = "DeleteCACertificate" - -// DeleteCACertificateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCACertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCACertificate for more information on using the DeleteCACertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCACertificateRequest method. -// req, resp := client.DeleteCACertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteCACertificateRequest(input *DeleteCACertificateInput) (req *request.Request, output *DeleteCACertificateOutput) { - op := &request.Operation{ - Name: opDeleteCACertificate, - HTTPMethod: "DELETE", - HTTPPath: "/cacertificate/{caCertificateId}", - } - - if input == nil { - input = &DeleteCACertificateInput{} - } - - output = &DeleteCACertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCACertificate API operation for AWS IoT. -// -// Deletes a registered CA certificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteCACertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeCertificateStateException "CertificateStateException" -// The certificate operation is not allowed. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) DeleteCACertificate(input *DeleteCACertificateInput) (*DeleteCACertificateOutput, error) { - req, out := c.DeleteCACertificateRequest(input) - return out, req.Send() -} - -// DeleteCACertificateWithContext is the same as DeleteCACertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCACertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteCACertificateWithContext(ctx aws.Context, input *DeleteCACertificateInput, opts ...request.Option) (*DeleteCACertificateOutput, error) { - req, out := c.DeleteCACertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCertificate = "DeleteCertificate" - -// DeleteCertificateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCertificate for more information on using the DeleteCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCertificateRequest method. -// req, resp := client.DeleteCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteCertificateRequest(input *DeleteCertificateInput) (req *request.Request, output *DeleteCertificateOutput) { - op := &request.Operation{ - Name: opDeleteCertificate, - HTTPMethod: "DELETE", - HTTPPath: "/certificates/{certificateId}", - } - - if input == nil { - input = &DeleteCertificateInput{} - } - - output = &DeleteCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCertificate API operation for AWS IoT. -// -// Deletes the specified certificate. -// -// A certificate cannot be deleted if it has a policy attached to it or if its -// status is set to ACTIVE. To delete a certificate, first use the DetachPrincipalPolicy -// API to detach all policies. Next, use the UpdateCertificate API to set the -// certificate to the INACTIVE 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 IoT's -// API operation DeleteCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCertificateStateException "CertificateStateException" -// The certificate operation is not allowed. -// -// * ErrCodeDeleteConflictException "DeleteConflictException" -// You can't delete the resource because it is attached to one or more resources. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) DeleteCertificate(input *DeleteCertificateInput) (*DeleteCertificateOutput, error) { - req, out := c.DeleteCertificateRequest(input) - return out, req.Send() -} - -// DeleteCertificateWithContext is the same as DeleteCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteCertificateWithContext(ctx aws.Context, input *DeleteCertificateInput, opts ...request.Option) (*DeleteCertificateOutput, error) { - req, out := c.DeleteCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDynamicThingGroup = "DeleteDynamicThingGroup" - -// DeleteDynamicThingGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDynamicThingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDynamicThingGroup for more information on using the DeleteDynamicThingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDynamicThingGroupRequest method. -// req, resp := client.DeleteDynamicThingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteDynamicThingGroupRequest(input *DeleteDynamicThingGroupInput) (req *request.Request, output *DeleteDynamicThingGroupOutput) { - op := &request.Operation{ - Name: opDeleteDynamicThingGroup, - HTTPMethod: "DELETE", - HTTPPath: "/dynamic-thing-groups/{thingGroupName}", - } - - if input == nil { - input = &DeleteDynamicThingGroupInput{} - } - - output = &DeleteDynamicThingGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDynamicThingGroup API operation for AWS IoT. -// -// Deletes a dynamic thing 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 IoT's -// API operation DeleteDynamicThingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of an entity specified with the expectedVersion -// parameter does not match the latest version in the system. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DeleteDynamicThingGroup(input *DeleteDynamicThingGroupInput) (*DeleteDynamicThingGroupOutput, error) { - req, out := c.DeleteDynamicThingGroupRequest(input) - return out, req.Send() -} - -// DeleteDynamicThingGroupWithContext is the same as DeleteDynamicThingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDynamicThingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteDynamicThingGroupWithContext(ctx aws.Context, input *DeleteDynamicThingGroupInput, opts ...request.Option) (*DeleteDynamicThingGroupOutput, error) { - req, out := c.DeleteDynamicThingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteJob = "DeleteJob" - -// DeleteJobRequest generates a "aws/request.Request" representing the -// client's request for the DeleteJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteJob for more information on using the DeleteJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteJobRequest method. -// req, resp := client.DeleteJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteJobRequest(input *DeleteJobInput) (req *request.Request, output *DeleteJobOutput) { - op := &request.Operation{ - Name: opDeleteJob, - HTTPMethod: "DELETE", - HTTPPath: "/jobs/{jobId}", - } - - if input == nil { - input = &DeleteJobInput{} - } - - output = &DeleteJobOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteJob API operation for AWS IoT. -// -// Deletes a job and its related job executions. -// -// Deleting a job may take time, depending on the number of job executions created -// for the job and various other factors. While the job is being deleted, the -// status of the job will be shown as "DELETION_IN_PROGRESS". Attempting to -// delete or cancel a job whose status is already "DELETION_IN_PROGRESS" will -// result in an error. -// -// Only 10 jobs may have status "DELETION_IN_PROGRESS" at the same time, or -// a LimitExceededException will occur. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" -// An attempt was made to change to an invalid state, for example by deleting -// a job or a job execution which is "IN_PROGRESS" without setting the force -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) DeleteJob(input *DeleteJobInput) (*DeleteJobOutput, error) { - req, out := c.DeleteJobRequest(input) - return out, req.Send() -} - -// DeleteJobWithContext is the same as DeleteJob with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteJobWithContext(ctx aws.Context, input *DeleteJobInput, opts ...request.Option) (*DeleteJobOutput, error) { - req, out := c.DeleteJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteJobExecution = "DeleteJobExecution" - -// DeleteJobExecutionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteJobExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteJobExecution for more information on using the DeleteJobExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteJobExecutionRequest method. -// req, resp := client.DeleteJobExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteJobExecutionRequest(input *DeleteJobExecutionInput) (req *request.Request, output *DeleteJobExecutionOutput) { - op := &request.Operation{ - Name: opDeleteJobExecution, - HTTPMethod: "DELETE", - HTTPPath: "/things/{thingName}/jobs/{jobId}/executionNumber/{executionNumber}", - } - - if input == nil { - input = &DeleteJobExecutionInput{} - } - - output = &DeleteJobExecutionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteJobExecution API operation for AWS IoT. -// -// Deletes a job execution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteJobExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" -// An attempt was made to change to an invalid state, for example by deleting -// a job or a job execution which is "IN_PROGRESS" without setting the force -// parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) DeleteJobExecution(input *DeleteJobExecutionInput) (*DeleteJobExecutionOutput, error) { - req, out := c.DeleteJobExecutionRequest(input) - return out, req.Send() -} - -// DeleteJobExecutionWithContext is the same as DeleteJobExecution with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteJobExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteJobExecutionWithContext(ctx aws.Context, input *DeleteJobExecutionInput, opts ...request.Option) (*DeleteJobExecutionOutput, error) { - req, out := c.DeleteJobExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteOTAUpdate = "DeleteOTAUpdate" - -// DeleteOTAUpdateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteOTAUpdate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteOTAUpdate for more information on using the DeleteOTAUpdate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteOTAUpdateRequest method. -// req, resp := client.DeleteOTAUpdateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteOTAUpdateRequest(input *DeleteOTAUpdateInput) (req *request.Request, output *DeleteOTAUpdateOutput) { - op := &request.Operation{ - Name: opDeleteOTAUpdate, - HTTPMethod: "DELETE", - HTTPPath: "/otaUpdates/{otaUpdateId}", - } - - if input == nil { - input = &DeleteOTAUpdateInput{} - } - - output = &DeleteOTAUpdateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteOTAUpdate API operation for AWS IoT. -// -// Delete an OTA update. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteOTAUpdate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of an entity specified with the expectedVersion -// parameter does not match the latest version in the system. -// -func (c *IoT) DeleteOTAUpdate(input *DeleteOTAUpdateInput) (*DeleteOTAUpdateOutput, error) { - req, out := c.DeleteOTAUpdateRequest(input) - return out, req.Send() -} - -// DeleteOTAUpdateWithContext is the same as DeleteOTAUpdate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteOTAUpdate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteOTAUpdateWithContext(ctx aws.Context, input *DeleteOTAUpdateInput, opts ...request.Option) (*DeleteOTAUpdateOutput, error) { - req, out := c.DeleteOTAUpdateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePolicy = "DeletePolicy" - -// DeletePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeletePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePolicy for more information on using the DeletePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePolicyRequest method. -// req, resp := client.DeletePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) { - op := &request.Operation{ - Name: opDeletePolicy, - HTTPMethod: "DELETE", - HTTPPath: "/policies/{policyName}", - } - - if input == nil { - input = &DeletePolicyInput{} - } - - output = &DeletePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePolicy API operation for AWS IoT. -// -// Deletes the specified policy. -// -// A policy cannot be deleted if it has non-default versions or it is attached -// to any certificate. -// -// To delete a policy, use the DeletePolicyVersion API to delete all non-default -// versions of the policy; use the DetachPrincipalPolicy API to detach the policy -// from any certificate; and then use the DeletePolicy API to delete the policy. -// -// When a policy is deleted using DeletePolicy, its default version is deleted -// with it. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeletePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDeleteConflictException "DeleteConflictException" -// You can't delete the resource because it is attached to one or more resources. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) { - req, out := c.DeletePolicyRequest(input) - return out, req.Send() -} - -// DeletePolicyWithContext is the same as DeletePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) { - req, out := c.DeletePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePolicyVersion = "DeletePolicyVersion" - -// DeletePolicyVersionRequest generates a "aws/request.Request" representing the -// client's request for the DeletePolicyVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePolicyVersion for more information on using the DeletePolicyVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePolicyVersionRequest method. -// req, resp := client.DeletePolicyVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeletePolicyVersionRequest(input *DeletePolicyVersionInput) (req *request.Request, output *DeletePolicyVersionOutput) { - op := &request.Operation{ - Name: opDeletePolicyVersion, - HTTPMethod: "DELETE", - HTTPPath: "/policies/{policyName}/version/{policyVersionId}", - } - - if input == nil { - input = &DeletePolicyVersionInput{} - } - - output = &DeletePolicyVersionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePolicyVersion API operation for AWS IoT. -// -// Deletes the specified version of the specified policy. You cannot delete -// the default version of a policy using this API. To delete the default version -// of a policy, use DeletePolicy. To find out which version of a policy is marked -// as the default version, use ListPolicyVersions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeletePolicyVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDeleteConflictException "DeleteConflictException" -// You can't delete the resource because it is attached to one or more resources. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DeletePolicyVersion(input *DeletePolicyVersionInput) (*DeletePolicyVersionOutput, error) { - req, out := c.DeletePolicyVersionRequest(input) - return out, req.Send() -} - -// DeletePolicyVersionWithContext is the same as DeletePolicyVersion with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePolicyVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeletePolicyVersionWithContext(ctx aws.Context, input *DeletePolicyVersionInput, opts ...request.Option) (*DeletePolicyVersionOutput, error) { - req, out := c.DeletePolicyVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRegistrationCode = "DeleteRegistrationCode" - -// DeleteRegistrationCodeRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRegistrationCode operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRegistrationCode for more information on using the DeleteRegistrationCode -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRegistrationCodeRequest method. -// req, resp := client.DeleteRegistrationCodeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteRegistrationCodeRequest(input *DeleteRegistrationCodeInput) (req *request.Request, output *DeleteRegistrationCodeOutput) { - op := &request.Operation{ - Name: opDeleteRegistrationCode, - HTTPMethod: "DELETE", - HTTPPath: "/registrationcode", - } - - if input == nil { - input = &DeleteRegistrationCodeInput{} - } - - output = &DeleteRegistrationCodeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRegistrationCode API operation for AWS IoT. -// -// Deletes a CA certificate registration code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteRegistrationCode for usage and error information. -// -// Returned Error Codes: -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DeleteRegistrationCode(input *DeleteRegistrationCodeInput) (*DeleteRegistrationCodeOutput, error) { - req, out := c.DeleteRegistrationCodeRequest(input) - return out, req.Send() -} - -// DeleteRegistrationCodeWithContext is the same as DeleteRegistrationCode with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRegistrationCode for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteRegistrationCodeWithContext(ctx aws.Context, input *DeleteRegistrationCodeInput, opts ...request.Option) (*DeleteRegistrationCodeOutput, error) { - req, out := c.DeleteRegistrationCodeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRoleAlias = "DeleteRoleAlias" - -// DeleteRoleAliasRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRoleAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRoleAlias for more information on using the DeleteRoleAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRoleAliasRequest method. -// req, resp := client.DeleteRoleAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteRoleAliasRequest(input *DeleteRoleAliasInput) (req *request.Request, output *DeleteRoleAliasOutput) { - op := &request.Operation{ - Name: opDeleteRoleAlias, - HTTPMethod: "DELETE", - HTTPPath: "/role-aliases/{roleAlias}", - } - - if input == nil { - input = &DeleteRoleAliasInput{} - } - - output = &DeleteRoleAliasOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRoleAlias API operation for AWS IoT. -// -// Deletes a role alias -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteRoleAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDeleteConflictException "DeleteConflictException" -// You can't delete the resource because it is attached to one or more resources. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) DeleteRoleAlias(input *DeleteRoleAliasInput) (*DeleteRoleAliasOutput, error) { - req, out := c.DeleteRoleAliasRequest(input) - return out, req.Send() -} - -// DeleteRoleAliasWithContext is the same as DeleteRoleAlias with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRoleAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteRoleAliasWithContext(ctx aws.Context, input *DeleteRoleAliasInput, opts ...request.Option) (*DeleteRoleAliasOutput, error) { - req, out := c.DeleteRoleAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteScheduledAudit = "DeleteScheduledAudit" - -// DeleteScheduledAuditRequest generates a "aws/request.Request" representing the -// client's request for the DeleteScheduledAudit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteScheduledAudit for more information on using the DeleteScheduledAudit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteScheduledAuditRequest method. -// req, resp := client.DeleteScheduledAuditRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteScheduledAuditRequest(input *DeleteScheduledAuditInput) (req *request.Request, output *DeleteScheduledAuditOutput) { - op := &request.Operation{ - Name: opDeleteScheduledAudit, - HTTPMethod: "DELETE", - HTTPPath: "/audit/scheduledaudits/{scheduledAuditName}", - } - - if input == nil { - input = &DeleteScheduledAuditInput{} - } - - output = &DeleteScheduledAuditOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteScheduledAudit API operation for AWS IoT. -// -// Deletes a scheduled audit. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteScheduledAudit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DeleteScheduledAudit(input *DeleteScheduledAuditInput) (*DeleteScheduledAuditOutput, error) { - req, out := c.DeleteScheduledAuditRequest(input) - return out, req.Send() -} - -// DeleteScheduledAuditWithContext is the same as DeleteScheduledAudit with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteScheduledAudit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteScheduledAuditWithContext(ctx aws.Context, input *DeleteScheduledAuditInput, opts ...request.Option) (*DeleteScheduledAuditOutput, error) { - req, out := c.DeleteScheduledAuditRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSecurityProfile = "DeleteSecurityProfile" - -// DeleteSecurityProfileRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSecurityProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSecurityProfile for more information on using the DeleteSecurityProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSecurityProfileRequest method. -// req, resp := client.DeleteSecurityProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteSecurityProfileRequest(input *DeleteSecurityProfileInput) (req *request.Request, output *DeleteSecurityProfileOutput) { - op := &request.Operation{ - Name: opDeleteSecurityProfile, - HTTPMethod: "DELETE", - HTTPPath: "/security-profiles/{securityProfileName}", - } - - if input == nil { - input = &DeleteSecurityProfileInput{} - } - - output = &DeleteSecurityProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSecurityProfile API operation for AWS IoT. -// -// Deletes a Device Defender security profile. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteSecurityProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of an entity specified with the expectedVersion -// parameter does not match the latest version in the system. -// -func (c *IoT) DeleteSecurityProfile(input *DeleteSecurityProfileInput) (*DeleteSecurityProfileOutput, error) { - req, out := c.DeleteSecurityProfileRequest(input) - return out, req.Send() -} - -// DeleteSecurityProfileWithContext is the same as DeleteSecurityProfile with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSecurityProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteSecurityProfileWithContext(ctx aws.Context, input *DeleteSecurityProfileInput, opts ...request.Option) (*DeleteSecurityProfileOutput, error) { - req, out := c.DeleteSecurityProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteStream = "DeleteStream" - -// DeleteStreamRequest generates a "aws/request.Request" representing the -// client's request for the DeleteStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteStream for more information on using the DeleteStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteStreamRequest method. -// req, resp := client.DeleteStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteStreamRequest(input *DeleteStreamInput) (req *request.Request, output *DeleteStreamOutput) { - op := &request.Operation{ - Name: opDeleteStream, - HTTPMethod: "DELETE", - HTTPPath: "/streams/{streamId}", - } - - if input == nil { - input = &DeleteStreamInput{} - } - - output = &DeleteStreamOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteStream API operation for AWS IoT. -// -// Deletes a stream. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeDeleteConflictException "DeleteConflictException" -// You can't delete the resource because it is attached to one or more resources. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DeleteStream(input *DeleteStreamInput) (*DeleteStreamOutput, error) { - req, out := c.DeleteStreamRequest(input) - return out, req.Send() -} - -// DeleteStreamWithContext is the same as DeleteStream with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteStreamWithContext(ctx aws.Context, input *DeleteStreamInput, opts ...request.Option) (*DeleteStreamOutput, error) { - req, out := c.DeleteStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteThing = "DeleteThing" - -// DeleteThingRequest generates a "aws/request.Request" representing the -// client's request for the DeleteThing operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteThing for more information on using the DeleteThing -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteThingRequest method. -// req, resp := client.DeleteThingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteThingRequest(input *DeleteThingInput) (req *request.Request, output *DeleteThingOutput) { - op := &request.Operation{ - Name: opDeleteThing, - HTTPMethod: "DELETE", - HTTPPath: "/things/{thingName}", - } - - if input == nil { - input = &DeleteThingInput{} - } - - output = &DeleteThingOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteThing API operation for AWS IoT. -// -// Deletes the specified thing. Returns successfully with no error if the deletion -// is successful or you specify a thing that doesn't exist. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteThing for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of an entity specified with the expectedVersion -// parameter does not match the latest version in the system. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DeleteThing(input *DeleteThingInput) (*DeleteThingOutput, error) { - req, out := c.DeleteThingRequest(input) - return out, req.Send() -} - -// DeleteThingWithContext is the same as DeleteThing with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteThing for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteThingWithContext(ctx aws.Context, input *DeleteThingInput, opts ...request.Option) (*DeleteThingOutput, error) { - req, out := c.DeleteThingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteThingGroup = "DeleteThingGroup" - -// DeleteThingGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteThingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteThingGroup for more information on using the DeleteThingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteThingGroupRequest method. -// req, resp := client.DeleteThingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteThingGroupRequest(input *DeleteThingGroupInput) (req *request.Request, output *DeleteThingGroupOutput) { - op := &request.Operation{ - Name: opDeleteThingGroup, - HTTPMethod: "DELETE", - HTTPPath: "/thing-groups/{thingGroupName}", - } - - if input == nil { - input = &DeleteThingGroupInput{} - } - - output = &DeleteThingGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteThingGroup API operation for AWS IoT. -// -// Deletes a thing 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 IoT's -// API operation DeleteThingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of an entity specified with the expectedVersion -// parameter does not match the latest version in the system. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DeleteThingGroup(input *DeleteThingGroupInput) (*DeleteThingGroupOutput, error) { - req, out := c.DeleteThingGroupRequest(input) - return out, req.Send() -} - -// DeleteThingGroupWithContext is the same as DeleteThingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteThingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteThingGroupWithContext(ctx aws.Context, input *DeleteThingGroupInput, opts ...request.Option) (*DeleteThingGroupOutput, error) { - req, out := c.DeleteThingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteThingType = "DeleteThingType" - -// DeleteThingTypeRequest generates a "aws/request.Request" representing the -// client's request for the DeleteThingType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteThingType for more information on using the DeleteThingType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteThingTypeRequest method. -// req, resp := client.DeleteThingTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteThingTypeRequest(input *DeleteThingTypeInput) (req *request.Request, output *DeleteThingTypeOutput) { - op := &request.Operation{ - Name: opDeleteThingType, - HTTPMethod: "DELETE", - HTTPPath: "/thing-types/{thingTypeName}", - } - - if input == nil { - input = &DeleteThingTypeInput{} - } - - output = &DeleteThingTypeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteThingType API operation for AWS IoT. -// -// Deletes the specified thing type. You cannot delete a thing type if it has -// things associated with it. To delete a thing type, first mark it as deprecated -// by calling DeprecateThingType, then remove any associated things by calling -// UpdateThing to change the thing type on any associated thing, and finally -// use DeleteThingType to delete the thing type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteThingType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DeleteThingType(input *DeleteThingTypeInput) (*DeleteThingTypeOutput, error) { - req, out := c.DeleteThingTypeRequest(input) - return out, req.Send() -} - -// DeleteThingTypeWithContext is the same as DeleteThingType with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteThingType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteThingTypeWithContext(ctx aws.Context, input *DeleteThingTypeInput, opts ...request.Option) (*DeleteThingTypeOutput, error) { - req, out := c.DeleteThingTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTopicRule = "DeleteTopicRule" - -// DeleteTopicRuleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTopicRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTopicRule for more information on using the DeleteTopicRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTopicRuleRequest method. -// req, resp := client.DeleteTopicRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteTopicRuleRequest(input *DeleteTopicRuleInput) (req *request.Request, output *DeleteTopicRuleOutput) { - op := &request.Operation{ - Name: opDeleteTopicRule, - HTTPMethod: "DELETE", - HTTPPath: "/rules/{ruleName}", - } - - if input == nil { - input = &DeleteTopicRuleInput{} - } - - output = &DeleteTopicRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTopicRule API operation for AWS IoT. -// -// Deletes the rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteTopicRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeConflictingResourceUpdateException "ConflictingResourceUpdateException" -// A conflicting resource update exception. This exception is thrown when two -// pending updates cause a conflict. -// -func (c *IoT) DeleteTopicRule(input *DeleteTopicRuleInput) (*DeleteTopicRuleOutput, error) { - req, out := c.DeleteTopicRuleRequest(input) - return out, req.Send() -} - -// DeleteTopicRuleWithContext is the same as DeleteTopicRule with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTopicRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteTopicRuleWithContext(ctx aws.Context, input *DeleteTopicRuleInput, opts ...request.Option) (*DeleteTopicRuleOutput, error) { - req, out := c.DeleteTopicRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteV2LoggingLevel = "DeleteV2LoggingLevel" - -// DeleteV2LoggingLevelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteV2LoggingLevel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteV2LoggingLevel for more information on using the DeleteV2LoggingLevel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteV2LoggingLevelRequest method. -// req, resp := client.DeleteV2LoggingLevelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeleteV2LoggingLevelRequest(input *DeleteV2LoggingLevelInput) (req *request.Request, output *DeleteV2LoggingLevelOutput) { - op := &request.Operation{ - Name: opDeleteV2LoggingLevel, - HTTPMethod: "DELETE", - HTTPPath: "/v2LoggingLevel", - } - - if input == nil { - input = &DeleteV2LoggingLevelInput{} - } - - output = &DeleteV2LoggingLevelOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteV2LoggingLevel API operation for AWS IoT. -// -// Deletes a logging level. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeleteV2LoggingLevel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) DeleteV2LoggingLevel(input *DeleteV2LoggingLevelInput) (*DeleteV2LoggingLevelOutput, error) { - req, out := c.DeleteV2LoggingLevelRequest(input) - return out, req.Send() -} - -// DeleteV2LoggingLevelWithContext is the same as DeleteV2LoggingLevel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteV2LoggingLevel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeleteV2LoggingLevelWithContext(ctx aws.Context, input *DeleteV2LoggingLevelInput, opts ...request.Option) (*DeleteV2LoggingLevelOutput, error) { - req, out := c.DeleteV2LoggingLevelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeprecateThingType = "DeprecateThingType" - -// DeprecateThingTypeRequest generates a "aws/request.Request" representing the -// client's request for the DeprecateThingType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeprecateThingType for more information on using the DeprecateThingType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeprecateThingTypeRequest method. -// req, resp := client.DeprecateThingTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DeprecateThingTypeRequest(input *DeprecateThingTypeInput) (req *request.Request, output *DeprecateThingTypeOutput) { - op := &request.Operation{ - Name: opDeprecateThingType, - HTTPMethod: "POST", - HTTPPath: "/thing-types/{thingTypeName}/deprecate", - } - - if input == nil { - input = &DeprecateThingTypeInput{} - } - - output = &DeprecateThingTypeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeprecateThingType API operation for AWS IoT. -// -// Deprecates a thing type. You can not associate new things with deprecated -// thing type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DeprecateThingType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DeprecateThingType(input *DeprecateThingTypeInput) (*DeprecateThingTypeOutput, error) { - req, out := c.DeprecateThingTypeRequest(input) - return out, req.Send() -} - -// DeprecateThingTypeWithContext is the same as DeprecateThingType with the addition of -// the ability to pass a context and additional request options. -// -// See DeprecateThingType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DeprecateThingTypeWithContext(ctx aws.Context, input *DeprecateThingTypeInput, opts ...request.Option) (*DeprecateThingTypeOutput, error) { - req, out := c.DeprecateThingTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccountAuditConfiguration = "DescribeAccountAuditConfiguration" - -// DescribeAccountAuditConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountAuditConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccountAuditConfiguration for more information on using the DescribeAccountAuditConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAccountAuditConfigurationRequest method. -// req, resp := client.DescribeAccountAuditConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeAccountAuditConfigurationRequest(input *DescribeAccountAuditConfigurationInput) (req *request.Request, output *DescribeAccountAuditConfigurationOutput) { - op := &request.Operation{ - Name: opDescribeAccountAuditConfiguration, - HTTPMethod: "GET", - HTTPPath: "/audit/configuration", - } - - if input == nil { - input = &DescribeAccountAuditConfigurationInput{} - } - - output = &DescribeAccountAuditConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccountAuditConfiguration API operation for AWS IoT. -// -// Gets information about the Device Defender audit settings for this account. -// Settings include how audit notifications are sent and which audit checks -// are enabled or disabled. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeAccountAuditConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DescribeAccountAuditConfiguration(input *DescribeAccountAuditConfigurationInput) (*DescribeAccountAuditConfigurationOutput, error) { - req, out := c.DescribeAccountAuditConfigurationRequest(input) - return out, req.Send() -} - -// DescribeAccountAuditConfigurationWithContext is the same as DescribeAccountAuditConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountAuditConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeAccountAuditConfigurationWithContext(ctx aws.Context, input *DescribeAccountAuditConfigurationInput, opts ...request.Option) (*DescribeAccountAuditConfigurationOutput, error) { - req, out := c.DescribeAccountAuditConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAuditTask = "DescribeAuditTask" - -// DescribeAuditTaskRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAuditTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAuditTask for more information on using the DescribeAuditTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAuditTaskRequest method. -// req, resp := client.DescribeAuditTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeAuditTaskRequest(input *DescribeAuditTaskInput) (req *request.Request, output *DescribeAuditTaskOutput) { - op := &request.Operation{ - Name: opDescribeAuditTask, - HTTPMethod: "GET", - HTTPPath: "/audit/tasks/{taskId}", - } - - if input == nil { - input = &DescribeAuditTaskInput{} - } - - output = &DescribeAuditTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAuditTask API operation for AWS IoT. -// -// Gets information about a Device Defender audit. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeAuditTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DescribeAuditTask(input *DescribeAuditTaskInput) (*DescribeAuditTaskOutput, error) { - req, out := c.DescribeAuditTaskRequest(input) - return out, req.Send() -} - -// DescribeAuditTaskWithContext is the same as DescribeAuditTask with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAuditTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeAuditTaskWithContext(ctx aws.Context, input *DescribeAuditTaskInput, opts ...request.Option) (*DescribeAuditTaskOutput, error) { - req, out := c.DescribeAuditTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAuthorizer = "DescribeAuthorizer" - -// DescribeAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAuthorizer for more information on using the DescribeAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAuthorizerRequest method. -// req, resp := client.DescribeAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeAuthorizerRequest(input *DescribeAuthorizerInput) (req *request.Request, output *DescribeAuthorizerOutput) { - op := &request.Operation{ - Name: opDescribeAuthorizer, - HTTPMethod: "GET", - HTTPPath: "/authorizer/{authorizerName}", - } - - if input == nil { - input = &DescribeAuthorizerInput{} - } - - output = &DescribeAuthorizerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAuthorizer API operation for AWS IoT. -// -// Describes an authorizer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DescribeAuthorizer(input *DescribeAuthorizerInput) (*DescribeAuthorizerOutput, error) { - req, out := c.DescribeAuthorizerRequest(input) - return out, req.Send() -} - -// DescribeAuthorizerWithContext is the same as DescribeAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeAuthorizerWithContext(ctx aws.Context, input *DescribeAuthorizerInput, opts ...request.Option) (*DescribeAuthorizerOutput, error) { - req, out := c.DescribeAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeBillingGroup = "DescribeBillingGroup" - -// DescribeBillingGroupRequest generates a "aws/request.Request" representing the -// client's request for the DescribeBillingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeBillingGroup for more information on using the DescribeBillingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeBillingGroupRequest method. -// req, resp := client.DescribeBillingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeBillingGroupRequest(input *DescribeBillingGroupInput) (req *request.Request, output *DescribeBillingGroupOutput) { - op := &request.Operation{ - Name: opDescribeBillingGroup, - HTTPMethod: "GET", - HTTPPath: "/billing-groups/{billingGroupName}", - } - - if input == nil { - input = &DescribeBillingGroupInput{} - } - - output = &DescribeBillingGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeBillingGroup API operation for AWS IoT. -// -// Returns information about a billing 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 IoT's -// API operation DescribeBillingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) DescribeBillingGroup(input *DescribeBillingGroupInput) (*DescribeBillingGroupOutput, error) { - req, out := c.DescribeBillingGroupRequest(input) - return out, req.Send() -} - -// DescribeBillingGroupWithContext is the same as DescribeBillingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeBillingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeBillingGroupWithContext(ctx aws.Context, input *DescribeBillingGroupInput, opts ...request.Option) (*DescribeBillingGroupOutput, error) { - req, out := c.DescribeBillingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCACertificate = "DescribeCACertificate" - -// DescribeCACertificateRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCACertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCACertificate for more information on using the DescribeCACertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCACertificateRequest method. -// req, resp := client.DescribeCACertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeCACertificateRequest(input *DescribeCACertificateInput) (req *request.Request, output *DescribeCACertificateOutput) { - op := &request.Operation{ - Name: opDescribeCACertificate, - HTTPMethod: "GET", - HTTPPath: "/cacertificate/{caCertificateId}", - } - - if input == nil { - input = &DescribeCACertificateInput{} - } - - output = &DescribeCACertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCACertificate API operation for AWS IoT. -// -// Describes a registered CA certificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeCACertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) DescribeCACertificate(input *DescribeCACertificateInput) (*DescribeCACertificateOutput, error) { - req, out := c.DescribeCACertificateRequest(input) - return out, req.Send() -} - -// DescribeCACertificateWithContext is the same as DescribeCACertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCACertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeCACertificateWithContext(ctx aws.Context, input *DescribeCACertificateInput, opts ...request.Option) (*DescribeCACertificateOutput, error) { - req, out := c.DescribeCACertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCertificate = "DescribeCertificate" - -// DescribeCertificateRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCertificate for more information on using the DescribeCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCertificateRequest method. -// req, resp := client.DescribeCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeCertificateRequest(input *DescribeCertificateInput) (req *request.Request, output *DescribeCertificateOutput) { - op := &request.Operation{ - Name: opDescribeCertificate, - HTTPMethod: "GET", - HTTPPath: "/certificates/{certificateId}", - } - - if input == nil { - input = &DescribeCertificateInput{} - } - - output = &DescribeCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCertificate API operation for AWS IoT. -// -// Gets information about the specified certificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) DescribeCertificate(input *DescribeCertificateInput) (*DescribeCertificateOutput, error) { - req, out := c.DescribeCertificateRequest(input) - return out, req.Send() -} - -// DescribeCertificateWithContext is the same as DescribeCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeCertificateWithContext(ctx aws.Context, input *DescribeCertificateInput, opts ...request.Option) (*DescribeCertificateOutput, error) { - req, out := c.DescribeCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDefaultAuthorizer = "DescribeDefaultAuthorizer" - -// DescribeDefaultAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDefaultAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDefaultAuthorizer for more information on using the DescribeDefaultAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDefaultAuthorizerRequest method. -// req, resp := client.DescribeDefaultAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeDefaultAuthorizerRequest(input *DescribeDefaultAuthorizerInput) (req *request.Request, output *DescribeDefaultAuthorizerOutput) { - op := &request.Operation{ - Name: opDescribeDefaultAuthorizer, - HTTPMethod: "GET", - HTTPPath: "/default-authorizer", - } - - if input == nil { - input = &DescribeDefaultAuthorizerInput{} - } - - output = &DescribeDefaultAuthorizerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDefaultAuthorizer API operation for AWS IoT. -// -// Describes the default authorizer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeDefaultAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DescribeDefaultAuthorizer(input *DescribeDefaultAuthorizerInput) (*DescribeDefaultAuthorizerOutput, error) { - req, out := c.DescribeDefaultAuthorizerRequest(input) - return out, req.Send() -} - -// DescribeDefaultAuthorizerWithContext is the same as DescribeDefaultAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDefaultAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeDefaultAuthorizerWithContext(ctx aws.Context, input *DescribeDefaultAuthorizerInput, opts ...request.Option) (*DescribeDefaultAuthorizerOutput, error) { - req, out := c.DescribeDefaultAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEndpoint = "DescribeEndpoint" - -// DescribeEndpointRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEndpoint for more information on using the DescribeEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEndpointRequest method. -// req, resp := client.DescribeEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeEndpointRequest(input *DescribeEndpointInput) (req *request.Request, output *DescribeEndpointOutput) { - op := &request.Operation{ - Name: opDescribeEndpoint, - HTTPMethod: "GET", - HTTPPath: "/endpoint", - } - - if input == nil { - input = &DescribeEndpointInput{} - } - - output = &DescribeEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEndpoint API operation for AWS IoT. -// -// Returns a unique endpoint specific to the AWS account making the call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -func (c *IoT) DescribeEndpoint(input *DescribeEndpointInput) (*DescribeEndpointOutput, error) { - req, out := c.DescribeEndpointRequest(input) - return out, req.Send() -} - -// DescribeEndpointWithContext is the same as DescribeEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeEndpointWithContext(ctx aws.Context, input *DescribeEndpointInput, opts ...request.Option) (*DescribeEndpointOutput, error) { - req, out := c.DescribeEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEventConfigurations = "DescribeEventConfigurations" - -// DescribeEventConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEventConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEventConfigurations for more information on using the DescribeEventConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventConfigurationsRequest method. -// req, resp := client.DescribeEventConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeEventConfigurationsRequest(input *DescribeEventConfigurationsInput) (req *request.Request, output *DescribeEventConfigurationsOutput) { - op := &request.Operation{ - Name: opDescribeEventConfigurations, - HTTPMethod: "GET", - HTTPPath: "/event-configurations", - } - - if input == nil { - input = &DescribeEventConfigurationsInput{} - } - - output = &DescribeEventConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEventConfigurations API operation for AWS IoT. -// -// Describes event 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 IoT's -// API operation DescribeEventConfigurations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -func (c *IoT) DescribeEventConfigurations(input *DescribeEventConfigurationsInput) (*DescribeEventConfigurationsOutput, error) { - req, out := c.DescribeEventConfigurationsRequest(input) - return out, req.Send() -} - -// DescribeEventConfigurationsWithContext is the same as DescribeEventConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEventConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeEventConfigurationsWithContext(ctx aws.Context, input *DescribeEventConfigurationsInput, opts ...request.Option) (*DescribeEventConfigurationsOutput, error) { - req, out := c.DescribeEventConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeIndex = "DescribeIndex" - -// DescribeIndexRequest generates a "aws/request.Request" representing the -// client's request for the DescribeIndex operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeIndex for more information on using the DescribeIndex -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeIndexRequest method. -// req, resp := client.DescribeIndexRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeIndexRequest(input *DescribeIndexInput) (req *request.Request, output *DescribeIndexOutput) { - op := &request.Operation{ - Name: opDescribeIndex, - HTTPMethod: "GET", - HTTPPath: "/indices/{indexName}", - } - - if input == nil { - input = &DescribeIndexInput{} - } - - output = &DescribeIndexOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeIndex API operation for AWS IoT. -// -// Describes a search index. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeIndex for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) DescribeIndex(input *DescribeIndexInput) (*DescribeIndexOutput, error) { - req, out := c.DescribeIndexRequest(input) - return out, req.Send() -} - -// DescribeIndexWithContext is the same as DescribeIndex with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeIndex for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeIndexWithContext(ctx aws.Context, input *DescribeIndexInput, opts ...request.Option) (*DescribeIndexOutput, error) { - req, out := c.DescribeIndexRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeJob = "DescribeJob" - -// DescribeJobRequest generates a "aws/request.Request" representing the -// client's request for the DescribeJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeJob for more information on using the DescribeJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeJobRequest method. -// req, resp := client.DescribeJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeJobRequest(input *DescribeJobInput) (req *request.Request, output *DescribeJobOutput) { - op := &request.Operation{ - Name: opDescribeJob, - HTTPMethod: "GET", - HTTPPath: "/jobs/{jobId}", - } - - if input == nil { - input = &DescribeJobInput{} - } - - output = &DescribeJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeJob API operation for AWS IoT. -// -// Describes a 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 IoT's -// API operation DescribeJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) DescribeJob(input *DescribeJobInput) (*DescribeJobOutput, error) { - req, out := c.DescribeJobRequest(input) - return out, req.Send() -} - -// DescribeJobWithContext is the same as DescribeJob with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeJobWithContext(ctx aws.Context, input *DescribeJobInput, opts ...request.Option) (*DescribeJobOutput, error) { - req, out := c.DescribeJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeJobExecution = "DescribeJobExecution" - -// DescribeJobExecutionRequest generates a "aws/request.Request" representing the -// client's request for the DescribeJobExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeJobExecution for more information on using the DescribeJobExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeJobExecutionRequest method. -// req, resp := client.DescribeJobExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeJobExecutionRequest(input *DescribeJobExecutionInput) (req *request.Request, output *DescribeJobExecutionOutput) { - op := &request.Operation{ - Name: opDescribeJobExecution, - HTTPMethod: "GET", - HTTPPath: "/things/{thingName}/jobs/{jobId}", - } - - if input == nil { - input = &DescribeJobExecutionInput{} - } - - output = &DescribeJobExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeJobExecution API operation for AWS IoT. -// -// Describes a job execution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeJobExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) DescribeJobExecution(input *DescribeJobExecutionInput) (*DescribeJobExecutionOutput, error) { - req, out := c.DescribeJobExecutionRequest(input) - return out, req.Send() -} - -// DescribeJobExecutionWithContext is the same as DescribeJobExecution with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeJobExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeJobExecutionWithContext(ctx aws.Context, input *DescribeJobExecutionInput, opts ...request.Option) (*DescribeJobExecutionOutput, error) { - req, out := c.DescribeJobExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeRoleAlias = "DescribeRoleAlias" - -// DescribeRoleAliasRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRoleAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRoleAlias for more information on using the DescribeRoleAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRoleAliasRequest method. -// req, resp := client.DescribeRoleAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeRoleAliasRequest(input *DescribeRoleAliasInput) (req *request.Request, output *DescribeRoleAliasOutput) { - op := &request.Operation{ - Name: opDescribeRoleAlias, - HTTPMethod: "GET", - HTTPPath: "/role-aliases/{roleAlias}", - } - - if input == nil { - input = &DescribeRoleAliasInput{} - } - - output = &DescribeRoleAliasOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRoleAlias API operation for AWS IoT. -// -// Describes a role alias. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeRoleAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) DescribeRoleAlias(input *DescribeRoleAliasInput) (*DescribeRoleAliasOutput, error) { - req, out := c.DescribeRoleAliasRequest(input) - return out, req.Send() -} - -// DescribeRoleAliasWithContext is the same as DescribeRoleAlias with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRoleAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeRoleAliasWithContext(ctx aws.Context, input *DescribeRoleAliasInput, opts ...request.Option) (*DescribeRoleAliasOutput, error) { - req, out := c.DescribeRoleAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeScheduledAudit = "DescribeScheduledAudit" - -// DescribeScheduledAuditRequest generates a "aws/request.Request" representing the -// client's request for the DescribeScheduledAudit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeScheduledAudit for more information on using the DescribeScheduledAudit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeScheduledAuditRequest method. -// req, resp := client.DescribeScheduledAuditRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeScheduledAuditRequest(input *DescribeScheduledAuditInput) (req *request.Request, output *DescribeScheduledAuditOutput) { - op := &request.Operation{ - Name: opDescribeScheduledAudit, - HTTPMethod: "GET", - HTTPPath: "/audit/scheduledaudits/{scheduledAuditName}", - } - - if input == nil { - input = &DescribeScheduledAuditInput{} - } - - output = &DescribeScheduledAuditOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeScheduledAudit API operation for AWS IoT. -// -// Gets information about a scheduled audit. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeScheduledAudit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DescribeScheduledAudit(input *DescribeScheduledAuditInput) (*DescribeScheduledAuditOutput, error) { - req, out := c.DescribeScheduledAuditRequest(input) - return out, req.Send() -} - -// DescribeScheduledAuditWithContext is the same as DescribeScheduledAudit with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeScheduledAudit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeScheduledAuditWithContext(ctx aws.Context, input *DescribeScheduledAuditInput, opts ...request.Option) (*DescribeScheduledAuditOutput, error) { - req, out := c.DescribeScheduledAuditRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSecurityProfile = "DescribeSecurityProfile" - -// DescribeSecurityProfileRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSecurityProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSecurityProfile for more information on using the DescribeSecurityProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSecurityProfileRequest method. -// req, resp := client.DescribeSecurityProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeSecurityProfileRequest(input *DescribeSecurityProfileInput) (req *request.Request, output *DescribeSecurityProfileOutput) { - op := &request.Operation{ - Name: opDescribeSecurityProfile, - HTTPMethod: "GET", - HTTPPath: "/security-profiles/{securityProfileName}", - } - - if input == nil { - input = &DescribeSecurityProfileInput{} - } - - output = &DescribeSecurityProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSecurityProfile API operation for AWS IoT. -// -// Gets information about a Device Defender security profile. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeSecurityProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DescribeSecurityProfile(input *DescribeSecurityProfileInput) (*DescribeSecurityProfileOutput, error) { - req, out := c.DescribeSecurityProfileRequest(input) - return out, req.Send() -} - -// DescribeSecurityProfileWithContext is the same as DescribeSecurityProfile with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSecurityProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeSecurityProfileWithContext(ctx aws.Context, input *DescribeSecurityProfileInput, opts ...request.Option) (*DescribeSecurityProfileOutput, error) { - req, out := c.DescribeSecurityProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStream = "DescribeStream" - -// DescribeStreamRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStream for more information on using the DescribeStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStreamRequest method. -// req, resp := client.DescribeStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeStreamRequest(input *DescribeStreamInput) (req *request.Request, output *DescribeStreamOutput) { - op := &request.Operation{ - Name: opDescribeStream, - HTTPMethod: "GET", - HTTPPath: "/streams/{streamId}", - } - - if input == nil { - input = &DescribeStreamInput{} - } - - output = &DescribeStreamOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStream API operation for AWS IoT. -// -// Gets information about a stream. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DescribeStream(input *DescribeStreamInput) (*DescribeStreamOutput, error) { - req, out := c.DescribeStreamRequest(input) - return out, req.Send() -} - -// DescribeStreamWithContext is the same as DescribeStream with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeStreamWithContext(ctx aws.Context, input *DescribeStreamInput, opts ...request.Option) (*DescribeStreamOutput, error) { - req, out := c.DescribeStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeThing = "DescribeThing" - -// DescribeThingRequest generates a "aws/request.Request" representing the -// client's request for the DescribeThing operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeThing for more information on using the DescribeThing -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeThingRequest method. -// req, resp := client.DescribeThingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeThingRequest(input *DescribeThingInput) (req *request.Request, output *DescribeThingOutput) { - op := &request.Operation{ - Name: opDescribeThing, - HTTPMethod: "GET", - HTTPPath: "/things/{thingName}", - } - - if input == nil { - input = &DescribeThingInput{} - } - - output = &DescribeThingOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeThing API operation for AWS IoT. -// -// Gets information about the specified thing. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeThing for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DescribeThing(input *DescribeThingInput) (*DescribeThingOutput, error) { - req, out := c.DescribeThingRequest(input) - return out, req.Send() -} - -// DescribeThingWithContext is the same as DescribeThing with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeThing for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeThingWithContext(ctx aws.Context, input *DescribeThingInput, opts ...request.Option) (*DescribeThingOutput, error) { - req, out := c.DescribeThingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeThingGroup = "DescribeThingGroup" - -// DescribeThingGroupRequest generates a "aws/request.Request" representing the -// client's request for the DescribeThingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeThingGroup for more information on using the DescribeThingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeThingGroupRequest method. -// req, resp := client.DescribeThingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeThingGroupRequest(input *DescribeThingGroupInput) (req *request.Request, output *DescribeThingGroupOutput) { - op := &request.Operation{ - Name: opDescribeThingGroup, - HTTPMethod: "GET", - HTTPPath: "/thing-groups/{thingGroupName}", - } - - if input == nil { - input = &DescribeThingGroupInput{} - } - - output = &DescribeThingGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeThingGroup API operation for AWS IoT. -// -// Describe a thing 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 IoT's -// API operation DescribeThingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) DescribeThingGroup(input *DescribeThingGroupInput) (*DescribeThingGroupOutput, error) { - req, out := c.DescribeThingGroupRequest(input) - return out, req.Send() -} - -// DescribeThingGroupWithContext is the same as DescribeThingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeThingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeThingGroupWithContext(ctx aws.Context, input *DescribeThingGroupInput, opts ...request.Option) (*DescribeThingGroupOutput, error) { - req, out := c.DescribeThingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeThingRegistrationTask = "DescribeThingRegistrationTask" - -// DescribeThingRegistrationTaskRequest generates a "aws/request.Request" representing the -// client's request for the DescribeThingRegistrationTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeThingRegistrationTask for more information on using the DescribeThingRegistrationTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeThingRegistrationTaskRequest method. -// req, resp := client.DescribeThingRegistrationTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeThingRegistrationTaskRequest(input *DescribeThingRegistrationTaskInput) (req *request.Request, output *DescribeThingRegistrationTaskOutput) { - op := &request.Operation{ - Name: opDescribeThingRegistrationTask, - HTTPMethod: "GET", - HTTPPath: "/thing-registration-tasks/{taskId}", - } - - if input == nil { - input = &DescribeThingRegistrationTaskInput{} - } - - output = &DescribeThingRegistrationTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeThingRegistrationTask API operation for AWS IoT. -// -// Describes a bulk thing provisioning task. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeThingRegistrationTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) DescribeThingRegistrationTask(input *DescribeThingRegistrationTaskInput) (*DescribeThingRegistrationTaskOutput, error) { - req, out := c.DescribeThingRegistrationTaskRequest(input) - return out, req.Send() -} - -// DescribeThingRegistrationTaskWithContext is the same as DescribeThingRegistrationTask with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeThingRegistrationTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeThingRegistrationTaskWithContext(ctx aws.Context, input *DescribeThingRegistrationTaskInput, opts ...request.Option) (*DescribeThingRegistrationTaskOutput, error) { - req, out := c.DescribeThingRegistrationTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeThingType = "DescribeThingType" - -// DescribeThingTypeRequest generates a "aws/request.Request" representing the -// client's request for the DescribeThingType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeThingType for more information on using the DescribeThingType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeThingTypeRequest method. -// req, resp := client.DescribeThingTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DescribeThingTypeRequest(input *DescribeThingTypeInput) (req *request.Request, output *DescribeThingTypeOutput) { - op := &request.Operation{ - Name: opDescribeThingType, - HTTPMethod: "GET", - HTTPPath: "/thing-types/{thingTypeName}", - } - - if input == nil { - input = &DescribeThingTypeInput{} - } - - output = &DescribeThingTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeThingType API operation for AWS IoT. -// -// Gets information about the specified thing type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DescribeThingType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DescribeThingType(input *DescribeThingTypeInput) (*DescribeThingTypeOutput, error) { - req, out := c.DescribeThingTypeRequest(input) - return out, req.Send() -} - -// DescribeThingTypeWithContext is the same as DescribeThingType with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeThingType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DescribeThingTypeWithContext(ctx aws.Context, input *DescribeThingTypeInput, opts ...request.Option) (*DescribeThingTypeOutput, error) { - req, out := c.DescribeThingTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachPolicy = "DetachPolicy" - -// DetachPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DetachPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachPolicy for more information on using the DetachPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachPolicyRequest method. -// req, resp := client.DetachPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DetachPolicyRequest(input *DetachPolicyInput) (req *request.Request, output *DetachPolicyOutput) { - op := &request.Operation{ - Name: opDetachPolicy, - HTTPMethod: "POST", - HTTPPath: "/target-policies/{policyName}", - } - - if input == nil { - input = &DetachPolicyInput{} - } - - output = &DetachPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachPolicy API operation for AWS IoT. -// -// Detaches a policy from the specified target. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DetachPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -func (c *IoT) DetachPolicy(input *DetachPolicyInput) (*DetachPolicyOutput, error) { - req, out := c.DetachPolicyRequest(input) - return out, req.Send() -} - -// DetachPolicyWithContext is the same as DetachPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DetachPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DetachPolicyWithContext(ctx aws.Context, input *DetachPolicyInput, opts ...request.Option) (*DetachPolicyOutput, error) { - req, out := c.DetachPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachPrincipalPolicy = "DetachPrincipalPolicy" - -// DetachPrincipalPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DetachPrincipalPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachPrincipalPolicy for more information on using the DetachPrincipalPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachPrincipalPolicyRequest method. -// req, resp := client.DetachPrincipalPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// Deprecated: DetachPrincipalPolicy has been deprecated -func (c *IoT) DetachPrincipalPolicyRequest(input *DetachPrincipalPolicyInput) (req *request.Request, output *DetachPrincipalPolicyOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, DetachPrincipalPolicy, has been deprecated") - } - op := &request.Operation{ - Name: opDetachPrincipalPolicy, - HTTPMethod: "DELETE", - HTTPPath: "/principal-policies/{policyName}", - } - - if input == nil { - input = &DetachPrincipalPolicyInput{} - } - - output = &DetachPrincipalPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachPrincipalPolicy API operation for AWS IoT. -// -// Removes the specified policy from the specified certificate. -// -// Note: This API is deprecated. Please use DetachPolicy instead. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DetachPrincipalPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// -// Deprecated: DetachPrincipalPolicy has been deprecated -func (c *IoT) DetachPrincipalPolicy(input *DetachPrincipalPolicyInput) (*DetachPrincipalPolicyOutput, error) { - req, out := c.DetachPrincipalPolicyRequest(input) - return out, req.Send() -} - -// DetachPrincipalPolicyWithContext is the same as DetachPrincipalPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DetachPrincipalPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: DetachPrincipalPolicyWithContext has been deprecated -func (c *IoT) DetachPrincipalPolicyWithContext(ctx aws.Context, input *DetachPrincipalPolicyInput, opts ...request.Option) (*DetachPrincipalPolicyOutput, error) { - req, out := c.DetachPrincipalPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachSecurityProfile = "DetachSecurityProfile" - -// DetachSecurityProfileRequest generates a "aws/request.Request" representing the -// client's request for the DetachSecurityProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachSecurityProfile for more information on using the DetachSecurityProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachSecurityProfileRequest method. -// req, resp := client.DetachSecurityProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DetachSecurityProfileRequest(input *DetachSecurityProfileInput) (req *request.Request, output *DetachSecurityProfileOutput) { - op := &request.Operation{ - Name: opDetachSecurityProfile, - HTTPMethod: "DELETE", - HTTPPath: "/security-profiles/{securityProfileName}/targets", - } - - if input == nil { - input = &DetachSecurityProfileInput{} - } - - output = &DetachSecurityProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachSecurityProfile API operation for AWS IoT. -// -// Disassociates a Device Defender security profile from a thing group or from -// this account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DetachSecurityProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DetachSecurityProfile(input *DetachSecurityProfileInput) (*DetachSecurityProfileOutput, error) { - req, out := c.DetachSecurityProfileRequest(input) - return out, req.Send() -} - -// DetachSecurityProfileWithContext is the same as DetachSecurityProfile with the addition of -// the ability to pass a context and additional request options. -// -// See DetachSecurityProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DetachSecurityProfileWithContext(ctx aws.Context, input *DetachSecurityProfileInput, opts ...request.Option) (*DetachSecurityProfileOutput, error) { - req, out := c.DetachSecurityProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachThingPrincipal = "DetachThingPrincipal" - -// DetachThingPrincipalRequest generates a "aws/request.Request" representing the -// client's request for the DetachThingPrincipal operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachThingPrincipal for more information on using the DetachThingPrincipal -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachThingPrincipalRequest method. -// req, resp := client.DetachThingPrincipalRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DetachThingPrincipalRequest(input *DetachThingPrincipalInput) (req *request.Request, output *DetachThingPrincipalOutput) { - op := &request.Operation{ - Name: opDetachThingPrincipal, - HTTPMethod: "DELETE", - HTTPPath: "/things/{thingName}/principals", - } - - if input == nil { - input = &DetachThingPrincipalInput{} - } - - output = &DetachThingPrincipalOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachThingPrincipal API operation for AWS IoT. -// -// Detaches the specified principal from the specified thing. -// -// This call is asynchronous. It might take several seconds for the detachment -// to propagate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DetachThingPrincipal for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) DetachThingPrincipal(input *DetachThingPrincipalInput) (*DetachThingPrincipalOutput, error) { - req, out := c.DetachThingPrincipalRequest(input) - return out, req.Send() -} - -// DetachThingPrincipalWithContext is the same as DetachThingPrincipal with the addition of -// the ability to pass a context and additional request options. -// -// See DetachThingPrincipal for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DetachThingPrincipalWithContext(ctx aws.Context, input *DetachThingPrincipalInput, opts ...request.Option) (*DetachThingPrincipalOutput, error) { - req, out := c.DetachThingPrincipalRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableTopicRule = "DisableTopicRule" - -// DisableTopicRuleRequest generates a "aws/request.Request" representing the -// client's request for the DisableTopicRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableTopicRule for more information on using the DisableTopicRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableTopicRuleRequest method. -// req, resp := client.DisableTopicRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) DisableTopicRuleRequest(input *DisableTopicRuleInput) (req *request.Request, output *DisableTopicRuleOutput) { - op := &request.Operation{ - Name: opDisableTopicRule, - HTTPMethod: "POST", - HTTPPath: "/rules/{ruleName}/disable", - } - - if input == nil { - input = &DisableTopicRuleInput{} - } - - output = &DisableTopicRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisableTopicRule API operation for AWS IoT. -// -// Disables the rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation DisableTopicRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeConflictingResourceUpdateException "ConflictingResourceUpdateException" -// A conflicting resource update exception. This exception is thrown when two -// pending updates cause a conflict. -// -func (c *IoT) DisableTopicRule(input *DisableTopicRuleInput) (*DisableTopicRuleOutput, error) { - req, out := c.DisableTopicRuleRequest(input) - return out, req.Send() -} - -// DisableTopicRuleWithContext is the same as DisableTopicRule with the addition of -// the ability to pass a context and additional request options. -// -// See DisableTopicRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) DisableTopicRuleWithContext(ctx aws.Context, input *DisableTopicRuleInput, opts ...request.Option) (*DisableTopicRuleOutput, error) { - req, out := c.DisableTopicRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableTopicRule = "EnableTopicRule" - -// EnableTopicRuleRequest generates a "aws/request.Request" representing the -// client's request for the EnableTopicRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableTopicRule for more information on using the EnableTopicRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableTopicRuleRequest method. -// req, resp := client.EnableTopicRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) EnableTopicRuleRequest(input *EnableTopicRuleInput) (req *request.Request, output *EnableTopicRuleOutput) { - op := &request.Operation{ - Name: opEnableTopicRule, - HTTPMethod: "POST", - HTTPPath: "/rules/{ruleName}/enable", - } - - if input == nil { - input = &EnableTopicRuleInput{} - } - - output = &EnableTopicRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableTopicRule API operation for AWS IoT. -// -// Enables the rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation EnableTopicRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeConflictingResourceUpdateException "ConflictingResourceUpdateException" -// A conflicting resource update exception. This exception is thrown when two -// pending updates cause a conflict. -// -func (c *IoT) EnableTopicRule(input *EnableTopicRuleInput) (*EnableTopicRuleOutput, error) { - req, out := c.EnableTopicRuleRequest(input) - return out, req.Send() -} - -// EnableTopicRuleWithContext is the same as EnableTopicRule with the addition of -// the ability to pass a context and additional request options. -// -// See EnableTopicRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) EnableTopicRuleWithContext(ctx aws.Context, input *EnableTopicRuleInput, opts ...request.Option) (*EnableTopicRuleOutput, error) { - req, out := c.EnableTopicRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetEffectivePolicies = "GetEffectivePolicies" - -// GetEffectivePoliciesRequest generates a "aws/request.Request" representing the -// client's request for the GetEffectivePolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetEffectivePolicies for more information on using the GetEffectivePolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetEffectivePoliciesRequest method. -// req, resp := client.GetEffectivePoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) GetEffectivePoliciesRequest(input *GetEffectivePoliciesInput) (req *request.Request, output *GetEffectivePoliciesOutput) { - op := &request.Operation{ - Name: opGetEffectivePolicies, - HTTPMethod: "POST", - HTTPPath: "/effective-policies", - } - - if input == nil { - input = &GetEffectivePoliciesInput{} - } - - output = &GetEffectivePoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetEffectivePolicies API operation for AWS IoT. -// -// Gets a list of the policies that have an effect on the authorization behavior -// of the specified device when it connects to the AWS IoT device gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation GetEffectivePolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -func (c *IoT) GetEffectivePolicies(input *GetEffectivePoliciesInput) (*GetEffectivePoliciesOutput, error) { - req, out := c.GetEffectivePoliciesRequest(input) - return out, req.Send() -} - -// GetEffectivePoliciesWithContext is the same as GetEffectivePolicies with the addition of -// the ability to pass a context and additional request options. -// -// See GetEffectivePolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) GetEffectivePoliciesWithContext(ctx aws.Context, input *GetEffectivePoliciesInput, opts ...request.Option) (*GetEffectivePoliciesOutput, error) { - req, out := c.GetEffectivePoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIndexingConfiguration = "GetIndexingConfiguration" - -// GetIndexingConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetIndexingConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIndexingConfiguration for more information on using the GetIndexingConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIndexingConfigurationRequest method. -// req, resp := client.GetIndexingConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) GetIndexingConfigurationRequest(input *GetIndexingConfigurationInput) (req *request.Request, output *GetIndexingConfigurationOutput) { - op := &request.Operation{ - Name: opGetIndexingConfiguration, - HTTPMethod: "GET", - HTTPPath: "/indexing/config", - } - - if input == nil { - input = &GetIndexingConfigurationInput{} - } - - output = &GetIndexingConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIndexingConfiguration API operation for AWS IoT. -// -// Gets the search configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation GetIndexingConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) GetIndexingConfiguration(input *GetIndexingConfigurationInput) (*GetIndexingConfigurationOutput, error) { - req, out := c.GetIndexingConfigurationRequest(input) - return out, req.Send() -} - -// GetIndexingConfigurationWithContext is the same as GetIndexingConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetIndexingConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) GetIndexingConfigurationWithContext(ctx aws.Context, input *GetIndexingConfigurationInput, opts ...request.Option) (*GetIndexingConfigurationOutput, error) { - req, out := c.GetIndexingConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetJobDocument = "GetJobDocument" - -// GetJobDocumentRequest generates a "aws/request.Request" representing the -// client's request for the GetJobDocument operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetJobDocument for more information on using the GetJobDocument -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetJobDocumentRequest method. -// req, resp := client.GetJobDocumentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) GetJobDocumentRequest(input *GetJobDocumentInput) (req *request.Request, output *GetJobDocumentOutput) { - op := &request.Operation{ - Name: opGetJobDocument, - HTTPMethod: "GET", - HTTPPath: "/jobs/{jobId}/job-document", - } - - if input == nil { - input = &GetJobDocumentInput{} - } - - output = &GetJobDocumentOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetJobDocument API operation for AWS IoT. -// -// Gets a job document. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation GetJobDocument for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) GetJobDocument(input *GetJobDocumentInput) (*GetJobDocumentOutput, error) { - req, out := c.GetJobDocumentRequest(input) - return out, req.Send() -} - -// GetJobDocumentWithContext is the same as GetJobDocument with the addition of -// the ability to pass a context and additional request options. -// -// See GetJobDocument for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) GetJobDocumentWithContext(ctx aws.Context, input *GetJobDocumentInput, opts ...request.Option) (*GetJobDocumentOutput, error) { - req, out := c.GetJobDocumentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLoggingOptions = "GetLoggingOptions" - -// GetLoggingOptionsRequest generates a "aws/request.Request" representing the -// client's request for the GetLoggingOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLoggingOptions for more information on using the GetLoggingOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLoggingOptionsRequest method. -// req, resp := client.GetLoggingOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) GetLoggingOptionsRequest(input *GetLoggingOptionsInput) (req *request.Request, output *GetLoggingOptionsOutput) { - op := &request.Operation{ - Name: opGetLoggingOptions, - HTTPMethod: "GET", - HTTPPath: "/loggingOptions", - } - - if input == nil { - input = &GetLoggingOptionsInput{} - } - - output = &GetLoggingOptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLoggingOptions API operation for AWS IoT. -// -// Gets the logging options. -// -// NOTE: use of this command is not recommended. Use GetV2LoggingOptions instead. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation GetLoggingOptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) GetLoggingOptions(input *GetLoggingOptionsInput) (*GetLoggingOptionsOutput, error) { - req, out := c.GetLoggingOptionsRequest(input) - return out, req.Send() -} - -// GetLoggingOptionsWithContext is the same as GetLoggingOptions with the addition of -// the ability to pass a context and additional request options. -// -// See GetLoggingOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) GetLoggingOptionsWithContext(ctx aws.Context, input *GetLoggingOptionsInput, opts ...request.Option) (*GetLoggingOptionsOutput, error) { - req, out := c.GetLoggingOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOTAUpdate = "GetOTAUpdate" - -// GetOTAUpdateRequest generates a "aws/request.Request" representing the -// client's request for the GetOTAUpdate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetOTAUpdate for more information on using the GetOTAUpdate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetOTAUpdateRequest method. -// req, resp := client.GetOTAUpdateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) GetOTAUpdateRequest(input *GetOTAUpdateInput) (req *request.Request, output *GetOTAUpdateOutput) { - op := &request.Operation{ - Name: opGetOTAUpdate, - HTTPMethod: "GET", - HTTPPath: "/otaUpdates/{otaUpdateId}", - } - - if input == nil { - input = &GetOTAUpdateInput{} - } - - output = &GetOTAUpdateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOTAUpdate API operation for AWS IoT. -// -// Gets an OTA update. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation GetOTAUpdate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) GetOTAUpdate(input *GetOTAUpdateInput) (*GetOTAUpdateOutput, error) { - req, out := c.GetOTAUpdateRequest(input) - return out, req.Send() -} - -// GetOTAUpdateWithContext is the same as GetOTAUpdate with the addition of -// the ability to pass a context and additional request options. -// -// See GetOTAUpdate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) GetOTAUpdateWithContext(ctx aws.Context, input *GetOTAUpdateInput, opts ...request.Option) (*GetOTAUpdateOutput, error) { - req, out := c.GetOTAUpdateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPolicy = "GetPolicy" - -// GetPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPolicy for more information on using the GetPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPolicyRequest method. -// req, resp := client.GetPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) { - op := &request.Operation{ - Name: opGetPolicy, - HTTPMethod: "GET", - HTTPPath: "/policies/{policyName}", - } - - if input == nil { - input = &GetPolicyInput{} - } - - output = &GetPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPolicy API operation for AWS IoT. -// -// Gets information about the specified policy with the policy document of the -// default 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 IoT's -// API operation GetPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) { - req, out := c.GetPolicyRequest(input) - return out, req.Send() -} - -// GetPolicyWithContext is the same as GetPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) { - req, out := c.GetPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPolicyVersion = "GetPolicyVersion" - -// GetPolicyVersionRequest generates a "aws/request.Request" representing the -// client's request for the GetPolicyVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPolicyVersion for more information on using the GetPolicyVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPolicyVersionRequest method. -// req, resp := client.GetPolicyVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) GetPolicyVersionRequest(input *GetPolicyVersionInput) (req *request.Request, output *GetPolicyVersionOutput) { - op := &request.Operation{ - Name: opGetPolicyVersion, - HTTPMethod: "GET", - HTTPPath: "/policies/{policyName}/version/{policyVersionId}", - } - - if input == nil { - input = &GetPolicyVersionInput{} - } - - output = &GetPolicyVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPolicyVersion API operation for AWS IoT. -// -// Gets information about the specified policy 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 IoT's -// API operation GetPolicyVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) GetPolicyVersion(input *GetPolicyVersionInput) (*GetPolicyVersionOutput, error) { - req, out := c.GetPolicyVersionRequest(input) - return out, req.Send() -} - -// GetPolicyVersionWithContext is the same as GetPolicyVersion with the addition of -// the ability to pass a context and additional request options. -// -// See GetPolicyVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) GetPolicyVersionWithContext(ctx aws.Context, input *GetPolicyVersionInput, opts ...request.Option) (*GetPolicyVersionOutput, error) { - req, out := c.GetPolicyVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRegistrationCode = "GetRegistrationCode" - -// GetRegistrationCodeRequest generates a "aws/request.Request" representing the -// client's request for the GetRegistrationCode operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRegistrationCode for more information on using the GetRegistrationCode -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRegistrationCodeRequest method. -// req, resp := client.GetRegistrationCodeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) GetRegistrationCodeRequest(input *GetRegistrationCodeInput) (req *request.Request, output *GetRegistrationCodeOutput) { - op := &request.Operation{ - Name: opGetRegistrationCode, - HTTPMethod: "GET", - HTTPPath: "/registrationcode", - } - - if input == nil { - input = &GetRegistrationCodeInput{} - } - - output = &GetRegistrationCodeOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRegistrationCode API operation for AWS IoT. -// -// Gets a registration code used to register a CA certificate with AWS IoT. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation GetRegistrationCode for usage and error information. -// -// Returned Error Codes: -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -func (c *IoT) GetRegistrationCode(input *GetRegistrationCodeInput) (*GetRegistrationCodeOutput, error) { - req, out := c.GetRegistrationCodeRequest(input) - return out, req.Send() -} - -// GetRegistrationCodeWithContext is the same as GetRegistrationCode with the addition of -// the ability to pass a context and additional request options. -// -// See GetRegistrationCode for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) GetRegistrationCodeWithContext(ctx aws.Context, input *GetRegistrationCodeInput, opts ...request.Option) (*GetRegistrationCodeOutput, error) { - req, out := c.GetRegistrationCodeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTopicRule = "GetTopicRule" - -// GetTopicRuleRequest generates a "aws/request.Request" representing the -// client's request for the GetTopicRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTopicRule for more information on using the GetTopicRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTopicRuleRequest method. -// req, resp := client.GetTopicRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) GetTopicRuleRequest(input *GetTopicRuleInput) (req *request.Request, output *GetTopicRuleOutput) { - op := &request.Operation{ - Name: opGetTopicRule, - HTTPMethod: "GET", - HTTPPath: "/rules/{ruleName}", - } - - if input == nil { - input = &GetTopicRuleInput{} - } - - output = &GetTopicRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTopicRule API operation for AWS IoT. -// -// Gets information about the rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation GetTopicRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -func (c *IoT) GetTopicRule(input *GetTopicRuleInput) (*GetTopicRuleOutput, error) { - req, out := c.GetTopicRuleRequest(input) - return out, req.Send() -} - -// GetTopicRuleWithContext is the same as GetTopicRule with the addition of -// the ability to pass a context and additional request options. -// -// See GetTopicRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) GetTopicRuleWithContext(ctx aws.Context, input *GetTopicRuleInput, opts ...request.Option) (*GetTopicRuleOutput, error) { - req, out := c.GetTopicRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetV2LoggingOptions = "GetV2LoggingOptions" - -// GetV2LoggingOptionsRequest generates a "aws/request.Request" representing the -// client's request for the GetV2LoggingOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetV2LoggingOptions for more information on using the GetV2LoggingOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetV2LoggingOptionsRequest method. -// req, resp := client.GetV2LoggingOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) GetV2LoggingOptionsRequest(input *GetV2LoggingOptionsInput) (req *request.Request, output *GetV2LoggingOptionsOutput) { - op := &request.Operation{ - Name: opGetV2LoggingOptions, - HTTPMethod: "GET", - HTTPPath: "/v2LoggingOptions", - } - - if input == nil { - input = &GetV2LoggingOptionsInput{} - } - - output = &GetV2LoggingOptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetV2LoggingOptions API operation for AWS IoT. -// -// Gets the fine grained logging options. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation GetV2LoggingOptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// An unexpected error has occurred. -// -// * ErrCodeNotConfiguredException "NotConfiguredException" -// The resource is not configured. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) GetV2LoggingOptions(input *GetV2LoggingOptionsInput) (*GetV2LoggingOptionsOutput, error) { - req, out := c.GetV2LoggingOptionsRequest(input) - return out, req.Send() -} - -// GetV2LoggingOptionsWithContext is the same as GetV2LoggingOptions with the addition of -// the ability to pass a context and additional request options. -// -// See GetV2LoggingOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) GetV2LoggingOptionsWithContext(ctx aws.Context, input *GetV2LoggingOptionsInput, opts ...request.Option) (*GetV2LoggingOptionsOutput, error) { - req, out := c.GetV2LoggingOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListActiveViolations = "ListActiveViolations" - -// ListActiveViolationsRequest generates a "aws/request.Request" representing the -// client's request for the ListActiveViolations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListActiveViolations for more information on using the ListActiveViolations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListActiveViolationsRequest method. -// req, resp := client.ListActiveViolationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListActiveViolationsRequest(input *ListActiveViolationsInput) (req *request.Request, output *ListActiveViolationsOutput) { - op := &request.Operation{ - Name: opListActiveViolations, - HTTPMethod: "GET", - HTTPPath: "/active-violations", - } - - if input == nil { - input = &ListActiveViolationsInput{} - } - - output = &ListActiveViolationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListActiveViolations API operation for AWS IoT. -// -// Lists the active violations for a given Device Defender security profile. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListActiveViolations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListActiveViolations(input *ListActiveViolationsInput) (*ListActiveViolationsOutput, error) { - req, out := c.ListActiveViolationsRequest(input) - return out, req.Send() -} - -// ListActiveViolationsWithContext is the same as ListActiveViolations with the addition of -// the ability to pass a context and additional request options. -// -// See ListActiveViolations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListActiveViolationsWithContext(ctx aws.Context, input *ListActiveViolationsInput, opts ...request.Option) (*ListActiveViolationsOutput, error) { - req, out := c.ListActiveViolationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAttachedPolicies = "ListAttachedPolicies" - -// ListAttachedPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListAttachedPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAttachedPolicies for more information on using the ListAttachedPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAttachedPoliciesRequest method. -// req, resp := client.ListAttachedPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListAttachedPoliciesRequest(input *ListAttachedPoliciesInput) (req *request.Request, output *ListAttachedPoliciesOutput) { - op := &request.Operation{ - Name: opListAttachedPolicies, - HTTPMethod: "POST", - HTTPPath: "/attached-policies/{target}", - } - - if input == nil { - input = &ListAttachedPoliciesInput{} - } - - output = &ListAttachedPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAttachedPolicies API operation for AWS IoT. -// -// Lists the policies attached to the specified thing 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 IoT's -// API operation ListAttachedPolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -func (c *IoT) ListAttachedPolicies(input *ListAttachedPoliciesInput) (*ListAttachedPoliciesOutput, error) { - req, out := c.ListAttachedPoliciesRequest(input) - return out, req.Send() -} - -// ListAttachedPoliciesWithContext is the same as ListAttachedPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListAttachedPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListAttachedPoliciesWithContext(ctx aws.Context, input *ListAttachedPoliciesInput, opts ...request.Option) (*ListAttachedPoliciesOutput, error) { - req, out := c.ListAttachedPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAuditFindings = "ListAuditFindings" - -// ListAuditFindingsRequest generates a "aws/request.Request" representing the -// client's request for the ListAuditFindings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAuditFindings for more information on using the ListAuditFindings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAuditFindingsRequest method. -// req, resp := client.ListAuditFindingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListAuditFindingsRequest(input *ListAuditFindingsInput) (req *request.Request, output *ListAuditFindingsOutput) { - op := &request.Operation{ - Name: opListAuditFindings, - HTTPMethod: "POST", - HTTPPath: "/audit/findings", - } - - if input == nil { - input = &ListAuditFindingsInput{} - } - - output = &ListAuditFindingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAuditFindings API operation for AWS IoT. -// -// Lists the findings (results) of a Device Defender audit or of the audits -// performed during a specified time period. (Findings are retained for 180 -// days.) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListAuditFindings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListAuditFindings(input *ListAuditFindingsInput) (*ListAuditFindingsOutput, error) { - req, out := c.ListAuditFindingsRequest(input) - return out, req.Send() -} - -// ListAuditFindingsWithContext is the same as ListAuditFindings with the addition of -// the ability to pass a context and additional request options. -// -// See ListAuditFindings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListAuditFindingsWithContext(ctx aws.Context, input *ListAuditFindingsInput, opts ...request.Option) (*ListAuditFindingsOutput, error) { - req, out := c.ListAuditFindingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAuditTasks = "ListAuditTasks" - -// ListAuditTasksRequest generates a "aws/request.Request" representing the -// client's request for the ListAuditTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAuditTasks for more information on using the ListAuditTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAuditTasksRequest method. -// req, resp := client.ListAuditTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListAuditTasksRequest(input *ListAuditTasksInput) (req *request.Request, output *ListAuditTasksOutput) { - op := &request.Operation{ - Name: opListAuditTasks, - HTTPMethod: "GET", - HTTPPath: "/audit/tasks", - } - - if input == nil { - input = &ListAuditTasksInput{} - } - - output = &ListAuditTasksOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAuditTasks API operation for AWS IoT. -// -// Lists the Device Defender audits that have been performed during a given -// time period. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListAuditTasks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListAuditTasks(input *ListAuditTasksInput) (*ListAuditTasksOutput, error) { - req, out := c.ListAuditTasksRequest(input) - return out, req.Send() -} - -// ListAuditTasksWithContext is the same as ListAuditTasks with the addition of -// the ability to pass a context and additional request options. -// -// See ListAuditTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListAuditTasksWithContext(ctx aws.Context, input *ListAuditTasksInput, opts ...request.Option) (*ListAuditTasksOutput, error) { - req, out := c.ListAuditTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAuthorizers = "ListAuthorizers" - -// ListAuthorizersRequest generates a "aws/request.Request" representing the -// client's request for the ListAuthorizers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAuthorizers for more information on using the ListAuthorizers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAuthorizersRequest method. -// req, resp := client.ListAuthorizersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListAuthorizersRequest(input *ListAuthorizersInput) (req *request.Request, output *ListAuthorizersOutput) { - op := &request.Operation{ - Name: opListAuthorizers, - HTTPMethod: "GET", - HTTPPath: "/authorizers/", - } - - if input == nil { - input = &ListAuthorizersInput{} - } - - output = &ListAuthorizersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAuthorizers API operation for AWS IoT. -// -// Lists the authorizers registered in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListAuthorizers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListAuthorizers(input *ListAuthorizersInput) (*ListAuthorizersOutput, error) { - req, out := c.ListAuthorizersRequest(input) - return out, req.Send() -} - -// ListAuthorizersWithContext is the same as ListAuthorizers with the addition of -// the ability to pass a context and additional request options. -// -// See ListAuthorizers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListAuthorizersWithContext(ctx aws.Context, input *ListAuthorizersInput, opts ...request.Option) (*ListAuthorizersOutput, error) { - req, out := c.ListAuthorizersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListBillingGroups = "ListBillingGroups" - -// ListBillingGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ListBillingGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListBillingGroups for more information on using the ListBillingGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListBillingGroupsRequest method. -// req, resp := client.ListBillingGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListBillingGroupsRequest(input *ListBillingGroupsInput) (req *request.Request, output *ListBillingGroupsOutput) { - op := &request.Operation{ - Name: opListBillingGroups, - HTTPMethod: "GET", - HTTPPath: "/billing-groups", - } - - if input == nil { - input = &ListBillingGroupsInput{} - } - - output = &ListBillingGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBillingGroups API operation for AWS IoT. -// -// Lists the billing groups you have created. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListBillingGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -func (c *IoT) ListBillingGroups(input *ListBillingGroupsInput) (*ListBillingGroupsOutput, error) { - req, out := c.ListBillingGroupsRequest(input) - return out, req.Send() -} - -// ListBillingGroupsWithContext is the same as ListBillingGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ListBillingGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListBillingGroupsWithContext(ctx aws.Context, input *ListBillingGroupsInput, opts ...request.Option) (*ListBillingGroupsOutput, error) { - req, out := c.ListBillingGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListCACertificates = "ListCACertificates" - -// ListCACertificatesRequest generates a "aws/request.Request" representing the -// client's request for the ListCACertificates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListCACertificates for more information on using the ListCACertificates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListCACertificatesRequest method. -// req, resp := client.ListCACertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListCACertificatesRequest(input *ListCACertificatesInput) (req *request.Request, output *ListCACertificatesOutput) { - op := &request.Operation{ - Name: opListCACertificates, - HTTPMethod: "GET", - HTTPPath: "/cacertificates", - } - - if input == nil { - input = &ListCACertificatesInput{} - } - - output = &ListCACertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCACertificates API operation for AWS IoT. -// -// Lists the CA certificates registered for your AWS account. -// -// The results are paginated with a default page size of 25. You can use the -// returned marker to retrieve additional results. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListCACertificates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListCACertificates(input *ListCACertificatesInput) (*ListCACertificatesOutput, error) { - req, out := c.ListCACertificatesRequest(input) - return out, req.Send() -} - -// ListCACertificatesWithContext is the same as ListCACertificates with the addition of -// the ability to pass a context and additional request options. -// -// See ListCACertificates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListCACertificatesWithContext(ctx aws.Context, input *ListCACertificatesInput, opts ...request.Option) (*ListCACertificatesOutput, error) { - req, out := c.ListCACertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListCertificates = "ListCertificates" - -// ListCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the ListCertificates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListCertificates for more information on using the ListCertificates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListCertificatesRequest method. -// req, resp := client.ListCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListCertificatesRequest(input *ListCertificatesInput) (req *request.Request, output *ListCertificatesOutput) { - op := &request.Operation{ - Name: opListCertificates, - HTTPMethod: "GET", - HTTPPath: "/certificates", - } - - if input == nil { - input = &ListCertificatesInput{} - } - - output = &ListCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCertificates API operation for AWS IoT. -// -// Lists the certificates registered in your AWS account. -// -// The results are paginated with a default page size of 25. You can use the -// returned marker to retrieve additional results. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListCertificates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListCertificates(input *ListCertificatesInput) (*ListCertificatesOutput, error) { - req, out := c.ListCertificatesRequest(input) - return out, req.Send() -} - -// ListCertificatesWithContext is the same as ListCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See ListCertificates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListCertificatesWithContext(ctx aws.Context, input *ListCertificatesInput, opts ...request.Option) (*ListCertificatesOutput, error) { - req, out := c.ListCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListCertificatesByCA = "ListCertificatesByCA" - -// ListCertificatesByCARequest generates a "aws/request.Request" representing the -// client's request for the ListCertificatesByCA operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListCertificatesByCA for more information on using the ListCertificatesByCA -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListCertificatesByCARequest method. -// req, resp := client.ListCertificatesByCARequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListCertificatesByCARequest(input *ListCertificatesByCAInput) (req *request.Request, output *ListCertificatesByCAOutput) { - op := &request.Operation{ - Name: opListCertificatesByCA, - HTTPMethod: "GET", - HTTPPath: "/certificates-by-ca/{caCertificateId}", - } - - if input == nil { - input = &ListCertificatesByCAInput{} - } - - output = &ListCertificatesByCAOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCertificatesByCA API operation for AWS IoT. -// -// List the device certificates signed by the specified CA certificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListCertificatesByCA for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListCertificatesByCA(input *ListCertificatesByCAInput) (*ListCertificatesByCAOutput, error) { - req, out := c.ListCertificatesByCARequest(input) - return out, req.Send() -} - -// ListCertificatesByCAWithContext is the same as ListCertificatesByCA with the addition of -// the ability to pass a context and additional request options. -// -// See ListCertificatesByCA for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListCertificatesByCAWithContext(ctx aws.Context, input *ListCertificatesByCAInput, opts ...request.Option) (*ListCertificatesByCAOutput, error) { - req, out := c.ListCertificatesByCARequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListIndices = "ListIndices" - -// ListIndicesRequest generates a "aws/request.Request" representing the -// client's request for the ListIndices operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListIndices for more information on using the ListIndices -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListIndicesRequest method. -// req, resp := client.ListIndicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListIndicesRequest(input *ListIndicesInput) (req *request.Request, output *ListIndicesOutput) { - op := &request.Operation{ - Name: opListIndices, - HTTPMethod: "GET", - HTTPPath: "/indices", - } - - if input == nil { - input = &ListIndicesInput{} - } - - output = &ListIndicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListIndices API operation for AWS IoT. -// -// Lists the search indices. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListIndices for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListIndices(input *ListIndicesInput) (*ListIndicesOutput, error) { - req, out := c.ListIndicesRequest(input) - return out, req.Send() -} - -// ListIndicesWithContext is the same as ListIndices with the addition of -// the ability to pass a context and additional request options. -// -// See ListIndices for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListIndicesWithContext(ctx aws.Context, input *ListIndicesInput, opts ...request.Option) (*ListIndicesOutput, error) { - req, out := c.ListIndicesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListJobExecutionsForJob = "ListJobExecutionsForJob" - -// ListJobExecutionsForJobRequest generates a "aws/request.Request" representing the -// client's request for the ListJobExecutionsForJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListJobExecutionsForJob for more information on using the ListJobExecutionsForJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListJobExecutionsForJobRequest method. -// req, resp := client.ListJobExecutionsForJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListJobExecutionsForJobRequest(input *ListJobExecutionsForJobInput) (req *request.Request, output *ListJobExecutionsForJobOutput) { - op := &request.Operation{ - Name: opListJobExecutionsForJob, - HTTPMethod: "GET", - HTTPPath: "/jobs/{jobId}/things", - } - - if input == nil { - input = &ListJobExecutionsForJobInput{} - } - - output = &ListJobExecutionsForJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListJobExecutionsForJob API operation for AWS IoT. -// -// Lists the job executions for a 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 IoT's -// API operation ListJobExecutionsForJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) ListJobExecutionsForJob(input *ListJobExecutionsForJobInput) (*ListJobExecutionsForJobOutput, error) { - req, out := c.ListJobExecutionsForJobRequest(input) - return out, req.Send() -} - -// ListJobExecutionsForJobWithContext is the same as ListJobExecutionsForJob with the addition of -// the ability to pass a context and additional request options. -// -// See ListJobExecutionsForJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListJobExecutionsForJobWithContext(ctx aws.Context, input *ListJobExecutionsForJobInput, opts ...request.Option) (*ListJobExecutionsForJobOutput, error) { - req, out := c.ListJobExecutionsForJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListJobExecutionsForThing = "ListJobExecutionsForThing" - -// ListJobExecutionsForThingRequest generates a "aws/request.Request" representing the -// client's request for the ListJobExecutionsForThing operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListJobExecutionsForThing for more information on using the ListJobExecutionsForThing -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListJobExecutionsForThingRequest method. -// req, resp := client.ListJobExecutionsForThingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListJobExecutionsForThingRequest(input *ListJobExecutionsForThingInput) (req *request.Request, output *ListJobExecutionsForThingOutput) { - op := &request.Operation{ - Name: opListJobExecutionsForThing, - HTTPMethod: "GET", - HTTPPath: "/things/{thingName}/jobs", - } - - if input == nil { - input = &ListJobExecutionsForThingInput{} - } - - output = &ListJobExecutionsForThingOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListJobExecutionsForThing API operation for AWS IoT. -// -// Lists the job executions for the specified thing. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListJobExecutionsForThing for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) ListJobExecutionsForThing(input *ListJobExecutionsForThingInput) (*ListJobExecutionsForThingOutput, error) { - req, out := c.ListJobExecutionsForThingRequest(input) - return out, req.Send() -} - -// ListJobExecutionsForThingWithContext is the same as ListJobExecutionsForThing with the addition of -// the ability to pass a context and additional request options. -// -// See ListJobExecutionsForThing for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListJobExecutionsForThingWithContext(ctx aws.Context, input *ListJobExecutionsForThingInput, opts ...request.Option) (*ListJobExecutionsForThingOutput, error) { - req, out := c.ListJobExecutionsForThingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListJobs = "ListJobs" - -// ListJobsRequest generates a "aws/request.Request" representing the -// client's request for the ListJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListJobs for more information on using the ListJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListJobsRequest method. -// req, resp := client.ListJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListJobsRequest(input *ListJobsInput) (req *request.Request, output *ListJobsOutput) { - op := &request.Operation{ - Name: opListJobs, - HTTPMethod: "GET", - HTTPPath: "/jobs", - } - - if input == nil { - input = &ListJobsInput{} - } - - output = &ListJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListJobs API operation for AWS IoT. -// -// Lists jobs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) ListJobs(input *ListJobsInput) (*ListJobsOutput, error) { - req, out := c.ListJobsRequest(input) - return out, req.Send() -} - -// ListJobsWithContext is the same as ListJobs with the addition of -// the ability to pass a context and additional request options. -// -// See ListJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListJobsWithContext(ctx aws.Context, input *ListJobsInput, opts ...request.Option) (*ListJobsOutput, error) { - req, out := c.ListJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListOTAUpdates = "ListOTAUpdates" - -// ListOTAUpdatesRequest generates a "aws/request.Request" representing the -// client's request for the ListOTAUpdates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListOTAUpdates for more information on using the ListOTAUpdates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListOTAUpdatesRequest method. -// req, resp := client.ListOTAUpdatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListOTAUpdatesRequest(input *ListOTAUpdatesInput) (req *request.Request, output *ListOTAUpdatesOutput) { - op := &request.Operation{ - Name: opListOTAUpdates, - HTTPMethod: "GET", - HTTPPath: "/otaUpdates", - } - - if input == nil { - input = &ListOTAUpdatesInput{} - } - - output = &ListOTAUpdatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOTAUpdates API operation for AWS IoT. -// -// Lists OTA updates. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListOTAUpdates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) ListOTAUpdates(input *ListOTAUpdatesInput) (*ListOTAUpdatesOutput, error) { - req, out := c.ListOTAUpdatesRequest(input) - return out, req.Send() -} - -// ListOTAUpdatesWithContext is the same as ListOTAUpdates with the addition of -// the ability to pass a context and additional request options. -// -// See ListOTAUpdates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListOTAUpdatesWithContext(ctx aws.Context, input *ListOTAUpdatesInput, opts ...request.Option) (*ListOTAUpdatesOutput, error) { - req, out := c.ListOTAUpdatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListOutgoingCertificates = "ListOutgoingCertificates" - -// ListOutgoingCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the ListOutgoingCertificates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListOutgoingCertificates for more information on using the ListOutgoingCertificates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListOutgoingCertificatesRequest method. -// req, resp := client.ListOutgoingCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListOutgoingCertificatesRequest(input *ListOutgoingCertificatesInput) (req *request.Request, output *ListOutgoingCertificatesOutput) { - op := &request.Operation{ - Name: opListOutgoingCertificates, - HTTPMethod: "GET", - HTTPPath: "/certificates-out-going", - } - - if input == nil { - input = &ListOutgoingCertificatesInput{} - } - - output = &ListOutgoingCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOutgoingCertificates API operation for AWS IoT. -// -// Lists certificates that are being transferred but not yet accepted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListOutgoingCertificates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListOutgoingCertificates(input *ListOutgoingCertificatesInput) (*ListOutgoingCertificatesOutput, error) { - req, out := c.ListOutgoingCertificatesRequest(input) - return out, req.Send() -} - -// ListOutgoingCertificatesWithContext is the same as ListOutgoingCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See ListOutgoingCertificates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListOutgoingCertificatesWithContext(ctx aws.Context, input *ListOutgoingCertificatesInput, opts ...request.Option) (*ListOutgoingCertificatesOutput, error) { - req, out := c.ListOutgoingCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPolicies = "ListPolicies" - -// ListPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPolicies for more information on using the ListPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPoliciesRequest method. -// req, resp := client.ListPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListPoliciesRequest(input *ListPoliciesInput) (req *request.Request, output *ListPoliciesOutput) { - op := &request.Operation{ - Name: opListPolicies, - HTTPMethod: "GET", - HTTPPath: "/policies", - } - - if input == nil { - input = &ListPoliciesInput{} - } - - output = &ListPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPolicies API operation for AWS IoT. -// -// Lists your policies. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListPolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListPolicies(input *ListPoliciesInput) (*ListPoliciesOutput, error) { - req, out := c.ListPoliciesRequest(input) - return out, req.Send() -} - -// ListPoliciesWithContext is the same as ListPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListPoliciesWithContext(ctx aws.Context, input *ListPoliciesInput, opts ...request.Option) (*ListPoliciesOutput, error) { - req, out := c.ListPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPolicyPrincipals = "ListPolicyPrincipals" - -// ListPolicyPrincipalsRequest generates a "aws/request.Request" representing the -// client's request for the ListPolicyPrincipals operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPolicyPrincipals for more information on using the ListPolicyPrincipals -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPolicyPrincipalsRequest method. -// req, resp := client.ListPolicyPrincipalsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// Deprecated: ListPolicyPrincipals has been deprecated -func (c *IoT) ListPolicyPrincipalsRequest(input *ListPolicyPrincipalsInput) (req *request.Request, output *ListPolicyPrincipalsOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, ListPolicyPrincipals, has been deprecated") - } - op := &request.Operation{ - Name: opListPolicyPrincipals, - HTTPMethod: "GET", - HTTPPath: "/policy-principals", - } - - if input == nil { - input = &ListPolicyPrincipalsInput{} - } - - output = &ListPolicyPrincipalsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPolicyPrincipals API operation for AWS IoT. -// -// Lists the principals associated with the specified policy. -// -// Note: This API is deprecated. Please use ListTargetsForPolicy instead. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListPolicyPrincipals for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// -// Deprecated: ListPolicyPrincipals has been deprecated -func (c *IoT) ListPolicyPrincipals(input *ListPolicyPrincipalsInput) (*ListPolicyPrincipalsOutput, error) { - req, out := c.ListPolicyPrincipalsRequest(input) - return out, req.Send() -} - -// ListPolicyPrincipalsWithContext is the same as ListPolicyPrincipals with the addition of -// the ability to pass a context and additional request options. -// -// See ListPolicyPrincipals for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: ListPolicyPrincipalsWithContext has been deprecated -func (c *IoT) ListPolicyPrincipalsWithContext(ctx aws.Context, input *ListPolicyPrincipalsInput, opts ...request.Option) (*ListPolicyPrincipalsOutput, error) { - req, out := c.ListPolicyPrincipalsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPolicyVersions = "ListPolicyVersions" - -// ListPolicyVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListPolicyVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPolicyVersions for more information on using the ListPolicyVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPolicyVersionsRequest method. -// req, resp := client.ListPolicyVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListPolicyVersionsRequest(input *ListPolicyVersionsInput) (req *request.Request, output *ListPolicyVersionsOutput) { - op := &request.Operation{ - Name: opListPolicyVersions, - HTTPMethod: "GET", - HTTPPath: "/policies/{policyName}/version", - } - - if input == nil { - input = &ListPolicyVersionsInput{} - } - - output = &ListPolicyVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPolicyVersions API operation for AWS IoT. -// -// Lists the versions of the specified policy and identifies the default 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 IoT's -// API operation ListPolicyVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListPolicyVersions(input *ListPolicyVersionsInput) (*ListPolicyVersionsOutput, error) { - req, out := c.ListPolicyVersionsRequest(input) - return out, req.Send() -} - -// ListPolicyVersionsWithContext is the same as ListPolicyVersions with the addition of -// the ability to pass a context and additional request options. -// -// See ListPolicyVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListPolicyVersionsWithContext(ctx aws.Context, input *ListPolicyVersionsInput, opts ...request.Option) (*ListPolicyVersionsOutput, error) { - req, out := c.ListPolicyVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPrincipalPolicies = "ListPrincipalPolicies" - -// ListPrincipalPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListPrincipalPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPrincipalPolicies for more information on using the ListPrincipalPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPrincipalPoliciesRequest method. -// req, resp := client.ListPrincipalPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// Deprecated: ListPrincipalPolicies has been deprecated -func (c *IoT) ListPrincipalPoliciesRequest(input *ListPrincipalPoliciesInput) (req *request.Request, output *ListPrincipalPoliciesOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, ListPrincipalPolicies, has been deprecated") - } - op := &request.Operation{ - Name: opListPrincipalPolicies, - HTTPMethod: "GET", - HTTPPath: "/principal-policies", - } - - if input == nil { - input = &ListPrincipalPoliciesInput{} - } - - output = &ListPrincipalPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPrincipalPolicies API operation for AWS IoT. -// -// Lists the policies attached to the specified principal. If you use an Cognito -// identity, the ID must be in AmazonCognito Identity format (http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetCredentialsForIdentity.html#API_GetCredentialsForIdentity_RequestSyntax). -// -// Note: This API is deprecated. Please use ListAttachedPolicies instead. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListPrincipalPolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// -// Deprecated: ListPrincipalPolicies has been deprecated -func (c *IoT) ListPrincipalPolicies(input *ListPrincipalPoliciesInput) (*ListPrincipalPoliciesOutput, error) { - req, out := c.ListPrincipalPoliciesRequest(input) - return out, req.Send() -} - -// ListPrincipalPoliciesWithContext is the same as ListPrincipalPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListPrincipalPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: ListPrincipalPoliciesWithContext has been deprecated -func (c *IoT) ListPrincipalPoliciesWithContext(ctx aws.Context, input *ListPrincipalPoliciesInput, opts ...request.Option) (*ListPrincipalPoliciesOutput, error) { - req, out := c.ListPrincipalPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPrincipalThings = "ListPrincipalThings" - -// ListPrincipalThingsRequest generates a "aws/request.Request" representing the -// client's request for the ListPrincipalThings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPrincipalThings for more information on using the ListPrincipalThings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPrincipalThingsRequest method. -// req, resp := client.ListPrincipalThingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListPrincipalThingsRequest(input *ListPrincipalThingsInput) (req *request.Request, output *ListPrincipalThingsOutput) { - op := &request.Operation{ - Name: opListPrincipalThings, - HTTPMethod: "GET", - HTTPPath: "/principals/things", - } - - if input == nil { - input = &ListPrincipalThingsInput{} - } - - output = &ListPrincipalThingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPrincipalThings API operation for AWS IoT. -// -// Lists the things associated with the specified principal. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListPrincipalThings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) ListPrincipalThings(input *ListPrincipalThingsInput) (*ListPrincipalThingsOutput, error) { - req, out := c.ListPrincipalThingsRequest(input) - return out, req.Send() -} - -// ListPrincipalThingsWithContext is the same as ListPrincipalThings with the addition of -// the ability to pass a context and additional request options. -// -// See ListPrincipalThings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListPrincipalThingsWithContext(ctx aws.Context, input *ListPrincipalThingsInput, opts ...request.Option) (*ListPrincipalThingsOutput, error) { - req, out := c.ListPrincipalThingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRoleAliases = "ListRoleAliases" - -// ListRoleAliasesRequest generates a "aws/request.Request" representing the -// client's request for the ListRoleAliases operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRoleAliases for more information on using the ListRoleAliases -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRoleAliasesRequest method. -// req, resp := client.ListRoleAliasesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListRoleAliasesRequest(input *ListRoleAliasesInput) (req *request.Request, output *ListRoleAliasesOutput) { - op := &request.Operation{ - Name: opListRoleAliases, - HTTPMethod: "GET", - HTTPPath: "/role-aliases", - } - - if input == nil { - input = &ListRoleAliasesInput{} - } - - output = &ListRoleAliasesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRoleAliases API operation for AWS IoT. -// -// Lists the role aliases registered in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListRoleAliases for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListRoleAliases(input *ListRoleAliasesInput) (*ListRoleAliasesOutput, error) { - req, out := c.ListRoleAliasesRequest(input) - return out, req.Send() -} - -// ListRoleAliasesWithContext is the same as ListRoleAliases with the addition of -// the ability to pass a context and additional request options. -// -// See ListRoleAliases for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListRoleAliasesWithContext(ctx aws.Context, input *ListRoleAliasesInput, opts ...request.Option) (*ListRoleAliasesOutput, error) { - req, out := c.ListRoleAliasesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListScheduledAudits = "ListScheduledAudits" - -// ListScheduledAuditsRequest generates a "aws/request.Request" representing the -// client's request for the ListScheduledAudits operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListScheduledAudits for more information on using the ListScheduledAudits -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListScheduledAuditsRequest method. -// req, resp := client.ListScheduledAuditsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListScheduledAuditsRequest(input *ListScheduledAuditsInput) (req *request.Request, output *ListScheduledAuditsOutput) { - op := &request.Operation{ - Name: opListScheduledAudits, - HTTPMethod: "GET", - HTTPPath: "/audit/scheduledaudits", - } - - if input == nil { - input = &ListScheduledAuditsInput{} - } - - output = &ListScheduledAuditsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListScheduledAudits API operation for AWS IoT. -// -// Lists all of your scheduled audits. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListScheduledAudits for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListScheduledAudits(input *ListScheduledAuditsInput) (*ListScheduledAuditsOutput, error) { - req, out := c.ListScheduledAuditsRequest(input) - return out, req.Send() -} - -// ListScheduledAuditsWithContext is the same as ListScheduledAudits with the addition of -// the ability to pass a context and additional request options. -// -// See ListScheduledAudits for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListScheduledAuditsWithContext(ctx aws.Context, input *ListScheduledAuditsInput, opts ...request.Option) (*ListScheduledAuditsOutput, error) { - req, out := c.ListScheduledAuditsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSecurityProfiles = "ListSecurityProfiles" - -// ListSecurityProfilesRequest generates a "aws/request.Request" representing the -// client's request for the ListSecurityProfiles operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSecurityProfiles for more information on using the ListSecurityProfiles -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSecurityProfilesRequest method. -// req, resp := client.ListSecurityProfilesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListSecurityProfilesRequest(input *ListSecurityProfilesInput) (req *request.Request, output *ListSecurityProfilesOutput) { - op := &request.Operation{ - Name: opListSecurityProfiles, - HTTPMethod: "GET", - HTTPPath: "/security-profiles", - } - - if input == nil { - input = &ListSecurityProfilesInput{} - } - - output = &ListSecurityProfilesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSecurityProfiles API operation for AWS IoT. -// -// Lists the Device Defender security profiles you have created. You can use -// filters to list only those security profiles associated with a thing group -// or only those associated with your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListSecurityProfiles for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListSecurityProfiles(input *ListSecurityProfilesInput) (*ListSecurityProfilesOutput, error) { - req, out := c.ListSecurityProfilesRequest(input) - return out, req.Send() -} - -// ListSecurityProfilesWithContext is the same as ListSecurityProfiles with the addition of -// the ability to pass a context and additional request options. -// -// See ListSecurityProfiles for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListSecurityProfilesWithContext(ctx aws.Context, input *ListSecurityProfilesInput, opts ...request.Option) (*ListSecurityProfilesOutput, error) { - req, out := c.ListSecurityProfilesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSecurityProfilesForTarget = "ListSecurityProfilesForTarget" - -// ListSecurityProfilesForTargetRequest generates a "aws/request.Request" representing the -// client's request for the ListSecurityProfilesForTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSecurityProfilesForTarget for more information on using the ListSecurityProfilesForTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSecurityProfilesForTargetRequest method. -// req, resp := client.ListSecurityProfilesForTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListSecurityProfilesForTargetRequest(input *ListSecurityProfilesForTargetInput) (req *request.Request, output *ListSecurityProfilesForTargetOutput) { - op := &request.Operation{ - Name: opListSecurityProfilesForTarget, - HTTPMethod: "GET", - HTTPPath: "/security-profiles-for-target", - } - - if input == nil { - input = &ListSecurityProfilesForTargetInput{} - } - - output = &ListSecurityProfilesForTargetOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSecurityProfilesForTarget API operation for AWS IoT. -// -// Lists the Device Defender security profiles attached to a target (thing 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 IoT's -// API operation ListSecurityProfilesForTarget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) ListSecurityProfilesForTarget(input *ListSecurityProfilesForTargetInput) (*ListSecurityProfilesForTargetOutput, error) { - req, out := c.ListSecurityProfilesForTargetRequest(input) - return out, req.Send() -} - -// ListSecurityProfilesForTargetWithContext is the same as ListSecurityProfilesForTarget with the addition of -// the ability to pass a context and additional request options. -// -// See ListSecurityProfilesForTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListSecurityProfilesForTargetWithContext(ctx aws.Context, input *ListSecurityProfilesForTargetInput, opts ...request.Option) (*ListSecurityProfilesForTargetOutput, error) { - req, out := c.ListSecurityProfilesForTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListStreams = "ListStreams" - -// ListStreamsRequest generates a "aws/request.Request" representing the -// client's request for the ListStreams operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListStreams for more information on using the ListStreams -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListStreamsRequest method. -// req, resp := client.ListStreamsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListStreamsRequest(input *ListStreamsInput) (req *request.Request, output *ListStreamsOutput) { - op := &request.Operation{ - Name: opListStreams, - HTTPMethod: "GET", - HTTPPath: "/streams", - } - - if input == nil { - input = &ListStreamsInput{} - } - - output = &ListStreamsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListStreams API operation for AWS IoT. -// -// Lists all of the streams in your AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListStreams for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListStreams(input *ListStreamsInput) (*ListStreamsOutput, error) { - req, out := c.ListStreamsRequest(input) - return out, req.Send() -} - -// ListStreamsWithContext is the same as ListStreams with the addition of -// the ability to pass a context and additional request options. -// -// See ListStreams for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListStreamsWithContext(ctx aws.Context, input *ListStreamsInput, opts ...request.Option) (*ListStreamsOutput, error) { - req, out := c.ListStreamsRequest(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) -// } -func (c *IoT) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "GET", - HTTPPath: "/tags", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for AWS IoT. -// -// Lists the tags (metadata) you have assigned to the 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 IoT's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -func (c *IoT) 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 *IoT) 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 opListTargetsForPolicy = "ListTargetsForPolicy" - -// ListTargetsForPolicyRequest generates a "aws/request.Request" representing the -// client's request for the ListTargetsForPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTargetsForPolicy for more information on using the ListTargetsForPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTargetsForPolicyRequest method. -// req, resp := client.ListTargetsForPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListTargetsForPolicyRequest(input *ListTargetsForPolicyInput) (req *request.Request, output *ListTargetsForPolicyOutput) { - op := &request.Operation{ - Name: opListTargetsForPolicy, - HTTPMethod: "POST", - HTTPPath: "/policy-targets/{policyName}", - } - - if input == nil { - input = &ListTargetsForPolicyInput{} - } - - output = &ListTargetsForPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTargetsForPolicy API operation for AWS IoT. -// -// List targets for the specified policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListTargetsForPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -func (c *IoT) ListTargetsForPolicy(input *ListTargetsForPolicyInput) (*ListTargetsForPolicyOutput, error) { - req, out := c.ListTargetsForPolicyRequest(input) - return out, req.Send() -} - -// ListTargetsForPolicyWithContext is the same as ListTargetsForPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See ListTargetsForPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListTargetsForPolicyWithContext(ctx aws.Context, input *ListTargetsForPolicyInput, opts ...request.Option) (*ListTargetsForPolicyOutput, error) { - req, out := c.ListTargetsForPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTargetsForSecurityProfile = "ListTargetsForSecurityProfile" - -// ListTargetsForSecurityProfileRequest generates a "aws/request.Request" representing the -// client's request for the ListTargetsForSecurityProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTargetsForSecurityProfile for more information on using the ListTargetsForSecurityProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTargetsForSecurityProfileRequest method. -// req, resp := client.ListTargetsForSecurityProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListTargetsForSecurityProfileRequest(input *ListTargetsForSecurityProfileInput) (req *request.Request, output *ListTargetsForSecurityProfileOutput) { - op := &request.Operation{ - Name: opListTargetsForSecurityProfile, - HTTPMethod: "GET", - HTTPPath: "/security-profiles/{securityProfileName}/targets", - } - - if input == nil { - input = &ListTargetsForSecurityProfileInput{} - } - - output = &ListTargetsForSecurityProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTargetsForSecurityProfile API operation for AWS IoT. -// -// Lists the targets (thing groups) associated with a given Device Defender -// security profile. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListTargetsForSecurityProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListTargetsForSecurityProfile(input *ListTargetsForSecurityProfileInput) (*ListTargetsForSecurityProfileOutput, error) { - req, out := c.ListTargetsForSecurityProfileRequest(input) - return out, req.Send() -} - -// ListTargetsForSecurityProfileWithContext is the same as ListTargetsForSecurityProfile with the addition of -// the ability to pass a context and additional request options. -// -// See ListTargetsForSecurityProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListTargetsForSecurityProfileWithContext(ctx aws.Context, input *ListTargetsForSecurityProfileInput, opts ...request.Option) (*ListTargetsForSecurityProfileOutput, error) { - req, out := c.ListTargetsForSecurityProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListThingGroups = "ListThingGroups" - -// ListThingGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ListThingGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListThingGroups for more information on using the ListThingGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListThingGroupsRequest method. -// req, resp := client.ListThingGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListThingGroupsRequest(input *ListThingGroupsInput) (req *request.Request, output *ListThingGroupsOutput) { - op := &request.Operation{ - Name: opListThingGroups, - HTTPMethod: "GET", - HTTPPath: "/thing-groups", - } - - if input == nil { - input = &ListThingGroupsInput{} - } - - output = &ListThingGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListThingGroups API operation for AWS IoT. -// -// List the thing groups in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListThingGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) ListThingGroups(input *ListThingGroupsInput) (*ListThingGroupsOutput, error) { - req, out := c.ListThingGroupsRequest(input) - return out, req.Send() -} - -// ListThingGroupsWithContext is the same as ListThingGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ListThingGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListThingGroupsWithContext(ctx aws.Context, input *ListThingGroupsInput, opts ...request.Option) (*ListThingGroupsOutput, error) { - req, out := c.ListThingGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListThingGroupsForThing = "ListThingGroupsForThing" - -// ListThingGroupsForThingRequest generates a "aws/request.Request" representing the -// client's request for the ListThingGroupsForThing operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListThingGroupsForThing for more information on using the ListThingGroupsForThing -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListThingGroupsForThingRequest method. -// req, resp := client.ListThingGroupsForThingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListThingGroupsForThingRequest(input *ListThingGroupsForThingInput) (req *request.Request, output *ListThingGroupsForThingOutput) { - op := &request.Operation{ - Name: opListThingGroupsForThing, - HTTPMethod: "GET", - HTTPPath: "/things/{thingName}/thing-groups", - } - - if input == nil { - input = &ListThingGroupsForThingInput{} - } - - output = &ListThingGroupsForThingOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListThingGroupsForThing API operation for AWS IoT. -// -// List the thing groups to which the specified thing belongs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListThingGroupsForThing for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) ListThingGroupsForThing(input *ListThingGroupsForThingInput) (*ListThingGroupsForThingOutput, error) { - req, out := c.ListThingGroupsForThingRequest(input) - return out, req.Send() -} - -// ListThingGroupsForThingWithContext is the same as ListThingGroupsForThing with the addition of -// the ability to pass a context and additional request options. -// -// See ListThingGroupsForThing for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListThingGroupsForThingWithContext(ctx aws.Context, input *ListThingGroupsForThingInput, opts ...request.Option) (*ListThingGroupsForThingOutput, error) { - req, out := c.ListThingGroupsForThingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListThingPrincipals = "ListThingPrincipals" - -// ListThingPrincipalsRequest generates a "aws/request.Request" representing the -// client's request for the ListThingPrincipals operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListThingPrincipals for more information on using the ListThingPrincipals -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListThingPrincipalsRequest method. -// req, resp := client.ListThingPrincipalsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListThingPrincipalsRequest(input *ListThingPrincipalsInput) (req *request.Request, output *ListThingPrincipalsOutput) { - op := &request.Operation{ - Name: opListThingPrincipals, - HTTPMethod: "GET", - HTTPPath: "/things/{thingName}/principals", - } - - if input == nil { - input = &ListThingPrincipalsInput{} - } - - output = &ListThingPrincipalsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListThingPrincipals API operation for AWS IoT. -// -// Lists the principals associated with the specified thing. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListThingPrincipals for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) ListThingPrincipals(input *ListThingPrincipalsInput) (*ListThingPrincipalsOutput, error) { - req, out := c.ListThingPrincipalsRequest(input) - return out, req.Send() -} - -// ListThingPrincipalsWithContext is the same as ListThingPrincipals with the addition of -// the ability to pass a context and additional request options. -// -// See ListThingPrincipals for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListThingPrincipalsWithContext(ctx aws.Context, input *ListThingPrincipalsInput, opts ...request.Option) (*ListThingPrincipalsOutput, error) { - req, out := c.ListThingPrincipalsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListThingRegistrationTaskReports = "ListThingRegistrationTaskReports" - -// ListThingRegistrationTaskReportsRequest generates a "aws/request.Request" representing the -// client's request for the ListThingRegistrationTaskReports operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListThingRegistrationTaskReports for more information on using the ListThingRegistrationTaskReports -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListThingRegistrationTaskReportsRequest method. -// req, resp := client.ListThingRegistrationTaskReportsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListThingRegistrationTaskReportsRequest(input *ListThingRegistrationTaskReportsInput) (req *request.Request, output *ListThingRegistrationTaskReportsOutput) { - op := &request.Operation{ - Name: opListThingRegistrationTaskReports, - HTTPMethod: "GET", - HTTPPath: "/thing-registration-tasks/{taskId}/reports", - } - - if input == nil { - input = &ListThingRegistrationTaskReportsInput{} - } - - output = &ListThingRegistrationTaskReportsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListThingRegistrationTaskReports API operation for AWS IoT. -// -// Information about the thing registration tasks. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListThingRegistrationTaskReports for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListThingRegistrationTaskReports(input *ListThingRegistrationTaskReportsInput) (*ListThingRegistrationTaskReportsOutput, error) { - req, out := c.ListThingRegistrationTaskReportsRequest(input) - return out, req.Send() -} - -// ListThingRegistrationTaskReportsWithContext is the same as ListThingRegistrationTaskReports with the addition of -// the ability to pass a context and additional request options. -// -// See ListThingRegistrationTaskReports for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListThingRegistrationTaskReportsWithContext(ctx aws.Context, input *ListThingRegistrationTaskReportsInput, opts ...request.Option) (*ListThingRegistrationTaskReportsOutput, error) { - req, out := c.ListThingRegistrationTaskReportsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListThingRegistrationTasks = "ListThingRegistrationTasks" - -// ListThingRegistrationTasksRequest generates a "aws/request.Request" representing the -// client's request for the ListThingRegistrationTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListThingRegistrationTasks for more information on using the ListThingRegistrationTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListThingRegistrationTasksRequest method. -// req, resp := client.ListThingRegistrationTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListThingRegistrationTasksRequest(input *ListThingRegistrationTasksInput) (req *request.Request, output *ListThingRegistrationTasksOutput) { - op := &request.Operation{ - Name: opListThingRegistrationTasks, - HTTPMethod: "GET", - HTTPPath: "/thing-registration-tasks", - } - - if input == nil { - input = &ListThingRegistrationTasksInput{} - } - - output = &ListThingRegistrationTasksOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListThingRegistrationTasks API operation for AWS IoT. -// -// List bulk thing provisioning tasks. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListThingRegistrationTasks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListThingRegistrationTasks(input *ListThingRegistrationTasksInput) (*ListThingRegistrationTasksOutput, error) { - req, out := c.ListThingRegistrationTasksRequest(input) - return out, req.Send() -} - -// ListThingRegistrationTasksWithContext is the same as ListThingRegistrationTasks with the addition of -// the ability to pass a context and additional request options. -// -// See ListThingRegistrationTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListThingRegistrationTasksWithContext(ctx aws.Context, input *ListThingRegistrationTasksInput, opts ...request.Option) (*ListThingRegistrationTasksOutput, error) { - req, out := c.ListThingRegistrationTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListThingTypes = "ListThingTypes" - -// ListThingTypesRequest generates a "aws/request.Request" representing the -// client's request for the ListThingTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListThingTypes for more information on using the ListThingTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListThingTypesRequest method. -// req, resp := client.ListThingTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListThingTypesRequest(input *ListThingTypesInput) (req *request.Request, output *ListThingTypesOutput) { - op := &request.Operation{ - Name: opListThingTypes, - HTTPMethod: "GET", - HTTPPath: "/thing-types", - } - - if input == nil { - input = &ListThingTypesInput{} - } - - output = &ListThingTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListThingTypes API operation for AWS IoT. -// -// Lists the existing thing types. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListThingTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListThingTypes(input *ListThingTypesInput) (*ListThingTypesOutput, error) { - req, out := c.ListThingTypesRequest(input) - return out, req.Send() -} - -// ListThingTypesWithContext is the same as ListThingTypes with the addition of -// the ability to pass a context and additional request options. -// -// See ListThingTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListThingTypesWithContext(ctx aws.Context, input *ListThingTypesInput, opts ...request.Option) (*ListThingTypesOutput, error) { - req, out := c.ListThingTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListThings = "ListThings" - -// ListThingsRequest generates a "aws/request.Request" representing the -// client's request for the ListThings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListThings for more information on using the ListThings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListThingsRequest method. -// req, resp := client.ListThingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListThingsRequest(input *ListThingsInput) (req *request.Request, output *ListThingsOutput) { - op := &request.Operation{ - Name: opListThings, - HTTPMethod: "GET", - HTTPPath: "/things", - } - - if input == nil { - input = &ListThingsInput{} - } - - output = &ListThingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListThings API operation for AWS IoT. -// -// Lists your things. Use the attributeName and attributeValue parameters to -// filter your things. For example, calling ListThings with attributeName=Color -// and attributeValue=Red retrieves all things in the registry that contain -// an attribute Color with the value Red. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListThings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListThings(input *ListThingsInput) (*ListThingsOutput, error) { - req, out := c.ListThingsRequest(input) - return out, req.Send() -} - -// ListThingsWithContext is the same as ListThings with the addition of -// the ability to pass a context and additional request options. -// -// See ListThings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListThingsWithContext(ctx aws.Context, input *ListThingsInput, opts ...request.Option) (*ListThingsOutput, error) { - req, out := c.ListThingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListThingsInBillingGroup = "ListThingsInBillingGroup" - -// ListThingsInBillingGroupRequest generates a "aws/request.Request" representing the -// client's request for the ListThingsInBillingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListThingsInBillingGroup for more information on using the ListThingsInBillingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListThingsInBillingGroupRequest method. -// req, resp := client.ListThingsInBillingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListThingsInBillingGroupRequest(input *ListThingsInBillingGroupInput) (req *request.Request, output *ListThingsInBillingGroupOutput) { - op := &request.Operation{ - Name: opListThingsInBillingGroup, - HTTPMethod: "GET", - HTTPPath: "/billing-groups/{billingGroupName}/things", - } - - if input == nil { - input = &ListThingsInBillingGroupInput{} - } - - output = &ListThingsInBillingGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListThingsInBillingGroup API operation for AWS IoT. -// -// Lists the things you have added to the given billing 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 IoT's -// API operation ListThingsInBillingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -func (c *IoT) ListThingsInBillingGroup(input *ListThingsInBillingGroupInput) (*ListThingsInBillingGroupOutput, error) { - req, out := c.ListThingsInBillingGroupRequest(input) - return out, req.Send() -} - -// ListThingsInBillingGroupWithContext is the same as ListThingsInBillingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ListThingsInBillingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListThingsInBillingGroupWithContext(ctx aws.Context, input *ListThingsInBillingGroupInput, opts ...request.Option) (*ListThingsInBillingGroupOutput, error) { - req, out := c.ListThingsInBillingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListThingsInThingGroup = "ListThingsInThingGroup" - -// ListThingsInThingGroupRequest generates a "aws/request.Request" representing the -// client's request for the ListThingsInThingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListThingsInThingGroup for more information on using the ListThingsInThingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListThingsInThingGroupRequest method. -// req, resp := client.ListThingsInThingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListThingsInThingGroupRequest(input *ListThingsInThingGroupInput) (req *request.Request, output *ListThingsInThingGroupOutput) { - op := &request.Operation{ - Name: opListThingsInThingGroup, - HTTPMethod: "GET", - HTTPPath: "/thing-groups/{thingGroupName}/things", - } - - if input == nil { - input = &ListThingsInThingGroupInput{} - } - - output = &ListThingsInThingGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListThingsInThingGroup API operation for AWS IoT. -// -// Lists the things in the specified 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 IoT's -// API operation ListThingsInThingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) ListThingsInThingGroup(input *ListThingsInThingGroupInput) (*ListThingsInThingGroupOutput, error) { - req, out := c.ListThingsInThingGroupRequest(input) - return out, req.Send() -} - -// ListThingsInThingGroupWithContext is the same as ListThingsInThingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ListThingsInThingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListThingsInThingGroupWithContext(ctx aws.Context, input *ListThingsInThingGroupInput, opts ...request.Option) (*ListThingsInThingGroupOutput, error) { - req, out := c.ListThingsInThingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTopicRules = "ListTopicRules" - -// ListTopicRulesRequest generates a "aws/request.Request" representing the -// client's request for the ListTopicRules operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTopicRules for more information on using the ListTopicRules -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTopicRulesRequest method. -// req, resp := client.ListTopicRulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListTopicRulesRequest(input *ListTopicRulesInput) (req *request.Request, output *ListTopicRulesOutput) { - op := &request.Operation{ - Name: opListTopicRules, - HTTPMethod: "GET", - HTTPPath: "/rules", - } - - if input == nil { - input = &ListTopicRulesInput{} - } - - output = &ListTopicRulesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTopicRules API operation for AWS IoT. -// -// Lists the rules for the specific topic. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListTopicRules for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) ListTopicRules(input *ListTopicRulesInput) (*ListTopicRulesOutput, error) { - req, out := c.ListTopicRulesRequest(input) - return out, req.Send() -} - -// ListTopicRulesWithContext is the same as ListTopicRules with the addition of -// the ability to pass a context and additional request options. -// -// See ListTopicRules for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListTopicRulesWithContext(ctx aws.Context, input *ListTopicRulesInput, opts ...request.Option) (*ListTopicRulesOutput, error) { - req, out := c.ListTopicRulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListV2LoggingLevels = "ListV2LoggingLevels" - -// ListV2LoggingLevelsRequest generates a "aws/request.Request" representing the -// client's request for the ListV2LoggingLevels operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListV2LoggingLevels for more information on using the ListV2LoggingLevels -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListV2LoggingLevelsRequest method. -// req, resp := client.ListV2LoggingLevelsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListV2LoggingLevelsRequest(input *ListV2LoggingLevelsInput) (req *request.Request, output *ListV2LoggingLevelsOutput) { - op := &request.Operation{ - Name: opListV2LoggingLevels, - HTTPMethod: "GET", - HTTPPath: "/v2LoggingLevel", - } - - if input == nil { - input = &ListV2LoggingLevelsInput{} - } - - output = &ListV2LoggingLevelsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListV2LoggingLevels API operation for AWS IoT. -// -// Lists logging levels. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListV2LoggingLevels for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// An unexpected error has occurred. -// -// * ErrCodeNotConfiguredException "NotConfiguredException" -// The resource is not configured. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) ListV2LoggingLevels(input *ListV2LoggingLevelsInput) (*ListV2LoggingLevelsOutput, error) { - req, out := c.ListV2LoggingLevelsRequest(input) - return out, req.Send() -} - -// ListV2LoggingLevelsWithContext is the same as ListV2LoggingLevels with the addition of -// the ability to pass a context and additional request options. -// -// See ListV2LoggingLevels for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListV2LoggingLevelsWithContext(ctx aws.Context, input *ListV2LoggingLevelsInput, opts ...request.Option) (*ListV2LoggingLevelsOutput, error) { - req, out := c.ListV2LoggingLevelsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListViolationEvents = "ListViolationEvents" - -// ListViolationEventsRequest generates a "aws/request.Request" representing the -// client's request for the ListViolationEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListViolationEvents for more information on using the ListViolationEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListViolationEventsRequest method. -// req, resp := client.ListViolationEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ListViolationEventsRequest(input *ListViolationEventsInput) (req *request.Request, output *ListViolationEventsOutput) { - op := &request.Operation{ - Name: opListViolationEvents, - HTTPMethod: "GET", - HTTPPath: "/violation-events", - } - - if input == nil { - input = &ListViolationEventsInput{} - } - - output = &ListViolationEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListViolationEvents API operation for AWS IoT. -// -// Lists the Device Defender security profile violations discovered during the -// given time period. You can use filters to limit the results to those alerts -// issued for a particular security profile, behavior or thing (device). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ListViolationEvents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ListViolationEvents(input *ListViolationEventsInput) (*ListViolationEventsOutput, error) { - req, out := c.ListViolationEventsRequest(input) - return out, req.Send() -} - -// ListViolationEventsWithContext is the same as ListViolationEvents with the addition of -// the ability to pass a context and additional request options. -// -// See ListViolationEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ListViolationEventsWithContext(ctx aws.Context, input *ListViolationEventsInput, opts ...request.Option) (*ListViolationEventsOutput, error) { - req, out := c.ListViolationEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterCACertificate = "RegisterCACertificate" - -// RegisterCACertificateRequest generates a "aws/request.Request" representing the -// client's request for the RegisterCACertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterCACertificate for more information on using the RegisterCACertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterCACertificateRequest method. -// req, resp := client.RegisterCACertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) RegisterCACertificateRequest(input *RegisterCACertificateInput) (req *request.Request, output *RegisterCACertificateOutput) { - op := &request.Operation{ - Name: opRegisterCACertificate, - HTTPMethod: "POST", - HTTPPath: "/cacertificate", - } - - if input == nil { - input = &RegisterCACertificateInput{} - } - - output = &RegisterCACertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterCACertificate API operation for AWS IoT. -// -// Registers a CA certificate with AWS IoT. This CA certificate can then be -// used to sign device certificates, which can be then registered with AWS IoT. -// You can register up to 10 CA certificates per AWS account that have the same -// subject field. This enables you to have up to 10 certificate authorities -// sign your device certificates. If you have more than one CA certificate registered, -// make sure you pass the CA certificate when you register your device certificates -// with the RegisterCertificate API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation RegisterCACertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeRegistrationCodeValidationException "RegistrationCodeValidationException" -// The registration code is invalid. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeCertificateValidationException "CertificateValidationException" -// The certificate is invalid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) RegisterCACertificate(input *RegisterCACertificateInput) (*RegisterCACertificateOutput, error) { - req, out := c.RegisterCACertificateRequest(input) - return out, req.Send() -} - -// RegisterCACertificateWithContext is the same as RegisterCACertificate with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterCACertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) RegisterCACertificateWithContext(ctx aws.Context, input *RegisterCACertificateInput, opts ...request.Option) (*RegisterCACertificateOutput, error) { - req, out := c.RegisterCACertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterCertificate = "RegisterCertificate" - -// RegisterCertificateRequest generates a "aws/request.Request" representing the -// client's request for the RegisterCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterCertificate for more information on using the RegisterCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterCertificateRequest method. -// req, resp := client.RegisterCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) RegisterCertificateRequest(input *RegisterCertificateInput) (req *request.Request, output *RegisterCertificateOutput) { - op := &request.Operation{ - Name: opRegisterCertificate, - HTTPMethod: "POST", - HTTPPath: "/certificate/register", - } - - if input == nil { - input = &RegisterCertificateInput{} - } - - output = &RegisterCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterCertificate API operation for AWS IoT. -// -// Registers a device certificate with AWS IoT. If you have more than one CA -// certificate that has the same subject field, you must specify the CA certificate -// that was used to sign the device certificate being registered. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation RegisterCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeCertificateValidationException "CertificateValidationException" -// The certificate is invalid. -// -// * ErrCodeCertificateStateException "CertificateStateException" -// The certificate operation is not allowed. -// -// * ErrCodeCertificateConflictException "CertificateConflictException" -// Unable to verify the CA certificate used to sign the device certificate you -// are attempting to register. This is happens when you have registered more -// than one CA certificate that has the same subject field and public key. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) RegisterCertificate(input *RegisterCertificateInput) (*RegisterCertificateOutput, error) { - req, out := c.RegisterCertificateRequest(input) - return out, req.Send() -} - -// RegisterCertificateWithContext is the same as RegisterCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) RegisterCertificateWithContext(ctx aws.Context, input *RegisterCertificateInput, opts ...request.Option) (*RegisterCertificateOutput, error) { - req, out := c.RegisterCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterThing = "RegisterThing" - -// RegisterThingRequest generates a "aws/request.Request" representing the -// client's request for the RegisterThing operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterThing for more information on using the RegisterThing -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterThingRequest method. -// req, resp := client.RegisterThingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) RegisterThingRequest(input *RegisterThingInput) (req *request.Request, output *RegisterThingOutput) { - op := &request.Operation{ - Name: opRegisterThing, - HTTPMethod: "POST", - HTTPPath: "/things", - } - - if input == nil { - input = &RegisterThingInput{} - } - - output = &RegisterThingOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterThing API operation for AWS IoT. -// -// Provisions a thing. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation RegisterThing for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeConflictingResourceUpdateException "ConflictingResourceUpdateException" -// A conflicting resource update exception. This exception is thrown when two -// pending updates cause a conflict. -// -// * ErrCodeResourceRegistrationFailureException "ResourceRegistrationFailureException" -// The resource registration failed. -// -func (c *IoT) RegisterThing(input *RegisterThingInput) (*RegisterThingOutput, error) { - req, out := c.RegisterThingRequest(input) - return out, req.Send() -} - -// RegisterThingWithContext is the same as RegisterThing with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterThing for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) RegisterThingWithContext(ctx aws.Context, input *RegisterThingInput, opts ...request.Option) (*RegisterThingOutput, error) { - req, out := c.RegisterThingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRejectCertificateTransfer = "RejectCertificateTransfer" - -// RejectCertificateTransferRequest generates a "aws/request.Request" representing the -// client's request for the RejectCertificateTransfer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RejectCertificateTransfer for more information on using the RejectCertificateTransfer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RejectCertificateTransferRequest method. -// req, resp := client.RejectCertificateTransferRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) RejectCertificateTransferRequest(input *RejectCertificateTransferInput) (req *request.Request, output *RejectCertificateTransferOutput) { - op := &request.Operation{ - Name: opRejectCertificateTransfer, - HTTPMethod: "PATCH", - HTTPPath: "/reject-certificate-transfer/{certificateId}", - } - - if input == nil { - input = &RejectCertificateTransferInput{} - } - - output = &RejectCertificateTransferOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RejectCertificateTransfer API operation for AWS IoT. -// -// Rejects a pending certificate transfer. After AWS IoT rejects a certificate -// transfer, the certificate status changes from PENDING_TRANSFER to INACTIVE. -// -// To check for pending certificate transfers, call ListCertificates to enumerate -// your certificates. -// -// This operation can only be called by the transfer destination. After it is -// called, the certificate will be returned to the source's account in the INACTIVE -// state. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation RejectCertificateTransfer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeTransferAlreadyCompletedException "TransferAlreadyCompletedException" -// You can't revert the certificate transfer because the transfer is already -// complete. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) RejectCertificateTransfer(input *RejectCertificateTransferInput) (*RejectCertificateTransferOutput, error) { - req, out := c.RejectCertificateTransferRequest(input) - return out, req.Send() -} - -// RejectCertificateTransferWithContext is the same as RejectCertificateTransfer with the addition of -// the ability to pass a context and additional request options. -// -// See RejectCertificateTransfer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) RejectCertificateTransferWithContext(ctx aws.Context, input *RejectCertificateTransferInput, opts ...request.Option) (*RejectCertificateTransferOutput, error) { - req, out := c.RejectCertificateTransferRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveThingFromBillingGroup = "RemoveThingFromBillingGroup" - -// RemoveThingFromBillingGroupRequest generates a "aws/request.Request" representing the -// client's request for the RemoveThingFromBillingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveThingFromBillingGroup for more information on using the RemoveThingFromBillingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveThingFromBillingGroupRequest method. -// req, resp := client.RemoveThingFromBillingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) RemoveThingFromBillingGroupRequest(input *RemoveThingFromBillingGroupInput) (req *request.Request, output *RemoveThingFromBillingGroupOutput) { - op := &request.Operation{ - Name: opRemoveThingFromBillingGroup, - HTTPMethod: "PUT", - HTTPPath: "/billing-groups/removeThingFromBillingGroup", - } - - if input == nil { - input = &RemoveThingFromBillingGroupInput{} - } - - output = &RemoveThingFromBillingGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveThingFromBillingGroup API operation for AWS IoT. -// -// Removes the given thing from the billing 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 IoT's -// API operation RemoveThingFromBillingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) RemoveThingFromBillingGroup(input *RemoveThingFromBillingGroupInput) (*RemoveThingFromBillingGroupOutput, error) { - req, out := c.RemoveThingFromBillingGroupRequest(input) - return out, req.Send() -} - -// RemoveThingFromBillingGroupWithContext is the same as RemoveThingFromBillingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveThingFromBillingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) RemoveThingFromBillingGroupWithContext(ctx aws.Context, input *RemoveThingFromBillingGroupInput, opts ...request.Option) (*RemoveThingFromBillingGroupOutput, error) { - req, out := c.RemoveThingFromBillingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveThingFromThingGroup = "RemoveThingFromThingGroup" - -// RemoveThingFromThingGroupRequest generates a "aws/request.Request" representing the -// client's request for the RemoveThingFromThingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveThingFromThingGroup for more information on using the RemoveThingFromThingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveThingFromThingGroupRequest method. -// req, resp := client.RemoveThingFromThingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) RemoveThingFromThingGroupRequest(input *RemoveThingFromThingGroupInput) (req *request.Request, output *RemoveThingFromThingGroupOutput) { - op := &request.Operation{ - Name: opRemoveThingFromThingGroup, - HTTPMethod: "PUT", - HTTPPath: "/thing-groups/removeThingFromThingGroup", - } - - if input == nil { - input = &RemoveThingFromThingGroupInput{} - } - - output = &RemoveThingFromThingGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveThingFromThingGroup API operation for AWS IoT. -// -// Remove the specified thing from the specified 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 IoT's -// API operation RemoveThingFromThingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) RemoveThingFromThingGroup(input *RemoveThingFromThingGroupInput) (*RemoveThingFromThingGroupOutput, error) { - req, out := c.RemoveThingFromThingGroupRequest(input) - return out, req.Send() -} - -// RemoveThingFromThingGroupWithContext is the same as RemoveThingFromThingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveThingFromThingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) RemoveThingFromThingGroupWithContext(ctx aws.Context, input *RemoveThingFromThingGroupInput, opts ...request.Option) (*RemoveThingFromThingGroupOutput, error) { - req, out := c.RemoveThingFromThingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReplaceTopicRule = "ReplaceTopicRule" - -// ReplaceTopicRuleRequest generates a "aws/request.Request" representing the -// client's request for the ReplaceTopicRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReplaceTopicRule for more information on using the ReplaceTopicRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReplaceTopicRuleRequest method. -// req, resp := client.ReplaceTopicRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ReplaceTopicRuleRequest(input *ReplaceTopicRuleInput) (req *request.Request, output *ReplaceTopicRuleOutput) { - op := &request.Operation{ - Name: opReplaceTopicRule, - HTTPMethod: "PATCH", - HTTPPath: "/rules/{ruleName}", - } - - if input == nil { - input = &ReplaceTopicRuleInput{} - } - - output = &ReplaceTopicRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ReplaceTopicRule API operation for AWS IoT. -// -// Replaces the rule. You must specify all parameters for the new rule. Creating -// rules is an administrator-level action. Any user who has permission to create -// rules will be able to access data processed by the rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ReplaceTopicRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSqlParseException "SqlParseException" -// The Rule-SQL expression can't be parsed correctly. -// -// * ErrCodeInternalException "InternalException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeConflictingResourceUpdateException "ConflictingResourceUpdateException" -// A conflicting resource update exception. This exception is thrown when two -// pending updates cause a conflict. -// -func (c *IoT) ReplaceTopicRule(input *ReplaceTopicRuleInput) (*ReplaceTopicRuleOutput, error) { - req, out := c.ReplaceTopicRuleRequest(input) - return out, req.Send() -} - -// ReplaceTopicRuleWithContext is the same as ReplaceTopicRule with the addition of -// the ability to pass a context and additional request options. -// -// See ReplaceTopicRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ReplaceTopicRuleWithContext(ctx aws.Context, input *ReplaceTopicRuleInput, opts ...request.Option) (*ReplaceTopicRuleOutput, error) { - req, out := c.ReplaceTopicRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSearchIndex = "SearchIndex" - -// SearchIndexRequest generates a "aws/request.Request" representing the -// client's request for the SearchIndex operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SearchIndex for more information on using the SearchIndex -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SearchIndexRequest method. -// req, resp := client.SearchIndexRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) SearchIndexRequest(input *SearchIndexInput) (req *request.Request, output *SearchIndexOutput) { - op := &request.Operation{ - Name: opSearchIndex, - HTTPMethod: "POST", - HTTPPath: "/indices/search", - } - - if input == nil { - input = &SearchIndexInput{} - } - - output = &SearchIndexOutput{} - req = c.newRequest(op, input, output) - return -} - -// SearchIndex API operation for AWS IoT. -// -// The query search index. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation SearchIndex for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidQueryException "InvalidQueryException" -// The query is invalid. -// -// * ErrCodeIndexNotReadyException "IndexNotReadyException" -// The index is not ready. -// -func (c *IoT) SearchIndex(input *SearchIndexInput) (*SearchIndexOutput, error) { - req, out := c.SearchIndexRequest(input) - return out, req.Send() -} - -// SearchIndexWithContext is the same as SearchIndex with the addition of -// the ability to pass a context and additional request options. -// -// See SearchIndex for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) SearchIndexWithContext(ctx aws.Context, input *SearchIndexInput, opts ...request.Option) (*SearchIndexOutput, error) { - req, out := c.SearchIndexRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetDefaultAuthorizer = "SetDefaultAuthorizer" - -// SetDefaultAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the SetDefaultAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetDefaultAuthorizer for more information on using the SetDefaultAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetDefaultAuthorizerRequest method. -// req, resp := client.SetDefaultAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) SetDefaultAuthorizerRequest(input *SetDefaultAuthorizerInput) (req *request.Request, output *SetDefaultAuthorizerOutput) { - op := &request.Operation{ - Name: opSetDefaultAuthorizer, - HTTPMethod: "POST", - HTTPPath: "/default-authorizer", - } - - if input == nil { - input = &SetDefaultAuthorizerInput{} - } - - output = &SetDefaultAuthorizerOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetDefaultAuthorizer API operation for AWS IoT. -// -// Sets the default authorizer. This will be used if a websocket connection -// is made without specifying an authorizer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation SetDefaultAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -func (c *IoT) SetDefaultAuthorizer(input *SetDefaultAuthorizerInput) (*SetDefaultAuthorizerOutput, error) { - req, out := c.SetDefaultAuthorizerRequest(input) - return out, req.Send() -} - -// SetDefaultAuthorizerWithContext is the same as SetDefaultAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See SetDefaultAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) SetDefaultAuthorizerWithContext(ctx aws.Context, input *SetDefaultAuthorizerInput, opts ...request.Option) (*SetDefaultAuthorizerOutput, error) { - req, out := c.SetDefaultAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetDefaultPolicyVersion = "SetDefaultPolicyVersion" - -// SetDefaultPolicyVersionRequest generates a "aws/request.Request" representing the -// client's request for the SetDefaultPolicyVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetDefaultPolicyVersion for more information on using the SetDefaultPolicyVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetDefaultPolicyVersionRequest method. -// req, resp := client.SetDefaultPolicyVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) SetDefaultPolicyVersionRequest(input *SetDefaultPolicyVersionInput) (req *request.Request, output *SetDefaultPolicyVersionOutput) { - op := &request.Operation{ - Name: opSetDefaultPolicyVersion, - HTTPMethod: "PATCH", - HTTPPath: "/policies/{policyName}/version/{policyVersionId}", - } - - if input == nil { - input = &SetDefaultPolicyVersionInput{} - } - - output = &SetDefaultPolicyVersionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetDefaultPolicyVersion API operation for AWS IoT. -// -// Sets the specified version of the specified policy as the policy's default -// (operative) version. This action affects all certificates to which the policy -// is attached. To list the principals the policy is attached to, use the ListPrincipalPolicy -// API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation SetDefaultPolicyVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) SetDefaultPolicyVersion(input *SetDefaultPolicyVersionInput) (*SetDefaultPolicyVersionOutput, error) { - req, out := c.SetDefaultPolicyVersionRequest(input) - return out, req.Send() -} - -// SetDefaultPolicyVersionWithContext is the same as SetDefaultPolicyVersion with the addition of -// the ability to pass a context and additional request options. -// -// See SetDefaultPolicyVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) SetDefaultPolicyVersionWithContext(ctx aws.Context, input *SetDefaultPolicyVersionInput, opts ...request.Option) (*SetDefaultPolicyVersionOutput, error) { - req, out := c.SetDefaultPolicyVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetLoggingOptions = "SetLoggingOptions" - -// SetLoggingOptionsRequest generates a "aws/request.Request" representing the -// client's request for the SetLoggingOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetLoggingOptions for more information on using the SetLoggingOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetLoggingOptionsRequest method. -// req, resp := client.SetLoggingOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) SetLoggingOptionsRequest(input *SetLoggingOptionsInput) (req *request.Request, output *SetLoggingOptionsOutput) { - op := &request.Operation{ - Name: opSetLoggingOptions, - HTTPMethod: "POST", - HTTPPath: "/loggingOptions", - } - - if input == nil { - input = &SetLoggingOptionsInput{} - } - - output = &SetLoggingOptionsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetLoggingOptions API operation for AWS IoT. -// -// Sets the logging options. -// -// NOTE: use of this command is not recommended. Use SetV2LoggingOptions instead. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation SetLoggingOptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) SetLoggingOptions(input *SetLoggingOptionsInput) (*SetLoggingOptionsOutput, error) { - req, out := c.SetLoggingOptionsRequest(input) - return out, req.Send() -} - -// SetLoggingOptionsWithContext is the same as SetLoggingOptions with the addition of -// the ability to pass a context and additional request options. -// -// See SetLoggingOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) SetLoggingOptionsWithContext(ctx aws.Context, input *SetLoggingOptionsInput, opts ...request.Option) (*SetLoggingOptionsOutput, error) { - req, out := c.SetLoggingOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetV2LoggingLevel = "SetV2LoggingLevel" - -// SetV2LoggingLevelRequest generates a "aws/request.Request" representing the -// client's request for the SetV2LoggingLevel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetV2LoggingLevel for more information on using the SetV2LoggingLevel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetV2LoggingLevelRequest method. -// req, resp := client.SetV2LoggingLevelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) SetV2LoggingLevelRequest(input *SetV2LoggingLevelInput) (req *request.Request, output *SetV2LoggingLevelOutput) { - op := &request.Operation{ - Name: opSetV2LoggingLevel, - HTTPMethod: "POST", - HTTPPath: "/v2LoggingLevel", - } - - if input == nil { - input = &SetV2LoggingLevelInput{} - } - - output = &SetV2LoggingLevelOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetV2LoggingLevel API operation for AWS IoT. -// -// Sets the logging level. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation SetV2LoggingLevel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// An unexpected error has occurred. -// -// * ErrCodeNotConfiguredException "NotConfiguredException" -// The resource is not configured. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) SetV2LoggingLevel(input *SetV2LoggingLevelInput) (*SetV2LoggingLevelOutput, error) { - req, out := c.SetV2LoggingLevelRequest(input) - return out, req.Send() -} - -// SetV2LoggingLevelWithContext is the same as SetV2LoggingLevel with the addition of -// the ability to pass a context and additional request options. -// -// See SetV2LoggingLevel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) SetV2LoggingLevelWithContext(ctx aws.Context, input *SetV2LoggingLevelInput, opts ...request.Option) (*SetV2LoggingLevelOutput, error) { - req, out := c.SetV2LoggingLevelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetV2LoggingOptions = "SetV2LoggingOptions" - -// SetV2LoggingOptionsRequest generates a "aws/request.Request" representing the -// client's request for the SetV2LoggingOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetV2LoggingOptions for more information on using the SetV2LoggingOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetV2LoggingOptionsRequest method. -// req, resp := client.SetV2LoggingOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) SetV2LoggingOptionsRequest(input *SetV2LoggingOptionsInput) (req *request.Request, output *SetV2LoggingOptionsOutput) { - op := &request.Operation{ - Name: opSetV2LoggingOptions, - HTTPMethod: "POST", - HTTPPath: "/v2LoggingOptions", - } - - if input == nil { - input = &SetV2LoggingOptionsInput{} - } - - output = &SetV2LoggingOptionsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetV2LoggingOptions API operation for AWS IoT. -// -// Sets the logging options for the V2 logging service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation SetV2LoggingOptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) SetV2LoggingOptions(input *SetV2LoggingOptionsInput) (*SetV2LoggingOptionsOutput, error) { - req, out := c.SetV2LoggingOptionsRequest(input) - return out, req.Send() -} - -// SetV2LoggingOptionsWithContext is the same as SetV2LoggingOptions with the addition of -// the ability to pass a context and additional request options. -// -// See SetV2LoggingOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) SetV2LoggingOptionsWithContext(ctx aws.Context, input *SetV2LoggingOptionsInput, opts ...request.Option) (*SetV2LoggingOptionsOutput, error) { - req, out := c.SetV2LoggingOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartOnDemandAuditTask = "StartOnDemandAuditTask" - -// StartOnDemandAuditTaskRequest generates a "aws/request.Request" representing the -// client's request for the StartOnDemandAuditTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartOnDemandAuditTask for more information on using the StartOnDemandAuditTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartOnDemandAuditTaskRequest method. -// req, resp := client.StartOnDemandAuditTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) StartOnDemandAuditTaskRequest(input *StartOnDemandAuditTaskInput) (req *request.Request, output *StartOnDemandAuditTaskOutput) { - op := &request.Operation{ - Name: opStartOnDemandAuditTask, - HTTPMethod: "POST", - HTTPPath: "/audit/tasks", - } - - if input == nil { - input = &StartOnDemandAuditTaskInput{} - } - - output = &StartOnDemandAuditTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartOnDemandAuditTask API operation for AWS IoT. -// -// Starts an on-demand Device Defender audit. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation StartOnDemandAuditTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -func (c *IoT) StartOnDemandAuditTask(input *StartOnDemandAuditTaskInput) (*StartOnDemandAuditTaskOutput, error) { - req, out := c.StartOnDemandAuditTaskRequest(input) - return out, req.Send() -} - -// StartOnDemandAuditTaskWithContext is the same as StartOnDemandAuditTask with the addition of -// the ability to pass a context and additional request options. -// -// See StartOnDemandAuditTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) StartOnDemandAuditTaskWithContext(ctx aws.Context, input *StartOnDemandAuditTaskInput, opts ...request.Option) (*StartOnDemandAuditTaskOutput, error) { - req, out := c.StartOnDemandAuditTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartThingRegistrationTask = "StartThingRegistrationTask" - -// StartThingRegistrationTaskRequest generates a "aws/request.Request" representing the -// client's request for the StartThingRegistrationTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartThingRegistrationTask for more information on using the StartThingRegistrationTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartThingRegistrationTaskRequest method. -// req, resp := client.StartThingRegistrationTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) StartThingRegistrationTaskRequest(input *StartThingRegistrationTaskInput) (req *request.Request, output *StartThingRegistrationTaskOutput) { - op := &request.Operation{ - Name: opStartThingRegistrationTask, - HTTPMethod: "POST", - HTTPPath: "/thing-registration-tasks", - } - - if input == nil { - input = &StartThingRegistrationTaskInput{} - } - - output = &StartThingRegistrationTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartThingRegistrationTask API operation for AWS IoT. -// -// Creates a bulk thing provisioning task. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation StartThingRegistrationTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) StartThingRegistrationTask(input *StartThingRegistrationTaskInput) (*StartThingRegistrationTaskOutput, error) { - req, out := c.StartThingRegistrationTaskRequest(input) - return out, req.Send() -} - -// StartThingRegistrationTaskWithContext is the same as StartThingRegistrationTask with the addition of -// the ability to pass a context and additional request options. -// -// See StartThingRegistrationTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) StartThingRegistrationTaskWithContext(ctx aws.Context, input *StartThingRegistrationTaskInput, opts ...request.Option) (*StartThingRegistrationTaskOutput, error) { - req, out := c.StartThingRegistrationTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopThingRegistrationTask = "StopThingRegistrationTask" - -// StopThingRegistrationTaskRequest generates a "aws/request.Request" representing the -// client's request for the StopThingRegistrationTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopThingRegistrationTask for more information on using the StopThingRegistrationTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopThingRegistrationTaskRequest method. -// req, resp := client.StopThingRegistrationTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) StopThingRegistrationTaskRequest(input *StopThingRegistrationTaskInput) (req *request.Request, output *StopThingRegistrationTaskOutput) { - op := &request.Operation{ - Name: opStopThingRegistrationTask, - HTTPMethod: "PUT", - HTTPPath: "/thing-registration-tasks/{taskId}/cancel", - } - - if input == nil { - input = &StopThingRegistrationTaskInput{} - } - - output = &StopThingRegistrationTaskOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopThingRegistrationTask API operation for AWS IoT. -// -// Cancels a bulk thing provisioning task. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation StopThingRegistrationTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) StopThingRegistrationTask(input *StopThingRegistrationTaskInput) (*StopThingRegistrationTaskOutput, error) { - req, out := c.StopThingRegistrationTaskRequest(input) - return out, req.Send() -} - -// StopThingRegistrationTaskWithContext is the same as StopThingRegistrationTask with the addition of -// the ability to pass a context and additional request options. -// -// See StopThingRegistrationTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) StopThingRegistrationTaskWithContext(ctx aws.Context, input *StopThingRegistrationTaskInput, opts ...request.Option) (*StopThingRegistrationTaskOutput, error) { - req, out := c.StopThingRegistrationTaskRequest(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) -// } -func (c *IoT) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/tags", - } - - 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 IoT. -// -// Adds to or modifies the tags of the given resource. Tags are metadata which -// can be used to manage a 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 IoT's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -func (c *IoT) 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 *IoT) 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 opTestAuthorization = "TestAuthorization" - -// TestAuthorizationRequest generates a "aws/request.Request" representing the -// client's request for the TestAuthorization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TestAuthorization for more information on using the TestAuthorization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TestAuthorizationRequest method. -// req, resp := client.TestAuthorizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) TestAuthorizationRequest(input *TestAuthorizationInput) (req *request.Request, output *TestAuthorizationOutput) { - op := &request.Operation{ - Name: opTestAuthorization, - HTTPMethod: "POST", - HTTPPath: "/test-authorization", - } - - if input == nil { - input = &TestAuthorizationInput{} - } - - output = &TestAuthorizationOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestAuthorization API operation for AWS IoT. -// -// Tests if a specified principal is authorized to perform an AWS IoT action -// on a specified resource. Use this to test and debug the authorization behavior -// of devices that connect to the AWS IoT device gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation TestAuthorization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -func (c *IoT) TestAuthorization(input *TestAuthorizationInput) (*TestAuthorizationOutput, error) { - req, out := c.TestAuthorizationRequest(input) - return out, req.Send() -} - -// TestAuthorizationWithContext is the same as TestAuthorization with the addition of -// the ability to pass a context and additional request options. -// -// See TestAuthorization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) TestAuthorizationWithContext(ctx aws.Context, input *TestAuthorizationInput, opts ...request.Option) (*TestAuthorizationOutput, error) { - req, out := c.TestAuthorizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTestInvokeAuthorizer = "TestInvokeAuthorizer" - -// TestInvokeAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the TestInvokeAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TestInvokeAuthorizer for more information on using the TestInvokeAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TestInvokeAuthorizerRequest method. -// req, resp := client.TestInvokeAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) TestInvokeAuthorizerRequest(input *TestInvokeAuthorizerInput) (req *request.Request, output *TestInvokeAuthorizerOutput) { - op := &request.Operation{ - Name: opTestInvokeAuthorizer, - HTTPMethod: "POST", - HTTPPath: "/authorizer/{authorizerName}/test", - } - - if input == nil { - input = &TestInvokeAuthorizerInput{} - } - - output = &TestInvokeAuthorizerOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestInvokeAuthorizer API operation for AWS IoT. -// -// Tests a custom authorization behavior by invoking a specified custom authorizer. -// Use this to test and debug the custom authorization behavior of devices that -// connect to the AWS IoT device gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation TestInvokeAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeInvalidResponseException "InvalidResponseException" -// The response is invalid. -// -func (c *IoT) TestInvokeAuthorizer(input *TestInvokeAuthorizerInput) (*TestInvokeAuthorizerOutput, error) { - req, out := c.TestInvokeAuthorizerRequest(input) - return out, req.Send() -} - -// TestInvokeAuthorizerWithContext is the same as TestInvokeAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See TestInvokeAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) TestInvokeAuthorizerWithContext(ctx aws.Context, input *TestInvokeAuthorizerInput, opts ...request.Option) (*TestInvokeAuthorizerOutput, error) { - req, out := c.TestInvokeAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTransferCertificate = "TransferCertificate" - -// TransferCertificateRequest generates a "aws/request.Request" representing the -// client's request for the TransferCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TransferCertificate for more information on using the TransferCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TransferCertificateRequest method. -// req, resp := client.TransferCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) TransferCertificateRequest(input *TransferCertificateInput) (req *request.Request, output *TransferCertificateOutput) { - op := &request.Operation{ - Name: opTransferCertificate, - HTTPMethod: "PATCH", - HTTPPath: "/transfer-certificate/{certificateId}", - } - - if input == nil { - input = &TransferCertificateInput{} - } - - output = &TransferCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// TransferCertificate API operation for AWS IoT. -// -// Transfers the specified certificate to the specified AWS account. -// -// You can cancel the transfer until it is acknowledged by the recipient. -// -// No notification is sent to the transfer destination's account. It is up to -// the caller to notify the transfer target. -// -// The certificate being transferred must not be in the ACTIVE state. You can -// use the UpdateCertificate API to deactivate it. -// -// The certificate must not have any policies attached to it. You can use the -// DetachPrincipalPolicy API to detach them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation TransferCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeCertificateStateException "CertificateStateException" -// The certificate operation is not allowed. -// -// * ErrCodeTransferConflictException "TransferConflictException" -// You can't transfer the certificate because authorization policies are still -// attached. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) TransferCertificate(input *TransferCertificateInput) (*TransferCertificateOutput, error) { - req, out := c.TransferCertificateRequest(input) - return out, req.Send() -} - -// TransferCertificateWithContext is the same as TransferCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See TransferCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) TransferCertificateWithContext(ctx aws.Context, input *TransferCertificateInput, opts ...request.Option) (*TransferCertificateOutput, error) { - req, out := c.TransferCertificateRequest(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) -// } -func (c *IoT) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/untag", - } - - 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 IoT. -// -// Removes the given tags (metadata) from the 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 IoT's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -func (c *IoT) 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 *IoT) 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 opUpdateAccountAuditConfiguration = "UpdateAccountAuditConfiguration" - -// UpdateAccountAuditConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAccountAuditConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAccountAuditConfiguration for more information on using the UpdateAccountAuditConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAccountAuditConfigurationRequest method. -// req, resp := client.UpdateAccountAuditConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateAccountAuditConfigurationRequest(input *UpdateAccountAuditConfigurationInput) (req *request.Request, output *UpdateAccountAuditConfigurationOutput) { - op := &request.Operation{ - Name: opUpdateAccountAuditConfiguration, - HTTPMethod: "PATCH", - HTTPPath: "/audit/configuration", - } - - if input == nil { - input = &UpdateAccountAuditConfigurationInput{} - } - - output = &UpdateAccountAuditConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateAccountAuditConfiguration API operation for AWS IoT. -// -// Configures or reconfigures the Device Defender audit settings for this account. -// Settings include how audit notifications are sent and which audit checks -// are enabled or disabled. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation UpdateAccountAuditConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) UpdateAccountAuditConfiguration(input *UpdateAccountAuditConfigurationInput) (*UpdateAccountAuditConfigurationOutput, error) { - req, out := c.UpdateAccountAuditConfigurationRequest(input) - return out, req.Send() -} - -// UpdateAccountAuditConfigurationWithContext is the same as UpdateAccountAuditConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAccountAuditConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateAccountAuditConfigurationWithContext(ctx aws.Context, input *UpdateAccountAuditConfigurationInput, opts ...request.Option) (*UpdateAccountAuditConfigurationOutput, error) { - req, out := c.UpdateAccountAuditConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAuthorizer = "UpdateAuthorizer" - -// UpdateAuthorizerRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAuthorizer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAuthorizer for more information on using the UpdateAuthorizer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAuthorizerRequest method. -// req, resp := client.UpdateAuthorizerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateAuthorizerRequest(input *UpdateAuthorizerInput) (req *request.Request, output *UpdateAuthorizerOutput) { - op := &request.Operation{ - Name: opUpdateAuthorizer, - HTTPMethod: "PUT", - HTTPPath: "/authorizer/{authorizerName}", - } - - if input == nil { - input = &UpdateAuthorizerInput{} - } - - output = &UpdateAuthorizerOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateAuthorizer API operation for AWS IoT. -// -// Updates an authorizer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation UpdateAuthorizer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit has been exceeded. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) UpdateAuthorizer(input *UpdateAuthorizerInput) (*UpdateAuthorizerOutput, error) { - req, out := c.UpdateAuthorizerRequest(input) - return out, req.Send() -} - -// UpdateAuthorizerWithContext is the same as UpdateAuthorizer with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAuthorizer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateAuthorizerWithContext(ctx aws.Context, input *UpdateAuthorizerInput, opts ...request.Option) (*UpdateAuthorizerOutput, error) { - req, out := c.UpdateAuthorizerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateBillingGroup = "UpdateBillingGroup" - -// UpdateBillingGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateBillingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateBillingGroup for more information on using the UpdateBillingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateBillingGroupRequest method. -// req, resp := client.UpdateBillingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateBillingGroupRequest(input *UpdateBillingGroupInput) (req *request.Request, output *UpdateBillingGroupOutput) { - op := &request.Operation{ - Name: opUpdateBillingGroup, - HTTPMethod: "PATCH", - HTTPPath: "/billing-groups/{billingGroupName}", - } - - if input == nil { - input = &UpdateBillingGroupInput{} - } - - output = &UpdateBillingGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateBillingGroup API operation for AWS IoT. -// -// Updates information about the billing 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 IoT's -// API operation UpdateBillingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of an entity specified with the expectedVersion -// parameter does not match the latest version in the system. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) UpdateBillingGroup(input *UpdateBillingGroupInput) (*UpdateBillingGroupOutput, error) { - req, out := c.UpdateBillingGroupRequest(input) - return out, req.Send() -} - -// UpdateBillingGroupWithContext is the same as UpdateBillingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateBillingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateBillingGroupWithContext(ctx aws.Context, input *UpdateBillingGroupInput, opts ...request.Option) (*UpdateBillingGroupOutput, error) { - req, out := c.UpdateBillingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateCACertificate = "UpdateCACertificate" - -// UpdateCACertificateRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCACertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateCACertificate for more information on using the UpdateCACertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateCACertificateRequest method. -// req, resp := client.UpdateCACertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateCACertificateRequest(input *UpdateCACertificateInput) (req *request.Request, output *UpdateCACertificateOutput) { - op := &request.Operation{ - Name: opUpdateCACertificate, - HTTPMethod: "PUT", - HTTPPath: "/cacertificate/{caCertificateId}", - } - - if input == nil { - input = &UpdateCACertificateInput{} - } - - output = &UpdateCACertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateCACertificate API operation for AWS IoT. -// -// Updates a registered CA certificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation UpdateCACertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) UpdateCACertificate(input *UpdateCACertificateInput) (*UpdateCACertificateOutput, error) { - req, out := c.UpdateCACertificateRequest(input) - return out, req.Send() -} - -// UpdateCACertificateWithContext is the same as UpdateCACertificate with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCACertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateCACertificateWithContext(ctx aws.Context, input *UpdateCACertificateInput, opts ...request.Option) (*UpdateCACertificateOutput, error) { - req, out := c.UpdateCACertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateCertificate = "UpdateCertificate" - -// UpdateCertificateRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateCertificate for more information on using the UpdateCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateCertificateRequest method. -// req, resp := client.UpdateCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateCertificateRequest(input *UpdateCertificateInput) (req *request.Request, output *UpdateCertificateOutput) { - op := &request.Operation{ - Name: opUpdateCertificate, - HTTPMethod: "PUT", - HTTPPath: "/certificates/{certificateId}", - } - - if input == nil { - input = &UpdateCertificateInput{} - } - - output = &UpdateCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateCertificate API operation for AWS IoT. -// -// Updates the status of the specified certificate. This operation is idempotent. -// -// Moving a certificate from the ACTIVE state (including REVOKED) will not disconnect -// currently connected devices, but these devices will be unable to reconnect. -// -// The ACTIVE state is required to authenticate devices connecting to AWS IoT -// using a certificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation UpdateCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeCertificateStateException "CertificateStateException" -// The certificate operation is not allowed. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) UpdateCertificate(input *UpdateCertificateInput) (*UpdateCertificateOutput, error) { - req, out := c.UpdateCertificateRequest(input) - return out, req.Send() -} - -// UpdateCertificateWithContext is the same as UpdateCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateCertificateWithContext(ctx aws.Context, input *UpdateCertificateInput, opts ...request.Option) (*UpdateCertificateOutput, error) { - req, out := c.UpdateCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDynamicThingGroup = "UpdateDynamicThingGroup" - -// UpdateDynamicThingGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDynamicThingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDynamicThingGroup for more information on using the UpdateDynamicThingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDynamicThingGroupRequest method. -// req, resp := client.UpdateDynamicThingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateDynamicThingGroupRequest(input *UpdateDynamicThingGroupInput) (req *request.Request, output *UpdateDynamicThingGroupOutput) { - op := &request.Operation{ - Name: opUpdateDynamicThingGroup, - HTTPMethod: "PATCH", - HTTPPath: "/dynamic-thing-groups/{thingGroupName}", - } - - if input == nil { - input = &UpdateDynamicThingGroupInput{} - } - - output = &UpdateDynamicThingGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDynamicThingGroup API operation for AWS IoT. -// -// Updates a dynamic thing 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 IoT's -// API operation UpdateDynamicThingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of an entity specified with the expectedVersion -// parameter does not match the latest version in the system. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidQueryException "InvalidQueryException" -// The query is invalid. -// -func (c *IoT) UpdateDynamicThingGroup(input *UpdateDynamicThingGroupInput) (*UpdateDynamicThingGroupOutput, error) { - req, out := c.UpdateDynamicThingGroupRequest(input) - return out, req.Send() -} - -// UpdateDynamicThingGroupWithContext is the same as UpdateDynamicThingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDynamicThingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateDynamicThingGroupWithContext(ctx aws.Context, input *UpdateDynamicThingGroupInput, opts ...request.Option) (*UpdateDynamicThingGroupOutput, error) { - req, out := c.UpdateDynamicThingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateEventConfigurations = "UpdateEventConfigurations" - -// UpdateEventConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the UpdateEventConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateEventConfigurations for more information on using the UpdateEventConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateEventConfigurationsRequest method. -// req, resp := client.UpdateEventConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateEventConfigurationsRequest(input *UpdateEventConfigurationsInput) (req *request.Request, output *UpdateEventConfigurationsOutput) { - op := &request.Operation{ - Name: opUpdateEventConfigurations, - HTTPMethod: "PATCH", - HTTPPath: "/event-configurations", - } - - if input == nil { - input = &UpdateEventConfigurationsInput{} - } - - output = &UpdateEventConfigurationsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateEventConfigurations API operation for AWS IoT. -// -// Updates the event 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 IoT's -// API operation UpdateEventConfigurations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -func (c *IoT) UpdateEventConfigurations(input *UpdateEventConfigurationsInput) (*UpdateEventConfigurationsOutput, error) { - req, out := c.UpdateEventConfigurationsRequest(input) - return out, req.Send() -} - -// UpdateEventConfigurationsWithContext is the same as UpdateEventConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateEventConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateEventConfigurationsWithContext(ctx aws.Context, input *UpdateEventConfigurationsInput, opts ...request.Option) (*UpdateEventConfigurationsOutput, error) { - req, out := c.UpdateEventConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateIndexingConfiguration = "UpdateIndexingConfiguration" - -// UpdateIndexingConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateIndexingConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateIndexingConfiguration for more information on using the UpdateIndexingConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateIndexingConfigurationRequest method. -// req, resp := client.UpdateIndexingConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateIndexingConfigurationRequest(input *UpdateIndexingConfigurationInput) (req *request.Request, output *UpdateIndexingConfigurationOutput) { - op := &request.Operation{ - Name: opUpdateIndexingConfiguration, - HTTPMethod: "POST", - HTTPPath: "/indexing/config", - } - - if input == nil { - input = &UpdateIndexingConfigurationInput{} - } - - output = &UpdateIndexingConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateIndexingConfiguration API operation for AWS IoT. -// -// Updates the search configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation UpdateIndexingConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) UpdateIndexingConfiguration(input *UpdateIndexingConfigurationInput) (*UpdateIndexingConfigurationOutput, error) { - req, out := c.UpdateIndexingConfigurationRequest(input) - return out, req.Send() -} - -// UpdateIndexingConfigurationWithContext is the same as UpdateIndexingConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateIndexingConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateIndexingConfigurationWithContext(ctx aws.Context, input *UpdateIndexingConfigurationInput, opts ...request.Option) (*UpdateIndexingConfigurationOutput, error) { - req, out := c.UpdateIndexingConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateJob = "UpdateJob" - -// UpdateJobRequest generates a "aws/request.Request" representing the -// client's request for the UpdateJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateJob for more information on using the UpdateJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateJobRequest method. -// req, resp := client.UpdateJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateJobRequest(input *UpdateJobInput) (req *request.Request, output *UpdateJobOutput) { - op := &request.Operation{ - Name: opUpdateJob, - HTTPMethod: "PATCH", - HTTPPath: "/jobs/{jobId}", - } - - if input == nil { - input = &UpdateJobInput{} - } - - output = &UpdateJobOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateJob API operation for AWS IoT. -// -// Updates supported fields of the specified 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 IoT's -// API operation UpdateJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -func (c *IoT) UpdateJob(input *UpdateJobInput) (*UpdateJobOutput, error) { - req, out := c.UpdateJobRequest(input) - return out, req.Send() -} - -// UpdateJobWithContext is the same as UpdateJob with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateJobWithContext(ctx aws.Context, input *UpdateJobInput, opts ...request.Option) (*UpdateJobOutput, error) { - req, out := c.UpdateJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRoleAlias = "UpdateRoleAlias" - -// UpdateRoleAliasRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRoleAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRoleAlias for more information on using the UpdateRoleAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRoleAliasRequest method. -// req, resp := client.UpdateRoleAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateRoleAliasRequest(input *UpdateRoleAliasInput) (req *request.Request, output *UpdateRoleAliasOutput) { - op := &request.Operation{ - Name: opUpdateRoleAlias, - HTTPMethod: "PUT", - HTTPPath: "/role-aliases/{roleAlias}", - } - - if input == nil { - input = &UpdateRoleAliasInput{} - } - - output = &UpdateRoleAliasOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRoleAlias API operation for AWS IoT. -// -// Updates a role alias. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation UpdateRoleAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) UpdateRoleAlias(input *UpdateRoleAliasInput) (*UpdateRoleAliasOutput, error) { - req, out := c.UpdateRoleAliasRequest(input) - return out, req.Send() -} - -// UpdateRoleAliasWithContext is the same as UpdateRoleAlias with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRoleAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateRoleAliasWithContext(ctx aws.Context, input *UpdateRoleAliasInput, opts ...request.Option) (*UpdateRoleAliasOutput, error) { - req, out := c.UpdateRoleAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateScheduledAudit = "UpdateScheduledAudit" - -// UpdateScheduledAuditRequest generates a "aws/request.Request" representing the -// client's request for the UpdateScheduledAudit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateScheduledAudit for more information on using the UpdateScheduledAudit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateScheduledAuditRequest method. -// req, resp := client.UpdateScheduledAuditRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateScheduledAuditRequest(input *UpdateScheduledAuditInput) (req *request.Request, output *UpdateScheduledAuditOutput) { - op := &request.Operation{ - Name: opUpdateScheduledAudit, - HTTPMethod: "PATCH", - HTTPPath: "/audit/scheduledaudits/{scheduledAuditName}", - } - - if input == nil { - input = &UpdateScheduledAuditInput{} - } - - output = &UpdateScheduledAuditOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateScheduledAudit API operation for AWS IoT. -// -// Updates a scheduled audit, including what checks are performed and how often -// the audit takes place. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation UpdateScheduledAudit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) UpdateScheduledAudit(input *UpdateScheduledAuditInput) (*UpdateScheduledAuditOutput, error) { - req, out := c.UpdateScheduledAuditRequest(input) - return out, req.Send() -} - -// UpdateScheduledAuditWithContext is the same as UpdateScheduledAudit with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateScheduledAudit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateScheduledAuditWithContext(ctx aws.Context, input *UpdateScheduledAuditInput, opts ...request.Option) (*UpdateScheduledAuditOutput, error) { - req, out := c.UpdateScheduledAuditRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSecurityProfile = "UpdateSecurityProfile" - -// UpdateSecurityProfileRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSecurityProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSecurityProfile for more information on using the UpdateSecurityProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSecurityProfileRequest method. -// req, resp := client.UpdateSecurityProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateSecurityProfileRequest(input *UpdateSecurityProfileInput) (req *request.Request, output *UpdateSecurityProfileOutput) { - op := &request.Operation{ - Name: opUpdateSecurityProfile, - HTTPMethod: "PATCH", - HTTPPath: "/security-profiles/{securityProfileName}", - } - - if input == nil { - input = &UpdateSecurityProfileInput{} - } - - output = &UpdateSecurityProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSecurityProfile API operation for AWS IoT. -// -// Updates a Device Defender security profile. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation UpdateSecurityProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of an entity specified with the expectedVersion -// parameter does not match the latest version in the system. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) UpdateSecurityProfile(input *UpdateSecurityProfileInput) (*UpdateSecurityProfileOutput, error) { - req, out := c.UpdateSecurityProfileRequest(input) - return out, req.Send() -} - -// UpdateSecurityProfileWithContext is the same as UpdateSecurityProfile with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSecurityProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateSecurityProfileWithContext(ctx aws.Context, input *UpdateSecurityProfileInput, opts ...request.Option) (*UpdateSecurityProfileOutput, error) { - req, out := c.UpdateSecurityProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateStream = "UpdateStream" - -// UpdateStreamRequest generates a "aws/request.Request" representing the -// client's request for the UpdateStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateStream for more information on using the UpdateStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateStreamRequest method. -// req, resp := client.UpdateStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateStreamRequest(input *UpdateStreamInput) (req *request.Request, output *UpdateStreamOutput) { - op := &request.Operation{ - Name: opUpdateStream, - HTTPMethod: "PUT", - HTTPPath: "/streams/{streamId}", - } - - if input == nil { - input = &UpdateStreamInput{} - } - - output = &UpdateStreamOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateStream API operation for AWS IoT. -// -// Updates an existing stream. The stream version will be incremented by one. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation UpdateStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) UpdateStream(input *UpdateStreamInput) (*UpdateStreamOutput, error) { - req, out := c.UpdateStreamRequest(input) - return out, req.Send() -} - -// UpdateStreamWithContext is the same as UpdateStream with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateStreamWithContext(ctx aws.Context, input *UpdateStreamInput, opts ...request.Option) (*UpdateStreamOutput, error) { - req, out := c.UpdateStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateThing = "UpdateThing" - -// UpdateThingRequest generates a "aws/request.Request" representing the -// client's request for the UpdateThing operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateThing for more information on using the UpdateThing -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateThingRequest method. -// req, resp := client.UpdateThingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateThingRequest(input *UpdateThingInput) (req *request.Request, output *UpdateThingOutput) { - op := &request.Operation{ - Name: opUpdateThing, - HTTPMethod: "PATCH", - HTTPPath: "/things/{thingName}", - } - - if input == nil { - input = &UpdateThingInput{} - } - - output = &UpdateThingOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateThing API operation for AWS IoT. -// -// Updates the data for a thing. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation UpdateThing for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of an entity specified with the expectedVersion -// parameter does not match the latest version in the system. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this operation. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is temporarily unavailable. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) UpdateThing(input *UpdateThingInput) (*UpdateThingOutput, error) { - req, out := c.UpdateThingRequest(input) - return out, req.Send() -} - -// UpdateThingWithContext is the same as UpdateThing with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateThing for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateThingWithContext(ctx aws.Context, input *UpdateThingInput, opts ...request.Option) (*UpdateThingOutput, error) { - req, out := c.UpdateThingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateThingGroup = "UpdateThingGroup" - -// UpdateThingGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateThingGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateThingGroup for more information on using the UpdateThingGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateThingGroupRequest method. -// req, resp := client.UpdateThingGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateThingGroupRequest(input *UpdateThingGroupInput) (req *request.Request, output *UpdateThingGroupOutput) { - op := &request.Operation{ - Name: opUpdateThingGroup, - HTTPMethod: "PATCH", - HTTPPath: "/thing-groups/{thingGroupName}", - } - - if input == nil { - input = &UpdateThingGroupInput{} - } - - output = &UpdateThingGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateThingGroup API operation for AWS IoT. -// -// Update a thing 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 IoT's -// API operation UpdateThingGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of an entity specified with the expectedVersion -// parameter does not match the latest version in the system. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) UpdateThingGroup(input *UpdateThingGroupInput) (*UpdateThingGroupOutput, error) { - req, out := c.UpdateThingGroupRequest(input) - return out, req.Send() -} - -// UpdateThingGroupWithContext is the same as UpdateThingGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateThingGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateThingGroupWithContext(ctx aws.Context, input *UpdateThingGroupInput, opts ...request.Option) (*UpdateThingGroupOutput, error) { - req, out := c.UpdateThingGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateThingGroupsForThing = "UpdateThingGroupsForThing" - -// UpdateThingGroupsForThingRequest generates a "aws/request.Request" representing the -// client's request for the UpdateThingGroupsForThing operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateThingGroupsForThing for more information on using the UpdateThingGroupsForThing -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateThingGroupsForThingRequest method. -// req, resp := client.UpdateThingGroupsForThingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) UpdateThingGroupsForThingRequest(input *UpdateThingGroupsForThingInput) (req *request.Request, output *UpdateThingGroupsForThingOutput) { - op := &request.Operation{ - Name: opUpdateThingGroupsForThing, - HTTPMethod: "PUT", - HTTPPath: "/thing-groups/updateThingGroupsForThing", - } - - if input == nil { - input = &UpdateThingGroupsForThingInput{} - } - - output = &UpdateThingGroupsForThingOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateThingGroupsForThing API operation for AWS IoT. -// -// Updates the groups to which the thing belongs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation UpdateThingGroupsForThing for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource does not exist. -// -func (c *IoT) UpdateThingGroupsForThing(input *UpdateThingGroupsForThingInput) (*UpdateThingGroupsForThingOutput, error) { - req, out := c.UpdateThingGroupsForThingRequest(input) - return out, req.Send() -} - -// UpdateThingGroupsForThingWithContext is the same as UpdateThingGroupsForThing with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateThingGroupsForThing for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) UpdateThingGroupsForThingWithContext(ctx aws.Context, input *UpdateThingGroupsForThingInput, opts ...request.Option) (*UpdateThingGroupsForThingOutput, error) { - req, out := c.UpdateThingGroupsForThingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opValidateSecurityProfileBehaviors = "ValidateSecurityProfileBehaviors" - -// ValidateSecurityProfileBehaviorsRequest generates a "aws/request.Request" representing the -// client's request for the ValidateSecurityProfileBehaviors operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ValidateSecurityProfileBehaviors for more information on using the ValidateSecurityProfileBehaviors -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ValidateSecurityProfileBehaviorsRequest method. -// req, resp := client.ValidateSecurityProfileBehaviorsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *IoT) ValidateSecurityProfileBehaviorsRequest(input *ValidateSecurityProfileBehaviorsInput) (req *request.Request, output *ValidateSecurityProfileBehaviorsOutput) { - op := &request.Operation{ - Name: opValidateSecurityProfileBehaviors, - HTTPMethod: "POST", - HTTPPath: "/security-profile-behaviors/validate", - } - - if input == nil { - input = &ValidateSecurityProfileBehaviorsInput{} - } - - output = &ValidateSecurityProfileBehaviorsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ValidateSecurityProfileBehaviors API operation for AWS IoT. -// -// Validates a Device Defender security profile behaviors specification. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS IoT's -// API operation ValidateSecurityProfileBehaviors for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The rate exceeds the limit. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An unexpected error has occurred. -// -func (c *IoT) ValidateSecurityProfileBehaviors(input *ValidateSecurityProfileBehaviorsInput) (*ValidateSecurityProfileBehaviorsOutput, error) { - req, out := c.ValidateSecurityProfileBehaviorsRequest(input) - return out, req.Send() -} - -// ValidateSecurityProfileBehaviorsWithContext is the same as ValidateSecurityProfileBehaviors with the addition of -// the ability to pass a context and additional request options. -// -// See ValidateSecurityProfileBehaviors for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IoT) ValidateSecurityProfileBehaviorsWithContext(ctx aws.Context, input *ValidateSecurityProfileBehaviorsInput, opts ...request.Option) (*ValidateSecurityProfileBehaviorsOutput, error) { - req, out := c.ValidateSecurityProfileBehaviorsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Details of abort criteria to abort the job. -type AbortConfig struct { - _ struct{} `type:"structure"` - - // The list of abort criteria to define rules to abort the job. - // - // CriteriaList is a required field - CriteriaList []*AbortCriteria `locationName:"criteriaList" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s AbortConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AbortConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AbortConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AbortConfig"} - if s.CriteriaList == nil { - invalidParams.Add(request.NewErrParamRequired("CriteriaList")) - } - if s.CriteriaList != nil && len(s.CriteriaList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CriteriaList", 1)) - } - if s.CriteriaList != nil { - for i, v := range s.CriteriaList { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CriteriaList", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCriteriaList sets the CriteriaList field's value. -func (s *AbortConfig) SetCriteriaList(v []*AbortCriteria) *AbortConfig { - s.CriteriaList = v - return s -} - -// Details of abort criteria to define rules to abort the job. -type AbortCriteria struct { - _ struct{} `type:"structure"` - - // The type of abort action to initiate a job abort. - // - // Action is a required field - Action *string `locationName:"action" type:"string" required:"true" enum:"AbortAction"` - - // The type of job execution failure to define a rule to initiate a job abort. - // - // FailureType is a required field - FailureType *string `locationName:"failureType" type:"string" required:"true" enum:"JobExecutionFailureType"` - - // Minimum number of executed things before evaluating an abort rule. - // - // MinNumberOfExecutedThings is a required field - MinNumberOfExecutedThings *int64 `locationName:"minNumberOfExecutedThings" min:"1" type:"integer" required:"true"` - - // The threshold as a percentage of the total number of executed things that - // will initiate a job abort. - // - // AWS IoT supports up to two digits after the decimal (for example, 10.9 and - // 10.99, but not 10.999). - // - // ThresholdPercentage is a required field - ThresholdPercentage *float64 `locationName:"thresholdPercentage" type:"double" required:"true"` -} - -// String returns the string representation -func (s AbortCriteria) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AbortCriteria) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AbortCriteria) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AbortCriteria"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.FailureType == nil { - invalidParams.Add(request.NewErrParamRequired("FailureType")) - } - if s.MinNumberOfExecutedThings == nil { - invalidParams.Add(request.NewErrParamRequired("MinNumberOfExecutedThings")) - } - if s.MinNumberOfExecutedThings != nil && *s.MinNumberOfExecutedThings < 1 { - invalidParams.Add(request.NewErrParamMinValue("MinNumberOfExecutedThings", 1)) - } - if s.ThresholdPercentage == nil { - invalidParams.Add(request.NewErrParamRequired("ThresholdPercentage")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *AbortCriteria) SetAction(v string) *AbortCriteria { - s.Action = &v - return s -} - -// SetFailureType sets the FailureType field's value. -func (s *AbortCriteria) SetFailureType(v string) *AbortCriteria { - s.FailureType = &v - return s -} - -// SetMinNumberOfExecutedThings sets the MinNumberOfExecutedThings field's value. -func (s *AbortCriteria) SetMinNumberOfExecutedThings(v int64) *AbortCriteria { - s.MinNumberOfExecutedThings = &v - return s -} - -// SetThresholdPercentage sets the ThresholdPercentage field's value. -func (s *AbortCriteria) SetThresholdPercentage(v float64) *AbortCriteria { - s.ThresholdPercentage = &v - return s -} - -// The input for the AcceptCertificateTransfer operation. -type AcceptCertificateTransferInput struct { - _ struct{} `type:"structure"` - - // The ID of the certificate. (The last part of the certificate ARN contains - // the certificate ID.) - // - // CertificateId is a required field - CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` - - // Specifies whether the certificate is active. - SetAsActive *bool `location:"querystring" locationName:"setAsActive" type:"boolean"` -} - -// String returns the string representation -func (s AcceptCertificateTransferInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptCertificateTransferInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AcceptCertificateTransferInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AcceptCertificateTransferInput"} - if s.CertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateId")) - } - if s.CertificateId != nil && len(*s.CertificateId) < 64 { - invalidParams.Add(request.NewErrParamMinLen("CertificateId", 64)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateId sets the CertificateId field's value. -func (s *AcceptCertificateTransferInput) SetCertificateId(v string) *AcceptCertificateTransferInput { - s.CertificateId = &v - return s -} - -// SetSetAsActive sets the SetAsActive field's value. -func (s *AcceptCertificateTransferInput) SetSetAsActive(v bool) *AcceptCertificateTransferInput { - s.SetAsActive = &v - return s -} - -type AcceptCertificateTransferOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AcceptCertificateTransferOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptCertificateTransferOutput) GoString() string { - return s.String() -} - -// Describes the actions associated with a rule. -type Action struct { - _ struct{} `type:"structure"` - - // Change the state of a CloudWatch alarm. - CloudwatchAlarm *CloudwatchAlarmAction `locationName:"cloudwatchAlarm" type:"structure"` - - // Capture a CloudWatch metric. - CloudwatchMetric *CloudwatchMetricAction `locationName:"cloudwatchMetric" type:"structure"` - - // Write to a DynamoDB table. - DynamoDB *DynamoDBAction `locationName:"dynamoDB" type:"structure"` - - // Write to a DynamoDB table. This is a new version of the DynamoDB action. - // It allows you to write each attribute in an MQTT message payload into a separate - // DynamoDB column. - DynamoDBv2 *DynamoDBv2Action `locationName:"dynamoDBv2" type:"structure"` - - // Write data to an Amazon Elasticsearch Service domain. - Elasticsearch *ElasticsearchAction `locationName:"elasticsearch" type:"structure"` - - // Write to an Amazon Kinesis Firehose stream. - Firehose *FirehoseAction `locationName:"firehose" type:"structure"` - - // Sends message data to an AWS IoT Analytics channel. - IotAnalytics *IotAnalyticsAction `locationName:"iotAnalytics" type:"structure"` - - // Sends an input to an AWS IoT Events detector. - IotEvents *IotEventsAction `locationName:"iotEvents" type:"structure"` - - // Write data to an Amazon Kinesis stream. - Kinesis *KinesisAction `locationName:"kinesis" type:"structure"` - - // Invoke a Lambda function. - Lambda *LambdaAction `locationName:"lambda" type:"structure"` - - // Publish to another MQTT topic. - Republish *RepublishAction `locationName:"republish" type:"structure"` - - // Write to an Amazon S3 bucket. - S3 *S3Action `locationName:"s3" type:"structure"` - - // Send a message to a Salesforce IoT Cloud Input Stream. - Salesforce *SalesforceAction `locationName:"salesforce" type:"structure"` - - // Publish to an Amazon SNS topic. - Sns *SnsAction `locationName:"sns" type:"structure"` - - // Publish to an Amazon SQS queue. - Sqs *SqsAction `locationName:"sqs" type:"structure"` - - // Starts execution of a Step Functions state machine. - StepFunctions *StepFunctionsAction `locationName:"stepFunctions" type:"structure"` -} - -// String returns the string representation -func (s Action) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Action) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Action) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Action"} - if s.CloudwatchAlarm != nil { - if err := s.CloudwatchAlarm.Validate(); err != nil { - invalidParams.AddNested("CloudwatchAlarm", err.(request.ErrInvalidParams)) - } - } - if s.CloudwatchMetric != nil { - if err := s.CloudwatchMetric.Validate(); err != nil { - invalidParams.AddNested("CloudwatchMetric", err.(request.ErrInvalidParams)) - } - } - if s.DynamoDB != nil { - if err := s.DynamoDB.Validate(); err != nil { - invalidParams.AddNested("DynamoDB", err.(request.ErrInvalidParams)) - } - } - if s.DynamoDBv2 != nil { - if err := s.DynamoDBv2.Validate(); err != nil { - invalidParams.AddNested("DynamoDBv2", err.(request.ErrInvalidParams)) - } - } - if s.Elasticsearch != nil { - if err := s.Elasticsearch.Validate(); err != nil { - invalidParams.AddNested("Elasticsearch", err.(request.ErrInvalidParams)) - } - } - if s.Firehose != nil { - if err := s.Firehose.Validate(); err != nil { - invalidParams.AddNested("Firehose", err.(request.ErrInvalidParams)) - } - } - if s.IotEvents != nil { - if err := s.IotEvents.Validate(); err != nil { - invalidParams.AddNested("IotEvents", err.(request.ErrInvalidParams)) - } - } - if s.Kinesis != nil { - if err := s.Kinesis.Validate(); err != nil { - invalidParams.AddNested("Kinesis", err.(request.ErrInvalidParams)) - } - } - if s.Lambda != nil { - if err := s.Lambda.Validate(); err != nil { - invalidParams.AddNested("Lambda", err.(request.ErrInvalidParams)) - } - } - if s.Republish != nil { - if err := s.Republish.Validate(); err != nil { - invalidParams.AddNested("Republish", err.(request.ErrInvalidParams)) - } - } - if s.S3 != nil { - if err := s.S3.Validate(); err != nil { - invalidParams.AddNested("S3", err.(request.ErrInvalidParams)) - } - } - if s.Salesforce != nil { - if err := s.Salesforce.Validate(); err != nil { - invalidParams.AddNested("Salesforce", err.(request.ErrInvalidParams)) - } - } - if s.Sns != nil { - if err := s.Sns.Validate(); err != nil { - invalidParams.AddNested("Sns", err.(request.ErrInvalidParams)) - } - } - if s.Sqs != nil { - if err := s.Sqs.Validate(); err != nil { - invalidParams.AddNested("Sqs", err.(request.ErrInvalidParams)) - } - } - if s.StepFunctions != nil { - if err := s.StepFunctions.Validate(); err != nil { - invalidParams.AddNested("StepFunctions", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudwatchAlarm sets the CloudwatchAlarm field's value. -func (s *Action) SetCloudwatchAlarm(v *CloudwatchAlarmAction) *Action { - s.CloudwatchAlarm = v - return s -} - -// SetCloudwatchMetric sets the CloudwatchMetric field's value. -func (s *Action) SetCloudwatchMetric(v *CloudwatchMetricAction) *Action { - s.CloudwatchMetric = v - return s -} - -// SetDynamoDB sets the DynamoDB field's value. -func (s *Action) SetDynamoDB(v *DynamoDBAction) *Action { - s.DynamoDB = v - return s -} - -// SetDynamoDBv2 sets the DynamoDBv2 field's value. -func (s *Action) SetDynamoDBv2(v *DynamoDBv2Action) *Action { - s.DynamoDBv2 = v - return s -} - -// SetElasticsearch sets the Elasticsearch field's value. -func (s *Action) SetElasticsearch(v *ElasticsearchAction) *Action { - s.Elasticsearch = v - return s -} - -// SetFirehose sets the Firehose field's value. -func (s *Action) SetFirehose(v *FirehoseAction) *Action { - s.Firehose = v - return s -} - -// SetIotAnalytics sets the IotAnalytics field's value. -func (s *Action) SetIotAnalytics(v *IotAnalyticsAction) *Action { - s.IotAnalytics = v - return s -} - -// SetIotEvents sets the IotEvents field's value. -func (s *Action) SetIotEvents(v *IotEventsAction) *Action { - s.IotEvents = v - return s -} - -// SetKinesis sets the Kinesis field's value. -func (s *Action) SetKinesis(v *KinesisAction) *Action { - s.Kinesis = v - return s -} - -// SetLambda sets the Lambda field's value. -func (s *Action) SetLambda(v *LambdaAction) *Action { - s.Lambda = v - return s -} - -// SetRepublish sets the Republish field's value. -func (s *Action) SetRepublish(v *RepublishAction) *Action { - s.Republish = v - return s -} - -// SetS3 sets the S3 field's value. -func (s *Action) SetS3(v *S3Action) *Action { - s.S3 = v - return s -} - -// SetSalesforce sets the Salesforce field's value. -func (s *Action) SetSalesforce(v *SalesforceAction) *Action { - s.Salesforce = v - return s -} - -// SetSns sets the Sns field's value. -func (s *Action) SetSns(v *SnsAction) *Action { - s.Sns = v - return s -} - -// SetSqs sets the Sqs field's value. -func (s *Action) SetSqs(v *SqsAction) *Action { - s.Sqs = v - return s -} - -// SetStepFunctions sets the StepFunctions field's value. -func (s *Action) SetStepFunctions(v *StepFunctionsAction) *Action { - s.StepFunctions = v - return s -} - -// Information about an active Device Defender security profile behavior violation. -type ActiveViolation struct { - _ struct{} `type:"structure"` - - // The behavior which is being violated. - Behavior *Behavior `locationName:"behavior" type:"structure"` - - // The time the most recent violation occurred. - LastViolationTime *time.Time `locationName:"lastViolationTime" type:"timestamp"` - - // The value of the metric (the measurement) which caused the most recent violation. - LastViolationValue *MetricValue `locationName:"lastViolationValue" type:"structure"` - - // The security profile whose behavior is in violation. - SecurityProfileName *string `locationName:"securityProfileName" min:"1" type:"string"` - - // The name of the thing responsible for the active violation. - ThingName *string `locationName:"thingName" min:"1" type:"string"` - - // The ID of the active violation. - ViolationId *string `locationName:"violationId" min:"1" type:"string"` - - // The time the violation started. - ViolationStartTime *time.Time `locationName:"violationStartTime" type:"timestamp"` -} - -// String returns the string representation -func (s ActiveViolation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActiveViolation) GoString() string { - return s.String() -} - -// SetBehavior sets the Behavior field's value. -func (s *ActiveViolation) SetBehavior(v *Behavior) *ActiveViolation { - s.Behavior = v - return s -} - -// SetLastViolationTime sets the LastViolationTime field's value. -func (s *ActiveViolation) SetLastViolationTime(v time.Time) *ActiveViolation { - s.LastViolationTime = &v - return s -} - -// SetLastViolationValue sets the LastViolationValue field's value. -func (s *ActiveViolation) SetLastViolationValue(v *MetricValue) *ActiveViolation { - s.LastViolationValue = v - return s -} - -// SetSecurityProfileName sets the SecurityProfileName field's value. -func (s *ActiveViolation) SetSecurityProfileName(v string) *ActiveViolation { - s.SecurityProfileName = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *ActiveViolation) SetThingName(v string) *ActiveViolation { - s.ThingName = &v - return s -} - -// SetViolationId sets the ViolationId field's value. -func (s *ActiveViolation) SetViolationId(v string) *ActiveViolation { - s.ViolationId = &v - return s -} - -// SetViolationStartTime sets the ViolationStartTime field's value. -func (s *ActiveViolation) SetViolationStartTime(v time.Time) *ActiveViolation { - s.ViolationStartTime = &v - return s -} - -type AddThingToBillingGroupInput struct { - _ struct{} `type:"structure"` - - // The ARN of the billing group. - BillingGroupArn *string `locationName:"billingGroupArn" type:"string"` - - // The name of the billing group. - BillingGroupName *string `locationName:"billingGroupName" min:"1" type:"string"` - - // The ARN of the thing to be added to the billing group. - ThingArn *string `locationName:"thingArn" type:"string"` - - // The name of the thing to be added to the billing group. - ThingName *string `locationName:"thingName" min:"1" type:"string"` -} - -// String returns the string representation -func (s AddThingToBillingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddThingToBillingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddThingToBillingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddThingToBillingGroupInput"} - if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) - } - if s.ThingName != nil && len(*s.ThingName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBillingGroupArn sets the BillingGroupArn field's value. -func (s *AddThingToBillingGroupInput) SetBillingGroupArn(v string) *AddThingToBillingGroupInput { - s.BillingGroupArn = &v - return s -} - -// SetBillingGroupName sets the BillingGroupName field's value. -func (s *AddThingToBillingGroupInput) SetBillingGroupName(v string) *AddThingToBillingGroupInput { - s.BillingGroupName = &v - return s -} - -// SetThingArn sets the ThingArn field's value. -func (s *AddThingToBillingGroupInput) SetThingArn(v string) *AddThingToBillingGroupInput { - s.ThingArn = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *AddThingToBillingGroupInput) SetThingName(v string) *AddThingToBillingGroupInput { - s.ThingName = &v - return s -} - -type AddThingToBillingGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddThingToBillingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddThingToBillingGroupOutput) GoString() string { - return s.String() -} - -type AddThingToThingGroupInput struct { - _ struct{} `type:"structure"` - - // Override dynamic thing groups with static thing groups when 10-group limit - // is reached. If a thing belongs to 10 thing groups, and one or more of those - // groups are dynamic thing groups, adding a thing to a static group removes - // the thing from the last dynamic group. - OverrideDynamicGroups *bool `locationName:"overrideDynamicGroups" type:"boolean"` - - // The ARN of the thing to add to a group. - ThingArn *string `locationName:"thingArn" type:"string"` - - // The ARN of the group to which you are adding a thing. - ThingGroupArn *string `locationName:"thingGroupArn" type:"string"` - - // The name of the group to which you are adding a thing. - ThingGroupName *string `locationName:"thingGroupName" min:"1" type:"string"` - - // The name of the thing to add to a group. - ThingName *string `locationName:"thingName" min:"1" type:"string"` -} - -// String returns the string representation -func (s AddThingToThingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddThingToThingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddThingToThingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddThingToThingGroupInput"} - if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 1)) - } - if s.ThingName != nil && len(*s.ThingName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOverrideDynamicGroups sets the OverrideDynamicGroups field's value. -func (s *AddThingToThingGroupInput) SetOverrideDynamicGroups(v bool) *AddThingToThingGroupInput { - s.OverrideDynamicGroups = &v - return s -} - -// SetThingArn sets the ThingArn field's value. -func (s *AddThingToThingGroupInput) SetThingArn(v string) *AddThingToThingGroupInput { - s.ThingArn = &v - return s -} - -// SetThingGroupArn sets the ThingGroupArn field's value. -func (s *AddThingToThingGroupInput) SetThingGroupArn(v string) *AddThingToThingGroupInput { - s.ThingGroupArn = &v - return s -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *AddThingToThingGroupInput) SetThingGroupName(v string) *AddThingToThingGroupInput { - s.ThingGroupName = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *AddThingToThingGroupInput) SetThingName(v string) *AddThingToThingGroupInput { - s.ThingName = &v - return s -} - -type AddThingToThingGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddThingToThingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddThingToThingGroupOutput) GoString() string { - return s.String() -} - -// A structure containing the alert target ARN and the role ARN. -type AlertTarget struct { - _ struct{} `type:"structure"` - - // The ARN of the notification target to which alerts are sent. - // - // AlertTargetArn is a required field - AlertTargetArn *string `locationName:"alertTargetArn" type:"string" required:"true"` - - // The ARN of the role that grants permission to send alerts to the notification - // target. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s AlertTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AlertTarget) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AlertTarget) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AlertTarget"} - if s.AlertTargetArn == nil { - invalidParams.Add(request.NewErrParamRequired("AlertTargetArn")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlertTargetArn sets the AlertTargetArn field's value. -func (s *AlertTarget) SetAlertTargetArn(v string) *AlertTarget { - s.AlertTargetArn = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *AlertTarget) SetRoleArn(v string) *AlertTarget { - s.RoleArn = &v - return s -} - -// Contains information that allowed the authorization. -type Allowed struct { - _ struct{} `type:"structure"` - - // A list of policies that allowed the authentication. - Policies []*Policy `locationName:"policies" type:"list"` -} - -// String returns the string representation -func (s Allowed) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Allowed) GoString() string { - return s.String() -} - -// SetPolicies sets the Policies field's value. -func (s *Allowed) SetPolicies(v []*Policy) *Allowed { - s.Policies = v - return s -} - -type AssociateTargetsWithJobInput struct { - _ struct{} `type:"structure"` - - // An optional comment string describing why the job was associated with the - // targets. - Comment *string `locationName:"comment" type:"string"` - - // The unique identifier you assigned to this job when it was created. - // - // JobId is a required field - JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` - - // A list of thing group ARNs that define the targets of the job. - // - // Targets is a required field - Targets []*string `locationName:"targets" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s AssociateTargetsWithJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateTargetsWithJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateTargetsWithJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateTargetsWithJobInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - if s.Targets == nil { - invalidParams.Add(request.NewErrParamRequired("Targets")) - } - if s.Targets != nil && len(s.Targets) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Targets", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *AssociateTargetsWithJobInput) SetComment(v string) *AssociateTargetsWithJobInput { - s.Comment = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *AssociateTargetsWithJobInput) SetJobId(v string) *AssociateTargetsWithJobInput { - s.JobId = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *AssociateTargetsWithJobInput) SetTargets(v []*string) *AssociateTargetsWithJobInput { - s.Targets = v - return s -} - -type AssociateTargetsWithJobOutput struct { - _ struct{} `type:"structure"` - - // A short text description of the job. - Description *string `locationName:"description" type:"string"` - - // An ARN identifying the job. - JobArn *string `locationName:"jobArn" type:"string"` - - // The unique identifier you assigned to this job when it was created. - JobId *string `locationName:"jobId" min:"1" type:"string"` -} - -// String returns the string representation -func (s AssociateTargetsWithJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateTargetsWithJobOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *AssociateTargetsWithJobOutput) SetDescription(v string) *AssociateTargetsWithJobOutput { - s.Description = &v - return s -} - -// SetJobArn sets the JobArn field's value. -func (s *AssociateTargetsWithJobOutput) SetJobArn(v string) *AssociateTargetsWithJobOutput { - s.JobArn = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *AssociateTargetsWithJobOutput) SetJobId(v string) *AssociateTargetsWithJobOutput { - s.JobId = &v - return s -} - -type AttachPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the policy to attach. - // - // PolicyName is a required field - PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` - - // The identity (https://docs.aws.amazon.com/iot/latest/developerguide/iot-security-identity.html) - // to which the policy is attached. - // - // Target is a required field - Target *string `locationName:"target" type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachPolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.Target == nil { - invalidParams.Add(request.NewErrParamRequired("Target")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *AttachPolicyInput) SetPolicyName(v string) *AttachPolicyInput { - s.PolicyName = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *AttachPolicyInput) SetTarget(v string) *AttachPolicyInput { - s.Target = &v - return s -} - -type AttachPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AttachPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachPolicyOutput) GoString() string { - return s.String() -} - -// The input for the AttachPrincipalPolicy operation. -type AttachPrincipalPolicyInput struct { - _ struct{} `type:"structure"` - - // The policy name. - // - // PolicyName is a required field - PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` - - // The principal, which can be a certificate ARN (as returned from the CreateCertificate - // operation) or an Amazon Cognito ID. - // - // Principal is a required field - Principal *string `location:"header" locationName:"x-amzn-iot-principal" type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachPrincipalPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachPrincipalPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachPrincipalPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachPrincipalPolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.Principal == nil { - invalidParams.Add(request.NewErrParamRequired("Principal")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *AttachPrincipalPolicyInput) SetPolicyName(v string) *AttachPrincipalPolicyInput { - s.PolicyName = &v - return s -} - -// SetPrincipal sets the Principal field's value. -func (s *AttachPrincipalPolicyInput) SetPrincipal(v string) *AttachPrincipalPolicyInput { - s.Principal = &v - return s -} - -type AttachPrincipalPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AttachPrincipalPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachPrincipalPolicyOutput) GoString() string { - return s.String() -} - -type AttachSecurityProfileInput struct { - _ struct{} `type:"structure"` - - // The security profile that is attached. - // - // SecurityProfileName is a required field - SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` - - // The ARN of the target (thing group) to which the security profile is attached. - // - // SecurityProfileTargetArn is a required field - SecurityProfileTargetArn *string `location:"querystring" locationName:"securityProfileTargetArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachSecurityProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachSecurityProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachSecurityProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachSecurityProfileInput"} - if s.SecurityProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityProfileName")) - } - if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) - } - if s.SecurityProfileTargetArn == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityProfileTargetArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecurityProfileName sets the SecurityProfileName field's value. -func (s *AttachSecurityProfileInput) SetSecurityProfileName(v string) *AttachSecurityProfileInput { - s.SecurityProfileName = &v - return s -} - -// SetSecurityProfileTargetArn sets the SecurityProfileTargetArn field's value. -func (s *AttachSecurityProfileInput) SetSecurityProfileTargetArn(v string) *AttachSecurityProfileInput { - s.SecurityProfileTargetArn = &v - return s -} - -type AttachSecurityProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AttachSecurityProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachSecurityProfileOutput) GoString() string { - return s.String() -} - -// The input for the AttachThingPrincipal operation. -type AttachThingPrincipalInput struct { - _ struct{} `type:"structure"` - - // The principal, such as a certificate or other credential. - // - // Principal is a required field - Principal *string `location:"header" locationName:"x-amzn-principal" type:"string" required:"true"` - - // The name of the thing. - // - // ThingName is a required field - ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachThingPrincipalInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachThingPrincipalInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachThingPrincipalInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachThingPrincipalInput"} - if s.Principal == nil { - invalidParams.Add(request.NewErrParamRequired("Principal")) - } - 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 -} - -// SetPrincipal sets the Principal field's value. -func (s *AttachThingPrincipalInput) SetPrincipal(v string) *AttachThingPrincipalInput { - s.Principal = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *AttachThingPrincipalInput) SetThingName(v string) *AttachThingPrincipalInput { - s.ThingName = &v - return s -} - -// The output from the AttachThingPrincipal operation. -type AttachThingPrincipalOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AttachThingPrincipalOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachThingPrincipalOutput) GoString() string { - return s.String() -} - -// The attribute payload. -type AttributePayload struct { - _ struct{} `type:"structure"` - - // A JSON string containing up to three key-value pair in JSON format. For example: - // - // {\"attributes\":{\"string1\":\"string2\"}} - Attributes map[string]*string `locationName:"attributes" type:"map"` - - // Specifies whether the list of attributes provided in the AttributePayload - // is merged with the attributes stored in the registry, instead of overwriting - // them. - // - // To remove an attribute, call UpdateThing with an empty attribute value. - // - // The merge attribute is only valid when calling UpdateThing. - Merge *bool `locationName:"merge" type:"boolean"` -} - -// String returns the string representation -func (s AttributePayload) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttributePayload) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *AttributePayload) SetAttributes(v map[string]*string) *AttributePayload { - s.Attributes = v - return s -} - -// SetMerge sets the Merge field's value. -func (s *AttributePayload) SetMerge(v bool) *AttributePayload { - s.Merge = &v - return s -} - -// Which audit checks are enabled and disabled for this account. -type AuditCheckConfiguration struct { - _ struct{} `type:"structure"` - - // True if this audit check is enabled for this account. - Enabled *bool `locationName:"enabled" type:"boolean"` -} - -// String returns the string representation -func (s AuditCheckConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuditCheckConfiguration) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *AuditCheckConfiguration) SetEnabled(v bool) *AuditCheckConfiguration { - s.Enabled = &v - return s -} - -// Information about the audit check. -type AuditCheckDetails struct { - _ struct{} `type:"structure"` - - // True if the check completed and found all resources compliant. - CheckCompliant *bool `locationName:"checkCompliant" type:"boolean"` - - // The completion status of this check, one of "IN_PROGRESS", "WAITING_FOR_DATA_COLLECTION", - // "CANCELED", "COMPLETED_COMPLIANT", "COMPLETED_NON_COMPLIANT", or "FAILED". - CheckRunStatus *string `locationName:"checkRunStatus" type:"string" enum:"AuditCheckRunStatus"` - - // The code of any error encountered when performing this check during this - // audit. One of "INSUFFICIENT_PERMISSIONS", or "AUDIT_CHECK_DISABLED". - ErrorCode *string `locationName:"errorCode" type:"string"` - - // The message associated with any error encountered when performing this check - // during this audit. - Message *string `locationName:"message" type:"string"` - - // The number of resources that the check found non-compliant. - NonCompliantResourcesCount *int64 `locationName:"nonCompliantResourcesCount" type:"long"` - - // The number of resources on which the check was performed. - TotalResourcesCount *int64 `locationName:"totalResourcesCount" type:"long"` -} - -// String returns the string representation -func (s AuditCheckDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuditCheckDetails) GoString() string { - return s.String() -} - -// SetCheckCompliant sets the CheckCompliant field's value. -func (s *AuditCheckDetails) SetCheckCompliant(v bool) *AuditCheckDetails { - s.CheckCompliant = &v - return s -} - -// SetCheckRunStatus sets the CheckRunStatus field's value. -func (s *AuditCheckDetails) SetCheckRunStatus(v string) *AuditCheckDetails { - s.CheckRunStatus = &v - return s -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *AuditCheckDetails) SetErrorCode(v string) *AuditCheckDetails { - s.ErrorCode = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *AuditCheckDetails) SetMessage(v string) *AuditCheckDetails { - s.Message = &v - return s -} - -// SetNonCompliantResourcesCount sets the NonCompliantResourcesCount field's value. -func (s *AuditCheckDetails) SetNonCompliantResourcesCount(v int64) *AuditCheckDetails { - s.NonCompliantResourcesCount = &v - return s -} - -// SetTotalResourcesCount sets the TotalResourcesCount field's value. -func (s *AuditCheckDetails) SetTotalResourcesCount(v int64) *AuditCheckDetails { - s.TotalResourcesCount = &v - return s -} - -// The findings (results) of the audit. -type AuditFinding struct { - _ struct{} `type:"structure"` - - // The audit check that generated this result. - CheckName *string `locationName:"checkName" type:"string"` - - // The time the result (finding) was discovered. - FindingTime *time.Time `locationName:"findingTime" type:"timestamp"` - - // The resource that was found to be non-compliant with the audit check. - NonCompliantResource *NonCompliantResource `locationName:"nonCompliantResource" type:"structure"` - - // The reason the resource was non-compliant. - ReasonForNonCompliance *string `locationName:"reasonForNonCompliance" type:"string"` - - // A code which indicates the reason that the resource was non-compliant. - ReasonForNonComplianceCode *string `locationName:"reasonForNonComplianceCode" type:"string"` - - // The list of related resources. - RelatedResources []*RelatedResource `locationName:"relatedResources" type:"list"` - - // The severity of the result (finding). - Severity *string `locationName:"severity" type:"string" enum:"AuditFindingSeverity"` - - // The ID of the audit that generated this result (finding) - TaskId *string `locationName:"taskId" min:"1" type:"string"` - - // The time the audit started. - TaskStartTime *time.Time `locationName:"taskStartTime" type:"timestamp"` -} - -// String returns the string representation -func (s AuditFinding) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuditFinding) GoString() string { - return s.String() -} - -// SetCheckName sets the CheckName field's value. -func (s *AuditFinding) SetCheckName(v string) *AuditFinding { - s.CheckName = &v - return s -} - -// SetFindingTime sets the FindingTime field's value. -func (s *AuditFinding) SetFindingTime(v time.Time) *AuditFinding { - s.FindingTime = &v - return s -} - -// SetNonCompliantResource sets the NonCompliantResource field's value. -func (s *AuditFinding) SetNonCompliantResource(v *NonCompliantResource) *AuditFinding { - s.NonCompliantResource = v - return s -} - -// SetReasonForNonCompliance sets the ReasonForNonCompliance field's value. -func (s *AuditFinding) SetReasonForNonCompliance(v string) *AuditFinding { - s.ReasonForNonCompliance = &v - return s -} - -// SetReasonForNonComplianceCode sets the ReasonForNonComplianceCode field's value. -func (s *AuditFinding) SetReasonForNonComplianceCode(v string) *AuditFinding { - s.ReasonForNonComplianceCode = &v - return s -} - -// SetRelatedResources sets the RelatedResources field's value. -func (s *AuditFinding) SetRelatedResources(v []*RelatedResource) *AuditFinding { - s.RelatedResources = v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *AuditFinding) SetSeverity(v string) *AuditFinding { - s.Severity = &v - return s -} - -// SetTaskId sets the TaskId field's value. -func (s *AuditFinding) SetTaskId(v string) *AuditFinding { - s.TaskId = &v - return s -} - -// SetTaskStartTime sets the TaskStartTime field's value. -func (s *AuditFinding) SetTaskStartTime(v time.Time) *AuditFinding { - s.TaskStartTime = &v - return s -} - -// Information about the targets to which audit notifications are sent. -type AuditNotificationTarget struct { - _ struct{} `type:"structure"` - - // True if notifications to the target are enabled. - Enabled *bool `locationName:"enabled" type:"boolean"` - - // The ARN of the role that grants permission to send notifications to the target. - RoleArn *string `locationName:"roleArn" min:"20" type:"string"` - - // The ARN of the target (SNS topic) to which audit notifications are sent. - TargetArn *string `locationName:"targetArn" type:"string"` -} - -// String returns the string representation -func (s AuditNotificationTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuditNotificationTarget) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AuditNotificationTarget) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuditNotificationTarget"} - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *AuditNotificationTarget) SetEnabled(v bool) *AuditNotificationTarget { - s.Enabled = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *AuditNotificationTarget) SetRoleArn(v string) *AuditNotificationTarget { - s.RoleArn = &v - return s -} - -// SetTargetArn sets the TargetArn field's value. -func (s *AuditNotificationTarget) SetTargetArn(v string) *AuditNotificationTarget { - s.TargetArn = &v - return s -} - -// The audits that were performed. -type AuditTaskMetadata struct { - _ struct{} `type:"structure"` - - // The ID of this audit. - TaskId *string `locationName:"taskId" min:"1" type:"string"` - - // The status of this audit: one of "IN_PROGRESS", "COMPLETED", "FAILED" or - // "CANCELED". - TaskStatus *string `locationName:"taskStatus" type:"string" enum:"AuditTaskStatus"` - - // The type of this audit: one of "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK". - TaskType *string `locationName:"taskType" type:"string" enum:"AuditTaskType"` -} - -// String returns the string representation -func (s AuditTaskMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuditTaskMetadata) GoString() string { - return s.String() -} - -// SetTaskId sets the TaskId field's value. -func (s *AuditTaskMetadata) SetTaskId(v string) *AuditTaskMetadata { - s.TaskId = &v - return s -} - -// SetTaskStatus sets the TaskStatus field's value. -func (s *AuditTaskMetadata) SetTaskStatus(v string) *AuditTaskMetadata { - s.TaskStatus = &v - return s -} - -// SetTaskType sets the TaskType field's value. -func (s *AuditTaskMetadata) SetTaskType(v string) *AuditTaskMetadata { - s.TaskType = &v - return s -} - -// A collection of authorization information. -type AuthInfo struct { - _ struct{} `type:"structure"` - - // The type of action for which the principal is being authorized. - ActionType *string `locationName:"actionType" type:"string" enum:"ActionType"` - - // The resources for which the principal is being authorized to perform the - // specified action. - Resources []*string `locationName:"resources" type:"list"` -} - -// String returns the string representation -func (s AuthInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthInfo) GoString() string { - return s.String() -} - -// SetActionType sets the ActionType field's value. -func (s *AuthInfo) SetActionType(v string) *AuthInfo { - s.ActionType = &v - return s -} - -// SetResources sets the Resources field's value. -func (s *AuthInfo) SetResources(v []*string) *AuthInfo { - s.Resources = v - return s -} - -// The authorizer result. -type AuthResult struct { - _ struct{} `type:"structure"` - - // The policies and statements that allowed the specified action. - Allowed *Allowed `locationName:"allowed" type:"structure"` - - // The final authorization decision of this scenario. Multiple statements are - // taken into account when determining the authorization decision. An explicit - // deny statement can override multiple allow statements. - AuthDecision *string `locationName:"authDecision" type:"string" enum:"AuthDecision"` - - // Authorization information. - AuthInfo *AuthInfo `locationName:"authInfo" type:"structure"` - - // The policies and statements that denied the specified action. - Denied *Denied `locationName:"denied" type:"structure"` - - // Contains any missing context values found while evaluating policy. - MissingContextValues []*string `locationName:"missingContextValues" type:"list"` -} - -// String returns the string representation -func (s AuthResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthResult) GoString() string { - return s.String() -} - -// SetAllowed sets the Allowed field's value. -func (s *AuthResult) SetAllowed(v *Allowed) *AuthResult { - s.Allowed = v - return s -} - -// SetAuthDecision sets the AuthDecision field's value. -func (s *AuthResult) SetAuthDecision(v string) *AuthResult { - s.AuthDecision = &v - return s -} - -// SetAuthInfo sets the AuthInfo field's value. -func (s *AuthResult) SetAuthInfo(v *AuthInfo) *AuthResult { - s.AuthInfo = v - return s -} - -// SetDenied sets the Denied field's value. -func (s *AuthResult) SetDenied(v *Denied) *AuthResult { - s.Denied = v - return s -} - -// SetMissingContextValues sets the MissingContextValues field's value. -func (s *AuthResult) SetMissingContextValues(v []*string) *AuthResult { - s.MissingContextValues = v - return s -} - -// The authorizer description. -type AuthorizerDescription struct { - _ struct{} `type:"structure"` - - // The authorizer ARN. - AuthorizerArn *string `locationName:"authorizerArn" type:"string"` - - // The authorizer's Lambda function ARN. - AuthorizerFunctionArn *string `locationName:"authorizerFunctionArn" type:"string"` - - // The authorizer name. - AuthorizerName *string `locationName:"authorizerName" min:"1" type:"string"` - - // The UNIX timestamp of when the authorizer was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The UNIX timestamp of when the authorizer was last updated. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` - - // The status of the authorizer. - Status *string `locationName:"status" type:"string" enum:"AuthorizerStatus"` - - // The key used to extract the token from the HTTP headers. - TokenKeyName *string `locationName:"tokenKeyName" min:"1" type:"string"` - - // The public keys used to validate the token signature returned by your custom - // authentication service. - TokenSigningPublicKeys map[string]*string `locationName:"tokenSigningPublicKeys" type:"map"` -} - -// String returns the string representation -func (s AuthorizerDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizerDescription) GoString() string { - return s.String() -} - -// SetAuthorizerArn sets the AuthorizerArn field's value. -func (s *AuthorizerDescription) SetAuthorizerArn(v string) *AuthorizerDescription { - s.AuthorizerArn = &v - return s -} - -// SetAuthorizerFunctionArn sets the AuthorizerFunctionArn field's value. -func (s *AuthorizerDescription) SetAuthorizerFunctionArn(v string) *AuthorizerDescription { - s.AuthorizerFunctionArn = &v - return s -} - -// SetAuthorizerName sets the AuthorizerName field's value. -func (s *AuthorizerDescription) SetAuthorizerName(v string) *AuthorizerDescription { - s.AuthorizerName = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *AuthorizerDescription) SetCreationDate(v time.Time) *AuthorizerDescription { - s.CreationDate = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *AuthorizerDescription) SetLastModifiedDate(v time.Time) *AuthorizerDescription { - s.LastModifiedDate = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AuthorizerDescription) SetStatus(v string) *AuthorizerDescription { - s.Status = &v - return s -} - -// SetTokenKeyName sets the TokenKeyName field's value. -func (s *AuthorizerDescription) SetTokenKeyName(v string) *AuthorizerDescription { - s.TokenKeyName = &v - return s -} - -// SetTokenSigningPublicKeys sets the TokenSigningPublicKeys field's value. -func (s *AuthorizerDescription) SetTokenSigningPublicKeys(v map[string]*string) *AuthorizerDescription { - s.TokenSigningPublicKeys = v - return s -} - -// The authorizer summary. -type AuthorizerSummary struct { - _ struct{} `type:"structure"` - - // The authorizer ARN. - AuthorizerArn *string `locationName:"authorizerArn" type:"string"` - - // The authorizer name. - AuthorizerName *string `locationName:"authorizerName" min:"1" type:"string"` -} - -// String returns the string representation -func (s AuthorizerSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizerSummary) GoString() string { - return s.String() -} - -// SetAuthorizerArn sets the AuthorizerArn field's value. -func (s *AuthorizerSummary) SetAuthorizerArn(v string) *AuthorizerSummary { - s.AuthorizerArn = &v - return s -} - -// SetAuthorizerName sets the AuthorizerName field's value. -func (s *AuthorizerSummary) SetAuthorizerName(v string) *AuthorizerSummary { - s.AuthorizerName = &v - return s -} - -// Configuration for the rollout of OTA updates. -type AwsJobExecutionsRolloutConfig struct { - _ struct{} `type:"structure"` - - // The maximum number of OTA update job executions started per minute. - MaximumPerMinute *int64 `locationName:"maximumPerMinute" min:"1" type:"integer"` -} - -// String returns the string representation -func (s AwsJobExecutionsRolloutConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AwsJobExecutionsRolloutConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AwsJobExecutionsRolloutConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AwsJobExecutionsRolloutConfig"} - if s.MaximumPerMinute != nil && *s.MaximumPerMinute < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaximumPerMinute", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaximumPerMinute sets the MaximumPerMinute field's value. -func (s *AwsJobExecutionsRolloutConfig) SetMaximumPerMinute(v int64) *AwsJobExecutionsRolloutConfig { - s.MaximumPerMinute = &v - return s -} - -// A Device Defender security profile behavior. -type Behavior struct { - _ struct{} `type:"structure"` - - // The criteria that determine if a device is behaving normally in regard to - // the metric. - Criteria *BehaviorCriteria `locationName:"criteria" type:"structure"` - - // What is measured by the behavior. - Metric *string `locationName:"metric" type:"string"` - - // The name you have given to the behavior. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Behavior) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Behavior) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Behavior) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Behavior"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCriteria sets the Criteria field's value. -func (s *Behavior) SetCriteria(v *BehaviorCriteria) *Behavior { - s.Criteria = v - return s -} - -// SetMetric sets the Metric field's value. -func (s *Behavior) SetMetric(v string) *Behavior { - s.Metric = &v - return s -} - -// SetName sets the Name field's value. -func (s *Behavior) SetName(v string) *Behavior { - s.Name = &v - return s -} - -// The criteria by which the behavior is determined to be normal. -type BehaviorCriteria struct { - _ struct{} `type:"structure"` - - // The operator that relates the thing measured (metric) to the criteria (value). - ComparisonOperator *string `locationName:"comparisonOperator" type:"string" enum:"ComparisonOperator"` - - // Use this to specify the period of time over which the behavior is evaluated, - // for those criteria which have a time dimension (for example, NUM_MESSAGES_SENT). - DurationSeconds *int64 `locationName:"durationSeconds" type:"integer"` - - // The value to be compared with the metric. - Value *MetricValue `locationName:"value" type:"structure"` -} - -// String returns the string representation -func (s BehaviorCriteria) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BehaviorCriteria) GoString() string { - return s.String() -} - -// SetComparisonOperator sets the ComparisonOperator field's value. -func (s *BehaviorCriteria) SetComparisonOperator(v string) *BehaviorCriteria { - s.ComparisonOperator = &v - return s -} - -// SetDurationSeconds sets the DurationSeconds field's value. -func (s *BehaviorCriteria) SetDurationSeconds(v int64) *BehaviorCriteria { - s.DurationSeconds = &v - return s -} - -// SetValue sets the Value field's value. -func (s *BehaviorCriteria) SetValue(v *MetricValue) *BehaviorCriteria { - s.Value = v - return s -} - -// Additional information about the billing group. -type BillingGroupMetadata struct { - _ struct{} `type:"structure"` - - // The date the billing group was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` -} - -// String returns the string representation -func (s BillingGroupMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BillingGroupMetadata) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *BillingGroupMetadata) SetCreationDate(v time.Time) *BillingGroupMetadata { - s.CreationDate = &v - return s -} - -// The properties of a billing group. -type BillingGroupProperties struct { - _ struct{} `type:"structure"` - - // The description of the billing group. - BillingGroupDescription *string `locationName:"billingGroupDescription" type:"string"` -} - -// String returns the string representation -func (s BillingGroupProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BillingGroupProperties) GoString() string { - return s.String() -} - -// SetBillingGroupDescription sets the BillingGroupDescription field's value. -func (s *BillingGroupProperties) SetBillingGroupDescription(v string) *BillingGroupProperties { - s.BillingGroupDescription = &v - return s -} - -// A CA certificate. -type CACertificate struct { - _ struct{} `type:"structure"` - - // The ARN of the CA certificate. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // The ID of the CA certificate. - CertificateId *string `locationName:"certificateId" min:"64" type:"string"` - - // The date the CA certificate was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The status of the CA certificate. - // - // The status value REGISTER_INACTIVE is deprecated and should not be used. - Status *string `locationName:"status" type:"string" enum:"CACertificateStatus"` -} - -// String returns the string representation -func (s CACertificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CACertificate) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *CACertificate) SetCertificateArn(v string) *CACertificate { - s.CertificateArn = &v - return s -} - -// SetCertificateId sets the CertificateId field's value. -func (s *CACertificate) SetCertificateId(v string) *CACertificate { - s.CertificateId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *CACertificate) SetCreationDate(v time.Time) *CACertificate { - s.CreationDate = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CACertificate) SetStatus(v string) *CACertificate { - s.Status = &v - return s -} - -// Describes a CA certificate. -type CACertificateDescription struct { - _ struct{} `type:"structure"` - - // Whether the CA certificate configured for auto registration of device certificates. - // Valid values are "ENABLE" and "DISABLE" - AutoRegistrationStatus *string `locationName:"autoRegistrationStatus" type:"string" enum:"AutoRegistrationStatus"` - - // The CA certificate ARN. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // The CA certificate ID. - CertificateId *string `locationName:"certificateId" min:"64" type:"string"` - - // The CA certificate data, in PEM format. - CertificatePem *string `locationName:"certificatePem" min:"1" type:"string"` - - // The date the CA certificate was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The customer version of the CA certificate. - CustomerVersion *int64 `locationName:"customerVersion" min:"1" type:"integer"` - - // The generation ID of the CA certificate. - GenerationId *string `locationName:"generationId" type:"string"` - - // The date the CA certificate was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` - - // The owner of the CA certificate. - OwnedBy *string `locationName:"ownedBy" min:"12" type:"string"` - - // The status of a CA certificate. - Status *string `locationName:"status" type:"string" enum:"CACertificateStatus"` - - // When the CA certificate is valid. - Validity *CertificateValidity `locationName:"validity" type:"structure"` -} - -// String returns the string representation -func (s CACertificateDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CACertificateDescription) GoString() string { - return s.String() -} - -// SetAutoRegistrationStatus sets the AutoRegistrationStatus field's value. -func (s *CACertificateDescription) SetAutoRegistrationStatus(v string) *CACertificateDescription { - s.AutoRegistrationStatus = &v - return s -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *CACertificateDescription) SetCertificateArn(v string) *CACertificateDescription { - s.CertificateArn = &v - return s -} - -// SetCertificateId sets the CertificateId field's value. -func (s *CACertificateDescription) SetCertificateId(v string) *CACertificateDescription { - s.CertificateId = &v - return s -} - -// SetCertificatePem sets the CertificatePem field's value. -func (s *CACertificateDescription) SetCertificatePem(v string) *CACertificateDescription { - s.CertificatePem = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *CACertificateDescription) SetCreationDate(v time.Time) *CACertificateDescription { - s.CreationDate = &v - return s -} - -// SetCustomerVersion sets the CustomerVersion field's value. -func (s *CACertificateDescription) SetCustomerVersion(v int64) *CACertificateDescription { - s.CustomerVersion = &v - return s -} - -// SetGenerationId sets the GenerationId field's value. -func (s *CACertificateDescription) SetGenerationId(v string) *CACertificateDescription { - s.GenerationId = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *CACertificateDescription) SetLastModifiedDate(v time.Time) *CACertificateDescription { - s.LastModifiedDate = &v - return s -} - -// SetOwnedBy sets the OwnedBy field's value. -func (s *CACertificateDescription) SetOwnedBy(v string) *CACertificateDescription { - s.OwnedBy = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CACertificateDescription) SetStatus(v string) *CACertificateDescription { - s.Status = &v - return s -} - -// SetValidity sets the Validity field's value. -func (s *CACertificateDescription) SetValidity(v *CertificateValidity) *CACertificateDescription { - s.Validity = v - return s -} - -type CancelAuditTaskInput struct { - _ struct{} `type:"structure"` - - // The ID of the audit you want to cancel. You can only cancel an audit that - // is "IN_PROGRESS". - // - // TaskId is a required field - TaskId *string `location:"uri" locationName:"taskId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelAuditTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelAuditTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelAuditTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelAuditTaskInput"} - if s.TaskId == nil { - invalidParams.Add(request.NewErrParamRequired("TaskId")) - } - if s.TaskId != nil && len(*s.TaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTaskId sets the TaskId field's value. -func (s *CancelAuditTaskInput) SetTaskId(v string) *CancelAuditTaskInput { - s.TaskId = &v - return s -} - -type CancelAuditTaskOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CancelAuditTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelAuditTaskOutput) GoString() string { - return s.String() -} - -// The input for the CancelCertificateTransfer operation. -type CancelCertificateTransferInput struct { - _ struct{} `type:"structure"` - - // The ID of the certificate. (The last part of the certificate ARN contains - // the certificate ID.) - // - // CertificateId is a required field - CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelCertificateTransferInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelCertificateTransferInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelCertificateTransferInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelCertificateTransferInput"} - if s.CertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateId")) - } - if s.CertificateId != nil && len(*s.CertificateId) < 64 { - invalidParams.Add(request.NewErrParamMinLen("CertificateId", 64)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateId sets the CertificateId field's value. -func (s *CancelCertificateTransferInput) SetCertificateId(v string) *CancelCertificateTransferInput { - s.CertificateId = &v - return s -} - -type CancelCertificateTransferOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CancelCertificateTransferOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelCertificateTransferOutput) GoString() string { - return s.String() -} - -type CancelJobExecutionInput struct { - _ struct{} `type:"structure"` - - // (Optional) The expected current version of the job execution. Each time you - // update the job execution, its version is incremented. If the version of the - // job execution stored in Jobs does not match, the update is rejected with - // a VersionMismatch error, and an ErrorResponse that contains the current job - // execution status data is returned. (This makes it unnecessary to perform - // a separate DescribeJobExecution request in order to obtain the job execution - // status data.) - ExpectedVersion *int64 `locationName:"expectedVersion" type:"long"` - - // (Optional) If true the job execution will be canceled if it has status IN_PROGRESS - // or QUEUED, otherwise the job execution will be canceled only if it has status - // QUEUED. If you attempt to cancel a job execution that is IN_PROGRESS, and - // you do not set force to true, then an InvalidStateTransitionException will - // be thrown. The default is false. - // - // Canceling a job execution which is "IN_PROGRESS", will cause the device to - // be unable to update the job execution status. Use caution and ensure that - // the device is able to recover to a valid state. - Force *bool `location:"querystring" locationName:"force" type:"boolean"` - - // The ID of the job to be canceled. - // - // JobId is a required field - JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` - - // A collection of name/value pairs that describe the status of the job execution. - // If not specified, the statusDetails are unchanged. You can specify at most - // 10 name/value pairs. - StatusDetails map[string]*string `locationName:"statusDetails" type:"map"` - - // The name of the thing whose execution of the job will be canceled. - // - // ThingName is a required field - ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelJobExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelJobExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelJobExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelJobExecutionInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - 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 -} - -// SetExpectedVersion sets the ExpectedVersion field's value. -func (s *CancelJobExecutionInput) SetExpectedVersion(v int64) *CancelJobExecutionInput { - s.ExpectedVersion = &v - return s -} - -// SetForce sets the Force field's value. -func (s *CancelJobExecutionInput) SetForce(v bool) *CancelJobExecutionInput { - s.Force = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *CancelJobExecutionInput) SetJobId(v string) *CancelJobExecutionInput { - s.JobId = &v - return s -} - -// SetStatusDetails sets the StatusDetails field's value. -func (s *CancelJobExecutionInput) SetStatusDetails(v map[string]*string) *CancelJobExecutionInput { - s.StatusDetails = v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *CancelJobExecutionInput) SetThingName(v string) *CancelJobExecutionInput { - s.ThingName = &v - return s -} - -type CancelJobExecutionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CancelJobExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelJobExecutionOutput) GoString() string { - return s.String() -} - -type CancelJobInput struct { - _ struct{} `type:"structure"` - - // An optional comment string describing why the job was canceled. - Comment *string `locationName:"comment" type:"string"` - - // (Optional) If true job executions with status "IN_PROGRESS" and "QUEUED" - // are canceled, otherwise only job executions with status "QUEUED" are canceled. - // The default is false. - // - // Canceling a job which is "IN_PROGRESS", will cause a device which is executing - // the job to be unable to update the job execution status. Use caution and - // ensure that each device executing a job which is canceled is able to recover - // to a valid state. - Force *bool `location:"querystring" locationName:"force" type:"boolean"` - - // The unique identifier you assigned to this job when it was created. - // - // JobId is a required field - JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` - - // (Optional)A reason code string that explains why the job was canceled. - ReasonCode *string `locationName:"reasonCode" type:"string"` -} - -// String returns the string representation -func (s CancelJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelJobInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *CancelJobInput) SetComment(v string) *CancelJobInput { - s.Comment = &v - return s -} - -// SetForce sets the Force field's value. -func (s *CancelJobInput) SetForce(v bool) *CancelJobInput { - s.Force = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *CancelJobInput) SetJobId(v string) *CancelJobInput { - s.JobId = &v - return s -} - -// SetReasonCode sets the ReasonCode field's value. -func (s *CancelJobInput) SetReasonCode(v string) *CancelJobInput { - s.ReasonCode = &v - return s -} - -type CancelJobOutput struct { - _ struct{} `type:"structure"` - - // A short text description of the job. - Description *string `locationName:"description" type:"string"` - - // The job ARN. - JobArn *string `locationName:"jobArn" type:"string"` - - // The unique identifier you assigned to this job when it was created. - JobId *string `locationName:"jobId" min:"1" type:"string"` -} - -// String returns the string representation -func (s CancelJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelJobOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *CancelJobOutput) SetDescription(v string) *CancelJobOutput { - s.Description = &v - return s -} - -// SetJobArn sets the JobArn field's value. -func (s *CancelJobOutput) SetJobArn(v string) *CancelJobOutput { - s.JobArn = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *CancelJobOutput) SetJobId(v string) *CancelJobOutput { - s.JobId = &v - return s -} - -// Information about a certificate. -type Certificate struct { - _ struct{} `type:"structure"` - - // The ARN of the certificate. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // The ID of the certificate. (The last part of the certificate ARN contains - // the certificate ID.) - CertificateId *string `locationName:"certificateId" min:"64" type:"string"` - - // The date and time the certificate was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The status of the certificate. - // - // The status value REGISTER_INACTIVE is deprecated and should not be used. - Status *string `locationName:"status" type:"string" enum:"CertificateStatus"` -} - -// String returns the string representation -func (s Certificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Certificate) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *Certificate) SetCertificateArn(v string) *Certificate { - s.CertificateArn = &v - return s -} - -// SetCertificateId sets the CertificateId field's value. -func (s *Certificate) SetCertificateId(v string) *Certificate { - s.CertificateId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *Certificate) SetCreationDate(v time.Time) *Certificate { - s.CreationDate = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Certificate) SetStatus(v string) *Certificate { - s.Status = &v - return s -} - -// Describes a certificate. -type CertificateDescription struct { - _ struct{} `type:"structure"` - - // The certificate ID of the CA certificate used to sign this certificate. - CaCertificateId *string `locationName:"caCertificateId" min:"64" type:"string"` - - // The ARN of the certificate. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // The ID of the certificate. - CertificateId *string `locationName:"certificateId" min:"64" type:"string"` - - // The certificate data, in PEM format. - CertificatePem *string `locationName:"certificatePem" min:"1" type:"string"` - - // The date and time the certificate was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The customer version of the certificate. - CustomerVersion *int64 `locationName:"customerVersion" min:"1" type:"integer"` - - // The generation ID of the certificate. - GenerationId *string `locationName:"generationId" type:"string"` - - // The date and time the certificate was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` - - // The ID of the AWS account that owns the certificate. - OwnedBy *string `locationName:"ownedBy" min:"12" type:"string"` - - // The ID of the AWS account of the previous owner of the certificate. - PreviousOwnedBy *string `locationName:"previousOwnedBy" min:"12" type:"string"` - - // The status of the certificate. - Status *string `locationName:"status" type:"string" enum:"CertificateStatus"` - - // The transfer data. - TransferData *TransferData `locationName:"transferData" type:"structure"` - - // When the certificate is valid. - Validity *CertificateValidity `locationName:"validity" type:"structure"` -} - -// String returns the string representation -func (s CertificateDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CertificateDescription) GoString() string { - return s.String() -} - -// SetCaCertificateId sets the CaCertificateId field's value. -func (s *CertificateDescription) SetCaCertificateId(v string) *CertificateDescription { - s.CaCertificateId = &v - return s -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *CertificateDescription) SetCertificateArn(v string) *CertificateDescription { - s.CertificateArn = &v - return s -} - -// SetCertificateId sets the CertificateId field's value. -func (s *CertificateDescription) SetCertificateId(v string) *CertificateDescription { - s.CertificateId = &v - return s -} - -// SetCertificatePem sets the CertificatePem field's value. -func (s *CertificateDescription) SetCertificatePem(v string) *CertificateDescription { - s.CertificatePem = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *CertificateDescription) SetCreationDate(v time.Time) *CertificateDescription { - s.CreationDate = &v - return s -} - -// SetCustomerVersion sets the CustomerVersion field's value. -func (s *CertificateDescription) SetCustomerVersion(v int64) *CertificateDescription { - s.CustomerVersion = &v - return s -} - -// SetGenerationId sets the GenerationId field's value. -func (s *CertificateDescription) SetGenerationId(v string) *CertificateDescription { - s.GenerationId = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *CertificateDescription) SetLastModifiedDate(v time.Time) *CertificateDescription { - s.LastModifiedDate = &v - return s -} - -// SetOwnedBy sets the OwnedBy field's value. -func (s *CertificateDescription) SetOwnedBy(v string) *CertificateDescription { - s.OwnedBy = &v - return s -} - -// SetPreviousOwnedBy sets the PreviousOwnedBy field's value. -func (s *CertificateDescription) SetPreviousOwnedBy(v string) *CertificateDescription { - s.PreviousOwnedBy = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CertificateDescription) SetStatus(v string) *CertificateDescription { - s.Status = &v - return s -} - -// SetTransferData sets the TransferData field's value. -func (s *CertificateDescription) SetTransferData(v *TransferData) *CertificateDescription { - s.TransferData = v - return s -} - -// SetValidity sets the Validity field's value. -func (s *CertificateDescription) SetValidity(v *CertificateValidity) *CertificateDescription { - s.Validity = v - return s -} - -// When the certificate is valid. -type CertificateValidity struct { - _ struct{} `type:"structure"` - - // The certificate is not valid after this date. - NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` - - // The certificate is not valid before this date. - NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` -} - -// String returns the string representation -func (s CertificateValidity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CertificateValidity) GoString() string { - return s.String() -} - -// SetNotAfter sets the NotAfter field's value. -func (s *CertificateValidity) SetNotAfter(v time.Time) *CertificateValidity { - s.NotAfter = &v - return s -} - -// SetNotBefore sets the NotBefore field's value. -func (s *CertificateValidity) SetNotBefore(v time.Time) *CertificateValidity { - s.NotBefore = &v - return s -} - -type ClearDefaultAuthorizerInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ClearDefaultAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClearDefaultAuthorizerInput) GoString() string { - return s.String() -} - -type ClearDefaultAuthorizerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ClearDefaultAuthorizerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClearDefaultAuthorizerOutput) GoString() string { - return s.String() -} - -// Describes an action that updates a CloudWatch alarm. -type CloudwatchAlarmAction struct { - _ struct{} `type:"structure"` - - // The CloudWatch alarm name. - // - // AlarmName is a required field - AlarmName *string `locationName:"alarmName" type:"string" required:"true"` - - // The IAM role that allows access to the CloudWatch alarm. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` - - // The reason for the alarm change. - // - // StateReason is a required field - StateReason *string `locationName:"stateReason" type:"string" required:"true"` - - // The value of the alarm state. Acceptable values are: OK, ALARM, INSUFFICIENT_DATA. - // - // StateValue is a required field - StateValue *string `locationName:"stateValue" type:"string" required:"true"` -} - -// String returns the string representation -func (s CloudwatchAlarmAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudwatchAlarmAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CloudwatchAlarmAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloudwatchAlarmAction"} - if s.AlarmName == nil { - invalidParams.Add(request.NewErrParamRequired("AlarmName")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.StateReason == nil { - invalidParams.Add(request.NewErrParamRequired("StateReason")) - } - if s.StateValue == nil { - invalidParams.Add(request.NewErrParamRequired("StateValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlarmName sets the AlarmName field's value. -func (s *CloudwatchAlarmAction) SetAlarmName(v string) *CloudwatchAlarmAction { - s.AlarmName = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CloudwatchAlarmAction) SetRoleArn(v string) *CloudwatchAlarmAction { - s.RoleArn = &v - return s -} - -// SetStateReason sets the StateReason field's value. -func (s *CloudwatchAlarmAction) SetStateReason(v string) *CloudwatchAlarmAction { - s.StateReason = &v - return s -} - -// SetStateValue sets the StateValue field's value. -func (s *CloudwatchAlarmAction) SetStateValue(v string) *CloudwatchAlarmAction { - s.StateValue = &v - return s -} - -// Describes an action that captures a CloudWatch metric. -type CloudwatchMetricAction struct { - _ struct{} `type:"structure"` - - // The CloudWatch metric name. - // - // MetricName is a required field - MetricName *string `locationName:"metricName" type:"string" required:"true"` - - // The CloudWatch metric namespace name. - // - // MetricNamespace is a required field - MetricNamespace *string `locationName:"metricNamespace" type:"string" required:"true"` - - // An optional Unix timestamp (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#about_timestamp). - MetricTimestamp *string `locationName:"metricTimestamp" type:"string"` - - // The metric unit (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#Unit) - // supported by CloudWatch. - // - // MetricUnit is a required field - MetricUnit *string `locationName:"metricUnit" type:"string" required:"true"` - - // The CloudWatch metric value. - // - // MetricValue is a required field - MetricValue *string `locationName:"metricValue" type:"string" required:"true"` - - // The IAM role that allows access to the CloudWatch metric. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s CloudwatchMetricAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudwatchMetricAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CloudwatchMetricAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloudwatchMetricAction"} - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.MetricNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("MetricNamespace")) - } - if s.MetricUnit == nil { - invalidParams.Add(request.NewErrParamRequired("MetricUnit")) - } - if s.MetricValue == nil { - invalidParams.Add(request.NewErrParamRequired("MetricValue")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMetricName sets the MetricName field's value. -func (s *CloudwatchMetricAction) SetMetricName(v string) *CloudwatchMetricAction { - s.MetricName = &v - return s -} - -// SetMetricNamespace sets the MetricNamespace field's value. -func (s *CloudwatchMetricAction) SetMetricNamespace(v string) *CloudwatchMetricAction { - s.MetricNamespace = &v - return s -} - -// SetMetricTimestamp sets the MetricTimestamp field's value. -func (s *CloudwatchMetricAction) SetMetricTimestamp(v string) *CloudwatchMetricAction { - s.MetricTimestamp = &v - return s -} - -// SetMetricUnit sets the MetricUnit field's value. -func (s *CloudwatchMetricAction) SetMetricUnit(v string) *CloudwatchMetricAction { - s.MetricUnit = &v - return s -} - -// SetMetricValue sets the MetricValue field's value. -func (s *CloudwatchMetricAction) SetMetricValue(v string) *CloudwatchMetricAction { - s.MetricValue = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CloudwatchMetricAction) SetRoleArn(v string) *CloudwatchMetricAction { - s.RoleArn = &v - return s -} - -// Describes the method to use when code signing a file. -type CodeSigning struct { - _ struct{} `type:"structure"` - - // The ID of the AWSSignerJob which was created to sign the file. - AwsSignerJobId *string `locationName:"awsSignerJobId" type:"string"` - - // A custom method for code signing a file. - CustomCodeSigning *CustomCodeSigning `locationName:"customCodeSigning" type:"structure"` - - // Describes the code-signing job. - StartSigningJobParameter *StartSigningJobParameter `locationName:"startSigningJobParameter" type:"structure"` -} - -// String returns the string representation -func (s CodeSigning) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CodeSigning) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CodeSigning) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CodeSigning"} - if s.StartSigningJobParameter != nil { - if err := s.StartSigningJobParameter.Validate(); err != nil { - invalidParams.AddNested("StartSigningJobParameter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAwsSignerJobId sets the AwsSignerJobId field's value. -func (s *CodeSigning) SetAwsSignerJobId(v string) *CodeSigning { - s.AwsSignerJobId = &v - return s -} - -// SetCustomCodeSigning sets the CustomCodeSigning field's value. -func (s *CodeSigning) SetCustomCodeSigning(v *CustomCodeSigning) *CodeSigning { - s.CustomCodeSigning = v - return s -} - -// SetStartSigningJobParameter sets the StartSigningJobParameter field's value. -func (s *CodeSigning) SetStartSigningJobParameter(v *StartSigningJobParameter) *CodeSigning { - s.StartSigningJobParameter = v - return s -} - -// Describes the certificate chain being used when code signing a file. -type CodeSigningCertificateChain struct { - _ struct{} `type:"structure"` - - // The name of the certificate. - CertificateName *string `locationName:"certificateName" type:"string"` - - // A base64 encoded binary representation of the code signing certificate chain. - InlineDocument *string `locationName:"inlineDocument" type:"string"` -} - -// String returns the string representation -func (s CodeSigningCertificateChain) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CodeSigningCertificateChain) GoString() string { - return s.String() -} - -// SetCertificateName sets the CertificateName field's value. -func (s *CodeSigningCertificateChain) SetCertificateName(v string) *CodeSigningCertificateChain { - s.CertificateName = &v - return s -} - -// SetInlineDocument sets the InlineDocument field's value. -func (s *CodeSigningCertificateChain) SetInlineDocument(v string) *CodeSigningCertificateChain { - s.InlineDocument = &v - return s -} - -// Describes the signature for a file. -type CodeSigningSignature struct { - _ struct{} `type:"structure"` - - // A base64 encoded binary representation of the code signing signature. - // - // InlineDocument is automatically base64 encoded/decoded by the SDK. - InlineDocument []byte `locationName:"inlineDocument" type:"blob"` -} - -// String returns the string representation -func (s CodeSigningSignature) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CodeSigningSignature) GoString() string { - return s.String() -} - -// SetInlineDocument sets the InlineDocument field's value. -func (s *CodeSigningSignature) SetInlineDocument(v []byte) *CodeSigningSignature { - s.InlineDocument = v - return s -} - -// Configuration. -type Configuration struct { - _ struct{} `type:"structure"` - - // True to enable the configuration. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s Configuration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Configuration) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *Configuration) SetEnabled(v bool) *Configuration { - s.Enabled = &v - return s -} - -type CreateAuthorizerInput struct { - _ struct{} `type:"structure"` - - // The ARN of the authorizer's Lambda function. - // - // AuthorizerFunctionArn is a required field - AuthorizerFunctionArn *string `locationName:"authorizerFunctionArn" type:"string" required:"true"` - - // The authorizer name. - // - // AuthorizerName is a required field - AuthorizerName *string `location:"uri" locationName:"authorizerName" min:"1" type:"string" required:"true"` - - // The status of the create authorizer request. - Status *string `locationName:"status" type:"string" enum:"AuthorizerStatus"` - - // The name of the token key used to extract the token from the HTTP headers. - // - // TokenKeyName is a required field - TokenKeyName *string `locationName:"tokenKeyName" min:"1" type:"string" required:"true"` - - // The public keys used to verify the digital signature returned by your custom - // authentication service. - // - // TokenSigningPublicKeys is a required field - TokenSigningPublicKeys map[string]*string `locationName:"tokenSigningPublicKeys" type:"map" required:"true"` -} - -// String returns the string representation -func (s CreateAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAuthorizerInput"} - if s.AuthorizerFunctionArn == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerFunctionArn")) - } - if s.AuthorizerName == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerName")) - } - if s.AuthorizerName != nil && len(*s.AuthorizerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizerName", 1)) - } - if s.TokenKeyName == nil { - invalidParams.Add(request.NewErrParamRequired("TokenKeyName")) - } - if s.TokenKeyName != nil && len(*s.TokenKeyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TokenKeyName", 1)) - } - if s.TokenSigningPublicKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TokenSigningPublicKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthorizerFunctionArn sets the AuthorizerFunctionArn field's value. -func (s *CreateAuthorizerInput) SetAuthorizerFunctionArn(v string) *CreateAuthorizerInput { - s.AuthorizerFunctionArn = &v - return s -} - -// SetAuthorizerName sets the AuthorizerName field's value. -func (s *CreateAuthorizerInput) SetAuthorizerName(v string) *CreateAuthorizerInput { - s.AuthorizerName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CreateAuthorizerInput) SetStatus(v string) *CreateAuthorizerInput { - s.Status = &v - return s -} - -// SetTokenKeyName sets the TokenKeyName field's value. -func (s *CreateAuthorizerInput) SetTokenKeyName(v string) *CreateAuthorizerInput { - s.TokenKeyName = &v - return s -} - -// SetTokenSigningPublicKeys sets the TokenSigningPublicKeys field's value. -func (s *CreateAuthorizerInput) SetTokenSigningPublicKeys(v map[string]*string) *CreateAuthorizerInput { - s.TokenSigningPublicKeys = v - return s -} - -type CreateAuthorizerOutput struct { - _ struct{} `type:"structure"` - - // The authorizer ARN. - AuthorizerArn *string `locationName:"authorizerArn" type:"string"` - - // The authorizer's name. - AuthorizerName *string `locationName:"authorizerName" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateAuthorizerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAuthorizerOutput) GoString() string { - return s.String() -} - -// SetAuthorizerArn sets the AuthorizerArn field's value. -func (s *CreateAuthorizerOutput) SetAuthorizerArn(v string) *CreateAuthorizerOutput { - s.AuthorizerArn = &v - return s -} - -// SetAuthorizerName sets the AuthorizerName field's value. -func (s *CreateAuthorizerOutput) SetAuthorizerName(v string) *CreateAuthorizerOutput { - s.AuthorizerName = &v - return s -} - -type CreateBillingGroupInput struct { - _ struct{} `type:"structure"` - - // The name you wish to give to the billing group. - // - // BillingGroupName is a required field - BillingGroupName *string `location:"uri" locationName:"billingGroupName" min:"1" type:"string" required:"true"` - - // The properties of the billing group. - BillingGroupProperties *BillingGroupProperties `locationName:"billingGroupProperties" type:"structure"` - - // Metadata which can be used to manage the billing group. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateBillingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBillingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateBillingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateBillingGroupInput"} - if s.BillingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("BillingGroupName")) - } - if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBillingGroupName sets the BillingGroupName field's value. -func (s *CreateBillingGroupInput) SetBillingGroupName(v string) *CreateBillingGroupInput { - s.BillingGroupName = &v - return s -} - -// SetBillingGroupProperties sets the BillingGroupProperties field's value. -func (s *CreateBillingGroupInput) SetBillingGroupProperties(v *BillingGroupProperties) *CreateBillingGroupInput { - s.BillingGroupProperties = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateBillingGroupInput) SetTags(v []*Tag) *CreateBillingGroupInput { - s.Tags = v - return s -} - -type CreateBillingGroupOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the billing group. - BillingGroupArn *string `locationName:"billingGroupArn" type:"string"` - - // The ID of the billing group. - BillingGroupId *string `locationName:"billingGroupId" min:"1" type:"string"` - - // The name you gave to the billing group. - BillingGroupName *string `locationName:"billingGroupName" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateBillingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBillingGroupOutput) GoString() string { - return s.String() -} - -// SetBillingGroupArn sets the BillingGroupArn field's value. -func (s *CreateBillingGroupOutput) SetBillingGroupArn(v string) *CreateBillingGroupOutput { - s.BillingGroupArn = &v - return s -} - -// SetBillingGroupId sets the BillingGroupId field's value. -func (s *CreateBillingGroupOutput) SetBillingGroupId(v string) *CreateBillingGroupOutput { - s.BillingGroupId = &v - return s -} - -// SetBillingGroupName sets the BillingGroupName field's value. -func (s *CreateBillingGroupOutput) SetBillingGroupName(v string) *CreateBillingGroupOutput { - s.BillingGroupName = &v - return s -} - -// The input for the CreateCertificateFromCsr operation. -type CreateCertificateFromCsrInput struct { - _ struct{} `type:"structure"` - - // The certificate signing request (CSR). - // - // CertificateSigningRequest is a required field - CertificateSigningRequest *string `locationName:"certificateSigningRequest" min:"1" type:"string" required:"true"` - - // Specifies whether the certificate is active. - SetAsActive *bool `location:"querystring" locationName:"setAsActive" type:"boolean"` -} - -// String returns the string representation -func (s CreateCertificateFromCsrInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCertificateFromCsrInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCertificateFromCsrInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCertificateFromCsrInput"} - if s.CertificateSigningRequest == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateSigningRequest")) - } - if s.CertificateSigningRequest != nil && len(*s.CertificateSigningRequest) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CertificateSigningRequest", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateSigningRequest sets the CertificateSigningRequest field's value. -func (s *CreateCertificateFromCsrInput) SetCertificateSigningRequest(v string) *CreateCertificateFromCsrInput { - s.CertificateSigningRequest = &v - return s -} - -// SetSetAsActive sets the SetAsActive field's value. -func (s *CreateCertificateFromCsrInput) SetSetAsActive(v bool) *CreateCertificateFromCsrInput { - s.SetAsActive = &v - return s -} - -// The output from the CreateCertificateFromCsr operation. -type CreateCertificateFromCsrOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the certificate. You can use the ARN as - // a principal for policy operations. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // The ID of the certificate. Certificate management operations only take a - // certificateId. - CertificateId *string `locationName:"certificateId" min:"64" type:"string"` - - // The certificate data, in PEM format. - CertificatePem *string `locationName:"certificatePem" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateCertificateFromCsrOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCertificateFromCsrOutput) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *CreateCertificateFromCsrOutput) SetCertificateArn(v string) *CreateCertificateFromCsrOutput { - s.CertificateArn = &v - return s -} - -// SetCertificateId sets the CertificateId field's value. -func (s *CreateCertificateFromCsrOutput) SetCertificateId(v string) *CreateCertificateFromCsrOutput { - s.CertificateId = &v - return s -} - -// SetCertificatePem sets the CertificatePem field's value. -func (s *CreateCertificateFromCsrOutput) SetCertificatePem(v string) *CreateCertificateFromCsrOutput { - s.CertificatePem = &v - return s -} - -type CreateDynamicThingGroupInput struct { - _ struct{} `type:"structure"` - - // The dynamic thing group index name. - // - // Currently one index is supported: "AWS_Things". - IndexName *string `locationName:"indexName" min:"1" type:"string"` - - // The dynamic thing group search query string. - // - // See Query Syntax (http://docs.aws.amazon.com/iot/latest/developerguide/query-syntax.html) - // for information about query string syntax. - // - // QueryString is a required field - QueryString *string `locationName:"queryString" min:"1" type:"string" required:"true"` - - // The dynamic thing group query version. - // - // Currently one query version is supported: "2017-09-30". If not specified, - // the query version defaults to this value. - QueryVersion *string `locationName:"queryVersion" type:"string"` - - // Metadata which can be used to manage the dynamic thing group. - Tags []*Tag `locationName:"tags" type:"list"` - - // The dynamic thing group name to create. - // - // ThingGroupName is a required field - ThingGroupName *string `location:"uri" locationName:"thingGroupName" min:"1" type:"string" required:"true"` - - // The dynamic thing group properties. - ThingGroupProperties *ThingGroupProperties `locationName:"thingGroupProperties" type:"structure"` -} - -// String returns the string representation -func (s CreateDynamicThingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDynamicThingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDynamicThingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDynamicThingGroupInput"} - if s.IndexName != nil && len(*s.IndexName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IndexName", 1)) - } - if s.QueryString == nil { - invalidParams.Add(request.NewErrParamRequired("QueryString")) - } - if s.QueryString != nil && len(*s.QueryString) < 1 { - invalidParams.Add(request.NewErrParamMinLen("QueryString", 1)) - } - if s.ThingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ThingGroupName")) - } - if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIndexName sets the IndexName field's value. -func (s *CreateDynamicThingGroupInput) SetIndexName(v string) *CreateDynamicThingGroupInput { - s.IndexName = &v - return s -} - -// SetQueryString sets the QueryString field's value. -func (s *CreateDynamicThingGroupInput) SetQueryString(v string) *CreateDynamicThingGroupInput { - s.QueryString = &v - return s -} - -// SetQueryVersion sets the QueryVersion field's value. -func (s *CreateDynamicThingGroupInput) SetQueryVersion(v string) *CreateDynamicThingGroupInput { - s.QueryVersion = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDynamicThingGroupInput) SetTags(v []*Tag) *CreateDynamicThingGroupInput { - s.Tags = v - return s -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *CreateDynamicThingGroupInput) SetThingGroupName(v string) *CreateDynamicThingGroupInput { - s.ThingGroupName = &v - return s -} - -// SetThingGroupProperties sets the ThingGroupProperties field's value. -func (s *CreateDynamicThingGroupInput) SetThingGroupProperties(v *ThingGroupProperties) *CreateDynamicThingGroupInput { - s.ThingGroupProperties = v - return s -} - -type CreateDynamicThingGroupOutput struct { - _ struct{} `type:"structure"` - - // The dynamic thing group index name. - IndexName *string `locationName:"indexName" min:"1" type:"string"` - - // The dynamic thing group search query string. - QueryString *string `locationName:"queryString" min:"1" type:"string"` - - // The dynamic thing group query version. - QueryVersion *string `locationName:"queryVersion" type:"string"` - - // The dynamic thing group ARN. - ThingGroupArn *string `locationName:"thingGroupArn" type:"string"` - - // The dynamic thing group ID. - ThingGroupId *string `locationName:"thingGroupId" min:"1" type:"string"` - - // The dynamic thing group name. - ThingGroupName *string `locationName:"thingGroupName" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateDynamicThingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDynamicThingGroupOutput) GoString() string { - return s.String() -} - -// SetIndexName sets the IndexName field's value. -func (s *CreateDynamicThingGroupOutput) SetIndexName(v string) *CreateDynamicThingGroupOutput { - s.IndexName = &v - return s -} - -// SetQueryString sets the QueryString field's value. -func (s *CreateDynamicThingGroupOutput) SetQueryString(v string) *CreateDynamicThingGroupOutput { - s.QueryString = &v - return s -} - -// SetQueryVersion sets the QueryVersion field's value. -func (s *CreateDynamicThingGroupOutput) SetQueryVersion(v string) *CreateDynamicThingGroupOutput { - s.QueryVersion = &v - return s -} - -// SetThingGroupArn sets the ThingGroupArn field's value. -func (s *CreateDynamicThingGroupOutput) SetThingGroupArn(v string) *CreateDynamicThingGroupOutput { - s.ThingGroupArn = &v - return s -} - -// SetThingGroupId sets the ThingGroupId field's value. -func (s *CreateDynamicThingGroupOutput) SetThingGroupId(v string) *CreateDynamicThingGroupOutput { - s.ThingGroupId = &v - return s -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *CreateDynamicThingGroupOutput) SetThingGroupName(v string) *CreateDynamicThingGroupOutput { - s.ThingGroupName = &v - return s -} - -type CreateJobInput struct { - _ struct{} `type:"structure"` - - // Allows you to create criteria to abort a job. - AbortConfig *AbortConfig `locationName:"abortConfig" type:"structure"` - - // A short text description of the job. - Description *string `locationName:"description" type:"string"` - - // The job document. - // - // If the job document resides in an S3 bucket, you must use a placeholder link - // when specifying the document. - // - // The placeholder link is of the following form: - // - // ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key} - // - // where bucket is your bucket name and key is the object in the bucket to which - // you are linking. - Document *string `locationName:"document" type:"string"` - - // An S3 link to the job document. - DocumentSource *string `locationName:"documentSource" min:"1" type:"string"` - - // Allows you to create a staged rollout of the job. - JobExecutionsRolloutConfig *JobExecutionsRolloutConfig `locationName:"jobExecutionsRolloutConfig" type:"structure"` - - // A job identifier which must be unique for your AWS account. We recommend - // using a UUID. Alpha-numeric characters, "-" and "_" are valid for use here. - // - // JobId is a required field - JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` - - // Configuration information for pre-signed S3 URLs. - PresignedUrlConfig *PresignedUrlConfig `locationName:"presignedUrlConfig" type:"structure"` - - // Metadata which can be used to manage the job. - Tags []*Tag `locationName:"tags" type:"list"` - - // Specifies whether the job will continue to run (CONTINUOUS), or will be complete - // after all those things specified as targets have completed the job (SNAPSHOT). - // If continuous, the job may also be run on a thing when a change is detected - // in a target. For example, a job will run on a thing when the thing is added - // to a target group, even after the job was completed by all things originally - // in the group. - TargetSelection *string `locationName:"targetSelection" type:"string" enum:"TargetSelection"` - - // A list of things and thing groups to which the job should be sent. - // - // Targets is a required field - Targets []*string `locationName:"targets" min:"1" type:"list" required:"true"` - - // Specifies the amount of time each device has to finish its execution of the - // job. The timer is started when the job execution status is set to IN_PROGRESS. - // If the job execution status is not set to another terminal state before the - // time expires, it will be automatically set to TIMED_OUT. - TimeoutConfig *TimeoutConfig `locationName:"timeoutConfig" type:"structure"` -} - -// String returns the string representation -func (s CreateJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateJobInput"} - if s.DocumentSource != nil && len(*s.DocumentSource) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DocumentSource", 1)) - } - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - if s.Targets == nil { - invalidParams.Add(request.NewErrParamRequired("Targets")) - } - if s.Targets != nil && len(s.Targets) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Targets", 1)) - } - if s.AbortConfig != nil { - if err := s.AbortConfig.Validate(); err != nil { - invalidParams.AddNested("AbortConfig", err.(request.ErrInvalidParams)) - } - } - if s.JobExecutionsRolloutConfig != nil { - if err := s.JobExecutionsRolloutConfig.Validate(); err != nil { - invalidParams.AddNested("JobExecutionsRolloutConfig", err.(request.ErrInvalidParams)) - } - } - if s.PresignedUrlConfig != nil { - if err := s.PresignedUrlConfig.Validate(); err != nil { - invalidParams.AddNested("PresignedUrlConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAbortConfig sets the AbortConfig field's value. -func (s *CreateJobInput) SetAbortConfig(v *AbortConfig) *CreateJobInput { - s.AbortConfig = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateJobInput) SetDescription(v string) *CreateJobInput { - s.Description = &v - return s -} - -// SetDocument sets the Document field's value. -func (s *CreateJobInput) SetDocument(v string) *CreateJobInput { - s.Document = &v - return s -} - -// SetDocumentSource sets the DocumentSource field's value. -func (s *CreateJobInput) SetDocumentSource(v string) *CreateJobInput { - s.DocumentSource = &v - return s -} - -// SetJobExecutionsRolloutConfig sets the JobExecutionsRolloutConfig field's value. -func (s *CreateJobInput) SetJobExecutionsRolloutConfig(v *JobExecutionsRolloutConfig) *CreateJobInput { - s.JobExecutionsRolloutConfig = v - return s -} - -// SetJobId sets the JobId field's value. -func (s *CreateJobInput) SetJobId(v string) *CreateJobInput { - s.JobId = &v - return s -} - -// SetPresignedUrlConfig sets the PresignedUrlConfig field's value. -func (s *CreateJobInput) SetPresignedUrlConfig(v *PresignedUrlConfig) *CreateJobInput { - s.PresignedUrlConfig = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateJobInput) SetTags(v []*Tag) *CreateJobInput { - s.Tags = v - return s -} - -// SetTargetSelection sets the TargetSelection field's value. -func (s *CreateJobInput) SetTargetSelection(v string) *CreateJobInput { - s.TargetSelection = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *CreateJobInput) SetTargets(v []*string) *CreateJobInput { - s.Targets = v - return s -} - -// SetTimeoutConfig sets the TimeoutConfig field's value. -func (s *CreateJobInput) SetTimeoutConfig(v *TimeoutConfig) *CreateJobInput { - s.TimeoutConfig = v - return s -} - -type CreateJobOutput struct { - _ struct{} `type:"structure"` - - // The job description. - Description *string `locationName:"description" type:"string"` - - // The job ARN. - JobArn *string `locationName:"jobArn" type:"string"` - - // The unique identifier you assigned to this job. - JobId *string `locationName:"jobId" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJobOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *CreateJobOutput) SetDescription(v string) *CreateJobOutput { - s.Description = &v - return s -} - -// SetJobArn sets the JobArn field's value. -func (s *CreateJobOutput) SetJobArn(v string) *CreateJobOutput { - s.JobArn = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *CreateJobOutput) SetJobId(v string) *CreateJobOutput { - s.JobId = &v - return s -} - -// The input for the CreateKeysAndCertificate operation. -type CreateKeysAndCertificateInput struct { - _ struct{} `type:"structure"` - - // Specifies whether the certificate is active. - SetAsActive *bool `location:"querystring" locationName:"setAsActive" type:"boolean"` -} - -// String returns the string representation -func (s CreateKeysAndCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateKeysAndCertificateInput) GoString() string { - return s.String() -} - -// SetSetAsActive sets the SetAsActive field's value. -func (s *CreateKeysAndCertificateInput) SetSetAsActive(v bool) *CreateKeysAndCertificateInput { - s.SetAsActive = &v - return s -} - -// The output of the CreateKeysAndCertificate operation. -type CreateKeysAndCertificateOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the certificate. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // The ID of the certificate. AWS IoT issues a default subject name for the - // certificate (for example, AWS IoT Certificate). - CertificateId *string `locationName:"certificateId" min:"64" type:"string"` - - // The certificate data, in PEM format. - CertificatePem *string `locationName:"certificatePem" min:"1" type:"string"` - - // The generated key pair. - KeyPair *KeyPair `locationName:"keyPair" type:"structure"` -} - -// String returns the string representation -func (s CreateKeysAndCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateKeysAndCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *CreateKeysAndCertificateOutput) SetCertificateArn(v string) *CreateKeysAndCertificateOutput { - s.CertificateArn = &v - return s -} - -// SetCertificateId sets the CertificateId field's value. -func (s *CreateKeysAndCertificateOutput) SetCertificateId(v string) *CreateKeysAndCertificateOutput { - s.CertificateId = &v - return s -} - -// SetCertificatePem sets the CertificatePem field's value. -func (s *CreateKeysAndCertificateOutput) SetCertificatePem(v string) *CreateKeysAndCertificateOutput { - s.CertificatePem = &v - return s -} - -// SetKeyPair sets the KeyPair field's value. -func (s *CreateKeysAndCertificateOutput) SetKeyPair(v *KeyPair) *CreateKeysAndCertificateOutput { - s.KeyPair = v - return s -} - -type CreateOTAUpdateInput struct { - _ struct{} `type:"structure"` - - // A list of additional OTA update parameters which are name-value pairs. - AdditionalParameters map[string]*string `locationName:"additionalParameters" type:"map"` - - // Configuration for the rollout of OTA updates. - AwsJobExecutionsRolloutConfig *AwsJobExecutionsRolloutConfig `locationName:"awsJobExecutionsRolloutConfig" type:"structure"` - - // The description of the OTA update. - Description *string `locationName:"description" type:"string"` - - // The files to be streamed by the OTA update. - // - // Files is a required field - Files []*OTAUpdateFile `locationName:"files" min:"1" type:"list" required:"true"` - - // The ID of the OTA update to be created. - // - // OtaUpdateId is a required field - OtaUpdateId *string `location:"uri" locationName:"otaUpdateId" min:"1" type:"string" required:"true"` - - // The IAM role that allows access to the AWS IoT Jobs service. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" min:"20" type:"string" required:"true"` - - // Specifies whether the update will continue to run (CONTINUOUS), or will be - // complete after all the things specified as targets have completed the update - // (SNAPSHOT). If continuous, the update may also be run on a thing when a change - // is detected in a target. For example, an update will run on a thing when - // the thing is added to a target group, even after the update was completed - // by all things originally in the group. Valid values: CONTINUOUS | SNAPSHOT. - TargetSelection *string `locationName:"targetSelection" type:"string" enum:"TargetSelection"` - - // The targeted devices to receive OTA updates. - // - // Targets is a required field - Targets []*string `locationName:"targets" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateOTAUpdateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateOTAUpdateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateOTAUpdateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateOTAUpdateInput"} - if s.Files == nil { - invalidParams.Add(request.NewErrParamRequired("Files")) - } - if s.Files != nil && len(s.Files) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Files", 1)) - } - if s.OtaUpdateId == nil { - invalidParams.Add(request.NewErrParamRequired("OtaUpdateId")) - } - if s.OtaUpdateId != nil && len(*s.OtaUpdateId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OtaUpdateId", 1)) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.Targets == nil { - invalidParams.Add(request.NewErrParamRequired("Targets")) - } - if s.Targets != nil && len(s.Targets) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Targets", 1)) - } - if s.AwsJobExecutionsRolloutConfig != nil { - if err := s.AwsJobExecutionsRolloutConfig.Validate(); err != nil { - invalidParams.AddNested("AwsJobExecutionsRolloutConfig", err.(request.ErrInvalidParams)) - } - } - if s.Files != nil { - for i, v := range s.Files { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Files", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdditionalParameters sets the AdditionalParameters field's value. -func (s *CreateOTAUpdateInput) SetAdditionalParameters(v map[string]*string) *CreateOTAUpdateInput { - s.AdditionalParameters = v - return s -} - -// SetAwsJobExecutionsRolloutConfig sets the AwsJobExecutionsRolloutConfig field's value. -func (s *CreateOTAUpdateInput) SetAwsJobExecutionsRolloutConfig(v *AwsJobExecutionsRolloutConfig) *CreateOTAUpdateInput { - s.AwsJobExecutionsRolloutConfig = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateOTAUpdateInput) SetDescription(v string) *CreateOTAUpdateInput { - s.Description = &v - return s -} - -// SetFiles sets the Files field's value. -func (s *CreateOTAUpdateInput) SetFiles(v []*OTAUpdateFile) *CreateOTAUpdateInput { - s.Files = v - return s -} - -// SetOtaUpdateId sets the OtaUpdateId field's value. -func (s *CreateOTAUpdateInput) SetOtaUpdateId(v string) *CreateOTAUpdateInput { - s.OtaUpdateId = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CreateOTAUpdateInput) SetRoleArn(v string) *CreateOTAUpdateInput { - s.RoleArn = &v - return s -} - -// SetTargetSelection sets the TargetSelection field's value. -func (s *CreateOTAUpdateInput) SetTargetSelection(v string) *CreateOTAUpdateInput { - s.TargetSelection = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *CreateOTAUpdateInput) SetTargets(v []*string) *CreateOTAUpdateInput { - s.Targets = v - return s -} - -type CreateOTAUpdateOutput struct { - _ struct{} `type:"structure"` - - // The AWS IoT job ARN associated with the OTA update. - AwsIotJobArn *string `locationName:"awsIotJobArn" type:"string"` - - // The AWS IoT job ID associated with the OTA update. - AwsIotJobId *string `locationName:"awsIotJobId" type:"string"` - - // The OTA update ARN. - OtaUpdateArn *string `locationName:"otaUpdateArn" type:"string"` - - // The OTA update ID. - OtaUpdateId *string `locationName:"otaUpdateId" min:"1" type:"string"` - - // The OTA update status. - OtaUpdateStatus *string `locationName:"otaUpdateStatus" type:"string" enum:"OTAUpdateStatus"` -} - -// String returns the string representation -func (s CreateOTAUpdateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateOTAUpdateOutput) GoString() string { - return s.String() -} - -// SetAwsIotJobArn sets the AwsIotJobArn field's value. -func (s *CreateOTAUpdateOutput) SetAwsIotJobArn(v string) *CreateOTAUpdateOutput { - s.AwsIotJobArn = &v - return s -} - -// SetAwsIotJobId sets the AwsIotJobId field's value. -func (s *CreateOTAUpdateOutput) SetAwsIotJobId(v string) *CreateOTAUpdateOutput { - s.AwsIotJobId = &v - return s -} - -// SetOtaUpdateArn sets the OtaUpdateArn field's value. -func (s *CreateOTAUpdateOutput) SetOtaUpdateArn(v string) *CreateOTAUpdateOutput { - s.OtaUpdateArn = &v - return s -} - -// SetOtaUpdateId sets the OtaUpdateId field's value. -func (s *CreateOTAUpdateOutput) SetOtaUpdateId(v string) *CreateOTAUpdateOutput { - s.OtaUpdateId = &v - return s -} - -// SetOtaUpdateStatus sets the OtaUpdateStatus field's value. -func (s *CreateOTAUpdateOutput) SetOtaUpdateStatus(v string) *CreateOTAUpdateOutput { - s.OtaUpdateStatus = &v - return s -} - -// The input for the CreatePolicy operation. -type CreatePolicyInput struct { - _ struct{} `type:"structure"` - - // The JSON document that describes the policy. policyDocument must have a minimum - // length of 1, with a maximum length of 2048, excluding whitespace. - // - // PolicyDocument is a required field - PolicyDocument *string `locationName:"policyDocument" type:"string" required:"true"` - - // The policy name. - // - // PolicyName is a required field - PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreatePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePolicyInput"} - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *CreatePolicyInput) SetPolicyDocument(v string) *CreatePolicyInput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *CreatePolicyInput) SetPolicyName(v string) *CreatePolicyInput { - s.PolicyName = &v - return s -} - -// The output from the CreatePolicy operation. -type CreatePolicyOutput struct { - _ struct{} `type:"structure"` - - // The policy ARN. - PolicyArn *string `locationName:"policyArn" type:"string"` - - // The JSON document that describes the policy. - PolicyDocument *string `locationName:"policyDocument" type:"string"` - - // The policy name. - PolicyName *string `locationName:"policyName" min:"1" type:"string"` - - // The policy version ID. - PolicyVersionId *string `locationName:"policyVersionId" type:"string"` -} - -// String returns the string representation -func (s CreatePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePolicyOutput) GoString() string { - return s.String() -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *CreatePolicyOutput) SetPolicyArn(v string) *CreatePolicyOutput { - s.PolicyArn = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *CreatePolicyOutput) SetPolicyDocument(v string) *CreatePolicyOutput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *CreatePolicyOutput) SetPolicyName(v string) *CreatePolicyOutput { - s.PolicyName = &v - return s -} - -// SetPolicyVersionId sets the PolicyVersionId field's value. -func (s *CreatePolicyOutput) SetPolicyVersionId(v string) *CreatePolicyOutput { - s.PolicyVersionId = &v - return s -} - -// The input for the CreatePolicyVersion operation. -type CreatePolicyVersionInput struct { - _ struct{} `type:"structure"` - - // The JSON document that describes the policy. Minimum length of 1. Maximum - // length of 2048, excluding whitespace. - // - // PolicyDocument is a required field - PolicyDocument *string `locationName:"policyDocument" type:"string" required:"true"` - - // The policy name. - // - // PolicyName is a required field - PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` - - // Specifies whether the policy version is set as the default. When this parameter - // is true, the new policy version becomes the operative version (that is, the - // version that is in effect for the certificates to which the policy is attached). - SetAsDefault *bool `location:"querystring" locationName:"setAsDefault" type:"boolean"` -} - -// String returns the string representation -func (s CreatePolicyVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePolicyVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePolicyVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePolicyVersionInput"} - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *CreatePolicyVersionInput) SetPolicyDocument(v string) *CreatePolicyVersionInput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *CreatePolicyVersionInput) SetPolicyName(v string) *CreatePolicyVersionInput { - s.PolicyName = &v - return s -} - -// SetSetAsDefault sets the SetAsDefault field's value. -func (s *CreatePolicyVersionInput) SetSetAsDefault(v bool) *CreatePolicyVersionInput { - s.SetAsDefault = &v - return s -} - -// The output of the CreatePolicyVersion operation. -type CreatePolicyVersionOutput struct { - _ struct{} `type:"structure"` - - // Specifies whether the policy version is the default. - IsDefaultVersion *bool `locationName:"isDefaultVersion" type:"boolean"` - - // The policy ARN. - PolicyArn *string `locationName:"policyArn" type:"string"` - - // The JSON document that describes the policy. - PolicyDocument *string `locationName:"policyDocument" type:"string"` - - // The policy version ID. - PolicyVersionId *string `locationName:"policyVersionId" type:"string"` -} - -// String returns the string representation -func (s CreatePolicyVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePolicyVersionOutput) GoString() string { - return s.String() -} - -// SetIsDefaultVersion sets the IsDefaultVersion field's value. -func (s *CreatePolicyVersionOutput) SetIsDefaultVersion(v bool) *CreatePolicyVersionOutput { - s.IsDefaultVersion = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *CreatePolicyVersionOutput) SetPolicyArn(v string) *CreatePolicyVersionOutput { - s.PolicyArn = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *CreatePolicyVersionOutput) SetPolicyDocument(v string) *CreatePolicyVersionOutput { - s.PolicyDocument = &v - return s -} - -// SetPolicyVersionId sets the PolicyVersionId field's value. -func (s *CreatePolicyVersionOutput) SetPolicyVersionId(v string) *CreatePolicyVersionOutput { - s.PolicyVersionId = &v - return s -} - -type CreateRoleAliasInput struct { - _ struct{} `type:"structure"` - - // How long (in seconds) the credentials will be valid. - CredentialDurationSeconds *int64 `locationName:"credentialDurationSeconds" min:"900" type:"integer"` - - // The role alias that points to a role ARN. This allows you to change the role - // without having to update the device. - // - // RoleAlias is a required field - RoleAlias *string `location:"uri" locationName:"roleAlias" min:"1" type:"string" required:"true"` - - // The role ARN. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateRoleAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRoleAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRoleAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRoleAliasInput"} - if s.CredentialDurationSeconds != nil && *s.CredentialDurationSeconds < 900 { - invalidParams.Add(request.NewErrParamMinValue("CredentialDurationSeconds", 900)) - } - if s.RoleAlias == nil { - invalidParams.Add(request.NewErrParamRequired("RoleAlias")) - } - if s.RoleAlias != nil && len(*s.RoleAlias) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleAlias", 1)) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCredentialDurationSeconds sets the CredentialDurationSeconds field's value. -func (s *CreateRoleAliasInput) SetCredentialDurationSeconds(v int64) *CreateRoleAliasInput { - s.CredentialDurationSeconds = &v - return s -} - -// SetRoleAlias sets the RoleAlias field's value. -func (s *CreateRoleAliasInput) SetRoleAlias(v string) *CreateRoleAliasInput { - s.RoleAlias = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CreateRoleAliasInput) SetRoleArn(v string) *CreateRoleAliasInput { - s.RoleArn = &v - return s -} - -type CreateRoleAliasOutput struct { - _ struct{} `type:"structure"` - - // The role alias. - RoleAlias *string `locationName:"roleAlias" min:"1" type:"string"` - - // The role alias ARN. - RoleAliasArn *string `locationName:"roleAliasArn" type:"string"` -} - -// String returns the string representation -func (s CreateRoleAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRoleAliasOutput) GoString() string { - return s.String() -} - -// SetRoleAlias sets the RoleAlias field's value. -func (s *CreateRoleAliasOutput) SetRoleAlias(v string) *CreateRoleAliasOutput { - s.RoleAlias = &v - return s -} - -// SetRoleAliasArn sets the RoleAliasArn field's value. -func (s *CreateRoleAliasOutput) SetRoleAliasArn(v string) *CreateRoleAliasOutput { - s.RoleAliasArn = &v - return s -} - -type CreateScheduledAuditInput struct { - _ struct{} `type:"structure"` - - // The day of the month on which the scheduled audit takes place. Can be "1" - // through "31" or "LAST". This field is required if the "frequency" parameter - // is set to "MONTHLY". If days 29-31 are specified, and the month does not - // have that many days, the audit takes place on the "LAST" day of the month. - DayOfMonth *string `locationName:"dayOfMonth" type:"string"` - - // The day of the week on which the scheduled audit takes place. Can be one - // of "SUN", "MON", "TUE", "WED", "THU", "FRI" or "SAT". This field is required - // if the "frequency" parameter is set to "WEEKLY" or "BIWEEKLY". - DayOfWeek *string `locationName:"dayOfWeek" type:"string" enum:"DayOfWeek"` - - // How often the scheduled audit takes place. Can be one of "DAILY", "WEEKLY", - // "BIWEEKLY" or "MONTHLY". The actual start time of each audit is determined - // by the system. - // - // Frequency is a required field - Frequency *string `locationName:"frequency" type:"string" required:"true" enum:"AuditFrequency"` - - // The name you want to give to the scheduled audit. (Max. 128 chars) - // - // ScheduledAuditName is a required field - ScheduledAuditName *string `location:"uri" locationName:"scheduledAuditName" min:"1" type:"string" required:"true"` - - // Which checks are performed during the scheduled audit. Checks must be enabled - // for your account. (Use DescribeAccountAuditConfiguration to see the list - // of all checks including those that are enabled or UpdateAccountAuditConfiguration - // to select which checks are enabled.) - // - // TargetCheckNames is a required field - TargetCheckNames []*string `locationName:"targetCheckNames" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateScheduledAuditInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateScheduledAuditInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateScheduledAuditInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateScheduledAuditInput"} - if s.Frequency == nil { - invalidParams.Add(request.NewErrParamRequired("Frequency")) - } - if s.ScheduledAuditName == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduledAuditName")) - } - if s.ScheduledAuditName != nil && len(*s.ScheduledAuditName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScheduledAuditName", 1)) - } - if s.TargetCheckNames == nil { - invalidParams.Add(request.NewErrParamRequired("TargetCheckNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDayOfMonth sets the DayOfMonth field's value. -func (s *CreateScheduledAuditInput) SetDayOfMonth(v string) *CreateScheduledAuditInput { - s.DayOfMonth = &v - return s -} - -// SetDayOfWeek sets the DayOfWeek field's value. -func (s *CreateScheduledAuditInput) SetDayOfWeek(v string) *CreateScheduledAuditInput { - s.DayOfWeek = &v - return s -} - -// SetFrequency sets the Frequency field's value. -func (s *CreateScheduledAuditInput) SetFrequency(v string) *CreateScheduledAuditInput { - s.Frequency = &v - return s -} - -// SetScheduledAuditName sets the ScheduledAuditName field's value. -func (s *CreateScheduledAuditInput) SetScheduledAuditName(v string) *CreateScheduledAuditInput { - s.ScheduledAuditName = &v - return s -} - -// SetTargetCheckNames sets the TargetCheckNames field's value. -func (s *CreateScheduledAuditInput) SetTargetCheckNames(v []*string) *CreateScheduledAuditInput { - s.TargetCheckNames = v - return s -} - -type CreateScheduledAuditOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the scheduled audit. - ScheduledAuditArn *string `locationName:"scheduledAuditArn" type:"string"` -} - -// String returns the string representation -func (s CreateScheduledAuditOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateScheduledAuditOutput) GoString() string { - return s.String() -} - -// SetScheduledAuditArn sets the ScheduledAuditArn field's value. -func (s *CreateScheduledAuditOutput) SetScheduledAuditArn(v string) *CreateScheduledAuditOutput { - s.ScheduledAuditArn = &v - return s -} - -type CreateSecurityProfileInput struct { - _ struct{} `type:"structure"` - - // Specifies the destinations to which alerts are sent. (Alerts are always sent - // to the console.) Alerts are generated when a device (thing) violates a behavior. - AlertTargets map[string]*AlertTarget `locationName:"alertTargets" type:"map"` - - // Specifies the behaviors that, when violated by a device (thing), cause an - // alert. - // - // Behaviors is a required field - Behaviors []*Behavior `locationName:"behaviors" type:"list" required:"true"` - - // A description of the security profile. - SecurityProfileDescription *string `locationName:"securityProfileDescription" type:"string"` - - // The name you are giving to the security profile. - // - // SecurityProfileName is a required field - SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` - - // Metadata which can be used to manage the security profile. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateSecurityProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSecurityProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSecurityProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSecurityProfileInput"} - if s.Behaviors == nil { - invalidParams.Add(request.NewErrParamRequired("Behaviors")) - } - if s.SecurityProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityProfileName")) - } - if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) - } - if s.AlertTargets != nil { - for i, v := range s.AlertTargets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AlertTargets", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Behaviors != nil { - for i, v := range s.Behaviors { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Behaviors", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlertTargets sets the AlertTargets field's value. -func (s *CreateSecurityProfileInput) SetAlertTargets(v map[string]*AlertTarget) *CreateSecurityProfileInput { - s.AlertTargets = v - return s -} - -// SetBehaviors sets the Behaviors field's value. -func (s *CreateSecurityProfileInput) SetBehaviors(v []*Behavior) *CreateSecurityProfileInput { - s.Behaviors = v - return s -} - -// SetSecurityProfileDescription sets the SecurityProfileDescription field's value. -func (s *CreateSecurityProfileInput) SetSecurityProfileDescription(v string) *CreateSecurityProfileInput { - s.SecurityProfileDescription = &v - return s -} - -// SetSecurityProfileName sets the SecurityProfileName field's value. -func (s *CreateSecurityProfileInput) SetSecurityProfileName(v string) *CreateSecurityProfileInput { - s.SecurityProfileName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateSecurityProfileInput) SetTags(v []*Tag) *CreateSecurityProfileInput { - s.Tags = v - return s -} - -type CreateSecurityProfileOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the security profile. - SecurityProfileArn *string `locationName:"securityProfileArn" type:"string"` - - // The name you gave to the security profile. - SecurityProfileName *string `locationName:"securityProfileName" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateSecurityProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSecurityProfileOutput) GoString() string { - return s.String() -} - -// SetSecurityProfileArn sets the SecurityProfileArn field's value. -func (s *CreateSecurityProfileOutput) SetSecurityProfileArn(v string) *CreateSecurityProfileOutput { - s.SecurityProfileArn = &v - return s -} - -// SetSecurityProfileName sets the SecurityProfileName field's value. -func (s *CreateSecurityProfileOutput) SetSecurityProfileName(v string) *CreateSecurityProfileOutput { - s.SecurityProfileName = &v - return s -} - -type CreateStreamInput struct { - _ struct{} `type:"structure"` - - // A description of the stream. - Description *string `locationName:"description" type:"string"` - - // The files to stream. - // - // Files is a required field - Files []*StreamFile `locationName:"files" min:"1" type:"list" required:"true"` - - // An IAM role that allows the IoT service principal assumes to access your - // S3 files. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" min:"20" type:"string" required:"true"` - - // The stream ID. - // - // StreamId is a required field - StreamId *string `location:"uri" locationName:"streamId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStreamInput"} - if s.Files == nil { - invalidParams.Add(request.NewErrParamRequired("Files")) - } - if s.Files != nil && len(s.Files) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Files", 1)) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.StreamId == nil { - invalidParams.Add(request.NewErrParamRequired("StreamId")) - } - if s.StreamId != nil && len(*s.StreamId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamId", 1)) - } - if s.Files != nil { - for i, v := range s.Files { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Files", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateStreamInput) SetDescription(v string) *CreateStreamInput { - s.Description = &v - return s -} - -// SetFiles sets the Files field's value. -func (s *CreateStreamInput) SetFiles(v []*StreamFile) *CreateStreamInput { - s.Files = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CreateStreamInput) SetRoleArn(v string) *CreateStreamInput { - s.RoleArn = &v - return s -} - -// SetStreamId sets the StreamId field's value. -func (s *CreateStreamInput) SetStreamId(v string) *CreateStreamInput { - s.StreamId = &v - return s -} - -type CreateStreamOutput struct { - _ struct{} `type:"structure"` - - // A description of the stream. - Description *string `locationName:"description" type:"string"` - - // The stream ARN. - StreamArn *string `locationName:"streamArn" type:"string"` - - // The stream ID. - StreamId *string `locationName:"streamId" min:"1" type:"string"` - - // The version of the stream. - StreamVersion *int64 `locationName:"streamVersion" type:"integer"` -} - -// String returns the string representation -func (s CreateStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStreamOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *CreateStreamOutput) SetDescription(v string) *CreateStreamOutput { - s.Description = &v - return s -} - -// SetStreamArn sets the StreamArn field's value. -func (s *CreateStreamOutput) SetStreamArn(v string) *CreateStreamOutput { - s.StreamArn = &v - return s -} - -// SetStreamId sets the StreamId field's value. -func (s *CreateStreamOutput) SetStreamId(v string) *CreateStreamOutput { - s.StreamId = &v - return s -} - -// SetStreamVersion sets the StreamVersion field's value. -func (s *CreateStreamOutput) SetStreamVersion(v int64) *CreateStreamOutput { - s.StreamVersion = &v - return s -} - -type CreateThingGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the parent thing group. - ParentGroupName *string `locationName:"parentGroupName" min:"1" type:"string"` - - // Metadata which can be used to manage the thing group. - Tags []*Tag `locationName:"tags" type:"list"` - - // The thing group name to create. - // - // ThingGroupName is a required field - ThingGroupName *string `location:"uri" locationName:"thingGroupName" min:"1" type:"string" required:"true"` - - // The thing group properties. - ThingGroupProperties *ThingGroupProperties `locationName:"thingGroupProperties" type:"structure"` -} - -// String returns the string representation -func (s CreateThingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateThingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateThingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateThingGroupInput"} - if s.ParentGroupName != nil && len(*s.ParentGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ParentGroupName", 1)) - } - if s.ThingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ThingGroupName")) - } - if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParentGroupName sets the ParentGroupName field's value. -func (s *CreateThingGroupInput) SetParentGroupName(v string) *CreateThingGroupInput { - s.ParentGroupName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateThingGroupInput) SetTags(v []*Tag) *CreateThingGroupInput { - s.Tags = v - return s -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *CreateThingGroupInput) SetThingGroupName(v string) *CreateThingGroupInput { - s.ThingGroupName = &v - return s -} - -// SetThingGroupProperties sets the ThingGroupProperties field's value. -func (s *CreateThingGroupInput) SetThingGroupProperties(v *ThingGroupProperties) *CreateThingGroupInput { - s.ThingGroupProperties = v - return s -} - -type CreateThingGroupOutput struct { - _ struct{} `type:"structure"` - - // The thing group ARN. - ThingGroupArn *string `locationName:"thingGroupArn" type:"string"` - - // The thing group ID. - ThingGroupId *string `locationName:"thingGroupId" min:"1" type:"string"` - - // The thing group name. - ThingGroupName *string `locationName:"thingGroupName" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateThingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateThingGroupOutput) GoString() string { - return s.String() -} - -// SetThingGroupArn sets the ThingGroupArn field's value. -func (s *CreateThingGroupOutput) SetThingGroupArn(v string) *CreateThingGroupOutput { - s.ThingGroupArn = &v - return s -} - -// SetThingGroupId sets the ThingGroupId field's value. -func (s *CreateThingGroupOutput) SetThingGroupId(v string) *CreateThingGroupOutput { - s.ThingGroupId = &v - return s -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *CreateThingGroupOutput) SetThingGroupName(v string) *CreateThingGroupOutput { - s.ThingGroupName = &v - return s -} - -// The input for the CreateThing operation. -type CreateThingInput struct { - _ struct{} `type:"structure"` - - // The attribute payload, which consists of up to three name/value pairs in - // a JSON document. For example: - // - // {\"attributes\":{\"string1\":\"string2\"}} - AttributePayload *AttributePayload `locationName:"attributePayload" type:"structure"` - - // The name of the billing group the thing will be added to. - BillingGroupName *string `locationName:"billingGroupName" min:"1" type:"string"` - - // The name of the thing to create. - // - // ThingName is a required field - ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` - - // The name of the thing type associated with the new thing. - ThingTypeName *string `locationName:"thingTypeName" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateThingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateThingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateThingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateThingInput"} - if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) - } - if s.ThingName == nil { - invalidParams.Add(request.NewErrParamRequired("ThingName")) - } - if s.ThingName != nil && len(*s.ThingName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) - } - if s.ThingTypeName != nil && len(*s.ThingTypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingTypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributePayload sets the AttributePayload field's value. -func (s *CreateThingInput) SetAttributePayload(v *AttributePayload) *CreateThingInput { - s.AttributePayload = v - return s -} - -// SetBillingGroupName sets the BillingGroupName field's value. -func (s *CreateThingInput) SetBillingGroupName(v string) *CreateThingInput { - s.BillingGroupName = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *CreateThingInput) SetThingName(v string) *CreateThingInput { - s.ThingName = &v - return s -} - -// SetThingTypeName sets the ThingTypeName field's value. -func (s *CreateThingInput) SetThingTypeName(v string) *CreateThingInput { - s.ThingTypeName = &v - return s -} - -// The output of the CreateThing operation. -type CreateThingOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the new thing. - ThingArn *string `locationName:"thingArn" type:"string"` - - // The thing ID. - ThingId *string `locationName:"thingId" type:"string"` - - // The name of the new thing. - ThingName *string `locationName:"thingName" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateThingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateThingOutput) GoString() string { - return s.String() -} - -// SetThingArn sets the ThingArn field's value. -func (s *CreateThingOutput) SetThingArn(v string) *CreateThingOutput { - s.ThingArn = &v - return s -} - -// SetThingId sets the ThingId field's value. -func (s *CreateThingOutput) SetThingId(v string) *CreateThingOutput { - s.ThingId = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *CreateThingOutput) SetThingName(v string) *CreateThingOutput { - s.ThingName = &v - return s -} - -// The input for the CreateThingType operation. -type CreateThingTypeInput struct { - _ struct{} `type:"structure"` - - // Metadata which can be used to manage the thing type. - Tags []*Tag `locationName:"tags" type:"list"` - - // The name of the thing type. - // - // ThingTypeName is a required field - ThingTypeName *string `location:"uri" locationName:"thingTypeName" min:"1" type:"string" required:"true"` - - // The ThingTypeProperties for the thing type to create. It contains information - // about the new thing type including a description, and a list of searchable - // thing attribute names. - ThingTypeProperties *ThingTypeProperties `locationName:"thingTypeProperties" type:"structure"` -} - -// String returns the string representation -func (s CreateThingTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateThingTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateThingTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateThingTypeInput"} - if s.ThingTypeName == nil { - invalidParams.Add(request.NewErrParamRequired("ThingTypeName")) - } - if s.ThingTypeName != nil && len(*s.ThingTypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingTypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTags sets the Tags field's value. -func (s *CreateThingTypeInput) SetTags(v []*Tag) *CreateThingTypeInput { - s.Tags = v - return s -} - -// SetThingTypeName sets the ThingTypeName field's value. -func (s *CreateThingTypeInput) SetThingTypeName(v string) *CreateThingTypeInput { - s.ThingTypeName = &v - return s -} - -// SetThingTypeProperties sets the ThingTypeProperties field's value. -func (s *CreateThingTypeInput) SetThingTypeProperties(v *ThingTypeProperties) *CreateThingTypeInput { - s.ThingTypeProperties = v - return s -} - -// The output of the CreateThingType operation. -type CreateThingTypeOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the thing type. - ThingTypeArn *string `locationName:"thingTypeArn" type:"string"` - - // The thing type ID. - ThingTypeId *string `locationName:"thingTypeId" type:"string"` - - // The name of the thing type. - ThingTypeName *string `locationName:"thingTypeName" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateThingTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateThingTypeOutput) GoString() string { - return s.String() -} - -// SetThingTypeArn sets the ThingTypeArn field's value. -func (s *CreateThingTypeOutput) SetThingTypeArn(v string) *CreateThingTypeOutput { - s.ThingTypeArn = &v - return s -} - -// SetThingTypeId sets the ThingTypeId field's value. -func (s *CreateThingTypeOutput) SetThingTypeId(v string) *CreateThingTypeOutput { - s.ThingTypeId = &v - return s -} - -// SetThingTypeName sets the ThingTypeName field's value. -func (s *CreateThingTypeOutput) SetThingTypeName(v string) *CreateThingTypeOutput { - s.ThingTypeName = &v - return s -} - -// The input for the CreateTopicRule operation. -type CreateTopicRuleInput struct { - _ struct{} `type:"structure" payload:"TopicRulePayload"` - - // The name of the rule. - // - // RuleName is a required field - RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` - - // Metadata which can be used to manage the topic rule. - // - // For URI Request parameters use format: ...key1=value1&key2=value2... - // - // For the CLI command-line parameter use format: --tags "key1=value1&key2=value2..." - // - // For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." - Tags *string `location:"header" locationName:"x-amz-tagging" type:"string"` - - // The rule payload. - // - // TopicRulePayload is a required field - TopicRulePayload *TopicRulePayload `locationName:"topicRulePayload" type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateTopicRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTopicRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTopicRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTopicRuleInput"} - if s.RuleName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleName")) - } - if s.RuleName != nil && len(*s.RuleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) - } - if s.TopicRulePayload == nil { - invalidParams.Add(request.NewErrParamRequired("TopicRulePayload")) - } - if s.TopicRulePayload != nil { - if err := s.TopicRulePayload.Validate(); err != nil { - invalidParams.AddNested("TopicRulePayload", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleName sets the RuleName field's value. -func (s *CreateTopicRuleInput) SetRuleName(v string) *CreateTopicRuleInput { - s.RuleName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateTopicRuleInput) SetTags(v string) *CreateTopicRuleInput { - s.Tags = &v - return s -} - -// SetTopicRulePayload sets the TopicRulePayload field's value. -func (s *CreateTopicRuleInput) SetTopicRulePayload(v *TopicRulePayload) *CreateTopicRuleInput { - s.TopicRulePayload = v - return s -} - -type CreateTopicRuleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateTopicRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTopicRuleOutput) GoString() string { - return s.String() -} - -// Describes a custom method used to code sign a file. -type CustomCodeSigning struct { - _ struct{} `type:"structure"` - - // The certificate chain. - CertificateChain *CodeSigningCertificateChain `locationName:"certificateChain" type:"structure"` - - // The hash algorithm used to code sign the file. - HashAlgorithm *string `locationName:"hashAlgorithm" type:"string"` - - // The signature for the file. - Signature *CodeSigningSignature `locationName:"signature" type:"structure"` - - // The signature algorithm used to code sign the file. - SignatureAlgorithm *string `locationName:"signatureAlgorithm" type:"string"` -} - -// String returns the string representation -func (s CustomCodeSigning) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CustomCodeSigning) GoString() string { - return s.String() -} - -// SetCertificateChain sets the CertificateChain field's value. -func (s *CustomCodeSigning) SetCertificateChain(v *CodeSigningCertificateChain) *CustomCodeSigning { - s.CertificateChain = v - return s -} - -// SetHashAlgorithm sets the HashAlgorithm field's value. -func (s *CustomCodeSigning) SetHashAlgorithm(v string) *CustomCodeSigning { - s.HashAlgorithm = &v - return s -} - -// SetSignature sets the Signature field's value. -func (s *CustomCodeSigning) SetSignature(v *CodeSigningSignature) *CustomCodeSigning { - s.Signature = v - return s -} - -// SetSignatureAlgorithm sets the SignatureAlgorithm field's value. -func (s *CustomCodeSigning) SetSignatureAlgorithm(v string) *CustomCodeSigning { - s.SignatureAlgorithm = &v - return s -} - -type DeleteAccountAuditConfigurationInput struct { - _ struct{} `type:"structure"` - - // If true, all scheduled audits are deleted. - DeleteScheduledAudits *bool `location:"querystring" locationName:"deleteScheduledAudits" type:"boolean"` -} - -// String returns the string representation -func (s DeleteAccountAuditConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAccountAuditConfigurationInput) GoString() string { - return s.String() -} - -// SetDeleteScheduledAudits sets the DeleteScheduledAudits field's value. -func (s *DeleteAccountAuditConfigurationInput) SetDeleteScheduledAudits(v bool) *DeleteAccountAuditConfigurationInput { - s.DeleteScheduledAudits = &v - return s -} - -type DeleteAccountAuditConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAccountAuditConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAccountAuditConfigurationOutput) GoString() string { - return s.String() -} - -type DeleteAuthorizerInput struct { - _ struct{} `type:"structure"` - - // The name of the authorizer to delete. - // - // AuthorizerName is a required field - AuthorizerName *string `location:"uri" locationName:"authorizerName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAuthorizerInput"} - if s.AuthorizerName == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerName")) - } - if s.AuthorizerName != nil && len(*s.AuthorizerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthorizerName sets the AuthorizerName field's value. -func (s *DeleteAuthorizerInput) SetAuthorizerName(v string) *DeleteAuthorizerInput { - s.AuthorizerName = &v - return s -} - -type DeleteAuthorizerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAuthorizerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAuthorizerOutput) GoString() string { - return s.String() -} - -type DeleteBillingGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the billing group. - // - // BillingGroupName is a required field - BillingGroupName *string `location:"uri" locationName:"billingGroupName" min:"1" type:"string" required:"true"` - - // The expected version of the billing group. If the version of the billing - // group does not match the expected version specified in the request, the DeleteBillingGroup - // request is rejected with a VersionConflictException. - ExpectedVersion *int64 `location:"querystring" locationName:"expectedVersion" type:"long"` -} - -// String returns the string representation -func (s DeleteBillingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBillingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBillingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBillingGroupInput"} - if s.BillingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("BillingGroupName")) - } - if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBillingGroupName sets the BillingGroupName field's value. -func (s *DeleteBillingGroupInput) SetBillingGroupName(v string) *DeleteBillingGroupInput { - s.BillingGroupName = &v - return s -} - -// SetExpectedVersion sets the ExpectedVersion field's value. -func (s *DeleteBillingGroupInput) SetExpectedVersion(v int64) *DeleteBillingGroupInput { - s.ExpectedVersion = &v - return s -} - -type DeleteBillingGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteBillingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBillingGroupOutput) GoString() string { - return s.String() -} - -// Input for the DeleteCACertificate operation. -type DeleteCACertificateInput struct { - _ struct{} `type:"structure"` - - // The ID of the certificate to delete. (The last part of the certificate ARN - // contains the certificate ID.) - // - // CertificateId is a required field - CertificateId *string `location:"uri" locationName:"caCertificateId" min:"64" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteCACertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCACertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCACertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCACertificateInput"} - if s.CertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateId")) - } - if s.CertificateId != nil && len(*s.CertificateId) < 64 { - invalidParams.Add(request.NewErrParamMinLen("CertificateId", 64)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateId sets the CertificateId field's value. -func (s *DeleteCACertificateInput) SetCertificateId(v string) *DeleteCACertificateInput { - s.CertificateId = &v - return s -} - -// The output for the DeleteCACertificate operation. -type DeleteCACertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCACertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCACertificateOutput) GoString() string { - return s.String() -} - -// The input for the DeleteCertificate operation. -type DeleteCertificateInput struct { - _ struct{} `type:"structure"` - - // The ID of the certificate. (The last part of the certificate ARN contains - // the certificate ID.) - // - // CertificateId is a required field - CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` - - // Forces a certificate request to be deleted. - ForceDelete *bool `location:"querystring" locationName:"forceDelete" type:"boolean"` -} - -// String returns the string representation -func (s DeleteCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCertificateInput"} - if s.CertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateId")) - } - if s.CertificateId != nil && len(*s.CertificateId) < 64 { - invalidParams.Add(request.NewErrParamMinLen("CertificateId", 64)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateId sets the CertificateId field's value. -func (s *DeleteCertificateInput) SetCertificateId(v string) *DeleteCertificateInput { - s.CertificateId = &v - return s -} - -// SetForceDelete sets the ForceDelete field's value. -func (s *DeleteCertificateInput) SetForceDelete(v bool) *DeleteCertificateInput { - s.ForceDelete = &v - return s -} - -type DeleteCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCertificateOutput) GoString() string { - return s.String() -} - -type DeleteDynamicThingGroupInput struct { - _ struct{} `type:"structure"` - - // The expected version of the dynamic thing group to delete. - ExpectedVersion *int64 `location:"querystring" locationName:"expectedVersion" type:"long"` - - // The name of the dynamic thing group to delete. - // - // ThingGroupName is a required field - ThingGroupName *string `location:"uri" locationName:"thingGroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDynamicThingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDynamicThingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDynamicThingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDynamicThingGroupInput"} - if s.ThingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ThingGroupName")) - } - if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExpectedVersion sets the ExpectedVersion field's value. -func (s *DeleteDynamicThingGroupInput) SetExpectedVersion(v int64) *DeleteDynamicThingGroupInput { - s.ExpectedVersion = &v - return s -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *DeleteDynamicThingGroupInput) SetThingGroupName(v string) *DeleteDynamicThingGroupInput { - s.ThingGroupName = &v - return s -} - -type DeleteDynamicThingGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDynamicThingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDynamicThingGroupOutput) GoString() string { - return s.String() -} - -type DeleteJobExecutionInput struct { - _ struct{} `type:"structure"` - - // The ID of the job execution to be deleted. The executionNumber refers to - // the execution of a particular job on a particular device. - // - // Note that once a job execution is deleted, the executionNumber may be reused - // by IoT, so be sure you get and use the correct value here. - // - // ExecutionNumber is a required field - ExecutionNumber *int64 `location:"uri" locationName:"executionNumber" type:"long" required:"true"` - - // (Optional) When true, you can delete a job execution which is "IN_PROGRESS". - // Otherwise, you can only delete a job execution which is in a terminal state - // ("SUCCEEDED", "FAILED", "REJECTED", "REMOVED" or "CANCELED") or an exception - // will occur. The default is false. - // - // Deleting a job execution which is "IN_PROGRESS", will cause the device to - // be unable to access job information or update the job execution status. Use - // caution and ensure that the device is able to recover to a valid state. - Force *bool `location:"querystring" locationName:"force" type:"boolean"` - - // The ID of the job whose execution on a particular device will be deleted. - // - // JobId is a required field - JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` - - // The name of the thing whose job execution will be deleted. - // - // ThingName is a required field - ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteJobExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteJobExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteJobExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteJobExecutionInput"} - if s.ExecutionNumber == nil { - invalidParams.Add(request.NewErrParamRequired("ExecutionNumber")) - } - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - 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 -} - -// SetExecutionNumber sets the ExecutionNumber field's value. -func (s *DeleteJobExecutionInput) SetExecutionNumber(v int64) *DeleteJobExecutionInput { - s.ExecutionNumber = &v - return s -} - -// SetForce sets the Force field's value. -func (s *DeleteJobExecutionInput) SetForce(v bool) *DeleteJobExecutionInput { - s.Force = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *DeleteJobExecutionInput) SetJobId(v string) *DeleteJobExecutionInput { - s.JobId = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *DeleteJobExecutionInput) SetThingName(v string) *DeleteJobExecutionInput { - s.ThingName = &v - return s -} - -type DeleteJobExecutionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteJobExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteJobExecutionOutput) GoString() string { - return s.String() -} - -type DeleteJobInput struct { - _ struct{} `type:"structure"` - - // (Optional) When true, you can delete a job which is "IN_PROGRESS". Otherwise, - // you can only delete a job which is in a terminal state ("COMPLETED" or "CANCELED") - // or an exception will occur. The default is false. - // - // Deleting a job which is "IN_PROGRESS", will cause a device which is executing - // the job to be unable to access job information or update the job execution - // status. Use caution and ensure that each device executing a job which is - // deleted is able to recover to a valid state. - Force *bool `location:"querystring" locationName:"force" type:"boolean"` - - // The ID of the job to be deleted. - // - // After a job deletion is completed, you may reuse this jobId when you create - // a new job. However, this is not recommended, and you must ensure that your - // devices are not using the jobId to refer to the deleted job. - // - // JobId is a required field - JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteJobInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForce sets the Force field's value. -func (s *DeleteJobInput) SetForce(v bool) *DeleteJobInput { - s.Force = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *DeleteJobInput) SetJobId(v string) *DeleteJobInput { - s.JobId = &v - return s -} - -type DeleteJobOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteJobOutput) GoString() string { - return s.String() -} - -type DeleteOTAUpdateInput struct { - _ struct{} `type:"structure"` - - // Specifies if the stream associated with an OTA update should be deleted when - // the OTA update is deleted. - DeleteStream *bool `location:"querystring" locationName:"deleteStream" type:"boolean"` - - // Specifies if the AWS Job associated with the OTA update should be deleted - // with the OTA update is deleted. - ForceDeleteAWSJob *bool `location:"querystring" locationName:"forceDeleteAWSJob" type:"boolean"` - - // The OTA update ID to delete. - // - // OtaUpdateId is a required field - OtaUpdateId *string `location:"uri" locationName:"otaUpdateId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteOTAUpdateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteOTAUpdateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteOTAUpdateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteOTAUpdateInput"} - if s.OtaUpdateId == nil { - invalidParams.Add(request.NewErrParamRequired("OtaUpdateId")) - } - if s.OtaUpdateId != nil && len(*s.OtaUpdateId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OtaUpdateId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeleteStream sets the DeleteStream field's value. -func (s *DeleteOTAUpdateInput) SetDeleteStream(v bool) *DeleteOTAUpdateInput { - s.DeleteStream = &v - return s -} - -// SetForceDeleteAWSJob sets the ForceDeleteAWSJob field's value. -func (s *DeleteOTAUpdateInput) SetForceDeleteAWSJob(v bool) *DeleteOTAUpdateInput { - s.ForceDeleteAWSJob = &v - return s -} - -// SetOtaUpdateId sets the OtaUpdateId field's value. -func (s *DeleteOTAUpdateInput) SetOtaUpdateId(v string) *DeleteOTAUpdateInput { - s.OtaUpdateId = &v - return s -} - -type DeleteOTAUpdateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteOTAUpdateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteOTAUpdateOutput) GoString() string { - return s.String() -} - -// The input for the DeletePolicy operation. -type DeletePolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the policy to delete. - // - // PolicyName is a required field - PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeletePolicyInput) SetPolicyName(v string) *DeletePolicyInput { - s.PolicyName = &v - return s -} - -type DeletePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePolicyOutput) GoString() string { - return s.String() -} - -// The input for the DeletePolicyVersion operation. -type DeletePolicyVersionInput struct { - _ struct{} `type:"structure"` - - // The name of the policy. - // - // PolicyName is a required field - PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` - - // The policy version ID. - // - // PolicyVersionId is a required field - PolicyVersionId *string `location:"uri" locationName:"policyVersionId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePolicyVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePolicyVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePolicyVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePolicyVersionInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.PolicyVersionId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyVersionId")) - } - if s.PolicyVersionId != nil && len(*s.PolicyVersionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyVersionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeletePolicyVersionInput) SetPolicyName(v string) *DeletePolicyVersionInput { - s.PolicyName = &v - return s -} - -// SetPolicyVersionId sets the PolicyVersionId field's value. -func (s *DeletePolicyVersionInput) SetPolicyVersionId(v string) *DeletePolicyVersionInput { - s.PolicyVersionId = &v - return s -} - -type DeletePolicyVersionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePolicyVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePolicyVersionOutput) GoString() string { - return s.String() -} - -// The input for the DeleteRegistrationCode operation. -type DeleteRegistrationCodeInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRegistrationCodeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRegistrationCodeInput) GoString() string { - return s.String() -} - -// The output for the DeleteRegistrationCode operation. -type DeleteRegistrationCodeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRegistrationCodeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRegistrationCodeOutput) GoString() string { - return s.String() -} - -type DeleteRoleAliasInput struct { - _ struct{} `type:"structure"` - - // The role alias to delete. - // - // RoleAlias is a required field - RoleAlias *string `location:"uri" locationName:"roleAlias" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRoleAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRoleAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRoleAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRoleAliasInput"} - if s.RoleAlias == nil { - invalidParams.Add(request.NewErrParamRequired("RoleAlias")) - } - if s.RoleAlias != nil && len(*s.RoleAlias) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleAlias", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleAlias sets the RoleAlias field's value. -func (s *DeleteRoleAliasInput) SetRoleAlias(v string) *DeleteRoleAliasInput { - s.RoleAlias = &v - return s -} - -type DeleteRoleAliasOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteRoleAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRoleAliasOutput) GoString() string { - return s.String() -} - -type DeleteScheduledAuditInput struct { - _ struct{} `type:"structure"` - - // The name of the scheduled audit you want to delete. - // - // ScheduledAuditName is a required field - ScheduledAuditName *string `location:"uri" locationName:"scheduledAuditName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteScheduledAuditInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteScheduledAuditInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteScheduledAuditInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteScheduledAuditInput"} - if s.ScheduledAuditName == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduledAuditName")) - } - if s.ScheduledAuditName != nil && len(*s.ScheduledAuditName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScheduledAuditName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetScheduledAuditName sets the ScheduledAuditName field's value. -func (s *DeleteScheduledAuditInput) SetScheduledAuditName(v string) *DeleteScheduledAuditInput { - s.ScheduledAuditName = &v - return s -} - -type DeleteScheduledAuditOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteScheduledAuditOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteScheduledAuditOutput) GoString() string { - return s.String() -} - -type DeleteSecurityProfileInput struct { - _ struct{} `type:"structure"` - - // The expected version of the security profile. A new version is generated - // whenever the security profile is updated. If you specify a value that is - // different than the actual version, a VersionConflictException is thrown. - ExpectedVersion *int64 `location:"querystring" locationName:"expectedVersion" type:"long"` - - // The name of the security profile to be deleted. - // - // SecurityProfileName is a required field - SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSecurityProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSecurityProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSecurityProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSecurityProfileInput"} - if s.SecurityProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityProfileName")) - } - if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExpectedVersion sets the ExpectedVersion field's value. -func (s *DeleteSecurityProfileInput) SetExpectedVersion(v int64) *DeleteSecurityProfileInput { - s.ExpectedVersion = &v - return s -} - -// SetSecurityProfileName sets the SecurityProfileName field's value. -func (s *DeleteSecurityProfileInput) SetSecurityProfileName(v string) *DeleteSecurityProfileInput { - s.SecurityProfileName = &v - return s -} - -type DeleteSecurityProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteSecurityProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSecurityProfileOutput) GoString() string { - return s.String() -} - -type DeleteStreamInput struct { - _ struct{} `type:"structure"` - - // The stream ID. - // - // StreamId is a required field - StreamId *string `location:"uri" locationName:"streamId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteStreamInput"} - if s.StreamId == nil { - invalidParams.Add(request.NewErrParamRequired("StreamId")) - } - if s.StreamId != nil && len(*s.StreamId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStreamId sets the StreamId field's value. -func (s *DeleteStreamInput) SetStreamId(v string) *DeleteStreamInput { - s.StreamId = &v - return s -} - -type DeleteStreamOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStreamOutput) GoString() string { - return s.String() -} - -type DeleteThingGroupInput struct { - _ struct{} `type:"structure"` - - // The expected version of the thing group to delete. - ExpectedVersion *int64 `location:"querystring" locationName:"expectedVersion" type:"long"` - - // The name of the thing group to delete. - // - // ThingGroupName is a required field - ThingGroupName *string `location:"uri" locationName:"thingGroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteThingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteThingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteThingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteThingGroupInput"} - if s.ThingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ThingGroupName")) - } - if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExpectedVersion sets the ExpectedVersion field's value. -func (s *DeleteThingGroupInput) SetExpectedVersion(v int64) *DeleteThingGroupInput { - s.ExpectedVersion = &v - return s -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *DeleteThingGroupInput) SetThingGroupName(v string) *DeleteThingGroupInput { - s.ThingGroupName = &v - return s -} - -type DeleteThingGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteThingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteThingGroupOutput) GoString() string { - return s.String() -} - -// The input for the DeleteThing operation. -type DeleteThingInput struct { - _ struct{} `type:"structure"` - - // The expected version of the thing record in the registry. If the version - // of the record in the registry does not match the expected version specified - // in the request, the DeleteThing request is rejected with a VersionConflictException. - ExpectedVersion *int64 `location:"querystring" locationName:"expectedVersion" type:"long"` - - // The name of the thing to delete. - // - // ThingName is a required field - ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteThingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteThingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteThingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteThingInput"} - 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 -} - -// SetExpectedVersion sets the ExpectedVersion field's value. -func (s *DeleteThingInput) SetExpectedVersion(v int64) *DeleteThingInput { - s.ExpectedVersion = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *DeleteThingInput) SetThingName(v string) *DeleteThingInput { - s.ThingName = &v - return s -} - -// The output of the DeleteThing operation. -type DeleteThingOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteThingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteThingOutput) GoString() string { - return s.String() -} - -// The input for the DeleteThingType operation. -type DeleteThingTypeInput struct { - _ struct{} `type:"structure"` - - // The name of the thing type. - // - // ThingTypeName is a required field - ThingTypeName *string `location:"uri" locationName:"thingTypeName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteThingTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteThingTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteThingTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteThingTypeInput"} - if s.ThingTypeName == nil { - invalidParams.Add(request.NewErrParamRequired("ThingTypeName")) - } - if s.ThingTypeName != nil && len(*s.ThingTypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingTypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetThingTypeName sets the ThingTypeName field's value. -func (s *DeleteThingTypeInput) SetThingTypeName(v string) *DeleteThingTypeInput { - s.ThingTypeName = &v - return s -} - -// The output for the DeleteThingType operation. -type DeleteThingTypeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteThingTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteThingTypeOutput) GoString() string { - return s.String() -} - -// The input for the DeleteTopicRule operation. -type DeleteTopicRuleInput struct { - _ struct{} `type:"structure"` - - // The name of the rule. - // - // RuleName is a required field - RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTopicRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTopicRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTopicRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTopicRuleInput"} - if s.RuleName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleName")) - } - if s.RuleName != nil && len(*s.RuleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleName sets the RuleName field's value. -func (s *DeleteTopicRuleInput) SetRuleName(v string) *DeleteTopicRuleInput { - s.RuleName = &v - return s -} - -type DeleteTopicRuleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTopicRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTopicRuleOutput) GoString() string { - return s.String() -} - -type DeleteV2LoggingLevelInput struct { - _ struct{} `type:"structure"` - - // The name of the resource for which you are configuring logging. - // - // TargetName is a required field - TargetName *string `location:"querystring" locationName:"targetName" type:"string" required:"true"` - - // The type of resource for which you are configuring logging. Must be THING_Group. - // - // TargetType is a required field - TargetType *string `location:"querystring" locationName:"targetType" type:"string" required:"true" enum:"LogTargetType"` -} - -// String returns the string representation -func (s DeleteV2LoggingLevelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteV2LoggingLevelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteV2LoggingLevelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteV2LoggingLevelInput"} - if s.TargetName == nil { - invalidParams.Add(request.NewErrParamRequired("TargetName")) - } - if s.TargetType == nil { - invalidParams.Add(request.NewErrParamRequired("TargetType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetName sets the TargetName field's value. -func (s *DeleteV2LoggingLevelInput) SetTargetName(v string) *DeleteV2LoggingLevelInput { - s.TargetName = &v - return s -} - -// SetTargetType sets the TargetType field's value. -func (s *DeleteV2LoggingLevelInput) SetTargetType(v string) *DeleteV2LoggingLevelInput { - s.TargetType = &v - return s -} - -type DeleteV2LoggingLevelOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteV2LoggingLevelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteV2LoggingLevelOutput) GoString() string { - return s.String() -} - -// Contains information that denied the authorization. -type Denied struct { - _ struct{} `type:"structure"` - - // Information that explicitly denies the authorization. - ExplicitDeny *ExplicitDeny `locationName:"explicitDeny" type:"structure"` - - // Information that implicitly denies the authorization. When a policy doesn't - // explicitly deny or allow an action on a resource it is considered an implicit - // deny. - ImplicitDeny *ImplicitDeny `locationName:"implicitDeny" type:"structure"` -} - -// String returns the string representation -func (s Denied) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Denied) GoString() string { - return s.String() -} - -// SetExplicitDeny sets the ExplicitDeny field's value. -func (s *Denied) SetExplicitDeny(v *ExplicitDeny) *Denied { - s.ExplicitDeny = v - return s -} - -// SetImplicitDeny sets the ImplicitDeny field's value. -func (s *Denied) SetImplicitDeny(v *ImplicitDeny) *Denied { - s.ImplicitDeny = v - return s -} - -// The input for the DeprecateThingType operation. -type DeprecateThingTypeInput struct { - _ struct{} `type:"structure"` - - // The name of the thing type to deprecate. - // - // ThingTypeName is a required field - ThingTypeName *string `location:"uri" locationName:"thingTypeName" min:"1" type:"string" required:"true"` - - // Whether to undeprecate a deprecated thing type. If true, the thing type will - // not be deprecated anymore and you can associate it with things. - UndoDeprecate *bool `locationName:"undoDeprecate" type:"boolean"` -} - -// String returns the string representation -func (s DeprecateThingTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeprecateThingTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeprecateThingTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeprecateThingTypeInput"} - if s.ThingTypeName == nil { - invalidParams.Add(request.NewErrParamRequired("ThingTypeName")) - } - if s.ThingTypeName != nil && len(*s.ThingTypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingTypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetThingTypeName sets the ThingTypeName field's value. -func (s *DeprecateThingTypeInput) SetThingTypeName(v string) *DeprecateThingTypeInput { - s.ThingTypeName = &v - return s -} - -// SetUndoDeprecate sets the UndoDeprecate field's value. -func (s *DeprecateThingTypeInput) SetUndoDeprecate(v bool) *DeprecateThingTypeInput { - s.UndoDeprecate = &v - return s -} - -// The output for the DeprecateThingType operation. -type DeprecateThingTypeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeprecateThingTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeprecateThingTypeOutput) GoString() string { - return s.String() -} - -type DescribeAccountAuditConfigurationInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeAccountAuditConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountAuditConfigurationInput) GoString() string { - return s.String() -} - -type DescribeAccountAuditConfigurationOutput struct { - _ struct{} `type:"structure"` - - // Which audit checks are enabled and disabled for this account. - AuditCheckConfigurations map[string]*AuditCheckConfiguration `locationName:"auditCheckConfigurations" type:"map"` - - // Information about the targets to which audit notifications are sent for this - // account. - AuditNotificationTargetConfigurations map[string]*AuditNotificationTarget `locationName:"auditNotificationTargetConfigurations" type:"map"` - - // The ARN of the role that grants permission to AWS IoT to access information - // about your devices, policies, certificates and other items as necessary when - // performing an audit. - // - // On the first call to UpdateAccountAuditConfiguration this parameter is required. - RoleArn *string `locationName:"roleArn" min:"20" type:"string"` -} - -// String returns the string representation -func (s DescribeAccountAuditConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountAuditConfigurationOutput) GoString() string { - return s.String() -} - -// SetAuditCheckConfigurations sets the AuditCheckConfigurations field's value. -func (s *DescribeAccountAuditConfigurationOutput) SetAuditCheckConfigurations(v map[string]*AuditCheckConfiguration) *DescribeAccountAuditConfigurationOutput { - s.AuditCheckConfigurations = v - return s -} - -// SetAuditNotificationTargetConfigurations sets the AuditNotificationTargetConfigurations field's value. -func (s *DescribeAccountAuditConfigurationOutput) SetAuditNotificationTargetConfigurations(v map[string]*AuditNotificationTarget) *DescribeAccountAuditConfigurationOutput { - s.AuditNotificationTargetConfigurations = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DescribeAccountAuditConfigurationOutput) SetRoleArn(v string) *DescribeAccountAuditConfigurationOutput { - s.RoleArn = &v - return s -} - -type DescribeAuditTaskInput struct { - _ struct{} `type:"structure"` - - // The ID of the audit whose information you want to get. - // - // TaskId is a required field - TaskId *string `location:"uri" locationName:"taskId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeAuditTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAuditTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAuditTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAuditTaskInput"} - if s.TaskId == nil { - invalidParams.Add(request.NewErrParamRequired("TaskId")) - } - if s.TaskId != nil && len(*s.TaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTaskId sets the TaskId field's value. -func (s *DescribeAuditTaskInput) SetTaskId(v string) *DescribeAuditTaskInput { - s.TaskId = &v - return s -} - -type DescribeAuditTaskOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about each check performed during this audit. - AuditDetails map[string]*AuditCheckDetails `locationName:"auditDetails" type:"map"` - - // The name of the scheduled audit (only if the audit was a scheduled audit). - ScheduledAuditName *string `locationName:"scheduledAuditName" min:"1" type:"string"` - - // The time the audit started. - TaskStartTime *time.Time `locationName:"taskStartTime" type:"timestamp"` - - // Statistical information about the audit. - TaskStatistics *TaskStatistics `locationName:"taskStatistics" type:"structure"` - - // The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or - // "CANCELED". - TaskStatus *string `locationName:"taskStatus" type:"string" enum:"AuditTaskStatus"` - - // The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK". - TaskType *string `locationName:"taskType" type:"string" enum:"AuditTaskType"` -} - -// String returns the string representation -func (s DescribeAuditTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAuditTaskOutput) GoString() string { - return s.String() -} - -// SetAuditDetails sets the AuditDetails field's value. -func (s *DescribeAuditTaskOutput) SetAuditDetails(v map[string]*AuditCheckDetails) *DescribeAuditTaskOutput { - s.AuditDetails = v - return s -} - -// SetScheduledAuditName sets the ScheduledAuditName field's value. -func (s *DescribeAuditTaskOutput) SetScheduledAuditName(v string) *DescribeAuditTaskOutput { - s.ScheduledAuditName = &v - return s -} - -// SetTaskStartTime sets the TaskStartTime field's value. -func (s *DescribeAuditTaskOutput) SetTaskStartTime(v time.Time) *DescribeAuditTaskOutput { - s.TaskStartTime = &v - return s -} - -// SetTaskStatistics sets the TaskStatistics field's value. -func (s *DescribeAuditTaskOutput) SetTaskStatistics(v *TaskStatistics) *DescribeAuditTaskOutput { - s.TaskStatistics = v - return s -} - -// SetTaskStatus sets the TaskStatus field's value. -func (s *DescribeAuditTaskOutput) SetTaskStatus(v string) *DescribeAuditTaskOutput { - s.TaskStatus = &v - return s -} - -// SetTaskType sets the TaskType field's value. -func (s *DescribeAuditTaskOutput) SetTaskType(v string) *DescribeAuditTaskOutput { - s.TaskType = &v - return s -} - -type DescribeAuthorizerInput struct { - _ struct{} `type:"structure"` - - // The name of the authorizer to describe. - // - // AuthorizerName is a required field - AuthorizerName *string `location:"uri" locationName:"authorizerName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAuthorizerInput"} - if s.AuthorizerName == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerName")) - } - if s.AuthorizerName != nil && len(*s.AuthorizerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthorizerName sets the AuthorizerName field's value. -func (s *DescribeAuthorizerInput) SetAuthorizerName(v string) *DescribeAuthorizerInput { - s.AuthorizerName = &v - return s -} - -type DescribeAuthorizerOutput struct { - _ struct{} `type:"structure"` - - // The authorizer description. - AuthorizerDescription *AuthorizerDescription `locationName:"authorizerDescription" type:"structure"` -} - -// String returns the string representation -func (s DescribeAuthorizerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAuthorizerOutput) GoString() string { - return s.String() -} - -// SetAuthorizerDescription sets the AuthorizerDescription field's value. -func (s *DescribeAuthorizerOutput) SetAuthorizerDescription(v *AuthorizerDescription) *DescribeAuthorizerOutput { - s.AuthorizerDescription = v - return s -} - -type DescribeBillingGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the billing group. - // - // BillingGroupName is a required field - BillingGroupName *string `location:"uri" locationName:"billingGroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeBillingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBillingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeBillingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeBillingGroupInput"} - if s.BillingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("BillingGroupName")) - } - if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBillingGroupName sets the BillingGroupName field's value. -func (s *DescribeBillingGroupInput) SetBillingGroupName(v string) *DescribeBillingGroupInput { - s.BillingGroupName = &v - return s -} - -type DescribeBillingGroupOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the billing group. - BillingGroupArn *string `locationName:"billingGroupArn" type:"string"` - - // The ID of the billing group. - BillingGroupId *string `locationName:"billingGroupId" min:"1" type:"string"` - - // Additional information about the billing group. - BillingGroupMetadata *BillingGroupMetadata `locationName:"billingGroupMetadata" type:"structure"` - - // The name of the billing group. - BillingGroupName *string `locationName:"billingGroupName" min:"1" type:"string"` - - // The properties of the billing group. - BillingGroupProperties *BillingGroupProperties `locationName:"billingGroupProperties" type:"structure"` - - // The version of the billing group. - Version *int64 `locationName:"version" type:"long"` -} - -// String returns the string representation -func (s DescribeBillingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBillingGroupOutput) GoString() string { - return s.String() -} - -// SetBillingGroupArn sets the BillingGroupArn field's value. -func (s *DescribeBillingGroupOutput) SetBillingGroupArn(v string) *DescribeBillingGroupOutput { - s.BillingGroupArn = &v - return s -} - -// SetBillingGroupId sets the BillingGroupId field's value. -func (s *DescribeBillingGroupOutput) SetBillingGroupId(v string) *DescribeBillingGroupOutput { - s.BillingGroupId = &v - return s -} - -// SetBillingGroupMetadata sets the BillingGroupMetadata field's value. -func (s *DescribeBillingGroupOutput) SetBillingGroupMetadata(v *BillingGroupMetadata) *DescribeBillingGroupOutput { - s.BillingGroupMetadata = v - return s -} - -// SetBillingGroupName sets the BillingGroupName field's value. -func (s *DescribeBillingGroupOutput) SetBillingGroupName(v string) *DescribeBillingGroupOutput { - s.BillingGroupName = &v - return s -} - -// SetBillingGroupProperties sets the BillingGroupProperties field's value. -func (s *DescribeBillingGroupOutput) SetBillingGroupProperties(v *BillingGroupProperties) *DescribeBillingGroupOutput { - s.BillingGroupProperties = v - return s -} - -// SetVersion sets the Version field's value. -func (s *DescribeBillingGroupOutput) SetVersion(v int64) *DescribeBillingGroupOutput { - s.Version = &v - return s -} - -// The input for the DescribeCACertificate operation. -type DescribeCACertificateInput struct { - _ struct{} `type:"structure"` - - // The CA certificate identifier. - // - // CertificateId is a required field - CertificateId *string `location:"uri" locationName:"caCertificateId" min:"64" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeCACertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCACertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCACertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCACertificateInput"} - if s.CertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateId")) - } - if s.CertificateId != nil && len(*s.CertificateId) < 64 { - invalidParams.Add(request.NewErrParamMinLen("CertificateId", 64)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateId sets the CertificateId field's value. -func (s *DescribeCACertificateInput) SetCertificateId(v string) *DescribeCACertificateInput { - s.CertificateId = &v - return s -} - -// The output from the DescribeCACertificate operation. -type DescribeCACertificateOutput struct { - _ struct{} `type:"structure"` - - // The CA certificate description. - CertificateDescription *CACertificateDescription `locationName:"certificateDescription" type:"structure"` - - // Information about the registration configuration. - RegistrationConfig *RegistrationConfig `locationName:"registrationConfig" type:"structure"` -} - -// String returns the string representation -func (s DescribeCACertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCACertificateOutput) GoString() string { - return s.String() -} - -// SetCertificateDescription sets the CertificateDescription field's value. -func (s *DescribeCACertificateOutput) SetCertificateDescription(v *CACertificateDescription) *DescribeCACertificateOutput { - s.CertificateDescription = v - return s -} - -// SetRegistrationConfig sets the RegistrationConfig field's value. -func (s *DescribeCACertificateOutput) SetRegistrationConfig(v *RegistrationConfig) *DescribeCACertificateOutput { - s.RegistrationConfig = v - return s -} - -// The input for the DescribeCertificate operation. -type DescribeCertificateInput struct { - _ struct{} `type:"structure"` - - // The ID of the certificate. (The last part of the certificate ARN contains - // the certificate ID.) - // - // CertificateId is a required field - CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCertificateInput"} - if s.CertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateId")) - } - if s.CertificateId != nil && len(*s.CertificateId) < 64 { - invalidParams.Add(request.NewErrParamMinLen("CertificateId", 64)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateId sets the CertificateId field's value. -func (s *DescribeCertificateInput) SetCertificateId(v string) *DescribeCertificateInput { - s.CertificateId = &v - return s -} - -// The output of the DescribeCertificate operation. -type DescribeCertificateOutput struct { - _ struct{} `type:"structure"` - - // The description of the certificate. - CertificateDescription *CertificateDescription `locationName:"certificateDescription" type:"structure"` -} - -// String returns the string representation -func (s DescribeCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificateDescription sets the CertificateDescription field's value. -func (s *DescribeCertificateOutput) SetCertificateDescription(v *CertificateDescription) *DescribeCertificateOutput { - s.CertificateDescription = v - return s -} - -type DescribeDefaultAuthorizerInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeDefaultAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDefaultAuthorizerInput) GoString() string { - return s.String() -} - -type DescribeDefaultAuthorizerOutput struct { - _ struct{} `type:"structure"` - - // The default authorizer's description. - AuthorizerDescription *AuthorizerDescription `locationName:"authorizerDescription" type:"structure"` -} - -// String returns the string representation -func (s DescribeDefaultAuthorizerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDefaultAuthorizerOutput) GoString() string { - return s.String() -} - -// SetAuthorizerDescription sets the AuthorizerDescription field's value. -func (s *DescribeDefaultAuthorizerOutput) SetAuthorizerDescription(v *AuthorizerDescription) *DescribeDefaultAuthorizerOutput { - s.AuthorizerDescription = v - return s -} - -// The input for the DescribeEndpoint operation. -type DescribeEndpointInput struct { - _ struct{} `type:"structure"` - - // The endpoint type. Valid endpoint types include: - // - // * iot:Data - Returns a VeriSign signed data endpoint. - // - // * iot:Data-ATS - Returns an ATS signed data endpoint. - // - // * iot:CredentialProvider - Returns an AWS IoT credentials provider API - // endpoint. - // - // * iot:Jobs - Returns an AWS IoT device management Jobs API endpoint. - EndpointType *string `location:"querystring" locationName:"endpointType" type:"string"` -} - -// String returns the string representation -func (s DescribeEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEndpointInput) GoString() string { - return s.String() -} - -// SetEndpointType sets the EndpointType field's value. -func (s *DescribeEndpointInput) SetEndpointType(v string) *DescribeEndpointInput { - s.EndpointType = &v - return s -} - -// The output from the DescribeEndpoint operation. -type DescribeEndpointOutput struct { - _ struct{} `type:"structure"` - - // The endpoint. The format of the endpoint is as follows: identifier.iot.region.amazonaws.com. - EndpointAddress *string `locationName:"endpointAddress" type:"string"` -} - -// String returns the string representation -func (s DescribeEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEndpointOutput) GoString() string { - return s.String() -} - -// SetEndpointAddress sets the EndpointAddress field's value. -func (s *DescribeEndpointOutput) SetEndpointAddress(v string) *DescribeEndpointOutput { - s.EndpointAddress = &v - return s -} - -type DescribeEventConfigurationsInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeEventConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventConfigurationsInput) GoString() string { - return s.String() -} - -type DescribeEventConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // The creation date of the event configuration. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The event configurations. - EventConfigurations map[string]*Configuration `locationName:"eventConfigurations" type:"map"` - - // The date the event configurations were last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` -} - -// String returns the string representation -func (s DescribeEventConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventConfigurationsOutput) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *DescribeEventConfigurationsOutput) SetCreationDate(v time.Time) *DescribeEventConfigurationsOutput { - s.CreationDate = &v - return s -} - -// SetEventConfigurations sets the EventConfigurations field's value. -func (s *DescribeEventConfigurationsOutput) SetEventConfigurations(v map[string]*Configuration) *DescribeEventConfigurationsOutput { - s.EventConfigurations = v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *DescribeEventConfigurationsOutput) SetLastModifiedDate(v time.Time) *DescribeEventConfigurationsOutput { - s.LastModifiedDate = &v - return s -} - -type DescribeIndexInput struct { - _ struct{} `type:"structure"` - - // The index name. - // - // IndexName is a required field - IndexName *string `location:"uri" locationName:"indexName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeIndexInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIndexInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeIndexInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeIndexInput"} - if s.IndexName == nil { - invalidParams.Add(request.NewErrParamRequired("IndexName")) - } - if s.IndexName != nil && len(*s.IndexName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IndexName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIndexName sets the IndexName field's value. -func (s *DescribeIndexInput) SetIndexName(v string) *DescribeIndexInput { - s.IndexName = &v - return s -} - -type DescribeIndexOutput struct { - _ struct{} `type:"structure"` - - // The index name. - IndexName *string `locationName:"indexName" min:"1" type:"string"` - - // The index status. - IndexStatus *string `locationName:"indexStatus" type:"string" enum:"IndexStatus"` - - // Contains a value that specifies the type of indexing performed. Valid values - // are: - // - // * REGISTRY – Your thing index will contain only registry data. - // - // * REGISTRY_AND_SHADOW - Your thing index will contain registry data and - // shadow data. - // - // * REGISTRY_AND_CONNECTIVITY_STATUS - Your thing index will contain registry - // data and thing connectivity status data. - // - // * REGISTRY_AND_SHADOW_AND_CONNECTIVITY_STATUS - Your thing index will - // contain registry data, shadow data, and thing connectivity status data. - Schema *string `locationName:"schema" type:"string"` -} - -// String returns the string representation -func (s DescribeIndexOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIndexOutput) GoString() string { - return s.String() -} - -// SetIndexName sets the IndexName field's value. -func (s *DescribeIndexOutput) SetIndexName(v string) *DescribeIndexOutput { - s.IndexName = &v - return s -} - -// SetIndexStatus sets the IndexStatus field's value. -func (s *DescribeIndexOutput) SetIndexStatus(v string) *DescribeIndexOutput { - s.IndexStatus = &v - return s -} - -// SetSchema sets the Schema field's value. -func (s *DescribeIndexOutput) SetSchema(v string) *DescribeIndexOutput { - s.Schema = &v - return s -} - -type DescribeJobExecutionInput struct { - _ struct{} `type:"structure"` - - // A string (consisting of the digits "0" through "9" which is used to specify - // a particular job execution on a particular device. - ExecutionNumber *int64 `location:"querystring" locationName:"executionNumber" type:"long"` - - // The unique identifier you assigned to this job when it was created. - // - // JobId is a required field - JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` - - // The name of the thing on which the job execution is running. - // - // ThingName is a required field - ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeJobExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeJobExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeJobExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeJobExecutionInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - 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 -} - -// SetExecutionNumber sets the ExecutionNumber field's value. -func (s *DescribeJobExecutionInput) SetExecutionNumber(v int64) *DescribeJobExecutionInput { - s.ExecutionNumber = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *DescribeJobExecutionInput) SetJobId(v string) *DescribeJobExecutionInput { - s.JobId = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *DescribeJobExecutionInput) SetThingName(v string) *DescribeJobExecutionInput { - s.ThingName = &v - return s -} - -type DescribeJobExecutionOutput struct { - _ struct{} `type:"structure"` - - // Information about the job execution. - Execution *JobExecution `locationName:"execution" type:"structure"` -} - -// String returns the string representation -func (s DescribeJobExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeJobExecutionOutput) GoString() string { - return s.String() -} - -// SetExecution sets the Execution field's value. -func (s *DescribeJobExecutionOutput) SetExecution(v *JobExecution) *DescribeJobExecutionOutput { - s.Execution = v - return s -} - -type DescribeJobInput struct { - _ struct{} `type:"structure"` - - // The unique identifier you assigned to this job when it was created. - // - // JobId is a required field - JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeJobInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobId sets the JobId field's value. -func (s *DescribeJobInput) SetJobId(v string) *DescribeJobInput { - s.JobId = &v - return s -} - -type DescribeJobOutput struct { - _ struct{} `type:"structure"` - - // An S3 link to the job document. - DocumentSource *string `locationName:"documentSource" min:"1" type:"string"` - - // Information about the job. - Job *Job `locationName:"job" type:"structure"` -} - -// String returns the string representation -func (s DescribeJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeJobOutput) GoString() string { - return s.String() -} - -// SetDocumentSource sets the DocumentSource field's value. -func (s *DescribeJobOutput) SetDocumentSource(v string) *DescribeJobOutput { - s.DocumentSource = &v - return s -} - -// SetJob sets the Job field's value. -func (s *DescribeJobOutput) SetJob(v *Job) *DescribeJobOutput { - s.Job = v - return s -} - -type DescribeRoleAliasInput struct { - _ struct{} `type:"structure"` - - // The role alias to describe. - // - // RoleAlias is a required field - RoleAlias *string `location:"uri" locationName:"roleAlias" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeRoleAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRoleAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRoleAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRoleAliasInput"} - if s.RoleAlias == nil { - invalidParams.Add(request.NewErrParamRequired("RoleAlias")) - } - if s.RoleAlias != nil && len(*s.RoleAlias) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleAlias", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleAlias sets the RoleAlias field's value. -func (s *DescribeRoleAliasInput) SetRoleAlias(v string) *DescribeRoleAliasInput { - s.RoleAlias = &v - return s -} - -type DescribeRoleAliasOutput struct { - _ struct{} `type:"structure"` - - // The role alias description. - RoleAliasDescription *RoleAliasDescription `locationName:"roleAliasDescription" type:"structure"` -} - -// String returns the string representation -func (s DescribeRoleAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRoleAliasOutput) GoString() string { - return s.String() -} - -// SetRoleAliasDescription sets the RoleAliasDescription field's value. -func (s *DescribeRoleAliasOutput) SetRoleAliasDescription(v *RoleAliasDescription) *DescribeRoleAliasOutput { - s.RoleAliasDescription = v - return s -} - -type DescribeScheduledAuditInput struct { - _ struct{} `type:"structure"` - - // The name of the scheduled audit whose information you want to get. - // - // ScheduledAuditName is a required field - ScheduledAuditName *string `location:"uri" locationName:"scheduledAuditName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeScheduledAuditInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScheduledAuditInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeScheduledAuditInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeScheduledAuditInput"} - if s.ScheduledAuditName == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduledAuditName")) - } - if s.ScheduledAuditName != nil && len(*s.ScheduledAuditName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScheduledAuditName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetScheduledAuditName sets the ScheduledAuditName field's value. -func (s *DescribeScheduledAuditInput) SetScheduledAuditName(v string) *DescribeScheduledAuditInput { - s.ScheduledAuditName = &v - return s -} - -type DescribeScheduledAuditOutput struct { - _ struct{} `type:"structure"` - - // The day of the month on which the scheduled audit takes place. Will be "1" - // through "31" or "LAST". If days 29-31 are specified, and the month does not - // have that many days, the audit takes place on the "LAST" day of the month. - DayOfMonth *string `locationName:"dayOfMonth" type:"string"` - - // The day of the week on which the scheduled audit takes place. One of "SUN", - // "MON", "TUE", "WED", "THU", "FRI" or "SAT". - DayOfWeek *string `locationName:"dayOfWeek" type:"string" enum:"DayOfWeek"` - - // How often the scheduled audit takes place. One of "DAILY", "WEEKLY", "BIWEEKLY" - // or "MONTHLY". The actual start time of each audit is determined by the system. - Frequency *string `locationName:"frequency" type:"string" enum:"AuditFrequency"` - - // The ARN of the scheduled audit. - ScheduledAuditArn *string `locationName:"scheduledAuditArn" type:"string"` - - // The name of the scheduled audit. - ScheduledAuditName *string `locationName:"scheduledAuditName" min:"1" type:"string"` - - // Which checks are performed during the scheduled audit. (Note that checks - // must be enabled for your account. (Use DescribeAccountAuditConfiguration - // to see the list of all checks including those that are enabled or UpdateAccountAuditConfiguration - // to select which checks are enabled.) - TargetCheckNames []*string `locationName:"targetCheckNames" type:"list"` -} - -// String returns the string representation -func (s DescribeScheduledAuditOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScheduledAuditOutput) GoString() string { - return s.String() -} - -// SetDayOfMonth sets the DayOfMonth field's value. -func (s *DescribeScheduledAuditOutput) SetDayOfMonth(v string) *DescribeScheduledAuditOutput { - s.DayOfMonth = &v - return s -} - -// SetDayOfWeek sets the DayOfWeek field's value. -func (s *DescribeScheduledAuditOutput) SetDayOfWeek(v string) *DescribeScheduledAuditOutput { - s.DayOfWeek = &v - return s -} - -// SetFrequency sets the Frequency field's value. -func (s *DescribeScheduledAuditOutput) SetFrequency(v string) *DescribeScheduledAuditOutput { - s.Frequency = &v - return s -} - -// SetScheduledAuditArn sets the ScheduledAuditArn field's value. -func (s *DescribeScheduledAuditOutput) SetScheduledAuditArn(v string) *DescribeScheduledAuditOutput { - s.ScheduledAuditArn = &v - return s -} - -// SetScheduledAuditName sets the ScheduledAuditName field's value. -func (s *DescribeScheduledAuditOutput) SetScheduledAuditName(v string) *DescribeScheduledAuditOutput { - s.ScheduledAuditName = &v - return s -} - -// SetTargetCheckNames sets the TargetCheckNames field's value. -func (s *DescribeScheduledAuditOutput) SetTargetCheckNames(v []*string) *DescribeScheduledAuditOutput { - s.TargetCheckNames = v - return s -} - -type DescribeSecurityProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the security profile whose information you want to get. - // - // SecurityProfileName is a required field - SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeSecurityProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSecurityProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSecurityProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSecurityProfileInput"} - if s.SecurityProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityProfileName")) - } - if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecurityProfileName sets the SecurityProfileName field's value. -func (s *DescribeSecurityProfileInput) SetSecurityProfileName(v string) *DescribeSecurityProfileInput { - s.SecurityProfileName = &v - return s -} - -type DescribeSecurityProfileOutput struct { - _ struct{} `type:"structure"` - - // Where the alerts are sent. (Alerts are always sent to the console.) - AlertTargets map[string]*AlertTarget `locationName:"alertTargets" type:"map"` - - // Specifies the behaviors that, when violated by a device (thing), cause an - // alert. - Behaviors []*Behavior `locationName:"behaviors" type:"list"` - - // The time the security profile was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The time the security profile was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` - - // The ARN of the security profile. - SecurityProfileArn *string `locationName:"securityProfileArn" type:"string"` - - // A description of the security profile (associated with the security profile - // when it was created or updated). - SecurityProfileDescription *string `locationName:"securityProfileDescription" type:"string"` - - // The name of the security profile. - SecurityProfileName *string `locationName:"securityProfileName" min:"1" type:"string"` - - // The version of the security profile. A new version is generated whenever - // the security profile is updated. - Version *int64 `locationName:"version" type:"long"` -} - -// String returns the string representation -func (s DescribeSecurityProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSecurityProfileOutput) GoString() string { - return s.String() -} - -// SetAlertTargets sets the AlertTargets field's value. -func (s *DescribeSecurityProfileOutput) SetAlertTargets(v map[string]*AlertTarget) *DescribeSecurityProfileOutput { - s.AlertTargets = v - return s -} - -// SetBehaviors sets the Behaviors field's value. -func (s *DescribeSecurityProfileOutput) SetBehaviors(v []*Behavior) *DescribeSecurityProfileOutput { - s.Behaviors = v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *DescribeSecurityProfileOutput) SetCreationDate(v time.Time) *DescribeSecurityProfileOutput { - s.CreationDate = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *DescribeSecurityProfileOutput) SetLastModifiedDate(v time.Time) *DescribeSecurityProfileOutput { - s.LastModifiedDate = &v - return s -} - -// SetSecurityProfileArn sets the SecurityProfileArn field's value. -func (s *DescribeSecurityProfileOutput) SetSecurityProfileArn(v string) *DescribeSecurityProfileOutput { - s.SecurityProfileArn = &v - return s -} - -// SetSecurityProfileDescription sets the SecurityProfileDescription field's value. -func (s *DescribeSecurityProfileOutput) SetSecurityProfileDescription(v string) *DescribeSecurityProfileOutput { - s.SecurityProfileDescription = &v - return s -} - -// SetSecurityProfileName sets the SecurityProfileName field's value. -func (s *DescribeSecurityProfileOutput) SetSecurityProfileName(v string) *DescribeSecurityProfileOutput { - s.SecurityProfileName = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *DescribeSecurityProfileOutput) SetVersion(v int64) *DescribeSecurityProfileOutput { - s.Version = &v - return s -} - -type DescribeStreamInput struct { - _ struct{} `type:"structure"` - - // The stream ID. - // - // StreamId is a required field - StreamId *string `location:"uri" locationName:"streamId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStreamInput"} - if s.StreamId == nil { - invalidParams.Add(request.NewErrParamRequired("StreamId")) - } - if s.StreamId != nil && len(*s.StreamId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStreamId sets the StreamId field's value. -func (s *DescribeStreamInput) SetStreamId(v string) *DescribeStreamInput { - s.StreamId = &v - return s -} - -type DescribeStreamOutput struct { - _ struct{} `type:"structure"` - - // Information about the stream. - StreamInfo *StreamInfo `locationName:"streamInfo" type:"structure"` -} - -// String returns the string representation -func (s DescribeStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStreamOutput) GoString() string { - return s.String() -} - -// SetStreamInfo sets the StreamInfo field's value. -func (s *DescribeStreamOutput) SetStreamInfo(v *StreamInfo) *DescribeStreamOutput { - s.StreamInfo = v - return s -} - -type DescribeThingGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the thing group. - // - // ThingGroupName is a required field - ThingGroupName *string `location:"uri" locationName:"thingGroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeThingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeThingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeThingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeThingGroupInput"} - if s.ThingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ThingGroupName")) - } - if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *DescribeThingGroupInput) SetThingGroupName(v string) *DescribeThingGroupInput { - s.ThingGroupName = &v - return s -} - -type DescribeThingGroupOutput struct { - _ struct{} `type:"structure"` - - // The dynamic thing group index name. - IndexName *string `locationName:"indexName" min:"1" type:"string"` - - // The dynamic thing group search query string. - QueryString *string `locationName:"queryString" min:"1" type:"string"` - - // The dynamic thing group query version. - QueryVersion *string `locationName:"queryVersion" type:"string"` - - // The dynamic thing group status. - Status *string `locationName:"status" type:"string" enum:"DynamicGroupStatus"` - - // The thing group ARN. - ThingGroupArn *string `locationName:"thingGroupArn" type:"string"` - - // The thing group ID. - ThingGroupId *string `locationName:"thingGroupId" min:"1" type:"string"` - - // Thing group metadata. - ThingGroupMetadata *ThingGroupMetadata `locationName:"thingGroupMetadata" type:"structure"` - - // The name of the thing group. - ThingGroupName *string `locationName:"thingGroupName" min:"1" type:"string"` - - // The thing group properties. - ThingGroupProperties *ThingGroupProperties `locationName:"thingGroupProperties" type:"structure"` - - // The version of the thing group. - Version *int64 `locationName:"version" type:"long"` -} - -// String returns the string representation -func (s DescribeThingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeThingGroupOutput) GoString() string { - return s.String() -} - -// SetIndexName sets the IndexName field's value. -func (s *DescribeThingGroupOutput) SetIndexName(v string) *DescribeThingGroupOutput { - s.IndexName = &v - return s -} - -// SetQueryString sets the QueryString field's value. -func (s *DescribeThingGroupOutput) SetQueryString(v string) *DescribeThingGroupOutput { - s.QueryString = &v - return s -} - -// SetQueryVersion sets the QueryVersion field's value. -func (s *DescribeThingGroupOutput) SetQueryVersion(v string) *DescribeThingGroupOutput { - s.QueryVersion = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeThingGroupOutput) SetStatus(v string) *DescribeThingGroupOutput { - s.Status = &v - return s -} - -// SetThingGroupArn sets the ThingGroupArn field's value. -func (s *DescribeThingGroupOutput) SetThingGroupArn(v string) *DescribeThingGroupOutput { - s.ThingGroupArn = &v - return s -} - -// SetThingGroupId sets the ThingGroupId field's value. -func (s *DescribeThingGroupOutput) SetThingGroupId(v string) *DescribeThingGroupOutput { - s.ThingGroupId = &v - return s -} - -// SetThingGroupMetadata sets the ThingGroupMetadata field's value. -func (s *DescribeThingGroupOutput) SetThingGroupMetadata(v *ThingGroupMetadata) *DescribeThingGroupOutput { - s.ThingGroupMetadata = v - return s -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *DescribeThingGroupOutput) SetThingGroupName(v string) *DescribeThingGroupOutput { - s.ThingGroupName = &v - return s -} - -// SetThingGroupProperties sets the ThingGroupProperties field's value. -func (s *DescribeThingGroupOutput) SetThingGroupProperties(v *ThingGroupProperties) *DescribeThingGroupOutput { - s.ThingGroupProperties = v - return s -} - -// SetVersion sets the Version field's value. -func (s *DescribeThingGroupOutput) SetVersion(v int64) *DescribeThingGroupOutput { - s.Version = &v - return s -} - -// The input for the DescribeThing operation. -type DescribeThingInput struct { - _ struct{} `type:"structure"` - - // The name of the thing. - // - // ThingName is a required field - ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeThingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeThingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeThingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeThingInput"} - 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 *DescribeThingInput) SetThingName(v string) *DescribeThingInput { - s.ThingName = &v - return s -} - -// The output from the DescribeThing operation. -type DescribeThingOutput struct { - _ struct{} `type:"structure"` - - // The thing attributes. - Attributes map[string]*string `locationName:"attributes" type:"map"` - - // The name of the billing group the thing belongs to. - BillingGroupName *string `locationName:"billingGroupName" min:"1" type:"string"` - - // The default client ID. - DefaultClientId *string `locationName:"defaultClientId" type:"string"` - - // The ARN of the thing to describe. - ThingArn *string `locationName:"thingArn" type:"string"` - - // The ID of the thing to describe. - ThingId *string `locationName:"thingId" type:"string"` - - // The name of the thing. - ThingName *string `locationName:"thingName" min:"1" type:"string"` - - // The thing type name. - ThingTypeName *string `locationName:"thingTypeName" min:"1" type:"string"` - - // The current version of the thing record in the registry. - // - // To avoid unintentional changes to the information in the registry, you can - // pass the version information in the expectedVersion parameter of the UpdateThing - // and DeleteThing calls. - Version *int64 `locationName:"version" type:"long"` -} - -// String returns the string representation -func (s DescribeThingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeThingOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *DescribeThingOutput) SetAttributes(v map[string]*string) *DescribeThingOutput { - s.Attributes = v - return s -} - -// SetBillingGroupName sets the BillingGroupName field's value. -func (s *DescribeThingOutput) SetBillingGroupName(v string) *DescribeThingOutput { - s.BillingGroupName = &v - return s -} - -// SetDefaultClientId sets the DefaultClientId field's value. -func (s *DescribeThingOutput) SetDefaultClientId(v string) *DescribeThingOutput { - s.DefaultClientId = &v - return s -} - -// SetThingArn sets the ThingArn field's value. -func (s *DescribeThingOutput) SetThingArn(v string) *DescribeThingOutput { - s.ThingArn = &v - return s -} - -// SetThingId sets the ThingId field's value. -func (s *DescribeThingOutput) SetThingId(v string) *DescribeThingOutput { - s.ThingId = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *DescribeThingOutput) SetThingName(v string) *DescribeThingOutput { - s.ThingName = &v - return s -} - -// SetThingTypeName sets the ThingTypeName field's value. -func (s *DescribeThingOutput) SetThingTypeName(v string) *DescribeThingOutput { - s.ThingTypeName = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *DescribeThingOutput) SetVersion(v int64) *DescribeThingOutput { - s.Version = &v - return s -} - -type DescribeThingRegistrationTaskInput struct { - _ struct{} `type:"structure"` - - // The task ID. - // - // TaskId is a required field - TaskId *string `location:"uri" locationName:"taskId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeThingRegistrationTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeThingRegistrationTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeThingRegistrationTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeThingRegistrationTaskInput"} - if s.TaskId == nil { - invalidParams.Add(request.NewErrParamRequired("TaskId")) - } - if s.TaskId != nil && len(*s.TaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTaskId sets the TaskId field's value. -func (s *DescribeThingRegistrationTaskInput) SetTaskId(v string) *DescribeThingRegistrationTaskInput { - s.TaskId = &v - return s -} - -type DescribeThingRegistrationTaskOutput struct { - _ struct{} `type:"structure"` - - // The task creation date. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The number of things that failed to be provisioned. - FailureCount *int64 `locationName:"failureCount" type:"integer"` - - // The S3 bucket that contains the input file. - InputFileBucket *string `locationName:"inputFileBucket" min:"3" type:"string"` - - // The input file key. - InputFileKey *string `locationName:"inputFileKey" min:"1" type:"string"` - - // The date when the task was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` - - // The message. - Message *string `locationName:"message" type:"string"` - - // The progress of the bulk provisioning task expressed as a percentage. - PercentageProgress *int64 `locationName:"percentageProgress" type:"integer"` - - // The role ARN that grants access to the input file bucket. - RoleArn *string `locationName:"roleArn" min:"20" type:"string"` - - // The status of the bulk thing provisioning task. - Status *string `locationName:"status" type:"string" enum:"Status"` - - // The number of things successfully provisioned. - SuccessCount *int64 `locationName:"successCount" type:"integer"` - - // The task ID. - TaskId *string `locationName:"taskId" type:"string"` - - // The task's template. - TemplateBody *string `locationName:"templateBody" type:"string"` -} - -// String returns the string representation -func (s DescribeThingRegistrationTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeThingRegistrationTaskOutput) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *DescribeThingRegistrationTaskOutput) SetCreationDate(v time.Time) *DescribeThingRegistrationTaskOutput { - s.CreationDate = &v - return s -} - -// SetFailureCount sets the FailureCount field's value. -func (s *DescribeThingRegistrationTaskOutput) SetFailureCount(v int64) *DescribeThingRegistrationTaskOutput { - s.FailureCount = &v - return s -} - -// SetInputFileBucket sets the InputFileBucket field's value. -func (s *DescribeThingRegistrationTaskOutput) SetInputFileBucket(v string) *DescribeThingRegistrationTaskOutput { - s.InputFileBucket = &v - return s -} - -// SetInputFileKey sets the InputFileKey field's value. -func (s *DescribeThingRegistrationTaskOutput) SetInputFileKey(v string) *DescribeThingRegistrationTaskOutput { - s.InputFileKey = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *DescribeThingRegistrationTaskOutput) SetLastModifiedDate(v time.Time) *DescribeThingRegistrationTaskOutput { - s.LastModifiedDate = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *DescribeThingRegistrationTaskOutput) SetMessage(v string) *DescribeThingRegistrationTaskOutput { - s.Message = &v - return s -} - -// SetPercentageProgress sets the PercentageProgress field's value. -func (s *DescribeThingRegistrationTaskOutput) SetPercentageProgress(v int64) *DescribeThingRegistrationTaskOutput { - s.PercentageProgress = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DescribeThingRegistrationTaskOutput) SetRoleArn(v string) *DescribeThingRegistrationTaskOutput { - s.RoleArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeThingRegistrationTaskOutput) SetStatus(v string) *DescribeThingRegistrationTaskOutput { - s.Status = &v - return s -} - -// SetSuccessCount sets the SuccessCount field's value. -func (s *DescribeThingRegistrationTaskOutput) SetSuccessCount(v int64) *DescribeThingRegistrationTaskOutput { - s.SuccessCount = &v - return s -} - -// SetTaskId sets the TaskId field's value. -func (s *DescribeThingRegistrationTaskOutput) SetTaskId(v string) *DescribeThingRegistrationTaskOutput { - s.TaskId = &v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *DescribeThingRegistrationTaskOutput) SetTemplateBody(v string) *DescribeThingRegistrationTaskOutput { - s.TemplateBody = &v - return s -} - -// The input for the DescribeThingType operation. -type DescribeThingTypeInput struct { - _ struct{} `type:"structure"` - - // The name of the thing type. - // - // ThingTypeName is a required field - ThingTypeName *string `location:"uri" locationName:"thingTypeName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeThingTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeThingTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeThingTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeThingTypeInput"} - if s.ThingTypeName == nil { - invalidParams.Add(request.NewErrParamRequired("ThingTypeName")) - } - if s.ThingTypeName != nil && len(*s.ThingTypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingTypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetThingTypeName sets the ThingTypeName field's value. -func (s *DescribeThingTypeInput) SetThingTypeName(v string) *DescribeThingTypeInput { - s.ThingTypeName = &v - return s -} - -// The output for the DescribeThingType operation. -type DescribeThingTypeOutput struct { - _ struct{} `type:"structure"` - - // The thing type ARN. - ThingTypeArn *string `locationName:"thingTypeArn" type:"string"` - - // The thing type ID. - ThingTypeId *string `locationName:"thingTypeId" type:"string"` - - // The ThingTypeMetadata contains additional information about the thing type - // including: creation date and time, a value indicating whether the thing type - // is deprecated, and a date and time when it was deprecated. - ThingTypeMetadata *ThingTypeMetadata `locationName:"thingTypeMetadata" type:"structure"` - - // The name of the thing type. - ThingTypeName *string `locationName:"thingTypeName" min:"1" type:"string"` - - // The ThingTypeProperties contains information about the thing type including - // description, and a list of searchable thing attribute names. - ThingTypeProperties *ThingTypeProperties `locationName:"thingTypeProperties" type:"structure"` -} - -// String returns the string representation -func (s DescribeThingTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeThingTypeOutput) GoString() string { - return s.String() -} - -// SetThingTypeArn sets the ThingTypeArn field's value. -func (s *DescribeThingTypeOutput) SetThingTypeArn(v string) *DescribeThingTypeOutput { - s.ThingTypeArn = &v - return s -} - -// SetThingTypeId sets the ThingTypeId field's value. -func (s *DescribeThingTypeOutput) SetThingTypeId(v string) *DescribeThingTypeOutput { - s.ThingTypeId = &v - return s -} - -// SetThingTypeMetadata sets the ThingTypeMetadata field's value. -func (s *DescribeThingTypeOutput) SetThingTypeMetadata(v *ThingTypeMetadata) *DescribeThingTypeOutput { - s.ThingTypeMetadata = v - return s -} - -// SetThingTypeName sets the ThingTypeName field's value. -func (s *DescribeThingTypeOutput) SetThingTypeName(v string) *DescribeThingTypeOutput { - s.ThingTypeName = &v - return s -} - -// SetThingTypeProperties sets the ThingTypeProperties field's value. -func (s *DescribeThingTypeOutput) SetThingTypeProperties(v *ThingTypeProperties) *DescribeThingTypeOutput { - s.ThingTypeProperties = v - return s -} - -// Describes the location of the updated firmware. -type Destination struct { - _ struct{} `type:"structure"` - - // Describes the location in S3 of the updated firmware. - S3Destination *S3Destination `locationName:"s3Destination" type:"structure"` -} - -// String returns the string representation -func (s Destination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Destination) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Destination) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Destination"} - if s.S3Destination != nil { - if err := s.S3Destination.Validate(); err != nil { - invalidParams.AddNested("S3Destination", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3Destination sets the S3Destination field's value. -func (s *Destination) SetS3Destination(v *S3Destination) *Destination { - s.S3Destination = v - return s -} - -type DetachPolicyInput struct { - _ struct{} `type:"structure"` - - // The policy to detach. - // - // PolicyName is a required field - PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` - - // The target from which the policy will be detached. - // - // Target is a required field - Target *string `locationName:"target" type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachPolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.Target == nil { - invalidParams.Add(request.NewErrParamRequired("Target")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DetachPolicyInput) SetPolicyName(v string) *DetachPolicyInput { - s.PolicyName = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *DetachPolicyInput) SetTarget(v string) *DetachPolicyInput { - s.Target = &v - return s -} - -type DetachPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DetachPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachPolicyOutput) GoString() string { - return s.String() -} - -// The input for the DetachPrincipalPolicy operation. -type DetachPrincipalPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the policy to detach. - // - // PolicyName is a required field - PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` - - // The principal. - // - // If the principal is a certificate, specify the certificate ARN. If the principal - // is an Amazon Cognito identity, specify the identity ID. - // - // Principal is a required field - Principal *string `location:"header" locationName:"x-amzn-iot-principal" type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachPrincipalPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachPrincipalPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachPrincipalPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachPrincipalPolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.Principal == nil { - invalidParams.Add(request.NewErrParamRequired("Principal")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DetachPrincipalPolicyInput) SetPolicyName(v string) *DetachPrincipalPolicyInput { - s.PolicyName = &v - return s -} - -// SetPrincipal sets the Principal field's value. -func (s *DetachPrincipalPolicyInput) SetPrincipal(v string) *DetachPrincipalPolicyInput { - s.Principal = &v - return s -} - -type DetachPrincipalPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DetachPrincipalPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachPrincipalPolicyOutput) GoString() string { - return s.String() -} - -type DetachSecurityProfileInput struct { - _ struct{} `type:"structure"` - - // The security profile that is detached. - // - // SecurityProfileName is a required field - SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` - - // The ARN of the thing group from which the security profile is detached. - // - // SecurityProfileTargetArn is a required field - SecurityProfileTargetArn *string `location:"querystring" locationName:"securityProfileTargetArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachSecurityProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachSecurityProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachSecurityProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachSecurityProfileInput"} - if s.SecurityProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityProfileName")) - } - if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) - } - if s.SecurityProfileTargetArn == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityProfileTargetArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecurityProfileName sets the SecurityProfileName field's value. -func (s *DetachSecurityProfileInput) SetSecurityProfileName(v string) *DetachSecurityProfileInput { - s.SecurityProfileName = &v - return s -} - -// SetSecurityProfileTargetArn sets the SecurityProfileTargetArn field's value. -func (s *DetachSecurityProfileInput) SetSecurityProfileTargetArn(v string) *DetachSecurityProfileInput { - s.SecurityProfileTargetArn = &v - return s -} - -type DetachSecurityProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DetachSecurityProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachSecurityProfileOutput) GoString() string { - return s.String() -} - -// The input for the DetachThingPrincipal operation. -type DetachThingPrincipalInput struct { - _ struct{} `type:"structure"` - - // If the principal is a certificate, this value must be ARN of the certificate. - // If the principal is an Amazon Cognito identity, this value must be the ID - // of the Amazon Cognito identity. - // - // Principal is a required field - Principal *string `location:"header" locationName:"x-amzn-principal" type:"string" required:"true"` - - // The name of the thing. - // - // ThingName is a required field - ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachThingPrincipalInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachThingPrincipalInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachThingPrincipalInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachThingPrincipalInput"} - if s.Principal == nil { - invalidParams.Add(request.NewErrParamRequired("Principal")) - } - 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 -} - -// SetPrincipal sets the Principal field's value. -func (s *DetachThingPrincipalInput) SetPrincipal(v string) *DetachThingPrincipalInput { - s.Principal = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *DetachThingPrincipalInput) SetThingName(v string) *DetachThingPrincipalInput { - s.ThingName = &v - return s -} - -// The output from the DetachThingPrincipal operation. -type DetachThingPrincipalOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DetachThingPrincipalOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachThingPrincipalOutput) GoString() string { - return s.String() -} - -// The input for the DisableTopicRuleRequest operation. -type DisableTopicRuleInput struct { - _ struct{} `type:"structure"` - - // The name of the rule to disable. - // - // RuleName is a required field - RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableTopicRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableTopicRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableTopicRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableTopicRuleInput"} - if s.RuleName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleName")) - } - if s.RuleName != nil && len(*s.RuleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleName sets the RuleName field's value. -func (s *DisableTopicRuleInput) SetRuleName(v string) *DisableTopicRuleInput { - s.RuleName = &v - return s -} - -type DisableTopicRuleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableTopicRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableTopicRuleOutput) GoString() string { - return s.String() -} - -// Describes an action to write to a DynamoDB table. -// -// The tableName, hashKeyField, and rangeKeyField values must match the values -// used when you created the table. -// -// The hashKeyValue and rangeKeyvalue fields use a substitution template syntax. -// These templates provide data at runtime. The syntax is as follows: ${sql-expression}. -// -// You can specify any valid expression in a WHERE or SELECT clause, including -// JSON properties, comparisons, calculations, and functions. For example, the -// following field uses the third level of the topic: -// -// "hashKeyValue": "${topic(3)}" -// -// The following field uses the timestamp: -// -// "rangeKeyValue": "${timestamp()}" -type DynamoDBAction struct { - _ struct{} `type:"structure"` - - // The hash key name. - // - // HashKeyField is a required field - HashKeyField *string `locationName:"hashKeyField" type:"string" required:"true"` - - // The hash key type. Valid values are "STRING" or "NUMBER" - HashKeyType *string `locationName:"hashKeyType" type:"string" enum:"DynamoKeyType"` - - // The hash key value. - // - // HashKeyValue is a required field - HashKeyValue *string `locationName:"hashKeyValue" type:"string" required:"true"` - - // The type of operation to be performed. This follows the substitution template, - // so it can be ${operation}, but the substitution must result in one of the - // following: INSERT, UPDATE, or DELETE. - Operation *string `locationName:"operation" type:"string"` - - // The action payload. This name can be customized. - PayloadField *string `locationName:"payloadField" type:"string"` - - // The range key name. - RangeKeyField *string `locationName:"rangeKeyField" type:"string"` - - // The range key type. Valid values are "STRING" or "NUMBER" - RangeKeyType *string `locationName:"rangeKeyType" type:"string" enum:"DynamoKeyType"` - - // The range key value. - RangeKeyValue *string `locationName:"rangeKeyValue" type:"string"` - - // The ARN of the IAM role that grants access to the DynamoDB table. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` - - // The name of the DynamoDB table. - // - // TableName is a required field - TableName *string `locationName:"tableName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DynamoDBAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DynamoDBAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DynamoDBAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DynamoDBAction"} - if s.HashKeyField == nil { - invalidParams.Add(request.NewErrParamRequired("HashKeyField")) - } - if s.HashKeyValue == nil { - invalidParams.Add(request.NewErrParamRequired("HashKeyValue")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHashKeyField sets the HashKeyField field's value. -func (s *DynamoDBAction) SetHashKeyField(v string) *DynamoDBAction { - s.HashKeyField = &v - return s -} - -// SetHashKeyType sets the HashKeyType field's value. -func (s *DynamoDBAction) SetHashKeyType(v string) *DynamoDBAction { - s.HashKeyType = &v - return s -} - -// SetHashKeyValue sets the HashKeyValue field's value. -func (s *DynamoDBAction) SetHashKeyValue(v string) *DynamoDBAction { - s.HashKeyValue = &v - return s -} - -// SetOperation sets the Operation field's value. -func (s *DynamoDBAction) SetOperation(v string) *DynamoDBAction { - s.Operation = &v - return s -} - -// SetPayloadField sets the PayloadField field's value. -func (s *DynamoDBAction) SetPayloadField(v string) *DynamoDBAction { - s.PayloadField = &v - return s -} - -// SetRangeKeyField sets the RangeKeyField field's value. -func (s *DynamoDBAction) SetRangeKeyField(v string) *DynamoDBAction { - s.RangeKeyField = &v - return s -} - -// SetRangeKeyType sets the RangeKeyType field's value. -func (s *DynamoDBAction) SetRangeKeyType(v string) *DynamoDBAction { - s.RangeKeyType = &v - return s -} - -// SetRangeKeyValue sets the RangeKeyValue field's value. -func (s *DynamoDBAction) SetRangeKeyValue(v string) *DynamoDBAction { - s.RangeKeyValue = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DynamoDBAction) SetRoleArn(v string) *DynamoDBAction { - s.RoleArn = &v - return s -} - -// SetTableName sets the TableName field's value. -func (s *DynamoDBAction) SetTableName(v string) *DynamoDBAction { - s.TableName = &v - return s -} - -// Describes an action to write to a DynamoDB table. -// -// This DynamoDB action writes each attribute in the message payload into it's -// own column in the DynamoDB table. -type DynamoDBv2Action struct { - _ struct{} `type:"structure"` - - // Specifies the DynamoDB table to which the message data will be written. For - // example: - // - // { "dynamoDBv2": { "roleArn": "aws:iam:12341251:my-role" "putItem": { "tableName": - // "my-table" } } } - // - // Each attribute in the message payload will be written to a separate column - // in the DynamoDB database. - // - // PutItem is a required field - PutItem *PutItemInput `locationName:"putItem" type:"structure" required:"true"` - - // The ARN of the IAM role that grants access to the DynamoDB table. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s DynamoDBv2Action) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DynamoDBv2Action) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DynamoDBv2Action) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DynamoDBv2Action"} - if s.PutItem == nil { - invalidParams.Add(request.NewErrParamRequired("PutItem")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.PutItem != nil { - if err := s.PutItem.Validate(); err != nil { - invalidParams.AddNested("PutItem", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPutItem sets the PutItem field's value. -func (s *DynamoDBv2Action) SetPutItem(v *PutItemInput) *DynamoDBv2Action { - s.PutItem = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DynamoDBv2Action) SetRoleArn(v string) *DynamoDBv2Action { - s.RoleArn = &v - return s -} - -// The policy that has the effect on the authorization results. -type EffectivePolicy struct { - _ struct{} `type:"structure"` - - // The policy ARN. - PolicyArn *string `locationName:"policyArn" type:"string"` - - // The IAM policy document. - PolicyDocument *string `locationName:"policyDocument" type:"string"` - - // The policy name. - PolicyName *string `locationName:"policyName" min:"1" type:"string"` -} - -// String returns the string representation -func (s EffectivePolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EffectivePolicy) GoString() string { - return s.String() -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *EffectivePolicy) SetPolicyArn(v string) *EffectivePolicy { - s.PolicyArn = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *EffectivePolicy) SetPolicyDocument(v string) *EffectivePolicy { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *EffectivePolicy) SetPolicyName(v string) *EffectivePolicy { - s.PolicyName = &v - return s -} - -// Describes an action that writes data to an Amazon Elasticsearch Service domain. -type ElasticsearchAction struct { - _ struct{} `type:"structure"` - - // The endpoint of your Elasticsearch domain. - // - // Endpoint is a required field - Endpoint *string `locationName:"endpoint" type:"string" required:"true"` - - // The unique identifier for the document you are storing. - // - // Id is a required field - Id *string `locationName:"id" type:"string" required:"true"` - - // The Elasticsearch index where you want to store your data. - // - // Index is a required field - Index *string `locationName:"index" type:"string" required:"true"` - - // The IAM role ARN that has access to Elasticsearch. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` - - // The type of document you are storing. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true"` -} - -// String returns the string representation -func (s ElasticsearchAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticsearchAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ElasticsearchAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ElasticsearchAction"} - if s.Endpoint == nil { - invalidParams.Add(request.NewErrParamRequired("Endpoint")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Index == nil { - invalidParams.Add(request.NewErrParamRequired("Index")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpoint sets the Endpoint field's value. -func (s *ElasticsearchAction) SetEndpoint(v string) *ElasticsearchAction { - s.Endpoint = &v - return s -} - -// SetId sets the Id field's value. -func (s *ElasticsearchAction) SetId(v string) *ElasticsearchAction { - s.Id = &v - return s -} - -// SetIndex sets the Index field's value. -func (s *ElasticsearchAction) SetIndex(v string) *ElasticsearchAction { - s.Index = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *ElasticsearchAction) SetRoleArn(v string) *ElasticsearchAction { - s.RoleArn = &v - return s -} - -// SetType sets the Type field's value. -func (s *ElasticsearchAction) SetType(v string) *ElasticsearchAction { - s.Type = &v - return s -} - -// The input for the EnableTopicRuleRequest operation. -type EnableTopicRuleInput struct { - _ struct{} `type:"structure"` - - // The name of the topic rule to enable. - // - // RuleName is a required field - RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s EnableTopicRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableTopicRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableTopicRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableTopicRuleInput"} - if s.RuleName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleName")) - } - if s.RuleName != nil && len(*s.RuleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleName sets the RuleName field's value. -func (s *EnableTopicRuleInput) SetRuleName(v string) *EnableTopicRuleInput { - s.RuleName = &v - return s -} - -type EnableTopicRuleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableTopicRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableTopicRuleOutput) GoString() string { - return s.String() -} - -// Error information. -type ErrorInfo struct { - _ struct{} `type:"structure"` - - // The error code. - Code *string `locationName:"code" type:"string"` - - // The error message. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s ErrorInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ErrorInfo) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *ErrorInfo) SetCode(v string) *ErrorInfo { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ErrorInfo) SetMessage(v string) *ErrorInfo { - s.Message = &v - return s -} - -// Information that explicitly denies authorization. -type ExplicitDeny struct { - _ struct{} `type:"structure"` - - // The policies that denied the authorization. - Policies []*Policy `locationName:"policies" type:"list"` -} - -// String returns the string representation -func (s ExplicitDeny) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExplicitDeny) GoString() string { - return s.String() -} - -// SetPolicies sets the Policies field's value. -func (s *ExplicitDeny) SetPolicies(v []*Policy) *ExplicitDeny { - s.Policies = v - return s -} - -// Allows you to create an exponential rate of rollout for a job. -type ExponentialRolloutRate struct { - _ struct{} `type:"structure"` - - // The minimum number of things that will be notified of a pending job, per - // minute at the start of job rollout. This parameter allows you to define the - // initial rate of rollout. - // - // BaseRatePerMinute is a required field - BaseRatePerMinute *int64 `locationName:"baseRatePerMinute" min:"1" type:"integer" required:"true"` - - // The exponential factor to increase the rate of rollout for a job. - // - // IncrementFactor is a required field - IncrementFactor *float64 `locationName:"incrementFactor" min:"1" type:"double" required:"true"` - - // The criteria to initiate the increase in rate of rollout for a job. - // - // AWS IoT supports up to one digit after the decimal (for example, 1.5, but - // not 1.55). - // - // RateIncreaseCriteria is a required field - RateIncreaseCriteria *RateIncreaseCriteria `locationName:"rateIncreaseCriteria" type:"structure" required:"true"` -} - -// String returns the string representation -func (s ExponentialRolloutRate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExponentialRolloutRate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExponentialRolloutRate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExponentialRolloutRate"} - if s.BaseRatePerMinute == nil { - invalidParams.Add(request.NewErrParamRequired("BaseRatePerMinute")) - } - if s.BaseRatePerMinute != nil && *s.BaseRatePerMinute < 1 { - invalidParams.Add(request.NewErrParamMinValue("BaseRatePerMinute", 1)) - } - if s.IncrementFactor == nil { - invalidParams.Add(request.NewErrParamRequired("IncrementFactor")) - } - if s.IncrementFactor != nil && *s.IncrementFactor < 1 { - invalidParams.Add(request.NewErrParamMinValue("IncrementFactor", 1)) - } - if s.RateIncreaseCriteria == nil { - invalidParams.Add(request.NewErrParamRequired("RateIncreaseCriteria")) - } - if s.RateIncreaseCriteria != nil { - if err := s.RateIncreaseCriteria.Validate(); err != nil { - invalidParams.AddNested("RateIncreaseCriteria", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBaseRatePerMinute sets the BaseRatePerMinute field's value. -func (s *ExponentialRolloutRate) SetBaseRatePerMinute(v int64) *ExponentialRolloutRate { - s.BaseRatePerMinute = &v - return s -} - -// SetIncrementFactor sets the IncrementFactor field's value. -func (s *ExponentialRolloutRate) SetIncrementFactor(v float64) *ExponentialRolloutRate { - s.IncrementFactor = &v - return s -} - -// SetRateIncreaseCriteria sets the RateIncreaseCriteria field's value. -func (s *ExponentialRolloutRate) SetRateIncreaseCriteria(v *RateIncreaseCriteria) *ExponentialRolloutRate { - s.RateIncreaseCriteria = v - return s -} - -// The location of the OTA update. -type FileLocation struct { - _ struct{} `type:"structure"` - - // The location of the updated firmware in S3. - S3Location *S3Location `locationName:"s3Location" type:"structure"` - - // The stream that contains the OTA update. - Stream *Stream `locationName:"stream" type:"structure"` -} - -// String returns the string representation -func (s FileLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FileLocation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FileLocation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FileLocation"} - if s.S3Location != nil { - if err := s.S3Location.Validate(); err != nil { - invalidParams.AddNested("S3Location", err.(request.ErrInvalidParams)) - } - } - if s.Stream != nil { - if err := s.Stream.Validate(); err != nil { - invalidParams.AddNested("Stream", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3Location sets the S3Location field's value. -func (s *FileLocation) SetS3Location(v *S3Location) *FileLocation { - s.S3Location = v - return s -} - -// SetStream sets the Stream field's value. -func (s *FileLocation) SetStream(v *Stream) *FileLocation { - s.Stream = v - return s -} - -// Describes an action that writes data to an Amazon Kinesis Firehose stream. -type FirehoseAction struct { - _ struct{} `type:"structure"` - - // The delivery stream name. - // - // DeliveryStreamName is a required field - DeliveryStreamName *string `locationName:"deliveryStreamName" type:"string" required:"true"` - - // The IAM role that grants access to the Amazon Kinesis Firehose stream. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` - - // A character separator that will be used to separate records written to the - // Firehose stream. Valid values are: '\n' (newline), '\t' (tab), '\r\n' (Windows - // newline), ',' (comma). - Separator *string `locationName:"separator" type:"string"` -} - -// String returns the string representation -func (s FirehoseAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FirehoseAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FirehoseAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FirehoseAction"} - if s.DeliveryStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryStreamName sets the DeliveryStreamName field's value. -func (s *FirehoseAction) SetDeliveryStreamName(v string) *FirehoseAction { - s.DeliveryStreamName = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *FirehoseAction) SetRoleArn(v string) *FirehoseAction { - s.RoleArn = &v - return s -} - -// SetSeparator sets the Separator field's value. -func (s *FirehoseAction) SetSeparator(v string) *FirehoseAction { - s.Separator = &v - return s -} - -type GetEffectivePoliciesInput struct { - _ struct{} `type:"structure"` - - // The Cognito identity pool ID. - CognitoIdentityPoolId *string `locationName:"cognitoIdentityPoolId" type:"string"` - - // The principal. - Principal *string `locationName:"principal" type:"string"` - - // The thing name. - ThingName *string `location:"querystring" locationName:"thingName" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetEffectivePoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEffectivePoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetEffectivePoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetEffectivePoliciesInput"} - if s.ThingName != nil && len(*s.ThingName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCognitoIdentityPoolId sets the CognitoIdentityPoolId field's value. -func (s *GetEffectivePoliciesInput) SetCognitoIdentityPoolId(v string) *GetEffectivePoliciesInput { - s.CognitoIdentityPoolId = &v - return s -} - -// SetPrincipal sets the Principal field's value. -func (s *GetEffectivePoliciesInput) SetPrincipal(v string) *GetEffectivePoliciesInput { - s.Principal = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *GetEffectivePoliciesInput) SetThingName(v string) *GetEffectivePoliciesInput { - s.ThingName = &v - return s -} - -type GetEffectivePoliciesOutput struct { - _ struct{} `type:"structure"` - - // The effective policies. - EffectivePolicies []*EffectivePolicy `locationName:"effectivePolicies" type:"list"` -} - -// String returns the string representation -func (s GetEffectivePoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEffectivePoliciesOutput) GoString() string { - return s.String() -} - -// SetEffectivePolicies sets the EffectivePolicies field's value. -func (s *GetEffectivePoliciesOutput) SetEffectivePolicies(v []*EffectivePolicy) *GetEffectivePoliciesOutput { - s.EffectivePolicies = v - return s -} - -type GetIndexingConfigurationInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetIndexingConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIndexingConfigurationInput) GoString() string { - return s.String() -} - -type GetIndexingConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The index configuration. - ThingGroupIndexingConfiguration *ThingGroupIndexingConfiguration `locationName:"thingGroupIndexingConfiguration" type:"structure"` - - // Thing indexing configuration. - ThingIndexingConfiguration *ThingIndexingConfiguration `locationName:"thingIndexingConfiguration" type:"structure"` -} - -// String returns the string representation -func (s GetIndexingConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIndexingConfigurationOutput) GoString() string { - return s.String() -} - -// SetThingGroupIndexingConfiguration sets the ThingGroupIndexingConfiguration field's value. -func (s *GetIndexingConfigurationOutput) SetThingGroupIndexingConfiguration(v *ThingGroupIndexingConfiguration) *GetIndexingConfigurationOutput { - s.ThingGroupIndexingConfiguration = v - return s -} - -// SetThingIndexingConfiguration sets the ThingIndexingConfiguration field's value. -func (s *GetIndexingConfigurationOutput) SetThingIndexingConfiguration(v *ThingIndexingConfiguration) *GetIndexingConfigurationOutput { - s.ThingIndexingConfiguration = v - return s -} - -type GetJobDocumentInput struct { - _ struct{} `type:"structure"` - - // The unique identifier you assigned to this job when it was created. - // - // JobId is a required field - JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetJobDocumentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobDocumentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetJobDocumentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetJobDocumentInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobId sets the JobId field's value. -func (s *GetJobDocumentInput) SetJobId(v string) *GetJobDocumentInput { - s.JobId = &v - return s -} - -type GetJobDocumentOutput struct { - _ struct{} `type:"structure"` - - // The job document content. - Document *string `locationName:"document" type:"string"` -} - -// String returns the string representation -func (s GetJobDocumentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobDocumentOutput) GoString() string { - return s.String() -} - -// SetDocument sets the Document field's value. -func (s *GetJobDocumentOutput) SetDocument(v string) *GetJobDocumentOutput { - s.Document = &v - return s -} - -// The input for the GetLoggingOptions operation. -type GetLoggingOptionsInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetLoggingOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLoggingOptionsInput) GoString() string { - return s.String() -} - -// The output from the GetLoggingOptions operation. -type GetLoggingOptionsOutput struct { - _ struct{} `type:"structure"` - - // The logging level. - LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` - - // The ARN of the IAM role that grants access. - RoleArn *string `locationName:"roleArn" type:"string"` -} - -// String returns the string representation -func (s GetLoggingOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLoggingOptionsOutput) GoString() string { - return s.String() -} - -// SetLogLevel sets the LogLevel field's value. -func (s *GetLoggingOptionsOutput) SetLogLevel(v string) *GetLoggingOptionsOutput { - s.LogLevel = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *GetLoggingOptionsOutput) SetRoleArn(v string) *GetLoggingOptionsOutput { - s.RoleArn = &v - return s -} - -type GetOTAUpdateInput struct { - _ struct{} `type:"structure"` - - // The OTA update ID. - // - // OtaUpdateId is a required field - OtaUpdateId *string `location:"uri" locationName:"otaUpdateId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetOTAUpdateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOTAUpdateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOTAUpdateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOTAUpdateInput"} - if s.OtaUpdateId == nil { - invalidParams.Add(request.NewErrParamRequired("OtaUpdateId")) - } - if s.OtaUpdateId != nil && len(*s.OtaUpdateId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OtaUpdateId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOtaUpdateId sets the OtaUpdateId field's value. -func (s *GetOTAUpdateInput) SetOtaUpdateId(v string) *GetOTAUpdateInput { - s.OtaUpdateId = &v - return s -} - -type GetOTAUpdateOutput struct { - _ struct{} `type:"structure"` - - // The OTA update info. - OtaUpdateInfo *OTAUpdateInfo `locationName:"otaUpdateInfo" type:"structure"` -} - -// String returns the string representation -func (s GetOTAUpdateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOTAUpdateOutput) GoString() string { - return s.String() -} - -// SetOtaUpdateInfo sets the OtaUpdateInfo field's value. -func (s *GetOTAUpdateOutput) SetOtaUpdateInfo(v *OTAUpdateInfo) *GetOTAUpdateOutput { - s.OtaUpdateInfo = v - return s -} - -// The input for the GetPolicy operation. -type GetPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the policy. - // - // PolicyName is a required field - PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetPolicyInput) SetPolicyName(v string) *GetPolicyInput { - s.PolicyName = &v - return s -} - -// The output from the GetPolicy operation. -type GetPolicyOutput struct { - _ struct{} `type:"structure"` - - // The date the policy was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The default policy version ID. - DefaultVersionId *string `locationName:"defaultVersionId" type:"string"` - - // The generation ID of the policy. - GenerationId *string `locationName:"generationId" type:"string"` - - // The date the policy was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` - - // The policy ARN. - PolicyArn *string `locationName:"policyArn" type:"string"` - - // The JSON document that describes the policy. - PolicyDocument *string `locationName:"policyDocument" type:"string"` - - // The policy name. - PolicyName *string `locationName:"policyName" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPolicyOutput) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *GetPolicyOutput) SetCreationDate(v time.Time) *GetPolicyOutput { - s.CreationDate = &v - return s -} - -// SetDefaultVersionId sets the DefaultVersionId field's value. -func (s *GetPolicyOutput) SetDefaultVersionId(v string) *GetPolicyOutput { - s.DefaultVersionId = &v - return s -} - -// SetGenerationId sets the GenerationId field's value. -func (s *GetPolicyOutput) SetGenerationId(v string) *GetPolicyOutput { - s.GenerationId = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *GetPolicyOutput) SetLastModifiedDate(v time.Time) *GetPolicyOutput { - s.LastModifiedDate = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *GetPolicyOutput) SetPolicyArn(v string) *GetPolicyOutput { - s.PolicyArn = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *GetPolicyOutput) SetPolicyDocument(v string) *GetPolicyOutput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetPolicyOutput) SetPolicyName(v string) *GetPolicyOutput { - s.PolicyName = &v - return s -} - -// The input for the GetPolicyVersion operation. -type GetPolicyVersionInput struct { - _ struct{} `type:"structure"` - - // The name of the policy. - // - // PolicyName is a required field - PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` - - // The policy version ID. - // - // PolicyVersionId is a required field - PolicyVersionId *string `location:"uri" locationName:"policyVersionId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPolicyVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPolicyVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPolicyVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPolicyVersionInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.PolicyVersionId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyVersionId")) - } - if s.PolicyVersionId != nil && len(*s.PolicyVersionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyVersionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetPolicyVersionInput) SetPolicyName(v string) *GetPolicyVersionInput { - s.PolicyName = &v - return s -} - -// SetPolicyVersionId sets the PolicyVersionId field's value. -func (s *GetPolicyVersionInput) SetPolicyVersionId(v string) *GetPolicyVersionInput { - s.PolicyVersionId = &v - return s -} - -// The output from the GetPolicyVersion operation. -type GetPolicyVersionOutput struct { - _ struct{} `type:"structure"` - - // The date the policy version was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The generation ID of the policy version. - GenerationId *string `locationName:"generationId" type:"string"` - - // Specifies whether the policy version is the default. - IsDefaultVersion *bool `locationName:"isDefaultVersion" type:"boolean"` - - // The date the policy version was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` - - // The policy ARN. - PolicyArn *string `locationName:"policyArn" type:"string"` - - // The JSON document that describes the policy. - PolicyDocument *string `locationName:"policyDocument" type:"string"` - - // The policy name. - PolicyName *string `locationName:"policyName" min:"1" type:"string"` - - // The policy version ID. - PolicyVersionId *string `locationName:"policyVersionId" type:"string"` -} - -// String returns the string representation -func (s GetPolicyVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPolicyVersionOutput) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *GetPolicyVersionOutput) SetCreationDate(v time.Time) *GetPolicyVersionOutput { - s.CreationDate = &v - return s -} - -// SetGenerationId sets the GenerationId field's value. -func (s *GetPolicyVersionOutput) SetGenerationId(v string) *GetPolicyVersionOutput { - s.GenerationId = &v - return s -} - -// SetIsDefaultVersion sets the IsDefaultVersion field's value. -func (s *GetPolicyVersionOutput) SetIsDefaultVersion(v bool) *GetPolicyVersionOutput { - s.IsDefaultVersion = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *GetPolicyVersionOutput) SetLastModifiedDate(v time.Time) *GetPolicyVersionOutput { - s.LastModifiedDate = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *GetPolicyVersionOutput) SetPolicyArn(v string) *GetPolicyVersionOutput { - s.PolicyArn = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *GetPolicyVersionOutput) SetPolicyDocument(v string) *GetPolicyVersionOutput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetPolicyVersionOutput) SetPolicyName(v string) *GetPolicyVersionOutput { - s.PolicyName = &v - return s -} - -// SetPolicyVersionId sets the PolicyVersionId field's value. -func (s *GetPolicyVersionOutput) SetPolicyVersionId(v string) *GetPolicyVersionOutput { - s.PolicyVersionId = &v - return s -} - -// The input to the GetRegistrationCode operation. -type GetRegistrationCodeInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetRegistrationCodeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRegistrationCodeInput) GoString() string { - return s.String() -} - -// The output from the GetRegistrationCode operation. -type GetRegistrationCodeOutput struct { - _ struct{} `type:"structure"` - - // The CA certificate registration code. - RegistrationCode *string `locationName:"registrationCode" min:"64" type:"string"` -} - -// String returns the string representation -func (s GetRegistrationCodeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRegistrationCodeOutput) GoString() string { - return s.String() -} - -// SetRegistrationCode sets the RegistrationCode field's value. -func (s *GetRegistrationCodeOutput) SetRegistrationCode(v string) *GetRegistrationCodeOutput { - s.RegistrationCode = &v - return s -} - -// The input for the GetTopicRule operation. -type GetTopicRuleInput struct { - _ struct{} `type:"structure"` - - // The name of the rule. - // - // RuleName is a required field - RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTopicRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTopicRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTopicRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTopicRuleInput"} - if s.RuleName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleName")) - } - if s.RuleName != nil && len(*s.RuleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleName sets the RuleName field's value. -func (s *GetTopicRuleInput) SetRuleName(v string) *GetTopicRuleInput { - s.RuleName = &v - return s -} - -// The output from the GetTopicRule operation. -type GetTopicRuleOutput struct { - _ struct{} `type:"structure"` - - // The rule. - Rule *TopicRule `locationName:"rule" type:"structure"` - - // The rule ARN. - RuleArn *string `locationName:"ruleArn" type:"string"` -} - -// String returns the string representation -func (s GetTopicRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTopicRuleOutput) GoString() string { - return s.String() -} - -// SetRule sets the Rule field's value. -func (s *GetTopicRuleOutput) SetRule(v *TopicRule) *GetTopicRuleOutput { - s.Rule = v - return s -} - -// SetRuleArn sets the RuleArn field's value. -func (s *GetTopicRuleOutput) SetRuleArn(v string) *GetTopicRuleOutput { - s.RuleArn = &v - return s -} - -type GetV2LoggingOptionsInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetV2LoggingOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetV2LoggingOptionsInput) GoString() string { - return s.String() -} - -type GetV2LoggingOptionsOutput struct { - _ struct{} `type:"structure"` - - // The default log level. - DefaultLogLevel *string `locationName:"defaultLogLevel" type:"string" enum:"LogLevel"` - - // Disables all logs. - DisableAllLogs *bool `locationName:"disableAllLogs" type:"boolean"` - - // The IAM role ARN AWS IoT uses to write to your CloudWatch logs. - RoleArn *string `locationName:"roleArn" type:"string"` -} - -// String returns the string representation -func (s GetV2LoggingOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetV2LoggingOptionsOutput) GoString() string { - return s.String() -} - -// SetDefaultLogLevel sets the DefaultLogLevel field's value. -func (s *GetV2LoggingOptionsOutput) SetDefaultLogLevel(v string) *GetV2LoggingOptionsOutput { - s.DefaultLogLevel = &v - return s -} - -// SetDisableAllLogs sets the DisableAllLogs field's value. -func (s *GetV2LoggingOptionsOutput) SetDisableAllLogs(v bool) *GetV2LoggingOptionsOutput { - s.DisableAllLogs = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *GetV2LoggingOptionsOutput) SetRoleArn(v string) *GetV2LoggingOptionsOutput { - s.RoleArn = &v - return s -} - -// The name and ARN of a group. -type GroupNameAndArn struct { - _ struct{} `type:"structure"` - - // The group ARN. - GroupArn *string `locationName:"groupArn" type:"string"` - - // The group name. - GroupName *string `locationName:"groupName" min:"1" type:"string"` -} - -// String returns the string representation -func (s GroupNameAndArn) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GroupNameAndArn) GoString() string { - return s.String() -} - -// SetGroupArn sets the GroupArn field's value. -func (s *GroupNameAndArn) SetGroupArn(v string) *GroupNameAndArn { - s.GroupArn = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *GroupNameAndArn) SetGroupName(v string) *GroupNameAndArn { - s.GroupName = &v - return s -} - -// Information that implicitly denies authorization. When policy doesn't explicitly -// deny or allow an action on a resource it is considered an implicit deny. -type ImplicitDeny struct { - _ struct{} `type:"structure"` - - // Policies that don't contain a matching allow or deny statement for the specified - // action on the specified resource. - Policies []*Policy `locationName:"policies" type:"list"` -} - -// String returns the string representation -func (s ImplicitDeny) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImplicitDeny) GoString() string { - return s.String() -} - -// SetPolicies sets the Policies field's value. -func (s *ImplicitDeny) SetPolicies(v []*Policy) *ImplicitDeny { - s.Policies = v - return s -} - -// Sends messge data to an AWS IoT Analytics channel. -type IotAnalyticsAction struct { - _ struct{} `type:"structure"` - - // (deprecated) The ARN of the IoT Analytics channel to which message data will - // be sent. - ChannelArn *string `locationName:"channelArn" type:"string"` - - // The name of the IoT Analytics channel to which message data will be sent. - ChannelName *string `locationName:"channelName" type:"string"` - - // The ARN of the role which has a policy that grants IoT Analytics permission - // to send message data via IoT Analytics (iotanalytics:BatchPutMessage). - RoleArn *string `locationName:"roleArn" type:"string"` -} - -// String returns the string representation -func (s IotAnalyticsAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IotAnalyticsAction) GoString() string { - return s.String() -} - -// SetChannelArn sets the ChannelArn field's value. -func (s *IotAnalyticsAction) SetChannelArn(v string) *IotAnalyticsAction { - s.ChannelArn = &v - return s -} - -// SetChannelName sets the ChannelName field's value. -func (s *IotAnalyticsAction) SetChannelName(v string) *IotAnalyticsAction { - s.ChannelName = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *IotAnalyticsAction) SetRoleArn(v string) *IotAnalyticsAction { - s.RoleArn = &v - return s -} - -// Sends an input to an AWS IoT Events detector. -type IotEventsAction struct { - _ struct{} `type:"structure"` - - // The name of the AWS IoT Events input. - // - // InputName is a required field - InputName *string `locationName:"inputName" min:"1" type:"string" required:"true"` - - // [Optional] Use this to ensure that only one input (message) with a given - // messageId will be processed by an AWS IoT Events detector. - MessageId *string `locationName:"messageId" type:"string"` - - // The ARN of the role that grants AWS IoT permission to send an input to an - // AWS IoT Events detector. ("Action":"iotevents:BatchPutMessage"). - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s IotEventsAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IotEventsAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IotEventsAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IotEventsAction"} - if s.InputName == nil { - invalidParams.Add(request.NewErrParamRequired("InputName")) - } - if s.InputName != nil && len(*s.InputName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputName", 1)) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputName sets the InputName field's value. -func (s *IotEventsAction) SetInputName(v string) *IotEventsAction { - s.InputName = &v - return s -} - -// SetMessageId sets the MessageId field's value. -func (s *IotEventsAction) SetMessageId(v string) *IotEventsAction { - s.MessageId = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *IotEventsAction) SetRoleArn(v string) *IotEventsAction { - s.RoleArn = &v - return s -} - -// The Job object contains details about a job. -type Job struct { - _ struct{} `type:"structure"` - - // Configuration for criteria to abort the job. - AbortConfig *AbortConfig `locationName:"abortConfig" type:"structure"` - - // If the job was updated, describes the reason for the update. - Comment *string `locationName:"comment" type:"string"` - - // The time, in milliseconds since the epoch, when the job was completed. - CompletedAt *time.Time `locationName:"completedAt" type:"timestamp"` - - // The time, in milliseconds since the epoch, when the job was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // A short text description of the job. - Description *string `locationName:"description" type:"string"` - - // Will be true if the job was canceled with the optional force parameter set - // to true. - ForceCanceled *bool `locationName:"forceCanceled" type:"boolean"` - - // An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId". - JobArn *string `locationName:"jobArn" type:"string"` - - // Allows you to create a staged rollout of a job. - JobExecutionsRolloutConfig *JobExecutionsRolloutConfig `locationName:"jobExecutionsRolloutConfig" type:"structure"` - - // The unique identifier you assigned to this job when it was created. - JobId *string `locationName:"jobId" min:"1" type:"string"` - - // Details about the job process. - JobProcessDetails *JobProcessDetails `locationName:"jobProcessDetails" type:"structure"` - - // The time, in milliseconds since the epoch, when the job was last updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` - - // Configuration for pre-signed S3 URLs. - PresignedUrlConfig *PresignedUrlConfig `locationName:"presignedUrlConfig" type:"structure"` - - // If the job was updated, provides the reason code for the update. - ReasonCode *string `locationName:"reasonCode" type:"string"` - - // The status of the job, one of IN_PROGRESS, CANCELED, DELETION_IN_PROGRESS - // or COMPLETED. - Status *string `locationName:"status" type:"string" enum:"JobStatus"` - - // Specifies whether the job will continue to run (CONTINUOUS), or will be complete - // after all those things specified as targets have completed the job (SNAPSHOT). - // If continuous, the job may also be run on a thing when a change is detected - // in a target. For example, a job will run on a device when the thing representing - // the device is added to a target group, even after the job was completed by - // all things originally in the group. - TargetSelection *string `locationName:"targetSelection" type:"string" enum:"TargetSelection"` - - // A list of IoT things and thing groups to which the job should be sent. - Targets []*string `locationName:"targets" min:"1" type:"list"` - - // Specifies the amount of time each device has to finish its execution of the - // job. A timer is started when the job execution status is set to IN_PROGRESS. - // If the job execution status is not set to another terminal state before the - // timer expires, it will be automatically set to TIMED_OUT. - TimeoutConfig *TimeoutConfig `locationName:"timeoutConfig" type:"structure"` -} - -// String returns the string representation -func (s Job) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Job) GoString() string { - return s.String() -} - -// SetAbortConfig sets the AbortConfig field's value. -func (s *Job) SetAbortConfig(v *AbortConfig) *Job { - s.AbortConfig = v - return s -} - -// SetComment sets the Comment field's value. -func (s *Job) SetComment(v string) *Job { - s.Comment = &v - return s -} - -// SetCompletedAt sets the CompletedAt field's value. -func (s *Job) SetCompletedAt(v time.Time) *Job { - s.CompletedAt = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Job) SetCreatedAt(v time.Time) *Job { - s.CreatedAt = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Job) SetDescription(v string) *Job { - s.Description = &v - return s -} - -// SetForceCanceled sets the ForceCanceled field's value. -func (s *Job) SetForceCanceled(v bool) *Job { - s.ForceCanceled = &v - return s -} - -// SetJobArn sets the JobArn field's value. -func (s *Job) SetJobArn(v string) *Job { - s.JobArn = &v - return s -} - -// SetJobExecutionsRolloutConfig sets the JobExecutionsRolloutConfig field's value. -func (s *Job) SetJobExecutionsRolloutConfig(v *JobExecutionsRolloutConfig) *Job { - s.JobExecutionsRolloutConfig = v - return s -} - -// SetJobId sets the JobId field's value. -func (s *Job) SetJobId(v string) *Job { - s.JobId = &v - return s -} - -// SetJobProcessDetails sets the JobProcessDetails field's value. -func (s *Job) SetJobProcessDetails(v *JobProcessDetails) *Job { - s.JobProcessDetails = v - return s -} - -// SetLastUpdatedAt sets the LastUpdatedAt field's value. -func (s *Job) SetLastUpdatedAt(v time.Time) *Job { - s.LastUpdatedAt = &v - return s -} - -// SetPresignedUrlConfig sets the PresignedUrlConfig field's value. -func (s *Job) SetPresignedUrlConfig(v *PresignedUrlConfig) *Job { - s.PresignedUrlConfig = v - return s -} - -// SetReasonCode sets the ReasonCode field's value. -func (s *Job) SetReasonCode(v string) *Job { - s.ReasonCode = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Job) SetStatus(v string) *Job { - s.Status = &v - return s -} - -// SetTargetSelection sets the TargetSelection field's value. -func (s *Job) SetTargetSelection(v string) *Job { - s.TargetSelection = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *Job) SetTargets(v []*string) *Job { - s.Targets = v - return s -} - -// SetTimeoutConfig sets the TimeoutConfig field's value. -func (s *Job) SetTimeoutConfig(v *TimeoutConfig) *Job { - s.TimeoutConfig = v - return s -} - -// The job execution object represents the execution of a job on a particular -// device. -type JobExecution struct { - _ struct{} `type:"structure"` - - // The estimated number of seconds that remain before the job execution status - // will be changed to TIMED_OUT. The timeout interval can be anywhere between - // 1 minute and 7 days (1 to 10080 minutes). The actual job execution timeout - // can occur up to 60 seconds later than the estimated duration. This value - // will not be included if the job execution has reached a terminal status. - ApproximateSecondsBeforeTimedOut *int64 `locationName:"approximateSecondsBeforeTimedOut" type:"long"` - - // A string (consisting of the digits "0" through "9") which identifies this - // particular job execution on this particular device. It can be used in commands - // which return or update job execution information. - ExecutionNumber *int64 `locationName:"executionNumber" type:"long"` - - // Will be true if the job execution was canceled with the optional force parameter - // set to true. - ForceCanceled *bool `locationName:"forceCanceled" type:"boolean"` - - // The unique identifier you assigned to the job when it was created. - JobId *string `locationName:"jobId" min:"1" type:"string"` - - // The time, in milliseconds since the epoch, when the job execution was last - // updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` - - // The time, in milliseconds since the epoch, when the job execution was queued. - QueuedAt *time.Time `locationName:"queuedAt" type:"timestamp"` - - // The time, in milliseconds since the epoch, when the job execution started. - StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` - - // The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, - // TIMED_OUT, CANCELED, or REJECTED). - Status *string `locationName:"status" type:"string" enum:"JobExecutionStatus"` - - // A collection of name/value pairs that describe the status of the job execution. - StatusDetails *JobExecutionStatusDetails `locationName:"statusDetails" type:"structure"` - - // The ARN of the thing on which the job execution is running. - ThingArn *string `locationName:"thingArn" type:"string"` - - // The version of the job execution. Job execution versions are incremented - // each time they are updated by a device. - VersionNumber *int64 `locationName:"versionNumber" type:"long"` -} - -// String returns the string representation -func (s JobExecution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobExecution) GoString() string { - return s.String() -} - -// SetApproximateSecondsBeforeTimedOut sets the ApproximateSecondsBeforeTimedOut field's value. -func (s *JobExecution) SetApproximateSecondsBeforeTimedOut(v int64) *JobExecution { - s.ApproximateSecondsBeforeTimedOut = &v - return s -} - -// SetExecutionNumber sets the ExecutionNumber field's value. -func (s *JobExecution) SetExecutionNumber(v int64) *JobExecution { - s.ExecutionNumber = &v - return s -} - -// SetForceCanceled sets the ForceCanceled field's value. -func (s *JobExecution) SetForceCanceled(v bool) *JobExecution { - s.ForceCanceled = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *JobExecution) SetJobId(v string) *JobExecution { - s.JobId = &v - return s -} - -// SetLastUpdatedAt sets the LastUpdatedAt field's value. -func (s *JobExecution) SetLastUpdatedAt(v time.Time) *JobExecution { - s.LastUpdatedAt = &v - return s -} - -// SetQueuedAt sets the QueuedAt field's value. -func (s *JobExecution) SetQueuedAt(v time.Time) *JobExecution { - s.QueuedAt = &v - return s -} - -// SetStartedAt sets the StartedAt field's value. -func (s *JobExecution) SetStartedAt(v time.Time) *JobExecution { - s.StartedAt = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *JobExecution) SetStatus(v string) *JobExecution { - s.Status = &v - return s -} - -// SetStatusDetails sets the StatusDetails field's value. -func (s *JobExecution) SetStatusDetails(v *JobExecutionStatusDetails) *JobExecution { - s.StatusDetails = v - return s -} - -// SetThingArn sets the ThingArn field's value. -func (s *JobExecution) SetThingArn(v string) *JobExecution { - s.ThingArn = &v - return s -} - -// SetVersionNumber sets the VersionNumber field's value. -func (s *JobExecution) SetVersionNumber(v int64) *JobExecution { - s.VersionNumber = &v - return s -} - -// Details of the job execution status. -type JobExecutionStatusDetails struct { - _ struct{} `type:"structure"` - - // The job execution status. - DetailsMap map[string]*string `locationName:"detailsMap" type:"map"` -} - -// String returns the string representation -func (s JobExecutionStatusDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobExecutionStatusDetails) GoString() string { - return s.String() -} - -// SetDetailsMap sets the DetailsMap field's value. -func (s *JobExecutionStatusDetails) SetDetailsMap(v map[string]*string) *JobExecutionStatusDetails { - s.DetailsMap = v - return s -} - -// The job execution summary. -type JobExecutionSummary struct { - _ struct{} `type:"structure"` - - // A string (consisting of the digits "0" through "9") which identifies this - // particular job execution on this particular device. It can be used later - // in commands which return or update job execution information. - ExecutionNumber *int64 `locationName:"executionNumber" type:"long"` - - // The time, in milliseconds since the epoch, when the job execution was last - // updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` - - // The time, in milliseconds since the epoch, when the job execution was queued. - QueuedAt *time.Time `locationName:"queuedAt" type:"timestamp"` - - // The time, in milliseconds since the epoch, when the job execution started. - StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` - - // The status of the job execution. - Status *string `locationName:"status" type:"string" enum:"JobExecutionStatus"` -} - -// String returns the string representation -func (s JobExecutionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobExecutionSummary) GoString() string { - return s.String() -} - -// SetExecutionNumber sets the ExecutionNumber field's value. -func (s *JobExecutionSummary) SetExecutionNumber(v int64) *JobExecutionSummary { - s.ExecutionNumber = &v - return s -} - -// SetLastUpdatedAt sets the LastUpdatedAt field's value. -func (s *JobExecutionSummary) SetLastUpdatedAt(v time.Time) *JobExecutionSummary { - s.LastUpdatedAt = &v - return s -} - -// SetQueuedAt sets the QueuedAt field's value. -func (s *JobExecutionSummary) SetQueuedAt(v time.Time) *JobExecutionSummary { - s.QueuedAt = &v - return s -} - -// SetStartedAt sets the StartedAt field's value. -func (s *JobExecutionSummary) SetStartedAt(v time.Time) *JobExecutionSummary { - s.StartedAt = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *JobExecutionSummary) SetStatus(v string) *JobExecutionSummary { - s.Status = &v - return s -} - -// Contains a summary of information about job executions for a specific job. -type JobExecutionSummaryForJob struct { - _ struct{} `type:"structure"` - - // Contains a subset of information about a job execution. - JobExecutionSummary *JobExecutionSummary `locationName:"jobExecutionSummary" type:"structure"` - - // The ARN of the thing on which the job execution is running. - ThingArn *string `locationName:"thingArn" type:"string"` -} - -// String returns the string representation -func (s JobExecutionSummaryForJob) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobExecutionSummaryForJob) GoString() string { - return s.String() -} - -// SetJobExecutionSummary sets the JobExecutionSummary field's value. -func (s *JobExecutionSummaryForJob) SetJobExecutionSummary(v *JobExecutionSummary) *JobExecutionSummaryForJob { - s.JobExecutionSummary = v - return s -} - -// SetThingArn sets the ThingArn field's value. -func (s *JobExecutionSummaryForJob) SetThingArn(v string) *JobExecutionSummaryForJob { - s.ThingArn = &v - return s -} - -// The job execution summary for a thing. -type JobExecutionSummaryForThing struct { - _ struct{} `type:"structure"` - - // Contains a subset of information about a job execution. - JobExecutionSummary *JobExecutionSummary `locationName:"jobExecutionSummary" type:"structure"` - - // The unique identifier you assigned to this job when it was created. - JobId *string `locationName:"jobId" min:"1" type:"string"` -} - -// String returns the string representation -func (s JobExecutionSummaryForThing) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobExecutionSummaryForThing) GoString() string { - return s.String() -} - -// SetJobExecutionSummary sets the JobExecutionSummary field's value. -func (s *JobExecutionSummaryForThing) SetJobExecutionSummary(v *JobExecutionSummary) *JobExecutionSummaryForThing { - s.JobExecutionSummary = v - return s -} - -// SetJobId sets the JobId field's value. -func (s *JobExecutionSummaryForThing) SetJobId(v string) *JobExecutionSummaryForThing { - s.JobId = &v - return s -} - -// Allows you to create a staged rollout of a job. -type JobExecutionsRolloutConfig struct { - _ struct{} `type:"structure"` - - // The rate of increase for a job rollout. This parameter allows you to define - // an exponential rate for a job rollout. - ExponentialRate *ExponentialRolloutRate `locationName:"exponentialRate" type:"structure"` - - // The maximum number of things that will be notified of a pending job, per - // minute. This parameter allows you to create a staged rollout. - MaximumPerMinute *int64 `locationName:"maximumPerMinute" min:"1" type:"integer"` -} - -// String returns the string representation -func (s JobExecutionsRolloutConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobExecutionsRolloutConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *JobExecutionsRolloutConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "JobExecutionsRolloutConfig"} - if s.MaximumPerMinute != nil && *s.MaximumPerMinute < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaximumPerMinute", 1)) - } - if s.ExponentialRate != nil { - if err := s.ExponentialRate.Validate(); err != nil { - invalidParams.AddNested("ExponentialRate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExponentialRate sets the ExponentialRate field's value. -func (s *JobExecutionsRolloutConfig) SetExponentialRate(v *ExponentialRolloutRate) *JobExecutionsRolloutConfig { - s.ExponentialRate = v - return s -} - -// SetMaximumPerMinute sets the MaximumPerMinute field's value. -func (s *JobExecutionsRolloutConfig) SetMaximumPerMinute(v int64) *JobExecutionsRolloutConfig { - s.MaximumPerMinute = &v - return s -} - -// The job process details. -type JobProcessDetails struct { - _ struct{} `type:"structure"` - - // The number of things that cancelled the job. - NumberOfCanceledThings *int64 `locationName:"numberOfCanceledThings" type:"integer"` - - // The number of things that failed executing the job. - NumberOfFailedThings *int64 `locationName:"numberOfFailedThings" type:"integer"` - - // The number of things currently executing the job. - NumberOfInProgressThings *int64 `locationName:"numberOfInProgressThings" type:"integer"` - - // The number of things that are awaiting execution of the job. - NumberOfQueuedThings *int64 `locationName:"numberOfQueuedThings" type:"integer"` - - // The number of things that rejected the job. - NumberOfRejectedThings *int64 `locationName:"numberOfRejectedThings" type:"integer"` - - // The number of things that are no longer scheduled to execute the job because - // they have been deleted or have been removed from the group that was a target - // of the job. - NumberOfRemovedThings *int64 `locationName:"numberOfRemovedThings" type:"integer"` - - // The number of things which successfully completed the job. - NumberOfSucceededThings *int64 `locationName:"numberOfSucceededThings" type:"integer"` - - // The number of things whose job execution status is TIMED_OUT. - NumberOfTimedOutThings *int64 `locationName:"numberOfTimedOutThings" type:"integer"` - - // The target devices to which the job execution is being rolled out. This value - // will be null after the job execution has finished rolling out to all the - // target devices. - ProcessingTargets []*string `locationName:"processingTargets" type:"list"` -} - -// String returns the string representation -func (s JobProcessDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobProcessDetails) GoString() string { - return s.String() -} - -// SetNumberOfCanceledThings sets the NumberOfCanceledThings field's value. -func (s *JobProcessDetails) SetNumberOfCanceledThings(v int64) *JobProcessDetails { - s.NumberOfCanceledThings = &v - return s -} - -// SetNumberOfFailedThings sets the NumberOfFailedThings field's value. -func (s *JobProcessDetails) SetNumberOfFailedThings(v int64) *JobProcessDetails { - s.NumberOfFailedThings = &v - return s -} - -// SetNumberOfInProgressThings sets the NumberOfInProgressThings field's value. -func (s *JobProcessDetails) SetNumberOfInProgressThings(v int64) *JobProcessDetails { - s.NumberOfInProgressThings = &v - return s -} - -// SetNumberOfQueuedThings sets the NumberOfQueuedThings field's value. -func (s *JobProcessDetails) SetNumberOfQueuedThings(v int64) *JobProcessDetails { - s.NumberOfQueuedThings = &v - return s -} - -// SetNumberOfRejectedThings sets the NumberOfRejectedThings field's value. -func (s *JobProcessDetails) SetNumberOfRejectedThings(v int64) *JobProcessDetails { - s.NumberOfRejectedThings = &v - return s -} - -// SetNumberOfRemovedThings sets the NumberOfRemovedThings field's value. -func (s *JobProcessDetails) SetNumberOfRemovedThings(v int64) *JobProcessDetails { - s.NumberOfRemovedThings = &v - return s -} - -// SetNumberOfSucceededThings sets the NumberOfSucceededThings field's value. -func (s *JobProcessDetails) SetNumberOfSucceededThings(v int64) *JobProcessDetails { - s.NumberOfSucceededThings = &v - return s -} - -// SetNumberOfTimedOutThings sets the NumberOfTimedOutThings field's value. -func (s *JobProcessDetails) SetNumberOfTimedOutThings(v int64) *JobProcessDetails { - s.NumberOfTimedOutThings = &v - return s -} - -// SetProcessingTargets sets the ProcessingTargets field's value. -func (s *JobProcessDetails) SetProcessingTargets(v []*string) *JobProcessDetails { - s.ProcessingTargets = v - return s -} - -// The job summary. -type JobSummary struct { - _ struct{} `type:"structure"` - - // The time, in milliseconds since the epoch, when the job completed. - CompletedAt *time.Time `locationName:"completedAt" type:"timestamp"` - - // The time, in milliseconds since the epoch, when the job was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The job ARN. - JobArn *string `locationName:"jobArn" type:"string"` - - // The unique identifier you assigned to this job when it was created. - JobId *string `locationName:"jobId" min:"1" type:"string"` - - // The time, in milliseconds since the epoch, when the job was last updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` - - // The job summary status. - Status *string `locationName:"status" type:"string" enum:"JobStatus"` - - // Specifies whether the job will continue to run (CONTINUOUS), or will be complete - // after all those things specified as targets have completed the job (SNAPSHOT). - // If continuous, the job may also be run on a thing when a change is detected - // in a target. For example, a job will run on a thing when the thing is added - // to a target group, even after the job was completed by all things originally - // in the group. - TargetSelection *string `locationName:"targetSelection" type:"string" enum:"TargetSelection"` - - // The ID of the thing group. - ThingGroupId *string `locationName:"thingGroupId" min:"1" type:"string"` -} - -// String returns the string representation -func (s JobSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobSummary) GoString() string { - return s.String() -} - -// SetCompletedAt sets the CompletedAt field's value. -func (s *JobSummary) SetCompletedAt(v time.Time) *JobSummary { - s.CompletedAt = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *JobSummary) SetCreatedAt(v time.Time) *JobSummary { - s.CreatedAt = &v - return s -} - -// SetJobArn sets the JobArn field's value. -func (s *JobSummary) SetJobArn(v string) *JobSummary { - s.JobArn = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *JobSummary) SetJobId(v string) *JobSummary { - s.JobId = &v - return s -} - -// SetLastUpdatedAt sets the LastUpdatedAt field's value. -func (s *JobSummary) SetLastUpdatedAt(v time.Time) *JobSummary { - s.LastUpdatedAt = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *JobSummary) SetStatus(v string) *JobSummary { - s.Status = &v - return s -} - -// SetTargetSelection sets the TargetSelection field's value. -func (s *JobSummary) SetTargetSelection(v string) *JobSummary { - s.TargetSelection = &v - return s -} - -// SetThingGroupId sets the ThingGroupId field's value. -func (s *JobSummary) SetThingGroupId(v string) *JobSummary { - s.ThingGroupId = &v - return s -} - -// Describes a key pair. -type KeyPair struct { - _ struct{} `type:"structure"` - - // The private key. - PrivateKey *string `min:"1" type:"string" sensitive:"true"` - - // The public key. - PublicKey *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s KeyPair) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KeyPair) GoString() string { - return s.String() -} - -// SetPrivateKey sets the PrivateKey field's value. -func (s *KeyPair) SetPrivateKey(v string) *KeyPair { - s.PrivateKey = &v - return s -} - -// SetPublicKey sets the PublicKey field's value. -func (s *KeyPair) SetPublicKey(v string) *KeyPair { - s.PublicKey = &v - return s -} - -// Describes an action to write data to an Amazon Kinesis stream. -type KinesisAction struct { - _ struct{} `type:"structure"` - - // The partition key. - PartitionKey *string `locationName:"partitionKey" type:"string"` - - // The ARN of the IAM role that grants access to the Amazon Kinesis stream. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` - - // The name of the Amazon Kinesis stream. - // - // StreamName is a required field - StreamName *string `locationName:"streamName" type:"string" required:"true"` -} - -// String returns the string representation -func (s KinesisAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KinesisAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KinesisAction"} - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPartitionKey sets the PartitionKey field's value. -func (s *KinesisAction) SetPartitionKey(v string) *KinesisAction { - s.PartitionKey = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *KinesisAction) SetRoleArn(v string) *KinesisAction { - s.RoleArn = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *KinesisAction) SetStreamName(v string) *KinesisAction { - s.StreamName = &v - return s -} - -// Describes an action to invoke a Lambda function. -type LambdaAction struct { - _ struct{} `type:"structure"` - - // The ARN of the Lambda function. - // - // FunctionArn is a required field - FunctionArn *string `locationName:"functionArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s LambdaAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LambdaAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LambdaAction"} - if s.FunctionArn == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionArn sets the FunctionArn field's value. -func (s *LambdaAction) SetFunctionArn(v string) *LambdaAction { - s.FunctionArn = &v - return s -} - -type ListActiveViolationsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token for the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The name of the Device Defender security profile for which violations are - // listed. - SecurityProfileName *string `location:"querystring" locationName:"securityProfileName" min:"1" type:"string"` - - // The name of the thing whose active violations are listed. - ThingName *string `location:"querystring" locationName:"thingName" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListActiveViolationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListActiveViolationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListActiveViolationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListActiveViolationsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) - } - if s.ThingName != nil && len(*s.ThingName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListActiveViolationsInput) SetMaxResults(v int64) *ListActiveViolationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListActiveViolationsInput) SetNextToken(v string) *ListActiveViolationsInput { - s.NextToken = &v - return s -} - -// SetSecurityProfileName sets the SecurityProfileName field's value. -func (s *ListActiveViolationsInput) SetSecurityProfileName(v string) *ListActiveViolationsInput { - s.SecurityProfileName = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *ListActiveViolationsInput) SetThingName(v string) *ListActiveViolationsInput { - s.ThingName = &v - return s -} - -type ListActiveViolationsOutput struct { - _ struct{} `type:"structure"` - - // The list of active violations. - ActiveViolations []*ActiveViolation `locationName:"activeViolations" type:"list"` - - // A token that can be used to retrieve the next set of results, or null if - // there are no additional results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListActiveViolationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListActiveViolationsOutput) GoString() string { - return s.String() -} - -// SetActiveViolations sets the ActiveViolations field's value. -func (s *ListActiveViolationsOutput) SetActiveViolations(v []*ActiveViolation) *ListActiveViolationsOutput { - s.ActiveViolations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListActiveViolationsOutput) SetNextToken(v string) *ListActiveViolationsOutput { - s.NextToken = &v - return s -} - -type ListAttachedPoliciesInput struct { - _ struct{} `type:"structure"` - - // The token to retrieve the next set of results. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The maximum number of results to be returned per request. - PageSize *int64 `location:"querystring" locationName:"pageSize" min:"1" type:"integer"` - - // When true, recursively list attached policies. - Recursive *bool `location:"querystring" locationName:"recursive" type:"boolean"` - - // The group for which the policies will be listed. - // - // Target is a required field - Target *string `location:"uri" locationName:"target" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListAttachedPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAttachedPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAttachedPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAttachedPoliciesInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - if s.Target == nil { - invalidParams.Add(request.NewErrParamRequired("Target")) - } - if s.Target != nil && len(*s.Target) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Target", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListAttachedPoliciesInput) SetMarker(v string) *ListAttachedPoliciesInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListAttachedPoliciesInput) SetPageSize(v int64) *ListAttachedPoliciesInput { - s.PageSize = &v - return s -} - -// SetRecursive sets the Recursive field's value. -func (s *ListAttachedPoliciesInput) SetRecursive(v bool) *ListAttachedPoliciesInput { - s.Recursive = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *ListAttachedPoliciesInput) SetTarget(v string) *ListAttachedPoliciesInput { - s.Target = &v - return s -} - -type ListAttachedPoliciesOutput struct { - _ struct{} `type:"structure"` - - // The token to retrieve the next set of results, or ``null`` if there are no - // more results. - NextMarker *string `locationName:"nextMarker" type:"string"` - - // The policies. - Policies []*Policy `locationName:"policies" type:"list"` -} - -// String returns the string representation -func (s ListAttachedPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAttachedPoliciesOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListAttachedPoliciesOutput) SetNextMarker(v string) *ListAttachedPoliciesOutput { - s.NextMarker = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *ListAttachedPoliciesOutput) SetPolicies(v []*Policy) *ListAttachedPoliciesOutput { - s.Policies = v - return s -} - -type ListAuditFindingsInput struct { - _ struct{} `type:"structure"` - - // A filter to limit results to the findings for the specified audit check. - CheckName *string `locationName:"checkName" type:"string"` - - // A filter to limit results to those found before the specified time. You must - // specify either the startTime and endTime or the taskId, but not both. - EndTime *time.Time `locationName:"endTime" type:"timestamp"` - - // The maximum number of results to return at one time. The default is 25. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // The token for the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information identifying the non-compliant resource. - ResourceIdentifier *ResourceIdentifier `locationName:"resourceIdentifier" type:"structure"` - - // A filter to limit results to those found after the specified time. You must - // specify either the startTime and endTime or the taskId, but not both. - StartTime *time.Time `locationName:"startTime" type:"timestamp"` - - // A filter to limit results to the audit with the specified ID. You must specify - // either the taskId or the startTime and endTime, but not both. - TaskId *string `locationName:"taskId" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListAuditFindingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAuditFindingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAuditFindingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAuditFindingsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.TaskId != nil && len(*s.TaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) - } - if s.ResourceIdentifier != nil { - if err := s.ResourceIdentifier.Validate(); err != nil { - invalidParams.AddNested("ResourceIdentifier", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCheckName sets the CheckName field's value. -func (s *ListAuditFindingsInput) SetCheckName(v string) *ListAuditFindingsInput { - s.CheckName = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *ListAuditFindingsInput) SetEndTime(v time.Time) *ListAuditFindingsInput { - s.EndTime = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAuditFindingsInput) SetMaxResults(v int64) *ListAuditFindingsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAuditFindingsInput) SetNextToken(v string) *ListAuditFindingsInput { - s.NextToken = &v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *ListAuditFindingsInput) SetResourceIdentifier(v *ResourceIdentifier) *ListAuditFindingsInput { - s.ResourceIdentifier = v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *ListAuditFindingsInput) SetStartTime(v time.Time) *ListAuditFindingsInput { - s.StartTime = &v - return s -} - -// SetTaskId sets the TaskId field's value. -func (s *ListAuditFindingsInput) SetTaskId(v string) *ListAuditFindingsInput { - s.TaskId = &v - return s -} - -type ListAuditFindingsOutput struct { - _ struct{} `type:"structure"` - - // The findings (results) of the audit. - Findings []*AuditFinding `locationName:"findings" type:"list"` - - // A token that can be used to retrieve the next set of results, or null if - // there are no additional results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListAuditFindingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAuditFindingsOutput) GoString() string { - return s.String() -} - -// SetFindings sets the Findings field's value. -func (s *ListAuditFindingsOutput) SetFindings(v []*AuditFinding) *ListAuditFindingsOutput { - s.Findings = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAuditFindingsOutput) SetNextToken(v string) *ListAuditFindingsOutput { - s.NextToken = &v - return s -} - -type ListAuditTasksInput struct { - _ struct{} `type:"structure"` - - // The end of the time period. - // - // EndTime is a required field - EndTime *time.Time `location:"querystring" locationName:"endTime" type:"timestamp" required:"true"` - - // The maximum number of results to return at one time. The default is 25. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token for the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The beginning of the time period. Note that audit information is retained - // for a limited time (180 days). Requesting a start time prior to what is retained - // results in an "InvalidRequestException". - // - // StartTime is a required field - StartTime *time.Time `location:"querystring" locationName:"startTime" type:"timestamp" required:"true"` - - // A filter to limit the output to audits with the specified completion status: - // can be one of "IN_PROGRESS", "COMPLETED", "FAILED" or "CANCELED". - TaskStatus *string `location:"querystring" locationName:"taskStatus" type:"string" enum:"AuditTaskStatus"` - - // A filter to limit the output to the specified type of audit: can be one of - // "ON_DEMAND_AUDIT_TASK" or "SCHEDULED__AUDIT_TASK". - TaskType *string `location:"querystring" locationName:"taskType" type:"string" enum:"AuditTaskType"` -} - -// String returns the string representation -func (s ListAuditTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAuditTasksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAuditTasksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAuditTasksInput"} - if s.EndTime == nil { - invalidParams.Add(request.NewErrParamRequired("EndTime")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndTime sets the EndTime field's value. -func (s *ListAuditTasksInput) SetEndTime(v time.Time) *ListAuditTasksInput { - s.EndTime = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAuditTasksInput) SetMaxResults(v int64) *ListAuditTasksInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAuditTasksInput) SetNextToken(v string) *ListAuditTasksInput { - s.NextToken = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *ListAuditTasksInput) SetStartTime(v time.Time) *ListAuditTasksInput { - s.StartTime = &v - return s -} - -// SetTaskStatus sets the TaskStatus field's value. -func (s *ListAuditTasksInput) SetTaskStatus(v string) *ListAuditTasksInput { - s.TaskStatus = &v - return s -} - -// SetTaskType sets the TaskType field's value. -func (s *ListAuditTasksInput) SetTaskType(v string) *ListAuditTasksInput { - s.TaskType = &v - return s -} - -type ListAuditTasksOutput struct { - _ struct{} `type:"structure"` - - // A token that can be used to retrieve the next set of results, or null if - // there are no additional results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The audits that were performed during the specified time period. - Tasks []*AuditTaskMetadata `locationName:"tasks" type:"list"` -} - -// String returns the string representation -func (s ListAuditTasksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAuditTasksOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAuditTasksOutput) SetNextToken(v string) *ListAuditTasksOutput { - s.NextToken = &v - return s -} - -// SetTasks sets the Tasks field's value. -func (s *ListAuditTasksOutput) SetTasks(v []*AuditTaskMetadata) *ListAuditTasksOutput { - s.Tasks = v - return s -} - -type ListAuthorizersInput struct { - _ struct{} `type:"structure"` - - // Return the list of authorizers in ascending alphabetical order. - AscendingOrder *bool `location:"querystring" locationName:"isAscendingOrder" type:"boolean"` - - // A marker used to get the next set of results. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The maximum number of results to return at one time. - PageSize *int64 `location:"querystring" locationName:"pageSize" min:"1" type:"integer"` - - // The status of the list authorizers request. - Status *string `location:"querystring" locationName:"status" type:"string" enum:"AuthorizerStatus"` -} - -// String returns the string representation -func (s ListAuthorizersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAuthorizersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAuthorizersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAuthorizersInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAscendingOrder sets the AscendingOrder field's value. -func (s *ListAuthorizersInput) SetAscendingOrder(v bool) *ListAuthorizersInput { - s.AscendingOrder = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAuthorizersInput) SetMarker(v string) *ListAuthorizersInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListAuthorizersInput) SetPageSize(v int64) *ListAuthorizersInput { - s.PageSize = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ListAuthorizersInput) SetStatus(v string) *ListAuthorizersInput { - s.Status = &v - return s -} - -type ListAuthorizersOutput struct { - _ struct{} `type:"structure"` - - // The authorizers. - Authorizers []*AuthorizerSummary `locationName:"authorizers" type:"list"` - - // A marker used to get the next set of results. - NextMarker *string `locationName:"nextMarker" type:"string"` -} - -// String returns the string representation -func (s ListAuthorizersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAuthorizersOutput) GoString() string { - return s.String() -} - -// SetAuthorizers sets the Authorizers field's value. -func (s *ListAuthorizersOutput) SetAuthorizers(v []*AuthorizerSummary) *ListAuthorizersOutput { - s.Authorizers = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListAuthorizersOutput) SetNextMarker(v string) *ListAuthorizersOutput { - s.NextMarker = &v - return s -} - -type ListBillingGroupsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return per request. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // Limit the results to billing groups whose names have the given prefix. - NamePrefixFilter *string `location:"querystring" locationName:"namePrefixFilter" min:"1" type:"string"` - - // The token to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListBillingGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBillingGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBillingGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBillingGroupsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NamePrefixFilter != nil && len(*s.NamePrefixFilter) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NamePrefixFilter", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListBillingGroupsInput) SetMaxResults(v int64) *ListBillingGroupsInput { - s.MaxResults = &v - return s -} - -// SetNamePrefixFilter sets the NamePrefixFilter field's value. -func (s *ListBillingGroupsInput) SetNamePrefixFilter(v string) *ListBillingGroupsInput { - s.NamePrefixFilter = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBillingGroupsInput) SetNextToken(v string) *ListBillingGroupsInput { - s.NextToken = &v - return s -} - -type ListBillingGroupsOutput struct { - _ struct{} `type:"structure"` - - // The list of billing groups. - BillingGroups []*GroupNameAndArn `locationName:"billingGroups" type:"list"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListBillingGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBillingGroupsOutput) GoString() string { - return s.String() -} - -// SetBillingGroups sets the BillingGroups field's value. -func (s *ListBillingGroupsOutput) SetBillingGroups(v []*GroupNameAndArn) *ListBillingGroupsOutput { - s.BillingGroups = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBillingGroupsOutput) SetNextToken(v string) *ListBillingGroupsOutput { - s.NextToken = &v - return s -} - -// Input for the ListCACertificates operation. -type ListCACertificatesInput struct { - _ struct{} `type:"structure"` - - // Determines the order of the results. - AscendingOrder *bool `location:"querystring" locationName:"isAscendingOrder" type:"boolean"` - - // The marker for the next set of results. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The result page size. - PageSize *int64 `location:"querystring" locationName:"pageSize" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListCACertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCACertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListCACertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListCACertificatesInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAscendingOrder sets the AscendingOrder field's value. -func (s *ListCACertificatesInput) SetAscendingOrder(v bool) *ListCACertificatesInput { - s.AscendingOrder = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListCACertificatesInput) SetMarker(v string) *ListCACertificatesInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListCACertificatesInput) SetPageSize(v int64) *ListCACertificatesInput { - s.PageSize = &v - return s -} - -// The output from the ListCACertificates operation. -type ListCACertificatesOutput struct { - _ struct{} `type:"structure"` - - // The CA certificates registered in your AWS account. - Certificates []*CACertificate `locationName:"certificates" type:"list"` - - // The current position within the list of CA certificates. - NextMarker *string `locationName:"nextMarker" type:"string"` -} - -// String returns the string representation -func (s ListCACertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCACertificatesOutput) GoString() string { - return s.String() -} - -// SetCertificates sets the Certificates field's value. -func (s *ListCACertificatesOutput) SetCertificates(v []*CACertificate) *ListCACertificatesOutput { - s.Certificates = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListCACertificatesOutput) SetNextMarker(v string) *ListCACertificatesOutput { - s.NextMarker = &v - return s -} - -// The input to the ListCertificatesByCA operation. -type ListCertificatesByCAInput struct { - _ struct{} `type:"structure"` - - // Specifies the order for results. If True, the results are returned in ascending - // order, based on the creation date. - AscendingOrder *bool `location:"querystring" locationName:"isAscendingOrder" type:"boolean"` - - // The ID of the CA certificate. This operation will list all registered device - // certificate that were signed by this CA certificate. - // - // CaCertificateId is a required field - CaCertificateId *string `location:"uri" locationName:"caCertificateId" min:"64" type:"string" required:"true"` - - // The marker for the next set of results. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The result page size. - PageSize *int64 `location:"querystring" locationName:"pageSize" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListCertificatesByCAInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCertificatesByCAInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListCertificatesByCAInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListCertificatesByCAInput"} - if s.CaCertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CaCertificateId")) - } - if s.CaCertificateId != nil && len(*s.CaCertificateId) < 64 { - invalidParams.Add(request.NewErrParamMinLen("CaCertificateId", 64)) - } - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAscendingOrder sets the AscendingOrder field's value. -func (s *ListCertificatesByCAInput) SetAscendingOrder(v bool) *ListCertificatesByCAInput { - s.AscendingOrder = &v - return s -} - -// SetCaCertificateId sets the CaCertificateId field's value. -func (s *ListCertificatesByCAInput) SetCaCertificateId(v string) *ListCertificatesByCAInput { - s.CaCertificateId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListCertificatesByCAInput) SetMarker(v string) *ListCertificatesByCAInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListCertificatesByCAInput) SetPageSize(v int64) *ListCertificatesByCAInput { - s.PageSize = &v - return s -} - -// The output of the ListCertificatesByCA operation. -type ListCertificatesByCAOutput struct { - _ struct{} `type:"structure"` - - // The device certificates signed by the specified CA certificate. - Certificates []*Certificate `locationName:"certificates" type:"list"` - - // The marker for the next set of results, or null if there are no additional - // results. - NextMarker *string `locationName:"nextMarker" type:"string"` -} - -// String returns the string representation -func (s ListCertificatesByCAOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCertificatesByCAOutput) GoString() string { - return s.String() -} - -// SetCertificates sets the Certificates field's value. -func (s *ListCertificatesByCAOutput) SetCertificates(v []*Certificate) *ListCertificatesByCAOutput { - s.Certificates = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListCertificatesByCAOutput) SetNextMarker(v string) *ListCertificatesByCAOutput { - s.NextMarker = &v - return s -} - -// The input for the ListCertificates operation. -type ListCertificatesInput struct { - _ struct{} `type:"structure"` - - // Specifies the order for results. If True, the results are returned in ascending - // order, based on the creation date. - AscendingOrder *bool `location:"querystring" locationName:"isAscendingOrder" type:"boolean"` - - // The marker for the next set of results. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The result page size. - PageSize *int64 `location:"querystring" locationName:"pageSize" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListCertificatesInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAscendingOrder sets the AscendingOrder field's value. -func (s *ListCertificatesInput) SetAscendingOrder(v bool) *ListCertificatesInput { - s.AscendingOrder = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListCertificatesInput) SetMarker(v string) *ListCertificatesInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListCertificatesInput) SetPageSize(v int64) *ListCertificatesInput { - s.PageSize = &v - return s -} - -// The output of the ListCertificates operation. -type ListCertificatesOutput struct { - _ struct{} `type:"structure"` - - // The descriptions of the certificates. - Certificates []*Certificate `locationName:"certificates" type:"list"` - - // The marker for the next set of results, or null if there are no additional - // results. - NextMarker *string `locationName:"nextMarker" type:"string"` -} - -// String returns the string representation -func (s ListCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCertificatesOutput) GoString() string { - return s.String() -} - -// SetCertificates sets the Certificates field's value. -func (s *ListCertificatesOutput) SetCertificates(v []*Certificate) *ListCertificatesOutput { - s.Certificates = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListCertificatesOutput) SetNextMarker(v string) *ListCertificatesOutput { - s.NextMarker = &v - return s -} - -type ListIndicesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListIndicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIndicesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListIndicesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListIndicesInput"} - 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 *ListIndicesInput) SetMaxResults(v int64) *ListIndicesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListIndicesInput) SetNextToken(v string) *ListIndicesInput { - s.NextToken = &v - return s -} - -type ListIndicesOutput struct { - _ struct{} `type:"structure"` - - // The index names. - IndexNames []*string `locationName:"indexNames" type:"list"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListIndicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIndicesOutput) GoString() string { - return s.String() -} - -// SetIndexNames sets the IndexNames field's value. -func (s *ListIndicesOutput) SetIndexNames(v []*string) *ListIndicesOutput { - s.IndexNames = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListIndicesOutput) SetNextToken(v string) *ListIndicesOutput { - s.NextToken = &v - return s -} - -type ListJobExecutionsForJobInput struct { - _ struct{} `type:"structure"` - - // The unique identifier you assigned to this job when it was created. - // - // JobId is a required field - JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` - - // The maximum number of results to be returned per request. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The status of the job. - Status *string `location:"querystring" locationName:"status" type:"string" enum:"JobExecutionStatus"` -} - -// String returns the string representation -func (s ListJobExecutionsForJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobExecutionsForJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListJobExecutionsForJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListJobExecutionsForJobInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobId sets the JobId field's value. -func (s *ListJobExecutionsForJobInput) SetJobId(v string) *ListJobExecutionsForJobInput { - s.JobId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListJobExecutionsForJobInput) SetMaxResults(v int64) *ListJobExecutionsForJobInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListJobExecutionsForJobInput) SetNextToken(v string) *ListJobExecutionsForJobInput { - s.NextToken = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ListJobExecutionsForJobInput) SetStatus(v string) *ListJobExecutionsForJobInput { - s.Status = &v - return s -} - -type ListJobExecutionsForJobOutput struct { - _ struct{} `type:"structure"` - - // A list of job execution summaries. - ExecutionSummaries []*JobExecutionSummaryForJob `locationName:"executionSummaries" type:"list"` - - // The token for the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListJobExecutionsForJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobExecutionsForJobOutput) GoString() string { - return s.String() -} - -// SetExecutionSummaries sets the ExecutionSummaries field's value. -func (s *ListJobExecutionsForJobOutput) SetExecutionSummaries(v []*JobExecutionSummaryForJob) *ListJobExecutionsForJobOutput { - s.ExecutionSummaries = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListJobExecutionsForJobOutput) SetNextToken(v string) *ListJobExecutionsForJobOutput { - s.NextToken = &v - return s -} - -type ListJobExecutionsForThingInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to be returned per request. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // An optional filter that lets you search for jobs that have the specified - // status. - Status *string `location:"querystring" locationName:"status" type:"string" enum:"JobExecutionStatus"` - - // The thing name. - // - // ThingName is a required field - ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListJobExecutionsForThingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobExecutionsForThingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListJobExecutionsForThingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListJobExecutionsForThingInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - 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 -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListJobExecutionsForThingInput) SetMaxResults(v int64) *ListJobExecutionsForThingInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListJobExecutionsForThingInput) SetNextToken(v string) *ListJobExecutionsForThingInput { - s.NextToken = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ListJobExecutionsForThingInput) SetStatus(v string) *ListJobExecutionsForThingInput { - s.Status = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *ListJobExecutionsForThingInput) SetThingName(v string) *ListJobExecutionsForThingInput { - s.ThingName = &v - return s -} - -type ListJobExecutionsForThingOutput struct { - _ struct{} `type:"structure"` - - // A list of job execution summaries. - ExecutionSummaries []*JobExecutionSummaryForThing `locationName:"executionSummaries" type:"list"` - - // The token for the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListJobExecutionsForThingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobExecutionsForThingOutput) GoString() string { - return s.String() -} - -// SetExecutionSummaries sets the ExecutionSummaries field's value. -func (s *ListJobExecutionsForThingOutput) SetExecutionSummaries(v []*JobExecutionSummaryForThing) *ListJobExecutionsForThingOutput { - s.ExecutionSummaries = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListJobExecutionsForThingOutput) SetNextToken(v string) *ListJobExecutionsForThingOutput { - s.NextToken = &v - return s -} - -type ListJobsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return per request. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // An optional filter that lets you search for jobs that have the specified - // status. - Status *string `location:"querystring" locationName:"status" type:"string" enum:"JobStatus"` - - // Specifies whether the job will continue to run (CONTINUOUS), or will be complete - // after all those things specified as targets have completed the job (SNAPSHOT). - // If continuous, the job may also be run on a thing when a change is detected - // in a target. For example, a job will run on a thing when the thing is added - // to a target group, even after the job was completed by all things originally - // in the group. - TargetSelection *string `location:"querystring" locationName:"targetSelection" type:"string" enum:"TargetSelection"` - - // A filter that limits the returned jobs to those for the specified group. - ThingGroupId *string `location:"querystring" locationName:"thingGroupId" min:"1" type:"string"` - - // A filter that limits the returned jobs to those for the specified group. - ThingGroupName *string `location:"querystring" locationName:"thingGroupName" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListJobsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ThingGroupId != nil && len(*s.ThingGroupId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingGroupId", 1)) - } - if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListJobsInput) SetMaxResults(v int64) *ListJobsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListJobsInput) SetNextToken(v string) *ListJobsInput { - s.NextToken = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ListJobsInput) SetStatus(v string) *ListJobsInput { - s.Status = &v - return s -} - -// SetTargetSelection sets the TargetSelection field's value. -func (s *ListJobsInput) SetTargetSelection(v string) *ListJobsInput { - s.TargetSelection = &v - return s -} - -// SetThingGroupId sets the ThingGroupId field's value. -func (s *ListJobsInput) SetThingGroupId(v string) *ListJobsInput { - s.ThingGroupId = &v - return s -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *ListJobsInput) SetThingGroupName(v string) *ListJobsInput { - s.ThingGroupName = &v - return s -} - -type ListJobsOutput struct { - _ struct{} `type:"structure"` - - // A list of jobs. - Jobs []*JobSummary `locationName:"jobs" type:"list"` - - // The token for the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobsOutput) GoString() string { - return s.String() -} - -// SetJobs sets the Jobs field's value. -func (s *ListJobsOutput) SetJobs(v []*JobSummary) *ListJobsOutput { - s.Jobs = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListJobsOutput) SetNextToken(v string) *ListJobsOutput { - s.NextToken = &v - return s -} - -type ListOTAUpdatesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // A token used to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The OTA update job status. - OtaUpdateStatus *string `location:"querystring" locationName:"otaUpdateStatus" type:"string" enum:"OTAUpdateStatus"` -} - -// String returns the string representation -func (s ListOTAUpdatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOTAUpdatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListOTAUpdatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOTAUpdatesInput"} - 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 *ListOTAUpdatesInput) SetMaxResults(v int64) *ListOTAUpdatesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOTAUpdatesInput) SetNextToken(v string) *ListOTAUpdatesInput { - s.NextToken = &v - return s -} - -// SetOtaUpdateStatus sets the OtaUpdateStatus field's value. -func (s *ListOTAUpdatesInput) SetOtaUpdateStatus(v string) *ListOTAUpdatesInput { - s.OtaUpdateStatus = &v - return s -} - -type ListOTAUpdatesOutput struct { - _ struct{} `type:"structure"` - - // A token to use to get the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of OTA update jobs. - OtaUpdates []*OTAUpdateSummary `locationName:"otaUpdates" type:"list"` -} - -// String returns the string representation -func (s ListOTAUpdatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOTAUpdatesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOTAUpdatesOutput) SetNextToken(v string) *ListOTAUpdatesOutput { - s.NextToken = &v - return s -} - -// SetOtaUpdates sets the OtaUpdates field's value. -func (s *ListOTAUpdatesOutput) SetOtaUpdates(v []*OTAUpdateSummary) *ListOTAUpdatesOutput { - s.OtaUpdates = v - return s -} - -// The input to the ListOutgoingCertificates operation. -type ListOutgoingCertificatesInput struct { - _ struct{} `type:"structure"` - - // Specifies the order for results. If True, the results are returned in ascending - // order, based on the creation date. - AscendingOrder *bool `location:"querystring" locationName:"isAscendingOrder" type:"boolean"` - - // The marker for the next set of results. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The result page size. - PageSize *int64 `location:"querystring" locationName:"pageSize" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListOutgoingCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOutgoingCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListOutgoingCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOutgoingCertificatesInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAscendingOrder sets the AscendingOrder field's value. -func (s *ListOutgoingCertificatesInput) SetAscendingOrder(v bool) *ListOutgoingCertificatesInput { - s.AscendingOrder = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListOutgoingCertificatesInput) SetMarker(v string) *ListOutgoingCertificatesInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListOutgoingCertificatesInput) SetPageSize(v int64) *ListOutgoingCertificatesInput { - s.PageSize = &v - return s -} - -// The output from the ListOutgoingCertificates operation. -type ListOutgoingCertificatesOutput struct { - _ struct{} `type:"structure"` - - // The marker for the next set of results. - NextMarker *string `locationName:"nextMarker" type:"string"` - - // The certificates that are being transferred but not yet accepted. - OutgoingCertificates []*OutgoingCertificate `locationName:"outgoingCertificates" type:"list"` -} - -// String returns the string representation -func (s ListOutgoingCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOutgoingCertificatesOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListOutgoingCertificatesOutput) SetNextMarker(v string) *ListOutgoingCertificatesOutput { - s.NextMarker = &v - return s -} - -// SetOutgoingCertificates sets the OutgoingCertificates field's value. -func (s *ListOutgoingCertificatesOutput) SetOutgoingCertificates(v []*OutgoingCertificate) *ListOutgoingCertificatesOutput { - s.OutgoingCertificates = v - return s -} - -// The input for the ListPolicies operation. -type ListPoliciesInput struct { - _ struct{} `type:"structure"` - - // Specifies the order for results. If true, the results are returned in ascending - // creation order. - AscendingOrder *bool `location:"querystring" locationName:"isAscendingOrder" type:"boolean"` - - // The marker for the next set of results. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The result page size. - PageSize *int64 `location:"querystring" locationName:"pageSize" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPoliciesInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAscendingOrder sets the AscendingOrder field's value. -func (s *ListPoliciesInput) SetAscendingOrder(v bool) *ListPoliciesInput { - s.AscendingOrder = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPoliciesInput) SetMarker(v string) *ListPoliciesInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListPoliciesInput) SetPageSize(v int64) *ListPoliciesInput { - s.PageSize = &v - return s -} - -// The output from the ListPolicies operation. -type ListPoliciesOutput struct { - _ struct{} `type:"structure"` - - // The marker for the next set of results, or null if there are no additional - // results. - NextMarker *string `locationName:"nextMarker" type:"string"` - - // The descriptions of the policies. - Policies []*Policy `locationName:"policies" type:"list"` -} - -// String returns the string representation -func (s ListPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPoliciesOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListPoliciesOutput) SetNextMarker(v string) *ListPoliciesOutput { - s.NextMarker = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *ListPoliciesOutput) SetPolicies(v []*Policy) *ListPoliciesOutput { - s.Policies = v - return s -} - -// The input for the ListPolicyPrincipals operation. -type ListPolicyPrincipalsInput struct { - _ struct{} `type:"structure"` - - // Specifies the order for results. If true, the results are returned in ascending - // creation order. - AscendingOrder *bool `location:"querystring" locationName:"isAscendingOrder" type:"boolean"` - - // The marker for the next set of results. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The result page size. - PageSize *int64 `location:"querystring" locationName:"pageSize" min:"1" type:"integer"` - - // The policy name. - // - // PolicyName is a required field - PolicyName *string `location:"header" locationName:"x-amzn-iot-policy" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListPolicyPrincipalsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPolicyPrincipalsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPolicyPrincipalsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPolicyPrincipalsInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAscendingOrder sets the AscendingOrder field's value. -func (s *ListPolicyPrincipalsInput) SetAscendingOrder(v bool) *ListPolicyPrincipalsInput { - s.AscendingOrder = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPolicyPrincipalsInput) SetMarker(v string) *ListPolicyPrincipalsInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListPolicyPrincipalsInput) SetPageSize(v int64) *ListPolicyPrincipalsInput { - s.PageSize = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *ListPolicyPrincipalsInput) SetPolicyName(v string) *ListPolicyPrincipalsInput { - s.PolicyName = &v - return s -} - -// The output from the ListPolicyPrincipals operation. -type ListPolicyPrincipalsOutput struct { - _ struct{} `type:"structure"` - - // The marker for the next set of results, or null if there are no additional - // results. - NextMarker *string `locationName:"nextMarker" type:"string"` - - // The descriptions of the principals. - Principals []*string `locationName:"principals" type:"list"` -} - -// String returns the string representation -func (s ListPolicyPrincipalsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPolicyPrincipalsOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListPolicyPrincipalsOutput) SetNextMarker(v string) *ListPolicyPrincipalsOutput { - s.NextMarker = &v - return s -} - -// SetPrincipals sets the Principals field's value. -func (s *ListPolicyPrincipalsOutput) SetPrincipals(v []*string) *ListPolicyPrincipalsOutput { - s.Principals = v - return s -} - -// The input for the ListPolicyVersions operation. -type ListPolicyVersionsInput struct { - _ struct{} `type:"structure"` - - // The policy name. - // - // PolicyName is a required field - PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListPolicyVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPolicyVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPolicyVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPolicyVersionsInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *ListPolicyVersionsInput) SetPolicyName(v string) *ListPolicyVersionsInput { - s.PolicyName = &v - return s -} - -// The output from the ListPolicyVersions operation. -type ListPolicyVersionsOutput struct { - _ struct{} `type:"structure"` - - // The policy versions. - PolicyVersions []*PolicyVersion `locationName:"policyVersions" type:"list"` -} - -// String returns the string representation -func (s ListPolicyVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPolicyVersionsOutput) GoString() string { - return s.String() -} - -// SetPolicyVersions sets the PolicyVersions field's value. -func (s *ListPolicyVersionsOutput) SetPolicyVersions(v []*PolicyVersion) *ListPolicyVersionsOutput { - s.PolicyVersions = v - return s -} - -// The input for the ListPrincipalPolicies operation. -type ListPrincipalPoliciesInput struct { - _ struct{} `type:"structure"` - - // Specifies the order for results. If true, results are returned in ascending - // creation order. - AscendingOrder *bool `location:"querystring" locationName:"isAscendingOrder" type:"boolean"` - - // The marker for the next set of results. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The result page size. - PageSize *int64 `location:"querystring" locationName:"pageSize" min:"1" type:"integer"` - - // The principal. - // - // Principal is a required field - Principal *string `location:"header" locationName:"x-amzn-iot-principal" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListPrincipalPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPrincipalPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPrincipalPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPrincipalPoliciesInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - if s.Principal == nil { - invalidParams.Add(request.NewErrParamRequired("Principal")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAscendingOrder sets the AscendingOrder field's value. -func (s *ListPrincipalPoliciesInput) SetAscendingOrder(v bool) *ListPrincipalPoliciesInput { - s.AscendingOrder = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPrincipalPoliciesInput) SetMarker(v string) *ListPrincipalPoliciesInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListPrincipalPoliciesInput) SetPageSize(v int64) *ListPrincipalPoliciesInput { - s.PageSize = &v - return s -} - -// SetPrincipal sets the Principal field's value. -func (s *ListPrincipalPoliciesInput) SetPrincipal(v string) *ListPrincipalPoliciesInput { - s.Principal = &v - return s -} - -// The output from the ListPrincipalPolicies operation. -type ListPrincipalPoliciesOutput struct { - _ struct{} `type:"structure"` - - // The marker for the next set of results, or null if there are no additional - // results. - NextMarker *string `locationName:"nextMarker" type:"string"` - - // The policies. - Policies []*Policy `locationName:"policies" type:"list"` -} - -// String returns the string representation -func (s ListPrincipalPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPrincipalPoliciesOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListPrincipalPoliciesOutput) SetNextMarker(v string) *ListPrincipalPoliciesOutput { - s.NextMarker = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *ListPrincipalPoliciesOutput) SetPolicies(v []*Policy) *ListPrincipalPoliciesOutput { - s.Policies = v - return s -} - -// The input for the ListPrincipalThings operation. -type ListPrincipalThingsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return in this operation. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The principal. - // - // Principal is a required field - Principal *string `location:"header" locationName:"x-amzn-principal" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListPrincipalThingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPrincipalThingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPrincipalThingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPrincipalThingsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Principal == nil { - invalidParams.Add(request.NewErrParamRequired("Principal")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListPrincipalThingsInput) SetMaxResults(v int64) *ListPrincipalThingsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPrincipalThingsInput) SetNextToken(v string) *ListPrincipalThingsInput { - s.NextToken = &v - return s -} - -// SetPrincipal sets the Principal field's value. -func (s *ListPrincipalThingsInput) SetPrincipal(v string) *ListPrincipalThingsInput { - s.Principal = &v - return s -} - -// The output from the ListPrincipalThings operation. -type ListPrincipalThingsOutput struct { - _ struct{} `type:"structure"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The things. - Things []*string `locationName:"things" type:"list"` -} - -// String returns the string representation -func (s ListPrincipalThingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPrincipalThingsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPrincipalThingsOutput) SetNextToken(v string) *ListPrincipalThingsOutput { - s.NextToken = &v - return s -} - -// SetThings sets the Things field's value. -func (s *ListPrincipalThingsOutput) SetThings(v []*string) *ListPrincipalThingsOutput { - s.Things = v - return s -} - -type ListRoleAliasesInput struct { - _ struct{} `type:"structure"` - - // Return the list of role aliases in ascending alphabetical order. - AscendingOrder *bool `location:"querystring" locationName:"isAscendingOrder" type:"boolean"` - - // A marker used to get the next set of results. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The maximum number of results to return at one time. - PageSize *int64 `location:"querystring" locationName:"pageSize" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListRoleAliasesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRoleAliasesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRoleAliasesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRoleAliasesInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAscendingOrder sets the AscendingOrder field's value. -func (s *ListRoleAliasesInput) SetAscendingOrder(v bool) *ListRoleAliasesInput { - s.AscendingOrder = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListRoleAliasesInput) SetMarker(v string) *ListRoleAliasesInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListRoleAliasesInput) SetPageSize(v int64) *ListRoleAliasesInput { - s.PageSize = &v - return s -} - -type ListRoleAliasesOutput struct { - _ struct{} `type:"structure"` - - // A marker used to get the next set of results. - NextMarker *string `locationName:"nextMarker" type:"string"` - - // The role aliases. - RoleAliases []*string `locationName:"roleAliases" type:"list"` -} - -// String returns the string representation -func (s ListRoleAliasesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRoleAliasesOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListRoleAliasesOutput) SetNextMarker(v string) *ListRoleAliasesOutput { - s.NextMarker = &v - return s -} - -// SetRoleAliases sets the RoleAliases field's value. -func (s *ListRoleAliasesOutput) SetRoleAliases(v []*string) *ListRoleAliasesOutput { - s.RoleAliases = v - return s -} - -type ListScheduledAuditsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return at one time. The default is 25. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token for the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListScheduledAuditsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListScheduledAuditsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListScheduledAuditsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListScheduledAuditsInput"} - 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 *ListScheduledAuditsInput) SetMaxResults(v int64) *ListScheduledAuditsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListScheduledAuditsInput) SetNextToken(v string) *ListScheduledAuditsInput { - s.NextToken = &v - return s -} - -type ListScheduledAuditsOutput struct { - _ struct{} `type:"structure"` - - // A token that can be used to retrieve the next set of results, or null if - // there are no additional results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The list of scheduled audits. - ScheduledAudits []*ScheduledAuditMetadata `locationName:"scheduledAudits" type:"list"` -} - -// String returns the string representation -func (s ListScheduledAuditsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListScheduledAuditsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListScheduledAuditsOutput) SetNextToken(v string) *ListScheduledAuditsOutput { - s.NextToken = &v - return s -} - -// SetScheduledAudits sets the ScheduledAudits field's value. -func (s *ListScheduledAuditsOutput) SetScheduledAudits(v []*ScheduledAuditMetadata) *ListScheduledAuditsOutput { - s.ScheduledAudits = v - return s -} - -type ListSecurityProfilesForTargetInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token for the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // If true, return child groups as well. - Recursive *bool `location:"querystring" locationName:"recursive" type:"boolean"` - - // The ARN of the target (thing group) whose attached security profiles you - // want to get. - // - // SecurityProfileTargetArn is a required field - SecurityProfileTargetArn *string `location:"querystring" locationName:"securityProfileTargetArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListSecurityProfilesForTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSecurityProfilesForTargetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSecurityProfilesForTargetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSecurityProfilesForTargetInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.SecurityProfileTargetArn == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityProfileTargetArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListSecurityProfilesForTargetInput) SetMaxResults(v int64) *ListSecurityProfilesForTargetInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSecurityProfilesForTargetInput) SetNextToken(v string) *ListSecurityProfilesForTargetInput { - s.NextToken = &v - return s -} - -// SetRecursive sets the Recursive field's value. -func (s *ListSecurityProfilesForTargetInput) SetRecursive(v bool) *ListSecurityProfilesForTargetInput { - s.Recursive = &v - return s -} - -// SetSecurityProfileTargetArn sets the SecurityProfileTargetArn field's value. -func (s *ListSecurityProfilesForTargetInput) SetSecurityProfileTargetArn(v string) *ListSecurityProfilesForTargetInput { - s.SecurityProfileTargetArn = &v - return s -} - -type ListSecurityProfilesForTargetOutput struct { - _ struct{} `type:"structure"` - - // A token that can be used to retrieve the next set of results, or null if - // there are no additional results. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of security profiles and their associated targets. - SecurityProfileTargetMappings []*SecurityProfileTargetMapping `locationName:"securityProfileTargetMappings" type:"list"` -} - -// String returns the string representation -func (s ListSecurityProfilesForTargetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSecurityProfilesForTargetOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSecurityProfilesForTargetOutput) SetNextToken(v string) *ListSecurityProfilesForTargetOutput { - s.NextToken = &v - return s -} - -// SetSecurityProfileTargetMappings sets the SecurityProfileTargetMappings field's value. -func (s *ListSecurityProfilesForTargetOutput) SetSecurityProfileTargetMappings(v []*SecurityProfileTargetMapping) *ListSecurityProfilesForTargetOutput { - s.SecurityProfileTargetMappings = v - return s -} - -type ListSecurityProfilesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token for the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListSecurityProfilesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSecurityProfilesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSecurityProfilesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSecurityProfilesInput"} - if s.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 *ListSecurityProfilesInput) SetMaxResults(v int64) *ListSecurityProfilesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSecurityProfilesInput) SetNextToken(v string) *ListSecurityProfilesInput { - s.NextToken = &v - return s -} - -type ListSecurityProfilesOutput struct { - _ struct{} `type:"structure"` - - // A token that can be used to retrieve the next set of results, or null if - // there are no additional results. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of security profile identifiers (names and ARNs). - SecurityProfileIdentifiers []*SecurityProfileIdentifier `locationName:"securityProfileIdentifiers" type:"list"` -} - -// String returns the string representation -func (s ListSecurityProfilesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSecurityProfilesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSecurityProfilesOutput) SetNextToken(v string) *ListSecurityProfilesOutput { - s.NextToken = &v - return s -} - -// SetSecurityProfileIdentifiers sets the SecurityProfileIdentifiers field's value. -func (s *ListSecurityProfilesOutput) SetSecurityProfileIdentifiers(v []*SecurityProfileIdentifier) *ListSecurityProfilesOutput { - s.SecurityProfileIdentifiers = v - return s -} - -type ListStreamsInput struct { - _ struct{} `type:"structure"` - - // Set to true to return the list of streams in ascending order. - AscendingOrder *bool `location:"querystring" locationName:"isAscendingOrder" type:"boolean"` - - // The maximum number of results to return at a time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // A token used to get the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListStreamsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStreamsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListStreamsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListStreamsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAscendingOrder sets the AscendingOrder field's value. -func (s *ListStreamsInput) SetAscendingOrder(v bool) *ListStreamsInput { - s.AscendingOrder = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListStreamsInput) SetMaxResults(v int64) *ListStreamsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStreamsInput) SetNextToken(v string) *ListStreamsInput { - s.NextToken = &v - return s -} - -type ListStreamsOutput struct { - _ struct{} `type:"structure"` - - // A token used to get the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of streams. - Streams []*StreamSummary `locationName:"streams" type:"list"` -} - -// String returns the string representation -func (s ListStreamsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStreamsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStreamsOutput) SetNextToken(v string) *ListStreamsOutput { - s.NextToken = &v - return s -} - -// SetStreams sets the Streams field's value. -func (s *ListStreamsOutput) SetStreams(v []*StreamSummary) *ListStreamsOutput { - s.Streams = v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The token to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The ARN of the resource. - // - // ResourceArn is a required field - ResourceArn *string `location:"querystring" locationName:"resourceArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { - s.NextToken = &v - return s -} - -// 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 token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The list of tags assigned to the resource. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { - s.NextToken = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -type ListTargetsForPolicyInput struct { - _ struct{} `type:"structure"` - - // A marker used to get the next set of results. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The maximum number of results to return at one time. - PageSize *int64 `location:"querystring" locationName:"pageSize" min:"1" type:"integer"` - - // The policy name. - // - // PolicyName is a required field - PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTargetsForPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTargetsForPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTargetsForPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTargetsForPolicyInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListTargetsForPolicyInput) SetMarker(v string) *ListTargetsForPolicyInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListTargetsForPolicyInput) SetPageSize(v int64) *ListTargetsForPolicyInput { - s.PageSize = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *ListTargetsForPolicyInput) SetPolicyName(v string) *ListTargetsForPolicyInput { - s.PolicyName = &v - return s -} - -type ListTargetsForPolicyOutput struct { - _ struct{} `type:"structure"` - - // A marker used to get the next set of results. - NextMarker *string `locationName:"nextMarker" type:"string"` - - // The policy targets. - Targets []*string `locationName:"targets" type:"list"` -} - -// String returns the string representation -func (s ListTargetsForPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTargetsForPolicyOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListTargetsForPolicyOutput) SetNextMarker(v string) *ListTargetsForPolicyOutput { - s.NextMarker = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *ListTargetsForPolicyOutput) SetTargets(v []*string) *ListTargetsForPolicyOutput { - s.Targets = v - return s -} - -type ListTargetsForSecurityProfileInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token for the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The security profile. - // - // SecurityProfileName is a required field - SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTargetsForSecurityProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTargetsForSecurityProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTargetsForSecurityProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTargetsForSecurityProfileInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.SecurityProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityProfileName")) - } - if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTargetsForSecurityProfileInput) SetMaxResults(v int64) *ListTargetsForSecurityProfileInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTargetsForSecurityProfileInput) SetNextToken(v string) *ListTargetsForSecurityProfileInput { - s.NextToken = &v - return s -} - -// SetSecurityProfileName sets the SecurityProfileName field's value. -func (s *ListTargetsForSecurityProfileInput) SetSecurityProfileName(v string) *ListTargetsForSecurityProfileInput { - s.SecurityProfileName = &v - return s -} - -type ListTargetsForSecurityProfileOutput struct { - _ struct{} `type:"structure"` - - // A token that can be used to retrieve the next set of results, or null if - // there are no additional results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The thing groups to which the security profile is attached. - SecurityProfileTargets []*SecurityProfileTarget `locationName:"securityProfileTargets" type:"list"` -} - -// String returns the string representation -func (s ListTargetsForSecurityProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTargetsForSecurityProfileOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTargetsForSecurityProfileOutput) SetNextToken(v string) *ListTargetsForSecurityProfileOutput { - s.NextToken = &v - return s -} - -// SetSecurityProfileTargets sets the SecurityProfileTargets field's value. -func (s *ListTargetsForSecurityProfileOutput) SetSecurityProfileTargets(v []*SecurityProfileTarget) *ListTargetsForSecurityProfileOutput { - s.SecurityProfileTargets = v - return s -} - -type ListThingGroupsForThingInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The thing name. - // - // ThingName is a required field - ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListThingGroupsForThingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingGroupsForThingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListThingGroupsForThingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListThingGroupsForThingInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - 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 -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListThingGroupsForThingInput) SetMaxResults(v int64) *ListThingGroupsForThingInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingGroupsForThingInput) SetNextToken(v string) *ListThingGroupsForThingInput { - s.NextToken = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *ListThingGroupsForThingInput) SetThingName(v string) *ListThingGroupsForThingInput { - s.ThingName = &v - return s -} - -type ListThingGroupsForThingOutput struct { - _ struct{} `type:"structure"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The thing groups. - ThingGroups []*GroupNameAndArn `locationName:"thingGroups" type:"list"` -} - -// String returns the string representation -func (s ListThingGroupsForThingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingGroupsForThingOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingGroupsForThingOutput) SetNextToken(v string) *ListThingGroupsForThingOutput { - s.NextToken = &v - return s -} - -// SetThingGroups sets the ThingGroups field's value. -func (s *ListThingGroupsForThingOutput) SetThingGroups(v []*GroupNameAndArn) *ListThingGroupsForThingOutput { - s.ThingGroups = v - return s -} - -type ListThingGroupsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // A filter that limits the results to those with the specified name prefix. - NamePrefixFilter *string `location:"querystring" locationName:"namePrefixFilter" min:"1" type:"string"` - - // The token to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // A filter that limits the results to those with the specified parent group. - ParentGroup *string `location:"querystring" locationName:"parentGroup" min:"1" type:"string"` - - // If true, return child groups as well. - Recursive *bool `location:"querystring" locationName:"recursive" type:"boolean"` -} - -// String returns the string representation -func (s ListThingGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListThingGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListThingGroupsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NamePrefixFilter != nil && len(*s.NamePrefixFilter) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NamePrefixFilter", 1)) - } - if s.ParentGroup != nil && len(*s.ParentGroup) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ParentGroup", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListThingGroupsInput) SetMaxResults(v int64) *ListThingGroupsInput { - s.MaxResults = &v - return s -} - -// SetNamePrefixFilter sets the NamePrefixFilter field's value. -func (s *ListThingGroupsInput) SetNamePrefixFilter(v string) *ListThingGroupsInput { - s.NamePrefixFilter = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingGroupsInput) SetNextToken(v string) *ListThingGroupsInput { - s.NextToken = &v - return s -} - -// SetParentGroup sets the ParentGroup field's value. -func (s *ListThingGroupsInput) SetParentGroup(v string) *ListThingGroupsInput { - s.ParentGroup = &v - return s -} - -// SetRecursive sets the Recursive field's value. -func (s *ListThingGroupsInput) SetRecursive(v bool) *ListThingGroupsInput { - s.Recursive = &v - return s -} - -type ListThingGroupsOutput struct { - _ struct{} `type:"structure"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The thing groups. - ThingGroups []*GroupNameAndArn `locationName:"thingGroups" type:"list"` -} - -// String returns the string representation -func (s ListThingGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingGroupsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingGroupsOutput) SetNextToken(v string) *ListThingGroupsOutput { - s.NextToken = &v - return s -} - -// SetThingGroups sets the ThingGroups field's value. -func (s *ListThingGroupsOutput) SetThingGroups(v []*GroupNameAndArn) *ListThingGroupsOutput { - s.ThingGroups = v - return s -} - -// The input for the ListThingPrincipal operation. -type ListThingPrincipalsInput struct { - _ struct{} `type:"structure"` - - // The name of the thing. - // - // ThingName is a required field - ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListThingPrincipalsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingPrincipalsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListThingPrincipalsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListThingPrincipalsInput"} - 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 *ListThingPrincipalsInput) SetThingName(v string) *ListThingPrincipalsInput { - s.ThingName = &v - return s -} - -// The output from the ListThingPrincipals operation. -type ListThingPrincipalsOutput struct { - _ struct{} `type:"structure"` - - // The principals associated with the thing. - Principals []*string `locationName:"principals" type:"list"` -} - -// String returns the string representation -func (s ListThingPrincipalsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingPrincipalsOutput) GoString() string { - return s.String() -} - -// SetPrincipals sets the Principals field's value. -func (s *ListThingPrincipalsOutput) SetPrincipals(v []*string) *ListThingPrincipalsOutput { - s.Principals = v - return s -} - -type ListThingRegistrationTaskReportsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return per request. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The type of task report. - // - // ReportType is a required field - ReportType *string `location:"querystring" locationName:"reportType" type:"string" required:"true" enum:"ReportType"` - - // The id of the task. - // - // TaskId is a required field - TaskId *string `location:"uri" locationName:"taskId" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListThingRegistrationTaskReportsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingRegistrationTaskReportsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListThingRegistrationTaskReportsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListThingRegistrationTaskReportsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ReportType == nil { - invalidParams.Add(request.NewErrParamRequired("ReportType")) - } - if s.TaskId == nil { - invalidParams.Add(request.NewErrParamRequired("TaskId")) - } - if s.TaskId != nil && len(*s.TaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListThingRegistrationTaskReportsInput) SetMaxResults(v int64) *ListThingRegistrationTaskReportsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingRegistrationTaskReportsInput) SetNextToken(v string) *ListThingRegistrationTaskReportsInput { - s.NextToken = &v - return s -} - -// SetReportType sets the ReportType field's value. -func (s *ListThingRegistrationTaskReportsInput) SetReportType(v string) *ListThingRegistrationTaskReportsInput { - s.ReportType = &v - return s -} - -// SetTaskId sets the TaskId field's value. -func (s *ListThingRegistrationTaskReportsInput) SetTaskId(v string) *ListThingRegistrationTaskReportsInput { - s.TaskId = &v - return s -} - -type ListThingRegistrationTaskReportsOutput struct { - _ struct{} `type:"structure"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The type of task report. - ReportType *string `locationName:"reportType" type:"string" enum:"ReportType"` - - // Links to the task resources. - ResourceLinks []*string `locationName:"resourceLinks" type:"list"` -} - -// String returns the string representation -func (s ListThingRegistrationTaskReportsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingRegistrationTaskReportsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingRegistrationTaskReportsOutput) SetNextToken(v string) *ListThingRegistrationTaskReportsOutput { - s.NextToken = &v - return s -} - -// SetReportType sets the ReportType field's value. -func (s *ListThingRegistrationTaskReportsOutput) SetReportType(v string) *ListThingRegistrationTaskReportsOutput { - s.ReportType = &v - return s -} - -// SetResourceLinks sets the ResourceLinks field's value. -func (s *ListThingRegistrationTaskReportsOutput) SetResourceLinks(v []*string) *ListThingRegistrationTaskReportsOutput { - s.ResourceLinks = v - return s -} - -type ListThingRegistrationTasksInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The status of the bulk thing provisioning task. - Status *string `location:"querystring" locationName:"status" type:"string" enum:"Status"` -} - -// String returns the string representation -func (s ListThingRegistrationTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingRegistrationTasksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListThingRegistrationTasksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListThingRegistrationTasksInput"} - 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 *ListThingRegistrationTasksInput) SetMaxResults(v int64) *ListThingRegistrationTasksInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingRegistrationTasksInput) SetNextToken(v string) *ListThingRegistrationTasksInput { - s.NextToken = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ListThingRegistrationTasksInput) SetStatus(v string) *ListThingRegistrationTasksInput { - s.Status = &v - return s -} - -type ListThingRegistrationTasksOutput struct { - _ struct{} `type:"structure"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of bulk thing provisioning task IDs. - TaskIds []*string `locationName:"taskIds" type:"list"` -} - -// String returns the string representation -func (s ListThingRegistrationTasksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingRegistrationTasksOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingRegistrationTasksOutput) SetNextToken(v string) *ListThingRegistrationTasksOutput { - s.NextToken = &v - return s -} - -// SetTaskIds sets the TaskIds field's value. -func (s *ListThingRegistrationTasksOutput) SetTaskIds(v []*string) *ListThingRegistrationTasksOutput { - s.TaskIds = v - return s -} - -// The input for the ListThingTypes operation. -type ListThingTypesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return in this operation. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The name of the thing type. - ThingTypeName *string `location:"querystring" locationName:"thingTypeName" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListThingTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingTypesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListThingTypesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListThingTypesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ThingTypeName != nil && len(*s.ThingTypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingTypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListThingTypesInput) SetMaxResults(v int64) *ListThingTypesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingTypesInput) SetNextToken(v string) *ListThingTypesInput { - s.NextToken = &v - return s -} - -// SetThingTypeName sets the ThingTypeName field's value. -func (s *ListThingTypesInput) SetThingTypeName(v string) *ListThingTypesInput { - s.ThingTypeName = &v - return s -} - -// The output for the ListThingTypes operation. -type ListThingTypesOutput struct { - _ struct{} `type:"structure"` - - // The token for the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The thing types. - ThingTypes []*ThingTypeDefinition `locationName:"thingTypes" type:"list"` -} - -// String returns the string representation -func (s ListThingTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingTypesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingTypesOutput) SetNextToken(v string) *ListThingTypesOutput { - s.NextToken = &v - return s -} - -// SetThingTypes sets the ThingTypes field's value. -func (s *ListThingTypesOutput) SetThingTypes(v []*ThingTypeDefinition) *ListThingTypesOutput { - s.ThingTypes = v - return s -} - -type ListThingsInBillingGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the billing group. - // - // BillingGroupName is a required field - BillingGroupName *string `location:"uri" locationName:"billingGroupName" min:"1" type:"string" required:"true"` - - // The maximum number of results to return per request. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListThingsInBillingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingsInBillingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListThingsInBillingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListThingsInBillingGroupInput"} - if s.BillingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("BillingGroupName")) - } - if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBillingGroupName sets the BillingGroupName field's value. -func (s *ListThingsInBillingGroupInput) SetBillingGroupName(v string) *ListThingsInBillingGroupInput { - s.BillingGroupName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListThingsInBillingGroupInput) SetMaxResults(v int64) *ListThingsInBillingGroupInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingsInBillingGroupInput) SetNextToken(v string) *ListThingsInBillingGroupInput { - s.NextToken = &v - return s -} - -type ListThingsInBillingGroupOutput struct { - _ struct{} `type:"structure"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of things in the billing group. - Things []*string `locationName:"things" type:"list"` -} - -// String returns the string representation -func (s ListThingsInBillingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingsInBillingGroupOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingsInBillingGroupOutput) SetNextToken(v string) *ListThingsInBillingGroupOutput { - s.NextToken = &v - return s -} - -// SetThings sets the Things field's value. -func (s *ListThingsInBillingGroupOutput) SetThings(v []*string) *ListThingsInBillingGroupOutput { - s.Things = v - return s -} - -type ListThingsInThingGroupInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // When true, list things in this thing group and in all child groups as well. - Recursive *bool `location:"querystring" locationName:"recursive" type:"boolean"` - - // The thing group name. - // - // ThingGroupName is a required field - ThingGroupName *string `location:"uri" locationName:"thingGroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListThingsInThingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingsInThingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListThingsInThingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListThingsInThingGroupInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ThingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ThingGroupName")) - } - if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListThingsInThingGroupInput) SetMaxResults(v int64) *ListThingsInThingGroupInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingsInThingGroupInput) SetNextToken(v string) *ListThingsInThingGroupInput { - s.NextToken = &v - return s -} - -// SetRecursive sets the Recursive field's value. -func (s *ListThingsInThingGroupInput) SetRecursive(v bool) *ListThingsInThingGroupInput { - s.Recursive = &v - return s -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *ListThingsInThingGroupInput) SetThingGroupName(v string) *ListThingsInThingGroupInput { - s.ThingGroupName = &v - return s -} - -type ListThingsInThingGroupOutput struct { - _ struct{} `type:"structure"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The things in the specified thing group. - Things []*string `locationName:"things" type:"list"` -} - -// String returns the string representation -func (s ListThingsInThingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingsInThingGroupOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingsInThingGroupOutput) SetNextToken(v string) *ListThingsInThingGroupOutput { - s.NextToken = &v - return s -} - -// SetThings sets the Things field's value. -func (s *ListThingsInThingGroupOutput) SetThings(v []*string) *ListThingsInThingGroupOutput { - s.Things = v - return s -} - -// The input for the ListThings operation. -type ListThingsInput struct { - _ struct{} `type:"structure"` - - // The attribute name used to search for things. - AttributeName *string `location:"querystring" locationName:"attributeName" type:"string"` - - // The attribute value used to search for things. - AttributeValue *string `location:"querystring" locationName:"attributeValue" type:"string"` - - // The maximum number of results to return in this operation. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token to retrieve the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The name of the thing type used to search for things. - ThingTypeName *string `location:"querystring" locationName:"thingTypeName" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListThingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListThingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListThingsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ThingTypeName != nil && len(*s.ThingTypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingTypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeName sets the AttributeName field's value. -func (s *ListThingsInput) SetAttributeName(v string) *ListThingsInput { - s.AttributeName = &v - return s -} - -// SetAttributeValue sets the AttributeValue field's value. -func (s *ListThingsInput) SetAttributeValue(v string) *ListThingsInput { - s.AttributeValue = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListThingsInput) SetMaxResults(v int64) *ListThingsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingsInput) SetNextToken(v string) *ListThingsInput { - s.NextToken = &v - return s -} - -// SetThingTypeName sets the ThingTypeName field's value. -func (s *ListThingsInput) SetThingTypeName(v string) *ListThingsInput { - s.ThingTypeName = &v - return s -} - -// The output from the ListThings operation. -type ListThingsOutput struct { - _ struct{} `type:"structure"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The things. - Things []*ThingAttribute `locationName:"things" type:"list"` -} - -// String returns the string representation -func (s ListThingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListThingsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListThingsOutput) SetNextToken(v string) *ListThingsOutput { - s.NextToken = &v - return s -} - -// SetThings sets the Things field's value. -func (s *ListThingsOutput) SetThings(v []*ThingAttribute) *ListThingsOutput { - s.Things = v - return s -} - -// The input for the ListTopicRules operation. -type ListTopicRulesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // A token used to retrieve the next value. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // Specifies whether the rule is disabled. - RuleDisabled *bool `location:"querystring" locationName:"ruleDisabled" type:"boolean"` - - // The topic. - Topic *string `location:"querystring" locationName:"topic" type:"string"` -} - -// String returns the string representation -func (s ListTopicRulesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTopicRulesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTopicRulesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTopicRulesInput"} - 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 *ListTopicRulesInput) SetMaxResults(v int64) *ListTopicRulesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTopicRulesInput) SetNextToken(v string) *ListTopicRulesInput { - s.NextToken = &v - return s -} - -// SetRuleDisabled sets the RuleDisabled field's value. -func (s *ListTopicRulesInput) SetRuleDisabled(v bool) *ListTopicRulesInput { - s.RuleDisabled = &v - return s -} - -// SetTopic sets the Topic field's value. -func (s *ListTopicRulesInput) SetTopic(v string) *ListTopicRulesInput { - s.Topic = &v - return s -} - -// The output from the ListTopicRules operation. -type ListTopicRulesOutput struct { - _ struct{} `type:"structure"` - - // A token used to retrieve the next value. - NextToken *string `locationName:"nextToken" type:"string"` - - // The rules. - Rules []*TopicRuleListItem `locationName:"rules" type:"list"` -} - -// String returns the string representation -func (s ListTopicRulesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTopicRulesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTopicRulesOutput) SetNextToken(v string) *ListTopicRulesOutput { - s.NextToken = &v - return s -} - -// SetRules sets the Rules field's value. -func (s *ListTopicRulesOutput) SetRules(v []*TopicRuleListItem) *ListTopicRulesOutput { - s.Rules = v - return s -} - -type ListV2LoggingLevelsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // The type of resource for which you are configuring logging. Must be THING_Group. - TargetType *string `location:"querystring" locationName:"targetType" type:"string" enum:"LogTargetType"` -} - -// String returns the string representation -func (s ListV2LoggingLevelsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListV2LoggingLevelsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListV2LoggingLevelsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListV2LoggingLevelsInput"} - 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 *ListV2LoggingLevelsInput) SetMaxResults(v int64) *ListV2LoggingLevelsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListV2LoggingLevelsInput) SetNextToken(v string) *ListV2LoggingLevelsInput { - s.NextToken = &v - return s -} - -// SetTargetType sets the TargetType field's value. -func (s *ListV2LoggingLevelsInput) SetTargetType(v string) *ListV2LoggingLevelsInput { - s.TargetType = &v - return s -} - -type ListV2LoggingLevelsOutput struct { - _ struct{} `type:"structure"` - - // The logging configuration for a target. - LogTargetConfigurations []*LogTargetConfiguration `locationName:"logTargetConfigurations" type:"list"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListV2LoggingLevelsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListV2LoggingLevelsOutput) GoString() string { - return s.String() -} - -// SetLogTargetConfigurations sets the LogTargetConfigurations field's value. -func (s *ListV2LoggingLevelsOutput) SetLogTargetConfigurations(v []*LogTargetConfiguration) *ListV2LoggingLevelsOutput { - s.LogTargetConfigurations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListV2LoggingLevelsOutput) SetNextToken(v string) *ListV2LoggingLevelsOutput { - s.NextToken = &v - return s -} - -type ListViolationEventsInput struct { - _ struct{} `type:"structure"` - - // The end time for the alerts to be listed. - // - // EndTime is a required field - EndTime *time.Time `location:"querystring" locationName:"endTime" type:"timestamp" required:"true"` - - // The maximum number of results to return at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The token for the next set of results. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // A filter to limit results to those alerts generated by the specified security - // profile. - SecurityProfileName *string `location:"querystring" locationName:"securityProfileName" min:"1" type:"string"` - - // The start time for the alerts to be listed. - // - // StartTime is a required field - StartTime *time.Time `location:"querystring" locationName:"startTime" type:"timestamp" required:"true"` - - // A filter to limit results to those alerts caused by the specified thing. - ThingName *string `location:"querystring" locationName:"thingName" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListViolationEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListViolationEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListViolationEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListViolationEventsInput"} - if s.EndTime == nil { - invalidParams.Add(request.NewErrParamRequired("EndTime")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) - } - if s.ThingName != nil && len(*s.ThingName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndTime sets the EndTime field's value. -func (s *ListViolationEventsInput) SetEndTime(v time.Time) *ListViolationEventsInput { - s.EndTime = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListViolationEventsInput) SetMaxResults(v int64) *ListViolationEventsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListViolationEventsInput) SetNextToken(v string) *ListViolationEventsInput { - s.NextToken = &v - return s -} - -// SetSecurityProfileName sets the SecurityProfileName field's value. -func (s *ListViolationEventsInput) SetSecurityProfileName(v string) *ListViolationEventsInput { - s.SecurityProfileName = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *ListViolationEventsInput) SetStartTime(v time.Time) *ListViolationEventsInput { - s.StartTime = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *ListViolationEventsInput) SetThingName(v string) *ListViolationEventsInput { - s.ThingName = &v - return s -} - -type ListViolationEventsOutput struct { - _ struct{} `type:"structure"` - - // A token that can be used to retrieve the next set of results, or null if - // there are no additional results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The security profile violation alerts issued for this account during the - // given time frame, potentially filtered by security profile, behavior violated, - // or thing (device) violating. - ViolationEvents []*ViolationEvent `locationName:"violationEvents" type:"list"` -} - -// String returns the string representation -func (s ListViolationEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListViolationEventsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListViolationEventsOutput) SetNextToken(v string) *ListViolationEventsOutput { - s.NextToken = &v - return s -} - -// SetViolationEvents sets the ViolationEvents field's value. -func (s *ListViolationEventsOutput) SetViolationEvents(v []*ViolationEvent) *ListViolationEventsOutput { - s.ViolationEvents = v - return s -} - -// A log target. -type LogTarget struct { - _ struct{} `type:"structure"` - - // The target name. - TargetName *string `locationName:"targetName" type:"string"` - - // The target type. - // - // TargetType is a required field - TargetType *string `locationName:"targetType" type:"string" required:"true" enum:"LogTargetType"` -} - -// String returns the string representation -func (s LogTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LogTarget) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LogTarget) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LogTarget"} - if s.TargetType == nil { - invalidParams.Add(request.NewErrParamRequired("TargetType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetName sets the TargetName field's value. -func (s *LogTarget) SetTargetName(v string) *LogTarget { - s.TargetName = &v - return s -} - -// SetTargetType sets the TargetType field's value. -func (s *LogTarget) SetTargetType(v string) *LogTarget { - s.TargetType = &v - return s -} - -// The target configuration. -type LogTargetConfiguration struct { - _ struct{} `type:"structure"` - - // The logging level. - LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` - - // A log target - LogTarget *LogTarget `locationName:"logTarget" type:"structure"` -} - -// String returns the string representation -func (s LogTargetConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LogTargetConfiguration) GoString() string { - return s.String() -} - -// SetLogLevel sets the LogLevel field's value. -func (s *LogTargetConfiguration) SetLogLevel(v string) *LogTargetConfiguration { - s.LogLevel = &v - return s -} - -// SetLogTarget sets the LogTarget field's value. -func (s *LogTargetConfiguration) SetLogTarget(v *LogTarget) *LogTargetConfiguration { - s.LogTarget = v - return s -} - -// Describes the logging options payload. -type LoggingOptionsPayload struct { - _ struct{} `type:"structure"` - - // The log level. - LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` - - // The ARN of the IAM role that grants access. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s LoggingOptionsPayload) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoggingOptionsPayload) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LoggingOptionsPayload) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LoggingOptionsPayload"} - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogLevel sets the LogLevel field's value. -func (s *LoggingOptionsPayload) SetLogLevel(v string) *LoggingOptionsPayload { - s.LogLevel = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *LoggingOptionsPayload) SetRoleArn(v string) *LoggingOptionsPayload { - s.RoleArn = &v - return s -} - -// The value to be compared with the metric. -type MetricValue struct { - _ struct{} `type:"structure"` - - // If the comparisonOperator calls for a set of CIDRs, use this to specify that - // set to be compared with the metric. - Cidrs []*string `locationName:"cidrs" type:"list"` - - // If the comparisonOperator calls for a numeric value, use this to specify - // that numeric value to be compared with the metric. - Count *int64 `locationName:"count" type:"long"` - - // If the comparisonOperator calls for a set of ports, use this to specify that - // set to be compared with the metric. - Ports []*int64 `locationName:"ports" type:"list"` -} - -// String returns the string representation -func (s MetricValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricValue) GoString() string { - return s.String() -} - -// SetCidrs sets the Cidrs field's value. -func (s *MetricValue) SetCidrs(v []*string) *MetricValue { - s.Cidrs = v - return s -} - -// SetCount sets the Count field's value. -func (s *MetricValue) SetCount(v int64) *MetricValue { - s.Count = &v - return s -} - -// SetPorts sets the Ports field's value. -func (s *MetricValue) SetPorts(v []*int64) *MetricValue { - s.Ports = v - return s -} - -// Information about the resource that was non-compliant with the audit check. -type NonCompliantResource struct { - _ struct{} `type:"structure"` - - // Additional information about the non-compliant resource. - AdditionalInfo map[string]*string `locationName:"additionalInfo" type:"map"` - - // Information identifying the non-compliant resource. - ResourceIdentifier *ResourceIdentifier `locationName:"resourceIdentifier" type:"structure"` - - // The type of the non-compliant resource. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` -} - -// String returns the string representation -func (s NonCompliantResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NonCompliantResource) GoString() string { - return s.String() -} - -// SetAdditionalInfo sets the AdditionalInfo field's value. -func (s *NonCompliantResource) SetAdditionalInfo(v map[string]*string) *NonCompliantResource { - s.AdditionalInfo = v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *NonCompliantResource) SetResourceIdentifier(v *ResourceIdentifier) *NonCompliantResource { - s.ResourceIdentifier = v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *NonCompliantResource) SetResourceType(v string) *NonCompliantResource { - s.ResourceType = &v - return s -} - -// Describes a file to be associated with an OTA update. -type OTAUpdateFile struct { - _ struct{} `type:"structure"` - - // A list of name/attribute pairs. - Attributes map[string]*string `locationName:"attributes" type:"map"` - - // The code signing method of the file. - CodeSigning *CodeSigning `locationName:"codeSigning" type:"structure"` - - // The location of the updated firmware. - FileLocation *FileLocation `locationName:"fileLocation" type:"structure"` - - // The name of the file. - FileName *string `locationName:"fileName" type:"string"` - - // The file version. - FileVersion *string `locationName:"fileVersion" type:"string"` -} - -// String returns the string representation -func (s OTAUpdateFile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OTAUpdateFile) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OTAUpdateFile) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OTAUpdateFile"} - if s.CodeSigning != nil { - if err := s.CodeSigning.Validate(); err != nil { - invalidParams.AddNested("CodeSigning", err.(request.ErrInvalidParams)) - } - } - if s.FileLocation != nil { - if err := s.FileLocation.Validate(); err != nil { - invalidParams.AddNested("FileLocation", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *OTAUpdateFile) SetAttributes(v map[string]*string) *OTAUpdateFile { - s.Attributes = v - return s -} - -// SetCodeSigning sets the CodeSigning field's value. -func (s *OTAUpdateFile) SetCodeSigning(v *CodeSigning) *OTAUpdateFile { - s.CodeSigning = v - return s -} - -// SetFileLocation sets the FileLocation field's value. -func (s *OTAUpdateFile) SetFileLocation(v *FileLocation) *OTAUpdateFile { - s.FileLocation = v - return s -} - -// SetFileName sets the FileName field's value. -func (s *OTAUpdateFile) SetFileName(v string) *OTAUpdateFile { - s.FileName = &v - return s -} - -// SetFileVersion sets the FileVersion field's value. -func (s *OTAUpdateFile) SetFileVersion(v string) *OTAUpdateFile { - s.FileVersion = &v - return s -} - -// Information about an OTA update. -type OTAUpdateInfo struct { - _ struct{} `type:"structure"` - - // A collection of name/value pairs - AdditionalParameters map[string]*string `locationName:"additionalParameters" type:"map"` - - // The AWS IoT job ARN associated with the OTA update. - AwsIotJobArn *string `locationName:"awsIotJobArn" type:"string"` - - // The AWS IoT job ID associated with the OTA update. - AwsIotJobId *string `locationName:"awsIotJobId" type:"string"` - - // Configuration for the rollout of OTA updates. - AwsJobExecutionsRolloutConfig *AwsJobExecutionsRolloutConfig `locationName:"awsJobExecutionsRolloutConfig" type:"structure"` - - // The date when the OTA update was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // A description of the OTA update. - Description *string `locationName:"description" type:"string"` - - // Error information associated with the OTA update. - ErrorInfo *ErrorInfo `locationName:"errorInfo" type:"structure"` - - // The date when the OTA update was last updated. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` - - // The OTA update ARN. - OtaUpdateArn *string `locationName:"otaUpdateArn" type:"string"` - - // A list of files associated with the OTA update. - OtaUpdateFiles []*OTAUpdateFile `locationName:"otaUpdateFiles" min:"1" type:"list"` - - // The OTA update ID. - OtaUpdateId *string `locationName:"otaUpdateId" min:"1" type:"string"` - - // The status of the OTA update. - OtaUpdateStatus *string `locationName:"otaUpdateStatus" type:"string" enum:"OTAUpdateStatus"` - - // Specifies whether the OTA update will continue to run (CONTINUOUS), or will - // be complete after all those things specified as targets have completed the - // OTA update (SNAPSHOT). If continuous, the OTA update may also be run on a - // thing when a change is detected in a target. For example, an OTA update will - // run on a thing when the thing is added to a target group, even after the - // OTA update was completed by all things originally in the group. - TargetSelection *string `locationName:"targetSelection" type:"string" enum:"TargetSelection"` - - // The targets of the OTA update. - Targets []*string `locationName:"targets" min:"1" type:"list"` -} - -// String returns the string representation -func (s OTAUpdateInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OTAUpdateInfo) GoString() string { - return s.String() -} - -// SetAdditionalParameters sets the AdditionalParameters field's value. -func (s *OTAUpdateInfo) SetAdditionalParameters(v map[string]*string) *OTAUpdateInfo { - s.AdditionalParameters = v - return s -} - -// SetAwsIotJobArn sets the AwsIotJobArn field's value. -func (s *OTAUpdateInfo) SetAwsIotJobArn(v string) *OTAUpdateInfo { - s.AwsIotJobArn = &v - return s -} - -// SetAwsIotJobId sets the AwsIotJobId field's value. -func (s *OTAUpdateInfo) SetAwsIotJobId(v string) *OTAUpdateInfo { - s.AwsIotJobId = &v - return s -} - -// SetAwsJobExecutionsRolloutConfig sets the AwsJobExecutionsRolloutConfig field's value. -func (s *OTAUpdateInfo) SetAwsJobExecutionsRolloutConfig(v *AwsJobExecutionsRolloutConfig) *OTAUpdateInfo { - s.AwsJobExecutionsRolloutConfig = v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *OTAUpdateInfo) SetCreationDate(v time.Time) *OTAUpdateInfo { - s.CreationDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *OTAUpdateInfo) SetDescription(v string) *OTAUpdateInfo { - s.Description = &v - return s -} - -// SetErrorInfo sets the ErrorInfo field's value. -func (s *OTAUpdateInfo) SetErrorInfo(v *ErrorInfo) *OTAUpdateInfo { - s.ErrorInfo = v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *OTAUpdateInfo) SetLastModifiedDate(v time.Time) *OTAUpdateInfo { - s.LastModifiedDate = &v - return s -} - -// SetOtaUpdateArn sets the OtaUpdateArn field's value. -func (s *OTAUpdateInfo) SetOtaUpdateArn(v string) *OTAUpdateInfo { - s.OtaUpdateArn = &v - return s -} - -// SetOtaUpdateFiles sets the OtaUpdateFiles field's value. -func (s *OTAUpdateInfo) SetOtaUpdateFiles(v []*OTAUpdateFile) *OTAUpdateInfo { - s.OtaUpdateFiles = v - return s -} - -// SetOtaUpdateId sets the OtaUpdateId field's value. -func (s *OTAUpdateInfo) SetOtaUpdateId(v string) *OTAUpdateInfo { - s.OtaUpdateId = &v - return s -} - -// SetOtaUpdateStatus sets the OtaUpdateStatus field's value. -func (s *OTAUpdateInfo) SetOtaUpdateStatus(v string) *OTAUpdateInfo { - s.OtaUpdateStatus = &v - return s -} - -// SetTargetSelection sets the TargetSelection field's value. -func (s *OTAUpdateInfo) SetTargetSelection(v string) *OTAUpdateInfo { - s.TargetSelection = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *OTAUpdateInfo) SetTargets(v []*string) *OTAUpdateInfo { - s.Targets = v - return s -} - -// An OTA update summary. -type OTAUpdateSummary struct { - _ struct{} `type:"structure"` - - // The date when the OTA update was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The OTA update ARN. - OtaUpdateArn *string `locationName:"otaUpdateArn" type:"string"` - - // The OTA update ID. - OtaUpdateId *string `locationName:"otaUpdateId" min:"1" type:"string"` -} - -// String returns the string representation -func (s OTAUpdateSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OTAUpdateSummary) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *OTAUpdateSummary) SetCreationDate(v time.Time) *OTAUpdateSummary { - s.CreationDate = &v - return s -} - -// SetOtaUpdateArn sets the OtaUpdateArn field's value. -func (s *OTAUpdateSummary) SetOtaUpdateArn(v string) *OTAUpdateSummary { - s.OtaUpdateArn = &v - return s -} - -// SetOtaUpdateId sets the OtaUpdateId field's value. -func (s *OTAUpdateSummary) SetOtaUpdateId(v string) *OTAUpdateSummary { - s.OtaUpdateId = &v - return s -} - -// A certificate that has been transferred but not yet accepted. -type OutgoingCertificate struct { - _ struct{} `type:"structure"` - - // The certificate ARN. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // The certificate ID. - CertificateId *string `locationName:"certificateId" min:"64" type:"string"` - - // The certificate creation date. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The date the transfer was initiated. - TransferDate *time.Time `locationName:"transferDate" type:"timestamp"` - - // The transfer message. - TransferMessage *string `locationName:"transferMessage" type:"string"` - - // The AWS account to which the transfer was made. - TransferredTo *string `locationName:"transferredTo" min:"12" type:"string"` -} - -// String returns the string representation -func (s OutgoingCertificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutgoingCertificate) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *OutgoingCertificate) SetCertificateArn(v string) *OutgoingCertificate { - s.CertificateArn = &v - return s -} - -// SetCertificateId sets the CertificateId field's value. -func (s *OutgoingCertificate) SetCertificateId(v string) *OutgoingCertificate { - s.CertificateId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *OutgoingCertificate) SetCreationDate(v time.Time) *OutgoingCertificate { - s.CreationDate = &v - return s -} - -// SetTransferDate sets the TransferDate field's value. -func (s *OutgoingCertificate) SetTransferDate(v time.Time) *OutgoingCertificate { - s.TransferDate = &v - return s -} - -// SetTransferMessage sets the TransferMessage field's value. -func (s *OutgoingCertificate) SetTransferMessage(v string) *OutgoingCertificate { - s.TransferMessage = &v - return s -} - -// SetTransferredTo sets the TransferredTo field's value. -func (s *OutgoingCertificate) SetTransferredTo(v string) *OutgoingCertificate { - s.TransferredTo = &v - return s -} - -// Describes an AWS IoT policy. -type Policy struct { - _ struct{} `type:"structure"` - - // The policy ARN. - PolicyArn *string `locationName:"policyArn" type:"string"` - - // The policy name. - PolicyName *string `locationName:"policyName" min:"1" type:"string"` -} - -// String returns the string representation -func (s Policy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Policy) GoString() string { - return s.String() -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *Policy) SetPolicyArn(v string) *Policy { - s.PolicyArn = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *Policy) SetPolicyName(v string) *Policy { - s.PolicyName = &v - return s -} - -// Describes a policy version. -type PolicyVersion struct { - _ struct{} `type:"structure"` - - // The date and time the policy was created. - CreateDate *time.Time `locationName:"createDate" type:"timestamp"` - - // Specifies whether the policy version is the default. - IsDefaultVersion *bool `locationName:"isDefaultVersion" type:"boolean"` - - // The policy version ID. - VersionId *string `locationName:"versionId" type:"string"` -} - -// String returns the string representation -func (s PolicyVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PolicyVersion) GoString() string { - return s.String() -} - -// SetCreateDate sets the CreateDate field's value. -func (s *PolicyVersion) SetCreateDate(v time.Time) *PolicyVersion { - s.CreateDate = &v - return s -} - -// SetIsDefaultVersion sets the IsDefaultVersion field's value. -func (s *PolicyVersion) SetIsDefaultVersion(v bool) *PolicyVersion { - s.IsDefaultVersion = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *PolicyVersion) SetVersionId(v string) *PolicyVersion { - s.VersionId = &v - return s -} - -// Information about the version of the policy associated with the resource. -type PolicyVersionIdentifier struct { - _ struct{} `type:"structure"` - - // The name of the policy. - PolicyName *string `locationName:"policyName" min:"1" type:"string"` - - // The ID of the version of the policy associated with the resource. - PolicyVersionId *string `locationName:"policyVersionId" type:"string"` -} - -// String returns the string representation -func (s PolicyVersionIdentifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PolicyVersionIdentifier) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PolicyVersionIdentifier) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PolicyVersionIdentifier"} - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PolicyVersionIdentifier) SetPolicyName(v string) *PolicyVersionIdentifier { - s.PolicyName = &v - return s -} - -// SetPolicyVersionId sets the PolicyVersionId field's value. -func (s *PolicyVersionIdentifier) SetPolicyVersionId(v string) *PolicyVersionIdentifier { - s.PolicyVersionId = &v - return s -} - -// Configuration for pre-signed S3 URLs. -type PresignedUrlConfig struct { - _ struct{} `type:"structure"` - - // How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, - // the default value is 3600 seconds. Pre-signed URLs are generated when Jobs - // receives an MQTT request for the job document. - ExpiresInSec *int64 `locationName:"expiresInSec" min:"60" type:"long"` - - // The ARN of an IAM role that grants grants permission to download files from - // the S3 bucket where the job data/updates are stored. The role must also grant - // permission for IoT to download the files. - RoleArn *string `locationName:"roleArn" min:"20" type:"string"` -} - -// String returns the string representation -func (s PresignedUrlConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PresignedUrlConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PresignedUrlConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PresignedUrlConfig"} - if s.ExpiresInSec != nil && *s.ExpiresInSec < 60 { - invalidParams.Add(request.NewErrParamMinValue("ExpiresInSec", 60)) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExpiresInSec sets the ExpiresInSec field's value. -func (s *PresignedUrlConfig) SetExpiresInSec(v int64) *PresignedUrlConfig { - s.ExpiresInSec = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *PresignedUrlConfig) SetRoleArn(v string) *PresignedUrlConfig { - s.RoleArn = &v - return s -} - -// The input for the DynamoActionVS action that specifies the DynamoDB table -// to which the message data will be written. -type PutItemInput struct { - _ struct{} `type:"structure"` - - // The table where the message data will be written - // - // TableName is a required field - TableName *string `locationName:"tableName" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutItemInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutItemInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutItemInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutItemInput"} - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTableName sets the TableName field's value. -func (s *PutItemInput) SetTableName(v string) *PutItemInput { - s.TableName = &v - return s -} - -// Allows you to define a criteria to initiate the increase in rate of rollout -// for a job. -type RateIncreaseCriteria struct { - _ struct{} `type:"structure"` - - // The threshold for number of notified things that will initiate the increase - // in rate of rollout. - NumberOfNotifiedThings *int64 `locationName:"numberOfNotifiedThings" min:"1" type:"integer"` - - // The threshold for number of succeeded things that will initiate the increase - // in rate of rollout. - NumberOfSucceededThings *int64 `locationName:"numberOfSucceededThings" min:"1" type:"integer"` -} - -// String returns the string representation -func (s RateIncreaseCriteria) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RateIncreaseCriteria) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RateIncreaseCriteria) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RateIncreaseCriteria"} - if s.NumberOfNotifiedThings != nil && *s.NumberOfNotifiedThings < 1 { - invalidParams.Add(request.NewErrParamMinValue("NumberOfNotifiedThings", 1)) - } - if s.NumberOfSucceededThings != nil && *s.NumberOfSucceededThings < 1 { - invalidParams.Add(request.NewErrParamMinValue("NumberOfSucceededThings", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNumberOfNotifiedThings sets the NumberOfNotifiedThings field's value. -func (s *RateIncreaseCriteria) SetNumberOfNotifiedThings(v int64) *RateIncreaseCriteria { - s.NumberOfNotifiedThings = &v - return s -} - -// SetNumberOfSucceededThings sets the NumberOfSucceededThings field's value. -func (s *RateIncreaseCriteria) SetNumberOfSucceededThings(v int64) *RateIncreaseCriteria { - s.NumberOfSucceededThings = &v - return s -} - -// The input to the RegisterCACertificate operation. -type RegisterCACertificateInput struct { - _ struct{} `type:"structure"` - - // Allows this CA certificate to be used for auto registration of device certificates. - AllowAutoRegistration *bool `location:"querystring" locationName:"allowAutoRegistration" type:"boolean"` - - // The CA certificate. - // - // CaCertificate is a required field - CaCertificate *string `locationName:"caCertificate" min:"1" type:"string" required:"true"` - - // Information about the registration configuration. - RegistrationConfig *RegistrationConfig `locationName:"registrationConfig" type:"structure"` - - // A boolean value that specifies if the CA certificate is set to active. - SetAsActive *bool `location:"querystring" locationName:"setAsActive" type:"boolean"` - - // The private key verification certificate. - // - // VerificationCertificate is a required field - VerificationCertificate *string `locationName:"verificationCertificate" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterCACertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterCACertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterCACertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterCACertificateInput"} - if s.CaCertificate == nil { - invalidParams.Add(request.NewErrParamRequired("CaCertificate")) - } - if s.CaCertificate != nil && len(*s.CaCertificate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CaCertificate", 1)) - } - if s.VerificationCertificate == nil { - invalidParams.Add(request.NewErrParamRequired("VerificationCertificate")) - } - if s.VerificationCertificate != nil && len(*s.VerificationCertificate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VerificationCertificate", 1)) - } - if s.RegistrationConfig != nil { - if err := s.RegistrationConfig.Validate(); err != nil { - invalidParams.AddNested("RegistrationConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowAutoRegistration sets the AllowAutoRegistration field's value. -func (s *RegisterCACertificateInput) SetAllowAutoRegistration(v bool) *RegisterCACertificateInput { - s.AllowAutoRegistration = &v - return s -} - -// SetCaCertificate sets the CaCertificate field's value. -func (s *RegisterCACertificateInput) SetCaCertificate(v string) *RegisterCACertificateInput { - s.CaCertificate = &v - return s -} - -// SetRegistrationConfig sets the RegistrationConfig field's value. -func (s *RegisterCACertificateInput) SetRegistrationConfig(v *RegistrationConfig) *RegisterCACertificateInput { - s.RegistrationConfig = v - return s -} - -// SetSetAsActive sets the SetAsActive field's value. -func (s *RegisterCACertificateInput) SetSetAsActive(v bool) *RegisterCACertificateInput { - s.SetAsActive = &v - return s -} - -// SetVerificationCertificate sets the VerificationCertificate field's value. -func (s *RegisterCACertificateInput) SetVerificationCertificate(v string) *RegisterCACertificateInput { - s.VerificationCertificate = &v - return s -} - -// The output from the RegisterCACertificateResponse operation. -type RegisterCACertificateOutput struct { - _ struct{} `type:"structure"` - - // The CA certificate ARN. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // The CA certificate identifier. - CertificateId *string `locationName:"certificateId" min:"64" type:"string"` -} - -// String returns the string representation -func (s RegisterCACertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterCACertificateOutput) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *RegisterCACertificateOutput) SetCertificateArn(v string) *RegisterCACertificateOutput { - s.CertificateArn = &v - return s -} - -// SetCertificateId sets the CertificateId field's value. -func (s *RegisterCACertificateOutput) SetCertificateId(v string) *RegisterCACertificateOutput { - s.CertificateId = &v - return s -} - -// The input to the RegisterCertificate operation. -type RegisterCertificateInput struct { - _ struct{} `type:"structure"` - - // The CA certificate used to sign the device certificate being registered. - CaCertificatePem *string `locationName:"caCertificatePem" min:"1" type:"string"` - - // The certificate data, in PEM format. - // - // CertificatePem is a required field - CertificatePem *string `locationName:"certificatePem" min:"1" type:"string" required:"true"` - - // A boolean value that specifies if the CA certificate is set to active. - // - // Deprecated: SetAsActive has been deprecated - SetAsActive *bool `location:"querystring" locationName:"setAsActive" deprecated:"true" type:"boolean"` - - // The status of the register certificate request. - Status *string `locationName:"status" type:"string" enum:"CertificateStatus"` -} - -// String returns the string representation -func (s RegisterCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterCertificateInput"} - if s.CaCertificatePem != nil && len(*s.CaCertificatePem) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CaCertificatePem", 1)) - } - if s.CertificatePem == nil { - invalidParams.Add(request.NewErrParamRequired("CertificatePem")) - } - if s.CertificatePem != nil && len(*s.CertificatePem) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CertificatePem", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCaCertificatePem sets the CaCertificatePem field's value. -func (s *RegisterCertificateInput) SetCaCertificatePem(v string) *RegisterCertificateInput { - s.CaCertificatePem = &v - return s -} - -// SetCertificatePem sets the CertificatePem field's value. -func (s *RegisterCertificateInput) SetCertificatePem(v string) *RegisterCertificateInput { - s.CertificatePem = &v - return s -} - -// SetSetAsActive sets the SetAsActive field's value. -func (s *RegisterCertificateInput) SetSetAsActive(v bool) *RegisterCertificateInput { - s.SetAsActive = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *RegisterCertificateInput) SetStatus(v string) *RegisterCertificateInput { - s.Status = &v - return s -} - -// The output from the RegisterCertificate operation. -type RegisterCertificateOutput struct { - _ struct{} `type:"structure"` - - // The certificate ARN. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // The certificate identifier. - CertificateId *string `locationName:"certificateId" min:"64" type:"string"` -} - -// String returns the string representation -func (s RegisterCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *RegisterCertificateOutput) SetCertificateArn(v string) *RegisterCertificateOutput { - s.CertificateArn = &v - return s -} - -// SetCertificateId sets the CertificateId field's value. -func (s *RegisterCertificateOutput) SetCertificateId(v string) *RegisterCertificateOutput { - s.CertificateId = &v - return s -} - -type RegisterThingInput struct { - _ struct{} `type:"structure"` - - // The parameters for provisioning a thing. See Programmatic Provisioning (http://docs.aws.amazon.com/iot/latest/developerguide/programmatic-provisioning.html) - // for more information. - Parameters map[string]*string `locationName:"parameters" type:"map"` - - // The provisioning template. See Programmatic Provisioning (http://docs.aws.amazon.com/iot/latest/developerguide/programmatic-provisioning.html) - // for more information. - // - // TemplateBody is a required field - TemplateBody *string `locationName:"templateBody" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterThingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterThingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterThingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterThingInput"} - if s.TemplateBody == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateBody")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParameters sets the Parameters field's value. -func (s *RegisterThingInput) SetParameters(v map[string]*string) *RegisterThingInput { - s.Parameters = v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *RegisterThingInput) SetTemplateBody(v string) *RegisterThingInput { - s.TemplateBody = &v - return s -} - -type RegisterThingOutput struct { - _ struct{} `type:"structure"` - - // . - CertificatePem *string `locationName:"certificatePem" min:"1" type:"string"` - - // ARNs for the generated resources. - ResourceArns map[string]*string `locationName:"resourceArns" type:"map"` -} - -// String returns the string representation -func (s RegisterThingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterThingOutput) GoString() string { - return s.String() -} - -// SetCertificatePem sets the CertificatePem field's value. -func (s *RegisterThingOutput) SetCertificatePem(v string) *RegisterThingOutput { - s.CertificatePem = &v - return s -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *RegisterThingOutput) SetResourceArns(v map[string]*string) *RegisterThingOutput { - s.ResourceArns = v - return s -} - -// The registration configuration. -type RegistrationConfig struct { - _ struct{} `type:"structure"` - - // The ARN of the role. - RoleArn *string `locationName:"roleArn" min:"20" type:"string"` - - // The template body. - TemplateBody *string `locationName:"templateBody" type:"string"` -} - -// String returns the string representation -func (s RegistrationConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegistrationConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegistrationConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegistrationConfig"} - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleArn sets the RoleArn field's value. -func (s *RegistrationConfig) SetRoleArn(v string) *RegistrationConfig { - s.RoleArn = &v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *RegistrationConfig) SetTemplateBody(v string) *RegistrationConfig { - s.TemplateBody = &v - return s -} - -// The input for the RejectCertificateTransfer operation. -type RejectCertificateTransferInput struct { - _ struct{} `type:"structure"` - - // The ID of the certificate. (The last part of the certificate ARN contains - // the certificate ID.) - // - // CertificateId is a required field - CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` - - // The reason the certificate transfer was rejected. - RejectReason *string `locationName:"rejectReason" type:"string"` -} - -// String returns the string representation -func (s RejectCertificateTransferInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectCertificateTransferInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RejectCertificateTransferInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RejectCertificateTransferInput"} - if s.CertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateId")) - } - if s.CertificateId != nil && len(*s.CertificateId) < 64 { - invalidParams.Add(request.NewErrParamMinLen("CertificateId", 64)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateId sets the CertificateId field's value. -func (s *RejectCertificateTransferInput) SetCertificateId(v string) *RejectCertificateTransferInput { - s.CertificateId = &v - return s -} - -// SetRejectReason sets the RejectReason field's value. -func (s *RejectCertificateTransferInput) SetRejectReason(v string) *RejectCertificateTransferInput { - s.RejectReason = &v - return s -} - -type RejectCertificateTransferOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RejectCertificateTransferOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectCertificateTransferOutput) GoString() string { - return s.String() -} - -// Information about a related resource. -type RelatedResource struct { - _ struct{} `type:"structure"` - - // Additional information about the resource. - AdditionalInfo map[string]*string `locationName:"additionalInfo" type:"map"` - - // Information identifying the resource. - ResourceIdentifier *ResourceIdentifier `locationName:"resourceIdentifier" type:"structure"` - - // The type of resource. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` -} - -// String returns the string representation -func (s RelatedResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RelatedResource) GoString() string { - return s.String() -} - -// SetAdditionalInfo sets the AdditionalInfo field's value. -func (s *RelatedResource) SetAdditionalInfo(v map[string]*string) *RelatedResource { - s.AdditionalInfo = v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *RelatedResource) SetResourceIdentifier(v *ResourceIdentifier) *RelatedResource { - s.ResourceIdentifier = v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *RelatedResource) SetResourceType(v string) *RelatedResource { - s.ResourceType = &v - return s -} - -type RemoveThingFromBillingGroupInput struct { - _ struct{} `type:"structure"` - - // The ARN of the billing group. - BillingGroupArn *string `locationName:"billingGroupArn" type:"string"` - - // The name of the billing group. - BillingGroupName *string `locationName:"billingGroupName" min:"1" type:"string"` - - // The ARN of the thing to be removed from the billing group. - ThingArn *string `locationName:"thingArn" type:"string"` - - // The name of the thing to be removed from the billing group. - ThingName *string `locationName:"thingName" min:"1" type:"string"` -} - -// String returns the string representation -func (s RemoveThingFromBillingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveThingFromBillingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveThingFromBillingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveThingFromBillingGroupInput"} - if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) - } - if s.ThingName != nil && len(*s.ThingName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBillingGroupArn sets the BillingGroupArn field's value. -func (s *RemoveThingFromBillingGroupInput) SetBillingGroupArn(v string) *RemoveThingFromBillingGroupInput { - s.BillingGroupArn = &v - return s -} - -// SetBillingGroupName sets the BillingGroupName field's value. -func (s *RemoveThingFromBillingGroupInput) SetBillingGroupName(v string) *RemoveThingFromBillingGroupInput { - s.BillingGroupName = &v - return s -} - -// SetThingArn sets the ThingArn field's value. -func (s *RemoveThingFromBillingGroupInput) SetThingArn(v string) *RemoveThingFromBillingGroupInput { - s.ThingArn = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *RemoveThingFromBillingGroupInput) SetThingName(v string) *RemoveThingFromBillingGroupInput { - s.ThingName = &v - return s -} - -type RemoveThingFromBillingGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveThingFromBillingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveThingFromBillingGroupOutput) GoString() string { - return s.String() -} - -type RemoveThingFromThingGroupInput struct { - _ struct{} `type:"structure"` - - // The ARN of the thing to remove from the group. - ThingArn *string `locationName:"thingArn" type:"string"` - - // The group ARN. - ThingGroupArn *string `locationName:"thingGroupArn" type:"string"` - - // The group name. - ThingGroupName *string `locationName:"thingGroupName" min:"1" type:"string"` - - // The name of the thing to remove from the group. - ThingName *string `locationName:"thingName" min:"1" type:"string"` -} - -// String returns the string representation -func (s RemoveThingFromThingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveThingFromThingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveThingFromThingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveThingFromThingGroupInput"} - if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 1)) - } - if s.ThingName != nil && len(*s.ThingName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetThingArn sets the ThingArn field's value. -func (s *RemoveThingFromThingGroupInput) SetThingArn(v string) *RemoveThingFromThingGroupInput { - s.ThingArn = &v - return s -} - -// SetThingGroupArn sets the ThingGroupArn field's value. -func (s *RemoveThingFromThingGroupInput) SetThingGroupArn(v string) *RemoveThingFromThingGroupInput { - s.ThingGroupArn = &v - return s -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *RemoveThingFromThingGroupInput) SetThingGroupName(v string) *RemoveThingFromThingGroupInput { - s.ThingGroupName = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *RemoveThingFromThingGroupInput) SetThingName(v string) *RemoveThingFromThingGroupInput { - s.ThingName = &v - return s -} - -type RemoveThingFromThingGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveThingFromThingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveThingFromThingGroupOutput) GoString() string { - return s.String() -} - -// The input for the ReplaceTopicRule operation. -type ReplaceTopicRuleInput struct { - _ struct{} `type:"structure" payload:"TopicRulePayload"` - - // The name of the rule. - // - // RuleName is a required field - RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` - - // The rule payload. - // - // TopicRulePayload is a required field - TopicRulePayload *TopicRulePayload `locationName:"topicRulePayload" type:"structure" required:"true"` -} - -// String returns the string representation -func (s ReplaceTopicRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceTopicRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplaceTopicRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplaceTopicRuleInput"} - if s.RuleName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleName")) - } - if s.RuleName != nil && len(*s.RuleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) - } - if s.TopicRulePayload == nil { - invalidParams.Add(request.NewErrParamRequired("TopicRulePayload")) - } - if s.TopicRulePayload != nil { - if err := s.TopicRulePayload.Validate(); err != nil { - invalidParams.AddNested("TopicRulePayload", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleName sets the RuleName field's value. -func (s *ReplaceTopicRuleInput) SetRuleName(v string) *ReplaceTopicRuleInput { - s.RuleName = &v - return s -} - -// SetTopicRulePayload sets the TopicRulePayload field's value. -func (s *ReplaceTopicRuleInput) SetTopicRulePayload(v *TopicRulePayload) *ReplaceTopicRuleInput { - s.TopicRulePayload = v - return s -} - -type ReplaceTopicRuleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ReplaceTopicRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceTopicRuleOutput) GoString() string { - return s.String() -} - -// Describes an action to republish to another topic. -type RepublishAction struct { - _ struct{} `type:"structure"` - - // The ARN of the IAM role that grants access. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` - - // The name of the MQTT topic. - // - // Topic is a required field - Topic *string `locationName:"topic" type:"string" required:"true"` -} - -// String returns the string representation -func (s RepublishAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RepublishAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RepublishAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RepublishAction"} - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.Topic == nil { - invalidParams.Add(request.NewErrParamRequired("Topic")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleArn sets the RoleArn field's value. -func (s *RepublishAction) SetRoleArn(v string) *RepublishAction { - s.RoleArn = &v - return s -} - -// SetTopic sets the Topic field's value. -func (s *RepublishAction) SetTopic(v string) *RepublishAction { - s.Topic = &v - return s -} - -// Information identifying the non-compliant resource. -type ResourceIdentifier struct { - _ struct{} `type:"structure"` - - // The account with which the resource is associated. - Account *string `locationName:"account" min:"12" type:"string"` - - // The ID of the CA certificate used to authorize the certificate. - CaCertificateId *string `locationName:"caCertificateId" min:"64" type:"string"` - - // The client ID. - ClientId *string `locationName:"clientId" type:"string"` - - // The ID of the Cognito Identity Pool. - CognitoIdentityPoolId *string `locationName:"cognitoIdentityPoolId" type:"string"` - - // The ID of the certificate attached to the resource. - DeviceCertificateId *string `locationName:"deviceCertificateId" min:"64" type:"string"` - - // The version of the policy associated with the resource. - PolicyVersionIdentifier *PolicyVersionIdentifier `locationName:"policyVersionIdentifier" type:"structure"` -} - -// String returns the string representation -func (s ResourceIdentifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceIdentifier) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceIdentifier) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceIdentifier"} - if s.Account != nil && len(*s.Account) < 12 { - invalidParams.Add(request.NewErrParamMinLen("Account", 12)) - } - if s.CaCertificateId != nil && len(*s.CaCertificateId) < 64 { - invalidParams.Add(request.NewErrParamMinLen("CaCertificateId", 64)) - } - if s.DeviceCertificateId != nil && len(*s.DeviceCertificateId) < 64 { - invalidParams.Add(request.NewErrParamMinLen("DeviceCertificateId", 64)) - } - if s.PolicyVersionIdentifier != nil { - if err := s.PolicyVersionIdentifier.Validate(); err != nil { - invalidParams.AddNested("PolicyVersionIdentifier", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccount sets the Account field's value. -func (s *ResourceIdentifier) SetAccount(v string) *ResourceIdentifier { - s.Account = &v - return s -} - -// SetCaCertificateId sets the CaCertificateId field's value. -func (s *ResourceIdentifier) SetCaCertificateId(v string) *ResourceIdentifier { - s.CaCertificateId = &v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *ResourceIdentifier) SetClientId(v string) *ResourceIdentifier { - s.ClientId = &v - return s -} - -// SetCognitoIdentityPoolId sets the CognitoIdentityPoolId field's value. -func (s *ResourceIdentifier) SetCognitoIdentityPoolId(v string) *ResourceIdentifier { - s.CognitoIdentityPoolId = &v - return s -} - -// SetDeviceCertificateId sets the DeviceCertificateId field's value. -func (s *ResourceIdentifier) SetDeviceCertificateId(v string) *ResourceIdentifier { - s.DeviceCertificateId = &v - return s -} - -// SetPolicyVersionIdentifier sets the PolicyVersionIdentifier field's value. -func (s *ResourceIdentifier) SetPolicyVersionIdentifier(v *PolicyVersionIdentifier) *ResourceIdentifier { - s.PolicyVersionIdentifier = v - return s -} - -// Role alias description. -type RoleAliasDescription struct { - _ struct{} `type:"structure"` - - // The UNIX timestamp of when the role alias was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The number of seconds for which the credential is valid. - CredentialDurationSeconds *int64 `locationName:"credentialDurationSeconds" min:"900" type:"integer"` - - // The UNIX timestamp of when the role alias was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` - - // The role alias owner. - Owner *string `locationName:"owner" min:"12" type:"string"` - - // The role alias. - RoleAlias *string `locationName:"roleAlias" min:"1" type:"string"` - - // The ARN of the role alias. - RoleAliasArn *string `locationName:"roleAliasArn" type:"string"` - - // The role ARN. - RoleArn *string `locationName:"roleArn" min:"20" type:"string"` -} - -// String returns the string representation -func (s RoleAliasDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RoleAliasDescription) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *RoleAliasDescription) SetCreationDate(v time.Time) *RoleAliasDescription { - s.CreationDate = &v - return s -} - -// SetCredentialDurationSeconds sets the CredentialDurationSeconds field's value. -func (s *RoleAliasDescription) SetCredentialDurationSeconds(v int64) *RoleAliasDescription { - s.CredentialDurationSeconds = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *RoleAliasDescription) SetLastModifiedDate(v time.Time) *RoleAliasDescription { - s.LastModifiedDate = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *RoleAliasDescription) SetOwner(v string) *RoleAliasDescription { - s.Owner = &v - return s -} - -// SetRoleAlias sets the RoleAlias field's value. -func (s *RoleAliasDescription) SetRoleAlias(v string) *RoleAliasDescription { - s.RoleAlias = &v - return s -} - -// SetRoleAliasArn sets the RoleAliasArn field's value. -func (s *RoleAliasDescription) SetRoleAliasArn(v string) *RoleAliasDescription { - s.RoleAliasArn = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *RoleAliasDescription) SetRoleArn(v string) *RoleAliasDescription { - s.RoleArn = &v - return s -} - -// Describes an action to write data to an Amazon S3 bucket. -type S3Action struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket. - // - // BucketName is a required field - BucketName *string `locationName:"bucketName" type:"string" required:"true"` - - // The Amazon S3 canned ACL that controls access to the object identified by - // the object key. For more information, see S3 canned ACLs (http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl). - CannedAcl *string `locationName:"cannedAcl" type:"string" enum:"CannedAccessControlList"` - - // The object key. - // - // Key is a required field - Key *string `locationName:"key" type:"string" required:"true"` - - // The ARN of the IAM role that grants access. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s S3Action) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Action) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3Action) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3Action"} - if s.BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("BucketName")) - } - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketName sets the BucketName field's value. -func (s *S3Action) SetBucketName(v string) *S3Action { - s.BucketName = &v - return s -} - -// SetCannedAcl sets the CannedAcl field's value. -func (s *S3Action) SetCannedAcl(v string) *S3Action { - s.CannedAcl = &v - return s -} - -// SetKey sets the Key field's value. -func (s *S3Action) SetKey(v string) *S3Action { - s.Key = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *S3Action) SetRoleArn(v string) *S3Action { - s.RoleArn = &v - return s -} - -// Describes the location of updated firmware in S3. -type S3Destination struct { - _ struct{} `type:"structure"` - - // The S3 bucket that contains the updated firmware. - Bucket *string `locationName:"bucket" min:"1" type:"string"` - - // The S3 prefix. - Prefix *string `locationName:"prefix" type:"string"` -} - -// String returns the string representation -func (s S3Destination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Destination) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3Destination) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3Destination"} - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *S3Destination) SetBucket(v string) *S3Destination { - s.Bucket = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *S3Destination) SetPrefix(v string) *S3Destination { - s.Prefix = &v - return s -} - -// The S3 location. -type S3Location struct { - _ struct{} `type:"structure"` - - // The S3 bucket. - Bucket *string `locationName:"bucket" min:"1" type:"string"` - - // The S3 key. - Key *string `locationName:"key" min:"1" type:"string"` - - // The S3 bucket version. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s S3Location) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Location) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3Location) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3Location"} - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *S3Location) SetBucket(v string) *S3Location { - s.Bucket = &v - return s -} - -// SetKey sets the Key field's value. -func (s *S3Location) SetKey(v string) *S3Location { - s.Key = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *S3Location) SetVersion(v string) *S3Location { - s.Version = &v - return s -} - -// Describes an action to write a message to a Salesforce IoT Cloud Input Stream. -type SalesforceAction struct { - _ struct{} `type:"structure"` - - // The token used to authenticate access to the Salesforce IoT Cloud Input Stream. - // The token is available from the Salesforce IoT Cloud platform after creation - // of the Input Stream. - // - // Token is a required field - Token *string `locationName:"token" min:"40" type:"string" required:"true"` - - // The URL exposed by the Salesforce IoT Cloud Input Stream. The URL is available - // from the Salesforce IoT Cloud platform after creation of the Input Stream. - // - // Url is a required field - Url *string `locationName:"url" type:"string" required:"true"` -} - -// String returns the string representation -func (s SalesforceAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SalesforceAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SalesforceAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SalesforceAction"} - if s.Token == nil { - invalidParams.Add(request.NewErrParamRequired("Token")) - } - if s.Token != nil && len(*s.Token) < 40 { - invalidParams.Add(request.NewErrParamMinLen("Token", 40)) - } - if s.Url == nil { - invalidParams.Add(request.NewErrParamRequired("Url")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetToken sets the Token field's value. -func (s *SalesforceAction) SetToken(v string) *SalesforceAction { - s.Token = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *SalesforceAction) SetUrl(v string) *SalesforceAction { - s.Url = &v - return s -} - -// Information about the scheduled audit. -type ScheduledAuditMetadata struct { - _ struct{} `type:"structure"` - - // The day of the month on which the scheduled audit is run (if the frequency - // is "MONTHLY"). If days 29-31 are specified, and the month does not have that - // many days, the audit takes place on the "LAST" day of the month. - DayOfMonth *string `locationName:"dayOfMonth" type:"string"` - - // The day of the week on which the scheduled audit is run (if the frequency - // is "WEEKLY" or "BIWEEKLY"). - DayOfWeek *string `locationName:"dayOfWeek" type:"string" enum:"DayOfWeek"` - - // How often the scheduled audit takes place. - Frequency *string `locationName:"frequency" type:"string" enum:"AuditFrequency"` - - // The ARN of the scheduled audit. - ScheduledAuditArn *string `locationName:"scheduledAuditArn" type:"string"` - - // The name of the scheduled audit. - ScheduledAuditName *string `locationName:"scheduledAuditName" min:"1" type:"string"` -} - -// String returns the string representation -func (s ScheduledAuditMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledAuditMetadata) GoString() string { - return s.String() -} - -// SetDayOfMonth sets the DayOfMonth field's value. -func (s *ScheduledAuditMetadata) SetDayOfMonth(v string) *ScheduledAuditMetadata { - s.DayOfMonth = &v - return s -} - -// SetDayOfWeek sets the DayOfWeek field's value. -func (s *ScheduledAuditMetadata) SetDayOfWeek(v string) *ScheduledAuditMetadata { - s.DayOfWeek = &v - return s -} - -// SetFrequency sets the Frequency field's value. -func (s *ScheduledAuditMetadata) SetFrequency(v string) *ScheduledAuditMetadata { - s.Frequency = &v - return s -} - -// SetScheduledAuditArn sets the ScheduledAuditArn field's value. -func (s *ScheduledAuditMetadata) SetScheduledAuditArn(v string) *ScheduledAuditMetadata { - s.ScheduledAuditArn = &v - return s -} - -// SetScheduledAuditName sets the ScheduledAuditName field's value. -func (s *ScheduledAuditMetadata) SetScheduledAuditName(v string) *ScheduledAuditMetadata { - s.ScheduledAuditName = &v - return s -} - -type SearchIndexInput struct { - _ struct{} `type:"structure"` - - // The search index name. - IndexName *string `locationName:"indexName" min:"1" type:"string"` - - // The maximum number of results to return at one time. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The search query string. - // - // QueryString is a required field - QueryString *string `locationName:"queryString" min:"1" type:"string" required:"true"` - - // The query version. - QueryVersion *string `locationName:"queryVersion" type:"string"` -} - -// String returns the string representation -func (s SearchIndexInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchIndexInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SearchIndexInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SearchIndexInput"} - if s.IndexName != nil && len(*s.IndexName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IndexName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.QueryString == nil { - invalidParams.Add(request.NewErrParamRequired("QueryString")) - } - if s.QueryString != nil && len(*s.QueryString) < 1 { - invalidParams.Add(request.NewErrParamMinLen("QueryString", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIndexName sets the IndexName field's value. -func (s *SearchIndexInput) SetIndexName(v string) *SearchIndexInput { - s.IndexName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *SearchIndexInput) SetMaxResults(v int64) *SearchIndexInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *SearchIndexInput) SetNextToken(v string) *SearchIndexInput { - s.NextToken = &v - return s -} - -// SetQueryString sets the QueryString field's value. -func (s *SearchIndexInput) SetQueryString(v string) *SearchIndexInput { - s.QueryString = &v - return s -} - -// SetQueryVersion sets the QueryVersion field's value. -func (s *SearchIndexInput) SetQueryVersion(v string) *SearchIndexInput { - s.QueryVersion = &v - return s -} - -type SearchIndexOutput struct { - _ struct{} `type:"structure"` - - // The token used to get the next set of results, or null if there are no additional - // results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The thing groups that match the search query. - ThingGroups []*ThingGroupDocument `locationName:"thingGroups" type:"list"` - - // The things that match the search query. - Things []*ThingDocument `locationName:"things" type:"list"` -} - -// String returns the string representation -func (s SearchIndexOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchIndexOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *SearchIndexOutput) SetNextToken(v string) *SearchIndexOutput { - s.NextToken = &v - return s -} - -// SetThingGroups sets the ThingGroups field's value. -func (s *SearchIndexOutput) SetThingGroups(v []*ThingGroupDocument) *SearchIndexOutput { - s.ThingGroups = v - return s -} - -// SetThings sets the Things field's value. -func (s *SearchIndexOutput) SetThings(v []*ThingDocument) *SearchIndexOutput { - s.Things = v - return s -} - -// Identifying information for a Device Defender security profile. -type SecurityProfileIdentifier struct { - _ struct{} `type:"structure"` - - // The ARN of the security profile. - // - // Arn is a required field - Arn *string `locationName:"arn" type:"string" required:"true"` - - // The name you have given to the security profile. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SecurityProfileIdentifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecurityProfileIdentifier) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *SecurityProfileIdentifier) SetArn(v string) *SecurityProfileIdentifier { - s.Arn = &v - return s -} - -// SetName sets the Name field's value. -func (s *SecurityProfileIdentifier) SetName(v string) *SecurityProfileIdentifier { - s.Name = &v - return s -} - -// A target to which an alert is sent when a security profile behavior is violated. -type SecurityProfileTarget struct { - _ struct{} `type:"structure"` - - // The ARN of the security profile. - // - // Arn is a required field - Arn *string `locationName:"arn" type:"string" required:"true"` -} - -// String returns the string representation -func (s SecurityProfileTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecurityProfileTarget) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *SecurityProfileTarget) SetArn(v string) *SecurityProfileTarget { - s.Arn = &v - return s -} - -// Information about a security profile and the target associated with it. -type SecurityProfileTargetMapping struct { - _ struct{} `type:"structure"` - - // Information that identifies the security profile. - SecurityProfileIdentifier *SecurityProfileIdentifier `locationName:"securityProfileIdentifier" type:"structure"` - - // Information about the target (thing group) associated with the security profile. - Target *SecurityProfileTarget `locationName:"target" type:"structure"` -} - -// String returns the string representation -func (s SecurityProfileTargetMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecurityProfileTargetMapping) GoString() string { - return s.String() -} - -// SetSecurityProfileIdentifier sets the SecurityProfileIdentifier field's value. -func (s *SecurityProfileTargetMapping) SetSecurityProfileIdentifier(v *SecurityProfileIdentifier) *SecurityProfileTargetMapping { - s.SecurityProfileIdentifier = v - return s -} - -// SetTarget sets the Target field's value. -func (s *SecurityProfileTargetMapping) SetTarget(v *SecurityProfileTarget) *SecurityProfileTargetMapping { - s.Target = v - return s -} - -type SetDefaultAuthorizerInput struct { - _ struct{} `type:"structure"` - - // The authorizer name. - // - // AuthorizerName is a required field - AuthorizerName *string `locationName:"authorizerName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SetDefaultAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetDefaultAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetDefaultAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetDefaultAuthorizerInput"} - if s.AuthorizerName == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerName")) - } - if s.AuthorizerName != nil && len(*s.AuthorizerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthorizerName sets the AuthorizerName field's value. -func (s *SetDefaultAuthorizerInput) SetAuthorizerName(v string) *SetDefaultAuthorizerInput { - s.AuthorizerName = &v - return s -} - -type SetDefaultAuthorizerOutput struct { - _ struct{} `type:"structure"` - - // The authorizer ARN. - AuthorizerArn *string `locationName:"authorizerArn" type:"string"` - - // The authorizer name. - AuthorizerName *string `locationName:"authorizerName" min:"1" type:"string"` -} - -// String returns the string representation -func (s SetDefaultAuthorizerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetDefaultAuthorizerOutput) GoString() string { - return s.String() -} - -// SetAuthorizerArn sets the AuthorizerArn field's value. -func (s *SetDefaultAuthorizerOutput) SetAuthorizerArn(v string) *SetDefaultAuthorizerOutput { - s.AuthorizerArn = &v - return s -} - -// SetAuthorizerName sets the AuthorizerName field's value. -func (s *SetDefaultAuthorizerOutput) SetAuthorizerName(v string) *SetDefaultAuthorizerOutput { - s.AuthorizerName = &v - return s -} - -// The input for the SetDefaultPolicyVersion operation. -type SetDefaultPolicyVersionInput struct { - _ struct{} `type:"structure"` - - // The policy name. - // - // PolicyName is a required field - PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` - - // The policy version ID. - // - // PolicyVersionId is a required field - PolicyVersionId *string `location:"uri" locationName:"policyVersionId" type:"string" required:"true"` -} - -// String returns the string representation -func (s SetDefaultPolicyVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetDefaultPolicyVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetDefaultPolicyVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetDefaultPolicyVersionInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.PolicyVersionId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyVersionId")) - } - if s.PolicyVersionId != nil && len(*s.PolicyVersionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyVersionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *SetDefaultPolicyVersionInput) SetPolicyName(v string) *SetDefaultPolicyVersionInput { - s.PolicyName = &v - return s -} - -// SetPolicyVersionId sets the PolicyVersionId field's value. -func (s *SetDefaultPolicyVersionInput) SetPolicyVersionId(v string) *SetDefaultPolicyVersionInput { - s.PolicyVersionId = &v - return s -} - -type SetDefaultPolicyVersionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetDefaultPolicyVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetDefaultPolicyVersionOutput) GoString() string { - return s.String() -} - -// The input for the SetLoggingOptions operation. -type SetLoggingOptionsInput struct { - _ struct{} `type:"structure" payload:"LoggingOptionsPayload"` - - // The logging options payload. - // - // LoggingOptionsPayload is a required field - LoggingOptionsPayload *LoggingOptionsPayload `locationName:"loggingOptionsPayload" type:"structure" required:"true"` -} - -// String returns the string representation -func (s SetLoggingOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetLoggingOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetLoggingOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetLoggingOptionsInput"} - if s.LoggingOptionsPayload == nil { - invalidParams.Add(request.NewErrParamRequired("LoggingOptionsPayload")) - } - if s.LoggingOptionsPayload != nil { - if err := s.LoggingOptionsPayload.Validate(); err != nil { - invalidParams.AddNested("LoggingOptionsPayload", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoggingOptionsPayload sets the LoggingOptionsPayload field's value. -func (s *SetLoggingOptionsInput) SetLoggingOptionsPayload(v *LoggingOptionsPayload) *SetLoggingOptionsInput { - s.LoggingOptionsPayload = v - return s -} - -type SetLoggingOptionsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetLoggingOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetLoggingOptionsOutput) GoString() string { - return s.String() -} - -type SetV2LoggingLevelInput struct { - _ struct{} `type:"structure"` - - // The log level. - // - // LogLevel is a required field - LogLevel *string `locationName:"logLevel" type:"string" required:"true" enum:"LogLevel"` - - // The log target. - // - // LogTarget is a required field - LogTarget *LogTarget `locationName:"logTarget" type:"structure" required:"true"` -} - -// String returns the string representation -func (s SetV2LoggingLevelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetV2LoggingLevelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetV2LoggingLevelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetV2LoggingLevelInput"} - if s.LogLevel == nil { - invalidParams.Add(request.NewErrParamRequired("LogLevel")) - } - if s.LogTarget == nil { - invalidParams.Add(request.NewErrParamRequired("LogTarget")) - } - if s.LogTarget != nil { - if err := s.LogTarget.Validate(); err != nil { - invalidParams.AddNested("LogTarget", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogLevel sets the LogLevel field's value. -func (s *SetV2LoggingLevelInput) SetLogLevel(v string) *SetV2LoggingLevelInput { - s.LogLevel = &v - return s -} - -// SetLogTarget sets the LogTarget field's value. -func (s *SetV2LoggingLevelInput) SetLogTarget(v *LogTarget) *SetV2LoggingLevelInput { - s.LogTarget = v - return s -} - -type SetV2LoggingLevelOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetV2LoggingLevelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetV2LoggingLevelOutput) GoString() string { - return s.String() -} - -type SetV2LoggingOptionsInput struct { - _ struct{} `type:"structure"` - - // The default logging level. - DefaultLogLevel *string `locationName:"defaultLogLevel" type:"string" enum:"LogLevel"` - - // If true all logs are disabled. The default is false. - DisableAllLogs *bool `locationName:"disableAllLogs" type:"boolean"` - - // The ARN of the role that allows IoT to write to Cloudwatch logs. - RoleArn *string `locationName:"roleArn" type:"string"` -} - -// String returns the string representation -func (s SetV2LoggingOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetV2LoggingOptionsInput) GoString() string { - return s.String() -} - -// SetDefaultLogLevel sets the DefaultLogLevel field's value. -func (s *SetV2LoggingOptionsInput) SetDefaultLogLevel(v string) *SetV2LoggingOptionsInput { - s.DefaultLogLevel = &v - return s -} - -// SetDisableAllLogs sets the DisableAllLogs field's value. -func (s *SetV2LoggingOptionsInput) SetDisableAllLogs(v bool) *SetV2LoggingOptionsInput { - s.DisableAllLogs = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *SetV2LoggingOptionsInput) SetRoleArn(v string) *SetV2LoggingOptionsInput { - s.RoleArn = &v - return s -} - -type SetV2LoggingOptionsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetV2LoggingOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetV2LoggingOptionsOutput) GoString() string { - return s.String() -} - -// Describes the code-signing profile. -type SigningProfileParameter struct { - _ struct{} `type:"structure"` - - // Certificate ARN. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // The location of the code-signing certificate on your device. - CertificatePathOnDevice *string `locationName:"certificatePathOnDevice" type:"string"` - - // The hardware platform of your device. - Platform *string `locationName:"platform" type:"string"` -} - -// String returns the string representation -func (s SigningProfileParameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SigningProfileParameter) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *SigningProfileParameter) SetCertificateArn(v string) *SigningProfileParameter { - s.CertificateArn = &v - return s -} - -// SetCertificatePathOnDevice sets the CertificatePathOnDevice field's value. -func (s *SigningProfileParameter) SetCertificatePathOnDevice(v string) *SigningProfileParameter { - s.CertificatePathOnDevice = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *SigningProfileParameter) SetPlatform(v string) *SigningProfileParameter { - s.Platform = &v - return s -} - -// Describes an action to publish to an Amazon SNS topic. -type SnsAction struct { - _ struct{} `type:"structure"` - - // (Optional) The message format of the message to publish. Accepted values - // are "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses - // this setting to determine if the payload should be parsed and relevant platform-specific - // bits of the payload should be extracted. To read more about SNS message formats, - // see http://docs.aws.amazon.com/sns/latest/dg/json-formats.html (http://docs.aws.amazon.com/sns/latest/dg/json-formats.html) - // refer to their official documentation. - MessageFormat *string `locationName:"messageFormat" type:"string" enum:"MessageFormat"` - - // The ARN of the IAM role that grants access. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` - - // The ARN of the SNS topic. - // - // TargetArn is a required field - TargetArn *string `locationName:"targetArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s SnsAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SnsAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SnsAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SnsAction"} - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.TargetArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMessageFormat sets the MessageFormat field's value. -func (s *SnsAction) SetMessageFormat(v string) *SnsAction { - s.MessageFormat = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *SnsAction) SetRoleArn(v string) *SnsAction { - s.RoleArn = &v - return s -} - -// SetTargetArn sets the TargetArn field's value. -func (s *SnsAction) SetTargetArn(v string) *SnsAction { - s.TargetArn = &v - return s -} - -// Describes an action to publish data to an Amazon SQS queue. -type SqsAction struct { - _ struct{} `type:"structure"` - - // The URL of the Amazon SQS queue. - // - // QueueUrl is a required field - QueueUrl *string `locationName:"queueUrl" type:"string" required:"true"` - - // The ARN of the IAM role that grants access. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` - - // Specifies whether to use Base64 encoding. - UseBase64 *bool `locationName:"useBase64" type:"boolean"` -} - -// String returns the string representation -func (s SqsAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SqsAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SqsAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SqsAction"} - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *SqsAction) SetQueueUrl(v string) *SqsAction { - s.QueueUrl = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *SqsAction) SetRoleArn(v string) *SqsAction { - s.RoleArn = &v - return s -} - -// SetUseBase64 sets the UseBase64 field's value. -func (s *SqsAction) SetUseBase64(v bool) *SqsAction { - s.UseBase64 = &v - return s -} - -type StartOnDemandAuditTaskInput struct { - _ struct{} `type:"structure"` - - // Which checks are performed during the audit. The checks you specify must - // be enabled for your account or an exception occurs. Use DescribeAccountAuditConfiguration - // to see the list of all checks including those that are enabled or UpdateAccountAuditConfiguration - // to select which checks are enabled. - // - // TargetCheckNames is a required field - TargetCheckNames []*string `locationName:"targetCheckNames" type:"list" required:"true"` -} - -// String returns the string representation -func (s StartOnDemandAuditTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartOnDemandAuditTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartOnDemandAuditTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartOnDemandAuditTaskInput"} - if s.TargetCheckNames == nil { - invalidParams.Add(request.NewErrParamRequired("TargetCheckNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetCheckNames sets the TargetCheckNames field's value. -func (s *StartOnDemandAuditTaskInput) SetTargetCheckNames(v []*string) *StartOnDemandAuditTaskInput { - s.TargetCheckNames = v - return s -} - -type StartOnDemandAuditTaskOutput struct { - _ struct{} `type:"structure"` - - // The ID of the on-demand audit you started. - TaskId *string `locationName:"taskId" min:"1" type:"string"` -} - -// String returns the string representation -func (s StartOnDemandAuditTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartOnDemandAuditTaskOutput) GoString() string { - return s.String() -} - -// SetTaskId sets the TaskId field's value. -func (s *StartOnDemandAuditTaskOutput) SetTaskId(v string) *StartOnDemandAuditTaskOutput { - s.TaskId = &v - return s -} - -// Information required to start a signing job. -type StartSigningJobParameter struct { - _ struct{} `type:"structure"` - - // The location to write the code-signed file. - Destination *Destination `locationName:"destination" type:"structure"` - - // The code-signing profile name. - SigningProfileName *string `locationName:"signingProfileName" type:"string"` - - // Describes the code-signing profile. - SigningProfileParameter *SigningProfileParameter `locationName:"signingProfileParameter" type:"structure"` -} - -// String returns the string representation -func (s StartSigningJobParameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartSigningJobParameter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartSigningJobParameter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartSigningJobParameter"} - if s.Destination != nil { - if err := s.Destination.Validate(); err != nil { - invalidParams.AddNested("Destination", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestination sets the Destination field's value. -func (s *StartSigningJobParameter) SetDestination(v *Destination) *StartSigningJobParameter { - s.Destination = v - return s -} - -// SetSigningProfileName sets the SigningProfileName field's value. -func (s *StartSigningJobParameter) SetSigningProfileName(v string) *StartSigningJobParameter { - s.SigningProfileName = &v - return s -} - -// SetSigningProfileParameter sets the SigningProfileParameter field's value. -func (s *StartSigningJobParameter) SetSigningProfileParameter(v *SigningProfileParameter) *StartSigningJobParameter { - s.SigningProfileParameter = v - return s -} - -type StartThingRegistrationTaskInput struct { - _ struct{} `type:"structure"` - - // The S3 bucket that contains the input file. - // - // InputFileBucket is a required field - InputFileBucket *string `locationName:"inputFileBucket" min:"3" type:"string" required:"true"` - - // The name of input file within the S3 bucket. This file contains a newline - // delimited JSON file. Each line contains the parameter values to provision - // one device (thing). - // - // InputFileKey is a required field - InputFileKey *string `locationName:"inputFileKey" min:"1" type:"string" required:"true"` - - // The IAM role ARN that grants permission the input file. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" min:"20" type:"string" required:"true"` - - // The provisioning template. - // - // TemplateBody is a required field - TemplateBody *string `locationName:"templateBody" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartThingRegistrationTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartThingRegistrationTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartThingRegistrationTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartThingRegistrationTaskInput"} - if s.InputFileBucket == nil { - invalidParams.Add(request.NewErrParamRequired("InputFileBucket")) - } - if s.InputFileBucket != nil && len(*s.InputFileBucket) < 3 { - invalidParams.Add(request.NewErrParamMinLen("InputFileBucket", 3)) - } - if s.InputFileKey == nil { - invalidParams.Add(request.NewErrParamRequired("InputFileKey")) - } - if s.InputFileKey != nil && len(*s.InputFileKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputFileKey", 1)) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.TemplateBody == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateBody")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputFileBucket sets the InputFileBucket field's value. -func (s *StartThingRegistrationTaskInput) SetInputFileBucket(v string) *StartThingRegistrationTaskInput { - s.InputFileBucket = &v - return s -} - -// SetInputFileKey sets the InputFileKey field's value. -func (s *StartThingRegistrationTaskInput) SetInputFileKey(v string) *StartThingRegistrationTaskInput { - s.InputFileKey = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *StartThingRegistrationTaskInput) SetRoleArn(v string) *StartThingRegistrationTaskInput { - s.RoleArn = &v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *StartThingRegistrationTaskInput) SetTemplateBody(v string) *StartThingRegistrationTaskInput { - s.TemplateBody = &v - return s -} - -type StartThingRegistrationTaskOutput struct { - _ struct{} `type:"structure"` - - // The bulk thing provisioning task ID. - TaskId *string `locationName:"taskId" type:"string"` -} - -// String returns the string representation -func (s StartThingRegistrationTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartThingRegistrationTaskOutput) GoString() string { - return s.String() -} - -// SetTaskId sets the TaskId field's value. -func (s *StartThingRegistrationTaskOutput) SetTaskId(v string) *StartThingRegistrationTaskOutput { - s.TaskId = &v - return s -} - -// Starts execution of a Step Functions state machine. -type StepFunctionsAction struct { - _ struct{} `type:"structure"` - - // (Optional) A name will be given to the state machine execution consisting - // of this prefix followed by a UUID. Step Functions automatically creates a - // unique name for each state machine execution if one is not provided. - ExecutionNamePrefix *string `locationName:"executionNamePrefix" type:"string"` - - // The ARN of the role that grants IoT permission to start execution of a state - // machine ("Action":"states:StartExecution"). - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` - - // The name of the Step Functions state machine whose execution will be started. - // - // StateMachineName is a required field - StateMachineName *string `locationName:"stateMachineName" type:"string" required:"true"` -} - -// String returns the string representation -func (s StepFunctionsAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StepFunctionsAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StepFunctionsAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StepFunctionsAction"} - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.StateMachineName == nil { - invalidParams.Add(request.NewErrParamRequired("StateMachineName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExecutionNamePrefix sets the ExecutionNamePrefix field's value. -func (s *StepFunctionsAction) SetExecutionNamePrefix(v string) *StepFunctionsAction { - s.ExecutionNamePrefix = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *StepFunctionsAction) SetRoleArn(v string) *StepFunctionsAction { - s.RoleArn = &v - return s -} - -// SetStateMachineName sets the StateMachineName field's value. -func (s *StepFunctionsAction) SetStateMachineName(v string) *StepFunctionsAction { - s.StateMachineName = &v - return s -} - -type StopThingRegistrationTaskInput struct { - _ struct{} `type:"structure"` - - // The bulk thing provisioning task ID. - // - // TaskId is a required field - TaskId *string `location:"uri" locationName:"taskId" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopThingRegistrationTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopThingRegistrationTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopThingRegistrationTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopThingRegistrationTaskInput"} - if s.TaskId == nil { - invalidParams.Add(request.NewErrParamRequired("TaskId")) - } - if s.TaskId != nil && len(*s.TaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTaskId sets the TaskId field's value. -func (s *StopThingRegistrationTaskInput) SetTaskId(v string) *StopThingRegistrationTaskInput { - s.TaskId = &v - return s -} - -type StopThingRegistrationTaskOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopThingRegistrationTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopThingRegistrationTaskOutput) GoString() string { - return s.String() -} - -// Describes a group of files that can be streamed. -type Stream struct { - _ struct{} `type:"structure"` - - // The ID of a file associated with a stream. - FileId *int64 `locationName:"fileId" type:"integer"` - - // The stream ID. - StreamId *string `locationName:"streamId" min:"1" type:"string"` -} - -// String returns the string representation -func (s Stream) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Stream) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Stream) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Stream"} - if s.StreamId != nil && len(*s.StreamId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileId sets the FileId field's value. -func (s *Stream) SetFileId(v int64) *Stream { - s.FileId = &v - return s -} - -// SetStreamId sets the StreamId field's value. -func (s *Stream) SetStreamId(v string) *Stream { - s.StreamId = &v - return s -} - -// Represents a file to stream. -type StreamFile struct { - _ struct{} `type:"structure"` - - // The file ID. - FileId *int64 `locationName:"fileId" type:"integer"` - - // The location of the file in S3. - S3Location *S3Location `locationName:"s3Location" type:"structure"` -} - -// String returns the string representation -func (s StreamFile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StreamFile) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StreamFile) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StreamFile"} - if s.S3Location != nil { - if err := s.S3Location.Validate(); err != nil { - invalidParams.AddNested("S3Location", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileId sets the FileId field's value. -func (s *StreamFile) SetFileId(v int64) *StreamFile { - s.FileId = &v - return s -} - -// SetS3Location sets the S3Location field's value. -func (s *StreamFile) SetS3Location(v *S3Location) *StreamFile { - s.S3Location = v - return s -} - -// Information about a stream. -type StreamInfo struct { - _ struct{} `type:"structure"` - - // The date when the stream was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The description of the stream. - Description *string `locationName:"description" type:"string"` - - // The files to stream. - Files []*StreamFile `locationName:"files" min:"1" type:"list"` - - // The date when the stream was last updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` - - // An IAM role AWS IoT assumes to access your S3 files. - RoleArn *string `locationName:"roleArn" min:"20" type:"string"` - - // The stream ARN. - StreamArn *string `locationName:"streamArn" type:"string"` - - // The stream ID. - StreamId *string `locationName:"streamId" min:"1" type:"string"` - - // The stream version. - StreamVersion *int64 `locationName:"streamVersion" type:"integer"` -} - -// String returns the string representation -func (s StreamInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StreamInfo) GoString() string { - return s.String() -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *StreamInfo) SetCreatedAt(v time.Time) *StreamInfo { - s.CreatedAt = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *StreamInfo) SetDescription(v string) *StreamInfo { - s.Description = &v - return s -} - -// SetFiles sets the Files field's value. -func (s *StreamInfo) SetFiles(v []*StreamFile) *StreamInfo { - s.Files = v - return s -} - -// SetLastUpdatedAt sets the LastUpdatedAt field's value. -func (s *StreamInfo) SetLastUpdatedAt(v time.Time) *StreamInfo { - s.LastUpdatedAt = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *StreamInfo) SetRoleArn(v string) *StreamInfo { - s.RoleArn = &v - return s -} - -// SetStreamArn sets the StreamArn field's value. -func (s *StreamInfo) SetStreamArn(v string) *StreamInfo { - s.StreamArn = &v - return s -} - -// SetStreamId sets the StreamId field's value. -func (s *StreamInfo) SetStreamId(v string) *StreamInfo { - s.StreamId = &v - return s -} - -// SetStreamVersion sets the StreamVersion field's value. -func (s *StreamInfo) SetStreamVersion(v int64) *StreamInfo { - s.StreamVersion = &v - return s -} - -// A summary of a stream. -type StreamSummary struct { - _ struct{} `type:"structure"` - - // A description of the stream. - Description *string `locationName:"description" type:"string"` - - // The stream ARN. - StreamArn *string `locationName:"streamArn" type:"string"` - - // The stream ID. - StreamId *string `locationName:"streamId" min:"1" type:"string"` - - // The stream version. - StreamVersion *int64 `locationName:"streamVersion" type:"integer"` -} - -// String returns the string representation -func (s StreamSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StreamSummary) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *StreamSummary) SetDescription(v string) *StreamSummary { - s.Description = &v - return s -} - -// SetStreamArn sets the StreamArn field's value. -func (s *StreamSummary) SetStreamArn(v string) *StreamSummary { - s.StreamArn = &v - return s -} - -// SetStreamId sets the StreamId field's value. -func (s *StreamSummary) SetStreamId(v string) *StreamSummary { - s.StreamId = &v - return s -} - -// SetStreamVersion sets the StreamVersion field's value. -func (s *StreamSummary) SetStreamVersion(v int64) *StreamSummary { - s.StreamVersion = &v - return s -} - -// A set of key/value pairs that are used to manage the resource. -type Tag struct { - _ struct{} `type:"structure"` - - // The tag's key. - Key *string `type:"string"` - - // The tag's value. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The ARN of the resource. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` - - // The new or modified tags for the resource. - // - // Tags is a required field - Tags []*Tag `locationName:"tags" type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -// Statistics for the checks performed during the audit. -type TaskStatistics struct { - _ struct{} `type:"structure"` - - // The number of checks that did not run because the audit was canceled. - CanceledChecks *int64 `locationName:"canceledChecks" type:"integer"` - - // The number of checks that found compliant resources. - CompliantChecks *int64 `locationName:"compliantChecks" type:"integer"` - - // The number of checks - FailedChecks *int64 `locationName:"failedChecks" type:"integer"` - - // The number of checks in progress. - InProgressChecks *int64 `locationName:"inProgressChecks" type:"integer"` - - // The number of checks that found non-compliant resources. - NonCompliantChecks *int64 `locationName:"nonCompliantChecks" type:"integer"` - - // The number of checks in this audit. - TotalChecks *int64 `locationName:"totalChecks" type:"integer"` - - // The number of checks waiting for data collection. - WaitingForDataCollectionChecks *int64 `locationName:"waitingForDataCollectionChecks" type:"integer"` -} - -// String returns the string representation -func (s TaskStatistics) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskStatistics) GoString() string { - return s.String() -} - -// SetCanceledChecks sets the CanceledChecks field's value. -func (s *TaskStatistics) SetCanceledChecks(v int64) *TaskStatistics { - s.CanceledChecks = &v - return s -} - -// SetCompliantChecks sets the CompliantChecks field's value. -func (s *TaskStatistics) SetCompliantChecks(v int64) *TaskStatistics { - s.CompliantChecks = &v - return s -} - -// SetFailedChecks sets the FailedChecks field's value. -func (s *TaskStatistics) SetFailedChecks(v int64) *TaskStatistics { - s.FailedChecks = &v - return s -} - -// SetInProgressChecks sets the InProgressChecks field's value. -func (s *TaskStatistics) SetInProgressChecks(v int64) *TaskStatistics { - s.InProgressChecks = &v - return s -} - -// SetNonCompliantChecks sets the NonCompliantChecks field's value. -func (s *TaskStatistics) SetNonCompliantChecks(v int64) *TaskStatistics { - s.NonCompliantChecks = &v - return s -} - -// SetTotalChecks sets the TotalChecks field's value. -func (s *TaskStatistics) SetTotalChecks(v int64) *TaskStatistics { - s.TotalChecks = &v - return s -} - -// SetWaitingForDataCollectionChecks sets the WaitingForDataCollectionChecks field's value. -func (s *TaskStatistics) SetWaitingForDataCollectionChecks(v int64) *TaskStatistics { - s.WaitingForDataCollectionChecks = &v - return s -} - -type TestAuthorizationInput struct { - _ struct{} `type:"structure"` - - // A list of authorization info objects. Simulating authorization will create - // a response for each authInfo object in the list. - // - // AuthInfos is a required field - AuthInfos []*AuthInfo `locationName:"authInfos" min:"1" type:"list" required:"true"` - - // The MQTT client ID. - ClientId *string `location:"querystring" locationName:"clientId" type:"string"` - - // The Cognito identity pool ID. - CognitoIdentityPoolId *string `locationName:"cognitoIdentityPoolId" type:"string"` - - // When testing custom authorization, the policies specified here are treated - // as if they are attached to the principal being authorized. - PolicyNamesToAdd []*string `locationName:"policyNamesToAdd" type:"list"` - - // When testing custom authorization, the policies specified here are treated - // as if they are not attached to the principal being authorized. - PolicyNamesToSkip []*string `locationName:"policyNamesToSkip" type:"list"` - - // The principal. - Principal *string `locationName:"principal" type:"string"` -} - -// String returns the string representation -func (s TestAuthorizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestAuthorizationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TestAuthorizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TestAuthorizationInput"} - if s.AuthInfos == nil { - invalidParams.Add(request.NewErrParamRequired("AuthInfos")) - } - if s.AuthInfos != nil && len(s.AuthInfos) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthInfos", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthInfos sets the AuthInfos field's value. -func (s *TestAuthorizationInput) SetAuthInfos(v []*AuthInfo) *TestAuthorizationInput { - s.AuthInfos = v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *TestAuthorizationInput) SetClientId(v string) *TestAuthorizationInput { - s.ClientId = &v - return s -} - -// SetCognitoIdentityPoolId sets the CognitoIdentityPoolId field's value. -func (s *TestAuthorizationInput) SetCognitoIdentityPoolId(v string) *TestAuthorizationInput { - s.CognitoIdentityPoolId = &v - return s -} - -// SetPolicyNamesToAdd sets the PolicyNamesToAdd field's value. -func (s *TestAuthorizationInput) SetPolicyNamesToAdd(v []*string) *TestAuthorizationInput { - s.PolicyNamesToAdd = v - return s -} - -// SetPolicyNamesToSkip sets the PolicyNamesToSkip field's value. -func (s *TestAuthorizationInput) SetPolicyNamesToSkip(v []*string) *TestAuthorizationInput { - s.PolicyNamesToSkip = v - return s -} - -// SetPrincipal sets the Principal field's value. -func (s *TestAuthorizationInput) SetPrincipal(v string) *TestAuthorizationInput { - s.Principal = &v - return s -} - -type TestAuthorizationOutput struct { - _ struct{} `type:"structure"` - - // The authentication results. - AuthResults []*AuthResult `locationName:"authResults" type:"list"` -} - -// String returns the string representation -func (s TestAuthorizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestAuthorizationOutput) GoString() string { - return s.String() -} - -// SetAuthResults sets the AuthResults field's value. -func (s *TestAuthorizationOutput) SetAuthResults(v []*AuthResult) *TestAuthorizationOutput { - s.AuthResults = v - return s -} - -type TestInvokeAuthorizerInput struct { - _ struct{} `type:"structure"` - - // The custom authorizer name. - // - // AuthorizerName is a required field - AuthorizerName *string `location:"uri" locationName:"authorizerName" min:"1" type:"string" required:"true"` - - // The token returned by your custom authentication service. - // - // Token is a required field - Token *string `locationName:"token" min:"1" type:"string" required:"true"` - - // The signature made with the token and your custom authentication service's - // private key. - // - // TokenSignature is a required field - TokenSignature *string `locationName:"tokenSignature" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TestInvokeAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestInvokeAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TestInvokeAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TestInvokeAuthorizerInput"} - if s.AuthorizerName == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerName")) - } - if s.AuthorizerName != nil && len(*s.AuthorizerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizerName", 1)) - } - if s.Token == nil { - invalidParams.Add(request.NewErrParamRequired("Token")) - } - if s.Token != nil && len(*s.Token) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Token", 1)) - } - if s.TokenSignature == nil { - invalidParams.Add(request.NewErrParamRequired("TokenSignature")) - } - if s.TokenSignature != nil && len(*s.TokenSignature) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TokenSignature", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthorizerName sets the AuthorizerName field's value. -func (s *TestInvokeAuthorizerInput) SetAuthorizerName(v string) *TestInvokeAuthorizerInput { - s.AuthorizerName = &v - return s -} - -// SetToken sets the Token field's value. -func (s *TestInvokeAuthorizerInput) SetToken(v string) *TestInvokeAuthorizerInput { - s.Token = &v - return s -} - -// SetTokenSignature sets the TokenSignature field's value. -func (s *TestInvokeAuthorizerInput) SetTokenSignature(v string) *TestInvokeAuthorizerInput { - s.TokenSignature = &v - return s -} - -type TestInvokeAuthorizerOutput struct { - _ struct{} `type:"structure"` - - // The number of seconds after which the connection is terminated. - DisconnectAfterInSeconds *int64 `locationName:"disconnectAfterInSeconds" type:"integer"` - - // True if the token is authenticated, otherwise false. - IsAuthenticated *bool `locationName:"isAuthenticated" type:"boolean"` - - // IAM policy documents. - PolicyDocuments []*string `locationName:"policyDocuments" type:"list"` - - // The principal ID. - PrincipalId *string `locationName:"principalId" min:"1" type:"string"` - - // The number of seconds after which the temporary credentials are refreshed. - RefreshAfterInSeconds *int64 `locationName:"refreshAfterInSeconds" type:"integer"` -} - -// String returns the string representation -func (s TestInvokeAuthorizerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestInvokeAuthorizerOutput) GoString() string { - return s.String() -} - -// SetDisconnectAfterInSeconds sets the DisconnectAfterInSeconds field's value. -func (s *TestInvokeAuthorizerOutput) SetDisconnectAfterInSeconds(v int64) *TestInvokeAuthorizerOutput { - s.DisconnectAfterInSeconds = &v - return s -} - -// SetIsAuthenticated sets the IsAuthenticated field's value. -func (s *TestInvokeAuthorizerOutput) SetIsAuthenticated(v bool) *TestInvokeAuthorizerOutput { - s.IsAuthenticated = &v - return s -} - -// SetPolicyDocuments sets the PolicyDocuments field's value. -func (s *TestInvokeAuthorizerOutput) SetPolicyDocuments(v []*string) *TestInvokeAuthorizerOutput { - s.PolicyDocuments = v - return s -} - -// SetPrincipalId sets the PrincipalId field's value. -func (s *TestInvokeAuthorizerOutput) SetPrincipalId(v string) *TestInvokeAuthorizerOutput { - s.PrincipalId = &v - return s -} - -// SetRefreshAfterInSeconds sets the RefreshAfterInSeconds field's value. -func (s *TestInvokeAuthorizerOutput) SetRefreshAfterInSeconds(v int64) *TestInvokeAuthorizerOutput { - s.RefreshAfterInSeconds = &v - return s -} - -// The properties of the thing, including thing name, thing type name, and a -// list of thing attributes. -type ThingAttribute struct { - _ struct{} `type:"structure"` - - // A list of thing attributes which are name-value pairs. - Attributes map[string]*string `locationName:"attributes" type:"map"` - - // The thing ARN. - ThingArn *string `locationName:"thingArn" type:"string"` - - // The name of the thing. - ThingName *string `locationName:"thingName" min:"1" type:"string"` - - // The name of the thing type, if the thing has been associated with a type. - ThingTypeName *string `locationName:"thingTypeName" min:"1" type:"string"` - - // The version of the thing record in the registry. - Version *int64 `locationName:"version" type:"long"` -} - -// String returns the string representation -func (s ThingAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThingAttribute) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *ThingAttribute) SetAttributes(v map[string]*string) *ThingAttribute { - s.Attributes = v - return s -} - -// SetThingArn sets the ThingArn field's value. -func (s *ThingAttribute) SetThingArn(v string) *ThingAttribute { - s.ThingArn = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *ThingAttribute) SetThingName(v string) *ThingAttribute { - s.ThingName = &v - return s -} - -// SetThingTypeName sets the ThingTypeName field's value. -func (s *ThingAttribute) SetThingTypeName(v string) *ThingAttribute { - s.ThingTypeName = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *ThingAttribute) SetVersion(v int64) *ThingAttribute { - s.Version = &v - return s -} - -// The connectivity status of the thing. -type ThingConnectivity struct { - _ struct{} `type:"structure"` - - // True if the thing is connected to the AWS IoT service, false if it is not - // connected. - Connected *bool `locationName:"connected" type:"boolean"` - - // The epoch time (in milliseconds) when the thing last connected or disconnected. - // Note that if the thing has been disconnected for more than a few weeks, the - // time value can be missing. - Timestamp *int64 `locationName:"timestamp" type:"long"` -} - -// String returns the string representation -func (s ThingConnectivity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThingConnectivity) GoString() string { - return s.String() -} - -// SetConnected sets the Connected field's value. -func (s *ThingConnectivity) SetConnected(v bool) *ThingConnectivity { - s.Connected = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *ThingConnectivity) SetTimestamp(v int64) *ThingConnectivity { - s.Timestamp = &v - return s -} - -// The thing search index document. -type ThingDocument struct { - _ struct{} `type:"structure"` - - // The attributes. - Attributes map[string]*string `locationName:"attributes" type:"map"` - - // Indicates whether or not the thing is connected to the AWS IoT service. - Connectivity *ThingConnectivity `locationName:"connectivity" type:"structure"` - - // The shadow. - Shadow *string `locationName:"shadow" type:"string"` - - // Thing group names. - ThingGroupNames []*string `locationName:"thingGroupNames" type:"list"` - - // The thing ID. - ThingId *string `locationName:"thingId" type:"string"` - - // The thing name. - ThingName *string `locationName:"thingName" min:"1" type:"string"` - - // The thing type name. - ThingTypeName *string `locationName:"thingTypeName" min:"1" type:"string"` -} - -// String returns the string representation -func (s ThingDocument) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThingDocument) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *ThingDocument) SetAttributes(v map[string]*string) *ThingDocument { - s.Attributes = v - return s -} - -// SetConnectivity sets the Connectivity field's value. -func (s *ThingDocument) SetConnectivity(v *ThingConnectivity) *ThingDocument { - s.Connectivity = v - return s -} - -// SetShadow sets the Shadow field's value. -func (s *ThingDocument) SetShadow(v string) *ThingDocument { - s.Shadow = &v - return s -} - -// SetThingGroupNames sets the ThingGroupNames field's value. -func (s *ThingDocument) SetThingGroupNames(v []*string) *ThingDocument { - s.ThingGroupNames = v - return s -} - -// SetThingId sets the ThingId field's value. -func (s *ThingDocument) SetThingId(v string) *ThingDocument { - s.ThingId = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *ThingDocument) SetThingName(v string) *ThingDocument { - s.ThingName = &v - return s -} - -// SetThingTypeName sets the ThingTypeName field's value. -func (s *ThingDocument) SetThingTypeName(v string) *ThingDocument { - s.ThingTypeName = &v - return s -} - -// The thing group search index document. -type ThingGroupDocument struct { - _ struct{} `type:"structure"` - - // The thing group attributes. - Attributes map[string]*string `locationName:"attributes" type:"map"` - - // Parent group names. - ParentGroupNames []*string `locationName:"parentGroupNames" type:"list"` - - // The thing group description. - ThingGroupDescription *string `locationName:"thingGroupDescription" type:"string"` - - // The thing group ID. - ThingGroupId *string `locationName:"thingGroupId" min:"1" type:"string"` - - // The thing group name. - ThingGroupName *string `locationName:"thingGroupName" min:"1" type:"string"` -} - -// String returns the string representation -func (s ThingGroupDocument) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThingGroupDocument) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *ThingGroupDocument) SetAttributes(v map[string]*string) *ThingGroupDocument { - s.Attributes = v - return s -} - -// SetParentGroupNames sets the ParentGroupNames field's value. -func (s *ThingGroupDocument) SetParentGroupNames(v []*string) *ThingGroupDocument { - s.ParentGroupNames = v - return s -} - -// SetThingGroupDescription sets the ThingGroupDescription field's value. -func (s *ThingGroupDocument) SetThingGroupDescription(v string) *ThingGroupDocument { - s.ThingGroupDescription = &v - return s -} - -// SetThingGroupId sets the ThingGroupId field's value. -func (s *ThingGroupDocument) SetThingGroupId(v string) *ThingGroupDocument { - s.ThingGroupId = &v - return s -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *ThingGroupDocument) SetThingGroupName(v string) *ThingGroupDocument { - s.ThingGroupName = &v - return s -} - -// Thing group indexing configuration. -type ThingGroupIndexingConfiguration struct { - _ struct{} `type:"structure"` - - // Thing group indexing mode. - // - // ThingGroupIndexingMode is a required field - ThingGroupIndexingMode *string `locationName:"thingGroupIndexingMode" type:"string" required:"true" enum:"ThingGroupIndexingMode"` -} - -// String returns the string representation -func (s ThingGroupIndexingConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThingGroupIndexingConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ThingGroupIndexingConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ThingGroupIndexingConfiguration"} - if s.ThingGroupIndexingMode == nil { - invalidParams.Add(request.NewErrParamRequired("ThingGroupIndexingMode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetThingGroupIndexingMode sets the ThingGroupIndexingMode field's value. -func (s *ThingGroupIndexingConfiguration) SetThingGroupIndexingMode(v string) *ThingGroupIndexingConfiguration { - s.ThingGroupIndexingMode = &v - return s -} - -// Thing group metadata. -type ThingGroupMetadata struct { - _ struct{} `type:"structure"` - - // The UNIX timestamp of when the thing group was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The parent thing group name. - ParentGroupName *string `locationName:"parentGroupName" min:"1" type:"string"` - - // The root parent thing group. - RootToParentThingGroups []*GroupNameAndArn `locationName:"rootToParentThingGroups" type:"list"` -} - -// String returns the string representation -func (s ThingGroupMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThingGroupMetadata) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *ThingGroupMetadata) SetCreationDate(v time.Time) *ThingGroupMetadata { - s.CreationDate = &v - return s -} - -// SetParentGroupName sets the ParentGroupName field's value. -func (s *ThingGroupMetadata) SetParentGroupName(v string) *ThingGroupMetadata { - s.ParentGroupName = &v - return s -} - -// SetRootToParentThingGroups sets the RootToParentThingGroups field's value. -func (s *ThingGroupMetadata) SetRootToParentThingGroups(v []*GroupNameAndArn) *ThingGroupMetadata { - s.RootToParentThingGroups = v - return s -} - -// Thing group properties. -type ThingGroupProperties struct { - _ struct{} `type:"structure"` - - // The thing group attributes in JSON format. - AttributePayload *AttributePayload `locationName:"attributePayload" type:"structure"` - - // The thing group description. - ThingGroupDescription *string `locationName:"thingGroupDescription" type:"string"` -} - -// String returns the string representation -func (s ThingGroupProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThingGroupProperties) GoString() string { - return s.String() -} - -// SetAttributePayload sets the AttributePayload field's value. -func (s *ThingGroupProperties) SetAttributePayload(v *AttributePayload) *ThingGroupProperties { - s.AttributePayload = v - return s -} - -// SetThingGroupDescription sets the ThingGroupDescription field's value. -func (s *ThingGroupProperties) SetThingGroupDescription(v string) *ThingGroupProperties { - s.ThingGroupDescription = &v - return s -} - -// The thing indexing configuration. For more information, see Managing Thing -// Indexing (https://docs.aws.amazon.com/iot/latest/developerguide/managing-index.html). -type ThingIndexingConfiguration struct { - _ struct{} `type:"structure"` - - // Thing connectivity indexing mode. Valid values are: - // - // * STATUS – Your thing index will contain connectivity status. In order - // to enable thing connectivity indexing, thingIndexMode must not be set - // to OFF. - // - // * OFF - Thing connectivity status indexing is disabled. - ThingConnectivityIndexingMode *string `locationName:"thingConnectivityIndexingMode" type:"string" enum:"ThingConnectivityIndexingMode"` - - // Thing indexing mode. Valid values are: - // - // * REGISTRY – Your thing index will contain only registry data. - // - // * REGISTRY_AND_SHADOW - Your thing index will contain registry and shadow - // data. - // - // * OFF - Thing indexing is disabled. - // - // ThingIndexingMode is a required field - ThingIndexingMode *string `locationName:"thingIndexingMode" type:"string" required:"true" enum:"ThingIndexingMode"` -} - -// String returns the string representation -func (s ThingIndexingConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThingIndexingConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ThingIndexingConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ThingIndexingConfiguration"} - if s.ThingIndexingMode == nil { - invalidParams.Add(request.NewErrParamRequired("ThingIndexingMode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetThingConnectivityIndexingMode sets the ThingConnectivityIndexingMode field's value. -func (s *ThingIndexingConfiguration) SetThingConnectivityIndexingMode(v string) *ThingIndexingConfiguration { - s.ThingConnectivityIndexingMode = &v - return s -} - -// SetThingIndexingMode sets the ThingIndexingMode field's value. -func (s *ThingIndexingConfiguration) SetThingIndexingMode(v string) *ThingIndexingConfiguration { - s.ThingIndexingMode = &v - return s -} - -// The definition of the thing type, including thing type name and description. -type ThingTypeDefinition struct { - _ struct{} `type:"structure"` - - // The thing type ARN. - ThingTypeArn *string `locationName:"thingTypeArn" type:"string"` - - // The ThingTypeMetadata contains additional information about the thing type - // including: creation date and time, a value indicating whether the thing type - // is deprecated, and a date and time when it was deprecated. - ThingTypeMetadata *ThingTypeMetadata `locationName:"thingTypeMetadata" type:"structure"` - - // The name of the thing type. - ThingTypeName *string `locationName:"thingTypeName" min:"1" type:"string"` - - // The ThingTypeProperties for the thing type. - ThingTypeProperties *ThingTypeProperties `locationName:"thingTypeProperties" type:"structure"` -} - -// String returns the string representation -func (s ThingTypeDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThingTypeDefinition) GoString() string { - return s.String() -} - -// SetThingTypeArn sets the ThingTypeArn field's value. -func (s *ThingTypeDefinition) SetThingTypeArn(v string) *ThingTypeDefinition { - s.ThingTypeArn = &v - return s -} - -// SetThingTypeMetadata sets the ThingTypeMetadata field's value. -func (s *ThingTypeDefinition) SetThingTypeMetadata(v *ThingTypeMetadata) *ThingTypeDefinition { - s.ThingTypeMetadata = v - return s -} - -// SetThingTypeName sets the ThingTypeName field's value. -func (s *ThingTypeDefinition) SetThingTypeName(v string) *ThingTypeDefinition { - s.ThingTypeName = &v - return s -} - -// SetThingTypeProperties sets the ThingTypeProperties field's value. -func (s *ThingTypeDefinition) SetThingTypeProperties(v *ThingTypeProperties) *ThingTypeDefinition { - s.ThingTypeProperties = v - return s -} - -// The ThingTypeMetadata contains additional information about the thing type -// including: creation date and time, a value indicating whether the thing type -// is deprecated, and a date and time when time was deprecated. -type ThingTypeMetadata struct { - _ struct{} `type:"structure"` - - // The date and time when the thing type was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // Whether the thing type is deprecated. If true, no new things could be associated - // with this type. - Deprecated *bool `locationName:"deprecated" type:"boolean"` - - // The date and time when the thing type was deprecated. - DeprecationDate *time.Time `locationName:"deprecationDate" type:"timestamp"` -} - -// String returns the string representation -func (s ThingTypeMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThingTypeMetadata) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *ThingTypeMetadata) SetCreationDate(v time.Time) *ThingTypeMetadata { - s.CreationDate = &v - return s -} - -// SetDeprecated sets the Deprecated field's value. -func (s *ThingTypeMetadata) SetDeprecated(v bool) *ThingTypeMetadata { - s.Deprecated = &v - return s -} - -// SetDeprecationDate sets the DeprecationDate field's value. -func (s *ThingTypeMetadata) SetDeprecationDate(v time.Time) *ThingTypeMetadata { - s.DeprecationDate = &v - return s -} - -// The ThingTypeProperties contains information about the thing type including: -// a thing type description, and a list of searchable thing attribute names. -type ThingTypeProperties struct { - _ struct{} `type:"structure"` - - // A list of searchable thing attribute names. - SearchableAttributes []*string `locationName:"searchableAttributes" type:"list"` - - // The description of the thing type. - ThingTypeDescription *string `locationName:"thingTypeDescription" type:"string"` -} - -// String returns the string representation -func (s ThingTypeProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThingTypeProperties) GoString() string { - return s.String() -} - -// SetSearchableAttributes sets the SearchableAttributes field's value. -func (s *ThingTypeProperties) SetSearchableAttributes(v []*string) *ThingTypeProperties { - s.SearchableAttributes = v - return s -} - -// SetThingTypeDescription sets the ThingTypeDescription field's value. -func (s *ThingTypeProperties) SetThingTypeDescription(v string) *ThingTypeProperties { - s.ThingTypeDescription = &v - return s -} - -// Specifies the amount of time each device has to finish its execution of the -// job. A timer is started when the job execution status is set to IN_PROGRESS. -// If the job execution status is not set to another terminal state before the -// timer expires, it will be automatically set to TIMED_OUT. -type TimeoutConfig struct { - _ struct{} `type:"structure"` - - // Specifies the amount of time, in minutes, this device has to finish execution - // of this job. The timeout interval can be anywhere between 1 minute and 7 - // days (1 to 10080 minutes). The in progress timer can't be updated and will - // apply to all job executions for the job. Whenever a job execution remains - // in the IN_PROGRESS status for longer than this interval, the job execution - // will fail and switch to the terminal TIMED_OUT status. - InProgressTimeoutInMinutes *int64 `locationName:"inProgressTimeoutInMinutes" type:"long"` -} - -// String returns the string representation -func (s TimeoutConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimeoutConfig) GoString() string { - return s.String() -} - -// SetInProgressTimeoutInMinutes sets the InProgressTimeoutInMinutes field's value. -func (s *TimeoutConfig) SetInProgressTimeoutInMinutes(v int64) *TimeoutConfig { - s.InProgressTimeoutInMinutes = &v - return s -} - -// Describes a rule. -type TopicRule struct { - _ struct{} `type:"structure"` - - // The actions associated with the rule. - Actions []*Action `locationName:"actions" type:"list"` - - // The version of the SQL rules engine to use when evaluating the rule. - AwsIotSqlVersion *string `locationName:"awsIotSqlVersion" type:"string"` - - // The date and time the rule was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The description of the rule. - Description *string `locationName:"description" type:"string"` - - // The action to perform when an error occurs. - ErrorAction *Action `locationName:"errorAction" type:"structure"` - - // Specifies whether the rule is disabled. - RuleDisabled *bool `locationName:"ruleDisabled" type:"boolean"` - - // The name of the rule. - RuleName *string `locationName:"ruleName" min:"1" type:"string"` - - // The SQL statement used to query the topic. When using a SQL query with multiple - // lines, be sure to escape the newline characters. - Sql *string `locationName:"sql" type:"string"` -} - -// String returns the string representation -func (s TopicRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TopicRule) GoString() string { - return s.String() -} - -// SetActions sets the Actions field's value. -func (s *TopicRule) SetActions(v []*Action) *TopicRule { - s.Actions = v - return s -} - -// SetAwsIotSqlVersion sets the AwsIotSqlVersion field's value. -func (s *TopicRule) SetAwsIotSqlVersion(v string) *TopicRule { - s.AwsIotSqlVersion = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *TopicRule) SetCreatedAt(v time.Time) *TopicRule { - s.CreatedAt = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *TopicRule) SetDescription(v string) *TopicRule { - s.Description = &v - return s -} - -// SetErrorAction sets the ErrorAction field's value. -func (s *TopicRule) SetErrorAction(v *Action) *TopicRule { - s.ErrorAction = v - return s -} - -// SetRuleDisabled sets the RuleDisabled field's value. -func (s *TopicRule) SetRuleDisabled(v bool) *TopicRule { - s.RuleDisabled = &v - return s -} - -// SetRuleName sets the RuleName field's value. -func (s *TopicRule) SetRuleName(v string) *TopicRule { - s.RuleName = &v - return s -} - -// SetSql sets the Sql field's value. -func (s *TopicRule) SetSql(v string) *TopicRule { - s.Sql = &v - return s -} - -// Describes a rule. -type TopicRuleListItem struct { - _ struct{} `type:"structure"` - - // The date and time the rule was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The rule ARN. - RuleArn *string `locationName:"ruleArn" type:"string"` - - // Specifies whether the rule is disabled. - RuleDisabled *bool `locationName:"ruleDisabled" type:"boolean"` - - // The name of the rule. - RuleName *string `locationName:"ruleName" min:"1" type:"string"` - - // The pattern for the topic names that apply. - TopicPattern *string `locationName:"topicPattern" type:"string"` -} - -// String returns the string representation -func (s TopicRuleListItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TopicRuleListItem) GoString() string { - return s.String() -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *TopicRuleListItem) SetCreatedAt(v time.Time) *TopicRuleListItem { - s.CreatedAt = &v - return s -} - -// SetRuleArn sets the RuleArn field's value. -func (s *TopicRuleListItem) SetRuleArn(v string) *TopicRuleListItem { - s.RuleArn = &v - return s -} - -// SetRuleDisabled sets the RuleDisabled field's value. -func (s *TopicRuleListItem) SetRuleDisabled(v bool) *TopicRuleListItem { - s.RuleDisabled = &v - return s -} - -// SetRuleName sets the RuleName field's value. -func (s *TopicRuleListItem) SetRuleName(v string) *TopicRuleListItem { - s.RuleName = &v - return s -} - -// SetTopicPattern sets the TopicPattern field's value. -func (s *TopicRuleListItem) SetTopicPattern(v string) *TopicRuleListItem { - s.TopicPattern = &v - return s -} - -// Describes a rule. -type TopicRulePayload struct { - _ struct{} `type:"structure"` - - // The actions associated with the rule. - // - // Actions is a required field - Actions []*Action `locationName:"actions" type:"list" required:"true"` - - // The version of the SQL rules engine to use when evaluating the rule. - AwsIotSqlVersion *string `locationName:"awsIotSqlVersion" type:"string"` - - // The description of the rule. - Description *string `locationName:"description" type:"string"` - - // The action to take when an error occurs. - ErrorAction *Action `locationName:"errorAction" type:"structure"` - - // Specifies whether the rule is disabled. - RuleDisabled *bool `locationName:"ruleDisabled" type:"boolean"` - - // The SQL statement used to query the topic. For more information, see AWS - // IoT SQL Reference (http://docs.aws.amazon.com/iot/latest/developerguide/iot-rules.html#aws-iot-sql-reference) - // in the AWS IoT Developer Guide. - // - // Sql is a required field - Sql *string `locationName:"sql" type:"string" required:"true"` -} - -// String returns the string representation -func (s TopicRulePayload) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TopicRulePayload) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TopicRulePayload) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TopicRulePayload"} - if s.Actions == nil { - invalidParams.Add(request.NewErrParamRequired("Actions")) - } - if s.Sql == nil { - invalidParams.Add(request.NewErrParamRequired("Sql")) - } - if s.Actions != nil { - for i, v := range s.Actions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Actions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ErrorAction != nil { - if err := s.ErrorAction.Validate(); err != nil { - invalidParams.AddNested("ErrorAction", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActions sets the Actions field's value. -func (s *TopicRulePayload) SetActions(v []*Action) *TopicRulePayload { - s.Actions = v - return s -} - -// SetAwsIotSqlVersion sets the AwsIotSqlVersion field's value. -func (s *TopicRulePayload) SetAwsIotSqlVersion(v string) *TopicRulePayload { - s.AwsIotSqlVersion = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *TopicRulePayload) SetDescription(v string) *TopicRulePayload { - s.Description = &v - return s -} - -// SetErrorAction sets the ErrorAction field's value. -func (s *TopicRulePayload) SetErrorAction(v *Action) *TopicRulePayload { - s.ErrorAction = v - return s -} - -// SetRuleDisabled sets the RuleDisabled field's value. -func (s *TopicRulePayload) SetRuleDisabled(v bool) *TopicRulePayload { - s.RuleDisabled = &v - return s -} - -// SetSql sets the Sql field's value. -func (s *TopicRulePayload) SetSql(v string) *TopicRulePayload { - s.Sql = &v - return s -} - -// The input for the TransferCertificate operation. -type TransferCertificateInput struct { - _ struct{} `type:"structure"` - - // The ID of the certificate. (The last part of the certificate ARN contains - // the certificate ID.) - // - // CertificateId is a required field - CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` - - // The AWS account. - // - // TargetAwsAccount is a required field - TargetAwsAccount *string `location:"querystring" locationName:"targetAwsAccount" min:"12" type:"string" required:"true"` - - // The transfer message. - TransferMessage *string `locationName:"transferMessage" type:"string"` -} - -// String returns the string representation -func (s TransferCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransferCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TransferCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TransferCertificateInput"} - if s.CertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateId")) - } - if s.CertificateId != nil && len(*s.CertificateId) < 64 { - invalidParams.Add(request.NewErrParamMinLen("CertificateId", 64)) - } - if s.TargetAwsAccount == nil { - invalidParams.Add(request.NewErrParamRequired("TargetAwsAccount")) - } - if s.TargetAwsAccount != nil && len(*s.TargetAwsAccount) < 12 { - invalidParams.Add(request.NewErrParamMinLen("TargetAwsAccount", 12)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateId sets the CertificateId field's value. -func (s *TransferCertificateInput) SetCertificateId(v string) *TransferCertificateInput { - s.CertificateId = &v - return s -} - -// SetTargetAwsAccount sets the TargetAwsAccount field's value. -func (s *TransferCertificateInput) SetTargetAwsAccount(v string) *TransferCertificateInput { - s.TargetAwsAccount = &v - return s -} - -// SetTransferMessage sets the TransferMessage field's value. -func (s *TransferCertificateInput) SetTransferMessage(v string) *TransferCertificateInput { - s.TransferMessage = &v - return s -} - -// The output from the TransferCertificate operation. -type TransferCertificateOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the certificate. - TransferredCertificateArn *string `locationName:"transferredCertificateArn" type:"string"` -} - -// String returns the string representation -func (s TransferCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransferCertificateOutput) GoString() string { - return s.String() -} - -// SetTransferredCertificateArn sets the TransferredCertificateArn field's value. -func (s *TransferCertificateOutput) SetTransferredCertificateArn(v string) *TransferCertificateOutput { - s.TransferredCertificateArn = &v - return s -} - -// Data used to transfer a certificate to an AWS account. -type TransferData struct { - _ struct{} `type:"structure"` - - // The date the transfer was accepted. - AcceptDate *time.Time `locationName:"acceptDate" type:"timestamp"` - - // The date the transfer was rejected. - RejectDate *time.Time `locationName:"rejectDate" type:"timestamp"` - - // The reason why the transfer was rejected. - RejectReason *string `locationName:"rejectReason" type:"string"` - - // The date the transfer took place. - TransferDate *time.Time `locationName:"transferDate" type:"timestamp"` - - // The transfer message. - TransferMessage *string `locationName:"transferMessage" type:"string"` -} - -// String returns the string representation -func (s TransferData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransferData) GoString() string { - return s.String() -} - -// SetAcceptDate sets the AcceptDate field's value. -func (s *TransferData) SetAcceptDate(v time.Time) *TransferData { - s.AcceptDate = &v - return s -} - -// SetRejectDate sets the RejectDate field's value. -func (s *TransferData) SetRejectDate(v time.Time) *TransferData { - s.RejectDate = &v - return s -} - -// SetRejectReason sets the RejectReason field's value. -func (s *TransferData) SetRejectReason(v string) *TransferData { - s.RejectReason = &v - return s -} - -// SetTransferDate sets the TransferDate field's value. -func (s *TransferData) SetTransferDate(v time.Time) *TransferData { - s.TransferDate = &v - return s -} - -// SetTransferMessage sets the TransferMessage field's value. -func (s *TransferData) SetTransferMessage(v string) *TransferData { - s.TransferMessage = &v - return s -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The ARN of the resource. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` - - // A list of the keys of the tags to be removed from the resource. - // - // TagKeys is a required field - TagKeys []*string `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.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UpdateAccountAuditConfigurationInput struct { - _ struct{} `type:"structure"` - - // Specifies which audit checks are enabled and disabled for this account. Use - // DescribeAccountAuditConfiguration to see the list of all checks including - // those that are currently enabled. - // - // Note that some data collection may begin immediately when certain checks - // are enabled. When a check is disabled, any data collected so far in relation - // to the check is deleted. - // - // You cannot disable a check if it is used by any scheduled audit. You must - // first delete the check from the scheduled audit or delete the scheduled audit - // itself. - // - // On the first call to UpdateAccountAuditConfiguration this parameter is required - // and must specify at least one enabled check. - AuditCheckConfigurations map[string]*AuditCheckConfiguration `locationName:"auditCheckConfigurations" type:"map"` - - // Information about the targets to which audit notifications are sent. - AuditNotificationTargetConfigurations map[string]*AuditNotificationTarget `locationName:"auditNotificationTargetConfigurations" type:"map"` - - // The ARN of the role that grants permission to AWS IoT to access information - // about your devices, policies, certificates and other items as necessary when - // performing an audit. - RoleArn *string `locationName:"roleArn" min:"20" type:"string"` -} - -// String returns the string representation -func (s UpdateAccountAuditConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAccountAuditConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAccountAuditConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAccountAuditConfigurationInput"} - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.AuditNotificationTargetConfigurations != nil { - for i, v := range s.AuditNotificationTargetConfigurations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AuditNotificationTargetConfigurations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuditCheckConfigurations sets the AuditCheckConfigurations field's value. -func (s *UpdateAccountAuditConfigurationInput) SetAuditCheckConfigurations(v map[string]*AuditCheckConfiguration) *UpdateAccountAuditConfigurationInput { - s.AuditCheckConfigurations = v - return s -} - -// SetAuditNotificationTargetConfigurations sets the AuditNotificationTargetConfigurations field's value. -func (s *UpdateAccountAuditConfigurationInput) SetAuditNotificationTargetConfigurations(v map[string]*AuditNotificationTarget) *UpdateAccountAuditConfigurationInput { - s.AuditNotificationTargetConfigurations = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *UpdateAccountAuditConfigurationInput) SetRoleArn(v string) *UpdateAccountAuditConfigurationInput { - s.RoleArn = &v - return s -} - -type UpdateAccountAuditConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateAccountAuditConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAccountAuditConfigurationOutput) GoString() string { - return s.String() -} - -type UpdateAuthorizerInput struct { - _ struct{} `type:"structure"` - - // The ARN of the authorizer's Lambda function. - AuthorizerFunctionArn *string `locationName:"authorizerFunctionArn" type:"string"` - - // The authorizer name. - // - // AuthorizerName is a required field - AuthorizerName *string `location:"uri" locationName:"authorizerName" min:"1" type:"string" required:"true"` - - // The status of the update authorizer request. - Status *string `locationName:"status" type:"string" enum:"AuthorizerStatus"` - - // The key used to extract the token from the HTTP headers. - TokenKeyName *string `locationName:"tokenKeyName" min:"1" type:"string"` - - // The public keys used to verify the token signature. - TokenSigningPublicKeys map[string]*string `locationName:"tokenSigningPublicKeys" type:"map"` -} - -// String returns the string representation -func (s UpdateAuthorizerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAuthorizerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAuthorizerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAuthorizerInput"} - if s.AuthorizerName == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizerName")) - } - if s.AuthorizerName != nil && len(*s.AuthorizerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AuthorizerName", 1)) - } - if s.TokenKeyName != nil && len(*s.TokenKeyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TokenKeyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthorizerFunctionArn sets the AuthorizerFunctionArn field's value. -func (s *UpdateAuthorizerInput) SetAuthorizerFunctionArn(v string) *UpdateAuthorizerInput { - s.AuthorizerFunctionArn = &v - return s -} - -// SetAuthorizerName sets the AuthorizerName field's value. -func (s *UpdateAuthorizerInput) SetAuthorizerName(v string) *UpdateAuthorizerInput { - s.AuthorizerName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateAuthorizerInput) SetStatus(v string) *UpdateAuthorizerInput { - s.Status = &v - return s -} - -// SetTokenKeyName sets the TokenKeyName field's value. -func (s *UpdateAuthorizerInput) SetTokenKeyName(v string) *UpdateAuthorizerInput { - s.TokenKeyName = &v - return s -} - -// SetTokenSigningPublicKeys sets the TokenSigningPublicKeys field's value. -func (s *UpdateAuthorizerInput) SetTokenSigningPublicKeys(v map[string]*string) *UpdateAuthorizerInput { - s.TokenSigningPublicKeys = v - return s -} - -type UpdateAuthorizerOutput struct { - _ struct{} `type:"structure"` - - // The authorizer ARN. - AuthorizerArn *string `locationName:"authorizerArn" type:"string"` - - // The authorizer name. - AuthorizerName *string `locationName:"authorizerName" min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateAuthorizerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAuthorizerOutput) GoString() string { - return s.String() -} - -// SetAuthorizerArn sets the AuthorizerArn field's value. -func (s *UpdateAuthorizerOutput) SetAuthorizerArn(v string) *UpdateAuthorizerOutput { - s.AuthorizerArn = &v - return s -} - -// SetAuthorizerName sets the AuthorizerName field's value. -func (s *UpdateAuthorizerOutput) SetAuthorizerName(v string) *UpdateAuthorizerOutput { - s.AuthorizerName = &v - return s -} - -type UpdateBillingGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the billing group. - // - // BillingGroupName is a required field - BillingGroupName *string `location:"uri" locationName:"billingGroupName" min:"1" type:"string" required:"true"` - - // The properties of the billing group. - // - // BillingGroupProperties is a required field - BillingGroupProperties *BillingGroupProperties `locationName:"billingGroupProperties" type:"structure" required:"true"` - - // The expected version of the billing group. If the version of the billing - // group does not match the expected version specified in the request, the UpdateBillingGroup - // request is rejected with a VersionConflictException. - ExpectedVersion *int64 `locationName:"expectedVersion" type:"long"` -} - -// String returns the string representation -func (s UpdateBillingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBillingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateBillingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateBillingGroupInput"} - if s.BillingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("BillingGroupName")) - } - if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) - } - if s.BillingGroupProperties == nil { - invalidParams.Add(request.NewErrParamRequired("BillingGroupProperties")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBillingGroupName sets the BillingGroupName field's value. -func (s *UpdateBillingGroupInput) SetBillingGroupName(v string) *UpdateBillingGroupInput { - s.BillingGroupName = &v - return s -} - -// SetBillingGroupProperties sets the BillingGroupProperties field's value. -func (s *UpdateBillingGroupInput) SetBillingGroupProperties(v *BillingGroupProperties) *UpdateBillingGroupInput { - s.BillingGroupProperties = v - return s -} - -// SetExpectedVersion sets the ExpectedVersion field's value. -func (s *UpdateBillingGroupInput) SetExpectedVersion(v int64) *UpdateBillingGroupInput { - s.ExpectedVersion = &v - return s -} - -type UpdateBillingGroupOutput struct { - _ struct{} `type:"structure"` - - // The latest version of the billing group. - Version *int64 `locationName:"version" type:"long"` -} - -// String returns the string representation -func (s UpdateBillingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBillingGroupOutput) GoString() string { - return s.String() -} - -// SetVersion sets the Version field's value. -func (s *UpdateBillingGroupOutput) SetVersion(v int64) *UpdateBillingGroupOutput { - s.Version = &v - return s -} - -// The input to the UpdateCACertificate operation. -type UpdateCACertificateInput struct { - _ struct{} `type:"structure"` - - // The CA certificate identifier. - // - // CertificateId is a required field - CertificateId *string `location:"uri" locationName:"caCertificateId" min:"64" type:"string" required:"true"` - - // The new value for the auto registration status. Valid values are: "ENABLE" - // or "DISABLE". - NewAutoRegistrationStatus *string `location:"querystring" locationName:"newAutoRegistrationStatus" type:"string" enum:"AutoRegistrationStatus"` - - // The updated status of the CA certificate. - // - // Note: The status value REGISTER_INACTIVE is deprecated and should not be - // used. - NewStatus *string `location:"querystring" locationName:"newStatus" type:"string" enum:"CACertificateStatus"` - - // Information about the registration configuration. - RegistrationConfig *RegistrationConfig `locationName:"registrationConfig" type:"structure"` - - // If true, remove auto registration. - RemoveAutoRegistration *bool `locationName:"removeAutoRegistration" type:"boolean"` -} - -// String returns the string representation -func (s UpdateCACertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCACertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCACertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCACertificateInput"} - if s.CertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateId")) - } - if s.CertificateId != nil && len(*s.CertificateId) < 64 { - invalidParams.Add(request.NewErrParamMinLen("CertificateId", 64)) - } - if s.RegistrationConfig != nil { - if err := s.RegistrationConfig.Validate(); err != nil { - invalidParams.AddNested("RegistrationConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateId sets the CertificateId field's value. -func (s *UpdateCACertificateInput) SetCertificateId(v string) *UpdateCACertificateInput { - s.CertificateId = &v - return s -} - -// SetNewAutoRegistrationStatus sets the NewAutoRegistrationStatus field's value. -func (s *UpdateCACertificateInput) SetNewAutoRegistrationStatus(v string) *UpdateCACertificateInput { - s.NewAutoRegistrationStatus = &v - return s -} - -// SetNewStatus sets the NewStatus field's value. -func (s *UpdateCACertificateInput) SetNewStatus(v string) *UpdateCACertificateInput { - s.NewStatus = &v - return s -} - -// SetRegistrationConfig sets the RegistrationConfig field's value. -func (s *UpdateCACertificateInput) SetRegistrationConfig(v *RegistrationConfig) *UpdateCACertificateInput { - s.RegistrationConfig = v - return s -} - -// SetRemoveAutoRegistration sets the RemoveAutoRegistration field's value. -func (s *UpdateCACertificateInput) SetRemoveAutoRegistration(v bool) *UpdateCACertificateInput { - s.RemoveAutoRegistration = &v - return s -} - -type UpdateCACertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateCACertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCACertificateOutput) GoString() string { - return s.String() -} - -// The input for the UpdateCertificate operation. -type UpdateCertificateInput struct { - _ struct{} `type:"structure"` - - // The ID of the certificate. (The last part of the certificate ARN contains - // the certificate ID.) - // - // CertificateId is a required field - CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` - - // The new status. - // - // Note: Setting the status to PENDING_TRANSFER will result in an exception - // being thrown. PENDING_TRANSFER is a status used internally by AWS IoT. It - // is not intended for developer use. - // - // Note: The status value REGISTER_INACTIVE is deprecated and should not be - // used. - // - // NewStatus is a required field - NewStatus *string `location:"querystring" locationName:"newStatus" type:"string" required:"true" enum:"CertificateStatus"` -} - -// String returns the string representation -func (s UpdateCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCertificateInput"} - if s.CertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateId")) - } - if s.CertificateId != nil && len(*s.CertificateId) < 64 { - invalidParams.Add(request.NewErrParamMinLen("CertificateId", 64)) - } - if s.NewStatus == nil { - invalidParams.Add(request.NewErrParamRequired("NewStatus")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateId sets the CertificateId field's value. -func (s *UpdateCertificateInput) SetCertificateId(v string) *UpdateCertificateInput { - s.CertificateId = &v - return s -} - -// SetNewStatus sets the NewStatus field's value. -func (s *UpdateCertificateInput) SetNewStatus(v string) *UpdateCertificateInput { - s.NewStatus = &v - return s -} - -type UpdateCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCertificateOutput) GoString() string { - return s.String() -} - -type UpdateDynamicThingGroupInput struct { - _ struct{} `type:"structure"` - - // The expected version of the dynamic thing group to update. - ExpectedVersion *int64 `locationName:"expectedVersion" type:"long"` - - // The dynamic thing group index to update. - // - // Currently one index is supported: 'AWS_Things'. - IndexName *string `locationName:"indexName" min:"1" type:"string"` - - // The dynamic thing group search query string to update. - QueryString *string `locationName:"queryString" min:"1" type:"string"` - - // The dynamic thing group query version to update. - // - // Currently one query version is supported: "2017-09-30". If not specified, - // the query version defaults to this value. - QueryVersion *string `locationName:"queryVersion" type:"string"` - - // The name of the dynamic thing group to update. - // - // ThingGroupName is a required field - ThingGroupName *string `location:"uri" locationName:"thingGroupName" min:"1" type:"string" required:"true"` - - // The dynamic thing group properties to update. - // - // ThingGroupProperties is a required field - ThingGroupProperties *ThingGroupProperties `locationName:"thingGroupProperties" type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateDynamicThingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDynamicThingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDynamicThingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDynamicThingGroupInput"} - if s.IndexName != nil && len(*s.IndexName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IndexName", 1)) - } - if s.QueryString != nil && len(*s.QueryString) < 1 { - invalidParams.Add(request.NewErrParamMinLen("QueryString", 1)) - } - if s.ThingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ThingGroupName")) - } - if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 1)) - } - if s.ThingGroupProperties == nil { - invalidParams.Add(request.NewErrParamRequired("ThingGroupProperties")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExpectedVersion sets the ExpectedVersion field's value. -func (s *UpdateDynamicThingGroupInput) SetExpectedVersion(v int64) *UpdateDynamicThingGroupInput { - s.ExpectedVersion = &v - return s -} - -// SetIndexName sets the IndexName field's value. -func (s *UpdateDynamicThingGroupInput) SetIndexName(v string) *UpdateDynamicThingGroupInput { - s.IndexName = &v - return s -} - -// SetQueryString sets the QueryString field's value. -func (s *UpdateDynamicThingGroupInput) SetQueryString(v string) *UpdateDynamicThingGroupInput { - s.QueryString = &v - return s -} - -// SetQueryVersion sets the QueryVersion field's value. -func (s *UpdateDynamicThingGroupInput) SetQueryVersion(v string) *UpdateDynamicThingGroupInput { - s.QueryVersion = &v - return s -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *UpdateDynamicThingGroupInput) SetThingGroupName(v string) *UpdateDynamicThingGroupInput { - s.ThingGroupName = &v - return s -} - -// SetThingGroupProperties sets the ThingGroupProperties field's value. -func (s *UpdateDynamicThingGroupInput) SetThingGroupProperties(v *ThingGroupProperties) *UpdateDynamicThingGroupInput { - s.ThingGroupProperties = v - return s -} - -type UpdateDynamicThingGroupOutput struct { - _ struct{} `type:"structure"` - - // The dynamic thing group version. - Version *int64 `locationName:"version" type:"long"` -} - -// String returns the string representation -func (s UpdateDynamicThingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDynamicThingGroupOutput) GoString() string { - return s.String() -} - -// SetVersion sets the Version field's value. -func (s *UpdateDynamicThingGroupOutput) SetVersion(v int64) *UpdateDynamicThingGroupOutput { - s.Version = &v - return s -} - -type UpdateEventConfigurationsInput struct { - _ struct{} `type:"structure"` - - // The new event configuration values. - EventConfigurations map[string]*Configuration `locationName:"eventConfigurations" type:"map"` -} - -// String returns the string representation -func (s UpdateEventConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEventConfigurationsInput) GoString() string { - return s.String() -} - -// SetEventConfigurations sets the EventConfigurations field's value. -func (s *UpdateEventConfigurationsInput) SetEventConfigurations(v map[string]*Configuration) *UpdateEventConfigurationsInput { - s.EventConfigurations = v - return s -} - -type UpdateEventConfigurationsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateEventConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEventConfigurationsOutput) GoString() string { - return s.String() -} - -type UpdateIndexingConfigurationInput struct { - _ struct{} `type:"structure"` - - // Thing group indexing configuration. - ThingGroupIndexingConfiguration *ThingGroupIndexingConfiguration `locationName:"thingGroupIndexingConfiguration" type:"structure"` - - // Thing indexing configuration. - ThingIndexingConfiguration *ThingIndexingConfiguration `locationName:"thingIndexingConfiguration" type:"structure"` -} - -// String returns the string representation -func (s UpdateIndexingConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIndexingConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateIndexingConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateIndexingConfigurationInput"} - if s.ThingGroupIndexingConfiguration != nil { - if err := s.ThingGroupIndexingConfiguration.Validate(); err != nil { - invalidParams.AddNested("ThingGroupIndexingConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.ThingIndexingConfiguration != nil { - if err := s.ThingIndexingConfiguration.Validate(); err != nil { - invalidParams.AddNested("ThingIndexingConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetThingGroupIndexingConfiguration sets the ThingGroupIndexingConfiguration field's value. -func (s *UpdateIndexingConfigurationInput) SetThingGroupIndexingConfiguration(v *ThingGroupIndexingConfiguration) *UpdateIndexingConfigurationInput { - s.ThingGroupIndexingConfiguration = v - return s -} - -// SetThingIndexingConfiguration sets the ThingIndexingConfiguration field's value. -func (s *UpdateIndexingConfigurationInput) SetThingIndexingConfiguration(v *ThingIndexingConfiguration) *UpdateIndexingConfigurationInput { - s.ThingIndexingConfiguration = v - return s -} - -type UpdateIndexingConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateIndexingConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIndexingConfigurationOutput) GoString() string { - return s.String() -} - -type UpdateJobInput struct { - _ struct{} `type:"structure"` - - // Allows you to create criteria to abort a job. - AbortConfig *AbortConfig `locationName:"abortConfig" type:"structure"` - - // A short text description of the job. - Description *string `locationName:"description" type:"string"` - - // Allows you to create a staged rollout of the job. - JobExecutionsRolloutConfig *JobExecutionsRolloutConfig `locationName:"jobExecutionsRolloutConfig" type:"structure"` - - // The ID of the job to be updated. - // - // JobId is a required field - JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` - - // Configuration information for pre-signed S3 URLs. - PresignedUrlConfig *PresignedUrlConfig `locationName:"presignedUrlConfig" type:"structure"` - - // Specifies the amount of time each device has to finish its execution of the - // job. The timer is started when the job execution status is set to IN_PROGRESS. - // If the job execution status is not set to another terminal state before the - // time expires, it will be automatically set to TIMED_OUT. - TimeoutConfig *TimeoutConfig `locationName:"timeoutConfig" type:"structure"` -} - -// String returns the string representation -func (s UpdateJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateJobInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - if s.AbortConfig != nil { - if err := s.AbortConfig.Validate(); err != nil { - invalidParams.AddNested("AbortConfig", err.(request.ErrInvalidParams)) - } - } - if s.JobExecutionsRolloutConfig != nil { - if err := s.JobExecutionsRolloutConfig.Validate(); err != nil { - invalidParams.AddNested("JobExecutionsRolloutConfig", err.(request.ErrInvalidParams)) - } - } - if s.PresignedUrlConfig != nil { - if err := s.PresignedUrlConfig.Validate(); err != nil { - invalidParams.AddNested("PresignedUrlConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAbortConfig sets the AbortConfig field's value. -func (s *UpdateJobInput) SetAbortConfig(v *AbortConfig) *UpdateJobInput { - s.AbortConfig = v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateJobInput) SetDescription(v string) *UpdateJobInput { - s.Description = &v - return s -} - -// SetJobExecutionsRolloutConfig sets the JobExecutionsRolloutConfig field's value. -func (s *UpdateJobInput) SetJobExecutionsRolloutConfig(v *JobExecutionsRolloutConfig) *UpdateJobInput { - s.JobExecutionsRolloutConfig = v - return s -} - -// SetJobId sets the JobId field's value. -func (s *UpdateJobInput) SetJobId(v string) *UpdateJobInput { - s.JobId = &v - return s -} - -// SetPresignedUrlConfig sets the PresignedUrlConfig field's value. -func (s *UpdateJobInput) SetPresignedUrlConfig(v *PresignedUrlConfig) *UpdateJobInput { - s.PresignedUrlConfig = v - return s -} - -// SetTimeoutConfig sets the TimeoutConfig field's value. -func (s *UpdateJobInput) SetTimeoutConfig(v *TimeoutConfig) *UpdateJobInput { - s.TimeoutConfig = v - return s -} - -type UpdateJobOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateJobOutput) GoString() string { - return s.String() -} - -type UpdateRoleAliasInput struct { - _ struct{} `type:"structure"` - - // The number of seconds the credential will be valid. - CredentialDurationSeconds *int64 `locationName:"credentialDurationSeconds" min:"900" type:"integer"` - - // The role alias to update. - // - // RoleAlias is a required field - RoleAlias *string `location:"uri" locationName:"roleAlias" min:"1" type:"string" required:"true"` - - // The role ARN. - RoleArn *string `locationName:"roleArn" min:"20" type:"string"` -} - -// String returns the string representation -func (s UpdateRoleAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRoleAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRoleAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRoleAliasInput"} - if s.CredentialDurationSeconds != nil && *s.CredentialDurationSeconds < 900 { - invalidParams.Add(request.NewErrParamMinValue("CredentialDurationSeconds", 900)) - } - if s.RoleAlias == nil { - invalidParams.Add(request.NewErrParamRequired("RoleAlias")) - } - if s.RoleAlias != nil && len(*s.RoleAlias) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleAlias", 1)) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCredentialDurationSeconds sets the CredentialDurationSeconds field's value. -func (s *UpdateRoleAliasInput) SetCredentialDurationSeconds(v int64) *UpdateRoleAliasInput { - s.CredentialDurationSeconds = &v - return s -} - -// SetRoleAlias sets the RoleAlias field's value. -func (s *UpdateRoleAliasInput) SetRoleAlias(v string) *UpdateRoleAliasInput { - s.RoleAlias = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *UpdateRoleAliasInput) SetRoleArn(v string) *UpdateRoleAliasInput { - s.RoleArn = &v - return s -} - -type UpdateRoleAliasOutput struct { - _ struct{} `type:"structure"` - - // The role alias. - RoleAlias *string `locationName:"roleAlias" min:"1" type:"string"` - - // The role alias ARN. - RoleAliasArn *string `locationName:"roleAliasArn" type:"string"` -} - -// String returns the string representation -func (s UpdateRoleAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRoleAliasOutput) GoString() string { - return s.String() -} - -// SetRoleAlias sets the RoleAlias field's value. -func (s *UpdateRoleAliasOutput) SetRoleAlias(v string) *UpdateRoleAliasOutput { - s.RoleAlias = &v - return s -} - -// SetRoleAliasArn sets the RoleAliasArn field's value. -func (s *UpdateRoleAliasOutput) SetRoleAliasArn(v string) *UpdateRoleAliasOutput { - s.RoleAliasArn = &v - return s -} - -type UpdateScheduledAuditInput struct { - _ struct{} `type:"structure"` - - // The day of the month on which the scheduled audit takes place. Can be "1" - // through "31" or "LAST". This field is required if the "frequency" parameter - // is set to "MONTHLY". If days 29-31 are specified, and the month does not - // have that many days, the audit takes place on the "LAST" day of the month. - DayOfMonth *string `locationName:"dayOfMonth" type:"string"` - - // The day of the week on which the scheduled audit takes place. Can be one - // of "SUN", "MON", "TUE", "WED", "THU", "FRI" or "SAT". This field is required - // if the "frequency" parameter is set to "WEEKLY" or "BIWEEKLY". - DayOfWeek *string `locationName:"dayOfWeek" type:"string" enum:"DayOfWeek"` - - // How often the scheduled audit takes place. Can be one of "DAILY", "WEEKLY", - // "BIWEEKLY" or "MONTHLY". The actual start time of each audit is determined - // by the system. - Frequency *string `locationName:"frequency" type:"string" enum:"AuditFrequency"` - - // The name of the scheduled audit. (Max. 128 chars) - // - // ScheduledAuditName is a required field - ScheduledAuditName *string `location:"uri" locationName:"scheduledAuditName" min:"1" type:"string" required:"true"` - - // Which checks are performed during the scheduled audit. Checks must be enabled - // for your account. (Use DescribeAccountAuditConfiguration to see the list - // of all checks including those that are enabled or UpdateAccountAuditConfiguration - // to select which checks are enabled.) - TargetCheckNames []*string `locationName:"targetCheckNames" type:"list"` -} - -// String returns the string representation -func (s UpdateScheduledAuditInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateScheduledAuditInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateScheduledAuditInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateScheduledAuditInput"} - if s.ScheduledAuditName == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduledAuditName")) - } - if s.ScheduledAuditName != nil && len(*s.ScheduledAuditName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScheduledAuditName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDayOfMonth sets the DayOfMonth field's value. -func (s *UpdateScheduledAuditInput) SetDayOfMonth(v string) *UpdateScheduledAuditInput { - s.DayOfMonth = &v - return s -} - -// SetDayOfWeek sets the DayOfWeek field's value. -func (s *UpdateScheduledAuditInput) SetDayOfWeek(v string) *UpdateScheduledAuditInput { - s.DayOfWeek = &v - return s -} - -// SetFrequency sets the Frequency field's value. -func (s *UpdateScheduledAuditInput) SetFrequency(v string) *UpdateScheduledAuditInput { - s.Frequency = &v - return s -} - -// SetScheduledAuditName sets the ScheduledAuditName field's value. -func (s *UpdateScheduledAuditInput) SetScheduledAuditName(v string) *UpdateScheduledAuditInput { - s.ScheduledAuditName = &v - return s -} - -// SetTargetCheckNames sets the TargetCheckNames field's value. -func (s *UpdateScheduledAuditInput) SetTargetCheckNames(v []*string) *UpdateScheduledAuditInput { - s.TargetCheckNames = v - return s -} - -type UpdateScheduledAuditOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the scheduled audit. - ScheduledAuditArn *string `locationName:"scheduledAuditArn" type:"string"` -} - -// String returns the string representation -func (s UpdateScheduledAuditOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateScheduledAuditOutput) GoString() string { - return s.String() -} - -// SetScheduledAuditArn sets the ScheduledAuditArn field's value. -func (s *UpdateScheduledAuditOutput) SetScheduledAuditArn(v string) *UpdateScheduledAuditOutput { - s.ScheduledAuditArn = &v - return s -} - -type UpdateSecurityProfileInput struct { - _ struct{} `type:"structure"` - - // Where the alerts are sent. (Alerts are always sent to the console.) - AlertTargets map[string]*AlertTarget `locationName:"alertTargets" type:"map"` - - // Specifies the behaviors that, when violated by a device (thing), cause an - // alert. - Behaviors []*Behavior `locationName:"behaviors" type:"list"` - - // The expected version of the security profile. A new version is generated - // whenever the security profile is updated. If you specify a value that is - // different than the actual version, a VersionConflictException is thrown. - ExpectedVersion *int64 `location:"querystring" locationName:"expectedVersion" type:"long"` - - // A description of the security profile. - SecurityProfileDescription *string `locationName:"securityProfileDescription" type:"string"` - - // The name of the security profile you want to update. - // - // SecurityProfileName is a required field - SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateSecurityProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSecurityProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSecurityProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSecurityProfileInput"} - if s.SecurityProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityProfileName")) - } - if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) - } - if s.AlertTargets != nil { - for i, v := range s.AlertTargets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AlertTargets", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Behaviors != nil { - for i, v := range s.Behaviors { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Behaviors", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlertTargets sets the AlertTargets field's value. -func (s *UpdateSecurityProfileInput) SetAlertTargets(v map[string]*AlertTarget) *UpdateSecurityProfileInput { - s.AlertTargets = v - return s -} - -// SetBehaviors sets the Behaviors field's value. -func (s *UpdateSecurityProfileInput) SetBehaviors(v []*Behavior) *UpdateSecurityProfileInput { - s.Behaviors = v - return s -} - -// SetExpectedVersion sets the ExpectedVersion field's value. -func (s *UpdateSecurityProfileInput) SetExpectedVersion(v int64) *UpdateSecurityProfileInput { - s.ExpectedVersion = &v - return s -} - -// SetSecurityProfileDescription sets the SecurityProfileDescription field's value. -func (s *UpdateSecurityProfileInput) SetSecurityProfileDescription(v string) *UpdateSecurityProfileInput { - s.SecurityProfileDescription = &v - return s -} - -// SetSecurityProfileName sets the SecurityProfileName field's value. -func (s *UpdateSecurityProfileInput) SetSecurityProfileName(v string) *UpdateSecurityProfileInput { - s.SecurityProfileName = &v - return s -} - -type UpdateSecurityProfileOutput struct { - _ struct{} `type:"structure"` - - // Where the alerts are sent. (Alerts are always sent to the console.) - AlertTargets map[string]*AlertTarget `locationName:"alertTargets" type:"map"` - - // Specifies the behaviors that, when violated by a device (thing), cause an - // alert. - Behaviors []*Behavior `locationName:"behaviors" type:"list"` - - // The time the security profile was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` - - // The time the security profile was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` - - // The ARN of the security profile that was updated. - SecurityProfileArn *string `locationName:"securityProfileArn" type:"string"` - - // The description of the security profile. - SecurityProfileDescription *string `locationName:"securityProfileDescription" type:"string"` - - // The name of the security profile that was updated. - SecurityProfileName *string `locationName:"securityProfileName" min:"1" type:"string"` - - // The updated version of the security profile. - Version *int64 `locationName:"version" type:"long"` -} - -// String returns the string representation -func (s UpdateSecurityProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSecurityProfileOutput) GoString() string { - return s.String() -} - -// SetAlertTargets sets the AlertTargets field's value. -func (s *UpdateSecurityProfileOutput) SetAlertTargets(v map[string]*AlertTarget) *UpdateSecurityProfileOutput { - s.AlertTargets = v - return s -} - -// SetBehaviors sets the Behaviors field's value. -func (s *UpdateSecurityProfileOutput) SetBehaviors(v []*Behavior) *UpdateSecurityProfileOutput { - s.Behaviors = v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *UpdateSecurityProfileOutput) SetCreationDate(v time.Time) *UpdateSecurityProfileOutput { - s.CreationDate = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *UpdateSecurityProfileOutput) SetLastModifiedDate(v time.Time) *UpdateSecurityProfileOutput { - s.LastModifiedDate = &v - return s -} - -// SetSecurityProfileArn sets the SecurityProfileArn field's value. -func (s *UpdateSecurityProfileOutput) SetSecurityProfileArn(v string) *UpdateSecurityProfileOutput { - s.SecurityProfileArn = &v - return s -} - -// SetSecurityProfileDescription sets the SecurityProfileDescription field's value. -func (s *UpdateSecurityProfileOutput) SetSecurityProfileDescription(v string) *UpdateSecurityProfileOutput { - s.SecurityProfileDescription = &v - return s -} - -// SetSecurityProfileName sets the SecurityProfileName field's value. -func (s *UpdateSecurityProfileOutput) SetSecurityProfileName(v string) *UpdateSecurityProfileOutput { - s.SecurityProfileName = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *UpdateSecurityProfileOutput) SetVersion(v int64) *UpdateSecurityProfileOutput { - s.Version = &v - return s -} - -type UpdateStreamInput struct { - _ struct{} `type:"structure"` - - // The description of the stream. - Description *string `locationName:"description" type:"string"` - - // The files associated with the stream. - Files []*StreamFile `locationName:"files" min:"1" type:"list"` - - // An IAM role that allows the IoT service principal assumes to access your - // S3 files. - RoleArn *string `locationName:"roleArn" min:"20" type:"string"` - - // The stream ID. - // - // StreamId is a required field - StreamId *string `location:"uri" locationName:"streamId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateStreamInput"} - if s.Files != nil && len(s.Files) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Files", 1)) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.StreamId == nil { - invalidParams.Add(request.NewErrParamRequired("StreamId")) - } - if s.StreamId != nil && len(*s.StreamId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamId", 1)) - } - if s.Files != nil { - for i, v := range s.Files { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Files", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateStreamInput) SetDescription(v string) *UpdateStreamInput { - s.Description = &v - return s -} - -// SetFiles sets the Files field's value. -func (s *UpdateStreamInput) SetFiles(v []*StreamFile) *UpdateStreamInput { - s.Files = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *UpdateStreamInput) SetRoleArn(v string) *UpdateStreamInput { - s.RoleArn = &v - return s -} - -// SetStreamId sets the StreamId field's value. -func (s *UpdateStreamInput) SetStreamId(v string) *UpdateStreamInput { - s.StreamId = &v - return s -} - -type UpdateStreamOutput struct { - _ struct{} `type:"structure"` - - // A description of the stream. - Description *string `locationName:"description" type:"string"` - - // The stream ARN. - StreamArn *string `locationName:"streamArn" type:"string"` - - // The stream ID. - StreamId *string `locationName:"streamId" min:"1" type:"string"` - - // The stream version. - StreamVersion *int64 `locationName:"streamVersion" type:"integer"` -} - -// String returns the string representation -func (s UpdateStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStreamOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *UpdateStreamOutput) SetDescription(v string) *UpdateStreamOutput { - s.Description = &v - return s -} - -// SetStreamArn sets the StreamArn field's value. -func (s *UpdateStreamOutput) SetStreamArn(v string) *UpdateStreamOutput { - s.StreamArn = &v - return s -} - -// SetStreamId sets the StreamId field's value. -func (s *UpdateStreamOutput) SetStreamId(v string) *UpdateStreamOutput { - s.StreamId = &v - return s -} - -// SetStreamVersion sets the StreamVersion field's value. -func (s *UpdateStreamOutput) SetStreamVersion(v int64) *UpdateStreamOutput { - s.StreamVersion = &v - return s -} - -type UpdateThingGroupInput struct { - _ struct{} `type:"structure"` - - // The expected version of the thing group. If this does not match the version - // of the thing group being updated, the update will fail. - ExpectedVersion *int64 `locationName:"expectedVersion" type:"long"` - - // The thing group to update. - // - // ThingGroupName is a required field - ThingGroupName *string `location:"uri" locationName:"thingGroupName" min:"1" type:"string" required:"true"` - - // The thing group properties. - // - // ThingGroupProperties is a required field - ThingGroupProperties *ThingGroupProperties `locationName:"thingGroupProperties" type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateThingGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateThingGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateThingGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateThingGroupInput"} - if s.ThingGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ThingGroupName")) - } - if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 1)) - } - if s.ThingGroupProperties == nil { - invalidParams.Add(request.NewErrParamRequired("ThingGroupProperties")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExpectedVersion sets the ExpectedVersion field's value. -func (s *UpdateThingGroupInput) SetExpectedVersion(v int64) *UpdateThingGroupInput { - s.ExpectedVersion = &v - return s -} - -// SetThingGroupName sets the ThingGroupName field's value. -func (s *UpdateThingGroupInput) SetThingGroupName(v string) *UpdateThingGroupInput { - s.ThingGroupName = &v - return s -} - -// SetThingGroupProperties sets the ThingGroupProperties field's value. -func (s *UpdateThingGroupInput) SetThingGroupProperties(v *ThingGroupProperties) *UpdateThingGroupInput { - s.ThingGroupProperties = v - return s -} - -type UpdateThingGroupOutput struct { - _ struct{} `type:"structure"` - - // The version of the updated thing group. - Version *int64 `locationName:"version" type:"long"` -} - -// String returns the string representation -func (s UpdateThingGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateThingGroupOutput) GoString() string { - return s.String() -} - -// SetVersion sets the Version field's value. -func (s *UpdateThingGroupOutput) SetVersion(v int64) *UpdateThingGroupOutput { - s.Version = &v - return s -} - -type UpdateThingGroupsForThingInput struct { - _ struct{} `type:"structure"` - - // Override dynamic thing groups with static thing groups when 10-group limit - // is reached. If a thing belongs to 10 thing groups, and one or more of those - // groups are dynamic thing groups, adding a thing to a static group removes - // the thing from the last dynamic group. - OverrideDynamicGroups *bool `locationName:"overrideDynamicGroups" type:"boolean"` - - // The groups to which the thing will be added. - ThingGroupsToAdd []*string `locationName:"thingGroupsToAdd" type:"list"` - - // The groups from which the thing will be removed. - ThingGroupsToRemove []*string `locationName:"thingGroupsToRemove" type:"list"` - - // The thing whose group memberships will be updated. - ThingName *string `locationName:"thingName" min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateThingGroupsForThingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateThingGroupsForThingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateThingGroupsForThingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateThingGroupsForThingInput"} - if s.ThingName != nil && len(*s.ThingName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOverrideDynamicGroups sets the OverrideDynamicGroups field's value. -func (s *UpdateThingGroupsForThingInput) SetOverrideDynamicGroups(v bool) *UpdateThingGroupsForThingInput { - s.OverrideDynamicGroups = &v - return s -} - -// SetThingGroupsToAdd sets the ThingGroupsToAdd field's value. -func (s *UpdateThingGroupsForThingInput) SetThingGroupsToAdd(v []*string) *UpdateThingGroupsForThingInput { - s.ThingGroupsToAdd = v - return s -} - -// SetThingGroupsToRemove sets the ThingGroupsToRemove field's value. -func (s *UpdateThingGroupsForThingInput) SetThingGroupsToRemove(v []*string) *UpdateThingGroupsForThingInput { - s.ThingGroupsToRemove = v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *UpdateThingGroupsForThingInput) SetThingName(v string) *UpdateThingGroupsForThingInput { - s.ThingName = &v - return s -} - -type UpdateThingGroupsForThingOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateThingGroupsForThingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateThingGroupsForThingOutput) GoString() string { - return s.String() -} - -// The input for the UpdateThing operation. -type UpdateThingInput struct { - _ struct{} `type:"structure"` - - // A list of thing attributes, a JSON string containing name-value pairs. For - // example: - // - // {\"attributes\":{\"name1\":\"value2\"}} - // - // This data is used to add new attributes or update existing attributes. - AttributePayload *AttributePayload `locationName:"attributePayload" type:"structure"` - - // The expected version of the thing record in the registry. If the version - // of the record in the registry does not match the expected version specified - // in the request, the UpdateThing request is rejected with a VersionConflictException. - ExpectedVersion *int64 `locationName:"expectedVersion" type:"long"` - - // Remove a thing type association. If true, the association is removed. - RemoveThingType *bool `locationName:"removeThingType" type:"boolean"` - - // The name of the thing to update. - // - // ThingName is a required field - ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` - - // The name of the thing type. - ThingTypeName *string `locationName:"thingTypeName" min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateThingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateThingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateThingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateThingInput"} - if s.ThingName == nil { - invalidParams.Add(request.NewErrParamRequired("ThingName")) - } - if s.ThingName != nil && len(*s.ThingName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) - } - if s.ThingTypeName != nil && len(*s.ThingTypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThingTypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributePayload sets the AttributePayload field's value. -func (s *UpdateThingInput) SetAttributePayload(v *AttributePayload) *UpdateThingInput { - s.AttributePayload = v - return s -} - -// SetExpectedVersion sets the ExpectedVersion field's value. -func (s *UpdateThingInput) SetExpectedVersion(v int64) *UpdateThingInput { - s.ExpectedVersion = &v - return s -} - -// SetRemoveThingType sets the RemoveThingType field's value. -func (s *UpdateThingInput) SetRemoveThingType(v bool) *UpdateThingInput { - s.RemoveThingType = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *UpdateThingInput) SetThingName(v string) *UpdateThingInput { - s.ThingName = &v - return s -} - -// SetThingTypeName sets the ThingTypeName field's value. -func (s *UpdateThingInput) SetThingTypeName(v string) *UpdateThingInput { - s.ThingTypeName = &v - return s -} - -// The output from the UpdateThing operation. -type UpdateThingOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateThingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateThingOutput) GoString() string { - return s.String() -} - -type ValidateSecurityProfileBehaviorsInput struct { - _ struct{} `type:"structure"` - - // Specifies the behaviors that, when violated by a device (thing), cause an - // alert. - // - // Behaviors is a required field - Behaviors []*Behavior `locationName:"behaviors" type:"list" required:"true"` -} - -// String returns the string representation -func (s ValidateSecurityProfileBehaviorsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidateSecurityProfileBehaviorsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ValidateSecurityProfileBehaviorsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ValidateSecurityProfileBehaviorsInput"} - if s.Behaviors == nil { - invalidParams.Add(request.NewErrParamRequired("Behaviors")) - } - if s.Behaviors != nil { - for i, v := range s.Behaviors { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Behaviors", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBehaviors sets the Behaviors field's value. -func (s *ValidateSecurityProfileBehaviorsInput) SetBehaviors(v []*Behavior) *ValidateSecurityProfileBehaviorsInput { - s.Behaviors = v - return s -} - -type ValidateSecurityProfileBehaviorsOutput struct { - _ struct{} `type:"structure"` - - // True if the behaviors were valid. - Valid *bool `locationName:"valid" type:"boolean"` - - // The list of any errors found in the behaviors. - ValidationErrors []*ValidationError `locationName:"validationErrors" type:"list"` -} - -// String returns the string representation -func (s ValidateSecurityProfileBehaviorsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidateSecurityProfileBehaviorsOutput) GoString() string { - return s.String() -} - -// SetValid sets the Valid field's value. -func (s *ValidateSecurityProfileBehaviorsOutput) SetValid(v bool) *ValidateSecurityProfileBehaviorsOutput { - s.Valid = &v - return s -} - -// SetValidationErrors sets the ValidationErrors field's value. -func (s *ValidateSecurityProfileBehaviorsOutput) SetValidationErrors(v []*ValidationError) *ValidateSecurityProfileBehaviorsOutput { - s.ValidationErrors = v - return s -} - -// Information about an error found in a behavior specification. -type ValidationError struct { - _ struct{} `type:"structure"` - - // The description of an error found in the behaviors. - ErrorMessage *string `locationName:"errorMessage" type:"string"` -} - -// String returns the string representation -func (s ValidationError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidationError) GoString() string { - return s.String() -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *ValidationError) SetErrorMessage(v string) *ValidationError { - s.ErrorMessage = &v - return s -} - -// Information about a Device Defender security profile behavior violation. -type ViolationEvent struct { - _ struct{} `type:"structure"` - - // The behavior which was violated. - Behavior *Behavior `locationName:"behavior" type:"structure"` - - // The value of the metric (the measurement). - MetricValue *MetricValue `locationName:"metricValue" type:"structure"` - - // The name of the security profile whose behavior was violated. - SecurityProfileName *string `locationName:"securityProfileName" min:"1" type:"string"` - - // The name of the thing responsible for the violation event. - ThingName *string `locationName:"thingName" min:"1" type:"string"` - - // The time the violation event occurred. - ViolationEventTime *time.Time `locationName:"violationEventTime" type:"timestamp"` - - // The type of violation event. - ViolationEventType *string `locationName:"violationEventType" type:"string" enum:"ViolationEventType"` - - // The ID of the violation event. - ViolationId *string `locationName:"violationId" min:"1" type:"string"` -} - -// String returns the string representation -func (s ViolationEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ViolationEvent) GoString() string { - return s.String() -} - -// SetBehavior sets the Behavior field's value. -func (s *ViolationEvent) SetBehavior(v *Behavior) *ViolationEvent { - s.Behavior = v - return s -} - -// SetMetricValue sets the MetricValue field's value. -func (s *ViolationEvent) SetMetricValue(v *MetricValue) *ViolationEvent { - s.MetricValue = v - return s -} - -// SetSecurityProfileName sets the SecurityProfileName field's value. -func (s *ViolationEvent) SetSecurityProfileName(v string) *ViolationEvent { - s.SecurityProfileName = &v - return s -} - -// SetThingName sets the ThingName field's value. -func (s *ViolationEvent) SetThingName(v string) *ViolationEvent { - s.ThingName = &v - return s -} - -// SetViolationEventTime sets the ViolationEventTime field's value. -func (s *ViolationEvent) SetViolationEventTime(v time.Time) *ViolationEvent { - s.ViolationEventTime = &v - return s -} - -// SetViolationEventType sets the ViolationEventType field's value. -func (s *ViolationEvent) SetViolationEventType(v string) *ViolationEvent { - s.ViolationEventType = &v - return s -} - -// SetViolationId sets the ViolationId field's value. -func (s *ViolationEvent) SetViolationId(v string) *ViolationEvent { - s.ViolationId = &v - return s -} - -const ( - // AbortActionCancel is a AbortAction enum value - AbortActionCancel = "CANCEL" -) - -const ( - // ActionTypePublish is a ActionType enum value - ActionTypePublish = "PUBLISH" - - // ActionTypeSubscribe is a ActionType enum value - ActionTypeSubscribe = "SUBSCRIBE" - - // ActionTypeReceive is a ActionType enum value - ActionTypeReceive = "RECEIVE" - - // ActionTypeConnect is a ActionType enum value - ActionTypeConnect = "CONNECT" -) - -// The type of alert target: one of "SNS". -const ( - // AlertTargetTypeSns is a AlertTargetType enum value - AlertTargetTypeSns = "SNS" -) - -const ( - // AuditCheckRunStatusInProgress is a AuditCheckRunStatus enum value - AuditCheckRunStatusInProgress = "IN_PROGRESS" - - // AuditCheckRunStatusWaitingForDataCollection is a AuditCheckRunStatus enum value - AuditCheckRunStatusWaitingForDataCollection = "WAITING_FOR_DATA_COLLECTION" - - // AuditCheckRunStatusCanceled is a AuditCheckRunStatus enum value - AuditCheckRunStatusCanceled = "CANCELED" - - // AuditCheckRunStatusCompletedCompliant is a AuditCheckRunStatus enum value - AuditCheckRunStatusCompletedCompliant = "COMPLETED_COMPLIANT" - - // AuditCheckRunStatusCompletedNonCompliant is a AuditCheckRunStatus enum value - AuditCheckRunStatusCompletedNonCompliant = "COMPLETED_NON_COMPLIANT" - - // AuditCheckRunStatusFailed is a AuditCheckRunStatus enum value - AuditCheckRunStatusFailed = "FAILED" -) - -const ( - // AuditFindingSeverityCritical is a AuditFindingSeverity enum value - AuditFindingSeverityCritical = "CRITICAL" - - // AuditFindingSeverityHigh is a AuditFindingSeverity enum value - AuditFindingSeverityHigh = "HIGH" - - // AuditFindingSeverityMedium is a AuditFindingSeverity enum value - AuditFindingSeverityMedium = "MEDIUM" - - // AuditFindingSeverityLow is a AuditFindingSeverity enum value - AuditFindingSeverityLow = "LOW" -) - -const ( - // AuditFrequencyDaily is a AuditFrequency enum value - AuditFrequencyDaily = "DAILY" - - // AuditFrequencyWeekly is a AuditFrequency enum value - AuditFrequencyWeekly = "WEEKLY" - - // AuditFrequencyBiweekly is a AuditFrequency enum value - AuditFrequencyBiweekly = "BIWEEKLY" - - // AuditFrequencyMonthly is a AuditFrequency enum value - AuditFrequencyMonthly = "MONTHLY" -) - -const ( - // AuditNotificationTypeSns is a AuditNotificationType enum value - AuditNotificationTypeSns = "SNS" -) - -const ( - // AuditTaskStatusInProgress is a AuditTaskStatus enum value - AuditTaskStatusInProgress = "IN_PROGRESS" - - // AuditTaskStatusCompleted is a AuditTaskStatus enum value - AuditTaskStatusCompleted = "COMPLETED" - - // AuditTaskStatusFailed is a AuditTaskStatus enum value - AuditTaskStatusFailed = "FAILED" - - // AuditTaskStatusCanceled is a AuditTaskStatus enum value - AuditTaskStatusCanceled = "CANCELED" -) - -const ( - // AuditTaskTypeOnDemandAuditTask is a AuditTaskType enum value - AuditTaskTypeOnDemandAuditTask = "ON_DEMAND_AUDIT_TASK" - - // AuditTaskTypeScheduledAuditTask is a AuditTaskType enum value - AuditTaskTypeScheduledAuditTask = "SCHEDULED_AUDIT_TASK" -) - -const ( - // AuthDecisionAllowed is a AuthDecision enum value - AuthDecisionAllowed = "ALLOWED" - - // AuthDecisionExplicitDeny is a AuthDecision enum value - AuthDecisionExplicitDeny = "EXPLICIT_DENY" - - // AuthDecisionImplicitDeny is a AuthDecision enum value - AuthDecisionImplicitDeny = "IMPLICIT_DENY" -) - -const ( - // AuthorizerStatusActive is a AuthorizerStatus enum value - AuthorizerStatusActive = "ACTIVE" - - // AuthorizerStatusInactive is a AuthorizerStatus enum value - AuthorizerStatusInactive = "INACTIVE" -) - -const ( - // AutoRegistrationStatusEnable is a AutoRegistrationStatus enum value - AutoRegistrationStatusEnable = "ENABLE" - - // AutoRegistrationStatusDisable is a AutoRegistrationStatus enum value - AutoRegistrationStatusDisable = "DISABLE" -) - -const ( - // CACertificateStatusActive is a CACertificateStatus enum value - CACertificateStatusActive = "ACTIVE" - - // CACertificateStatusInactive is a CACertificateStatus enum value - CACertificateStatusInactive = "INACTIVE" -) - -const ( - // CannedAccessControlListPrivate is a CannedAccessControlList enum value - CannedAccessControlListPrivate = "private" - - // CannedAccessControlListPublicRead is a CannedAccessControlList enum value - CannedAccessControlListPublicRead = "public-read" - - // CannedAccessControlListPublicReadWrite is a CannedAccessControlList enum value - CannedAccessControlListPublicReadWrite = "public-read-write" - - // CannedAccessControlListAwsExecRead is a CannedAccessControlList enum value - CannedAccessControlListAwsExecRead = "aws-exec-read" - - // CannedAccessControlListAuthenticatedRead is a CannedAccessControlList enum value - CannedAccessControlListAuthenticatedRead = "authenticated-read" - - // CannedAccessControlListBucketOwnerRead is a CannedAccessControlList enum value - CannedAccessControlListBucketOwnerRead = "bucket-owner-read" - - // CannedAccessControlListBucketOwnerFullControl is a CannedAccessControlList enum value - CannedAccessControlListBucketOwnerFullControl = "bucket-owner-full-control" - - // CannedAccessControlListLogDeliveryWrite is a CannedAccessControlList enum value - CannedAccessControlListLogDeliveryWrite = "log-delivery-write" -) - -const ( - // CertificateStatusActive is a CertificateStatus enum value - CertificateStatusActive = "ACTIVE" - - // CertificateStatusInactive is a CertificateStatus enum value - CertificateStatusInactive = "INACTIVE" - - // CertificateStatusRevoked is a CertificateStatus enum value - CertificateStatusRevoked = "REVOKED" - - // CertificateStatusPendingTransfer is a CertificateStatus enum value - CertificateStatusPendingTransfer = "PENDING_TRANSFER" - - // CertificateStatusRegisterInactive is a CertificateStatus enum value - CertificateStatusRegisterInactive = "REGISTER_INACTIVE" - - // CertificateStatusPendingActivation is a CertificateStatus enum value - CertificateStatusPendingActivation = "PENDING_ACTIVATION" -) - -const ( - // ComparisonOperatorLessThan is a ComparisonOperator enum value - ComparisonOperatorLessThan = "less-than" - - // ComparisonOperatorLessThanEquals is a ComparisonOperator enum value - ComparisonOperatorLessThanEquals = "less-than-equals" - - // ComparisonOperatorGreaterThan is a ComparisonOperator enum value - ComparisonOperatorGreaterThan = "greater-than" - - // ComparisonOperatorGreaterThanEquals is a ComparisonOperator enum value - ComparisonOperatorGreaterThanEquals = "greater-than-equals" - - // ComparisonOperatorInCidrSet is a ComparisonOperator enum value - ComparisonOperatorInCidrSet = "in-cidr-set" - - // ComparisonOperatorNotInCidrSet is a ComparisonOperator enum value - ComparisonOperatorNotInCidrSet = "not-in-cidr-set" - - // ComparisonOperatorInPortSet is a ComparisonOperator enum value - ComparisonOperatorInPortSet = "in-port-set" - - // ComparisonOperatorNotInPortSet is a ComparisonOperator enum value - ComparisonOperatorNotInPortSet = "not-in-port-set" -) - -const ( - // DayOfWeekSun is a DayOfWeek enum value - DayOfWeekSun = "SUN" - - // DayOfWeekMon is a DayOfWeek enum value - DayOfWeekMon = "MON" - - // DayOfWeekTue is a DayOfWeek enum value - DayOfWeekTue = "TUE" - - // DayOfWeekWed is a DayOfWeek enum value - DayOfWeekWed = "WED" - - // DayOfWeekThu is a DayOfWeek enum value - DayOfWeekThu = "THU" - - // DayOfWeekFri is a DayOfWeek enum value - DayOfWeekFri = "FRI" - - // DayOfWeekSat is a DayOfWeek enum value - DayOfWeekSat = "SAT" -) - -const ( - // DynamicGroupStatusActive is a DynamicGroupStatus enum value - DynamicGroupStatusActive = "ACTIVE" - - // DynamicGroupStatusBuilding is a DynamicGroupStatus enum value - DynamicGroupStatusBuilding = "BUILDING" - - // DynamicGroupStatusRebuilding is a DynamicGroupStatus enum value - DynamicGroupStatusRebuilding = "REBUILDING" -) - -const ( - // DynamoKeyTypeString is a DynamoKeyType enum value - DynamoKeyTypeString = "STRING" - - // DynamoKeyTypeNumber is a DynamoKeyType enum value - DynamoKeyTypeNumber = "NUMBER" -) - -const ( - // EventTypeThing is a EventType enum value - EventTypeThing = "THING" - - // EventTypeThingGroup is a EventType enum value - EventTypeThingGroup = "THING_GROUP" - - // EventTypeThingType is a EventType enum value - EventTypeThingType = "THING_TYPE" - - // EventTypeThingGroupMembership is a EventType enum value - EventTypeThingGroupMembership = "THING_GROUP_MEMBERSHIP" - - // EventTypeThingGroupHierarchy is a EventType enum value - EventTypeThingGroupHierarchy = "THING_GROUP_HIERARCHY" - - // EventTypeThingTypeAssociation is a EventType enum value - EventTypeThingTypeAssociation = "THING_TYPE_ASSOCIATION" - - // EventTypeJob is a EventType enum value - EventTypeJob = "JOB" - - // EventTypeJobExecution is a EventType enum value - EventTypeJobExecution = "JOB_EXECUTION" - - // EventTypePolicy is a EventType enum value - EventTypePolicy = "POLICY" - - // EventTypeCertificate is a EventType enum value - EventTypeCertificate = "CERTIFICATE" - - // EventTypeCaCertificate is a EventType enum value - EventTypeCaCertificate = "CA_CERTIFICATE" -) - -const ( - // IndexStatusActive is a IndexStatus enum value - IndexStatusActive = "ACTIVE" - - // IndexStatusBuilding is a IndexStatus enum value - IndexStatusBuilding = "BUILDING" - - // IndexStatusRebuilding is a IndexStatus enum value - IndexStatusRebuilding = "REBUILDING" -) - -const ( - // JobExecutionFailureTypeFailed is a JobExecutionFailureType enum value - JobExecutionFailureTypeFailed = "FAILED" - - // JobExecutionFailureTypeRejected is a JobExecutionFailureType enum value - JobExecutionFailureTypeRejected = "REJECTED" - - // JobExecutionFailureTypeTimedOut is a JobExecutionFailureType enum value - JobExecutionFailureTypeTimedOut = "TIMED_OUT" - - // JobExecutionFailureTypeAll is a JobExecutionFailureType enum value - JobExecutionFailureTypeAll = "ALL" -) - -const ( - // JobExecutionStatusQueued is a JobExecutionStatus enum value - JobExecutionStatusQueued = "QUEUED" - - // JobExecutionStatusInProgress is a JobExecutionStatus enum value - JobExecutionStatusInProgress = "IN_PROGRESS" - - // JobExecutionStatusSucceeded is a JobExecutionStatus enum value - JobExecutionStatusSucceeded = "SUCCEEDED" - - // JobExecutionStatusFailed is a JobExecutionStatus enum value - JobExecutionStatusFailed = "FAILED" - - // JobExecutionStatusTimedOut is a JobExecutionStatus enum value - JobExecutionStatusTimedOut = "TIMED_OUT" - - // JobExecutionStatusRejected is a JobExecutionStatus enum value - JobExecutionStatusRejected = "REJECTED" - - // JobExecutionStatusRemoved is a JobExecutionStatus enum value - JobExecutionStatusRemoved = "REMOVED" - - // JobExecutionStatusCanceled is a JobExecutionStatus enum value - JobExecutionStatusCanceled = "CANCELED" -) - -const ( - // JobStatusInProgress is a JobStatus enum value - JobStatusInProgress = "IN_PROGRESS" - - // JobStatusCanceled is a JobStatus enum value - JobStatusCanceled = "CANCELED" - - // JobStatusCompleted is a JobStatus enum value - JobStatusCompleted = "COMPLETED" - - // JobStatusDeletionInProgress is a JobStatus enum value - JobStatusDeletionInProgress = "DELETION_IN_PROGRESS" -) - -const ( - // LogLevelDebug is a LogLevel enum value - LogLevelDebug = "DEBUG" - - // LogLevelInfo is a LogLevel enum value - LogLevelInfo = "INFO" - - // LogLevelError is a LogLevel enum value - LogLevelError = "ERROR" - - // LogLevelWarn is a LogLevel enum value - LogLevelWarn = "WARN" - - // LogLevelDisabled is a LogLevel enum value - LogLevelDisabled = "DISABLED" -) - -const ( - // LogTargetTypeDefault is a LogTargetType enum value - LogTargetTypeDefault = "DEFAULT" - - // LogTargetTypeThingGroup is a LogTargetType enum value - LogTargetTypeThingGroup = "THING_GROUP" -) - -const ( - // MessageFormatRaw is a MessageFormat enum value - MessageFormatRaw = "RAW" - - // MessageFormatJson is a MessageFormat enum value - MessageFormatJson = "JSON" -) - -const ( - // OTAUpdateStatusCreatePending is a OTAUpdateStatus enum value - OTAUpdateStatusCreatePending = "CREATE_PENDING" - - // OTAUpdateStatusCreateInProgress is a OTAUpdateStatus enum value - OTAUpdateStatusCreateInProgress = "CREATE_IN_PROGRESS" - - // OTAUpdateStatusCreateComplete is a OTAUpdateStatus enum value - OTAUpdateStatusCreateComplete = "CREATE_COMPLETE" - - // OTAUpdateStatusCreateFailed is a OTAUpdateStatus enum value - OTAUpdateStatusCreateFailed = "CREATE_FAILED" -) - -const ( - // ReportTypeErrors is a ReportType enum value - ReportTypeErrors = "ERRORS" - - // ReportTypeResults is a ReportType enum value - ReportTypeResults = "RESULTS" -) - -const ( - // ResourceTypeDeviceCertificate is a ResourceType enum value - ResourceTypeDeviceCertificate = "DEVICE_CERTIFICATE" - - // ResourceTypeCaCertificate is a ResourceType enum value - ResourceTypeCaCertificate = "CA_CERTIFICATE" - - // ResourceTypeIotPolicy is a ResourceType enum value - ResourceTypeIotPolicy = "IOT_POLICY" - - // ResourceTypeCognitoIdentityPool is a ResourceType enum value - ResourceTypeCognitoIdentityPool = "COGNITO_IDENTITY_POOL" - - // ResourceTypeClientId is a ResourceType enum value - ResourceTypeClientId = "CLIENT_ID" - - // ResourceTypeAccountSettings is a ResourceType enum value - ResourceTypeAccountSettings = "ACCOUNT_SETTINGS" -) - -const ( - // StatusInProgress is a Status enum value - StatusInProgress = "InProgress" - - // StatusCompleted is a Status enum value - StatusCompleted = "Completed" - - // StatusFailed is a Status enum value - StatusFailed = "Failed" - - // StatusCancelled is a Status enum value - StatusCancelled = "Cancelled" - - // StatusCancelling is a Status enum value - StatusCancelling = "Cancelling" -) - -const ( - // TargetSelectionContinuous is a TargetSelection enum value - TargetSelectionContinuous = "CONTINUOUS" - - // TargetSelectionSnapshot is a TargetSelection enum value - TargetSelectionSnapshot = "SNAPSHOT" -) - -const ( - // ThingConnectivityIndexingModeOff is a ThingConnectivityIndexingMode enum value - ThingConnectivityIndexingModeOff = "OFF" - - // ThingConnectivityIndexingModeStatus is a ThingConnectivityIndexingMode enum value - ThingConnectivityIndexingModeStatus = "STATUS" -) - -const ( - // ThingGroupIndexingModeOff is a ThingGroupIndexingMode enum value - ThingGroupIndexingModeOff = "OFF" - - // ThingGroupIndexingModeOn is a ThingGroupIndexingMode enum value - ThingGroupIndexingModeOn = "ON" -) - -const ( - // ThingIndexingModeOff is a ThingIndexingMode enum value - ThingIndexingModeOff = "OFF" - - // ThingIndexingModeRegistry is a ThingIndexingMode enum value - ThingIndexingModeRegistry = "REGISTRY" - - // ThingIndexingModeRegistryAndShadow is a ThingIndexingMode enum value - ThingIndexingModeRegistryAndShadow = "REGISTRY_AND_SHADOW" -) - -const ( - // ViolationEventTypeInAlarm is a ViolationEventType enum value - ViolationEventTypeInAlarm = "in-alarm" - - // ViolationEventTypeAlarmCleared is a ViolationEventType enum value - ViolationEventTypeAlarmCleared = "alarm-cleared" - - // ViolationEventTypeAlarmInvalidated is a ViolationEventType enum value - ViolationEventTypeAlarmInvalidated = "alarm-invalidated" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go b/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go deleted file mode 100644 index ce15b4e96..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package iot provides the client and types for making API -// requests to AWS IoT. -// -// AWS IoT provides secure, bi-directional communication between Internet-connected -// devices (such as sensors, actuators, embedded devices, or smart appliances) -// and the AWS cloud. You can discover your custom IoT-Data endpoint to communicate -// with, configure rules for data processing and integration with other services, -// organize resources associated with each device (Registry), configure logging, -// and create and manage policies and credentials to authenticate devices. -// -// For more information about how AWS IoT works, see the Developer Guide (http://docs.aws.amazon.com/iot/latest/developerguide/aws-iot-how-it-works.html). -// -// For information about how to use the credentials provider for AWS IoT, see -// Authorizing Direct Calls to AWS Services (http://docs.aws.amazon.com/iot/latest/developerguide/authorizing-direct-aws.html). -// -// See iot package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/iot/ -// -// Using the Client -// -// To contact AWS IoT 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 IoT client IoT for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/iot/#New -package iot diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/errors.go b/vendor/github.com/aws/aws-sdk-go/service/iot/errors.go deleted file mode 100644 index 8320d782b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/errors.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package iot - -const ( - - // ErrCodeCertificateConflictException for service response error code - // "CertificateConflictException". - // - // Unable to verify the CA certificate used to sign the device certificate you - // are attempting to register. This is happens when you have registered more - // than one CA certificate that has the same subject field and public key. - ErrCodeCertificateConflictException = "CertificateConflictException" - - // ErrCodeCertificateStateException for service response error code - // "CertificateStateException". - // - // The certificate operation is not allowed. - ErrCodeCertificateStateException = "CertificateStateException" - - // ErrCodeCertificateValidationException for service response error code - // "CertificateValidationException". - // - // The certificate is invalid. - ErrCodeCertificateValidationException = "CertificateValidationException" - - // ErrCodeConflictingResourceUpdateException for service response error code - // "ConflictingResourceUpdateException". - // - // A conflicting resource update exception. This exception is thrown when two - // pending updates cause a conflict. - ErrCodeConflictingResourceUpdateException = "ConflictingResourceUpdateException" - - // ErrCodeDeleteConflictException for service response error code - // "DeleteConflictException". - // - // You can't delete the resource because it is attached to one or more resources. - ErrCodeDeleteConflictException = "DeleteConflictException" - - // ErrCodeIndexNotReadyException for service response error code - // "IndexNotReadyException". - // - // The index is not ready. - ErrCodeIndexNotReadyException = "IndexNotReadyException" - - // ErrCodeInternalException for service response error code - // "InternalException". - // - // An unexpected error has occurred. - ErrCodeInternalException = "InternalException" - - // ErrCodeInternalFailureException for service response error code - // "InternalFailureException". - // - // An unexpected error has occurred. - ErrCodeInternalFailureException = "InternalFailureException" - - // ErrCodeInvalidQueryException for service response error code - // "InvalidQueryException". - // - // The query is invalid. - ErrCodeInvalidQueryException = "InvalidQueryException" - - // ErrCodeInvalidRequestException for service response error code - // "InvalidRequestException". - // - // The request is not valid. - ErrCodeInvalidRequestException = "InvalidRequestException" - - // ErrCodeInvalidResponseException for service response error code - // "InvalidResponseException". - // - // The response is invalid. - ErrCodeInvalidResponseException = "InvalidResponseException" - - // ErrCodeInvalidStateTransitionException for service response error code - // "InvalidStateTransitionException". - // - // An attempt was made to change to an invalid state, for example by deleting - // a job or a job execution which is "IN_PROGRESS" without setting the force - // parameter. - ErrCodeInvalidStateTransitionException = "InvalidStateTransitionException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // A limit has been exceeded. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeMalformedPolicyException for service response error code - // "MalformedPolicyException". - // - // The policy documentation is not valid. - ErrCodeMalformedPolicyException = "MalformedPolicyException" - - // ErrCodeNotConfiguredException for service response error code - // "NotConfiguredException". - // - // The resource is not configured. - ErrCodeNotConfiguredException = "NotConfiguredException" - - // ErrCodeRegistrationCodeValidationException for service response error code - // "RegistrationCodeValidationException". - // - // The registration code is invalid. - ErrCodeRegistrationCodeValidationException = "RegistrationCodeValidationException" - - // ErrCodeResourceAlreadyExistsException for service response error code - // "ResourceAlreadyExistsException". - // - // The resource already exists. - ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The specified resource does not exist. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeResourceRegistrationFailureException for service response error code - // "ResourceRegistrationFailureException". - // - // The resource registration failed. - ErrCodeResourceRegistrationFailureException = "ResourceRegistrationFailureException" - - // ErrCodeServiceUnavailableException for service response error code - // "ServiceUnavailableException". - // - // The service is temporarily unavailable. - ErrCodeServiceUnavailableException = "ServiceUnavailableException" - - // ErrCodeSqlParseException for service response error code - // "SqlParseException". - // - // The Rule-SQL expression can't be parsed correctly. - ErrCodeSqlParseException = "SqlParseException" - - // ErrCodeThrottlingException for service response error code - // "ThrottlingException". - // - // The rate exceeds the limit. - ErrCodeThrottlingException = "ThrottlingException" - - // ErrCodeTransferAlreadyCompletedException for service response error code - // "TransferAlreadyCompletedException". - // - // You can't revert the certificate transfer because the transfer is already - // complete. - ErrCodeTransferAlreadyCompletedException = "TransferAlreadyCompletedException" - - // ErrCodeTransferConflictException for service response error code - // "TransferConflictException". - // - // You can't transfer the certificate because authorization policies are still - // attached. - ErrCodeTransferConflictException = "TransferConflictException" - - // ErrCodeUnauthorizedException for service response error code - // "UnauthorizedException". - // - // You are not authorized to perform this operation. - ErrCodeUnauthorizedException = "UnauthorizedException" - - // ErrCodeVersionConflictException for service response error code - // "VersionConflictException". - // - // An exception thrown when the version of an entity specified with the expectedVersion - // parameter does not match the latest version in the system. - ErrCodeVersionConflictException = "VersionConflictException" - - // ErrCodeVersionsLimitExceededException for service response error code - // "VersionsLimitExceededException". - // - // The number of policy versions exceeds the limit. - ErrCodeVersionsLimitExceededException = "VersionsLimitExceededException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/service.go b/vendor/github.com/aws/aws-sdk-go/service/iot/service.go deleted file mode 100644 index 10a95d560..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/service.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package iot - -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" -) - -// IoT provides the API operation methods for making requests to -// AWS IoT. See this package's package overview docs -// for details on the service. -// -// IoT methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type IoT 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 = "iot" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "IoT" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the IoT client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a IoT client from just a session. -// svc := iot.New(mySession) -// -// // Create a IoT client with additional configuration -// svc := iot.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *IoT { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "execute-api" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *IoT { - svc := &IoT{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-05-28", - }, - 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 IoT operation and runs any -// custom request initialization. -func (c *IoT) 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/kafka/api.go b/vendor/github.com/aws/aws-sdk-go/service/kafka/api.go deleted file mode 100644 index c60e1698b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kafka/api.go +++ /dev/null @@ -1,1736 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package kafka - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" -) - -const opCreateCluster = "CreateCluster" - -// CreateClusterRequest generates a "aws/request.Request" representing the -// client's request for the CreateCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCluster for more information on using the CreateCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateClusterRequest method. -// req, resp := client.CreateClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/CreateCluster -func (c *Kafka) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) { - op := &request.Operation{ - Name: opCreateCluster, - HTTPMethod: "POST", - HTTPPath: "/v1/clusters", - } - - if input == nil { - input = &CreateClusterInput{} - } - - output = &CreateClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCluster API operation for Managed Streaming for Kafka. -// -// Creates a new MSK cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Managed Streaming for Kafka's -// API operation CreateCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Returns information about an error. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Returns information about an error. -// -// * ErrCodeConflictException "ConflictException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/CreateCluster -func (c *Kafka) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) { - req, out := c.CreateClusterRequest(input) - return out, req.Send() -} - -// CreateClusterWithContext is the same as CreateCluster with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kafka) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) { - req, out := c.CreateClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCluster = "DeleteCluster" - -// DeleteClusterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCluster for more information on using the DeleteCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteClusterRequest method. -// req, resp := client.DeleteClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/DeleteCluster -func (c *Kafka) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) { - op := &request.Operation{ - Name: opDeleteCluster, - HTTPMethod: "DELETE", - HTTPPath: "/v1/clusters/{clusterArn}", - } - - if input == nil { - input = &DeleteClusterInput{} - } - - output = &DeleteClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteCluster API operation for Managed Streaming for Kafka. -// -// Deletes the MSK cluster specified by the Amazon Resource Name (ARN) in the -// request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Managed Streaming for Kafka's -// API operation DeleteCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/DeleteCluster -func (c *Kafka) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) { - req, out := c.DeleteClusterRequest(input) - return out, req.Send() -} - -// DeleteClusterWithContext is the same as DeleteCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kafka) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) { - req, out := c.DeleteClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCluster = "DescribeCluster" - -// DescribeClusterRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCluster for more information on using the DescribeCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClusterRequest method. -// req, resp := client.DescribeClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/DescribeCluster -func (c *Kafka) DescribeClusterRequest(input *DescribeClusterInput) (req *request.Request, output *DescribeClusterOutput) { - op := &request.Operation{ - Name: opDescribeCluster, - HTTPMethod: "GET", - HTTPPath: "/v1/clusters/{clusterArn}", - } - - if input == nil { - input = &DescribeClusterInput{} - } - - output = &DescribeClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCluster API operation for Managed Streaming for Kafka. -// -// Returns a description of the MSK cluster whose Amazon Resource Name (ARN) -// is specified in the request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Managed Streaming for Kafka's -// API operation DescribeCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/DescribeCluster -func (c *Kafka) DescribeCluster(input *DescribeClusterInput) (*DescribeClusterOutput, error) { - req, out := c.DescribeClusterRequest(input) - return out, req.Send() -} - -// DescribeClusterWithContext is the same as DescribeCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kafka) DescribeClusterWithContext(ctx aws.Context, input *DescribeClusterInput, opts ...request.Option) (*DescribeClusterOutput, error) { - req, out := c.DescribeClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBootstrapBrokers = "GetBootstrapBrokers" - -// GetBootstrapBrokersRequest generates a "aws/request.Request" representing the -// client's request for the GetBootstrapBrokers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBootstrapBrokers for more information on using the GetBootstrapBrokers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBootstrapBrokersRequest method. -// req, resp := client.GetBootstrapBrokersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/GetBootstrapBrokers -func (c *Kafka) GetBootstrapBrokersRequest(input *GetBootstrapBrokersInput) (req *request.Request, output *GetBootstrapBrokersOutput) { - op := &request.Operation{ - Name: opGetBootstrapBrokers, - HTTPMethod: "GET", - HTTPPath: "/v1/clusters/{clusterArn}/bootstrap-brokers", - } - - if input == nil { - input = &GetBootstrapBrokersInput{} - } - - output = &GetBootstrapBrokersOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBootstrapBrokers API operation for Managed Streaming for Kafka. -// -// A list of brokers that a client application can use to bootstrap. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Managed Streaming for Kafka's -// API operation GetBootstrapBrokers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeConflictException "ConflictException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/GetBootstrapBrokers -func (c *Kafka) GetBootstrapBrokers(input *GetBootstrapBrokersInput) (*GetBootstrapBrokersOutput, error) { - req, out := c.GetBootstrapBrokersRequest(input) - return out, req.Send() -} - -// GetBootstrapBrokersWithContext is the same as GetBootstrapBrokers with the addition of -// the ability to pass a context and additional request options. -// -// See GetBootstrapBrokers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kafka) GetBootstrapBrokersWithContext(ctx aws.Context, input *GetBootstrapBrokersInput, opts ...request.Option) (*GetBootstrapBrokersOutput, error) { - req, out := c.GetBootstrapBrokersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListClusters = "ListClusters" - -// ListClustersRequest generates a "aws/request.Request" representing the -// client's request for the ListClusters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListClusters for more information on using the ListClusters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListClustersRequest method. -// req, resp := client.ListClustersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/ListClusters -func (c *Kafka) ListClustersRequest(input *ListClustersInput) (req *request.Request, output *ListClustersOutput) { - op := &request.Operation{ - Name: opListClusters, - HTTPMethod: "GET", - HTTPPath: "/v1/clusters", - } - - if input == nil { - input = &ListClustersInput{} - } - - output = &ListClustersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListClusters API operation for Managed Streaming for Kafka. -// -// Returns a list of clusters in an 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 Managed Streaming for Kafka's -// API operation ListClusters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/ListClusters -func (c *Kafka) ListClusters(input *ListClustersInput) (*ListClustersOutput, error) { - req, out := c.ListClustersRequest(input) - return out, req.Send() -} - -// ListClustersWithContext is the same as ListClusters with the addition of -// the ability to pass a context and additional request options. -// -// See ListClusters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kafka) ListClustersWithContext(ctx aws.Context, input *ListClustersInput, opts ...request.Option) (*ListClustersOutput, error) { - req, out := c.ListClustersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListNodes = "ListNodes" - -// ListNodesRequest generates a "aws/request.Request" representing the -// client's request for the ListNodes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListNodes for more information on using the ListNodes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListNodesRequest method. -// req, resp := client.ListNodesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/ListNodes -func (c *Kafka) ListNodesRequest(input *ListNodesInput) (req *request.Request, output *ListNodesOutput) { - op := &request.Operation{ - Name: opListNodes, - HTTPMethod: "GET", - HTTPPath: "/v1/clusters/{clusterArn}/nodes", - } - - if input == nil { - input = &ListNodesInput{} - } - - output = &ListNodesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListNodes API operation for Managed Streaming for Kafka. -// -// Returns a list of the broker nodes in the cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Managed Streaming for Kafka's -// API operation ListNodes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/ListNodes -func (c *Kafka) ListNodes(input *ListNodesInput) (*ListNodesOutput, error) { - req, out := c.ListNodesRequest(input) - return out, req.Send() -} - -// ListNodesWithContext is the same as ListNodes with the addition of -// the ability to pass a context and additional request options. -// -// See ListNodes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kafka) ListNodesWithContext(ctx aws.Context, input *ListNodesInput, opts ...request.Option) (*ListNodesOutput, error) { - req, out := c.ListNodesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Describes the setup to be used for Kafka broker nodes in the cluster. -type BrokerNodeGroupInfo struct { - _ struct{} `type:"structure"` - - // The distribution of broker nodes across Availability Zones. - BrokerAZDistribution *string `locationName:"brokerAZDistribution" type:"string" enum:"BrokerAZDistribution"` - - // The list of subnets to connect to in the client virtual private cloud (VPC). - // AWS creates elastic network interfaces inside these subnets. Client applications - // use elastic network interfaces to produce and consume data. Client subnets - // can't be in Availability Zone us-east-1e. - // - // ClientSubnets is a required field - ClientSubnets []*string `locationName:"clientSubnets" type:"list" required:"true"` - - // The type of Amazon EC2 instances to use for Kafka brokers. The following - // instance types are allowed: kafka.m5.large, kafka.m5.xlarge, kafka.m5.2xlarge,kafka.m5.4xlarge, - // kafka.m5.12xlarge, and kafka.m5.24xlarge. - // - // InstanceType is a required field - InstanceType *string `locationName:"instanceType" min:"5" type:"string" required:"true"` - - // The AWS security groups to associate with the elastic network interfaces - // in order to specify who can connect to and communicate with the Amazon MSK - // cluster. - SecurityGroups []*string `locationName:"securityGroups" type:"list"` - - // Contains information about storage volumes attached to MSK broker nodes. - StorageInfo *StorageInfo `locationName:"storageInfo" type:"structure"` -} - -// String returns the string representation -func (s BrokerNodeGroupInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BrokerNodeGroupInfo) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BrokerNodeGroupInfo) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BrokerNodeGroupInfo"} - if s.ClientSubnets == nil { - invalidParams.Add(request.NewErrParamRequired("ClientSubnets")) - } - if s.InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceType")) - } - if s.InstanceType != nil && len(*s.InstanceType) < 5 { - invalidParams.Add(request.NewErrParamMinLen("InstanceType", 5)) - } - if s.StorageInfo != nil { - if err := s.StorageInfo.Validate(); err != nil { - invalidParams.AddNested("StorageInfo", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBrokerAZDistribution sets the BrokerAZDistribution field's value. -func (s *BrokerNodeGroupInfo) SetBrokerAZDistribution(v string) *BrokerNodeGroupInfo { - s.BrokerAZDistribution = &v - return s -} - -// SetClientSubnets sets the ClientSubnets field's value. -func (s *BrokerNodeGroupInfo) SetClientSubnets(v []*string) *BrokerNodeGroupInfo { - s.ClientSubnets = v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *BrokerNodeGroupInfo) SetInstanceType(v string) *BrokerNodeGroupInfo { - s.InstanceType = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *BrokerNodeGroupInfo) SetSecurityGroups(v []*string) *BrokerNodeGroupInfo { - s.SecurityGroups = v - return s -} - -// SetStorageInfo sets the StorageInfo field's value. -func (s *BrokerNodeGroupInfo) SetStorageInfo(v *StorageInfo) *BrokerNodeGroupInfo { - s.StorageInfo = v - return s -} - -// BrokerNodeInfo -type BrokerNodeInfo struct { - _ struct{} `type:"structure"` - - // The attached elastic network interface of the broker. - AttachedENIId *string `locationName:"attachedENIId" type:"string"` - - // The ID of the broker. - BrokerId *float64 `locationName:"brokerId" type:"double"` - - // The client subnet to which this broker node belongs. - ClientSubnet *string `locationName:"clientSubnet" type:"string"` - - // The virtual private cloud (VPC) of the client. - ClientVpcIpAddress *string `locationName:"clientVpcIpAddress" type:"string"` - - // Information about the version of software currently deployed on the Kafka - // brokers in the cluster. - CurrentBrokerSoftwareInfo *BrokerSoftwareInfo `locationName:"currentBrokerSoftwareInfo" type:"structure"` -} - -// String returns the string representation -func (s BrokerNodeInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BrokerNodeInfo) GoString() string { - return s.String() -} - -// SetAttachedENIId sets the AttachedENIId field's value. -func (s *BrokerNodeInfo) SetAttachedENIId(v string) *BrokerNodeInfo { - s.AttachedENIId = &v - return s -} - -// SetBrokerId sets the BrokerId field's value. -func (s *BrokerNodeInfo) SetBrokerId(v float64) *BrokerNodeInfo { - s.BrokerId = &v - return s -} - -// SetClientSubnet sets the ClientSubnet field's value. -func (s *BrokerNodeInfo) SetClientSubnet(v string) *BrokerNodeInfo { - s.ClientSubnet = &v - return s -} - -// SetClientVpcIpAddress sets the ClientVpcIpAddress field's value. -func (s *BrokerNodeInfo) SetClientVpcIpAddress(v string) *BrokerNodeInfo { - s.ClientVpcIpAddress = &v - return s -} - -// SetCurrentBrokerSoftwareInfo sets the CurrentBrokerSoftwareInfo field's value. -func (s *BrokerNodeInfo) SetCurrentBrokerSoftwareInfo(v *BrokerSoftwareInfo) *BrokerNodeInfo { - s.CurrentBrokerSoftwareInfo = v - return s -} - -// Information about the current software installed on the cluster. -type BrokerSoftwareInfo struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the configuration used for the cluster. - ConfigurationArn *string `locationName:"configurationArn" type:"string"` - - // The revision of the configuration to use. - ConfigurationRevision *string `locationName:"configurationRevision" type:"string"` - - // The version of Apache Kafka. - KafkaVersion *string `locationName:"kafkaVersion" type:"string"` -} - -// String returns the string representation -func (s BrokerSoftwareInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BrokerSoftwareInfo) GoString() string { - return s.String() -} - -// SetConfigurationArn sets the ConfigurationArn field's value. -func (s *BrokerSoftwareInfo) SetConfigurationArn(v string) *BrokerSoftwareInfo { - s.ConfigurationArn = &v - return s -} - -// SetConfigurationRevision sets the ConfigurationRevision field's value. -func (s *BrokerSoftwareInfo) SetConfigurationRevision(v string) *BrokerSoftwareInfo { - s.ConfigurationRevision = &v - return s -} - -// SetKafkaVersion sets the KafkaVersion field's value. -func (s *BrokerSoftwareInfo) SetKafkaVersion(v string) *BrokerSoftwareInfo { - s.KafkaVersion = &v - return s -} - -// Returns information about a cluster. -type ClusterInfo struct { - _ struct{} `type:"structure"` - - // Information about the broker nodes. - BrokerNodeGroupInfo *BrokerNodeGroupInfo `locationName:"brokerNodeGroupInfo" type:"structure"` - - // The Amazon Resource Name (ARN) that uniquely identifies the cluster. - ClusterArn *string `locationName:"clusterArn" type:"string"` - - // The name of the cluster. - ClusterName *string `locationName:"clusterName" type:"string"` - - // The time when the cluster was created. - CreationTime *time.Time `locationName:"creationTime" type:"timestamp" timestampFormat:"iso8601"` - - // Information about the version of software currently deployed on the Kafka - // brokers in the cluster. - CurrentBrokerSoftwareInfo *BrokerSoftwareInfo `locationName:"currentBrokerSoftwareInfo" type:"structure"` - - // The current version of the MSK cluster. - CurrentVersion *string `locationName:"currentVersion" type:"string"` - - // Includes all encryption-related information. - EncryptionInfo *EncryptionInfo `locationName:"encryptionInfo" type:"structure"` - - // Specifies which metrics are gathered for the MSK cluster. This property has - // three possible values: DEFAULT, PER_BROKER, and PER_TOPIC_PER_BROKER. - EnhancedMonitoring *string `locationName:"enhancedMonitoring" type:"string" enum:"EnhancedMonitoring"` - - // The number of Kafka broker nodes in the cluster. - NumberOfBrokerNodes *int64 `locationName:"numberOfBrokerNodes" type:"integer"` - - // The state of the cluster. The possible states are CREATING, ACTIVE, and FAILED. - State *string `locationName:"state" type:"string" enum:"ClusterState"` - - // The connection string to use to connect to the Apache ZooKeeper cluster. - ZookeeperConnectString *string `locationName:"zookeeperConnectString" type:"string"` -} - -// String returns the string representation -func (s ClusterInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterInfo) GoString() string { - return s.String() -} - -// SetBrokerNodeGroupInfo sets the BrokerNodeGroupInfo field's value. -func (s *ClusterInfo) SetBrokerNodeGroupInfo(v *BrokerNodeGroupInfo) *ClusterInfo { - s.BrokerNodeGroupInfo = v - return s -} - -// SetClusterArn sets the ClusterArn field's value. -func (s *ClusterInfo) SetClusterArn(v string) *ClusterInfo { - s.ClusterArn = &v - return s -} - -// SetClusterName sets the ClusterName field's value. -func (s *ClusterInfo) SetClusterName(v string) *ClusterInfo { - s.ClusterName = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ClusterInfo) SetCreationTime(v time.Time) *ClusterInfo { - s.CreationTime = &v - return s -} - -// SetCurrentBrokerSoftwareInfo sets the CurrentBrokerSoftwareInfo field's value. -func (s *ClusterInfo) SetCurrentBrokerSoftwareInfo(v *BrokerSoftwareInfo) *ClusterInfo { - s.CurrentBrokerSoftwareInfo = v - return s -} - -// SetCurrentVersion sets the CurrentVersion field's value. -func (s *ClusterInfo) SetCurrentVersion(v string) *ClusterInfo { - s.CurrentVersion = &v - return s -} - -// SetEncryptionInfo sets the EncryptionInfo field's value. -func (s *ClusterInfo) SetEncryptionInfo(v *EncryptionInfo) *ClusterInfo { - s.EncryptionInfo = v - return s -} - -// SetEnhancedMonitoring sets the EnhancedMonitoring field's value. -func (s *ClusterInfo) SetEnhancedMonitoring(v string) *ClusterInfo { - s.EnhancedMonitoring = &v - return s -} - -// SetNumberOfBrokerNodes sets the NumberOfBrokerNodes field's value. -func (s *ClusterInfo) SetNumberOfBrokerNodes(v int64) *ClusterInfo { - s.NumberOfBrokerNodes = &v - return s -} - -// SetState sets the State field's value. -func (s *ClusterInfo) SetState(v string) *ClusterInfo { - s.State = &v - return s -} - -// SetZookeeperConnectString sets the ZookeeperConnectString field's value. -func (s *ClusterInfo) SetZookeeperConnectString(v string) *ClusterInfo { - s.ZookeeperConnectString = &v - return s -} - -// Creates a cluster. -type CreateClusterInput struct { - _ struct{} `type:"structure"` - - // Information about the broker nodes in the cluster. - // - // BrokerNodeGroupInfo is a required field - BrokerNodeGroupInfo *BrokerNodeGroupInfo `locationName:"brokerNodeGroupInfo" type:"structure" required:"true"` - - // The name of the cluster. - // - // ClusterName is a required field - ClusterName *string `locationName:"clusterName" min:"1" type:"string" required:"true"` - - // Includes all encryption-related information. - EncryptionInfo *EncryptionInfo `locationName:"encryptionInfo" type:"structure"` - - // Specifies the level of monitoring for the MSK cluster. The possible values - // are DEFAULT, PER_BROKER, and PER_TOPIC_PER_BROKER. - EnhancedMonitoring *string `locationName:"enhancedMonitoring" type:"string" enum:"EnhancedMonitoring"` - - // The version of Apache Kafka. - // - // KafkaVersion is a required field - KafkaVersion *string `locationName:"kafkaVersion" min:"1" type:"string" required:"true"` - - // The number of Kafka broker nodes in the Amazon MSK cluster. - // - // NumberOfBrokerNodes is a required field - NumberOfBrokerNodes *int64 `locationName:"numberOfBrokerNodes" min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s CreateClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"} - if s.BrokerNodeGroupInfo == nil { - invalidParams.Add(request.NewErrParamRequired("BrokerNodeGroupInfo")) - } - if s.ClusterName == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterName")) - } - if s.ClusterName != nil && len(*s.ClusterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClusterName", 1)) - } - if s.KafkaVersion == nil { - invalidParams.Add(request.NewErrParamRequired("KafkaVersion")) - } - if s.KafkaVersion != nil && len(*s.KafkaVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KafkaVersion", 1)) - } - if s.NumberOfBrokerNodes == nil { - invalidParams.Add(request.NewErrParamRequired("NumberOfBrokerNodes")) - } - if s.NumberOfBrokerNodes != nil && *s.NumberOfBrokerNodes < 1 { - invalidParams.Add(request.NewErrParamMinValue("NumberOfBrokerNodes", 1)) - } - if s.BrokerNodeGroupInfo != nil { - if err := s.BrokerNodeGroupInfo.Validate(); err != nil { - invalidParams.AddNested("BrokerNodeGroupInfo", err.(request.ErrInvalidParams)) - } - } - if s.EncryptionInfo != nil { - if err := s.EncryptionInfo.Validate(); err != nil { - invalidParams.AddNested("EncryptionInfo", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBrokerNodeGroupInfo sets the BrokerNodeGroupInfo field's value. -func (s *CreateClusterInput) SetBrokerNodeGroupInfo(v *BrokerNodeGroupInfo) *CreateClusterInput { - s.BrokerNodeGroupInfo = v - return s -} - -// SetClusterName sets the ClusterName field's value. -func (s *CreateClusterInput) SetClusterName(v string) *CreateClusterInput { - s.ClusterName = &v - return s -} - -// SetEncryptionInfo sets the EncryptionInfo field's value. -func (s *CreateClusterInput) SetEncryptionInfo(v *EncryptionInfo) *CreateClusterInput { - s.EncryptionInfo = v - return s -} - -// SetEnhancedMonitoring sets the EnhancedMonitoring field's value. -func (s *CreateClusterInput) SetEnhancedMonitoring(v string) *CreateClusterInput { - s.EnhancedMonitoring = &v - return s -} - -// SetKafkaVersion sets the KafkaVersion field's value. -func (s *CreateClusterInput) SetKafkaVersion(v string) *CreateClusterInput { - s.KafkaVersion = &v - return s -} - -// SetNumberOfBrokerNodes sets the NumberOfBrokerNodes field's value. -func (s *CreateClusterInput) SetNumberOfBrokerNodes(v int64) *CreateClusterInput { - s.NumberOfBrokerNodes = &v - return s -} - -// Returns information about the created cluster. -type CreateClusterOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the cluster. - ClusterArn *string `locationName:"clusterArn" type:"string"` - - // The name of the MSK cluster. - ClusterName *string `locationName:"clusterName" type:"string"` - - // The state of the cluster. The possible states are CREATING, ACTIVE, and FAILED. - State *string `locationName:"state" type:"string" enum:"ClusterState"` -} - -// String returns the string representation -func (s CreateClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterOutput) GoString() string { - return s.String() -} - -// SetClusterArn sets the ClusterArn field's value. -func (s *CreateClusterOutput) SetClusterArn(v string) *CreateClusterOutput { - s.ClusterArn = &v - return s -} - -// SetClusterName sets the ClusterName field's value. -func (s *CreateClusterOutput) SetClusterName(v string) *CreateClusterOutput { - s.ClusterName = &v - return s -} - -// SetState sets the State field's value. -func (s *CreateClusterOutput) SetState(v string) *CreateClusterOutput { - s.State = &v - return s -} - -type DeleteClusterInput struct { - _ struct{} `type:"structure"` - - // ClusterArn is a required field - ClusterArn *string `location:"uri" locationName:"clusterArn" type:"string" required:"true"` - - CurrentVersion *string `location:"querystring" locationName:"currentVersion" type:"string"` -} - -// String returns the string representation -func (s DeleteClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"} - if s.ClusterArn == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterArn")) - } - if s.ClusterArn != nil && len(*s.ClusterArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClusterArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterArn sets the ClusterArn field's value. -func (s *DeleteClusterInput) SetClusterArn(v string) *DeleteClusterInput { - s.ClusterArn = &v - return s -} - -// SetCurrentVersion sets the CurrentVersion field's value. -func (s *DeleteClusterInput) SetCurrentVersion(v string) *DeleteClusterInput { - s.CurrentVersion = &v - return s -} - -// Returns information about the deleted cluster. -type DeleteClusterOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the cluster. - ClusterArn *string `locationName:"clusterArn" type:"string"` - - // The state of the cluster. The possible states are CREATING, ACTIVE, and FAILED. - State *string `locationName:"state" type:"string" enum:"ClusterState"` -} - -// String returns the string representation -func (s DeleteClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterOutput) GoString() string { - return s.String() -} - -// SetClusterArn sets the ClusterArn field's value. -func (s *DeleteClusterOutput) SetClusterArn(v string) *DeleteClusterOutput { - s.ClusterArn = &v - return s -} - -// SetState sets the State field's value. -func (s *DeleteClusterOutput) SetState(v string) *DeleteClusterOutput { - s.State = &v - return s -} - -type DescribeClusterInput struct { - _ struct{} `type:"structure"` - - // ClusterArn is a required field - ClusterArn *string `location:"uri" locationName:"clusterArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeClusterInput"} - if s.ClusterArn == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterArn")) - } - if s.ClusterArn != nil && len(*s.ClusterArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClusterArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterArn sets the ClusterArn field's value. -func (s *DescribeClusterInput) SetClusterArn(v string) *DescribeClusterInput { - s.ClusterArn = &v - return s -} - -// Returns information about a cluster. -type DescribeClusterOutput struct { - _ struct{} `type:"structure"` - - // The cluster information. - ClusterInfo *ClusterInfo `locationName:"clusterInfo" type:"structure"` -} - -// String returns the string representation -func (s DescribeClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterOutput) GoString() string { - return s.String() -} - -// SetClusterInfo sets the ClusterInfo field's value. -func (s *DescribeClusterOutput) SetClusterInfo(v *ClusterInfo) *DescribeClusterOutput { - s.ClusterInfo = v - return s -} - -// Contains information about the EBS storage volumes attached to Kafka broker -// nodes. -type EBSStorageInfo struct { - _ struct{} `type:"structure"` - - // The size in GiB of the EBS volume for the data drive on each broker node. - VolumeSize *int64 `locationName:"volumeSize" min:"1" type:"integer"` -} - -// String returns the string representation -func (s EBSStorageInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EBSStorageInfo) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EBSStorageInfo) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EBSStorageInfo"} - if s.VolumeSize != nil && *s.VolumeSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("VolumeSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVolumeSize sets the VolumeSize field's value. -func (s *EBSStorageInfo) SetVolumeSize(v int64) *EBSStorageInfo { - s.VolumeSize = &v - return s -} - -// The data volume encryption details. -type EncryptionAtRest struct { - _ struct{} `type:"structure"` - - // The AWS KMS key used for data encryption. - // - // DataVolumeKMSKeyId is a required field - DataVolumeKMSKeyId *string `locationName:"dataVolumeKMSKeyId" type:"string" required:"true"` -} - -// String returns the string representation -func (s EncryptionAtRest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EncryptionAtRest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EncryptionAtRest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EncryptionAtRest"} - if s.DataVolumeKMSKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("DataVolumeKMSKeyId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDataVolumeKMSKeyId sets the DataVolumeKMSKeyId field's value. -func (s *EncryptionAtRest) SetDataVolumeKMSKeyId(v string) *EncryptionAtRest { - s.DataVolumeKMSKeyId = &v - return s -} - -// Includes encryption-related information, such as the AWS KMS key used for -// encrypting data at rest. -type EncryptionInfo struct { - _ struct{} `type:"structure"` - - // The data volume encryption details. - EncryptionAtRest *EncryptionAtRest `locationName:"encryptionAtRest" type:"structure"` -} - -// String returns the string representation -func (s EncryptionInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EncryptionInfo) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EncryptionInfo) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EncryptionInfo"} - if s.EncryptionAtRest != nil { - if err := s.EncryptionAtRest.Validate(); err != nil { - invalidParams.AddNested("EncryptionAtRest", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryptionAtRest sets the EncryptionAtRest field's value. -func (s *EncryptionInfo) SetEncryptionAtRest(v *EncryptionAtRest) *EncryptionInfo { - s.EncryptionAtRest = v - return s -} - -type GetBootstrapBrokersInput struct { - _ struct{} `type:"structure"` - - // ClusterArn is a required field - ClusterArn *string `location:"uri" locationName:"clusterArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetBootstrapBrokersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBootstrapBrokersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBootstrapBrokersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBootstrapBrokersInput"} - if s.ClusterArn == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterArn")) - } - if s.ClusterArn != nil && len(*s.ClusterArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClusterArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterArn sets the ClusterArn field's value. -func (s *GetBootstrapBrokersInput) SetClusterArn(v string) *GetBootstrapBrokersInput { - s.ClusterArn = &v - return s -} - -// Returns a string containing one or more hostname:port pairs. -type GetBootstrapBrokersOutput struct { - _ struct{} `type:"structure"` - - // A string containing one or more hostname:port pairs. - BootstrapBrokerString *string `locationName:"bootstrapBrokerString" type:"string"` -} - -// String returns the string representation -func (s GetBootstrapBrokersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBootstrapBrokersOutput) GoString() string { - return s.String() -} - -// SetBootstrapBrokerString sets the BootstrapBrokerString field's value. -func (s *GetBootstrapBrokersOutput) SetBootstrapBrokerString(v string) *GetBootstrapBrokersOutput { - s.BootstrapBrokerString = &v - return s -} - -type ListClustersInput struct { - _ struct{} `type:"structure"` - - ClusterNameFilter *string `location:"querystring" locationName:"clusterNameFilter" type:"string"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListClustersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListClustersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListClustersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListClustersInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterNameFilter sets the ClusterNameFilter field's value. -func (s *ListClustersInput) SetClusterNameFilter(v string) *ListClustersInput { - s.ClusterNameFilter = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListClustersInput) SetMaxResults(v int64) *ListClustersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListClustersInput) SetNextToken(v string) *ListClustersInput { - s.NextToken = &v - return s -} - -// The response contains an array containing cluster information and a next -// token if the response is truncated. -type ListClustersOutput struct { - _ struct{} `type:"structure"` - - // Information on each of the MSK clusters in the response. - ClusterInfoList []*ClusterInfo `locationName:"clusterInfoList" type:"list"` - - // The paginated results marker. When the result of a ListClusters operation - // is truncated, the call returns NextToken in the response. To get another - // batch of clusters, provide this token in your next request. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListClustersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListClustersOutput) GoString() string { - return s.String() -} - -// SetClusterInfoList sets the ClusterInfoList field's value. -func (s *ListClustersOutput) SetClusterInfoList(v []*ClusterInfo) *ListClustersOutput { - s.ClusterInfoList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListClustersOutput) SetNextToken(v string) *ListClustersOutput { - s.NextToken = &v - return s -} - -type ListNodesInput struct { - _ struct{} `type:"structure"` - - // ClusterArn is a required field - ClusterArn *string `location:"uri" locationName:"clusterArn" type:"string" required:"true"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListNodesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListNodesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListNodesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListNodesInput"} - if s.ClusterArn == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterArn")) - } - if s.ClusterArn != nil && len(*s.ClusterArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClusterArn", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterArn sets the ClusterArn field's value. -func (s *ListNodesInput) SetClusterArn(v string) *ListNodesInput { - s.ClusterArn = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListNodesInput) SetMaxResults(v int64) *ListNodesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListNodesInput) SetNextToken(v string) *ListNodesInput { - s.NextToken = &v - return s -} - -// Information about nodes in the cluster. -type ListNodesOutput struct { - _ struct{} `type:"structure"` - - // The paginated results marker. When the result of a ListNodes operation is - // truncated, the call returns NextToken in the response. To get another batch - // of nodes, provide this token in your next request. - NextToken *string `locationName:"nextToken" type:"string"` - - // List containing a NodeInfo object. - NodeInfoList []*NodeInfo `locationName:"nodeInfoList" type:"list"` -} - -// String returns the string representation -func (s ListNodesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListNodesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListNodesOutput) SetNextToken(v string) *ListNodesOutput { - s.NextToken = &v - return s -} - -// SetNodeInfoList sets the NodeInfoList field's value. -func (s *ListNodesOutput) SetNodeInfoList(v []*NodeInfo) *ListNodesOutput { - s.NodeInfoList = v - return s -} - -// The node information object. -type NodeInfo struct { - _ struct{} `type:"structure"` - - // The start time. - AddedToClusterTime *string `locationName:"addedToClusterTime" type:"string"` - - // The broker node info. - BrokerNodeInfo *BrokerNodeInfo `locationName:"brokerNodeInfo" type:"structure"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string"` - - // The Amazon Resource Name (ARN) of the node. - NodeARN *string `locationName:"nodeARN" type:"string"` - - // The node type. - NodeType *string `locationName:"nodeType" type:"string" enum:"NodeType"` - - // The ZookeeperNodeInfo. - ZookeeperNodeInfo *ZookeeperNodeInfo `locationName:"zookeeperNodeInfo" type:"structure"` -} - -// String returns the string representation -func (s NodeInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NodeInfo) GoString() string { - return s.String() -} - -// SetAddedToClusterTime sets the AddedToClusterTime field's value. -func (s *NodeInfo) SetAddedToClusterTime(v string) *NodeInfo { - s.AddedToClusterTime = &v - return s -} - -// SetBrokerNodeInfo sets the BrokerNodeInfo field's value. -func (s *NodeInfo) SetBrokerNodeInfo(v *BrokerNodeInfo) *NodeInfo { - s.BrokerNodeInfo = v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *NodeInfo) SetInstanceType(v string) *NodeInfo { - s.InstanceType = &v - return s -} - -// SetNodeARN sets the NodeARN field's value. -func (s *NodeInfo) SetNodeARN(v string) *NodeInfo { - s.NodeARN = &v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *NodeInfo) SetNodeType(v string) *NodeInfo { - s.NodeType = &v - return s -} - -// SetZookeeperNodeInfo sets the ZookeeperNodeInfo field's value. -func (s *NodeInfo) SetZookeeperNodeInfo(v *ZookeeperNodeInfo) *NodeInfo { - s.ZookeeperNodeInfo = v - return s -} - -// Contains information about storage volumes attached to MSK broker nodes. -type StorageInfo struct { - _ struct{} `type:"structure"` - - // EBS volume information. - EbsStorageInfo *EBSStorageInfo `locationName:"ebsStorageInfo" type:"structure"` -} - -// String returns the string representation -func (s StorageInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StorageInfo) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StorageInfo) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StorageInfo"} - if s.EbsStorageInfo != nil { - if err := s.EbsStorageInfo.Validate(); err != nil { - invalidParams.AddNested("EbsStorageInfo", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEbsStorageInfo sets the EbsStorageInfo field's value. -func (s *StorageInfo) SetEbsStorageInfo(v *EBSStorageInfo) *StorageInfo { - s.EbsStorageInfo = v - return s -} - -// Zookeeper node information. -type ZookeeperNodeInfo struct { - _ struct{} `type:"structure"` - - // The attached elastic network interface of the broker. - AttachedENIId *string `locationName:"attachedENIId" type:"string"` - - // The virtual private cloud (VPC) IP address of the client. - ClientVpcIpAddress *string `locationName:"clientVpcIpAddress" type:"string"` - - // The role-specific ID for Zookeeper. - ZookeeperId *float64 `locationName:"zookeeperId" type:"double"` - - // The version of Zookeeper. - ZookeeperVersion *string `locationName:"zookeeperVersion" type:"string"` -} - -// String returns the string representation -func (s ZookeeperNodeInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ZookeeperNodeInfo) GoString() string { - return s.String() -} - -// SetAttachedENIId sets the AttachedENIId field's value. -func (s *ZookeeperNodeInfo) SetAttachedENIId(v string) *ZookeeperNodeInfo { - s.AttachedENIId = &v - return s -} - -// SetClientVpcIpAddress sets the ClientVpcIpAddress field's value. -func (s *ZookeeperNodeInfo) SetClientVpcIpAddress(v string) *ZookeeperNodeInfo { - s.ClientVpcIpAddress = &v - return s -} - -// SetZookeeperId sets the ZookeeperId field's value. -func (s *ZookeeperNodeInfo) SetZookeeperId(v float64) *ZookeeperNodeInfo { - s.ZookeeperId = &v - return s -} - -// SetZookeeperVersion sets the ZookeeperVersion field's value. -func (s *ZookeeperNodeInfo) SetZookeeperVersion(v string) *ZookeeperNodeInfo { - s.ZookeeperVersion = &v - return s -} - -// The distribution of broker nodes across Availability Zones. By default, broker -// nodes are distributed among three Availability Zones. Currently, the only -// supported value is DEFAULT. You can either specify this value explicitly -// or leave it out. -const ( - // BrokerAZDistributionDefault is a BrokerAZDistribution enum value - BrokerAZDistributionDefault = "DEFAULT" -) - -// The state of a Kafka cluster. -const ( - // ClusterStateActive is a ClusterState enum value - ClusterStateActive = "ACTIVE" - - // ClusterStateCreating is a ClusterState enum value - ClusterStateCreating = "CREATING" - - // ClusterStateDeleting is a ClusterState enum value - ClusterStateDeleting = "DELETING" - - // ClusterStateFailed is a ClusterState enum value - ClusterStateFailed = "FAILED" -) - -// Specifies which metrics are gathered for the MSK cluster. This property has -// three possible values: DEFAULT, PER_BROKER, and PER_TOPIC_PER_BROKER. -const ( - // EnhancedMonitoringDefault is a EnhancedMonitoring enum value - EnhancedMonitoringDefault = "DEFAULT" - - // EnhancedMonitoringPerBroker is a EnhancedMonitoring enum value - EnhancedMonitoringPerBroker = "PER_BROKER" - - // EnhancedMonitoringPerTopicPerBroker is a EnhancedMonitoring enum value - EnhancedMonitoringPerTopicPerBroker = "PER_TOPIC_PER_BROKER" -) - -// The broker or Zookeeper node. -const ( - // NodeTypeBroker is a NodeType enum value - NodeTypeBroker = "BROKER" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/kafka/doc.go b/vendor/github.com/aws/aws-sdk-go/service/kafka/doc.go deleted file mode 100644 index bc1d6eed6..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kafka/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package kafka provides the client and types for making API -// requests to Managed Streaming for Kafka. -// -// The operations for managing an Amazon MSK cluster. -// -// See https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14 for more information on this service. -// -// See kafka package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/kafka/ -// -// Using the Client -// -// To contact Managed Streaming for Kafka 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 Managed Streaming for Kafka client Kafka for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/kafka/#New -package kafka diff --git a/vendor/github.com/aws/aws-sdk-go/service/kafka/errors.go b/vendor/github.com/aws/aws-sdk-go/service/kafka/errors.go deleted file mode 100644 index 2927a1714..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kafka/errors.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package kafka - -const ( - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - // - // Returns information about an error. - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeConflictException for service response error code - // "ConflictException". - // - // Returns information about an error. - ErrCodeConflictException = "ConflictException" - - // ErrCodeForbiddenException for service response error code - // "ForbiddenException". - // - // Returns information about an error. - ErrCodeForbiddenException = "ForbiddenException" - - // ErrCodeInternalServerErrorException for service response error code - // "InternalServerErrorException". - // - // Returns information about an error. - ErrCodeInternalServerErrorException = "InternalServerErrorException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // Returns information about an error. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeServiceUnavailableException for service response error code - // "ServiceUnavailableException". - // - // Returns information about an error. - ErrCodeServiceUnavailableException = "ServiceUnavailableException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // Returns information about an error. - ErrCodeTooManyRequestsException = "TooManyRequestsException" - - // ErrCodeUnauthorizedException for service response error code - // "UnauthorizedException". - // - // Returns information about an error. - ErrCodeUnauthorizedException = "UnauthorizedException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/kafka/service.go b/vendor/github.com/aws/aws-sdk-go/service/kafka/service.go deleted file mode 100644 index 51b606d9a..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kafka/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package kafka - -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" -) - -// Kafka provides the API operation methods for making requests to -// Managed Streaming for Kafka. See this package's package overview docs -// for details on the service. -// -// Kafka methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Kafka 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 = "Kafka" // Name of service. - EndpointsID = "kafka" // ID to lookup a service endpoint with. - ServiceID = "Kafka" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Kafka 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 Kafka client from just a session. -// svc := kafka.New(mySession) -// -// // Create a Kafka client with additional configuration -// svc := kafka.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Kafka { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "kafka" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Kafka { - svc := &Kafka{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-11-14", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Kafka operation and runs any -// custom request initialization. -func (c *Kafka) 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/kinesis/api.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go deleted file mode 100644 index 2cdb06a0f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go +++ /dev/null @@ -1,6849 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package kinesis - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAddTagsToStream = "AddTagsToStream" - -// AddTagsToStreamRequest generates a "aws/request.Request" representing the -// client's request for the AddTagsToStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTagsToStream for more information on using the AddTagsToStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsToStreamRequest method. -// req, resp := client.AddTagsToStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/AddTagsToStream -func (c *Kinesis) AddTagsToStreamRequest(input *AddTagsToStreamInput) (req *request.Request, output *AddTagsToStreamOutput) { - op := &request.Operation{ - Name: opAddTagsToStream, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsToStreamInput{} - } - - output = &AddTagsToStreamOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTagsToStream API operation for Amazon Kinesis. -// -// Adds or updates tags for the specified Kinesis data stream. Each time you -// invoke this operation, you can specify up to 10 tags. If you want to add -// more than 10 tags to your stream, you can invoke this operation multiple -// times. In total, each stream can have up to 50 tags. -// -// If tags have already been assigned to the stream, AddTagsToStream overwrites -// any existing tags that correspond to the specified tag keys. -// -// AddTagsToStream has a limit of five transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation AddTagsToStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/AddTagsToStream -func (c *Kinesis) AddTagsToStream(input *AddTagsToStreamInput) (*AddTagsToStreamOutput, error) { - req, out := c.AddTagsToStreamRequest(input) - return out, req.Send() -} - -// AddTagsToStreamWithContext is the same as AddTagsToStream with the addition of -// the ability to pass a context and additional request options. -// -// See AddTagsToStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) AddTagsToStreamWithContext(ctx aws.Context, input *AddTagsToStreamInput, opts ...request.Option) (*AddTagsToStreamOutput, error) { - req, out := c.AddTagsToStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStream = "CreateStream" - -// CreateStreamRequest generates a "aws/request.Request" representing the -// client's request for the CreateStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateStream for more information on using the CreateStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateStreamRequest method. -// req, resp := client.CreateStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/CreateStream -func (c *Kinesis) CreateStreamRequest(input *CreateStreamInput) (req *request.Request, output *CreateStreamOutput) { - op := &request.Operation{ - Name: opCreateStream, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateStreamInput{} - } - - output = &CreateStreamOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateStream API operation for Amazon Kinesis. -// -// Creates a Kinesis data stream. A stream captures and transports data records -// that are continuously emitted from different data sources or producers. Scale-out -// within a stream is explicitly supported by means of shards, which are uniquely -// identified groups of data records in a stream. -// -// You specify and control the number of shards that a stream is composed of. -// Each shard can support reads up to five transactions per second, up to a -// maximum data read total of 2 MB per second. Each shard can support writes -// up to 1,000 records per second, up to a maximum data write total of 1 MB -// per second. If the amount of data input increases or decreases, you can add -// or remove shards. -// -// The stream name identifies the stream. The name is scoped to the AWS account -// used by the application. It is also scoped by AWS Region. That is, two streams -// in two different accounts can have the same name, and two streams in the -// same account, but in two different Regions, can have the same name. -// -// CreateStream is an asynchronous operation. Upon receiving a CreateStream -// request, Kinesis Data Streams immediately returns and sets the stream status -// to CREATING. After the stream is created, Kinesis Data Streams sets the stream -// status to ACTIVE. You should perform read and write operations only on an -// ACTIVE stream. -// -// You receive a LimitExceededException when making a CreateStream request when -// you try to do one of the following: -// -// * Have more than five streams in the CREATING state at any point in time. -// -// * Create more shards than are authorized for your account. -// -// For the default shard limit for an AWS account, see Amazon Kinesis Data Streams -// Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) -// in the Amazon Kinesis Data Streams Developer Guide. To increase this limit, -// contact AWS Support (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html). -// -// You can use DescribeStream to check the stream status, which is returned -// in StreamStatus. -// -// CreateStream has a limit of five transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation CreateStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/CreateStream -func (c *Kinesis) CreateStream(input *CreateStreamInput) (*CreateStreamOutput, error) { - req, out := c.CreateStreamRequest(input) - return out, req.Send() -} - -// CreateStreamWithContext is the same as CreateStream with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) CreateStreamWithContext(ctx aws.Context, input *CreateStreamInput, opts ...request.Option) (*CreateStreamOutput, error) { - req, out := c.CreateStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDecreaseStreamRetentionPeriod = "DecreaseStreamRetentionPeriod" - -// DecreaseStreamRetentionPeriodRequest generates a "aws/request.Request" representing the -// client's request for the DecreaseStreamRetentionPeriod operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DecreaseStreamRetentionPeriod for more information on using the DecreaseStreamRetentionPeriod -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DecreaseStreamRetentionPeriodRequest method. -// req, resp := client.DecreaseStreamRetentionPeriodRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DecreaseStreamRetentionPeriod -func (c *Kinesis) DecreaseStreamRetentionPeriodRequest(input *DecreaseStreamRetentionPeriodInput) (req *request.Request, output *DecreaseStreamRetentionPeriodOutput) { - op := &request.Operation{ - Name: opDecreaseStreamRetentionPeriod, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DecreaseStreamRetentionPeriodInput{} - } - - output = &DecreaseStreamRetentionPeriodOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DecreaseStreamRetentionPeriod API operation for Amazon Kinesis. -// -// Decreases the Kinesis data stream's retention period, which is the length -// of time data records are accessible after they are added to the stream. The -// minimum value of a stream's retention period is 24 hours. -// -// This operation may result in lost data. For example, if the stream's retention -// period is 48 hours and is decreased to 24 hours, any data already in the -// stream that is older than 24 hours is inaccessible. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation DecreaseStreamRetentionPeriod for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DecreaseStreamRetentionPeriod -func (c *Kinesis) DecreaseStreamRetentionPeriod(input *DecreaseStreamRetentionPeriodInput) (*DecreaseStreamRetentionPeriodOutput, error) { - req, out := c.DecreaseStreamRetentionPeriodRequest(input) - return out, req.Send() -} - -// DecreaseStreamRetentionPeriodWithContext is the same as DecreaseStreamRetentionPeriod with the addition of -// the ability to pass a context and additional request options. -// -// See DecreaseStreamRetentionPeriod for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) DecreaseStreamRetentionPeriodWithContext(ctx aws.Context, input *DecreaseStreamRetentionPeriodInput, opts ...request.Option) (*DecreaseStreamRetentionPeriodOutput, error) { - req, out := c.DecreaseStreamRetentionPeriodRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteStream = "DeleteStream" - -// DeleteStreamRequest generates a "aws/request.Request" representing the -// client's request for the DeleteStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteStream for more information on using the DeleteStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteStreamRequest method. -// req, resp := client.DeleteStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeleteStream -func (c *Kinesis) DeleteStreamRequest(input *DeleteStreamInput) (req *request.Request, output *DeleteStreamOutput) { - op := &request.Operation{ - Name: opDeleteStream, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteStreamInput{} - } - - output = &DeleteStreamOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteStream API operation for Amazon Kinesis. -// -// Deletes a Kinesis data stream and all its shards and data. You must shut -// down any applications that are operating on the stream before you delete -// the stream. If an application attempts to operate on a deleted stream, it -// receives the exception ResourceNotFoundException. -// -// If the stream is in the ACTIVE state, you can delete it. After a DeleteStream -// request, the specified stream is in the DELETING state until Kinesis Data -// Streams completes the deletion. -// -// Note: Kinesis Data Streams might continue to accept data read and write operations, -// such as PutRecord, PutRecords, and GetRecords, on a stream in the DELETING -// state until the stream deletion is complete. -// -// When you delete a stream, any shards in that stream are also deleted, and -// any tags are dissociated from the stream. -// -// You can use the DescribeStream operation to check the state of the stream, -// which is returned in StreamStatus. -// -// DeleteStream has a limit of five transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation DeleteStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeleteStream -func (c *Kinesis) DeleteStream(input *DeleteStreamInput) (*DeleteStreamOutput, error) { - req, out := c.DeleteStreamRequest(input) - return out, req.Send() -} - -// DeleteStreamWithContext is the same as DeleteStream with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) DeleteStreamWithContext(ctx aws.Context, input *DeleteStreamInput, opts ...request.Option) (*DeleteStreamOutput, error) { - req, out := c.DeleteStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterStreamConsumer = "DeregisterStreamConsumer" - -// DeregisterStreamConsumerRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterStreamConsumer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterStreamConsumer for more information on using the DeregisterStreamConsumer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterStreamConsumerRequest method. -// req, resp := client.DeregisterStreamConsumerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeregisterStreamConsumer -func (c *Kinesis) DeregisterStreamConsumerRequest(input *DeregisterStreamConsumerInput) (req *request.Request, output *DeregisterStreamConsumerOutput) { - op := &request.Operation{ - Name: opDeregisterStreamConsumer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterStreamConsumerInput{} - } - - output = &DeregisterStreamConsumerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterStreamConsumer API operation for Amazon Kinesis. -// -// To deregister a consumer, provide its ARN. Alternatively, you can provide -// the ARN of the data stream and the name you gave the consumer when you registered -// it. You may also provide all three parameters, as long as they don't conflict -// with each other. If you don't know the name or ARN of the consumer that you -// want to deregister, you can use the ListStreamConsumers operation to get -// a list of the descriptions of all the consumers that are currently registered -// with a given data stream. The description of a consumer contains its name -// and ARN. -// -// This operation has a limit of five transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation DeregisterStreamConsumer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeregisterStreamConsumer -func (c *Kinesis) DeregisterStreamConsumer(input *DeregisterStreamConsumerInput) (*DeregisterStreamConsumerOutput, error) { - req, out := c.DeregisterStreamConsumerRequest(input) - return out, req.Send() -} - -// DeregisterStreamConsumerWithContext is the same as DeregisterStreamConsumer with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterStreamConsumer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) DeregisterStreamConsumerWithContext(ctx aws.Context, input *DeregisterStreamConsumerInput, opts ...request.Option) (*DeregisterStreamConsumerOutput, error) { - req, out := c.DeregisterStreamConsumerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLimits = "DescribeLimits" - -// DescribeLimitsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLimits operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLimits for more information on using the DescribeLimits -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLimitsRequest method. -// req, resp := client.DescribeLimitsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeLimits -func (c *Kinesis) DescribeLimitsRequest(input *DescribeLimitsInput) (req *request.Request, output *DescribeLimitsOutput) { - op := &request.Operation{ - Name: opDescribeLimits, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLimitsInput{} - } - - output = &DescribeLimitsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLimits API operation for Amazon Kinesis. -// -// Describes the shard limits and usage for the account. -// -// If you update your account limits, the old limits might be returned for a -// few minutes. -// -// This operation has a limit of one transaction per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation DescribeLimits for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeLimits -func (c *Kinesis) DescribeLimits(input *DescribeLimitsInput) (*DescribeLimitsOutput, error) { - req, out := c.DescribeLimitsRequest(input) - return out, req.Send() -} - -// DescribeLimitsWithContext is the same as DescribeLimits with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLimits for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) DescribeLimitsWithContext(ctx aws.Context, input *DescribeLimitsInput, opts ...request.Option) (*DescribeLimitsOutput, error) { - req, out := c.DescribeLimitsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStream = "DescribeStream" - -// DescribeStreamRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStream for more information on using the DescribeStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStreamRequest method. -// req, resp := client.DescribeStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStream -func (c *Kinesis) DescribeStreamRequest(input *DescribeStreamInput) (req *request.Request, output *DescribeStreamOutput) { - op := &request.Operation{ - Name: opDescribeStream, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"ExclusiveStartShardId"}, - OutputTokens: []string{"StreamDescription.Shards[-1].ShardId"}, - LimitToken: "Limit", - TruncationToken: "StreamDescription.HasMoreShards", - }, - } - - if input == nil { - input = &DescribeStreamInput{} - } - - output = &DescribeStreamOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStream API operation for Amazon Kinesis. -// -// Describes the specified Kinesis data stream. -// -// The information returned includes the stream name, Amazon Resource Name (ARN), -// creation time, enhanced metric configuration, and shard map. The shard map -// is an array of shard objects. For each shard object, there is the hash key -// and sequence number ranges that the shard spans, and the IDs of any earlier -// shards that played in a role in creating the shard. Every record ingested -// in the stream is identified by a sequence number, which is assigned when -// the record is put into the stream. -// -// You can limit the number of shards returned by each call. For more information, -// see Retrieving Shards from a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-retrieve-shards.html) -// in the Amazon Kinesis Data Streams Developer Guide. -// -// There are no guarantees about the chronological order shards returned. To -// process shards in chronological order, use the ID of the parent shard to -// track the lineage to the oldest shard. -// -// This operation has a limit of 10 transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation DescribeStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStream -func (c *Kinesis) DescribeStream(input *DescribeStreamInput) (*DescribeStreamOutput, error) { - req, out := c.DescribeStreamRequest(input) - return out, req.Send() -} - -// DescribeStreamWithContext is the same as DescribeStream with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) DescribeStreamWithContext(ctx aws.Context, input *DescribeStreamInput, opts ...request.Option) (*DescribeStreamOutput, error) { - req, out := c.DescribeStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeStreamPages iterates over the pages of a DescribeStream operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeStream 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 DescribeStream operation. -// pageNum := 0 -// err := client.DescribeStreamPages(params, -// func(page *DescribeStreamOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Kinesis) DescribeStreamPages(input *DescribeStreamInput, fn func(*DescribeStreamOutput, bool) bool) error { - return c.DescribeStreamPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeStreamPagesWithContext same as DescribeStreamPages 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 *Kinesis) DescribeStreamPagesWithContext(ctx aws.Context, input *DescribeStreamInput, fn func(*DescribeStreamOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeStreamInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeStreamRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeStreamOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeStreamConsumer = "DescribeStreamConsumer" - -// DescribeStreamConsumerRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStreamConsumer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStreamConsumer for more information on using the DescribeStreamConsumer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStreamConsumerRequest method. -// req, resp := client.DescribeStreamConsumerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStreamConsumer -func (c *Kinesis) DescribeStreamConsumerRequest(input *DescribeStreamConsumerInput) (req *request.Request, output *DescribeStreamConsumerOutput) { - op := &request.Operation{ - Name: opDescribeStreamConsumer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStreamConsumerInput{} - } - - output = &DescribeStreamConsumerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStreamConsumer API operation for Amazon Kinesis. -// -// To get the description of a registered consumer, provide the ARN of the consumer. -// Alternatively, you can provide the ARN of the data stream and the name you -// gave the consumer when you registered it. You may also provide all three -// parameters, as long as they don't conflict with each other. If you don't -// know the name or ARN of the consumer that you want to describe, you can use -// the ListStreamConsumers operation to get a list of the descriptions of all -// the consumers that are currently registered with a given data stream. -// -// This operation has a limit of 20 transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation DescribeStreamConsumer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStreamConsumer -func (c *Kinesis) DescribeStreamConsumer(input *DescribeStreamConsumerInput) (*DescribeStreamConsumerOutput, error) { - req, out := c.DescribeStreamConsumerRequest(input) - return out, req.Send() -} - -// DescribeStreamConsumerWithContext is the same as DescribeStreamConsumer with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStreamConsumer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) DescribeStreamConsumerWithContext(ctx aws.Context, input *DescribeStreamConsumerInput, opts ...request.Option) (*DescribeStreamConsumerOutput, error) { - req, out := c.DescribeStreamConsumerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStreamSummary = "DescribeStreamSummary" - -// DescribeStreamSummaryRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStreamSummary operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStreamSummary for more information on using the DescribeStreamSummary -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStreamSummaryRequest method. -// req, resp := client.DescribeStreamSummaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStreamSummary -func (c *Kinesis) DescribeStreamSummaryRequest(input *DescribeStreamSummaryInput) (req *request.Request, output *DescribeStreamSummaryOutput) { - op := &request.Operation{ - Name: opDescribeStreamSummary, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStreamSummaryInput{} - } - - output = &DescribeStreamSummaryOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStreamSummary API operation for Amazon Kinesis. -// -// Provides a summarized description of the specified Kinesis data stream without -// the shard list. -// -// The information returned includes the stream name, Amazon Resource Name (ARN), -// status, record retention period, approximate creation time, monitoring, encryption -// details, and open shard count. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation DescribeStreamSummary for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStreamSummary -func (c *Kinesis) DescribeStreamSummary(input *DescribeStreamSummaryInput) (*DescribeStreamSummaryOutput, error) { - req, out := c.DescribeStreamSummaryRequest(input) - return out, req.Send() -} - -// DescribeStreamSummaryWithContext is the same as DescribeStreamSummary with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStreamSummary for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) DescribeStreamSummaryWithContext(ctx aws.Context, input *DescribeStreamSummaryInput, opts ...request.Option) (*DescribeStreamSummaryOutput, error) { - req, out := c.DescribeStreamSummaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableEnhancedMonitoring = "DisableEnhancedMonitoring" - -// DisableEnhancedMonitoringRequest generates a "aws/request.Request" representing the -// client's request for the DisableEnhancedMonitoring operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableEnhancedMonitoring for more information on using the DisableEnhancedMonitoring -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableEnhancedMonitoringRequest method. -// req, resp := client.DisableEnhancedMonitoringRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DisableEnhancedMonitoring -func (c *Kinesis) DisableEnhancedMonitoringRequest(input *DisableEnhancedMonitoringInput) (req *request.Request, output *EnhancedMonitoringOutput) { - op := &request.Operation{ - Name: opDisableEnhancedMonitoring, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableEnhancedMonitoringInput{} - } - - output = &EnhancedMonitoringOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisableEnhancedMonitoring API operation for Amazon Kinesis. -// -// Disables enhanced monitoring. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation DisableEnhancedMonitoring for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DisableEnhancedMonitoring -func (c *Kinesis) DisableEnhancedMonitoring(input *DisableEnhancedMonitoringInput) (*EnhancedMonitoringOutput, error) { - req, out := c.DisableEnhancedMonitoringRequest(input) - return out, req.Send() -} - -// DisableEnhancedMonitoringWithContext is the same as DisableEnhancedMonitoring with the addition of -// the ability to pass a context and additional request options. -// -// See DisableEnhancedMonitoring for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) DisableEnhancedMonitoringWithContext(ctx aws.Context, input *DisableEnhancedMonitoringInput, opts ...request.Option) (*EnhancedMonitoringOutput, error) { - req, out := c.DisableEnhancedMonitoringRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableEnhancedMonitoring = "EnableEnhancedMonitoring" - -// EnableEnhancedMonitoringRequest generates a "aws/request.Request" representing the -// client's request for the EnableEnhancedMonitoring operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableEnhancedMonitoring for more information on using the EnableEnhancedMonitoring -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableEnhancedMonitoringRequest method. -// req, resp := client.EnableEnhancedMonitoringRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/EnableEnhancedMonitoring -func (c *Kinesis) EnableEnhancedMonitoringRequest(input *EnableEnhancedMonitoringInput) (req *request.Request, output *EnhancedMonitoringOutput) { - op := &request.Operation{ - Name: opEnableEnhancedMonitoring, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableEnhancedMonitoringInput{} - } - - output = &EnhancedMonitoringOutput{} - req = c.newRequest(op, input, output) - return -} - -// EnableEnhancedMonitoring API operation for Amazon Kinesis. -// -// Enables enhanced Kinesis data stream monitoring for shard-level metrics. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation EnableEnhancedMonitoring for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/EnableEnhancedMonitoring -func (c *Kinesis) EnableEnhancedMonitoring(input *EnableEnhancedMonitoringInput) (*EnhancedMonitoringOutput, error) { - req, out := c.EnableEnhancedMonitoringRequest(input) - return out, req.Send() -} - -// EnableEnhancedMonitoringWithContext is the same as EnableEnhancedMonitoring with the addition of -// the ability to pass a context and additional request options. -// -// See EnableEnhancedMonitoring for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) EnableEnhancedMonitoringWithContext(ctx aws.Context, input *EnableEnhancedMonitoringInput, opts ...request.Option) (*EnhancedMonitoringOutput, error) { - req, out := c.EnableEnhancedMonitoringRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRecords = "GetRecords" - -// GetRecordsRequest generates a "aws/request.Request" representing the -// client's request for the GetRecords operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRecords for more information on using the GetRecords -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRecordsRequest method. -// req, resp := client.GetRecordsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetRecords -func (c *Kinesis) GetRecordsRequest(input *GetRecordsInput) (req *request.Request, output *GetRecordsOutput) { - op := &request.Operation{ - Name: opGetRecords, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRecordsInput{} - } - - output = &GetRecordsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRecords API operation for Amazon Kinesis. -// -// Gets data records from a Kinesis data stream's shard. -// -// Specify a shard iterator using the ShardIterator parameter. The shard iterator -// specifies the position in the shard from which you want to start reading -// data records sequentially. If there are no records available in the portion -// of the shard that the iterator points to, GetRecords returns an empty list. -// It might take multiple calls to get to a portion of the shard that contains -// records. -// -// You can scale by provisioning multiple shards per stream while considering -// service limits (for more information, see Amazon Kinesis Data Streams Limits -// (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) -// in the Amazon Kinesis Data Streams Developer Guide). Your application should -// have one thread per shard, each reading continuously from its stream. To -// read from a stream continually, call GetRecords in a loop. Use GetShardIterator -// to get the shard iterator to specify in the first GetRecords call. GetRecords -// returns a new shard iterator in NextShardIterator. Specify the shard iterator -// returned in NextShardIterator in subsequent calls to GetRecords. If the shard -// has been closed, the shard iterator can't return more data and GetRecords -// returns null in NextShardIterator. You can terminate the loop when the shard -// is closed, or when the shard iterator reaches the record with the sequence -// number or other attribute that marks it as the last record to process. -// -// Each data record can be up to 1 MiB in size, and each shard can read up to -// 2 MiB per second. You can ensure that your calls don't exceed the maximum -// supported size or throughput by using the Limit parameter to specify the -// maximum number of records that GetRecords can return. Consider your average -// record size when determining this limit. The maximum number of records that -// can be returned per call is 10,000. -// -// The size of the data returned by GetRecords varies depending on the utilization -// of the shard. The maximum size of data that GetRecords can return is 10 MiB. -// If a call returns this amount of data, subsequent calls made within the next -// 5 seconds throw ProvisionedThroughputExceededException. If there is insufficient -// provisioned throughput on the stream, subsequent calls made within the next -// 1 second throw ProvisionedThroughputExceededException. GetRecords doesn't -// return any data when it throws an exception. For this reason, we recommend -// that you wait 1 second between calls to GetRecords. However, it's possible -// that the application will get exceptions for longer than 1 second. -// -// To detect whether the application is falling behind in processing, you can -// use the MillisBehindLatest response attribute. You can also monitor the stream -// using CloudWatch metrics and other mechanisms (see Monitoring (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring.html) -// in the Amazon Kinesis Data Streams Developer Guide). -// -// Each Amazon Kinesis record includes a value, ApproximateArrivalTimestamp, -// that is set when a stream successfully receives and stores a record. This -// is commonly referred to as a server-side time stamp, whereas a client-side -// time stamp is set when a data producer creates or sends the record to a stream -// (a data producer is any data source putting data records into a stream, for -// example with PutRecords). The time stamp has millisecond precision. There -// are no guarantees about the time stamp accuracy, or that the time stamp is -// always increasing. For example, records in a shard or across a stream might -// have time stamps that are out of order. -// -// This operation has a limit of five transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation GetRecords for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException" -// The request rate for the stream is too high, or the requested data is too -// large for the available throughput. Reduce the frequency or size of your -// requests. For more information, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) -// in the Amazon Kinesis Data Streams Developer Guide, and Error Retries and -// Exponential Backoff in AWS (http://docs.aws.amazon.com/general/latest/gr/api-retries.html) -// in the AWS General Reference. -// -// * ErrCodeExpiredIteratorException "ExpiredIteratorException" -// The provided iterator exceeds the maximum age allowed. -// -// * ErrCodeKMSDisabledException "KMSDisabledException" -// The request was rejected because the specified customer master key (CMK) -// isn't enabled. -// -// * ErrCodeKMSInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource isn't -// valid for this request. For more information, see How Key State Affects Use -// of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeKMSAccessDeniedException "KMSAccessDeniedException" -// The ciphertext references a key that doesn't exist or that you don't have -// access to. -// -// * ErrCodeKMSNotFoundException "KMSNotFoundException" -// The request was rejected because the specified entity or resource can't be -// found. -// -// * ErrCodeKMSOptInRequired "KMSOptInRequired" -// The AWS access key ID needs a subscription for the service. -// -// * ErrCodeKMSThrottlingException "KMSThrottlingException" -// The request was denied due to request throttling. For more information about -// throttling, see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetRecords -func (c *Kinesis) GetRecords(input *GetRecordsInput) (*GetRecordsOutput, error) { - req, out := c.GetRecordsRequest(input) - return out, req.Send() -} - -// GetRecordsWithContext is the same as GetRecords with the addition of -// the ability to pass a context and additional request options. -// -// See GetRecords for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) GetRecordsWithContext(ctx aws.Context, input *GetRecordsInput, opts ...request.Option) (*GetRecordsOutput, error) { - req, out := c.GetRecordsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetShardIterator = "GetShardIterator" - -// GetShardIteratorRequest generates a "aws/request.Request" representing the -// client's request for the GetShardIterator operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetShardIterator for more information on using the GetShardIterator -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetShardIteratorRequest method. -// req, resp := client.GetShardIteratorRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetShardIterator -func (c *Kinesis) GetShardIteratorRequest(input *GetShardIteratorInput) (req *request.Request, output *GetShardIteratorOutput) { - op := &request.Operation{ - Name: opGetShardIterator, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetShardIteratorInput{} - } - - output = &GetShardIteratorOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetShardIterator API operation for Amazon Kinesis. -// -// Gets an Amazon Kinesis shard iterator. A shard iterator expires 5 minutes -// after it is returned to the requester. -// -// A shard iterator specifies the shard position from which to start reading -// data records sequentially. The position is specified using the sequence number -// of a data record in a shard. A sequence number is the identifier associated -// with every record ingested in the stream, and is assigned when a record is -// put into the stream. Each stream has one or more shards. -// -// You must specify the shard iterator type. For example, you can set the ShardIteratorType -// parameter to read exactly from the position denoted by a specific sequence -// number by using the AT_SEQUENCE_NUMBER shard iterator type. Alternatively, -// the parameter can read right after the sequence number by using the AFTER_SEQUENCE_NUMBER -// shard iterator type, using sequence numbers returned by earlier calls to -// PutRecord, PutRecords, GetRecords, or DescribeStream. In the request, you -// can specify the shard iterator type AT_TIMESTAMP to read records from an -// arbitrary point in time, TRIM_HORIZON to cause ShardIterator to point to -// the last untrimmed record in the shard in the system (the oldest data record -// in the shard), or LATEST so that you always read the most recent data in -// the shard. -// -// When you read repeatedly from a stream, use a GetShardIterator request to -// get the first shard iterator for use in your first GetRecords request and -// for subsequent reads use the shard iterator returned by the GetRecords request -// in NextShardIterator. A new shard iterator is returned by every GetRecords -// request in NextShardIterator, which you use in the ShardIterator parameter -// of the next GetRecords request. -// -// If a GetShardIterator request is made too often, you receive a ProvisionedThroughputExceededException. -// For more information about throughput limits, see GetRecords, and Streams -// Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) -// in the Amazon Kinesis Data Streams Developer Guide. -// -// If the shard is closed, GetShardIterator returns a valid iterator for the -// last sequence number of the shard. A shard can be closed as a result of using -// SplitShard or MergeShards. -// -// GetShardIterator has a limit of five transactions per second per account -// per open shard. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation GetShardIterator for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException" -// The request rate for the stream is too high, or the requested data is too -// large for the available throughput. Reduce the frequency or size of your -// requests. For more information, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) -// in the Amazon Kinesis Data Streams Developer Guide, and Error Retries and -// Exponential Backoff in AWS (http://docs.aws.amazon.com/general/latest/gr/api-retries.html) -// in the AWS General Reference. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetShardIterator -func (c *Kinesis) GetShardIterator(input *GetShardIteratorInput) (*GetShardIteratorOutput, error) { - req, out := c.GetShardIteratorRequest(input) - return out, req.Send() -} - -// GetShardIteratorWithContext is the same as GetShardIterator with the addition of -// the ability to pass a context and additional request options. -// -// See GetShardIterator for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) GetShardIteratorWithContext(ctx aws.Context, input *GetShardIteratorInput, opts ...request.Option) (*GetShardIteratorOutput, error) { - req, out := c.GetShardIteratorRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opIncreaseStreamRetentionPeriod = "IncreaseStreamRetentionPeriod" - -// IncreaseStreamRetentionPeriodRequest generates a "aws/request.Request" representing the -// client's request for the IncreaseStreamRetentionPeriod operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See IncreaseStreamRetentionPeriod for more information on using the IncreaseStreamRetentionPeriod -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the IncreaseStreamRetentionPeriodRequest method. -// req, resp := client.IncreaseStreamRetentionPeriodRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/IncreaseStreamRetentionPeriod -func (c *Kinesis) IncreaseStreamRetentionPeriodRequest(input *IncreaseStreamRetentionPeriodInput) (req *request.Request, output *IncreaseStreamRetentionPeriodOutput) { - op := &request.Operation{ - Name: opIncreaseStreamRetentionPeriod, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &IncreaseStreamRetentionPeriodInput{} - } - - output = &IncreaseStreamRetentionPeriodOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// IncreaseStreamRetentionPeriod API operation for Amazon Kinesis. -// -// Increases the Kinesis data stream's retention period, which is the length -// of time data records are accessible after they are added to the stream. The -// maximum value of a stream's retention period is 168 hours (7 days). -// -// If you choose a longer stream retention period, this operation increases -// the time period during which records that have not yet expired are accessible. -// However, it does not make previous, expired data (older than the stream's -// previous retention period) accessible after the operation has been called. -// For example, if a stream's retention period is set to 24 hours and is increased -// to 168 hours, any data that is older than 24 hours remains inaccessible to -// consumer applications. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation IncreaseStreamRetentionPeriod for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/IncreaseStreamRetentionPeriod -func (c *Kinesis) IncreaseStreamRetentionPeriod(input *IncreaseStreamRetentionPeriodInput) (*IncreaseStreamRetentionPeriodOutput, error) { - req, out := c.IncreaseStreamRetentionPeriodRequest(input) - return out, req.Send() -} - -// IncreaseStreamRetentionPeriodWithContext is the same as IncreaseStreamRetentionPeriod with the addition of -// the ability to pass a context and additional request options. -// -// See IncreaseStreamRetentionPeriod for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) IncreaseStreamRetentionPeriodWithContext(ctx aws.Context, input *IncreaseStreamRetentionPeriodInput, opts ...request.Option) (*IncreaseStreamRetentionPeriodOutput, error) { - req, out := c.IncreaseStreamRetentionPeriodRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListShards = "ListShards" - -// ListShardsRequest generates a "aws/request.Request" representing the -// client's request for the ListShards operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListShards for more information on using the ListShards -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListShardsRequest method. -// req, resp := client.ListShardsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListShards -func (c *Kinesis) ListShardsRequest(input *ListShardsInput) (req *request.Request, output *ListShardsOutput) { - op := &request.Operation{ - Name: opListShards, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListShardsInput{} - } - - output = &ListShardsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListShards API operation for Amazon Kinesis. -// -// Lists the shards in a stream and provides information about each shard. This -// operation has a limit of 100 transactions per second per data stream. -// -// This API is a new operation that is used by the Amazon Kinesis Client Library -// (KCL). If you have a fine-grained IAM policy that only allows specific operations, -// you must update your policy to allow calls to this API. For more information, -// see Controlling Access to Amazon Kinesis Data Streams Resources Using IAM -// (https://docs.aws.amazon.com/streams/latest/dev/controlling-access.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation ListShards for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" -// The pagination token passed to the operation is expired. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListShards -func (c *Kinesis) ListShards(input *ListShardsInput) (*ListShardsOutput, error) { - req, out := c.ListShardsRequest(input) - return out, req.Send() -} - -// ListShardsWithContext is the same as ListShards with the addition of -// the ability to pass a context and additional request options. -// -// See ListShards for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) ListShardsWithContext(ctx aws.Context, input *ListShardsInput, opts ...request.Option) (*ListShardsOutput, error) { - req, out := c.ListShardsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListStreamConsumers = "ListStreamConsumers" - -// ListStreamConsumersRequest generates a "aws/request.Request" representing the -// client's request for the ListStreamConsumers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListStreamConsumers for more information on using the ListStreamConsumers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListStreamConsumersRequest method. -// req, resp := client.ListStreamConsumersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListStreamConsumers -func (c *Kinesis) ListStreamConsumersRequest(input *ListStreamConsumersInput) (req *request.Request, output *ListStreamConsumersOutput) { - op := &request.Operation{ - Name: opListStreamConsumers, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListStreamConsumersInput{} - } - - output = &ListStreamConsumersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListStreamConsumers API operation for Amazon Kinesis. -// -// Lists the consumers registered to receive data from a stream using enhanced -// fan-out, and provides information about each consumer. -// -// This operation has a limit of 10 transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation ListStreamConsumers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" -// The pagination token passed to the operation is expired. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListStreamConsumers -func (c *Kinesis) ListStreamConsumers(input *ListStreamConsumersInput) (*ListStreamConsumersOutput, error) { - req, out := c.ListStreamConsumersRequest(input) - return out, req.Send() -} - -// ListStreamConsumersWithContext is the same as ListStreamConsumers with the addition of -// the ability to pass a context and additional request options. -// -// See ListStreamConsumers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) ListStreamConsumersWithContext(ctx aws.Context, input *ListStreamConsumersInput, opts ...request.Option) (*ListStreamConsumersOutput, error) { - req, out := c.ListStreamConsumersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListStreamConsumersPages iterates over the pages of a ListStreamConsumers operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListStreamConsumers 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 ListStreamConsumers operation. -// pageNum := 0 -// err := client.ListStreamConsumersPages(params, -// func(page *ListStreamConsumersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Kinesis) ListStreamConsumersPages(input *ListStreamConsumersInput, fn func(*ListStreamConsumersOutput, bool) bool) error { - return c.ListStreamConsumersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListStreamConsumersPagesWithContext same as ListStreamConsumersPages 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 *Kinesis) ListStreamConsumersPagesWithContext(ctx aws.Context, input *ListStreamConsumersInput, fn func(*ListStreamConsumersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListStreamConsumersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListStreamConsumersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStreamConsumersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListStreams = "ListStreams" - -// ListStreamsRequest generates a "aws/request.Request" representing the -// client's request for the ListStreams operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListStreams for more information on using the ListStreams -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListStreamsRequest method. -// req, resp := client.ListStreamsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListStreams -func (c *Kinesis) ListStreamsRequest(input *ListStreamsInput) (req *request.Request, output *ListStreamsOutput) { - op := &request.Operation{ - Name: opListStreams, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"ExclusiveStartStreamName"}, - OutputTokens: []string{"StreamNames[-1]"}, - LimitToken: "Limit", - TruncationToken: "HasMoreStreams", - }, - } - - if input == nil { - input = &ListStreamsInput{} - } - - output = &ListStreamsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListStreams API operation for Amazon Kinesis. -// -// Lists your Kinesis data streams. -// -// The number of streams may be too large to return from a single call to ListStreams. -// You can limit the number of returned streams using the Limit parameter. If -// you do not specify a value for the Limit parameter, Kinesis Data Streams -// uses the default limit, which is currently 10. -// -// You can detect if there are more streams available to list by using the HasMoreStreams -// flag from the returned output. If there are more streams available, you can -// request more streams by using the name of the last stream returned by the -// ListStreams request in the ExclusiveStartStreamName parameter in a subsequent -// request to ListStreams. The group of stream names returned by the subsequent -// request is then added to the list. You can continue this process until all -// the stream names have been collected in the list. -// -// ListStreams has a limit of five transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation ListStreams for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListStreams -func (c *Kinesis) ListStreams(input *ListStreamsInput) (*ListStreamsOutput, error) { - req, out := c.ListStreamsRequest(input) - return out, req.Send() -} - -// ListStreamsWithContext is the same as ListStreams with the addition of -// the ability to pass a context and additional request options. -// -// See ListStreams for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) ListStreamsWithContext(ctx aws.Context, input *ListStreamsInput, opts ...request.Option) (*ListStreamsOutput, error) { - req, out := c.ListStreamsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListStreamsPages iterates over the pages of a ListStreams operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListStreams 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 ListStreams operation. -// pageNum := 0 -// err := client.ListStreamsPages(params, -// func(page *ListStreamsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Kinesis) ListStreamsPages(input *ListStreamsInput, fn func(*ListStreamsOutput, bool) bool) error { - return c.ListStreamsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListStreamsPagesWithContext same as ListStreamsPages 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 *Kinesis) ListStreamsPagesWithContext(ctx aws.Context, input *ListStreamsInput, fn func(*ListStreamsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListStreamsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListStreamsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStreamsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTagsForStream = "ListTagsForStream" - -// ListTagsForStreamRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTagsForStream for more information on using the ListTagsForStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsForStreamRequest method. -// req, resp := client.ListTagsForStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListTagsForStream -func (c *Kinesis) ListTagsForStreamRequest(input *ListTagsForStreamInput) (req *request.Request, output *ListTagsForStreamOutput) { - op := &request.Operation{ - Name: opListTagsForStream, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForStreamInput{} - } - - output = &ListTagsForStreamOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForStream API operation for Amazon Kinesis. -// -// Lists the tags for the specified Kinesis data stream. This operation has -// a limit of five transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation ListTagsForStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListTagsForStream -func (c *Kinesis) ListTagsForStream(input *ListTagsForStreamInput) (*ListTagsForStreamOutput, error) { - req, out := c.ListTagsForStreamRequest(input) - return out, req.Send() -} - -// ListTagsForStreamWithContext is the same as ListTagsForStream with the addition of -// the ability to pass a context and additional request options. -// -// See ListTagsForStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) ListTagsForStreamWithContext(ctx aws.Context, input *ListTagsForStreamInput, opts ...request.Option) (*ListTagsForStreamOutput, error) { - req, out := c.ListTagsForStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opMergeShards = "MergeShards" - -// MergeShardsRequest generates a "aws/request.Request" representing the -// client's request for the MergeShards operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See MergeShards for more information on using the MergeShards -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the MergeShardsRequest method. -// req, resp := client.MergeShardsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/MergeShards -func (c *Kinesis) MergeShardsRequest(input *MergeShardsInput) (req *request.Request, output *MergeShardsOutput) { - op := &request.Operation{ - Name: opMergeShards, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &MergeShardsInput{} - } - - output = &MergeShardsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// MergeShards API operation for Amazon Kinesis. -// -// Merges two adjacent shards in a Kinesis data stream and combines them into -// a single shard to reduce the stream's capacity to ingest and transport data. -// Two shards are considered adjacent if the union of the hash key ranges for -// the two shards form a contiguous set with no gaps. For example, if you have -// two shards, one with a hash key range of 276...381 and the other with a hash -// key range of 382...454, then you could merge these two shards into a single -// shard that would have a hash key range of 276...454. After the merge, the -// single child shard receives data for all hash key values covered by the two -// parent shards. -// -// MergeShards is called when there is a need to reduce the overall capacity -// of a stream because of excess capacity that is not being used. You must specify -// the shard to be merged and the adjacent shard for a stream. For more information -// about merging shards, see Merge Two Shards (http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-merge.html) -// in the Amazon Kinesis Data Streams Developer Guide. -// -// If the stream is in the ACTIVE state, you can call MergeShards. If a stream -// is in the CREATING, UPDATING, or DELETING state, MergeShards returns a ResourceInUseException. -// If the specified stream does not exist, MergeShards returns a ResourceNotFoundException. -// -// You can use DescribeStream to check the state of the stream, which is returned -// in StreamStatus. -// -// MergeShards is an asynchronous operation. Upon receiving a MergeShards request, -// Amazon Kinesis Data Streams immediately returns a response and sets the StreamStatus -// to UPDATING. After the operation is completed, Kinesis Data Streams sets -// the StreamStatus to ACTIVE. Read and write operations continue to work while -// the stream is in the UPDATING state. -// -// You use DescribeStream to determine the shard IDs that are specified in the -// MergeShards request. -// -// If you try to operate on too many streams in parallel using CreateStream, -// DeleteStream, MergeShards, or SplitShard, you receive a LimitExceededException. -// -// MergeShards has a limit of five transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation MergeShards for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/MergeShards -func (c *Kinesis) MergeShards(input *MergeShardsInput) (*MergeShardsOutput, error) { - req, out := c.MergeShardsRequest(input) - return out, req.Send() -} - -// MergeShardsWithContext is the same as MergeShards with the addition of -// the ability to pass a context and additional request options. -// -// See MergeShards for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) MergeShardsWithContext(ctx aws.Context, input *MergeShardsInput, opts ...request.Option) (*MergeShardsOutput, error) { - req, out := c.MergeShardsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutRecord = "PutRecord" - -// PutRecordRequest generates a "aws/request.Request" representing the -// client's request for the PutRecord operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutRecord for more information on using the PutRecord -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutRecordRequest method. -// req, resp := client.PutRecordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecord -func (c *Kinesis) PutRecordRequest(input *PutRecordInput) (req *request.Request, output *PutRecordOutput) { - op := &request.Operation{ - Name: opPutRecord, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutRecordInput{} - } - - output = &PutRecordOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutRecord API operation for Amazon Kinesis. -// -// Writes a single data record into an Amazon Kinesis data stream. Call PutRecord -// to send data into the stream for real-time ingestion and subsequent processing, -// one record at a time. Each shard can support writes up to 1,000 records per -// second, up to a maximum data write total of 1 MB per second. -// -// You must specify the name of the stream that captures, stores, and transports -// the data; a partition key; and the data blob itself. -// -// The data blob can be any type of data; for example, a segment from a log -// file, geographic/location data, website clickstream data, and so on. -// -// The partition key is used by Kinesis Data Streams to distribute data across -// shards. Kinesis Data Streams segregates the data records that belong to a -// stream into multiple shards, using the partition key associated with each -// data record to determine the shard to which a given data record belongs. -// -// Partition keys are Unicode strings, with a maximum length limit of 256 characters -// for each key. An MD5 hash function is used to map partition keys to 128-bit -// integer values and to map associated data records to shards using the hash -// key ranges of the shards. You can override hashing the partition key to determine -// the shard by explicitly specifying a hash value using the ExplicitHashKey -// parameter. For more information, see Adding Data to a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream) -// in the Amazon Kinesis Data Streams Developer Guide. -// -// PutRecord returns the shard ID of where the data record was placed and the -// sequence number that was assigned to the data record. -// -// Sequence numbers increase over time and are specific to a shard within a -// stream, not across all shards within a stream. To guarantee strictly increasing -// ordering, write serially to a shard and use the SequenceNumberForOrdering -// parameter. For more information, see Adding Data to a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream) -// in the Amazon Kinesis Data Streams Developer Guide. -// -// If a PutRecord request cannot be processed because of insufficient provisioned -// throughput on the shard involved in the request, PutRecord throws ProvisionedThroughputExceededException. -// -// By default, data records are accessible for 24 hours from the time that they -// are added to a stream. You can use IncreaseStreamRetentionPeriod or DecreaseStreamRetentionPeriod -// to modify this retention period. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation PutRecord for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException" -// The request rate for the stream is too high, or the requested data is too -// large for the available throughput. Reduce the frequency or size of your -// requests. For more information, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) -// in the Amazon Kinesis Data Streams Developer Guide, and Error Retries and -// Exponential Backoff in AWS (http://docs.aws.amazon.com/general/latest/gr/api-retries.html) -// in the AWS General Reference. -// -// * ErrCodeKMSDisabledException "KMSDisabledException" -// The request was rejected because the specified customer master key (CMK) -// isn't enabled. -// -// * ErrCodeKMSInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource isn't -// valid for this request. For more information, see How Key State Affects Use -// of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeKMSAccessDeniedException "KMSAccessDeniedException" -// The ciphertext references a key that doesn't exist or that you don't have -// access to. -// -// * ErrCodeKMSNotFoundException "KMSNotFoundException" -// The request was rejected because the specified entity or resource can't be -// found. -// -// * ErrCodeKMSOptInRequired "KMSOptInRequired" -// The AWS access key ID needs a subscription for the service. -// -// * ErrCodeKMSThrottlingException "KMSThrottlingException" -// The request was denied due to request throttling. For more information about -// throttling, see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecord -func (c *Kinesis) PutRecord(input *PutRecordInput) (*PutRecordOutput, error) { - req, out := c.PutRecordRequest(input) - return out, req.Send() -} - -// PutRecordWithContext is the same as PutRecord with the addition of -// the ability to pass a context and additional request options. -// -// See PutRecord for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) PutRecordWithContext(ctx aws.Context, input *PutRecordInput, opts ...request.Option) (*PutRecordOutput, error) { - req, out := c.PutRecordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutRecords = "PutRecords" - -// PutRecordsRequest generates a "aws/request.Request" representing the -// client's request for the PutRecords operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutRecords for more information on using the PutRecords -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutRecordsRequest method. -// req, resp := client.PutRecordsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecords -func (c *Kinesis) PutRecordsRequest(input *PutRecordsInput) (req *request.Request, output *PutRecordsOutput) { - op := &request.Operation{ - Name: opPutRecords, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutRecordsInput{} - } - - output = &PutRecordsOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutRecords API operation for Amazon Kinesis. -// -// Writes multiple data records into a Kinesis data stream in a single call -// (also referred to as a PutRecords request). Use this operation to send data -// into the stream for data ingestion and processing. -// -// Each PutRecords request can support up to 500 records. Each record in the -// request can be as large as 1 MB, up to a limit of 5 MB for the entire request, -// including partition keys. Each shard can support writes up to 1,000 records -// per second, up to a maximum data write total of 1 MB per second. -// -// You must specify the name of the stream that captures, stores, and transports -// the data; and an array of request Records, with each record in the array -// requiring a partition key and data blob. The record size limit applies to -// the total size of the partition key and data blob. -// -// The data blob can be any type of data; for example, a segment from a log -// file, geographic/location data, website clickstream data, and so on. -// -// The partition key is used by Kinesis Data Streams as input to a hash function -// that maps the partition key and associated data to a specific shard. An MD5 -// hash function is used to map partition keys to 128-bit integer values and -// to map associated data records to shards. As a result of this hashing mechanism, -// all data records with the same partition key map to the same shard within -// the stream. For more information, see Adding Data to a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream) -// in the Amazon Kinesis Data Streams Developer Guide. -// -// Each record in the Records array may include an optional parameter, ExplicitHashKey, -// which overrides the partition key to shard mapping. This parameter allows -// a data producer to determine explicitly the shard where the record is stored. -// For more information, see Adding Multiple Records with PutRecords (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-putrecords) -// in the Amazon Kinesis Data Streams Developer Guide. -// -// The PutRecords response includes an array of response Records. Each record -// in the response array directly correlates with a record in the request array -// using natural ordering, from the top to the bottom of the request and response. -// The response Records array always includes the same number of records as -// the request array. -// -// The response Records array includes both successfully and unsuccessfully -// processed records. Kinesis Data Streams attempts to process all records in -// each PutRecords request. A single record failure does not stop the processing -// of subsequent records. -// -// A successfully processed record includes ShardId and SequenceNumber values. -// The ShardId parameter identifies the shard in the stream where the record -// is stored. The SequenceNumber parameter is an identifier assigned to the -// put record, unique to all records in the stream. -// -// An unsuccessfully processed record includes ErrorCode and ErrorMessage values. -// ErrorCode reflects the type of error and can be one of the following values: -// ProvisionedThroughputExceededException or InternalFailure. ErrorMessage provides -// more detailed information about the ProvisionedThroughputExceededException -// exception including the account ID, stream name, and shard ID of the record -// that was throttled. For more information about partially successful responses, -// see Adding Multiple Records with PutRecords (http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-add-data-to-stream.html#kinesis-using-sdk-java-putrecords) -// in the Amazon Kinesis Data Streams Developer Guide. -// -// By default, data records are accessible for 24 hours from the time that they -// are added to a stream. You can use IncreaseStreamRetentionPeriod or DecreaseStreamRetentionPeriod -// to modify this retention period. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation PutRecords for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException" -// The request rate for the stream is too high, or the requested data is too -// large for the available throughput. Reduce the frequency or size of your -// requests. For more information, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) -// in the Amazon Kinesis Data Streams Developer Guide, and Error Retries and -// Exponential Backoff in AWS (http://docs.aws.amazon.com/general/latest/gr/api-retries.html) -// in the AWS General Reference. -// -// * ErrCodeKMSDisabledException "KMSDisabledException" -// The request was rejected because the specified customer master key (CMK) -// isn't enabled. -// -// * ErrCodeKMSInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource isn't -// valid for this request. For more information, see How Key State Affects Use -// of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeKMSAccessDeniedException "KMSAccessDeniedException" -// The ciphertext references a key that doesn't exist or that you don't have -// access to. -// -// * ErrCodeKMSNotFoundException "KMSNotFoundException" -// The request was rejected because the specified entity or resource can't be -// found. -// -// * ErrCodeKMSOptInRequired "KMSOptInRequired" -// The AWS access key ID needs a subscription for the service. -// -// * ErrCodeKMSThrottlingException "KMSThrottlingException" -// The request was denied due to request throttling. For more information about -// throttling, see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecords -func (c *Kinesis) PutRecords(input *PutRecordsInput) (*PutRecordsOutput, error) { - req, out := c.PutRecordsRequest(input) - return out, req.Send() -} - -// PutRecordsWithContext is the same as PutRecords with the addition of -// the ability to pass a context and additional request options. -// -// See PutRecords for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) PutRecordsWithContext(ctx aws.Context, input *PutRecordsInput, opts ...request.Option) (*PutRecordsOutput, error) { - req, out := c.PutRecordsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterStreamConsumer = "RegisterStreamConsumer" - -// RegisterStreamConsumerRequest generates a "aws/request.Request" representing the -// client's request for the RegisterStreamConsumer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterStreamConsumer for more information on using the RegisterStreamConsumer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterStreamConsumerRequest method. -// req, resp := client.RegisterStreamConsumerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/RegisterStreamConsumer -func (c *Kinesis) RegisterStreamConsumerRequest(input *RegisterStreamConsumerInput) (req *request.Request, output *RegisterStreamConsumerOutput) { - op := &request.Operation{ - Name: opRegisterStreamConsumer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterStreamConsumerInput{} - } - - output = &RegisterStreamConsumerOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterStreamConsumer API operation for Amazon Kinesis. -// -// Registers a consumer with a Kinesis data stream. When you use this operation, -// the consumer you register can read data from the stream at a rate of up to -// 2 MiB per second. This rate is unaffected by the total number of consumers -// that read from the same stream. -// -// You can register up to 5 consumers per stream. A given consumer can only -// be registered with one stream. -// -// This operation has a limit of five transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation RegisterStreamConsumer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/RegisterStreamConsumer -func (c *Kinesis) RegisterStreamConsumer(input *RegisterStreamConsumerInput) (*RegisterStreamConsumerOutput, error) { - req, out := c.RegisterStreamConsumerRequest(input) - return out, req.Send() -} - -// RegisterStreamConsumerWithContext is the same as RegisterStreamConsumer with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterStreamConsumer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) RegisterStreamConsumerWithContext(ctx aws.Context, input *RegisterStreamConsumerInput, opts ...request.Option) (*RegisterStreamConsumerOutput, error) { - req, out := c.RegisterStreamConsumerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTagsFromStream = "RemoveTagsFromStream" - -// RemoveTagsFromStreamRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTagsFromStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTagsFromStream for more information on using the RemoveTagsFromStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsFromStreamRequest method. -// req, resp := client.RemoveTagsFromStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/RemoveTagsFromStream -func (c *Kinesis) RemoveTagsFromStreamRequest(input *RemoveTagsFromStreamInput) (req *request.Request, output *RemoveTagsFromStreamOutput) { - op := &request.Operation{ - Name: opRemoveTagsFromStream, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsFromStreamInput{} - } - - output = &RemoveTagsFromStreamOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTagsFromStream API operation for Amazon Kinesis. -// -// Removes tags from the specified Kinesis data stream. Removed tags are deleted -// and cannot be recovered after this operation successfully completes. -// -// If you specify a tag that does not exist, it is ignored. -// -// RemoveTagsFromStream has a limit of five transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation RemoveTagsFromStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/RemoveTagsFromStream -func (c *Kinesis) RemoveTagsFromStream(input *RemoveTagsFromStreamInput) (*RemoveTagsFromStreamOutput, error) { - req, out := c.RemoveTagsFromStreamRequest(input) - return out, req.Send() -} - -// RemoveTagsFromStreamWithContext is the same as RemoveTagsFromStream with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTagsFromStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) RemoveTagsFromStreamWithContext(ctx aws.Context, input *RemoveTagsFromStreamInput, opts ...request.Option) (*RemoveTagsFromStreamOutput, error) { - req, out := c.RemoveTagsFromStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSplitShard = "SplitShard" - -// SplitShardRequest generates a "aws/request.Request" representing the -// client's request for the SplitShard operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SplitShard for more information on using the SplitShard -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SplitShardRequest method. -// req, resp := client.SplitShardRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/SplitShard -func (c *Kinesis) SplitShardRequest(input *SplitShardInput) (req *request.Request, output *SplitShardOutput) { - op := &request.Operation{ - Name: opSplitShard, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SplitShardInput{} - } - - output = &SplitShardOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SplitShard API operation for Amazon Kinesis. -// -// Splits a shard into two new shards in the Kinesis data stream, to increase -// the stream's capacity to ingest and transport data. SplitShard is called -// when there is a need to increase the overall capacity of a stream because -// of an expected increase in the volume of data records being ingested. -// -// You can also use SplitShard when a shard appears to be approaching its maximum -// utilization; for example, the producers sending data into the specific shard -// are suddenly sending more than previously anticipated. You can also call -// SplitShard to increase stream capacity, so that more Kinesis Data Streams -// applications can simultaneously read data from the stream for real-time processing. -// -// You must specify the shard to be split and the new hash key, which is the -// position in the shard where the shard gets split in two. In many cases, the -// new hash key might be the average of the beginning and ending hash key, but -// it can be any hash key value in the range being mapped into the shard. For -// more information, see Split a Shard (http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-split.html) -// in the Amazon Kinesis Data Streams Developer Guide. -// -// You can use DescribeStream to determine the shard ID and hash key values -// for the ShardToSplit and NewStartingHashKey parameters that are specified -// in the SplitShard request. -// -// SplitShard is an asynchronous operation. Upon receiving a SplitShard request, -// Kinesis Data Streams immediately returns a response and sets the stream status -// to UPDATING. After the operation is completed, Kinesis Data Streams sets -// the stream status to ACTIVE. Read and write operations continue to work while -// the stream is in the UPDATING state. -// -// You can use DescribeStream to check the status of the stream, which is returned -// in StreamStatus. If the stream is in the ACTIVE state, you can call SplitShard. -// If a stream is in CREATING or UPDATING or DELETING states, DescribeStream -// returns a ResourceInUseException. -// -// If the specified stream does not exist, DescribeStream returns a ResourceNotFoundException. -// If you try to create more shards than are authorized for your account, you -// receive a LimitExceededException. -// -// For the default shard limit for an AWS account, see Kinesis Data Streams -// Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) -// in the Amazon Kinesis Data Streams Developer Guide. To increase this limit, -// contact AWS Support (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html). -// -// If you try to operate on too many streams simultaneously using CreateStream, -// DeleteStream, MergeShards, and/or SplitShard, you receive a LimitExceededException. -// -// SplitShard has a limit of five transactions per second per account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation SplitShard for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/SplitShard -func (c *Kinesis) SplitShard(input *SplitShardInput) (*SplitShardOutput, error) { - req, out := c.SplitShardRequest(input) - return out, req.Send() -} - -// SplitShardWithContext is the same as SplitShard with the addition of -// the ability to pass a context and additional request options. -// -// See SplitShard for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) SplitShardWithContext(ctx aws.Context, input *SplitShardInput, opts ...request.Option) (*SplitShardOutput, error) { - req, out := c.SplitShardRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartStreamEncryption = "StartStreamEncryption" - -// StartStreamEncryptionRequest generates a "aws/request.Request" representing the -// client's request for the StartStreamEncryption operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartStreamEncryption for more information on using the StartStreamEncryption -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartStreamEncryptionRequest method. -// req, resp := client.StartStreamEncryptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StartStreamEncryption -func (c *Kinesis) StartStreamEncryptionRequest(input *StartStreamEncryptionInput) (req *request.Request, output *StartStreamEncryptionOutput) { - op := &request.Operation{ - Name: opStartStreamEncryption, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartStreamEncryptionInput{} - } - - output = &StartStreamEncryptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartStreamEncryption API operation for Amazon Kinesis. -// -// Enables or updates server-side encryption using an AWS KMS key for a specified -// stream. -// -// Starting encryption is an asynchronous operation. Upon receiving the request, -// Kinesis Data Streams returns immediately and sets the status of the stream -// to UPDATING. After the update is complete, Kinesis Data Streams sets the -// status of the stream back to ACTIVE. Updating or applying encryption normally -// takes a few seconds to complete, but it can take minutes. You can continue -// to read and write data to your stream while its status is UPDATING. Once -// the status of the stream is ACTIVE, encryption begins for records written -// to the stream. -// -// API Limits: You can successfully apply a new AWS KMS key for server-side -// encryption 25 times in a rolling 24-hour period. -// -// Note: It can take up to 5 seconds after the stream is in an ACTIVE status -// before all records written to the stream are encrypted. After you enable -// encryption, you can verify that encryption is applied by inspecting the API -// response from PutRecord or PutRecords. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation StartStreamEncryption for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// * ErrCodeKMSDisabledException "KMSDisabledException" -// The request was rejected because the specified customer master key (CMK) -// isn't enabled. -// -// * ErrCodeKMSInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource isn't -// valid for this request. For more information, see How Key State Affects Use -// of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeKMSAccessDeniedException "KMSAccessDeniedException" -// The ciphertext references a key that doesn't exist or that you don't have -// access to. -// -// * ErrCodeKMSNotFoundException "KMSNotFoundException" -// The request was rejected because the specified entity or resource can't be -// found. -// -// * ErrCodeKMSOptInRequired "KMSOptInRequired" -// The AWS access key ID needs a subscription for the service. -// -// * ErrCodeKMSThrottlingException "KMSThrottlingException" -// The request was denied due to request throttling. For more information about -// throttling, see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StartStreamEncryption -func (c *Kinesis) StartStreamEncryption(input *StartStreamEncryptionInput) (*StartStreamEncryptionOutput, error) { - req, out := c.StartStreamEncryptionRequest(input) - return out, req.Send() -} - -// StartStreamEncryptionWithContext is the same as StartStreamEncryption with the addition of -// the ability to pass a context and additional request options. -// -// See StartStreamEncryption for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) StartStreamEncryptionWithContext(ctx aws.Context, input *StartStreamEncryptionInput, opts ...request.Option) (*StartStreamEncryptionOutput, error) { - req, out := c.StartStreamEncryptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopStreamEncryption = "StopStreamEncryption" - -// StopStreamEncryptionRequest generates a "aws/request.Request" representing the -// client's request for the StopStreamEncryption operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopStreamEncryption for more information on using the StopStreamEncryption -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopStreamEncryptionRequest method. -// req, resp := client.StopStreamEncryptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StopStreamEncryption -func (c *Kinesis) StopStreamEncryptionRequest(input *StopStreamEncryptionInput) (req *request.Request, output *StopStreamEncryptionOutput) { - op := &request.Operation{ - Name: opStopStreamEncryption, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopStreamEncryptionInput{} - } - - output = &StopStreamEncryptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopStreamEncryption API operation for Amazon Kinesis. -// -// Disables server-side encryption for a specified stream. -// -// Stopping encryption is an asynchronous operation. Upon receiving the request, -// Kinesis Data Streams returns immediately and sets the status of the stream -// to UPDATING. After the update is complete, Kinesis Data Streams sets the -// status of the stream back to ACTIVE. Stopping encryption normally takes a -// few seconds to complete, but it can take minutes. You can continue to read -// and write data to your stream while its status is UPDATING. Once the status -// of the stream is ACTIVE, records written to the stream are no longer encrypted -// by Kinesis Data Streams. -// -// API Limits: You can successfully disable server-side encryption 25 times -// in a rolling 24-hour period. -// -// Note: It can take up to 5 seconds after the stream is in an ACTIVE status -// before all records written to the stream are no longer subject to encryption. -// After you disabled encryption, you can verify that encryption is not applied -// by inspecting the API response from PutRecord or PutRecords. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation StopStreamEncryption for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StopStreamEncryption -func (c *Kinesis) StopStreamEncryption(input *StopStreamEncryptionInput) (*StopStreamEncryptionOutput, error) { - req, out := c.StopStreamEncryptionRequest(input) - return out, req.Send() -} - -// StopStreamEncryptionWithContext is the same as StopStreamEncryption with the addition of -// the ability to pass a context and additional request options. -// -// See StopStreamEncryption for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) StopStreamEncryptionWithContext(ctx aws.Context, input *StopStreamEncryptionInput, opts ...request.Option) (*StopStreamEncryptionOutput, error) { - req, out := c.StopStreamEncryptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateShardCount = "UpdateShardCount" - -// UpdateShardCountRequest generates a "aws/request.Request" representing the -// client's request for the UpdateShardCount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateShardCount for more information on using the UpdateShardCount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateShardCountRequest method. -// req, resp := client.UpdateShardCountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/UpdateShardCount -func (c *Kinesis) UpdateShardCountRequest(input *UpdateShardCountInput) (req *request.Request, output *UpdateShardCountOutput) { - op := &request.Operation{ - Name: opUpdateShardCount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateShardCountInput{} - } - - output = &UpdateShardCountOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateShardCount API operation for Amazon Kinesis. -// -// Updates the shard count of the specified stream to the specified number of -// shards. -// -// Updating the shard count is an asynchronous operation. Upon receiving the -// request, Kinesis Data Streams returns immediately and sets the status of -// the stream to UPDATING. After the update is complete, Kinesis Data Streams -// sets the status of the stream back to ACTIVE. Depending on the size of the -// stream, the scaling action could take a few minutes to complete. You can -// continue to read and write data to your stream while its status is UPDATING. -// -// To update the shard count, Kinesis Data Streams performs splits or merges -// on individual shards. This can cause short-lived shards to be created, in -// addition to the final shards. We recommend that you double or halve the shard -// count, as this results in the fewest number of splits or merges. -// -// This operation has the following default limits. By default, you cannot do -// the following: -// -// * Scale more than twice per rolling 24-hour period per stream -// -// * Scale up to more than double your current shard count for a stream -// -// * Scale down below half your current shard count for a stream -// -// * Scale up to more than 500 shards in a stream -// -// * Scale a stream with more than 500 shards down unless the result is less -// than 500 shards -// -// * Scale up to more than the shard limit for your account -// -// For the default limits for an AWS account, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) -// in the Amazon Kinesis Data Streams Developer Guide. To request an increase -// in the call rate limit, the shard limit for this API, or your overall shard -// limit, use the limits form (https://console.aws.amazon.com/support/v1#/case/create?issueType=service-limit-increase&limitType=service-code-kinesis). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis's -// API operation UpdateShardCount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// A specified parameter exceeds its restrictions, is not supported, or can't -// be used. For more information, see the returned message. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The requested resource exceeds the maximum number allowed, or the number -// of concurrent stream requests exceeds the maximum number allowed. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource is not available for this operation. For successful operation, -// the resource must be in the ACTIVE state. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource could not be found. The stream might not be specified -// correctly. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/UpdateShardCount -func (c *Kinesis) UpdateShardCount(input *UpdateShardCountInput) (*UpdateShardCountOutput, error) { - req, out := c.UpdateShardCountRequest(input) - return out, req.Send() -} - -// UpdateShardCountWithContext is the same as UpdateShardCount with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateShardCount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) UpdateShardCountWithContext(ctx aws.Context, input *UpdateShardCountInput, opts ...request.Option) (*UpdateShardCountOutput, error) { - req, out := c.UpdateShardCountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Represents the input for AddTagsToStream. -type AddTagsToStreamInput struct { - _ struct{} `type:"structure"` - - // The name of the stream. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` - - // A set of up to 10 key-value pairs to use to create the tags. - // - // Tags is a required field - Tags map[string]*string `min:"1" type:"map" required:"true"` -} - -// String returns the string representation -func (s AddTagsToStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsToStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsToStreamInput"} - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStreamName sets the StreamName field's value. -func (s *AddTagsToStreamInput) SetStreamName(v string) *AddTagsToStreamInput { - s.StreamName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsToStreamInput) SetTags(v map[string]*string) *AddTagsToStreamInput { - s.Tags = v - return s -} - -type AddTagsToStreamOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsToStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToStreamOutput) GoString() string { - return s.String() -} - -// An object that represents the details of the consumer you registered. -type Consumer struct { - _ struct{} `type:"structure"` - - // When you register a consumer, Kinesis Data Streams generates an ARN for it. - // You need this ARN to be able to call SubscribeToShard. - // - // If you delete a consumer and then create a new one with the same name, it - // won't have the same ARN. That's because consumer ARNs contain the creation - // timestamp. This is important to keep in mind if you have IAM policies that - // reference consumer ARNs. - // - // ConsumerARN is a required field - ConsumerARN *string `min:"1" type:"string" required:"true"` - - // ConsumerCreationTimestamp is a required field - ConsumerCreationTimestamp *time.Time `type:"timestamp" required:"true"` - - // The name of the consumer is something you choose when you register the consumer. - // - // ConsumerName is a required field - ConsumerName *string `min:"1" type:"string" required:"true"` - - // A consumer can't read data while in the CREATING or DELETING states. - // - // ConsumerStatus is a required field - ConsumerStatus *string `type:"string" required:"true" enum:"ConsumerStatus"` -} - -// String returns the string representation -func (s Consumer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Consumer) GoString() string { - return s.String() -} - -// SetConsumerARN sets the ConsumerARN field's value. -func (s *Consumer) SetConsumerARN(v string) *Consumer { - s.ConsumerARN = &v - return s -} - -// SetConsumerCreationTimestamp sets the ConsumerCreationTimestamp field's value. -func (s *Consumer) SetConsumerCreationTimestamp(v time.Time) *Consumer { - s.ConsumerCreationTimestamp = &v - return s -} - -// SetConsumerName sets the ConsumerName field's value. -func (s *Consumer) SetConsumerName(v string) *Consumer { - s.ConsumerName = &v - return s -} - -// SetConsumerStatus sets the ConsumerStatus field's value. -func (s *Consumer) SetConsumerStatus(v string) *Consumer { - s.ConsumerStatus = &v - return s -} - -// An object that represents the details of a registered consumer. -type ConsumerDescription struct { - _ struct{} `type:"structure"` - - // When you register a consumer, Kinesis Data Streams generates an ARN for it. - // You need this ARN to be able to call SubscribeToShard. - // - // If you delete a consumer and then create a new one with the same name, it - // won't have the same ARN. That's because consumer ARNs contain the creation - // timestamp. This is important to keep in mind if you have IAM policies that - // reference consumer ARNs. - // - // ConsumerARN is a required field - ConsumerARN *string `min:"1" type:"string" required:"true"` - - // ConsumerCreationTimestamp is a required field - ConsumerCreationTimestamp *time.Time `type:"timestamp" required:"true"` - - // The name of the consumer is something you choose when you register the consumer. - // - // ConsumerName is a required field - ConsumerName *string `min:"1" type:"string" required:"true"` - - // A consumer can't read data while in the CREATING or DELETING states. - // - // ConsumerStatus is a required field - ConsumerStatus *string `type:"string" required:"true" enum:"ConsumerStatus"` - - // The ARN of the stream with which you registered the consumer. - // - // StreamARN is a required field - StreamARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ConsumerDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConsumerDescription) GoString() string { - return s.String() -} - -// SetConsumerARN sets the ConsumerARN field's value. -func (s *ConsumerDescription) SetConsumerARN(v string) *ConsumerDescription { - s.ConsumerARN = &v - return s -} - -// SetConsumerCreationTimestamp sets the ConsumerCreationTimestamp field's value. -func (s *ConsumerDescription) SetConsumerCreationTimestamp(v time.Time) *ConsumerDescription { - s.ConsumerCreationTimestamp = &v - return s -} - -// SetConsumerName sets the ConsumerName field's value. -func (s *ConsumerDescription) SetConsumerName(v string) *ConsumerDescription { - s.ConsumerName = &v - return s -} - -// SetConsumerStatus sets the ConsumerStatus field's value. -func (s *ConsumerDescription) SetConsumerStatus(v string) *ConsumerDescription { - s.ConsumerStatus = &v - return s -} - -// SetStreamARN sets the StreamARN field's value. -func (s *ConsumerDescription) SetStreamARN(v string) *ConsumerDescription { - s.StreamARN = &v - return s -} - -// Represents the input for CreateStream. -type CreateStreamInput struct { - _ struct{} `type:"structure"` - - // The number of shards that the stream will use. The throughput of the stream - // is a function of the number of shards; more shards are required for greater - // provisioned throughput. - // - // DefaultShardLimit; - // - // ShardCount is a required field - ShardCount *int64 `min:"1" type:"integer" required:"true"` - - // A name to identify the stream. The stream name is scoped to the AWS account - // used by the application that creates the stream. It is also scoped by AWS - // Region. That is, two streams in two different AWS accounts can have the same - // name. Two streams in the same AWS account but in two different Regions can - // also have the same name. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStreamInput"} - if s.ShardCount == nil { - invalidParams.Add(request.NewErrParamRequired("ShardCount")) - } - if s.ShardCount != nil && *s.ShardCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("ShardCount", 1)) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetShardCount sets the ShardCount field's value. -func (s *CreateStreamInput) SetShardCount(v int64) *CreateStreamInput { - s.ShardCount = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *CreateStreamInput) SetStreamName(v string) *CreateStreamInput { - s.StreamName = &v - return s -} - -type CreateStreamOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStreamOutput) GoString() string { - return s.String() -} - -// Represents the input for DecreaseStreamRetentionPeriod. -type DecreaseStreamRetentionPeriodInput struct { - _ struct{} `type:"structure"` - - // The new retention period of the stream, in hours. Must be less than the current - // retention period. - // - // RetentionPeriodHours is a required field - RetentionPeriodHours *int64 `min:"1" type:"integer" required:"true"` - - // The name of the stream to modify. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DecreaseStreamRetentionPeriodInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DecreaseStreamRetentionPeriodInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DecreaseStreamRetentionPeriodInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DecreaseStreamRetentionPeriodInput"} - if s.RetentionPeriodHours == nil { - invalidParams.Add(request.NewErrParamRequired("RetentionPeriodHours")) - } - if s.RetentionPeriodHours != nil && *s.RetentionPeriodHours < 1 { - invalidParams.Add(request.NewErrParamMinValue("RetentionPeriodHours", 1)) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRetentionPeriodHours sets the RetentionPeriodHours field's value. -func (s *DecreaseStreamRetentionPeriodInput) SetRetentionPeriodHours(v int64) *DecreaseStreamRetentionPeriodInput { - s.RetentionPeriodHours = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *DecreaseStreamRetentionPeriodInput) SetStreamName(v string) *DecreaseStreamRetentionPeriodInput { - s.StreamName = &v - return s -} - -type DecreaseStreamRetentionPeriodOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DecreaseStreamRetentionPeriodOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DecreaseStreamRetentionPeriodOutput) GoString() string { - return s.String() -} - -// Represents the input for DeleteStream. -type DeleteStreamInput struct { - _ struct{} `type:"structure"` - - // If this parameter is unset (null) or if you set it to false, and the stream - // has registered consumers, the call to DeleteStream fails with a ResourceInUseException. - EnforceConsumerDeletion *bool `type:"boolean"` - - // The name of the stream to delete. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteStreamInput"} - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnforceConsumerDeletion sets the EnforceConsumerDeletion field's value. -func (s *DeleteStreamInput) SetEnforceConsumerDeletion(v bool) *DeleteStreamInput { - s.EnforceConsumerDeletion = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *DeleteStreamInput) SetStreamName(v string) *DeleteStreamInput { - s.StreamName = &v - return s -} - -type DeleteStreamOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStreamOutput) GoString() string { - return s.String() -} - -type DeregisterStreamConsumerInput struct { - _ struct{} `type:"structure"` - - // The ARN returned by Kinesis Data Streams when you registered the consumer. - // If you don't know the ARN of the consumer that you want to deregister, you - // can use the ListStreamConsumers operation to get a list of the descriptions - // of all the consumers that are currently registered with a given data stream. - // The description of a consumer contains its ARN. - ConsumerARN *string `min:"1" type:"string"` - - // The name that you gave to the consumer. - ConsumerName *string `min:"1" type:"string"` - - // The ARN of the Kinesis data stream that the consumer is registered with. - // For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces - // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). - StreamARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeregisterStreamConsumerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterStreamConsumerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterStreamConsumerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterStreamConsumerInput"} - if s.ConsumerARN != nil && len(*s.ConsumerARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConsumerARN", 1)) - } - if s.ConsumerName != nil && len(*s.ConsumerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConsumerName", 1)) - } - if s.StreamARN != nil && len(*s.StreamARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConsumerARN sets the ConsumerARN field's value. -func (s *DeregisterStreamConsumerInput) SetConsumerARN(v string) *DeregisterStreamConsumerInput { - s.ConsumerARN = &v - return s -} - -// SetConsumerName sets the ConsumerName field's value. -func (s *DeregisterStreamConsumerInput) SetConsumerName(v string) *DeregisterStreamConsumerInput { - s.ConsumerName = &v - return s -} - -// SetStreamARN sets the StreamARN field's value. -func (s *DeregisterStreamConsumerInput) SetStreamARN(v string) *DeregisterStreamConsumerInput { - s.StreamARN = &v - return s -} - -type DeregisterStreamConsumerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeregisterStreamConsumerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterStreamConsumerOutput) GoString() string { - return s.String() -} - -type DescribeLimitsInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeLimitsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLimitsInput) GoString() string { - return s.String() -} - -type DescribeLimitsOutput struct { - _ struct{} `type:"structure"` - - // The number of open shards. - // - // OpenShardCount is a required field - OpenShardCount *int64 `type:"integer" required:"true"` - - // The maximum number of shards. - // - // ShardLimit is a required field - ShardLimit *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s DescribeLimitsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLimitsOutput) GoString() string { - return s.String() -} - -// SetOpenShardCount sets the OpenShardCount field's value. -func (s *DescribeLimitsOutput) SetOpenShardCount(v int64) *DescribeLimitsOutput { - s.OpenShardCount = &v - return s -} - -// SetShardLimit sets the ShardLimit field's value. -func (s *DescribeLimitsOutput) SetShardLimit(v int64) *DescribeLimitsOutput { - s.ShardLimit = &v - return s -} - -type DescribeStreamConsumerInput struct { - _ struct{} `type:"structure"` - - // The ARN returned by Kinesis Data Streams when you registered the consumer. - ConsumerARN *string `min:"1" type:"string"` - - // The name that you gave to the consumer. - ConsumerName *string `min:"1" type:"string"` - - // The ARN of the Kinesis data stream that the consumer is registered with. - // For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces - // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). - StreamARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeStreamConsumerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStreamConsumerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStreamConsumerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStreamConsumerInput"} - if s.ConsumerARN != nil && len(*s.ConsumerARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConsumerARN", 1)) - } - if s.ConsumerName != nil && len(*s.ConsumerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConsumerName", 1)) - } - if s.StreamARN != nil && len(*s.StreamARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConsumerARN sets the ConsumerARN field's value. -func (s *DescribeStreamConsumerInput) SetConsumerARN(v string) *DescribeStreamConsumerInput { - s.ConsumerARN = &v - return s -} - -// SetConsumerName sets the ConsumerName field's value. -func (s *DescribeStreamConsumerInput) SetConsumerName(v string) *DescribeStreamConsumerInput { - s.ConsumerName = &v - return s -} - -// SetStreamARN sets the StreamARN field's value. -func (s *DescribeStreamConsumerInput) SetStreamARN(v string) *DescribeStreamConsumerInput { - s.StreamARN = &v - return s -} - -type DescribeStreamConsumerOutput struct { - _ struct{} `type:"structure"` - - // An object that represents the details of the consumer. - // - // ConsumerDescription is a required field - ConsumerDescription *ConsumerDescription `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeStreamConsumerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStreamConsumerOutput) GoString() string { - return s.String() -} - -// SetConsumerDescription sets the ConsumerDescription field's value. -func (s *DescribeStreamConsumerOutput) SetConsumerDescription(v *ConsumerDescription) *DescribeStreamConsumerOutput { - s.ConsumerDescription = v - return s -} - -// Represents the input for DescribeStream. -type DescribeStreamInput struct { - _ struct{} `type:"structure"` - - // The shard ID of the shard to start with. - ExclusiveStartShardId *string `min:"1" type:"string"` - - // The maximum number of shards to return in a single call. The default value - // is 100. If you specify a value greater than 100, at most 100 shards are returned. - Limit *int64 `min:"1" type:"integer"` - - // The name of the stream to describe. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStreamInput"} - if s.ExclusiveStartShardId != nil && len(*s.ExclusiveStartShardId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartShardId", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExclusiveStartShardId sets the ExclusiveStartShardId field's value. -func (s *DescribeStreamInput) SetExclusiveStartShardId(v string) *DescribeStreamInput { - s.ExclusiveStartShardId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeStreamInput) SetLimit(v int64) *DescribeStreamInput { - s.Limit = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *DescribeStreamInput) SetStreamName(v string) *DescribeStreamInput { - s.StreamName = &v - return s -} - -// Represents the output for DescribeStream. -type DescribeStreamOutput struct { - _ struct{} `type:"structure"` - - // The current status of the stream, the stream Amazon Resource Name (ARN), - // an array of shard objects that comprise the stream, and whether there are - // more shards available. - // - // StreamDescription is a required field - StreamDescription *StreamDescription `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStreamOutput) GoString() string { - return s.String() -} - -// SetStreamDescription sets the StreamDescription field's value. -func (s *DescribeStreamOutput) SetStreamDescription(v *StreamDescription) *DescribeStreamOutput { - s.StreamDescription = v - return s -} - -type DescribeStreamSummaryInput struct { - _ struct{} `type:"structure"` - - // The name of the stream to describe. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeStreamSummaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStreamSummaryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStreamSummaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStreamSummaryInput"} - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStreamName sets the StreamName field's value. -func (s *DescribeStreamSummaryInput) SetStreamName(v string) *DescribeStreamSummaryInput { - s.StreamName = &v - return s -} - -type DescribeStreamSummaryOutput struct { - _ struct{} `type:"structure"` - - // A StreamDescriptionSummary containing information about the stream. - // - // StreamDescriptionSummary is a required field - StreamDescriptionSummary *StreamDescriptionSummary `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeStreamSummaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStreamSummaryOutput) GoString() string { - return s.String() -} - -// SetStreamDescriptionSummary sets the StreamDescriptionSummary field's value. -func (s *DescribeStreamSummaryOutput) SetStreamDescriptionSummary(v *StreamDescriptionSummary) *DescribeStreamSummaryOutput { - s.StreamDescriptionSummary = v - return s -} - -// Represents the input for DisableEnhancedMonitoring. -type DisableEnhancedMonitoringInput struct { - _ struct{} `type:"structure"` - - // List of shard-level metrics to disable. - // - // The following are the valid shard-level metrics. The value "ALL" disables - // every metric. - // - // * IncomingBytes - // - // * IncomingRecords - // - // * OutgoingBytes - // - // * OutgoingRecords - // - // * WriteProvisionedThroughputExceeded - // - // * ReadProvisionedThroughputExceeded - // - // * IteratorAgeMilliseconds - // - // * ALL - // - // For more information, see Monitoring the Amazon Kinesis Data Streams Service - // with Amazon CloudWatch (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html) - // in the Amazon Kinesis Data Streams Developer Guide. - // - // ShardLevelMetrics is a required field - ShardLevelMetrics []*string `min:"1" type:"list" required:"true"` - - // The name of the Kinesis data stream for which to disable enhanced monitoring. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableEnhancedMonitoringInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableEnhancedMonitoringInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableEnhancedMonitoringInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableEnhancedMonitoringInput"} - if s.ShardLevelMetrics == nil { - invalidParams.Add(request.NewErrParamRequired("ShardLevelMetrics")) - } - if s.ShardLevelMetrics != nil && len(s.ShardLevelMetrics) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ShardLevelMetrics", 1)) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetShardLevelMetrics sets the ShardLevelMetrics field's value. -func (s *DisableEnhancedMonitoringInput) SetShardLevelMetrics(v []*string) *DisableEnhancedMonitoringInput { - s.ShardLevelMetrics = v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *DisableEnhancedMonitoringInput) SetStreamName(v string) *DisableEnhancedMonitoringInput { - s.StreamName = &v - return s -} - -// Represents the input for EnableEnhancedMonitoring. -type EnableEnhancedMonitoringInput struct { - _ struct{} `type:"structure"` - - // List of shard-level metrics to enable. - // - // The following are the valid shard-level metrics. The value "ALL" enables - // every metric. - // - // * IncomingBytes - // - // * IncomingRecords - // - // * OutgoingBytes - // - // * OutgoingRecords - // - // * WriteProvisionedThroughputExceeded - // - // * ReadProvisionedThroughputExceeded - // - // * IteratorAgeMilliseconds - // - // * ALL - // - // For more information, see Monitoring the Amazon Kinesis Data Streams Service - // with Amazon CloudWatch (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html) - // in the Amazon Kinesis Data Streams Developer Guide. - // - // ShardLevelMetrics is a required field - ShardLevelMetrics []*string `min:"1" type:"list" required:"true"` - - // The name of the stream for which to enable enhanced monitoring. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s EnableEnhancedMonitoringInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableEnhancedMonitoringInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableEnhancedMonitoringInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableEnhancedMonitoringInput"} - if s.ShardLevelMetrics == nil { - invalidParams.Add(request.NewErrParamRequired("ShardLevelMetrics")) - } - if s.ShardLevelMetrics != nil && len(s.ShardLevelMetrics) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ShardLevelMetrics", 1)) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetShardLevelMetrics sets the ShardLevelMetrics field's value. -func (s *EnableEnhancedMonitoringInput) SetShardLevelMetrics(v []*string) *EnableEnhancedMonitoringInput { - s.ShardLevelMetrics = v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *EnableEnhancedMonitoringInput) SetStreamName(v string) *EnableEnhancedMonitoringInput { - s.StreamName = &v - return s -} - -// Represents enhanced metrics types. -type EnhancedMetrics struct { - _ struct{} `type:"structure"` - - // List of shard-level metrics. - // - // The following are the valid shard-level metrics. The value "ALL" enhances - // every metric. - // - // * IncomingBytes - // - // * IncomingRecords - // - // * OutgoingBytes - // - // * OutgoingRecords - // - // * WriteProvisionedThroughputExceeded - // - // * ReadProvisionedThroughputExceeded - // - // * IteratorAgeMilliseconds - // - // * ALL - // - // For more information, see Monitoring the Amazon Kinesis Data Streams Service - // with Amazon CloudWatch (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html) - // in the Amazon Kinesis Data Streams Developer Guide. - ShardLevelMetrics []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s EnhancedMetrics) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnhancedMetrics) GoString() string { - return s.String() -} - -// SetShardLevelMetrics sets the ShardLevelMetrics field's value. -func (s *EnhancedMetrics) SetShardLevelMetrics(v []*string) *EnhancedMetrics { - s.ShardLevelMetrics = v - return s -} - -// Represents the output for EnableEnhancedMonitoring and DisableEnhancedMonitoring. -type EnhancedMonitoringOutput struct { - _ struct{} `type:"structure"` - - // Represents the current state of the metrics that are in the enhanced state - // before the operation. - CurrentShardLevelMetrics []*string `min:"1" type:"list"` - - // Represents the list of all the metrics that would be in the enhanced state - // after the operation. - DesiredShardLevelMetrics []*string `min:"1" type:"list"` - - // The name of the Kinesis data stream. - StreamName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s EnhancedMonitoringOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnhancedMonitoringOutput) GoString() string { - return s.String() -} - -// SetCurrentShardLevelMetrics sets the CurrentShardLevelMetrics field's value. -func (s *EnhancedMonitoringOutput) SetCurrentShardLevelMetrics(v []*string) *EnhancedMonitoringOutput { - s.CurrentShardLevelMetrics = v - return s -} - -// SetDesiredShardLevelMetrics sets the DesiredShardLevelMetrics field's value. -func (s *EnhancedMonitoringOutput) SetDesiredShardLevelMetrics(v []*string) *EnhancedMonitoringOutput { - s.DesiredShardLevelMetrics = v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *EnhancedMonitoringOutput) SetStreamName(v string) *EnhancedMonitoringOutput { - s.StreamName = &v - return s -} - -// Represents the input for GetRecords. -type GetRecordsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of records to return. Specify a value of up to 10,000. - // If you specify a value that is greater than 10,000, GetRecords throws InvalidArgumentException. - Limit *int64 `min:"1" type:"integer"` - - // The position in the shard from which you want to start sequentially reading - // data records. A shard iterator specifies this position using the sequence - // number of a data record in the shard. - // - // ShardIterator is a required field - ShardIterator *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRecordsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRecordsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRecordsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRecordsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.ShardIterator == nil { - invalidParams.Add(request.NewErrParamRequired("ShardIterator")) - } - if s.ShardIterator != nil && len(*s.ShardIterator) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ShardIterator", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *GetRecordsInput) SetLimit(v int64) *GetRecordsInput { - s.Limit = &v - return s -} - -// SetShardIterator sets the ShardIterator field's value. -func (s *GetRecordsInput) SetShardIterator(v string) *GetRecordsInput { - s.ShardIterator = &v - return s -} - -// Represents the output for GetRecords. -type GetRecordsOutput struct { - _ struct{} `type:"structure"` - - // The number of milliseconds the GetRecords response is from the tip of the - // stream, indicating how far behind current time the consumer is. A value of - // zero indicates that record processing is caught up, and there are no new - // records to process at this moment. - MillisBehindLatest *int64 `type:"long"` - - // The next position in the shard from which to start sequentially reading data - // records. If set to null, the shard has been closed and the requested iterator - // does not return any more data. - NextShardIterator *string `min:"1" type:"string"` - - // The data records retrieved from the shard. - // - // Records is a required field - Records []*Record `type:"list" required:"true"` -} - -// String returns the string representation -func (s GetRecordsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRecordsOutput) GoString() string { - return s.String() -} - -// SetMillisBehindLatest sets the MillisBehindLatest field's value. -func (s *GetRecordsOutput) SetMillisBehindLatest(v int64) *GetRecordsOutput { - s.MillisBehindLatest = &v - return s -} - -// SetNextShardIterator sets the NextShardIterator field's value. -func (s *GetRecordsOutput) SetNextShardIterator(v string) *GetRecordsOutput { - s.NextShardIterator = &v - return s -} - -// SetRecords sets the Records field's value. -func (s *GetRecordsOutput) SetRecords(v []*Record) *GetRecordsOutput { - s.Records = v - return s -} - -// Represents the input for GetShardIterator. -type GetShardIteratorInput struct { - _ struct{} `type:"structure"` - - // The shard ID of the Kinesis Data Streams shard to get the iterator for. - // - // ShardId is a required field - ShardId *string `min:"1" type:"string" required:"true"` - - // Determines how the shard iterator is used to start reading data records from - // the shard. - // - // The following are the valid Amazon Kinesis shard iterator types: - // - // * AT_SEQUENCE_NUMBER - Start reading from the position denoted by a specific - // sequence number, provided in the value StartingSequenceNumber. - // - // * AFTER_SEQUENCE_NUMBER - Start reading right after the position denoted - // by a specific sequence number, provided in the value StartingSequenceNumber. - // - // * AT_TIMESTAMP - Start reading from the position denoted by a specific - // time stamp, provided in the value Timestamp. - // - // * TRIM_HORIZON - Start reading at the last untrimmed record in the shard - // in the system, which is the oldest data record in the shard. - // - // * LATEST - Start reading just after the most recent record in the shard, - // so that you always read the most recent data in the shard. - // - // ShardIteratorType is a required field - ShardIteratorType *string `type:"string" required:"true" enum:"ShardIteratorType"` - - // The sequence number of the data record in the shard from which to start reading. - // Used with shard iterator type AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER. - StartingSequenceNumber *string `type:"string"` - - // The name of the Amazon Kinesis data stream. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` - - // The time stamp of the data record from which to start reading. Used with - // shard iterator type AT_TIMESTAMP. A time stamp is the Unix epoch date with - // precision in milliseconds. For example, 2016-04-04T19:58:46.480-00:00 or - // 1459799926.480. If a record with this exact time stamp does not exist, the - // iterator returned is for the next (later) record. If the time stamp is older - // than the current trim horizon, the iterator returned is for the oldest untrimmed - // data record (TRIM_HORIZON). - Timestamp *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s GetShardIteratorInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetShardIteratorInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetShardIteratorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetShardIteratorInput"} - if s.ShardId == nil { - invalidParams.Add(request.NewErrParamRequired("ShardId")) - } - if s.ShardId != nil && len(*s.ShardId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ShardId", 1)) - } - if s.ShardIteratorType == nil { - invalidParams.Add(request.NewErrParamRequired("ShardIteratorType")) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetShardId sets the ShardId field's value. -func (s *GetShardIteratorInput) SetShardId(v string) *GetShardIteratorInput { - s.ShardId = &v - return s -} - -// SetShardIteratorType sets the ShardIteratorType field's value. -func (s *GetShardIteratorInput) SetShardIteratorType(v string) *GetShardIteratorInput { - s.ShardIteratorType = &v - return s -} - -// SetStartingSequenceNumber sets the StartingSequenceNumber field's value. -func (s *GetShardIteratorInput) SetStartingSequenceNumber(v string) *GetShardIteratorInput { - s.StartingSequenceNumber = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *GetShardIteratorInput) SetStreamName(v string) *GetShardIteratorInput { - s.StreamName = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *GetShardIteratorInput) SetTimestamp(v time.Time) *GetShardIteratorInput { - s.Timestamp = &v - return s -} - -// Represents the output for GetShardIterator. -type GetShardIteratorOutput struct { - _ struct{} `type:"structure"` - - // The position in the shard from which to start reading data records sequentially. - // A shard iterator specifies this position using the sequence number of a data - // record in a shard. - ShardIterator *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetShardIteratorOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetShardIteratorOutput) GoString() string { - return s.String() -} - -// SetShardIterator sets the ShardIterator field's value. -func (s *GetShardIteratorOutput) SetShardIterator(v string) *GetShardIteratorOutput { - s.ShardIterator = &v - return s -} - -// The range of possible hash key values for the shard, which is a set of ordered -// contiguous positive integers. -type HashKeyRange struct { - _ struct{} `type:"structure"` - - // The ending hash key of the hash key range. - // - // EndingHashKey is a required field - EndingHashKey *string `type:"string" required:"true"` - - // The starting hash key of the hash key range. - // - // StartingHashKey is a required field - StartingHashKey *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s HashKeyRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HashKeyRange) GoString() string { - return s.String() -} - -// SetEndingHashKey sets the EndingHashKey field's value. -func (s *HashKeyRange) SetEndingHashKey(v string) *HashKeyRange { - s.EndingHashKey = &v - return s -} - -// SetStartingHashKey sets the StartingHashKey field's value. -func (s *HashKeyRange) SetStartingHashKey(v string) *HashKeyRange { - s.StartingHashKey = &v - return s -} - -// Represents the input for IncreaseStreamRetentionPeriod. -type IncreaseStreamRetentionPeriodInput struct { - _ struct{} `type:"structure"` - - // The new retention period of the stream, in hours. Must be more than the current - // retention period. - // - // RetentionPeriodHours is a required field - RetentionPeriodHours *int64 `min:"1" type:"integer" required:"true"` - - // The name of the stream to modify. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s IncreaseStreamRetentionPeriodInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IncreaseStreamRetentionPeriodInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IncreaseStreamRetentionPeriodInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IncreaseStreamRetentionPeriodInput"} - if s.RetentionPeriodHours == nil { - invalidParams.Add(request.NewErrParamRequired("RetentionPeriodHours")) - } - if s.RetentionPeriodHours != nil && *s.RetentionPeriodHours < 1 { - invalidParams.Add(request.NewErrParamMinValue("RetentionPeriodHours", 1)) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRetentionPeriodHours sets the RetentionPeriodHours field's value. -func (s *IncreaseStreamRetentionPeriodInput) SetRetentionPeriodHours(v int64) *IncreaseStreamRetentionPeriodInput { - s.RetentionPeriodHours = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *IncreaseStreamRetentionPeriodInput) SetStreamName(v string) *IncreaseStreamRetentionPeriodInput { - s.StreamName = &v - return s -} - -type IncreaseStreamRetentionPeriodOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s IncreaseStreamRetentionPeriodOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IncreaseStreamRetentionPeriodOutput) GoString() string { - return s.String() -} - -type ListShardsInput struct { - _ struct{} `type:"structure"` - - // Specify this parameter to indicate that you want to list the shards starting - // with the shard whose ID immediately follows ExclusiveStartShardId. - // - // If you don't specify this parameter, the default behavior is for ListShards - // to list the shards starting with the first one in the stream. - // - // You cannot specify this parameter if you specify NextToken. - ExclusiveStartShardId *string `min:"1" type:"string"` - - // The maximum number of shards to return in a single call to ListShards. The - // minimum value you can specify for this parameter is 1, and the maximum is - // 1,000, which is also the default. - // - // When the number of shards to be listed is greater than the value of MaxResults, - // the response contains a NextToken value that you can use in a subsequent - // call to ListShards to list the next set of shards. - MaxResults *int64 `min:"1" type:"integer"` - - // When the number of shards in the data stream is greater than the default - // value for the MaxResults parameter, or if you explicitly specify a value - // for MaxResults that is less than the number of shards in the data stream, - // the response includes a pagination token named NextToken. You can specify - // this NextToken value in a subsequent call to ListShards to list the next - // set of shards. - // - // Don't specify StreamName or StreamCreationTimestamp if you specify NextToken - // because the latter unambiguously identifies the stream. - // - // You can optionally specify a value for the MaxResults parameter when you - // specify NextToken. If you specify a MaxResults value that is less than the - // number of shards that the operation returns if you don't specify MaxResults, - // the response will contain a new NextToken value. You can use the new NextToken - // value in a subsequent call to the ListShards operation. - // - // Tokens expire after 300 seconds. When you obtain a value for NextToken in - // the response to a call to ListShards, you have 300 seconds to use that value. - // If you specify an expired token in a call to ListShards, you get ExpiredNextTokenException. - NextToken *string `min:"1" type:"string"` - - // Specify this input parameter to distinguish data streams that have the same - // name. For example, if you create a data stream and then delete it, and you - // later create another data stream with the same name, you can use this input - // parameter to specify which of the two streams you want to list the shards - // for. - // - // You cannot specify this parameter if you specify the NextToken parameter. - StreamCreationTimestamp *time.Time `type:"timestamp"` - - // The name of the data stream whose shards you want to list. - // - // You cannot specify this parameter if you specify the NextToken parameter. - StreamName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListShardsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListShardsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListShardsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListShardsInput"} - if s.ExclusiveStartShardId != nil && len(*s.ExclusiveStartShardId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartShardId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExclusiveStartShardId sets the ExclusiveStartShardId field's value. -func (s *ListShardsInput) SetExclusiveStartShardId(v string) *ListShardsInput { - s.ExclusiveStartShardId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListShardsInput) SetMaxResults(v int64) *ListShardsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListShardsInput) SetNextToken(v string) *ListShardsInput { - s.NextToken = &v - return s -} - -// SetStreamCreationTimestamp sets the StreamCreationTimestamp field's value. -func (s *ListShardsInput) SetStreamCreationTimestamp(v time.Time) *ListShardsInput { - s.StreamCreationTimestamp = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *ListShardsInput) SetStreamName(v string) *ListShardsInput { - s.StreamName = &v - return s -} - -type ListShardsOutput struct { - _ struct{} `type:"structure"` - - // When the number of shards in the data stream is greater than the default - // value for the MaxResults parameter, or if you explicitly specify a value - // for MaxResults that is less than the number of shards in the data stream, - // the response includes a pagination token named NextToken. You can specify - // this NextToken value in a subsequent call to ListShards to list the next - // set of shards. For more information about the use of this pagination token - // when calling the ListShards operation, see ListShardsInput$NextToken. - // - // Tokens expire after 300 seconds. When you obtain a value for NextToken in - // the response to a call to ListShards, you have 300 seconds to use that value. - // If you specify an expired token in a call to ListShards, you get ExpiredNextTokenException. - NextToken *string `min:"1" type:"string"` - - // An array of JSON objects. Each object represents one shard and specifies - // the IDs of the shard, the shard's parent, and the shard that's adjacent to - // the shard's parent. Each object also contains the starting and ending hash - // keys and the starting and ending sequence numbers for the shard. - Shards []*Shard `type:"list"` -} - -// String returns the string representation -func (s ListShardsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListShardsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListShardsOutput) SetNextToken(v string) *ListShardsOutput { - s.NextToken = &v - return s -} - -// SetShards sets the Shards field's value. -func (s *ListShardsOutput) SetShards(v []*Shard) *ListShardsOutput { - s.Shards = v - return s -} - -type ListStreamConsumersInput struct { - _ struct{} `type:"structure"` - - // The maximum number of consumers that you want a single call of ListStreamConsumers - // to return. - MaxResults *int64 `min:"1" type:"integer"` - - // When the number of consumers that are registered with the data stream is - // greater than the default value for the MaxResults parameter, or if you explicitly - // specify a value for MaxResults that is less than the number of consumers - // that are registered with the data stream, the response includes a pagination - // token named NextToken. You can specify this NextToken value in a subsequent - // call to ListStreamConsumers to list the next set of registered consumers. - // - // Don't specify StreamName or StreamCreationTimestamp if you specify NextToken - // because the latter unambiguously identifies the stream. - // - // You can optionally specify a value for the MaxResults parameter when you - // specify NextToken. If you specify a MaxResults value that is less than the - // number of consumers that the operation returns if you don't specify MaxResults, - // the response will contain a new NextToken value. You can use the new NextToken - // value in a subsequent call to the ListStreamConsumers operation to list the - // next set of consumers. - // - // Tokens expire after 300 seconds. When you obtain a value for NextToken in - // the response to a call to ListStreamConsumers, you have 300 seconds to use - // that value. If you specify an expired token in a call to ListStreamConsumers, - // you get ExpiredNextTokenException. - NextToken *string `min:"1" type:"string"` - - // The ARN of the Kinesis data stream for which you want to list the registered - // consumers. For more information, see Amazon Resource Names (ARNs) and AWS - // Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). - // - // StreamARN is a required field - StreamARN *string `min:"1" type:"string" required:"true"` - - // Specify this input parameter to distinguish data streams that have the same - // name. For example, if you create a data stream and then delete it, and you - // later create another data stream with the same name, you can use this input - // parameter to specify which of the two streams you want to list the consumers - // for. - // - // You can't specify this parameter if you specify the NextToken parameter. - StreamCreationTimestamp *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s ListStreamConsumersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStreamConsumersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListStreamConsumersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListStreamConsumersInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.StreamARN == nil { - invalidParams.Add(request.NewErrParamRequired("StreamARN")) - } - if s.StreamARN != nil && len(*s.StreamARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListStreamConsumersInput) SetMaxResults(v int64) *ListStreamConsumersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStreamConsumersInput) SetNextToken(v string) *ListStreamConsumersInput { - s.NextToken = &v - return s -} - -// SetStreamARN sets the StreamARN field's value. -func (s *ListStreamConsumersInput) SetStreamARN(v string) *ListStreamConsumersInput { - s.StreamARN = &v - return s -} - -// SetStreamCreationTimestamp sets the StreamCreationTimestamp field's value. -func (s *ListStreamConsumersInput) SetStreamCreationTimestamp(v time.Time) *ListStreamConsumersInput { - s.StreamCreationTimestamp = &v - return s -} - -type ListStreamConsumersOutput struct { - _ struct{} `type:"structure"` - - // An array of JSON objects. Each object represents one registered consumer. - Consumers []*Consumer `type:"list"` - - // When the number of consumers that are registered with the data stream is - // greater than the default value for the MaxResults parameter, or if you explicitly - // specify a value for MaxResults that is less than the number of registered - // consumers, the response includes a pagination token named NextToken. You - // can specify this NextToken value in a subsequent call to ListStreamConsumers - // to list the next set of registered consumers. For more information about - // the use of this pagination token when calling the ListStreamConsumers operation, - // see ListStreamConsumersInput$NextToken. - // - // Tokens expire after 300 seconds. When you obtain a value for NextToken in - // the response to a call to ListStreamConsumers, you have 300 seconds to use - // that value. If you specify an expired token in a call to ListStreamConsumers, - // you get ExpiredNextTokenException. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListStreamConsumersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStreamConsumersOutput) GoString() string { - return s.String() -} - -// SetConsumers sets the Consumers field's value. -func (s *ListStreamConsumersOutput) SetConsumers(v []*Consumer) *ListStreamConsumersOutput { - s.Consumers = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStreamConsumersOutput) SetNextToken(v string) *ListStreamConsumersOutput { - s.NextToken = &v - return s -} - -// Represents the input for ListStreams. -type ListStreamsInput struct { - _ struct{} `type:"structure"` - - // The name of the stream to start the list with. - ExclusiveStartStreamName *string `min:"1" type:"string"` - - // The maximum number of streams to list. - Limit *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListStreamsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStreamsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListStreamsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListStreamsInput"} - if s.ExclusiveStartStreamName != nil && len(*s.ExclusiveStartStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartStreamName", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExclusiveStartStreamName sets the ExclusiveStartStreamName field's value. -func (s *ListStreamsInput) SetExclusiveStartStreamName(v string) *ListStreamsInput { - s.ExclusiveStartStreamName = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListStreamsInput) SetLimit(v int64) *ListStreamsInput { - s.Limit = &v - return s -} - -// Represents the output for ListStreams. -type ListStreamsOutput struct { - _ struct{} `type:"structure"` - - // If set to true, there are more streams available to list. - // - // HasMoreStreams is a required field - HasMoreStreams *bool `type:"boolean" required:"true"` - - // The names of the streams that are associated with the AWS account making - // the ListStreams request. - // - // StreamNames is a required field - StreamNames []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s ListStreamsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStreamsOutput) GoString() string { - return s.String() -} - -// SetHasMoreStreams sets the HasMoreStreams field's value. -func (s *ListStreamsOutput) SetHasMoreStreams(v bool) *ListStreamsOutput { - s.HasMoreStreams = &v - return s -} - -// SetStreamNames sets the StreamNames field's value. -func (s *ListStreamsOutput) SetStreamNames(v []*string) *ListStreamsOutput { - s.StreamNames = v - return s -} - -// Represents the input for ListTagsForStream. -type ListTagsForStreamInput struct { - _ struct{} `type:"structure"` - - // The key to use as the starting point for the list of tags. If this parameter - // is set, ListTagsForStream gets all tags that occur after ExclusiveStartTagKey. - ExclusiveStartTagKey *string `min:"1" type:"string"` - - // The number of tags to return. If this number is less than the total number - // of tags associated with the stream, HasMoreTags is set to true. To list additional - // tags, set ExclusiveStartTagKey to the last key in the response. - Limit *int64 `min:"1" type:"integer"` - - // The name of the stream. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsForStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForStreamInput"} - if s.ExclusiveStartTagKey != nil && len(*s.ExclusiveStartTagKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartTagKey", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExclusiveStartTagKey sets the ExclusiveStartTagKey field's value. -func (s *ListTagsForStreamInput) SetExclusiveStartTagKey(v string) *ListTagsForStreamInput { - s.ExclusiveStartTagKey = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListTagsForStreamInput) SetLimit(v int64) *ListTagsForStreamInput { - s.Limit = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *ListTagsForStreamInput) SetStreamName(v string) *ListTagsForStreamInput { - s.StreamName = &v - return s -} - -// Represents the output for ListTagsForStream. -type ListTagsForStreamOutput struct { - _ struct{} `type:"structure"` - - // If set to true, more tags are available. To request additional tags, set - // ExclusiveStartTagKey to the key of the last tag returned. - // - // HasMoreTags is a required field - HasMoreTags *bool `type:"boolean" required:"true"` - - // A list of tags associated with StreamName, starting with the first tag after - // ExclusiveStartTagKey and up to the specified Limit. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s ListTagsForStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForStreamOutput) GoString() string { - return s.String() -} - -// SetHasMoreTags sets the HasMoreTags field's value. -func (s *ListTagsForStreamOutput) SetHasMoreTags(v bool) *ListTagsForStreamOutput { - s.HasMoreTags = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForStreamOutput) SetTags(v []*Tag) *ListTagsForStreamOutput { - s.Tags = v - return s -} - -// Represents the input for MergeShards. -type MergeShardsInput struct { - _ struct{} `type:"structure"` - - // The shard ID of the adjacent shard for the merge. - // - // AdjacentShardToMerge is a required field - AdjacentShardToMerge *string `min:"1" type:"string" required:"true"` - - // The shard ID of the shard to combine with the adjacent shard for the merge. - // - // ShardToMerge is a required field - ShardToMerge *string `min:"1" type:"string" required:"true"` - - // The name of the stream for the merge. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s MergeShardsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MergeShardsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MergeShardsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MergeShardsInput"} - if s.AdjacentShardToMerge == nil { - invalidParams.Add(request.NewErrParamRequired("AdjacentShardToMerge")) - } - if s.AdjacentShardToMerge != nil && len(*s.AdjacentShardToMerge) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AdjacentShardToMerge", 1)) - } - if s.ShardToMerge == nil { - invalidParams.Add(request.NewErrParamRequired("ShardToMerge")) - } - if s.ShardToMerge != nil && len(*s.ShardToMerge) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ShardToMerge", 1)) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdjacentShardToMerge sets the AdjacentShardToMerge field's value. -func (s *MergeShardsInput) SetAdjacentShardToMerge(v string) *MergeShardsInput { - s.AdjacentShardToMerge = &v - return s -} - -// SetShardToMerge sets the ShardToMerge field's value. -func (s *MergeShardsInput) SetShardToMerge(v string) *MergeShardsInput { - s.ShardToMerge = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *MergeShardsInput) SetStreamName(v string) *MergeShardsInput { - s.StreamName = &v - return s -} - -type MergeShardsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s MergeShardsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MergeShardsOutput) GoString() string { - return s.String() -} - -// Represents the input for PutRecord. -type PutRecordInput struct { - _ struct{} `type:"structure"` - - // The data blob to put into the record, which is base64-encoded when the blob - // is serialized. When the data blob (the payload before base64-encoding) is - // added to the partition key size, the total size must not exceed the maximum - // record size (1 MB). - // - // Data is automatically base64 encoded/decoded by the SDK. - // - // Data is a required field - Data []byte `type:"blob" required:"true"` - - // The hash value used to explicitly determine the shard the data record is - // assigned to by overriding the partition key hash. - ExplicitHashKey *string `type:"string"` - - // Determines which shard in the stream the data record is assigned to. Partition - // keys are Unicode strings with a maximum length limit of 256 characters for - // each key. Amazon Kinesis Data Streams uses the partition key as input to - // a hash function that maps the partition key and associated data to a specific - // shard. Specifically, an MD5 hash function is used to map partition keys to - // 128-bit integer values and to map associated data records to shards. As a - // result of this hashing mechanism, all data records with the same partition - // key map to the same shard within the stream. - // - // PartitionKey is a required field - PartitionKey *string `min:"1" type:"string" required:"true"` - - // Guarantees strictly increasing sequence numbers, for puts from the same client - // and to the same partition key. Usage: set the SequenceNumberForOrdering of - // record n to the sequence number of record n-1 (as returned in the result - // when putting record n-1). If this parameter is not set, records are coarsely - // ordered based on arrival time. - SequenceNumberForOrdering *string `type:"string"` - - // The name of the stream to put the data record into. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutRecordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRecordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutRecordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutRecordInput"} - if s.Data == nil { - invalidParams.Add(request.NewErrParamRequired("Data")) - } - if s.PartitionKey == nil { - invalidParams.Add(request.NewErrParamRequired("PartitionKey")) - } - if s.PartitionKey != nil && len(*s.PartitionKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PartitionKey", 1)) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetData sets the Data field's value. -func (s *PutRecordInput) SetData(v []byte) *PutRecordInput { - s.Data = v - return s -} - -// SetExplicitHashKey sets the ExplicitHashKey field's value. -func (s *PutRecordInput) SetExplicitHashKey(v string) *PutRecordInput { - s.ExplicitHashKey = &v - return s -} - -// SetPartitionKey sets the PartitionKey field's value. -func (s *PutRecordInput) SetPartitionKey(v string) *PutRecordInput { - s.PartitionKey = &v - return s -} - -// SetSequenceNumberForOrdering sets the SequenceNumberForOrdering field's value. -func (s *PutRecordInput) SetSequenceNumberForOrdering(v string) *PutRecordInput { - s.SequenceNumberForOrdering = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *PutRecordInput) SetStreamName(v string) *PutRecordInput { - s.StreamName = &v - return s -} - -// Represents the output for PutRecord. -type PutRecordOutput struct { - _ struct{} `type:"structure"` - - // The encryption type to use on the record. This parameter can be one of the - // following values: - // - // * NONE: Do not encrypt the records in the stream. - // - // * KMS: Use server-side encryption on the records in the stream using a - // customer-managed AWS KMS key. - EncryptionType *string `type:"string" enum:"EncryptionType"` - - // The sequence number identifier that was assigned to the put data record. - // The sequence number for the record is unique across all records in the stream. - // A sequence number is the identifier associated with every record put into - // the stream. - // - // SequenceNumber is a required field - SequenceNumber *string `type:"string" required:"true"` - - // The shard ID of the shard where the data record was placed. - // - // ShardId is a required field - ShardId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutRecordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRecordOutput) GoString() string { - return s.String() -} - -// SetEncryptionType sets the EncryptionType field's value. -func (s *PutRecordOutput) SetEncryptionType(v string) *PutRecordOutput { - s.EncryptionType = &v - return s -} - -// SetSequenceNumber sets the SequenceNumber field's value. -func (s *PutRecordOutput) SetSequenceNumber(v string) *PutRecordOutput { - s.SequenceNumber = &v - return s -} - -// SetShardId sets the ShardId field's value. -func (s *PutRecordOutput) SetShardId(v string) *PutRecordOutput { - s.ShardId = &v - return s -} - -// A PutRecords request. -type PutRecordsInput struct { - _ struct{} `type:"structure"` - - // The records associated with the request. - // - // Records is a required field - Records []*PutRecordsRequestEntry `min:"1" type:"list" required:"true"` - - // The stream name associated with the request. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutRecordsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRecordsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutRecordsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutRecordsInput"} - if s.Records == nil { - invalidParams.Add(request.NewErrParamRequired("Records")) - } - if s.Records != nil && len(s.Records) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Records", 1)) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - if s.Records != nil { - for i, v := range s.Records { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Records", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRecords sets the Records field's value. -func (s *PutRecordsInput) SetRecords(v []*PutRecordsRequestEntry) *PutRecordsInput { - s.Records = v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *PutRecordsInput) SetStreamName(v string) *PutRecordsInput { - s.StreamName = &v - return s -} - -// PutRecords results. -type PutRecordsOutput struct { - _ struct{} `type:"structure"` - - // The encryption type used on the records. This parameter can be one of the - // following values: - // - // * NONE: Do not encrypt the records. - // - // * KMS: Use server-side encryption on the records using a customer-managed - // AWS KMS key. - EncryptionType *string `type:"string" enum:"EncryptionType"` - - // The number of unsuccessfully processed records in a PutRecords request. - FailedRecordCount *int64 `min:"1" type:"integer"` - - // An array of successfully and unsuccessfully processed record results, correlated - // with the request by natural ordering. A record that is successfully added - // to a stream includes SequenceNumber and ShardId in the result. A record that - // fails to be added to a stream includes ErrorCode and ErrorMessage in the - // result. - // - // Records is a required field - Records []*PutRecordsResultEntry `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s PutRecordsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRecordsOutput) GoString() string { - return s.String() -} - -// SetEncryptionType sets the EncryptionType field's value. -func (s *PutRecordsOutput) SetEncryptionType(v string) *PutRecordsOutput { - s.EncryptionType = &v - return s -} - -// SetFailedRecordCount sets the FailedRecordCount field's value. -func (s *PutRecordsOutput) SetFailedRecordCount(v int64) *PutRecordsOutput { - s.FailedRecordCount = &v - return s -} - -// SetRecords sets the Records field's value. -func (s *PutRecordsOutput) SetRecords(v []*PutRecordsResultEntry) *PutRecordsOutput { - s.Records = v - return s -} - -// Represents the output for PutRecords. -type PutRecordsRequestEntry struct { - _ struct{} `type:"structure"` - - // The data blob to put into the record, which is base64-encoded when the blob - // is serialized. When the data blob (the payload before base64-encoding) is - // added to the partition key size, the total size must not exceed the maximum - // record size (1 MB). - // - // Data is automatically base64 encoded/decoded by the SDK. - // - // Data is a required field - Data []byte `type:"blob" required:"true"` - - // The hash value used to determine explicitly the shard that the data record - // is assigned to by overriding the partition key hash. - ExplicitHashKey *string `type:"string"` - - // Determines which shard in the stream the data record is assigned to. Partition - // keys are Unicode strings with a maximum length limit of 256 characters for - // each key. Amazon Kinesis Data Streams uses the partition key as input to - // a hash function that maps the partition key and associated data to a specific - // shard. Specifically, an MD5 hash function is used to map partition keys to - // 128-bit integer values and to map associated data records to shards. As a - // result of this hashing mechanism, all data records with the same partition - // key map to the same shard within the stream. - // - // PartitionKey is a required field - PartitionKey *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutRecordsRequestEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRecordsRequestEntry) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutRecordsRequestEntry) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutRecordsRequestEntry"} - if s.Data == nil { - invalidParams.Add(request.NewErrParamRequired("Data")) - } - if s.PartitionKey == nil { - invalidParams.Add(request.NewErrParamRequired("PartitionKey")) - } - if s.PartitionKey != nil && len(*s.PartitionKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PartitionKey", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetData sets the Data field's value. -func (s *PutRecordsRequestEntry) SetData(v []byte) *PutRecordsRequestEntry { - s.Data = v - return s -} - -// SetExplicitHashKey sets the ExplicitHashKey field's value. -func (s *PutRecordsRequestEntry) SetExplicitHashKey(v string) *PutRecordsRequestEntry { - s.ExplicitHashKey = &v - return s -} - -// SetPartitionKey sets the PartitionKey field's value. -func (s *PutRecordsRequestEntry) SetPartitionKey(v string) *PutRecordsRequestEntry { - s.PartitionKey = &v - return s -} - -// Represents the result of an individual record from a PutRecords request. -// A record that is successfully added to a stream includes SequenceNumber and -// ShardId in the result. A record that fails to be added to the stream includes -// ErrorCode and ErrorMessage in the result. -type PutRecordsResultEntry struct { - _ struct{} `type:"structure"` - - // The error code for an individual record result. ErrorCodes can be either - // ProvisionedThroughputExceededException or InternalFailure. - ErrorCode *string `type:"string"` - - // The error message for an individual record result. An ErrorCode value of - // ProvisionedThroughputExceededException has an error message that includes - // the account ID, stream name, and shard ID. An ErrorCode value of InternalFailure - // has the error message "Internal Service Failure". - ErrorMessage *string `type:"string"` - - // The sequence number for an individual record result. - SequenceNumber *string `type:"string"` - - // The shard ID for an individual record result. - ShardId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PutRecordsResultEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutRecordsResultEntry) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *PutRecordsResultEntry) SetErrorCode(v string) *PutRecordsResultEntry { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *PutRecordsResultEntry) SetErrorMessage(v string) *PutRecordsResultEntry { - s.ErrorMessage = &v - return s -} - -// SetSequenceNumber sets the SequenceNumber field's value. -func (s *PutRecordsResultEntry) SetSequenceNumber(v string) *PutRecordsResultEntry { - s.SequenceNumber = &v - return s -} - -// SetShardId sets the ShardId field's value. -func (s *PutRecordsResultEntry) SetShardId(v string) *PutRecordsResultEntry { - s.ShardId = &v - return s -} - -// The unit of data of the Kinesis data stream, which is composed of a sequence -// number, a partition key, and a data blob. -type Record struct { - _ struct{} `type:"structure"` - - // The approximate time that the record was inserted into the stream. - ApproximateArrivalTimestamp *time.Time `type:"timestamp"` - - // The data blob. The data in the blob is both opaque and immutable to Kinesis - // Data Streams, which does not inspect, interpret, or change the data in the - // blob in any way. When the data blob (the payload before base64-encoding) - // is added to the partition key size, the total size must not exceed the maximum - // record size (1 MB). - // - // Data is automatically base64 encoded/decoded by the SDK. - // - // Data is a required field - Data []byte `type:"blob" required:"true"` - - // The encryption type used on the record. This parameter can be one of the - // following values: - // - // * NONE: Do not encrypt the records in the stream. - // - // * KMS: Use server-side encryption on the records in the stream using a - // customer-managed AWS KMS key. - EncryptionType *string `type:"string" enum:"EncryptionType"` - - // Identifies which shard in the stream the data record is assigned to. - // - // PartitionKey is a required field - PartitionKey *string `min:"1" type:"string" required:"true"` - - // The unique identifier of the record within its shard. - // - // SequenceNumber is a required field - SequenceNumber *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Record) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Record) GoString() string { - return s.String() -} - -// SetApproximateArrivalTimestamp sets the ApproximateArrivalTimestamp field's value. -func (s *Record) SetApproximateArrivalTimestamp(v time.Time) *Record { - s.ApproximateArrivalTimestamp = &v - return s -} - -// SetData sets the Data field's value. -func (s *Record) SetData(v []byte) *Record { - s.Data = v - return s -} - -// SetEncryptionType sets the EncryptionType field's value. -func (s *Record) SetEncryptionType(v string) *Record { - s.EncryptionType = &v - return s -} - -// SetPartitionKey sets the PartitionKey field's value. -func (s *Record) SetPartitionKey(v string) *Record { - s.PartitionKey = &v - return s -} - -// SetSequenceNumber sets the SequenceNumber field's value. -func (s *Record) SetSequenceNumber(v string) *Record { - s.SequenceNumber = &v - return s -} - -type RegisterStreamConsumerInput struct { - _ struct{} `type:"structure"` - - // For a given Kinesis data stream, each consumer must have a unique name. However, - // consumer names don't have to be unique across data streams. - // - // ConsumerName is a required field - ConsumerName *string `min:"1" type:"string" required:"true"` - - // The ARN of the Kinesis data stream that you want to register the consumer - // with. For more info, see Amazon Resource Names (ARNs) and AWS Service Namespaces - // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). - // - // StreamARN is a required field - StreamARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterStreamConsumerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterStreamConsumerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterStreamConsumerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterStreamConsumerInput"} - if s.ConsumerName == nil { - invalidParams.Add(request.NewErrParamRequired("ConsumerName")) - } - if s.ConsumerName != nil && len(*s.ConsumerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConsumerName", 1)) - } - if s.StreamARN == nil { - invalidParams.Add(request.NewErrParamRequired("StreamARN")) - } - if s.StreamARN != nil && len(*s.StreamARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConsumerName sets the ConsumerName field's value. -func (s *RegisterStreamConsumerInput) SetConsumerName(v string) *RegisterStreamConsumerInput { - s.ConsumerName = &v - return s -} - -// SetStreamARN sets the StreamARN field's value. -func (s *RegisterStreamConsumerInput) SetStreamARN(v string) *RegisterStreamConsumerInput { - s.StreamARN = &v - return s -} - -type RegisterStreamConsumerOutput struct { - _ struct{} `type:"structure"` - - // An object that represents the details of the consumer you registered. When - // you register a consumer, it gets an ARN that is generated by Kinesis Data - // Streams. - // - // Consumer is a required field - Consumer *Consumer `type:"structure" required:"true"` -} - -// String returns the string representation -func (s RegisterStreamConsumerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterStreamConsumerOutput) GoString() string { - return s.String() -} - -// SetConsumer sets the Consumer field's value. -func (s *RegisterStreamConsumerOutput) SetConsumer(v *Consumer) *RegisterStreamConsumerOutput { - s.Consumer = v - return s -} - -// Represents the input for RemoveTagsFromStream. -type RemoveTagsFromStreamInput struct { - _ struct{} `type:"structure"` - - // The name of the stream. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` - - // A list of tag keys. Each corresponding tag is removed from the stream. - // - // TagKeys is a required field - TagKeys []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsFromStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsFromStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromStreamInput"} - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - if s.TagKeys != nil && len(s.TagKeys) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStreamName sets the StreamName field's value. -func (s *RemoveTagsFromStreamInput) SetStreamName(v string) *RemoveTagsFromStreamInput { - s.StreamName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsFromStreamInput) SetTagKeys(v []*string) *RemoveTagsFromStreamInput { - s.TagKeys = v - return s -} - -type RemoveTagsFromStreamOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsFromStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromStreamOutput) GoString() string { - return s.String() -} - -// The range of possible sequence numbers for the shard. -type SequenceNumberRange struct { - _ struct{} `type:"structure"` - - // The ending sequence number for the range. Shards that are in the OPEN state - // have an ending sequence number of null. - EndingSequenceNumber *string `type:"string"` - - // The starting sequence number for the range. - // - // StartingSequenceNumber is a required field - StartingSequenceNumber *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SequenceNumberRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SequenceNumberRange) GoString() string { - return s.String() -} - -// SetEndingSequenceNumber sets the EndingSequenceNumber field's value. -func (s *SequenceNumberRange) SetEndingSequenceNumber(v string) *SequenceNumberRange { - s.EndingSequenceNumber = &v - return s -} - -// SetStartingSequenceNumber sets the StartingSequenceNumber field's value. -func (s *SequenceNumberRange) SetStartingSequenceNumber(v string) *SequenceNumberRange { - s.StartingSequenceNumber = &v - return s -} - -// A uniquely identified group of data records in a Kinesis data stream. -type Shard struct { - _ struct{} `type:"structure"` - - // The shard ID of the shard adjacent to the shard's parent. - AdjacentParentShardId *string `min:"1" type:"string"` - - // The range of possible hash key values for the shard, which is a set of ordered - // contiguous positive integers. - // - // HashKeyRange is a required field - HashKeyRange *HashKeyRange `type:"structure" required:"true"` - - // The shard ID of the shard's parent. - ParentShardId *string `min:"1" type:"string"` - - // The range of possible sequence numbers for the shard. - // - // SequenceNumberRange is a required field - SequenceNumberRange *SequenceNumberRange `type:"structure" required:"true"` - - // The unique identifier of the shard within the stream. - // - // ShardId is a required field - ShardId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Shard) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Shard) GoString() string { - return s.String() -} - -// SetAdjacentParentShardId sets the AdjacentParentShardId field's value. -func (s *Shard) SetAdjacentParentShardId(v string) *Shard { - s.AdjacentParentShardId = &v - return s -} - -// SetHashKeyRange sets the HashKeyRange field's value. -func (s *Shard) SetHashKeyRange(v *HashKeyRange) *Shard { - s.HashKeyRange = v - return s -} - -// SetParentShardId sets the ParentShardId field's value. -func (s *Shard) SetParentShardId(v string) *Shard { - s.ParentShardId = &v - return s -} - -// SetSequenceNumberRange sets the SequenceNumberRange field's value. -func (s *Shard) SetSequenceNumberRange(v *SequenceNumberRange) *Shard { - s.SequenceNumberRange = v - return s -} - -// SetShardId sets the ShardId field's value. -func (s *Shard) SetShardId(v string) *Shard { - s.ShardId = &v - return s -} - -// Represents the input for SplitShard. -type SplitShardInput struct { - _ struct{} `type:"structure"` - - // A hash key value for the starting hash key of one of the child shards created - // by the split. The hash key range for a given shard constitutes a set of ordered - // contiguous positive integers. The value for NewStartingHashKey must be in - // the range of hash keys being mapped into the shard. The NewStartingHashKey - // hash key value and all higher hash key values in hash key range are distributed - // to one of the child shards. All the lower hash key values in the range are - // distributed to the other child shard. - // - // NewStartingHashKey is a required field - NewStartingHashKey *string `type:"string" required:"true"` - - // The shard ID of the shard to split. - // - // ShardToSplit is a required field - ShardToSplit *string `min:"1" type:"string" required:"true"` - - // The name of the stream for the shard split. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SplitShardInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SplitShardInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SplitShardInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SplitShardInput"} - if s.NewStartingHashKey == nil { - invalidParams.Add(request.NewErrParamRequired("NewStartingHashKey")) - } - if s.ShardToSplit == nil { - invalidParams.Add(request.NewErrParamRequired("ShardToSplit")) - } - if s.ShardToSplit != nil && len(*s.ShardToSplit) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ShardToSplit", 1)) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNewStartingHashKey sets the NewStartingHashKey field's value. -func (s *SplitShardInput) SetNewStartingHashKey(v string) *SplitShardInput { - s.NewStartingHashKey = &v - return s -} - -// SetShardToSplit sets the ShardToSplit field's value. -func (s *SplitShardInput) SetShardToSplit(v string) *SplitShardInput { - s.ShardToSplit = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *SplitShardInput) SetStreamName(v string) *SplitShardInput { - s.StreamName = &v - return s -} - -type SplitShardOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SplitShardOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SplitShardOutput) GoString() string { - return s.String() -} - -type StartStreamEncryptionInput struct { - _ struct{} `type:"structure"` - - // The encryption type to use. The only valid value is KMS. - // - // EncryptionType is a required field - EncryptionType *string `type:"string" required:"true" enum:"EncryptionType"` - - // The GUID for the customer-managed AWS KMS key to use for encryption. This - // value can be a globally unique identifier, a fully specified Amazon Resource - // Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You - // can also use a master key owned by Kinesis Data Streams by specifying the - // alias aws/kinesis. - // - // * Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 - // - // * Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName - // - // * Globally unique key ID example: 12345678-1234-1234-1234-123456789012 - // - // * Alias name example: alias/MyAliasName - // - // * Master key owned by Kinesis Data Streams: alias/aws/kinesis - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // The name of the stream for which to start encrypting records. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartStreamEncryptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartStreamEncryptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartStreamEncryptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartStreamEncryptionInput"} - if s.EncryptionType == nil { - invalidParams.Add(request.NewErrParamRequired("EncryptionType")) - } - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryptionType sets the EncryptionType field's value. -func (s *StartStreamEncryptionInput) SetEncryptionType(v string) *StartStreamEncryptionInput { - s.EncryptionType = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *StartStreamEncryptionInput) SetKeyId(v string) *StartStreamEncryptionInput { - s.KeyId = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *StartStreamEncryptionInput) SetStreamName(v string) *StartStreamEncryptionInput { - s.StreamName = &v - return s -} - -type StartStreamEncryptionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StartStreamEncryptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartStreamEncryptionOutput) GoString() string { - return s.String() -} - -type StopStreamEncryptionInput struct { - _ struct{} `type:"structure"` - - // The encryption type. The only valid value is KMS. - // - // EncryptionType is a required field - EncryptionType *string `type:"string" required:"true" enum:"EncryptionType"` - - // The GUID for the customer-managed AWS KMS key to use for encryption. This - // value can be a globally unique identifier, a fully specified Amazon Resource - // Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You - // can also use a master key owned by Kinesis Data Streams by specifying the - // alias aws/kinesis. - // - // * Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 - // - // * Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName - // - // * Globally unique key ID example: 12345678-1234-1234-1234-123456789012 - // - // * Alias name example: alias/MyAliasName - // - // * Master key owned by Kinesis Data Streams: alias/aws/kinesis - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // The name of the stream on which to stop encrypting records. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopStreamEncryptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopStreamEncryptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopStreamEncryptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopStreamEncryptionInput"} - if s.EncryptionType == nil { - invalidParams.Add(request.NewErrParamRequired("EncryptionType")) - } - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryptionType sets the EncryptionType field's value. -func (s *StopStreamEncryptionInput) SetEncryptionType(v string) *StopStreamEncryptionInput { - s.EncryptionType = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *StopStreamEncryptionInput) SetKeyId(v string) *StopStreamEncryptionInput { - s.KeyId = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *StopStreamEncryptionInput) SetStreamName(v string) *StopStreamEncryptionInput { - s.StreamName = &v - return s -} - -type StopStreamEncryptionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopStreamEncryptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopStreamEncryptionOutput) GoString() string { - return s.String() -} - -// Represents the output for DescribeStream. -type StreamDescription struct { - _ struct{} `type:"structure"` - - // The server-side encryption type used on the stream. This parameter can be - // one of the following values: - // - // * NONE: Do not encrypt the records in the stream. - // - // * KMS: Use server-side encryption on the records in the stream using a - // customer-managed AWS KMS key. - EncryptionType *string `type:"string" enum:"EncryptionType"` - - // Represents the current enhanced monitoring settings of the stream. - // - // EnhancedMonitoring is a required field - EnhancedMonitoring []*EnhancedMetrics `type:"list" required:"true"` - - // If set to true, more shards in the stream are available to describe. - // - // HasMoreShards is a required field - HasMoreShards *bool `type:"boolean" required:"true"` - - // The GUID for the customer-managed AWS KMS key to use for encryption. This - // value can be a globally unique identifier, a fully specified ARN to either - // an alias or a key, or an alias name prefixed by "alias/".You can also use - // a master key owned by Kinesis Data Streams by specifying the alias aws/kinesis. - // - // * Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 - // - // * Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName - // - // * Globally unique key ID example: 12345678-1234-1234-1234-123456789012 - // - // * Alias name example: alias/MyAliasName - // - // * Master key owned by Kinesis Data Streams: alias/aws/kinesis - KeyId *string `min:"1" type:"string"` - - // The current retention period, in hours. - // - // RetentionPeriodHours is a required field - RetentionPeriodHours *int64 `min:"1" type:"integer" required:"true"` - - // The shards that comprise the stream. - // - // Shards is a required field - Shards []*Shard `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) for the stream being described. - // - // StreamARN is a required field - StreamARN *string `min:"1" type:"string" required:"true"` - - // The approximate time that the stream was created. - // - // StreamCreationTimestamp is a required field - StreamCreationTimestamp *time.Time `type:"timestamp" required:"true"` - - // The name of the stream being described. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` - - // The current status of the stream being described. The stream status is one - // of the following states: - // - // * CREATING - The stream is being created. Kinesis Data Streams immediately - // returns and sets StreamStatus to CREATING. - // - // * DELETING - The stream is being deleted. The specified stream is in the - // DELETING state until Kinesis Data Streams completes the deletion. - // - // * ACTIVE - The stream exists and is ready for read and write operations - // or deletion. You should perform read and write operations only on an ACTIVE - // stream. - // - // * UPDATING - Shards in the stream are being merged or split. Read and - // write operations continue to work while the stream is in the UPDATING - // state. - // - // StreamStatus is a required field - StreamStatus *string `type:"string" required:"true" enum:"StreamStatus"` -} - -// String returns the string representation -func (s StreamDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StreamDescription) GoString() string { - return s.String() -} - -// SetEncryptionType sets the EncryptionType field's value. -func (s *StreamDescription) SetEncryptionType(v string) *StreamDescription { - s.EncryptionType = &v - return s -} - -// SetEnhancedMonitoring sets the EnhancedMonitoring field's value. -func (s *StreamDescription) SetEnhancedMonitoring(v []*EnhancedMetrics) *StreamDescription { - s.EnhancedMonitoring = v - return s -} - -// SetHasMoreShards sets the HasMoreShards field's value. -func (s *StreamDescription) SetHasMoreShards(v bool) *StreamDescription { - s.HasMoreShards = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *StreamDescription) SetKeyId(v string) *StreamDescription { - s.KeyId = &v - return s -} - -// SetRetentionPeriodHours sets the RetentionPeriodHours field's value. -func (s *StreamDescription) SetRetentionPeriodHours(v int64) *StreamDescription { - s.RetentionPeriodHours = &v - return s -} - -// SetShards sets the Shards field's value. -func (s *StreamDescription) SetShards(v []*Shard) *StreamDescription { - s.Shards = v - return s -} - -// SetStreamARN sets the StreamARN field's value. -func (s *StreamDescription) SetStreamARN(v string) *StreamDescription { - s.StreamARN = &v - return s -} - -// SetStreamCreationTimestamp sets the StreamCreationTimestamp field's value. -func (s *StreamDescription) SetStreamCreationTimestamp(v time.Time) *StreamDescription { - s.StreamCreationTimestamp = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *StreamDescription) SetStreamName(v string) *StreamDescription { - s.StreamName = &v - return s -} - -// SetStreamStatus sets the StreamStatus field's value. -func (s *StreamDescription) SetStreamStatus(v string) *StreamDescription { - s.StreamStatus = &v - return s -} - -// Represents the output for DescribeStreamSummary -type StreamDescriptionSummary struct { - _ struct{} `type:"structure"` - - // The number of enhanced fan-out consumers registered with the stream. - ConsumerCount *int64 `type:"integer"` - - // The encryption type used. This value is one of the following: - // - // * KMS - // - // * NONE - EncryptionType *string `type:"string" enum:"EncryptionType"` - - // Represents the current enhanced monitoring settings of the stream. - // - // EnhancedMonitoring is a required field - EnhancedMonitoring []*EnhancedMetrics `type:"list" required:"true"` - - // The GUID for the customer-managed AWS KMS key to use for encryption. This - // value can be a globally unique identifier, a fully specified ARN to either - // an alias or a key, or an alias name prefixed by "alias/".You can also use - // a master key owned by Kinesis Data Streams by specifying the alias aws/kinesis. - // - // * Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 - // - // * Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName - // - // * Globally unique key ID example: 12345678-1234-1234-1234-123456789012 - // - // * Alias name example: alias/MyAliasName - // - // * Master key owned by Kinesis Data Streams: alias/aws/kinesis - KeyId *string `min:"1" type:"string"` - - // The number of open shards in the stream. - // - // OpenShardCount is a required field - OpenShardCount *int64 `type:"integer" required:"true"` - - // The current retention period, in hours. - // - // RetentionPeriodHours is a required field - RetentionPeriodHours *int64 `min:"1" type:"integer" required:"true"` - - // The Amazon Resource Name (ARN) for the stream being described. - // - // StreamARN is a required field - StreamARN *string `min:"1" type:"string" required:"true"` - - // The approximate time that the stream was created. - // - // StreamCreationTimestamp is a required field - StreamCreationTimestamp *time.Time `type:"timestamp" required:"true"` - - // The name of the stream being described. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` - - // The current status of the stream being described. The stream status is one - // of the following states: - // - // * CREATING - The stream is being created. Kinesis Data Streams immediately - // returns and sets StreamStatus to CREATING. - // - // * DELETING - The stream is being deleted. The specified stream is in the - // DELETING state until Kinesis Data Streams completes the deletion. - // - // * ACTIVE - The stream exists and is ready for read and write operations - // or deletion. You should perform read and write operations only on an ACTIVE - // stream. - // - // * UPDATING - Shards in the stream are being merged or split. Read and - // write operations continue to work while the stream is in the UPDATING - // state. - // - // StreamStatus is a required field - StreamStatus *string `type:"string" required:"true" enum:"StreamStatus"` -} - -// String returns the string representation -func (s StreamDescriptionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StreamDescriptionSummary) GoString() string { - return s.String() -} - -// SetConsumerCount sets the ConsumerCount field's value. -func (s *StreamDescriptionSummary) SetConsumerCount(v int64) *StreamDescriptionSummary { - s.ConsumerCount = &v - return s -} - -// SetEncryptionType sets the EncryptionType field's value. -func (s *StreamDescriptionSummary) SetEncryptionType(v string) *StreamDescriptionSummary { - s.EncryptionType = &v - return s -} - -// SetEnhancedMonitoring sets the EnhancedMonitoring field's value. -func (s *StreamDescriptionSummary) SetEnhancedMonitoring(v []*EnhancedMetrics) *StreamDescriptionSummary { - s.EnhancedMonitoring = v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *StreamDescriptionSummary) SetKeyId(v string) *StreamDescriptionSummary { - s.KeyId = &v - return s -} - -// SetOpenShardCount sets the OpenShardCount field's value. -func (s *StreamDescriptionSummary) SetOpenShardCount(v int64) *StreamDescriptionSummary { - s.OpenShardCount = &v - return s -} - -// SetRetentionPeriodHours sets the RetentionPeriodHours field's value. -func (s *StreamDescriptionSummary) SetRetentionPeriodHours(v int64) *StreamDescriptionSummary { - s.RetentionPeriodHours = &v - return s -} - -// SetStreamARN sets the StreamARN field's value. -func (s *StreamDescriptionSummary) SetStreamARN(v string) *StreamDescriptionSummary { - s.StreamARN = &v - return s -} - -// SetStreamCreationTimestamp sets the StreamCreationTimestamp field's value. -func (s *StreamDescriptionSummary) SetStreamCreationTimestamp(v time.Time) *StreamDescriptionSummary { - s.StreamCreationTimestamp = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *StreamDescriptionSummary) SetStreamName(v string) *StreamDescriptionSummary { - s.StreamName = &v - return s -} - -// SetStreamStatus sets the StreamStatus field's value. -func (s *StreamDescriptionSummary) SetStreamStatus(v string) *StreamDescriptionSummary { - s.StreamStatus = &v - return s -} - -// Metadata assigned to the stream, consisting of a key-value pair. -type Tag struct { - _ struct{} `type:"structure"` - - // A unique identifier for the tag. Maximum length: 128 characters. Valid characters: - // Unicode letters, digits, white space, _ . / = + - % @ - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // An optional string, typically used to describe or define the tag. Maximum - // length: 256 characters. Valid characters: Unicode letters, digits, white - // space, _ . / = + - % @ - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type UpdateShardCountInput struct { - _ struct{} `type:"structure"` - - // The scaling type. Uniform scaling creates shards of equal size. - // - // ScalingType is a required field - ScalingType *string `type:"string" required:"true" enum:"ScalingType"` - - // The name of the stream. - // - // StreamName is a required field - StreamName *string `min:"1" type:"string" required:"true"` - - // The new number of shards. - // - // TargetShardCount is a required field - TargetShardCount *int64 `min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s UpdateShardCountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateShardCountInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateShardCountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateShardCountInput"} - if s.ScalingType == nil { - invalidParams.Add(request.NewErrParamRequired("ScalingType")) - } - if s.StreamName == nil { - invalidParams.Add(request.NewErrParamRequired("StreamName")) - } - if s.StreamName != nil && len(*s.StreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) - } - if s.TargetShardCount == nil { - invalidParams.Add(request.NewErrParamRequired("TargetShardCount")) - } - if s.TargetShardCount != nil && *s.TargetShardCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("TargetShardCount", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetScalingType sets the ScalingType field's value. -func (s *UpdateShardCountInput) SetScalingType(v string) *UpdateShardCountInput { - s.ScalingType = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *UpdateShardCountInput) SetStreamName(v string) *UpdateShardCountInput { - s.StreamName = &v - return s -} - -// SetTargetShardCount sets the TargetShardCount field's value. -func (s *UpdateShardCountInput) SetTargetShardCount(v int64) *UpdateShardCountInput { - s.TargetShardCount = &v - return s -} - -type UpdateShardCountOutput struct { - _ struct{} `type:"structure"` - - // The current number of shards. - CurrentShardCount *int64 `min:"1" type:"integer"` - - // The name of the stream. - StreamName *string `min:"1" type:"string"` - - // The updated number of shards. - TargetShardCount *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s UpdateShardCountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateShardCountOutput) GoString() string { - return s.String() -} - -// SetCurrentShardCount sets the CurrentShardCount field's value. -func (s *UpdateShardCountOutput) SetCurrentShardCount(v int64) *UpdateShardCountOutput { - s.CurrentShardCount = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *UpdateShardCountOutput) SetStreamName(v string) *UpdateShardCountOutput { - s.StreamName = &v - return s -} - -// SetTargetShardCount sets the TargetShardCount field's value. -func (s *UpdateShardCountOutput) SetTargetShardCount(v int64) *UpdateShardCountOutput { - s.TargetShardCount = &v - return s -} - -const ( - // ConsumerStatusCreating is a ConsumerStatus enum value - ConsumerStatusCreating = "CREATING" - - // ConsumerStatusDeleting is a ConsumerStatus enum value - ConsumerStatusDeleting = "DELETING" - - // ConsumerStatusActive is a ConsumerStatus enum value - ConsumerStatusActive = "ACTIVE" -) - -const ( - // EncryptionTypeNone is a EncryptionType enum value - EncryptionTypeNone = "NONE" - - // EncryptionTypeKms is a EncryptionType enum value - EncryptionTypeKms = "KMS" -) - -const ( - // MetricsNameIncomingBytes is a MetricsName enum value - MetricsNameIncomingBytes = "IncomingBytes" - - // MetricsNameIncomingRecords is a MetricsName enum value - MetricsNameIncomingRecords = "IncomingRecords" - - // MetricsNameOutgoingBytes is a MetricsName enum value - MetricsNameOutgoingBytes = "OutgoingBytes" - - // MetricsNameOutgoingRecords is a MetricsName enum value - MetricsNameOutgoingRecords = "OutgoingRecords" - - // MetricsNameWriteProvisionedThroughputExceeded is a MetricsName enum value - MetricsNameWriteProvisionedThroughputExceeded = "WriteProvisionedThroughputExceeded" - - // MetricsNameReadProvisionedThroughputExceeded is a MetricsName enum value - MetricsNameReadProvisionedThroughputExceeded = "ReadProvisionedThroughputExceeded" - - // MetricsNameIteratorAgeMilliseconds is a MetricsName enum value - MetricsNameIteratorAgeMilliseconds = "IteratorAgeMilliseconds" - - // MetricsNameAll is a MetricsName enum value - MetricsNameAll = "ALL" -) - -const ( - // ScalingTypeUniformScaling is a ScalingType enum value - ScalingTypeUniformScaling = "UNIFORM_SCALING" -) - -const ( - // ShardIteratorTypeAtSequenceNumber is a ShardIteratorType enum value - ShardIteratorTypeAtSequenceNumber = "AT_SEQUENCE_NUMBER" - - // ShardIteratorTypeAfterSequenceNumber is a ShardIteratorType enum value - ShardIteratorTypeAfterSequenceNumber = "AFTER_SEQUENCE_NUMBER" - - // ShardIteratorTypeTrimHorizon is a ShardIteratorType enum value - ShardIteratorTypeTrimHorizon = "TRIM_HORIZON" - - // ShardIteratorTypeLatest is a ShardIteratorType enum value - ShardIteratorTypeLatest = "LATEST" - - // ShardIteratorTypeAtTimestamp is a ShardIteratorType enum value - ShardIteratorTypeAtTimestamp = "AT_TIMESTAMP" -) - -const ( - // StreamStatusCreating is a StreamStatus enum value - StreamStatusCreating = "CREATING" - - // StreamStatusDeleting is a StreamStatus enum value - StreamStatusDeleting = "DELETING" - - // StreamStatusActive is a StreamStatus enum value - StreamStatusActive = "ACTIVE" - - // StreamStatusUpdating is a StreamStatus enum value - StreamStatusUpdating = "UPDATING" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/customizations.go deleted file mode 100644 index f618f0da6..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/customizations.go +++ /dev/null @@ -1,22 +0,0 @@ -package kinesis - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws/request" -) - -var readDuration = 5 * time.Second - -func init() { - ops := []string{ - opGetRecords, - } - initRequest = func(r *request.Request) { - for _, operation := range ops { - if r.Operation.Name == operation { - r.ApplyOptions(request.WithResponseReadTimeout(readDuration)) - } - } - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/doc.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/doc.go deleted file mode 100644 index 06e8de5fe..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/doc.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package kinesis provides the client and types for making API -// requests to Amazon Kinesis. -// -// Amazon Kinesis Data Streams is a managed service that scales elastically -// for real-time processing of streaming big data. -// -// See https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02 for more information on this service. -// -// See kinesis package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/kinesis/ -// -// Using the Client -// -// To contact Amazon Kinesis with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Kinesis client Kinesis for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/kinesis/#New -package kinesis diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/errors.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/errors.go deleted file mode 100644 index 8c06c6f8c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/errors.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package kinesis - -const ( - - // ErrCodeExpiredIteratorException for service response error code - // "ExpiredIteratorException". - // - // The provided iterator exceeds the maximum age allowed. - ErrCodeExpiredIteratorException = "ExpiredIteratorException" - - // ErrCodeExpiredNextTokenException for service response error code - // "ExpiredNextTokenException". - // - // The pagination token passed to the operation is expired. - ErrCodeExpiredNextTokenException = "ExpiredNextTokenException" - - // ErrCodeInvalidArgumentException for service response error code - // "InvalidArgumentException". - // - // A specified parameter exceeds its restrictions, is not supported, or can't - // be used. For more information, see the returned message. - ErrCodeInvalidArgumentException = "InvalidArgumentException" - - // ErrCodeKMSAccessDeniedException for service response error code - // "KMSAccessDeniedException". - // - // The ciphertext references a key that doesn't exist or that you don't have - // access to. - ErrCodeKMSAccessDeniedException = "KMSAccessDeniedException" - - // ErrCodeKMSDisabledException for service response error code - // "KMSDisabledException". - // - // The request was rejected because the specified customer master key (CMK) - // isn't enabled. - ErrCodeKMSDisabledException = "KMSDisabledException" - - // ErrCodeKMSInvalidStateException for service response error code - // "KMSInvalidStateException". - // - // The request was rejected because the state of the specified resource isn't - // valid for this request. For more information, see How Key State Affects Use - // of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) - // in the AWS Key Management Service Developer Guide. - ErrCodeKMSInvalidStateException = "KMSInvalidStateException" - - // ErrCodeKMSNotFoundException for service response error code - // "KMSNotFoundException". - // - // The request was rejected because the specified entity or resource can't be - // found. - ErrCodeKMSNotFoundException = "KMSNotFoundException" - - // ErrCodeKMSOptInRequired for service response error code - // "KMSOptInRequired". - // - // The AWS access key ID needs a subscription for the service. - ErrCodeKMSOptInRequired = "KMSOptInRequired" - - // ErrCodeKMSThrottlingException for service response error code - // "KMSThrottlingException". - // - // The request was denied due to request throttling. For more information about - // throttling, see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second) - // in the AWS Key Management Service Developer Guide. - ErrCodeKMSThrottlingException = "KMSThrottlingException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The requested resource exceeds the maximum number allowed, or the number - // of concurrent stream requests exceeds the maximum number allowed. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeProvisionedThroughputExceededException for service response error code - // "ProvisionedThroughputExceededException". - // - // The request rate for the stream is too high, or the requested data is too - // large for the available throughput. Reduce the frequency or size of your - // requests. For more information, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) - // in the Amazon Kinesis Data Streams Developer Guide, and Error Retries and - // Exponential Backoff in AWS (http://docs.aws.amazon.com/general/latest/gr/api-retries.html) - // in the AWS General Reference. - ErrCodeProvisionedThroughputExceededException = "ProvisionedThroughputExceededException" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUseException". - // - // The resource is not available for this operation. For successful operation, - // the resource must be in the ACTIVE state. - ErrCodeResourceInUseException = "ResourceInUseException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The requested resource could not be found. The stream might not be specified - // correctly. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go deleted file mode 100644 index 2d55ac957..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package kinesis - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// Kinesis provides the API operation methods for making requests to -// Amazon Kinesis. See this package's package overview docs -// for details on the service. -// -// Kinesis methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Kinesis 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 = "kinesis" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Kinesis" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Kinesis client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Kinesis client from just a session. -// svc := kinesis.New(mySession) -// -// // Create a Kinesis client with additional configuration -// svc := kinesis.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Kinesis { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Kinesis { - svc := &Kinesis{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2013-12-02", - JSONVersion: "1.1", - TargetPrefix: "Kinesis_20131202", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Kinesis operation and runs any -// custom request initialization. -func (c *Kinesis) 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/kinesis/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/waiters.go deleted file mode 100644 index a51912ab6..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/waiters.go +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package kinesis - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilStreamExists uses the Kinesis API operation -// DescribeStream to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *Kinesis) WaitUntilStreamExists(input *DescribeStreamInput) error { - return c.WaitUntilStreamExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilStreamExistsWithContext is an extended version of WaitUntilStreamExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) WaitUntilStreamExistsWithContext(ctx aws.Context, input *DescribeStreamInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilStreamExists", - MaxAttempts: 18, - Delay: request.ConstantWaiterDelay(10 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "StreamDescription.StreamStatus", - Expected: "ACTIVE", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeStreamInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeStreamRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilStreamNotExists uses the Kinesis API operation -// DescribeStream to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *Kinesis) WaitUntilStreamNotExists(input *DescribeStreamInput) error { - return c.WaitUntilStreamNotExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilStreamNotExistsWithContext is an extended version of WaitUntilStreamNotExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Kinesis) WaitUntilStreamNotExistsWithContext(ctx aws.Context, input *DescribeStreamInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilStreamNotExists", - MaxAttempts: 18, - Delay: request.ConstantWaiterDelay(10 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ResourceNotFoundException", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeStreamInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeStreamRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go deleted file mode 100644 index dfcfe3529..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go +++ /dev/null @@ -1,6751 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package kinesisanalytics - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAddApplicationCloudWatchLoggingOption = "AddApplicationCloudWatchLoggingOption" - -// AddApplicationCloudWatchLoggingOptionRequest generates a "aws/request.Request" representing the -// client's request for the AddApplicationCloudWatchLoggingOption operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddApplicationCloudWatchLoggingOption for more information on using the AddApplicationCloudWatchLoggingOption -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddApplicationCloudWatchLoggingOptionRequest method. -// req, resp := client.AddApplicationCloudWatchLoggingOptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationCloudWatchLoggingOption -func (c *KinesisAnalytics) AddApplicationCloudWatchLoggingOptionRequest(input *AddApplicationCloudWatchLoggingOptionInput) (req *request.Request, output *AddApplicationCloudWatchLoggingOptionOutput) { - op := &request.Operation{ - Name: opAddApplicationCloudWatchLoggingOption, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddApplicationCloudWatchLoggingOptionInput{} - } - - output = &AddApplicationCloudWatchLoggingOptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddApplicationCloudWatchLoggingOption API operation for Amazon Kinesis Analytics. -// -// Adds a CloudWatch log stream to monitor application configuration errors. -// For more information about using CloudWatch log streams with Amazon Kinesis -// Analytics applications, see Working with Amazon CloudWatch Logs (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/cloudwatch-logs.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation AddApplicationCloudWatchLoggingOption for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Specified application can't be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// Application is not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// Specified input parameter value is invalid. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Exception thrown as a result of concurrent modification to an application. -// For example, two individuals attempting to edit the same application at the -// same time. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationCloudWatchLoggingOption -func (c *KinesisAnalytics) AddApplicationCloudWatchLoggingOption(input *AddApplicationCloudWatchLoggingOptionInput) (*AddApplicationCloudWatchLoggingOptionOutput, error) { - req, out := c.AddApplicationCloudWatchLoggingOptionRequest(input) - return out, req.Send() -} - -// AddApplicationCloudWatchLoggingOptionWithContext is the same as AddApplicationCloudWatchLoggingOption with the addition of -// the ability to pass a context and additional request options. -// -// See AddApplicationCloudWatchLoggingOption for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) AddApplicationCloudWatchLoggingOptionWithContext(ctx aws.Context, input *AddApplicationCloudWatchLoggingOptionInput, opts ...request.Option) (*AddApplicationCloudWatchLoggingOptionOutput, error) { - req, out := c.AddApplicationCloudWatchLoggingOptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddApplicationInput = "AddApplicationInput" - -// AddApplicationInputRequest generates a "aws/request.Request" representing the -// client's request for the AddApplicationInput operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddApplicationInput for more information on using the AddApplicationInput -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddApplicationInputRequest method. -// req, resp := client.AddApplicationInputRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationInput -func (c *KinesisAnalytics) AddApplicationInputRequest(input *AddApplicationInputInput) (req *request.Request, output *AddApplicationInputOutput) { - op := &request.Operation{ - Name: opAddApplicationInput, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddApplicationInputInput{} - } - - output = &AddApplicationInputOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddApplicationInput API operation for Amazon Kinesis Analytics. -// -// Adds a streaming source to your Amazon Kinesis application. For conceptual -// information, see Configuring Application Input (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). -// -// You can add a streaming source either when you create an application or you -// can use this operation to add a streaming source after you create an application. -// For more information, see CreateApplication. -// -// Any configuration update, including adding a streaming source using this -// operation, results in a new version of the application. You can use the DescribeApplication -// operation to find the current application version. -// -// This operation requires permissions to perform the kinesisanalytics:AddApplicationInput -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation AddApplicationInput for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Specified application can't be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// Application is not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// Specified input parameter value is invalid. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Exception thrown as a result of concurrent modification to an application. -// For example, two individuals attempting to edit the same application at the -// same time. -// -// * ErrCodeCodeValidationException "CodeValidationException" -// User-provided application code (query) is invalid. This can be a simple syntax -// error. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationInput -func (c *KinesisAnalytics) AddApplicationInput(input *AddApplicationInputInput) (*AddApplicationInputOutput, error) { - req, out := c.AddApplicationInputRequest(input) - return out, req.Send() -} - -// AddApplicationInputWithContext is the same as AddApplicationInput with the addition of -// the ability to pass a context and additional request options. -// -// See AddApplicationInput for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) AddApplicationInputWithContext(ctx aws.Context, input *AddApplicationInputInput, opts ...request.Option) (*AddApplicationInputOutput, error) { - req, out := c.AddApplicationInputRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddApplicationInputProcessingConfiguration = "AddApplicationInputProcessingConfiguration" - -// AddApplicationInputProcessingConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the AddApplicationInputProcessingConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddApplicationInputProcessingConfiguration for more information on using the AddApplicationInputProcessingConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddApplicationInputProcessingConfigurationRequest method. -// req, resp := client.AddApplicationInputProcessingConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationInputProcessingConfiguration -func (c *KinesisAnalytics) AddApplicationInputProcessingConfigurationRequest(input *AddApplicationInputProcessingConfigurationInput) (req *request.Request, output *AddApplicationInputProcessingConfigurationOutput) { - op := &request.Operation{ - Name: opAddApplicationInputProcessingConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddApplicationInputProcessingConfigurationInput{} - } - - output = &AddApplicationInputProcessingConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddApplicationInputProcessingConfiguration API operation for Amazon Kinesis Analytics. -// -// Adds an InputProcessingConfiguration to an application. An input processor -// preprocesses records on the input stream before the application's SQL code -// executes. Currently, the only input processor available is AWS Lambda (https://aws.amazon.com/documentation/lambda/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation AddApplicationInputProcessingConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Specified application can't be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// Application is not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// Specified input parameter value is invalid. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Exception thrown as a result of concurrent modification to an application. -// For example, two individuals attempting to edit the same application at the -// same time. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationInputProcessingConfiguration -func (c *KinesisAnalytics) AddApplicationInputProcessingConfiguration(input *AddApplicationInputProcessingConfigurationInput) (*AddApplicationInputProcessingConfigurationOutput, error) { - req, out := c.AddApplicationInputProcessingConfigurationRequest(input) - return out, req.Send() -} - -// AddApplicationInputProcessingConfigurationWithContext is the same as AddApplicationInputProcessingConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See AddApplicationInputProcessingConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) AddApplicationInputProcessingConfigurationWithContext(ctx aws.Context, input *AddApplicationInputProcessingConfigurationInput, opts ...request.Option) (*AddApplicationInputProcessingConfigurationOutput, error) { - req, out := c.AddApplicationInputProcessingConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddApplicationOutput = "AddApplicationOutput" - -// AddApplicationOutputRequest generates a "aws/request.Request" representing the -// client's request for the AddApplicationOutput operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddApplicationOutput for more information on using the AddApplicationOutput -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddApplicationOutputRequest method. -// req, resp := client.AddApplicationOutputRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationOutput -func (c *KinesisAnalytics) AddApplicationOutputRequest(input *AddApplicationOutputInput) (req *request.Request, output *AddApplicationOutputOutput) { - op := &request.Operation{ - Name: opAddApplicationOutput, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddApplicationOutputInput{} - } - - output = &AddApplicationOutputOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddApplicationOutput API operation for Amazon Kinesis Analytics. -// -// Adds an external destination to your Amazon Kinesis Analytics application. -// -// If you want Amazon Kinesis Analytics to deliver data from an in-application -// stream within your application to an external destination (such as an Amazon -// Kinesis stream, an Amazon Kinesis Firehose delivery stream, or an AWS Lambda -// function), you add the relevant configuration to your application using this -// operation. You can configure one or more outputs for your application. Each -// output configuration maps an in-application stream and an external destination. -// -// You can use one of the output configurations to deliver data from your in-application -// error stream to an external destination so that you can analyze the errors. -// For more information, see Understanding Application Output (Destination) -// (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html). -// -// Any configuration update, including adding a streaming source using this -// operation, results in a new version of the application. You can use the DescribeApplication -// operation to find the current application version. -// -// For the limits on the number of application inputs and outputs you can configure, -// see Limits (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/limits.html). -// -// This operation requires permissions to perform the kinesisanalytics:AddApplicationOutput -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation AddApplicationOutput for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Specified application can't be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// Application is not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// Specified input parameter value is invalid. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Exception thrown as a result of concurrent modification to an application. -// For example, two individuals attempting to edit the same application at the -// same time. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationOutput -func (c *KinesisAnalytics) AddApplicationOutput(input *AddApplicationOutputInput) (*AddApplicationOutputOutput, error) { - req, out := c.AddApplicationOutputRequest(input) - return out, req.Send() -} - -// AddApplicationOutputWithContext is the same as AddApplicationOutput with the addition of -// the ability to pass a context and additional request options. -// -// See AddApplicationOutput for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) AddApplicationOutputWithContext(ctx aws.Context, input *AddApplicationOutputInput, opts ...request.Option) (*AddApplicationOutputOutput, error) { - req, out := c.AddApplicationOutputRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddApplicationReferenceDataSource = "AddApplicationReferenceDataSource" - -// AddApplicationReferenceDataSourceRequest generates a "aws/request.Request" representing the -// client's request for the AddApplicationReferenceDataSource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddApplicationReferenceDataSource for more information on using the AddApplicationReferenceDataSource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddApplicationReferenceDataSourceRequest method. -// req, resp := client.AddApplicationReferenceDataSourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationReferenceDataSource -func (c *KinesisAnalytics) AddApplicationReferenceDataSourceRequest(input *AddApplicationReferenceDataSourceInput) (req *request.Request, output *AddApplicationReferenceDataSourceOutput) { - op := &request.Operation{ - Name: opAddApplicationReferenceDataSource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddApplicationReferenceDataSourceInput{} - } - - output = &AddApplicationReferenceDataSourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddApplicationReferenceDataSource API operation for Amazon Kinesis Analytics. -// -// Adds a reference data source to an existing application. -// -// Amazon Kinesis Analytics reads reference data (that is, an Amazon S3 object) -// and creates an in-application table within your application. In the request, -// you provide the source (S3 bucket name and object key name), name of the -// in-application table to create, and the necessary mapping information that -// describes how data in Amazon S3 object maps to columns in the resulting in-application -// table. -// -// For conceptual information, see Configuring Application Input (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). -// For the limits on data sources you can add to your application, see Limits -// (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/limits.html). -// -// This operation requires permissions to perform the kinesisanalytics:AddApplicationOutput -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation AddApplicationReferenceDataSource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Specified application can't be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// Application is not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// Specified input parameter value is invalid. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Exception thrown as a result of concurrent modification to an application. -// For example, two individuals attempting to edit the same application at the -// same time. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationReferenceDataSource -func (c *KinesisAnalytics) AddApplicationReferenceDataSource(input *AddApplicationReferenceDataSourceInput) (*AddApplicationReferenceDataSourceOutput, error) { - req, out := c.AddApplicationReferenceDataSourceRequest(input) - return out, req.Send() -} - -// AddApplicationReferenceDataSourceWithContext is the same as AddApplicationReferenceDataSource with the addition of -// the ability to pass a context and additional request options. -// -// See AddApplicationReferenceDataSource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) AddApplicationReferenceDataSourceWithContext(ctx aws.Context, input *AddApplicationReferenceDataSourceInput, opts ...request.Option) (*AddApplicationReferenceDataSourceOutput, error) { - req, out := c.AddApplicationReferenceDataSourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateApplication = "CreateApplication" - -// CreateApplicationRequest generates a "aws/request.Request" representing the -// client's request for the CreateApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateApplication for more information on using the CreateApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateApplicationRequest method. -// req, resp := client.CreateApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/CreateApplication -func (c *KinesisAnalytics) CreateApplicationRequest(input *CreateApplicationInput) (req *request.Request, output *CreateApplicationOutput) { - op := &request.Operation{ - Name: opCreateApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateApplicationInput{} - } - - output = &CreateApplicationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateApplication API operation for Amazon Kinesis Analytics. -// -// Creates an Amazon Kinesis Analytics application. You can configure each application -// with one streaming source as input, application code to process the input, -// and up to three destinations where you want Amazon Kinesis Analytics to write -// the output data from your application. For an overview, see How it Works -// (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works.html). -// -// In the input configuration, you map the streaming source to an in-application -// stream, which you can think of as a constantly updating table. In the mapping, -// you must provide a schema for the in-application stream and map each data -// column in the in-application stream to a data element in the streaming source. -// -// Your application code is one or more SQL statements that read input data, -// transform it, and generate output. Your application code can create one or -// more SQL artifacts like SQL streams or pumps. -// -// In the output configuration, you can configure the application to write data -// from in-application streams created in your applications to up to three destinations. -// -// To read data from your source stream or write data to destination streams, -// Amazon Kinesis Analytics needs your permissions. You grant these permissions -// by creating IAM roles. This operation requires permissions to perform the -// kinesisanalytics:CreateApplication action. -// -// For introductory exercises to create an Amazon Kinesis Analytics application, -// see Getting Started (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/getting-started.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation CreateApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCodeValidationException "CodeValidationException" -// User-provided application code (query) is invalid. This can be a simple syntax -// error. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// Application is not available for this operation. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// Exceeded the number of applications allowed. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// Specified input parameter value is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/CreateApplication -func (c *KinesisAnalytics) CreateApplication(input *CreateApplicationInput) (*CreateApplicationOutput, error) { - req, out := c.CreateApplicationRequest(input) - return out, req.Send() -} - -// CreateApplicationWithContext is the same as CreateApplication with the addition of -// the ability to pass a context and additional request options. -// -// See CreateApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) CreateApplicationWithContext(ctx aws.Context, input *CreateApplicationInput, opts ...request.Option) (*CreateApplicationOutput, error) { - req, out := c.CreateApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApplication = "DeleteApplication" - -// DeleteApplicationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApplication for more information on using the DeleteApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApplicationRequest method. -// req, resp := client.DeleteApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplication -func (c *KinesisAnalytics) DeleteApplicationRequest(input *DeleteApplicationInput) (req *request.Request, output *DeleteApplicationOutput) { - op := &request.Operation{ - Name: opDeleteApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteApplicationInput{} - } - - output = &DeleteApplicationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteApplication API operation for Amazon Kinesis Analytics. -// -// Deletes the specified application. Amazon Kinesis Analytics halts application -// execution and deletes the application, including any application artifacts -// (such as in-application streams, reference table, and application code). -// -// This operation requires permissions to perform the kinesisanalytics:DeleteApplication -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation DeleteApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Exception thrown as a result of concurrent modification to an application. -// For example, two individuals attempting to edit the same application at the -// same time. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Specified application can't be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// Application is not available for this operation. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplication -func (c *KinesisAnalytics) DeleteApplication(input *DeleteApplicationInput) (*DeleteApplicationOutput, error) { - req, out := c.DeleteApplicationRequest(input) - return out, req.Send() -} - -// DeleteApplicationWithContext is the same as DeleteApplication with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) DeleteApplicationWithContext(ctx aws.Context, input *DeleteApplicationInput, opts ...request.Option) (*DeleteApplicationOutput, error) { - req, out := c.DeleteApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApplicationCloudWatchLoggingOption = "DeleteApplicationCloudWatchLoggingOption" - -// DeleteApplicationCloudWatchLoggingOptionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApplicationCloudWatchLoggingOption operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApplicationCloudWatchLoggingOption for more information on using the DeleteApplicationCloudWatchLoggingOption -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApplicationCloudWatchLoggingOptionRequest method. -// req, resp := client.DeleteApplicationCloudWatchLoggingOptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationCloudWatchLoggingOption -func (c *KinesisAnalytics) DeleteApplicationCloudWatchLoggingOptionRequest(input *DeleteApplicationCloudWatchLoggingOptionInput) (req *request.Request, output *DeleteApplicationCloudWatchLoggingOptionOutput) { - op := &request.Operation{ - Name: opDeleteApplicationCloudWatchLoggingOption, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteApplicationCloudWatchLoggingOptionInput{} - } - - output = &DeleteApplicationCloudWatchLoggingOptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteApplicationCloudWatchLoggingOption API operation for Amazon Kinesis Analytics. -// -// Deletes a CloudWatch log stream from an application. For more information -// about using CloudWatch log streams with Amazon Kinesis Analytics applications, -// see Working with Amazon CloudWatch Logs (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/cloudwatch-logs.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation DeleteApplicationCloudWatchLoggingOption for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Specified application can't be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// Application is not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// Specified input parameter value is invalid. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Exception thrown as a result of concurrent modification to an application. -// For example, two individuals attempting to edit the same application at the -// same time. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationCloudWatchLoggingOption -func (c *KinesisAnalytics) DeleteApplicationCloudWatchLoggingOption(input *DeleteApplicationCloudWatchLoggingOptionInput) (*DeleteApplicationCloudWatchLoggingOptionOutput, error) { - req, out := c.DeleteApplicationCloudWatchLoggingOptionRequest(input) - return out, req.Send() -} - -// DeleteApplicationCloudWatchLoggingOptionWithContext is the same as DeleteApplicationCloudWatchLoggingOption with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApplicationCloudWatchLoggingOption for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) DeleteApplicationCloudWatchLoggingOptionWithContext(ctx aws.Context, input *DeleteApplicationCloudWatchLoggingOptionInput, opts ...request.Option) (*DeleteApplicationCloudWatchLoggingOptionOutput, error) { - req, out := c.DeleteApplicationCloudWatchLoggingOptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApplicationInputProcessingConfiguration = "DeleteApplicationInputProcessingConfiguration" - -// DeleteApplicationInputProcessingConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApplicationInputProcessingConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApplicationInputProcessingConfiguration for more information on using the DeleteApplicationInputProcessingConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApplicationInputProcessingConfigurationRequest method. -// req, resp := client.DeleteApplicationInputProcessingConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationInputProcessingConfiguration -func (c *KinesisAnalytics) DeleteApplicationInputProcessingConfigurationRequest(input *DeleteApplicationInputProcessingConfigurationInput) (req *request.Request, output *DeleteApplicationInputProcessingConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteApplicationInputProcessingConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteApplicationInputProcessingConfigurationInput{} - } - - output = &DeleteApplicationInputProcessingConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteApplicationInputProcessingConfiguration API operation for Amazon Kinesis Analytics. -// -// Deletes an InputProcessingConfiguration from an input. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation DeleteApplicationInputProcessingConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Specified application can't be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// Application is not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// Specified input parameter value is invalid. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Exception thrown as a result of concurrent modification to an application. -// For example, two individuals attempting to edit the same application at the -// same time. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationInputProcessingConfiguration -func (c *KinesisAnalytics) DeleteApplicationInputProcessingConfiguration(input *DeleteApplicationInputProcessingConfigurationInput) (*DeleteApplicationInputProcessingConfigurationOutput, error) { - req, out := c.DeleteApplicationInputProcessingConfigurationRequest(input) - return out, req.Send() -} - -// DeleteApplicationInputProcessingConfigurationWithContext is the same as DeleteApplicationInputProcessingConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApplicationInputProcessingConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) DeleteApplicationInputProcessingConfigurationWithContext(ctx aws.Context, input *DeleteApplicationInputProcessingConfigurationInput, opts ...request.Option) (*DeleteApplicationInputProcessingConfigurationOutput, error) { - req, out := c.DeleteApplicationInputProcessingConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApplicationOutput = "DeleteApplicationOutput" - -// DeleteApplicationOutputRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApplicationOutput operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApplicationOutput for more information on using the DeleteApplicationOutput -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApplicationOutputRequest method. -// req, resp := client.DeleteApplicationOutputRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationOutput -func (c *KinesisAnalytics) DeleteApplicationOutputRequest(input *DeleteApplicationOutputInput) (req *request.Request, output *DeleteApplicationOutputOutput) { - op := &request.Operation{ - Name: opDeleteApplicationOutput, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteApplicationOutputInput{} - } - - output = &DeleteApplicationOutputOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteApplicationOutput API operation for Amazon Kinesis Analytics. -// -// Deletes output destination configuration from your application configuration. -// Amazon Kinesis Analytics will no longer write data from the corresponding -// in-application stream to the external output destination. -// -// This operation requires permissions to perform the kinesisanalytics:DeleteApplicationOutput -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation DeleteApplicationOutput for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Specified application can't be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// Application is not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// Specified input parameter value is invalid. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Exception thrown as a result of concurrent modification to an application. -// For example, two individuals attempting to edit the same application at the -// same time. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationOutput -func (c *KinesisAnalytics) DeleteApplicationOutput(input *DeleteApplicationOutputInput) (*DeleteApplicationOutputOutput, error) { - req, out := c.DeleteApplicationOutputRequest(input) - return out, req.Send() -} - -// DeleteApplicationOutputWithContext is the same as DeleteApplicationOutput with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApplicationOutput for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) DeleteApplicationOutputWithContext(ctx aws.Context, input *DeleteApplicationOutputInput, opts ...request.Option) (*DeleteApplicationOutputOutput, error) { - req, out := c.DeleteApplicationOutputRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApplicationReferenceDataSource = "DeleteApplicationReferenceDataSource" - -// DeleteApplicationReferenceDataSourceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApplicationReferenceDataSource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApplicationReferenceDataSource for more information on using the DeleteApplicationReferenceDataSource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApplicationReferenceDataSourceRequest method. -// req, resp := client.DeleteApplicationReferenceDataSourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationReferenceDataSource -func (c *KinesisAnalytics) DeleteApplicationReferenceDataSourceRequest(input *DeleteApplicationReferenceDataSourceInput) (req *request.Request, output *DeleteApplicationReferenceDataSourceOutput) { - op := &request.Operation{ - Name: opDeleteApplicationReferenceDataSource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteApplicationReferenceDataSourceInput{} - } - - output = &DeleteApplicationReferenceDataSourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteApplicationReferenceDataSource API operation for Amazon Kinesis Analytics. -// -// Deletes a reference data source configuration from the specified application -// configuration. -// -// If the application is running, Amazon Kinesis Analytics immediately removes -// the in-application table that you created using the AddApplicationReferenceDataSource -// operation. -// -// This operation requires permissions to perform the kinesisanalytics.DeleteApplicationReferenceDataSource -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation DeleteApplicationReferenceDataSource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Specified application can't be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// Application is not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// Specified input parameter value is invalid. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Exception thrown as a result of concurrent modification to an application. -// For example, two individuals attempting to edit the same application at the -// same time. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationReferenceDataSource -func (c *KinesisAnalytics) DeleteApplicationReferenceDataSource(input *DeleteApplicationReferenceDataSourceInput) (*DeleteApplicationReferenceDataSourceOutput, error) { - req, out := c.DeleteApplicationReferenceDataSourceRequest(input) - return out, req.Send() -} - -// DeleteApplicationReferenceDataSourceWithContext is the same as DeleteApplicationReferenceDataSource with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApplicationReferenceDataSource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) DeleteApplicationReferenceDataSourceWithContext(ctx aws.Context, input *DeleteApplicationReferenceDataSourceInput, opts ...request.Option) (*DeleteApplicationReferenceDataSourceOutput, error) { - req, out := c.DeleteApplicationReferenceDataSourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeApplication = "DescribeApplication" - -// DescribeApplicationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeApplication for more information on using the DescribeApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeApplicationRequest method. -// req, resp := client.DescribeApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DescribeApplication -func (c *KinesisAnalytics) DescribeApplicationRequest(input *DescribeApplicationInput) (req *request.Request, output *DescribeApplicationOutput) { - op := &request.Operation{ - Name: opDescribeApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeApplicationInput{} - } - - output = &DescribeApplicationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeApplication API operation for Amazon Kinesis Analytics. -// -// Returns information about a specific Amazon Kinesis Analytics application. -// -// If you want to retrieve a list of all applications in your account, use the -// ListApplications operation. -// -// This operation requires permissions to perform the kinesisanalytics:DescribeApplication -// action. You can use DescribeApplication to get the current application versionId, -// which you need to call other operations such as Update. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation DescribeApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Specified application can't be found. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DescribeApplication -func (c *KinesisAnalytics) DescribeApplication(input *DescribeApplicationInput) (*DescribeApplicationOutput, error) { - req, out := c.DescribeApplicationRequest(input) - return out, req.Send() -} - -// DescribeApplicationWithContext is the same as DescribeApplication with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) DescribeApplicationWithContext(ctx aws.Context, input *DescribeApplicationInput, opts ...request.Option) (*DescribeApplicationOutput, error) { - req, out := c.DescribeApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDiscoverInputSchema = "DiscoverInputSchema" - -// DiscoverInputSchemaRequest generates a "aws/request.Request" representing the -// client's request for the DiscoverInputSchema operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DiscoverInputSchema for more information on using the DiscoverInputSchema -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DiscoverInputSchemaRequest method. -// req, resp := client.DiscoverInputSchemaRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DiscoverInputSchema -func (c *KinesisAnalytics) DiscoverInputSchemaRequest(input *DiscoverInputSchemaInput) (req *request.Request, output *DiscoverInputSchemaOutput) { - op := &request.Operation{ - Name: opDiscoverInputSchema, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DiscoverInputSchemaInput{} - } - - output = &DiscoverInputSchemaOutput{} - req = c.newRequest(op, input, output) - return -} - -// DiscoverInputSchema API operation for Amazon Kinesis Analytics. -// -// Infers a schema by evaluating sample records on the specified streaming source -// (Amazon Kinesis stream or Amazon Kinesis Firehose delivery stream) or S3 -// object. In the response, the operation returns the inferred schema and also -// the sample records that the operation used to infer the schema. -// -// You can use the inferred schema when configuring a streaming source for your -// application. For conceptual information, see Configuring Application Input -// (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). -// Note that when you create an application using the Amazon Kinesis Analytics -// console, the console uses this operation to infer a schema and show it in -// the console user interface. -// -// This operation requires permissions to perform the kinesisanalytics:DiscoverInputSchema -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation DiscoverInputSchema for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// Specified input parameter value is invalid. -// -// * ErrCodeUnableToDetectSchemaException "UnableToDetectSchemaException" -// Data format is not valid. Amazon Kinesis Analytics is not able to detect -// schema for the given streaming source. -// -// * ErrCodeResourceProvisionedThroughputExceededException "ResourceProvisionedThroughputExceededException" -// Discovery failed to get a record from the streaming source because of the -// Amazon Kinesis Streams ProvisionedThroughputExceededException. For more information, -// see GetRecords (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetRecords.html) -// in the Amazon Kinesis Streams API Reference. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable. Back off and retry the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DiscoverInputSchema -func (c *KinesisAnalytics) DiscoverInputSchema(input *DiscoverInputSchemaInput) (*DiscoverInputSchemaOutput, error) { - req, out := c.DiscoverInputSchemaRequest(input) - return out, req.Send() -} - -// DiscoverInputSchemaWithContext is the same as DiscoverInputSchema with the addition of -// the ability to pass a context and additional request options. -// -// See DiscoverInputSchema for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) DiscoverInputSchemaWithContext(ctx aws.Context, input *DiscoverInputSchemaInput, opts ...request.Option) (*DiscoverInputSchemaOutput, error) { - req, out := c.DiscoverInputSchemaRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListApplications = "ListApplications" - -// ListApplicationsRequest generates a "aws/request.Request" representing the -// client's request for the ListApplications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListApplications for more information on using the ListApplications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListApplicationsRequest method. -// req, resp := client.ListApplicationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/ListApplications -func (c *KinesisAnalytics) ListApplicationsRequest(input *ListApplicationsInput) (req *request.Request, output *ListApplicationsOutput) { - op := &request.Operation{ - Name: opListApplications, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListApplicationsInput{} - } - - output = &ListApplicationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListApplications API operation for Amazon Kinesis Analytics. -// -// Returns a list of Amazon Kinesis Analytics applications in your account. -// For each application, the response includes the application name, Amazon -// Resource Name (ARN), and status. If the response returns the HasMoreApplications -// value as true, you can send another request by adding the ExclusiveStartApplicationName -// in the request body, and set the value of this to the last application name -// from the previous response. -// -// If you want detailed information about a specific application, use DescribeApplication. -// -// This operation requires permissions to perform the kinesisanalytics:ListApplications -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation ListApplications for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/ListApplications -func (c *KinesisAnalytics) ListApplications(input *ListApplicationsInput) (*ListApplicationsOutput, error) { - req, out := c.ListApplicationsRequest(input) - return out, req.Send() -} - -// ListApplicationsWithContext is the same as ListApplications with the addition of -// the ability to pass a context and additional request options. -// -// See ListApplications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) ListApplicationsWithContext(ctx aws.Context, input *ListApplicationsInput, opts ...request.Option) (*ListApplicationsOutput, error) { - req, out := c.ListApplicationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartApplication = "StartApplication" - -// StartApplicationRequest generates a "aws/request.Request" representing the -// client's request for the StartApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartApplication for more information on using the StartApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartApplicationRequest method. -// req, resp := client.StartApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/StartApplication -func (c *KinesisAnalytics) StartApplicationRequest(input *StartApplicationInput) (req *request.Request, output *StartApplicationOutput) { - op := &request.Operation{ - Name: opStartApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartApplicationInput{} - } - - output = &StartApplicationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartApplication API operation for Amazon Kinesis Analytics. -// -// Starts the specified Amazon Kinesis Analytics application. After creating -// an application, you must exclusively call this operation to start your application. -// -// After the application starts, it begins consuming the input data, processes -// it, and writes the output to the configured destination. -// -// The application status must be READY for you to start an application. You -// can get the application status in the console or using the DescribeApplication -// operation. -// -// After you start the application, you can stop the application from processing -// the input by calling the StopApplication operation. -// -// This operation requires permissions to perform the kinesisanalytics:StartApplication -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation StartApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Specified application can't be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// Application is not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// Specified input parameter value is invalid. -// -// * ErrCodeInvalidApplicationConfigurationException "InvalidApplicationConfigurationException" -// User-provided application configuration is not valid. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/StartApplication -func (c *KinesisAnalytics) StartApplication(input *StartApplicationInput) (*StartApplicationOutput, error) { - req, out := c.StartApplicationRequest(input) - return out, req.Send() -} - -// StartApplicationWithContext is the same as StartApplication with the addition of -// the ability to pass a context and additional request options. -// -// See StartApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) StartApplicationWithContext(ctx aws.Context, input *StartApplicationInput, opts ...request.Option) (*StartApplicationOutput, error) { - req, out := c.StartApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopApplication = "StopApplication" - -// StopApplicationRequest generates a "aws/request.Request" representing the -// client's request for the StopApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopApplication for more information on using the StopApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopApplicationRequest method. -// req, resp := client.StopApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/StopApplication -func (c *KinesisAnalytics) StopApplicationRequest(input *StopApplicationInput) (req *request.Request, output *StopApplicationOutput) { - op := &request.Operation{ - Name: opStopApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopApplicationInput{} - } - - output = &StopApplicationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopApplication API operation for Amazon Kinesis Analytics. -// -// Stops the application from processing input data. You can stop an application -// only if it is in the running state. You can use the DescribeApplication operation -// to find the application state. After the application is stopped, Amazon Kinesis -// Analytics stops reading data from the input, the application stops processing -// data, and there is no output written to the destination. -// -// This operation requires permissions to perform the kinesisanalytics:StopApplication -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation StopApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Specified application can't be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// Application is not available for this operation. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/StopApplication -func (c *KinesisAnalytics) StopApplication(input *StopApplicationInput) (*StopApplicationOutput, error) { - req, out := c.StopApplicationRequest(input) - return out, req.Send() -} - -// StopApplicationWithContext is the same as StopApplication with the addition of -// the ability to pass a context and additional request options. -// -// See StopApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) StopApplicationWithContext(ctx aws.Context, input *StopApplicationInput, opts ...request.Option) (*StopApplicationOutput, error) { - req, out := c.StopApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApplication = "UpdateApplication" - -// UpdateApplicationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApplication for more information on using the UpdateApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApplicationRequest method. -// req, resp := client.UpdateApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/UpdateApplication -func (c *KinesisAnalytics) UpdateApplicationRequest(input *UpdateApplicationInput) (req *request.Request, output *UpdateApplicationOutput) { - op := &request.Operation{ - Name: opUpdateApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateApplicationInput{} - } - - output = &UpdateApplicationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateApplication API operation for Amazon Kinesis Analytics. -// -// Updates an existing Amazon Kinesis Analytics application. Using this API, -// you can update application code, input configuration, and output configuration. -// -// Note that Amazon Kinesis Analytics updates the CurrentApplicationVersionId -// each time you update your application. -// -// This operation requires permission for the kinesisanalytics:UpdateApplication -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Kinesis Analytics's -// API operation UpdateApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCodeValidationException "CodeValidationException" -// User-provided application code (query) is invalid. This can be a simple syntax -// error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Specified application can't be found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// Application is not available for this operation. -// -// * ErrCodeInvalidArgumentException "InvalidArgumentException" -// Specified input parameter value is invalid. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Exception thrown as a result of concurrent modification to an application. -// For example, two individuals attempting to edit the same application at the -// same time. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/UpdateApplication -func (c *KinesisAnalytics) UpdateApplication(input *UpdateApplicationInput) (*UpdateApplicationOutput, error) { - req, out := c.UpdateApplicationRequest(input) - return out, req.Send() -} - -// UpdateApplicationWithContext is the same as UpdateApplication with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KinesisAnalytics) UpdateApplicationWithContext(ctx aws.Context, input *UpdateApplicationInput, opts ...request.Option) (*UpdateApplicationOutput, error) { - req, out := c.UpdateApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AddApplicationCloudWatchLoggingOptionInput struct { - _ struct{} `type:"structure"` - - // The Kinesis Analytics application name. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Provides the CloudWatch log stream Amazon Resource Name (ARN) and the IAM - // role ARN. Note: To write application messages to CloudWatch, the IAM role - // that is used must have the PutLogEvents policy action enabled. - // - // CloudWatchLoggingOption is a required field - CloudWatchLoggingOption *CloudWatchLoggingOption `type:"structure" required:"true"` - - // The version ID of the Kinesis Analytics application. - // - // CurrentApplicationVersionId is a required field - CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` -} - -// String returns the string representation -func (s AddApplicationCloudWatchLoggingOptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddApplicationCloudWatchLoggingOptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddApplicationCloudWatchLoggingOptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddApplicationCloudWatchLoggingOptionInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.CloudWatchLoggingOption == nil { - invalidParams.Add(request.NewErrParamRequired("CloudWatchLoggingOption")) - } - if s.CurrentApplicationVersionId == nil { - invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) - } - if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { - invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) - } - if s.CloudWatchLoggingOption != nil { - if err := s.CloudWatchLoggingOption.Validate(); err != nil { - invalidParams.AddNested("CloudWatchLoggingOption", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *AddApplicationCloudWatchLoggingOptionInput) SetApplicationName(v string) *AddApplicationCloudWatchLoggingOptionInput { - s.ApplicationName = &v - return s -} - -// SetCloudWatchLoggingOption sets the CloudWatchLoggingOption field's value. -func (s *AddApplicationCloudWatchLoggingOptionInput) SetCloudWatchLoggingOption(v *CloudWatchLoggingOption) *AddApplicationCloudWatchLoggingOptionInput { - s.CloudWatchLoggingOption = v - return s -} - -// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. -func (s *AddApplicationCloudWatchLoggingOptionInput) SetCurrentApplicationVersionId(v int64) *AddApplicationCloudWatchLoggingOptionInput { - s.CurrentApplicationVersionId = &v - return s -} - -type AddApplicationCloudWatchLoggingOptionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddApplicationCloudWatchLoggingOptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddApplicationCloudWatchLoggingOptionOutput) GoString() string { - return s.String() -} - -type AddApplicationInputInput struct { - _ struct{} `type:"structure"` - - // Name of your existing Amazon Kinesis Analytics application to which you want - // to add the streaming source. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Current version of your Amazon Kinesis Analytics application. You can use - // the DescribeApplication operation to find the current application version. - // - // CurrentApplicationVersionId is a required field - CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` - - // The Input to add. - // - // Input is a required field - Input *Input `type:"structure" required:"true"` -} - -// String returns the string representation -func (s AddApplicationInputInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddApplicationInputInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddApplicationInputInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddApplicationInputInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.CurrentApplicationVersionId == nil { - invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) - } - if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { - invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) - } - if s.Input == nil { - invalidParams.Add(request.NewErrParamRequired("Input")) - } - if s.Input != nil { - if err := s.Input.Validate(); err != nil { - invalidParams.AddNested("Input", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *AddApplicationInputInput) SetApplicationName(v string) *AddApplicationInputInput { - s.ApplicationName = &v - return s -} - -// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. -func (s *AddApplicationInputInput) SetCurrentApplicationVersionId(v int64) *AddApplicationInputInput { - s.CurrentApplicationVersionId = &v - return s -} - -// SetInput sets the Input field's value. -func (s *AddApplicationInputInput) SetInput(v *Input) *AddApplicationInputInput { - s.Input = v - return s -} - -type AddApplicationInputOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddApplicationInputOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddApplicationInputOutput) GoString() string { - return s.String() -} - -type AddApplicationInputProcessingConfigurationInput struct { - _ struct{} `type:"structure"` - - // Name of the application to which you want to add the input processing configuration. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Version of the application to which you want to add the input processing - // configuration. You can use the DescribeApplication operation to get the current - // application version. If the version specified is not the current version, - // the ConcurrentModificationException is returned. - // - // CurrentApplicationVersionId is a required field - CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` - - // The ID of the input configuration to add the input processing configuration - // to. You can get a list of the input IDs for an application using the DescribeApplication - // operation. - // - // InputId is a required field - InputId *string `min:"1" type:"string" required:"true"` - - // The InputProcessingConfiguration to add to the application. - // - // InputProcessingConfiguration is a required field - InputProcessingConfiguration *InputProcessingConfiguration `type:"structure" required:"true"` -} - -// String returns the string representation -func (s AddApplicationInputProcessingConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddApplicationInputProcessingConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddApplicationInputProcessingConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddApplicationInputProcessingConfigurationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.CurrentApplicationVersionId == nil { - invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) - } - if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { - invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) - } - if s.InputId == nil { - invalidParams.Add(request.NewErrParamRequired("InputId")) - } - if s.InputId != nil && len(*s.InputId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputId", 1)) - } - if s.InputProcessingConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("InputProcessingConfiguration")) - } - if s.InputProcessingConfiguration != nil { - if err := s.InputProcessingConfiguration.Validate(); err != nil { - invalidParams.AddNested("InputProcessingConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *AddApplicationInputProcessingConfigurationInput) SetApplicationName(v string) *AddApplicationInputProcessingConfigurationInput { - s.ApplicationName = &v - return s -} - -// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. -func (s *AddApplicationInputProcessingConfigurationInput) SetCurrentApplicationVersionId(v int64) *AddApplicationInputProcessingConfigurationInput { - s.CurrentApplicationVersionId = &v - return s -} - -// SetInputId sets the InputId field's value. -func (s *AddApplicationInputProcessingConfigurationInput) SetInputId(v string) *AddApplicationInputProcessingConfigurationInput { - s.InputId = &v - return s -} - -// SetInputProcessingConfiguration sets the InputProcessingConfiguration field's value. -func (s *AddApplicationInputProcessingConfigurationInput) SetInputProcessingConfiguration(v *InputProcessingConfiguration) *AddApplicationInputProcessingConfigurationInput { - s.InputProcessingConfiguration = v - return s -} - -type AddApplicationInputProcessingConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddApplicationInputProcessingConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddApplicationInputProcessingConfigurationOutput) GoString() string { - return s.String() -} - -type AddApplicationOutputInput struct { - _ struct{} `type:"structure"` - - // Name of the application to which you want to add the output configuration. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Version of the application to which you want to add the output configuration. - // You can use the DescribeApplication operation to get the current application - // version. If the version specified is not the current version, the ConcurrentModificationException - // is returned. - // - // CurrentApplicationVersionId is a required field - CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` - - // An array of objects, each describing one output configuration. In the output - // configuration, you specify the name of an in-application stream, a destination - // (that is, an Amazon Kinesis stream, an Amazon Kinesis Firehose delivery stream, - // or an AWS Lambda function), and record the formation to use when writing - // to the destination. - // - // Output is a required field - Output *Output `type:"structure" required:"true"` -} - -// String returns the string representation -func (s AddApplicationOutputInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddApplicationOutputInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddApplicationOutputInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddApplicationOutputInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.CurrentApplicationVersionId == nil { - invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) - } - if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { - invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) - } - if s.Output == nil { - invalidParams.Add(request.NewErrParamRequired("Output")) - } - if s.Output != nil { - if err := s.Output.Validate(); err != nil { - invalidParams.AddNested("Output", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *AddApplicationOutputInput) SetApplicationName(v string) *AddApplicationOutputInput { - s.ApplicationName = &v - return s -} - -// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. -func (s *AddApplicationOutputInput) SetCurrentApplicationVersionId(v int64) *AddApplicationOutputInput { - s.CurrentApplicationVersionId = &v - return s -} - -// SetOutput sets the Output field's value. -func (s *AddApplicationOutputInput) SetOutput(v *Output) *AddApplicationOutputInput { - s.Output = v - return s -} - -type AddApplicationOutputOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddApplicationOutputOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddApplicationOutputOutput) GoString() string { - return s.String() -} - -type AddApplicationReferenceDataSourceInput struct { - _ struct{} `type:"structure"` - - // Name of an existing application. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Version of the application for which you are adding the reference data source. - // You can use the DescribeApplication operation to get the current application - // version. If the version specified is not the current version, the ConcurrentModificationException - // is returned. - // - // CurrentApplicationVersionId is a required field - CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` - - // The reference data source can be an object in your Amazon S3 bucket. Amazon - // Kinesis Analytics reads the object and copies the data into the in-application - // table that is created. You provide an S3 bucket, object key name, and the - // resulting in-application table that is created. You must also provide an - // IAM role with the necessary permissions that Amazon Kinesis Analytics can - // assume to read the object from your S3 bucket on your behalf. - // - // ReferenceDataSource is a required field - ReferenceDataSource *ReferenceDataSource `type:"structure" required:"true"` -} - -// String returns the string representation -func (s AddApplicationReferenceDataSourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddApplicationReferenceDataSourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddApplicationReferenceDataSourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddApplicationReferenceDataSourceInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.CurrentApplicationVersionId == nil { - invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) - } - if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { - invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) - } - if s.ReferenceDataSource == nil { - invalidParams.Add(request.NewErrParamRequired("ReferenceDataSource")) - } - if s.ReferenceDataSource != nil { - if err := s.ReferenceDataSource.Validate(); err != nil { - invalidParams.AddNested("ReferenceDataSource", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *AddApplicationReferenceDataSourceInput) SetApplicationName(v string) *AddApplicationReferenceDataSourceInput { - s.ApplicationName = &v - return s -} - -// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. -func (s *AddApplicationReferenceDataSourceInput) SetCurrentApplicationVersionId(v int64) *AddApplicationReferenceDataSourceInput { - s.CurrentApplicationVersionId = &v - return s -} - -// SetReferenceDataSource sets the ReferenceDataSource field's value. -func (s *AddApplicationReferenceDataSourceInput) SetReferenceDataSource(v *ReferenceDataSource) *AddApplicationReferenceDataSourceInput { - s.ReferenceDataSource = v - return s -} - -type AddApplicationReferenceDataSourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddApplicationReferenceDataSourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddApplicationReferenceDataSourceOutput) GoString() string { - return s.String() -} - -// Provides a description of the application, including the application Amazon -// Resource Name (ARN), status, latest version, and input and output configuration. -type ApplicationDetail struct { - _ struct{} `type:"structure"` - - // ARN of the application. - // - // ApplicationARN is a required field - ApplicationARN *string `min:"1" type:"string" required:"true"` - - // Returns the application code that you provided to perform data analysis on - // any of the in-application streams in your application. - ApplicationCode *string `type:"string"` - - // Description of the application. - ApplicationDescription *string `type:"string"` - - // Name of the application. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Status of the application. - // - // ApplicationStatus is a required field - ApplicationStatus *string `type:"string" required:"true" enum:"ApplicationStatus"` - - // Provides the current application version. - // - // ApplicationVersionId is a required field - ApplicationVersionId *int64 `min:"1" type:"long" required:"true"` - - // Describes the CloudWatch log streams that are configured to receive application - // messages. For more information about using CloudWatch log streams with Amazon - // Kinesis Analytics applications, see Working with Amazon CloudWatch Logs (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/cloudwatch-logs.html). - CloudWatchLoggingOptionDescriptions []*CloudWatchLoggingOptionDescription `type:"list"` - - // Time stamp when the application version was created. - CreateTimestamp *time.Time `type:"timestamp"` - - // Describes the application input configuration. For more information, see - // Configuring Application Input (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). - InputDescriptions []*InputDescription `type:"list"` - - // Time stamp when the application was last updated. - LastUpdateTimestamp *time.Time `type:"timestamp"` - - // Describes the application output configuration. For more information, see - // Configuring Application Output (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html). - OutputDescriptions []*OutputDescription `type:"list"` - - // Describes reference data sources configured for the application. For more - // information, see Configuring Application Input (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). - ReferenceDataSourceDescriptions []*ReferenceDataSourceDescription `type:"list"` -} - -// String returns the string representation -func (s ApplicationDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationDetail) GoString() string { - return s.String() -} - -// SetApplicationARN sets the ApplicationARN field's value. -func (s *ApplicationDetail) SetApplicationARN(v string) *ApplicationDetail { - s.ApplicationARN = &v - return s -} - -// SetApplicationCode sets the ApplicationCode field's value. -func (s *ApplicationDetail) SetApplicationCode(v string) *ApplicationDetail { - s.ApplicationCode = &v - return s -} - -// SetApplicationDescription sets the ApplicationDescription field's value. -func (s *ApplicationDetail) SetApplicationDescription(v string) *ApplicationDetail { - s.ApplicationDescription = &v - return s -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *ApplicationDetail) SetApplicationName(v string) *ApplicationDetail { - s.ApplicationName = &v - return s -} - -// SetApplicationStatus sets the ApplicationStatus field's value. -func (s *ApplicationDetail) SetApplicationStatus(v string) *ApplicationDetail { - s.ApplicationStatus = &v - return s -} - -// SetApplicationVersionId sets the ApplicationVersionId field's value. -func (s *ApplicationDetail) SetApplicationVersionId(v int64) *ApplicationDetail { - s.ApplicationVersionId = &v - return s -} - -// SetCloudWatchLoggingOptionDescriptions sets the CloudWatchLoggingOptionDescriptions field's value. -func (s *ApplicationDetail) SetCloudWatchLoggingOptionDescriptions(v []*CloudWatchLoggingOptionDescription) *ApplicationDetail { - s.CloudWatchLoggingOptionDescriptions = v - return s -} - -// SetCreateTimestamp sets the CreateTimestamp field's value. -func (s *ApplicationDetail) SetCreateTimestamp(v time.Time) *ApplicationDetail { - s.CreateTimestamp = &v - return s -} - -// SetInputDescriptions sets the InputDescriptions field's value. -func (s *ApplicationDetail) SetInputDescriptions(v []*InputDescription) *ApplicationDetail { - s.InputDescriptions = v - return s -} - -// SetLastUpdateTimestamp sets the LastUpdateTimestamp field's value. -func (s *ApplicationDetail) SetLastUpdateTimestamp(v time.Time) *ApplicationDetail { - s.LastUpdateTimestamp = &v - return s -} - -// SetOutputDescriptions sets the OutputDescriptions field's value. -func (s *ApplicationDetail) SetOutputDescriptions(v []*OutputDescription) *ApplicationDetail { - s.OutputDescriptions = v - return s -} - -// SetReferenceDataSourceDescriptions sets the ReferenceDataSourceDescriptions field's value. -func (s *ApplicationDetail) SetReferenceDataSourceDescriptions(v []*ReferenceDataSourceDescription) *ApplicationDetail { - s.ReferenceDataSourceDescriptions = v - return s -} - -// Provides application summary information, including the application Amazon -// Resource Name (ARN), name, and status. -type ApplicationSummary struct { - _ struct{} `type:"structure"` - - // ARN of the application. - // - // ApplicationARN is a required field - ApplicationARN *string `min:"1" type:"string" required:"true"` - - // Name of the application. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Status of the application. - // - // ApplicationStatus is a required field - ApplicationStatus *string `type:"string" required:"true" enum:"ApplicationStatus"` -} - -// String returns the string representation -func (s ApplicationSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationSummary) GoString() string { - return s.String() -} - -// SetApplicationARN sets the ApplicationARN field's value. -func (s *ApplicationSummary) SetApplicationARN(v string) *ApplicationSummary { - s.ApplicationARN = &v - return s -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *ApplicationSummary) SetApplicationName(v string) *ApplicationSummary { - s.ApplicationName = &v - return s -} - -// SetApplicationStatus sets the ApplicationStatus field's value. -func (s *ApplicationSummary) SetApplicationStatus(v string) *ApplicationSummary { - s.ApplicationStatus = &v - return s -} - -// Describes updates to apply to an existing Amazon Kinesis Analytics application. -type ApplicationUpdate struct { - _ struct{} `type:"structure"` - - // Describes application code updates. - ApplicationCodeUpdate *string `type:"string"` - - // Describes application CloudWatch logging option updates. - CloudWatchLoggingOptionUpdates []*CloudWatchLoggingOptionUpdate `type:"list"` - - // Describes application input configuration updates. - InputUpdates []*InputUpdate `type:"list"` - - // Describes application output configuration updates. - OutputUpdates []*OutputUpdate `type:"list"` - - // Describes application reference data source updates. - ReferenceDataSourceUpdates []*ReferenceDataSourceUpdate `type:"list"` -} - -// String returns the string representation -func (s ApplicationUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ApplicationUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ApplicationUpdate"} - if s.CloudWatchLoggingOptionUpdates != nil { - for i, v := range s.CloudWatchLoggingOptionUpdates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CloudWatchLoggingOptionUpdates", i), err.(request.ErrInvalidParams)) - } - } - } - if s.InputUpdates != nil { - for i, v := range s.InputUpdates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputUpdates", i), err.(request.ErrInvalidParams)) - } - } - } - if s.OutputUpdates != nil { - for i, v := range s.OutputUpdates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OutputUpdates", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ReferenceDataSourceUpdates != nil { - for i, v := range s.ReferenceDataSourceUpdates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReferenceDataSourceUpdates", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationCodeUpdate sets the ApplicationCodeUpdate field's value. -func (s *ApplicationUpdate) SetApplicationCodeUpdate(v string) *ApplicationUpdate { - s.ApplicationCodeUpdate = &v - return s -} - -// SetCloudWatchLoggingOptionUpdates sets the CloudWatchLoggingOptionUpdates field's value. -func (s *ApplicationUpdate) SetCloudWatchLoggingOptionUpdates(v []*CloudWatchLoggingOptionUpdate) *ApplicationUpdate { - s.CloudWatchLoggingOptionUpdates = v - return s -} - -// SetInputUpdates sets the InputUpdates field's value. -func (s *ApplicationUpdate) SetInputUpdates(v []*InputUpdate) *ApplicationUpdate { - s.InputUpdates = v - return s -} - -// SetOutputUpdates sets the OutputUpdates field's value. -func (s *ApplicationUpdate) SetOutputUpdates(v []*OutputUpdate) *ApplicationUpdate { - s.OutputUpdates = v - return s -} - -// SetReferenceDataSourceUpdates sets the ReferenceDataSourceUpdates field's value. -func (s *ApplicationUpdate) SetReferenceDataSourceUpdates(v []*ReferenceDataSourceUpdate) *ApplicationUpdate { - s.ReferenceDataSourceUpdates = v - return s -} - -// Provides additional mapping information when the record format uses delimiters, -// such as CSV. For example, the following sample records use CSV format, where -// the records use the '\n' as the row delimiter and a comma (",") as the column -// delimiter: -// -// "name1", "address1" -// -// "name2", "address2" -type CSVMappingParameters struct { - _ struct{} `type:"structure"` - - // Column delimiter. For example, in a CSV format, a comma (",") is the typical - // column delimiter. - // - // RecordColumnDelimiter is a required field - RecordColumnDelimiter *string `min:"1" type:"string" required:"true"` - - // Row delimiter. For example, in a CSV format, '\n' is the typical row delimiter. - // - // RecordRowDelimiter is a required field - RecordRowDelimiter *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CSVMappingParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CSVMappingParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CSVMappingParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CSVMappingParameters"} - if s.RecordColumnDelimiter == nil { - invalidParams.Add(request.NewErrParamRequired("RecordColumnDelimiter")) - } - if s.RecordColumnDelimiter != nil && len(*s.RecordColumnDelimiter) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RecordColumnDelimiter", 1)) - } - if s.RecordRowDelimiter == nil { - invalidParams.Add(request.NewErrParamRequired("RecordRowDelimiter")) - } - if s.RecordRowDelimiter != nil && len(*s.RecordRowDelimiter) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RecordRowDelimiter", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRecordColumnDelimiter sets the RecordColumnDelimiter field's value. -func (s *CSVMappingParameters) SetRecordColumnDelimiter(v string) *CSVMappingParameters { - s.RecordColumnDelimiter = &v - return s -} - -// SetRecordRowDelimiter sets the RecordRowDelimiter field's value. -func (s *CSVMappingParameters) SetRecordRowDelimiter(v string) *CSVMappingParameters { - s.RecordRowDelimiter = &v - return s -} - -// Provides a description of CloudWatch logging options, including the log stream -// Amazon Resource Name (ARN) and the role ARN. -type CloudWatchLoggingOption struct { - _ struct{} `type:"structure"` - - // ARN of the CloudWatch log to receive application messages. - // - // LogStreamARN is a required field - LogStreamARN *string `min:"1" type:"string" required:"true"` - - // IAM ARN of the role to use to send application messages. Note: To write application - // messages to CloudWatch, the IAM role that is used must have the PutLogEvents - // policy action enabled. - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CloudWatchLoggingOption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudWatchLoggingOption) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CloudWatchLoggingOption) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloudWatchLoggingOption"} - if s.LogStreamARN == nil { - invalidParams.Add(request.NewErrParamRequired("LogStreamARN")) - } - if s.LogStreamARN != nil && len(*s.LogStreamARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamARN", 1)) - } - if s.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogStreamARN sets the LogStreamARN field's value. -func (s *CloudWatchLoggingOption) SetLogStreamARN(v string) *CloudWatchLoggingOption { - s.LogStreamARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *CloudWatchLoggingOption) SetRoleARN(v string) *CloudWatchLoggingOption { - s.RoleARN = &v - return s -} - -// Description of the CloudWatch logging option. -type CloudWatchLoggingOptionDescription struct { - _ struct{} `type:"structure"` - - // ID of the CloudWatch logging option description. - CloudWatchLoggingOptionId *string `min:"1" type:"string"` - - // ARN of the CloudWatch log to receive application messages. - // - // LogStreamARN is a required field - LogStreamARN *string `min:"1" type:"string" required:"true"` - - // IAM ARN of the role to use to send application messages. Note: To write application - // messages to CloudWatch, the IAM role used must have the PutLogEvents policy - // action enabled. - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CloudWatchLoggingOptionDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudWatchLoggingOptionDescription) GoString() string { - return s.String() -} - -// SetCloudWatchLoggingOptionId sets the CloudWatchLoggingOptionId field's value. -func (s *CloudWatchLoggingOptionDescription) SetCloudWatchLoggingOptionId(v string) *CloudWatchLoggingOptionDescription { - s.CloudWatchLoggingOptionId = &v - return s -} - -// SetLogStreamARN sets the LogStreamARN field's value. -func (s *CloudWatchLoggingOptionDescription) SetLogStreamARN(v string) *CloudWatchLoggingOptionDescription { - s.LogStreamARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *CloudWatchLoggingOptionDescription) SetRoleARN(v string) *CloudWatchLoggingOptionDescription { - s.RoleARN = &v - return s -} - -// Describes CloudWatch logging option updates. -type CloudWatchLoggingOptionUpdate struct { - _ struct{} `type:"structure"` - - // ID of the CloudWatch logging option to update - // - // CloudWatchLoggingOptionId is a required field - CloudWatchLoggingOptionId *string `min:"1" type:"string" required:"true"` - - // ARN of the CloudWatch log to receive application messages. - LogStreamARNUpdate *string `min:"1" type:"string"` - - // IAM ARN of the role to use to send application messages. Note: To write application - // messages to CloudWatch, the IAM role used must have the PutLogEvents policy - // action enabled. - RoleARNUpdate *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CloudWatchLoggingOptionUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudWatchLoggingOptionUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CloudWatchLoggingOptionUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloudWatchLoggingOptionUpdate"} - if s.CloudWatchLoggingOptionId == nil { - invalidParams.Add(request.NewErrParamRequired("CloudWatchLoggingOptionId")) - } - if s.CloudWatchLoggingOptionId != nil && len(*s.CloudWatchLoggingOptionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CloudWatchLoggingOptionId", 1)) - } - if s.LogStreamARNUpdate != nil && len(*s.LogStreamARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamARNUpdate", 1)) - } - if s.RoleARNUpdate != nil && len(*s.RoleARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARNUpdate", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchLoggingOptionId sets the CloudWatchLoggingOptionId field's value. -func (s *CloudWatchLoggingOptionUpdate) SetCloudWatchLoggingOptionId(v string) *CloudWatchLoggingOptionUpdate { - s.CloudWatchLoggingOptionId = &v - return s -} - -// SetLogStreamARNUpdate sets the LogStreamARNUpdate field's value. -func (s *CloudWatchLoggingOptionUpdate) SetLogStreamARNUpdate(v string) *CloudWatchLoggingOptionUpdate { - s.LogStreamARNUpdate = &v - return s -} - -// SetRoleARNUpdate sets the RoleARNUpdate field's value. -func (s *CloudWatchLoggingOptionUpdate) SetRoleARNUpdate(v string) *CloudWatchLoggingOptionUpdate { - s.RoleARNUpdate = &v - return s -} - -// TBD -type CreateApplicationInput struct { - _ struct{} `type:"structure"` - - // One or more SQL statements that read input data, transform it, and generate - // output. For example, you can write a SQL statement that reads data from one - // in-application stream, generates a running average of the number of advertisement - // clicks by vendor, and insert resulting rows in another in-application stream - // using pumps. For more information about the typical pattern, see Application - // Code (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-app-code.html). - // - // You can provide such series of SQL statements, where output of one statement - // can be used as the input for the next statement. You store intermediate results - // by creating in-application streams and pumps. - // - // Note that the application code must create the streams with names specified - // in the Outputs. For example, if your Outputs defines output streams named - // ExampleOutputStream1 and ExampleOutputStream2, then your application code - // must create these streams. - ApplicationCode *string `type:"string"` - - // Summary description of the application. - ApplicationDescription *string `type:"string"` - - // Name of your Amazon Kinesis Analytics application (for example, sample-app). - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Use this parameter to configure a CloudWatch log stream to monitor application - // configuration errors. For more information, see Working with Amazon CloudWatch - // Logs (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/cloudwatch-logs.html). - CloudWatchLoggingOptions []*CloudWatchLoggingOption `type:"list"` - - // Use this parameter to configure the application input. - // - // You can configure your application to receive input from a single streaming - // source. In this configuration, you map this streaming source to an in-application - // stream that is created. Your application code can then query the in-application - // stream like a table (you can think of it as a constantly updating table). - // - // For the streaming source, you provide its Amazon Resource Name (ARN) and - // format of data on the stream (for example, JSON, CSV, etc.). You also must - // provide an IAM role that Amazon Kinesis Analytics can assume to read this - // stream on your behalf. - // - // To create the in-application stream, you need to specify a schema to transform - // your data into a schematized version used in SQL. In the schema, you provide - // the necessary mapping of the data elements in the streaming source to record - // columns in the in-app stream. - Inputs []*Input `type:"list"` - - // You can configure application output to write data from any of the in-application - // streams to up to three destinations. - // - // These destinations can be Amazon Kinesis streams, Amazon Kinesis Firehose - // delivery streams, AWS Lambda destinations, or any combination of the three. - // - // In the configuration, you specify the in-application stream name, the destination - // stream or Lambda function Amazon Resource Name (ARN), and the format to use - // when writing data. You must also provide an IAM role that Amazon Kinesis - // Analytics can assume to write to the destination stream or Lambda function - // on your behalf. - // - // In the output configuration, you also provide the output stream or Lambda - // function ARN. For stream destinations, you provide the format of data in - // the stream (for example, JSON, CSV). You also must provide an IAM role that - // Amazon Kinesis Analytics can assume to write to the stream or Lambda function - // on your behalf. - Outputs []*Output `type:"list"` -} - -// String returns the string representation -func (s CreateApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateApplicationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.CloudWatchLoggingOptions != nil { - for i, v := range s.CloudWatchLoggingOptions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CloudWatchLoggingOptions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Inputs != nil { - for i, v := range s.Inputs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Inputs", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Outputs != nil { - for i, v := range s.Outputs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Outputs", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationCode sets the ApplicationCode field's value. -func (s *CreateApplicationInput) SetApplicationCode(v string) *CreateApplicationInput { - s.ApplicationCode = &v - return s -} - -// SetApplicationDescription sets the ApplicationDescription field's value. -func (s *CreateApplicationInput) SetApplicationDescription(v string) *CreateApplicationInput { - s.ApplicationDescription = &v - return s -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *CreateApplicationInput) SetApplicationName(v string) *CreateApplicationInput { - s.ApplicationName = &v - return s -} - -// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. -func (s *CreateApplicationInput) SetCloudWatchLoggingOptions(v []*CloudWatchLoggingOption) *CreateApplicationInput { - s.CloudWatchLoggingOptions = v - return s -} - -// SetInputs sets the Inputs field's value. -func (s *CreateApplicationInput) SetInputs(v []*Input) *CreateApplicationInput { - s.Inputs = v - return s -} - -// SetOutputs sets the Outputs field's value. -func (s *CreateApplicationInput) SetOutputs(v []*Output) *CreateApplicationInput { - s.Outputs = v - return s -} - -// TBD -type CreateApplicationOutput struct { - _ struct{} `type:"structure"` - - // In response to your CreateApplication request, Amazon Kinesis Analytics returns - // a response with a summary of the application it created, including the application - // Amazon Resource Name (ARN), name, and status. - // - // ApplicationSummary is a required field - ApplicationSummary *ApplicationSummary `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApplicationOutput) GoString() string { - return s.String() -} - -// SetApplicationSummary sets the ApplicationSummary field's value. -func (s *CreateApplicationOutput) SetApplicationSummary(v *ApplicationSummary) *CreateApplicationOutput { - s.ApplicationSummary = v - return s -} - -type DeleteApplicationCloudWatchLoggingOptionInput struct { - _ struct{} `type:"structure"` - - // The Kinesis Analytics application name. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // The CloudWatchLoggingOptionId of the CloudWatch logging option to delete. - // You can get the CloudWatchLoggingOptionId by using the DescribeApplication - // operation. - // - // CloudWatchLoggingOptionId is a required field - CloudWatchLoggingOptionId *string `min:"1" type:"string" required:"true"` - - // The version ID of the Kinesis Analytics application. - // - // CurrentApplicationVersionId is a required field - CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` -} - -// String returns the string representation -func (s DeleteApplicationCloudWatchLoggingOptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationCloudWatchLoggingOptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApplicationCloudWatchLoggingOptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationCloudWatchLoggingOptionInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.CloudWatchLoggingOptionId == nil { - invalidParams.Add(request.NewErrParamRequired("CloudWatchLoggingOptionId")) - } - if s.CloudWatchLoggingOptionId != nil && len(*s.CloudWatchLoggingOptionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CloudWatchLoggingOptionId", 1)) - } - if s.CurrentApplicationVersionId == nil { - invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) - } - if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { - invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DeleteApplicationCloudWatchLoggingOptionInput) SetApplicationName(v string) *DeleteApplicationCloudWatchLoggingOptionInput { - s.ApplicationName = &v - return s -} - -// SetCloudWatchLoggingOptionId sets the CloudWatchLoggingOptionId field's value. -func (s *DeleteApplicationCloudWatchLoggingOptionInput) SetCloudWatchLoggingOptionId(v string) *DeleteApplicationCloudWatchLoggingOptionInput { - s.CloudWatchLoggingOptionId = &v - return s -} - -// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. -func (s *DeleteApplicationCloudWatchLoggingOptionInput) SetCurrentApplicationVersionId(v int64) *DeleteApplicationCloudWatchLoggingOptionInput { - s.CurrentApplicationVersionId = &v - return s -} - -type DeleteApplicationCloudWatchLoggingOptionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteApplicationCloudWatchLoggingOptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationCloudWatchLoggingOptionOutput) GoString() string { - return s.String() -} - -type DeleteApplicationInput struct { - _ struct{} `type:"structure"` - - // Name of the Amazon Kinesis Analytics application to delete. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // You can use the DescribeApplication operation to get this value. - // - // CreateTimestamp is a required field - CreateTimestamp *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s DeleteApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.CreateTimestamp == nil { - invalidParams.Add(request.NewErrParamRequired("CreateTimestamp")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DeleteApplicationInput) SetApplicationName(v string) *DeleteApplicationInput { - s.ApplicationName = &v - return s -} - -// SetCreateTimestamp sets the CreateTimestamp field's value. -func (s *DeleteApplicationInput) SetCreateTimestamp(v time.Time) *DeleteApplicationInput { - s.CreateTimestamp = &v - return s -} - -type DeleteApplicationInputProcessingConfigurationInput struct { - _ struct{} `type:"structure"` - - // The Kinesis Analytics application name. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // The version ID of the Kinesis Analytics application. - // - // CurrentApplicationVersionId is a required field - CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` - - // The ID of the input configuration from which to delete the input processing - // configuration. You can get a list of the input IDs for an application by - // using the DescribeApplication operation. - // - // InputId is a required field - InputId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteApplicationInputProcessingConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationInputProcessingConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApplicationInputProcessingConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationInputProcessingConfigurationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.CurrentApplicationVersionId == nil { - invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) - } - if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { - invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) - } - if s.InputId == nil { - invalidParams.Add(request.NewErrParamRequired("InputId")) - } - if s.InputId != nil && len(*s.InputId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DeleteApplicationInputProcessingConfigurationInput) SetApplicationName(v string) *DeleteApplicationInputProcessingConfigurationInput { - s.ApplicationName = &v - return s -} - -// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. -func (s *DeleteApplicationInputProcessingConfigurationInput) SetCurrentApplicationVersionId(v int64) *DeleteApplicationInputProcessingConfigurationInput { - s.CurrentApplicationVersionId = &v - return s -} - -// SetInputId sets the InputId field's value. -func (s *DeleteApplicationInputProcessingConfigurationInput) SetInputId(v string) *DeleteApplicationInputProcessingConfigurationInput { - s.InputId = &v - return s -} - -type DeleteApplicationInputProcessingConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteApplicationInputProcessingConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationInputProcessingConfigurationOutput) GoString() string { - return s.String() -} - -type DeleteApplicationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationOutput) GoString() string { - return s.String() -} - -type DeleteApplicationOutputInput struct { - _ struct{} `type:"structure"` - - // Amazon Kinesis Analytics application name. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Amazon Kinesis Analytics application version. You can use the DescribeApplication - // operation to get the current application version. If the version specified - // is not the current version, the ConcurrentModificationException is returned. - // - // CurrentApplicationVersionId is a required field - CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` - - // The ID of the configuration to delete. Each output configuration that is - // added to the application, either when the application is created or later - // using the AddApplicationOutput operation, has a unique ID. You need to provide - // the ID to uniquely identify the output configuration that you want to delete - // from the application configuration. You can use the DescribeApplication operation - // to get the specific OutputId. - // - // OutputId is a required field - OutputId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteApplicationOutputInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationOutputInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApplicationOutputInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationOutputInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.CurrentApplicationVersionId == nil { - invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) - } - if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { - invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) - } - if s.OutputId == nil { - invalidParams.Add(request.NewErrParamRequired("OutputId")) - } - if s.OutputId != nil && len(*s.OutputId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OutputId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DeleteApplicationOutputInput) SetApplicationName(v string) *DeleteApplicationOutputInput { - s.ApplicationName = &v - return s -} - -// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. -func (s *DeleteApplicationOutputInput) SetCurrentApplicationVersionId(v int64) *DeleteApplicationOutputInput { - s.CurrentApplicationVersionId = &v - return s -} - -// SetOutputId sets the OutputId field's value. -func (s *DeleteApplicationOutputInput) SetOutputId(v string) *DeleteApplicationOutputInput { - s.OutputId = &v - return s -} - -type DeleteApplicationOutputOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteApplicationOutputOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationOutputOutput) GoString() string { - return s.String() -} - -type DeleteApplicationReferenceDataSourceInput struct { - _ struct{} `type:"structure"` - - // Name of an existing application. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Version of the application. You can use the DescribeApplication operation - // to get the current application version. If the version specified is not the - // current version, the ConcurrentModificationException is returned. - // - // CurrentApplicationVersionId is a required field - CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` - - // ID of the reference data source. When you add a reference data source to - // your application using the AddApplicationReferenceDataSource, Amazon Kinesis - // Analytics assigns an ID. You can use the DescribeApplication operation to - // get the reference ID. - // - // ReferenceId is a required field - ReferenceId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteApplicationReferenceDataSourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationReferenceDataSourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApplicationReferenceDataSourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationReferenceDataSourceInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.CurrentApplicationVersionId == nil { - invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) - } - if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { - invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) - } - if s.ReferenceId == nil { - invalidParams.Add(request.NewErrParamRequired("ReferenceId")) - } - if s.ReferenceId != nil && len(*s.ReferenceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ReferenceId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DeleteApplicationReferenceDataSourceInput) SetApplicationName(v string) *DeleteApplicationReferenceDataSourceInput { - s.ApplicationName = &v - return s -} - -// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. -func (s *DeleteApplicationReferenceDataSourceInput) SetCurrentApplicationVersionId(v int64) *DeleteApplicationReferenceDataSourceInput { - s.CurrentApplicationVersionId = &v - return s -} - -// SetReferenceId sets the ReferenceId field's value. -func (s *DeleteApplicationReferenceDataSourceInput) SetReferenceId(v string) *DeleteApplicationReferenceDataSourceInput { - s.ReferenceId = &v - return s -} - -type DeleteApplicationReferenceDataSourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteApplicationReferenceDataSourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationReferenceDataSourceOutput) GoString() string { - return s.String() -} - -type DescribeApplicationInput struct { - _ struct{} `type:"structure"` - - // Name of the application. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeApplicationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *DescribeApplicationInput) SetApplicationName(v string) *DescribeApplicationInput { - s.ApplicationName = &v - return s -} - -type DescribeApplicationOutput struct { - _ struct{} `type:"structure"` - - // Provides a description of the application, such as the application Amazon - // Resource Name (ARN), status, latest version, and input and output configuration - // details. - // - // ApplicationDetail is a required field - ApplicationDetail *ApplicationDetail `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeApplicationOutput) GoString() string { - return s.String() -} - -// SetApplicationDetail sets the ApplicationDetail field's value. -func (s *DescribeApplicationOutput) SetApplicationDetail(v *ApplicationDetail) *DescribeApplicationOutput { - s.ApplicationDetail = v - return s -} - -// Describes the data format when records are written to the destination. For -// more information, see Configuring Application Output (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html). -type DestinationSchema struct { - _ struct{} `type:"structure"` - - // Specifies the format of the records on the output stream. - // - // RecordFormatType is a required field - RecordFormatType *string `type:"string" required:"true" enum:"RecordFormatType"` -} - -// String returns the string representation -func (s DestinationSchema) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DestinationSchema) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DestinationSchema) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DestinationSchema"} - if s.RecordFormatType == nil { - invalidParams.Add(request.NewErrParamRequired("RecordFormatType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRecordFormatType sets the RecordFormatType field's value. -func (s *DestinationSchema) SetRecordFormatType(v string) *DestinationSchema { - s.RecordFormatType = &v - return s -} - -type DiscoverInputSchemaInput struct { - _ struct{} `type:"structure"` - - // The InputProcessingConfiguration to use to preprocess the records before - // discovering the schema of the records. - InputProcessingConfiguration *InputProcessingConfiguration `type:"structure"` - - // Point at which you want Amazon Kinesis Analytics to start reading records - // from the specified streaming source discovery purposes. - InputStartingPositionConfiguration *InputStartingPositionConfiguration `type:"structure"` - - // Amazon Resource Name (ARN) of the streaming source. - ResourceARN *string `min:"1" type:"string"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the - // stream on your behalf. - RoleARN *string `min:"1" type:"string"` - - // Specify this parameter to discover a schema from data in an Amazon S3 object. - S3Configuration *S3Configuration `type:"structure"` -} - -// String returns the string representation -func (s DiscoverInputSchemaInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiscoverInputSchemaInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DiscoverInputSchemaInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DiscoverInputSchemaInput"} - if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - if s.InputProcessingConfiguration != nil { - if err := s.InputProcessingConfiguration.Validate(); err != nil { - invalidParams.AddNested("InputProcessingConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.S3Configuration != nil { - if err := s.S3Configuration.Validate(); err != nil { - invalidParams.AddNested("S3Configuration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputProcessingConfiguration sets the InputProcessingConfiguration field's value. -func (s *DiscoverInputSchemaInput) SetInputProcessingConfiguration(v *InputProcessingConfiguration) *DiscoverInputSchemaInput { - s.InputProcessingConfiguration = v - return s -} - -// SetInputStartingPositionConfiguration sets the InputStartingPositionConfiguration field's value. -func (s *DiscoverInputSchemaInput) SetInputStartingPositionConfiguration(v *InputStartingPositionConfiguration) *DiscoverInputSchemaInput { - s.InputStartingPositionConfiguration = v - return s -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *DiscoverInputSchemaInput) SetResourceARN(v string) *DiscoverInputSchemaInput { - s.ResourceARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *DiscoverInputSchemaInput) SetRoleARN(v string) *DiscoverInputSchemaInput { - s.RoleARN = &v - return s -} - -// SetS3Configuration sets the S3Configuration field's value. -func (s *DiscoverInputSchemaInput) SetS3Configuration(v *S3Configuration) *DiscoverInputSchemaInput { - s.S3Configuration = v - return s -} - -type DiscoverInputSchemaOutput struct { - _ struct{} `type:"structure"` - - // Schema inferred from the streaming source. It identifies the format of the - // data in the streaming source and how each data element maps to corresponding - // columns in the in-application stream that you can create. - InputSchema *SourceSchema `type:"structure"` - - // An array of elements, where each element corresponds to a row in a stream - // record (a stream record can have more than one row). - ParsedInputRecords [][]*string `type:"list"` - - // Stream data that was modified by the processor specified in the InputProcessingConfiguration - // parameter. - ProcessedInputRecords []*string `type:"list"` - - // Raw stream data that was sampled to infer the schema. - RawInputRecords []*string `type:"list"` -} - -// String returns the string representation -func (s DiscoverInputSchemaOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiscoverInputSchemaOutput) GoString() string { - return s.String() -} - -// SetInputSchema sets the InputSchema field's value. -func (s *DiscoverInputSchemaOutput) SetInputSchema(v *SourceSchema) *DiscoverInputSchemaOutput { - s.InputSchema = v - return s -} - -// SetParsedInputRecords sets the ParsedInputRecords field's value. -func (s *DiscoverInputSchemaOutput) SetParsedInputRecords(v [][]*string) *DiscoverInputSchemaOutput { - s.ParsedInputRecords = v - return s -} - -// SetProcessedInputRecords sets the ProcessedInputRecords field's value. -func (s *DiscoverInputSchemaOutput) SetProcessedInputRecords(v []*string) *DiscoverInputSchemaOutput { - s.ProcessedInputRecords = v - return s -} - -// SetRawInputRecords sets the RawInputRecords field's value. -func (s *DiscoverInputSchemaOutput) SetRawInputRecords(v []*string) *DiscoverInputSchemaOutput { - s.RawInputRecords = v - return s -} - -// When you configure the application input, you specify the streaming source, -// the in-application stream name that is created, and the mapping between the -// two. For more information, see Configuring Application Input (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). -type Input struct { - _ struct{} `type:"structure"` - - // Describes the number of in-application streams to create. - // - // Data from your source is routed to these in-application input streams. - // - // (see Configuring Application Input (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). - InputParallelism *InputParallelism `type:"structure"` - - // The InputProcessingConfiguration for the input. An input processor transforms - // records as they are received from the stream, before the application's SQL - // code executes. Currently, the only input processing configuration available - // is InputLambdaProcessor. - InputProcessingConfiguration *InputProcessingConfiguration `type:"structure"` - - // Describes the format of the data in the streaming source, and how each data - // element maps to corresponding columns in the in-application stream that is - // being created. - // - // Also used to describe the format of the reference data source. - // - // InputSchema is a required field - InputSchema *SourceSchema `type:"structure" required:"true"` - - // If the streaming source is an Amazon Kinesis Firehose delivery stream, identifies - // the delivery stream's ARN and an IAM role that enables Amazon Kinesis Analytics - // to access the stream on your behalf. - // - // Note: Either KinesisStreamsInput or KinesisFirehoseInput is required. - KinesisFirehoseInput *KinesisFirehoseInput `type:"structure"` - - // If the streaming source is an Amazon Kinesis stream, identifies the stream's - // Amazon Resource Name (ARN) and an IAM role that enables Amazon Kinesis Analytics - // to access the stream on your behalf. - // - // Note: Either KinesisStreamsInput or KinesisFirehoseInput is required. - KinesisStreamsInput *KinesisStreamsInput `type:"structure"` - - // Name prefix to use when creating an in-application stream. Suppose that you - // specify a prefix "MyInApplicationStream." Amazon Kinesis Analytics then creates - // one or more (as per the InputParallelism count you specified) in-application - // streams with names "MyInApplicationStream_001," "MyInApplicationStream_002," - // and so on. - // - // NamePrefix is a required field - NamePrefix *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Input) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Input) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Input) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Input"} - if s.InputSchema == nil { - invalidParams.Add(request.NewErrParamRequired("InputSchema")) - } - if s.NamePrefix == nil { - invalidParams.Add(request.NewErrParamRequired("NamePrefix")) - } - if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) - } - if s.InputParallelism != nil { - if err := s.InputParallelism.Validate(); err != nil { - invalidParams.AddNested("InputParallelism", err.(request.ErrInvalidParams)) - } - } - if s.InputProcessingConfiguration != nil { - if err := s.InputProcessingConfiguration.Validate(); err != nil { - invalidParams.AddNested("InputProcessingConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.InputSchema != nil { - if err := s.InputSchema.Validate(); err != nil { - invalidParams.AddNested("InputSchema", err.(request.ErrInvalidParams)) - } - } - if s.KinesisFirehoseInput != nil { - if err := s.KinesisFirehoseInput.Validate(); err != nil { - invalidParams.AddNested("KinesisFirehoseInput", err.(request.ErrInvalidParams)) - } - } - if s.KinesisStreamsInput != nil { - if err := s.KinesisStreamsInput.Validate(); err != nil { - invalidParams.AddNested("KinesisStreamsInput", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputParallelism sets the InputParallelism field's value. -func (s *Input) SetInputParallelism(v *InputParallelism) *Input { - s.InputParallelism = v - return s -} - -// SetInputProcessingConfiguration sets the InputProcessingConfiguration field's value. -func (s *Input) SetInputProcessingConfiguration(v *InputProcessingConfiguration) *Input { - s.InputProcessingConfiguration = v - return s -} - -// SetInputSchema sets the InputSchema field's value. -func (s *Input) SetInputSchema(v *SourceSchema) *Input { - s.InputSchema = v - return s -} - -// SetKinesisFirehoseInput sets the KinesisFirehoseInput field's value. -func (s *Input) SetKinesisFirehoseInput(v *KinesisFirehoseInput) *Input { - s.KinesisFirehoseInput = v - return s -} - -// SetKinesisStreamsInput sets the KinesisStreamsInput field's value. -func (s *Input) SetKinesisStreamsInput(v *KinesisStreamsInput) *Input { - s.KinesisStreamsInput = v - return s -} - -// SetNamePrefix sets the NamePrefix field's value. -func (s *Input) SetNamePrefix(v string) *Input { - s.NamePrefix = &v - return s -} - -// When you start your application, you provide this configuration, which identifies -// the input source and the point in the input source at which you want the -// application to start processing records. -type InputConfiguration struct { - _ struct{} `type:"structure"` - - // Input source ID. You can get this ID by calling the DescribeApplication operation. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` - - // Point at which you want the application to start processing records from - // the streaming source. - // - // InputStartingPositionConfiguration is a required field - InputStartingPositionConfiguration *InputStartingPositionConfiguration `type:"structure" required:"true"` -} - -// String returns the string representation -func (s InputConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputConfiguration"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.InputStartingPositionConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("InputStartingPositionConfiguration")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *InputConfiguration) SetId(v string) *InputConfiguration { - s.Id = &v - return s -} - -// SetInputStartingPositionConfiguration sets the InputStartingPositionConfiguration field's value. -func (s *InputConfiguration) SetInputStartingPositionConfiguration(v *InputStartingPositionConfiguration) *InputConfiguration { - s.InputStartingPositionConfiguration = v - return s -} - -// Describes the application input configuration. For more information, see -// Configuring Application Input (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). -type InputDescription struct { - _ struct{} `type:"structure"` - - // Returns the in-application stream names that are mapped to the stream source. - InAppStreamNames []*string `type:"list"` - - // Input ID associated with the application input. This is the ID that Amazon - // Kinesis Analytics assigns to each input configuration you add to your application. - InputId *string `min:"1" type:"string"` - - // Describes the configured parallelism (number of in-application streams mapped - // to the streaming source). - InputParallelism *InputParallelism `type:"structure"` - - // The description of the preprocessor that executes on records in this input - // before the application's code is run. - InputProcessingConfigurationDescription *InputProcessingConfigurationDescription `type:"structure"` - - // Describes the format of the data in the streaming source, and how each data - // element maps to corresponding columns in the in-application stream that is - // being created. - InputSchema *SourceSchema `type:"structure"` - - // Point at which the application is configured to read from the input stream. - InputStartingPositionConfiguration *InputStartingPositionConfiguration `type:"structure"` - - // If an Amazon Kinesis Firehose delivery stream is configured as a streaming - // source, provides the delivery stream's ARN and an IAM role that enables Amazon - // Kinesis Analytics to access the stream on your behalf. - KinesisFirehoseInputDescription *KinesisFirehoseInputDescription `type:"structure"` - - // If an Amazon Kinesis stream is configured as streaming source, provides Amazon - // Kinesis stream's Amazon Resource Name (ARN) and an IAM role that enables - // Amazon Kinesis Analytics to access the stream on your behalf. - KinesisStreamsInputDescription *KinesisStreamsInputDescription `type:"structure"` - - // In-application name prefix. - NamePrefix *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s InputDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputDescription) GoString() string { - return s.String() -} - -// SetInAppStreamNames sets the InAppStreamNames field's value. -func (s *InputDescription) SetInAppStreamNames(v []*string) *InputDescription { - s.InAppStreamNames = v - return s -} - -// SetInputId sets the InputId field's value. -func (s *InputDescription) SetInputId(v string) *InputDescription { - s.InputId = &v - return s -} - -// SetInputParallelism sets the InputParallelism field's value. -func (s *InputDescription) SetInputParallelism(v *InputParallelism) *InputDescription { - s.InputParallelism = v - return s -} - -// SetInputProcessingConfigurationDescription sets the InputProcessingConfigurationDescription field's value. -func (s *InputDescription) SetInputProcessingConfigurationDescription(v *InputProcessingConfigurationDescription) *InputDescription { - s.InputProcessingConfigurationDescription = v - return s -} - -// SetInputSchema sets the InputSchema field's value. -func (s *InputDescription) SetInputSchema(v *SourceSchema) *InputDescription { - s.InputSchema = v - return s -} - -// SetInputStartingPositionConfiguration sets the InputStartingPositionConfiguration field's value. -func (s *InputDescription) SetInputStartingPositionConfiguration(v *InputStartingPositionConfiguration) *InputDescription { - s.InputStartingPositionConfiguration = v - return s -} - -// SetKinesisFirehoseInputDescription sets the KinesisFirehoseInputDescription field's value. -func (s *InputDescription) SetKinesisFirehoseInputDescription(v *KinesisFirehoseInputDescription) *InputDescription { - s.KinesisFirehoseInputDescription = v - return s -} - -// SetKinesisStreamsInputDescription sets the KinesisStreamsInputDescription field's value. -func (s *InputDescription) SetKinesisStreamsInputDescription(v *KinesisStreamsInputDescription) *InputDescription { - s.KinesisStreamsInputDescription = v - return s -} - -// SetNamePrefix sets the NamePrefix field's value. -func (s *InputDescription) SetNamePrefix(v string) *InputDescription { - s.NamePrefix = &v - return s -} - -// An object that contains the Amazon Resource Name (ARN) of the AWS Lambda -// (https://aws.amazon.com/documentation/lambda/) function that is used to preprocess -// records in the stream, and the ARN of the IAM role that is used to access -// the AWS Lambda function. -type InputLambdaProcessor struct { - _ struct{} `type:"structure"` - - // The ARN of the AWS Lambda (https://aws.amazon.com/documentation/lambda/) - // function that operates on records in the stream. - // - // ResourceARN is a required field - ResourceARN *string `min:"1" type:"string" required:"true"` - - // The ARN of the IAM role that is used to access the AWS Lambda function. - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s InputLambdaProcessor) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputLambdaProcessor) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputLambdaProcessor) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputLambdaProcessor"} - 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.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *InputLambdaProcessor) SetResourceARN(v string) *InputLambdaProcessor { - s.ResourceARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *InputLambdaProcessor) SetRoleARN(v string) *InputLambdaProcessor { - s.RoleARN = &v - return s -} - -// An object that contains the Amazon Resource Name (ARN) of the AWS Lambda -// (https://aws.amazon.com/documentation/lambda/) function that is used to preprocess -// records in the stream, and the ARN of the IAM role that is used to access -// the AWS Lambda expression. -type InputLambdaProcessorDescription struct { - _ struct{} `type:"structure"` - - // The ARN of the AWS Lambda (https://aws.amazon.com/documentation/lambda/) - // function that is used to preprocess the records in the stream. - ResourceARN *string `min:"1" type:"string"` - - // The ARN of the IAM role that is used to access the AWS Lambda function. - RoleARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s InputLambdaProcessorDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputLambdaProcessorDescription) GoString() string { - return s.String() -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *InputLambdaProcessorDescription) SetResourceARN(v string) *InputLambdaProcessorDescription { - s.ResourceARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *InputLambdaProcessorDescription) SetRoleARN(v string) *InputLambdaProcessorDescription { - s.RoleARN = &v - return s -} - -// Represents an update to the InputLambdaProcessor that is used to preprocess -// the records in the stream. -type InputLambdaProcessorUpdate struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the new AWS Lambda (https://aws.amazon.com/documentation/lambda/) - // function that is used to preprocess the records in the stream. - ResourceARNUpdate *string `min:"1" type:"string"` - - // The ARN of the new IAM role that is used to access the AWS Lambda function. - RoleARNUpdate *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s InputLambdaProcessorUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputLambdaProcessorUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputLambdaProcessorUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputLambdaProcessorUpdate"} - if s.ResourceARNUpdate != nil && len(*s.ResourceARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARNUpdate", 1)) - } - if s.RoleARNUpdate != nil && len(*s.RoleARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARNUpdate", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARNUpdate sets the ResourceARNUpdate field's value. -func (s *InputLambdaProcessorUpdate) SetResourceARNUpdate(v string) *InputLambdaProcessorUpdate { - s.ResourceARNUpdate = &v - return s -} - -// SetRoleARNUpdate sets the RoleARNUpdate field's value. -func (s *InputLambdaProcessorUpdate) SetRoleARNUpdate(v string) *InputLambdaProcessorUpdate { - s.RoleARNUpdate = &v - return s -} - -// Describes the number of in-application streams to create for a given streaming -// source. For information about parallelism, see Configuring Application Input -// (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). -type InputParallelism struct { - _ struct{} `type:"structure"` - - // Number of in-application streams to create. For more information, see Limits - // (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/limits.html). - Count *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s InputParallelism) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputParallelism) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputParallelism) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputParallelism"} - if s.Count != nil && *s.Count < 1 { - invalidParams.Add(request.NewErrParamMinValue("Count", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCount sets the Count field's value. -func (s *InputParallelism) SetCount(v int64) *InputParallelism { - s.Count = &v - return s -} - -// Provides updates to the parallelism count. -type InputParallelismUpdate struct { - _ struct{} `type:"structure"` - - // Number of in-application streams to create for the specified streaming source. - CountUpdate *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s InputParallelismUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputParallelismUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputParallelismUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputParallelismUpdate"} - if s.CountUpdate != nil && *s.CountUpdate < 1 { - invalidParams.Add(request.NewErrParamMinValue("CountUpdate", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCountUpdate sets the CountUpdate field's value. -func (s *InputParallelismUpdate) SetCountUpdate(v int64) *InputParallelismUpdate { - s.CountUpdate = &v - return s -} - -// Provides a description of a processor that is used to preprocess the records -// in the stream before being processed by your application code. Currently, -// the only input processor available is AWS Lambda (https://aws.amazon.com/documentation/lambda/). -type InputProcessingConfiguration struct { - _ struct{} `type:"structure"` - - // The InputLambdaProcessor that is used to preprocess the records in the stream - // before being processed by your application code. - // - // InputLambdaProcessor is a required field - InputLambdaProcessor *InputLambdaProcessor `type:"structure" required:"true"` -} - -// String returns the string representation -func (s InputProcessingConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputProcessingConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputProcessingConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputProcessingConfiguration"} - if s.InputLambdaProcessor == nil { - invalidParams.Add(request.NewErrParamRequired("InputLambdaProcessor")) - } - if s.InputLambdaProcessor != nil { - if err := s.InputLambdaProcessor.Validate(); err != nil { - invalidParams.AddNested("InputLambdaProcessor", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputLambdaProcessor sets the InputLambdaProcessor field's value. -func (s *InputProcessingConfiguration) SetInputLambdaProcessor(v *InputLambdaProcessor) *InputProcessingConfiguration { - s.InputLambdaProcessor = v - return s -} - -// Provides configuration information about an input processor. Currently, the -// only input processor available is AWS Lambda (https://aws.amazon.com/documentation/lambda/). -type InputProcessingConfigurationDescription struct { - _ struct{} `type:"structure"` - - // Provides configuration information about the associated InputLambdaProcessorDescription. - InputLambdaProcessorDescription *InputLambdaProcessorDescription `type:"structure"` -} - -// String returns the string representation -func (s InputProcessingConfigurationDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputProcessingConfigurationDescription) GoString() string { - return s.String() -} - -// SetInputLambdaProcessorDescription sets the InputLambdaProcessorDescription field's value. -func (s *InputProcessingConfigurationDescription) SetInputLambdaProcessorDescription(v *InputLambdaProcessorDescription) *InputProcessingConfigurationDescription { - s.InputLambdaProcessorDescription = v - return s -} - -// Describes updates to an InputProcessingConfiguration. -type InputProcessingConfigurationUpdate struct { - _ struct{} `type:"structure"` - - // Provides update information for an InputLambdaProcessor. - // - // InputLambdaProcessorUpdate is a required field - InputLambdaProcessorUpdate *InputLambdaProcessorUpdate `type:"structure" required:"true"` -} - -// String returns the string representation -func (s InputProcessingConfigurationUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputProcessingConfigurationUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputProcessingConfigurationUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputProcessingConfigurationUpdate"} - if s.InputLambdaProcessorUpdate == nil { - invalidParams.Add(request.NewErrParamRequired("InputLambdaProcessorUpdate")) - } - if s.InputLambdaProcessorUpdate != nil { - if err := s.InputLambdaProcessorUpdate.Validate(); err != nil { - invalidParams.AddNested("InputLambdaProcessorUpdate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputLambdaProcessorUpdate sets the InputLambdaProcessorUpdate field's value. -func (s *InputProcessingConfigurationUpdate) SetInputLambdaProcessorUpdate(v *InputLambdaProcessorUpdate) *InputProcessingConfigurationUpdate { - s.InputLambdaProcessorUpdate = v - return s -} - -// Describes updates for the application's input schema. -type InputSchemaUpdate struct { - _ struct{} `type:"structure"` - - // A list of RecordColumn objects. Each object describes the mapping of the - // streaming source element to the corresponding column in the in-application - // stream. - RecordColumnUpdates []*RecordColumn `min:"1" type:"list"` - - // Specifies the encoding of the records in the streaming source. For example, - // UTF-8. - RecordEncodingUpdate *string `type:"string"` - - // Specifies the format of the records on the streaming source. - RecordFormatUpdate *RecordFormat `type:"structure"` -} - -// String returns the string representation -func (s InputSchemaUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputSchemaUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputSchemaUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputSchemaUpdate"} - if s.RecordColumnUpdates != nil && len(s.RecordColumnUpdates) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RecordColumnUpdates", 1)) - } - if s.RecordColumnUpdates != nil { - for i, v := range s.RecordColumnUpdates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RecordColumnUpdates", i), err.(request.ErrInvalidParams)) - } - } - } - if s.RecordFormatUpdate != nil { - if err := s.RecordFormatUpdate.Validate(); err != nil { - invalidParams.AddNested("RecordFormatUpdate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRecordColumnUpdates sets the RecordColumnUpdates field's value. -func (s *InputSchemaUpdate) SetRecordColumnUpdates(v []*RecordColumn) *InputSchemaUpdate { - s.RecordColumnUpdates = v - return s -} - -// SetRecordEncodingUpdate sets the RecordEncodingUpdate field's value. -func (s *InputSchemaUpdate) SetRecordEncodingUpdate(v string) *InputSchemaUpdate { - s.RecordEncodingUpdate = &v - return s -} - -// SetRecordFormatUpdate sets the RecordFormatUpdate field's value. -func (s *InputSchemaUpdate) SetRecordFormatUpdate(v *RecordFormat) *InputSchemaUpdate { - s.RecordFormatUpdate = v - return s -} - -// Describes the point at which the application reads from the streaming source. -type InputStartingPositionConfiguration struct { - _ struct{} `type:"structure"` - - // The starting position on the stream. - // - // * NOW - Start reading just after the most recent record in the stream, - // start at the request time stamp that the customer issued. - // - // * TRIM_HORIZON - Start reading at the last untrimmed record in the stream, - // which is the oldest record available in the stream. This option is not - // available for an Amazon Kinesis Firehose delivery stream. - // - // * LAST_STOPPED_POINT - Resume reading from where the application last - // stopped reading. - InputStartingPosition *string `type:"string" enum:"InputStartingPosition"` -} - -// String returns the string representation -func (s InputStartingPositionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputStartingPositionConfiguration) GoString() string { - return s.String() -} - -// SetInputStartingPosition sets the InputStartingPosition field's value. -func (s *InputStartingPositionConfiguration) SetInputStartingPosition(v string) *InputStartingPositionConfiguration { - s.InputStartingPosition = &v - return s -} - -// Describes updates to a specific input configuration (identified by the InputId -// of an application). -type InputUpdate struct { - _ struct{} `type:"structure"` - - // Input ID of the application input to be updated. - // - // InputId is a required field - InputId *string `min:"1" type:"string" required:"true"` - - // Describes the parallelism updates (the number in-application streams Amazon - // Kinesis Analytics creates for the specific streaming source). - InputParallelismUpdate *InputParallelismUpdate `type:"structure"` - - // Describes updates for an input processing configuration. - InputProcessingConfigurationUpdate *InputProcessingConfigurationUpdate `type:"structure"` - - // Describes the data format on the streaming source, and how record elements - // on the streaming source map to columns of the in-application stream that - // is created. - InputSchemaUpdate *InputSchemaUpdate `type:"structure"` - - // If an Amazon Kinesis Firehose delivery stream is the streaming source to - // be updated, provides an updated stream ARN and IAM role ARN. - KinesisFirehoseInputUpdate *KinesisFirehoseInputUpdate `type:"structure"` - - // If an Amazon Kinesis stream is the streaming source to be updated, provides - // an updated stream Amazon Resource Name (ARN) and IAM role ARN. - KinesisStreamsInputUpdate *KinesisStreamsInputUpdate `type:"structure"` - - // Name prefix for in-application streams that Amazon Kinesis Analytics creates - // for the specific streaming source. - NamePrefixUpdate *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s InputUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputUpdate"} - if s.InputId == nil { - invalidParams.Add(request.NewErrParamRequired("InputId")) - } - if s.InputId != nil && len(*s.InputId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputId", 1)) - } - if s.NamePrefixUpdate != nil && len(*s.NamePrefixUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NamePrefixUpdate", 1)) - } - if s.InputParallelismUpdate != nil { - if err := s.InputParallelismUpdate.Validate(); err != nil { - invalidParams.AddNested("InputParallelismUpdate", err.(request.ErrInvalidParams)) - } - } - if s.InputProcessingConfigurationUpdate != nil { - if err := s.InputProcessingConfigurationUpdate.Validate(); err != nil { - invalidParams.AddNested("InputProcessingConfigurationUpdate", err.(request.ErrInvalidParams)) - } - } - if s.InputSchemaUpdate != nil { - if err := s.InputSchemaUpdate.Validate(); err != nil { - invalidParams.AddNested("InputSchemaUpdate", err.(request.ErrInvalidParams)) - } - } - if s.KinesisFirehoseInputUpdate != nil { - if err := s.KinesisFirehoseInputUpdate.Validate(); err != nil { - invalidParams.AddNested("KinesisFirehoseInputUpdate", err.(request.ErrInvalidParams)) - } - } - if s.KinesisStreamsInputUpdate != nil { - if err := s.KinesisStreamsInputUpdate.Validate(); err != nil { - invalidParams.AddNested("KinesisStreamsInputUpdate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputId sets the InputId field's value. -func (s *InputUpdate) SetInputId(v string) *InputUpdate { - s.InputId = &v - return s -} - -// SetInputParallelismUpdate sets the InputParallelismUpdate field's value. -func (s *InputUpdate) SetInputParallelismUpdate(v *InputParallelismUpdate) *InputUpdate { - s.InputParallelismUpdate = v - return s -} - -// SetInputProcessingConfigurationUpdate sets the InputProcessingConfigurationUpdate field's value. -func (s *InputUpdate) SetInputProcessingConfigurationUpdate(v *InputProcessingConfigurationUpdate) *InputUpdate { - s.InputProcessingConfigurationUpdate = v - return s -} - -// SetInputSchemaUpdate sets the InputSchemaUpdate field's value. -func (s *InputUpdate) SetInputSchemaUpdate(v *InputSchemaUpdate) *InputUpdate { - s.InputSchemaUpdate = v - return s -} - -// SetKinesisFirehoseInputUpdate sets the KinesisFirehoseInputUpdate field's value. -func (s *InputUpdate) SetKinesisFirehoseInputUpdate(v *KinesisFirehoseInputUpdate) *InputUpdate { - s.KinesisFirehoseInputUpdate = v - return s -} - -// SetKinesisStreamsInputUpdate sets the KinesisStreamsInputUpdate field's value. -func (s *InputUpdate) SetKinesisStreamsInputUpdate(v *KinesisStreamsInputUpdate) *InputUpdate { - s.KinesisStreamsInputUpdate = v - return s -} - -// SetNamePrefixUpdate sets the NamePrefixUpdate field's value. -func (s *InputUpdate) SetNamePrefixUpdate(v string) *InputUpdate { - s.NamePrefixUpdate = &v - return s -} - -// Provides additional mapping information when JSON is the record format on -// the streaming source. -type JSONMappingParameters struct { - _ struct{} `type:"structure"` - - // Path to the top-level parent that contains the records. - // - // RecordRowPath is a required field - RecordRowPath *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s JSONMappingParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JSONMappingParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *JSONMappingParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "JSONMappingParameters"} - if s.RecordRowPath == nil { - invalidParams.Add(request.NewErrParamRequired("RecordRowPath")) - } - if s.RecordRowPath != nil && len(*s.RecordRowPath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RecordRowPath", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRecordRowPath sets the RecordRowPath field's value. -func (s *JSONMappingParameters) SetRecordRowPath(v string) *JSONMappingParameters { - s.RecordRowPath = &v - return s -} - -// Identifies an Amazon Kinesis Firehose delivery stream as the streaming source. -// You provide the delivery stream's Amazon Resource Name (ARN) and an IAM role -// ARN that enables Amazon Kinesis Analytics to access the stream on your behalf. -type KinesisFirehoseInput struct { - _ struct{} `type:"structure"` - - // ARN of the input delivery stream. - // - // ResourceARN is a required field - ResourceARN *string `min:"1" type:"string" required:"true"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the - // stream on your behalf. You need to make sure that the role has the necessary - // permissions to access the stream. - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s KinesisFirehoseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisFirehoseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KinesisFirehoseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KinesisFirehoseInput"} - 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.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *KinesisFirehoseInput) SetResourceARN(v string) *KinesisFirehoseInput { - s.ResourceARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *KinesisFirehoseInput) SetRoleARN(v string) *KinesisFirehoseInput { - s.RoleARN = &v - return s -} - -// Describes the Amazon Kinesis Firehose delivery stream that is configured -// as the streaming source in the application input configuration. -type KinesisFirehoseInputDescription struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the Amazon Kinesis Firehose delivery stream. - ResourceARN *string `min:"1" type:"string"` - - // ARN of the IAM role that Amazon Kinesis Analytics assumes to access the stream. - RoleARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s KinesisFirehoseInputDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisFirehoseInputDescription) GoString() string { - return s.String() -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *KinesisFirehoseInputDescription) SetResourceARN(v string) *KinesisFirehoseInputDescription { - s.ResourceARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *KinesisFirehoseInputDescription) SetRoleARN(v string) *KinesisFirehoseInputDescription { - s.RoleARN = &v - return s -} - -// When updating application input configuration, provides information about -// an Amazon Kinesis Firehose delivery stream as the streaming source. -type KinesisFirehoseInputUpdate struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the input Amazon Kinesis Firehose delivery - // stream to read. - ResourceARNUpdate *string `min:"1" type:"string"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the - // stream on your behalf. You need to grant the necessary permissions to this - // role. - RoleARNUpdate *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s KinesisFirehoseInputUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisFirehoseInputUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KinesisFirehoseInputUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KinesisFirehoseInputUpdate"} - if s.ResourceARNUpdate != nil && len(*s.ResourceARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARNUpdate", 1)) - } - if s.RoleARNUpdate != nil && len(*s.RoleARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARNUpdate", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARNUpdate sets the ResourceARNUpdate field's value. -func (s *KinesisFirehoseInputUpdate) SetResourceARNUpdate(v string) *KinesisFirehoseInputUpdate { - s.ResourceARNUpdate = &v - return s -} - -// SetRoleARNUpdate sets the RoleARNUpdate field's value. -func (s *KinesisFirehoseInputUpdate) SetRoleARNUpdate(v string) *KinesisFirehoseInputUpdate { - s.RoleARNUpdate = &v - return s -} - -// When configuring application output, identifies an Amazon Kinesis Firehose -// delivery stream as the destination. You provide the stream Amazon Resource -// Name (ARN) and an IAM role that enables Amazon Kinesis Analytics to write -// to the stream on your behalf. -type KinesisFirehoseOutput struct { - _ struct{} `type:"structure"` - - // ARN of the destination Amazon Kinesis Firehose delivery stream to write to. - // - // ResourceARN is a required field - ResourceARN *string `min:"1" type:"string" required:"true"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to write to - // the destination stream on your behalf. You need to grant the necessary permissions - // to this role. - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s KinesisFirehoseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisFirehoseOutput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KinesisFirehoseOutput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KinesisFirehoseOutput"} - 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.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *KinesisFirehoseOutput) SetResourceARN(v string) *KinesisFirehoseOutput { - s.ResourceARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *KinesisFirehoseOutput) SetRoleARN(v string) *KinesisFirehoseOutput { - s.RoleARN = &v - return s -} - -// For an application output, describes the Amazon Kinesis Firehose delivery -// stream configured as its destination. -type KinesisFirehoseOutputDescription struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the Amazon Kinesis Firehose delivery stream. - ResourceARN *string `min:"1" type:"string"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the - // stream. - RoleARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s KinesisFirehoseOutputDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisFirehoseOutputDescription) GoString() string { - return s.String() -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *KinesisFirehoseOutputDescription) SetResourceARN(v string) *KinesisFirehoseOutputDescription { - s.ResourceARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *KinesisFirehoseOutputDescription) SetRoleARN(v string) *KinesisFirehoseOutputDescription { - s.RoleARN = &v - return s -} - -// When updating an output configuration using the UpdateApplication operation, -// provides information about an Amazon Kinesis Firehose delivery stream configured -// as the destination. -type KinesisFirehoseOutputUpdate struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the Amazon Kinesis Firehose delivery stream - // to write to. - ResourceARNUpdate *string `min:"1" type:"string"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the - // stream on your behalf. You need to grant the necessary permissions to this - // role. - RoleARNUpdate *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s KinesisFirehoseOutputUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisFirehoseOutputUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KinesisFirehoseOutputUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KinesisFirehoseOutputUpdate"} - if s.ResourceARNUpdate != nil && len(*s.ResourceARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARNUpdate", 1)) - } - if s.RoleARNUpdate != nil && len(*s.RoleARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARNUpdate", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARNUpdate sets the ResourceARNUpdate field's value. -func (s *KinesisFirehoseOutputUpdate) SetResourceARNUpdate(v string) *KinesisFirehoseOutputUpdate { - s.ResourceARNUpdate = &v - return s -} - -// SetRoleARNUpdate sets the RoleARNUpdate field's value. -func (s *KinesisFirehoseOutputUpdate) SetRoleARNUpdate(v string) *KinesisFirehoseOutputUpdate { - s.RoleARNUpdate = &v - return s -} - -// Identifies an Amazon Kinesis stream as the streaming source. You provide -// the stream's Amazon Resource Name (ARN) and an IAM role ARN that enables -// Amazon Kinesis Analytics to access the stream on your behalf. -type KinesisStreamsInput struct { - _ struct{} `type:"structure"` - - // ARN of the input Amazon Kinesis stream to read. - // - // ResourceARN is a required field - ResourceARN *string `min:"1" type:"string" required:"true"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the - // stream on your behalf. You need to grant the necessary permissions to this - // role. - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s KinesisStreamsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisStreamsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KinesisStreamsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KinesisStreamsInput"} - 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.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *KinesisStreamsInput) SetResourceARN(v string) *KinesisStreamsInput { - s.ResourceARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *KinesisStreamsInput) SetRoleARN(v string) *KinesisStreamsInput { - s.RoleARN = &v - return s -} - -// Describes the Amazon Kinesis stream that is configured as the streaming source -// in the application input configuration. -type KinesisStreamsInputDescription struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the Amazon Kinesis stream. - ResourceARN *string `min:"1" type:"string"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the - // stream. - RoleARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s KinesisStreamsInputDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisStreamsInputDescription) GoString() string { - return s.String() -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *KinesisStreamsInputDescription) SetResourceARN(v string) *KinesisStreamsInputDescription { - s.ResourceARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *KinesisStreamsInputDescription) SetRoleARN(v string) *KinesisStreamsInputDescription { - s.RoleARN = &v - return s -} - -// When updating application input configuration, provides information about -// an Amazon Kinesis stream as the streaming source. -type KinesisStreamsInputUpdate struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the input Amazon Kinesis stream to read. - ResourceARNUpdate *string `min:"1" type:"string"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the - // stream on your behalf. You need to grant the necessary permissions to this - // role. - RoleARNUpdate *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s KinesisStreamsInputUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisStreamsInputUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KinesisStreamsInputUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KinesisStreamsInputUpdate"} - if s.ResourceARNUpdate != nil && len(*s.ResourceARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARNUpdate", 1)) - } - if s.RoleARNUpdate != nil && len(*s.RoleARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARNUpdate", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARNUpdate sets the ResourceARNUpdate field's value. -func (s *KinesisStreamsInputUpdate) SetResourceARNUpdate(v string) *KinesisStreamsInputUpdate { - s.ResourceARNUpdate = &v - return s -} - -// SetRoleARNUpdate sets the RoleARNUpdate field's value. -func (s *KinesisStreamsInputUpdate) SetRoleARNUpdate(v string) *KinesisStreamsInputUpdate { - s.RoleARNUpdate = &v - return s -} - -// When configuring application output, identifies an Amazon Kinesis stream -// as the destination. You provide the stream Amazon Resource Name (ARN) and -// also an IAM role ARN that Amazon Kinesis Analytics can use to write to the -// stream on your behalf. -type KinesisStreamsOutput struct { - _ struct{} `type:"structure"` - - // ARN of the destination Amazon Kinesis stream to write to. - // - // ResourceARN is a required field - ResourceARN *string `min:"1" type:"string" required:"true"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to write to - // the destination stream on your behalf. You need to grant the necessary permissions - // to this role. - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s KinesisStreamsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisStreamsOutput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KinesisStreamsOutput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KinesisStreamsOutput"} - 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.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *KinesisStreamsOutput) SetResourceARN(v string) *KinesisStreamsOutput { - s.ResourceARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *KinesisStreamsOutput) SetRoleARN(v string) *KinesisStreamsOutput { - s.RoleARN = &v - return s -} - -// For an application output, describes the Amazon Kinesis stream configured -// as its destination. -type KinesisStreamsOutputDescription struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the Amazon Kinesis stream. - ResourceARN *string `min:"1" type:"string"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the - // stream. - RoleARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s KinesisStreamsOutputDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisStreamsOutputDescription) GoString() string { - return s.String() -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *KinesisStreamsOutputDescription) SetResourceARN(v string) *KinesisStreamsOutputDescription { - s.ResourceARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *KinesisStreamsOutputDescription) SetRoleARN(v string) *KinesisStreamsOutputDescription { - s.RoleARN = &v - return s -} - -// When updating an output configuration using the UpdateApplication operation, -// provides information about an Amazon Kinesis stream configured as the destination. -type KinesisStreamsOutputUpdate struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the Amazon Kinesis stream where you want to - // write the output. - ResourceARNUpdate *string `min:"1" type:"string"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the - // stream on your behalf. You need to grant the necessary permissions to this - // role. - RoleARNUpdate *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s KinesisStreamsOutputUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisStreamsOutputUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KinesisStreamsOutputUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KinesisStreamsOutputUpdate"} - if s.ResourceARNUpdate != nil && len(*s.ResourceARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARNUpdate", 1)) - } - if s.RoleARNUpdate != nil && len(*s.RoleARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARNUpdate", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARNUpdate sets the ResourceARNUpdate field's value. -func (s *KinesisStreamsOutputUpdate) SetResourceARNUpdate(v string) *KinesisStreamsOutputUpdate { - s.ResourceARNUpdate = &v - return s -} - -// SetRoleARNUpdate sets the RoleARNUpdate field's value. -func (s *KinesisStreamsOutputUpdate) SetRoleARNUpdate(v string) *KinesisStreamsOutputUpdate { - s.RoleARNUpdate = &v - return s -} - -// When configuring application output, identifies an AWS Lambda function as -// the destination. You provide the function Amazon Resource Name (ARN) and -// also an IAM role ARN that Amazon Kinesis Analytics can use to write to the -// function on your behalf. -type LambdaOutput struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the destination Lambda function to write to. - // - // ResourceARN is a required field - ResourceARN *string `min:"1" type:"string" required:"true"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to write to - // the destination function on your behalf. You need to grant the necessary - // permissions to this role. - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s LambdaOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaOutput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LambdaOutput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LambdaOutput"} - 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.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *LambdaOutput) SetResourceARN(v string) *LambdaOutput { - s.ResourceARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *LambdaOutput) SetRoleARN(v string) *LambdaOutput { - s.RoleARN = &v - return s -} - -// For an application output, describes the AWS Lambda function configured as -// its destination. -type LambdaOutputDescription struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the destination Lambda function. - ResourceARN *string `min:"1" type:"string"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to write to - // the destination function. - RoleARN *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s LambdaOutputDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaOutputDescription) GoString() string { - return s.String() -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *LambdaOutputDescription) SetResourceARN(v string) *LambdaOutputDescription { - s.ResourceARN = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *LambdaOutputDescription) SetRoleARN(v string) *LambdaOutputDescription { - s.RoleARN = &v - return s -} - -// When updating an output configuration using the UpdateApplication operation, -// provides information about an AWS Lambda function configured as the destination. -type LambdaOutputUpdate struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the destination Lambda function. - ResourceARNUpdate *string `min:"1" type:"string"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to write to - // the destination function on your behalf. You need to grant the necessary - // permissions to this role. - RoleARNUpdate *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s LambdaOutputUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaOutputUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LambdaOutputUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LambdaOutputUpdate"} - if s.ResourceARNUpdate != nil && len(*s.ResourceARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARNUpdate", 1)) - } - if s.RoleARNUpdate != nil && len(*s.RoleARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARNUpdate", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARNUpdate sets the ResourceARNUpdate field's value. -func (s *LambdaOutputUpdate) SetResourceARNUpdate(v string) *LambdaOutputUpdate { - s.ResourceARNUpdate = &v - return s -} - -// SetRoleARNUpdate sets the RoleARNUpdate field's value. -func (s *LambdaOutputUpdate) SetRoleARNUpdate(v string) *LambdaOutputUpdate { - s.RoleARNUpdate = &v - return s -} - -type ListApplicationsInput struct { - _ struct{} `type:"structure"` - - // Name of the application to start the list with. When using pagination to - // retrieve the list, you don't need to specify this parameter in the first - // request. However, in subsequent requests, you add the last application name - // from the previous response to get the next page of applications. - ExclusiveStartApplicationName *string `min:"1" type:"string"` - - // Maximum number of applications to list. - Limit *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListApplicationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListApplicationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListApplicationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListApplicationsInput"} - if s.ExclusiveStartApplicationName != nil && len(*s.ExclusiveStartApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartApplicationName", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExclusiveStartApplicationName sets the ExclusiveStartApplicationName field's value. -func (s *ListApplicationsInput) SetExclusiveStartApplicationName(v string) *ListApplicationsInput { - s.ExclusiveStartApplicationName = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListApplicationsInput) SetLimit(v int64) *ListApplicationsInput { - s.Limit = &v - return s -} - -type ListApplicationsOutput struct { - _ struct{} `type:"structure"` - - // List of ApplicationSummary objects. - // - // ApplicationSummaries is a required field - ApplicationSummaries []*ApplicationSummary `type:"list" required:"true"` - - // Returns true if there are more applications to retrieve. - // - // HasMoreApplications is a required field - HasMoreApplications *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s ListApplicationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListApplicationsOutput) GoString() string { - return s.String() -} - -// SetApplicationSummaries sets the ApplicationSummaries field's value. -func (s *ListApplicationsOutput) SetApplicationSummaries(v []*ApplicationSummary) *ListApplicationsOutput { - s.ApplicationSummaries = v - return s -} - -// SetHasMoreApplications sets the HasMoreApplications field's value. -func (s *ListApplicationsOutput) SetHasMoreApplications(v bool) *ListApplicationsOutput { - s.HasMoreApplications = &v - return s -} - -// When configuring application input at the time of creating or updating an -// application, provides additional mapping information specific to the record -// format (such as JSON, CSV, or record fields delimited by some delimiter) -// on the streaming source. -type MappingParameters struct { - _ struct{} `type:"structure"` - - // Provides additional mapping information when the record format uses delimiters - // (for example, CSV). - CSVMappingParameters *CSVMappingParameters `type:"structure"` - - // Provides additional mapping information when JSON is the record format on - // the streaming source. - JSONMappingParameters *JSONMappingParameters `type:"structure"` -} - -// String returns the string representation -func (s MappingParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MappingParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MappingParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MappingParameters"} - if s.CSVMappingParameters != nil { - if err := s.CSVMappingParameters.Validate(); err != nil { - invalidParams.AddNested("CSVMappingParameters", err.(request.ErrInvalidParams)) - } - } - if s.JSONMappingParameters != nil { - if err := s.JSONMappingParameters.Validate(); err != nil { - invalidParams.AddNested("JSONMappingParameters", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCSVMappingParameters sets the CSVMappingParameters field's value. -func (s *MappingParameters) SetCSVMappingParameters(v *CSVMappingParameters) *MappingParameters { - s.CSVMappingParameters = v - return s -} - -// SetJSONMappingParameters sets the JSONMappingParameters field's value. -func (s *MappingParameters) SetJSONMappingParameters(v *JSONMappingParameters) *MappingParameters { - s.JSONMappingParameters = v - return s -} - -// Describes application output configuration in which you identify an in-application -// stream and a destination where you want the in-application stream data to -// be written. The destination can be an Amazon Kinesis stream or an Amazon -// Kinesis Firehose delivery stream. -// -// For limits on how many destinations an application can write and other limitations, -// see Limits (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/limits.html) -type Output struct { - _ struct{} `type:"structure"` - - // Describes the data format when records are written to the destination. For - // more information, see Configuring Application Output (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html). - // - // DestinationSchema is a required field - DestinationSchema *DestinationSchema `type:"structure" required:"true"` - - // Identifies an Amazon Kinesis Firehose delivery stream as the destination. - KinesisFirehoseOutput *KinesisFirehoseOutput `type:"structure"` - - // Identifies an Amazon Kinesis stream as the destination. - KinesisStreamsOutput *KinesisStreamsOutput `type:"structure"` - - // Identifies an AWS Lambda function as the destination. - LambdaOutput *LambdaOutput `type:"structure"` - - // Name of the in-application stream. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Output) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Output) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Output) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Output"} - if s.DestinationSchema == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationSchema")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.DestinationSchema != nil { - if err := s.DestinationSchema.Validate(); err != nil { - invalidParams.AddNested("DestinationSchema", err.(request.ErrInvalidParams)) - } - } - if s.KinesisFirehoseOutput != nil { - if err := s.KinesisFirehoseOutput.Validate(); err != nil { - invalidParams.AddNested("KinesisFirehoseOutput", err.(request.ErrInvalidParams)) - } - } - if s.KinesisStreamsOutput != nil { - if err := s.KinesisStreamsOutput.Validate(); err != nil { - invalidParams.AddNested("KinesisStreamsOutput", err.(request.ErrInvalidParams)) - } - } - if s.LambdaOutput != nil { - if err := s.LambdaOutput.Validate(); err != nil { - invalidParams.AddNested("LambdaOutput", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationSchema sets the DestinationSchema field's value. -func (s *Output) SetDestinationSchema(v *DestinationSchema) *Output { - s.DestinationSchema = v - return s -} - -// SetKinesisFirehoseOutput sets the KinesisFirehoseOutput field's value. -func (s *Output) SetKinesisFirehoseOutput(v *KinesisFirehoseOutput) *Output { - s.KinesisFirehoseOutput = v - return s -} - -// SetKinesisStreamsOutput sets the KinesisStreamsOutput field's value. -func (s *Output) SetKinesisStreamsOutput(v *KinesisStreamsOutput) *Output { - s.KinesisStreamsOutput = v - return s -} - -// SetLambdaOutput sets the LambdaOutput field's value. -func (s *Output) SetLambdaOutput(v *LambdaOutput) *Output { - s.LambdaOutput = v - return s -} - -// SetName sets the Name field's value. -func (s *Output) SetName(v string) *Output { - s.Name = &v - return s -} - -// Describes the application output configuration, which includes the in-application -// stream name and the destination where the stream data is written. The destination -// can be an Amazon Kinesis stream or an Amazon Kinesis Firehose delivery stream. -type OutputDescription struct { - _ struct{} `type:"structure"` - - // Data format used for writing data to the destination. - DestinationSchema *DestinationSchema `type:"structure"` - - // Describes the Amazon Kinesis Firehose delivery stream configured as the destination - // where output is written. - KinesisFirehoseOutputDescription *KinesisFirehoseOutputDescription `type:"structure"` - - // Describes Amazon Kinesis stream configured as the destination where output - // is written. - KinesisStreamsOutputDescription *KinesisStreamsOutputDescription `type:"structure"` - - // Describes the AWS Lambda function configured as the destination where output - // is written. - LambdaOutputDescription *LambdaOutputDescription `type:"structure"` - - // Name of the in-application stream configured as output. - Name *string `min:"1" type:"string"` - - // A unique identifier for the output configuration. - OutputId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s OutputDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputDescription) GoString() string { - return s.String() -} - -// SetDestinationSchema sets the DestinationSchema field's value. -func (s *OutputDescription) SetDestinationSchema(v *DestinationSchema) *OutputDescription { - s.DestinationSchema = v - return s -} - -// SetKinesisFirehoseOutputDescription sets the KinesisFirehoseOutputDescription field's value. -func (s *OutputDescription) SetKinesisFirehoseOutputDescription(v *KinesisFirehoseOutputDescription) *OutputDescription { - s.KinesisFirehoseOutputDescription = v - return s -} - -// SetKinesisStreamsOutputDescription sets the KinesisStreamsOutputDescription field's value. -func (s *OutputDescription) SetKinesisStreamsOutputDescription(v *KinesisStreamsOutputDescription) *OutputDescription { - s.KinesisStreamsOutputDescription = v - return s -} - -// SetLambdaOutputDescription sets the LambdaOutputDescription field's value. -func (s *OutputDescription) SetLambdaOutputDescription(v *LambdaOutputDescription) *OutputDescription { - s.LambdaOutputDescription = v - return s -} - -// SetName sets the Name field's value. -func (s *OutputDescription) SetName(v string) *OutputDescription { - s.Name = &v - return s -} - -// SetOutputId sets the OutputId field's value. -func (s *OutputDescription) SetOutputId(v string) *OutputDescription { - s.OutputId = &v - return s -} - -// Describes updates to the output configuration identified by the OutputId. -type OutputUpdate struct { - _ struct{} `type:"structure"` - - // Describes the data format when records are written to the destination. For - // more information, see Configuring Application Output (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html). - DestinationSchemaUpdate *DestinationSchema `type:"structure"` - - // Describes an Amazon Kinesis Firehose delivery stream as the destination for - // the output. - KinesisFirehoseOutputUpdate *KinesisFirehoseOutputUpdate `type:"structure"` - - // Describes an Amazon Kinesis stream as the destination for the output. - KinesisStreamsOutputUpdate *KinesisStreamsOutputUpdate `type:"structure"` - - // Describes an AWS Lambda function as the destination for the output. - LambdaOutputUpdate *LambdaOutputUpdate `type:"structure"` - - // If you want to specify a different in-application stream for this output - // configuration, use this field to specify the new in-application stream name. - NameUpdate *string `min:"1" type:"string"` - - // Identifies the specific output configuration that you want to update. - // - // OutputId is a required field - OutputId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s OutputUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OutputUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OutputUpdate"} - if s.NameUpdate != nil && len(*s.NameUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NameUpdate", 1)) - } - if s.OutputId == nil { - invalidParams.Add(request.NewErrParamRequired("OutputId")) - } - if s.OutputId != nil && len(*s.OutputId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OutputId", 1)) - } - if s.DestinationSchemaUpdate != nil { - if err := s.DestinationSchemaUpdate.Validate(); err != nil { - invalidParams.AddNested("DestinationSchemaUpdate", err.(request.ErrInvalidParams)) - } - } - if s.KinesisFirehoseOutputUpdate != nil { - if err := s.KinesisFirehoseOutputUpdate.Validate(); err != nil { - invalidParams.AddNested("KinesisFirehoseOutputUpdate", err.(request.ErrInvalidParams)) - } - } - if s.KinesisStreamsOutputUpdate != nil { - if err := s.KinesisStreamsOutputUpdate.Validate(); err != nil { - invalidParams.AddNested("KinesisStreamsOutputUpdate", err.(request.ErrInvalidParams)) - } - } - if s.LambdaOutputUpdate != nil { - if err := s.LambdaOutputUpdate.Validate(); err != nil { - invalidParams.AddNested("LambdaOutputUpdate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationSchemaUpdate sets the DestinationSchemaUpdate field's value. -func (s *OutputUpdate) SetDestinationSchemaUpdate(v *DestinationSchema) *OutputUpdate { - s.DestinationSchemaUpdate = v - return s -} - -// SetKinesisFirehoseOutputUpdate sets the KinesisFirehoseOutputUpdate field's value. -func (s *OutputUpdate) SetKinesisFirehoseOutputUpdate(v *KinesisFirehoseOutputUpdate) *OutputUpdate { - s.KinesisFirehoseOutputUpdate = v - return s -} - -// SetKinesisStreamsOutputUpdate sets the KinesisStreamsOutputUpdate field's value. -func (s *OutputUpdate) SetKinesisStreamsOutputUpdate(v *KinesisStreamsOutputUpdate) *OutputUpdate { - s.KinesisStreamsOutputUpdate = v - return s -} - -// SetLambdaOutputUpdate sets the LambdaOutputUpdate field's value. -func (s *OutputUpdate) SetLambdaOutputUpdate(v *LambdaOutputUpdate) *OutputUpdate { - s.LambdaOutputUpdate = v - return s -} - -// SetNameUpdate sets the NameUpdate field's value. -func (s *OutputUpdate) SetNameUpdate(v string) *OutputUpdate { - s.NameUpdate = &v - return s -} - -// SetOutputId sets the OutputId field's value. -func (s *OutputUpdate) SetOutputId(v string) *OutputUpdate { - s.OutputId = &v - return s -} - -// Describes the mapping of each data element in the streaming source to the -// corresponding column in the in-application stream. -// -// Also used to describe the format of the reference data source. -type RecordColumn struct { - _ struct{} `type:"structure"` - - // Reference to the data element in the streaming input of the reference data - // source. - Mapping *string `type:"string"` - - // Name of the column created in the in-application input stream or reference - // table. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // Type of column created in the in-application input stream or reference table. - // - // SqlType is a required field - SqlType *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RecordColumn) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecordColumn) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RecordColumn) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RecordColumn"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.SqlType == nil { - invalidParams.Add(request.NewErrParamRequired("SqlType")) - } - if s.SqlType != nil && len(*s.SqlType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SqlType", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMapping sets the Mapping field's value. -func (s *RecordColumn) SetMapping(v string) *RecordColumn { - s.Mapping = &v - return s -} - -// SetName sets the Name field's value. -func (s *RecordColumn) SetName(v string) *RecordColumn { - s.Name = &v - return s -} - -// SetSqlType sets the SqlType field's value. -func (s *RecordColumn) SetSqlType(v string) *RecordColumn { - s.SqlType = &v - return s -} - -// Describes the record format and relevant mapping information that should -// be applied to schematize the records on the stream. -type RecordFormat struct { - _ struct{} `type:"structure"` - - // When configuring application input at the time of creating or updating an - // application, provides additional mapping information specific to the record - // format (such as JSON, CSV, or record fields delimited by some delimiter) - // on the streaming source. - MappingParameters *MappingParameters `type:"structure"` - - // The type of record format. - // - // RecordFormatType is a required field - RecordFormatType *string `type:"string" required:"true" enum:"RecordFormatType"` -} - -// String returns the string representation -func (s RecordFormat) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecordFormat) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RecordFormat) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RecordFormat"} - if s.RecordFormatType == nil { - invalidParams.Add(request.NewErrParamRequired("RecordFormatType")) - } - if s.MappingParameters != nil { - if err := s.MappingParameters.Validate(); err != nil { - invalidParams.AddNested("MappingParameters", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMappingParameters sets the MappingParameters field's value. -func (s *RecordFormat) SetMappingParameters(v *MappingParameters) *RecordFormat { - s.MappingParameters = v - return s -} - -// SetRecordFormatType sets the RecordFormatType field's value. -func (s *RecordFormat) SetRecordFormatType(v string) *RecordFormat { - s.RecordFormatType = &v - return s -} - -// Describes the reference data source by providing the source information (S3 -// bucket name and object key name), the resulting in-application table name -// that is created, and the necessary schema to map the data elements in the -// Amazon S3 object to the in-application table. -type ReferenceDataSource struct { - _ struct{} `type:"structure"` - - // Describes the format of the data in the streaming source, and how each data - // element maps to corresponding columns created in the in-application stream. - // - // ReferenceSchema is a required field - ReferenceSchema *SourceSchema `type:"structure" required:"true"` - - // Identifies the S3 bucket and object that contains the reference data. Also - // identifies the IAM role Amazon Kinesis Analytics can assume to read this - // object on your behalf. An Amazon Kinesis Analytics application loads reference - // data only once. If the data changes, you call the UpdateApplication operation - // to trigger reloading of data into your application. - S3ReferenceDataSource *S3ReferenceDataSource `type:"structure"` - - // Name of the in-application table to create. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ReferenceDataSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReferenceDataSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReferenceDataSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReferenceDataSource"} - if s.ReferenceSchema == nil { - invalidParams.Add(request.NewErrParamRequired("ReferenceSchema")) - } - if s.TableName == nil { - invalidParams.Add(request.NewErrParamRequired("TableName")) - } - if s.TableName != nil && len(*s.TableName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) - } - if s.ReferenceSchema != nil { - if err := s.ReferenceSchema.Validate(); err != nil { - invalidParams.AddNested("ReferenceSchema", err.(request.ErrInvalidParams)) - } - } - if s.S3ReferenceDataSource != nil { - if err := s.S3ReferenceDataSource.Validate(); err != nil { - invalidParams.AddNested("S3ReferenceDataSource", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReferenceSchema sets the ReferenceSchema field's value. -func (s *ReferenceDataSource) SetReferenceSchema(v *SourceSchema) *ReferenceDataSource { - s.ReferenceSchema = v - return s -} - -// SetS3ReferenceDataSource sets the S3ReferenceDataSource field's value. -func (s *ReferenceDataSource) SetS3ReferenceDataSource(v *S3ReferenceDataSource) *ReferenceDataSource { - s.S3ReferenceDataSource = v - return s -} - -// SetTableName sets the TableName field's value. -func (s *ReferenceDataSource) SetTableName(v string) *ReferenceDataSource { - s.TableName = &v - return s -} - -// Describes the reference data source configured for an application. -type ReferenceDataSourceDescription struct { - _ struct{} `type:"structure"` - - // ID of the reference data source. This is the ID that Amazon Kinesis Analytics - // assigns when you add the reference data source to your application using - // the AddApplicationReferenceDataSource operation. - // - // ReferenceId is a required field - ReferenceId *string `min:"1" type:"string" required:"true"` - - // Describes the format of the data in the streaming source, and how each data - // element maps to corresponding columns created in the in-application stream. - ReferenceSchema *SourceSchema `type:"structure"` - - // Provides the S3 bucket name, the object key name that contains the reference - // data. It also provides the Amazon Resource Name (ARN) of the IAM role that - // Amazon Kinesis Analytics can assume to read the Amazon S3 object and populate - // the in-application reference table. - // - // S3ReferenceDataSourceDescription is a required field - S3ReferenceDataSourceDescription *S3ReferenceDataSourceDescription `type:"structure" required:"true"` - - // The in-application table name created by the specific reference data source - // configuration. - // - // TableName is a required field - TableName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ReferenceDataSourceDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReferenceDataSourceDescription) GoString() string { - return s.String() -} - -// SetReferenceId sets the ReferenceId field's value. -func (s *ReferenceDataSourceDescription) SetReferenceId(v string) *ReferenceDataSourceDescription { - s.ReferenceId = &v - return s -} - -// SetReferenceSchema sets the ReferenceSchema field's value. -func (s *ReferenceDataSourceDescription) SetReferenceSchema(v *SourceSchema) *ReferenceDataSourceDescription { - s.ReferenceSchema = v - return s -} - -// SetS3ReferenceDataSourceDescription sets the S3ReferenceDataSourceDescription field's value. -func (s *ReferenceDataSourceDescription) SetS3ReferenceDataSourceDescription(v *S3ReferenceDataSourceDescription) *ReferenceDataSourceDescription { - s.S3ReferenceDataSourceDescription = v - return s -} - -// SetTableName sets the TableName field's value. -func (s *ReferenceDataSourceDescription) SetTableName(v string) *ReferenceDataSourceDescription { - s.TableName = &v - return s -} - -// When you update a reference data source configuration for an application, -// this object provides all the updated values (such as the source bucket name -// and object key name), the in-application table name that is created, and -// updated mapping information that maps the data in the Amazon S3 object to -// the in-application reference table that is created. -type ReferenceDataSourceUpdate struct { - _ struct{} `type:"structure"` - - // ID of the reference data source being updated. You can use the DescribeApplication - // operation to get this value. - // - // ReferenceId is a required field - ReferenceId *string `min:"1" type:"string" required:"true"` - - // Describes the format of the data in the streaming source, and how each data - // element maps to corresponding columns created in the in-application stream. - ReferenceSchemaUpdate *SourceSchema `type:"structure"` - - // Describes the S3 bucket name, object key name, and IAM role that Amazon Kinesis - // Analytics can assume to read the Amazon S3 object on your behalf and populate - // the in-application reference table. - S3ReferenceDataSourceUpdate *S3ReferenceDataSourceUpdate `type:"structure"` - - // In-application table name that is created by this update. - TableNameUpdate *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ReferenceDataSourceUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReferenceDataSourceUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReferenceDataSourceUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReferenceDataSourceUpdate"} - if s.ReferenceId == nil { - invalidParams.Add(request.NewErrParamRequired("ReferenceId")) - } - if s.ReferenceId != nil && len(*s.ReferenceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ReferenceId", 1)) - } - if s.TableNameUpdate != nil && len(*s.TableNameUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TableNameUpdate", 1)) - } - if s.ReferenceSchemaUpdate != nil { - if err := s.ReferenceSchemaUpdate.Validate(); err != nil { - invalidParams.AddNested("ReferenceSchemaUpdate", err.(request.ErrInvalidParams)) - } - } - if s.S3ReferenceDataSourceUpdate != nil { - if err := s.S3ReferenceDataSourceUpdate.Validate(); err != nil { - invalidParams.AddNested("S3ReferenceDataSourceUpdate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReferenceId sets the ReferenceId field's value. -func (s *ReferenceDataSourceUpdate) SetReferenceId(v string) *ReferenceDataSourceUpdate { - s.ReferenceId = &v - return s -} - -// SetReferenceSchemaUpdate sets the ReferenceSchemaUpdate field's value. -func (s *ReferenceDataSourceUpdate) SetReferenceSchemaUpdate(v *SourceSchema) *ReferenceDataSourceUpdate { - s.ReferenceSchemaUpdate = v - return s -} - -// SetS3ReferenceDataSourceUpdate sets the S3ReferenceDataSourceUpdate field's value. -func (s *ReferenceDataSourceUpdate) SetS3ReferenceDataSourceUpdate(v *S3ReferenceDataSourceUpdate) *ReferenceDataSourceUpdate { - s.S3ReferenceDataSourceUpdate = v - return s -} - -// SetTableNameUpdate sets the TableNameUpdate field's value. -func (s *ReferenceDataSourceUpdate) SetTableNameUpdate(v string) *ReferenceDataSourceUpdate { - s.TableNameUpdate = &v - return s -} - -// Provides a description of an Amazon S3 data source, including the Amazon -// Resource Name (ARN) of the S3 bucket, the ARN of the IAM role that is used -// to access the bucket, and the name of the Amazon S3 object that contains -// the data. -type S3Configuration struct { - _ struct{} `type:"structure"` - - // ARN of the S3 bucket that contains the data. - // - // BucketARN is a required field - BucketARN *string `min:"1" type:"string" required:"true"` - - // The name of the object that contains the data. - // - // FileKey is a required field - FileKey *string `min:"1" type:"string" required:"true"` - - // IAM ARN of the role used to access the data. - // - // RoleARN is a required field - RoleARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s S3Configuration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Configuration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3Configuration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3Configuration"} - if s.BucketARN == nil { - invalidParams.Add(request.NewErrParamRequired("BucketARN")) - } - if s.BucketARN != nil && len(*s.BucketARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BucketARN", 1)) - } - if s.FileKey == nil { - invalidParams.Add(request.NewErrParamRequired("FileKey")) - } - if s.FileKey != nil && len(*s.FileKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileKey", 1)) - } - if s.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.RoleARN != nil && len(*s.RoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketARN sets the BucketARN field's value. -func (s *S3Configuration) SetBucketARN(v string) *S3Configuration { - s.BucketARN = &v - return s -} - -// SetFileKey sets the FileKey field's value. -func (s *S3Configuration) SetFileKey(v string) *S3Configuration { - s.FileKey = &v - return s -} - -// SetRoleARN sets the RoleARN field's value. -func (s *S3Configuration) SetRoleARN(v string) *S3Configuration { - s.RoleARN = &v - return s -} - -// Identifies the S3 bucket and object that contains the reference data. Also -// identifies the IAM role Amazon Kinesis Analytics can assume to read this -// object on your behalf. -// -// An Amazon Kinesis Analytics application loads reference data only once. If -// the data changes, you call the UpdateApplication operation to trigger reloading -// of data into your application. -type S3ReferenceDataSource struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the S3 bucket. - // - // BucketARN is a required field - BucketARN *string `min:"1" type:"string" required:"true"` - - // Object key name containing reference data. - // - // FileKey is a required field - FileKey *string `min:"1" type:"string" required:"true"` - - // ARN of the IAM role that the service can assume to read data on your behalf. - // This role must have permission for the s3:GetObject action on the object - // and trust policy that allows Amazon Kinesis Analytics service principal to - // assume this role. - // - // ReferenceRoleARN is a required field - ReferenceRoleARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s S3ReferenceDataSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3ReferenceDataSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3ReferenceDataSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3ReferenceDataSource"} - if s.BucketARN == nil { - invalidParams.Add(request.NewErrParamRequired("BucketARN")) - } - if s.BucketARN != nil && len(*s.BucketARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BucketARN", 1)) - } - if s.FileKey == nil { - invalidParams.Add(request.NewErrParamRequired("FileKey")) - } - if s.FileKey != nil && len(*s.FileKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileKey", 1)) - } - if s.ReferenceRoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("ReferenceRoleARN")) - } - if s.ReferenceRoleARN != nil && len(*s.ReferenceRoleARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ReferenceRoleARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketARN sets the BucketARN field's value. -func (s *S3ReferenceDataSource) SetBucketARN(v string) *S3ReferenceDataSource { - s.BucketARN = &v - return s -} - -// SetFileKey sets the FileKey field's value. -func (s *S3ReferenceDataSource) SetFileKey(v string) *S3ReferenceDataSource { - s.FileKey = &v - return s -} - -// SetReferenceRoleARN sets the ReferenceRoleARN field's value. -func (s *S3ReferenceDataSource) SetReferenceRoleARN(v string) *S3ReferenceDataSource { - s.ReferenceRoleARN = &v - return s -} - -// Provides the bucket name and object key name that stores the reference data. -type S3ReferenceDataSourceDescription struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the S3 bucket. - // - // BucketARN is a required field - BucketARN *string `min:"1" type:"string" required:"true"` - - // Amazon S3 object key name. - // - // FileKey is a required field - FileKey *string `min:"1" type:"string" required:"true"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to read the - // Amazon S3 object on your behalf to populate the in-application reference - // table. - // - // ReferenceRoleARN is a required field - ReferenceRoleARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s S3ReferenceDataSourceDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3ReferenceDataSourceDescription) GoString() string { - return s.String() -} - -// SetBucketARN sets the BucketARN field's value. -func (s *S3ReferenceDataSourceDescription) SetBucketARN(v string) *S3ReferenceDataSourceDescription { - s.BucketARN = &v - return s -} - -// SetFileKey sets the FileKey field's value. -func (s *S3ReferenceDataSourceDescription) SetFileKey(v string) *S3ReferenceDataSourceDescription { - s.FileKey = &v - return s -} - -// SetReferenceRoleARN sets the ReferenceRoleARN field's value. -func (s *S3ReferenceDataSourceDescription) SetReferenceRoleARN(v string) *S3ReferenceDataSourceDescription { - s.ReferenceRoleARN = &v - return s -} - -// Describes the S3 bucket name, object key name, and IAM role that Amazon Kinesis -// Analytics can assume to read the Amazon S3 object on your behalf and populate -// the in-application reference table. -type S3ReferenceDataSourceUpdate struct { - _ struct{} `type:"structure"` - - // Amazon Resource Name (ARN) of the S3 bucket. - BucketARNUpdate *string `min:"1" type:"string"` - - // Object key name. - FileKeyUpdate *string `min:"1" type:"string"` - - // ARN of the IAM role that Amazon Kinesis Analytics can assume to read the - // Amazon S3 object and populate the in-application. - ReferenceRoleARNUpdate *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s S3ReferenceDataSourceUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3ReferenceDataSourceUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3ReferenceDataSourceUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3ReferenceDataSourceUpdate"} - if s.BucketARNUpdate != nil && len(*s.BucketARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BucketARNUpdate", 1)) - } - if s.FileKeyUpdate != nil && len(*s.FileKeyUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileKeyUpdate", 1)) - } - if s.ReferenceRoleARNUpdate != nil && len(*s.ReferenceRoleARNUpdate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ReferenceRoleARNUpdate", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketARNUpdate sets the BucketARNUpdate field's value. -func (s *S3ReferenceDataSourceUpdate) SetBucketARNUpdate(v string) *S3ReferenceDataSourceUpdate { - s.BucketARNUpdate = &v - return s -} - -// SetFileKeyUpdate sets the FileKeyUpdate field's value. -func (s *S3ReferenceDataSourceUpdate) SetFileKeyUpdate(v string) *S3ReferenceDataSourceUpdate { - s.FileKeyUpdate = &v - return s -} - -// SetReferenceRoleARNUpdate sets the ReferenceRoleARNUpdate field's value. -func (s *S3ReferenceDataSourceUpdate) SetReferenceRoleARNUpdate(v string) *S3ReferenceDataSourceUpdate { - s.ReferenceRoleARNUpdate = &v - return s -} - -// Describes the format of the data in the streaming source, and how each data -// element maps to corresponding columns created in the in-application stream. -type SourceSchema struct { - _ struct{} `type:"structure"` - - // A list of RecordColumn objects. - // - // RecordColumns is a required field - RecordColumns []*RecordColumn `min:"1" type:"list" required:"true"` - - // Specifies the encoding of the records in the streaming source. For example, - // UTF-8. - RecordEncoding *string `type:"string"` - - // Specifies the format of the records on the streaming source. - // - // RecordFormat is a required field - RecordFormat *RecordFormat `type:"structure" required:"true"` -} - -// String returns the string representation -func (s SourceSchema) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SourceSchema) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SourceSchema) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SourceSchema"} - if s.RecordColumns == nil { - invalidParams.Add(request.NewErrParamRequired("RecordColumns")) - } - if s.RecordColumns != nil && len(s.RecordColumns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RecordColumns", 1)) - } - if s.RecordFormat == nil { - invalidParams.Add(request.NewErrParamRequired("RecordFormat")) - } - if s.RecordColumns != nil { - for i, v := range s.RecordColumns { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RecordColumns", i), err.(request.ErrInvalidParams)) - } - } - } - if s.RecordFormat != nil { - if err := s.RecordFormat.Validate(); err != nil { - invalidParams.AddNested("RecordFormat", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRecordColumns sets the RecordColumns field's value. -func (s *SourceSchema) SetRecordColumns(v []*RecordColumn) *SourceSchema { - s.RecordColumns = v - return s -} - -// SetRecordEncoding sets the RecordEncoding field's value. -func (s *SourceSchema) SetRecordEncoding(v string) *SourceSchema { - s.RecordEncoding = &v - return s -} - -// SetRecordFormat sets the RecordFormat field's value. -func (s *SourceSchema) SetRecordFormat(v *RecordFormat) *SourceSchema { - s.RecordFormat = v - return s -} - -type StartApplicationInput struct { - _ struct{} `type:"structure"` - - // Name of the application. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Identifies the specific input, by ID, that the application starts consuming. - // Amazon Kinesis Analytics starts reading the streaming source associated with - // the input. You can also specify where in the streaming source you want Amazon - // Kinesis Analytics to start reading. - // - // InputConfigurations is a required field - InputConfigurations []*InputConfiguration `type:"list" required:"true"` -} - -// String returns the string representation -func (s StartApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartApplicationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.InputConfigurations == nil { - invalidParams.Add(request.NewErrParamRequired("InputConfigurations")) - } - if s.InputConfigurations != nil { - for i, v := range s.InputConfigurations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputConfigurations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *StartApplicationInput) SetApplicationName(v string) *StartApplicationInput { - s.ApplicationName = &v - return s -} - -// SetInputConfigurations sets the InputConfigurations field's value. -func (s *StartApplicationInput) SetInputConfigurations(v []*InputConfiguration) *StartApplicationInput { - s.InputConfigurations = v - return s -} - -type StartApplicationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StartApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartApplicationOutput) GoString() string { - return s.String() -} - -type StopApplicationInput struct { - _ struct{} `type:"structure"` - - // Name of the running application to stop. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopApplicationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *StopApplicationInput) SetApplicationName(v string) *StopApplicationInput { - s.ApplicationName = &v - return s -} - -type StopApplicationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopApplicationOutput) GoString() string { - return s.String() -} - -type UpdateApplicationInput struct { - _ struct{} `type:"structure"` - - // Name of the Amazon Kinesis Analytics application to update. - // - // ApplicationName is a required field - ApplicationName *string `min:"1" type:"string" required:"true"` - - // Describes application updates. - // - // ApplicationUpdate is a required field - ApplicationUpdate *ApplicationUpdate `type:"structure" required:"true"` - - // The current application version ID. You can use the DescribeApplication operation - // to get this value. - // - // CurrentApplicationVersionId is a required field - CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` -} - -// String returns the string representation -func (s UpdateApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationInput"} - if s.ApplicationName == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationName")) - } - if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) - } - if s.ApplicationUpdate == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationUpdate")) - } - if s.CurrentApplicationVersionId == nil { - invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) - } - if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { - invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) - } - if s.ApplicationUpdate != nil { - if err := s.ApplicationUpdate.Validate(); err != nil { - invalidParams.AddNested("ApplicationUpdate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationName sets the ApplicationName field's value. -func (s *UpdateApplicationInput) SetApplicationName(v string) *UpdateApplicationInput { - s.ApplicationName = &v - return s -} - -// SetApplicationUpdate sets the ApplicationUpdate field's value. -func (s *UpdateApplicationInput) SetApplicationUpdate(v *ApplicationUpdate) *UpdateApplicationInput { - s.ApplicationUpdate = v - return s -} - -// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. -func (s *UpdateApplicationInput) SetCurrentApplicationVersionId(v int64) *UpdateApplicationInput { - s.CurrentApplicationVersionId = &v - return s -} - -type UpdateApplicationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApplicationOutput) GoString() string { - return s.String() -} - -const ( - // ApplicationStatusDeleting is a ApplicationStatus enum value - ApplicationStatusDeleting = "DELETING" - - // ApplicationStatusStarting is a ApplicationStatus enum value - ApplicationStatusStarting = "STARTING" - - // ApplicationStatusStopping is a ApplicationStatus enum value - ApplicationStatusStopping = "STOPPING" - - // ApplicationStatusReady is a ApplicationStatus enum value - ApplicationStatusReady = "READY" - - // ApplicationStatusRunning is a ApplicationStatus enum value - ApplicationStatusRunning = "RUNNING" - - // ApplicationStatusUpdating is a ApplicationStatus enum value - ApplicationStatusUpdating = "UPDATING" -) - -const ( - // InputStartingPositionNow is a InputStartingPosition enum value - InputStartingPositionNow = "NOW" - - // InputStartingPositionTrimHorizon is a InputStartingPosition enum value - InputStartingPositionTrimHorizon = "TRIM_HORIZON" - - // InputStartingPositionLastStoppedPoint is a InputStartingPosition enum value - InputStartingPositionLastStoppedPoint = "LAST_STOPPED_POINT" -) - -const ( - // RecordFormatTypeJson is a RecordFormatType enum value - RecordFormatTypeJson = "JSON" - - // RecordFormatTypeCsv is a RecordFormatType enum value - RecordFormatTypeCsv = "CSV" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/doc.go b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/doc.go deleted file mode 100644 index 8e2c78113..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/doc.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package kinesisanalytics provides the client and types for making API -// requests to Amazon Kinesis Analytics. -// -// See https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14 for more information on this service. -// -// See kinesisanalytics package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/kinesisanalytics/ -// -// Using the Client -// -// To contact Amazon Kinesis Analytics with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Kinesis Analytics client KinesisAnalytics for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/kinesisanalytics/#New -package kinesisanalytics diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/errors.go b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/errors.go deleted file mode 100644 index 7091938f1..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/errors.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package kinesisanalytics - -const ( - - // ErrCodeCodeValidationException for service response error code - // "CodeValidationException". - // - // User-provided application code (query) is invalid. This can be a simple syntax - // error. - ErrCodeCodeValidationException = "CodeValidationException" - - // ErrCodeConcurrentModificationException for service response error code - // "ConcurrentModificationException". - // - // Exception thrown as a result of concurrent modification to an application. - // For example, two individuals attempting to edit the same application at the - // same time. - ErrCodeConcurrentModificationException = "ConcurrentModificationException" - - // ErrCodeInvalidApplicationConfigurationException for service response error code - // "InvalidApplicationConfigurationException". - // - // User-provided application configuration is not valid. - ErrCodeInvalidApplicationConfigurationException = "InvalidApplicationConfigurationException" - - // ErrCodeInvalidArgumentException for service response error code - // "InvalidArgumentException". - // - // Specified input parameter value is invalid. - ErrCodeInvalidArgumentException = "InvalidArgumentException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // Exceeded the number of applications allowed. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUseException". - // - // Application is not available for this operation. - ErrCodeResourceInUseException = "ResourceInUseException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // Specified application can't be found. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeResourceProvisionedThroughputExceededException for service response error code - // "ResourceProvisionedThroughputExceededException". - // - // Discovery failed to get a record from the streaming source because of the - // Amazon Kinesis Streams ProvisionedThroughputExceededException. For more information, - // see GetRecords (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetRecords.html) - // in the Amazon Kinesis Streams API Reference. - ErrCodeResourceProvisionedThroughputExceededException = "ResourceProvisionedThroughputExceededException" - - // ErrCodeServiceUnavailableException for service response error code - // "ServiceUnavailableException". - // - // The service is unavailable. Back off and retry the operation. - ErrCodeServiceUnavailableException = "ServiceUnavailableException" - - // ErrCodeUnableToDetectSchemaException for service response error code - // "UnableToDetectSchemaException". - // - // Data format is not valid. Amazon Kinesis Analytics is not able to detect - // schema for the given streaming source. - ErrCodeUnableToDetectSchemaException = "UnableToDetectSchemaException" - - // ErrCodeUnsupportedOperationException for service response error code - // "UnsupportedOperationException". - ErrCodeUnsupportedOperationException = "UnsupportedOperationException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/service.go b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/service.go deleted file mode 100644 index 153daad6e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package kinesisanalytics - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// KinesisAnalytics provides the API operation methods for making requests to -// Amazon Kinesis Analytics. See this package's package overview docs -// for details on the service. -// -// KinesisAnalytics methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type KinesisAnalytics 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 = "kinesisanalytics" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Kinesis Analytics" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the KinesisAnalytics 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 KinesisAnalytics client from just a session. -// svc := kinesisanalytics.New(mySession) -// -// // Create a KinesisAnalytics client with additional configuration -// svc := kinesisanalytics.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *KinesisAnalytics { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *KinesisAnalytics { - svc := &KinesisAnalytics{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-08-14", - JSONVersion: "1.1", - TargetPrefix: "KinesisAnalytics_20150814", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a KinesisAnalytics operation and runs any -// custom request initialization. -func (c *KinesisAnalytics) 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/kms/api.go b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go deleted file mode 100644 index e669ba46f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go +++ /dev/null @@ -1,10216 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package kms - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCancelKeyDeletion = "CancelKeyDeletion" - -// CancelKeyDeletionRequest generates a "aws/request.Request" representing the -// client's request for the CancelKeyDeletion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelKeyDeletion for more information on using the CancelKeyDeletion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelKeyDeletionRequest method. -// req, resp := client.CancelKeyDeletionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CancelKeyDeletion -func (c *KMS) CancelKeyDeletionRequest(input *CancelKeyDeletionInput) (req *request.Request, output *CancelKeyDeletionOutput) { - op := &request.Operation{ - Name: opCancelKeyDeletion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelKeyDeletionInput{} - } - - output = &CancelKeyDeletionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelKeyDeletion API operation for AWS Key Management Service. -// -// Cancels the deletion of a customer master key (CMK). When this operation -// is successful, the CMK is set to the Disabled state. To enable a CMK, use -// EnableKey. You cannot perform this operation on a CMK in a different AWS -// account. -// -// For more information about scheduling and canceling deletion of a CMK, see -// Deleting Customer Master Keys (http://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html) -// in the AWS Key Management Service Developer Guide. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation CancelKeyDeletion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CancelKeyDeletion -func (c *KMS) CancelKeyDeletion(input *CancelKeyDeletionInput) (*CancelKeyDeletionOutput, error) { - req, out := c.CancelKeyDeletionRequest(input) - return out, req.Send() -} - -// CancelKeyDeletionWithContext is the same as CancelKeyDeletion with the addition of -// the ability to pass a context and additional request options. -// -// See CancelKeyDeletion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) CancelKeyDeletionWithContext(ctx aws.Context, input *CancelKeyDeletionInput, opts ...request.Option) (*CancelKeyDeletionOutput, error) { - req, out := c.CancelKeyDeletionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opConnectCustomKeyStore = "ConnectCustomKeyStore" - -// ConnectCustomKeyStoreRequest generates a "aws/request.Request" representing the -// client's request for the ConnectCustomKeyStore operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ConnectCustomKeyStore for more information on using the ConnectCustomKeyStore -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ConnectCustomKeyStoreRequest method. -// req, resp := client.ConnectCustomKeyStoreRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ConnectCustomKeyStore -func (c *KMS) ConnectCustomKeyStoreRequest(input *ConnectCustomKeyStoreInput) (req *request.Request, output *ConnectCustomKeyStoreOutput) { - op := &request.Operation{ - Name: opConnectCustomKeyStore, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ConnectCustomKeyStoreInput{} - } - - output = &ConnectCustomKeyStoreOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ConnectCustomKeyStore API operation for AWS Key Management Service. -// -// Connects or reconnects a custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html) -// to its associated AWS CloudHSM cluster. -// -// The custom key store must be connected before you can create customer master -// keys (CMKs) in the key store or use the CMKs it contains. You can disconnect -// and reconnect a custom key store at any time. -// -// To connect a custom key store, its associated AWS CloudHSM cluster must have -// at least one active HSM. To get the number of active HSMs in a cluster, use -// the DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters) -// operation. To add HSMs to the cluster, use the CreateHsm (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm) -// operation. -// -// The connection process can take an extended amount of time to complete; up -// to 20 minutes. This operation starts the connection process, but it does -// not wait for it to complete. When it succeeds, this operation quickly returns -// an HTTP 200 response and a JSON object with no properties. However, this -// response does not indicate that the custom key store is connected. To get -// the connection state of the custom key store, use the DescribeCustomKeyStores -// operation. -// -// During the connection process, AWS KMS finds the AWS CloudHSM cluster that -// is associated with the custom key store, creates the connection infrastructure, -// connects to the cluster, logs into the AWS CloudHSM client as the kmsuser -// (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser) -// crypto user (CU), and rotates its password. -// -// The ConnectCustomKeyStore operation might fail for various reasons. To find -// the reason, use the DescribeCustomKeyStores operation and see the ConnectionErrorCode -// in the response. For help interpreting the ConnectionErrorCode, see CustomKeyStoresListEntry. -// -// To fix the failure, use the DisconnectCustomKeyStore operation to disconnect -// the custom key store, correct the error, use the UpdateCustomKeyStore operation -// if necessary, and then use ConnectCustomKeyStore again. -// -// If you are having trouble connecting or disconnecting a custom key store, -// see Troubleshooting a Custom Key Store (http://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation ConnectCustomKeyStore for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmClusterNotActiveException "CloudHsmClusterNotActiveException" -// The request was rejected because the AWS CloudHSM cluster that is associated -// with the custom key store is not active. Initialize and activate the cluster -// and try the command again. For detailed instructions, see Getting Started -// (http://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html) -// in the AWS CloudHSM User Guide. -// -// * ErrCodeCustomKeyStoreInvalidStateException "CustomKeyStoreInvalidStateException" -// The request was rejected because of the ConnectionState of the custom key -// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores -// operation. -// -// This exception is thrown under the following conditions: -// -// * You requested the CreateKey or GenerateRandom operation in a custom -// key store that is not connected. These operations are valid only when -// the custom key store ConnectionState is CONNECTED. -// -// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation -// on a custom key store that is not disconnected. This operation is valid -// only when the custom key store ConnectionState is DISCONNECTED. -// -// * You requested the ConnectCustomKeyStore operation on a custom key store -// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid -// for all other ConnectionState values. -// -// * ErrCodeCustomKeyStoreNotFoundException "CustomKeyStoreNotFoundException" -// The request was rejected because AWS KMS cannot find a custom key store with -// the specified key store name or ID. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeCloudHsmClusterInvalidConfigurationException "CloudHsmClusterInvalidConfigurationException" -// The request was rejected because the associated AWS CloudHSM cluster did -// not meet the configuration requirements for a custom key store. The cluster -// must be configured with private subnets in at least two different Availability -// Zones in the Region. Also, it must contain at least as many HSMs as the operation -// requires. -// -// For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey operations, -// the AWS CloudHSM cluster must have at least two active HSMs, each in a different -// Availability Zone. For the ConnectCustomKeyStore operation, the AWS CloudHSM -// must contain at least one active HSM. -// -// For information about creating a private subnet for a AWS CloudHSM cluster, -// see Create a Private Subnet (http://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html) -// in the AWS CloudHSM User Guide. To add HSMs, use the AWS CloudHSM CreateHsm -// (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html) -// operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ConnectCustomKeyStore -func (c *KMS) ConnectCustomKeyStore(input *ConnectCustomKeyStoreInput) (*ConnectCustomKeyStoreOutput, error) { - req, out := c.ConnectCustomKeyStoreRequest(input) - return out, req.Send() -} - -// ConnectCustomKeyStoreWithContext is the same as ConnectCustomKeyStore with the addition of -// the ability to pass a context and additional request options. -// -// See ConnectCustomKeyStore for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) ConnectCustomKeyStoreWithContext(ctx aws.Context, input *ConnectCustomKeyStoreInput, opts ...request.Option) (*ConnectCustomKeyStoreOutput, error) { - req, out := c.ConnectCustomKeyStoreRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAlias = "CreateAlias" - -// CreateAliasRequest generates a "aws/request.Request" representing the -// client's request for the CreateAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAlias for more information on using the CreateAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAliasRequest method. -// req, resp := client.CreateAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateAlias -func (c *KMS) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *CreateAliasOutput) { - op := &request.Operation{ - Name: opCreateAlias, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAliasInput{} - } - - output = &CreateAliasOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateAlias API operation for AWS Key Management Service. -// -// Creates a display name for a customer master key (CMK). You can use an alias -// to identify a CMK in selected operations, such as Encrypt and GenerateDataKey. -// -// Each CMK can have multiple aliases, but each alias points to only one CMK. -// The alias name must be unique in the AWS account and region. To simplify -// code that runs in multiple regions, use the same alias name, but point it -// to a different CMK in each region. -// -// Because an alias is not a property of a CMK, you can delete and change the -// aliases of a CMK without affecting the CMK. Also, aliases do not appear in -// the response from the DescribeKey operation. To get the aliases of all CMKs, -// use the ListAliases operation. -// -// An alias must start with the word alias followed by a forward slash (alias/). -// The alias name can contain only alphanumeric characters, forward slashes -// (/), underscores (_), and dashes (-). Alias names cannot begin with aws; -// that alias name prefix is reserved by Amazon Web Services (AWS). -// -// The alias and the CMK it is mapped to must be in the same AWS account and -// the same region. You cannot perform this operation on an alias in a different -// AWS account. -// -// To map an existing alias to a different CMK, call UpdateAlias. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation CreateAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInvalidAliasNameException "InvalidAliasNameException" -// The request was rejected because the specified alias name is not valid. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because a limit was exceeded. For more information, -// see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateAlias -func (c *KMS) CreateAlias(input *CreateAliasInput) (*CreateAliasOutput, error) { - req, out := c.CreateAliasRequest(input) - return out, req.Send() -} - -// CreateAliasWithContext is the same as CreateAlias with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) CreateAliasWithContext(ctx aws.Context, input *CreateAliasInput, opts ...request.Option) (*CreateAliasOutput, error) { - req, out := c.CreateAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCustomKeyStore = "CreateCustomKeyStore" - -// CreateCustomKeyStoreRequest generates a "aws/request.Request" representing the -// client's request for the CreateCustomKeyStore operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCustomKeyStore for more information on using the CreateCustomKeyStore -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCustomKeyStoreRequest method. -// req, resp := client.CreateCustomKeyStoreRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateCustomKeyStore -func (c *KMS) CreateCustomKeyStoreRequest(input *CreateCustomKeyStoreInput) (req *request.Request, output *CreateCustomKeyStoreOutput) { - op := &request.Operation{ - Name: opCreateCustomKeyStore, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCustomKeyStoreInput{} - } - - output = &CreateCustomKeyStoreOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCustomKeyStore API operation for AWS Key Management Service. -// -// Creates a custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html) -// that is associated with an AWS CloudHSM cluster (http://docs.aws.amazon.com/cloudhsm/latest/userguide/clusters.html) -// that you own and manage. -// -// This operation is part of the Custom Key Store feature (http://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) -// feature in AWS KMS, which combines the convenience and extensive integration -// of AWS KMS with the isolation and control of a single-tenant key store. -// -// When the operation completes successfully, it returns the ID of the new custom -// key store. Before you can use your new custom key store, you need to use -// the ConnectCustomKeyStore operation to connect the new key store to its AWS -// CloudHSM cluster. -// -// The CreateCustomKeyStore operation requires the following elements. -// -// * You must specify an active AWS CloudHSM cluster in the same account -// and AWS Region as the custom key store. You can use an existing cluster -// or create and activate a new AWS CloudHSM cluster (http://docs.aws.amazon.com/cloudhsm/latest/userguide/create-cluster.html) -// for the key store. AWS KMS does not require exclusive use of the cluster. -// -// * You must include the content of the trust anchor certificate for the -// cluster. You created this certificate, and saved it in the customerCA.crt -// file, when you initialized the cluster (http://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr). -// -// * You must provide the password of the dedicated kmsuser (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser) -// crypto user (CU) account in the cluster. -// -// Before you create the custom key store, use the createUser (http://docs.aws.amazon.com/cloudhsm/latest/userguide/cloudhsm_mgmt_util-createUser.html) -// command in cloudhsm_mgmt_util to create a crypto user (CU) named (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser)kmsuserin -// specified AWS CloudHSM cluster. AWS KMS uses the kmsuser CU account to -// create and manage key material on your behalf. For instructions, see Create -// the kmsuser Crypto User (http://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore) -// in the AWS Key Management Service Developer Guide. -// -// The AWS CloudHSM cluster that you specify must meet the following requirements. -// -// * The cluster must be active and be in the same AWS account and Region -// as the custom key store. -// -// * Each custom key store must be associated with a different AWS CloudHSM -// cluster. The cluster cannot be associated with another custom key store -// or have the same cluster certificate as a cluster that is associated with -// another custom key store. To view the cluster certificate, use the AWS -// CloudHSM DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) -// operation. Clusters that share a backup history have the same cluster -// certificate. -// -// * The cluster must be configured with subnets in at least two different -// Availability Zones in the Region. Because AWS CloudHSM is not supported -// in all Availability Zones, we recommend that the cluster have subnets -// in all Availability Zones in the Region. -// -// * The cluster must contain at least two active HSMs, each in a different -// Availability Zone. -// -// New custom key stores are not automatically connected. After you create your -// custom key store, use the ConnectCustomKeyStore operation to connect the -// custom key store to its associated AWS CloudHSM cluster. Even if you are -// not going to use your custom key store immediately, you might want to connect -// it to verify that all settings are correct and then disconnect it until you -// are ready to use it. -// -// If this operation succeeds, it returns the ID of the new custom key store. -// For help with failures, see Troubleshoot a Custom Key Store (http://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html) -// in the AWS KMS Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation CreateCustomKeyStore for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCloudHsmClusterInUseException "CloudHsmClusterInUseException" -// The request was rejected because the specified AWS CloudHSM cluster is already -// associated with a custom key store or it shares a backup history with a cluster -// that is associated with a custom key store. Each custom key store must be -// associated with a different AWS CloudHSM cluster. -// -// Clusters that share a backup history have the same cluster certificate. To -// view the cluster certificate of a cluster, use the DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) -// operation. -// -// * ErrCodeCustomKeyStoreNameInUseException "CustomKeyStoreNameInUseException" -// The request was rejected because the specified custom key store name is already -// assigned to another custom key store in the account. Try again with a custom -// key store name that is unique in the account. -// -// * ErrCodeCloudHsmClusterNotFoundException "CloudHsmClusterNotFoundException" -// The request was rejected because AWS KMS cannot find the AWS CloudHSM cluster -// with the specified cluster ID. Retry the request with a different cluster -// ID. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeCloudHsmClusterNotActiveException "CloudHsmClusterNotActiveException" -// The request was rejected because the AWS CloudHSM cluster that is associated -// with the custom key store is not active. Initialize and activate the cluster -// and try the command again. For detailed instructions, see Getting Started -// (http://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html) -// in the AWS CloudHSM User Guide. -// -// * ErrCodeIncorrectTrustAnchorException "IncorrectTrustAnchorException" -// The request was rejected because the trust anchor certificate in the request -// is not the trust anchor certificate for the specified AWS CloudHSM cluster. -// -// When you initialize the cluster (http://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr), -// you create the trust anchor certificate and save it in the customerCA.crt -// file. -// -// * ErrCodeCloudHsmClusterInvalidConfigurationException "CloudHsmClusterInvalidConfigurationException" -// The request was rejected because the associated AWS CloudHSM cluster did -// not meet the configuration requirements for a custom key store. The cluster -// must be configured with private subnets in at least two different Availability -// Zones in the Region. Also, it must contain at least as many HSMs as the operation -// requires. -// -// For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey operations, -// the AWS CloudHSM cluster must have at least two active HSMs, each in a different -// Availability Zone. For the ConnectCustomKeyStore operation, the AWS CloudHSM -// must contain at least one active HSM. -// -// For information about creating a private subnet for a AWS CloudHSM cluster, -// see Create a Private Subnet (http://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html) -// in the AWS CloudHSM User Guide. To add HSMs, use the AWS CloudHSM CreateHsm -// (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html) -// operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateCustomKeyStore -func (c *KMS) CreateCustomKeyStore(input *CreateCustomKeyStoreInput) (*CreateCustomKeyStoreOutput, error) { - req, out := c.CreateCustomKeyStoreRequest(input) - return out, req.Send() -} - -// CreateCustomKeyStoreWithContext is the same as CreateCustomKeyStore with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCustomKeyStore for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) CreateCustomKeyStoreWithContext(ctx aws.Context, input *CreateCustomKeyStoreInput, opts ...request.Option) (*CreateCustomKeyStoreOutput, error) { - req, out := c.CreateCustomKeyStoreRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateGrant = "CreateGrant" - -// CreateGrantRequest generates a "aws/request.Request" representing the -// client's request for the CreateGrant operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateGrant for more information on using the CreateGrant -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateGrantRequest method. -// req, resp := client.CreateGrantRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateGrant -func (c *KMS) CreateGrantRequest(input *CreateGrantInput) (req *request.Request, output *CreateGrantOutput) { - op := &request.Operation{ - Name: opCreateGrant, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateGrantInput{} - } - - output = &CreateGrantOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateGrant API operation for AWS Key Management Service. -// -// Adds a grant to a customer master key (CMK). The grant specifies who can -// use the CMK and under what conditions. When setting permissions, grants are -// an alternative to key policies. -// -// To perform this operation on a CMK in a different AWS account, specify the -// key ARN in the value of the KeyId parameter. For more information about grants, -// see Grants (http://docs.aws.amazon.com/kms/latest/developerguide/grants.html) -// in the AWS Key Management Service Developer Guide. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation CreateGrant for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeDisabledException "DisabledException" -// The request was rejected because the specified CMK is not enabled. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidGrantTokenException "InvalidGrantTokenException" -// The request was rejected because the specified grant token is not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because a limit was exceeded. For more information, -// see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateGrant -func (c *KMS) CreateGrant(input *CreateGrantInput) (*CreateGrantOutput, error) { - req, out := c.CreateGrantRequest(input) - return out, req.Send() -} - -// CreateGrantWithContext is the same as CreateGrant with the addition of -// the ability to pass a context and additional request options. -// -// See CreateGrant for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) CreateGrantWithContext(ctx aws.Context, input *CreateGrantInput, opts ...request.Option) (*CreateGrantOutput, error) { - req, out := c.CreateGrantRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateKey = "CreateKey" - -// CreateKeyRequest generates a "aws/request.Request" representing the -// client's request for the CreateKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateKey for more information on using the CreateKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateKeyRequest method. -// req, resp := client.CreateKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateKey -func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, output *CreateKeyOutput) { - op := &request.Operation{ - Name: opCreateKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateKeyInput{} - } - - output = &CreateKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateKey API operation for AWS Key Management Service. -// -// Creates a customer master key (CMK) in the caller's AWS account. -// -// You can use a CMK to encrypt small amounts of data (4 KiB or less) directly, -// but CMKs are more commonly used to encrypt data keys, which are used to encrypt -// raw data. For more information about data keys and the difference between -// CMKs and data keys, see the following: -// -// * The GenerateDataKey operation -// -// * AWS Key Management Service Concepts (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html) -// in the AWS Key Management Service Developer Guide -// -// If you plan to import key material (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html), -// use the Origin parameter with a value of EXTERNAL to create a CMK with no -// key material. -// -// To create a CMK in a custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html), -// use CustomKeyStoreId parameter to specify the custom key store. You must -// also use the Origin parameter with a value of AWS_CLOUDHSM. The AWS CloudHSM -// cluster that is associated with the custom key store must have at least two -// active HSMs, each in a different Availability Zone in the Region. -// -// You cannot use this operation to create a CMK in a different AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation CreateKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" -// The request was rejected because the specified policy is not syntactically -// or semantically correct. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The request was rejected because a specified parameter is not supported or -// a specified resource is not valid for this operation. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because a limit was exceeded. For more information, -// see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeTagException "TagException" -// The request was rejected because one or more tags are not valid. -// -// * ErrCodeCustomKeyStoreNotFoundException "CustomKeyStoreNotFoundException" -// The request was rejected because AWS KMS cannot find a custom key store with -// the specified key store name or ID. -// -// * ErrCodeCustomKeyStoreInvalidStateException "CustomKeyStoreInvalidStateException" -// The request was rejected because of the ConnectionState of the custom key -// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores -// operation. -// -// This exception is thrown under the following conditions: -// -// * You requested the CreateKey or GenerateRandom operation in a custom -// key store that is not connected. These operations are valid only when -// the custom key store ConnectionState is CONNECTED. -// -// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation -// on a custom key store that is not disconnected. This operation is valid -// only when the custom key store ConnectionState is DISCONNECTED. -// -// * You requested the ConnectCustomKeyStore operation on a custom key store -// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid -// for all other ConnectionState values. -// -// * ErrCodeCloudHsmClusterInvalidConfigurationException "CloudHsmClusterInvalidConfigurationException" -// The request was rejected because the associated AWS CloudHSM cluster did -// not meet the configuration requirements for a custom key store. The cluster -// must be configured with private subnets in at least two different Availability -// Zones in the Region. Also, it must contain at least as many HSMs as the operation -// requires. -// -// For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey operations, -// the AWS CloudHSM cluster must have at least two active HSMs, each in a different -// Availability Zone. For the ConnectCustomKeyStore operation, the AWS CloudHSM -// must contain at least one active HSM. -// -// For information about creating a private subnet for a AWS CloudHSM cluster, -// see Create a Private Subnet (http://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html) -// in the AWS CloudHSM User Guide. To add HSMs, use the AWS CloudHSM CreateHsm -// (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html) -// operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateKey -func (c *KMS) CreateKey(input *CreateKeyInput) (*CreateKeyOutput, error) { - req, out := c.CreateKeyRequest(input) - return out, req.Send() -} - -// CreateKeyWithContext is the same as CreateKey with the addition of -// the ability to pass a context and additional request options. -// -// See CreateKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) CreateKeyWithContext(ctx aws.Context, input *CreateKeyInput, opts ...request.Option) (*CreateKeyOutput, error) { - req, out := c.CreateKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDecrypt = "Decrypt" - -// DecryptRequest generates a "aws/request.Request" representing the -// client's request for the Decrypt operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See Decrypt for more information on using the Decrypt -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DecryptRequest method. -// req, resp := client.DecryptRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/Decrypt -func (c *KMS) DecryptRequest(input *DecryptInput) (req *request.Request, output *DecryptOutput) { - op := &request.Operation{ - Name: opDecrypt, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DecryptInput{} - } - - output = &DecryptOutput{} - req = c.newRequest(op, input, output) - return -} - -// Decrypt API operation for AWS Key Management Service. -// -// Decrypts ciphertext. Ciphertext is plaintext that has been previously encrypted -// by using any of the following operations: -// -// * GenerateDataKey -// -// * GenerateDataKeyWithoutPlaintext -// -// * Encrypt -// -// Note that if a caller has been granted access permissions to all keys (through, -// for example, IAM user policies that grant Decrypt permission on all resources), -// then ciphertext encrypted by using keys in other accounts where the key grants -// access to the caller can be decrypted. To remedy this, we recommend that -// you do not grant Decrypt access in an IAM user policy. Instead grant Decrypt -// access only in key policies. If you must grant Decrypt access in an IAM user -// policy, you should scope the resource to specific keys or to specific trusted -// accounts. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation Decrypt for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeDisabledException "DisabledException" -// The request was rejected because the specified CMK is not enabled. -// -// * ErrCodeInvalidCiphertextException "InvalidCiphertextException" -// The request was rejected because the specified ciphertext, or additional -// authenticated data incorporated into the ciphertext, such as the encryption -// context, is corrupted, missing, or otherwise invalid. -// -// * ErrCodeKeyUnavailableException "KeyUnavailableException" -// The request was rejected because the specified CMK was not available. The -// request can be retried. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInvalidGrantTokenException "InvalidGrantTokenException" -// The request was rejected because the specified grant token is not valid. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/Decrypt -func (c *KMS) Decrypt(input *DecryptInput) (*DecryptOutput, error) { - req, out := c.DecryptRequest(input) - return out, req.Send() -} - -// DecryptWithContext is the same as Decrypt with the addition of -// the ability to pass a context and additional request options. -// -// See Decrypt for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) DecryptWithContext(ctx aws.Context, input *DecryptInput, opts ...request.Option) (*DecryptOutput, error) { - req, out := c.DecryptRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAlias = "DeleteAlias" - -// DeleteAliasRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAlias for more information on using the DeleteAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAliasRequest method. -// req, resp := client.DeleteAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeleteAlias -func (c *KMS) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, output *DeleteAliasOutput) { - op := &request.Operation{ - Name: opDeleteAlias, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAliasInput{} - } - - output = &DeleteAliasOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAlias API operation for AWS Key Management Service. -// -// Deletes the specified alias. You cannot perform this operation on an alias -// in a different AWS account. -// -// Because an alias is not a property of a CMK, you can delete and change the -// aliases of a CMK without affecting the CMK. Also, aliases do not appear in -// the response from the DescribeKey operation. To get the aliases of all CMKs, -// use the ListAliases operation. -// -// Each CMK can have multiple aliases. To change the alias of a CMK, use DeleteAlias -// to delete the current alias and CreateAlias to create a new alias. To associate -// an existing alias with a different customer master key (CMK), call UpdateAlias. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation DeleteAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeleteAlias -func (c *KMS) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) { - req, out := c.DeleteAliasRequest(input) - return out, req.Send() -} - -// DeleteAliasWithContext is the same as DeleteAlias with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) DeleteAliasWithContext(ctx aws.Context, input *DeleteAliasInput, opts ...request.Option) (*DeleteAliasOutput, error) { - req, out := c.DeleteAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCustomKeyStore = "DeleteCustomKeyStore" - -// DeleteCustomKeyStoreRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCustomKeyStore operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCustomKeyStore for more information on using the DeleteCustomKeyStore -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCustomKeyStoreRequest method. -// req, resp := client.DeleteCustomKeyStoreRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeleteCustomKeyStore -func (c *KMS) DeleteCustomKeyStoreRequest(input *DeleteCustomKeyStoreInput) (req *request.Request, output *DeleteCustomKeyStoreOutput) { - op := &request.Operation{ - Name: opDeleteCustomKeyStore, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCustomKeyStoreInput{} - } - - output = &DeleteCustomKeyStoreOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCustomKeyStore API operation for AWS Key Management Service. -// -// Deletes a custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html). -// This operation does not delete the AWS CloudHSM cluster that is associated -// with the custom key store, or affect any users or keys in the cluster. -// -// The custom key store that you delete cannot contain any AWS KMS customer -// master keys (CMKs) (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys). -// Before deleting the key store, verify that you will never need to use any -// of the CMKs in the key store for any cryptographic operations. Then, use -// ScheduleKeyDeletion to delete the AWS KMS customer master keys (CMKs) from -// the key store. When the scheduled waiting period expires, the ScheduleKeyDeletion -// operation deletes the CMKs. Then it makes a best effort to delete the key -// material from the associated cluster. However, you might need to manually -// delete the orphaned key material (http://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key) -// from the cluster and its backups. -// -// After all CMKs are deleted from AWS KMS, use DisconnectCustomKeyStore to -// disconnect the key store from AWS KMS. Then, you can delete the custom key -// store. -// -// Instead of deleting the custom key store, consider using DisconnectCustomKeyStore -// to disconnect it from AWS KMS. While the key store is disconnected, you cannot -// create or use the CMKs in the key store. But, you do not need to delete CMKs -// and you can reconnect a disconnected custom key store at any time. -// -// If the operation succeeds, it returns a JSON object with no properties. -// -// This operation is part of the Custom Key Store feature (http://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) -// feature in AWS KMS, which combines the convenience and extensive integration -// of AWS KMS with the isolation and control of a single-tenant key store. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation DeleteCustomKeyStore for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCustomKeyStoreHasCMKsException "CustomKeyStoreHasCMKsException" -// The request was rejected because the custom key store contains AWS KMS customer -// master keys (CMKs). After verifying that you do not need to use the CMKs, -// use the ScheduleKeyDeletion operation to delete the CMKs. After they are -// deleted, you can delete the custom key store. -// -// * ErrCodeCustomKeyStoreInvalidStateException "CustomKeyStoreInvalidStateException" -// The request was rejected because of the ConnectionState of the custom key -// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores -// operation. -// -// This exception is thrown under the following conditions: -// -// * You requested the CreateKey or GenerateRandom operation in a custom -// key store that is not connected. These operations are valid only when -// the custom key store ConnectionState is CONNECTED. -// -// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation -// on a custom key store that is not disconnected. This operation is valid -// only when the custom key store ConnectionState is DISCONNECTED. -// -// * You requested the ConnectCustomKeyStore operation on a custom key store -// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid -// for all other ConnectionState values. -// -// * ErrCodeCustomKeyStoreNotFoundException "CustomKeyStoreNotFoundException" -// The request was rejected because AWS KMS cannot find a custom key store with -// the specified key store name or ID. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeleteCustomKeyStore -func (c *KMS) DeleteCustomKeyStore(input *DeleteCustomKeyStoreInput) (*DeleteCustomKeyStoreOutput, error) { - req, out := c.DeleteCustomKeyStoreRequest(input) - return out, req.Send() -} - -// DeleteCustomKeyStoreWithContext is the same as DeleteCustomKeyStore with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCustomKeyStore for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) DeleteCustomKeyStoreWithContext(ctx aws.Context, input *DeleteCustomKeyStoreInput, opts ...request.Option) (*DeleteCustomKeyStoreOutput, error) { - req, out := c.DeleteCustomKeyStoreRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteImportedKeyMaterial = "DeleteImportedKeyMaterial" - -// DeleteImportedKeyMaterialRequest generates a "aws/request.Request" representing the -// client's request for the DeleteImportedKeyMaterial operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteImportedKeyMaterial for more information on using the DeleteImportedKeyMaterial -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteImportedKeyMaterialRequest method. -// req, resp := client.DeleteImportedKeyMaterialRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeleteImportedKeyMaterial -func (c *KMS) DeleteImportedKeyMaterialRequest(input *DeleteImportedKeyMaterialInput) (req *request.Request, output *DeleteImportedKeyMaterialOutput) { - op := &request.Operation{ - Name: opDeleteImportedKeyMaterial, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteImportedKeyMaterialInput{} - } - - output = &DeleteImportedKeyMaterialOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteImportedKeyMaterial API operation for AWS Key Management Service. -// -// Deletes key material that you previously imported. This operation makes the -// specified customer master key (CMK) unusable. For more information about -// importing key material into AWS KMS, see Importing Key Material (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) -// in the AWS Key Management Service Developer Guide. You cannot perform this -// operation on a CMK in a different AWS account. -// -// When the specified CMK is in the PendingDeletion state, this operation does -// not change the CMK's state. Otherwise, it changes the CMK's state to PendingImport. -// -// After you delete key material, you can use ImportKeyMaterial to reimport -// the same key material into the CMK. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation DeleteImportedKeyMaterial for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The request was rejected because a specified parameter is not supported or -// a specified resource is not valid for this operation. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeleteImportedKeyMaterial -func (c *KMS) DeleteImportedKeyMaterial(input *DeleteImportedKeyMaterialInput) (*DeleteImportedKeyMaterialOutput, error) { - req, out := c.DeleteImportedKeyMaterialRequest(input) - return out, req.Send() -} - -// DeleteImportedKeyMaterialWithContext is the same as DeleteImportedKeyMaterial with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteImportedKeyMaterial for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) DeleteImportedKeyMaterialWithContext(ctx aws.Context, input *DeleteImportedKeyMaterialInput, opts ...request.Option) (*DeleteImportedKeyMaterialOutput, error) { - req, out := c.DeleteImportedKeyMaterialRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCustomKeyStores = "DescribeCustomKeyStores" - -// DescribeCustomKeyStoresRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCustomKeyStores operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCustomKeyStores for more information on using the DescribeCustomKeyStores -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCustomKeyStoresRequest method. -// req, resp := client.DescribeCustomKeyStoresRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DescribeCustomKeyStores -func (c *KMS) DescribeCustomKeyStoresRequest(input *DescribeCustomKeyStoresInput) (req *request.Request, output *DescribeCustomKeyStoresOutput) { - op := &request.Operation{ - Name: opDescribeCustomKeyStores, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCustomKeyStoresInput{} - } - - output = &DescribeCustomKeyStoresOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCustomKeyStores API operation for AWS Key Management Service. -// -// Gets information about custom key stores (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html) -// in the account and region. -// -// This operation is part of the Custom Key Store feature (http://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) -// feature in AWS KMS, which combines the convenience and extensive integration -// of AWS KMS with the isolation and control of a single-tenant key store. -// -// By default, this operation returns information about all custom key stores -// in the account and region. To get only information about a particular custom -// key store, use either the CustomKeyStoreName or CustomKeyStoreId parameter -// (but not both). -// -// To determine whether the custom key store is connected to its AWS CloudHSM -// cluster, use the ConnectionState element in the response. If an attempt to -// connect the custom key store failed, the ConnectionState value is FAILED -// and the ConnectionErrorCode element in the response indicates the cause of -// the failure. For help interpreting the ConnectionErrorCode, see CustomKeyStoresListEntry. -// -// Custom key stores have a DISCONNECTED connection state if the key store has -// never been connected or you use the DisconnectCustomKeyStore operation to -// disconnect it. If your custom key store state is CONNECTED but you are having -// trouble using it, make sure that its associated AWS CloudHSM cluster is active -// and contains the minimum number of HSMs required for the operation, if any. -// -// For help repairing your custom key store, see the Troubleshooting Custom -// Key Stores (http://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore-html) -// topic in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation DescribeCustomKeyStores for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCustomKeyStoreNotFoundException "CustomKeyStoreNotFoundException" -// The request was rejected because AWS KMS cannot find a custom key store with -// the specified key store name or ID. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DescribeCustomKeyStores -func (c *KMS) DescribeCustomKeyStores(input *DescribeCustomKeyStoresInput) (*DescribeCustomKeyStoresOutput, error) { - req, out := c.DescribeCustomKeyStoresRequest(input) - return out, req.Send() -} - -// DescribeCustomKeyStoresWithContext is the same as DescribeCustomKeyStores with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCustomKeyStores for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) DescribeCustomKeyStoresWithContext(ctx aws.Context, input *DescribeCustomKeyStoresInput, opts ...request.Option) (*DescribeCustomKeyStoresOutput, error) { - req, out := c.DescribeCustomKeyStoresRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeKey = "DescribeKey" - -// DescribeKeyRequest generates a "aws/request.Request" representing the -// client's request for the DescribeKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeKey for more information on using the DescribeKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeKeyRequest method. -// req, resp := client.DescribeKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DescribeKey -func (c *KMS) DescribeKeyRequest(input *DescribeKeyInput) (req *request.Request, output *DescribeKeyOutput) { - op := &request.Operation{ - Name: opDescribeKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeKeyInput{} - } - - output = &DescribeKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeKey API operation for AWS Key Management Service. -// -// Provides detailed information about the specified customer master key (CMK). -// -// If you use DescribeKey on a predefined AWS alias, that is, an AWS alias with -// no key ID, AWS KMS associates the alias with an AWS managed CMK (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys) -// and returns its KeyId and Arn in the response. -// -// To perform this operation on a CMK in a different AWS account, specify the -// key ARN or alias ARN in the value of the KeyId parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation DescribeKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DescribeKey -func (c *KMS) DescribeKey(input *DescribeKeyInput) (*DescribeKeyOutput, error) { - req, out := c.DescribeKeyRequest(input) - return out, req.Send() -} - -// DescribeKeyWithContext is the same as DescribeKey with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) DescribeKeyWithContext(ctx aws.Context, input *DescribeKeyInput, opts ...request.Option) (*DescribeKeyOutput, error) { - req, out := c.DescribeKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableKey = "DisableKey" - -// DisableKeyRequest generates a "aws/request.Request" representing the -// client's request for the DisableKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableKey for more information on using the DisableKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableKeyRequest method. -// req, resp := client.DisableKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisableKey -func (c *KMS) DisableKeyRequest(input *DisableKeyInput) (req *request.Request, output *DisableKeyOutput) { - op := &request.Operation{ - Name: opDisableKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableKeyInput{} - } - - output = &DisableKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisableKey API operation for AWS Key Management Service. -// -// Sets the state of a customer master key (CMK) to disabled, thereby preventing -// its use for cryptographic operations. You cannot perform this operation on -// a CMK in a different AWS account. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects the Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation DisableKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisableKey -func (c *KMS) DisableKey(input *DisableKeyInput) (*DisableKeyOutput, error) { - req, out := c.DisableKeyRequest(input) - return out, req.Send() -} - -// DisableKeyWithContext is the same as DisableKey with the addition of -// the ability to pass a context and additional request options. -// -// See DisableKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) DisableKeyWithContext(ctx aws.Context, input *DisableKeyInput, opts ...request.Option) (*DisableKeyOutput, error) { - req, out := c.DisableKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableKeyRotation = "DisableKeyRotation" - -// DisableKeyRotationRequest generates a "aws/request.Request" representing the -// client's request for the DisableKeyRotation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableKeyRotation for more information on using the DisableKeyRotation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableKeyRotationRequest method. -// req, resp := client.DisableKeyRotationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisableKeyRotation -func (c *KMS) DisableKeyRotationRequest(input *DisableKeyRotationInput) (req *request.Request, output *DisableKeyRotationOutput) { - op := &request.Operation{ - Name: opDisableKeyRotation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableKeyRotationInput{} - } - - output = &DisableKeyRotationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisableKeyRotation API operation for AWS Key Management Service. -// -// Disables automatic rotation of the key material (http://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) -// for the specified customer master key (CMK). You cannot perform this operation -// on a CMK in a different AWS account. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation DisableKeyRotation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeDisabledException "DisabledException" -// The request was rejected because the specified CMK is not enabled. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The request was rejected because a specified parameter is not supported or -// a specified resource is not valid for this operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisableKeyRotation -func (c *KMS) DisableKeyRotation(input *DisableKeyRotationInput) (*DisableKeyRotationOutput, error) { - req, out := c.DisableKeyRotationRequest(input) - return out, req.Send() -} - -// DisableKeyRotationWithContext is the same as DisableKeyRotation with the addition of -// the ability to pass a context and additional request options. -// -// See DisableKeyRotation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) DisableKeyRotationWithContext(ctx aws.Context, input *DisableKeyRotationInput, opts ...request.Option) (*DisableKeyRotationOutput, error) { - req, out := c.DisableKeyRotationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisconnectCustomKeyStore = "DisconnectCustomKeyStore" - -// DisconnectCustomKeyStoreRequest generates a "aws/request.Request" representing the -// client's request for the DisconnectCustomKeyStore operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisconnectCustomKeyStore for more information on using the DisconnectCustomKeyStore -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisconnectCustomKeyStoreRequest method. -// req, resp := client.DisconnectCustomKeyStoreRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisconnectCustomKeyStore -func (c *KMS) DisconnectCustomKeyStoreRequest(input *DisconnectCustomKeyStoreInput) (req *request.Request, output *DisconnectCustomKeyStoreOutput) { - op := &request.Operation{ - Name: opDisconnectCustomKeyStore, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisconnectCustomKeyStoreInput{} - } - - output = &DisconnectCustomKeyStoreOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisconnectCustomKeyStore API operation for AWS Key Management Service. -// -// Disconnects the custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html) -// from its associated AWS CloudHSM cluster. While a custom key store is disconnected, -// you can manage the custom key store and its customer master keys (CMKs), -// but you cannot create or use CMKs in the custom key store. You can reconnect -// the custom key store at any time. -// -// While a custom key store is disconnected, all attempts to create customer -// master keys (CMKs) in the custom key store or to use existing CMKs in cryptographic -// operations will fail. This action can prevent users from storing and accessing -// sensitive data. -// -// To find the connection state of a custom key store, use the DescribeCustomKeyStoresoperation. To reconnect a custom key store, use the ConnectCustomKeyStoreoperation. -// -// If the operation succeeds, it returns a JSON object with no properties. -// -// This operation is part of the Custom Key Store feature (http://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation DisconnectCustomKeyStore for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCustomKeyStoreInvalidStateException "CustomKeyStoreInvalidStateException" -// The request was rejected because of the ConnectionState of the custom key -// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores -// operation. -// -// This exception is thrown under the following conditions: -// -// * You requested the CreateKey or GenerateRandom operation in a custom -// key store that is not connected. These operations are valid only when -// the custom key store ConnectionState is CONNECTED. -// -// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation -// on a custom key store that is not disconnected. This operation is valid -// only when the custom key store ConnectionState is DISCONNECTED. -// -// * You requested the ConnectCustomKeyStore operation on a custom key store -// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid -// for all other ConnectionState values. -// -// * ErrCodeCustomKeyStoreNotFoundException "CustomKeyStoreNotFoundException" -// The request was rejected because AWS KMS cannot find a custom key store with -// the specified key store name or ID. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisconnectCustomKeyStore -func (c *KMS) DisconnectCustomKeyStore(input *DisconnectCustomKeyStoreInput) (*DisconnectCustomKeyStoreOutput, error) { - req, out := c.DisconnectCustomKeyStoreRequest(input) - return out, req.Send() -} - -// DisconnectCustomKeyStoreWithContext is the same as DisconnectCustomKeyStore with the addition of -// the ability to pass a context and additional request options. -// -// See DisconnectCustomKeyStore for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) DisconnectCustomKeyStoreWithContext(ctx aws.Context, input *DisconnectCustomKeyStoreInput, opts ...request.Option) (*DisconnectCustomKeyStoreOutput, error) { - req, out := c.DisconnectCustomKeyStoreRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableKey = "EnableKey" - -// EnableKeyRequest generates a "aws/request.Request" representing the -// client's request for the EnableKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableKey for more information on using the EnableKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableKeyRequest method. -// req, resp := client.EnableKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EnableKey -func (c *KMS) EnableKeyRequest(input *EnableKeyInput) (req *request.Request, output *EnableKeyOutput) { - op := &request.Operation{ - Name: opEnableKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableKeyInput{} - } - - output = &EnableKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableKey API operation for AWS Key Management Service. -// -// Sets the key state of a customer master key (CMK) to enabled. This allows -// you to use the CMK for cryptographic operations. You cannot perform this -// operation on a CMK in a different AWS account. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation EnableKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because a limit was exceeded. For more information, -// see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EnableKey -func (c *KMS) EnableKey(input *EnableKeyInput) (*EnableKeyOutput, error) { - req, out := c.EnableKeyRequest(input) - return out, req.Send() -} - -// EnableKeyWithContext is the same as EnableKey with the addition of -// the ability to pass a context and additional request options. -// -// See EnableKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) EnableKeyWithContext(ctx aws.Context, input *EnableKeyInput, opts ...request.Option) (*EnableKeyOutput, error) { - req, out := c.EnableKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableKeyRotation = "EnableKeyRotation" - -// EnableKeyRotationRequest generates a "aws/request.Request" representing the -// client's request for the EnableKeyRotation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableKeyRotation for more information on using the EnableKeyRotation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableKeyRotationRequest method. -// req, resp := client.EnableKeyRotationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EnableKeyRotation -func (c *KMS) EnableKeyRotationRequest(input *EnableKeyRotationInput) (req *request.Request, output *EnableKeyRotationOutput) { - op := &request.Operation{ - Name: opEnableKeyRotation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableKeyRotationInput{} - } - - output = &EnableKeyRotationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableKeyRotation API operation for AWS Key Management Service. -// -// Enables automatic rotation of the key material (http://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) -// for the specified customer master key (CMK). You cannot perform this operation -// on a CMK in a different AWS account. -// -// You cannot enable automatic rotation of CMKs with imported key material or -// CMKs in a custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html). -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation EnableKeyRotation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeDisabledException "DisabledException" -// The request was rejected because the specified CMK is not enabled. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The request was rejected because a specified parameter is not supported or -// a specified resource is not valid for this operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EnableKeyRotation -func (c *KMS) EnableKeyRotation(input *EnableKeyRotationInput) (*EnableKeyRotationOutput, error) { - req, out := c.EnableKeyRotationRequest(input) - return out, req.Send() -} - -// EnableKeyRotationWithContext is the same as EnableKeyRotation with the addition of -// the ability to pass a context and additional request options. -// -// See EnableKeyRotation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) EnableKeyRotationWithContext(ctx aws.Context, input *EnableKeyRotationInput, opts ...request.Option) (*EnableKeyRotationOutput, error) { - req, out := c.EnableKeyRotationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEncrypt = "Encrypt" - -// EncryptRequest generates a "aws/request.Request" representing the -// client's request for the Encrypt operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See Encrypt for more information on using the Encrypt -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EncryptRequest method. -// req, resp := client.EncryptRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/Encrypt -func (c *KMS) EncryptRequest(input *EncryptInput) (req *request.Request, output *EncryptOutput) { - op := &request.Operation{ - Name: opEncrypt, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EncryptInput{} - } - - output = &EncryptOutput{} - req = c.newRequest(op, input, output) - return -} - -// Encrypt API operation for AWS Key Management Service. -// -// Encrypts plaintext into ciphertext by using a customer master key (CMK). -// The Encrypt operation has two primary use cases: -// -// * You can encrypt up to 4 kilobytes (4096 bytes) of arbitrary data such -// as an RSA key, a database password, or other sensitive information. -// -// * To move encrypted data from one AWS region to another, you can use this -// operation to encrypt in the new region the plaintext data key that was -// used to encrypt the data in the original region. This provides you with -// an encrypted copy of the data key that can be decrypted in the new region -// and used there to decrypt the encrypted data. -// -// To perform this operation on a CMK in a different AWS account, specify the -// key ARN or alias ARN in the value of the KeyId parameter. -// -// Unless you are moving encrypted data from one region to another, you don't -// use this operation to encrypt a generated data key within a region. To get -// data keys that are already encrypted, call the GenerateDataKey or GenerateDataKeyWithoutPlaintext -// operation. Data keys don't need to be encrypted again by calling Encrypt. -// -// To encrypt data locally in your application, use the GenerateDataKey operation -// to return a plaintext data encryption key and a copy of the key encrypted -// under the CMK of your choosing. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation Encrypt for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeDisabledException "DisabledException" -// The request was rejected because the specified CMK is not enabled. -// -// * ErrCodeKeyUnavailableException "KeyUnavailableException" -// The request was rejected because the specified CMK was not available. The -// request can be retried. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInvalidKeyUsageException "InvalidKeyUsageException" -// The request was rejected because the specified KeySpec value is not valid. -// -// * ErrCodeInvalidGrantTokenException "InvalidGrantTokenException" -// The request was rejected because the specified grant token is not valid. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/Encrypt -func (c *KMS) Encrypt(input *EncryptInput) (*EncryptOutput, error) { - req, out := c.EncryptRequest(input) - return out, req.Send() -} - -// EncryptWithContext is the same as Encrypt with the addition of -// the ability to pass a context and additional request options. -// -// See Encrypt for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) EncryptWithContext(ctx aws.Context, input *EncryptInput, opts ...request.Option) (*EncryptOutput, error) { - req, out := c.EncryptRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGenerateDataKey = "GenerateDataKey" - -// GenerateDataKeyRequest generates a "aws/request.Request" representing the -// client's request for the GenerateDataKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GenerateDataKey for more information on using the GenerateDataKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GenerateDataKeyRequest method. -// req, resp := client.GenerateDataKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKey -func (c *KMS) GenerateDataKeyRequest(input *GenerateDataKeyInput) (req *request.Request, output *GenerateDataKeyOutput) { - op := &request.Operation{ - Name: opGenerateDataKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GenerateDataKeyInput{} - } - - output = &GenerateDataKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GenerateDataKey API operation for AWS Key Management Service. -// -// Returns a data encryption key that you can use in your application to encrypt -// data locally. -// -// You must specify the customer master key (CMK) under which to generate the -// data key. You must also specify the length of the data key using either the -// KeySpec or NumberOfBytes field. You must specify one field or the other, -// but not both. For common key lengths (128-bit and 256-bit symmetric keys), -// we recommend that you use KeySpec. To perform this operation on a CMK in -// a different AWS account, specify the key ARN or alias ARN in the value of -// the KeyId parameter. -// -// This operation returns a plaintext copy of the data key in the Plaintext -// field of the response, and an encrypted copy of the data key in the CiphertextBlob -// field. The data key is encrypted under the CMK specified in the KeyId field -// of the request. -// -// We recommend that you use the following pattern to encrypt data locally in -// your application: -// -// Use this operation (GenerateDataKey) to get a data encryption key. -// -// Use the plaintext data encryption key (returned in the Plaintext field of -// the response) to encrypt data locally, then erase the plaintext data key -// from memory. -// -// Store the encrypted data key (returned in the CiphertextBlob field of the -// response) alongside the locally encrypted data. -// -// To decrypt data locally: -// -// Use the Decrypt operation to decrypt the encrypted data key into a plaintext -// copy of the data key. -// -// Use the plaintext data key to decrypt data locally, then erase the plaintext -// data key from memory. -// -// To return only an encrypted copy of the data key, use GenerateDataKeyWithoutPlaintext. -// To return a random byte string that is cryptographically secure, use GenerateRandom. -// -// If you use the optional EncryptionContext field, you must store at least -// enough information to be able to reconstruct the full encryption context -// when you later send the ciphertext to the Decrypt operation. It is a good -// practice to choose an encryption context that you can reconstruct on the -// fly to better secure the ciphertext. For more information, see Encryption -// Context (http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html) -// in the AWS Key Management Service Developer Guide. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation GenerateDataKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeDisabledException "DisabledException" -// The request was rejected because the specified CMK is not enabled. -// -// * ErrCodeKeyUnavailableException "KeyUnavailableException" -// The request was rejected because the specified CMK was not available. The -// request can be retried. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInvalidKeyUsageException "InvalidKeyUsageException" -// The request was rejected because the specified KeySpec value is not valid. -// -// * ErrCodeInvalidGrantTokenException "InvalidGrantTokenException" -// The request was rejected because the specified grant token is not valid. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKey -func (c *KMS) GenerateDataKey(input *GenerateDataKeyInput) (*GenerateDataKeyOutput, error) { - req, out := c.GenerateDataKeyRequest(input) - return out, req.Send() -} - -// GenerateDataKeyWithContext is the same as GenerateDataKey with the addition of -// the ability to pass a context and additional request options. -// -// See GenerateDataKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) GenerateDataKeyWithContext(ctx aws.Context, input *GenerateDataKeyInput, opts ...request.Option) (*GenerateDataKeyOutput, error) { - req, out := c.GenerateDataKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGenerateDataKeyWithoutPlaintext = "GenerateDataKeyWithoutPlaintext" - -// GenerateDataKeyWithoutPlaintextRequest generates a "aws/request.Request" representing the -// client's request for the GenerateDataKeyWithoutPlaintext operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GenerateDataKeyWithoutPlaintext for more information on using the GenerateDataKeyWithoutPlaintext -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GenerateDataKeyWithoutPlaintextRequest method. -// req, resp := client.GenerateDataKeyWithoutPlaintextRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyWithoutPlaintext -func (c *KMS) GenerateDataKeyWithoutPlaintextRequest(input *GenerateDataKeyWithoutPlaintextInput) (req *request.Request, output *GenerateDataKeyWithoutPlaintextOutput) { - op := &request.Operation{ - Name: opGenerateDataKeyWithoutPlaintext, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GenerateDataKeyWithoutPlaintextInput{} - } - - output = &GenerateDataKeyWithoutPlaintextOutput{} - req = c.newRequest(op, input, output) - return -} - -// GenerateDataKeyWithoutPlaintext API operation for AWS Key Management Service. -// -// Returns a data encryption key encrypted under a customer master key (CMK). -// This operation is identical to GenerateDataKey but returns only the encrypted -// copy of the data key. -// -// To perform this operation on a CMK in a different AWS account, specify the -// key ARN or alias ARN in the value of the KeyId parameter. -// -// This operation is useful in a system that has multiple components with different -// degrees of trust. For example, consider a system that stores encrypted data -// in containers. Each container stores the encrypted data and an encrypted -// copy of the data key. One component of the system, called the control plane, -// creates new containers. When it creates a new container, it uses this operation -// (GenerateDataKeyWithoutPlaintext) to get an encrypted data key and then stores -// it in the container. Later, a different component of the system, called the -// data plane, puts encrypted data into the containers. To do this, it passes -// the encrypted data key to the Decrypt operation, then uses the returned plaintext -// data key to encrypt data, and finally stores the encrypted data in the container. -// In this system, the control plane never sees the plaintext data key. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation GenerateDataKeyWithoutPlaintext for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeDisabledException "DisabledException" -// The request was rejected because the specified CMK is not enabled. -// -// * ErrCodeKeyUnavailableException "KeyUnavailableException" -// The request was rejected because the specified CMK was not available. The -// request can be retried. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInvalidKeyUsageException "InvalidKeyUsageException" -// The request was rejected because the specified KeySpec value is not valid. -// -// * ErrCodeInvalidGrantTokenException "InvalidGrantTokenException" -// The request was rejected because the specified grant token is not valid. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyWithoutPlaintext -func (c *KMS) GenerateDataKeyWithoutPlaintext(input *GenerateDataKeyWithoutPlaintextInput) (*GenerateDataKeyWithoutPlaintextOutput, error) { - req, out := c.GenerateDataKeyWithoutPlaintextRequest(input) - return out, req.Send() -} - -// GenerateDataKeyWithoutPlaintextWithContext is the same as GenerateDataKeyWithoutPlaintext with the addition of -// the ability to pass a context and additional request options. -// -// See GenerateDataKeyWithoutPlaintext for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) GenerateDataKeyWithoutPlaintextWithContext(ctx aws.Context, input *GenerateDataKeyWithoutPlaintextInput, opts ...request.Option) (*GenerateDataKeyWithoutPlaintextOutput, error) { - req, out := c.GenerateDataKeyWithoutPlaintextRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGenerateRandom = "GenerateRandom" - -// GenerateRandomRequest generates a "aws/request.Request" representing the -// client's request for the GenerateRandom operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GenerateRandom for more information on using the GenerateRandom -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GenerateRandomRequest method. -// req, resp := client.GenerateRandomRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateRandom -func (c *KMS) GenerateRandomRequest(input *GenerateRandomInput) (req *request.Request, output *GenerateRandomOutput) { - op := &request.Operation{ - Name: opGenerateRandom, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GenerateRandomInput{} - } - - output = &GenerateRandomOutput{} - req = c.newRequest(op, input, output) - return -} - -// GenerateRandom API operation for AWS Key Management Service. -// -// Returns a random byte string that is cryptographically secure. -// -// By default, the random byte string is generated in AWS KMS. To generate the -// byte string in the AWS CloudHSM cluster that is associated with a custom -// key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html), -// specify the custom key store ID. -// -// For more information about entropy and random number generation, see the -// AWS Key Management Service Cryptographic Details (https://d0.awsstatic.com/whitepapers/KMS-Cryptographic-Details.pdf) -// whitepaper. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation GenerateRandom for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeCustomKeyStoreNotFoundException "CustomKeyStoreNotFoundException" -// The request was rejected because AWS KMS cannot find a custom key store with -// the specified key store name or ID. -// -// * ErrCodeCustomKeyStoreInvalidStateException "CustomKeyStoreInvalidStateException" -// The request was rejected because of the ConnectionState of the custom key -// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores -// operation. -// -// This exception is thrown under the following conditions: -// -// * You requested the CreateKey or GenerateRandom operation in a custom -// key store that is not connected. These operations are valid only when -// the custom key store ConnectionState is CONNECTED. -// -// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation -// on a custom key store that is not disconnected. This operation is valid -// only when the custom key store ConnectionState is DISCONNECTED. -// -// * You requested the ConnectCustomKeyStore operation on a custom key store -// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid -// for all other ConnectionState values. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateRandom -func (c *KMS) GenerateRandom(input *GenerateRandomInput) (*GenerateRandomOutput, error) { - req, out := c.GenerateRandomRequest(input) - return out, req.Send() -} - -// GenerateRandomWithContext is the same as GenerateRandom with the addition of -// the ability to pass a context and additional request options. -// -// See GenerateRandom for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) GenerateRandomWithContext(ctx aws.Context, input *GenerateRandomInput, opts ...request.Option) (*GenerateRandomOutput, error) { - req, out := c.GenerateRandomRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetKeyPolicy = "GetKeyPolicy" - -// GetKeyPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetKeyPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetKeyPolicy for more information on using the GetKeyPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetKeyPolicyRequest method. -// req, resp := client.GetKeyPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyPolicy -func (c *KMS) GetKeyPolicyRequest(input *GetKeyPolicyInput) (req *request.Request, output *GetKeyPolicyOutput) { - op := &request.Operation{ - Name: opGetKeyPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetKeyPolicyInput{} - } - - output = &GetKeyPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetKeyPolicy API operation for AWS Key Management Service. -// -// Gets a key policy attached to the specified customer master key (CMK). You -// cannot perform this operation on a CMK in a different AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation GetKeyPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyPolicy -func (c *KMS) GetKeyPolicy(input *GetKeyPolicyInput) (*GetKeyPolicyOutput, error) { - req, out := c.GetKeyPolicyRequest(input) - return out, req.Send() -} - -// GetKeyPolicyWithContext is the same as GetKeyPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetKeyPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) GetKeyPolicyWithContext(ctx aws.Context, input *GetKeyPolicyInput, opts ...request.Option) (*GetKeyPolicyOutput, error) { - req, out := c.GetKeyPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetKeyRotationStatus = "GetKeyRotationStatus" - -// GetKeyRotationStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetKeyRotationStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetKeyRotationStatus for more information on using the GetKeyRotationStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetKeyRotationStatusRequest method. -// req, resp := client.GetKeyRotationStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyRotationStatus -func (c *KMS) GetKeyRotationStatusRequest(input *GetKeyRotationStatusInput) (req *request.Request, output *GetKeyRotationStatusOutput) { - op := &request.Operation{ - Name: opGetKeyRotationStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetKeyRotationStatusInput{} - } - - output = &GetKeyRotationStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetKeyRotationStatus API operation for AWS Key Management Service. -// -// Gets a Boolean value that indicates whether automatic rotation of the key -// material (http://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) -// is enabled for the specified customer master key (CMK). -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// * Disabled: The key rotation status does not change when you disable a -// CMK. However, while the CMK is disabled, AWS KMS does not rotate the backing -// key. -// -// * Pending deletion: While a CMK is pending deletion, its key rotation -// status is false and AWS KMS does not rotate the backing key. If you cancel -// the deletion, the original key rotation status is restored. -// -// To perform this operation on a CMK in a different AWS account, specify the -// key ARN in the value of the KeyId parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation GetKeyRotationStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The request was rejected because a specified parameter is not supported or -// a specified resource is not valid for this operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyRotationStatus -func (c *KMS) GetKeyRotationStatus(input *GetKeyRotationStatusInput) (*GetKeyRotationStatusOutput, error) { - req, out := c.GetKeyRotationStatusRequest(input) - return out, req.Send() -} - -// GetKeyRotationStatusWithContext is the same as GetKeyRotationStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetKeyRotationStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) GetKeyRotationStatusWithContext(ctx aws.Context, input *GetKeyRotationStatusInput, opts ...request.Option) (*GetKeyRotationStatusOutput, error) { - req, out := c.GetKeyRotationStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetParametersForImport = "GetParametersForImport" - -// GetParametersForImportRequest generates a "aws/request.Request" representing the -// client's request for the GetParametersForImport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetParametersForImport for more information on using the GetParametersForImport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetParametersForImportRequest method. -// req, resp := client.GetParametersForImportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetParametersForImport -func (c *KMS) GetParametersForImportRequest(input *GetParametersForImportInput) (req *request.Request, output *GetParametersForImportOutput) { - op := &request.Operation{ - Name: opGetParametersForImport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetParametersForImportInput{} - } - - output = &GetParametersForImportOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetParametersForImport API operation for AWS Key Management Service. -// -// Returns the items you need in order to import key material into AWS KMS from -// your existing key management infrastructure. For more information about importing -// key material into AWS KMS, see Importing Key Material (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) -// in the AWS Key Management Service Developer Guide. -// -// You must specify the key ID of the customer master key (CMK) into which you -// will import key material. This CMK's Origin must be EXTERNAL. You must also -// specify the wrapping algorithm and type of wrapping key (public key) that -// you will use to encrypt the key material. You cannot perform this operation -// on a CMK in a different AWS account. -// -// This operation returns a public key and an import token. Use the public key -// to encrypt the key material. Store the import token to send with a subsequent -// ImportKeyMaterial request. The public key and import token from the same -// response must be used together. These items are valid for 24 hours. When -// they expire, they cannot be used for a subsequent ImportKeyMaterial request. -// To get new ones, send another GetParametersForImport request. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation GetParametersForImport for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The request was rejected because a specified parameter is not supported or -// a specified resource is not valid for this operation. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetParametersForImport -func (c *KMS) GetParametersForImport(input *GetParametersForImportInput) (*GetParametersForImportOutput, error) { - req, out := c.GetParametersForImportRequest(input) - return out, req.Send() -} - -// GetParametersForImportWithContext is the same as GetParametersForImport with the addition of -// the ability to pass a context and additional request options. -// -// See GetParametersForImport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) GetParametersForImportWithContext(ctx aws.Context, input *GetParametersForImportInput, opts ...request.Option) (*GetParametersForImportOutput, error) { - req, out := c.GetParametersForImportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportKeyMaterial = "ImportKeyMaterial" - -// ImportKeyMaterialRequest generates a "aws/request.Request" representing the -// client's request for the ImportKeyMaterial operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportKeyMaterial for more information on using the ImportKeyMaterial -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportKeyMaterialRequest method. -// req, resp := client.ImportKeyMaterialRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ImportKeyMaterial -func (c *KMS) ImportKeyMaterialRequest(input *ImportKeyMaterialInput) (req *request.Request, output *ImportKeyMaterialOutput) { - op := &request.Operation{ - Name: opImportKeyMaterial, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportKeyMaterialInput{} - } - - output = &ImportKeyMaterialOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ImportKeyMaterial API operation for AWS Key Management Service. -// -// Imports key material into an existing AWS KMS customer master key (CMK) that -// was created without key material. You cannot perform this operation on a -// CMK in a different AWS account. For more information about creating CMKs -// with no key material and then importing key material, see Importing Key Material -// (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) -// in the AWS Key Management Service Developer Guide. -// -// Before using this operation, call GetParametersForImport. Its response includes -// a public key and an import token. Use the public key to encrypt the key material. -// Then, submit the import token from the same GetParametersForImport response. -// -// When calling this operation, you must specify the following values: -// -// * The key ID or key ARN of a CMK with no key material. Its Origin must -// be EXTERNAL. -// -// To create a CMK with no key material, call CreateKey and set the value of -// its Origin parameter to EXTERNAL. To get the Origin of a CMK, call DescribeKey.) -// -// * The encrypted key material. To get the public key to encrypt the key -// material, call GetParametersForImport. -// -// * The import token that GetParametersForImport returned. This token and -// the public key used to encrypt the key material must have come from the -// same response. -// -// * Whether the key material expires and if so, when. If you set an expiration -// date, you can change it only by reimporting the same key material and -// specifying a new expiration date. If the key material expires, AWS KMS -// deletes the key material and the CMK becomes unusable. To use the CMK -// again, you must reimport the same key material. -// -// When this operation is successful, the key state of the CMK changes from -// PendingImport to Enabled, and you can use the CMK. After you successfully -// import key material into a CMK, you can reimport the same key material into -// that CMK, but you cannot import different key material. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation ImportKeyMaterial for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The request was rejected because a specified parameter is not supported or -// a specified resource is not valid for this operation. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeInvalidCiphertextException "InvalidCiphertextException" -// The request was rejected because the specified ciphertext, or additional -// authenticated data incorporated into the ciphertext, such as the encryption -// context, is corrupted, missing, or otherwise invalid. -// -// * ErrCodeIncorrectKeyMaterialException "IncorrectKeyMaterialException" -// The request was rejected because the provided key material is invalid or -// is not the same key material that was previously imported into this customer -// master key (CMK). -// -// * ErrCodeExpiredImportTokenException "ExpiredImportTokenException" -// The request was rejected because the provided import token is expired. Use -// GetParametersForImport to get a new import token and public key, use the -// new public key to encrypt the key material, and then try the request again. -// -// * ErrCodeInvalidImportTokenException "InvalidImportTokenException" -// The request was rejected because the provided import token is invalid or -// is associated with a different customer master key (CMK). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ImportKeyMaterial -func (c *KMS) ImportKeyMaterial(input *ImportKeyMaterialInput) (*ImportKeyMaterialOutput, error) { - req, out := c.ImportKeyMaterialRequest(input) - return out, req.Send() -} - -// ImportKeyMaterialWithContext is the same as ImportKeyMaterial with the addition of -// the ability to pass a context and additional request options. -// -// See ImportKeyMaterial for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) ImportKeyMaterialWithContext(ctx aws.Context, input *ImportKeyMaterialInput, opts ...request.Option) (*ImportKeyMaterialOutput, error) { - req, out := c.ImportKeyMaterialRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAliases = "ListAliases" - -// ListAliasesRequest generates a "aws/request.Request" representing the -// client's request for the ListAliases operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAliases for more information on using the ListAliases -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAliasesRequest method. -// req, resp := client.ListAliasesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListAliases -func (c *KMS) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, output *ListAliasesOutput) { - op := &request.Operation{ - Name: opListAliases, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "Limit", - TruncationToken: "Truncated", - }, - } - - if input == nil { - input = &ListAliasesInput{} - } - - output = &ListAliasesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAliases API operation for AWS Key Management Service. -// -// Gets a list of all aliases in the caller's AWS account and region. You cannot -// list aliases in other accounts. For more information about aliases, see CreateAlias. -// -// By default, the ListAliases command returns all aliases in the account and -// region. To get only the aliases that point to a particular customer master -// key (CMK), use the KeyId parameter. -// -// The ListAliases response might include several aliases have no TargetKeyId -// field. These are predefined aliases that AWS has created but has not yet -// associated with a CMK. Aliases that AWS creates in your account, including -// predefined aliases, do not count against your AWS KMS aliases limit (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#aliases-limit). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation ListAliases for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInvalidMarkerException "InvalidMarkerException" -// The request was rejected because the marker that specifies where pagination -// should next begin is not valid. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListAliases -func (c *KMS) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) { - req, out := c.ListAliasesRequest(input) - return out, req.Send() -} - -// ListAliasesWithContext is the same as ListAliases with the addition of -// the ability to pass a context and additional request options. -// -// See ListAliases for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) ListAliasesWithContext(ctx aws.Context, input *ListAliasesInput, opts ...request.Option) (*ListAliasesOutput, error) { - req, out := c.ListAliasesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAliasesPages iterates over the pages of a ListAliases operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAliases 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 ListAliases operation. -// pageNum := 0 -// err := client.ListAliasesPages(params, -// func(page *ListAliasesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *KMS) ListAliasesPages(input *ListAliasesInput, fn func(*ListAliasesOutput, bool) bool) error { - return c.ListAliasesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAliasesPagesWithContext same as ListAliasesPages 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 *KMS) ListAliasesPagesWithContext(ctx aws.Context, input *ListAliasesInput, fn func(*ListAliasesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAliasesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAliasesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAliasesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListGrants = "ListGrants" - -// ListGrantsRequest generates a "aws/request.Request" representing the -// client's request for the ListGrants operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListGrants for more information on using the ListGrants -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListGrantsRequest method. -// req, resp := client.ListGrantsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListGrants -func (c *KMS) ListGrantsRequest(input *ListGrantsInput) (req *request.Request, output *ListGrantsResponse) { - op := &request.Operation{ - Name: opListGrants, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "Limit", - TruncationToken: "Truncated", - }, - } - - if input == nil { - input = &ListGrantsInput{} - } - - output = &ListGrantsResponse{} - req = c.newRequest(op, input, output) - return -} - -// ListGrants API operation for AWS Key Management Service. -// -// Gets a list of all grants for the specified customer master key (CMK). -// -// To perform this operation on a CMK in a different AWS account, specify the -// key ARN in the value of the KeyId parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation ListGrants for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInvalidMarkerException "InvalidMarkerException" -// The request was rejected because the marker that specifies where pagination -// should next begin is not valid. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListGrants -func (c *KMS) ListGrants(input *ListGrantsInput) (*ListGrantsResponse, error) { - req, out := c.ListGrantsRequest(input) - return out, req.Send() -} - -// ListGrantsWithContext is the same as ListGrants with the addition of -// the ability to pass a context and additional request options. -// -// See ListGrants for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) ListGrantsWithContext(ctx aws.Context, input *ListGrantsInput, opts ...request.Option) (*ListGrantsResponse, error) { - req, out := c.ListGrantsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListGrantsPages iterates over the pages of a ListGrants operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListGrants 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 ListGrants operation. -// pageNum := 0 -// err := client.ListGrantsPages(params, -// func(page *ListGrantsResponse, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *KMS) ListGrantsPages(input *ListGrantsInput, fn func(*ListGrantsResponse, bool) bool) error { - return c.ListGrantsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListGrantsPagesWithContext same as ListGrantsPages 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 *KMS) ListGrantsPagesWithContext(ctx aws.Context, input *ListGrantsInput, fn func(*ListGrantsResponse, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListGrantsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListGrantsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListGrantsResponse), !p.HasNextPage()) - } - return p.Err() -} - -const opListKeyPolicies = "ListKeyPolicies" - -// ListKeyPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListKeyPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListKeyPolicies for more information on using the ListKeyPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListKeyPoliciesRequest method. -// req, resp := client.ListKeyPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListKeyPolicies -func (c *KMS) ListKeyPoliciesRequest(input *ListKeyPoliciesInput) (req *request.Request, output *ListKeyPoliciesOutput) { - op := &request.Operation{ - Name: opListKeyPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "Limit", - TruncationToken: "Truncated", - }, - } - - if input == nil { - input = &ListKeyPoliciesInput{} - } - - output = &ListKeyPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListKeyPolicies API operation for AWS Key Management Service. -// -// Gets the names of the key policies that are attached to a customer master -// key (CMK). This operation is designed to get policy names that you can use -// in a GetKeyPolicy operation. However, the only valid policy name is default. -// You cannot perform this operation on a CMK in a different AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation ListKeyPolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListKeyPolicies -func (c *KMS) ListKeyPolicies(input *ListKeyPoliciesInput) (*ListKeyPoliciesOutput, error) { - req, out := c.ListKeyPoliciesRequest(input) - return out, req.Send() -} - -// ListKeyPoliciesWithContext is the same as ListKeyPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListKeyPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) ListKeyPoliciesWithContext(ctx aws.Context, input *ListKeyPoliciesInput, opts ...request.Option) (*ListKeyPoliciesOutput, error) { - req, out := c.ListKeyPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListKeyPoliciesPages iterates over the pages of a ListKeyPolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListKeyPolicies 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 ListKeyPolicies operation. -// pageNum := 0 -// err := client.ListKeyPoliciesPages(params, -// func(page *ListKeyPoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *KMS) ListKeyPoliciesPages(input *ListKeyPoliciesInput, fn func(*ListKeyPoliciesOutput, bool) bool) error { - return c.ListKeyPoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListKeyPoliciesPagesWithContext same as ListKeyPoliciesPages 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 *KMS) ListKeyPoliciesPagesWithContext(ctx aws.Context, input *ListKeyPoliciesInput, fn func(*ListKeyPoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListKeyPoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListKeyPoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListKeyPoliciesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListKeys = "ListKeys" - -// ListKeysRequest generates a "aws/request.Request" representing the -// client's request for the ListKeys operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListKeys for more information on using the ListKeys -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListKeysRequest method. -// req, resp := client.ListKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListKeys -func (c *KMS) ListKeysRequest(input *ListKeysInput) (req *request.Request, output *ListKeysOutput) { - op := &request.Operation{ - Name: opListKeys, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "Limit", - TruncationToken: "Truncated", - }, - } - - if input == nil { - input = &ListKeysInput{} - } - - output = &ListKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListKeys API operation for AWS Key Management Service. -// -// Gets a list of all customer master keys (CMKs) in the caller's AWS account -// and region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation ListKeys for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidMarkerException "InvalidMarkerException" -// The request was rejected because the marker that specifies where pagination -// should next begin is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListKeys -func (c *KMS) ListKeys(input *ListKeysInput) (*ListKeysOutput, error) { - req, out := c.ListKeysRequest(input) - return out, req.Send() -} - -// ListKeysWithContext is the same as ListKeys with the addition of -// the ability to pass a context and additional request options. -// -// See ListKeys for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) ListKeysWithContext(ctx aws.Context, input *ListKeysInput, opts ...request.Option) (*ListKeysOutput, error) { - req, out := c.ListKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListKeysPages iterates over the pages of a ListKeys operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListKeys 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 ListKeys operation. -// pageNum := 0 -// err := client.ListKeysPages(params, -// func(page *ListKeysOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *KMS) ListKeysPages(input *ListKeysInput, fn func(*ListKeysOutput, bool) bool) error { - return c.ListKeysPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListKeysPagesWithContext same as ListKeysPages 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 *KMS) ListKeysPagesWithContext(ctx aws.Context, input *ListKeysInput, fn func(*ListKeysOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListKeysInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListKeysRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListKeysOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListResourceTags = "ListResourceTags" - -// ListResourceTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListResourceTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResourceTags for more information on using the ListResourceTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResourceTagsRequest method. -// req, resp := client.ListResourceTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListResourceTags -func (c *KMS) ListResourceTagsRequest(input *ListResourceTagsInput) (req *request.Request, output *ListResourceTagsOutput) { - op := &request.Operation{ - Name: opListResourceTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListResourceTagsInput{} - } - - output = &ListResourceTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResourceTags API operation for AWS Key Management Service. -// -// Returns a list of all tags for the specified customer master key (CMK). -// -// You cannot perform this operation on a CMK in a different AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation ListResourceTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeInvalidMarkerException "InvalidMarkerException" -// The request was rejected because the marker that specifies where pagination -// should next begin is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListResourceTags -func (c *KMS) ListResourceTags(input *ListResourceTagsInput) (*ListResourceTagsOutput, error) { - req, out := c.ListResourceTagsRequest(input) - return out, req.Send() -} - -// ListResourceTagsWithContext is the same as ListResourceTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListResourceTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) ListResourceTagsWithContext(ctx aws.Context, input *ListResourceTagsInput, opts ...request.Option) (*ListResourceTagsOutput, error) { - req, out := c.ListResourceTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRetirableGrants = "ListRetirableGrants" - -// ListRetirableGrantsRequest generates a "aws/request.Request" representing the -// client's request for the ListRetirableGrants operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRetirableGrants for more information on using the ListRetirableGrants -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRetirableGrantsRequest method. -// req, resp := client.ListRetirableGrantsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListRetirableGrants -func (c *KMS) ListRetirableGrantsRequest(input *ListRetirableGrantsInput) (req *request.Request, output *ListGrantsResponse) { - op := &request.Operation{ - Name: opListRetirableGrants, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListRetirableGrantsInput{} - } - - output = &ListGrantsResponse{} - req = c.newRequest(op, input, output) - return -} - -// ListRetirableGrants API operation for AWS Key Management Service. -// -// Returns a list of all grants for which the grant's RetiringPrincipal matches -// the one specified. -// -// A typical use is to list all grants that you are able to retire. To retire -// a grant, use RetireGrant. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation ListRetirableGrants for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInvalidMarkerException "InvalidMarkerException" -// The request was rejected because the marker that specifies where pagination -// should next begin is not valid. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListRetirableGrants -func (c *KMS) ListRetirableGrants(input *ListRetirableGrantsInput) (*ListGrantsResponse, error) { - req, out := c.ListRetirableGrantsRequest(input) - return out, req.Send() -} - -// ListRetirableGrantsWithContext is the same as ListRetirableGrants with the addition of -// the ability to pass a context and additional request options. -// -// See ListRetirableGrants for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) ListRetirableGrantsWithContext(ctx aws.Context, input *ListRetirableGrantsInput, opts ...request.Option) (*ListGrantsResponse, error) { - req, out := c.ListRetirableGrantsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutKeyPolicy = "PutKeyPolicy" - -// PutKeyPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutKeyPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutKeyPolicy for more information on using the PutKeyPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutKeyPolicyRequest method. -// req, resp := client.PutKeyPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/PutKeyPolicy -func (c *KMS) PutKeyPolicyRequest(input *PutKeyPolicyInput) (req *request.Request, output *PutKeyPolicyOutput) { - op := &request.Operation{ - Name: opPutKeyPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutKeyPolicyInput{} - } - - output = &PutKeyPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutKeyPolicy API operation for AWS Key Management Service. -// -// Attaches a key policy to the specified customer master key (CMK). You cannot -// perform this operation on a CMK in a different AWS account. -// -// For more information about key policies, see Key Policies (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation PutKeyPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" -// The request was rejected because the specified policy is not syntactically -// or semantically correct. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" -// The request was rejected because a specified parameter is not supported or -// a specified resource is not valid for this operation. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because a limit was exceeded. For more information, -// see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/PutKeyPolicy -func (c *KMS) PutKeyPolicy(input *PutKeyPolicyInput) (*PutKeyPolicyOutput, error) { - req, out := c.PutKeyPolicyRequest(input) - return out, req.Send() -} - -// PutKeyPolicyWithContext is the same as PutKeyPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutKeyPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) PutKeyPolicyWithContext(ctx aws.Context, input *PutKeyPolicyInput, opts ...request.Option) (*PutKeyPolicyOutput, error) { - req, out := c.PutKeyPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReEncrypt = "ReEncrypt" - -// ReEncryptRequest generates a "aws/request.Request" representing the -// client's request for the ReEncrypt operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReEncrypt for more information on using the ReEncrypt -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReEncryptRequest method. -// req, resp := client.ReEncryptRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ReEncrypt -func (c *KMS) ReEncryptRequest(input *ReEncryptInput) (req *request.Request, output *ReEncryptOutput) { - op := &request.Operation{ - Name: opReEncrypt, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReEncryptInput{} - } - - output = &ReEncryptOutput{} - req = c.newRequest(op, input, output) - return -} - -// ReEncrypt API operation for AWS Key Management Service. -// -// Encrypts data on the server side with a new customer master key (CMK) without -// exposing the plaintext of the data on the client side. The data is first -// decrypted and then reencrypted. You can also use this operation to change -// the encryption context of a ciphertext. -// -// You can reencrypt data using CMKs in different AWS accounts. -// -// Unlike other operations, ReEncrypt is authorized twice, once as ReEncryptFrom -// on the source CMK and once as ReEncryptTo on the destination CMK. We recommend -// that you include the "kms:ReEncrypt*" permission in your key policies (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) -// to permit reencryption from or to the CMK. This permission is automatically -// included in the key policy when you create a CMK through the console, but -// you must include it manually when you create a CMK programmatically or when -// you set a key policy with the PutKeyPolicy operation. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation ReEncrypt for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeDisabledException "DisabledException" -// The request was rejected because the specified CMK is not enabled. -// -// * ErrCodeInvalidCiphertextException "InvalidCiphertextException" -// The request was rejected because the specified ciphertext, or additional -// authenticated data incorporated into the ciphertext, such as the encryption -// context, is corrupted, missing, or otherwise invalid. -// -// * ErrCodeKeyUnavailableException "KeyUnavailableException" -// The request was rejected because the specified CMK was not available. The -// request can be retried. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInvalidKeyUsageException "InvalidKeyUsageException" -// The request was rejected because the specified KeySpec value is not valid. -// -// * ErrCodeInvalidGrantTokenException "InvalidGrantTokenException" -// The request was rejected because the specified grant token is not valid. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ReEncrypt -func (c *KMS) ReEncrypt(input *ReEncryptInput) (*ReEncryptOutput, error) { - req, out := c.ReEncryptRequest(input) - return out, req.Send() -} - -// ReEncryptWithContext is the same as ReEncrypt with the addition of -// the ability to pass a context and additional request options. -// -// See ReEncrypt for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) ReEncryptWithContext(ctx aws.Context, input *ReEncryptInput, opts ...request.Option) (*ReEncryptOutput, error) { - req, out := c.ReEncryptRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRetireGrant = "RetireGrant" - -// RetireGrantRequest generates a "aws/request.Request" representing the -// client's request for the RetireGrant operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RetireGrant for more information on using the RetireGrant -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RetireGrantRequest method. -// req, resp := client.RetireGrantRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/RetireGrant -func (c *KMS) RetireGrantRequest(input *RetireGrantInput) (req *request.Request, output *RetireGrantOutput) { - op := &request.Operation{ - Name: opRetireGrant, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RetireGrantInput{} - } - - output = &RetireGrantOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RetireGrant API operation for AWS Key Management Service. -// -// Retires a grant. To clean up, you can retire a grant when you're done using -// it. You should revoke a grant when you intend to actively deny operations -// that depend on it. The following are permitted to call this API: -// -// * The AWS account (root user) under which the grant was created -// -// * The RetiringPrincipal, if present in the grant -// -// * The GranteePrincipal, if RetireGrant is an operation specified in the -// grant -// -// You must identify the grant to retire by its grant token or by a combination -// of the grant ID and the Amazon Resource Name (ARN) of the customer master -// key (CMK). A grant token is a unique variable-length base64-encoded string. -// A grant ID is a 64 character unique identifier of a grant. The CreateGrant -// operation returns both. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation RetireGrant for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeInvalidGrantTokenException "InvalidGrantTokenException" -// The request was rejected because the specified grant token is not valid. -// -// * ErrCodeInvalidGrantIdException "InvalidGrantIdException" -// The request was rejected because the specified GrantId is not valid. -// -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/RetireGrant -func (c *KMS) RetireGrant(input *RetireGrantInput) (*RetireGrantOutput, error) { - req, out := c.RetireGrantRequest(input) - return out, req.Send() -} - -// RetireGrantWithContext is the same as RetireGrant with the addition of -// the ability to pass a context and additional request options. -// -// See RetireGrant for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) RetireGrantWithContext(ctx aws.Context, input *RetireGrantInput, opts ...request.Option) (*RetireGrantOutput, error) { - req, out := c.RetireGrantRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRevokeGrant = "RevokeGrant" - -// RevokeGrantRequest generates a "aws/request.Request" representing the -// client's request for the RevokeGrant operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RevokeGrant for more information on using the RevokeGrant -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RevokeGrantRequest method. -// req, resp := client.RevokeGrantRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/RevokeGrant -func (c *KMS) RevokeGrantRequest(input *RevokeGrantInput) (req *request.Request, output *RevokeGrantOutput) { - op := &request.Operation{ - Name: opRevokeGrant, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RevokeGrantInput{} - } - - output = &RevokeGrantOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RevokeGrant API operation for AWS Key Management Service. -// -// Revokes the specified grant for the specified customer master key (CMK). -// You can revoke a grant to actively deny operations that depend on it. -// -// To perform this operation on a CMK in a different AWS account, specify the -// key ARN in the value of the KeyId parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation RevokeGrant for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeInvalidGrantIdException "InvalidGrantIdException" -// The request was rejected because the specified GrantId is not valid. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/RevokeGrant -func (c *KMS) RevokeGrant(input *RevokeGrantInput) (*RevokeGrantOutput, error) { - req, out := c.RevokeGrantRequest(input) - return out, req.Send() -} - -// RevokeGrantWithContext is the same as RevokeGrant with the addition of -// the ability to pass a context and additional request options. -// -// See RevokeGrant for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) RevokeGrantWithContext(ctx aws.Context, input *RevokeGrantInput, opts ...request.Option) (*RevokeGrantOutput, error) { - req, out := c.RevokeGrantRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opScheduleKeyDeletion = "ScheduleKeyDeletion" - -// ScheduleKeyDeletionRequest generates a "aws/request.Request" representing the -// client's request for the ScheduleKeyDeletion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ScheduleKeyDeletion for more information on using the ScheduleKeyDeletion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ScheduleKeyDeletionRequest method. -// req, resp := client.ScheduleKeyDeletionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ScheduleKeyDeletion -func (c *KMS) ScheduleKeyDeletionRequest(input *ScheduleKeyDeletionInput) (req *request.Request, output *ScheduleKeyDeletionOutput) { - op := &request.Operation{ - Name: opScheduleKeyDeletion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ScheduleKeyDeletionInput{} - } - - output = &ScheduleKeyDeletionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ScheduleKeyDeletion API operation for AWS Key Management Service. -// -// Schedules the deletion of a customer master key (CMK). You may provide a -// waiting period, specified in days, before deletion occurs. If you do not -// provide a waiting period, the default period of 30 days is used. When this -// operation is successful, the key state of the CMK changes to PendingDeletion. -// Before the waiting period ends, you can use CancelKeyDeletion to cancel the -// deletion of the CMK. After the waiting period ends, AWS KMS deletes the CMK -// and all AWS KMS data associated with it, including all aliases that refer -// to it. -// -// Deleting a CMK is a destructive and potentially dangerous operation. When -// a CMK is deleted, all data that was encrypted under the CMK is unrecoverable. -// To prevent the use of a CMK without deleting it, use DisableKey. -// -// If you schedule deletion of a CMK from a custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html), -// when the waiting period expires, ScheduleKeyDeletion deletes the CMK from -// AWS KMS. Then AWS KMS makes a best effort to delete the key material from -// the associated AWS CloudHSM cluster. However, you might need to manually -// delete the orphaned key material (http://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key) -// from the cluster and its backups. -// -// You cannot perform this operation on a CMK in a different AWS account. -// -// For more information about scheduling a CMK for deletion, see Deleting Customer -// Master Keys (http://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html) -// in the AWS Key Management Service Developer Guide. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation ScheduleKeyDeletion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ScheduleKeyDeletion -func (c *KMS) ScheduleKeyDeletion(input *ScheduleKeyDeletionInput) (*ScheduleKeyDeletionOutput, error) { - req, out := c.ScheduleKeyDeletionRequest(input) - return out, req.Send() -} - -// ScheduleKeyDeletionWithContext is the same as ScheduleKeyDeletion with the addition of -// the ability to pass a context and additional request options. -// -// See ScheduleKeyDeletion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) ScheduleKeyDeletionWithContext(ctx aws.Context, input *ScheduleKeyDeletionInput, opts ...request.Option) (*ScheduleKeyDeletionOutput, error) { - req, out := c.ScheduleKeyDeletionRequest(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/kms-2014-11-01/TagResource -func (c *KMS) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for AWS Key Management Service. -// -// Adds or edits tags for a customer master key (CMK). You cannot perform this -// operation on a CMK in a different AWS account. -// -// Each tag consists of a tag key and a tag value. Tag keys and tag values are -// both required, but tag values can be empty (null) strings. -// -// You can only use a tag key once for each CMK. If you use the tag key again, -// AWS KMS replaces the current tag value with the specified value. -// -// For information about the rules that apply to tag keys and tag values, see -// User-Defined Tag Restrictions (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html) -// in the AWS Billing and Cost Management User Guide. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because a limit was exceeded. For more information, -// see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeTagException "TagException" -// The request was rejected because one or more tags are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/TagResource -func (c *KMS) 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 *KMS) 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/kms-2014-11-01/UntagResource -func (c *KMS) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for AWS Key Management Service. -// -// Removes the specified tags from the specified customer master key (CMK). -// You cannot perform this operation on a CMK in a different AWS account. -// -// To remove a tag, specify the tag key. To change the tag value of an existing -// tag key, use TagResource. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeTagException "TagException" -// The request was rejected because one or more tags are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UntagResource -func (c *KMS) 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 *KMS) 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 opUpdateAlias = "UpdateAlias" - -// UpdateAliasRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAlias for more information on using the UpdateAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAliasRequest method. -// req, resp := client.UpdateAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateAlias -func (c *KMS) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output *UpdateAliasOutput) { - op := &request.Operation{ - Name: opUpdateAlias, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAliasInput{} - } - - output = &UpdateAliasOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateAlias API operation for AWS Key Management Service. -// -// Associates an existing alias with a different customer master key (CMK). -// Each CMK can have multiple aliases, but the aliases must be unique within -// the account and region. You cannot perform this operation on an alias in -// a different AWS account. -// -// This operation works only on existing aliases. To change the alias of a CMK -// to a new value, use CreateAlias to create a new alias and DeleteAlias to -// delete the old alias. -// -// Because an alias is not a property of a CMK, you can create, update, and -// delete the aliases of a CMK without affecting the CMK. Also, aliases do not -// appear in the response from the DescribeKey operation. To get the aliases -// of all CMKs in the account, use the ListAliases operation. -// -// An alias name can contain only alphanumeric characters, forward slashes (/), -// underscores (_), and dashes (-). An alias must start with the word alias -// followed by a forward slash (alias/). The alias name can contain only alphanumeric -// characters, forward slashes (/), underscores (_), and dashes (-). Alias names -// cannot begin with aws; that alias name prefix is reserved by Amazon Web Services -// (AWS). -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation UpdateAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateAlias -func (c *KMS) UpdateAlias(input *UpdateAliasInput) (*UpdateAliasOutput, error) { - req, out := c.UpdateAliasRequest(input) - return out, req.Send() -} - -// UpdateAliasWithContext is the same as UpdateAlias with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) UpdateAliasWithContext(ctx aws.Context, input *UpdateAliasInput, opts ...request.Option) (*UpdateAliasOutput, error) { - req, out := c.UpdateAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateCustomKeyStore = "UpdateCustomKeyStore" - -// UpdateCustomKeyStoreRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCustomKeyStore operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateCustomKeyStore for more information on using the UpdateCustomKeyStore -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateCustomKeyStoreRequest method. -// req, resp := client.UpdateCustomKeyStoreRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateCustomKeyStore -func (c *KMS) UpdateCustomKeyStoreRequest(input *UpdateCustomKeyStoreInput) (req *request.Request, output *UpdateCustomKeyStoreOutput) { - op := &request.Operation{ - Name: opUpdateCustomKeyStore, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateCustomKeyStoreInput{} - } - - output = &UpdateCustomKeyStoreOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateCustomKeyStore API operation for AWS Key Management Service. -// -// Changes the properties of a custom key store. Use the CustomKeyStoreId parameter -// to identify the custom key store you want to edit. Use the remaining parameters -// to change the properties of the custom key store. -// -// You can only update a custom key store that is disconnected. To disconnect -// the custom key store, use DisconnectCustomKeyStore. To reconnect the custom -// key store after the update completes, use ConnectCustomKeyStore. To find -// the connection state of a custom key store, use the DescribeCustomKeyStores -// operation. -// -// Use the NewCustomKeyStoreName parameter to change the friendly name of the -// custom key store to the value that you specify. -// -// Use the KeyStorePassword parameter tell AWS KMS the current password of the -// kmsuser (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser) -// crypto user (CU) in the associated AWS CloudHSM cluster. You can use this -// parameter to fix connection failures that occur when AWS KMS cannot log into -// the associated cluster because the kmsuser password has changed. This value -// does not change the password in the AWS CloudHSM cluster. -// -// Use the CloudHsmClusterId parameter to associate the custom key store with -// a related AWS CloudHSM cluster, that is, a cluster that shares a backup history -// with the original cluster. You can use this parameter to repair a custom -// key store if its AWS CloudHSM cluster becomes corrupted or is deleted, or -// when you need to create or restore a cluster from a backup. -// -// The cluster ID must identify a AWS CloudHSM cluster with the following requirements. -// -// * The cluster must be active and be in the same AWS account and Region -// as the custom key store. -// -// * The cluster must have the same cluster certificate as the original cluster. -// You cannot use this parameter to associate the custom key store with an -// unrelated cluster. To view the cluster certificate, use the AWS CloudHSM -// DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) -// operation. Clusters that share a backup history have the same cluster -// certificate. -// -// * The cluster must be configured with subnets in at least two different -// Availability Zones in the Region. Because AWS CloudHSM is not supported -// in all Availability Zones, we recommend that the cluster have subnets -// in all Availability Zones in the Region. -// -// * The cluster must contain at least two active HSMs, each in a different -// Availability Zone. -// -// If the operation succeeds, it returns a JSON object with no properties. -// -// This operation is part of the Custom Key Store feature (http://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) -// feature in AWS KMS, which combines the convenience and extensive integration -// of AWS KMS with the isolation and control of a single-tenant key store. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation UpdateCustomKeyStore for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCustomKeyStoreNotFoundException "CustomKeyStoreNotFoundException" -// The request was rejected because AWS KMS cannot find a custom key store with -// the specified key store name or ID. -// -// * ErrCodeCloudHsmClusterNotFoundException "CloudHsmClusterNotFoundException" -// The request was rejected because AWS KMS cannot find the AWS CloudHSM cluster -// with the specified cluster ID. Retry the request with a different cluster -// ID. -// -// * ErrCodeCloudHsmClusterNotRelatedException "CloudHsmClusterNotRelatedException" -// The request was rejected because the specified AWS CloudHSM cluster has a -// different cluster certificate than the original cluster. You cannot use the -// operation to specify an unrelated cluster. -// -// Specify a cluster that shares a backup history with the original cluster. -// This includes clusters that were created from a backup of the current cluster, -// and clusters that were created from the same backup that produced the current -// cluster. -// -// Clusters that share a backup history have the same cluster certificate. To -// view the cluster certificate of a cluster, use the DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) -// operation. -// -// * ErrCodeCustomKeyStoreInvalidStateException "CustomKeyStoreInvalidStateException" -// The request was rejected because of the ConnectionState of the custom key -// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores -// operation. -// -// This exception is thrown under the following conditions: -// -// * You requested the CreateKey or GenerateRandom operation in a custom -// key store that is not connected. These operations are valid only when -// the custom key store ConnectionState is CONNECTED. -// -// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation -// on a custom key store that is not disconnected. This operation is valid -// only when the custom key store ConnectionState is DISCONNECTED. -// -// * You requested the ConnectCustomKeyStore operation on a custom key store -// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid -// for all other ConnectionState values. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeCloudHsmClusterNotActiveException "CloudHsmClusterNotActiveException" -// The request was rejected because the AWS CloudHSM cluster that is associated -// with the custom key store is not active. Initialize and activate the cluster -// and try the command again. For detailed instructions, see Getting Started -// (http://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html) -// in the AWS CloudHSM User Guide. -// -// * ErrCodeCloudHsmClusterInvalidConfigurationException "CloudHsmClusterInvalidConfigurationException" -// The request was rejected because the associated AWS CloudHSM cluster did -// not meet the configuration requirements for a custom key store. The cluster -// must be configured with private subnets in at least two different Availability -// Zones in the Region. Also, it must contain at least as many HSMs as the operation -// requires. -// -// For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey operations, -// the AWS CloudHSM cluster must have at least two active HSMs, each in a different -// Availability Zone. For the ConnectCustomKeyStore operation, the AWS CloudHSM -// must contain at least one active HSM. -// -// For information about creating a private subnet for a AWS CloudHSM cluster, -// see Create a Private Subnet (http://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html) -// in the AWS CloudHSM User Guide. To add HSMs, use the AWS CloudHSM CreateHsm -// (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html) -// operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateCustomKeyStore -func (c *KMS) UpdateCustomKeyStore(input *UpdateCustomKeyStoreInput) (*UpdateCustomKeyStoreOutput, error) { - req, out := c.UpdateCustomKeyStoreRequest(input) - return out, req.Send() -} - -// UpdateCustomKeyStoreWithContext is the same as UpdateCustomKeyStore with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCustomKeyStore for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) UpdateCustomKeyStoreWithContext(ctx aws.Context, input *UpdateCustomKeyStoreInput, opts ...request.Option) (*UpdateCustomKeyStoreOutput, error) { - req, out := c.UpdateCustomKeyStoreRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateKeyDescription = "UpdateKeyDescription" - -// UpdateKeyDescriptionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateKeyDescription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateKeyDescription for more information on using the UpdateKeyDescription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateKeyDescriptionRequest method. -// req, resp := client.UpdateKeyDescriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateKeyDescription -func (c *KMS) UpdateKeyDescriptionRequest(input *UpdateKeyDescriptionInput) (req *request.Request, output *UpdateKeyDescriptionOutput) { - op := &request.Operation{ - Name: opUpdateKeyDescription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateKeyDescriptionInput{} - } - - output = &UpdateKeyDescriptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateKeyDescription API operation for AWS Key Management Service. -// -// Updates the description of a customer master key (CMK). To see the decription -// of a CMK, use DescribeKey. -// -// You cannot perform this operation on a CMK in a different AWS account. -// -// The result of this operation varies with the key state of the CMK. For details, -// see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Key Management Service's -// API operation UpdateKeyDescription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The request was rejected because the specified entity or resource could not -// be found. -// -// * ErrCodeInvalidArnException "InvalidArnException" -// The request was rejected because a specified ARN was not valid. -// -// * ErrCodeDependencyTimeoutException "DependencyTimeoutException" -// The system timed out while trying to fulfill the request. The request can -// be retried. -// -// * ErrCodeInternalException "KMSInternalException" -// The request was rejected because an internal exception occurred. The request -// can be retried. -// -// * ErrCodeInvalidStateException "KMSInvalidStateException" -// The request was rejected because the state of the specified resource is not -// valid for this request. -// -// For more information about how key state affects the use of a CMK, see How -// Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateKeyDescription -func (c *KMS) UpdateKeyDescription(input *UpdateKeyDescriptionInput) (*UpdateKeyDescriptionOutput, error) { - req, out := c.UpdateKeyDescriptionRequest(input) - return out, req.Send() -} - -// UpdateKeyDescriptionWithContext is the same as UpdateKeyDescription with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateKeyDescription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *KMS) UpdateKeyDescriptionWithContext(ctx aws.Context, input *UpdateKeyDescriptionInput, opts ...request.Option) (*UpdateKeyDescriptionOutput, error) { - req, out := c.UpdateKeyDescriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Contains information about an alias. -type AliasListEntry struct { - _ struct{} `type:"structure"` - - // String that contains the key ARN. - AliasArn *string `min:"20" type:"string"` - - // String that contains the alias. - AliasName *string `min:"1" type:"string"` - - // String that contains the key identifier referred to by the alias. - TargetKeyId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s AliasListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AliasListEntry) GoString() string { - return s.String() -} - -// SetAliasArn sets the AliasArn field's value. -func (s *AliasListEntry) SetAliasArn(v string) *AliasListEntry { - s.AliasArn = &v - return s -} - -// SetAliasName sets the AliasName field's value. -func (s *AliasListEntry) SetAliasName(v string) *AliasListEntry { - s.AliasName = &v - return s -} - -// SetTargetKeyId sets the TargetKeyId field's value. -func (s *AliasListEntry) SetTargetKeyId(v string) *AliasListEntry { - s.TargetKeyId = &v - return s -} - -type CancelKeyDeletionInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for the customer master key (CMK) for which to cancel - // deletion. - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelKeyDeletionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelKeyDeletionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelKeyDeletionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelKeyDeletionInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *CancelKeyDeletionInput) SetKeyId(v string) *CancelKeyDeletionInput { - s.KeyId = &v - return s -} - -type CancelKeyDeletionOutput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the master key for which deletion is canceled. - KeyId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CancelKeyDeletionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelKeyDeletionOutput) GoString() string { - return s.String() -} - -// SetKeyId sets the KeyId field's value. -func (s *CancelKeyDeletionOutput) SetKeyId(v string) *CancelKeyDeletionOutput { - s.KeyId = &v - return s -} - -type ConnectCustomKeyStoreInput struct { - _ struct{} `type:"structure"` - - // Enter the key store ID of the custom key store that you want to connect. - // To find the ID of a custom key store, use the DescribeCustomKeyStores operation. - // - // CustomKeyStoreId is a required field - CustomKeyStoreId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ConnectCustomKeyStoreInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConnectCustomKeyStoreInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConnectCustomKeyStoreInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConnectCustomKeyStoreInput"} - if s.CustomKeyStoreId == nil { - invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreId")) - } - if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. -func (s *ConnectCustomKeyStoreInput) SetCustomKeyStoreId(v string) *ConnectCustomKeyStoreInput { - s.CustomKeyStoreId = &v - return s -} - -type ConnectCustomKeyStoreOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ConnectCustomKeyStoreOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConnectCustomKeyStoreOutput) GoString() string { - return s.String() -} - -type CreateAliasInput struct { - _ struct{} `type:"structure"` - - // String that contains the display name. The name must start with the word - // "alias" followed by a forward slash (alias/). Aliases that begin with "alias/AWS" - // are reserved. - // - // AliasName is a required field - AliasName *string `min:"1" type:"string" required:"true"` - - // Identifies the CMK for which you are creating the alias. This value cannot - // be an alias. - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // TargetKeyId is a required field - TargetKeyId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"} - if s.AliasName == nil { - invalidParams.Add(request.NewErrParamRequired("AliasName")) - } - if s.AliasName != nil && len(*s.AliasName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AliasName", 1)) - } - if s.TargetKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("TargetKeyId")) - } - if s.TargetKeyId != nil && len(*s.TargetKeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetKeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliasName sets the AliasName field's value. -func (s *CreateAliasInput) SetAliasName(v string) *CreateAliasInput { - s.AliasName = &v - return s -} - -// SetTargetKeyId sets the TargetKeyId field's value. -func (s *CreateAliasInput) SetTargetKeyId(v string) *CreateAliasInput { - s.TargetKeyId = &v - return s -} - -type CreateAliasOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAliasOutput) GoString() string { - return s.String() -} - -type CreateCustomKeyStoreInput struct { - _ struct{} `type:"structure"` - - // Identifies the AWS CloudHSM cluster for the custom key store. Enter the cluster - // ID of any active AWS CloudHSM cluster that is not already associated with - // a custom key store. To find the cluster ID, use the DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) - // operation. - // - // CloudHsmClusterId is a required field - CloudHsmClusterId *string `min:"19" type:"string" required:"true"` - - // Specifies a friendly name for the custom key store. The name must be unique - // in your AWS account. - // - // CustomKeyStoreName is a required field - CustomKeyStoreName *string `min:"1" type:"string" required:"true"` - - // Enter the password of the kmsuser (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser) - // crypto user (CU) account in the specified AWS CloudHSM cluster. AWS KMS logs - // into the cluster as this user to manage key material on your behalf. - // - // This parameter tells AWS KMS the kmsuser account password; it does not change - // the password in the AWS CloudHSM cluster. - // - // KeyStorePassword is a required field - KeyStorePassword *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // Enter the content of the trust anchor certificate for the cluster. This is - // the content of the customerCA.crt file that you created when you initialized - // the cluster (http://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html). - // - // TrustAnchorCertificate is a required field - TrustAnchorCertificate *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateCustomKeyStoreInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCustomKeyStoreInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCustomKeyStoreInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCustomKeyStoreInput"} - if s.CloudHsmClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("CloudHsmClusterId")) - } - if s.CloudHsmClusterId != nil && len(*s.CloudHsmClusterId) < 19 { - invalidParams.Add(request.NewErrParamMinLen("CloudHsmClusterId", 19)) - } - if s.CustomKeyStoreName == nil { - invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreName")) - } - if s.CustomKeyStoreName != nil && len(*s.CustomKeyStoreName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreName", 1)) - } - if s.KeyStorePassword == nil { - invalidParams.Add(request.NewErrParamRequired("KeyStorePassword")) - } - if s.KeyStorePassword != nil && len(*s.KeyStorePassword) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyStorePassword", 1)) - } - if s.TrustAnchorCertificate == nil { - invalidParams.Add(request.NewErrParamRequired("TrustAnchorCertificate")) - } - if s.TrustAnchorCertificate != nil && len(*s.TrustAnchorCertificate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TrustAnchorCertificate", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudHsmClusterId sets the CloudHsmClusterId field's value. -func (s *CreateCustomKeyStoreInput) SetCloudHsmClusterId(v string) *CreateCustomKeyStoreInput { - s.CloudHsmClusterId = &v - return s -} - -// SetCustomKeyStoreName sets the CustomKeyStoreName field's value. -func (s *CreateCustomKeyStoreInput) SetCustomKeyStoreName(v string) *CreateCustomKeyStoreInput { - s.CustomKeyStoreName = &v - return s -} - -// SetKeyStorePassword sets the KeyStorePassword field's value. -func (s *CreateCustomKeyStoreInput) SetKeyStorePassword(v string) *CreateCustomKeyStoreInput { - s.KeyStorePassword = &v - return s -} - -// SetTrustAnchorCertificate sets the TrustAnchorCertificate field's value. -func (s *CreateCustomKeyStoreInput) SetTrustAnchorCertificate(v string) *CreateCustomKeyStoreInput { - s.TrustAnchorCertificate = &v - return s -} - -type CreateCustomKeyStoreOutput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the new custom key store. - CustomKeyStoreId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateCustomKeyStoreOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCustomKeyStoreOutput) GoString() string { - return s.String() -} - -// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. -func (s *CreateCustomKeyStoreOutput) SetCustomKeyStoreId(v string) *CreateCustomKeyStoreOutput { - s.CustomKeyStoreId = &v - return s -} - -type CreateGrantInput struct { - _ struct{} `type:"structure"` - - // A structure that you can use to allow certain operations in the grant only - // when the desired encryption context is present. For more information about - // encryption context, see Encryption Context (http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html) - // in the AWS Key Management Service Developer Guide. - Constraints *GrantConstraints `type:"structure"` - - // A list of grant tokens. - // - // For more information, see Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) - // in the AWS Key Management Service Developer Guide. - GrantTokens []*string `type:"list"` - - // The principal that is given permission to perform the operations that the - // grant permits. - // - // To specify the principal, use the Amazon Resource Name (ARN) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // of an AWS principal. Valid AWS principals include AWS accounts (root), IAM - // users, IAM roles, federated users, and assumed role users. For examples of - // the ARN syntax to use for specifying a principal, see AWS Identity and Access - // Management (IAM) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam) - // in the Example ARNs section of the AWS General Reference. - // - // GranteePrincipal is a required field - GranteePrincipal *string `min:"1" type:"string" required:"true"` - - // The unique identifier for the customer master key (CMK) that the grant applies - // to. - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify - // a CMK in a different AWS account, you must use the key ARN. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // A friendly name for identifying the grant. Use this value to prevent unintended - // creation of duplicate grants when retrying this request. - // - // When this value is absent, all CreateGrant requests result in a new grant - // with a unique GrantId even if all the supplied parameters are identical. - // This can result in unintended duplicates when you retry the CreateGrant request. - // - // When this value is present, you can retry a CreateGrant request with identical - // parameters; if the grant already exists, the original GrantId is returned - // without creating a new grant. Note that the returned grant token is unique - // with every CreateGrant request, even when a duplicate GrantId is returned. - // All grant tokens obtained in this way can be used interchangeably. - Name *string `min:"1" type:"string"` - - // A list of operations that the grant permits. - // - // Operations is a required field - Operations []*string `type:"list" required:"true"` - - // The principal that is given permission to retire the grant by using RetireGrant - // operation. - // - // To specify the principal, use the Amazon Resource Name (ARN) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // of an AWS principal. Valid AWS principals include AWS accounts (root), IAM - // users, federated users, and assumed role users. For examples of the ARN syntax - // to use for specifying a principal, see AWS Identity and Access Management - // (IAM) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam) - // in the Example ARNs section of the AWS General Reference. - RetiringPrincipal *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateGrantInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateGrantInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateGrantInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateGrantInput"} - if s.GranteePrincipal == nil { - invalidParams.Add(request.NewErrParamRequired("GranteePrincipal")) - } - if s.GranteePrincipal != nil && len(*s.GranteePrincipal) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GranteePrincipal", 1)) - } - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Operations == nil { - invalidParams.Add(request.NewErrParamRequired("Operations")) - } - if s.RetiringPrincipal != nil && len(*s.RetiringPrincipal) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RetiringPrincipal", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConstraints sets the Constraints field's value. -func (s *CreateGrantInput) SetConstraints(v *GrantConstraints) *CreateGrantInput { - s.Constraints = v - return s -} - -// SetGrantTokens sets the GrantTokens field's value. -func (s *CreateGrantInput) SetGrantTokens(v []*string) *CreateGrantInput { - s.GrantTokens = v - return s -} - -// SetGranteePrincipal sets the GranteePrincipal field's value. -func (s *CreateGrantInput) SetGranteePrincipal(v string) *CreateGrantInput { - s.GranteePrincipal = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *CreateGrantInput) SetKeyId(v string) *CreateGrantInput { - s.KeyId = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateGrantInput) SetName(v string) *CreateGrantInput { - s.Name = &v - return s -} - -// SetOperations sets the Operations field's value. -func (s *CreateGrantInput) SetOperations(v []*string) *CreateGrantInput { - s.Operations = v - return s -} - -// SetRetiringPrincipal sets the RetiringPrincipal field's value. -func (s *CreateGrantInput) SetRetiringPrincipal(v string) *CreateGrantInput { - s.RetiringPrincipal = &v - return s -} - -type CreateGrantOutput struct { - _ struct{} `type:"structure"` - - // The unique identifier for the grant. - // - // You can use the GrantId in a subsequent RetireGrant or RevokeGrant operation. - GrantId *string `min:"1" type:"string"` - - // The grant token. - // - // For more information, see Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) - // in the AWS Key Management Service Developer Guide. - GrantToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateGrantOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateGrantOutput) GoString() string { - return s.String() -} - -// SetGrantId sets the GrantId field's value. -func (s *CreateGrantOutput) SetGrantId(v string) *CreateGrantOutput { - s.GrantId = &v - return s -} - -// SetGrantToken sets the GrantToken field's value. -func (s *CreateGrantOutput) SetGrantToken(v string) *CreateGrantOutput { - s.GrantToken = &v - return s -} - -type CreateKeyInput struct { - _ struct{} `type:"structure"` - - // A flag to indicate whether to bypass the key policy lockout safety check. - // - // Setting this value to true increases the risk that the CMK becomes unmanageable. - // Do not set this value to true indiscriminately. - // - // For more information, refer to the scenario in the Default Key Policy (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) - // section in the AWS Key Management Service Developer Guide. - // - // Use this parameter only when you include a policy in the request and you - // intend to prevent the principal that is making the request from making a - // subsequent PutKeyPolicy request on the CMK. - // - // The default value is false. - BypassPolicyLockoutSafetyCheck *bool `type:"boolean"` - - // Creates the CMK in the specified custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html) - // and the key material in its associated AWS CloudHSM cluster. To create a - // CMK in a custom key store, you must also specify the Origin parameter with - // a value of AWS_CLOUDHSM. The AWS CloudHSM cluster that is associated with - // the custom key store must have at least two active HSMs, each in a different - // Availability Zone in the Region. - // - // To find the ID of a custom key store, use the DescribeCustomKeyStores operation. - // - // The response includes the custom key store ID and the ID of the AWS CloudHSM - // cluster. - // - // This operation is part of the Custom Key Store feature (http://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) - // feature in AWS KMS, which combines the convenience and extensive integration - // of AWS KMS with the isolation and control of a single-tenant key store. - CustomKeyStoreId *string `min:"1" type:"string"` - - // A description of the CMK. - // - // Use a description that helps you decide whether the CMK is appropriate for - // a task. - Description *string `type:"string"` - - // The intended use of the CMK. - // - // You can use CMKs only for symmetric encryption and decryption. - KeyUsage *string `type:"string" enum:"KeyUsageType"` - - // The source of the CMK's key material. You cannot change the origin after - // you create the CMK. - // - // The default is AWS_KMS, which means AWS KMS creates the key material in its - // own key store. - // - // When the parameter value is EXTERNAL, AWS KMS creates a CMK without key material - // so that you can import key material from your existing key management infrastructure. - // For more information about importing key material into AWS KMS, see Importing - // Key Material (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) - // in the AWS Key Management Service Developer Guide. - // - // When the parameter value is AWS_CLOUDHSM, AWS KMS creates the CMK in a AWS - // KMS custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html) - // and creates its key material in the associated AWS CloudHSM cluster. You - // must also use the CustomKeyStoreId parameter to identify the custom key store. - Origin *string `type:"string" enum:"OriginType"` - - // The key policy to attach to the CMK. - // - // If you provide a key policy, it must meet the following criteria: - // - // * If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy - // must allow the principal that is making the CreateKey request to make - // a subsequent PutKeyPolicy request on the CMK. This reduces the risk that - // the CMK becomes unmanageable. For more information, refer to the scenario - // in the Default Key Policy (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) - // section of the AWS Key Management Service Developer Guide. - // - // * Each statement in the key policy must contain one or more principals. - // The principals in the key policy must exist and be visible to AWS KMS. - // When you create a new AWS principal (for example, an IAM user or role), - // you might need to enforce a delay before including the new principal in - // a key policy because the new principal might not be immediately visible - // to AWS KMS. For more information, see Changes that I make are not always - // immediately visible (http://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) - // in the AWS Identity and Access Management User Guide. - // - // If you do not provide a key policy, AWS KMS attaches a default key policy - // to the CMK. For more information, see Default Key Policy (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) - // in the AWS Key Management Service Developer Guide. - // - // The key policy size limit is 32 kilobytes (32768 bytes). - Policy *string `min:"1" type:"string"` - - // One or more tags. Each tag consists of a tag key and a tag value. Tag keys - // and tag values are both required, but tag values can be empty (null) strings. - // - // Use this parameter to tag the CMK when it is created. Alternately, you can - // omit this parameter and instead tag the CMK after it is created using TagResource. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreateKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateKeyInput"} - if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1)) - } - if s.Policy != nil && len(*s.Policy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBypassPolicyLockoutSafetyCheck sets the BypassPolicyLockoutSafetyCheck field's value. -func (s *CreateKeyInput) SetBypassPolicyLockoutSafetyCheck(v bool) *CreateKeyInput { - s.BypassPolicyLockoutSafetyCheck = &v - return s -} - -// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. -func (s *CreateKeyInput) SetCustomKeyStoreId(v string) *CreateKeyInput { - s.CustomKeyStoreId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateKeyInput) SetDescription(v string) *CreateKeyInput { - s.Description = &v - return s -} - -// SetKeyUsage sets the KeyUsage field's value. -func (s *CreateKeyInput) SetKeyUsage(v string) *CreateKeyInput { - s.KeyUsage = &v - return s -} - -// SetOrigin sets the Origin field's value. -func (s *CreateKeyInput) SetOrigin(v string) *CreateKeyInput { - s.Origin = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *CreateKeyInput) SetPolicy(v string) *CreateKeyInput { - s.Policy = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateKeyInput) SetTags(v []*Tag) *CreateKeyInput { - s.Tags = v - return s -} - -type CreateKeyOutput struct { - _ struct{} `type:"structure"` - - // Metadata associated with the CMK. - KeyMetadata *KeyMetadata `type:"structure"` -} - -// String returns the string representation -func (s CreateKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateKeyOutput) GoString() string { - return s.String() -} - -// SetKeyMetadata sets the KeyMetadata field's value. -func (s *CreateKeyOutput) SetKeyMetadata(v *KeyMetadata) *CreateKeyOutput { - s.KeyMetadata = v - return s -} - -// Contains information about each custom key store in the custom key store -// list. -type CustomKeyStoresListEntry struct { - _ struct{} `type:"structure"` - - // A unique identifier for the AWS CloudHSM cluster that is associated with - // the custom key store. - CloudHsmClusterId *string `min:"19" type:"string"` - - // Describes the connection error. Valid values are: - // - // * CLUSTER_NOT_FOUND - AWS KMS cannot find the AWS CloudHSM cluster with - // the specified cluster ID. - // - // * INSUFFICIENT_CLOUDHSM_HSMS - The associated AWS CloudHSM cluster does - // not contain any active HSMs. To connect a custom key store to its AWS - // CloudHSM cluster, the cluster must contain at least one active HSM. - // - // * INVALID_CREDENTIALS - AWS KMS does not have the correct password for - // the kmsuser crypto user in the AWS CloudHSM cluster. - // - // * NETWORK_ERRORS - Network errors are preventing AWS KMS from connecting - // to the custom key store. - // - // * USER_LOCKED_OUT - The kmsuser CU account is locked out of the associated - // AWS CloudHSM cluster due to too many failed password attempts. Before - // you can connect your custom key store to its AWS CloudHSM cluster, you - // must change the kmsuser account password and update the password value - // for the custom key store. - // - // For help with connection failures, see Troubleshooting Custom Key Stores - // (http://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html) - // in the AWS Key Management Service Developer Guide. - ConnectionErrorCode *string `type:"string" enum:"ConnectionErrorCodeType"` - - // Indicates whether the custom key store is connected to its AWS CloudHSM cluster. - // - // You can create and use CMKs in your custom key stores only when its connection - // state is CONNECTED. - // - // The value is DISCONNECTED if the key store has never been connected or you - // use the DisconnectCustomKeyStore operation to disconnect it. If the value - // is CONNECTED but you are having trouble using the custom key store, make - // sure that its associated AWS CloudHSM cluster is active and contains at least - // one active HSM. - // - // A value of FAILED indicates that an attempt to connect was unsuccessful. - // For help resolving a connection failure, see Troubleshooting a Custom Key - // Store (http://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html) - // in the AWS Key Management Service Developer Guide. - ConnectionState *string `type:"string" enum:"ConnectionStateType"` - - // The date and time when the custom key store was created. - CreationDate *time.Time `type:"timestamp"` - - // A unique identifier for the custom key store. - CustomKeyStoreId *string `min:"1" type:"string"` - - // The user-specified friendly name for the custom key store. - CustomKeyStoreName *string `min:"1" type:"string"` - - // The trust anchor certificate of the associated AWS CloudHSM cluster. When - // you initialize the cluster (http://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr), - // you create this certificate and save it in the customerCA.crt file. - TrustAnchorCertificate *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CustomKeyStoresListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CustomKeyStoresListEntry) GoString() string { - return s.String() -} - -// SetCloudHsmClusterId sets the CloudHsmClusterId field's value. -func (s *CustomKeyStoresListEntry) SetCloudHsmClusterId(v string) *CustomKeyStoresListEntry { - s.CloudHsmClusterId = &v - return s -} - -// SetConnectionErrorCode sets the ConnectionErrorCode field's value. -func (s *CustomKeyStoresListEntry) SetConnectionErrorCode(v string) *CustomKeyStoresListEntry { - s.ConnectionErrorCode = &v - return s -} - -// SetConnectionState sets the ConnectionState field's value. -func (s *CustomKeyStoresListEntry) SetConnectionState(v string) *CustomKeyStoresListEntry { - s.ConnectionState = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *CustomKeyStoresListEntry) SetCreationDate(v time.Time) *CustomKeyStoresListEntry { - s.CreationDate = &v - return s -} - -// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. -func (s *CustomKeyStoresListEntry) SetCustomKeyStoreId(v string) *CustomKeyStoresListEntry { - s.CustomKeyStoreId = &v - return s -} - -// SetCustomKeyStoreName sets the CustomKeyStoreName field's value. -func (s *CustomKeyStoresListEntry) SetCustomKeyStoreName(v string) *CustomKeyStoresListEntry { - s.CustomKeyStoreName = &v - return s -} - -// SetTrustAnchorCertificate sets the TrustAnchorCertificate field's value. -func (s *CustomKeyStoresListEntry) SetTrustAnchorCertificate(v string) *CustomKeyStoresListEntry { - s.TrustAnchorCertificate = &v - return s -} - -type DecryptInput struct { - _ struct{} `type:"structure"` - - // Ciphertext to be decrypted. The blob includes metadata. - // - // CiphertextBlob is automatically base64 encoded/decoded by the SDK. - // - // CiphertextBlob is a required field - CiphertextBlob []byte `min:"1" type:"blob" required:"true"` - - // The encryption context. If this was specified in the Encrypt function, it - // must be specified here or the decryption operation will fail. For more information, - // see Encryption Context (http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html). - EncryptionContext map[string]*string `type:"map"` - - // A list of grant tokens. - // - // For more information, see Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) - // in the AWS Key Management Service Developer Guide. - GrantTokens []*string `type:"list"` -} - -// String returns the string representation -func (s DecryptInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DecryptInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DecryptInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DecryptInput"} - if s.CiphertextBlob == nil { - invalidParams.Add(request.NewErrParamRequired("CiphertextBlob")) - } - if s.CiphertextBlob != nil && len(s.CiphertextBlob) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CiphertextBlob", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCiphertextBlob sets the CiphertextBlob field's value. -func (s *DecryptInput) SetCiphertextBlob(v []byte) *DecryptInput { - s.CiphertextBlob = v - return s -} - -// SetEncryptionContext sets the EncryptionContext field's value. -func (s *DecryptInput) SetEncryptionContext(v map[string]*string) *DecryptInput { - s.EncryptionContext = v - return s -} - -// SetGrantTokens sets the GrantTokens field's value. -func (s *DecryptInput) SetGrantTokens(v []*string) *DecryptInput { - s.GrantTokens = v - return s -} - -type DecryptOutput struct { - _ struct{} `type:"structure"` - - // ARN of the key used to perform the decryption. This value is returned if - // no errors are encountered during the operation. - KeyId *string `min:"1" type:"string"` - - // Decrypted plaintext data. When you use the HTTP API or the AWS CLI, the value - // is Base64-encdoded. Otherwise, it is not encoded. - // - // Plaintext is automatically base64 encoded/decoded by the SDK. - Plaintext []byte `min:"1" type:"blob" sensitive:"true"` -} - -// String returns the string representation -func (s DecryptOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DecryptOutput) GoString() string { - return s.String() -} - -// SetKeyId sets the KeyId field's value. -func (s *DecryptOutput) SetKeyId(v string) *DecryptOutput { - s.KeyId = &v - return s -} - -// SetPlaintext sets the Plaintext field's value. -func (s *DecryptOutput) SetPlaintext(v []byte) *DecryptOutput { - s.Plaintext = v - return s -} - -type DeleteAliasInput struct { - _ struct{} `type:"structure"` - - // The alias to be deleted. The name must start with the word "alias" followed - // by a forward slash (alias/). Aliases that begin with "alias/aws" are reserved. - // - // AliasName is a required field - AliasName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAliasInput"} - if s.AliasName == nil { - invalidParams.Add(request.NewErrParamRequired("AliasName")) - } - if s.AliasName != nil && len(*s.AliasName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AliasName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliasName sets the AliasName field's value. -func (s *DeleteAliasInput) SetAliasName(v string) *DeleteAliasInput { - s.AliasName = &v - return s -} - -type DeleteAliasOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAliasOutput) GoString() string { - return s.String() -} - -type DeleteCustomKeyStoreInput struct { - _ struct{} `type:"structure"` - - // Enter the ID of the custom key store you want to delete. To find the ID of - // a custom key store, use the DescribeCustomKeyStores operation. - // - // CustomKeyStoreId is a required field - CustomKeyStoreId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteCustomKeyStoreInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCustomKeyStoreInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCustomKeyStoreInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCustomKeyStoreInput"} - if s.CustomKeyStoreId == nil { - invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreId")) - } - if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. -func (s *DeleteCustomKeyStoreInput) SetCustomKeyStoreId(v string) *DeleteCustomKeyStoreInput { - s.CustomKeyStoreId = &v - return s -} - -type DeleteCustomKeyStoreOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCustomKeyStoreOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCustomKeyStoreOutput) GoString() string { - return s.String() -} - -type DeleteImportedKeyMaterialInput struct { - _ struct{} `type:"structure"` - - // The identifier of the CMK whose key material to delete. The CMK's Origin - // must be EXTERNAL. - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteImportedKeyMaterialInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteImportedKeyMaterialInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteImportedKeyMaterialInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteImportedKeyMaterialInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *DeleteImportedKeyMaterialInput) SetKeyId(v string) *DeleteImportedKeyMaterialInput { - s.KeyId = &v - return s -} - -type DeleteImportedKeyMaterialOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteImportedKeyMaterialOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteImportedKeyMaterialOutput) GoString() string { - return s.String() -} - -type DescribeCustomKeyStoresInput struct { - _ struct{} `type:"structure"` - - // Gets only information about the specified custom key store. Enter the key - // store ID. - // - // By default, this operation gets information about all custom key stores in - // the account and region. To limit the output to a particular custom key store, - // you can use either the CustomKeyStoreId or CustomKeyStoreName parameter, - // but not both. - CustomKeyStoreId *string `min:"1" type:"string"` - - // Gets only information about the specified custom key store. Enter the friendly - // name of the custom key store. - // - // By default, this operation gets information about all custom key stores in - // the account and region. To limit the output to a particular custom key store, - // you can use either the CustomKeyStoreId or CustomKeyStoreName parameter, - // but not both. - CustomKeyStoreName *string `min:"1" type:"string"` - - // Use this parameter to specify the maximum number of items to return. When - // this value is present, AWS KMS does not return more than the specified number - // of items, but it might return fewer. - Limit *int64 `min:"1" type:"integer"` - - // Use this parameter in a subsequent request after you receive a response with - // truncated results. Set it to the value of NextMarker from the truncated response - // you just received. - Marker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeCustomKeyStoresInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCustomKeyStoresInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCustomKeyStoresInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCustomKeyStoresInput"} - if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1)) - } - if s.CustomKeyStoreName != nil && len(*s.CustomKeyStoreName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreName", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. -func (s *DescribeCustomKeyStoresInput) SetCustomKeyStoreId(v string) *DescribeCustomKeyStoresInput { - s.CustomKeyStoreId = &v - return s -} - -// SetCustomKeyStoreName sets the CustomKeyStoreName field's value. -func (s *DescribeCustomKeyStoresInput) SetCustomKeyStoreName(v string) *DescribeCustomKeyStoresInput { - s.CustomKeyStoreName = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeCustomKeyStoresInput) SetLimit(v int64) *DescribeCustomKeyStoresInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCustomKeyStoresInput) SetMarker(v string) *DescribeCustomKeyStoresInput { - s.Marker = &v - return s -} - -type DescribeCustomKeyStoresOutput struct { - _ struct{} `type:"structure"` - - // Contains metadata about each custom key store. - CustomKeyStores []*CustomKeyStoresListEntry `type:"list"` - - // When Truncated is true, this element is present and contains the value to - // use for the Marker parameter in a subsequent request. - NextMarker *string `min:"1" type:"string"` - - // A flag that indicates whether there are more items in the list. When this - // value is true, the list in this response is truncated. To get more items, - // pass the value of the NextMarker element in this response to the Marker parameter - // in a subsequent request. - Truncated *bool `type:"boolean"` -} - -// String returns the string representation -func (s DescribeCustomKeyStoresOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCustomKeyStoresOutput) GoString() string { - return s.String() -} - -// SetCustomKeyStores sets the CustomKeyStores field's value. -func (s *DescribeCustomKeyStoresOutput) SetCustomKeyStores(v []*CustomKeyStoresListEntry) *DescribeCustomKeyStoresOutput { - s.CustomKeyStores = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeCustomKeyStoresOutput) SetNextMarker(v string) *DescribeCustomKeyStoresOutput { - s.NextMarker = &v - return s -} - -// SetTruncated sets the Truncated field's value. -func (s *DescribeCustomKeyStoresOutput) SetTruncated(v bool) *DescribeCustomKeyStoresOutput { - s.Truncated = &v - return s -} - -type DescribeKeyInput struct { - _ struct{} `type:"structure"` - - // A list of grant tokens. - // - // For more information, see Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) - // in the AWS Key Management Service Developer Guide. - GrantTokens []*string `type:"list"` - - // Describes the specified customer master key (CMK). - // - // If you specify a predefined AWS alias (an AWS alias with no key ID), KMS - // associates the alias with an AWS managed CMK (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys) - // and returns its KeyId and Arn in the response. - // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". To specify - // a CMK in a different AWS account, you must use the key ARN or alias ARN. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Alias name: alias/ExampleAlias - // - // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To - // get the alias name and alias ARN, use ListAliases. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeKeyInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGrantTokens sets the GrantTokens field's value. -func (s *DescribeKeyInput) SetGrantTokens(v []*string) *DescribeKeyInput { - s.GrantTokens = v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *DescribeKeyInput) SetKeyId(v string) *DescribeKeyInput { - s.KeyId = &v - return s -} - -type DescribeKeyOutput struct { - _ struct{} `type:"structure"` - - // Metadata associated with the key. - KeyMetadata *KeyMetadata `type:"structure"` -} - -// String returns the string representation -func (s DescribeKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeKeyOutput) GoString() string { - return s.String() -} - -// SetKeyMetadata sets the KeyMetadata field's value. -func (s *DescribeKeyOutput) SetKeyMetadata(v *KeyMetadata) *DescribeKeyOutput { - s.KeyMetadata = v - return s -} - -type DisableKeyInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the customer master key (CMK). - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableKeyInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *DisableKeyInput) SetKeyId(v string) *DisableKeyInput { - s.KeyId = &v - return s -} - -type DisableKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableKeyOutput) GoString() string { - return s.String() -} - -type DisableKeyRotationInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the customer master key (CMK). - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableKeyRotationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableKeyRotationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableKeyRotationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableKeyRotationInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *DisableKeyRotationInput) SetKeyId(v string) *DisableKeyRotationInput { - s.KeyId = &v - return s -} - -type DisableKeyRotationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableKeyRotationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableKeyRotationOutput) GoString() string { - return s.String() -} - -type DisconnectCustomKeyStoreInput struct { - _ struct{} `type:"structure"` - - // Enter the ID of the custom key store you want to disconnect. To find the - // ID of a custom key store, use the DescribeCustomKeyStores operation. - // - // CustomKeyStoreId is a required field - CustomKeyStoreId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisconnectCustomKeyStoreInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisconnectCustomKeyStoreInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisconnectCustomKeyStoreInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisconnectCustomKeyStoreInput"} - if s.CustomKeyStoreId == nil { - invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreId")) - } - if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. -func (s *DisconnectCustomKeyStoreInput) SetCustomKeyStoreId(v string) *DisconnectCustomKeyStoreInput { - s.CustomKeyStoreId = &v - return s -} - -type DisconnectCustomKeyStoreOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisconnectCustomKeyStoreOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisconnectCustomKeyStoreOutput) GoString() string { - return s.String() -} - -type EnableKeyInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the customer master key (CMK). - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s EnableKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableKeyInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *EnableKeyInput) SetKeyId(v string) *EnableKeyInput { - s.KeyId = &v - return s -} - -type EnableKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableKeyOutput) GoString() string { - return s.String() -} - -type EnableKeyRotationInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the customer master key (CMK). - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s EnableKeyRotationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableKeyRotationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableKeyRotationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableKeyRotationInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *EnableKeyRotationInput) SetKeyId(v string) *EnableKeyRotationInput { - s.KeyId = &v - return s -} - -type EnableKeyRotationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableKeyRotationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableKeyRotationOutput) GoString() string { - return s.String() -} - -type EncryptInput struct { - _ struct{} `type:"structure"` - - // Name-value pair that specifies the encryption context to be used for authenticated - // encryption. If used here, the same value must be supplied to the Decrypt - // API or decryption will fail. For more information, see Encryption Context - // (http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html). - EncryptionContext map[string]*string `type:"map"` - - // A list of grant tokens. - // - // For more information, see Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) - // in the AWS Key Management Service Developer Guide. - GrantTokens []*string `type:"list"` - - // A unique identifier for the customer master key (CMK). - // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". To specify - // a CMK in a different AWS account, you must use the key ARN or alias ARN. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Alias name: alias/ExampleAlias - // - // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To - // get the alias name and alias ARN, use ListAliases. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // Data to be encrypted. - // - // Plaintext is automatically base64 encoded/decoded by the SDK. - // - // Plaintext is a required field - Plaintext []byte `min:"1" type:"blob" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s EncryptInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EncryptInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EncryptInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EncryptInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.Plaintext == nil { - invalidParams.Add(request.NewErrParamRequired("Plaintext")) - } - if s.Plaintext != nil && len(s.Plaintext) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Plaintext", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryptionContext sets the EncryptionContext field's value. -func (s *EncryptInput) SetEncryptionContext(v map[string]*string) *EncryptInput { - s.EncryptionContext = v - return s -} - -// SetGrantTokens sets the GrantTokens field's value. -func (s *EncryptInput) SetGrantTokens(v []*string) *EncryptInput { - s.GrantTokens = v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *EncryptInput) SetKeyId(v string) *EncryptInput { - s.KeyId = &v - return s -} - -// SetPlaintext sets the Plaintext field's value. -func (s *EncryptInput) SetPlaintext(v []byte) *EncryptInput { - s.Plaintext = v - return s -} - -type EncryptOutput struct { - _ struct{} `type:"structure"` - - // The encrypted plaintext. When you use the HTTP API or the AWS CLI, the value - // is Base64-encdoded. Otherwise, it is not encoded. - // - // CiphertextBlob is automatically base64 encoded/decoded by the SDK. - CiphertextBlob []byte `min:"1" type:"blob"` - - // The ID of the key used during encryption. - KeyId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s EncryptOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EncryptOutput) GoString() string { - return s.String() -} - -// SetCiphertextBlob sets the CiphertextBlob field's value. -func (s *EncryptOutput) SetCiphertextBlob(v []byte) *EncryptOutput { - s.CiphertextBlob = v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *EncryptOutput) SetKeyId(v string) *EncryptOutput { - s.KeyId = &v - return s -} - -type GenerateDataKeyInput struct { - _ struct{} `type:"structure"` - - // A set of key-value pairs that represents additional authenticated data. - // - // For more information, see Encryption Context (http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html) - // in the AWS Key Management Service Developer Guide. - EncryptionContext map[string]*string `type:"map"` - - // A list of grant tokens. - // - // For more information, see Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) - // in the AWS Key Management Service Developer Guide. - GrantTokens []*string `type:"list"` - - // The identifier of the CMK under which to generate and encrypt the data encryption - // key. - // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". To specify - // a CMK in a different AWS account, you must use the key ARN or alias ARN. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Alias name: alias/ExampleAlias - // - // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To - // get the alias name and alias ARN, use ListAliases. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // The length of the data encryption key. Use AES_128 to generate a 128-bit - // symmetric key, or AES_256 to generate a 256-bit symmetric key. - KeySpec *string `type:"string" enum:"DataKeySpec"` - - // The length of the data encryption key in bytes. For example, use the value - // 64 to generate a 512-bit data key (64 bytes is 512 bits). For common key - // lengths (128-bit and 256-bit symmetric keys), we recommend that you use the - // KeySpec field instead of this one. - NumberOfBytes *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s GenerateDataKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GenerateDataKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GenerateDataKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GenerateDataKeyInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.NumberOfBytes != nil && *s.NumberOfBytes < 1 { - invalidParams.Add(request.NewErrParamMinValue("NumberOfBytes", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryptionContext sets the EncryptionContext field's value. -func (s *GenerateDataKeyInput) SetEncryptionContext(v map[string]*string) *GenerateDataKeyInput { - s.EncryptionContext = v - return s -} - -// SetGrantTokens sets the GrantTokens field's value. -func (s *GenerateDataKeyInput) SetGrantTokens(v []*string) *GenerateDataKeyInput { - s.GrantTokens = v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *GenerateDataKeyInput) SetKeyId(v string) *GenerateDataKeyInput { - s.KeyId = &v - return s -} - -// SetKeySpec sets the KeySpec field's value. -func (s *GenerateDataKeyInput) SetKeySpec(v string) *GenerateDataKeyInput { - s.KeySpec = &v - return s -} - -// SetNumberOfBytes sets the NumberOfBytes field's value. -func (s *GenerateDataKeyInput) SetNumberOfBytes(v int64) *GenerateDataKeyInput { - s.NumberOfBytes = &v - return s -} - -type GenerateDataKeyOutput struct { - _ struct{} `type:"structure"` - - // The encrypted data encryption key. When you use the HTTP API or the AWS CLI, - // the value is Base64-encdoded. Otherwise, it is not encoded. - // - // CiphertextBlob is automatically base64 encoded/decoded by the SDK. - CiphertextBlob []byte `min:"1" type:"blob"` - - // The identifier of the CMK under which the data encryption key was generated - // and encrypted. - KeyId *string `min:"1" type:"string"` - - // The data encryption key. When you use the HTTP API or the AWS CLI, the value - // is Base64-encdoded. Otherwise, it is not encoded. Use this data key for local - // encryption and decryption, then remove it from memory as soon as possible. - // - // Plaintext is automatically base64 encoded/decoded by the SDK. - Plaintext []byte `min:"1" type:"blob" sensitive:"true"` -} - -// String returns the string representation -func (s GenerateDataKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GenerateDataKeyOutput) GoString() string { - return s.String() -} - -// SetCiphertextBlob sets the CiphertextBlob field's value. -func (s *GenerateDataKeyOutput) SetCiphertextBlob(v []byte) *GenerateDataKeyOutput { - s.CiphertextBlob = v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *GenerateDataKeyOutput) SetKeyId(v string) *GenerateDataKeyOutput { - s.KeyId = &v - return s -} - -// SetPlaintext sets the Plaintext field's value. -func (s *GenerateDataKeyOutput) SetPlaintext(v []byte) *GenerateDataKeyOutput { - s.Plaintext = v - return s -} - -type GenerateDataKeyWithoutPlaintextInput struct { - _ struct{} `type:"structure"` - - // A set of key-value pairs that represents additional authenticated data. - // - // For more information, see Encryption Context (http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html) - // in the AWS Key Management Service Developer Guide. - EncryptionContext map[string]*string `type:"map"` - - // A list of grant tokens. - // - // For more information, see Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) - // in the AWS Key Management Service Developer Guide. - GrantTokens []*string `type:"list"` - - // The identifier of the customer master key (CMK) under which to generate and - // encrypt the data encryption key. - // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". To specify - // a CMK in a different AWS account, you must use the key ARN or alias ARN. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Alias name: alias/ExampleAlias - // - // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To - // get the alias name and alias ARN, use ListAliases. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // The length of the data encryption key. Use AES_128 to generate a 128-bit - // symmetric key, or AES_256 to generate a 256-bit symmetric key. - KeySpec *string `type:"string" enum:"DataKeySpec"` - - // The length of the data encryption key in bytes. For example, use the value - // 64 to generate a 512-bit data key (64 bytes is 512 bits). For common key - // lengths (128-bit and 256-bit symmetric keys), we recommend that you use the - // KeySpec field instead of this one. - NumberOfBytes *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s GenerateDataKeyWithoutPlaintextInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GenerateDataKeyWithoutPlaintextInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GenerateDataKeyWithoutPlaintextInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GenerateDataKeyWithoutPlaintextInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.NumberOfBytes != nil && *s.NumberOfBytes < 1 { - invalidParams.Add(request.NewErrParamMinValue("NumberOfBytes", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryptionContext sets the EncryptionContext field's value. -func (s *GenerateDataKeyWithoutPlaintextInput) SetEncryptionContext(v map[string]*string) *GenerateDataKeyWithoutPlaintextInput { - s.EncryptionContext = v - return s -} - -// SetGrantTokens sets the GrantTokens field's value. -func (s *GenerateDataKeyWithoutPlaintextInput) SetGrantTokens(v []*string) *GenerateDataKeyWithoutPlaintextInput { - s.GrantTokens = v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *GenerateDataKeyWithoutPlaintextInput) SetKeyId(v string) *GenerateDataKeyWithoutPlaintextInput { - s.KeyId = &v - return s -} - -// SetKeySpec sets the KeySpec field's value. -func (s *GenerateDataKeyWithoutPlaintextInput) SetKeySpec(v string) *GenerateDataKeyWithoutPlaintextInput { - s.KeySpec = &v - return s -} - -// SetNumberOfBytes sets the NumberOfBytes field's value. -func (s *GenerateDataKeyWithoutPlaintextInput) SetNumberOfBytes(v int64) *GenerateDataKeyWithoutPlaintextInput { - s.NumberOfBytes = &v - return s -} - -type GenerateDataKeyWithoutPlaintextOutput struct { - _ struct{} `type:"structure"` - - // The encrypted data encryption key. When you use the HTTP API or the AWS CLI, - // the value is Base64-encdoded. Otherwise, it is not encoded. - // - // CiphertextBlob is automatically base64 encoded/decoded by the SDK. - CiphertextBlob []byte `min:"1" type:"blob"` - - // The identifier of the CMK under which the data encryption key was generated - // and encrypted. - KeyId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GenerateDataKeyWithoutPlaintextOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GenerateDataKeyWithoutPlaintextOutput) GoString() string { - return s.String() -} - -// SetCiphertextBlob sets the CiphertextBlob field's value. -func (s *GenerateDataKeyWithoutPlaintextOutput) SetCiphertextBlob(v []byte) *GenerateDataKeyWithoutPlaintextOutput { - s.CiphertextBlob = v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *GenerateDataKeyWithoutPlaintextOutput) SetKeyId(v string) *GenerateDataKeyWithoutPlaintextOutput { - s.KeyId = &v - return s -} - -type GenerateRandomInput struct { - _ struct{} `type:"structure"` - - // Generates the random byte string in the AWS CloudHSM cluster that is associated - // with the specified custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html). - // To find the ID of a custom key store, use the DescribeCustomKeyStores operation. - CustomKeyStoreId *string `min:"1" type:"string"` - - // The length of the byte string. - NumberOfBytes *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s GenerateRandomInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GenerateRandomInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GenerateRandomInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GenerateRandomInput"} - if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1)) - } - if s.NumberOfBytes != nil && *s.NumberOfBytes < 1 { - invalidParams.Add(request.NewErrParamMinValue("NumberOfBytes", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. -func (s *GenerateRandomInput) SetCustomKeyStoreId(v string) *GenerateRandomInput { - s.CustomKeyStoreId = &v - return s -} - -// SetNumberOfBytes sets the NumberOfBytes field's value. -func (s *GenerateRandomInput) SetNumberOfBytes(v int64) *GenerateRandomInput { - s.NumberOfBytes = &v - return s -} - -type GenerateRandomOutput struct { - _ struct{} `type:"structure"` - - // The random byte string. When you use the HTTP API or the AWS CLI, the value - // is Base64-encdoded. Otherwise, it is not encoded. - // - // Plaintext is automatically base64 encoded/decoded by the SDK. - Plaintext []byte `min:"1" type:"blob" sensitive:"true"` -} - -// String returns the string representation -func (s GenerateRandomOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GenerateRandomOutput) GoString() string { - return s.String() -} - -// SetPlaintext sets the Plaintext field's value. -func (s *GenerateRandomOutput) SetPlaintext(v []byte) *GenerateRandomOutput { - s.Plaintext = v - return s -} - -type GetKeyPolicyInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the customer master key (CMK). - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // Specifies the name of the key policy. The only valid name is default. To - // get the names of key policies, use ListKeyPolicies. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetKeyPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetKeyPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetKeyPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetKeyPolicyInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *GetKeyPolicyInput) SetKeyId(v string) *GetKeyPolicyInput { - s.KeyId = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetKeyPolicyInput) SetPolicyName(v string) *GetKeyPolicyInput { - s.PolicyName = &v - return s -} - -type GetKeyPolicyOutput struct { - _ struct{} `type:"structure"` - - // A key policy document in JSON format. - Policy *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetKeyPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetKeyPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *GetKeyPolicyOutput) SetPolicy(v string) *GetKeyPolicyOutput { - s.Policy = &v - return s -} - -type GetKeyRotationStatusInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the customer master key (CMK). - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify - // a CMK in a different AWS account, you must use the key ARN. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetKeyRotationStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetKeyRotationStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetKeyRotationStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetKeyRotationStatusInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *GetKeyRotationStatusInput) SetKeyId(v string) *GetKeyRotationStatusInput { - s.KeyId = &v - return s -} - -type GetKeyRotationStatusOutput struct { - _ struct{} `type:"structure"` - - // A Boolean value that specifies whether key rotation is enabled. - KeyRotationEnabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s GetKeyRotationStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetKeyRotationStatusOutput) GoString() string { - return s.String() -} - -// SetKeyRotationEnabled sets the KeyRotationEnabled field's value. -func (s *GetKeyRotationStatusOutput) SetKeyRotationEnabled(v bool) *GetKeyRotationStatusOutput { - s.KeyRotationEnabled = &v - return s -} - -type GetParametersForImportInput struct { - _ struct{} `type:"structure"` - - // The identifier of the CMK into which you will import key material. The CMK's - // Origin must be EXTERNAL. - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // The algorithm you will use to encrypt the key material before importing it - // with ImportKeyMaterial. For more information, see Encrypt the Key Material - // (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-encrypt-key-material.html) - // in the AWS Key Management Service Developer Guide. - // - // WrappingAlgorithm is a required field - WrappingAlgorithm *string `type:"string" required:"true" enum:"AlgorithmSpec"` - - // The type of wrapping key (public key) to return in the response. Only 2048-bit - // RSA public keys are supported. - // - // WrappingKeySpec is a required field - WrappingKeySpec *string `type:"string" required:"true" enum:"WrappingKeySpec"` -} - -// String returns the string representation -func (s GetParametersForImportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetParametersForImportInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetParametersForImportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetParametersForImportInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.WrappingAlgorithm == nil { - invalidParams.Add(request.NewErrParamRequired("WrappingAlgorithm")) - } - if s.WrappingKeySpec == nil { - invalidParams.Add(request.NewErrParamRequired("WrappingKeySpec")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *GetParametersForImportInput) SetKeyId(v string) *GetParametersForImportInput { - s.KeyId = &v - return s -} - -// SetWrappingAlgorithm sets the WrappingAlgorithm field's value. -func (s *GetParametersForImportInput) SetWrappingAlgorithm(v string) *GetParametersForImportInput { - s.WrappingAlgorithm = &v - return s -} - -// SetWrappingKeySpec sets the WrappingKeySpec field's value. -func (s *GetParametersForImportInput) SetWrappingKeySpec(v string) *GetParametersForImportInput { - s.WrappingKeySpec = &v - return s -} - -type GetParametersForImportOutput struct { - _ struct{} `type:"structure"` - - // The import token to send in a subsequent ImportKeyMaterial request. - // - // ImportToken is automatically base64 encoded/decoded by the SDK. - ImportToken []byte `min:"1" type:"blob"` - - // The identifier of the CMK to use in a subsequent ImportKeyMaterial request. - // This is the same CMK specified in the GetParametersForImport request. - KeyId *string `min:"1" type:"string"` - - // The time at which the import token and public key are no longer valid. After - // this time, you cannot use them to make an ImportKeyMaterial request and you - // must send another GetParametersForImport request to get new ones. - ParametersValidTo *time.Time `type:"timestamp"` - - // The public key to use to encrypt the key material before importing it with - // ImportKeyMaterial. - // - // PublicKey is automatically base64 encoded/decoded by the SDK. - PublicKey []byte `min:"1" type:"blob" sensitive:"true"` -} - -// String returns the string representation -func (s GetParametersForImportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetParametersForImportOutput) GoString() string { - return s.String() -} - -// SetImportToken sets the ImportToken field's value. -func (s *GetParametersForImportOutput) SetImportToken(v []byte) *GetParametersForImportOutput { - s.ImportToken = v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *GetParametersForImportOutput) SetKeyId(v string) *GetParametersForImportOutput { - s.KeyId = &v - return s -} - -// SetParametersValidTo sets the ParametersValidTo field's value. -func (s *GetParametersForImportOutput) SetParametersValidTo(v time.Time) *GetParametersForImportOutput { - s.ParametersValidTo = &v - return s -} - -// SetPublicKey sets the PublicKey field's value. -func (s *GetParametersForImportOutput) SetPublicKey(v []byte) *GetParametersForImportOutput { - s.PublicKey = v - return s -} - -// A structure that you can use to allow certain operations in the grant only -// when the desired encryption context is present. For more information about -// encryption context, see Encryption Context (http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html) -// in the AWS Key Management Service Developer Guide. -// -// Grant constraints apply only to operations that accept encryption context -// as input. For example, the DescribeKey operation does not accept encryption -// context as input. A grant that allows the DescribeKey operation does so regardless -// of the grant constraints. In constrast, the Encrypt operation accepts encryption -// context as input. A grant that allows the Encrypt operation does so only -// when the encryption context of the Encrypt operation satisfies the grant -// constraints. -type GrantConstraints struct { - _ struct{} `type:"structure"` - - // A list of key-value pairs that must be present in the encryption context - // of certain subsequent operations that the grant allows. When certain subsequent - // operations allowed by the grant include encryption context that matches this - // list, the grant allows the operation. Otherwise, the grant does not allow - // the operation. - EncryptionContextEquals map[string]*string `type:"map"` - - // A list of key-value pairs, all of which must be present in the encryption - // context of certain subsequent operations that the grant allows. When certain - // subsequent operations allowed by the grant include encryption context that - // matches this list or is a superset of this list, the grant allows the operation. - // Otherwise, the grant does not allow the operation. - EncryptionContextSubset map[string]*string `type:"map"` -} - -// String returns the string representation -func (s GrantConstraints) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GrantConstraints) GoString() string { - return s.String() -} - -// SetEncryptionContextEquals sets the EncryptionContextEquals field's value. -func (s *GrantConstraints) SetEncryptionContextEquals(v map[string]*string) *GrantConstraints { - s.EncryptionContextEquals = v - return s -} - -// SetEncryptionContextSubset sets the EncryptionContextSubset field's value. -func (s *GrantConstraints) SetEncryptionContextSubset(v map[string]*string) *GrantConstraints { - s.EncryptionContextSubset = v - return s -} - -// Contains information about an entry in a list of grants. -type GrantListEntry struct { - _ struct{} `type:"structure"` - - // A list of key-value pairs that must be present in the encryption context - // of certain subsequent operations that the grant allows. - Constraints *GrantConstraints `type:"structure"` - - // The date and time when the grant was created. - CreationDate *time.Time `type:"timestamp"` - - // The unique identifier for the grant. - GrantId *string `min:"1" type:"string"` - - // The principal that receives the grant's permissions. - GranteePrincipal *string `min:"1" type:"string"` - - // The AWS account under which the grant was issued. - IssuingAccount *string `min:"1" type:"string"` - - // The unique identifier for the customer master key (CMK) to which the grant - // applies. - KeyId *string `min:"1" type:"string"` - - // The friendly name that identifies the grant. If a name was provided in the - // CreateGrant request, that name is returned. Otherwise this value is null. - Name *string `min:"1" type:"string"` - - // The list of operations permitted by the grant. - Operations []*string `type:"list"` - - // The principal that can retire the grant. - RetiringPrincipal *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GrantListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GrantListEntry) GoString() string { - return s.String() -} - -// SetConstraints sets the Constraints field's value. -func (s *GrantListEntry) SetConstraints(v *GrantConstraints) *GrantListEntry { - s.Constraints = v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *GrantListEntry) SetCreationDate(v time.Time) *GrantListEntry { - s.CreationDate = &v - return s -} - -// SetGrantId sets the GrantId field's value. -func (s *GrantListEntry) SetGrantId(v string) *GrantListEntry { - s.GrantId = &v - return s -} - -// SetGranteePrincipal sets the GranteePrincipal field's value. -func (s *GrantListEntry) SetGranteePrincipal(v string) *GrantListEntry { - s.GranteePrincipal = &v - return s -} - -// SetIssuingAccount sets the IssuingAccount field's value. -func (s *GrantListEntry) SetIssuingAccount(v string) *GrantListEntry { - s.IssuingAccount = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *GrantListEntry) SetKeyId(v string) *GrantListEntry { - s.KeyId = &v - return s -} - -// SetName sets the Name field's value. -func (s *GrantListEntry) SetName(v string) *GrantListEntry { - s.Name = &v - return s -} - -// SetOperations sets the Operations field's value. -func (s *GrantListEntry) SetOperations(v []*string) *GrantListEntry { - s.Operations = v - return s -} - -// SetRetiringPrincipal sets the RetiringPrincipal field's value. -func (s *GrantListEntry) SetRetiringPrincipal(v string) *GrantListEntry { - s.RetiringPrincipal = &v - return s -} - -type ImportKeyMaterialInput struct { - _ struct{} `type:"structure"` - - // The encrypted key material to import. It must be encrypted with the public - // key that you received in the response to a previous GetParametersForImport - // request, using the wrapping algorithm that you specified in that request. - // - // EncryptedKeyMaterial is automatically base64 encoded/decoded by the SDK. - // - // EncryptedKeyMaterial is a required field - EncryptedKeyMaterial []byte `min:"1" type:"blob" required:"true"` - - // Specifies whether the key material expires. The default is KEY_MATERIAL_EXPIRES, - // in which case you must include the ValidTo parameter. When this parameter - // is set to KEY_MATERIAL_DOES_NOT_EXPIRE, you must omit the ValidTo parameter. - ExpirationModel *string `type:"string" enum:"ExpirationModelType"` - - // The import token that you received in the response to a previous GetParametersForImport - // request. It must be from the same response that contained the public key - // that you used to encrypt the key material. - // - // ImportToken is automatically base64 encoded/decoded by the SDK. - // - // ImportToken is a required field - ImportToken []byte `min:"1" type:"blob" required:"true"` - - // The identifier of the CMK to import the key material into. The CMK's Origin - // must be EXTERNAL. - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // The time at which the imported key material expires. When the key material - // expires, AWS KMS deletes the key material and the CMK becomes unusable. You - // must omit this parameter when the ExpirationModel parameter is set to KEY_MATERIAL_DOES_NOT_EXPIRE. - // Otherwise it is required. - ValidTo *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s ImportKeyMaterialInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportKeyMaterialInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportKeyMaterialInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportKeyMaterialInput"} - if s.EncryptedKeyMaterial == nil { - invalidParams.Add(request.NewErrParamRequired("EncryptedKeyMaterial")) - } - if s.EncryptedKeyMaterial != nil && len(s.EncryptedKeyMaterial) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EncryptedKeyMaterial", 1)) - } - if s.ImportToken == nil { - invalidParams.Add(request.NewErrParamRequired("ImportToken")) - } - if s.ImportToken != nil && len(s.ImportToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ImportToken", 1)) - } - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryptedKeyMaterial sets the EncryptedKeyMaterial field's value. -func (s *ImportKeyMaterialInput) SetEncryptedKeyMaterial(v []byte) *ImportKeyMaterialInput { - s.EncryptedKeyMaterial = v - return s -} - -// SetExpirationModel sets the ExpirationModel field's value. -func (s *ImportKeyMaterialInput) SetExpirationModel(v string) *ImportKeyMaterialInput { - s.ExpirationModel = &v - return s -} - -// SetImportToken sets the ImportToken field's value. -func (s *ImportKeyMaterialInput) SetImportToken(v []byte) *ImportKeyMaterialInput { - s.ImportToken = v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *ImportKeyMaterialInput) SetKeyId(v string) *ImportKeyMaterialInput { - s.KeyId = &v - return s -} - -// SetValidTo sets the ValidTo field's value. -func (s *ImportKeyMaterialInput) SetValidTo(v time.Time) *ImportKeyMaterialInput { - s.ValidTo = &v - return s -} - -type ImportKeyMaterialOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ImportKeyMaterialOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportKeyMaterialOutput) GoString() string { - return s.String() -} - -// Contains information about each entry in the key list. -type KeyListEntry struct { - _ struct{} `type:"structure"` - - // ARN of the key. - KeyArn *string `min:"20" type:"string"` - - // Unique identifier of the key. - KeyId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s KeyListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KeyListEntry) GoString() string { - return s.String() -} - -// SetKeyArn sets the KeyArn field's value. -func (s *KeyListEntry) SetKeyArn(v string) *KeyListEntry { - s.KeyArn = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *KeyListEntry) SetKeyId(v string) *KeyListEntry { - s.KeyId = &v - return s -} - -// Contains metadata about a customer master key (CMK). -// -// This data type is used as a response element for the CreateKey and DescribeKey -// operations. -type KeyMetadata struct { - _ struct{} `type:"structure"` - - // The twelve-digit account ID of the AWS account that owns the CMK. - AWSAccountId *string `type:"string"` - - // The Amazon Resource Name (ARN) of the CMK. For examples, see AWS Key Management - // Service (AWS KMS) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms) - // in the Example ARNs section of the AWS General Reference. - Arn *string `min:"20" type:"string"` - - // The cluster ID of the AWS CloudHSM cluster that contains the key material - // for the CMK. When you create a CMK in a custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html), - // AWS KMS creates the key material for the CMK in the associated AWS CloudHSM - // cluster. This value is present only when the CMK is created in a custom key - // store. - CloudHsmClusterId *string `min:"19" type:"string"` - - // The date and time when the CMK was created. - CreationDate *time.Time `type:"timestamp"` - - // A unique identifier for the custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html) - // that contains the CMK. This value is present only when the CMK is created - // in a custom key store. - CustomKeyStoreId *string `min:"1" type:"string"` - - // The date and time after which AWS KMS deletes the CMK. This value is present - // only when KeyState is PendingDeletion. - DeletionDate *time.Time `type:"timestamp"` - - // The description of the CMK. - Description *string `type:"string"` - - // Specifies whether the CMK is enabled. When KeyState is Enabled this value - // is true, otherwise it is false. - Enabled *bool `type:"boolean"` - - // Specifies whether the CMK's key material expires. This value is present only - // when Origin is EXTERNAL, otherwise this value is omitted. - ExpirationModel *string `type:"string" enum:"ExpirationModelType"` - - // The globally unique identifier for the CMK. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // The CMK's manager. CMKs are either customer-managed or AWS-managed. For more - // information about the difference, see Customer Master Keys (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys) - // in the AWS Key Management Service Developer Guide. - KeyManager *string `type:"string" enum:"KeyManagerType"` - - // The state of the CMK. - // - // For more information about how key state affects the use of a CMK, see How - // Key State Affects the Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) - // in the AWS Key Management Service Developer Guide. - KeyState *string `type:"string" enum:"KeyState"` - - // The cryptographic operations for which you can use the CMK. Currently the - // only allowed value is ENCRYPT_DECRYPT, which means you can use the CMK for - // the Encrypt and Decrypt operations. - KeyUsage *string `type:"string" enum:"KeyUsageType"` - - // The source of the CMK's key material. When this value is AWS_KMS, AWS KMS - // created the key material. When this value is EXTERNAL, the key material was - // imported from your existing key management infrastructure or the CMK lacks - // key material. When this value is AWS_CLOUDHSM, the key material was created - // in the AWS CloudHSM cluster associated with a custom key store. - Origin *string `type:"string" enum:"OriginType"` - - // The time at which the imported key material expires. When the key material - // expires, AWS KMS deletes the key material and the CMK becomes unusable. This - // value is present only for CMKs whose Origin is EXTERNAL and whose ExpirationModel - // is KEY_MATERIAL_EXPIRES, otherwise this value is omitted. - ValidTo *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s KeyMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KeyMetadata) GoString() string { - return s.String() -} - -// SetAWSAccountId sets the AWSAccountId field's value. -func (s *KeyMetadata) SetAWSAccountId(v string) *KeyMetadata { - s.AWSAccountId = &v - return s -} - -// SetArn sets the Arn field's value. -func (s *KeyMetadata) SetArn(v string) *KeyMetadata { - s.Arn = &v - return s -} - -// SetCloudHsmClusterId sets the CloudHsmClusterId field's value. -func (s *KeyMetadata) SetCloudHsmClusterId(v string) *KeyMetadata { - s.CloudHsmClusterId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *KeyMetadata) SetCreationDate(v time.Time) *KeyMetadata { - s.CreationDate = &v - return s -} - -// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. -func (s *KeyMetadata) SetCustomKeyStoreId(v string) *KeyMetadata { - s.CustomKeyStoreId = &v - return s -} - -// SetDeletionDate sets the DeletionDate field's value. -func (s *KeyMetadata) SetDeletionDate(v time.Time) *KeyMetadata { - s.DeletionDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *KeyMetadata) SetDescription(v string) *KeyMetadata { - s.Description = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *KeyMetadata) SetEnabled(v bool) *KeyMetadata { - s.Enabled = &v - return s -} - -// SetExpirationModel sets the ExpirationModel field's value. -func (s *KeyMetadata) SetExpirationModel(v string) *KeyMetadata { - s.ExpirationModel = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *KeyMetadata) SetKeyId(v string) *KeyMetadata { - s.KeyId = &v - return s -} - -// SetKeyManager sets the KeyManager field's value. -func (s *KeyMetadata) SetKeyManager(v string) *KeyMetadata { - s.KeyManager = &v - return s -} - -// SetKeyState sets the KeyState field's value. -func (s *KeyMetadata) SetKeyState(v string) *KeyMetadata { - s.KeyState = &v - return s -} - -// SetKeyUsage sets the KeyUsage field's value. -func (s *KeyMetadata) SetKeyUsage(v string) *KeyMetadata { - s.KeyUsage = &v - return s -} - -// SetOrigin sets the Origin field's value. -func (s *KeyMetadata) SetOrigin(v string) *KeyMetadata { - s.Origin = &v - return s -} - -// SetValidTo sets the ValidTo field's value. -func (s *KeyMetadata) SetValidTo(v time.Time) *KeyMetadata { - s.ValidTo = &v - return s -} - -type ListAliasesInput struct { - _ struct{} `type:"structure"` - - // Lists only aliases that refer to the specified CMK. The value of this parameter - // can be the ID or Amazon Resource Name (ARN) of a CMK in the caller's account - // and region. You cannot use an alias name or alias ARN in this value. - // - // This parameter is optional. If you omit it, ListAliases returns all aliases - // in the account and region. - KeyId *string `min:"1" type:"string"` - - // Use this parameter to specify the maximum number of items to return. When - // this value is present, AWS KMS does not return more than the specified number - // of items, but it might return fewer. - // - // This value is optional. If you include a value, it must be between 1 and - // 100, inclusive. If you do not include a value, it defaults to 50. - Limit *int64 `min:"1" type:"integer"` - - // Use this parameter in a subsequent request after you receive a response with - // truncated results. Set it to the value of NextMarker from the truncated response - // you just received. - Marker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListAliasesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAliasesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAliasesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAliasesInput"} - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *ListAliasesInput) SetKeyId(v string) *ListAliasesInput { - s.KeyId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListAliasesInput) SetLimit(v int64) *ListAliasesInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAliasesInput) SetMarker(v string) *ListAliasesInput { - s.Marker = &v - return s -} - -type ListAliasesOutput struct { - _ struct{} `type:"structure"` - - // A list of aliases. - Aliases []*AliasListEntry `type:"list"` - - // When Truncated is true, this element is present and contains the value to - // use for the Marker parameter in a subsequent request. - NextMarker *string `min:"1" type:"string"` - - // A flag that indicates whether there are more items in the list. When this - // value is true, the list in this response is truncated. To get more items, - // pass the value of the NextMarker element in this response to the Marker parameter - // in a subsequent request. - Truncated *bool `type:"boolean"` -} - -// String returns the string representation -func (s ListAliasesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAliasesOutput) GoString() string { - return s.String() -} - -// SetAliases sets the Aliases field's value. -func (s *ListAliasesOutput) SetAliases(v []*AliasListEntry) *ListAliasesOutput { - s.Aliases = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListAliasesOutput) SetNextMarker(v string) *ListAliasesOutput { - s.NextMarker = &v - return s -} - -// SetTruncated sets the Truncated field's value. -func (s *ListAliasesOutput) SetTruncated(v bool) *ListAliasesOutput { - s.Truncated = &v - return s -} - -type ListGrantsInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the customer master key (CMK). - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify - // a CMK in a different AWS account, you must use the key ARN. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // Use this parameter to specify the maximum number of items to return. When - // this value is present, AWS KMS does not return more than the specified number - // of items, but it might return fewer. - // - // This value is optional. If you include a value, it must be between 1 and - // 100, inclusive. If you do not include a value, it defaults to 50. - Limit *int64 `min:"1" type:"integer"` - - // Use this parameter in a subsequent request after you receive a response with - // truncated results. Set it to the value of NextMarker from the truncated response - // you just received. - Marker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListGrantsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListGrantsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListGrantsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListGrantsInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *ListGrantsInput) SetKeyId(v string) *ListGrantsInput { - s.KeyId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListGrantsInput) SetLimit(v int64) *ListGrantsInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListGrantsInput) SetMarker(v string) *ListGrantsInput { - s.Marker = &v - return s -} - -type ListGrantsResponse struct { - _ struct{} `type:"structure"` - - // A list of grants. - Grants []*GrantListEntry `type:"list"` - - // When Truncated is true, this element is present and contains the value to - // use for the Marker parameter in a subsequent request. - NextMarker *string `min:"1" type:"string"` - - // A flag that indicates whether there are more items in the list. When this - // value is true, the list in this response is truncated. To get more items, - // pass the value of the NextMarker element in this response to the Marker parameter - // in a subsequent request. - Truncated *bool `type:"boolean"` -} - -// String returns the string representation -func (s ListGrantsResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListGrantsResponse) GoString() string { - return s.String() -} - -// SetGrants sets the Grants field's value. -func (s *ListGrantsResponse) SetGrants(v []*GrantListEntry) *ListGrantsResponse { - s.Grants = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListGrantsResponse) SetNextMarker(v string) *ListGrantsResponse { - s.NextMarker = &v - return s -} - -// SetTruncated sets the Truncated field's value. -func (s *ListGrantsResponse) SetTruncated(v bool) *ListGrantsResponse { - s.Truncated = &v - return s -} - -type ListKeyPoliciesInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the customer master key (CMK). - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // Use this parameter to specify the maximum number of items to return. When - // this value is present, AWS KMS does not return more than the specified number - // of items, but it might return fewer. - // - // This value is optional. If you include a value, it must be between 1 and - // 1000, inclusive. If you do not include a value, it defaults to 100. - // - // Currently only 1 policy can be attached to a key. - Limit *int64 `min:"1" type:"integer"` - - // Use this parameter in a subsequent request after you receive a response with - // truncated results. Set it to the value of NextMarker from the truncated response - // you just received. - Marker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListKeyPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListKeyPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListKeyPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListKeyPoliciesInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *ListKeyPoliciesInput) SetKeyId(v string) *ListKeyPoliciesInput { - s.KeyId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListKeyPoliciesInput) SetLimit(v int64) *ListKeyPoliciesInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListKeyPoliciesInput) SetMarker(v string) *ListKeyPoliciesInput { - s.Marker = &v - return s -} - -type ListKeyPoliciesOutput struct { - _ struct{} `type:"structure"` - - // When Truncated is true, this element is present and contains the value to - // use for the Marker parameter in a subsequent request. - NextMarker *string `min:"1" type:"string"` - - // A list of key policy names. Currently, there is only one key policy per CMK - // and it is always named default. - PolicyNames []*string `type:"list"` - - // A flag that indicates whether there are more items in the list. When this - // value is true, the list in this response is truncated. To get more items, - // pass the value of the NextMarker element in this response to the Marker parameter - // in a subsequent request. - Truncated *bool `type:"boolean"` -} - -// String returns the string representation -func (s ListKeyPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListKeyPoliciesOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListKeyPoliciesOutput) SetNextMarker(v string) *ListKeyPoliciesOutput { - s.NextMarker = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *ListKeyPoliciesOutput) SetPolicyNames(v []*string) *ListKeyPoliciesOutput { - s.PolicyNames = v - return s -} - -// SetTruncated sets the Truncated field's value. -func (s *ListKeyPoliciesOutput) SetTruncated(v bool) *ListKeyPoliciesOutput { - s.Truncated = &v - return s -} - -type ListKeysInput struct { - _ struct{} `type:"structure"` - - // Use this parameter to specify the maximum number of items to return. When - // this value is present, AWS KMS does not return more than the specified number - // of items, but it might return fewer. - // - // This value is optional. If you include a value, it must be between 1 and - // 1000, inclusive. If you do not include a value, it defaults to 100. - Limit *int64 `min:"1" type:"integer"` - - // Use this parameter in a subsequent request after you receive a response with - // truncated results. Set it to the value of NextMarker from the truncated response - // you just received. - Marker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListKeysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListKeysInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListKeysInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListKeysInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListKeysInput) SetLimit(v int64) *ListKeysInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListKeysInput) SetMarker(v string) *ListKeysInput { - s.Marker = &v - return s -} - -type ListKeysOutput struct { - _ struct{} `type:"structure"` - - // A list of customer master keys (CMKs). - Keys []*KeyListEntry `type:"list"` - - // When Truncated is true, this element is present and contains the value to - // use for the Marker parameter in a subsequent request. - NextMarker *string `min:"1" type:"string"` - - // A flag that indicates whether there are more items in the list. When this - // value is true, the list in this response is truncated. To get more items, - // pass the value of the NextMarker element in this response to the Marker parameter - // in a subsequent request. - Truncated *bool `type:"boolean"` -} - -// String returns the string representation -func (s ListKeysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListKeysOutput) GoString() string { - return s.String() -} - -// SetKeys sets the Keys field's value. -func (s *ListKeysOutput) SetKeys(v []*KeyListEntry) *ListKeysOutput { - s.Keys = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListKeysOutput) SetNextMarker(v string) *ListKeysOutput { - s.NextMarker = &v - return s -} - -// SetTruncated sets the Truncated field's value. -func (s *ListKeysOutput) SetTruncated(v bool) *ListKeysOutput { - s.Truncated = &v - return s -} - -type ListResourceTagsInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the customer master key (CMK). - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // Use this parameter to specify the maximum number of items to return. When - // this value is present, AWS KMS does not return more than the specified number - // of items, but it might return fewer. - // - // This value is optional. If you include a value, it must be between 1 and - // 50, inclusive. If you do not include a value, it defaults to 50. - Limit *int64 `min:"1" type:"integer"` - - // Use this parameter in a subsequent request after you receive a response with - // truncated results. Set it to the value of NextMarker from the truncated response - // you just received. - // - // Do not attempt to construct this value. Use only the value of NextMarker - // from the truncated response you just received. - Marker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListResourceTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourceTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResourceTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResourceTagsInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *ListResourceTagsInput) SetKeyId(v string) *ListResourceTagsInput { - s.KeyId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListResourceTagsInput) SetLimit(v int64) *ListResourceTagsInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListResourceTagsInput) SetMarker(v string) *ListResourceTagsInput { - s.Marker = &v - return s -} - -type ListResourceTagsOutput struct { - _ struct{} `type:"structure"` - - // When Truncated is true, this element is present and contains the value to - // use for the Marker parameter in a subsequent request. - // - // Do not assume or infer any information from this value. - NextMarker *string `min:"1" type:"string"` - - // A list of tags. Each tag consists of a tag key and a tag value. - Tags []*Tag `type:"list"` - - // A flag that indicates whether there are more items in the list. When this - // value is true, the list in this response is truncated. To get more items, - // pass the value of the NextMarker element in this response to the Marker parameter - // in a subsequent request. - Truncated *bool `type:"boolean"` -} - -// String returns the string representation -func (s ListResourceTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourceTagsOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListResourceTagsOutput) SetNextMarker(v string) *ListResourceTagsOutput { - s.NextMarker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListResourceTagsOutput) SetTags(v []*Tag) *ListResourceTagsOutput { - s.Tags = v - return s -} - -// SetTruncated sets the Truncated field's value. -func (s *ListResourceTagsOutput) SetTruncated(v bool) *ListResourceTagsOutput { - s.Truncated = &v - return s -} - -type ListRetirableGrantsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter to specify the maximum number of items to return. When - // this value is present, AWS KMS does not return more than the specified number - // of items, but it might return fewer. - // - // This value is optional. If you include a value, it must be between 1 and - // 100, inclusive. If you do not include a value, it defaults to 50. - Limit *int64 `min:"1" type:"integer"` - - // Use this parameter in a subsequent request after you receive a response with - // truncated results. Set it to the value of NextMarker from the truncated response - // you just received. - Marker *string `min:"1" type:"string"` - - // The retiring principal for which to list grants. - // - // To specify the retiring principal, use the Amazon Resource Name (ARN) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // of an AWS principal. Valid AWS principals include AWS accounts (root), IAM - // users, federated users, and assumed role users. For examples of the ARN syntax - // for specifying a principal, see AWS Identity and Access Management (IAM) - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam) - // in the Example ARNs section of the Amazon Web Services General Reference. - // - // RetiringPrincipal is a required field - RetiringPrincipal *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListRetirableGrantsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRetirableGrantsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRetirableGrantsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRetirableGrantsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.RetiringPrincipal == nil { - invalidParams.Add(request.NewErrParamRequired("RetiringPrincipal")) - } - if s.RetiringPrincipal != nil && len(*s.RetiringPrincipal) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RetiringPrincipal", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListRetirableGrantsInput) SetLimit(v int64) *ListRetirableGrantsInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListRetirableGrantsInput) SetMarker(v string) *ListRetirableGrantsInput { - s.Marker = &v - return s -} - -// SetRetiringPrincipal sets the RetiringPrincipal field's value. -func (s *ListRetirableGrantsInput) SetRetiringPrincipal(v string) *ListRetirableGrantsInput { - s.RetiringPrincipal = &v - return s -} - -type PutKeyPolicyInput struct { - _ struct{} `type:"structure"` - - // A flag to indicate whether to bypass the key policy lockout safety check. - // - // Setting this value to true increases the risk that the CMK becomes unmanageable. - // Do not set this value to true indiscriminately. - // - // For more information, refer to the scenario in the Default Key Policy (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) - // section in the AWS Key Management Service Developer Guide. - // - // Use this parameter only when you intend to prevent the principal that is - // making the request from making a subsequent PutKeyPolicy request on the CMK. - // - // The default value is false. - BypassPolicyLockoutSafetyCheck *bool `type:"boolean"` - - // A unique identifier for the customer master key (CMK). - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // The key policy to attach to the CMK. - // - // The key policy must meet the following criteria: - // - // * If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy - // must allow the principal that is making the PutKeyPolicy request to make - // a subsequent PutKeyPolicy request on the CMK. This reduces the risk that - // the CMK becomes unmanageable. For more information, refer to the scenario - // in the Default Key Policy (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) - // section of the AWS Key Management Service Developer Guide. - // - // * Each statement in the key policy must contain one or more principals. - // The principals in the key policy must exist and be visible to AWS KMS. - // When you create a new AWS principal (for example, an IAM user or role), - // you might need to enforce a delay before including the new principal in - // a key policy because the new principal might not be immediately visible - // to AWS KMS. For more information, see Changes that I make are not always - // immediately visible (http://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) - // in the AWS Identity and Access Management User Guide. - // - // The key policy size limit is 32 kilobytes (32768 bytes). - // - // Policy is a required field - Policy *string `min:"1" type:"string" required:"true"` - - // The name of the key policy. The only valid value is default. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutKeyPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutKeyPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutKeyPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutKeyPolicyInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.Policy == nil { - invalidParams.Add(request.NewErrParamRequired("Policy")) - } - if s.Policy != nil && len(*s.Policy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBypassPolicyLockoutSafetyCheck sets the BypassPolicyLockoutSafetyCheck field's value. -func (s *PutKeyPolicyInput) SetBypassPolicyLockoutSafetyCheck(v bool) *PutKeyPolicyInput { - s.BypassPolicyLockoutSafetyCheck = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *PutKeyPolicyInput) SetKeyId(v string) *PutKeyPolicyInput { - s.KeyId = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *PutKeyPolicyInput) SetPolicy(v string) *PutKeyPolicyInput { - s.Policy = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PutKeyPolicyInput) SetPolicyName(v string) *PutKeyPolicyInput { - s.PolicyName = &v - return s -} - -type PutKeyPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutKeyPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutKeyPolicyOutput) GoString() string { - return s.String() -} - -type ReEncryptInput struct { - _ struct{} `type:"structure"` - - // Ciphertext of the data to reencrypt. - // - // CiphertextBlob is automatically base64 encoded/decoded by the SDK. - // - // CiphertextBlob is a required field - CiphertextBlob []byte `min:"1" type:"blob" required:"true"` - - // Encryption context to use when the data is reencrypted. - DestinationEncryptionContext map[string]*string `type:"map"` - - // A unique identifier for the CMK that is used to reencrypt the data. - // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". To specify - // a CMK in a different AWS account, you must use the key ARN or alias ARN. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Alias name: alias/ExampleAlias - // - // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To - // get the alias name and alias ARN, use ListAliases. - // - // DestinationKeyId is a required field - DestinationKeyId *string `min:"1" type:"string" required:"true"` - - // A list of grant tokens. - // - // For more information, see Grant Tokens (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) - // in the AWS Key Management Service Developer Guide. - GrantTokens []*string `type:"list"` - - // Encryption context used to encrypt and decrypt the data specified in the - // CiphertextBlob parameter. - SourceEncryptionContext map[string]*string `type:"map"` -} - -// String returns the string representation -func (s ReEncryptInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReEncryptInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReEncryptInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReEncryptInput"} - if s.CiphertextBlob == nil { - invalidParams.Add(request.NewErrParamRequired("CiphertextBlob")) - } - if s.CiphertextBlob != nil && len(s.CiphertextBlob) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CiphertextBlob", 1)) - } - if s.DestinationKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationKeyId")) - } - if s.DestinationKeyId != nil && len(*s.DestinationKeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DestinationKeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCiphertextBlob sets the CiphertextBlob field's value. -func (s *ReEncryptInput) SetCiphertextBlob(v []byte) *ReEncryptInput { - s.CiphertextBlob = v - return s -} - -// SetDestinationEncryptionContext sets the DestinationEncryptionContext field's value. -func (s *ReEncryptInput) SetDestinationEncryptionContext(v map[string]*string) *ReEncryptInput { - s.DestinationEncryptionContext = v - return s -} - -// SetDestinationKeyId sets the DestinationKeyId field's value. -func (s *ReEncryptInput) SetDestinationKeyId(v string) *ReEncryptInput { - s.DestinationKeyId = &v - return s -} - -// SetGrantTokens sets the GrantTokens field's value. -func (s *ReEncryptInput) SetGrantTokens(v []*string) *ReEncryptInput { - s.GrantTokens = v - return s -} - -// SetSourceEncryptionContext sets the SourceEncryptionContext field's value. -func (s *ReEncryptInput) SetSourceEncryptionContext(v map[string]*string) *ReEncryptInput { - s.SourceEncryptionContext = v - return s -} - -type ReEncryptOutput struct { - _ struct{} `type:"structure"` - - // The reencrypted data. When you use the HTTP API or the AWS CLI, the value - // is Base64-encdoded. Otherwise, it is not encoded. - // - // CiphertextBlob is automatically base64 encoded/decoded by the SDK. - CiphertextBlob []byte `min:"1" type:"blob"` - - // Unique identifier of the CMK used to reencrypt the data. - KeyId *string `min:"1" type:"string"` - - // Unique identifier of the CMK used to originally encrypt the data. - SourceKeyId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ReEncryptOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReEncryptOutput) GoString() string { - return s.String() -} - -// SetCiphertextBlob sets the CiphertextBlob field's value. -func (s *ReEncryptOutput) SetCiphertextBlob(v []byte) *ReEncryptOutput { - s.CiphertextBlob = v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *ReEncryptOutput) SetKeyId(v string) *ReEncryptOutput { - s.KeyId = &v - return s -} - -// SetSourceKeyId sets the SourceKeyId field's value. -func (s *ReEncryptOutput) SetSourceKeyId(v string) *ReEncryptOutput { - s.SourceKeyId = &v - return s -} - -type RetireGrantInput struct { - _ struct{} `type:"structure"` - - // Unique identifier of the grant to retire. The grant ID is returned in the - // response to a CreateGrant operation. - // - // * Grant ID Example - 0123456789012345678901234567890123456789012345678901234567890123 - GrantId *string `min:"1" type:"string"` - - // Token that identifies the grant to be retired. - GrantToken *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the CMK associated with the grant. - // - // For example: arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab - KeyId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s RetireGrantInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RetireGrantInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RetireGrantInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RetireGrantInput"} - if s.GrantId != nil && len(*s.GrantId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GrantId", 1)) - } - if s.GrantToken != nil && len(*s.GrantToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GrantToken", 1)) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGrantId sets the GrantId field's value. -func (s *RetireGrantInput) SetGrantId(v string) *RetireGrantInput { - s.GrantId = &v - return s -} - -// SetGrantToken sets the GrantToken field's value. -func (s *RetireGrantInput) SetGrantToken(v string) *RetireGrantInput { - s.GrantToken = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *RetireGrantInput) SetKeyId(v string) *RetireGrantInput { - s.KeyId = &v - return s -} - -type RetireGrantOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RetireGrantOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RetireGrantOutput) GoString() string { - return s.String() -} - -type RevokeGrantInput struct { - _ struct{} `type:"structure"` - - // Identifier of the grant to be revoked. - // - // GrantId is a required field - GrantId *string `min:"1" type:"string" required:"true"` - - // A unique identifier for the customer master key associated with the grant. - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify - // a CMK in a different AWS account, you must use the key ARN. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RevokeGrantInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeGrantInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RevokeGrantInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RevokeGrantInput"} - if s.GrantId == nil { - invalidParams.Add(request.NewErrParamRequired("GrantId")) - } - if s.GrantId != nil && len(*s.GrantId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GrantId", 1)) - } - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGrantId sets the GrantId field's value. -func (s *RevokeGrantInput) SetGrantId(v string) *RevokeGrantInput { - s.GrantId = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *RevokeGrantInput) SetKeyId(v string) *RevokeGrantInput { - s.KeyId = &v - return s -} - -type RevokeGrantOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RevokeGrantOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeGrantOutput) GoString() string { - return s.String() -} - -type ScheduleKeyDeletionInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the customer master key (CMK) to delete. - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // The waiting period, specified in number of days. After the waiting period - // ends, AWS KMS deletes the customer master key (CMK). - // - // This value is optional. If you include a value, it must be between 7 and - // 30, inclusive. If you do not include a value, it defaults to 30. - PendingWindowInDays *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s ScheduleKeyDeletionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduleKeyDeletionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScheduleKeyDeletionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScheduleKeyDeletionInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.PendingWindowInDays != nil && *s.PendingWindowInDays < 1 { - invalidParams.Add(request.NewErrParamMinValue("PendingWindowInDays", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *ScheduleKeyDeletionInput) SetKeyId(v string) *ScheduleKeyDeletionInput { - s.KeyId = &v - return s -} - -// SetPendingWindowInDays sets the PendingWindowInDays field's value. -func (s *ScheduleKeyDeletionInput) SetPendingWindowInDays(v int64) *ScheduleKeyDeletionInput { - s.PendingWindowInDays = &v - return s -} - -type ScheduleKeyDeletionOutput struct { - _ struct{} `type:"structure"` - - // The date and time after which AWS KMS deletes the customer master key (CMK). - DeletionDate *time.Time `type:"timestamp"` - - // The unique identifier of the customer master key (CMK) for which deletion - // is scheduled. - KeyId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ScheduleKeyDeletionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduleKeyDeletionOutput) GoString() string { - return s.String() -} - -// SetDeletionDate sets the DeletionDate field's value. -func (s *ScheduleKeyDeletionOutput) SetDeletionDate(v time.Time) *ScheduleKeyDeletionOutput { - s.DeletionDate = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *ScheduleKeyDeletionOutput) SetKeyId(v string) *ScheduleKeyDeletionOutput { - s.KeyId = &v - return s -} - -// A key-value pair. A tag consists of a tag key and a tag value. Tag keys and -// tag values are both required, but tag values can be empty (null) strings. -// -// For information about the rules that apply to tag keys and tag values, see -// User-Defined Tag Restrictions (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html) -// in the AWS Billing and Cost Management User Guide. -type Tag struct { - _ struct{} `type:"structure"` - - // The key of the tag. - // - // TagKey is a required field - TagKey *string `min:"1" type:"string" required:"true"` - - // The value of the tag. - // - // TagValue is a required field - TagValue *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.TagKey == nil { - invalidParams.Add(request.NewErrParamRequired("TagKey")) - } - if s.TagKey != nil && len(*s.TagKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagKey", 1)) - } - if s.TagValue == nil { - invalidParams.Add(request.NewErrParamRequired("TagValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTagKey sets the TagKey field's value. -func (s *Tag) SetTagKey(v string) *Tag { - s.TagKey = &v - return s -} - -// SetTagValue sets the TagValue field's value. -func (s *Tag) SetTagValue(v string) *Tag { - s.TagValue = &v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the CMK you are tagging. - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // One or more tags. Each tag consists of a tag key and a tag value. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *TagResourceInput) SetKeyId(v string) *TagResourceInput { - s.KeyId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the CMK from which you are removing tags. - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` - - // One or more tag keys. Specify only the tag keys, not the tag values. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s UntagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *UntagResourceInput) SetKeyId(v string) *UntagResourceInput { - s.KeyId = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UpdateAliasInput struct { - _ struct{} `type:"structure"` - - // String that contains the name of the alias to be modified. The name must - // start with the word "alias" followed by a forward slash (alias/). Aliases - // that begin with "alias/aws" are reserved. - // - // AliasName is a required field - AliasName *string `min:"1" type:"string" required:"true"` - - // Unique identifier of the customer master key to be mapped to the alias. - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // To verify that the alias is mapped to the correct CMK, use ListAliases. - // - // TargetKeyId is a required field - TargetKeyId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAliasInput"} - if s.AliasName == nil { - invalidParams.Add(request.NewErrParamRequired("AliasName")) - } - if s.AliasName != nil && len(*s.AliasName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AliasName", 1)) - } - if s.TargetKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("TargetKeyId")) - } - if s.TargetKeyId != nil && len(*s.TargetKeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetKeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliasName sets the AliasName field's value. -func (s *UpdateAliasInput) SetAliasName(v string) *UpdateAliasInput { - s.AliasName = &v - return s -} - -// SetTargetKeyId sets the TargetKeyId field's value. -func (s *UpdateAliasInput) SetTargetKeyId(v string) *UpdateAliasInput { - s.TargetKeyId = &v - return s -} - -type UpdateAliasOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAliasOutput) GoString() string { - return s.String() -} - -type UpdateCustomKeyStoreInput struct { - _ struct{} `type:"structure"` - - // Associates the custom key store with a related AWS CloudHSM cluster. - // - // Enter the cluster ID of the cluster that you used to create the custom key - // store or a cluster that shares a backup history with the original cluster. - // You cannot use this parameter to associate a custom key store with a different - // cluster. - // - // Clusters that share a backup history have the same cluster certificate. To - // view the cluster certificate of a cluster, use the DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) - // operation. - CloudHsmClusterId *string `min:"19" type:"string"` - - // Identifies the custom key store that you want to update. Enter the ID of - // the custom key store. To find the ID of a custom key store, use the DescribeCustomKeyStores - // operation. - // - // CustomKeyStoreId is a required field - CustomKeyStoreId *string `min:"1" type:"string" required:"true"` - - // Enter the current password of the kmsuser crypto user (CU) in the AWS CloudHSM - // cluster that is associated with the custom key store. - // - // This parameter tells AWS KMS the current password of the kmsuser crypto user - // (CU). It does not set or change the password of any users in the AWS CloudHSM - // cluster. - KeyStorePassword *string `min:"1" type:"string" sensitive:"true"` - - // Changes the friendly name of the custom key store to the value that you specify. - // The custom key store name must be unique in the AWS account. - NewCustomKeyStoreName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateCustomKeyStoreInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCustomKeyStoreInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCustomKeyStoreInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCustomKeyStoreInput"} - if s.CloudHsmClusterId != nil && len(*s.CloudHsmClusterId) < 19 { - invalidParams.Add(request.NewErrParamMinLen("CloudHsmClusterId", 19)) - } - if s.CustomKeyStoreId == nil { - invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreId")) - } - if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1)) - } - if s.KeyStorePassword != nil && len(*s.KeyStorePassword) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyStorePassword", 1)) - } - if s.NewCustomKeyStoreName != nil && len(*s.NewCustomKeyStoreName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewCustomKeyStoreName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudHsmClusterId sets the CloudHsmClusterId field's value. -func (s *UpdateCustomKeyStoreInput) SetCloudHsmClusterId(v string) *UpdateCustomKeyStoreInput { - s.CloudHsmClusterId = &v - return s -} - -// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. -func (s *UpdateCustomKeyStoreInput) SetCustomKeyStoreId(v string) *UpdateCustomKeyStoreInput { - s.CustomKeyStoreId = &v - return s -} - -// SetKeyStorePassword sets the KeyStorePassword field's value. -func (s *UpdateCustomKeyStoreInput) SetKeyStorePassword(v string) *UpdateCustomKeyStoreInput { - s.KeyStorePassword = &v - return s -} - -// SetNewCustomKeyStoreName sets the NewCustomKeyStoreName field's value. -func (s *UpdateCustomKeyStoreInput) SetNewCustomKeyStoreName(v string) *UpdateCustomKeyStoreInput { - s.NewCustomKeyStoreName = &v - return s -} - -type UpdateCustomKeyStoreOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateCustomKeyStoreOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCustomKeyStoreOutput) GoString() string { - return s.String() -} - -type UpdateKeyDescriptionInput struct { - _ struct{} `type:"structure"` - - // New description for the CMK. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // A unique identifier for the customer master key (CMK). - // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. - // - // For example: - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. - // - // KeyId is a required field - KeyId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateKeyDescriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateKeyDescriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateKeyDescriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateKeyDescriptionInput"} - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateKeyDescriptionInput) SetDescription(v string) *UpdateKeyDescriptionInput { - s.Description = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *UpdateKeyDescriptionInput) SetKeyId(v string) *UpdateKeyDescriptionInput { - s.KeyId = &v - return s -} - -type UpdateKeyDescriptionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateKeyDescriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateKeyDescriptionOutput) GoString() string { - return s.String() -} - -const ( - // AlgorithmSpecRsaesPkcs1V15 is a AlgorithmSpec enum value - AlgorithmSpecRsaesPkcs1V15 = "RSAES_PKCS1_V1_5" - - // AlgorithmSpecRsaesOaepSha1 is a AlgorithmSpec enum value - AlgorithmSpecRsaesOaepSha1 = "RSAES_OAEP_SHA_1" - - // AlgorithmSpecRsaesOaepSha256 is a AlgorithmSpec enum value - AlgorithmSpecRsaesOaepSha256 = "RSAES_OAEP_SHA_256" -) - -const ( - // ConnectionErrorCodeTypeInvalidCredentials is a ConnectionErrorCodeType enum value - ConnectionErrorCodeTypeInvalidCredentials = "INVALID_CREDENTIALS" - - // ConnectionErrorCodeTypeClusterNotFound is a ConnectionErrorCodeType enum value - ConnectionErrorCodeTypeClusterNotFound = "CLUSTER_NOT_FOUND" - - // ConnectionErrorCodeTypeNetworkErrors is a ConnectionErrorCodeType enum value - ConnectionErrorCodeTypeNetworkErrors = "NETWORK_ERRORS" - - // ConnectionErrorCodeTypeInsufficientCloudhsmHsms is a ConnectionErrorCodeType enum value - ConnectionErrorCodeTypeInsufficientCloudhsmHsms = "INSUFFICIENT_CLOUDHSM_HSMS" - - // ConnectionErrorCodeTypeUserLockedOut is a ConnectionErrorCodeType enum value - ConnectionErrorCodeTypeUserLockedOut = "USER_LOCKED_OUT" -) - -const ( - // ConnectionStateTypeConnected is a ConnectionStateType enum value - ConnectionStateTypeConnected = "CONNECTED" - - // ConnectionStateTypeConnecting is a ConnectionStateType enum value - ConnectionStateTypeConnecting = "CONNECTING" - - // ConnectionStateTypeFailed is a ConnectionStateType enum value - ConnectionStateTypeFailed = "FAILED" - - // ConnectionStateTypeDisconnected is a ConnectionStateType enum value - ConnectionStateTypeDisconnected = "DISCONNECTED" - - // ConnectionStateTypeDisconnecting is a ConnectionStateType enum value - ConnectionStateTypeDisconnecting = "DISCONNECTING" -) - -const ( - // DataKeySpecAes256 is a DataKeySpec enum value - DataKeySpecAes256 = "AES_256" - - // DataKeySpecAes128 is a DataKeySpec enum value - DataKeySpecAes128 = "AES_128" -) - -const ( - // ExpirationModelTypeKeyMaterialExpires is a ExpirationModelType enum value - ExpirationModelTypeKeyMaterialExpires = "KEY_MATERIAL_EXPIRES" - - // ExpirationModelTypeKeyMaterialDoesNotExpire is a ExpirationModelType enum value - ExpirationModelTypeKeyMaterialDoesNotExpire = "KEY_MATERIAL_DOES_NOT_EXPIRE" -) - -const ( - // GrantOperationDecrypt is a GrantOperation enum value - GrantOperationDecrypt = "Decrypt" - - // GrantOperationEncrypt is a GrantOperation enum value - GrantOperationEncrypt = "Encrypt" - - // GrantOperationGenerateDataKey is a GrantOperation enum value - GrantOperationGenerateDataKey = "GenerateDataKey" - - // GrantOperationGenerateDataKeyWithoutPlaintext is a GrantOperation enum value - GrantOperationGenerateDataKeyWithoutPlaintext = "GenerateDataKeyWithoutPlaintext" - - // GrantOperationReEncryptFrom is a GrantOperation enum value - GrantOperationReEncryptFrom = "ReEncryptFrom" - - // GrantOperationReEncryptTo is a GrantOperation enum value - GrantOperationReEncryptTo = "ReEncryptTo" - - // GrantOperationCreateGrant is a GrantOperation enum value - GrantOperationCreateGrant = "CreateGrant" - - // GrantOperationRetireGrant is a GrantOperation enum value - GrantOperationRetireGrant = "RetireGrant" - - // GrantOperationDescribeKey is a GrantOperation enum value - GrantOperationDescribeKey = "DescribeKey" -) - -const ( - // KeyManagerTypeAws is a KeyManagerType enum value - KeyManagerTypeAws = "AWS" - - // KeyManagerTypeCustomer is a KeyManagerType enum value - KeyManagerTypeCustomer = "CUSTOMER" -) - -const ( - // KeyStateEnabled is a KeyState enum value - KeyStateEnabled = "Enabled" - - // KeyStateDisabled is a KeyState enum value - KeyStateDisabled = "Disabled" - - // KeyStatePendingDeletion is a KeyState enum value - KeyStatePendingDeletion = "PendingDeletion" - - // KeyStatePendingImport is a KeyState enum value - KeyStatePendingImport = "PendingImport" - - // KeyStateUnavailable is a KeyState enum value - KeyStateUnavailable = "Unavailable" -) - -const ( - // KeyUsageTypeEncryptDecrypt is a KeyUsageType enum value - KeyUsageTypeEncryptDecrypt = "ENCRYPT_DECRYPT" -) - -const ( - // OriginTypeAwsKms is a OriginType enum value - OriginTypeAwsKms = "AWS_KMS" - - // OriginTypeExternal is a OriginType enum value - OriginTypeExternal = "EXTERNAL" - - // OriginTypeAwsCloudhsm is a OriginType enum value - OriginTypeAwsCloudhsm = "AWS_CLOUDHSM" -) - -const ( - // WrappingKeySpecRsa2048 is a WrappingKeySpec enum value - WrappingKeySpecRsa2048 = "RSA_2048" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go b/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go deleted file mode 100644 index fad9002e1..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package kms provides the client and types for making API -// requests to AWS Key Management Service. -// -// AWS Key Management Service (AWS KMS) is an encryption and key management -// web service. This guide describes the AWS KMS operations that you can call -// programmatically. For general information about AWS KMS, see the AWS Key -// Management Service Developer Guide (http://docs.aws.amazon.com/kms/latest/developerguide/). -// -// AWS provides SDKs that consist of libraries and sample code for various programming -// languages and platforms (Java, Ruby, .Net, macOS, Android, etc.). The SDKs -// provide a convenient way to create programmatic access to AWS KMS and other -// AWS services. For example, the SDKs take care of tasks such as signing requests -// (see below), managing errors, and retrying requests automatically. For more -// information about the AWS SDKs, including how to download and install them, -// see Tools for Amazon Web Services (http://aws.amazon.com/tools/). -// -// We recommend that you use the AWS SDKs to make programmatic API calls to -// AWS KMS. -// -// Clients must support TLS (Transport Layer Security) 1.0. We recommend TLS -// 1.2. Clients must also support cipher suites with Perfect Forward Secrecy -// (PFS) such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve Ephemeral -// Diffie-Hellman (ECDHE). Most modern systems such as Java 7 and later support -// these modes. -// -// Signing Requests -// -// Requests must be signed by using an access key ID and a secret access key. -// We strongly recommend that you do not use your AWS account (root) access -// key ID and secret key for everyday work with AWS KMS. Instead, use the access -// key ID and secret access key for an IAM user, or you can use the AWS Security -// Token Service to generate temporary security credentials that you can use -// to sign requests. -// -// All AWS KMS operations require Signature Version 4 (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). -// -// Logging API Requests -// -// AWS KMS supports AWS CloudTrail, a service that logs AWS API calls and related -// events for your AWS account and delivers them to an Amazon S3 bucket that -// you specify. By using the information collected by CloudTrail, you can determine -// what requests were made to AWS KMS, who made the request, when it was made, -// and so on. To learn more about CloudTrail, including how to turn it on and -// find your log files, see the AWS CloudTrail User Guide (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/). -// -// Additional Resources -// -// For more information about credentials and request signing, see the following: -// -// * AWS Security Credentials (http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html) -// - This topic provides general information about the of credentials used -// for accessing AWS. -// -// * Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) -// - This section of the IAM User Guide describes how to create and use temporary -// security credentials. -// -// * Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) -// - This set of topics walks you through the process of signing a request -// using an access key ID and a secret access key. -// -// Commonly Used APIs -// -// Of the APIs discussed in this guide, the following will prove the most useful -// for most applications. You will likely perform actions other than these, -// such as creating keys and assigning policies, by using the console. -// -// * Encrypt -// -// * Decrypt -// -// * GenerateDataKey -// -// * GenerateDataKeyWithoutPlaintext -// -// See https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01 for more information on this service. -// -// See kms package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/kms/ -// -// Using the Client -// -// To contact AWS Key Management Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS Key Management Service client KMS for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/kms/#New -package kms diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go b/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go deleted file mode 100644 index e41edf66d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go +++ /dev/null @@ -1,280 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package kms - -const ( - - // ErrCodeAlreadyExistsException for service response error code - // "AlreadyExistsException". - // - // The request was rejected because it attempted to create a resource that already - // exists. - ErrCodeAlreadyExistsException = "AlreadyExistsException" - - // ErrCodeCloudHsmClusterInUseException for service response error code - // "CloudHsmClusterInUseException". - // - // The request was rejected because the specified AWS CloudHSM cluster is already - // associated with a custom key store or it shares a backup history with a cluster - // that is associated with a custom key store. Each custom key store must be - // associated with a different AWS CloudHSM cluster. - // - // Clusters that share a backup history have the same cluster certificate. To - // view the cluster certificate of a cluster, use the DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) - // operation. - ErrCodeCloudHsmClusterInUseException = "CloudHsmClusterInUseException" - - // ErrCodeCloudHsmClusterInvalidConfigurationException for service response error code - // "CloudHsmClusterInvalidConfigurationException". - // - // The request was rejected because the associated AWS CloudHSM cluster did - // not meet the configuration requirements for a custom key store. The cluster - // must be configured with private subnets in at least two different Availability - // Zones in the Region. Also, it must contain at least as many HSMs as the operation - // requires. - // - // For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey operations, - // the AWS CloudHSM cluster must have at least two active HSMs, each in a different - // Availability Zone. For the ConnectCustomKeyStore operation, the AWS CloudHSM - // must contain at least one active HSM. - // - // For information about creating a private subnet for a AWS CloudHSM cluster, - // see Create a Private Subnet (http://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html) - // in the AWS CloudHSM User Guide. To add HSMs, use the AWS CloudHSM CreateHsm - // (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html) - // operation. - ErrCodeCloudHsmClusterInvalidConfigurationException = "CloudHsmClusterInvalidConfigurationException" - - // ErrCodeCloudHsmClusterNotActiveException for service response error code - // "CloudHsmClusterNotActiveException". - // - // The request was rejected because the AWS CloudHSM cluster that is associated - // with the custom key store is not active. Initialize and activate the cluster - // and try the command again. For detailed instructions, see Getting Started - // (http://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html) - // in the AWS CloudHSM User Guide. - ErrCodeCloudHsmClusterNotActiveException = "CloudHsmClusterNotActiveException" - - // ErrCodeCloudHsmClusterNotFoundException for service response error code - // "CloudHsmClusterNotFoundException". - // - // The request was rejected because AWS KMS cannot find the AWS CloudHSM cluster - // with the specified cluster ID. Retry the request with a different cluster - // ID. - ErrCodeCloudHsmClusterNotFoundException = "CloudHsmClusterNotFoundException" - - // ErrCodeCloudHsmClusterNotRelatedException for service response error code - // "CloudHsmClusterNotRelatedException". - // - // The request was rejected because the specified AWS CloudHSM cluster has a - // different cluster certificate than the original cluster. You cannot use the - // operation to specify an unrelated cluster. - // - // Specify a cluster that shares a backup history with the original cluster. - // This includes clusters that were created from a backup of the current cluster, - // and clusters that were created from the same backup that produced the current - // cluster. - // - // Clusters that share a backup history have the same cluster certificate. To - // view the cluster certificate of a cluster, use the DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) - // operation. - ErrCodeCloudHsmClusterNotRelatedException = "CloudHsmClusterNotRelatedException" - - // ErrCodeCustomKeyStoreHasCMKsException for service response error code - // "CustomKeyStoreHasCMKsException". - // - // The request was rejected because the custom key store contains AWS KMS customer - // master keys (CMKs). After verifying that you do not need to use the CMKs, - // use the ScheduleKeyDeletion operation to delete the CMKs. After they are - // deleted, you can delete the custom key store. - ErrCodeCustomKeyStoreHasCMKsException = "CustomKeyStoreHasCMKsException" - - // ErrCodeCustomKeyStoreInvalidStateException for service response error code - // "CustomKeyStoreInvalidStateException". - // - // The request was rejected because of the ConnectionState of the custom key - // store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores - // operation. - // - // This exception is thrown under the following conditions: - // - // * You requested the CreateKey or GenerateRandom operation in a custom - // key store that is not connected. These operations are valid only when - // the custom key store ConnectionState is CONNECTED. - // - // * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation - // on a custom key store that is not disconnected. This operation is valid - // only when the custom key store ConnectionState is DISCONNECTED. - // - // * You requested the ConnectCustomKeyStore operation on a custom key store - // with a ConnectionState of DISCONNECTING or FAILED. This operation is valid - // for all other ConnectionState values. - ErrCodeCustomKeyStoreInvalidStateException = "CustomKeyStoreInvalidStateException" - - // ErrCodeCustomKeyStoreNameInUseException for service response error code - // "CustomKeyStoreNameInUseException". - // - // The request was rejected because the specified custom key store name is already - // assigned to another custom key store in the account. Try again with a custom - // key store name that is unique in the account. - ErrCodeCustomKeyStoreNameInUseException = "CustomKeyStoreNameInUseException" - - // ErrCodeCustomKeyStoreNotFoundException for service response error code - // "CustomKeyStoreNotFoundException". - // - // The request was rejected because AWS KMS cannot find a custom key store with - // the specified key store name or ID. - ErrCodeCustomKeyStoreNotFoundException = "CustomKeyStoreNotFoundException" - - // ErrCodeDependencyTimeoutException for service response error code - // "DependencyTimeoutException". - // - // The system timed out while trying to fulfill the request. The request can - // be retried. - ErrCodeDependencyTimeoutException = "DependencyTimeoutException" - - // ErrCodeDisabledException for service response error code - // "DisabledException". - // - // The request was rejected because the specified CMK is not enabled. - ErrCodeDisabledException = "DisabledException" - - // ErrCodeExpiredImportTokenException for service response error code - // "ExpiredImportTokenException". - // - // The request was rejected because the provided import token is expired. Use - // GetParametersForImport to get a new import token and public key, use the - // new public key to encrypt the key material, and then try the request again. - ErrCodeExpiredImportTokenException = "ExpiredImportTokenException" - - // ErrCodeIncorrectKeyMaterialException for service response error code - // "IncorrectKeyMaterialException". - // - // The request was rejected because the provided key material is invalid or - // is not the same key material that was previously imported into this customer - // master key (CMK). - ErrCodeIncorrectKeyMaterialException = "IncorrectKeyMaterialException" - - // ErrCodeIncorrectTrustAnchorException for service response error code - // "IncorrectTrustAnchorException". - // - // The request was rejected because the trust anchor certificate in the request - // is not the trust anchor certificate for the specified AWS CloudHSM cluster. - // - // When you initialize the cluster (http://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr), - // you create the trust anchor certificate and save it in the customerCA.crt - // file. - ErrCodeIncorrectTrustAnchorException = "IncorrectTrustAnchorException" - - // ErrCodeInternalException for service response error code - // "KMSInternalException". - // - // The request was rejected because an internal exception occurred. The request - // can be retried. - ErrCodeInternalException = "KMSInternalException" - - // ErrCodeInvalidAliasNameException for service response error code - // "InvalidAliasNameException". - // - // The request was rejected because the specified alias name is not valid. - ErrCodeInvalidAliasNameException = "InvalidAliasNameException" - - // ErrCodeInvalidArnException for service response error code - // "InvalidArnException". - // - // The request was rejected because a specified ARN was not valid. - ErrCodeInvalidArnException = "InvalidArnException" - - // ErrCodeInvalidCiphertextException for service response error code - // "InvalidCiphertextException". - // - // The request was rejected because the specified ciphertext, or additional - // authenticated data incorporated into the ciphertext, such as the encryption - // context, is corrupted, missing, or otherwise invalid. - ErrCodeInvalidCiphertextException = "InvalidCiphertextException" - - // ErrCodeInvalidGrantIdException for service response error code - // "InvalidGrantIdException". - // - // The request was rejected because the specified GrantId is not valid. - ErrCodeInvalidGrantIdException = "InvalidGrantIdException" - - // ErrCodeInvalidGrantTokenException for service response error code - // "InvalidGrantTokenException". - // - // The request was rejected because the specified grant token is not valid. - ErrCodeInvalidGrantTokenException = "InvalidGrantTokenException" - - // ErrCodeInvalidImportTokenException for service response error code - // "InvalidImportTokenException". - // - // The request was rejected because the provided import token is invalid or - // is associated with a different customer master key (CMK). - ErrCodeInvalidImportTokenException = "InvalidImportTokenException" - - // ErrCodeInvalidKeyUsageException for service response error code - // "InvalidKeyUsageException". - // - // The request was rejected because the specified KeySpec value is not valid. - ErrCodeInvalidKeyUsageException = "InvalidKeyUsageException" - - // ErrCodeInvalidMarkerException for service response error code - // "InvalidMarkerException". - // - // The request was rejected because the marker that specifies where pagination - // should next begin is not valid. - ErrCodeInvalidMarkerException = "InvalidMarkerException" - - // ErrCodeInvalidStateException for service response error code - // "KMSInvalidStateException". - // - // The request was rejected because the state of the specified resource is not - // valid for this request. - // - // For more information about how key state affects the use of a CMK, see How - // Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) - // in the AWS Key Management Service Developer Guide. - ErrCodeInvalidStateException = "KMSInvalidStateException" - - // ErrCodeKeyUnavailableException for service response error code - // "KeyUnavailableException". - // - // The request was rejected because the specified CMK was not available. The - // request can be retried. - ErrCodeKeyUnavailableException = "KeyUnavailableException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The request was rejected because a limit was exceeded. For more information, - // see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html) - // in the AWS Key Management Service Developer Guide. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeMalformedPolicyDocumentException for service response error code - // "MalformedPolicyDocumentException". - // - // The request was rejected because the specified policy is not syntactically - // or semantically correct. - ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocumentException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // The request was rejected because the specified entity or resource could not - // be found. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeTagException for service response error code - // "TagException". - // - // The request was rejected because one or more tags are not valid. - ErrCodeTagException = "TagException" - - // ErrCodeUnsupportedOperationException for service response error code - // "UnsupportedOperationException". - // - // The request was rejected because a specified parameter is not supported or - // a specified resource is not valid for this operation. - ErrCodeUnsupportedOperationException = "UnsupportedOperationException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/service.go b/vendor/github.com/aws/aws-sdk-go/service/kms/service.go deleted file mode 100644 index 6d062f32f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package kms - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// KMS provides the API operation methods for making requests to -// AWS Key Management Service. See this package's package overview docs -// for details on the service. -// -// KMS methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type KMS 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 = "kms" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "KMS" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the KMS client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a KMS client from just a session. -// svc := kms.New(mySession) -// -// // Create a KMS client with additional configuration -// svc := kms.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *KMS { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *KMS { - svc := &KMS{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-11-01", - JSONVersion: "1.1", - TargetPrefix: "TrentService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a KMS operation and runs any -// custom request initialization. -func (c *KMS) 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/lambda/api.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go deleted file mode 100644 index 016ef4d7b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go +++ /dev/null @@ -1,9076 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package lambda - -import ( - "io" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opAddLayerVersionPermission = "AddLayerVersionPermission" - -// AddLayerVersionPermissionRequest generates a "aws/request.Request" representing the -// client's request for the AddLayerVersionPermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddLayerVersionPermission for more information on using the AddLayerVersionPermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddLayerVersionPermissionRequest method. -// req, resp := client.AddLayerVersionPermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddLayerVersionPermission -func (c *Lambda) AddLayerVersionPermissionRequest(input *AddLayerVersionPermissionInput) (req *request.Request, output *AddLayerVersionPermissionOutput) { - op := &request.Operation{ - Name: opAddLayerVersionPermission, - HTTPMethod: "POST", - HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy", - } - - if input == nil { - input = &AddLayerVersionPermissionInput{} - } - - output = &AddLayerVersionPermissionOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddLayerVersionPermission API operation for AWS Lambda. -// -// Adds permissions to the resource-based policy of a version of an AWS Lambda -// layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). -// Use this action to grant layer usage permission to other accounts. You can -// grant permission to a single account, all AWS accounts, or all accounts in -// an organization. -// -// To revoke permission, call RemoveLayerVersionPermission with the statement -// ID that you specified when you added 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 Lambda's -// API operation AddLayerVersionPermission for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// The resource already exists. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodePolicyLengthExceededException "PolicyLengthExceededException" -// Lambda function access policy is limited to 20 KB. -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The RevisionId provided does not match the latest RevisionId for the Lambda -// function or alias. Call the GetFunction or the GetAlias API to retrieve the -// latest RevisionId for your resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddLayerVersionPermission -func (c *Lambda) AddLayerVersionPermission(input *AddLayerVersionPermissionInput) (*AddLayerVersionPermissionOutput, error) { - req, out := c.AddLayerVersionPermissionRequest(input) - return out, req.Send() -} - -// AddLayerVersionPermissionWithContext is the same as AddLayerVersionPermission with the addition of -// the ability to pass a context and additional request options. -// -// See AddLayerVersionPermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) AddLayerVersionPermissionWithContext(ctx aws.Context, input *AddLayerVersionPermissionInput, opts ...request.Option) (*AddLayerVersionPermissionOutput, error) { - req, out := c.AddLayerVersionPermissionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddPermission = "AddPermission" - -// AddPermissionRequest generates a "aws/request.Request" representing the -// client's request for the AddPermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddPermission for more information on using the AddPermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddPermissionRequest method. -// req, resp := client.AddPermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermission -func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.Request, output *AddPermissionOutput) { - op := &request.Operation{ - Name: opAddPermission, - HTTPMethod: "POST", - HTTPPath: "/2015-03-31/functions/{FunctionName}/policy", - } - - if input == nil { - input = &AddPermissionInput{} - } - - output = &AddPermissionOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddPermission API operation for AWS Lambda. -// -// Grants an AWS service or another account permission to use a function. You -// can apply the policy at the function level, or specify a qualifier to restrict -// access to a single version or alias. If you use a qualifier, the invoker -// must use the full Amazon Resource Name (ARN) of that version or alias to -// invoke the function. -// -// To grant permission to another account, specify the account ID as the Principal. -// For AWS services, the principal is a domain-style identifier defined by the -// service, like s3.amazonaws.com or sns.amazonaws.com. For AWS services, you -// can also specify the ARN or owning account of the associated resource as -// the SourceArn or SourceAccount. If you grant permission to a service principal -// without specifying the source, other accounts could potentially configure -// resources in their account to invoke your Lambda function. -// -// This action adds a statement to a resource-based permission policy for the -// function. For more information about function policies, see Lambda Function -// Policies (http://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation AddPermission for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// The resource already exists. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodePolicyLengthExceededException "PolicyLengthExceededException" -// Lambda function access policy is limited to 20 KB. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The RevisionId provided does not match the latest RevisionId for the Lambda -// function or alias. Call the GetFunction or the GetAlias API to retrieve the -// latest RevisionId for your resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermission -func (c *Lambda) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error) { - req, out := c.AddPermissionRequest(input) - return out, req.Send() -} - -// AddPermissionWithContext is the same as AddPermission with the addition of -// the ability to pass a context and additional request options. -// -// See AddPermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) AddPermissionWithContext(ctx aws.Context, input *AddPermissionInput, opts ...request.Option) (*AddPermissionOutput, error) { - req, out := c.AddPermissionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAlias = "CreateAlias" - -// CreateAliasRequest generates a "aws/request.Request" representing the -// client's request for the CreateAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAlias for more information on using the CreateAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAliasRequest method. -// req, resp := client.CreateAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAlias -func (c *Lambda) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *AliasConfiguration) { - op := &request.Operation{ - Name: opCreateAlias, - HTTPMethod: "POST", - HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases", - } - - if input == nil { - input = &CreateAliasInput{} - } - - output = &AliasConfiguration{} - req = c.newRequest(op, input, output) - return -} - -// CreateAlias API operation for AWS Lambda. -// -// Creates an alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) -// for a Lambda function version. Use aliases to provide clients with a function -// identifier that you can update to invoke a different version. -// -// You can also map an alias to split invocation requests between two versions. -// Use the RoutingConfig parameter to specify a second version and the percentage -// of invocation requests that it receives. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation CreateAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// The resource already exists. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAlias -func (c *Lambda) CreateAlias(input *CreateAliasInput) (*AliasConfiguration, error) { - req, out := c.CreateAliasRequest(input) - return out, req.Send() -} - -// CreateAliasWithContext is the same as CreateAlias with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) CreateAliasWithContext(ctx aws.Context, input *CreateAliasInput, opts ...request.Option) (*AliasConfiguration, error) { - req, out := c.CreateAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateEventSourceMapping = "CreateEventSourceMapping" - -// CreateEventSourceMappingRequest generates a "aws/request.Request" representing the -// client's request for the CreateEventSourceMapping operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateEventSourceMapping for more information on using the CreateEventSourceMapping -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateEventSourceMappingRequest method. -// req, resp := client.CreateEventSourceMappingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateEventSourceMapping -func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) { - op := &request.Operation{ - Name: opCreateEventSourceMapping, - HTTPMethod: "POST", - HTTPPath: "/2015-03-31/event-source-mappings/", - } - - if input == nil { - input = &CreateEventSourceMappingInput{} - } - - output = &EventSourceMappingConfiguration{} - req = c.newRequest(op, input, output) - return -} - -// CreateEventSourceMapping API operation for AWS Lambda. -// -// Creates a mapping between an event source and an AWS Lambda function. Lambda -// reads items from the event source and triggers the function. -// -// For details about each event source type, see the following topics. -// -// * Using AWS Lambda with Amazon Kinesis (http://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html) -// -// * Using AWS Lambda with Amazon SQS (http://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html) -// -// * Using AWS Lambda with Amazon DynamoDB (http://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation CreateEventSourceMapping for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// The resource already exists. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateEventSourceMapping -func (c *Lambda) CreateEventSourceMapping(input *CreateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { - req, out := c.CreateEventSourceMappingRequest(input) - return out, req.Send() -} - -// CreateEventSourceMappingWithContext is the same as CreateEventSourceMapping with the addition of -// the ability to pass a context and additional request options. -// -// See CreateEventSourceMapping for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) CreateEventSourceMappingWithContext(ctx aws.Context, input *CreateEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error) { - req, out := c.CreateEventSourceMappingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFunction = "CreateFunction" - -// CreateFunctionRequest generates a "aws/request.Request" representing the -// client's request for the CreateFunction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFunction for more information on using the CreateFunction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateFunctionRequest method. -// req, resp := client.CreateFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateFunction -func (c *Lambda) CreateFunctionRequest(input *CreateFunctionInput) (req *request.Request, output *FunctionConfiguration) { - op := &request.Operation{ - Name: opCreateFunction, - HTTPMethod: "POST", - HTTPPath: "/2015-03-31/functions", - } - - if input == nil { - input = &CreateFunctionInput{} - } - - output = &FunctionConfiguration{} - req = c.newRequest(op, input, output) - return -} - -// CreateFunction API operation for AWS Lambda. -// -// Creates a Lambda function. To create a function, you need a deployment package -// (http://docs.aws.amazon.com/lambda/latest/dg/deployment-package-v2.html) -// and an execution role (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role). -// The deployment package contains your function code. The execution role grants -// the function permission to use AWS services such as Amazon CloudWatch Logs -// for log streaming and AWS X-Ray for request tracing. -// -// A function has an unpublished version, and can have published versions and -// aliases. A published version is a snapshot of your function code and configuration -// that can not be changed. An alias is a named resource that maps to a version, -// and can be changed to map to a different version. Use the Publish parameter -// to create version 1 of your function from its initial configuration. -// -// The other parameters let you configure version-specific and function-level -// settings. You can modify version-specific settings later with UpdateFunctionConfiguration. -// Function-level settings apply to both the unpublished and published versions -// of the function and include tags (TagResource) and per-function concurrency -// limits (PutFunctionConcurrency). -// -// If another account or a AWS service invokes your function, use AddPermission -// to grant permission by creating a resource-based IAM policy. You can grant -// permissions at the function level, on a version, or on an alias. -// -// To invoke your function directly, use Invoke. To invoke your function in -// response to events in other AWS services, create an event source mapping -// (CreateEventSourceMapping), or configure a function trigger in the other -// service. For more information, see Invoking Functions (http://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda-functions.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation CreateFunction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// The resource already exists. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeCodeStorageExceededException "CodeStorageExceededException" -// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateFunction -func (c *Lambda) CreateFunction(input *CreateFunctionInput) (*FunctionConfiguration, error) { - req, out := c.CreateFunctionRequest(input) - return out, req.Send() -} - -// CreateFunctionWithContext is the same as CreateFunction with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFunction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) CreateFunctionWithContext(ctx aws.Context, input *CreateFunctionInput, opts ...request.Option) (*FunctionConfiguration, error) { - req, out := c.CreateFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAlias = "DeleteAlias" - -// DeleteAliasRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAlias for more information on using the DeleteAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAliasRequest method. -// req, resp := client.DeleteAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAlias -func (c *Lambda) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, output *DeleteAliasOutput) { - op := &request.Operation{ - Name: opDeleteAlias, - HTTPMethod: "DELETE", - HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases/{Name}", - } - - if input == nil { - input = &DeleteAliasInput{} - } - - output = &DeleteAliasOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAlias API operation for AWS Lambda. -// -// Deletes a Lambda function alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation DeleteAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAlias -func (c *Lambda) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) { - req, out := c.DeleteAliasRequest(input) - return out, req.Send() -} - -// DeleteAliasWithContext is the same as DeleteAlias with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) DeleteAliasWithContext(ctx aws.Context, input *DeleteAliasInput, opts ...request.Option) (*DeleteAliasOutput, error) { - req, out := c.DeleteAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEventSourceMapping = "DeleteEventSourceMapping" - -// DeleteEventSourceMappingRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEventSourceMapping operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEventSourceMapping for more information on using the DeleteEventSourceMapping -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEventSourceMappingRequest method. -// req, resp := client.DeleteEventSourceMappingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping -func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) { - op := &request.Operation{ - Name: opDeleteEventSourceMapping, - HTTPMethod: "DELETE", - HTTPPath: "/2015-03-31/event-source-mappings/{UUID}", - } - - if input == nil { - input = &DeleteEventSourceMappingInput{} - } - - output = &EventSourceMappingConfiguration{} - req = c.newRequest(op, input, output) - return -} - -// DeleteEventSourceMapping API operation for AWS Lambda. -// -// Deletes an event source mapping (http://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html). -// You can get the identifier of a mapping from the output of ListEventSourceMappings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation DeleteEventSourceMapping for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The operation conflicts with the resource's availability. For example, you -// attempted to update an EventSource Mapping in CREATING, or tried to delete -// a EventSource mapping currently in the UPDATING state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping -func (c *Lambda) DeleteEventSourceMapping(input *DeleteEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { - req, out := c.DeleteEventSourceMappingRequest(input) - return out, req.Send() -} - -// DeleteEventSourceMappingWithContext is the same as DeleteEventSourceMapping with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEventSourceMapping for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) DeleteEventSourceMappingWithContext(ctx aws.Context, input *DeleteEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error) { - req, out := c.DeleteEventSourceMappingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFunction = "DeleteFunction" - -// DeleteFunctionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFunction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFunction for more information on using the DeleteFunction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFunctionRequest method. -// req, resp := client.DeleteFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunction -func (c *Lambda) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request.Request, output *DeleteFunctionOutput) { - op := &request.Operation{ - Name: opDeleteFunction, - HTTPMethod: "DELETE", - HTTPPath: "/2015-03-31/functions/{FunctionName}", - } - - if input == nil { - input = &DeleteFunctionInput{} - } - - output = &DeleteFunctionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteFunction API operation for AWS Lambda. -// -// Deletes a Lambda function. To delete a specific function version, use the -// Qualifier parameter. Otherwise, all versions and aliases are deleted. -// -// To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. -// For AWS services and resources that invoke your function directly, delete -// the trigger in the service where you originally configured 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 Lambda's -// API operation DeleteFunction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// The resource already exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunction -func (c *Lambda) DeleteFunction(input *DeleteFunctionInput) (*DeleteFunctionOutput, error) { - req, out := c.DeleteFunctionRequest(input) - return out, req.Send() -} - -// DeleteFunctionWithContext is the same as DeleteFunction with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFunction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) DeleteFunctionWithContext(ctx aws.Context, input *DeleteFunctionInput, opts ...request.Option) (*DeleteFunctionOutput, error) { - req, out := c.DeleteFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFunctionConcurrency = "DeleteFunctionConcurrency" - -// DeleteFunctionConcurrencyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFunctionConcurrency operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFunctionConcurrency for more information on using the DeleteFunctionConcurrency -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFunctionConcurrencyRequest method. -// req, resp := client.DeleteFunctionConcurrencyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunctionConcurrency -func (c *Lambda) DeleteFunctionConcurrencyRequest(input *DeleteFunctionConcurrencyInput) (req *request.Request, output *DeleteFunctionConcurrencyOutput) { - op := &request.Operation{ - Name: opDeleteFunctionConcurrency, - HTTPMethod: "DELETE", - HTTPPath: "/2017-10-31/functions/{FunctionName}/concurrency", - } - - if input == nil { - input = &DeleteFunctionConcurrencyInput{} - } - - output = &DeleteFunctionConcurrencyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteFunctionConcurrency API operation for AWS Lambda. -// -// Removes a concurrent execution limit from a function. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation DeleteFunctionConcurrency for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunctionConcurrency -func (c *Lambda) DeleteFunctionConcurrency(input *DeleteFunctionConcurrencyInput) (*DeleteFunctionConcurrencyOutput, error) { - req, out := c.DeleteFunctionConcurrencyRequest(input) - return out, req.Send() -} - -// DeleteFunctionConcurrencyWithContext is the same as DeleteFunctionConcurrency with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFunctionConcurrency for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) DeleteFunctionConcurrencyWithContext(ctx aws.Context, input *DeleteFunctionConcurrencyInput, opts ...request.Option) (*DeleteFunctionConcurrencyOutput, error) { - req, out := c.DeleteFunctionConcurrencyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLayerVersion = "DeleteLayerVersion" - -// DeleteLayerVersionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLayerVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLayerVersion for more information on using the DeleteLayerVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLayerVersionRequest method. -// req, resp := client.DeleteLayerVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteLayerVersion -func (c *Lambda) DeleteLayerVersionRequest(input *DeleteLayerVersionInput) (req *request.Request, output *DeleteLayerVersionOutput) { - op := &request.Operation{ - Name: opDeleteLayerVersion, - HTTPMethod: "DELETE", - HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}", - } - - if input == nil { - input = &DeleteLayerVersionInput{} - } - - output = &DeleteLayerVersionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLayerVersion API operation for AWS Lambda. -// -// Deletes a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). -// Deleted versions can no longer be viewed or added to functions. To avoid -// breaking functions, a copy of the version remains in Lambda until no functions -// refer 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 Lambda's -// API operation DeleteLayerVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteLayerVersion -func (c *Lambda) DeleteLayerVersion(input *DeleteLayerVersionInput) (*DeleteLayerVersionOutput, error) { - req, out := c.DeleteLayerVersionRequest(input) - return out, req.Send() -} - -// DeleteLayerVersionWithContext is the same as DeleteLayerVersion with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLayerVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) DeleteLayerVersionWithContext(ctx aws.Context, input *DeleteLayerVersionInput, opts ...request.Option) (*DeleteLayerVersionOutput, error) { - req, out := c.DeleteLayerVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAccountSettings = "GetAccountSettings" - -// GetAccountSettingsRequest generates a "aws/request.Request" representing the -// client's request for the GetAccountSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAccountSettings for more information on using the GetAccountSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAccountSettingsRequest method. -// req, resp := client.GetAccountSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettings -func (c *Lambda) GetAccountSettingsRequest(input *GetAccountSettingsInput) (req *request.Request, output *GetAccountSettingsOutput) { - op := &request.Operation{ - Name: opGetAccountSettings, - HTTPMethod: "GET", - HTTPPath: "/2016-08-19/account-settings/", - } - - if input == nil { - input = &GetAccountSettingsInput{} - } - - output = &GetAccountSettingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAccountSettings API operation for AWS Lambda. -// -// Retrieves details about your account's limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) -// and usage in a region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation GetAccountSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettings -func (c *Lambda) GetAccountSettings(input *GetAccountSettingsInput) (*GetAccountSettingsOutput, error) { - req, out := c.GetAccountSettingsRequest(input) - return out, req.Send() -} - -// GetAccountSettingsWithContext is the same as GetAccountSettings with the addition of -// the ability to pass a context and additional request options. -// -// See GetAccountSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) GetAccountSettingsWithContext(ctx aws.Context, input *GetAccountSettingsInput, opts ...request.Option) (*GetAccountSettingsOutput, error) { - req, out := c.GetAccountSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAlias = "GetAlias" - -// GetAliasRequest generates a "aws/request.Request" representing the -// client's request for the GetAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAlias for more information on using the GetAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAliasRequest method. -// req, resp := client.GetAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAlias -func (c *Lambda) GetAliasRequest(input *GetAliasInput) (req *request.Request, output *AliasConfiguration) { - op := &request.Operation{ - Name: opGetAlias, - HTTPMethod: "GET", - HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases/{Name}", - } - - if input == nil { - input = &GetAliasInput{} - } - - output = &AliasConfiguration{} - req = c.newRequest(op, input, output) - return -} - -// GetAlias API operation for AWS Lambda. -// -// Returns details about a Lambda function alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation GetAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAlias -func (c *Lambda) GetAlias(input *GetAliasInput) (*AliasConfiguration, error) { - req, out := c.GetAliasRequest(input) - return out, req.Send() -} - -// GetAliasWithContext is the same as GetAlias with the addition of -// the ability to pass a context and additional request options. -// -// See GetAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) GetAliasWithContext(ctx aws.Context, input *GetAliasInput, opts ...request.Option) (*AliasConfiguration, error) { - req, out := c.GetAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetEventSourceMapping = "GetEventSourceMapping" - -// GetEventSourceMappingRequest generates a "aws/request.Request" representing the -// client's request for the GetEventSourceMapping operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetEventSourceMapping for more information on using the GetEventSourceMapping -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetEventSourceMappingRequest method. -// req, resp := client.GetEventSourceMappingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping -func (c *Lambda) GetEventSourceMappingRequest(input *GetEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) { - op := &request.Operation{ - Name: opGetEventSourceMapping, - HTTPMethod: "GET", - HTTPPath: "/2015-03-31/event-source-mappings/{UUID}", - } - - if input == nil { - input = &GetEventSourceMappingInput{} - } - - output = &EventSourceMappingConfiguration{} - req = c.newRequest(op, input, output) - return -} - -// GetEventSourceMapping API operation for AWS Lambda. -// -// Returns details about an event source mapping. You can get the identifier -// of a mapping from the output of ListEventSourceMappings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation GetEventSourceMapping for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping -func (c *Lambda) GetEventSourceMapping(input *GetEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { - req, out := c.GetEventSourceMappingRequest(input) - return out, req.Send() -} - -// GetEventSourceMappingWithContext is the same as GetEventSourceMapping with the addition of -// the ability to pass a context and additional request options. -// -// See GetEventSourceMapping for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) GetEventSourceMappingWithContext(ctx aws.Context, input *GetEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error) { - req, out := c.GetEventSourceMappingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFunction = "GetFunction" - -// GetFunctionRequest generates a "aws/request.Request" representing the -// client's request for the GetFunction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetFunction for more information on using the GetFunction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetFunctionRequest method. -// req, resp := client.GetFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunction -func (c *Lambda) GetFunctionRequest(input *GetFunctionInput) (req *request.Request, output *GetFunctionOutput) { - op := &request.Operation{ - Name: opGetFunction, - HTTPMethod: "GET", - HTTPPath: "/2015-03-31/functions/{FunctionName}", - } - - if input == nil { - input = &GetFunctionInput{} - } - - output = &GetFunctionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFunction API operation for AWS Lambda. -// -// Returns information about function or function version, with a link to download -// the deployment package that's valid for 10 minutes. If you specify a function -// version, only details specific to that version are returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation GetFunction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunction -func (c *Lambda) GetFunction(input *GetFunctionInput) (*GetFunctionOutput, error) { - req, out := c.GetFunctionRequest(input) - return out, req.Send() -} - -// GetFunctionWithContext is the same as GetFunction with the addition of -// the ability to pass a context and additional request options. -// -// See GetFunction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) GetFunctionWithContext(ctx aws.Context, input *GetFunctionInput, opts ...request.Option) (*GetFunctionOutput, error) { - req, out := c.GetFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFunctionConfiguration = "GetFunctionConfiguration" - -// GetFunctionConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetFunctionConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetFunctionConfiguration for more information on using the GetFunctionConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetFunctionConfigurationRequest method. -// req, resp := client.GetFunctionConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionConfiguration -func (c *Lambda) GetFunctionConfigurationRequest(input *GetFunctionConfigurationInput) (req *request.Request, output *FunctionConfiguration) { - op := &request.Operation{ - Name: opGetFunctionConfiguration, - HTTPMethod: "GET", - HTTPPath: "/2015-03-31/functions/{FunctionName}/configuration", - } - - if input == nil { - input = &GetFunctionConfigurationInput{} - } - - output = &FunctionConfiguration{} - req = c.newRequest(op, input, output) - return -} - -// GetFunctionConfiguration API operation for AWS Lambda. -// -// Returns a the version-specific settings of a Lambda function or version. -// The output includes only options that can vary between versions of a function. -// To modify these settings, use UpdateFunctionConfiguration. -// -// To get all of a function's details, including function-level settings, use -// GetFunction. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation GetFunctionConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionConfiguration -func (c *Lambda) GetFunctionConfiguration(input *GetFunctionConfigurationInput) (*FunctionConfiguration, error) { - req, out := c.GetFunctionConfigurationRequest(input) - return out, req.Send() -} - -// GetFunctionConfigurationWithContext is the same as GetFunctionConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetFunctionConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) GetFunctionConfigurationWithContext(ctx aws.Context, input *GetFunctionConfigurationInput, opts ...request.Option) (*FunctionConfiguration, error) { - req, out := c.GetFunctionConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLayerVersion = "GetLayerVersion" - -// GetLayerVersionRequest generates a "aws/request.Request" representing the -// client's request for the GetLayerVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLayerVersion for more information on using the GetLayerVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLayerVersionRequest method. -// req, resp := client.GetLayerVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersion -func (c *Lambda) GetLayerVersionRequest(input *GetLayerVersionInput) (req *request.Request, output *GetLayerVersionOutput) { - op := &request.Operation{ - Name: opGetLayerVersion, - HTTPMethod: "GET", - HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}", - } - - if input == nil { - input = &GetLayerVersionInput{} - } - - output = &GetLayerVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLayerVersion API operation for AWS Lambda. -// -// Returns information about a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html), -// with a link to download the layer archive that's valid for 10 minutes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation GetLayerVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersion -func (c *Lambda) GetLayerVersion(input *GetLayerVersionInput) (*GetLayerVersionOutput, error) { - req, out := c.GetLayerVersionRequest(input) - return out, req.Send() -} - -// GetLayerVersionWithContext is the same as GetLayerVersion with the addition of -// the ability to pass a context and additional request options. -// -// See GetLayerVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) GetLayerVersionWithContext(ctx aws.Context, input *GetLayerVersionInput, opts ...request.Option) (*GetLayerVersionOutput, error) { - req, out := c.GetLayerVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLayerVersionPolicy = "GetLayerVersionPolicy" - -// GetLayerVersionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetLayerVersionPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLayerVersionPolicy for more information on using the GetLayerVersionPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLayerVersionPolicyRequest method. -// req, resp := client.GetLayerVersionPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersionPolicy -func (c *Lambda) GetLayerVersionPolicyRequest(input *GetLayerVersionPolicyInput) (req *request.Request, output *GetLayerVersionPolicyOutput) { - op := &request.Operation{ - Name: opGetLayerVersionPolicy, - HTTPMethod: "GET", - HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy", - } - - if input == nil { - input = &GetLayerVersionPolicyInput{} - } - - output = &GetLayerVersionPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLayerVersionPolicy API operation for AWS Lambda. -// -// Returns the permission policy for a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). -// For more information, see AddLayerVersionPermission. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation GetLayerVersionPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersionPolicy -func (c *Lambda) GetLayerVersionPolicy(input *GetLayerVersionPolicyInput) (*GetLayerVersionPolicyOutput, error) { - req, out := c.GetLayerVersionPolicyRequest(input) - return out, req.Send() -} - -// GetLayerVersionPolicyWithContext is the same as GetLayerVersionPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetLayerVersionPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) GetLayerVersionPolicyWithContext(ctx aws.Context, input *GetLayerVersionPolicyInput, opts ...request.Option) (*GetLayerVersionPolicyOutput, error) { - req, out := c.GetLayerVersionPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPolicy = "GetPolicy" - -// GetPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPolicy for more information on using the GetPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPolicyRequest method. -// req, resp := client.GetPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicy -func (c *Lambda) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) { - op := &request.Operation{ - Name: opGetPolicy, - HTTPMethod: "GET", - HTTPPath: "/2015-03-31/functions/{FunctionName}/policy", - } - - if input == nil { - input = &GetPolicyInput{} - } - - output = &GetPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPolicy API operation for AWS Lambda. -// -// Returns the resource-based IAM policy (http://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html) -// for a function, version, or alias. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation GetPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicy -func (c *Lambda) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) { - req, out := c.GetPolicyRequest(input) - return out, req.Send() -} - -// GetPolicyWithContext is the same as GetPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) { - req, out := c.GetPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInvoke = "Invoke" - -// InvokeRequest generates a "aws/request.Request" representing the -// client's request for the Invoke operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See Invoke for more information on using the Invoke -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the InvokeRequest method. -// req, resp := client.InvokeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Invoke -func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output *InvokeOutput) { - op := &request.Operation{ - Name: opInvoke, - HTTPMethod: "POST", - HTTPPath: "/2015-03-31/functions/{FunctionName}/invocations", - } - - if input == nil { - input = &InvokeInput{} - } - - output = &InvokeOutput{} - req = c.newRequest(op, input, output) - return -} - -// Invoke API operation for AWS Lambda. -// -// Invokes a Lambda function. You can invoke a function synchronously and wait -// for the response, or asynchronously. To invoke a function asynchronously, -// set InvocationType to Event. -// -// For synchronous invocation, details about the function response, including -// errors, are included in the response body and headers. For either invocation -// type, you can find more information in the execution log (http://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions.html) -// and trace (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html). To record -// function errors for asynchronous invocations, configure your function with -// a dead letter queue (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html). -// -// The status code in the API response does not reflect function errors. Error -// codes are reserved for errors that prevent your function from executing, -// such as permissions errors, limit errors (http://docs.aws.amazon.com/lambda/latest/dg/limits.html), -// or issues with your function's code and configuration. For example, Lambda -// returns TooManyRequestsException if executing the function would cause you -// to exceed a concurrency limit at either the account level (ConcurrentInvocationLimitExceeded) -// or function level (ReservedFunctionConcurrentInvocationLimitExceeded). -// -// For functions with a long timeout, your client may be disconnected during -// synchronous invocation while it waits for a response. Configure your HTTP -// client, SDK, firewall, proxy, or operating system to allow for long connections -// with timeout or keep-alive settings. -// -// This operation requires permission for the lambda:InvokeFunction action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation Invoke for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidRequestContentException "InvalidRequestContentException" -// The request body could not be parsed as JSON. -// -// * ErrCodeRequestTooLargeException "RequestTooLargeException" -// The request payload exceeded the Invoke request body JSON input limit. For -// more information, see Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html). -// -// * ErrCodeUnsupportedMediaTypeException "UnsupportedMediaTypeException" -// The content type of the Invoke request body is not JSON. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeEC2UnexpectedException "EC2UnexpectedException" -// AWS Lambda received an unexpected EC2 client exception while setting up for -// the Lambda function. -// -// * ErrCodeSubnetIPAddressLimitReachedException "SubnetIPAddressLimitReachedException" -// AWS Lambda was not able to set up VPC access for the Lambda function because -// one or more configured subnets has no available IP addresses. -// -// * ErrCodeENILimitReachedException "ENILimitReachedException" -// AWS Lambda was not able to create an Elastic Network Interface (ENI) in the -// VPC, specified as part of Lambda function configuration, because the limit -// for network interfaces has been reached. -// -// * ErrCodeEC2ThrottledException "EC2ThrottledException" -// AWS Lambda was throttled by Amazon EC2 during Lambda function initialization -// using the execution role provided for the Lambda function. -// -// * ErrCodeEC2AccessDeniedException "EC2AccessDeniedException" -// Need additional permissions to configure VPC settings. -// -// * ErrCodeInvalidSubnetIDException "InvalidSubnetIDException" -// The Subnet ID provided in the Lambda function VPC configuration is invalid. -// -// * ErrCodeInvalidSecurityGroupIDException "InvalidSecurityGroupIDException" -// The Security Group ID provided in the Lambda function VPC configuration is -// invalid. -// -// * ErrCodeInvalidZipFileException "InvalidZipFileException" -// AWS Lambda could not unzip the deployment package. -// -// * ErrCodeKMSDisabledException "KMSDisabledException" -// Lambda was unable to decrypt the environment variables because the KMS key -// used is disabled. Check the Lambda function's KMS key settings. -// -// * ErrCodeKMSInvalidStateException "KMSInvalidStateException" -// Lambda was unable to decrypt the environment variables because the KMS key -// used is in an invalid state for Decrypt. Check the function's KMS key settings. -// -// * ErrCodeKMSAccessDeniedException "KMSAccessDeniedException" -// Lambda was unable to decrypt the environment variables because KMS access -// was denied. Check the Lambda function's KMS permissions. -// -// * ErrCodeKMSNotFoundException "KMSNotFoundException" -// Lambda was unable to decrypt the environment variables because the KMS key -// was not found. Check the function's KMS key settings. -// -// * ErrCodeInvalidRuntimeException "InvalidRuntimeException" -// The runtime or runtime version specified is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Invoke -func (c *Lambda) Invoke(input *InvokeInput) (*InvokeOutput, error) { - req, out := c.InvokeRequest(input) - return out, req.Send() -} - -// InvokeWithContext is the same as Invoke with the addition of -// the ability to pass a context and additional request options. -// -// See Invoke for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) InvokeWithContext(ctx aws.Context, input *InvokeInput, opts ...request.Option) (*InvokeOutput, error) { - req, out := c.InvokeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInvokeAsync = "InvokeAsync" - -// InvokeAsyncRequest generates a "aws/request.Request" representing the -// client's request for the InvokeAsync operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See InvokeAsync for more information on using the InvokeAsync -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the InvokeAsyncRequest method. -// req, resp := client.InvokeAsyncRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsync -// -// Deprecated: InvokeAsync has been deprecated -func (c *Lambda) InvokeAsyncRequest(input *InvokeAsyncInput) (req *request.Request, output *InvokeAsyncOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, InvokeAsync, has been deprecated") - } - op := &request.Operation{ - Name: opInvokeAsync, - HTTPMethod: "POST", - HTTPPath: "/2014-11-13/functions/{FunctionName}/invoke-async/", - } - - if input == nil { - input = &InvokeAsyncInput{} - } - - output = &InvokeAsyncOutput{} - req = c.newRequest(op, input, output) - return -} - -// InvokeAsync API operation for AWS Lambda. -// -// For asynchronous function invocation, use Invoke. -// -// Invokes a function asynchronously. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation InvokeAsync for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidRequestContentException "InvalidRequestContentException" -// The request body could not be parsed as JSON. -// -// * ErrCodeInvalidRuntimeException "InvalidRuntimeException" -// The runtime or runtime version specified is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsync -// -// Deprecated: InvokeAsync has been deprecated -func (c *Lambda) InvokeAsync(input *InvokeAsyncInput) (*InvokeAsyncOutput, error) { - req, out := c.InvokeAsyncRequest(input) - return out, req.Send() -} - -// InvokeAsyncWithContext is the same as InvokeAsync with the addition of -// the ability to pass a context and additional request options. -// -// See InvokeAsync for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: InvokeAsyncWithContext has been deprecated -func (c *Lambda) InvokeAsyncWithContext(ctx aws.Context, input *InvokeAsyncInput, opts ...request.Option) (*InvokeAsyncOutput, error) { - req, out := c.InvokeAsyncRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAliases = "ListAliases" - -// ListAliasesRequest generates a "aws/request.Request" representing the -// client's request for the ListAliases operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAliases for more information on using the ListAliases -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAliasesRequest method. -// req, resp := client.ListAliasesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliases -func (c *Lambda) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, output *ListAliasesOutput) { - op := &request.Operation{ - Name: opListAliases, - HTTPMethod: "GET", - HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases", - } - - if input == nil { - input = &ListAliasesInput{} - } - - output = &ListAliasesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAliases API operation for AWS Lambda. -// -// Returns a list of aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) -// for a Lambda function. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation ListAliases for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliases -func (c *Lambda) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) { - req, out := c.ListAliasesRequest(input) - return out, req.Send() -} - -// ListAliasesWithContext is the same as ListAliases with the addition of -// the ability to pass a context and additional request options. -// -// See ListAliases for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) ListAliasesWithContext(ctx aws.Context, input *ListAliasesInput, opts ...request.Option) (*ListAliasesOutput, error) { - req, out := c.ListAliasesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListEventSourceMappings = "ListEventSourceMappings" - -// ListEventSourceMappingsRequest generates a "aws/request.Request" representing the -// client's request for the ListEventSourceMappings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListEventSourceMappings for more information on using the ListEventSourceMappings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListEventSourceMappingsRequest method. -// req, resp := client.ListEventSourceMappingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings -func (c *Lambda) ListEventSourceMappingsRequest(input *ListEventSourceMappingsInput) (req *request.Request, output *ListEventSourceMappingsOutput) { - op := &request.Operation{ - Name: opListEventSourceMappings, - HTTPMethod: "GET", - HTTPPath: "/2015-03-31/event-source-mappings/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListEventSourceMappingsInput{} - } - - output = &ListEventSourceMappingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListEventSourceMappings API operation for AWS Lambda. -// -// Lists event source mappings. Specify an EventSourceArn to only show event -// source mappings for a single event source. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation ListEventSourceMappings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings -func (c *Lambda) ListEventSourceMappings(input *ListEventSourceMappingsInput) (*ListEventSourceMappingsOutput, error) { - req, out := c.ListEventSourceMappingsRequest(input) - return out, req.Send() -} - -// ListEventSourceMappingsWithContext is the same as ListEventSourceMappings with the addition of -// the ability to pass a context and additional request options. -// -// See ListEventSourceMappings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) ListEventSourceMappingsWithContext(ctx aws.Context, input *ListEventSourceMappingsInput, opts ...request.Option) (*ListEventSourceMappingsOutput, error) { - req, out := c.ListEventSourceMappingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListEventSourceMappingsPages iterates over the pages of a ListEventSourceMappings operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListEventSourceMappings 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 ListEventSourceMappings operation. -// pageNum := 0 -// err := client.ListEventSourceMappingsPages(params, -// func(page *ListEventSourceMappingsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Lambda) ListEventSourceMappingsPages(input *ListEventSourceMappingsInput, fn func(*ListEventSourceMappingsOutput, bool) bool) error { - return c.ListEventSourceMappingsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListEventSourceMappingsPagesWithContext same as ListEventSourceMappingsPages 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 *Lambda) ListEventSourceMappingsPagesWithContext(ctx aws.Context, input *ListEventSourceMappingsInput, fn func(*ListEventSourceMappingsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListEventSourceMappingsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListEventSourceMappingsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEventSourceMappingsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListFunctions = "ListFunctions" - -// ListFunctionsRequest generates a "aws/request.Request" representing the -// client's request for the ListFunctions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListFunctions for more information on using the ListFunctions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListFunctionsRequest method. -// req, resp := client.ListFunctionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctions -func (c *Lambda) ListFunctionsRequest(input *ListFunctionsInput) (req *request.Request, output *ListFunctionsOutput) { - op := &request.Operation{ - Name: opListFunctions, - HTTPMethod: "GET", - HTTPPath: "/2015-03-31/functions/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListFunctionsInput{} - } - - output = &ListFunctionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListFunctions API operation for AWS Lambda. -// -// Returns a list of Lambda functions, with the version-specific configuration -// of each. -// -// Set FunctionVersion to ALL to include all published versions of each function -// in addition to the unpublished version. To get more information about a function -// or version, use GetFunction. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation ListFunctions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctions -func (c *Lambda) ListFunctions(input *ListFunctionsInput) (*ListFunctionsOutput, error) { - req, out := c.ListFunctionsRequest(input) - return out, req.Send() -} - -// ListFunctionsWithContext is the same as ListFunctions with the addition of -// the ability to pass a context and additional request options. -// -// See ListFunctions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) ListFunctionsWithContext(ctx aws.Context, input *ListFunctionsInput, opts ...request.Option) (*ListFunctionsOutput, error) { - req, out := c.ListFunctionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListFunctionsPages iterates over the pages of a ListFunctions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListFunctions 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 ListFunctions operation. -// pageNum := 0 -// err := client.ListFunctionsPages(params, -// func(page *ListFunctionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Lambda) ListFunctionsPages(input *ListFunctionsInput, fn func(*ListFunctionsOutput, bool) bool) error { - return c.ListFunctionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListFunctionsPagesWithContext same as ListFunctionsPages 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 *Lambda) ListFunctionsPagesWithContext(ctx aws.Context, input *ListFunctionsInput, fn func(*ListFunctionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListFunctionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListFunctionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListFunctionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListLayerVersions = "ListLayerVersions" - -// ListLayerVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListLayerVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListLayerVersions for more information on using the ListLayerVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListLayerVersionsRequest method. -// req, resp := client.ListLayerVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayerVersions -func (c *Lambda) ListLayerVersionsRequest(input *ListLayerVersionsInput) (req *request.Request, output *ListLayerVersionsOutput) { - op := &request.Operation{ - Name: opListLayerVersions, - HTTPMethod: "GET", - HTTPPath: "/2018-10-31/layers/{LayerName}/versions", - } - - if input == nil { - input = &ListLayerVersionsInput{} - } - - output = &ListLayerVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListLayerVersions API operation for AWS Lambda. -// -// Lists the versions of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). -// Versions that have been deleted aren't listed. Specify a runtime identifier -// (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) to list -// only versions that indicate that they're compatible with that runtime. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation ListLayerVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayerVersions -func (c *Lambda) ListLayerVersions(input *ListLayerVersionsInput) (*ListLayerVersionsOutput, error) { - req, out := c.ListLayerVersionsRequest(input) - return out, req.Send() -} - -// ListLayerVersionsWithContext is the same as ListLayerVersions with the addition of -// the ability to pass a context and additional request options. -// -// See ListLayerVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) ListLayerVersionsWithContext(ctx aws.Context, input *ListLayerVersionsInput, opts ...request.Option) (*ListLayerVersionsOutput, error) { - req, out := c.ListLayerVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListLayers = "ListLayers" - -// ListLayersRequest generates a "aws/request.Request" representing the -// client's request for the ListLayers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListLayers for more information on using the ListLayers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListLayersRequest method. -// req, resp := client.ListLayersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayers -func (c *Lambda) ListLayersRequest(input *ListLayersInput) (req *request.Request, output *ListLayersOutput) { - op := &request.Operation{ - Name: opListLayers, - HTTPMethod: "GET", - HTTPPath: "/2018-10-31/layers", - } - - if input == nil { - input = &ListLayersInput{} - } - - output = &ListLayersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListLayers API operation for AWS Lambda. -// -// Lists AWS Lambda layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) -// and shows information about the latest version of each. Specify a runtime -// identifier (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) -// to list only layers that indicate that they're compatible with that runtime. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation ListLayers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayers -func (c *Lambda) ListLayers(input *ListLayersInput) (*ListLayersOutput, error) { - req, out := c.ListLayersRequest(input) - return out, req.Send() -} - -// ListLayersWithContext is the same as ListLayers with the addition of -// the ability to pass a context and additional request options. -// -// See ListLayers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) ListLayersWithContext(ctx aws.Context, input *ListLayersInput, opts ...request.Option) (*ListLayersOutput, error) { - req, out := c.ListLayersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTags = "ListTags" - -// ListTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTags for more information on using the ListTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsRequest method. -// req, resp := client.ListTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags -func (c *Lambda) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { - op := &request.Operation{ - Name: opListTags, - HTTPMethod: "GET", - HTTPPath: "/2017-03-31/tags/{ARN}", - } - - if input == nil { - input = &ListTagsInput{} - } - - output = &ListTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTags API operation for AWS Lambda. -// -// Returns a function's tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html). -// You can also view tags with GetFunction. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation ListTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags -func (c *Lambda) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - return out, req.Send() -} - -// ListTagsWithContext is the same as ListTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListVersionsByFunction = "ListVersionsByFunction" - -// ListVersionsByFunctionRequest generates a "aws/request.Request" representing the -// client's request for the ListVersionsByFunction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListVersionsByFunction for more information on using the ListVersionsByFunction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListVersionsByFunctionRequest method. -// req, resp := client.ListVersionsByFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction -func (c *Lambda) ListVersionsByFunctionRequest(input *ListVersionsByFunctionInput) (req *request.Request, output *ListVersionsByFunctionOutput) { - op := &request.Operation{ - Name: opListVersionsByFunction, - HTTPMethod: "GET", - HTTPPath: "/2015-03-31/functions/{FunctionName}/versions", - } - - if input == nil { - input = &ListVersionsByFunctionInput{} - } - - output = &ListVersionsByFunctionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListVersionsByFunction API operation for AWS Lambda. -// -// Returns a list of versions (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html), -// with the version-specific configuration of each. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation ListVersionsByFunction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction -func (c *Lambda) ListVersionsByFunction(input *ListVersionsByFunctionInput) (*ListVersionsByFunctionOutput, error) { - req, out := c.ListVersionsByFunctionRequest(input) - return out, req.Send() -} - -// ListVersionsByFunctionWithContext is the same as ListVersionsByFunction with the addition of -// the ability to pass a context and additional request options. -// -// See ListVersionsByFunction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) ListVersionsByFunctionWithContext(ctx aws.Context, input *ListVersionsByFunctionInput, opts ...request.Option) (*ListVersionsByFunctionOutput, error) { - req, out := c.ListVersionsByFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPublishLayerVersion = "PublishLayerVersion" - -// PublishLayerVersionRequest generates a "aws/request.Request" representing the -// client's request for the PublishLayerVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PublishLayerVersion for more information on using the PublishLayerVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PublishLayerVersionRequest method. -// req, resp := client.PublishLayerVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishLayerVersion -func (c *Lambda) PublishLayerVersionRequest(input *PublishLayerVersionInput) (req *request.Request, output *PublishLayerVersionOutput) { - op := &request.Operation{ - Name: opPublishLayerVersion, - HTTPMethod: "POST", - HTTPPath: "/2018-10-31/layers/{LayerName}/versions", - } - - if input == nil { - input = &PublishLayerVersionInput{} - } - - output = &PublishLayerVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// PublishLayerVersion API operation for AWS Lambda. -// -// Creates an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) -// from a ZIP archive. Each time you call PublishLayerVersion with the same -// version name, a new version is created. -// -// Add layers to your function with CreateFunction or UpdateFunctionConfiguration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation PublishLayerVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeCodeStorageExceededException "CodeStorageExceededException" -// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishLayerVersion -func (c *Lambda) PublishLayerVersion(input *PublishLayerVersionInput) (*PublishLayerVersionOutput, error) { - req, out := c.PublishLayerVersionRequest(input) - return out, req.Send() -} - -// PublishLayerVersionWithContext is the same as PublishLayerVersion with the addition of -// the ability to pass a context and additional request options. -// -// See PublishLayerVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) PublishLayerVersionWithContext(ctx aws.Context, input *PublishLayerVersionInput, opts ...request.Option) (*PublishLayerVersionOutput, error) { - req, out := c.PublishLayerVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPublishVersion = "PublishVersion" - -// PublishVersionRequest generates a "aws/request.Request" representing the -// client's request for the PublishVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PublishVersion for more information on using the PublishVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PublishVersionRequest method. -// req, resp := client.PublishVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion -func (c *Lambda) PublishVersionRequest(input *PublishVersionInput) (req *request.Request, output *FunctionConfiguration) { - op := &request.Operation{ - Name: opPublishVersion, - HTTPMethod: "POST", - HTTPPath: "/2015-03-31/functions/{FunctionName}/versions", - } - - if input == nil { - input = &PublishVersionInput{} - } - - output = &FunctionConfiguration{} - req = c.newRequest(op, input, output) - return -} - -// PublishVersion API operation for AWS Lambda. -// -// Creates a version (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) -// from the current code and configuration of a function. Use versions to create -// a snapshot of your function code and configuration that doesn't change. -// -// AWS Lambda does not publish a version if the function's configuration and -// code hasn't changed since the last version. Use UpdateFunctionCode or UpdateFunctionConfiguration -// to update the function prior to publishing a version. -// -// Clients can invoke versions directly or with an alias. To create an alias, -// use CreateAlias. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation PublishVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeCodeStorageExceededException "CodeStorageExceededException" -// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The RevisionId provided does not match the latest RevisionId for the Lambda -// function or alias. Call the GetFunction or the GetAlias API to retrieve the -// latest RevisionId for your resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion -func (c *Lambda) PublishVersion(input *PublishVersionInput) (*FunctionConfiguration, error) { - req, out := c.PublishVersionRequest(input) - return out, req.Send() -} - -// PublishVersionWithContext is the same as PublishVersion with the addition of -// the ability to pass a context and additional request options. -// -// See PublishVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) PublishVersionWithContext(ctx aws.Context, input *PublishVersionInput, opts ...request.Option) (*FunctionConfiguration, error) { - req, out := c.PublishVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutFunctionConcurrency = "PutFunctionConcurrency" - -// PutFunctionConcurrencyRequest generates a "aws/request.Request" representing the -// client's request for the PutFunctionConcurrency operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutFunctionConcurrency for more information on using the PutFunctionConcurrency -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutFunctionConcurrencyRequest method. -// req, resp := client.PutFunctionConcurrencyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency -func (c *Lambda) PutFunctionConcurrencyRequest(input *PutFunctionConcurrencyInput) (req *request.Request, output *PutFunctionConcurrencyOutput) { - op := &request.Operation{ - Name: opPutFunctionConcurrency, - HTTPMethod: "PUT", - HTTPPath: "/2017-10-31/functions/{FunctionName}/concurrency", - } - - if input == nil { - input = &PutFunctionConcurrencyInput{} - } - - output = &PutFunctionConcurrencyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutFunctionConcurrency API operation for AWS Lambda. -// -// Sets the maximum number of simultaneous executions for a function, and reserves -// capacity for that concurrency level. -// -// Concurrency settings apply to the function as a whole, including all published -// versions and the unpublished version. Reserving concurrency both guarantees -// that your function has capacity to process the specified number of events -// simultaneously, and prevents it from scaling beyond that level. Use GetFunction -// to see the current setting for a function. -// -// Use GetAccountSettings to see your regional concurrency limit. You can reserve -// concurrency for as many functions as you like, as long as you leave at least -// 100 simultaneous executions unreserved for functions that aren't configured -// with a per-function limit. For more information, see Managing Concurrency -// (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation PutFunctionConcurrency for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency -func (c *Lambda) PutFunctionConcurrency(input *PutFunctionConcurrencyInput) (*PutFunctionConcurrencyOutput, error) { - req, out := c.PutFunctionConcurrencyRequest(input) - return out, req.Send() -} - -// PutFunctionConcurrencyWithContext is the same as PutFunctionConcurrency with the addition of -// the ability to pass a context and additional request options. -// -// See PutFunctionConcurrency for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) PutFunctionConcurrencyWithContext(ctx aws.Context, input *PutFunctionConcurrencyInput, opts ...request.Option) (*PutFunctionConcurrencyOutput, error) { - req, out := c.PutFunctionConcurrencyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveLayerVersionPermission = "RemoveLayerVersionPermission" - -// RemoveLayerVersionPermissionRequest generates a "aws/request.Request" representing the -// client's request for the RemoveLayerVersionPermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveLayerVersionPermission for more information on using the RemoveLayerVersionPermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveLayerVersionPermissionRequest method. -// req, resp := client.RemoveLayerVersionPermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemoveLayerVersionPermission -func (c *Lambda) RemoveLayerVersionPermissionRequest(input *RemoveLayerVersionPermissionInput) (req *request.Request, output *RemoveLayerVersionPermissionOutput) { - op := &request.Operation{ - Name: opRemoveLayerVersionPermission, - HTTPMethod: "DELETE", - HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy/{StatementId}", - } - - if input == nil { - input = &RemoveLayerVersionPermissionInput{} - } - - output = &RemoveLayerVersionPermissionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveLayerVersionPermission API operation for AWS Lambda. -// -// Removes a statement from the permissions policy for a version of an AWS Lambda -// layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). -// For more information, see AddLayerVersionPermission. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation RemoveLayerVersionPermission for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The RevisionId provided does not match the latest RevisionId for the Lambda -// function or alias. Call the GetFunction or the GetAlias API to retrieve the -// latest RevisionId for your resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemoveLayerVersionPermission -func (c *Lambda) RemoveLayerVersionPermission(input *RemoveLayerVersionPermissionInput) (*RemoveLayerVersionPermissionOutput, error) { - req, out := c.RemoveLayerVersionPermissionRequest(input) - return out, req.Send() -} - -// RemoveLayerVersionPermissionWithContext is the same as RemoveLayerVersionPermission with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveLayerVersionPermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) RemoveLayerVersionPermissionWithContext(ctx aws.Context, input *RemoveLayerVersionPermissionInput, opts ...request.Option) (*RemoveLayerVersionPermissionOutput, error) { - req, out := c.RemoveLayerVersionPermissionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemovePermission = "RemovePermission" - -// RemovePermissionRequest generates a "aws/request.Request" representing the -// client's request for the RemovePermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemovePermission for more information on using the RemovePermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemovePermissionRequest method. -// req, resp := client.RemovePermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission -func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) { - op := &request.Operation{ - Name: opRemovePermission, - HTTPMethod: "DELETE", - HTTPPath: "/2015-03-31/functions/{FunctionName}/policy/{StatementId}", - } - - if input == nil { - input = &RemovePermissionInput{} - } - - output = &RemovePermissionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemovePermission API operation for AWS Lambda. -// -// Revokes function use permission from an AWS service or another account. You -// can get the ID of the statement from the output of GetPolicy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation RemovePermission for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The RevisionId provided does not match the latest RevisionId for the Lambda -// function or alias. Call the GetFunction or the GetAlias API to retrieve the -// latest RevisionId for your resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission -func (c *Lambda) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) { - req, out := c.RemovePermissionRequest(input) - return out, req.Send() -} - -// RemovePermissionWithContext is the same as RemovePermission with the addition of -// the ability to pass a context and additional request options. -// -// See RemovePermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error) { - req, out := c.RemovePermissionRequest(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/lambda-2015-03-31/TagResource -func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/2017-03-31/tags/{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 Lambda. -// -// Adds tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to a -// function. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource -func (c *Lambda) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { - 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 *Lambda) 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/lambda-2015-03-31/UntagResource -func (c *Lambda) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "DELETE", - HTTPPath: "/2017-03-31/tags/{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 Lambda. -// -// Removes tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) from -// a function. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource -func (c *Lambda) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { - 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 *Lambda) 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 opUpdateAlias = "UpdateAlias" - -// UpdateAliasRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAlias for more information on using the UpdateAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAliasRequest method. -// req, resp := client.UpdateAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias -func (c *Lambda) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output *AliasConfiguration) { - op := &request.Operation{ - Name: opUpdateAlias, - HTTPMethod: "PUT", - HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases/{Name}", - } - - if input == nil { - input = &UpdateAliasInput{} - } - - output = &AliasConfiguration{} - req = c.newRequest(op, input, output) - return -} - -// UpdateAlias API operation for AWS Lambda. -// -// Updates the configuration of a Lambda function alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation UpdateAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The RevisionId provided does not match the latest RevisionId for the Lambda -// function or alias. Call the GetFunction or the GetAlias API to retrieve the -// latest RevisionId for your resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias -func (c *Lambda) UpdateAlias(input *UpdateAliasInput) (*AliasConfiguration, error) { - req, out := c.UpdateAliasRequest(input) - return out, req.Send() -} - -// UpdateAliasWithContext is the same as UpdateAlias with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) UpdateAliasWithContext(ctx aws.Context, input *UpdateAliasInput, opts ...request.Option) (*AliasConfiguration, error) { - req, out := c.UpdateAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateEventSourceMapping = "UpdateEventSourceMapping" - -// UpdateEventSourceMappingRequest generates a "aws/request.Request" representing the -// client's request for the UpdateEventSourceMapping operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateEventSourceMapping for more information on using the UpdateEventSourceMapping -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateEventSourceMappingRequest method. -// req, resp := client.UpdateEventSourceMappingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping -func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) { - op := &request.Operation{ - Name: opUpdateEventSourceMapping, - HTTPMethod: "PUT", - HTTPPath: "/2015-03-31/event-source-mappings/{UUID}", - } - - if input == nil { - input = &UpdateEventSourceMappingInput{} - } - - output = &EventSourceMappingConfiguration{} - req = c.newRequest(op, input, output) - return -} - -// UpdateEventSourceMapping API operation for AWS Lambda. -// -// Updates an event source mapping. You can change the function that AWS Lambda -// invokes, or pause invocation and resume later from the same location. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation UpdateEventSourceMapping for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// The resource already exists. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The operation conflicts with the resource's availability. For example, you -// attempted to update an EventSource Mapping in CREATING, or tried to delete -// a EventSource mapping currently in the UPDATING state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping -func (c *Lambda) UpdateEventSourceMapping(input *UpdateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { - req, out := c.UpdateEventSourceMappingRequest(input) - return out, req.Send() -} - -// UpdateEventSourceMappingWithContext is the same as UpdateEventSourceMapping with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateEventSourceMapping for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) UpdateEventSourceMappingWithContext(ctx aws.Context, input *UpdateEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error) { - req, out := c.UpdateEventSourceMappingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFunctionCode = "UpdateFunctionCode" - -// UpdateFunctionCodeRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFunctionCode operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFunctionCode for more information on using the UpdateFunctionCode -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFunctionCodeRequest method. -// req, resp := client.UpdateFunctionCodeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode -func (c *Lambda) UpdateFunctionCodeRequest(input *UpdateFunctionCodeInput) (req *request.Request, output *FunctionConfiguration) { - op := &request.Operation{ - Name: opUpdateFunctionCode, - HTTPMethod: "PUT", - HTTPPath: "/2015-03-31/functions/{FunctionName}/code", - } - - if input == nil { - input = &UpdateFunctionCodeInput{} - } - - output = &FunctionConfiguration{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFunctionCode API operation for AWS Lambda. -// -// Updates a Lambda function's code. -// -// The function's code is locked when you publish a version. You cannot modify -// the code of a published version, only the unpublished 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 Lambda's -// API operation UpdateFunctionCode for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeCodeStorageExceededException "CodeStorageExceededException" -// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The RevisionId provided does not match the latest RevisionId for the Lambda -// function or alias. Call the GetFunction or the GetAlias API to retrieve the -// latest RevisionId for your resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode -func (c *Lambda) UpdateFunctionCode(input *UpdateFunctionCodeInput) (*FunctionConfiguration, error) { - req, out := c.UpdateFunctionCodeRequest(input) - return out, req.Send() -} - -// UpdateFunctionCodeWithContext is the same as UpdateFunctionCode with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFunctionCode for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) UpdateFunctionCodeWithContext(ctx aws.Context, input *UpdateFunctionCodeInput, opts ...request.Option) (*FunctionConfiguration, error) { - req, out := c.UpdateFunctionCodeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFunctionConfiguration = "UpdateFunctionConfiguration" - -// UpdateFunctionConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFunctionConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFunctionConfiguration for more information on using the UpdateFunctionConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFunctionConfigurationRequest method. -// req, resp := client.UpdateFunctionConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration -func (c *Lambda) UpdateFunctionConfigurationRequest(input *UpdateFunctionConfigurationInput) (req *request.Request, output *FunctionConfiguration) { - op := &request.Operation{ - Name: opUpdateFunctionConfiguration, - HTTPMethod: "PUT", - HTTPPath: "/2015-03-31/functions/{FunctionName}/configuration", - } - - if input == nil { - input = &UpdateFunctionConfigurationInput{} - } - - output = &FunctionConfiguration{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFunctionConfiguration API operation for AWS Lambda. -// -// Modify the version-specifc settings of a Lambda function. -// -// These settings can vary between versions of a function and are locked when -// you publish a version. You cannot modify the configuration of a published -// version, only the unpublished version. -// -// To configure function concurrency, use PutFunctionConcurrency. To grant invoke -// permissions to an account or AWS service, use AddPermission. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Lambda's -// API operation UpdateFunctionConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// The AWS Lambda service encountered an internal error. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One of the parameters in the request is invalid. For example, if you provided -// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration -// API, that AWS Lambda is unable to assume you will get this exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded. -// -// * ErrCodeResourceConflictException "ResourceConflictException" -// The resource already exists. -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The RevisionId provided does not match the latest RevisionId for the Lambda -// function or alias. Call the GetFunction or the GetAlias API to retrieve the -// latest RevisionId for your resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration -func (c *Lambda) UpdateFunctionConfiguration(input *UpdateFunctionConfigurationInput) (*FunctionConfiguration, error) { - req, out := c.UpdateFunctionConfigurationRequest(input) - return out, req.Send() -} - -// UpdateFunctionConfigurationWithContext is the same as UpdateFunctionConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFunctionConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lambda) UpdateFunctionConfigurationWithContext(ctx aws.Context, input *UpdateFunctionConfigurationInput, opts ...request.Option) (*FunctionConfiguration, error) { - req, out := c.UpdateFunctionConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Limits related to concurrency and code storage. All file and storage sizes -// are in bytes. -type AccountLimit struct { - _ struct{} `type:"structure"` - - // The maximum size of your function's code and layers when extracted. - CodeSizeUnzipped *int64 `type:"long"` - - // The maximum size of a deployment package when uploaded direcly to AWS Lambda. - // Use Amazon S3 for larger files. - CodeSizeZipped *int64 `type:"long"` - - // The maximum number of simultaneous function executions. - ConcurrentExecutions *int64 `type:"integer"` - - // The amount of storage space that you can use for all deployment packages - // and layer archives. - TotalCodeSize *int64 `type:"long"` - - // The maximum number of simultaneous function executions, less the concurrency - // reserved for individual functions with PutFunctionConcurrency. - UnreservedConcurrentExecutions *int64 `type:"integer"` -} - -// String returns the string representation -func (s AccountLimit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountLimit) GoString() string { - return s.String() -} - -// SetCodeSizeUnzipped sets the CodeSizeUnzipped field's value. -func (s *AccountLimit) SetCodeSizeUnzipped(v int64) *AccountLimit { - s.CodeSizeUnzipped = &v - return s -} - -// SetCodeSizeZipped sets the CodeSizeZipped field's value. -func (s *AccountLimit) SetCodeSizeZipped(v int64) *AccountLimit { - s.CodeSizeZipped = &v - return s -} - -// SetConcurrentExecutions sets the ConcurrentExecutions field's value. -func (s *AccountLimit) SetConcurrentExecutions(v int64) *AccountLimit { - s.ConcurrentExecutions = &v - return s -} - -// SetTotalCodeSize sets the TotalCodeSize field's value. -func (s *AccountLimit) SetTotalCodeSize(v int64) *AccountLimit { - s.TotalCodeSize = &v - return s -} - -// SetUnreservedConcurrentExecutions sets the UnreservedConcurrentExecutions field's value. -func (s *AccountLimit) SetUnreservedConcurrentExecutions(v int64) *AccountLimit { - s.UnreservedConcurrentExecutions = &v - return s -} - -// The number of functions and amount of storage in use. -type AccountUsage struct { - _ struct{} `type:"structure"` - - // The number of Lambda functions. - FunctionCount *int64 `type:"long"` - - // The amount of storage space, in bytes, in use by deployment packages and - // layer archives. - TotalCodeSize *int64 `type:"long"` -} - -// String returns the string representation -func (s AccountUsage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountUsage) GoString() string { - return s.String() -} - -// SetFunctionCount sets the FunctionCount field's value. -func (s *AccountUsage) SetFunctionCount(v int64) *AccountUsage { - s.FunctionCount = &v - return s -} - -// SetTotalCodeSize sets the TotalCodeSize field's value. -func (s *AccountUsage) SetTotalCodeSize(v int64) *AccountUsage { - s.TotalCodeSize = &v - return s -} - -type AddLayerVersionPermissionInput struct { - _ struct{} `type:"structure"` - - // The API action that grants access to the layer. For example, lambda:GetLayerVersion. - // - // Action is a required field - Action *string `type:"string" required:"true"` - - // The name or Amazon Resource Name (ARN) of the layer. - // - // LayerName is a required field - LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` - - // With the principal set to *, grant permission to all accounts in the specified - // organization. - OrganizationId *string `type:"string"` - - // An account ID, or * to grant permission to all AWS accounts. - // - // Principal is a required field - Principal *string `type:"string" required:"true"` - - // Only update the policy if the revision ID matches the ID specified. Use this - // option to avoid modifying a policy that has changed since you last read it. - RevisionId *string `location:"querystring" locationName:"RevisionId" type:"string"` - - // An identifier that distinguishes the policy from others on the same layer - // version. - // - // StatementId is a required field - StatementId *string `min:"1" type:"string" required:"true"` - - // The version number. - // - // VersionNumber is a required field - VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"` -} - -// String returns the string representation -func (s AddLayerVersionPermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddLayerVersionPermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddLayerVersionPermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddLayerVersionPermissionInput"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.LayerName == nil { - invalidParams.Add(request.NewErrParamRequired("LayerName")) - } - if s.LayerName != nil && len(*s.LayerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LayerName", 1)) - } - if s.Principal == nil { - invalidParams.Add(request.NewErrParamRequired("Principal")) - } - if s.StatementId == nil { - invalidParams.Add(request.NewErrParamRequired("StatementId")) - } - if s.StatementId != nil && len(*s.StatementId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) - } - if s.VersionNumber == nil { - invalidParams.Add(request.NewErrParamRequired("VersionNumber")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *AddLayerVersionPermissionInput) SetAction(v string) *AddLayerVersionPermissionInput { - s.Action = &v - return s -} - -// SetLayerName sets the LayerName field's value. -func (s *AddLayerVersionPermissionInput) SetLayerName(v string) *AddLayerVersionPermissionInput { - s.LayerName = &v - return s -} - -// SetOrganizationId sets the OrganizationId field's value. -func (s *AddLayerVersionPermissionInput) SetOrganizationId(v string) *AddLayerVersionPermissionInput { - s.OrganizationId = &v - return s -} - -// SetPrincipal sets the Principal field's value. -func (s *AddLayerVersionPermissionInput) SetPrincipal(v string) *AddLayerVersionPermissionInput { - s.Principal = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *AddLayerVersionPermissionInput) SetRevisionId(v string) *AddLayerVersionPermissionInput { - s.RevisionId = &v - return s -} - -// SetStatementId sets the StatementId field's value. -func (s *AddLayerVersionPermissionInput) SetStatementId(v string) *AddLayerVersionPermissionInput { - s.StatementId = &v - return s -} - -// SetVersionNumber sets the VersionNumber field's value. -func (s *AddLayerVersionPermissionInput) SetVersionNumber(v int64) *AddLayerVersionPermissionInput { - s.VersionNumber = &v - return s -} - -type AddLayerVersionPermissionOutput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the current revision of the policy. - RevisionId *string `type:"string"` - - // The permission statement. - Statement *string `type:"string"` -} - -// String returns the string representation -func (s AddLayerVersionPermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddLayerVersionPermissionOutput) GoString() string { - return s.String() -} - -// SetRevisionId sets the RevisionId field's value. -func (s *AddLayerVersionPermissionOutput) SetRevisionId(v string) *AddLayerVersionPermissionOutput { - s.RevisionId = &v - return s -} - -// SetStatement sets the Statement field's value. -func (s *AddLayerVersionPermissionOutput) SetStatement(v string) *AddLayerVersionPermissionOutput { - s.Statement = &v - return s -} - -type AddPermissionInput struct { - _ struct{} `type:"structure"` - - // The action that the principal can use on the function. For example, lambda:InvokeFunction - // or lambda:GetFunction. - // - // Action is a required field - Action *string `type:"string" required:"true"` - - // For Alexa Smart Home functions, a token that must be supplied by the invoker. - EventSourceToken *string `type:"string"` - - // The name of the Lambda function, version, or alias. - // - // Name formats - // - // * Function name - my-function (name-only), my-function:v1 (with alias). - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. - // - // * Partial ARN - 123456789012:function:my-function. - // - // You can append a version number or alias to any of the formats. The length - // constraint applies only to the full ARN. If you specify only the function - // name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // The AWS service or account that invokes the function. If you specify a service, - // use SourceArn or SourceAccount to limit who can invoke the function through - // that service. - // - // Principal is a required field - Principal *string `type:"string" required:"true"` - - // Specify a version or alias to add permissions to a published version of the - // function. - Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` - - // Only update the policy if the revision ID matches the ID specified. Use this - // option to avoid modifying a policy that has changed since you last read it. - RevisionId *string `type:"string"` - - // For AWS services, the ID of the account that owns the resource. Use instead - // of SourceArn to grant permission to resources owned by another account (e.g. - // all of an account's Amazon S3 buckets). Or use together with SourceArn to - // ensure that the resource is owned by the specified account. For example, - // an Amazon S3 bucket could be deleted by its owner and recreated by another - // account. - SourceAccount *string `type:"string"` - - // For AWS services, the ARN of the AWS resource that invokes the function. - // For example, an Amazon S3 bucket or Amazon SNS topic. - SourceArn *string `type:"string"` - - // A statement identifier that differentiates the statement from others in the - // same policy. - // - // StatementId is a required field - StatementId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AddPermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddPermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddPermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddPermissionInput"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.Principal == nil { - invalidParams.Add(request.NewErrParamRequired("Principal")) - } - if s.Qualifier != nil && len(*s.Qualifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) - } - if s.StatementId == nil { - invalidParams.Add(request.NewErrParamRequired("StatementId")) - } - if s.StatementId != nil && len(*s.StatementId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *AddPermissionInput) SetAction(v string) *AddPermissionInput { - s.Action = &v - return s -} - -// SetEventSourceToken sets the EventSourceToken field's value. -func (s *AddPermissionInput) SetEventSourceToken(v string) *AddPermissionInput { - s.EventSourceToken = &v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *AddPermissionInput) SetFunctionName(v string) *AddPermissionInput { - s.FunctionName = &v - return s -} - -// SetPrincipal sets the Principal field's value. -func (s *AddPermissionInput) SetPrincipal(v string) *AddPermissionInput { - s.Principal = &v - return s -} - -// SetQualifier sets the Qualifier field's value. -func (s *AddPermissionInput) SetQualifier(v string) *AddPermissionInput { - s.Qualifier = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *AddPermissionInput) SetRevisionId(v string) *AddPermissionInput { - s.RevisionId = &v - return s -} - -// SetSourceAccount sets the SourceAccount field's value. -func (s *AddPermissionInput) SetSourceAccount(v string) *AddPermissionInput { - s.SourceAccount = &v - return s -} - -// SetSourceArn sets the SourceArn field's value. -func (s *AddPermissionInput) SetSourceArn(v string) *AddPermissionInput { - s.SourceArn = &v - return s -} - -// SetStatementId sets the StatementId field's value. -func (s *AddPermissionInput) SetStatementId(v string) *AddPermissionInput { - s.StatementId = &v - return s -} - -type AddPermissionOutput struct { - _ struct{} `type:"structure"` - - // The permission statement added to the function policy. - Statement *string `type:"string"` -} - -// String returns the string representation -func (s AddPermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddPermissionOutput) GoString() string { - return s.String() -} - -// SetStatement sets the Statement field's value. -func (s *AddPermissionOutput) SetStatement(v string) *AddPermissionOutput { - s.Statement = &v - return s -} - -// Provides configuration information about a Lambda function alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -type AliasConfiguration struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the alias. - AliasArn *string `type:"string"` - - // A description of the alias. - Description *string `type:"string"` - - // The function version that the alias invokes. - FunctionVersion *string `min:"1" type:"string"` - - // The name of the alias. - Name *string `min:"1" type:"string"` - - // A unique identifier that changes when you update the alias. - RevisionId *string `type:"string"` - - // The routing configuration (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) - // of the alias. - RoutingConfig *AliasRoutingConfiguration `type:"structure"` -} - -// String returns the string representation -func (s AliasConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AliasConfiguration) GoString() string { - return s.String() -} - -// SetAliasArn sets the AliasArn field's value. -func (s *AliasConfiguration) SetAliasArn(v string) *AliasConfiguration { - s.AliasArn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *AliasConfiguration) SetDescription(v string) *AliasConfiguration { - s.Description = &v - return s -} - -// SetFunctionVersion sets the FunctionVersion field's value. -func (s *AliasConfiguration) SetFunctionVersion(v string) *AliasConfiguration { - s.FunctionVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *AliasConfiguration) SetName(v string) *AliasConfiguration { - s.Name = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *AliasConfiguration) SetRevisionId(v string) *AliasConfiguration { - s.RevisionId = &v - return s -} - -// SetRoutingConfig sets the RoutingConfig field's value. -func (s *AliasConfiguration) SetRoutingConfig(v *AliasRoutingConfiguration) *AliasConfiguration { - s.RoutingConfig = v - return s -} - -// A Lambda function alias's traffic shifting (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) -// configuration. -type AliasRoutingConfiguration struct { - _ struct{} `type:"structure"` - - // The name of the second alias, and the percentage of traffic that is routed - // to it. - AdditionalVersionWeights map[string]*float64 `type:"map"` -} - -// String returns the string representation -func (s AliasRoutingConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AliasRoutingConfiguration) GoString() string { - return s.String() -} - -// SetAdditionalVersionWeights sets the AdditionalVersionWeights field's value. -func (s *AliasRoutingConfiguration) SetAdditionalVersionWeights(v map[string]*float64) *AliasRoutingConfiguration { - s.AdditionalVersionWeights = v - return s -} - -type CreateAliasInput struct { - _ struct{} `type:"structure"` - - // A description of the alias. - Description *string `type:"string"` - - // The name of the lambda function. - // - // Name formats - // - // * Function name - MyFunction. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. - // - // * Partial ARN - 123456789012:function:MyFunction. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // The function version that the alias invokes. - // - // FunctionVersion is a required field - FunctionVersion *string `min:"1" type:"string" required:"true"` - - // The name of the alias. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The routing configuration (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) - // of the alias. - RoutingConfig *AliasRoutingConfiguration `type:"structure"` -} - -// String returns the string representation -func (s CreateAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.FunctionVersion == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionVersion")) - } - if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateAliasInput) SetDescription(v string) *CreateAliasInput { - s.Description = &v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *CreateAliasInput) SetFunctionName(v string) *CreateAliasInput { - s.FunctionName = &v - return s -} - -// SetFunctionVersion sets the FunctionVersion field's value. -func (s *CreateAliasInput) SetFunctionVersion(v string) *CreateAliasInput { - s.FunctionVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateAliasInput) SetName(v string) *CreateAliasInput { - s.Name = &v - return s -} - -// SetRoutingConfig sets the RoutingConfig field's value. -func (s *CreateAliasInput) SetRoutingConfig(v *AliasRoutingConfiguration) *CreateAliasInput { - s.RoutingConfig = v - return s -} - -type CreateEventSourceMappingInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to retrieve in a single batch. - // - // * Amazon Kinesis - Default 100. Max 10,000. - // - // * Amazon DynamoDB Streams - Default 100. Max 1,000. - // - // * Amazon Simple Queue Service - Default 10. Max 10. - BatchSize *int64 `min:"1" type:"integer"` - - // Disables the event source mapping to pause polling and invocation. - Enabled *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the event source. - // - // * Amazon Kinesis - The ARN of the data stream or a stream consumer. - // - // * Amazon DynamoDB Streams - The ARN of the stream. - // - // * Amazon Simple Queue Service - The ARN of the queue. - // - // EventSourceArn is a required field - EventSourceArn *string `type:"string" required:"true"` - - // The name of the Lambda function. - // - // Name formats - // - // * Function name - MyFunction. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. - // - // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD. - // - // * Partial ARN - 123456789012:function:MyFunction. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it's limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `min:"1" type:"string" required:"true"` - - // The position in a stream from which to start reading. Required for Amazon - // Kinesis and Amazon DynamoDB Streams sources. AT_TIMESTAMP is only supported - // for Amazon Kinesis streams. - StartingPosition *string `type:"string" enum:"EventSourcePosition"` - - // With StartingPosition set to AT_TIMESTAMP, the time from which to start reading. - StartingPositionTimestamp *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s CreateEventSourceMappingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEventSourceMappingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateEventSourceMappingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateEventSourceMappingInput"} - if s.BatchSize != nil && *s.BatchSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("BatchSize", 1)) - } - if s.EventSourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("EventSourceArn")) - } - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBatchSize sets the BatchSize field's value. -func (s *CreateEventSourceMappingInput) SetBatchSize(v int64) *CreateEventSourceMappingInput { - s.BatchSize = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *CreateEventSourceMappingInput) SetEnabled(v bool) *CreateEventSourceMappingInput { - s.Enabled = &v - return s -} - -// SetEventSourceArn sets the EventSourceArn field's value. -func (s *CreateEventSourceMappingInput) SetEventSourceArn(v string) *CreateEventSourceMappingInput { - s.EventSourceArn = &v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *CreateEventSourceMappingInput) SetFunctionName(v string) *CreateEventSourceMappingInput { - s.FunctionName = &v - return s -} - -// SetStartingPosition sets the StartingPosition field's value. -func (s *CreateEventSourceMappingInput) SetStartingPosition(v string) *CreateEventSourceMappingInput { - s.StartingPosition = &v - return s -} - -// SetStartingPositionTimestamp sets the StartingPositionTimestamp field's value. -func (s *CreateEventSourceMappingInput) SetStartingPositionTimestamp(v time.Time) *CreateEventSourceMappingInput { - s.StartingPositionTimestamp = &v - return s -} - -type CreateFunctionInput struct { - _ struct{} `type:"structure"` - - // The code for the function. - // - // Code is a required field - Code *FunctionCode `type:"structure" required:"true"` - - // A dead letter queue configuration that specifies the queue or topic where - // Lambda sends asynchronous events when they fail processing. For more information, - // see Dead Letter Queues (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html). - DeadLetterConfig *DeadLetterConfig `type:"structure"` - - // A description of the function. - Description *string `type:"string"` - - // Environment variables that are accessible from function code during execution. - Environment *Environment `type:"structure"` - - // The name of the Lambda function. - // - // Name formats - // - // * Function name - my-function. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. - // - // * Partial ARN - 123456789012:function:my-function. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `min:"1" type:"string" required:"true"` - - // The name of the method within your code that Lambda calls to execute your - // function. The format includes the filename and can also include namespaces - // and other qualifiers, depending on the runtime. For more information, see - // Programming Model (http://docs.aws.amazon.com/lambda/latest/dg/programming-model-v2.html). - // - // Handler is a required field - Handler *string `type:"string" required:"true"` - - // The ARN of the AWS Key Management Service key used to encrypt your function's - // environment variables. If not provided, AWS Lambda uses a default service - // key. - KMSKeyArn *string `type:"string"` - - // A list of function layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) - // to add to the function's execution environment. Specify each layer by ARN, - // including the version. - Layers []*string `type:"list"` - - // The amount of memory that your function has access to. Increasing the function's - // memory also increases it's CPU allocation. The default value is 128 MB. The - // value must be a multiple of 64 MB. - MemorySize *int64 `min:"128" type:"integer"` - - // Set to true to publish the first version of the function during creation. - Publish *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the function's execution role. - // - // Role is a required field - Role *string `type:"string" required:"true"` - - // The identifier of the function's runtime (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html). - // - // Runtime is a required field - Runtime *string `type:"string" required:"true" enum:"Runtime"` - - // A list of tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) - // to apply to the function. - Tags map[string]*string `type:"map"` - - // The amount of time that Lambda allows a function to run before terminating - // it. The default is 3 seconds. The maximum allowed value is 900 seconds. - Timeout *int64 `min:"1" type:"integer"` - - // Set Mode to Active to sample and trace a subset of incoming requests with - // AWS X-Ray. - TracingConfig *TracingConfig `type:"structure"` - - // For network connectivity to AWS resources in a VPC, specify a list of security - // groups and subnets in the VPC. When you connect a function to a VPC, it can - // only access resources and the internet through that VPC. For more information, - // see VPC Settings (http://docs.aws.amazon.com/lambda/latest/dg/vpc.html). - VpcConfig *VpcConfig `type:"structure"` -} - -// String returns the string representation -func (s CreateFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFunctionInput"} - if s.Code == nil { - invalidParams.Add(request.NewErrParamRequired("Code")) - } - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.Handler == nil { - invalidParams.Add(request.NewErrParamRequired("Handler")) - } - if s.MemorySize != nil && *s.MemorySize < 128 { - invalidParams.Add(request.NewErrParamMinValue("MemorySize", 128)) - } - if s.Role == nil { - invalidParams.Add(request.NewErrParamRequired("Role")) - } - if s.Runtime == nil { - invalidParams.Add(request.NewErrParamRequired("Runtime")) - } - if s.Timeout != nil && *s.Timeout < 1 { - invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) - } - if s.Code != nil { - if err := s.Code.Validate(); err != nil { - invalidParams.AddNested("Code", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCode sets the Code field's value. -func (s *CreateFunctionInput) SetCode(v *FunctionCode) *CreateFunctionInput { - s.Code = v - return s -} - -// SetDeadLetterConfig sets the DeadLetterConfig field's value. -func (s *CreateFunctionInput) SetDeadLetterConfig(v *DeadLetterConfig) *CreateFunctionInput { - s.DeadLetterConfig = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateFunctionInput) SetDescription(v string) *CreateFunctionInput { - s.Description = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *CreateFunctionInput) SetEnvironment(v *Environment) *CreateFunctionInput { - s.Environment = v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *CreateFunctionInput) SetFunctionName(v string) *CreateFunctionInput { - s.FunctionName = &v - return s -} - -// SetHandler sets the Handler field's value. -func (s *CreateFunctionInput) SetHandler(v string) *CreateFunctionInput { - s.Handler = &v - return s -} - -// SetKMSKeyArn sets the KMSKeyArn field's value. -func (s *CreateFunctionInput) SetKMSKeyArn(v string) *CreateFunctionInput { - s.KMSKeyArn = &v - return s -} - -// SetLayers sets the Layers field's value. -func (s *CreateFunctionInput) SetLayers(v []*string) *CreateFunctionInput { - s.Layers = v - return s -} - -// SetMemorySize sets the MemorySize field's value. -func (s *CreateFunctionInput) SetMemorySize(v int64) *CreateFunctionInput { - s.MemorySize = &v - return s -} - -// SetPublish sets the Publish field's value. -func (s *CreateFunctionInput) SetPublish(v bool) *CreateFunctionInput { - s.Publish = &v - return s -} - -// SetRole sets the Role field's value. -func (s *CreateFunctionInput) SetRole(v string) *CreateFunctionInput { - s.Role = &v - return s -} - -// SetRuntime sets the Runtime field's value. -func (s *CreateFunctionInput) SetRuntime(v string) *CreateFunctionInput { - s.Runtime = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateFunctionInput) SetTags(v map[string]*string) *CreateFunctionInput { - s.Tags = v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *CreateFunctionInput) SetTimeout(v int64) *CreateFunctionInput { - s.Timeout = &v - return s -} - -// SetTracingConfig sets the TracingConfig field's value. -func (s *CreateFunctionInput) SetTracingConfig(v *TracingConfig) *CreateFunctionInput { - s.TracingConfig = v - return s -} - -// SetVpcConfig sets the VpcConfig field's value. -func (s *CreateFunctionInput) SetVpcConfig(v *VpcConfig) *CreateFunctionInput { - s.VpcConfig = v - return s -} - -// The dead letter queue (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html) -// for failed asynchronous invocations. -type DeadLetterConfig struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic. - TargetArn *string `type:"string"` -} - -// String returns the string representation -func (s DeadLetterConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeadLetterConfig) GoString() string { - return s.String() -} - -// SetTargetArn sets the TargetArn field's value. -func (s *DeadLetterConfig) SetTargetArn(v string) *DeadLetterConfig { - s.TargetArn = &v - return s -} - -type DeleteAliasInput struct { - _ struct{} `type:"structure"` - - // The name of the lambda function. - // - // Name formats - // - // * Function name - MyFunction. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. - // - // * Partial ARN - 123456789012:function:MyFunction. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // The name of the alias. - // - // Name is a required field - Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAliasInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionName sets the FunctionName field's value. -func (s *DeleteAliasInput) SetFunctionName(v string) *DeleteAliasInput { - s.FunctionName = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteAliasInput) SetName(v string) *DeleteAliasInput { - s.Name = &v - return s -} - -type DeleteAliasOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAliasOutput) GoString() string { - return s.String() -} - -type DeleteEventSourceMappingInput struct { - _ struct{} `type:"structure"` - - // The identifier of the event source mapping. - // - // UUID is a required field - UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEventSourceMappingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEventSourceMappingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEventSourceMappingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEventSourceMappingInput"} - if s.UUID == nil { - invalidParams.Add(request.NewErrParamRequired("UUID")) - } - if s.UUID != nil && len(*s.UUID) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UUID", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUUID sets the UUID field's value. -func (s *DeleteEventSourceMappingInput) SetUUID(v string) *DeleteEventSourceMappingInput { - s.UUID = &v - return s -} - -type DeleteFunctionConcurrencyInput struct { - _ struct{} `type:"structure"` - - // The name of the Lambda function. - // - // Name formats - // - // * Function name - my-function. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. - // - // * Partial ARN - 123456789012:function:my-function. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteFunctionConcurrencyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFunctionConcurrencyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFunctionConcurrencyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFunctionConcurrencyInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionName sets the FunctionName field's value. -func (s *DeleteFunctionConcurrencyInput) SetFunctionName(v string) *DeleteFunctionConcurrencyInput { - s.FunctionName = &v - return s -} - -type DeleteFunctionConcurrencyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteFunctionConcurrencyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFunctionConcurrencyOutput) GoString() string { - return s.String() -} - -type DeleteFunctionInput struct { - _ struct{} `type:"structure"` - - // The name of the Lambda function or version. - // - // Name formats - // - // * Function name - my-function (name-only), my-function:1 (with version). - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. - // - // * Partial ARN - 123456789012:function:my-function. - // - // You can append a version number or alias to any of the formats. The length - // constraint applies only to the full ARN. If you specify only the function - // name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // Specify a version to delete. You cannot delete a version that is referenced - // by an alias. - Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFunctionInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.Qualifier != nil && len(*s.Qualifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionName sets the FunctionName field's value. -func (s *DeleteFunctionInput) SetFunctionName(v string) *DeleteFunctionInput { - s.FunctionName = &v - return s -} - -// SetQualifier sets the Qualifier field's value. -func (s *DeleteFunctionInput) SetQualifier(v string) *DeleteFunctionInput { - s.Qualifier = &v - return s -} - -type DeleteFunctionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFunctionOutput) GoString() string { - return s.String() -} - -type DeleteLayerVersionInput struct { - _ struct{} `type:"structure"` - - // The name or Amazon Resource Name (ARN) of the layer. - // - // LayerName is a required field - LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` - - // The version number. - // - // VersionNumber is a required field - VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"` -} - -// String returns the string representation -func (s DeleteLayerVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLayerVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLayerVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLayerVersionInput"} - if s.LayerName == nil { - invalidParams.Add(request.NewErrParamRequired("LayerName")) - } - if s.LayerName != nil && len(*s.LayerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LayerName", 1)) - } - if s.VersionNumber == nil { - invalidParams.Add(request.NewErrParamRequired("VersionNumber")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLayerName sets the LayerName field's value. -func (s *DeleteLayerVersionInput) SetLayerName(v string) *DeleteLayerVersionInput { - s.LayerName = &v - return s -} - -// SetVersionNumber sets the VersionNumber field's value. -func (s *DeleteLayerVersionInput) SetVersionNumber(v int64) *DeleteLayerVersionInput { - s.VersionNumber = &v - return s -} - -type DeleteLayerVersionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLayerVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLayerVersionOutput) GoString() string { - return s.String() -} - -// A function's environment variable settings. -type Environment struct { - _ struct{} `type:"structure"` - - // Environment variable key-value pairs. - Variables map[string]*string `type:"map" sensitive:"true"` -} - -// String returns the string representation -func (s Environment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Environment) GoString() string { - return s.String() -} - -// SetVariables sets the Variables field's value. -func (s *Environment) SetVariables(v map[string]*string) *Environment { - s.Variables = v - return s -} - -// Error messages for environment variables that could not be applied. -type EnvironmentError struct { - _ struct{} `type:"structure"` - - // The error code. - ErrorCode *string `type:"string"` - - // The error message. - Message *string `type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s EnvironmentError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentError) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *EnvironmentError) SetErrorCode(v string) *EnvironmentError { - s.ErrorCode = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *EnvironmentError) SetMessage(v string) *EnvironmentError { - s.Message = &v - return s -} - -// The results of a configuration update that applied environment variables. -type EnvironmentResponse struct { - _ struct{} `type:"structure"` - - // Error messages for environment variables that could not be applied. - Error *EnvironmentError `type:"structure"` - - // Environment variable key-value pairs. - Variables map[string]*string `type:"map" sensitive:"true"` -} - -// String returns the string representation -func (s EnvironmentResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentResponse) GoString() string { - return s.String() -} - -// SetError sets the Error field's value. -func (s *EnvironmentResponse) SetError(v *EnvironmentError) *EnvironmentResponse { - s.Error = v - return s -} - -// SetVariables sets the Variables field's value. -func (s *EnvironmentResponse) SetVariables(v map[string]*string) *EnvironmentResponse { - s.Variables = v - return s -} - -// A mapping between an AWS resource and an AWS Lambda function. See CreateEventSourceMapping -// for details. -type EventSourceMappingConfiguration struct { - _ struct{} `type:"structure"` - - // The maximum number of items to retrieve in a single batch. - BatchSize *int64 `min:"1" type:"integer"` - - // The Amazon Resource Name (ARN) of the event source. - EventSourceArn *string `type:"string"` - - // The ARN of the Lambda function. - FunctionArn *string `type:"string"` - - // The date that the event source mapping was last updated. - LastModified *time.Time `type:"timestamp"` - - // The result of the last AWS Lambda invocation of your Lambda function. - LastProcessingResult *string `type:"string"` - - // The state of the event source mapping. It can be one of the following: Creating, - // Enabling, Enabled, Disabling, Disabled, Updating, or Deleting. - State *string `type:"string"` - - // The cause of the last state change, either User initiated or Lambda initiated. - StateTransitionReason *string `type:"string"` - - // The identifier of the event source mapping. - UUID *string `type:"string"` -} - -// String returns the string representation -func (s EventSourceMappingConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventSourceMappingConfiguration) GoString() string { - return s.String() -} - -// SetBatchSize sets the BatchSize field's value. -func (s *EventSourceMappingConfiguration) SetBatchSize(v int64) *EventSourceMappingConfiguration { - s.BatchSize = &v - return s -} - -// SetEventSourceArn sets the EventSourceArn field's value. -func (s *EventSourceMappingConfiguration) SetEventSourceArn(v string) *EventSourceMappingConfiguration { - s.EventSourceArn = &v - return s -} - -// SetFunctionArn sets the FunctionArn field's value. -func (s *EventSourceMappingConfiguration) SetFunctionArn(v string) *EventSourceMappingConfiguration { - s.FunctionArn = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *EventSourceMappingConfiguration) SetLastModified(v time.Time) *EventSourceMappingConfiguration { - s.LastModified = &v - return s -} - -// SetLastProcessingResult sets the LastProcessingResult field's value. -func (s *EventSourceMappingConfiguration) SetLastProcessingResult(v string) *EventSourceMappingConfiguration { - s.LastProcessingResult = &v - return s -} - -// SetState sets the State field's value. -func (s *EventSourceMappingConfiguration) SetState(v string) *EventSourceMappingConfiguration { - s.State = &v - return s -} - -// SetStateTransitionReason sets the StateTransitionReason field's value. -func (s *EventSourceMappingConfiguration) SetStateTransitionReason(v string) *EventSourceMappingConfiguration { - s.StateTransitionReason = &v - return s -} - -// SetUUID sets the UUID field's value. -func (s *EventSourceMappingConfiguration) SetUUID(v string) *EventSourceMappingConfiguration { - s.UUID = &v - return s -} - -// The code for the Lambda function. You can specify either an object in Amazon -// S3, or upload a deployment package directly. -type FunctionCode struct { - _ struct{} `type:"structure"` - - // An Amazon S3 bucket in the same region as your function. The bucket can be - // in a different AWS account. - S3Bucket *string `min:"3" type:"string"` - - // The Amazon S3 key of the deployment package. - S3Key *string `min:"1" type:"string"` - - // For versioned objects, the version of the deployment package object to use. - S3ObjectVersion *string `min:"1" type:"string"` - - // The base64-encoded contents of the deployment package. AWS SDK and AWS CLI - // clients handle the encoding for you. - // - // ZipFile is automatically base64 encoded/decoded by the SDK. - ZipFile []byte `type:"blob" sensitive:"true"` -} - -// String returns the string representation -func (s FunctionCode) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FunctionCode) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FunctionCode) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FunctionCode"} - if s.S3Bucket != nil && len(*s.S3Bucket) < 3 { - invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3)) - } - if s.S3Key != nil && len(*s.S3Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("S3Key", 1)) - } - if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *FunctionCode) SetS3Bucket(v string) *FunctionCode { - s.S3Bucket = &v - return s -} - -// SetS3Key sets the S3Key field's value. -func (s *FunctionCode) SetS3Key(v string) *FunctionCode { - s.S3Key = &v - return s -} - -// SetS3ObjectVersion sets the S3ObjectVersion field's value. -func (s *FunctionCode) SetS3ObjectVersion(v string) *FunctionCode { - s.S3ObjectVersion = &v - return s -} - -// SetZipFile sets the ZipFile field's value. -func (s *FunctionCode) SetZipFile(v []byte) *FunctionCode { - s.ZipFile = v - return s -} - -// Details about a function's deployment package. -type FunctionCodeLocation struct { - _ struct{} `type:"structure"` - - // A pre-signed URL that you can use to download the deployment package. - Location *string `type:"string"` - - // The service hosting the file. - RepositoryType *string `type:"string"` -} - -// String returns the string representation -func (s FunctionCodeLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FunctionCodeLocation) GoString() string { - return s.String() -} - -// SetLocation sets the Location field's value. -func (s *FunctionCodeLocation) SetLocation(v string) *FunctionCodeLocation { - s.Location = &v - return s -} - -// SetRepositoryType sets the RepositoryType field's value. -func (s *FunctionCodeLocation) SetRepositoryType(v string) *FunctionCodeLocation { - s.RepositoryType = &v - return s -} - -// Details about a function's configuration. -type FunctionConfiguration struct { - _ struct{} `type:"structure"` - - // The SHA256 hash of the function's deployment package. - CodeSha256 *string `type:"string"` - - // The size of the function's deployment package in bytes. - CodeSize *int64 `type:"long"` - - // The function's dead letter queue. - DeadLetterConfig *DeadLetterConfig `type:"structure"` - - // The function's description. - Description *string `type:"string"` - - // The function's environment variables. - Environment *EnvironmentResponse `type:"structure"` - - // The function's Amazon Resource Name (ARN). - FunctionArn *string `type:"string"` - - // The name of the function. - FunctionName *string `min:"1" type:"string"` - - // The function Lambda calls to begin executing your function. - Handler *string `type:"string"` - - // The KMS key used to encrypt the function's environment variables. Only returned - // if you've configured a customer managed CMK. - KMSKeyArn *string `type:"string"` - - // The date and time that the function was last updated, in ISO-8601 format - // (https://www.w3.org/TR/NOTE-datetime) (YYYY-MM-DDThh:mm:ss.sTZD). - LastModified *string `type:"string"` - - // The function's layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) - Layers []*Layer `type:"list"` - - // For Lambda@Edge functions, the ARN of the master function. - MasterArn *string `type:"string"` - - // The memory allocated to the function - MemorySize *int64 `min:"128" type:"integer"` - - // Represents the latest updated revision of the function or alias. - RevisionId *string `type:"string"` - - // The function's execution role. - Role *string `type:"string"` - - // The runtime environment for the Lambda function. - Runtime *string `type:"string" enum:"Runtime"` - - // The amount of time that Lambda allows a function to run before terminating - // it. - Timeout *int64 `min:"1" type:"integer"` - - // The function's AWS X-Ray tracing configuration. - TracingConfig *TracingConfigResponse `type:"structure"` - - // The version of the Lambda function. - Version *string `min:"1" type:"string"` - - // The function's networking configuration. - VpcConfig *VpcConfigResponse `type:"structure"` -} - -// 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() -} - -// SetCodeSha256 sets the CodeSha256 field's value. -func (s *FunctionConfiguration) SetCodeSha256(v string) *FunctionConfiguration { - s.CodeSha256 = &v - return s -} - -// SetCodeSize sets the CodeSize field's value. -func (s *FunctionConfiguration) SetCodeSize(v int64) *FunctionConfiguration { - s.CodeSize = &v - return s -} - -// SetDeadLetterConfig sets the DeadLetterConfig field's value. -func (s *FunctionConfiguration) SetDeadLetterConfig(v *DeadLetterConfig) *FunctionConfiguration { - s.DeadLetterConfig = v - return s -} - -// SetDescription sets the Description field's value. -func (s *FunctionConfiguration) SetDescription(v string) *FunctionConfiguration { - s.Description = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *FunctionConfiguration) SetEnvironment(v *EnvironmentResponse) *FunctionConfiguration { - s.Environment = v - return s -} - -// SetFunctionArn sets the FunctionArn field's value. -func (s *FunctionConfiguration) SetFunctionArn(v string) *FunctionConfiguration { - s.FunctionArn = &v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *FunctionConfiguration) SetFunctionName(v string) *FunctionConfiguration { - s.FunctionName = &v - return s -} - -// SetHandler sets the Handler field's value. -func (s *FunctionConfiguration) SetHandler(v string) *FunctionConfiguration { - s.Handler = &v - return s -} - -// SetKMSKeyArn sets the KMSKeyArn field's value. -func (s *FunctionConfiguration) SetKMSKeyArn(v string) *FunctionConfiguration { - s.KMSKeyArn = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *FunctionConfiguration) SetLastModified(v string) *FunctionConfiguration { - s.LastModified = &v - return s -} - -// SetLayers sets the Layers field's value. -func (s *FunctionConfiguration) SetLayers(v []*Layer) *FunctionConfiguration { - s.Layers = v - return s -} - -// SetMasterArn sets the MasterArn field's value. -func (s *FunctionConfiguration) SetMasterArn(v string) *FunctionConfiguration { - s.MasterArn = &v - return s -} - -// SetMemorySize sets the MemorySize field's value. -func (s *FunctionConfiguration) SetMemorySize(v int64) *FunctionConfiguration { - s.MemorySize = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *FunctionConfiguration) SetRevisionId(v string) *FunctionConfiguration { - s.RevisionId = &v - return s -} - -// SetRole sets the Role field's value. -func (s *FunctionConfiguration) SetRole(v string) *FunctionConfiguration { - s.Role = &v - return s -} - -// SetRuntime sets the Runtime field's value. -func (s *FunctionConfiguration) SetRuntime(v string) *FunctionConfiguration { - s.Runtime = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *FunctionConfiguration) SetTimeout(v int64) *FunctionConfiguration { - s.Timeout = &v - return s -} - -// SetTracingConfig sets the TracingConfig field's value. -func (s *FunctionConfiguration) SetTracingConfig(v *TracingConfigResponse) *FunctionConfiguration { - s.TracingConfig = v - return s -} - -// SetVersion sets the Version field's value. -func (s *FunctionConfiguration) SetVersion(v string) *FunctionConfiguration { - s.Version = &v - return s -} - -// SetVpcConfig sets the VpcConfig field's value. -func (s *FunctionConfiguration) SetVpcConfig(v *VpcConfigResponse) *FunctionConfiguration { - s.VpcConfig = v - return s -} - -type GetAccountSettingsInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetAccountSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAccountSettingsInput) GoString() string { - return s.String() -} - -type GetAccountSettingsOutput struct { - _ struct{} `type:"structure"` - - // Limits related to concurrency and code storage. - AccountLimit *AccountLimit `type:"structure"` - - // The number of functions and amount of storage in use. - AccountUsage *AccountUsage `type:"structure"` -} - -// String returns the string representation -func (s GetAccountSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAccountSettingsOutput) GoString() string { - return s.String() -} - -// SetAccountLimit sets the AccountLimit field's value. -func (s *GetAccountSettingsOutput) SetAccountLimit(v *AccountLimit) *GetAccountSettingsOutput { - s.AccountLimit = v - return s -} - -// SetAccountUsage sets the AccountUsage field's value. -func (s *GetAccountSettingsOutput) SetAccountUsage(v *AccountUsage) *GetAccountSettingsOutput { - s.AccountUsage = v - return s -} - -type GetAliasInput struct { - _ struct{} `type:"structure"` - - // The name of the lambda function. - // - // Name formats - // - // * Function name - MyFunction. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. - // - // * Partial ARN - 123456789012:function:MyFunction. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // The name of the alias. - // - // Name is a required field - Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAliasInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionName sets the FunctionName field's value. -func (s *GetAliasInput) SetFunctionName(v string) *GetAliasInput { - s.FunctionName = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetAliasInput) SetName(v string) *GetAliasInput { - s.Name = &v - return s -} - -type GetEventSourceMappingInput struct { - _ struct{} `type:"structure"` - - // The identifier of the event source mapping. - // - // UUID is a required field - UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetEventSourceMappingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEventSourceMappingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetEventSourceMappingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetEventSourceMappingInput"} - if s.UUID == nil { - invalidParams.Add(request.NewErrParamRequired("UUID")) - } - if s.UUID != nil && len(*s.UUID) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UUID", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUUID sets the UUID field's value. -func (s *GetEventSourceMappingInput) SetUUID(v string) *GetEventSourceMappingInput { - s.UUID = &v - return s -} - -type GetFunctionConfigurationInput struct { - _ struct{} `type:"structure"` - - // The name of the Lambda function, version, or alias. - // - // Name formats - // - // * Function name - my-function (name-only), my-function:v1 (with alias). - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. - // - // * Partial ARN - 123456789012:function:my-function. - // - // You can append a version number or alias to any of the formats. The length - // constraint applies only to the full ARN. If you specify only the function - // name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // Specify a version or alias to get details about a published version of the - // function. - Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetFunctionConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFunctionConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFunctionConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFunctionConfigurationInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.Qualifier != nil && len(*s.Qualifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionName sets the FunctionName field's value. -func (s *GetFunctionConfigurationInput) SetFunctionName(v string) *GetFunctionConfigurationInput { - s.FunctionName = &v - return s -} - -// SetQualifier sets the Qualifier field's value. -func (s *GetFunctionConfigurationInput) SetQualifier(v string) *GetFunctionConfigurationInput { - s.Qualifier = &v - return s -} - -type GetFunctionInput struct { - _ struct{} `type:"structure"` - - // The name of the Lambda function, version, or alias. - // - // Name formats - // - // * Function name - my-function (name-only), my-function:v1 (with alias). - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. - // - // * Partial ARN - 123456789012:function:my-function. - // - // You can append a version number or alias to any of the formats. The length - // constraint applies only to the full ARN. If you specify only the function - // name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // Specify a version or alias to get details about a published version of the - // function. - Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFunctionInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.Qualifier != nil && len(*s.Qualifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionName sets the FunctionName field's value. -func (s *GetFunctionInput) SetFunctionName(v string) *GetFunctionInput { - s.FunctionName = &v - return s -} - -// SetQualifier sets the Qualifier field's value. -func (s *GetFunctionInput) SetQualifier(v string) *GetFunctionInput { - s.Qualifier = &v - return s -} - -type GetFunctionOutput struct { - _ struct{} `type:"structure"` - - // The deployment package of the function or version. - Code *FunctionCodeLocation `type:"structure"` - - // The function's reserved concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). - Concurrency *PutFunctionConcurrencyOutput `type:"structure"` - - // The configuration of the function or version. - Configuration *FunctionConfiguration `type:"structure"` - - // The function's tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html). - Tags map[string]*string `type:"map"` -} - -// String returns the string representation -func (s GetFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFunctionOutput) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *GetFunctionOutput) SetCode(v *FunctionCodeLocation) *GetFunctionOutput { - s.Code = v - return s -} - -// SetConcurrency sets the Concurrency field's value. -func (s *GetFunctionOutput) SetConcurrency(v *PutFunctionConcurrencyOutput) *GetFunctionOutput { - s.Concurrency = v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *GetFunctionOutput) SetConfiguration(v *FunctionConfiguration) *GetFunctionOutput { - s.Configuration = v - return s -} - -// SetTags sets the Tags field's value. -func (s *GetFunctionOutput) SetTags(v map[string]*string) *GetFunctionOutput { - s.Tags = v - return s -} - -type GetLayerVersionInput struct { - _ struct{} `type:"structure"` - - // The name or Amazon Resource Name (ARN) of the layer. - // - // LayerName is a required field - LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` - - // The version number. - // - // VersionNumber is a required field - VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"` -} - -// String returns the string representation -func (s GetLayerVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLayerVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLayerVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLayerVersionInput"} - if s.LayerName == nil { - invalidParams.Add(request.NewErrParamRequired("LayerName")) - } - if s.LayerName != nil && len(*s.LayerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LayerName", 1)) - } - if s.VersionNumber == nil { - invalidParams.Add(request.NewErrParamRequired("VersionNumber")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLayerName sets the LayerName field's value. -func (s *GetLayerVersionInput) SetLayerName(v string) *GetLayerVersionInput { - s.LayerName = &v - return s -} - -// SetVersionNumber sets the VersionNumber field's value. -func (s *GetLayerVersionInput) SetVersionNumber(v int64) *GetLayerVersionInput { - s.VersionNumber = &v - return s -} - -type GetLayerVersionOutput struct { - _ struct{} `type:"structure"` - - // The layer's compatible runtimes. - CompatibleRuntimes []*string `type:"list"` - - // Details about the layer version. - Content *LayerVersionContentOutput `type:"structure"` - - // The date that the layer version was created, in ISO-8601 format (https://www.w3.org/TR/NOTE-datetime) - // (YYYY-MM-DDThh:mm:ss.sTZD). - CreatedDate *string `type:"string"` - - // The description of the version. - Description *string `type:"string"` - - // The ARN of the layer. - LayerArn *string `min:"1" type:"string"` - - // The ARN of the layer version. - LayerVersionArn *string `min:"1" type:"string"` - - // The layer's software license. - LicenseInfo *string `type:"string"` - - // The version number. - Version *int64 `type:"long"` -} - -// String returns the string representation -func (s GetLayerVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLayerVersionOutput) GoString() string { - return s.String() -} - -// SetCompatibleRuntimes sets the CompatibleRuntimes field's value. -func (s *GetLayerVersionOutput) SetCompatibleRuntimes(v []*string) *GetLayerVersionOutput { - s.CompatibleRuntimes = v - return s -} - -// SetContent sets the Content field's value. -func (s *GetLayerVersionOutput) SetContent(v *LayerVersionContentOutput) *GetLayerVersionOutput { - s.Content = v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *GetLayerVersionOutput) SetCreatedDate(v string) *GetLayerVersionOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetLayerVersionOutput) SetDescription(v string) *GetLayerVersionOutput { - s.Description = &v - return s -} - -// SetLayerArn sets the LayerArn field's value. -func (s *GetLayerVersionOutput) SetLayerArn(v string) *GetLayerVersionOutput { - s.LayerArn = &v - return s -} - -// SetLayerVersionArn sets the LayerVersionArn field's value. -func (s *GetLayerVersionOutput) SetLayerVersionArn(v string) *GetLayerVersionOutput { - s.LayerVersionArn = &v - return s -} - -// SetLicenseInfo sets the LicenseInfo field's value. -func (s *GetLayerVersionOutput) SetLicenseInfo(v string) *GetLayerVersionOutput { - s.LicenseInfo = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetLayerVersionOutput) SetVersion(v int64) *GetLayerVersionOutput { - s.Version = &v - return s -} - -type GetLayerVersionPolicyInput struct { - _ struct{} `type:"structure"` - - // The name or Amazon Resource Name (ARN) of the layer. - // - // LayerName is a required field - LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` - - // The version number. - // - // VersionNumber is a required field - VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"` -} - -// String returns the string representation -func (s GetLayerVersionPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLayerVersionPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLayerVersionPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLayerVersionPolicyInput"} - if s.LayerName == nil { - invalidParams.Add(request.NewErrParamRequired("LayerName")) - } - if s.LayerName != nil && len(*s.LayerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LayerName", 1)) - } - if s.VersionNumber == nil { - invalidParams.Add(request.NewErrParamRequired("VersionNumber")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLayerName sets the LayerName field's value. -func (s *GetLayerVersionPolicyInput) SetLayerName(v string) *GetLayerVersionPolicyInput { - s.LayerName = &v - return s -} - -// SetVersionNumber sets the VersionNumber field's value. -func (s *GetLayerVersionPolicyInput) SetVersionNumber(v int64) *GetLayerVersionPolicyInput { - s.VersionNumber = &v - return s -} - -type GetLayerVersionPolicyOutput struct { - _ struct{} `type:"structure"` - - // The policy document. - Policy *string `type:"string"` - - // A unique identifier for the current revision of the policy. - RevisionId *string `type:"string"` -} - -// String returns the string representation -func (s GetLayerVersionPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLayerVersionPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *GetLayerVersionPolicyOutput) SetPolicy(v string) *GetLayerVersionPolicyOutput { - s.Policy = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *GetLayerVersionPolicyOutput) SetRevisionId(v string) *GetLayerVersionPolicyOutput { - s.RevisionId = &v - return s -} - -type GetPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the Lambda function, version, or alias. - // - // Name formats - // - // * Function name - my-function (name-only), my-function:v1 (with alias). - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. - // - // * Partial ARN - 123456789012:function:my-function. - // - // You can append a version number or alias to any of the formats. The length - // constraint applies only to the full ARN. If you specify only the function - // name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // Specify a version or alias to get the policy for that resource. - Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.Qualifier != nil && len(*s.Qualifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionName sets the FunctionName field's value. -func (s *GetPolicyInput) SetFunctionName(v string) *GetPolicyInput { - s.FunctionName = &v - return s -} - -// SetQualifier sets the Qualifier field's value. -func (s *GetPolicyInput) SetQualifier(v string) *GetPolicyInput { - s.Qualifier = &v - return s -} - -type GetPolicyOutput struct { - _ struct{} `type:"structure"` - - // The resource-based policy. - Policy *string `type:"string"` - - // A unique identifier for the current revision of the policy. - RevisionId *string `type:"string"` -} - -// String returns the string representation -func (s GetPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *GetPolicyOutput) SetPolicy(v string) *GetPolicyOutput { - s.Policy = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *GetPolicyOutput) SetRevisionId(v string) *GetPolicyOutput { - s.RevisionId = &v - return s -} - -// Deprecated: InvokeAsyncInput has been deprecated -type InvokeAsyncInput struct { - _ struct{} `deprecated:"true" type:"structure" payload:"InvokeArgs"` - - // The name of the Lambda function. - // - // Name formats - // - // * Function name - my-function. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. - // - // * Partial ARN - 123456789012:function:my-function. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // JSON that you want to provide to your Lambda function as input. - // - // InvokeArgs is a required field - InvokeArgs io.ReadSeeker `type:"blob" required:"true"` -} - -// String returns the string representation -func (s InvokeAsyncInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InvokeAsyncInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InvokeAsyncInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InvokeAsyncInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.InvokeArgs == nil { - invalidParams.Add(request.NewErrParamRequired("InvokeArgs")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionName sets the FunctionName field's value. -func (s *InvokeAsyncInput) SetFunctionName(v string) *InvokeAsyncInput { - s.FunctionName = &v - return s -} - -// SetInvokeArgs sets the InvokeArgs field's value. -func (s *InvokeAsyncInput) SetInvokeArgs(v io.ReadSeeker) *InvokeAsyncInput { - s.InvokeArgs = v - return s -} - -// Upon success, it returns empty response. Otherwise, throws an exception. -// -// Deprecated: InvokeAsyncOutput has been deprecated -type InvokeAsyncOutput struct { - _ struct{} `deprecated:"true" type:"structure"` - - // It will be 202 upon success. - Status *int64 `location:"statusCode" type:"integer"` -} - -// String returns the string representation -func (s InvokeAsyncOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InvokeAsyncOutput) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *InvokeAsyncOutput) SetStatus(v int64) *InvokeAsyncOutput { - s.Status = &v - return s -} - -type InvokeInput struct { - _ struct{} `type:"structure" payload:"Payload"` - - // Up to 3583 bytes of base64-encoded data about the invoking client to pass - // to the function in the context object. - ClientContext *string `location:"header" locationName:"X-Amz-Client-Context" type:"string"` - - // The name of the Lambda function, version, or alias. - // - // Name formats - // - // * Function name - my-function (name-only), my-function:v1 (with alias). - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. - // - // * Partial ARN - 123456789012:function:my-function. - // - // You can append a version number or alias to any of the formats. The length - // constraint applies only to the full ARN. If you specify only the function - // name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // Choose from the following options. - // - // * RequestResponse (default) - Invoke the function synchronously. Keep - // the connection open until the function returns a response or times out. - // The API response includes the function response and additional data. - // - // * Event - Invoke the function asynchronously. Send events that fail multiple - // times to the function's dead-letter queue (if configured). The API response - // only includes a status code. - // - // * DryRun - Validate parameter values and verify that the user or role - // has permission to invoke the function. - InvocationType *string `location:"header" locationName:"X-Amz-Invocation-Type" type:"string" enum:"InvocationType"` - - // Set to Tail to include the execution log in the response. - LogType *string `location:"header" locationName:"X-Amz-Log-Type" type:"string" enum:"LogType"` - - // JSON that you want to provide to your Lambda function as input. - Payload []byte `type:"blob" sensitive:"true"` - - // Specify a version or alias to invoke a published version of the function. - Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` -} - -// String returns the string representation -func (s InvokeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InvokeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InvokeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InvokeInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.Qualifier != nil && len(*s.Qualifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientContext sets the ClientContext field's value. -func (s *InvokeInput) SetClientContext(v string) *InvokeInput { - s.ClientContext = &v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *InvokeInput) SetFunctionName(v string) *InvokeInput { - s.FunctionName = &v - return s -} - -// SetInvocationType sets the InvocationType field's value. -func (s *InvokeInput) SetInvocationType(v string) *InvokeInput { - s.InvocationType = &v - return s -} - -// SetLogType sets the LogType field's value. -func (s *InvokeInput) SetLogType(v string) *InvokeInput { - s.LogType = &v - return s -} - -// SetPayload sets the Payload field's value. -func (s *InvokeInput) SetPayload(v []byte) *InvokeInput { - s.Payload = v - return s -} - -// SetQualifier sets the Qualifier field's value. -func (s *InvokeInput) SetQualifier(v string) *InvokeInput { - s.Qualifier = &v - return s -} - -type InvokeOutput struct { - _ struct{} `type:"structure" payload:"Payload"` - - // The version of the function that executed. When you invoke a function with - // an alias, indicates which version the alias resolved to. - ExecutedVersion *string `location:"header" locationName:"X-Amz-Executed-Version" min:"1" type:"string"` - - // If present, indicates that an error occured during function execution. Details - // about the error are included in the response payload. - // - // * Handled - The runtime caught an error thrown by the function and formatted - // it into a JSON document. - // - // * Unhandled - The runtime did not handle the error. For example, the function - // ran out of memory or timed out. - FunctionError *string `location:"header" locationName:"X-Amz-Function-Error" type:"string"` - - // The last 4 KB of the execution log, base64 encoded. - LogResult *string `location:"header" locationName:"X-Amz-Log-Result" type:"string"` - - // The response from the function, or an error object. - Payload []byte `type:"blob" sensitive:"true"` - - // The HTTP status code will be in the 200 range for successful request. For - // the RequestResponse invocation type this status code will be 200. For the - // Event invocation type this status code will be 202. For the DryRun invocation - // type the status code will be 204. - StatusCode *int64 `location:"statusCode" type:"integer"` -} - -// String returns the string representation -func (s InvokeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InvokeOutput) GoString() string { - return s.String() -} - -// SetExecutedVersion sets the ExecutedVersion field's value. -func (s *InvokeOutput) SetExecutedVersion(v string) *InvokeOutput { - s.ExecutedVersion = &v - return s -} - -// SetFunctionError sets the FunctionError field's value. -func (s *InvokeOutput) SetFunctionError(v string) *InvokeOutput { - s.FunctionError = &v - return s -} - -// SetLogResult sets the LogResult field's value. -func (s *InvokeOutput) SetLogResult(v string) *InvokeOutput { - s.LogResult = &v - return s -} - -// SetPayload sets the Payload field's value. -func (s *InvokeOutput) SetPayload(v []byte) *InvokeOutput { - s.Payload = v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *InvokeOutput) SetStatusCode(v int64) *InvokeOutput { - s.StatusCode = &v - return s -} - -// An AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). -type Layer struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the function layer. - Arn *string `min:"1" type:"string"` - - // The size of the layer archive in bytes. - CodeSize *int64 `type:"long"` -} - -// String returns the string representation -func (s Layer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Layer) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Layer) SetArn(v string) *Layer { - s.Arn = &v - return s -} - -// SetCodeSize sets the CodeSize field's value. -func (s *Layer) SetCodeSize(v int64) *Layer { - s.CodeSize = &v - return s -} - -// A ZIP archive that contains the contents of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). -// You can specify either an Amazon S3 location, or upload a layer archive directly. -type LayerVersionContentInput struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket of the layer archive. - S3Bucket *string `min:"3" type:"string"` - - // The Amazon S3 key of the layer archive. - S3Key *string `min:"1" type:"string"` - - // For versioned objects, the version of the layer archive object to use. - S3ObjectVersion *string `min:"1" type:"string"` - - // The base64-encoded contents of the layer archive. AWS SDK and AWS CLI clients - // handle the encoding for you. - // - // ZipFile is automatically base64 encoded/decoded by the SDK. - ZipFile []byte `type:"blob" sensitive:"true"` -} - -// String returns the string representation -func (s LayerVersionContentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LayerVersionContentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LayerVersionContentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LayerVersionContentInput"} - if s.S3Bucket != nil && len(*s.S3Bucket) < 3 { - invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3)) - } - if s.S3Key != nil && len(*s.S3Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("S3Key", 1)) - } - if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *LayerVersionContentInput) SetS3Bucket(v string) *LayerVersionContentInput { - s.S3Bucket = &v - return s -} - -// SetS3Key sets the S3Key field's value. -func (s *LayerVersionContentInput) SetS3Key(v string) *LayerVersionContentInput { - s.S3Key = &v - return s -} - -// SetS3ObjectVersion sets the S3ObjectVersion field's value. -func (s *LayerVersionContentInput) SetS3ObjectVersion(v string) *LayerVersionContentInput { - s.S3ObjectVersion = &v - return s -} - -// SetZipFile sets the ZipFile field's value. -func (s *LayerVersionContentInput) SetZipFile(v []byte) *LayerVersionContentInput { - s.ZipFile = v - return s -} - -// Details about a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). -type LayerVersionContentOutput struct { - _ struct{} `type:"structure"` - - // The SHA-256 hash of the layer archive. - CodeSha256 *string `type:"string"` - - // The size of the layer archive in bytes. - CodeSize *int64 `type:"long"` - - // A link to the layer archive in Amazon S3 that is valid for 10 minutes. - Location *string `type:"string"` -} - -// String returns the string representation -func (s LayerVersionContentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LayerVersionContentOutput) GoString() string { - return s.String() -} - -// SetCodeSha256 sets the CodeSha256 field's value. -func (s *LayerVersionContentOutput) SetCodeSha256(v string) *LayerVersionContentOutput { - s.CodeSha256 = &v - return s -} - -// SetCodeSize sets the CodeSize field's value. -func (s *LayerVersionContentOutput) SetCodeSize(v int64) *LayerVersionContentOutput { - s.CodeSize = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *LayerVersionContentOutput) SetLocation(v string) *LayerVersionContentOutput { - s.Location = &v - return s -} - -// Details about a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). -type LayerVersionsListItem struct { - _ struct{} `type:"structure"` - - // The layer's compatible runtimes. - CompatibleRuntimes []*string `type:"list"` - - // The date that the version was created, in ISO 8601 format. For example, 2018-11-27T15:10:45.123+0000. - CreatedDate *string `type:"string"` - - // The description of the version. - Description *string `type:"string"` - - // The ARN of the layer version. - LayerVersionArn *string `min:"1" type:"string"` - - // The layer's open-source license. - LicenseInfo *string `type:"string"` - - // The version number. - Version *int64 `type:"long"` -} - -// String returns the string representation -func (s LayerVersionsListItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LayerVersionsListItem) GoString() string { - return s.String() -} - -// SetCompatibleRuntimes sets the CompatibleRuntimes field's value. -func (s *LayerVersionsListItem) SetCompatibleRuntimes(v []*string) *LayerVersionsListItem { - s.CompatibleRuntimes = v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *LayerVersionsListItem) SetCreatedDate(v string) *LayerVersionsListItem { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *LayerVersionsListItem) SetDescription(v string) *LayerVersionsListItem { - s.Description = &v - return s -} - -// SetLayerVersionArn sets the LayerVersionArn field's value. -func (s *LayerVersionsListItem) SetLayerVersionArn(v string) *LayerVersionsListItem { - s.LayerVersionArn = &v - return s -} - -// SetLicenseInfo sets the LicenseInfo field's value. -func (s *LayerVersionsListItem) SetLicenseInfo(v string) *LayerVersionsListItem { - s.LicenseInfo = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *LayerVersionsListItem) SetVersion(v int64) *LayerVersionsListItem { - s.Version = &v - return s -} - -// Details about an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). -type LayersListItem struct { - _ struct{} `type:"structure"` - - // The newest version of the layer. - LatestMatchingVersion *LayerVersionsListItem `type:"structure"` - - // The Amazon Resource Name (ARN) of the function layer. - LayerArn *string `min:"1" type:"string"` - - // The name of the layer. - LayerName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s LayersListItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LayersListItem) GoString() string { - return s.String() -} - -// SetLatestMatchingVersion sets the LatestMatchingVersion field's value. -func (s *LayersListItem) SetLatestMatchingVersion(v *LayerVersionsListItem) *LayersListItem { - s.LatestMatchingVersion = v - return s -} - -// SetLayerArn sets the LayerArn field's value. -func (s *LayersListItem) SetLayerArn(v string) *LayersListItem { - s.LayerArn = &v - return s -} - -// SetLayerName sets the LayerName field's value. -func (s *LayersListItem) SetLayerName(v string) *LayersListItem { - s.LayerName = &v - return s -} - -type ListAliasesInput struct { - _ struct{} `type:"structure"` - - // The name of the lambda function. - // - // Name formats - // - // * Function name - MyFunction. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. - // - // * Partial ARN - 123456789012:function:MyFunction. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // Specify a function version to only list aliases that invoke that version. - FunctionVersion *string `location:"querystring" locationName:"FunctionVersion" min:"1" type:"string"` - - // Specify the pagination token returned by a previous request to retrieve the - // next page of results. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // Limit the number of aliases returned. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListAliasesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAliasesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAliasesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAliasesInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionName sets the FunctionName field's value. -func (s *ListAliasesInput) SetFunctionName(v string) *ListAliasesInput { - s.FunctionName = &v - return s -} - -// SetFunctionVersion sets the FunctionVersion field's value. -func (s *ListAliasesInput) SetFunctionVersion(v string) *ListAliasesInput { - s.FunctionVersion = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAliasesInput) SetMarker(v string) *ListAliasesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListAliasesInput) SetMaxItems(v int64) *ListAliasesInput { - s.MaxItems = &v - return s -} - -type ListAliasesOutput struct { - _ struct{} `type:"structure"` - - // A list of aliases. - Aliases []*AliasConfiguration `type:"list"` - - // Pagination token included if more results are available. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s ListAliasesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAliasesOutput) GoString() string { - return s.String() -} - -// SetAliases sets the Aliases field's value. -func (s *ListAliasesOutput) SetAliases(v []*AliasConfiguration) *ListAliasesOutput { - s.Aliases = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListAliasesOutput) SetNextMarker(v string) *ListAliasesOutput { - s.NextMarker = &v - return s -} - -type ListEventSourceMappingsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the event source. - // - // * Amazon Kinesis - The ARN of the data stream or a stream consumer. - // - // * Amazon DynamoDB Streams - The ARN of the stream. - // - // * Amazon Simple Queue Service - The ARN of the queue. - EventSourceArn *string `location:"querystring" locationName:"EventSourceArn" type:"string"` - - // The name of the Lambda function. - // - // Name formats - // - // * Function name - MyFunction. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. - // - // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD. - // - // * Partial ARN - 123456789012:function:MyFunction. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it's limited to 64 characters in length. - FunctionName *string `location:"querystring" locationName:"FunctionName" min:"1" type:"string"` - - // A pagination token returned by a previous call. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of event source mappings to return. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListEventSourceMappingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEventSourceMappingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListEventSourceMappingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListEventSourceMappingsInput"} - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEventSourceArn sets the EventSourceArn field's value. -func (s *ListEventSourceMappingsInput) SetEventSourceArn(v string) *ListEventSourceMappingsInput { - s.EventSourceArn = &v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *ListEventSourceMappingsInput) SetFunctionName(v string) *ListEventSourceMappingsInput { - s.FunctionName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListEventSourceMappingsInput) SetMarker(v string) *ListEventSourceMappingsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListEventSourceMappingsInput) SetMaxItems(v int64) *ListEventSourceMappingsInput { - s.MaxItems = &v - return s -} - -type ListEventSourceMappingsOutput struct { - _ struct{} `type:"structure"` - - // A list of event source mappings. - EventSourceMappings []*EventSourceMappingConfiguration `type:"list"` - - // A pagination token that's returned when the response doesn't contain all - // event source mappings. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s ListEventSourceMappingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEventSourceMappingsOutput) GoString() string { - return s.String() -} - -// SetEventSourceMappings sets the EventSourceMappings field's value. -func (s *ListEventSourceMappingsOutput) SetEventSourceMappings(v []*EventSourceMappingConfiguration) *ListEventSourceMappingsOutput { - s.EventSourceMappings = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListEventSourceMappingsOutput) SetNextMarker(v string) *ListEventSourceMappingsOutput { - s.NextMarker = &v - return s -} - -type ListFunctionsInput struct { - _ struct{} `type:"structure"` - - // Set to ALL to include entries for all published versions of each function. - FunctionVersion *string `location:"querystring" locationName:"FunctionVersion" type:"string" enum:"FunctionVersion"` - - // Specify the pagination token returned by a previous request to retrieve the - // next page of results. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // For Lambda@Edge functions, the region of the master function. For example, - // us-east-2 or ALL. If specified, you must set FunctionVersion to ALL. - MasterRegion *string `location:"querystring" locationName:"MasterRegion" type:"string"` - - // Specify a value between 1 and 50 to limit the number of functions in the - // response. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListFunctionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFunctionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListFunctionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListFunctionsInput"} - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionVersion sets the FunctionVersion field's value. -func (s *ListFunctionsInput) SetFunctionVersion(v string) *ListFunctionsInput { - s.FunctionVersion = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListFunctionsInput) SetMarker(v string) *ListFunctionsInput { - s.Marker = &v - return s -} - -// SetMasterRegion sets the MasterRegion field's value. -func (s *ListFunctionsInput) SetMasterRegion(v string) *ListFunctionsInput { - s.MasterRegion = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListFunctionsInput) SetMaxItems(v int64) *ListFunctionsInput { - s.MaxItems = &v - return s -} - -// A list of Lambda functions. -type ListFunctionsOutput struct { - _ struct{} `type:"structure"` - - // A list of Lambda functions. - Functions []*FunctionConfiguration `type:"list"` - - // Pagination token included if more results are available. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s ListFunctionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFunctionsOutput) GoString() string { - return s.String() -} - -// SetFunctions sets the Functions field's value. -func (s *ListFunctionsOutput) SetFunctions(v []*FunctionConfiguration) *ListFunctionsOutput { - s.Functions = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListFunctionsOutput) SetNextMarker(v string) *ListFunctionsOutput { - s.NextMarker = &v - return s -} - -type ListLayerVersionsInput struct { - _ struct{} `type:"structure"` - - // A runtime identifier. For example, go1.x. - CompatibleRuntime *string `location:"querystring" locationName:"CompatibleRuntime" type:"string" enum:"Runtime"` - - // The name or Amazon Resource Name (ARN) of the layer. - // - // LayerName is a required field - LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` - - // A pagination token returned by a previous call. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of versions to return. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListLayerVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLayerVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListLayerVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListLayerVersionsInput"} - if s.LayerName == nil { - invalidParams.Add(request.NewErrParamRequired("LayerName")) - } - if s.LayerName != nil && len(*s.LayerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LayerName", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCompatibleRuntime sets the CompatibleRuntime field's value. -func (s *ListLayerVersionsInput) SetCompatibleRuntime(v string) *ListLayerVersionsInput { - s.CompatibleRuntime = &v - return s -} - -// SetLayerName sets the LayerName field's value. -func (s *ListLayerVersionsInput) SetLayerName(v string) *ListLayerVersionsInput { - s.LayerName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListLayerVersionsInput) SetMarker(v string) *ListLayerVersionsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListLayerVersionsInput) SetMaxItems(v int64) *ListLayerVersionsInput { - s.MaxItems = &v - return s -} - -type ListLayerVersionsOutput struct { - _ struct{} `type:"structure"` - - // A list of versions. - LayerVersions []*LayerVersionsListItem `type:"list"` - - // A pagination token returned when the response doesn't contain all versions. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s ListLayerVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLayerVersionsOutput) GoString() string { - return s.String() -} - -// SetLayerVersions sets the LayerVersions field's value. -func (s *ListLayerVersionsOutput) SetLayerVersions(v []*LayerVersionsListItem) *ListLayerVersionsOutput { - s.LayerVersions = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListLayerVersionsOutput) SetNextMarker(v string) *ListLayerVersionsOutput { - s.NextMarker = &v - return s -} - -type ListLayersInput struct { - _ struct{} `type:"structure"` - - // A runtime identifier. For example, go1.x. - CompatibleRuntime *string `location:"querystring" locationName:"CompatibleRuntime" type:"string" enum:"Runtime"` - - // A pagination token returned by a previous call. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of layers to return. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListLayersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLayersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListLayersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListLayersInput"} - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCompatibleRuntime sets the CompatibleRuntime field's value. -func (s *ListLayersInput) SetCompatibleRuntime(v string) *ListLayersInput { - s.CompatibleRuntime = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListLayersInput) SetMarker(v string) *ListLayersInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListLayersInput) SetMaxItems(v int64) *ListLayersInput { - s.MaxItems = &v - return s -} - -type ListLayersOutput struct { - _ struct{} `type:"structure"` - - // A list of function layers. - Layers []*LayersListItem `type:"list"` - - // A pagination token returned when the response doesn't contain all layers. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s ListLayersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLayersOutput) GoString() string { - return s.String() -} - -// SetLayers sets the Layers field's value. -func (s *ListLayersOutput) SetLayers(v []*LayersListItem) *ListLayersOutput { - s.Layers = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListLayersOutput) SetNextMarker(v string) *ListLayersOutput { - s.NextMarker = &v - return s -} - -type ListTagsInput struct { - _ struct{} `type:"structure"` - - // The function's Amazon Resource Name (ARN). - // - // Resource is a required field - Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} - if s.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - if s.Resource != nil && len(*s.Resource) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Resource", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResource sets the Resource field's value. -func (s *ListTagsInput) SetResource(v string) *ListTagsInput { - s.Resource = &v - return s -} - -type ListTagsOutput struct { - _ struct{} `type:"structure"` - - // The function's tags. - Tags map[string]*string `type:"map"` -} - -// String returns the string representation -func (s ListTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput { - s.Tags = v - return s -} - -type ListVersionsByFunctionInput struct { - _ struct{} `type:"structure"` - - // The name of the lambda function. - // - // Name formats - // - // * Function name - MyFunction. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. - // - // * Partial ARN - 123456789012:function:MyFunction. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // Specify the pagination token returned by a previous request to retrieve the - // next page of results. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // Limit the number of versions returned. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ListVersionsByFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVersionsByFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListVersionsByFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListVersionsByFunctionInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionName sets the FunctionName field's value. -func (s *ListVersionsByFunctionInput) SetFunctionName(v string) *ListVersionsByFunctionInput { - s.FunctionName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListVersionsByFunctionInput) SetMarker(v string) *ListVersionsByFunctionInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListVersionsByFunctionInput) SetMaxItems(v int64) *ListVersionsByFunctionInput { - s.MaxItems = &v - return s -} - -type ListVersionsByFunctionOutput struct { - _ struct{} `type:"structure"` - - // Pagination token included if more results are available. - NextMarker *string `type:"string"` - - // A list of Lambda function versions. - Versions []*FunctionConfiguration `type:"list"` -} - -// String returns the string representation -func (s ListVersionsByFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVersionsByFunctionOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListVersionsByFunctionOutput) SetNextMarker(v string) *ListVersionsByFunctionOutput { - s.NextMarker = &v - return s -} - -// SetVersions sets the Versions field's value. -func (s *ListVersionsByFunctionOutput) SetVersions(v []*FunctionConfiguration) *ListVersionsByFunctionOutput { - s.Versions = v - return s -} - -type PublishLayerVersionInput struct { - _ struct{} `type:"structure"` - - // A list of compatible function runtimes (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html). - // Used for filtering with ListLayers and ListLayerVersions. - CompatibleRuntimes []*string `type:"list"` - - // The function layer archive. - // - // Content is a required field - Content *LayerVersionContentInput `type:"structure" required:"true"` - - // The description of the version. - Description *string `type:"string"` - - // The name or Amazon Resource Name (ARN) of the layer. - // - // LayerName is a required field - LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` - - // The layer's software license. It can be any of the following: - // - // * An SPDX license identifier (https://spdx.org/licenses/). For example, - // MIT. - // - // * The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT. - // - // * The full text of the license. - LicenseInfo *string `type:"string"` -} - -// String returns the string representation -func (s PublishLayerVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublishLayerVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PublishLayerVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PublishLayerVersionInput"} - if s.Content == nil { - invalidParams.Add(request.NewErrParamRequired("Content")) - } - if s.LayerName == nil { - invalidParams.Add(request.NewErrParamRequired("LayerName")) - } - if s.LayerName != nil && len(*s.LayerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LayerName", 1)) - } - if s.Content != nil { - if err := s.Content.Validate(); err != nil { - invalidParams.AddNested("Content", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCompatibleRuntimes sets the CompatibleRuntimes field's value. -func (s *PublishLayerVersionInput) SetCompatibleRuntimes(v []*string) *PublishLayerVersionInput { - s.CompatibleRuntimes = v - return s -} - -// SetContent sets the Content field's value. -func (s *PublishLayerVersionInput) SetContent(v *LayerVersionContentInput) *PublishLayerVersionInput { - s.Content = v - return s -} - -// SetDescription sets the Description field's value. -func (s *PublishLayerVersionInput) SetDescription(v string) *PublishLayerVersionInput { - s.Description = &v - return s -} - -// SetLayerName sets the LayerName field's value. -func (s *PublishLayerVersionInput) SetLayerName(v string) *PublishLayerVersionInput { - s.LayerName = &v - return s -} - -// SetLicenseInfo sets the LicenseInfo field's value. -func (s *PublishLayerVersionInput) SetLicenseInfo(v string) *PublishLayerVersionInput { - s.LicenseInfo = &v - return s -} - -type PublishLayerVersionOutput struct { - _ struct{} `type:"structure"` - - // The layer's compatible runtimes. - CompatibleRuntimes []*string `type:"list"` - - // Details about the layer version. - Content *LayerVersionContentOutput `type:"structure"` - - // The date that the layer version was created, in ISO-8601 format (https://www.w3.org/TR/NOTE-datetime) - // (YYYY-MM-DDThh:mm:ss.sTZD). - CreatedDate *string `type:"string"` - - // The description of the version. - Description *string `type:"string"` - - // The ARN of the layer. - LayerArn *string `min:"1" type:"string"` - - // The ARN of the layer version. - LayerVersionArn *string `min:"1" type:"string"` - - // The layer's software license. - LicenseInfo *string `type:"string"` - - // The version number. - Version *int64 `type:"long"` -} - -// String returns the string representation -func (s PublishLayerVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublishLayerVersionOutput) GoString() string { - return s.String() -} - -// SetCompatibleRuntimes sets the CompatibleRuntimes field's value. -func (s *PublishLayerVersionOutput) SetCompatibleRuntimes(v []*string) *PublishLayerVersionOutput { - s.CompatibleRuntimes = v - return s -} - -// SetContent sets the Content field's value. -func (s *PublishLayerVersionOutput) SetContent(v *LayerVersionContentOutput) *PublishLayerVersionOutput { - s.Content = v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *PublishLayerVersionOutput) SetCreatedDate(v string) *PublishLayerVersionOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PublishLayerVersionOutput) SetDescription(v string) *PublishLayerVersionOutput { - s.Description = &v - return s -} - -// SetLayerArn sets the LayerArn field's value. -func (s *PublishLayerVersionOutput) SetLayerArn(v string) *PublishLayerVersionOutput { - s.LayerArn = &v - return s -} - -// SetLayerVersionArn sets the LayerVersionArn field's value. -func (s *PublishLayerVersionOutput) SetLayerVersionArn(v string) *PublishLayerVersionOutput { - s.LayerVersionArn = &v - return s -} - -// SetLicenseInfo sets the LicenseInfo field's value. -func (s *PublishLayerVersionOutput) SetLicenseInfo(v string) *PublishLayerVersionOutput { - s.LicenseInfo = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *PublishLayerVersionOutput) SetVersion(v int64) *PublishLayerVersionOutput { - s.Version = &v - return s -} - -type PublishVersionInput struct { - _ struct{} `type:"structure"` - - // Only publish a version if the hash matches the value specified. Use this - // option to avoid publishing a version if the function code has changed since - // you last updated it. You can get the hash for the version you uploaded from - // the output of UpdateFunctionCode. - CodeSha256 *string `type:"string"` - - // Specify a description for the version to override the description in the - // function configuration. - Description *string `type:"string"` - - // The name of the lambda function. - // - // Name formats - // - // * Function name - MyFunction. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. - // - // * Partial ARN - 123456789012:function:MyFunction. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // Only update the function if the revision ID matches the ID specified. Use - // this option to avoid publishing a version if the function configuration has - // changed since you last updated it. - RevisionId *string `type:"string"` -} - -// String returns the string representation -func (s PublishVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublishVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PublishVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PublishVersionInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCodeSha256 sets the CodeSha256 field's value. -func (s *PublishVersionInput) SetCodeSha256(v string) *PublishVersionInput { - s.CodeSha256 = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PublishVersionInput) SetDescription(v string) *PublishVersionInput { - s.Description = &v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *PublishVersionInput) SetFunctionName(v string) *PublishVersionInput { - s.FunctionName = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *PublishVersionInput) SetRevisionId(v string) *PublishVersionInput { - s.RevisionId = &v - return s -} - -type PutFunctionConcurrencyInput struct { - _ struct{} `type:"structure"` - - // The name of the Lambda function. - // - // Name formats - // - // * Function name - my-function. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. - // - // * Partial ARN - 123456789012:function:my-function. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // The number of simultaneous executions to reserve for the function. - // - // ReservedConcurrentExecutions is a required field - ReservedConcurrentExecutions *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s PutFunctionConcurrencyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutFunctionConcurrencyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutFunctionConcurrencyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutFunctionConcurrencyInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.ReservedConcurrentExecutions == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedConcurrentExecutions")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionName sets the FunctionName field's value. -func (s *PutFunctionConcurrencyInput) SetFunctionName(v string) *PutFunctionConcurrencyInput { - s.FunctionName = &v - return s -} - -// SetReservedConcurrentExecutions sets the ReservedConcurrentExecutions field's value. -func (s *PutFunctionConcurrencyInput) SetReservedConcurrentExecutions(v int64) *PutFunctionConcurrencyInput { - s.ReservedConcurrentExecutions = &v - return s -} - -type PutFunctionConcurrencyOutput struct { - _ struct{} `type:"structure"` - - // The number of concurrent executions reserved for this function. For more - // information, see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). - ReservedConcurrentExecutions *int64 `type:"integer"` -} - -// String returns the string representation -func (s PutFunctionConcurrencyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutFunctionConcurrencyOutput) GoString() string { - return s.String() -} - -// SetReservedConcurrentExecutions sets the ReservedConcurrentExecutions field's value. -func (s *PutFunctionConcurrencyOutput) SetReservedConcurrentExecutions(v int64) *PutFunctionConcurrencyOutput { - s.ReservedConcurrentExecutions = &v - return s -} - -type RemoveLayerVersionPermissionInput struct { - _ struct{} `type:"structure"` - - // The name or Amazon Resource Name (ARN) of the layer. - // - // LayerName is a required field - LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` - - // Only update the policy if the revision ID matches the ID specified. Use this - // option to avoid modifying a policy that has changed since you last read it. - RevisionId *string `location:"querystring" locationName:"RevisionId" type:"string"` - - // The identifier that was specified when the statement was added. - // - // StatementId is a required field - StatementId *string `location:"uri" locationName:"StatementId" min:"1" type:"string" required:"true"` - - // The version number. - // - // VersionNumber is a required field - VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"` -} - -// String returns the string representation -func (s RemoveLayerVersionPermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveLayerVersionPermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveLayerVersionPermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveLayerVersionPermissionInput"} - if s.LayerName == nil { - invalidParams.Add(request.NewErrParamRequired("LayerName")) - } - if s.LayerName != nil && len(*s.LayerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LayerName", 1)) - } - if s.StatementId == nil { - invalidParams.Add(request.NewErrParamRequired("StatementId")) - } - if s.StatementId != nil && len(*s.StatementId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) - } - if s.VersionNumber == nil { - invalidParams.Add(request.NewErrParamRequired("VersionNumber")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLayerName sets the LayerName field's value. -func (s *RemoveLayerVersionPermissionInput) SetLayerName(v string) *RemoveLayerVersionPermissionInput { - s.LayerName = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *RemoveLayerVersionPermissionInput) SetRevisionId(v string) *RemoveLayerVersionPermissionInput { - s.RevisionId = &v - return s -} - -// SetStatementId sets the StatementId field's value. -func (s *RemoveLayerVersionPermissionInput) SetStatementId(v string) *RemoveLayerVersionPermissionInput { - s.StatementId = &v - return s -} - -// SetVersionNumber sets the VersionNumber field's value. -func (s *RemoveLayerVersionPermissionInput) SetVersionNumber(v int64) *RemoveLayerVersionPermissionInput { - s.VersionNumber = &v - return s -} - -type RemoveLayerVersionPermissionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveLayerVersionPermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveLayerVersionPermissionOutput) GoString() string { - return s.String() -} - -type RemovePermissionInput struct { - _ struct{} `type:"structure"` - - // The name of the Lambda function, version, or alias. - // - // Name formats - // - // * Function name - my-function (name-only), my-function:v1 (with alias). - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. - // - // * Partial ARN - 123456789012:function:my-function. - // - // You can append a version number or alias to any of the formats. The length - // constraint applies only to the full ARN. If you specify only the function - // name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // Specify a version or alias to remove permissions from a published version - // of the function. - Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` - - // Only update the policy if the revision ID matches the ID specified. Use this - // option to avoid modifying a policy that has changed since you last read it. - RevisionId *string `location:"querystring" locationName:"RevisionId" type:"string"` - - // Statement ID of the permission to remove. - // - // StatementId is a required field - StatementId *string `location:"uri" locationName:"StatementId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RemovePermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemovePermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemovePermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.Qualifier != nil && len(*s.Qualifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) - } - if s.StatementId == nil { - invalidParams.Add(request.NewErrParamRequired("StatementId")) - } - if s.StatementId != nil && len(*s.StatementId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionName sets the FunctionName field's value. -func (s *RemovePermissionInput) SetFunctionName(v string) *RemovePermissionInput { - s.FunctionName = &v - return s -} - -// SetQualifier sets the Qualifier field's value. -func (s *RemovePermissionInput) SetQualifier(v string) *RemovePermissionInput { - s.Qualifier = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *RemovePermissionInput) SetRevisionId(v string) *RemovePermissionInput { - s.RevisionId = &v - return s -} - -// SetStatementId sets the StatementId field's value. -func (s *RemovePermissionInput) SetStatementId(v string) *RemovePermissionInput { - s.StatementId = &v - return s -} - -type RemovePermissionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemovePermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemovePermissionOutput) GoString() string { - return s.String() -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The function's Amazon Resource Name (ARN). - // - // Resource is a required field - Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"` - - // A list of tags to apply to the function. - // - // Tags is a required field - Tags map[string]*string `type:"map" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - if s.Resource != nil && len(*s.Resource) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Resource", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResource sets the Resource field's value. -func (s *TagResourceInput) SetResource(v string) *TagResourceInput { - s.Resource = &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() -} - -// The function's AWS X-Ray tracing configuration. -type TracingConfig struct { - _ struct{} `type:"structure"` - - // The tracing mode. - Mode *string `type:"string" enum:"TracingMode"` -} - -// String returns the string representation -func (s TracingConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TracingConfig) GoString() string { - return s.String() -} - -// SetMode sets the Mode field's value. -func (s *TracingConfig) SetMode(v string) *TracingConfig { - s.Mode = &v - return s -} - -// The function's AWS X-Ray tracing configuration. -type TracingConfigResponse struct { - _ struct{} `type:"structure"` - - // The tracing mode. - Mode *string `type:"string" enum:"TracingMode"` -} - -// String returns the string representation -func (s TracingConfigResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TracingConfigResponse) GoString() string { - return s.String() -} - -// SetMode sets the Mode field's value. -func (s *TracingConfigResponse) SetMode(v string) *TracingConfigResponse { - s.Mode = &v - return s -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The function's Amazon Resource Name (ARN). - // - // Resource is a required field - Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"` - - // A list of tag keys to remove from the function. - // - // 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.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - if s.Resource != nil && len(*s.Resource) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Resource", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResource sets the Resource field's value. -func (s *UntagResourceInput) SetResource(v string) *UntagResourceInput { - s.Resource = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UpdateAliasInput struct { - _ struct{} `type:"structure"` - - // A description of the alias. - Description *string `type:"string"` - - // The name of the lambda function. - // - // Name formats - // - // * Function name - MyFunction. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. - // - // * Partial ARN - 123456789012:function:MyFunction. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // The function version that the alias invokes. - FunctionVersion *string `min:"1" type:"string"` - - // The name of the alias. - // - // Name is a required field - Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"` - - // Only update the alias if the revision ID matches the ID specified. Use this - // option to avoid modifying an alias that has changed since you last read it. - RevisionId *string `type:"string"` - - // The routing configuration (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) - // of the alias. - RoutingConfig *AliasRoutingConfiguration `type:"structure"` -} - -// String returns the string representation -func (s UpdateAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAliasInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateAliasInput) SetDescription(v string) *UpdateAliasInput { - s.Description = &v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *UpdateAliasInput) SetFunctionName(v string) *UpdateAliasInput { - s.FunctionName = &v - return s -} - -// SetFunctionVersion sets the FunctionVersion field's value. -func (s *UpdateAliasInput) SetFunctionVersion(v string) *UpdateAliasInput { - s.FunctionVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateAliasInput) SetName(v string) *UpdateAliasInput { - s.Name = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *UpdateAliasInput) SetRevisionId(v string) *UpdateAliasInput { - s.RevisionId = &v - return s -} - -// SetRoutingConfig sets the RoutingConfig field's value. -func (s *UpdateAliasInput) SetRoutingConfig(v *AliasRoutingConfiguration) *UpdateAliasInput { - s.RoutingConfig = v - return s -} - -type UpdateEventSourceMappingInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to retrieve in a single batch. - // - // * Amazon Kinesis - Default 100. Max 10,000. - // - // * Amazon DynamoDB Streams - Default 100. Max 1,000. - // - // * Amazon Simple Queue Service - Default 10. Max 10. - BatchSize *int64 `min:"1" type:"integer"` - - // Disables the event source mapping to pause polling and invocation. - Enabled *bool `type:"boolean"` - - // The name of the Lambda function. - // - // Name formats - // - // * Function name - MyFunction. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. - // - // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD. - // - // * Partial ARN - 123456789012:function:MyFunction. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it's limited to 64 characters in length. - FunctionName *string `min:"1" type:"string"` - - // The identifier of the event source mapping. - // - // UUID is a required field - UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateEventSourceMappingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEventSourceMappingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateEventSourceMappingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateEventSourceMappingInput"} - if s.BatchSize != nil && *s.BatchSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("BatchSize", 1)) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.UUID == nil { - invalidParams.Add(request.NewErrParamRequired("UUID")) - } - if s.UUID != nil && len(*s.UUID) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UUID", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBatchSize sets the BatchSize field's value. -func (s *UpdateEventSourceMappingInput) SetBatchSize(v int64) *UpdateEventSourceMappingInput { - s.BatchSize = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *UpdateEventSourceMappingInput) SetEnabled(v bool) *UpdateEventSourceMappingInput { - s.Enabled = &v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *UpdateEventSourceMappingInput) SetFunctionName(v string) *UpdateEventSourceMappingInput { - s.FunctionName = &v - return s -} - -// SetUUID sets the UUID field's value. -func (s *UpdateEventSourceMappingInput) SetUUID(v string) *UpdateEventSourceMappingInput { - s.UUID = &v - return s -} - -type UpdateFunctionCodeInput struct { - _ struct{} `type:"structure"` - - // Set to true to validate the request parameters and access permissions without - // modifying the function code. - DryRun *bool `type:"boolean"` - - // The name of the Lambda function. - // - // Name formats - // - // * Function name - my-function. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. - // - // * Partial ARN - 123456789012:function:my-function. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // Set to true to publish a new version of the function after updating the code. - // This has the same effect as calling PublishVersion separately. - Publish *bool `type:"boolean"` - - // Only update the function if the revision ID matches the ID specified. Use - // this option to avoid modifying a function that has changed since you last - // read it. - RevisionId *string `type:"string"` - - // An Amazon S3 bucket in the same region as your function. The bucket can be - // in a different AWS account. - S3Bucket *string `min:"3" type:"string"` - - // The Amazon S3 key of the deployment package. - S3Key *string `min:"1" type:"string"` - - // For versioned objects, the version of the deployment package object to use. - S3ObjectVersion *string `min:"1" type:"string"` - - // The base64-encoded contents of the deployment package. AWS SDK and AWS CLI - // clients handle the encoding for you. - // - // ZipFile is automatically base64 encoded/decoded by the SDK. - ZipFile []byte `type:"blob" sensitive:"true"` -} - -// String returns the string representation -func (s UpdateFunctionCodeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFunctionCodeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFunctionCodeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionCodeInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.S3Bucket != nil && len(*s.S3Bucket) < 3 { - invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3)) - } - if s.S3Key != nil && len(*s.S3Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("S3Key", 1)) - } - if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *UpdateFunctionCodeInput) SetDryRun(v bool) *UpdateFunctionCodeInput { - s.DryRun = &v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *UpdateFunctionCodeInput) SetFunctionName(v string) *UpdateFunctionCodeInput { - s.FunctionName = &v - return s -} - -// SetPublish sets the Publish field's value. -func (s *UpdateFunctionCodeInput) SetPublish(v bool) *UpdateFunctionCodeInput { - s.Publish = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *UpdateFunctionCodeInput) SetRevisionId(v string) *UpdateFunctionCodeInput { - s.RevisionId = &v - return s -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *UpdateFunctionCodeInput) SetS3Bucket(v string) *UpdateFunctionCodeInput { - s.S3Bucket = &v - return s -} - -// SetS3Key sets the S3Key field's value. -func (s *UpdateFunctionCodeInput) SetS3Key(v string) *UpdateFunctionCodeInput { - s.S3Key = &v - return s -} - -// SetS3ObjectVersion sets the S3ObjectVersion field's value. -func (s *UpdateFunctionCodeInput) SetS3ObjectVersion(v string) *UpdateFunctionCodeInput { - s.S3ObjectVersion = &v - return s -} - -// SetZipFile sets the ZipFile field's value. -func (s *UpdateFunctionCodeInput) SetZipFile(v []byte) *UpdateFunctionCodeInput { - s.ZipFile = v - return s -} - -type UpdateFunctionConfigurationInput struct { - _ struct{} `type:"structure"` - - // A dead letter queue configuration that specifies the queue or topic where - // Lambda sends asynchronous events when they fail processing. For more information, - // see Dead Letter Queues (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html). - DeadLetterConfig *DeadLetterConfig `type:"structure"` - - // A short user-defined function description. AWS Lambda does not use this value. - // Assign a meaningful description as you see fit. - Description *string `type:"string"` - - // The parent object that contains your environment's configuration settings. - Environment *Environment `type:"structure"` - - // The name of the Lambda function. - // - // Name formats - // - // * Function name - my-function. - // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. - // - // * Partial ARN - 123456789012:function:my-function. - // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. - // - // FunctionName is a required field - FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - - // The function that Lambda calls to begin executing your function. For Node.js, - // it is the module-name.export value in your function. - Handler *string `type:"string"` - - // The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's - // environment variables. If you elect to use the AWS Lambda default service - // key, pass in an empty string ("") for this parameter. - KMSKeyArn *string `type:"string"` - - // A list of function layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) - // to add to the function's execution environment. - Layers []*string `type:"list"` - - // The amount of memory, in MB, your Lambda function is given. AWS Lambda uses - // this memory size to infer the amount of CPU allocated to your function. Your - // function use-case determines your CPU and memory requirements. For example, - // a database operation might need less memory compared to an image processing - // function. The default value is 128 MB. The value must be a multiple of 64 - // MB. - MemorySize *int64 `min:"128" type:"integer"` - - // Only update the function if the revision ID matches the ID specified. Use - // this option to avoid modifying a function that has changed since you last - // read it. - RevisionId *string `type:"string"` - - // The Amazon Resource Name (ARN) of the IAM role that Lambda will assume when - // it executes your function. - Role *string `type:"string"` - - // The runtime version for the function. - Runtime *string `type:"string" enum:"Runtime"` - - // The amount of time that Lambda allows a function to run before terminating - // it. The default is 3 seconds. The maximum allowed value is 900 seconds. - Timeout *int64 `min:"1" type:"integer"` - - // Set Mode to Active to sample and trace a subset of incoming requests with - // AWS X-Ray. - TracingConfig *TracingConfig `type:"structure"` - - // Specify security groups and subnets in a VPC to which your Lambda function - // needs access. - VpcConfig *VpcConfig `type:"structure"` -} - -// String returns the string representation -func (s UpdateFunctionConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFunctionConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFunctionConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionConfigurationInput"} - if s.FunctionName == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionName")) - } - if s.FunctionName != nil && len(*s.FunctionName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) - } - if s.MemorySize != nil && *s.MemorySize < 128 { - invalidParams.Add(request.NewErrParamMinValue("MemorySize", 128)) - } - if s.Timeout != nil && *s.Timeout < 1 { - invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeadLetterConfig sets the DeadLetterConfig field's value. -func (s *UpdateFunctionConfigurationInput) SetDeadLetterConfig(v *DeadLetterConfig) *UpdateFunctionConfigurationInput { - s.DeadLetterConfig = v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateFunctionConfigurationInput) SetDescription(v string) *UpdateFunctionConfigurationInput { - s.Description = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *UpdateFunctionConfigurationInput) SetEnvironment(v *Environment) *UpdateFunctionConfigurationInput { - s.Environment = v - return s -} - -// SetFunctionName sets the FunctionName field's value. -func (s *UpdateFunctionConfigurationInput) SetFunctionName(v string) *UpdateFunctionConfigurationInput { - s.FunctionName = &v - return s -} - -// SetHandler sets the Handler field's value. -func (s *UpdateFunctionConfigurationInput) SetHandler(v string) *UpdateFunctionConfigurationInput { - s.Handler = &v - return s -} - -// SetKMSKeyArn sets the KMSKeyArn field's value. -func (s *UpdateFunctionConfigurationInput) SetKMSKeyArn(v string) *UpdateFunctionConfigurationInput { - s.KMSKeyArn = &v - return s -} - -// SetLayers sets the Layers field's value. -func (s *UpdateFunctionConfigurationInput) SetLayers(v []*string) *UpdateFunctionConfigurationInput { - s.Layers = v - return s -} - -// SetMemorySize sets the MemorySize field's value. -func (s *UpdateFunctionConfigurationInput) SetMemorySize(v int64) *UpdateFunctionConfigurationInput { - s.MemorySize = &v - return s -} - -// SetRevisionId sets the RevisionId field's value. -func (s *UpdateFunctionConfigurationInput) SetRevisionId(v string) *UpdateFunctionConfigurationInput { - s.RevisionId = &v - return s -} - -// SetRole sets the Role field's value. -func (s *UpdateFunctionConfigurationInput) SetRole(v string) *UpdateFunctionConfigurationInput { - s.Role = &v - return s -} - -// SetRuntime sets the Runtime field's value. -func (s *UpdateFunctionConfigurationInput) SetRuntime(v string) *UpdateFunctionConfigurationInput { - s.Runtime = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *UpdateFunctionConfigurationInput) SetTimeout(v int64) *UpdateFunctionConfigurationInput { - s.Timeout = &v - return s -} - -// SetTracingConfig sets the TracingConfig field's value. -func (s *UpdateFunctionConfigurationInput) SetTracingConfig(v *TracingConfig) *UpdateFunctionConfigurationInput { - s.TracingConfig = v - return s -} - -// SetVpcConfig sets the VpcConfig field's value. -func (s *UpdateFunctionConfigurationInput) SetVpcConfig(v *VpcConfig) *UpdateFunctionConfigurationInput { - s.VpcConfig = v - return s -} - -// The VPC security groups and subnets attached to a Lambda function. -type VpcConfig struct { - _ struct{} `type:"structure"` - - // A list of VPC security groups IDs. - SecurityGroupIds []*string `type:"list"` - - // A list of VPC subnet IDs. - SubnetIds []*string `type:"list"` -} - -// String returns the string representation -func (s VpcConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcConfig) GoString() string { - return s.String() -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *VpcConfig) SetSecurityGroupIds(v []*string) *VpcConfig { - s.SecurityGroupIds = v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *VpcConfig) SetSubnetIds(v []*string) *VpcConfig { - s.SubnetIds = v - return s -} - -// The VPC security groups and subnets attached to a Lambda function. -type VpcConfigResponse struct { - _ struct{} `type:"structure"` - - // A list of VPC security groups IDs. - SecurityGroupIds []*string `type:"list"` - - // A list of VPC subnet IDs. - SubnetIds []*string `type:"list"` - - // The ID of the VPC. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s VpcConfigResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcConfigResponse) GoString() string { - return s.String() -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *VpcConfigResponse) SetSecurityGroupIds(v []*string) *VpcConfigResponse { - s.SecurityGroupIds = v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *VpcConfigResponse) SetSubnetIds(v []*string) *VpcConfigResponse { - s.SubnetIds = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *VpcConfigResponse) SetVpcId(v string) *VpcConfigResponse { - s.VpcId = &v - return s -} - -const ( - // EventSourcePositionTrimHorizon is a EventSourcePosition enum value - EventSourcePositionTrimHorizon = "TRIM_HORIZON" - - // EventSourcePositionLatest is a EventSourcePosition enum value - EventSourcePositionLatest = "LATEST" - - // EventSourcePositionAtTimestamp is a EventSourcePosition enum value - EventSourcePositionAtTimestamp = "AT_TIMESTAMP" -) - -const ( - // FunctionVersionAll is a FunctionVersion enum value - FunctionVersionAll = "ALL" -) - -const ( - // InvocationTypeEvent is a InvocationType enum value - InvocationTypeEvent = "Event" - - // InvocationTypeRequestResponse is a InvocationType enum value - InvocationTypeRequestResponse = "RequestResponse" - - // InvocationTypeDryRun is a InvocationType enum value - InvocationTypeDryRun = "DryRun" -) - -const ( - // LogTypeNone is a LogType enum value - LogTypeNone = "None" - - // LogTypeTail is a LogType enum value - LogTypeTail = "Tail" -) - -const ( - // RuntimeNodejs is a Runtime enum value - RuntimeNodejs = "nodejs" - - // RuntimeNodejs43 is a Runtime enum value - RuntimeNodejs43 = "nodejs4.3" - - // RuntimeNodejs610 is a Runtime enum value - RuntimeNodejs610 = "nodejs6.10" - - // RuntimeNodejs810 is a Runtime enum value - RuntimeNodejs810 = "nodejs8.10" - - // RuntimeJava8 is a Runtime enum value - RuntimeJava8 = "java8" - - // RuntimePython27 is a Runtime enum value - RuntimePython27 = "python2.7" - - // RuntimePython36 is a Runtime enum value - RuntimePython36 = "python3.6" - - // RuntimePython37 is a Runtime enum value - RuntimePython37 = "python3.7" - - // RuntimeDotnetcore10 is a Runtime enum value - RuntimeDotnetcore10 = "dotnetcore1.0" - - // RuntimeDotnetcore20 is a Runtime enum value - RuntimeDotnetcore20 = "dotnetcore2.0" - - // RuntimeDotnetcore21 is a Runtime enum value - RuntimeDotnetcore21 = "dotnetcore2.1" - - // RuntimeNodejs43Edge is a Runtime enum value - RuntimeNodejs43Edge = "nodejs4.3-edge" - - // RuntimeGo1X is a Runtime enum value - RuntimeGo1X = "go1.x" - - // RuntimeRuby25 is a Runtime enum value - RuntimeRuby25 = "ruby2.5" - - // RuntimeProvided is a Runtime enum value - RuntimeProvided = "provided" -) - -const ( - // ThrottleReasonConcurrentInvocationLimitExceeded is a ThrottleReason enum value - ThrottleReasonConcurrentInvocationLimitExceeded = "ConcurrentInvocationLimitExceeded" - - // ThrottleReasonFunctionInvocationRateLimitExceeded is a ThrottleReason enum value - ThrottleReasonFunctionInvocationRateLimitExceeded = "FunctionInvocationRateLimitExceeded" - - // ThrottleReasonReservedFunctionConcurrentInvocationLimitExceeded is a ThrottleReason enum value - ThrottleReasonReservedFunctionConcurrentInvocationLimitExceeded = "ReservedFunctionConcurrentInvocationLimitExceeded" - - // ThrottleReasonReservedFunctionInvocationRateLimitExceeded is a ThrottleReason enum value - ThrottleReasonReservedFunctionInvocationRateLimitExceeded = "ReservedFunctionInvocationRateLimitExceeded" - - // ThrottleReasonCallerRateLimitExceeded is a ThrottleReason enum value - ThrottleReasonCallerRateLimitExceeded = "CallerRateLimitExceeded" -) - -const ( - // TracingModeActive is a TracingMode enum value - TracingModeActive = "Active" - - // TracingModePassThrough is a TracingMode enum value - TracingModePassThrough = "PassThrough" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/doc.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/doc.go deleted file mode 100644 index 58946ac33..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/doc.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package lambda provides the client and types for making API -// requests to AWS Lambda. -// -// Overview -// -// This is the AWS Lambda API Reference. The AWS Lambda Developer Guide provides -// additional information. For the service overview, see What is AWS Lambda -// (http://docs.aws.amazon.com/lambda/latest/dg/welcome.html), and for information -// about how the service works, see AWS Lambda: How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html) -// in the AWS Lambda Developer Guide. -// -// See https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31 for more information on this service. -// -// See lambda package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/lambda/ -// -// Using the Client -// -// To contact AWS Lambda 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 Lambda client Lambda for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/lambda/#New -package lambda diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go deleted file mode 100644 index 935b7d91b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package lambda - -const ( - - // ErrCodeCodeStorageExceededException for service response error code - // "CodeStorageExceededException". - // - // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) - ErrCodeCodeStorageExceededException = "CodeStorageExceededException" - - // ErrCodeEC2AccessDeniedException for service response error code - // "EC2AccessDeniedException". - // - // Need additional permissions to configure VPC settings. - ErrCodeEC2AccessDeniedException = "EC2AccessDeniedException" - - // ErrCodeEC2ThrottledException for service response error code - // "EC2ThrottledException". - // - // AWS Lambda was throttled by Amazon EC2 during Lambda function initialization - // using the execution role provided for the Lambda function. - ErrCodeEC2ThrottledException = "EC2ThrottledException" - - // ErrCodeEC2UnexpectedException for service response error code - // "EC2UnexpectedException". - // - // AWS Lambda received an unexpected EC2 client exception while setting up for - // the Lambda function. - ErrCodeEC2UnexpectedException = "EC2UnexpectedException" - - // ErrCodeENILimitReachedException for service response error code - // "ENILimitReachedException". - // - // AWS Lambda was not able to create an Elastic Network Interface (ENI) in the - // VPC, specified as part of Lambda function configuration, because the limit - // for network interfaces has been reached. - ErrCodeENILimitReachedException = "ENILimitReachedException" - - // ErrCodeInvalidParameterValueException for service response error code - // "InvalidParameterValueException". - // - // One of the parameters in the request is invalid. For example, if you provided - // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration - // API, that AWS Lambda is unable to assume you will get this exception. - ErrCodeInvalidParameterValueException = "InvalidParameterValueException" - - // ErrCodeInvalidRequestContentException for service response error code - // "InvalidRequestContentException". - // - // The request body could not be parsed as JSON. - ErrCodeInvalidRequestContentException = "InvalidRequestContentException" - - // ErrCodeInvalidRuntimeException for service response error code - // "InvalidRuntimeException". - // - // The runtime or runtime version specified is not supported. - ErrCodeInvalidRuntimeException = "InvalidRuntimeException" - - // ErrCodeInvalidSecurityGroupIDException for service response error code - // "InvalidSecurityGroupIDException". - // - // The Security Group ID provided in the Lambda function VPC configuration is - // invalid. - ErrCodeInvalidSecurityGroupIDException = "InvalidSecurityGroupIDException" - - // ErrCodeInvalidSubnetIDException for service response error code - // "InvalidSubnetIDException". - // - // The Subnet ID provided in the Lambda function VPC configuration is invalid. - ErrCodeInvalidSubnetIDException = "InvalidSubnetIDException" - - // ErrCodeInvalidZipFileException for service response error code - // "InvalidZipFileException". - // - // AWS Lambda could not unzip the deployment package. - ErrCodeInvalidZipFileException = "InvalidZipFileException" - - // ErrCodeKMSAccessDeniedException for service response error code - // "KMSAccessDeniedException". - // - // Lambda was unable to decrypt the environment variables because KMS access - // was denied. Check the Lambda function's KMS permissions. - ErrCodeKMSAccessDeniedException = "KMSAccessDeniedException" - - // ErrCodeKMSDisabledException for service response error code - // "KMSDisabledException". - // - // Lambda was unable to decrypt the environment variables because the KMS key - // used is disabled. Check the Lambda function's KMS key settings. - ErrCodeKMSDisabledException = "KMSDisabledException" - - // ErrCodeKMSInvalidStateException for service response error code - // "KMSInvalidStateException". - // - // Lambda was unable to decrypt the environment variables because the KMS key - // used is in an invalid state for Decrypt. Check the function's KMS key settings. - ErrCodeKMSInvalidStateException = "KMSInvalidStateException" - - // ErrCodeKMSNotFoundException for service response error code - // "KMSNotFoundException". - // - // Lambda was unable to decrypt the environment variables because the KMS key - // was not found. Check the function's KMS key settings. - ErrCodeKMSNotFoundException = "KMSNotFoundException" - - // ErrCodePolicyLengthExceededException for service response error code - // "PolicyLengthExceededException". - // - // Lambda function access policy is limited to 20 KB. - ErrCodePolicyLengthExceededException = "PolicyLengthExceededException" - - // ErrCodePreconditionFailedException for service response error code - // "PreconditionFailedException". - // - // The RevisionId provided does not match the latest RevisionId for the Lambda - // function or alias. Call the GetFunction or the GetAlias API to retrieve the - // latest RevisionId for your resource. - ErrCodePreconditionFailedException = "PreconditionFailedException" - - // ErrCodeRequestTooLargeException for service response error code - // "RequestTooLargeException". - // - // The request payload exceeded the Invoke request body JSON input limit. For - // more information, see Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html). - ErrCodeRequestTooLargeException = "RequestTooLargeException" - - // ErrCodeResourceConflictException for service response error code - // "ResourceConflictException". - // - // The resource already exists. - ErrCodeResourceConflictException = "ResourceConflictException" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUseException". - // - // The operation conflicts with the resource's availability. For example, you - // attempted to update an EventSource Mapping in CREATING, or tried to delete - // a EventSource mapping currently in the UPDATING state. - ErrCodeResourceInUseException = "ResourceInUseException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The resource (for example, a Lambda function or access policy statement) - // specified in the request does not exist. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeServiceException for service response error code - // "ServiceException". - // - // The AWS Lambda service encountered an internal error. - ErrCodeServiceException = "ServiceException" - - // ErrCodeSubnetIPAddressLimitReachedException for service response error code - // "SubnetIPAddressLimitReachedException". - // - // AWS Lambda was not able to set up VPC access for the Lambda function because - // one or more configured subnets has no available IP addresses. - ErrCodeSubnetIPAddressLimitReachedException = "SubnetIPAddressLimitReachedException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // Request throughput limit exceeded. - ErrCodeTooManyRequestsException = "TooManyRequestsException" - - // ErrCodeUnsupportedMediaTypeException for service response error code - // "UnsupportedMediaTypeException". - // - // The content type of the Invoke request body is not JSON. - ErrCodeUnsupportedMediaTypeException = "UnsupportedMediaTypeException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/service.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/service.go deleted file mode 100644 index 1cccdda08..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package lambda - -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" -) - -// Lambda provides the API operation methods for making requests to -// AWS Lambda. See this package's package overview docs -// for details on the service. -// -// Lambda methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Lambda 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 = "lambda" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Lambda" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Lambda client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Lambda client from just a session. -// svc := lambda.New(mySession) -// -// // Create a Lambda client with additional configuration -// svc := lambda.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Lambda { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Lambda { - svc := &Lambda{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-03-31", - }, - 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 Lambda operation and runs any -// custom request initialization. -func (c *Lambda) 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/lexmodelbuildingservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go deleted file mode 100644 index 39ce69d1e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go +++ /dev/null @@ -1,10790 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package lexmodelbuildingservice - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opCreateBotVersion = "CreateBotVersion" - -// CreateBotVersionRequest generates a "aws/request.Request" representing the -// client's request for the CreateBotVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateBotVersion for more information on using the CreateBotVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateBotVersionRequest method. -// req, resp := client.CreateBotVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateBotVersion -func (c *LexModelBuildingService) CreateBotVersionRequest(input *CreateBotVersionInput) (req *request.Request, output *CreateBotVersionOutput) { - op := &request.Operation{ - Name: opCreateBotVersion, - HTTPMethod: "POST", - HTTPPath: "/bots/{name}/versions", - } - - if input == nil { - input = &CreateBotVersionInput{} - } - - output = &CreateBotVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateBotVersion API operation for Amazon Lex Model Building Service. -// -// Creates a new version of the bot based on the $LATEST version. If the $LATEST -// version of this resource hasn't changed since you created the last version, -// Amazon Lex doesn't create a new version. It returns the last created version. -// -// You can update only the $LATEST version of the bot. You can't update the -// numbered versions that you create with the CreateBotVersion operation. -// -// When you create the first version of a bot, Amazon Lex sets the version to -// 1. Subsequent versions increment by 1. For more information, see versioning-intro. -// -// This operation requires permission for the lex:CreateBotVersion action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation CreateBotVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The checksum of the resource that you are trying to change does not match -// the checksum in the request. Check the resource's checksum and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateBotVersion -func (c *LexModelBuildingService) CreateBotVersion(input *CreateBotVersionInput) (*CreateBotVersionOutput, error) { - req, out := c.CreateBotVersionRequest(input) - return out, req.Send() -} - -// CreateBotVersionWithContext is the same as CreateBotVersion with the addition of -// the ability to pass a context and additional request options. -// -// See CreateBotVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) CreateBotVersionWithContext(ctx aws.Context, input *CreateBotVersionInput, opts ...request.Option) (*CreateBotVersionOutput, error) { - req, out := c.CreateBotVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateIntentVersion = "CreateIntentVersion" - -// CreateIntentVersionRequest generates a "aws/request.Request" representing the -// client's request for the CreateIntentVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateIntentVersion for more information on using the CreateIntentVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateIntentVersionRequest method. -// req, resp := client.CreateIntentVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateIntentVersion -func (c *LexModelBuildingService) CreateIntentVersionRequest(input *CreateIntentVersionInput) (req *request.Request, output *CreateIntentVersionOutput) { - op := &request.Operation{ - Name: opCreateIntentVersion, - HTTPMethod: "POST", - HTTPPath: "/intents/{name}/versions", - } - - if input == nil { - input = &CreateIntentVersionInput{} - } - - output = &CreateIntentVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateIntentVersion API operation for Amazon Lex Model Building Service. -// -// Creates a new version of an intent based on the $LATEST version of the intent. -// If the $LATEST version of this intent hasn't changed since you last updated -// it, Amazon Lex doesn't create a new version. It returns the last version -// you created. -// -// You can update only the $LATEST version of the intent. You can't update the -// numbered versions that you create with the CreateIntentVersion operation. -// -// When you create a version of an intent, Amazon Lex sets the version to 1. -// Subsequent versions increment by 1. For more information, see versioning-intro. -// -// This operation requires permissions to perform the lex:CreateIntentVersion -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation CreateIntentVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The checksum of the resource that you are trying to change does not match -// the checksum in the request. Check the resource's checksum and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateIntentVersion -func (c *LexModelBuildingService) CreateIntentVersion(input *CreateIntentVersionInput) (*CreateIntentVersionOutput, error) { - req, out := c.CreateIntentVersionRequest(input) - return out, req.Send() -} - -// CreateIntentVersionWithContext is the same as CreateIntentVersion with the addition of -// the ability to pass a context and additional request options. -// -// See CreateIntentVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) CreateIntentVersionWithContext(ctx aws.Context, input *CreateIntentVersionInput, opts ...request.Option) (*CreateIntentVersionOutput, error) { - req, out := c.CreateIntentVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSlotTypeVersion = "CreateSlotTypeVersion" - -// CreateSlotTypeVersionRequest generates a "aws/request.Request" representing the -// client's request for the CreateSlotTypeVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSlotTypeVersion for more information on using the CreateSlotTypeVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSlotTypeVersionRequest method. -// req, resp := client.CreateSlotTypeVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateSlotTypeVersion -func (c *LexModelBuildingService) CreateSlotTypeVersionRequest(input *CreateSlotTypeVersionInput) (req *request.Request, output *CreateSlotTypeVersionOutput) { - op := &request.Operation{ - Name: opCreateSlotTypeVersion, - HTTPMethod: "POST", - HTTPPath: "/slottypes/{name}/versions", - } - - if input == nil { - input = &CreateSlotTypeVersionInput{} - } - - output = &CreateSlotTypeVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSlotTypeVersion API operation for Amazon Lex Model Building Service. -// -// Creates a new version of a slot type based on the $LATEST version of the -// specified slot type. If the $LATEST version of this resource has not changed -// since the last version that you created, Amazon Lex doesn't create a new -// version. It returns the last version that you created. -// -// You can update only the $LATEST version of a slot type. You can't update -// the numbered versions that you create with the CreateSlotTypeVersion operation. -// -// When you create a version of a slot type, Amazon Lex sets the version to -// 1. Subsequent versions increment by 1. For more information, see versioning-intro. -// -// This operation requires permissions for the lex:CreateSlotTypeVersion action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation CreateSlotTypeVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The checksum of the resource that you are trying to change does not match -// the checksum in the request. Check the resource's checksum and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateSlotTypeVersion -func (c *LexModelBuildingService) CreateSlotTypeVersion(input *CreateSlotTypeVersionInput) (*CreateSlotTypeVersionOutput, error) { - req, out := c.CreateSlotTypeVersionRequest(input) - return out, req.Send() -} - -// CreateSlotTypeVersionWithContext is the same as CreateSlotTypeVersion with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSlotTypeVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) CreateSlotTypeVersionWithContext(ctx aws.Context, input *CreateSlotTypeVersionInput, opts ...request.Option) (*CreateSlotTypeVersionOutput, error) { - req, out := c.CreateSlotTypeVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBot = "DeleteBot" - -// DeleteBotRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBot for more information on using the DeleteBot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBotRequest method. -// req, resp := client.DeleteBotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBot -func (c *LexModelBuildingService) DeleteBotRequest(input *DeleteBotInput) (req *request.Request, output *DeleteBotOutput) { - op := &request.Operation{ - Name: opDeleteBot, - HTTPMethod: "DELETE", - HTTPPath: "/bots/{name}", - } - - if input == nil { - input = &DeleteBotInput{} - } - - output = &DeleteBotOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBot API operation for Amazon Lex Model Building Service. -// -// Deletes all versions of the bot, including the $LATEST version. To delete -// a specific version of the bot, use the DeleteBotVersion operation. -// -// If a bot has an alias, you can't delete it. Instead, the DeleteBot operation -// returns a ResourceInUseException exception that includes a reference to the -// alias that refers to the bot. To remove the reference to the bot, delete -// the alias. If you get the same exception again, delete the referring alias -// until the DeleteBot operation is successful. -// -// This operation requires permissions for the lex:DeleteBot action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation DeleteBot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource that you are attempting to delete is referred to by another -// resource. Use this information to remove references to the resource that -// you are trying to delete. -// -// The body of the exception contains a JSON object that describes the resource. -// -// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, -// -// "resourceReference": { -// -// "name": string, "version": string } } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBot -func (c *LexModelBuildingService) DeleteBot(input *DeleteBotInput) (*DeleteBotOutput, error) { - req, out := c.DeleteBotRequest(input) - return out, req.Send() -} - -// DeleteBotWithContext is the same as DeleteBot with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) DeleteBotWithContext(ctx aws.Context, input *DeleteBotInput, opts ...request.Option) (*DeleteBotOutput, error) { - req, out := c.DeleteBotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBotAlias = "DeleteBotAlias" - -// DeleteBotAliasRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBotAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBotAlias for more information on using the DeleteBotAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBotAliasRequest method. -// req, resp := client.DeleteBotAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotAlias -func (c *LexModelBuildingService) DeleteBotAliasRequest(input *DeleteBotAliasInput) (req *request.Request, output *DeleteBotAliasOutput) { - op := &request.Operation{ - Name: opDeleteBotAlias, - HTTPMethod: "DELETE", - HTTPPath: "/bots/{botName}/aliases/{name}", - } - - if input == nil { - input = &DeleteBotAliasInput{} - } - - output = &DeleteBotAliasOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBotAlias API operation for Amazon Lex Model Building Service. -// -// Deletes an alias for the specified bot. -// -// You can't delete an alias that is used in the association between a bot and -// a messaging channel. If an alias is used in a channel association, the DeleteBot -// operation returns a ResourceInUseException exception that includes a reference -// to the channel association that refers to the bot. You can remove the reference -// to the alias by deleting the channel association. If you get the same exception -// again, delete the referring association until the DeleteBotAlias operation -// is successful. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation DeleteBotAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource that you are attempting to delete is referred to by another -// resource. Use this information to remove references to the resource that -// you are trying to delete. -// -// The body of the exception contains a JSON object that describes the resource. -// -// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, -// -// "resourceReference": { -// -// "name": string, "version": string } } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotAlias -func (c *LexModelBuildingService) DeleteBotAlias(input *DeleteBotAliasInput) (*DeleteBotAliasOutput, error) { - req, out := c.DeleteBotAliasRequest(input) - return out, req.Send() -} - -// DeleteBotAliasWithContext is the same as DeleteBotAlias with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBotAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) DeleteBotAliasWithContext(ctx aws.Context, input *DeleteBotAliasInput, opts ...request.Option) (*DeleteBotAliasOutput, error) { - req, out := c.DeleteBotAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBotChannelAssociation = "DeleteBotChannelAssociation" - -// DeleteBotChannelAssociationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBotChannelAssociation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBotChannelAssociation for more information on using the DeleteBotChannelAssociation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBotChannelAssociationRequest method. -// req, resp := client.DeleteBotChannelAssociationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotChannelAssociation -func (c *LexModelBuildingService) DeleteBotChannelAssociationRequest(input *DeleteBotChannelAssociationInput) (req *request.Request, output *DeleteBotChannelAssociationOutput) { - op := &request.Operation{ - Name: opDeleteBotChannelAssociation, - HTTPMethod: "DELETE", - HTTPPath: "/bots/{botName}/aliases/{aliasName}/channels/{name}", - } - - if input == nil { - input = &DeleteBotChannelAssociationInput{} - } - - output = &DeleteBotChannelAssociationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBotChannelAssociation API operation for Amazon Lex Model Building Service. -// -// Deletes the association between an Amazon Lex bot and a messaging platform. -// -// This operation requires permission for the lex:DeleteBotChannelAssociation -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation DeleteBotChannelAssociation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotChannelAssociation -func (c *LexModelBuildingService) DeleteBotChannelAssociation(input *DeleteBotChannelAssociationInput) (*DeleteBotChannelAssociationOutput, error) { - req, out := c.DeleteBotChannelAssociationRequest(input) - return out, req.Send() -} - -// DeleteBotChannelAssociationWithContext is the same as DeleteBotChannelAssociation with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBotChannelAssociation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) DeleteBotChannelAssociationWithContext(ctx aws.Context, input *DeleteBotChannelAssociationInput, opts ...request.Option) (*DeleteBotChannelAssociationOutput, error) { - req, out := c.DeleteBotChannelAssociationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBotVersion = "DeleteBotVersion" - -// DeleteBotVersionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBotVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBotVersion for more information on using the DeleteBotVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBotVersionRequest method. -// req, resp := client.DeleteBotVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotVersion -func (c *LexModelBuildingService) DeleteBotVersionRequest(input *DeleteBotVersionInput) (req *request.Request, output *DeleteBotVersionOutput) { - op := &request.Operation{ - Name: opDeleteBotVersion, - HTTPMethod: "DELETE", - HTTPPath: "/bots/{name}/versions/{version}", - } - - if input == nil { - input = &DeleteBotVersionInput{} - } - - output = &DeleteBotVersionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBotVersion API operation for Amazon Lex Model Building Service. -// -// Deletes a specific version of a bot. To delete all versions of a bot, use -// the DeleteBot operation. -// -// This operation requires permissions for the lex:DeleteBotVersion action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation DeleteBotVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource that you are attempting to delete is referred to by another -// resource. Use this information to remove references to the resource that -// you are trying to delete. -// -// The body of the exception contains a JSON object that describes the resource. -// -// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, -// -// "resourceReference": { -// -// "name": string, "version": string } } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotVersion -func (c *LexModelBuildingService) DeleteBotVersion(input *DeleteBotVersionInput) (*DeleteBotVersionOutput, error) { - req, out := c.DeleteBotVersionRequest(input) - return out, req.Send() -} - -// DeleteBotVersionWithContext is the same as DeleteBotVersion with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBotVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) DeleteBotVersionWithContext(ctx aws.Context, input *DeleteBotVersionInput, opts ...request.Option) (*DeleteBotVersionOutput, error) { - req, out := c.DeleteBotVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIntent = "DeleteIntent" - -// DeleteIntentRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIntent operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIntent for more information on using the DeleteIntent -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIntentRequest method. -// req, resp := client.DeleteIntentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntent -func (c *LexModelBuildingService) DeleteIntentRequest(input *DeleteIntentInput) (req *request.Request, output *DeleteIntentOutput) { - op := &request.Operation{ - Name: opDeleteIntent, - HTTPMethod: "DELETE", - HTTPPath: "/intents/{name}", - } - - if input == nil { - input = &DeleteIntentInput{} - } - - output = &DeleteIntentOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteIntent API operation for Amazon Lex Model Building Service. -// -// Deletes all versions of the intent, including the $LATEST version. To delete -// a specific version of the intent, use the DeleteIntentVersion operation. -// -// You can delete a version of an intent only if it is not referenced. To delete -// an intent that is referred to in one or more bots (see how-it-works), you -// must remove those references first. -// -// If you get the ResourceInUseException exception, it provides an example reference -// that shows where the intent is referenced. To remove the reference to the -// intent, either update the bot or delete it. If you get the same exception -// when you attempt to delete the intent again, repeat until the intent has -// no references and the call to DeleteIntent is successful. -// -// This operation requires permission for the lex:DeleteIntent action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation DeleteIntent for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource that you are attempting to delete is referred to by another -// resource. Use this information to remove references to the resource that -// you are trying to delete. -// -// The body of the exception contains a JSON object that describes the resource. -// -// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, -// -// "resourceReference": { -// -// "name": string, "version": string } } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntent -func (c *LexModelBuildingService) DeleteIntent(input *DeleteIntentInput) (*DeleteIntentOutput, error) { - req, out := c.DeleteIntentRequest(input) - return out, req.Send() -} - -// DeleteIntentWithContext is the same as DeleteIntent with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIntent for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) DeleteIntentWithContext(ctx aws.Context, input *DeleteIntentInput, opts ...request.Option) (*DeleteIntentOutput, error) { - req, out := c.DeleteIntentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIntentVersion = "DeleteIntentVersion" - -// DeleteIntentVersionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIntentVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIntentVersion for more information on using the DeleteIntentVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIntentVersionRequest method. -// req, resp := client.DeleteIntentVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntentVersion -func (c *LexModelBuildingService) DeleteIntentVersionRequest(input *DeleteIntentVersionInput) (req *request.Request, output *DeleteIntentVersionOutput) { - op := &request.Operation{ - Name: opDeleteIntentVersion, - HTTPMethod: "DELETE", - HTTPPath: "/intents/{name}/versions/{version}", - } - - if input == nil { - input = &DeleteIntentVersionInput{} - } - - output = &DeleteIntentVersionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteIntentVersion API operation for Amazon Lex Model Building Service. -// -// Deletes a specific version of an intent. To delete all versions of a intent, -// use the DeleteIntent operation. -// -// This operation requires permissions for the lex:DeleteIntentVersion action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation DeleteIntentVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource that you are attempting to delete is referred to by another -// resource. Use this information to remove references to the resource that -// you are trying to delete. -// -// The body of the exception contains a JSON object that describes the resource. -// -// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, -// -// "resourceReference": { -// -// "name": string, "version": string } } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntentVersion -func (c *LexModelBuildingService) DeleteIntentVersion(input *DeleteIntentVersionInput) (*DeleteIntentVersionOutput, error) { - req, out := c.DeleteIntentVersionRequest(input) - return out, req.Send() -} - -// DeleteIntentVersionWithContext is the same as DeleteIntentVersion with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIntentVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) DeleteIntentVersionWithContext(ctx aws.Context, input *DeleteIntentVersionInput, opts ...request.Option) (*DeleteIntentVersionOutput, error) { - req, out := c.DeleteIntentVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSlotType = "DeleteSlotType" - -// DeleteSlotTypeRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSlotType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSlotType for more information on using the DeleteSlotType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSlotTypeRequest method. -// req, resp := client.DeleteSlotTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotType -func (c *LexModelBuildingService) DeleteSlotTypeRequest(input *DeleteSlotTypeInput) (req *request.Request, output *DeleteSlotTypeOutput) { - op := &request.Operation{ - Name: opDeleteSlotType, - HTTPMethod: "DELETE", - HTTPPath: "/slottypes/{name}", - } - - if input == nil { - input = &DeleteSlotTypeInput{} - } - - output = &DeleteSlotTypeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSlotType API operation for Amazon Lex Model Building Service. -// -// Deletes all versions of the slot type, including the $LATEST version. To -// delete a specific version of the slot type, use the DeleteSlotTypeVersion -// operation. -// -// You can delete a version of a slot type only if it is not referenced. To -// delete a slot type that is referred to in one or more intents, you must remove -// those references first. -// -// If you get the ResourceInUseException exception, the exception provides an -// example reference that shows the intent where the slot type is referenced. -// To remove the reference to the slot type, either update the intent or delete -// it. If you get the same exception when you attempt to delete the slot type -// again, repeat until the slot type has no references and the DeleteSlotType -// call is successful. -// -// This operation requires permission for the lex:DeleteSlotType action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation DeleteSlotType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource that you are attempting to delete is referred to by another -// resource. Use this information to remove references to the resource that -// you are trying to delete. -// -// The body of the exception contains a JSON object that describes the resource. -// -// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, -// -// "resourceReference": { -// -// "name": string, "version": string } } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotType -func (c *LexModelBuildingService) DeleteSlotType(input *DeleteSlotTypeInput) (*DeleteSlotTypeOutput, error) { - req, out := c.DeleteSlotTypeRequest(input) - return out, req.Send() -} - -// DeleteSlotTypeWithContext is the same as DeleteSlotType with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSlotType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) DeleteSlotTypeWithContext(ctx aws.Context, input *DeleteSlotTypeInput, opts ...request.Option) (*DeleteSlotTypeOutput, error) { - req, out := c.DeleteSlotTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSlotTypeVersion = "DeleteSlotTypeVersion" - -// DeleteSlotTypeVersionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSlotTypeVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSlotTypeVersion for more information on using the DeleteSlotTypeVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSlotTypeVersionRequest method. -// req, resp := client.DeleteSlotTypeVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotTypeVersion -func (c *LexModelBuildingService) DeleteSlotTypeVersionRequest(input *DeleteSlotTypeVersionInput) (req *request.Request, output *DeleteSlotTypeVersionOutput) { - op := &request.Operation{ - Name: opDeleteSlotTypeVersion, - HTTPMethod: "DELETE", - HTTPPath: "/slottypes/{name}/version/{version}", - } - - if input == nil { - input = &DeleteSlotTypeVersionInput{} - } - - output = &DeleteSlotTypeVersionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSlotTypeVersion API operation for Amazon Lex Model Building Service. -// -// Deletes a specific version of a slot type. To delete all versions of a slot -// type, use the DeleteSlotType operation. -// -// This operation requires permissions for the lex:DeleteSlotTypeVersion action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation DeleteSlotTypeVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource that you are attempting to delete is referred to by another -// resource. Use this information to remove references to the resource that -// you are trying to delete. -// -// The body of the exception contains a JSON object that describes the resource. -// -// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, -// -// "resourceReference": { -// -// "name": string, "version": string } } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotTypeVersion -func (c *LexModelBuildingService) DeleteSlotTypeVersion(input *DeleteSlotTypeVersionInput) (*DeleteSlotTypeVersionOutput, error) { - req, out := c.DeleteSlotTypeVersionRequest(input) - return out, req.Send() -} - -// DeleteSlotTypeVersionWithContext is the same as DeleteSlotTypeVersion with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSlotTypeVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) DeleteSlotTypeVersionWithContext(ctx aws.Context, input *DeleteSlotTypeVersionInput, opts ...request.Option) (*DeleteSlotTypeVersionOutput, error) { - req, out := c.DeleteSlotTypeVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUtterances = "DeleteUtterances" - -// DeleteUtterancesRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUtterances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUtterances for more information on using the DeleteUtterances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteUtterancesRequest method. -// req, resp := client.DeleteUtterancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteUtterances -func (c *LexModelBuildingService) DeleteUtterancesRequest(input *DeleteUtterancesInput) (req *request.Request, output *DeleteUtterancesOutput) { - op := &request.Operation{ - Name: opDeleteUtterances, - HTTPMethod: "DELETE", - HTTPPath: "/bots/{botName}/utterances/{userId}", - } - - if input == nil { - input = &DeleteUtterancesInput{} - } - - output = &DeleteUtterancesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUtterances API operation for Amazon Lex Model Building Service. -// -// Deletes stored utterances. -// -// Amazon Lex stores the utterances that users send to your bot. Utterances -// are stored for 15 days for use with the GetUtterancesView operation, and -// then stored indefinitely for use in improving the ability of your bot to -// respond to user input. -// -// Use the DeleteStoredUtterances operation to manually delete stored utterances -// for a specific user. -// -// This operation requires permissions for the lex:DeleteUtterances action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation DeleteUtterances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteUtterances -func (c *LexModelBuildingService) DeleteUtterances(input *DeleteUtterancesInput) (*DeleteUtterancesOutput, error) { - req, out := c.DeleteUtterancesRequest(input) - return out, req.Send() -} - -// DeleteUtterancesWithContext is the same as DeleteUtterances with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUtterances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) DeleteUtterancesWithContext(ctx aws.Context, input *DeleteUtterancesInput, opts ...request.Option) (*DeleteUtterancesOutput, error) { - req, out := c.DeleteUtterancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBot = "GetBot" - -// GetBotRequest generates a "aws/request.Request" representing the -// client's request for the GetBot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBot for more information on using the GetBot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBotRequest method. -// req, resp := client.GetBotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBot -func (c *LexModelBuildingService) GetBotRequest(input *GetBotInput) (req *request.Request, output *GetBotOutput) { - op := &request.Operation{ - Name: opGetBot, - HTTPMethod: "GET", - HTTPPath: "/bots/{name}/versions/{versionoralias}", - } - - if input == nil { - input = &GetBotInput{} - } - - output = &GetBotOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBot API operation for Amazon Lex Model Building Service. -// -// Returns metadata information for a specific bot. You must provide the bot -// name and the bot version or alias. -// -// This operation requires permissions for the lex:GetBot action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetBot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBot -func (c *LexModelBuildingService) GetBot(input *GetBotInput) (*GetBotOutput, error) { - req, out := c.GetBotRequest(input) - return out, req.Send() -} - -// GetBotWithContext is the same as GetBot with the addition of -// the ability to pass a context and additional request options. -// -// See GetBot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetBotWithContext(ctx aws.Context, input *GetBotInput, opts ...request.Option) (*GetBotOutput, error) { - req, out := c.GetBotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBotAlias = "GetBotAlias" - -// GetBotAliasRequest generates a "aws/request.Request" representing the -// client's request for the GetBotAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBotAlias for more information on using the GetBotAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBotAliasRequest method. -// req, resp := client.GetBotAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAlias -func (c *LexModelBuildingService) GetBotAliasRequest(input *GetBotAliasInput) (req *request.Request, output *GetBotAliasOutput) { - op := &request.Operation{ - Name: opGetBotAlias, - HTTPMethod: "GET", - HTTPPath: "/bots/{botName}/aliases/{name}", - } - - if input == nil { - input = &GetBotAliasInput{} - } - - output = &GetBotAliasOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBotAlias API operation for Amazon Lex Model Building Service. -// -// Returns information about an Amazon Lex bot alias. For more information about -// aliases, see versioning-aliases. -// -// This operation requires permissions for the lex:GetBotAlias action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetBotAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAlias -func (c *LexModelBuildingService) GetBotAlias(input *GetBotAliasInput) (*GetBotAliasOutput, error) { - req, out := c.GetBotAliasRequest(input) - return out, req.Send() -} - -// GetBotAliasWithContext is the same as GetBotAlias with the addition of -// the ability to pass a context and additional request options. -// -// See GetBotAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetBotAliasWithContext(ctx aws.Context, input *GetBotAliasInput, opts ...request.Option) (*GetBotAliasOutput, error) { - req, out := c.GetBotAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBotAliases = "GetBotAliases" - -// GetBotAliasesRequest generates a "aws/request.Request" representing the -// client's request for the GetBotAliases operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBotAliases for more information on using the GetBotAliases -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBotAliasesRequest method. -// req, resp := client.GetBotAliasesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAliases -func (c *LexModelBuildingService) GetBotAliasesRequest(input *GetBotAliasesInput) (req *request.Request, output *GetBotAliasesOutput) { - op := &request.Operation{ - Name: opGetBotAliases, - HTTPMethod: "GET", - HTTPPath: "/bots/{botName}/aliases/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetBotAliasesInput{} - } - - output = &GetBotAliasesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBotAliases API operation for Amazon Lex Model Building Service. -// -// Returns a list of aliases for a specified Amazon Lex bot. -// -// This operation requires permissions for the lex:GetBotAliases action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetBotAliases for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAliases -func (c *LexModelBuildingService) GetBotAliases(input *GetBotAliasesInput) (*GetBotAliasesOutput, error) { - req, out := c.GetBotAliasesRequest(input) - return out, req.Send() -} - -// GetBotAliasesWithContext is the same as GetBotAliases with the addition of -// the ability to pass a context and additional request options. -// -// See GetBotAliases for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetBotAliasesWithContext(ctx aws.Context, input *GetBotAliasesInput, opts ...request.Option) (*GetBotAliasesOutput, error) { - req, out := c.GetBotAliasesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetBotAliasesPages iterates over the pages of a GetBotAliases operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetBotAliases 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 GetBotAliases operation. -// pageNum := 0 -// err := client.GetBotAliasesPages(params, -// func(page *GetBotAliasesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *LexModelBuildingService) GetBotAliasesPages(input *GetBotAliasesInput, fn func(*GetBotAliasesOutput, bool) bool) error { - return c.GetBotAliasesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetBotAliasesPagesWithContext same as GetBotAliasesPages 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 *LexModelBuildingService) GetBotAliasesPagesWithContext(ctx aws.Context, input *GetBotAliasesInput, fn func(*GetBotAliasesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetBotAliasesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetBotAliasesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetBotAliasesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetBotChannelAssociation = "GetBotChannelAssociation" - -// GetBotChannelAssociationRequest generates a "aws/request.Request" representing the -// client's request for the GetBotChannelAssociation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBotChannelAssociation for more information on using the GetBotChannelAssociation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBotChannelAssociationRequest method. -// req, resp := client.GetBotChannelAssociationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociation -func (c *LexModelBuildingService) GetBotChannelAssociationRequest(input *GetBotChannelAssociationInput) (req *request.Request, output *GetBotChannelAssociationOutput) { - op := &request.Operation{ - Name: opGetBotChannelAssociation, - HTTPMethod: "GET", - HTTPPath: "/bots/{botName}/aliases/{aliasName}/channels/{name}", - } - - if input == nil { - input = &GetBotChannelAssociationInput{} - } - - output = &GetBotChannelAssociationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBotChannelAssociation API operation for Amazon Lex Model Building Service. -// -// Returns information about the association between an Amazon Lex bot and a -// messaging platform. -// -// This operation requires permissions for the lex:GetBotChannelAssociation -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetBotChannelAssociation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociation -func (c *LexModelBuildingService) GetBotChannelAssociation(input *GetBotChannelAssociationInput) (*GetBotChannelAssociationOutput, error) { - req, out := c.GetBotChannelAssociationRequest(input) - return out, req.Send() -} - -// GetBotChannelAssociationWithContext is the same as GetBotChannelAssociation with the addition of -// the ability to pass a context and additional request options. -// -// See GetBotChannelAssociation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetBotChannelAssociationWithContext(ctx aws.Context, input *GetBotChannelAssociationInput, opts ...request.Option) (*GetBotChannelAssociationOutput, error) { - req, out := c.GetBotChannelAssociationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBotChannelAssociations = "GetBotChannelAssociations" - -// GetBotChannelAssociationsRequest generates a "aws/request.Request" representing the -// client's request for the GetBotChannelAssociations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBotChannelAssociations for more information on using the GetBotChannelAssociations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBotChannelAssociationsRequest method. -// req, resp := client.GetBotChannelAssociationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociations -func (c *LexModelBuildingService) GetBotChannelAssociationsRequest(input *GetBotChannelAssociationsInput) (req *request.Request, output *GetBotChannelAssociationsOutput) { - op := &request.Operation{ - Name: opGetBotChannelAssociations, - HTTPMethod: "GET", - HTTPPath: "/bots/{botName}/aliases/{aliasName}/channels/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetBotChannelAssociationsInput{} - } - - output = &GetBotChannelAssociationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBotChannelAssociations API operation for Amazon Lex Model Building Service. -// -// Returns a list of all of the channels associated with the specified bot. -// -// The GetBotChannelAssociations operation requires permissions for the lex:GetBotChannelAssociations -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetBotChannelAssociations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociations -func (c *LexModelBuildingService) GetBotChannelAssociations(input *GetBotChannelAssociationsInput) (*GetBotChannelAssociationsOutput, error) { - req, out := c.GetBotChannelAssociationsRequest(input) - return out, req.Send() -} - -// GetBotChannelAssociationsWithContext is the same as GetBotChannelAssociations with the addition of -// the ability to pass a context and additional request options. -// -// See GetBotChannelAssociations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetBotChannelAssociationsWithContext(ctx aws.Context, input *GetBotChannelAssociationsInput, opts ...request.Option) (*GetBotChannelAssociationsOutput, error) { - req, out := c.GetBotChannelAssociationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetBotChannelAssociationsPages iterates over the pages of a GetBotChannelAssociations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetBotChannelAssociations 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 GetBotChannelAssociations operation. -// pageNum := 0 -// err := client.GetBotChannelAssociationsPages(params, -// func(page *GetBotChannelAssociationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *LexModelBuildingService) GetBotChannelAssociationsPages(input *GetBotChannelAssociationsInput, fn func(*GetBotChannelAssociationsOutput, bool) bool) error { - return c.GetBotChannelAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetBotChannelAssociationsPagesWithContext same as GetBotChannelAssociationsPages 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 *LexModelBuildingService) GetBotChannelAssociationsPagesWithContext(ctx aws.Context, input *GetBotChannelAssociationsInput, fn func(*GetBotChannelAssociationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetBotChannelAssociationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetBotChannelAssociationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetBotChannelAssociationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetBotVersions = "GetBotVersions" - -// GetBotVersionsRequest generates a "aws/request.Request" representing the -// client's request for the GetBotVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBotVersions for more information on using the GetBotVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBotVersionsRequest method. -// req, resp := client.GetBotVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotVersions -func (c *LexModelBuildingService) GetBotVersionsRequest(input *GetBotVersionsInput) (req *request.Request, output *GetBotVersionsOutput) { - op := &request.Operation{ - Name: opGetBotVersions, - HTTPMethod: "GET", - HTTPPath: "/bots/{name}/versions/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetBotVersionsInput{} - } - - output = &GetBotVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBotVersions API operation for Amazon Lex Model Building Service. -// -// Gets information about all of the versions of a bot. -// -// The GetBotVersions operation returns a BotMetadata object for each version -// of a bot. For example, if a bot has three numbered versions, the GetBotVersions -// operation returns four BotMetadata objects in the response, one for each -// numbered version and one for the $LATEST version. -// -// The GetBotVersions operation always returns at least one version, the $LATEST -// version. -// -// This operation requires permissions for the lex:GetBotVersions action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetBotVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotVersions -func (c *LexModelBuildingService) GetBotVersions(input *GetBotVersionsInput) (*GetBotVersionsOutput, error) { - req, out := c.GetBotVersionsRequest(input) - return out, req.Send() -} - -// GetBotVersionsWithContext is the same as GetBotVersions with the addition of -// the ability to pass a context and additional request options. -// -// See GetBotVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetBotVersionsWithContext(ctx aws.Context, input *GetBotVersionsInput, opts ...request.Option) (*GetBotVersionsOutput, error) { - req, out := c.GetBotVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetBotVersionsPages iterates over the pages of a GetBotVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetBotVersions 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 GetBotVersions operation. -// pageNum := 0 -// err := client.GetBotVersionsPages(params, -// func(page *GetBotVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *LexModelBuildingService) GetBotVersionsPages(input *GetBotVersionsInput, fn func(*GetBotVersionsOutput, bool) bool) error { - return c.GetBotVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetBotVersionsPagesWithContext same as GetBotVersionsPages 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 *LexModelBuildingService) GetBotVersionsPagesWithContext(ctx aws.Context, input *GetBotVersionsInput, fn func(*GetBotVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetBotVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetBotVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetBotVersionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetBots = "GetBots" - -// GetBotsRequest generates a "aws/request.Request" representing the -// client's request for the GetBots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBots for more information on using the GetBots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBotsRequest method. -// req, resp := client.GetBotsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBots -func (c *LexModelBuildingService) GetBotsRequest(input *GetBotsInput) (req *request.Request, output *GetBotsOutput) { - op := &request.Operation{ - Name: opGetBots, - HTTPMethod: "GET", - HTTPPath: "/bots/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetBotsInput{} - } - - output = &GetBotsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBots API operation for Amazon Lex Model Building Service. -// -// Returns bot information as follows: -// -// * If you provide the nameContains field, the response includes information -// for the $LATEST version of all bots whose name contains the specified -// string. -// -// * If you don't specify the nameContains field, the operation returns information -// about the $LATEST version of all of your bots. -// -// This operation requires permission for the lex:GetBots action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetBots for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBots -func (c *LexModelBuildingService) GetBots(input *GetBotsInput) (*GetBotsOutput, error) { - req, out := c.GetBotsRequest(input) - return out, req.Send() -} - -// GetBotsWithContext is the same as GetBots with the addition of -// the ability to pass a context and additional request options. -// -// See GetBots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetBotsWithContext(ctx aws.Context, input *GetBotsInput, opts ...request.Option) (*GetBotsOutput, error) { - req, out := c.GetBotsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetBotsPages iterates over the pages of a GetBots operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetBots 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 GetBots operation. -// pageNum := 0 -// err := client.GetBotsPages(params, -// func(page *GetBotsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *LexModelBuildingService) GetBotsPages(input *GetBotsInput, fn func(*GetBotsOutput, bool) bool) error { - return c.GetBotsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetBotsPagesWithContext same as GetBotsPages 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 *LexModelBuildingService) GetBotsPagesWithContext(ctx aws.Context, input *GetBotsInput, fn func(*GetBotsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetBotsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetBotsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetBotsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetBuiltinIntent = "GetBuiltinIntent" - -// GetBuiltinIntentRequest generates a "aws/request.Request" representing the -// client's request for the GetBuiltinIntent operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBuiltinIntent for more information on using the GetBuiltinIntent -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBuiltinIntentRequest method. -// req, resp := client.GetBuiltinIntentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntent -func (c *LexModelBuildingService) GetBuiltinIntentRequest(input *GetBuiltinIntentInput) (req *request.Request, output *GetBuiltinIntentOutput) { - op := &request.Operation{ - Name: opGetBuiltinIntent, - HTTPMethod: "GET", - HTTPPath: "/builtins/intents/{signature}", - } - - if input == nil { - input = &GetBuiltinIntentInput{} - } - - output = &GetBuiltinIntentOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBuiltinIntent API operation for Amazon Lex Model Building Service. -// -// Returns information about a built-in intent. -// -// This operation requires permission for the lex:GetBuiltinIntent action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetBuiltinIntent for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntent -func (c *LexModelBuildingService) GetBuiltinIntent(input *GetBuiltinIntentInput) (*GetBuiltinIntentOutput, error) { - req, out := c.GetBuiltinIntentRequest(input) - return out, req.Send() -} - -// GetBuiltinIntentWithContext is the same as GetBuiltinIntent with the addition of -// the ability to pass a context and additional request options. -// -// See GetBuiltinIntent for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetBuiltinIntentWithContext(ctx aws.Context, input *GetBuiltinIntentInput, opts ...request.Option) (*GetBuiltinIntentOutput, error) { - req, out := c.GetBuiltinIntentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBuiltinIntents = "GetBuiltinIntents" - -// GetBuiltinIntentsRequest generates a "aws/request.Request" representing the -// client's request for the GetBuiltinIntents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBuiltinIntents for more information on using the GetBuiltinIntents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBuiltinIntentsRequest method. -// req, resp := client.GetBuiltinIntentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntents -func (c *LexModelBuildingService) GetBuiltinIntentsRequest(input *GetBuiltinIntentsInput) (req *request.Request, output *GetBuiltinIntentsOutput) { - op := &request.Operation{ - Name: opGetBuiltinIntents, - HTTPMethod: "GET", - HTTPPath: "/builtins/intents/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetBuiltinIntentsInput{} - } - - output = &GetBuiltinIntentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBuiltinIntents API operation for Amazon Lex Model Building Service. -// -// Gets a list of built-in intents that meet the specified criteria. -// -// This operation requires permission for the lex:GetBuiltinIntents action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetBuiltinIntents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntents -func (c *LexModelBuildingService) GetBuiltinIntents(input *GetBuiltinIntentsInput) (*GetBuiltinIntentsOutput, error) { - req, out := c.GetBuiltinIntentsRequest(input) - return out, req.Send() -} - -// GetBuiltinIntentsWithContext is the same as GetBuiltinIntents with the addition of -// the ability to pass a context and additional request options. -// -// See GetBuiltinIntents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetBuiltinIntentsWithContext(ctx aws.Context, input *GetBuiltinIntentsInput, opts ...request.Option) (*GetBuiltinIntentsOutput, error) { - req, out := c.GetBuiltinIntentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetBuiltinIntentsPages iterates over the pages of a GetBuiltinIntents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetBuiltinIntents 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 GetBuiltinIntents operation. -// pageNum := 0 -// err := client.GetBuiltinIntentsPages(params, -// func(page *GetBuiltinIntentsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *LexModelBuildingService) GetBuiltinIntentsPages(input *GetBuiltinIntentsInput, fn func(*GetBuiltinIntentsOutput, bool) bool) error { - return c.GetBuiltinIntentsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetBuiltinIntentsPagesWithContext same as GetBuiltinIntentsPages 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 *LexModelBuildingService) GetBuiltinIntentsPagesWithContext(ctx aws.Context, input *GetBuiltinIntentsInput, fn func(*GetBuiltinIntentsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetBuiltinIntentsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetBuiltinIntentsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetBuiltinIntentsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetBuiltinSlotTypes = "GetBuiltinSlotTypes" - -// GetBuiltinSlotTypesRequest generates a "aws/request.Request" representing the -// client's request for the GetBuiltinSlotTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBuiltinSlotTypes for more information on using the GetBuiltinSlotTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBuiltinSlotTypesRequest method. -// req, resp := client.GetBuiltinSlotTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinSlotTypes -func (c *LexModelBuildingService) GetBuiltinSlotTypesRequest(input *GetBuiltinSlotTypesInput) (req *request.Request, output *GetBuiltinSlotTypesOutput) { - op := &request.Operation{ - Name: opGetBuiltinSlotTypes, - HTTPMethod: "GET", - HTTPPath: "/builtins/slottypes/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetBuiltinSlotTypesInput{} - } - - output = &GetBuiltinSlotTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBuiltinSlotTypes API operation for Amazon Lex Model Building Service. -// -// Gets a list of built-in slot types that meet the specified criteria. -// -// For a list of built-in slot types, see Slot Type Reference (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference) -// in the Alexa Skills Kit. -// -// This operation requires permission for the lex:GetBuiltInSlotTypes action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetBuiltinSlotTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinSlotTypes -func (c *LexModelBuildingService) GetBuiltinSlotTypes(input *GetBuiltinSlotTypesInput) (*GetBuiltinSlotTypesOutput, error) { - req, out := c.GetBuiltinSlotTypesRequest(input) - return out, req.Send() -} - -// GetBuiltinSlotTypesWithContext is the same as GetBuiltinSlotTypes with the addition of -// the ability to pass a context and additional request options. -// -// See GetBuiltinSlotTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetBuiltinSlotTypesWithContext(ctx aws.Context, input *GetBuiltinSlotTypesInput, opts ...request.Option) (*GetBuiltinSlotTypesOutput, error) { - req, out := c.GetBuiltinSlotTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetBuiltinSlotTypesPages iterates over the pages of a GetBuiltinSlotTypes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetBuiltinSlotTypes 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 GetBuiltinSlotTypes operation. -// pageNum := 0 -// err := client.GetBuiltinSlotTypesPages(params, -// func(page *GetBuiltinSlotTypesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *LexModelBuildingService) GetBuiltinSlotTypesPages(input *GetBuiltinSlotTypesInput, fn func(*GetBuiltinSlotTypesOutput, bool) bool) error { - return c.GetBuiltinSlotTypesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetBuiltinSlotTypesPagesWithContext same as GetBuiltinSlotTypesPages 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 *LexModelBuildingService) GetBuiltinSlotTypesPagesWithContext(ctx aws.Context, input *GetBuiltinSlotTypesInput, fn func(*GetBuiltinSlotTypesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetBuiltinSlotTypesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetBuiltinSlotTypesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetBuiltinSlotTypesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetExport = "GetExport" - -// GetExportRequest generates a "aws/request.Request" representing the -// client's request for the GetExport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetExport for more information on using the GetExport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetExportRequest method. -// req, resp := client.GetExportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetExport -func (c *LexModelBuildingService) GetExportRequest(input *GetExportInput) (req *request.Request, output *GetExportOutput) { - op := &request.Operation{ - Name: opGetExport, - HTTPMethod: "GET", - HTTPPath: "/exports/", - } - - if input == nil { - input = &GetExportInput{} - } - - output = &GetExportOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetExport API operation for Amazon Lex Model Building Service. -// -// Exports the contents of a Amazon Lex resource in a specified format. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetExport for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetExport -func (c *LexModelBuildingService) GetExport(input *GetExportInput) (*GetExportOutput, error) { - req, out := c.GetExportRequest(input) - return out, req.Send() -} - -// GetExportWithContext is the same as GetExport with the addition of -// the ability to pass a context and additional request options. -// -// See GetExport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetExportWithContext(ctx aws.Context, input *GetExportInput, opts ...request.Option) (*GetExportOutput, error) { - req, out := c.GetExportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetImport = "GetImport" - -// GetImportRequest generates a "aws/request.Request" representing the -// client's request for the GetImport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetImport for more information on using the GetImport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetImportRequest method. -// req, resp := client.GetImportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetImport -func (c *LexModelBuildingService) GetImportRequest(input *GetImportInput) (req *request.Request, output *GetImportOutput) { - op := &request.Operation{ - Name: opGetImport, - HTTPMethod: "GET", - HTTPPath: "/imports/{importId}", - } - - if input == nil { - input = &GetImportInput{} - } - - output = &GetImportOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetImport API operation for Amazon Lex Model Building Service. -// -// Gets information about an import job started with the StartImport operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetImport for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetImport -func (c *LexModelBuildingService) GetImport(input *GetImportInput) (*GetImportOutput, error) { - req, out := c.GetImportRequest(input) - return out, req.Send() -} - -// GetImportWithContext is the same as GetImport with the addition of -// the ability to pass a context and additional request options. -// -// See GetImport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetImportWithContext(ctx aws.Context, input *GetImportInput, opts ...request.Option) (*GetImportOutput, error) { - req, out := c.GetImportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIntent = "GetIntent" - -// GetIntentRequest generates a "aws/request.Request" representing the -// client's request for the GetIntent operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIntent for more information on using the GetIntent -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIntentRequest method. -// req, resp := client.GetIntentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntent -func (c *LexModelBuildingService) GetIntentRequest(input *GetIntentInput) (req *request.Request, output *GetIntentOutput) { - op := &request.Operation{ - Name: opGetIntent, - HTTPMethod: "GET", - HTTPPath: "/intents/{name}/versions/{version}", - } - - if input == nil { - input = &GetIntentInput{} - } - - output = &GetIntentOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIntent API operation for Amazon Lex Model Building Service. -// -// Returns information about an intent. In addition to the intent name, you -// must specify the intent version. -// -// This operation requires permissions to perform the lex:GetIntent action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetIntent for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntent -func (c *LexModelBuildingService) GetIntent(input *GetIntentInput) (*GetIntentOutput, error) { - req, out := c.GetIntentRequest(input) - return out, req.Send() -} - -// GetIntentWithContext is the same as GetIntent with the addition of -// the ability to pass a context and additional request options. -// -// See GetIntent for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetIntentWithContext(ctx aws.Context, input *GetIntentInput, opts ...request.Option) (*GetIntentOutput, error) { - req, out := c.GetIntentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIntentVersions = "GetIntentVersions" - -// GetIntentVersionsRequest generates a "aws/request.Request" representing the -// client's request for the GetIntentVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIntentVersions for more information on using the GetIntentVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIntentVersionsRequest method. -// req, resp := client.GetIntentVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentVersions -func (c *LexModelBuildingService) GetIntentVersionsRequest(input *GetIntentVersionsInput) (req *request.Request, output *GetIntentVersionsOutput) { - op := &request.Operation{ - Name: opGetIntentVersions, - HTTPMethod: "GET", - HTTPPath: "/intents/{name}/versions/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetIntentVersionsInput{} - } - - output = &GetIntentVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIntentVersions API operation for Amazon Lex Model Building Service. -// -// Gets information about all of the versions of an intent. -// -// The GetIntentVersions operation returns an IntentMetadata object for each -// version of an intent. For example, if an intent has three numbered versions, -// the GetIntentVersions operation returns four IntentMetadata objects in the -// response, one for each numbered version and one for the $LATEST version. -// -// The GetIntentVersions operation always returns at least one version, the -// $LATEST version. -// -// This operation requires permissions for the lex:GetIntentVersions action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetIntentVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentVersions -func (c *LexModelBuildingService) GetIntentVersions(input *GetIntentVersionsInput) (*GetIntentVersionsOutput, error) { - req, out := c.GetIntentVersionsRequest(input) - return out, req.Send() -} - -// GetIntentVersionsWithContext is the same as GetIntentVersions with the addition of -// the ability to pass a context and additional request options. -// -// See GetIntentVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetIntentVersionsWithContext(ctx aws.Context, input *GetIntentVersionsInput, opts ...request.Option) (*GetIntentVersionsOutput, error) { - req, out := c.GetIntentVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetIntentVersionsPages iterates over the pages of a GetIntentVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetIntentVersions 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 GetIntentVersions operation. -// pageNum := 0 -// err := client.GetIntentVersionsPages(params, -// func(page *GetIntentVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *LexModelBuildingService) GetIntentVersionsPages(input *GetIntentVersionsInput, fn func(*GetIntentVersionsOutput, bool) bool) error { - return c.GetIntentVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetIntentVersionsPagesWithContext same as GetIntentVersionsPages 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 *LexModelBuildingService) GetIntentVersionsPagesWithContext(ctx aws.Context, input *GetIntentVersionsInput, fn func(*GetIntentVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetIntentVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetIntentVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetIntentVersionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetIntents = "GetIntents" - -// GetIntentsRequest generates a "aws/request.Request" representing the -// client's request for the GetIntents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIntents for more information on using the GetIntents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIntentsRequest method. -// req, resp := client.GetIntentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntents -func (c *LexModelBuildingService) GetIntentsRequest(input *GetIntentsInput) (req *request.Request, output *GetIntentsOutput) { - op := &request.Operation{ - Name: opGetIntents, - HTTPMethod: "GET", - HTTPPath: "/intents/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetIntentsInput{} - } - - output = &GetIntentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIntents API operation for Amazon Lex Model Building Service. -// -// Returns intent information as follows: -// -// * If you specify the nameContains field, returns the $LATEST version of -// all intents that contain the specified string. -// -// * If you don't specify the nameContains field, returns information about -// the $LATEST version of all intents. -// -// The operation requires permission for the lex:GetIntents action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetIntents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntents -func (c *LexModelBuildingService) GetIntents(input *GetIntentsInput) (*GetIntentsOutput, error) { - req, out := c.GetIntentsRequest(input) - return out, req.Send() -} - -// GetIntentsWithContext is the same as GetIntents with the addition of -// the ability to pass a context and additional request options. -// -// See GetIntents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetIntentsWithContext(ctx aws.Context, input *GetIntentsInput, opts ...request.Option) (*GetIntentsOutput, error) { - req, out := c.GetIntentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetIntentsPages iterates over the pages of a GetIntents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetIntents 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 GetIntents operation. -// pageNum := 0 -// err := client.GetIntentsPages(params, -// func(page *GetIntentsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *LexModelBuildingService) GetIntentsPages(input *GetIntentsInput, fn func(*GetIntentsOutput, bool) bool) error { - return c.GetIntentsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetIntentsPagesWithContext same as GetIntentsPages 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 *LexModelBuildingService) GetIntentsPagesWithContext(ctx aws.Context, input *GetIntentsInput, fn func(*GetIntentsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetIntentsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetIntentsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetIntentsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetSlotType = "GetSlotType" - -// GetSlotTypeRequest generates a "aws/request.Request" representing the -// client's request for the GetSlotType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSlotType for more information on using the GetSlotType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSlotTypeRequest method. -// req, resp := client.GetSlotTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotType -func (c *LexModelBuildingService) GetSlotTypeRequest(input *GetSlotTypeInput) (req *request.Request, output *GetSlotTypeOutput) { - op := &request.Operation{ - Name: opGetSlotType, - HTTPMethod: "GET", - HTTPPath: "/slottypes/{name}/versions/{version}", - } - - if input == nil { - input = &GetSlotTypeInput{} - } - - output = &GetSlotTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSlotType API operation for Amazon Lex Model Building Service. -// -// Returns information about a specific version of a slot type. In addition -// to specifying the slot type name, you must specify the slot type version. -// -// This operation requires permissions for the lex:GetSlotType action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetSlotType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotType -func (c *LexModelBuildingService) GetSlotType(input *GetSlotTypeInput) (*GetSlotTypeOutput, error) { - req, out := c.GetSlotTypeRequest(input) - return out, req.Send() -} - -// GetSlotTypeWithContext is the same as GetSlotType with the addition of -// the ability to pass a context and additional request options. -// -// See GetSlotType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetSlotTypeWithContext(ctx aws.Context, input *GetSlotTypeInput, opts ...request.Option) (*GetSlotTypeOutput, error) { - req, out := c.GetSlotTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSlotTypeVersions = "GetSlotTypeVersions" - -// GetSlotTypeVersionsRequest generates a "aws/request.Request" representing the -// client's request for the GetSlotTypeVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSlotTypeVersions for more information on using the GetSlotTypeVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSlotTypeVersionsRequest method. -// req, resp := client.GetSlotTypeVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypeVersions -func (c *LexModelBuildingService) GetSlotTypeVersionsRequest(input *GetSlotTypeVersionsInput) (req *request.Request, output *GetSlotTypeVersionsOutput) { - op := &request.Operation{ - Name: opGetSlotTypeVersions, - HTTPMethod: "GET", - HTTPPath: "/slottypes/{name}/versions/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetSlotTypeVersionsInput{} - } - - output = &GetSlotTypeVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSlotTypeVersions API operation for Amazon Lex Model Building Service. -// -// Gets information about all versions of a slot type. -// -// The GetSlotTypeVersions operation returns a SlotTypeMetadata object for each -// version of a slot type. For example, if a slot type has three numbered versions, -// the GetSlotTypeVersions operation returns four SlotTypeMetadata objects in -// the response, one for each numbered version and one for the $LATEST version. -// -// The GetSlotTypeVersions operation always returns at least one version, the -// $LATEST version. -// -// This operation requires permissions for the lex:GetSlotTypeVersions action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetSlotTypeVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypeVersions -func (c *LexModelBuildingService) GetSlotTypeVersions(input *GetSlotTypeVersionsInput) (*GetSlotTypeVersionsOutput, error) { - req, out := c.GetSlotTypeVersionsRequest(input) - return out, req.Send() -} - -// GetSlotTypeVersionsWithContext is the same as GetSlotTypeVersions with the addition of -// the ability to pass a context and additional request options. -// -// See GetSlotTypeVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetSlotTypeVersionsWithContext(ctx aws.Context, input *GetSlotTypeVersionsInput, opts ...request.Option) (*GetSlotTypeVersionsOutput, error) { - req, out := c.GetSlotTypeVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetSlotTypeVersionsPages iterates over the pages of a GetSlotTypeVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetSlotTypeVersions 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 GetSlotTypeVersions operation. -// pageNum := 0 -// err := client.GetSlotTypeVersionsPages(params, -// func(page *GetSlotTypeVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *LexModelBuildingService) GetSlotTypeVersionsPages(input *GetSlotTypeVersionsInput, fn func(*GetSlotTypeVersionsOutput, bool) bool) error { - return c.GetSlotTypeVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetSlotTypeVersionsPagesWithContext same as GetSlotTypeVersionsPages 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 *LexModelBuildingService) GetSlotTypeVersionsPagesWithContext(ctx aws.Context, input *GetSlotTypeVersionsInput, fn func(*GetSlotTypeVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetSlotTypeVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetSlotTypeVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetSlotTypeVersionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetSlotTypes = "GetSlotTypes" - -// GetSlotTypesRequest generates a "aws/request.Request" representing the -// client's request for the GetSlotTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSlotTypes for more information on using the GetSlotTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSlotTypesRequest method. -// req, resp := client.GetSlotTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypes -func (c *LexModelBuildingService) GetSlotTypesRequest(input *GetSlotTypesInput) (req *request.Request, output *GetSlotTypesOutput) { - op := &request.Operation{ - Name: opGetSlotTypes, - HTTPMethod: "GET", - HTTPPath: "/slottypes/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetSlotTypesInput{} - } - - output = &GetSlotTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSlotTypes API operation for Amazon Lex Model Building Service. -// -// Returns slot type information as follows: -// -// * If you specify the nameContains field, returns the $LATEST version of -// all slot types that contain the specified string. -// -// * If you don't specify the nameContains field, returns information about -// the $LATEST version of all slot types. -// -// The operation requires permission for the lex:GetSlotTypes action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetSlotTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypes -func (c *LexModelBuildingService) GetSlotTypes(input *GetSlotTypesInput) (*GetSlotTypesOutput, error) { - req, out := c.GetSlotTypesRequest(input) - return out, req.Send() -} - -// GetSlotTypesWithContext is the same as GetSlotTypes with the addition of -// the ability to pass a context and additional request options. -// -// See GetSlotTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetSlotTypesWithContext(ctx aws.Context, input *GetSlotTypesInput, opts ...request.Option) (*GetSlotTypesOutput, error) { - req, out := c.GetSlotTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetSlotTypesPages iterates over the pages of a GetSlotTypes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetSlotTypes 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 GetSlotTypes operation. -// pageNum := 0 -// err := client.GetSlotTypesPages(params, -// func(page *GetSlotTypesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *LexModelBuildingService) GetSlotTypesPages(input *GetSlotTypesInput, fn func(*GetSlotTypesOutput, bool) bool) error { - return c.GetSlotTypesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetSlotTypesPagesWithContext same as GetSlotTypesPages 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 *LexModelBuildingService) GetSlotTypesPagesWithContext(ctx aws.Context, input *GetSlotTypesInput, fn func(*GetSlotTypesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetSlotTypesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetSlotTypesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetSlotTypesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetUtterancesView = "GetUtterancesView" - -// GetUtterancesViewRequest generates a "aws/request.Request" representing the -// client's request for the GetUtterancesView operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUtterancesView for more information on using the GetUtterancesView -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUtterancesViewRequest method. -// req, resp := client.GetUtterancesViewRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetUtterancesView -func (c *LexModelBuildingService) GetUtterancesViewRequest(input *GetUtterancesViewInput) (req *request.Request, output *GetUtterancesViewOutput) { - op := &request.Operation{ - Name: opGetUtterancesView, - HTTPMethod: "GET", - HTTPPath: "/bots/{botname}/utterances?view=aggregation", - } - - if input == nil { - input = &GetUtterancesViewInput{} - } - - output = &GetUtterancesViewOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUtterancesView API operation for Amazon Lex Model Building Service. -// -// Use the GetUtterancesView operation to get information about the utterances -// that your users have made to your bot. You can use this list to tune the -// utterances that your bot responds to. -// -// For example, say that you have created a bot to order flowers. After your -// users have used your bot for a while, use the GetUtterancesView operation -// to see the requests that they have made and whether they have been successful. -// You might find that the utterance "I want flowers" is not being recognized. -// You could add this utterance to the OrderFlowers intent so that your bot -// recognizes that utterance. -// -// After you publish a new version of a bot, you can get information about the -// old version and the new so that you can compare the performance across the -// two versions. -// -// Utterance statistics are generated once a day. Data is available for the -// last 15 days. You can request information for up to 5 versions in each request. -// The response contains information about a maximum of 100 utterances for each -// version. -// -// This operation requires permissions for the lex:GetUtterancesView action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation GetUtterancesView for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetUtterancesView -func (c *LexModelBuildingService) GetUtterancesView(input *GetUtterancesViewInput) (*GetUtterancesViewOutput, error) { - req, out := c.GetUtterancesViewRequest(input) - return out, req.Send() -} - -// GetUtterancesViewWithContext is the same as GetUtterancesView with the addition of -// the ability to pass a context and additional request options. -// -// See GetUtterancesView for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) GetUtterancesViewWithContext(ctx aws.Context, input *GetUtterancesViewInput, opts ...request.Option) (*GetUtterancesViewOutput, error) { - req, out := c.GetUtterancesViewRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBot = "PutBot" - -// PutBotRequest generates a "aws/request.Request" representing the -// client's request for the PutBot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutBot for more information on using the PutBot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutBotRequest method. -// req, resp := client.PutBotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBot -func (c *LexModelBuildingService) PutBotRequest(input *PutBotInput) (req *request.Request, output *PutBotOutput) { - op := &request.Operation{ - Name: opPutBot, - HTTPMethod: "PUT", - HTTPPath: "/bots/{name}/versions/$LATEST", - } - - if input == nil { - input = &PutBotInput{} - } - - output = &PutBotOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutBot API operation for Amazon Lex Model Building Service. -// -// Creates an Amazon Lex conversational bot or replaces an existing bot. When -// you create or update a bot you are only required to specify a name, a locale, -// and whether the bot is directed toward children under age 13. You can use -// this to add intents later, or to remove intents from an existing bot. When -// you create a bot with the minimum information, the bot is created or updated -// but Amazon Lex returns the response FAILED. You can build the bot after you add one or more intents. For more information -// about Amazon Lex bots, see how-it-works. -// -// If you specify the name of an existing bot, the fields in the request replace -// the existing values in the $LATESTversion of the bot. Amazon Lex removes any fields that you don't provide -// values for in the request, except for the idleTTLInSecondsand privacySettingsfields, which are set to their default values. If you don't specify values -// for required fields, Amazon Lex throws an exception. -// -// This operation requires permissions for the lex:PutBotaction. For more information, see auth-and-access-control -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation PutBot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The checksum of the resource that you are trying to change does not match -// the checksum in the request. Check the resource's checksum and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBot -func (c *LexModelBuildingService) PutBot(input *PutBotInput) (*PutBotOutput, error) { - req, out := c.PutBotRequest(input) - return out, req.Send() -} - -// PutBotWithContext is the same as PutBot with the addition of -// the ability to pass a context and additional request options. -// -// See PutBot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) PutBotWithContext(ctx aws.Context, input *PutBotInput, opts ...request.Option) (*PutBotOutput, error) { - req, out := c.PutBotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBotAlias = "PutBotAlias" - -// PutBotAliasRequest generates a "aws/request.Request" representing the -// client's request for the PutBotAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutBotAlias for more information on using the PutBotAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutBotAliasRequest method. -// req, resp := client.PutBotAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBotAlias -func (c *LexModelBuildingService) PutBotAliasRequest(input *PutBotAliasInput) (req *request.Request, output *PutBotAliasOutput) { - op := &request.Operation{ - Name: opPutBotAlias, - HTTPMethod: "PUT", - HTTPPath: "/bots/{botName}/aliases/{name}", - } - - if input == nil { - input = &PutBotAliasInput{} - } - - output = &PutBotAliasOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutBotAlias API operation for Amazon Lex Model Building Service. -// -// Creates an alias for the specified version of the bot or replaces an alias -// for the specified bot. To change the version of the bot that the alias points -// to, replace the alias. For more information about aliases, see versioning-aliases. -// -// This operation requires permissions for the lex:PutBotAlias action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation PutBotAlias for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The checksum of the resource that you are trying to change does not match -// the checksum in the request. Check the resource's checksum and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBotAlias -func (c *LexModelBuildingService) PutBotAlias(input *PutBotAliasInput) (*PutBotAliasOutput, error) { - req, out := c.PutBotAliasRequest(input) - return out, req.Send() -} - -// PutBotAliasWithContext is the same as PutBotAlias with the addition of -// the ability to pass a context and additional request options. -// -// See PutBotAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) PutBotAliasWithContext(ctx aws.Context, input *PutBotAliasInput, opts ...request.Option) (*PutBotAliasOutput, error) { - req, out := c.PutBotAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutIntent = "PutIntent" - -// PutIntentRequest generates a "aws/request.Request" representing the -// client's request for the PutIntent operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutIntent for more information on using the PutIntent -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutIntentRequest method. -// req, resp := client.PutIntentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutIntent -func (c *LexModelBuildingService) PutIntentRequest(input *PutIntentInput) (req *request.Request, output *PutIntentOutput) { - op := &request.Operation{ - Name: opPutIntent, - HTTPMethod: "PUT", - HTTPPath: "/intents/{name}/versions/$LATEST", - } - - if input == nil { - input = &PutIntentInput{} - } - - output = &PutIntentOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutIntent API operation for Amazon Lex Model Building Service. -// -// Creates an intent or replaces an existing intent. -// -// To define the interaction between the user and your bot, you use one or more -// intents. For a pizza ordering bot, for example, you would create an OrderPizza -// intent. -// -// To create an intent or replace an existing intent, you must provide the following: -// -// * Intent name. For example, OrderPizza. -// -// * Sample utterances. For example, "Can I order a pizza, please." and "I -// want to order a pizza." -// -// * Information to be gathered. You specify slot types for the information -// that your bot will request from the user. You can specify standard slot -// types, such as a date or a time, or custom slot types such as the size -// and crust of a pizza. -// -// * How the intent will be fulfilled. You can provide a Lambda function -// or configure the intent to return the intent information to the client -// application. If you use a Lambda function, when all of the intent information -// is available, Amazon Lex invokes your Lambda function. If you configure -// your intent to return the intent information to the client application. -// -// -// You can specify other optional information in the request, such as: -// -// * A confirmation prompt to ask the user to confirm an intent. For example, -// "Shall I order your pizza?" -// -// * A conclusion statement to send to the user after the intent has been -// fulfilled. For example, "I placed your pizza order." -// -// * A follow-up prompt that asks the user for additional activity. For example, -// asking "Do you want to order a drink with your pizza?" -// -// If you specify an existing intent name to update the intent, Amazon Lex replaces -// the values in the $LATEST version of the intent with the values in the request. -// Amazon Lex removes fields that you don't provide in the request. If you don't -// specify the required fields, Amazon Lex throws an exception. When you update -// the $LATEST version of an intent, the status field of any bot that uses the -// $LATEST version of the intent is set to NOT_BUILT. -// -// For more information, see how-it-works. -// -// This operation requires permissions for the lex:PutIntent action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation PutIntent for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The checksum of the resource that you are trying to change does not match -// the checksum in the request. Check the resource's checksum and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutIntent -func (c *LexModelBuildingService) PutIntent(input *PutIntentInput) (*PutIntentOutput, error) { - req, out := c.PutIntentRequest(input) - return out, req.Send() -} - -// PutIntentWithContext is the same as PutIntent with the addition of -// the ability to pass a context and additional request options. -// -// See PutIntent for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) PutIntentWithContext(ctx aws.Context, input *PutIntentInput, opts ...request.Option) (*PutIntentOutput, error) { - req, out := c.PutIntentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutSlotType = "PutSlotType" - -// PutSlotTypeRequest generates a "aws/request.Request" representing the -// client's request for the PutSlotType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutSlotType for more information on using the PutSlotType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutSlotTypeRequest method. -// req, resp := client.PutSlotTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutSlotType -func (c *LexModelBuildingService) PutSlotTypeRequest(input *PutSlotTypeInput) (req *request.Request, output *PutSlotTypeOutput) { - op := &request.Operation{ - Name: opPutSlotType, - HTTPMethod: "PUT", - HTTPPath: "/slottypes/{name}/versions/$LATEST", - } - - if input == nil { - input = &PutSlotTypeInput{} - } - - output = &PutSlotTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutSlotType API operation for Amazon Lex Model Building Service. -// -// Creates a custom slot type or replaces an existing custom slot type. -// -// To create a custom slot type, specify a name for the slot type and a set -// of enumeration values, which are the values that a slot of this type can -// assume. For more information, see how-it-works. -// -// If you specify the name of an existing slot type, the fields in the request -// replace the existing values in the $LATEST version of the slot type. Amazon -// Lex removes the fields that you don't provide in the request. If you don't -// specify required fields, Amazon Lex throws an exception. When you update -// the $LATEST version of a slot type, if a bot uses the $LATEST version of -// an intent that contains the slot type, the bot's status field is set to NOT_BUILT. -// -// This operation requires permissions for the lex:PutSlotType action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation PutSlotType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConflictException "ConflictException" -// There was a conflict processing the request. Try your request again. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The checksum of the resource that you are trying to change does not match -// the checksum in the request. Check the resource's checksum and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutSlotType -func (c *LexModelBuildingService) PutSlotType(input *PutSlotTypeInput) (*PutSlotTypeOutput, error) { - req, out := c.PutSlotTypeRequest(input) - return out, req.Send() -} - -// PutSlotTypeWithContext is the same as PutSlotType with the addition of -// the ability to pass a context and additional request options. -// -// See PutSlotType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) PutSlotTypeWithContext(ctx aws.Context, input *PutSlotTypeInput, opts ...request.Option) (*PutSlotTypeOutput, error) { - req, out := c.PutSlotTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartImport = "StartImport" - -// StartImportRequest generates a "aws/request.Request" representing the -// client's request for the StartImport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartImport for more information on using the StartImport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartImportRequest method. -// req, resp := client.StartImportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/StartImport -func (c *LexModelBuildingService) StartImportRequest(input *StartImportInput) (req *request.Request, output *StartImportOutput) { - op := &request.Operation{ - Name: opStartImport, - HTTPMethod: "POST", - HTTPPath: "/imports/", - } - - if input == nil { - input = &StartImportInput{} - } - - output = &StartImportOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartImport API operation for Amazon Lex Model Building Service. -// -// Starts a job to import a resource to Amazon Lex. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lex Model Building Service's -// API operation StartImport for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// -// * ErrCodeInternalFailureException "InternalFailureException" -// An internal Amazon Lex error occurred. Try your request again. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/StartImport -func (c *LexModelBuildingService) StartImport(input *StartImportInput) (*StartImportOutput, error) { - req, out := c.StartImportRequest(input) - return out, req.Send() -} - -// StartImportWithContext is the same as StartImport with the addition of -// the ability to pass a context and additional request options. -// -// See StartImport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LexModelBuildingService) StartImportWithContext(ctx aws.Context, input *StartImportInput, opts ...request.Option) (*StartImportOutput, error) { - req, out := c.StartImportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Provides information about a bot alias. -type BotAliasMetadata struct { - _ struct{} `type:"structure"` - - // The name of the bot to which the alias points. - BotName *string `locationName:"botName" min:"2" type:"string"` - - // The version of the Amazon Lex bot to which the alias points. - BotVersion *string `locationName:"botVersion" min:"1" type:"string"` - - // Checksum of the bot alias. - Checksum *string `locationName:"checksum" type:"string"` - - // The date that the bot alias was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the bot alias. - Description *string `locationName:"description" type:"string"` - - // The date that the bot alias was updated. When you create a resource, the - // creation date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The name of the bot alias. - Name *string `locationName:"name" min:"1" type:"string"` -} - -// String returns the string representation -func (s BotAliasMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BotAliasMetadata) GoString() string { - return s.String() -} - -// SetBotName sets the BotName field's value. -func (s *BotAliasMetadata) SetBotName(v string) *BotAliasMetadata { - s.BotName = &v - return s -} - -// SetBotVersion sets the BotVersion field's value. -func (s *BotAliasMetadata) SetBotVersion(v string) *BotAliasMetadata { - s.BotVersion = &v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *BotAliasMetadata) SetChecksum(v string) *BotAliasMetadata { - s.Checksum = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *BotAliasMetadata) SetCreatedDate(v time.Time) *BotAliasMetadata { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *BotAliasMetadata) SetDescription(v string) *BotAliasMetadata { - s.Description = &v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *BotAliasMetadata) SetLastUpdatedDate(v time.Time) *BotAliasMetadata { - s.LastUpdatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *BotAliasMetadata) SetName(v string) *BotAliasMetadata { - s.Name = &v - return s -} - -// Represents an association between an Amazon Lex bot and an external messaging -// platform. -type BotChannelAssociation struct { - _ struct{} `type:"structure"` - - // An alias pointing to the specific version of the Amazon Lex bot to which - // this association is being made. - BotAlias *string `locationName:"botAlias" min:"1" type:"string"` - - // Provides information necessary to communicate with the messaging platform. - BotConfiguration map[string]*string `locationName:"botConfiguration" min:"1" type:"map" sensitive:"true"` - - // The name of the Amazon Lex bot to which this association is being made. - // - // Currently, Amazon Lex supports associations with Facebook and Slack, and - // Twilio. - BotName *string `locationName:"botName" min:"2" type:"string"` - - // The date that the association between the Amazon Lex bot and the channel - // was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A text description of the association you are creating. - Description *string `locationName:"description" type:"string"` - - // If status is FAILED, Amazon Lex provides the reason that it failed to create - // the association. - FailureReason *string `locationName:"failureReason" type:"string"` - - // The name of the association between the bot and the channel. - Name *string `locationName:"name" min:"1" type:"string"` - - // The status of the bot channel. - // - // * CREATED - The channel has been created and is ready for use. - // - // * IN_PROGRESS - Channel creation is in progress. - // - // * FAILED - There was an error creating the channel. For information about - // the reason for the failure, see the failureReason field. - Status *string `locationName:"status" type:"string" enum:"ChannelStatus"` - - // Specifies the type of association by indicating the type of channel being - // established between the Amazon Lex bot and the external messaging platform. - Type *string `locationName:"type" type:"string" enum:"ChannelType"` -} - -// String returns the string representation -func (s BotChannelAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BotChannelAssociation) GoString() string { - return s.String() -} - -// SetBotAlias sets the BotAlias field's value. -func (s *BotChannelAssociation) SetBotAlias(v string) *BotChannelAssociation { - s.BotAlias = &v - return s -} - -// SetBotConfiguration sets the BotConfiguration field's value. -func (s *BotChannelAssociation) SetBotConfiguration(v map[string]*string) *BotChannelAssociation { - s.BotConfiguration = v - return s -} - -// SetBotName sets the BotName field's value. -func (s *BotChannelAssociation) SetBotName(v string) *BotChannelAssociation { - s.BotName = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *BotChannelAssociation) SetCreatedDate(v time.Time) *BotChannelAssociation { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *BotChannelAssociation) SetDescription(v string) *BotChannelAssociation { - s.Description = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *BotChannelAssociation) SetFailureReason(v string) *BotChannelAssociation { - s.FailureReason = &v - return s -} - -// SetName sets the Name field's value. -func (s *BotChannelAssociation) SetName(v string) *BotChannelAssociation { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *BotChannelAssociation) SetStatus(v string) *BotChannelAssociation { - s.Status = &v - return s -} - -// SetType sets the Type field's value. -func (s *BotChannelAssociation) SetType(v string) *BotChannelAssociation { - s.Type = &v - return s -} - -// Provides information about a bot. . -type BotMetadata struct { - _ struct{} `type:"structure"` - - // The date that the bot was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the bot. - Description *string `locationName:"description" type:"string"` - - // The date that the bot was updated. When you create a bot, the creation date - // and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The name of the bot. - Name *string `locationName:"name" min:"2" type:"string"` - - // The status of the bot. - Status *string `locationName:"status" type:"string" enum:"Status"` - - // The version of the bot. For a new bot, the version is always $LATEST. - Version *string `locationName:"version" min:"1" type:"string"` -} - -// String returns the string representation -func (s BotMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BotMetadata) GoString() string { - return s.String() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *BotMetadata) SetCreatedDate(v time.Time) *BotMetadata { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *BotMetadata) SetDescription(v string) *BotMetadata { - s.Description = &v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *BotMetadata) SetLastUpdatedDate(v time.Time) *BotMetadata { - s.LastUpdatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *BotMetadata) SetName(v string) *BotMetadata { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *BotMetadata) SetStatus(v string) *BotMetadata { - s.Status = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *BotMetadata) SetVersion(v string) *BotMetadata { - s.Version = &v - return s -} - -// Provides metadata for a built-in intent. -type BuiltinIntentMetadata struct { - _ struct{} `type:"structure"` - - // A unique identifier for the built-in intent. To find the signature for an - // intent, see Standard Built-in Intents (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) - // in the Alexa Skills Kit. - Signature *string `locationName:"signature" type:"string"` - - // A list of identifiers for the locales that the intent supports. - SupportedLocales []*string `locationName:"supportedLocales" type:"list"` -} - -// String returns the string representation -func (s BuiltinIntentMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BuiltinIntentMetadata) GoString() string { - return s.String() -} - -// SetSignature sets the Signature field's value. -func (s *BuiltinIntentMetadata) SetSignature(v string) *BuiltinIntentMetadata { - s.Signature = &v - return s -} - -// SetSupportedLocales sets the SupportedLocales field's value. -func (s *BuiltinIntentMetadata) SetSupportedLocales(v []*string) *BuiltinIntentMetadata { - s.SupportedLocales = v - return s -} - -// Provides information about a slot used in a built-in intent. -type BuiltinIntentSlot struct { - _ struct{} `type:"structure"` - - // A list of the slots defined for the intent. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s BuiltinIntentSlot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BuiltinIntentSlot) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *BuiltinIntentSlot) SetName(v string) *BuiltinIntentSlot { - s.Name = &v - return s -} - -// Provides information about a built in slot type. -type BuiltinSlotTypeMetadata struct { - _ struct{} `type:"structure"` - - // A unique identifier for the built-in slot type. To find the signature for - // a slot type, see Slot Type Reference (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference) - // in the Alexa Skills Kit. - Signature *string `locationName:"signature" type:"string"` - - // A list of target locales for the slot. - SupportedLocales []*string `locationName:"supportedLocales" type:"list"` -} - -// String returns the string representation -func (s BuiltinSlotTypeMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BuiltinSlotTypeMetadata) GoString() string { - return s.String() -} - -// SetSignature sets the Signature field's value. -func (s *BuiltinSlotTypeMetadata) SetSignature(v string) *BuiltinSlotTypeMetadata { - s.Signature = &v - return s -} - -// SetSupportedLocales sets the SupportedLocales field's value. -func (s *BuiltinSlotTypeMetadata) SetSupportedLocales(v []*string) *BuiltinSlotTypeMetadata { - s.SupportedLocales = v - return s -} - -// Specifies a Lambda function that verifies requests to a bot or fulfills the -// user's request to a bot.. -type CodeHook struct { - _ struct{} `type:"structure"` - - // The version of the request-response that you want Amazon Lex to use to invoke - // your Lambda function. For more information, see using-lambda. - // - // MessageVersion is a required field - MessageVersion *string `locationName:"messageVersion" min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the Lambda function. - // - // Uri is a required field - Uri *string `locationName:"uri" min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s CodeHook) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CodeHook) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CodeHook) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CodeHook"} - if s.MessageVersion == nil { - invalidParams.Add(request.NewErrParamRequired("MessageVersion")) - } - if s.MessageVersion != nil && len(*s.MessageVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MessageVersion", 1)) - } - if s.Uri == nil { - invalidParams.Add(request.NewErrParamRequired("Uri")) - } - if s.Uri != nil && len(*s.Uri) < 20 { - invalidParams.Add(request.NewErrParamMinLen("Uri", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMessageVersion sets the MessageVersion field's value. -func (s *CodeHook) SetMessageVersion(v string) *CodeHook { - s.MessageVersion = &v - return s -} - -// SetUri sets the Uri field's value. -func (s *CodeHook) SetUri(v string) *CodeHook { - s.Uri = &v - return s -} - -type CreateBotVersionInput struct { - _ struct{} `type:"structure"` - - // Identifies a specific revision of the $LATEST version of the bot. If you - // specify a checksum and the $LATEST version of the bot has a different checksum, - // a PreconditionFailedException exception is returned and Amazon Lex doesn't - // publish a new version. If you don't specify a checksum, Amazon Lex publishes - // the $LATEST version. - Checksum *string `locationName:"checksum" type:"string"` - - // The name of the bot that you want to create a new version of. The name is - // case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateBotVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBotVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateBotVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateBotVersionInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 2 { - invalidParams.Add(request.NewErrParamMinLen("Name", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChecksum sets the Checksum field's value. -func (s *CreateBotVersionInput) SetChecksum(v string) *CreateBotVersionInput { - s.Checksum = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateBotVersionInput) SetName(v string) *CreateBotVersionInput { - s.Name = &v - return s -} - -type CreateBotVersionOutput struct { - _ struct{} `type:"structure"` - - // The message that Amazon Lex uses to abort a conversation. For more information, - // see PutBot. - AbortStatement *Statement `locationName:"abortStatement" type:"structure"` - - // Checksum identifying the version of the bot that was created. - Checksum *string `locationName:"checksum" type:"string"` - - // For each Amazon Lex bot created with the Amazon Lex Model Building Service, - // you must specify whether your use of Amazon Lex is related to a website, - // program, or other application that is directed or targeted, in whole or in - // part, to children under age 13 and subject to the Children's Online Privacy - // Protection Act (COPPA) by specifying true or false in the childDirected field. - // By specifying true in the childDirected field, you confirm that your use - // of Amazon Lex is related to a website, program, or other application that - // is directed or targeted, in whole or in part, to children under age 13 and - // subject to COPPA. By specifying false in the childDirected field, you confirm - // that your use of Amazon Lex is not related to a website, program, or other - // application that is directed or targeted, in whole or in part, to children - // under age 13 and subject to COPPA. You may not specify a default value for - // the childDirected field that does not accurately reflect whether your use - // of Amazon Lex is related to a website, program, or other application that - // is directed or targeted, in whole or in part, to children under age 13 and - // subject to COPPA. - // - // If your use of Amazon Lex relates to a website, program, or other application - // that is directed in whole or in part, to children under age 13, you must - // obtain any required verifiable parental consent under COPPA. For information - // regarding the use of Amazon Lex in connection with websites, programs, or - // other applications that are directed or targeted, in whole or in part, to - // children under age 13, see the Amazon Lex FAQ. (https://aws.amazon.com/lex/faqs#data-security) - ChildDirected *bool `locationName:"childDirected" type:"boolean"` - - // The message that Amazon Lex uses when it doesn't understand the user's request. - // For more information, see PutBot. - ClarificationPrompt *Prompt `locationName:"clarificationPrompt" type:"structure"` - - // The date when the bot version was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the bot. - Description *string `locationName:"description" type:"string"` - - // If status is FAILED, Amazon Lex provides the reason that it failed to build - // the bot. - FailureReason *string `locationName:"failureReason" type:"string"` - - // The maximum time in seconds that Amazon Lex retains the data gathered in - // a conversation. For more information, see PutBot. - IdleSessionTTLInSeconds *int64 `locationName:"idleSessionTTLInSeconds" min:"60" type:"integer"` - - // An array of Intent objects. For more information, see PutBot. - Intents []*Intent `locationName:"intents" type:"list"` - - // The date when the $LATEST version of this bot was updated. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // Specifies the target locale for the bot. - Locale *string `locationName:"locale" type:"string" enum:"Locale"` - - // The name of the bot. - Name *string `locationName:"name" min:"2" type:"string"` - - // When you send a request to create or update a bot, Amazon Lex sets the status - // response element to BUILDING. After Amazon Lex builds the bot, it sets status - // to READY. If Amazon Lex can't build the bot, it sets status to FAILED. Amazon - // Lex returns the reason for the failure in the failureReason response element. - Status *string `locationName:"status" type:"string" enum:"Status"` - - // The version of the bot. - Version *string `locationName:"version" min:"1" type:"string"` - - // The Amazon Polly voice ID that Amazon Lex uses for voice interactions with - // the user. - VoiceId *string `locationName:"voiceId" type:"string"` -} - -// String returns the string representation -func (s CreateBotVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBotVersionOutput) GoString() string { - return s.String() -} - -// SetAbortStatement sets the AbortStatement field's value. -func (s *CreateBotVersionOutput) SetAbortStatement(v *Statement) *CreateBotVersionOutput { - s.AbortStatement = v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *CreateBotVersionOutput) SetChecksum(v string) *CreateBotVersionOutput { - s.Checksum = &v - return s -} - -// SetChildDirected sets the ChildDirected field's value. -func (s *CreateBotVersionOutput) SetChildDirected(v bool) *CreateBotVersionOutput { - s.ChildDirected = &v - return s -} - -// SetClarificationPrompt sets the ClarificationPrompt field's value. -func (s *CreateBotVersionOutput) SetClarificationPrompt(v *Prompt) *CreateBotVersionOutput { - s.ClarificationPrompt = v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *CreateBotVersionOutput) SetCreatedDate(v time.Time) *CreateBotVersionOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateBotVersionOutput) SetDescription(v string) *CreateBotVersionOutput { - s.Description = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *CreateBotVersionOutput) SetFailureReason(v string) *CreateBotVersionOutput { - s.FailureReason = &v - return s -} - -// SetIdleSessionTTLInSeconds sets the IdleSessionTTLInSeconds field's value. -func (s *CreateBotVersionOutput) SetIdleSessionTTLInSeconds(v int64) *CreateBotVersionOutput { - s.IdleSessionTTLInSeconds = &v - return s -} - -// SetIntents sets the Intents field's value. -func (s *CreateBotVersionOutput) SetIntents(v []*Intent) *CreateBotVersionOutput { - s.Intents = v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *CreateBotVersionOutput) SetLastUpdatedDate(v time.Time) *CreateBotVersionOutput { - s.LastUpdatedDate = &v - return s -} - -// SetLocale sets the Locale field's value. -func (s *CreateBotVersionOutput) SetLocale(v string) *CreateBotVersionOutput { - s.Locale = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateBotVersionOutput) SetName(v string) *CreateBotVersionOutput { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CreateBotVersionOutput) SetStatus(v string) *CreateBotVersionOutput { - s.Status = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *CreateBotVersionOutput) SetVersion(v string) *CreateBotVersionOutput { - s.Version = &v - return s -} - -// SetVoiceId sets the VoiceId field's value. -func (s *CreateBotVersionOutput) SetVoiceId(v string) *CreateBotVersionOutput { - s.VoiceId = &v - return s -} - -type CreateIntentVersionInput struct { - _ struct{} `type:"structure"` - - // Checksum of the $LATEST version of the intent that should be used to create - // the new version. If you specify a checksum and the $LATEST version of the - // intent has a different checksum, Amazon Lex returns a PreconditionFailedException - // exception and doesn't publish a new version. If you don't specify a checksum, - // Amazon Lex publishes the $LATEST version. - Checksum *string `locationName:"checksum" type:"string"` - - // The name of the intent that you want to create a new version of. The name - // is case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateIntentVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIntentVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateIntentVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateIntentVersionInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChecksum sets the Checksum field's value. -func (s *CreateIntentVersionInput) SetChecksum(v string) *CreateIntentVersionInput { - s.Checksum = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateIntentVersionInput) SetName(v string) *CreateIntentVersionInput { - s.Name = &v - return s -} - -type CreateIntentVersionOutput struct { - _ struct{} `type:"structure"` - - // Checksum of the intent version created. - Checksum *string `locationName:"checksum" type:"string"` - - // After the Lambda function specified in the fulfillmentActivity field fulfills - // the intent, Amazon Lex conveys this statement to the user. - ConclusionStatement *Statement `locationName:"conclusionStatement" type:"structure"` - - // If defined, the prompt that Amazon Lex uses to confirm the user's intent - // before fulfilling it. - ConfirmationPrompt *Prompt `locationName:"confirmationPrompt" type:"structure"` - - // The date that the intent was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the intent. - Description *string `locationName:"description" type:"string"` - - // If defined, Amazon Lex invokes this Lambda function for each user input. - DialogCodeHook *CodeHook `locationName:"dialogCodeHook" type:"structure"` - - // If defined, Amazon Lex uses this prompt to solicit additional user activity - // after the intent is fulfilled. - FollowUpPrompt *FollowUpPrompt `locationName:"followUpPrompt" type:"structure"` - - // Describes how the intent is fulfilled. - FulfillmentActivity *FulfillmentActivity `locationName:"fulfillmentActivity" type:"structure"` - - // The date that the intent was updated. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The name of the intent. - Name *string `locationName:"name" min:"1" type:"string"` - - // A unique identifier for a built-in intent. - ParentIntentSignature *string `locationName:"parentIntentSignature" type:"string"` - - // If the user answers "no" to the question defined in confirmationPrompt, Amazon - // Lex responds with this statement to acknowledge that the intent was canceled. - RejectionStatement *Statement `locationName:"rejectionStatement" type:"structure"` - - // An array of sample utterances configured for the intent. - SampleUtterances []*string `locationName:"sampleUtterances" type:"list"` - - // An array of slot types that defines the information required to fulfill the - // intent. - Slots []*Slot `locationName:"slots" type:"list"` - - // The version number assigned to the new version of the intent. - Version *string `locationName:"version" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateIntentVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIntentVersionOutput) GoString() string { - return s.String() -} - -// SetChecksum sets the Checksum field's value. -func (s *CreateIntentVersionOutput) SetChecksum(v string) *CreateIntentVersionOutput { - s.Checksum = &v - return s -} - -// SetConclusionStatement sets the ConclusionStatement field's value. -func (s *CreateIntentVersionOutput) SetConclusionStatement(v *Statement) *CreateIntentVersionOutput { - s.ConclusionStatement = v - return s -} - -// SetConfirmationPrompt sets the ConfirmationPrompt field's value. -func (s *CreateIntentVersionOutput) SetConfirmationPrompt(v *Prompt) *CreateIntentVersionOutput { - s.ConfirmationPrompt = v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *CreateIntentVersionOutput) SetCreatedDate(v time.Time) *CreateIntentVersionOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateIntentVersionOutput) SetDescription(v string) *CreateIntentVersionOutput { - s.Description = &v - return s -} - -// SetDialogCodeHook sets the DialogCodeHook field's value. -func (s *CreateIntentVersionOutput) SetDialogCodeHook(v *CodeHook) *CreateIntentVersionOutput { - s.DialogCodeHook = v - return s -} - -// SetFollowUpPrompt sets the FollowUpPrompt field's value. -func (s *CreateIntentVersionOutput) SetFollowUpPrompt(v *FollowUpPrompt) *CreateIntentVersionOutput { - s.FollowUpPrompt = v - return s -} - -// SetFulfillmentActivity sets the FulfillmentActivity field's value. -func (s *CreateIntentVersionOutput) SetFulfillmentActivity(v *FulfillmentActivity) *CreateIntentVersionOutput { - s.FulfillmentActivity = v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *CreateIntentVersionOutput) SetLastUpdatedDate(v time.Time) *CreateIntentVersionOutput { - s.LastUpdatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateIntentVersionOutput) SetName(v string) *CreateIntentVersionOutput { - s.Name = &v - return s -} - -// SetParentIntentSignature sets the ParentIntentSignature field's value. -func (s *CreateIntentVersionOutput) SetParentIntentSignature(v string) *CreateIntentVersionOutput { - s.ParentIntentSignature = &v - return s -} - -// SetRejectionStatement sets the RejectionStatement field's value. -func (s *CreateIntentVersionOutput) SetRejectionStatement(v *Statement) *CreateIntentVersionOutput { - s.RejectionStatement = v - return s -} - -// SetSampleUtterances sets the SampleUtterances field's value. -func (s *CreateIntentVersionOutput) SetSampleUtterances(v []*string) *CreateIntentVersionOutput { - s.SampleUtterances = v - return s -} - -// SetSlots sets the Slots field's value. -func (s *CreateIntentVersionOutput) SetSlots(v []*Slot) *CreateIntentVersionOutput { - s.Slots = v - return s -} - -// SetVersion sets the Version field's value. -func (s *CreateIntentVersionOutput) SetVersion(v string) *CreateIntentVersionOutput { - s.Version = &v - return s -} - -type CreateSlotTypeVersionInput struct { - _ struct{} `type:"structure"` - - // Checksum for the $LATEST version of the slot type that you want to publish. - // If you specify a checksum and the $LATEST version of the slot type has a - // different checksum, Amazon Lex returns a PreconditionFailedException exception - // and doesn't publish the new version. If you don't specify a checksum, Amazon - // Lex publishes the $LATEST version. - Checksum *string `locationName:"checksum" type:"string"` - - // The name of the slot type that you want to create a new version for. The - // name is case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateSlotTypeVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSlotTypeVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSlotTypeVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSlotTypeVersionInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChecksum sets the Checksum field's value. -func (s *CreateSlotTypeVersionInput) SetChecksum(v string) *CreateSlotTypeVersionInput { - s.Checksum = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateSlotTypeVersionInput) SetName(v string) *CreateSlotTypeVersionInput { - s.Name = &v - return s -} - -type CreateSlotTypeVersionOutput struct { - _ struct{} `type:"structure"` - - // Checksum of the $LATEST version of the slot type. - Checksum *string `locationName:"checksum" type:"string"` - - // The date that the slot type was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the slot type. - Description *string `locationName:"description" type:"string"` - - // A list of EnumerationValue objects that defines the values that the slot - // type can take. - EnumerationValues []*EnumerationValue `locationName:"enumerationValues" min:"1" type:"list"` - - // The date that the slot type was updated. When you create a resource, the - // creation date and last update date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The name of the slot type. - Name *string `locationName:"name" min:"1" type:"string"` - - // The strategy that Amazon Lex uses to determine the value of the slot. For - // more information, see PutSlotType. - ValueSelectionStrategy *string `locationName:"valueSelectionStrategy" type:"string" enum:"SlotValueSelectionStrategy"` - - // The version assigned to the new slot type version. - Version *string `locationName:"version" min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateSlotTypeVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSlotTypeVersionOutput) GoString() string { - return s.String() -} - -// SetChecksum sets the Checksum field's value. -func (s *CreateSlotTypeVersionOutput) SetChecksum(v string) *CreateSlotTypeVersionOutput { - s.Checksum = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *CreateSlotTypeVersionOutput) SetCreatedDate(v time.Time) *CreateSlotTypeVersionOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateSlotTypeVersionOutput) SetDescription(v string) *CreateSlotTypeVersionOutput { - s.Description = &v - return s -} - -// SetEnumerationValues sets the EnumerationValues field's value. -func (s *CreateSlotTypeVersionOutput) SetEnumerationValues(v []*EnumerationValue) *CreateSlotTypeVersionOutput { - s.EnumerationValues = v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *CreateSlotTypeVersionOutput) SetLastUpdatedDate(v time.Time) *CreateSlotTypeVersionOutput { - s.LastUpdatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateSlotTypeVersionOutput) SetName(v string) *CreateSlotTypeVersionOutput { - s.Name = &v - return s -} - -// SetValueSelectionStrategy sets the ValueSelectionStrategy field's value. -func (s *CreateSlotTypeVersionOutput) SetValueSelectionStrategy(v string) *CreateSlotTypeVersionOutput { - s.ValueSelectionStrategy = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *CreateSlotTypeVersionOutput) SetVersion(v string) *CreateSlotTypeVersionOutput { - s.Version = &v - return s -} - -type DeleteBotAliasInput struct { - _ struct{} `type:"structure"` - - // The name of the bot that the alias points to. - // - // BotName is a required field - BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` - - // The name of the alias to delete. The name is case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBotAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBotAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBotAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBotAliasInput"} - if s.BotName == nil { - invalidParams.Add(request.NewErrParamRequired("BotName")) - } - if s.BotName != nil && len(*s.BotName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBotName sets the BotName field's value. -func (s *DeleteBotAliasInput) SetBotName(v string) *DeleteBotAliasInput { - s.BotName = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteBotAliasInput) SetName(v string) *DeleteBotAliasInput { - s.Name = &v - return s -} - -type DeleteBotAliasOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteBotAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBotAliasOutput) GoString() string { - return s.String() -} - -type DeleteBotChannelAssociationInput struct { - _ struct{} `type:"structure"` - - // An alias that points to the specific version of the Amazon Lex bot to which - // this association is being made. - // - // BotAlias is a required field - BotAlias *string `location:"uri" locationName:"aliasName" min:"1" type:"string" required:"true"` - - // The name of the Amazon Lex bot. - // - // BotName is a required field - BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` - - // The name of the association. The name is case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBotChannelAssociationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBotChannelAssociationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBotChannelAssociationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBotChannelAssociationInput"} - if s.BotAlias == nil { - invalidParams.Add(request.NewErrParamRequired("BotAlias")) - } - if s.BotAlias != nil && len(*s.BotAlias) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1)) - } - if s.BotName == nil { - invalidParams.Add(request.NewErrParamRequired("BotName")) - } - if s.BotName != nil && len(*s.BotName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBotAlias sets the BotAlias field's value. -func (s *DeleteBotChannelAssociationInput) SetBotAlias(v string) *DeleteBotChannelAssociationInput { - s.BotAlias = &v - return s -} - -// SetBotName sets the BotName field's value. -func (s *DeleteBotChannelAssociationInput) SetBotName(v string) *DeleteBotChannelAssociationInput { - s.BotName = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteBotChannelAssociationInput) SetName(v string) *DeleteBotChannelAssociationInput { - s.Name = &v - return s -} - -type DeleteBotChannelAssociationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteBotChannelAssociationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBotChannelAssociationOutput) GoString() string { - return s.String() -} - -type DeleteBotInput struct { - _ struct{} `type:"structure"` - - // The name of the bot. The name is case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBotInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 2 { - invalidParams.Add(request.NewErrParamMinLen("Name", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteBotInput) SetName(v string) *DeleteBotInput { - s.Name = &v - return s -} - -type DeleteBotOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteBotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBotOutput) GoString() string { - return s.String() -} - -type DeleteBotVersionInput struct { - _ struct{} `type:"structure"` - - // The name of the bot. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"2" type:"string" required:"true"` - - // The version of the bot to delete. You cannot delete the $LATEST version of - // the bot. To delete the $LATEST version, use the DeleteBot operation. - // - // Version is a required field - Version *string `location:"uri" locationName:"version" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBotVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBotVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBotVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBotVersionInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 2 { - invalidParams.Add(request.NewErrParamMinLen("Name", 2)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteBotVersionInput) SetName(v string) *DeleteBotVersionInput { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *DeleteBotVersionInput) SetVersion(v string) *DeleteBotVersionInput { - s.Version = &v - return s -} - -type DeleteBotVersionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteBotVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBotVersionOutput) GoString() string { - return s.String() -} - -type DeleteIntentInput struct { - _ struct{} `type:"structure"` - - // The name of the intent. The name is case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteIntentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIntentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIntentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIntentInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteIntentInput) SetName(v string) *DeleteIntentInput { - s.Name = &v - return s -} - -type DeleteIntentOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteIntentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIntentOutput) GoString() string { - return s.String() -} - -type DeleteIntentVersionInput struct { - _ struct{} `type:"structure"` - - // The name of the intent. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` - - // The version of the intent to delete. You cannot delete the $LATEST version - // of the intent. To delete the $LATEST version, use the DeleteIntent operation. - // - // Version is a required field - Version *string `location:"uri" locationName:"version" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteIntentVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIntentVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIntentVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIntentVersionInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteIntentVersionInput) SetName(v string) *DeleteIntentVersionInput { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *DeleteIntentVersionInput) SetVersion(v string) *DeleteIntentVersionInput { - s.Version = &v - return s -} - -type DeleteIntentVersionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteIntentVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIntentVersionOutput) GoString() string { - return s.String() -} - -type DeleteSlotTypeInput struct { - _ struct{} `type:"structure"` - - // The name of the slot type. The name is case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSlotTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSlotTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSlotTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSlotTypeInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteSlotTypeInput) SetName(v string) *DeleteSlotTypeInput { - s.Name = &v - return s -} - -type DeleteSlotTypeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteSlotTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSlotTypeOutput) GoString() string { - return s.String() -} - -type DeleteSlotTypeVersionInput struct { - _ struct{} `type:"structure"` - - // The name of the slot type. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` - - // The version of the slot type to delete. You cannot delete the $LATEST version - // of the slot type. To delete the $LATEST version, use the DeleteSlotType operation. - // - // Version is a required field - Version *string `location:"uri" locationName:"version" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSlotTypeVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSlotTypeVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSlotTypeVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSlotTypeVersionInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteSlotTypeVersionInput) SetName(v string) *DeleteSlotTypeVersionInput { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *DeleteSlotTypeVersionInput) SetVersion(v string) *DeleteSlotTypeVersionInput { - s.Version = &v - return s -} - -type DeleteSlotTypeVersionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteSlotTypeVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSlotTypeVersionOutput) GoString() string { - return s.String() -} - -type DeleteUtterancesInput struct { - _ struct{} `type:"structure"` - - // The name of the bot that stored the utterances. - // - // BotName is a required field - BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` - - // The unique identifier for the user that made the utterances. This is the - // user ID that was sent in the PostContent (http://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html) - // or PostText (http://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html) - // operation request that contained the utterance. - // - // UserId is a required field - UserId *string `location:"uri" locationName:"userId" min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteUtterancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUtterancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUtterancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUtterancesInput"} - if s.BotName == nil { - invalidParams.Add(request.NewErrParamRequired("BotName")) - } - if s.BotName != nil && len(*s.BotName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) - } - if s.UserId == nil { - invalidParams.Add(request.NewErrParamRequired("UserId")) - } - if s.UserId != nil && len(*s.UserId) < 2 { - invalidParams.Add(request.NewErrParamMinLen("UserId", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBotName sets the BotName field's value. -func (s *DeleteUtterancesInput) SetBotName(v string) *DeleteUtterancesInput { - s.BotName = &v - return s -} - -// SetUserId sets the UserId field's value. -func (s *DeleteUtterancesInput) SetUserId(v string) *DeleteUtterancesInput { - s.UserId = &v - return s -} - -type DeleteUtterancesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteUtterancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUtterancesOutput) GoString() string { - return s.String() -} - -// Each slot type can have a set of values. Each enumeration value represents -// a value the slot type can take. -// -// For example, a pizza ordering bot could have a slot type that specifies the -// type of crust that the pizza should have. The slot type could include the -// values -// -// * thick -// -// * thin -// -// * stuffed -type EnumerationValue struct { - _ struct{} `type:"structure"` - - // Additional values related to the slot type value. - Synonyms []*string `locationName:"synonyms" type:"list"` - - // The value of the slot type. - // - // Value is a required field - Value *string `locationName:"value" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s EnumerationValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnumerationValue) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnumerationValue) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnumerationValue"} - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSynonyms sets the Synonyms field's value. -func (s *EnumerationValue) SetSynonyms(v []*string) *EnumerationValue { - s.Synonyms = v - return s -} - -// SetValue sets the Value field's value. -func (s *EnumerationValue) SetValue(v string) *EnumerationValue { - s.Value = &v - return s -} - -// A prompt for additional activity after an intent is fulfilled. For example, -// after the OrderPizza intent is fulfilled, you might prompt the user to find -// out whether the user wants to order drinks. -type FollowUpPrompt struct { - _ struct{} `type:"structure"` - - // Prompts for information from the user. - // - // Prompt is a required field - Prompt *Prompt `locationName:"prompt" type:"structure" required:"true"` - - // If the user answers "no" to the question defined in the prompt field, Amazon - // Lex responds with this statement to acknowledge that the intent was canceled. - // - // RejectionStatement is a required field - RejectionStatement *Statement `locationName:"rejectionStatement" type:"structure" required:"true"` -} - -// String returns the string representation -func (s FollowUpPrompt) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FollowUpPrompt) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FollowUpPrompt) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FollowUpPrompt"} - if s.Prompt == nil { - invalidParams.Add(request.NewErrParamRequired("Prompt")) - } - if s.RejectionStatement == nil { - invalidParams.Add(request.NewErrParamRequired("RejectionStatement")) - } - if s.Prompt != nil { - if err := s.Prompt.Validate(); err != nil { - invalidParams.AddNested("Prompt", err.(request.ErrInvalidParams)) - } - } - if s.RejectionStatement != nil { - if err := s.RejectionStatement.Validate(); err != nil { - invalidParams.AddNested("RejectionStatement", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPrompt sets the Prompt field's value. -func (s *FollowUpPrompt) SetPrompt(v *Prompt) *FollowUpPrompt { - s.Prompt = v - return s -} - -// SetRejectionStatement sets the RejectionStatement field's value. -func (s *FollowUpPrompt) SetRejectionStatement(v *Statement) *FollowUpPrompt { - s.RejectionStatement = v - return s -} - -// Describes how the intent is fulfilled after the user provides all of the -// information required for the intent. You can provide a Lambda function to -// process the intent, or you can return the intent information to the client -// application. We recommend that you use a Lambda function so that the relevant -// logic lives in the Cloud and limit the client-side code primarily to presentation. -// If you need to update the logic, you only update the Lambda function; you -// don't need to upgrade your client application. -// -// Consider the following examples: -// -// * In a pizza ordering application, after the user provides all of the -// information for placing an order, you use a Lambda function to place an -// order with a pizzeria. -// -// * In a gaming application, when a user says "pick up a rock," this information -// must go back to the client application so that it can perform the operation -// and update the graphics. In this case, you want Amazon Lex to return the -// intent data to the client. -type FulfillmentActivity struct { - _ struct{} `type:"structure"` - - // A description of the Lambda function that is run to fulfill the intent. - CodeHook *CodeHook `locationName:"codeHook" type:"structure"` - - // How the intent should be fulfilled, either by running a Lambda function or - // by returning the slot data to the client application. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"FulfillmentActivityType"` -} - -// String returns the string representation -func (s FulfillmentActivity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FulfillmentActivity) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FulfillmentActivity) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FulfillmentActivity"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.CodeHook != nil { - if err := s.CodeHook.Validate(); err != nil { - invalidParams.AddNested("CodeHook", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCodeHook sets the CodeHook field's value. -func (s *FulfillmentActivity) SetCodeHook(v *CodeHook) *FulfillmentActivity { - s.CodeHook = v - return s -} - -// SetType sets the Type field's value. -func (s *FulfillmentActivity) SetType(v string) *FulfillmentActivity { - s.Type = &v - return s -} - -type GetBotAliasInput struct { - _ struct{} `type:"structure"` - - // The name of the bot. - // - // BotName is a required field - BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` - - // The name of the bot alias. The name is case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetBotAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBotAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBotAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBotAliasInput"} - if s.BotName == nil { - invalidParams.Add(request.NewErrParamRequired("BotName")) - } - if s.BotName != nil && len(*s.BotName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBotName sets the BotName field's value. -func (s *GetBotAliasInput) SetBotName(v string) *GetBotAliasInput { - s.BotName = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetBotAliasInput) SetName(v string) *GetBotAliasInput { - s.Name = &v - return s -} - -type GetBotAliasOutput struct { - _ struct{} `type:"structure"` - - // The name of the bot that the alias points to. - BotName *string `locationName:"botName" min:"2" type:"string"` - - // The version of the bot that the alias points to. - BotVersion *string `locationName:"botVersion" min:"1" type:"string"` - - // Checksum of the bot alias. - Checksum *string `locationName:"checksum" type:"string"` - - // The date that the bot alias was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the bot alias. - Description *string `locationName:"description" type:"string"` - - // The date that the bot alias was updated. When you create a resource, the - // creation date and the last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The name of the bot alias. - Name *string `locationName:"name" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetBotAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBotAliasOutput) GoString() string { - return s.String() -} - -// SetBotName sets the BotName field's value. -func (s *GetBotAliasOutput) SetBotName(v string) *GetBotAliasOutput { - s.BotName = &v - return s -} - -// SetBotVersion sets the BotVersion field's value. -func (s *GetBotAliasOutput) SetBotVersion(v string) *GetBotAliasOutput { - s.BotVersion = &v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *GetBotAliasOutput) SetChecksum(v string) *GetBotAliasOutput { - s.Checksum = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *GetBotAliasOutput) SetCreatedDate(v time.Time) *GetBotAliasOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetBotAliasOutput) SetDescription(v string) *GetBotAliasOutput { - s.Description = &v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *GetBotAliasOutput) SetLastUpdatedDate(v time.Time) *GetBotAliasOutput { - s.LastUpdatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetBotAliasOutput) SetName(v string) *GetBotAliasOutput { - s.Name = &v - return s -} - -type GetBotAliasesInput struct { - _ struct{} `type:"structure"` - - // The name of the bot. - // - // BotName is a required field - BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` - - // The maximum number of aliases to return in the response. The default is 50. - // . - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // Substring to match in bot alias names. An alias will be returned if any part - // of its name matches the substring. For example, "xyz" matches both "xyzabc" - // and "abcxyz." - NameContains *string `location:"querystring" locationName:"nameContains" min:"1" type:"string"` - - // A pagination token for fetching the next page of aliases. If the response - // to this call is truncated, Amazon Lex returns a pagination token in the response. - // To fetch the next page of aliases, specify the pagination token in the next - // request. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetBotAliasesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBotAliasesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBotAliasesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBotAliasesInput"} - if s.BotName == nil { - invalidParams.Add(request.NewErrParamRequired("BotName")) - } - if s.BotName != nil && len(*s.BotName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NameContains != nil && len(*s.NameContains) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBotName sets the BotName field's value. -func (s *GetBotAliasesInput) SetBotName(v string) *GetBotAliasesInput { - s.BotName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetBotAliasesInput) SetMaxResults(v int64) *GetBotAliasesInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *GetBotAliasesInput) SetNameContains(v string) *GetBotAliasesInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetBotAliasesInput) SetNextToken(v string) *GetBotAliasesInput { - s.NextToken = &v - return s -} - -type GetBotAliasesOutput struct { - _ struct{} `type:"structure"` - - // An array of BotAliasMetadata objects, each describing a bot alias. - BotAliases []*BotAliasMetadata `type:"list"` - - // A pagination token for fetching next page of aliases. If the response to - // this call is truncated, Amazon Lex returns a pagination token in the response. - // To fetch the next page of aliases, specify the pagination token in the next - // request. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetBotAliasesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBotAliasesOutput) GoString() string { - return s.String() -} - -// SetBotAliases sets the BotAliases field's value. -func (s *GetBotAliasesOutput) SetBotAliases(v []*BotAliasMetadata) *GetBotAliasesOutput { - s.BotAliases = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetBotAliasesOutput) SetNextToken(v string) *GetBotAliasesOutput { - s.NextToken = &v - return s -} - -type GetBotChannelAssociationInput struct { - _ struct{} `type:"structure"` - - // An alias pointing to the specific version of the Amazon Lex bot to which - // this association is being made. - // - // BotAlias is a required field - BotAlias *string `location:"uri" locationName:"aliasName" min:"1" type:"string" required:"true"` - - // The name of the Amazon Lex bot. - // - // BotName is a required field - BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` - - // The name of the association between the bot and the channel. The name is - // case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetBotChannelAssociationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBotChannelAssociationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBotChannelAssociationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBotChannelAssociationInput"} - if s.BotAlias == nil { - invalidParams.Add(request.NewErrParamRequired("BotAlias")) - } - if s.BotAlias != nil && len(*s.BotAlias) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1)) - } - if s.BotName == nil { - invalidParams.Add(request.NewErrParamRequired("BotName")) - } - if s.BotName != nil && len(*s.BotName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBotAlias sets the BotAlias field's value. -func (s *GetBotChannelAssociationInput) SetBotAlias(v string) *GetBotChannelAssociationInput { - s.BotAlias = &v - return s -} - -// SetBotName sets the BotName field's value. -func (s *GetBotChannelAssociationInput) SetBotName(v string) *GetBotChannelAssociationInput { - s.BotName = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetBotChannelAssociationInput) SetName(v string) *GetBotChannelAssociationInput { - s.Name = &v - return s -} - -type GetBotChannelAssociationOutput struct { - _ struct{} `type:"structure"` - - // An alias pointing to the specific version of the Amazon Lex bot to which - // this association is being made. - BotAlias *string `locationName:"botAlias" min:"1" type:"string"` - - // Provides information that the messaging platform needs to communicate with - // the Amazon Lex bot. - BotConfiguration map[string]*string `locationName:"botConfiguration" min:"1" type:"map" sensitive:"true"` - - // The name of the Amazon Lex bot. - BotName *string `locationName:"botName" min:"2" type:"string"` - - // The date that the association between the bot and the channel was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the association between the bot and the channel. - Description *string `locationName:"description" type:"string"` - - // If status is FAILED, Amazon Lex provides the reason that it failed to create - // the association. - FailureReason *string `locationName:"failureReason" type:"string"` - - // The name of the association between the bot and the channel. - Name *string `locationName:"name" min:"1" type:"string"` - - // The status of the bot channel. - // - // * CREATED - The channel has been created and is ready for use. - // - // * IN_PROGRESS - Channel creation is in progress. - // - // * FAILED - There was an error creating the channel. For information about - // the reason for the failure, see the failureReason field. - Status *string `locationName:"status" type:"string" enum:"ChannelStatus"` - - // The type of the messaging platform. - Type *string `locationName:"type" type:"string" enum:"ChannelType"` -} - -// String returns the string representation -func (s GetBotChannelAssociationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBotChannelAssociationOutput) GoString() string { - return s.String() -} - -// SetBotAlias sets the BotAlias field's value. -func (s *GetBotChannelAssociationOutput) SetBotAlias(v string) *GetBotChannelAssociationOutput { - s.BotAlias = &v - return s -} - -// SetBotConfiguration sets the BotConfiguration field's value. -func (s *GetBotChannelAssociationOutput) SetBotConfiguration(v map[string]*string) *GetBotChannelAssociationOutput { - s.BotConfiguration = v - return s -} - -// SetBotName sets the BotName field's value. -func (s *GetBotChannelAssociationOutput) SetBotName(v string) *GetBotChannelAssociationOutput { - s.BotName = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *GetBotChannelAssociationOutput) SetCreatedDate(v time.Time) *GetBotChannelAssociationOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetBotChannelAssociationOutput) SetDescription(v string) *GetBotChannelAssociationOutput { - s.Description = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *GetBotChannelAssociationOutput) SetFailureReason(v string) *GetBotChannelAssociationOutput { - s.FailureReason = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetBotChannelAssociationOutput) SetName(v string) *GetBotChannelAssociationOutput { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetBotChannelAssociationOutput) SetStatus(v string) *GetBotChannelAssociationOutput { - s.Status = &v - return s -} - -// SetType sets the Type field's value. -func (s *GetBotChannelAssociationOutput) SetType(v string) *GetBotChannelAssociationOutput { - s.Type = &v - return s -} - -type GetBotChannelAssociationsInput struct { - _ struct{} `type:"structure"` - - // An alias pointing to the specific version of the Amazon Lex bot to which - // this association is being made. - // - // BotAlias is a required field - BotAlias *string `location:"uri" locationName:"aliasName" min:"1" type:"string" required:"true"` - - // The name of the Amazon Lex bot in the association. - // - // BotName is a required field - BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` - - // The maximum number of associations to return in the response. The default - // is 50. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // Substring to match in channel association names. An association will be returned - // if any part of its name matches the substring. For example, "xyz" matches - // both "xyzabc" and "abcxyz." To return all bot channel associations, use a - // hyphen ("-") as the nameContains parameter. - NameContains *string `location:"querystring" locationName:"nameContains" min:"1" type:"string"` - - // A pagination token for fetching the next page of associations. If the response - // to this call is truncated, Amazon Lex returns a pagination token in the response. - // To fetch the next page of associations, specify the pagination token in the - // next request. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetBotChannelAssociationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBotChannelAssociationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBotChannelAssociationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBotChannelAssociationsInput"} - if s.BotAlias == nil { - invalidParams.Add(request.NewErrParamRequired("BotAlias")) - } - if s.BotAlias != nil && len(*s.BotAlias) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1)) - } - if s.BotName == nil { - invalidParams.Add(request.NewErrParamRequired("BotName")) - } - if s.BotName != nil && len(*s.BotName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NameContains != nil && len(*s.NameContains) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBotAlias sets the BotAlias field's value. -func (s *GetBotChannelAssociationsInput) SetBotAlias(v string) *GetBotChannelAssociationsInput { - s.BotAlias = &v - return s -} - -// SetBotName sets the BotName field's value. -func (s *GetBotChannelAssociationsInput) SetBotName(v string) *GetBotChannelAssociationsInput { - s.BotName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetBotChannelAssociationsInput) SetMaxResults(v int64) *GetBotChannelAssociationsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *GetBotChannelAssociationsInput) SetNameContains(v string) *GetBotChannelAssociationsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetBotChannelAssociationsInput) SetNextToken(v string) *GetBotChannelAssociationsInput { - s.NextToken = &v - return s -} - -type GetBotChannelAssociationsOutput struct { - _ struct{} `type:"structure"` - - // An array of objects, one for each association, that provides information - // about the Amazon Lex bot and its association with the channel. - BotChannelAssociations []*BotChannelAssociation `locationName:"botChannelAssociations" type:"list"` - - // A pagination token that fetches the next page of associations. If the response - // to this call is truncated, Amazon Lex returns a pagination token in the response. - // To fetch the next page of associations, specify the pagination token in the - // next request. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetBotChannelAssociationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBotChannelAssociationsOutput) GoString() string { - return s.String() -} - -// SetBotChannelAssociations sets the BotChannelAssociations field's value. -func (s *GetBotChannelAssociationsOutput) SetBotChannelAssociations(v []*BotChannelAssociation) *GetBotChannelAssociationsOutput { - s.BotChannelAssociations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetBotChannelAssociationsOutput) SetNextToken(v string) *GetBotChannelAssociationsOutput { - s.NextToken = &v - return s -} - -type GetBotInput struct { - _ struct{} `type:"structure"` - - // The name of the bot. The name is case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"2" type:"string" required:"true"` - - // The version or alias of the bot. - // - // VersionOrAlias is a required field - VersionOrAlias *string `location:"uri" locationName:"versionoralias" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetBotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBotInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 2 { - invalidParams.Add(request.NewErrParamMinLen("Name", 2)) - } - if s.VersionOrAlias == nil { - invalidParams.Add(request.NewErrParamRequired("VersionOrAlias")) - } - if s.VersionOrAlias != nil && len(*s.VersionOrAlias) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VersionOrAlias", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetBotInput) SetName(v string) *GetBotInput { - s.Name = &v - return s -} - -// SetVersionOrAlias sets the VersionOrAlias field's value. -func (s *GetBotInput) SetVersionOrAlias(v string) *GetBotInput { - s.VersionOrAlias = &v - return s -} - -type GetBotOutput struct { - _ struct{} `type:"structure"` - - // The message that Amazon Lex returns when the user elects to end the conversation - // without completing it. For more information, see PutBot. - AbortStatement *Statement `locationName:"abortStatement" type:"structure"` - - // Checksum of the bot used to identify a specific revision of the bot's $LATEST - // version. - Checksum *string `locationName:"checksum" type:"string"` - - // For each Amazon Lex bot created with the Amazon Lex Model Building Service, - // you must specify whether your use of Amazon Lex is related to a website, - // program, or other application that is directed or targeted, in whole or in - // part, to children under age 13 and subject to the Children's Online Privacy - // Protection Act (COPPA) by specifying true or false in the childDirected field. - // By specifying true in the childDirected field, you confirm that your use - // of Amazon Lex is related to a website, program, or other application that - // is directed or targeted, in whole or in part, to children under age 13 and - // subject to COPPA. By specifying false in the childDirected field, you confirm - // that your use of Amazon Lex is not related to a website, program, or other - // application that is directed or targeted, in whole or in part, to children - // under age 13 and subject to COPPA. You may not specify a default value for - // the childDirected field that does not accurately reflect whether your use - // of Amazon Lex is related to a website, program, or other application that - // is directed or targeted, in whole or in part, to children under age 13 and - // subject to COPPA. - // - // If your use of Amazon Lex relates to a website, program, or other application - // that is directed in whole or in part, to children under age 13, you must - // obtain any required verifiable parental consent under COPPA. For information - // regarding the use of Amazon Lex in connection with websites, programs, or - // other applications that are directed or targeted, in whole or in part, to - // children under age 13, see the Amazon Lex FAQ. (https://aws.amazon.com/lex/faqs#data-security) - ChildDirected *bool `locationName:"childDirected" type:"boolean"` - - // The message Amazon Lex uses when it doesn't understand the user's request. - // For more information, see PutBot. - ClarificationPrompt *Prompt `locationName:"clarificationPrompt" type:"structure"` - - // The date that the bot was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the bot. - Description *string `locationName:"description" type:"string"` - - // If status is FAILED, Amazon Lex explains why it failed to build the bot. - FailureReason *string `locationName:"failureReason" type:"string"` - - // The maximum time in seconds that Amazon Lex retains the data gathered in - // a conversation. For more information, see PutBot. - IdleSessionTTLInSeconds *int64 `locationName:"idleSessionTTLInSeconds" min:"60" type:"integer"` - - // An array of intent objects. For more information, see PutBot. - Intents []*Intent `locationName:"intents" type:"list"` - - // The date that the bot was updated. When you create a resource, the creation - // date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The target locale for the bot. - Locale *string `locationName:"locale" type:"string" enum:"Locale"` - - // The name of the bot. - Name *string `locationName:"name" min:"2" type:"string"` - - // The status of the bot. If the bot is ready to run, the status is READY. If - // there was a problem with building the bot, the status is FAILED and the failureReason - // explains why the bot did not build. If the bot was saved but not built, the - // status is NOT BUILT. - Status *string `locationName:"status" type:"string" enum:"Status"` - - // The version of the bot. For a new bot, the version is always $LATEST. - Version *string `locationName:"version" min:"1" type:"string"` - - // The Amazon Polly voice ID that Amazon Lex uses for voice interaction with - // the user. For more information, see PutBot. - VoiceId *string `locationName:"voiceId" type:"string"` -} - -// String returns the string representation -func (s GetBotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBotOutput) GoString() string { - return s.String() -} - -// SetAbortStatement sets the AbortStatement field's value. -func (s *GetBotOutput) SetAbortStatement(v *Statement) *GetBotOutput { - s.AbortStatement = v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *GetBotOutput) SetChecksum(v string) *GetBotOutput { - s.Checksum = &v - return s -} - -// SetChildDirected sets the ChildDirected field's value. -func (s *GetBotOutput) SetChildDirected(v bool) *GetBotOutput { - s.ChildDirected = &v - return s -} - -// SetClarificationPrompt sets the ClarificationPrompt field's value. -func (s *GetBotOutput) SetClarificationPrompt(v *Prompt) *GetBotOutput { - s.ClarificationPrompt = v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *GetBotOutput) SetCreatedDate(v time.Time) *GetBotOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetBotOutput) SetDescription(v string) *GetBotOutput { - s.Description = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *GetBotOutput) SetFailureReason(v string) *GetBotOutput { - s.FailureReason = &v - return s -} - -// SetIdleSessionTTLInSeconds sets the IdleSessionTTLInSeconds field's value. -func (s *GetBotOutput) SetIdleSessionTTLInSeconds(v int64) *GetBotOutput { - s.IdleSessionTTLInSeconds = &v - return s -} - -// SetIntents sets the Intents field's value. -func (s *GetBotOutput) SetIntents(v []*Intent) *GetBotOutput { - s.Intents = v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *GetBotOutput) SetLastUpdatedDate(v time.Time) *GetBotOutput { - s.LastUpdatedDate = &v - return s -} - -// SetLocale sets the Locale field's value. -func (s *GetBotOutput) SetLocale(v string) *GetBotOutput { - s.Locale = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetBotOutput) SetName(v string) *GetBotOutput { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetBotOutput) SetStatus(v string) *GetBotOutput { - s.Status = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetBotOutput) SetVersion(v string) *GetBotOutput { - s.Version = &v - return s -} - -// SetVoiceId sets the VoiceId field's value. -func (s *GetBotOutput) SetVoiceId(v string) *GetBotOutput { - s.VoiceId = &v - return s -} - -type GetBotVersionsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of bot versions to return in the response. The default - // is 10. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The name of the bot for which versions should be returned. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"2" type:"string" required:"true"` - - // A pagination token for fetching the next page of bot versions. If the response - // to this call is truncated, Amazon Lex returns a pagination token in the response. - // To fetch the next page of versions, specify the pagination token in the next - // request. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetBotVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBotVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBotVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBotVersionsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 2 { - invalidParams.Add(request.NewErrParamMinLen("Name", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetBotVersionsInput) SetMaxResults(v int64) *GetBotVersionsInput { - s.MaxResults = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetBotVersionsInput) SetName(v string) *GetBotVersionsInput { - s.Name = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetBotVersionsInput) SetNextToken(v string) *GetBotVersionsInput { - s.NextToken = &v - return s -} - -type GetBotVersionsOutput struct { - _ struct{} `type:"structure"` - - // An array of BotMetadata objects, one for each numbered version of the bot - // plus one for the $LATEST version. - Bots []*BotMetadata `locationName:"bots" type:"list"` - - // A pagination token for fetching the next page of bot versions. If the response - // to this call is truncated, Amazon Lex returns a pagination token in the response. - // To fetch the next page of versions, specify the pagination token in the next - // request. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetBotVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBotVersionsOutput) GoString() string { - return s.String() -} - -// SetBots sets the Bots field's value. -func (s *GetBotVersionsOutput) SetBots(v []*BotMetadata) *GetBotVersionsOutput { - s.Bots = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetBotVersionsOutput) SetNextToken(v string) *GetBotVersionsOutput { - s.NextToken = &v - return s -} - -type GetBotsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of bots to return in the response that the request will - // return. The default is 10. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // Substring to match in bot names. A bot will be returned if any part of its - // name matches the substring. For example, "xyz" matches both "xyzabc" and - // "abcxyz." - NameContains *string `location:"querystring" locationName:"nameContains" min:"2" type:"string"` - - // A pagination token that fetches the next page of bots. If the response to - // this call is truncated, Amazon Lex returns a pagination token in the response. - // To fetch the next page of bots, specify the pagination token in the next - // request. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetBotsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBotsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBotsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBotsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NameContains != nil && len(*s.NameContains) < 2 { - invalidParams.Add(request.NewErrParamMinLen("NameContains", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetBotsInput) SetMaxResults(v int64) *GetBotsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *GetBotsInput) SetNameContains(v string) *GetBotsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetBotsInput) SetNextToken(v string) *GetBotsInput { - s.NextToken = &v - return s -} - -type GetBotsOutput struct { - _ struct{} `type:"structure"` - - // An array of botMetadata objects, with one entry for each bot. - Bots []*BotMetadata `locationName:"bots" type:"list"` - - // If the response is truncated, it includes a pagination token that you can - // specify in your next request to fetch the next page of bots. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetBotsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBotsOutput) GoString() string { - return s.String() -} - -// SetBots sets the Bots field's value. -func (s *GetBotsOutput) SetBots(v []*BotMetadata) *GetBotsOutput { - s.Bots = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetBotsOutput) SetNextToken(v string) *GetBotsOutput { - s.NextToken = &v - return s -} - -type GetBuiltinIntentInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for a built-in intent. To find the signature for an - // intent, see Standard Built-in Intents (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) - // in the Alexa Skills Kit. - // - // Signature is a required field - Signature *string `location:"uri" locationName:"signature" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetBuiltinIntentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBuiltinIntentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBuiltinIntentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBuiltinIntentInput"} - if s.Signature == nil { - invalidParams.Add(request.NewErrParamRequired("Signature")) - } - if s.Signature != nil && len(*s.Signature) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Signature", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSignature sets the Signature field's value. -func (s *GetBuiltinIntentInput) SetSignature(v string) *GetBuiltinIntentInput { - s.Signature = &v - return s -} - -type GetBuiltinIntentOutput struct { - _ struct{} `type:"structure"` - - // The unique identifier for a built-in intent. - Signature *string `locationName:"signature" type:"string"` - - // An array of BuiltinIntentSlot objects, one entry for each slot type in the - // intent. - Slots []*BuiltinIntentSlot `locationName:"slots" type:"list"` - - // A list of locales that the intent supports. - SupportedLocales []*string `locationName:"supportedLocales" type:"list"` -} - -// String returns the string representation -func (s GetBuiltinIntentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBuiltinIntentOutput) GoString() string { - return s.String() -} - -// SetSignature sets the Signature field's value. -func (s *GetBuiltinIntentOutput) SetSignature(v string) *GetBuiltinIntentOutput { - s.Signature = &v - return s -} - -// SetSlots sets the Slots field's value. -func (s *GetBuiltinIntentOutput) SetSlots(v []*BuiltinIntentSlot) *GetBuiltinIntentOutput { - s.Slots = v - return s -} - -// SetSupportedLocales sets the SupportedLocales field's value. -func (s *GetBuiltinIntentOutput) SetSupportedLocales(v []*string) *GetBuiltinIntentOutput { - s.SupportedLocales = v - return s -} - -type GetBuiltinIntentsInput struct { - _ struct{} `type:"structure"` - - // A list of locales that the intent supports. - Locale *string `location:"querystring" locationName:"locale" type:"string" enum:"Locale"` - - // The maximum number of intents to return in the response. The default is 10. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // A pagination token that fetches the next page of intents. If this API call - // is truncated, Amazon Lex returns a pagination token in the response. To fetch - // the next page of intents, use the pagination token in the next request. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // Substring to match in built-in intent signatures. An intent will be returned - // if any part of its signature matches the substring. For example, "xyz" matches - // both "xyzabc" and "abcxyz." To find the signature for an intent, see Standard - // Built-in Intents (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) - // in the Alexa Skills Kit. - SignatureContains *string `location:"querystring" locationName:"signatureContains" type:"string"` -} - -// String returns the string representation -func (s GetBuiltinIntentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBuiltinIntentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBuiltinIntentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBuiltinIntentsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLocale sets the Locale field's value. -func (s *GetBuiltinIntentsInput) SetLocale(v string) *GetBuiltinIntentsInput { - s.Locale = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetBuiltinIntentsInput) SetMaxResults(v int64) *GetBuiltinIntentsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetBuiltinIntentsInput) SetNextToken(v string) *GetBuiltinIntentsInput { - s.NextToken = &v - return s -} - -// SetSignatureContains sets the SignatureContains field's value. -func (s *GetBuiltinIntentsInput) SetSignatureContains(v string) *GetBuiltinIntentsInput { - s.SignatureContains = &v - return s -} - -type GetBuiltinIntentsOutput struct { - _ struct{} `type:"structure"` - - // An array of builtinIntentMetadata objects, one for each intent in the response. - Intents []*BuiltinIntentMetadata `locationName:"intents" type:"list"` - - // A pagination token that fetches the next page of intents. If the response - // to this API call is truncated, Amazon Lex returns a pagination token in the - // response. To fetch the next page of intents, specify the pagination token - // in the next request. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetBuiltinIntentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBuiltinIntentsOutput) GoString() string { - return s.String() -} - -// SetIntents sets the Intents field's value. -func (s *GetBuiltinIntentsOutput) SetIntents(v []*BuiltinIntentMetadata) *GetBuiltinIntentsOutput { - s.Intents = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetBuiltinIntentsOutput) SetNextToken(v string) *GetBuiltinIntentsOutput { - s.NextToken = &v - return s -} - -type GetBuiltinSlotTypesInput struct { - _ struct{} `type:"structure"` - - // A list of locales that the slot type supports. - Locale *string `location:"querystring" locationName:"locale" type:"string" enum:"Locale"` - - // The maximum number of slot types to return in the response. The default is - // 10. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // A pagination token that fetches the next page of slot types. If the response - // to this API call is truncated, Amazon Lex returns a pagination token in the - // response. To fetch the next page of slot types, specify the pagination token - // in the next request. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // Substring to match in built-in slot type signatures. A slot type will be - // returned if any part of its signature matches the substring. For example, - // "xyz" matches both "xyzabc" and "abcxyz." - SignatureContains *string `location:"querystring" locationName:"signatureContains" type:"string"` -} - -// String returns the string representation -func (s GetBuiltinSlotTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBuiltinSlotTypesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBuiltinSlotTypesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBuiltinSlotTypesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLocale sets the Locale field's value. -func (s *GetBuiltinSlotTypesInput) SetLocale(v string) *GetBuiltinSlotTypesInput { - s.Locale = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetBuiltinSlotTypesInput) SetMaxResults(v int64) *GetBuiltinSlotTypesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetBuiltinSlotTypesInput) SetNextToken(v string) *GetBuiltinSlotTypesInput { - s.NextToken = &v - return s -} - -// SetSignatureContains sets the SignatureContains field's value. -func (s *GetBuiltinSlotTypesInput) SetSignatureContains(v string) *GetBuiltinSlotTypesInput { - s.SignatureContains = &v - return s -} - -type GetBuiltinSlotTypesOutput struct { - _ struct{} `type:"structure"` - - // If the response is truncated, the response includes a pagination token that - // you can use in your next request to fetch the next page of slot types. - NextToken *string `locationName:"nextToken" type:"string"` - - // An array of BuiltInSlotTypeMetadata objects, one entry for each slot type - // returned. - SlotTypes []*BuiltinSlotTypeMetadata `locationName:"slotTypes" type:"list"` -} - -// String returns the string representation -func (s GetBuiltinSlotTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBuiltinSlotTypesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetBuiltinSlotTypesOutput) SetNextToken(v string) *GetBuiltinSlotTypesOutput { - s.NextToken = &v - return s -} - -// SetSlotTypes sets the SlotTypes field's value. -func (s *GetBuiltinSlotTypesOutput) SetSlotTypes(v []*BuiltinSlotTypeMetadata) *GetBuiltinSlotTypesOutput { - s.SlotTypes = v - return s -} - -type GetExportInput struct { - _ struct{} `type:"structure"` - - // The format of the exported data. - // - // ExportType is a required field - ExportType *string `location:"querystring" locationName:"exportType" type:"string" required:"true" enum:"ExportType"` - - // The name of the bot to export. - // - // Name is a required field - Name *string `location:"querystring" locationName:"name" min:"1" type:"string" required:"true"` - - // The type of resource to export. - // - // ResourceType is a required field - ResourceType *string `location:"querystring" locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` - - // The version of the bot to export. - // - // Version is a required field - Version *string `location:"querystring" locationName:"version" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetExportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetExportInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetExportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetExportInput"} - if s.ExportType == nil { - invalidParams.Add(request.NewErrParamRequired("ExportType")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExportType sets the ExportType field's value. -func (s *GetExportInput) SetExportType(v string) *GetExportInput { - s.ExportType = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetExportInput) SetName(v string) *GetExportInput { - s.Name = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *GetExportInput) SetResourceType(v string) *GetExportInput { - s.ResourceType = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetExportInput) SetVersion(v string) *GetExportInput { - s.Version = &v - return s -} - -type GetExportOutput struct { - _ struct{} `type:"structure"` - - // The status of the export. - // - // * IN_PROGRESS - The export is in progress. - // - // * READY - The export is complete. - // - // * FAILED - The export could not be completed. - ExportStatus *string `locationName:"exportStatus" type:"string" enum:"ExportStatus"` - - // The format of the exported data. - ExportType *string `locationName:"exportType" type:"string" enum:"ExportType"` - - // If status is FAILED, Amazon Lex provides the reason that it failed to export - // the resource. - FailureReason *string `locationName:"failureReason" type:"string"` - - // The name of the bot being exported. - Name *string `locationName:"name" min:"1" type:"string"` - - // The type of the exported resource. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // An S3 pre-signed URL that provides the location of the exported resource. - // The exported resource is a ZIP archive that contains the exported resource - // in JSON format. The structure of the archive may change. Your code should - // not rely on the archive structure. - Url *string `locationName:"url" type:"string"` - - // The version of the bot being exported. - Version *string `locationName:"version" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetExportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetExportOutput) GoString() string { - return s.String() -} - -// SetExportStatus sets the ExportStatus field's value. -func (s *GetExportOutput) SetExportStatus(v string) *GetExportOutput { - s.ExportStatus = &v - return s -} - -// SetExportType sets the ExportType field's value. -func (s *GetExportOutput) SetExportType(v string) *GetExportOutput { - s.ExportType = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *GetExportOutput) SetFailureReason(v string) *GetExportOutput { - s.FailureReason = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetExportOutput) SetName(v string) *GetExportOutput { - s.Name = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *GetExportOutput) SetResourceType(v string) *GetExportOutput { - s.ResourceType = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *GetExportOutput) SetUrl(v string) *GetExportOutput { - s.Url = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetExportOutput) SetVersion(v string) *GetExportOutput { - s.Version = &v - return s -} - -type GetImportInput struct { - _ struct{} `type:"structure"` - - // The identifier of the import job information to return. - // - // ImportId is a required field - ImportId *string `location:"uri" locationName:"importId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetImportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetImportInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetImportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetImportInput"} - if s.ImportId == nil { - invalidParams.Add(request.NewErrParamRequired("ImportId")) - } - if s.ImportId != nil && len(*s.ImportId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ImportId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetImportId sets the ImportId field's value. -func (s *GetImportInput) SetImportId(v string) *GetImportInput { - s.ImportId = &v - return s -} - -type GetImportOutput struct { - _ struct{} `type:"structure"` - - // A timestamp for the date and time that the import job was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A string that describes why an import job failed to complete. - FailureReason []*string `locationName:"failureReason" type:"list"` - - // The identifier for the specific import job. - ImportId *string `locationName:"importId" type:"string"` - - // The status of the import job. If the status is FAILED, you can get the reason - // for the failure from the failureReason field. - ImportStatus *string `locationName:"importStatus" type:"string" enum:"ImportStatus"` - - // The action taken when there was a conflict between an existing resource and - // a resource in the import file. - MergeStrategy *string `locationName:"mergeStrategy" type:"string" enum:"MergeStrategy"` - - // The name given to the import job. - Name *string `locationName:"name" min:"1" type:"string"` - - // The type of resource imported. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` -} - -// String returns the string representation -func (s GetImportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetImportOutput) GoString() string { - return s.String() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *GetImportOutput) SetCreatedDate(v time.Time) *GetImportOutput { - s.CreatedDate = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *GetImportOutput) SetFailureReason(v []*string) *GetImportOutput { - s.FailureReason = v - return s -} - -// SetImportId sets the ImportId field's value. -func (s *GetImportOutput) SetImportId(v string) *GetImportOutput { - s.ImportId = &v - return s -} - -// SetImportStatus sets the ImportStatus field's value. -func (s *GetImportOutput) SetImportStatus(v string) *GetImportOutput { - s.ImportStatus = &v - return s -} - -// SetMergeStrategy sets the MergeStrategy field's value. -func (s *GetImportOutput) SetMergeStrategy(v string) *GetImportOutput { - s.MergeStrategy = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetImportOutput) SetName(v string) *GetImportOutput { - s.Name = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *GetImportOutput) SetResourceType(v string) *GetImportOutput { - s.ResourceType = &v - return s -} - -type GetIntentInput struct { - _ struct{} `type:"structure"` - - // The name of the intent. The name is case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` - - // The version of the intent. - // - // Version is a required field - Version *string `location:"uri" locationName:"version" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetIntentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIntentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIntentInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetIntentInput) SetName(v string) *GetIntentInput { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetIntentInput) SetVersion(v string) *GetIntentInput { - s.Version = &v - return s -} - -type GetIntentOutput struct { - _ struct{} `type:"structure"` - - // Checksum of the intent. - Checksum *string `locationName:"checksum" type:"string"` - - // After the Lambda function specified in the fulfillmentActivity element fulfills - // the intent, Amazon Lex conveys this statement to the user. - ConclusionStatement *Statement `locationName:"conclusionStatement" type:"structure"` - - // If defined in the bot, Amazon Lex uses prompt to confirm the intent before - // fulfilling the user's request. For more information, see PutIntent. - ConfirmationPrompt *Prompt `locationName:"confirmationPrompt" type:"structure"` - - // The date that the intent was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the intent. - Description *string `locationName:"description" type:"string"` - - // If defined in the bot, Amazon Amazon Lex invokes this Lambda function for - // each user input. For more information, see PutIntent. - DialogCodeHook *CodeHook `locationName:"dialogCodeHook" type:"structure"` - - // If defined in the bot, Amazon Lex uses this prompt to solicit additional - // user activity after the intent is fulfilled. For more information, see PutIntent. - FollowUpPrompt *FollowUpPrompt `locationName:"followUpPrompt" type:"structure"` - - // Describes how the intent is fulfilled. For more information, see PutIntent. - FulfillmentActivity *FulfillmentActivity `locationName:"fulfillmentActivity" type:"structure"` - - // The date that the intent was updated. When you create a resource, the creation - // date and the last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The name of the intent. - Name *string `locationName:"name" min:"1" type:"string"` - - // A unique identifier for a built-in intent. - ParentIntentSignature *string `locationName:"parentIntentSignature" type:"string"` - - // If the user answers "no" to the question defined in confirmationPrompt, Amazon - // Lex responds with this statement to acknowledge that the intent was canceled. - RejectionStatement *Statement `locationName:"rejectionStatement" type:"structure"` - - // An array of sample utterances configured for the intent. - SampleUtterances []*string `locationName:"sampleUtterances" type:"list"` - - // An array of intent slots configured for the intent. - Slots []*Slot `locationName:"slots" type:"list"` - - // The version of the intent. - Version *string `locationName:"version" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetIntentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntentOutput) GoString() string { - return s.String() -} - -// SetChecksum sets the Checksum field's value. -func (s *GetIntentOutput) SetChecksum(v string) *GetIntentOutput { - s.Checksum = &v - return s -} - -// SetConclusionStatement sets the ConclusionStatement field's value. -func (s *GetIntentOutput) SetConclusionStatement(v *Statement) *GetIntentOutput { - s.ConclusionStatement = v - return s -} - -// SetConfirmationPrompt sets the ConfirmationPrompt field's value. -func (s *GetIntentOutput) SetConfirmationPrompt(v *Prompt) *GetIntentOutput { - s.ConfirmationPrompt = v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *GetIntentOutput) SetCreatedDate(v time.Time) *GetIntentOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetIntentOutput) SetDescription(v string) *GetIntentOutput { - s.Description = &v - return s -} - -// SetDialogCodeHook sets the DialogCodeHook field's value. -func (s *GetIntentOutput) SetDialogCodeHook(v *CodeHook) *GetIntentOutput { - s.DialogCodeHook = v - return s -} - -// SetFollowUpPrompt sets the FollowUpPrompt field's value. -func (s *GetIntentOutput) SetFollowUpPrompt(v *FollowUpPrompt) *GetIntentOutput { - s.FollowUpPrompt = v - return s -} - -// SetFulfillmentActivity sets the FulfillmentActivity field's value. -func (s *GetIntentOutput) SetFulfillmentActivity(v *FulfillmentActivity) *GetIntentOutput { - s.FulfillmentActivity = v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *GetIntentOutput) SetLastUpdatedDate(v time.Time) *GetIntentOutput { - s.LastUpdatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetIntentOutput) SetName(v string) *GetIntentOutput { - s.Name = &v - return s -} - -// SetParentIntentSignature sets the ParentIntentSignature field's value. -func (s *GetIntentOutput) SetParentIntentSignature(v string) *GetIntentOutput { - s.ParentIntentSignature = &v - return s -} - -// SetRejectionStatement sets the RejectionStatement field's value. -func (s *GetIntentOutput) SetRejectionStatement(v *Statement) *GetIntentOutput { - s.RejectionStatement = v - return s -} - -// SetSampleUtterances sets the SampleUtterances field's value. -func (s *GetIntentOutput) SetSampleUtterances(v []*string) *GetIntentOutput { - s.SampleUtterances = v - return s -} - -// SetSlots sets the Slots field's value. -func (s *GetIntentOutput) SetSlots(v []*Slot) *GetIntentOutput { - s.Slots = v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetIntentOutput) SetVersion(v string) *GetIntentOutput { - s.Version = &v - return s -} - -type GetIntentVersionsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of intent versions to return in the response. The default - // is 10. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The name of the intent for which versions should be returned. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` - - // A pagination token for fetching the next page of intent versions. If the - // response to this call is truncated, Amazon Lex returns a pagination token - // in the response. To fetch the next page of versions, specify the pagination - // token in the next request. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetIntentVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntentVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIntentVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIntentVersionsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetIntentVersionsInput) SetMaxResults(v int64) *GetIntentVersionsInput { - s.MaxResults = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetIntentVersionsInput) SetName(v string) *GetIntentVersionsInput { - s.Name = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetIntentVersionsInput) SetNextToken(v string) *GetIntentVersionsInput { - s.NextToken = &v - return s -} - -type GetIntentVersionsOutput struct { - _ struct{} `type:"structure"` - - // An array of IntentMetadata objects, one for each numbered version of the - // intent plus one for the $LATEST version. - Intents []*IntentMetadata `locationName:"intents" type:"list"` - - // A pagination token for fetching the next page of intent versions. If the - // response to this call is truncated, Amazon Lex returns a pagination token - // in the response. To fetch the next page of versions, specify the pagination - // token in the next request. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetIntentVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntentVersionsOutput) GoString() string { - return s.String() -} - -// SetIntents sets the Intents field's value. -func (s *GetIntentVersionsOutput) SetIntents(v []*IntentMetadata) *GetIntentVersionsOutput { - s.Intents = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetIntentVersionsOutput) SetNextToken(v string) *GetIntentVersionsOutput { - s.NextToken = &v - return s -} - -type GetIntentsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of intents to return in the response. The default is 10. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // Substring to match in intent names. An intent will be returned if any part - // of its name matches the substring. For example, "xyz" matches both "xyzabc" - // and "abcxyz." - NameContains *string `location:"querystring" locationName:"nameContains" min:"1" type:"string"` - - // A pagination token that fetches the next page of intents. If the response - // to this API call is truncated, Amazon Lex returns a pagination token in the - // response. To fetch the next page of intents, specify the pagination token - // in the next request. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetIntentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIntentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIntentsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NameContains != nil && len(*s.NameContains) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetIntentsInput) SetMaxResults(v int64) *GetIntentsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *GetIntentsInput) SetNameContains(v string) *GetIntentsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetIntentsInput) SetNextToken(v string) *GetIntentsInput { - s.NextToken = &v - return s -} - -type GetIntentsOutput struct { - _ struct{} `type:"structure"` - - // An array of Intent objects. For more information, see PutBot. - Intents []*IntentMetadata `locationName:"intents" type:"list"` - - // If the response is truncated, the response includes a pagination token that - // you can specify in your next request to fetch the next page of intents. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetIntentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIntentsOutput) GoString() string { - return s.String() -} - -// SetIntents sets the Intents field's value. -func (s *GetIntentsOutput) SetIntents(v []*IntentMetadata) *GetIntentsOutput { - s.Intents = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetIntentsOutput) SetNextToken(v string) *GetIntentsOutput { - s.NextToken = &v - return s -} - -type GetSlotTypeInput struct { - _ struct{} `type:"structure"` - - // The name of the slot type. The name is case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` - - // The version of the slot type. - // - // Version is a required field - Version *string `location:"uri" locationName:"version" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSlotTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSlotTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSlotTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSlotTypeInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetSlotTypeInput) SetName(v string) *GetSlotTypeInput { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetSlotTypeInput) SetVersion(v string) *GetSlotTypeInput { - s.Version = &v - return s -} - -type GetSlotTypeOutput struct { - _ struct{} `type:"structure"` - - // Checksum of the $LATEST version of the slot type. - Checksum *string `locationName:"checksum" type:"string"` - - // The date that the slot type was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the slot type. - Description *string `locationName:"description" type:"string"` - - // A list of EnumerationValue objects that defines the values that the slot - // type can take. - EnumerationValues []*EnumerationValue `locationName:"enumerationValues" min:"1" type:"list"` - - // The date that the slot type was updated. When you create a resource, the - // creation date and last update date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The name of the slot type. - Name *string `locationName:"name" min:"1" type:"string"` - - // The strategy that Amazon Lex uses to determine the value of the slot. For - // more information, see PutSlotType. - ValueSelectionStrategy *string `locationName:"valueSelectionStrategy" type:"string" enum:"SlotValueSelectionStrategy"` - - // The version of the slot type. - Version *string `locationName:"version" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetSlotTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSlotTypeOutput) GoString() string { - return s.String() -} - -// SetChecksum sets the Checksum field's value. -func (s *GetSlotTypeOutput) SetChecksum(v string) *GetSlotTypeOutput { - s.Checksum = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *GetSlotTypeOutput) SetCreatedDate(v time.Time) *GetSlotTypeOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetSlotTypeOutput) SetDescription(v string) *GetSlotTypeOutput { - s.Description = &v - return s -} - -// SetEnumerationValues sets the EnumerationValues field's value. -func (s *GetSlotTypeOutput) SetEnumerationValues(v []*EnumerationValue) *GetSlotTypeOutput { - s.EnumerationValues = v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *GetSlotTypeOutput) SetLastUpdatedDate(v time.Time) *GetSlotTypeOutput { - s.LastUpdatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetSlotTypeOutput) SetName(v string) *GetSlotTypeOutput { - s.Name = &v - return s -} - -// SetValueSelectionStrategy sets the ValueSelectionStrategy field's value. -func (s *GetSlotTypeOutput) SetValueSelectionStrategy(v string) *GetSlotTypeOutput { - s.ValueSelectionStrategy = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetSlotTypeOutput) SetVersion(v string) *GetSlotTypeOutput { - s.Version = &v - return s -} - -type GetSlotTypeVersionsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of slot type versions to return in the response. The default - // is 10. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The name of the slot type for which versions should be returned. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` - - // A pagination token for fetching the next page of slot type versions. If the - // response to this call is truncated, Amazon Lex returns a pagination token - // in the response. To fetch the next page of versions, specify the pagination - // token in the next request. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetSlotTypeVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSlotTypeVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSlotTypeVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSlotTypeVersionsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetSlotTypeVersionsInput) SetMaxResults(v int64) *GetSlotTypeVersionsInput { - s.MaxResults = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetSlotTypeVersionsInput) SetName(v string) *GetSlotTypeVersionsInput { - s.Name = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetSlotTypeVersionsInput) SetNextToken(v string) *GetSlotTypeVersionsInput { - s.NextToken = &v - return s -} - -type GetSlotTypeVersionsOutput struct { - _ struct{} `type:"structure"` - - // A pagination token for fetching the next page of slot type versions. If the - // response to this call is truncated, Amazon Lex returns a pagination token - // in the response. To fetch the next page of versions, specify the pagination - // token in the next request. - NextToken *string `locationName:"nextToken" type:"string"` - - // An array of SlotTypeMetadata objects, one for each numbered version of the - // slot type plus one for the $LATEST version. - SlotTypes []*SlotTypeMetadata `locationName:"slotTypes" type:"list"` -} - -// String returns the string representation -func (s GetSlotTypeVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSlotTypeVersionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetSlotTypeVersionsOutput) SetNextToken(v string) *GetSlotTypeVersionsOutput { - s.NextToken = &v - return s -} - -// SetSlotTypes sets the SlotTypes field's value. -func (s *GetSlotTypeVersionsOutput) SetSlotTypes(v []*SlotTypeMetadata) *GetSlotTypeVersionsOutput { - s.SlotTypes = v - return s -} - -type GetSlotTypesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of slot types to return in the response. The default is - // 10. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // Substring to match in slot type names. A slot type will be returned if any - // part of its name matches the substring. For example, "xyz" matches both "xyzabc" - // and "abcxyz." - NameContains *string `location:"querystring" locationName:"nameContains" min:"1" type:"string"` - - // A pagination token that fetches the next page of slot types. If the response - // to this API call is truncated, Amazon Lex returns a pagination token in the - // response. To fetch next page of slot types, specify the pagination token - // in the next request. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s GetSlotTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSlotTypesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSlotTypesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSlotTypesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NameContains != nil && len(*s.NameContains) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetSlotTypesInput) SetMaxResults(v int64) *GetSlotTypesInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *GetSlotTypesInput) SetNameContains(v string) *GetSlotTypesInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetSlotTypesInput) SetNextToken(v string) *GetSlotTypesInput { - s.NextToken = &v - return s -} - -type GetSlotTypesOutput struct { - _ struct{} `type:"structure"` - - // If the response is truncated, it includes a pagination token that you can - // specify in your next request to fetch the next page of slot types. - NextToken *string `locationName:"nextToken" type:"string"` - - // An array of objects, one for each slot type, that provides information such - // as the name of the slot type, the version, and a description. - SlotTypes []*SlotTypeMetadata `locationName:"slotTypes" type:"list"` -} - -// String returns the string representation -func (s GetSlotTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSlotTypesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetSlotTypesOutput) SetNextToken(v string) *GetSlotTypesOutput { - s.NextToken = &v - return s -} - -// SetSlotTypes sets the SlotTypes field's value. -func (s *GetSlotTypesOutput) SetSlotTypes(v []*SlotTypeMetadata) *GetSlotTypesOutput { - s.SlotTypes = v - return s -} - -type GetUtterancesViewInput struct { - _ struct{} `type:"structure"` - - // The name of the bot for which utterance information should be returned. - // - // BotName is a required field - BotName *string `location:"uri" locationName:"botname" min:"2" type:"string" required:"true"` - - // An array of bot versions for which utterance information should be returned. - // The limit is 5 versions per request. - // - // BotVersions is a required field - BotVersions []*string `location:"querystring" locationName:"bot_versions" min:"1" type:"list" required:"true"` - - // To return utterances that were recognized and handled, useDetected. To return - // utterances that were not recognized, use Missed. - // - // StatusType is a required field - StatusType *string `location:"querystring" locationName:"status_type" type:"string" required:"true" enum:"StatusType"` -} - -// String returns the string representation -func (s GetUtterancesViewInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUtterancesViewInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUtterancesViewInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUtterancesViewInput"} - if s.BotName == nil { - invalidParams.Add(request.NewErrParamRequired("BotName")) - } - if s.BotName != nil && len(*s.BotName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) - } - if s.BotVersions == nil { - invalidParams.Add(request.NewErrParamRequired("BotVersions")) - } - if s.BotVersions != nil && len(s.BotVersions) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BotVersions", 1)) - } - if s.StatusType == nil { - invalidParams.Add(request.NewErrParamRequired("StatusType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBotName sets the BotName field's value. -func (s *GetUtterancesViewInput) SetBotName(v string) *GetUtterancesViewInput { - s.BotName = &v - return s -} - -// SetBotVersions sets the BotVersions field's value. -func (s *GetUtterancesViewInput) SetBotVersions(v []*string) *GetUtterancesViewInput { - s.BotVersions = v - return s -} - -// SetStatusType sets the StatusType field's value. -func (s *GetUtterancesViewInput) SetStatusType(v string) *GetUtterancesViewInput { - s.StatusType = &v - return s -} - -type GetUtterancesViewOutput struct { - _ struct{} `type:"structure"` - - // The name of the bot for which utterance information was returned. - BotName *string `locationName:"botName" min:"2" type:"string"` - - // An array of UtteranceList objects, each containing a list of UtteranceData - // objects describing the utterances that were processed by your bot. The response - // contains a maximum of 100 UtteranceData objects for each version. - Utterances []*UtteranceList `locationName:"utterances" type:"list"` -} - -// String returns the string representation -func (s GetUtterancesViewOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUtterancesViewOutput) GoString() string { - return s.String() -} - -// SetBotName sets the BotName field's value. -func (s *GetUtterancesViewOutput) SetBotName(v string) *GetUtterancesViewOutput { - s.BotName = &v - return s -} - -// SetUtterances sets the Utterances field's value. -func (s *GetUtterancesViewOutput) SetUtterances(v []*UtteranceList) *GetUtterancesViewOutput { - s.Utterances = v - return s -} - -// Identifies the specific version of an intent. -type Intent struct { - _ struct{} `type:"structure"` - - // The name of the intent. - // - // IntentName is a required field - IntentName *string `locationName:"intentName" min:"1" type:"string" required:"true"` - - // The version of the intent. - // - // IntentVersion is a required field - IntentVersion *string `locationName:"intentVersion" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Intent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Intent) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Intent) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Intent"} - if s.IntentName == nil { - invalidParams.Add(request.NewErrParamRequired("IntentName")) - } - if s.IntentName != nil && len(*s.IntentName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IntentName", 1)) - } - if s.IntentVersion == nil { - invalidParams.Add(request.NewErrParamRequired("IntentVersion")) - } - if s.IntentVersion != nil && len(*s.IntentVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IntentVersion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIntentName sets the IntentName field's value. -func (s *Intent) SetIntentName(v string) *Intent { - s.IntentName = &v - return s -} - -// SetIntentVersion sets the IntentVersion field's value. -func (s *Intent) SetIntentVersion(v string) *Intent { - s.IntentVersion = &v - return s -} - -// Provides information about an intent. -type IntentMetadata struct { - _ struct{} `type:"structure"` - - // The date that the intent was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the intent. - Description *string `locationName:"description" type:"string"` - - // The date that the intent was updated. When you create an intent, the creation - // date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The name of the intent. - Name *string `locationName:"name" min:"1" type:"string"` - - // The version of the intent. - Version *string `locationName:"version" min:"1" type:"string"` -} - -// String returns the string representation -func (s IntentMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IntentMetadata) GoString() string { - return s.String() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *IntentMetadata) SetCreatedDate(v time.Time) *IntentMetadata { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *IntentMetadata) SetDescription(v string) *IntentMetadata { - s.Description = &v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *IntentMetadata) SetLastUpdatedDate(v time.Time) *IntentMetadata { - s.LastUpdatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *IntentMetadata) SetName(v string) *IntentMetadata { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *IntentMetadata) SetVersion(v string) *IntentMetadata { - s.Version = &v - return s -} - -// The message object that provides the message text and its type. -type Message struct { - _ struct{} `type:"structure"` - - // The text of the message. - // - // Content is a required field - Content *string `locationName:"content" min:"1" type:"string" required:"true"` - - // The content type of the message string. - // - // ContentType is a required field - ContentType *string `locationName:"contentType" type:"string" required:"true" enum:"ContentType"` - - // Identifies the message group that the message belongs to. When a group is - // assigned to a message, Amazon Lex returns one message from each group in - // the response. - GroupNumber *int64 `locationName:"groupNumber" min:"1" type:"integer"` -} - -// String returns the string representation -func (s Message) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Message) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Message) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Message"} - if s.Content == nil { - invalidParams.Add(request.NewErrParamRequired("Content")) - } - if s.Content != nil && len(*s.Content) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Content", 1)) - } - if s.ContentType == nil { - invalidParams.Add(request.NewErrParamRequired("ContentType")) - } - if s.GroupNumber != nil && *s.GroupNumber < 1 { - invalidParams.Add(request.NewErrParamMinValue("GroupNumber", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContent sets the Content field's value. -func (s *Message) SetContent(v string) *Message { - s.Content = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *Message) SetContentType(v string) *Message { - s.ContentType = &v - return s -} - -// SetGroupNumber sets the GroupNumber field's value. -func (s *Message) SetGroupNumber(v int64) *Message { - s.GroupNumber = &v - return s -} - -// Obtains information from the user. To define a prompt, provide one or more -// messages and specify the number of attempts to get information from the user. -// If you provide more than one message, Amazon Lex chooses one of the messages -// to use to prompt the user. For more information, see how-it-works. -type Prompt struct { - _ struct{} `type:"structure"` - - // The number of times to prompt the user for information. - // - // MaxAttempts is a required field - MaxAttempts *int64 `locationName:"maxAttempts" min:"1" type:"integer" required:"true"` - - // An array of objects, each of which provides a message string and its type. - // You can specify the message string in plain text or in Speech Synthesis Markup - // Language (SSML). - // - // Messages is a required field - Messages []*Message `locationName:"messages" min:"1" type:"list" required:"true"` - - // A response card. Amazon Lex uses this prompt at runtime, in the PostText - // API response. It substitutes session attributes and slot values for placeholders - // in the response card. For more information, see ex-resp-card. - ResponseCard *string `locationName:"responseCard" min:"1" type:"string"` -} - -// String returns the string representation -func (s Prompt) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Prompt) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Prompt) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Prompt"} - if s.MaxAttempts == nil { - invalidParams.Add(request.NewErrParamRequired("MaxAttempts")) - } - if s.MaxAttempts != nil && *s.MaxAttempts < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxAttempts", 1)) - } - if s.Messages == nil { - invalidParams.Add(request.NewErrParamRequired("Messages")) - } - if s.Messages != nil && len(s.Messages) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Messages", 1)) - } - if s.ResponseCard != nil && len(*s.ResponseCard) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResponseCard", 1)) - } - if s.Messages != nil { - for i, v := range s.Messages { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Messages", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxAttempts sets the MaxAttempts field's value. -func (s *Prompt) SetMaxAttempts(v int64) *Prompt { - s.MaxAttempts = &v - return s -} - -// SetMessages sets the Messages field's value. -func (s *Prompt) SetMessages(v []*Message) *Prompt { - s.Messages = v - return s -} - -// SetResponseCard sets the ResponseCard field's value. -func (s *Prompt) SetResponseCard(v string) *Prompt { - s.ResponseCard = &v - return s -} - -type PutBotAliasInput struct { - _ struct{} `type:"structure"` - - // The name of the bot. - // - // BotName is a required field - BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` - - // The version of the bot. - // - // BotVersion is a required field - BotVersion *string `locationName:"botVersion" min:"1" type:"string" required:"true"` - - // Identifies a specific revision of the $LATEST version. - // - // When you create a new bot alias, leave the checksum field blank. If you specify - // a checksum you get a BadRequestException exception. - // - // When you want to update a bot alias, set the checksum field to the checksum - // of the most recent revision of the $LATEST version. If you don't specify - // the checksum field, or if the checksum does not match the $LATEST version, - // you get a PreconditionFailedException exception. - Checksum *string `locationName:"checksum" type:"string"` - - // A description of the alias. - Description *string `locationName:"description" type:"string"` - - // The name of the alias. The name is not case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutBotAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutBotAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBotAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBotAliasInput"} - if s.BotName == nil { - invalidParams.Add(request.NewErrParamRequired("BotName")) - } - if s.BotName != nil && len(*s.BotName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) - } - if s.BotVersion == nil { - invalidParams.Add(request.NewErrParamRequired("BotVersion")) - } - if s.BotVersion != nil && len(*s.BotVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BotVersion", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBotName sets the BotName field's value. -func (s *PutBotAliasInput) SetBotName(v string) *PutBotAliasInput { - s.BotName = &v - return s -} - -// SetBotVersion sets the BotVersion field's value. -func (s *PutBotAliasInput) SetBotVersion(v string) *PutBotAliasInput { - s.BotVersion = &v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *PutBotAliasInput) SetChecksum(v string) *PutBotAliasInput { - s.Checksum = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PutBotAliasInput) SetDescription(v string) *PutBotAliasInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *PutBotAliasInput) SetName(v string) *PutBotAliasInput { - s.Name = &v - return s -} - -type PutBotAliasOutput struct { - _ struct{} `type:"structure"` - - // The name of the bot that the alias points to. - BotName *string `locationName:"botName" min:"2" type:"string"` - - // The version of the bot that the alias points to. - BotVersion *string `locationName:"botVersion" min:"1" type:"string"` - - // The checksum for the current version of the alias. - Checksum *string `locationName:"checksum" type:"string"` - - // The date that the bot alias was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the alias. - Description *string `locationName:"description" type:"string"` - - // The date that the bot alias was updated. When you create a resource, the - // creation date and the last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The name of the alias. - Name *string `locationName:"name" min:"1" type:"string"` -} - -// String returns the string representation -func (s PutBotAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutBotAliasOutput) GoString() string { - return s.String() -} - -// SetBotName sets the BotName field's value. -func (s *PutBotAliasOutput) SetBotName(v string) *PutBotAliasOutput { - s.BotName = &v - return s -} - -// SetBotVersion sets the BotVersion field's value. -func (s *PutBotAliasOutput) SetBotVersion(v string) *PutBotAliasOutput { - s.BotVersion = &v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *PutBotAliasOutput) SetChecksum(v string) *PutBotAliasOutput { - s.Checksum = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *PutBotAliasOutput) SetCreatedDate(v time.Time) *PutBotAliasOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PutBotAliasOutput) SetDescription(v string) *PutBotAliasOutput { - s.Description = &v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *PutBotAliasOutput) SetLastUpdatedDate(v time.Time) *PutBotAliasOutput { - s.LastUpdatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *PutBotAliasOutput) SetName(v string) *PutBotAliasOutput { - s.Name = &v - return s -} - -type PutBotInput struct { - _ struct{} `type:"structure"` - - // When Amazon Lex can't understand the user's input in context, it tries to - // elicit the information a few times. After that, Amazon Lex sends the message - // defined in abortStatement to the user, and then aborts the conversation. - // To set the number of retries, use the valueElicitationPrompt field for the - // slot type. - // - // For example, in a pizza ordering bot, Amazon Lex might ask a user "What type - // of crust would you like?" If the user's response is not one of the expected - // responses (for example, "thin crust, "deep dish," etc.), Amazon Lex tries - // to elicit a correct response a few more times. - // - // For example, in a pizza ordering application, OrderPizza might be one of - // the intents. This intent might require the CrustType slot. You specify the - // valueElicitationPrompt field when you create the CrustType slot. - AbortStatement *Statement `locationName:"abortStatement" type:"structure"` - - // Identifies a specific revision of the $LATEST version. - // - // When you create a new bot, leave the checksum field blank. If you specify - // a checksum you get a BadRequestException exception. - // - // When you want to update a bot, set the checksum field to the checksum of - // the most recent revision of the $LATEST version. If you don't specify the - // checksum field, or if the checksum does not match the $LATEST version, you - // get a PreconditionFailedException exception. - Checksum *string `locationName:"checksum" type:"string"` - - // For each Amazon Lex bot created with the Amazon Lex Model Building Service, - // you must specify whether your use of Amazon Lex is related to a website, - // program, or other application that is directed or targeted, in whole or in - // part, to children under age 13 and subject to the Children's Online Privacy - // Protection Act (COPPA) by specifying true or false in the childDirected field. - // By specifying true in the childDirected field, you confirm that your use - // of Amazon Lex is related to a website, program, or other application that - // is directed or targeted, in whole or in part, to children under age 13 and - // subject to COPPA. By specifying false in the childDirected field, you confirm - // that your use of Amazon Lex is not related to a website, program, or other - // application that is directed or targeted, in whole or in part, to children - // under age 13 and subject to COPPA. You may not specify a default value for - // the childDirected field that does not accurately reflect whether your use - // of Amazon Lex is related to a website, program, or other application that - // is directed or targeted, in whole or in part, to children under age 13 and - // subject to COPPA. - // - // If your use of Amazon Lex relates to a website, program, or other application - // that is directed in whole or in part, to children under age 13, you must - // obtain any required verifiable parental consent under COPPA. For information - // regarding the use of Amazon Lex in connection with websites, programs, or - // other applications that are directed or targeted, in whole or in part, to - // children under age 13, see the Amazon Lex FAQ. (https://aws.amazon.com/lex/faqs#data-security) - // - // ChildDirected is a required field - ChildDirected *bool `locationName:"childDirected" type:"boolean" required:"true"` - - // When Amazon Lex doesn't understand the user's intent, it uses this message - // to get clarification. To specify how many times Amazon Lex should repeate - // the clarification prompt, use the maxAttempts field. If Amazon Lex still - // doesn't understand, it sends the message in the abortStatement field. - // - // When you create a clarification prompt, make sure that it suggests the correct - // response from the user. for example, for a bot that orders pizza and drinks, - // you might create this clarification prompt: "What would you like to do? You - // can say 'Order a pizza' or 'Order a drink.'" - ClarificationPrompt *Prompt `locationName:"clarificationPrompt" type:"structure"` - - CreateVersion *bool `locationName:"createVersion" type:"boolean"` - - // A description of the bot. - Description *string `locationName:"description" type:"string"` - - // The maximum time in seconds that Amazon Lex retains the data gathered in - // a conversation. - // - // A user interaction session remains active for the amount of time specified. - // If no conversation occurs during this time, the session expires and Amazon - // Lex deletes any data provided before the timeout. - // - // For example, suppose that a user chooses the OrderPizza intent, but gets - // sidetracked halfway through placing an order. If the user doesn't complete - // the order within the specified time, Amazon Lex discards the slot information - // that it gathered, and the user must start over. - // - // If you don't include the idleSessionTTLInSeconds element in a PutBot operation - // request, Amazon Lex uses the default value. This is also true if the request - // replaces an existing bot. - // - // The default is 300 seconds (5 minutes). - IdleSessionTTLInSeconds *int64 `locationName:"idleSessionTTLInSeconds" min:"60" type:"integer"` - - // An array of Intent objects. Each intent represents a command that a user - // can express. For example, a pizza ordering bot might support an OrderPizza - // intent. For more information, see how-it-works. - Intents []*Intent `locationName:"intents" type:"list"` - - // Specifies the target locale for the bot. Any intent used in the bot must - // be compatible with the locale of the bot. - // - // The default is en-US. - // - // Locale is a required field - Locale *string `locationName:"locale" type:"string" required:"true" enum:"Locale"` - - // The name of the bot. The name is not case sensitive. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"2" type:"string" required:"true"` - - // If you set the processBehavior element to BUILD, Amazon Lex builds the bot - // so that it can be run. If you set the element to SAVE Amazon Lex saves the - // bot, but doesn't build it. - // - // If you don't specify this value, the default value is BUILD. - ProcessBehavior *string `locationName:"processBehavior" type:"string" enum:"ProcessBehavior"` - - // The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions - // with the user. The locale configured for the voice must match the locale - // of the bot. For more information, see Available Voices (http://docs.aws.amazon.com/polly/latest/dg/voicelist.html) - // in the Amazon Polly Developer Guide. - VoiceId *string `locationName:"voiceId" type:"string"` -} - -// String returns the string representation -func (s PutBotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutBotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBotInput"} - if s.ChildDirected == nil { - invalidParams.Add(request.NewErrParamRequired("ChildDirected")) - } - if s.IdleSessionTTLInSeconds != nil && *s.IdleSessionTTLInSeconds < 60 { - invalidParams.Add(request.NewErrParamMinValue("IdleSessionTTLInSeconds", 60)) - } - if s.Locale == nil { - invalidParams.Add(request.NewErrParamRequired("Locale")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 2 { - invalidParams.Add(request.NewErrParamMinLen("Name", 2)) - } - if s.AbortStatement != nil { - if err := s.AbortStatement.Validate(); err != nil { - invalidParams.AddNested("AbortStatement", err.(request.ErrInvalidParams)) - } - } - if s.ClarificationPrompt != nil { - if err := s.ClarificationPrompt.Validate(); err != nil { - invalidParams.AddNested("ClarificationPrompt", err.(request.ErrInvalidParams)) - } - } - if s.Intents != nil { - for i, v := range s.Intents { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Intents", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAbortStatement sets the AbortStatement field's value. -func (s *PutBotInput) SetAbortStatement(v *Statement) *PutBotInput { - s.AbortStatement = v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *PutBotInput) SetChecksum(v string) *PutBotInput { - s.Checksum = &v - return s -} - -// SetChildDirected sets the ChildDirected field's value. -func (s *PutBotInput) SetChildDirected(v bool) *PutBotInput { - s.ChildDirected = &v - return s -} - -// SetClarificationPrompt sets the ClarificationPrompt field's value. -func (s *PutBotInput) SetClarificationPrompt(v *Prompt) *PutBotInput { - s.ClarificationPrompt = v - return s -} - -// SetCreateVersion sets the CreateVersion field's value. -func (s *PutBotInput) SetCreateVersion(v bool) *PutBotInput { - s.CreateVersion = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PutBotInput) SetDescription(v string) *PutBotInput { - s.Description = &v - return s -} - -// SetIdleSessionTTLInSeconds sets the IdleSessionTTLInSeconds field's value. -func (s *PutBotInput) SetIdleSessionTTLInSeconds(v int64) *PutBotInput { - s.IdleSessionTTLInSeconds = &v - return s -} - -// SetIntents sets the Intents field's value. -func (s *PutBotInput) SetIntents(v []*Intent) *PutBotInput { - s.Intents = v - return s -} - -// SetLocale sets the Locale field's value. -func (s *PutBotInput) SetLocale(v string) *PutBotInput { - s.Locale = &v - return s -} - -// SetName sets the Name field's value. -func (s *PutBotInput) SetName(v string) *PutBotInput { - s.Name = &v - return s -} - -// SetProcessBehavior sets the ProcessBehavior field's value. -func (s *PutBotInput) SetProcessBehavior(v string) *PutBotInput { - s.ProcessBehavior = &v - return s -} - -// SetVoiceId sets the VoiceId field's value. -func (s *PutBotInput) SetVoiceId(v string) *PutBotInput { - s.VoiceId = &v - return s -} - -type PutBotOutput struct { - _ struct{} `type:"structure"` - - // The message that Amazon Lex uses to abort a conversation. For more information, - // see PutBot. - AbortStatement *Statement `locationName:"abortStatement" type:"structure"` - - // Checksum of the bot that you created. - Checksum *string `locationName:"checksum" type:"string"` - - // For each Amazon Lex bot created with the Amazon Lex Model Building Service, - // you must specify whether your use of Amazon Lex is related to a website, - // program, or other application that is directed or targeted, in whole or in - // part, to children under age 13 and subject to the Children's Online Privacy - // Protection Act (COPPA) by specifying true or false in the childDirected field. - // By specifying true in the childDirected field, you confirm that your use - // of Amazon Lex is related to a website, program, or other application that - // is directed or targeted, in whole or in part, to children under age 13 and - // subject to COPPA. By specifying false in the childDirected field, you confirm - // that your use of Amazon Lex is not related to a website, program, or other - // application that is directed or targeted, in whole or in part, to children - // under age 13 and subject to COPPA. You may not specify a default value for - // the childDirected field that does not accurately reflect whether your use - // of Amazon Lex is related to a website, program, or other application that - // is directed or targeted, in whole or in part, to children under age 13 and - // subject to COPPA. - // - // If your use of Amazon Lex relates to a website, program, or other application - // that is directed in whole or in part, to children under age 13, you must - // obtain any required verifiable parental consent under COPPA. For information - // regarding the use of Amazon Lex in connection with websites, programs, or - // other applications that are directed or targeted, in whole or in part, to - // children under age 13, see the Amazon Lex FAQ. (https://aws.amazon.com/lex/faqs#data-security) - ChildDirected *bool `locationName:"childDirected" type:"boolean"` - - // The prompts that Amazon Lex uses when it doesn't understand the user's intent. - // For more information, see PutBot. - ClarificationPrompt *Prompt `locationName:"clarificationPrompt" type:"structure"` - - CreateVersion *bool `locationName:"createVersion" type:"boolean"` - - // The date that the bot was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the bot. - Description *string `locationName:"description" type:"string"` - - // If status is FAILED, Amazon Lex provides the reason that it failed to build - // the bot. - FailureReason *string `locationName:"failureReason" type:"string"` - - // The maximum length of time that Amazon Lex retains the data gathered in a - // conversation. For more information, see PutBot. - IdleSessionTTLInSeconds *int64 `locationName:"idleSessionTTLInSeconds" min:"60" type:"integer"` - - // An array of Intent objects. For more information, see PutBot. - Intents []*Intent `locationName:"intents" type:"list"` - - // The date that the bot was updated. When you create a resource, the creation - // date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The target locale for the bot. - Locale *string `locationName:"locale" type:"string" enum:"Locale"` - - // The name of the bot. - Name *string `locationName:"name" min:"2" type:"string"` - - // When you send a request to create a bot with processBehavior set to BUILD, - // Amazon Lex sets the status response element to BUILDING. After Amazon Lex - // builds the bot, it sets status to READY. If Amazon Lex can't build the bot, - // Amazon Lex sets status to FAILED. Amazon Lex returns the reason for the failure - // in the failureReason response element. - // - // When you set processBehaviorto SAVE, Amazon Lex sets the status code to NOT - // BUILT. - Status *string `locationName:"status" type:"string" enum:"Status"` - - // The version of the bot. For a new bot, the version is always $LATEST. - Version *string `locationName:"version" min:"1" type:"string"` - - // The Amazon Polly voice ID that Amazon Lex uses for voice interaction with - // the user. For more information, see PutBot. - VoiceId *string `locationName:"voiceId" type:"string"` -} - -// String returns the string representation -func (s PutBotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutBotOutput) GoString() string { - return s.String() -} - -// SetAbortStatement sets the AbortStatement field's value. -func (s *PutBotOutput) SetAbortStatement(v *Statement) *PutBotOutput { - s.AbortStatement = v - return s -} - -// SetChecksum sets the Checksum field's value. -func (s *PutBotOutput) SetChecksum(v string) *PutBotOutput { - s.Checksum = &v - return s -} - -// SetChildDirected sets the ChildDirected field's value. -func (s *PutBotOutput) SetChildDirected(v bool) *PutBotOutput { - s.ChildDirected = &v - return s -} - -// SetClarificationPrompt sets the ClarificationPrompt field's value. -func (s *PutBotOutput) SetClarificationPrompt(v *Prompt) *PutBotOutput { - s.ClarificationPrompt = v - return s -} - -// SetCreateVersion sets the CreateVersion field's value. -func (s *PutBotOutput) SetCreateVersion(v bool) *PutBotOutput { - s.CreateVersion = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *PutBotOutput) SetCreatedDate(v time.Time) *PutBotOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PutBotOutput) SetDescription(v string) *PutBotOutput { - s.Description = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *PutBotOutput) SetFailureReason(v string) *PutBotOutput { - s.FailureReason = &v - return s -} - -// SetIdleSessionTTLInSeconds sets the IdleSessionTTLInSeconds field's value. -func (s *PutBotOutput) SetIdleSessionTTLInSeconds(v int64) *PutBotOutput { - s.IdleSessionTTLInSeconds = &v - return s -} - -// SetIntents sets the Intents field's value. -func (s *PutBotOutput) SetIntents(v []*Intent) *PutBotOutput { - s.Intents = v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *PutBotOutput) SetLastUpdatedDate(v time.Time) *PutBotOutput { - s.LastUpdatedDate = &v - return s -} - -// SetLocale sets the Locale field's value. -func (s *PutBotOutput) SetLocale(v string) *PutBotOutput { - s.Locale = &v - return s -} - -// SetName sets the Name field's value. -func (s *PutBotOutput) SetName(v string) *PutBotOutput { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *PutBotOutput) SetStatus(v string) *PutBotOutput { - s.Status = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *PutBotOutput) SetVersion(v string) *PutBotOutput { - s.Version = &v - return s -} - -// SetVoiceId sets the VoiceId field's value. -func (s *PutBotOutput) SetVoiceId(v string) *PutBotOutput { - s.VoiceId = &v - return s -} - -type PutIntentInput struct { - _ struct{} `type:"structure"` - - // Identifies a specific revision of the $LATEST version. - // - // When you create a new intent, leave the checksum field blank. If you specify - // a checksum you get a BadRequestException exception. - // - // When you want to update a intent, set the checksum field to the checksum - // of the most recent revision of the $LATEST version. If you don't specify - // the checksum field, or if the checksum does not match the $LATEST version, - // you get a PreconditionFailedException exception. - Checksum *string `locationName:"checksum" type:"string"` - - // The statement that you want Amazon Lex to convey to the user after the intent - // is successfully fulfilled by the Lambda function. - // - // This element is relevant only if you provide a Lambda function in the fulfillmentActivity. - // If you return the intent to the client application, you can't specify this - // element. - // - // The followUpPrompt and conclusionStatement are mutually exclusive. You can - // specify only one. - ConclusionStatement *Statement `locationName:"conclusionStatement" type:"structure"` - - // Prompts the user to confirm the intent. This question should have a yes or - // no answer. - // - // Amazon Lex uses this prompt to ensure that the user acknowledges that the - // intent is ready for fulfillment. For example, with the OrderPizza intent, - // you might want to confirm that the order is correct before placing it. For - // other intents, such as intents that simply respond to user questions, you - // might not need to ask the user for confirmation before providing the information. - // - // You you must provide both the rejectionStatement and the confirmationPrompt, - // or neither. - ConfirmationPrompt *Prompt `locationName:"confirmationPrompt" type:"structure"` - - CreateVersion *bool `locationName:"createVersion" type:"boolean"` - - // A description of the intent. - Description *string `locationName:"description" type:"string"` - - // Specifies a Lambda function to invoke for each user input. You can invoke - // this Lambda function to personalize user interaction. - // - // For example, suppose your bot determines that the user is John. Your Lambda - // function might retrieve John's information from a backend database and prepopulate - // some of the values. For example, if you find that John is gluten intolerant, - // you might set the corresponding intent slot, GlutenIntolerant, to true. You - // might find John's phone number and set the corresponding session attribute. - DialogCodeHook *CodeHook `locationName:"dialogCodeHook" type:"structure"` - - // Amazon Lex uses this prompt to solicit additional activity after fulfilling - // an intent. For example, after the OrderPizza intent is fulfilled, you might - // prompt the user to order a drink. - // - // The action that Amazon Lex takes depends on the user's response, as follows: - // - // * If the user says "Yes" it responds with the clarification prompt that - // is configured for the bot. - // - // * if the user says "Yes" and continues with an utterance that triggers - // an intent it starts a conversation for the intent. - // - // * If the user says "No" it responds with the rejection statement configured - // for the the follow-up prompt. - // - // * If it doesn't recognize the utterance it repeats the follow-up prompt - // again. - // - // The followUpPrompt field and the conclusionStatement field are mutually exclusive. - // You can specify only one. - FollowUpPrompt *FollowUpPrompt `locationName:"followUpPrompt" type:"structure"` - - // Required. Describes how the intent is fulfilled. For example, after a user - // provides all of the information for a pizza order, fulfillmentActivity defines - // how the bot places an order with a local pizza store. - // - // You might configure Amazon Lex to return all of the intent information to - // the client application, or direct it to invoke a Lambda function that can - // process the intent (for example, place an order with a pizzeria). - FulfillmentActivity *FulfillmentActivity `locationName:"fulfillmentActivity" type:"structure"` - - // The name of the intent. The name is not case sensitive. - // - // The name can't match a built-in intent name, or a built-in intent name with - // "AMAZON." removed. For example, because there is a built-in intent called - // AMAZON.HelpIntent, you can't create a custom intent called HelpIntent. - // - // For a list of built-in intents, see Standard Built-in Intents (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) - // in the Alexa Skills Kit. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` - - // A unique identifier for the built-in intent to base this intent on. To find - // the signature for an intent, see Standard Built-in Intents (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) - // in the Alexa Skills Kit. - ParentIntentSignature *string `locationName:"parentIntentSignature" type:"string"` - - // When the user answers "no" to the question defined in confirmationPrompt, - // Amazon Lex responds with this statement to acknowledge that the intent was - // canceled. - // - // You must provide both the rejectionStatement and the confirmationPrompt, - // or neither. - RejectionStatement *Statement `locationName:"rejectionStatement" type:"structure"` - - // An array of utterances (strings) that a user might say to signal the intent. - // For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas". - // - // In each utterance, a slot name is enclosed in curly braces. - SampleUtterances []*string `locationName:"sampleUtterances" type:"list"` - - // An array of intent slots. At runtime, Amazon Lex elicits required slot values - // from the user using prompts defined in the slots. For more information, see - // how-it-works. - Slots []*Slot `locationName:"slots" type:"list"` -} - -// String returns the string representation -func (s PutIntentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutIntentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutIntentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutIntentInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.ConclusionStatement != nil { - if err := s.ConclusionStatement.Validate(); err != nil { - invalidParams.AddNested("ConclusionStatement", err.(request.ErrInvalidParams)) - } - } - if s.ConfirmationPrompt != nil { - if err := s.ConfirmationPrompt.Validate(); err != nil { - invalidParams.AddNested("ConfirmationPrompt", err.(request.ErrInvalidParams)) - } - } - if s.DialogCodeHook != nil { - if err := s.DialogCodeHook.Validate(); err != nil { - invalidParams.AddNested("DialogCodeHook", err.(request.ErrInvalidParams)) - } - } - if s.FollowUpPrompt != nil { - if err := s.FollowUpPrompt.Validate(); err != nil { - invalidParams.AddNested("FollowUpPrompt", err.(request.ErrInvalidParams)) - } - } - if s.FulfillmentActivity != nil { - if err := s.FulfillmentActivity.Validate(); err != nil { - invalidParams.AddNested("FulfillmentActivity", err.(request.ErrInvalidParams)) - } - } - if s.RejectionStatement != nil { - if err := s.RejectionStatement.Validate(); err != nil { - invalidParams.AddNested("RejectionStatement", err.(request.ErrInvalidParams)) - } - } - if s.Slots != nil { - for i, v := range s.Slots { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Slots", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChecksum sets the Checksum field's value. -func (s *PutIntentInput) SetChecksum(v string) *PutIntentInput { - s.Checksum = &v - return s -} - -// SetConclusionStatement sets the ConclusionStatement field's value. -func (s *PutIntentInput) SetConclusionStatement(v *Statement) *PutIntentInput { - s.ConclusionStatement = v - return s -} - -// SetConfirmationPrompt sets the ConfirmationPrompt field's value. -func (s *PutIntentInput) SetConfirmationPrompt(v *Prompt) *PutIntentInput { - s.ConfirmationPrompt = v - return s -} - -// SetCreateVersion sets the CreateVersion field's value. -func (s *PutIntentInput) SetCreateVersion(v bool) *PutIntentInput { - s.CreateVersion = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PutIntentInput) SetDescription(v string) *PutIntentInput { - s.Description = &v - return s -} - -// SetDialogCodeHook sets the DialogCodeHook field's value. -func (s *PutIntentInput) SetDialogCodeHook(v *CodeHook) *PutIntentInput { - s.DialogCodeHook = v - return s -} - -// SetFollowUpPrompt sets the FollowUpPrompt field's value. -func (s *PutIntentInput) SetFollowUpPrompt(v *FollowUpPrompt) *PutIntentInput { - s.FollowUpPrompt = v - return s -} - -// SetFulfillmentActivity sets the FulfillmentActivity field's value. -func (s *PutIntentInput) SetFulfillmentActivity(v *FulfillmentActivity) *PutIntentInput { - s.FulfillmentActivity = v - return s -} - -// SetName sets the Name field's value. -func (s *PutIntentInput) SetName(v string) *PutIntentInput { - s.Name = &v - return s -} - -// SetParentIntentSignature sets the ParentIntentSignature field's value. -func (s *PutIntentInput) SetParentIntentSignature(v string) *PutIntentInput { - s.ParentIntentSignature = &v - return s -} - -// SetRejectionStatement sets the RejectionStatement field's value. -func (s *PutIntentInput) SetRejectionStatement(v *Statement) *PutIntentInput { - s.RejectionStatement = v - return s -} - -// SetSampleUtterances sets the SampleUtterances field's value. -func (s *PutIntentInput) SetSampleUtterances(v []*string) *PutIntentInput { - s.SampleUtterances = v - return s -} - -// SetSlots sets the Slots field's value. -func (s *PutIntentInput) SetSlots(v []*Slot) *PutIntentInput { - s.Slots = v - return s -} - -type PutIntentOutput struct { - _ struct{} `type:"structure"` - - // Checksum of the $LATESTversion of the intent created or updated. - Checksum *string `locationName:"checksum" type:"string"` - - // After the Lambda function specified in thefulfillmentActivityintent fulfills - // the intent, Amazon Lex conveys this statement to the user. - ConclusionStatement *Statement `locationName:"conclusionStatement" type:"structure"` - - // If defined in the intent, Amazon Lex prompts the user to confirm the intent - // before fulfilling it. - ConfirmationPrompt *Prompt `locationName:"confirmationPrompt" type:"structure"` - - CreateVersion *bool `locationName:"createVersion" type:"boolean"` - - // The date that the intent was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the intent. - Description *string `locationName:"description" type:"string"` - - // If defined in the intent, Amazon Lex invokes this Lambda function for each - // user input. - DialogCodeHook *CodeHook `locationName:"dialogCodeHook" type:"structure"` - - // If defined in the intent, Amazon Lex uses this prompt to solicit additional - // user activity after the intent is fulfilled. - FollowUpPrompt *FollowUpPrompt `locationName:"followUpPrompt" type:"structure"` - - // If defined in the intent, Amazon Lex invokes this Lambda function to fulfill - // the intent after the user provides all of the information required by the - // intent. - FulfillmentActivity *FulfillmentActivity `locationName:"fulfillmentActivity" type:"structure"` - - // The date that the intent was updated. When you create a resource, the creation - // date and last update dates are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The name of the intent. - Name *string `locationName:"name" min:"1" type:"string"` - - // A unique identifier for the built-in intent that this intent is based on. - ParentIntentSignature *string `locationName:"parentIntentSignature" type:"string"` - - // If the user answers "no" to the question defined in confirmationPrompt Amazon - // Lex responds with this statement to acknowledge that the intent was canceled. - RejectionStatement *Statement `locationName:"rejectionStatement" type:"structure"` - - // An array of sample utterances that are configured for the intent. - SampleUtterances []*string `locationName:"sampleUtterances" type:"list"` - - // An array of intent slots that are configured for the intent. - Slots []*Slot `locationName:"slots" type:"list"` - - // The version of the intent. For a new intent, the version is always $LATEST. - Version *string `locationName:"version" min:"1" type:"string"` -} - -// String returns the string representation -func (s PutIntentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutIntentOutput) GoString() string { - return s.String() -} - -// SetChecksum sets the Checksum field's value. -func (s *PutIntentOutput) SetChecksum(v string) *PutIntentOutput { - s.Checksum = &v - return s -} - -// SetConclusionStatement sets the ConclusionStatement field's value. -func (s *PutIntentOutput) SetConclusionStatement(v *Statement) *PutIntentOutput { - s.ConclusionStatement = v - return s -} - -// SetConfirmationPrompt sets the ConfirmationPrompt field's value. -func (s *PutIntentOutput) SetConfirmationPrompt(v *Prompt) *PutIntentOutput { - s.ConfirmationPrompt = v - return s -} - -// SetCreateVersion sets the CreateVersion field's value. -func (s *PutIntentOutput) SetCreateVersion(v bool) *PutIntentOutput { - s.CreateVersion = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *PutIntentOutput) SetCreatedDate(v time.Time) *PutIntentOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PutIntentOutput) SetDescription(v string) *PutIntentOutput { - s.Description = &v - return s -} - -// SetDialogCodeHook sets the DialogCodeHook field's value. -func (s *PutIntentOutput) SetDialogCodeHook(v *CodeHook) *PutIntentOutput { - s.DialogCodeHook = v - return s -} - -// SetFollowUpPrompt sets the FollowUpPrompt field's value. -func (s *PutIntentOutput) SetFollowUpPrompt(v *FollowUpPrompt) *PutIntentOutput { - s.FollowUpPrompt = v - return s -} - -// SetFulfillmentActivity sets the FulfillmentActivity field's value. -func (s *PutIntentOutput) SetFulfillmentActivity(v *FulfillmentActivity) *PutIntentOutput { - s.FulfillmentActivity = v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *PutIntentOutput) SetLastUpdatedDate(v time.Time) *PutIntentOutput { - s.LastUpdatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *PutIntentOutput) SetName(v string) *PutIntentOutput { - s.Name = &v - return s -} - -// SetParentIntentSignature sets the ParentIntentSignature field's value. -func (s *PutIntentOutput) SetParentIntentSignature(v string) *PutIntentOutput { - s.ParentIntentSignature = &v - return s -} - -// SetRejectionStatement sets the RejectionStatement field's value. -func (s *PutIntentOutput) SetRejectionStatement(v *Statement) *PutIntentOutput { - s.RejectionStatement = v - return s -} - -// SetSampleUtterances sets the SampleUtterances field's value. -func (s *PutIntentOutput) SetSampleUtterances(v []*string) *PutIntentOutput { - s.SampleUtterances = v - return s -} - -// SetSlots sets the Slots field's value. -func (s *PutIntentOutput) SetSlots(v []*Slot) *PutIntentOutput { - s.Slots = v - return s -} - -// SetVersion sets the Version field's value. -func (s *PutIntentOutput) SetVersion(v string) *PutIntentOutput { - s.Version = &v - return s -} - -type PutSlotTypeInput struct { - _ struct{} `type:"structure"` - - // Identifies a specific revision of the $LATEST version. - // - // When you create a new slot type, leave the checksum field blank. If you specify - // a checksum you get a BadRequestException exception. - // - // When you want to update a slot type, set the checksum field to the checksum - // of the most recent revision of the $LATEST version. If you don't specify - // the checksum field, or if the checksum does not match the $LATEST version, - // you get a PreconditionFailedException exception. - Checksum *string `locationName:"checksum" type:"string"` - - CreateVersion *bool `locationName:"createVersion" type:"boolean"` - - // A description of the slot type. - Description *string `locationName:"description" type:"string"` - - // A list of EnumerationValue objects that defines the values that the slot - // type can take. Each value can have a list of synonyms, which are additional - // values that help train the machine learning model about the values that it - // resolves for a slot. - // - // When Amazon Lex resolves a slot value, it generates a resolution list that - // contains up to five possible values for the slot. If you are using a Lambda - // function, this resolution list is passed to the function. If you are not - // using a Lambda function you can choose to return the value that the user - // entered or the first value in the resolution list as the slot value. The - // valueSelectionStrategy field indicates the option to use. - EnumerationValues []*EnumerationValue `locationName:"enumerationValues" min:"1" type:"list"` - - // The name of the slot type. The name is not case sensitive. - // - // The name can't match a built-in slot type name, or a built-in slot type name - // with "AMAZON." removed. For example, because there is a built-in slot type - // called AMAZON.DATE, you can't create a custom slot type called DATE. - // - // For a list of built-in slot types, see Slot Type Reference (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference) - // in the Alexa Skills Kit. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` - - // Determines the slot resolution strategy that Amazon Lex uses to return slot - // type values. The field can be set to one of the following values: - // - // * ORIGINAL_VALUE - Returns the value entered by the user, if the user - // value is similar to the slot value. - // - // * TOP_RESOLUTION - If there is a resolution list for the slot, return - // the first value in the resolution list as the slot type value. If there - // is no resolution list, null is returned. - // - // If you don't specify the valueSelectionStrategy, the default is ORIGINAL_VALUE. - ValueSelectionStrategy *string `locationName:"valueSelectionStrategy" type:"string" enum:"SlotValueSelectionStrategy"` -} - -// String returns the string representation -func (s PutSlotTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutSlotTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutSlotTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutSlotTypeInput"} - if s.EnumerationValues != nil && len(s.EnumerationValues) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EnumerationValues", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.EnumerationValues != nil { - for i, v := range s.EnumerationValues { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EnumerationValues", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChecksum sets the Checksum field's value. -func (s *PutSlotTypeInput) SetChecksum(v string) *PutSlotTypeInput { - s.Checksum = &v - return s -} - -// SetCreateVersion sets the CreateVersion field's value. -func (s *PutSlotTypeInput) SetCreateVersion(v bool) *PutSlotTypeInput { - s.CreateVersion = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PutSlotTypeInput) SetDescription(v string) *PutSlotTypeInput { - s.Description = &v - return s -} - -// SetEnumerationValues sets the EnumerationValues field's value. -func (s *PutSlotTypeInput) SetEnumerationValues(v []*EnumerationValue) *PutSlotTypeInput { - s.EnumerationValues = v - return s -} - -// SetName sets the Name field's value. -func (s *PutSlotTypeInput) SetName(v string) *PutSlotTypeInput { - s.Name = &v - return s -} - -// SetValueSelectionStrategy sets the ValueSelectionStrategy field's value. -func (s *PutSlotTypeInput) SetValueSelectionStrategy(v string) *PutSlotTypeInput { - s.ValueSelectionStrategy = &v - return s -} - -type PutSlotTypeOutput struct { - _ struct{} `type:"structure"` - - // Checksum of the $LATEST version of the slot type. - Checksum *string `locationName:"checksum" type:"string"` - - CreateVersion *bool `locationName:"createVersion" type:"boolean"` - - // The date that the slot type was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the slot type. - Description *string `locationName:"description" type:"string"` - - // A list of EnumerationValue objects that defines the values that the slot - // type can take. - EnumerationValues []*EnumerationValue `locationName:"enumerationValues" min:"1" type:"list"` - - // The date that the slot type was updated. When you create a slot type, the - // creation date and last update date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The name of the slot type. - Name *string `locationName:"name" min:"1" type:"string"` - - // The slot resolution strategy that Amazon Lex uses to determine the value - // of the slot. For more information, see PutSlotType. - ValueSelectionStrategy *string `locationName:"valueSelectionStrategy" type:"string" enum:"SlotValueSelectionStrategy"` - - // The version of the slot type. For a new slot type, the version is always - // $LATEST. - Version *string `locationName:"version" min:"1" type:"string"` -} - -// String returns the string representation -func (s PutSlotTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutSlotTypeOutput) GoString() string { - return s.String() -} - -// SetChecksum sets the Checksum field's value. -func (s *PutSlotTypeOutput) SetChecksum(v string) *PutSlotTypeOutput { - s.Checksum = &v - return s -} - -// SetCreateVersion sets the CreateVersion field's value. -func (s *PutSlotTypeOutput) SetCreateVersion(v bool) *PutSlotTypeOutput { - s.CreateVersion = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *PutSlotTypeOutput) SetCreatedDate(v time.Time) *PutSlotTypeOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PutSlotTypeOutput) SetDescription(v string) *PutSlotTypeOutput { - s.Description = &v - return s -} - -// SetEnumerationValues sets the EnumerationValues field's value. -func (s *PutSlotTypeOutput) SetEnumerationValues(v []*EnumerationValue) *PutSlotTypeOutput { - s.EnumerationValues = v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *PutSlotTypeOutput) SetLastUpdatedDate(v time.Time) *PutSlotTypeOutput { - s.LastUpdatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *PutSlotTypeOutput) SetName(v string) *PutSlotTypeOutput { - s.Name = &v - return s -} - -// SetValueSelectionStrategy sets the ValueSelectionStrategy field's value. -func (s *PutSlotTypeOutput) SetValueSelectionStrategy(v string) *PutSlotTypeOutput { - s.ValueSelectionStrategy = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *PutSlotTypeOutput) SetVersion(v string) *PutSlotTypeOutput { - s.Version = &v - return s -} - -// Describes the resource that refers to the resource that you are attempting -// to delete. This object is returned as part of the ResourceInUseException -// exception. -type ResourceReference struct { - _ struct{} `type:"structure"` - - // The name of the resource that is using the resource that you are trying to - // delete. - Name *string `locationName:"name" min:"1" type:"string"` - - // The version of the resource that is using the resource that you are trying - // to delete. - Version *string `locationName:"version" min:"1" type:"string"` -} - -// String returns the string representation -func (s ResourceReference) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceReference) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *ResourceReference) SetName(v string) *ResourceReference { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *ResourceReference) SetVersion(v string) *ResourceReference { - s.Version = &v - return s -} - -// Identifies the version of a specific slot. -type Slot struct { - _ struct{} `type:"structure"` - - // A description of the slot. - Description *string `locationName:"description" type:"string"` - - // The name of the slot. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // Directs Lex the order in which to elicit this slot value from the user. For - // example, if the intent has two slots with priorities 1 and 2, AWS Lex first - // elicits a value for the slot with priority 1. - // - // If multiple slots share the same priority, the order in which Lex elicits - // values is arbitrary. - Priority *int64 `locationName:"priority" type:"integer"` - - // A set of possible responses for the slot type used by text-based clients. - // A user chooses an option from the response card, instead of using text to - // reply. - ResponseCard *string `locationName:"responseCard" min:"1" type:"string"` - - // If you know a specific pattern with which users might respond to an Amazon - // Lex request for a slot value, you can provide those utterances to improve - // accuracy. This is optional. In most cases, Amazon Lex is capable of understanding - // user utterances. - SampleUtterances []*string `locationName:"sampleUtterances" type:"list"` - - // Specifies whether the slot is required or optional. - // - // SlotConstraint is a required field - SlotConstraint *string `locationName:"slotConstraint" type:"string" required:"true" enum:"SlotConstraint"` - - // The type of the slot, either a custom slot type that you defined or one of - // the built-in slot types. - SlotType *string `locationName:"slotType" min:"1" type:"string"` - - // The version of the slot type. - SlotTypeVersion *string `locationName:"slotTypeVersion" min:"1" type:"string"` - - // The prompt that Amazon Lex uses to elicit the slot value from the user. - ValueElicitationPrompt *Prompt `locationName:"valueElicitationPrompt" type:"structure"` -} - -// String returns the string representation -func (s Slot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Slot) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Slot) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Slot"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.ResponseCard != nil && len(*s.ResponseCard) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResponseCard", 1)) - } - if s.SlotConstraint == nil { - invalidParams.Add(request.NewErrParamRequired("SlotConstraint")) - } - if s.SlotType != nil && len(*s.SlotType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SlotType", 1)) - } - if s.SlotTypeVersion != nil && len(*s.SlotTypeVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SlotTypeVersion", 1)) - } - if s.ValueElicitationPrompt != nil { - if err := s.ValueElicitationPrompt.Validate(); err != nil { - invalidParams.AddNested("ValueElicitationPrompt", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *Slot) SetDescription(v string) *Slot { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *Slot) SetName(v string) *Slot { - s.Name = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *Slot) SetPriority(v int64) *Slot { - s.Priority = &v - return s -} - -// SetResponseCard sets the ResponseCard field's value. -func (s *Slot) SetResponseCard(v string) *Slot { - s.ResponseCard = &v - return s -} - -// SetSampleUtterances sets the SampleUtterances field's value. -func (s *Slot) SetSampleUtterances(v []*string) *Slot { - s.SampleUtterances = v - return s -} - -// SetSlotConstraint sets the SlotConstraint field's value. -func (s *Slot) SetSlotConstraint(v string) *Slot { - s.SlotConstraint = &v - return s -} - -// SetSlotType sets the SlotType field's value. -func (s *Slot) SetSlotType(v string) *Slot { - s.SlotType = &v - return s -} - -// SetSlotTypeVersion sets the SlotTypeVersion field's value. -func (s *Slot) SetSlotTypeVersion(v string) *Slot { - s.SlotTypeVersion = &v - return s -} - -// SetValueElicitationPrompt sets the ValueElicitationPrompt field's value. -func (s *Slot) SetValueElicitationPrompt(v *Prompt) *Slot { - s.ValueElicitationPrompt = v - return s -} - -// Provides information about a slot type.. -type SlotTypeMetadata struct { - _ struct{} `type:"structure"` - - // The date that the slot type was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // A description of the slot type. - Description *string `locationName:"description" type:"string"` - - // The date that the slot type was updated. When you create a resource, the - // creation date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` - - // The name of the slot type. - Name *string `locationName:"name" min:"1" type:"string"` - - // The version of the slot type. - Version *string `locationName:"version" min:"1" type:"string"` -} - -// String returns the string representation -func (s SlotTypeMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SlotTypeMetadata) GoString() string { - return s.String() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *SlotTypeMetadata) SetCreatedDate(v time.Time) *SlotTypeMetadata { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *SlotTypeMetadata) SetDescription(v string) *SlotTypeMetadata { - s.Description = &v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *SlotTypeMetadata) SetLastUpdatedDate(v time.Time) *SlotTypeMetadata { - s.LastUpdatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *SlotTypeMetadata) SetName(v string) *SlotTypeMetadata { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *SlotTypeMetadata) SetVersion(v string) *SlotTypeMetadata { - s.Version = &v - return s -} - -type StartImportInput struct { - _ struct{} `type:"structure"` - - // Specifies the action that the StartImport operation should take when there - // is an existing resource with the same name. - // - // * FAIL_ON_CONFLICT - The import operation is stopped on the first conflict - // between a resource in the import file and an existing resource. The name - // of the resource causing the conflict is in the failureReason field of - // the response to the GetImport operation. - // - // OVERWRITE_LATEST - The import operation proceeds even if there is a conflict - // with an existing resource. The $LASTEST version of the existing resource - // is overwritten with the data from the import file. - // - // MergeStrategy is a required field - MergeStrategy *string `locationName:"mergeStrategy" type:"string" required:"true" enum:"MergeStrategy"` - - // A zip archive in binary format. The archive should contain one file, a JSON - // file containing the resource to import. The resource should match the type - // specified in the resourceType field. - // - // Payload is automatically base64 encoded/decoded by the SDK. - // - // Payload is a required field - Payload []byte `locationName:"payload" type:"blob" required:"true"` - - // Specifies the type of resource to export. Each resource also exports any - // resources that it depends on. - // - // * A bot exports dependent intents. - // - // * An intent exports dependent slot types. - // - // ResourceType is a required field - ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` -} - -// String returns the string representation -func (s StartImportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartImportInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartImportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartImportInput"} - if s.MergeStrategy == nil { - invalidParams.Add(request.NewErrParamRequired("MergeStrategy")) - } - if s.Payload == nil { - invalidParams.Add(request.NewErrParamRequired("Payload")) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMergeStrategy sets the MergeStrategy field's value. -func (s *StartImportInput) SetMergeStrategy(v string) *StartImportInput { - s.MergeStrategy = &v - return s -} - -// SetPayload sets the Payload field's value. -func (s *StartImportInput) SetPayload(v []byte) *StartImportInput { - s.Payload = v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *StartImportInput) SetResourceType(v string) *StartImportInput { - s.ResourceType = &v - return s -} - -type StartImportOutput struct { - _ struct{} `type:"structure"` - - // A timestamp for the date and time that the import job was requested. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` - - // The identifier for the specific import job. - ImportId *string `locationName:"importId" type:"string"` - - // The status of the import job. If the status is FAILED, you can get the reason - // for the failure using the GetImport operation. - ImportStatus *string `locationName:"importStatus" type:"string" enum:"ImportStatus"` - - // The action to take when there is a merge conflict. - MergeStrategy *string `locationName:"mergeStrategy" type:"string" enum:"MergeStrategy"` - - // The name given to the import job. - Name *string `locationName:"name" min:"1" type:"string"` - - // The type of resource to import. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` -} - -// String returns the string representation -func (s StartImportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartImportOutput) GoString() string { - return s.String() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *StartImportOutput) SetCreatedDate(v time.Time) *StartImportOutput { - s.CreatedDate = &v - return s -} - -// SetImportId sets the ImportId field's value. -func (s *StartImportOutput) SetImportId(v string) *StartImportOutput { - s.ImportId = &v - return s -} - -// SetImportStatus sets the ImportStatus field's value. -func (s *StartImportOutput) SetImportStatus(v string) *StartImportOutput { - s.ImportStatus = &v - return s -} - -// SetMergeStrategy sets the MergeStrategy field's value. -func (s *StartImportOutput) SetMergeStrategy(v string) *StartImportOutput { - s.MergeStrategy = &v - return s -} - -// SetName sets the Name field's value. -func (s *StartImportOutput) SetName(v string) *StartImportOutput { - s.Name = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *StartImportOutput) SetResourceType(v string) *StartImportOutput { - s.ResourceType = &v - return s -} - -// A collection of messages that convey information to the user. At runtime, -// Amazon Lex selects the message to convey. -type Statement struct { - _ struct{} `type:"structure"` - - // A collection of message objects. - // - // Messages is a required field - Messages []*Message `locationName:"messages" min:"1" type:"list" required:"true"` - - // At runtime, if the client is using the PostText (http://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html) - // API, Amazon Lex includes the response card in the response. It substitutes - // all of the session attributes and slot values for placeholders in the response - // card. - ResponseCard *string `locationName:"responseCard" min:"1" type:"string"` -} - -// String returns the string representation -func (s Statement) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Statement) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Statement) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Statement"} - if s.Messages == nil { - invalidParams.Add(request.NewErrParamRequired("Messages")) - } - if s.Messages != nil && len(s.Messages) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Messages", 1)) - } - if s.ResponseCard != nil && len(*s.ResponseCard) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResponseCard", 1)) - } - if s.Messages != nil { - for i, v := range s.Messages { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Messages", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMessages sets the Messages field's value. -func (s *Statement) SetMessages(v []*Message) *Statement { - s.Messages = v - return s -} - -// SetResponseCard sets the ResponseCard field's value. -func (s *Statement) SetResponseCard(v string) *Statement { - s.ResponseCard = &v - return s -} - -// Provides information about a single utterance that was made to your bot. -type UtteranceData struct { - _ struct{} `type:"structure"` - - // The number of times that the utterance was processed. - Count *int64 `locationName:"count" type:"integer"` - - // The total number of individuals that used the utterance. - DistinctUsers *int64 `locationName:"distinctUsers" type:"integer"` - - // The date that the utterance was first recorded. - FirstUtteredDate *time.Time `locationName:"firstUtteredDate" type:"timestamp"` - - // The date that the utterance was last recorded. - LastUtteredDate *time.Time `locationName:"lastUtteredDate" type:"timestamp"` - - // The text that was entered by the user or the text representation of an audio - // clip. - UtteranceString *string `locationName:"utteranceString" min:"1" type:"string"` -} - -// String returns the string representation -func (s UtteranceData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UtteranceData) GoString() string { - return s.String() -} - -// SetCount sets the Count field's value. -func (s *UtteranceData) SetCount(v int64) *UtteranceData { - s.Count = &v - return s -} - -// SetDistinctUsers sets the DistinctUsers field's value. -func (s *UtteranceData) SetDistinctUsers(v int64) *UtteranceData { - s.DistinctUsers = &v - return s -} - -// SetFirstUtteredDate sets the FirstUtteredDate field's value. -func (s *UtteranceData) SetFirstUtteredDate(v time.Time) *UtteranceData { - s.FirstUtteredDate = &v - return s -} - -// SetLastUtteredDate sets the LastUtteredDate field's value. -func (s *UtteranceData) SetLastUtteredDate(v time.Time) *UtteranceData { - s.LastUtteredDate = &v - return s -} - -// SetUtteranceString sets the UtteranceString field's value. -func (s *UtteranceData) SetUtteranceString(v string) *UtteranceData { - s.UtteranceString = &v - return s -} - -// Provides a list of utterances that have been made to a specific version of -// your bot. The list contains a maximum of 100 utterances. -type UtteranceList struct { - _ struct{} `type:"structure"` - - // The version of the bot that processed the list. - BotVersion *string `locationName:"botVersion" min:"1" type:"string"` - - // One or more UtteranceData objects that contain information about the utterances - // that have been made to a bot. The maximum number of object is 100. - Utterances []*UtteranceData `locationName:"utterances" type:"list"` -} - -// String returns the string representation -func (s UtteranceList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UtteranceList) GoString() string { - return s.String() -} - -// SetBotVersion sets the BotVersion field's value. -func (s *UtteranceList) SetBotVersion(v string) *UtteranceList { - s.BotVersion = &v - return s -} - -// SetUtterances sets the Utterances field's value. -func (s *UtteranceList) SetUtterances(v []*UtteranceData) *UtteranceList { - s.Utterances = v - return s -} - -const ( - // ChannelStatusInProgress is a ChannelStatus enum value - ChannelStatusInProgress = "IN_PROGRESS" - - // ChannelStatusCreated is a ChannelStatus enum value - ChannelStatusCreated = "CREATED" - - // ChannelStatusFailed is a ChannelStatus enum value - ChannelStatusFailed = "FAILED" -) - -const ( - // ChannelTypeFacebook is a ChannelType enum value - ChannelTypeFacebook = "Facebook" - - // ChannelTypeSlack is a ChannelType enum value - ChannelTypeSlack = "Slack" - - // ChannelTypeTwilioSms is a ChannelType enum value - ChannelTypeTwilioSms = "Twilio-Sms" - - // ChannelTypeKik is a ChannelType enum value - ChannelTypeKik = "Kik" -) - -const ( - // ContentTypePlainText is a ContentType enum value - ContentTypePlainText = "PlainText" - - // ContentTypeSsml is a ContentType enum value - ContentTypeSsml = "SSML" - - // ContentTypeCustomPayload is a ContentType enum value - ContentTypeCustomPayload = "CustomPayload" -) - -const ( - // ExportStatusInProgress is a ExportStatus enum value - ExportStatusInProgress = "IN_PROGRESS" - - // ExportStatusReady is a ExportStatus enum value - ExportStatusReady = "READY" - - // ExportStatusFailed is a ExportStatus enum value - ExportStatusFailed = "FAILED" -) - -const ( - // ExportTypeAlexaSkillsKit is a ExportType enum value - ExportTypeAlexaSkillsKit = "ALEXA_SKILLS_KIT" - - // ExportTypeLex is a ExportType enum value - ExportTypeLex = "LEX" -) - -const ( - // FulfillmentActivityTypeReturnIntent is a FulfillmentActivityType enum value - FulfillmentActivityTypeReturnIntent = "ReturnIntent" - - // FulfillmentActivityTypeCodeHook is a FulfillmentActivityType enum value - FulfillmentActivityTypeCodeHook = "CodeHook" -) - -const ( - // ImportStatusInProgress is a ImportStatus enum value - ImportStatusInProgress = "IN_PROGRESS" - - // ImportStatusComplete is a ImportStatus enum value - ImportStatusComplete = "COMPLETE" - - // ImportStatusFailed is a ImportStatus enum value - ImportStatusFailed = "FAILED" -) - -const ( - // LocaleEnUs is a Locale enum value - LocaleEnUs = "en-US" - - // LocaleEnGb is a Locale enum value - LocaleEnGb = "en-GB" - - // LocaleDeDe is a Locale enum value - LocaleDeDe = "de-DE" -) - -const ( - // MergeStrategyOverwriteLatest is a MergeStrategy enum value - MergeStrategyOverwriteLatest = "OVERWRITE_LATEST" - - // MergeStrategyFailOnConflict is a MergeStrategy enum value - MergeStrategyFailOnConflict = "FAIL_ON_CONFLICT" -) - -const ( - // ProcessBehaviorSave is a ProcessBehavior enum value - ProcessBehaviorSave = "SAVE" - - // ProcessBehaviorBuild is a ProcessBehavior enum value - ProcessBehaviorBuild = "BUILD" -) - -const ( - // ReferenceTypeIntent is a ReferenceType enum value - ReferenceTypeIntent = "Intent" - - // ReferenceTypeBot is a ReferenceType enum value - ReferenceTypeBot = "Bot" - - // ReferenceTypeBotAlias is a ReferenceType enum value - ReferenceTypeBotAlias = "BotAlias" - - // ReferenceTypeBotChannel is a ReferenceType enum value - ReferenceTypeBotChannel = "BotChannel" -) - -const ( - // ResourceTypeBot is a ResourceType enum value - ResourceTypeBot = "BOT" - - // ResourceTypeIntent is a ResourceType enum value - ResourceTypeIntent = "INTENT" - - // ResourceTypeSlotType is a ResourceType enum value - ResourceTypeSlotType = "SLOT_TYPE" -) - -const ( - // SlotConstraintRequired is a SlotConstraint enum value - SlotConstraintRequired = "Required" - - // SlotConstraintOptional is a SlotConstraint enum value - SlotConstraintOptional = "Optional" -) - -const ( - // SlotValueSelectionStrategyOriginalValue is a SlotValueSelectionStrategy enum value - SlotValueSelectionStrategyOriginalValue = "ORIGINAL_VALUE" - - // SlotValueSelectionStrategyTopResolution is a SlotValueSelectionStrategy enum value - SlotValueSelectionStrategyTopResolution = "TOP_RESOLUTION" -) - -const ( - // StatusBuilding is a Status enum value - StatusBuilding = "BUILDING" - - // StatusReady is a Status enum value - StatusReady = "READY" - - // StatusReadyBasicTesting is a Status enum value - StatusReadyBasicTesting = "READY_BASIC_TESTING" - - // StatusFailed is a Status enum value - StatusFailed = "FAILED" - - // StatusNotBuilt is a Status enum value - StatusNotBuilt = "NOT_BUILT" -) - -const ( - // StatusTypeDetected is a StatusType enum value - StatusTypeDetected = "Detected" - - // StatusTypeMissed is a StatusType enum value - StatusTypeMissed = "Missed" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/doc.go b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/doc.go deleted file mode 100644 index 3e4aae2ee..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/doc.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package lexmodelbuildingservice provides the client and types for making API -// requests to Amazon Lex Model Building Service. -// -// Amazon Lex is an AWS service for building conversational voice and text interfaces. -// Use these actions to create, update, and delete conversational bots for new -// and existing client applications. -// -// See https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19 for more information on this service. -// -// See lexmodelbuildingservice package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/lexmodelbuildingservice/ -// -// Using the Client -// -// To contact Amazon Lex Model Building Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Lex Model Building Service client LexModelBuildingService for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/lexmodelbuildingservice/#New -package lexmodelbuildingservice diff --git a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/errors.go deleted file mode 100644 index da3b08cb8..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/errors.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package lexmodelbuildingservice - -const ( - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - // - // The request is not well formed. For example, a value is invalid or a required - // field is missing. Check the field values, and try again. - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeConflictException for service response error code - // "ConflictException". - // - // There was a conflict processing the request. Try your request again. - ErrCodeConflictException = "ConflictException" - - // ErrCodeInternalFailureException for service response error code - // "InternalFailureException". - // - // An internal Amazon Lex error occurred. Try your request again. - ErrCodeInternalFailureException = "InternalFailureException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The request exceeded a limit. Try your request again. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // The resource specified in the request was not found. Check the resource and - // try again. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodePreconditionFailedException for service response error code - // "PreconditionFailedException". - // - // The checksum of the resource that you are trying to change does not match - // the checksum in the request. Check the resource's checksum and try again. - ErrCodePreconditionFailedException = "PreconditionFailedException" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUseException". - // - // The resource that you are attempting to delete is referred to by another - // resource. Use this information to remove references to the resource that - // you are trying to delete. - // - // The body of the exception contains a JSON object that describes the resource. - // - // { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, - // - // "resourceReference": { - // - // "name": string, "version": string } } - ErrCodeResourceInUseException = "ResourceInUseException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go deleted file mode 100644 index 86d1a44d2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package lexmodelbuildingservice - -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" -) - -// LexModelBuildingService provides the API operation methods for making requests to -// Amazon Lex Model Building Service. See this package's package overview docs -// for details on the service. -// -// LexModelBuildingService methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type LexModelBuildingService 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 = "models.lex" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Lex Model Building Service" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the LexModelBuildingService client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a LexModelBuildingService client from just a session. -// svc := lexmodelbuildingservice.New(mySession) -// -// // Create a LexModelBuildingService client with additional configuration -// svc := lexmodelbuildingservice.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *LexModelBuildingService { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "lex" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *LexModelBuildingService { - svc := &LexModelBuildingService{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-04-19", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a LexModelBuildingService operation and runs any -// custom request initialization. -func (c *LexModelBuildingService) 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/licensemanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/licensemanager/api.go deleted file mode 100644 index d292b8956..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/licensemanager/api.go +++ /dev/null @@ -1,3443 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package licensemanager - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateLicenseConfiguration = "CreateLicenseConfiguration" - -// CreateLicenseConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the CreateLicenseConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLicenseConfiguration for more information on using the CreateLicenseConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLicenseConfigurationRequest method. -// req, resp := client.CreateLicenseConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/CreateLicenseConfiguration -func (c *LicenseManager) CreateLicenseConfigurationRequest(input *CreateLicenseConfigurationInput) (req *request.Request, output *CreateLicenseConfigurationOutput) { - op := &request.Operation{ - Name: opCreateLicenseConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLicenseConfigurationInput{} - } - - output = &CreateLicenseConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLicenseConfiguration API operation for AWS License Manager. -// -// Creates a new license configuration object. A license configuration is an -// abstraction of a customer license agreement that can be consumed and enforced -// by License Manager. Components include specifications for the license type -// (licensing by instance, socket, CPU, or VCPU), tenancy (shared tenancy, Amazon -// EC2 Dedicated Instance, Amazon EC2 Dedicated Host, or any of these), host -// affinity (how long a VM must be associated with a host), the number of licenses -// purchased and used. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS License Manager's -// API operation CreateLicenseConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more parameter values are not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" -// Your resource limits have been exceeded. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/CreateLicenseConfiguration -func (c *LicenseManager) CreateLicenseConfiguration(input *CreateLicenseConfigurationInput) (*CreateLicenseConfigurationOutput, error) { - req, out := c.CreateLicenseConfigurationRequest(input) - return out, req.Send() -} - -// CreateLicenseConfigurationWithContext is the same as CreateLicenseConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLicenseConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LicenseManager) CreateLicenseConfigurationWithContext(ctx aws.Context, input *CreateLicenseConfigurationInput, opts ...request.Option) (*CreateLicenseConfigurationOutput, error) { - req, out := c.CreateLicenseConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLicenseConfiguration = "DeleteLicenseConfiguration" - -// DeleteLicenseConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLicenseConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLicenseConfiguration for more information on using the DeleteLicenseConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLicenseConfigurationRequest method. -// req, resp := client.DeleteLicenseConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/DeleteLicenseConfiguration -func (c *LicenseManager) DeleteLicenseConfigurationRequest(input *DeleteLicenseConfigurationInput) (req *request.Request, output *DeleteLicenseConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteLicenseConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLicenseConfigurationInput{} - } - - output = &DeleteLicenseConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLicenseConfiguration API operation for AWS License Manager. -// -// Deletes an existing license configuration. This action fails if the configuration -// is in use. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS License Manager's -// API operation DeleteLicenseConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more parameter values are not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/DeleteLicenseConfiguration -func (c *LicenseManager) DeleteLicenseConfiguration(input *DeleteLicenseConfigurationInput) (*DeleteLicenseConfigurationOutput, error) { - req, out := c.DeleteLicenseConfigurationRequest(input) - return out, req.Send() -} - -// DeleteLicenseConfigurationWithContext is the same as DeleteLicenseConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLicenseConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LicenseManager) DeleteLicenseConfigurationWithContext(ctx aws.Context, input *DeleteLicenseConfigurationInput, opts ...request.Option) (*DeleteLicenseConfigurationOutput, error) { - req, out := c.DeleteLicenseConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLicenseConfiguration = "GetLicenseConfiguration" - -// GetLicenseConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetLicenseConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLicenseConfiguration for more information on using the GetLicenseConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLicenseConfigurationRequest method. -// req, resp := client.GetLicenseConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/GetLicenseConfiguration -func (c *LicenseManager) GetLicenseConfigurationRequest(input *GetLicenseConfigurationInput) (req *request.Request, output *GetLicenseConfigurationOutput) { - op := &request.Operation{ - Name: opGetLicenseConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetLicenseConfigurationInput{} - } - - output = &GetLicenseConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLicenseConfiguration API operation for AWS License Manager. -// -// Returns a detailed description of a license configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS License Manager's -// API operation GetLicenseConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more parameter values are not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/GetLicenseConfiguration -func (c *LicenseManager) GetLicenseConfiguration(input *GetLicenseConfigurationInput) (*GetLicenseConfigurationOutput, error) { - req, out := c.GetLicenseConfigurationRequest(input) - return out, req.Send() -} - -// GetLicenseConfigurationWithContext is the same as GetLicenseConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetLicenseConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LicenseManager) GetLicenseConfigurationWithContext(ctx aws.Context, input *GetLicenseConfigurationInput, opts ...request.Option) (*GetLicenseConfigurationOutput, error) { - req, out := c.GetLicenseConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetServiceSettings = "GetServiceSettings" - -// GetServiceSettingsRequest generates a "aws/request.Request" representing the -// client's request for the GetServiceSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetServiceSettings for more information on using the GetServiceSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetServiceSettingsRequest method. -// req, resp := client.GetServiceSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/GetServiceSettings -func (c *LicenseManager) GetServiceSettingsRequest(input *GetServiceSettingsInput) (req *request.Request, output *GetServiceSettingsOutput) { - op := &request.Operation{ - Name: opGetServiceSettings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetServiceSettingsInput{} - } - - output = &GetServiceSettingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetServiceSettings API operation for AWS License Manager. -// -// Gets License Manager settings for a region. Exposes the configured S3 bucket, -// SNS topic, etc., for inspection. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS License Manager's -// API operation GetServiceSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/GetServiceSettings -func (c *LicenseManager) GetServiceSettings(input *GetServiceSettingsInput) (*GetServiceSettingsOutput, error) { - req, out := c.GetServiceSettingsRequest(input) - return out, req.Send() -} - -// GetServiceSettingsWithContext is the same as GetServiceSettings with the addition of -// the ability to pass a context and additional request options. -// -// See GetServiceSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LicenseManager) GetServiceSettingsWithContext(ctx aws.Context, input *GetServiceSettingsInput, opts ...request.Option) (*GetServiceSettingsOutput, error) { - req, out := c.GetServiceSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAssociationsForLicenseConfiguration = "ListAssociationsForLicenseConfiguration" - -// ListAssociationsForLicenseConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the ListAssociationsForLicenseConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAssociationsForLicenseConfiguration for more information on using the ListAssociationsForLicenseConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAssociationsForLicenseConfigurationRequest method. -// req, resp := client.ListAssociationsForLicenseConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListAssociationsForLicenseConfiguration -func (c *LicenseManager) ListAssociationsForLicenseConfigurationRequest(input *ListAssociationsForLicenseConfigurationInput) (req *request.Request, output *ListAssociationsForLicenseConfigurationOutput) { - op := &request.Operation{ - Name: opListAssociationsForLicenseConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListAssociationsForLicenseConfigurationInput{} - } - - output = &ListAssociationsForLicenseConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAssociationsForLicenseConfiguration API operation for AWS License Manager. -// -// Lists the resource associations for a license configuration. Resource associations -// need not consume licenses from a license configuration. For example, an AMI -// or a stopped instance may not consume a license (depending on the license -// rules). Use this operation to find all resources associated with a license -// configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS License Manager's -// API operation ListAssociationsForLicenseConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more parameter values are not valid. -// -// * ErrCodeFilterLimitExceededException "FilterLimitExceededException" -// The request uses too many filters or too many filter values. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListAssociationsForLicenseConfiguration -func (c *LicenseManager) ListAssociationsForLicenseConfiguration(input *ListAssociationsForLicenseConfigurationInput) (*ListAssociationsForLicenseConfigurationOutput, error) { - req, out := c.ListAssociationsForLicenseConfigurationRequest(input) - return out, req.Send() -} - -// ListAssociationsForLicenseConfigurationWithContext is the same as ListAssociationsForLicenseConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See ListAssociationsForLicenseConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LicenseManager) ListAssociationsForLicenseConfigurationWithContext(ctx aws.Context, input *ListAssociationsForLicenseConfigurationInput, opts ...request.Option) (*ListAssociationsForLicenseConfigurationOutput, error) { - req, out := c.ListAssociationsForLicenseConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListLicenseConfigurations = "ListLicenseConfigurations" - -// ListLicenseConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the ListLicenseConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListLicenseConfigurations for more information on using the ListLicenseConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListLicenseConfigurationsRequest method. -// req, resp := client.ListLicenseConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListLicenseConfigurations -func (c *LicenseManager) ListLicenseConfigurationsRequest(input *ListLicenseConfigurationsInput) (req *request.Request, output *ListLicenseConfigurationsOutput) { - op := &request.Operation{ - Name: opListLicenseConfigurations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListLicenseConfigurationsInput{} - } - - output = &ListLicenseConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListLicenseConfigurations API operation for AWS License Manager. -// -// Lists license configuration objects for an account, each containing the name, -// description, license type, and other license terms modeled from a license -// agreement. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS License Manager's -// API operation ListLicenseConfigurations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more parameter values are not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeFilterLimitExceededException "FilterLimitExceededException" -// The request uses too many filters or too many filter values. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListLicenseConfigurations -func (c *LicenseManager) ListLicenseConfigurations(input *ListLicenseConfigurationsInput) (*ListLicenseConfigurationsOutput, error) { - req, out := c.ListLicenseConfigurationsRequest(input) - return out, req.Send() -} - -// ListLicenseConfigurationsWithContext is the same as ListLicenseConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See ListLicenseConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LicenseManager) ListLicenseConfigurationsWithContext(ctx aws.Context, input *ListLicenseConfigurationsInput, opts ...request.Option) (*ListLicenseConfigurationsOutput, error) { - req, out := c.ListLicenseConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListLicenseSpecificationsForResource = "ListLicenseSpecificationsForResource" - -// ListLicenseSpecificationsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListLicenseSpecificationsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListLicenseSpecificationsForResource for more information on using the ListLicenseSpecificationsForResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListLicenseSpecificationsForResourceRequest method. -// req, resp := client.ListLicenseSpecificationsForResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListLicenseSpecificationsForResource -func (c *LicenseManager) ListLicenseSpecificationsForResourceRequest(input *ListLicenseSpecificationsForResourceInput) (req *request.Request, output *ListLicenseSpecificationsForResourceOutput) { - op := &request.Operation{ - Name: opListLicenseSpecificationsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListLicenseSpecificationsForResourceInput{} - } - - output = &ListLicenseSpecificationsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListLicenseSpecificationsForResource API operation for AWS License Manager. -// -// Returns the license configuration for a 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 License Manager's -// API operation ListLicenseSpecificationsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more parameter values are not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListLicenseSpecificationsForResource -func (c *LicenseManager) ListLicenseSpecificationsForResource(input *ListLicenseSpecificationsForResourceInput) (*ListLicenseSpecificationsForResourceOutput, error) { - req, out := c.ListLicenseSpecificationsForResourceRequest(input) - return out, req.Send() -} - -// ListLicenseSpecificationsForResourceWithContext is the same as ListLicenseSpecificationsForResource with the addition of -// the ability to pass a context and additional request options. -// -// See ListLicenseSpecificationsForResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LicenseManager) ListLicenseSpecificationsForResourceWithContext(ctx aws.Context, input *ListLicenseSpecificationsForResourceInput, opts ...request.Option) (*ListLicenseSpecificationsForResourceOutput, error) { - req, out := c.ListLicenseSpecificationsForResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListResourceInventory = "ListResourceInventory" - -// ListResourceInventoryRequest generates a "aws/request.Request" representing the -// client's request for the ListResourceInventory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResourceInventory for more information on using the ListResourceInventory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResourceInventoryRequest method. -// req, resp := client.ListResourceInventoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListResourceInventory -func (c *LicenseManager) ListResourceInventoryRequest(input *ListResourceInventoryInput) (req *request.Request, output *ListResourceInventoryOutput) { - op := &request.Operation{ - Name: opListResourceInventory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListResourceInventoryInput{} - } - - output = &ListResourceInventoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResourceInventory API operation for AWS License Manager. -// -// Returns a detailed list of resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS License Manager's -// API operation ListResourceInventory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more parameter values are not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeFilterLimitExceededException "FilterLimitExceededException" -// The request uses too many filters or too many filter values. -// -// * ErrCodeFailedDependencyException "FailedDependencyException" -// A dependency required to run the API is missing. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListResourceInventory -func (c *LicenseManager) ListResourceInventory(input *ListResourceInventoryInput) (*ListResourceInventoryOutput, error) { - req, out := c.ListResourceInventoryRequest(input) - return out, req.Send() -} - -// ListResourceInventoryWithContext is the same as ListResourceInventory with the addition of -// the ability to pass a context and additional request options. -// -// See ListResourceInventory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LicenseManager) ListResourceInventoryWithContext(ctx aws.Context, input *ListResourceInventoryInput, opts ...request.Option) (*ListResourceInventoryOutput, error) { - req, out := c.ListResourceInventoryRequest(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/license-manager-2018-08-01/ListTagsForResource -func (c *LicenseManager) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for AWS License Manager. -// -// Lists tags attached to a 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 License Manager's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more parameter values are not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListTagsForResource -func (c *LicenseManager) 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 *LicenseManager) 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 opListUsageForLicenseConfiguration = "ListUsageForLicenseConfiguration" - -// ListUsageForLicenseConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the ListUsageForLicenseConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListUsageForLicenseConfiguration for more information on using the ListUsageForLicenseConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListUsageForLicenseConfigurationRequest method. -// req, resp := client.ListUsageForLicenseConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListUsageForLicenseConfiguration -func (c *LicenseManager) ListUsageForLicenseConfigurationRequest(input *ListUsageForLicenseConfigurationInput) (req *request.Request, output *ListUsageForLicenseConfigurationOutput) { - op := &request.Operation{ - Name: opListUsageForLicenseConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListUsageForLicenseConfigurationInput{} - } - - output = &ListUsageForLicenseConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUsageForLicenseConfiguration API operation for AWS License Manager. -// -// Lists all license usage records for a license configuration, displaying license -// consumption details by resource at a selected point in time. Use this action -// to audit the current license consumption for any license inventory and configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS License Manager's -// API operation ListUsageForLicenseConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more parameter values are not valid. -// -// * ErrCodeFilterLimitExceededException "FilterLimitExceededException" -// The request uses too many filters or too many filter values. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListUsageForLicenseConfiguration -func (c *LicenseManager) ListUsageForLicenseConfiguration(input *ListUsageForLicenseConfigurationInput) (*ListUsageForLicenseConfigurationOutput, error) { - req, out := c.ListUsageForLicenseConfigurationRequest(input) - return out, req.Send() -} - -// ListUsageForLicenseConfigurationWithContext is the same as ListUsageForLicenseConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See ListUsageForLicenseConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LicenseManager) ListUsageForLicenseConfigurationWithContext(ctx aws.Context, input *ListUsageForLicenseConfigurationInput, opts ...request.Option) (*ListUsageForLicenseConfigurationOutput, error) { - req, out := c.ListUsageForLicenseConfigurationRequest(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/license-manager-2018-08-01/TagResource -func (c *LicenseManager) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for AWS License Manager. -// -// Attach one of more tags to any 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 License Manager's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more parameter values are not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/TagResource -func (c *LicenseManager) 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 *LicenseManager) 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/license-manager-2018-08-01/UntagResource -func (c *LicenseManager) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for AWS License Manager. -// -// Remove tags from a 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 License Manager's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more parameter values are not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UntagResource -func (c *LicenseManager) 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 *LicenseManager) 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 opUpdateLicenseConfiguration = "UpdateLicenseConfiguration" - -// UpdateLicenseConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateLicenseConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateLicenseConfiguration for more information on using the UpdateLicenseConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateLicenseConfigurationRequest method. -// req, resp := client.UpdateLicenseConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UpdateLicenseConfiguration -func (c *LicenseManager) UpdateLicenseConfigurationRequest(input *UpdateLicenseConfigurationInput) (req *request.Request, output *UpdateLicenseConfigurationOutput) { - op := &request.Operation{ - Name: opUpdateLicenseConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateLicenseConfigurationInput{} - } - - output = &UpdateLicenseConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateLicenseConfiguration API operation for AWS License Manager. -// -// Modifies the attributes of an existing license configuration object. A license -// configuration is an abstraction of a customer license agreement that can -// be consumed and enforced by License Manager. Components include specifications -// for the license type (Instances, cores, sockets, VCPUs), tenancy (shared -// or Dedicated Host), host affinity (how long a VM is associated with a host), -// the number of licenses purchased and used. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS License Manager's -// API operation UpdateLicenseConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more parameter values are not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UpdateLicenseConfiguration -func (c *LicenseManager) UpdateLicenseConfiguration(input *UpdateLicenseConfigurationInput) (*UpdateLicenseConfigurationOutput, error) { - req, out := c.UpdateLicenseConfigurationRequest(input) - return out, req.Send() -} - -// UpdateLicenseConfigurationWithContext is the same as UpdateLicenseConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateLicenseConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LicenseManager) UpdateLicenseConfigurationWithContext(ctx aws.Context, input *UpdateLicenseConfigurationInput, opts ...request.Option) (*UpdateLicenseConfigurationOutput, error) { - req, out := c.UpdateLicenseConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateLicenseSpecificationsForResource = "UpdateLicenseSpecificationsForResource" - -// UpdateLicenseSpecificationsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the UpdateLicenseSpecificationsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateLicenseSpecificationsForResource for more information on using the UpdateLicenseSpecificationsForResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateLicenseSpecificationsForResourceRequest method. -// req, resp := client.UpdateLicenseSpecificationsForResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UpdateLicenseSpecificationsForResource -func (c *LicenseManager) UpdateLicenseSpecificationsForResourceRequest(input *UpdateLicenseSpecificationsForResourceInput) (req *request.Request, output *UpdateLicenseSpecificationsForResourceOutput) { - op := &request.Operation{ - Name: opUpdateLicenseSpecificationsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateLicenseSpecificationsForResourceInput{} - } - - output = &UpdateLicenseSpecificationsForResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateLicenseSpecificationsForResource API operation for AWS License Manager. -// -// Adds or removes license configurations for a specified AWS resource. This -// operation currently supports updating the license specifications of AMIs, -// instances, and hosts. Launch templates and AWS CloudFormation templates are -// not managed from this operation as those resources send the license configurations -// directly to a resource creation operation, such as RunInstances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS License Manager's -// API operation UpdateLicenseSpecificationsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more parameter values are not valid. -// -// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" -// License Manager cannot allocate a license to a resource because of its state. -// -// For example, you cannot allocate a license to an instance in the process -// of shutting down. -// -// * ErrCodeLicenseUsageException "LicenseUsageException" -// You do not have enough licenses available to support a new resource launch. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UpdateLicenseSpecificationsForResource -func (c *LicenseManager) UpdateLicenseSpecificationsForResource(input *UpdateLicenseSpecificationsForResourceInput) (*UpdateLicenseSpecificationsForResourceOutput, error) { - req, out := c.UpdateLicenseSpecificationsForResourceRequest(input) - return out, req.Send() -} - -// UpdateLicenseSpecificationsForResourceWithContext is the same as UpdateLicenseSpecificationsForResource with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateLicenseSpecificationsForResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LicenseManager) UpdateLicenseSpecificationsForResourceWithContext(ctx aws.Context, input *UpdateLicenseSpecificationsForResourceInput, opts ...request.Option) (*UpdateLicenseSpecificationsForResourceOutput, error) { - req, out := c.UpdateLicenseSpecificationsForResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateServiceSettings = "UpdateServiceSettings" - -// UpdateServiceSettingsRequest generates a "aws/request.Request" representing the -// client's request for the UpdateServiceSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateServiceSettings for more information on using the UpdateServiceSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateServiceSettingsRequest method. -// req, resp := client.UpdateServiceSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UpdateServiceSettings -func (c *LicenseManager) UpdateServiceSettingsRequest(input *UpdateServiceSettingsInput) (req *request.Request, output *UpdateServiceSettingsOutput) { - op := &request.Operation{ - Name: opUpdateServiceSettings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateServiceSettingsInput{} - } - - output = &UpdateServiceSettingsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateServiceSettings API operation for AWS License Manager. -// -// Updates License Manager service settings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS License Manager's -// API operation UpdateServiceSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more parameter values are not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The server experienced an internal error. Try again. -// -// * ErrCodeAuthorizationException "AuthorizationException" -// The AWS user account does not have permission to perform the action. Check -// the IAM policy associated with this account. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Access to resource denied. -// -// * ErrCodeRateLimitExceededException "RateLimitExceededException" -// Too many requests have been submitted. Try again after a brief wait. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UpdateServiceSettings -func (c *LicenseManager) UpdateServiceSettings(input *UpdateServiceSettingsInput) (*UpdateServiceSettingsOutput, error) { - req, out := c.UpdateServiceSettingsRequest(input) - return out, req.Send() -} - -// UpdateServiceSettingsWithContext is the same as UpdateServiceSettings with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateServiceSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *LicenseManager) UpdateServiceSettingsWithContext(ctx aws.Context, input *UpdateServiceSettingsInput, opts ...request.Option) (*UpdateServiceSettingsOutput, error) { - req, out := c.UpdateServiceSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Details about license consumption. -type ConsumedLicenseSummary struct { - _ struct{} `type:"structure"` - - // Number of licenses consumed by a resource. - ConsumedLicenses *int64 `type:"long"` - - // Resource type of the resource consuming a license (instance, host, or AMI). - ResourceType *string `type:"string" enum:"ResourceType"` -} - -// String returns the string representation -func (s ConsumedLicenseSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConsumedLicenseSummary) GoString() string { - return s.String() -} - -// SetConsumedLicenses sets the ConsumedLicenses field's value. -func (s *ConsumedLicenseSummary) SetConsumedLicenses(v int64) *ConsumedLicenseSummary { - s.ConsumedLicenses = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ConsumedLicenseSummary) SetResourceType(v string) *ConsumedLicenseSummary { - s.ResourceType = &v - return s -} - -type CreateLicenseConfigurationInput struct { - _ struct{} `type:"structure"` - - // Human-friendly description of the license configuration. - Description *string `type:"string"` - - // Number of licenses managed by the license configuration. - LicenseCount *int64 `type:"long"` - - // Flag indicating whether hard or soft license enforcement is used. Exceeding - // a hard limit results in the blocked deployment of new instances. - LicenseCountHardLimit *bool `type:"boolean"` - - // Dimension to use to track the license inventory. - // - // LicenseCountingType is a required field - LicenseCountingType *string `type:"string" required:"true" enum:"LicenseCountingType"` - - // Array of configured License Manager rules. - LicenseRules []*string `type:"list"` - - // Name of the license configuration. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The tags to apply to the resources during launch. You can only tag instances - // and volumes on launch. The specified tags are applied to all instances or - // volumes that are created during launch. To tag a resource after it has been - // created, see CreateTags . - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreateLicenseConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLicenseConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLicenseConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLicenseConfigurationInput"} - if s.LicenseCountingType == nil { - invalidParams.Add(request.NewErrParamRequired("LicenseCountingType")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateLicenseConfigurationInput) SetDescription(v string) *CreateLicenseConfigurationInput { - s.Description = &v - return s -} - -// SetLicenseCount sets the LicenseCount field's value. -func (s *CreateLicenseConfigurationInput) SetLicenseCount(v int64) *CreateLicenseConfigurationInput { - s.LicenseCount = &v - return s -} - -// SetLicenseCountHardLimit sets the LicenseCountHardLimit field's value. -func (s *CreateLicenseConfigurationInput) SetLicenseCountHardLimit(v bool) *CreateLicenseConfigurationInput { - s.LicenseCountHardLimit = &v - return s -} - -// SetLicenseCountingType sets the LicenseCountingType field's value. -func (s *CreateLicenseConfigurationInput) SetLicenseCountingType(v string) *CreateLicenseConfigurationInput { - s.LicenseCountingType = &v - return s -} - -// SetLicenseRules sets the LicenseRules field's value. -func (s *CreateLicenseConfigurationInput) SetLicenseRules(v []*string) *CreateLicenseConfigurationInput { - s.LicenseRules = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateLicenseConfigurationInput) SetName(v string) *CreateLicenseConfigurationInput { - s.Name = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateLicenseConfigurationInput) SetTags(v []*Tag) *CreateLicenseConfigurationInput { - s.Tags = v - return s -} - -type CreateLicenseConfigurationOutput struct { - _ struct{} `type:"structure"` - - // ARN of the license configuration object after its creation. - LicenseConfigurationArn *string `type:"string"` -} - -// String returns the string representation -func (s CreateLicenseConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLicenseConfigurationOutput) GoString() string { - return s.String() -} - -// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. -func (s *CreateLicenseConfigurationOutput) SetLicenseConfigurationArn(v string) *CreateLicenseConfigurationOutput { - s.LicenseConfigurationArn = &v - return s -} - -type DeleteLicenseConfigurationInput struct { - _ struct{} `type:"structure"` - - // Unique ID of the configuration object to delete. - // - // LicenseConfigurationArn is a required field - LicenseConfigurationArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLicenseConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLicenseConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLicenseConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLicenseConfigurationInput"} - if s.LicenseConfigurationArn == nil { - invalidParams.Add(request.NewErrParamRequired("LicenseConfigurationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. -func (s *DeleteLicenseConfigurationInput) SetLicenseConfigurationArn(v string) *DeleteLicenseConfigurationInput { - s.LicenseConfigurationArn = &v - return s -} - -type DeleteLicenseConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLicenseConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLicenseConfigurationOutput) GoString() string { - return s.String() -} - -// A filter name and value pair that is used to return a more specific list -// of results from a describe operation. Filters can be used to match a set -// of resources by specific criteria, such as tags, attributes, or IDs. The -// filters supported by a Describe operation are documented with the Describe -// operation. -type Filter struct { - _ struct{} `type:"structure"` - - // Name of the filter. Filter names are case-sensitive. - Name *string `type:"string"` - - // One or more filter values. Filter values are case-sensitive. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s Filter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Filter) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *Filter) SetName(v string) *Filter { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *Filter) SetValues(v []*string) *Filter { - s.Values = v - return s -} - -type GetLicenseConfigurationInput struct { - _ struct{} `type:"structure"` - - // ARN of the license configuration being requested. - // - // LicenseConfigurationArn is a required field - LicenseConfigurationArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetLicenseConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLicenseConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLicenseConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLicenseConfigurationInput"} - if s.LicenseConfigurationArn == nil { - invalidParams.Add(request.NewErrParamRequired("LicenseConfigurationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. -func (s *GetLicenseConfigurationInput) SetLicenseConfigurationArn(v string) *GetLicenseConfigurationInput { - s.LicenseConfigurationArn = &v - return s -} - -type GetLicenseConfigurationOutput struct { - _ struct{} `type:"structure"` - - // List of summaries for consumed licenses used by various resources. - ConsumedLicenseSummaryList []*ConsumedLicenseSummary `type:"list"` - - // Number of licenses assigned to resources. - ConsumedLicenses *int64 `type:"long"` - - // Description of the license configuration. - Description *string `type:"string"` - - // ARN of the license configuration requested. - LicenseConfigurationArn *string `type:"string"` - - // Unique ID for the license configuration. - LicenseConfigurationId *string `type:"string"` - - // Number of available licenses. - LicenseCount *int64 `type:"long"` - - // Sets the number of available licenses as a hard limit. - LicenseCountHardLimit *bool `type:"boolean"` - - // Dimension on which the licenses are counted (for example, instances, cores, - // sockets, or VCPUs). - LicenseCountingType *string `type:"string" enum:"LicenseCountingType"` - - // List of flexible text strings designating license rules. - LicenseRules []*string `type:"list"` - - // List of summaries of managed resources. - ManagedResourceSummaryList []*ManagedResourceSummary `type:"list"` - - // Name of the license configuration. - Name *string `type:"string"` - - // Owner account ID for the license configuration. - OwnerAccountId *string `type:"string"` - - // License configuration status (active, etc.). - Status *string `type:"string"` - - // List of tags attached to the license configuration. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s GetLicenseConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLicenseConfigurationOutput) GoString() string { - return s.String() -} - -// SetConsumedLicenseSummaryList sets the ConsumedLicenseSummaryList field's value. -func (s *GetLicenseConfigurationOutput) SetConsumedLicenseSummaryList(v []*ConsumedLicenseSummary) *GetLicenseConfigurationOutput { - s.ConsumedLicenseSummaryList = v - return s -} - -// SetConsumedLicenses sets the ConsumedLicenses field's value. -func (s *GetLicenseConfigurationOutput) SetConsumedLicenses(v int64) *GetLicenseConfigurationOutput { - s.ConsumedLicenses = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetLicenseConfigurationOutput) SetDescription(v string) *GetLicenseConfigurationOutput { - s.Description = &v - return s -} - -// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. -func (s *GetLicenseConfigurationOutput) SetLicenseConfigurationArn(v string) *GetLicenseConfigurationOutput { - s.LicenseConfigurationArn = &v - return s -} - -// SetLicenseConfigurationId sets the LicenseConfigurationId field's value. -func (s *GetLicenseConfigurationOutput) SetLicenseConfigurationId(v string) *GetLicenseConfigurationOutput { - s.LicenseConfigurationId = &v - return s -} - -// SetLicenseCount sets the LicenseCount field's value. -func (s *GetLicenseConfigurationOutput) SetLicenseCount(v int64) *GetLicenseConfigurationOutput { - s.LicenseCount = &v - return s -} - -// SetLicenseCountHardLimit sets the LicenseCountHardLimit field's value. -func (s *GetLicenseConfigurationOutput) SetLicenseCountHardLimit(v bool) *GetLicenseConfigurationOutput { - s.LicenseCountHardLimit = &v - return s -} - -// SetLicenseCountingType sets the LicenseCountingType field's value. -func (s *GetLicenseConfigurationOutput) SetLicenseCountingType(v string) *GetLicenseConfigurationOutput { - s.LicenseCountingType = &v - return s -} - -// SetLicenseRules sets the LicenseRules field's value. -func (s *GetLicenseConfigurationOutput) SetLicenseRules(v []*string) *GetLicenseConfigurationOutput { - s.LicenseRules = v - return s -} - -// SetManagedResourceSummaryList sets the ManagedResourceSummaryList field's value. -func (s *GetLicenseConfigurationOutput) SetManagedResourceSummaryList(v []*ManagedResourceSummary) *GetLicenseConfigurationOutput { - s.ManagedResourceSummaryList = v - return s -} - -// SetName sets the Name field's value. -func (s *GetLicenseConfigurationOutput) SetName(v string) *GetLicenseConfigurationOutput { - s.Name = &v - return s -} - -// SetOwnerAccountId sets the OwnerAccountId field's value. -func (s *GetLicenseConfigurationOutput) SetOwnerAccountId(v string) *GetLicenseConfigurationOutput { - s.OwnerAccountId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetLicenseConfigurationOutput) SetStatus(v string) *GetLicenseConfigurationOutput { - s.Status = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *GetLicenseConfigurationOutput) SetTags(v []*Tag) *GetLicenseConfigurationOutput { - s.Tags = v - return s -} - -type GetServiceSettingsInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetServiceSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetServiceSettingsInput) GoString() string { - return s.String() -} - -type GetServiceSettingsOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether cross-account discovery has been enabled. - EnableCrossAccountsDiscovery *bool `type:"boolean"` - - // Indicates whether AWS Organizations has been integrated with License Manager - // for cross-account discovery. - OrganizationConfiguration *OrganizationConfiguration `type:"structure"` - - // Regional S3 bucket path for storing reports, license trail event data, discovery - // data, etc. - S3BucketArn *string `type:"string"` - - // SNS topic configured to receive notifications from License Manager. - SnsTopicArn *string `type:"string"` -} - -// String returns the string representation -func (s GetServiceSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetServiceSettingsOutput) GoString() string { - return s.String() -} - -// SetEnableCrossAccountsDiscovery sets the EnableCrossAccountsDiscovery field's value. -func (s *GetServiceSettingsOutput) SetEnableCrossAccountsDiscovery(v bool) *GetServiceSettingsOutput { - s.EnableCrossAccountsDiscovery = &v - return s -} - -// SetOrganizationConfiguration sets the OrganizationConfiguration field's value. -func (s *GetServiceSettingsOutput) SetOrganizationConfiguration(v *OrganizationConfiguration) *GetServiceSettingsOutput { - s.OrganizationConfiguration = v - return s -} - -// SetS3BucketArn sets the S3BucketArn field's value. -func (s *GetServiceSettingsOutput) SetS3BucketArn(v string) *GetServiceSettingsOutput { - s.S3BucketArn = &v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *GetServiceSettingsOutput) SetSnsTopicArn(v string) *GetServiceSettingsOutput { - s.SnsTopicArn = &v - return s -} - -// An inventory filter object. -type InventoryFilter struct { - _ struct{} `type:"structure"` - - // The condition of the filter. - // - // Condition is a required field - Condition *string `type:"string" required:"true" enum:"InventoryFilterCondition"` - - // The name of the filter. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // Value of the filter. - Value *string `type:"string"` -} - -// String returns the string representation -func (s InventoryFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InventoryFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InventoryFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"} - if s.Condition == nil { - invalidParams.Add(request.NewErrParamRequired("Condition")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCondition sets the Condition field's value. -func (s *InventoryFilter) SetCondition(v string) *InventoryFilter { - s.Condition = &v - return s -} - -// SetName sets the Name field's value. -func (s *InventoryFilter) SetName(v string) *InventoryFilter { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *InventoryFilter) SetValue(v string) *InventoryFilter { - s.Value = &v - return s -} - -// A license configuration is an abstraction of a customer license agreement -// that can be consumed and enforced by License Manager. Components include -// specifications for the license type (licensing by instance, socket, CPU, -// or VCPU), tenancy (shared tenancy, Amazon EC2 Dedicated Instance, Amazon -// EC2 Dedicated Host, or any of these), host affinity (how long a VM must be -// associated with a host), the number of licenses purchased and used. -type LicenseConfiguration struct { - _ struct{} `type:"structure"` - - // List of summaries for licenses consumed by various resources. - ConsumedLicenseSummaryList []*ConsumedLicenseSummary `type:"list"` - - // Number of licenses consumed. - ConsumedLicenses *int64 `type:"long"` - - // Description of the license configuration. - Description *string `type:"string"` - - // ARN of the LicenseConfiguration object. - LicenseConfigurationArn *string `type:"string"` - - // Unique ID of the LicenseConfiguration object. - LicenseConfigurationId *string `type:"string"` - - // Number of licenses managed by the license configuration. - LicenseCount *int64 `type:"long"` - - // Sets the number of available licenses as a hard limit. - LicenseCountHardLimit *bool `type:"boolean"` - - // Dimension to use to track license inventory. - LicenseCountingType *string `type:"string" enum:"LicenseCountingType"` - - // Array of configured License Manager rules. - LicenseRules []*string `type:"list"` - - // List of summaries for managed resources. - ManagedResourceSummaryList []*ManagedResourceSummary `type:"list"` - - // Name of the license configuration. - Name *string `type:"string"` - - // Account ID of the license configuration's owner. - OwnerAccountId *string `type:"string"` - - // Status of the license configuration. - Status *string `type:"string"` -} - -// String returns the string representation -func (s LicenseConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LicenseConfiguration) GoString() string { - return s.String() -} - -// SetConsumedLicenseSummaryList sets the ConsumedLicenseSummaryList field's value. -func (s *LicenseConfiguration) SetConsumedLicenseSummaryList(v []*ConsumedLicenseSummary) *LicenseConfiguration { - s.ConsumedLicenseSummaryList = v - return s -} - -// SetConsumedLicenses sets the ConsumedLicenses field's value. -func (s *LicenseConfiguration) SetConsumedLicenses(v int64) *LicenseConfiguration { - s.ConsumedLicenses = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *LicenseConfiguration) SetDescription(v string) *LicenseConfiguration { - s.Description = &v - return s -} - -// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. -func (s *LicenseConfiguration) SetLicenseConfigurationArn(v string) *LicenseConfiguration { - s.LicenseConfigurationArn = &v - return s -} - -// SetLicenseConfigurationId sets the LicenseConfigurationId field's value. -func (s *LicenseConfiguration) SetLicenseConfigurationId(v string) *LicenseConfiguration { - s.LicenseConfigurationId = &v - return s -} - -// SetLicenseCount sets the LicenseCount field's value. -func (s *LicenseConfiguration) SetLicenseCount(v int64) *LicenseConfiguration { - s.LicenseCount = &v - return s -} - -// SetLicenseCountHardLimit sets the LicenseCountHardLimit field's value. -func (s *LicenseConfiguration) SetLicenseCountHardLimit(v bool) *LicenseConfiguration { - s.LicenseCountHardLimit = &v - return s -} - -// SetLicenseCountingType sets the LicenseCountingType field's value. -func (s *LicenseConfiguration) SetLicenseCountingType(v string) *LicenseConfiguration { - s.LicenseCountingType = &v - return s -} - -// SetLicenseRules sets the LicenseRules field's value. -func (s *LicenseConfiguration) SetLicenseRules(v []*string) *LicenseConfiguration { - s.LicenseRules = v - return s -} - -// SetManagedResourceSummaryList sets the ManagedResourceSummaryList field's value. -func (s *LicenseConfiguration) SetManagedResourceSummaryList(v []*ManagedResourceSummary) *LicenseConfiguration { - s.ManagedResourceSummaryList = v - return s -} - -// SetName sets the Name field's value. -func (s *LicenseConfiguration) SetName(v string) *LicenseConfiguration { - s.Name = &v - return s -} - -// SetOwnerAccountId sets the OwnerAccountId field's value. -func (s *LicenseConfiguration) SetOwnerAccountId(v string) *LicenseConfiguration { - s.OwnerAccountId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *LicenseConfiguration) SetStatus(v string) *LicenseConfiguration { - s.Status = &v - return s -} - -// Describes a server resource that is associated with a license configuration. -type LicenseConfigurationAssociation struct { - _ struct{} `type:"structure"` - - // Time when the license configuration was associated with the resource. - AssociationTime *time.Time `type:"timestamp"` - - // ARN of the resource associated with the license configuration. - ResourceArn *string `type:"string"` - - // ID of the AWS account that owns the resource consuming licenses. - ResourceOwnerId *string `type:"string"` - - // Type of server resource. - ResourceType *string `type:"string" enum:"ResourceType"` -} - -// String returns the string representation -func (s LicenseConfigurationAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LicenseConfigurationAssociation) GoString() string { - return s.String() -} - -// SetAssociationTime sets the AssociationTime field's value. -func (s *LicenseConfigurationAssociation) SetAssociationTime(v time.Time) *LicenseConfigurationAssociation { - s.AssociationTime = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *LicenseConfigurationAssociation) SetResourceArn(v string) *LicenseConfigurationAssociation { - s.ResourceArn = &v - return s -} - -// SetResourceOwnerId sets the ResourceOwnerId field's value. -func (s *LicenseConfigurationAssociation) SetResourceOwnerId(v string) *LicenseConfigurationAssociation { - s.ResourceOwnerId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *LicenseConfigurationAssociation) SetResourceType(v string) *LicenseConfigurationAssociation { - s.ResourceType = &v - return s -} - -// Contains details of the usage of each resource from the license pool. -type LicenseConfigurationUsage struct { - _ struct{} `type:"structure"` - - // Time when the license configuration was initially associated with a resource. - AssociationTime *time.Time `type:"timestamp"` - - // Number of licenses consumed out of the total provisioned in the license configuration. - ConsumedLicenses *int64 `type:"long"` - - // ARN of the resource associated with a license configuration. - ResourceArn *string `type:"string"` - - // ID of the account that owns a resource that is associated with the license - // configuration. - ResourceOwnerId *string `type:"string"` - - // Status of a resource associated with the license configuration. - ResourceStatus *string `type:"string"` - - // Type of resource associated with athe license configuration. - ResourceType *string `type:"string" enum:"ResourceType"` -} - -// String returns the string representation -func (s LicenseConfigurationUsage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LicenseConfigurationUsage) GoString() string { - return s.String() -} - -// SetAssociationTime sets the AssociationTime field's value. -func (s *LicenseConfigurationUsage) SetAssociationTime(v time.Time) *LicenseConfigurationUsage { - s.AssociationTime = &v - return s -} - -// SetConsumedLicenses sets the ConsumedLicenses field's value. -func (s *LicenseConfigurationUsage) SetConsumedLicenses(v int64) *LicenseConfigurationUsage { - s.ConsumedLicenses = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *LicenseConfigurationUsage) SetResourceArn(v string) *LicenseConfigurationUsage { - s.ResourceArn = &v - return s -} - -// SetResourceOwnerId sets the ResourceOwnerId field's value. -func (s *LicenseConfigurationUsage) SetResourceOwnerId(v string) *LicenseConfigurationUsage { - s.ResourceOwnerId = &v - return s -} - -// SetResourceStatus sets the ResourceStatus field's value. -func (s *LicenseConfigurationUsage) SetResourceStatus(v string) *LicenseConfigurationUsage { - s.ResourceStatus = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *LicenseConfigurationUsage) SetResourceType(v string) *LicenseConfigurationUsage { - s.ResourceType = &v - return s -} - -// Object used for associating a license configuration with a resource. -type LicenseSpecification struct { - _ struct{} `type:"structure"` - - // ARN of the LicenseConfiguration object. - // - // LicenseConfigurationArn is a required field - LicenseConfigurationArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s LicenseSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LicenseSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LicenseSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LicenseSpecification"} - if s.LicenseConfigurationArn == nil { - invalidParams.Add(request.NewErrParamRequired("LicenseConfigurationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. -func (s *LicenseSpecification) SetLicenseConfigurationArn(v string) *LicenseSpecification { - s.LicenseConfigurationArn = &v - return s -} - -type ListAssociationsForLicenseConfigurationInput struct { - _ struct{} `type:"structure"` - - // ARN of a LicenseConfiguration object. - // - // LicenseConfigurationArn is a required field - LicenseConfigurationArn *string `type:"string" required:"true"` - - // Maximum number of results to return in a single call. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // Token for the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAssociationsForLicenseConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAssociationsForLicenseConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAssociationsForLicenseConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAssociationsForLicenseConfigurationInput"} - if s.LicenseConfigurationArn == nil { - invalidParams.Add(request.NewErrParamRequired("LicenseConfigurationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. -func (s *ListAssociationsForLicenseConfigurationInput) SetLicenseConfigurationArn(v string) *ListAssociationsForLicenseConfigurationInput { - s.LicenseConfigurationArn = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAssociationsForLicenseConfigurationInput) SetMaxResults(v int64) *ListAssociationsForLicenseConfigurationInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAssociationsForLicenseConfigurationInput) SetNextToken(v string) *ListAssociationsForLicenseConfigurationInput { - s.NextToken = &v - return s -} - -type ListAssociationsForLicenseConfigurationOutput struct { - _ struct{} `type:"structure"` - - // Lists association objects for the license configuration, each containing - // the association time, number of consumed licenses, resource ARN, resource - // ID, account ID that owns the resource, resource size, and resource type. - LicenseConfigurationAssociations []*LicenseConfigurationAssociation `type:"list"` - - // Token for the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAssociationsForLicenseConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAssociationsForLicenseConfigurationOutput) GoString() string { - return s.String() -} - -// SetLicenseConfigurationAssociations sets the LicenseConfigurationAssociations field's value. -func (s *ListAssociationsForLicenseConfigurationOutput) SetLicenseConfigurationAssociations(v []*LicenseConfigurationAssociation) *ListAssociationsForLicenseConfigurationOutput { - s.LicenseConfigurationAssociations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAssociationsForLicenseConfigurationOutput) SetNextToken(v string) *ListAssociationsForLicenseConfigurationOutput { - s.NextToken = &v - return s -} - -type ListLicenseConfigurationsInput struct { - _ struct{} `type:"structure"` - - // One or more filters. - Filters []*Filter `type:"list"` - - // An array of ARNs for the calling account’s license configurations. - LicenseConfigurationArns []*string `type:"list"` - - // Maximum number of results to return in a single call. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // Token for the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListLicenseConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLicenseConfigurationsInput) GoString() string { - return s.String() -} - -// SetFilters sets the Filters field's value. -func (s *ListLicenseConfigurationsInput) SetFilters(v []*Filter) *ListLicenseConfigurationsInput { - s.Filters = v - return s -} - -// SetLicenseConfigurationArns sets the LicenseConfigurationArns field's value. -func (s *ListLicenseConfigurationsInput) SetLicenseConfigurationArns(v []*string) *ListLicenseConfigurationsInput { - s.LicenseConfigurationArns = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListLicenseConfigurationsInput) SetMaxResults(v int64) *ListLicenseConfigurationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListLicenseConfigurationsInput) SetNextToken(v string) *ListLicenseConfigurationsInput { - s.NextToken = &v - return s -} - -type ListLicenseConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // Array of license configuration objects. - LicenseConfigurations []*LicenseConfiguration `type:"list"` - - // Token for the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListLicenseConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLicenseConfigurationsOutput) GoString() string { - return s.String() -} - -// SetLicenseConfigurations sets the LicenseConfigurations field's value. -func (s *ListLicenseConfigurationsOutput) SetLicenseConfigurations(v []*LicenseConfiguration) *ListLicenseConfigurationsOutput { - s.LicenseConfigurations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListLicenseConfigurationsOutput) SetNextToken(v string) *ListLicenseConfigurationsOutput { - s.NextToken = &v - return s -} - -type ListLicenseSpecificationsForResourceInput struct { - _ struct{} `type:"structure"` - - // Maximum number of results to return in a single call. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // Token for the next set of results. - NextToken *string `type:"string"` - - // ARN of an AMI or Amazon EC2 instance that has an associated license configuration. - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListLicenseSpecificationsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLicenseSpecificationsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListLicenseSpecificationsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListLicenseSpecificationsForResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListLicenseSpecificationsForResourceInput) SetMaxResults(v int64) *ListLicenseSpecificationsForResourceInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListLicenseSpecificationsForResourceInput) SetNextToken(v string) *ListLicenseSpecificationsForResourceInput { - s.NextToken = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ListLicenseSpecificationsForResourceInput) SetResourceArn(v string) *ListLicenseSpecificationsForResourceInput { - s.ResourceArn = &v - return s -} - -type ListLicenseSpecificationsForResourceOutput struct { - _ struct{} `type:"structure"` - - // License configurations associated with a resource. - LicenseSpecifications []*LicenseSpecification `type:"list"` - - // Token for the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListLicenseSpecificationsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLicenseSpecificationsForResourceOutput) GoString() string { - return s.String() -} - -// SetLicenseSpecifications sets the LicenseSpecifications field's value. -func (s *ListLicenseSpecificationsForResourceOutput) SetLicenseSpecifications(v []*LicenseSpecification) *ListLicenseSpecificationsForResourceOutput { - s.LicenseSpecifications = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListLicenseSpecificationsForResourceOutput) SetNextToken(v string) *ListLicenseSpecificationsForResourceOutput { - s.NextToken = &v - return s -} - -type ListResourceInventoryInput struct { - _ struct{} `type:"structure"` - - // One or more filters. - Filters []*InventoryFilter `type:"list"` - - // Maximum number of results to return in a single call. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // Token for the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListResourceInventoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourceInventoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResourceInventoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResourceInventoryInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListResourceInventoryInput) SetFilters(v []*InventoryFilter) *ListResourceInventoryInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListResourceInventoryInput) SetMaxResults(v int64) *ListResourceInventoryInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResourceInventoryInput) SetNextToken(v string) *ListResourceInventoryInput { - s.NextToken = &v - return s -} - -type ListResourceInventoryOutput struct { - _ struct{} `type:"structure"` - - // Token for the next set of results. - NextToken *string `type:"string"` - - // The detailed list of resources. - ResourceInventoryList []*ResourceInventory `type:"list"` -} - -// String returns the string representation -func (s ListResourceInventoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourceInventoryOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResourceInventoryOutput) SetNextToken(v string) *ListResourceInventoryOutput { - s.NextToken = &v - return s -} - -// SetResourceInventoryList sets the ResourceInventoryList field's value. -func (s *ListResourceInventoryOutput) SetResourceInventoryList(v []*ResourceInventory) *ListResourceInventoryOutput { - s.ResourceInventoryList = v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // ARN for the resource. - // - // ResourceArn is a required field - ResourceArn *string `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 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"` - - // List of tags attached to the resource. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -type ListUsageForLicenseConfigurationInput struct { - _ struct{} `type:"structure"` - - // List of filters to apply. - Filters []*Filter `type:"list"` - - // ARN of the targeted LicenseConfiguration object. - // - // LicenseConfigurationArn is a required field - LicenseConfigurationArn *string `type:"string" required:"true"` - - // Maximum number of results to return in a single call. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // Token for the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListUsageForLicenseConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUsageForLicenseConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUsageForLicenseConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUsageForLicenseConfigurationInput"} - if s.LicenseConfigurationArn == nil { - invalidParams.Add(request.NewErrParamRequired("LicenseConfigurationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListUsageForLicenseConfigurationInput) SetFilters(v []*Filter) *ListUsageForLicenseConfigurationInput { - s.Filters = v - return s -} - -// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. -func (s *ListUsageForLicenseConfigurationInput) SetLicenseConfigurationArn(v string) *ListUsageForLicenseConfigurationInput { - s.LicenseConfigurationArn = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListUsageForLicenseConfigurationInput) SetMaxResults(v int64) *ListUsageForLicenseConfigurationInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUsageForLicenseConfigurationInput) SetNextToken(v string) *ListUsageForLicenseConfigurationInput { - s.NextToken = &v - return s -} - -type ListUsageForLicenseConfigurationOutput struct { - _ struct{} `type:"structure"` - - // An array of LicenseConfigurationUsage objects. - LicenseConfigurationUsageList []*LicenseConfigurationUsage `type:"list"` - - // Token for the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListUsageForLicenseConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUsageForLicenseConfigurationOutput) GoString() string { - return s.String() -} - -// SetLicenseConfigurationUsageList sets the LicenseConfigurationUsageList field's value. -func (s *ListUsageForLicenseConfigurationOutput) SetLicenseConfigurationUsageList(v []*LicenseConfigurationUsage) *ListUsageForLicenseConfigurationOutput { - s.LicenseConfigurationUsageList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUsageForLicenseConfigurationOutput) SetNextToken(v string) *ListUsageForLicenseConfigurationOutput { - s.NextToken = &v - return s -} - -// Summary for a resource. -type ManagedResourceSummary struct { - _ struct{} `type:"structure"` - - // Number of resources associated with licenses. - AssociationCount *int64 `type:"long"` - - // Type of resource associated with a license (instance, host, or AMI). - ResourceType *string `type:"string" enum:"ResourceType"` -} - -// String returns the string representation -func (s ManagedResourceSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ManagedResourceSummary) GoString() string { - return s.String() -} - -// SetAssociationCount sets the AssociationCount field's value. -func (s *ManagedResourceSummary) SetAssociationCount(v int64) *ManagedResourceSummary { - s.AssociationCount = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ManagedResourceSummary) SetResourceType(v string) *ManagedResourceSummary { - s.ResourceType = &v - return s -} - -// Object containing configuration information for AWS Organizations. -type OrganizationConfiguration struct { - _ struct{} `type:"structure"` - - // Flag to activate AWS Organization integration. - // - // EnableIntegration is a required field - EnableIntegration *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s OrganizationConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OrganizationConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OrganizationConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OrganizationConfiguration"} - if s.EnableIntegration == nil { - invalidParams.Add(request.NewErrParamRequired("EnableIntegration")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnableIntegration sets the EnableIntegration field's value. -func (s *OrganizationConfiguration) SetEnableIntegration(v bool) *OrganizationConfiguration { - s.EnableIntegration = &v - return s -} - -// A set of attributes that describe a resource. -type ResourceInventory struct { - _ struct{} `type:"structure"` - - // The platform of the resource. - Platform *string `type:"string"` - - // Platform version of the resource in the inventory. - PlatformVersion *string `type:"string"` - - // The ARN of the resource. - ResourceArn *string `type:"string"` - - // Unique ID of the resource. - ResourceId *string `type:"string"` - - // Unique ID of the account that owns the resource. - ResourceOwningAccountId *string `type:"string"` - - // The type of resource. - ResourceType *string `type:"string" enum:"ResourceType"` -} - -// String returns the string representation -func (s ResourceInventory) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceInventory) GoString() string { - return s.String() -} - -// SetPlatform sets the Platform field's value. -func (s *ResourceInventory) SetPlatform(v string) *ResourceInventory { - s.Platform = &v - return s -} - -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *ResourceInventory) SetPlatformVersion(v string) *ResourceInventory { - s.PlatformVersion = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ResourceInventory) SetResourceArn(v string) *ResourceInventory { - s.ResourceArn = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ResourceInventory) SetResourceId(v string) *ResourceInventory { - s.ResourceId = &v - return s -} - -// SetResourceOwningAccountId sets the ResourceOwningAccountId field's value. -func (s *ResourceInventory) SetResourceOwningAccountId(v string) *ResourceInventory { - s.ResourceOwningAccountId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ResourceInventory) SetResourceType(v string) *ResourceInventory { - s.ResourceType = &v - return s -} - -// Tag for a resource in a key-value format. -type Tag struct { - _ struct{} `type:"structure"` - - // Key for the resource tag. - Key *string `type:"string"` - - // Value for the resource tag. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // Resource of the ARN to be tagged. - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` - - // Names of the tags to attach to the resource. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // ARN of the resource. - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` - - // List keys identifying tags to remove. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s UntagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UpdateLicenseConfigurationInput struct { - _ struct{} `type:"structure"` - - // New human-friendly description of the license configuration. - Description *string `type:"string"` - - // ARN for a license configuration. - // - // LicenseConfigurationArn is a required field - LicenseConfigurationArn *string `type:"string" required:"true"` - - // New status of the license configuration (ACTIVE or INACTIVE). - LicenseConfigurationStatus *string `type:"string" enum:"LicenseConfigurationStatus"` - - // New number of licenses managed by the license configuration. - LicenseCount *int64 `type:"long"` - - // Sets the number of available licenses as a hard limit. - LicenseCountHardLimit *bool `type:"boolean"` - - // List of flexible text strings designating license rules. - LicenseRules []*string `type:"list"` - - // New name of the license configuration. - Name *string `type:"string"` -} - -// String returns the string representation -func (s UpdateLicenseConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateLicenseConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateLicenseConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateLicenseConfigurationInput"} - if s.LicenseConfigurationArn == nil { - invalidParams.Add(request.NewErrParamRequired("LicenseConfigurationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateLicenseConfigurationInput) SetDescription(v string) *UpdateLicenseConfigurationInput { - s.Description = &v - return s -} - -// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. -func (s *UpdateLicenseConfigurationInput) SetLicenseConfigurationArn(v string) *UpdateLicenseConfigurationInput { - s.LicenseConfigurationArn = &v - return s -} - -// SetLicenseConfigurationStatus sets the LicenseConfigurationStatus field's value. -func (s *UpdateLicenseConfigurationInput) SetLicenseConfigurationStatus(v string) *UpdateLicenseConfigurationInput { - s.LicenseConfigurationStatus = &v - return s -} - -// SetLicenseCount sets the LicenseCount field's value. -func (s *UpdateLicenseConfigurationInput) SetLicenseCount(v int64) *UpdateLicenseConfigurationInput { - s.LicenseCount = &v - return s -} - -// SetLicenseCountHardLimit sets the LicenseCountHardLimit field's value. -func (s *UpdateLicenseConfigurationInput) SetLicenseCountHardLimit(v bool) *UpdateLicenseConfigurationInput { - s.LicenseCountHardLimit = &v - return s -} - -// SetLicenseRules sets the LicenseRules field's value. -func (s *UpdateLicenseConfigurationInput) SetLicenseRules(v []*string) *UpdateLicenseConfigurationInput { - s.LicenseRules = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateLicenseConfigurationInput) SetName(v string) *UpdateLicenseConfigurationInput { - s.Name = &v - return s -} - -type UpdateLicenseConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateLicenseConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateLicenseConfigurationOutput) GoString() string { - return s.String() -} - -type UpdateLicenseSpecificationsForResourceInput struct { - _ struct{} `type:"structure"` - - // License configuration ARNs to be added to a resource. - AddLicenseSpecifications []*LicenseSpecification `type:"list"` - - // License configuration ARNs to be removed from a resource. - RemoveLicenseSpecifications []*LicenseSpecification `type:"list"` - - // ARN for an AWS server resource. - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateLicenseSpecificationsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateLicenseSpecificationsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateLicenseSpecificationsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateLicenseSpecificationsForResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.AddLicenseSpecifications != nil { - for i, v := range s.AddLicenseSpecifications { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AddLicenseSpecifications", i), err.(request.ErrInvalidParams)) - } - } - } - if s.RemoveLicenseSpecifications != nil { - for i, v := range s.RemoveLicenseSpecifications { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RemoveLicenseSpecifications", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddLicenseSpecifications sets the AddLicenseSpecifications field's value. -func (s *UpdateLicenseSpecificationsForResourceInput) SetAddLicenseSpecifications(v []*LicenseSpecification) *UpdateLicenseSpecificationsForResourceInput { - s.AddLicenseSpecifications = v - return s -} - -// SetRemoveLicenseSpecifications sets the RemoveLicenseSpecifications field's value. -func (s *UpdateLicenseSpecificationsForResourceInput) SetRemoveLicenseSpecifications(v []*LicenseSpecification) *UpdateLicenseSpecificationsForResourceInput { - s.RemoveLicenseSpecifications = v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *UpdateLicenseSpecificationsForResourceInput) SetResourceArn(v string) *UpdateLicenseSpecificationsForResourceInput { - s.ResourceArn = &v - return s -} - -type UpdateLicenseSpecificationsForResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateLicenseSpecificationsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateLicenseSpecificationsForResourceOutput) GoString() string { - return s.String() -} - -type UpdateServiceSettingsInput struct { - _ struct{} `type:"structure"` - - // Activates cross-account discovery. - EnableCrossAccountsDiscovery *bool `type:"boolean"` - - // Integrates AWS Organizations with License Manager for cross-account discovery. - OrganizationConfiguration *OrganizationConfiguration `type:"structure"` - - // ARN of the Amazon S3 bucket where License Manager information is stored. - S3BucketArn *string `type:"string"` - - // ARN of the Amazon SNS topic used for License Manager alerts. - SnsTopicArn *string `type:"string"` -} - -// String returns the string representation -func (s UpdateServiceSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateServiceSettingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateServiceSettingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateServiceSettingsInput"} - if s.OrganizationConfiguration != nil { - if err := s.OrganizationConfiguration.Validate(); err != nil { - invalidParams.AddNested("OrganizationConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnableCrossAccountsDiscovery sets the EnableCrossAccountsDiscovery field's value. -func (s *UpdateServiceSettingsInput) SetEnableCrossAccountsDiscovery(v bool) *UpdateServiceSettingsInput { - s.EnableCrossAccountsDiscovery = &v - return s -} - -// SetOrganizationConfiguration sets the OrganizationConfiguration field's value. -func (s *UpdateServiceSettingsInput) SetOrganizationConfiguration(v *OrganizationConfiguration) *UpdateServiceSettingsInput { - s.OrganizationConfiguration = v - return s -} - -// SetS3BucketArn sets the S3BucketArn field's value. -func (s *UpdateServiceSettingsInput) SetS3BucketArn(v string) *UpdateServiceSettingsInput { - s.S3BucketArn = &v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *UpdateServiceSettingsInput) SetSnsTopicArn(v string) *UpdateServiceSettingsInput { - s.SnsTopicArn = &v - return s -} - -type UpdateServiceSettingsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateServiceSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateServiceSettingsOutput) GoString() string { - return s.String() -} - -const ( - // InventoryFilterConditionEquals is a InventoryFilterCondition enum value - InventoryFilterConditionEquals = "EQUALS" - - // InventoryFilterConditionNotEquals is a InventoryFilterCondition enum value - InventoryFilterConditionNotEquals = "NOT_EQUALS" - - // InventoryFilterConditionBeginsWith is a InventoryFilterCondition enum value - InventoryFilterConditionBeginsWith = "BEGINS_WITH" - - // InventoryFilterConditionContains is a InventoryFilterCondition enum value - InventoryFilterConditionContains = "CONTAINS" -) - -const ( - // LicenseConfigurationStatusAvailable is a LicenseConfigurationStatus enum value - LicenseConfigurationStatusAvailable = "AVAILABLE" - - // LicenseConfigurationStatusDisabled is a LicenseConfigurationStatus enum value - LicenseConfigurationStatusDisabled = "DISABLED" -) - -const ( - // LicenseCountingTypeVCpu is a LicenseCountingType enum value - LicenseCountingTypeVCpu = "vCPU" - - // LicenseCountingTypeInstance is a LicenseCountingType enum value - LicenseCountingTypeInstance = "Instance" - - // LicenseCountingTypeCore is a LicenseCountingType enum value - LicenseCountingTypeCore = "Core" - - // LicenseCountingTypeSocket is a LicenseCountingType enum value - LicenseCountingTypeSocket = "Socket" -) - -const ( - // ResourceTypeEc2Instance is a ResourceType enum value - ResourceTypeEc2Instance = "EC2_INSTANCE" - - // ResourceTypeEc2Host is a ResourceType enum value - ResourceTypeEc2Host = "EC2_HOST" - - // ResourceTypeEc2Ami is a ResourceType enum value - ResourceTypeEc2Ami = "EC2_AMI" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/licensemanager/doc.go b/vendor/github.com/aws/aws-sdk-go/service/licensemanager/doc.go deleted file mode 100644 index 14e09f5e4..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/licensemanager/doc.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package licensemanager provides the client and types for making API -// requests to AWS License Manager. -// -// This is the AWS License Manager API Reference. It provides descriptions, -// syntax, and usage examples for each of the actions and data types for License -// Manager. The topic for each action shows the Query API request parameters -// and the XML response. You can also view the XML request elements in the WSDL. -// -// Alternatively, you can use one of the AWS SDKs to access an API that's tailored -// to the programming language or platform that you're using. For more information, -// see AWS SDKs (http://aws.amazon.com/tools/#SDKs). -// -// See https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01 for more information on this service. -// -// See licensemanager package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/licensemanager/ -// -// Using the Client -// -// To contact AWS License Manager with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS License Manager client LicenseManager for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/licensemanager/#New -package licensemanager diff --git a/vendor/github.com/aws/aws-sdk-go/service/licensemanager/errors.go b/vendor/github.com/aws/aws-sdk-go/service/licensemanager/errors.go deleted file mode 100644 index 7a6816be9..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/licensemanager/errors.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package licensemanager - -const ( - - // ErrCodeAccessDeniedException for service response error code - // "AccessDeniedException". - // - // Access to resource denied. - ErrCodeAccessDeniedException = "AccessDeniedException" - - // ErrCodeAuthorizationException for service response error code - // "AuthorizationException". - // - // The AWS user account does not have permission to perform the action. Check - // the IAM policy associated with this account. - ErrCodeAuthorizationException = "AuthorizationException" - - // ErrCodeFailedDependencyException for service response error code - // "FailedDependencyException". - // - // A dependency required to run the API is missing. - ErrCodeFailedDependencyException = "FailedDependencyException" - - // ErrCodeFilterLimitExceededException for service response error code - // "FilterLimitExceededException". - // - // The request uses too many filters or too many filter values. - ErrCodeFilterLimitExceededException = "FilterLimitExceededException" - - // ErrCodeInvalidParameterValueException for service response error code - // "InvalidParameterValueException". - // - // One or more parameter values are not valid. - ErrCodeInvalidParameterValueException = "InvalidParameterValueException" - - // ErrCodeInvalidResourceStateException for service response error code - // "InvalidResourceStateException". - // - // License Manager cannot allocate a license to a resource because of its state. - // - // For example, you cannot allocate a license to an instance in the process - // of shutting down. - ErrCodeInvalidResourceStateException = "InvalidResourceStateException" - - // ErrCodeLicenseUsageException for service response error code - // "LicenseUsageException". - // - // You do not have enough licenses available to support a new resource launch. - ErrCodeLicenseUsageException = "LicenseUsageException" - - // ErrCodeRateLimitExceededException for service response error code - // "RateLimitExceededException". - // - // Too many requests have been submitted. Try again after a brief wait. - ErrCodeRateLimitExceededException = "RateLimitExceededException" - - // ErrCodeResourceLimitExceededException for service response error code - // "ResourceLimitExceededException". - // - // Your resource limits have been exceeded. - ErrCodeResourceLimitExceededException = "ResourceLimitExceededException" - - // ErrCodeServerInternalException for service response error code - // "ServerInternalException". - // - // The server experienced an internal error. Try again. - ErrCodeServerInternalException = "ServerInternalException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/licensemanager/service.go b/vendor/github.com/aws/aws-sdk-go/service/licensemanager/service.go deleted file mode 100644 index 5a8fc9965..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/licensemanager/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package licensemanager - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// LicenseManager provides the API operation methods for making requests to -// AWS License Manager. See this package's package overview docs -// for details on the service. -// -// LicenseManager methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type LicenseManager 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 = "License Manager" // Name of service. - EndpointsID = "license-manager" // ID to lookup a service endpoint with. - ServiceID = "License Manager" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the LicenseManager 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 LicenseManager client from just a session. -// svc := licensemanager.New(mySession) -// -// // Create a LicenseManager client with additional configuration -// svc := licensemanager.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *LicenseManager { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *LicenseManager { - svc := &LicenseManager{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-08-01", - JSONVersion: "1.1", - TargetPrefix: "AWSLicenseManager", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a LicenseManager operation and runs any -// custom request initialization. -func (c *LicenseManager) 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/lightsail/api.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go deleted file mode 100644 index c838d7734..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go +++ /dev/null @@ -1,24024 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package lightsail - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" -) - -const opAllocateStaticIp = "AllocateStaticIp" - -// AllocateStaticIpRequest generates a "aws/request.Request" representing the -// client's request for the AllocateStaticIp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AllocateStaticIp for more information on using the AllocateStaticIp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AllocateStaticIpRequest method. -// req, resp := client.AllocateStaticIpRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AllocateStaticIp -func (c *Lightsail) AllocateStaticIpRequest(input *AllocateStaticIpInput) (req *request.Request, output *AllocateStaticIpOutput) { - op := &request.Operation{ - Name: opAllocateStaticIp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AllocateStaticIpInput{} - } - - output = &AllocateStaticIpOutput{} - req = c.newRequest(op, input, output) - return -} - -// AllocateStaticIp API operation for Amazon Lightsail. -// -// Allocates a static IP address. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation AllocateStaticIp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AllocateStaticIp -func (c *Lightsail) AllocateStaticIp(input *AllocateStaticIpInput) (*AllocateStaticIpOutput, error) { - req, out := c.AllocateStaticIpRequest(input) - return out, req.Send() -} - -// AllocateStaticIpWithContext is the same as AllocateStaticIp with the addition of -// the ability to pass a context and additional request options. -// -// See AllocateStaticIp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) AllocateStaticIpWithContext(ctx aws.Context, input *AllocateStaticIpInput, opts ...request.Option) (*AllocateStaticIpOutput, error) { - req, out := c.AllocateStaticIpRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachDisk = "AttachDisk" - -// AttachDiskRequest generates a "aws/request.Request" representing the -// client's request for the AttachDisk operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachDisk for more information on using the AttachDisk -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachDiskRequest method. -// req, resp := client.AttachDiskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AttachDisk -func (c *Lightsail) AttachDiskRequest(input *AttachDiskInput) (req *request.Request, output *AttachDiskOutput) { - op := &request.Operation{ - Name: opAttachDisk, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachDiskInput{} - } - - output = &AttachDiskOutput{} - req = c.newRequest(op, input, output) - return -} - -// AttachDisk API operation for Amazon Lightsail. -// -// Attaches a block storage disk to a running or stopped Lightsail instance -// and exposes it to the instance with the specified disk name. -// -// The attach disk operation supports tag-based access control via resource -// tags applied to the resource identified by diskName. For more information, -// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation AttachDisk for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AttachDisk -func (c *Lightsail) AttachDisk(input *AttachDiskInput) (*AttachDiskOutput, error) { - req, out := c.AttachDiskRequest(input) - return out, req.Send() -} - -// AttachDiskWithContext is the same as AttachDisk with the addition of -// the ability to pass a context and additional request options. -// -// See AttachDisk for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) AttachDiskWithContext(ctx aws.Context, input *AttachDiskInput, opts ...request.Option) (*AttachDiskOutput, error) { - req, out := c.AttachDiskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachInstancesToLoadBalancer = "AttachInstancesToLoadBalancer" - -// AttachInstancesToLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the AttachInstancesToLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachInstancesToLoadBalancer for more information on using the AttachInstancesToLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachInstancesToLoadBalancerRequest method. -// req, resp := client.AttachInstancesToLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AttachInstancesToLoadBalancer -func (c *Lightsail) AttachInstancesToLoadBalancerRequest(input *AttachInstancesToLoadBalancerInput) (req *request.Request, output *AttachInstancesToLoadBalancerOutput) { - op := &request.Operation{ - Name: opAttachInstancesToLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachInstancesToLoadBalancerInput{} - } - - output = &AttachInstancesToLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// AttachInstancesToLoadBalancer API operation for Amazon Lightsail. -// -// Attaches one or more Lightsail instances to a load balancer. -// -// After some time, the instances are attached to the load balancer and the -// health check status is available. -// -// The attach instances to load balancer operation supports tag-based access -// control via resource tags applied to the resource identified by loadBalancerName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation AttachInstancesToLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AttachInstancesToLoadBalancer -func (c *Lightsail) AttachInstancesToLoadBalancer(input *AttachInstancesToLoadBalancerInput) (*AttachInstancesToLoadBalancerOutput, error) { - req, out := c.AttachInstancesToLoadBalancerRequest(input) - return out, req.Send() -} - -// AttachInstancesToLoadBalancerWithContext is the same as AttachInstancesToLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See AttachInstancesToLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) AttachInstancesToLoadBalancerWithContext(ctx aws.Context, input *AttachInstancesToLoadBalancerInput, opts ...request.Option) (*AttachInstancesToLoadBalancerOutput, error) { - req, out := c.AttachInstancesToLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachLoadBalancerTlsCertificate = "AttachLoadBalancerTlsCertificate" - -// AttachLoadBalancerTlsCertificateRequest generates a "aws/request.Request" representing the -// client's request for the AttachLoadBalancerTlsCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachLoadBalancerTlsCertificate for more information on using the AttachLoadBalancerTlsCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachLoadBalancerTlsCertificateRequest method. -// req, resp := client.AttachLoadBalancerTlsCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AttachLoadBalancerTlsCertificate -func (c *Lightsail) AttachLoadBalancerTlsCertificateRequest(input *AttachLoadBalancerTlsCertificateInput) (req *request.Request, output *AttachLoadBalancerTlsCertificateOutput) { - op := &request.Operation{ - Name: opAttachLoadBalancerTlsCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachLoadBalancerTlsCertificateInput{} - } - - output = &AttachLoadBalancerTlsCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// AttachLoadBalancerTlsCertificate API operation for Amazon Lightsail. -// -// Attaches a Transport Layer Security (TLS) certificate to your load balancer. -// TLS is just an updated, more secure version of Secure Socket Layer (SSL). -// -// Once you create and validate your certificate, you can attach it to your -// load balancer. You can also use this API to rotate the certificates on your -// account. Use the AttachLoadBalancerTlsCertificate operation with the non-attached -// certificate, and it will replace the existing one and become the attached -// certificate. -// -// The attach load balancer tls certificate operation supports tag-based access -// control via resource tags applied to the resource identified by loadBalancerName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation AttachLoadBalancerTlsCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AttachLoadBalancerTlsCertificate -func (c *Lightsail) AttachLoadBalancerTlsCertificate(input *AttachLoadBalancerTlsCertificateInput) (*AttachLoadBalancerTlsCertificateOutput, error) { - req, out := c.AttachLoadBalancerTlsCertificateRequest(input) - return out, req.Send() -} - -// AttachLoadBalancerTlsCertificateWithContext is the same as AttachLoadBalancerTlsCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See AttachLoadBalancerTlsCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) AttachLoadBalancerTlsCertificateWithContext(ctx aws.Context, input *AttachLoadBalancerTlsCertificateInput, opts ...request.Option) (*AttachLoadBalancerTlsCertificateOutput, error) { - req, out := c.AttachLoadBalancerTlsCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachStaticIp = "AttachStaticIp" - -// AttachStaticIpRequest generates a "aws/request.Request" representing the -// client's request for the AttachStaticIp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachStaticIp for more information on using the AttachStaticIp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachStaticIpRequest method. -// req, resp := client.AttachStaticIpRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AttachStaticIp -func (c *Lightsail) AttachStaticIpRequest(input *AttachStaticIpInput) (req *request.Request, output *AttachStaticIpOutput) { - op := &request.Operation{ - Name: opAttachStaticIp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachStaticIpInput{} - } - - output = &AttachStaticIpOutput{} - req = c.newRequest(op, input, output) - return -} - -// AttachStaticIp API operation for Amazon Lightsail. -// -// Attaches a static IP address to a specific Amazon Lightsail instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation AttachStaticIp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AttachStaticIp -func (c *Lightsail) AttachStaticIp(input *AttachStaticIpInput) (*AttachStaticIpOutput, error) { - req, out := c.AttachStaticIpRequest(input) - return out, req.Send() -} - -// AttachStaticIpWithContext is the same as AttachStaticIp with the addition of -// the ability to pass a context and additional request options. -// -// See AttachStaticIp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) AttachStaticIpWithContext(ctx aws.Context, input *AttachStaticIpInput, opts ...request.Option) (*AttachStaticIpOutput, error) { - req, out := c.AttachStaticIpRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCloseInstancePublicPorts = "CloseInstancePublicPorts" - -// CloseInstancePublicPortsRequest generates a "aws/request.Request" representing the -// client's request for the CloseInstancePublicPorts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CloseInstancePublicPorts for more information on using the CloseInstancePublicPorts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CloseInstancePublicPortsRequest method. -// req, resp := client.CloseInstancePublicPortsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CloseInstancePublicPorts -func (c *Lightsail) CloseInstancePublicPortsRequest(input *CloseInstancePublicPortsInput) (req *request.Request, output *CloseInstancePublicPortsOutput) { - op := &request.Operation{ - Name: opCloseInstancePublicPorts, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CloseInstancePublicPortsInput{} - } - - output = &CloseInstancePublicPortsOutput{} - req = c.newRequest(op, input, output) - return -} - -// CloseInstancePublicPorts API operation for Amazon Lightsail. -// -// Closes the public ports on a specific Amazon Lightsail instance. -// -// The close instance public ports operation supports tag-based access control -// via resource tags applied to the resource identified by instanceName. For -// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CloseInstancePublicPorts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CloseInstancePublicPorts -func (c *Lightsail) CloseInstancePublicPorts(input *CloseInstancePublicPortsInput) (*CloseInstancePublicPortsOutput, error) { - req, out := c.CloseInstancePublicPortsRequest(input) - return out, req.Send() -} - -// CloseInstancePublicPortsWithContext is the same as CloseInstancePublicPorts with the addition of -// the ability to pass a context and additional request options. -// -// See CloseInstancePublicPorts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CloseInstancePublicPortsWithContext(ctx aws.Context, input *CloseInstancePublicPortsInput, opts ...request.Option) (*CloseInstancePublicPortsOutput, error) { - req, out := c.CloseInstancePublicPortsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopySnapshot = "CopySnapshot" - -// CopySnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CopySnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopySnapshot for more information on using the CopySnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopySnapshotRequest method. -// req, resp := client.CopySnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CopySnapshot -func (c *Lightsail) CopySnapshotRequest(input *CopySnapshotInput) (req *request.Request, output *CopySnapshotOutput) { - op := &request.Operation{ - Name: opCopySnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopySnapshotInput{} - } - - output = &CopySnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopySnapshot API operation for Amazon Lightsail. -// -// Copies an instance or disk snapshot from one AWS Region to another in Amazon -// Lightsail. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CopySnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CopySnapshot -func (c *Lightsail) CopySnapshot(input *CopySnapshotInput) (*CopySnapshotOutput, error) { - req, out := c.CopySnapshotRequest(input) - return out, req.Send() -} - -// CopySnapshotWithContext is the same as CopySnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CopySnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CopySnapshotWithContext(ctx aws.Context, input *CopySnapshotInput, opts ...request.Option) (*CopySnapshotOutput, error) { - req, out := c.CopySnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCloudFormationStack = "CreateCloudFormationStack" - -// CreateCloudFormationStackRequest generates a "aws/request.Request" representing the -// client's request for the CreateCloudFormationStack operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCloudFormationStack for more information on using the CreateCloudFormationStack -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCloudFormationStackRequest method. -// req, resp := client.CreateCloudFormationStackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateCloudFormationStack -func (c *Lightsail) CreateCloudFormationStackRequest(input *CreateCloudFormationStackInput) (req *request.Request, output *CreateCloudFormationStackOutput) { - op := &request.Operation{ - Name: opCreateCloudFormationStack, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCloudFormationStackInput{} - } - - output = &CreateCloudFormationStackOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCloudFormationStack API operation for Amazon Lightsail. -// -// Creates an AWS CloudFormation stack, which creates a new Amazon EC2 instance -// from an exported Amazon Lightsail snapshot. This operation results in a CloudFormation -// stack record that can be used to track the AWS CloudFormation stack created. -// Use the get cloud formation stack records operation to get a list of the -// CloudFormation stacks created. -// -// Wait until after your new Amazon EC2 instance is created before running the -// create cloud formation stack operation again with the same export snapshot -// record. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateCloudFormationStack for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateCloudFormationStack -func (c *Lightsail) CreateCloudFormationStack(input *CreateCloudFormationStackInput) (*CreateCloudFormationStackOutput, error) { - req, out := c.CreateCloudFormationStackRequest(input) - return out, req.Send() -} - -// CreateCloudFormationStackWithContext is the same as CreateCloudFormationStack with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCloudFormationStack for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateCloudFormationStackWithContext(ctx aws.Context, input *CreateCloudFormationStackInput, opts ...request.Option) (*CreateCloudFormationStackOutput, error) { - req, out := c.CreateCloudFormationStackRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDisk = "CreateDisk" - -// CreateDiskRequest generates a "aws/request.Request" representing the -// client's request for the CreateDisk operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDisk for more information on using the CreateDisk -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDiskRequest method. -// req, resp := client.CreateDiskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDisk -func (c *Lightsail) CreateDiskRequest(input *CreateDiskInput) (req *request.Request, output *CreateDiskOutput) { - op := &request.Operation{ - Name: opCreateDisk, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDiskInput{} - } - - output = &CreateDiskOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDisk API operation for Amazon Lightsail. -// -// Creates a block storage disk that can be attached to a Lightsail instance -// in the same Availability Zone (e.g., us-east-2a). The disk is created in -// the regional endpoint that you send the HTTP request to. For more information, -// see Regions and Availability Zones in Lightsail (https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail). -// -// The create disk operation supports tag-based access control via request tags. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateDisk for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDisk -func (c *Lightsail) CreateDisk(input *CreateDiskInput) (*CreateDiskOutput, error) { - req, out := c.CreateDiskRequest(input) - return out, req.Send() -} - -// CreateDiskWithContext is the same as CreateDisk with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDisk for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateDiskWithContext(ctx aws.Context, input *CreateDiskInput, opts ...request.Option) (*CreateDiskOutput, error) { - req, out := c.CreateDiskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDiskFromSnapshot = "CreateDiskFromSnapshot" - -// CreateDiskFromSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateDiskFromSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDiskFromSnapshot for more information on using the CreateDiskFromSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDiskFromSnapshotRequest method. -// req, resp := client.CreateDiskFromSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskFromSnapshot -func (c *Lightsail) CreateDiskFromSnapshotRequest(input *CreateDiskFromSnapshotInput) (req *request.Request, output *CreateDiskFromSnapshotOutput) { - op := &request.Operation{ - Name: opCreateDiskFromSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDiskFromSnapshotInput{} - } - - output = &CreateDiskFromSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDiskFromSnapshot API operation for Amazon Lightsail. -// -// Creates a block storage disk from a disk snapshot that can be attached to -// a Lightsail instance in the same Availability Zone (e.g., us-east-2a). The -// disk is created in the regional endpoint that you send the HTTP request to. -// For more information, see Regions and Availability Zones in Lightsail (https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail). -// -// The create disk from snapshot operation supports tag-based access control -// via request tags and resource tags applied to the resource identified by -// diskSnapshotName. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateDiskFromSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskFromSnapshot -func (c *Lightsail) CreateDiskFromSnapshot(input *CreateDiskFromSnapshotInput) (*CreateDiskFromSnapshotOutput, error) { - req, out := c.CreateDiskFromSnapshotRequest(input) - return out, req.Send() -} - -// CreateDiskFromSnapshotWithContext is the same as CreateDiskFromSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDiskFromSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateDiskFromSnapshotWithContext(ctx aws.Context, input *CreateDiskFromSnapshotInput, opts ...request.Option) (*CreateDiskFromSnapshotOutput, error) { - req, out := c.CreateDiskFromSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDiskSnapshot = "CreateDiskSnapshot" - -// CreateDiskSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateDiskSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDiskSnapshot for more information on using the CreateDiskSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDiskSnapshotRequest method. -// req, resp := client.CreateDiskSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskSnapshot -func (c *Lightsail) CreateDiskSnapshotRequest(input *CreateDiskSnapshotInput) (req *request.Request, output *CreateDiskSnapshotOutput) { - op := &request.Operation{ - Name: opCreateDiskSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDiskSnapshotInput{} - } - - output = &CreateDiskSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDiskSnapshot API operation for Amazon Lightsail. -// -// Creates a snapshot of a block storage disk. You can use snapshots for backups, -// to make copies of disks, and to save data before shutting down a Lightsail -// instance. -// -// You can take a snapshot of an attached disk that is in use; however, snapshots -// only capture data that has been written to your disk at the time the snapshot -// command is issued. This may exclude any data that has been cached by any -// applications or the operating system. If you can pause any file systems on -// the disk long enough to take a snapshot, your snapshot should be complete. -// Nevertheless, if you cannot pause all file writes to the disk, you should -// unmount the disk from within the Lightsail instance, issue the create disk -// snapshot command, and then remount the disk to ensure a consistent and complete -// snapshot. You may remount and use your disk while the snapshot status is -// pending. -// -// You can also use this operation to create a snapshot of an instance's system -// volume. You might want to do this, for example, to recover data from the -// system volume of a botched instance or to create a backup of the system volume -// like you would for a block storage disk. To create a snapshot of a system -// volume, just define the instance name parameter when issuing the snapshot -// command, and a snapshot of the defined instance's system volume will be created. -// After the snapshot is available, you can create a block storage disk from -// the snapshot and attach it to a running instance to access the data on the -// disk. -// -// The create disk snapshot operation supports tag-based access control via -// request tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateDiskSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskSnapshot -func (c *Lightsail) CreateDiskSnapshot(input *CreateDiskSnapshotInput) (*CreateDiskSnapshotOutput, error) { - req, out := c.CreateDiskSnapshotRequest(input) - return out, req.Send() -} - -// CreateDiskSnapshotWithContext is the same as CreateDiskSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDiskSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateDiskSnapshotWithContext(ctx aws.Context, input *CreateDiskSnapshotInput, opts ...request.Option) (*CreateDiskSnapshotOutput, error) { - req, out := c.CreateDiskSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDomain = "CreateDomain" - -// CreateDomainRequest generates a "aws/request.Request" representing the -// client's request for the CreateDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDomain for more information on using the CreateDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDomainRequest method. -// req, resp := client.CreateDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDomain -func (c *Lightsail) CreateDomainRequest(input *CreateDomainInput) (req *request.Request, output *CreateDomainOutput) { - op := &request.Operation{ - Name: opCreateDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDomainInput{} - } - - output = &CreateDomainOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDomain API operation for Amazon Lightsail. -// -// Creates a domain resource for the specified domain (e.g., example.com). -// -// The create domain operation supports tag-based access control via request -// tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDomain -func (c *Lightsail) CreateDomain(input *CreateDomainInput) (*CreateDomainOutput, error) { - req, out := c.CreateDomainRequest(input) - return out, req.Send() -} - -// CreateDomainWithContext is the same as CreateDomain with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateDomainWithContext(ctx aws.Context, input *CreateDomainInput, opts ...request.Option) (*CreateDomainOutput, error) { - req, out := c.CreateDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDomainEntry = "CreateDomainEntry" - -// CreateDomainEntryRequest generates a "aws/request.Request" representing the -// client's request for the CreateDomainEntry operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDomainEntry for more information on using the CreateDomainEntry -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDomainEntryRequest method. -// req, resp := client.CreateDomainEntryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDomainEntry -func (c *Lightsail) CreateDomainEntryRequest(input *CreateDomainEntryInput) (req *request.Request, output *CreateDomainEntryOutput) { - op := &request.Operation{ - Name: opCreateDomainEntry, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDomainEntryInput{} - } - - output = &CreateDomainEntryOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDomainEntry API operation for Amazon Lightsail. -// -// Creates one of the following entry records associated with the domain: A -// record, CNAME record, TXT record, or MX record. -// -// The create domain entry operation supports tag-based access control via resource -// tags applied to the resource identified by domainName. For more information, -// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateDomainEntry for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDomainEntry -func (c *Lightsail) CreateDomainEntry(input *CreateDomainEntryInput) (*CreateDomainEntryOutput, error) { - req, out := c.CreateDomainEntryRequest(input) - return out, req.Send() -} - -// CreateDomainEntryWithContext is the same as CreateDomainEntry with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDomainEntry for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateDomainEntryWithContext(ctx aws.Context, input *CreateDomainEntryInput, opts ...request.Option) (*CreateDomainEntryOutput, error) { - req, out := c.CreateDomainEntryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateInstanceSnapshot = "CreateInstanceSnapshot" - -// CreateInstanceSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateInstanceSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateInstanceSnapshot for more information on using the CreateInstanceSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateInstanceSnapshotRequest method. -// req, resp := client.CreateInstanceSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateInstanceSnapshot -func (c *Lightsail) CreateInstanceSnapshotRequest(input *CreateInstanceSnapshotInput) (req *request.Request, output *CreateInstanceSnapshotOutput) { - op := &request.Operation{ - Name: opCreateInstanceSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateInstanceSnapshotInput{} - } - - output = &CreateInstanceSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateInstanceSnapshot API operation for Amazon Lightsail. -// -// Creates a snapshot of a specific virtual private server, or instance. You -// can use a snapshot to create a new instance that is based on that snapshot. -// -// The create instance snapshot operation supports tag-based access control -// via request tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateInstanceSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateInstanceSnapshot -func (c *Lightsail) CreateInstanceSnapshot(input *CreateInstanceSnapshotInput) (*CreateInstanceSnapshotOutput, error) { - req, out := c.CreateInstanceSnapshotRequest(input) - return out, req.Send() -} - -// CreateInstanceSnapshotWithContext is the same as CreateInstanceSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInstanceSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateInstanceSnapshotWithContext(ctx aws.Context, input *CreateInstanceSnapshotInput, opts ...request.Option) (*CreateInstanceSnapshotOutput, error) { - req, out := c.CreateInstanceSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateInstances = "CreateInstances" - -// CreateInstancesRequest generates a "aws/request.Request" representing the -// client's request for the CreateInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateInstances for more information on using the CreateInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateInstancesRequest method. -// req, resp := client.CreateInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateInstances -func (c *Lightsail) CreateInstancesRequest(input *CreateInstancesInput) (req *request.Request, output *CreateInstancesOutput) { - op := &request.Operation{ - Name: opCreateInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateInstancesInput{} - } - - output = &CreateInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateInstances API operation for Amazon Lightsail. -// -// Creates one or more Amazon Lightsail virtual private servers, or instances. -// Create instances using active blueprints. Inactive blueprints are listed -// to support customers with existing instances but are not necessarily available -// for launch of new instances. Blueprints are marked inactive when they become -// outdated due to operating system updates or new application releases. Use -// the get blueprints operation to return a list of available blueprints. -// -// The create instances operation supports tag-based access control via request -// tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateInstances -func (c *Lightsail) CreateInstances(input *CreateInstancesInput) (*CreateInstancesOutput, error) { - req, out := c.CreateInstancesRequest(input) - return out, req.Send() -} - -// CreateInstancesWithContext is the same as CreateInstances with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateInstancesWithContext(ctx aws.Context, input *CreateInstancesInput, opts ...request.Option) (*CreateInstancesOutput, error) { - req, out := c.CreateInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateInstancesFromSnapshot = "CreateInstancesFromSnapshot" - -// CreateInstancesFromSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateInstancesFromSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateInstancesFromSnapshot for more information on using the CreateInstancesFromSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateInstancesFromSnapshotRequest method. -// req, resp := client.CreateInstancesFromSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateInstancesFromSnapshot -func (c *Lightsail) CreateInstancesFromSnapshotRequest(input *CreateInstancesFromSnapshotInput) (req *request.Request, output *CreateInstancesFromSnapshotOutput) { - op := &request.Operation{ - Name: opCreateInstancesFromSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateInstancesFromSnapshotInput{} - } - - output = &CreateInstancesFromSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateInstancesFromSnapshot API operation for Amazon Lightsail. -// -// Uses a specific snapshot as a blueprint for creating one or more new instances -// that are based on that identical configuration. -// -// The create instances from snapshot operation supports tag-based access control -// via request tags and resource tags applied to the resource identified by -// instanceSnapshotName. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateInstancesFromSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateInstancesFromSnapshot -func (c *Lightsail) CreateInstancesFromSnapshot(input *CreateInstancesFromSnapshotInput) (*CreateInstancesFromSnapshotOutput, error) { - req, out := c.CreateInstancesFromSnapshotRequest(input) - return out, req.Send() -} - -// CreateInstancesFromSnapshotWithContext is the same as CreateInstancesFromSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInstancesFromSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateInstancesFromSnapshotWithContext(ctx aws.Context, input *CreateInstancesFromSnapshotInput, opts ...request.Option) (*CreateInstancesFromSnapshotOutput, error) { - req, out := c.CreateInstancesFromSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateKeyPair = "CreateKeyPair" - -// CreateKeyPairRequest generates a "aws/request.Request" representing the -// client's request for the CreateKeyPair operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateKeyPair for more information on using the CreateKeyPair -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateKeyPairRequest method. -// req, resp := client.CreateKeyPairRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateKeyPair -func (c *Lightsail) CreateKeyPairRequest(input *CreateKeyPairInput) (req *request.Request, output *CreateKeyPairOutput) { - op := &request.Operation{ - Name: opCreateKeyPair, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateKeyPairInput{} - } - - output = &CreateKeyPairOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateKeyPair API operation for Amazon Lightsail. -// -// Creates an SSH key pair. -// -// The create key pair operation supports tag-based access control via request -// tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateKeyPair for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateKeyPair -func (c *Lightsail) CreateKeyPair(input *CreateKeyPairInput) (*CreateKeyPairOutput, error) { - req, out := c.CreateKeyPairRequest(input) - return out, req.Send() -} - -// CreateKeyPairWithContext is the same as CreateKeyPair with the addition of -// the ability to pass a context and additional request options. -// -// See CreateKeyPair for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateKeyPairWithContext(ctx aws.Context, input *CreateKeyPairInput, opts ...request.Option) (*CreateKeyPairOutput, error) { - req, out := c.CreateKeyPairRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLoadBalancer = "CreateLoadBalancer" - -// CreateLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the CreateLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLoadBalancer for more information on using the CreateLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLoadBalancerRequest method. -// req, resp := client.CreateLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateLoadBalancer -func (c *Lightsail) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *request.Request, output *CreateLoadBalancerOutput) { - op := &request.Operation{ - Name: opCreateLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLoadBalancerInput{} - } - - output = &CreateLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLoadBalancer API operation for Amazon Lightsail. -// -// Creates a Lightsail load balancer. To learn more about deciding whether to -// load balance your application, see Configure your Lightsail instances for -// load balancing (https://lightsail.aws.amazon.com/ls/docs/how-to/article/configure-lightsail-instances-for-load-balancing). -// You can create up to 5 load balancers per AWS Region in your account. -// -// When you create a load balancer, you can specify a unique name and port settings. -// To change additional load balancer settings, use the UpdateLoadBalancerAttribute -// operation. -// -// The create load balancer operation supports tag-based access control via -// request tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateLoadBalancer -func (c *Lightsail) CreateLoadBalancer(input *CreateLoadBalancerInput) (*CreateLoadBalancerOutput, error) { - req, out := c.CreateLoadBalancerRequest(input) - return out, req.Send() -} - -// CreateLoadBalancerWithContext is the same as CreateLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateLoadBalancerWithContext(ctx aws.Context, input *CreateLoadBalancerInput, opts ...request.Option) (*CreateLoadBalancerOutput, error) { - req, out := c.CreateLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLoadBalancerTlsCertificate = "CreateLoadBalancerTlsCertificate" - -// CreateLoadBalancerTlsCertificateRequest generates a "aws/request.Request" representing the -// client's request for the CreateLoadBalancerTlsCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLoadBalancerTlsCertificate for more information on using the CreateLoadBalancerTlsCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLoadBalancerTlsCertificateRequest method. -// req, resp := client.CreateLoadBalancerTlsCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateLoadBalancerTlsCertificate -func (c *Lightsail) CreateLoadBalancerTlsCertificateRequest(input *CreateLoadBalancerTlsCertificateInput) (req *request.Request, output *CreateLoadBalancerTlsCertificateOutput) { - op := &request.Operation{ - Name: opCreateLoadBalancerTlsCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLoadBalancerTlsCertificateInput{} - } - - output = &CreateLoadBalancerTlsCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLoadBalancerTlsCertificate API operation for Amazon Lightsail. -// -// Creates a Lightsail load balancer TLS certificate. -// -// TLS is just an updated, more secure version of Secure Socket Layer (SSL). -// -// The create load balancer tls certificate operation supports tag-based access -// control via resource tags applied to the resource identified by loadBalancerName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateLoadBalancerTlsCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateLoadBalancerTlsCertificate -func (c *Lightsail) CreateLoadBalancerTlsCertificate(input *CreateLoadBalancerTlsCertificateInput) (*CreateLoadBalancerTlsCertificateOutput, error) { - req, out := c.CreateLoadBalancerTlsCertificateRequest(input) - return out, req.Send() -} - -// CreateLoadBalancerTlsCertificateWithContext is the same as CreateLoadBalancerTlsCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLoadBalancerTlsCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateLoadBalancerTlsCertificateWithContext(ctx aws.Context, input *CreateLoadBalancerTlsCertificateInput, opts ...request.Option) (*CreateLoadBalancerTlsCertificateOutput, error) { - req, out := c.CreateLoadBalancerTlsCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRelationalDatabase = "CreateRelationalDatabase" - -// CreateRelationalDatabaseRequest generates a "aws/request.Request" representing the -// client's request for the CreateRelationalDatabase operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRelationalDatabase for more information on using the CreateRelationalDatabase -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRelationalDatabaseRequest method. -// req, resp := client.CreateRelationalDatabaseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabase -func (c *Lightsail) CreateRelationalDatabaseRequest(input *CreateRelationalDatabaseInput) (req *request.Request, output *CreateRelationalDatabaseOutput) { - op := &request.Operation{ - Name: opCreateRelationalDatabase, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRelationalDatabaseInput{} - } - - output = &CreateRelationalDatabaseOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRelationalDatabase API operation for Amazon Lightsail. -// -// Creates a new database in Amazon Lightsail. -// -// The create relational database operation supports tag-based access control -// via request tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateRelationalDatabase for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabase -func (c *Lightsail) CreateRelationalDatabase(input *CreateRelationalDatabaseInput) (*CreateRelationalDatabaseOutput, error) { - req, out := c.CreateRelationalDatabaseRequest(input) - return out, req.Send() -} - -// CreateRelationalDatabaseWithContext is the same as CreateRelationalDatabase with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRelationalDatabase for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateRelationalDatabaseWithContext(ctx aws.Context, input *CreateRelationalDatabaseInput, opts ...request.Option) (*CreateRelationalDatabaseOutput, error) { - req, out := c.CreateRelationalDatabaseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRelationalDatabaseFromSnapshot = "CreateRelationalDatabaseFromSnapshot" - -// CreateRelationalDatabaseFromSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateRelationalDatabaseFromSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRelationalDatabaseFromSnapshot for more information on using the CreateRelationalDatabaseFromSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRelationalDatabaseFromSnapshotRequest method. -// req, resp := client.CreateRelationalDatabaseFromSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabaseFromSnapshot -func (c *Lightsail) CreateRelationalDatabaseFromSnapshotRequest(input *CreateRelationalDatabaseFromSnapshotInput) (req *request.Request, output *CreateRelationalDatabaseFromSnapshotOutput) { - op := &request.Operation{ - Name: opCreateRelationalDatabaseFromSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRelationalDatabaseFromSnapshotInput{} - } - - output = &CreateRelationalDatabaseFromSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRelationalDatabaseFromSnapshot API operation for Amazon Lightsail. -// -// Creates a new database from an existing database snapshot in Amazon Lightsail. -// -// You can create a new database from a snapshot in if something goes wrong -// with your original database, or to change it to a different plan, such as -// a high availability or standard plan. -// -// The create relational database from snapshot operation supports tag-based -// access control via request tags and resource tags applied to the resource -// identified by relationalDatabaseSnapshotName. For more information, see the -// Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateRelationalDatabaseFromSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabaseFromSnapshot -func (c *Lightsail) CreateRelationalDatabaseFromSnapshot(input *CreateRelationalDatabaseFromSnapshotInput) (*CreateRelationalDatabaseFromSnapshotOutput, error) { - req, out := c.CreateRelationalDatabaseFromSnapshotRequest(input) - return out, req.Send() -} - -// CreateRelationalDatabaseFromSnapshotWithContext is the same as CreateRelationalDatabaseFromSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRelationalDatabaseFromSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateRelationalDatabaseFromSnapshotWithContext(ctx aws.Context, input *CreateRelationalDatabaseFromSnapshotInput, opts ...request.Option) (*CreateRelationalDatabaseFromSnapshotOutput, error) { - req, out := c.CreateRelationalDatabaseFromSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRelationalDatabaseSnapshot = "CreateRelationalDatabaseSnapshot" - -// CreateRelationalDatabaseSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateRelationalDatabaseSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRelationalDatabaseSnapshot for more information on using the CreateRelationalDatabaseSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRelationalDatabaseSnapshotRequest method. -// req, resp := client.CreateRelationalDatabaseSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabaseSnapshot -func (c *Lightsail) CreateRelationalDatabaseSnapshotRequest(input *CreateRelationalDatabaseSnapshotInput) (req *request.Request, output *CreateRelationalDatabaseSnapshotOutput) { - op := &request.Operation{ - Name: opCreateRelationalDatabaseSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRelationalDatabaseSnapshotInput{} - } - - output = &CreateRelationalDatabaseSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRelationalDatabaseSnapshot API operation for Amazon Lightsail. -// -// Creates a snapshot of your database in Amazon Lightsail. You can use snapshots -// for backups, to make copies of a database, and to save data before deleting -// a database. -// -// The create relational database snapshot operation supports tag-based access -// control via request tags. For more information, see the Lightsail Dev Guide -// (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation CreateRelationalDatabaseSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabaseSnapshot -func (c *Lightsail) CreateRelationalDatabaseSnapshot(input *CreateRelationalDatabaseSnapshotInput) (*CreateRelationalDatabaseSnapshotOutput, error) { - req, out := c.CreateRelationalDatabaseSnapshotRequest(input) - return out, req.Send() -} - -// CreateRelationalDatabaseSnapshotWithContext is the same as CreateRelationalDatabaseSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRelationalDatabaseSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) CreateRelationalDatabaseSnapshotWithContext(ctx aws.Context, input *CreateRelationalDatabaseSnapshotInput, opts ...request.Option) (*CreateRelationalDatabaseSnapshotOutput, error) { - req, out := c.CreateRelationalDatabaseSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDisk = "DeleteDisk" - -// DeleteDiskRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDisk operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDisk for more information on using the DeleteDisk -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDiskRequest method. -// req, resp := client.DeleteDiskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDisk -func (c *Lightsail) DeleteDiskRequest(input *DeleteDiskInput) (req *request.Request, output *DeleteDiskOutput) { - op := &request.Operation{ - Name: opDeleteDisk, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDiskInput{} - } - - output = &DeleteDiskOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDisk API operation for Amazon Lightsail. -// -// Deletes the specified block storage disk. The disk must be in the available -// state (not attached to a Lightsail instance). -// -// The disk may remain in the deleting state for several minutes. -// -// The delete disk operation supports tag-based access control via resource -// tags applied to the resource identified by diskName. For more information, -// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DeleteDisk for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDisk -func (c *Lightsail) DeleteDisk(input *DeleteDiskInput) (*DeleteDiskOutput, error) { - req, out := c.DeleteDiskRequest(input) - return out, req.Send() -} - -// DeleteDiskWithContext is the same as DeleteDisk with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDisk for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DeleteDiskWithContext(ctx aws.Context, input *DeleteDiskInput, opts ...request.Option) (*DeleteDiskOutput, error) { - req, out := c.DeleteDiskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDiskSnapshot = "DeleteDiskSnapshot" - -// DeleteDiskSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDiskSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDiskSnapshot for more information on using the DeleteDiskSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDiskSnapshotRequest method. -// req, resp := client.DeleteDiskSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDiskSnapshot -func (c *Lightsail) DeleteDiskSnapshotRequest(input *DeleteDiskSnapshotInput) (req *request.Request, output *DeleteDiskSnapshotOutput) { - op := &request.Operation{ - Name: opDeleteDiskSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDiskSnapshotInput{} - } - - output = &DeleteDiskSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDiskSnapshot API operation for Amazon Lightsail. -// -// Deletes the specified disk snapshot. -// -// When you make periodic snapshots of a disk, the snapshots are incremental, -// and only the blocks on the device that have changed since your last snapshot -// are saved in the new snapshot. When you delete a snapshot, only the data -// not needed for any other snapshot is removed. So regardless of which prior -// snapshots have been deleted, all active snapshots will have access to all -// the information needed to restore the disk. -// -// The delete disk snapshot operation supports tag-based access control via -// resource tags applied to the resource identified by diskSnapshotName. For -// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DeleteDiskSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDiskSnapshot -func (c *Lightsail) DeleteDiskSnapshot(input *DeleteDiskSnapshotInput) (*DeleteDiskSnapshotOutput, error) { - req, out := c.DeleteDiskSnapshotRequest(input) - return out, req.Send() -} - -// DeleteDiskSnapshotWithContext is the same as DeleteDiskSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDiskSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DeleteDiskSnapshotWithContext(ctx aws.Context, input *DeleteDiskSnapshotInput, opts ...request.Option) (*DeleteDiskSnapshotOutput, error) { - req, out := c.DeleteDiskSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDomain = "DeleteDomain" - -// DeleteDomainRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDomain for more information on using the DeleteDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDomainRequest method. -// req, resp := client.DeleteDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDomain -func (c *Lightsail) DeleteDomainRequest(input *DeleteDomainInput) (req *request.Request, output *DeleteDomainOutput) { - op := &request.Operation{ - Name: opDeleteDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDomainInput{} - } - - output = &DeleteDomainOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDomain API operation for Amazon Lightsail. -// -// Deletes the specified domain recordset and all of its domain records. -// -// The delete domain operation supports tag-based access control via resource -// tags applied to the resource identified by domainName. For more information, -// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DeleteDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDomain -func (c *Lightsail) DeleteDomain(input *DeleteDomainInput) (*DeleteDomainOutput, error) { - req, out := c.DeleteDomainRequest(input) - return out, req.Send() -} - -// DeleteDomainWithContext is the same as DeleteDomain with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DeleteDomainWithContext(ctx aws.Context, input *DeleteDomainInput, opts ...request.Option) (*DeleteDomainOutput, error) { - req, out := c.DeleteDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDomainEntry = "DeleteDomainEntry" - -// DeleteDomainEntryRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDomainEntry operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDomainEntry for more information on using the DeleteDomainEntry -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDomainEntryRequest method. -// req, resp := client.DeleteDomainEntryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDomainEntry -func (c *Lightsail) DeleteDomainEntryRequest(input *DeleteDomainEntryInput) (req *request.Request, output *DeleteDomainEntryOutput) { - op := &request.Operation{ - Name: opDeleteDomainEntry, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDomainEntryInput{} - } - - output = &DeleteDomainEntryOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDomainEntry API operation for Amazon Lightsail. -// -// Deletes a specific domain entry. -// -// The delete domain entry operation supports tag-based access control via resource -// tags applied to the resource identified by domainName. For more information, -// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DeleteDomainEntry for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDomainEntry -func (c *Lightsail) DeleteDomainEntry(input *DeleteDomainEntryInput) (*DeleteDomainEntryOutput, error) { - req, out := c.DeleteDomainEntryRequest(input) - return out, req.Send() -} - -// DeleteDomainEntryWithContext is the same as DeleteDomainEntry with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDomainEntry for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DeleteDomainEntryWithContext(ctx aws.Context, input *DeleteDomainEntryInput, opts ...request.Option) (*DeleteDomainEntryOutput, error) { - req, out := c.DeleteDomainEntryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteInstance = "DeleteInstance" - -// DeleteInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteInstance for more information on using the DeleteInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteInstanceRequest method. -// req, resp := client.DeleteInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteInstance -func (c *Lightsail) DeleteInstanceRequest(input *DeleteInstanceInput) (req *request.Request, output *DeleteInstanceOutput) { - op := &request.Operation{ - Name: opDeleteInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteInstanceInput{} - } - - output = &DeleteInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteInstance API operation for Amazon Lightsail. -// -// Deletes a specific Amazon Lightsail virtual private server, or instance. -// -// The delete instance operation supports tag-based access control via resource -// tags applied to the resource identified by instanceName. For more information, -// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DeleteInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteInstance -func (c *Lightsail) DeleteInstance(input *DeleteInstanceInput) (*DeleteInstanceOutput, error) { - req, out := c.DeleteInstanceRequest(input) - return out, req.Send() -} - -// DeleteInstanceWithContext is the same as DeleteInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DeleteInstanceWithContext(ctx aws.Context, input *DeleteInstanceInput, opts ...request.Option) (*DeleteInstanceOutput, error) { - req, out := c.DeleteInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteInstanceSnapshot = "DeleteInstanceSnapshot" - -// DeleteInstanceSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInstanceSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteInstanceSnapshot for more information on using the DeleteInstanceSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteInstanceSnapshotRequest method. -// req, resp := client.DeleteInstanceSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteInstanceSnapshot -func (c *Lightsail) DeleteInstanceSnapshotRequest(input *DeleteInstanceSnapshotInput) (req *request.Request, output *DeleteInstanceSnapshotOutput) { - op := &request.Operation{ - Name: opDeleteInstanceSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteInstanceSnapshotInput{} - } - - output = &DeleteInstanceSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteInstanceSnapshot API operation for Amazon Lightsail. -// -// Deletes a specific snapshot of a virtual private server (or instance). -// -// The delete instance snapshot operation supports tag-based access control -// via resource tags applied to the resource identified by instanceSnapshotName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DeleteInstanceSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteInstanceSnapshot -func (c *Lightsail) DeleteInstanceSnapshot(input *DeleteInstanceSnapshotInput) (*DeleteInstanceSnapshotOutput, error) { - req, out := c.DeleteInstanceSnapshotRequest(input) - return out, req.Send() -} - -// DeleteInstanceSnapshotWithContext is the same as DeleteInstanceSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteInstanceSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DeleteInstanceSnapshotWithContext(ctx aws.Context, input *DeleteInstanceSnapshotInput, opts ...request.Option) (*DeleteInstanceSnapshotOutput, error) { - req, out := c.DeleteInstanceSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteKeyPair = "DeleteKeyPair" - -// DeleteKeyPairRequest generates a "aws/request.Request" representing the -// client's request for the DeleteKeyPair operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteKeyPair for more information on using the DeleteKeyPair -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteKeyPairRequest method. -// req, resp := client.DeleteKeyPairRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteKeyPair -func (c *Lightsail) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *request.Request, output *DeleteKeyPairOutput) { - op := &request.Operation{ - Name: opDeleteKeyPair, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteKeyPairInput{} - } - - output = &DeleteKeyPairOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteKeyPair API operation for Amazon Lightsail. -// -// Deletes a specific SSH key pair. -// -// The delete key pair operation supports tag-based access control via resource -// tags applied to the resource identified by keyPairName. For more information, -// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DeleteKeyPair for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteKeyPair -func (c *Lightsail) DeleteKeyPair(input *DeleteKeyPairInput) (*DeleteKeyPairOutput, error) { - req, out := c.DeleteKeyPairRequest(input) - return out, req.Send() -} - -// DeleteKeyPairWithContext is the same as DeleteKeyPair with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteKeyPair for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DeleteKeyPairWithContext(ctx aws.Context, input *DeleteKeyPairInput, opts ...request.Option) (*DeleteKeyPairOutput, error) { - req, out := c.DeleteKeyPairRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLoadBalancer = "DeleteLoadBalancer" - -// DeleteLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLoadBalancer for more information on using the DeleteLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLoadBalancerRequest method. -// req, resp := client.DeleteLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteLoadBalancer -func (c *Lightsail) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req *request.Request, output *DeleteLoadBalancerOutput) { - op := &request.Operation{ - Name: opDeleteLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLoadBalancerInput{} - } - - output = &DeleteLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteLoadBalancer API operation for Amazon Lightsail. -// -// Deletes a Lightsail load balancer and all its associated SSL/TLS certificates. -// Once the load balancer is deleted, you will need to create a new load balancer, -// create a new certificate, and verify domain ownership again. -// -// The delete load balancer operation supports tag-based access control via -// resource tags applied to the resource identified by loadBalancerName. For -// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DeleteLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteLoadBalancer -func (c *Lightsail) DeleteLoadBalancer(input *DeleteLoadBalancerInput) (*DeleteLoadBalancerOutput, error) { - req, out := c.DeleteLoadBalancerRequest(input) - return out, req.Send() -} - -// DeleteLoadBalancerWithContext is the same as DeleteLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DeleteLoadBalancerWithContext(ctx aws.Context, input *DeleteLoadBalancerInput, opts ...request.Option) (*DeleteLoadBalancerOutput, error) { - req, out := c.DeleteLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLoadBalancerTlsCertificate = "DeleteLoadBalancerTlsCertificate" - -// DeleteLoadBalancerTlsCertificateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoadBalancerTlsCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLoadBalancerTlsCertificate for more information on using the DeleteLoadBalancerTlsCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLoadBalancerTlsCertificateRequest method. -// req, resp := client.DeleteLoadBalancerTlsCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteLoadBalancerTlsCertificate -func (c *Lightsail) DeleteLoadBalancerTlsCertificateRequest(input *DeleteLoadBalancerTlsCertificateInput) (req *request.Request, output *DeleteLoadBalancerTlsCertificateOutput) { - op := &request.Operation{ - Name: opDeleteLoadBalancerTlsCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLoadBalancerTlsCertificateInput{} - } - - output = &DeleteLoadBalancerTlsCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteLoadBalancerTlsCertificate API operation for Amazon Lightsail. -// -// Deletes an SSL/TLS certificate associated with a Lightsail load balancer. -// -// The delete load balancer tls certificate operation supports tag-based access -// control via resource tags applied to the resource identified by loadBalancerName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DeleteLoadBalancerTlsCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteLoadBalancerTlsCertificate -func (c *Lightsail) DeleteLoadBalancerTlsCertificate(input *DeleteLoadBalancerTlsCertificateInput) (*DeleteLoadBalancerTlsCertificateOutput, error) { - req, out := c.DeleteLoadBalancerTlsCertificateRequest(input) - return out, req.Send() -} - -// DeleteLoadBalancerTlsCertificateWithContext is the same as DeleteLoadBalancerTlsCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLoadBalancerTlsCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DeleteLoadBalancerTlsCertificateWithContext(ctx aws.Context, input *DeleteLoadBalancerTlsCertificateInput, opts ...request.Option) (*DeleteLoadBalancerTlsCertificateOutput, error) { - req, out := c.DeleteLoadBalancerTlsCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRelationalDatabase = "DeleteRelationalDatabase" - -// DeleteRelationalDatabaseRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRelationalDatabase operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRelationalDatabase for more information on using the DeleteRelationalDatabase -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRelationalDatabaseRequest method. -// req, resp := client.DeleteRelationalDatabaseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteRelationalDatabase -func (c *Lightsail) DeleteRelationalDatabaseRequest(input *DeleteRelationalDatabaseInput) (req *request.Request, output *DeleteRelationalDatabaseOutput) { - op := &request.Operation{ - Name: opDeleteRelationalDatabase, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRelationalDatabaseInput{} - } - - output = &DeleteRelationalDatabaseOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRelationalDatabase API operation for Amazon Lightsail. -// -// Deletes a database in Amazon Lightsail. -// -// The delete relational database operation supports tag-based access control -// via resource tags applied to the resource identified by relationalDatabaseName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DeleteRelationalDatabase for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteRelationalDatabase -func (c *Lightsail) DeleteRelationalDatabase(input *DeleteRelationalDatabaseInput) (*DeleteRelationalDatabaseOutput, error) { - req, out := c.DeleteRelationalDatabaseRequest(input) - return out, req.Send() -} - -// DeleteRelationalDatabaseWithContext is the same as DeleteRelationalDatabase with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRelationalDatabase for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DeleteRelationalDatabaseWithContext(ctx aws.Context, input *DeleteRelationalDatabaseInput, opts ...request.Option) (*DeleteRelationalDatabaseOutput, error) { - req, out := c.DeleteRelationalDatabaseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRelationalDatabaseSnapshot = "DeleteRelationalDatabaseSnapshot" - -// DeleteRelationalDatabaseSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRelationalDatabaseSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRelationalDatabaseSnapshot for more information on using the DeleteRelationalDatabaseSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRelationalDatabaseSnapshotRequest method. -// req, resp := client.DeleteRelationalDatabaseSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteRelationalDatabaseSnapshot -func (c *Lightsail) DeleteRelationalDatabaseSnapshotRequest(input *DeleteRelationalDatabaseSnapshotInput) (req *request.Request, output *DeleteRelationalDatabaseSnapshotOutput) { - op := &request.Operation{ - Name: opDeleteRelationalDatabaseSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRelationalDatabaseSnapshotInput{} - } - - output = &DeleteRelationalDatabaseSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRelationalDatabaseSnapshot API operation for Amazon Lightsail. -// -// Deletes a database snapshot in Amazon Lightsail. -// -// The delete relational database snapshot operation supports tag-based access -// control via resource tags applied to the resource identified by relationalDatabaseName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DeleteRelationalDatabaseSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteRelationalDatabaseSnapshot -func (c *Lightsail) DeleteRelationalDatabaseSnapshot(input *DeleteRelationalDatabaseSnapshotInput) (*DeleteRelationalDatabaseSnapshotOutput, error) { - req, out := c.DeleteRelationalDatabaseSnapshotRequest(input) - return out, req.Send() -} - -// DeleteRelationalDatabaseSnapshotWithContext is the same as DeleteRelationalDatabaseSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRelationalDatabaseSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DeleteRelationalDatabaseSnapshotWithContext(ctx aws.Context, input *DeleteRelationalDatabaseSnapshotInput, opts ...request.Option) (*DeleteRelationalDatabaseSnapshotOutput, error) { - req, out := c.DeleteRelationalDatabaseSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachDisk = "DetachDisk" - -// DetachDiskRequest generates a "aws/request.Request" representing the -// client's request for the DetachDisk operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachDisk for more information on using the DetachDisk -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachDiskRequest method. -// req, resp := client.DetachDiskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachDisk -func (c *Lightsail) DetachDiskRequest(input *DetachDiskInput) (req *request.Request, output *DetachDiskOutput) { - op := &request.Operation{ - Name: opDetachDisk, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachDiskInput{} - } - - output = &DetachDiskOutput{} - req = c.newRequest(op, input, output) - return -} - -// DetachDisk API operation for Amazon Lightsail. -// -// Detaches a stopped block storage disk from a Lightsail instance. Make sure -// to unmount any file systems on the device within your operating system before -// stopping the instance and detaching the disk. -// -// The detach disk operation supports tag-based access control via resource -// tags applied to the resource identified by diskName. For more information, -// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DetachDisk for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachDisk -func (c *Lightsail) DetachDisk(input *DetachDiskInput) (*DetachDiskOutput, error) { - req, out := c.DetachDiskRequest(input) - return out, req.Send() -} - -// DetachDiskWithContext is the same as DetachDisk with the addition of -// the ability to pass a context and additional request options. -// -// See DetachDisk for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DetachDiskWithContext(ctx aws.Context, input *DetachDiskInput, opts ...request.Option) (*DetachDiskOutput, error) { - req, out := c.DetachDiskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachInstancesFromLoadBalancer = "DetachInstancesFromLoadBalancer" - -// DetachInstancesFromLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the DetachInstancesFromLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachInstancesFromLoadBalancer for more information on using the DetachInstancesFromLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachInstancesFromLoadBalancerRequest method. -// req, resp := client.DetachInstancesFromLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachInstancesFromLoadBalancer -func (c *Lightsail) DetachInstancesFromLoadBalancerRequest(input *DetachInstancesFromLoadBalancerInput) (req *request.Request, output *DetachInstancesFromLoadBalancerOutput) { - op := &request.Operation{ - Name: opDetachInstancesFromLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachInstancesFromLoadBalancerInput{} - } - - output = &DetachInstancesFromLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DetachInstancesFromLoadBalancer API operation for Amazon Lightsail. -// -// Detaches the specified instances from a Lightsail load balancer. -// -// This operation waits until the instances are no longer needed before they -// are detached from the load balancer. -// -// The detach instances from load balancer operation supports tag-based access -// control via resource tags applied to the resource identified by loadBalancerName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DetachInstancesFromLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachInstancesFromLoadBalancer -func (c *Lightsail) DetachInstancesFromLoadBalancer(input *DetachInstancesFromLoadBalancerInput) (*DetachInstancesFromLoadBalancerOutput, error) { - req, out := c.DetachInstancesFromLoadBalancerRequest(input) - return out, req.Send() -} - -// DetachInstancesFromLoadBalancerWithContext is the same as DetachInstancesFromLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See DetachInstancesFromLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DetachInstancesFromLoadBalancerWithContext(ctx aws.Context, input *DetachInstancesFromLoadBalancerInput, opts ...request.Option) (*DetachInstancesFromLoadBalancerOutput, error) { - req, out := c.DetachInstancesFromLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachStaticIp = "DetachStaticIp" - -// DetachStaticIpRequest generates a "aws/request.Request" representing the -// client's request for the DetachStaticIp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachStaticIp for more information on using the DetachStaticIp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachStaticIpRequest method. -// req, resp := client.DetachStaticIpRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachStaticIp -func (c *Lightsail) DetachStaticIpRequest(input *DetachStaticIpInput) (req *request.Request, output *DetachStaticIpOutput) { - op := &request.Operation{ - Name: opDetachStaticIp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachStaticIpInput{} - } - - output = &DetachStaticIpOutput{} - req = c.newRequest(op, input, output) - return -} - -// DetachStaticIp API operation for Amazon Lightsail. -// -// Detaches a static IP from the Amazon Lightsail instance to which it is attached. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DetachStaticIp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachStaticIp -func (c *Lightsail) DetachStaticIp(input *DetachStaticIpInput) (*DetachStaticIpOutput, error) { - req, out := c.DetachStaticIpRequest(input) - return out, req.Send() -} - -// DetachStaticIpWithContext is the same as DetachStaticIp with the addition of -// the ability to pass a context and additional request options. -// -// See DetachStaticIp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DetachStaticIpWithContext(ctx aws.Context, input *DetachStaticIpInput, opts ...request.Option) (*DetachStaticIpOutput, error) { - req, out := c.DetachStaticIpRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDownloadDefaultKeyPair = "DownloadDefaultKeyPair" - -// DownloadDefaultKeyPairRequest generates a "aws/request.Request" representing the -// client's request for the DownloadDefaultKeyPair operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DownloadDefaultKeyPair for more information on using the DownloadDefaultKeyPair -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DownloadDefaultKeyPairRequest method. -// req, resp := client.DownloadDefaultKeyPairRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DownloadDefaultKeyPair -func (c *Lightsail) DownloadDefaultKeyPairRequest(input *DownloadDefaultKeyPairInput) (req *request.Request, output *DownloadDefaultKeyPairOutput) { - op := &request.Operation{ - Name: opDownloadDefaultKeyPair, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DownloadDefaultKeyPairInput{} - } - - output = &DownloadDefaultKeyPairOutput{} - req = c.newRequest(op, input, output) - return -} - -// DownloadDefaultKeyPair API operation for Amazon Lightsail. -// -// Downloads the default SSH key pair from the user's account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation DownloadDefaultKeyPair for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DownloadDefaultKeyPair -func (c *Lightsail) DownloadDefaultKeyPair(input *DownloadDefaultKeyPairInput) (*DownloadDefaultKeyPairOutput, error) { - req, out := c.DownloadDefaultKeyPairRequest(input) - return out, req.Send() -} - -// DownloadDefaultKeyPairWithContext is the same as DownloadDefaultKeyPair with the addition of -// the ability to pass a context and additional request options. -// -// See DownloadDefaultKeyPair for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) DownloadDefaultKeyPairWithContext(ctx aws.Context, input *DownloadDefaultKeyPairInput, opts ...request.Option) (*DownloadDefaultKeyPairOutput, error) { - req, out := c.DownloadDefaultKeyPairRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opExportSnapshot = "ExportSnapshot" - -// ExportSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the ExportSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ExportSnapshot for more information on using the ExportSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ExportSnapshotRequest method. -// req, resp := client.ExportSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ExportSnapshot -func (c *Lightsail) ExportSnapshotRequest(input *ExportSnapshotInput) (req *request.Request, output *ExportSnapshotOutput) { - op := &request.Operation{ - Name: opExportSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ExportSnapshotInput{} - } - - output = &ExportSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// ExportSnapshot API operation for Amazon Lightsail. -// -// Exports an Amazon Lightsail instance or block storage disk snapshot to Amazon -// Elastic Compute Cloud (Amazon EC2). This operation results in an export snapshot -// record that can be used with the create cloud formation stack operation to -// create new Amazon EC2 instances. -// -// Exported instance snapshots appear in Amazon EC2 as Amazon Machine Images -// (AMIs), and the instance system disk appears as an Amazon Elastic Block Store -// (Amazon EBS) volume. Exported disk snapshots appear in Amazon EC2 as Amazon -// EBS volumes. Snapshots are exported to the same Amazon Web Services Region -// in Amazon EC2 as the source Lightsail snapshot. -// -// The export snapshotoperation supports tag-based access control via resource tags applied to -// the resource identified by sourceSnapshotName. For more information, see -// the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Use the get instance snapshots or get disk snapshots operations to get a -// list of snapshots that you can export to Amazon EC2. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation ExportSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ExportSnapshot -func (c *Lightsail) ExportSnapshot(input *ExportSnapshotInput) (*ExportSnapshotOutput, error) { - req, out := c.ExportSnapshotRequest(input) - return out, req.Send() -} - -// ExportSnapshotWithContext is the same as ExportSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See ExportSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) ExportSnapshotWithContext(ctx aws.Context, input *ExportSnapshotInput, opts ...request.Option) (*ExportSnapshotOutput, error) { - req, out := c.ExportSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetActiveNames = "GetActiveNames" - -// GetActiveNamesRequest generates a "aws/request.Request" representing the -// client's request for the GetActiveNames operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetActiveNames for more information on using the GetActiveNames -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetActiveNamesRequest method. -// req, resp := client.GetActiveNamesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetActiveNames -func (c *Lightsail) GetActiveNamesRequest(input *GetActiveNamesInput) (req *request.Request, output *GetActiveNamesOutput) { - op := &request.Operation{ - Name: opGetActiveNames, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetActiveNamesInput{} - } - - output = &GetActiveNamesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetActiveNames API operation for Amazon Lightsail. -// -// Returns the names of all active (not deleted) resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetActiveNames for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetActiveNames -func (c *Lightsail) GetActiveNames(input *GetActiveNamesInput) (*GetActiveNamesOutput, error) { - req, out := c.GetActiveNamesRequest(input) - return out, req.Send() -} - -// GetActiveNamesWithContext is the same as GetActiveNames with the addition of -// the ability to pass a context and additional request options. -// -// See GetActiveNames for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetActiveNamesWithContext(ctx aws.Context, input *GetActiveNamesInput, opts ...request.Option) (*GetActiveNamesOutput, error) { - req, out := c.GetActiveNamesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBlueprints = "GetBlueprints" - -// GetBlueprintsRequest generates a "aws/request.Request" representing the -// client's request for the GetBlueprints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBlueprints for more information on using the GetBlueprints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBlueprintsRequest method. -// req, resp := client.GetBlueprintsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetBlueprints -func (c *Lightsail) GetBlueprintsRequest(input *GetBlueprintsInput) (req *request.Request, output *GetBlueprintsOutput) { - op := &request.Operation{ - Name: opGetBlueprints, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetBlueprintsInput{} - } - - output = &GetBlueprintsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBlueprints API operation for Amazon Lightsail. -// -// Returns the list of available instance images, or blueprints. You can use -// a blueprint to create a new virtual private server already running a specific -// operating system, as well as a preinstalled app or development stack. The -// software each instance is running depends on the blueprint image you choose. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetBlueprints for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetBlueprints -func (c *Lightsail) GetBlueprints(input *GetBlueprintsInput) (*GetBlueprintsOutput, error) { - req, out := c.GetBlueprintsRequest(input) - return out, req.Send() -} - -// GetBlueprintsWithContext is the same as GetBlueprints with the addition of -// the ability to pass a context and additional request options. -// -// See GetBlueprints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetBlueprintsWithContext(ctx aws.Context, input *GetBlueprintsInput, opts ...request.Option) (*GetBlueprintsOutput, error) { - req, out := c.GetBlueprintsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBundles = "GetBundles" - -// GetBundlesRequest generates a "aws/request.Request" representing the -// client's request for the GetBundles operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBundles for more information on using the GetBundles -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBundlesRequest method. -// req, resp := client.GetBundlesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetBundles -func (c *Lightsail) GetBundlesRequest(input *GetBundlesInput) (req *request.Request, output *GetBundlesOutput) { - op := &request.Operation{ - Name: opGetBundles, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetBundlesInput{} - } - - output = &GetBundlesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBundles API operation for Amazon Lightsail. -// -// Returns the list of bundles that are available for purchase. A bundle describes -// the specs for your virtual private server (or instance). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetBundles for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetBundles -func (c *Lightsail) GetBundles(input *GetBundlesInput) (*GetBundlesOutput, error) { - req, out := c.GetBundlesRequest(input) - return out, req.Send() -} - -// GetBundlesWithContext is the same as GetBundles with the addition of -// the ability to pass a context and additional request options. -// -// See GetBundles for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetBundlesWithContext(ctx aws.Context, input *GetBundlesInput, opts ...request.Option) (*GetBundlesOutput, error) { - req, out := c.GetBundlesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCloudFormationStackRecords = "GetCloudFormationStackRecords" - -// GetCloudFormationStackRecordsRequest generates a "aws/request.Request" representing the -// client's request for the GetCloudFormationStackRecords operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCloudFormationStackRecords for more information on using the GetCloudFormationStackRecords -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCloudFormationStackRecordsRequest method. -// req, resp := client.GetCloudFormationStackRecordsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetCloudFormationStackRecords -func (c *Lightsail) GetCloudFormationStackRecordsRequest(input *GetCloudFormationStackRecordsInput) (req *request.Request, output *GetCloudFormationStackRecordsOutput) { - op := &request.Operation{ - Name: opGetCloudFormationStackRecords, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCloudFormationStackRecordsInput{} - } - - output = &GetCloudFormationStackRecordsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCloudFormationStackRecords API operation for Amazon Lightsail. -// -// Returns the CloudFormation stack record created as a result of the create -// cloud formation stack operation. -// -// An AWS CloudFormation stack is used to create a new Amazon EC2 instance from -// an exported Lightsail snapshot. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetCloudFormationStackRecords for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetCloudFormationStackRecords -func (c *Lightsail) GetCloudFormationStackRecords(input *GetCloudFormationStackRecordsInput) (*GetCloudFormationStackRecordsOutput, error) { - req, out := c.GetCloudFormationStackRecordsRequest(input) - return out, req.Send() -} - -// GetCloudFormationStackRecordsWithContext is the same as GetCloudFormationStackRecords with the addition of -// the ability to pass a context and additional request options. -// -// See GetCloudFormationStackRecords for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetCloudFormationStackRecordsWithContext(ctx aws.Context, input *GetCloudFormationStackRecordsInput, opts ...request.Option) (*GetCloudFormationStackRecordsOutput, error) { - req, out := c.GetCloudFormationStackRecordsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDisk = "GetDisk" - -// GetDiskRequest generates a "aws/request.Request" representing the -// client's request for the GetDisk operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDisk for more information on using the GetDisk -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDiskRequest method. -// req, resp := client.GetDiskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisk -func (c *Lightsail) GetDiskRequest(input *GetDiskInput) (req *request.Request, output *GetDiskOutput) { - op := &request.Operation{ - Name: opGetDisk, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDiskInput{} - } - - output = &GetDiskOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDisk API operation for Amazon Lightsail. -// -// Returns information about a specific block storage disk. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetDisk for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisk -func (c *Lightsail) GetDisk(input *GetDiskInput) (*GetDiskOutput, error) { - req, out := c.GetDiskRequest(input) - return out, req.Send() -} - -// GetDiskWithContext is the same as GetDisk with the addition of -// the ability to pass a context and additional request options. -// -// See GetDisk for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetDiskWithContext(ctx aws.Context, input *GetDiskInput, opts ...request.Option) (*GetDiskOutput, error) { - req, out := c.GetDiskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDiskSnapshot = "GetDiskSnapshot" - -// GetDiskSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the GetDiskSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDiskSnapshot for more information on using the GetDiskSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDiskSnapshotRequest method. -// req, resp := client.GetDiskSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshot -func (c *Lightsail) GetDiskSnapshotRequest(input *GetDiskSnapshotInput) (req *request.Request, output *GetDiskSnapshotOutput) { - op := &request.Operation{ - Name: opGetDiskSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDiskSnapshotInput{} - } - - output = &GetDiskSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDiskSnapshot API operation for Amazon Lightsail. -// -// Returns information about a specific block storage disk snapshot. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetDiskSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshot -func (c *Lightsail) GetDiskSnapshot(input *GetDiskSnapshotInput) (*GetDiskSnapshotOutput, error) { - req, out := c.GetDiskSnapshotRequest(input) - return out, req.Send() -} - -// GetDiskSnapshotWithContext is the same as GetDiskSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See GetDiskSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetDiskSnapshotWithContext(ctx aws.Context, input *GetDiskSnapshotInput, opts ...request.Option) (*GetDiskSnapshotOutput, error) { - req, out := c.GetDiskSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDiskSnapshots = "GetDiskSnapshots" - -// GetDiskSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the GetDiskSnapshots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDiskSnapshots for more information on using the GetDiskSnapshots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDiskSnapshotsRequest method. -// req, resp := client.GetDiskSnapshotsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshots -func (c *Lightsail) GetDiskSnapshotsRequest(input *GetDiskSnapshotsInput) (req *request.Request, output *GetDiskSnapshotsOutput) { - op := &request.Operation{ - Name: opGetDiskSnapshots, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDiskSnapshotsInput{} - } - - output = &GetDiskSnapshotsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDiskSnapshots API operation for Amazon Lightsail. -// -// Returns information about all block storage disk snapshots in your AWS account -// and region. -// -// If you are describing a long list of disk snapshots, you can paginate the -// output to make the list more manageable. You can use the pageToken and nextPageToken -// values to retrieve the next items in the list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetDiskSnapshots for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshots -func (c *Lightsail) GetDiskSnapshots(input *GetDiskSnapshotsInput) (*GetDiskSnapshotsOutput, error) { - req, out := c.GetDiskSnapshotsRequest(input) - return out, req.Send() -} - -// GetDiskSnapshotsWithContext is the same as GetDiskSnapshots with the addition of -// the ability to pass a context and additional request options. -// -// See GetDiskSnapshots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetDiskSnapshotsWithContext(ctx aws.Context, input *GetDiskSnapshotsInput, opts ...request.Option) (*GetDiskSnapshotsOutput, error) { - req, out := c.GetDiskSnapshotsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDisks = "GetDisks" - -// GetDisksRequest generates a "aws/request.Request" representing the -// client's request for the GetDisks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDisks for more information on using the GetDisks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDisksRequest method. -// req, resp := client.GetDisksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisks -func (c *Lightsail) GetDisksRequest(input *GetDisksInput) (req *request.Request, output *GetDisksOutput) { - op := &request.Operation{ - Name: opGetDisks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDisksInput{} - } - - output = &GetDisksOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDisks API operation for Amazon Lightsail. -// -// Returns information about all block storage disks in your AWS account and -// region. -// -// If you are describing a long list of disks, you can paginate the output to -// make the list more manageable. You can use the pageToken and nextPageToken -// values to retrieve the next items in the list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetDisks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisks -func (c *Lightsail) GetDisks(input *GetDisksInput) (*GetDisksOutput, error) { - req, out := c.GetDisksRequest(input) - return out, req.Send() -} - -// GetDisksWithContext is the same as GetDisks with the addition of -// the ability to pass a context and additional request options. -// -// See GetDisks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetDisksWithContext(ctx aws.Context, input *GetDisksInput, opts ...request.Option) (*GetDisksOutput, error) { - req, out := c.GetDisksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDomain = "GetDomain" - -// GetDomainRequest generates a "aws/request.Request" representing the -// client's request for the GetDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDomain for more information on using the GetDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDomainRequest method. -// req, resp := client.GetDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDomain -func (c *Lightsail) GetDomainRequest(input *GetDomainInput) (req *request.Request, output *GetDomainOutput) { - op := &request.Operation{ - Name: opGetDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDomainInput{} - } - - output = &GetDomainOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDomain API operation for Amazon Lightsail. -// -// Returns information about a specific domain recordset. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDomain -func (c *Lightsail) GetDomain(input *GetDomainInput) (*GetDomainOutput, error) { - req, out := c.GetDomainRequest(input) - return out, req.Send() -} - -// GetDomainWithContext is the same as GetDomain with the addition of -// the ability to pass a context and additional request options. -// -// See GetDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetDomainWithContext(ctx aws.Context, input *GetDomainInput, opts ...request.Option) (*GetDomainOutput, error) { - req, out := c.GetDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDomains = "GetDomains" - -// GetDomainsRequest generates a "aws/request.Request" representing the -// client's request for the GetDomains operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDomains for more information on using the GetDomains -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDomainsRequest method. -// req, resp := client.GetDomainsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDomains -func (c *Lightsail) GetDomainsRequest(input *GetDomainsInput) (req *request.Request, output *GetDomainsOutput) { - op := &request.Operation{ - Name: opGetDomains, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDomainsInput{} - } - - output = &GetDomainsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDomains API operation for Amazon Lightsail. -// -// Returns a list of all domains in the user's account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetDomains for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDomains -func (c *Lightsail) GetDomains(input *GetDomainsInput) (*GetDomainsOutput, error) { - req, out := c.GetDomainsRequest(input) - return out, req.Send() -} - -// GetDomainsWithContext is the same as GetDomains with the addition of -// the ability to pass a context and additional request options. -// -// See GetDomains for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetDomainsWithContext(ctx aws.Context, input *GetDomainsInput, opts ...request.Option) (*GetDomainsOutput, error) { - req, out := c.GetDomainsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetExportSnapshotRecords = "GetExportSnapshotRecords" - -// GetExportSnapshotRecordsRequest generates a "aws/request.Request" representing the -// client's request for the GetExportSnapshotRecords operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetExportSnapshotRecords for more information on using the GetExportSnapshotRecords -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetExportSnapshotRecordsRequest method. -// req, resp := client.GetExportSnapshotRecordsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetExportSnapshotRecords -func (c *Lightsail) GetExportSnapshotRecordsRequest(input *GetExportSnapshotRecordsInput) (req *request.Request, output *GetExportSnapshotRecordsOutput) { - op := &request.Operation{ - Name: opGetExportSnapshotRecords, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetExportSnapshotRecordsInput{} - } - - output = &GetExportSnapshotRecordsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetExportSnapshotRecords API operation for Amazon Lightsail. -// -// Returns the export snapshot record created as a result of the export snapshot -// operation. -// -// An export snapshot record can be used to create a new Amazon EC2 instance -// and its related resources with the create cloud formation stack operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetExportSnapshotRecords for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetExportSnapshotRecords -func (c *Lightsail) GetExportSnapshotRecords(input *GetExportSnapshotRecordsInput) (*GetExportSnapshotRecordsOutput, error) { - req, out := c.GetExportSnapshotRecordsRequest(input) - return out, req.Send() -} - -// GetExportSnapshotRecordsWithContext is the same as GetExportSnapshotRecords with the addition of -// the ability to pass a context and additional request options. -// -// See GetExportSnapshotRecords for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetExportSnapshotRecordsWithContext(ctx aws.Context, input *GetExportSnapshotRecordsInput, opts ...request.Option) (*GetExportSnapshotRecordsOutput, error) { - req, out := c.GetExportSnapshotRecordsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInstance = "GetInstance" - -// GetInstanceRequest generates a "aws/request.Request" representing the -// client's request for the GetInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInstance for more information on using the GetInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInstanceRequest method. -// req, resp := client.GetInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstance -func (c *Lightsail) GetInstanceRequest(input *GetInstanceInput) (req *request.Request, output *GetInstanceOutput) { - op := &request.Operation{ - Name: opGetInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInstanceInput{} - } - - output = &GetInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInstance API operation for Amazon Lightsail. -// -// Returns information about a specific Amazon Lightsail instance, which is -// a virtual private server. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstance -func (c *Lightsail) GetInstance(input *GetInstanceInput) (*GetInstanceOutput, error) { - req, out := c.GetInstanceRequest(input) - return out, req.Send() -} - -// GetInstanceWithContext is the same as GetInstance with the addition of -// the ability to pass a context and additional request options. -// -// See GetInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetInstanceWithContext(ctx aws.Context, input *GetInstanceInput, opts ...request.Option) (*GetInstanceOutput, error) { - req, out := c.GetInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInstanceAccessDetails = "GetInstanceAccessDetails" - -// GetInstanceAccessDetailsRequest generates a "aws/request.Request" representing the -// client's request for the GetInstanceAccessDetails operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInstanceAccessDetails for more information on using the GetInstanceAccessDetails -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInstanceAccessDetailsRequest method. -// req, resp := client.GetInstanceAccessDetailsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceAccessDetails -func (c *Lightsail) GetInstanceAccessDetailsRequest(input *GetInstanceAccessDetailsInput) (req *request.Request, output *GetInstanceAccessDetailsOutput) { - op := &request.Operation{ - Name: opGetInstanceAccessDetails, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInstanceAccessDetailsInput{} - } - - output = &GetInstanceAccessDetailsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInstanceAccessDetails API operation for Amazon Lightsail. -// -// Returns temporary SSH keys you can use to connect to a specific virtual private -// server, or instance. -// -// The get instance access details operation supports tag-based access control -// via resource tags applied to the resource identified by instanceName. For -// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetInstanceAccessDetails for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceAccessDetails -func (c *Lightsail) GetInstanceAccessDetails(input *GetInstanceAccessDetailsInput) (*GetInstanceAccessDetailsOutput, error) { - req, out := c.GetInstanceAccessDetailsRequest(input) - return out, req.Send() -} - -// GetInstanceAccessDetailsWithContext is the same as GetInstanceAccessDetails with the addition of -// the ability to pass a context and additional request options. -// -// See GetInstanceAccessDetails for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetInstanceAccessDetailsWithContext(ctx aws.Context, input *GetInstanceAccessDetailsInput, opts ...request.Option) (*GetInstanceAccessDetailsOutput, error) { - req, out := c.GetInstanceAccessDetailsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInstanceMetricData = "GetInstanceMetricData" - -// GetInstanceMetricDataRequest generates a "aws/request.Request" representing the -// client's request for the GetInstanceMetricData operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInstanceMetricData for more information on using the GetInstanceMetricData -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInstanceMetricDataRequest method. -// req, resp := client.GetInstanceMetricDataRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceMetricData -func (c *Lightsail) GetInstanceMetricDataRequest(input *GetInstanceMetricDataInput) (req *request.Request, output *GetInstanceMetricDataOutput) { - op := &request.Operation{ - Name: opGetInstanceMetricData, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInstanceMetricDataInput{} - } - - output = &GetInstanceMetricDataOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInstanceMetricData API operation for Amazon Lightsail. -// -// Returns the data points for the specified Amazon Lightsail instance metric, -// given an instance name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetInstanceMetricData for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceMetricData -func (c *Lightsail) GetInstanceMetricData(input *GetInstanceMetricDataInput) (*GetInstanceMetricDataOutput, error) { - req, out := c.GetInstanceMetricDataRequest(input) - return out, req.Send() -} - -// GetInstanceMetricDataWithContext is the same as GetInstanceMetricData with the addition of -// the ability to pass a context and additional request options. -// -// See GetInstanceMetricData for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetInstanceMetricDataWithContext(ctx aws.Context, input *GetInstanceMetricDataInput, opts ...request.Option) (*GetInstanceMetricDataOutput, error) { - req, out := c.GetInstanceMetricDataRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInstancePortStates = "GetInstancePortStates" - -// GetInstancePortStatesRequest generates a "aws/request.Request" representing the -// client's request for the GetInstancePortStates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInstancePortStates for more information on using the GetInstancePortStates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInstancePortStatesRequest method. -// req, resp := client.GetInstancePortStatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstancePortStates -func (c *Lightsail) GetInstancePortStatesRequest(input *GetInstancePortStatesInput) (req *request.Request, output *GetInstancePortStatesOutput) { - op := &request.Operation{ - Name: opGetInstancePortStates, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInstancePortStatesInput{} - } - - output = &GetInstancePortStatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInstancePortStates API operation for Amazon Lightsail. -// -// Returns the port states for a specific virtual private server, or instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetInstancePortStates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstancePortStates -func (c *Lightsail) GetInstancePortStates(input *GetInstancePortStatesInput) (*GetInstancePortStatesOutput, error) { - req, out := c.GetInstancePortStatesRequest(input) - return out, req.Send() -} - -// GetInstancePortStatesWithContext is the same as GetInstancePortStates with the addition of -// the ability to pass a context and additional request options. -// -// See GetInstancePortStates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetInstancePortStatesWithContext(ctx aws.Context, input *GetInstancePortStatesInput, opts ...request.Option) (*GetInstancePortStatesOutput, error) { - req, out := c.GetInstancePortStatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInstanceSnapshot = "GetInstanceSnapshot" - -// GetInstanceSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the GetInstanceSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInstanceSnapshot for more information on using the GetInstanceSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInstanceSnapshotRequest method. -// req, resp := client.GetInstanceSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceSnapshot -func (c *Lightsail) GetInstanceSnapshotRequest(input *GetInstanceSnapshotInput) (req *request.Request, output *GetInstanceSnapshotOutput) { - op := &request.Operation{ - Name: opGetInstanceSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInstanceSnapshotInput{} - } - - output = &GetInstanceSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInstanceSnapshot API operation for Amazon Lightsail. -// -// Returns information about a specific instance snapshot. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetInstanceSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceSnapshot -func (c *Lightsail) GetInstanceSnapshot(input *GetInstanceSnapshotInput) (*GetInstanceSnapshotOutput, error) { - req, out := c.GetInstanceSnapshotRequest(input) - return out, req.Send() -} - -// GetInstanceSnapshotWithContext is the same as GetInstanceSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See GetInstanceSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetInstanceSnapshotWithContext(ctx aws.Context, input *GetInstanceSnapshotInput, opts ...request.Option) (*GetInstanceSnapshotOutput, error) { - req, out := c.GetInstanceSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInstanceSnapshots = "GetInstanceSnapshots" - -// GetInstanceSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the GetInstanceSnapshots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInstanceSnapshots for more information on using the GetInstanceSnapshots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInstanceSnapshotsRequest method. -// req, resp := client.GetInstanceSnapshotsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceSnapshots -func (c *Lightsail) GetInstanceSnapshotsRequest(input *GetInstanceSnapshotsInput) (req *request.Request, output *GetInstanceSnapshotsOutput) { - op := &request.Operation{ - Name: opGetInstanceSnapshots, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInstanceSnapshotsInput{} - } - - output = &GetInstanceSnapshotsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInstanceSnapshots API operation for Amazon Lightsail. -// -// Returns all instance snapshots for the user's account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetInstanceSnapshots for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceSnapshots -func (c *Lightsail) GetInstanceSnapshots(input *GetInstanceSnapshotsInput) (*GetInstanceSnapshotsOutput, error) { - req, out := c.GetInstanceSnapshotsRequest(input) - return out, req.Send() -} - -// GetInstanceSnapshotsWithContext is the same as GetInstanceSnapshots with the addition of -// the ability to pass a context and additional request options. -// -// See GetInstanceSnapshots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetInstanceSnapshotsWithContext(ctx aws.Context, input *GetInstanceSnapshotsInput, opts ...request.Option) (*GetInstanceSnapshotsOutput, error) { - req, out := c.GetInstanceSnapshotsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInstanceState = "GetInstanceState" - -// GetInstanceStateRequest generates a "aws/request.Request" representing the -// client's request for the GetInstanceState operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInstanceState for more information on using the GetInstanceState -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInstanceStateRequest method. -// req, resp := client.GetInstanceStateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceState -func (c *Lightsail) GetInstanceStateRequest(input *GetInstanceStateInput) (req *request.Request, output *GetInstanceStateOutput) { - op := &request.Operation{ - Name: opGetInstanceState, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInstanceStateInput{} - } - - output = &GetInstanceStateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInstanceState API operation for Amazon Lightsail. -// -// Returns the state of a specific instance. Works on one instance at a time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetInstanceState for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceState -func (c *Lightsail) GetInstanceState(input *GetInstanceStateInput) (*GetInstanceStateOutput, error) { - req, out := c.GetInstanceStateRequest(input) - return out, req.Send() -} - -// GetInstanceStateWithContext is the same as GetInstanceState with the addition of -// the ability to pass a context and additional request options. -// -// See GetInstanceState for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetInstanceStateWithContext(ctx aws.Context, input *GetInstanceStateInput, opts ...request.Option) (*GetInstanceStateOutput, error) { - req, out := c.GetInstanceStateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInstances = "GetInstances" - -// GetInstancesRequest generates a "aws/request.Request" representing the -// client's request for the GetInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInstances for more information on using the GetInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInstancesRequest method. -// req, resp := client.GetInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstances -func (c *Lightsail) GetInstancesRequest(input *GetInstancesInput) (req *request.Request, output *GetInstancesOutput) { - op := &request.Operation{ - Name: opGetInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInstancesInput{} - } - - output = &GetInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInstances API operation for Amazon Lightsail. -// -// Returns information about all Amazon Lightsail virtual private servers, or -// instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstances -func (c *Lightsail) GetInstances(input *GetInstancesInput) (*GetInstancesOutput, error) { - req, out := c.GetInstancesRequest(input) - return out, req.Send() -} - -// GetInstancesWithContext is the same as GetInstances with the addition of -// the ability to pass a context and additional request options. -// -// See GetInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetInstancesWithContext(ctx aws.Context, input *GetInstancesInput, opts ...request.Option) (*GetInstancesOutput, error) { - req, out := c.GetInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetKeyPair = "GetKeyPair" - -// GetKeyPairRequest generates a "aws/request.Request" representing the -// client's request for the GetKeyPair operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetKeyPair for more information on using the GetKeyPair -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetKeyPairRequest method. -// req, resp := client.GetKeyPairRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetKeyPair -func (c *Lightsail) GetKeyPairRequest(input *GetKeyPairInput) (req *request.Request, output *GetKeyPairOutput) { - op := &request.Operation{ - Name: opGetKeyPair, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetKeyPairInput{} - } - - output = &GetKeyPairOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetKeyPair API operation for Amazon Lightsail. -// -// Returns information about a specific key pair. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetKeyPair for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetKeyPair -func (c *Lightsail) GetKeyPair(input *GetKeyPairInput) (*GetKeyPairOutput, error) { - req, out := c.GetKeyPairRequest(input) - return out, req.Send() -} - -// GetKeyPairWithContext is the same as GetKeyPair with the addition of -// the ability to pass a context and additional request options. -// -// See GetKeyPair for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetKeyPairWithContext(ctx aws.Context, input *GetKeyPairInput, opts ...request.Option) (*GetKeyPairOutput, error) { - req, out := c.GetKeyPairRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetKeyPairs = "GetKeyPairs" - -// GetKeyPairsRequest generates a "aws/request.Request" representing the -// client's request for the GetKeyPairs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetKeyPairs for more information on using the GetKeyPairs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetKeyPairsRequest method. -// req, resp := client.GetKeyPairsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetKeyPairs -func (c *Lightsail) GetKeyPairsRequest(input *GetKeyPairsInput) (req *request.Request, output *GetKeyPairsOutput) { - op := &request.Operation{ - Name: opGetKeyPairs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetKeyPairsInput{} - } - - output = &GetKeyPairsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetKeyPairs API operation for Amazon Lightsail. -// -// Returns information about all key pairs in the user's account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetKeyPairs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetKeyPairs -func (c *Lightsail) GetKeyPairs(input *GetKeyPairsInput) (*GetKeyPairsOutput, error) { - req, out := c.GetKeyPairsRequest(input) - return out, req.Send() -} - -// GetKeyPairsWithContext is the same as GetKeyPairs with the addition of -// the ability to pass a context and additional request options. -// -// See GetKeyPairs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetKeyPairsWithContext(ctx aws.Context, input *GetKeyPairsInput, opts ...request.Option) (*GetKeyPairsOutput, error) { - req, out := c.GetKeyPairsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLoadBalancer = "GetLoadBalancer" - -// GetLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the GetLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLoadBalancer for more information on using the GetLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLoadBalancerRequest method. -// req, resp := client.GetLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancer -func (c *Lightsail) GetLoadBalancerRequest(input *GetLoadBalancerInput) (req *request.Request, output *GetLoadBalancerOutput) { - op := &request.Operation{ - Name: opGetLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetLoadBalancerInput{} - } - - output = &GetLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLoadBalancer API operation for Amazon Lightsail. -// -// Returns information about the specified Lightsail load balancer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancer -func (c *Lightsail) GetLoadBalancer(input *GetLoadBalancerInput) (*GetLoadBalancerOutput, error) { - req, out := c.GetLoadBalancerRequest(input) - return out, req.Send() -} - -// GetLoadBalancerWithContext is the same as GetLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See GetLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetLoadBalancerWithContext(ctx aws.Context, input *GetLoadBalancerInput, opts ...request.Option) (*GetLoadBalancerOutput, error) { - req, out := c.GetLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLoadBalancerMetricData = "GetLoadBalancerMetricData" - -// GetLoadBalancerMetricDataRequest generates a "aws/request.Request" representing the -// client's request for the GetLoadBalancerMetricData operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLoadBalancerMetricData for more information on using the GetLoadBalancerMetricData -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLoadBalancerMetricDataRequest method. -// req, resp := client.GetLoadBalancerMetricDataRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancerMetricData -func (c *Lightsail) GetLoadBalancerMetricDataRequest(input *GetLoadBalancerMetricDataInput) (req *request.Request, output *GetLoadBalancerMetricDataOutput) { - op := &request.Operation{ - Name: opGetLoadBalancerMetricData, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetLoadBalancerMetricDataInput{} - } - - output = &GetLoadBalancerMetricDataOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLoadBalancerMetricData API operation for Amazon Lightsail. -// -// Returns information about health metrics for your Lightsail load balancer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetLoadBalancerMetricData for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancerMetricData -func (c *Lightsail) GetLoadBalancerMetricData(input *GetLoadBalancerMetricDataInput) (*GetLoadBalancerMetricDataOutput, error) { - req, out := c.GetLoadBalancerMetricDataRequest(input) - return out, req.Send() -} - -// GetLoadBalancerMetricDataWithContext is the same as GetLoadBalancerMetricData with the addition of -// the ability to pass a context and additional request options. -// -// See GetLoadBalancerMetricData for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetLoadBalancerMetricDataWithContext(ctx aws.Context, input *GetLoadBalancerMetricDataInput, opts ...request.Option) (*GetLoadBalancerMetricDataOutput, error) { - req, out := c.GetLoadBalancerMetricDataRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLoadBalancerTlsCertificates = "GetLoadBalancerTlsCertificates" - -// GetLoadBalancerTlsCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the GetLoadBalancerTlsCertificates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLoadBalancerTlsCertificates for more information on using the GetLoadBalancerTlsCertificates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLoadBalancerTlsCertificatesRequest method. -// req, resp := client.GetLoadBalancerTlsCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancerTlsCertificates -func (c *Lightsail) GetLoadBalancerTlsCertificatesRequest(input *GetLoadBalancerTlsCertificatesInput) (req *request.Request, output *GetLoadBalancerTlsCertificatesOutput) { - op := &request.Operation{ - Name: opGetLoadBalancerTlsCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetLoadBalancerTlsCertificatesInput{} - } - - output = &GetLoadBalancerTlsCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLoadBalancerTlsCertificates API operation for Amazon Lightsail. -// -// Returns information about the TLS certificates that are associated with the -// specified Lightsail load balancer. -// -// TLS is just an updated, more secure version of Secure Socket Layer (SSL). -// -// You can have a maximum of 2 certificates associated with a Lightsail load -// balancer. One is active and the other is inactive. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetLoadBalancerTlsCertificates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancerTlsCertificates -func (c *Lightsail) GetLoadBalancerTlsCertificates(input *GetLoadBalancerTlsCertificatesInput) (*GetLoadBalancerTlsCertificatesOutput, error) { - req, out := c.GetLoadBalancerTlsCertificatesRequest(input) - return out, req.Send() -} - -// GetLoadBalancerTlsCertificatesWithContext is the same as GetLoadBalancerTlsCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See GetLoadBalancerTlsCertificates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetLoadBalancerTlsCertificatesWithContext(ctx aws.Context, input *GetLoadBalancerTlsCertificatesInput, opts ...request.Option) (*GetLoadBalancerTlsCertificatesOutput, error) { - req, out := c.GetLoadBalancerTlsCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLoadBalancers = "GetLoadBalancers" - -// GetLoadBalancersRequest generates a "aws/request.Request" representing the -// client's request for the GetLoadBalancers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLoadBalancers for more information on using the GetLoadBalancers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLoadBalancersRequest method. -// req, resp := client.GetLoadBalancersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancers -func (c *Lightsail) GetLoadBalancersRequest(input *GetLoadBalancersInput) (req *request.Request, output *GetLoadBalancersOutput) { - op := &request.Operation{ - Name: opGetLoadBalancers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetLoadBalancersInput{} - } - - output = &GetLoadBalancersOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLoadBalancers API operation for Amazon Lightsail. -// -// Returns information about all load balancers in an account. -// -// If you are describing a long list of load balancers, you can paginate the -// output to make the list more manageable. You can use the pageToken and nextPageToken -// values to retrieve the next items in the list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetLoadBalancers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancers -func (c *Lightsail) GetLoadBalancers(input *GetLoadBalancersInput) (*GetLoadBalancersOutput, error) { - req, out := c.GetLoadBalancersRequest(input) - return out, req.Send() -} - -// GetLoadBalancersWithContext is the same as GetLoadBalancers with the addition of -// the ability to pass a context and additional request options. -// -// See GetLoadBalancers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetLoadBalancersWithContext(ctx aws.Context, input *GetLoadBalancersInput, opts ...request.Option) (*GetLoadBalancersOutput, error) { - req, out := c.GetLoadBalancersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOperation = "GetOperation" - -// GetOperationRequest generates a "aws/request.Request" representing the -// client's request for the GetOperation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetOperation for more information on using the GetOperation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetOperationRequest method. -// req, resp := client.GetOperationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperation -func (c *Lightsail) GetOperationRequest(input *GetOperationInput) (req *request.Request, output *GetOperationOutput) { - op := &request.Operation{ - Name: opGetOperation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetOperationInput{} - } - - output = &GetOperationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOperation API operation for Amazon Lightsail. -// -// Returns information about a specific operation. Operations include events -// such as when you create an instance, allocate a static IP, attach a static -// IP, and so on. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetOperation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperation -func (c *Lightsail) GetOperation(input *GetOperationInput) (*GetOperationOutput, error) { - req, out := c.GetOperationRequest(input) - return out, req.Send() -} - -// GetOperationWithContext is the same as GetOperation with the addition of -// the ability to pass a context and additional request options. -// -// See GetOperation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetOperationWithContext(ctx aws.Context, input *GetOperationInput, opts ...request.Option) (*GetOperationOutput, error) { - req, out := c.GetOperationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOperations = "GetOperations" - -// GetOperationsRequest generates a "aws/request.Request" representing the -// client's request for the GetOperations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetOperations for more information on using the GetOperations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetOperationsRequest method. -// req, resp := client.GetOperationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperations -func (c *Lightsail) GetOperationsRequest(input *GetOperationsInput) (req *request.Request, output *GetOperationsOutput) { - op := &request.Operation{ - Name: opGetOperations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetOperationsInput{} - } - - output = &GetOperationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOperations API operation for Amazon Lightsail. -// -// Returns information about all operations. -// -// Results are returned from oldest to newest, up to a maximum of 200. Results -// can be paged by making each subsequent call to GetOperations use the maximum -// (last) statusChangedAt value from the previous request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetOperations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperations -func (c *Lightsail) GetOperations(input *GetOperationsInput) (*GetOperationsOutput, error) { - req, out := c.GetOperationsRequest(input) - return out, req.Send() -} - -// GetOperationsWithContext is the same as GetOperations with the addition of -// the ability to pass a context and additional request options. -// -// See GetOperations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetOperationsWithContext(ctx aws.Context, input *GetOperationsInput, opts ...request.Option) (*GetOperationsOutput, error) { - req, out := c.GetOperationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOperationsForResource = "GetOperationsForResource" - -// GetOperationsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the GetOperationsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetOperationsForResource for more information on using the GetOperationsForResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetOperationsForResourceRequest method. -// req, resp := client.GetOperationsForResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperationsForResource -func (c *Lightsail) GetOperationsForResourceRequest(input *GetOperationsForResourceInput) (req *request.Request, output *GetOperationsForResourceOutput) { - op := &request.Operation{ - Name: opGetOperationsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetOperationsForResourceInput{} - } - - output = &GetOperationsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOperationsForResource API operation for Amazon Lightsail. -// -// Gets operations for a specific resource (e.g., an instance or a static IP). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetOperationsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperationsForResource -func (c *Lightsail) GetOperationsForResource(input *GetOperationsForResourceInput) (*GetOperationsForResourceOutput, error) { - req, out := c.GetOperationsForResourceRequest(input) - return out, req.Send() -} - -// GetOperationsForResourceWithContext is the same as GetOperationsForResource with the addition of -// the ability to pass a context and additional request options. -// -// See GetOperationsForResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetOperationsForResourceWithContext(ctx aws.Context, input *GetOperationsForResourceInput, opts ...request.Option) (*GetOperationsForResourceOutput, error) { - req, out := c.GetOperationsForResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRegions = "GetRegions" - -// GetRegionsRequest generates a "aws/request.Request" representing the -// client's request for the GetRegions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRegions for more information on using the GetRegions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRegionsRequest method. -// req, resp := client.GetRegionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRegions -func (c *Lightsail) GetRegionsRequest(input *GetRegionsInput) (req *request.Request, output *GetRegionsOutput) { - op := &request.Operation{ - Name: opGetRegions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRegionsInput{} - } - - output = &GetRegionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRegions API operation for Amazon Lightsail. -// -// Returns a list of all valid regions for Amazon Lightsail. Use the include -// availability zones parameter to also return the Availability Zones in a region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetRegions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRegions -func (c *Lightsail) GetRegions(input *GetRegionsInput) (*GetRegionsOutput, error) { - req, out := c.GetRegionsRequest(input) - return out, req.Send() -} - -// GetRegionsWithContext is the same as GetRegions with the addition of -// the ability to pass a context and additional request options. -// -// See GetRegions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetRegionsWithContext(ctx aws.Context, input *GetRegionsInput, opts ...request.Option) (*GetRegionsOutput, error) { - req, out := c.GetRegionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRelationalDatabase = "GetRelationalDatabase" - -// GetRelationalDatabaseRequest generates a "aws/request.Request" representing the -// client's request for the GetRelationalDatabase operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRelationalDatabase for more information on using the GetRelationalDatabase -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRelationalDatabaseRequest method. -// req, resp := client.GetRelationalDatabaseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabase -func (c *Lightsail) GetRelationalDatabaseRequest(input *GetRelationalDatabaseInput) (req *request.Request, output *GetRelationalDatabaseOutput) { - op := &request.Operation{ - Name: opGetRelationalDatabase, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRelationalDatabaseInput{} - } - - output = &GetRelationalDatabaseOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRelationalDatabase API operation for Amazon Lightsail. -// -// Returns information about a specific database in Amazon Lightsail. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetRelationalDatabase for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabase -func (c *Lightsail) GetRelationalDatabase(input *GetRelationalDatabaseInput) (*GetRelationalDatabaseOutput, error) { - req, out := c.GetRelationalDatabaseRequest(input) - return out, req.Send() -} - -// GetRelationalDatabaseWithContext is the same as GetRelationalDatabase with the addition of -// the ability to pass a context and additional request options. -// -// See GetRelationalDatabase for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetRelationalDatabaseWithContext(ctx aws.Context, input *GetRelationalDatabaseInput, opts ...request.Option) (*GetRelationalDatabaseOutput, error) { - req, out := c.GetRelationalDatabaseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRelationalDatabaseBlueprints = "GetRelationalDatabaseBlueprints" - -// GetRelationalDatabaseBlueprintsRequest generates a "aws/request.Request" representing the -// client's request for the GetRelationalDatabaseBlueprints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRelationalDatabaseBlueprints for more information on using the GetRelationalDatabaseBlueprints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRelationalDatabaseBlueprintsRequest method. -// req, resp := client.GetRelationalDatabaseBlueprintsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseBlueprints -func (c *Lightsail) GetRelationalDatabaseBlueprintsRequest(input *GetRelationalDatabaseBlueprintsInput) (req *request.Request, output *GetRelationalDatabaseBlueprintsOutput) { - op := &request.Operation{ - Name: opGetRelationalDatabaseBlueprints, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRelationalDatabaseBlueprintsInput{} - } - - output = &GetRelationalDatabaseBlueprintsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRelationalDatabaseBlueprints API operation for Amazon Lightsail. -// -// Returns a list of available database blueprints in Amazon Lightsail. A blueprint -// describes the major engine version of a database. -// -// You can use a blueprint ID to create a new database that runs a specific -// database engine. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetRelationalDatabaseBlueprints for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseBlueprints -func (c *Lightsail) GetRelationalDatabaseBlueprints(input *GetRelationalDatabaseBlueprintsInput) (*GetRelationalDatabaseBlueprintsOutput, error) { - req, out := c.GetRelationalDatabaseBlueprintsRequest(input) - return out, req.Send() -} - -// GetRelationalDatabaseBlueprintsWithContext is the same as GetRelationalDatabaseBlueprints with the addition of -// the ability to pass a context and additional request options. -// -// See GetRelationalDatabaseBlueprints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetRelationalDatabaseBlueprintsWithContext(ctx aws.Context, input *GetRelationalDatabaseBlueprintsInput, opts ...request.Option) (*GetRelationalDatabaseBlueprintsOutput, error) { - req, out := c.GetRelationalDatabaseBlueprintsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRelationalDatabaseBundles = "GetRelationalDatabaseBundles" - -// GetRelationalDatabaseBundlesRequest generates a "aws/request.Request" representing the -// client's request for the GetRelationalDatabaseBundles operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRelationalDatabaseBundles for more information on using the GetRelationalDatabaseBundles -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRelationalDatabaseBundlesRequest method. -// req, resp := client.GetRelationalDatabaseBundlesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseBundles -func (c *Lightsail) GetRelationalDatabaseBundlesRequest(input *GetRelationalDatabaseBundlesInput) (req *request.Request, output *GetRelationalDatabaseBundlesOutput) { - op := &request.Operation{ - Name: opGetRelationalDatabaseBundles, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRelationalDatabaseBundlesInput{} - } - - output = &GetRelationalDatabaseBundlesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRelationalDatabaseBundles API operation for Amazon Lightsail. -// -// Returns the list of bundles that are available in Amazon Lightsail. A bundle -// describes the performance specifications for a database. -// -// You can use a bundle ID to create a new database with explicit performance -// specifications. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetRelationalDatabaseBundles for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseBundles -func (c *Lightsail) GetRelationalDatabaseBundles(input *GetRelationalDatabaseBundlesInput) (*GetRelationalDatabaseBundlesOutput, error) { - req, out := c.GetRelationalDatabaseBundlesRequest(input) - return out, req.Send() -} - -// GetRelationalDatabaseBundlesWithContext is the same as GetRelationalDatabaseBundles with the addition of -// the ability to pass a context and additional request options. -// -// See GetRelationalDatabaseBundles for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetRelationalDatabaseBundlesWithContext(ctx aws.Context, input *GetRelationalDatabaseBundlesInput, opts ...request.Option) (*GetRelationalDatabaseBundlesOutput, error) { - req, out := c.GetRelationalDatabaseBundlesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRelationalDatabaseEvents = "GetRelationalDatabaseEvents" - -// GetRelationalDatabaseEventsRequest generates a "aws/request.Request" representing the -// client's request for the GetRelationalDatabaseEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRelationalDatabaseEvents for more information on using the GetRelationalDatabaseEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRelationalDatabaseEventsRequest method. -// req, resp := client.GetRelationalDatabaseEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseEvents -func (c *Lightsail) GetRelationalDatabaseEventsRequest(input *GetRelationalDatabaseEventsInput) (req *request.Request, output *GetRelationalDatabaseEventsOutput) { - op := &request.Operation{ - Name: opGetRelationalDatabaseEvents, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRelationalDatabaseEventsInput{} - } - - output = &GetRelationalDatabaseEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRelationalDatabaseEvents API operation for Amazon Lightsail. -// -// Returns a list of events for a specific database in Amazon Lightsail. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetRelationalDatabaseEvents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseEvents -func (c *Lightsail) GetRelationalDatabaseEvents(input *GetRelationalDatabaseEventsInput) (*GetRelationalDatabaseEventsOutput, error) { - req, out := c.GetRelationalDatabaseEventsRequest(input) - return out, req.Send() -} - -// GetRelationalDatabaseEventsWithContext is the same as GetRelationalDatabaseEvents with the addition of -// the ability to pass a context and additional request options. -// -// See GetRelationalDatabaseEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetRelationalDatabaseEventsWithContext(ctx aws.Context, input *GetRelationalDatabaseEventsInput, opts ...request.Option) (*GetRelationalDatabaseEventsOutput, error) { - req, out := c.GetRelationalDatabaseEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRelationalDatabaseLogEvents = "GetRelationalDatabaseLogEvents" - -// GetRelationalDatabaseLogEventsRequest generates a "aws/request.Request" representing the -// client's request for the GetRelationalDatabaseLogEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRelationalDatabaseLogEvents for more information on using the GetRelationalDatabaseLogEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRelationalDatabaseLogEventsRequest method. -// req, resp := client.GetRelationalDatabaseLogEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseLogEvents -func (c *Lightsail) GetRelationalDatabaseLogEventsRequest(input *GetRelationalDatabaseLogEventsInput) (req *request.Request, output *GetRelationalDatabaseLogEventsOutput) { - op := &request.Operation{ - Name: opGetRelationalDatabaseLogEvents, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRelationalDatabaseLogEventsInput{} - } - - output = &GetRelationalDatabaseLogEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRelationalDatabaseLogEvents API operation for Amazon Lightsail. -// -// Returns a list of log events for a database in Amazon Lightsail. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetRelationalDatabaseLogEvents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseLogEvents -func (c *Lightsail) GetRelationalDatabaseLogEvents(input *GetRelationalDatabaseLogEventsInput) (*GetRelationalDatabaseLogEventsOutput, error) { - req, out := c.GetRelationalDatabaseLogEventsRequest(input) - return out, req.Send() -} - -// GetRelationalDatabaseLogEventsWithContext is the same as GetRelationalDatabaseLogEvents with the addition of -// the ability to pass a context and additional request options. -// -// See GetRelationalDatabaseLogEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetRelationalDatabaseLogEventsWithContext(ctx aws.Context, input *GetRelationalDatabaseLogEventsInput, opts ...request.Option) (*GetRelationalDatabaseLogEventsOutput, error) { - req, out := c.GetRelationalDatabaseLogEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRelationalDatabaseLogStreams = "GetRelationalDatabaseLogStreams" - -// GetRelationalDatabaseLogStreamsRequest generates a "aws/request.Request" representing the -// client's request for the GetRelationalDatabaseLogStreams operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRelationalDatabaseLogStreams for more information on using the GetRelationalDatabaseLogStreams -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRelationalDatabaseLogStreamsRequest method. -// req, resp := client.GetRelationalDatabaseLogStreamsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseLogStreams -func (c *Lightsail) GetRelationalDatabaseLogStreamsRequest(input *GetRelationalDatabaseLogStreamsInput) (req *request.Request, output *GetRelationalDatabaseLogStreamsOutput) { - op := &request.Operation{ - Name: opGetRelationalDatabaseLogStreams, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRelationalDatabaseLogStreamsInput{} - } - - output = &GetRelationalDatabaseLogStreamsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRelationalDatabaseLogStreams API operation for Amazon Lightsail. -// -// Returns a list of available log streams for a specific database in Amazon -// Lightsail. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetRelationalDatabaseLogStreams for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseLogStreams -func (c *Lightsail) GetRelationalDatabaseLogStreams(input *GetRelationalDatabaseLogStreamsInput) (*GetRelationalDatabaseLogStreamsOutput, error) { - req, out := c.GetRelationalDatabaseLogStreamsRequest(input) - return out, req.Send() -} - -// GetRelationalDatabaseLogStreamsWithContext is the same as GetRelationalDatabaseLogStreams with the addition of -// the ability to pass a context and additional request options. -// -// See GetRelationalDatabaseLogStreams for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetRelationalDatabaseLogStreamsWithContext(ctx aws.Context, input *GetRelationalDatabaseLogStreamsInput, opts ...request.Option) (*GetRelationalDatabaseLogStreamsOutput, error) { - req, out := c.GetRelationalDatabaseLogStreamsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRelationalDatabaseMasterUserPassword = "GetRelationalDatabaseMasterUserPassword" - -// GetRelationalDatabaseMasterUserPasswordRequest generates a "aws/request.Request" representing the -// client's request for the GetRelationalDatabaseMasterUserPassword operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRelationalDatabaseMasterUserPassword for more information on using the GetRelationalDatabaseMasterUserPassword -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRelationalDatabaseMasterUserPasswordRequest method. -// req, resp := client.GetRelationalDatabaseMasterUserPasswordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseMasterUserPassword -func (c *Lightsail) GetRelationalDatabaseMasterUserPasswordRequest(input *GetRelationalDatabaseMasterUserPasswordInput) (req *request.Request, output *GetRelationalDatabaseMasterUserPasswordOutput) { - op := &request.Operation{ - Name: opGetRelationalDatabaseMasterUserPassword, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRelationalDatabaseMasterUserPasswordInput{} - } - - output = &GetRelationalDatabaseMasterUserPasswordOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRelationalDatabaseMasterUserPassword API operation for Amazon Lightsail. -// -// Returns the current, previous, or pending versions of the master user password -// for a Lightsail database. -// -// The asdf operation GetRelationalDatabaseMasterUserPassword supports tag-based -// access control via resource tags applied to the resource identified by relationalDatabaseName. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetRelationalDatabaseMasterUserPassword for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseMasterUserPassword -func (c *Lightsail) GetRelationalDatabaseMasterUserPassword(input *GetRelationalDatabaseMasterUserPasswordInput) (*GetRelationalDatabaseMasterUserPasswordOutput, error) { - req, out := c.GetRelationalDatabaseMasterUserPasswordRequest(input) - return out, req.Send() -} - -// GetRelationalDatabaseMasterUserPasswordWithContext is the same as GetRelationalDatabaseMasterUserPassword with the addition of -// the ability to pass a context and additional request options. -// -// See GetRelationalDatabaseMasterUserPassword for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetRelationalDatabaseMasterUserPasswordWithContext(ctx aws.Context, input *GetRelationalDatabaseMasterUserPasswordInput, opts ...request.Option) (*GetRelationalDatabaseMasterUserPasswordOutput, error) { - req, out := c.GetRelationalDatabaseMasterUserPasswordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRelationalDatabaseMetricData = "GetRelationalDatabaseMetricData" - -// GetRelationalDatabaseMetricDataRequest generates a "aws/request.Request" representing the -// client's request for the GetRelationalDatabaseMetricData operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRelationalDatabaseMetricData for more information on using the GetRelationalDatabaseMetricData -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRelationalDatabaseMetricDataRequest method. -// req, resp := client.GetRelationalDatabaseMetricDataRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseMetricData -func (c *Lightsail) GetRelationalDatabaseMetricDataRequest(input *GetRelationalDatabaseMetricDataInput) (req *request.Request, output *GetRelationalDatabaseMetricDataOutput) { - op := &request.Operation{ - Name: opGetRelationalDatabaseMetricData, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRelationalDatabaseMetricDataInput{} - } - - output = &GetRelationalDatabaseMetricDataOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRelationalDatabaseMetricData API operation for Amazon Lightsail. -// -// Returns the data points of the specified metric for a database in Amazon -// Lightsail. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetRelationalDatabaseMetricData for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseMetricData -func (c *Lightsail) GetRelationalDatabaseMetricData(input *GetRelationalDatabaseMetricDataInput) (*GetRelationalDatabaseMetricDataOutput, error) { - req, out := c.GetRelationalDatabaseMetricDataRequest(input) - return out, req.Send() -} - -// GetRelationalDatabaseMetricDataWithContext is the same as GetRelationalDatabaseMetricData with the addition of -// the ability to pass a context and additional request options. -// -// See GetRelationalDatabaseMetricData for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetRelationalDatabaseMetricDataWithContext(ctx aws.Context, input *GetRelationalDatabaseMetricDataInput, opts ...request.Option) (*GetRelationalDatabaseMetricDataOutput, error) { - req, out := c.GetRelationalDatabaseMetricDataRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRelationalDatabaseParameters = "GetRelationalDatabaseParameters" - -// GetRelationalDatabaseParametersRequest generates a "aws/request.Request" representing the -// client's request for the GetRelationalDatabaseParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRelationalDatabaseParameters for more information on using the GetRelationalDatabaseParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRelationalDatabaseParametersRequest method. -// req, resp := client.GetRelationalDatabaseParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseParameters -func (c *Lightsail) GetRelationalDatabaseParametersRequest(input *GetRelationalDatabaseParametersInput) (req *request.Request, output *GetRelationalDatabaseParametersOutput) { - op := &request.Operation{ - Name: opGetRelationalDatabaseParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRelationalDatabaseParametersInput{} - } - - output = &GetRelationalDatabaseParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRelationalDatabaseParameters API operation for Amazon Lightsail. -// -// Returns all of the runtime parameters offered by the underlying database -// software, or engine, for a specific database in Amazon Lightsail. -// -// In addition to the parameter names and values, this operation returns other -// information about each parameter. This information includes whether changes -// require a reboot, whether the parameter is modifiable, the allowed values, -// and the data types. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetRelationalDatabaseParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseParameters -func (c *Lightsail) GetRelationalDatabaseParameters(input *GetRelationalDatabaseParametersInput) (*GetRelationalDatabaseParametersOutput, error) { - req, out := c.GetRelationalDatabaseParametersRequest(input) - return out, req.Send() -} - -// GetRelationalDatabaseParametersWithContext is the same as GetRelationalDatabaseParameters with the addition of -// the ability to pass a context and additional request options. -// -// See GetRelationalDatabaseParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetRelationalDatabaseParametersWithContext(ctx aws.Context, input *GetRelationalDatabaseParametersInput, opts ...request.Option) (*GetRelationalDatabaseParametersOutput, error) { - req, out := c.GetRelationalDatabaseParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRelationalDatabaseSnapshot = "GetRelationalDatabaseSnapshot" - -// GetRelationalDatabaseSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the GetRelationalDatabaseSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRelationalDatabaseSnapshot for more information on using the GetRelationalDatabaseSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRelationalDatabaseSnapshotRequest method. -// req, resp := client.GetRelationalDatabaseSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseSnapshot -func (c *Lightsail) GetRelationalDatabaseSnapshotRequest(input *GetRelationalDatabaseSnapshotInput) (req *request.Request, output *GetRelationalDatabaseSnapshotOutput) { - op := &request.Operation{ - Name: opGetRelationalDatabaseSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRelationalDatabaseSnapshotInput{} - } - - output = &GetRelationalDatabaseSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRelationalDatabaseSnapshot API operation for Amazon Lightsail. -// -// Returns information about a specific database snapshot in Amazon Lightsail. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetRelationalDatabaseSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseSnapshot -func (c *Lightsail) GetRelationalDatabaseSnapshot(input *GetRelationalDatabaseSnapshotInput) (*GetRelationalDatabaseSnapshotOutput, error) { - req, out := c.GetRelationalDatabaseSnapshotRequest(input) - return out, req.Send() -} - -// GetRelationalDatabaseSnapshotWithContext is the same as GetRelationalDatabaseSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See GetRelationalDatabaseSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetRelationalDatabaseSnapshotWithContext(ctx aws.Context, input *GetRelationalDatabaseSnapshotInput, opts ...request.Option) (*GetRelationalDatabaseSnapshotOutput, error) { - req, out := c.GetRelationalDatabaseSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRelationalDatabaseSnapshots = "GetRelationalDatabaseSnapshots" - -// GetRelationalDatabaseSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the GetRelationalDatabaseSnapshots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRelationalDatabaseSnapshots for more information on using the GetRelationalDatabaseSnapshots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRelationalDatabaseSnapshotsRequest method. -// req, resp := client.GetRelationalDatabaseSnapshotsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseSnapshots -func (c *Lightsail) GetRelationalDatabaseSnapshotsRequest(input *GetRelationalDatabaseSnapshotsInput) (req *request.Request, output *GetRelationalDatabaseSnapshotsOutput) { - op := &request.Operation{ - Name: opGetRelationalDatabaseSnapshots, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRelationalDatabaseSnapshotsInput{} - } - - output = &GetRelationalDatabaseSnapshotsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRelationalDatabaseSnapshots API operation for Amazon Lightsail. -// -// Returns information about all of your database snapshots in Amazon Lightsail. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetRelationalDatabaseSnapshots for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseSnapshots -func (c *Lightsail) GetRelationalDatabaseSnapshots(input *GetRelationalDatabaseSnapshotsInput) (*GetRelationalDatabaseSnapshotsOutput, error) { - req, out := c.GetRelationalDatabaseSnapshotsRequest(input) - return out, req.Send() -} - -// GetRelationalDatabaseSnapshotsWithContext is the same as GetRelationalDatabaseSnapshots with the addition of -// the ability to pass a context and additional request options. -// -// See GetRelationalDatabaseSnapshots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetRelationalDatabaseSnapshotsWithContext(ctx aws.Context, input *GetRelationalDatabaseSnapshotsInput, opts ...request.Option) (*GetRelationalDatabaseSnapshotsOutput, error) { - req, out := c.GetRelationalDatabaseSnapshotsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRelationalDatabases = "GetRelationalDatabases" - -// GetRelationalDatabasesRequest generates a "aws/request.Request" representing the -// client's request for the GetRelationalDatabases operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRelationalDatabases for more information on using the GetRelationalDatabases -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRelationalDatabasesRequest method. -// req, resp := client.GetRelationalDatabasesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabases -func (c *Lightsail) GetRelationalDatabasesRequest(input *GetRelationalDatabasesInput) (req *request.Request, output *GetRelationalDatabasesOutput) { - op := &request.Operation{ - Name: opGetRelationalDatabases, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRelationalDatabasesInput{} - } - - output = &GetRelationalDatabasesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRelationalDatabases API operation for Amazon Lightsail. -// -// Returns information about all of your databases in Amazon Lightsail. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetRelationalDatabases for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabases -func (c *Lightsail) GetRelationalDatabases(input *GetRelationalDatabasesInput) (*GetRelationalDatabasesOutput, error) { - req, out := c.GetRelationalDatabasesRequest(input) - return out, req.Send() -} - -// GetRelationalDatabasesWithContext is the same as GetRelationalDatabases with the addition of -// the ability to pass a context and additional request options. -// -// See GetRelationalDatabases for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetRelationalDatabasesWithContext(ctx aws.Context, input *GetRelationalDatabasesInput, opts ...request.Option) (*GetRelationalDatabasesOutput, error) { - req, out := c.GetRelationalDatabasesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetStaticIp = "GetStaticIp" - -// GetStaticIpRequest generates a "aws/request.Request" representing the -// client's request for the GetStaticIp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetStaticIp for more information on using the GetStaticIp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetStaticIpRequest method. -// req, resp := client.GetStaticIpRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIp -func (c *Lightsail) GetStaticIpRequest(input *GetStaticIpInput) (req *request.Request, output *GetStaticIpOutput) { - op := &request.Operation{ - Name: opGetStaticIp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetStaticIpInput{} - } - - output = &GetStaticIpOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetStaticIp API operation for Amazon Lightsail. -// -// Returns information about a specific static IP. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetStaticIp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIp -func (c *Lightsail) GetStaticIp(input *GetStaticIpInput) (*GetStaticIpOutput, error) { - req, out := c.GetStaticIpRequest(input) - return out, req.Send() -} - -// GetStaticIpWithContext is the same as GetStaticIp with the addition of -// the ability to pass a context and additional request options. -// -// See GetStaticIp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetStaticIpWithContext(ctx aws.Context, input *GetStaticIpInput, opts ...request.Option) (*GetStaticIpOutput, error) { - req, out := c.GetStaticIpRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetStaticIps = "GetStaticIps" - -// GetStaticIpsRequest generates a "aws/request.Request" representing the -// client's request for the GetStaticIps operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetStaticIps for more information on using the GetStaticIps -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetStaticIpsRequest method. -// req, resp := client.GetStaticIpsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIps -func (c *Lightsail) GetStaticIpsRequest(input *GetStaticIpsInput) (req *request.Request, output *GetStaticIpsOutput) { - op := &request.Operation{ - Name: opGetStaticIps, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetStaticIpsInput{} - } - - output = &GetStaticIpsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetStaticIps API operation for Amazon Lightsail. -// -// Returns information about all static IPs in the user's account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation GetStaticIps for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIps -func (c *Lightsail) GetStaticIps(input *GetStaticIpsInput) (*GetStaticIpsOutput, error) { - req, out := c.GetStaticIpsRequest(input) - return out, req.Send() -} - -// GetStaticIpsWithContext is the same as GetStaticIps with the addition of -// the ability to pass a context and additional request options. -// -// See GetStaticIps for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) GetStaticIpsWithContext(ctx aws.Context, input *GetStaticIpsInput, opts ...request.Option) (*GetStaticIpsOutput, error) { - req, out := c.GetStaticIpsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportKeyPair = "ImportKeyPair" - -// ImportKeyPairRequest generates a "aws/request.Request" representing the -// client's request for the ImportKeyPair operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportKeyPair for more information on using the ImportKeyPair -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportKeyPairRequest method. -// req, resp := client.ImportKeyPairRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ImportKeyPair -func (c *Lightsail) ImportKeyPairRequest(input *ImportKeyPairInput) (req *request.Request, output *ImportKeyPairOutput) { - op := &request.Operation{ - Name: opImportKeyPair, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportKeyPairInput{} - } - - output = &ImportKeyPairOutput{} - req = c.newRequest(op, input, output) - return -} - -// ImportKeyPair API operation for Amazon Lightsail. -// -// Imports a public SSH key from a specific key pair. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation ImportKeyPair for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ImportKeyPair -func (c *Lightsail) ImportKeyPair(input *ImportKeyPairInput) (*ImportKeyPairOutput, error) { - req, out := c.ImportKeyPairRequest(input) - return out, req.Send() -} - -// ImportKeyPairWithContext is the same as ImportKeyPair with the addition of -// the ability to pass a context and additional request options. -// -// See ImportKeyPair for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) ImportKeyPairWithContext(ctx aws.Context, input *ImportKeyPairInput, opts ...request.Option) (*ImportKeyPairOutput, error) { - req, out := c.ImportKeyPairRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opIsVpcPeered = "IsVpcPeered" - -// IsVpcPeeredRequest generates a "aws/request.Request" representing the -// client's request for the IsVpcPeered operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See IsVpcPeered for more information on using the IsVpcPeered -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the IsVpcPeeredRequest method. -// req, resp := client.IsVpcPeeredRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/IsVpcPeered -func (c *Lightsail) IsVpcPeeredRequest(input *IsVpcPeeredInput) (req *request.Request, output *IsVpcPeeredOutput) { - op := &request.Operation{ - Name: opIsVpcPeered, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &IsVpcPeeredInput{} - } - - output = &IsVpcPeeredOutput{} - req = c.newRequest(op, input, output) - return -} - -// IsVpcPeered API operation for Amazon Lightsail. -// -// Returns a Boolean value indicating whether your Lightsail VPC is peered. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation IsVpcPeered for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/IsVpcPeered -func (c *Lightsail) IsVpcPeered(input *IsVpcPeeredInput) (*IsVpcPeeredOutput, error) { - req, out := c.IsVpcPeeredRequest(input) - return out, req.Send() -} - -// IsVpcPeeredWithContext is the same as IsVpcPeered with the addition of -// the ability to pass a context and additional request options. -// -// See IsVpcPeered for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) IsVpcPeeredWithContext(ctx aws.Context, input *IsVpcPeeredInput, opts ...request.Option) (*IsVpcPeeredOutput, error) { - req, out := c.IsVpcPeeredRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opOpenInstancePublicPorts = "OpenInstancePublicPorts" - -// OpenInstancePublicPortsRequest generates a "aws/request.Request" representing the -// client's request for the OpenInstancePublicPorts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See OpenInstancePublicPorts for more information on using the OpenInstancePublicPorts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the OpenInstancePublicPortsRequest method. -// req, resp := client.OpenInstancePublicPortsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/OpenInstancePublicPorts -func (c *Lightsail) OpenInstancePublicPortsRequest(input *OpenInstancePublicPortsInput) (req *request.Request, output *OpenInstancePublicPortsOutput) { - op := &request.Operation{ - Name: opOpenInstancePublicPorts, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &OpenInstancePublicPortsInput{} - } - - output = &OpenInstancePublicPortsOutput{} - req = c.newRequest(op, input, output) - return -} - -// OpenInstancePublicPorts API operation for Amazon Lightsail. -// -// Adds public ports to an Amazon Lightsail instance. -// -// The open instance public ports operation supports tag-based access control -// via resource tags applied to the resource identified by instanceName. For -// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation OpenInstancePublicPorts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/OpenInstancePublicPorts -func (c *Lightsail) OpenInstancePublicPorts(input *OpenInstancePublicPortsInput) (*OpenInstancePublicPortsOutput, error) { - req, out := c.OpenInstancePublicPortsRequest(input) - return out, req.Send() -} - -// OpenInstancePublicPortsWithContext is the same as OpenInstancePublicPorts with the addition of -// the ability to pass a context and additional request options. -// -// See OpenInstancePublicPorts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) OpenInstancePublicPortsWithContext(ctx aws.Context, input *OpenInstancePublicPortsInput, opts ...request.Option) (*OpenInstancePublicPortsOutput, error) { - req, out := c.OpenInstancePublicPortsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPeerVpc = "PeerVpc" - -// PeerVpcRequest generates a "aws/request.Request" representing the -// client's request for the PeerVpc operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PeerVpc for more information on using the PeerVpc -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PeerVpcRequest method. -// req, resp := client.PeerVpcRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PeerVpc -func (c *Lightsail) PeerVpcRequest(input *PeerVpcInput) (req *request.Request, output *PeerVpcOutput) { - op := &request.Operation{ - Name: opPeerVpc, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PeerVpcInput{} - } - - output = &PeerVpcOutput{} - req = c.newRequest(op, input, output) - return -} - -// PeerVpc API operation for Amazon Lightsail. -// -// Tries to peer the Lightsail VPC with the user's default VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation PeerVpc for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PeerVpc -func (c *Lightsail) PeerVpc(input *PeerVpcInput) (*PeerVpcOutput, error) { - req, out := c.PeerVpcRequest(input) - return out, req.Send() -} - -// PeerVpcWithContext is the same as PeerVpc with the addition of -// the ability to pass a context and additional request options. -// -// See PeerVpc for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) PeerVpcWithContext(ctx aws.Context, input *PeerVpcInput, opts ...request.Option) (*PeerVpcOutput, error) { - req, out := c.PeerVpcRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutInstancePublicPorts = "PutInstancePublicPorts" - -// PutInstancePublicPortsRequest generates a "aws/request.Request" representing the -// client's request for the PutInstancePublicPorts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutInstancePublicPorts for more information on using the PutInstancePublicPorts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutInstancePublicPortsRequest method. -// req, resp := client.PutInstancePublicPortsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PutInstancePublicPorts -func (c *Lightsail) PutInstancePublicPortsRequest(input *PutInstancePublicPortsInput) (req *request.Request, output *PutInstancePublicPortsOutput) { - op := &request.Operation{ - Name: opPutInstancePublicPorts, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutInstancePublicPortsInput{} - } - - output = &PutInstancePublicPortsOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutInstancePublicPorts API operation for Amazon Lightsail. -// -// Sets the specified open ports for an Amazon Lightsail instance, and closes -// all ports for every protocol not included in the current request. -// -// The put instance public ports operation supports tag-based access control -// via resource tags applied to the resource identified by instanceName. For -// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation PutInstancePublicPorts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PutInstancePublicPorts -func (c *Lightsail) PutInstancePublicPorts(input *PutInstancePublicPortsInput) (*PutInstancePublicPortsOutput, error) { - req, out := c.PutInstancePublicPortsRequest(input) - return out, req.Send() -} - -// PutInstancePublicPortsWithContext is the same as PutInstancePublicPorts with the addition of -// the ability to pass a context and additional request options. -// -// See PutInstancePublicPorts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) PutInstancePublicPortsWithContext(ctx aws.Context, input *PutInstancePublicPortsInput, opts ...request.Option) (*PutInstancePublicPortsOutput, error) { - req, out := c.PutInstancePublicPortsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRebootInstance = "RebootInstance" - -// RebootInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RebootInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebootInstance for more information on using the RebootInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebootInstanceRequest method. -// req, resp := client.RebootInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootInstance -func (c *Lightsail) RebootInstanceRequest(input *RebootInstanceInput) (req *request.Request, output *RebootInstanceOutput) { - op := &request.Operation{ - Name: opRebootInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RebootInstanceInput{} - } - - output = &RebootInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// RebootInstance API operation for Amazon Lightsail. -// -// Restarts a specific instance. -// -// The reboot instance operation supports tag-based access control via resource -// tags applied to the resource identified by instanceName. For more information, -// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation RebootInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootInstance -func (c *Lightsail) RebootInstance(input *RebootInstanceInput) (*RebootInstanceOutput, error) { - req, out := c.RebootInstanceRequest(input) - return out, req.Send() -} - -// RebootInstanceWithContext is the same as RebootInstance with the addition of -// the ability to pass a context and additional request options. -// -// See RebootInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) RebootInstanceWithContext(ctx aws.Context, input *RebootInstanceInput, opts ...request.Option) (*RebootInstanceOutput, error) { - req, out := c.RebootInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRebootRelationalDatabase = "RebootRelationalDatabase" - -// RebootRelationalDatabaseRequest generates a "aws/request.Request" representing the -// client's request for the RebootRelationalDatabase operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebootRelationalDatabase for more information on using the RebootRelationalDatabase -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebootRelationalDatabaseRequest method. -// req, resp := client.RebootRelationalDatabaseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootRelationalDatabase -func (c *Lightsail) RebootRelationalDatabaseRequest(input *RebootRelationalDatabaseInput) (req *request.Request, output *RebootRelationalDatabaseOutput) { - op := &request.Operation{ - Name: opRebootRelationalDatabase, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RebootRelationalDatabaseInput{} - } - - output = &RebootRelationalDatabaseOutput{} - req = c.newRequest(op, input, output) - return -} - -// RebootRelationalDatabase API operation for Amazon Lightsail. -// -// Restarts a specific database in Amazon Lightsail. -// -// The reboot relational database operation supports tag-based access control -// via resource tags applied to the resource identified by relationalDatabaseName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation RebootRelationalDatabase for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootRelationalDatabase -func (c *Lightsail) RebootRelationalDatabase(input *RebootRelationalDatabaseInput) (*RebootRelationalDatabaseOutput, error) { - req, out := c.RebootRelationalDatabaseRequest(input) - return out, req.Send() -} - -// RebootRelationalDatabaseWithContext is the same as RebootRelationalDatabase with the addition of -// the ability to pass a context and additional request options. -// -// See RebootRelationalDatabase for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) RebootRelationalDatabaseWithContext(ctx aws.Context, input *RebootRelationalDatabaseInput, opts ...request.Option) (*RebootRelationalDatabaseOutput, error) { - req, out := c.RebootRelationalDatabaseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReleaseStaticIp = "ReleaseStaticIp" - -// ReleaseStaticIpRequest generates a "aws/request.Request" representing the -// client's request for the ReleaseStaticIp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReleaseStaticIp for more information on using the ReleaseStaticIp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReleaseStaticIpRequest method. -// req, resp := client.ReleaseStaticIpRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ReleaseStaticIp -func (c *Lightsail) ReleaseStaticIpRequest(input *ReleaseStaticIpInput) (req *request.Request, output *ReleaseStaticIpOutput) { - op := &request.Operation{ - Name: opReleaseStaticIp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReleaseStaticIpInput{} - } - - output = &ReleaseStaticIpOutput{} - req = c.newRequest(op, input, output) - return -} - -// ReleaseStaticIp API operation for Amazon Lightsail. -// -// Deletes a specific static IP from your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation ReleaseStaticIp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ReleaseStaticIp -func (c *Lightsail) ReleaseStaticIp(input *ReleaseStaticIpInput) (*ReleaseStaticIpOutput, error) { - req, out := c.ReleaseStaticIpRequest(input) - return out, req.Send() -} - -// ReleaseStaticIpWithContext is the same as ReleaseStaticIp with the addition of -// the ability to pass a context and additional request options. -// -// See ReleaseStaticIp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) ReleaseStaticIpWithContext(ctx aws.Context, input *ReleaseStaticIpInput, opts ...request.Option) (*ReleaseStaticIpOutput, error) { - req, out := c.ReleaseStaticIpRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartInstance = "StartInstance" - -// StartInstanceRequest generates a "aws/request.Request" representing the -// client's request for the StartInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartInstance for more information on using the StartInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartInstanceRequest method. -// req, resp := client.StartInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartInstance -func (c *Lightsail) StartInstanceRequest(input *StartInstanceInput) (req *request.Request, output *StartInstanceOutput) { - op := &request.Operation{ - Name: opStartInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartInstanceInput{} - } - - output = &StartInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartInstance API operation for Amazon Lightsail. -// -// Starts a specific Amazon Lightsail instance from a stopped state. To restart -// an instance, use the reboot instance operation. -// -// When you start a stopped instance, Lightsail assigns a new public IP address -// to the instance. To use the same IP address after stopping and starting an -// instance, create a static IP address and attach it to the instance. For more -// information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/lightsail-create-static-ip). -// -// The start instance operation supports tag-based access control via resource -// tags applied to the resource identified by instanceName. For more information, -// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation StartInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartInstance -func (c *Lightsail) StartInstance(input *StartInstanceInput) (*StartInstanceOutput, error) { - req, out := c.StartInstanceRequest(input) - return out, req.Send() -} - -// StartInstanceWithContext is the same as StartInstance with the addition of -// the ability to pass a context and additional request options. -// -// See StartInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) StartInstanceWithContext(ctx aws.Context, input *StartInstanceInput, opts ...request.Option) (*StartInstanceOutput, error) { - req, out := c.StartInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartRelationalDatabase = "StartRelationalDatabase" - -// StartRelationalDatabaseRequest generates a "aws/request.Request" representing the -// client's request for the StartRelationalDatabase operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartRelationalDatabase for more information on using the StartRelationalDatabase -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartRelationalDatabaseRequest method. -// req, resp := client.StartRelationalDatabaseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartRelationalDatabase -func (c *Lightsail) StartRelationalDatabaseRequest(input *StartRelationalDatabaseInput) (req *request.Request, output *StartRelationalDatabaseOutput) { - op := &request.Operation{ - Name: opStartRelationalDatabase, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartRelationalDatabaseInput{} - } - - output = &StartRelationalDatabaseOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartRelationalDatabase API operation for Amazon Lightsail. -// -// Starts a specific database from a stopped state in Amazon Lightsail. To restart -// a database, use the reboot relational database operation. -// -// The start relational database operation supports tag-based access control -// via resource tags applied to the resource identified by relationalDatabaseName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation StartRelationalDatabase for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartRelationalDatabase -func (c *Lightsail) StartRelationalDatabase(input *StartRelationalDatabaseInput) (*StartRelationalDatabaseOutput, error) { - req, out := c.StartRelationalDatabaseRequest(input) - return out, req.Send() -} - -// StartRelationalDatabaseWithContext is the same as StartRelationalDatabase with the addition of -// the ability to pass a context and additional request options. -// -// See StartRelationalDatabase for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) StartRelationalDatabaseWithContext(ctx aws.Context, input *StartRelationalDatabaseInput, opts ...request.Option) (*StartRelationalDatabaseOutput, error) { - req, out := c.StartRelationalDatabaseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopInstance = "StopInstance" - -// StopInstanceRequest generates a "aws/request.Request" representing the -// client's request for the StopInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopInstance for more information on using the StopInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopInstanceRequest method. -// req, resp := client.StopInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopInstance -func (c *Lightsail) StopInstanceRequest(input *StopInstanceInput) (req *request.Request, output *StopInstanceOutput) { - op := &request.Operation{ - Name: opStopInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopInstanceInput{} - } - - output = &StopInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopInstance API operation for Amazon Lightsail. -// -// Stops a specific Amazon Lightsail instance that is currently running. -// -// When you start a stopped instance, Lightsail assigns a new public IP address -// to the instance. To use the same IP address after stopping and starting an -// instance, create a static IP address and attach it to the instance. For more -// information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/lightsail-create-static-ip). -// -// The stop instance operation supports tag-based access control via resource -// tags applied to the resource identified by instanceName. For more information, -// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation StopInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopInstance -func (c *Lightsail) StopInstance(input *StopInstanceInput) (*StopInstanceOutput, error) { - req, out := c.StopInstanceRequest(input) - return out, req.Send() -} - -// StopInstanceWithContext is the same as StopInstance with the addition of -// the ability to pass a context and additional request options. -// -// See StopInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) StopInstanceWithContext(ctx aws.Context, input *StopInstanceInput, opts ...request.Option) (*StopInstanceOutput, error) { - req, out := c.StopInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopRelationalDatabase = "StopRelationalDatabase" - -// StopRelationalDatabaseRequest generates a "aws/request.Request" representing the -// client's request for the StopRelationalDatabase operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopRelationalDatabase for more information on using the StopRelationalDatabase -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopRelationalDatabaseRequest method. -// req, resp := client.StopRelationalDatabaseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopRelationalDatabase -func (c *Lightsail) StopRelationalDatabaseRequest(input *StopRelationalDatabaseInput) (req *request.Request, output *StopRelationalDatabaseOutput) { - op := &request.Operation{ - Name: opStopRelationalDatabase, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopRelationalDatabaseInput{} - } - - output = &StopRelationalDatabaseOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopRelationalDatabase API operation for Amazon Lightsail. -// -// Stops a specific database that is currently running in Amazon Lightsail. -// -// The stop relational database operation supports tag-based access control -// via resource tags applied to the resource identified by relationalDatabaseName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation StopRelationalDatabase for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopRelationalDatabase -func (c *Lightsail) StopRelationalDatabase(input *StopRelationalDatabaseInput) (*StopRelationalDatabaseOutput, error) { - req, out := c.StopRelationalDatabaseRequest(input) - return out, req.Send() -} - -// StopRelationalDatabaseWithContext is the same as StopRelationalDatabase with the addition of -// the ability to pass a context and additional request options. -// -// See StopRelationalDatabase for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) StopRelationalDatabaseWithContext(ctx aws.Context, input *StopRelationalDatabaseInput, opts ...request.Option) (*StopRelationalDatabaseOutput, error) { - req, out := c.StopRelationalDatabaseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const 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/lightsail-2016-11-28/TagResource -func (c *Lightsail) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// TagResource API operation for Amazon Lightsail. -// -// Adds one or more tags to the specified Amazon Lightsail resource. Each resource -// can have a maximum of 50 tags. Each tag consists of a key and an optional -// value. Tag keys must be unique per resource. For more information about tags, -// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). -// -// The tag resource operation supports tag-based access control via request -// tags and resource tags applied to the resource identified by resourceName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/TagResource -func (c *Lightsail) 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 *Lightsail) 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 opUnpeerVpc = "UnpeerVpc" - -// UnpeerVpcRequest generates a "aws/request.Request" representing the -// client's request for the UnpeerVpc operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UnpeerVpc for more information on using the UnpeerVpc -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UnpeerVpcRequest method. -// req, resp := client.UnpeerVpcRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UnpeerVpc -func (c *Lightsail) UnpeerVpcRequest(input *UnpeerVpcInput) (req *request.Request, output *UnpeerVpcOutput) { - op := &request.Operation{ - Name: opUnpeerVpc, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UnpeerVpcInput{} - } - - output = &UnpeerVpcOutput{} - req = c.newRequest(op, input, output) - return -} - -// UnpeerVpc API operation for Amazon Lightsail. -// -// Attempts to unpeer the Lightsail VPC from the user's default VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation UnpeerVpc for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UnpeerVpc -func (c *Lightsail) UnpeerVpc(input *UnpeerVpcInput) (*UnpeerVpcOutput, error) { - req, out := c.UnpeerVpcRequest(input) - return out, req.Send() -} - -// UnpeerVpcWithContext is the same as UnpeerVpc with the addition of -// the ability to pass a context and additional request options. -// -// See UnpeerVpc for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) UnpeerVpcWithContext(ctx aws.Context, input *UnpeerVpcInput, opts ...request.Option) (*UnpeerVpcOutput, error) { - req, out := c.UnpeerVpcRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const 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/lightsail-2016-11-28/UntagResource -func (c *Lightsail) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// UntagResource API operation for Amazon Lightsail. -// -// Deletes the specified set of tag keys and their values from the specified -// Amazon Lightsail resource. -// -// The untag resource operation supports tag-based access control via request -// tags and resource tags applied to the resource identified by resourceName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UntagResource -func (c *Lightsail) 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 *Lightsail) 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 opUpdateDomainEntry = "UpdateDomainEntry" - -// UpdateDomainEntryRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDomainEntry operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDomainEntry for more information on using the UpdateDomainEntry -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDomainEntryRequest method. -// req, resp := client.UpdateDomainEntryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateDomainEntry -func (c *Lightsail) UpdateDomainEntryRequest(input *UpdateDomainEntryInput) (req *request.Request, output *UpdateDomainEntryOutput) { - op := &request.Operation{ - Name: opUpdateDomainEntry, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateDomainEntryInput{} - } - - output = &UpdateDomainEntryOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDomainEntry API operation for Amazon Lightsail. -// -// Updates a domain recordset after it is created. -// -// The update domain entry operation supports tag-based access control via resource -// tags applied to the resource identified by domainName. For more information, -// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation UpdateDomainEntry for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateDomainEntry -func (c *Lightsail) UpdateDomainEntry(input *UpdateDomainEntryInput) (*UpdateDomainEntryOutput, error) { - req, out := c.UpdateDomainEntryRequest(input) - return out, req.Send() -} - -// UpdateDomainEntryWithContext is the same as UpdateDomainEntry with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDomainEntry for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) UpdateDomainEntryWithContext(ctx aws.Context, input *UpdateDomainEntryInput, opts ...request.Option) (*UpdateDomainEntryOutput, error) { - req, out := c.UpdateDomainEntryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateLoadBalancerAttribute = "UpdateLoadBalancerAttribute" - -// UpdateLoadBalancerAttributeRequest generates a "aws/request.Request" representing the -// client's request for the UpdateLoadBalancerAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateLoadBalancerAttribute for more information on using the UpdateLoadBalancerAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateLoadBalancerAttributeRequest method. -// req, resp := client.UpdateLoadBalancerAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateLoadBalancerAttribute -func (c *Lightsail) UpdateLoadBalancerAttributeRequest(input *UpdateLoadBalancerAttributeInput) (req *request.Request, output *UpdateLoadBalancerAttributeOutput) { - op := &request.Operation{ - Name: opUpdateLoadBalancerAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateLoadBalancerAttributeInput{} - } - - output = &UpdateLoadBalancerAttributeOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateLoadBalancerAttribute API operation for Amazon Lightsail. -// -// Updates the specified attribute for a load balancer. You can only update -// one attribute at a time. -// -// The update load balancer attribute operation supports tag-based access control -// via resource tags applied to the resource identified by loadBalancerName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation UpdateLoadBalancerAttribute for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateLoadBalancerAttribute -func (c *Lightsail) UpdateLoadBalancerAttribute(input *UpdateLoadBalancerAttributeInput) (*UpdateLoadBalancerAttributeOutput, error) { - req, out := c.UpdateLoadBalancerAttributeRequest(input) - return out, req.Send() -} - -// UpdateLoadBalancerAttributeWithContext is the same as UpdateLoadBalancerAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateLoadBalancerAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) UpdateLoadBalancerAttributeWithContext(ctx aws.Context, input *UpdateLoadBalancerAttributeInput, opts ...request.Option) (*UpdateLoadBalancerAttributeOutput, error) { - req, out := c.UpdateLoadBalancerAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRelationalDatabase = "UpdateRelationalDatabase" - -// UpdateRelationalDatabaseRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRelationalDatabase operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRelationalDatabase for more information on using the UpdateRelationalDatabase -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRelationalDatabaseRequest method. -// req, resp := client.UpdateRelationalDatabaseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateRelationalDatabase -func (c *Lightsail) UpdateRelationalDatabaseRequest(input *UpdateRelationalDatabaseInput) (req *request.Request, output *UpdateRelationalDatabaseOutput) { - op := &request.Operation{ - Name: opUpdateRelationalDatabase, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRelationalDatabaseInput{} - } - - output = &UpdateRelationalDatabaseOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRelationalDatabase API operation for Amazon Lightsail. -// -// Allows the update of one or more attributes of a database in Amazon Lightsail. -// -// Updates are applied immediately, or in cases where the updates could result -// in an outage, are applied during the database's predefined maintenance window. -// -// The update relational database operation supports tag-based access control -// via resource tags applied to the resource identified by relationalDatabaseName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation UpdateRelationalDatabase for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateRelationalDatabase -func (c *Lightsail) UpdateRelationalDatabase(input *UpdateRelationalDatabaseInput) (*UpdateRelationalDatabaseOutput, error) { - req, out := c.UpdateRelationalDatabaseRequest(input) - return out, req.Send() -} - -// UpdateRelationalDatabaseWithContext is the same as UpdateRelationalDatabase with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRelationalDatabase for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) UpdateRelationalDatabaseWithContext(ctx aws.Context, input *UpdateRelationalDatabaseInput, opts ...request.Option) (*UpdateRelationalDatabaseOutput, error) { - req, out := c.UpdateRelationalDatabaseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRelationalDatabaseParameters = "UpdateRelationalDatabaseParameters" - -// UpdateRelationalDatabaseParametersRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRelationalDatabaseParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRelationalDatabaseParameters for more information on using the UpdateRelationalDatabaseParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRelationalDatabaseParametersRequest method. -// req, resp := client.UpdateRelationalDatabaseParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateRelationalDatabaseParameters -func (c *Lightsail) UpdateRelationalDatabaseParametersRequest(input *UpdateRelationalDatabaseParametersInput) (req *request.Request, output *UpdateRelationalDatabaseParametersOutput) { - op := &request.Operation{ - Name: opUpdateRelationalDatabaseParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRelationalDatabaseParametersInput{} - } - - output = &UpdateRelationalDatabaseParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRelationalDatabaseParameters API operation for Amazon Lightsail. -// -// Allows the update of one or more parameters of a database in Amazon Lightsail. -// -// Parameter updates don't cause outages; therefore, their application is not -// subject to the preferred maintenance window. However, there are two ways -// in which paramater updates are applied: dynamic or pending-reboot. Parameters -// marked with a dynamic apply type are applied immediately. Parameters marked -// with a pending-reboot apply type are applied only after the database is rebooted -// using the reboot relational database operation. -// -// The update relational database parameters operation supports tag-based access -// control via resource tags applied to the resource identified by relationalDatabaseName. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Lightsail's -// API operation UpdateRelationalDatabaseParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceException "ServiceException" -// A general service exception. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// Lightsail throws this exception when user input does not conform to the validation -// rules of an input field. -// -// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. -// Please set your AWS Region configuration to us-east-1 to create, view, or -// edit these resources. -// -// * ErrCodeNotFoundException "NotFoundException" -// Lightsail throws this exception when it cannot find a resource. -// -// * ErrCodeOperationFailureException "OperationFailureException" -// Lightsail throws this exception when an operation fails to execute. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// Lightsail throws this exception when the user cannot be authenticated or -// uses invalid credentials to access a resource. -// -// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" -// Lightsail throws this exception when an account is still in the setup in -// progress state. -// -// * ErrCodeUnauthenticatedException "UnauthenticatedException" -// Lightsail throws this exception when the user has not been authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateRelationalDatabaseParameters -func (c *Lightsail) UpdateRelationalDatabaseParameters(input *UpdateRelationalDatabaseParametersInput) (*UpdateRelationalDatabaseParametersOutput, error) { - req, out := c.UpdateRelationalDatabaseParametersRequest(input) - return out, req.Send() -} - -// UpdateRelationalDatabaseParametersWithContext is the same as UpdateRelationalDatabaseParameters with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRelationalDatabaseParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Lightsail) UpdateRelationalDatabaseParametersWithContext(ctx aws.Context, input *UpdateRelationalDatabaseParametersInput, opts ...request.Option) (*UpdateRelationalDatabaseParametersOutput, error) { - req, out := c.UpdateRelationalDatabaseParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AllocateStaticIpInput struct { - _ struct{} `type:"structure"` - - // The name of the static IP address. - // - // StaticIpName is a required field - StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` -} - -// String returns the string representation -func (s AllocateStaticIpInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AllocateStaticIpInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AllocateStaticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AllocateStaticIpInput"} - if s.StaticIpName == nil { - invalidParams.Add(request.NewErrParamRequired("StaticIpName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStaticIpName sets the StaticIpName field's value. -func (s *AllocateStaticIpInput) SetStaticIpName(v string) *AllocateStaticIpInput { - s.StaticIpName = &v - return s -} - -type AllocateStaticIpOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the static IP address - // you allocated. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s AllocateStaticIpOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AllocateStaticIpOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *AllocateStaticIpOutput) SetOperations(v []*Operation) *AllocateStaticIpOutput { - s.Operations = v - return s -} - -type AttachDiskInput struct { - _ struct{} `type:"structure"` - - // The unique Lightsail disk name (e.g., my-disk). - // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` - - // The disk path to expose to the instance (e.g., /dev/xvdf). - // - // DiskPath is a required field - DiskPath *string `locationName:"diskPath" type:"string" required:"true"` - - // The name of the Lightsail instance where you want to utilize the storage - // disk. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachDiskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachDiskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachDiskInput"} - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) - } - if s.DiskPath == nil { - invalidParams.Add(request.NewErrParamRequired("DiskPath")) - } - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskName sets the DiskName field's value. -func (s *AttachDiskInput) SetDiskName(v string) *AttachDiskInput { - s.DiskName = &v - return s -} - -// SetDiskPath sets the DiskPath field's value. -func (s *AttachDiskInput) SetDiskPath(v string) *AttachDiskInput { - s.DiskPath = &v - return s -} - -// SetInstanceName sets the InstanceName field's value. -func (s *AttachDiskInput) SetInstanceName(v string) *AttachDiskInput { - s.InstanceName = &v - return s -} - -type AttachDiskOutput struct { - _ struct{} `type:"structure"` - - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s AttachDiskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachDiskOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *AttachDiskOutput) SetOperations(v []*Operation) *AttachDiskOutput { - s.Operations = v - return s -} - -type AttachInstancesToLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // An array of strings representing the instance name(s) you want to attach - // to your load balancer. - // - // An instance must be running before you can attach it to your load balancer. - // - // There are no additional limits on the number of instances you can attach - // to your load balancer, aside from the limit of Lightsail instances you can - // create in your account (20). - // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachInstancesToLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachInstancesToLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachInstancesToLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachInstancesToLoadBalancerInput"} - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceNames sets the InstanceNames field's value. -func (s *AttachInstancesToLoadBalancerInput) SetInstanceNames(v []*string) *AttachInstancesToLoadBalancerInput { - s.InstanceNames = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *AttachInstancesToLoadBalancerInput) SetLoadBalancerName(v string) *AttachInstancesToLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -type AttachInstancesToLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // An object representing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s AttachInstancesToLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachInstancesToLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *AttachInstancesToLoadBalancerOutput) SetOperations(v []*Operation) *AttachInstancesToLoadBalancerOutput { - s.Operations = v - return s -} - -type AttachLoadBalancerTlsCertificateInput struct { - _ struct{} `type:"structure"` - - // The name of your SSL/TLS certificate. - // - // CertificateName is a required field - CertificateName *string `locationName:"certificateName" type:"string" required:"true"` - - // The name of the load balancer to which you want to associate the SSL/TLS - // certificate. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachLoadBalancerTlsCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachLoadBalancerTlsCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachLoadBalancerTlsCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancerTlsCertificateInput"} - if s.CertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateName")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateName sets the CertificateName field's value. -func (s *AttachLoadBalancerTlsCertificateInput) SetCertificateName(v string) *AttachLoadBalancerTlsCertificateInput { - s.CertificateName = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *AttachLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *AttachLoadBalancerTlsCertificateInput { - s.LoadBalancerName = &v - return s -} - -type AttachLoadBalancerTlsCertificateOutput struct { - _ struct{} `type:"structure"` - - // An object representing the API operations. - // - // These SSL/TLS certificates are only usable by Lightsail load balancers. You - // can't get the certificate and use it for another purpose. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s AttachLoadBalancerTlsCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachLoadBalancerTlsCertificateOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *AttachLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *AttachLoadBalancerTlsCertificateOutput { - s.Operations = v - return s -} - -type AttachStaticIpInput struct { - _ struct{} `type:"structure"` - - // The instance name to which you want to attach the static IP address. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - - // The name of the static IP. - // - // StaticIpName is a required field - StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachStaticIpInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachStaticIpInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachStaticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachStaticIpInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - if s.StaticIpName == nil { - invalidParams.Add(request.NewErrParamRequired("StaticIpName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *AttachStaticIpInput) SetInstanceName(v string) *AttachStaticIpInput { - s.InstanceName = &v - return s -} - -// SetStaticIpName sets the StaticIpName field's value. -func (s *AttachStaticIpInput) SetStaticIpName(v string) *AttachStaticIpInput { - s.StaticIpName = &v - return s -} - -type AttachStaticIpOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about your API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s AttachStaticIpOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachStaticIpOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *AttachStaticIpOutput) SetOperations(v []*Operation) *AttachStaticIpOutput { - s.Operations = v - return s -} - -// Describes an Availability Zone. -type AvailabilityZone struct { - _ struct{} `type:"structure"` - - // The state of the Availability Zone. - State *string `locationName:"state" type:"string"` - - // The name of the Availability Zone. The format is us-east-2a (case-sensitive). - ZoneName *string `locationName:"zoneName" type:"string"` -} - -// String returns the string representation -func (s AvailabilityZone) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailabilityZone) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *AvailabilityZone) SetState(v string) *AvailabilityZone { - s.State = &v - return s -} - -// SetZoneName sets the ZoneName field's value. -func (s *AvailabilityZone) SetZoneName(v string) *AvailabilityZone { - s.ZoneName = &v - return s -} - -// Describes a blueprint (a virtual private server image). -type Blueprint struct { - _ struct{} `type:"structure"` - - // The ID for the virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). - BlueprintId *string `locationName:"blueprintId" type:"string"` - - // The description of the blueprint. - Description *string `locationName:"description" type:"string"` - - // The group name of the blueprint (e.g., amazon-linux). - Group *string `locationName:"group" type:"string"` - - // A Boolean value indicating whether the blueprint is active. Inactive blueprints - // are listed to support customers with existing instances but are not necessarily - // available for launch of new instances. Blueprints are marked inactive when - // they become outdated due to operating system updates or new application releases. - IsActive *bool `locationName:"isActive" type:"boolean"` - - // The end-user license agreement URL for the image or blueprint. - LicenseUrl *string `locationName:"licenseUrl" type:"string"` - - // The minimum bundle power required to run this blueprint. For example, you - // need a bundle with a power value of 500 or more to create an instance that - // uses a blueprint with a minimum power value of 500. 0 indicates that the - // blueprint runs on all instance sizes. - MinPower *int64 `locationName:"minPower" type:"integer"` - - // The friendly name of the blueprint (e.g., Amazon Linux). - Name *string `locationName:"name" type:"string"` - - // The operating system platform (either Linux/Unix-based or Windows Server-based) - // of the blueprint. - Platform *string `locationName:"platform" type:"string" enum:"InstancePlatform"` - - // The product URL to learn more about the image or blueprint. - ProductUrl *string `locationName:"productUrl" type:"string"` - - // The type of the blueprint (e.g., os or app). - Type *string `locationName:"type" type:"string" enum:"BlueprintType"` - - // The version number of the operating system, application, or stack (e.g., - // 2016.03.0). - Version *string `locationName:"version" type:"string"` - - // The version code. - VersionCode *string `locationName:"versionCode" type:"string"` -} - -// String returns the string representation -func (s Blueprint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Blueprint) GoString() string { - return s.String() -} - -// SetBlueprintId sets the BlueprintId field's value. -func (s *Blueprint) SetBlueprintId(v string) *Blueprint { - s.BlueprintId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Blueprint) SetDescription(v string) *Blueprint { - s.Description = &v - return s -} - -// SetGroup sets the Group field's value. -func (s *Blueprint) SetGroup(v string) *Blueprint { - s.Group = &v - return s -} - -// SetIsActive sets the IsActive field's value. -func (s *Blueprint) SetIsActive(v bool) *Blueprint { - s.IsActive = &v - return s -} - -// SetLicenseUrl sets the LicenseUrl field's value. -func (s *Blueprint) SetLicenseUrl(v string) *Blueprint { - s.LicenseUrl = &v - return s -} - -// SetMinPower sets the MinPower field's value. -func (s *Blueprint) SetMinPower(v int64) *Blueprint { - s.MinPower = &v - return s -} - -// SetName sets the Name field's value. -func (s *Blueprint) SetName(v string) *Blueprint { - s.Name = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *Blueprint) SetPlatform(v string) *Blueprint { - s.Platform = &v - return s -} - -// SetProductUrl sets the ProductUrl field's value. -func (s *Blueprint) SetProductUrl(v string) *Blueprint { - s.ProductUrl = &v - return s -} - -// SetType sets the Type field's value. -func (s *Blueprint) SetType(v string) *Blueprint { - s.Type = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *Blueprint) SetVersion(v string) *Blueprint { - s.Version = &v - return s -} - -// SetVersionCode sets the VersionCode field's value. -func (s *Blueprint) SetVersionCode(v string) *Blueprint { - s.VersionCode = &v - return s -} - -// Describes a bundle, which is a set of specs describing your virtual private -// server (or instance). -type Bundle struct { - _ struct{} `type:"structure"` - - // The bundle ID (e.g., micro_1_0). - BundleId *string `locationName:"bundleId" type:"string"` - - // The number of vCPUs included in the bundle (e.g., 2). - CpuCount *int64 `locationName:"cpuCount" type:"integer"` - - // The size of the SSD (e.g., 30). - DiskSizeInGb *int64 `locationName:"diskSizeInGb" type:"integer"` - - // The Amazon EC2 instance type (e.g., t2.micro). - InstanceType *string `locationName:"instanceType" type:"string"` - - // A Boolean value indicating whether the bundle is active. - IsActive *bool `locationName:"isActive" type:"boolean"` - - // A friendly name for the bundle (e.g., Micro). - Name *string `locationName:"name" type:"string"` - - // A numeric value that represents the power of the bundle (e.g., 500). You - // can use the bundle's power value in conjunction with a blueprint's minimum - // power value to determine whether the blueprint will run on the bundle. For - // example, you need a bundle with a power value of 500 or more to create an - // instance that uses a blueprint with a minimum power value of 500. - Power *int64 `locationName:"power" type:"integer"` - - // The price in US dollars (e.g., 5.0). - Price *float64 `locationName:"price" type:"float"` - - // The amount of RAM in GB (e.g., 2.0). - RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` - - // The operating system platform (Linux/Unix-based or Windows Server-based) - // that the bundle supports. You can only launch a WINDOWS bundle on a blueprint - // that supports the WINDOWS platform. LINUX_UNIX blueprints require a LINUX_UNIX - // bundle. - SupportedPlatforms []*string `locationName:"supportedPlatforms" type:"list"` - - // The data transfer rate per month in GB (e.g., 2000). - TransferPerMonthInGb *int64 `locationName:"transferPerMonthInGb" type:"integer"` -} - -// String returns the string representation -func (s Bundle) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Bundle) GoString() string { - return s.String() -} - -// SetBundleId sets the BundleId field's value. -func (s *Bundle) SetBundleId(v string) *Bundle { - s.BundleId = &v - return s -} - -// SetCpuCount sets the CpuCount field's value. -func (s *Bundle) SetCpuCount(v int64) *Bundle { - s.CpuCount = &v - return s -} - -// SetDiskSizeInGb sets the DiskSizeInGb field's value. -func (s *Bundle) SetDiskSizeInGb(v int64) *Bundle { - s.DiskSizeInGb = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *Bundle) SetInstanceType(v string) *Bundle { - s.InstanceType = &v - return s -} - -// SetIsActive sets the IsActive field's value. -func (s *Bundle) SetIsActive(v bool) *Bundle { - s.IsActive = &v - return s -} - -// SetName sets the Name field's value. -func (s *Bundle) SetName(v string) *Bundle { - s.Name = &v - return s -} - -// SetPower sets the Power field's value. -func (s *Bundle) SetPower(v int64) *Bundle { - s.Power = &v - return s -} - -// SetPrice sets the Price field's value. -func (s *Bundle) SetPrice(v float64) *Bundle { - s.Price = &v - return s -} - -// SetRamSizeInGb sets the RamSizeInGb field's value. -func (s *Bundle) SetRamSizeInGb(v float64) *Bundle { - s.RamSizeInGb = &v - return s -} - -// SetSupportedPlatforms sets the SupportedPlatforms field's value. -func (s *Bundle) SetSupportedPlatforms(v []*string) *Bundle { - s.SupportedPlatforms = v - return s -} - -// SetTransferPerMonthInGb sets the TransferPerMonthInGb field's value. -func (s *Bundle) SetTransferPerMonthInGb(v int64) *Bundle { - s.TransferPerMonthInGb = &v - return s -} - -type CloseInstancePublicPortsInput struct { - _ struct{} `type:"structure"` - - // The name of the instance on which you're attempting to close the public ports. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - - // Information about the public port you are trying to close. - // - // PortInfo is a required field - PortInfo *PortInfo `locationName:"portInfo" type:"structure" required:"true"` -} - -// String returns the string representation -func (s CloseInstancePublicPortsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloseInstancePublicPortsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CloseInstancePublicPortsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloseInstancePublicPortsInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - if s.PortInfo == nil { - invalidParams.Add(request.NewErrParamRequired("PortInfo")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *CloseInstancePublicPortsInput) SetInstanceName(v string) *CloseInstancePublicPortsInput { - s.InstanceName = &v - return s -} - -// SetPortInfo sets the PortInfo field's value. -func (s *CloseInstancePublicPortsInput) SetPortInfo(v *PortInfo) *CloseInstancePublicPortsInput { - s.PortInfo = v - return s -} - -type CloseInstancePublicPortsOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs that contains information about the operation. - Operation *Operation `locationName:"operation" type:"structure"` -} - -// String returns the string representation -func (s CloseInstancePublicPortsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloseInstancePublicPortsOutput) GoString() string { - return s.String() -} - -// SetOperation sets the Operation field's value. -func (s *CloseInstancePublicPortsOutput) SetOperation(v *Operation) *CloseInstancePublicPortsOutput { - s.Operation = v - return s -} - -// Describes a CloudFormation stack record created as a result of the create -// cloud formation stack operation. -// -// A CloudFormation stack record provides information about the AWS CloudFormation -// stack used to create a new Amazon Elastic Compute Cloud instance from an -// exported Lightsail instance snapshot. -type CloudFormationStackRecord struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the CloudFormation stack record. - Arn *string `locationName:"arn" type:"string"` - - // The date when the CloudFormation stack record was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // A list of objects describing the destination service, which is AWS CloudFormation, - // and the Amazon Resource Name (ARN) of the AWS CloudFormation stack. - DestinationInfo *DestinationInfo `locationName:"destinationInfo" type:"structure"` - - // A list of objects describing the Availability Zone and AWS Region of the - // CloudFormation stack record. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The name of the CloudFormation stack record. It starts with CloudFormationStackRecord - // followed by a GUID. - Name *string `locationName:"name" type:"string"` - - // The Lightsail resource type (e.g., CloudFormationStackRecord). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // A list of objects describing the source of the CloudFormation stack record. - SourceInfo []*CloudFormationStackRecordSourceInfo `locationName:"sourceInfo" type:"list"` - - // The current state of the CloudFormation stack record. - State *string `locationName:"state" type:"string" enum:"RecordState"` -} - -// String returns the string representation -func (s CloudFormationStackRecord) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudFormationStackRecord) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *CloudFormationStackRecord) SetArn(v string) *CloudFormationStackRecord { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *CloudFormationStackRecord) SetCreatedAt(v time.Time) *CloudFormationStackRecord { - s.CreatedAt = &v - return s -} - -// SetDestinationInfo sets the DestinationInfo field's value. -func (s *CloudFormationStackRecord) SetDestinationInfo(v *DestinationInfo) *CloudFormationStackRecord { - s.DestinationInfo = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CloudFormationStackRecord) SetLocation(v *ResourceLocation) *CloudFormationStackRecord { - s.Location = v - return s -} - -// SetName sets the Name field's value. -func (s *CloudFormationStackRecord) SetName(v string) *CloudFormationStackRecord { - s.Name = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *CloudFormationStackRecord) SetResourceType(v string) *CloudFormationStackRecord { - s.ResourceType = &v - return s -} - -// SetSourceInfo sets the SourceInfo field's value. -func (s *CloudFormationStackRecord) SetSourceInfo(v []*CloudFormationStackRecordSourceInfo) *CloudFormationStackRecord { - s.SourceInfo = v - return s -} - -// SetState sets the State field's value. -func (s *CloudFormationStackRecord) SetState(v string) *CloudFormationStackRecord { - s.State = &v - return s -} - -// Describes the source of a CloudFormation stack record (i.e., the export snapshot -// record). -type CloudFormationStackRecordSourceInfo struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the export snapshot record. - Arn *string `locationName:"arn" type:"string"` - - // The name of the record. - Name *string `locationName:"name" type:"string"` - - // The Lightsail resource type (e.g., ExportSnapshotRecord). - ResourceType *string `locationName:"resourceType" type:"string" enum:"CloudFormationStackRecordSourceType"` -} - -// String returns the string representation -func (s CloudFormationStackRecordSourceInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudFormationStackRecordSourceInfo) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *CloudFormationStackRecordSourceInfo) SetArn(v string) *CloudFormationStackRecordSourceInfo { - s.Arn = &v - return s -} - -// SetName sets the Name field's value. -func (s *CloudFormationStackRecordSourceInfo) SetName(v string) *CloudFormationStackRecordSourceInfo { - s.Name = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *CloudFormationStackRecordSourceInfo) SetResourceType(v string) *CloudFormationStackRecordSourceInfo { - s.ResourceType = &v - return s -} - -type CopySnapshotInput struct { - _ struct{} `type:"structure"` - - // The AWS Region where the source snapshot is located. - // - // SourceRegion is a required field - SourceRegion *string `locationName:"sourceRegion" type:"string" required:"true" enum:"RegionName"` - - // The name of the source instance or disk snapshot to be copied. - // - // SourceSnapshotName is a required field - SourceSnapshotName *string `locationName:"sourceSnapshotName" type:"string" required:"true"` - - // The name of the new instance or disk snapshot to be created as a copy. - // - // TargetSnapshotName is a required field - TargetSnapshotName *string `locationName:"targetSnapshotName" type:"string" required:"true"` -} - -// String returns the string representation -func (s CopySnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopySnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopySnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopySnapshotInput"} - if s.SourceRegion == nil { - invalidParams.Add(request.NewErrParamRequired("SourceRegion")) - } - if s.SourceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("SourceSnapshotName")) - } - if s.TargetSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("TargetSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceRegion sets the SourceRegion field's value. -func (s *CopySnapshotInput) SetSourceRegion(v string) *CopySnapshotInput { - s.SourceRegion = &v - return s -} - -// SetSourceSnapshotName sets the SourceSnapshotName field's value. -func (s *CopySnapshotInput) SetSourceSnapshotName(v string) *CopySnapshotInput { - s.SourceSnapshotName = &v - return s -} - -// SetTargetSnapshotName sets the TargetSnapshotName field's value. -func (s *CopySnapshotInput) SetTargetSnapshotName(v string) *CopySnapshotInput { - s.TargetSnapshotName = &v - return s -} - -type CopySnapshotOutput struct { - _ struct{} `type:"structure"` - - // A list of objects describing the API operation. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s CopySnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopySnapshotOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *CopySnapshotOutput) SetOperations(v []*Operation) *CopySnapshotOutput { - s.Operations = v - return s -} - -type CreateCloudFormationStackInput struct { - _ struct{} `type:"structure"` - - // An array of parameters that will be used to create the new Amazon EC2 instance. - // You can only pass one instance entry at a time in this array. You will get - // an invalid parameter error if you pass more than one instance entry in this - // array. - // - // Instances is a required field - Instances []*InstanceEntry `locationName:"instances" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateCloudFormationStackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCloudFormationStackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCloudFormationStackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCloudFormationStackInput"} - if s.Instances == nil { - invalidParams.Add(request.NewErrParamRequired("Instances")) - } - if s.Instances != nil { - for i, v := range s.Instances { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Instances", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstances sets the Instances field's value. -func (s *CreateCloudFormationStackInput) SetInstances(v []*InstanceEntry) *CreateCloudFormationStackInput { - s.Instances = v - return s -} - -type CreateCloudFormationStackOutput struct { - _ struct{} `type:"structure"` - - // A list of objects describing the API operation. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s CreateCloudFormationStackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCloudFormationStackOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *CreateCloudFormationStackOutput) SetOperations(v []*Operation) *CreateCloudFormationStackOutput { - s.Operations = v - return s -} - -type CreateDiskFromSnapshotInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone where you want to create the disk (e.g., us-east-2a). - // Choose the same Availability Zone as the Lightsail instance where you want - // to create the disk. - // - // Use the GetRegions operation to list the Availability Zones where Lightsail - // is currently available. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // The unique Lightsail disk name (e.g., my-disk). - // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` - - // The name of the disk snapshot (e.g., my-snapshot) from which to create the - // new storage disk. - // - // DiskSnapshotName is a required field - DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` - - // The size of the disk in GB (e.g., 32). - // - // SizeInGb is a required field - SizeInGb *int64 `locationName:"sizeInGb" type:"integer" required:"true"` - - // The tag keys and optional values to add to the resource during create. - // - // To tag a resource after it has been created, see the tag resource operation. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateDiskFromSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDiskFromSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDiskFromSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDiskFromSnapshotInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) - } - if s.DiskSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) - } - if s.SizeInGb == nil { - invalidParams.Add(request.NewErrParamRequired("SizeInGb")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateDiskFromSnapshotInput) SetAvailabilityZone(v string) *CreateDiskFromSnapshotInput { - s.AvailabilityZone = &v - return s -} - -// SetDiskName sets the DiskName field's value. -func (s *CreateDiskFromSnapshotInput) SetDiskName(v string) *CreateDiskFromSnapshotInput { - s.DiskName = &v - return s -} - -// SetDiskSnapshotName sets the DiskSnapshotName field's value. -func (s *CreateDiskFromSnapshotInput) SetDiskSnapshotName(v string) *CreateDiskFromSnapshotInput { - s.DiskSnapshotName = &v - return s -} - -// SetSizeInGb sets the SizeInGb field's value. -func (s *CreateDiskFromSnapshotInput) SetSizeInGb(v int64) *CreateDiskFromSnapshotInput { - s.SizeInGb = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDiskFromSnapshotInput) SetTags(v []*Tag) *CreateDiskFromSnapshotInput { - s.Tags = v - return s -} - -type CreateDiskFromSnapshotOutput struct { - _ struct{} `type:"structure"` - - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s CreateDiskFromSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDiskFromSnapshotOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *CreateDiskFromSnapshotOutput) SetOperations(v []*Operation) *CreateDiskFromSnapshotOutput { - s.Operations = v - return s -} - -type CreateDiskInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone where you want to create the disk (e.g., us-east-2a). - // Choose the same Availability Zone as the Lightsail instance where you want - // to create the disk. - // - // Use the GetRegions operation to list the Availability Zones where Lightsail - // is currently available. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // The unique Lightsail disk name (e.g., my-disk). - // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` - - // The size of the disk in GB (e.g., 32). - // - // SizeInGb is a required field - SizeInGb *int64 `locationName:"sizeInGb" type:"integer" required:"true"` - - // The tag keys and optional values to add to the resource during create. - // - // To tag a resource after it has been created, see the tag resource operation. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateDiskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDiskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDiskInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) - } - if s.SizeInGb == nil { - invalidParams.Add(request.NewErrParamRequired("SizeInGb")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateDiskInput) SetAvailabilityZone(v string) *CreateDiskInput { - s.AvailabilityZone = &v - return s -} - -// SetDiskName sets the DiskName field's value. -func (s *CreateDiskInput) SetDiskName(v string) *CreateDiskInput { - s.DiskName = &v - return s -} - -// SetSizeInGb sets the SizeInGb field's value. -func (s *CreateDiskInput) SetSizeInGb(v int64) *CreateDiskInput { - s.SizeInGb = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDiskInput) SetTags(v []*Tag) *CreateDiskInput { - s.Tags = v - return s -} - -type CreateDiskOutput struct { - _ struct{} `type:"structure"` - - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s CreateDiskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDiskOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *CreateDiskOutput) SetOperations(v []*Operation) *CreateDiskOutput { - s.Operations = v - return s -} - -type CreateDiskSnapshotInput struct { - _ struct{} `type:"structure"` - - // The unique name of the source disk (e.g., Disk-Virginia-1). - // - // This parameter cannot be defined together with the instance name parameter. - // The disk name and instance name parameters are mutually exclusive. - DiskName *string `locationName:"diskName" type:"string"` - - // The name of the destination disk snapshot (e.g., my-disk-snapshot) based - // on the source disk. - // - // DiskSnapshotName is a required field - DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` - - // The unique name of the source instance (e.g., Amazon_Linux-512MB-Virginia-1). - // When this is defined, a snapshot of the instance's system volume is created. - // - // This parameter cannot be defined together with the disk name parameter. The - // instance name and disk name parameters are mutually exclusive. - InstanceName *string `locationName:"instanceName" type:"string"` - - // The tag keys and optional values to add to the resource during create. - // - // To tag a resource after it has been created, see the tag resource operation. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateDiskSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDiskSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDiskSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDiskSnapshotInput"} - if s.DiskSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskName sets the DiskName field's value. -func (s *CreateDiskSnapshotInput) SetDiskName(v string) *CreateDiskSnapshotInput { - s.DiskName = &v - return s -} - -// SetDiskSnapshotName sets the DiskSnapshotName field's value. -func (s *CreateDiskSnapshotInput) SetDiskSnapshotName(v string) *CreateDiskSnapshotInput { - s.DiskSnapshotName = &v - return s -} - -// SetInstanceName sets the InstanceName field's value. -func (s *CreateDiskSnapshotInput) SetInstanceName(v string) *CreateDiskSnapshotInput { - s.InstanceName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDiskSnapshotInput) SetTags(v []*Tag) *CreateDiskSnapshotInput { - s.Tags = v - return s -} - -type CreateDiskSnapshotOutput struct { - _ struct{} `type:"structure"` - - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s CreateDiskSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDiskSnapshotOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *CreateDiskSnapshotOutput) SetOperations(v []*Operation) *CreateDiskSnapshotOutput { - s.Operations = v - return s -} - -type CreateDomainEntryInput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the domain entry - // request. - // - // DomainEntry is a required field - DomainEntry *DomainEntry `locationName:"domainEntry" type:"structure" required:"true"` - - // The domain name (e.g., example.com) for which you want to create the domain - // entry. - // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateDomainEntryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDomainEntryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDomainEntryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDomainEntryInput"} - if s.DomainEntry == nil { - invalidParams.Add(request.NewErrParamRequired("DomainEntry")) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainEntry sets the DomainEntry field's value. -func (s *CreateDomainEntryInput) SetDomainEntry(v *DomainEntry) *CreateDomainEntryInput { - s.DomainEntry = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *CreateDomainEntryInput) SetDomainName(v string) *CreateDomainEntryInput { - s.DomainName = &v - return s -} - -type CreateDomainEntryOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the operation. - Operation *Operation `locationName:"operation" type:"structure"` -} - -// String returns the string representation -func (s CreateDomainEntryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDomainEntryOutput) GoString() string { - return s.String() -} - -// SetOperation sets the Operation field's value. -func (s *CreateDomainEntryOutput) SetOperation(v *Operation) *CreateDomainEntryOutput { - s.Operation = v - return s -} - -type CreateDomainInput struct { - _ struct{} `type:"structure"` - - // The domain name to manage (e.g., example.com). - // - // You cannot register a new domain name using Lightsail. You must register - // a domain name using Amazon Route 53 or another domain name registrar. If - // you have already registered your domain, you can enter its name in this parameter - // to manage the DNS records for that domain. - // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` - - // The tag keys and optional values to add to the resource during create. - // - // To tag a resource after it has been created, see the tag resource operation. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *CreateDomainInput) SetDomainName(v string) *CreateDomainInput { - s.DomainName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDomainInput) SetTags(v []*Tag) *CreateDomainInput { - s.Tags = v - return s -} - -type CreateDomainOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the domain resource - // you created. - Operation *Operation `locationName:"operation" type:"structure"` -} - -// String returns the string representation -func (s CreateDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDomainOutput) GoString() string { - return s.String() -} - -// SetOperation sets the Operation field's value. -func (s *CreateDomainOutput) SetOperation(v *Operation) *CreateDomainOutput { - s.Operation = v - return s -} - -type CreateInstanceSnapshotInput struct { - _ struct{} `type:"structure"` - - // The Lightsail instance on which to base your snapshot. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - - // The name for your new snapshot. - // - // InstanceSnapshotName is a required field - InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` - - // The tag keys and optional values to add to the resource during create. - // - // To tag a resource after it has been created, see the tag resource operation. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateInstanceSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInstanceSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstanceSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstanceSnapshotInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - if s.InstanceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *CreateInstanceSnapshotInput) SetInstanceName(v string) *CreateInstanceSnapshotInput { - s.InstanceName = &v - return s -} - -// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. -func (s *CreateInstanceSnapshotInput) SetInstanceSnapshotName(v string) *CreateInstanceSnapshotInput { - s.InstanceSnapshotName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateInstanceSnapshotInput) SetTags(v []*Tag) *CreateInstanceSnapshotInput { - s.Tags = v - return s -} - -type CreateInstanceSnapshotOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the results of your - // create instances snapshot request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s CreateInstanceSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInstanceSnapshotOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *CreateInstanceSnapshotOutput) SetOperations(v []*Operation) *CreateInstanceSnapshotOutput { - s.Operations = v - return s -} - -type CreateInstancesFromSnapshotInput struct { - _ struct{} `type:"structure"` - - // An object containing information about one or more disk mappings. - AttachedDiskMapping map[string][]*DiskMap `locationName:"attachedDiskMapping" type:"map"` - - // The Availability Zone where you want to create your instances. Use the following - // formatting: us-east-2a (case sensitive). You can get a list of Availability - // Zones by using the get regions (http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) - // operation. Be sure to add the include Availability Zones parameter to your - // request. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // The bundle of specification information for your virtual private server (or - // instance), including the pricing plan (e.g., micro_1_0). - // - // BundleId is a required field - BundleId *string `locationName:"bundleId" type:"string" required:"true"` - - // The names for your new instances. - // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` - - // The name of the instance snapshot on which you are basing your new instances. - // Use the get instance snapshots operation to return information about your - // existing snapshots. - // - // InstanceSnapshotName is a required field - InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` - - // The name for your key pair. - KeyPairName *string `locationName:"keyPairName" type:"string"` - - // The tag keys and optional values to add to the resource during create. - // - // To tag a resource after it has been created, see the tag resource operation. - Tags []*Tag `locationName:"tags" type:"list"` - - // You can create a launch script that configures a server with additional user - // data. For example, apt-get -y update. - // - // Depending on the machine image you choose, the command to get software on - // your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu - // use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide - // (https://lightsail.aws.amazon.com/ls/docs/getting-started/article/compare-options-choose-lightsail-instance-image). - UserData *string `locationName:"userData" type:"string"` -} - -// String returns the string representation -func (s CreateInstancesFromSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInstancesFromSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstancesFromSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstancesFromSnapshotInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.BundleId == nil { - invalidParams.Add(request.NewErrParamRequired("BundleId")) - } - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) - } - if s.InstanceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttachedDiskMapping sets the AttachedDiskMapping field's value. -func (s *CreateInstancesFromSnapshotInput) SetAttachedDiskMapping(v map[string][]*DiskMap) *CreateInstancesFromSnapshotInput { - s.AttachedDiskMapping = v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateInstancesFromSnapshotInput) SetAvailabilityZone(v string) *CreateInstancesFromSnapshotInput { - s.AvailabilityZone = &v - return s -} - -// SetBundleId sets the BundleId field's value. -func (s *CreateInstancesFromSnapshotInput) SetBundleId(v string) *CreateInstancesFromSnapshotInput { - s.BundleId = &v - return s -} - -// SetInstanceNames sets the InstanceNames field's value. -func (s *CreateInstancesFromSnapshotInput) SetInstanceNames(v []*string) *CreateInstancesFromSnapshotInput { - s.InstanceNames = v - return s -} - -// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. -func (s *CreateInstancesFromSnapshotInput) SetInstanceSnapshotName(v string) *CreateInstancesFromSnapshotInput { - s.InstanceSnapshotName = &v - return s -} - -// SetKeyPairName sets the KeyPairName field's value. -func (s *CreateInstancesFromSnapshotInput) SetKeyPairName(v string) *CreateInstancesFromSnapshotInput { - s.KeyPairName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateInstancesFromSnapshotInput) SetTags(v []*Tag) *CreateInstancesFromSnapshotInput { - s.Tags = v - return s -} - -// SetUserData sets the UserData field's value. -func (s *CreateInstancesFromSnapshotInput) SetUserData(v string) *CreateInstancesFromSnapshotInput { - s.UserData = &v - return s -} - -type CreateInstancesFromSnapshotOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the results of your - // create instances from snapshot request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s CreateInstancesFromSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInstancesFromSnapshotOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *CreateInstancesFromSnapshotOutput) SetOperations(v []*Operation) *CreateInstancesFromSnapshotOutput { - s.Operations = v - return s -} - -type CreateInstancesInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which to create your instance. Use the following - // format: us-east-2a (case sensitive). You can get a list of Availability Zones - // by using the get regions (http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) - // operation. Be sure to add the include Availability Zones parameter to your - // request. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // The ID for a virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). - // Use the get blueprints operation to return a list of available images (or - // blueprints). - // - // BlueprintId is a required field - BlueprintId *string `locationName:"blueprintId" type:"string" required:"true"` - - // The bundle of specification information for your virtual private server (or - // instance), including the pricing plan (e.g., micro_1_0). - // - // BundleId is a required field - BundleId *string `locationName:"bundleId" type:"string" required:"true"` - - // (Deprecated) The name for your custom image. - // - // In releases prior to June 12, 2017, this parameter was ignored by the API. - // It is now deprecated. - // - // Deprecated: CustomImageName has been deprecated - CustomImageName *string `locationName:"customImageName" deprecated:"true" type:"string"` - - // The names to use for your new Lightsail instances. Separate multiple values - // using quotation marks and commas, for example: ["MyFirstInstance","MySecondInstance"] - // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` - - // The name of your key pair. - KeyPairName *string `locationName:"keyPairName" type:"string"` - - // The tag keys and optional values to add to the resource during create. - // - // To tag a resource after it has been created, see the tag resource operation. - Tags []*Tag `locationName:"tags" type:"list"` - - // A launch script you can create that configures a server with additional user - // data. For example, you might want to run apt-get -y update. - // - // Depending on the machine image you choose, the command to get software on - // your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu - // use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide - // (https://lightsail.aws.amazon.com/ls/docs/getting-started/article/compare-options-choose-lightsail-instance-image). - UserData *string `locationName:"userData" type:"string"` -} - -// String returns the string representation -func (s CreateInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstancesInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.BlueprintId == nil { - invalidParams.Add(request.NewErrParamRequired("BlueprintId")) - } - if s.BundleId == nil { - invalidParams.Add(request.NewErrParamRequired("BundleId")) - } - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateInstancesInput) SetAvailabilityZone(v string) *CreateInstancesInput { - s.AvailabilityZone = &v - return s -} - -// SetBlueprintId sets the BlueprintId field's value. -func (s *CreateInstancesInput) SetBlueprintId(v string) *CreateInstancesInput { - s.BlueprintId = &v - return s -} - -// SetBundleId sets the BundleId field's value. -func (s *CreateInstancesInput) SetBundleId(v string) *CreateInstancesInput { - s.BundleId = &v - return s -} - -// SetCustomImageName sets the CustomImageName field's value. -func (s *CreateInstancesInput) SetCustomImageName(v string) *CreateInstancesInput { - s.CustomImageName = &v - return s -} - -// SetInstanceNames sets the InstanceNames field's value. -func (s *CreateInstancesInput) SetInstanceNames(v []*string) *CreateInstancesInput { - s.InstanceNames = v - return s -} - -// SetKeyPairName sets the KeyPairName field's value. -func (s *CreateInstancesInput) SetKeyPairName(v string) *CreateInstancesInput { - s.KeyPairName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateInstancesInput) SetTags(v []*Tag) *CreateInstancesInput { - s.Tags = v - return s -} - -// SetUserData sets the UserData field's value. -func (s *CreateInstancesInput) SetUserData(v string) *CreateInstancesInput { - s.UserData = &v - return s -} - -type CreateInstancesOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the results of your - // create instances request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s CreateInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInstancesOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *CreateInstancesOutput) SetOperations(v []*Operation) *CreateInstancesOutput { - s.Operations = v - return s -} - -type CreateKeyPairInput struct { - _ struct{} `type:"structure"` - - // The name for your new key pair. - // - // KeyPairName is a required field - KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` - - // The tag keys and optional values to add to the resource during create. - // - // To tag a resource after it has been created, see the tag resource operation. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateKeyPairInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateKeyPairInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateKeyPairInput"} - if s.KeyPairName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyPairName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyPairName sets the KeyPairName field's value. -func (s *CreateKeyPairInput) SetKeyPairName(v string) *CreateKeyPairInput { - s.KeyPairName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateKeyPairInput) SetTags(v []*Tag) *CreateKeyPairInput { - s.Tags = v - return s -} - -type CreateKeyPairOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the new key pair - // you just created. - KeyPair *KeyPair `locationName:"keyPair" type:"structure"` - - // An array of key-value pairs containing information about the results of your - // create key pair request. - Operation *Operation `locationName:"operation" type:"structure"` - - // A base64-encoded RSA private key. - PrivateKeyBase64 *string `locationName:"privateKeyBase64" type:"string"` - - // A base64-encoded public key of the ssh-rsa type. - PublicKeyBase64 *string `locationName:"publicKeyBase64" type:"string"` -} - -// String returns the string representation -func (s CreateKeyPairOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateKeyPairOutput) GoString() string { - return s.String() -} - -// SetKeyPair sets the KeyPair field's value. -func (s *CreateKeyPairOutput) SetKeyPair(v *KeyPair) *CreateKeyPairOutput { - s.KeyPair = v - return s -} - -// SetOperation sets the Operation field's value. -func (s *CreateKeyPairOutput) SetOperation(v *Operation) *CreateKeyPairOutput { - s.Operation = v - return s -} - -// SetPrivateKeyBase64 sets the PrivateKeyBase64 field's value. -func (s *CreateKeyPairOutput) SetPrivateKeyBase64(v string) *CreateKeyPairOutput { - s.PrivateKeyBase64 = &v - return s -} - -// SetPublicKeyBase64 sets the PublicKeyBase64 field's value. -func (s *CreateKeyPairOutput) SetPublicKeyBase64(v string) *CreateKeyPairOutput { - s.PublicKeyBase64 = &v - return s -} - -type CreateLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The optional alternative domains and subdomains to use with your SSL/TLS - // certificate (e.g., www.example.com, example.com, m.example.com, blog.example.com). - CertificateAlternativeNames []*string `locationName:"certificateAlternativeNames" type:"list"` - - // The domain name with which your certificate is associated (e.g., example.com). - // - // If you specify certificateDomainName, then certificateName is required (and - // vice-versa). - CertificateDomainName *string `locationName:"certificateDomainName" type:"string"` - - // The name of the SSL/TLS certificate. - // - // If you specify certificateName, then certificateDomainName is required (and - // vice-versa). - CertificateName *string `locationName:"certificateName" type:"string"` - - // The path you provided to perform the load balancer health check. If you didn't - // specify a health check path, Lightsail uses the root path of your website - // (e.g., "/"). - // - // You may want to specify a custom health check path other than the root of - // your application if your home page loads slowly or has a lot of media or - // scripting on it. - HealthCheckPath *string `locationName:"healthCheckPath" type:"string"` - - // The instance port where you're creating your load balancer. - // - // InstancePort is a required field - InstancePort *int64 `locationName:"instancePort" type:"integer" required:"true"` - - // The name of your load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` - - // The tag keys and optional values to add to the resource during create. - // - // To tag a resource after it has been created, see the tag resource operation. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerInput"} - if s.InstancePort == nil { - invalidParams.Add(request.NewErrParamRequired("InstancePort")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAlternativeNames sets the CertificateAlternativeNames field's value. -func (s *CreateLoadBalancerInput) SetCertificateAlternativeNames(v []*string) *CreateLoadBalancerInput { - s.CertificateAlternativeNames = v - return s -} - -// SetCertificateDomainName sets the CertificateDomainName field's value. -func (s *CreateLoadBalancerInput) SetCertificateDomainName(v string) *CreateLoadBalancerInput { - s.CertificateDomainName = &v - return s -} - -// SetCertificateName sets the CertificateName field's value. -func (s *CreateLoadBalancerInput) SetCertificateName(v string) *CreateLoadBalancerInput { - s.CertificateName = &v - return s -} - -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *CreateLoadBalancerInput) SetHealthCheckPath(v string) *CreateLoadBalancerInput { - s.HealthCheckPath = &v - return s -} - -// SetInstancePort sets the InstancePort field's value. -func (s *CreateLoadBalancerInput) SetInstancePort(v int64) *CreateLoadBalancerInput { - s.InstancePort = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateLoadBalancerInput) SetLoadBalancerName(v string) *CreateLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateLoadBalancerInput) SetTags(v []*Tag) *CreateLoadBalancerInput { - s.Tags = v - return s -} - -type CreateLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about the API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s CreateLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *CreateLoadBalancerOutput) SetOperations(v []*Operation) *CreateLoadBalancerOutput { - s.Operations = v - return s -} - -type CreateLoadBalancerTlsCertificateInput struct { - _ struct{} `type:"structure"` - - // An array of strings listing alternative domains and subdomains for your SSL/TLS - // certificate. Lightsail will de-dupe the names for you. You can have a maximum - // of 9 alternative names (in addition to the 1 primary domain). We do not support - // wildcards (e.g., *.example.com). - CertificateAlternativeNames []*string `locationName:"certificateAlternativeNames" type:"list"` - - // The domain name (e.g., example.com) for your SSL/TLS certificate. - // - // CertificateDomainName is a required field - CertificateDomainName *string `locationName:"certificateDomainName" type:"string" required:"true"` - - // The SSL/TLS certificate name. - // - // You can have up to 10 certificates in your account at one time. Each Lightsail - // load balancer can have up to 2 certificates associated with it at one time. - // There is also an overall limit to the number of certificates that can be - // issue in a 365-day period. For more information, see Limits (http://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html). - // - // CertificateName is a required field - CertificateName *string `locationName:"certificateName" type:"string" required:"true"` - - // The load balancer name where you want to create the SSL/TLS certificate. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` - - // The tag keys and optional values to add to the resource during create. - // - // To tag a resource after it has been created, see the tag resource operation. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateLoadBalancerTlsCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLoadBalancerTlsCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoadBalancerTlsCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerTlsCertificateInput"} - if s.CertificateDomainName == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateDomainName")) - } - if s.CertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateName")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAlternativeNames sets the CertificateAlternativeNames field's value. -func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateAlternativeNames(v []*string) *CreateLoadBalancerTlsCertificateInput { - s.CertificateAlternativeNames = v - return s -} - -// SetCertificateDomainName sets the CertificateDomainName field's value. -func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateDomainName(v string) *CreateLoadBalancerTlsCertificateInput { - s.CertificateDomainName = &v - return s -} - -// SetCertificateName sets the CertificateName field's value. -func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateName(v string) *CreateLoadBalancerTlsCertificateInput { - s.CertificateName = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *CreateLoadBalancerTlsCertificateInput { - s.LoadBalancerName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateLoadBalancerTlsCertificateInput) SetTags(v []*Tag) *CreateLoadBalancerTlsCertificateInput { - s.Tags = v - return s -} - -type CreateLoadBalancerTlsCertificateOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about the API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s CreateLoadBalancerTlsCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLoadBalancerTlsCertificateOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *CreateLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *CreateLoadBalancerTlsCertificateOutput { - s.Operations = v - return s -} - -type CreateRelationalDatabaseFromSnapshotInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which to create your new database. Use the us-east-2a - // case-sensitive format. - // - // You can get a list of Availability Zones by using the get regions operation. - // Be sure to add the include relational database Availability Zones parameter - // to your request. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // Specifies the accessibility options for your new database. A value of true - // specifies a database that is available to resources outside of your Lightsail - // account. A value of false specifies a database that is available only to - // your Lightsail resources in the same region as your database. - PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` - - // The bundle ID for your new database. A bundle describes the performance specifications - // for your database. - // - // You can get a list of database bundle IDs by using the get relational database - // bundles operation. - // - // When creating a new database from a snapshot, you cannot choose a bundle - // that is smaller than the bundle of the source database. - RelationalDatabaseBundleId *string `locationName:"relationalDatabaseBundleId" type:"string"` - - // The name to use for your new database. - // - // Constraints: - // - // * Must contain from 2 to 255 alphanumeric characters, or hyphens. - // - // * The first and last character must be a letter or number. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` - - // The name of the database snapshot from which to create your new database. - RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string"` - - // The date and time to restore your database from. - // - // Constraints: - // - // * Must be before the latest restorable time for the database. - // - // * Cannot be specified if the use latest restorable time parameter is true. - // - // * Specified in Universal Coordinated Time (UTC). - // - // * Specified in the Unix time format. - // - // For example, if you wish to use a restore time of October 1, 2018, at 8 PM - // UTC, then you input 1538424000 as the restore time. - RestoreTime *time.Time `locationName:"restoreTime" type:"timestamp"` - - // The name of the source database. - SourceRelationalDatabaseName *string `locationName:"sourceRelationalDatabaseName" type:"string"` - - // The tag keys and optional values to add to the resource during create. - // - // To tag a resource after it has been created, see the tag resource operation. - Tags []*Tag `locationName:"tags" type:"list"` - - // Specifies whether your database is restored from the latest backup time. - // A value of true restores from the latest backup time. - // - // Default: false - // - // Constraints: Cannot be specified if the restore time parameter is provided. - UseLatestRestorableTime *bool `locationName:"useLatestRestorableTime" type:"boolean"` -} - -// String returns the string representation -func (s CreateRelationalDatabaseFromSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRelationalDatabaseFromSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRelationalDatabaseFromSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRelationalDatabaseFromSnapshotInput"} - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateRelationalDatabaseFromSnapshotInput) SetAvailabilityZone(v string) *CreateRelationalDatabaseFromSnapshotInput { - s.AvailabilityZone = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *CreateRelationalDatabaseFromSnapshotInput) SetPubliclyAccessible(v bool) *CreateRelationalDatabaseFromSnapshotInput { - s.PubliclyAccessible = &v - return s -} - -// SetRelationalDatabaseBundleId sets the RelationalDatabaseBundleId field's value. -func (s *CreateRelationalDatabaseFromSnapshotInput) SetRelationalDatabaseBundleId(v string) *CreateRelationalDatabaseFromSnapshotInput { - s.RelationalDatabaseBundleId = &v - return s -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *CreateRelationalDatabaseFromSnapshotInput) SetRelationalDatabaseName(v string) *CreateRelationalDatabaseFromSnapshotInput { - s.RelationalDatabaseName = &v - return s -} - -// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. -func (s *CreateRelationalDatabaseFromSnapshotInput) SetRelationalDatabaseSnapshotName(v string) *CreateRelationalDatabaseFromSnapshotInput { - s.RelationalDatabaseSnapshotName = &v - return s -} - -// SetRestoreTime sets the RestoreTime field's value. -func (s *CreateRelationalDatabaseFromSnapshotInput) SetRestoreTime(v time.Time) *CreateRelationalDatabaseFromSnapshotInput { - s.RestoreTime = &v - return s -} - -// SetSourceRelationalDatabaseName sets the SourceRelationalDatabaseName field's value. -func (s *CreateRelationalDatabaseFromSnapshotInput) SetSourceRelationalDatabaseName(v string) *CreateRelationalDatabaseFromSnapshotInput { - s.SourceRelationalDatabaseName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateRelationalDatabaseFromSnapshotInput) SetTags(v []*Tag) *CreateRelationalDatabaseFromSnapshotInput { - s.Tags = v - return s -} - -// SetUseLatestRestorableTime sets the UseLatestRestorableTime field's value. -func (s *CreateRelationalDatabaseFromSnapshotInput) SetUseLatestRestorableTime(v bool) *CreateRelationalDatabaseFromSnapshotInput { - s.UseLatestRestorableTime = &v - return s -} - -type CreateRelationalDatabaseFromSnapshotOutput struct { - _ struct{} `type:"structure"` - - // An object describing the result of your create relational database from snapshot - // request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s CreateRelationalDatabaseFromSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRelationalDatabaseFromSnapshotOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *CreateRelationalDatabaseFromSnapshotOutput) SetOperations(v []*Operation) *CreateRelationalDatabaseFromSnapshotOutput { - s.Operations = v - return s -} - -type CreateRelationalDatabaseInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which to create your new database. Use the us-east-2a - // case-sensitive format. - // - // You can get a list of Availability Zones by using the get regions operation. - // Be sure to add the include relational database Availability Zones parameter - // to your request. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The name of the master database created when the Lightsail database resource - // is created. - // - // Constraints: - // - // * Must contain from 1 to 64 alphanumeric characters. - // - // * Cannot be a word reserved by the specified database engine - // - // MasterDatabaseName is a required field - MasterDatabaseName *string `locationName:"masterDatabaseName" type:"string" required:"true"` - - // The password for the master user of your new database. The password can include - // any printable ASCII character except "/", """, or "@". - // - // Constraints: Must contain 8 to 41 characters. - MasterUserPassword *string `locationName:"masterUserPassword" type:"string" sensitive:"true"` - - // The master user name for your new database. - // - // Constraints: - // - // * Master user name is required. - // - // * Must contain from 1 to 16 alphanumeric characters. - // - // * The first character must be a letter. - // - // * Cannot be a reserved word for the database engine you choose. - // - // For more information about reserved words in MySQL 5.6 or 5.7, see the Keywords - // and Reserved Words articles for MySQL 5.6 (https://dev.mysql.com/doc/refman/5.6/en/keywords.html) - // or MySQL 5.7 (https://dev.mysql.com/doc/refman/5.7/en/keywords.html) respectively. - // - // MasterUsername is a required field - MasterUsername *string `locationName:"masterUsername" type:"string" required:"true"` - - // The daily time range during which automated backups are created for your - // new database if automated backups are enabled. - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region. For more information about the preferred backup - // window time blocks for each region, see the Working With Backups (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow) - // guide in the Amazon Relational Database Service (Amazon RDS) documentation. - // - // Constraints: - // - // * Must be in the hh24:mi-hh24:mi format. - // - // Example: 16:00-16:30 - // - // * Specified in Universal Coordinated Time (UTC). - // - // * Must not conflict with the preferred maintenance window. - // - // * Must be at least 30 minutes. - PreferredBackupWindow *string `locationName:"preferredBackupWindow" type:"string"` - - // The weekly time range during which system maintenance can occur on your new - // database. - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region, occurring on a random day of the week. - // - // Constraints: - // - // * Must be in the ddd:hh24:mi-ddd:hh24:mi format. - // - // * Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. - // - // * Must be at least 30 minutes. - // - // * Specified in Universal Coordinated Time (UTC). - // - // * Example: Tue:17:00-Tue:17:30 - PreferredMaintenanceWindow *string `locationName:"preferredMaintenanceWindow" type:"string"` - - // Specifies the accessibility options for your new database. A value of true - // specifies a database that is available to resources outside of your Lightsail - // account. A value of false specifies a database that is available only to - // your Lightsail resources in the same region as your database. - PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` - - // The blueprint ID for your new database. A blueprint describes the major engine - // version of a database. - // - // You can get a list of database blueprints IDs by using the get relational - // database blueprints operation. - // - // RelationalDatabaseBlueprintId is a required field - RelationalDatabaseBlueprintId *string `locationName:"relationalDatabaseBlueprintId" type:"string" required:"true"` - - // The bundle ID for your new database. A bundle describes the performance specifications - // for your database. - // - // You can get a list of database bundle IDs by using the get relational database - // bundles operation. - // - // RelationalDatabaseBundleId is a required field - RelationalDatabaseBundleId *string `locationName:"relationalDatabaseBundleId" type:"string" required:"true"` - - // The name to use for your new database. - // - // Constraints: - // - // * Must contain from 2 to 255 alphanumeric characters, or hyphens. - // - // * The first and last character must be a letter or number. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` - - // The tag keys and optional values to add to the resource during create. - // - // To tag a resource after it has been created, see the tag resource operation. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateRelationalDatabaseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRelationalDatabaseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRelationalDatabaseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRelationalDatabaseInput"} - if s.MasterDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("MasterDatabaseName")) - } - if s.MasterUsername == nil { - invalidParams.Add(request.NewErrParamRequired("MasterUsername")) - } - if s.RelationalDatabaseBlueprintId == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseBlueprintId")) - } - if s.RelationalDatabaseBundleId == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseBundleId")) - } - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateRelationalDatabaseInput) SetAvailabilityZone(v string) *CreateRelationalDatabaseInput { - s.AvailabilityZone = &v - return s -} - -// SetMasterDatabaseName sets the MasterDatabaseName field's value. -func (s *CreateRelationalDatabaseInput) SetMasterDatabaseName(v string) *CreateRelationalDatabaseInput { - s.MasterDatabaseName = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *CreateRelationalDatabaseInput) SetMasterUserPassword(v string) *CreateRelationalDatabaseInput { - s.MasterUserPassword = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *CreateRelationalDatabaseInput) SetMasterUsername(v string) *CreateRelationalDatabaseInput { - s.MasterUsername = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *CreateRelationalDatabaseInput) SetPreferredBackupWindow(v string) *CreateRelationalDatabaseInput { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CreateRelationalDatabaseInput) SetPreferredMaintenanceWindow(v string) *CreateRelationalDatabaseInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *CreateRelationalDatabaseInput) SetPubliclyAccessible(v bool) *CreateRelationalDatabaseInput { - s.PubliclyAccessible = &v - return s -} - -// SetRelationalDatabaseBlueprintId sets the RelationalDatabaseBlueprintId field's value. -func (s *CreateRelationalDatabaseInput) SetRelationalDatabaseBlueprintId(v string) *CreateRelationalDatabaseInput { - s.RelationalDatabaseBlueprintId = &v - return s -} - -// SetRelationalDatabaseBundleId sets the RelationalDatabaseBundleId field's value. -func (s *CreateRelationalDatabaseInput) SetRelationalDatabaseBundleId(v string) *CreateRelationalDatabaseInput { - s.RelationalDatabaseBundleId = &v - return s -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *CreateRelationalDatabaseInput) SetRelationalDatabaseName(v string) *CreateRelationalDatabaseInput { - s.RelationalDatabaseName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateRelationalDatabaseInput) SetTags(v []*Tag) *CreateRelationalDatabaseInput { - s.Tags = v - return s -} - -type CreateRelationalDatabaseOutput struct { - _ struct{} `type:"structure"` - - // An object describing the result of your create relational database request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s CreateRelationalDatabaseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRelationalDatabaseOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *CreateRelationalDatabaseOutput) SetOperations(v []*Operation) *CreateRelationalDatabaseOutput { - s.Operations = v - return s -} - -type CreateRelationalDatabaseSnapshotInput struct { - _ struct{} `type:"structure"` - - // The name of the database on which to base your new snapshot. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` - - // The name for your new database snapshot. - // - // Constraints: - // - // * Must contain from 2 to 255 alphanumeric characters, or hyphens. - // - // * The first and last character must be a letter or number. - // - // RelationalDatabaseSnapshotName is a required field - RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string" required:"true"` - - // The tag keys and optional values to add to the resource during create. - // - // To tag a resource after it has been created, see the tag resource operation. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateRelationalDatabaseSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRelationalDatabaseSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRelationalDatabaseSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRelationalDatabaseSnapshotInput"} - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - if s.RelationalDatabaseSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *CreateRelationalDatabaseSnapshotInput) SetRelationalDatabaseName(v string) *CreateRelationalDatabaseSnapshotInput { - s.RelationalDatabaseName = &v - return s -} - -// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. -func (s *CreateRelationalDatabaseSnapshotInput) SetRelationalDatabaseSnapshotName(v string) *CreateRelationalDatabaseSnapshotInput { - s.RelationalDatabaseSnapshotName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateRelationalDatabaseSnapshotInput) SetTags(v []*Tag) *CreateRelationalDatabaseSnapshotInput { - s.Tags = v - return s -} - -type CreateRelationalDatabaseSnapshotOutput struct { - _ struct{} `type:"structure"` - - // An object describing the result of your create relational database snapshot - // request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s CreateRelationalDatabaseSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRelationalDatabaseSnapshotOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *CreateRelationalDatabaseSnapshotOutput) SetOperations(v []*Operation) *CreateRelationalDatabaseSnapshotOutput { - s.Operations = v - return s -} - -type DeleteDiskInput struct { - _ struct{} `type:"structure"` - - // The unique name of the disk you want to delete (e.g., my-disk). - // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDiskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDiskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDiskInput"} - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskName sets the DiskName field's value. -func (s *DeleteDiskInput) SetDiskName(v string) *DeleteDiskInput { - s.DiskName = &v - return s -} - -type DeleteDiskOutput struct { - _ struct{} `type:"structure"` - - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s DeleteDiskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDiskOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *DeleteDiskOutput) SetOperations(v []*Operation) *DeleteDiskOutput { - s.Operations = v - return s -} - -type DeleteDiskSnapshotInput struct { - _ struct{} `type:"structure"` - - // The name of the disk snapshot you want to delete (e.g., my-disk-snapshot). - // - // DiskSnapshotName is a required field - DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDiskSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDiskSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDiskSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDiskSnapshotInput"} - if s.DiskSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskSnapshotName sets the DiskSnapshotName field's value. -func (s *DeleteDiskSnapshotInput) SetDiskSnapshotName(v string) *DeleteDiskSnapshotInput { - s.DiskSnapshotName = &v - return s -} - -type DeleteDiskSnapshotOutput struct { - _ struct{} `type:"structure"` - - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s DeleteDiskSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDiskSnapshotOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *DeleteDiskSnapshotOutput) SetOperations(v []*Operation) *DeleteDiskSnapshotOutput { - s.Operations = v - return s -} - -type DeleteDomainEntryInput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about your domain entries. - // - // DomainEntry is a required field - DomainEntry *DomainEntry `locationName:"domainEntry" type:"structure" required:"true"` - - // The name of the domain entry to delete. - // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDomainEntryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDomainEntryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDomainEntryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDomainEntryInput"} - if s.DomainEntry == nil { - invalidParams.Add(request.NewErrParamRequired("DomainEntry")) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainEntry sets the DomainEntry field's value. -func (s *DeleteDomainEntryInput) SetDomainEntry(v *DomainEntry) *DeleteDomainEntryInput { - s.DomainEntry = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteDomainEntryInput) SetDomainName(v string) *DeleteDomainEntryInput { - s.DomainName = &v - return s -} - -type DeleteDomainEntryOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the results of your - // delete domain entry request. - Operation *Operation `locationName:"operation" type:"structure"` -} - -// String returns the string representation -func (s DeleteDomainEntryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDomainEntryOutput) GoString() string { - return s.String() -} - -// SetOperation sets the Operation field's value. -func (s *DeleteDomainEntryOutput) SetOperation(v *Operation) *DeleteDomainEntryOutput { - s.Operation = v - return s -} - -type DeleteDomainInput struct { - _ struct{} `type:"structure"` - - // The specific domain name to delete. - // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteDomainInput) SetDomainName(v string) *DeleteDomainInput { - s.DomainName = &v - return s -} - -type DeleteDomainOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the results of your - // delete domain request. - Operation *Operation `locationName:"operation" type:"structure"` -} - -// String returns the string representation -func (s DeleteDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDomainOutput) GoString() string { - return s.String() -} - -// SetOperation sets the Operation field's value. -func (s *DeleteDomainOutput) SetOperation(v *Operation) *DeleteDomainOutput { - s.Operation = v - return s -} - -type DeleteInstanceInput struct { - _ struct{} `type:"structure"` - - // The name of the instance to delete. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *DeleteInstanceInput) SetInstanceName(v string) *DeleteInstanceInput { - s.InstanceName = &v - return s -} - -type DeleteInstanceOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the results of your - // delete instance request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s DeleteInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInstanceOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *DeleteInstanceOutput) SetOperations(v []*Operation) *DeleteInstanceOutput { - s.Operations = v - return s -} - -type DeleteInstanceSnapshotInput struct { - _ struct{} `type:"structure"` - - // The name of the snapshot to delete. - // - // InstanceSnapshotName is a required field - InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteInstanceSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInstanceSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInstanceSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceSnapshotInput"} - if s.InstanceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. -func (s *DeleteInstanceSnapshotInput) SetInstanceSnapshotName(v string) *DeleteInstanceSnapshotInput { - s.InstanceSnapshotName = &v - return s -} - -type DeleteInstanceSnapshotOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the results of your - // delete instance snapshot request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s DeleteInstanceSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInstanceSnapshotOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *DeleteInstanceSnapshotOutput) SetOperations(v []*Operation) *DeleteInstanceSnapshotOutput { - s.Operations = v - return s -} - -type DeleteKeyPairInput struct { - _ struct{} `type:"structure"` - - // The name of the key pair to delete. - // - // KeyPairName is a required field - KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteKeyPairInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteKeyPairInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteKeyPairInput"} - if s.KeyPairName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyPairName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyPairName sets the KeyPairName field's value. -func (s *DeleteKeyPairInput) SetKeyPairName(v string) *DeleteKeyPairInput { - s.KeyPairName = &v - return s -} - -type DeleteKeyPairOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the results of your - // delete key pair request. - Operation *Operation `locationName:"operation" type:"structure"` -} - -// String returns the string representation -func (s DeleteKeyPairOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteKeyPairOutput) GoString() string { - return s.String() -} - -// SetOperation sets the Operation field's value. -func (s *DeleteKeyPairOutput) SetOperation(v *Operation) *DeleteKeyPairOutput { - s.Operation = v - return s -} - -type DeleteLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer you want to delete. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DeleteLoadBalancerInput) SetLoadBalancerName(v string) *DeleteLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -type DeleteLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s DeleteLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *DeleteLoadBalancerOutput) SetOperations(v []*Operation) *DeleteLoadBalancerOutput { - s.Operations = v - return s -} - -type DeleteLoadBalancerTlsCertificateInput struct { - _ struct{} `type:"structure"` - - // The SSL/TLS certificate name. - // - // CertificateName is a required field - CertificateName *string `locationName:"certificateName" type:"string" required:"true"` - - // When true, forces the deletion of an SSL/TLS certificate. - // - // There can be two certificates associated with a Lightsail load balancer: - // the primary and the backup. The force parameter is required when the primary - // SSL/TLS certificate is in use by an instance attached to the load balancer. - Force *bool `locationName:"force" type:"boolean"` - - // The load balancer name. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLoadBalancerTlsCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLoadBalancerTlsCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoadBalancerTlsCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerTlsCertificateInput"} - if s.CertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateName")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateName sets the CertificateName field's value. -func (s *DeleteLoadBalancerTlsCertificateInput) SetCertificateName(v string) *DeleteLoadBalancerTlsCertificateInput { - s.CertificateName = &v - return s -} - -// SetForce sets the Force field's value. -func (s *DeleteLoadBalancerTlsCertificateInput) SetForce(v bool) *DeleteLoadBalancerTlsCertificateInput { - s.Force = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DeleteLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *DeleteLoadBalancerTlsCertificateInput { - s.LoadBalancerName = &v - return s -} - -type DeleteLoadBalancerTlsCertificateOutput struct { - _ struct{} `type:"structure"` - - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s DeleteLoadBalancerTlsCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLoadBalancerTlsCertificateOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *DeleteLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *DeleteLoadBalancerTlsCertificateOutput { - s.Operations = v - return s -} - -type DeleteRelationalDatabaseInput struct { - _ struct{} `type:"structure"` - - // The name of the database snapshot created if skip final snapshot is false, - // which is the default value for that parameter. - // - // Specifying this parameter and also specifying the skip final snapshot parameter - // to true results in an error. - // - // Constraints: - // - // * Must contain from 2 to 255 alphanumeric characters, or hyphens. - // - // * The first and last character must be a letter or number. - FinalRelationalDatabaseSnapshotName *string `locationName:"finalRelationalDatabaseSnapshotName" type:"string"` - - // The name of the database that you are deleting. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` - - // Determines whether a final database snapshot is created before your database - // is deleted. If true is specified, no database snapshot is created. If false - // is specified, a database snapshot is created before your database is deleted. - // - // You must specify the final relational database snapshot name parameter if - // the skip final snapshot parameter is false. - // - // Default: false - SkipFinalSnapshot *bool `locationName:"skipFinalSnapshot" type:"boolean"` -} - -// String returns the string representation -func (s DeleteRelationalDatabaseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRelationalDatabaseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRelationalDatabaseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRelationalDatabaseInput"} - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFinalRelationalDatabaseSnapshotName sets the FinalRelationalDatabaseSnapshotName field's value. -func (s *DeleteRelationalDatabaseInput) SetFinalRelationalDatabaseSnapshotName(v string) *DeleteRelationalDatabaseInput { - s.FinalRelationalDatabaseSnapshotName = &v - return s -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *DeleteRelationalDatabaseInput) SetRelationalDatabaseName(v string) *DeleteRelationalDatabaseInput { - s.RelationalDatabaseName = &v - return s -} - -// SetSkipFinalSnapshot sets the SkipFinalSnapshot field's value. -func (s *DeleteRelationalDatabaseInput) SetSkipFinalSnapshot(v bool) *DeleteRelationalDatabaseInput { - s.SkipFinalSnapshot = &v - return s -} - -type DeleteRelationalDatabaseOutput struct { - _ struct{} `type:"structure"` - - // An object describing the result of your delete relational database request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s DeleteRelationalDatabaseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRelationalDatabaseOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *DeleteRelationalDatabaseOutput) SetOperations(v []*Operation) *DeleteRelationalDatabaseOutput { - s.Operations = v - return s -} - -type DeleteRelationalDatabaseSnapshotInput struct { - _ struct{} `type:"structure"` - - // The name of the database snapshot that you are deleting. - // - // RelationalDatabaseSnapshotName is a required field - RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRelationalDatabaseSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRelationalDatabaseSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRelationalDatabaseSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRelationalDatabaseSnapshotInput"} - if s.RelationalDatabaseSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. -func (s *DeleteRelationalDatabaseSnapshotInput) SetRelationalDatabaseSnapshotName(v string) *DeleteRelationalDatabaseSnapshotInput { - s.RelationalDatabaseSnapshotName = &v - return s -} - -type DeleteRelationalDatabaseSnapshotOutput struct { - _ struct{} `type:"structure"` - - // An object describing the result of your delete relational database snapshot - // request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s DeleteRelationalDatabaseSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRelationalDatabaseSnapshotOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *DeleteRelationalDatabaseSnapshotOutput) SetOperations(v []*Operation) *DeleteRelationalDatabaseSnapshotOutput { - s.Operations = v - return s -} - -// Describes the destination of a record. -type DestinationInfo struct { - _ struct{} `type:"structure"` - - // The ID of the resource created at the destination. - Id *string `locationName:"id" type:"string"` - - // The destination service of the record. - Service *string `locationName:"service" type:"string"` -} - -// String returns the string representation -func (s DestinationInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DestinationInfo) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *DestinationInfo) SetId(v string) *DestinationInfo { - s.Id = &v - return s -} - -// SetService sets the Service field's value. -func (s *DestinationInfo) SetService(v string) *DestinationInfo { - s.Service = &v - return s -} - -type DetachDiskInput struct { - _ struct{} `type:"structure"` - - // The unique name of the disk you want to detach from your instance (e.g., - // my-disk). - // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachDiskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachDiskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachDiskInput"} - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskName sets the DiskName field's value. -func (s *DetachDiskInput) SetDiskName(v string) *DetachDiskInput { - s.DiskName = &v - return s -} - -type DetachDiskOutput struct { - _ struct{} `type:"structure"` - - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s DetachDiskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachDiskOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *DetachDiskOutput) SetOperations(v []*Operation) *DetachDiskOutput { - s.Operations = v - return s -} - -type DetachInstancesFromLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // An array of strings containing the names of the instances you want to detach - // from the load balancer. - // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` - - // The name of the Lightsail load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachInstancesFromLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachInstancesFromLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachInstancesFromLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachInstancesFromLoadBalancerInput"} - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceNames sets the InstanceNames field's value. -func (s *DetachInstancesFromLoadBalancerInput) SetInstanceNames(v []*string) *DetachInstancesFromLoadBalancerInput { - s.InstanceNames = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DetachInstancesFromLoadBalancerInput) SetLoadBalancerName(v string) *DetachInstancesFromLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -type DetachInstancesFromLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s DetachInstancesFromLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachInstancesFromLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *DetachInstancesFromLoadBalancerOutput) SetOperations(v []*Operation) *DetachInstancesFromLoadBalancerOutput { - s.Operations = v - return s -} - -type DetachStaticIpInput struct { - _ struct{} `type:"structure"` - - // The name of the static IP to detach from the instance. - // - // StaticIpName is a required field - StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachStaticIpInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachStaticIpInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachStaticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachStaticIpInput"} - if s.StaticIpName == nil { - invalidParams.Add(request.NewErrParamRequired("StaticIpName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStaticIpName sets the StaticIpName field's value. -func (s *DetachStaticIpInput) SetStaticIpName(v string) *DetachStaticIpInput { - s.StaticIpName = &v - return s -} - -type DetachStaticIpOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the results of your - // detach static IP request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s DetachStaticIpOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachStaticIpOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *DetachStaticIpOutput) SetOperations(v []*Operation) *DetachStaticIpOutput { - s.Operations = v - return s -} - -// Describes a system disk or an block storage disk. -type Disk struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the disk. - Arn *string `locationName:"arn" type:"string"` - - // The resources to which the disk is attached. - AttachedTo *string `locationName:"attachedTo" type:"string"` - - // (Deprecated) The attachment state of the disk. - // - // In releases prior to November 14, 2017, this parameter returned attached - // for system disks in the API response. It is now deprecated, but still included - // in the response. Use isAttached instead. - // - // Deprecated: AttachmentState has been deprecated - AttachmentState *string `locationName:"attachmentState" deprecated:"true" type:"string"` - - // The date when the disk was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // (Deprecated) The number of GB in use by the disk. - // - // In releases prior to November 14, 2017, this parameter was not included in - // the API response. It is now deprecated. - // - // Deprecated: GbInUse has been deprecated - GbInUse *int64 `locationName:"gbInUse" deprecated:"true" type:"integer"` - - // The input/output operations per second (IOPS) of the disk. - Iops *int64 `locationName:"iops" type:"integer"` - - // A Boolean value indicating whether the disk is attached. - IsAttached *bool `locationName:"isAttached" type:"boolean"` - - // A Boolean value indicating whether this disk is a system disk (has an operating - // system loaded on it). - IsSystemDisk *bool `locationName:"isSystemDisk" type:"boolean"` - - // The AWS Region and Availability Zone where the disk is located. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The unique name of the disk. - Name *string `locationName:"name" type:"string"` - - // The disk path. - Path *string `locationName:"path" type:"string"` - - // The Lightsail resource type (e.g., Disk). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The size of the disk in GB. - SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` - - // Describes the status of the disk. - State *string `locationName:"state" type:"string" enum:"DiskState"` - - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` - - // The tag keys and optional values for the resource. For more information about - // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s Disk) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Disk) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Disk) SetArn(v string) *Disk { - s.Arn = &v - return s -} - -// SetAttachedTo sets the AttachedTo field's value. -func (s *Disk) SetAttachedTo(v string) *Disk { - s.AttachedTo = &v - return s -} - -// SetAttachmentState sets the AttachmentState field's value. -func (s *Disk) SetAttachmentState(v string) *Disk { - s.AttachmentState = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Disk) SetCreatedAt(v time.Time) *Disk { - s.CreatedAt = &v - return s -} - -// SetGbInUse sets the GbInUse field's value. -func (s *Disk) SetGbInUse(v int64) *Disk { - s.GbInUse = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *Disk) SetIops(v int64) *Disk { - s.Iops = &v - return s -} - -// SetIsAttached sets the IsAttached field's value. -func (s *Disk) SetIsAttached(v bool) *Disk { - s.IsAttached = &v - return s -} - -// SetIsSystemDisk sets the IsSystemDisk field's value. -func (s *Disk) SetIsSystemDisk(v bool) *Disk { - s.IsSystemDisk = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *Disk) SetLocation(v *ResourceLocation) *Disk { - s.Location = v - return s -} - -// SetName sets the Name field's value. -func (s *Disk) SetName(v string) *Disk { - s.Name = &v - return s -} - -// SetPath sets the Path field's value. -func (s *Disk) SetPath(v string) *Disk { - s.Path = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *Disk) SetResourceType(v string) *Disk { - s.ResourceType = &v - return s -} - -// SetSizeInGb sets the SizeInGb field's value. -func (s *Disk) SetSizeInGb(v int64) *Disk { - s.SizeInGb = &v - return s -} - -// SetState sets the State field's value. -func (s *Disk) SetState(v string) *Disk { - s.State = &v - return s -} - -// SetSupportCode sets the SupportCode field's value. -func (s *Disk) SetSupportCode(v string) *Disk { - s.SupportCode = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Disk) SetTags(v []*Tag) *Disk { - s.Tags = v - return s -} - -// Describes a disk. -type DiskInfo struct { - _ struct{} `type:"structure"` - - // A Boolean value indicating whether this disk is a system disk (has an operating - // system loaded on it). - IsSystemDisk *bool `locationName:"isSystemDisk" type:"boolean"` - - // The disk name. - Name *string `locationName:"name" type:"string"` - - // The disk path. - Path *string `locationName:"path" type:"string"` - - // The size of the disk in GB (e.g., 32). - SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` -} - -// String returns the string representation -func (s DiskInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiskInfo) GoString() string { - return s.String() -} - -// SetIsSystemDisk sets the IsSystemDisk field's value. -func (s *DiskInfo) SetIsSystemDisk(v bool) *DiskInfo { - s.IsSystemDisk = &v - return s -} - -// SetName sets the Name field's value. -func (s *DiskInfo) SetName(v string) *DiskInfo { - s.Name = &v - return s -} - -// SetPath sets the Path field's value. -func (s *DiskInfo) SetPath(v string) *DiskInfo { - s.Path = &v - return s -} - -// SetSizeInGb sets the SizeInGb field's value. -func (s *DiskInfo) SetSizeInGb(v int64) *DiskInfo { - s.SizeInGb = &v - return s -} - -// Describes a block storage disk mapping. -type DiskMap struct { - _ struct{} `type:"structure"` - - // The new disk name (e.g., my-new-disk). - NewDiskName *string `locationName:"newDiskName" type:"string"` - - // The original disk path exposed to the instance (for example, /dev/sdh). - OriginalDiskPath *string `locationName:"originalDiskPath" type:"string"` -} - -// String returns the string representation -func (s DiskMap) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiskMap) GoString() string { - return s.String() -} - -// SetNewDiskName sets the NewDiskName field's value. -func (s *DiskMap) SetNewDiskName(v string) *DiskMap { - s.NewDiskName = &v - return s -} - -// SetOriginalDiskPath sets the OriginalDiskPath field's value. -func (s *DiskMap) SetOriginalDiskPath(v string) *DiskMap { - s.OriginalDiskPath = &v - return s -} - -// Describes a block storage disk snapshot. -type DiskSnapshot struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the disk snapshot. - Arn *string `locationName:"arn" type:"string"` - - // The date when the disk snapshot was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The Amazon Resource Name (ARN) of the source disk from which the disk snapshot - // was created. - FromDiskArn *string `locationName:"fromDiskArn" type:"string"` - - // The unique name of the source disk from which the disk snapshot was created. - FromDiskName *string `locationName:"fromDiskName" type:"string"` - - // The Amazon Resource Name (ARN) of the source instance from which the disk - // (system volume) snapshot was created. - FromInstanceArn *string `locationName:"fromInstanceArn" type:"string"` - - // The unique name of the source instance from which the disk (system volume) - // snapshot was created. - FromInstanceName *string `locationName:"fromInstanceName" type:"string"` - - // The AWS Region and Availability Zone where the disk snapshot was created. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The name of the disk snapshot (e.g., my-disk-snapshot). - Name *string `locationName:"name" type:"string"` - - // The progress of the disk snapshot operation. - Progress *string `locationName:"progress" type:"string"` - - // The Lightsail resource type (e.g., DiskSnapshot). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The size of the disk in GB. - SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` - - // The status of the disk snapshot operation. - State *string `locationName:"state" type:"string" enum:"DiskSnapshotState"` - - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` - - // The tag keys and optional values for the resource. For more information about - // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s DiskSnapshot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiskSnapshot) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DiskSnapshot) SetArn(v string) *DiskSnapshot { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *DiskSnapshot) SetCreatedAt(v time.Time) *DiskSnapshot { - s.CreatedAt = &v - return s -} - -// SetFromDiskArn sets the FromDiskArn field's value. -func (s *DiskSnapshot) SetFromDiskArn(v string) *DiskSnapshot { - s.FromDiskArn = &v - return s -} - -// SetFromDiskName sets the FromDiskName field's value. -func (s *DiskSnapshot) SetFromDiskName(v string) *DiskSnapshot { - s.FromDiskName = &v - return s -} - -// SetFromInstanceArn sets the FromInstanceArn field's value. -func (s *DiskSnapshot) SetFromInstanceArn(v string) *DiskSnapshot { - s.FromInstanceArn = &v - return s -} - -// SetFromInstanceName sets the FromInstanceName field's value. -func (s *DiskSnapshot) SetFromInstanceName(v string) *DiskSnapshot { - s.FromInstanceName = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *DiskSnapshot) SetLocation(v *ResourceLocation) *DiskSnapshot { - s.Location = v - return s -} - -// SetName sets the Name field's value. -func (s *DiskSnapshot) SetName(v string) *DiskSnapshot { - s.Name = &v - return s -} - -// SetProgress sets the Progress field's value. -func (s *DiskSnapshot) SetProgress(v string) *DiskSnapshot { - s.Progress = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *DiskSnapshot) SetResourceType(v string) *DiskSnapshot { - s.ResourceType = &v - return s -} - -// SetSizeInGb sets the SizeInGb field's value. -func (s *DiskSnapshot) SetSizeInGb(v int64) *DiskSnapshot { - s.SizeInGb = &v - return s -} - -// SetState sets the State field's value. -func (s *DiskSnapshot) SetState(v string) *DiskSnapshot { - s.State = &v - return s -} - -// SetSupportCode sets the SupportCode field's value. -func (s *DiskSnapshot) SetSupportCode(v string) *DiskSnapshot { - s.SupportCode = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *DiskSnapshot) SetTags(v []*Tag) *DiskSnapshot { - s.Tags = v - return s -} - -// Describes a disk snapshot. -type DiskSnapshotInfo struct { - _ struct{} `type:"structure"` - - // The size of the disk in GB (e.g., 32). - SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` -} - -// String returns the string representation -func (s DiskSnapshotInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiskSnapshotInfo) GoString() string { - return s.String() -} - -// SetSizeInGb sets the SizeInGb field's value. -func (s *DiskSnapshotInfo) SetSizeInGb(v int64) *DiskSnapshotInfo { - s.SizeInGb = &v - return s -} - -// Describes a domain where you are storing recordsets in Lightsail. -type Domain struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the domain recordset (e.g., arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE). - Arn *string `locationName:"arn" type:"string"` - - // The date when the domain recordset was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // An array of key-value pairs containing information about the domain entries. - DomainEntries []*DomainEntry `locationName:"domainEntries" type:"list"` - - // The AWS Region and Availability Zones where the domain recordset was created. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The name of the domain. - Name *string `locationName:"name" type:"string"` - - // The resource type. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` - - // The tag keys and optional values for the resource. For more information about - // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s Domain) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Domain) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Domain) SetArn(v string) *Domain { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Domain) SetCreatedAt(v time.Time) *Domain { - s.CreatedAt = &v - return s -} - -// SetDomainEntries sets the DomainEntries field's value. -func (s *Domain) SetDomainEntries(v []*DomainEntry) *Domain { - s.DomainEntries = v - return s -} - -// SetLocation sets the Location field's value. -func (s *Domain) SetLocation(v *ResourceLocation) *Domain { - s.Location = v - return s -} - -// SetName sets the Name field's value. -func (s *Domain) SetName(v string) *Domain { - s.Name = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *Domain) SetResourceType(v string) *Domain { - s.ResourceType = &v - return s -} - -// SetSupportCode sets the SupportCode field's value. -func (s *Domain) SetSupportCode(v string) *Domain { - s.SupportCode = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Domain) SetTags(v []*Tag) *Domain { - s.Tags = v - return s -} - -// Describes a domain recordset entry. -type DomainEntry struct { - _ struct{} `type:"structure"` - - // The ID of the domain recordset entry. - Id *string `locationName:"id" type:"string"` - - // When true, specifies whether the domain entry is an alias used by the Lightsail - // load balancer. You can include an alias (A type) record in your request, - // which points to a load balancer DNS name and routes traffic to your load - // balancer - IsAlias *bool `locationName:"isAlias" type:"boolean"` - - // The name of the domain. - Name *string `locationName:"name" type:"string"` - - // (Deprecated) The options for the domain entry. - // - // In releases prior to November 29, 2017, this parameter was not included in - // the API response. It is now deprecated. - // - // Deprecated: Options has been deprecated - Options map[string]*string `locationName:"options" deprecated:"true" type:"map"` - - // The target AWS name server (e.g., ns-111.awsdns-22.com.). - // - // For Lightsail load balancers, the value looks like ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com. - // Be sure to also set isAlias to true when setting up an A record for a load - // balancer. - Target *string `locationName:"target" type:"string"` - - // The type of domain entry (e.g., SOA or NS). - Type *string `locationName:"type" type:"string"` -} - -// String returns the string representation -func (s DomainEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainEntry) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *DomainEntry) SetId(v string) *DomainEntry { - s.Id = &v - return s -} - -// SetIsAlias sets the IsAlias field's value. -func (s *DomainEntry) SetIsAlias(v bool) *DomainEntry { - s.IsAlias = &v - return s -} - -// SetName sets the Name field's value. -func (s *DomainEntry) SetName(v string) *DomainEntry { - s.Name = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *DomainEntry) SetOptions(v map[string]*string) *DomainEntry { - s.Options = v - return s -} - -// SetTarget sets the Target field's value. -func (s *DomainEntry) SetTarget(v string) *DomainEntry { - s.Target = &v - return s -} - -// SetType sets the Type field's value. -func (s *DomainEntry) SetType(v string) *DomainEntry { - s.Type = &v - return s -} - -type DownloadDefaultKeyPairInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DownloadDefaultKeyPairInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DownloadDefaultKeyPairInput) GoString() string { - return s.String() -} - -type DownloadDefaultKeyPairOutput struct { - _ struct{} `type:"structure"` - - // A base64-encoded RSA private key. - PrivateKeyBase64 *string `locationName:"privateKeyBase64" type:"string"` - - // A base64-encoded public key of the ssh-rsa type. - PublicKeyBase64 *string `locationName:"publicKeyBase64" type:"string"` -} - -// String returns the string representation -func (s DownloadDefaultKeyPairOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DownloadDefaultKeyPairOutput) GoString() string { - return s.String() -} - -// SetPrivateKeyBase64 sets the PrivateKeyBase64 field's value. -func (s *DownloadDefaultKeyPairOutput) SetPrivateKeyBase64(v string) *DownloadDefaultKeyPairOutput { - s.PrivateKeyBase64 = &v - return s -} - -// SetPublicKeyBase64 sets the PublicKeyBase64 field's value. -func (s *DownloadDefaultKeyPairOutput) SetPublicKeyBase64(v string) *DownloadDefaultKeyPairOutput { - s.PublicKeyBase64 = &v - return s -} - -type ExportSnapshotInput struct { - _ struct{} `type:"structure"` - - // The name of the instance or disk snapshot to be exported to Amazon EC2. - // - // SourceSnapshotName is a required field - SourceSnapshotName *string `locationName:"sourceSnapshotName" type:"string" required:"true"` -} - -// String returns the string representation -func (s ExportSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExportSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExportSnapshotInput"} - if s.SourceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("SourceSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceSnapshotName sets the SourceSnapshotName field's value. -func (s *ExportSnapshotInput) SetSourceSnapshotName(v string) *ExportSnapshotInput { - s.SourceSnapshotName = &v - return s -} - -type ExportSnapshotOutput struct { - _ struct{} `type:"structure"` - - // A list of objects describing the API operation. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s ExportSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportSnapshotOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *ExportSnapshotOutput) SetOperations(v []*Operation) *ExportSnapshotOutput { - s.Operations = v - return s -} - -// Describes an export snapshot record. -type ExportSnapshotRecord struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the export snapshot record. - Arn *string `locationName:"arn" type:"string"` - - // The date when the export snapshot record was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // A list of objects describing the destination of the export snapshot record. - DestinationInfo *DestinationInfo `locationName:"destinationInfo" type:"structure"` - - // The AWS Region and Availability Zone where the export snapshot record is - // located. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The export snapshot record name. - Name *string `locationName:"name" type:"string"` - - // The Lightsail resource type (e.g., ExportSnapshotRecord). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // A list of objects describing the source of the export snapshot record. - SourceInfo *ExportSnapshotRecordSourceInfo `locationName:"sourceInfo" type:"structure"` - - // The state of the export snapshot record. - State *string `locationName:"state" type:"string" enum:"RecordState"` -} - -// String returns the string representation -func (s ExportSnapshotRecord) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportSnapshotRecord) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ExportSnapshotRecord) SetArn(v string) *ExportSnapshotRecord { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *ExportSnapshotRecord) SetCreatedAt(v time.Time) *ExportSnapshotRecord { - s.CreatedAt = &v - return s -} - -// SetDestinationInfo sets the DestinationInfo field's value. -func (s *ExportSnapshotRecord) SetDestinationInfo(v *DestinationInfo) *ExportSnapshotRecord { - s.DestinationInfo = v - return s -} - -// SetLocation sets the Location field's value. -func (s *ExportSnapshotRecord) SetLocation(v *ResourceLocation) *ExportSnapshotRecord { - s.Location = v - return s -} - -// SetName sets the Name field's value. -func (s *ExportSnapshotRecord) SetName(v string) *ExportSnapshotRecord { - s.Name = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ExportSnapshotRecord) SetResourceType(v string) *ExportSnapshotRecord { - s.ResourceType = &v - return s -} - -// SetSourceInfo sets the SourceInfo field's value. -func (s *ExportSnapshotRecord) SetSourceInfo(v *ExportSnapshotRecordSourceInfo) *ExportSnapshotRecord { - s.SourceInfo = v - return s -} - -// SetState sets the State field's value. -func (s *ExportSnapshotRecord) SetState(v string) *ExportSnapshotRecord { - s.State = &v - return s -} - -// Describes the source of an export snapshot record. -type ExportSnapshotRecordSourceInfo struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the source instance or disk snapshot. - Arn *string `locationName:"arn" type:"string"` - - // The date when the source instance or disk snapshot was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // A list of objects describing a disk snapshot. - DiskSnapshotInfo *DiskSnapshotInfo `locationName:"diskSnapshotInfo" type:"structure"` - - // The Amazon Resource Name (ARN) of the snapshot's source instance or disk. - FromResourceArn *string `locationName:"fromResourceArn" type:"string"` - - // The name of the snapshot's source instance or disk. - FromResourceName *string `locationName:"fromResourceName" type:"string"` - - // A list of objects describing an instance snapshot. - InstanceSnapshotInfo *InstanceSnapshotInfo `locationName:"instanceSnapshotInfo" type:"structure"` - - // The name of the source instance or disk snapshot. - Name *string `locationName:"name" type:"string"` - - // The Lightsail resource type (e.g., InstanceSnapshot or DiskSnapshot). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ExportSnapshotRecordSourceType"` -} - -// String returns the string representation -func (s ExportSnapshotRecordSourceInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportSnapshotRecordSourceInfo) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ExportSnapshotRecordSourceInfo) SetArn(v string) *ExportSnapshotRecordSourceInfo { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *ExportSnapshotRecordSourceInfo) SetCreatedAt(v time.Time) *ExportSnapshotRecordSourceInfo { - s.CreatedAt = &v - return s -} - -// SetDiskSnapshotInfo sets the DiskSnapshotInfo field's value. -func (s *ExportSnapshotRecordSourceInfo) SetDiskSnapshotInfo(v *DiskSnapshotInfo) *ExportSnapshotRecordSourceInfo { - s.DiskSnapshotInfo = v - return s -} - -// SetFromResourceArn sets the FromResourceArn field's value. -func (s *ExportSnapshotRecordSourceInfo) SetFromResourceArn(v string) *ExportSnapshotRecordSourceInfo { - s.FromResourceArn = &v - return s -} - -// SetFromResourceName sets the FromResourceName field's value. -func (s *ExportSnapshotRecordSourceInfo) SetFromResourceName(v string) *ExportSnapshotRecordSourceInfo { - s.FromResourceName = &v - return s -} - -// SetInstanceSnapshotInfo sets the InstanceSnapshotInfo field's value. -func (s *ExportSnapshotRecordSourceInfo) SetInstanceSnapshotInfo(v *InstanceSnapshotInfo) *ExportSnapshotRecordSourceInfo { - s.InstanceSnapshotInfo = v - return s -} - -// SetName sets the Name field's value. -func (s *ExportSnapshotRecordSourceInfo) SetName(v string) *ExportSnapshotRecordSourceInfo { - s.Name = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ExportSnapshotRecordSourceInfo) SetResourceType(v string) *ExportSnapshotRecordSourceInfo { - s.ResourceType = &v - return s -} - -type GetActiveNamesInput struct { - _ struct{} `type:"structure"` - - // A token used for paginating results from your get active names request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetActiveNamesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetActiveNamesInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetActiveNamesInput) SetPageToken(v string) *GetActiveNamesInput { - s.PageToken = &v - return s -} - -type GetActiveNamesOutput struct { - _ struct{} `type:"structure"` - - // The list of active names returned by the get active names request. - ActiveNames []*string `locationName:"activeNames" type:"list"` - - // A token used for advancing to the next page of results from your get active - // names request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetActiveNamesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetActiveNamesOutput) GoString() string { - return s.String() -} - -// SetActiveNames sets the ActiveNames field's value. -func (s *GetActiveNamesOutput) SetActiveNames(v []*string) *GetActiveNamesOutput { - s.ActiveNames = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetActiveNamesOutput) SetNextPageToken(v string) *GetActiveNamesOutput { - s.NextPageToken = &v - return s -} - -type GetBlueprintsInput struct { - _ struct{} `type:"structure"` - - // A Boolean value indicating whether to include inactive results in your request. - IncludeInactive *bool `locationName:"includeInactive" type:"boolean"` - - // A token used for advancing to the next page of results from your get blueprints - // request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetBlueprintsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBlueprintsInput) GoString() string { - return s.String() -} - -// SetIncludeInactive sets the IncludeInactive field's value. -func (s *GetBlueprintsInput) SetIncludeInactive(v bool) *GetBlueprintsInput { - s.IncludeInactive = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *GetBlueprintsInput) SetPageToken(v string) *GetBlueprintsInput { - s.PageToken = &v - return s -} - -type GetBlueprintsOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs that contains information about the available - // blueprints. - Blueprints []*Blueprint `locationName:"blueprints" type:"list"` - - // A token used for advancing to the next page of results from your get blueprints - // request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetBlueprintsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBlueprintsOutput) GoString() string { - return s.String() -} - -// SetBlueprints sets the Blueprints field's value. -func (s *GetBlueprintsOutput) SetBlueprints(v []*Blueprint) *GetBlueprintsOutput { - s.Blueprints = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetBlueprintsOutput) SetNextPageToken(v string) *GetBlueprintsOutput { - s.NextPageToken = &v - return s -} - -type GetBundlesInput struct { - _ struct{} `type:"structure"` - - // A Boolean value that indicates whether to include inactive bundle results - // in your request. - IncludeInactive *bool `locationName:"includeInactive" type:"boolean"` - - // A token used for advancing to the next page of results from your get bundles - // request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetBundlesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBundlesInput) GoString() string { - return s.String() -} - -// SetIncludeInactive sets the IncludeInactive field's value. -func (s *GetBundlesInput) SetIncludeInactive(v bool) *GetBundlesInput { - s.IncludeInactive = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *GetBundlesInput) SetPageToken(v string) *GetBundlesInput { - s.PageToken = &v - return s -} - -type GetBundlesOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs that contains information about the available - // bundles. - Bundles []*Bundle `locationName:"bundles" type:"list"` - - // A token used for advancing to the next page of results from your get active - // names request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetBundlesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBundlesOutput) GoString() string { - return s.String() -} - -// SetBundles sets the Bundles field's value. -func (s *GetBundlesOutput) SetBundles(v []*Bundle) *GetBundlesOutput { - s.Bundles = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetBundlesOutput) SetNextPageToken(v string) *GetBundlesOutput { - s.NextPageToken = &v - return s -} - -type GetCloudFormationStackRecordsInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to a specific page of results for your get cloud - // formation stack records request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetCloudFormationStackRecordsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCloudFormationStackRecordsInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetCloudFormationStackRecordsInput) SetPageToken(v string) *GetCloudFormationStackRecordsInput { - s.PageToken = &v - return s -} - -type GetCloudFormationStackRecordsOutput struct { - _ struct{} `type:"structure"` - - // A list of objects describing the CloudFormation stack records. - CloudFormationStackRecords []*CloudFormationStackRecord `locationName:"cloudFormationStackRecords" type:"list"` - - // A token used for advancing to the next page of results of your get relational - // database bundles request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetCloudFormationStackRecordsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCloudFormationStackRecordsOutput) GoString() string { - return s.String() -} - -// SetCloudFormationStackRecords sets the CloudFormationStackRecords field's value. -func (s *GetCloudFormationStackRecordsOutput) SetCloudFormationStackRecords(v []*CloudFormationStackRecord) *GetCloudFormationStackRecordsOutput { - s.CloudFormationStackRecords = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetCloudFormationStackRecordsOutput) SetNextPageToken(v string) *GetCloudFormationStackRecordsOutput { - s.NextPageToken = &v - return s -} - -type GetDiskInput struct { - _ struct{} `type:"structure"` - - // The name of the disk (e.g., my-disk). - // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDiskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDiskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDiskInput"} - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskName sets the DiskName field's value. -func (s *GetDiskInput) SetDiskName(v string) *GetDiskInput { - s.DiskName = &v - return s -} - -type GetDiskOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about the disk. - Disk *Disk `locationName:"disk" type:"structure"` -} - -// String returns the string representation -func (s GetDiskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDiskOutput) GoString() string { - return s.String() -} - -// SetDisk sets the Disk field's value. -func (s *GetDiskOutput) SetDisk(v *Disk) *GetDiskOutput { - s.Disk = v - return s -} - -type GetDiskSnapshotInput struct { - _ struct{} `type:"structure"` - - // The name of the disk snapshot (e.g., my-disk-snapshot). - // - // DiskSnapshotName is a required field - DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDiskSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDiskSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDiskSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDiskSnapshotInput"} - if s.DiskSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskSnapshotName sets the DiskSnapshotName field's value. -func (s *GetDiskSnapshotInput) SetDiskSnapshotName(v string) *GetDiskSnapshotInput { - s.DiskSnapshotName = &v - return s -} - -type GetDiskSnapshotOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about the disk snapshot. - DiskSnapshot *DiskSnapshot `locationName:"diskSnapshot" type:"structure"` -} - -// String returns the string representation -func (s GetDiskSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDiskSnapshotOutput) GoString() string { - return s.String() -} - -// SetDiskSnapshot sets the DiskSnapshot field's value. -func (s *GetDiskSnapshotOutput) SetDiskSnapshot(v *DiskSnapshot) *GetDiskSnapshotOutput { - s.DiskSnapshot = v - return s -} - -type GetDiskSnapshotsInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your GetDiskSnapshots - // request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetDiskSnapshotsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDiskSnapshotsInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetDiskSnapshotsInput) SetPageToken(v string) *GetDiskSnapshotsInput { - s.PageToken = &v - return s -} - -type GetDiskSnapshotsOutput struct { - _ struct{} `type:"structure"` - - // An array of objects containing information about all block storage disk snapshots. - DiskSnapshots []*DiskSnapshot `locationName:"diskSnapshots" type:"list"` - - // A token used for advancing to the next page of results from your GetDiskSnapshots - // request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetDiskSnapshotsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDiskSnapshotsOutput) GoString() string { - return s.String() -} - -// SetDiskSnapshots sets the DiskSnapshots field's value. -func (s *GetDiskSnapshotsOutput) SetDiskSnapshots(v []*DiskSnapshot) *GetDiskSnapshotsOutput { - s.DiskSnapshots = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetDiskSnapshotsOutput) SetNextPageToken(v string) *GetDiskSnapshotsOutput { - s.NextPageToken = &v - return s -} - -type GetDisksInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your GetDisks - // request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetDisksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDisksInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetDisksInput) SetPageToken(v string) *GetDisksInput { - s.PageToken = &v - return s -} - -type GetDisksOutput struct { - _ struct{} `type:"structure"` - - // An array of objects containing information about all block storage disks. - Disks []*Disk `locationName:"disks" type:"list"` - - // A token used for advancing to the next page of results from your GetDisks - // request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetDisksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDisksOutput) GoString() string { - return s.String() -} - -// SetDisks sets the Disks field's value. -func (s *GetDisksOutput) SetDisks(v []*Disk) *GetDisksOutput { - s.Disks = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetDisksOutput) SetNextPageToken(v string) *GetDisksOutput { - s.NextPageToken = &v - return s -} - -type GetDomainInput struct { - _ struct{} `type:"structure"` - - // The domain name for which your want to return information about. - // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *GetDomainInput) SetDomainName(v string) *GetDomainInput { - s.DomainName = &v - return s -} - -type GetDomainOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about your get domain - // request. - Domain *Domain `locationName:"domain" type:"structure"` -} - -// String returns the string representation -func (s GetDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDomainOutput) GoString() string { - return s.String() -} - -// SetDomain sets the Domain field's value. -func (s *GetDomainOutput) SetDomain(v *Domain) *GetDomainOutput { - s.Domain = v - return s -} - -type GetDomainsInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get domains - // request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetDomainsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDomainsInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetDomainsInput) SetPageToken(v string) *GetDomainsInput { - s.PageToken = &v - return s -} - -type GetDomainsOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about each of the domain - // entries in the user's account. - Domains []*Domain `locationName:"domains" type:"list"` - - // A token used for advancing to the next page of results from your get active - // names request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetDomainsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDomainsOutput) GoString() string { - return s.String() -} - -// SetDomains sets the Domains field's value. -func (s *GetDomainsOutput) SetDomains(v []*Domain) *GetDomainsOutput { - s.Domains = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetDomainsOutput) SetNextPageToken(v string) *GetDomainsOutput { - s.NextPageToken = &v - return s -} - -type GetExportSnapshotRecordsInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to a specific page of results for your get export - // snapshot records request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetExportSnapshotRecordsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetExportSnapshotRecordsInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetExportSnapshotRecordsInput) SetPageToken(v string) *GetExportSnapshotRecordsInput { - s.PageToken = &v - return s -} - -type GetExportSnapshotRecordsOutput struct { - _ struct{} `type:"structure"` - - // A list of objects describing the export snapshot records. - ExportSnapshotRecords []*ExportSnapshotRecord `locationName:"exportSnapshotRecords" type:"list"` - - // A token used for advancing to the next page of results of your get relational - // database bundles request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetExportSnapshotRecordsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetExportSnapshotRecordsOutput) GoString() string { - return s.String() -} - -// SetExportSnapshotRecords sets the ExportSnapshotRecords field's value. -func (s *GetExportSnapshotRecordsOutput) SetExportSnapshotRecords(v []*ExportSnapshotRecord) *GetExportSnapshotRecordsOutput { - s.ExportSnapshotRecords = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetExportSnapshotRecordsOutput) SetNextPageToken(v string) *GetExportSnapshotRecordsOutput { - s.NextPageToken = &v - return s -} - -type GetInstanceAccessDetailsInput struct { - _ struct{} `type:"structure"` - - // The name of the instance to access. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - - // The protocol to use to connect to your instance. Defaults to ssh. - Protocol *string `locationName:"protocol" type:"string" enum:"InstanceAccessProtocol"` -} - -// String returns the string representation -func (s GetInstanceAccessDetailsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceAccessDetailsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceAccessDetailsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceAccessDetailsInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstanceAccessDetailsInput) SetInstanceName(v string) *GetInstanceAccessDetailsInput { - s.InstanceName = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *GetInstanceAccessDetailsInput) SetProtocol(v string) *GetInstanceAccessDetailsInput { - s.Protocol = &v - return s -} - -type GetInstanceAccessDetailsOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about a get instance access - // request. - AccessDetails *InstanceAccessDetails `locationName:"accessDetails" type:"structure"` -} - -// String returns the string representation -func (s GetInstanceAccessDetailsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceAccessDetailsOutput) GoString() string { - return s.String() -} - -// SetAccessDetails sets the AccessDetails field's value. -func (s *GetInstanceAccessDetailsOutput) SetAccessDetails(v *InstanceAccessDetails) *GetInstanceAccessDetailsOutput { - s.AccessDetails = v - return s -} - -type GetInstanceInput struct { - _ struct{} `type:"structure"` - - // The name of the instance. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstanceInput) SetInstanceName(v string) *GetInstanceInput { - s.InstanceName = &v - return s -} - -type GetInstanceMetricDataInput struct { - _ struct{} `type:"structure"` - - // The end time of the time period. - // - // EndTime is a required field - EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` - - // The name of the instance for which you want to get metrics data. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - - // The metric name to get data about. - // - // MetricName is a required field - MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"InstanceMetricName"` - - // The granularity, in seconds, of the returned data points. - // - // Period is a required field - Period *int64 `locationName:"period" min:"60" type:"integer" required:"true"` - - // The start time of the time period. - // - // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` - - // The instance statistics. - // - // Statistics is a required field - Statistics []*string `locationName:"statistics" type:"list" required:"true"` - - // The unit. The list of valid values is below. - // - // Unit is a required field - Unit *string `locationName:"unit" type:"string" required:"true" enum:"MetricUnit"` -} - -// String returns the string representation -func (s GetInstanceMetricDataInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceMetricDataInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceMetricDataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceMetricDataInput"} - if s.EndTime == nil { - invalidParams.Add(request.NewErrParamRequired("EndTime")) - } - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.Period == nil { - invalidParams.Add(request.NewErrParamRequired("Period")) - } - if s.Period != nil && *s.Period < 60 { - invalidParams.Add(request.NewErrParamMinValue("Period", 60)) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) - } - if s.Statistics == nil { - invalidParams.Add(request.NewErrParamRequired("Statistics")) - } - if s.Unit == nil { - invalidParams.Add(request.NewErrParamRequired("Unit")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndTime sets the EndTime field's value. -func (s *GetInstanceMetricDataInput) SetEndTime(v time.Time) *GetInstanceMetricDataInput { - s.EndTime = &v - return s -} - -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstanceMetricDataInput) SetInstanceName(v string) *GetInstanceMetricDataInput { - s.InstanceName = &v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *GetInstanceMetricDataInput) SetMetricName(v string) *GetInstanceMetricDataInput { - s.MetricName = &v - return s -} - -// SetPeriod sets the Period field's value. -func (s *GetInstanceMetricDataInput) SetPeriod(v int64) *GetInstanceMetricDataInput { - s.Period = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *GetInstanceMetricDataInput) SetStartTime(v time.Time) *GetInstanceMetricDataInput { - s.StartTime = &v - return s -} - -// SetStatistics sets the Statistics field's value. -func (s *GetInstanceMetricDataInput) SetStatistics(v []*string) *GetInstanceMetricDataInput { - s.Statistics = v - return s -} - -// SetUnit sets the Unit field's value. -func (s *GetInstanceMetricDataInput) SetUnit(v string) *GetInstanceMetricDataInput { - s.Unit = &v - return s -} - -type GetInstanceMetricDataOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the results of your - // get instance metric data request. - MetricData []*MetricDatapoint `locationName:"metricData" type:"list"` - - // The metric name to return data for. - MetricName *string `locationName:"metricName" type:"string" enum:"InstanceMetricName"` -} - -// String returns the string representation -func (s GetInstanceMetricDataOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceMetricDataOutput) GoString() string { - return s.String() -} - -// SetMetricData sets the MetricData field's value. -func (s *GetInstanceMetricDataOutput) SetMetricData(v []*MetricDatapoint) *GetInstanceMetricDataOutput { - s.MetricData = v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *GetInstanceMetricDataOutput) SetMetricName(v string) *GetInstanceMetricDataOutput { - s.MetricName = &v - return s -} - -type GetInstanceOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the specified instance. - Instance *Instance `locationName:"instance" type:"structure"` -} - -// String returns the string representation -func (s GetInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceOutput) GoString() string { - return s.String() -} - -// SetInstance sets the Instance field's value. -func (s *GetInstanceOutput) SetInstance(v *Instance) *GetInstanceOutput { - s.Instance = v - return s -} - -type GetInstancePortStatesInput struct { - _ struct{} `type:"structure"` - - // The name of the instance. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetInstancePortStatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstancePortStatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstancePortStatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstancePortStatesInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstancePortStatesInput) SetInstanceName(v string) *GetInstancePortStatesInput { - s.InstanceName = &v - return s -} - -type GetInstancePortStatesOutput struct { - _ struct{} `type:"structure"` - - // Information about the port states resulting from your request. - PortStates []*InstancePortState `locationName:"portStates" type:"list"` -} - -// String returns the string representation -func (s GetInstancePortStatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstancePortStatesOutput) GoString() string { - return s.String() -} - -// SetPortStates sets the PortStates field's value. -func (s *GetInstancePortStatesOutput) SetPortStates(v []*InstancePortState) *GetInstancePortStatesOutput { - s.PortStates = v - return s -} - -type GetInstanceSnapshotInput struct { - _ struct{} `type:"structure"` - - // The name of the snapshot for which you are requesting information. - // - // InstanceSnapshotName is a required field - InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetInstanceSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceSnapshotInput"} - if s.InstanceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. -func (s *GetInstanceSnapshotInput) SetInstanceSnapshotName(v string) *GetInstanceSnapshotInput { - s.InstanceSnapshotName = &v - return s -} - -type GetInstanceSnapshotOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the results of your - // get instance snapshot request. - InstanceSnapshot *InstanceSnapshot `locationName:"instanceSnapshot" type:"structure"` -} - -// String returns the string representation -func (s GetInstanceSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceSnapshotOutput) GoString() string { - return s.String() -} - -// SetInstanceSnapshot sets the InstanceSnapshot field's value. -func (s *GetInstanceSnapshotOutput) SetInstanceSnapshot(v *InstanceSnapshot) *GetInstanceSnapshotOutput { - s.InstanceSnapshot = v - return s -} - -type GetInstanceSnapshotsInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get instance - // snapshots request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetInstanceSnapshotsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceSnapshotsInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetInstanceSnapshotsInput) SetPageToken(v string) *GetInstanceSnapshotsInput { - s.PageToken = &v - return s -} - -type GetInstanceSnapshotsOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the results of your - // get instance snapshots request. - InstanceSnapshots []*InstanceSnapshot `locationName:"instanceSnapshots" type:"list"` - - // A token used for advancing to the next page of results from your get instance - // snapshots request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetInstanceSnapshotsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceSnapshotsOutput) GoString() string { - return s.String() -} - -// SetInstanceSnapshots sets the InstanceSnapshots field's value. -func (s *GetInstanceSnapshotsOutput) SetInstanceSnapshots(v []*InstanceSnapshot) *GetInstanceSnapshotsOutput { - s.InstanceSnapshots = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetInstanceSnapshotsOutput) SetNextPageToken(v string) *GetInstanceSnapshotsOutput { - s.NextPageToken = &v - return s -} - -type GetInstanceStateInput struct { - _ struct{} `type:"structure"` - - // The name of the instance to get state information about. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetInstanceStateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceStateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceStateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceStateInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstanceStateInput) SetInstanceName(v string) *GetInstanceStateInput { - s.InstanceName = &v - return s -} - -type GetInstanceStateOutput struct { - _ struct{} `type:"structure"` - - // The state of the instance. - State *InstanceState `locationName:"state" type:"structure"` -} - -// String returns the string representation -func (s GetInstanceStateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceStateOutput) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *GetInstanceStateOutput) SetState(v *InstanceState) *GetInstanceStateOutput { - s.State = v - return s -} - -type GetInstancesInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get instances - // request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstancesInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetInstancesInput) SetPageToken(v string) *GetInstancesInput { - s.PageToken = &v - return s -} - -type GetInstancesOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about your instances. - Instances []*Instance `locationName:"instances" type:"list"` - - // A token used for advancing to the next page of results from your get instances - // request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstancesOutput) GoString() string { - return s.String() -} - -// SetInstances sets the Instances field's value. -func (s *GetInstancesOutput) SetInstances(v []*Instance) *GetInstancesOutput { - s.Instances = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetInstancesOutput) SetNextPageToken(v string) *GetInstancesOutput { - s.NextPageToken = &v - return s -} - -type GetKeyPairInput struct { - _ struct{} `type:"structure"` - - // The name of the key pair for which you are requesting information. - // - // KeyPairName is a required field - KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetKeyPairInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetKeyPairInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetKeyPairInput"} - if s.KeyPairName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyPairName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyPairName sets the KeyPairName field's value. -func (s *GetKeyPairInput) SetKeyPairName(v string) *GetKeyPairInput { - s.KeyPairName = &v - return s -} - -type GetKeyPairOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the key pair. - KeyPair *KeyPair `locationName:"keyPair" type:"structure"` -} - -// String returns the string representation -func (s GetKeyPairOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetKeyPairOutput) GoString() string { - return s.String() -} - -// SetKeyPair sets the KeyPair field's value. -func (s *GetKeyPairOutput) SetKeyPair(v *KeyPair) *GetKeyPairOutput { - s.KeyPair = v - return s -} - -type GetKeyPairsInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get key - // pairs request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetKeyPairsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetKeyPairsInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetKeyPairsInput) SetPageToken(v string) *GetKeyPairsInput { - s.PageToken = &v - return s -} - -type GetKeyPairsOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the key pairs. - KeyPairs []*KeyPair `locationName:"keyPairs" type:"list"` - - // A token used for advancing to the next page of results from your get key - // pairs request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetKeyPairsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetKeyPairsOutput) GoString() string { - return s.String() -} - -// SetKeyPairs sets the KeyPairs field's value. -func (s *GetKeyPairsOutput) SetKeyPairs(v []*KeyPair) *GetKeyPairsOutput { - s.KeyPairs = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetKeyPairsOutput) SetNextPageToken(v string) *GetKeyPairsOutput { - s.NextPageToken = &v - return s -} - -type GetLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *GetLoadBalancerInput) SetLoadBalancerName(v string) *GetLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -type GetLoadBalancerMetricDataInput struct { - _ struct{} `type:"structure"` - - // The end time of the period. - // - // EndTime is a required field - EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` - - // The metric about which you want to return information. Valid values are listed - // below, along with the most useful statistics to include in your request. - // - // * ClientTLSNegotiationErrorCount - The number of TLS connections initiated - // by the client that did not establish a session with the load balancer. - // Possible causes include a mismatch of ciphers or protocols. - // - // Statistics: The most useful statistic is Sum. - // - // * HealthyHostCount - The number of target instances that are considered - // healthy. - // - // Statistics: The most useful statistic are Average, Minimum, and Maximum. - // - // * UnhealthyHostCount - The number of target instances that are considered - // unhealthy. - // - // Statistics: The most useful statistic are Average, Minimum, and Maximum. - // - // * HTTPCode_LB_4XX_Count - The number of HTTP 4XX client error codes that - // originate from the load balancer. Client errors are generated when requests - // are malformed or incomplete. These requests have not been received by - // the target instance. This count does not include any response codes generated - // by the target instances. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_LB_5XX_Count - The number of HTTP 5XX server error codes that - // originate from the load balancer. This count does not include any response - // codes generated by the target instances. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. Note that Minimum, Maximum, and Average all - // return 1. - // - // * HTTPCode_Instance_2XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_3XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_4XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_5XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * InstanceResponseTime - The time elapsed, in seconds, after the request - // leaves the load balancer until a response from the target instance is - // received. - // - // Statistics: The most useful statistic is Average. - // - // * RejectedConnectionCount - The number of connections that were rejected - // because the load balancer had reached its maximum number of connections. - // - // Statistics: The most useful statistic is Sum. - // - // * RequestCount - The number of requests processed over IPv4. This count - // includes only the requests with a response generated by a target instance - // of the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // MetricName is a required field - MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"LoadBalancerMetricName"` - - // The granularity, in seconds, of the returned data points. - // - // Period is a required field - Period *int64 `locationName:"period" min:"60" type:"integer" required:"true"` - - // The start time of the period. - // - // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` - - // An array of statistics that you want to request metrics for. Valid values - // are listed below. - // - // * SampleCount - The count (number) of data points used for the statistical - // calculation. - // - // * Average - The value of Sum / SampleCount during the specified period. - // By comparing this statistic with the Minimum and Maximum, you can determine - // the full scope of a metric and how close the average use is to the Minimum - // and Maximum. This comparison helps you to know when to increase or decrease - // your resources as needed. - // - // * Sum - All values submitted for the matching metric added together. This - // statistic can be useful for determining the total volume of a metric. - // - // * Minimum - The lowest value observed during the specified period. You - // can use this value to determine low volumes of activity for your application. - // - // * Maximum - The highest value observed during the specified period. You - // can use this value to determine high volumes of activity for your application. - // - // Statistics is a required field - Statistics []*string `locationName:"statistics" type:"list" required:"true"` - - // The unit for the time period request. Valid values are listed below. - // - // Unit is a required field - Unit *string `locationName:"unit" type:"string" required:"true" enum:"MetricUnit"` -} - -// String returns the string representation -func (s GetLoadBalancerMetricDataInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLoadBalancerMetricDataInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLoadBalancerMetricDataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerMetricDataInput"} - if s.EndTime == nil { - invalidParams.Add(request.NewErrParamRequired("EndTime")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.Period == nil { - invalidParams.Add(request.NewErrParamRequired("Period")) - } - if s.Period != nil && *s.Period < 60 { - invalidParams.Add(request.NewErrParamMinValue("Period", 60)) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) - } - if s.Statistics == nil { - invalidParams.Add(request.NewErrParamRequired("Statistics")) - } - if s.Unit == nil { - invalidParams.Add(request.NewErrParamRequired("Unit")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndTime sets the EndTime field's value. -func (s *GetLoadBalancerMetricDataInput) SetEndTime(v time.Time) *GetLoadBalancerMetricDataInput { - s.EndTime = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *GetLoadBalancerMetricDataInput) SetLoadBalancerName(v string) *GetLoadBalancerMetricDataInput { - s.LoadBalancerName = &v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *GetLoadBalancerMetricDataInput) SetMetricName(v string) *GetLoadBalancerMetricDataInput { - s.MetricName = &v - return s -} - -// SetPeriod sets the Period field's value. -func (s *GetLoadBalancerMetricDataInput) SetPeriod(v int64) *GetLoadBalancerMetricDataInput { - s.Period = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *GetLoadBalancerMetricDataInput) SetStartTime(v time.Time) *GetLoadBalancerMetricDataInput { - s.StartTime = &v - return s -} - -// SetStatistics sets the Statistics field's value. -func (s *GetLoadBalancerMetricDataInput) SetStatistics(v []*string) *GetLoadBalancerMetricDataInput { - s.Statistics = v - return s -} - -// SetUnit sets the Unit field's value. -func (s *GetLoadBalancerMetricDataInput) SetUnit(v string) *GetLoadBalancerMetricDataInput { - s.Unit = &v - return s -} - -type GetLoadBalancerMetricDataOutput struct { - _ struct{} `type:"structure"` - - // An array of metric datapoint objects. - MetricData []*MetricDatapoint `locationName:"metricData" type:"list"` - - // The metric about which you are receiving information. Valid values are listed - // below, along with the most useful statistics to include in your request. - // - // * ClientTLSNegotiationErrorCount - The number of TLS connections initiated - // by the client that did not establish a session with the load balancer. - // Possible causes include a mismatch of ciphers or protocols. - // - // Statistics: The most useful statistic is Sum. - // - // * HealthyHostCount - The number of target instances that are considered - // healthy. - // - // Statistics: The most useful statistic are Average, Minimum, and Maximum. - // - // * UnhealthyHostCount - The number of target instances that are considered - // unhealthy. - // - // Statistics: The most useful statistic are Average, Minimum, and Maximum. - // - // * HTTPCode_LB_4XX_Count - The number of HTTP 4XX client error codes that - // originate from the load balancer. Client errors are generated when requests - // are malformed or incomplete. These requests have not been received by - // the target instance. This count does not include any response codes generated - // by the target instances. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_LB_5XX_Count - The number of HTTP 5XX server error codes that - // originate from the load balancer. This count does not include any response - // codes generated by the target instances. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. Note that Minimum, Maximum, and Average all - // return 1. - // - // * HTTPCode_Instance_2XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_3XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_4XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_5XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * InstanceResponseTime - The time elapsed, in seconds, after the request - // leaves the load balancer until a response from the target instance is - // received. - // - // Statistics: The most useful statistic is Average. - // - // * RejectedConnectionCount - The number of connections that were rejected - // because the load balancer had reached its maximum number of connections. - // - // Statistics: The most useful statistic is Sum. - // - // * RequestCount - The number of requests processed over IPv4. This count - // includes only the requests with a response generated by a target instance - // of the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - MetricName *string `locationName:"metricName" type:"string" enum:"LoadBalancerMetricName"` -} - -// String returns the string representation -func (s GetLoadBalancerMetricDataOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLoadBalancerMetricDataOutput) GoString() string { - return s.String() -} - -// SetMetricData sets the MetricData field's value. -func (s *GetLoadBalancerMetricDataOutput) SetMetricData(v []*MetricDatapoint) *GetLoadBalancerMetricDataOutput { - s.MetricData = v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *GetLoadBalancerMetricDataOutput) SetMetricName(v string) *GetLoadBalancerMetricDataOutput { - s.MetricName = &v - return s -} - -type GetLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about your load balancer. - LoadBalancer *LoadBalancer `locationName:"loadBalancer" type:"structure"` -} - -// String returns the string representation -func (s GetLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetLoadBalancer sets the LoadBalancer field's value. -func (s *GetLoadBalancerOutput) SetLoadBalancer(v *LoadBalancer) *GetLoadBalancerOutput { - s.LoadBalancer = v - return s -} - -type GetLoadBalancerTlsCertificatesInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer you associated with your SSL/TLS certificate. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetLoadBalancerTlsCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLoadBalancerTlsCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLoadBalancerTlsCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerTlsCertificatesInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *GetLoadBalancerTlsCertificatesInput) SetLoadBalancerName(v string) *GetLoadBalancerTlsCertificatesInput { - s.LoadBalancerName = &v - return s -} - -type GetLoadBalancerTlsCertificatesOutput struct { - _ struct{} `type:"structure"` - - // An array of LoadBalancerTlsCertificate objects describing your SSL/TLS certificates. - TlsCertificates []*LoadBalancerTlsCertificate `locationName:"tlsCertificates" type:"list"` -} - -// String returns the string representation -func (s GetLoadBalancerTlsCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLoadBalancerTlsCertificatesOutput) GoString() string { - return s.String() -} - -// SetTlsCertificates sets the TlsCertificates field's value. -func (s *GetLoadBalancerTlsCertificatesOutput) SetTlsCertificates(v []*LoadBalancerTlsCertificate) *GetLoadBalancerTlsCertificatesOutput { - s.TlsCertificates = v - return s -} - -type GetLoadBalancersInput struct { - _ struct{} `type:"structure"` - - // A token used for paginating the results from your GetLoadBalancers request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetLoadBalancersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLoadBalancersInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetLoadBalancersInput) SetPageToken(v string) *GetLoadBalancersInput { - s.PageToken = &v - return s -} - -type GetLoadBalancersOutput struct { - _ struct{} `type:"structure"` - - // An array of LoadBalancer objects describing your load balancers. - LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` - - // A token used for advancing to the next page of results from your GetLoadBalancers - // request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetLoadBalancersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLoadBalancersOutput) GoString() string { - return s.String() -} - -// SetLoadBalancers sets the LoadBalancers field's value. -func (s *GetLoadBalancersOutput) SetLoadBalancers(v []*LoadBalancer) *GetLoadBalancersOutput { - s.LoadBalancers = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetLoadBalancersOutput) SetNextPageToken(v string) *GetLoadBalancersOutput { - s.NextPageToken = &v - return s -} - -type GetOperationInput struct { - _ struct{} `type:"structure"` - - // A GUID used to identify the operation. - // - // OperationId is a required field - OperationId *string `locationName:"operationId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetOperationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOperationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOperationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOperationInput"} - if s.OperationId == nil { - invalidParams.Add(request.NewErrParamRequired("OperationId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOperationId sets the OperationId field's value. -func (s *GetOperationInput) SetOperationId(v string) *GetOperationInput { - s.OperationId = &v - return s -} - -type GetOperationOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the results of your - // get operation request. - Operation *Operation `locationName:"operation" type:"structure"` -} - -// String returns the string representation -func (s GetOperationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOperationOutput) GoString() string { - return s.String() -} - -// SetOperation sets the Operation field's value. -func (s *GetOperationOutput) SetOperation(v *Operation) *GetOperationOutput { - s.Operation = v - return s -} - -type GetOperationsForResourceInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get operations - // for resource request. - PageToken *string `locationName:"pageToken" type:"string"` - - // The name of the resource for which you are requesting information. - // - // ResourceName is a required field - ResourceName *string `locationName:"resourceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetOperationsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOperationsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOperationsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOperationsForResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPageToken sets the PageToken field's value. -func (s *GetOperationsForResourceInput) SetPageToken(v string) *GetOperationsForResourceInput { - s.PageToken = &v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *GetOperationsForResourceInput) SetResourceName(v string) *GetOperationsForResourceInput { - s.ResourceName = &v - return s -} - -type GetOperationsForResourceOutput struct { - _ struct{} `type:"structure"` - - // (Deprecated) Returns the number of pages of results that remain. - // - // In releases prior to June 12, 2017, this parameter returned null by the API. - // It is now deprecated, and the API returns the next page token parameter instead. - // - // Deprecated: NextPageCount has been deprecated - NextPageCount *string `locationName:"nextPageCount" deprecated:"true" type:"string"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // An array of key-value pairs containing information about the results of your - // get operations for resource request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s GetOperationsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOperationsForResourceOutput) GoString() string { - return s.String() -} - -// SetNextPageCount sets the NextPageCount field's value. -func (s *GetOperationsForResourceOutput) SetNextPageCount(v string) *GetOperationsForResourceOutput { - s.NextPageCount = &v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetOperationsForResourceOutput) SetNextPageToken(v string) *GetOperationsForResourceOutput { - s.NextPageToken = &v - return s -} - -// SetOperations sets the Operations field's value. -func (s *GetOperationsForResourceOutput) SetOperations(v []*Operation) *GetOperationsForResourceOutput { - s.Operations = v - return s -} - -type GetOperationsInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get operations - // request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetOperationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOperationsInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetOperationsInput) SetPageToken(v string) *GetOperationsInput { - s.PageToken = &v - return s -} - -type GetOperationsOutput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get operations - // request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // An array of key-value pairs containing information about the results of your - // get operations request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s GetOperationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOperationsOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetOperationsOutput) SetNextPageToken(v string) *GetOperationsOutput { - s.NextPageToken = &v - return s -} - -// SetOperations sets the Operations field's value. -func (s *GetOperationsOutput) SetOperations(v []*Operation) *GetOperationsOutput { - s.Operations = v - return s -} - -type GetRegionsInput struct { - _ struct{} `type:"structure"` - - // A Boolean value indicating whether to also include Availability Zones in - // your get regions request. Availability Zones are indicated with a letter: - // e.g., us-east-2a. - IncludeAvailabilityZones *bool `locationName:"includeAvailabilityZones" type:"boolean"` - - // >A Boolean value indicating whether to also include Availability Zones for - // databases in your get regions request. Availability Zones are indicated with - // a letter (e.g., us-east-2a). - IncludeRelationalDatabaseAvailabilityZones *bool `locationName:"includeRelationalDatabaseAvailabilityZones" type:"boolean"` -} - -// String returns the string representation -func (s GetRegionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRegionsInput) GoString() string { - return s.String() -} - -// SetIncludeAvailabilityZones sets the IncludeAvailabilityZones field's value. -func (s *GetRegionsInput) SetIncludeAvailabilityZones(v bool) *GetRegionsInput { - s.IncludeAvailabilityZones = &v - return s -} - -// SetIncludeRelationalDatabaseAvailabilityZones sets the IncludeRelationalDatabaseAvailabilityZones field's value. -func (s *GetRegionsInput) SetIncludeRelationalDatabaseAvailabilityZones(v bool) *GetRegionsInput { - s.IncludeRelationalDatabaseAvailabilityZones = &v - return s -} - -type GetRegionsOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about your get regions - // request. - Regions []*Region `locationName:"regions" type:"list"` -} - -// String returns the string representation -func (s GetRegionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRegionsOutput) GoString() string { - return s.String() -} - -// SetRegions sets the Regions field's value. -func (s *GetRegionsOutput) SetRegions(v []*Region) *GetRegionsOutput { - s.Regions = v - return s -} - -type GetRelationalDatabaseBlueprintsInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to a specific page of results for your get relational - // database blueprints request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetRelationalDatabaseBlueprintsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseBlueprintsInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetRelationalDatabaseBlueprintsInput) SetPageToken(v string) *GetRelationalDatabaseBlueprintsInput { - s.PageToken = &v - return s -} - -type GetRelationalDatabaseBlueprintsOutput struct { - _ struct{} `type:"structure"` - - // An object describing the result of your get relational database blueprints - // request. - Blueprints []*RelationalDatabaseBlueprint `locationName:"blueprints" type:"list"` - - // A token used for advancing to the next page of results of your get relational - // database blueprints request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetRelationalDatabaseBlueprintsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseBlueprintsOutput) GoString() string { - return s.String() -} - -// SetBlueprints sets the Blueprints field's value. -func (s *GetRelationalDatabaseBlueprintsOutput) SetBlueprints(v []*RelationalDatabaseBlueprint) *GetRelationalDatabaseBlueprintsOutput { - s.Blueprints = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetRelationalDatabaseBlueprintsOutput) SetNextPageToken(v string) *GetRelationalDatabaseBlueprintsOutput { - s.NextPageToken = &v - return s -} - -type GetRelationalDatabaseBundlesInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to a specific page of results for your get relational - // database bundles request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetRelationalDatabaseBundlesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseBundlesInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetRelationalDatabaseBundlesInput) SetPageToken(v string) *GetRelationalDatabaseBundlesInput { - s.PageToken = &v - return s -} - -type GetRelationalDatabaseBundlesOutput struct { - _ struct{} `type:"structure"` - - // An object describing the result of your get relational database bundles request. - Bundles []*RelationalDatabaseBundle `locationName:"bundles" type:"list"` - - // A token used for advancing to the next page of results of your get relational - // database bundles request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetRelationalDatabaseBundlesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseBundlesOutput) GoString() string { - return s.String() -} - -// SetBundles sets the Bundles field's value. -func (s *GetRelationalDatabaseBundlesOutput) SetBundles(v []*RelationalDatabaseBundle) *GetRelationalDatabaseBundlesOutput { - s.Bundles = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetRelationalDatabaseBundlesOutput) SetNextPageToken(v string) *GetRelationalDatabaseBundlesOutput { - s.NextPageToken = &v - return s -} - -type GetRelationalDatabaseEventsInput struct { - _ struct{} `type:"structure"` - - // The number of minutes in the past from which to retrieve events. For example, - // to get all events from the past 2 hours, enter 120. - // - // Default: 60 - // - // The minimum is 1 and the maximum is 14 days (20160 minutes). - DurationInMinutes *int64 `locationName:"durationInMinutes" type:"integer"` - - // A token used for advancing to a specific page of results from for get relational - // database events request. - PageToken *string `locationName:"pageToken" type:"string"` - - // The name of the database from which to get events. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRelationalDatabaseEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRelationalDatabaseEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseEventsInput"} - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDurationInMinutes sets the DurationInMinutes field's value. -func (s *GetRelationalDatabaseEventsInput) SetDurationInMinutes(v int64) *GetRelationalDatabaseEventsInput { - s.DurationInMinutes = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *GetRelationalDatabaseEventsInput) SetPageToken(v string) *GetRelationalDatabaseEventsInput { - s.PageToken = &v - return s -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *GetRelationalDatabaseEventsInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseEventsInput { - s.RelationalDatabaseName = &v - return s -} - -type GetRelationalDatabaseEventsOutput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get relational - // database events request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // An object describing the result of your get relational database events request. - RelationalDatabaseEvents []*RelationalDatabaseEvent `locationName:"relationalDatabaseEvents" type:"list"` -} - -// String returns the string representation -func (s GetRelationalDatabaseEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseEventsOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetRelationalDatabaseEventsOutput) SetNextPageToken(v string) *GetRelationalDatabaseEventsOutput { - s.NextPageToken = &v - return s -} - -// SetRelationalDatabaseEvents sets the RelationalDatabaseEvents field's value. -func (s *GetRelationalDatabaseEventsOutput) SetRelationalDatabaseEvents(v []*RelationalDatabaseEvent) *GetRelationalDatabaseEventsOutput { - s.RelationalDatabaseEvents = v - return s -} - -type GetRelationalDatabaseInput struct { - _ struct{} `type:"structure"` - - // The name of the database that you are looking up. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRelationalDatabaseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRelationalDatabaseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseInput"} - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *GetRelationalDatabaseInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseInput { - s.RelationalDatabaseName = &v - return s -} - -type GetRelationalDatabaseLogEventsInput struct { - _ struct{} `type:"structure"` - - // The end of the time interval from which to get log events. - // - // Constraints: - // - // * Specified in Universal Coordinated Time (UTC). - // - // * Specified in the Unix time format. - // - // For example, if you wish to use an end time of October 1, 2018, at 8 PM UTC, - // then you input 1538424000 as the end time. - EndTime *time.Time `locationName:"endTime" type:"timestamp"` - - // The name of the log stream. - // - // Use the get relational database log streams operation to get a list of available - // log streams. - // - // LogStreamName is a required field - LogStreamName *string `locationName:"logStreamName" type:"string" required:"true"` - - // A token used for advancing to a specific page of results for your get relational - // database log events request. - PageToken *string `locationName:"pageToken" type:"string"` - - // The name of your database for which to get log events. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` - - // Parameter to specify if the log should start from head or tail. If true is - // specified, the log event starts from the head of the log. If false is specified, - // the log event starts from the tail of the log. - // - // Default: false - StartFromHead *bool `locationName:"startFromHead" type:"boolean"` - - // The start of the time interval from which to get log events. - // - // Constraints: - // - // * Specified in Universal Coordinated Time (UTC). - // - // * Specified in the Unix time format. - // - // For example, if you wish to use a start time of October 1, 2018, at 8 PM - // UTC, then you input 1538424000 as the start time. - StartTime *time.Time `locationName:"startTime" type:"timestamp"` -} - -// String returns the string representation -func (s GetRelationalDatabaseLogEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseLogEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRelationalDatabaseLogEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseLogEventsInput"} - if s.LogStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("LogStreamName")) - } - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndTime sets the EndTime field's value. -func (s *GetRelationalDatabaseLogEventsInput) SetEndTime(v time.Time) *GetRelationalDatabaseLogEventsInput { - s.EndTime = &v - return s -} - -// SetLogStreamName sets the LogStreamName field's value. -func (s *GetRelationalDatabaseLogEventsInput) SetLogStreamName(v string) *GetRelationalDatabaseLogEventsInput { - s.LogStreamName = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *GetRelationalDatabaseLogEventsInput) SetPageToken(v string) *GetRelationalDatabaseLogEventsInput { - s.PageToken = &v - return s -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *GetRelationalDatabaseLogEventsInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseLogEventsInput { - s.RelationalDatabaseName = &v - return s -} - -// SetStartFromHead sets the StartFromHead field's value. -func (s *GetRelationalDatabaseLogEventsInput) SetStartFromHead(v bool) *GetRelationalDatabaseLogEventsInput { - s.StartFromHead = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *GetRelationalDatabaseLogEventsInput) SetStartTime(v time.Time) *GetRelationalDatabaseLogEventsInput { - s.StartTime = &v - return s -} - -type GetRelationalDatabaseLogEventsOutput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the previous page of results from your get - // relational database log events request. - NextBackwardToken *string `locationName:"nextBackwardToken" type:"string"` - - // A token used for advancing to the next page of results from your get relational - // database log events request. - NextForwardToken *string `locationName:"nextForwardToken" type:"string"` - - // An object describing the result of your get relational database log events - // request. - ResourceLogEvents []*LogEvent `locationName:"resourceLogEvents" type:"list"` -} - -// String returns the string representation -func (s GetRelationalDatabaseLogEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseLogEventsOutput) GoString() string { - return s.String() -} - -// SetNextBackwardToken sets the NextBackwardToken field's value. -func (s *GetRelationalDatabaseLogEventsOutput) SetNextBackwardToken(v string) *GetRelationalDatabaseLogEventsOutput { - s.NextBackwardToken = &v - return s -} - -// SetNextForwardToken sets the NextForwardToken field's value. -func (s *GetRelationalDatabaseLogEventsOutput) SetNextForwardToken(v string) *GetRelationalDatabaseLogEventsOutput { - s.NextForwardToken = &v - return s -} - -// SetResourceLogEvents sets the ResourceLogEvents field's value. -func (s *GetRelationalDatabaseLogEventsOutput) SetResourceLogEvents(v []*LogEvent) *GetRelationalDatabaseLogEventsOutput { - s.ResourceLogEvents = v - return s -} - -type GetRelationalDatabaseLogStreamsInput struct { - _ struct{} `type:"structure"` - - // The name of your database for which to get log streams. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRelationalDatabaseLogStreamsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseLogStreamsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRelationalDatabaseLogStreamsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseLogStreamsInput"} - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *GetRelationalDatabaseLogStreamsInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseLogStreamsInput { - s.RelationalDatabaseName = &v - return s -} - -type GetRelationalDatabaseLogStreamsOutput struct { - _ struct{} `type:"structure"` - - // An object describing the result of your get relational database log streams - // request. - LogStreams []*string `locationName:"logStreams" type:"list"` -} - -// String returns the string representation -func (s GetRelationalDatabaseLogStreamsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseLogStreamsOutput) GoString() string { - return s.String() -} - -// SetLogStreams sets the LogStreams field's value. -func (s *GetRelationalDatabaseLogStreamsOutput) SetLogStreams(v []*string) *GetRelationalDatabaseLogStreamsOutput { - s.LogStreams = v - return s -} - -type GetRelationalDatabaseMasterUserPasswordInput struct { - _ struct{} `type:"structure"` - - // The password version to return. - // - // Specifying CURRENT or PREVIOUS returns the current or previous passwords - // respectively. Specifying PENDING returns the newest version of the password - // that will rotate to CURRENT. After the PENDING password rotates to CURRENT, - // the PENDING password is no longer available. - // - // Default: CURRENT - PasswordVersion *string `locationName:"passwordVersion" type:"string" enum:"RelationalDatabasePasswordVersion"` - - // The name of your database for which to get the master user password. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRelationalDatabaseMasterUserPasswordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseMasterUserPasswordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRelationalDatabaseMasterUserPasswordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseMasterUserPasswordInput"} - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPasswordVersion sets the PasswordVersion field's value. -func (s *GetRelationalDatabaseMasterUserPasswordInput) SetPasswordVersion(v string) *GetRelationalDatabaseMasterUserPasswordInput { - s.PasswordVersion = &v - return s -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *GetRelationalDatabaseMasterUserPasswordInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseMasterUserPasswordInput { - s.RelationalDatabaseName = &v - return s -} - -type GetRelationalDatabaseMasterUserPasswordOutput struct { - _ struct{} `type:"structure"` - - // The timestamp when the specified version of the master user password was - // created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The master user password for the password version specified. - MasterUserPassword *string `locationName:"masterUserPassword" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s GetRelationalDatabaseMasterUserPasswordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseMasterUserPasswordOutput) GoString() string { - return s.String() -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *GetRelationalDatabaseMasterUserPasswordOutput) SetCreatedAt(v time.Time) *GetRelationalDatabaseMasterUserPasswordOutput { - s.CreatedAt = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *GetRelationalDatabaseMasterUserPasswordOutput) SetMasterUserPassword(v string) *GetRelationalDatabaseMasterUserPasswordOutput { - s.MasterUserPassword = &v - return s -} - -type GetRelationalDatabaseMetricDataInput struct { - _ struct{} `type:"structure"` - - // The end of the time interval from which to get metric data. - // - // Constraints: - // - // * Specified in Universal Coordinated Time (UTC). - // - // * Specified in the Unix time format. - // - // For example, if you wish to use an end time of October 1, 2018, at 8 PM UTC, - // then you input 1538424000 as the end time. - // - // EndTime is a required field - EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` - - // The name of the metric data to return. - // - // MetricName is a required field - MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"RelationalDatabaseMetricName"` - - // The granularity, in seconds, of the returned data points. - // - // Period is a required field - Period *int64 `locationName:"period" min:"60" type:"integer" required:"true"` - - // The name of your database from which to get metric data. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` - - // The start of the time interval from which to get metric data. - // - // Constraints: - // - // * Specified in Universal Coordinated Time (UTC). - // - // * Specified in the Unix time format. - // - // For example, if you wish to use a start time of October 1, 2018, at 8 PM - // UTC, then you input 1538424000 as the start time. - // - // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` - - // The array of statistics for your metric data request. - // - // Statistics is a required field - Statistics []*string `locationName:"statistics" type:"list" required:"true"` - - // The unit for the metric data request. - // - // Unit is a required field - Unit *string `locationName:"unit" type:"string" required:"true" enum:"MetricUnit"` -} - -// String returns the string representation -func (s GetRelationalDatabaseMetricDataInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseMetricDataInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRelationalDatabaseMetricDataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseMetricDataInput"} - if s.EndTime == nil { - invalidParams.Add(request.NewErrParamRequired("EndTime")) - } - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.Period == nil { - invalidParams.Add(request.NewErrParamRequired("Period")) - } - if s.Period != nil && *s.Period < 60 { - invalidParams.Add(request.NewErrParamMinValue("Period", 60)) - } - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) - } - if s.Statistics == nil { - invalidParams.Add(request.NewErrParamRequired("Statistics")) - } - if s.Unit == nil { - invalidParams.Add(request.NewErrParamRequired("Unit")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndTime sets the EndTime field's value. -func (s *GetRelationalDatabaseMetricDataInput) SetEndTime(v time.Time) *GetRelationalDatabaseMetricDataInput { - s.EndTime = &v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *GetRelationalDatabaseMetricDataInput) SetMetricName(v string) *GetRelationalDatabaseMetricDataInput { - s.MetricName = &v - return s -} - -// SetPeriod sets the Period field's value. -func (s *GetRelationalDatabaseMetricDataInput) SetPeriod(v int64) *GetRelationalDatabaseMetricDataInput { - s.Period = &v - return s -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *GetRelationalDatabaseMetricDataInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseMetricDataInput { - s.RelationalDatabaseName = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *GetRelationalDatabaseMetricDataInput) SetStartTime(v time.Time) *GetRelationalDatabaseMetricDataInput { - s.StartTime = &v - return s -} - -// SetStatistics sets the Statistics field's value. -func (s *GetRelationalDatabaseMetricDataInput) SetStatistics(v []*string) *GetRelationalDatabaseMetricDataInput { - s.Statistics = v - return s -} - -// SetUnit sets the Unit field's value. -func (s *GetRelationalDatabaseMetricDataInput) SetUnit(v string) *GetRelationalDatabaseMetricDataInput { - s.Unit = &v - return s -} - -type GetRelationalDatabaseMetricDataOutput struct { - _ struct{} `type:"structure"` - - // An object describing the result of your get relational database metric data - // request. - MetricData []*MetricDatapoint `locationName:"metricData" type:"list"` - - // The name of the metric. - MetricName *string `locationName:"metricName" type:"string" enum:"RelationalDatabaseMetricName"` -} - -// String returns the string representation -func (s GetRelationalDatabaseMetricDataOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseMetricDataOutput) GoString() string { - return s.String() -} - -// SetMetricData sets the MetricData field's value. -func (s *GetRelationalDatabaseMetricDataOutput) SetMetricData(v []*MetricDatapoint) *GetRelationalDatabaseMetricDataOutput { - s.MetricData = v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *GetRelationalDatabaseMetricDataOutput) SetMetricName(v string) *GetRelationalDatabaseMetricDataOutput { - s.MetricName = &v - return s -} - -type GetRelationalDatabaseOutput struct { - _ struct{} `type:"structure"` - - // An object describing the specified database. - RelationalDatabase *RelationalDatabase `locationName:"relationalDatabase" type:"structure"` -} - -// String returns the string representation -func (s GetRelationalDatabaseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseOutput) GoString() string { - return s.String() -} - -// SetRelationalDatabase sets the RelationalDatabase field's value. -func (s *GetRelationalDatabaseOutput) SetRelationalDatabase(v *RelationalDatabase) *GetRelationalDatabaseOutput { - s.RelationalDatabase = v - return s -} - -type GetRelationalDatabaseParametersInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to a specific page of results for your get relational - // database parameters request. - PageToken *string `locationName:"pageToken" type:"string"` - - // The name of your database for which to get parameters. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRelationalDatabaseParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRelationalDatabaseParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseParametersInput"} - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPageToken sets the PageToken field's value. -func (s *GetRelationalDatabaseParametersInput) SetPageToken(v string) *GetRelationalDatabaseParametersInput { - s.PageToken = &v - return s -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *GetRelationalDatabaseParametersInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseParametersInput { - s.RelationalDatabaseName = &v - return s -} - -type GetRelationalDatabaseParametersOutput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get static - // IPs request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // An object describing the result of your get relational database parameters - // request. - Parameters []*RelationalDatabaseParameter `locationName:"parameters" type:"list"` -} - -// String returns the string representation -func (s GetRelationalDatabaseParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseParametersOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetRelationalDatabaseParametersOutput) SetNextPageToken(v string) *GetRelationalDatabaseParametersOutput { - s.NextPageToken = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *GetRelationalDatabaseParametersOutput) SetParameters(v []*RelationalDatabaseParameter) *GetRelationalDatabaseParametersOutput { - s.Parameters = v - return s -} - -type GetRelationalDatabaseSnapshotInput struct { - _ struct{} `type:"structure"` - - // The name of the database snapshot for which to get information. - // - // RelationalDatabaseSnapshotName is a required field - RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRelationalDatabaseSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRelationalDatabaseSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseSnapshotInput"} - if s.RelationalDatabaseSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. -func (s *GetRelationalDatabaseSnapshotInput) SetRelationalDatabaseSnapshotName(v string) *GetRelationalDatabaseSnapshotInput { - s.RelationalDatabaseSnapshotName = &v - return s -} - -type GetRelationalDatabaseSnapshotOutput struct { - _ struct{} `type:"structure"` - - // An object describing the specified database snapshot. - RelationalDatabaseSnapshot *RelationalDatabaseSnapshot `locationName:"relationalDatabaseSnapshot" type:"structure"` -} - -// String returns the string representation -func (s GetRelationalDatabaseSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseSnapshotOutput) GoString() string { - return s.String() -} - -// SetRelationalDatabaseSnapshot sets the RelationalDatabaseSnapshot field's value. -func (s *GetRelationalDatabaseSnapshotOutput) SetRelationalDatabaseSnapshot(v *RelationalDatabaseSnapshot) *GetRelationalDatabaseSnapshotOutput { - s.RelationalDatabaseSnapshot = v - return s -} - -type GetRelationalDatabaseSnapshotsInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to a specific page of results for your get relational - // database snapshots request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetRelationalDatabaseSnapshotsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseSnapshotsInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetRelationalDatabaseSnapshotsInput) SetPageToken(v string) *GetRelationalDatabaseSnapshotsInput { - s.PageToken = &v - return s -} - -type GetRelationalDatabaseSnapshotsOutput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get relational - // database snapshots request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // An object describing the result of your get relational database snapshots - // request. - RelationalDatabaseSnapshots []*RelationalDatabaseSnapshot `locationName:"relationalDatabaseSnapshots" type:"list"` -} - -// String returns the string representation -func (s GetRelationalDatabaseSnapshotsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabaseSnapshotsOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetRelationalDatabaseSnapshotsOutput) SetNextPageToken(v string) *GetRelationalDatabaseSnapshotsOutput { - s.NextPageToken = &v - return s -} - -// SetRelationalDatabaseSnapshots sets the RelationalDatabaseSnapshots field's value. -func (s *GetRelationalDatabaseSnapshotsOutput) SetRelationalDatabaseSnapshots(v []*RelationalDatabaseSnapshot) *GetRelationalDatabaseSnapshotsOutput { - s.RelationalDatabaseSnapshots = v - return s -} - -type GetRelationalDatabasesInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to a specific page of results for your get relational - // database request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetRelationalDatabasesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabasesInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetRelationalDatabasesInput) SetPageToken(v string) *GetRelationalDatabasesInput { - s.PageToken = &v - return s -} - -type GetRelationalDatabasesOutput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get relational - // databases request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // An object describing the result of your get relational databases request. - RelationalDatabases []*RelationalDatabase `locationName:"relationalDatabases" type:"list"` -} - -// String returns the string representation -func (s GetRelationalDatabasesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRelationalDatabasesOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetRelationalDatabasesOutput) SetNextPageToken(v string) *GetRelationalDatabasesOutput { - s.NextPageToken = &v - return s -} - -// SetRelationalDatabases sets the RelationalDatabases field's value. -func (s *GetRelationalDatabasesOutput) SetRelationalDatabases(v []*RelationalDatabase) *GetRelationalDatabasesOutput { - s.RelationalDatabases = v - return s -} - -type GetStaticIpInput struct { - _ struct{} `type:"structure"` - - // The name of the static IP in Lightsail. - // - // StaticIpName is a required field - StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetStaticIpInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStaticIpInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetStaticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetStaticIpInput"} - if s.StaticIpName == nil { - invalidParams.Add(request.NewErrParamRequired("StaticIpName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStaticIpName sets the StaticIpName field's value. -func (s *GetStaticIpInput) SetStaticIpName(v string) *GetStaticIpInput { - s.StaticIpName = &v - return s -} - -type GetStaticIpOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the requested static - // IP. - StaticIp *StaticIp `locationName:"staticIp" type:"structure"` -} - -// String returns the string representation -func (s GetStaticIpOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStaticIpOutput) GoString() string { - return s.String() -} - -// SetStaticIp sets the StaticIp field's value. -func (s *GetStaticIpOutput) SetStaticIp(v *StaticIp) *GetStaticIpOutput { - s.StaticIp = v - return s -} - -type GetStaticIpsInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get static - // IPs request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetStaticIpsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStaticIpsInput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *GetStaticIpsInput) SetPageToken(v string) *GetStaticIpsInput { - s.PageToken = &v - return s -} - -type GetStaticIpsOutput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get static - // IPs request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // An array of key-value pairs containing information about your get static - // IPs request. - StaticIps []*StaticIp `locationName:"staticIps" type:"list"` -} - -// String returns the string representation -func (s GetStaticIpsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStaticIpsOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetStaticIpsOutput) SetNextPageToken(v string) *GetStaticIpsOutput { - s.NextPageToken = &v - return s -} - -// SetStaticIps sets the StaticIps field's value. -func (s *GetStaticIpsOutput) SetStaticIps(v []*StaticIp) *GetStaticIpsOutput { - s.StaticIps = v - return s -} - -type ImportKeyPairInput struct { - _ struct{} `type:"structure"` - - // The name of the key pair for which you want to import the public key. - // - // KeyPairName is a required field - KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` - - // A base64-encoded public key of the ssh-rsa type. - // - // PublicKeyBase64 is a required field - PublicKeyBase64 *string `locationName:"publicKeyBase64" type:"string" required:"true"` -} - -// String returns the string representation -func (s ImportKeyPairInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportKeyPairInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportKeyPairInput"} - if s.KeyPairName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyPairName")) - } - if s.PublicKeyBase64 == nil { - invalidParams.Add(request.NewErrParamRequired("PublicKeyBase64")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyPairName sets the KeyPairName field's value. -func (s *ImportKeyPairInput) SetKeyPairName(v string) *ImportKeyPairInput { - s.KeyPairName = &v - return s -} - -// SetPublicKeyBase64 sets the PublicKeyBase64 field's value. -func (s *ImportKeyPairInput) SetPublicKeyBase64(v string) *ImportKeyPairInput { - s.PublicKeyBase64 = &v - return s -} - -type ImportKeyPairOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the request operation. - Operation *Operation `locationName:"operation" type:"structure"` -} - -// String returns the string representation -func (s ImportKeyPairOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportKeyPairOutput) GoString() string { - return s.String() -} - -// SetOperation sets the Operation field's value. -func (s *ImportKeyPairOutput) SetOperation(v *Operation) *ImportKeyPairOutput { - s.Operation = v - return s -} - -// Describes an instance (a virtual private server). -type Instance struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE). - Arn *string `locationName:"arn" type:"string"` - - // The blueprint ID (e.g., os_amlinux_2016_03). - BlueprintId *string `locationName:"blueprintId" type:"string"` - - // The friendly name of the blueprint (e.g., Amazon Linux). - BlueprintName *string `locationName:"blueprintName" type:"string"` - - // The bundle for the instance (e.g., micro_1_0). - BundleId *string `locationName:"bundleId" type:"string"` - - // The timestamp when the instance was created (e.g., 1479734909.17). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The size of the vCPU and the amount of RAM for the instance. - Hardware *InstanceHardware `locationName:"hardware" type:"structure"` - - // The IPv6 address of the instance. - Ipv6Address *string `locationName:"ipv6Address" type:"string"` - - // A Boolean value indicating whether this instance has a static IP assigned - // to it. - IsStaticIp *bool `locationName:"isStaticIp" type:"boolean"` - - // The region name and Availability Zone where the instance is located. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1). - Name *string `locationName:"name" type:"string"` - - // Information about the public ports and monthly data transfer rates for the - // instance. - Networking *InstanceNetworking `locationName:"networking" type:"structure"` - - // The private IP address of the instance. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // The public IP address of the instance. - PublicIpAddress *string `locationName:"publicIpAddress" type:"string"` - - // The type of resource (usually Instance). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair). - SshKeyName *string `locationName:"sshKeyName" type:"string"` - - // The status code and the state (e.g., running) for the instance. - State *InstanceState `locationName:"state" type:"structure"` - - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` - - // The tag keys and optional values for the resource. For more information about - // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). - Tags []*Tag `locationName:"tags" type:"list"` - - // The user name for connecting to the instance (e.g., ec2-user). - Username *string `locationName:"username" type:"string"` -} - -// String returns the string representation -func (s Instance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Instance) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Instance) SetArn(v string) *Instance { - s.Arn = &v - return s -} - -// SetBlueprintId sets the BlueprintId field's value. -func (s *Instance) SetBlueprintId(v string) *Instance { - s.BlueprintId = &v - return s -} - -// SetBlueprintName sets the BlueprintName field's value. -func (s *Instance) SetBlueprintName(v string) *Instance { - s.BlueprintName = &v - return s -} - -// SetBundleId sets the BundleId field's value. -func (s *Instance) SetBundleId(v string) *Instance { - s.BundleId = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Instance) SetCreatedAt(v time.Time) *Instance { - s.CreatedAt = &v - return s -} - -// SetHardware sets the Hardware field's value. -func (s *Instance) SetHardware(v *InstanceHardware) *Instance { - s.Hardware = v - return s -} - -// SetIpv6Address sets the Ipv6Address field's value. -func (s *Instance) SetIpv6Address(v string) *Instance { - s.Ipv6Address = &v - return s -} - -// SetIsStaticIp sets the IsStaticIp field's value. -func (s *Instance) SetIsStaticIp(v bool) *Instance { - s.IsStaticIp = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *Instance) SetLocation(v *ResourceLocation) *Instance { - s.Location = v - return s -} - -// SetName sets the Name field's value. -func (s *Instance) SetName(v string) *Instance { - s.Name = &v - return s -} - -// SetNetworking sets the Networking field's value. -func (s *Instance) SetNetworking(v *InstanceNetworking) *Instance { - s.Networking = v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *Instance) SetPrivateIpAddress(v string) *Instance { - s.PrivateIpAddress = &v - return s -} - -// SetPublicIpAddress sets the PublicIpAddress field's value. -func (s *Instance) SetPublicIpAddress(v string) *Instance { - s.PublicIpAddress = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *Instance) SetResourceType(v string) *Instance { - s.ResourceType = &v - return s -} - -// SetSshKeyName sets the SshKeyName field's value. -func (s *Instance) SetSshKeyName(v string) *Instance { - s.SshKeyName = &v - return s -} - -// SetState sets the State field's value. -func (s *Instance) SetState(v *InstanceState) *Instance { - s.State = v - return s -} - -// SetSupportCode sets the SupportCode field's value. -func (s *Instance) SetSupportCode(v string) *Instance { - s.SupportCode = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Instance) SetTags(v []*Tag) *Instance { - s.Tags = v - return s -} - -// SetUsername sets the Username field's value. -func (s *Instance) SetUsername(v string) *Instance { - s.Username = &v - return s -} - -// The parameters for gaining temporary access to one of your Amazon Lightsail -// instances. -type InstanceAccessDetails struct { - _ struct{} `type:"structure"` - - // For SSH access, the public key to use when accessing your instance For OpenSSH - // clients (e.g., command line SSH), you should save this value to tempkey-cert.pub. - CertKey *string `locationName:"certKey" type:"string"` - - // For SSH access, the date on which the temporary keys expire. - ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp"` - - // The name of this Amazon Lightsail instance. - InstanceName *string `locationName:"instanceName" type:"string"` - - // The public IP address of the Amazon Lightsail instance. - IpAddress *string `locationName:"ipAddress" type:"string"` - - // For RDP access, the password for your Amazon Lightsail instance. Password - // will be an empty string if the password for your new instance is not ready - // yet. When you create an instance, it can take up to 15 minutes for the instance - // to be ready. - // - // If you create an instance using any key pair other than the default (LightsailDefaultKeyPair), - // password will always be an empty string. - // - // If you change the Administrator password on the instance, Lightsail will - // continue to return the original password value. When accessing the instance - // using RDP, you need to manually enter the Administrator password after changing - // it from the default. - Password *string `locationName:"password" type:"string"` - - // For a Windows Server-based instance, an object with the data you can use - // to retrieve your password. This is only needed if password is empty and the - // instance is not new (and therefore the password is not ready yet). When you - // create an instance, it can take up to 15 minutes for the instance to be ready. - PasswordData *PasswordData `locationName:"passwordData" type:"structure"` - - // For SSH access, the temporary private key. For OpenSSH clients (e.g., command - // line SSH), you should save this value to tempkey). - PrivateKey *string `locationName:"privateKey" type:"string"` - - // The protocol for these Amazon Lightsail instance access details. - Protocol *string `locationName:"protocol" type:"string" enum:"InstanceAccessProtocol"` - - // The user name to use when logging in to the Amazon Lightsail instance. - Username *string `locationName:"username" type:"string"` -} - -// String returns the string representation -func (s InstanceAccessDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceAccessDetails) GoString() string { - return s.String() -} - -// SetCertKey sets the CertKey field's value. -func (s *InstanceAccessDetails) SetCertKey(v string) *InstanceAccessDetails { - s.CertKey = &v - return s -} - -// SetExpiresAt sets the ExpiresAt field's value. -func (s *InstanceAccessDetails) SetExpiresAt(v time.Time) *InstanceAccessDetails { - s.ExpiresAt = &v - return s -} - -// SetInstanceName sets the InstanceName field's value. -func (s *InstanceAccessDetails) SetInstanceName(v string) *InstanceAccessDetails { - s.InstanceName = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *InstanceAccessDetails) SetIpAddress(v string) *InstanceAccessDetails { - s.IpAddress = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *InstanceAccessDetails) SetPassword(v string) *InstanceAccessDetails { - s.Password = &v - return s -} - -// SetPasswordData sets the PasswordData field's value. -func (s *InstanceAccessDetails) SetPasswordData(v *PasswordData) *InstanceAccessDetails { - s.PasswordData = v - return s -} - -// SetPrivateKey sets the PrivateKey field's value. -func (s *InstanceAccessDetails) SetPrivateKey(v string) *InstanceAccessDetails { - s.PrivateKey = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *InstanceAccessDetails) SetProtocol(v string) *InstanceAccessDetails { - s.Protocol = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *InstanceAccessDetails) SetUsername(v string) *InstanceAccessDetails { - s.Username = &v - return s -} - -// Describes the Amazon Elastic Compute Cloud instance and related resources -// to be created using the create cloud formation stack operation. -type InstanceEntry struct { - _ struct{} `type:"structure"` - - // The Availability Zone for the new Amazon EC2 instance. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // The instance type (e.g., t2.micro) to use for the new Amazon EC2 instance. - // - // InstanceType is a required field - InstanceType *string `locationName:"instanceType" type:"string" required:"true"` - - // The port configuration to use for the new Amazon EC2 instance. - // - // The following configuration options are available: - // - // * DEFAULT — Use the default firewall settings from the image. - // - // * INSTANCE — Use the firewall settings from the source Lightsail instance. - // - // * NONE — Default to Amazon EC2. - // - // * CLOSED — All ports closed. - // - // PortInfoSource is a required field - PortInfoSource *string `locationName:"portInfoSource" type:"string" required:"true" enum:"PortInfoSourceType"` - - // The name of the export snapshot record, which contains the exported Lightsail - // instance snapshot that will be used as the source of the new Amazon EC2 instance. - // - // Use the get export snapshot records operation to get a list of export snapshot - // records that you can use to create a CloudFormation stack. - // - // SourceName is a required field - SourceName *string `locationName:"sourceName" type:"string" required:"true"` - - // A launch script you can create that configures a server with additional user - // data. For example, you might want to run apt-get -y update. - // - // Depending on the machine image you choose, the command to get software on - // your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu - // use apt-get, and FreeBSD uses pkg. - UserData *string `locationName:"userData" type:"string"` -} - -// String returns the string representation -func (s InstanceEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceEntry) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstanceEntry) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstanceEntry"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceType")) - } - if s.PortInfoSource == nil { - invalidParams.Add(request.NewErrParamRequired("PortInfoSource")) - } - if s.SourceName == nil { - invalidParams.Add(request.NewErrParamRequired("SourceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *InstanceEntry) SetAvailabilityZone(v string) *InstanceEntry { - s.AvailabilityZone = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *InstanceEntry) SetInstanceType(v string) *InstanceEntry { - s.InstanceType = &v - return s -} - -// SetPortInfoSource sets the PortInfoSource field's value. -func (s *InstanceEntry) SetPortInfoSource(v string) *InstanceEntry { - s.PortInfoSource = &v - return s -} - -// SetSourceName sets the SourceName field's value. -func (s *InstanceEntry) SetSourceName(v string) *InstanceEntry { - s.SourceName = &v - return s -} - -// SetUserData sets the UserData field's value. -func (s *InstanceEntry) SetUserData(v string) *InstanceEntry { - s.UserData = &v - return s -} - -// Describes the hardware for the instance. -type InstanceHardware struct { - _ struct{} `type:"structure"` - - // The number of vCPUs the instance has. - CpuCount *int64 `locationName:"cpuCount" type:"integer"` - - // The disks attached to the instance. - Disks []*Disk `locationName:"disks" type:"list"` - - // The amount of RAM in GB on the instance (e.g., 1.0). - RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` -} - -// String returns the string representation -func (s InstanceHardware) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceHardware) GoString() string { - return s.String() -} - -// SetCpuCount sets the CpuCount field's value. -func (s *InstanceHardware) SetCpuCount(v int64) *InstanceHardware { - s.CpuCount = &v - return s -} - -// SetDisks sets the Disks field's value. -func (s *InstanceHardware) SetDisks(v []*Disk) *InstanceHardware { - s.Disks = v - return s -} - -// SetRamSizeInGb sets the RamSizeInGb field's value. -func (s *InstanceHardware) SetRamSizeInGb(v float64) *InstanceHardware { - s.RamSizeInGb = &v - return s -} - -// Describes information about the health of the instance. -type InstanceHealthSummary struct { - _ struct{} `type:"structure"` - - // Describes the overall instance health. Valid values are below. - InstanceHealth *string `locationName:"instanceHealth" type:"string" enum:"InstanceHealthState"` - - // More information about the instance health. If the instanceHealth is healthy, - // then an instanceHealthReason value is not provided. - // - // If instanceHealth is initial, the instanceHealthReason value can be one of - // the following: - // - // * Lb.RegistrationInProgress - The target instance is in the process of - // being registered with the load balancer. - // - // * Lb.InitialHealthChecking - The Lightsail load balancer is still sending - // the target instance the minimum number of health checks required to determine - // its health status. - // - // If instanceHealth is unhealthy, the instanceHealthReason value can be one - // of the following: - // - // * Instance.ResponseCodeMismatch - The health checks did not return an - // expected HTTP code. - // - // * Instance.Timeout - The health check requests timed out. - // - // * Instance.FailedHealthChecks - The health checks failed because the connection - // to the target instance timed out, the target instance response was malformed, - // or the target instance failed the health check for an unknown reason. - // - // * Lb.InternalError - The health checks failed due to an internal error. - // - // If instanceHealth is unused, the instanceHealthReason value can be one of - // the following: - // - // * Instance.NotRegistered - The target instance is not registered with - // the target group. - // - // * Instance.NotInUse - The target group is not used by any load balancer, - // or the target instance is in an Availability Zone that is not enabled - // for its load balancer. - // - // * Instance.IpUnusable - The target IP address is reserved for use by a - // Lightsail load balancer. - // - // * Instance.InvalidState - The target is in the stopped or terminated state. - // - // If instanceHealth is draining, the instanceHealthReason value can be one - // of the following: - // - // * Instance.DeregistrationInProgress - The target instance is in the process - // of being deregistered and the deregistration delay period has not expired. - InstanceHealthReason *string `locationName:"instanceHealthReason" type:"string" enum:"InstanceHealthReason"` - - // The name of the Lightsail instance for which you are requesting health check - // data. - InstanceName *string `locationName:"instanceName" type:"string"` -} - -// String returns the string representation -func (s InstanceHealthSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceHealthSummary) GoString() string { - return s.String() -} - -// SetInstanceHealth sets the InstanceHealth field's value. -func (s *InstanceHealthSummary) SetInstanceHealth(v string) *InstanceHealthSummary { - s.InstanceHealth = &v - return s -} - -// SetInstanceHealthReason sets the InstanceHealthReason field's value. -func (s *InstanceHealthSummary) SetInstanceHealthReason(v string) *InstanceHealthSummary { - s.InstanceHealthReason = &v - return s -} - -// SetInstanceName sets the InstanceName field's value. -func (s *InstanceHealthSummary) SetInstanceName(v string) *InstanceHealthSummary { - s.InstanceName = &v - return s -} - -// Describes monthly data transfer rates and port information for an instance. -type InstanceNetworking struct { - _ struct{} `type:"structure"` - - // The amount of data in GB allocated for monthly data transfers. - MonthlyTransfer *MonthlyTransfer `locationName:"monthlyTransfer" type:"structure"` - - // An array of key-value pairs containing information about the ports on the - // instance. - Ports []*InstancePortInfo `locationName:"ports" type:"list"` -} - -// String returns the string representation -func (s InstanceNetworking) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceNetworking) GoString() string { - return s.String() -} - -// SetMonthlyTransfer sets the MonthlyTransfer field's value. -func (s *InstanceNetworking) SetMonthlyTransfer(v *MonthlyTransfer) *InstanceNetworking { - s.MonthlyTransfer = v - return s -} - -// SetPorts sets the Ports field's value. -func (s *InstanceNetworking) SetPorts(v []*InstancePortInfo) *InstanceNetworking { - s.Ports = v - return s -} - -// Describes information about the instance ports. -type InstancePortInfo struct { - _ struct{} `type:"structure"` - - // The access direction (inbound or outbound). - AccessDirection *string `locationName:"accessDirection" type:"string" enum:"AccessDirection"` - - // The location from which access is allowed (e.g., Anywhere (0.0.0.0/0)). - AccessFrom *string `locationName:"accessFrom" type:"string"` - - // The type of access (Public or Private). - AccessType *string `locationName:"accessType" type:"string" enum:"PortAccessType"` - - // The common name. - CommonName *string `locationName:"commonName" type:"string"` - - // The first port in the range. - FromPort *int64 `locationName:"fromPort" type:"integer"` - - // The protocol being used. Can be one of the following. - // - // * tcp - Transmission Control Protocol (TCP) provides reliable, ordered, - // and error-checked delivery of streamed data between applications running - // on hosts communicating by an IP network. If you have an application that - // doesn't require reliable data stream service, use UDP instead. - // - // * all - All transport layer protocol types. For more general information, - // see Transport layer (https://en.wikipedia.org/wiki/Transport_layer) on - // Wikipedia. - // - // * udp - With User Datagram Protocol (UDP), computer applications can send - // messages (or datagrams) to other hosts on an Internet Protocol (IP) network. - // Prior communications are not required to set up transmission channels - // or data paths. Applications that don't require reliable data stream service - // can use UDP, which provides a connectionless datagram service that emphasizes - // reduced latency over reliability. If you do require reliable data stream - // service, use TCP instead. - Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` - - // The last port in the range. - ToPort *int64 `locationName:"toPort" type:"integer"` -} - -// String returns the string representation -func (s InstancePortInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstancePortInfo) GoString() string { - return s.String() -} - -// SetAccessDirection sets the AccessDirection field's value. -func (s *InstancePortInfo) SetAccessDirection(v string) *InstancePortInfo { - s.AccessDirection = &v - return s -} - -// SetAccessFrom sets the AccessFrom field's value. -func (s *InstancePortInfo) SetAccessFrom(v string) *InstancePortInfo { - s.AccessFrom = &v - return s -} - -// SetAccessType sets the AccessType field's value. -func (s *InstancePortInfo) SetAccessType(v string) *InstancePortInfo { - s.AccessType = &v - return s -} - -// SetCommonName sets the CommonName field's value. -func (s *InstancePortInfo) SetCommonName(v string) *InstancePortInfo { - s.CommonName = &v - return s -} - -// SetFromPort sets the FromPort field's value. -func (s *InstancePortInfo) SetFromPort(v int64) *InstancePortInfo { - s.FromPort = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *InstancePortInfo) SetProtocol(v string) *InstancePortInfo { - s.Protocol = &v - return s -} - -// SetToPort sets the ToPort field's value. -func (s *InstancePortInfo) SetToPort(v int64) *InstancePortInfo { - s.ToPort = &v - return s -} - -// Describes the port state. -type InstancePortState struct { - _ struct{} `type:"structure"` - - // The first port in the range. - FromPort *int64 `locationName:"fromPort" type:"integer"` - - // The protocol being used. Can be one of the following. - // - // * tcp - Transmission Control Protocol (TCP) provides reliable, ordered, - // and error-checked delivery of streamed data between applications running - // on hosts communicating by an IP network. If you have an application that - // doesn't require reliable data stream service, use UDP instead. - // - // * all - All transport layer protocol types. For more general information, - // see Transport layer (https://en.wikipedia.org/wiki/Transport_layer) on - // Wikipedia. - // - // * udp - With User Datagram Protocol (UDP), computer applications can send - // messages (or datagrams) to other hosts on an Internet Protocol (IP) network. - // Prior communications are not required to set up transmission channels - // or data paths. Applications that don't require reliable data stream service - // can use UDP, which provides a connectionless datagram service that emphasizes - // reduced latency over reliability. If you do require reliable data stream - // service, use TCP instead. - Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` - - // Specifies whether the instance port is open or closed. - State *string `locationName:"state" type:"string" enum:"PortState"` - - // The last port in the range. - ToPort *int64 `locationName:"toPort" type:"integer"` -} - -// String returns the string representation -func (s InstancePortState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstancePortState) GoString() string { - return s.String() -} - -// SetFromPort sets the FromPort field's value. -func (s *InstancePortState) SetFromPort(v int64) *InstancePortState { - s.FromPort = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *InstancePortState) SetProtocol(v string) *InstancePortState { - s.Protocol = &v - return s -} - -// SetState sets the State field's value. -func (s *InstancePortState) SetState(v string) *InstancePortState { - s.State = &v - return s -} - -// SetToPort sets the ToPort field's value. -func (s *InstancePortState) SetToPort(v int64) *InstancePortState { - s.ToPort = &v - return s -} - -// Describes the snapshot of the virtual private server, or instance. -type InstanceSnapshot struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the snapshot (e.g., arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE). - Arn *string `locationName:"arn" type:"string"` - - // The timestamp when the snapshot was created (e.g., 1479907467.024). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // An array of disk objects containing information about all block storage disks. - FromAttachedDisks []*Disk `locationName:"fromAttachedDisks" type:"list"` - - // The blueprint ID from which you created the snapshot (e.g., os_debian_8_3). - // A blueprint is a virtual private server (or instance) image used to create - // instances quickly. - FromBlueprintId *string `locationName:"fromBlueprintId" type:"string"` - - // The bundle ID from which you created the snapshot (e.g., micro_1_0). - FromBundleId *string `locationName:"fromBundleId" type:"string"` - - // The Amazon Resource Name (ARN) of the instance from which the snapshot was - // created (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE). - FromInstanceArn *string `locationName:"fromInstanceArn" type:"string"` - - // The instance from which the snapshot was created. - FromInstanceName *string `locationName:"fromInstanceName" type:"string"` - - // The region name and Availability Zone where you created the snapshot. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The name of the snapshot. - Name *string `locationName:"name" type:"string"` - - // The progress of the snapshot. - Progress *string `locationName:"progress" type:"string"` - - // The type of resource (usually InstanceSnapshot). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The size in GB of the SSD. - SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` - - // The state the snapshot is in. - State *string `locationName:"state" type:"string" enum:"InstanceSnapshotState"` - - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` - - // The tag keys and optional values for the resource. For more information about - // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s InstanceSnapshot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceSnapshot) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *InstanceSnapshot) SetArn(v string) *InstanceSnapshot { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *InstanceSnapshot) SetCreatedAt(v time.Time) *InstanceSnapshot { - s.CreatedAt = &v - return s -} - -// SetFromAttachedDisks sets the FromAttachedDisks field's value. -func (s *InstanceSnapshot) SetFromAttachedDisks(v []*Disk) *InstanceSnapshot { - s.FromAttachedDisks = v - return s -} - -// SetFromBlueprintId sets the FromBlueprintId field's value. -func (s *InstanceSnapshot) SetFromBlueprintId(v string) *InstanceSnapshot { - s.FromBlueprintId = &v - return s -} - -// SetFromBundleId sets the FromBundleId field's value. -func (s *InstanceSnapshot) SetFromBundleId(v string) *InstanceSnapshot { - s.FromBundleId = &v - return s -} - -// SetFromInstanceArn sets the FromInstanceArn field's value. -func (s *InstanceSnapshot) SetFromInstanceArn(v string) *InstanceSnapshot { - s.FromInstanceArn = &v - return s -} - -// SetFromInstanceName sets the FromInstanceName field's value. -func (s *InstanceSnapshot) SetFromInstanceName(v string) *InstanceSnapshot { - s.FromInstanceName = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *InstanceSnapshot) SetLocation(v *ResourceLocation) *InstanceSnapshot { - s.Location = v - return s -} - -// SetName sets the Name field's value. -func (s *InstanceSnapshot) SetName(v string) *InstanceSnapshot { - s.Name = &v - return s -} - -// SetProgress sets the Progress field's value. -func (s *InstanceSnapshot) SetProgress(v string) *InstanceSnapshot { - s.Progress = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *InstanceSnapshot) SetResourceType(v string) *InstanceSnapshot { - s.ResourceType = &v - return s -} - -// SetSizeInGb sets the SizeInGb field's value. -func (s *InstanceSnapshot) SetSizeInGb(v int64) *InstanceSnapshot { - s.SizeInGb = &v - return s -} - -// SetState sets the State field's value. -func (s *InstanceSnapshot) SetState(v string) *InstanceSnapshot { - s.State = &v - return s -} - -// SetSupportCode sets the SupportCode field's value. -func (s *InstanceSnapshot) SetSupportCode(v string) *InstanceSnapshot { - s.SupportCode = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *InstanceSnapshot) SetTags(v []*Tag) *InstanceSnapshot { - s.Tags = v - return s -} - -// Describes an instance snapshot. -type InstanceSnapshotInfo struct { - _ struct{} `type:"structure"` - - // The blueprint ID from which the source instance (e.g., os_debian_8_3). - FromBlueprintId *string `locationName:"fromBlueprintId" type:"string"` - - // The bundle ID from which the source instance was created (e.g., micro_1_0). - FromBundleId *string `locationName:"fromBundleId" type:"string"` - - // A list of objects describing the disks that were attached to the source instance. - FromDiskInfo []*DiskInfo `locationName:"fromDiskInfo" type:"list"` -} - -// String returns the string representation -func (s InstanceSnapshotInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceSnapshotInfo) GoString() string { - return s.String() -} - -// SetFromBlueprintId sets the FromBlueprintId field's value. -func (s *InstanceSnapshotInfo) SetFromBlueprintId(v string) *InstanceSnapshotInfo { - s.FromBlueprintId = &v - return s -} - -// SetFromBundleId sets the FromBundleId field's value. -func (s *InstanceSnapshotInfo) SetFromBundleId(v string) *InstanceSnapshotInfo { - s.FromBundleId = &v - return s -} - -// SetFromDiskInfo sets the FromDiskInfo field's value. -func (s *InstanceSnapshotInfo) SetFromDiskInfo(v []*DiskInfo) *InstanceSnapshotInfo { - s.FromDiskInfo = v - return s -} - -// Describes the virtual private server (or instance) status. -type InstanceState struct { - _ struct{} `type:"structure"` - - // The status code for the instance. - Code *int64 `locationName:"code" type:"integer"` - - // The state of the instance (e.g., running or pending). - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s InstanceState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceState) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *InstanceState) SetCode(v int64) *InstanceState { - s.Code = &v - return s -} - -// SetName sets the Name field's value. -func (s *InstanceState) SetName(v string) *InstanceState { - s.Name = &v - return s -} - -type IsVpcPeeredInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s IsVpcPeeredInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IsVpcPeeredInput) GoString() string { - return s.String() -} - -type IsVpcPeeredOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the Lightsail VPC is peered; otherwise, false. - IsPeered *bool `locationName:"isPeered" type:"boolean"` -} - -// String returns the string representation -func (s IsVpcPeeredOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IsVpcPeeredOutput) GoString() string { - return s.String() -} - -// SetIsPeered sets the IsPeered field's value. -func (s *IsVpcPeeredOutput) SetIsPeered(v bool) *IsVpcPeeredOutput { - s.IsPeered = &v - return s -} - -// Describes the SSH key pair. -type KeyPair struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE). - Arn *string `locationName:"arn" type:"string"` - - // The timestamp when the key pair was created (e.g., 1479816991.349). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The RSA fingerprint of the key pair. - Fingerprint *string `locationName:"fingerprint" type:"string"` - - // The region name and Availability Zone where the key pair was created. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The friendly name of the SSH key pair. - Name *string `locationName:"name" type:"string"` - - // The resource type (usually KeyPair). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` - - // The tag keys and optional values for the resource. For more information about - // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s KeyPair) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KeyPair) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *KeyPair) SetArn(v string) *KeyPair { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *KeyPair) SetCreatedAt(v time.Time) *KeyPair { - s.CreatedAt = &v - return s -} - -// SetFingerprint sets the Fingerprint field's value. -func (s *KeyPair) SetFingerprint(v string) *KeyPair { - s.Fingerprint = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *KeyPair) SetLocation(v *ResourceLocation) *KeyPair { - s.Location = v - return s -} - -// SetName sets the Name field's value. -func (s *KeyPair) SetName(v string) *KeyPair { - s.Name = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *KeyPair) SetResourceType(v string) *KeyPair { - s.ResourceType = &v - return s -} - -// SetSupportCode sets the SupportCode field's value. -func (s *KeyPair) SetSupportCode(v string) *KeyPair { - s.SupportCode = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *KeyPair) SetTags(v []*Tag) *KeyPair { - s.Tags = v - return s -} - -// Describes the Lightsail load balancer. -type LoadBalancer struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the load balancer. - Arn *string `locationName:"arn" type:"string"` - - // A string to string map of the configuration options for your load balancer. - // Valid values are listed below. - ConfigurationOptions map[string]*string `locationName:"configurationOptions" type:"map"` - - // The date when your load balancer was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The DNS name of your Lightsail load balancer. - DnsName *string `locationName:"dnsName" type:"string"` - - // The path you specified to perform your health checks. If no path is specified, - // the load balancer tries to make a request to the default (root) page. - HealthCheckPath *string `locationName:"healthCheckPath" type:"string"` - - // An array of InstanceHealthSummary objects describing the health of the load - // balancer. - InstanceHealthSummary []*InstanceHealthSummary `locationName:"instanceHealthSummary" type:"list"` - - // The port where the load balancer will direct traffic to your Lightsail instances. - // For HTTP traffic, it's port 80. For HTTPS traffic, it's port 443. - InstancePort *int64 `locationName:"instancePort" type:"integer"` - - // The AWS Region where your load balancer was created (e.g., us-east-2a). Lightsail - // automatically creates your load balancer across Availability Zones. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The name of the load balancer (e.g., my-load-balancer). - Name *string `locationName:"name" type:"string"` - - // The protocol you have enabled for your load balancer. Valid values are below. - // - // You can't just have HTTP_HTTPS, but you can have just HTTP. - Protocol *string `locationName:"protocol" type:"string" enum:"LoadBalancerProtocol"` - - // An array of public port settings for your load balancer. For HTTP, use port - // 80. For HTTPS, use port 443. - PublicPorts []*int64 `locationName:"publicPorts" type:"list"` - - // The resource type (e.g., LoadBalancer. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The status of your load balancer. Valid values are below. - State *string `locationName:"state" type:"string" enum:"LoadBalancerState"` - - // The support code. Include this code in your email to support when you have - // questions about your Lightsail load balancer. This code enables our support - // team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` - - // The tag keys and optional values for the resource. For more information about - // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). - Tags []*Tag `locationName:"tags" type:"list"` - - // An array of LoadBalancerTlsCertificateSummary objects that provide additional - // information about the SSL/TLS certificates. For example, if true, the certificate - // is attached to the load balancer. - TlsCertificateSummaries []*LoadBalancerTlsCertificateSummary `locationName:"tlsCertificateSummaries" type:"list"` -} - -// String returns the string representation -func (s LoadBalancer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancer) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *LoadBalancer) SetArn(v string) *LoadBalancer { - s.Arn = &v - return s -} - -// SetConfigurationOptions sets the ConfigurationOptions field's value. -func (s *LoadBalancer) SetConfigurationOptions(v map[string]*string) *LoadBalancer { - s.ConfigurationOptions = v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *LoadBalancer) SetCreatedAt(v time.Time) *LoadBalancer { - s.CreatedAt = &v - return s -} - -// SetDnsName sets the DnsName field's value. -func (s *LoadBalancer) SetDnsName(v string) *LoadBalancer { - s.DnsName = &v - return s -} - -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *LoadBalancer) SetHealthCheckPath(v string) *LoadBalancer { - s.HealthCheckPath = &v - return s -} - -// SetInstanceHealthSummary sets the InstanceHealthSummary field's value. -func (s *LoadBalancer) SetInstanceHealthSummary(v []*InstanceHealthSummary) *LoadBalancer { - s.InstanceHealthSummary = v - return s -} - -// SetInstancePort sets the InstancePort field's value. -func (s *LoadBalancer) SetInstancePort(v int64) *LoadBalancer { - s.InstancePort = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *LoadBalancer) SetLocation(v *ResourceLocation) *LoadBalancer { - s.Location = v - return s -} - -// SetName sets the Name field's value. -func (s *LoadBalancer) SetName(v string) *LoadBalancer { - s.Name = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *LoadBalancer) SetProtocol(v string) *LoadBalancer { - s.Protocol = &v - return s -} - -// SetPublicPorts sets the PublicPorts field's value. -func (s *LoadBalancer) SetPublicPorts(v []*int64) *LoadBalancer { - s.PublicPorts = v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *LoadBalancer) SetResourceType(v string) *LoadBalancer { - s.ResourceType = &v - return s -} - -// SetState sets the State field's value. -func (s *LoadBalancer) SetState(v string) *LoadBalancer { - s.State = &v - return s -} - -// SetSupportCode sets the SupportCode field's value. -func (s *LoadBalancer) SetSupportCode(v string) *LoadBalancer { - s.SupportCode = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *LoadBalancer) SetTags(v []*Tag) *LoadBalancer { - s.Tags = v - return s -} - -// SetTlsCertificateSummaries sets the TlsCertificateSummaries field's value. -func (s *LoadBalancer) SetTlsCertificateSummaries(v []*LoadBalancerTlsCertificateSummary) *LoadBalancer { - s.TlsCertificateSummaries = v - return s -} - -// Describes a load balancer SSL/TLS certificate. -// -// TLS is just an updated, more secure version of Secure Socket Layer (SSL). -type LoadBalancerTlsCertificate struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the SSL/TLS certificate. - Arn *string `locationName:"arn" type:"string"` - - // The time when you created your SSL/TLS certificate. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The domain name for your SSL/TLS certificate. - DomainName *string `locationName:"domainName" type:"string"` - - // An array of LoadBalancerTlsCertificateDomainValidationRecord objects describing - // the records. - DomainValidationRecords []*LoadBalancerTlsCertificateDomainValidationRecord `locationName:"domainValidationRecords" type:"list"` - - // The reason for the SSL/TLS certificate validation failure. - FailureReason *string `locationName:"failureReason" type:"string" enum:"LoadBalancerTlsCertificateFailureReason"` - - // When true, the SSL/TLS certificate is attached to the Lightsail load balancer. - IsAttached *bool `locationName:"isAttached" type:"boolean"` - - // The time when the SSL/TLS certificate was issued. - IssuedAt *time.Time `locationName:"issuedAt" type:"timestamp"` - - // The issuer of the certificate. - Issuer *string `locationName:"issuer" type:"string"` - - // The algorithm that was used to generate the key pair (the public and private - // key). - KeyAlgorithm *string `locationName:"keyAlgorithm" type:"string"` - - // The load balancer name where your SSL/TLS certificate is attached. - LoadBalancerName *string `locationName:"loadBalancerName" type:"string"` - - // The AWS Region and Availability Zone where you created your certificate. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The name of the SSL/TLS certificate (e.g., my-certificate). - Name *string `locationName:"name" type:"string"` - - // The timestamp when the SSL/TLS certificate expires. - NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` - - // The timestamp when the SSL/TLS certificate is first valid. - NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` - - // An object containing information about the status of Lightsail's managed - // renewal for the certificate. - RenewalSummary *LoadBalancerTlsCertificateRenewalSummary `locationName:"renewalSummary" type:"structure"` - - // The resource type (e.g., LoadBalancerTlsCertificate). - // - // * Instance - A Lightsail instance (a virtual private server) - // - // * StaticIp - A static IP address - // - // * KeyPair - The key pair used to connect to a Lightsail instance - // - // * InstanceSnapshot - A Lightsail instance snapshot - // - // * Domain - A DNS zone - // - // * PeeredVpc - A peered VPC - // - // * LoadBalancer - A Lightsail load balancer - // - // * LoadBalancerTlsCertificate - An SSL/TLS certificate associated with - // a Lightsail load balancer - // - // * Disk - A Lightsail block storage disk - // - // * DiskSnapshot - A block storage disk snapshot - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The reason the certificate was revoked. Valid values are below. - RevocationReason *string `locationName:"revocationReason" type:"string" enum:"LoadBalancerTlsCertificateRevocationReason"` - - // The timestamp when the SSL/TLS certificate was revoked. - RevokedAt *time.Time `locationName:"revokedAt" type:"timestamp"` - - // The serial number of the certificate. - Serial *string `locationName:"serial" type:"string"` - - // The algorithm that was used to sign the certificate. - SignatureAlgorithm *string `locationName:"signatureAlgorithm" type:"string"` - - // The status of the SSL/TLS certificate. Valid values are below. - Status *string `locationName:"status" type:"string" enum:"LoadBalancerTlsCertificateStatus"` - - // The name of the entity that is associated with the public key contained in - // the certificate. - Subject *string `locationName:"subject" type:"string"` - - // One or more domains or subdomains included in the certificate. This list - // contains the domain names that are bound to the public key that is contained - // in the certificate. The subject alternative names include the canonical domain - // name (CNAME) of the certificate and additional domain names that can be used - // to connect to the website, such as example.com, www.example.com, or m.example.com. - SubjectAlternativeNames []*string `locationName:"subjectAlternativeNames" type:"list"` - - // The support code. Include this code in your email to support when you have - // questions about your Lightsail load balancer or SSL/TLS certificate. This - // code enables our support team to look up your Lightsail information more - // easily. - SupportCode *string `locationName:"supportCode" type:"string"` - - // The tag keys and optional values for the resource. For more information about - // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s LoadBalancerTlsCertificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancerTlsCertificate) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *LoadBalancerTlsCertificate) SetArn(v string) *LoadBalancerTlsCertificate { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *LoadBalancerTlsCertificate) SetCreatedAt(v time.Time) *LoadBalancerTlsCertificate { - s.CreatedAt = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *LoadBalancerTlsCertificate) SetDomainName(v string) *LoadBalancerTlsCertificate { - s.DomainName = &v - return s -} - -// SetDomainValidationRecords sets the DomainValidationRecords field's value. -func (s *LoadBalancerTlsCertificate) SetDomainValidationRecords(v []*LoadBalancerTlsCertificateDomainValidationRecord) *LoadBalancerTlsCertificate { - s.DomainValidationRecords = v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *LoadBalancerTlsCertificate) SetFailureReason(v string) *LoadBalancerTlsCertificate { - s.FailureReason = &v - return s -} - -// SetIsAttached sets the IsAttached field's value. -func (s *LoadBalancerTlsCertificate) SetIsAttached(v bool) *LoadBalancerTlsCertificate { - s.IsAttached = &v - return s -} - -// SetIssuedAt sets the IssuedAt field's value. -func (s *LoadBalancerTlsCertificate) SetIssuedAt(v time.Time) *LoadBalancerTlsCertificate { - s.IssuedAt = &v - return s -} - -// SetIssuer sets the Issuer field's value. -func (s *LoadBalancerTlsCertificate) SetIssuer(v string) *LoadBalancerTlsCertificate { - s.Issuer = &v - return s -} - -// SetKeyAlgorithm sets the KeyAlgorithm field's value. -func (s *LoadBalancerTlsCertificate) SetKeyAlgorithm(v string) *LoadBalancerTlsCertificate { - s.KeyAlgorithm = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *LoadBalancerTlsCertificate) SetLoadBalancerName(v string) *LoadBalancerTlsCertificate { - s.LoadBalancerName = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *LoadBalancerTlsCertificate) SetLocation(v *ResourceLocation) *LoadBalancerTlsCertificate { - s.Location = v - return s -} - -// SetName sets the Name field's value. -func (s *LoadBalancerTlsCertificate) SetName(v string) *LoadBalancerTlsCertificate { - s.Name = &v - return s -} - -// SetNotAfter sets the NotAfter field's value. -func (s *LoadBalancerTlsCertificate) SetNotAfter(v time.Time) *LoadBalancerTlsCertificate { - s.NotAfter = &v - return s -} - -// SetNotBefore sets the NotBefore field's value. -func (s *LoadBalancerTlsCertificate) SetNotBefore(v time.Time) *LoadBalancerTlsCertificate { - s.NotBefore = &v - return s -} - -// SetRenewalSummary sets the RenewalSummary field's value. -func (s *LoadBalancerTlsCertificate) SetRenewalSummary(v *LoadBalancerTlsCertificateRenewalSummary) *LoadBalancerTlsCertificate { - s.RenewalSummary = v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *LoadBalancerTlsCertificate) SetResourceType(v string) *LoadBalancerTlsCertificate { - s.ResourceType = &v - return s -} - -// SetRevocationReason sets the RevocationReason field's value. -func (s *LoadBalancerTlsCertificate) SetRevocationReason(v string) *LoadBalancerTlsCertificate { - s.RevocationReason = &v - return s -} - -// SetRevokedAt sets the RevokedAt field's value. -func (s *LoadBalancerTlsCertificate) SetRevokedAt(v time.Time) *LoadBalancerTlsCertificate { - s.RevokedAt = &v - return s -} - -// SetSerial sets the Serial field's value. -func (s *LoadBalancerTlsCertificate) SetSerial(v string) *LoadBalancerTlsCertificate { - s.Serial = &v - return s -} - -// SetSignatureAlgorithm sets the SignatureAlgorithm field's value. -func (s *LoadBalancerTlsCertificate) SetSignatureAlgorithm(v string) *LoadBalancerTlsCertificate { - s.SignatureAlgorithm = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *LoadBalancerTlsCertificate) SetStatus(v string) *LoadBalancerTlsCertificate { - s.Status = &v - return s -} - -// SetSubject sets the Subject field's value. -func (s *LoadBalancerTlsCertificate) SetSubject(v string) *LoadBalancerTlsCertificate { - s.Subject = &v - return s -} - -// SetSubjectAlternativeNames sets the SubjectAlternativeNames field's value. -func (s *LoadBalancerTlsCertificate) SetSubjectAlternativeNames(v []*string) *LoadBalancerTlsCertificate { - s.SubjectAlternativeNames = v - return s -} - -// SetSupportCode sets the SupportCode field's value. -func (s *LoadBalancerTlsCertificate) SetSupportCode(v string) *LoadBalancerTlsCertificate { - s.SupportCode = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *LoadBalancerTlsCertificate) SetTags(v []*Tag) *LoadBalancerTlsCertificate { - s.Tags = v - return s -} - -// Contains information about the domain names on an SSL/TLS certificate that -// you will use to validate domain ownership. -type LoadBalancerTlsCertificateDomainValidationOption struct { - _ struct{} `type:"structure"` - - // The fully qualified domain name in the certificate request. - DomainName *string `locationName:"domainName" type:"string"` - - // The status of the domain validation. Valid values are listed below. - ValidationStatus *string `locationName:"validationStatus" type:"string" enum:"LoadBalancerTlsCertificateDomainStatus"` -} - -// String returns the string representation -func (s LoadBalancerTlsCertificateDomainValidationOption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancerTlsCertificateDomainValidationOption) GoString() string { - return s.String() -} - -// SetDomainName sets the DomainName field's value. -func (s *LoadBalancerTlsCertificateDomainValidationOption) SetDomainName(v string) *LoadBalancerTlsCertificateDomainValidationOption { - s.DomainName = &v - return s -} - -// SetValidationStatus sets the ValidationStatus field's value. -func (s *LoadBalancerTlsCertificateDomainValidationOption) SetValidationStatus(v string) *LoadBalancerTlsCertificateDomainValidationOption { - s.ValidationStatus = &v - return s -} - -// Describes the validation record of each domain name in the SSL/TLS certificate. -type LoadBalancerTlsCertificateDomainValidationRecord struct { - _ struct{} `type:"structure"` - - // The domain name against which your SSL/TLS certificate was validated. - DomainName *string `locationName:"domainName" type:"string"` - - // A fully qualified domain name in the certificate. For example, example.com. - Name *string `locationName:"name" type:"string"` - - // The type of validation record. For example, CNAME for domain validation. - Type *string `locationName:"type" type:"string"` - - // The validation status. Valid values are listed below. - ValidationStatus *string `locationName:"validationStatus" type:"string" enum:"LoadBalancerTlsCertificateDomainStatus"` - - // The value for that type. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s LoadBalancerTlsCertificateDomainValidationRecord) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancerTlsCertificateDomainValidationRecord) GoString() string { - return s.String() -} - -// SetDomainName sets the DomainName field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetDomainName(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.DomainName = &v - return s -} - -// SetName sets the Name field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetName(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetType(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.Type = &v - return s -} - -// SetValidationStatus sets the ValidationStatus field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetValidationStatus(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.ValidationStatus = &v - return s -} - -// SetValue sets the Value field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetValue(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.Value = &v - return s -} - -// Contains information about the status of Lightsail's managed renewal for -// the certificate. -type LoadBalancerTlsCertificateRenewalSummary struct { - _ struct{} `type:"structure"` - - // Contains information about the validation of each domain name in the certificate, - // as it pertains to Lightsail's managed renewal. This is different from the - // initial validation that occurs as a result of the RequestCertificate request. - DomainValidationOptions []*LoadBalancerTlsCertificateDomainValidationOption `locationName:"domainValidationOptions" type:"list"` - - // The status of Lightsail's managed renewal of the certificate. Valid values - // are listed below. - RenewalStatus *string `locationName:"renewalStatus" type:"string" enum:"LoadBalancerTlsCertificateRenewalStatus"` -} - -// String returns the string representation -func (s LoadBalancerTlsCertificateRenewalSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancerTlsCertificateRenewalSummary) GoString() string { - return s.String() -} - -// SetDomainValidationOptions sets the DomainValidationOptions field's value. -func (s *LoadBalancerTlsCertificateRenewalSummary) SetDomainValidationOptions(v []*LoadBalancerTlsCertificateDomainValidationOption) *LoadBalancerTlsCertificateRenewalSummary { - s.DomainValidationOptions = v - return s -} - -// SetRenewalStatus sets the RenewalStatus field's value. -func (s *LoadBalancerTlsCertificateRenewalSummary) SetRenewalStatus(v string) *LoadBalancerTlsCertificateRenewalSummary { - s.RenewalStatus = &v - return s -} - -// Provides a summary of SSL/TLS certificate metadata. -type LoadBalancerTlsCertificateSummary struct { - _ struct{} `type:"structure"` - - // When true, the SSL/TLS certificate is attached to the Lightsail load balancer. - IsAttached *bool `locationName:"isAttached" type:"boolean"` - - // The name of the SSL/TLS certificate. - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s LoadBalancerTlsCertificateSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBalancerTlsCertificateSummary) GoString() string { - return s.String() -} - -// SetIsAttached sets the IsAttached field's value. -func (s *LoadBalancerTlsCertificateSummary) SetIsAttached(v bool) *LoadBalancerTlsCertificateSummary { - s.IsAttached = &v - return s -} - -// SetName sets the Name field's value. -func (s *LoadBalancerTlsCertificateSummary) SetName(v string) *LoadBalancerTlsCertificateSummary { - s.Name = &v - return s -} - -// Describes a database log event. -type LogEvent struct { - _ struct{} `type:"structure"` - - // The timestamp when the database log event was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The message of the database log event. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s LogEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LogEvent) GoString() string { - return s.String() -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *LogEvent) SetCreatedAt(v time.Time) *LogEvent { - s.CreatedAt = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *LogEvent) SetMessage(v string) *LogEvent { - s.Message = &v - return s -} - -// Describes the metric data point. -type MetricDatapoint struct { - _ struct{} `type:"structure"` - - // The average. - Average *float64 `locationName:"average" type:"double"` - - // The maximum. - Maximum *float64 `locationName:"maximum" type:"double"` - - // The minimum. - Minimum *float64 `locationName:"minimum" type:"double"` - - // The sample count. - SampleCount *float64 `locationName:"sampleCount" type:"double"` - - // The sum. - Sum *float64 `locationName:"sum" type:"double"` - - // The timestamp (e.g., 1479816991.349). - Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` - - // The unit. - Unit *string `locationName:"unit" type:"string" enum:"MetricUnit"` -} - -// String returns the string representation -func (s MetricDatapoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricDatapoint) GoString() string { - return s.String() -} - -// SetAverage sets the Average field's value. -func (s *MetricDatapoint) SetAverage(v float64) *MetricDatapoint { - s.Average = &v - return s -} - -// SetMaximum sets the Maximum field's value. -func (s *MetricDatapoint) SetMaximum(v float64) *MetricDatapoint { - s.Maximum = &v - return s -} - -// SetMinimum sets the Minimum field's value. -func (s *MetricDatapoint) SetMinimum(v float64) *MetricDatapoint { - s.Minimum = &v - return s -} - -// SetSampleCount sets the SampleCount field's value. -func (s *MetricDatapoint) SetSampleCount(v float64) *MetricDatapoint { - s.SampleCount = &v - return s -} - -// SetSum sets the Sum field's value. -func (s *MetricDatapoint) SetSum(v float64) *MetricDatapoint { - s.Sum = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *MetricDatapoint) SetTimestamp(v time.Time) *MetricDatapoint { - s.Timestamp = &v - return s -} - -// SetUnit sets the Unit field's value. -func (s *MetricDatapoint) SetUnit(v string) *MetricDatapoint { - s.Unit = &v - return s -} - -// Describes the monthly data transfer in and out of your virtual private server -// (or instance). -type MonthlyTransfer struct { - _ struct{} `type:"structure"` - - // The amount allocated per month (in GB). - GbPerMonthAllocated *int64 `locationName:"gbPerMonthAllocated" type:"integer"` -} - -// String returns the string representation -func (s MonthlyTransfer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MonthlyTransfer) GoString() string { - return s.String() -} - -// SetGbPerMonthAllocated sets the GbPerMonthAllocated field's value. -func (s *MonthlyTransfer) SetGbPerMonthAllocated(v int64) *MonthlyTransfer { - s.GbPerMonthAllocated = &v - return s -} - -type OpenInstancePublicPortsInput struct { - _ struct{} `type:"structure"` - - // The name of the instance for which you want to open the public ports. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - - // An array of key-value pairs containing information about the port mappings. - // - // PortInfo is a required field - PortInfo *PortInfo `locationName:"portInfo" type:"structure" required:"true"` -} - -// String returns the string representation -func (s OpenInstancePublicPortsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OpenInstancePublicPortsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OpenInstancePublicPortsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OpenInstancePublicPortsInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - if s.PortInfo == nil { - invalidParams.Add(request.NewErrParamRequired("PortInfo")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *OpenInstancePublicPortsInput) SetInstanceName(v string) *OpenInstancePublicPortsInput { - s.InstanceName = &v - return s -} - -// SetPortInfo sets the PortInfo field's value. -func (s *OpenInstancePublicPortsInput) SetPortInfo(v *PortInfo) *OpenInstancePublicPortsInput { - s.PortInfo = v - return s -} - -type OpenInstancePublicPortsOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the request operation. - Operation *Operation `locationName:"operation" type:"structure"` -} - -// String returns the string representation -func (s OpenInstancePublicPortsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OpenInstancePublicPortsOutput) GoString() string { - return s.String() -} - -// SetOperation sets the Operation field's value. -func (s *OpenInstancePublicPortsOutput) SetOperation(v *Operation) *OpenInstancePublicPortsOutput { - s.Operation = v - return s -} - -// Describes the API operation. -type Operation struct { - _ struct{} `type:"structure"` - - // The timestamp when the operation was initialized (e.g., 1479816991.349). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The error code. - ErrorCode *string `locationName:"errorCode" type:"string"` - - // The error details. - ErrorDetails *string `locationName:"errorDetails" type:"string"` - - // The ID of the operation. - Id *string `locationName:"id" type:"string"` - - // A Boolean value indicating whether the operation is terminal. - IsTerminal *bool `locationName:"isTerminal" type:"boolean"` - - // The region and Availability Zone. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // Details about the operation (e.g., Debian-1GB-Ohio-1). - OperationDetails *string `locationName:"operationDetails" type:"string"` - - // The type of operation. - OperationType *string `locationName:"operationType" type:"string" enum:"OperationType"` - - // The resource name. - ResourceName *string `locationName:"resourceName" type:"string"` - - // The resource type. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The status of the operation. - Status *string `locationName:"status" type:"string" enum:"OperationStatus"` - - // The timestamp when the status was changed (e.g., 1479816991.349). - StatusChangedAt *time.Time `locationName:"statusChangedAt" type:"timestamp"` -} - -// String returns the string representation -func (s Operation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Operation) GoString() string { - return s.String() -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Operation) SetCreatedAt(v time.Time) *Operation { - s.CreatedAt = &v - return s -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *Operation) SetErrorCode(v string) *Operation { - s.ErrorCode = &v - return s -} - -// SetErrorDetails sets the ErrorDetails field's value. -func (s *Operation) SetErrorDetails(v string) *Operation { - s.ErrorDetails = &v - return s -} - -// SetId sets the Id field's value. -func (s *Operation) SetId(v string) *Operation { - s.Id = &v - return s -} - -// SetIsTerminal sets the IsTerminal field's value. -func (s *Operation) SetIsTerminal(v bool) *Operation { - s.IsTerminal = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *Operation) SetLocation(v *ResourceLocation) *Operation { - s.Location = v - return s -} - -// SetOperationDetails sets the OperationDetails field's value. -func (s *Operation) SetOperationDetails(v string) *Operation { - s.OperationDetails = &v - return s -} - -// SetOperationType sets the OperationType field's value. -func (s *Operation) SetOperationType(v string) *Operation { - s.OperationType = &v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *Operation) SetResourceName(v string) *Operation { - s.ResourceName = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *Operation) SetResourceType(v string) *Operation { - s.ResourceType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Operation) SetStatus(v string) *Operation { - s.Status = &v - return s -} - -// SetStatusChangedAt sets the StatusChangedAt field's value. -func (s *Operation) SetStatusChangedAt(v time.Time) *Operation { - s.StatusChangedAt = &v - return s -} - -// The password data for the Windows Server-based instance, including the ciphertext -// and the key pair name. -type PasswordData struct { - _ struct{} `type:"structure"` - - // The encrypted password. Ciphertext will be an empty string if access to your - // new instance is not ready yet. When you create an instance, it can take up - // to 15 minutes for the instance to be ready. - // - // If you use the default key pair (LightsailDefaultKeyPair), the decrypted - // password will be available in the password field. - // - // If you are using a custom key pair, you need to use your own means of decryption. - // - // If you change the Administrator password on the instance, Lightsail will - // continue to return the original ciphertext value. When accessing the instance - // using RDP, you need to manually enter the Administrator password after changing - // it from the default. - Ciphertext *string `locationName:"ciphertext" type:"string"` - - // The name of the key pair that you used when creating your instance. If no - // key pair name was specified when creating the instance, Lightsail uses the - // default key pair (LightsailDefaultKeyPair). - // - // If you are using a custom key pair, you need to use your own means of decrypting - // your password using the ciphertext. Lightsail creates the ciphertext by encrypting - // your password with the public key part of this key pair. - KeyPairName *string `locationName:"keyPairName" type:"string"` -} - -// String returns the string representation -func (s PasswordData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PasswordData) GoString() string { - return s.String() -} - -// SetCiphertext sets the Ciphertext field's value. -func (s *PasswordData) SetCiphertext(v string) *PasswordData { - s.Ciphertext = &v - return s -} - -// SetKeyPairName sets the KeyPairName field's value. -func (s *PasswordData) SetKeyPairName(v string) *PasswordData { - s.KeyPairName = &v - return s -} - -type PeerVpcInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PeerVpcInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PeerVpcInput) GoString() string { - return s.String() -} - -type PeerVpcOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the request operation. - Operation *Operation `locationName:"operation" type:"structure"` -} - -// String returns the string representation -func (s PeerVpcOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PeerVpcOutput) GoString() string { - return s.String() -} - -// SetOperation sets the Operation field's value. -func (s *PeerVpcOutput) SetOperation(v *Operation) *PeerVpcOutput { - s.Operation = v - return s -} - -// Describes a pending database maintenance action. -type PendingMaintenanceAction struct { - _ struct{} `type:"structure"` - - // The type of pending database maintenance action. - Action *string `locationName:"action" type:"string"` - - // The effective date of the pending database maintenance action. - CurrentApplyDate *time.Time `locationName:"currentApplyDate" type:"timestamp"` - - // Additional detail about the pending database maintenance action. - Description *string `locationName:"description" type:"string"` -} - -// String returns the string representation -func (s PendingMaintenanceAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingMaintenanceAction) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *PendingMaintenanceAction) SetAction(v string) *PendingMaintenanceAction { - s.Action = &v - return s -} - -// SetCurrentApplyDate sets the CurrentApplyDate field's value. -func (s *PendingMaintenanceAction) SetCurrentApplyDate(v time.Time) *PendingMaintenanceAction { - s.CurrentApplyDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PendingMaintenanceAction) SetDescription(v string) *PendingMaintenanceAction { - s.Description = &v - return s -} - -// Describes a pending database value modification. -type PendingModifiedRelationalDatabaseValues struct { - _ struct{} `type:"structure"` - - // A Boolean value indicating whether automated backup retention is enabled. - BackupRetentionEnabled *bool `locationName:"backupRetentionEnabled" type:"boolean"` - - // The database engine version. - EngineVersion *string `locationName:"engineVersion" type:"string"` - - // The password for the master user of the database. - MasterUserPassword *string `locationName:"masterUserPassword" type:"string"` -} - -// String returns the string representation -func (s PendingModifiedRelationalDatabaseValues) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingModifiedRelationalDatabaseValues) GoString() string { - return s.String() -} - -// SetBackupRetentionEnabled sets the BackupRetentionEnabled field's value. -func (s *PendingModifiedRelationalDatabaseValues) SetBackupRetentionEnabled(v bool) *PendingModifiedRelationalDatabaseValues { - s.BackupRetentionEnabled = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *PendingModifiedRelationalDatabaseValues) SetEngineVersion(v string) *PendingModifiedRelationalDatabaseValues { - s.EngineVersion = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *PendingModifiedRelationalDatabaseValues) SetMasterUserPassword(v string) *PendingModifiedRelationalDatabaseValues { - s.MasterUserPassword = &v - return s -} - -// Describes information about the ports on your virtual private server (or -// instance). -type PortInfo struct { - _ struct{} `type:"structure"` - - // The first port in the range. - FromPort *int64 `locationName:"fromPort" type:"integer"` - - // The protocol. - Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` - - // The last port in the range. - ToPort *int64 `locationName:"toPort" type:"integer"` -} - -// String returns the string representation -func (s PortInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PortInfo) GoString() string { - return s.String() -} - -// SetFromPort sets the FromPort field's value. -func (s *PortInfo) SetFromPort(v int64) *PortInfo { - s.FromPort = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *PortInfo) SetProtocol(v string) *PortInfo { - s.Protocol = &v - return s -} - -// SetToPort sets the ToPort field's value. -func (s *PortInfo) SetToPort(v int64) *PortInfo { - s.ToPort = &v - return s -} - -type PutInstancePublicPortsInput struct { - _ struct{} `type:"structure"` - - // The Lightsail instance name of the public port(s) you are setting. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - - // Specifies information about the public port(s). - // - // PortInfos is a required field - PortInfos []*PortInfo `locationName:"portInfos" type:"list" required:"true"` -} - -// String returns the string representation -func (s PutInstancePublicPortsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutInstancePublicPortsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutInstancePublicPortsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutInstancePublicPortsInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - if s.PortInfos == nil { - invalidParams.Add(request.NewErrParamRequired("PortInfos")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *PutInstancePublicPortsInput) SetInstanceName(v string) *PutInstancePublicPortsInput { - s.InstanceName = &v - return s -} - -// SetPortInfos sets the PortInfos field's value. -func (s *PutInstancePublicPortsInput) SetPortInfos(v []*PortInfo) *PutInstancePublicPortsInput { - s.PortInfos = v - return s -} - -type PutInstancePublicPortsOutput struct { - _ struct{} `type:"structure"` - - // Describes metadata about the operation you just executed. - Operation *Operation `locationName:"operation" type:"structure"` -} - -// String returns the string representation -func (s PutInstancePublicPortsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutInstancePublicPortsOutput) GoString() string { - return s.String() -} - -// SetOperation sets the Operation field's value. -func (s *PutInstancePublicPortsOutput) SetOperation(v *Operation) *PutInstancePublicPortsOutput { - s.Operation = v - return s -} - -type RebootInstanceInput struct { - _ struct{} `type:"structure"` - - // The name of the instance to reboot. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s RebootInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootInstanceInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *RebootInstanceInput) SetInstanceName(v string) *RebootInstanceInput { - s.InstanceName = &v - return s -} - -type RebootInstanceOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the request operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s RebootInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootInstanceOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *RebootInstanceOutput) SetOperations(v []*Operation) *RebootInstanceOutput { - s.Operations = v - return s -} - -type RebootRelationalDatabaseInput struct { - _ struct{} `type:"structure"` - - // The name of your database to reboot. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` -} - -// String returns the string representation -func (s RebootRelationalDatabaseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootRelationalDatabaseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootRelationalDatabaseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootRelationalDatabaseInput"} - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *RebootRelationalDatabaseInput) SetRelationalDatabaseName(v string) *RebootRelationalDatabaseInput { - s.RelationalDatabaseName = &v - return s -} - -type RebootRelationalDatabaseOutput struct { - _ struct{} `type:"structure"` - - // An object describing the result of your reboot relational database request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s RebootRelationalDatabaseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootRelationalDatabaseOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *RebootRelationalDatabaseOutput) SetOperations(v []*Operation) *RebootRelationalDatabaseOutput { - s.Operations = v - return s -} - -// Describes the AWS Region. -type Region struct { - _ struct{} `type:"structure"` - - // The Availability Zones. Follows the format us-east-2a (case-sensitive). - AvailabilityZones []*AvailabilityZone `locationName:"availabilityZones" type:"list"` - - // The continent code (e.g., NA, meaning North America). - ContinentCode *string `locationName:"continentCode" type:"string"` - - // The description of the AWS Region (e.g., This region is recommended to serve - // users in the eastern United States and eastern Canada). - Description *string `locationName:"description" type:"string"` - - // The display name (e.g., Ohio). - DisplayName *string `locationName:"displayName" type:"string"` - - // The region name (e.g., us-east-2). - Name *string `locationName:"name" type:"string" enum:"RegionName"` - - // The Availability Zones for databases. Follows the format us-east-2a (case-sensitive). - RelationalDatabaseAvailabilityZones []*AvailabilityZone `locationName:"relationalDatabaseAvailabilityZones" type:"list"` -} - -// String returns the string representation -func (s Region) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Region) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *Region) SetAvailabilityZones(v []*AvailabilityZone) *Region { - s.AvailabilityZones = v - return s -} - -// SetContinentCode sets the ContinentCode field's value. -func (s *Region) SetContinentCode(v string) *Region { - s.ContinentCode = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Region) SetDescription(v string) *Region { - s.Description = &v - return s -} - -// SetDisplayName sets the DisplayName field's value. -func (s *Region) SetDisplayName(v string) *Region { - s.DisplayName = &v - return s -} - -// SetName sets the Name field's value. -func (s *Region) SetName(v string) *Region { - s.Name = &v - return s -} - -// SetRelationalDatabaseAvailabilityZones sets the RelationalDatabaseAvailabilityZones field's value. -func (s *Region) SetRelationalDatabaseAvailabilityZones(v []*AvailabilityZone) *Region { - s.RelationalDatabaseAvailabilityZones = v - return s -} - -// Describes a database. -type RelationalDatabase struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the database. - Arn *string `locationName:"arn" type:"string"` - - // A Boolean value indicating whether automated backup retention is enabled - // for the database. - BackupRetentionEnabled *bool `locationName:"backupRetentionEnabled" type:"boolean"` - - // The timestamp when the database was created. Formatted in Unix time. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The database software (for example, MySQL). - Engine *string `locationName:"engine" type:"string"` - - // The database engine version (for example, 5.7.23). - EngineVersion *string `locationName:"engineVersion" type:"string"` - - // Describes the hardware of the database. - Hardware *RelationalDatabaseHardware `locationName:"hardware" type:"structure"` - - // The latest point in time to which the database can be restored. Formatted - // in Unix time. - LatestRestorableTime *time.Time `locationName:"latestRestorableTime" type:"timestamp"` - - // The Region name and Availability Zone where the database is located. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The name of the master database created when the Lightsail database resource - // is created. - MasterDatabaseName *string `locationName:"masterDatabaseName" type:"string"` - - // The master endpoint for the database. - MasterEndpoint *RelationalDatabaseEndpoint `locationName:"masterEndpoint" type:"structure"` - - // The master user name of the database. - MasterUsername *string `locationName:"masterUsername" type:"string"` - - // The unique name of the database resource in Lightsail. - Name *string `locationName:"name" type:"string"` - - // The status of parameter updates for the database. - ParameterApplyStatus *string `locationName:"parameterApplyStatus" type:"string"` - - // Describes the pending maintenance actions for the database. - PendingMaintenanceActions []*PendingMaintenanceAction `locationName:"pendingMaintenanceActions" type:"list"` - - // Describes pending database value modifications. - PendingModifiedValues *PendingModifiedRelationalDatabaseValues `locationName:"pendingModifiedValues" type:"structure"` - - // The daily time range during which automated backups are created for the database - // (for example, 16:00-16:30). - PreferredBackupWindow *string `locationName:"preferredBackupWindow" type:"string"` - - // The weekly time range during which system maintenance can occur on the database. - // - // In the format ddd:hh24:mi-ddd:hh24:mi. For example, Tue:17:00-Tue:17:30. - PreferredMaintenanceWindow *string `locationName:"preferredMaintenanceWindow" type:"string"` - - // A Boolean value indicating whether the database is publicly accessible. - PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` - - // The blueprint ID for the database. A blueprint describes the major engine - // version of a database. - RelationalDatabaseBlueprintId *string `locationName:"relationalDatabaseBlueprintId" type:"string"` - - // The bundle ID for the database. A bundle describes the performance specifications - // for your database. - RelationalDatabaseBundleId *string `locationName:"relationalDatabaseBundleId" type:"string"` - - // The Lightsail resource type for the database (for example, RelationalDatabase). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // Describes the secondary Availability Zone of a high availability database. - // - // The secondary database is used for failover support of a high availability - // database. - SecondaryAvailabilityZone *string `locationName:"secondaryAvailabilityZone" type:"string"` - - // Describes the current state of the database. - State *string `locationName:"state" type:"string"` - - // The support code for the database. Include this code in your email to support - // when you have questions about a database in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` - - // The tag keys and optional values for the resource. For more information about - // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s RelationalDatabase) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RelationalDatabase) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *RelationalDatabase) SetArn(v string) *RelationalDatabase { - s.Arn = &v - return s -} - -// SetBackupRetentionEnabled sets the BackupRetentionEnabled field's value. -func (s *RelationalDatabase) SetBackupRetentionEnabled(v bool) *RelationalDatabase { - s.BackupRetentionEnabled = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *RelationalDatabase) SetCreatedAt(v time.Time) *RelationalDatabase { - s.CreatedAt = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *RelationalDatabase) SetEngine(v string) *RelationalDatabase { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *RelationalDatabase) SetEngineVersion(v string) *RelationalDatabase { - s.EngineVersion = &v - return s -} - -// SetHardware sets the Hardware field's value. -func (s *RelationalDatabase) SetHardware(v *RelationalDatabaseHardware) *RelationalDatabase { - s.Hardware = v - return s -} - -// SetLatestRestorableTime sets the LatestRestorableTime field's value. -func (s *RelationalDatabase) SetLatestRestorableTime(v time.Time) *RelationalDatabase { - s.LatestRestorableTime = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *RelationalDatabase) SetLocation(v *ResourceLocation) *RelationalDatabase { - s.Location = v - return s -} - -// SetMasterDatabaseName sets the MasterDatabaseName field's value. -func (s *RelationalDatabase) SetMasterDatabaseName(v string) *RelationalDatabase { - s.MasterDatabaseName = &v - return s -} - -// SetMasterEndpoint sets the MasterEndpoint field's value. -func (s *RelationalDatabase) SetMasterEndpoint(v *RelationalDatabaseEndpoint) *RelationalDatabase { - s.MasterEndpoint = v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *RelationalDatabase) SetMasterUsername(v string) *RelationalDatabase { - s.MasterUsername = &v - return s -} - -// SetName sets the Name field's value. -func (s *RelationalDatabase) SetName(v string) *RelationalDatabase { - s.Name = &v - return s -} - -// SetParameterApplyStatus sets the ParameterApplyStatus field's value. -func (s *RelationalDatabase) SetParameterApplyStatus(v string) *RelationalDatabase { - s.ParameterApplyStatus = &v - return s -} - -// SetPendingMaintenanceActions sets the PendingMaintenanceActions field's value. -func (s *RelationalDatabase) SetPendingMaintenanceActions(v []*PendingMaintenanceAction) *RelationalDatabase { - s.PendingMaintenanceActions = v - return s -} - -// SetPendingModifiedValues sets the PendingModifiedValues field's value. -func (s *RelationalDatabase) SetPendingModifiedValues(v *PendingModifiedRelationalDatabaseValues) *RelationalDatabase { - s.PendingModifiedValues = v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *RelationalDatabase) SetPreferredBackupWindow(v string) *RelationalDatabase { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *RelationalDatabase) SetPreferredMaintenanceWindow(v string) *RelationalDatabase { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *RelationalDatabase) SetPubliclyAccessible(v bool) *RelationalDatabase { - s.PubliclyAccessible = &v - return s -} - -// SetRelationalDatabaseBlueprintId sets the RelationalDatabaseBlueprintId field's value. -func (s *RelationalDatabase) SetRelationalDatabaseBlueprintId(v string) *RelationalDatabase { - s.RelationalDatabaseBlueprintId = &v - return s -} - -// SetRelationalDatabaseBundleId sets the RelationalDatabaseBundleId field's value. -func (s *RelationalDatabase) SetRelationalDatabaseBundleId(v string) *RelationalDatabase { - s.RelationalDatabaseBundleId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *RelationalDatabase) SetResourceType(v string) *RelationalDatabase { - s.ResourceType = &v - return s -} - -// SetSecondaryAvailabilityZone sets the SecondaryAvailabilityZone field's value. -func (s *RelationalDatabase) SetSecondaryAvailabilityZone(v string) *RelationalDatabase { - s.SecondaryAvailabilityZone = &v - return s -} - -// SetState sets the State field's value. -func (s *RelationalDatabase) SetState(v string) *RelationalDatabase { - s.State = &v - return s -} - -// SetSupportCode sets the SupportCode field's value. -func (s *RelationalDatabase) SetSupportCode(v string) *RelationalDatabase { - s.SupportCode = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RelationalDatabase) SetTags(v []*Tag) *RelationalDatabase { - s.Tags = v - return s -} - -// Describes a database image, or blueprint. A blueprint describes the major -// engine version of a database. -type RelationalDatabaseBlueprint struct { - _ struct{} `type:"structure"` - - // The ID for the database blueprint. - BlueprintId *string `locationName:"blueprintId" type:"string"` - - // The database software of the database blueprint (for example, MySQL). - Engine *string `locationName:"engine" type:"string" enum:"RelationalDatabaseEngine"` - - // The description of the database engine for the database blueprint. - EngineDescription *string `locationName:"engineDescription" type:"string"` - - // The database engine version for the database blueprint (for example, 5.7.23). - EngineVersion *string `locationName:"engineVersion" type:"string"` - - // The description of the database engine version for the database blueprint. - EngineVersionDescription *string `locationName:"engineVersionDescription" type:"string"` - - // A Boolean value indicating whether the engine version is the default for - // the database blueprint. - IsEngineDefault *bool `locationName:"isEngineDefault" type:"boolean"` -} - -// String returns the string representation -func (s RelationalDatabaseBlueprint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RelationalDatabaseBlueprint) GoString() string { - return s.String() -} - -// SetBlueprintId sets the BlueprintId field's value. -func (s *RelationalDatabaseBlueprint) SetBlueprintId(v string) *RelationalDatabaseBlueprint { - s.BlueprintId = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *RelationalDatabaseBlueprint) SetEngine(v string) *RelationalDatabaseBlueprint { - s.Engine = &v - return s -} - -// SetEngineDescription sets the EngineDescription field's value. -func (s *RelationalDatabaseBlueprint) SetEngineDescription(v string) *RelationalDatabaseBlueprint { - s.EngineDescription = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *RelationalDatabaseBlueprint) SetEngineVersion(v string) *RelationalDatabaseBlueprint { - s.EngineVersion = &v - return s -} - -// SetEngineVersionDescription sets the EngineVersionDescription field's value. -func (s *RelationalDatabaseBlueprint) SetEngineVersionDescription(v string) *RelationalDatabaseBlueprint { - s.EngineVersionDescription = &v - return s -} - -// SetIsEngineDefault sets the IsEngineDefault field's value. -func (s *RelationalDatabaseBlueprint) SetIsEngineDefault(v bool) *RelationalDatabaseBlueprint { - s.IsEngineDefault = &v - return s -} - -// Describes a database bundle. A bundle describes the performance specifications -// of the database. -type RelationalDatabaseBundle struct { - _ struct{} `type:"structure"` - - // The ID for the database bundle. - BundleId *string `locationName:"bundleId" type:"string"` - - // The number of virtual CPUs (vCPUs) for the database bundle. - CpuCount *int64 `locationName:"cpuCount" type:"integer"` - - // The size of the disk for the database bundle. - DiskSizeInGb *int64 `locationName:"diskSizeInGb" type:"integer"` - - // A Boolean value indicating whether the database bundle is active. - IsActive *bool `locationName:"isActive" type:"boolean"` - - // A Boolean value indicating whether the database bundle is encrypted. - IsEncrypted *bool `locationName:"isEncrypted" type:"boolean"` - - // The name for the database bundle. - Name *string `locationName:"name" type:"string"` - - // The cost of the database bundle in US currency. - Price *float64 `locationName:"price" type:"float"` - - // The amount of RAM in GB (for example, 2.0) for the database bundle. - RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` - - // The data transfer rate per month in GB for the database bundle. - TransferPerMonthInGb *int64 `locationName:"transferPerMonthInGb" type:"integer"` -} - -// String returns the string representation -func (s RelationalDatabaseBundle) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RelationalDatabaseBundle) GoString() string { - return s.String() -} - -// SetBundleId sets the BundleId field's value. -func (s *RelationalDatabaseBundle) SetBundleId(v string) *RelationalDatabaseBundle { - s.BundleId = &v - return s -} - -// SetCpuCount sets the CpuCount field's value. -func (s *RelationalDatabaseBundle) SetCpuCount(v int64) *RelationalDatabaseBundle { - s.CpuCount = &v - return s -} - -// SetDiskSizeInGb sets the DiskSizeInGb field's value. -func (s *RelationalDatabaseBundle) SetDiskSizeInGb(v int64) *RelationalDatabaseBundle { - s.DiskSizeInGb = &v - return s -} - -// SetIsActive sets the IsActive field's value. -func (s *RelationalDatabaseBundle) SetIsActive(v bool) *RelationalDatabaseBundle { - s.IsActive = &v - return s -} - -// SetIsEncrypted sets the IsEncrypted field's value. -func (s *RelationalDatabaseBundle) SetIsEncrypted(v bool) *RelationalDatabaseBundle { - s.IsEncrypted = &v - return s -} - -// SetName sets the Name field's value. -func (s *RelationalDatabaseBundle) SetName(v string) *RelationalDatabaseBundle { - s.Name = &v - return s -} - -// SetPrice sets the Price field's value. -func (s *RelationalDatabaseBundle) SetPrice(v float64) *RelationalDatabaseBundle { - s.Price = &v - return s -} - -// SetRamSizeInGb sets the RamSizeInGb field's value. -func (s *RelationalDatabaseBundle) SetRamSizeInGb(v float64) *RelationalDatabaseBundle { - s.RamSizeInGb = &v - return s -} - -// SetTransferPerMonthInGb sets the TransferPerMonthInGb field's value. -func (s *RelationalDatabaseBundle) SetTransferPerMonthInGb(v int64) *RelationalDatabaseBundle { - s.TransferPerMonthInGb = &v - return s -} - -// Describes an endpoint for a database. -type RelationalDatabaseEndpoint struct { - _ struct{} `type:"structure"` - - // Specifies the DNS address of the database. - Address *string `locationName:"address" type:"string"` - - // Specifies the port that the database is listening on. - Port *int64 `locationName:"port" type:"integer"` -} - -// String returns the string representation -func (s RelationalDatabaseEndpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RelationalDatabaseEndpoint) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *RelationalDatabaseEndpoint) SetAddress(v string) *RelationalDatabaseEndpoint { - s.Address = &v - return s -} - -// SetPort sets the Port field's value. -func (s *RelationalDatabaseEndpoint) SetPort(v int64) *RelationalDatabaseEndpoint { - s.Port = &v - return s -} - -// Describes an event for a database. -type RelationalDatabaseEvent struct { - _ struct{} `type:"structure"` - - // The timestamp when the database event was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The category that the database event belongs to. - EventCategories []*string `locationName:"eventCategories" type:"list"` - - // The message of the database event. - Message *string `locationName:"message" type:"string"` - - // The database that the database event relates to. - Resource *string `locationName:"resource" type:"string"` -} - -// String returns the string representation -func (s RelationalDatabaseEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RelationalDatabaseEvent) GoString() string { - return s.String() -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *RelationalDatabaseEvent) SetCreatedAt(v time.Time) *RelationalDatabaseEvent { - s.CreatedAt = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *RelationalDatabaseEvent) SetEventCategories(v []*string) *RelationalDatabaseEvent { - s.EventCategories = v - return s -} - -// SetMessage sets the Message field's value. -func (s *RelationalDatabaseEvent) SetMessage(v string) *RelationalDatabaseEvent { - s.Message = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *RelationalDatabaseEvent) SetResource(v string) *RelationalDatabaseEvent { - s.Resource = &v - return s -} - -// Describes the hardware of a database. -type RelationalDatabaseHardware struct { - _ struct{} `type:"structure"` - - // The number of vCPUs for the database. - CpuCount *int64 `locationName:"cpuCount" type:"integer"` - - // The size of the disk for the database. - DiskSizeInGb *int64 `locationName:"diskSizeInGb" type:"integer"` - - // The amount of RAM in GB for the database. - RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` -} - -// String returns the string representation -func (s RelationalDatabaseHardware) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RelationalDatabaseHardware) GoString() string { - return s.String() -} - -// SetCpuCount sets the CpuCount field's value. -func (s *RelationalDatabaseHardware) SetCpuCount(v int64) *RelationalDatabaseHardware { - s.CpuCount = &v - return s -} - -// SetDiskSizeInGb sets the DiskSizeInGb field's value. -func (s *RelationalDatabaseHardware) SetDiskSizeInGb(v int64) *RelationalDatabaseHardware { - s.DiskSizeInGb = &v - return s -} - -// SetRamSizeInGb sets the RamSizeInGb field's value. -func (s *RelationalDatabaseHardware) SetRamSizeInGb(v float64) *RelationalDatabaseHardware { - s.RamSizeInGb = &v - return s -} - -// Describes the parameters of a database. -type RelationalDatabaseParameter struct { - _ struct{} `type:"structure"` - - // Specifies the valid range of values for the parameter. - AllowedValues *string `locationName:"allowedValues" type:"string"` - - // Indicates when parameter updates are applied. - // - // Can be immediate or pending-reboot. - ApplyMethod *string `locationName:"applyMethod" type:"string"` - - // Specifies the engine-specific parameter type. - ApplyType *string `locationName:"applyType" type:"string"` - - // Specifies the valid data type for the parameter. - DataType *string `locationName:"dataType" type:"string"` - - // Provides a description of the parameter. - Description *string `locationName:"description" type:"string"` - - // A Boolean value indicating whether the parameter can be modified. - IsModifiable *bool `locationName:"isModifiable" type:"boolean"` - - // Specifies the name of the parameter. - ParameterName *string `locationName:"parameterName" type:"string"` - - // Specifies the value of the parameter. - ParameterValue *string `locationName:"parameterValue" type:"string"` -} - -// String returns the string representation -func (s RelationalDatabaseParameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RelationalDatabaseParameter) GoString() string { - return s.String() -} - -// SetAllowedValues sets the AllowedValues field's value. -func (s *RelationalDatabaseParameter) SetAllowedValues(v string) *RelationalDatabaseParameter { - s.AllowedValues = &v - return s -} - -// SetApplyMethod sets the ApplyMethod field's value. -func (s *RelationalDatabaseParameter) SetApplyMethod(v string) *RelationalDatabaseParameter { - s.ApplyMethod = &v - return s -} - -// SetApplyType sets the ApplyType field's value. -func (s *RelationalDatabaseParameter) SetApplyType(v string) *RelationalDatabaseParameter { - s.ApplyType = &v - return s -} - -// SetDataType sets the DataType field's value. -func (s *RelationalDatabaseParameter) SetDataType(v string) *RelationalDatabaseParameter { - s.DataType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *RelationalDatabaseParameter) SetDescription(v string) *RelationalDatabaseParameter { - s.Description = &v - return s -} - -// SetIsModifiable sets the IsModifiable field's value. -func (s *RelationalDatabaseParameter) SetIsModifiable(v bool) *RelationalDatabaseParameter { - s.IsModifiable = &v - return s -} - -// SetParameterName sets the ParameterName field's value. -func (s *RelationalDatabaseParameter) SetParameterName(v string) *RelationalDatabaseParameter { - s.ParameterName = &v - return s -} - -// SetParameterValue sets the ParameterValue field's value. -func (s *RelationalDatabaseParameter) SetParameterValue(v string) *RelationalDatabaseParameter { - s.ParameterValue = &v - return s -} - -// Describes a database snapshot. -type RelationalDatabaseSnapshot struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the database snapshot. - Arn *string `locationName:"arn" type:"string"` - - // The timestamp when the database snapshot was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The software of the database snapshot (for example, MySQL) - Engine *string `locationName:"engine" type:"string"` - - // The database engine version for the database snapshot (for example, 5.7.23). - EngineVersion *string `locationName:"engineVersion" type:"string"` - - // The Amazon Resource Name (ARN) of the database from which the database snapshot - // was created. - FromRelationalDatabaseArn *string `locationName:"fromRelationalDatabaseArn" type:"string"` - - // The blueprint ID of the database from which the database snapshot was created. - // A blueprint describes the major engine version of a database. - FromRelationalDatabaseBlueprintId *string `locationName:"fromRelationalDatabaseBlueprintId" type:"string"` - - // The bundle ID of the database from which the database snapshot was created. - FromRelationalDatabaseBundleId *string `locationName:"fromRelationalDatabaseBundleId" type:"string"` - - // The name of the source database from which the database snapshot was created. - FromRelationalDatabaseName *string `locationName:"fromRelationalDatabaseName" type:"string"` - - // The Region name and Availability Zone where the database snapshot is located. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The name of the database snapshot. - Name *string `locationName:"name" type:"string"` - - // The Lightsail resource type. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The size of the disk in GB (for example, 32) for the database snapshot. - SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` - - // The state of the database snapshot. - State *string `locationName:"state" type:"string"` - - // The support code for the database snapshot. Include this code in your email - // to support when you have questions about a database snapshot in Lightsail. - // This code enables our support team to look up your Lightsail information - // more easily. - SupportCode *string `locationName:"supportCode" type:"string"` - - // The tag keys and optional values for the resource. For more information about - // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s RelationalDatabaseSnapshot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RelationalDatabaseSnapshot) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *RelationalDatabaseSnapshot) SetArn(v string) *RelationalDatabaseSnapshot { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *RelationalDatabaseSnapshot) SetCreatedAt(v time.Time) *RelationalDatabaseSnapshot { - s.CreatedAt = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *RelationalDatabaseSnapshot) SetEngine(v string) *RelationalDatabaseSnapshot { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *RelationalDatabaseSnapshot) SetEngineVersion(v string) *RelationalDatabaseSnapshot { - s.EngineVersion = &v - return s -} - -// SetFromRelationalDatabaseArn sets the FromRelationalDatabaseArn field's value. -func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseArn(v string) *RelationalDatabaseSnapshot { - s.FromRelationalDatabaseArn = &v - return s -} - -// SetFromRelationalDatabaseBlueprintId sets the FromRelationalDatabaseBlueprintId field's value. -func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseBlueprintId(v string) *RelationalDatabaseSnapshot { - s.FromRelationalDatabaseBlueprintId = &v - return s -} - -// SetFromRelationalDatabaseBundleId sets the FromRelationalDatabaseBundleId field's value. -func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseBundleId(v string) *RelationalDatabaseSnapshot { - s.FromRelationalDatabaseBundleId = &v - return s -} - -// SetFromRelationalDatabaseName sets the FromRelationalDatabaseName field's value. -func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseName(v string) *RelationalDatabaseSnapshot { - s.FromRelationalDatabaseName = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *RelationalDatabaseSnapshot) SetLocation(v *ResourceLocation) *RelationalDatabaseSnapshot { - s.Location = v - return s -} - -// SetName sets the Name field's value. -func (s *RelationalDatabaseSnapshot) SetName(v string) *RelationalDatabaseSnapshot { - s.Name = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *RelationalDatabaseSnapshot) SetResourceType(v string) *RelationalDatabaseSnapshot { - s.ResourceType = &v - return s -} - -// SetSizeInGb sets the SizeInGb field's value. -func (s *RelationalDatabaseSnapshot) SetSizeInGb(v int64) *RelationalDatabaseSnapshot { - s.SizeInGb = &v - return s -} - -// SetState sets the State field's value. -func (s *RelationalDatabaseSnapshot) SetState(v string) *RelationalDatabaseSnapshot { - s.State = &v - return s -} - -// SetSupportCode sets the SupportCode field's value. -func (s *RelationalDatabaseSnapshot) SetSupportCode(v string) *RelationalDatabaseSnapshot { - s.SupportCode = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RelationalDatabaseSnapshot) SetTags(v []*Tag) *RelationalDatabaseSnapshot { - s.Tags = v - return s -} - -type ReleaseStaticIpInput struct { - _ struct{} `type:"structure"` - - // The name of the static IP to delete. - // - // StaticIpName is a required field - StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` -} - -// String returns the string representation -func (s ReleaseStaticIpInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReleaseStaticIpInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReleaseStaticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReleaseStaticIpInput"} - if s.StaticIpName == nil { - invalidParams.Add(request.NewErrParamRequired("StaticIpName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStaticIpName sets the StaticIpName field's value. -func (s *ReleaseStaticIpInput) SetStaticIpName(v string) *ReleaseStaticIpInput { - s.StaticIpName = &v - return s -} - -type ReleaseStaticIpOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the request operation. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s ReleaseStaticIpOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReleaseStaticIpOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *ReleaseStaticIpOutput) SetOperations(v []*Operation) *ReleaseStaticIpOutput { - s.Operations = v - return s -} - -// Describes the resource location. -type ResourceLocation struct { - _ struct{} `type:"structure"` - - // The Availability Zone. Follows the format us-east-2a (case-sensitive). - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The AWS Region name. - RegionName *string `locationName:"regionName" type:"string" enum:"RegionName"` -} - -// String returns the string representation -func (s ResourceLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceLocation) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ResourceLocation) SetAvailabilityZone(v string) *ResourceLocation { - s.AvailabilityZone = &v - return s -} - -// SetRegionName sets the RegionName field's value. -func (s *ResourceLocation) SetRegionName(v string) *ResourceLocation { - s.RegionName = &v - return s -} - -type StartInstanceInput struct { - _ struct{} `type:"structure"` - - // The name of the instance (a virtual private server) to start. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartInstanceInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *StartInstanceInput) SetInstanceName(v string) *StartInstanceInput { - s.InstanceName = &v - return s -} - -type StartInstanceOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the request operation. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s StartInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartInstanceOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *StartInstanceOutput) SetOperations(v []*Operation) *StartInstanceOutput { - s.Operations = v - return s -} - -type StartRelationalDatabaseInput struct { - _ struct{} `type:"structure"` - - // The name of your database to start. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartRelationalDatabaseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartRelationalDatabaseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartRelationalDatabaseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartRelationalDatabaseInput"} - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *StartRelationalDatabaseInput) SetRelationalDatabaseName(v string) *StartRelationalDatabaseInput { - s.RelationalDatabaseName = &v - return s -} - -type StartRelationalDatabaseOutput struct { - _ struct{} `type:"structure"` - - // An object describing the result of your start relational database request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s StartRelationalDatabaseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartRelationalDatabaseOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *StartRelationalDatabaseOutput) SetOperations(v []*Operation) *StartRelationalDatabaseOutput { - s.Operations = v - return s -} - -// Describes the static IP. -type StaticIp struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the static IP (e.g., arn:aws:lightsail:us-east-2:123456789101:StaticIp/9cbb4a9e-f8e3-4dfe-b57e-12345EXAMPLE). - Arn *string `locationName:"arn" type:"string"` - - // The instance where the static IP is attached (e.g., Amazon_Linux-1GB-Ohio-1). - AttachedTo *string `locationName:"attachedTo" type:"string"` - - // The timestamp when the static IP was created (e.g., 1479735304.222). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The static IP address. - IpAddress *string `locationName:"ipAddress" type:"string"` - - // A Boolean value indicating whether the static IP is attached. - IsAttached *bool `locationName:"isAttached" type:"boolean"` - - // The region and Availability Zone where the static IP was created. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The name of the static IP (e.g., StaticIP-Ohio-EXAMPLE). - Name *string `locationName:"name" type:"string"` - - // The resource type (usually StaticIp). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` -} - -// String returns the string representation -func (s StaticIp) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StaticIp) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *StaticIp) SetArn(v string) *StaticIp { - s.Arn = &v - return s -} - -// SetAttachedTo sets the AttachedTo field's value. -func (s *StaticIp) SetAttachedTo(v string) *StaticIp { - s.AttachedTo = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *StaticIp) SetCreatedAt(v time.Time) *StaticIp { - s.CreatedAt = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *StaticIp) SetIpAddress(v string) *StaticIp { - s.IpAddress = &v - return s -} - -// SetIsAttached sets the IsAttached field's value. -func (s *StaticIp) SetIsAttached(v bool) *StaticIp { - s.IsAttached = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *StaticIp) SetLocation(v *ResourceLocation) *StaticIp { - s.Location = v - return s -} - -// SetName sets the Name field's value. -func (s *StaticIp) SetName(v string) *StaticIp { - s.Name = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *StaticIp) SetResourceType(v string) *StaticIp { - s.ResourceType = &v - return s -} - -// SetSupportCode sets the SupportCode field's value. -func (s *StaticIp) SetSupportCode(v string) *StaticIp { - s.SupportCode = &v - return s -} - -type StopInstanceInput struct { - _ struct{} `type:"structure"` - - // When set to True, forces a Lightsail instance that is stuck in a stopping - // state to stop. - // - // Only use the force parameter if your instance is stuck in the stopping state. - // In any other state, your instance should stop normally without adding this - // parameter to your API request. - Force *bool `locationName:"force" type:"boolean"` - - // The name of the instance (a virtual private server) to stop. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopInstanceInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForce sets the Force field's value. -func (s *StopInstanceInput) SetForce(v bool) *StopInstanceInput { - s.Force = &v - return s -} - -// SetInstanceName sets the InstanceName field's value. -func (s *StopInstanceInput) SetInstanceName(v string) *StopInstanceInput { - s.InstanceName = &v - return s -} - -type StopInstanceOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the request operation. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s StopInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopInstanceOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *StopInstanceOutput) SetOperations(v []*Operation) *StopInstanceOutput { - s.Operations = v - return s -} - -type StopRelationalDatabaseInput struct { - _ struct{} `type:"structure"` - - // The name of your database to stop. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` - - // The name of your new database snapshot to be created before stopping your - // database. - RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string"` -} - -// String returns the string representation -func (s StopRelationalDatabaseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopRelationalDatabaseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopRelationalDatabaseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopRelationalDatabaseInput"} - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *StopRelationalDatabaseInput) SetRelationalDatabaseName(v string) *StopRelationalDatabaseInput { - s.RelationalDatabaseName = &v - return s -} - -// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. -func (s *StopRelationalDatabaseInput) SetRelationalDatabaseSnapshotName(v string) *StopRelationalDatabaseInput { - s.RelationalDatabaseSnapshotName = &v - return s -} - -type StopRelationalDatabaseOutput struct { - _ struct{} `type:"structure"` - - // An object describing the result of your stop relational database request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s StopRelationalDatabaseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopRelationalDatabaseOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *StopRelationalDatabaseOutput) SetOperations(v []*Operation) *StopRelationalDatabaseOutput { - s.Operations = v - return s -} - -// Describes a tag key and optional value assigned to an Amazon Lightsail resource. -// -// For more information about tags in Lightsail, see the Lightsail Dev Guide -// (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). -type Tag struct { - _ struct{} `type:"structure"` - - // The key of the tag. - // - // Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in - // UTF-8, or the following characters: + - = . _ : / @ - Key *string `locationName:"key" type:"string"` - - // The value of the tag. - // - // Constraints: Tag values accept a maximum of 256 letters, numbers, spaces - // in UTF-8, or the following characters: + - = . _ : / @ - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The name of the resource to which you are adding tags. - // - // ResourceName is a required field - ResourceName *string `locationName:"resourceName" type:"string" required:"true"` - - // The tag key and optional value. - // - // Tags is a required field - Tags []*Tag `locationName:"tags" type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *TagResourceInput) SetResourceName(v string) *TagResourceInput { - s.ResourceName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` - - // A list of objects describing the API operation. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// 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() -} - -// SetOperations sets the Operations field's value. -func (s *TagResourceOutput) SetOperations(v []*Operation) *TagResourceOutput { - s.Operations = v - return s -} - -type UnpeerVpcInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UnpeerVpcInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnpeerVpcInput) GoString() string { - return s.String() -} - -type UnpeerVpcOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the request operation. - Operation *Operation `locationName:"operation" type:"structure"` -} - -// String returns the string representation -func (s UnpeerVpcOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnpeerVpcOutput) GoString() string { - return s.String() -} - -// SetOperation sets the Operation field's value. -func (s *UnpeerVpcOutput) SetOperation(v *Operation) *UnpeerVpcOutput { - s.Operation = v - return s -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The name of the resource from which you are removing a tag. - // - // ResourceName is a required field - ResourceName *string `locationName:"resourceName" type:"string" required:"true"` - - // The tag keys to delete from the specified resource. - // - // TagKeys is a required field - TagKeys []*string `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.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *UntagResourceInput) SetResourceName(v string) *UntagResourceInput { - s.ResourceName = &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"` - - // A list of objects describing the API operation. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// 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() -} - -// SetOperations sets the Operations field's value. -func (s *UntagResourceOutput) SetOperations(v []*Operation) *UntagResourceOutput { - s.Operations = v - return s -} - -type UpdateDomainEntryInput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the domain entry. - // - // DomainEntry is a required field - DomainEntry *DomainEntry `locationName:"domainEntry" type:"structure" required:"true"` - - // The name of the domain recordset to update. - // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateDomainEntryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDomainEntryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDomainEntryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDomainEntryInput"} - if s.DomainEntry == nil { - invalidParams.Add(request.NewErrParamRequired("DomainEntry")) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainEntry sets the DomainEntry field's value. -func (s *UpdateDomainEntryInput) SetDomainEntry(v *DomainEntry) *UpdateDomainEntryInput { - s.DomainEntry = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *UpdateDomainEntryInput) SetDomainName(v string) *UpdateDomainEntryInput { - s.DomainName = &v - return s -} - -type UpdateDomainEntryOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the request operation. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s UpdateDomainEntryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDomainEntryOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *UpdateDomainEntryOutput) SetOperations(v []*Operation) *UpdateDomainEntryOutput { - s.Operations = v - return s -} - -type UpdateLoadBalancerAttributeInput struct { - _ struct{} `type:"structure"` - - // The name of the attribute you want to update. Valid values are below. - // - // AttributeName is a required field - AttributeName *string `locationName:"attributeName" type:"string" required:"true" enum:"LoadBalancerAttributeName"` - - // The value that you want to specify for the attribute name. - // - // AttributeValue is a required field - AttributeValue *string `locationName:"attributeValue" min:"1" type:"string" required:"true"` - - // The name of the load balancer that you want to modify (e.g., my-load-balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateLoadBalancerAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateLoadBalancerAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateLoadBalancerAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateLoadBalancerAttributeInput"} - if s.AttributeName == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeName")) - } - if s.AttributeValue == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeValue")) - } - if s.AttributeValue != nil && len(*s.AttributeValue) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AttributeValue", 1)) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeName sets the AttributeName field's value. -func (s *UpdateLoadBalancerAttributeInput) SetAttributeName(v string) *UpdateLoadBalancerAttributeInput { - s.AttributeName = &v - return s -} - -// SetAttributeValue sets the AttributeValue field's value. -func (s *UpdateLoadBalancerAttributeInput) SetAttributeValue(v string) *UpdateLoadBalancerAttributeInput { - s.AttributeValue = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *UpdateLoadBalancerAttributeInput) SetLoadBalancerName(v string) *UpdateLoadBalancerAttributeInput { - s.LoadBalancerName = &v - return s -} - -type UpdateLoadBalancerAttributeOutput struct { - _ struct{} `type:"structure"` - - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s UpdateLoadBalancerAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateLoadBalancerAttributeOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *UpdateLoadBalancerAttributeOutput) SetOperations(v []*Operation) *UpdateLoadBalancerAttributeOutput { - s.Operations = v - return s -} - -type UpdateRelationalDatabaseInput struct { - _ struct{} `type:"structure"` - - // When true, applies changes immediately. When false, applies changes during - // the preferred maintenance window. Some changes may cause an outage. - // - // Default: false - ApplyImmediately *bool `locationName:"applyImmediately" type:"boolean"` - - // When true, disables automated backup retention for your database. - // - // Disabling backup retention deletes all automated database backups. Before - // disabling this, you may want to create a snapshot of your database using - // the create relational database snapshot operation. - // - // Updates are applied during the next maintenance window because this can result - // in an outage. - DisableBackupRetention *bool `locationName:"disableBackupRetention" type:"boolean"` - - // When true, enables automated backup retention for your database. - // - // Updates are applied during the next maintenance window because this can result - // in an outage. - EnableBackupRetention *bool `locationName:"enableBackupRetention" type:"boolean"` - - // The password for the master user of your database. The password can include - // any printable ASCII character except "/", """, or "@". - // - // Constraints: Must contain 8 to 41 characters. - MasterUserPassword *string `locationName:"masterUserPassword" type:"string" sensitive:"true"` - - // The daily time range during which automated backups are created for your - // database if automated backups are enabled. - // - // Constraints: - // - // * Must be in the hh24:mi-hh24:mi format. - // - // Example: 16:00-16:30 - // - // * Specified in Universal Coordinated Time (UTC). - // - // * Must not conflict with the preferred maintenance window. - // - // * Must be at least 30 minutes. - PreferredBackupWindow *string `locationName:"preferredBackupWindow" type:"string"` - - // The weekly time range during which system maintenance can occur on your database. - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region, occurring on a random day of the week. - // - // Constraints: - // - // * Must be in the ddd:hh24:mi-ddd:hh24:mi format. - // - // * Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. - // - // * Must be at least 30 minutes. - // - // * Specified in Universal Coordinated Time (UTC). - // - // * Example: Tue:17:00-Tue:17:30 - PreferredMaintenanceWindow *string `locationName:"preferredMaintenanceWindow" type:"string"` - - // Specifies the accessibility options for your database. A value of true specifies - // a database that is available to resources outside of your Lightsail account. - // A value of false specifies a database that is available only to your Lightsail - // resources in the same region as your database. - PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` - - // The name of your database to update. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` - - // When true, the master user password is changed to a new strong password generated - // by Lightsail. - // - // Use the get relational database master user password operation to get the - // new password. - RotateMasterUserPassword *bool `locationName:"rotateMasterUserPassword" type:"boolean"` -} - -// String returns the string representation -func (s UpdateRelationalDatabaseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRelationalDatabaseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRelationalDatabaseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRelationalDatabaseInput"} - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *UpdateRelationalDatabaseInput) SetApplyImmediately(v bool) *UpdateRelationalDatabaseInput { - s.ApplyImmediately = &v - return s -} - -// SetDisableBackupRetention sets the DisableBackupRetention field's value. -func (s *UpdateRelationalDatabaseInput) SetDisableBackupRetention(v bool) *UpdateRelationalDatabaseInput { - s.DisableBackupRetention = &v - return s -} - -// SetEnableBackupRetention sets the EnableBackupRetention field's value. -func (s *UpdateRelationalDatabaseInput) SetEnableBackupRetention(v bool) *UpdateRelationalDatabaseInput { - s.EnableBackupRetention = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *UpdateRelationalDatabaseInput) SetMasterUserPassword(v string) *UpdateRelationalDatabaseInput { - s.MasterUserPassword = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *UpdateRelationalDatabaseInput) SetPreferredBackupWindow(v string) *UpdateRelationalDatabaseInput { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *UpdateRelationalDatabaseInput) SetPreferredMaintenanceWindow(v string) *UpdateRelationalDatabaseInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *UpdateRelationalDatabaseInput) SetPubliclyAccessible(v bool) *UpdateRelationalDatabaseInput { - s.PubliclyAccessible = &v - return s -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *UpdateRelationalDatabaseInput) SetRelationalDatabaseName(v string) *UpdateRelationalDatabaseInput { - s.RelationalDatabaseName = &v - return s -} - -// SetRotateMasterUserPassword sets the RotateMasterUserPassword field's value. -func (s *UpdateRelationalDatabaseInput) SetRotateMasterUserPassword(v bool) *UpdateRelationalDatabaseInput { - s.RotateMasterUserPassword = &v - return s -} - -type UpdateRelationalDatabaseOutput struct { - _ struct{} `type:"structure"` - - // An object describing the result of your update relational database request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s UpdateRelationalDatabaseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRelationalDatabaseOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *UpdateRelationalDatabaseOutput) SetOperations(v []*Operation) *UpdateRelationalDatabaseOutput { - s.Operations = v - return s -} - -type UpdateRelationalDatabaseParametersInput struct { - _ struct{} `type:"structure"` - - // The database parameters to update. - // - // Parameters is a required field - Parameters []*RelationalDatabaseParameter `locationName:"parameters" type:"list" required:"true"` - - // The name of your database for which to update parameters. - // - // RelationalDatabaseName is a required field - RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateRelationalDatabaseParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRelationalDatabaseParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRelationalDatabaseParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRelationalDatabaseParametersInput"} - if s.Parameters == nil { - invalidParams.Add(request.NewErrParamRequired("Parameters")) - } - if s.RelationalDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParameters sets the Parameters field's value. -func (s *UpdateRelationalDatabaseParametersInput) SetParameters(v []*RelationalDatabaseParameter) *UpdateRelationalDatabaseParametersInput { - s.Parameters = v - return s -} - -// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. -func (s *UpdateRelationalDatabaseParametersInput) SetRelationalDatabaseName(v string) *UpdateRelationalDatabaseParametersInput { - s.RelationalDatabaseName = &v - return s -} - -type UpdateRelationalDatabaseParametersOutput struct { - _ struct{} `type:"structure"` - - // An object describing the result of your update relational database parameters - // request. - Operations []*Operation `locationName:"operations" type:"list"` -} - -// String returns the string representation -func (s UpdateRelationalDatabaseParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRelationalDatabaseParametersOutput) GoString() string { - return s.String() -} - -// SetOperations sets the Operations field's value. -func (s *UpdateRelationalDatabaseParametersOutput) SetOperations(v []*Operation) *UpdateRelationalDatabaseParametersOutput { - s.Operations = v - return s -} - -const ( - // AccessDirectionInbound is a AccessDirection enum value - AccessDirectionInbound = "inbound" - - // AccessDirectionOutbound is a AccessDirection enum value - AccessDirectionOutbound = "outbound" -) - -const ( - // BlueprintTypeOs is a BlueprintType enum value - BlueprintTypeOs = "os" - - // BlueprintTypeApp is a BlueprintType enum value - BlueprintTypeApp = "app" -) - -const ( - // CloudFormationStackRecordSourceTypeExportSnapshotRecord is a CloudFormationStackRecordSourceType enum value - CloudFormationStackRecordSourceTypeExportSnapshotRecord = "ExportSnapshotRecord" -) - -const ( - // DiskSnapshotStatePending is a DiskSnapshotState enum value - DiskSnapshotStatePending = "pending" - - // DiskSnapshotStateCompleted is a DiskSnapshotState enum value - DiskSnapshotStateCompleted = "completed" - - // DiskSnapshotStateError is a DiskSnapshotState enum value - DiskSnapshotStateError = "error" - - // DiskSnapshotStateUnknown is a DiskSnapshotState enum value - DiskSnapshotStateUnknown = "unknown" -) - -const ( - // DiskStatePending is a DiskState enum value - DiskStatePending = "pending" - - // DiskStateError is a DiskState enum value - DiskStateError = "error" - - // DiskStateAvailable is a DiskState enum value - DiskStateAvailable = "available" - - // DiskStateInUse is a DiskState enum value - DiskStateInUse = "in-use" - - // DiskStateUnknown is a DiskState enum value - DiskStateUnknown = "unknown" -) - -const ( - // ExportSnapshotRecordSourceTypeInstanceSnapshot is a ExportSnapshotRecordSourceType enum value - ExportSnapshotRecordSourceTypeInstanceSnapshot = "InstanceSnapshot" - - // ExportSnapshotRecordSourceTypeDiskSnapshot is a ExportSnapshotRecordSourceType enum value - ExportSnapshotRecordSourceTypeDiskSnapshot = "DiskSnapshot" -) - -const ( - // InstanceAccessProtocolSsh is a InstanceAccessProtocol enum value - InstanceAccessProtocolSsh = "ssh" - - // InstanceAccessProtocolRdp is a InstanceAccessProtocol enum value - InstanceAccessProtocolRdp = "rdp" -) - -const ( - // InstanceHealthReasonLbRegistrationInProgress is a InstanceHealthReason enum value - InstanceHealthReasonLbRegistrationInProgress = "Lb.RegistrationInProgress" - - // InstanceHealthReasonLbInitialHealthChecking is a InstanceHealthReason enum value - InstanceHealthReasonLbInitialHealthChecking = "Lb.InitialHealthChecking" - - // InstanceHealthReasonLbInternalError is a InstanceHealthReason enum value - InstanceHealthReasonLbInternalError = "Lb.InternalError" - - // InstanceHealthReasonInstanceResponseCodeMismatch is a InstanceHealthReason enum value - InstanceHealthReasonInstanceResponseCodeMismatch = "Instance.ResponseCodeMismatch" - - // InstanceHealthReasonInstanceTimeout is a InstanceHealthReason enum value - InstanceHealthReasonInstanceTimeout = "Instance.Timeout" - - // InstanceHealthReasonInstanceFailedHealthChecks is a InstanceHealthReason enum value - InstanceHealthReasonInstanceFailedHealthChecks = "Instance.FailedHealthChecks" - - // InstanceHealthReasonInstanceNotRegistered is a InstanceHealthReason enum value - InstanceHealthReasonInstanceNotRegistered = "Instance.NotRegistered" - - // InstanceHealthReasonInstanceNotInUse is a InstanceHealthReason enum value - InstanceHealthReasonInstanceNotInUse = "Instance.NotInUse" - - // InstanceHealthReasonInstanceDeregistrationInProgress is a InstanceHealthReason enum value - InstanceHealthReasonInstanceDeregistrationInProgress = "Instance.DeregistrationInProgress" - - // InstanceHealthReasonInstanceInvalidState is a InstanceHealthReason enum value - InstanceHealthReasonInstanceInvalidState = "Instance.InvalidState" - - // InstanceHealthReasonInstanceIpUnusable is a InstanceHealthReason enum value - InstanceHealthReasonInstanceIpUnusable = "Instance.IpUnusable" -) - -const ( - // InstanceHealthStateInitial is a InstanceHealthState enum value - InstanceHealthStateInitial = "initial" - - // InstanceHealthStateHealthy is a InstanceHealthState enum value - InstanceHealthStateHealthy = "healthy" - - // InstanceHealthStateUnhealthy is a InstanceHealthState enum value - InstanceHealthStateUnhealthy = "unhealthy" - - // InstanceHealthStateUnused is a InstanceHealthState enum value - InstanceHealthStateUnused = "unused" - - // InstanceHealthStateDraining is a InstanceHealthState enum value - InstanceHealthStateDraining = "draining" - - // InstanceHealthStateUnavailable is a InstanceHealthState enum value - InstanceHealthStateUnavailable = "unavailable" -) - -const ( - // InstanceMetricNameCpuutilization is a InstanceMetricName enum value - InstanceMetricNameCpuutilization = "CPUUtilization" - - // InstanceMetricNameNetworkIn is a InstanceMetricName enum value - InstanceMetricNameNetworkIn = "NetworkIn" - - // InstanceMetricNameNetworkOut is a InstanceMetricName enum value - InstanceMetricNameNetworkOut = "NetworkOut" - - // InstanceMetricNameStatusCheckFailed is a InstanceMetricName enum value - InstanceMetricNameStatusCheckFailed = "StatusCheckFailed" - - // InstanceMetricNameStatusCheckFailedInstance is a InstanceMetricName enum value - InstanceMetricNameStatusCheckFailedInstance = "StatusCheckFailed_Instance" - - // InstanceMetricNameStatusCheckFailedSystem is a InstanceMetricName enum value - InstanceMetricNameStatusCheckFailedSystem = "StatusCheckFailed_System" -) - -const ( - // InstancePlatformLinuxUnix is a InstancePlatform enum value - InstancePlatformLinuxUnix = "LINUX_UNIX" - - // InstancePlatformWindows is a InstancePlatform enum value - InstancePlatformWindows = "WINDOWS" -) - -const ( - // InstanceSnapshotStatePending is a InstanceSnapshotState enum value - InstanceSnapshotStatePending = "pending" - - // InstanceSnapshotStateError is a InstanceSnapshotState enum value - InstanceSnapshotStateError = "error" - - // InstanceSnapshotStateAvailable is a InstanceSnapshotState enum value - InstanceSnapshotStateAvailable = "available" -) - -const ( - // LoadBalancerAttributeNameHealthCheckPath is a LoadBalancerAttributeName enum value - LoadBalancerAttributeNameHealthCheckPath = "HealthCheckPath" - - // LoadBalancerAttributeNameSessionStickinessEnabled is a LoadBalancerAttributeName enum value - LoadBalancerAttributeNameSessionStickinessEnabled = "SessionStickinessEnabled" - - // LoadBalancerAttributeNameSessionStickinessLbCookieDurationSeconds is a LoadBalancerAttributeName enum value - LoadBalancerAttributeNameSessionStickinessLbCookieDurationSeconds = "SessionStickiness_LB_CookieDurationSeconds" -) - -const ( - // LoadBalancerMetricNameClientTlsnegotiationErrorCount is a LoadBalancerMetricName enum value - LoadBalancerMetricNameClientTlsnegotiationErrorCount = "ClientTLSNegotiationErrorCount" - - // LoadBalancerMetricNameHealthyHostCount is a LoadBalancerMetricName enum value - LoadBalancerMetricNameHealthyHostCount = "HealthyHostCount" - - // LoadBalancerMetricNameUnhealthyHostCount is a LoadBalancerMetricName enum value - LoadBalancerMetricNameUnhealthyHostCount = "UnhealthyHostCount" - - // LoadBalancerMetricNameHttpcodeLb4xxCount is a LoadBalancerMetricName enum value - LoadBalancerMetricNameHttpcodeLb4xxCount = "HTTPCode_LB_4XX_Count" - - // LoadBalancerMetricNameHttpcodeLb5xxCount is a LoadBalancerMetricName enum value - LoadBalancerMetricNameHttpcodeLb5xxCount = "HTTPCode_LB_5XX_Count" - - // LoadBalancerMetricNameHttpcodeInstance2xxCount is a LoadBalancerMetricName enum value - LoadBalancerMetricNameHttpcodeInstance2xxCount = "HTTPCode_Instance_2XX_Count" - - // LoadBalancerMetricNameHttpcodeInstance3xxCount is a LoadBalancerMetricName enum value - LoadBalancerMetricNameHttpcodeInstance3xxCount = "HTTPCode_Instance_3XX_Count" - - // LoadBalancerMetricNameHttpcodeInstance4xxCount is a LoadBalancerMetricName enum value - LoadBalancerMetricNameHttpcodeInstance4xxCount = "HTTPCode_Instance_4XX_Count" - - // LoadBalancerMetricNameHttpcodeInstance5xxCount is a LoadBalancerMetricName enum value - LoadBalancerMetricNameHttpcodeInstance5xxCount = "HTTPCode_Instance_5XX_Count" - - // LoadBalancerMetricNameInstanceResponseTime is a LoadBalancerMetricName enum value - LoadBalancerMetricNameInstanceResponseTime = "InstanceResponseTime" - - // LoadBalancerMetricNameRejectedConnectionCount is a LoadBalancerMetricName enum value - LoadBalancerMetricNameRejectedConnectionCount = "RejectedConnectionCount" - - // LoadBalancerMetricNameRequestCount is a LoadBalancerMetricName enum value - LoadBalancerMetricNameRequestCount = "RequestCount" -) - -const ( - // LoadBalancerProtocolHttpHttps is a LoadBalancerProtocol enum value - LoadBalancerProtocolHttpHttps = "HTTP_HTTPS" - - // LoadBalancerProtocolHttp is a LoadBalancerProtocol enum value - LoadBalancerProtocolHttp = "HTTP" -) - -const ( - // LoadBalancerStateActive is a LoadBalancerState enum value - LoadBalancerStateActive = "active" - - // LoadBalancerStateProvisioning is a LoadBalancerState enum value - LoadBalancerStateProvisioning = "provisioning" - - // LoadBalancerStateActiveImpaired is a LoadBalancerState enum value - LoadBalancerStateActiveImpaired = "active_impaired" - - // LoadBalancerStateFailed is a LoadBalancerState enum value - LoadBalancerStateFailed = "failed" - - // LoadBalancerStateUnknown is a LoadBalancerState enum value - LoadBalancerStateUnknown = "unknown" -) - -const ( - // LoadBalancerTlsCertificateDomainStatusPendingValidation is a LoadBalancerTlsCertificateDomainStatus enum value - LoadBalancerTlsCertificateDomainStatusPendingValidation = "PENDING_VALIDATION" - - // LoadBalancerTlsCertificateDomainStatusFailed is a LoadBalancerTlsCertificateDomainStatus enum value - LoadBalancerTlsCertificateDomainStatusFailed = "FAILED" - - // LoadBalancerTlsCertificateDomainStatusSuccess is a LoadBalancerTlsCertificateDomainStatus enum value - LoadBalancerTlsCertificateDomainStatusSuccess = "SUCCESS" -) - -const ( - // LoadBalancerTlsCertificateFailureReasonNoAvailableContacts is a LoadBalancerTlsCertificateFailureReason enum value - LoadBalancerTlsCertificateFailureReasonNoAvailableContacts = "NO_AVAILABLE_CONTACTS" - - // LoadBalancerTlsCertificateFailureReasonAdditionalVerificationRequired is a LoadBalancerTlsCertificateFailureReason enum value - LoadBalancerTlsCertificateFailureReasonAdditionalVerificationRequired = "ADDITIONAL_VERIFICATION_REQUIRED" - - // LoadBalancerTlsCertificateFailureReasonDomainNotAllowed is a LoadBalancerTlsCertificateFailureReason enum value - LoadBalancerTlsCertificateFailureReasonDomainNotAllowed = "DOMAIN_NOT_ALLOWED" - - // LoadBalancerTlsCertificateFailureReasonInvalidPublicDomain is a LoadBalancerTlsCertificateFailureReason enum value - LoadBalancerTlsCertificateFailureReasonInvalidPublicDomain = "INVALID_PUBLIC_DOMAIN" - - // LoadBalancerTlsCertificateFailureReasonOther is a LoadBalancerTlsCertificateFailureReason enum value - LoadBalancerTlsCertificateFailureReasonOther = "OTHER" -) - -const ( - // LoadBalancerTlsCertificateRenewalStatusPendingAutoRenewal is a LoadBalancerTlsCertificateRenewalStatus enum value - LoadBalancerTlsCertificateRenewalStatusPendingAutoRenewal = "PENDING_AUTO_RENEWAL" - - // LoadBalancerTlsCertificateRenewalStatusPendingValidation is a LoadBalancerTlsCertificateRenewalStatus enum value - LoadBalancerTlsCertificateRenewalStatusPendingValidation = "PENDING_VALIDATION" - - // LoadBalancerTlsCertificateRenewalStatusSuccess is a LoadBalancerTlsCertificateRenewalStatus enum value - LoadBalancerTlsCertificateRenewalStatusSuccess = "SUCCESS" - - // LoadBalancerTlsCertificateRenewalStatusFailed is a LoadBalancerTlsCertificateRenewalStatus enum value - LoadBalancerTlsCertificateRenewalStatusFailed = "FAILED" -) - -const ( - // LoadBalancerTlsCertificateRevocationReasonUnspecified is a LoadBalancerTlsCertificateRevocationReason enum value - LoadBalancerTlsCertificateRevocationReasonUnspecified = "UNSPECIFIED" - - // LoadBalancerTlsCertificateRevocationReasonKeyCompromise is a LoadBalancerTlsCertificateRevocationReason enum value - LoadBalancerTlsCertificateRevocationReasonKeyCompromise = "KEY_COMPROMISE" - - // LoadBalancerTlsCertificateRevocationReasonCaCompromise is a LoadBalancerTlsCertificateRevocationReason enum value - LoadBalancerTlsCertificateRevocationReasonCaCompromise = "CA_COMPROMISE" - - // LoadBalancerTlsCertificateRevocationReasonAffiliationChanged is a LoadBalancerTlsCertificateRevocationReason enum value - LoadBalancerTlsCertificateRevocationReasonAffiliationChanged = "AFFILIATION_CHANGED" - - // LoadBalancerTlsCertificateRevocationReasonSuperceded is a LoadBalancerTlsCertificateRevocationReason enum value - LoadBalancerTlsCertificateRevocationReasonSuperceded = "SUPERCEDED" - - // LoadBalancerTlsCertificateRevocationReasonCessationOfOperation is a LoadBalancerTlsCertificateRevocationReason enum value - LoadBalancerTlsCertificateRevocationReasonCessationOfOperation = "CESSATION_OF_OPERATION" - - // LoadBalancerTlsCertificateRevocationReasonCertificateHold is a LoadBalancerTlsCertificateRevocationReason enum value - LoadBalancerTlsCertificateRevocationReasonCertificateHold = "CERTIFICATE_HOLD" - - // LoadBalancerTlsCertificateRevocationReasonRemoveFromCrl is a LoadBalancerTlsCertificateRevocationReason enum value - LoadBalancerTlsCertificateRevocationReasonRemoveFromCrl = "REMOVE_FROM_CRL" - - // LoadBalancerTlsCertificateRevocationReasonPrivilegeWithdrawn is a LoadBalancerTlsCertificateRevocationReason enum value - LoadBalancerTlsCertificateRevocationReasonPrivilegeWithdrawn = "PRIVILEGE_WITHDRAWN" - - // LoadBalancerTlsCertificateRevocationReasonAACompromise is a LoadBalancerTlsCertificateRevocationReason enum value - LoadBalancerTlsCertificateRevocationReasonAACompromise = "A_A_COMPROMISE" -) - -const ( - // LoadBalancerTlsCertificateStatusPendingValidation is a LoadBalancerTlsCertificateStatus enum value - LoadBalancerTlsCertificateStatusPendingValidation = "PENDING_VALIDATION" - - // LoadBalancerTlsCertificateStatusIssued is a LoadBalancerTlsCertificateStatus enum value - LoadBalancerTlsCertificateStatusIssued = "ISSUED" - - // LoadBalancerTlsCertificateStatusInactive is a LoadBalancerTlsCertificateStatus enum value - LoadBalancerTlsCertificateStatusInactive = "INACTIVE" - - // LoadBalancerTlsCertificateStatusExpired is a LoadBalancerTlsCertificateStatus enum value - LoadBalancerTlsCertificateStatusExpired = "EXPIRED" - - // LoadBalancerTlsCertificateStatusValidationTimedOut is a LoadBalancerTlsCertificateStatus enum value - LoadBalancerTlsCertificateStatusValidationTimedOut = "VALIDATION_TIMED_OUT" - - // LoadBalancerTlsCertificateStatusRevoked is a LoadBalancerTlsCertificateStatus enum value - LoadBalancerTlsCertificateStatusRevoked = "REVOKED" - - // LoadBalancerTlsCertificateStatusFailed is a LoadBalancerTlsCertificateStatus enum value - LoadBalancerTlsCertificateStatusFailed = "FAILED" - - // LoadBalancerTlsCertificateStatusUnknown is a LoadBalancerTlsCertificateStatus enum value - LoadBalancerTlsCertificateStatusUnknown = "UNKNOWN" -) - -const ( - // MetricStatisticMinimum is a MetricStatistic enum value - MetricStatisticMinimum = "Minimum" - - // MetricStatisticMaximum is a MetricStatistic enum value - MetricStatisticMaximum = "Maximum" - - // MetricStatisticSum is a MetricStatistic enum value - MetricStatisticSum = "Sum" - - // MetricStatisticAverage is a MetricStatistic enum value - MetricStatisticAverage = "Average" - - // MetricStatisticSampleCount is a MetricStatistic enum value - MetricStatisticSampleCount = "SampleCount" -) - -const ( - // MetricUnitSeconds is a MetricUnit enum value - MetricUnitSeconds = "Seconds" - - // MetricUnitMicroseconds is a MetricUnit enum value - MetricUnitMicroseconds = "Microseconds" - - // MetricUnitMilliseconds is a MetricUnit enum value - MetricUnitMilliseconds = "Milliseconds" - - // MetricUnitBytes is a MetricUnit enum value - MetricUnitBytes = "Bytes" - - // MetricUnitKilobytes is a MetricUnit enum value - MetricUnitKilobytes = "Kilobytes" - - // MetricUnitMegabytes is a MetricUnit enum value - MetricUnitMegabytes = "Megabytes" - - // MetricUnitGigabytes is a MetricUnit enum value - MetricUnitGigabytes = "Gigabytes" - - // MetricUnitTerabytes is a MetricUnit enum value - MetricUnitTerabytes = "Terabytes" - - // MetricUnitBits is a MetricUnit enum value - MetricUnitBits = "Bits" - - // MetricUnitKilobits is a MetricUnit enum value - MetricUnitKilobits = "Kilobits" - - // MetricUnitMegabits is a MetricUnit enum value - MetricUnitMegabits = "Megabits" - - // MetricUnitGigabits is a MetricUnit enum value - MetricUnitGigabits = "Gigabits" - - // MetricUnitTerabits is a MetricUnit enum value - MetricUnitTerabits = "Terabits" - - // MetricUnitPercent is a MetricUnit enum value - MetricUnitPercent = "Percent" - - // MetricUnitCount is a MetricUnit enum value - MetricUnitCount = "Count" - - // MetricUnitBytesSecond is a MetricUnit enum value - MetricUnitBytesSecond = "Bytes/Second" - - // MetricUnitKilobytesSecond is a MetricUnit enum value - MetricUnitKilobytesSecond = "Kilobytes/Second" - - // MetricUnitMegabytesSecond is a MetricUnit enum value - MetricUnitMegabytesSecond = "Megabytes/Second" - - // MetricUnitGigabytesSecond is a MetricUnit enum value - MetricUnitGigabytesSecond = "Gigabytes/Second" - - // MetricUnitTerabytesSecond is a MetricUnit enum value - MetricUnitTerabytesSecond = "Terabytes/Second" - - // MetricUnitBitsSecond is a MetricUnit enum value - MetricUnitBitsSecond = "Bits/Second" - - // MetricUnitKilobitsSecond is a MetricUnit enum value - MetricUnitKilobitsSecond = "Kilobits/Second" - - // MetricUnitMegabitsSecond is a MetricUnit enum value - MetricUnitMegabitsSecond = "Megabits/Second" - - // MetricUnitGigabitsSecond is a MetricUnit enum value - MetricUnitGigabitsSecond = "Gigabits/Second" - - // MetricUnitTerabitsSecond is a MetricUnit enum value - MetricUnitTerabitsSecond = "Terabits/Second" - - // MetricUnitCountSecond is a MetricUnit enum value - MetricUnitCountSecond = "Count/Second" - - // MetricUnitNone is a MetricUnit enum value - MetricUnitNone = "None" -) - -const ( - // NetworkProtocolTcp is a NetworkProtocol enum value - NetworkProtocolTcp = "tcp" - - // NetworkProtocolAll is a NetworkProtocol enum value - NetworkProtocolAll = "all" - - // NetworkProtocolUdp is a NetworkProtocol enum value - NetworkProtocolUdp = "udp" -) - -const ( - // OperationStatusNotStarted is a OperationStatus enum value - OperationStatusNotStarted = "NotStarted" - - // OperationStatusStarted is a OperationStatus enum value - OperationStatusStarted = "Started" - - // OperationStatusFailed is a OperationStatus enum value - OperationStatusFailed = "Failed" - - // OperationStatusCompleted is a OperationStatus enum value - OperationStatusCompleted = "Completed" - - // OperationStatusSucceeded is a OperationStatus enum value - OperationStatusSucceeded = "Succeeded" -) - -const ( - // OperationTypeDeleteInstance is a OperationType enum value - OperationTypeDeleteInstance = "DeleteInstance" - - // OperationTypeCreateInstance is a OperationType enum value - OperationTypeCreateInstance = "CreateInstance" - - // OperationTypeStopInstance is a OperationType enum value - OperationTypeStopInstance = "StopInstance" - - // OperationTypeStartInstance is a OperationType enum value - OperationTypeStartInstance = "StartInstance" - - // OperationTypeRebootInstance is a OperationType enum value - OperationTypeRebootInstance = "RebootInstance" - - // OperationTypeOpenInstancePublicPorts is a OperationType enum value - OperationTypeOpenInstancePublicPorts = "OpenInstancePublicPorts" - - // OperationTypePutInstancePublicPorts is a OperationType enum value - OperationTypePutInstancePublicPorts = "PutInstancePublicPorts" - - // OperationTypeCloseInstancePublicPorts is a OperationType enum value - OperationTypeCloseInstancePublicPorts = "CloseInstancePublicPorts" - - // OperationTypeAllocateStaticIp is a OperationType enum value - OperationTypeAllocateStaticIp = "AllocateStaticIp" - - // OperationTypeReleaseStaticIp is a OperationType enum value - OperationTypeReleaseStaticIp = "ReleaseStaticIp" - - // OperationTypeAttachStaticIp is a OperationType enum value - OperationTypeAttachStaticIp = "AttachStaticIp" - - // OperationTypeDetachStaticIp is a OperationType enum value - OperationTypeDetachStaticIp = "DetachStaticIp" - - // OperationTypeUpdateDomainEntry is a OperationType enum value - OperationTypeUpdateDomainEntry = "UpdateDomainEntry" - - // OperationTypeDeleteDomainEntry is a OperationType enum value - OperationTypeDeleteDomainEntry = "DeleteDomainEntry" - - // OperationTypeCreateDomain is a OperationType enum value - OperationTypeCreateDomain = "CreateDomain" - - // OperationTypeDeleteDomain is a OperationType enum value - OperationTypeDeleteDomain = "DeleteDomain" - - // OperationTypeCreateInstanceSnapshot is a OperationType enum value - OperationTypeCreateInstanceSnapshot = "CreateInstanceSnapshot" - - // OperationTypeDeleteInstanceSnapshot is a OperationType enum value - OperationTypeDeleteInstanceSnapshot = "DeleteInstanceSnapshot" - - // OperationTypeCreateInstancesFromSnapshot is a OperationType enum value - OperationTypeCreateInstancesFromSnapshot = "CreateInstancesFromSnapshot" - - // OperationTypeCreateLoadBalancer is a OperationType enum value - OperationTypeCreateLoadBalancer = "CreateLoadBalancer" - - // OperationTypeDeleteLoadBalancer is a OperationType enum value - OperationTypeDeleteLoadBalancer = "DeleteLoadBalancer" - - // OperationTypeAttachInstancesToLoadBalancer is a OperationType enum value - OperationTypeAttachInstancesToLoadBalancer = "AttachInstancesToLoadBalancer" - - // OperationTypeDetachInstancesFromLoadBalancer is a OperationType enum value - OperationTypeDetachInstancesFromLoadBalancer = "DetachInstancesFromLoadBalancer" - - // OperationTypeUpdateLoadBalancerAttribute is a OperationType enum value - OperationTypeUpdateLoadBalancerAttribute = "UpdateLoadBalancerAttribute" - - // OperationTypeCreateLoadBalancerTlsCertificate is a OperationType enum value - OperationTypeCreateLoadBalancerTlsCertificate = "CreateLoadBalancerTlsCertificate" - - // OperationTypeDeleteLoadBalancerTlsCertificate is a OperationType enum value - OperationTypeDeleteLoadBalancerTlsCertificate = "DeleteLoadBalancerTlsCertificate" - - // OperationTypeAttachLoadBalancerTlsCertificate is a OperationType enum value - OperationTypeAttachLoadBalancerTlsCertificate = "AttachLoadBalancerTlsCertificate" - - // OperationTypeCreateDisk is a OperationType enum value - OperationTypeCreateDisk = "CreateDisk" - - // OperationTypeDeleteDisk is a OperationType enum value - OperationTypeDeleteDisk = "DeleteDisk" - - // OperationTypeAttachDisk is a OperationType enum value - OperationTypeAttachDisk = "AttachDisk" - - // OperationTypeDetachDisk is a OperationType enum value - OperationTypeDetachDisk = "DetachDisk" - - // OperationTypeCreateDiskSnapshot is a OperationType enum value - OperationTypeCreateDiskSnapshot = "CreateDiskSnapshot" - - // OperationTypeDeleteDiskSnapshot is a OperationType enum value - OperationTypeDeleteDiskSnapshot = "DeleteDiskSnapshot" - - // OperationTypeCreateDiskFromSnapshot is a OperationType enum value - OperationTypeCreateDiskFromSnapshot = "CreateDiskFromSnapshot" - - // OperationTypeCreateRelationalDatabase is a OperationType enum value - OperationTypeCreateRelationalDatabase = "CreateRelationalDatabase" - - // OperationTypeUpdateRelationalDatabase is a OperationType enum value - OperationTypeUpdateRelationalDatabase = "UpdateRelationalDatabase" - - // OperationTypeDeleteRelationalDatabase is a OperationType enum value - OperationTypeDeleteRelationalDatabase = "DeleteRelationalDatabase" - - // OperationTypeCreateRelationalDatabaseFromSnapshot is a OperationType enum value - OperationTypeCreateRelationalDatabaseFromSnapshot = "CreateRelationalDatabaseFromSnapshot" - - // OperationTypeCreateRelationalDatabaseSnapshot is a OperationType enum value - OperationTypeCreateRelationalDatabaseSnapshot = "CreateRelationalDatabaseSnapshot" - - // OperationTypeDeleteRelationalDatabaseSnapshot is a OperationType enum value - OperationTypeDeleteRelationalDatabaseSnapshot = "DeleteRelationalDatabaseSnapshot" - - // OperationTypeUpdateRelationalDatabaseParameters is a OperationType enum value - OperationTypeUpdateRelationalDatabaseParameters = "UpdateRelationalDatabaseParameters" - - // OperationTypeStartRelationalDatabase is a OperationType enum value - OperationTypeStartRelationalDatabase = "StartRelationalDatabase" - - // OperationTypeRebootRelationalDatabase is a OperationType enum value - OperationTypeRebootRelationalDatabase = "RebootRelationalDatabase" - - // OperationTypeStopRelationalDatabase is a OperationType enum value - OperationTypeStopRelationalDatabase = "StopRelationalDatabase" -) - -const ( - // PortAccessTypePublic is a PortAccessType enum value - PortAccessTypePublic = "Public" - - // PortAccessTypePrivate is a PortAccessType enum value - PortAccessTypePrivate = "Private" -) - -const ( - // PortInfoSourceTypeDefault is a PortInfoSourceType enum value - PortInfoSourceTypeDefault = "DEFAULT" - - // PortInfoSourceTypeInstance is a PortInfoSourceType enum value - PortInfoSourceTypeInstance = "INSTANCE" - - // PortInfoSourceTypeNone is a PortInfoSourceType enum value - PortInfoSourceTypeNone = "NONE" - - // PortInfoSourceTypeClosed is a PortInfoSourceType enum value - PortInfoSourceTypeClosed = "CLOSED" -) - -const ( - // PortStateOpen is a PortState enum value - PortStateOpen = "open" - - // PortStateClosed is a PortState enum value - PortStateClosed = "closed" -) - -const ( - // RecordStateStarted is a RecordState enum value - RecordStateStarted = "Started" - - // RecordStateSucceeded is a RecordState enum value - RecordStateSucceeded = "Succeeded" - - // RecordStateFailed is a RecordState enum value - RecordStateFailed = "Failed" -) - -const ( - // RegionNameUsEast1 is a RegionName enum value - RegionNameUsEast1 = "us-east-1" - - // RegionNameUsEast2 is a RegionName enum value - RegionNameUsEast2 = "us-east-2" - - // RegionNameUsWest1 is a RegionName enum value - RegionNameUsWest1 = "us-west-1" - - // RegionNameUsWest2 is a RegionName enum value - RegionNameUsWest2 = "us-west-2" - - // RegionNameEuWest1 is a RegionName enum value - RegionNameEuWest1 = "eu-west-1" - - // RegionNameEuWest2 is a RegionName enum value - RegionNameEuWest2 = "eu-west-2" - - // RegionNameEuWest3 is a RegionName enum value - RegionNameEuWest3 = "eu-west-3" - - // RegionNameEuCentral1 is a RegionName enum value - RegionNameEuCentral1 = "eu-central-1" - - // RegionNameCaCentral1 is a RegionName enum value - RegionNameCaCentral1 = "ca-central-1" - - // RegionNameApSouth1 is a RegionName enum value - RegionNameApSouth1 = "ap-south-1" - - // RegionNameApSoutheast1 is a RegionName enum value - RegionNameApSoutheast1 = "ap-southeast-1" - - // RegionNameApSoutheast2 is a RegionName enum value - RegionNameApSoutheast2 = "ap-southeast-2" - - // RegionNameApNortheast1 is a RegionName enum value - RegionNameApNortheast1 = "ap-northeast-1" - - // RegionNameApNortheast2 is a RegionName enum value - RegionNameApNortheast2 = "ap-northeast-2" -) - -const ( - // RelationalDatabaseEngineMysql is a RelationalDatabaseEngine enum value - RelationalDatabaseEngineMysql = "mysql" -) - -const ( - // RelationalDatabaseMetricNameCpuutilization is a RelationalDatabaseMetricName enum value - RelationalDatabaseMetricNameCpuutilization = "CPUUtilization" - - // RelationalDatabaseMetricNameDatabaseConnections is a RelationalDatabaseMetricName enum value - RelationalDatabaseMetricNameDatabaseConnections = "DatabaseConnections" - - // RelationalDatabaseMetricNameDiskQueueDepth is a RelationalDatabaseMetricName enum value - RelationalDatabaseMetricNameDiskQueueDepth = "DiskQueueDepth" - - // RelationalDatabaseMetricNameFreeStorageSpace is a RelationalDatabaseMetricName enum value - RelationalDatabaseMetricNameFreeStorageSpace = "FreeStorageSpace" - - // RelationalDatabaseMetricNameNetworkReceiveThroughput is a RelationalDatabaseMetricName enum value - RelationalDatabaseMetricNameNetworkReceiveThroughput = "NetworkReceiveThroughput" - - // RelationalDatabaseMetricNameNetworkTransmitThroughput is a RelationalDatabaseMetricName enum value - RelationalDatabaseMetricNameNetworkTransmitThroughput = "NetworkTransmitThroughput" -) - -const ( - // RelationalDatabasePasswordVersionCurrent is a RelationalDatabasePasswordVersion enum value - RelationalDatabasePasswordVersionCurrent = "CURRENT" - - // RelationalDatabasePasswordVersionPrevious is a RelationalDatabasePasswordVersion enum value - RelationalDatabasePasswordVersionPrevious = "PREVIOUS" - - // RelationalDatabasePasswordVersionPending is a RelationalDatabasePasswordVersion enum value - RelationalDatabasePasswordVersionPending = "PENDING" -) - -const ( - // ResourceTypeInstance is a ResourceType enum value - ResourceTypeInstance = "Instance" - - // ResourceTypeStaticIp is a ResourceType enum value - ResourceTypeStaticIp = "StaticIp" - - // ResourceTypeKeyPair is a ResourceType enum value - ResourceTypeKeyPair = "KeyPair" - - // ResourceTypeInstanceSnapshot is a ResourceType enum value - ResourceTypeInstanceSnapshot = "InstanceSnapshot" - - // ResourceTypeDomain is a ResourceType enum value - ResourceTypeDomain = "Domain" - - // ResourceTypePeeredVpc is a ResourceType enum value - ResourceTypePeeredVpc = "PeeredVpc" - - // ResourceTypeLoadBalancer is a ResourceType enum value - ResourceTypeLoadBalancer = "LoadBalancer" - - // ResourceTypeLoadBalancerTlsCertificate is a ResourceType enum value - ResourceTypeLoadBalancerTlsCertificate = "LoadBalancerTlsCertificate" - - // ResourceTypeDisk is a ResourceType enum value - ResourceTypeDisk = "Disk" - - // ResourceTypeDiskSnapshot is a ResourceType enum value - ResourceTypeDiskSnapshot = "DiskSnapshot" - - // ResourceTypeRelationalDatabase is a ResourceType enum value - ResourceTypeRelationalDatabase = "RelationalDatabase" - - // ResourceTypeRelationalDatabaseSnapshot is a ResourceType enum value - ResourceTypeRelationalDatabaseSnapshot = "RelationalDatabaseSnapshot" - - // ResourceTypeExportSnapshotRecord is a ResourceType enum value - ResourceTypeExportSnapshotRecord = "ExportSnapshotRecord" - - // ResourceTypeCloudFormationStackRecord is a ResourceType enum value - ResourceTypeCloudFormationStackRecord = "CloudFormationStackRecord" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/doc.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/doc.go deleted file mode 100644 index 9c52815bb..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/doc.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package lightsail provides the client and types for making API -// requests to Amazon Lightsail. -// -// Amazon Lightsail is the easiest way to get started with AWS for developers -// who just need virtual private servers. Lightsail includes everything you -// need to launch your project quickly - a virtual machine, SSD-based storage, -// data transfer, DNS management, and a static IP - for a low, predictable price. -// You manage those Lightsail servers through the Lightsail console or by using -// the API or command-line interface (CLI). -// -// For more information about Lightsail concepts and tasks, see the Lightsail -// Dev Guide (https://lightsail.aws.amazon.com/ls/docs/all). -// -// To use the Lightsail API or the CLI, you will need to use AWS Identity and -// Access Management (IAM) to generate access keys. For details about how to -// set this up, see the Lightsail Dev Guide (http://lightsail.aws.amazon.com/ls/docs/how-to/article/lightsail-how-to-set-up-access-keys-to-use-sdk-api-cli). -// -// See https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28 for more information on this service. -// -// See lightsail package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/lightsail/ -// -// Using the Client -// -// To contact Amazon Lightsail with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Lightsail client Lightsail for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/lightsail/#New -package lightsail diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/errors.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/errors.go deleted file mode 100644 index bda8b8a66..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/errors.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package lightsail - -const ( - - // ErrCodeAccessDeniedException for service response error code - // "AccessDeniedException". - // - // Lightsail throws this exception when the user cannot be authenticated or - // uses invalid credentials to access a resource. - ErrCodeAccessDeniedException = "AccessDeniedException" - - // ErrCodeAccountSetupInProgressException for service response error code - // "AccountSetupInProgressException". - // - // Lightsail throws this exception when an account is still in the setup in - // progress state. - ErrCodeAccountSetupInProgressException = "AccountSetupInProgressException" - - // ErrCodeInvalidInputException for service response error code - // "InvalidInputException". - // - // Lightsail throws this exception when user input does not conform to the validation - // rules of an input field. - // - // Domain-related APIs are only available in the N. Virginia (us-east-1) Region. - // Please set your AWS Region configuration to us-east-1 to create, view, or - // edit these resources. - ErrCodeInvalidInputException = "InvalidInputException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // Lightsail throws this exception when it cannot find a resource. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeOperationFailureException for service response error code - // "OperationFailureException". - // - // Lightsail throws this exception when an operation fails to execute. - ErrCodeOperationFailureException = "OperationFailureException" - - // ErrCodeServiceException for service response error code - // "ServiceException". - // - // A general service exception. - ErrCodeServiceException = "ServiceException" - - // ErrCodeUnauthenticatedException for service response error code - // "UnauthenticatedException". - // - // Lightsail throws this exception when the user has not been authenticated. - ErrCodeUnauthenticatedException = "UnauthenticatedException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/service.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/service.go deleted file mode 100644 index b9f97faa8..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package lightsail - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// Lightsail provides the API operation methods for making requests to -// Amazon Lightsail. See this package's package overview docs -// for details on the service. -// -// Lightsail methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Lightsail 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 = "lightsail" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Lightsail" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Lightsail client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Lightsail client from just a session. -// svc := lightsail.New(mySession) -// -// // Create a Lightsail client with additional configuration -// svc := lightsail.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Lightsail { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Lightsail { - svc := &Lightsail{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2016-11-28", - JSONVersion: "1.1", - TargetPrefix: "Lightsail_20161128", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Lightsail operation and runs any -// custom request initialization. -func (c *Lightsail) 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/macie/api.go b/vendor/github.com/aws/aws-sdk-go/service/macie/api.go deleted file mode 100644 index d09b97380..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/macie/api.go +++ /dev/null @@ -1,1609 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package macie - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAssociateMemberAccount = "AssociateMemberAccount" - -// AssociateMemberAccountRequest generates a "aws/request.Request" representing the -// client's request for the AssociateMemberAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateMemberAccount for more information on using the AssociateMemberAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateMemberAccountRequest method. -// req, resp := client.AssociateMemberAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateMemberAccount -func (c *Macie) AssociateMemberAccountRequest(input *AssociateMemberAccountInput) (req *request.Request, output *AssociateMemberAccountOutput) { - op := &request.Operation{ - Name: opAssociateMemberAccount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateMemberAccountInput{} - } - - output = &AssociateMemberAccountOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssociateMemberAccount API operation for Amazon Macie. -// -// Associates a specified AWS account with Amazon Macie as a member account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Macie's -// API operation AssociateMemberAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateMemberAccount -func (c *Macie) AssociateMemberAccount(input *AssociateMemberAccountInput) (*AssociateMemberAccountOutput, error) { - req, out := c.AssociateMemberAccountRequest(input) - return out, req.Send() -} - -// AssociateMemberAccountWithContext is the same as AssociateMemberAccount with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateMemberAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) AssociateMemberAccountWithContext(ctx aws.Context, input *AssociateMemberAccountInput, opts ...request.Option) (*AssociateMemberAccountOutput, error) { - req, out := c.AssociateMemberAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateS3Resources = "AssociateS3Resources" - -// AssociateS3ResourcesRequest generates a "aws/request.Request" representing the -// client's request for the AssociateS3Resources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateS3Resources for more information on using the AssociateS3Resources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateS3ResourcesRequest method. -// req, resp := client.AssociateS3ResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateS3Resources -func (c *Macie) AssociateS3ResourcesRequest(input *AssociateS3ResourcesInput) (req *request.Request, output *AssociateS3ResourcesOutput) { - op := &request.Operation{ - Name: opAssociateS3Resources, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateS3ResourcesInput{} - } - - output = &AssociateS3ResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateS3Resources API operation for Amazon Macie. -// -// Associates specified S3 resources with Amazon Macie for monitoring and data -// classification. If memberAccountId isn't specified, the action associates -// specified S3 resources with Macie for the current master account. If memberAccountId -// is specified, the action associates specified S3 resources with Macie for -// the specified member account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Macie's -// API operation AssociateS3Resources for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateS3Resources -func (c *Macie) AssociateS3Resources(input *AssociateS3ResourcesInput) (*AssociateS3ResourcesOutput, error) { - req, out := c.AssociateS3ResourcesRequest(input) - return out, req.Send() -} - -// AssociateS3ResourcesWithContext is the same as AssociateS3Resources with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateS3Resources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) AssociateS3ResourcesWithContext(ctx aws.Context, input *AssociateS3ResourcesInput, opts ...request.Option) (*AssociateS3ResourcesOutput, error) { - req, out := c.AssociateS3ResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateMemberAccount = "DisassociateMemberAccount" - -// DisassociateMemberAccountRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateMemberAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateMemberAccount for more information on using the DisassociateMemberAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateMemberAccountRequest method. -// req, resp := client.DisassociateMemberAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateMemberAccount -func (c *Macie) DisassociateMemberAccountRequest(input *DisassociateMemberAccountInput) (req *request.Request, output *DisassociateMemberAccountOutput) { - op := &request.Operation{ - Name: opDisassociateMemberAccount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateMemberAccountInput{} - } - - output = &DisassociateMemberAccountOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateMemberAccount API operation for Amazon Macie. -// -// Removes the specified member account from Amazon Macie. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Macie's -// API operation DisassociateMemberAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateMemberAccount -func (c *Macie) DisassociateMemberAccount(input *DisassociateMemberAccountInput) (*DisassociateMemberAccountOutput, error) { - req, out := c.DisassociateMemberAccountRequest(input) - return out, req.Send() -} - -// DisassociateMemberAccountWithContext is the same as DisassociateMemberAccount with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateMemberAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) DisassociateMemberAccountWithContext(ctx aws.Context, input *DisassociateMemberAccountInput, opts ...request.Option) (*DisassociateMemberAccountOutput, error) { - req, out := c.DisassociateMemberAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateS3Resources = "DisassociateS3Resources" - -// DisassociateS3ResourcesRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateS3Resources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateS3Resources for more information on using the DisassociateS3Resources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateS3ResourcesRequest method. -// req, resp := client.DisassociateS3ResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateS3Resources -func (c *Macie) DisassociateS3ResourcesRequest(input *DisassociateS3ResourcesInput) (req *request.Request, output *DisassociateS3ResourcesOutput) { - op := &request.Operation{ - Name: opDisassociateS3Resources, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateS3ResourcesInput{} - } - - output = &DisassociateS3ResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisassociateS3Resources API operation for Amazon Macie. -// -// Removes specified S3 resources from being monitored by Amazon Macie. If memberAccountId -// isn't specified, the action removes specified S3 resources from Macie for -// the current master account. If memberAccountId is specified, the action removes -// specified S3 resources from Macie for the specified member account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Macie's -// API operation DisassociateS3Resources for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateS3Resources -func (c *Macie) DisassociateS3Resources(input *DisassociateS3ResourcesInput) (*DisassociateS3ResourcesOutput, error) { - req, out := c.DisassociateS3ResourcesRequest(input) - return out, req.Send() -} - -// DisassociateS3ResourcesWithContext is the same as DisassociateS3Resources with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateS3Resources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) DisassociateS3ResourcesWithContext(ctx aws.Context, input *DisassociateS3ResourcesInput, opts ...request.Option) (*DisassociateS3ResourcesOutput, error) { - req, out := c.DisassociateS3ResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListMemberAccounts = "ListMemberAccounts" - -// ListMemberAccountsRequest generates a "aws/request.Request" representing the -// client's request for the ListMemberAccounts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListMemberAccounts for more information on using the ListMemberAccounts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListMemberAccountsRequest method. -// req, resp := client.ListMemberAccountsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListMemberAccounts -func (c *Macie) ListMemberAccountsRequest(input *ListMemberAccountsInput) (req *request.Request, output *ListMemberAccountsOutput) { - op := &request.Operation{ - Name: opListMemberAccounts, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListMemberAccountsInput{} - } - - output = &ListMemberAccountsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListMemberAccounts API operation for Amazon Macie. -// -// Lists all Amazon Macie member accounts for the current Amazon Macie master -// account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Macie's -// API operation ListMemberAccounts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListMemberAccounts -func (c *Macie) ListMemberAccounts(input *ListMemberAccountsInput) (*ListMemberAccountsOutput, error) { - req, out := c.ListMemberAccountsRequest(input) - return out, req.Send() -} - -// ListMemberAccountsWithContext is the same as ListMemberAccounts with the addition of -// the ability to pass a context and additional request options. -// -// See ListMemberAccounts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) ListMemberAccountsWithContext(ctx aws.Context, input *ListMemberAccountsInput, opts ...request.Option) (*ListMemberAccountsOutput, error) { - req, out := c.ListMemberAccountsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListMemberAccountsPages iterates over the pages of a ListMemberAccounts operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListMemberAccounts method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListMemberAccounts operation. -// pageNum := 0 -// err := client.ListMemberAccountsPages(params, -// func(page *ListMemberAccountsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Macie) ListMemberAccountsPages(input *ListMemberAccountsInput, fn func(*ListMemberAccountsOutput, bool) bool) error { - return c.ListMemberAccountsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListMemberAccountsPagesWithContext same as ListMemberAccountsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) ListMemberAccountsPagesWithContext(ctx aws.Context, input *ListMemberAccountsInput, fn func(*ListMemberAccountsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListMemberAccountsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListMemberAccountsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMemberAccountsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListS3Resources = "ListS3Resources" - -// ListS3ResourcesRequest generates a "aws/request.Request" representing the -// client's request for the ListS3Resources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListS3Resources for more information on using the ListS3Resources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListS3ResourcesRequest method. -// req, resp := client.ListS3ResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListS3Resources -func (c *Macie) ListS3ResourcesRequest(input *ListS3ResourcesInput) (req *request.Request, output *ListS3ResourcesOutput) { - op := &request.Operation{ - Name: opListS3Resources, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListS3ResourcesInput{} - } - - output = &ListS3ResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListS3Resources API operation for Amazon Macie. -// -// Lists all the S3 resources associated with Amazon Macie. If memberAccountId -// isn't specified, the action lists the S3 resources associated with Amazon -// Macie for the current master account. If memberAccountId is specified, the -// action lists the S3 resources associated with Amazon Macie for the specified -// member account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Macie's -// API operation ListS3Resources for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListS3Resources -func (c *Macie) ListS3Resources(input *ListS3ResourcesInput) (*ListS3ResourcesOutput, error) { - req, out := c.ListS3ResourcesRequest(input) - return out, req.Send() -} - -// ListS3ResourcesWithContext is the same as ListS3Resources with the addition of -// the ability to pass a context and additional request options. -// -// See ListS3Resources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) ListS3ResourcesWithContext(ctx aws.Context, input *ListS3ResourcesInput, opts ...request.Option) (*ListS3ResourcesOutput, error) { - req, out := c.ListS3ResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListS3ResourcesPages iterates over the pages of a ListS3Resources operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListS3Resources method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListS3Resources operation. -// pageNum := 0 -// err := client.ListS3ResourcesPages(params, -// func(page *ListS3ResourcesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Macie) ListS3ResourcesPages(input *ListS3ResourcesInput, fn func(*ListS3ResourcesOutput, bool) bool) error { - return c.ListS3ResourcesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListS3ResourcesPagesWithContext same as ListS3ResourcesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) ListS3ResourcesPagesWithContext(ctx aws.Context, input *ListS3ResourcesInput, fn func(*ListS3ResourcesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListS3ResourcesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListS3ResourcesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListS3ResourcesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opUpdateS3Resources = "UpdateS3Resources" - -// UpdateS3ResourcesRequest generates a "aws/request.Request" representing the -// client's request for the UpdateS3Resources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateS3Resources for more information on using the UpdateS3Resources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateS3ResourcesRequest method. -// req, resp := client.UpdateS3ResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/UpdateS3Resources -func (c *Macie) UpdateS3ResourcesRequest(input *UpdateS3ResourcesInput) (req *request.Request, output *UpdateS3ResourcesOutput) { - op := &request.Operation{ - Name: opUpdateS3Resources, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateS3ResourcesInput{} - } - - output = &UpdateS3ResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateS3Resources API operation for Amazon Macie. -// -// Updates the classification types for the specified S3 resources. If memberAccountId -// isn't specified, the action updates the classification types of the S3 resources -// associated with Amazon Macie for the current master account. If memberAccountId -// is specified, the action updates the classification types of the S3 resources -// associated with Amazon Macie for the specified member account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Macie's -// API operation UpdateS3Resources for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You do not have required permissions to access the requested resource. -// -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/UpdateS3Resources -func (c *Macie) UpdateS3Resources(input *UpdateS3ResourcesInput) (*UpdateS3ResourcesOutput, error) { - req, out := c.UpdateS3ResourcesRequest(input) - return out, req.Send() -} - -// UpdateS3ResourcesWithContext is the same as UpdateS3Resources with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateS3Resources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) UpdateS3ResourcesWithContext(ctx aws.Context, input *UpdateS3ResourcesInput, opts ...request.Option) (*UpdateS3ResourcesOutput, error) { - req, out := c.UpdateS3ResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AssociateMemberAccountInput struct { - _ struct{} `type:"structure"` - - // The ID of the AWS account that you want to associate with Amazon Macie as - // a member account. - // - // MemberAccountId is a required field - MemberAccountId *string `locationName:"memberAccountId" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateMemberAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateMemberAccountInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateMemberAccountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateMemberAccountInput"} - if s.MemberAccountId == nil { - invalidParams.Add(request.NewErrParamRequired("MemberAccountId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMemberAccountId sets the MemberAccountId field's value. -func (s *AssociateMemberAccountInput) SetMemberAccountId(v string) *AssociateMemberAccountInput { - s.MemberAccountId = &v - return s -} - -type AssociateMemberAccountOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssociateMemberAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateMemberAccountOutput) GoString() string { - return s.String() -} - -type AssociateS3ResourcesInput struct { - _ struct{} `type:"structure"` - - // The ID of the Amazon Macie member account whose resources you want to associate - // with Macie. - MemberAccountId *string `locationName:"memberAccountId" type:"string"` - - // The S3 resources that you want to associate with Amazon Macie for monitoring - // and data classification. - // - // S3Resources is a required field - S3Resources []*S3ResourceClassification `locationName:"s3Resources" type:"list" required:"true"` -} - -// String returns the string representation -func (s AssociateS3ResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateS3ResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateS3ResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateS3ResourcesInput"} - if s.S3Resources == nil { - invalidParams.Add(request.NewErrParamRequired("S3Resources")) - } - if s.S3Resources != nil { - for i, v := range s.S3Resources { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "S3Resources", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMemberAccountId sets the MemberAccountId field's value. -func (s *AssociateS3ResourcesInput) SetMemberAccountId(v string) *AssociateS3ResourcesInput { - s.MemberAccountId = &v - return s -} - -// SetS3Resources sets the S3Resources field's value. -func (s *AssociateS3ResourcesInput) SetS3Resources(v []*S3ResourceClassification) *AssociateS3ResourcesInput { - s.S3Resources = v - return s -} - -type AssociateS3ResourcesOutput struct { - _ struct{} `type:"structure"` - - // S3 resources that couldn't be associated with Amazon Macie. An error code - // and an error message are provided for each failed item. - FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` -} - -// String returns the string representation -func (s AssociateS3ResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateS3ResourcesOutput) GoString() string { - return s.String() -} - -// SetFailedS3Resources sets the FailedS3Resources field's value. -func (s *AssociateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *AssociateS3ResourcesOutput { - s.FailedS3Resources = v - return s -} - -// The classification type that Amazon Macie applies to the associated S3 resources. -type ClassificationType struct { - _ struct{} `type:"structure"` - - // A continuous classification of the objects that are added to a specified - // S3 bucket. Amazon Macie begins performing continuous classification after - // a bucket is successfully associated with Amazon Macie. - // - // Continuous is a required field - Continuous *string `locationName:"continuous" type:"string" required:"true" enum:"S3ContinuousClassificationType"` - - // A one-time classification of all of the existing objects in a specified S3 - // bucket. - // - // OneTime is a required field - OneTime *string `locationName:"oneTime" type:"string" required:"true" enum:"S3OneTimeClassificationType"` -} - -// String returns the string representation -func (s ClassificationType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClassificationType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ClassificationType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ClassificationType"} - if s.Continuous == nil { - invalidParams.Add(request.NewErrParamRequired("Continuous")) - } - if s.OneTime == nil { - invalidParams.Add(request.NewErrParamRequired("OneTime")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContinuous sets the Continuous field's value. -func (s *ClassificationType) SetContinuous(v string) *ClassificationType { - s.Continuous = &v - return s -} - -// SetOneTime sets the OneTime field's value. -func (s *ClassificationType) SetOneTime(v string) *ClassificationType { - s.OneTime = &v - return s -} - -// The classification type that Amazon Macie applies to the associated S3 resources. -// At least one of the classification types (oneTime or continuous) must be -// specified. -type ClassificationTypeUpdate struct { - _ struct{} `type:"structure"` - - // A continuous classification of the objects that are added to a specified - // S3 bucket. Amazon Macie begins performing continuous classification after - // a bucket is successfully associated with Amazon Macie. - Continuous *string `locationName:"continuous" type:"string" enum:"S3ContinuousClassificationType"` - - // A one-time classification of all of the existing objects in a specified S3 - // bucket. - OneTime *string `locationName:"oneTime" type:"string" enum:"S3OneTimeClassificationType"` -} - -// String returns the string representation -func (s ClassificationTypeUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClassificationTypeUpdate) GoString() string { - return s.String() -} - -// SetContinuous sets the Continuous field's value. -func (s *ClassificationTypeUpdate) SetContinuous(v string) *ClassificationTypeUpdate { - s.Continuous = &v - return s -} - -// SetOneTime sets the OneTime field's value. -func (s *ClassificationTypeUpdate) SetOneTime(v string) *ClassificationTypeUpdate { - s.OneTime = &v - return s -} - -type DisassociateMemberAccountInput struct { - _ struct{} `type:"structure"` - - // The ID of the member account that you want to remove from Amazon Macie. - // - // MemberAccountId is a required field - MemberAccountId *string `locationName:"memberAccountId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateMemberAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateMemberAccountInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateMemberAccountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateMemberAccountInput"} - if s.MemberAccountId == nil { - invalidParams.Add(request.NewErrParamRequired("MemberAccountId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMemberAccountId sets the MemberAccountId field's value. -func (s *DisassociateMemberAccountInput) SetMemberAccountId(v string) *DisassociateMemberAccountInput { - s.MemberAccountId = &v - return s -} - -type DisassociateMemberAccountOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateMemberAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateMemberAccountOutput) GoString() string { - return s.String() -} - -type DisassociateS3ResourcesInput struct { - _ struct{} `type:"structure"` - - // The S3 resources (buckets or prefixes) that you want to remove from being - // monitored and classified by Amazon Macie. - // - // AssociatedS3Resources is a required field - AssociatedS3Resources []*S3Resource `locationName:"associatedS3Resources" type:"list" required:"true"` - - // The ID of the Amazon Macie member account whose resources you want to remove - // from being monitored by Amazon Macie. - MemberAccountId *string `locationName:"memberAccountId" type:"string"` -} - -// String returns the string representation -func (s DisassociateS3ResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateS3ResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateS3ResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateS3ResourcesInput"} - if s.AssociatedS3Resources == nil { - invalidParams.Add(request.NewErrParamRequired("AssociatedS3Resources")) - } - if s.AssociatedS3Resources != nil { - for i, v := range s.AssociatedS3Resources { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AssociatedS3Resources", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociatedS3Resources sets the AssociatedS3Resources field's value. -func (s *DisassociateS3ResourcesInput) SetAssociatedS3Resources(v []*S3Resource) *DisassociateS3ResourcesInput { - s.AssociatedS3Resources = v - return s -} - -// SetMemberAccountId sets the MemberAccountId field's value. -func (s *DisassociateS3ResourcesInput) SetMemberAccountId(v string) *DisassociateS3ResourcesInput { - s.MemberAccountId = &v - return s -} - -type DisassociateS3ResourcesOutput struct { - _ struct{} `type:"structure"` - - // S3 resources that couldn't be removed from being monitored and classified - // by Amazon Macie. An error code and an error message are provided for each - // failed item. - FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` -} - -// String returns the string representation -func (s DisassociateS3ResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateS3ResourcesOutput) GoString() string { - return s.String() -} - -// SetFailedS3Resources sets the FailedS3Resources field's value. -func (s *DisassociateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *DisassociateS3ResourcesOutput { - s.FailedS3Resources = v - return s -} - -// Includes details about the failed S3 resources. -type FailedS3Resource struct { - _ struct{} `type:"structure"` - - // The status code of a failed item. - ErrorCode *string `locationName:"errorCode" type:"string"` - - // The error message of a failed item. - ErrorMessage *string `locationName:"errorMessage" type:"string"` - - // The failed S3 resources. - FailedItem *S3Resource `locationName:"failedItem" type:"structure"` -} - -// String returns the string representation -func (s FailedS3Resource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailedS3Resource) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *FailedS3Resource) SetErrorCode(v string) *FailedS3Resource { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *FailedS3Resource) SetErrorMessage(v string) *FailedS3Resource { - s.ErrorMessage = &v - return s -} - -// SetFailedItem sets the FailedItem field's value. -func (s *FailedS3Resource) SetFailedItem(v *S3Resource) *FailedS3Resource { - s.FailedItem = v - return s -} - -type ListMemberAccountsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter to indicate the maximum number of items that you want - // in the response. The default value is 250. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // Use this parameter when paginating results. Set the value of this parameter - // to null on your first call to the ListMemberAccounts action. Subsequent calls - // to the action fill nextToken in the request with the value of nextToken from - // the previous response to continue listing data. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListMemberAccountsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListMemberAccountsInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListMemberAccountsInput) SetMaxResults(v int64) *ListMemberAccountsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListMemberAccountsInput) SetNextToken(v string) *ListMemberAccountsInput { - s.NextToken = &v - return s -} - -type ListMemberAccountsOutput struct { - _ struct{} `type:"structure"` - - // A list of the Amazon Macie member accounts returned by the action. The current - // master account is also included in this list. - MemberAccounts []*MemberAccount `locationName:"memberAccounts" type:"list"` - - // When a response is generated, if there is more data to be listed, this parameter - // is present in the response and contains the value to use for the nextToken - // parameter in a subsequent pagination request. If there is no more data to - // be listed, this parameter is set to null. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListMemberAccountsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListMemberAccountsOutput) GoString() string { - return s.String() -} - -// SetMemberAccounts sets the MemberAccounts field's value. -func (s *ListMemberAccountsOutput) SetMemberAccounts(v []*MemberAccount) *ListMemberAccountsOutput { - s.MemberAccounts = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListMemberAccountsOutput) SetNextToken(v string) *ListMemberAccountsOutput { - s.NextToken = &v - return s -} - -type ListS3ResourcesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter to indicate the maximum number of items that you want - // in the response. The default value is 250. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The Amazon Macie member account ID whose associated S3 resources you want - // to list. - MemberAccountId *string `locationName:"memberAccountId" type:"string"` - - // Use this parameter when paginating results. Set its value to null on your - // first call to the ListS3Resources action. Subsequent calls to the action - // fill nextToken in the request with the value of nextToken from the previous - // response to continue listing data. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListS3ResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListS3ResourcesInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListS3ResourcesInput) SetMaxResults(v int64) *ListS3ResourcesInput { - s.MaxResults = &v - return s -} - -// SetMemberAccountId sets the MemberAccountId field's value. -func (s *ListS3ResourcesInput) SetMemberAccountId(v string) *ListS3ResourcesInput { - s.MemberAccountId = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListS3ResourcesInput) SetNextToken(v string) *ListS3ResourcesInput { - s.NextToken = &v - return s -} - -type ListS3ResourcesOutput struct { - _ struct{} `type:"structure"` - - // When a response is generated, if there is more data to be listed, this parameter - // is present in the response and contains the value to use for the nextToken - // parameter in a subsequent pagination request. If there is no more data to - // be listed, this parameter is set to null. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of the associated S3 resources returned by the action. - S3Resources []*S3ResourceClassification `locationName:"s3Resources" type:"list"` -} - -// String returns the string representation -func (s ListS3ResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListS3ResourcesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListS3ResourcesOutput) SetNextToken(v string) *ListS3ResourcesOutput { - s.NextToken = &v - return s -} - -// SetS3Resources sets the S3Resources field's value. -func (s *ListS3ResourcesOutput) SetS3Resources(v []*S3ResourceClassification) *ListS3ResourcesOutput { - s.S3Resources = v - return s -} - -// Contains information about the Amazon Macie member account. -type MemberAccount struct { - _ struct{} `type:"structure"` - - // The AWS account ID of the Amazon Macie member account. - AccountId *string `locationName:"accountId" type:"string"` -} - -// String returns the string representation -func (s MemberAccount) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MemberAccount) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *MemberAccount) SetAccountId(v string) *MemberAccount { - s.AccountId = &v - return s -} - -// Contains information about the S3 resource. This data type is used as a request -// parameter in the DisassociateS3Resources action and can be used as a response -// parameter in the AssociateS3Resources and UpdateS3Resources actions. -type S3Resource struct { - _ struct{} `type:"structure"` - - // The name of the S3 bucket. - // - // BucketName is a required field - BucketName *string `locationName:"bucketName" type:"string" required:"true"` - - // The prefix of the S3 bucket. - Prefix *string `locationName:"prefix" type:"string"` -} - -// String returns the string representation -func (s S3Resource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Resource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3Resource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3Resource"} - if s.BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("BucketName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketName sets the BucketName field's value. -func (s *S3Resource) SetBucketName(v string) *S3Resource { - s.BucketName = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *S3Resource) SetPrefix(v string) *S3Resource { - s.Prefix = &v - return s -} - -// The S3 resources that you want to associate with Amazon Macie for monitoring -// and data classification. This data type is used as a request parameter in -// the AssociateS3Resources action and a response parameter in the ListS3Resources -// action. -type S3ResourceClassification struct { - _ struct{} `type:"structure"` - - // The name of the S3 bucket that you want to associate with Amazon Macie. - // - // BucketName is a required field - BucketName *string `locationName:"bucketName" type:"string" required:"true"` - - // The classification type that you want to specify for the resource associated - // with Amazon Macie. - // - // ClassificationType is a required field - ClassificationType *ClassificationType `locationName:"classificationType" type:"structure" required:"true"` - - // The prefix of the S3 bucket that you want to associate with Amazon Macie. - Prefix *string `locationName:"prefix" type:"string"` -} - -// String returns the string representation -func (s S3ResourceClassification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3ResourceClassification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3ResourceClassification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3ResourceClassification"} - if s.BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("BucketName")) - } - if s.ClassificationType == nil { - invalidParams.Add(request.NewErrParamRequired("ClassificationType")) - } - if s.ClassificationType != nil { - if err := s.ClassificationType.Validate(); err != nil { - invalidParams.AddNested("ClassificationType", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketName sets the BucketName field's value. -func (s *S3ResourceClassification) SetBucketName(v string) *S3ResourceClassification { - s.BucketName = &v - return s -} - -// SetClassificationType sets the ClassificationType field's value. -func (s *S3ResourceClassification) SetClassificationType(v *ClassificationType) *S3ResourceClassification { - s.ClassificationType = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *S3ResourceClassification) SetPrefix(v string) *S3ResourceClassification { - s.Prefix = &v - return s -} - -// The S3 resources whose classification types you want to update. This data -// type is used as a request parameter in the UpdateS3Resources action. -type S3ResourceClassificationUpdate struct { - _ struct{} `type:"structure"` - - // The name of the S3 bucket whose classification types you want to update. - // - // BucketName is a required field - BucketName *string `locationName:"bucketName" type:"string" required:"true"` - - // The classification type that you want to update for the resource associated - // with Amazon Macie. - // - // ClassificationTypeUpdate is a required field - ClassificationTypeUpdate *ClassificationTypeUpdate `locationName:"classificationTypeUpdate" type:"structure" required:"true"` - - // The prefix of the S3 bucket whose classification types you want to update. - Prefix *string `locationName:"prefix" type:"string"` -} - -// String returns the string representation -func (s S3ResourceClassificationUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3ResourceClassificationUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3ResourceClassificationUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3ResourceClassificationUpdate"} - if s.BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("BucketName")) - } - if s.ClassificationTypeUpdate == nil { - invalidParams.Add(request.NewErrParamRequired("ClassificationTypeUpdate")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketName sets the BucketName field's value. -func (s *S3ResourceClassificationUpdate) SetBucketName(v string) *S3ResourceClassificationUpdate { - s.BucketName = &v - return s -} - -// SetClassificationTypeUpdate sets the ClassificationTypeUpdate field's value. -func (s *S3ResourceClassificationUpdate) SetClassificationTypeUpdate(v *ClassificationTypeUpdate) *S3ResourceClassificationUpdate { - s.ClassificationTypeUpdate = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *S3ResourceClassificationUpdate) SetPrefix(v string) *S3ResourceClassificationUpdate { - s.Prefix = &v - return s -} - -type UpdateS3ResourcesInput struct { - _ struct{} `type:"structure"` - - // The AWS ID of the Amazon Macie member account whose S3 resources' classification - // types you want to update. - MemberAccountId *string `locationName:"memberAccountId" type:"string"` - - // The S3 resources whose classification types you want to update. - // - // S3ResourcesUpdate is a required field - S3ResourcesUpdate []*S3ResourceClassificationUpdate `locationName:"s3ResourcesUpdate" type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateS3ResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateS3ResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateS3ResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateS3ResourcesInput"} - if s.S3ResourcesUpdate == nil { - invalidParams.Add(request.NewErrParamRequired("S3ResourcesUpdate")) - } - if s.S3ResourcesUpdate != nil { - for i, v := range s.S3ResourcesUpdate { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "S3ResourcesUpdate", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMemberAccountId sets the MemberAccountId field's value. -func (s *UpdateS3ResourcesInput) SetMemberAccountId(v string) *UpdateS3ResourcesInput { - s.MemberAccountId = &v - return s -} - -// SetS3ResourcesUpdate sets the S3ResourcesUpdate field's value. -func (s *UpdateS3ResourcesInput) SetS3ResourcesUpdate(v []*S3ResourceClassificationUpdate) *UpdateS3ResourcesInput { - s.S3ResourcesUpdate = v - return s -} - -type UpdateS3ResourcesOutput struct { - _ struct{} `type:"structure"` - - // The S3 resources whose classification types can't be updated. An error code - // and an error message are provided for each failed item. - FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` -} - -// String returns the string representation -func (s UpdateS3ResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateS3ResourcesOutput) GoString() string { - return s.String() -} - -// SetFailedS3Resources sets the FailedS3Resources field's value. -func (s *UpdateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *UpdateS3ResourcesOutput { - s.FailedS3Resources = v - return s -} - -const ( - // S3ContinuousClassificationTypeFull is a S3ContinuousClassificationType enum value - S3ContinuousClassificationTypeFull = "FULL" -) - -const ( - // S3OneTimeClassificationTypeFull is a S3OneTimeClassificationType enum value - S3OneTimeClassificationTypeFull = "FULL" - - // S3OneTimeClassificationTypeNone is a S3OneTimeClassificationType enum value - S3OneTimeClassificationTypeNone = "NONE" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/macie/doc.go b/vendor/github.com/aws/aws-sdk-go/service/macie/doc.go deleted file mode 100644 index 1b8f9632f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/macie/doc.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package macie provides the client and types for making API -// requests to Amazon Macie. -// -// Amazon Macie is a security service that uses machine learning to automatically -// discover, classify, and protect sensitive data in AWS. Macie recognizes sensitive -// data such as personally identifiable information (PII) or intellectual property, -// and provides you with dashboards and alerts that give visibility into how -// this data is being accessed or moved. For more information, see the Macie -// User Guide (https://docs.aws.amazon.com/macie/latest/userguide/what-is-macie.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19 for more information on this service. -// -// See macie package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/macie/ -// -// Using the Client -// -// To contact Amazon Macie with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Macie client Macie for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/macie/#New -package macie diff --git a/vendor/github.com/aws/aws-sdk-go/service/macie/errors.go b/vendor/github.com/aws/aws-sdk-go/service/macie/errors.go deleted file mode 100644 index 77768d52e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/macie/errors.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package macie - -const ( - - // ErrCodeAccessDeniedException for service response error code - // "AccessDeniedException". - // - // You do not have required permissions to access the requested resource. - ErrCodeAccessDeniedException = "AccessDeniedException" - - // ErrCodeInternalException for service response error code - // "InternalException". - // - // Internal server error. - ErrCodeInternalException = "InternalException" - - // ErrCodeInvalidInputException for service response error code - // "InvalidInputException". - // - // The request was rejected because an invalid or out-of-range value was supplied - // for an input parameter. - ErrCodeInvalidInputException = "InvalidInputException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The request was rejected because it attempted to create resources beyond - // the current AWS account limits. The error code describes the limit exceeded. - ErrCodeLimitExceededException = "LimitExceededException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/macie/service.go b/vendor/github.com/aws/aws-sdk-go/service/macie/service.go deleted file mode 100644 index 0b38598f0..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/macie/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package macie - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// Macie provides the API operation methods for making requests to -// Amazon Macie. See this package's package overview docs -// for details on the service. -// -// Macie methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Macie struct { - *client.Client -} - -// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) - -// Service information constants -const ( - ServiceName = "Macie" // Name of service. - EndpointsID = "macie" // ID to lookup a service endpoint with. - ServiceID = "Macie" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Macie client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Macie client from just a session. -// svc := macie.New(mySession) -// -// // Create a Macie client with additional configuration -// svc := macie.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Macie { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Macie { - svc := &Macie{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-12-19", - JSONVersion: "1.1", - TargetPrefix: "MacieService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Macie operation and runs any -// custom request initialization. -func (c *Macie) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/api.go deleted file mode 100644 index 9f5c8a306..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/api.go +++ /dev/null @@ -1,4571 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediaconnect - -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 opAddFlowOutputs = "AddFlowOutputs" - -// AddFlowOutputsRequest generates a "aws/request.Request" representing the -// client's request for the AddFlowOutputs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddFlowOutputs for more information on using the AddFlowOutputs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddFlowOutputsRequest method. -// req, resp := client.AddFlowOutputsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/AddFlowOutputs -func (c *MediaConnect) AddFlowOutputsRequest(input *AddFlowOutputsInput) (req *request.Request, output *AddFlowOutputsOutput) { - op := &request.Operation{ - Name: opAddFlowOutputs, - HTTPMethod: "POST", - HTTPPath: "/v1/flows/{flowArn}/outputs", - } - - if input == nil { - input = &AddFlowOutputsInput{} - } - - output = &AddFlowOutputsOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddFlowOutputs API operation for AWS MediaConnect. -// -// Adds outputs to an existing flow. You can create up to 20 outputs per flow. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation AddFlowOutputs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAddFlowOutputs420Exception "AddFlowOutputs420Exception" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeNotFoundException "NotFoundException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/AddFlowOutputs -func (c *MediaConnect) AddFlowOutputs(input *AddFlowOutputsInput) (*AddFlowOutputsOutput, error) { - req, out := c.AddFlowOutputsRequest(input) - return out, req.Send() -} - -// AddFlowOutputsWithContext is the same as AddFlowOutputs with the addition of -// the ability to pass a context and additional request options. -// -// See AddFlowOutputs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConnect) AddFlowOutputsWithContext(ctx aws.Context, input *AddFlowOutputsInput, opts ...request.Option) (*AddFlowOutputsOutput, error) { - req, out := c.AddFlowOutputsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFlow = "CreateFlow" - -// CreateFlowRequest generates a "aws/request.Request" representing the -// client's request for the CreateFlow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFlow for more information on using the CreateFlow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateFlowRequest method. -// req, resp := client.CreateFlowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/CreateFlow -func (c *MediaConnect) CreateFlowRequest(input *CreateFlowInput) (req *request.Request, output *CreateFlowOutput) { - op := &request.Operation{ - Name: opCreateFlow, - HTTPMethod: "POST", - HTTPPath: "/v1/flows", - } - - if input == nil { - input = &CreateFlowInput{} - } - - output = &CreateFlowOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFlow API operation for AWS MediaConnect. -// -// Creates a new flow. The request must include one source. The request optionally -// can include outputs (up to 20) and entitlements (up to 50). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation CreateFlow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCreateFlow420Exception "CreateFlow420Exception" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/CreateFlow -func (c *MediaConnect) CreateFlow(input *CreateFlowInput) (*CreateFlowOutput, error) { - req, out := c.CreateFlowRequest(input) - return out, req.Send() -} - -// CreateFlowWithContext is the same as CreateFlow with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFlow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConnect) CreateFlowWithContext(ctx aws.Context, input *CreateFlowInput, opts ...request.Option) (*CreateFlowOutput, error) { - req, out := c.CreateFlowRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFlow = "DeleteFlow" - -// DeleteFlowRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFlow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFlow for more information on using the DeleteFlow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFlowRequest method. -// req, resp := client.DeleteFlowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/DeleteFlow -func (c *MediaConnect) DeleteFlowRequest(input *DeleteFlowInput) (req *request.Request, output *DeleteFlowOutput) { - op := &request.Operation{ - Name: opDeleteFlow, - HTTPMethod: "DELETE", - HTTPPath: "/v1/flows/{flowArn}", - } - - if input == nil { - input = &DeleteFlowInput{} - } - - output = &DeleteFlowOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteFlow API operation for AWS MediaConnect. -// -// Deletes a flow. Before you can delete a flow, you must stop the flow. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation DeleteFlow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeNotFoundException "NotFoundException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/DeleteFlow -func (c *MediaConnect) DeleteFlow(input *DeleteFlowInput) (*DeleteFlowOutput, error) { - req, out := c.DeleteFlowRequest(input) - return out, req.Send() -} - -// DeleteFlowWithContext is the same as DeleteFlow with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFlow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConnect) DeleteFlowWithContext(ctx aws.Context, input *DeleteFlowInput, opts ...request.Option) (*DeleteFlowOutput, error) { - req, out := c.DeleteFlowRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFlow = "DescribeFlow" - -// DescribeFlowRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFlow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFlow for more information on using the DescribeFlow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFlowRequest method. -// req, resp := client.DescribeFlowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/DescribeFlow -func (c *MediaConnect) DescribeFlowRequest(input *DescribeFlowInput) (req *request.Request, output *DescribeFlowOutput) { - op := &request.Operation{ - Name: opDescribeFlow, - HTTPMethod: "GET", - HTTPPath: "/v1/flows/{flowArn}", - } - - if input == nil { - input = &DescribeFlowInput{} - } - - output = &DescribeFlowOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFlow API operation for AWS MediaConnect. -// -// Displays the details of a flow. The response includes the flow ARN, name, -// and Availability Zone, as well as details about the source, outputs, and -// entitlements. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation DescribeFlow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeNotFoundException "NotFoundException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/DescribeFlow -func (c *MediaConnect) DescribeFlow(input *DescribeFlowInput) (*DescribeFlowOutput, error) { - req, out := c.DescribeFlowRequest(input) - return out, req.Send() -} - -// DescribeFlowWithContext is the same as DescribeFlow with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFlow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConnect) DescribeFlowWithContext(ctx aws.Context, input *DescribeFlowInput, opts ...request.Option) (*DescribeFlowOutput, error) { - req, out := c.DescribeFlowRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGrantFlowEntitlements = "GrantFlowEntitlements" - -// GrantFlowEntitlementsRequest generates a "aws/request.Request" representing the -// client's request for the GrantFlowEntitlements operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GrantFlowEntitlements for more information on using the GrantFlowEntitlements -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GrantFlowEntitlementsRequest method. -// req, resp := client.GrantFlowEntitlementsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/GrantFlowEntitlements -func (c *MediaConnect) GrantFlowEntitlementsRequest(input *GrantFlowEntitlementsInput) (req *request.Request, output *GrantFlowEntitlementsOutput) { - op := &request.Operation{ - Name: opGrantFlowEntitlements, - HTTPMethod: "POST", - HTTPPath: "/v1/flows/{flowArn}/entitlements", - } - - if input == nil { - input = &GrantFlowEntitlementsInput{} - } - - output = &GrantFlowEntitlementsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GrantFlowEntitlements API operation for AWS MediaConnect. -// -// Grants entitlements to an existing flow. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation GrantFlowEntitlements for usage and error information. -// -// Returned Error Codes: -// * ErrCodeGrantFlowEntitlements420Exception "GrantFlowEntitlements420Exception" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeNotFoundException "NotFoundException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/GrantFlowEntitlements -func (c *MediaConnect) GrantFlowEntitlements(input *GrantFlowEntitlementsInput) (*GrantFlowEntitlementsOutput, error) { - req, out := c.GrantFlowEntitlementsRequest(input) - return out, req.Send() -} - -// GrantFlowEntitlementsWithContext is the same as GrantFlowEntitlements with the addition of -// the ability to pass a context and additional request options. -// -// See GrantFlowEntitlements for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConnect) GrantFlowEntitlementsWithContext(ctx aws.Context, input *GrantFlowEntitlementsInput, opts ...request.Option) (*GrantFlowEntitlementsOutput, error) { - req, out := c.GrantFlowEntitlementsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListEntitlements = "ListEntitlements" - -// ListEntitlementsRequest generates a "aws/request.Request" representing the -// client's request for the ListEntitlements operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListEntitlements for more information on using the ListEntitlements -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListEntitlementsRequest method. -// req, resp := client.ListEntitlementsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListEntitlements -func (c *MediaConnect) ListEntitlementsRequest(input *ListEntitlementsInput) (req *request.Request, output *ListEntitlementsOutput) { - op := &request.Operation{ - Name: opListEntitlements, - HTTPMethod: "GET", - HTTPPath: "/v1/entitlements", - } - - if input == nil { - input = &ListEntitlementsInput{} - } - - output = &ListEntitlementsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListEntitlements API operation for AWS MediaConnect. -// -// Displays a list of all entitlements that have been granted to this account. -// This request returns 20 results per page. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation ListEntitlements for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListEntitlements -func (c *MediaConnect) ListEntitlements(input *ListEntitlementsInput) (*ListEntitlementsOutput, error) { - req, out := c.ListEntitlementsRequest(input) - return out, req.Send() -} - -// ListEntitlementsWithContext is the same as ListEntitlements with the addition of -// the ability to pass a context and additional request options. -// -// See ListEntitlements for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConnect) ListEntitlementsWithContext(ctx aws.Context, input *ListEntitlementsInput, opts ...request.Option) (*ListEntitlementsOutput, error) { - req, out := c.ListEntitlementsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListFlows = "ListFlows" - -// ListFlowsRequest generates a "aws/request.Request" representing the -// client's request for the ListFlows operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListFlows for more information on using the ListFlows -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListFlowsRequest method. -// req, resp := client.ListFlowsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListFlows -func (c *MediaConnect) ListFlowsRequest(input *ListFlowsInput) (req *request.Request, output *ListFlowsOutput) { - op := &request.Operation{ - Name: opListFlows, - HTTPMethod: "GET", - HTTPPath: "/v1/flows", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListFlowsInput{} - } - - output = &ListFlowsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListFlows API operation for AWS MediaConnect. -// -// Displays a list of flows that are associated with this account. This request -// returns a paginated result. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation ListFlows for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListFlows -func (c *MediaConnect) ListFlows(input *ListFlowsInput) (*ListFlowsOutput, error) { - req, out := c.ListFlowsRequest(input) - return out, req.Send() -} - -// ListFlowsWithContext is the same as ListFlows with the addition of -// the ability to pass a context and additional request options. -// -// See ListFlows for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConnect) ListFlowsWithContext(ctx aws.Context, input *ListFlowsInput, opts ...request.Option) (*ListFlowsOutput, error) { - req, out := c.ListFlowsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListFlowsPages iterates over the pages of a ListFlows operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListFlows 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 ListFlows operation. -// pageNum := 0 -// err := client.ListFlowsPages(params, -// func(page *ListFlowsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *MediaConnect) ListFlowsPages(input *ListFlowsInput, fn func(*ListFlowsOutput, bool) bool) error { - return c.ListFlowsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListFlowsPagesWithContext same as ListFlowsPages 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 *MediaConnect) ListFlowsPagesWithContext(ctx aws.Context, input *ListFlowsInput, fn func(*ListFlowsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListFlowsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListFlowsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListFlowsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTagsForResource = "ListTagsForResource" - -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the 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/mediaconnect-2018-11-14/ListTagsForResource -func (c *MediaConnect) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "GET", - HTTPPath: "/tags/{resourceArn}", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for AWS MediaConnect. -// -// Lists all tags associated with the 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 MediaConnect's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListTagsForResource -func (c *MediaConnect) 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 *MediaConnect) 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 opRemoveFlowOutput = "RemoveFlowOutput" - -// RemoveFlowOutputRequest generates a "aws/request.Request" representing the -// client's request for the RemoveFlowOutput operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveFlowOutput for more information on using the RemoveFlowOutput -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveFlowOutputRequest method. -// req, resp := client.RemoveFlowOutputRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RemoveFlowOutput -func (c *MediaConnect) RemoveFlowOutputRequest(input *RemoveFlowOutputInput) (req *request.Request, output *RemoveFlowOutputOutput) { - op := &request.Operation{ - Name: opRemoveFlowOutput, - HTTPMethod: "DELETE", - HTTPPath: "/v1/flows/{flowArn}/outputs/{outputArn}", - } - - if input == nil { - input = &RemoveFlowOutputInput{} - } - - output = &RemoveFlowOutputOutput{} - req = c.newRequest(op, input, output) - return -} - -// RemoveFlowOutput API operation for AWS MediaConnect. -// -// Removes an output from an existing flow. This request can be made only on -// an output that does not have an entitlement associated with it. If the output -// has an entitlement, you must revoke the entitlement instead. When an entitlement -// is revoked from a flow, the service automatically removes the associated -// output. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation RemoveFlowOutput for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeNotFoundException "NotFoundException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RemoveFlowOutput -func (c *MediaConnect) RemoveFlowOutput(input *RemoveFlowOutputInput) (*RemoveFlowOutputOutput, error) { - req, out := c.RemoveFlowOutputRequest(input) - return out, req.Send() -} - -// RemoveFlowOutputWithContext is the same as RemoveFlowOutput with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveFlowOutput for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConnect) RemoveFlowOutputWithContext(ctx aws.Context, input *RemoveFlowOutputInput, opts ...request.Option) (*RemoveFlowOutputOutput, error) { - req, out := c.RemoveFlowOutputRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRevokeFlowEntitlement = "RevokeFlowEntitlement" - -// RevokeFlowEntitlementRequest generates a "aws/request.Request" representing the -// client's request for the RevokeFlowEntitlement operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RevokeFlowEntitlement for more information on using the RevokeFlowEntitlement -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RevokeFlowEntitlementRequest method. -// req, resp := client.RevokeFlowEntitlementRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RevokeFlowEntitlement -func (c *MediaConnect) RevokeFlowEntitlementRequest(input *RevokeFlowEntitlementInput) (req *request.Request, output *RevokeFlowEntitlementOutput) { - op := &request.Operation{ - Name: opRevokeFlowEntitlement, - HTTPMethod: "DELETE", - HTTPPath: "/v1/flows/{flowArn}/entitlements/{entitlementArn}", - } - - if input == nil { - input = &RevokeFlowEntitlementInput{} - } - - output = &RevokeFlowEntitlementOutput{} - req = c.newRequest(op, input, output) - return -} - -// RevokeFlowEntitlement API operation for AWS MediaConnect. -// -// Revokes an entitlement from a flow. Once an entitlement is revoked, the content -// becomes unavailable to the subscriber and the associated output is removed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation RevokeFlowEntitlement for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeNotFoundException "NotFoundException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RevokeFlowEntitlement -func (c *MediaConnect) RevokeFlowEntitlement(input *RevokeFlowEntitlementInput) (*RevokeFlowEntitlementOutput, error) { - req, out := c.RevokeFlowEntitlementRequest(input) - return out, req.Send() -} - -// RevokeFlowEntitlementWithContext is the same as RevokeFlowEntitlement with the addition of -// the ability to pass a context and additional request options. -// -// See RevokeFlowEntitlement for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConnect) RevokeFlowEntitlementWithContext(ctx aws.Context, input *RevokeFlowEntitlementInput, opts ...request.Option) (*RevokeFlowEntitlementOutput, error) { - req, out := c.RevokeFlowEntitlementRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartFlow = "StartFlow" - -// StartFlowRequest generates a "aws/request.Request" representing the -// client's request for the StartFlow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartFlow for more information on using the StartFlow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartFlowRequest method. -// req, resp := client.StartFlowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StartFlow -func (c *MediaConnect) StartFlowRequest(input *StartFlowInput) (req *request.Request, output *StartFlowOutput) { - op := &request.Operation{ - Name: opStartFlow, - HTTPMethod: "POST", - HTTPPath: "/v1/flows/start/{flowArn}", - } - - if input == nil { - input = &StartFlowInput{} - } - - output = &StartFlowOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartFlow API operation for AWS MediaConnect. -// -// Starts a flow. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation StartFlow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeNotFoundException "NotFoundException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StartFlow -func (c *MediaConnect) StartFlow(input *StartFlowInput) (*StartFlowOutput, error) { - req, out := c.StartFlowRequest(input) - return out, req.Send() -} - -// StartFlowWithContext is the same as StartFlow with the addition of -// the ability to pass a context and additional request options. -// -// See StartFlow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConnect) StartFlowWithContext(ctx aws.Context, input *StartFlowInput, opts ...request.Option) (*StartFlowOutput, error) { - req, out := c.StartFlowRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopFlow = "StopFlow" - -// StopFlowRequest generates a "aws/request.Request" representing the -// client's request for the StopFlow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopFlow for more information on using the StopFlow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopFlowRequest method. -// req, resp := client.StopFlowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StopFlow -func (c *MediaConnect) StopFlowRequest(input *StopFlowInput) (req *request.Request, output *StopFlowOutput) { - op := &request.Operation{ - Name: opStopFlow, - HTTPMethod: "POST", - HTTPPath: "/v1/flows/stop/{flowArn}", - } - - if input == nil { - input = &StopFlowInput{} - } - - output = &StopFlowOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopFlow API operation for AWS MediaConnect. -// -// Stops a flow. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation StopFlow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeNotFoundException "NotFoundException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StopFlow -func (c *MediaConnect) StopFlow(input *StopFlowInput) (*StopFlowOutput, error) { - req, out := c.StopFlowRequest(input) - return out, req.Send() -} - -// StopFlowWithContext is the same as StopFlow with the addition of -// the ability to pass a context and additional request options. -// -// See StopFlow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConnect) StopFlowWithContext(ctx aws.Context, input *StopFlowInput, opts ...request.Option) (*StopFlowOutput, error) { - req, out := c.StopFlowRequest(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/mediaconnect-2018-11-14/TagResource -func (c *MediaConnect) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/tags/{resourceArn}", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for AWS MediaConnect. -// -// Associates the specified tags to a resource. If the request does not mention -// an existing tag associated with the resource, that tag is not changed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/TagResource -func (c *MediaConnect) 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 *MediaConnect) 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/mediaconnect-2018-11-14/UntagResource -func (c *MediaConnect) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "DELETE", - HTTPPath: "/tags/{resourceArn}", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for AWS MediaConnect. -// -// Deletes the specified tags from a 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 MediaConnect's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UntagResource -func (c *MediaConnect) 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 *MediaConnect) 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 opUpdateFlowEntitlement = "UpdateFlowEntitlement" - -// UpdateFlowEntitlementRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFlowEntitlement operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFlowEntitlement for more information on using the UpdateFlowEntitlement -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFlowEntitlementRequest method. -// req, resp := client.UpdateFlowEntitlementRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowEntitlement -func (c *MediaConnect) UpdateFlowEntitlementRequest(input *UpdateFlowEntitlementInput) (req *request.Request, output *UpdateFlowEntitlementOutput) { - op := &request.Operation{ - Name: opUpdateFlowEntitlement, - HTTPMethod: "PUT", - HTTPPath: "/v1/flows/{flowArn}/entitlements/{entitlementArn}", - } - - if input == nil { - input = &UpdateFlowEntitlementInput{} - } - - output = &UpdateFlowEntitlementOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFlowEntitlement API operation for AWS MediaConnect. -// -// You can change an entitlement's description, subscribers, and encryption. -// If you change the subscribers, the service will remove the outputs that are -// are used by the subscribers that are removed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation UpdateFlowEntitlement for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeNotFoundException "NotFoundException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowEntitlement -func (c *MediaConnect) UpdateFlowEntitlement(input *UpdateFlowEntitlementInput) (*UpdateFlowEntitlementOutput, error) { - req, out := c.UpdateFlowEntitlementRequest(input) - return out, req.Send() -} - -// UpdateFlowEntitlementWithContext is the same as UpdateFlowEntitlement with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFlowEntitlement for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConnect) UpdateFlowEntitlementWithContext(ctx aws.Context, input *UpdateFlowEntitlementInput, opts ...request.Option) (*UpdateFlowEntitlementOutput, error) { - req, out := c.UpdateFlowEntitlementRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFlowOutput = "UpdateFlowOutput" - -// UpdateFlowOutputRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFlowOutput operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFlowOutput for more information on using the UpdateFlowOutput -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFlowOutputRequest method. -// req, resp := client.UpdateFlowOutputRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowOutput -func (c *MediaConnect) UpdateFlowOutputRequest(input *UpdateFlowOutputInput) (req *request.Request, output *UpdateFlowOutputOutput) { - op := &request.Operation{ - Name: opUpdateFlowOutput, - HTTPMethod: "PUT", - HTTPPath: "/v1/flows/{flowArn}/outputs/{outputArn}", - } - - if input == nil { - input = &UpdateFlowOutputInput{} - } - - output = &UpdateFlowOutputOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFlowOutput API operation for AWS MediaConnect. -// -// Updates an existing flow output. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation UpdateFlowOutput for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeNotFoundException "NotFoundException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowOutput -func (c *MediaConnect) UpdateFlowOutput(input *UpdateFlowOutputInput) (*UpdateFlowOutputOutput, error) { - req, out := c.UpdateFlowOutputRequest(input) - return out, req.Send() -} - -// UpdateFlowOutputWithContext is the same as UpdateFlowOutput with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFlowOutput for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConnect) UpdateFlowOutputWithContext(ctx aws.Context, input *UpdateFlowOutputInput, opts ...request.Option) (*UpdateFlowOutputOutput, error) { - req, out := c.UpdateFlowOutputRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFlowSource = "UpdateFlowSource" - -// UpdateFlowSourceRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFlowSource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFlowSource for more information on using the UpdateFlowSource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFlowSourceRequest method. -// req, resp := client.UpdateFlowSourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowSource -func (c *MediaConnect) UpdateFlowSourceRequest(input *UpdateFlowSourceInput) (req *request.Request, output *UpdateFlowSourceOutput) { - op := &request.Operation{ - Name: opUpdateFlowSource, - HTTPMethod: "PUT", - HTTPPath: "/v1/flows/{flowArn}/source/{sourceArn}", - } - - if input == nil { - input = &UpdateFlowSourceInput{} - } - - output = &UpdateFlowSourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFlowSource API operation for AWS MediaConnect. -// -// Updates the source of a flow. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS MediaConnect's -// API operation UpdateFlowSource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeNotFoundException "NotFoundException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Exception raised by AWS Elemental MediaConnect. See the error message and -// documentation for the operation for more information on the cause of this -// exception. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowSource -func (c *MediaConnect) UpdateFlowSource(input *UpdateFlowSourceInput) (*UpdateFlowSourceOutput, error) { - req, out := c.UpdateFlowSourceRequest(input) - return out, req.Send() -} - -// UpdateFlowSourceWithContext is the same as UpdateFlowSource with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFlowSource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConnect) UpdateFlowSourceWithContext(ctx aws.Context, input *UpdateFlowSourceInput, opts ...request.Option) (*UpdateFlowSourceOutput, error) { - req, out := c.UpdateFlowSourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Adds outputs to an existing flow. You can create up to 20 outputs per flow. -type AddFlowOutputsInput struct { - _ struct{} `type:"structure"` - - // FlowArn is a required field - FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` - - // A list of outputs that you want to add. - // - // Outputs is a required field - Outputs []*AddOutputRequest `locationName:"outputs" type:"list" required:"true"` -} - -// String returns the string representation -func (s AddFlowOutputsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddFlowOutputsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddFlowOutputsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddFlowOutputsInput"} - if s.FlowArn == nil { - invalidParams.Add(request.NewErrParamRequired("FlowArn")) - } - if s.FlowArn != nil && len(*s.FlowArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) - } - if s.Outputs == nil { - invalidParams.Add(request.NewErrParamRequired("Outputs")) - } - if s.Outputs != nil { - for i, v := range s.Outputs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Outputs", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFlowArn sets the FlowArn field's value. -func (s *AddFlowOutputsInput) SetFlowArn(v string) *AddFlowOutputsInput { - s.FlowArn = &v - return s -} - -// SetOutputs sets the Outputs field's value. -func (s *AddFlowOutputsInput) SetOutputs(v []*AddOutputRequest) *AddFlowOutputsInput { - s.Outputs = v - return s -} - -// The result of a successful AddOutput request. The response includes the details -// of the newly added outputs. -type AddFlowOutputsOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the flow that these outputs were added to. - FlowArn *string `locationName:"flowArn" type:"string"` - - // The details of the newly added outputs. - Outputs []*Output `locationName:"outputs" type:"list"` -} - -// String returns the string representation -func (s AddFlowOutputsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddFlowOutputsOutput) GoString() string { - return s.String() -} - -// SetFlowArn sets the FlowArn field's value. -func (s *AddFlowOutputsOutput) SetFlowArn(v string) *AddFlowOutputsOutput { - s.FlowArn = &v - return s -} - -// SetOutputs sets the Outputs field's value. -func (s *AddFlowOutputsOutput) SetOutputs(v []*Output) *AddFlowOutputsOutput { - s.Outputs = v - return s -} - -// The output that you want to add to this flow. -type AddOutputRequest struct { - _ struct{} `type:"structure"` - - // A description of the output. This description appears only on the AWS Elemental - // MediaConnect console and will not be seen by the end user. - Description *string `locationName:"description" type:"string"` - - // The IP address from which video will be sent to output destinations. - // - // Destination is a required field - Destination *string `locationName:"destination" type:"string" required:"true"` - - // The type of key used for the encryption. If no keyType is provided, the service - // will use the default setting (static-key). - Encryption *Encryption `locationName:"encryption" type:"structure"` - - // The maximum latency in milliseconds for Zixi-based streams. - MaxLatency *int64 `locationName:"maxLatency" type:"integer"` - - // The name of the output. This value must be unique within the current flow. - Name *string `locationName:"name" type:"string"` - - // The port to use when content is distributed to this output. - // - // Port is a required field - Port *int64 `locationName:"port" type:"integer" required:"true"` - - // The protocol to use for the output. - // - // Protocol is a required field - Protocol *string `locationName:"protocol" type:"string" required:"true" enum:"Protocol"` - - // The smoothing latency in milliseconds for RTP and RTP-FEC streams. - SmoothingLatency *int64 `locationName:"smoothingLatency" type:"integer"` - - // The stream ID that you want to use for this transport. This parameter applies - // only to Zixi-based streams. - StreamId *string `locationName:"streamId" type:"string"` -} - -// String returns the string representation -func (s AddOutputRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddOutputRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddOutputRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddOutputRequest"} - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - if s.Port == nil { - invalidParams.Add(request.NewErrParamRequired("Port")) - } - if s.Protocol == nil { - invalidParams.Add(request.NewErrParamRequired("Protocol")) - } - if s.Encryption != nil { - if err := s.Encryption.Validate(); err != nil { - invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *AddOutputRequest) SetDescription(v string) *AddOutputRequest { - s.Description = &v - return s -} - -// SetDestination sets the Destination field's value. -func (s *AddOutputRequest) SetDestination(v string) *AddOutputRequest { - s.Destination = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *AddOutputRequest) SetEncryption(v *Encryption) *AddOutputRequest { - s.Encryption = v - return s -} - -// SetMaxLatency sets the MaxLatency field's value. -func (s *AddOutputRequest) SetMaxLatency(v int64) *AddOutputRequest { - s.MaxLatency = &v - return s -} - -// SetName sets the Name field's value. -func (s *AddOutputRequest) SetName(v string) *AddOutputRequest { - s.Name = &v - return s -} - -// SetPort sets the Port field's value. -func (s *AddOutputRequest) SetPort(v int64) *AddOutputRequest { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *AddOutputRequest) SetProtocol(v string) *AddOutputRequest { - s.Protocol = &v - return s -} - -// SetSmoothingLatency sets the SmoothingLatency field's value. -func (s *AddOutputRequest) SetSmoothingLatency(v int64) *AddOutputRequest { - s.SmoothingLatency = &v - return s -} - -// SetStreamId sets the StreamId field's value. -func (s *AddOutputRequest) SetStreamId(v string) *AddOutputRequest { - s.StreamId = &v - return s -} - -// Creates a new flow. The request must include one source. The request optionally -// can include outputs (up to 20) and one entitlement. -type CreateFlowInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone that you want to create the flow in. These options - // are limited to the Availability Zones within the current AWS Region. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The entitlements that you want to grant on a flow. - Entitlements []*GrantEntitlementRequest `locationName:"entitlements" type:"list"` - - // The name of the flow. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The outputs that you want to add to this flow. - Outputs []*AddOutputRequest `locationName:"outputs" type:"list"` - - // The settings for the source of the flow. - // - // Source is a required field - Source *SetSourceRequest `locationName:"source" type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateFlowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFlowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFlowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFlowInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Source == nil { - invalidParams.Add(request.NewErrParamRequired("Source")) - } - if s.Entitlements != nil { - for i, v := range s.Entitlements { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entitlements", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Outputs != nil { - for i, v := range s.Outputs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Outputs", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Source != nil { - if err := s.Source.Validate(); err != nil { - invalidParams.AddNested("Source", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateFlowInput) SetAvailabilityZone(v string) *CreateFlowInput { - s.AvailabilityZone = &v - return s -} - -// SetEntitlements sets the Entitlements field's value. -func (s *CreateFlowInput) SetEntitlements(v []*GrantEntitlementRequest) *CreateFlowInput { - s.Entitlements = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateFlowInput) SetName(v string) *CreateFlowInput { - s.Name = &v - return s -} - -// SetOutputs sets the Outputs field's value. -func (s *CreateFlowInput) SetOutputs(v []*AddOutputRequest) *CreateFlowInput { - s.Outputs = v - return s -} - -// SetSource sets the Source field's value. -func (s *CreateFlowInput) SetSource(v *SetSourceRequest) *CreateFlowInput { - s.Source = v - return s -} - -// The result of a successful CreateFlow request. -type CreateFlowOutput struct { - _ struct{} `type:"structure"` - - // The settings for a flow, including its source, outputs, and entitlements. - Flow *Flow `locationName:"flow" type:"structure"` -} - -// String returns the string representation -func (s CreateFlowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFlowOutput) GoString() string { - return s.String() -} - -// SetFlow sets the Flow field's value. -func (s *CreateFlowOutput) SetFlow(v *Flow) *CreateFlowOutput { - s.Flow = v - return s -} - -type DeleteFlowInput struct { - _ struct{} `type:"structure"` - - // FlowArn is a required field - FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteFlowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFlowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFlowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFlowInput"} - if s.FlowArn == nil { - invalidParams.Add(request.NewErrParamRequired("FlowArn")) - } - if s.FlowArn != nil && len(*s.FlowArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFlowArn sets the FlowArn field's value. -func (s *DeleteFlowInput) SetFlowArn(v string) *DeleteFlowInput { - s.FlowArn = &v - return s -} - -// The result of a successful DeleteFlow request. -type DeleteFlowOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the flow that was deleted. - FlowArn *string `locationName:"flowArn" type:"string"` - - // The status of the flow when the DeleteFlow process begins. - Status *string `locationName:"status" type:"string" enum:"Status"` -} - -// String returns the string representation -func (s DeleteFlowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFlowOutput) GoString() string { - return s.String() -} - -// SetFlowArn sets the FlowArn field's value. -func (s *DeleteFlowOutput) SetFlowArn(v string) *DeleteFlowOutput { - s.FlowArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DeleteFlowOutput) SetStatus(v string) *DeleteFlowOutput { - s.Status = &v - return s -} - -type DescribeFlowInput struct { - _ struct{} `type:"structure"` - - // FlowArn is a required field - FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeFlowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFlowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFlowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFlowInput"} - if s.FlowArn == nil { - invalidParams.Add(request.NewErrParamRequired("FlowArn")) - } - if s.FlowArn != nil && len(*s.FlowArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFlowArn sets the FlowArn field's value. -func (s *DescribeFlowInput) SetFlowArn(v string) *DescribeFlowInput { - s.FlowArn = &v - return s -} - -// The result of a successful DescribeFlow request. -type DescribeFlowOutput struct { - _ struct{} `type:"structure"` - - // The settings for a flow, including its source, outputs, and entitlements. - Flow *Flow `locationName:"flow" type:"structure"` - - // Messages that provide the state of the flow. - Messages *Messages `locationName:"messages" type:"structure"` -} - -// String returns the string representation -func (s DescribeFlowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFlowOutput) GoString() string { - return s.String() -} - -// SetFlow sets the Flow field's value. -func (s *DescribeFlowOutput) SetFlow(v *Flow) *DescribeFlowOutput { - s.Flow = v - return s -} - -// SetMessages sets the Messages field's value. -func (s *DescribeFlowOutput) SetMessages(v *Messages) *DescribeFlowOutput { - s.Messages = v - return s -} - -// Information about the encryption of the flow. -type Encryption struct { - _ struct{} `type:"structure"` - - // The type of algorithm that is used for the encryption (such as aes128, aes192, - // or aes256). - // - // Algorithm is a required field - Algorithm *string `locationName:"algorithm" type:"string" required:"true" enum:"Algorithm"` - - // The type of key that is used for the encryption. If no keyType is provided, - // the service will use the default setting (static-key). - KeyType *string `locationName:"keyType" type:"string" enum:"KeyType"` - - // The ARN of the role that you created during setup (when you set up AWS Elemental - // MediaConnect as a trusted entity). - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` - - // The ARN that was assigned to the secret that you created in AWS Secrets Manager - // to store the encryption key. - // - // SecretArn is a required field - SecretArn *string `locationName:"secretArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s Encryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Encryption) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Encryption) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Encryption"} - if s.Algorithm == nil { - invalidParams.Add(request.NewErrParamRequired("Algorithm")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.SecretArn == nil { - invalidParams.Add(request.NewErrParamRequired("SecretArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlgorithm sets the Algorithm field's value. -func (s *Encryption) SetAlgorithm(v string) *Encryption { - s.Algorithm = &v - return s -} - -// SetKeyType sets the KeyType field's value. -func (s *Encryption) SetKeyType(v string) *Encryption { - s.KeyType = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *Encryption) SetRoleArn(v string) *Encryption { - s.RoleArn = &v - return s -} - -// SetSecretArn sets the SecretArn field's value. -func (s *Encryption) SetSecretArn(v string) *Encryption { - s.SecretArn = &v - return s -} - -// The settings for a flow entitlement. -type Entitlement struct { - _ struct{} `type:"structure"` - - // A description of the entitlement. - Description *string `locationName:"description" type:"string"` - - // The type of encryption that will be used on the output that is associated - // with this entitlement. - Encryption *Encryption `locationName:"encryption" type:"structure"` - - // The ARN of the entitlement. - // - // EntitlementArn is a required field - EntitlementArn *string `locationName:"entitlementArn" type:"string" required:"true"` - - // The name of the entitlement. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The AWS account IDs that you want to share your content with. The receiving - // accounts (subscribers) will be allowed to create their own flow using your - // content as the source. - // - // Subscribers is a required field - Subscribers []*string `locationName:"subscribers" type:"list" required:"true"` -} - -// String returns the string representation -func (s Entitlement) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Entitlement) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *Entitlement) SetDescription(v string) *Entitlement { - s.Description = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *Entitlement) SetEncryption(v *Encryption) *Entitlement { - s.Encryption = v - return s -} - -// SetEntitlementArn sets the EntitlementArn field's value. -func (s *Entitlement) SetEntitlementArn(v string) *Entitlement { - s.EntitlementArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *Entitlement) SetName(v string) *Entitlement { - s.Name = &v - return s -} - -// SetSubscribers sets the Subscribers field's value. -func (s *Entitlement) SetSubscribers(v []*string) *Entitlement { - s.Subscribers = v - return s -} - -// The settings for a flow, including its source, outputs, and entitlements. -type Flow struct { - _ struct{} `type:"structure"` - - // The Availability Zone that you want to create the flow in. These options - // are limited to the Availability Zones within the current AWS. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // A description of the flow. This value is not used or seen outside of the - // current AWS Elemental MediaConnect account. - Description *string `locationName:"description" type:"string"` - - // The IP address from which video will be sent to output destinations. - EgressIp *string `locationName:"egressIp" type:"string"` - - // The entitlements in this flow. - // - // Entitlements is a required field - Entitlements []*Entitlement `locationName:"entitlements" type:"list" required:"true"` - - // The Amazon Resource Name (ARN), a unique identifier for any AWS resource, - // of the flow. - // - // FlowArn is a required field - FlowArn *string `locationName:"flowArn" type:"string" required:"true"` - - // The name of the flow. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The outputs in this flow. - // - // Outputs is a required field - Outputs []*Output `locationName:"outputs" type:"list" required:"true"` - - // The settings for the source of the flow. - // - // Source is a required field - Source *Source `locationName:"source" type:"structure" required:"true"` - - // The current status of the flow. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"Status"` -} - -// String returns the string representation -func (s Flow) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Flow) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Flow) SetAvailabilityZone(v string) *Flow { - s.AvailabilityZone = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Flow) SetDescription(v string) *Flow { - s.Description = &v - return s -} - -// SetEgressIp sets the EgressIp field's value. -func (s *Flow) SetEgressIp(v string) *Flow { - s.EgressIp = &v - return s -} - -// SetEntitlements sets the Entitlements field's value. -func (s *Flow) SetEntitlements(v []*Entitlement) *Flow { - s.Entitlements = v - return s -} - -// SetFlowArn sets the FlowArn field's value. -func (s *Flow) SetFlowArn(v string) *Flow { - s.FlowArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *Flow) SetName(v string) *Flow { - s.Name = &v - return s -} - -// SetOutputs sets the Outputs field's value. -func (s *Flow) SetOutputs(v []*Output) *Flow { - s.Outputs = v - return s -} - -// SetSource sets the Source field's value. -func (s *Flow) SetSource(v *Source) *Flow { - s.Source = v - return s -} - -// SetStatus sets the Status field's value. -func (s *Flow) SetStatus(v string) *Flow { - s.Status = &v - return s -} - -// The entitlements that you want to grant on a flow. -type GrantEntitlementRequest struct { - _ struct{} `type:"structure"` - - // A description of the entitlement. This description appears only on the AWS - // Elemental MediaConnect console and will not be seen by the subscriber or - // end user. - Description *string `locationName:"description" type:"string"` - - // The type of encryption that will be used on the output that is associated - // with this entitlement. - Encryption *Encryption `locationName:"encryption" type:"structure"` - - // The name of the entitlement. This value must be unique within the current - // flow. - Name *string `locationName:"name" type:"string"` - - // The AWS account IDs that you want to share your content with. The receiving - // accounts (subscribers) will be allowed to create their own flows using your - // content as the source. - // - // Subscribers is a required field - Subscribers []*string `locationName:"subscribers" type:"list" required:"true"` -} - -// String returns the string representation -func (s GrantEntitlementRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GrantEntitlementRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GrantEntitlementRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GrantEntitlementRequest"} - if s.Subscribers == nil { - invalidParams.Add(request.NewErrParamRequired("Subscribers")) - } - if s.Encryption != nil { - if err := s.Encryption.Validate(); err != nil { - invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *GrantEntitlementRequest) SetDescription(v string) *GrantEntitlementRequest { - s.Description = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *GrantEntitlementRequest) SetEncryption(v *Encryption) *GrantEntitlementRequest { - s.Encryption = v - return s -} - -// SetName sets the Name field's value. -func (s *GrantEntitlementRequest) SetName(v string) *GrantEntitlementRequest { - s.Name = &v - return s -} - -// SetSubscribers sets the Subscribers field's value. -func (s *GrantEntitlementRequest) SetSubscribers(v []*string) *GrantEntitlementRequest { - s.Subscribers = v - return s -} - -// Grants an entitlement on a flow. -type GrantFlowEntitlementsInput struct { - _ struct{} `type:"structure"` - - // The list of entitlements that you want to grant. - // - // Entitlements is a required field - Entitlements []*GrantEntitlementRequest `locationName:"entitlements" type:"list" required:"true"` - - // FlowArn is a required field - FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s GrantFlowEntitlementsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GrantFlowEntitlementsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GrantFlowEntitlementsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GrantFlowEntitlementsInput"} - if s.Entitlements == nil { - invalidParams.Add(request.NewErrParamRequired("Entitlements")) - } - if s.FlowArn == nil { - invalidParams.Add(request.NewErrParamRequired("FlowArn")) - } - if s.FlowArn != nil && len(*s.FlowArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) - } - if s.Entitlements != nil { - for i, v := range s.Entitlements { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entitlements", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEntitlements sets the Entitlements field's value. -func (s *GrantFlowEntitlementsInput) SetEntitlements(v []*GrantEntitlementRequest) *GrantFlowEntitlementsInput { - s.Entitlements = v - return s -} - -// SetFlowArn sets the FlowArn field's value. -func (s *GrantFlowEntitlementsInput) SetFlowArn(v string) *GrantFlowEntitlementsInput { - s.FlowArn = &v - return s -} - -// The entitlements that were just granted. -type GrantFlowEntitlementsOutput struct { - _ struct{} `type:"structure"` - - // The entitlements that were just granted. - Entitlements []*Entitlement `locationName:"entitlements" type:"list"` - - // The ARN of the flow that these entitlements were granted to. - FlowArn *string `locationName:"flowArn" type:"string"` -} - -// String returns the string representation -func (s GrantFlowEntitlementsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GrantFlowEntitlementsOutput) GoString() string { - return s.String() -} - -// SetEntitlements sets the Entitlements field's value. -func (s *GrantFlowEntitlementsOutput) SetEntitlements(v []*Entitlement) *GrantFlowEntitlementsOutput { - s.Entitlements = v - return s -} - -// SetFlowArn sets the FlowArn field's value. -func (s *GrantFlowEntitlementsOutput) SetFlowArn(v string) *GrantFlowEntitlementsOutput { - s.FlowArn = &v - return s -} - -type ListEntitlementsInput struct { - _ struct{} `type:"structure"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListEntitlementsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEntitlementsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListEntitlementsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListEntitlementsInput"} - 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 *ListEntitlementsInput) SetMaxResults(v int64) *ListEntitlementsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEntitlementsInput) SetNextToken(v string) *ListEntitlementsInput { - s.NextToken = &v - return s -} - -// The result of a successful ListEntitlements request. The response includes -// the ARN of each entitlement, the name of the associated flow, and the NextToken -// to use in a subsequent ListEntitlements request. -type ListEntitlementsOutput struct { - _ struct{} `type:"structure"` - - // A list of entitlements that have been granted to you from other AWS accounts. - Entitlements []*ListedEntitlement `locationName:"entitlements" type:"list"` - - // The token that identifies which batch of results that you want to see. For - // example, you submit a ListEntitlements request with MaxResults set at 5. - // The service returns the first batch of results (up to 5) and a NextToken - // value. To see the next batch of results, you can submit the ListEntitlements - // request a second time and specify the NextToken value. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListEntitlementsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEntitlementsOutput) GoString() string { - return s.String() -} - -// SetEntitlements sets the Entitlements field's value. -func (s *ListEntitlementsOutput) SetEntitlements(v []*ListedEntitlement) *ListEntitlementsOutput { - s.Entitlements = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEntitlementsOutput) SetNextToken(v string) *ListEntitlementsOutput { - s.NextToken = &v - return s -} - -type ListFlowsInput struct { - _ struct{} `type:"structure"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListFlowsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFlowsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListFlowsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListFlowsInput"} - 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 *ListFlowsInput) SetMaxResults(v int64) *ListFlowsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListFlowsInput) SetNextToken(v string) *ListFlowsInput { - s.NextToken = &v - return s -} - -// The result of a successful ListFlows request. The response includes flow -// summaries and the NextToken to use in a subsequent ListFlows request. -type ListFlowsOutput struct { - _ struct{} `type:"structure"` - - // A list of flow summaries. - Flows []*ListedFlow `locationName:"flows" type:"list"` - - // The token that identifies which batch of results that you want to see. For - // example, you submit a ListFlows request with MaxResults set at 5. The service - // returns the first batch of results (up to 5) and a NextToken value. To see - // the next batch of results, you can submit the ListFlows request a second - // time and specify the NextToken value. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListFlowsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFlowsOutput) GoString() string { - return s.String() -} - -// SetFlows sets the Flows field's value. -func (s *ListFlowsOutput) SetFlows(v []*ListedFlow) *ListFlowsOutput { - s.Flows = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListFlowsOutput) SetNextToken(v string) *ListFlowsOutput { - s.NextToken = &v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // ResourceArn is a required field - ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { - s.ResourceArn = &v - return s -} - -// AWS Elemental MediaConnect listed the tags associated with the resource. -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // A map from tag keys to values. Tag keys can have a maximum character length - // of 128 characters, and tag values can have a maximum length of 256 characters. - 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 -} - -// An entitlement that has been granted to you from other AWS accounts. -type ListedEntitlement struct { - _ struct{} `type:"structure"` - - // The ARN of the entitlement. - // - // EntitlementArn is a required field - EntitlementArn *string `locationName:"entitlementArn" type:"string" required:"true"` - - // The name of the entitlement. - // - // EntitlementName is a required field - EntitlementName *string `locationName:"entitlementName" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListedEntitlement) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListedEntitlement) GoString() string { - return s.String() -} - -// SetEntitlementArn sets the EntitlementArn field's value. -func (s *ListedEntitlement) SetEntitlementArn(v string) *ListedEntitlement { - s.EntitlementArn = &v - return s -} - -// SetEntitlementName sets the EntitlementName field's value. -func (s *ListedEntitlement) SetEntitlementName(v string) *ListedEntitlement { - s.EntitlementName = &v - return s -} - -// Provides a summary of a flow, including its ARN, Availability Zone, and source -// type. -type ListedFlow struct { - _ struct{} `type:"structure"` - - // The Availability Zone that the flow was created in. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // A description of the flow. - // - // Description is a required field - Description *string `locationName:"description" type:"string" required:"true"` - - // The ARN of the flow. - // - // FlowArn is a required field - FlowArn *string `locationName:"flowArn" type:"string" required:"true"` - - // The name of the flow. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The type of source. This value is either owned (originated somewhere other - // than an AWS Elemental MediaConnect flow owned by another AWS account) or - // entitled (originated at an AWS Elemental MediaConnect flow owned by another - // AWS account). - // - // SourceType is a required field - SourceType *string `locationName:"sourceType" type:"string" required:"true" enum:"SourceType"` - - // The current status of the flow. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"Status"` -} - -// String returns the string representation -func (s ListedFlow) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListedFlow) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ListedFlow) SetAvailabilityZone(v string) *ListedFlow { - s.AvailabilityZone = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ListedFlow) SetDescription(v string) *ListedFlow { - s.Description = &v - return s -} - -// SetFlowArn sets the FlowArn field's value. -func (s *ListedFlow) SetFlowArn(v string) *ListedFlow { - s.FlowArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *ListedFlow) SetName(v string) *ListedFlow { - s.Name = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *ListedFlow) SetSourceType(v string) *ListedFlow { - s.SourceType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ListedFlow) SetStatus(v string) *ListedFlow { - s.Status = &v - return s -} - -// Messages that provide the state of the flow. -type Messages struct { - _ struct{} `type:"structure"` - - // A list of errors that might have been generated from processes on this flow. - // - // Errors is a required field - Errors []*string `locationName:"errors" type:"list" required:"true"` -} - -// String returns the string representation -func (s Messages) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Messages) GoString() string { - return s.String() -} - -// SetErrors sets the Errors field's value. -func (s *Messages) SetErrors(v []*string) *Messages { - s.Errors = v - return s -} - -// The settings for an output. -type Output struct { - _ struct{} `type:"structure"` - - // A description of the output. - Description *string `locationName:"description" type:"string"` - - // The address where you want to send the output. - Destination *string `locationName:"destination" type:"string"` - - // The type of key used for the encryption. If no keyType is provided, the service - // will use the default setting (static-key). - Encryption *Encryption `locationName:"encryption" type:"structure"` - - // The ARN of the entitlement on the originator''s flow. This value is relevant - // only on entitled flows. - EntitlementArn *string `locationName:"entitlementArn" type:"string"` - - // The input ARN of the AWS Elemental MediaLive channel. This parameter is relevant - // only for outputs that were added by creating a MediaLive input. - MediaLiveInputArn *string `locationName:"mediaLiveInputArn" type:"string"` - - // The name of the output. This value must be unique within the current flow. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The ARN of the output. - // - // OutputArn is a required field - OutputArn *string `locationName:"outputArn" type:"string" required:"true"` - - // The port to use when content is distributed to this output. - Port *int64 `locationName:"port" type:"integer"` - - // Attributes related to the transport stream that are used in the output. - Transport *Transport `locationName:"transport" type:"structure"` -} - -// String returns the string representation -func (s Output) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Output) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *Output) SetDescription(v string) *Output { - s.Description = &v - return s -} - -// SetDestination sets the Destination field's value. -func (s *Output) SetDestination(v string) *Output { - s.Destination = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *Output) SetEncryption(v *Encryption) *Output { - s.Encryption = v - return s -} - -// SetEntitlementArn sets the EntitlementArn field's value. -func (s *Output) SetEntitlementArn(v string) *Output { - s.EntitlementArn = &v - return s -} - -// SetMediaLiveInputArn sets the MediaLiveInputArn field's value. -func (s *Output) SetMediaLiveInputArn(v string) *Output { - s.MediaLiveInputArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *Output) SetName(v string) *Output { - s.Name = &v - return s -} - -// SetOutputArn sets the OutputArn field's value. -func (s *Output) SetOutputArn(v string) *Output { - s.OutputArn = &v - return s -} - -// SetPort sets the Port field's value. -func (s *Output) SetPort(v int64) *Output { - s.Port = &v - return s -} - -// SetTransport sets the Transport field's value. -func (s *Output) SetTransport(v *Transport) *Output { - s.Transport = v - return s -} - -type RemoveFlowOutputInput struct { - _ struct{} `type:"structure"` - - // FlowArn is a required field - FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` - - // OutputArn is a required field - OutputArn *string `location:"uri" locationName:"outputArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s RemoveFlowOutputInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveFlowOutputInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveFlowOutputInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveFlowOutputInput"} - if s.FlowArn == nil { - invalidParams.Add(request.NewErrParamRequired("FlowArn")) - } - if s.FlowArn != nil && len(*s.FlowArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) - } - if s.OutputArn == nil { - invalidParams.Add(request.NewErrParamRequired("OutputArn")) - } - if s.OutputArn != nil && len(*s.OutputArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OutputArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFlowArn sets the FlowArn field's value. -func (s *RemoveFlowOutputInput) SetFlowArn(v string) *RemoveFlowOutputInput { - s.FlowArn = &v - return s -} - -// SetOutputArn sets the OutputArn field's value. -func (s *RemoveFlowOutputInput) SetOutputArn(v string) *RemoveFlowOutputInput { - s.OutputArn = &v - return s -} - -// The result of a successful RemoveFlowOutput request including the flow ARN -// and the output ARN that was removed. -type RemoveFlowOutputOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the flow that is associated with the output you removed. - FlowArn *string `locationName:"flowArn" type:"string"` - - // The ARN of the output that was removed. - OutputArn *string `locationName:"outputArn" type:"string"` -} - -// String returns the string representation -func (s RemoveFlowOutputOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveFlowOutputOutput) GoString() string { - return s.String() -} - -// SetFlowArn sets the FlowArn field's value. -func (s *RemoveFlowOutputOutput) SetFlowArn(v string) *RemoveFlowOutputOutput { - s.FlowArn = &v - return s -} - -// SetOutputArn sets the OutputArn field's value. -func (s *RemoveFlowOutputOutput) SetOutputArn(v string) *RemoveFlowOutputOutput { - s.OutputArn = &v - return s -} - -type RevokeFlowEntitlementInput struct { - _ struct{} `type:"structure"` - - // EntitlementArn is a required field - EntitlementArn *string `location:"uri" locationName:"entitlementArn" type:"string" required:"true"` - - // FlowArn is a required field - FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s RevokeFlowEntitlementInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeFlowEntitlementInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RevokeFlowEntitlementInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RevokeFlowEntitlementInput"} - if s.EntitlementArn == nil { - invalidParams.Add(request.NewErrParamRequired("EntitlementArn")) - } - if s.EntitlementArn != nil && len(*s.EntitlementArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EntitlementArn", 1)) - } - if s.FlowArn == nil { - invalidParams.Add(request.NewErrParamRequired("FlowArn")) - } - if s.FlowArn != nil && len(*s.FlowArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEntitlementArn sets the EntitlementArn field's value. -func (s *RevokeFlowEntitlementInput) SetEntitlementArn(v string) *RevokeFlowEntitlementInput { - s.EntitlementArn = &v - return s -} - -// SetFlowArn sets the FlowArn field's value. -func (s *RevokeFlowEntitlementInput) SetFlowArn(v string) *RevokeFlowEntitlementInput { - s.FlowArn = &v - return s -} - -// The result of a successful RevokeFlowEntitlement request. The response includes -// the ARN of the flow that was updated and the ARN of the entitlement that -// was revoked. -type RevokeFlowEntitlementOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the entitlement that was revoked. - EntitlementArn *string `locationName:"entitlementArn" type:"string"` - - // The ARN of the flow that the entitlement was revoked from. - FlowArn *string `locationName:"flowArn" type:"string"` -} - -// String returns the string representation -func (s RevokeFlowEntitlementOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeFlowEntitlementOutput) GoString() string { - return s.String() -} - -// SetEntitlementArn sets the EntitlementArn field's value. -func (s *RevokeFlowEntitlementOutput) SetEntitlementArn(v string) *RevokeFlowEntitlementOutput { - s.EntitlementArn = &v - return s -} - -// SetFlowArn sets the FlowArn field's value. -func (s *RevokeFlowEntitlementOutput) SetFlowArn(v string) *RevokeFlowEntitlementOutput { - s.FlowArn = &v - return s -} - -// The settings for the source of the flow. -type SetSourceRequest struct { - _ struct{} `type:"structure"` - - // The type of encryption that is used on the content ingested from this source. - Decryption *Encryption `locationName:"decryption" type:"structure"` - - // A description for the source. This value is not used or seen outside of the - // current AWS Elemental MediaConnect account. - Description *string `locationName:"description" type:"string"` - - // The ARN of the entitlement that allows you to subscribe to this flow. The - // entitlement is set by the flow originator, and the ARN is generated as part - // of the originator's flow. - EntitlementArn *string `locationName:"entitlementArn" type:"string"` - - // The port that the flow will be listening on for incoming content. - IngestPort *int64 `locationName:"ingestPort" type:"integer"` - - // The smoothing max bitrate for RTP and RTP-FEC streams. - MaxBitrate *int64 `locationName:"maxBitrate" type:"integer"` - - // The maximum latency in milliseconds for Zixi-based streams. - MaxLatency *int64 `locationName:"maxLatency" type:"integer"` - - // The name of the source. - Name *string `locationName:"name" type:"string"` - - // The protocol that is used by the source. - Protocol *string `locationName:"protocol" type:"string" enum:"Protocol"` - - // The stream ID that you want to use for this transport. This parameter applies - // only to Zixi-based streams. - StreamId *string `locationName:"streamId" type:"string"` - - // The range of IP addresses that should be allowed to contribute content to - // your source. These IP addresses should in the form of a Classless Inter-Domain - // Routing (CIDR) block; for example, 10.0.0.0/16. - WhitelistCidr *string `locationName:"whitelistCidr" type:"string"` -} - -// String returns the string representation -func (s SetSourceRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetSourceRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetSourceRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetSourceRequest"} - if s.Decryption != nil { - if err := s.Decryption.Validate(); err != nil { - invalidParams.AddNested("Decryption", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDecryption sets the Decryption field's value. -func (s *SetSourceRequest) SetDecryption(v *Encryption) *SetSourceRequest { - s.Decryption = v - return s -} - -// SetDescription sets the Description field's value. -func (s *SetSourceRequest) SetDescription(v string) *SetSourceRequest { - s.Description = &v - return s -} - -// SetEntitlementArn sets the EntitlementArn field's value. -func (s *SetSourceRequest) SetEntitlementArn(v string) *SetSourceRequest { - s.EntitlementArn = &v - return s -} - -// SetIngestPort sets the IngestPort field's value. -func (s *SetSourceRequest) SetIngestPort(v int64) *SetSourceRequest { - s.IngestPort = &v - return s -} - -// SetMaxBitrate sets the MaxBitrate field's value. -func (s *SetSourceRequest) SetMaxBitrate(v int64) *SetSourceRequest { - s.MaxBitrate = &v - return s -} - -// SetMaxLatency sets the MaxLatency field's value. -func (s *SetSourceRequest) SetMaxLatency(v int64) *SetSourceRequest { - s.MaxLatency = &v - return s -} - -// SetName sets the Name field's value. -func (s *SetSourceRequest) SetName(v string) *SetSourceRequest { - s.Name = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *SetSourceRequest) SetProtocol(v string) *SetSourceRequest { - s.Protocol = &v - return s -} - -// SetStreamId sets the StreamId field's value. -func (s *SetSourceRequest) SetStreamId(v string) *SetSourceRequest { - s.StreamId = &v - return s -} - -// SetWhitelistCidr sets the WhitelistCidr field's value. -func (s *SetSourceRequest) SetWhitelistCidr(v string) *SetSourceRequest { - s.WhitelistCidr = &v - return s -} - -// The settings for the source of the flow. -type Source struct { - _ struct{} `type:"structure"` - - // The type of encryption that is used on the content ingested from this source. - Decryption *Encryption `locationName:"decryption" type:"structure"` - - // A description for the source. This value is not used or seen outside of the - // current AWS Elemental MediaConnect account. - Description *string `locationName:"description" type:"string"` - - // The ARN of the entitlement that allows you to subscribe to content that comes - // from another AWS account. The entitlement is set by the content originator - // and the ARN is generated as part of the originator's flow. - EntitlementArn *string `locationName:"entitlementArn" type:"string"` - - // The IP address that the flow will be listening on for incoming content. - IngestIp *string `locationName:"ingestIp" type:"string"` - - // The port that the flow will be listening on for incoming content. - IngestPort *int64 `locationName:"ingestPort" type:"integer"` - - // The name of the source. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The ARN of the source. - // - // SourceArn is a required field - SourceArn *string `locationName:"sourceArn" type:"string" required:"true"` - - // Attributes related to the transport stream that are used in the source. - Transport *Transport `locationName:"transport" type:"structure"` - - // The range of IP addresses that should be allowed to contribute content to - // your source. These IP addresses should in the form of a Classless Inter-Domain - // Routing (CIDR) block; for example, 10.0.0.0/16. - WhitelistCidr *string `locationName:"whitelistCidr" type:"string"` -} - -// String returns the string representation -func (s Source) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Source) GoString() string { - return s.String() -} - -// SetDecryption sets the Decryption field's value. -func (s *Source) SetDecryption(v *Encryption) *Source { - s.Decryption = v - return s -} - -// SetDescription sets the Description field's value. -func (s *Source) SetDescription(v string) *Source { - s.Description = &v - return s -} - -// SetEntitlementArn sets the EntitlementArn field's value. -func (s *Source) SetEntitlementArn(v string) *Source { - s.EntitlementArn = &v - return s -} - -// SetIngestIp sets the IngestIp field's value. -func (s *Source) SetIngestIp(v string) *Source { - s.IngestIp = &v - return s -} - -// SetIngestPort sets the IngestPort field's value. -func (s *Source) SetIngestPort(v int64) *Source { - s.IngestPort = &v - return s -} - -// SetName sets the Name field's value. -func (s *Source) SetName(v string) *Source { - s.Name = &v - return s -} - -// SetSourceArn sets the SourceArn field's value. -func (s *Source) SetSourceArn(v string) *Source { - s.SourceArn = &v - return s -} - -// SetTransport sets the Transport field's value. -func (s *Source) SetTransport(v *Transport) *Source { - s.Transport = v - return s -} - -// SetWhitelistCidr sets the WhitelistCidr field's value. -func (s *Source) SetWhitelistCidr(v string) *Source { - s.WhitelistCidr = &v - return s -} - -type StartFlowInput struct { - _ struct{} `type:"structure"` - - // FlowArn is a required field - FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartFlowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartFlowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartFlowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartFlowInput"} - if s.FlowArn == nil { - invalidParams.Add(request.NewErrParamRequired("FlowArn")) - } - if s.FlowArn != nil && len(*s.FlowArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFlowArn sets the FlowArn field's value. -func (s *StartFlowInput) SetFlowArn(v string) *StartFlowInput { - s.FlowArn = &v - return s -} - -// The result of a successful StartFlow request. -type StartFlowOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the flow that you started. - FlowArn *string `locationName:"flowArn" type:"string"` - - // The status of the flow when the StartFlow process begins. - Status *string `locationName:"status" type:"string" enum:"Status"` -} - -// String returns the string representation -func (s StartFlowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartFlowOutput) GoString() string { - return s.String() -} - -// SetFlowArn sets the FlowArn field's value. -func (s *StartFlowOutput) SetFlowArn(v string) *StartFlowOutput { - s.FlowArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StartFlowOutput) SetStatus(v string) *StartFlowOutput { - s.Status = &v - return s -} - -type StopFlowInput struct { - _ struct{} `type:"structure"` - - // FlowArn is a required field - FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopFlowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopFlowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopFlowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopFlowInput"} - if s.FlowArn == nil { - invalidParams.Add(request.NewErrParamRequired("FlowArn")) - } - if s.FlowArn != nil && len(*s.FlowArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFlowArn sets the FlowArn field's value. -func (s *StopFlowInput) SetFlowArn(v string) *StopFlowInput { - s.FlowArn = &v - return s -} - -// The result of a successful StopFlow request. -type StopFlowOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the flow that you stopped. - FlowArn *string `locationName:"flowArn" type:"string"` - - // The status of the flow when the StopFlow process begins. - Status *string `locationName:"status" type:"string" enum:"Status"` -} - -// String returns the string representation -func (s StopFlowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopFlowOutput) GoString() string { - return s.String() -} - -// SetFlowArn sets the FlowArn field's value. -func (s *StopFlowOutput) SetFlowArn(v string) *StopFlowOutput { - s.FlowArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StopFlowOutput) SetStatus(v string) *StopFlowOutput { - s.Status = &v - return s -} - -// The tags to add to the resource. Tag keys can have a maximum character length -// of 128 characters, and tag values can have a maximum length of 256 characters. -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // ResourceArn is a required field - ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` - - // A map from tag keys to values. Tag keys can have a maximum character length - // of 128 characters, and tag values can have a maximum length of 256 characters. - // - // Tags is a required field - Tags map[string]*string `locationName:"tags" type:"map" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v 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() -} - -// Attributes related to the transport stream that are used in a source or output. -type Transport struct { - _ struct{} `type:"structure"` - - // The smoothing max bitrate for RTP and RTP-FEC streams. - MaxBitrate *int64 `locationName:"maxBitrate" type:"integer"` - - // The maximum latency in milliseconds for Zixi-based streams. - MaxLatency *int64 `locationName:"maxLatency" type:"integer"` - - // The protocol that is used by the source or output. - // - // Protocol is a required field - Protocol *string `locationName:"protocol" type:"string" required:"true" enum:"Protocol"` - - // The smoothing latency in milliseconds for RTP and RTP-FEC streams. - SmoothingLatency *int64 `locationName:"smoothingLatency" type:"integer"` - - // The stream ID that you want to use for this transport. This parameter applies - // only to Zixi-based streams. - StreamId *string `locationName:"streamId" type:"string"` -} - -// String returns the string representation -func (s Transport) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Transport) GoString() string { - return s.String() -} - -// SetMaxBitrate sets the MaxBitrate field's value. -func (s *Transport) SetMaxBitrate(v int64) *Transport { - s.MaxBitrate = &v - return s -} - -// SetMaxLatency sets the MaxLatency field's value. -func (s *Transport) SetMaxLatency(v int64) *Transport { - s.MaxLatency = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *Transport) SetProtocol(v string) *Transport { - s.Protocol = &v - return s -} - -// SetSmoothingLatency sets the SmoothingLatency field's value. -func (s *Transport) SetSmoothingLatency(v int64) *Transport { - s.SmoothingLatency = &v - return s -} - -// SetStreamId sets the StreamId field's value. -func (s *Transport) SetStreamId(v string) *Transport { - s.StreamId = &v - return s -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // ResourceArn is a required field - ResourceArn *string `location:"uri" locationName:"resourceArn" 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 about the encryption of the flow. -type UpdateEncryption struct { - _ struct{} `type:"structure"` - - // The type of algorithm that is used for the encryption (such as aes128, aes192, - // or aes256). - Algorithm *string `locationName:"algorithm" type:"string" enum:"Algorithm"` - - // The type of key that is used for the encryption. If no keyType is provided, - // the service will use the default setting (static-key). - KeyType *string `locationName:"keyType" type:"string" enum:"KeyType"` - - // The ARN of the role that you created during setup (when you set up AWS Elemental - // MediaConnect as a trusted entity). - RoleArn *string `locationName:"roleArn" type:"string"` - - // The ARN that was assigned to the secret that you created in AWS Secrets Manager - // to store the encryption key. - SecretArn *string `locationName:"secretArn" type:"string"` -} - -// String returns the string representation -func (s UpdateEncryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEncryption) GoString() string { - return s.String() -} - -// SetAlgorithm sets the Algorithm field's value. -func (s *UpdateEncryption) SetAlgorithm(v string) *UpdateEncryption { - s.Algorithm = &v - return s -} - -// SetKeyType sets the KeyType field's value. -func (s *UpdateEncryption) SetKeyType(v string) *UpdateEncryption { - s.KeyType = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *UpdateEncryption) SetRoleArn(v string) *UpdateEncryption { - s.RoleArn = &v - return s -} - -// SetSecretArn sets the SecretArn field's value. -func (s *UpdateEncryption) SetSecretArn(v string) *UpdateEncryption { - s.SecretArn = &v - return s -} - -// The updates that you want to make to a specific entitlement. -type UpdateFlowEntitlementInput struct { - _ struct{} `type:"structure"` - - // A description of the entitlement. This description appears only on the AWS - // Elemental MediaConnect console and will not be seen by the subscriber or - // end user. - Description *string `locationName:"description" type:"string"` - - // The type of encryption that will be used on the output associated with this - // entitlement. - Encryption *UpdateEncryption `locationName:"encryption" type:"structure"` - - // EntitlementArn is a required field - EntitlementArn *string `location:"uri" locationName:"entitlementArn" type:"string" required:"true"` - - // FlowArn is a required field - FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` - - // The AWS account IDs that you want to share your content with. The receiving - // accounts (subscribers) will be allowed to create their own flow using your - // content as the source. - Subscribers []*string `locationName:"subscribers" type:"list"` -} - -// String returns the string representation -func (s UpdateFlowEntitlementInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFlowEntitlementInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFlowEntitlementInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFlowEntitlementInput"} - if s.EntitlementArn == nil { - invalidParams.Add(request.NewErrParamRequired("EntitlementArn")) - } - if s.EntitlementArn != nil && len(*s.EntitlementArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EntitlementArn", 1)) - } - if s.FlowArn == nil { - invalidParams.Add(request.NewErrParamRequired("FlowArn")) - } - if s.FlowArn != nil && len(*s.FlowArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateFlowEntitlementInput) SetDescription(v string) *UpdateFlowEntitlementInput { - s.Description = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *UpdateFlowEntitlementInput) SetEncryption(v *UpdateEncryption) *UpdateFlowEntitlementInput { - s.Encryption = v - return s -} - -// SetEntitlementArn sets the EntitlementArn field's value. -func (s *UpdateFlowEntitlementInput) SetEntitlementArn(v string) *UpdateFlowEntitlementInput { - s.EntitlementArn = &v - return s -} - -// SetFlowArn sets the FlowArn field's value. -func (s *UpdateFlowEntitlementInput) SetFlowArn(v string) *UpdateFlowEntitlementInput { - s.FlowArn = &v - return s -} - -// SetSubscribers sets the Subscribers field's value. -func (s *UpdateFlowEntitlementInput) SetSubscribers(v []*string) *UpdateFlowEntitlementInput { - s.Subscribers = v - return s -} - -// The result of a successful UpdateFlowEntitlement request. The response includes -// the ARN of the flow that was updated and the updated entitlement configuration. -type UpdateFlowEntitlementOutput struct { - _ struct{} `type:"structure"` - - // The settings for a flow entitlement. - Entitlement *Entitlement `locationName:"entitlement" type:"structure"` - - // The ARN of the flow that this entitlement was granted on. - FlowArn *string `locationName:"flowArn" type:"string"` -} - -// String returns the string representation -func (s UpdateFlowEntitlementOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFlowEntitlementOutput) GoString() string { - return s.String() -} - -// SetEntitlement sets the Entitlement field's value. -func (s *UpdateFlowEntitlementOutput) SetEntitlement(v *Entitlement) *UpdateFlowEntitlementOutput { - s.Entitlement = v - return s -} - -// SetFlowArn sets the FlowArn field's value. -func (s *UpdateFlowEntitlementOutput) SetFlowArn(v string) *UpdateFlowEntitlementOutput { - s.FlowArn = &v - return s -} - -// The updates that you want to make to an existing output of an existing flow. -type UpdateFlowOutputInput struct { - _ struct{} `type:"structure"` - - // A description of the output. This description appears only on the AWS Elemental - // MediaConnect console and will not be seen by the end user. - Description *string `locationName:"description" type:"string"` - - // The IP address where you want to send the output. - Destination *string `locationName:"destination" type:"string"` - - // The type of key used for the encryption. If no keyType is provided, the service - // will use the default setting (static-key). - Encryption *UpdateEncryption `locationName:"encryption" type:"structure"` - - // FlowArn is a required field - FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` - - // The maximum latency in milliseconds for Zixi-based streams. - MaxLatency *int64 `locationName:"maxLatency" type:"integer"` - - // OutputArn is a required field - OutputArn *string `location:"uri" locationName:"outputArn" type:"string" required:"true"` - - // The port to use when content is distributed to this output. - Port *int64 `locationName:"port" type:"integer"` - - // The protocol to use for the output. - Protocol *string `locationName:"protocol" type:"string" enum:"Protocol"` - - // The smoothing latency in milliseconds for RTP and RTP-FEC streams. - SmoothingLatency *int64 `locationName:"smoothingLatency" type:"integer"` - - // The stream ID that you want to use for this transport. This parameter applies - // only to Zixi-based streams. - StreamId *string `locationName:"streamId" type:"string"` -} - -// String returns the string representation -func (s UpdateFlowOutputInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFlowOutputInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFlowOutputInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFlowOutputInput"} - if s.FlowArn == nil { - invalidParams.Add(request.NewErrParamRequired("FlowArn")) - } - if s.FlowArn != nil && len(*s.FlowArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) - } - if s.OutputArn == nil { - invalidParams.Add(request.NewErrParamRequired("OutputArn")) - } - if s.OutputArn != nil && len(*s.OutputArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OutputArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateFlowOutputInput) SetDescription(v string) *UpdateFlowOutputInput { - s.Description = &v - return s -} - -// SetDestination sets the Destination field's value. -func (s *UpdateFlowOutputInput) SetDestination(v string) *UpdateFlowOutputInput { - s.Destination = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *UpdateFlowOutputInput) SetEncryption(v *UpdateEncryption) *UpdateFlowOutputInput { - s.Encryption = v - return s -} - -// SetFlowArn sets the FlowArn field's value. -func (s *UpdateFlowOutputInput) SetFlowArn(v string) *UpdateFlowOutputInput { - s.FlowArn = &v - return s -} - -// SetMaxLatency sets the MaxLatency field's value. -func (s *UpdateFlowOutputInput) SetMaxLatency(v int64) *UpdateFlowOutputInput { - s.MaxLatency = &v - return s -} - -// SetOutputArn sets the OutputArn field's value. -func (s *UpdateFlowOutputInput) SetOutputArn(v string) *UpdateFlowOutputInput { - s.OutputArn = &v - return s -} - -// SetPort sets the Port field's value. -func (s *UpdateFlowOutputInput) SetPort(v int64) *UpdateFlowOutputInput { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *UpdateFlowOutputInput) SetProtocol(v string) *UpdateFlowOutputInput { - s.Protocol = &v - return s -} - -// SetSmoothingLatency sets the SmoothingLatency field's value. -func (s *UpdateFlowOutputInput) SetSmoothingLatency(v int64) *UpdateFlowOutputInput { - s.SmoothingLatency = &v - return s -} - -// SetStreamId sets the StreamId field's value. -func (s *UpdateFlowOutputInput) SetStreamId(v string) *UpdateFlowOutputInput { - s.StreamId = &v - return s -} - -// The result of a successful UpdateFlowOutput request including the flow ARN -// and the updated output. -type UpdateFlowOutputOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the flow that is associated with the updated output. - FlowArn *string `locationName:"flowArn" type:"string"` - - // The settings for an output. - Output *Output `locationName:"output" type:"structure"` -} - -// String returns the string representation -func (s UpdateFlowOutputOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFlowOutputOutput) GoString() string { - return s.String() -} - -// SetFlowArn sets the FlowArn field's value. -func (s *UpdateFlowOutputOutput) SetFlowArn(v string) *UpdateFlowOutputOutput { - s.FlowArn = &v - return s -} - -// SetOutput sets the Output field's value. -func (s *UpdateFlowOutputOutput) SetOutput(v *Output) *UpdateFlowOutputOutput { - s.Output = v - return s -} - -// The settings for the updated source of the flow. -type UpdateFlowSourceInput struct { - _ struct{} `type:"structure"` - - // The type of encryption used on the content ingested from this source. - Decryption *UpdateEncryption `locationName:"decryption" type:"structure"` - - // A description for the source. This value is not used or seen outside of the - // current AWS Elemental MediaConnect account. - Description *string `locationName:"description" type:"string"` - - // The ARN of the entitlement that allows you to subscribe to this flow. The - // entitlement is set by the flow originator, and the ARN is generated as part - // of the originator's flow. - EntitlementArn *string `locationName:"entitlementArn" type:"string"` - - // FlowArn is a required field - FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` - - // The port that the flow will be listening on for incoming content. - IngestPort *int64 `locationName:"ingestPort" type:"integer"` - - // The smoothing max bitrate for RTP and RTP-FEC streams. - MaxBitrate *int64 `locationName:"maxBitrate" type:"integer"` - - // The maximum latency in milliseconds for Zixi-based streams. - MaxLatency *int64 `locationName:"maxLatency" type:"integer"` - - // The protocol that is used by the source. - Protocol *string `locationName:"protocol" type:"string" enum:"Protocol"` - - // SourceArn is a required field - SourceArn *string `location:"uri" locationName:"sourceArn" type:"string" required:"true"` - - // The stream ID that you want to use for this transport. This parameter applies - // only to Zixi-based streams. - StreamId *string `locationName:"streamId" type:"string"` - - // The range of IP addresses that should be allowed to contribute content to - // your source. These IP addresses should in the form of a Classless Inter-Domain - // Routing (CIDR) block; for example, 10.0.0.0/16. - WhitelistCidr *string `locationName:"whitelistCidr" type:"string"` -} - -// String returns the string representation -func (s UpdateFlowSourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFlowSourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFlowSourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFlowSourceInput"} - if s.FlowArn == nil { - invalidParams.Add(request.NewErrParamRequired("FlowArn")) - } - if s.FlowArn != nil && len(*s.FlowArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) - } - if s.SourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("SourceArn")) - } - if s.SourceArn != nil && len(*s.SourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDecryption sets the Decryption field's value. -func (s *UpdateFlowSourceInput) SetDecryption(v *UpdateEncryption) *UpdateFlowSourceInput { - s.Decryption = v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateFlowSourceInput) SetDescription(v string) *UpdateFlowSourceInput { - s.Description = &v - return s -} - -// SetEntitlementArn sets the EntitlementArn field's value. -func (s *UpdateFlowSourceInput) SetEntitlementArn(v string) *UpdateFlowSourceInput { - s.EntitlementArn = &v - return s -} - -// SetFlowArn sets the FlowArn field's value. -func (s *UpdateFlowSourceInput) SetFlowArn(v string) *UpdateFlowSourceInput { - s.FlowArn = &v - return s -} - -// SetIngestPort sets the IngestPort field's value. -func (s *UpdateFlowSourceInput) SetIngestPort(v int64) *UpdateFlowSourceInput { - s.IngestPort = &v - return s -} - -// SetMaxBitrate sets the MaxBitrate field's value. -func (s *UpdateFlowSourceInput) SetMaxBitrate(v int64) *UpdateFlowSourceInput { - s.MaxBitrate = &v - return s -} - -// SetMaxLatency sets the MaxLatency field's value. -func (s *UpdateFlowSourceInput) SetMaxLatency(v int64) *UpdateFlowSourceInput { - s.MaxLatency = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *UpdateFlowSourceInput) SetProtocol(v string) *UpdateFlowSourceInput { - s.Protocol = &v - return s -} - -// SetSourceArn sets the SourceArn field's value. -func (s *UpdateFlowSourceInput) SetSourceArn(v string) *UpdateFlowSourceInput { - s.SourceArn = &v - return s -} - -// SetStreamId sets the StreamId field's value. -func (s *UpdateFlowSourceInput) SetStreamId(v string) *UpdateFlowSourceInput { - s.StreamId = &v - return s -} - -// SetWhitelistCidr sets the WhitelistCidr field's value. -func (s *UpdateFlowSourceInput) SetWhitelistCidr(v string) *UpdateFlowSourceInput { - s.WhitelistCidr = &v - return s -} - -// The result of a successful UpdateFlowSource request. The response includes -// the ARN of the flow that was updated and the updated source configuration. -type UpdateFlowSourceOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the flow that you want to update. - FlowArn *string `locationName:"flowArn" type:"string"` - - // The settings for the source of the flow. - Source *Source `locationName:"source" type:"structure"` -} - -// String returns the string representation -func (s UpdateFlowSourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFlowSourceOutput) GoString() string { - return s.String() -} - -// SetFlowArn sets the FlowArn field's value. -func (s *UpdateFlowSourceOutput) SetFlowArn(v string) *UpdateFlowSourceOutput { - s.FlowArn = &v - return s -} - -// SetSource sets the Source field's value. -func (s *UpdateFlowSourceOutput) SetSource(v *Source) *UpdateFlowSourceOutput { - s.Source = v - return s -} - -const ( - // AlgorithmAes128 is a Algorithm enum value - AlgorithmAes128 = "aes128" - - // AlgorithmAes192 is a Algorithm enum value - AlgorithmAes192 = "aes192" - - // AlgorithmAes256 is a Algorithm enum value - AlgorithmAes256 = "aes256" -) - -const ( - // KeyTypeStaticKey is a KeyType enum value - KeyTypeStaticKey = "static-key" -) - -const ( - // ProtocolZixiPush is a Protocol enum value - ProtocolZixiPush = "zixi-push" - - // ProtocolRtpFec is a Protocol enum value - ProtocolRtpFec = "rtp-fec" - - // ProtocolRtp is a Protocol enum value - ProtocolRtp = "rtp" -) - -const ( - // SourceTypeOwned is a SourceType enum value - SourceTypeOwned = "OWNED" - - // SourceTypeEntitled is a SourceType enum value - SourceTypeEntitled = "ENTITLED" -) - -const ( - // StatusStandby is a Status enum value - StatusStandby = "STANDBY" - - // StatusActive is a Status enum value - StatusActive = "ACTIVE" - - // StatusUpdating is a Status enum value - StatusUpdating = "UPDATING" - - // StatusDeleting is a Status enum value - StatusDeleting = "DELETING" - - // StatusStarting is a Status enum value - StatusStarting = "STARTING" - - // StatusStopping is a Status enum value - StatusStopping = "STOPPING" - - // StatusError is a Status enum value - StatusError = "ERROR" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/doc.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/doc.go deleted file mode 100644 index 95de09e77..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package mediaconnect provides the client and types for making API -// requests to AWS MediaConnect. -// -// API for AWS Elemental MediaConnect -// -// See https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14 for more information on this service. -// -// See mediaconnect package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/mediaconnect/ -// -// Using the Client -// -// To contact AWS MediaConnect 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 MediaConnect client MediaConnect for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/mediaconnect/#New -package mediaconnect diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/errors.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/errors.go deleted file mode 100644 index c6f36c1e5..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/errors.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediaconnect - -const ( - - // ErrCodeAddFlowOutputs420Exception for service response error code - // "AddFlowOutputs420Exception". - // - // Exception raised by AWS Elemental MediaConnect. See the error message and - // documentation for the operation for more information on the cause of this - // exception. - ErrCodeAddFlowOutputs420Exception = "AddFlowOutputs420Exception" - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - // - // Exception raised by AWS Elemental MediaConnect. See the error message and - // documentation for the operation for more information on the cause of this - // exception. - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeCreateFlow420Exception for service response error code - // "CreateFlow420Exception". - // - // Exception raised by AWS Elemental MediaConnect. See the error message and - // documentation for the operation for more information on the cause of this - // exception. - ErrCodeCreateFlow420Exception = "CreateFlow420Exception" - - // ErrCodeForbiddenException for service response error code - // "ForbiddenException". - // - // Exception raised by AWS Elemental MediaConnect. See the error message and - // documentation for the operation for more information on the cause of this - // exception. - ErrCodeForbiddenException = "ForbiddenException" - - // ErrCodeGrantFlowEntitlements420Exception for service response error code - // "GrantFlowEntitlements420Exception". - // - // Exception raised by AWS Elemental MediaConnect. See the error message and - // documentation for the operation for more information on the cause of this - // exception. - ErrCodeGrantFlowEntitlements420Exception = "GrantFlowEntitlements420Exception" - - // ErrCodeInternalServerErrorException for service response error code - // "InternalServerErrorException". - // - // Exception raised by AWS Elemental MediaConnect. See the error message and - // documentation for the operation for more information on the cause of this - // exception. - ErrCodeInternalServerErrorException = "InternalServerErrorException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // Exception raised by AWS Elemental MediaConnect. See the error message and - // documentation for the operation for more information on the cause of this - // exception. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeServiceUnavailableException for service response error code - // "ServiceUnavailableException". - // - // Exception raised by AWS Elemental MediaConnect. See the error message and - // documentation for the operation for more information on the cause of this - // exception. - ErrCodeServiceUnavailableException = "ServiceUnavailableException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // Exception raised by AWS Elemental MediaConnect. See the error message and - // documentation for the operation for more information on the cause of this - // exception. - ErrCodeTooManyRequestsException = "TooManyRequestsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/service.go deleted file mode 100644 index 4cafa7df3..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediaconnect - -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" -) - -// MediaConnect provides the API operation methods for making requests to -// AWS MediaConnect. See this package's package overview docs -// for details on the service. -// -// MediaConnect methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type MediaConnect 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 = "MediaConnect" // Name of service. - EndpointsID = "mediaconnect" // ID to lookup a service endpoint with. - ServiceID = "MediaConnect" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the MediaConnect 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 MediaConnect client from just a session. -// svc := mediaconnect.New(mySession) -// -// // Create a MediaConnect client with additional configuration -// svc := mediaconnect.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaConnect { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "mediaconnect" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *MediaConnect { - svc := &MediaConnect{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-11-14", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a MediaConnect operation and runs any -// custom request initialization. -func (c *MediaConnect) 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/mediaconvert/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go deleted file mode 100644 index 34ec0e7d9..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go +++ /dev/null @@ -1,19194 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediaconvert - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opAssociateCertificate = "AssociateCertificate" - -// AssociateCertificateRequest generates a "aws/request.Request" representing the -// client's request for the AssociateCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateCertificate for more information on using the AssociateCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateCertificateRequest method. -// req, resp := client.AssociateCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/AssociateCertificate -func (c *MediaConvert) AssociateCertificateRequest(input *AssociateCertificateInput) (req *request.Request, output *AssociateCertificateOutput) { - op := &request.Operation{ - Name: opAssociateCertificate, - HTTPMethod: "POST", - HTTPPath: "/2017-08-29/certificates", - } - - if input == nil { - input = &AssociateCertificateInput{} - } - - output = &AssociateCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssociateCertificate API operation for AWS Elemental MediaConvert. -// -// Associates an AWS Certificate Manager (ACM) Amazon Resource Name (ARN) with -// AWS Elemental MediaConvert. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation AssociateCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/AssociateCertificate -func (c *MediaConvert) AssociateCertificate(input *AssociateCertificateInput) (*AssociateCertificateOutput, error) { - req, out := c.AssociateCertificateRequest(input) - return out, req.Send() -} - -// AssociateCertificateWithContext is the same as AssociateCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) AssociateCertificateWithContext(ctx aws.Context, input *AssociateCertificateInput, opts ...request.Option) (*AssociateCertificateOutput, error) { - req, out := c.AssociateCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelJob = "CancelJob" - -// CancelJobRequest generates a "aws/request.Request" representing the -// client's request for the CancelJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelJob for more information on using the CancelJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelJobRequest method. -// req, resp := client.CancelJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CancelJob -func (c *MediaConvert) CancelJobRequest(input *CancelJobInput) (req *request.Request, output *CancelJobOutput) { - op := &request.Operation{ - Name: opCancelJob, - HTTPMethod: "DELETE", - HTTPPath: "/2017-08-29/jobs/{id}", - } - - if input == nil { - input = &CancelJobInput{} - } - - output = &CancelJobOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CancelJob API operation for AWS Elemental MediaConvert. -// -// Permanently remove a job from a queue. Once you have canceled a job, you -// can't start it again. You can't delete a running 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 Elemental MediaConvert's -// API operation CancelJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CancelJob -func (c *MediaConvert) CancelJob(input *CancelJobInput) (*CancelJobOutput, error) { - req, out := c.CancelJobRequest(input) - return out, req.Send() -} - -// CancelJobWithContext is the same as CancelJob with the addition of -// the ability to pass a context and additional request options. -// -// See CancelJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) CancelJobWithContext(ctx aws.Context, input *CancelJobInput, opts ...request.Option) (*CancelJobOutput, error) { - req, out := c.CancelJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateJob = "CreateJob" - -// CreateJobRequest generates a "aws/request.Request" representing the -// client's request for the CreateJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateJob for more information on using the CreateJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateJobRequest method. -// req, resp := client.CreateJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateJob -func (c *MediaConvert) CreateJobRequest(input *CreateJobInput) (req *request.Request, output *CreateJobOutput) { - op := &request.Operation{ - Name: opCreateJob, - HTTPMethod: "POST", - HTTPPath: "/2017-08-29/jobs", - } - - if input == nil { - input = &CreateJobInput{} - } - - output = &CreateJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateJob API operation for AWS Elemental MediaConvert. -// -// Create a new transcoding job. For information about jobs and job settings, -// see the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation CreateJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateJob -func (c *MediaConvert) CreateJob(input *CreateJobInput) (*CreateJobOutput, error) { - req, out := c.CreateJobRequest(input) - return out, req.Send() -} - -// CreateJobWithContext is the same as CreateJob with the addition of -// the ability to pass a context and additional request options. -// -// See CreateJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) CreateJobWithContext(ctx aws.Context, input *CreateJobInput, opts ...request.Option) (*CreateJobOutput, error) { - req, out := c.CreateJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateJobTemplate = "CreateJobTemplate" - -// CreateJobTemplateRequest generates a "aws/request.Request" representing the -// client's request for the CreateJobTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateJobTemplate for more information on using the CreateJobTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateJobTemplateRequest method. -// req, resp := client.CreateJobTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateJobTemplate -func (c *MediaConvert) CreateJobTemplateRequest(input *CreateJobTemplateInput) (req *request.Request, output *CreateJobTemplateOutput) { - op := &request.Operation{ - Name: opCreateJobTemplate, - HTTPMethod: "POST", - HTTPPath: "/2017-08-29/jobTemplates", - } - - if input == nil { - input = &CreateJobTemplateInput{} - } - - output = &CreateJobTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateJobTemplate API operation for AWS Elemental MediaConvert. -// -// Create a new job template. For information about job templates see the User -// Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation CreateJobTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateJobTemplate -func (c *MediaConvert) CreateJobTemplate(input *CreateJobTemplateInput) (*CreateJobTemplateOutput, error) { - req, out := c.CreateJobTemplateRequest(input) - return out, req.Send() -} - -// CreateJobTemplateWithContext is the same as CreateJobTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See CreateJobTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) CreateJobTemplateWithContext(ctx aws.Context, input *CreateJobTemplateInput, opts ...request.Option) (*CreateJobTemplateOutput, error) { - req, out := c.CreateJobTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePreset = "CreatePreset" - -// CreatePresetRequest generates a "aws/request.Request" representing the -// client's request for the CreatePreset operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePreset for more information on using the CreatePreset -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePresetRequest method. -// req, resp := client.CreatePresetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreatePreset -func (c *MediaConvert) CreatePresetRequest(input *CreatePresetInput) (req *request.Request, output *CreatePresetOutput) { - op := &request.Operation{ - Name: opCreatePreset, - HTTPMethod: "POST", - HTTPPath: "/2017-08-29/presets", - } - - if input == nil { - input = &CreatePresetInput{} - } - - output = &CreatePresetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePreset API operation for AWS Elemental MediaConvert. -// -// Create a new preset. For information about job templates see the User Guide -// at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation CreatePreset for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreatePreset -func (c *MediaConvert) CreatePreset(input *CreatePresetInput) (*CreatePresetOutput, error) { - req, out := c.CreatePresetRequest(input) - return out, req.Send() -} - -// CreatePresetWithContext is the same as CreatePreset with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePreset for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) CreatePresetWithContext(ctx aws.Context, input *CreatePresetInput, opts ...request.Option) (*CreatePresetOutput, error) { - req, out := c.CreatePresetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateQueue = "CreateQueue" - -// CreateQueueRequest generates a "aws/request.Request" representing the -// client's request for the CreateQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateQueue for more information on using the CreateQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateQueueRequest method. -// req, resp := client.CreateQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateQueue -func (c *MediaConvert) CreateQueueRequest(input *CreateQueueInput) (req *request.Request, output *CreateQueueOutput) { - op := &request.Operation{ - Name: opCreateQueue, - HTTPMethod: "POST", - HTTPPath: "/2017-08-29/queues", - } - - if input == nil { - input = &CreateQueueInput{} - } - - output = &CreateQueueOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateQueue API operation for AWS Elemental MediaConvert. -// -// Create a new transcoding queue. For information about queues, see Working -// With Queues in the User Guide at https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-queues.html -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation CreateQueue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateQueue -func (c *MediaConvert) CreateQueue(input *CreateQueueInput) (*CreateQueueOutput, error) { - req, out := c.CreateQueueRequest(input) - return out, req.Send() -} - -// CreateQueueWithContext is the same as CreateQueue with the addition of -// the ability to pass a context and additional request options. -// -// See CreateQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) CreateQueueWithContext(ctx aws.Context, input *CreateQueueInput, opts ...request.Option) (*CreateQueueOutput, error) { - req, out := c.CreateQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteJobTemplate = "DeleteJobTemplate" - -// DeleteJobTemplateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteJobTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteJobTemplate for more information on using the DeleteJobTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteJobTemplateRequest method. -// req, resp := client.DeleteJobTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeleteJobTemplate -func (c *MediaConvert) DeleteJobTemplateRequest(input *DeleteJobTemplateInput) (req *request.Request, output *DeleteJobTemplateOutput) { - op := &request.Operation{ - Name: opDeleteJobTemplate, - HTTPMethod: "DELETE", - HTTPPath: "/2017-08-29/jobTemplates/{name}", - } - - if input == nil { - input = &DeleteJobTemplateInput{} - } - - output = &DeleteJobTemplateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteJobTemplate API operation for AWS Elemental MediaConvert. -// -// Permanently delete a job template you have created. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation DeleteJobTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeleteJobTemplate -func (c *MediaConvert) DeleteJobTemplate(input *DeleteJobTemplateInput) (*DeleteJobTemplateOutput, error) { - req, out := c.DeleteJobTemplateRequest(input) - return out, req.Send() -} - -// DeleteJobTemplateWithContext is the same as DeleteJobTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteJobTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) DeleteJobTemplateWithContext(ctx aws.Context, input *DeleteJobTemplateInput, opts ...request.Option) (*DeleteJobTemplateOutput, error) { - req, out := c.DeleteJobTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePreset = "DeletePreset" - -// DeletePresetRequest generates a "aws/request.Request" representing the -// client's request for the DeletePreset operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePreset for more information on using the DeletePreset -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePresetRequest method. -// req, resp := client.DeletePresetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeletePreset -func (c *MediaConvert) DeletePresetRequest(input *DeletePresetInput) (req *request.Request, output *DeletePresetOutput) { - op := &request.Operation{ - Name: opDeletePreset, - HTTPMethod: "DELETE", - HTTPPath: "/2017-08-29/presets/{name}", - } - - if input == nil { - input = &DeletePresetInput{} - } - - output = &DeletePresetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePreset API operation for AWS Elemental MediaConvert. -// -// Permanently delete a preset you have created. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation DeletePreset for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeletePreset -func (c *MediaConvert) DeletePreset(input *DeletePresetInput) (*DeletePresetOutput, error) { - req, out := c.DeletePresetRequest(input) - return out, req.Send() -} - -// DeletePresetWithContext is the same as DeletePreset with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePreset for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) DeletePresetWithContext(ctx aws.Context, input *DeletePresetInput, opts ...request.Option) (*DeletePresetOutput, error) { - req, out := c.DeletePresetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteQueue = "DeleteQueue" - -// DeleteQueueRequest generates a "aws/request.Request" representing the -// client's request for the DeleteQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteQueue for more information on using the DeleteQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteQueueRequest method. -// req, resp := client.DeleteQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeleteQueue -func (c *MediaConvert) DeleteQueueRequest(input *DeleteQueueInput) (req *request.Request, output *DeleteQueueOutput) { - op := &request.Operation{ - Name: opDeleteQueue, - HTTPMethod: "DELETE", - HTTPPath: "/2017-08-29/queues/{name}", - } - - if input == nil { - input = &DeleteQueueInput{} - } - - output = &DeleteQueueOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteQueue API operation for AWS Elemental MediaConvert. -// -// Permanently delete a queue you have created. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation DeleteQueue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeleteQueue -func (c *MediaConvert) DeleteQueue(input *DeleteQueueInput) (*DeleteQueueOutput, error) { - req, out := c.DeleteQueueRequest(input) - return out, req.Send() -} - -// DeleteQueueWithContext is the same as DeleteQueue with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) DeleteQueueWithContext(ctx aws.Context, input *DeleteQueueInput, opts ...request.Option) (*DeleteQueueOutput, error) { - req, out := c.DeleteQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEndpoints = "DescribeEndpoints" - -// DescribeEndpointsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEndpoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEndpoints for more information on using the DescribeEndpoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEndpointsRequest method. -// req, resp := client.DescribeEndpointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DescribeEndpoints -func (c *MediaConvert) DescribeEndpointsRequest(input *DescribeEndpointsInput) (req *request.Request, output *DescribeEndpointsOutput) { - op := &request.Operation{ - Name: opDescribeEndpoints, - HTTPMethod: "POST", - HTTPPath: "/2017-08-29/endpoints", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEndpointsInput{} - } - - output = &DescribeEndpointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEndpoints API operation for AWS Elemental MediaConvert. -// -// Send an request with an empty body to the regional API endpoint to get your -// account API endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation DescribeEndpoints for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DescribeEndpoints -func (c *MediaConvert) DescribeEndpoints(input *DescribeEndpointsInput) (*DescribeEndpointsOutput, error) { - req, out := c.DescribeEndpointsRequest(input) - return out, req.Send() -} - -// DescribeEndpointsWithContext is the same as DescribeEndpoints with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEndpoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) DescribeEndpointsWithContext(ctx aws.Context, input *DescribeEndpointsInput, opts ...request.Option) (*DescribeEndpointsOutput, error) { - req, out := c.DescribeEndpointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEndpointsPages iterates over the pages of a DescribeEndpoints operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEndpoints method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeEndpoints operation. -// pageNum := 0 -// err := client.DescribeEndpointsPages(params, -// func(page *DescribeEndpointsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *MediaConvert) DescribeEndpointsPages(input *DescribeEndpointsInput, fn func(*DescribeEndpointsOutput, bool) bool) error { - return c.DescribeEndpointsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEndpointsPagesWithContext same as DescribeEndpointsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) DescribeEndpointsPagesWithContext(ctx aws.Context, input *DescribeEndpointsInput, fn func(*DescribeEndpointsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEndpointsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEndpointsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEndpointsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDisassociateCertificate = "DisassociateCertificate" - -// DisassociateCertificateRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateCertificate for more information on using the DisassociateCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateCertificateRequest method. -// req, resp := client.DisassociateCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DisassociateCertificate -func (c *MediaConvert) DisassociateCertificateRequest(input *DisassociateCertificateInput) (req *request.Request, output *DisassociateCertificateOutput) { - op := &request.Operation{ - Name: opDisassociateCertificate, - HTTPMethod: "DELETE", - HTTPPath: "/2017-08-29/certificates/{arn}", - } - - if input == nil { - input = &DisassociateCertificateInput{} - } - - output = &DisassociateCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateCertificate API operation for AWS Elemental MediaConvert. -// -// Removes an association between the Amazon Resource Name (ARN) of an AWS Certificate -// Manager (ACM) certificate and an AWS Elemental MediaConvert resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation DisassociateCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DisassociateCertificate -func (c *MediaConvert) DisassociateCertificate(input *DisassociateCertificateInput) (*DisassociateCertificateOutput, error) { - req, out := c.DisassociateCertificateRequest(input) - return out, req.Send() -} - -// DisassociateCertificateWithContext is the same as DisassociateCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) DisassociateCertificateWithContext(ctx aws.Context, input *DisassociateCertificateInput, opts ...request.Option) (*DisassociateCertificateOutput, error) { - req, out := c.DisassociateCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetJob = "GetJob" - -// GetJobRequest generates a "aws/request.Request" representing the -// client's request for the GetJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetJob for more information on using the GetJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetJobRequest method. -// req, resp := client.GetJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetJob -func (c *MediaConvert) GetJobRequest(input *GetJobInput) (req *request.Request, output *GetJobOutput) { - op := &request.Operation{ - Name: opGetJob, - HTTPMethod: "GET", - HTTPPath: "/2017-08-29/jobs/{id}", - } - - if input == nil { - input = &GetJobInput{} - } - - output = &GetJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetJob API operation for AWS Elemental MediaConvert. -// -// Retrieve the JSON for a specific completed transcoding 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 Elemental MediaConvert's -// API operation GetJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetJob -func (c *MediaConvert) GetJob(input *GetJobInput) (*GetJobOutput, error) { - req, out := c.GetJobRequest(input) - return out, req.Send() -} - -// GetJobWithContext is the same as GetJob with the addition of -// the ability to pass a context and additional request options. -// -// See GetJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) GetJobWithContext(ctx aws.Context, input *GetJobInput, opts ...request.Option) (*GetJobOutput, error) { - req, out := c.GetJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetJobTemplate = "GetJobTemplate" - -// GetJobTemplateRequest generates a "aws/request.Request" representing the -// client's request for the GetJobTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetJobTemplate for more information on using the GetJobTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetJobTemplateRequest method. -// req, resp := client.GetJobTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetJobTemplate -func (c *MediaConvert) GetJobTemplateRequest(input *GetJobTemplateInput) (req *request.Request, output *GetJobTemplateOutput) { - op := &request.Operation{ - Name: opGetJobTemplate, - HTTPMethod: "GET", - HTTPPath: "/2017-08-29/jobTemplates/{name}", - } - - if input == nil { - input = &GetJobTemplateInput{} - } - - output = &GetJobTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetJobTemplate API operation for AWS Elemental MediaConvert. -// -// Retrieve the JSON for a specific job template. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation GetJobTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetJobTemplate -func (c *MediaConvert) GetJobTemplate(input *GetJobTemplateInput) (*GetJobTemplateOutput, error) { - req, out := c.GetJobTemplateRequest(input) - return out, req.Send() -} - -// GetJobTemplateWithContext is the same as GetJobTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See GetJobTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) GetJobTemplateWithContext(ctx aws.Context, input *GetJobTemplateInput, opts ...request.Option) (*GetJobTemplateOutput, error) { - req, out := c.GetJobTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPreset = "GetPreset" - -// GetPresetRequest generates a "aws/request.Request" representing the -// client's request for the GetPreset operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPreset for more information on using the GetPreset -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPresetRequest method. -// req, resp := client.GetPresetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetPreset -func (c *MediaConvert) GetPresetRequest(input *GetPresetInput) (req *request.Request, output *GetPresetOutput) { - op := &request.Operation{ - Name: opGetPreset, - HTTPMethod: "GET", - HTTPPath: "/2017-08-29/presets/{name}", - } - - if input == nil { - input = &GetPresetInput{} - } - - output = &GetPresetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPreset API operation for AWS Elemental MediaConvert. -// -// Retrieve the JSON for a specific preset. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation GetPreset for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetPreset -func (c *MediaConvert) GetPreset(input *GetPresetInput) (*GetPresetOutput, error) { - req, out := c.GetPresetRequest(input) - return out, req.Send() -} - -// GetPresetWithContext is the same as GetPreset with the addition of -// the ability to pass a context and additional request options. -// -// See GetPreset for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) GetPresetWithContext(ctx aws.Context, input *GetPresetInput, opts ...request.Option) (*GetPresetOutput, error) { - req, out := c.GetPresetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetQueue = "GetQueue" - -// GetQueueRequest generates a "aws/request.Request" representing the -// client's request for the GetQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetQueue for more information on using the GetQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetQueueRequest method. -// req, resp := client.GetQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetQueue -func (c *MediaConvert) GetQueueRequest(input *GetQueueInput) (req *request.Request, output *GetQueueOutput) { - op := &request.Operation{ - Name: opGetQueue, - HTTPMethod: "GET", - HTTPPath: "/2017-08-29/queues/{name}", - } - - if input == nil { - input = &GetQueueInput{} - } - - output = &GetQueueOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetQueue API operation for AWS Elemental MediaConvert. -// -// Retrieve the JSON for a specific queue. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation GetQueue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetQueue -func (c *MediaConvert) GetQueue(input *GetQueueInput) (*GetQueueOutput, error) { - req, out := c.GetQueueRequest(input) - return out, req.Send() -} - -// GetQueueWithContext is the same as GetQueue with the addition of -// the ability to pass a context and additional request options. -// -// See GetQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) GetQueueWithContext(ctx aws.Context, input *GetQueueInput, opts ...request.Option) (*GetQueueOutput, error) { - req, out := c.GetQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListJobTemplates = "ListJobTemplates" - -// ListJobTemplatesRequest generates a "aws/request.Request" representing the -// client's request for the ListJobTemplates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListJobTemplates for more information on using the ListJobTemplates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListJobTemplatesRequest method. -// req, resp := client.ListJobTemplatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListJobTemplates -func (c *MediaConvert) ListJobTemplatesRequest(input *ListJobTemplatesInput) (req *request.Request, output *ListJobTemplatesOutput) { - op := &request.Operation{ - Name: opListJobTemplates, - HTTPMethod: "GET", - HTTPPath: "/2017-08-29/jobTemplates", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListJobTemplatesInput{} - } - - output = &ListJobTemplatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListJobTemplates API operation for AWS Elemental MediaConvert. -// -// Retrieve a JSON array of up to twenty of your job templates. This will return -// the templates themselves, not just a list of them. To retrieve the next twenty -// templates, use the nextToken string returned with the array -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation ListJobTemplates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListJobTemplates -func (c *MediaConvert) ListJobTemplates(input *ListJobTemplatesInput) (*ListJobTemplatesOutput, error) { - req, out := c.ListJobTemplatesRequest(input) - return out, req.Send() -} - -// ListJobTemplatesWithContext is the same as ListJobTemplates with the addition of -// the ability to pass a context and additional request options. -// -// See ListJobTemplates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) ListJobTemplatesWithContext(ctx aws.Context, input *ListJobTemplatesInput, opts ...request.Option) (*ListJobTemplatesOutput, error) { - req, out := c.ListJobTemplatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListJobTemplatesPages iterates over the pages of a ListJobTemplates operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListJobTemplates method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListJobTemplates operation. -// pageNum := 0 -// err := client.ListJobTemplatesPages(params, -// func(page *ListJobTemplatesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *MediaConvert) ListJobTemplatesPages(input *ListJobTemplatesInput, fn func(*ListJobTemplatesOutput, bool) bool) error { - return c.ListJobTemplatesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListJobTemplatesPagesWithContext same as ListJobTemplatesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) ListJobTemplatesPagesWithContext(ctx aws.Context, input *ListJobTemplatesInput, fn func(*ListJobTemplatesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListJobTemplatesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListJobTemplatesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobTemplatesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListJobs = "ListJobs" - -// ListJobsRequest generates a "aws/request.Request" representing the -// client's request for the ListJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListJobs for more information on using the ListJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListJobsRequest method. -// req, resp := client.ListJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListJobs -func (c *MediaConvert) ListJobsRequest(input *ListJobsInput) (req *request.Request, output *ListJobsOutput) { - op := &request.Operation{ - Name: opListJobs, - HTTPMethod: "GET", - HTTPPath: "/2017-08-29/jobs", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListJobsInput{} - } - - output = &ListJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListJobs API operation for AWS Elemental MediaConvert. -// -// Retrieve a JSON array of up to twenty of your most recently created jobs. -// This array includes in-process, completed, and errored jobs. This will return -// the jobs themselves, not just a list of the jobs. To retrieve the twenty -// next most recent jobs, use the nextToken string returned with the array. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation ListJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListJobs -func (c *MediaConvert) ListJobs(input *ListJobsInput) (*ListJobsOutput, error) { - req, out := c.ListJobsRequest(input) - return out, req.Send() -} - -// ListJobsWithContext is the same as ListJobs with the addition of -// the ability to pass a context and additional request options. -// -// See ListJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) ListJobsWithContext(ctx aws.Context, input *ListJobsInput, opts ...request.Option) (*ListJobsOutput, error) { - req, out := c.ListJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListJobsPages iterates over the pages of a ListJobs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListJobs method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListJobs operation. -// pageNum := 0 -// err := client.ListJobsPages(params, -// func(page *ListJobsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *MediaConvert) ListJobsPages(input *ListJobsInput, fn func(*ListJobsOutput, bool) bool) error { - return c.ListJobsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListJobsPagesWithContext same as ListJobsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) ListJobsPagesWithContext(ctx aws.Context, input *ListJobsInput, fn func(*ListJobsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListJobsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListJobsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListPresets = "ListPresets" - -// ListPresetsRequest generates a "aws/request.Request" representing the -// client's request for the ListPresets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPresets for more information on using the ListPresets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPresetsRequest method. -// req, resp := client.ListPresetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListPresets -func (c *MediaConvert) ListPresetsRequest(input *ListPresetsInput) (req *request.Request, output *ListPresetsOutput) { - op := &request.Operation{ - Name: opListPresets, - HTTPMethod: "GET", - HTTPPath: "/2017-08-29/presets", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListPresetsInput{} - } - - output = &ListPresetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPresets API operation for AWS Elemental MediaConvert. -// -// Retrieve a JSON array of up to twenty of your presets. This will return the -// presets themselves, not just a list of them. To retrieve the next twenty -// presets, use the nextToken string returned with the array. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation ListPresets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListPresets -func (c *MediaConvert) ListPresets(input *ListPresetsInput) (*ListPresetsOutput, error) { - req, out := c.ListPresetsRequest(input) - return out, req.Send() -} - -// ListPresetsWithContext is the same as ListPresets with the addition of -// the ability to pass a context and additional request options. -// -// See ListPresets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) ListPresetsWithContext(ctx aws.Context, input *ListPresetsInput, opts ...request.Option) (*ListPresetsOutput, error) { - req, out := c.ListPresetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPresetsPages iterates over the pages of a ListPresets operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPresets method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListPresets operation. -// pageNum := 0 -// err := client.ListPresetsPages(params, -// func(page *ListPresetsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *MediaConvert) ListPresetsPages(input *ListPresetsInput, fn func(*ListPresetsOutput, bool) bool) error { - return c.ListPresetsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPresetsPagesWithContext same as ListPresetsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) ListPresetsPagesWithContext(ctx aws.Context, input *ListPresetsInput, fn func(*ListPresetsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPresetsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPresetsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPresetsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListQueues = "ListQueues" - -// ListQueuesRequest generates a "aws/request.Request" representing the -// client's request for the ListQueues operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListQueues for more information on using the ListQueues -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListQueuesRequest method. -// req, resp := client.ListQueuesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListQueues -func (c *MediaConvert) ListQueuesRequest(input *ListQueuesInput) (req *request.Request, output *ListQueuesOutput) { - op := &request.Operation{ - Name: opListQueues, - HTTPMethod: "GET", - HTTPPath: "/2017-08-29/queues", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListQueuesInput{} - } - - output = &ListQueuesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListQueues API operation for AWS Elemental MediaConvert. -// -// Retrieve a JSON array of up to twenty of your queues. This will return the -// queues themselves, not just a list of them. To retrieve the next twenty queues, -// use the nextToken string returned with the array. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation ListQueues for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListQueues -func (c *MediaConvert) ListQueues(input *ListQueuesInput) (*ListQueuesOutput, error) { - req, out := c.ListQueuesRequest(input) - return out, req.Send() -} - -// ListQueuesWithContext is the same as ListQueues with the addition of -// the ability to pass a context and additional request options. -// -// See ListQueues for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) ListQueuesWithContext(ctx aws.Context, input *ListQueuesInput, opts ...request.Option) (*ListQueuesOutput, error) { - req, out := c.ListQueuesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListQueuesPages iterates over the pages of a ListQueues operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListQueues method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListQueues operation. -// pageNum := 0 -// err := client.ListQueuesPages(params, -// func(page *ListQueuesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *MediaConvert) ListQueuesPages(input *ListQueuesInput, fn func(*ListQueuesOutput, bool) bool) error { - return c.ListQueuesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListQueuesPagesWithContext same as ListQueuesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) ListQueuesPagesWithContext(ctx aws.Context, input *ListQueuesInput, fn func(*ListQueuesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListQueuesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListQueuesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListQueuesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTagsForResource = "ListTagsForResource" - -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTagsForResource for more information on using the ListTagsForResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsForResourceRequest method. -// req, resp := client.ListTagsForResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListTagsForResource -func (c *MediaConvert) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "GET", - HTTPPath: "/2017-08-29/tags/{arn}", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for AWS Elemental MediaConvert. -// -// Retrieve the tags for a MediaConvert resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListTagsForResource -func (c *MediaConvert) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) - return out, req.Send() -} - -// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of -// the ability to pass a context and additional request options. -// -// See ListTagsForResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagResource = "TagResource" - -// TagResourceRequest generates a "aws/request.Request" representing the -// client's request for the TagResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagResource for more information on using the TagResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TagResourceRequest method. -// req, resp := client.TagResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/TagResource -func (c *MediaConvert) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/2017-08-29/tags", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for AWS Elemental MediaConvert. -// -// Add tags to a MediaConvert queue, preset, or job template. For information -// about tagging, see the User Guide at https://docs.aws.amazon.com/mediaconvert/latest/ug/tagging-resources.html -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/TagResource -func (c *MediaConvert) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) - return out, req.Send() -} - -// TagResourceWithContext is the same as TagResource with the addition of -// the ability to pass a context and additional request options. -// -// See TagResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagResource = "UntagResource" - -// UntagResourceRequest generates a "aws/request.Request" representing the -// client's request for the UntagResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagResource for more information on using the UntagResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UntagResourceRequest method. -// req, resp := client.UntagResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UntagResource -func (c *MediaConvert) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "PUT", - HTTPPath: "/2017-08-29/tags/{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 Elemental MediaConvert. -// -// Remove tags from a MediaConvert queue, preset, or job template. For information -// about tagging, see the User Guide at https://docs.aws.amazon.com/mediaconvert/latest/ug/tagging-resources.html -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UntagResource -func (c *MediaConvert) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) - return out, req.Send() -} - -// UntagResourceWithContext is the same as UntagResource with the addition of -// the ability to pass a context and additional request options. -// -// See UntagResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateJobTemplate = "UpdateJobTemplate" - -// UpdateJobTemplateRequest generates a "aws/request.Request" representing the -// client's request for the UpdateJobTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateJobTemplate for more information on using the UpdateJobTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateJobTemplateRequest method. -// req, resp := client.UpdateJobTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdateJobTemplate -func (c *MediaConvert) UpdateJobTemplateRequest(input *UpdateJobTemplateInput) (req *request.Request, output *UpdateJobTemplateOutput) { - op := &request.Operation{ - Name: opUpdateJobTemplate, - HTTPMethod: "PUT", - HTTPPath: "/2017-08-29/jobTemplates/{name}", - } - - if input == nil { - input = &UpdateJobTemplateInput{} - } - - output = &UpdateJobTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateJobTemplate API operation for AWS Elemental MediaConvert. -// -// Modify one of your existing job templates. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation UpdateJobTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdateJobTemplate -func (c *MediaConvert) UpdateJobTemplate(input *UpdateJobTemplateInput) (*UpdateJobTemplateOutput, error) { - req, out := c.UpdateJobTemplateRequest(input) - return out, req.Send() -} - -// UpdateJobTemplateWithContext is the same as UpdateJobTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateJobTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) UpdateJobTemplateWithContext(ctx aws.Context, input *UpdateJobTemplateInput, opts ...request.Option) (*UpdateJobTemplateOutput, error) { - req, out := c.UpdateJobTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdatePreset = "UpdatePreset" - -// UpdatePresetRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePreset operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdatePreset for more information on using the UpdatePreset -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdatePresetRequest method. -// req, resp := client.UpdatePresetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdatePreset -func (c *MediaConvert) UpdatePresetRequest(input *UpdatePresetInput) (req *request.Request, output *UpdatePresetOutput) { - op := &request.Operation{ - Name: opUpdatePreset, - HTTPMethod: "PUT", - HTTPPath: "/2017-08-29/presets/{name}", - } - - if input == nil { - input = &UpdatePresetInput{} - } - - output = &UpdatePresetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdatePreset API operation for AWS Elemental MediaConvert. -// -// Modify one of your existing presets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation UpdatePreset for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdatePreset -func (c *MediaConvert) UpdatePreset(input *UpdatePresetInput) (*UpdatePresetOutput, error) { - req, out := c.UpdatePresetRequest(input) - return out, req.Send() -} - -// UpdatePresetWithContext is the same as UpdatePreset with the addition of -// the ability to pass a context and additional request options. -// -// See UpdatePreset for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) UpdatePresetWithContext(ctx aws.Context, input *UpdatePresetInput, opts ...request.Option) (*UpdatePresetOutput, error) { - req, out := c.UpdatePresetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateQueue = "UpdateQueue" - -// UpdateQueueRequest generates a "aws/request.Request" representing the -// client's request for the UpdateQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateQueue for more information on using the UpdateQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateQueueRequest method. -// req, resp := client.UpdateQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdateQueue -func (c *MediaConvert) UpdateQueueRequest(input *UpdateQueueInput) (req *request.Request, output *UpdateQueueOutput) { - op := &request.Operation{ - Name: opUpdateQueue, - HTTPMethod: "PUT", - HTTPPath: "/2017-08-29/queues/{name}", - } - - if input == nil { - input = &UpdateQueueInput{} - } - - output = &UpdateQueueOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateQueue API operation for AWS Elemental MediaConvert. -// -// Modify one of your existing queues. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaConvert's -// API operation UpdateQueue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdateQueue -func (c *MediaConvert) UpdateQueue(input *UpdateQueueInput) (*UpdateQueueOutput, error) { - req, out := c.UpdateQueueRequest(input) - return out, req.Send() -} - -// UpdateQueueWithContext is the same as UpdateQueue with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaConvert) UpdateQueueWithContext(ctx aws.Context, input *UpdateQueueInput, opts ...request.Option) (*UpdateQueueOutput, error) { - req, out := c.UpdateQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to -// the value AAC. The service accepts one of two mutually exclusive groups of -// AAC settings--VBR and CBR. To select one of these modes, set the value of -// Bitrate control mode (rateControlMode) to "VBR" or "CBR". In VBR mode, you -// control the audio quality with the setting VBR quality (vbrQuality). In CBR -// mode, you use the setting Bitrate (bitrate). Defaults and valid values depend -// on the rate control mode. -type AacSettings struct { - _ struct{} `type:"structure"` - - // Choose BROADCASTER_MIXED_AD when the input contains pre-mixed main audio - // + audio description (AD) as a stereo pair. The value for AudioType will be - // set to 3, which signals to downstream systems that this stream contains "broadcaster - // mixed AD". Note that the input received by the encoder must contain pre-mixed - // audio; the encoder does not perform the mixing. When you choose BROADCASTER_MIXED_AD, - // the encoder ignores any values you provide in AudioType and FollowInputAudioType. - // Choose NORMAL when the input does not contain pre-mixed audio + audio description - // (AD). In this case, the encoder will use any values you provide for AudioType - // and FollowInputAudioType. - AudioDescriptionBroadcasterMix *string `locationName:"audioDescriptionBroadcasterMix" type:"string" enum:"AacAudioDescriptionBroadcasterMix"` - - // Average bitrate in bits/second. The set of valid values for this setting - // is: 6000, 8000, 10000, 12000, 14000, 16000, 20000, 24000, 28000, 32000, 40000, - // 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, 224000, - // 256000, 288000, 320000, 384000, 448000, 512000, 576000, 640000, 768000, 896000, - // 1024000. The value you set is also constrained by the values you choose for - // Profile (codecProfile), Bitrate control mode (codingMode), and Sample rate - // (sampleRate). Default values depend on Bitrate control mode and Profile. - Bitrate *int64 `locationName:"bitrate" min:"6000" type:"integer"` - - // AAC Profile. - CodecProfile *string `locationName:"codecProfile" type:"string" enum:"AacCodecProfile"` - - // Mono (Audio Description), Mono, Stereo, or 5.1 channel layout. Valid values - // depend on rate control mode and profile. "1.0 - Audio Description (Receiver - // Mix)" setting receives a stereo description plus control track and emits - // a mono AAC encode of the description track, with control data emitted in - // the PES header as per ETSI TS 101 154 Annex E. - CodingMode *string `locationName:"codingMode" type:"string" enum:"AacCodingMode"` - - // Rate Control Mode. - RateControlMode *string `locationName:"rateControlMode" type:"string" enum:"AacRateControlMode"` - - // Enables LATM/LOAS AAC output. Note that if you use LATM/LOAS AAC in an output, - // you must choose "No container" for the output container. - RawFormat *string `locationName:"rawFormat" type:"string" enum:"AacRawFormat"` - - // Sample rate in Hz. Valid values depend on rate control mode and profile. - SampleRate *int64 `locationName:"sampleRate" min:"8000" type:"integer"` - - // Use MPEG-2 AAC instead of MPEG-4 AAC audio for raw or MPEG-2 Transport Stream - // containers. - Specification *string `locationName:"specification" type:"string" enum:"AacSpecification"` - - // VBR Quality Level - Only used if rate_control_mode is VBR. - VbrQuality *string `locationName:"vbrQuality" type:"string" enum:"AacVbrQuality"` -} - -// String returns the string representation -func (s AacSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AacSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AacSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AacSettings"} - if s.Bitrate != nil && *s.Bitrate < 6000 { - invalidParams.Add(request.NewErrParamMinValue("Bitrate", 6000)) - } - if s.SampleRate != nil && *s.SampleRate < 8000 { - invalidParams.Add(request.NewErrParamMinValue("SampleRate", 8000)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioDescriptionBroadcasterMix sets the AudioDescriptionBroadcasterMix field's value. -func (s *AacSettings) SetAudioDescriptionBroadcasterMix(v string) *AacSettings { - s.AudioDescriptionBroadcasterMix = &v - return s -} - -// SetBitrate sets the Bitrate field's value. -func (s *AacSettings) SetBitrate(v int64) *AacSettings { - s.Bitrate = &v - return s -} - -// SetCodecProfile sets the CodecProfile field's value. -func (s *AacSettings) SetCodecProfile(v string) *AacSettings { - s.CodecProfile = &v - return s -} - -// SetCodingMode sets the CodingMode field's value. -func (s *AacSettings) SetCodingMode(v string) *AacSettings { - s.CodingMode = &v - return s -} - -// SetRateControlMode sets the RateControlMode field's value. -func (s *AacSettings) SetRateControlMode(v string) *AacSettings { - s.RateControlMode = &v - return s -} - -// SetRawFormat sets the RawFormat field's value. -func (s *AacSettings) SetRawFormat(v string) *AacSettings { - s.RawFormat = &v - return s -} - -// SetSampleRate sets the SampleRate field's value. -func (s *AacSettings) SetSampleRate(v int64) *AacSettings { - s.SampleRate = &v - return s -} - -// SetSpecification sets the Specification field's value. -func (s *AacSettings) SetSpecification(v string) *AacSettings { - s.Specification = &v - return s -} - -// SetVbrQuality sets the VbrQuality field's value. -func (s *AacSettings) SetVbrQuality(v string) *AacSettings { - s.VbrQuality = &v - return s -} - -// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to -// the value AC3. -type Ac3Settings struct { - _ struct{} `type:"structure"` - - // Average bitrate in bits/second. Valid bitrates depend on the coding mode. - Bitrate *int64 `locationName:"bitrate" min:"64000" type:"integer"` - - // Specifies the "Bitstream Mode" (bsmod) for the emitted AC-3 stream. See ATSC - // A/52-2012 for background on these values. - BitstreamMode *string `locationName:"bitstreamMode" type:"string" enum:"Ac3BitstreamMode"` - - // Dolby Digital coding mode. Determines number of channels. - CodingMode *string `locationName:"codingMode" type:"string" enum:"Ac3CodingMode"` - - // Sets the dialnorm for the output. If blank and input audio is Dolby Digital, - // dialnorm will be passed through. - Dialnorm *int64 `locationName:"dialnorm" min:"1" type:"integer"` - - // If set to FILM_STANDARD, adds dynamic range compression signaling to the - // output bitstream as defined in the Dolby Digital specification. - DynamicRangeCompressionProfile *string `locationName:"dynamicRangeCompressionProfile" type:"string" enum:"Ac3DynamicRangeCompressionProfile"` - - // Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only - // valid with 3_2_LFE coding mode. - LfeFilter *string `locationName:"lfeFilter" type:"string" enum:"Ac3LfeFilter"` - - // When set to FOLLOW_INPUT, encoder metadata will be sourced from the DD, DD+, - // or DolbyE decoder that supplied this audio data. If audio was not supplied - // from one of these streams, then the static metadata settings will be used. - MetadataControl *string `locationName:"metadataControl" type:"string" enum:"Ac3MetadataControl"` - - // Sample rate in hz. Sample rate is always 48000. - SampleRate *int64 `locationName:"sampleRate" min:"48000" type:"integer"` -} - -// String returns the string representation -func (s Ac3Settings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Ac3Settings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Ac3Settings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Ac3Settings"} - if s.Bitrate != nil && *s.Bitrate < 64000 { - invalidParams.Add(request.NewErrParamMinValue("Bitrate", 64000)) - } - if s.Dialnorm != nil && *s.Dialnorm < 1 { - invalidParams.Add(request.NewErrParamMinValue("Dialnorm", 1)) - } - if s.SampleRate != nil && *s.SampleRate < 48000 { - invalidParams.Add(request.NewErrParamMinValue("SampleRate", 48000)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBitrate sets the Bitrate field's value. -func (s *Ac3Settings) SetBitrate(v int64) *Ac3Settings { - s.Bitrate = &v - return s -} - -// SetBitstreamMode sets the BitstreamMode field's value. -func (s *Ac3Settings) SetBitstreamMode(v string) *Ac3Settings { - s.BitstreamMode = &v - return s -} - -// SetCodingMode sets the CodingMode field's value. -func (s *Ac3Settings) SetCodingMode(v string) *Ac3Settings { - s.CodingMode = &v - return s -} - -// SetDialnorm sets the Dialnorm field's value. -func (s *Ac3Settings) SetDialnorm(v int64) *Ac3Settings { - s.Dialnorm = &v - return s -} - -// SetDynamicRangeCompressionProfile sets the DynamicRangeCompressionProfile field's value. -func (s *Ac3Settings) SetDynamicRangeCompressionProfile(v string) *Ac3Settings { - s.DynamicRangeCompressionProfile = &v - return s -} - -// SetLfeFilter sets the LfeFilter field's value. -func (s *Ac3Settings) SetLfeFilter(v string) *Ac3Settings { - s.LfeFilter = &v - return s -} - -// SetMetadataControl sets the MetadataControl field's value. -func (s *Ac3Settings) SetMetadataControl(v string) *Ac3Settings { - s.MetadataControl = &v - return s -} - -// SetSampleRate sets the SampleRate field's value. -func (s *Ac3Settings) SetSampleRate(v int64) *Ac3Settings { - s.SampleRate = &v - return s -} - -// Acceleration settings for job execution. -type AccelerationSettings struct { - _ struct{} `type:"structure"` - - // Acceleration configuration for the job. - // - // Mode is a required field - Mode *string `locationName:"mode" type:"string" required:"true" enum:"AccelerationMode"` -} - -// String returns the string representation -func (s AccelerationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccelerationSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AccelerationSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AccelerationSettings"} - if s.Mode == nil { - invalidParams.Add(request.NewErrParamRequired("Mode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMode sets the Mode field's value. -func (s *AccelerationSettings) SetMode(v string) *AccelerationSettings { - s.Mode = &v - return s -} - -// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to -// the value AIFF. -type AiffSettings struct { - _ struct{} `type:"structure"` - - // Specify Bit depth (BitDepth), in bits per sample, to choose the encoding - // quality for this audio track. - BitDepth *int64 `locationName:"bitDepth" min:"16" type:"integer"` - - // Set Channels to specify the number of channels in this output audio track. - // Choosing Mono in the console will give you 1 output channel; choosing Stereo - // will give you 2. In the API, valid values are 1 and 2. - Channels *int64 `locationName:"channels" min:"1" type:"integer"` - - // Sample rate in hz. - SampleRate *int64 `locationName:"sampleRate" min:"8000" type:"integer"` -} - -// String returns the string representation -func (s AiffSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AiffSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AiffSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AiffSettings"} - if s.BitDepth != nil && *s.BitDepth < 16 { - invalidParams.Add(request.NewErrParamMinValue("BitDepth", 16)) - } - if s.Channels != nil && *s.Channels < 1 { - invalidParams.Add(request.NewErrParamMinValue("Channels", 1)) - } - if s.SampleRate != nil && *s.SampleRate < 8000 { - invalidParams.Add(request.NewErrParamMinValue("SampleRate", 8000)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBitDepth sets the BitDepth field's value. -func (s *AiffSettings) SetBitDepth(v int64) *AiffSettings { - s.BitDepth = &v - return s -} - -// SetChannels sets the Channels field's value. -func (s *AiffSettings) SetChannels(v int64) *AiffSettings { - s.Channels = &v - return s -} - -// SetSampleRate sets the SampleRate field's value. -func (s *AiffSettings) SetSampleRate(v int64) *AiffSettings { - s.SampleRate = &v - return s -} - -// Settings for ancillary captions source. -type AncillarySourceSettings struct { - _ struct{} `type:"structure"` - - // Specifies the 608 channel number in the ancillary data track from which to - // extract captions. Unused for passthrough. - SourceAncillaryChannelNumber *int64 `locationName:"sourceAncillaryChannelNumber" min:"1" type:"integer"` -} - -// String returns the string representation -func (s AncillarySourceSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AncillarySourceSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AncillarySourceSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AncillarySourceSettings"} - if s.SourceAncillaryChannelNumber != nil && *s.SourceAncillaryChannelNumber < 1 { - invalidParams.Add(request.NewErrParamMinValue("SourceAncillaryChannelNumber", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceAncillaryChannelNumber sets the SourceAncillaryChannelNumber field's value. -func (s *AncillarySourceSettings) SetSourceAncillaryChannelNumber(v int64) *AncillarySourceSettings { - s.SourceAncillaryChannelNumber = &v - return s -} - -// Associates the Amazon Resource Name (ARN) of an AWS Certificate Manager (ACM) -// certificate with an AWS Elemental MediaConvert resource. -type AssociateCertificateInput struct { - _ struct{} `type:"structure"` - - // The ARN of the ACM certificate that you want to associate with your MediaConvert - // resource. - // - // Arn is a required field - Arn *string `locationName:"arn" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateCertificateInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *AssociateCertificateInput) SetArn(v string) *AssociateCertificateInput { - s.Arn = &v - return s -} - -// Successful association of Certificate Manager Amazon Resource Name (ARN) -// with Mediaconvert returns an OK message. -type AssociateCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssociateCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateCertificateOutput) GoString() string { - return s.String() -} - -// Audio codec settings (CodecSettings) under (AudioDescriptions) contains the -// group of settings related to audio encoding. The settings in this group vary -// depending on the value you choose for Audio codec (Codec). For each codec -// enum you choose, define the corresponding settings object. The following -// lists the codec enum, settings object pairs. * AAC, AacSettings * MP2, Mp2Settings -// * WAV, WavSettings * AIFF, AiffSettings * AC3, Ac3Settings * EAC3, Eac3Settings -type AudioCodecSettings struct { - _ struct{} `type:"structure"` - - // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to - // the value AAC. The service accepts one of two mutually exclusive groups of - // AAC settings--VBR and CBR. To select one of these modes, set the value of - // Bitrate control mode (rateControlMode) to "VBR" or "CBR". In VBR mode, you - // control the audio quality with the setting VBR quality (vbrQuality). In CBR - // mode, you use the setting Bitrate (bitrate). Defaults and valid values depend - // on the rate control mode. - AacSettings *AacSettings `locationName:"aacSettings" type:"structure"` - - // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to - // the value AC3. - Ac3Settings *Ac3Settings `locationName:"ac3Settings" type:"structure"` - - // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to - // the value AIFF. - AiffSettings *AiffSettings `locationName:"aiffSettings" type:"structure"` - - // Type of Audio codec. - Codec *string `locationName:"codec" type:"string" enum:"AudioCodec"` - - // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to - // the value EAC3. - Eac3Settings *Eac3Settings `locationName:"eac3Settings" type:"structure"` - - // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to - // the value MP2. - Mp2Settings *Mp2Settings `locationName:"mp2Settings" type:"structure"` - - // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to - // the value WAV. - WavSettings *WavSettings `locationName:"wavSettings" type:"structure"` -} - -// String returns the string representation -func (s AudioCodecSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioCodecSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AudioCodecSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AudioCodecSettings"} - if s.AacSettings != nil { - if err := s.AacSettings.Validate(); err != nil { - invalidParams.AddNested("AacSettings", err.(request.ErrInvalidParams)) - } - } - if s.Ac3Settings != nil { - if err := s.Ac3Settings.Validate(); err != nil { - invalidParams.AddNested("Ac3Settings", err.(request.ErrInvalidParams)) - } - } - if s.AiffSettings != nil { - if err := s.AiffSettings.Validate(); err != nil { - invalidParams.AddNested("AiffSettings", err.(request.ErrInvalidParams)) - } - } - if s.Eac3Settings != nil { - if err := s.Eac3Settings.Validate(); err != nil { - invalidParams.AddNested("Eac3Settings", err.(request.ErrInvalidParams)) - } - } - if s.Mp2Settings != nil { - if err := s.Mp2Settings.Validate(); err != nil { - invalidParams.AddNested("Mp2Settings", err.(request.ErrInvalidParams)) - } - } - if s.WavSettings != nil { - if err := s.WavSettings.Validate(); err != nil { - invalidParams.AddNested("WavSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAacSettings sets the AacSettings field's value. -func (s *AudioCodecSettings) SetAacSettings(v *AacSettings) *AudioCodecSettings { - s.AacSettings = v - return s -} - -// SetAc3Settings sets the Ac3Settings field's value. -func (s *AudioCodecSettings) SetAc3Settings(v *Ac3Settings) *AudioCodecSettings { - s.Ac3Settings = v - return s -} - -// SetAiffSettings sets the AiffSettings field's value. -func (s *AudioCodecSettings) SetAiffSettings(v *AiffSettings) *AudioCodecSettings { - s.AiffSettings = v - return s -} - -// SetCodec sets the Codec field's value. -func (s *AudioCodecSettings) SetCodec(v string) *AudioCodecSettings { - s.Codec = &v - return s -} - -// SetEac3Settings sets the Eac3Settings field's value. -func (s *AudioCodecSettings) SetEac3Settings(v *Eac3Settings) *AudioCodecSettings { - s.Eac3Settings = v - return s -} - -// SetMp2Settings sets the Mp2Settings field's value. -func (s *AudioCodecSettings) SetMp2Settings(v *Mp2Settings) *AudioCodecSettings { - s.Mp2Settings = v - return s -} - -// SetWavSettings sets the WavSettings field's value. -func (s *AudioCodecSettings) SetWavSettings(v *WavSettings) *AudioCodecSettings { - s.WavSettings = v - return s -} - -// Description of audio output -type AudioDescription struct { - _ struct{} `type:"structure"` - - // Advanced audio normalization settings. - AudioNormalizationSettings *AudioNormalizationSettings `locationName:"audioNormalizationSettings" type:"structure"` - - // Specifies which audio data to use from each input. In the simplest case, - // specify an "Audio Selector":#inputs-audio_selector by name based on its order - // within each input. For example if you specify "Audio Selector 3", then the - // third audio selector will be used from each input. If an input does not have - // an "Audio Selector 3", then the audio selector marked as "default" in that - // input will be used. If there is no audio selector marked as "default", silence - // will be inserted for the duration of that input. Alternatively, an "Audio - // Selector Group":#inputs-audio_selector_group name may be specified, with - // similar default/silence behavior. If no audio_source_name is specified, then - // "Audio Selector 1" will be chosen automatically. - AudioSourceName *string `locationName:"audioSourceName" type:"string"` - - // Applies only if Follow Input Audio Type is unchecked (false). A number between - // 0 and 255. The following are defined in ISO-IEC 13818-1: 0 = Undefined, 1 - // = Clean Effects, 2 = Hearing Impaired, 3 = Visually Impaired Commentary, - // 4-255 = Reserved. - AudioType *int64 `locationName:"audioType" type:"integer"` - - // When set to FOLLOW_INPUT, if the input contains an ISO 639 audio_type, then - // that value is passed through to the output. If the input contains no ISO - // 639 audio_type, the value in Audio Type is included in the output. Otherwise - // the value in Audio Type is included in the output. Note that this field and - // audioType are both ignored if audioDescriptionBroadcasterMix is set to BROADCASTER_MIXED_AD. - AudioTypeControl *string `locationName:"audioTypeControl" type:"string" enum:"AudioTypeControl"` - - // Audio codec settings (CodecSettings) under (AudioDescriptions) contains the - // group of settings related to audio encoding. The settings in this group vary - // depending on the value you choose for Audio codec (Codec). For each codec - // enum you choose, define the corresponding settings object. The following - // lists the codec enum, settings object pairs. * AAC, AacSettings * MP2, Mp2Settings - // * WAV, WavSettings * AIFF, AiffSettings * AC3, Ac3Settings * EAC3, Eac3Settings - CodecSettings *AudioCodecSettings `locationName:"codecSettings" type:"structure"` - - // Specify the language for this audio output track, using the ISO 639-2 or - // ISO 639-3 three-letter language code. The language specified will be used - // when 'Follow Input Language Code' is not selected or when 'Follow Input Language - // Code' is selected but there is no ISO 639 language code specified by the - // input. - CustomLanguageCode *string `locationName:"customLanguageCode" min:"3" type:"string"` - - // Indicates the language of the audio output track. The ISO 639 language specified - // in the 'Language Code' drop down will be used when 'Follow Input Language - // Code' is not selected or when 'Follow Input Language Code' is selected but - // there is no ISO 639 language code specified by the input. - LanguageCode *string `locationName:"languageCode" type:"string" enum:"LanguageCode"` - - // Choosing FOLLOW_INPUT will cause the ISO 639 language code of the output - // to follow the ISO 639 language code of the input. The language specified - // for languageCode' will be used when USE_CONFIGURED is selected or when FOLLOW_INPUT - // is selected but there is no ISO 639 language code specified by the input. - LanguageCodeControl *string `locationName:"languageCodeControl" type:"string" enum:"AudioLanguageCodeControl"` - - // Advanced audio remixing settings. - RemixSettings *RemixSettings `locationName:"remixSettings" type:"structure"` - - // Used for MS Smooth and Apple HLS outputs. Indicates the name displayed by - // the player (eg. English, or Director Commentary). Alphanumeric characters, - // spaces, and underscore are legal. - StreamName *string `locationName:"streamName" type:"string"` -} - -// String returns the string representation -func (s AudioDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioDescription) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AudioDescription) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AudioDescription"} - if s.CustomLanguageCode != nil && len(*s.CustomLanguageCode) < 3 { - invalidParams.Add(request.NewErrParamMinLen("CustomLanguageCode", 3)) - } - if s.AudioNormalizationSettings != nil { - if err := s.AudioNormalizationSettings.Validate(); err != nil { - invalidParams.AddNested("AudioNormalizationSettings", err.(request.ErrInvalidParams)) - } - } - if s.CodecSettings != nil { - if err := s.CodecSettings.Validate(); err != nil { - invalidParams.AddNested("CodecSettings", err.(request.ErrInvalidParams)) - } - } - if s.RemixSettings != nil { - if err := s.RemixSettings.Validate(); err != nil { - invalidParams.AddNested("RemixSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioNormalizationSettings sets the AudioNormalizationSettings field's value. -func (s *AudioDescription) SetAudioNormalizationSettings(v *AudioNormalizationSettings) *AudioDescription { - s.AudioNormalizationSettings = v - return s -} - -// SetAudioSourceName sets the AudioSourceName field's value. -func (s *AudioDescription) SetAudioSourceName(v string) *AudioDescription { - s.AudioSourceName = &v - return s -} - -// SetAudioType sets the AudioType field's value. -func (s *AudioDescription) SetAudioType(v int64) *AudioDescription { - s.AudioType = &v - return s -} - -// SetAudioTypeControl sets the AudioTypeControl field's value. -func (s *AudioDescription) SetAudioTypeControl(v string) *AudioDescription { - s.AudioTypeControl = &v - return s -} - -// SetCodecSettings sets the CodecSettings field's value. -func (s *AudioDescription) SetCodecSettings(v *AudioCodecSettings) *AudioDescription { - s.CodecSettings = v - return s -} - -// SetCustomLanguageCode sets the CustomLanguageCode field's value. -func (s *AudioDescription) SetCustomLanguageCode(v string) *AudioDescription { - s.CustomLanguageCode = &v - return s -} - -// SetLanguageCode sets the LanguageCode field's value. -func (s *AudioDescription) SetLanguageCode(v string) *AudioDescription { - s.LanguageCode = &v - return s -} - -// SetLanguageCodeControl sets the LanguageCodeControl field's value. -func (s *AudioDescription) SetLanguageCodeControl(v string) *AudioDescription { - s.LanguageCodeControl = &v - return s -} - -// SetRemixSettings sets the RemixSettings field's value. -func (s *AudioDescription) SetRemixSettings(v *RemixSettings) *AudioDescription { - s.RemixSettings = v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *AudioDescription) SetStreamName(v string) *AudioDescription { - s.StreamName = &v - return s -} - -// Advanced audio normalization settings. -type AudioNormalizationSettings struct { - _ struct{} `type:"structure"` - - // Audio normalization algorithm to use. 1770-1 conforms to the CALM Act specification, - // 1770-2 conforms to the EBU R-128 specification. - Algorithm *string `locationName:"algorithm" type:"string" enum:"AudioNormalizationAlgorithm"` - - // When enabled the output audio is corrected using the chosen algorithm. If - // disabled, the audio will be measured but not adjusted. - AlgorithmControl *string `locationName:"algorithmControl" type:"string" enum:"AudioNormalizationAlgorithmControl"` - - // Content measuring above this level will be corrected to the target level. - // Content measuring below this level will not be corrected. Gating only applies - // when not using real_time_correction. - CorrectionGateLevel *int64 `locationName:"correctionGateLevel" type:"integer"` - - // If set to LOG, log each output's audio track loudness to a CSV file. - LoudnessLogging *string `locationName:"loudnessLogging" type:"string" enum:"AudioNormalizationLoudnessLogging"` - - // If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio - // track loudness. - PeakCalculation *string `locationName:"peakCalculation" type:"string" enum:"AudioNormalizationPeakCalculation"` - - // Target LKFS(loudness) to adjust volume to. If no value is entered, a default - // value will be used according to the chosen algorithm. The CALM Act (1770-1) - // recommends a target of -24 LKFS. The EBU R-128 specification (1770-2) recommends - // a target of -23 LKFS. - TargetLkfs *float64 `locationName:"targetLkfs" type:"double"` -} - -// String returns the string representation -func (s AudioNormalizationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioNormalizationSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AudioNormalizationSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AudioNormalizationSettings"} - if s.CorrectionGateLevel != nil && *s.CorrectionGateLevel < -70 { - invalidParams.Add(request.NewErrParamMinValue("CorrectionGateLevel", -70)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlgorithm sets the Algorithm field's value. -func (s *AudioNormalizationSettings) SetAlgorithm(v string) *AudioNormalizationSettings { - s.Algorithm = &v - return s -} - -// SetAlgorithmControl sets the AlgorithmControl field's value. -func (s *AudioNormalizationSettings) SetAlgorithmControl(v string) *AudioNormalizationSettings { - s.AlgorithmControl = &v - return s -} - -// SetCorrectionGateLevel sets the CorrectionGateLevel field's value. -func (s *AudioNormalizationSettings) SetCorrectionGateLevel(v int64) *AudioNormalizationSettings { - s.CorrectionGateLevel = &v - return s -} - -// SetLoudnessLogging sets the LoudnessLogging field's value. -func (s *AudioNormalizationSettings) SetLoudnessLogging(v string) *AudioNormalizationSettings { - s.LoudnessLogging = &v - return s -} - -// SetPeakCalculation sets the PeakCalculation field's value. -func (s *AudioNormalizationSettings) SetPeakCalculation(v string) *AudioNormalizationSettings { - s.PeakCalculation = &v - return s -} - -// SetTargetLkfs sets the TargetLkfs field's value. -func (s *AudioNormalizationSettings) SetTargetLkfs(v float64) *AudioNormalizationSettings { - s.TargetLkfs = &v - return s -} - -// Selector for Audio -type AudioSelector struct { - _ struct{} `type:"structure"` - - // Selects a specific language code from within an audio source, using the ISO - // 639-2 or ISO 639-3 three-letter language code - CustomLanguageCode *string `locationName:"customLanguageCode" min:"3" type:"string"` - - // Enable this setting on one audio selector to set it as the default for the - // job. The service uses this default for outputs where it can't find the specified - // input audio. If you don't set a default, those outputs have no audio. - DefaultSelection *string `locationName:"defaultSelection" type:"string" enum:"AudioDefaultSelection"` - - // Specifies audio data from an external file source. - ExternalAudioFileInput *string `locationName:"externalAudioFileInput" type:"string"` - - // Selects a specific language code from within an audio source. - LanguageCode *string `locationName:"languageCode" type:"string" enum:"LanguageCode"` - - // Specifies a time delta in milliseconds to offset the audio from the input - // video. - Offset *int64 `locationName:"offset" type:"integer"` - - // Selects a specific PID from within an audio source (e.g. 257 selects PID - // 0x101). - Pids []*int64 `locationName:"pids" type:"list"` - - // Use this setting for input streams that contain Dolby E, to have the service - // extract specific program data from the track. To select multiple programs, - // create multiple selectors with the same Track and different Program numbers. - // In the console, this setting is visible when you set Selector type to Track. - // Choose the program number from the dropdown list. If you are sending a JSON - // file, provide the program ID, which is part of the audio metadata. If your - // input file has incorrect metadata, you can choose All channels instead of - // a program number to have the service ignore the program IDs and include all - // the programs in the track. - ProgramSelection *int64 `locationName:"programSelection" type:"integer"` - - // Use these settings to reorder the audio channels of one input to match those - // of another input. This allows you to combine the two files into a single - // output, one after the other. - RemixSettings *RemixSettings `locationName:"remixSettings" type:"structure"` - - // Specifies the type of the audio selector. - SelectorType *string `locationName:"selectorType" type:"string" enum:"AudioSelectorType"` - - // Identify a track from the input audio to include in this selector by entering - // the track index number. To include several tracks in a single audio selector, - // specify multiple tracks as follows. Using the console, enter a comma-separated - // list. For examle, type "1,2,3" to include tracks 1 through 3. Specifying - // directly in your JSON job file, provide the track numbers in an array. For - // example, "tracks": [1,2,3]. - Tracks []*int64 `locationName:"tracks" type:"list"` -} - -// String returns the string representation -func (s AudioSelector) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioSelector) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AudioSelector) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AudioSelector"} - if s.CustomLanguageCode != nil && len(*s.CustomLanguageCode) < 3 { - invalidParams.Add(request.NewErrParamMinLen("CustomLanguageCode", 3)) - } - if s.Offset != nil && *s.Offset < -2.147483648e+09 { - invalidParams.Add(request.NewErrParamMinValue("Offset", -2.147483648e+09)) - } - if s.RemixSettings != nil { - if err := s.RemixSettings.Validate(); err != nil { - invalidParams.AddNested("RemixSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomLanguageCode sets the CustomLanguageCode field's value. -func (s *AudioSelector) SetCustomLanguageCode(v string) *AudioSelector { - s.CustomLanguageCode = &v - return s -} - -// SetDefaultSelection sets the DefaultSelection field's value. -func (s *AudioSelector) SetDefaultSelection(v string) *AudioSelector { - s.DefaultSelection = &v - return s -} - -// SetExternalAudioFileInput sets the ExternalAudioFileInput field's value. -func (s *AudioSelector) SetExternalAudioFileInput(v string) *AudioSelector { - s.ExternalAudioFileInput = &v - return s -} - -// SetLanguageCode sets the LanguageCode field's value. -func (s *AudioSelector) SetLanguageCode(v string) *AudioSelector { - s.LanguageCode = &v - return s -} - -// SetOffset sets the Offset field's value. -func (s *AudioSelector) SetOffset(v int64) *AudioSelector { - s.Offset = &v - return s -} - -// SetPids sets the Pids field's value. -func (s *AudioSelector) SetPids(v []*int64) *AudioSelector { - s.Pids = v - return s -} - -// SetProgramSelection sets the ProgramSelection field's value. -func (s *AudioSelector) SetProgramSelection(v int64) *AudioSelector { - s.ProgramSelection = &v - return s -} - -// SetRemixSettings sets the RemixSettings field's value. -func (s *AudioSelector) SetRemixSettings(v *RemixSettings) *AudioSelector { - s.RemixSettings = v - return s -} - -// SetSelectorType sets the SelectorType field's value. -func (s *AudioSelector) SetSelectorType(v string) *AudioSelector { - s.SelectorType = &v - return s -} - -// SetTracks sets the Tracks field's value. -func (s *AudioSelector) SetTracks(v []*int64) *AudioSelector { - s.Tracks = v - return s -} - -// Group of Audio Selectors -type AudioSelectorGroup struct { - _ struct{} `type:"structure"` - - // Name of an Audio Selector within the same input to include in the group. - // Audio selector names are standardized, based on their order within the input - // (e.g., "Audio Selector 1"). The audio selector name parameter can be repeated - // to add any number of audio selectors to the group. - AudioSelectorNames []*string `locationName:"audioSelectorNames" type:"list"` -} - -// String returns the string representation -func (s AudioSelectorGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioSelectorGroup) GoString() string { - return s.String() -} - -// SetAudioSelectorNames sets the AudioSelectorNames field's value. -func (s *AudioSelectorGroup) SetAudioSelectorNames(v []*string) *AudioSelectorGroup { - s.AudioSelectorNames = v - return s -} - -// Settings for Avail Blanking -type AvailBlanking struct { - _ struct{} `type:"structure"` - - // Blanking image to be used. Leave empty for solid black. Only bmp and png - // images are supported. - AvailBlankingImage *string `locationName:"availBlankingImage" min:"14" type:"string"` -} - -// String returns the string representation -func (s AvailBlanking) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailBlanking) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AvailBlanking) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AvailBlanking"} - if s.AvailBlankingImage != nil && len(*s.AvailBlankingImage) < 14 { - invalidParams.Add(request.NewErrParamMinLen("AvailBlankingImage", 14)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailBlankingImage sets the AvailBlankingImage field's value. -func (s *AvailBlanking) SetAvailBlankingImage(v string) *AvailBlanking { - s.AvailBlankingImage = &v - return s -} - -// Burn-In Destination Settings. -type BurninDestinationSettings struct { - _ struct{} `type:"structure"` - - // If no explicit x_position or y_position is provided, setting alignment to - // centered will place the captions at the bottom center of the output. Similarly, - // setting a left alignment will align captions to the bottom left of the output. - // If x and y positions are given in conjunction with the alignment parameter, - // the font will be justified (either left or centered) relative to those coordinates. - // This option is not valid for source captions that are STL, 608/embedded or - // teletext. These source settings are already pre-defined by the caption stream. - // All burn-in and DVB-Sub font settings must match. - Alignment *string `locationName:"alignment" type:"string" enum:"BurninSubtitleAlignment"` - - // Specifies the color of the rectangle behind the captions.All burn-in and - // DVB-Sub font settings must match. - BackgroundColor *string `locationName:"backgroundColor" type:"string" enum:"BurninSubtitleBackgroundColor"` - - // Specifies the opacity of the background rectangle. 255 is opaque; 0 is transparent. - // Leaving this parameter blank is equivalent to setting it to 0 (transparent). - // All burn-in and DVB-Sub font settings must match. - BackgroundOpacity *int64 `locationName:"backgroundOpacity" type:"integer"` - - // Specifies the color of the burned-in captions. This option is not valid for - // source captions that are STL, 608/embedded or teletext. These source settings - // are already pre-defined by the caption stream. All burn-in and DVB-Sub font - // settings must match. - FontColor *string `locationName:"fontColor" type:"string" enum:"BurninSubtitleFontColor"` - - // Specifies the opacity of the burned-in captions. 255 is opaque; 0 is transparent.All - // burn-in and DVB-Sub font settings must match. - FontOpacity *int64 `locationName:"fontOpacity" type:"integer"` - - // Font resolution in DPI (dots per inch); default is 96 dpi.All burn-in and - // DVB-Sub font settings must match. - FontResolution *int64 `locationName:"fontResolution" min:"96" type:"integer"` - - // Provide the font script, using an ISO 15924 script code, if the LanguageCode - // is not sufficient for determining the script type. Where LanguageCode or - // CustomLanguageCode is sufficient, use "AUTOMATIC" or leave unset. This is - // used to help determine the appropriate font for rendering burn-in captions. - FontScript *string `locationName:"fontScript" type:"string" enum:"FontScript"` - - // A positive integer indicates the exact font size in points. Set to 0 for - // automatic font size selection. All burn-in and DVB-Sub font settings must - // match. - FontSize *int64 `locationName:"fontSize" type:"integer"` - - // Specifies font outline color. This option is not valid for source captions - // that are either 608/embedded or teletext. These source settings are already - // pre-defined by the caption stream. All burn-in and DVB-Sub font settings - // must match. - OutlineColor *string `locationName:"outlineColor" type:"string" enum:"BurninSubtitleOutlineColor"` - - // Specifies font outline size in pixels. This option is not valid for source - // captions that are either 608/embedded or teletext. These source settings - // are already pre-defined by the caption stream. All burn-in and DVB-Sub font - // settings must match. - OutlineSize *int64 `locationName:"outlineSize" type:"integer"` - - // Specifies the color of the shadow cast by the captions.All burn-in and DVB-Sub - // font settings must match. - ShadowColor *string `locationName:"shadowColor" type:"string" enum:"BurninSubtitleShadowColor"` - - // Specifies the opacity of the shadow. 255 is opaque; 0 is transparent. Leaving - // this parameter blank is equivalent to setting it to 0 (transparent). All - // burn-in and DVB-Sub font settings must match. - ShadowOpacity *int64 `locationName:"shadowOpacity" type:"integer"` - - // Specifies the horizontal offset of the shadow relative to the captions in - // pixels. A value of -2 would result in a shadow offset 2 pixels to the left. - // All burn-in and DVB-Sub font settings must match. - ShadowXOffset *int64 `locationName:"shadowXOffset" type:"integer"` - - // Specifies the vertical offset of the shadow relative to the captions in pixels. - // A value of -2 would result in a shadow offset 2 pixels above the text. All - // burn-in and DVB-Sub font settings must match. - ShadowYOffset *int64 `locationName:"shadowYOffset" type:"integer"` - - // Only applies to jobs with input captions in Teletext or STL formats. Specify - // whether the spacing between letters in your captions is set by the captions - // grid or varies depending on letter width. Choose fixed grid to conform to - // the spacing specified in the captions file more accurately. Choose proportional - // to make the text easier to read if the captions are closed caption. - TeletextSpacing *string `locationName:"teletextSpacing" type:"string" enum:"BurninSubtitleTeletextSpacing"` - - // Specifies the horizontal position of the caption relative to the left side - // of the output in pixels. A value of 10 would result in the captions starting - // 10 pixels from the left of the output. If no explicit x_position is provided, - // the horizontal caption position will be determined by the alignment parameter. - // This option is not valid for source captions that are STL, 608/embedded or - // teletext. These source settings are already pre-defined by the caption stream. - // All burn-in and DVB-Sub font settings must match. - XPosition *int64 `locationName:"xPosition" type:"integer"` - - // Specifies the vertical position of the caption relative to the top of the - // output in pixels. A value of 10 would result in the captions starting 10 - // pixels from the top of the output. If no explicit y_position is provided, - // the caption will be positioned towards the bottom of the output. This option - // is not valid for source captions that are STL, 608/embedded or teletext. - // These source settings are already pre-defined by the caption stream. All - // burn-in and DVB-Sub font settings must match. - YPosition *int64 `locationName:"yPosition" type:"integer"` -} - -// String returns the string representation -func (s BurninDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BurninDestinationSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BurninDestinationSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BurninDestinationSettings"} - if s.FontResolution != nil && *s.FontResolution < 96 { - invalidParams.Add(request.NewErrParamMinValue("FontResolution", 96)) - } - if s.ShadowXOffset != nil && *s.ShadowXOffset < -2.147483648e+09 { - invalidParams.Add(request.NewErrParamMinValue("ShadowXOffset", -2.147483648e+09)) - } - if s.ShadowYOffset != nil && *s.ShadowYOffset < -2.147483648e+09 { - invalidParams.Add(request.NewErrParamMinValue("ShadowYOffset", -2.147483648e+09)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlignment sets the Alignment field's value. -func (s *BurninDestinationSettings) SetAlignment(v string) *BurninDestinationSettings { - s.Alignment = &v - return s -} - -// SetBackgroundColor sets the BackgroundColor field's value. -func (s *BurninDestinationSettings) SetBackgroundColor(v string) *BurninDestinationSettings { - s.BackgroundColor = &v - return s -} - -// SetBackgroundOpacity sets the BackgroundOpacity field's value. -func (s *BurninDestinationSettings) SetBackgroundOpacity(v int64) *BurninDestinationSettings { - s.BackgroundOpacity = &v - return s -} - -// SetFontColor sets the FontColor field's value. -func (s *BurninDestinationSettings) SetFontColor(v string) *BurninDestinationSettings { - s.FontColor = &v - return s -} - -// SetFontOpacity sets the FontOpacity field's value. -func (s *BurninDestinationSettings) SetFontOpacity(v int64) *BurninDestinationSettings { - s.FontOpacity = &v - return s -} - -// SetFontResolution sets the FontResolution field's value. -func (s *BurninDestinationSettings) SetFontResolution(v int64) *BurninDestinationSettings { - s.FontResolution = &v - return s -} - -// SetFontScript sets the FontScript field's value. -func (s *BurninDestinationSettings) SetFontScript(v string) *BurninDestinationSettings { - s.FontScript = &v - return s -} - -// SetFontSize sets the FontSize field's value. -func (s *BurninDestinationSettings) SetFontSize(v int64) *BurninDestinationSettings { - s.FontSize = &v - return s -} - -// SetOutlineColor sets the OutlineColor field's value. -func (s *BurninDestinationSettings) SetOutlineColor(v string) *BurninDestinationSettings { - s.OutlineColor = &v - return s -} - -// SetOutlineSize sets the OutlineSize field's value. -func (s *BurninDestinationSettings) SetOutlineSize(v int64) *BurninDestinationSettings { - s.OutlineSize = &v - return s -} - -// SetShadowColor sets the ShadowColor field's value. -func (s *BurninDestinationSettings) SetShadowColor(v string) *BurninDestinationSettings { - s.ShadowColor = &v - return s -} - -// SetShadowOpacity sets the ShadowOpacity field's value. -func (s *BurninDestinationSettings) SetShadowOpacity(v int64) *BurninDestinationSettings { - s.ShadowOpacity = &v - return s -} - -// SetShadowXOffset sets the ShadowXOffset field's value. -func (s *BurninDestinationSettings) SetShadowXOffset(v int64) *BurninDestinationSettings { - s.ShadowXOffset = &v - return s -} - -// SetShadowYOffset sets the ShadowYOffset field's value. -func (s *BurninDestinationSettings) SetShadowYOffset(v int64) *BurninDestinationSettings { - s.ShadowYOffset = &v - return s -} - -// SetTeletextSpacing sets the TeletextSpacing field's value. -func (s *BurninDestinationSettings) SetTeletextSpacing(v string) *BurninDestinationSettings { - s.TeletextSpacing = &v - return s -} - -// SetXPosition sets the XPosition field's value. -func (s *BurninDestinationSettings) SetXPosition(v int64) *BurninDestinationSettings { - s.XPosition = &v - return s -} - -// SetYPosition sets the YPosition field's value. -func (s *BurninDestinationSettings) SetYPosition(v int64) *BurninDestinationSettings { - s.YPosition = &v - return s -} - -// Cancel a job by sending a request with the job ID -type CancelJobInput struct { - _ struct{} `type:"structure"` - - // The Job ID of the job to be cancelled. - // - // Id is a required field - Id *string `location:"uri" locationName:"id" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelJobInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *CancelJobInput) SetId(v string) *CancelJobInput { - s.Id = &v - return s -} - -// A cancel job request will receive a response with an empty body. -type CancelJobOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CancelJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelJobOutput) GoString() string { - return s.String() -} - -// Description of Caption output -type CaptionDescription struct { - _ struct{} `type:"structure"` - - // Specifies which "Caption Selector":#inputs-caption_selector to use from each - // input when generating captions. The name should be of the format "Caption - // Selector ", which denotes that the Nth Caption Selector will be used from - // each input. - CaptionSelectorName *string `locationName:"captionSelectorName" min:"1" type:"string"` - - // Indicates the language of the caption output track, using the ISO 639-2 or - // ISO 639-3 three-letter language code. For most captions output formats, the - // encoder puts this language information in the output captions metadata. If - // your output captions format is DVB-Sub or Burn in, the encoder uses this - // language information to choose the font language for rendering the captions - // text. - CustomLanguageCode *string `locationName:"customLanguageCode" min:"3" type:"string"` - - // Specific settings required by destination type. Note that burnin_destination_settings - // are not available if the source of the caption data is Embedded or Teletext. - DestinationSettings *CaptionDestinationSettings `locationName:"destinationSettings" type:"structure"` - - // Specify the language of this captions output track. For most captions output - // formats, the encoder puts this language information in the output captions - // metadata. If your output captions format is DVB-Sub or Burn in, the encoder - // uses this language information to choose the font language for rendering - // the captions text. - LanguageCode *string `locationName:"languageCode" type:"string" enum:"LanguageCode"` - - // Human readable information to indicate captions available for players (eg. - // English, or Spanish). Alphanumeric characters, spaces, and underscore are - // legal. - LanguageDescription *string `locationName:"languageDescription" type:"string"` -} - -// String returns the string representation -func (s CaptionDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CaptionDescription) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CaptionDescription) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CaptionDescription"} - if s.CaptionSelectorName != nil && len(*s.CaptionSelectorName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CaptionSelectorName", 1)) - } - if s.CustomLanguageCode != nil && len(*s.CustomLanguageCode) < 3 { - invalidParams.Add(request.NewErrParamMinLen("CustomLanguageCode", 3)) - } - if s.DestinationSettings != nil { - if err := s.DestinationSettings.Validate(); err != nil { - invalidParams.AddNested("DestinationSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCaptionSelectorName sets the CaptionSelectorName field's value. -func (s *CaptionDescription) SetCaptionSelectorName(v string) *CaptionDescription { - s.CaptionSelectorName = &v - return s -} - -// SetCustomLanguageCode sets the CustomLanguageCode field's value. -func (s *CaptionDescription) SetCustomLanguageCode(v string) *CaptionDescription { - s.CustomLanguageCode = &v - return s -} - -// SetDestinationSettings sets the DestinationSettings field's value. -func (s *CaptionDescription) SetDestinationSettings(v *CaptionDestinationSettings) *CaptionDescription { - s.DestinationSettings = v - return s -} - -// SetLanguageCode sets the LanguageCode field's value. -func (s *CaptionDescription) SetLanguageCode(v string) *CaptionDescription { - s.LanguageCode = &v - return s -} - -// SetLanguageDescription sets the LanguageDescription field's value. -func (s *CaptionDescription) SetLanguageDescription(v string) *CaptionDescription { - s.LanguageDescription = &v - return s -} - -// Caption Description for preset -type CaptionDescriptionPreset struct { - _ struct{} `type:"structure"` - - // Indicates the language of the caption output track, using the ISO 639-2 or - // ISO 639-3 three-letter language code. For most captions output formats, the - // encoder puts this language information in the output captions metadata. If - // your output captions format is DVB-Sub or Burn in, the encoder uses this - // language information to choose the font language for rendering the captions - // text. - CustomLanguageCode *string `locationName:"customLanguageCode" min:"3" type:"string"` - - // Specific settings required by destination type. Note that burnin_destination_settings - // are not available if the source of the caption data is Embedded or Teletext. - DestinationSettings *CaptionDestinationSettings `locationName:"destinationSettings" type:"structure"` - - // Specify the language of this captions output track. For most captions output - // formats, the encoder puts this language information in the output captions - // metadata. If your output captions format is DVB-Sub or Burn in, the encoder - // uses this language information to choose the font language for rendering - // the captions text. - LanguageCode *string `locationName:"languageCode" type:"string" enum:"LanguageCode"` - - // Human readable information to indicate captions available for players (eg. - // English, or Spanish). Alphanumeric characters, spaces, and underscore are - // legal. - LanguageDescription *string `locationName:"languageDescription" type:"string"` -} - -// String returns the string representation -func (s CaptionDescriptionPreset) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CaptionDescriptionPreset) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CaptionDescriptionPreset) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CaptionDescriptionPreset"} - if s.CustomLanguageCode != nil && len(*s.CustomLanguageCode) < 3 { - invalidParams.Add(request.NewErrParamMinLen("CustomLanguageCode", 3)) - } - if s.DestinationSettings != nil { - if err := s.DestinationSettings.Validate(); err != nil { - invalidParams.AddNested("DestinationSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomLanguageCode sets the CustomLanguageCode field's value. -func (s *CaptionDescriptionPreset) SetCustomLanguageCode(v string) *CaptionDescriptionPreset { - s.CustomLanguageCode = &v - return s -} - -// SetDestinationSettings sets the DestinationSettings field's value. -func (s *CaptionDescriptionPreset) SetDestinationSettings(v *CaptionDestinationSettings) *CaptionDescriptionPreset { - s.DestinationSettings = v - return s -} - -// SetLanguageCode sets the LanguageCode field's value. -func (s *CaptionDescriptionPreset) SetLanguageCode(v string) *CaptionDescriptionPreset { - s.LanguageCode = &v - return s -} - -// SetLanguageDescription sets the LanguageDescription field's value. -func (s *CaptionDescriptionPreset) SetLanguageDescription(v string) *CaptionDescriptionPreset { - s.LanguageDescription = &v - return s -} - -// Specific settings required by destination type. Note that burnin_destination_settings -// are not available if the source of the caption data is Embedded or Teletext. -type CaptionDestinationSettings struct { - _ struct{} `type:"structure"` - - // Burn-In Destination Settings. - BurninDestinationSettings *BurninDestinationSettings `locationName:"burninDestinationSettings" type:"structure"` - - // Specify the format for this set of captions on this output. The default format - // is embedded without SCTE-20. Other options are embedded with SCTE-20, burn-in, - // DVB-sub, SCC, SRT, teletext, TTML, and web-VTT. If you are using SCTE-20, - // choose SCTE-20 plus embedded (SCTE20_PLUS_EMBEDDED) to create an output that - // complies with the SCTE-43 spec. To create a non-compliant output where the - // embedded captions come first, choose Embedded plus SCTE-20 (EMBEDDED_PLUS_SCTE20). - DestinationType *string `locationName:"destinationType" type:"string" enum:"CaptionDestinationType"` - - // DVB-Sub Destination Settings - DvbSubDestinationSettings *DvbSubDestinationSettings `locationName:"dvbSubDestinationSettings" type:"structure"` - - // Settings specific to embedded/ancillary caption outputs, including 608/708 - // Channel destination number. - EmbeddedDestinationSettings *EmbeddedDestinationSettings `locationName:"embeddedDestinationSettings" type:"structure"` - - // Settings for SCC caption output. - SccDestinationSettings *SccDestinationSettings `locationName:"sccDestinationSettings" type:"structure"` - - // Settings for Teletext caption output - TeletextDestinationSettings *TeletextDestinationSettings `locationName:"teletextDestinationSettings" type:"structure"` - - // Settings specific to TTML caption outputs, including Pass style information - // (TtmlStylePassthrough). - TtmlDestinationSettings *TtmlDestinationSettings `locationName:"ttmlDestinationSettings" type:"structure"` -} - -// String returns the string representation -func (s CaptionDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CaptionDestinationSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CaptionDestinationSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CaptionDestinationSettings"} - if s.BurninDestinationSettings != nil { - if err := s.BurninDestinationSettings.Validate(); err != nil { - invalidParams.AddNested("BurninDestinationSettings", err.(request.ErrInvalidParams)) - } - } - if s.DvbSubDestinationSettings != nil { - if err := s.DvbSubDestinationSettings.Validate(); err != nil { - invalidParams.AddNested("DvbSubDestinationSettings", err.(request.ErrInvalidParams)) - } - } - if s.EmbeddedDestinationSettings != nil { - if err := s.EmbeddedDestinationSettings.Validate(); err != nil { - invalidParams.AddNested("EmbeddedDestinationSettings", err.(request.ErrInvalidParams)) - } - } - if s.TeletextDestinationSettings != nil { - if err := s.TeletextDestinationSettings.Validate(); err != nil { - invalidParams.AddNested("TeletextDestinationSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBurninDestinationSettings sets the BurninDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetBurninDestinationSettings(v *BurninDestinationSettings) *CaptionDestinationSettings { - s.BurninDestinationSettings = v - return s -} - -// SetDestinationType sets the DestinationType field's value. -func (s *CaptionDestinationSettings) SetDestinationType(v string) *CaptionDestinationSettings { - s.DestinationType = &v - return s -} - -// SetDvbSubDestinationSettings sets the DvbSubDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetDvbSubDestinationSettings(v *DvbSubDestinationSettings) *CaptionDestinationSettings { - s.DvbSubDestinationSettings = v - return s -} - -// SetEmbeddedDestinationSettings sets the EmbeddedDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetEmbeddedDestinationSettings(v *EmbeddedDestinationSettings) *CaptionDestinationSettings { - s.EmbeddedDestinationSettings = v - return s -} - -// SetSccDestinationSettings sets the SccDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetSccDestinationSettings(v *SccDestinationSettings) *CaptionDestinationSettings { - s.SccDestinationSettings = v - return s -} - -// SetTeletextDestinationSettings sets the TeletextDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetTeletextDestinationSettings(v *TeletextDestinationSettings) *CaptionDestinationSettings { - s.TeletextDestinationSettings = v - return s -} - -// SetTtmlDestinationSettings sets the TtmlDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetTtmlDestinationSettings(v *TtmlDestinationSettings) *CaptionDestinationSettings { - s.TtmlDestinationSettings = v - return s -} - -// Set up captions in your outputs by first selecting them from your input here. -type CaptionSelector struct { - _ struct{} `type:"structure"` - - // The specific language to extract from source, using the ISO 639-2 or ISO - // 639-3 three-letter language code. If input is SCTE-27, complete this field - // and/or PID to select the caption language to extract. If input is DVB-Sub - // and output is Burn-in or SMPTE-TT, complete this field and/or PID to select - // the caption language to extract. If input is DVB-Sub that is being passed - // through, omit this field (and PID field); there is no way to extract a specific - // language with pass-through captions. - CustomLanguageCode *string `locationName:"customLanguageCode" min:"3" type:"string"` - - // The specific language to extract from source. If input is SCTE-27, complete - // this field and/or PID to select the caption language to extract. If input - // is DVB-Sub and output is Burn-in or SMPTE-TT, complete this field and/or - // PID to select the caption language to extract. If input is DVB-Sub that is - // being passed through, omit this field (and PID field); there is no way to - // extract a specific language with pass-through captions. - LanguageCode *string `locationName:"languageCode" type:"string" enum:"LanguageCode"` - - // Source settings (SourceSettings) contains the group of settings for captions - // in the input. - SourceSettings *CaptionSourceSettings `locationName:"sourceSettings" type:"structure"` -} - -// String returns the string representation -func (s CaptionSelector) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CaptionSelector) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CaptionSelector) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CaptionSelector"} - if s.CustomLanguageCode != nil && len(*s.CustomLanguageCode) < 3 { - invalidParams.Add(request.NewErrParamMinLen("CustomLanguageCode", 3)) - } - if s.SourceSettings != nil { - if err := s.SourceSettings.Validate(); err != nil { - invalidParams.AddNested("SourceSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomLanguageCode sets the CustomLanguageCode field's value. -func (s *CaptionSelector) SetCustomLanguageCode(v string) *CaptionSelector { - s.CustomLanguageCode = &v - return s -} - -// SetLanguageCode sets the LanguageCode field's value. -func (s *CaptionSelector) SetLanguageCode(v string) *CaptionSelector { - s.LanguageCode = &v - return s -} - -// SetSourceSettings sets the SourceSettings field's value. -func (s *CaptionSelector) SetSourceSettings(v *CaptionSourceSettings) *CaptionSelector { - s.SourceSettings = v - return s -} - -// Source settings (SourceSettings) contains the group of settings for captions -// in the input. -type CaptionSourceSettings struct { - _ struct{} `type:"structure"` - - // Settings for ancillary captions source. - AncillarySourceSettings *AncillarySourceSettings `locationName:"ancillarySourceSettings" type:"structure"` - - // DVB Sub Source Settings - DvbSubSourceSettings *DvbSubSourceSettings `locationName:"dvbSubSourceSettings" type:"structure"` - - // Settings for embedded captions Source - EmbeddedSourceSettings *EmbeddedSourceSettings `locationName:"embeddedSourceSettings" type:"structure"` - - // Settings for File-based Captions in Source - FileSourceSettings *FileSourceSettings `locationName:"fileSourceSettings" type:"structure"` - - // Use Source (SourceType) to identify the format of your input captions. The - // service cannot auto-detect caption format. - SourceType *string `locationName:"sourceType" type:"string" enum:"CaptionSourceType"` - - // Settings specific to Teletext caption sources, including Page number. - TeletextSourceSettings *TeletextSourceSettings `locationName:"teletextSourceSettings" type:"structure"` - - // Settings specific to caption sources that are specfied by track number. Sources - // include IMSC in IMF. - TrackSourceSettings *TrackSourceSettings `locationName:"trackSourceSettings" type:"structure"` -} - -// String returns the string representation -func (s CaptionSourceSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CaptionSourceSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CaptionSourceSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CaptionSourceSettings"} - if s.AncillarySourceSettings != nil { - if err := s.AncillarySourceSettings.Validate(); err != nil { - invalidParams.AddNested("AncillarySourceSettings", err.(request.ErrInvalidParams)) - } - } - if s.DvbSubSourceSettings != nil { - if err := s.DvbSubSourceSettings.Validate(); err != nil { - invalidParams.AddNested("DvbSubSourceSettings", err.(request.ErrInvalidParams)) - } - } - if s.EmbeddedSourceSettings != nil { - if err := s.EmbeddedSourceSettings.Validate(); err != nil { - invalidParams.AddNested("EmbeddedSourceSettings", err.(request.ErrInvalidParams)) - } - } - if s.FileSourceSettings != nil { - if err := s.FileSourceSettings.Validate(); err != nil { - invalidParams.AddNested("FileSourceSettings", err.(request.ErrInvalidParams)) - } - } - if s.TeletextSourceSettings != nil { - if err := s.TeletextSourceSettings.Validate(); err != nil { - invalidParams.AddNested("TeletextSourceSettings", err.(request.ErrInvalidParams)) - } - } - if s.TrackSourceSettings != nil { - if err := s.TrackSourceSettings.Validate(); err != nil { - invalidParams.AddNested("TrackSourceSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAncillarySourceSettings sets the AncillarySourceSettings field's value. -func (s *CaptionSourceSettings) SetAncillarySourceSettings(v *AncillarySourceSettings) *CaptionSourceSettings { - s.AncillarySourceSettings = v - return s -} - -// SetDvbSubSourceSettings sets the DvbSubSourceSettings field's value. -func (s *CaptionSourceSettings) SetDvbSubSourceSettings(v *DvbSubSourceSettings) *CaptionSourceSettings { - s.DvbSubSourceSettings = v - return s -} - -// SetEmbeddedSourceSettings sets the EmbeddedSourceSettings field's value. -func (s *CaptionSourceSettings) SetEmbeddedSourceSettings(v *EmbeddedSourceSettings) *CaptionSourceSettings { - s.EmbeddedSourceSettings = v - return s -} - -// SetFileSourceSettings sets the FileSourceSettings field's value. -func (s *CaptionSourceSettings) SetFileSourceSettings(v *FileSourceSettings) *CaptionSourceSettings { - s.FileSourceSettings = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *CaptionSourceSettings) SetSourceType(v string) *CaptionSourceSettings { - s.SourceType = &v - return s -} - -// SetTeletextSourceSettings sets the TeletextSourceSettings field's value. -func (s *CaptionSourceSettings) SetTeletextSourceSettings(v *TeletextSourceSettings) *CaptionSourceSettings { - s.TeletextSourceSettings = v - return s -} - -// SetTrackSourceSettings sets the TrackSourceSettings field's value. -func (s *CaptionSourceSettings) SetTrackSourceSettings(v *TrackSourceSettings) *CaptionSourceSettings { - s.TrackSourceSettings = v - return s -} - -// Channel mapping (ChannelMapping) contains the group of fields that hold the -// remixing value for each channel. Units are in dB. Acceptable values are within -// the range from -60 (mute) through 6. A setting of 0 passes the input channel -// unchanged to the output channel (no attenuation or amplification). -type ChannelMapping struct { - _ struct{} `type:"structure"` - - // List of output channels - OutputChannels []*OutputChannelMapping `locationName:"outputChannels" type:"list"` -} - -// String returns the string representation -func (s ChannelMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChannelMapping) GoString() string { - return s.String() -} - -// SetOutputChannels sets the OutputChannels field's value. -func (s *ChannelMapping) SetOutputChannels(v []*OutputChannelMapping) *ChannelMapping { - s.OutputChannels = v - return s -} - -// Settings for CMAF encryption -type CmafEncryptionSettings struct { - _ struct{} `type:"structure"` - - // This is a 128-bit, 16-byte hex value represented by a 32-character text string. - // If this parameter is not set then the Initialization Vector will follow the - // segment number by default. - ConstantInitializationVector *string `locationName:"constantInitializationVector" min:"32" type:"string"` - - // Encrypts the segments with the given encryption scheme. Leave blank to disable. - // Selecting 'Disabled' in the web interface also disables encryption. - EncryptionMethod *string `locationName:"encryptionMethod" type:"string" enum:"CmafEncryptionType"` - - // The Initialization Vector is a 128-bit number used in conjunction with the - // key for encrypting blocks. If set to INCLUDE, Initialization Vector is listed - // in the manifest. Otherwise Initialization Vector is not in the manifest. - InitializationVectorInManifest *string `locationName:"initializationVectorInManifest" type:"string" enum:"CmafInitializationVectorInManifest"` - - // Use these settings to set up encryption with a static key provider. - StaticKeyProvider *StaticKeyProvider `locationName:"staticKeyProvider" type:"structure"` - - // Indicates which type of key provider is used for encryption. - Type *string `locationName:"type" type:"string" enum:"CmafKeyProviderType"` -} - -// String returns the string representation -func (s CmafEncryptionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CmafEncryptionSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CmafEncryptionSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CmafEncryptionSettings"} - if s.ConstantInitializationVector != nil && len(*s.ConstantInitializationVector) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ConstantInitializationVector", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConstantInitializationVector sets the ConstantInitializationVector field's value. -func (s *CmafEncryptionSettings) SetConstantInitializationVector(v string) *CmafEncryptionSettings { - s.ConstantInitializationVector = &v - return s -} - -// SetEncryptionMethod sets the EncryptionMethod field's value. -func (s *CmafEncryptionSettings) SetEncryptionMethod(v string) *CmafEncryptionSettings { - s.EncryptionMethod = &v - return s -} - -// SetInitializationVectorInManifest sets the InitializationVectorInManifest field's value. -func (s *CmafEncryptionSettings) SetInitializationVectorInManifest(v string) *CmafEncryptionSettings { - s.InitializationVectorInManifest = &v - return s -} - -// SetStaticKeyProvider sets the StaticKeyProvider field's value. -func (s *CmafEncryptionSettings) SetStaticKeyProvider(v *StaticKeyProvider) *CmafEncryptionSettings { - s.StaticKeyProvider = v - return s -} - -// SetType sets the Type field's value. -func (s *CmafEncryptionSettings) SetType(v string) *CmafEncryptionSettings { - s.Type = &v - return s -} - -// Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to -// CMAF_GROUP_SETTINGS. Each output in a CMAF Output Group may only contain -// a single video, audio, or caption output. -type CmafGroupSettings struct { - _ struct{} `type:"structure"` - - // A partial URI prefix that will be put in the manifest file at the top level - // BaseURL element. Can be used if streams are delivered from a different URL - // than the manifest file. - BaseUrl *string `locationName:"baseUrl" type:"string"` - - // When set to ENABLED, sets #EXT-X-ALLOW-CACHE:no tag, which prevents client - // from saving media segments for later replay. - ClientCache *string `locationName:"clientCache" type:"string" enum:"CmafClientCache"` - - // Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist - // generation. - CodecSpecification *string `locationName:"codecSpecification" type:"string" enum:"CmafCodecSpecification"` - - // Use Destination (Destination) to specify the S3 output location and the output - // filename base. Destination accepts format identifiers. If you do not specify - // the base filename in the URI, the service will use the filename of the input - // file. If your job has multiple inputs, the service uses the filename of the - // first input file. - Destination *string `locationName:"destination" type:"string"` - - // DRM settings. - Encryption *CmafEncryptionSettings `locationName:"encryption" type:"structure"` - - // Length of fragments to generate (in seconds). Fragment length must be compatible - // with GOP size and Framerate. Note that fragments will end on the next keyframe - // after this number of seconds, so actual fragment length may be longer. When - // Emit Single File is checked, the fragmentation is internal to a single output - // file and it does not cause the creation of many output files as in other - // output types. - FragmentLength *int64 `locationName:"fragmentLength" min:"1" type:"integer"` - - // When set to GZIP, compresses HLS playlist. - ManifestCompression *string `locationName:"manifestCompression" type:"string" enum:"CmafManifestCompression"` - - // Indicates whether the output manifest should use floating point values for - // segment duration. - ManifestDurationFormat *string `locationName:"manifestDurationFormat" type:"string" enum:"CmafManifestDurationFormat"` - - // Minimum time of initially buffered media that is needed to ensure smooth - // playout. - MinBufferTime *int64 `locationName:"minBufferTime" type:"integer"` - - // Keep this setting at the default value of 0, unless you are troubleshooting - // a problem with how devices play back the end of your video asset. If you - // know that player devices are hanging on the final segment of your video because - // the length of your final segment is too short, use this setting to specify - // a minimum final segment length, in seconds. Choose a value that is greater - // than or equal to 1 and less than your segment length. When you specify a - // value for this setting, the encoder will combine any final segment that is - // shorter than the length that you specify with the previous segment. For example, - // your segment length is 3 seconds and your final segment is .5 seconds without - // a minimum final segment length; when you set the minimum final segment length - // to 1, your final segment is 3.5 seconds. - MinFinalSegmentLength *float64 `locationName:"minFinalSegmentLength" type:"double"` - - // When set to SINGLE_FILE, a single output file is generated, which is internally - // segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, - // separate segment files will be created. - SegmentControl *string `locationName:"segmentControl" type:"string" enum:"CmafSegmentControl"` - - // Use this setting to specify the length, in seconds, of each individual CMAF - // segment. This value applies to the whole package; that is, to every output - // in the output group. Note that segments end on the first keyframe after this - // number of seconds, so the actual segment length might be slightly longer. - // If you set Segment control (CmafSegmentControl) to single file, the service - // puts the content of each output in a single file that has metadata that marks - // these segments. If you set it to segmented files, the service creates multiple - // files for each output, each with the content of one segment. - SegmentLength *int64 `locationName:"segmentLength" min:"1" type:"integer"` - - // Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag - // of variant manifest. - StreamInfResolution *string `locationName:"streamInfResolution" type:"string" enum:"CmafStreamInfResolution"` - - // When set to ENABLED, a DASH MPD manifest will be generated for this output. - WriteDashManifest *string `locationName:"writeDashManifest" type:"string" enum:"CmafWriteDASHManifest"` - - // When set to ENABLED, an Apple HLS manifest will be generated for this output. - WriteHlsManifest *string `locationName:"writeHlsManifest" type:"string" enum:"CmafWriteHLSManifest"` -} - -// String returns the string representation -func (s CmafGroupSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CmafGroupSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CmafGroupSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CmafGroupSettings"} - if s.FragmentLength != nil && *s.FragmentLength < 1 { - invalidParams.Add(request.NewErrParamMinValue("FragmentLength", 1)) - } - if s.SegmentLength != nil && *s.SegmentLength < 1 { - invalidParams.Add(request.NewErrParamMinValue("SegmentLength", 1)) - } - if s.Encryption != nil { - if err := s.Encryption.Validate(); err != nil { - invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBaseUrl sets the BaseUrl field's value. -func (s *CmafGroupSettings) SetBaseUrl(v string) *CmafGroupSettings { - s.BaseUrl = &v - return s -} - -// SetClientCache sets the ClientCache field's value. -func (s *CmafGroupSettings) SetClientCache(v string) *CmafGroupSettings { - s.ClientCache = &v - return s -} - -// SetCodecSpecification sets the CodecSpecification field's value. -func (s *CmafGroupSettings) SetCodecSpecification(v string) *CmafGroupSettings { - s.CodecSpecification = &v - return s -} - -// SetDestination sets the Destination field's value. -func (s *CmafGroupSettings) SetDestination(v string) *CmafGroupSettings { - s.Destination = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *CmafGroupSettings) SetEncryption(v *CmafEncryptionSettings) *CmafGroupSettings { - s.Encryption = v - return s -} - -// SetFragmentLength sets the FragmentLength field's value. -func (s *CmafGroupSettings) SetFragmentLength(v int64) *CmafGroupSettings { - s.FragmentLength = &v - return s -} - -// SetManifestCompression sets the ManifestCompression field's value. -func (s *CmafGroupSettings) SetManifestCompression(v string) *CmafGroupSettings { - s.ManifestCompression = &v - return s -} - -// SetManifestDurationFormat sets the ManifestDurationFormat field's value. -func (s *CmafGroupSettings) SetManifestDurationFormat(v string) *CmafGroupSettings { - s.ManifestDurationFormat = &v - return s -} - -// SetMinBufferTime sets the MinBufferTime field's value. -func (s *CmafGroupSettings) SetMinBufferTime(v int64) *CmafGroupSettings { - s.MinBufferTime = &v - return s -} - -// SetMinFinalSegmentLength sets the MinFinalSegmentLength field's value. -func (s *CmafGroupSettings) SetMinFinalSegmentLength(v float64) *CmafGroupSettings { - s.MinFinalSegmentLength = &v - return s -} - -// SetSegmentControl sets the SegmentControl field's value. -func (s *CmafGroupSettings) SetSegmentControl(v string) *CmafGroupSettings { - s.SegmentControl = &v - return s -} - -// SetSegmentLength sets the SegmentLength field's value. -func (s *CmafGroupSettings) SetSegmentLength(v int64) *CmafGroupSettings { - s.SegmentLength = &v - return s -} - -// SetStreamInfResolution sets the StreamInfResolution field's value. -func (s *CmafGroupSettings) SetStreamInfResolution(v string) *CmafGroupSettings { - s.StreamInfResolution = &v - return s -} - -// SetWriteDashManifest sets the WriteDashManifest field's value. -func (s *CmafGroupSettings) SetWriteDashManifest(v string) *CmafGroupSettings { - s.WriteDashManifest = &v - return s -} - -// SetWriteHlsManifest sets the WriteHlsManifest field's value. -func (s *CmafGroupSettings) SetWriteHlsManifest(v string) *CmafGroupSettings { - s.WriteHlsManifest = &v - return s -} - -// Settings for color correction. -type ColorCorrector struct { - _ struct{} `type:"structure"` - - // Brightness level. - Brightness *int64 `locationName:"brightness" min:"1" type:"integer"` - - // Determines if colorspace conversion will be performed. If set to _None_, - // no conversion will be performed. If _Force 601_ or _Force 709_ are selected, - // conversion will be performed for inputs with differing colorspaces. An input's - // colorspace can be specified explicitly in the "Video Selector":#inputs-video_selector - // if necessary. - ColorSpaceConversion *string `locationName:"colorSpaceConversion" type:"string" enum:"ColorSpaceConversion"` - - // Contrast level. - Contrast *int64 `locationName:"contrast" min:"1" type:"integer"` - - // Use the HDR master display (Hdr10Metadata) settings to correct HDR metadata - // or to provide missing metadata. Note that these settings are not color correction. - Hdr10Metadata *Hdr10Metadata `locationName:"hdr10Metadata" type:"structure"` - - // Hue in degrees. - Hue *int64 `locationName:"hue" type:"integer"` - - // Saturation level. - Saturation *int64 `locationName:"saturation" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ColorCorrector) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ColorCorrector) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ColorCorrector) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ColorCorrector"} - if s.Brightness != nil && *s.Brightness < 1 { - invalidParams.Add(request.NewErrParamMinValue("Brightness", 1)) - } - if s.Contrast != nil && *s.Contrast < 1 { - invalidParams.Add(request.NewErrParamMinValue("Contrast", 1)) - } - if s.Hue != nil && *s.Hue < -180 { - invalidParams.Add(request.NewErrParamMinValue("Hue", -180)) - } - if s.Saturation != nil && *s.Saturation < 1 { - invalidParams.Add(request.NewErrParamMinValue("Saturation", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBrightness sets the Brightness field's value. -func (s *ColorCorrector) SetBrightness(v int64) *ColorCorrector { - s.Brightness = &v - return s -} - -// SetColorSpaceConversion sets the ColorSpaceConversion field's value. -func (s *ColorCorrector) SetColorSpaceConversion(v string) *ColorCorrector { - s.ColorSpaceConversion = &v - return s -} - -// SetContrast sets the Contrast field's value. -func (s *ColorCorrector) SetContrast(v int64) *ColorCorrector { - s.Contrast = &v - return s -} - -// SetHdr10Metadata sets the Hdr10Metadata field's value. -func (s *ColorCorrector) SetHdr10Metadata(v *Hdr10Metadata) *ColorCorrector { - s.Hdr10Metadata = v - return s -} - -// SetHue sets the Hue field's value. -func (s *ColorCorrector) SetHue(v int64) *ColorCorrector { - s.Hue = &v - return s -} - -// SetSaturation sets the Saturation field's value. -func (s *ColorCorrector) SetSaturation(v int64) *ColorCorrector { - s.Saturation = &v - return s -} - -// Container specific settings. -type ContainerSettings struct { - _ struct{} `type:"structure"` - - // Container for this output. Some containers require a container settings object. - // If not specified, the default object will be created. - Container *string `locationName:"container" type:"string" enum:"ContainerType"` - - // Settings for F4v container - F4vSettings *F4vSettings `locationName:"f4vSettings" type:"structure"` - - // Settings for M2TS Container. - M2tsSettings *M2tsSettings `locationName:"m2tsSettings" type:"structure"` - - // Settings for TS segments in HLS - M3u8Settings *M3u8Settings `locationName:"m3u8Settings" type:"structure"` - - // Settings for MOV Container. - MovSettings *MovSettings `locationName:"movSettings" type:"structure"` - - // Settings for MP4 Container - Mp4Settings *Mp4Settings `locationName:"mp4Settings" type:"structure"` -} - -// String returns the string representation -func (s ContainerSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContainerSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContainerSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContainerSettings"} - if s.M2tsSettings != nil { - if err := s.M2tsSettings.Validate(); err != nil { - invalidParams.AddNested("M2tsSettings", err.(request.ErrInvalidParams)) - } - } - if s.M3u8Settings != nil { - if err := s.M3u8Settings.Validate(); err != nil { - invalidParams.AddNested("M3u8Settings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainer sets the Container field's value. -func (s *ContainerSettings) SetContainer(v string) *ContainerSettings { - s.Container = &v - return s -} - -// SetF4vSettings sets the F4vSettings field's value. -func (s *ContainerSettings) SetF4vSettings(v *F4vSettings) *ContainerSettings { - s.F4vSettings = v - return s -} - -// SetM2tsSettings sets the M2tsSettings field's value. -func (s *ContainerSettings) SetM2tsSettings(v *M2tsSettings) *ContainerSettings { - s.M2tsSettings = v - return s -} - -// SetM3u8Settings sets the M3u8Settings field's value. -func (s *ContainerSettings) SetM3u8Settings(v *M3u8Settings) *ContainerSettings { - s.M3u8Settings = v - return s -} - -// SetMovSettings sets the MovSettings field's value. -func (s *ContainerSettings) SetMovSettings(v *MovSettings) *ContainerSettings { - s.MovSettings = v - return s -} - -// SetMp4Settings sets the Mp4Settings field's value. -func (s *ContainerSettings) SetMp4Settings(v *Mp4Settings) *ContainerSettings { - s.Mp4Settings = v - return s -} - -// Send your create job request with your job settings and IAM role. Optionally, -// include user metadata and the ARN for the queue. -type CreateJobInput struct { - _ struct{} `type:"structure"` - - // This is a beta feature. If you are interested in using this feature, please - // contact AWS customer support. - AccelerationSettings *AccelerationSettings `locationName:"accelerationSettings" type:"structure"` - - // Optional. Choose a tag type that AWS Billing and Cost Management will use - // to sort your AWS Elemental MediaConvert costs on any billing report that - // you set up. Any transcoding outputs that don't have an associated tag will - // appear in your billing report unsorted. If you don't choose a valid value - // for this field, your job outputs will appear on the billing report unsorted. - BillingTagsSource *string `locationName:"billingTagsSource" type:"string" enum:"BillingTagsSource"` - - // Idempotency token for CreateJob operation. - ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"` - - // When you create a job, you can either specify a job template or specify the - // transcoding settings individually - JobTemplate *string `locationName:"jobTemplate" type:"string"` - - // Optional. When you create a job, you can specify a queue to send it to. If - // you don't specify, the job will go to the default queue. For more about queues, - // see the User Guide topic at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html. - Queue *string `locationName:"queue" type:"string"` - - // Required. The IAM role you use for creating this job. For details about permissions, - // see the User Guide topic at the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html. - // - // Role is a required field - Role *string `locationName:"role" type:"string" required:"true"` - - // JobSettings contains all the transcode settings for a job. - // - // Settings is a required field - Settings *JobSettings `locationName:"settings" type:"structure" required:"true"` - - // User-defined metadata that you want to associate with an MediaConvert job. - // You specify metadata in key/value pairs. - UserMetadata map[string]*string `locationName:"userMetadata" type:"map"` -} - -// String returns the string representation -func (s CreateJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateJobInput"} - if s.Role == nil { - invalidParams.Add(request.NewErrParamRequired("Role")) - } - if s.Settings == nil { - invalidParams.Add(request.NewErrParamRequired("Settings")) - } - if s.AccelerationSettings != nil { - if err := s.AccelerationSettings.Validate(); err != nil { - invalidParams.AddNested("AccelerationSettings", err.(request.ErrInvalidParams)) - } - } - if s.Settings != nil { - if err := s.Settings.Validate(); err != nil { - invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccelerationSettings sets the AccelerationSettings field's value. -func (s *CreateJobInput) SetAccelerationSettings(v *AccelerationSettings) *CreateJobInput { - s.AccelerationSettings = v - return s -} - -// SetBillingTagsSource sets the BillingTagsSource field's value. -func (s *CreateJobInput) SetBillingTagsSource(v string) *CreateJobInput { - s.BillingTagsSource = &v - return s -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *CreateJobInput) SetClientRequestToken(v string) *CreateJobInput { - s.ClientRequestToken = &v - return s -} - -// SetJobTemplate sets the JobTemplate field's value. -func (s *CreateJobInput) SetJobTemplate(v string) *CreateJobInput { - s.JobTemplate = &v - return s -} - -// SetQueue sets the Queue field's value. -func (s *CreateJobInput) SetQueue(v string) *CreateJobInput { - s.Queue = &v - return s -} - -// SetRole sets the Role field's value. -func (s *CreateJobInput) SetRole(v string) *CreateJobInput { - s.Role = &v - return s -} - -// SetSettings sets the Settings field's value. -func (s *CreateJobInput) SetSettings(v *JobSettings) *CreateJobInput { - s.Settings = v - return s -} - -// SetUserMetadata sets the UserMetadata field's value. -func (s *CreateJobInput) SetUserMetadata(v map[string]*string) *CreateJobInput { - s.UserMetadata = v - return s -} - -// Successful create job requests will return the job JSON. -type CreateJobOutput struct { - _ struct{} `type:"structure"` - - // Each job converts an input file into an output file or files. For more information, - // see the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html - Job *Job `locationName:"job" type:"structure"` -} - -// String returns the string representation -func (s CreateJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJobOutput) GoString() string { - return s.String() -} - -// SetJob sets the Job field's value. -func (s *CreateJobOutput) SetJob(v *Job) *CreateJobOutput { - s.Job = v - return s -} - -// Send your create job template request with the name of the template and the -// JSON for the template. The template JSON should include everything in a valid -// job, except for input location and filename, IAM role, and user metadata. -type CreateJobTemplateInput struct { - _ struct{} `type:"structure"` - - // This is a beta feature. If you are interested in using this feature please - // contact AWS customer support. - AccelerationSettings *AccelerationSettings `locationName:"accelerationSettings" type:"structure"` - - // Optional. A category for the job template you are creating - Category *string `locationName:"category" type:"string"` - - // Optional. A description of the job template you are creating. - Description *string `locationName:"description" type:"string"` - - // The name of the job template you are creating. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // Optional. The queue that jobs created from this template are assigned to. - // If you don't specify this, jobs will go to the default queue. - Queue *string `locationName:"queue" type:"string"` - - // JobTemplateSettings contains all the transcode settings saved in the template - // that will be applied to jobs created from it. - // - // Settings is a required field - Settings *JobTemplateSettings `locationName:"settings" type:"structure" required:"true"` - - // The tags that you want to add to the resource. You can tag resources with - // a key-value pair or with only a key. - Tags map[string]*string `locationName:"tags" type:"map"` -} - -// String returns the string representation -func (s CreateJobTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJobTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateJobTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateJobTemplateInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Settings == nil { - invalidParams.Add(request.NewErrParamRequired("Settings")) - } - if s.AccelerationSettings != nil { - if err := s.AccelerationSettings.Validate(); err != nil { - invalidParams.AddNested("AccelerationSettings", err.(request.ErrInvalidParams)) - } - } - if s.Settings != nil { - if err := s.Settings.Validate(); err != nil { - invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccelerationSettings sets the AccelerationSettings field's value. -func (s *CreateJobTemplateInput) SetAccelerationSettings(v *AccelerationSettings) *CreateJobTemplateInput { - s.AccelerationSettings = v - return s -} - -// SetCategory sets the Category field's value. -func (s *CreateJobTemplateInput) SetCategory(v string) *CreateJobTemplateInput { - s.Category = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateJobTemplateInput) SetDescription(v string) *CreateJobTemplateInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateJobTemplateInput) SetName(v string) *CreateJobTemplateInput { - s.Name = &v - return s -} - -// SetQueue sets the Queue field's value. -func (s *CreateJobTemplateInput) SetQueue(v string) *CreateJobTemplateInput { - s.Queue = &v - return s -} - -// SetSettings sets the Settings field's value. -func (s *CreateJobTemplateInput) SetSettings(v *JobTemplateSettings) *CreateJobTemplateInput { - s.Settings = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateJobTemplateInput) SetTags(v map[string]*string) *CreateJobTemplateInput { - s.Tags = v - return s -} - -// Successful create job template requests will return the template JSON. -type CreateJobTemplateOutput struct { - _ struct{} `type:"structure"` - - // A job template is a pre-made set of encoding instructions that you can use - // to quickly create a job. - JobTemplate *JobTemplate `locationName:"jobTemplate" type:"structure"` -} - -// String returns the string representation -func (s CreateJobTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateJobTemplateOutput) GoString() string { - return s.String() -} - -// SetJobTemplate sets the JobTemplate field's value. -func (s *CreateJobTemplateOutput) SetJobTemplate(v *JobTemplate) *CreateJobTemplateOutput { - s.JobTemplate = v - return s -} - -// Send your create preset request with the name of the preset and the JSON -// for the output settings specified by the preset. -type CreatePresetInput struct { - _ struct{} `type:"structure"` - - // Optional. A category for the preset you are creating. - Category *string `locationName:"category" type:"string"` - - // Optional. A description of the preset you are creating. - Description *string `locationName:"description" type:"string"` - - // The name of the preset you are creating. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // Settings for preset - // - // Settings is a required field - Settings *PresetSettings `locationName:"settings" type:"structure" required:"true"` - - // The tags that you want to add to the resource. You can tag resources with - // a key-value pair or with only a key. - Tags map[string]*string `locationName:"tags" type:"map"` -} - -// String returns the string representation -func (s CreatePresetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePresetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePresetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePresetInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Settings == nil { - invalidParams.Add(request.NewErrParamRequired("Settings")) - } - if s.Settings != nil { - if err := s.Settings.Validate(); err != nil { - invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCategory sets the Category field's value. -func (s *CreatePresetInput) SetCategory(v string) *CreatePresetInput { - s.Category = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreatePresetInput) SetDescription(v string) *CreatePresetInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreatePresetInput) SetName(v string) *CreatePresetInput { - s.Name = &v - return s -} - -// SetSettings sets the Settings field's value. -func (s *CreatePresetInput) SetSettings(v *PresetSettings) *CreatePresetInput { - s.Settings = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreatePresetInput) SetTags(v map[string]*string) *CreatePresetInput { - s.Tags = v - return s -} - -// Successful create preset requests will return the preset JSON. -type CreatePresetOutput struct { - _ struct{} `type:"structure"` - - // A preset is a collection of preconfigured media conversion settings that - // you want MediaConvert to apply to the output during the conversion process. - Preset *Preset `locationName:"preset" type:"structure"` -} - -// String returns the string representation -func (s CreatePresetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePresetOutput) GoString() string { - return s.String() -} - -// SetPreset sets the Preset field's value. -func (s *CreatePresetOutput) SetPreset(v *Preset) *CreatePresetOutput { - s.Preset = v - return s -} - -// Create an on-demand queue by sending a CreateQueue request with the name -// of the queue. Create a reserved queue by sending a CreateQueue request with -// the pricing plan set to RESERVED and with values specified for the settings -// under reservationPlanSettings. When you create a reserved queue, you enter -// into a 12-month commitment to purchase the RTS that you specify. You can't -// cancel this commitment. -type CreateQueueInput struct { - _ struct{} `type:"structure"` - - // Optional. A description of the queue that you are creating. - Description *string `locationName:"description" type:"string"` - - // The name of the queue that you are creating. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // Specifies whether the pricing plan for the queue is on-demand or reserved. - // For on-demand, you pay per minute, billed in increments of .01 minute. For - // reserved, you pay for the transcoding capacity of the entire queue, regardless - // of how much or how little you use it. Reserved pricing requires a 12-month - // commitment. When you use the API to create a queue, the default is on-demand. - PricingPlan *string `locationName:"pricingPlan" type:"string" enum:"PricingPlan"` - - // Details about the pricing plan for your reserved queue. Required for reserved - // queues and not applicable to on-demand queues. - ReservationPlanSettings *ReservationPlanSettings `locationName:"reservationPlanSettings" type:"structure"` - - // The tags that you want to add to the resource. You can tag resources with - // a key-value pair or with only a key. - Tags map[string]*string `locationName:"tags" type:"map"` -} - -// String returns the string representation -func (s CreateQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateQueueInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.ReservationPlanSettings != nil { - if err := s.ReservationPlanSettings.Validate(); err != nil { - invalidParams.AddNested("ReservationPlanSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateQueueInput) SetDescription(v string) *CreateQueueInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateQueueInput) SetName(v string) *CreateQueueInput { - s.Name = &v - return s -} - -// SetPricingPlan sets the PricingPlan field's value. -func (s *CreateQueueInput) SetPricingPlan(v string) *CreateQueueInput { - s.PricingPlan = &v - return s -} - -// SetReservationPlanSettings sets the ReservationPlanSettings field's value. -func (s *CreateQueueInput) SetReservationPlanSettings(v *ReservationPlanSettings) *CreateQueueInput { - s.ReservationPlanSettings = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateQueueInput) SetTags(v map[string]*string) *CreateQueueInput { - s.Tags = v - return s -} - -// Successful create queue requests return the name of the queue that you just -// created and information about it. -type CreateQueueOutput struct { - _ struct{} `type:"structure"` - - // You can use queues to manage the resources that are available to your AWS - // account for running multiple transcoding jobs at the same time. If you don't - // specify a queue, the service sends all jobs through the default queue. For - // more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-queues.html. - Queue *Queue `locationName:"queue" type:"structure"` -} - -// String returns the string representation -func (s CreateQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateQueueOutput) GoString() string { - return s.String() -} - -// SetQueue sets the Queue field's value. -func (s *CreateQueueOutput) SetQueue(v *Queue) *CreateQueueOutput { - s.Queue = v - return s -} - -// Specifies DRM settings for DASH outputs. -type DashIsoEncryptionSettings struct { - _ struct{} `type:"structure"` - - // Settings for use with a SPEKE key provider - SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure"` -} - -// String returns the string representation -func (s DashIsoEncryptionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DashIsoEncryptionSettings) GoString() string { - return s.String() -} - -// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. -func (s *DashIsoEncryptionSettings) SetSpekeKeyProvider(v *SpekeKeyProvider) *DashIsoEncryptionSettings { - s.SpekeKeyProvider = v - return s -} - -// Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to -// DASH_ISO_GROUP_SETTINGS. -type DashIsoGroupSettings struct { - _ struct{} `type:"structure"` - - // A partial URI prefix that will be put in the manifest (.mpd) file at the - // top level BaseURL element. Can be used if streams are delivered from a different - // URL than the manifest file. - BaseUrl *string `locationName:"baseUrl" type:"string"` - - // Use Destination (Destination) to specify the S3 output location and the output - // filename base. Destination accepts format identifiers. If you do not specify - // the base filename in the URI, the service will use the filename of the input - // file. If your job has multiple inputs, the service uses the filename of the - // first input file. - Destination *string `locationName:"destination" type:"string"` - - // DRM settings. - Encryption *DashIsoEncryptionSettings `locationName:"encryption" type:"structure"` - - // Length of fragments to generate (in seconds). Fragment length must be compatible - // with GOP size and Framerate. Note that fragments will end on the next keyframe - // after this number of seconds, so actual fragment length may be longer. When - // Emit Single File is checked, the fragmentation is internal to a single output - // file and it does not cause the creation of many output files as in other - // output types. - FragmentLength *int64 `locationName:"fragmentLength" min:"1" type:"integer"` - - // Supports HbbTV specification as indicated - HbbtvCompliance *string `locationName:"hbbtvCompliance" type:"string" enum:"DashIsoHbbtvCompliance"` - - // Minimum time of initially buffered media that is needed to ensure smooth - // playout. - MinBufferTime *int64 `locationName:"minBufferTime" type:"integer"` - - // When set to SINGLE_FILE, a single output file is generated, which is internally - // segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, - // separate segment files will be created. - SegmentControl *string `locationName:"segmentControl" type:"string" enum:"DashIsoSegmentControl"` - - // Length of mpd segments to create (in seconds). Note that segments will end - // on the next keyframe after this number of seconds, so actual segment length - // may be longer. When Emit Single File is checked, the segmentation is internal - // to a single output file and it does not cause the creation of many output - // files as in other output types. - SegmentLength *int64 `locationName:"segmentLength" min:"1" type:"integer"` - - // When you enable Precise segment duration in manifests (writeSegmentTimelineInRepresentation), - // your DASH manifest shows precise segment durations. The segment duration - // information appears inside the SegmentTimeline element, inside SegmentTemplate - // at the Representation level. When this feature isn't enabled, the segment - // durations in your DASH manifest are approximate. The segment duration information - // appears in the duration attribute of the SegmentTemplate element. - WriteSegmentTimelineInRepresentation *string `locationName:"writeSegmentTimelineInRepresentation" type:"string" enum:"DashIsoWriteSegmentTimelineInRepresentation"` -} - -// String returns the string representation -func (s DashIsoGroupSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DashIsoGroupSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DashIsoGroupSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DashIsoGroupSettings"} - if s.FragmentLength != nil && *s.FragmentLength < 1 { - invalidParams.Add(request.NewErrParamMinValue("FragmentLength", 1)) - } - if s.SegmentLength != nil && *s.SegmentLength < 1 { - invalidParams.Add(request.NewErrParamMinValue("SegmentLength", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBaseUrl sets the BaseUrl field's value. -func (s *DashIsoGroupSettings) SetBaseUrl(v string) *DashIsoGroupSettings { - s.BaseUrl = &v - return s -} - -// SetDestination sets the Destination field's value. -func (s *DashIsoGroupSettings) SetDestination(v string) *DashIsoGroupSettings { - s.Destination = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *DashIsoGroupSettings) SetEncryption(v *DashIsoEncryptionSettings) *DashIsoGroupSettings { - s.Encryption = v - return s -} - -// SetFragmentLength sets the FragmentLength field's value. -func (s *DashIsoGroupSettings) SetFragmentLength(v int64) *DashIsoGroupSettings { - s.FragmentLength = &v - return s -} - -// SetHbbtvCompliance sets the HbbtvCompliance field's value. -func (s *DashIsoGroupSettings) SetHbbtvCompliance(v string) *DashIsoGroupSettings { - s.HbbtvCompliance = &v - return s -} - -// SetMinBufferTime sets the MinBufferTime field's value. -func (s *DashIsoGroupSettings) SetMinBufferTime(v int64) *DashIsoGroupSettings { - s.MinBufferTime = &v - return s -} - -// SetSegmentControl sets the SegmentControl field's value. -func (s *DashIsoGroupSettings) SetSegmentControl(v string) *DashIsoGroupSettings { - s.SegmentControl = &v - return s -} - -// SetSegmentLength sets the SegmentLength field's value. -func (s *DashIsoGroupSettings) SetSegmentLength(v int64) *DashIsoGroupSettings { - s.SegmentLength = &v - return s -} - -// SetWriteSegmentTimelineInRepresentation sets the WriteSegmentTimelineInRepresentation field's value. -func (s *DashIsoGroupSettings) SetWriteSegmentTimelineInRepresentation(v string) *DashIsoGroupSettings { - s.WriteSegmentTimelineInRepresentation = &v - return s -} - -// Settings for deinterlacer -type Deinterlacer struct { - _ struct{} `type:"structure"` - - // Only applies when you set Deinterlacer (DeinterlaceMode) to Deinterlace (DEINTERLACE) - // or Adaptive (ADAPTIVE). Motion adaptive interpolate (INTERPOLATE) produces - // sharper pictures, while blend (BLEND) produces smoother motion. Use (INTERPOLATE_TICKER) - // OR (BLEND_TICKER) if your source file includes a ticker, such as a scrolling - // headline at the bottom of the frame. - Algorithm *string `locationName:"algorithm" type:"string" enum:"DeinterlaceAlgorithm"` - - // - When set to NORMAL (default), the deinterlacer does not convert frames - // that are tagged in metadata as progressive. It will only convert those that - // are tagged as some other type. - When set to FORCE_ALL_FRAMES, the deinterlacer - // converts every frame to progressive - even those that are already tagged - // as progressive. Turn Force mode on only if there is a good chance that the - // metadata has tagged frames as progressive when they are not progressive. - // Do not turn on otherwise; processing frames that are already progressive - // into progressive will probably result in lower quality video. - Control *string `locationName:"control" type:"string" enum:"DeinterlacerControl"` - - // Use Deinterlacer (DeinterlaceMode) to choose how the service will do deinterlacing. - // Default is Deinterlace. - Deinterlace converts interlaced to progressive. - // - Inverse telecine converts Hard Telecine 29.97i to progressive 23.976p. - // - Adaptive auto-detects and converts to progressive. - Mode *string `locationName:"mode" type:"string" enum:"DeinterlacerMode"` -} - -// String returns the string representation -func (s Deinterlacer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Deinterlacer) GoString() string { - return s.String() -} - -// SetAlgorithm sets the Algorithm field's value. -func (s *Deinterlacer) SetAlgorithm(v string) *Deinterlacer { - s.Algorithm = &v - return s -} - -// SetControl sets the Control field's value. -func (s *Deinterlacer) SetControl(v string) *Deinterlacer { - s.Control = &v - return s -} - -// SetMode sets the Mode field's value. -func (s *Deinterlacer) SetMode(v string) *Deinterlacer { - s.Mode = &v - return s -} - -// Delete a job template by sending a request with the job template name -type DeleteJobTemplateInput struct { - _ struct{} `type:"structure"` - - // The name of the job template to be deleted. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteJobTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteJobTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteJobTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteJobTemplateInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteJobTemplateInput) SetName(v string) *DeleteJobTemplateInput { - s.Name = &v - return s -} - -// Delete job template requests will return an OK message or error message with -// an empty body. -type DeleteJobTemplateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteJobTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteJobTemplateOutput) GoString() string { - return s.String() -} - -// Delete a preset by sending a request with the preset name -type DeletePresetInput struct { - _ struct{} `type:"structure"` - - // The name of the preset to be deleted. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePresetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePresetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePresetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePresetInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeletePresetInput) SetName(v string) *DeletePresetInput { - s.Name = &v - return s -} - -// Delete preset requests will return an OK message or error message with an -// empty body. -type DeletePresetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePresetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePresetOutput) GoString() string { - return s.String() -} - -// Delete a queue by sending a request with the queue name. You can't delete -// a queue with an active pricing plan or one that has unprocessed jobs in it. -type DeleteQueueInput struct { - _ struct{} `type:"structure"` - - // The name of the queue that you want to delete. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteQueueInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteQueueInput) SetName(v string) *DeleteQueueInput { - s.Name = &v - return s -} - -// Delete queue requests return an OK message or error message with an empty -// body. -type DeleteQueueOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteQueueOutput) GoString() string { - return s.String() -} - -// Send an request with an empty body to the regional API endpoint to get your -// account API endpoint. -type DescribeEndpointsInput struct { - _ struct{} `type:"structure"` - - // Optional. Max number of endpoints, up to twenty, that will be returned at - // one time. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // Optional field, defaults to DEFAULT. Specify DEFAULT for this operation to - // return your endpoints if any exist, or to create an endpoint for you and - // return it if one doesn't already exist. Specify GET_ONLY to return your endpoints - // if any exist, or an empty list if none exist. - Mode *string `locationName:"mode" type:"string" enum:"DescribeEndpointsMode"` - - // Use this string, provided with the response to a previous request, to request - // the next batch of endpoints. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeEndpointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEndpointsInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeEndpointsInput) SetMaxResults(v int64) *DescribeEndpointsInput { - s.MaxResults = &v - return s -} - -// SetMode sets the Mode field's value. -func (s *DescribeEndpointsInput) SetMode(v string) *DescribeEndpointsInput { - s.Mode = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEndpointsInput) SetNextToken(v string) *DescribeEndpointsInput { - s.NextToken = &v - return s -} - -// Successful describe endpoints requests will return your account API endpoint. -type DescribeEndpointsOutput struct { - _ struct{} `type:"structure"` - - // List of endpoints - Endpoints []*Endpoint `locationName:"endpoints" type:"list"` - - // Use this string to request the next batch of endpoints. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeEndpointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEndpointsOutput) GoString() string { - return s.String() -} - -// SetEndpoints sets the Endpoints field's value. -func (s *DescribeEndpointsOutput) SetEndpoints(v []*Endpoint) *DescribeEndpointsOutput { - s.Endpoints = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEndpointsOutput) SetNextToken(v string) *DescribeEndpointsOutput { - s.NextToken = &v - return s -} - -// Removes an association between the Amazon Resource Name (ARN) of an AWS Certificate -// Manager (ACM) certificate and an AWS Elemental MediaConvert resource. -type DisassociateCertificateInput struct { - _ struct{} `type:"structure"` - - // The ARN of the ACM certificate that you want to disassociate from your MediaConvert - // resource. - // - // Arn is a required field - Arn *string `locationName:"arn" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateCertificateInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *DisassociateCertificateInput) SetArn(v string) *DisassociateCertificateInput { - s.Arn = &v - return s -} - -// Successful disassociation of Certificate Manager Amazon Resource Name (ARN) -// with Mediaconvert returns an OK message. -type DisassociateCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateCertificateOutput) GoString() string { - return s.String() -} - -// Inserts DVB Network Information Table (NIT) at the specified table repetition -// interval. -type DvbNitSettings struct { - _ struct{} `type:"structure"` - - // The numeric value placed in the Network Information Table (NIT). - NetworkId *int64 `locationName:"networkId" type:"integer"` - - // The network name text placed in the network_name_descriptor inside the Network - // Information Table. Maximum length is 256 characters. - NetworkName *string `locationName:"networkName" min:"1" type:"string"` - - // The number of milliseconds between instances of this table in the output - // transport stream. - NitInterval *int64 `locationName:"nitInterval" min:"25" type:"integer"` -} - -// String returns the string representation -func (s DvbNitSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DvbNitSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DvbNitSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DvbNitSettings"} - if s.NetworkName != nil && len(*s.NetworkName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NetworkName", 1)) - } - if s.NitInterval != nil && *s.NitInterval < 25 { - invalidParams.Add(request.NewErrParamMinValue("NitInterval", 25)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNetworkId sets the NetworkId field's value. -func (s *DvbNitSettings) SetNetworkId(v int64) *DvbNitSettings { - s.NetworkId = &v - return s -} - -// SetNetworkName sets the NetworkName field's value. -func (s *DvbNitSettings) SetNetworkName(v string) *DvbNitSettings { - s.NetworkName = &v - return s -} - -// SetNitInterval sets the NitInterval field's value. -func (s *DvbNitSettings) SetNitInterval(v int64) *DvbNitSettings { - s.NitInterval = &v - return s -} - -// Inserts DVB Service Description Table (NIT) at the specified table repetition -// interval. -type DvbSdtSettings struct { - _ struct{} `type:"structure"` - - // Selects method of inserting SDT information into output stream. "Follow input - // SDT" copies SDT information from input stream to output stream. "Follow input - // SDT if present" copies SDT information from input stream to output stream - // if SDT information is present in the input, otherwise it will fall back on - // the user-defined values. Enter "SDT Manually" means user will enter the SDT - // information. "No SDT" means output stream will not contain SDT information. - OutputSdt *string `locationName:"outputSdt" type:"string" enum:"OutputSdt"` - - // The number of milliseconds between instances of this table in the output - // transport stream. - SdtInterval *int64 `locationName:"sdtInterval" min:"25" type:"integer"` - - // The service name placed in the service_descriptor in the Service Description - // Table. Maximum length is 256 characters. - ServiceName *string `locationName:"serviceName" min:"1" type:"string"` - - // The service provider name placed in the service_descriptor in the Service - // Description Table. Maximum length is 256 characters. - ServiceProviderName *string `locationName:"serviceProviderName" min:"1" type:"string"` -} - -// String returns the string representation -func (s DvbSdtSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DvbSdtSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DvbSdtSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DvbSdtSettings"} - if s.SdtInterval != nil && *s.SdtInterval < 25 { - invalidParams.Add(request.NewErrParamMinValue("SdtInterval", 25)) - } - if s.ServiceName != nil && len(*s.ServiceName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceName", 1)) - } - if s.ServiceProviderName != nil && len(*s.ServiceProviderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceProviderName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOutputSdt sets the OutputSdt field's value. -func (s *DvbSdtSettings) SetOutputSdt(v string) *DvbSdtSettings { - s.OutputSdt = &v - return s -} - -// SetSdtInterval sets the SdtInterval field's value. -func (s *DvbSdtSettings) SetSdtInterval(v int64) *DvbSdtSettings { - s.SdtInterval = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *DvbSdtSettings) SetServiceName(v string) *DvbSdtSettings { - s.ServiceName = &v - return s -} - -// SetServiceProviderName sets the ServiceProviderName field's value. -func (s *DvbSdtSettings) SetServiceProviderName(v string) *DvbSdtSettings { - s.ServiceProviderName = &v - return s -} - -// DVB-Sub Destination Settings -type DvbSubDestinationSettings struct { - _ struct{} `type:"structure"` - - // If no explicit x_position or y_position is provided, setting alignment to - // centered will place the captions at the bottom center of the output. Similarly, - // setting a left alignment will align captions to the bottom left of the output. - // If x and y positions are given in conjunction with the alignment parameter, - // the font will be justified (either left or centered) relative to those coordinates. - // This option is not valid for source captions that are STL, 608/embedded or - // teletext. These source settings are already pre-defined by the caption stream. - // All burn-in and DVB-Sub font settings must match. - Alignment *string `locationName:"alignment" type:"string" enum:"DvbSubtitleAlignment"` - - // Specifies the color of the rectangle behind the captions.All burn-in and - // DVB-Sub font settings must match. - BackgroundColor *string `locationName:"backgroundColor" type:"string" enum:"DvbSubtitleBackgroundColor"` - - // Specifies the opacity of the background rectangle. 255 is opaque; 0 is transparent. - // Leaving this parameter blank is equivalent to setting it to 0 (transparent). - // All burn-in and DVB-Sub font settings must match. - BackgroundOpacity *int64 `locationName:"backgroundOpacity" type:"integer"` - - // Specifies the color of the burned-in captions. This option is not valid for - // source captions that are STL, 608/embedded or teletext. These source settings - // are already pre-defined by the caption stream. All burn-in and DVB-Sub font - // settings must match. - FontColor *string `locationName:"fontColor" type:"string" enum:"DvbSubtitleFontColor"` - - // Specifies the opacity of the burned-in captions. 255 is opaque; 0 is transparent.All - // burn-in and DVB-Sub font settings must match. - FontOpacity *int64 `locationName:"fontOpacity" type:"integer"` - - // Font resolution in DPI (dots per inch); default is 96 dpi.All burn-in and - // DVB-Sub font settings must match. - FontResolution *int64 `locationName:"fontResolution" min:"96" type:"integer"` - - // Provide the font script, using an ISO 15924 script code, if the LanguageCode - // is not sufficient for determining the script type. Where LanguageCode or - // CustomLanguageCode is sufficient, use "AUTOMATIC" or leave unset. This is - // used to help determine the appropriate font for rendering DVB-Sub captions. - FontScript *string `locationName:"fontScript" type:"string" enum:"FontScript"` - - // A positive integer indicates the exact font size in points. Set to 0 for - // automatic font size selection. All burn-in and DVB-Sub font settings must - // match. - FontSize *int64 `locationName:"fontSize" type:"integer"` - - // Specifies font outline color. This option is not valid for source captions - // that are either 608/embedded or teletext. These source settings are already - // pre-defined by the caption stream. All burn-in and DVB-Sub font settings - // must match. - OutlineColor *string `locationName:"outlineColor" type:"string" enum:"DvbSubtitleOutlineColor"` - - // Specifies font outline size in pixels. This option is not valid for source - // captions that are either 608/embedded or teletext. These source settings - // are already pre-defined by the caption stream. All burn-in and DVB-Sub font - // settings must match. - OutlineSize *int64 `locationName:"outlineSize" type:"integer"` - - // Specifies the color of the shadow cast by the captions.All burn-in and DVB-Sub - // font settings must match. - ShadowColor *string `locationName:"shadowColor" type:"string" enum:"DvbSubtitleShadowColor"` - - // Specifies the opacity of the shadow. 255 is opaque; 0 is transparent. Leaving - // this parameter blank is equivalent to setting it to 0 (transparent). All - // burn-in and DVB-Sub font settings must match. - ShadowOpacity *int64 `locationName:"shadowOpacity" type:"integer"` - - // Specifies the horizontal offset of the shadow relative to the captions in - // pixels. A value of -2 would result in a shadow offset 2 pixels to the left. - // All burn-in and DVB-Sub font settings must match. - ShadowXOffset *int64 `locationName:"shadowXOffset" type:"integer"` - - // Specifies the vertical offset of the shadow relative to the captions in pixels. - // A value of -2 would result in a shadow offset 2 pixels above the text. All - // burn-in and DVB-Sub font settings must match. - ShadowYOffset *int64 `locationName:"shadowYOffset" type:"integer"` - - // Only applies to jobs with input captions in Teletext or STL formats. Specify - // whether the spacing between letters in your captions is set by the captions - // grid or varies depending on letter width. Choose fixed grid to conform to - // the spacing specified in the captions file more accurately. Choose proportional - // to make the text easier to read if the captions are closed caption. - TeletextSpacing *string `locationName:"teletextSpacing" type:"string" enum:"DvbSubtitleTeletextSpacing"` - - // Specifies the horizontal position of the caption relative to the left side - // of the output in pixels. A value of 10 would result in the captions starting - // 10 pixels from the left of the output. If no explicit x_position is provided, - // the horizontal caption position will be determined by the alignment parameter. - // This option is not valid for source captions that are STL, 608/embedded or - // teletext. These source settings are already pre-defined by the caption stream. - // All burn-in and DVB-Sub font settings must match. - XPosition *int64 `locationName:"xPosition" type:"integer"` - - // Specifies the vertical position of the caption relative to the top of the - // output in pixels. A value of 10 would result in the captions starting 10 - // pixels from the top of the output. If no explicit y_position is provided, - // the caption will be positioned towards the bottom of the output. This option - // is not valid for source captions that are STL, 608/embedded or teletext. - // These source settings are already pre-defined by the caption stream. All - // burn-in and DVB-Sub font settings must match. - YPosition *int64 `locationName:"yPosition" type:"integer"` -} - -// String returns the string representation -func (s DvbSubDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DvbSubDestinationSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DvbSubDestinationSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DvbSubDestinationSettings"} - if s.FontResolution != nil && *s.FontResolution < 96 { - invalidParams.Add(request.NewErrParamMinValue("FontResolution", 96)) - } - if s.ShadowXOffset != nil && *s.ShadowXOffset < -2.147483648e+09 { - invalidParams.Add(request.NewErrParamMinValue("ShadowXOffset", -2.147483648e+09)) - } - if s.ShadowYOffset != nil && *s.ShadowYOffset < -2.147483648e+09 { - invalidParams.Add(request.NewErrParamMinValue("ShadowYOffset", -2.147483648e+09)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlignment sets the Alignment field's value. -func (s *DvbSubDestinationSettings) SetAlignment(v string) *DvbSubDestinationSettings { - s.Alignment = &v - return s -} - -// SetBackgroundColor sets the BackgroundColor field's value. -func (s *DvbSubDestinationSettings) SetBackgroundColor(v string) *DvbSubDestinationSettings { - s.BackgroundColor = &v - return s -} - -// SetBackgroundOpacity sets the BackgroundOpacity field's value. -func (s *DvbSubDestinationSettings) SetBackgroundOpacity(v int64) *DvbSubDestinationSettings { - s.BackgroundOpacity = &v - return s -} - -// SetFontColor sets the FontColor field's value. -func (s *DvbSubDestinationSettings) SetFontColor(v string) *DvbSubDestinationSettings { - s.FontColor = &v - return s -} - -// SetFontOpacity sets the FontOpacity field's value. -func (s *DvbSubDestinationSettings) SetFontOpacity(v int64) *DvbSubDestinationSettings { - s.FontOpacity = &v - return s -} - -// SetFontResolution sets the FontResolution field's value. -func (s *DvbSubDestinationSettings) SetFontResolution(v int64) *DvbSubDestinationSettings { - s.FontResolution = &v - return s -} - -// SetFontScript sets the FontScript field's value. -func (s *DvbSubDestinationSettings) SetFontScript(v string) *DvbSubDestinationSettings { - s.FontScript = &v - return s -} - -// SetFontSize sets the FontSize field's value. -func (s *DvbSubDestinationSettings) SetFontSize(v int64) *DvbSubDestinationSettings { - s.FontSize = &v - return s -} - -// SetOutlineColor sets the OutlineColor field's value. -func (s *DvbSubDestinationSettings) SetOutlineColor(v string) *DvbSubDestinationSettings { - s.OutlineColor = &v - return s -} - -// SetOutlineSize sets the OutlineSize field's value. -func (s *DvbSubDestinationSettings) SetOutlineSize(v int64) *DvbSubDestinationSettings { - s.OutlineSize = &v - return s -} - -// SetShadowColor sets the ShadowColor field's value. -func (s *DvbSubDestinationSettings) SetShadowColor(v string) *DvbSubDestinationSettings { - s.ShadowColor = &v - return s -} - -// SetShadowOpacity sets the ShadowOpacity field's value. -func (s *DvbSubDestinationSettings) SetShadowOpacity(v int64) *DvbSubDestinationSettings { - s.ShadowOpacity = &v - return s -} - -// SetShadowXOffset sets the ShadowXOffset field's value. -func (s *DvbSubDestinationSettings) SetShadowXOffset(v int64) *DvbSubDestinationSettings { - s.ShadowXOffset = &v - return s -} - -// SetShadowYOffset sets the ShadowYOffset field's value. -func (s *DvbSubDestinationSettings) SetShadowYOffset(v int64) *DvbSubDestinationSettings { - s.ShadowYOffset = &v - return s -} - -// SetTeletextSpacing sets the TeletextSpacing field's value. -func (s *DvbSubDestinationSettings) SetTeletextSpacing(v string) *DvbSubDestinationSettings { - s.TeletextSpacing = &v - return s -} - -// SetXPosition sets the XPosition field's value. -func (s *DvbSubDestinationSettings) SetXPosition(v int64) *DvbSubDestinationSettings { - s.XPosition = &v - return s -} - -// SetYPosition sets the YPosition field's value. -func (s *DvbSubDestinationSettings) SetYPosition(v int64) *DvbSubDestinationSettings { - s.YPosition = &v - return s -} - -// DVB Sub Source Settings -type DvbSubSourceSettings struct { - _ struct{} `type:"structure"` - - // When using DVB-Sub with Burn-In or SMPTE-TT, use this PID for the source - // content. Unused for DVB-Sub passthrough. All DVB-Sub content is passed through, - // regardless of selectors. - Pid *int64 `locationName:"pid" min:"1" type:"integer"` -} - -// String returns the string representation -func (s DvbSubSourceSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DvbSubSourceSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DvbSubSourceSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DvbSubSourceSettings"} - if s.Pid != nil && *s.Pid < 1 { - invalidParams.Add(request.NewErrParamMinValue("Pid", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPid sets the Pid field's value. -func (s *DvbSubSourceSettings) SetPid(v int64) *DvbSubSourceSettings { - s.Pid = &v - return s -} - -// Inserts DVB Time and Date Table (TDT) at the specified table repetition interval. -type DvbTdtSettings struct { - _ struct{} `type:"structure"` - - // The number of milliseconds between instances of this table in the output - // transport stream. - TdtInterval *int64 `locationName:"tdtInterval" min:"1000" type:"integer"` -} - -// String returns the string representation -func (s DvbTdtSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DvbTdtSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DvbTdtSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DvbTdtSettings"} - if s.TdtInterval != nil && *s.TdtInterval < 1000 { - invalidParams.Add(request.NewErrParamMinValue("TdtInterval", 1000)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTdtInterval sets the TdtInterval field's value. -func (s *DvbTdtSettings) SetTdtInterval(v int64) *DvbTdtSettings { - s.TdtInterval = &v - return s -} - -// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to -// the value EAC3. -type Eac3Settings struct { - _ struct{} `type:"structure"` - - // If set to ATTENUATE_3_DB, applies a 3 dB attenuation to the surround channels. - // Only used for 3/2 coding mode. - AttenuationControl *string `locationName:"attenuationControl" type:"string" enum:"Eac3AttenuationControl"` - - // Average bitrate in bits/second. Valid bitrates depend on the coding mode. - Bitrate *int64 `locationName:"bitrate" min:"64000" type:"integer"` - - // Specifies the "Bitstream Mode" (bsmod) for the emitted E-AC-3 stream. See - // ATSC A/52-2012 (Annex E) for background on these values. - BitstreamMode *string `locationName:"bitstreamMode" type:"string" enum:"Eac3BitstreamMode"` - - // Dolby Digital Plus coding mode. Determines number of channels. - CodingMode *string `locationName:"codingMode" type:"string" enum:"Eac3CodingMode"` - - // Activates a DC highpass filter for all input channels. - DcFilter *string `locationName:"dcFilter" type:"string" enum:"Eac3DcFilter"` - - // Sets the dialnorm for the output. If blank and input audio is Dolby Digital - // Plus, dialnorm will be passed through. - Dialnorm *int64 `locationName:"dialnorm" min:"1" type:"integer"` - - // Enables Dynamic Range Compression that restricts the absolute peak level - // for a signal. - DynamicRangeCompressionLine *string `locationName:"dynamicRangeCompressionLine" type:"string" enum:"Eac3DynamicRangeCompressionLine"` - - // Enables Heavy Dynamic Range Compression, ensures that the instantaneous signal - // peaks do not exceed specified levels. - DynamicRangeCompressionRf *string `locationName:"dynamicRangeCompressionRf" type:"string" enum:"Eac3DynamicRangeCompressionRf"` - - // When encoding 3/2 audio, controls whether the LFE channel is enabled - LfeControl *string `locationName:"lfeControl" type:"string" enum:"Eac3LfeControl"` - - // Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only - // valid with 3_2_LFE coding mode. - LfeFilter *string `locationName:"lfeFilter" type:"string" enum:"Eac3LfeFilter"` - - // Left only/Right only center mix level. Only used for 3/2 coding mode.Valid - // values: 3.0, 1.5, 0.0, -1.5 -3.0 -4.5 -6.0 -60 - LoRoCenterMixLevel *float64 `locationName:"loRoCenterMixLevel" type:"double"` - - // Left only/Right only surround mix level. Only used for 3/2 coding mode.Valid - // values: -1.5 -3.0 -4.5 -6.0 -60 - LoRoSurroundMixLevel *float64 `locationName:"loRoSurroundMixLevel" type:"double"` - - // Left total/Right total center mix level. Only used for 3/2 coding mode.Valid - // values: 3.0, 1.5, 0.0, -1.5 -3.0 -4.5 -6.0 -60 - LtRtCenterMixLevel *float64 `locationName:"ltRtCenterMixLevel" type:"double"` - - // Left total/Right total surround mix level. Only used for 3/2 coding mode.Valid - // values: -1.5 -3.0 -4.5 -6.0 -60 - LtRtSurroundMixLevel *float64 `locationName:"ltRtSurroundMixLevel" type:"double"` - - // When set to FOLLOW_INPUT, encoder metadata will be sourced from the DD, DD+, - // or DolbyE decoder that supplied this audio data. If audio was not supplied - // from one of these streams, then the static metadata settings will be used. - MetadataControl *string `locationName:"metadataControl" type:"string" enum:"Eac3MetadataControl"` - - // When set to WHEN_POSSIBLE, input DD+ audio will be passed through if it is - // present on the input. this detection is dynamic over the life of the transcode. - // Inputs that alternate between DD+ and non-DD+ content will have a consistent - // DD+ output as the system alternates between passthrough and encoding. - PassthroughControl *string `locationName:"passthroughControl" type:"string" enum:"Eac3PassthroughControl"` - - // Controls the amount of phase-shift applied to the surround channels. Only - // used for 3/2 coding mode. - PhaseControl *string `locationName:"phaseControl" type:"string" enum:"Eac3PhaseControl"` - - // Sample rate in hz. Sample rate is always 48000. - SampleRate *int64 `locationName:"sampleRate" min:"48000" type:"integer"` - - // Stereo downmix preference. Only used for 3/2 coding mode. - StereoDownmix *string `locationName:"stereoDownmix" type:"string" enum:"Eac3StereoDownmix"` - - // When encoding 3/2 audio, sets whether an extra center back surround channel - // is matrix encoded into the left and right surround channels. - SurroundExMode *string `locationName:"surroundExMode" type:"string" enum:"Eac3SurroundExMode"` - - // When encoding 2/0 audio, sets whether Dolby Surround is matrix encoded into - // the two channels. - SurroundMode *string `locationName:"surroundMode" type:"string" enum:"Eac3SurroundMode"` -} - -// String returns the string representation -func (s Eac3Settings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Eac3Settings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Eac3Settings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Eac3Settings"} - if s.Bitrate != nil && *s.Bitrate < 64000 { - invalidParams.Add(request.NewErrParamMinValue("Bitrate", 64000)) - } - if s.Dialnorm != nil && *s.Dialnorm < 1 { - invalidParams.Add(request.NewErrParamMinValue("Dialnorm", 1)) - } - if s.SampleRate != nil && *s.SampleRate < 48000 { - invalidParams.Add(request.NewErrParamMinValue("SampleRate", 48000)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttenuationControl sets the AttenuationControl field's value. -func (s *Eac3Settings) SetAttenuationControl(v string) *Eac3Settings { - s.AttenuationControl = &v - return s -} - -// SetBitrate sets the Bitrate field's value. -func (s *Eac3Settings) SetBitrate(v int64) *Eac3Settings { - s.Bitrate = &v - return s -} - -// SetBitstreamMode sets the BitstreamMode field's value. -func (s *Eac3Settings) SetBitstreamMode(v string) *Eac3Settings { - s.BitstreamMode = &v - return s -} - -// SetCodingMode sets the CodingMode field's value. -func (s *Eac3Settings) SetCodingMode(v string) *Eac3Settings { - s.CodingMode = &v - return s -} - -// SetDcFilter sets the DcFilter field's value. -func (s *Eac3Settings) SetDcFilter(v string) *Eac3Settings { - s.DcFilter = &v - return s -} - -// SetDialnorm sets the Dialnorm field's value. -func (s *Eac3Settings) SetDialnorm(v int64) *Eac3Settings { - s.Dialnorm = &v - return s -} - -// SetDynamicRangeCompressionLine sets the DynamicRangeCompressionLine field's value. -func (s *Eac3Settings) SetDynamicRangeCompressionLine(v string) *Eac3Settings { - s.DynamicRangeCompressionLine = &v - return s -} - -// SetDynamicRangeCompressionRf sets the DynamicRangeCompressionRf field's value. -func (s *Eac3Settings) SetDynamicRangeCompressionRf(v string) *Eac3Settings { - s.DynamicRangeCompressionRf = &v - return s -} - -// SetLfeControl sets the LfeControl field's value. -func (s *Eac3Settings) SetLfeControl(v string) *Eac3Settings { - s.LfeControl = &v - return s -} - -// SetLfeFilter sets the LfeFilter field's value. -func (s *Eac3Settings) SetLfeFilter(v string) *Eac3Settings { - s.LfeFilter = &v - return s -} - -// SetLoRoCenterMixLevel sets the LoRoCenterMixLevel field's value. -func (s *Eac3Settings) SetLoRoCenterMixLevel(v float64) *Eac3Settings { - s.LoRoCenterMixLevel = &v - return s -} - -// SetLoRoSurroundMixLevel sets the LoRoSurroundMixLevel field's value. -func (s *Eac3Settings) SetLoRoSurroundMixLevel(v float64) *Eac3Settings { - s.LoRoSurroundMixLevel = &v - return s -} - -// SetLtRtCenterMixLevel sets the LtRtCenterMixLevel field's value. -func (s *Eac3Settings) SetLtRtCenterMixLevel(v float64) *Eac3Settings { - s.LtRtCenterMixLevel = &v - return s -} - -// SetLtRtSurroundMixLevel sets the LtRtSurroundMixLevel field's value. -func (s *Eac3Settings) SetLtRtSurroundMixLevel(v float64) *Eac3Settings { - s.LtRtSurroundMixLevel = &v - return s -} - -// SetMetadataControl sets the MetadataControl field's value. -func (s *Eac3Settings) SetMetadataControl(v string) *Eac3Settings { - s.MetadataControl = &v - return s -} - -// SetPassthroughControl sets the PassthroughControl field's value. -func (s *Eac3Settings) SetPassthroughControl(v string) *Eac3Settings { - s.PassthroughControl = &v - return s -} - -// SetPhaseControl sets the PhaseControl field's value. -func (s *Eac3Settings) SetPhaseControl(v string) *Eac3Settings { - s.PhaseControl = &v - return s -} - -// SetSampleRate sets the SampleRate field's value. -func (s *Eac3Settings) SetSampleRate(v int64) *Eac3Settings { - s.SampleRate = &v - return s -} - -// SetStereoDownmix sets the StereoDownmix field's value. -func (s *Eac3Settings) SetStereoDownmix(v string) *Eac3Settings { - s.StereoDownmix = &v - return s -} - -// SetSurroundExMode sets the SurroundExMode field's value. -func (s *Eac3Settings) SetSurroundExMode(v string) *Eac3Settings { - s.SurroundExMode = &v - return s -} - -// SetSurroundMode sets the SurroundMode field's value. -func (s *Eac3Settings) SetSurroundMode(v string) *Eac3Settings { - s.SurroundMode = &v - return s -} - -// Settings specific to embedded/ancillary caption outputs, including 608/708 -// Channel destination number. -type EmbeddedDestinationSettings struct { - _ struct{} `type:"structure"` - - // Ignore this setting unless your input captions are SCC format and your output - // container is MXF. With this combination of input captions format and output - // container, you can optionally use this setting to replace the input channel - // number with the track number that you specify. If you don't specify an output - // track number, the system uses the input channel number for the output channel - // number. This setting applies to each output individually. Channels must be - // unique and may only be combined in the following combinations: (1+3, 2+4, - // 1+4, 2+3). - Destination608ChannelNumber *int64 `locationName:"destination608ChannelNumber" min:"1" type:"integer"` -} - -// String returns the string representation -func (s EmbeddedDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EmbeddedDestinationSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EmbeddedDestinationSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EmbeddedDestinationSettings"} - if s.Destination608ChannelNumber != nil && *s.Destination608ChannelNumber < 1 { - invalidParams.Add(request.NewErrParamMinValue("Destination608ChannelNumber", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestination608ChannelNumber sets the Destination608ChannelNumber field's value. -func (s *EmbeddedDestinationSettings) SetDestination608ChannelNumber(v int64) *EmbeddedDestinationSettings { - s.Destination608ChannelNumber = &v - return s -} - -// Settings for embedded captions Source -type EmbeddedSourceSettings struct { - _ struct{} `type:"structure"` - - // When set to UPCONVERT, 608 data is both passed through via the "608 compatibility - // bytes" fields of the 708 wrapper as well as translated into 708. 708 data - // present in the source content will be discarded. - Convert608To708 *string `locationName:"convert608To708" type:"string" enum:"EmbeddedConvert608To708"` - - // Specifies the 608/708 channel number within the video track from which to - // extract captions. Unused for passthrough. - Source608ChannelNumber *int64 `locationName:"source608ChannelNumber" min:"1" type:"integer"` - - // Specifies the video track index used for extracting captions. The system - // only supports one input video track, so this should always be set to '1'. - Source608TrackNumber *int64 `locationName:"source608TrackNumber" min:"1" type:"integer"` -} - -// String returns the string representation -func (s EmbeddedSourceSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EmbeddedSourceSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EmbeddedSourceSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EmbeddedSourceSettings"} - if s.Source608ChannelNumber != nil && *s.Source608ChannelNumber < 1 { - invalidParams.Add(request.NewErrParamMinValue("Source608ChannelNumber", 1)) - } - if s.Source608TrackNumber != nil && *s.Source608TrackNumber < 1 { - invalidParams.Add(request.NewErrParamMinValue("Source608TrackNumber", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConvert608To708 sets the Convert608To708 field's value. -func (s *EmbeddedSourceSettings) SetConvert608To708(v string) *EmbeddedSourceSettings { - s.Convert608To708 = &v - return s -} - -// SetSource608ChannelNumber sets the Source608ChannelNumber field's value. -func (s *EmbeddedSourceSettings) SetSource608ChannelNumber(v int64) *EmbeddedSourceSettings { - s.Source608ChannelNumber = &v - return s -} - -// SetSource608TrackNumber sets the Source608TrackNumber field's value. -func (s *EmbeddedSourceSettings) SetSource608TrackNumber(v int64) *EmbeddedSourceSettings { - s.Source608TrackNumber = &v - return s -} - -// Describes an account-specific API endpoint. -type Endpoint struct { - _ struct{} `type:"structure"` - - // URL of endpoint - Url *string `locationName:"url" type:"string"` -} - -// String returns the string representation -func (s Endpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Endpoint) GoString() string { - return s.String() -} - -// SetUrl sets the Url field's value. -func (s *Endpoint) SetUrl(v string) *Endpoint { - s.Url = &v - return s -} - -// Settings for F4v container -type F4vSettings struct { - _ struct{} `type:"structure"` - - // If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning - // of the archive as required for progressive downloading. Otherwise it is placed - // normally at the end. - MoovPlacement *string `locationName:"moovPlacement" type:"string" enum:"F4vMoovPlacement"` -} - -// String returns the string representation -func (s F4vSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s F4vSettings) GoString() string { - return s.String() -} - -// SetMoovPlacement sets the MoovPlacement field's value. -func (s *F4vSettings) SetMoovPlacement(v string) *F4vSettings { - s.MoovPlacement = &v - return s -} - -// Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to -// FILE_GROUP_SETTINGS. -type FileGroupSettings struct { - _ struct{} `type:"structure"` - - // Use Destination (Destination) to specify the S3 output location and the output - // filename base. Destination accepts format identifiers. If you do not specify - // the base filename in the URI, the service will use the filename of the input - // file. If your job has multiple inputs, the service uses the filename of the - // first input file. - Destination *string `locationName:"destination" type:"string"` -} - -// String returns the string representation -func (s FileGroupSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FileGroupSettings) GoString() string { - return s.String() -} - -// SetDestination sets the Destination field's value. -func (s *FileGroupSettings) SetDestination(v string) *FileGroupSettings { - s.Destination = &v - return s -} - -// Settings for File-based Captions in Source -type FileSourceSettings struct { - _ struct{} `type:"structure"` - - // If set to UPCONVERT, 608 caption data is both passed through via the "608 - // compatibility bytes" fields of the 708 wrapper as well as translated into - // 708. 708 data present in the source content will be discarded. - Convert608To708 *string `locationName:"convert608To708" type:"string" enum:"FileSourceConvert608To708"` - - // External caption file used for loading captions. Accepted file extensions - // are 'scc', 'ttml', 'dfxp', 'stl', 'srt', and 'smi'. - SourceFile *string `locationName:"sourceFile" min:"14" type:"string"` - - // Specifies a time delta in seconds to offset the captions from the source - // file. - TimeDelta *int64 `locationName:"timeDelta" type:"integer"` -} - -// String returns the string representation -func (s FileSourceSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FileSourceSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FileSourceSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FileSourceSettings"} - if s.SourceFile != nil && len(*s.SourceFile) < 14 { - invalidParams.Add(request.NewErrParamMinLen("SourceFile", 14)) - } - if s.TimeDelta != nil && *s.TimeDelta < -2.147483648e+09 { - invalidParams.Add(request.NewErrParamMinValue("TimeDelta", -2.147483648e+09)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConvert608To708 sets the Convert608To708 field's value. -func (s *FileSourceSettings) SetConvert608To708(v string) *FileSourceSettings { - s.Convert608To708 = &v - return s -} - -// SetSourceFile sets the SourceFile field's value. -func (s *FileSourceSettings) SetSourceFile(v string) *FileSourceSettings { - s.SourceFile = &v - return s -} - -// SetTimeDelta sets the TimeDelta field's value. -func (s *FileSourceSettings) SetTimeDelta(v int64) *FileSourceSettings { - s.TimeDelta = &v - return s -} - -// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to -// the value FRAME_CAPTURE. -type FrameCaptureSettings struct { - _ struct{} `type:"structure"` - - // Frame capture will encode the first frame of the output stream, then one - // frame every framerateDenominator/framerateNumerator seconds. For example, - // settings of framerateNumerator = 1 and framerateDenominator = 3 (a rate of - // 1/3 frame per second) will capture the first frame, then 1 frame every 3s. - // Files will be named as filename.n.jpg where n is the 0-based sequence number - // of each Capture. - FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` - - // Frame capture will encode the first frame of the output stream, then one - // frame every framerateDenominator/framerateNumerator seconds. For example, - // settings of framerateNumerator = 1 and framerateDenominator = 3 (a rate of - // 1/3 frame per second) will capture the first frame, then 1 frame every 3s. - // Files will be named as filename.NNNNNNN.jpg where N is the 0-based frame - // sequence number zero padded to 7 decimal places. - FramerateNumerator *int64 `locationName:"framerateNumerator" min:"1" type:"integer"` - - // Maximum number of captures (encoded jpg output files). - MaxCaptures *int64 `locationName:"maxCaptures" min:"1" type:"integer"` - - // JPEG Quality - a higher value equals higher quality. - Quality *int64 `locationName:"quality" min:"1" type:"integer"` -} - -// String returns the string representation -func (s FrameCaptureSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FrameCaptureSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FrameCaptureSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FrameCaptureSettings"} - if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { - invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) - } - if s.FramerateNumerator != nil && *s.FramerateNumerator < 1 { - invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 1)) - } - if s.MaxCaptures != nil && *s.MaxCaptures < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxCaptures", 1)) - } - if s.Quality != nil && *s.Quality < 1 { - invalidParams.Add(request.NewErrParamMinValue("Quality", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFramerateDenominator sets the FramerateDenominator field's value. -func (s *FrameCaptureSettings) SetFramerateDenominator(v int64) *FrameCaptureSettings { - s.FramerateDenominator = &v - return s -} - -// SetFramerateNumerator sets the FramerateNumerator field's value. -func (s *FrameCaptureSettings) SetFramerateNumerator(v int64) *FrameCaptureSettings { - s.FramerateNumerator = &v - return s -} - -// SetMaxCaptures sets the MaxCaptures field's value. -func (s *FrameCaptureSettings) SetMaxCaptures(v int64) *FrameCaptureSettings { - s.MaxCaptures = &v - return s -} - -// SetQuality sets the Quality field's value. -func (s *FrameCaptureSettings) SetQuality(v int64) *FrameCaptureSettings { - s.Quality = &v - return s -} - -// Query a job by sending a request with the job ID. -type GetJobInput struct { - _ struct{} `type:"structure"` - - // the job ID of the job. - // - // Id is a required field - Id *string `location:"uri" locationName:"id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetJobInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetJobInput) SetId(v string) *GetJobInput { - s.Id = &v - return s -} - -// Successful get job requests will return an OK message and the job JSON. -type GetJobOutput struct { - _ struct{} `type:"structure"` - - // Each job converts an input file into an output file or files. For more information, - // see the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html - Job *Job `locationName:"job" type:"structure"` -} - -// String returns the string representation -func (s GetJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobOutput) GoString() string { - return s.String() -} - -// SetJob sets the Job field's value. -func (s *GetJobOutput) SetJob(v *Job) *GetJobOutput { - s.Job = v - return s -} - -// Query a job template by sending a request with the job template name. -type GetJobTemplateInput struct { - _ struct{} `type:"structure"` - - // The name of the job template. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetJobTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetJobTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetJobTemplateInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetJobTemplateInput) SetName(v string) *GetJobTemplateInput { - s.Name = &v - return s -} - -// Successful get job template requests will return an OK message and the job -// template JSON. -type GetJobTemplateOutput struct { - _ struct{} `type:"structure"` - - // A job template is a pre-made set of encoding instructions that you can use - // to quickly create a job. - JobTemplate *JobTemplate `locationName:"jobTemplate" type:"structure"` -} - -// String returns the string representation -func (s GetJobTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetJobTemplateOutput) GoString() string { - return s.String() -} - -// SetJobTemplate sets the JobTemplate field's value. -func (s *GetJobTemplateOutput) SetJobTemplate(v *JobTemplate) *GetJobTemplateOutput { - s.JobTemplate = v - return s -} - -// Query a preset by sending a request with the preset name. -type GetPresetInput struct { - _ struct{} `type:"structure"` - - // The name of the preset. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPresetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPresetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPresetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPresetInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetPresetInput) SetName(v string) *GetPresetInput { - s.Name = &v - return s -} - -// Successful get preset requests will return an OK message and the preset JSON. -type GetPresetOutput struct { - _ struct{} `type:"structure"` - - // A preset is a collection of preconfigured media conversion settings that - // you want MediaConvert to apply to the output during the conversion process. - Preset *Preset `locationName:"preset" type:"structure"` -} - -// String returns the string representation -func (s GetPresetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPresetOutput) GoString() string { - return s.String() -} - -// SetPreset sets the Preset field's value. -func (s *GetPresetOutput) SetPreset(v *Preset) *GetPresetOutput { - s.Preset = v - return s -} - -// Get information about a queue by sending a request with the queue name. -type GetQueueInput struct { - _ struct{} `type:"structure"` - - // The name of the queue that you want information about. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetQueueInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetQueueInput) SetName(v string) *GetQueueInput { - s.Name = &v - return s -} - -// Successful get queue requests return an OK message and information about -// the queue in JSON. -type GetQueueOutput struct { - _ struct{} `type:"structure"` - - // You can use queues to manage the resources that are available to your AWS - // account for running multiple transcoding jobs at the same time. If you don't - // specify a queue, the service sends all jobs through the default queue. For - // more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-queues.html. - Queue *Queue `locationName:"queue" type:"structure"` -} - -// String returns the string representation -func (s GetQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetQueueOutput) GoString() string { - return s.String() -} - -// SetQueue sets the Queue field's value. -func (s *GetQueueOutput) SetQueue(v *Queue) *GetQueueOutput { - s.Queue = v - return s -} - -// Settings for quality-defined variable bitrate encoding with the H.264 codec. -// Required when you set Rate control mode to QVBR. Not valid when you set Rate -// control mode to a value other than QVBR, or when you don't define Rate control -// mode. -type H264QvbrSettings struct { - _ struct{} `type:"structure"` - - // Use this setting only when Rate control mode is QVBR and Quality tuning level - // is Multi-pass HQ. For Max average bitrate values suited to the complexity - // of your input video, the service limits the average bitrate of the video - // part of this output to the value you choose. That is, the total size of the - // video element is less than or equal to the value you set multiplied by the - // number of seconds of encoded output. - MaxAverageBitrate *int64 `locationName:"maxAverageBitrate" min:"1000" type:"integer"` - - // Required when you use QVBR rate control mode. That is, when you specify qvbrSettings - // within h264Settings. Specify the target quality level for this output, from - // 1 to 10. Use higher numbers for greater quality. Level 10 results in nearly - // lossless compression. The quality level for most broadcast-quality transcodes - // is between 6 and 9. - QvbrQualityLevel *int64 `locationName:"qvbrQualityLevel" min:"1" type:"integer"` -} - -// String returns the string representation -func (s H264QvbrSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s H264QvbrSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *H264QvbrSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "H264QvbrSettings"} - if s.MaxAverageBitrate != nil && *s.MaxAverageBitrate < 1000 { - invalidParams.Add(request.NewErrParamMinValue("MaxAverageBitrate", 1000)) - } - if s.QvbrQualityLevel != nil && *s.QvbrQualityLevel < 1 { - invalidParams.Add(request.NewErrParamMinValue("QvbrQualityLevel", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxAverageBitrate sets the MaxAverageBitrate field's value. -func (s *H264QvbrSettings) SetMaxAverageBitrate(v int64) *H264QvbrSettings { - s.MaxAverageBitrate = &v - return s -} - -// SetQvbrQualityLevel sets the QvbrQualityLevel field's value. -func (s *H264QvbrSettings) SetQvbrQualityLevel(v int64) *H264QvbrSettings { - s.QvbrQualityLevel = &v - return s -} - -// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to -// the value H_264. -type H264Settings struct { - _ struct{} `type:"structure"` - - // Adaptive quantization. Allows intra-frame quantizers to vary to improve visual - // quality. - AdaptiveQuantization *string `locationName:"adaptiveQuantization" type:"string" enum:"H264AdaptiveQuantization"` - - // Average bitrate in bits/second. Required for VBR and CBR. For MS Smooth outputs, - // bitrates must be unique when rounded down to the nearest multiple of 1000. - Bitrate *int64 `locationName:"bitrate" min:"1000" type:"integer"` - - // Specify an H.264 level that is consistent with your output video settings. - // If you aren't sure what level to specify, choose Auto (AUTO). - CodecLevel *string `locationName:"codecLevel" type:"string" enum:"H264CodecLevel"` - - // H.264 Profile. High 4:2:2 and 10-bit profiles are only available with the - // AVC-I License. - CodecProfile *string `locationName:"codecProfile" type:"string" enum:"H264CodecProfile"` - - // Choose Adaptive to improve subjective video quality for high-motion content. - // This will cause the service to use fewer B-frames (which infer information - // based on other frames) for high-motion portions of the video and more B-frames - // for low-motion portions. The maximum number of B-frames is limited by the - // value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames). - DynamicSubGop *string `locationName:"dynamicSubGop" type:"string" enum:"H264DynamicSubGop"` - - // Entropy encoding mode. Use CABAC (must be in Main or High profile) or CAVLC. - EntropyEncoding *string `locationName:"entropyEncoding" type:"string" enum:"H264EntropyEncoding"` - - // Choosing FORCE_FIELD disables PAFF encoding for interlaced outputs. - FieldEncoding *string `locationName:"fieldEncoding" type:"string" enum:"H264FieldEncoding"` - - // Adjust quantization within each frame to reduce flicker or 'pop' on I-frames. - FlickerAdaptiveQuantization *string `locationName:"flickerAdaptiveQuantization" type:"string" enum:"H264FlickerAdaptiveQuantization"` - - // If you are using the console, use the Framerate setting to specify the frame - // rate for this output. If you want to keep the same frame rate as the input - // video, choose Follow source. If you want to do frame rate conversion, choose - // a frame rate from the dropdown list or choose Custom. The framerates shown - // in the dropdown list are decimal approximations of fractions. If you choose - // Custom, specify your frame rate as a fraction. If you are creating your transcoding - // job specification as a JSON file without the console, use FramerateControl - // to specify which value the service uses for the frame rate for this output. - // Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate - // from the input. Choose SPECIFIED if you want the service to use the frame - // rate you specify in the settings FramerateNumerator and FramerateDenominator. - FramerateControl *string `locationName:"framerateControl" type:"string" enum:"H264FramerateControl"` - - // When set to INTERPOLATE, produces smoother motion during frame rate conversion. - FramerateConversionAlgorithm *string `locationName:"framerateConversionAlgorithm" type:"string" enum:"H264FramerateConversionAlgorithm"` - - // When you use the API for transcode jobs that use frame rate conversion, specify - // the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use - // FramerateDenominator to specify the denominator of this fraction. In this - // example, use 1001 for the value of FramerateDenominator. When you use the - // console for transcode jobs that use frame rate conversion, provide the value - // as a decimal number for Framerate. In this example, specify 23.976. - FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` - - // Frame rate numerator - frame rate is a fraction, e.g. 24000 / 1001 = 23.976 - // fps. - FramerateNumerator *int64 `locationName:"framerateNumerator" min:"1" type:"integer"` - - // If enable, use reference B frames for GOP structures that have B frames > - // 1. - GopBReference *string `locationName:"gopBReference" type:"string" enum:"H264GopBReference"` - - // Frequency of closed GOPs. In streaming applications, it is recommended that - // this be set to 1 so a decoder joining mid-stream will receive an IDR frame - // as quickly as possible. Setting this value to 0 will break output segmenting. - GopClosedCadence *int64 `locationName:"gopClosedCadence" type:"integer"` - - // GOP Length (keyframe interval) in frames or seconds. Must be greater than - // zero. - GopSize *float64 `locationName:"gopSize" type:"double"` - - // Indicates if the GOP Size in H264 is specified in frames or seconds. If seconds - // the system will convert the GOP Size into a frame count at run time. - GopSizeUnits *string `locationName:"gopSizeUnits" type:"string" enum:"H264GopSizeUnits"` - - // Percentage of the buffer that should initially be filled (HRD buffer model). - HrdBufferInitialFillPercentage *int64 `locationName:"hrdBufferInitialFillPercentage" type:"integer"` - - // Size of buffer (HRD buffer model) in bits. For example, enter five megabits - // as 5000000. - HrdBufferSize *int64 `locationName:"hrdBufferSize" type:"integer"` - - // Use Interlace mode (InterlaceMode) to choose the scan line type for the output. - // * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce - // interlaced output with the entire output having the same field polarity (top - // or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default - // Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, - // behavior depends on the input scan type, as follows. - If the source is interlaced, - // the output will be interlaced with the same polarity as the source (it will - // follow the source). The output could therefore be a mix of "top field first" - // and "bottom field first". - If the source is progressive, the output will - // be interlaced with "top field first" or "bottom field first" polarity, depending - // on which of the Follow options you chose. - InterlaceMode *string `locationName:"interlaceMode" type:"string" enum:"H264InterlaceMode"` - - // Maximum bitrate in bits/second. For example, enter five megabits per second - // as 5000000. Required when Rate control mode is QVBR. - MaxBitrate *int64 `locationName:"maxBitrate" min:"1000" type:"integer"` - - // Enforces separation between repeated (cadence) I-frames and I-frames inserted - // by Scene Change Detection. If a scene change I-frame is within I-interval - // frames of a cadence I-frame, the GOP is shrunk and/or stretched to the scene - // change I-frame. GOP stretch requires enabling lookahead as well as setting - // I-interval. The normal cadence resumes for the next GOP. This setting is - // only used when Scene Change Detect is enabled. Note: Maximum GOP stretch - // = GOP size + Min-I-interval - 1 - MinIInterval *int64 `locationName:"minIInterval" type:"integer"` - - // Number of B-frames between reference frames. - NumberBFramesBetweenReferenceFrames *int64 `locationName:"numberBFramesBetweenReferenceFrames" type:"integer"` - - // Number of reference frames to use. The encoder may use more than requested - // if using B-frames and/or interlaced encoding. - NumberReferenceFrames *int64 `locationName:"numberReferenceFrames" min:"1" type:"integer"` - - // Using the API, enable ParFollowSource if you want the service to use the - // pixel aspect ratio from the input. Using the console, do this by choosing - // Follow source for Pixel aspect ratio. - ParControl *string `locationName:"parControl" type:"string" enum:"H264ParControl"` - - // Pixel Aspect Ratio denominator. - ParDenominator *int64 `locationName:"parDenominator" min:"1" type:"integer"` - - // Pixel Aspect Ratio numerator. - ParNumerator *int64 `locationName:"parNumerator" min:"1" type:"integer"` - - // Use Quality tuning level (H264QualityTuningLevel) to specifiy whether to - // use fast single-pass, high-quality singlepass, or high-quality multipass - // video encoding. - QualityTuningLevel *string `locationName:"qualityTuningLevel" type:"string" enum:"H264QualityTuningLevel"` - - // Settings for quality-defined variable bitrate encoding with the H.264 codec. - // Required when you set Rate control mode to QVBR. Not valid when you set Rate - // control mode to a value other than QVBR, or when you don't define Rate control - // mode. - QvbrSettings *H264QvbrSettings `locationName:"qvbrSettings" type:"structure"` - - // Use this setting to specify whether this output has a variable bitrate (VBR), - // constant bitrate (CBR) or quality-defined variable bitrate (QVBR). - RateControlMode *string `locationName:"rateControlMode" type:"string" enum:"H264RateControlMode"` - - // Places a PPS header on each encoded picture, even if repeated. - RepeatPps *string `locationName:"repeatPps" type:"string" enum:"H264RepeatPps"` - - // Scene change detection (inserts I-frames on scene changes). - SceneChangeDetect *string `locationName:"sceneChangeDetect" type:"string" enum:"H264SceneChangeDetect"` - - // Number of slices per picture. Must be less than or equal to the number of - // macroblock rows for progressive pictures, and less than or equal to half - // the number of macroblock rows for interlaced pictures. - Slices *int64 `locationName:"slices" min:"1" type:"integer"` - - // Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled - // as 25fps, and audio is sped up correspondingly. - SlowPal *string `locationName:"slowPal" type:"string" enum:"H264SlowPal"` - - // Softness. Selects quantizer matrix, larger values reduce high-frequency content - // in the encoded image. - Softness *int64 `locationName:"softness" type:"integer"` - - // Adjust quantization within each frame based on spatial variation of content - // complexity. - SpatialAdaptiveQuantization *string `locationName:"spatialAdaptiveQuantization" type:"string" enum:"H264SpatialAdaptiveQuantization"` - - // Produces a bitstream compliant with SMPTE RP-2027. - Syntax *string `locationName:"syntax" type:"string" enum:"H264Syntax"` - - // This field applies only if the Streams > Advanced > Framerate (framerate) - // field is set to 29.970. This field works with the Streams > Advanced > Preprocessors - // > Deinterlacer field (deinterlace_mode) and the Streams > Advanced > Interlaced - // Mode field (interlace_mode) to identify the scan type for the output: Progressive, - // Interlaced, Hard Telecine or Soft Telecine. - Hard: produces 29.97i output - // from 23.976 input. - Soft: produces 23.976; the player converts this output - // to 29.97i. - Telecine *string `locationName:"telecine" type:"string" enum:"H264Telecine"` - - // Adjust quantization within each frame based on temporal variation of content - // complexity. - TemporalAdaptiveQuantization *string `locationName:"temporalAdaptiveQuantization" type:"string" enum:"H264TemporalAdaptiveQuantization"` - - // Inserts timecode for each frame as 4 bytes of an unregistered SEI message. - UnregisteredSeiTimecode *string `locationName:"unregisteredSeiTimecode" type:"string" enum:"H264UnregisteredSeiTimecode"` -} - -// String returns the string representation -func (s H264Settings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s H264Settings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *H264Settings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "H264Settings"} - if s.Bitrate != nil && *s.Bitrate < 1000 { - invalidParams.Add(request.NewErrParamMinValue("Bitrate", 1000)) - } - if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { - invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) - } - if s.FramerateNumerator != nil && *s.FramerateNumerator < 1 { - invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 1)) - } - if s.MaxBitrate != nil && *s.MaxBitrate < 1000 { - invalidParams.Add(request.NewErrParamMinValue("MaxBitrate", 1000)) - } - if s.NumberReferenceFrames != nil && *s.NumberReferenceFrames < 1 { - invalidParams.Add(request.NewErrParamMinValue("NumberReferenceFrames", 1)) - } - if s.ParDenominator != nil && *s.ParDenominator < 1 { - invalidParams.Add(request.NewErrParamMinValue("ParDenominator", 1)) - } - if s.ParNumerator != nil && *s.ParNumerator < 1 { - invalidParams.Add(request.NewErrParamMinValue("ParNumerator", 1)) - } - if s.Slices != nil && *s.Slices < 1 { - invalidParams.Add(request.NewErrParamMinValue("Slices", 1)) - } - if s.QvbrSettings != nil { - if err := s.QvbrSettings.Validate(); err != nil { - invalidParams.AddNested("QvbrSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdaptiveQuantization sets the AdaptiveQuantization field's value. -func (s *H264Settings) SetAdaptiveQuantization(v string) *H264Settings { - s.AdaptiveQuantization = &v - return s -} - -// SetBitrate sets the Bitrate field's value. -func (s *H264Settings) SetBitrate(v int64) *H264Settings { - s.Bitrate = &v - return s -} - -// SetCodecLevel sets the CodecLevel field's value. -func (s *H264Settings) SetCodecLevel(v string) *H264Settings { - s.CodecLevel = &v - return s -} - -// SetCodecProfile sets the CodecProfile field's value. -func (s *H264Settings) SetCodecProfile(v string) *H264Settings { - s.CodecProfile = &v - return s -} - -// SetDynamicSubGop sets the DynamicSubGop field's value. -func (s *H264Settings) SetDynamicSubGop(v string) *H264Settings { - s.DynamicSubGop = &v - return s -} - -// SetEntropyEncoding sets the EntropyEncoding field's value. -func (s *H264Settings) SetEntropyEncoding(v string) *H264Settings { - s.EntropyEncoding = &v - return s -} - -// SetFieldEncoding sets the FieldEncoding field's value. -func (s *H264Settings) SetFieldEncoding(v string) *H264Settings { - s.FieldEncoding = &v - return s -} - -// SetFlickerAdaptiveQuantization sets the FlickerAdaptiveQuantization field's value. -func (s *H264Settings) SetFlickerAdaptiveQuantization(v string) *H264Settings { - s.FlickerAdaptiveQuantization = &v - return s -} - -// SetFramerateControl sets the FramerateControl field's value. -func (s *H264Settings) SetFramerateControl(v string) *H264Settings { - s.FramerateControl = &v - return s -} - -// SetFramerateConversionAlgorithm sets the FramerateConversionAlgorithm field's value. -func (s *H264Settings) SetFramerateConversionAlgorithm(v string) *H264Settings { - s.FramerateConversionAlgorithm = &v - return s -} - -// SetFramerateDenominator sets the FramerateDenominator field's value. -func (s *H264Settings) SetFramerateDenominator(v int64) *H264Settings { - s.FramerateDenominator = &v - return s -} - -// SetFramerateNumerator sets the FramerateNumerator field's value. -func (s *H264Settings) SetFramerateNumerator(v int64) *H264Settings { - s.FramerateNumerator = &v - return s -} - -// SetGopBReference sets the GopBReference field's value. -func (s *H264Settings) SetGopBReference(v string) *H264Settings { - s.GopBReference = &v - return s -} - -// SetGopClosedCadence sets the GopClosedCadence field's value. -func (s *H264Settings) SetGopClosedCadence(v int64) *H264Settings { - s.GopClosedCadence = &v - return s -} - -// SetGopSize sets the GopSize field's value. -func (s *H264Settings) SetGopSize(v float64) *H264Settings { - s.GopSize = &v - return s -} - -// SetGopSizeUnits sets the GopSizeUnits field's value. -func (s *H264Settings) SetGopSizeUnits(v string) *H264Settings { - s.GopSizeUnits = &v - return s -} - -// SetHrdBufferInitialFillPercentage sets the HrdBufferInitialFillPercentage field's value. -func (s *H264Settings) SetHrdBufferInitialFillPercentage(v int64) *H264Settings { - s.HrdBufferInitialFillPercentage = &v - return s -} - -// SetHrdBufferSize sets the HrdBufferSize field's value. -func (s *H264Settings) SetHrdBufferSize(v int64) *H264Settings { - s.HrdBufferSize = &v - return s -} - -// SetInterlaceMode sets the InterlaceMode field's value. -func (s *H264Settings) SetInterlaceMode(v string) *H264Settings { - s.InterlaceMode = &v - return s -} - -// SetMaxBitrate sets the MaxBitrate field's value. -func (s *H264Settings) SetMaxBitrate(v int64) *H264Settings { - s.MaxBitrate = &v - return s -} - -// SetMinIInterval sets the MinIInterval field's value. -func (s *H264Settings) SetMinIInterval(v int64) *H264Settings { - s.MinIInterval = &v - return s -} - -// SetNumberBFramesBetweenReferenceFrames sets the NumberBFramesBetweenReferenceFrames field's value. -func (s *H264Settings) SetNumberBFramesBetweenReferenceFrames(v int64) *H264Settings { - s.NumberBFramesBetweenReferenceFrames = &v - return s -} - -// SetNumberReferenceFrames sets the NumberReferenceFrames field's value. -func (s *H264Settings) SetNumberReferenceFrames(v int64) *H264Settings { - s.NumberReferenceFrames = &v - return s -} - -// SetParControl sets the ParControl field's value. -func (s *H264Settings) SetParControl(v string) *H264Settings { - s.ParControl = &v - return s -} - -// SetParDenominator sets the ParDenominator field's value. -func (s *H264Settings) SetParDenominator(v int64) *H264Settings { - s.ParDenominator = &v - return s -} - -// SetParNumerator sets the ParNumerator field's value. -func (s *H264Settings) SetParNumerator(v int64) *H264Settings { - s.ParNumerator = &v - return s -} - -// SetQualityTuningLevel sets the QualityTuningLevel field's value. -func (s *H264Settings) SetQualityTuningLevel(v string) *H264Settings { - s.QualityTuningLevel = &v - return s -} - -// SetQvbrSettings sets the QvbrSettings field's value. -func (s *H264Settings) SetQvbrSettings(v *H264QvbrSettings) *H264Settings { - s.QvbrSettings = v - return s -} - -// SetRateControlMode sets the RateControlMode field's value. -func (s *H264Settings) SetRateControlMode(v string) *H264Settings { - s.RateControlMode = &v - return s -} - -// SetRepeatPps sets the RepeatPps field's value. -func (s *H264Settings) SetRepeatPps(v string) *H264Settings { - s.RepeatPps = &v - return s -} - -// SetSceneChangeDetect sets the SceneChangeDetect field's value. -func (s *H264Settings) SetSceneChangeDetect(v string) *H264Settings { - s.SceneChangeDetect = &v - return s -} - -// SetSlices sets the Slices field's value. -func (s *H264Settings) SetSlices(v int64) *H264Settings { - s.Slices = &v - return s -} - -// SetSlowPal sets the SlowPal field's value. -func (s *H264Settings) SetSlowPal(v string) *H264Settings { - s.SlowPal = &v - return s -} - -// SetSoftness sets the Softness field's value. -func (s *H264Settings) SetSoftness(v int64) *H264Settings { - s.Softness = &v - return s -} - -// SetSpatialAdaptiveQuantization sets the SpatialAdaptiveQuantization field's value. -func (s *H264Settings) SetSpatialAdaptiveQuantization(v string) *H264Settings { - s.SpatialAdaptiveQuantization = &v - return s -} - -// SetSyntax sets the Syntax field's value. -func (s *H264Settings) SetSyntax(v string) *H264Settings { - s.Syntax = &v - return s -} - -// SetTelecine sets the Telecine field's value. -func (s *H264Settings) SetTelecine(v string) *H264Settings { - s.Telecine = &v - return s -} - -// SetTemporalAdaptiveQuantization sets the TemporalAdaptiveQuantization field's value. -func (s *H264Settings) SetTemporalAdaptiveQuantization(v string) *H264Settings { - s.TemporalAdaptiveQuantization = &v - return s -} - -// SetUnregisteredSeiTimecode sets the UnregisteredSeiTimecode field's value. -func (s *H264Settings) SetUnregisteredSeiTimecode(v string) *H264Settings { - s.UnregisteredSeiTimecode = &v - return s -} - -// Settings for quality-defined variable bitrate encoding with the H.265 codec. -// Required when you set Rate control mode to QVBR. Not valid when you set Rate -// control mode to a value other than QVBR, or when you don't define Rate control -// mode. -type H265QvbrSettings struct { - _ struct{} `type:"structure"` - - // Use this setting only when Rate control mode is QVBR and Quality tuning level - // is Multi-pass HQ. For Max average bitrate values suited to the complexity - // of your input video, the service limits the average bitrate of the video - // part of this output to the value you choose. That is, the total size of the - // video element is less than or equal to the value you set multiplied by the - // number of seconds of encoded output. - MaxAverageBitrate *int64 `locationName:"maxAverageBitrate" min:"1000" type:"integer"` - - // Required when you use QVBR rate control mode. That is, when you specify qvbrSettings - // within h265Settings. Specify the target quality level for this output, from - // 1 to 10. Use higher numbers for greater quality. Level 10 results in nearly - // lossless compression. The quality level for most broadcast-quality transcodes - // is between 6 and 9. - QvbrQualityLevel *int64 `locationName:"qvbrQualityLevel" min:"1" type:"integer"` -} - -// String returns the string representation -func (s H265QvbrSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s H265QvbrSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *H265QvbrSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "H265QvbrSettings"} - if s.MaxAverageBitrate != nil && *s.MaxAverageBitrate < 1000 { - invalidParams.Add(request.NewErrParamMinValue("MaxAverageBitrate", 1000)) - } - if s.QvbrQualityLevel != nil && *s.QvbrQualityLevel < 1 { - invalidParams.Add(request.NewErrParamMinValue("QvbrQualityLevel", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxAverageBitrate sets the MaxAverageBitrate field's value. -func (s *H265QvbrSettings) SetMaxAverageBitrate(v int64) *H265QvbrSettings { - s.MaxAverageBitrate = &v - return s -} - -// SetQvbrQualityLevel sets the QvbrQualityLevel field's value. -func (s *H265QvbrSettings) SetQvbrQualityLevel(v int64) *H265QvbrSettings { - s.QvbrQualityLevel = &v - return s -} - -// Settings for H265 codec -type H265Settings struct { - _ struct{} `type:"structure"` - - // Adaptive quantization. Allows intra-frame quantizers to vary to improve visual - // quality. - AdaptiveQuantization *string `locationName:"adaptiveQuantization" type:"string" enum:"H265AdaptiveQuantization"` - - // Enables Alternate Transfer Function SEI message for outputs using Hybrid - // Log Gamma (HLG) Electro-Optical Transfer Function (EOTF). - AlternateTransferFunctionSei *string `locationName:"alternateTransferFunctionSei" type:"string" enum:"H265AlternateTransferFunctionSei"` - - // Average bitrate in bits/second. Required for VBR and CBR. For MS Smooth outputs, - // bitrates must be unique when rounded down to the nearest multiple of 1000. - Bitrate *int64 `locationName:"bitrate" min:"1000" type:"integer"` - - // H.265 Level. - CodecLevel *string `locationName:"codecLevel" type:"string" enum:"H265CodecLevel"` - - // Represents the Profile and Tier, per the HEVC (H.265) specification. Selections - // are grouped as [Profile] / [Tier], so "Main/High" represents Main Profile - // with High Tier. 4:2:2 profiles are only available with the HEVC 4:2:2 License. - CodecProfile *string `locationName:"codecProfile" type:"string" enum:"H265CodecProfile"` - - // Choose Adaptive to improve subjective video quality for high-motion content. - // This will cause the service to use fewer B-frames (which infer information - // based on other frames) for high-motion portions of the video and more B-frames - // for low-motion portions. The maximum number of B-frames is limited by the - // value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames). - DynamicSubGop *string `locationName:"dynamicSubGop" type:"string" enum:"H265DynamicSubGop"` - - // Adjust quantization within each frame to reduce flicker or 'pop' on I-frames. - FlickerAdaptiveQuantization *string `locationName:"flickerAdaptiveQuantization" type:"string" enum:"H265FlickerAdaptiveQuantization"` - - // If you are using the console, use the Framerate setting to specify the frame - // rate for this output. If you want to keep the same frame rate as the input - // video, choose Follow source. If you want to do frame rate conversion, choose - // a frame rate from the dropdown list or choose Custom. The framerates shown - // in the dropdown list are decimal approximations of fractions. If you choose - // Custom, specify your frame rate as a fraction. If you are creating your transcoding - // job sepecification as a JSON file without the console, use FramerateControl - // to specify which value the service uses for the frame rate for this output. - // Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate - // from the input. Choose SPECIFIED if you want the service to use the frame - // rate you specify in the settings FramerateNumerator and FramerateDenominator. - FramerateControl *string `locationName:"framerateControl" type:"string" enum:"H265FramerateControl"` - - // When set to INTERPOLATE, produces smoother motion during frame rate conversion. - FramerateConversionAlgorithm *string `locationName:"framerateConversionAlgorithm" type:"string" enum:"H265FramerateConversionAlgorithm"` - - // Frame rate denominator. - FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` - - // Frame rate numerator - frame rate is a fraction, e.g. 24000 / 1001 = 23.976 - // fps. - FramerateNumerator *int64 `locationName:"framerateNumerator" min:"1" type:"integer"` - - // If enable, use reference B frames for GOP structures that have B frames > - // 1. - GopBReference *string `locationName:"gopBReference" type:"string" enum:"H265GopBReference"` - - // Frequency of closed GOPs. In streaming applications, it is recommended that - // this be set to 1 so a decoder joining mid-stream will receive an IDR frame - // as quickly as possible. Setting this value to 0 will break output segmenting. - GopClosedCadence *int64 `locationName:"gopClosedCadence" type:"integer"` - - // GOP Length (keyframe interval) in frames or seconds. Must be greater than - // zero. - GopSize *float64 `locationName:"gopSize" type:"double"` - - // Indicates if the GOP Size in H265 is specified in frames or seconds. If seconds - // the system will convert the GOP Size into a frame count at run time. - GopSizeUnits *string `locationName:"gopSizeUnits" type:"string" enum:"H265GopSizeUnits"` - - // Percentage of the buffer that should initially be filled (HRD buffer model). - HrdBufferInitialFillPercentage *int64 `locationName:"hrdBufferInitialFillPercentage" type:"integer"` - - // Size of buffer (HRD buffer model) in bits. For example, enter five megabits - // as 5000000. - HrdBufferSize *int64 `locationName:"hrdBufferSize" type:"integer"` - - // Use Interlace mode (InterlaceMode) to choose the scan line type for the output. - // * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce - // interlaced output with the entire output having the same field polarity (top - // or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default - // Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, - // behavior depends on the input scan type. - If the source is interlaced, the - // output will be interlaced with the same polarity as the source (it will follow - // the source). The output could therefore be a mix of "top field first" and - // "bottom field first". - If the source is progressive, the output will be - // interlaced with "top field first" or "bottom field first" polarity, depending - // on which of the Follow options you chose. - InterlaceMode *string `locationName:"interlaceMode" type:"string" enum:"H265InterlaceMode"` - - // Maximum bitrate in bits/second. For example, enter five megabits per second - // as 5000000. Required when Rate control mode is QVBR. - MaxBitrate *int64 `locationName:"maxBitrate" min:"1000" type:"integer"` - - // Enforces separation between repeated (cadence) I-frames and I-frames inserted - // by Scene Change Detection. If a scene change I-frame is within I-interval - // frames of a cadence I-frame, the GOP is shrunk and/or stretched to the scene - // change I-frame. GOP stretch requires enabling lookahead as well as setting - // I-interval. The normal cadence resumes for the next GOP. This setting is - // only used when Scene Change Detect is enabled. Note: Maximum GOP stretch - // = GOP size + Min-I-interval - 1 - MinIInterval *int64 `locationName:"minIInterval" type:"integer"` - - // Number of B-frames between reference frames. - NumberBFramesBetweenReferenceFrames *int64 `locationName:"numberBFramesBetweenReferenceFrames" type:"integer"` - - // Number of reference frames to use. The encoder may use more than requested - // if using B-frames and/or interlaced encoding. - NumberReferenceFrames *int64 `locationName:"numberReferenceFrames" min:"1" type:"integer"` - - // Using the API, enable ParFollowSource if you want the service to use the - // pixel aspect ratio from the input. Using the console, do this by choosing - // Follow source for Pixel aspect ratio. - ParControl *string `locationName:"parControl" type:"string" enum:"H265ParControl"` - - // Pixel Aspect Ratio denominator. - ParDenominator *int64 `locationName:"parDenominator" min:"1" type:"integer"` - - // Pixel Aspect Ratio numerator. - ParNumerator *int64 `locationName:"parNumerator" min:"1" type:"integer"` - - // Use Quality tuning level (H265QualityTuningLevel) to specifiy whether to - // use fast single-pass, high-quality singlepass, or high-quality multipass - // video encoding. - QualityTuningLevel *string `locationName:"qualityTuningLevel" type:"string" enum:"H265QualityTuningLevel"` - - // Settings for quality-defined variable bitrate encoding with the H.265 codec. - // Required when you set Rate control mode to QVBR. Not valid when you set Rate - // control mode to a value other than QVBR, or when you don't define Rate control - // mode. - QvbrSettings *H265QvbrSettings `locationName:"qvbrSettings" type:"structure"` - - // Use this setting to specify whether this output has a variable bitrate (VBR), - // constant bitrate (CBR) or quality-defined variable bitrate (QVBR). - RateControlMode *string `locationName:"rateControlMode" type:"string" enum:"H265RateControlMode"` - - // Specify Sample Adaptive Offset (SAO) filter strength. Adaptive mode dynamically - // selects best strength based on content - SampleAdaptiveOffsetFilterMode *string `locationName:"sampleAdaptiveOffsetFilterMode" type:"string" enum:"H265SampleAdaptiveOffsetFilterMode"` - - // Scene change detection (inserts I-frames on scene changes). - SceneChangeDetect *string `locationName:"sceneChangeDetect" type:"string" enum:"H265SceneChangeDetect"` - - // Number of slices per picture. Must be less than or equal to the number of - // macroblock rows for progressive pictures, and less than or equal to half - // the number of macroblock rows for interlaced pictures. - Slices *int64 `locationName:"slices" min:"1" type:"integer"` - - // Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled - // as 25fps, and audio is sped up correspondingly. - SlowPal *string `locationName:"slowPal" type:"string" enum:"H265SlowPal"` - - // Adjust quantization within each frame based on spatial variation of content - // complexity. - SpatialAdaptiveQuantization *string `locationName:"spatialAdaptiveQuantization" type:"string" enum:"H265SpatialAdaptiveQuantization"` - - // This field applies only if the Streams > Advanced > Framerate (framerate) - // field is set to 29.970. This field works with the Streams > Advanced > Preprocessors - // > Deinterlacer field (deinterlace_mode) and the Streams > Advanced > Interlaced - // Mode field (interlace_mode) to identify the scan type for the output: Progressive, - // Interlaced, Hard Telecine or Soft Telecine. - Hard: produces 29.97i output - // from 23.976 input. - Soft: produces 23.976; the player converts this output - // to 29.97i. - Telecine *string `locationName:"telecine" type:"string" enum:"H265Telecine"` - - // Adjust quantization within each frame based on temporal variation of content - // complexity. - TemporalAdaptiveQuantization *string `locationName:"temporalAdaptiveQuantization" type:"string" enum:"H265TemporalAdaptiveQuantization"` - - // Enables temporal layer identifiers in the encoded bitstream. Up to 3 layers - // are supported depending on GOP structure: I- and P-frames form one layer, - // reference B-frames can form a second layer and non-reference b-frames can - // form a third layer. Decoders can optionally decode only the lower temporal - // layers to generate a lower frame rate output. For example, given a bitstream - // with temporal IDs and with b-frames = 1 (i.e. IbPbPb display order), a decoder - // could decode all the frames for full frame rate output or only the I and - // P frames (lowest temporal layer) for a half frame rate output. - TemporalIds *string `locationName:"temporalIds" type:"string" enum:"H265TemporalIds"` - - // Enable use of tiles, allowing horizontal as well as vertical subdivision - // of the encoded pictures. - Tiles *string `locationName:"tiles" type:"string" enum:"H265Tiles"` - - // Inserts timecode for each frame as 4 bytes of an unregistered SEI message. - UnregisteredSeiTimecode *string `locationName:"unregisteredSeiTimecode" type:"string" enum:"H265UnregisteredSeiTimecode"` - - // If HVC1, output that is H.265 will be marked as HVC1 and adhere to the ISO-IECJTC1-SC29_N13798_Text_ISOIEC_FDIS_14496-15_3rd_E - // spec which states that parameter set NAL units will be stored in the sample - // headers but not in the samples directly. If HEV1, then H.265 will be marked - // as HEV1 and parameter set NAL units will be written into the samples. - WriteMp4PackagingType *string `locationName:"writeMp4PackagingType" type:"string" enum:"H265WriteMp4PackagingType"` -} - -// String returns the string representation -func (s H265Settings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s H265Settings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *H265Settings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "H265Settings"} - if s.Bitrate != nil && *s.Bitrate < 1000 { - invalidParams.Add(request.NewErrParamMinValue("Bitrate", 1000)) - } - if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { - invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) - } - if s.FramerateNumerator != nil && *s.FramerateNumerator < 1 { - invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 1)) - } - if s.MaxBitrate != nil && *s.MaxBitrate < 1000 { - invalidParams.Add(request.NewErrParamMinValue("MaxBitrate", 1000)) - } - if s.NumberReferenceFrames != nil && *s.NumberReferenceFrames < 1 { - invalidParams.Add(request.NewErrParamMinValue("NumberReferenceFrames", 1)) - } - if s.ParDenominator != nil && *s.ParDenominator < 1 { - invalidParams.Add(request.NewErrParamMinValue("ParDenominator", 1)) - } - if s.ParNumerator != nil && *s.ParNumerator < 1 { - invalidParams.Add(request.NewErrParamMinValue("ParNumerator", 1)) - } - if s.Slices != nil && *s.Slices < 1 { - invalidParams.Add(request.NewErrParamMinValue("Slices", 1)) - } - if s.QvbrSettings != nil { - if err := s.QvbrSettings.Validate(); err != nil { - invalidParams.AddNested("QvbrSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdaptiveQuantization sets the AdaptiveQuantization field's value. -func (s *H265Settings) SetAdaptiveQuantization(v string) *H265Settings { - s.AdaptiveQuantization = &v - return s -} - -// SetAlternateTransferFunctionSei sets the AlternateTransferFunctionSei field's value. -func (s *H265Settings) SetAlternateTransferFunctionSei(v string) *H265Settings { - s.AlternateTransferFunctionSei = &v - return s -} - -// SetBitrate sets the Bitrate field's value. -func (s *H265Settings) SetBitrate(v int64) *H265Settings { - s.Bitrate = &v - return s -} - -// SetCodecLevel sets the CodecLevel field's value. -func (s *H265Settings) SetCodecLevel(v string) *H265Settings { - s.CodecLevel = &v - return s -} - -// SetCodecProfile sets the CodecProfile field's value. -func (s *H265Settings) SetCodecProfile(v string) *H265Settings { - s.CodecProfile = &v - return s -} - -// SetDynamicSubGop sets the DynamicSubGop field's value. -func (s *H265Settings) SetDynamicSubGop(v string) *H265Settings { - s.DynamicSubGop = &v - return s -} - -// SetFlickerAdaptiveQuantization sets the FlickerAdaptiveQuantization field's value. -func (s *H265Settings) SetFlickerAdaptiveQuantization(v string) *H265Settings { - s.FlickerAdaptiveQuantization = &v - return s -} - -// SetFramerateControl sets the FramerateControl field's value. -func (s *H265Settings) SetFramerateControl(v string) *H265Settings { - s.FramerateControl = &v - return s -} - -// SetFramerateConversionAlgorithm sets the FramerateConversionAlgorithm field's value. -func (s *H265Settings) SetFramerateConversionAlgorithm(v string) *H265Settings { - s.FramerateConversionAlgorithm = &v - return s -} - -// SetFramerateDenominator sets the FramerateDenominator field's value. -func (s *H265Settings) SetFramerateDenominator(v int64) *H265Settings { - s.FramerateDenominator = &v - return s -} - -// SetFramerateNumerator sets the FramerateNumerator field's value. -func (s *H265Settings) SetFramerateNumerator(v int64) *H265Settings { - s.FramerateNumerator = &v - return s -} - -// SetGopBReference sets the GopBReference field's value. -func (s *H265Settings) SetGopBReference(v string) *H265Settings { - s.GopBReference = &v - return s -} - -// SetGopClosedCadence sets the GopClosedCadence field's value. -func (s *H265Settings) SetGopClosedCadence(v int64) *H265Settings { - s.GopClosedCadence = &v - return s -} - -// SetGopSize sets the GopSize field's value. -func (s *H265Settings) SetGopSize(v float64) *H265Settings { - s.GopSize = &v - return s -} - -// SetGopSizeUnits sets the GopSizeUnits field's value. -func (s *H265Settings) SetGopSizeUnits(v string) *H265Settings { - s.GopSizeUnits = &v - return s -} - -// SetHrdBufferInitialFillPercentage sets the HrdBufferInitialFillPercentage field's value. -func (s *H265Settings) SetHrdBufferInitialFillPercentage(v int64) *H265Settings { - s.HrdBufferInitialFillPercentage = &v - return s -} - -// SetHrdBufferSize sets the HrdBufferSize field's value. -func (s *H265Settings) SetHrdBufferSize(v int64) *H265Settings { - s.HrdBufferSize = &v - return s -} - -// SetInterlaceMode sets the InterlaceMode field's value. -func (s *H265Settings) SetInterlaceMode(v string) *H265Settings { - s.InterlaceMode = &v - return s -} - -// SetMaxBitrate sets the MaxBitrate field's value. -func (s *H265Settings) SetMaxBitrate(v int64) *H265Settings { - s.MaxBitrate = &v - return s -} - -// SetMinIInterval sets the MinIInterval field's value. -func (s *H265Settings) SetMinIInterval(v int64) *H265Settings { - s.MinIInterval = &v - return s -} - -// SetNumberBFramesBetweenReferenceFrames sets the NumberBFramesBetweenReferenceFrames field's value. -func (s *H265Settings) SetNumberBFramesBetweenReferenceFrames(v int64) *H265Settings { - s.NumberBFramesBetweenReferenceFrames = &v - return s -} - -// SetNumberReferenceFrames sets the NumberReferenceFrames field's value. -func (s *H265Settings) SetNumberReferenceFrames(v int64) *H265Settings { - s.NumberReferenceFrames = &v - return s -} - -// SetParControl sets the ParControl field's value. -func (s *H265Settings) SetParControl(v string) *H265Settings { - s.ParControl = &v - return s -} - -// SetParDenominator sets the ParDenominator field's value. -func (s *H265Settings) SetParDenominator(v int64) *H265Settings { - s.ParDenominator = &v - return s -} - -// SetParNumerator sets the ParNumerator field's value. -func (s *H265Settings) SetParNumerator(v int64) *H265Settings { - s.ParNumerator = &v - return s -} - -// SetQualityTuningLevel sets the QualityTuningLevel field's value. -func (s *H265Settings) SetQualityTuningLevel(v string) *H265Settings { - s.QualityTuningLevel = &v - return s -} - -// SetQvbrSettings sets the QvbrSettings field's value. -func (s *H265Settings) SetQvbrSettings(v *H265QvbrSettings) *H265Settings { - s.QvbrSettings = v - return s -} - -// SetRateControlMode sets the RateControlMode field's value. -func (s *H265Settings) SetRateControlMode(v string) *H265Settings { - s.RateControlMode = &v - return s -} - -// SetSampleAdaptiveOffsetFilterMode sets the SampleAdaptiveOffsetFilterMode field's value. -func (s *H265Settings) SetSampleAdaptiveOffsetFilterMode(v string) *H265Settings { - s.SampleAdaptiveOffsetFilterMode = &v - return s -} - -// SetSceneChangeDetect sets the SceneChangeDetect field's value. -func (s *H265Settings) SetSceneChangeDetect(v string) *H265Settings { - s.SceneChangeDetect = &v - return s -} - -// SetSlices sets the Slices field's value. -func (s *H265Settings) SetSlices(v int64) *H265Settings { - s.Slices = &v - return s -} - -// SetSlowPal sets the SlowPal field's value. -func (s *H265Settings) SetSlowPal(v string) *H265Settings { - s.SlowPal = &v - return s -} - -// SetSpatialAdaptiveQuantization sets the SpatialAdaptiveQuantization field's value. -func (s *H265Settings) SetSpatialAdaptiveQuantization(v string) *H265Settings { - s.SpatialAdaptiveQuantization = &v - return s -} - -// SetTelecine sets the Telecine field's value. -func (s *H265Settings) SetTelecine(v string) *H265Settings { - s.Telecine = &v - return s -} - -// SetTemporalAdaptiveQuantization sets the TemporalAdaptiveQuantization field's value. -func (s *H265Settings) SetTemporalAdaptiveQuantization(v string) *H265Settings { - s.TemporalAdaptiveQuantization = &v - return s -} - -// SetTemporalIds sets the TemporalIds field's value. -func (s *H265Settings) SetTemporalIds(v string) *H265Settings { - s.TemporalIds = &v - return s -} - -// SetTiles sets the Tiles field's value. -func (s *H265Settings) SetTiles(v string) *H265Settings { - s.Tiles = &v - return s -} - -// SetUnregisteredSeiTimecode sets the UnregisteredSeiTimecode field's value. -func (s *H265Settings) SetUnregisteredSeiTimecode(v string) *H265Settings { - s.UnregisteredSeiTimecode = &v - return s -} - -// SetWriteMp4PackagingType sets the WriteMp4PackagingType field's value. -func (s *H265Settings) SetWriteMp4PackagingType(v string) *H265Settings { - s.WriteMp4PackagingType = &v - return s -} - -// Use the "HDR master display information" (Hdr10Metadata) settings to correct -// HDR metadata or to provide missing metadata. These values vary depending -// on the input video and must be provided by a color grader. Range is 0 to -// 50,000; each increment represents 0.00002 in CIE1931 color coordinate. Note -// that these settings are not color correction. Note that if you are creating -// HDR outputs inside of an HLS CMAF package, to comply with the Apple specification, -// you must use the following settings. Set "MP4 packaging type" (writeMp4PackagingType) -// to HVC1 (HVC1). Set "Profile" (H265Settings > codecProfile) to Main10/High -// (MAIN10_HIGH). Set "Level" (H265Settings > codecLevel) to 5 (LEVEL_5). -type Hdr10Metadata struct { - _ struct{} `type:"structure"` - - // HDR Master Display Information must be provided by a color grader, using - // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 - // in CIE1931 color coordinate. Note that this setting is not for color correction. - BluePrimaryX *int64 `locationName:"bluePrimaryX" type:"integer"` - - // HDR Master Display Information must be provided by a color grader, using - // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 - // in CIE1931 color coordinate. Note that this setting is not for color correction. - BluePrimaryY *int64 `locationName:"bluePrimaryY" type:"integer"` - - // HDR Master Display Information must be provided by a color grader, using - // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 - // in CIE1931 color coordinate. Note that this setting is not for color correction. - GreenPrimaryX *int64 `locationName:"greenPrimaryX" type:"integer"` - - // HDR Master Display Information must be provided by a color grader, using - // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 - // in CIE1931 color coordinate. Note that this setting is not for color correction. - GreenPrimaryY *int64 `locationName:"greenPrimaryY" type:"integer"` - - // Maximum light level among all samples in the coded video sequence, in units - // of candelas per square meter. - MaxContentLightLevel *int64 `locationName:"maxContentLightLevel" type:"integer"` - - // Maximum average light level of any frame in the coded video sequence, in - // units of candelas per square meter. - MaxFrameAverageLightLevel *int64 `locationName:"maxFrameAverageLightLevel" type:"integer"` - - // Nominal maximum mastering display luminance in units of of 0.0001 candelas - // per square meter. - MaxLuminance *int64 `locationName:"maxLuminance" type:"integer"` - - // Nominal minimum mastering display luminance in units of of 0.0001 candelas - // per square meter - MinLuminance *int64 `locationName:"minLuminance" type:"integer"` - - // HDR Master Display Information must be provided by a color grader, using - // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 - // in CIE1931 color coordinate. Note that this setting is not for color correction. - RedPrimaryX *int64 `locationName:"redPrimaryX" type:"integer"` - - // HDR Master Display Information must be provided by a color grader, using - // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 - // in CIE1931 color coordinate. Note that this setting is not for color correction. - RedPrimaryY *int64 `locationName:"redPrimaryY" type:"integer"` - - // HDR Master Display Information must be provided by a color grader, using - // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 - // in CIE1931 color coordinate. Note that this setting is not for color correction. - WhitePointX *int64 `locationName:"whitePointX" type:"integer"` - - // HDR Master Display Information must be provided by a color grader, using - // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 - // in CIE1931 color coordinate. Note that this setting is not for color correction. - WhitePointY *int64 `locationName:"whitePointY" type:"integer"` -} - -// String returns the string representation -func (s Hdr10Metadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Hdr10Metadata) GoString() string { - return s.String() -} - -// SetBluePrimaryX sets the BluePrimaryX field's value. -func (s *Hdr10Metadata) SetBluePrimaryX(v int64) *Hdr10Metadata { - s.BluePrimaryX = &v - return s -} - -// SetBluePrimaryY sets the BluePrimaryY field's value. -func (s *Hdr10Metadata) SetBluePrimaryY(v int64) *Hdr10Metadata { - s.BluePrimaryY = &v - return s -} - -// SetGreenPrimaryX sets the GreenPrimaryX field's value. -func (s *Hdr10Metadata) SetGreenPrimaryX(v int64) *Hdr10Metadata { - s.GreenPrimaryX = &v - return s -} - -// SetGreenPrimaryY sets the GreenPrimaryY field's value. -func (s *Hdr10Metadata) SetGreenPrimaryY(v int64) *Hdr10Metadata { - s.GreenPrimaryY = &v - return s -} - -// SetMaxContentLightLevel sets the MaxContentLightLevel field's value. -func (s *Hdr10Metadata) SetMaxContentLightLevel(v int64) *Hdr10Metadata { - s.MaxContentLightLevel = &v - return s -} - -// SetMaxFrameAverageLightLevel sets the MaxFrameAverageLightLevel field's value. -func (s *Hdr10Metadata) SetMaxFrameAverageLightLevel(v int64) *Hdr10Metadata { - s.MaxFrameAverageLightLevel = &v - return s -} - -// SetMaxLuminance sets the MaxLuminance field's value. -func (s *Hdr10Metadata) SetMaxLuminance(v int64) *Hdr10Metadata { - s.MaxLuminance = &v - return s -} - -// SetMinLuminance sets the MinLuminance field's value. -func (s *Hdr10Metadata) SetMinLuminance(v int64) *Hdr10Metadata { - s.MinLuminance = &v - return s -} - -// SetRedPrimaryX sets the RedPrimaryX field's value. -func (s *Hdr10Metadata) SetRedPrimaryX(v int64) *Hdr10Metadata { - s.RedPrimaryX = &v - return s -} - -// SetRedPrimaryY sets the RedPrimaryY field's value. -func (s *Hdr10Metadata) SetRedPrimaryY(v int64) *Hdr10Metadata { - s.RedPrimaryY = &v - return s -} - -// SetWhitePointX sets the WhitePointX field's value. -func (s *Hdr10Metadata) SetWhitePointX(v int64) *Hdr10Metadata { - s.WhitePointX = &v - return s -} - -// SetWhitePointY sets the WhitePointY field's value. -func (s *Hdr10Metadata) SetWhitePointY(v int64) *Hdr10Metadata { - s.WhitePointY = &v - return s -} - -// Caption Language Mapping -type HlsCaptionLanguageMapping struct { - _ struct{} `type:"structure"` - - // Caption channel. - CaptionChannel *int64 `locationName:"captionChannel" type:"integer"` - - // Specify the language for this caption channel, using the ISO 639-2 or ISO - // 639-3 three-letter language code - CustomLanguageCode *string `locationName:"customLanguageCode" min:"3" type:"string"` - - // Specify the language, using the ISO 639-2 three-letter code listed at https://www.loc.gov/standards/iso639-2/php/code_list.php. - LanguageCode *string `locationName:"languageCode" type:"string" enum:"LanguageCode"` - - // Caption language description. - LanguageDescription *string `locationName:"languageDescription" type:"string"` -} - -// String returns the string representation -func (s HlsCaptionLanguageMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsCaptionLanguageMapping) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HlsCaptionLanguageMapping) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HlsCaptionLanguageMapping"} - if s.CaptionChannel != nil && *s.CaptionChannel < -2.147483648e+09 { - invalidParams.Add(request.NewErrParamMinValue("CaptionChannel", -2.147483648e+09)) - } - if s.CustomLanguageCode != nil && len(*s.CustomLanguageCode) < 3 { - invalidParams.Add(request.NewErrParamMinLen("CustomLanguageCode", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCaptionChannel sets the CaptionChannel field's value. -func (s *HlsCaptionLanguageMapping) SetCaptionChannel(v int64) *HlsCaptionLanguageMapping { - s.CaptionChannel = &v - return s -} - -// SetCustomLanguageCode sets the CustomLanguageCode field's value. -func (s *HlsCaptionLanguageMapping) SetCustomLanguageCode(v string) *HlsCaptionLanguageMapping { - s.CustomLanguageCode = &v - return s -} - -// SetLanguageCode sets the LanguageCode field's value. -func (s *HlsCaptionLanguageMapping) SetLanguageCode(v string) *HlsCaptionLanguageMapping { - s.LanguageCode = &v - return s -} - -// SetLanguageDescription sets the LanguageDescription field's value. -func (s *HlsCaptionLanguageMapping) SetLanguageDescription(v string) *HlsCaptionLanguageMapping { - s.LanguageDescription = &v - return s -} - -// Settings for HLS encryption -type HlsEncryptionSettings struct { - _ struct{} `type:"structure"` - - // This is a 128-bit, 16-byte hex value represented by a 32-character text string. - // If this parameter is not set then the Initialization Vector will follow the - // segment number by default. - ConstantInitializationVector *string `locationName:"constantInitializationVector" min:"32" type:"string"` - - // Encrypts the segments with the given encryption scheme. Leave blank to disable. - // Selecting 'Disabled' in the web interface also disables encryption. - EncryptionMethod *string `locationName:"encryptionMethod" type:"string" enum:"HlsEncryptionType"` - - // The Initialization Vector is a 128-bit number used in conjunction with the - // key for encrypting blocks. If set to INCLUDE, Initialization Vector is listed - // in the manifest. Otherwise Initialization Vector is not in the manifest. - InitializationVectorInManifest *string `locationName:"initializationVectorInManifest" type:"string" enum:"HlsInitializationVectorInManifest"` - - // Settings for use with a SPEKE key provider - SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure"` - - // Use these settings to set up encryption with a static key provider. - StaticKeyProvider *StaticKeyProvider `locationName:"staticKeyProvider" type:"structure"` - - // Indicates which type of key provider is used for encryption. - Type *string `locationName:"type" type:"string" enum:"HlsKeyProviderType"` -} - -// String returns the string representation -func (s HlsEncryptionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsEncryptionSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HlsEncryptionSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HlsEncryptionSettings"} - if s.ConstantInitializationVector != nil && len(*s.ConstantInitializationVector) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ConstantInitializationVector", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConstantInitializationVector sets the ConstantInitializationVector field's value. -func (s *HlsEncryptionSettings) SetConstantInitializationVector(v string) *HlsEncryptionSettings { - s.ConstantInitializationVector = &v - return s -} - -// SetEncryptionMethod sets the EncryptionMethod field's value. -func (s *HlsEncryptionSettings) SetEncryptionMethod(v string) *HlsEncryptionSettings { - s.EncryptionMethod = &v - return s -} - -// SetInitializationVectorInManifest sets the InitializationVectorInManifest field's value. -func (s *HlsEncryptionSettings) SetInitializationVectorInManifest(v string) *HlsEncryptionSettings { - s.InitializationVectorInManifest = &v - return s -} - -// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. -func (s *HlsEncryptionSettings) SetSpekeKeyProvider(v *SpekeKeyProvider) *HlsEncryptionSettings { - s.SpekeKeyProvider = v - return s -} - -// SetStaticKeyProvider sets the StaticKeyProvider field's value. -func (s *HlsEncryptionSettings) SetStaticKeyProvider(v *StaticKeyProvider) *HlsEncryptionSettings { - s.StaticKeyProvider = v - return s -} - -// SetType sets the Type field's value. -func (s *HlsEncryptionSettings) SetType(v string) *HlsEncryptionSettings { - s.Type = &v - return s -} - -// Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to -// HLS_GROUP_SETTINGS. -type HlsGroupSettings struct { - _ struct{} `type:"structure"` - - // Choose one or more ad marker types to pass SCTE35 signals through to this - // group of Apple HLS outputs. - AdMarkers []*string `locationName:"adMarkers" type:"list"` - - // A partial URI prefix that will be prepended to each output in the media .m3u8 - // file. Can be used if base manifest is delivered from a different URL than - // the main .m3u8 file. - BaseUrl *string `locationName:"baseUrl" type:"string"` - - // Language to be used on Caption outputs - CaptionLanguageMappings []*HlsCaptionLanguageMapping `locationName:"captionLanguageMappings" type:"list"` - - // Applies only to 608 Embedded output captions. Insert: Include CLOSED-CAPTIONS - // lines in the manifest. Specify at least one language in the CC1 Language - // Code field. One CLOSED-CAPTION line is added for each Language Code you specify. - // Make sure to specify the languages in the order in which they appear in the - // original source (if the source is embedded format) or the order of the caption - // selectors (if the source is other than embedded). Otherwise, languages in - // the manifest will not match up properly with the output captions. None: Include - // CLOSED-CAPTIONS=NONE line in the manifest. Omit: Omit any CLOSED-CAPTIONS - // line from the manifest. - CaptionLanguageSetting *string `locationName:"captionLanguageSetting" type:"string" enum:"HlsCaptionLanguageSetting"` - - // When set to ENABLED, sets #EXT-X-ALLOW-CACHE:no tag, which prevents client - // from saving media segments for later replay. - ClientCache *string `locationName:"clientCache" type:"string" enum:"HlsClientCache"` - - // Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist - // generation. - CodecSpecification *string `locationName:"codecSpecification" type:"string" enum:"HlsCodecSpecification"` - - // Use Destination (Destination) to specify the S3 output location and the output - // filename base. Destination accepts format identifiers. If you do not specify - // the base filename in the URI, the service will use the filename of the input - // file. If your job has multiple inputs, the service uses the filename of the - // first input file. - Destination *string `locationName:"destination" type:"string"` - - // Indicates whether segments should be placed in subdirectories. - DirectoryStructure *string `locationName:"directoryStructure" type:"string" enum:"HlsDirectoryStructure"` - - // DRM settings. - Encryption *HlsEncryptionSettings `locationName:"encryption" type:"structure"` - - // When set to GZIP, compresses HLS playlist. - ManifestCompression *string `locationName:"manifestCompression" type:"string" enum:"HlsManifestCompression"` - - // Indicates whether the output manifest should use floating point values for - // segment duration. - ManifestDurationFormat *string `locationName:"manifestDurationFormat" type:"string" enum:"HlsManifestDurationFormat"` - - // Keep this setting at the default value of 0, unless you are troubleshooting - // a problem with how devices play back the end of your video asset. If you - // know that player devices are hanging on the final segment of your video because - // the length of your final segment is too short, use this setting to specify - // a minimum final segment length, in seconds. Choose a value that is greater - // than or equal to 1 and less than your segment length. When you specify a - // value for this setting, the encoder will combine any final segment that is - // shorter than the length that you specify with the previous segment. For example, - // your segment length is 3 seconds and your final segment is .5 seconds without - // a minimum final segment length; when you set the minimum final segment length - // to 1, your final segment is 3.5 seconds. - MinFinalSegmentLength *float64 `locationName:"minFinalSegmentLength" type:"double"` - - // When set, Minimum Segment Size is enforced by looking ahead and back within - // the specified range for a nearby avail and extending the segment size if - // needed. - MinSegmentLength *int64 `locationName:"minSegmentLength" type:"integer"` - - // Indicates whether the .m3u8 manifest file should be generated for this HLS - // output group. - OutputSelection *string `locationName:"outputSelection" type:"string" enum:"HlsOutputSelection"` - - // Includes or excludes EXT-X-PROGRAM-DATE-TIME tag in .m3u8 manifest files. - // The value is calculated as follows: either the program date and time are - // initialized using the input timecode source, or the time is initialized using - // the input timecode source and the date is initialized using the timestamp_offset. - ProgramDateTime *string `locationName:"programDateTime" type:"string" enum:"HlsProgramDateTime"` - - // Period of insertion of EXT-X-PROGRAM-DATE-TIME entry, in seconds. - ProgramDateTimePeriod *int64 `locationName:"programDateTimePeriod" type:"integer"` - - // When set to SINGLE_FILE, emits program as a single media resource (.ts) file, - // uses #EXT-X-BYTERANGE tags to index segment for playback. - SegmentControl *string `locationName:"segmentControl" type:"string" enum:"HlsSegmentControl"` - - // Length of MPEG-2 Transport Stream segments to create (in seconds). Note that - // segments will end on the next keyframe after this number of seconds, so actual - // segment length may be longer. - SegmentLength *int64 `locationName:"segmentLength" min:"1" type:"integer"` - - // Number of segments to write to a subdirectory before starting a new one. - // directoryStructure must be SINGLE_DIRECTORY for this setting to have an effect. - SegmentsPerSubdirectory *int64 `locationName:"segmentsPerSubdirectory" min:"1" type:"integer"` - - // Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag - // of variant manifest. - StreamInfResolution *string `locationName:"streamInfResolution" type:"string" enum:"HlsStreamInfResolution"` - - // Indicates ID3 frame that has the timecode. - TimedMetadataId3Frame *string `locationName:"timedMetadataId3Frame" type:"string" enum:"HlsTimedMetadataId3Frame"` - - // Timed Metadata interval in seconds. - TimedMetadataId3Period *int64 `locationName:"timedMetadataId3Period" type:"integer"` - - // Provides an extra millisecond delta offset to fine tune the timestamps. - TimestampDeltaMilliseconds *int64 `locationName:"timestampDeltaMilliseconds" type:"integer"` -} - -// String returns the string representation -func (s HlsGroupSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsGroupSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HlsGroupSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HlsGroupSettings"} - if s.SegmentLength != nil && *s.SegmentLength < 1 { - invalidParams.Add(request.NewErrParamMinValue("SegmentLength", 1)) - } - if s.SegmentsPerSubdirectory != nil && *s.SegmentsPerSubdirectory < 1 { - invalidParams.Add(request.NewErrParamMinValue("SegmentsPerSubdirectory", 1)) - } - if s.TimedMetadataId3Period != nil && *s.TimedMetadataId3Period < -2.147483648e+09 { - invalidParams.Add(request.NewErrParamMinValue("TimedMetadataId3Period", -2.147483648e+09)) - } - if s.TimestampDeltaMilliseconds != nil && *s.TimestampDeltaMilliseconds < -2.147483648e+09 { - invalidParams.Add(request.NewErrParamMinValue("TimestampDeltaMilliseconds", -2.147483648e+09)) - } - if s.CaptionLanguageMappings != nil { - for i, v := range s.CaptionLanguageMappings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionLanguageMappings", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Encryption != nil { - if err := s.Encryption.Validate(); err != nil { - invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdMarkers sets the AdMarkers field's value. -func (s *HlsGroupSettings) SetAdMarkers(v []*string) *HlsGroupSettings { - s.AdMarkers = v - return s -} - -// SetBaseUrl sets the BaseUrl field's value. -func (s *HlsGroupSettings) SetBaseUrl(v string) *HlsGroupSettings { - s.BaseUrl = &v - return s -} - -// SetCaptionLanguageMappings sets the CaptionLanguageMappings field's value. -func (s *HlsGroupSettings) SetCaptionLanguageMappings(v []*HlsCaptionLanguageMapping) *HlsGroupSettings { - s.CaptionLanguageMappings = v - return s -} - -// SetCaptionLanguageSetting sets the CaptionLanguageSetting field's value. -func (s *HlsGroupSettings) SetCaptionLanguageSetting(v string) *HlsGroupSettings { - s.CaptionLanguageSetting = &v - return s -} - -// SetClientCache sets the ClientCache field's value. -func (s *HlsGroupSettings) SetClientCache(v string) *HlsGroupSettings { - s.ClientCache = &v - return s -} - -// SetCodecSpecification sets the CodecSpecification field's value. -func (s *HlsGroupSettings) SetCodecSpecification(v string) *HlsGroupSettings { - s.CodecSpecification = &v - return s -} - -// SetDestination sets the Destination field's value. -func (s *HlsGroupSettings) SetDestination(v string) *HlsGroupSettings { - s.Destination = &v - return s -} - -// SetDirectoryStructure sets the DirectoryStructure field's value. -func (s *HlsGroupSettings) SetDirectoryStructure(v string) *HlsGroupSettings { - s.DirectoryStructure = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *HlsGroupSettings) SetEncryption(v *HlsEncryptionSettings) *HlsGroupSettings { - s.Encryption = v - return s -} - -// SetManifestCompression sets the ManifestCompression field's value. -func (s *HlsGroupSettings) SetManifestCompression(v string) *HlsGroupSettings { - s.ManifestCompression = &v - return s -} - -// SetManifestDurationFormat sets the ManifestDurationFormat field's value. -func (s *HlsGroupSettings) SetManifestDurationFormat(v string) *HlsGroupSettings { - s.ManifestDurationFormat = &v - return s -} - -// SetMinFinalSegmentLength sets the MinFinalSegmentLength field's value. -func (s *HlsGroupSettings) SetMinFinalSegmentLength(v float64) *HlsGroupSettings { - s.MinFinalSegmentLength = &v - return s -} - -// SetMinSegmentLength sets the MinSegmentLength field's value. -func (s *HlsGroupSettings) SetMinSegmentLength(v int64) *HlsGroupSettings { - s.MinSegmentLength = &v - return s -} - -// SetOutputSelection sets the OutputSelection field's value. -func (s *HlsGroupSettings) SetOutputSelection(v string) *HlsGroupSettings { - s.OutputSelection = &v - return s -} - -// SetProgramDateTime sets the ProgramDateTime field's value. -func (s *HlsGroupSettings) SetProgramDateTime(v string) *HlsGroupSettings { - s.ProgramDateTime = &v - return s -} - -// SetProgramDateTimePeriod sets the ProgramDateTimePeriod field's value. -func (s *HlsGroupSettings) SetProgramDateTimePeriod(v int64) *HlsGroupSettings { - s.ProgramDateTimePeriod = &v - return s -} - -// SetSegmentControl sets the SegmentControl field's value. -func (s *HlsGroupSettings) SetSegmentControl(v string) *HlsGroupSettings { - s.SegmentControl = &v - return s -} - -// SetSegmentLength sets the SegmentLength field's value. -func (s *HlsGroupSettings) SetSegmentLength(v int64) *HlsGroupSettings { - s.SegmentLength = &v - return s -} - -// SetSegmentsPerSubdirectory sets the SegmentsPerSubdirectory field's value. -func (s *HlsGroupSettings) SetSegmentsPerSubdirectory(v int64) *HlsGroupSettings { - s.SegmentsPerSubdirectory = &v - return s -} - -// SetStreamInfResolution sets the StreamInfResolution field's value. -func (s *HlsGroupSettings) SetStreamInfResolution(v string) *HlsGroupSettings { - s.StreamInfResolution = &v - return s -} - -// SetTimedMetadataId3Frame sets the TimedMetadataId3Frame field's value. -func (s *HlsGroupSettings) SetTimedMetadataId3Frame(v string) *HlsGroupSettings { - s.TimedMetadataId3Frame = &v - return s -} - -// SetTimedMetadataId3Period sets the TimedMetadataId3Period field's value. -func (s *HlsGroupSettings) SetTimedMetadataId3Period(v int64) *HlsGroupSettings { - s.TimedMetadataId3Period = &v - return s -} - -// SetTimestampDeltaMilliseconds sets the TimestampDeltaMilliseconds field's value. -func (s *HlsGroupSettings) SetTimestampDeltaMilliseconds(v int64) *HlsGroupSettings { - s.TimestampDeltaMilliseconds = &v - return s -} - -// Settings for HLS output groups -type HlsSettings struct { - _ struct{} `type:"structure"` - - // Specifies the group to which the audio Rendition belongs. - AudioGroupId *string `locationName:"audioGroupId" type:"string"` - - // List all the audio groups that are used with the video output stream. Input - // all the audio GROUP-IDs that are associated to the video, separate by ','. - AudioRenditionSets *string `locationName:"audioRenditionSets" type:"string"` - - // Four types of audio-only tracks are supported: Audio-Only Variant Stream - // The client can play back this audio-only stream instead of video in low-bandwidth - // scenarios. Represented as an EXT-X-STREAM-INF in the HLS manifest. Alternate - // Audio, Auto Select, Default Alternate rendition that the client should try - // to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest - // with DEFAULT=YES, AUTOSELECT=YES Alternate Audio, Auto Select, Not Default - // Alternate rendition that the client may try to play back by default. Represented - // as an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=YES Alternate - // Audio, not Auto Select Alternate rendition that the client will not try to - // play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with - // DEFAULT=NO, AUTOSELECT=NO - AudioTrackType *string `locationName:"audioTrackType" type:"string" enum:"HlsAudioTrackType"` - - // When set to INCLUDE, writes I-Frame Only Manifest in addition to the HLS - // manifest - IFrameOnlyManifest *string `locationName:"iFrameOnlyManifest" type:"string" enum:"HlsIFrameOnlyManifest"` - - // String concatenated to end of segment filenames. Accepts "Format Identifiers":#format_identifier_parameters. - SegmentModifier *string `locationName:"segmentModifier" type:"string"` -} - -// String returns the string representation -func (s HlsSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsSettings) GoString() string { - return s.String() -} - -// SetAudioGroupId sets the AudioGroupId field's value. -func (s *HlsSettings) SetAudioGroupId(v string) *HlsSettings { - s.AudioGroupId = &v - return s -} - -// SetAudioRenditionSets sets the AudioRenditionSets field's value. -func (s *HlsSettings) SetAudioRenditionSets(v string) *HlsSettings { - s.AudioRenditionSets = &v - return s -} - -// SetAudioTrackType sets the AudioTrackType field's value. -func (s *HlsSettings) SetAudioTrackType(v string) *HlsSettings { - s.AudioTrackType = &v - return s -} - -// SetIFrameOnlyManifest sets the IFrameOnlyManifest field's value. -func (s *HlsSettings) SetIFrameOnlyManifest(v string) *HlsSettings { - s.IFrameOnlyManifest = &v - return s -} - -// SetSegmentModifier sets the SegmentModifier field's value. -func (s *HlsSettings) SetSegmentModifier(v string) *HlsSettings { - s.SegmentModifier = &v - return s -} - -// To insert ID3 tags in your output, specify two values. Use ID3 tag (Id3) -// to specify the base 64 encoded string and use Timecode (TimeCode) to specify -// the time when the tag should be inserted. To insert multiple ID3 tags in -// your output, create multiple instances of ID3 insertion (Id3Insertion). -type Id3Insertion struct { - _ struct{} `type:"structure"` - - // Use ID3 tag (Id3) to provide a tag value in base64-encode format. - Id3 *string `locationName:"id3" type:"string"` - - // Provide a Timecode (TimeCode) in HH:MM:SS:FF or HH:MM:SS;FF format. - Timecode *string `locationName:"timecode" type:"string"` -} - -// String returns the string representation -func (s Id3Insertion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Id3Insertion) GoString() string { - return s.String() -} - -// SetId3 sets the Id3 field's value. -func (s *Id3Insertion) SetId3(v string) *Id3Insertion { - s.Id3 = &v - return s -} - -// SetTimecode sets the Timecode field's value. -func (s *Id3Insertion) SetTimecode(v string) *Id3Insertion { - s.Timecode = &v - return s -} - -// Enable the image inserter feature to include a graphic overlay on your video. -// Enable or disable this feature for each input or output individually. This -// setting is disabled by default. -type ImageInserter struct { - _ struct{} `type:"structure"` - - // Specify the images that you want to overlay on your video. The images must - // be PNG or TGA files. - InsertableImages []*InsertableImage `locationName:"insertableImages" type:"list"` -} - -// String returns the string representation -func (s ImageInserter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImageInserter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImageInserter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImageInserter"} - if s.InsertableImages != nil { - for i, v := range s.InsertableImages { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InsertableImages", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInsertableImages sets the InsertableImages field's value. -func (s *ImageInserter) SetInsertableImages(v []*InsertableImage) *ImageInserter { - s.InsertableImages = v - return s -} - -// Specifies media input -type Input struct { - _ struct{} `type:"structure"` - - // Specifies set of audio selectors within an input to combine. An input may - // have multiple audio selector groups. See "Audio Selector Group":#inputs-audio_selector_group - // for more information. - AudioSelectorGroups map[string]*AudioSelectorGroup `locationName:"audioSelectorGroups" type:"map"` - - // Use Audio selectors (AudioSelectors) to specify a track or set of tracks - // from the input that you will use in your outputs. You can use mutiple Audio - // selectors per input. - AudioSelectors map[string]*AudioSelector `locationName:"audioSelectors" type:"map"` - - // Use Captions selectors (CaptionSelectors) to specify the captions data from - // the input that you will use in your outputs. You can use mutiple captions - // selectors per input. - CaptionSelectors map[string]*CaptionSelector `locationName:"captionSelectors" type:"map"` - - // Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. - // Default is disabled. Only manaully controllable for MPEG2 and uncompressed - // video inputs. - DeblockFilter *string `locationName:"deblockFilter" type:"string" enum:"InputDeblockFilter"` - - // Settings for decrypting any input files that are encrypted. - DecryptionSettings *InputDecryptionSettings `locationName:"decryptionSettings" type:"structure"` - - // Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default - // is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video - // inputs. - DenoiseFilter *string `locationName:"denoiseFilter" type:"string" enum:"InputDenoiseFilter"` - - // Specify the source file for your transcoding job. You can use multiple inputs - // in a single job. The service concatenates these inputs, in the order that - // you specify them in the job, to create the outputs. If your input format - // is IMF, specify your input by providing the path to your CPL. For example, - // "s3://bucket/vf/cpl.xml". If the CPL is in an incomplete IMP, make sure to - // use *Supplemental IMPs* (SupplementalImps) to specify any supplemental IMPs - // that contain assets referenced by the CPL. - FileInput *string `locationName:"fileInput" type:"string"` - - // Use Filter enable (InputFilterEnable) to specify how the transcoding service - // applies the denoise and deblock filters. You must also enable the filters - // separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). - // * Auto - The transcoding service determines whether to apply filtering, depending - // on input type and quality. * Disable - The input is not filtered. This is - // true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). - // * Force - The in put is filtered regardless of input type. - FilterEnable *string `locationName:"filterEnable" type:"string" enum:"InputFilterEnable"` - - // Use Filter strength (FilterStrength) to adjust the magnitude the input filter - // settings (Deblock and Denoise). The range is -5 to 5. Default is 0. - FilterStrength *int64 `locationName:"filterStrength" type:"integer"` - - // Enable the image inserter feature to include a graphic overlay on your video. - // Enable or disable this feature for each input individually. This setting - // is disabled by default. - ImageInserter *ImageInserter `locationName:"imageInserter" type:"structure"` - - // (InputClippings) contains sets of start and end times that together specify - // a portion of the input to be used in the outputs. If you provide only a start - // time, the clip will be the entire input from that point to the end. If you - // provide only an end time, it will be the entire input up to that point. When - // you specify more than one input clip, the transcoding service creates the - // job outputs by stringing the clips together in the order you specify them. - InputClippings []*InputClipping `locationName:"inputClippings" type:"list"` - - // Use Program (programNumber) to select a specific program from within a multi-program - // transport stream. Note that Quad 4K is not currently supported. Default is - // the first program within the transport stream. If the program you specify - // doesn't exist, the transcoding service will use this default. - ProgramNumber *int64 `locationName:"programNumber" min:"1" type:"integer"` - - // Set PSI control (InputPsiControl) for transport stream inputs to specify - // which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio - // and video. * Use PSI - Scan only PSI data. - PsiControl *string `locationName:"psiControl" type:"string" enum:"InputPsiControl"` - - // Provide a list of any necessary supplemental IMPs. You need supplemental - // IMPs if the CPL that you're using for your input is in an incomplete IMP. - // Specify either the supplemental IMP directories with a trailing slash or - // the ASSETMAP.xml files. For example ["s3://bucket/ov/", "s3://bucket/vf2/ASSETMAP.xml"]. - // You don't need to specify the IMP that contains your input CPL, because the - // service automatically detects it. - SupplementalImps []*string `locationName:"supplementalImps" type:"list"` - - // Timecode source under input settings (InputTimecodeSource) only affects the - // behavior of features that apply to a single input at a time, such as input - // clipping and synchronizing some captions formats. Use this setting to specify - // whether the service counts frames by timecodes embedded in the video (EMBEDDED) - // or by starting the first frame at zero (ZEROBASED). In both cases, the timecode - // format is HH:MM:SS:FF or HH:MM:SS;FF, where FF is the frame number. Only - // set this to EMBEDDED if your source video has embedded timecodes. - TimecodeSource *string `locationName:"timecodeSource" type:"string" enum:"InputTimecodeSource"` - - // Selector for video. - VideoSelector *VideoSelector `locationName:"videoSelector" type:"structure"` -} - -// String returns the string representation -func (s Input) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Input) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Input) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Input"} - if s.FilterStrength != nil && *s.FilterStrength < -5 { - invalidParams.Add(request.NewErrParamMinValue("FilterStrength", -5)) - } - if s.ProgramNumber != nil && *s.ProgramNumber < 1 { - invalidParams.Add(request.NewErrParamMinValue("ProgramNumber", 1)) - } - if s.AudioSelectors != nil { - for i, v := range s.AudioSelectors { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AudioSelectors", i), err.(request.ErrInvalidParams)) - } - } - } - if s.CaptionSelectors != nil { - for i, v := range s.CaptionSelectors { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionSelectors", i), err.(request.ErrInvalidParams)) - } - } - } - if s.DecryptionSettings != nil { - if err := s.DecryptionSettings.Validate(); err != nil { - invalidParams.AddNested("DecryptionSettings", err.(request.ErrInvalidParams)) - } - } - if s.ImageInserter != nil { - if err := s.ImageInserter.Validate(); err != nil { - invalidParams.AddNested("ImageInserter", err.(request.ErrInvalidParams)) - } - } - if s.VideoSelector != nil { - if err := s.VideoSelector.Validate(); err != nil { - invalidParams.AddNested("VideoSelector", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioSelectorGroups sets the AudioSelectorGroups field's value. -func (s *Input) SetAudioSelectorGroups(v map[string]*AudioSelectorGroup) *Input { - s.AudioSelectorGroups = v - return s -} - -// SetAudioSelectors sets the AudioSelectors field's value. -func (s *Input) SetAudioSelectors(v map[string]*AudioSelector) *Input { - s.AudioSelectors = v - return s -} - -// SetCaptionSelectors sets the CaptionSelectors field's value. -func (s *Input) SetCaptionSelectors(v map[string]*CaptionSelector) *Input { - s.CaptionSelectors = v - return s -} - -// SetDeblockFilter sets the DeblockFilter field's value. -func (s *Input) SetDeblockFilter(v string) *Input { - s.DeblockFilter = &v - return s -} - -// SetDecryptionSettings sets the DecryptionSettings field's value. -func (s *Input) SetDecryptionSettings(v *InputDecryptionSettings) *Input { - s.DecryptionSettings = v - return s -} - -// SetDenoiseFilter sets the DenoiseFilter field's value. -func (s *Input) SetDenoiseFilter(v string) *Input { - s.DenoiseFilter = &v - return s -} - -// SetFileInput sets the FileInput field's value. -func (s *Input) SetFileInput(v string) *Input { - s.FileInput = &v - return s -} - -// SetFilterEnable sets the FilterEnable field's value. -func (s *Input) SetFilterEnable(v string) *Input { - s.FilterEnable = &v - return s -} - -// SetFilterStrength sets the FilterStrength field's value. -func (s *Input) SetFilterStrength(v int64) *Input { - s.FilterStrength = &v - return s -} - -// SetImageInserter sets the ImageInserter field's value. -func (s *Input) SetImageInserter(v *ImageInserter) *Input { - s.ImageInserter = v - return s -} - -// SetInputClippings sets the InputClippings field's value. -func (s *Input) SetInputClippings(v []*InputClipping) *Input { - s.InputClippings = v - return s -} - -// SetProgramNumber sets the ProgramNumber field's value. -func (s *Input) SetProgramNumber(v int64) *Input { - s.ProgramNumber = &v - return s -} - -// SetPsiControl sets the PsiControl field's value. -func (s *Input) SetPsiControl(v string) *Input { - s.PsiControl = &v - return s -} - -// SetSupplementalImps sets the SupplementalImps field's value. -func (s *Input) SetSupplementalImps(v []*string) *Input { - s.SupplementalImps = v - return s -} - -// SetTimecodeSource sets the TimecodeSource field's value. -func (s *Input) SetTimecodeSource(v string) *Input { - s.TimecodeSource = &v - return s -} - -// SetVideoSelector sets the VideoSelector field's value. -func (s *Input) SetVideoSelector(v *VideoSelector) *Input { - s.VideoSelector = v - return s -} - -// To transcode only portions of your input (clips), include one Input clipping -// (one instance of InputClipping in the JSON job file) for each input clip. -// All input clips you specify will be included in every output of the job. -type InputClipping struct { - _ struct{} `type:"structure"` - - // Set End timecode (EndTimecode) to the end of the portion of the input you - // are clipping. The frame corresponding to the End timecode value is included - // in the clip. Start timecode or End timecode may be left blank, but not both. - // Use the format HH:MM:SS:FF or HH:MM:SS;FF, where HH is the hour, MM is the - // minute, SS is the second, and FF is the frame number. When choosing this - // value, take into account your setting for timecode source under input settings - // (InputTimecodeSource). For example, if you have embedded timecodes that start - // at 01:00:00:00 and you want your clip to end six minutes into the video, - // use 01:06:00:00. - EndTimecode *string `locationName:"endTimecode" type:"string"` - - // Set Start timecode (StartTimecode) to the beginning of the portion of the - // input you are clipping. The frame corresponding to the Start timecode value - // is included in the clip. Start timecode or End timecode may be left blank, - // but not both. Use the format HH:MM:SS:FF or HH:MM:SS;FF, where HH is the - // hour, MM is the minute, SS is the second, and FF is the frame number. When - // choosing this value, take into account your setting for Input timecode source. - // For example, if you have embedded timecodes that start at 01:00:00:00 and - // you want your clip to begin five minutes into the video, use 01:05:00:00. - StartTimecode *string `locationName:"startTimecode" type:"string"` -} - -// String returns the string representation -func (s InputClipping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputClipping) GoString() string { - return s.String() -} - -// SetEndTimecode sets the EndTimecode field's value. -func (s *InputClipping) SetEndTimecode(v string) *InputClipping { - s.EndTimecode = &v - return s -} - -// SetStartTimecode sets the StartTimecode field's value. -func (s *InputClipping) SetStartTimecode(v string) *InputClipping { - s.StartTimecode = &v - return s -} - -// Specify the decryption settings used to decrypt encrypted input -type InputDecryptionSettings struct { - _ struct{} `type:"structure"` - - // This specifies how the encrypted file needs to be decrypted. - DecryptionMode *string `locationName:"decryptionMode" type:"string" enum:"DecryptionMode"` - - // Decryption key either 128 or 192 or 256 bits encrypted with KMS - EncryptedDecryptionKey *string `locationName:"encryptedDecryptionKey" min:"24" type:"string"` - - // Initialization Vector 96 bits (CTR/GCM mode only) or 128 bits. - InitializationVector *string `locationName:"initializationVector" min:"16" type:"string"` - - // The AWS region in which decryption key was encrypted with KMS - KmsKeyRegion *string `locationName:"kmsKeyRegion" min:"9" type:"string"` -} - -// String returns the string representation -func (s InputDecryptionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputDecryptionSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputDecryptionSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputDecryptionSettings"} - if s.EncryptedDecryptionKey != nil && len(*s.EncryptedDecryptionKey) < 24 { - invalidParams.Add(request.NewErrParamMinLen("EncryptedDecryptionKey", 24)) - } - if s.InitializationVector != nil && len(*s.InitializationVector) < 16 { - invalidParams.Add(request.NewErrParamMinLen("InitializationVector", 16)) - } - if s.KmsKeyRegion != nil && len(*s.KmsKeyRegion) < 9 { - invalidParams.Add(request.NewErrParamMinLen("KmsKeyRegion", 9)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDecryptionMode sets the DecryptionMode field's value. -func (s *InputDecryptionSettings) SetDecryptionMode(v string) *InputDecryptionSettings { - s.DecryptionMode = &v - return s -} - -// SetEncryptedDecryptionKey sets the EncryptedDecryptionKey field's value. -func (s *InputDecryptionSettings) SetEncryptedDecryptionKey(v string) *InputDecryptionSettings { - s.EncryptedDecryptionKey = &v - return s -} - -// SetInitializationVector sets the InitializationVector field's value. -func (s *InputDecryptionSettings) SetInitializationVector(v string) *InputDecryptionSettings { - s.InitializationVector = &v - return s -} - -// SetKmsKeyRegion sets the KmsKeyRegion field's value. -func (s *InputDecryptionSettings) SetKmsKeyRegion(v string) *InputDecryptionSettings { - s.KmsKeyRegion = &v - return s -} - -// Specified video input in a template. -type InputTemplate struct { - _ struct{} `type:"structure"` - - // Specifies set of audio selectors within an input to combine. An input may - // have multiple audio selector groups. See "Audio Selector Group":#inputs-audio_selector_group - // for more information. - AudioSelectorGroups map[string]*AudioSelectorGroup `locationName:"audioSelectorGroups" type:"map"` - - // Use Audio selectors (AudioSelectors) to specify a track or set of tracks - // from the input that you will use in your outputs. You can use mutiple Audio - // selectors per input. - AudioSelectors map[string]*AudioSelector `locationName:"audioSelectors" type:"map"` - - // Use Captions selectors (CaptionSelectors) to specify the captions data from - // the input that you will use in your outputs. You can use mutiple captions - // selectors per input. - CaptionSelectors map[string]*CaptionSelector `locationName:"captionSelectors" type:"map"` - - // Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. - // Default is disabled. Only manaully controllable for MPEG2 and uncompressed - // video inputs. - DeblockFilter *string `locationName:"deblockFilter" type:"string" enum:"InputDeblockFilter"` - - // Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default - // is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video - // inputs. - DenoiseFilter *string `locationName:"denoiseFilter" type:"string" enum:"InputDenoiseFilter"` - - // Use Filter enable (InputFilterEnable) to specify how the transcoding service - // applies the denoise and deblock filters. You must also enable the filters - // separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). - // * Auto - The transcoding service determines whether to apply filtering, depending - // on input type and quality. * Disable - The input is not filtered. This is - // true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). - // * Force - The in put is filtered regardless of input type. - FilterEnable *string `locationName:"filterEnable" type:"string" enum:"InputFilterEnable"` - - // Use Filter strength (FilterStrength) to adjust the magnitude the input filter - // settings (Deblock and Denoise). The range is -5 to 5. Default is 0. - FilterStrength *int64 `locationName:"filterStrength" type:"integer"` - - // Enable the image inserter feature to include a graphic overlay on your video. - // Enable or disable this feature for each input individually. This setting - // is disabled by default. - ImageInserter *ImageInserter `locationName:"imageInserter" type:"structure"` - - // (InputClippings) contains sets of start and end times that together specify - // a portion of the input to be used in the outputs. If you provide only a start - // time, the clip will be the entire input from that point to the end. If you - // provide only an end time, it will be the entire input up to that point. When - // you specify more than one input clip, the transcoding service creates the - // job outputs by stringing the clips together in the order you specify them. - InputClippings []*InputClipping `locationName:"inputClippings" type:"list"` - - // Use Program (programNumber) to select a specific program from within a multi-program - // transport stream. Note that Quad 4K is not currently supported. Default is - // the first program within the transport stream. If the program you specify - // doesn't exist, the transcoding service will use this default. - ProgramNumber *int64 `locationName:"programNumber" min:"1" type:"integer"` - - // Set PSI control (InputPsiControl) for transport stream inputs to specify - // which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio - // and video. * Use PSI - Scan only PSI data. - PsiControl *string `locationName:"psiControl" type:"string" enum:"InputPsiControl"` - - // Timecode source under input settings (InputTimecodeSource) only affects the - // behavior of features that apply to a single input at a time, such as input - // clipping and synchronizing some captions formats. Use this setting to specify - // whether the service counts frames by timecodes embedded in the video (EMBEDDED) - // or by starting the first frame at zero (ZEROBASED). In both cases, the timecode - // format is HH:MM:SS:FF or HH:MM:SS;FF, where FF is the frame number. Only - // set this to EMBEDDED if your source video has embedded timecodes. - TimecodeSource *string `locationName:"timecodeSource" type:"string" enum:"InputTimecodeSource"` - - // Selector for video. - VideoSelector *VideoSelector `locationName:"videoSelector" type:"structure"` -} - -// String returns the string representation -func (s InputTemplate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputTemplate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputTemplate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputTemplate"} - if s.FilterStrength != nil && *s.FilterStrength < -5 { - invalidParams.Add(request.NewErrParamMinValue("FilterStrength", -5)) - } - if s.ProgramNumber != nil && *s.ProgramNumber < 1 { - invalidParams.Add(request.NewErrParamMinValue("ProgramNumber", 1)) - } - if s.AudioSelectors != nil { - for i, v := range s.AudioSelectors { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AudioSelectors", i), err.(request.ErrInvalidParams)) - } - } - } - if s.CaptionSelectors != nil { - for i, v := range s.CaptionSelectors { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionSelectors", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ImageInserter != nil { - if err := s.ImageInserter.Validate(); err != nil { - invalidParams.AddNested("ImageInserter", err.(request.ErrInvalidParams)) - } - } - if s.VideoSelector != nil { - if err := s.VideoSelector.Validate(); err != nil { - invalidParams.AddNested("VideoSelector", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioSelectorGroups sets the AudioSelectorGroups field's value. -func (s *InputTemplate) SetAudioSelectorGroups(v map[string]*AudioSelectorGroup) *InputTemplate { - s.AudioSelectorGroups = v - return s -} - -// SetAudioSelectors sets the AudioSelectors field's value. -func (s *InputTemplate) SetAudioSelectors(v map[string]*AudioSelector) *InputTemplate { - s.AudioSelectors = v - return s -} - -// SetCaptionSelectors sets the CaptionSelectors field's value. -func (s *InputTemplate) SetCaptionSelectors(v map[string]*CaptionSelector) *InputTemplate { - s.CaptionSelectors = v - return s -} - -// SetDeblockFilter sets the DeblockFilter field's value. -func (s *InputTemplate) SetDeblockFilter(v string) *InputTemplate { - s.DeblockFilter = &v - return s -} - -// SetDenoiseFilter sets the DenoiseFilter field's value. -func (s *InputTemplate) SetDenoiseFilter(v string) *InputTemplate { - s.DenoiseFilter = &v - return s -} - -// SetFilterEnable sets the FilterEnable field's value. -func (s *InputTemplate) SetFilterEnable(v string) *InputTemplate { - s.FilterEnable = &v - return s -} - -// SetFilterStrength sets the FilterStrength field's value. -func (s *InputTemplate) SetFilterStrength(v int64) *InputTemplate { - s.FilterStrength = &v - return s -} - -// SetImageInserter sets the ImageInserter field's value. -func (s *InputTemplate) SetImageInserter(v *ImageInserter) *InputTemplate { - s.ImageInserter = v - return s -} - -// SetInputClippings sets the InputClippings field's value. -func (s *InputTemplate) SetInputClippings(v []*InputClipping) *InputTemplate { - s.InputClippings = v - return s -} - -// SetProgramNumber sets the ProgramNumber field's value. -func (s *InputTemplate) SetProgramNumber(v int64) *InputTemplate { - s.ProgramNumber = &v - return s -} - -// SetPsiControl sets the PsiControl field's value. -func (s *InputTemplate) SetPsiControl(v string) *InputTemplate { - s.PsiControl = &v - return s -} - -// SetTimecodeSource sets the TimecodeSource field's value. -func (s *InputTemplate) SetTimecodeSource(v string) *InputTemplate { - s.TimecodeSource = &v - return s -} - -// SetVideoSelector sets the VideoSelector field's value. -func (s *InputTemplate) SetVideoSelector(v *VideoSelector) *InputTemplate { - s.VideoSelector = v - return s -} - -// Settings that specify how your still graphic overlay appears. -type InsertableImage struct { - _ struct{} `type:"structure"` - - // Specify the time, in milliseconds, for the image to remain on the output - // video. This duration includes fade-in time but not fade-out time. - Duration *int64 `locationName:"duration" type:"integer"` - - // Specify the length of time, in milliseconds, between the Start time that - // you specify for the image insertion and the time that the image appears at - // full opacity. Full opacity is the level that you specify for the opacity - // setting. If you don't specify a value for Fade-in, the image will appear - // abruptly at the overlay start time. - FadeIn *int64 `locationName:"fadeIn" type:"integer"` - - // Specify the length of time, in milliseconds, between the end of the time - // that you have specified for the image overlay Duration and when the overlaid - // image has faded to total transparency. If you don't specify a value for Fade-out, - // the image will disappear abruptly at the end of the inserted image duration. - FadeOut *int64 `locationName:"fadeOut" type:"integer"` - - // Specify the height of the inserted image in pixels. If you specify a value - // that's larger than the video resolution height, the service will crop your - // overlaid image to fit. To use the native height of the image, keep this setting - // blank. - Height *int64 `locationName:"height" type:"integer"` - - // Specify the Amazon S3 location of the image that you want to overlay on the - // video. Use a PNG or TGA file. - ImageInserterInput *string `locationName:"imageInserterInput" min:"14" type:"string"` - - // Specify the distance, in pixels, between the inserted image and the left - // edge of the video frame. Required for any image overlay that you specify. - ImageX *int64 `locationName:"imageX" type:"integer"` - - // Specify the distance, in pixels, between the overlaid image and the top edge - // of the video frame. Required for any image overlay that you specify. - ImageY *int64 `locationName:"imageY" type:"integer"` - - // Specify how overlapping inserted images appear. Images with higher values - // for Layer appear on top of images with lower values for Layer. - Layer *int64 `locationName:"layer" type:"integer"` - - // Use Opacity (Opacity) to specify how much of the underlying video shows through - // the inserted image. 0 is transparent and 100 is fully opaque. Default is - // 50. - Opacity *int64 `locationName:"opacity" type:"integer"` - - // Specify the timecode of the frame that you want the overlay to first appear - // on. This must be in timecode (HH:MM:SS:FF or HH:MM:SS;FF) format. Remember - // to take into account your timecode source settings. - StartTime *string `locationName:"startTime" type:"string"` - - // Specify the width of the inserted image in pixels. If you specify a value - // that's larger than the video resolution width, the service will crop your - // overlaid image to fit. To use the native width of the image, keep this setting - // blank. - Width *int64 `locationName:"width" type:"integer"` -} - -// String returns the string representation -func (s InsertableImage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InsertableImage) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InsertableImage) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InsertableImage"} - if s.ImageInserterInput != nil && len(*s.ImageInserterInput) < 14 { - invalidParams.Add(request.NewErrParamMinLen("ImageInserterInput", 14)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDuration sets the Duration field's value. -func (s *InsertableImage) SetDuration(v int64) *InsertableImage { - s.Duration = &v - return s -} - -// SetFadeIn sets the FadeIn field's value. -func (s *InsertableImage) SetFadeIn(v int64) *InsertableImage { - s.FadeIn = &v - return s -} - -// SetFadeOut sets the FadeOut field's value. -func (s *InsertableImage) SetFadeOut(v int64) *InsertableImage { - s.FadeOut = &v - return s -} - -// SetHeight sets the Height field's value. -func (s *InsertableImage) SetHeight(v int64) *InsertableImage { - s.Height = &v - return s -} - -// SetImageInserterInput sets the ImageInserterInput field's value. -func (s *InsertableImage) SetImageInserterInput(v string) *InsertableImage { - s.ImageInserterInput = &v - return s -} - -// SetImageX sets the ImageX field's value. -func (s *InsertableImage) SetImageX(v int64) *InsertableImage { - s.ImageX = &v - return s -} - -// SetImageY sets the ImageY field's value. -func (s *InsertableImage) SetImageY(v int64) *InsertableImage { - s.ImageY = &v - return s -} - -// SetLayer sets the Layer field's value. -func (s *InsertableImage) SetLayer(v int64) *InsertableImage { - s.Layer = &v - return s -} - -// SetOpacity sets the Opacity field's value. -func (s *InsertableImage) SetOpacity(v int64) *InsertableImage { - s.Opacity = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *InsertableImage) SetStartTime(v string) *InsertableImage { - s.StartTime = &v - return s -} - -// SetWidth sets the Width field's value. -func (s *InsertableImage) SetWidth(v int64) *InsertableImage { - s.Width = &v - return s -} - -// Each job converts an input file into an output file or files. For more information, -// see the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html -type Job struct { - _ struct{} `type:"structure"` - - // Acceleration settings for job execution. - AccelerationSettings *AccelerationSettings `locationName:"accelerationSettings" type:"structure"` - - // An identifier for this resource that is unique within all of AWS. - Arn *string `locationName:"arn" type:"string"` - - // Optional. Choose a tag type that AWS Billing and Cost Management will use - // to sort your AWS Elemental MediaConvert costs on any billing report that - // you set up. Any transcoding outputs that don't have an associated tag will - // appear in your billing report unsorted. If you don't choose a valid value - // for this field, your job outputs will appear on the billing report unsorted. - BillingTagsSource *string `locationName:"billingTagsSource" type:"string" enum:"BillingTagsSource"` - - // The time, in Unix epoch format in seconds, when the job got created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unixTimestamp"` - - // Error code for the job - ErrorCode *int64 `locationName:"errorCode" type:"integer"` - - // Error message of Job - ErrorMessage *string `locationName:"errorMessage" type:"string"` - - // A portion of the job's ARN, unique within your AWS Elemental MediaConvert - // resources - Id *string `locationName:"id" type:"string"` - - // The job template that the job is created from, if it is created from a job - // template. - JobTemplate *string `locationName:"jobTemplate" type:"string"` - - // List of output group details - OutputGroupDetails []*OutputGroupDetail `locationName:"outputGroupDetails" type:"list"` - - // Optional. When you create a job, you can specify a queue to send it to. If - // you don't specify, the job will go to the default queue. For more about queues, - // see the User Guide topic at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html - Queue *string `locationName:"queue" type:"string"` - - // The IAM role you use for creating this job. For details about permissions, - // see the User Guide topic at the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html - // - // Role is a required field - Role *string `locationName:"role" type:"string" required:"true"` - - // JobSettings contains all the transcode settings for a job. - // - // Settings is a required field - Settings *JobSettings `locationName:"settings" type:"structure" required:"true"` - - // A job's status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or ERROR. - Status *string `locationName:"status" type:"string" enum:"JobStatus"` - - // Information about when jobs are submitted, started, and finished is specified - // in Unix epoch format in seconds. - Timing *Timing `locationName:"timing" type:"structure"` - - // User-defined metadata that you want to associate with an MediaConvert job. - // You specify metadata in key/value pairs. - UserMetadata map[string]*string `locationName:"userMetadata" type:"map"` -} - -// String returns the string representation -func (s Job) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Job) GoString() string { - return s.String() -} - -// SetAccelerationSettings sets the AccelerationSettings field's value. -func (s *Job) SetAccelerationSettings(v *AccelerationSettings) *Job { - s.AccelerationSettings = v - return s -} - -// SetArn sets the Arn field's value. -func (s *Job) SetArn(v string) *Job { - s.Arn = &v - return s -} - -// SetBillingTagsSource sets the BillingTagsSource field's value. -func (s *Job) SetBillingTagsSource(v string) *Job { - s.BillingTagsSource = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Job) SetCreatedAt(v time.Time) *Job { - s.CreatedAt = &v - return s -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *Job) SetErrorCode(v int64) *Job { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *Job) SetErrorMessage(v string) *Job { - s.ErrorMessage = &v - return s -} - -// SetId sets the Id field's value. -func (s *Job) SetId(v string) *Job { - s.Id = &v - return s -} - -// SetJobTemplate sets the JobTemplate field's value. -func (s *Job) SetJobTemplate(v string) *Job { - s.JobTemplate = &v - return s -} - -// SetOutputGroupDetails sets the OutputGroupDetails field's value. -func (s *Job) SetOutputGroupDetails(v []*OutputGroupDetail) *Job { - s.OutputGroupDetails = v - return s -} - -// SetQueue sets the Queue field's value. -func (s *Job) SetQueue(v string) *Job { - s.Queue = &v - return s -} - -// SetRole sets the Role field's value. -func (s *Job) SetRole(v string) *Job { - s.Role = &v - return s -} - -// SetSettings sets the Settings field's value. -func (s *Job) SetSettings(v *JobSettings) *Job { - s.Settings = v - return s -} - -// SetStatus sets the Status field's value. -func (s *Job) SetStatus(v string) *Job { - s.Status = &v - return s -} - -// SetTiming sets the Timing field's value. -func (s *Job) SetTiming(v *Timing) *Job { - s.Timing = v - return s -} - -// SetUserMetadata sets the UserMetadata field's value. -func (s *Job) SetUserMetadata(v map[string]*string) *Job { - s.UserMetadata = v - return s -} - -// JobSettings contains all the transcode settings for a job. -type JobSettings struct { - _ struct{} `type:"structure"` - - // When specified, this offset (in milliseconds) is added to the input Ad Avail - // PTS time. - AdAvailOffset *int64 `locationName:"adAvailOffset" type:"integer"` - - // Settings for ad avail blanking. Video can be blanked or overlaid with an - // image, and audio muted during SCTE-35 triggered ad avails. - AvailBlanking *AvailBlanking `locationName:"availBlanking" type:"structure"` - - // Use Inputs (inputs) to define source file used in the transcode job. There - // can be multiple inputs add in a job. These inputs will be concantenated together - // to create the output. - Inputs []*Input `locationName:"inputs" type:"list"` - - // Overlay motion graphics on top of your video. The motion graphics that you - // specify here appear on all outputs in all output groups. - MotionImageInserter *MotionImageInserter `locationName:"motionImageInserter" type:"structure"` - - // Settings for Nielsen Configuration - NielsenConfiguration *NielsenConfiguration `locationName:"nielsenConfiguration" type:"structure"` - - // (OutputGroups) contains one group of settings for each set of outputs that - // share a common package type. All unpackaged files (MPEG-4, MPEG-2 TS, Quicktime, - // MXF, and no container) are grouped in a single output group as well. Required - // in (OutputGroups) is a group of settings that apply to the whole group. This - // required object depends on the value you set for (Type) under (OutputGroups)>(OutputGroupSettings). - // Type, settings object pairs are as follows. * FILE_GROUP_SETTINGS, FileGroupSettings - // * HLS_GROUP_SETTINGS, HlsGroupSettings * DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings - // * MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS, - // CmafGroupSettings - OutputGroups []*OutputGroup `locationName:"outputGroups" type:"list"` - - // Contains settings used to acquire and adjust timecode information from inputs. - TimecodeConfig *TimecodeConfig `locationName:"timecodeConfig" type:"structure"` - - // Enable Timed metadata insertion (TimedMetadataInsertion) to include ID3 tags - // in your job. To include timed metadata, you must enable it here, enable it - // in each output container, and specify tags and timecodes in ID3 insertion - // (Id3Insertion) objects. - TimedMetadataInsertion *TimedMetadataInsertion `locationName:"timedMetadataInsertion" type:"structure"` -} - -// String returns the string representation -func (s JobSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *JobSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "JobSettings"} - if s.AdAvailOffset != nil && *s.AdAvailOffset < -1000 { - invalidParams.Add(request.NewErrParamMinValue("AdAvailOffset", -1000)) - } - if s.AvailBlanking != nil { - if err := s.AvailBlanking.Validate(); err != nil { - invalidParams.AddNested("AvailBlanking", err.(request.ErrInvalidParams)) - } - } - if s.Inputs != nil { - for i, v := range s.Inputs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Inputs", i), err.(request.ErrInvalidParams)) - } - } - } - if s.MotionImageInserter != nil { - if err := s.MotionImageInserter.Validate(); err != nil { - invalidParams.AddNested("MotionImageInserter", err.(request.ErrInvalidParams)) - } - } - if s.OutputGroups != nil { - for i, v := range s.OutputGroups { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OutputGroups", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdAvailOffset sets the AdAvailOffset field's value. -func (s *JobSettings) SetAdAvailOffset(v int64) *JobSettings { - s.AdAvailOffset = &v - return s -} - -// SetAvailBlanking sets the AvailBlanking field's value. -func (s *JobSettings) SetAvailBlanking(v *AvailBlanking) *JobSettings { - s.AvailBlanking = v - return s -} - -// SetInputs sets the Inputs field's value. -func (s *JobSettings) SetInputs(v []*Input) *JobSettings { - s.Inputs = v - return s -} - -// SetMotionImageInserter sets the MotionImageInserter field's value. -func (s *JobSettings) SetMotionImageInserter(v *MotionImageInserter) *JobSettings { - s.MotionImageInserter = v - return s -} - -// SetNielsenConfiguration sets the NielsenConfiguration field's value. -func (s *JobSettings) SetNielsenConfiguration(v *NielsenConfiguration) *JobSettings { - s.NielsenConfiguration = v - return s -} - -// SetOutputGroups sets the OutputGroups field's value. -func (s *JobSettings) SetOutputGroups(v []*OutputGroup) *JobSettings { - s.OutputGroups = v - return s -} - -// SetTimecodeConfig sets the TimecodeConfig field's value. -func (s *JobSettings) SetTimecodeConfig(v *TimecodeConfig) *JobSettings { - s.TimecodeConfig = v - return s -} - -// SetTimedMetadataInsertion sets the TimedMetadataInsertion field's value. -func (s *JobSettings) SetTimedMetadataInsertion(v *TimedMetadataInsertion) *JobSettings { - s.TimedMetadataInsertion = v - return s -} - -// A job template is a pre-made set of encoding instructions that you can use -// to quickly create a job. -type JobTemplate struct { - _ struct{} `type:"structure"` - - // Acceleration settings for job execution. - AccelerationSettings *AccelerationSettings `locationName:"accelerationSettings" type:"structure"` - - // An identifier for this resource that is unique within all of AWS. - Arn *string `locationName:"arn" type:"string"` - - // An optional category you create to organize your job templates. - Category *string `locationName:"category" type:"string"` - - // The timestamp in epoch seconds for Job template creation. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unixTimestamp"` - - // An optional description you create for each job template. - Description *string `locationName:"description" type:"string"` - - // The timestamp in epoch seconds when the Job template was last updated. - LastUpdated *time.Time `locationName:"lastUpdated" type:"timestamp" timestampFormat:"unixTimestamp"` - - // A name you create for each job template. Each name must be unique within - // your account. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // Optional. The queue that jobs created from this template are assigned to. - // If you don't specify this, jobs will go to the default queue. - Queue *string `locationName:"queue" type:"string"` - - // JobTemplateSettings contains all the transcode settings saved in the template - // that will be applied to jobs created from it. - // - // Settings is a required field - Settings *JobTemplateSettings `locationName:"settings" type:"structure" required:"true"` - - // A job template can be of two types: system or custom. System or built-in - // job templates can't be modified or deleted by the user. - Type *string `locationName:"type" type:"string" enum:"Type"` -} - -// String returns the string representation -func (s JobTemplate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobTemplate) GoString() string { - return s.String() -} - -// SetAccelerationSettings sets the AccelerationSettings field's value. -func (s *JobTemplate) SetAccelerationSettings(v *AccelerationSettings) *JobTemplate { - s.AccelerationSettings = v - return s -} - -// SetArn sets the Arn field's value. -func (s *JobTemplate) SetArn(v string) *JobTemplate { - s.Arn = &v - return s -} - -// SetCategory sets the Category field's value. -func (s *JobTemplate) SetCategory(v string) *JobTemplate { - s.Category = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *JobTemplate) SetCreatedAt(v time.Time) *JobTemplate { - s.CreatedAt = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *JobTemplate) SetDescription(v string) *JobTemplate { - s.Description = &v - return s -} - -// SetLastUpdated sets the LastUpdated field's value. -func (s *JobTemplate) SetLastUpdated(v time.Time) *JobTemplate { - s.LastUpdated = &v - return s -} - -// SetName sets the Name field's value. -func (s *JobTemplate) SetName(v string) *JobTemplate { - s.Name = &v - return s -} - -// SetQueue sets the Queue field's value. -func (s *JobTemplate) SetQueue(v string) *JobTemplate { - s.Queue = &v - return s -} - -// SetSettings sets the Settings field's value. -func (s *JobTemplate) SetSettings(v *JobTemplateSettings) *JobTemplate { - s.Settings = v - return s -} - -// SetType sets the Type field's value. -func (s *JobTemplate) SetType(v string) *JobTemplate { - s.Type = &v - return s -} - -// JobTemplateSettings contains all the transcode settings saved in the template -// that will be applied to jobs created from it. -type JobTemplateSettings struct { - _ struct{} `type:"structure"` - - // When specified, this offset (in milliseconds) is added to the input Ad Avail - // PTS time. - AdAvailOffset *int64 `locationName:"adAvailOffset" type:"integer"` - - // Settings for ad avail blanking. Video can be blanked or overlaid with an - // image, and audio muted during SCTE-35 triggered ad avails. - AvailBlanking *AvailBlanking `locationName:"availBlanking" type:"structure"` - - // Use Inputs (inputs) to define the source file used in the transcode job. - // There can only be one input in a job template. Using the API, you can include - // multiple inputs when referencing a job template. - Inputs []*InputTemplate `locationName:"inputs" type:"list"` - - // Overlay motion graphics on top of your video. The motion graphics that you - // specify here appear on all outputs in all output groups. - MotionImageInserter *MotionImageInserter `locationName:"motionImageInserter" type:"structure"` - - // Settings for Nielsen Configuration - NielsenConfiguration *NielsenConfiguration `locationName:"nielsenConfiguration" type:"structure"` - - // (OutputGroups) contains one group of settings for each set of outputs that - // share a common package type. All unpackaged files (MPEG-4, MPEG-2 TS, Quicktime, - // MXF, and no container) are grouped in a single output group as well. Required - // in (OutputGroups) is a group of settings that apply to the whole group. This - // required object depends on the value you set for (Type) under (OutputGroups)>(OutputGroupSettings). - // Type, settings object pairs are as follows. * FILE_GROUP_SETTINGS, FileGroupSettings - // * HLS_GROUP_SETTINGS, HlsGroupSettings * DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings - // * MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS, - // CmafGroupSettings - OutputGroups []*OutputGroup `locationName:"outputGroups" type:"list"` - - // Contains settings used to acquire and adjust timecode information from inputs. - TimecodeConfig *TimecodeConfig `locationName:"timecodeConfig" type:"structure"` - - // Enable Timed metadata insertion (TimedMetadataInsertion) to include ID3 tags - // in your job. To include timed metadata, you must enable it here, enable it - // in each output container, and specify tags and timecodes in ID3 insertion - // (Id3Insertion) objects. - TimedMetadataInsertion *TimedMetadataInsertion `locationName:"timedMetadataInsertion" type:"structure"` -} - -// String returns the string representation -func (s JobTemplateSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JobTemplateSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *JobTemplateSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "JobTemplateSettings"} - if s.AdAvailOffset != nil && *s.AdAvailOffset < -1000 { - invalidParams.Add(request.NewErrParamMinValue("AdAvailOffset", -1000)) - } - if s.AvailBlanking != nil { - if err := s.AvailBlanking.Validate(); err != nil { - invalidParams.AddNested("AvailBlanking", err.(request.ErrInvalidParams)) - } - } - if s.Inputs != nil { - for i, v := range s.Inputs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Inputs", i), err.(request.ErrInvalidParams)) - } - } - } - if s.MotionImageInserter != nil { - if err := s.MotionImageInserter.Validate(); err != nil { - invalidParams.AddNested("MotionImageInserter", err.(request.ErrInvalidParams)) - } - } - if s.OutputGroups != nil { - for i, v := range s.OutputGroups { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OutputGroups", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdAvailOffset sets the AdAvailOffset field's value. -func (s *JobTemplateSettings) SetAdAvailOffset(v int64) *JobTemplateSettings { - s.AdAvailOffset = &v - return s -} - -// SetAvailBlanking sets the AvailBlanking field's value. -func (s *JobTemplateSettings) SetAvailBlanking(v *AvailBlanking) *JobTemplateSettings { - s.AvailBlanking = v - return s -} - -// SetInputs sets the Inputs field's value. -func (s *JobTemplateSettings) SetInputs(v []*InputTemplate) *JobTemplateSettings { - s.Inputs = v - return s -} - -// SetMotionImageInserter sets the MotionImageInserter field's value. -func (s *JobTemplateSettings) SetMotionImageInserter(v *MotionImageInserter) *JobTemplateSettings { - s.MotionImageInserter = v - return s -} - -// SetNielsenConfiguration sets the NielsenConfiguration field's value. -func (s *JobTemplateSettings) SetNielsenConfiguration(v *NielsenConfiguration) *JobTemplateSettings { - s.NielsenConfiguration = v - return s -} - -// SetOutputGroups sets the OutputGroups field's value. -func (s *JobTemplateSettings) SetOutputGroups(v []*OutputGroup) *JobTemplateSettings { - s.OutputGroups = v - return s -} - -// SetTimecodeConfig sets the TimecodeConfig field's value. -func (s *JobTemplateSettings) SetTimecodeConfig(v *TimecodeConfig) *JobTemplateSettings { - s.TimecodeConfig = v - return s -} - -// SetTimedMetadataInsertion sets the TimedMetadataInsertion field's value. -func (s *JobTemplateSettings) SetTimedMetadataInsertion(v *TimedMetadataInsertion) *JobTemplateSettings { - s.TimedMetadataInsertion = v - return s -} - -// You can send list job templates requests with an empty body. Optionally, -// you can filter the response by category by specifying it in your request -// body. You can also optionally specify the maximum number, up to twenty, of -// job templates to be returned. -type ListJobTemplatesInput struct { - _ struct{} `type:"structure"` - - // Optionally, specify a job template category to limit responses to only job - // templates from that category. - Category *string `location:"querystring" locationName:"category" type:"string"` - - // Optional. When you request a list of job templates, you can choose to list - // them alphabetically by NAME or chronologically by CREATION_DATE. If you don't - // specify, the service will list them by name. - ListBy *string `location:"querystring" locationName:"listBy" type:"string" enum:"JobTemplateListBy"` - - // Optional. Number of job templates, up to twenty, that will be returned at - // one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // Use this string, provided with the response to a previous request, to request - // the next batch of job templates. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // When you request lists of resources, you can optionally specify whether they - // are sorted in ASCENDING or DESCENDING order. Default varies by resource. - Order *string `location:"querystring" locationName:"order" type:"string" enum:"Order"` -} - -// String returns the string representation -func (s ListJobTemplatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobTemplatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListJobTemplatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListJobTemplatesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCategory sets the Category field's value. -func (s *ListJobTemplatesInput) SetCategory(v string) *ListJobTemplatesInput { - s.Category = &v - return s -} - -// SetListBy sets the ListBy field's value. -func (s *ListJobTemplatesInput) SetListBy(v string) *ListJobTemplatesInput { - s.ListBy = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListJobTemplatesInput) SetMaxResults(v int64) *ListJobTemplatesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListJobTemplatesInput) SetNextToken(v string) *ListJobTemplatesInput { - s.NextToken = &v - return s -} - -// SetOrder sets the Order field's value. -func (s *ListJobTemplatesInput) SetOrder(v string) *ListJobTemplatesInput { - s.Order = &v - return s -} - -// Successful list job templates requests return a JSON array of job templates. -// If you don't specify how they are ordered, you will receive them in alphabetical -// order by name. -type ListJobTemplatesOutput struct { - _ struct{} `type:"structure"` - - // List of Job templates. - JobTemplates []*JobTemplate `locationName:"jobTemplates" type:"list"` - - // Use this string to request the next batch of job templates. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListJobTemplatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobTemplatesOutput) GoString() string { - return s.String() -} - -// SetJobTemplates sets the JobTemplates field's value. -func (s *ListJobTemplatesOutput) SetJobTemplates(v []*JobTemplate) *ListJobTemplatesOutput { - s.JobTemplates = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListJobTemplatesOutput) SetNextToken(v string) *ListJobTemplatesOutput { - s.NextToken = &v - return s -} - -// You can send list jobs requests with an empty body. Optionally, you can filter -// the response by queue and/or job status by specifying them in your request -// body. You can also optionally specify the maximum number, up to twenty, of -// jobs to be returned. -type ListJobsInput struct { - _ struct{} `type:"structure"` - - // Optional. Number of jobs, up to twenty, that will be returned at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // Use this string, provided with the response to a previous request, to request - // the next batch of jobs. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // When you request lists of resources, you can optionally specify whether they - // are sorted in ASCENDING or DESCENDING order. Default varies by resource. - Order *string `location:"querystring" locationName:"order" type:"string" enum:"Order"` - - // Provide a queue name to get back only jobs from that queue. - Queue *string `location:"querystring" locationName:"queue" type:"string"` - - // A job's status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or ERROR. - Status *string `location:"querystring" locationName:"status" type:"string" enum:"JobStatus"` -} - -// String returns the string representation -func (s ListJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListJobsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListJobsInput) SetMaxResults(v int64) *ListJobsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListJobsInput) SetNextToken(v string) *ListJobsInput { - s.NextToken = &v - return s -} - -// SetOrder sets the Order field's value. -func (s *ListJobsInput) SetOrder(v string) *ListJobsInput { - s.Order = &v - return s -} - -// SetQueue sets the Queue field's value. -func (s *ListJobsInput) SetQueue(v string) *ListJobsInput { - s.Queue = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ListJobsInput) SetStatus(v string) *ListJobsInput { - s.Status = &v - return s -} - -// Successful list jobs requests return a JSON array of jobs. If you don't specify -// how they are ordered, you will receive the most recently created first. -type ListJobsOutput struct { - _ struct{} `type:"structure"` - - // List of jobs - Jobs []*Job `locationName:"jobs" type:"list"` - - // Use this string to request the next batch of jobs. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListJobsOutput) GoString() string { - return s.String() -} - -// SetJobs sets the Jobs field's value. -func (s *ListJobsOutput) SetJobs(v []*Job) *ListJobsOutput { - s.Jobs = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListJobsOutput) SetNextToken(v string) *ListJobsOutput { - s.NextToken = &v - return s -} - -// You can send list presets requests with an empty body. Optionally, you can -// filter the response by category by specifying it in your request body. You -// can also optionally specify the maximum number, up to twenty, of queues to -// be returned. -type ListPresetsInput struct { - _ struct{} `type:"structure"` - - // Optionally, specify a preset category to limit responses to only presets - // from that category. - Category *string `location:"querystring" locationName:"category" type:"string"` - - // Optional. When you request a list of presets, you can choose to list them - // alphabetically by NAME or chronologically by CREATION_DATE. If you don't - // specify, the service will list them by name. - ListBy *string `location:"querystring" locationName:"listBy" type:"string" enum:"PresetListBy"` - - // Optional. Number of presets, up to twenty, that will be returned at one time - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // Use this string, provided with the response to a previous request, to request - // the next batch of presets. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // When you request lists of resources, you can optionally specify whether they - // are sorted in ASCENDING or DESCENDING order. Default varies by resource. - Order *string `location:"querystring" locationName:"order" type:"string" enum:"Order"` -} - -// String returns the string representation -func (s ListPresetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPresetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPresetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPresetsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCategory sets the Category field's value. -func (s *ListPresetsInput) SetCategory(v string) *ListPresetsInput { - s.Category = &v - return s -} - -// SetListBy sets the ListBy field's value. -func (s *ListPresetsInput) SetListBy(v string) *ListPresetsInput { - s.ListBy = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListPresetsInput) SetMaxResults(v int64) *ListPresetsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPresetsInput) SetNextToken(v string) *ListPresetsInput { - s.NextToken = &v - return s -} - -// SetOrder sets the Order field's value. -func (s *ListPresetsInput) SetOrder(v string) *ListPresetsInput { - s.Order = &v - return s -} - -// Successful list presets requests return a JSON array of presets. If you don't -// specify how they are ordered, you will receive them alphabetically by name. -type ListPresetsOutput struct { - _ struct{} `type:"structure"` - - // Use this string to request the next batch of presets. - NextToken *string `locationName:"nextToken" type:"string"` - - // List of presets - Presets []*Preset `locationName:"presets" type:"list"` -} - -// String returns the string representation -func (s ListPresetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPresetsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPresetsOutput) SetNextToken(v string) *ListPresetsOutput { - s.NextToken = &v - return s -} - -// SetPresets sets the Presets field's value. -func (s *ListPresetsOutput) SetPresets(v []*Preset) *ListPresetsOutput { - s.Presets = v - return s -} - -// You can send list queues requests with an empty body. You can optionally -// specify the maximum number, up to twenty, of queues to be returned. -type ListQueuesInput struct { - _ struct{} `type:"structure"` - - // Optional. When you request a list of queues, you can choose to list them - // alphabetically by NAME or chronologically by CREATION_DATE. If you don't - // specify, the service will list them by creation date. - ListBy *string `location:"querystring" locationName:"listBy" type:"string" enum:"QueueListBy"` - - // Optional. Number of queues, up to twenty, that will be returned at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // Use this string, provided with the response to a previous request, to request - // the next batch of queues. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - // When you request lists of resources, you can optionally specify whether they - // are sorted in ASCENDING or DESCENDING order. Default varies by resource. - Order *string `location:"querystring" locationName:"order" type:"string" enum:"Order"` -} - -// String returns the string representation -func (s ListQueuesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListQueuesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListQueuesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListQueuesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetListBy sets the ListBy field's value. -func (s *ListQueuesInput) SetListBy(v string) *ListQueuesInput { - s.ListBy = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListQueuesInput) SetMaxResults(v int64) *ListQueuesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListQueuesInput) SetNextToken(v string) *ListQueuesInput { - s.NextToken = &v - return s -} - -// SetOrder sets the Order field's value. -func (s *ListQueuesInput) SetOrder(v string) *ListQueuesInput { - s.Order = &v - return s -} - -// Successful list queues requests return a JSON array of queues. If you don't -// specify how they are ordered, you will receive them alphabetically by name. -type ListQueuesOutput struct { - _ struct{} `type:"structure"` - - // Use this string to request the next batch of queues. - NextToken *string `locationName:"nextToken" type:"string"` - - // List of queues. - Queues []*Queue `locationName:"queues" type:"list"` -} - -// String returns the string representation -func (s ListQueuesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListQueuesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListQueuesOutput) SetNextToken(v string) *ListQueuesOutput { - s.NextToken = &v - return s -} - -// SetQueues sets the Queues field's value. -func (s *ListQueuesOutput) SetQueues(v []*Queue) *ListQueuesOutput { - s.Queues = v - return s -} - -// List the tags for your AWS Elemental MediaConvert resource by sending a request -// with the Amazon Resource Name (ARN) of the resource. To get the ARN, send -// a GET request with the resource name. -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource that you want to list tags - // for. To get the ARN, send a GET request with the resource name. - // - // Arn is a required field - Arn *string `location:"uri" locationName:"arn" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListTagsForResourceInput) SetArn(v string) *ListTagsForResourceInput { - s.Arn = &v - return s -} - -// A successful request to list the tags for a resource returns a JSON map of -// tags. -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) and tags for an AWS Elemental MediaConvert - // resource. - ResourceTags *ResourceTags `locationName:"resourceTags" type:"structure"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetResourceTags sets the ResourceTags field's value. -func (s *ListTagsForResourceOutput) SetResourceTags(v *ResourceTags) *ListTagsForResourceOutput { - s.ResourceTags = v - return s -} - -// Settings for M2TS Container. -type M2tsSettings struct { - _ struct{} `type:"structure"` - - // Selects between the DVB and ATSC buffer models for Dolby Digital audio. - AudioBufferModel *string `locationName:"audioBufferModel" type:"string" enum:"M2tsAudioBufferModel"` - - // The number of audio frames to insert for each PES packet. - AudioFramesPerPes *int64 `locationName:"audioFramesPerPes" type:"integer"` - - // Packet Identifier (PID) of the elementary audio stream(s) in the transport - // stream. Multiple values are accepted, and can be entered in ranges and/or - // by comma separation. - AudioPids []*int64 `locationName:"audioPids" type:"list"` - - // The output bitrate of the transport stream in bits per second. Setting to - // 0 lets the muxer automatically determine the appropriate bitrate. Other common - // values are 3750000, 7500000, and 15000000. - Bitrate *int64 `locationName:"bitrate" type:"integer"` - - // Controls what buffer model to use for accurate interleaving. If set to MULTIPLEX, - // use multiplex buffer model. If set to NONE, this can lead to lower latency, - // but low-memory devices may not be able to play back the stream without interruptions. - BufferModel *string `locationName:"bufferModel" type:"string" enum:"M2tsBufferModel"` - - // Inserts DVB Network Information Table (NIT) at the specified table repetition - // interval. - DvbNitSettings *DvbNitSettings `locationName:"dvbNitSettings" type:"structure"` - - // Inserts DVB Service Description Table (NIT) at the specified table repetition - // interval. - DvbSdtSettings *DvbSdtSettings `locationName:"dvbSdtSettings" type:"structure"` - - // Packet Identifier (PID) for input source DVB Subtitle data to this output. - // Multiple values are accepted, and can be entered in ranges and/or by comma - // separation. - DvbSubPids []*int64 `locationName:"dvbSubPids" type:"list"` - - // Inserts DVB Time and Date Table (TDT) at the specified table repetition interval. - DvbTdtSettings *DvbTdtSettings `locationName:"dvbTdtSettings" type:"structure"` - - // Packet Identifier (PID) for input source DVB Teletext data to this output. - DvbTeletextPid *int64 `locationName:"dvbTeletextPid" min:"32" type:"integer"` - - // When set to VIDEO_AND_FIXED_INTERVALS, audio EBP markers will be added to - // partitions 3 and 4. The interval between these additional markers will be - // fixed, and will be slightly shorter than the video EBP marker interval. When - // set to VIDEO_INTERVAL, these additional markers will not be inserted. Only - // applicable when EBP segmentation markers are is selected (segmentationMarkers - // is EBP or EBP_LEGACY). - EbpAudioInterval *string `locationName:"ebpAudioInterval" type:"string" enum:"M2tsEbpAudioInterval"` - - // Selects which PIDs to place EBP markers on. They can either be placed only - // on the video PID, or on both the video PID and all audio PIDs. Only applicable - // when EBP segmentation markers are is selected (segmentationMarkers is EBP - // or EBP_LEGACY). - EbpPlacement *string `locationName:"ebpPlacement" type:"string" enum:"M2tsEbpPlacement"` - - // Controls whether to include the ES Rate field in the PES header. - EsRateInPes *string `locationName:"esRateInPes" type:"string" enum:"M2tsEsRateInPes"` - - // Keep the default value (DEFAULT) unless you know that your audio EBP markers - // are incorrectly appearing before your video EBP markers. Set this value to - // Force (FORCE) to correct this problem. - ForceTsVideoEbpOrder *string `locationName:"forceTsVideoEbpOrder" type:"string" enum:"M2tsForceTsVideoEbpOrder"` - - // The length in seconds of each fragment. Only used with EBP markers. - FragmentTime *float64 `locationName:"fragmentTime" type:"double"` - - // Maximum time in milliseconds between Program Clock References (PCRs) inserted - // into the transport stream. - MaxPcrInterval *int64 `locationName:"maxPcrInterval" type:"integer"` - - // When set, enforces that Encoder Boundary Points do not come within the specified - // time interval of each other by looking ahead at input video. If another EBP - // is going to come in within the specified time interval, the current EBP is - // not emitted, and the segment is "stretched" to the next marker. The lookahead - // value does not add latency to the system. The Live Event must be configured - // elsewhere to create sufficient latency to make the lookahead accurate. - MinEbpInterval *int64 `locationName:"minEbpInterval" type:"integer"` - - // If INSERT, Nielsen inaudible tones for media tracking will be detected in - // the input audio and an equivalent ID3 tag will be inserted in the output. - NielsenId3 *string `locationName:"nielsenId3" type:"string" enum:"M2tsNielsenId3"` - - // Value in bits per second of extra null packets to insert into the transport - // stream. This can be used if a downstream encryption system requires periodic - // null packets. - NullPacketBitrate *float64 `locationName:"nullPacketBitrate" type:"double"` - - // The number of milliseconds between instances of this table in the output - // transport stream. - PatInterval *int64 `locationName:"patInterval" type:"integer"` - - // When set to PCR_EVERY_PES_PACKET, a Program Clock Reference value is inserted - // for every Packetized Elementary Stream (PES) header. This is effective only - // when the PCR PID is the same as the video or audio elementary stream. - PcrControl *string `locationName:"pcrControl" type:"string" enum:"M2tsPcrControl"` - - // Packet Identifier (PID) of the Program Clock Reference (PCR) in the transport - // stream. When no value is given, the encoder will assign the same value as - // the Video PID. - PcrPid *int64 `locationName:"pcrPid" min:"32" type:"integer"` - - // The number of milliseconds between instances of this table in the output - // transport stream. - PmtInterval *int64 `locationName:"pmtInterval" type:"integer"` - - // Packet Identifier (PID) for the Program Map Table (PMT) in the transport - // stream. - PmtPid *int64 `locationName:"pmtPid" min:"32" type:"integer"` - - // Packet Identifier (PID) of the private metadata stream in the transport stream. - PrivateMetadataPid *int64 `locationName:"privateMetadataPid" min:"32" type:"integer"` - - // The value of the program number field in the Program Map Table. - ProgramNumber *int64 `locationName:"programNumber" type:"integer"` - - // When set to CBR, inserts null packets into transport stream to fill specified - // bitrate. When set to VBR, the bitrate setting acts as the maximum bitrate, - // but the output will not be padded up to that bitrate. - RateMode *string `locationName:"rateMode" type:"string" enum:"M2tsRateMode"` - - // Packet Identifier (PID) of the SCTE-35 stream in the transport stream. - Scte35Pid *int64 `locationName:"scte35Pid" min:"32" type:"integer"` - - // Enables SCTE-35 passthrough (scte35Source) to pass any SCTE-35 signals from - // input to output. - Scte35Source *string `locationName:"scte35Source" type:"string" enum:"M2tsScte35Source"` - - // Inserts segmentation markers at each segmentation_time period. rai_segstart - // sets the Random Access Indicator bit in the adaptation field. rai_adapt sets - // the RAI bit and adds the current timecode in the private data bytes. psi_segstart - // inserts PAT and PMT tables at the start of segments. ebp adds Encoder Boundary - // Point information to the adaptation field as per OpenCable specification - // OC-SP-EBP-I01-130118. ebp_legacy adds Encoder Boundary Point information - // to the adaptation field using a legacy proprietary format. - SegmentationMarkers *string `locationName:"segmentationMarkers" type:"string" enum:"M2tsSegmentationMarkers"` - - // The segmentation style parameter controls how segmentation markers are inserted - // into the transport stream. With avails, it is possible that segments may - // be truncated, which can influence where future segmentation markers are inserted. - // When a segmentation style of "reset_cadence" is selected and a segment is - // truncated due to an avail, we will reset the segmentation cadence. This means - // the subsequent segment will have a duration of of $segmentation_time seconds. - // When a segmentation style of "maintain_cadence" is selected and a segment - // is truncated due to an avail, we will not reset the segmentation cadence. - // This means the subsequent segment will likely be truncated as well. However, - // all segments after that will have a duration of $segmentation_time seconds. - // Note that EBP lookahead is a slight exception to this rule. - SegmentationStyle *string `locationName:"segmentationStyle" type:"string" enum:"M2tsSegmentationStyle"` - - // The length in seconds of each segment. Required unless markers is set to - // _none_. - SegmentationTime *float64 `locationName:"segmentationTime" type:"double"` - - // Packet Identifier (PID) of the timed metadata stream in the transport stream. - TimedMetadataPid *int64 `locationName:"timedMetadataPid" min:"32" type:"integer"` - - // The value of the transport stream ID field in the Program Map Table. - TransportStreamId *int64 `locationName:"transportStreamId" type:"integer"` - - // Packet Identifier (PID) of the elementary video stream in the transport stream. - VideoPid *int64 `locationName:"videoPid" min:"32" type:"integer"` -} - -// String returns the string representation -func (s M2tsSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s M2tsSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *M2tsSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "M2tsSettings"} - if s.DvbTeletextPid != nil && *s.DvbTeletextPid < 32 { - invalidParams.Add(request.NewErrParamMinValue("DvbTeletextPid", 32)) - } - if s.PcrPid != nil && *s.PcrPid < 32 { - invalidParams.Add(request.NewErrParamMinValue("PcrPid", 32)) - } - if s.PmtPid != nil && *s.PmtPid < 32 { - invalidParams.Add(request.NewErrParamMinValue("PmtPid", 32)) - } - if s.PrivateMetadataPid != nil && *s.PrivateMetadataPid < 32 { - invalidParams.Add(request.NewErrParamMinValue("PrivateMetadataPid", 32)) - } - if s.Scte35Pid != nil && *s.Scte35Pid < 32 { - invalidParams.Add(request.NewErrParamMinValue("Scte35Pid", 32)) - } - if s.TimedMetadataPid != nil && *s.TimedMetadataPid < 32 { - invalidParams.Add(request.NewErrParamMinValue("TimedMetadataPid", 32)) - } - if s.VideoPid != nil && *s.VideoPid < 32 { - invalidParams.Add(request.NewErrParamMinValue("VideoPid", 32)) - } - if s.DvbNitSettings != nil { - if err := s.DvbNitSettings.Validate(); err != nil { - invalidParams.AddNested("DvbNitSettings", err.(request.ErrInvalidParams)) - } - } - if s.DvbSdtSettings != nil { - if err := s.DvbSdtSettings.Validate(); err != nil { - invalidParams.AddNested("DvbSdtSettings", err.(request.ErrInvalidParams)) - } - } - if s.DvbTdtSettings != nil { - if err := s.DvbTdtSettings.Validate(); err != nil { - invalidParams.AddNested("DvbTdtSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioBufferModel sets the AudioBufferModel field's value. -func (s *M2tsSettings) SetAudioBufferModel(v string) *M2tsSettings { - s.AudioBufferModel = &v - return s -} - -// SetAudioFramesPerPes sets the AudioFramesPerPes field's value. -func (s *M2tsSettings) SetAudioFramesPerPes(v int64) *M2tsSettings { - s.AudioFramesPerPes = &v - return s -} - -// SetAudioPids sets the AudioPids field's value. -func (s *M2tsSettings) SetAudioPids(v []*int64) *M2tsSettings { - s.AudioPids = v - return s -} - -// SetBitrate sets the Bitrate field's value. -func (s *M2tsSettings) SetBitrate(v int64) *M2tsSettings { - s.Bitrate = &v - return s -} - -// SetBufferModel sets the BufferModel field's value. -func (s *M2tsSettings) SetBufferModel(v string) *M2tsSettings { - s.BufferModel = &v - return s -} - -// SetDvbNitSettings sets the DvbNitSettings field's value. -func (s *M2tsSettings) SetDvbNitSettings(v *DvbNitSettings) *M2tsSettings { - s.DvbNitSettings = v - return s -} - -// SetDvbSdtSettings sets the DvbSdtSettings field's value. -func (s *M2tsSettings) SetDvbSdtSettings(v *DvbSdtSettings) *M2tsSettings { - s.DvbSdtSettings = v - return s -} - -// SetDvbSubPids sets the DvbSubPids field's value. -func (s *M2tsSettings) SetDvbSubPids(v []*int64) *M2tsSettings { - s.DvbSubPids = v - return s -} - -// SetDvbTdtSettings sets the DvbTdtSettings field's value. -func (s *M2tsSettings) SetDvbTdtSettings(v *DvbTdtSettings) *M2tsSettings { - s.DvbTdtSettings = v - return s -} - -// SetDvbTeletextPid sets the DvbTeletextPid field's value. -func (s *M2tsSettings) SetDvbTeletextPid(v int64) *M2tsSettings { - s.DvbTeletextPid = &v - return s -} - -// SetEbpAudioInterval sets the EbpAudioInterval field's value. -func (s *M2tsSettings) SetEbpAudioInterval(v string) *M2tsSettings { - s.EbpAudioInterval = &v - return s -} - -// SetEbpPlacement sets the EbpPlacement field's value. -func (s *M2tsSettings) SetEbpPlacement(v string) *M2tsSettings { - s.EbpPlacement = &v - return s -} - -// SetEsRateInPes sets the EsRateInPes field's value. -func (s *M2tsSettings) SetEsRateInPes(v string) *M2tsSettings { - s.EsRateInPes = &v - return s -} - -// SetForceTsVideoEbpOrder sets the ForceTsVideoEbpOrder field's value. -func (s *M2tsSettings) SetForceTsVideoEbpOrder(v string) *M2tsSettings { - s.ForceTsVideoEbpOrder = &v - return s -} - -// SetFragmentTime sets the FragmentTime field's value. -func (s *M2tsSettings) SetFragmentTime(v float64) *M2tsSettings { - s.FragmentTime = &v - return s -} - -// SetMaxPcrInterval sets the MaxPcrInterval field's value. -func (s *M2tsSettings) SetMaxPcrInterval(v int64) *M2tsSettings { - s.MaxPcrInterval = &v - return s -} - -// SetMinEbpInterval sets the MinEbpInterval field's value. -func (s *M2tsSettings) SetMinEbpInterval(v int64) *M2tsSettings { - s.MinEbpInterval = &v - return s -} - -// SetNielsenId3 sets the NielsenId3 field's value. -func (s *M2tsSettings) SetNielsenId3(v string) *M2tsSettings { - s.NielsenId3 = &v - return s -} - -// SetNullPacketBitrate sets the NullPacketBitrate field's value. -func (s *M2tsSettings) SetNullPacketBitrate(v float64) *M2tsSettings { - s.NullPacketBitrate = &v - return s -} - -// SetPatInterval sets the PatInterval field's value. -func (s *M2tsSettings) SetPatInterval(v int64) *M2tsSettings { - s.PatInterval = &v - return s -} - -// SetPcrControl sets the PcrControl field's value. -func (s *M2tsSettings) SetPcrControl(v string) *M2tsSettings { - s.PcrControl = &v - return s -} - -// SetPcrPid sets the PcrPid field's value. -func (s *M2tsSettings) SetPcrPid(v int64) *M2tsSettings { - s.PcrPid = &v - return s -} - -// SetPmtInterval sets the PmtInterval field's value. -func (s *M2tsSettings) SetPmtInterval(v int64) *M2tsSettings { - s.PmtInterval = &v - return s -} - -// SetPmtPid sets the PmtPid field's value. -func (s *M2tsSettings) SetPmtPid(v int64) *M2tsSettings { - s.PmtPid = &v - return s -} - -// SetPrivateMetadataPid sets the PrivateMetadataPid field's value. -func (s *M2tsSettings) SetPrivateMetadataPid(v int64) *M2tsSettings { - s.PrivateMetadataPid = &v - return s -} - -// SetProgramNumber sets the ProgramNumber field's value. -func (s *M2tsSettings) SetProgramNumber(v int64) *M2tsSettings { - s.ProgramNumber = &v - return s -} - -// SetRateMode sets the RateMode field's value. -func (s *M2tsSettings) SetRateMode(v string) *M2tsSettings { - s.RateMode = &v - return s -} - -// SetScte35Pid sets the Scte35Pid field's value. -func (s *M2tsSettings) SetScte35Pid(v int64) *M2tsSettings { - s.Scte35Pid = &v - return s -} - -// SetScte35Source sets the Scte35Source field's value. -func (s *M2tsSettings) SetScte35Source(v string) *M2tsSettings { - s.Scte35Source = &v - return s -} - -// SetSegmentationMarkers sets the SegmentationMarkers field's value. -func (s *M2tsSettings) SetSegmentationMarkers(v string) *M2tsSettings { - s.SegmentationMarkers = &v - return s -} - -// SetSegmentationStyle sets the SegmentationStyle field's value. -func (s *M2tsSettings) SetSegmentationStyle(v string) *M2tsSettings { - s.SegmentationStyle = &v - return s -} - -// SetSegmentationTime sets the SegmentationTime field's value. -func (s *M2tsSettings) SetSegmentationTime(v float64) *M2tsSettings { - s.SegmentationTime = &v - return s -} - -// SetTimedMetadataPid sets the TimedMetadataPid field's value. -func (s *M2tsSettings) SetTimedMetadataPid(v int64) *M2tsSettings { - s.TimedMetadataPid = &v - return s -} - -// SetTransportStreamId sets the TransportStreamId field's value. -func (s *M2tsSettings) SetTransportStreamId(v int64) *M2tsSettings { - s.TransportStreamId = &v - return s -} - -// SetVideoPid sets the VideoPid field's value. -func (s *M2tsSettings) SetVideoPid(v int64) *M2tsSettings { - s.VideoPid = &v - return s -} - -// Settings for TS segments in HLS -type M3u8Settings struct { - _ struct{} `type:"structure"` - - // The number of audio frames to insert for each PES packet. - AudioFramesPerPes *int64 `locationName:"audioFramesPerPes" type:"integer"` - - // Packet Identifier (PID) of the elementary audio stream(s) in the transport - // stream. Multiple values are accepted, and can be entered in ranges and/or - // by comma separation. - AudioPids []*int64 `locationName:"audioPids" type:"list"` - - // If INSERT, Nielsen inaudible tones for media tracking will be detected in - // the input audio and an equivalent ID3 tag will be inserted in the output. - NielsenId3 *string `locationName:"nielsenId3" type:"string" enum:"M3u8NielsenId3"` - - // The number of milliseconds between instances of this table in the output - // transport stream. - PatInterval *int64 `locationName:"patInterval" type:"integer"` - - // When set to PCR_EVERY_PES_PACKET a Program Clock Reference value is inserted - // for every Packetized Elementary Stream (PES) header. This parameter is effective - // only when the PCR PID is the same as the video or audio elementary stream. - PcrControl *string `locationName:"pcrControl" type:"string" enum:"M3u8PcrControl"` - - // Packet Identifier (PID) of the Program Clock Reference (PCR) in the transport - // stream. When no value is given, the encoder will assign the same value as - // the Video PID. - PcrPid *int64 `locationName:"pcrPid" min:"32" type:"integer"` - - // The number of milliseconds between instances of this table in the output - // transport stream. - PmtInterval *int64 `locationName:"pmtInterval" type:"integer"` - - // Packet Identifier (PID) for the Program Map Table (PMT) in the transport - // stream. - PmtPid *int64 `locationName:"pmtPid" min:"32" type:"integer"` - - // Packet Identifier (PID) of the private metadata stream in the transport stream. - PrivateMetadataPid *int64 `locationName:"privateMetadataPid" min:"32" type:"integer"` - - // The value of the program number field in the Program Map Table. - ProgramNumber *int64 `locationName:"programNumber" type:"integer"` - - // Packet Identifier (PID) of the SCTE-35 stream in the transport stream. - Scte35Pid *int64 `locationName:"scte35Pid" min:"32" type:"integer"` - - // Enables SCTE-35 passthrough (scte35Source) to pass any SCTE-35 signals from - // input to output. - Scte35Source *string `locationName:"scte35Source" type:"string" enum:"M3u8Scte35Source"` - - // Applies only to HLS outputs. Use this setting to specify whether the service - // inserts the ID3 timed metadata from the input in this output. - TimedMetadata *string `locationName:"timedMetadata" type:"string" enum:"TimedMetadata"` - - // Packet Identifier (PID) of the timed metadata stream in the transport stream. - TimedMetadataPid *int64 `locationName:"timedMetadataPid" min:"32" type:"integer"` - - // The value of the transport stream ID field in the Program Map Table. - TransportStreamId *int64 `locationName:"transportStreamId" type:"integer"` - - // Packet Identifier (PID) of the elementary video stream in the transport stream. - VideoPid *int64 `locationName:"videoPid" min:"32" type:"integer"` -} - -// String returns the string representation -func (s M3u8Settings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s M3u8Settings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *M3u8Settings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "M3u8Settings"} - if s.PcrPid != nil && *s.PcrPid < 32 { - invalidParams.Add(request.NewErrParamMinValue("PcrPid", 32)) - } - if s.PmtPid != nil && *s.PmtPid < 32 { - invalidParams.Add(request.NewErrParamMinValue("PmtPid", 32)) - } - if s.PrivateMetadataPid != nil && *s.PrivateMetadataPid < 32 { - invalidParams.Add(request.NewErrParamMinValue("PrivateMetadataPid", 32)) - } - if s.Scte35Pid != nil && *s.Scte35Pid < 32 { - invalidParams.Add(request.NewErrParamMinValue("Scte35Pid", 32)) - } - if s.TimedMetadataPid != nil && *s.TimedMetadataPid < 32 { - invalidParams.Add(request.NewErrParamMinValue("TimedMetadataPid", 32)) - } - if s.VideoPid != nil && *s.VideoPid < 32 { - invalidParams.Add(request.NewErrParamMinValue("VideoPid", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioFramesPerPes sets the AudioFramesPerPes field's value. -func (s *M3u8Settings) SetAudioFramesPerPes(v int64) *M3u8Settings { - s.AudioFramesPerPes = &v - return s -} - -// SetAudioPids sets the AudioPids field's value. -func (s *M3u8Settings) SetAudioPids(v []*int64) *M3u8Settings { - s.AudioPids = v - return s -} - -// SetNielsenId3 sets the NielsenId3 field's value. -func (s *M3u8Settings) SetNielsenId3(v string) *M3u8Settings { - s.NielsenId3 = &v - return s -} - -// SetPatInterval sets the PatInterval field's value. -func (s *M3u8Settings) SetPatInterval(v int64) *M3u8Settings { - s.PatInterval = &v - return s -} - -// SetPcrControl sets the PcrControl field's value. -func (s *M3u8Settings) SetPcrControl(v string) *M3u8Settings { - s.PcrControl = &v - return s -} - -// SetPcrPid sets the PcrPid field's value. -func (s *M3u8Settings) SetPcrPid(v int64) *M3u8Settings { - s.PcrPid = &v - return s -} - -// SetPmtInterval sets the PmtInterval field's value. -func (s *M3u8Settings) SetPmtInterval(v int64) *M3u8Settings { - s.PmtInterval = &v - return s -} - -// SetPmtPid sets the PmtPid field's value. -func (s *M3u8Settings) SetPmtPid(v int64) *M3u8Settings { - s.PmtPid = &v - return s -} - -// SetPrivateMetadataPid sets the PrivateMetadataPid field's value. -func (s *M3u8Settings) SetPrivateMetadataPid(v int64) *M3u8Settings { - s.PrivateMetadataPid = &v - return s -} - -// SetProgramNumber sets the ProgramNumber field's value. -func (s *M3u8Settings) SetProgramNumber(v int64) *M3u8Settings { - s.ProgramNumber = &v - return s -} - -// SetScte35Pid sets the Scte35Pid field's value. -func (s *M3u8Settings) SetScte35Pid(v int64) *M3u8Settings { - s.Scte35Pid = &v - return s -} - -// SetScte35Source sets the Scte35Source field's value. -func (s *M3u8Settings) SetScte35Source(v string) *M3u8Settings { - s.Scte35Source = &v - return s -} - -// SetTimedMetadata sets the TimedMetadata field's value. -func (s *M3u8Settings) SetTimedMetadata(v string) *M3u8Settings { - s.TimedMetadata = &v - return s -} - -// SetTimedMetadataPid sets the TimedMetadataPid field's value. -func (s *M3u8Settings) SetTimedMetadataPid(v int64) *M3u8Settings { - s.TimedMetadataPid = &v - return s -} - -// SetTransportStreamId sets the TransportStreamId field's value. -func (s *M3u8Settings) SetTransportStreamId(v int64) *M3u8Settings { - s.TransportStreamId = &v - return s -} - -// SetVideoPid sets the VideoPid field's value. -func (s *M3u8Settings) SetVideoPid(v int64) *M3u8Settings { - s.VideoPid = &v - return s -} - -// Overlay motion graphics on top of your video at the time that you specify. -type MotionImageInserter struct { - _ struct{} `type:"structure"` - - // If your motion graphic asset is a .mov file, keep this setting unspecified. - // If your motion graphic asset is a series of .png files, specify the frame - // rate of the overlay in frames per second, as a fraction. For example, specify - // 24 fps as 24/1. Make sure that the number of images in your series matches - // the frame rate and your intended overlay duration. For example, if you want - // a 30-second overlay at 30 fps, you should have 900 .png images. This overlay - // frame rate doesn't need to match the frame rate of the underlying video. - Framerate *MotionImageInsertionFramerate `locationName:"framerate" type:"structure"` - - // Specify the .mov file or series of .png files that you want to overlay on - // your video. For .png files, provide the file name of the first file in the - // series. Make sure that the names of the .png files end with sequential numbers - // that specify the order that they are played in. For example, overlay_000.png, - // overlay_001.png, overlay_002.png, and so on. The sequence must start at zero, - // and each image file name must have the same number of digits. Pad your initial - // file names with enough zeros to complete the sequence. For example, if the - // first image is overlay_0.png, there can be only 10 images in the sequence, - // with the last image being overlay_9.png. But if the first image is overlay_00.png, - // there can be 100 images in the sequence. - Input *string `locationName:"input" min:"14" type:"string"` - - // Choose the type of motion graphic asset that you are providing for your overlay. - // You can choose either a .mov file or a series of .png files. - InsertionMode *string `locationName:"insertionMode" type:"string" enum:"MotionImageInsertionMode"` - - // Use Offset to specify the placement of your motion graphic overlay on the - // video frame. Specify in pixels, from the upper-left corner of the frame. - // If you don't specify an offset, the service scales your overlay to the full - // size of the frame. Otherwise, the service inserts the overlay at its native - // resolution and scales the size up or down with any video scaling. - Offset *MotionImageInsertionOffset `locationName:"offset" type:"structure"` - - // Specify whether your motion graphic overlay repeats on a loop or plays only - // once. - Playback *string `locationName:"playback" type:"string" enum:"MotionImagePlayback"` - - // Specify when the motion overlay begins. Use timecode format (HH:MM:SS:FF - // or HH:MM:SS;FF). Make sure that the timecode you provide here takes into - // account how you have set up your timecode configuration under both job settings - // and input settings. The simplest way to do that is to set both to start at - // 0. If you need to set up your job to follow timecodes embedded in your source - // that don't start at zero, make sure that you specify a start time that is - // after the first embedded timecode. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/setting-up-timecode.html - // Find job-wide and input timecode configuration settings in your JSON job - // settings specification at settings>timecodeConfig>source and settings>inputs>timecodeSource. - StartTime *string `locationName:"startTime" min:"11" type:"string"` -} - -// String returns the string representation -func (s MotionImageInserter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MotionImageInserter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MotionImageInserter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MotionImageInserter"} - if s.Input != nil && len(*s.Input) < 14 { - invalidParams.Add(request.NewErrParamMinLen("Input", 14)) - } - if s.StartTime != nil && len(*s.StartTime) < 11 { - invalidParams.Add(request.NewErrParamMinLen("StartTime", 11)) - } - if s.Framerate != nil { - if err := s.Framerate.Validate(); err != nil { - invalidParams.AddNested("Framerate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFramerate sets the Framerate field's value. -func (s *MotionImageInserter) SetFramerate(v *MotionImageInsertionFramerate) *MotionImageInserter { - s.Framerate = v - return s -} - -// SetInput sets the Input field's value. -func (s *MotionImageInserter) SetInput(v string) *MotionImageInserter { - s.Input = &v - return s -} - -// SetInsertionMode sets the InsertionMode field's value. -func (s *MotionImageInserter) SetInsertionMode(v string) *MotionImageInserter { - s.InsertionMode = &v - return s -} - -// SetOffset sets the Offset field's value. -func (s *MotionImageInserter) SetOffset(v *MotionImageInsertionOffset) *MotionImageInserter { - s.Offset = v - return s -} - -// SetPlayback sets the Playback field's value. -func (s *MotionImageInserter) SetPlayback(v string) *MotionImageInserter { - s.Playback = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *MotionImageInserter) SetStartTime(v string) *MotionImageInserter { - s.StartTime = &v - return s -} - -// For motion overlays that don't have a built-in frame rate, specify the frame -// rate of the overlay in frames per second, as a fraction. For example, specify -// 24 fps as 24/1. The overlay frame rate doesn't need to match the frame rate -// of the underlying video. -type MotionImageInsertionFramerate struct { - _ struct{} `type:"structure"` - - // The bottom of the fraction that expresses your overlay frame rate. For example, - // if your frame rate is 24 fps, set this value to 1. - FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` - - // The top of the fraction that expresses your overlay frame rate. For example, - // if your frame rate is 24 fps, set this value to 24. - FramerateNumerator *int64 `locationName:"framerateNumerator" min:"1" type:"integer"` -} - -// String returns the string representation -func (s MotionImageInsertionFramerate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MotionImageInsertionFramerate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MotionImageInsertionFramerate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MotionImageInsertionFramerate"} - if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { - invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) - } - if s.FramerateNumerator != nil && *s.FramerateNumerator < 1 { - invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFramerateDenominator sets the FramerateDenominator field's value. -func (s *MotionImageInsertionFramerate) SetFramerateDenominator(v int64) *MotionImageInsertionFramerate { - s.FramerateDenominator = &v - return s -} - -// SetFramerateNumerator sets the FramerateNumerator field's value. -func (s *MotionImageInsertionFramerate) SetFramerateNumerator(v int64) *MotionImageInsertionFramerate { - s.FramerateNumerator = &v - return s -} - -// Specify the offset between the upper-left corner of the video frame and the -// top left corner of the overlay. -type MotionImageInsertionOffset struct { - _ struct{} `type:"structure"` - - // Set the distance, in pixels, between the overlay and the left edge of the - // video frame. - ImageX *int64 `locationName:"imageX" type:"integer"` - - // Set the distance, in pixels, between the overlay and the top edge of the - // video frame. - ImageY *int64 `locationName:"imageY" type:"integer"` -} - -// String returns the string representation -func (s MotionImageInsertionOffset) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MotionImageInsertionOffset) GoString() string { - return s.String() -} - -// SetImageX sets the ImageX field's value. -func (s *MotionImageInsertionOffset) SetImageX(v int64) *MotionImageInsertionOffset { - s.ImageX = &v - return s -} - -// SetImageY sets the ImageY field's value. -func (s *MotionImageInsertionOffset) SetImageY(v int64) *MotionImageInsertionOffset { - s.ImageY = &v - return s -} - -// Settings for MOV Container. -type MovSettings struct { - _ struct{} `type:"structure"` - - // When enabled, include 'clap' atom if appropriate for the video output settings. - ClapAtom *string `locationName:"clapAtom" type:"string" enum:"MovClapAtom"` - - // When enabled, file composition times will start at zero, composition times - // in the 'ctts' (composition time to sample) box for B-frames will be negative, - // and a 'cslg' (composition shift least greatest) box will be included per - // 14496-1 amendment 1. This improves compatibility with Apple players and tools. - CslgAtom *string `locationName:"cslgAtom" type:"string" enum:"MovCslgAtom"` - - // When set to XDCAM, writes MPEG2 video streams into the QuickTime file using - // XDCAM fourcc codes. This increases compatibility with Apple editors and players, - // but may decrease compatibility with other players. Only applicable when the - // video codec is MPEG2. - Mpeg2FourCCControl *string `locationName:"mpeg2FourCCControl" type:"string" enum:"MovMpeg2FourCCControl"` - - // If set to OMNEON, inserts Omneon-compatible padding - PaddingControl *string `locationName:"paddingControl" type:"string" enum:"MovPaddingControl"` - - // Always keep the default value (SELF_CONTAINED) for this setting. - Reference *string `locationName:"reference" type:"string" enum:"MovReference"` -} - -// String returns the string representation -func (s MovSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MovSettings) GoString() string { - return s.String() -} - -// SetClapAtom sets the ClapAtom field's value. -func (s *MovSettings) SetClapAtom(v string) *MovSettings { - s.ClapAtom = &v - return s -} - -// SetCslgAtom sets the CslgAtom field's value. -func (s *MovSettings) SetCslgAtom(v string) *MovSettings { - s.CslgAtom = &v - return s -} - -// SetMpeg2FourCCControl sets the Mpeg2FourCCControl field's value. -func (s *MovSettings) SetMpeg2FourCCControl(v string) *MovSettings { - s.Mpeg2FourCCControl = &v - return s -} - -// SetPaddingControl sets the PaddingControl field's value. -func (s *MovSettings) SetPaddingControl(v string) *MovSettings { - s.PaddingControl = &v - return s -} - -// SetReference sets the Reference field's value. -func (s *MovSettings) SetReference(v string) *MovSettings { - s.Reference = &v - return s -} - -// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to -// the value MP2. -type Mp2Settings struct { - _ struct{} `type:"structure"` - - // Average bitrate in bits/second. - Bitrate *int64 `locationName:"bitrate" min:"32000" type:"integer"` - - // Set Channels to specify the number of channels in this output audio track. - // Choosing Mono in the console will give you 1 output channel; choosing Stereo - // will give you 2. In the API, valid values are 1 and 2. - Channels *int64 `locationName:"channels" min:"1" type:"integer"` - - // Sample rate in hz. - SampleRate *int64 `locationName:"sampleRate" min:"32000" type:"integer"` -} - -// String returns the string representation -func (s Mp2Settings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Mp2Settings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Mp2Settings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Mp2Settings"} - if s.Bitrate != nil && *s.Bitrate < 32000 { - invalidParams.Add(request.NewErrParamMinValue("Bitrate", 32000)) - } - if s.Channels != nil && *s.Channels < 1 { - invalidParams.Add(request.NewErrParamMinValue("Channels", 1)) - } - if s.SampleRate != nil && *s.SampleRate < 32000 { - invalidParams.Add(request.NewErrParamMinValue("SampleRate", 32000)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBitrate sets the Bitrate field's value. -func (s *Mp2Settings) SetBitrate(v int64) *Mp2Settings { - s.Bitrate = &v - return s -} - -// SetChannels sets the Channels field's value. -func (s *Mp2Settings) SetChannels(v int64) *Mp2Settings { - s.Channels = &v - return s -} - -// SetSampleRate sets the SampleRate field's value. -func (s *Mp2Settings) SetSampleRate(v int64) *Mp2Settings { - s.SampleRate = &v - return s -} - -// Settings for MP4 Container -type Mp4Settings struct { - _ struct{} `type:"structure"` - - // When enabled, file composition times will start at zero, composition times - // in the 'ctts' (composition time to sample) box for B-frames will be negative, - // and a 'cslg' (composition shift least greatest) box will be included per - // 14496-1 amendment 1. This improves compatibility with Apple players and tools. - CslgAtom *string `locationName:"cslgAtom" type:"string" enum:"Mp4CslgAtom"` - - // Inserts a free-space box immediately after the moov box. - FreeSpaceBox *string `locationName:"freeSpaceBox" type:"string" enum:"Mp4FreeSpaceBox"` - - // If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning - // of the archive as required for progressive downloading. Otherwise it is placed - // normally at the end. - MoovPlacement *string `locationName:"moovPlacement" type:"string" enum:"Mp4MoovPlacement"` - - // Overrides the "Major Brand" field in the output file. Usually not necessary - // to specify. - Mp4MajorBrand *string `locationName:"mp4MajorBrand" type:"string"` -} - -// String returns the string representation -func (s Mp4Settings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Mp4Settings) GoString() string { - return s.String() -} - -// SetCslgAtom sets the CslgAtom field's value. -func (s *Mp4Settings) SetCslgAtom(v string) *Mp4Settings { - s.CslgAtom = &v - return s -} - -// SetFreeSpaceBox sets the FreeSpaceBox field's value. -func (s *Mp4Settings) SetFreeSpaceBox(v string) *Mp4Settings { - s.FreeSpaceBox = &v - return s -} - -// SetMoovPlacement sets the MoovPlacement field's value. -func (s *Mp4Settings) SetMoovPlacement(v string) *Mp4Settings { - s.MoovPlacement = &v - return s -} - -// SetMp4MajorBrand sets the Mp4MajorBrand field's value. -func (s *Mp4Settings) SetMp4MajorBrand(v string) *Mp4Settings { - s.Mp4MajorBrand = &v - return s -} - -// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to -// the value MPEG2. -type Mpeg2Settings struct { - _ struct{} `type:"structure"` - - // Adaptive quantization. Allows intra-frame quantizers to vary to improve visual - // quality. - AdaptiveQuantization *string `locationName:"adaptiveQuantization" type:"string" enum:"Mpeg2AdaptiveQuantization"` - - // Average bitrate in bits/second. Required for VBR and CBR. For MS Smooth outputs, - // bitrates must be unique when rounded down to the nearest multiple of 1000. - Bitrate *int64 `locationName:"bitrate" min:"1000" type:"integer"` - - // Use Level (Mpeg2CodecLevel) to set the MPEG-2 level for the video output. - CodecLevel *string `locationName:"codecLevel" type:"string" enum:"Mpeg2CodecLevel"` - - // Use Profile (Mpeg2CodecProfile) to set the MPEG-2 profile for the video output. - CodecProfile *string `locationName:"codecProfile" type:"string" enum:"Mpeg2CodecProfile"` - - // Choose Adaptive to improve subjective video quality for high-motion content. - // This will cause the service to use fewer B-frames (which infer information - // based on other frames) for high-motion portions of the video and more B-frames - // for low-motion portions. The maximum number of B-frames is limited by the - // value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames). - DynamicSubGop *string `locationName:"dynamicSubGop" type:"string" enum:"Mpeg2DynamicSubGop"` - - // If you are using the console, use the Framerate setting to specify the frame - // rate for this output. If you want to keep the same frame rate as the input - // video, choose Follow source. If you want to do frame rate conversion, choose - // a frame rate from the dropdown list or choose Custom. The framerates shown - // in the dropdown list are decimal approximations of fractions. If you choose - // Custom, specify your frame rate as a fraction. If you are creating your transcoding - // job sepecification as a JSON file without the console, use FramerateControl - // to specify which value the service uses for the frame rate for this output. - // Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate - // from the input. Choose SPECIFIED if you want the service to use the frame - // rate you specify in the settings FramerateNumerator and FramerateDenominator. - FramerateControl *string `locationName:"framerateControl" type:"string" enum:"Mpeg2FramerateControl"` - - // When set to INTERPOLATE, produces smoother motion during frame rate conversion. - FramerateConversionAlgorithm *string `locationName:"framerateConversionAlgorithm" type:"string" enum:"Mpeg2FramerateConversionAlgorithm"` - - // Frame rate denominator. - FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` - - // Frame rate numerator - frame rate is a fraction, e.g. 24000 / 1001 = 23.976 - // fps. - FramerateNumerator *int64 `locationName:"framerateNumerator" min:"24" type:"integer"` - - // Frequency of closed GOPs. In streaming applications, it is recommended that - // this be set to 1 so a decoder joining mid-stream will receive an IDR frame - // as quickly as possible. Setting this value to 0 will break output segmenting. - GopClosedCadence *int64 `locationName:"gopClosedCadence" type:"integer"` - - // GOP Length (keyframe interval) in frames or seconds. Must be greater than - // zero. - GopSize *float64 `locationName:"gopSize" type:"double"` - - // Indicates if the GOP Size in MPEG2 is specified in frames or seconds. If - // seconds the system will convert the GOP Size into a frame count at run time. - GopSizeUnits *string `locationName:"gopSizeUnits" type:"string" enum:"Mpeg2GopSizeUnits"` - - // Percentage of the buffer that should initially be filled (HRD buffer model). - HrdBufferInitialFillPercentage *int64 `locationName:"hrdBufferInitialFillPercentage" type:"integer"` - - // Size of buffer (HRD buffer model) in bits. For example, enter five megabits - // as 5000000. - HrdBufferSize *int64 `locationName:"hrdBufferSize" type:"integer"` - - // Use Interlace mode (InterlaceMode) to choose the scan line type for the output. - // * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce - // interlaced output with the entire output having the same field polarity (top - // or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default - // Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, - // behavior depends on the input scan type. - If the source is interlaced, the - // output will be interlaced with the same polarity as the source (it will follow - // the source). The output could therefore be a mix of "top field first" and - // "bottom field first". - If the source is progressive, the output will be - // interlaced with "top field first" or "bottom field first" polarity, depending - // on which of the Follow options you chose. - InterlaceMode *string `locationName:"interlaceMode" type:"string" enum:"Mpeg2InterlaceMode"` - - // Use Intra DC precision (Mpeg2IntraDcPrecision) to set quantization precision - // for intra-block DC coefficients. If you choose the value auto, the service - // will automatically select the precision based on the per-frame compression - // ratio. - IntraDcPrecision *string `locationName:"intraDcPrecision" type:"string" enum:"Mpeg2IntraDcPrecision"` - - // Maximum bitrate in bits/second. For example, enter five megabits per second - // as 5000000. - MaxBitrate *int64 `locationName:"maxBitrate" min:"1000" type:"integer"` - - // Enforces separation between repeated (cadence) I-frames and I-frames inserted - // by Scene Change Detection. If a scene change I-frame is within I-interval - // frames of a cadence I-frame, the GOP is shrunk and/or stretched to the scene - // change I-frame. GOP stretch requires enabling lookahead as well as setting - // I-interval. The normal cadence resumes for the next GOP. This setting is - // only used when Scene Change Detect is enabled. Note: Maximum GOP stretch - // = GOP size + Min-I-interval - 1 - MinIInterval *int64 `locationName:"minIInterval" type:"integer"` - - // Number of B-frames between reference frames. - NumberBFramesBetweenReferenceFrames *int64 `locationName:"numberBFramesBetweenReferenceFrames" type:"integer"` - - // Using the API, enable ParFollowSource if you want the service to use the - // pixel aspect ratio from the input. Using the console, do this by choosing - // Follow source for Pixel aspect ratio. - ParControl *string `locationName:"parControl" type:"string" enum:"Mpeg2ParControl"` - - // Pixel Aspect Ratio denominator. - ParDenominator *int64 `locationName:"parDenominator" min:"1" type:"integer"` - - // Pixel Aspect Ratio numerator. - ParNumerator *int64 `locationName:"parNumerator" min:"1" type:"integer"` - - // Use Quality tuning level (Mpeg2QualityTuningLevel) to specifiy whether to - // use single-pass or multipass video encoding. - QualityTuningLevel *string `locationName:"qualityTuningLevel" type:"string" enum:"Mpeg2QualityTuningLevel"` - - // Use Rate control mode (Mpeg2RateControlMode) to specifiy whether the bitrate - // is variable (vbr) or constant (cbr). - RateControlMode *string `locationName:"rateControlMode" type:"string" enum:"Mpeg2RateControlMode"` - - // Scene change detection (inserts I-frames on scene changes). - SceneChangeDetect *string `locationName:"sceneChangeDetect" type:"string" enum:"Mpeg2SceneChangeDetect"` - - // Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled - // as 25fps, and audio is sped up correspondingly. - SlowPal *string `locationName:"slowPal" type:"string" enum:"Mpeg2SlowPal"` - - // Softness. Selects quantizer matrix, larger values reduce high-frequency content - // in the encoded image. - Softness *int64 `locationName:"softness" type:"integer"` - - // Adjust quantization within each frame based on spatial variation of content - // complexity. - SpatialAdaptiveQuantization *string `locationName:"spatialAdaptiveQuantization" type:"string" enum:"Mpeg2SpatialAdaptiveQuantization"` - - // Produces a Type D-10 compatible bitstream (SMPTE 356M-2001). - Syntax *string `locationName:"syntax" type:"string" enum:"Mpeg2Syntax"` - - // Only use Telecine (Mpeg2Telecine) when you set Framerate (Framerate) to 29.970. - // Set Telecine (Mpeg2Telecine) to Hard (hard) to produce a 29.97i output from - // a 23.976 input. Set it to Soft (soft) to produce 23.976 output and leave - // converstion to the player. - Telecine *string `locationName:"telecine" type:"string" enum:"Mpeg2Telecine"` - - // Adjust quantization within each frame based on temporal variation of content - // complexity. - TemporalAdaptiveQuantization *string `locationName:"temporalAdaptiveQuantization" type:"string" enum:"Mpeg2TemporalAdaptiveQuantization"` -} - -// String returns the string representation -func (s Mpeg2Settings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Mpeg2Settings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Mpeg2Settings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Mpeg2Settings"} - if s.Bitrate != nil && *s.Bitrate < 1000 { - invalidParams.Add(request.NewErrParamMinValue("Bitrate", 1000)) - } - if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { - invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) - } - if s.FramerateNumerator != nil && *s.FramerateNumerator < 24 { - invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 24)) - } - if s.MaxBitrate != nil && *s.MaxBitrate < 1000 { - invalidParams.Add(request.NewErrParamMinValue("MaxBitrate", 1000)) - } - if s.ParDenominator != nil && *s.ParDenominator < 1 { - invalidParams.Add(request.NewErrParamMinValue("ParDenominator", 1)) - } - if s.ParNumerator != nil && *s.ParNumerator < 1 { - invalidParams.Add(request.NewErrParamMinValue("ParNumerator", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdaptiveQuantization sets the AdaptiveQuantization field's value. -func (s *Mpeg2Settings) SetAdaptiveQuantization(v string) *Mpeg2Settings { - s.AdaptiveQuantization = &v - return s -} - -// SetBitrate sets the Bitrate field's value. -func (s *Mpeg2Settings) SetBitrate(v int64) *Mpeg2Settings { - s.Bitrate = &v - return s -} - -// SetCodecLevel sets the CodecLevel field's value. -func (s *Mpeg2Settings) SetCodecLevel(v string) *Mpeg2Settings { - s.CodecLevel = &v - return s -} - -// SetCodecProfile sets the CodecProfile field's value. -func (s *Mpeg2Settings) SetCodecProfile(v string) *Mpeg2Settings { - s.CodecProfile = &v - return s -} - -// SetDynamicSubGop sets the DynamicSubGop field's value. -func (s *Mpeg2Settings) SetDynamicSubGop(v string) *Mpeg2Settings { - s.DynamicSubGop = &v - return s -} - -// SetFramerateControl sets the FramerateControl field's value. -func (s *Mpeg2Settings) SetFramerateControl(v string) *Mpeg2Settings { - s.FramerateControl = &v - return s -} - -// SetFramerateConversionAlgorithm sets the FramerateConversionAlgorithm field's value. -func (s *Mpeg2Settings) SetFramerateConversionAlgorithm(v string) *Mpeg2Settings { - s.FramerateConversionAlgorithm = &v - return s -} - -// SetFramerateDenominator sets the FramerateDenominator field's value. -func (s *Mpeg2Settings) SetFramerateDenominator(v int64) *Mpeg2Settings { - s.FramerateDenominator = &v - return s -} - -// SetFramerateNumerator sets the FramerateNumerator field's value. -func (s *Mpeg2Settings) SetFramerateNumerator(v int64) *Mpeg2Settings { - s.FramerateNumerator = &v - return s -} - -// SetGopClosedCadence sets the GopClosedCadence field's value. -func (s *Mpeg2Settings) SetGopClosedCadence(v int64) *Mpeg2Settings { - s.GopClosedCadence = &v - return s -} - -// SetGopSize sets the GopSize field's value. -func (s *Mpeg2Settings) SetGopSize(v float64) *Mpeg2Settings { - s.GopSize = &v - return s -} - -// SetGopSizeUnits sets the GopSizeUnits field's value. -func (s *Mpeg2Settings) SetGopSizeUnits(v string) *Mpeg2Settings { - s.GopSizeUnits = &v - return s -} - -// SetHrdBufferInitialFillPercentage sets the HrdBufferInitialFillPercentage field's value. -func (s *Mpeg2Settings) SetHrdBufferInitialFillPercentage(v int64) *Mpeg2Settings { - s.HrdBufferInitialFillPercentage = &v - return s -} - -// SetHrdBufferSize sets the HrdBufferSize field's value. -func (s *Mpeg2Settings) SetHrdBufferSize(v int64) *Mpeg2Settings { - s.HrdBufferSize = &v - return s -} - -// SetInterlaceMode sets the InterlaceMode field's value. -func (s *Mpeg2Settings) SetInterlaceMode(v string) *Mpeg2Settings { - s.InterlaceMode = &v - return s -} - -// SetIntraDcPrecision sets the IntraDcPrecision field's value. -func (s *Mpeg2Settings) SetIntraDcPrecision(v string) *Mpeg2Settings { - s.IntraDcPrecision = &v - return s -} - -// SetMaxBitrate sets the MaxBitrate field's value. -func (s *Mpeg2Settings) SetMaxBitrate(v int64) *Mpeg2Settings { - s.MaxBitrate = &v - return s -} - -// SetMinIInterval sets the MinIInterval field's value. -func (s *Mpeg2Settings) SetMinIInterval(v int64) *Mpeg2Settings { - s.MinIInterval = &v - return s -} - -// SetNumberBFramesBetweenReferenceFrames sets the NumberBFramesBetweenReferenceFrames field's value. -func (s *Mpeg2Settings) SetNumberBFramesBetweenReferenceFrames(v int64) *Mpeg2Settings { - s.NumberBFramesBetweenReferenceFrames = &v - return s -} - -// SetParControl sets the ParControl field's value. -func (s *Mpeg2Settings) SetParControl(v string) *Mpeg2Settings { - s.ParControl = &v - return s -} - -// SetParDenominator sets the ParDenominator field's value. -func (s *Mpeg2Settings) SetParDenominator(v int64) *Mpeg2Settings { - s.ParDenominator = &v - return s -} - -// SetParNumerator sets the ParNumerator field's value. -func (s *Mpeg2Settings) SetParNumerator(v int64) *Mpeg2Settings { - s.ParNumerator = &v - return s -} - -// SetQualityTuningLevel sets the QualityTuningLevel field's value. -func (s *Mpeg2Settings) SetQualityTuningLevel(v string) *Mpeg2Settings { - s.QualityTuningLevel = &v - return s -} - -// SetRateControlMode sets the RateControlMode field's value. -func (s *Mpeg2Settings) SetRateControlMode(v string) *Mpeg2Settings { - s.RateControlMode = &v - return s -} - -// SetSceneChangeDetect sets the SceneChangeDetect field's value. -func (s *Mpeg2Settings) SetSceneChangeDetect(v string) *Mpeg2Settings { - s.SceneChangeDetect = &v - return s -} - -// SetSlowPal sets the SlowPal field's value. -func (s *Mpeg2Settings) SetSlowPal(v string) *Mpeg2Settings { - s.SlowPal = &v - return s -} - -// SetSoftness sets the Softness field's value. -func (s *Mpeg2Settings) SetSoftness(v int64) *Mpeg2Settings { - s.Softness = &v - return s -} - -// SetSpatialAdaptiveQuantization sets the SpatialAdaptiveQuantization field's value. -func (s *Mpeg2Settings) SetSpatialAdaptiveQuantization(v string) *Mpeg2Settings { - s.SpatialAdaptiveQuantization = &v - return s -} - -// SetSyntax sets the Syntax field's value. -func (s *Mpeg2Settings) SetSyntax(v string) *Mpeg2Settings { - s.Syntax = &v - return s -} - -// SetTelecine sets the Telecine field's value. -func (s *Mpeg2Settings) SetTelecine(v string) *Mpeg2Settings { - s.Telecine = &v - return s -} - -// SetTemporalAdaptiveQuantization sets the TemporalAdaptiveQuantization field's value. -func (s *Mpeg2Settings) SetTemporalAdaptiveQuantization(v string) *Mpeg2Settings { - s.TemporalAdaptiveQuantization = &v - return s -} - -// If you are using DRM, set DRM System (MsSmoothEncryptionSettings) to specify -// the value SpekeKeyProvider. -type MsSmoothEncryptionSettings struct { - _ struct{} `type:"structure"` - - // Settings for use with a SPEKE key provider - SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure"` -} - -// String returns the string representation -func (s MsSmoothEncryptionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MsSmoothEncryptionSettings) GoString() string { - return s.String() -} - -// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. -func (s *MsSmoothEncryptionSettings) SetSpekeKeyProvider(v *SpekeKeyProvider) *MsSmoothEncryptionSettings { - s.SpekeKeyProvider = v - return s -} - -// Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to -// MS_SMOOTH_GROUP_SETTINGS. -type MsSmoothGroupSettings struct { - _ struct{} `type:"structure"` - - // COMBINE_DUPLICATE_STREAMS combines identical audio encoding settings across - // a Microsoft Smooth output group into a single audio stream. - AudioDeduplication *string `locationName:"audioDeduplication" type:"string" enum:"MsSmoothAudioDeduplication"` - - // Use Destination (Destination) to specify the S3 output location and the output - // filename base. Destination accepts format identifiers. If you do not specify - // the base filename in the URI, the service will use the filename of the input - // file. If your job has multiple inputs, the service uses the filename of the - // first input file. - Destination *string `locationName:"destination" type:"string"` - - // If you are using DRM, set DRM System (MsSmoothEncryptionSettings) to specify - // the value SpekeKeyProvider. - Encryption *MsSmoothEncryptionSettings `locationName:"encryption" type:"structure"` - - // Use Fragment length (FragmentLength) to specify the mp4 fragment sizes in - // seconds. Fragment length must be compatible with GOP size and frame rate. - FragmentLength *int64 `locationName:"fragmentLength" min:"1" type:"integer"` - - // Use Manifest encoding (MsSmoothManifestEncoding) to specify the encoding - // format for the server and client manifest. Valid options are utf8 and utf16. - ManifestEncoding *string `locationName:"manifestEncoding" type:"string" enum:"MsSmoothManifestEncoding"` -} - -// String returns the string representation -func (s MsSmoothGroupSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MsSmoothGroupSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MsSmoothGroupSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MsSmoothGroupSettings"} - if s.FragmentLength != nil && *s.FragmentLength < 1 { - invalidParams.Add(request.NewErrParamMinValue("FragmentLength", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioDeduplication sets the AudioDeduplication field's value. -func (s *MsSmoothGroupSettings) SetAudioDeduplication(v string) *MsSmoothGroupSettings { - s.AudioDeduplication = &v - return s -} - -// SetDestination sets the Destination field's value. -func (s *MsSmoothGroupSettings) SetDestination(v string) *MsSmoothGroupSettings { - s.Destination = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *MsSmoothGroupSettings) SetEncryption(v *MsSmoothEncryptionSettings) *MsSmoothGroupSettings { - s.Encryption = v - return s -} - -// SetFragmentLength sets the FragmentLength field's value. -func (s *MsSmoothGroupSettings) SetFragmentLength(v int64) *MsSmoothGroupSettings { - s.FragmentLength = &v - return s -} - -// SetManifestEncoding sets the ManifestEncoding field's value. -func (s *MsSmoothGroupSettings) SetManifestEncoding(v string) *MsSmoothGroupSettings { - s.ManifestEncoding = &v - return s -} - -// Settings for Nielsen Configuration -type NielsenConfiguration struct { - _ struct{} `type:"structure"` - - // Use Nielsen Configuration (NielsenConfiguration) to set the Nielsen measurement - // system breakout code. Supported values are 0, 3, 7, and 9. - BreakoutCode *int64 `locationName:"breakoutCode" type:"integer"` - - // Use Distributor ID (DistributorID) to specify the distributor ID that is - // assigned to your organization by Neilsen. - DistributorId *string `locationName:"distributorId" type:"string"` -} - -// String returns the string representation -func (s NielsenConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NielsenConfiguration) GoString() string { - return s.String() -} - -// SetBreakoutCode sets the BreakoutCode field's value. -func (s *NielsenConfiguration) SetBreakoutCode(v int64) *NielsenConfiguration { - s.BreakoutCode = &v - return s -} - -// SetDistributorId sets the DistributorId field's value. -func (s *NielsenConfiguration) SetDistributorId(v string) *NielsenConfiguration { - s.DistributorId = &v - return s -} - -// Enable the Noise reducer (NoiseReducer) feature to remove noise from your -// video output if necessary. Enable or disable this feature for each output -// individually. This setting is disabled by default. When you enable Noise -// reducer (NoiseReducer), you must also select a value for Noise reducer filter -// (NoiseReducerFilter). -type NoiseReducer struct { - _ struct{} `type:"structure"` - - // Use Noise reducer filter (NoiseReducerFilter) to select one of the following - // spatial image filtering functions. To use this setting, you must also enable - // Noise reducer (NoiseReducer). * Bilateral is an edge preserving noise reduction - // filter. * Mean (softest), Gaussian, Lanczos, and Sharpen (sharpest) are convolution - // filters. * Conserve is a min/max noise reduction filter. * Spatial is a frequency-domain - // filter based on JND principles. - Filter *string `locationName:"filter" type:"string" enum:"NoiseReducerFilter"` - - // Settings for a noise reducer filter - FilterSettings *NoiseReducerFilterSettings `locationName:"filterSettings" type:"structure"` - - // Noise reducer filter settings for spatial filter. - SpatialFilterSettings *NoiseReducerSpatialFilterSettings `locationName:"spatialFilterSettings" type:"structure"` -} - -// String returns the string representation -func (s NoiseReducer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NoiseReducer) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NoiseReducer) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NoiseReducer"} - if s.SpatialFilterSettings != nil { - if err := s.SpatialFilterSettings.Validate(); err != nil { - invalidParams.AddNested("SpatialFilterSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *NoiseReducer) SetFilter(v string) *NoiseReducer { - s.Filter = &v - return s -} - -// SetFilterSettings sets the FilterSettings field's value. -func (s *NoiseReducer) SetFilterSettings(v *NoiseReducerFilterSettings) *NoiseReducer { - s.FilterSettings = v - return s -} - -// SetSpatialFilterSettings sets the SpatialFilterSettings field's value. -func (s *NoiseReducer) SetSpatialFilterSettings(v *NoiseReducerSpatialFilterSettings) *NoiseReducer { - s.SpatialFilterSettings = v - return s -} - -// Settings for a noise reducer filter -type NoiseReducerFilterSettings struct { - _ struct{} `type:"structure"` - - // Relative strength of noise reducing filter. Higher values produce stronger - // filtering. - Strength *int64 `locationName:"strength" type:"integer"` -} - -// String returns the string representation -func (s NoiseReducerFilterSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NoiseReducerFilterSettings) GoString() string { - return s.String() -} - -// SetStrength sets the Strength field's value. -func (s *NoiseReducerFilterSettings) SetStrength(v int64) *NoiseReducerFilterSettings { - s.Strength = &v - return s -} - -// Noise reducer filter settings for spatial filter. -type NoiseReducerSpatialFilterSettings struct { - _ struct{} `type:"structure"` - - // Specify strength of post noise reduction sharpening filter, with 0 disabling - // the filter and 3 enabling it at maximum strength. - PostFilterSharpenStrength *int64 `locationName:"postFilterSharpenStrength" type:"integer"` - - // The speed of the filter, from -2 (lower speed) to 3 (higher speed), with - // 0 being the nominal value. - Speed *int64 `locationName:"speed" type:"integer"` - - // Relative strength of noise reducing filter. Higher values produce stronger - // filtering. - Strength *int64 `locationName:"strength" type:"integer"` -} - -// String returns the string representation -func (s NoiseReducerSpatialFilterSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NoiseReducerSpatialFilterSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NoiseReducerSpatialFilterSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NoiseReducerSpatialFilterSettings"} - if s.Speed != nil && *s.Speed < -2 { - invalidParams.Add(request.NewErrParamMinValue("Speed", -2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPostFilterSharpenStrength sets the PostFilterSharpenStrength field's value. -func (s *NoiseReducerSpatialFilterSettings) SetPostFilterSharpenStrength(v int64) *NoiseReducerSpatialFilterSettings { - s.PostFilterSharpenStrength = &v - return s -} - -// SetSpeed sets the Speed field's value. -func (s *NoiseReducerSpatialFilterSettings) SetSpeed(v int64) *NoiseReducerSpatialFilterSettings { - s.Speed = &v - return s -} - -// SetStrength sets the Strength field's value. -func (s *NoiseReducerSpatialFilterSettings) SetStrength(v int64) *NoiseReducerSpatialFilterSettings { - s.Strength = &v - return s -} - -// An output object describes the settings for a single output file or stream -// in an output group. -type Output struct { - _ struct{} `type:"structure"` - - // (AudioDescriptions) contains groups of audio encoding settings organized - // by audio codec. Include one instance of (AudioDescriptions) per output. (AudioDescriptions) - // can contain multiple groups of encoding settings. - AudioDescriptions []*AudioDescription `locationName:"audioDescriptions" type:"list"` - - // (CaptionDescriptions) contains groups of captions settings. For each output - // that has captions, include one instance of (CaptionDescriptions). (CaptionDescriptions) - // can contain multiple groups of captions settings. - CaptionDescriptions []*CaptionDescription `locationName:"captionDescriptions" type:"list"` - - // Container specific settings. - ContainerSettings *ContainerSettings `locationName:"containerSettings" type:"structure"` - - // Use Extension (Extension) to specify the file extension for outputs in File - // output groups. If you do not specify a value, the service will use default - // extensions by container type as follows * MPEG-2 transport stream, m2ts * - // Quicktime, mov * MXF container, mxf * MPEG-4 container, mp4 * No Container, - // the service will use codec extensions (e.g. AAC, H265, H265, AC3) - Extension *string `locationName:"extension" type:"string"` - - // Use Name modifier (NameModifier) to have the service add a string to the - // end of each output filename. You specify the base filename as part of your - // destination URI. When you create multiple outputs in the same output group, - // Name modifier (NameModifier) is required. Name modifier also accepts format - // identifiers. For DASH ISO outputs, if you use the format identifiers $Number$ - // or $Time$ in one output, you must use them in the same way in all outputs - // of the output group. - NameModifier *string `locationName:"nameModifier" min:"1" type:"string"` - - // Specific settings for this type of output. - OutputSettings *OutputSettings `locationName:"outputSettings" type:"structure"` - - // Use Preset (Preset) to specifiy a preset for your transcoding settings. Provide - // the system or custom preset name. You can specify either Preset (Preset) - // or Container settings (ContainerSettings), but not both. - Preset *string `locationName:"preset" type:"string"` - - // (VideoDescription) contains a group of video encoding settings. The specific - // video settings depend on the video codec you choose when you specify a value - // for Video codec (codec). Include one instance of (VideoDescription) per output. - VideoDescription *VideoDescription `locationName:"videoDescription" type:"structure"` -} - -// String returns the string representation -func (s Output) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Output) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Output) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Output"} - if s.NameModifier != nil && len(*s.NameModifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NameModifier", 1)) - } - if s.AudioDescriptions != nil { - for i, v := range s.AudioDescriptions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AudioDescriptions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.CaptionDescriptions != nil { - for i, v := range s.CaptionDescriptions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionDescriptions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ContainerSettings != nil { - if err := s.ContainerSettings.Validate(); err != nil { - invalidParams.AddNested("ContainerSettings", err.(request.ErrInvalidParams)) - } - } - if s.VideoDescription != nil { - if err := s.VideoDescription.Validate(); err != nil { - invalidParams.AddNested("VideoDescription", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioDescriptions sets the AudioDescriptions field's value. -func (s *Output) SetAudioDescriptions(v []*AudioDescription) *Output { - s.AudioDescriptions = v - return s -} - -// SetCaptionDescriptions sets the CaptionDescriptions field's value. -func (s *Output) SetCaptionDescriptions(v []*CaptionDescription) *Output { - s.CaptionDescriptions = v - return s -} - -// SetContainerSettings sets the ContainerSettings field's value. -func (s *Output) SetContainerSettings(v *ContainerSettings) *Output { - s.ContainerSettings = v - return s -} - -// SetExtension sets the Extension field's value. -func (s *Output) SetExtension(v string) *Output { - s.Extension = &v - return s -} - -// SetNameModifier sets the NameModifier field's value. -func (s *Output) SetNameModifier(v string) *Output { - s.NameModifier = &v - return s -} - -// SetOutputSettings sets the OutputSettings field's value. -func (s *Output) SetOutputSettings(v *OutputSettings) *Output { - s.OutputSettings = v - return s -} - -// SetPreset sets the Preset field's value. -func (s *Output) SetPreset(v string) *Output { - s.Preset = &v - return s -} - -// SetVideoDescription sets the VideoDescription field's value. -func (s *Output) SetVideoDescription(v *VideoDescription) *Output { - s.VideoDescription = v - return s -} - -// OutputChannel mapping settings. -type OutputChannelMapping struct { - _ struct{} `type:"structure"` - - // List of input channels - InputChannels []*int64 `locationName:"inputChannels" type:"list"` -} - -// String returns the string representation -func (s OutputChannelMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputChannelMapping) GoString() string { - return s.String() -} - -// SetInputChannels sets the InputChannels field's value. -func (s *OutputChannelMapping) SetInputChannels(v []*int64) *OutputChannelMapping { - s.InputChannels = v - return s -} - -// Details regarding output -type OutputDetail struct { - _ struct{} `type:"structure"` - - // Duration in milliseconds - DurationInMs *int64 `locationName:"durationInMs" type:"integer"` - - // Contains details about the output's video stream - VideoDetails *VideoDetail `locationName:"videoDetails" type:"structure"` -} - -// String returns the string representation -func (s OutputDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputDetail) GoString() string { - return s.String() -} - -// SetDurationInMs sets the DurationInMs field's value. -func (s *OutputDetail) SetDurationInMs(v int64) *OutputDetail { - s.DurationInMs = &v - return s -} - -// SetVideoDetails sets the VideoDetails field's value. -func (s *OutputDetail) SetVideoDetails(v *VideoDetail) *OutputDetail { - s.VideoDetails = v - return s -} - -// Group of outputs -type OutputGroup struct { - _ struct{} `type:"structure"` - - // Use Custom Group Name (CustomName) to specify a name for the output group. - // This value is displayed on the console and can make your job settings JSON - // more human-readable. It does not affect your outputs. Use up to twelve characters - // that are either letters, numbers, spaces, or underscores. - CustomName *string `locationName:"customName" type:"string"` - - // Name of the output group - Name *string `locationName:"name" type:"string"` - - // Output Group settings, including type - OutputGroupSettings *OutputGroupSettings `locationName:"outputGroupSettings" type:"structure"` - - // This object holds groups of encoding settings, one group of settings per - // output. - Outputs []*Output `locationName:"outputs" type:"list"` -} - -// String returns the string representation -func (s OutputGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputGroup) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OutputGroup) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OutputGroup"} - if s.OutputGroupSettings != nil { - if err := s.OutputGroupSettings.Validate(); err != nil { - invalidParams.AddNested("OutputGroupSettings", err.(request.ErrInvalidParams)) - } - } - if s.Outputs != nil { - for i, v := range s.Outputs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Outputs", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomName sets the CustomName field's value. -func (s *OutputGroup) SetCustomName(v string) *OutputGroup { - s.CustomName = &v - return s -} - -// SetName sets the Name field's value. -func (s *OutputGroup) SetName(v string) *OutputGroup { - s.Name = &v - return s -} - -// SetOutputGroupSettings sets the OutputGroupSettings field's value. -func (s *OutputGroup) SetOutputGroupSettings(v *OutputGroupSettings) *OutputGroup { - s.OutputGroupSettings = v - return s -} - -// SetOutputs sets the Outputs field's value. -func (s *OutputGroup) SetOutputs(v []*Output) *OutputGroup { - s.Outputs = v - return s -} - -// Contains details about the output groups specified in the job settings. -type OutputGroupDetail struct { - _ struct{} `type:"structure"` - - // Details about the output - OutputDetails []*OutputDetail `locationName:"outputDetails" type:"list"` -} - -// String returns the string representation -func (s OutputGroupDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputGroupDetail) GoString() string { - return s.String() -} - -// SetOutputDetails sets the OutputDetails field's value. -func (s *OutputGroupDetail) SetOutputDetails(v []*OutputDetail) *OutputGroupDetail { - s.OutputDetails = v - return s -} - -// Output Group settings, including type -type OutputGroupSettings struct { - _ struct{} `type:"structure"` - - // Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to - // CMAF_GROUP_SETTINGS. Each output in a CMAF Output Group may only contain - // a single video, audio, or caption output. - CmafGroupSettings *CmafGroupSettings `locationName:"cmafGroupSettings" type:"structure"` - - // Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to - // DASH_ISO_GROUP_SETTINGS. - DashIsoGroupSettings *DashIsoGroupSettings `locationName:"dashIsoGroupSettings" type:"structure"` - - // Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to - // FILE_GROUP_SETTINGS. - FileGroupSettings *FileGroupSettings `locationName:"fileGroupSettings" type:"structure"` - - // Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to - // HLS_GROUP_SETTINGS. - HlsGroupSettings *HlsGroupSettings `locationName:"hlsGroupSettings" type:"structure"` - - // Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to - // MS_SMOOTH_GROUP_SETTINGS. - MsSmoothGroupSettings *MsSmoothGroupSettings `locationName:"msSmoothGroupSettings" type:"structure"` - - // Type of output group (File group, Apple HLS, DASH ISO, Microsoft Smooth Streaming, - // CMAF) - Type *string `locationName:"type" type:"string" enum:"OutputGroupType"` -} - -// String returns the string representation -func (s OutputGroupSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputGroupSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OutputGroupSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OutputGroupSettings"} - if s.CmafGroupSettings != nil { - if err := s.CmafGroupSettings.Validate(); err != nil { - invalidParams.AddNested("CmafGroupSettings", err.(request.ErrInvalidParams)) - } - } - if s.DashIsoGroupSettings != nil { - if err := s.DashIsoGroupSettings.Validate(); err != nil { - invalidParams.AddNested("DashIsoGroupSettings", err.(request.ErrInvalidParams)) - } - } - if s.HlsGroupSettings != nil { - if err := s.HlsGroupSettings.Validate(); err != nil { - invalidParams.AddNested("HlsGroupSettings", err.(request.ErrInvalidParams)) - } - } - if s.MsSmoothGroupSettings != nil { - if err := s.MsSmoothGroupSettings.Validate(); err != nil { - invalidParams.AddNested("MsSmoothGroupSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCmafGroupSettings sets the CmafGroupSettings field's value. -func (s *OutputGroupSettings) SetCmafGroupSettings(v *CmafGroupSettings) *OutputGroupSettings { - s.CmafGroupSettings = v - return s -} - -// SetDashIsoGroupSettings sets the DashIsoGroupSettings field's value. -func (s *OutputGroupSettings) SetDashIsoGroupSettings(v *DashIsoGroupSettings) *OutputGroupSettings { - s.DashIsoGroupSettings = v - return s -} - -// SetFileGroupSettings sets the FileGroupSettings field's value. -func (s *OutputGroupSettings) SetFileGroupSettings(v *FileGroupSettings) *OutputGroupSettings { - s.FileGroupSettings = v - return s -} - -// SetHlsGroupSettings sets the HlsGroupSettings field's value. -func (s *OutputGroupSettings) SetHlsGroupSettings(v *HlsGroupSettings) *OutputGroupSettings { - s.HlsGroupSettings = v - return s -} - -// SetMsSmoothGroupSettings sets the MsSmoothGroupSettings field's value. -func (s *OutputGroupSettings) SetMsSmoothGroupSettings(v *MsSmoothGroupSettings) *OutputGroupSettings { - s.MsSmoothGroupSettings = v - return s -} - -// SetType sets the Type field's value. -func (s *OutputGroupSettings) SetType(v string) *OutputGroupSettings { - s.Type = &v - return s -} - -// Specific settings for this type of output. -type OutputSettings struct { - _ struct{} `type:"structure"` - - // Settings for HLS output groups - HlsSettings *HlsSettings `locationName:"hlsSettings" type:"structure"` -} - -// String returns the string representation -func (s OutputSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputSettings) GoString() string { - return s.String() -} - -// SetHlsSettings sets the HlsSettings field's value. -func (s *OutputSettings) SetHlsSettings(v *HlsSettings) *OutputSettings { - s.HlsSettings = v - return s -} - -// A preset is a collection of preconfigured media conversion settings that -// you want MediaConvert to apply to the output during the conversion process. -type Preset struct { - _ struct{} `type:"structure"` - - // An identifier for this resource that is unique within all of AWS. - Arn *string `locationName:"arn" type:"string"` - - // An optional category you create to organize your presets. - Category *string `locationName:"category" type:"string"` - - // The timestamp in epoch seconds for preset creation. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unixTimestamp"` - - // An optional description you create for each preset. - Description *string `locationName:"description" type:"string"` - - // The timestamp in epoch seconds when the preset was last updated. - LastUpdated *time.Time `locationName:"lastUpdated" type:"timestamp" timestampFormat:"unixTimestamp"` - - // A name you create for each preset. Each name must be unique within your account. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // Settings for preset - // - // Settings is a required field - Settings *PresetSettings `locationName:"settings" type:"structure" required:"true"` - - // A preset can be of two types: system or custom. System or built-in preset - // can't be modified or deleted by the user. - Type *string `locationName:"type" type:"string" enum:"Type"` -} - -// String returns the string representation -func (s Preset) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Preset) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Preset) SetArn(v string) *Preset { - s.Arn = &v - return s -} - -// SetCategory sets the Category field's value. -func (s *Preset) SetCategory(v string) *Preset { - s.Category = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Preset) SetCreatedAt(v time.Time) *Preset { - s.CreatedAt = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Preset) SetDescription(v string) *Preset { - s.Description = &v - return s -} - -// SetLastUpdated sets the LastUpdated field's value. -func (s *Preset) SetLastUpdated(v time.Time) *Preset { - s.LastUpdated = &v - return s -} - -// SetName sets the Name field's value. -func (s *Preset) SetName(v string) *Preset { - s.Name = &v - return s -} - -// SetSettings sets the Settings field's value. -func (s *Preset) SetSettings(v *PresetSettings) *Preset { - s.Settings = v - return s -} - -// SetType sets the Type field's value. -func (s *Preset) SetType(v string) *Preset { - s.Type = &v - return s -} - -// Settings for preset -type PresetSettings struct { - _ struct{} `type:"structure"` - - // (AudioDescriptions) contains groups of audio encoding settings organized - // by audio codec. Include one instance of (AudioDescriptions) per output. (AudioDescriptions) - // can contain multiple groups of encoding settings. - AudioDescriptions []*AudioDescription `locationName:"audioDescriptions" type:"list"` - - // Caption settings for this preset. There can be multiple caption settings - // in a single output. - CaptionDescriptions []*CaptionDescriptionPreset `locationName:"captionDescriptions" type:"list"` - - // Container specific settings. - ContainerSettings *ContainerSettings `locationName:"containerSettings" type:"structure"` - - // (VideoDescription) contains a group of video encoding settings. The specific - // video settings depend on the video codec you choose when you specify a value - // for Video codec (codec). Include one instance of (VideoDescription) per output. - VideoDescription *VideoDescription `locationName:"videoDescription" type:"structure"` -} - -// String returns the string representation -func (s PresetSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PresetSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PresetSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PresetSettings"} - if s.AudioDescriptions != nil { - for i, v := range s.AudioDescriptions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AudioDescriptions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.CaptionDescriptions != nil { - for i, v := range s.CaptionDescriptions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionDescriptions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ContainerSettings != nil { - if err := s.ContainerSettings.Validate(); err != nil { - invalidParams.AddNested("ContainerSettings", err.(request.ErrInvalidParams)) - } - } - if s.VideoDescription != nil { - if err := s.VideoDescription.Validate(); err != nil { - invalidParams.AddNested("VideoDescription", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioDescriptions sets the AudioDescriptions field's value. -func (s *PresetSettings) SetAudioDescriptions(v []*AudioDescription) *PresetSettings { - s.AudioDescriptions = v - return s -} - -// SetCaptionDescriptions sets the CaptionDescriptions field's value. -func (s *PresetSettings) SetCaptionDescriptions(v []*CaptionDescriptionPreset) *PresetSettings { - s.CaptionDescriptions = v - return s -} - -// SetContainerSettings sets the ContainerSettings field's value. -func (s *PresetSettings) SetContainerSettings(v *ContainerSettings) *PresetSettings { - s.ContainerSettings = v - return s -} - -// SetVideoDescription sets the VideoDescription field's value. -func (s *PresetSettings) SetVideoDescription(v *VideoDescription) *PresetSettings { - s.VideoDescription = v - return s -} - -// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to -// the value PRORES. -type ProresSettings struct { - _ struct{} `type:"structure"` - - // Use Profile (ProResCodecProfile) to specifiy the type of Apple ProRes codec - // to use for this output. - CodecProfile *string `locationName:"codecProfile" type:"string" enum:"ProresCodecProfile"` - - // If you are using the console, use the Framerate setting to specify the frame - // rate for this output. If you want to keep the same frame rate as the input - // video, choose Follow source. If you want to do frame rate conversion, choose - // a frame rate from the dropdown list or choose Custom. The framerates shown - // in the dropdown list are decimal approximations of fractions. If you choose - // Custom, specify your frame rate as a fraction. If you are creating your transcoding - // job sepecification as a JSON file without the console, use FramerateControl - // to specify which value the service uses for the frame rate for this output. - // Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate - // from the input. Choose SPECIFIED if you want the service to use the frame - // rate you specify in the settings FramerateNumerator and FramerateDenominator. - FramerateControl *string `locationName:"framerateControl" type:"string" enum:"ProresFramerateControl"` - - // When set to INTERPOLATE, produces smoother motion during frame rate conversion. - FramerateConversionAlgorithm *string `locationName:"framerateConversionAlgorithm" type:"string" enum:"ProresFramerateConversionAlgorithm"` - - // Frame rate denominator. - FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` - - // When you use the API for transcode jobs that use frame rate conversion, specify - // the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use - // FramerateNumerator to specify the numerator of this fraction. In this example, - // use 24000 for the value of FramerateNumerator. - FramerateNumerator *int64 `locationName:"framerateNumerator" min:"1" type:"integer"` - - // Use Interlace mode (InterlaceMode) to choose the scan line type for the output. - // * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce - // interlaced output with the entire output having the same field polarity (top - // or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default - // Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, - // behavior depends on the input scan type. - If the source is interlaced, the - // output will be interlaced with the same polarity as the source (it will follow - // the source). The output could therefore be a mix of "top field first" and - // "bottom field first". - If the source is progressive, the output will be - // interlaced with "top field first" or "bottom field first" polarity, depending - // on which of the Follow options you chose. - InterlaceMode *string `locationName:"interlaceMode" type:"string" enum:"ProresInterlaceMode"` - - // Use (ProresParControl) to specify how the service determines the pixel aspect - // ratio. Set to Follow source (INITIALIZE_FROM_SOURCE) to use the pixel aspect - // ratio from the input. To specify a different pixel aspect ratio: Using the - // console, choose it from the dropdown menu. Using the API, set ProresParControl - // to (SPECIFIED) and provide for (ParNumerator) and (ParDenominator). - ParControl *string `locationName:"parControl" type:"string" enum:"ProresParControl"` - - // Pixel Aspect Ratio denominator. - ParDenominator *int64 `locationName:"parDenominator" min:"1" type:"integer"` - - // Pixel Aspect Ratio numerator. - ParNumerator *int64 `locationName:"parNumerator" min:"1" type:"integer"` - - // Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled - // as 25fps, and audio is sped up correspondingly. - SlowPal *string `locationName:"slowPal" type:"string" enum:"ProresSlowPal"` - - // Only use Telecine (ProresTelecine) when you set Framerate (Framerate) to - // 29.970. Set Telecine (ProresTelecine) to Hard (hard) to produce a 29.97i - // output from a 23.976 input. Set it to Soft (soft) to produce 23.976 output - // and leave converstion to the player. - Telecine *string `locationName:"telecine" type:"string" enum:"ProresTelecine"` -} - -// String returns the string representation -func (s ProresSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProresSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProresSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProresSettings"} - if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { - invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) - } - if s.FramerateNumerator != nil && *s.FramerateNumerator < 1 { - invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 1)) - } - if s.ParDenominator != nil && *s.ParDenominator < 1 { - invalidParams.Add(request.NewErrParamMinValue("ParDenominator", 1)) - } - if s.ParNumerator != nil && *s.ParNumerator < 1 { - invalidParams.Add(request.NewErrParamMinValue("ParNumerator", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCodecProfile sets the CodecProfile field's value. -func (s *ProresSettings) SetCodecProfile(v string) *ProresSettings { - s.CodecProfile = &v - return s -} - -// SetFramerateControl sets the FramerateControl field's value. -func (s *ProresSettings) SetFramerateControl(v string) *ProresSettings { - s.FramerateControl = &v - return s -} - -// SetFramerateConversionAlgorithm sets the FramerateConversionAlgorithm field's value. -func (s *ProresSettings) SetFramerateConversionAlgorithm(v string) *ProresSettings { - s.FramerateConversionAlgorithm = &v - return s -} - -// SetFramerateDenominator sets the FramerateDenominator field's value. -func (s *ProresSettings) SetFramerateDenominator(v int64) *ProresSettings { - s.FramerateDenominator = &v - return s -} - -// SetFramerateNumerator sets the FramerateNumerator field's value. -func (s *ProresSettings) SetFramerateNumerator(v int64) *ProresSettings { - s.FramerateNumerator = &v - return s -} - -// SetInterlaceMode sets the InterlaceMode field's value. -func (s *ProresSettings) SetInterlaceMode(v string) *ProresSettings { - s.InterlaceMode = &v - return s -} - -// SetParControl sets the ParControl field's value. -func (s *ProresSettings) SetParControl(v string) *ProresSettings { - s.ParControl = &v - return s -} - -// SetParDenominator sets the ParDenominator field's value. -func (s *ProresSettings) SetParDenominator(v int64) *ProresSettings { - s.ParDenominator = &v - return s -} - -// SetParNumerator sets the ParNumerator field's value. -func (s *ProresSettings) SetParNumerator(v int64) *ProresSettings { - s.ParNumerator = &v - return s -} - -// SetSlowPal sets the SlowPal field's value. -func (s *ProresSettings) SetSlowPal(v string) *ProresSettings { - s.SlowPal = &v - return s -} - -// SetTelecine sets the Telecine field's value. -func (s *ProresSettings) SetTelecine(v string) *ProresSettings { - s.Telecine = &v - return s -} - -// You can use queues to manage the resources that are available to your AWS -// account for running multiple transcoding jobs at the same time. If you don't -// specify a queue, the service sends all jobs through the default queue. For -// more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-queues.html. -type Queue struct { - _ struct{} `type:"structure"` - - // An identifier for this resource that is unique within all of AWS. - Arn *string `locationName:"arn" type:"string"` - - // The timestamp in epoch seconds for when you created the queue. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unixTimestamp"` - - // An optional description that you create for each queue. - Description *string `locationName:"description" type:"string"` - - // The timestamp in epoch seconds for when you most recently updated the queue. - LastUpdated *time.Time `locationName:"lastUpdated" type:"timestamp" timestampFormat:"unixTimestamp"` - - // A name that you create for each queue. Each name must be unique within your - // account. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // Specifies whether the pricing plan for the queue is on-demand or reserved. - // For on-demand, you pay per minute, billed in increments of .01 minute. For - // reserved, you pay for the transcoding capacity of the entire queue, regardless - // of how much or how little you use it. Reserved pricing requires a 12-month - // commitment. - PricingPlan *string `locationName:"pricingPlan" type:"string" enum:"PricingPlan"` - - // The estimated number of jobs with a PROGRESSING status. - ProgressingJobsCount *int64 `locationName:"progressingJobsCount" type:"integer"` - - // Details about the pricing plan for your reserved queue. Required for reserved - // queues and not applicable to on-demand queues. - ReservationPlan *ReservationPlan `locationName:"reservationPlan" type:"structure"` - - // Queues can be ACTIVE or PAUSED. If you pause a queue, the service won't begin - // processing jobs in that queue. Jobs that are running when you pause the queue - // continue to run until they finish or result in an error. - Status *string `locationName:"status" type:"string" enum:"QueueStatus"` - - // The estimated number of jobs with a SUBMITTED status. - SubmittedJobsCount *int64 `locationName:"submittedJobsCount" type:"integer"` - - // Specifies whether this on-demand queue is system or custom. System queues - // are built in. You can't modify or delete system queues. You can create and - // modify custom queues. - Type *string `locationName:"type" type:"string" enum:"Type"` -} - -// String returns the string representation -func (s Queue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Queue) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Queue) SetArn(v string) *Queue { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Queue) SetCreatedAt(v time.Time) *Queue { - s.CreatedAt = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Queue) SetDescription(v string) *Queue { - s.Description = &v - return s -} - -// SetLastUpdated sets the LastUpdated field's value. -func (s *Queue) SetLastUpdated(v time.Time) *Queue { - s.LastUpdated = &v - return s -} - -// SetName sets the Name field's value. -func (s *Queue) SetName(v string) *Queue { - s.Name = &v - return s -} - -// SetPricingPlan sets the PricingPlan field's value. -func (s *Queue) SetPricingPlan(v string) *Queue { - s.PricingPlan = &v - return s -} - -// SetProgressingJobsCount sets the ProgressingJobsCount field's value. -func (s *Queue) SetProgressingJobsCount(v int64) *Queue { - s.ProgressingJobsCount = &v - return s -} - -// SetReservationPlan sets the ReservationPlan field's value. -func (s *Queue) SetReservationPlan(v *ReservationPlan) *Queue { - s.ReservationPlan = v - return s -} - -// SetStatus sets the Status field's value. -func (s *Queue) SetStatus(v string) *Queue { - s.Status = &v - return s -} - -// SetSubmittedJobsCount sets the SubmittedJobsCount field's value. -func (s *Queue) SetSubmittedJobsCount(v int64) *Queue { - s.SubmittedJobsCount = &v - return s -} - -// SetType sets the Type field's value. -func (s *Queue) SetType(v string) *Queue { - s.Type = &v - return s -} - -// Use Rectangle to identify a specific area of the video frame. -type Rectangle struct { - _ struct{} `type:"structure"` - - // Height of rectangle in pixels. Specify only even numbers. - Height *int64 `locationName:"height" min:"2" type:"integer"` - - // Width of rectangle in pixels. Specify only even numbers. - Width *int64 `locationName:"width" min:"2" type:"integer"` - - // The distance, in pixels, between the rectangle and the left edge of the video - // frame. Specify only even numbers. - X *int64 `locationName:"x" type:"integer"` - - // The distance, in pixels, between the rectangle and the top edge of the video - // frame. Specify only even numbers. - Y *int64 `locationName:"y" type:"integer"` -} - -// String returns the string representation -func (s Rectangle) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Rectangle) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Rectangle) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Rectangle"} - if s.Height != nil && *s.Height < 2 { - invalidParams.Add(request.NewErrParamMinValue("Height", 2)) - } - if s.Width != nil && *s.Width < 2 { - invalidParams.Add(request.NewErrParamMinValue("Width", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHeight sets the Height field's value. -func (s *Rectangle) SetHeight(v int64) *Rectangle { - s.Height = &v - return s -} - -// SetWidth sets the Width field's value. -func (s *Rectangle) SetWidth(v int64) *Rectangle { - s.Width = &v - return s -} - -// SetX sets the X field's value. -func (s *Rectangle) SetX(v int64) *Rectangle { - s.X = &v - return s -} - -// SetY sets the Y field's value. -func (s *Rectangle) SetY(v int64) *Rectangle { - s.Y = &v - return s -} - -// Use Manual audio remixing (RemixSettings) to adjust audio levels for each -// audio channel in each output of your job. With audio remixing, you can output -// more or fewer audio channels than your input audio source provides. -type RemixSettings struct { - _ struct{} `type:"structure"` - - // Channel mapping (ChannelMapping) contains the group of fields that hold the - // remixing value for each channel. Units are in dB. Acceptable values are within - // the range from -60 (mute) through 6. A setting of 0 passes the input channel - // unchanged to the output channel (no attenuation or amplification). - ChannelMapping *ChannelMapping `locationName:"channelMapping" type:"structure"` - - // Specify the number of audio channels from your input that you want to use - // in your output. With remixing, you might combine or split the data in these - // channels, so the number of channels in your final output might be different. - ChannelsIn *int64 `locationName:"channelsIn" min:"1" type:"integer"` - - // Specify the number of channels in this output after remixing. Valid values: - // 1, 2, 4, 6, 8 - ChannelsOut *int64 `locationName:"channelsOut" min:"1" type:"integer"` -} - -// String returns the string representation -func (s RemixSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemixSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemixSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemixSettings"} - if s.ChannelsIn != nil && *s.ChannelsIn < 1 { - invalidParams.Add(request.NewErrParamMinValue("ChannelsIn", 1)) - } - if s.ChannelsOut != nil && *s.ChannelsOut < 1 { - invalidParams.Add(request.NewErrParamMinValue("ChannelsOut", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChannelMapping sets the ChannelMapping field's value. -func (s *RemixSettings) SetChannelMapping(v *ChannelMapping) *RemixSettings { - s.ChannelMapping = v - return s -} - -// SetChannelsIn sets the ChannelsIn field's value. -func (s *RemixSettings) SetChannelsIn(v int64) *RemixSettings { - s.ChannelsIn = &v - return s -} - -// SetChannelsOut sets the ChannelsOut field's value. -func (s *RemixSettings) SetChannelsOut(v int64) *RemixSettings { - s.ChannelsOut = &v - return s -} - -// Details about the pricing plan for your reserved queue. Required for reserved -// queues and not applicable to on-demand queues. -type ReservationPlan struct { - _ struct{} `type:"structure"` - - // The length of the term of your reserved queue pricing plan commitment. - Commitment *string `locationName:"commitment" type:"string" enum:"Commitment"` - - // The timestamp in epoch seconds for when the current pricing plan term for - // this reserved queue expires. - ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp" timestampFormat:"unixTimestamp"` - - // The timestamp in epoch seconds for when you set up the current pricing plan - // for this reserved queue. - PurchasedAt *time.Time `locationName:"purchasedAt" type:"timestamp" timestampFormat:"unixTimestamp"` - - // Specifies whether the term of your reserved queue pricing plan is automatically - // extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term. - RenewalType *string `locationName:"renewalType" type:"string" enum:"RenewalType"` - - // Specifies the number of reserved transcode slots (RTS) for this queue. The - // number of RTS determines how many jobs the queue can process in parallel; - // each RTS can process one job at a time. When you increase this number, you - // extend your existing commitment with a new 12-month commitment for a larger - // number of RTS. The new commitment begins when you purchase the additional - // capacity. You can't decrease the number of RTS in your reserved queue. - ReservedSlots *int64 `locationName:"reservedSlots" type:"integer"` - - // Specifies whether the pricing plan for your reserved queue is ACTIVE or EXPIRED. - Status *string `locationName:"status" type:"string" enum:"ReservationPlanStatus"` -} - -// String returns the string representation -func (s ReservationPlan) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservationPlan) GoString() string { - return s.String() -} - -// SetCommitment sets the Commitment field's value. -func (s *ReservationPlan) SetCommitment(v string) *ReservationPlan { - s.Commitment = &v - return s -} - -// SetExpiresAt sets the ExpiresAt field's value. -func (s *ReservationPlan) SetExpiresAt(v time.Time) *ReservationPlan { - s.ExpiresAt = &v - return s -} - -// SetPurchasedAt sets the PurchasedAt field's value. -func (s *ReservationPlan) SetPurchasedAt(v time.Time) *ReservationPlan { - s.PurchasedAt = &v - return s -} - -// SetRenewalType sets the RenewalType field's value. -func (s *ReservationPlan) SetRenewalType(v string) *ReservationPlan { - s.RenewalType = &v - return s -} - -// SetReservedSlots sets the ReservedSlots field's value. -func (s *ReservationPlan) SetReservedSlots(v int64) *ReservationPlan { - s.ReservedSlots = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ReservationPlan) SetStatus(v string) *ReservationPlan { - s.Status = &v - return s -} - -// Details about the pricing plan for your reserved queue. Required for reserved -// queues and not applicable to on-demand queues. -type ReservationPlanSettings struct { - _ struct{} `type:"structure"` - - // The length of the term of your reserved queue pricing plan commitment. - // - // Commitment is a required field - Commitment *string `locationName:"commitment" type:"string" required:"true" enum:"Commitment"` - - // Specifies whether the term of your reserved queue pricing plan is automatically - // extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term. When your - // term is auto renewed, you extend your commitment by 12 months from the auto - // renew date. You can cancel this commitment. - // - // RenewalType is a required field - RenewalType *string `locationName:"renewalType" type:"string" required:"true" enum:"RenewalType"` - - // Specifies the number of reserved transcode slots (RTS) for this queue. The - // number of RTS determines how many jobs the queue can process in parallel; - // each RTS can process one job at a time. You can't decrease the number of - // RTS in your reserved queue. You can increase the number of RTS by extending - // your existing commitment with a new 12-month commitment for the larger number. - // The new commitment begins when you purchase the additional capacity. You - // can't cancel your commitment or revert to your original commitment after - // you increase the capacity. - // - // ReservedSlots is a required field - ReservedSlots *int64 `locationName:"reservedSlots" type:"integer" required:"true"` -} - -// String returns the string representation -func (s ReservationPlanSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservationPlanSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReservationPlanSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReservationPlanSettings"} - if s.Commitment == nil { - invalidParams.Add(request.NewErrParamRequired("Commitment")) - } - if s.RenewalType == nil { - invalidParams.Add(request.NewErrParamRequired("RenewalType")) - } - if s.ReservedSlots == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedSlots")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCommitment sets the Commitment field's value. -func (s *ReservationPlanSettings) SetCommitment(v string) *ReservationPlanSettings { - s.Commitment = &v - return s -} - -// SetRenewalType sets the RenewalType field's value. -func (s *ReservationPlanSettings) SetRenewalType(v string) *ReservationPlanSettings { - s.RenewalType = &v - return s -} - -// SetReservedSlots sets the ReservedSlots field's value. -func (s *ReservationPlanSettings) SetReservedSlots(v int64) *ReservationPlanSettings { - s.ReservedSlots = &v - return s -} - -// The Amazon Resource Name (ARN) and tags for an AWS Elemental MediaConvert -// resource. -type ResourceTags struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource. - Arn *string `locationName:"arn" type:"string"` - - // The tags for the resource. - Tags map[string]*string `locationName:"tags" type:"map"` -} - -// String returns the string representation -func (s ResourceTags) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceTags) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ResourceTags) SetArn(v string) *ResourceTags { - s.Arn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ResourceTags) SetTags(v map[string]*string) *ResourceTags { - s.Tags = v - return s -} - -// Settings for SCC caption output. -type SccDestinationSettings struct { - _ struct{} `type:"structure"` - - // Set Framerate (SccDestinationFramerate) to make sure that the captions and - // the video are synchronized in the output. Specify a frame rate that matches - // the frame rate of the associated video. If the video frame rate is 29.97, - // choose 29.97 dropframe (FRAMERATE_29_97_DROPFRAME) only if the video has - // video_insertion=true and drop_frame_timecode=true; otherwise, choose 29.97 - // non-dropframe (FRAMERATE_29_97_NON_DROPFRAME). - Framerate *string `locationName:"framerate" type:"string" enum:"SccDestinationFramerate"` -} - -// String returns the string representation -func (s SccDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SccDestinationSettings) GoString() string { - return s.String() -} - -// SetFramerate sets the Framerate field's value. -func (s *SccDestinationSettings) SetFramerate(v string) *SccDestinationSettings { - s.Framerate = &v - return s -} - -// Settings for use with a SPEKE key provider -type SpekeKeyProvider struct { - _ struct{} `type:"structure"` - - // Optional AWS Certificate Manager ARN for a certificate to send to the keyprovider. - // The certificate holds a key used by the keyprovider to encrypt the keys in - // its response. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // The SPEKE-compliant server uses Resource ID (ResourceId) to identify content. - ResourceId *string `locationName:"resourceId" type:"string"` - - // Relates to SPEKE implementation. DRM system identifiers. DASH output groups - // support a max of two system ids. Other group types support one system id. - SystemIds []*string `locationName:"systemIds" type:"list"` - - // Use URL (Url) to specify the SPEKE-compliant server that will provide keys - // for content. - Url *string `locationName:"url" type:"string"` -} - -// String returns the string representation -func (s SpekeKeyProvider) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpekeKeyProvider) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *SpekeKeyProvider) SetCertificateArn(v string) *SpekeKeyProvider { - s.CertificateArn = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *SpekeKeyProvider) SetResourceId(v string) *SpekeKeyProvider { - s.ResourceId = &v - return s -} - -// SetSystemIds sets the SystemIds field's value. -func (s *SpekeKeyProvider) SetSystemIds(v []*string) *SpekeKeyProvider { - s.SystemIds = v - return s -} - -// SetUrl sets the Url field's value. -func (s *SpekeKeyProvider) SetUrl(v string) *SpekeKeyProvider { - s.Url = &v - return s -} - -// Use these settings to set up encryption with a static key provider. -type StaticKeyProvider struct { - _ struct{} `type:"structure"` - - // Relates to DRM implementation. Sets the value of the KEYFORMAT attribute. - // Must be 'identity' or a reverse DNS string. May be omitted to indicate an - // implicit value of 'identity'. - KeyFormat *string `locationName:"keyFormat" type:"string"` - - // Relates to DRM implementation. Either a single positive integer version value - // or a slash delimited list of version values (1/2/3). - KeyFormatVersions *string `locationName:"keyFormatVersions" type:"string"` - - // Relates to DRM implementation. Use a 32-character hexidecimal string to specify - // Key Value (StaticKeyValue). - StaticKeyValue *string `locationName:"staticKeyValue" type:"string"` - - // Relates to DRM implementation. The location of the license server used for - // protecting content. - Url *string `locationName:"url" type:"string"` -} - -// String returns the string representation -func (s StaticKeyProvider) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StaticKeyProvider) GoString() string { - return s.String() -} - -// SetKeyFormat sets the KeyFormat field's value. -func (s *StaticKeyProvider) SetKeyFormat(v string) *StaticKeyProvider { - s.KeyFormat = &v - return s -} - -// SetKeyFormatVersions sets the KeyFormatVersions field's value. -func (s *StaticKeyProvider) SetKeyFormatVersions(v string) *StaticKeyProvider { - s.KeyFormatVersions = &v - return s -} - -// SetStaticKeyValue sets the StaticKeyValue field's value. -func (s *StaticKeyProvider) SetStaticKeyValue(v string) *StaticKeyProvider { - s.StaticKeyValue = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *StaticKeyProvider) SetUrl(v string) *StaticKeyProvider { - s.Url = &v - return s -} - -// To add tags to a queue, preset, or job template, send a request with the -// Amazon Resource Name (ARN) of the resource and the tags that you want to -// add. -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource that you want to tag. To get - // the ARN, send a GET request with the resource name. - // - // Arn is a required field - Arn *string `locationName:"arn" type:"string" required:"true"` - - // The tags that you want to add to the resource. You can tag resources with - // a key-value pair or with only a key. - // - // Tags is a required field - Tags map[string]*string `locationName:"tags" type:"map" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *TagResourceInput) SetArn(v string) *TagResourceInput { - s.Arn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { - s.Tags = v - return s -} - -// A successful request to add tags to a resource returns an OK message. -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -// Settings for Teletext caption output -type TeletextDestinationSettings struct { - _ struct{} `type:"structure"` - - // Set pageNumber to the Teletext page number for the destination captions for - // this output. This value must be a three-digit hexadecimal string; strings - // ending in -FF are invalid. If you are passing through the entire set of Teletext - // data, do not use this field. - PageNumber *string `locationName:"pageNumber" min:"3" type:"string"` -} - -// String returns the string representation -func (s TeletextDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TeletextDestinationSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TeletextDestinationSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TeletextDestinationSettings"} - if s.PageNumber != nil && len(*s.PageNumber) < 3 { - invalidParams.Add(request.NewErrParamMinLen("PageNumber", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPageNumber sets the PageNumber field's value. -func (s *TeletextDestinationSettings) SetPageNumber(v string) *TeletextDestinationSettings { - s.PageNumber = &v - return s -} - -// Settings specific to Teletext caption sources, including Page number. -type TeletextSourceSettings struct { - _ struct{} `type:"structure"` - - // Use Page Number (PageNumber) to specify the three-digit hexadecimal page - // number that will be used for Teletext captions. Do not use this setting if - // you are passing through teletext from the input source to output. - PageNumber *string `locationName:"pageNumber" min:"3" type:"string"` -} - -// String returns the string representation -func (s TeletextSourceSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TeletextSourceSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TeletextSourceSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TeletextSourceSettings"} - if s.PageNumber != nil && len(*s.PageNumber) < 3 { - invalidParams.Add(request.NewErrParamMinLen("PageNumber", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPageNumber sets the PageNumber field's value. -func (s *TeletextSourceSettings) SetPageNumber(v string) *TeletextSourceSettings { - s.PageNumber = &v - return s -} - -// Timecode burn-in (TimecodeBurnIn)--Burns the output timecode and specified -// prefix into the output. -type TimecodeBurnin struct { - _ struct{} `type:"structure"` - - // Use Font Size (FontSize) to set the font size of any burned-in timecode. - // Valid values are 10, 16, 32, 48. - FontSize *int64 `locationName:"fontSize" min:"10" type:"integer"` - - // Use Position (Position) under under Timecode burn-in (TimecodeBurnIn) to - // specify the location the burned-in timecode on output video. - Position *string `locationName:"position" type:"string" enum:"TimecodeBurninPosition"` - - // Use Prefix (Prefix) to place ASCII characters before any burned-in timecode. - // For example, a prefix of "EZ-" will result in the timecode "EZ-00:00:00:00". - // Provide either the characters themselves or the ASCII code equivalents. The - // supported range of characters is 0x20 through 0x7e. This includes letters, - // numbers, and all special characters represented on a standard English keyboard. - Prefix *string `locationName:"prefix" type:"string"` -} - -// String returns the string representation -func (s TimecodeBurnin) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimecodeBurnin) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TimecodeBurnin) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TimecodeBurnin"} - if s.FontSize != nil && *s.FontSize < 10 { - invalidParams.Add(request.NewErrParamMinValue("FontSize", 10)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFontSize sets the FontSize field's value. -func (s *TimecodeBurnin) SetFontSize(v int64) *TimecodeBurnin { - s.FontSize = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *TimecodeBurnin) SetPosition(v string) *TimecodeBurnin { - s.Position = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *TimecodeBurnin) SetPrefix(v string) *TimecodeBurnin { - s.Prefix = &v - return s -} - -// These settings control how the service handles timecodes throughout the job. -// These settings don't affect input clipping. -type TimecodeConfig struct { - _ struct{} `type:"structure"` - - // If you use an editing platform that relies on an anchor timecode, use Anchor - // Timecode (Anchor) to specify a timecode that will match the input video frame - // to the output video frame. Use 24-hour format with frame number, (HH:MM:SS:FF) - // or (HH:MM:SS;FF). This setting ignores frame rate conversion. System behavior - // for Anchor Timecode varies depending on your setting for Source (TimecodeSource). - // * If Source (TimecodeSource) is set to Specified Start (SPECIFIEDSTART), - // the first input frame is the specified value in Start Timecode (Start). Anchor - // Timecode (Anchor) and Start Timecode (Start) are used calculate output timecode. - // * If Source (TimecodeSource) is set to Start at 0 (ZEROBASED) the first frame - // is 00:00:00:00. * If Source (TimecodeSource) is set to Embedded (EMBEDDED), - // the first frame is the timecode value on the first input frame of the input. - Anchor *string `locationName:"anchor" type:"string"` - - // Use Source (TimecodeSource) to set how timecodes are handled within this - // job. To make sure that your video, audio, captions, and markers are synchronized - // and that time-based features, such as image inserter, work correctly, choose - // the Timecode source option that matches your assets. All timecodes are in - // a 24-hour format with frame number (HH:MM:SS:FF). * Embedded (EMBEDDED) - - // Use the timecode that is in the input video. If no embedded timecode is in - // the source, the service will use Start at 0 (ZEROBASED) instead. * Start - // at 0 (ZEROBASED) - Set the timecode of the initial frame to 00:00:00:00. - // * Specified Start (SPECIFIEDSTART) - Set the timecode of the initial frame - // to a value other than zero. You use Start timecode (Start) to provide this - // value. - Source *string `locationName:"source" type:"string" enum:"TimecodeSource"` - - // Only use when you set Source (TimecodeSource) to Specified start (SPECIFIEDSTART). - // Use Start timecode (Start) to specify the timecode for the initial frame. - // Use 24-hour format with frame number, (HH:MM:SS:FF) or (HH:MM:SS;FF). - Start *string `locationName:"start" type:"string"` - - // Only applies to outputs that support program-date-time stamp. Use Timestamp - // offset (TimestampOffset) to overwrite the timecode date without affecting - // the time and frame number. Provide the new date as a string in the format - // "yyyy-mm-dd". To use Time stamp offset, you must also enable Insert program-date-time - // (InsertProgramDateTime) in the output settings. For example, if the date - // part of your timecodes is 2002-1-25 and you want to change it to one year - // later, set Timestamp offset (TimestampOffset) to 2003-1-25. - TimestampOffset *string `locationName:"timestampOffset" type:"string"` -} - -// String returns the string representation -func (s TimecodeConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimecodeConfig) GoString() string { - return s.String() -} - -// SetAnchor sets the Anchor field's value. -func (s *TimecodeConfig) SetAnchor(v string) *TimecodeConfig { - s.Anchor = &v - return s -} - -// SetSource sets the Source field's value. -func (s *TimecodeConfig) SetSource(v string) *TimecodeConfig { - s.Source = &v - return s -} - -// SetStart sets the Start field's value. -func (s *TimecodeConfig) SetStart(v string) *TimecodeConfig { - s.Start = &v - return s -} - -// SetTimestampOffset sets the TimestampOffset field's value. -func (s *TimecodeConfig) SetTimestampOffset(v string) *TimecodeConfig { - s.TimestampOffset = &v - return s -} - -// Enable Timed metadata insertion (TimedMetadataInsertion) to include ID3 tags -// in your job. To include timed metadata, you must enable it here, enable it -// in each output container, and specify tags and timecodes in ID3 insertion -// (Id3Insertion) objects. -type TimedMetadataInsertion struct { - _ struct{} `type:"structure"` - - // Id3Insertions contains the array of Id3Insertion instances. - Id3Insertions []*Id3Insertion `locationName:"id3Insertions" type:"list"` -} - -// String returns the string representation -func (s TimedMetadataInsertion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimedMetadataInsertion) GoString() string { - return s.String() -} - -// SetId3Insertions sets the Id3Insertions field's value. -func (s *TimedMetadataInsertion) SetId3Insertions(v []*Id3Insertion) *TimedMetadataInsertion { - s.Id3Insertions = v - return s -} - -// Information about when jobs are submitted, started, and finished is specified -// in Unix epoch format in seconds. -type Timing struct { - _ struct{} `type:"structure"` - - // The time, in Unix epoch format, that the transcoding job finished - FinishTime *time.Time `locationName:"finishTime" type:"timestamp" timestampFormat:"unixTimestamp"` - - // The time, in Unix epoch format, that transcoding for the job began. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unixTimestamp"` - - // The time, in Unix epoch format, that you submitted the job. - SubmitTime *time.Time `locationName:"submitTime" type:"timestamp" timestampFormat:"unixTimestamp"` -} - -// String returns the string representation -func (s Timing) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Timing) GoString() string { - return s.String() -} - -// SetFinishTime sets the FinishTime field's value. -func (s *Timing) SetFinishTime(v time.Time) *Timing { - s.FinishTime = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *Timing) SetStartTime(v time.Time) *Timing { - s.StartTime = &v - return s -} - -// SetSubmitTime sets the SubmitTime field's value. -func (s *Timing) SetSubmitTime(v time.Time) *Timing { - s.SubmitTime = &v - return s -} - -// Settings specific to caption sources that are specfied by track number. Sources -// include IMSC in IMF. -type TrackSourceSettings struct { - _ struct{} `type:"structure"` - - // Use this setting to select a single captions track from a source. Track numbers - // correspond to the order in the captions source file. For IMF sources, track - // numbering is based on the order that the captions appear in the CPL. For - // example, use 1 to select the captions asset that is listed first in the CPL. - // To include more than one captions track in your job outputs, create multiple - // input captions selectors. Specify one track per selector. - TrackNumber *int64 `locationName:"trackNumber" min:"1" type:"integer"` -} - -// String returns the string representation -func (s TrackSourceSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TrackSourceSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TrackSourceSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TrackSourceSettings"} - if s.TrackNumber != nil && *s.TrackNumber < 1 { - invalidParams.Add(request.NewErrParamMinValue("TrackNumber", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTrackNumber sets the TrackNumber field's value. -func (s *TrackSourceSettings) SetTrackNumber(v int64) *TrackSourceSettings { - s.TrackNumber = &v - return s -} - -// Settings specific to TTML caption outputs, including Pass style information -// (TtmlStylePassthrough). -type TtmlDestinationSettings struct { - _ struct{} `type:"structure"` - - // Pass through style and position information from a TTML-like input source - // (TTML, SMPTE-TT, CFF-TT) to the CFF-TT output or TTML output. - StylePassthrough *string `locationName:"stylePassthrough" type:"string" enum:"TtmlStylePassthrough"` -} - -// String returns the string representation -func (s TtmlDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TtmlDestinationSettings) GoString() string { - return s.String() -} - -// SetStylePassthrough sets the StylePassthrough field's value. -func (s *TtmlDestinationSettings) SetStylePassthrough(v string) *TtmlDestinationSettings { - s.StylePassthrough = &v - return s -} - -// To remove tags from a resource, send a request with the Amazon Resource Name -// (ARN) of the resource and the keys of the tags that you want to remove. -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource that you want to remove tags - // from. To get the ARN, send a GET request with the resource name. - // - // Arn is a required field - Arn *string `location:"uri" locationName:"arn" type:"string" required:"true"` - - // The keys of the tags that you want to remove from the resource. - TagKeys []*string `locationName:"tagKeys" type:"list"` -} - -// String returns the string representation -func (s UntagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceInput) GoString() string { - return s.String() -} - -// 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.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *UntagResourceInput) SetArn(v string) *UntagResourceInput { - s.Arn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -// A successful request to remove tags from a resource returns an OK message. -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -// Modify a job template by sending a request with the job template name and -// any of the following that you wish to change: description, category, and -// queue. -type UpdateJobTemplateInput struct { - _ struct{} `type:"structure"` - - // This is a beta feature. If you are interested in using this feature, please - // contact AWS customer support. - AccelerationSettings *AccelerationSettings `locationName:"accelerationSettings" type:"structure"` - - // The new category for the job template, if you are changing it. - Category *string `locationName:"category" type:"string"` - - // The new description for the job template, if you are changing it. - Description *string `locationName:"description" type:"string"` - - // The name of the job template you are modifying - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` - - // The new queue for the job template, if you are changing it. - Queue *string `locationName:"queue" type:"string"` - - // JobTemplateSettings contains all the transcode settings saved in the template - // that will be applied to jobs created from it. - Settings *JobTemplateSettings `locationName:"settings" type:"structure"` -} - -// String returns the string representation -func (s UpdateJobTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateJobTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateJobTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateJobTemplateInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.AccelerationSettings != nil { - if err := s.AccelerationSettings.Validate(); err != nil { - invalidParams.AddNested("AccelerationSettings", err.(request.ErrInvalidParams)) - } - } - if s.Settings != nil { - if err := s.Settings.Validate(); err != nil { - invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccelerationSettings sets the AccelerationSettings field's value. -func (s *UpdateJobTemplateInput) SetAccelerationSettings(v *AccelerationSettings) *UpdateJobTemplateInput { - s.AccelerationSettings = v - return s -} - -// SetCategory sets the Category field's value. -func (s *UpdateJobTemplateInput) SetCategory(v string) *UpdateJobTemplateInput { - s.Category = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateJobTemplateInput) SetDescription(v string) *UpdateJobTemplateInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateJobTemplateInput) SetName(v string) *UpdateJobTemplateInput { - s.Name = &v - return s -} - -// SetQueue sets the Queue field's value. -func (s *UpdateJobTemplateInput) SetQueue(v string) *UpdateJobTemplateInput { - s.Queue = &v - return s -} - -// SetSettings sets the Settings field's value. -func (s *UpdateJobTemplateInput) SetSettings(v *JobTemplateSettings) *UpdateJobTemplateInput { - s.Settings = v - return s -} - -// Successful update job template requests will return the new job template -// JSON. -type UpdateJobTemplateOutput struct { - _ struct{} `type:"structure"` - - // A job template is a pre-made set of encoding instructions that you can use - // to quickly create a job. - JobTemplate *JobTemplate `locationName:"jobTemplate" type:"structure"` -} - -// String returns the string representation -func (s UpdateJobTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateJobTemplateOutput) GoString() string { - return s.String() -} - -// SetJobTemplate sets the JobTemplate field's value. -func (s *UpdateJobTemplateOutput) SetJobTemplate(v *JobTemplate) *UpdateJobTemplateOutput { - s.JobTemplate = v - return s -} - -// Modify a preset by sending a request with the preset name and any of the -// following that you wish to change: description, category, and transcoding -// settings. -type UpdatePresetInput struct { - _ struct{} `type:"structure"` - - // The new category for the preset, if you are changing it. - Category *string `locationName:"category" type:"string"` - - // The new description for the preset, if you are changing it. - Description *string `locationName:"description" type:"string"` - - // The name of the preset you are modifying. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` - - // Settings for preset - Settings *PresetSettings `locationName:"settings" type:"structure"` -} - -// String returns the string representation -func (s UpdatePresetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePresetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdatePresetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdatePresetInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Settings != nil { - if err := s.Settings.Validate(); err != nil { - invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCategory sets the Category field's value. -func (s *UpdatePresetInput) SetCategory(v string) *UpdatePresetInput { - s.Category = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdatePresetInput) SetDescription(v string) *UpdatePresetInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdatePresetInput) SetName(v string) *UpdatePresetInput { - s.Name = &v - return s -} - -// SetSettings sets the Settings field's value. -func (s *UpdatePresetInput) SetSettings(v *PresetSettings) *UpdatePresetInput { - s.Settings = v - return s -} - -// Successful update preset requests will return the new preset JSON. -type UpdatePresetOutput struct { - _ struct{} `type:"structure"` - - // A preset is a collection of preconfigured media conversion settings that - // you want MediaConvert to apply to the output during the conversion process. - Preset *Preset `locationName:"preset" type:"structure"` -} - -// String returns the string representation -func (s UpdatePresetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePresetOutput) GoString() string { - return s.String() -} - -// SetPreset sets the Preset field's value. -func (s *UpdatePresetOutput) SetPreset(v *Preset) *UpdatePresetOutput { - s.Preset = v - return s -} - -// Modify a queue by sending a request with the queue name and any changes to -// the queue. -type UpdateQueueInput struct { - _ struct{} `type:"structure"` - - // The new description for the queue, if you are changing it. - Description *string `locationName:"description" type:"string"` - - // The name of the queue that you are modifying. - // - // Name is a required field - Name *string `location:"uri" locationName:"name" type:"string" required:"true"` - - // The new details of your pricing plan for your reserved queue. When you set - // up a new pricing plan to replace an expired one, you enter into another 12-month - // commitment. When you add capacity to your queue by increasing the number - // of RTS, you extend the term of your commitment to 12 months from when you - // add capacity. After you make these commitments, you can't cancel them. - ReservationPlanSettings *ReservationPlanSettings `locationName:"reservationPlanSettings" type:"structure"` - - // Pause or activate a queue by changing its status between ACTIVE and PAUSED. - // If you pause a queue, jobs in that queue won't begin. Jobs that are running - // when you pause the queue continue to run until they finish or result in an - // error. - Status *string `locationName:"status" type:"string" enum:"QueueStatus"` -} - -// String returns the string representation -func (s UpdateQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateQueueInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.ReservationPlanSettings != nil { - if err := s.ReservationPlanSettings.Validate(); err != nil { - invalidParams.AddNested("ReservationPlanSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateQueueInput) SetDescription(v string) *UpdateQueueInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateQueueInput) SetName(v string) *UpdateQueueInput { - s.Name = &v - return s -} - -// SetReservationPlanSettings sets the ReservationPlanSettings field's value. -func (s *UpdateQueueInput) SetReservationPlanSettings(v *ReservationPlanSettings) *UpdateQueueInput { - s.ReservationPlanSettings = v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateQueueInput) SetStatus(v string) *UpdateQueueInput { - s.Status = &v - return s -} - -// Successful update queue requests return the new queue information in JSON -// format. -type UpdateQueueOutput struct { - _ struct{} `type:"structure"` - - // You can use queues to manage the resources that are available to your AWS - // account for running multiple transcoding jobs at the same time. If you don't - // specify a queue, the service sends all jobs through the default queue. For - // more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-queues.html. - Queue *Queue `locationName:"queue" type:"structure"` -} - -// String returns the string representation -func (s UpdateQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateQueueOutput) GoString() string { - return s.String() -} - -// SetQueue sets the Queue field's value. -func (s *UpdateQueueOutput) SetQueue(v *Queue) *UpdateQueueOutput { - s.Queue = v - return s -} - -// Video codec settings, (CodecSettings) under (VideoDescription), contains -// the group of settings related to video encoding. The settings in this group -// vary depending on the value you choose for Video codec (Codec). For each -// codec enum you choose, define the corresponding settings object. The following -// lists the codec enum, settings object pairs. * H_264, H264Settings * H_265, -// H265Settings * MPEG2, Mpeg2Settings * PRORES, ProresSettings * FRAME_CAPTURE, -// FrameCaptureSettings -type VideoCodecSettings struct { - _ struct{} `type:"structure"` - - // Specifies the video codec. This must be equal to one of the enum values defined - // by the object VideoCodec. - Codec *string `locationName:"codec" type:"string" enum:"VideoCodec"` - - // Required when you set (Codec) under (VideoDescription)>(CodecSettings) to - // the value FRAME_CAPTURE. - FrameCaptureSettings *FrameCaptureSettings `locationName:"frameCaptureSettings" type:"structure"` - - // Required when you set (Codec) under (VideoDescription)>(CodecSettings) to - // the value H_264. - H264Settings *H264Settings `locationName:"h264Settings" type:"structure"` - - // Settings for H265 codec - H265Settings *H265Settings `locationName:"h265Settings" type:"structure"` - - // Required when you set (Codec) under (VideoDescription)>(CodecSettings) to - // the value MPEG2. - Mpeg2Settings *Mpeg2Settings `locationName:"mpeg2Settings" type:"structure"` - - // Required when you set (Codec) under (VideoDescription)>(CodecSettings) to - // the value PRORES. - ProresSettings *ProresSettings `locationName:"proresSettings" type:"structure"` -} - -// String returns the string representation -func (s VideoCodecSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VideoCodecSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VideoCodecSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VideoCodecSettings"} - if s.FrameCaptureSettings != nil { - if err := s.FrameCaptureSettings.Validate(); err != nil { - invalidParams.AddNested("FrameCaptureSettings", err.(request.ErrInvalidParams)) - } - } - if s.H264Settings != nil { - if err := s.H264Settings.Validate(); err != nil { - invalidParams.AddNested("H264Settings", err.(request.ErrInvalidParams)) - } - } - if s.H265Settings != nil { - if err := s.H265Settings.Validate(); err != nil { - invalidParams.AddNested("H265Settings", err.(request.ErrInvalidParams)) - } - } - if s.Mpeg2Settings != nil { - if err := s.Mpeg2Settings.Validate(); err != nil { - invalidParams.AddNested("Mpeg2Settings", err.(request.ErrInvalidParams)) - } - } - if s.ProresSettings != nil { - if err := s.ProresSettings.Validate(); err != nil { - invalidParams.AddNested("ProresSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCodec sets the Codec field's value. -func (s *VideoCodecSettings) SetCodec(v string) *VideoCodecSettings { - s.Codec = &v - return s -} - -// SetFrameCaptureSettings sets the FrameCaptureSettings field's value. -func (s *VideoCodecSettings) SetFrameCaptureSettings(v *FrameCaptureSettings) *VideoCodecSettings { - s.FrameCaptureSettings = v - return s -} - -// SetH264Settings sets the H264Settings field's value. -func (s *VideoCodecSettings) SetH264Settings(v *H264Settings) *VideoCodecSettings { - s.H264Settings = v - return s -} - -// SetH265Settings sets the H265Settings field's value. -func (s *VideoCodecSettings) SetH265Settings(v *H265Settings) *VideoCodecSettings { - s.H265Settings = v - return s -} - -// SetMpeg2Settings sets the Mpeg2Settings field's value. -func (s *VideoCodecSettings) SetMpeg2Settings(v *Mpeg2Settings) *VideoCodecSettings { - s.Mpeg2Settings = v - return s -} - -// SetProresSettings sets the ProresSettings field's value. -func (s *VideoCodecSettings) SetProresSettings(v *ProresSettings) *VideoCodecSettings { - s.ProresSettings = v - return s -} - -// Settings for video outputs -type VideoDescription struct { - _ struct{} `type:"structure"` - - // This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert - // AFD signaling (AfdSignaling) to specify whether the service includes AFD - // values in the output video data and what those values are. * Choose None - // to remove all AFD values from this output. * Choose Fixed to ignore input - // AFD values and instead encode the value specified in the job. * Choose Auto - // to calculate output AFD values based on the input AFD scaler data. - AfdSignaling *string `locationName:"afdSignaling" type:"string" enum:"AfdSignaling"` - - // Enable Anti-alias (AntiAlias) to enhance sharp edges in video output when - // your input resolution is much larger than your output resolution. Default - // is enabled. - AntiAlias *string `locationName:"antiAlias" type:"string" enum:"AntiAlias"` - - // Video codec settings, (CodecSettings) under (VideoDescription), contains - // the group of settings related to video encoding. The settings in this group - // vary depending on the value you choose for Video codec (Codec). For each - // codec enum you choose, define the corresponding settings object. The following - // lists the codec enum, settings object pairs. * H_264, H264Settings * H_265, - // H265Settings * MPEG2, Mpeg2Settings * PRORES, ProresSettings * FRAME_CAPTURE, - // FrameCaptureSettings - CodecSettings *VideoCodecSettings `locationName:"codecSettings" type:"structure"` - - // Enable Insert color metadata (ColorMetadata) to include color metadata in - // this output. This setting is enabled by default. - ColorMetadata *string `locationName:"colorMetadata" type:"string" enum:"ColorMetadata"` - - // Applies only if your input aspect ratio is different from your output aspect - // ratio. Use Input cropping rectangle (Crop) to specify the video area the - // service will include in the output. This will crop the input source, causing - // video pixels to be removed on encode. If you crop your input frame size to - // smaller than your output frame size, make sure to specify the behavior you - // want in your output setting "Scaling behavior". - Crop *Rectangle `locationName:"crop" type:"structure"` - - // Applies only to 29.97 fps outputs. When this feature is enabled, the service - // will use drop-frame timecode on outputs. If it is not possible to use drop-frame - // timecode, the system will fall back to non-drop-frame. This setting is enabled - // by default when Timecode insertion (TimecodeInsertion) is enabled. - DropFrameTimecode *string `locationName:"dropFrameTimecode" type:"string" enum:"DropFrameTimecode"` - - // Applies only if you set AFD Signaling(AfdSignaling) to Fixed (FIXED). Use - // Fixed (FixedAfd) to specify a four-bit AFD value which the service will write - // on all frames of this video output. - FixedAfd *int64 `locationName:"fixedAfd" type:"integer"` - - // Use the Height (Height) setting to define the video resolution height for - // this output. Specify in pixels. If you don't provide a value here, the service - // will use the input height. - Height *int64 `locationName:"height" min:"32" type:"integer"` - - // Use Position (Position) to point to a rectangle object to define your position. - // This setting overrides any other aspect ratio. - Position *Rectangle `locationName:"position" type:"structure"` - - // Use Respond to AFD (RespondToAfd) to specify how the service changes the - // video itself in response to AFD values in the input. * Choose Respond to - // clip the input video frame according to the AFD value, input display aspect - // ratio, and output display aspect ratio. * Choose Passthrough to include the - // input AFD values. Do not choose this when AfdSignaling is set to (NONE). - // A preferred implementation of this workflow is to set RespondToAfd to (NONE) - // and set AfdSignaling to (AUTO). * Choose None to remove all input AFD values - // from this output. - RespondToAfd *string `locationName:"respondToAfd" type:"string" enum:"RespondToAfd"` - - // Applies only if your input aspect ratio is different from your output aspect - // ratio. Choose "Stretch to output" to have the service stretch your video - // image to fit. Keep the setting "Default" to allow the service to letterbox - // your video instead. This setting overrides any positioning value you specify - // elsewhere in the job. - ScalingBehavior *string `locationName:"scalingBehavior" type:"string" enum:"ScalingBehavior"` - - // Use Sharpness (Sharpness)setting to specify the strength of anti-aliasing. - // This setting changes the width of the anti-alias filter kernel used for scaling. - // Sharpness only applies if your output resolution is different from your input - // resolution, and if you set Anti-alias (AntiAlias) to ENABLED. 0 is the softest - // setting, 100 the sharpest, and 50 recommended for most content. - Sharpness *int64 `locationName:"sharpness" type:"integer"` - - // Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable Timecode - // insertion when the input frame rate is identical to the output frame rate. - // To include timecodes in this output, set Timecode insertion (VideoTimecodeInsertion) - // to PIC_TIMING_SEI. To leave them out, set it to DISABLED. Default is DISABLED. - // When the service inserts timecodes in an output, by default, it uses any - // embedded timecodes from the input. If none are present, the service will - // set the timecode for the first output frame to zero. To change this default - // behavior, adjust the settings under Timecode configuration (TimecodeConfig). - // In the console, these settings are located under Job > Job settings > Timecode - // configuration. Note - Timecode source under input settings (InputTimecodeSource) - // does not affect the timecodes that are inserted in the output. Source under - // Job settings > Timecode configuration (TimecodeSource) does. - TimecodeInsertion *string `locationName:"timecodeInsertion" type:"string" enum:"VideoTimecodeInsertion"` - - // Find additional transcoding features under Preprocessors (VideoPreprocessors). - // Enable the features at each output individually. These features are disabled - // by default. - VideoPreprocessors *VideoPreprocessor `locationName:"videoPreprocessors" type:"structure"` - - // Use Width (Width) to define the video resolution width, in pixels, for this - // output. If you don't provide a value here, the service will use the input - // width. - Width *int64 `locationName:"width" min:"32" type:"integer"` -} - -// String returns the string representation -func (s VideoDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VideoDescription) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VideoDescription) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VideoDescription"} - if s.Height != nil && *s.Height < 32 { - invalidParams.Add(request.NewErrParamMinValue("Height", 32)) - } - if s.Width != nil && *s.Width < 32 { - invalidParams.Add(request.NewErrParamMinValue("Width", 32)) - } - if s.CodecSettings != nil { - if err := s.CodecSettings.Validate(); err != nil { - invalidParams.AddNested("CodecSettings", err.(request.ErrInvalidParams)) - } - } - if s.Crop != nil { - if err := s.Crop.Validate(); err != nil { - invalidParams.AddNested("Crop", err.(request.ErrInvalidParams)) - } - } - if s.Position != nil { - if err := s.Position.Validate(); err != nil { - invalidParams.AddNested("Position", err.(request.ErrInvalidParams)) - } - } - if s.VideoPreprocessors != nil { - if err := s.VideoPreprocessors.Validate(); err != nil { - invalidParams.AddNested("VideoPreprocessors", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAfdSignaling sets the AfdSignaling field's value. -func (s *VideoDescription) SetAfdSignaling(v string) *VideoDescription { - s.AfdSignaling = &v - return s -} - -// SetAntiAlias sets the AntiAlias field's value. -func (s *VideoDescription) SetAntiAlias(v string) *VideoDescription { - s.AntiAlias = &v - return s -} - -// SetCodecSettings sets the CodecSettings field's value. -func (s *VideoDescription) SetCodecSettings(v *VideoCodecSettings) *VideoDescription { - s.CodecSettings = v - return s -} - -// SetColorMetadata sets the ColorMetadata field's value. -func (s *VideoDescription) SetColorMetadata(v string) *VideoDescription { - s.ColorMetadata = &v - return s -} - -// SetCrop sets the Crop field's value. -func (s *VideoDescription) SetCrop(v *Rectangle) *VideoDescription { - s.Crop = v - return s -} - -// SetDropFrameTimecode sets the DropFrameTimecode field's value. -func (s *VideoDescription) SetDropFrameTimecode(v string) *VideoDescription { - s.DropFrameTimecode = &v - return s -} - -// SetFixedAfd sets the FixedAfd field's value. -func (s *VideoDescription) SetFixedAfd(v int64) *VideoDescription { - s.FixedAfd = &v - return s -} - -// SetHeight sets the Height field's value. -func (s *VideoDescription) SetHeight(v int64) *VideoDescription { - s.Height = &v - return s -} - -// SetPosition sets the Position field's value. -func (s *VideoDescription) SetPosition(v *Rectangle) *VideoDescription { - s.Position = v - return s -} - -// SetRespondToAfd sets the RespondToAfd field's value. -func (s *VideoDescription) SetRespondToAfd(v string) *VideoDescription { - s.RespondToAfd = &v - return s -} - -// SetScalingBehavior sets the ScalingBehavior field's value. -func (s *VideoDescription) SetScalingBehavior(v string) *VideoDescription { - s.ScalingBehavior = &v - return s -} - -// SetSharpness sets the Sharpness field's value. -func (s *VideoDescription) SetSharpness(v int64) *VideoDescription { - s.Sharpness = &v - return s -} - -// SetTimecodeInsertion sets the TimecodeInsertion field's value. -func (s *VideoDescription) SetTimecodeInsertion(v string) *VideoDescription { - s.TimecodeInsertion = &v - return s -} - -// SetVideoPreprocessors sets the VideoPreprocessors field's value. -func (s *VideoDescription) SetVideoPreprocessors(v *VideoPreprocessor) *VideoDescription { - s.VideoPreprocessors = v - return s -} - -// SetWidth sets the Width field's value. -func (s *VideoDescription) SetWidth(v int64) *VideoDescription { - s.Width = &v - return s -} - -// Contains details about the output's video stream -type VideoDetail struct { - _ struct{} `type:"structure"` - - // Height in pixels for the output - HeightInPx *int64 `locationName:"heightInPx" type:"integer"` - - // Width in pixels for the output - WidthInPx *int64 `locationName:"widthInPx" type:"integer"` -} - -// String returns the string representation -func (s VideoDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VideoDetail) GoString() string { - return s.String() -} - -// SetHeightInPx sets the HeightInPx field's value. -func (s *VideoDetail) SetHeightInPx(v int64) *VideoDetail { - s.HeightInPx = &v - return s -} - -// SetWidthInPx sets the WidthInPx field's value. -func (s *VideoDetail) SetWidthInPx(v int64) *VideoDetail { - s.WidthInPx = &v - return s -} - -// Find additional transcoding features under Preprocessors (VideoPreprocessors). -// Enable the features at each output individually. These features are disabled -// by default. -type VideoPreprocessor struct { - _ struct{} `type:"structure"` - - // Enable the Color corrector (ColorCorrector) feature if necessary. Enable - // or disable this feature for each output individually. This setting is disabled - // by default. - ColorCorrector *ColorCorrector `locationName:"colorCorrector" type:"structure"` - - // Use Deinterlacer (Deinterlacer) to produce smoother motion and a clearer - // picture. - Deinterlacer *Deinterlacer `locationName:"deinterlacer" type:"structure"` - - // Enable the Image inserter (ImageInserter) feature to include a graphic overlay - // on your video. Enable or disable this feature for each output individually. - // This setting is disabled by default. - ImageInserter *ImageInserter `locationName:"imageInserter" type:"structure"` - - // Enable the Noise reducer (NoiseReducer) feature to remove noise from your - // video output if necessary. Enable or disable this feature for each output - // individually. This setting is disabled by default. - NoiseReducer *NoiseReducer `locationName:"noiseReducer" type:"structure"` - - // Timecode burn-in (TimecodeBurnIn)--Burns the output timecode and specified - // prefix into the output. - TimecodeBurnin *TimecodeBurnin `locationName:"timecodeBurnin" type:"structure"` -} - -// String returns the string representation -func (s VideoPreprocessor) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VideoPreprocessor) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VideoPreprocessor) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VideoPreprocessor"} - if s.ColorCorrector != nil { - if err := s.ColorCorrector.Validate(); err != nil { - invalidParams.AddNested("ColorCorrector", err.(request.ErrInvalidParams)) - } - } - if s.ImageInserter != nil { - if err := s.ImageInserter.Validate(); err != nil { - invalidParams.AddNested("ImageInserter", err.(request.ErrInvalidParams)) - } - } - if s.NoiseReducer != nil { - if err := s.NoiseReducer.Validate(); err != nil { - invalidParams.AddNested("NoiseReducer", err.(request.ErrInvalidParams)) - } - } - if s.TimecodeBurnin != nil { - if err := s.TimecodeBurnin.Validate(); err != nil { - invalidParams.AddNested("TimecodeBurnin", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetColorCorrector sets the ColorCorrector field's value. -func (s *VideoPreprocessor) SetColorCorrector(v *ColorCorrector) *VideoPreprocessor { - s.ColorCorrector = v - return s -} - -// SetDeinterlacer sets the Deinterlacer field's value. -func (s *VideoPreprocessor) SetDeinterlacer(v *Deinterlacer) *VideoPreprocessor { - s.Deinterlacer = v - return s -} - -// SetImageInserter sets the ImageInserter field's value. -func (s *VideoPreprocessor) SetImageInserter(v *ImageInserter) *VideoPreprocessor { - s.ImageInserter = v - return s -} - -// SetNoiseReducer sets the NoiseReducer field's value. -func (s *VideoPreprocessor) SetNoiseReducer(v *NoiseReducer) *VideoPreprocessor { - s.NoiseReducer = v - return s -} - -// SetTimecodeBurnin sets the TimecodeBurnin field's value. -func (s *VideoPreprocessor) SetTimecodeBurnin(v *TimecodeBurnin) *VideoPreprocessor { - s.TimecodeBurnin = v - return s -} - -// Selector for video. -type VideoSelector struct { - _ struct{} `type:"structure"` - - // If your input video has accurate color space metadata, or if you don't know - // about color space, leave this set to the default value FOLLOW. The service - // will automatically detect your input color space. If your input video has - // metadata indicating the wrong color space, or if your input video is missing - // color space metadata that should be there, specify the accurate color space - // here. If you choose HDR10, you can also correct inaccurate color space coefficients, - // using the HDR master display information controls. You must also set Color - // space usage (ColorSpaceUsage) to FORCE for the service to use these values. - ColorSpace *string `locationName:"colorSpace" type:"string" enum:"ColorSpace"` - - // There are two sources for color metadata, the input file and the job configuration - // (in the Color space and HDR master display informaiton settings). The Color - // space usage setting controls which takes precedence. FORCE: The system will - // use color metadata supplied by user, if any. If the user does not supply - // color metadata, the system will use data from the source. FALLBACK: The system - // will use color metadata from the source. If source has no color metadata, - // the system will use user-supplied color metadata values if available. - ColorSpaceUsage *string `locationName:"colorSpaceUsage" type:"string" enum:"ColorSpaceUsage"` - - // Use the "HDR master display information" (Hdr10Metadata) settings to correct - // HDR metadata or to provide missing metadata. These values vary depending - // on the input video and must be provided by a color grader. Range is 0 to - // 50,000; each increment represents 0.00002 in CIE1931 color coordinate. Note - // that these settings are not color correction. Note that if you are creating - // HDR outputs inside of an HLS CMAF package, to comply with the Apple specification, - // you must use the following settings. Set "MP4 packaging type" (writeMp4PackagingType) - // to HVC1 (HVC1). Set "Profile" (H265Settings > codecProfile) to Main10/High - // (MAIN10_HIGH). Set "Level" (H265Settings > codecLevel) to 5 (LEVEL_5). - Hdr10Metadata *Hdr10Metadata `locationName:"hdr10Metadata" type:"structure"` - - // Use PID (Pid) to select specific video data from an input file. Specify this - // value as an integer; the system automatically converts it to the hexidecimal - // value. For example, 257 selects PID 0x101. A PID, or packet identifier, is - // an identifier for a set of data in an MPEG-2 transport stream container. - Pid *int64 `locationName:"pid" min:"1" type:"integer"` - - // Selects a specific program from within a multi-program transport stream. - // Note that Quad 4K is not currently supported. - ProgramNumber *int64 `locationName:"programNumber" type:"integer"` -} - -// String returns the string representation -func (s VideoSelector) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VideoSelector) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VideoSelector) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VideoSelector"} - if s.Pid != nil && *s.Pid < 1 { - invalidParams.Add(request.NewErrParamMinValue("Pid", 1)) - } - if s.ProgramNumber != nil && *s.ProgramNumber < -2.147483648e+09 { - invalidParams.Add(request.NewErrParamMinValue("ProgramNumber", -2.147483648e+09)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetColorSpace sets the ColorSpace field's value. -func (s *VideoSelector) SetColorSpace(v string) *VideoSelector { - s.ColorSpace = &v - return s -} - -// SetColorSpaceUsage sets the ColorSpaceUsage field's value. -func (s *VideoSelector) SetColorSpaceUsage(v string) *VideoSelector { - s.ColorSpaceUsage = &v - return s -} - -// SetHdr10Metadata sets the Hdr10Metadata field's value. -func (s *VideoSelector) SetHdr10Metadata(v *Hdr10Metadata) *VideoSelector { - s.Hdr10Metadata = v - return s -} - -// SetPid sets the Pid field's value. -func (s *VideoSelector) SetPid(v int64) *VideoSelector { - s.Pid = &v - return s -} - -// SetProgramNumber sets the ProgramNumber field's value. -func (s *VideoSelector) SetProgramNumber(v int64) *VideoSelector { - s.ProgramNumber = &v - return s -} - -// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to -// the value WAV. -type WavSettings struct { - _ struct{} `type:"structure"` - - // Specify Bit depth (BitDepth), in bits per sample, to choose the encoding - // quality for this audio track. - BitDepth *int64 `locationName:"bitDepth" min:"16" type:"integer"` - - // Set Channels to specify the number of channels in this output audio track. - // With WAV, valid values 1, 2, 4, and 8. In the console, these values are Mono, - // Stereo, 4-Channel, and 8-Channel, respectively. - Channels *int64 `locationName:"channels" min:"1" type:"integer"` - - // The service defaults to using RIFF for WAV outputs. If your output audio - // is likely to exceed 4 GB in file size, or if you otherwise need the extended - // support of the RF64 format, set your output WAV file format to RF64. - Format *string `locationName:"format" type:"string" enum:"WavFormat"` - - // Sample rate in Hz. - SampleRate *int64 `locationName:"sampleRate" min:"8000" type:"integer"` -} - -// String returns the string representation -func (s WavSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WavSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WavSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WavSettings"} - if s.BitDepth != nil && *s.BitDepth < 16 { - invalidParams.Add(request.NewErrParamMinValue("BitDepth", 16)) - } - if s.Channels != nil && *s.Channels < 1 { - invalidParams.Add(request.NewErrParamMinValue("Channels", 1)) - } - if s.SampleRate != nil && *s.SampleRate < 8000 { - invalidParams.Add(request.NewErrParamMinValue("SampleRate", 8000)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBitDepth sets the BitDepth field's value. -func (s *WavSettings) SetBitDepth(v int64) *WavSettings { - s.BitDepth = &v - return s -} - -// SetChannels sets the Channels field's value. -func (s *WavSettings) SetChannels(v int64) *WavSettings { - s.Channels = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *WavSettings) SetFormat(v string) *WavSettings { - s.Format = &v - return s -} - -// SetSampleRate sets the SampleRate field's value. -func (s *WavSettings) SetSampleRate(v int64) *WavSettings { - s.SampleRate = &v - return s -} - -// Choose BROADCASTER_MIXED_AD when the input contains pre-mixed main audio -// + audio description (AD) as a stereo pair. The value for AudioType will be -// set to 3, which signals to downstream systems that this stream contains "broadcaster -// mixed AD". Note that the input received by the encoder must contain pre-mixed -// audio; the encoder does not perform the mixing. When you choose BROADCASTER_MIXED_AD, -// the encoder ignores any values you provide in AudioType and FollowInputAudioType. -// Choose NORMAL when the input does not contain pre-mixed audio + audio description -// (AD). In this case, the encoder will use any values you provide for AudioType -// and FollowInputAudioType. -const ( - // AacAudioDescriptionBroadcasterMixBroadcasterMixedAd is a AacAudioDescriptionBroadcasterMix enum value - AacAudioDescriptionBroadcasterMixBroadcasterMixedAd = "BROADCASTER_MIXED_AD" - - // AacAudioDescriptionBroadcasterMixNormal is a AacAudioDescriptionBroadcasterMix enum value - AacAudioDescriptionBroadcasterMixNormal = "NORMAL" -) - -// AAC Profile. -const ( - // AacCodecProfileLc is a AacCodecProfile enum value - AacCodecProfileLc = "LC" - - // AacCodecProfileHev1 is a AacCodecProfile enum value - AacCodecProfileHev1 = "HEV1" - - // AacCodecProfileHev2 is a AacCodecProfile enum value - AacCodecProfileHev2 = "HEV2" -) - -// Mono (Audio Description), Mono, Stereo, or 5.1 channel layout. Valid values -// depend on rate control mode and profile. "1.0 - Audio Description (Receiver -// Mix)" setting receives a stereo description plus control track and emits -// a mono AAC encode of the description track, with control data emitted in -// the PES header as per ETSI TS 101 154 Annex E. -const ( - // AacCodingModeAdReceiverMix is a AacCodingMode enum value - AacCodingModeAdReceiverMix = "AD_RECEIVER_MIX" - - // AacCodingModeCodingMode10 is a AacCodingMode enum value - AacCodingModeCodingMode10 = "CODING_MODE_1_0" - - // AacCodingModeCodingMode11 is a AacCodingMode enum value - AacCodingModeCodingMode11 = "CODING_MODE_1_1" - - // AacCodingModeCodingMode20 is a AacCodingMode enum value - AacCodingModeCodingMode20 = "CODING_MODE_2_0" - - // AacCodingModeCodingMode51 is a AacCodingMode enum value - AacCodingModeCodingMode51 = "CODING_MODE_5_1" -) - -// Rate Control Mode. -const ( - // AacRateControlModeCbr is a AacRateControlMode enum value - AacRateControlModeCbr = "CBR" - - // AacRateControlModeVbr is a AacRateControlMode enum value - AacRateControlModeVbr = "VBR" -) - -// Enables LATM/LOAS AAC output. Note that if you use LATM/LOAS AAC in an output, -// you must choose "No container" for the output container. -const ( - // AacRawFormatLatmLoas is a AacRawFormat enum value - AacRawFormatLatmLoas = "LATM_LOAS" - - // AacRawFormatNone is a AacRawFormat enum value - AacRawFormatNone = "NONE" -) - -// Use MPEG-2 AAC instead of MPEG-4 AAC audio for raw or MPEG-2 Transport Stream -// containers. -const ( - // AacSpecificationMpeg2 is a AacSpecification enum value - AacSpecificationMpeg2 = "MPEG2" - - // AacSpecificationMpeg4 is a AacSpecification enum value - AacSpecificationMpeg4 = "MPEG4" -) - -// VBR Quality Level - Only used if rate_control_mode is VBR. -const ( - // AacVbrQualityLow is a AacVbrQuality enum value - AacVbrQualityLow = "LOW" - - // AacVbrQualityMediumLow is a AacVbrQuality enum value - AacVbrQualityMediumLow = "MEDIUM_LOW" - - // AacVbrQualityMediumHigh is a AacVbrQuality enum value - AacVbrQualityMediumHigh = "MEDIUM_HIGH" - - // AacVbrQualityHigh is a AacVbrQuality enum value - AacVbrQualityHigh = "HIGH" -) - -// Specifies the "Bitstream Mode" (bsmod) for the emitted AC-3 stream. See ATSC -// A/52-2012 for background on these values. -const ( - // Ac3BitstreamModeCompleteMain is a Ac3BitstreamMode enum value - Ac3BitstreamModeCompleteMain = "COMPLETE_MAIN" - - // Ac3BitstreamModeCommentary is a Ac3BitstreamMode enum value - Ac3BitstreamModeCommentary = "COMMENTARY" - - // Ac3BitstreamModeDialogue is a Ac3BitstreamMode enum value - Ac3BitstreamModeDialogue = "DIALOGUE" - - // Ac3BitstreamModeEmergency is a Ac3BitstreamMode enum value - Ac3BitstreamModeEmergency = "EMERGENCY" - - // Ac3BitstreamModeHearingImpaired is a Ac3BitstreamMode enum value - Ac3BitstreamModeHearingImpaired = "HEARING_IMPAIRED" - - // Ac3BitstreamModeMusicAndEffects is a Ac3BitstreamMode enum value - Ac3BitstreamModeMusicAndEffects = "MUSIC_AND_EFFECTS" - - // Ac3BitstreamModeVisuallyImpaired is a Ac3BitstreamMode enum value - Ac3BitstreamModeVisuallyImpaired = "VISUALLY_IMPAIRED" - - // Ac3BitstreamModeVoiceOver is a Ac3BitstreamMode enum value - Ac3BitstreamModeVoiceOver = "VOICE_OVER" -) - -// Dolby Digital coding mode. Determines number of channels. -const ( - // Ac3CodingModeCodingMode10 is a Ac3CodingMode enum value - Ac3CodingModeCodingMode10 = "CODING_MODE_1_0" - - // Ac3CodingModeCodingMode11 is a Ac3CodingMode enum value - Ac3CodingModeCodingMode11 = "CODING_MODE_1_1" - - // Ac3CodingModeCodingMode20 is a Ac3CodingMode enum value - Ac3CodingModeCodingMode20 = "CODING_MODE_2_0" - - // Ac3CodingModeCodingMode32Lfe is a Ac3CodingMode enum value - Ac3CodingModeCodingMode32Lfe = "CODING_MODE_3_2_LFE" -) - -// If set to FILM_STANDARD, adds dynamic range compression signaling to the -// output bitstream as defined in the Dolby Digital specification. -const ( - // Ac3DynamicRangeCompressionProfileFilmStandard is a Ac3DynamicRangeCompressionProfile enum value - Ac3DynamicRangeCompressionProfileFilmStandard = "FILM_STANDARD" - - // Ac3DynamicRangeCompressionProfileNone is a Ac3DynamicRangeCompressionProfile enum value - Ac3DynamicRangeCompressionProfileNone = "NONE" -) - -// Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only -// valid with 3_2_LFE coding mode. -const ( - // Ac3LfeFilterEnabled is a Ac3LfeFilter enum value - Ac3LfeFilterEnabled = "ENABLED" - - // Ac3LfeFilterDisabled is a Ac3LfeFilter enum value - Ac3LfeFilterDisabled = "DISABLED" -) - -// When set to FOLLOW_INPUT, encoder metadata will be sourced from the DD, DD+, -// or DolbyE decoder that supplied this audio data. If audio was not supplied -// from one of these streams, then the static metadata settings will be used. -const ( - // Ac3MetadataControlFollowInput is a Ac3MetadataControl enum value - Ac3MetadataControlFollowInput = "FOLLOW_INPUT" - - // Ac3MetadataControlUseConfigured is a Ac3MetadataControl enum value - Ac3MetadataControlUseConfigured = "USE_CONFIGURED" -) - -// Acceleration configuration for the job. -const ( - // AccelerationModeDisabled is a AccelerationMode enum value - AccelerationModeDisabled = "DISABLED" - - // AccelerationModeEnabled is a AccelerationMode enum value - AccelerationModeEnabled = "ENABLED" -) - -// This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert -// AFD signaling (AfdSignaling) to specify whether the service includes AFD -// values in the output video data and what those values are. * Choose None -// to remove all AFD values from this output. * Choose Fixed to ignore input -// AFD values and instead encode the value specified in the job. * Choose Auto -// to calculate output AFD values based on the input AFD scaler data. -const ( - // AfdSignalingNone is a AfdSignaling enum value - AfdSignalingNone = "NONE" - - // AfdSignalingAuto is a AfdSignaling enum value - AfdSignalingAuto = "AUTO" - - // AfdSignalingFixed is a AfdSignaling enum value - AfdSignalingFixed = "FIXED" -) - -// Enable Anti-alias (AntiAlias) to enhance sharp edges in video output when -// your input resolution is much larger than your output resolution. Default -// is enabled. -const ( - // AntiAliasDisabled is a AntiAlias enum value - AntiAliasDisabled = "DISABLED" - - // AntiAliasEnabled is a AntiAlias enum value - AntiAliasEnabled = "ENABLED" -) - -// Type of Audio codec. -const ( - // AudioCodecAac is a AudioCodec enum value - AudioCodecAac = "AAC" - - // AudioCodecMp2 is a AudioCodec enum value - AudioCodecMp2 = "MP2" - - // AudioCodecWav is a AudioCodec enum value - AudioCodecWav = "WAV" - - // AudioCodecAiff is a AudioCodec enum value - AudioCodecAiff = "AIFF" - - // AudioCodecAc3 is a AudioCodec enum value - AudioCodecAc3 = "AC3" - - // AudioCodecEac3 is a AudioCodec enum value - AudioCodecEac3 = "EAC3" - - // AudioCodecPassthrough is a AudioCodec enum value - AudioCodecPassthrough = "PASSTHROUGH" -) - -// Enable this setting on one audio selector to set it as the default for the -// job. The service uses this default for outputs where it can't find the specified -// input audio. If you don't set a default, those outputs have no audio. -const ( - // AudioDefaultSelectionDefault is a AudioDefaultSelection enum value - AudioDefaultSelectionDefault = "DEFAULT" - - // AudioDefaultSelectionNotDefault is a AudioDefaultSelection enum value - AudioDefaultSelectionNotDefault = "NOT_DEFAULT" -) - -// Choosing FOLLOW_INPUT will cause the ISO 639 language code of the output -// to follow the ISO 639 language code of the input. The language specified -// for languageCode' will be used when USE_CONFIGURED is selected or when FOLLOW_INPUT -// is selected but there is no ISO 639 language code specified by the input. -const ( - // AudioLanguageCodeControlFollowInput is a AudioLanguageCodeControl enum value - AudioLanguageCodeControlFollowInput = "FOLLOW_INPUT" - - // AudioLanguageCodeControlUseConfigured is a AudioLanguageCodeControl enum value - AudioLanguageCodeControlUseConfigured = "USE_CONFIGURED" -) - -// Audio normalization algorithm to use. 1770-1 conforms to the CALM Act specification, -// 1770-2 conforms to the EBU R-128 specification. -const ( - // AudioNormalizationAlgorithmItuBs17701 is a AudioNormalizationAlgorithm enum value - AudioNormalizationAlgorithmItuBs17701 = "ITU_BS_1770_1" - - // AudioNormalizationAlgorithmItuBs17702 is a AudioNormalizationAlgorithm enum value - AudioNormalizationAlgorithmItuBs17702 = "ITU_BS_1770_2" -) - -// When enabled the output audio is corrected using the chosen algorithm. If -// disabled, the audio will be measured but not adjusted. -const ( - // AudioNormalizationAlgorithmControlCorrectAudio is a AudioNormalizationAlgorithmControl enum value - AudioNormalizationAlgorithmControlCorrectAudio = "CORRECT_AUDIO" - - // AudioNormalizationAlgorithmControlMeasureOnly is a AudioNormalizationAlgorithmControl enum value - AudioNormalizationAlgorithmControlMeasureOnly = "MEASURE_ONLY" -) - -// If set to LOG, log each output's audio track loudness to a CSV file. -const ( - // AudioNormalizationLoudnessLoggingLog is a AudioNormalizationLoudnessLogging enum value - AudioNormalizationLoudnessLoggingLog = "LOG" - - // AudioNormalizationLoudnessLoggingDontLog is a AudioNormalizationLoudnessLogging enum value - AudioNormalizationLoudnessLoggingDontLog = "DONT_LOG" -) - -// If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio -// track loudness. -const ( - // AudioNormalizationPeakCalculationTruePeak is a AudioNormalizationPeakCalculation enum value - AudioNormalizationPeakCalculationTruePeak = "TRUE_PEAK" - - // AudioNormalizationPeakCalculationNone is a AudioNormalizationPeakCalculation enum value - AudioNormalizationPeakCalculationNone = "NONE" -) - -// Specifies the type of the audio selector. -const ( - // AudioSelectorTypePid is a AudioSelectorType enum value - AudioSelectorTypePid = "PID" - - // AudioSelectorTypeTrack is a AudioSelectorType enum value - AudioSelectorTypeTrack = "TRACK" - - // AudioSelectorTypeLanguageCode is a AudioSelectorType enum value - AudioSelectorTypeLanguageCode = "LANGUAGE_CODE" -) - -// When set to FOLLOW_INPUT, if the input contains an ISO 639 audio_type, then -// that value is passed through to the output. If the input contains no ISO -// 639 audio_type, the value in Audio Type is included in the output. Otherwise -// the value in Audio Type is included in the output. Note that this field and -// audioType are both ignored if audioDescriptionBroadcasterMix is set to BROADCASTER_MIXED_AD. -const ( - // AudioTypeControlFollowInput is a AudioTypeControl enum value - AudioTypeControlFollowInput = "FOLLOW_INPUT" - - // AudioTypeControlUseConfigured is a AudioTypeControl enum value - AudioTypeControlUseConfigured = "USE_CONFIGURED" -) - -// Optional. Choose a tag type that AWS Billing and Cost Management will use -// to sort your AWS Elemental MediaConvert costs on any billing report that -// you set up. Any transcoding outputs that don't have an associated tag will -// appear in your billing report unsorted. If you don't choose a valid value -// for this field, your job outputs will appear on the billing report unsorted. -const ( - // BillingTagsSourceQueue is a BillingTagsSource enum value - BillingTagsSourceQueue = "QUEUE" - - // BillingTagsSourcePreset is a BillingTagsSource enum value - BillingTagsSourcePreset = "PRESET" - - // BillingTagsSourceJobTemplate is a BillingTagsSource enum value - BillingTagsSourceJobTemplate = "JOB_TEMPLATE" -) - -// If no explicit x_position or y_position is provided, setting alignment to -// centered will place the captions at the bottom center of the output. Similarly, -// setting a left alignment will align captions to the bottom left of the output. -// If x and y positions are given in conjunction with the alignment parameter, -// the font will be justified (either left or centered) relative to those coordinates. -// This option is not valid for source captions that are STL, 608/embedded or -// teletext. These source settings are already pre-defined by the caption stream. -// All burn-in and DVB-Sub font settings must match. -const ( - // BurninSubtitleAlignmentCentered is a BurninSubtitleAlignment enum value - BurninSubtitleAlignmentCentered = "CENTERED" - - // BurninSubtitleAlignmentLeft is a BurninSubtitleAlignment enum value - BurninSubtitleAlignmentLeft = "LEFT" -) - -// Specifies the color of the rectangle behind the captions.All burn-in and -// DVB-Sub font settings must match. -const ( - // BurninSubtitleBackgroundColorNone is a BurninSubtitleBackgroundColor enum value - BurninSubtitleBackgroundColorNone = "NONE" - - // BurninSubtitleBackgroundColorBlack is a BurninSubtitleBackgroundColor enum value - BurninSubtitleBackgroundColorBlack = "BLACK" - - // BurninSubtitleBackgroundColorWhite is a BurninSubtitleBackgroundColor enum value - BurninSubtitleBackgroundColorWhite = "WHITE" -) - -// Specifies the color of the burned-in captions. This option is not valid for -// source captions that are STL, 608/embedded or teletext. These source settings -// are already pre-defined by the caption stream. All burn-in and DVB-Sub font -// settings must match. -const ( - // BurninSubtitleFontColorWhite is a BurninSubtitleFontColor enum value - BurninSubtitleFontColorWhite = "WHITE" - - // BurninSubtitleFontColorBlack is a BurninSubtitleFontColor enum value - BurninSubtitleFontColorBlack = "BLACK" - - // BurninSubtitleFontColorYellow is a BurninSubtitleFontColor enum value - BurninSubtitleFontColorYellow = "YELLOW" - - // BurninSubtitleFontColorRed is a BurninSubtitleFontColor enum value - BurninSubtitleFontColorRed = "RED" - - // BurninSubtitleFontColorGreen is a BurninSubtitleFontColor enum value - BurninSubtitleFontColorGreen = "GREEN" - - // BurninSubtitleFontColorBlue is a BurninSubtitleFontColor enum value - BurninSubtitleFontColorBlue = "BLUE" -) - -// Specifies font outline color. This option is not valid for source captions -// that are either 608/embedded or teletext. These source settings are already -// pre-defined by the caption stream. All burn-in and DVB-Sub font settings -// must match. -const ( - // BurninSubtitleOutlineColorBlack is a BurninSubtitleOutlineColor enum value - BurninSubtitleOutlineColorBlack = "BLACK" - - // BurninSubtitleOutlineColorWhite is a BurninSubtitleOutlineColor enum value - BurninSubtitleOutlineColorWhite = "WHITE" - - // BurninSubtitleOutlineColorYellow is a BurninSubtitleOutlineColor enum value - BurninSubtitleOutlineColorYellow = "YELLOW" - - // BurninSubtitleOutlineColorRed is a BurninSubtitleOutlineColor enum value - BurninSubtitleOutlineColorRed = "RED" - - // BurninSubtitleOutlineColorGreen is a BurninSubtitleOutlineColor enum value - BurninSubtitleOutlineColorGreen = "GREEN" - - // BurninSubtitleOutlineColorBlue is a BurninSubtitleOutlineColor enum value - BurninSubtitleOutlineColorBlue = "BLUE" -) - -// Specifies the color of the shadow cast by the captions.All burn-in and DVB-Sub -// font settings must match. -const ( - // BurninSubtitleShadowColorNone is a BurninSubtitleShadowColor enum value - BurninSubtitleShadowColorNone = "NONE" - - // BurninSubtitleShadowColorBlack is a BurninSubtitleShadowColor enum value - BurninSubtitleShadowColorBlack = "BLACK" - - // BurninSubtitleShadowColorWhite is a BurninSubtitleShadowColor enum value - BurninSubtitleShadowColorWhite = "WHITE" -) - -// Only applies to jobs with input captions in Teletext or STL formats. Specify -// whether the spacing between letters in your captions is set by the captions -// grid or varies depending on letter width. Choose fixed grid to conform to -// the spacing specified in the captions file more accurately. Choose proportional -// to make the text easier to read if the captions are closed caption. -const ( - // BurninSubtitleTeletextSpacingFixedGrid is a BurninSubtitleTeletextSpacing enum value - BurninSubtitleTeletextSpacingFixedGrid = "FIXED_GRID" - - // BurninSubtitleTeletextSpacingProportional is a BurninSubtitleTeletextSpacing enum value - BurninSubtitleTeletextSpacingProportional = "PROPORTIONAL" -) - -// Specify the format for this set of captions on this output. The default format -// is embedded without SCTE-20. Other options are embedded with SCTE-20, burn-in, -// DVB-sub, SCC, SRT, teletext, TTML, and web-VTT. If you are using SCTE-20, -// choose SCTE-20 plus embedded (SCTE20_PLUS_EMBEDDED) to create an output that -// complies with the SCTE-43 spec. To create a non-compliant output where the -// embedded captions come first, choose Embedded plus SCTE-20 (EMBEDDED_PLUS_SCTE20). -const ( - // CaptionDestinationTypeBurnIn is a CaptionDestinationType enum value - CaptionDestinationTypeBurnIn = "BURN_IN" - - // CaptionDestinationTypeDvbSub is a CaptionDestinationType enum value - CaptionDestinationTypeDvbSub = "DVB_SUB" - - // CaptionDestinationTypeEmbedded is a CaptionDestinationType enum value - CaptionDestinationTypeEmbedded = "EMBEDDED" - - // CaptionDestinationTypeEmbeddedPlusScte20 is a CaptionDestinationType enum value - CaptionDestinationTypeEmbeddedPlusScte20 = "EMBEDDED_PLUS_SCTE20" - - // CaptionDestinationTypeScte20PlusEmbedded is a CaptionDestinationType enum value - CaptionDestinationTypeScte20PlusEmbedded = "SCTE20_PLUS_EMBEDDED" - - // CaptionDestinationTypeScc is a CaptionDestinationType enum value - CaptionDestinationTypeScc = "SCC" - - // CaptionDestinationTypeSrt is a CaptionDestinationType enum value - CaptionDestinationTypeSrt = "SRT" - - // CaptionDestinationTypeSmi is a CaptionDestinationType enum value - CaptionDestinationTypeSmi = "SMI" - - // CaptionDestinationTypeTeletext is a CaptionDestinationType enum value - CaptionDestinationTypeTeletext = "TELETEXT" - - // CaptionDestinationTypeTtml is a CaptionDestinationType enum value - CaptionDestinationTypeTtml = "TTML" - - // CaptionDestinationTypeWebvtt is a CaptionDestinationType enum value - CaptionDestinationTypeWebvtt = "WEBVTT" -) - -// Use Source (SourceType) to identify the format of your input captions. The -// service cannot auto-detect caption format. -const ( - // CaptionSourceTypeAncillary is a CaptionSourceType enum value - CaptionSourceTypeAncillary = "ANCILLARY" - - // CaptionSourceTypeDvbSub is a CaptionSourceType enum value - CaptionSourceTypeDvbSub = "DVB_SUB" - - // CaptionSourceTypeEmbedded is a CaptionSourceType enum value - CaptionSourceTypeEmbedded = "EMBEDDED" - - // CaptionSourceTypeScte20 is a CaptionSourceType enum value - CaptionSourceTypeScte20 = "SCTE20" - - // CaptionSourceTypeScc is a CaptionSourceType enum value - CaptionSourceTypeScc = "SCC" - - // CaptionSourceTypeTtml is a CaptionSourceType enum value - CaptionSourceTypeTtml = "TTML" - - // CaptionSourceTypeStl is a CaptionSourceType enum value - CaptionSourceTypeStl = "STL" - - // CaptionSourceTypeSrt is a CaptionSourceType enum value - CaptionSourceTypeSrt = "SRT" - - // CaptionSourceTypeSmi is a CaptionSourceType enum value - CaptionSourceTypeSmi = "SMI" - - // CaptionSourceTypeTeletext is a CaptionSourceType enum value - CaptionSourceTypeTeletext = "TELETEXT" - - // CaptionSourceTypeNullSource is a CaptionSourceType enum value - CaptionSourceTypeNullSource = "NULL_SOURCE" - - // CaptionSourceTypeImsc is a CaptionSourceType enum value - CaptionSourceTypeImsc = "IMSC" -) - -// When set to ENABLED, sets #EXT-X-ALLOW-CACHE:no tag, which prevents client -// from saving media segments for later replay. -const ( - // CmafClientCacheDisabled is a CmafClientCache enum value - CmafClientCacheDisabled = "DISABLED" - - // CmafClientCacheEnabled is a CmafClientCache enum value - CmafClientCacheEnabled = "ENABLED" -) - -// Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist -// generation. -const ( - // CmafCodecSpecificationRfc6381 is a CmafCodecSpecification enum value - CmafCodecSpecificationRfc6381 = "RFC_6381" - - // CmafCodecSpecificationRfc4281 is a CmafCodecSpecification enum value - CmafCodecSpecificationRfc4281 = "RFC_4281" -) - -// Encrypts the segments with the given encryption scheme. Leave blank to disable. -// Selecting 'Disabled' in the web interface also disables encryption. -const ( - // CmafEncryptionTypeSampleAes is a CmafEncryptionType enum value - CmafEncryptionTypeSampleAes = "SAMPLE_AES" -) - -// The Initialization Vector is a 128-bit number used in conjunction with the -// key for encrypting blocks. If set to INCLUDE, Initialization Vector is listed -// in the manifest. Otherwise Initialization Vector is not in the manifest. -const ( - // CmafInitializationVectorInManifestInclude is a CmafInitializationVectorInManifest enum value - CmafInitializationVectorInManifestInclude = "INCLUDE" - - // CmafInitializationVectorInManifestExclude is a CmafInitializationVectorInManifest enum value - CmafInitializationVectorInManifestExclude = "EXCLUDE" -) - -// Indicates which type of key provider is used for encryption. -const ( - // CmafKeyProviderTypeStaticKey is a CmafKeyProviderType enum value - CmafKeyProviderTypeStaticKey = "STATIC_KEY" -) - -// When set to GZIP, compresses HLS playlist. -const ( - // CmafManifestCompressionGzip is a CmafManifestCompression enum value - CmafManifestCompressionGzip = "GZIP" - - // CmafManifestCompressionNone is a CmafManifestCompression enum value - CmafManifestCompressionNone = "NONE" -) - -// Indicates whether the output manifest should use floating point values for -// segment duration. -const ( - // CmafManifestDurationFormatFloatingPoint is a CmafManifestDurationFormat enum value - CmafManifestDurationFormatFloatingPoint = "FLOATING_POINT" - - // CmafManifestDurationFormatInteger is a CmafManifestDurationFormat enum value - CmafManifestDurationFormatInteger = "INTEGER" -) - -// When set to SINGLE_FILE, a single output file is generated, which is internally -// segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, -// separate segment files will be created. -const ( - // CmafSegmentControlSingleFile is a CmafSegmentControl enum value - CmafSegmentControlSingleFile = "SINGLE_FILE" - - // CmafSegmentControlSegmentedFiles is a CmafSegmentControl enum value - CmafSegmentControlSegmentedFiles = "SEGMENTED_FILES" -) - -// Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag -// of variant manifest. -const ( - // CmafStreamInfResolutionInclude is a CmafStreamInfResolution enum value - CmafStreamInfResolutionInclude = "INCLUDE" - - // CmafStreamInfResolutionExclude is a CmafStreamInfResolution enum value - CmafStreamInfResolutionExclude = "EXCLUDE" -) - -// When set to ENABLED, a DASH MPD manifest will be generated for this output. -const ( - // CmafWriteDASHManifestDisabled is a CmafWriteDASHManifest enum value - CmafWriteDASHManifestDisabled = "DISABLED" - - // CmafWriteDASHManifestEnabled is a CmafWriteDASHManifest enum value - CmafWriteDASHManifestEnabled = "ENABLED" -) - -// When set to ENABLED, an Apple HLS manifest will be generated for this output. -const ( - // CmafWriteHLSManifestDisabled is a CmafWriteHLSManifest enum value - CmafWriteHLSManifestDisabled = "DISABLED" - - // CmafWriteHLSManifestEnabled is a CmafWriteHLSManifest enum value - CmafWriteHLSManifestEnabled = "ENABLED" -) - -// Enable Insert color metadata (ColorMetadata) to include color metadata in -// this output. This setting is enabled by default. -const ( - // ColorMetadataIgnore is a ColorMetadata enum value - ColorMetadataIgnore = "IGNORE" - - // ColorMetadataInsert is a ColorMetadata enum value - ColorMetadataInsert = "INSERT" -) - -// If your input video has accurate color space metadata, or if you don't know -// about color space, leave this set to the default value FOLLOW. The service -// will automatically detect your input color space. If your input video has -// metadata indicating the wrong color space, or if your input video is missing -// color space metadata that should be there, specify the accurate color space -// here. If you choose HDR10, you can also correct inaccurate color space coefficients, -// using the HDR master display information controls. You must also set Color -// space usage (ColorSpaceUsage) to FORCE for the service to use these values. -const ( - // ColorSpaceFollow is a ColorSpace enum value - ColorSpaceFollow = "FOLLOW" - - // ColorSpaceRec601 is a ColorSpace enum value - ColorSpaceRec601 = "REC_601" - - // ColorSpaceRec709 is a ColorSpace enum value - ColorSpaceRec709 = "REC_709" - - // ColorSpaceHdr10 is a ColorSpace enum value - ColorSpaceHdr10 = "HDR10" - - // ColorSpaceHlg2020 is a ColorSpace enum value - ColorSpaceHlg2020 = "HLG_2020" -) - -// Determines if colorspace conversion will be performed. If set to _None_, -// no conversion will be performed. If _Force 601_ or _Force 709_ are selected, -// conversion will be performed for inputs with differing colorspaces. An input's -// colorspace can be specified explicitly in the "Video Selector":#inputs-video_selector -// if necessary. -const ( - // ColorSpaceConversionNone is a ColorSpaceConversion enum value - ColorSpaceConversionNone = "NONE" - - // ColorSpaceConversionForce601 is a ColorSpaceConversion enum value - ColorSpaceConversionForce601 = "FORCE_601" - - // ColorSpaceConversionForce709 is a ColorSpaceConversion enum value - ColorSpaceConversionForce709 = "FORCE_709" - - // ColorSpaceConversionForceHdr10 is a ColorSpaceConversion enum value - ColorSpaceConversionForceHdr10 = "FORCE_HDR10" - - // ColorSpaceConversionForceHlg2020 is a ColorSpaceConversion enum value - ColorSpaceConversionForceHlg2020 = "FORCE_HLG_2020" -) - -// There are two sources for color metadata, the input file and the job configuration -// (in the Color space and HDR master display informaiton settings). The Color -// space usage setting controls which takes precedence. FORCE: The system will -// use color metadata supplied by user, if any. If the user does not supply -// color metadata, the system will use data from the source. FALLBACK: The system -// will use color metadata from the source. If source has no color metadata, -// the system will use user-supplied color metadata values if available. -const ( - // ColorSpaceUsageForce is a ColorSpaceUsage enum value - ColorSpaceUsageForce = "FORCE" - - // ColorSpaceUsageFallback is a ColorSpaceUsage enum value - ColorSpaceUsageFallback = "FALLBACK" -) - -// The length of the term of your reserved queue pricing plan commitment. -const ( - // CommitmentOneYear is a Commitment enum value - CommitmentOneYear = "ONE_YEAR" -) - -// Container for this output. Some containers require a container settings object. -// If not specified, the default object will be created. -const ( - // ContainerTypeF4v is a ContainerType enum value - ContainerTypeF4v = "F4V" - - // ContainerTypeIsmv is a ContainerType enum value - ContainerTypeIsmv = "ISMV" - - // ContainerTypeM2ts is a ContainerType enum value - ContainerTypeM2ts = "M2TS" - - // ContainerTypeM3u8 is a ContainerType enum value - ContainerTypeM3u8 = "M3U8" - - // ContainerTypeCmfc is a ContainerType enum value - ContainerTypeCmfc = "CMFC" - - // ContainerTypeMov is a ContainerType enum value - ContainerTypeMov = "MOV" - - // ContainerTypeMp4 is a ContainerType enum value - ContainerTypeMp4 = "MP4" - - // ContainerTypeMpd is a ContainerType enum value - ContainerTypeMpd = "MPD" - - // ContainerTypeMxf is a ContainerType enum value - ContainerTypeMxf = "MXF" - - // ContainerTypeRaw is a ContainerType enum value - ContainerTypeRaw = "RAW" -) - -// Supports HbbTV specification as indicated -const ( - // DashIsoHbbtvComplianceHbbtv15 is a DashIsoHbbtvCompliance enum value - DashIsoHbbtvComplianceHbbtv15 = "HBBTV_1_5" - - // DashIsoHbbtvComplianceNone is a DashIsoHbbtvCompliance enum value - DashIsoHbbtvComplianceNone = "NONE" -) - -// When set to SINGLE_FILE, a single output file is generated, which is internally -// segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, -// separate segment files will be created. -const ( - // DashIsoSegmentControlSingleFile is a DashIsoSegmentControl enum value - DashIsoSegmentControlSingleFile = "SINGLE_FILE" - - // DashIsoSegmentControlSegmentedFiles is a DashIsoSegmentControl enum value - DashIsoSegmentControlSegmentedFiles = "SEGMENTED_FILES" -) - -// When you enable Precise segment duration in manifests (writeSegmentTimelineInRepresentation), -// your DASH manifest shows precise segment durations. The segment duration -// information appears inside the SegmentTimeline element, inside SegmentTemplate -// at the Representation level. When this feature isn't enabled, the segment -// durations in your DASH manifest are approximate. The segment duration information -// appears in the duration attribute of the SegmentTemplate element. -const ( - // DashIsoWriteSegmentTimelineInRepresentationEnabled is a DashIsoWriteSegmentTimelineInRepresentation enum value - DashIsoWriteSegmentTimelineInRepresentationEnabled = "ENABLED" - - // DashIsoWriteSegmentTimelineInRepresentationDisabled is a DashIsoWriteSegmentTimelineInRepresentation enum value - DashIsoWriteSegmentTimelineInRepresentationDisabled = "DISABLED" -) - -// This specifies how the encrypted file needs to be decrypted. -const ( - // DecryptionModeAesCtr is a DecryptionMode enum value - DecryptionModeAesCtr = "AES_CTR" - - // DecryptionModeAesCbc is a DecryptionMode enum value - DecryptionModeAesCbc = "AES_CBC" - - // DecryptionModeAesGcm is a DecryptionMode enum value - DecryptionModeAesGcm = "AES_GCM" -) - -// Only applies when you set Deinterlacer (DeinterlaceMode) to Deinterlace (DEINTERLACE) -// or Adaptive (ADAPTIVE). Motion adaptive interpolate (INTERPOLATE) produces -// sharper pictures, while blend (BLEND) produces smoother motion. Use (INTERPOLATE_TICKER) -// OR (BLEND_TICKER) if your source file includes a ticker, such as a scrolling -// headline at the bottom of the frame. -const ( - // DeinterlaceAlgorithmInterpolate is a DeinterlaceAlgorithm enum value - DeinterlaceAlgorithmInterpolate = "INTERPOLATE" - - // DeinterlaceAlgorithmInterpolateTicker is a DeinterlaceAlgorithm enum value - DeinterlaceAlgorithmInterpolateTicker = "INTERPOLATE_TICKER" - - // DeinterlaceAlgorithmBlend is a DeinterlaceAlgorithm enum value - DeinterlaceAlgorithmBlend = "BLEND" - - // DeinterlaceAlgorithmBlendTicker is a DeinterlaceAlgorithm enum value - DeinterlaceAlgorithmBlendTicker = "BLEND_TICKER" -) - -// - When set to NORMAL (default), the deinterlacer does not convert frames -// that are tagged in metadata as progressive. It will only convert those that -// are tagged as some other type. - When set to FORCE_ALL_FRAMES, the deinterlacer -// converts every frame to progressive - even those that are already tagged -// as progressive. Turn Force mode on only if there is a good chance that the -// metadata has tagged frames as progressive when they are not progressive. -// Do not turn on otherwise; processing frames that are already progressive -// into progressive will probably result in lower quality video. -const ( - // DeinterlacerControlForceAllFrames is a DeinterlacerControl enum value - DeinterlacerControlForceAllFrames = "FORCE_ALL_FRAMES" - - // DeinterlacerControlNormal is a DeinterlacerControl enum value - DeinterlacerControlNormal = "NORMAL" -) - -// Use Deinterlacer (DeinterlaceMode) to choose how the service will do deinterlacing. -// Default is Deinterlace. - Deinterlace converts interlaced to progressive. -// - Inverse telecine converts Hard Telecine 29.97i to progressive 23.976p. -// - Adaptive auto-detects and converts to progressive. -const ( - // DeinterlacerModeDeinterlace is a DeinterlacerMode enum value - DeinterlacerModeDeinterlace = "DEINTERLACE" - - // DeinterlacerModeInverseTelecine is a DeinterlacerMode enum value - DeinterlacerModeInverseTelecine = "INVERSE_TELECINE" - - // DeinterlacerModeAdaptive is a DeinterlacerMode enum value - DeinterlacerModeAdaptive = "ADAPTIVE" -) - -// Optional field, defaults to DEFAULT. Specify DEFAULT for this operation to -// return your endpoints if any exist, or to create an endpoint for you and -// return it if one doesn't already exist. Specify GET_ONLY to return your endpoints -// if any exist, or an empty list if none exist. -const ( - // DescribeEndpointsModeDefault is a DescribeEndpointsMode enum value - DescribeEndpointsModeDefault = "DEFAULT" - - // DescribeEndpointsModeGetOnly is a DescribeEndpointsMode enum value - DescribeEndpointsModeGetOnly = "GET_ONLY" -) - -// Applies only to 29.97 fps outputs. When this feature is enabled, the service -// will use drop-frame timecode on outputs. If it is not possible to use drop-frame -// timecode, the system will fall back to non-drop-frame. This setting is enabled -// by default when Timecode insertion (TimecodeInsertion) is enabled. -const ( - // DropFrameTimecodeDisabled is a DropFrameTimecode enum value - DropFrameTimecodeDisabled = "DISABLED" - - // DropFrameTimecodeEnabled is a DropFrameTimecode enum value - DropFrameTimecodeEnabled = "ENABLED" -) - -// If no explicit x_position or y_position is provided, setting alignment to -// centered will place the captions at the bottom center of the output. Similarly, -// setting a left alignment will align captions to the bottom left of the output. -// If x and y positions are given in conjunction with the alignment parameter, -// the font will be justified (either left or centered) relative to those coordinates. -// This option is not valid for source captions that are STL, 608/embedded or -// teletext. These source settings are already pre-defined by the caption stream. -// All burn-in and DVB-Sub font settings must match. -const ( - // DvbSubtitleAlignmentCentered is a DvbSubtitleAlignment enum value - DvbSubtitleAlignmentCentered = "CENTERED" - - // DvbSubtitleAlignmentLeft is a DvbSubtitleAlignment enum value - DvbSubtitleAlignmentLeft = "LEFT" -) - -// Specifies the color of the rectangle behind the captions.All burn-in and -// DVB-Sub font settings must match. -const ( - // DvbSubtitleBackgroundColorNone is a DvbSubtitleBackgroundColor enum value - DvbSubtitleBackgroundColorNone = "NONE" - - // DvbSubtitleBackgroundColorBlack is a DvbSubtitleBackgroundColor enum value - DvbSubtitleBackgroundColorBlack = "BLACK" - - // DvbSubtitleBackgroundColorWhite is a DvbSubtitleBackgroundColor enum value - DvbSubtitleBackgroundColorWhite = "WHITE" -) - -// Specifies the color of the burned-in captions. This option is not valid for -// source captions that are STL, 608/embedded or teletext. These source settings -// are already pre-defined by the caption stream. All burn-in and DVB-Sub font -// settings must match. -const ( - // DvbSubtitleFontColorWhite is a DvbSubtitleFontColor enum value - DvbSubtitleFontColorWhite = "WHITE" - - // DvbSubtitleFontColorBlack is a DvbSubtitleFontColor enum value - DvbSubtitleFontColorBlack = "BLACK" - - // DvbSubtitleFontColorYellow is a DvbSubtitleFontColor enum value - DvbSubtitleFontColorYellow = "YELLOW" - - // DvbSubtitleFontColorRed is a DvbSubtitleFontColor enum value - DvbSubtitleFontColorRed = "RED" - - // DvbSubtitleFontColorGreen is a DvbSubtitleFontColor enum value - DvbSubtitleFontColorGreen = "GREEN" - - // DvbSubtitleFontColorBlue is a DvbSubtitleFontColor enum value - DvbSubtitleFontColorBlue = "BLUE" -) - -// Specifies font outline color. This option is not valid for source captions -// that are either 608/embedded or teletext. These source settings are already -// pre-defined by the caption stream. All burn-in and DVB-Sub font settings -// must match. -const ( - // DvbSubtitleOutlineColorBlack is a DvbSubtitleOutlineColor enum value - DvbSubtitleOutlineColorBlack = "BLACK" - - // DvbSubtitleOutlineColorWhite is a DvbSubtitleOutlineColor enum value - DvbSubtitleOutlineColorWhite = "WHITE" - - // DvbSubtitleOutlineColorYellow is a DvbSubtitleOutlineColor enum value - DvbSubtitleOutlineColorYellow = "YELLOW" - - // DvbSubtitleOutlineColorRed is a DvbSubtitleOutlineColor enum value - DvbSubtitleOutlineColorRed = "RED" - - // DvbSubtitleOutlineColorGreen is a DvbSubtitleOutlineColor enum value - DvbSubtitleOutlineColorGreen = "GREEN" - - // DvbSubtitleOutlineColorBlue is a DvbSubtitleOutlineColor enum value - DvbSubtitleOutlineColorBlue = "BLUE" -) - -// Specifies the color of the shadow cast by the captions.All burn-in and DVB-Sub -// font settings must match. -const ( - // DvbSubtitleShadowColorNone is a DvbSubtitleShadowColor enum value - DvbSubtitleShadowColorNone = "NONE" - - // DvbSubtitleShadowColorBlack is a DvbSubtitleShadowColor enum value - DvbSubtitleShadowColorBlack = "BLACK" - - // DvbSubtitleShadowColorWhite is a DvbSubtitleShadowColor enum value - DvbSubtitleShadowColorWhite = "WHITE" -) - -// Only applies to jobs with input captions in Teletext or STL formats. Specify -// whether the spacing between letters in your captions is set by the captions -// grid or varies depending on letter width. Choose fixed grid to conform to -// the spacing specified in the captions file more accurately. Choose proportional -// to make the text easier to read if the captions are closed caption. -const ( - // DvbSubtitleTeletextSpacingFixedGrid is a DvbSubtitleTeletextSpacing enum value - DvbSubtitleTeletextSpacingFixedGrid = "FIXED_GRID" - - // DvbSubtitleTeletextSpacingProportional is a DvbSubtitleTeletextSpacing enum value - DvbSubtitleTeletextSpacingProportional = "PROPORTIONAL" -) - -// If set to ATTENUATE_3_DB, applies a 3 dB attenuation to the surround channels. -// Only used for 3/2 coding mode. -const ( - // Eac3AttenuationControlAttenuate3Db is a Eac3AttenuationControl enum value - Eac3AttenuationControlAttenuate3Db = "ATTENUATE_3_DB" - - // Eac3AttenuationControlNone is a Eac3AttenuationControl enum value - Eac3AttenuationControlNone = "NONE" -) - -// Specifies the "Bitstream Mode" (bsmod) for the emitted E-AC-3 stream. See -// ATSC A/52-2012 (Annex E) for background on these values. -const ( - // Eac3BitstreamModeCompleteMain is a Eac3BitstreamMode enum value - Eac3BitstreamModeCompleteMain = "COMPLETE_MAIN" - - // Eac3BitstreamModeCommentary is a Eac3BitstreamMode enum value - Eac3BitstreamModeCommentary = "COMMENTARY" - - // Eac3BitstreamModeEmergency is a Eac3BitstreamMode enum value - Eac3BitstreamModeEmergency = "EMERGENCY" - - // Eac3BitstreamModeHearingImpaired is a Eac3BitstreamMode enum value - Eac3BitstreamModeHearingImpaired = "HEARING_IMPAIRED" - - // Eac3BitstreamModeVisuallyImpaired is a Eac3BitstreamMode enum value - Eac3BitstreamModeVisuallyImpaired = "VISUALLY_IMPAIRED" -) - -// Dolby Digital Plus coding mode. Determines number of channels. -const ( - // Eac3CodingModeCodingMode10 is a Eac3CodingMode enum value - Eac3CodingModeCodingMode10 = "CODING_MODE_1_0" - - // Eac3CodingModeCodingMode20 is a Eac3CodingMode enum value - Eac3CodingModeCodingMode20 = "CODING_MODE_2_0" - - // Eac3CodingModeCodingMode32 is a Eac3CodingMode enum value - Eac3CodingModeCodingMode32 = "CODING_MODE_3_2" -) - -// Activates a DC highpass filter for all input channels. -const ( - // Eac3DcFilterEnabled is a Eac3DcFilter enum value - Eac3DcFilterEnabled = "ENABLED" - - // Eac3DcFilterDisabled is a Eac3DcFilter enum value - Eac3DcFilterDisabled = "DISABLED" -) - -// Enables Dynamic Range Compression that restricts the absolute peak level -// for a signal. -const ( - // Eac3DynamicRangeCompressionLineNone is a Eac3DynamicRangeCompressionLine enum value - Eac3DynamicRangeCompressionLineNone = "NONE" - - // Eac3DynamicRangeCompressionLineFilmStandard is a Eac3DynamicRangeCompressionLine enum value - Eac3DynamicRangeCompressionLineFilmStandard = "FILM_STANDARD" - - // Eac3DynamicRangeCompressionLineFilmLight is a Eac3DynamicRangeCompressionLine enum value - Eac3DynamicRangeCompressionLineFilmLight = "FILM_LIGHT" - - // Eac3DynamicRangeCompressionLineMusicStandard is a Eac3DynamicRangeCompressionLine enum value - Eac3DynamicRangeCompressionLineMusicStandard = "MUSIC_STANDARD" - - // Eac3DynamicRangeCompressionLineMusicLight is a Eac3DynamicRangeCompressionLine enum value - Eac3DynamicRangeCompressionLineMusicLight = "MUSIC_LIGHT" - - // Eac3DynamicRangeCompressionLineSpeech is a Eac3DynamicRangeCompressionLine enum value - Eac3DynamicRangeCompressionLineSpeech = "SPEECH" -) - -// Enables Heavy Dynamic Range Compression, ensures that the instantaneous signal -// peaks do not exceed specified levels. -const ( - // Eac3DynamicRangeCompressionRfNone is a Eac3DynamicRangeCompressionRf enum value - Eac3DynamicRangeCompressionRfNone = "NONE" - - // Eac3DynamicRangeCompressionRfFilmStandard is a Eac3DynamicRangeCompressionRf enum value - Eac3DynamicRangeCompressionRfFilmStandard = "FILM_STANDARD" - - // Eac3DynamicRangeCompressionRfFilmLight is a Eac3DynamicRangeCompressionRf enum value - Eac3DynamicRangeCompressionRfFilmLight = "FILM_LIGHT" - - // Eac3DynamicRangeCompressionRfMusicStandard is a Eac3DynamicRangeCompressionRf enum value - Eac3DynamicRangeCompressionRfMusicStandard = "MUSIC_STANDARD" - - // Eac3DynamicRangeCompressionRfMusicLight is a Eac3DynamicRangeCompressionRf enum value - Eac3DynamicRangeCompressionRfMusicLight = "MUSIC_LIGHT" - - // Eac3DynamicRangeCompressionRfSpeech is a Eac3DynamicRangeCompressionRf enum value - Eac3DynamicRangeCompressionRfSpeech = "SPEECH" -) - -// When encoding 3/2 audio, controls whether the LFE channel is enabled -const ( - // Eac3LfeControlLfe is a Eac3LfeControl enum value - Eac3LfeControlLfe = "LFE" - - // Eac3LfeControlNoLfe is a Eac3LfeControl enum value - Eac3LfeControlNoLfe = "NO_LFE" -) - -// Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only -// valid with 3_2_LFE coding mode. -const ( - // Eac3LfeFilterEnabled is a Eac3LfeFilter enum value - Eac3LfeFilterEnabled = "ENABLED" - - // Eac3LfeFilterDisabled is a Eac3LfeFilter enum value - Eac3LfeFilterDisabled = "DISABLED" -) - -// When set to FOLLOW_INPUT, encoder metadata will be sourced from the DD, DD+, -// or DolbyE decoder that supplied this audio data. If audio was not supplied -// from one of these streams, then the static metadata settings will be used. -const ( - // Eac3MetadataControlFollowInput is a Eac3MetadataControl enum value - Eac3MetadataControlFollowInput = "FOLLOW_INPUT" - - // Eac3MetadataControlUseConfigured is a Eac3MetadataControl enum value - Eac3MetadataControlUseConfigured = "USE_CONFIGURED" -) - -// When set to WHEN_POSSIBLE, input DD+ audio will be passed through if it is -// present on the input. this detection is dynamic over the life of the transcode. -// Inputs that alternate between DD+ and non-DD+ content will have a consistent -// DD+ output as the system alternates between passthrough and encoding. -const ( - // Eac3PassthroughControlWhenPossible is a Eac3PassthroughControl enum value - Eac3PassthroughControlWhenPossible = "WHEN_POSSIBLE" - - // Eac3PassthroughControlNoPassthrough is a Eac3PassthroughControl enum value - Eac3PassthroughControlNoPassthrough = "NO_PASSTHROUGH" -) - -// Controls the amount of phase-shift applied to the surround channels. Only -// used for 3/2 coding mode. -const ( - // Eac3PhaseControlShift90Degrees is a Eac3PhaseControl enum value - Eac3PhaseControlShift90Degrees = "SHIFT_90_DEGREES" - - // Eac3PhaseControlNoShift is a Eac3PhaseControl enum value - Eac3PhaseControlNoShift = "NO_SHIFT" -) - -// Stereo downmix preference. Only used for 3/2 coding mode. -const ( - // Eac3StereoDownmixNotIndicated is a Eac3StereoDownmix enum value - Eac3StereoDownmixNotIndicated = "NOT_INDICATED" - - // Eac3StereoDownmixLoRo is a Eac3StereoDownmix enum value - Eac3StereoDownmixLoRo = "LO_RO" - - // Eac3StereoDownmixLtRt is a Eac3StereoDownmix enum value - Eac3StereoDownmixLtRt = "LT_RT" - - // Eac3StereoDownmixDpl2 is a Eac3StereoDownmix enum value - Eac3StereoDownmixDpl2 = "DPL2" -) - -// When encoding 3/2 audio, sets whether an extra center back surround channel -// is matrix encoded into the left and right surround channels. -const ( - // Eac3SurroundExModeNotIndicated is a Eac3SurroundExMode enum value - Eac3SurroundExModeNotIndicated = "NOT_INDICATED" - - // Eac3SurroundExModeEnabled is a Eac3SurroundExMode enum value - Eac3SurroundExModeEnabled = "ENABLED" - - // Eac3SurroundExModeDisabled is a Eac3SurroundExMode enum value - Eac3SurroundExModeDisabled = "DISABLED" -) - -// When encoding 2/0 audio, sets whether Dolby Surround is matrix encoded into -// the two channels. -const ( - // Eac3SurroundModeNotIndicated is a Eac3SurroundMode enum value - Eac3SurroundModeNotIndicated = "NOT_INDICATED" - - // Eac3SurroundModeEnabled is a Eac3SurroundMode enum value - Eac3SurroundModeEnabled = "ENABLED" - - // Eac3SurroundModeDisabled is a Eac3SurroundMode enum value - Eac3SurroundModeDisabled = "DISABLED" -) - -// When set to UPCONVERT, 608 data is both passed through via the "608 compatibility -// bytes" fields of the 708 wrapper as well as translated into 708. 708 data -// present in the source content will be discarded. -const ( - // EmbeddedConvert608To708Upconvert is a EmbeddedConvert608To708 enum value - EmbeddedConvert608To708Upconvert = "UPCONVERT" - - // EmbeddedConvert608To708Disabled is a EmbeddedConvert608To708 enum value - EmbeddedConvert608To708Disabled = "DISABLED" -) - -// If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning -// of the archive as required for progressive downloading. Otherwise it is placed -// normally at the end. -const ( - // F4vMoovPlacementProgressiveDownload is a F4vMoovPlacement enum value - F4vMoovPlacementProgressiveDownload = "PROGRESSIVE_DOWNLOAD" - - // F4vMoovPlacementNormal is a F4vMoovPlacement enum value - F4vMoovPlacementNormal = "NORMAL" -) - -// If set to UPCONVERT, 608 caption data is both passed through via the "608 -// compatibility bytes" fields of the 708 wrapper as well as translated into -// 708. 708 data present in the source content will be discarded. -const ( - // FileSourceConvert608To708Upconvert is a FileSourceConvert608To708 enum value - FileSourceConvert608To708Upconvert = "UPCONVERT" - - // FileSourceConvert608To708Disabled is a FileSourceConvert608To708 enum value - FileSourceConvert608To708Disabled = "DISABLED" -) - -// Provide the font script, using an ISO 15924 script code, if the LanguageCode -// is not sufficient for determining the script type. Where LanguageCode or -// CustomLanguageCode is sufficient, use "AUTOMATIC" or leave unset. -const ( - // FontScriptAutomatic is a FontScript enum value - FontScriptAutomatic = "AUTOMATIC" - - // FontScriptHans is a FontScript enum value - FontScriptHans = "HANS" - - // FontScriptHant is a FontScript enum value - FontScriptHant = "HANT" -) - -// Adaptive quantization. Allows intra-frame quantizers to vary to improve visual -// quality. -const ( - // H264AdaptiveQuantizationOff is a H264AdaptiveQuantization enum value - H264AdaptiveQuantizationOff = "OFF" - - // H264AdaptiveQuantizationLow is a H264AdaptiveQuantization enum value - H264AdaptiveQuantizationLow = "LOW" - - // H264AdaptiveQuantizationMedium is a H264AdaptiveQuantization enum value - H264AdaptiveQuantizationMedium = "MEDIUM" - - // H264AdaptiveQuantizationHigh is a H264AdaptiveQuantization enum value - H264AdaptiveQuantizationHigh = "HIGH" - - // H264AdaptiveQuantizationHigher is a H264AdaptiveQuantization enum value - H264AdaptiveQuantizationHigher = "HIGHER" - - // H264AdaptiveQuantizationMax is a H264AdaptiveQuantization enum value - H264AdaptiveQuantizationMax = "MAX" -) - -// Specify an H.264 level that is consistent with your output video settings. -// If you aren't sure what level to specify, choose Auto (AUTO). -const ( - // H264CodecLevelAuto is a H264CodecLevel enum value - H264CodecLevelAuto = "AUTO" - - // H264CodecLevelLevel1 is a H264CodecLevel enum value - H264CodecLevelLevel1 = "LEVEL_1" - - // H264CodecLevelLevel11 is a H264CodecLevel enum value - H264CodecLevelLevel11 = "LEVEL_1_1" - - // H264CodecLevelLevel12 is a H264CodecLevel enum value - H264CodecLevelLevel12 = "LEVEL_1_2" - - // H264CodecLevelLevel13 is a H264CodecLevel enum value - H264CodecLevelLevel13 = "LEVEL_1_3" - - // H264CodecLevelLevel2 is a H264CodecLevel enum value - H264CodecLevelLevel2 = "LEVEL_2" - - // H264CodecLevelLevel21 is a H264CodecLevel enum value - H264CodecLevelLevel21 = "LEVEL_2_1" - - // H264CodecLevelLevel22 is a H264CodecLevel enum value - H264CodecLevelLevel22 = "LEVEL_2_2" - - // H264CodecLevelLevel3 is a H264CodecLevel enum value - H264CodecLevelLevel3 = "LEVEL_3" - - // H264CodecLevelLevel31 is a H264CodecLevel enum value - H264CodecLevelLevel31 = "LEVEL_3_1" - - // H264CodecLevelLevel32 is a H264CodecLevel enum value - H264CodecLevelLevel32 = "LEVEL_3_2" - - // H264CodecLevelLevel4 is a H264CodecLevel enum value - H264CodecLevelLevel4 = "LEVEL_4" - - // H264CodecLevelLevel41 is a H264CodecLevel enum value - H264CodecLevelLevel41 = "LEVEL_4_1" - - // H264CodecLevelLevel42 is a H264CodecLevel enum value - H264CodecLevelLevel42 = "LEVEL_4_2" - - // H264CodecLevelLevel5 is a H264CodecLevel enum value - H264CodecLevelLevel5 = "LEVEL_5" - - // H264CodecLevelLevel51 is a H264CodecLevel enum value - H264CodecLevelLevel51 = "LEVEL_5_1" - - // H264CodecLevelLevel52 is a H264CodecLevel enum value - H264CodecLevelLevel52 = "LEVEL_5_2" -) - -// H.264 Profile. High 4:2:2 and 10-bit profiles are only available with the -// AVC-I License. -const ( - // H264CodecProfileBaseline is a H264CodecProfile enum value - H264CodecProfileBaseline = "BASELINE" - - // H264CodecProfileHigh is a H264CodecProfile enum value - H264CodecProfileHigh = "HIGH" - - // H264CodecProfileHigh10bit is a H264CodecProfile enum value - H264CodecProfileHigh10bit = "HIGH_10BIT" - - // H264CodecProfileHigh422 is a H264CodecProfile enum value - H264CodecProfileHigh422 = "HIGH_422" - - // H264CodecProfileHigh42210bit is a H264CodecProfile enum value - H264CodecProfileHigh42210bit = "HIGH_422_10BIT" - - // H264CodecProfileMain is a H264CodecProfile enum value - H264CodecProfileMain = "MAIN" -) - -// Choose Adaptive to improve subjective video quality for high-motion content. -// This will cause the service to use fewer B-frames (which infer information -// based on other frames) for high-motion portions of the video and more B-frames -// for low-motion portions. The maximum number of B-frames is limited by the -// value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames). -const ( - // H264DynamicSubGopAdaptive is a H264DynamicSubGop enum value - H264DynamicSubGopAdaptive = "ADAPTIVE" - - // H264DynamicSubGopStatic is a H264DynamicSubGop enum value - H264DynamicSubGopStatic = "STATIC" -) - -// Entropy encoding mode. Use CABAC (must be in Main or High profile) or CAVLC. -const ( - // H264EntropyEncodingCabac is a H264EntropyEncoding enum value - H264EntropyEncodingCabac = "CABAC" - - // H264EntropyEncodingCavlc is a H264EntropyEncoding enum value - H264EntropyEncodingCavlc = "CAVLC" -) - -// Choosing FORCE_FIELD disables PAFF encoding for interlaced outputs. -const ( - // H264FieldEncodingPaff is a H264FieldEncoding enum value - H264FieldEncodingPaff = "PAFF" - - // H264FieldEncodingForceField is a H264FieldEncoding enum value - H264FieldEncodingForceField = "FORCE_FIELD" -) - -// Adjust quantization within each frame to reduce flicker or 'pop' on I-frames. -const ( - // H264FlickerAdaptiveQuantizationDisabled is a H264FlickerAdaptiveQuantization enum value - H264FlickerAdaptiveQuantizationDisabled = "DISABLED" - - // H264FlickerAdaptiveQuantizationEnabled is a H264FlickerAdaptiveQuantization enum value - H264FlickerAdaptiveQuantizationEnabled = "ENABLED" -) - -// If you are using the console, use the Framerate setting to specify the frame -// rate for this output. If you want to keep the same frame rate as the input -// video, choose Follow source. If you want to do frame rate conversion, choose -// a frame rate from the dropdown list or choose Custom. The framerates shown -// in the dropdown list are decimal approximations of fractions. If you choose -// Custom, specify your frame rate as a fraction. If you are creating your transcoding -// job specification as a JSON file without the console, use FramerateControl -// to specify which value the service uses for the frame rate for this output. -// Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate -// from the input. Choose SPECIFIED if you want the service to use the frame -// rate you specify in the settings FramerateNumerator and FramerateDenominator. -const ( - // H264FramerateControlInitializeFromSource is a H264FramerateControl enum value - H264FramerateControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" - - // H264FramerateControlSpecified is a H264FramerateControl enum value - H264FramerateControlSpecified = "SPECIFIED" -) - -// When set to INTERPOLATE, produces smoother motion during frame rate conversion. -const ( - // H264FramerateConversionAlgorithmDuplicateDrop is a H264FramerateConversionAlgorithm enum value - H264FramerateConversionAlgorithmDuplicateDrop = "DUPLICATE_DROP" - - // H264FramerateConversionAlgorithmInterpolate is a H264FramerateConversionAlgorithm enum value - H264FramerateConversionAlgorithmInterpolate = "INTERPOLATE" -) - -// If enable, use reference B frames for GOP structures that have B frames > -// 1. -const ( - // H264GopBReferenceDisabled is a H264GopBReference enum value - H264GopBReferenceDisabled = "DISABLED" - - // H264GopBReferenceEnabled is a H264GopBReference enum value - H264GopBReferenceEnabled = "ENABLED" -) - -// Indicates if the GOP Size in H264 is specified in frames or seconds. If seconds -// the system will convert the GOP Size into a frame count at run time. -const ( - // H264GopSizeUnitsFrames is a H264GopSizeUnits enum value - H264GopSizeUnitsFrames = "FRAMES" - - // H264GopSizeUnitsSeconds is a H264GopSizeUnits enum value - H264GopSizeUnitsSeconds = "SECONDS" -) - -// Use Interlace mode (InterlaceMode) to choose the scan line type for the output. -// * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce -// interlaced output with the entire output having the same field polarity (top -// or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default -// Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, -// behavior depends on the input scan type, as follows. - If the source is interlaced, -// the output will be interlaced with the same polarity as the source (it will -// follow the source). The output could therefore be a mix of "top field first" -// and "bottom field first". - If the source is progressive, the output will -// be interlaced with "top field first" or "bottom field first" polarity, depending -// on which of the Follow options you chose. -const ( - // H264InterlaceModeProgressive is a H264InterlaceMode enum value - H264InterlaceModeProgressive = "PROGRESSIVE" - - // H264InterlaceModeTopField is a H264InterlaceMode enum value - H264InterlaceModeTopField = "TOP_FIELD" - - // H264InterlaceModeBottomField is a H264InterlaceMode enum value - H264InterlaceModeBottomField = "BOTTOM_FIELD" - - // H264InterlaceModeFollowTopField is a H264InterlaceMode enum value - H264InterlaceModeFollowTopField = "FOLLOW_TOP_FIELD" - - // H264InterlaceModeFollowBottomField is a H264InterlaceMode enum value - H264InterlaceModeFollowBottomField = "FOLLOW_BOTTOM_FIELD" -) - -// Using the API, enable ParFollowSource if you want the service to use the -// pixel aspect ratio from the input. Using the console, do this by choosing -// Follow source for Pixel aspect ratio. -const ( - // H264ParControlInitializeFromSource is a H264ParControl enum value - H264ParControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" - - // H264ParControlSpecified is a H264ParControl enum value - H264ParControlSpecified = "SPECIFIED" -) - -// Use Quality tuning level (H264QualityTuningLevel) to specifiy whether to -// use fast single-pass, high-quality singlepass, or high-quality multipass -// video encoding. -const ( - // H264QualityTuningLevelSinglePass is a H264QualityTuningLevel enum value - H264QualityTuningLevelSinglePass = "SINGLE_PASS" - - // H264QualityTuningLevelSinglePassHq is a H264QualityTuningLevel enum value - H264QualityTuningLevelSinglePassHq = "SINGLE_PASS_HQ" - - // H264QualityTuningLevelMultiPassHq is a H264QualityTuningLevel enum value - H264QualityTuningLevelMultiPassHq = "MULTI_PASS_HQ" -) - -// Use this setting to specify whether this output has a variable bitrate (VBR), -// constant bitrate (CBR) or quality-defined variable bitrate (QVBR). -const ( - // H264RateControlModeVbr is a H264RateControlMode enum value - H264RateControlModeVbr = "VBR" - - // H264RateControlModeCbr is a H264RateControlMode enum value - H264RateControlModeCbr = "CBR" - - // H264RateControlModeQvbr is a H264RateControlMode enum value - H264RateControlModeQvbr = "QVBR" -) - -// Places a PPS header on each encoded picture, even if repeated. -const ( - // H264RepeatPpsDisabled is a H264RepeatPps enum value - H264RepeatPpsDisabled = "DISABLED" - - // H264RepeatPpsEnabled is a H264RepeatPps enum value - H264RepeatPpsEnabled = "ENABLED" -) - -// Scene change detection (inserts I-frames on scene changes). -const ( - // H264SceneChangeDetectDisabled is a H264SceneChangeDetect enum value - H264SceneChangeDetectDisabled = "DISABLED" - - // H264SceneChangeDetectEnabled is a H264SceneChangeDetect enum value - H264SceneChangeDetectEnabled = "ENABLED" -) - -// Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled -// as 25fps, and audio is sped up correspondingly. -const ( - // H264SlowPalDisabled is a H264SlowPal enum value - H264SlowPalDisabled = "DISABLED" - - // H264SlowPalEnabled is a H264SlowPal enum value - H264SlowPalEnabled = "ENABLED" -) - -// Adjust quantization within each frame based on spatial variation of content -// complexity. -const ( - // H264SpatialAdaptiveQuantizationDisabled is a H264SpatialAdaptiveQuantization enum value - H264SpatialAdaptiveQuantizationDisabled = "DISABLED" - - // H264SpatialAdaptiveQuantizationEnabled is a H264SpatialAdaptiveQuantization enum value - H264SpatialAdaptiveQuantizationEnabled = "ENABLED" -) - -// Produces a bitstream compliant with SMPTE RP-2027. -const ( - // H264SyntaxDefault is a H264Syntax enum value - H264SyntaxDefault = "DEFAULT" - - // H264SyntaxRp2027 is a H264Syntax enum value - H264SyntaxRp2027 = "RP2027" -) - -// This field applies only if the Streams > Advanced > Framerate (framerate) -// field is set to 29.970. This field works with the Streams > Advanced > Preprocessors -// > Deinterlacer field (deinterlace_mode) and the Streams > Advanced > Interlaced -// Mode field (interlace_mode) to identify the scan type for the output: Progressive, -// Interlaced, Hard Telecine or Soft Telecine. - Hard: produces 29.97i output -// from 23.976 input. - Soft: produces 23.976; the player converts this output -// to 29.97i. -const ( - // H264TelecineNone is a H264Telecine enum value - H264TelecineNone = "NONE" - - // H264TelecineSoft is a H264Telecine enum value - H264TelecineSoft = "SOFT" - - // H264TelecineHard is a H264Telecine enum value - H264TelecineHard = "HARD" -) - -// Adjust quantization within each frame based on temporal variation of content -// complexity. -const ( - // H264TemporalAdaptiveQuantizationDisabled is a H264TemporalAdaptiveQuantization enum value - H264TemporalAdaptiveQuantizationDisabled = "DISABLED" - - // H264TemporalAdaptiveQuantizationEnabled is a H264TemporalAdaptiveQuantization enum value - H264TemporalAdaptiveQuantizationEnabled = "ENABLED" -) - -// Inserts timecode for each frame as 4 bytes of an unregistered SEI message. -const ( - // H264UnregisteredSeiTimecodeDisabled is a H264UnregisteredSeiTimecode enum value - H264UnregisteredSeiTimecodeDisabled = "DISABLED" - - // H264UnregisteredSeiTimecodeEnabled is a H264UnregisteredSeiTimecode enum value - H264UnregisteredSeiTimecodeEnabled = "ENABLED" -) - -// Adaptive quantization. Allows intra-frame quantizers to vary to improve visual -// quality. -const ( - // H265AdaptiveQuantizationOff is a H265AdaptiveQuantization enum value - H265AdaptiveQuantizationOff = "OFF" - - // H265AdaptiveQuantizationLow is a H265AdaptiveQuantization enum value - H265AdaptiveQuantizationLow = "LOW" - - // H265AdaptiveQuantizationMedium is a H265AdaptiveQuantization enum value - H265AdaptiveQuantizationMedium = "MEDIUM" - - // H265AdaptiveQuantizationHigh is a H265AdaptiveQuantization enum value - H265AdaptiveQuantizationHigh = "HIGH" - - // H265AdaptiveQuantizationHigher is a H265AdaptiveQuantization enum value - H265AdaptiveQuantizationHigher = "HIGHER" - - // H265AdaptiveQuantizationMax is a H265AdaptiveQuantization enum value - H265AdaptiveQuantizationMax = "MAX" -) - -// Enables Alternate Transfer Function SEI message for outputs using Hybrid -// Log Gamma (HLG) Electro-Optical Transfer Function (EOTF). -const ( - // H265AlternateTransferFunctionSeiDisabled is a H265AlternateTransferFunctionSei enum value - H265AlternateTransferFunctionSeiDisabled = "DISABLED" - - // H265AlternateTransferFunctionSeiEnabled is a H265AlternateTransferFunctionSei enum value - H265AlternateTransferFunctionSeiEnabled = "ENABLED" -) - -// H.265 Level. -const ( - // H265CodecLevelAuto is a H265CodecLevel enum value - H265CodecLevelAuto = "AUTO" - - // H265CodecLevelLevel1 is a H265CodecLevel enum value - H265CodecLevelLevel1 = "LEVEL_1" - - // H265CodecLevelLevel2 is a H265CodecLevel enum value - H265CodecLevelLevel2 = "LEVEL_2" - - // H265CodecLevelLevel21 is a H265CodecLevel enum value - H265CodecLevelLevel21 = "LEVEL_2_1" - - // H265CodecLevelLevel3 is a H265CodecLevel enum value - H265CodecLevelLevel3 = "LEVEL_3" - - // H265CodecLevelLevel31 is a H265CodecLevel enum value - H265CodecLevelLevel31 = "LEVEL_3_1" - - // H265CodecLevelLevel4 is a H265CodecLevel enum value - H265CodecLevelLevel4 = "LEVEL_4" - - // H265CodecLevelLevel41 is a H265CodecLevel enum value - H265CodecLevelLevel41 = "LEVEL_4_1" - - // H265CodecLevelLevel5 is a H265CodecLevel enum value - H265CodecLevelLevel5 = "LEVEL_5" - - // H265CodecLevelLevel51 is a H265CodecLevel enum value - H265CodecLevelLevel51 = "LEVEL_5_1" - - // H265CodecLevelLevel52 is a H265CodecLevel enum value - H265CodecLevelLevel52 = "LEVEL_5_2" - - // H265CodecLevelLevel6 is a H265CodecLevel enum value - H265CodecLevelLevel6 = "LEVEL_6" - - // H265CodecLevelLevel61 is a H265CodecLevel enum value - H265CodecLevelLevel61 = "LEVEL_6_1" - - // H265CodecLevelLevel62 is a H265CodecLevel enum value - H265CodecLevelLevel62 = "LEVEL_6_2" -) - -// Represents the Profile and Tier, per the HEVC (H.265) specification. Selections -// are grouped as [Profile] / [Tier], so "Main/High" represents Main Profile -// with High Tier. 4:2:2 profiles are only available with the HEVC 4:2:2 License. -const ( - // H265CodecProfileMainMain is a H265CodecProfile enum value - H265CodecProfileMainMain = "MAIN_MAIN" - - // H265CodecProfileMainHigh is a H265CodecProfile enum value - H265CodecProfileMainHigh = "MAIN_HIGH" - - // H265CodecProfileMain10Main is a H265CodecProfile enum value - H265CodecProfileMain10Main = "MAIN10_MAIN" - - // H265CodecProfileMain10High is a H265CodecProfile enum value - H265CodecProfileMain10High = "MAIN10_HIGH" - - // H265CodecProfileMain4228bitMain is a H265CodecProfile enum value - H265CodecProfileMain4228bitMain = "MAIN_422_8BIT_MAIN" - - // H265CodecProfileMain4228bitHigh is a H265CodecProfile enum value - H265CodecProfileMain4228bitHigh = "MAIN_422_8BIT_HIGH" - - // H265CodecProfileMain42210bitMain is a H265CodecProfile enum value - H265CodecProfileMain42210bitMain = "MAIN_422_10BIT_MAIN" - - // H265CodecProfileMain42210bitHigh is a H265CodecProfile enum value - H265CodecProfileMain42210bitHigh = "MAIN_422_10BIT_HIGH" -) - -// Choose Adaptive to improve subjective video quality for high-motion content. -// This will cause the service to use fewer B-frames (which infer information -// based on other frames) for high-motion portions of the video and more B-frames -// for low-motion portions. The maximum number of B-frames is limited by the -// value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames). -const ( - // H265DynamicSubGopAdaptive is a H265DynamicSubGop enum value - H265DynamicSubGopAdaptive = "ADAPTIVE" - - // H265DynamicSubGopStatic is a H265DynamicSubGop enum value - H265DynamicSubGopStatic = "STATIC" -) - -// Adjust quantization within each frame to reduce flicker or 'pop' on I-frames. -const ( - // H265FlickerAdaptiveQuantizationDisabled is a H265FlickerAdaptiveQuantization enum value - H265FlickerAdaptiveQuantizationDisabled = "DISABLED" - - // H265FlickerAdaptiveQuantizationEnabled is a H265FlickerAdaptiveQuantization enum value - H265FlickerAdaptiveQuantizationEnabled = "ENABLED" -) - -// If you are using the console, use the Framerate setting to specify the frame -// rate for this output. If you want to keep the same frame rate as the input -// video, choose Follow source. If you want to do frame rate conversion, choose -// a frame rate from the dropdown list or choose Custom. The framerates shown -// in the dropdown list are decimal approximations of fractions. If you choose -// Custom, specify your frame rate as a fraction. If you are creating your transcoding -// job sepecification as a JSON file without the console, use FramerateControl -// to specify which value the service uses for the frame rate for this output. -// Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate -// from the input. Choose SPECIFIED if you want the service to use the frame -// rate you specify in the settings FramerateNumerator and FramerateDenominator. -const ( - // H265FramerateControlInitializeFromSource is a H265FramerateControl enum value - H265FramerateControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" - - // H265FramerateControlSpecified is a H265FramerateControl enum value - H265FramerateControlSpecified = "SPECIFIED" -) - -// When set to INTERPOLATE, produces smoother motion during frame rate conversion. -const ( - // H265FramerateConversionAlgorithmDuplicateDrop is a H265FramerateConversionAlgorithm enum value - H265FramerateConversionAlgorithmDuplicateDrop = "DUPLICATE_DROP" - - // H265FramerateConversionAlgorithmInterpolate is a H265FramerateConversionAlgorithm enum value - H265FramerateConversionAlgorithmInterpolate = "INTERPOLATE" -) - -// If enable, use reference B frames for GOP structures that have B frames > -// 1. -const ( - // H265GopBReferenceDisabled is a H265GopBReference enum value - H265GopBReferenceDisabled = "DISABLED" - - // H265GopBReferenceEnabled is a H265GopBReference enum value - H265GopBReferenceEnabled = "ENABLED" -) - -// Indicates if the GOP Size in H265 is specified in frames or seconds. If seconds -// the system will convert the GOP Size into a frame count at run time. -const ( - // H265GopSizeUnitsFrames is a H265GopSizeUnits enum value - H265GopSizeUnitsFrames = "FRAMES" - - // H265GopSizeUnitsSeconds is a H265GopSizeUnits enum value - H265GopSizeUnitsSeconds = "SECONDS" -) - -// Use Interlace mode (InterlaceMode) to choose the scan line type for the output. -// * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce -// interlaced output with the entire output having the same field polarity (top -// or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default -// Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, -// behavior depends on the input scan type. - If the source is interlaced, the -// output will be interlaced with the same polarity as the source (it will follow -// the source). The output could therefore be a mix of "top field first" and -// "bottom field first". - If the source is progressive, the output will be -// interlaced with "top field first" or "bottom field first" polarity, depending -// on which of the Follow options you chose. -const ( - // H265InterlaceModeProgressive is a H265InterlaceMode enum value - H265InterlaceModeProgressive = "PROGRESSIVE" - - // H265InterlaceModeTopField is a H265InterlaceMode enum value - H265InterlaceModeTopField = "TOP_FIELD" - - // H265InterlaceModeBottomField is a H265InterlaceMode enum value - H265InterlaceModeBottomField = "BOTTOM_FIELD" - - // H265InterlaceModeFollowTopField is a H265InterlaceMode enum value - H265InterlaceModeFollowTopField = "FOLLOW_TOP_FIELD" - - // H265InterlaceModeFollowBottomField is a H265InterlaceMode enum value - H265InterlaceModeFollowBottomField = "FOLLOW_BOTTOM_FIELD" -) - -// Using the API, enable ParFollowSource if you want the service to use the -// pixel aspect ratio from the input. Using the console, do this by choosing -// Follow source for Pixel aspect ratio. -const ( - // H265ParControlInitializeFromSource is a H265ParControl enum value - H265ParControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" - - // H265ParControlSpecified is a H265ParControl enum value - H265ParControlSpecified = "SPECIFIED" -) - -// Use Quality tuning level (H265QualityTuningLevel) to specifiy whether to -// use fast single-pass, high-quality singlepass, or high-quality multipass -// video encoding. -const ( - // H265QualityTuningLevelSinglePass is a H265QualityTuningLevel enum value - H265QualityTuningLevelSinglePass = "SINGLE_PASS" - - // H265QualityTuningLevelSinglePassHq is a H265QualityTuningLevel enum value - H265QualityTuningLevelSinglePassHq = "SINGLE_PASS_HQ" - - // H265QualityTuningLevelMultiPassHq is a H265QualityTuningLevel enum value - H265QualityTuningLevelMultiPassHq = "MULTI_PASS_HQ" -) - -// Use this setting to specify whether this output has a variable bitrate (VBR), -// constant bitrate (CBR) or quality-defined variable bitrate (QVBR). -const ( - // H265RateControlModeVbr is a H265RateControlMode enum value - H265RateControlModeVbr = "VBR" - - // H265RateControlModeCbr is a H265RateControlMode enum value - H265RateControlModeCbr = "CBR" - - // H265RateControlModeQvbr is a H265RateControlMode enum value - H265RateControlModeQvbr = "QVBR" -) - -// Specify Sample Adaptive Offset (SAO) filter strength. Adaptive mode dynamically -// selects best strength based on content -const ( - // H265SampleAdaptiveOffsetFilterModeDefault is a H265SampleAdaptiveOffsetFilterMode enum value - H265SampleAdaptiveOffsetFilterModeDefault = "DEFAULT" - - // H265SampleAdaptiveOffsetFilterModeAdaptive is a H265SampleAdaptiveOffsetFilterMode enum value - H265SampleAdaptiveOffsetFilterModeAdaptive = "ADAPTIVE" - - // H265SampleAdaptiveOffsetFilterModeOff is a H265SampleAdaptiveOffsetFilterMode enum value - H265SampleAdaptiveOffsetFilterModeOff = "OFF" -) - -// Scene change detection (inserts I-frames on scene changes). -const ( - // H265SceneChangeDetectDisabled is a H265SceneChangeDetect enum value - H265SceneChangeDetectDisabled = "DISABLED" - - // H265SceneChangeDetectEnabled is a H265SceneChangeDetect enum value - H265SceneChangeDetectEnabled = "ENABLED" -) - -// Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled -// as 25fps, and audio is sped up correspondingly. -const ( - // H265SlowPalDisabled is a H265SlowPal enum value - H265SlowPalDisabled = "DISABLED" - - // H265SlowPalEnabled is a H265SlowPal enum value - H265SlowPalEnabled = "ENABLED" -) - -// Adjust quantization within each frame based on spatial variation of content -// complexity. -const ( - // H265SpatialAdaptiveQuantizationDisabled is a H265SpatialAdaptiveQuantization enum value - H265SpatialAdaptiveQuantizationDisabled = "DISABLED" - - // H265SpatialAdaptiveQuantizationEnabled is a H265SpatialAdaptiveQuantization enum value - H265SpatialAdaptiveQuantizationEnabled = "ENABLED" -) - -// This field applies only if the Streams > Advanced > Framerate (framerate) -// field is set to 29.970. This field works with the Streams > Advanced > Preprocessors -// > Deinterlacer field (deinterlace_mode) and the Streams > Advanced > Interlaced -// Mode field (interlace_mode) to identify the scan type for the output: Progressive, -// Interlaced, Hard Telecine or Soft Telecine. - Hard: produces 29.97i output -// from 23.976 input. - Soft: produces 23.976; the player converts this output -// to 29.97i. -const ( - // H265TelecineNone is a H265Telecine enum value - H265TelecineNone = "NONE" - - // H265TelecineSoft is a H265Telecine enum value - H265TelecineSoft = "SOFT" - - // H265TelecineHard is a H265Telecine enum value - H265TelecineHard = "HARD" -) - -// Adjust quantization within each frame based on temporal variation of content -// complexity. -const ( - // H265TemporalAdaptiveQuantizationDisabled is a H265TemporalAdaptiveQuantization enum value - H265TemporalAdaptiveQuantizationDisabled = "DISABLED" - - // H265TemporalAdaptiveQuantizationEnabled is a H265TemporalAdaptiveQuantization enum value - H265TemporalAdaptiveQuantizationEnabled = "ENABLED" -) - -// Enables temporal layer identifiers in the encoded bitstream. Up to 3 layers -// are supported depending on GOP structure: I- and P-frames form one layer, -// reference B-frames can form a second layer and non-reference b-frames can -// form a third layer. Decoders can optionally decode only the lower temporal -// layers to generate a lower frame rate output. For example, given a bitstream -// with temporal IDs and with b-frames = 1 (i.e. IbPbPb display order), a decoder -// could decode all the frames for full frame rate output or only the I and -// P frames (lowest temporal layer) for a half frame rate output. -const ( - // H265TemporalIdsDisabled is a H265TemporalIds enum value - H265TemporalIdsDisabled = "DISABLED" - - // H265TemporalIdsEnabled is a H265TemporalIds enum value - H265TemporalIdsEnabled = "ENABLED" -) - -// Enable use of tiles, allowing horizontal as well as vertical subdivision -// of the encoded pictures. -const ( - // H265TilesDisabled is a H265Tiles enum value - H265TilesDisabled = "DISABLED" - - // H265TilesEnabled is a H265Tiles enum value - H265TilesEnabled = "ENABLED" -) - -// Inserts timecode for each frame as 4 bytes of an unregistered SEI message. -const ( - // H265UnregisteredSeiTimecodeDisabled is a H265UnregisteredSeiTimecode enum value - H265UnregisteredSeiTimecodeDisabled = "DISABLED" - - // H265UnregisteredSeiTimecodeEnabled is a H265UnregisteredSeiTimecode enum value - H265UnregisteredSeiTimecodeEnabled = "ENABLED" -) - -// If HVC1, output that is H.265 will be marked as HVC1 and adhere to the ISO-IECJTC1-SC29_N13798_Text_ISOIEC_FDIS_14496-15_3rd_E -// spec which states that parameter set NAL units will be stored in the sample -// headers but not in the samples directly. If HEV1, then H.265 will be marked -// as HEV1 and parameter set NAL units will be written into the samples. -const ( - // H265WriteMp4PackagingTypeHvc1 is a H265WriteMp4PackagingType enum value - H265WriteMp4PackagingTypeHvc1 = "HVC1" - - // H265WriteMp4PackagingTypeHev1 is a H265WriteMp4PackagingType enum value - H265WriteMp4PackagingTypeHev1 = "HEV1" -) - -const ( - // HlsAdMarkersElemental is a HlsAdMarkers enum value - HlsAdMarkersElemental = "ELEMENTAL" - - // HlsAdMarkersElementalScte35 is a HlsAdMarkers enum value - HlsAdMarkersElementalScte35 = "ELEMENTAL_SCTE35" -) - -// Four types of audio-only tracks are supported: Audio-Only Variant Stream -// The client can play back this audio-only stream instead of video in low-bandwidth -// scenarios. Represented as an EXT-X-STREAM-INF in the HLS manifest. Alternate -// Audio, Auto Select, Default Alternate rendition that the client should try -// to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest -// with DEFAULT=YES, AUTOSELECT=YES Alternate Audio, Auto Select, Not Default -// Alternate rendition that the client may try to play back by default. Represented -// as an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=YES Alternate -// Audio, not Auto Select Alternate rendition that the client will not try to -// play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with -// DEFAULT=NO, AUTOSELECT=NO -const ( - // HlsAudioTrackTypeAlternateAudioAutoSelectDefault is a HlsAudioTrackType enum value - HlsAudioTrackTypeAlternateAudioAutoSelectDefault = "ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT" - - // HlsAudioTrackTypeAlternateAudioAutoSelect is a HlsAudioTrackType enum value - HlsAudioTrackTypeAlternateAudioAutoSelect = "ALTERNATE_AUDIO_AUTO_SELECT" - - // HlsAudioTrackTypeAlternateAudioNotAutoSelect is a HlsAudioTrackType enum value - HlsAudioTrackTypeAlternateAudioNotAutoSelect = "ALTERNATE_AUDIO_NOT_AUTO_SELECT" - - // HlsAudioTrackTypeAudioOnlyVariantStream is a HlsAudioTrackType enum value - HlsAudioTrackTypeAudioOnlyVariantStream = "AUDIO_ONLY_VARIANT_STREAM" -) - -// Applies only to 608 Embedded output captions. Insert: Include CLOSED-CAPTIONS -// lines in the manifest. Specify at least one language in the CC1 Language -// Code field. One CLOSED-CAPTION line is added for each Language Code you specify. -// Make sure to specify the languages in the order in which they appear in the -// original source (if the source is embedded format) or the order of the caption -// selectors (if the source is other than embedded). Otherwise, languages in -// the manifest will not match up properly with the output captions. None: Include -// CLOSED-CAPTIONS=NONE line in the manifest. Omit: Omit any CLOSED-CAPTIONS -// line from the manifest. -const ( - // HlsCaptionLanguageSettingInsert is a HlsCaptionLanguageSetting enum value - HlsCaptionLanguageSettingInsert = "INSERT" - - // HlsCaptionLanguageSettingOmit is a HlsCaptionLanguageSetting enum value - HlsCaptionLanguageSettingOmit = "OMIT" - - // HlsCaptionLanguageSettingNone is a HlsCaptionLanguageSetting enum value - HlsCaptionLanguageSettingNone = "NONE" -) - -// When set to ENABLED, sets #EXT-X-ALLOW-CACHE:no tag, which prevents client -// from saving media segments for later replay. -const ( - // HlsClientCacheDisabled is a HlsClientCache enum value - HlsClientCacheDisabled = "DISABLED" - - // HlsClientCacheEnabled is a HlsClientCache enum value - HlsClientCacheEnabled = "ENABLED" -) - -// Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist -// generation. -const ( - // HlsCodecSpecificationRfc6381 is a HlsCodecSpecification enum value - HlsCodecSpecificationRfc6381 = "RFC_6381" - - // HlsCodecSpecificationRfc4281 is a HlsCodecSpecification enum value - HlsCodecSpecificationRfc4281 = "RFC_4281" -) - -// Indicates whether segments should be placed in subdirectories. -const ( - // HlsDirectoryStructureSingleDirectory is a HlsDirectoryStructure enum value - HlsDirectoryStructureSingleDirectory = "SINGLE_DIRECTORY" - - // HlsDirectoryStructureSubdirectoryPerStream is a HlsDirectoryStructure enum value - HlsDirectoryStructureSubdirectoryPerStream = "SUBDIRECTORY_PER_STREAM" -) - -// Encrypts the segments with the given encryption scheme. Leave blank to disable. -// Selecting 'Disabled' in the web interface also disables encryption. -const ( - // HlsEncryptionTypeAes128 is a HlsEncryptionType enum value - HlsEncryptionTypeAes128 = "AES128" - - // HlsEncryptionTypeSampleAes is a HlsEncryptionType enum value - HlsEncryptionTypeSampleAes = "SAMPLE_AES" -) - -// When set to INCLUDE, writes I-Frame Only Manifest in addition to the HLS -// manifest -const ( - // HlsIFrameOnlyManifestInclude is a HlsIFrameOnlyManifest enum value - HlsIFrameOnlyManifestInclude = "INCLUDE" - - // HlsIFrameOnlyManifestExclude is a HlsIFrameOnlyManifest enum value - HlsIFrameOnlyManifestExclude = "EXCLUDE" -) - -// The Initialization Vector is a 128-bit number used in conjunction with the -// key for encrypting blocks. If set to INCLUDE, Initialization Vector is listed -// in the manifest. Otherwise Initialization Vector is not in the manifest. -const ( - // HlsInitializationVectorInManifestInclude is a HlsInitializationVectorInManifest enum value - HlsInitializationVectorInManifestInclude = "INCLUDE" - - // HlsInitializationVectorInManifestExclude is a HlsInitializationVectorInManifest enum value - HlsInitializationVectorInManifestExclude = "EXCLUDE" -) - -// Indicates which type of key provider is used for encryption. -const ( - // HlsKeyProviderTypeSpeke is a HlsKeyProviderType enum value - HlsKeyProviderTypeSpeke = "SPEKE" - - // HlsKeyProviderTypeStaticKey is a HlsKeyProviderType enum value - HlsKeyProviderTypeStaticKey = "STATIC_KEY" -) - -// When set to GZIP, compresses HLS playlist. -const ( - // HlsManifestCompressionGzip is a HlsManifestCompression enum value - HlsManifestCompressionGzip = "GZIP" - - // HlsManifestCompressionNone is a HlsManifestCompression enum value - HlsManifestCompressionNone = "NONE" -) - -// Indicates whether the output manifest should use floating point values for -// segment duration. -const ( - // HlsManifestDurationFormatFloatingPoint is a HlsManifestDurationFormat enum value - HlsManifestDurationFormatFloatingPoint = "FLOATING_POINT" - - // HlsManifestDurationFormatInteger is a HlsManifestDurationFormat enum value - HlsManifestDurationFormatInteger = "INTEGER" -) - -// Indicates whether the .m3u8 manifest file should be generated for this HLS -// output group. -const ( - // HlsOutputSelectionManifestsAndSegments is a HlsOutputSelection enum value - HlsOutputSelectionManifestsAndSegments = "MANIFESTS_AND_SEGMENTS" - - // HlsOutputSelectionSegmentsOnly is a HlsOutputSelection enum value - HlsOutputSelectionSegmentsOnly = "SEGMENTS_ONLY" -) - -// Includes or excludes EXT-X-PROGRAM-DATE-TIME tag in .m3u8 manifest files. -// The value is calculated as follows: either the program date and time are -// initialized using the input timecode source, or the time is initialized using -// the input timecode source and the date is initialized using the timestamp_offset. -const ( - // HlsProgramDateTimeInclude is a HlsProgramDateTime enum value - HlsProgramDateTimeInclude = "INCLUDE" - - // HlsProgramDateTimeExclude is a HlsProgramDateTime enum value - HlsProgramDateTimeExclude = "EXCLUDE" -) - -// When set to SINGLE_FILE, emits program as a single media resource (.ts) file, -// uses #EXT-X-BYTERANGE tags to index segment for playback. -const ( - // HlsSegmentControlSingleFile is a HlsSegmentControl enum value - HlsSegmentControlSingleFile = "SINGLE_FILE" - - // HlsSegmentControlSegmentedFiles is a HlsSegmentControl enum value - HlsSegmentControlSegmentedFiles = "SEGMENTED_FILES" -) - -// Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag -// of variant manifest. -const ( - // HlsStreamInfResolutionInclude is a HlsStreamInfResolution enum value - HlsStreamInfResolutionInclude = "INCLUDE" - - // HlsStreamInfResolutionExclude is a HlsStreamInfResolution enum value - HlsStreamInfResolutionExclude = "EXCLUDE" -) - -// Indicates ID3 frame that has the timecode. -const ( - // HlsTimedMetadataId3FrameNone is a HlsTimedMetadataId3Frame enum value - HlsTimedMetadataId3FrameNone = "NONE" - - // HlsTimedMetadataId3FramePriv is a HlsTimedMetadataId3Frame enum value - HlsTimedMetadataId3FramePriv = "PRIV" - - // HlsTimedMetadataId3FrameTdrl is a HlsTimedMetadataId3Frame enum value - HlsTimedMetadataId3FrameTdrl = "TDRL" -) - -// Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. -// Default is disabled. Only manaully controllable for MPEG2 and uncompressed -// video inputs. -const ( - // InputDeblockFilterEnabled is a InputDeblockFilter enum value - InputDeblockFilterEnabled = "ENABLED" - - // InputDeblockFilterDisabled is a InputDeblockFilter enum value - InputDeblockFilterDisabled = "DISABLED" -) - -// Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default -// is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video -// inputs. -const ( - // InputDenoiseFilterEnabled is a InputDenoiseFilter enum value - InputDenoiseFilterEnabled = "ENABLED" - - // InputDenoiseFilterDisabled is a InputDenoiseFilter enum value - InputDenoiseFilterDisabled = "DISABLED" -) - -// Use Filter enable (InputFilterEnable) to specify how the transcoding service -// applies the denoise and deblock filters. You must also enable the filters -// separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). -// * Auto - The transcoding service determines whether to apply filtering, depending -// on input type and quality. * Disable - The input is not filtered. This is -// true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). -// * Force - The in put is filtered regardless of input type. -const ( - // InputFilterEnableAuto is a InputFilterEnable enum value - InputFilterEnableAuto = "AUTO" - - // InputFilterEnableDisable is a InputFilterEnable enum value - InputFilterEnableDisable = "DISABLE" - - // InputFilterEnableForce is a InputFilterEnable enum value - InputFilterEnableForce = "FORCE" -) - -// Set PSI control (InputPsiControl) for transport stream inputs to specify -// which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio -// and video. * Use PSI - Scan only PSI data. -const ( - // InputPsiControlIgnorePsi is a InputPsiControl enum value - InputPsiControlIgnorePsi = "IGNORE_PSI" - - // InputPsiControlUsePsi is a InputPsiControl enum value - InputPsiControlUsePsi = "USE_PSI" -) - -// Timecode source under input settings (InputTimecodeSource) only affects the -// behavior of features that apply to a single input at a time, such as input -// clipping and synchronizing some captions formats. Use this setting to specify -// whether the service counts frames by timecodes embedded in the video (EMBEDDED) -// or by starting the first frame at zero (ZEROBASED). In both cases, the timecode -// format is HH:MM:SS:FF or HH:MM:SS;FF, where FF is the frame number. Only -// set this to EMBEDDED if your source video has embedded timecodes. -const ( - // InputTimecodeSourceEmbedded is a InputTimecodeSource enum value - InputTimecodeSourceEmbedded = "EMBEDDED" - - // InputTimecodeSourceZerobased is a InputTimecodeSource enum value - InputTimecodeSourceZerobased = "ZEROBASED" - - // InputTimecodeSourceSpecifiedstart is a InputTimecodeSource enum value - InputTimecodeSourceSpecifiedstart = "SPECIFIEDSTART" -) - -// A job's status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or ERROR. -const ( - // JobStatusSubmitted is a JobStatus enum value - JobStatusSubmitted = "SUBMITTED" - - // JobStatusProgressing is a JobStatus enum value - JobStatusProgressing = "PROGRESSING" - - // JobStatusComplete is a JobStatus enum value - JobStatusComplete = "COMPLETE" - - // JobStatusCanceled is a JobStatus enum value - JobStatusCanceled = "CANCELED" - - // JobStatusError is a JobStatus enum value - JobStatusError = "ERROR" -) - -// Optional. When you request a list of job templates, you can choose to list -// them alphabetically by NAME or chronologically by CREATION_DATE. If you don't -// specify, the service will list them by name. -const ( - // JobTemplateListByName is a JobTemplateListBy enum value - JobTemplateListByName = "NAME" - - // JobTemplateListByCreationDate is a JobTemplateListBy enum value - JobTemplateListByCreationDate = "CREATION_DATE" - - // JobTemplateListBySystem is a JobTemplateListBy enum value - JobTemplateListBySystem = "SYSTEM" -) - -// Specify the language, using the ISO 639-2 three-letter code listed at https://www.loc.gov/standards/iso639-2/php/code_list.php. -const ( - // LanguageCodeEng is a LanguageCode enum value - LanguageCodeEng = "ENG" - - // LanguageCodeSpa is a LanguageCode enum value - LanguageCodeSpa = "SPA" - - // LanguageCodeFra is a LanguageCode enum value - LanguageCodeFra = "FRA" - - // LanguageCodeDeu is a LanguageCode enum value - LanguageCodeDeu = "DEU" - - // LanguageCodeGer is a LanguageCode enum value - LanguageCodeGer = "GER" - - // LanguageCodeZho is a LanguageCode enum value - LanguageCodeZho = "ZHO" - - // LanguageCodeAra is a LanguageCode enum value - LanguageCodeAra = "ARA" - - // LanguageCodeHin is a LanguageCode enum value - LanguageCodeHin = "HIN" - - // LanguageCodeJpn is a LanguageCode enum value - LanguageCodeJpn = "JPN" - - // LanguageCodeRus is a LanguageCode enum value - LanguageCodeRus = "RUS" - - // LanguageCodePor is a LanguageCode enum value - LanguageCodePor = "POR" - - // LanguageCodeIta is a LanguageCode enum value - LanguageCodeIta = "ITA" - - // LanguageCodeUrd is a LanguageCode enum value - LanguageCodeUrd = "URD" - - // LanguageCodeVie is a LanguageCode enum value - LanguageCodeVie = "VIE" - - // LanguageCodeKor is a LanguageCode enum value - LanguageCodeKor = "KOR" - - // LanguageCodePan is a LanguageCode enum value - LanguageCodePan = "PAN" - - // LanguageCodeAbk is a LanguageCode enum value - LanguageCodeAbk = "ABK" - - // LanguageCodeAar is a LanguageCode enum value - LanguageCodeAar = "AAR" - - // LanguageCodeAfr is a LanguageCode enum value - LanguageCodeAfr = "AFR" - - // LanguageCodeAka is a LanguageCode enum value - LanguageCodeAka = "AKA" - - // LanguageCodeSqi is a LanguageCode enum value - LanguageCodeSqi = "SQI" - - // LanguageCodeAmh is a LanguageCode enum value - LanguageCodeAmh = "AMH" - - // LanguageCodeArg is a LanguageCode enum value - LanguageCodeArg = "ARG" - - // LanguageCodeHye is a LanguageCode enum value - LanguageCodeHye = "HYE" - - // LanguageCodeAsm is a LanguageCode enum value - LanguageCodeAsm = "ASM" - - // LanguageCodeAva is a LanguageCode enum value - LanguageCodeAva = "AVA" - - // LanguageCodeAve is a LanguageCode enum value - LanguageCodeAve = "AVE" - - // LanguageCodeAym is a LanguageCode enum value - LanguageCodeAym = "AYM" - - // LanguageCodeAze is a LanguageCode enum value - LanguageCodeAze = "AZE" - - // LanguageCodeBam is a LanguageCode enum value - LanguageCodeBam = "BAM" - - // LanguageCodeBak is a LanguageCode enum value - LanguageCodeBak = "BAK" - - // LanguageCodeEus is a LanguageCode enum value - LanguageCodeEus = "EUS" - - // LanguageCodeBel is a LanguageCode enum value - LanguageCodeBel = "BEL" - - // LanguageCodeBen is a LanguageCode enum value - LanguageCodeBen = "BEN" - - // LanguageCodeBih is a LanguageCode enum value - LanguageCodeBih = "BIH" - - // LanguageCodeBis is a LanguageCode enum value - LanguageCodeBis = "BIS" - - // LanguageCodeBos is a LanguageCode enum value - LanguageCodeBos = "BOS" - - // LanguageCodeBre is a LanguageCode enum value - LanguageCodeBre = "BRE" - - // LanguageCodeBul is a LanguageCode enum value - LanguageCodeBul = "BUL" - - // LanguageCodeMya is a LanguageCode enum value - LanguageCodeMya = "MYA" - - // LanguageCodeCat is a LanguageCode enum value - LanguageCodeCat = "CAT" - - // LanguageCodeKhm is a LanguageCode enum value - LanguageCodeKhm = "KHM" - - // LanguageCodeCha is a LanguageCode enum value - LanguageCodeCha = "CHA" - - // LanguageCodeChe is a LanguageCode enum value - LanguageCodeChe = "CHE" - - // LanguageCodeNya is a LanguageCode enum value - LanguageCodeNya = "NYA" - - // LanguageCodeChu is a LanguageCode enum value - LanguageCodeChu = "CHU" - - // LanguageCodeChv is a LanguageCode enum value - LanguageCodeChv = "CHV" - - // LanguageCodeCor is a LanguageCode enum value - LanguageCodeCor = "COR" - - // LanguageCodeCos is a LanguageCode enum value - LanguageCodeCos = "COS" - - // LanguageCodeCre is a LanguageCode enum value - LanguageCodeCre = "CRE" - - // LanguageCodeHrv is a LanguageCode enum value - LanguageCodeHrv = "HRV" - - // LanguageCodeCes is a LanguageCode enum value - LanguageCodeCes = "CES" - - // LanguageCodeDan is a LanguageCode enum value - LanguageCodeDan = "DAN" - - // LanguageCodeDiv is a LanguageCode enum value - LanguageCodeDiv = "DIV" - - // LanguageCodeNld is a LanguageCode enum value - LanguageCodeNld = "NLD" - - // LanguageCodeDzo is a LanguageCode enum value - LanguageCodeDzo = "DZO" - - // LanguageCodeEnm is a LanguageCode enum value - LanguageCodeEnm = "ENM" - - // LanguageCodeEpo is a LanguageCode enum value - LanguageCodeEpo = "EPO" - - // LanguageCodeEst is a LanguageCode enum value - LanguageCodeEst = "EST" - - // LanguageCodeEwe is a LanguageCode enum value - LanguageCodeEwe = "EWE" - - // LanguageCodeFao is a LanguageCode enum value - LanguageCodeFao = "FAO" - - // LanguageCodeFij is a LanguageCode enum value - LanguageCodeFij = "FIJ" - - // LanguageCodeFin is a LanguageCode enum value - LanguageCodeFin = "FIN" - - // LanguageCodeFrm is a LanguageCode enum value - LanguageCodeFrm = "FRM" - - // LanguageCodeFul is a LanguageCode enum value - LanguageCodeFul = "FUL" - - // LanguageCodeGla is a LanguageCode enum value - LanguageCodeGla = "GLA" - - // LanguageCodeGlg is a LanguageCode enum value - LanguageCodeGlg = "GLG" - - // LanguageCodeLug is a LanguageCode enum value - LanguageCodeLug = "LUG" - - // LanguageCodeKat is a LanguageCode enum value - LanguageCodeKat = "KAT" - - // LanguageCodeEll is a LanguageCode enum value - LanguageCodeEll = "ELL" - - // LanguageCodeGrn is a LanguageCode enum value - LanguageCodeGrn = "GRN" - - // LanguageCodeGuj is a LanguageCode enum value - LanguageCodeGuj = "GUJ" - - // LanguageCodeHat is a LanguageCode enum value - LanguageCodeHat = "HAT" - - // LanguageCodeHau is a LanguageCode enum value - LanguageCodeHau = "HAU" - - // LanguageCodeHeb is a LanguageCode enum value - LanguageCodeHeb = "HEB" - - // LanguageCodeHer is a LanguageCode enum value - LanguageCodeHer = "HER" - - // LanguageCodeHmo is a LanguageCode enum value - LanguageCodeHmo = "HMO" - - // LanguageCodeHun is a LanguageCode enum value - LanguageCodeHun = "HUN" - - // LanguageCodeIsl is a LanguageCode enum value - LanguageCodeIsl = "ISL" - - // LanguageCodeIdo is a LanguageCode enum value - LanguageCodeIdo = "IDO" - - // LanguageCodeIbo is a LanguageCode enum value - LanguageCodeIbo = "IBO" - - // LanguageCodeInd is a LanguageCode enum value - LanguageCodeInd = "IND" - - // LanguageCodeIna is a LanguageCode enum value - LanguageCodeIna = "INA" - - // LanguageCodeIle is a LanguageCode enum value - LanguageCodeIle = "ILE" - - // LanguageCodeIku is a LanguageCode enum value - LanguageCodeIku = "IKU" - - // LanguageCodeIpk is a LanguageCode enum value - LanguageCodeIpk = "IPK" - - // LanguageCodeGle is a LanguageCode enum value - LanguageCodeGle = "GLE" - - // LanguageCodeJav is a LanguageCode enum value - LanguageCodeJav = "JAV" - - // LanguageCodeKal is a LanguageCode enum value - LanguageCodeKal = "KAL" - - // LanguageCodeKan is a LanguageCode enum value - LanguageCodeKan = "KAN" - - // LanguageCodeKau is a LanguageCode enum value - LanguageCodeKau = "KAU" - - // LanguageCodeKas is a LanguageCode enum value - LanguageCodeKas = "KAS" - - // LanguageCodeKaz is a LanguageCode enum value - LanguageCodeKaz = "KAZ" - - // LanguageCodeKik is a LanguageCode enum value - LanguageCodeKik = "KIK" - - // LanguageCodeKin is a LanguageCode enum value - LanguageCodeKin = "KIN" - - // LanguageCodeKir is a LanguageCode enum value - LanguageCodeKir = "KIR" - - // LanguageCodeKom is a LanguageCode enum value - LanguageCodeKom = "KOM" - - // LanguageCodeKon is a LanguageCode enum value - LanguageCodeKon = "KON" - - // LanguageCodeKua is a LanguageCode enum value - LanguageCodeKua = "KUA" - - // LanguageCodeKur is a LanguageCode enum value - LanguageCodeKur = "KUR" - - // LanguageCodeLao is a LanguageCode enum value - LanguageCodeLao = "LAO" - - // LanguageCodeLat is a LanguageCode enum value - LanguageCodeLat = "LAT" - - // LanguageCodeLav is a LanguageCode enum value - LanguageCodeLav = "LAV" - - // LanguageCodeLim is a LanguageCode enum value - LanguageCodeLim = "LIM" - - // LanguageCodeLin is a LanguageCode enum value - LanguageCodeLin = "LIN" - - // LanguageCodeLit is a LanguageCode enum value - LanguageCodeLit = "LIT" - - // LanguageCodeLub is a LanguageCode enum value - LanguageCodeLub = "LUB" - - // LanguageCodeLtz is a LanguageCode enum value - LanguageCodeLtz = "LTZ" - - // LanguageCodeMkd is a LanguageCode enum value - LanguageCodeMkd = "MKD" - - // LanguageCodeMlg is a LanguageCode enum value - LanguageCodeMlg = "MLG" - - // LanguageCodeMsa is a LanguageCode enum value - LanguageCodeMsa = "MSA" - - // LanguageCodeMal is a LanguageCode enum value - LanguageCodeMal = "MAL" - - // LanguageCodeMlt is a LanguageCode enum value - LanguageCodeMlt = "MLT" - - // LanguageCodeGlv is a LanguageCode enum value - LanguageCodeGlv = "GLV" - - // LanguageCodeMri is a LanguageCode enum value - LanguageCodeMri = "MRI" - - // LanguageCodeMar is a LanguageCode enum value - LanguageCodeMar = "MAR" - - // LanguageCodeMah is a LanguageCode enum value - LanguageCodeMah = "MAH" - - // LanguageCodeMon is a LanguageCode enum value - LanguageCodeMon = "MON" - - // LanguageCodeNau is a LanguageCode enum value - LanguageCodeNau = "NAU" - - // LanguageCodeNav is a LanguageCode enum value - LanguageCodeNav = "NAV" - - // LanguageCodeNde is a LanguageCode enum value - LanguageCodeNde = "NDE" - - // LanguageCodeNbl is a LanguageCode enum value - LanguageCodeNbl = "NBL" - - // LanguageCodeNdo is a LanguageCode enum value - LanguageCodeNdo = "NDO" - - // LanguageCodeNep is a LanguageCode enum value - LanguageCodeNep = "NEP" - - // LanguageCodeSme is a LanguageCode enum value - LanguageCodeSme = "SME" - - // LanguageCodeNor is a LanguageCode enum value - LanguageCodeNor = "NOR" - - // LanguageCodeNob is a LanguageCode enum value - LanguageCodeNob = "NOB" - - // LanguageCodeNno is a LanguageCode enum value - LanguageCodeNno = "NNO" - - // LanguageCodeOci is a LanguageCode enum value - LanguageCodeOci = "OCI" - - // LanguageCodeOji is a LanguageCode enum value - LanguageCodeOji = "OJI" - - // LanguageCodeOri is a LanguageCode enum value - LanguageCodeOri = "ORI" - - // LanguageCodeOrm is a LanguageCode enum value - LanguageCodeOrm = "ORM" - - // LanguageCodeOss is a LanguageCode enum value - LanguageCodeOss = "OSS" - - // LanguageCodePli is a LanguageCode enum value - LanguageCodePli = "PLI" - - // LanguageCodeFas is a LanguageCode enum value - LanguageCodeFas = "FAS" - - // LanguageCodePol is a LanguageCode enum value - LanguageCodePol = "POL" - - // LanguageCodePus is a LanguageCode enum value - LanguageCodePus = "PUS" - - // LanguageCodeQue is a LanguageCode enum value - LanguageCodeQue = "QUE" - - // LanguageCodeQaa is a LanguageCode enum value - LanguageCodeQaa = "QAA" - - // LanguageCodeRon is a LanguageCode enum value - LanguageCodeRon = "RON" - - // LanguageCodeRoh is a LanguageCode enum value - LanguageCodeRoh = "ROH" - - // LanguageCodeRun is a LanguageCode enum value - LanguageCodeRun = "RUN" - - // LanguageCodeSmo is a LanguageCode enum value - LanguageCodeSmo = "SMO" - - // LanguageCodeSag is a LanguageCode enum value - LanguageCodeSag = "SAG" - - // LanguageCodeSan is a LanguageCode enum value - LanguageCodeSan = "SAN" - - // LanguageCodeSrd is a LanguageCode enum value - LanguageCodeSrd = "SRD" - - // LanguageCodeSrb is a LanguageCode enum value - LanguageCodeSrb = "SRB" - - // LanguageCodeSna is a LanguageCode enum value - LanguageCodeSna = "SNA" - - // LanguageCodeIii is a LanguageCode enum value - LanguageCodeIii = "III" - - // LanguageCodeSnd is a LanguageCode enum value - LanguageCodeSnd = "SND" - - // LanguageCodeSin is a LanguageCode enum value - LanguageCodeSin = "SIN" - - // LanguageCodeSlk is a LanguageCode enum value - LanguageCodeSlk = "SLK" - - // LanguageCodeSlv is a LanguageCode enum value - LanguageCodeSlv = "SLV" - - // LanguageCodeSom is a LanguageCode enum value - LanguageCodeSom = "SOM" - - // LanguageCodeSot is a LanguageCode enum value - LanguageCodeSot = "SOT" - - // LanguageCodeSun is a LanguageCode enum value - LanguageCodeSun = "SUN" - - // LanguageCodeSwa is a LanguageCode enum value - LanguageCodeSwa = "SWA" - - // LanguageCodeSsw is a LanguageCode enum value - LanguageCodeSsw = "SSW" - - // LanguageCodeSwe is a LanguageCode enum value - LanguageCodeSwe = "SWE" - - // LanguageCodeTgl is a LanguageCode enum value - LanguageCodeTgl = "TGL" - - // LanguageCodeTah is a LanguageCode enum value - LanguageCodeTah = "TAH" - - // LanguageCodeTgk is a LanguageCode enum value - LanguageCodeTgk = "TGK" - - // LanguageCodeTam is a LanguageCode enum value - LanguageCodeTam = "TAM" - - // LanguageCodeTat is a LanguageCode enum value - LanguageCodeTat = "TAT" - - // LanguageCodeTel is a LanguageCode enum value - LanguageCodeTel = "TEL" - - // LanguageCodeTha is a LanguageCode enum value - LanguageCodeTha = "THA" - - // LanguageCodeBod is a LanguageCode enum value - LanguageCodeBod = "BOD" - - // LanguageCodeTir is a LanguageCode enum value - LanguageCodeTir = "TIR" - - // LanguageCodeTon is a LanguageCode enum value - LanguageCodeTon = "TON" - - // LanguageCodeTso is a LanguageCode enum value - LanguageCodeTso = "TSO" - - // LanguageCodeTsn is a LanguageCode enum value - LanguageCodeTsn = "TSN" - - // LanguageCodeTur is a LanguageCode enum value - LanguageCodeTur = "TUR" - - // LanguageCodeTuk is a LanguageCode enum value - LanguageCodeTuk = "TUK" - - // LanguageCodeTwi is a LanguageCode enum value - LanguageCodeTwi = "TWI" - - // LanguageCodeUig is a LanguageCode enum value - LanguageCodeUig = "UIG" - - // LanguageCodeUkr is a LanguageCode enum value - LanguageCodeUkr = "UKR" - - // LanguageCodeUzb is a LanguageCode enum value - LanguageCodeUzb = "UZB" - - // LanguageCodeVen is a LanguageCode enum value - LanguageCodeVen = "VEN" - - // LanguageCodeVol is a LanguageCode enum value - LanguageCodeVol = "VOL" - - // LanguageCodeWln is a LanguageCode enum value - LanguageCodeWln = "WLN" - - // LanguageCodeCym is a LanguageCode enum value - LanguageCodeCym = "CYM" - - // LanguageCodeFry is a LanguageCode enum value - LanguageCodeFry = "FRY" - - // LanguageCodeWol is a LanguageCode enum value - LanguageCodeWol = "WOL" - - // LanguageCodeXho is a LanguageCode enum value - LanguageCodeXho = "XHO" - - // LanguageCodeYid is a LanguageCode enum value - LanguageCodeYid = "YID" - - // LanguageCodeYor is a LanguageCode enum value - LanguageCodeYor = "YOR" - - // LanguageCodeZha is a LanguageCode enum value - LanguageCodeZha = "ZHA" - - // LanguageCodeZul is a LanguageCode enum value - LanguageCodeZul = "ZUL" - - // LanguageCodeOrj is a LanguageCode enum value - LanguageCodeOrj = "ORJ" - - // LanguageCodeQpc is a LanguageCode enum value - LanguageCodeQpc = "QPC" - - // LanguageCodeTng is a LanguageCode enum value - LanguageCodeTng = "TNG" -) - -// Selects between the DVB and ATSC buffer models for Dolby Digital audio. -const ( - // M2tsAudioBufferModelDvb is a M2tsAudioBufferModel enum value - M2tsAudioBufferModelDvb = "DVB" - - // M2tsAudioBufferModelAtsc is a M2tsAudioBufferModel enum value - M2tsAudioBufferModelAtsc = "ATSC" -) - -// Controls what buffer model to use for accurate interleaving. If set to MULTIPLEX, -// use multiplex buffer model. If set to NONE, this can lead to lower latency, -// but low-memory devices may not be able to play back the stream without interruptions. -const ( - // M2tsBufferModelMultiplex is a M2tsBufferModel enum value - M2tsBufferModelMultiplex = "MULTIPLEX" - - // M2tsBufferModelNone is a M2tsBufferModel enum value - M2tsBufferModelNone = "NONE" -) - -// When set to VIDEO_AND_FIXED_INTERVALS, audio EBP markers will be added to -// partitions 3 and 4. The interval between these additional markers will be -// fixed, and will be slightly shorter than the video EBP marker interval. When -// set to VIDEO_INTERVAL, these additional markers will not be inserted. Only -// applicable when EBP segmentation markers are is selected (segmentationMarkers -// is EBP or EBP_LEGACY). -const ( - // M2tsEbpAudioIntervalVideoAndFixedIntervals is a M2tsEbpAudioInterval enum value - M2tsEbpAudioIntervalVideoAndFixedIntervals = "VIDEO_AND_FIXED_INTERVALS" - - // M2tsEbpAudioIntervalVideoInterval is a M2tsEbpAudioInterval enum value - M2tsEbpAudioIntervalVideoInterval = "VIDEO_INTERVAL" -) - -// Selects which PIDs to place EBP markers on. They can either be placed only -// on the video PID, or on both the video PID and all audio PIDs. Only applicable -// when EBP segmentation markers are is selected (segmentationMarkers is EBP -// or EBP_LEGACY). -const ( - // M2tsEbpPlacementVideoAndAudioPids is a M2tsEbpPlacement enum value - M2tsEbpPlacementVideoAndAudioPids = "VIDEO_AND_AUDIO_PIDS" - - // M2tsEbpPlacementVideoPid is a M2tsEbpPlacement enum value - M2tsEbpPlacementVideoPid = "VIDEO_PID" -) - -// Controls whether to include the ES Rate field in the PES header. -const ( - // M2tsEsRateInPesInclude is a M2tsEsRateInPes enum value - M2tsEsRateInPesInclude = "INCLUDE" - - // M2tsEsRateInPesExclude is a M2tsEsRateInPes enum value - M2tsEsRateInPesExclude = "EXCLUDE" -) - -// Keep the default value (DEFAULT) unless you know that your audio EBP markers -// are incorrectly appearing before your video EBP markers. Set this value to -// Force (FORCE) to correct this problem. -const ( - // M2tsForceTsVideoEbpOrderForce is a M2tsForceTsVideoEbpOrder enum value - M2tsForceTsVideoEbpOrderForce = "FORCE" - - // M2tsForceTsVideoEbpOrderDefault is a M2tsForceTsVideoEbpOrder enum value - M2tsForceTsVideoEbpOrderDefault = "DEFAULT" -) - -// If INSERT, Nielsen inaudible tones for media tracking will be detected in -// the input audio and an equivalent ID3 tag will be inserted in the output. -const ( - // M2tsNielsenId3Insert is a M2tsNielsenId3 enum value - M2tsNielsenId3Insert = "INSERT" - - // M2tsNielsenId3None is a M2tsNielsenId3 enum value - M2tsNielsenId3None = "NONE" -) - -// When set to PCR_EVERY_PES_PACKET, a Program Clock Reference value is inserted -// for every Packetized Elementary Stream (PES) header. This is effective only -// when the PCR PID is the same as the video or audio elementary stream. -const ( - // M2tsPcrControlPcrEveryPesPacket is a M2tsPcrControl enum value - M2tsPcrControlPcrEveryPesPacket = "PCR_EVERY_PES_PACKET" - - // M2tsPcrControlConfiguredPcrPeriod is a M2tsPcrControl enum value - M2tsPcrControlConfiguredPcrPeriod = "CONFIGURED_PCR_PERIOD" -) - -// When set to CBR, inserts null packets into transport stream to fill specified -// bitrate. When set to VBR, the bitrate setting acts as the maximum bitrate, -// but the output will not be padded up to that bitrate. -const ( - // M2tsRateModeVbr is a M2tsRateMode enum value - M2tsRateModeVbr = "VBR" - - // M2tsRateModeCbr is a M2tsRateMode enum value - M2tsRateModeCbr = "CBR" -) - -// Enables SCTE-35 passthrough (scte35Source) to pass any SCTE-35 signals from -// input to output. -const ( - // M2tsScte35SourcePassthrough is a M2tsScte35Source enum value - M2tsScte35SourcePassthrough = "PASSTHROUGH" - - // M2tsScte35SourceNone is a M2tsScte35Source enum value - M2tsScte35SourceNone = "NONE" -) - -// Inserts segmentation markers at each segmentation_time period. rai_segstart -// sets the Random Access Indicator bit in the adaptation field. rai_adapt sets -// the RAI bit and adds the current timecode in the private data bytes. psi_segstart -// inserts PAT and PMT tables at the start of segments. ebp adds Encoder Boundary -// Point information to the adaptation field as per OpenCable specification -// OC-SP-EBP-I01-130118. ebp_legacy adds Encoder Boundary Point information -// to the adaptation field using a legacy proprietary format. -const ( - // M2tsSegmentationMarkersNone is a M2tsSegmentationMarkers enum value - M2tsSegmentationMarkersNone = "NONE" - - // M2tsSegmentationMarkersRaiSegstart is a M2tsSegmentationMarkers enum value - M2tsSegmentationMarkersRaiSegstart = "RAI_SEGSTART" - - // M2tsSegmentationMarkersRaiAdapt is a M2tsSegmentationMarkers enum value - M2tsSegmentationMarkersRaiAdapt = "RAI_ADAPT" - - // M2tsSegmentationMarkersPsiSegstart is a M2tsSegmentationMarkers enum value - M2tsSegmentationMarkersPsiSegstart = "PSI_SEGSTART" - - // M2tsSegmentationMarkersEbp is a M2tsSegmentationMarkers enum value - M2tsSegmentationMarkersEbp = "EBP" - - // M2tsSegmentationMarkersEbpLegacy is a M2tsSegmentationMarkers enum value - M2tsSegmentationMarkersEbpLegacy = "EBP_LEGACY" -) - -// The segmentation style parameter controls how segmentation markers are inserted -// into the transport stream. With avails, it is possible that segments may -// be truncated, which can influence where future segmentation markers are inserted. -// When a segmentation style of "reset_cadence" is selected and a segment is -// truncated due to an avail, we will reset the segmentation cadence. This means -// the subsequent segment will have a duration of of $segmentation_time seconds. -// When a segmentation style of "maintain_cadence" is selected and a segment -// is truncated due to an avail, we will not reset the segmentation cadence. -// This means the subsequent segment will likely be truncated as well. However, -// all segments after that will have a duration of $segmentation_time seconds. -// Note that EBP lookahead is a slight exception to this rule. -const ( - // M2tsSegmentationStyleMaintainCadence is a M2tsSegmentationStyle enum value - M2tsSegmentationStyleMaintainCadence = "MAINTAIN_CADENCE" - - // M2tsSegmentationStyleResetCadence is a M2tsSegmentationStyle enum value - M2tsSegmentationStyleResetCadence = "RESET_CADENCE" -) - -// If INSERT, Nielsen inaudible tones for media tracking will be detected in -// the input audio and an equivalent ID3 tag will be inserted in the output. -const ( - // M3u8NielsenId3Insert is a M3u8NielsenId3 enum value - M3u8NielsenId3Insert = "INSERT" - - // M3u8NielsenId3None is a M3u8NielsenId3 enum value - M3u8NielsenId3None = "NONE" -) - -// When set to PCR_EVERY_PES_PACKET a Program Clock Reference value is inserted -// for every Packetized Elementary Stream (PES) header. This parameter is effective -// only when the PCR PID is the same as the video or audio elementary stream. -const ( - // M3u8PcrControlPcrEveryPesPacket is a M3u8PcrControl enum value - M3u8PcrControlPcrEveryPesPacket = "PCR_EVERY_PES_PACKET" - - // M3u8PcrControlConfiguredPcrPeriod is a M3u8PcrControl enum value - M3u8PcrControlConfiguredPcrPeriod = "CONFIGURED_PCR_PERIOD" -) - -// Enables SCTE-35 passthrough (scte35Source) to pass any SCTE-35 signals from -// input to output. -const ( - // M3u8Scte35SourcePassthrough is a M3u8Scte35Source enum value - M3u8Scte35SourcePassthrough = "PASSTHROUGH" - - // M3u8Scte35SourceNone is a M3u8Scte35Source enum value - M3u8Scte35SourceNone = "NONE" -) - -// Choose the type of motion graphic asset that you are providing for your overlay. -// You can choose either a .mov file or a series of .png files. -const ( - // MotionImageInsertionModeMov is a MotionImageInsertionMode enum value - MotionImageInsertionModeMov = "MOV" - - // MotionImageInsertionModePng is a MotionImageInsertionMode enum value - MotionImageInsertionModePng = "PNG" -) - -// Specify whether your motion graphic overlay repeats on a loop or plays only -// once. -const ( - // MotionImagePlaybackOnce is a MotionImagePlayback enum value - MotionImagePlaybackOnce = "ONCE" - - // MotionImagePlaybackRepeat is a MotionImagePlayback enum value - MotionImagePlaybackRepeat = "REPEAT" -) - -// When enabled, include 'clap' atom if appropriate for the video output settings. -const ( - // MovClapAtomInclude is a MovClapAtom enum value - MovClapAtomInclude = "INCLUDE" - - // MovClapAtomExclude is a MovClapAtom enum value - MovClapAtomExclude = "EXCLUDE" -) - -// When enabled, file composition times will start at zero, composition times -// in the 'ctts' (composition time to sample) box for B-frames will be negative, -// and a 'cslg' (composition shift least greatest) box will be included per -// 14496-1 amendment 1. This improves compatibility with Apple players and tools. -const ( - // MovCslgAtomInclude is a MovCslgAtom enum value - MovCslgAtomInclude = "INCLUDE" - - // MovCslgAtomExclude is a MovCslgAtom enum value - MovCslgAtomExclude = "EXCLUDE" -) - -// When set to XDCAM, writes MPEG2 video streams into the QuickTime file using -// XDCAM fourcc codes. This increases compatibility with Apple editors and players, -// but may decrease compatibility with other players. Only applicable when the -// video codec is MPEG2. -const ( - // MovMpeg2FourCCControlXdcam is a MovMpeg2FourCCControl enum value - MovMpeg2FourCCControlXdcam = "XDCAM" - - // MovMpeg2FourCCControlMpeg is a MovMpeg2FourCCControl enum value - MovMpeg2FourCCControlMpeg = "MPEG" -) - -// If set to OMNEON, inserts Omneon-compatible padding -const ( - // MovPaddingControlOmneon is a MovPaddingControl enum value - MovPaddingControlOmneon = "OMNEON" - - // MovPaddingControlNone is a MovPaddingControl enum value - MovPaddingControlNone = "NONE" -) - -// Always keep the default value (SELF_CONTAINED) for this setting. -const ( - // MovReferenceSelfContained is a MovReference enum value - MovReferenceSelfContained = "SELF_CONTAINED" - - // MovReferenceExternal is a MovReference enum value - MovReferenceExternal = "EXTERNAL" -) - -// When enabled, file composition times will start at zero, composition times -// in the 'ctts' (composition time to sample) box for B-frames will be negative, -// and a 'cslg' (composition shift least greatest) box will be included per -// 14496-1 amendment 1. This improves compatibility with Apple players and tools. -const ( - // Mp4CslgAtomInclude is a Mp4CslgAtom enum value - Mp4CslgAtomInclude = "INCLUDE" - - // Mp4CslgAtomExclude is a Mp4CslgAtom enum value - Mp4CslgAtomExclude = "EXCLUDE" -) - -// Inserts a free-space box immediately after the moov box. -const ( - // Mp4FreeSpaceBoxInclude is a Mp4FreeSpaceBox enum value - Mp4FreeSpaceBoxInclude = "INCLUDE" - - // Mp4FreeSpaceBoxExclude is a Mp4FreeSpaceBox enum value - Mp4FreeSpaceBoxExclude = "EXCLUDE" -) - -// If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning -// of the archive as required for progressive downloading. Otherwise it is placed -// normally at the end. -const ( - // Mp4MoovPlacementProgressiveDownload is a Mp4MoovPlacement enum value - Mp4MoovPlacementProgressiveDownload = "PROGRESSIVE_DOWNLOAD" - - // Mp4MoovPlacementNormal is a Mp4MoovPlacement enum value - Mp4MoovPlacementNormal = "NORMAL" -) - -// Adaptive quantization. Allows intra-frame quantizers to vary to improve visual -// quality. -const ( - // Mpeg2AdaptiveQuantizationOff is a Mpeg2AdaptiveQuantization enum value - Mpeg2AdaptiveQuantizationOff = "OFF" - - // Mpeg2AdaptiveQuantizationLow is a Mpeg2AdaptiveQuantization enum value - Mpeg2AdaptiveQuantizationLow = "LOW" - - // Mpeg2AdaptiveQuantizationMedium is a Mpeg2AdaptiveQuantization enum value - Mpeg2AdaptiveQuantizationMedium = "MEDIUM" - - // Mpeg2AdaptiveQuantizationHigh is a Mpeg2AdaptiveQuantization enum value - Mpeg2AdaptiveQuantizationHigh = "HIGH" -) - -// Use Level (Mpeg2CodecLevel) to set the MPEG-2 level for the video output. -const ( - // Mpeg2CodecLevelAuto is a Mpeg2CodecLevel enum value - Mpeg2CodecLevelAuto = "AUTO" - - // Mpeg2CodecLevelLow is a Mpeg2CodecLevel enum value - Mpeg2CodecLevelLow = "LOW" - - // Mpeg2CodecLevelMain is a Mpeg2CodecLevel enum value - Mpeg2CodecLevelMain = "MAIN" - - // Mpeg2CodecLevelHigh1440 is a Mpeg2CodecLevel enum value - Mpeg2CodecLevelHigh1440 = "HIGH1440" - - // Mpeg2CodecLevelHigh is a Mpeg2CodecLevel enum value - Mpeg2CodecLevelHigh = "HIGH" -) - -// Use Profile (Mpeg2CodecProfile) to set the MPEG-2 profile for the video output. -const ( - // Mpeg2CodecProfileMain is a Mpeg2CodecProfile enum value - Mpeg2CodecProfileMain = "MAIN" - - // Mpeg2CodecProfileProfile422 is a Mpeg2CodecProfile enum value - Mpeg2CodecProfileProfile422 = "PROFILE_422" -) - -// Choose Adaptive to improve subjective video quality for high-motion content. -// This will cause the service to use fewer B-frames (which infer information -// based on other frames) for high-motion portions of the video and more B-frames -// for low-motion portions. The maximum number of B-frames is limited by the -// value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames). -const ( - // Mpeg2DynamicSubGopAdaptive is a Mpeg2DynamicSubGop enum value - Mpeg2DynamicSubGopAdaptive = "ADAPTIVE" - - // Mpeg2DynamicSubGopStatic is a Mpeg2DynamicSubGop enum value - Mpeg2DynamicSubGopStatic = "STATIC" -) - -// If you are using the console, use the Framerate setting to specify the frame -// rate for this output. If you want to keep the same frame rate as the input -// video, choose Follow source. If you want to do frame rate conversion, choose -// a frame rate from the dropdown list or choose Custom. The framerates shown -// in the dropdown list are decimal approximations of fractions. If you choose -// Custom, specify your frame rate as a fraction. If you are creating your transcoding -// job sepecification as a JSON file without the console, use FramerateControl -// to specify which value the service uses for the frame rate for this output. -// Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate -// from the input. Choose SPECIFIED if you want the service to use the frame -// rate you specify in the settings FramerateNumerator and FramerateDenominator. -const ( - // Mpeg2FramerateControlInitializeFromSource is a Mpeg2FramerateControl enum value - Mpeg2FramerateControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" - - // Mpeg2FramerateControlSpecified is a Mpeg2FramerateControl enum value - Mpeg2FramerateControlSpecified = "SPECIFIED" -) - -// When set to INTERPOLATE, produces smoother motion during frame rate conversion. -const ( - // Mpeg2FramerateConversionAlgorithmDuplicateDrop is a Mpeg2FramerateConversionAlgorithm enum value - Mpeg2FramerateConversionAlgorithmDuplicateDrop = "DUPLICATE_DROP" - - // Mpeg2FramerateConversionAlgorithmInterpolate is a Mpeg2FramerateConversionAlgorithm enum value - Mpeg2FramerateConversionAlgorithmInterpolate = "INTERPOLATE" -) - -// Indicates if the GOP Size in MPEG2 is specified in frames or seconds. If -// seconds the system will convert the GOP Size into a frame count at run time. -const ( - // Mpeg2GopSizeUnitsFrames is a Mpeg2GopSizeUnits enum value - Mpeg2GopSizeUnitsFrames = "FRAMES" - - // Mpeg2GopSizeUnitsSeconds is a Mpeg2GopSizeUnits enum value - Mpeg2GopSizeUnitsSeconds = "SECONDS" -) - -// Use Interlace mode (InterlaceMode) to choose the scan line type for the output. -// * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce -// interlaced output with the entire output having the same field polarity (top -// or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default -// Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, -// behavior depends on the input scan type. - If the source is interlaced, the -// output will be interlaced with the same polarity as the source (it will follow -// the source). The output could therefore be a mix of "top field first" and -// "bottom field first". - If the source is progressive, the output will be -// interlaced with "top field first" or "bottom field first" polarity, depending -// on which of the Follow options you chose. -const ( - // Mpeg2InterlaceModeProgressive is a Mpeg2InterlaceMode enum value - Mpeg2InterlaceModeProgressive = "PROGRESSIVE" - - // Mpeg2InterlaceModeTopField is a Mpeg2InterlaceMode enum value - Mpeg2InterlaceModeTopField = "TOP_FIELD" - - // Mpeg2InterlaceModeBottomField is a Mpeg2InterlaceMode enum value - Mpeg2InterlaceModeBottomField = "BOTTOM_FIELD" - - // Mpeg2InterlaceModeFollowTopField is a Mpeg2InterlaceMode enum value - Mpeg2InterlaceModeFollowTopField = "FOLLOW_TOP_FIELD" - - // Mpeg2InterlaceModeFollowBottomField is a Mpeg2InterlaceMode enum value - Mpeg2InterlaceModeFollowBottomField = "FOLLOW_BOTTOM_FIELD" -) - -// Use Intra DC precision (Mpeg2IntraDcPrecision) to set quantization precision -// for intra-block DC coefficients. If you choose the value auto, the service -// will automatically select the precision based on the per-frame compression -// ratio. -const ( - // Mpeg2IntraDcPrecisionAuto is a Mpeg2IntraDcPrecision enum value - Mpeg2IntraDcPrecisionAuto = "AUTO" - - // Mpeg2IntraDcPrecisionIntraDcPrecision8 is a Mpeg2IntraDcPrecision enum value - Mpeg2IntraDcPrecisionIntraDcPrecision8 = "INTRA_DC_PRECISION_8" - - // Mpeg2IntraDcPrecisionIntraDcPrecision9 is a Mpeg2IntraDcPrecision enum value - Mpeg2IntraDcPrecisionIntraDcPrecision9 = "INTRA_DC_PRECISION_9" - - // Mpeg2IntraDcPrecisionIntraDcPrecision10 is a Mpeg2IntraDcPrecision enum value - Mpeg2IntraDcPrecisionIntraDcPrecision10 = "INTRA_DC_PRECISION_10" - - // Mpeg2IntraDcPrecisionIntraDcPrecision11 is a Mpeg2IntraDcPrecision enum value - Mpeg2IntraDcPrecisionIntraDcPrecision11 = "INTRA_DC_PRECISION_11" -) - -// Using the API, enable ParFollowSource if you want the service to use the -// pixel aspect ratio from the input. Using the console, do this by choosing -// Follow source for Pixel aspect ratio. -const ( - // Mpeg2ParControlInitializeFromSource is a Mpeg2ParControl enum value - Mpeg2ParControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" - - // Mpeg2ParControlSpecified is a Mpeg2ParControl enum value - Mpeg2ParControlSpecified = "SPECIFIED" -) - -// Use Quality tuning level (Mpeg2QualityTuningLevel) to specifiy whether to -// use single-pass or multipass video encoding. -const ( - // Mpeg2QualityTuningLevelSinglePass is a Mpeg2QualityTuningLevel enum value - Mpeg2QualityTuningLevelSinglePass = "SINGLE_PASS" - - // Mpeg2QualityTuningLevelMultiPass is a Mpeg2QualityTuningLevel enum value - Mpeg2QualityTuningLevelMultiPass = "MULTI_PASS" -) - -// Use Rate control mode (Mpeg2RateControlMode) to specifiy whether the bitrate -// is variable (vbr) or constant (cbr). -const ( - // Mpeg2RateControlModeVbr is a Mpeg2RateControlMode enum value - Mpeg2RateControlModeVbr = "VBR" - - // Mpeg2RateControlModeCbr is a Mpeg2RateControlMode enum value - Mpeg2RateControlModeCbr = "CBR" -) - -// Scene change detection (inserts I-frames on scene changes). -const ( - // Mpeg2SceneChangeDetectDisabled is a Mpeg2SceneChangeDetect enum value - Mpeg2SceneChangeDetectDisabled = "DISABLED" - - // Mpeg2SceneChangeDetectEnabled is a Mpeg2SceneChangeDetect enum value - Mpeg2SceneChangeDetectEnabled = "ENABLED" -) - -// Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled -// as 25fps, and audio is sped up correspondingly. -const ( - // Mpeg2SlowPalDisabled is a Mpeg2SlowPal enum value - Mpeg2SlowPalDisabled = "DISABLED" - - // Mpeg2SlowPalEnabled is a Mpeg2SlowPal enum value - Mpeg2SlowPalEnabled = "ENABLED" -) - -// Adjust quantization within each frame based on spatial variation of content -// complexity. -const ( - // Mpeg2SpatialAdaptiveQuantizationDisabled is a Mpeg2SpatialAdaptiveQuantization enum value - Mpeg2SpatialAdaptiveQuantizationDisabled = "DISABLED" - - // Mpeg2SpatialAdaptiveQuantizationEnabled is a Mpeg2SpatialAdaptiveQuantization enum value - Mpeg2SpatialAdaptiveQuantizationEnabled = "ENABLED" -) - -// Produces a Type D-10 compatible bitstream (SMPTE 356M-2001). -const ( - // Mpeg2SyntaxDefault is a Mpeg2Syntax enum value - Mpeg2SyntaxDefault = "DEFAULT" - - // Mpeg2SyntaxD10 is a Mpeg2Syntax enum value - Mpeg2SyntaxD10 = "D_10" -) - -// Only use Telecine (Mpeg2Telecine) when you set Framerate (Framerate) to 29.970. -// Set Telecine (Mpeg2Telecine) to Hard (hard) to produce a 29.97i output from -// a 23.976 input. Set it to Soft (soft) to produce 23.976 output and leave -// converstion to the player. -const ( - // Mpeg2TelecineNone is a Mpeg2Telecine enum value - Mpeg2TelecineNone = "NONE" - - // Mpeg2TelecineSoft is a Mpeg2Telecine enum value - Mpeg2TelecineSoft = "SOFT" - - // Mpeg2TelecineHard is a Mpeg2Telecine enum value - Mpeg2TelecineHard = "HARD" -) - -// Adjust quantization within each frame based on temporal variation of content -// complexity. -const ( - // Mpeg2TemporalAdaptiveQuantizationDisabled is a Mpeg2TemporalAdaptiveQuantization enum value - Mpeg2TemporalAdaptiveQuantizationDisabled = "DISABLED" - - // Mpeg2TemporalAdaptiveQuantizationEnabled is a Mpeg2TemporalAdaptiveQuantization enum value - Mpeg2TemporalAdaptiveQuantizationEnabled = "ENABLED" -) - -// COMBINE_DUPLICATE_STREAMS combines identical audio encoding settings across -// a Microsoft Smooth output group into a single audio stream. -const ( - // MsSmoothAudioDeduplicationCombineDuplicateStreams is a MsSmoothAudioDeduplication enum value - MsSmoothAudioDeduplicationCombineDuplicateStreams = "COMBINE_DUPLICATE_STREAMS" - - // MsSmoothAudioDeduplicationNone is a MsSmoothAudioDeduplication enum value - MsSmoothAudioDeduplicationNone = "NONE" -) - -// Use Manifest encoding (MsSmoothManifestEncoding) to specify the encoding -// format for the server and client manifest. Valid options are utf8 and utf16. -const ( - // MsSmoothManifestEncodingUtf8 is a MsSmoothManifestEncoding enum value - MsSmoothManifestEncodingUtf8 = "UTF8" - - // MsSmoothManifestEncodingUtf16 is a MsSmoothManifestEncoding enum value - MsSmoothManifestEncodingUtf16 = "UTF16" -) - -// Use Noise reducer filter (NoiseReducerFilter) to select one of the following -// spatial image filtering functions. To use this setting, you must also enable -// Noise reducer (NoiseReducer). * Bilateral is an edge preserving noise reduction -// filter. * Mean (softest), Gaussian, Lanczos, and Sharpen (sharpest) are convolution -// filters. * Conserve is a min/max noise reduction filter. * Spatial is a frequency-domain -// filter based on JND principles. -const ( - // NoiseReducerFilterBilateral is a NoiseReducerFilter enum value - NoiseReducerFilterBilateral = "BILATERAL" - - // NoiseReducerFilterMean is a NoiseReducerFilter enum value - NoiseReducerFilterMean = "MEAN" - - // NoiseReducerFilterGaussian is a NoiseReducerFilter enum value - NoiseReducerFilterGaussian = "GAUSSIAN" - - // NoiseReducerFilterLanczos is a NoiseReducerFilter enum value - NoiseReducerFilterLanczos = "LANCZOS" - - // NoiseReducerFilterSharpen is a NoiseReducerFilter enum value - NoiseReducerFilterSharpen = "SHARPEN" - - // NoiseReducerFilterConserve is a NoiseReducerFilter enum value - NoiseReducerFilterConserve = "CONSERVE" - - // NoiseReducerFilterSpatial is a NoiseReducerFilter enum value - NoiseReducerFilterSpatial = "SPATIAL" -) - -// When you request lists of resources, you can optionally specify whether they -// are sorted in ASCENDING or DESCENDING order. Default varies by resource. -const ( - // OrderAscending is a Order enum value - OrderAscending = "ASCENDING" - - // OrderDescending is a Order enum value - OrderDescending = "DESCENDING" -) - -// Type of output group (File group, Apple HLS, DASH ISO, Microsoft Smooth Streaming, -// CMAF) -const ( - // OutputGroupTypeHlsGroupSettings is a OutputGroupType enum value - OutputGroupTypeHlsGroupSettings = "HLS_GROUP_SETTINGS" - - // OutputGroupTypeDashIsoGroupSettings is a OutputGroupType enum value - OutputGroupTypeDashIsoGroupSettings = "DASH_ISO_GROUP_SETTINGS" - - // OutputGroupTypeFileGroupSettings is a OutputGroupType enum value - OutputGroupTypeFileGroupSettings = "FILE_GROUP_SETTINGS" - - // OutputGroupTypeMsSmoothGroupSettings is a OutputGroupType enum value - OutputGroupTypeMsSmoothGroupSettings = "MS_SMOOTH_GROUP_SETTINGS" - - // OutputGroupTypeCmafGroupSettings is a OutputGroupType enum value - OutputGroupTypeCmafGroupSettings = "CMAF_GROUP_SETTINGS" -) - -// Selects method of inserting SDT information into output stream. "Follow input -// SDT" copies SDT information from input stream to output stream. "Follow input -// SDT if present" copies SDT information from input stream to output stream -// if SDT information is present in the input, otherwise it will fall back on -// the user-defined values. Enter "SDT Manually" means user will enter the SDT -// information. "No SDT" means output stream will not contain SDT information. -const ( - // OutputSdtSdtFollow is a OutputSdt enum value - OutputSdtSdtFollow = "SDT_FOLLOW" - - // OutputSdtSdtFollowIfPresent is a OutputSdt enum value - OutputSdtSdtFollowIfPresent = "SDT_FOLLOW_IF_PRESENT" - - // OutputSdtSdtManual is a OutputSdt enum value - OutputSdtSdtManual = "SDT_MANUAL" - - // OutputSdtSdtNone is a OutputSdt enum value - OutputSdtSdtNone = "SDT_NONE" -) - -// Optional. When you request a list of presets, you can choose to list them -// alphabetically by NAME or chronologically by CREATION_DATE. If you don't -// specify, the service will list them by name. -const ( - // PresetListByName is a PresetListBy enum value - PresetListByName = "NAME" - - // PresetListByCreationDate is a PresetListBy enum value - PresetListByCreationDate = "CREATION_DATE" - - // PresetListBySystem is a PresetListBy enum value - PresetListBySystem = "SYSTEM" -) - -// Specifies whether the pricing plan for the queue is on-demand or reserved. -// For on-demand, you pay per minute, billed in increments of .01 minute. For -// reserved, you pay for the transcoding capacity of the entire queue, regardless -// of how much or how little you use it. Reserved pricing requires a 12-month -// commitment. -const ( - // PricingPlanOnDemand is a PricingPlan enum value - PricingPlanOnDemand = "ON_DEMAND" - - // PricingPlanReserved is a PricingPlan enum value - PricingPlanReserved = "RESERVED" -) - -// Use Profile (ProResCodecProfile) to specifiy the type of Apple ProRes codec -// to use for this output. -const ( - // ProresCodecProfileAppleProres422 is a ProresCodecProfile enum value - ProresCodecProfileAppleProres422 = "APPLE_PRORES_422" - - // ProresCodecProfileAppleProres422Hq is a ProresCodecProfile enum value - ProresCodecProfileAppleProres422Hq = "APPLE_PRORES_422_HQ" - - // ProresCodecProfileAppleProres422Lt is a ProresCodecProfile enum value - ProresCodecProfileAppleProres422Lt = "APPLE_PRORES_422_LT" - - // ProresCodecProfileAppleProres422Proxy is a ProresCodecProfile enum value - ProresCodecProfileAppleProres422Proxy = "APPLE_PRORES_422_PROXY" -) - -// If you are using the console, use the Framerate setting to specify the frame -// rate for this output. If you want to keep the same frame rate as the input -// video, choose Follow source. If you want to do frame rate conversion, choose -// a frame rate from the dropdown list or choose Custom. The framerates shown -// in the dropdown list are decimal approximations of fractions. If you choose -// Custom, specify your frame rate as a fraction. If you are creating your transcoding -// job sepecification as a JSON file without the console, use FramerateControl -// to specify which value the service uses for the frame rate for this output. -// Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate -// from the input. Choose SPECIFIED if you want the service to use the frame -// rate you specify in the settings FramerateNumerator and FramerateDenominator. -const ( - // ProresFramerateControlInitializeFromSource is a ProresFramerateControl enum value - ProresFramerateControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" - - // ProresFramerateControlSpecified is a ProresFramerateControl enum value - ProresFramerateControlSpecified = "SPECIFIED" -) - -// When set to INTERPOLATE, produces smoother motion during frame rate conversion. -const ( - // ProresFramerateConversionAlgorithmDuplicateDrop is a ProresFramerateConversionAlgorithm enum value - ProresFramerateConversionAlgorithmDuplicateDrop = "DUPLICATE_DROP" - - // ProresFramerateConversionAlgorithmInterpolate is a ProresFramerateConversionAlgorithm enum value - ProresFramerateConversionAlgorithmInterpolate = "INTERPOLATE" -) - -// Use Interlace mode (InterlaceMode) to choose the scan line type for the output. -// * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce -// interlaced output with the entire output having the same field polarity (top -// or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default -// Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, -// behavior depends on the input scan type. - If the source is interlaced, the -// output will be interlaced with the same polarity as the source (it will follow -// the source). The output could therefore be a mix of "top field first" and -// "bottom field first". - If the source is progressive, the output will be -// interlaced with "top field first" or "bottom field first" polarity, depending -// on which of the Follow options you chose. -const ( - // ProresInterlaceModeProgressive is a ProresInterlaceMode enum value - ProresInterlaceModeProgressive = "PROGRESSIVE" - - // ProresInterlaceModeTopField is a ProresInterlaceMode enum value - ProresInterlaceModeTopField = "TOP_FIELD" - - // ProresInterlaceModeBottomField is a ProresInterlaceMode enum value - ProresInterlaceModeBottomField = "BOTTOM_FIELD" - - // ProresInterlaceModeFollowTopField is a ProresInterlaceMode enum value - ProresInterlaceModeFollowTopField = "FOLLOW_TOP_FIELD" - - // ProresInterlaceModeFollowBottomField is a ProresInterlaceMode enum value - ProresInterlaceModeFollowBottomField = "FOLLOW_BOTTOM_FIELD" -) - -// Use (ProresParControl) to specify how the service determines the pixel aspect -// ratio. Set to Follow source (INITIALIZE_FROM_SOURCE) to use the pixel aspect -// ratio from the input. To specify a different pixel aspect ratio: Using the -// console, choose it from the dropdown menu. Using the API, set ProresParControl -// to (SPECIFIED) and provide for (ParNumerator) and (ParDenominator). -const ( - // ProresParControlInitializeFromSource is a ProresParControl enum value - ProresParControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" - - // ProresParControlSpecified is a ProresParControl enum value - ProresParControlSpecified = "SPECIFIED" -) - -// Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled -// as 25fps, and audio is sped up correspondingly. -const ( - // ProresSlowPalDisabled is a ProresSlowPal enum value - ProresSlowPalDisabled = "DISABLED" - - // ProresSlowPalEnabled is a ProresSlowPal enum value - ProresSlowPalEnabled = "ENABLED" -) - -// Only use Telecine (ProresTelecine) when you set Framerate (Framerate) to -// 29.970. Set Telecine (ProresTelecine) to Hard (hard) to produce a 29.97i -// output from a 23.976 input. Set it to Soft (soft) to produce 23.976 output -// and leave converstion to the player. -const ( - // ProresTelecineNone is a ProresTelecine enum value - ProresTelecineNone = "NONE" - - // ProresTelecineHard is a ProresTelecine enum value - ProresTelecineHard = "HARD" -) - -// Optional. When you request a list of queues, you can choose to list them -// alphabetically by NAME or chronologically by CREATION_DATE. If you don't -// specify, the service will list them by creation date. -const ( - // QueueListByName is a QueueListBy enum value - QueueListByName = "NAME" - - // QueueListByCreationDate is a QueueListBy enum value - QueueListByCreationDate = "CREATION_DATE" -) - -// Queues can be ACTIVE or PAUSED. If you pause a queue, jobs in that queue -// won't begin. Jobs that are running when you pause a queue continue to run -// until they finish or result in an error. -const ( - // QueueStatusActive is a QueueStatus enum value - QueueStatusActive = "ACTIVE" - - // QueueStatusPaused is a QueueStatus enum value - QueueStatusPaused = "PAUSED" -) - -// Specifies whether the term of your reserved queue pricing plan is automatically -// extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term. -const ( - // RenewalTypeAutoRenew is a RenewalType enum value - RenewalTypeAutoRenew = "AUTO_RENEW" - - // RenewalTypeExpire is a RenewalType enum value - RenewalTypeExpire = "EXPIRE" -) - -// Specifies whether the pricing plan for your reserved queue is ACTIVE or EXPIRED. -const ( - // ReservationPlanStatusActive is a ReservationPlanStatus enum value - ReservationPlanStatusActive = "ACTIVE" - - // ReservationPlanStatusExpired is a ReservationPlanStatus enum value - ReservationPlanStatusExpired = "EXPIRED" -) - -// Use Respond to AFD (RespondToAfd) to specify how the service changes the -// video itself in response to AFD values in the input. * Choose Respond to -// clip the input video frame according to the AFD value, input display aspect -// ratio, and output display aspect ratio. * Choose Passthrough to include the -// input AFD values. Do not choose this when AfdSignaling is set to (NONE). -// A preferred implementation of this workflow is to set RespondToAfd to (NONE) -// and set AfdSignaling to (AUTO). * Choose None to remove all input AFD values -// from this output. -const ( - // RespondToAfdNone is a RespondToAfd enum value - RespondToAfdNone = "NONE" - - // RespondToAfdRespond is a RespondToAfd enum value - RespondToAfdRespond = "RESPOND" - - // RespondToAfdPassthrough is a RespondToAfd enum value - RespondToAfdPassthrough = "PASSTHROUGH" -) - -// Applies only if your input aspect ratio is different from your output aspect -// ratio. Choose "Stretch to output" to have the service stretch your video -// image to fit. Keep the setting "Default" to allow the service to letterbox -// your video instead. This setting overrides any positioning value you specify -// elsewhere in the job. -const ( - // ScalingBehaviorDefault is a ScalingBehavior enum value - ScalingBehaviorDefault = "DEFAULT" - - // ScalingBehaviorStretchToOutput is a ScalingBehavior enum value - ScalingBehaviorStretchToOutput = "STRETCH_TO_OUTPUT" -) - -// Set Framerate (SccDestinationFramerate) to make sure that the captions and -// the video are synchronized in the output. Specify a frame rate that matches -// the frame rate of the associated video. If the video frame rate is 29.97, -// choose 29.97 dropframe (FRAMERATE_29_97_DROPFRAME) only if the video has -// video_insertion=true and drop_frame_timecode=true; otherwise, choose 29.97 -// non-dropframe (FRAMERATE_29_97_NON_DROPFRAME). -const ( - // SccDestinationFramerateFramerate2397 is a SccDestinationFramerate enum value - SccDestinationFramerateFramerate2397 = "FRAMERATE_23_97" - - // SccDestinationFramerateFramerate24 is a SccDestinationFramerate enum value - SccDestinationFramerateFramerate24 = "FRAMERATE_24" - - // SccDestinationFramerateFramerate2997Dropframe is a SccDestinationFramerate enum value - SccDestinationFramerateFramerate2997Dropframe = "FRAMERATE_29_97_DROPFRAME" - - // SccDestinationFramerateFramerate2997NonDropframe is a SccDestinationFramerate enum value - SccDestinationFramerateFramerate2997NonDropframe = "FRAMERATE_29_97_NON_DROPFRAME" -) - -// Use Position (Position) under under Timecode burn-in (TimecodeBurnIn) to -// specify the location the burned-in timecode on output video. -const ( - // TimecodeBurninPositionTopCenter is a TimecodeBurninPosition enum value - TimecodeBurninPositionTopCenter = "TOP_CENTER" - - // TimecodeBurninPositionTopLeft is a TimecodeBurninPosition enum value - TimecodeBurninPositionTopLeft = "TOP_LEFT" - - // TimecodeBurninPositionTopRight is a TimecodeBurninPosition enum value - TimecodeBurninPositionTopRight = "TOP_RIGHT" - - // TimecodeBurninPositionMiddleLeft is a TimecodeBurninPosition enum value - TimecodeBurninPositionMiddleLeft = "MIDDLE_LEFT" - - // TimecodeBurninPositionMiddleCenter is a TimecodeBurninPosition enum value - TimecodeBurninPositionMiddleCenter = "MIDDLE_CENTER" - - // TimecodeBurninPositionMiddleRight is a TimecodeBurninPosition enum value - TimecodeBurninPositionMiddleRight = "MIDDLE_RIGHT" - - // TimecodeBurninPositionBottomLeft is a TimecodeBurninPosition enum value - TimecodeBurninPositionBottomLeft = "BOTTOM_LEFT" - - // TimecodeBurninPositionBottomCenter is a TimecodeBurninPosition enum value - TimecodeBurninPositionBottomCenter = "BOTTOM_CENTER" - - // TimecodeBurninPositionBottomRight is a TimecodeBurninPosition enum value - TimecodeBurninPositionBottomRight = "BOTTOM_RIGHT" -) - -// Use Source (TimecodeSource) to set how timecodes are handled within this -// job. To make sure that your video, audio, captions, and markers are synchronized -// and that time-based features, such as image inserter, work correctly, choose -// the Timecode source option that matches your assets. All timecodes are in -// a 24-hour format with frame number (HH:MM:SS:FF). * Embedded (EMBEDDED) - -// Use the timecode that is in the input video. If no embedded timecode is in -// the source, the service will use Start at 0 (ZEROBASED) instead. * Start -// at 0 (ZEROBASED) - Set the timecode of the initial frame to 00:00:00:00. -// * Specified Start (SPECIFIEDSTART) - Set the timecode of the initial frame -// to a value other than zero. You use Start timecode (Start) to provide this -// value. -const ( - // TimecodeSourceEmbedded is a TimecodeSource enum value - TimecodeSourceEmbedded = "EMBEDDED" - - // TimecodeSourceZerobased is a TimecodeSource enum value - TimecodeSourceZerobased = "ZEROBASED" - - // TimecodeSourceSpecifiedstart is a TimecodeSource enum value - TimecodeSourceSpecifiedstart = "SPECIFIEDSTART" -) - -// Applies only to HLS outputs. Use this setting to specify whether the service -// inserts the ID3 timed metadata from the input in this output. -const ( - // TimedMetadataPassthrough is a TimedMetadata enum value - TimedMetadataPassthrough = "PASSTHROUGH" - - // TimedMetadataNone is a TimedMetadata enum value - TimedMetadataNone = "NONE" -) - -// Pass through style and position information from a TTML-like input source -// (TTML, SMPTE-TT, CFF-TT) to the CFF-TT output or TTML output. -const ( - // TtmlStylePassthroughEnabled is a TtmlStylePassthrough enum value - TtmlStylePassthroughEnabled = "ENABLED" - - // TtmlStylePassthroughDisabled is a TtmlStylePassthrough enum value - TtmlStylePassthroughDisabled = "DISABLED" -) - -const ( - // TypeSystem is a Type enum value - TypeSystem = "SYSTEM" - - // TypeCustom is a Type enum value - TypeCustom = "CUSTOM" -) - -// Type of video codec -const ( - // VideoCodecFrameCapture is a VideoCodec enum value - VideoCodecFrameCapture = "FRAME_CAPTURE" - - // VideoCodecH264 is a VideoCodec enum value - VideoCodecH264 = "H_264" - - // VideoCodecH265 is a VideoCodec enum value - VideoCodecH265 = "H_265" - - // VideoCodecMpeg2 is a VideoCodec enum value - VideoCodecMpeg2 = "MPEG2" - - // VideoCodecProres is a VideoCodec enum value - VideoCodecProres = "PRORES" -) - -// Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable Timecode -// insertion when the input frame rate is identical to the output frame rate. -// To include timecodes in this output, set Timecode insertion (VideoTimecodeInsertion) -// to PIC_TIMING_SEI. To leave them out, set it to DISABLED. Default is DISABLED. -// When the service inserts timecodes in an output, by default, it uses any -// embedded timecodes from the input. If none are present, the service will -// set the timecode for the first output frame to zero. To change this default -// behavior, adjust the settings under Timecode configuration (TimecodeConfig). -// In the console, these settings are located under Job > Job settings > Timecode -// configuration. Note - Timecode source under input settings (InputTimecodeSource) -// does not affect the timecodes that are inserted in the output. Source under -// Job settings > Timecode configuration (TimecodeSource) does. -const ( - // VideoTimecodeInsertionDisabled is a VideoTimecodeInsertion enum value - VideoTimecodeInsertionDisabled = "DISABLED" - - // VideoTimecodeInsertionPicTimingSei is a VideoTimecodeInsertion enum value - VideoTimecodeInsertionPicTimingSei = "PIC_TIMING_SEI" -) - -// The service defaults to using RIFF for WAV outputs. If your output audio -// is likely to exceed 4 GB in file size, or if you otherwise need the extended -// support of the RF64 format, set your output WAV file format to RF64. -const ( - // WavFormatRiff is a WavFormat enum value - WavFormatRiff = "RIFF" - - // WavFormatRf64 is a WavFormat enum value - WavFormatRf64 = "RF64" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/doc.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/doc.go deleted file mode 100644 index f30ea5eb7..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package mediaconvert provides the client and types for making API -// requests to AWS Elemental MediaConvert. -// -// AWS Elemental MediaConvert -// -// See https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29 for more information on this service. -// -// See mediaconvert package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/mediaconvert/ -// -// Using the Client -// -// To contact AWS Elemental MediaConvert 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 Elemental MediaConvert client MediaConvert for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/mediaconvert/#New -package mediaconvert diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/errors.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/errors.go deleted file mode 100644 index 7a607419d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/errors.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediaconvert - -const ( - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeConflictException for service response error code - // "ConflictException". - ErrCodeConflictException = "ConflictException" - - // ErrCodeForbiddenException for service response error code - // "ForbiddenException". - ErrCodeForbiddenException = "ForbiddenException" - - // ErrCodeInternalServerErrorException for service response error code - // "InternalServerErrorException". - ErrCodeInternalServerErrorException = "InternalServerErrorException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - ErrCodeTooManyRequestsException = "TooManyRequestsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go deleted file mode 100644 index 441039b68..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediaconvert - -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" -) - -// MediaConvert provides the API operation methods for making requests to -// AWS Elemental MediaConvert. See this package's package overview docs -// for details on the service. -// -// MediaConvert methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type MediaConvert 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 = "mediaconvert" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "MediaConvert" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the MediaConvert client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a MediaConvert client from just a session. -// svc := mediaconvert.New(mySession) -// -// // Create a MediaConvert client with additional configuration -// svc := mediaconvert.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaConvert { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "mediaconvert" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *MediaConvert { - svc := &MediaConvert{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-08-29", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a MediaConvert operation and runs any -// custom request initialization. -func (c *MediaConvert) 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/medialive/api.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go deleted file mode 100644 index 5abd1b2c4..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go +++ /dev/null @@ -1,17266 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package medialive - -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 opBatchUpdateSchedule = "BatchUpdateSchedule" - -// BatchUpdateScheduleRequest generates a "aws/request.Request" representing the -// client's request for the BatchUpdateSchedule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchUpdateSchedule for more information on using the BatchUpdateSchedule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchUpdateScheduleRequest method. -// req, resp := client.BatchUpdateScheduleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/BatchUpdateSchedule -func (c *MediaLive) BatchUpdateScheduleRequest(input *BatchUpdateScheduleInput) (req *request.Request, output *BatchUpdateScheduleOutput) { - op := &request.Operation{ - Name: opBatchUpdateSchedule, - HTTPMethod: "PUT", - HTTPPath: "/prod/channels/{channelId}/schedule", - } - - if input == nil { - input = &BatchUpdateScheduleInput{} - } - - output = &BatchUpdateScheduleOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchUpdateSchedule API operation for AWS Elemental MediaLive. -// -// Update a channel schedule -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation BatchUpdateSchedule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/BatchUpdateSchedule -func (c *MediaLive) BatchUpdateSchedule(input *BatchUpdateScheduleInput) (*BatchUpdateScheduleOutput, error) { - req, out := c.BatchUpdateScheduleRequest(input) - return out, req.Send() -} - -// BatchUpdateScheduleWithContext is the same as BatchUpdateSchedule with the addition of -// the ability to pass a context and additional request options. -// -// See BatchUpdateSchedule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) BatchUpdateScheduleWithContext(ctx aws.Context, input *BatchUpdateScheduleInput, opts ...request.Option) (*BatchUpdateScheduleOutput, error) { - req, out := c.BatchUpdateScheduleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateChannel = "CreateChannel" - -// CreateChannelRequest generates a "aws/request.Request" representing the -// client's request for the CreateChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateChannel for more information on using the CreateChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateChannelRequest method. -// req, resp := client.CreateChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateChannel -func (c *MediaLive) CreateChannelRequest(input *CreateChannelInput) (req *request.Request, output *CreateChannelOutput) { - op := &request.Operation{ - Name: opCreateChannel, - HTTPMethod: "POST", - HTTPPath: "/prod/channels", - } - - if input == nil { - input = &CreateChannelInput{} - } - - output = &CreateChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateChannel API operation for AWS Elemental MediaLive. -// -// Creates a new channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation CreateChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateChannel -func (c *MediaLive) CreateChannel(input *CreateChannelInput) (*CreateChannelOutput, error) { - req, out := c.CreateChannelRequest(input) - return out, req.Send() -} - -// CreateChannelWithContext is the same as CreateChannel with the addition of -// the ability to pass a context and additional request options. -// -// See CreateChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) CreateChannelWithContext(ctx aws.Context, input *CreateChannelInput, opts ...request.Option) (*CreateChannelOutput, error) { - req, out := c.CreateChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateInput = "CreateInput" - -// CreateInputRequest generates a "aws/request.Request" representing the -// client's request for the CreateInput operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateInput for more information on using the CreateInput -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateInputRequest method. -// req, resp := client.CreateInputRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateInput -func (c *MediaLive) CreateInputRequest(input *CreateInputInput) (req *request.Request, output *CreateInputOutput) { - op := &request.Operation{ - Name: opCreateInput, - HTTPMethod: "POST", - HTTPPath: "/prod/inputs", - } - - if input == nil { - input = &CreateInputInput{} - } - - output = &CreateInputOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateInput API operation for AWS Elemental MediaLive. -// -// Create an input -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation CreateInput for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateInput -func (c *MediaLive) CreateInput(input *CreateInputInput) (*CreateInputOutput, error) { - req, out := c.CreateInputRequest(input) - return out, req.Send() -} - -// CreateInputWithContext is the same as CreateInput with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInput for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) CreateInputWithContext(ctx aws.Context, input *CreateInputInput, opts ...request.Option) (*CreateInputOutput, error) { - req, out := c.CreateInputRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateInputSecurityGroup = "CreateInputSecurityGroup" - -// CreateInputSecurityGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateInputSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateInputSecurityGroup for more information on using the CreateInputSecurityGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateInputSecurityGroupRequest method. -// req, resp := client.CreateInputSecurityGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateInputSecurityGroup -func (c *MediaLive) CreateInputSecurityGroupRequest(input *CreateInputSecurityGroupInput) (req *request.Request, output *CreateInputSecurityGroupOutput) { - op := &request.Operation{ - Name: opCreateInputSecurityGroup, - HTTPMethod: "POST", - HTTPPath: "/prod/inputSecurityGroups", - } - - if input == nil { - input = &CreateInputSecurityGroupInput{} - } - - output = &CreateInputSecurityGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateInputSecurityGroup API operation for AWS Elemental MediaLive. -// -// Creates a Input Security 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 Elemental MediaLive's -// API operation CreateInputSecurityGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateInputSecurityGroup -func (c *MediaLive) CreateInputSecurityGroup(input *CreateInputSecurityGroupInput) (*CreateInputSecurityGroupOutput, error) { - req, out := c.CreateInputSecurityGroupRequest(input) - return out, req.Send() -} - -// CreateInputSecurityGroupWithContext is the same as CreateInputSecurityGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInputSecurityGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) CreateInputSecurityGroupWithContext(ctx aws.Context, input *CreateInputSecurityGroupInput, opts ...request.Option) (*CreateInputSecurityGroupOutput, error) { - req, out := c.CreateInputSecurityGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteChannel = "DeleteChannel" - -// DeleteChannelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteChannel for more information on using the DeleteChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteChannelRequest method. -// req, resp := client.DeleteChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteChannel -func (c *MediaLive) DeleteChannelRequest(input *DeleteChannelInput) (req *request.Request, output *DeleteChannelOutput) { - op := &request.Operation{ - Name: opDeleteChannel, - HTTPMethod: "DELETE", - HTTPPath: "/prod/channels/{channelId}", - } - - if input == nil { - input = &DeleteChannelInput{} - } - - output = &DeleteChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteChannel API operation for AWS Elemental MediaLive. -// -// Starts deletion of channel. The associated outputs are also deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation DeleteChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteChannel -func (c *MediaLive) DeleteChannel(input *DeleteChannelInput) (*DeleteChannelOutput, error) { - req, out := c.DeleteChannelRequest(input) - return out, req.Send() -} - -// DeleteChannelWithContext is the same as DeleteChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) DeleteChannelWithContext(ctx aws.Context, input *DeleteChannelInput, opts ...request.Option) (*DeleteChannelOutput, error) { - req, out := c.DeleteChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteInput = "DeleteInput" - -// DeleteInputRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInput operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteInput for more information on using the DeleteInput -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteInputRequest method. -// req, resp := client.DeleteInputRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteInput -func (c *MediaLive) DeleteInputRequest(input *DeleteInputInput) (req *request.Request, output *DeleteInputOutput) { - op := &request.Operation{ - Name: opDeleteInput, - HTTPMethod: "DELETE", - HTTPPath: "/prod/inputs/{inputId}", - } - - if input == nil { - input = &DeleteInputInput{} - } - - output = &DeleteInputOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteInput API operation for AWS Elemental MediaLive. -// -// Deletes the input end point -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation DeleteInput for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteInput -func (c *MediaLive) DeleteInput(input *DeleteInputInput) (*DeleteInputOutput, error) { - req, out := c.DeleteInputRequest(input) - return out, req.Send() -} - -// DeleteInputWithContext is the same as DeleteInput with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteInput for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) DeleteInputWithContext(ctx aws.Context, input *DeleteInputInput, opts ...request.Option) (*DeleteInputOutput, error) { - req, out := c.DeleteInputRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteInputSecurityGroup = "DeleteInputSecurityGroup" - -// DeleteInputSecurityGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInputSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteInputSecurityGroup for more information on using the DeleteInputSecurityGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteInputSecurityGroupRequest method. -// req, resp := client.DeleteInputSecurityGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteInputSecurityGroup -func (c *MediaLive) DeleteInputSecurityGroupRequest(input *DeleteInputSecurityGroupInput) (req *request.Request, output *DeleteInputSecurityGroupOutput) { - op := &request.Operation{ - Name: opDeleteInputSecurityGroup, - HTTPMethod: "DELETE", - HTTPPath: "/prod/inputSecurityGroups/{inputSecurityGroupId}", - } - - if input == nil { - input = &DeleteInputSecurityGroupInput{} - } - - output = &DeleteInputSecurityGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteInputSecurityGroup API operation for AWS Elemental MediaLive. -// -// Deletes an Input Security 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 Elemental MediaLive's -// API operation DeleteInputSecurityGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteInputSecurityGroup -func (c *MediaLive) DeleteInputSecurityGroup(input *DeleteInputSecurityGroupInput) (*DeleteInputSecurityGroupOutput, error) { - req, out := c.DeleteInputSecurityGroupRequest(input) - return out, req.Send() -} - -// DeleteInputSecurityGroupWithContext is the same as DeleteInputSecurityGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteInputSecurityGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) DeleteInputSecurityGroupWithContext(ctx aws.Context, input *DeleteInputSecurityGroupInput, opts ...request.Option) (*DeleteInputSecurityGroupOutput, error) { - req, out := c.DeleteInputSecurityGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteReservation = "DeleteReservation" - -// DeleteReservationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteReservation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteReservation for more information on using the DeleteReservation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteReservationRequest method. -// req, resp := client.DeleteReservationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteReservation -func (c *MediaLive) DeleteReservationRequest(input *DeleteReservationInput) (req *request.Request, output *DeleteReservationOutput) { - op := &request.Operation{ - Name: opDeleteReservation, - HTTPMethod: "DELETE", - HTTPPath: "/prod/reservations/{reservationId}", - } - - if input == nil { - input = &DeleteReservationInput{} - } - - output = &DeleteReservationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteReservation API operation for AWS Elemental MediaLive. -// -// Delete an expired reservation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation DeleteReservation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteReservation -func (c *MediaLive) DeleteReservation(input *DeleteReservationInput) (*DeleteReservationOutput, error) { - req, out := c.DeleteReservationRequest(input) - return out, req.Send() -} - -// DeleteReservationWithContext is the same as DeleteReservation with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteReservation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) DeleteReservationWithContext(ctx aws.Context, input *DeleteReservationInput, opts ...request.Option) (*DeleteReservationOutput, error) { - req, out := c.DeleteReservationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeChannel = "DescribeChannel" - -// DescribeChannelRequest generates a "aws/request.Request" representing the -// client's request for the DescribeChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeChannel for more information on using the DescribeChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeChannelRequest method. -// req, resp := client.DescribeChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeChannel -func (c *MediaLive) DescribeChannelRequest(input *DescribeChannelInput) (req *request.Request, output *DescribeChannelOutput) { - op := &request.Operation{ - Name: opDescribeChannel, - HTTPMethod: "GET", - HTTPPath: "/prod/channels/{channelId}", - } - - if input == nil { - input = &DescribeChannelInput{} - } - - output = &DescribeChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeChannel API operation for AWS Elemental MediaLive. -// -// Gets details about a channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation DescribeChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeChannel -func (c *MediaLive) DescribeChannel(input *DescribeChannelInput) (*DescribeChannelOutput, error) { - req, out := c.DescribeChannelRequest(input) - return out, req.Send() -} - -// DescribeChannelWithContext is the same as DescribeChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) DescribeChannelWithContext(ctx aws.Context, input *DescribeChannelInput, opts ...request.Option) (*DescribeChannelOutput, error) { - req, out := c.DescribeChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInput = "DescribeInput" - -// DescribeInputRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInput operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInput for more information on using the DescribeInput -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInputRequest method. -// req, resp := client.DescribeInputRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeInput -func (c *MediaLive) DescribeInputRequest(input *DescribeInputInput) (req *request.Request, output *DescribeInputOutput) { - op := &request.Operation{ - Name: opDescribeInput, - HTTPMethod: "GET", - HTTPPath: "/prod/inputs/{inputId}", - } - - if input == nil { - input = &DescribeInputInput{} - } - - output = &DescribeInputOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInput API operation for AWS Elemental MediaLive. -// -// Produces details about an input -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation DescribeInput for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeInput -func (c *MediaLive) DescribeInput(input *DescribeInputInput) (*DescribeInputOutput, error) { - req, out := c.DescribeInputRequest(input) - return out, req.Send() -} - -// DescribeInputWithContext is the same as DescribeInput with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInput for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) DescribeInputWithContext(ctx aws.Context, input *DescribeInputInput, opts ...request.Option) (*DescribeInputOutput, error) { - req, out := c.DescribeInputRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInputSecurityGroup = "DescribeInputSecurityGroup" - -// DescribeInputSecurityGroupRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInputSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInputSecurityGroup for more information on using the DescribeInputSecurityGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInputSecurityGroupRequest method. -// req, resp := client.DescribeInputSecurityGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeInputSecurityGroup -func (c *MediaLive) DescribeInputSecurityGroupRequest(input *DescribeInputSecurityGroupInput) (req *request.Request, output *DescribeInputSecurityGroupOutput) { - op := &request.Operation{ - Name: opDescribeInputSecurityGroup, - HTTPMethod: "GET", - HTTPPath: "/prod/inputSecurityGroups/{inputSecurityGroupId}", - } - - if input == nil { - input = &DescribeInputSecurityGroupInput{} - } - - output = &DescribeInputSecurityGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInputSecurityGroup API operation for AWS Elemental MediaLive. -// -// Produces a summary of an Input Security 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 Elemental MediaLive's -// API operation DescribeInputSecurityGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeInputSecurityGroup -func (c *MediaLive) DescribeInputSecurityGroup(input *DescribeInputSecurityGroupInput) (*DescribeInputSecurityGroupOutput, error) { - req, out := c.DescribeInputSecurityGroupRequest(input) - return out, req.Send() -} - -// DescribeInputSecurityGroupWithContext is the same as DescribeInputSecurityGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInputSecurityGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) DescribeInputSecurityGroupWithContext(ctx aws.Context, input *DescribeInputSecurityGroupInput, opts ...request.Option) (*DescribeInputSecurityGroupOutput, error) { - req, out := c.DescribeInputSecurityGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeOffering = "DescribeOffering" - -// DescribeOfferingRequest generates a "aws/request.Request" representing the -// client's request for the DescribeOffering operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeOffering for more information on using the DescribeOffering -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeOfferingRequest method. -// req, resp := client.DescribeOfferingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeOffering -func (c *MediaLive) DescribeOfferingRequest(input *DescribeOfferingInput) (req *request.Request, output *DescribeOfferingOutput) { - op := &request.Operation{ - Name: opDescribeOffering, - HTTPMethod: "GET", - HTTPPath: "/prod/offerings/{offeringId}", - } - - if input == nil { - input = &DescribeOfferingInput{} - } - - output = &DescribeOfferingOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeOffering API operation for AWS Elemental MediaLive. -// -// Get details for an offering. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation DescribeOffering for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeOffering -func (c *MediaLive) DescribeOffering(input *DescribeOfferingInput) (*DescribeOfferingOutput, error) { - req, out := c.DescribeOfferingRequest(input) - return out, req.Send() -} - -// DescribeOfferingWithContext is the same as DescribeOffering with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeOffering for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) DescribeOfferingWithContext(ctx aws.Context, input *DescribeOfferingInput, opts ...request.Option) (*DescribeOfferingOutput, error) { - req, out := c.DescribeOfferingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeReservation = "DescribeReservation" - -// DescribeReservationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReservation for more information on using the DescribeReservation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReservationRequest method. -// req, resp := client.DescribeReservationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeReservation -func (c *MediaLive) DescribeReservationRequest(input *DescribeReservationInput) (req *request.Request, output *DescribeReservationOutput) { - op := &request.Operation{ - Name: opDescribeReservation, - HTTPMethod: "GET", - HTTPPath: "/prod/reservations/{reservationId}", - } - - if input == nil { - input = &DescribeReservationInput{} - } - - output = &DescribeReservationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReservation API operation for AWS Elemental MediaLive. -// -// Get details for a reservation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation DescribeReservation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeReservation -func (c *MediaLive) DescribeReservation(input *DescribeReservationInput) (*DescribeReservationOutput, error) { - req, out := c.DescribeReservationRequest(input) - return out, req.Send() -} - -// DescribeReservationWithContext is the same as DescribeReservation with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReservation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) DescribeReservationWithContext(ctx aws.Context, input *DescribeReservationInput, opts ...request.Option) (*DescribeReservationOutput, error) { - req, out := c.DescribeReservationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSchedule = "DescribeSchedule" - -// DescribeScheduleRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSchedule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSchedule for more information on using the DescribeSchedule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeScheduleRequest method. -// req, resp := client.DescribeScheduleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeSchedule -func (c *MediaLive) DescribeScheduleRequest(input *DescribeScheduleInput) (req *request.Request, output *DescribeScheduleOutput) { - op := &request.Operation{ - Name: opDescribeSchedule, - HTTPMethod: "GET", - HTTPPath: "/prod/channels/{channelId}/schedule", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeScheduleInput{} - } - - output = &DescribeScheduleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSchedule API operation for AWS Elemental MediaLive. -// -// Get a channel schedule -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation DescribeSchedule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeSchedule -func (c *MediaLive) DescribeSchedule(input *DescribeScheduleInput) (*DescribeScheduleOutput, error) { - req, out := c.DescribeScheduleRequest(input) - return out, req.Send() -} - -// DescribeScheduleWithContext is the same as DescribeSchedule with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSchedule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) DescribeScheduleWithContext(ctx aws.Context, input *DescribeScheduleInput, opts ...request.Option) (*DescribeScheduleOutput, error) { - req, out := c.DescribeScheduleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeSchedulePages iterates over the pages of a DescribeSchedule operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeSchedule 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 DescribeSchedule operation. -// pageNum := 0 -// err := client.DescribeSchedulePages(params, -// func(page *DescribeScheduleOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *MediaLive) DescribeSchedulePages(input *DescribeScheduleInput, fn func(*DescribeScheduleOutput, bool) bool) error { - return c.DescribeSchedulePagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeSchedulePagesWithContext same as DescribeSchedulePages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) DescribeSchedulePagesWithContext(ctx aws.Context, input *DescribeScheduleInput, fn func(*DescribeScheduleOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeScheduleInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeScheduleRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScheduleOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListChannels = "ListChannels" - -// ListChannelsRequest generates a "aws/request.Request" representing the -// client's request for the ListChannels operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListChannels for more information on using the ListChannels -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListChannelsRequest method. -// req, resp := client.ListChannelsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListChannels -func (c *MediaLive) ListChannelsRequest(input *ListChannelsInput) (req *request.Request, output *ListChannelsOutput) { - op := &request.Operation{ - Name: opListChannels, - HTTPMethod: "GET", - HTTPPath: "/prod/channels", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListChannelsInput{} - } - - output = &ListChannelsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListChannels API operation for AWS Elemental MediaLive. -// -// Produces list of channels that have been created -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation ListChannels for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListChannels -func (c *MediaLive) ListChannels(input *ListChannelsInput) (*ListChannelsOutput, error) { - req, out := c.ListChannelsRequest(input) - return out, req.Send() -} - -// ListChannelsWithContext is the same as ListChannels with the addition of -// the ability to pass a context and additional request options. -// -// See ListChannels for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) ListChannelsWithContext(ctx aws.Context, input *ListChannelsInput, opts ...request.Option) (*ListChannelsOutput, error) { - req, out := c.ListChannelsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListChannelsPages iterates over the pages of a ListChannels operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListChannels 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 ListChannels operation. -// pageNum := 0 -// err := client.ListChannelsPages(params, -// func(page *ListChannelsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *MediaLive) ListChannelsPages(input *ListChannelsInput, fn func(*ListChannelsOutput, bool) bool) error { - return c.ListChannelsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListChannelsPagesWithContext same as ListChannelsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) ListChannelsPagesWithContext(ctx aws.Context, input *ListChannelsInput, fn func(*ListChannelsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListChannelsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListChannelsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListChannelsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListInputSecurityGroups = "ListInputSecurityGroups" - -// ListInputSecurityGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ListInputSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListInputSecurityGroups for more information on using the ListInputSecurityGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListInputSecurityGroupsRequest method. -// req, resp := client.ListInputSecurityGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListInputSecurityGroups -func (c *MediaLive) ListInputSecurityGroupsRequest(input *ListInputSecurityGroupsInput) (req *request.Request, output *ListInputSecurityGroupsOutput) { - op := &request.Operation{ - Name: opListInputSecurityGroups, - HTTPMethod: "GET", - HTTPPath: "/prod/inputSecurityGroups", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListInputSecurityGroupsInput{} - } - - output = &ListInputSecurityGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInputSecurityGroups API operation for AWS Elemental MediaLive. -// -// Produces a list of Input Security Groups for an 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 Elemental MediaLive's -// API operation ListInputSecurityGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListInputSecurityGroups -func (c *MediaLive) ListInputSecurityGroups(input *ListInputSecurityGroupsInput) (*ListInputSecurityGroupsOutput, error) { - req, out := c.ListInputSecurityGroupsRequest(input) - return out, req.Send() -} - -// ListInputSecurityGroupsWithContext is the same as ListInputSecurityGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ListInputSecurityGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) ListInputSecurityGroupsWithContext(ctx aws.Context, input *ListInputSecurityGroupsInput, opts ...request.Option) (*ListInputSecurityGroupsOutput, error) { - req, out := c.ListInputSecurityGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInputSecurityGroupsPages iterates over the pages of a ListInputSecurityGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInputSecurityGroups 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 ListInputSecurityGroups operation. -// pageNum := 0 -// err := client.ListInputSecurityGroupsPages(params, -// func(page *ListInputSecurityGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *MediaLive) ListInputSecurityGroupsPages(input *ListInputSecurityGroupsInput, fn func(*ListInputSecurityGroupsOutput, bool) bool) error { - return c.ListInputSecurityGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInputSecurityGroupsPagesWithContext same as ListInputSecurityGroupsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) ListInputSecurityGroupsPagesWithContext(ctx aws.Context, input *ListInputSecurityGroupsInput, fn func(*ListInputSecurityGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInputSecurityGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInputSecurityGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInputSecurityGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListInputs = "ListInputs" - -// ListInputsRequest generates a "aws/request.Request" representing the -// client's request for the ListInputs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListInputs for more information on using the ListInputs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListInputsRequest method. -// req, resp := client.ListInputsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListInputs -func (c *MediaLive) ListInputsRequest(input *ListInputsInput) (req *request.Request, output *ListInputsOutput) { - op := &request.Operation{ - Name: opListInputs, - HTTPMethod: "GET", - HTTPPath: "/prod/inputs", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListInputsInput{} - } - - output = &ListInputsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInputs API operation for AWS Elemental MediaLive. -// -// Produces list of inputs that have been created -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation ListInputs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListInputs -func (c *MediaLive) ListInputs(input *ListInputsInput) (*ListInputsOutput, error) { - req, out := c.ListInputsRequest(input) - return out, req.Send() -} - -// ListInputsWithContext is the same as ListInputs with the addition of -// the ability to pass a context and additional request options. -// -// See ListInputs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) ListInputsWithContext(ctx aws.Context, input *ListInputsInput, opts ...request.Option) (*ListInputsOutput, error) { - req, out := c.ListInputsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInputsPages iterates over the pages of a ListInputs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInputs 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 ListInputs operation. -// pageNum := 0 -// err := client.ListInputsPages(params, -// func(page *ListInputsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *MediaLive) ListInputsPages(input *ListInputsInput, fn func(*ListInputsOutput, bool) bool) error { - return c.ListInputsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInputsPagesWithContext same as ListInputsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) ListInputsPagesWithContext(ctx aws.Context, input *ListInputsInput, fn func(*ListInputsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInputsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInputsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInputsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListOfferings = "ListOfferings" - -// ListOfferingsRequest generates a "aws/request.Request" representing the -// client's request for the ListOfferings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListOfferings for more information on using the ListOfferings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListOfferingsRequest method. -// req, resp := client.ListOfferingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListOfferings -func (c *MediaLive) ListOfferingsRequest(input *ListOfferingsInput) (req *request.Request, output *ListOfferingsOutput) { - op := &request.Operation{ - Name: opListOfferings, - HTTPMethod: "GET", - HTTPPath: "/prod/offerings", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListOfferingsInput{} - } - - output = &ListOfferingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOfferings API operation for AWS Elemental MediaLive. -// -// List offerings available for purchase. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation ListOfferings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListOfferings -func (c *MediaLive) ListOfferings(input *ListOfferingsInput) (*ListOfferingsOutput, error) { - req, out := c.ListOfferingsRequest(input) - return out, req.Send() -} - -// ListOfferingsWithContext is the same as ListOfferings with the addition of -// the ability to pass a context and additional request options. -// -// See ListOfferings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) ListOfferingsWithContext(ctx aws.Context, input *ListOfferingsInput, opts ...request.Option) (*ListOfferingsOutput, error) { - req, out := c.ListOfferingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListOfferingsPages iterates over the pages of a ListOfferings operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListOfferings 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 ListOfferings operation. -// pageNum := 0 -// err := client.ListOfferingsPages(params, -// func(page *ListOfferingsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *MediaLive) ListOfferingsPages(input *ListOfferingsInput, fn func(*ListOfferingsOutput, bool) bool) error { - return c.ListOfferingsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListOfferingsPagesWithContext same as ListOfferingsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) ListOfferingsPagesWithContext(ctx aws.Context, input *ListOfferingsInput, fn func(*ListOfferingsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListOfferingsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListOfferingsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListOfferingsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListReservations = "ListReservations" - -// ListReservationsRequest generates a "aws/request.Request" representing the -// client's request for the ListReservations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListReservations for more information on using the ListReservations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListReservationsRequest method. -// req, resp := client.ListReservationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListReservations -func (c *MediaLive) ListReservationsRequest(input *ListReservationsInput) (req *request.Request, output *ListReservationsOutput) { - op := &request.Operation{ - Name: opListReservations, - HTTPMethod: "GET", - HTTPPath: "/prod/reservations", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListReservationsInput{} - } - - output = &ListReservationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListReservations API operation for AWS Elemental MediaLive. -// -// List purchased reservations. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation ListReservations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListReservations -func (c *MediaLive) ListReservations(input *ListReservationsInput) (*ListReservationsOutput, error) { - req, out := c.ListReservationsRequest(input) - return out, req.Send() -} - -// ListReservationsWithContext is the same as ListReservations with the addition of -// the ability to pass a context and additional request options. -// -// See ListReservations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) ListReservationsWithContext(ctx aws.Context, input *ListReservationsInput, opts ...request.Option) (*ListReservationsOutput, error) { - req, out := c.ListReservationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListReservationsPages iterates over the pages of a ListReservations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListReservations method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListReservations operation. -// pageNum := 0 -// err := client.ListReservationsPages(params, -// func(page *ListReservationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *MediaLive) ListReservationsPages(input *ListReservationsInput, fn func(*ListReservationsOutput, bool) bool) error { - return c.ListReservationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListReservationsPagesWithContext same as ListReservationsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) ListReservationsPagesWithContext(ctx aws.Context, input *ListReservationsInput, fn func(*ListReservationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListReservationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListReservationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListReservationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opPurchaseOffering = "PurchaseOffering" - -// PurchaseOfferingRequest generates a "aws/request.Request" representing the -// client's request for the PurchaseOffering operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PurchaseOffering for more information on using the PurchaseOffering -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PurchaseOfferingRequest method. -// req, resp := client.PurchaseOfferingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/PurchaseOffering -func (c *MediaLive) PurchaseOfferingRequest(input *PurchaseOfferingInput) (req *request.Request, output *PurchaseOfferingOutput) { - op := &request.Operation{ - Name: opPurchaseOffering, - HTTPMethod: "POST", - HTTPPath: "/prod/offerings/{offeringId}/purchase", - } - - if input == nil { - input = &PurchaseOfferingInput{} - } - - output = &PurchaseOfferingOutput{} - req = c.newRequest(op, input, output) - return -} - -// PurchaseOffering API operation for AWS Elemental MediaLive. -// -// Purchase an offering and create a reservation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation PurchaseOffering for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/PurchaseOffering -func (c *MediaLive) PurchaseOffering(input *PurchaseOfferingInput) (*PurchaseOfferingOutput, error) { - req, out := c.PurchaseOfferingRequest(input) - return out, req.Send() -} - -// PurchaseOfferingWithContext is the same as PurchaseOffering with the addition of -// the ability to pass a context and additional request options. -// -// See PurchaseOffering for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) PurchaseOfferingWithContext(ctx aws.Context, input *PurchaseOfferingInput, opts ...request.Option) (*PurchaseOfferingOutput, error) { - req, out := c.PurchaseOfferingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartChannel = "StartChannel" - -// StartChannelRequest generates a "aws/request.Request" representing the -// client's request for the StartChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartChannel for more information on using the StartChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartChannelRequest method. -// req, resp := client.StartChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StartChannel -func (c *MediaLive) StartChannelRequest(input *StartChannelInput) (req *request.Request, output *StartChannelOutput) { - op := &request.Operation{ - Name: opStartChannel, - HTTPMethod: "POST", - HTTPPath: "/prod/channels/{channelId}/start", - } - - if input == nil { - input = &StartChannelInput{} - } - - output = &StartChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartChannel API operation for AWS Elemental MediaLive. -// -// Starts an existing channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation StartChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StartChannel -func (c *MediaLive) StartChannel(input *StartChannelInput) (*StartChannelOutput, error) { - req, out := c.StartChannelRequest(input) - return out, req.Send() -} - -// StartChannelWithContext is the same as StartChannel with the addition of -// the ability to pass a context and additional request options. -// -// See StartChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) StartChannelWithContext(ctx aws.Context, input *StartChannelInput, opts ...request.Option) (*StartChannelOutput, error) { - req, out := c.StartChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopChannel = "StopChannel" - -// StopChannelRequest generates a "aws/request.Request" representing the -// client's request for the StopChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopChannel for more information on using the StopChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopChannelRequest method. -// req, resp := client.StopChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StopChannel -func (c *MediaLive) StopChannelRequest(input *StopChannelInput) (req *request.Request, output *StopChannelOutput) { - op := &request.Operation{ - Name: opStopChannel, - HTTPMethod: "POST", - HTTPPath: "/prod/channels/{channelId}/stop", - } - - if input == nil { - input = &StopChannelInput{} - } - - output = &StopChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopChannel API operation for AWS Elemental MediaLive. -// -// Stops a running channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation StopChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StopChannel -func (c *MediaLive) StopChannel(input *StopChannelInput) (*StopChannelOutput, error) { - req, out := c.StopChannelRequest(input) - return out, req.Send() -} - -// StopChannelWithContext is the same as StopChannel with the addition of -// the ability to pass a context and additional request options. -// -// See StopChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) StopChannelWithContext(ctx aws.Context, input *StopChannelInput, opts ...request.Option) (*StopChannelOutput, error) { - req, out := c.StopChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateChannel = "UpdateChannel" - -// UpdateChannelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateChannel for more information on using the UpdateChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateChannelRequest method. -// req, resp := client.UpdateChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateChannel -func (c *MediaLive) UpdateChannelRequest(input *UpdateChannelInput) (req *request.Request, output *UpdateChannelOutput) { - op := &request.Operation{ - Name: opUpdateChannel, - HTTPMethod: "PUT", - HTTPPath: "/prod/channels/{channelId}", - } - - if input == nil { - input = &UpdateChannelInput{} - } - - output = &UpdateChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateChannel API operation for AWS Elemental MediaLive. -// -// Updates a channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation UpdateChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateChannel -func (c *MediaLive) UpdateChannel(input *UpdateChannelInput) (*UpdateChannelOutput, error) { - req, out := c.UpdateChannelRequest(input) - return out, req.Send() -} - -// UpdateChannelWithContext is the same as UpdateChannel with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) UpdateChannelWithContext(ctx aws.Context, input *UpdateChannelInput, opts ...request.Option) (*UpdateChannelOutput, error) { - req, out := c.UpdateChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateInput = "UpdateInput" - -// UpdateInputRequest generates a "aws/request.Request" representing the -// client's request for the UpdateInput operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateInput for more information on using the UpdateInput -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateInputRequest method. -// req, resp := client.UpdateInputRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateInput -func (c *MediaLive) UpdateInputRequest(input *UpdateInputInput) (req *request.Request, output *UpdateInputOutput) { - op := &request.Operation{ - Name: opUpdateInput, - HTTPMethod: "PUT", - HTTPPath: "/prod/inputs/{inputId}", - } - - if input == nil { - input = &UpdateInputInput{} - } - - output = &UpdateInputOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateInput API operation for AWS Elemental MediaLive. -// -// Updates an input. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation UpdateInput for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateInput -func (c *MediaLive) UpdateInput(input *UpdateInputInput) (*UpdateInputOutput, error) { - req, out := c.UpdateInputRequest(input) - return out, req.Send() -} - -// UpdateInputWithContext is the same as UpdateInput with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateInput for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) UpdateInputWithContext(ctx aws.Context, input *UpdateInputInput, opts ...request.Option) (*UpdateInputOutput, error) { - req, out := c.UpdateInputRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateInputSecurityGroup = "UpdateInputSecurityGroup" - -// UpdateInputSecurityGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateInputSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateInputSecurityGroup for more information on using the UpdateInputSecurityGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateInputSecurityGroupRequest method. -// req, resp := client.UpdateInputSecurityGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateInputSecurityGroup -func (c *MediaLive) UpdateInputSecurityGroupRequest(input *UpdateInputSecurityGroupInput) (req *request.Request, output *UpdateInputSecurityGroupOutput) { - op := &request.Operation{ - Name: opUpdateInputSecurityGroup, - HTTPMethod: "PUT", - HTTPPath: "/prod/inputSecurityGroups/{inputSecurityGroupId}", - } - - if input == nil { - input = &UpdateInputSecurityGroupInput{} - } - - output = &UpdateInputSecurityGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateInputSecurityGroup API operation for AWS Elemental MediaLive. -// -// Update an Input Security Group's Whilelists. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaLive's -// API operation UpdateInputSecurityGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeBadGatewayException "BadGatewayException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" -// -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateInputSecurityGroup -func (c *MediaLive) UpdateInputSecurityGroup(input *UpdateInputSecurityGroupInput) (*UpdateInputSecurityGroupOutput, error) { - req, out := c.UpdateInputSecurityGroupRequest(input) - return out, req.Send() -} - -// UpdateInputSecurityGroupWithContext is the same as UpdateInputSecurityGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateInputSecurityGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaLive) UpdateInputSecurityGroupWithContext(ctx aws.Context, input *UpdateInputSecurityGroupInput, opts ...request.Option) (*UpdateInputSecurityGroupOutput, error) { - req, out := c.UpdateInputSecurityGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AacSettings struct { - _ struct{} `type:"structure"` - - // Average bitrate in bits/second. Valid values depend on rate control mode - // and profile. - Bitrate *float64 `locationName:"bitrate" type:"double"` - - // Mono, Stereo, or 5.1 channel layout. Valid values depend on rate control - // mode and profile. The adReceiverMix setting receives a stereo description - // plus control track and emits a mono AAC encode of the description track, - // with control data emitted in the PES header as per ETSI TS 101 154 Annex - // E. - CodingMode *string `locationName:"codingMode" type:"string" enum:"AacCodingMode"` - - // Set to "broadcasterMixedAd" when input contains pre-mixed main audio + AD - // (narration) as a stereo pair. The Audio Type field (audioType) will be set - // to 3, which signals to downstream systems that this stream contains "broadcaster - // mixed AD". Note that the input received by the encoder must contain pre-mixed - // audio; the encoder does not perform the mixing. The values in audioTypeControl - // and audioType (in AudioDescription) are ignored when set to broadcasterMixedAd.Leave - // set to "normal" when input does not contain pre-mixed audio + AD. - InputType *string `locationName:"inputType" type:"string" enum:"AacInputType"` - - // AAC Profile. - Profile *string `locationName:"profile" type:"string" enum:"AacProfile"` - - // Rate Control Mode. - RateControlMode *string `locationName:"rateControlMode" type:"string" enum:"AacRateControlMode"` - - // Sets LATM / LOAS AAC output for raw containers. - RawFormat *string `locationName:"rawFormat" type:"string" enum:"AacRawFormat"` - - // Sample rate in Hz. Valid values depend on rate control mode and profile. - SampleRate *float64 `locationName:"sampleRate" type:"double"` - - // Use MPEG-2 AAC audio instead of MPEG-4 AAC audio for raw or MPEG-2 Transport - // Stream containers. - Spec *string `locationName:"spec" type:"string" enum:"AacSpec"` - - // VBR Quality Level - Only used if rateControlMode is VBR. - VbrQuality *string `locationName:"vbrQuality" type:"string" enum:"AacVbrQuality"` -} - -// String returns the string representation -func (s AacSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AacSettings) GoString() string { - return s.String() -} - -// SetBitrate sets the Bitrate field's value. -func (s *AacSettings) SetBitrate(v float64) *AacSettings { - s.Bitrate = &v - return s -} - -// SetCodingMode sets the CodingMode field's value. -func (s *AacSettings) SetCodingMode(v string) *AacSettings { - s.CodingMode = &v - return s -} - -// SetInputType sets the InputType field's value. -func (s *AacSettings) SetInputType(v string) *AacSettings { - s.InputType = &v - return s -} - -// SetProfile sets the Profile field's value. -func (s *AacSettings) SetProfile(v string) *AacSettings { - s.Profile = &v - return s -} - -// SetRateControlMode sets the RateControlMode field's value. -func (s *AacSettings) SetRateControlMode(v string) *AacSettings { - s.RateControlMode = &v - return s -} - -// SetRawFormat sets the RawFormat field's value. -func (s *AacSettings) SetRawFormat(v string) *AacSettings { - s.RawFormat = &v - return s -} - -// SetSampleRate sets the SampleRate field's value. -func (s *AacSettings) SetSampleRate(v float64) *AacSettings { - s.SampleRate = &v - return s -} - -// SetSpec sets the Spec field's value. -func (s *AacSettings) SetSpec(v string) *AacSettings { - s.Spec = &v - return s -} - -// SetVbrQuality sets the VbrQuality field's value. -func (s *AacSettings) SetVbrQuality(v string) *AacSettings { - s.VbrQuality = &v - return s -} - -type Ac3Settings struct { - _ struct{} `type:"structure"` - - // Average bitrate in bits/second. Valid bitrates depend on the coding mode. - Bitrate *float64 `locationName:"bitrate" type:"double"` - - // Specifies the bitstream mode (bsmod) for the emitted AC-3 stream. See ATSC - // A/52-2012 for background on these values. - BitstreamMode *string `locationName:"bitstreamMode" type:"string" enum:"Ac3BitstreamMode"` - - // Dolby Digital coding mode. Determines number of channels. - CodingMode *string `locationName:"codingMode" type:"string" enum:"Ac3CodingMode"` - - // Sets the dialnorm for the output. If excluded and input audio is Dolby Digital, - // dialnorm will be passed through. - Dialnorm *int64 `locationName:"dialnorm" min:"1" type:"integer"` - - // If set to filmStandard, adds dynamic range compression signaling to the output - // bitstream as defined in the Dolby Digital specification. - DrcProfile *string `locationName:"drcProfile" type:"string" enum:"Ac3DrcProfile"` - - // When set to enabled, applies a 120Hz lowpass filter to the LFE channel prior - // to encoding. Only valid in codingMode32Lfe mode. - LfeFilter *string `locationName:"lfeFilter" type:"string" enum:"Ac3LfeFilter"` - - // When set to "followInput", encoder metadata will be sourced from the DD, - // DD+, or DolbyE decoder that supplied this audio data. If audio was not supplied - // from one of these streams, then the static metadata settings will be used. - MetadataControl *string `locationName:"metadataControl" type:"string" enum:"Ac3MetadataControl"` -} - -// String returns the string representation -func (s Ac3Settings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Ac3Settings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Ac3Settings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Ac3Settings"} - if s.Dialnorm != nil && *s.Dialnorm < 1 { - invalidParams.Add(request.NewErrParamMinValue("Dialnorm", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBitrate sets the Bitrate field's value. -func (s *Ac3Settings) SetBitrate(v float64) *Ac3Settings { - s.Bitrate = &v - return s -} - -// SetBitstreamMode sets the BitstreamMode field's value. -func (s *Ac3Settings) SetBitstreamMode(v string) *Ac3Settings { - s.BitstreamMode = &v - return s -} - -// SetCodingMode sets the CodingMode field's value. -func (s *Ac3Settings) SetCodingMode(v string) *Ac3Settings { - s.CodingMode = &v - return s -} - -// SetDialnorm sets the Dialnorm field's value. -func (s *Ac3Settings) SetDialnorm(v int64) *Ac3Settings { - s.Dialnorm = &v - return s -} - -// SetDrcProfile sets the DrcProfile field's value. -func (s *Ac3Settings) SetDrcProfile(v string) *Ac3Settings { - s.DrcProfile = &v - return s -} - -// SetLfeFilter sets the LfeFilter field's value. -func (s *Ac3Settings) SetLfeFilter(v string) *Ac3Settings { - s.LfeFilter = &v - return s -} - -// SetMetadataControl sets the MetadataControl field's value. -func (s *Ac3Settings) SetMetadataControl(v string) *Ac3Settings { - s.MetadataControl = &v - return s -} - -type ArchiveContainerSettings struct { - _ struct{} `type:"structure"` - - M2tsSettings *M2tsSettings `locationName:"m2tsSettings" type:"structure"` -} - -// String returns the string representation -func (s ArchiveContainerSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ArchiveContainerSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ArchiveContainerSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ArchiveContainerSettings"} - if s.M2tsSettings != nil { - if err := s.M2tsSettings.Validate(); err != nil { - invalidParams.AddNested("M2tsSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetM2tsSettings sets the M2tsSettings field's value. -func (s *ArchiveContainerSettings) SetM2tsSettings(v *M2tsSettings) *ArchiveContainerSettings { - s.M2tsSettings = v - return s -} - -type ArchiveGroupSettings struct { - _ struct{} `type:"structure"` - - // A directory and base filename where archive files should be written. - // - // Destination is a required field - Destination *OutputLocationRef `locationName:"destination" type:"structure" required:"true"` - - // Number of seconds to write to archive file before closing and starting a - // new one. - RolloverInterval *int64 `locationName:"rolloverInterval" min:"1" type:"integer"` -} - -// String returns the string representation -func (s ArchiveGroupSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ArchiveGroupSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ArchiveGroupSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ArchiveGroupSettings"} - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - if s.RolloverInterval != nil && *s.RolloverInterval < 1 { - invalidParams.Add(request.NewErrParamMinValue("RolloverInterval", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestination sets the Destination field's value. -func (s *ArchiveGroupSettings) SetDestination(v *OutputLocationRef) *ArchiveGroupSettings { - s.Destination = v - return s -} - -// SetRolloverInterval sets the RolloverInterval field's value. -func (s *ArchiveGroupSettings) SetRolloverInterval(v int64) *ArchiveGroupSettings { - s.RolloverInterval = &v - return s -} - -type ArchiveOutputSettings struct { - _ struct{} `type:"structure"` - - // Settings specific to the container type of the file. - // - // ContainerSettings is a required field - ContainerSettings *ArchiveContainerSettings `locationName:"containerSettings" type:"structure" required:"true"` - - // Output file extension. If excluded, this will be auto-selected from the container - // type. - Extension *string `locationName:"extension" type:"string"` - - // String concatenated to the end of the destination filename. Required for - // multiple outputs of the same type. - NameModifier *string `locationName:"nameModifier" type:"string"` -} - -// String returns the string representation -func (s ArchiveOutputSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ArchiveOutputSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ArchiveOutputSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ArchiveOutputSettings"} - if s.ContainerSettings == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerSettings")) - } - if s.ContainerSettings != nil { - if err := s.ContainerSettings.Validate(); err != nil { - invalidParams.AddNested("ContainerSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerSettings sets the ContainerSettings field's value. -func (s *ArchiveOutputSettings) SetContainerSettings(v *ArchiveContainerSettings) *ArchiveOutputSettings { - s.ContainerSettings = v - return s -} - -// SetExtension sets the Extension field's value. -func (s *ArchiveOutputSettings) SetExtension(v string) *ArchiveOutputSettings { - s.Extension = &v - return s -} - -// SetNameModifier sets the NameModifier field's value. -func (s *ArchiveOutputSettings) SetNameModifier(v string) *ArchiveOutputSettings { - s.NameModifier = &v - return s -} - -type AribDestinationSettings struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AribDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AribDestinationSettings) GoString() string { - return s.String() -} - -type AribSourceSettings struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AribSourceSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AribSourceSettings) GoString() string { - return s.String() -} - -type AudioChannelMapping struct { - _ struct{} `type:"structure"` - - // Indices and gain values for each input channel that should be remixed into - // this output channel. - // - // InputChannelLevels is a required field - InputChannelLevels []*InputChannelLevel `locationName:"inputChannelLevels" type:"list" required:"true"` - - // The index of the output channel being produced. - // - // OutputChannel is a required field - OutputChannel *int64 `locationName:"outputChannel" type:"integer" required:"true"` -} - -// String returns the string representation -func (s AudioChannelMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioChannelMapping) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AudioChannelMapping) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AudioChannelMapping"} - if s.InputChannelLevels == nil { - invalidParams.Add(request.NewErrParamRequired("InputChannelLevels")) - } - if s.OutputChannel == nil { - invalidParams.Add(request.NewErrParamRequired("OutputChannel")) - } - if s.InputChannelLevels != nil { - for i, v := range s.InputChannelLevels { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputChannelLevels", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputChannelLevels sets the InputChannelLevels field's value. -func (s *AudioChannelMapping) SetInputChannelLevels(v []*InputChannelLevel) *AudioChannelMapping { - s.InputChannelLevels = v - return s -} - -// SetOutputChannel sets the OutputChannel field's value. -func (s *AudioChannelMapping) SetOutputChannel(v int64) *AudioChannelMapping { - s.OutputChannel = &v - return s -} - -type AudioCodecSettings struct { - _ struct{} `type:"structure"` - - AacSettings *AacSettings `locationName:"aacSettings" type:"structure"` - - Ac3Settings *Ac3Settings `locationName:"ac3Settings" type:"structure"` - - Eac3Settings *Eac3Settings `locationName:"eac3Settings" type:"structure"` - - Mp2Settings *Mp2Settings `locationName:"mp2Settings" type:"structure"` - - PassThroughSettings *PassThroughSettings `locationName:"passThroughSettings" type:"structure"` -} - -// String returns the string representation -func (s AudioCodecSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioCodecSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AudioCodecSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AudioCodecSettings"} - if s.Ac3Settings != nil { - if err := s.Ac3Settings.Validate(); err != nil { - invalidParams.AddNested("Ac3Settings", err.(request.ErrInvalidParams)) - } - } - if s.Eac3Settings != nil { - if err := s.Eac3Settings.Validate(); err != nil { - invalidParams.AddNested("Eac3Settings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAacSettings sets the AacSettings field's value. -func (s *AudioCodecSettings) SetAacSettings(v *AacSettings) *AudioCodecSettings { - s.AacSettings = v - return s -} - -// SetAc3Settings sets the Ac3Settings field's value. -func (s *AudioCodecSettings) SetAc3Settings(v *Ac3Settings) *AudioCodecSettings { - s.Ac3Settings = v - return s -} - -// SetEac3Settings sets the Eac3Settings field's value. -func (s *AudioCodecSettings) SetEac3Settings(v *Eac3Settings) *AudioCodecSettings { - s.Eac3Settings = v - return s -} - -// SetMp2Settings sets the Mp2Settings field's value. -func (s *AudioCodecSettings) SetMp2Settings(v *Mp2Settings) *AudioCodecSettings { - s.Mp2Settings = v - return s -} - -// SetPassThroughSettings sets the PassThroughSettings field's value. -func (s *AudioCodecSettings) SetPassThroughSettings(v *PassThroughSettings) *AudioCodecSettings { - s.PassThroughSettings = v - return s -} - -type AudioDescription struct { - _ struct{} `type:"structure"` - - // Advanced audio normalization settings. - AudioNormalizationSettings *AudioNormalizationSettings `locationName:"audioNormalizationSettings" type:"structure"` - - // The name of the AudioSelector used as the source for this AudioDescription. - // - // AudioSelectorName is a required field - AudioSelectorName *string `locationName:"audioSelectorName" type:"string" required:"true"` - - // Applies only if audioTypeControl is useConfigured. The values for audioType - // are defined in ISO-IEC 13818-1. - AudioType *string `locationName:"audioType" type:"string" enum:"AudioType"` - - // Determines how audio type is determined. followInput: If the input contains - // an ISO 639 audioType, then that value is passed through to the output. If - // the input contains no ISO 639 audioType, the value in Audio Type is included - // in the output. useConfigured: The value in Audio Type is included in the - // output.Note that this field and audioType are both ignored if inputType is - // broadcasterMixedAd. - AudioTypeControl *string `locationName:"audioTypeControl" type:"string" enum:"AudioDescriptionAudioTypeControl"` - - // Audio codec settings. - CodecSettings *AudioCodecSettings `locationName:"codecSettings" type:"structure"` - - // Indicates the language of the audio output track. Only used if languageControlMode - // is useConfigured, or there is no ISO 639 language code specified in the input. - LanguageCode *string `locationName:"languageCode" min:"3" type:"string"` - - // Choosing followInput will cause the ISO 639 language code of the output to - // follow the ISO 639 language code of the input. The languageCode will be used - // when useConfigured is set, or when followInput is selected but there is no - // ISO 639 language code specified by the input. - LanguageCodeControl *string `locationName:"languageCodeControl" type:"string" enum:"AudioDescriptionLanguageCodeControl"` - - // The name of this AudioDescription. Outputs will use this name to uniquely - // identify this AudioDescription. Description names should be unique within - // this Live Event. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // Settings that control how input audio channels are remixed into the output - // audio channels. - RemixSettings *RemixSettings `locationName:"remixSettings" type:"structure"` - - // Used for MS Smooth and Apple HLS outputs. Indicates the name displayed by - // the player (eg. English, or Director Commentary). - StreamName *string `locationName:"streamName" type:"string"` -} - -// String returns the string representation -func (s AudioDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioDescription) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AudioDescription) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AudioDescription"} - if s.AudioSelectorName == nil { - invalidParams.Add(request.NewErrParamRequired("AudioSelectorName")) - } - if s.LanguageCode != nil && len(*s.LanguageCode) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LanguageCode", 3)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.CodecSettings != nil { - if err := s.CodecSettings.Validate(); err != nil { - invalidParams.AddNested("CodecSettings", err.(request.ErrInvalidParams)) - } - } - if s.RemixSettings != nil { - if err := s.RemixSettings.Validate(); err != nil { - invalidParams.AddNested("RemixSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioNormalizationSettings sets the AudioNormalizationSettings field's value. -func (s *AudioDescription) SetAudioNormalizationSettings(v *AudioNormalizationSettings) *AudioDescription { - s.AudioNormalizationSettings = v - return s -} - -// SetAudioSelectorName sets the AudioSelectorName field's value. -func (s *AudioDescription) SetAudioSelectorName(v string) *AudioDescription { - s.AudioSelectorName = &v - return s -} - -// SetAudioType sets the AudioType field's value. -func (s *AudioDescription) SetAudioType(v string) *AudioDescription { - s.AudioType = &v - return s -} - -// SetAudioTypeControl sets the AudioTypeControl field's value. -func (s *AudioDescription) SetAudioTypeControl(v string) *AudioDescription { - s.AudioTypeControl = &v - return s -} - -// SetCodecSettings sets the CodecSettings field's value. -func (s *AudioDescription) SetCodecSettings(v *AudioCodecSettings) *AudioDescription { - s.CodecSettings = v - return s -} - -// SetLanguageCode sets the LanguageCode field's value. -func (s *AudioDescription) SetLanguageCode(v string) *AudioDescription { - s.LanguageCode = &v - return s -} - -// SetLanguageCodeControl sets the LanguageCodeControl field's value. -func (s *AudioDescription) SetLanguageCodeControl(v string) *AudioDescription { - s.LanguageCodeControl = &v - return s -} - -// SetName sets the Name field's value. -func (s *AudioDescription) SetName(v string) *AudioDescription { - s.Name = &v - return s -} - -// SetRemixSettings sets the RemixSettings field's value. -func (s *AudioDescription) SetRemixSettings(v *RemixSettings) *AudioDescription { - s.RemixSettings = v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *AudioDescription) SetStreamName(v string) *AudioDescription { - s.StreamName = &v - return s -} - -type AudioLanguageSelection struct { - _ struct{} `type:"structure"` - - // Selects a specific three-letter language code from within an audio source. - // - // LanguageCode is a required field - LanguageCode *string `locationName:"languageCode" type:"string" required:"true"` - - // When set to "strict", the transport stream demux strictly identifies audio - // streams by their language descriptor. If a PMT update occurs such that an - // audio stream matching the initially selected language is no longer present - // then mute will be encoded until the language returns. If "loose", then on - // a PMT update the demux will choose another audio stream in the program with - // the same stream type if it can't find one with the same language. - LanguageSelectionPolicy *string `locationName:"languageSelectionPolicy" type:"string" enum:"AudioLanguageSelectionPolicy"` -} - -// String returns the string representation -func (s AudioLanguageSelection) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioLanguageSelection) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AudioLanguageSelection) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AudioLanguageSelection"} - if s.LanguageCode == nil { - invalidParams.Add(request.NewErrParamRequired("LanguageCode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLanguageCode sets the LanguageCode field's value. -func (s *AudioLanguageSelection) SetLanguageCode(v string) *AudioLanguageSelection { - s.LanguageCode = &v - return s -} - -// SetLanguageSelectionPolicy sets the LanguageSelectionPolicy field's value. -func (s *AudioLanguageSelection) SetLanguageSelectionPolicy(v string) *AudioLanguageSelection { - s.LanguageSelectionPolicy = &v - return s -} - -type AudioNormalizationSettings struct { - _ struct{} `type:"structure"` - - // Audio normalization algorithm to use. itu17701 conforms to the CALM Act specification, - // itu17702 conforms to the EBU R-128 specification. - Algorithm *string `locationName:"algorithm" type:"string" enum:"AudioNormalizationAlgorithm"` - - // When set to correctAudio the output audio is corrected using the chosen algorithm. - // If set to measureOnly, the audio will be measured but not adjusted. - AlgorithmControl *string `locationName:"algorithmControl" type:"string" enum:"AudioNormalizationAlgorithmControl"` - - // Target LKFS(loudness) to adjust volume to. If no value is entered, a default - // value will be used according to the chosen algorithm. The CALM Act (1770-1) - // recommends a target of -24 LKFS. The EBU R-128 specification (1770-2) recommends - // a target of -23 LKFS. - TargetLkfs *float64 `locationName:"targetLkfs" type:"double"` -} - -// String returns the string representation -func (s AudioNormalizationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioNormalizationSettings) GoString() string { - return s.String() -} - -// SetAlgorithm sets the Algorithm field's value. -func (s *AudioNormalizationSettings) SetAlgorithm(v string) *AudioNormalizationSettings { - s.Algorithm = &v - return s -} - -// SetAlgorithmControl sets the AlgorithmControl field's value. -func (s *AudioNormalizationSettings) SetAlgorithmControl(v string) *AudioNormalizationSettings { - s.AlgorithmControl = &v - return s -} - -// SetTargetLkfs sets the TargetLkfs field's value. -func (s *AudioNormalizationSettings) SetTargetLkfs(v float64) *AudioNormalizationSettings { - s.TargetLkfs = &v - return s -} - -type AudioOnlyHlsSettings struct { - _ struct{} `type:"structure"` - - // Specifies the group to which the audio Rendition belongs. - AudioGroupId *string `locationName:"audioGroupId" type:"string"` - - // For use with an audio only Stream. Must be a .jpg or .png file. If given, - // this image will be used as the cover-art for the audio only output. Ideally, - // it should be formatted for an iPhone screen for two reasons. The iPhone does - // not resize the image, it crops a centered image on the top/bottom and left/right. - // Additionally, this image file gets saved bit-for-bit into every 10-second - // segment file, so will increase bandwidth by {image file size} * {segment - // count} * {user count.}. - AudioOnlyImage *InputLocation `locationName:"audioOnlyImage" type:"structure"` - - // Four types of audio-only tracks are supported:Audio-Only Variant StreamThe - // client can play back this audio-only stream instead of video in low-bandwidth - // scenarios. Represented as an EXT-X-STREAM-INF in the HLS manifest.Alternate - // Audio, Auto Select, DefaultAlternate rendition that the client should try - // to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest - // with DEFAULT=YES, AUTOSELECT=YESAlternate Audio, Auto Select, Not DefaultAlternate - // rendition that the client may try to play back by default. Represented as - // an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=YESAlternate - // Audio, not Auto SelectAlternate rendition that the client will not try to - // play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with - // DEFAULT=NO, AUTOSELECT=NO - AudioTrackType *string `locationName:"audioTrackType" type:"string" enum:"AudioOnlyHlsTrackType"` -} - -// String returns the string representation -func (s AudioOnlyHlsSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioOnlyHlsSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AudioOnlyHlsSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AudioOnlyHlsSettings"} - if s.AudioOnlyImage != nil { - if err := s.AudioOnlyImage.Validate(); err != nil { - invalidParams.AddNested("AudioOnlyImage", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioGroupId sets the AudioGroupId field's value. -func (s *AudioOnlyHlsSettings) SetAudioGroupId(v string) *AudioOnlyHlsSettings { - s.AudioGroupId = &v - return s -} - -// SetAudioOnlyImage sets the AudioOnlyImage field's value. -func (s *AudioOnlyHlsSettings) SetAudioOnlyImage(v *InputLocation) *AudioOnlyHlsSettings { - s.AudioOnlyImage = v - return s -} - -// SetAudioTrackType sets the AudioTrackType field's value. -func (s *AudioOnlyHlsSettings) SetAudioTrackType(v string) *AudioOnlyHlsSettings { - s.AudioTrackType = &v - return s -} - -type AudioPidSelection struct { - _ struct{} `type:"structure"` - - // Selects a specific PID from within a source. - // - // Pid is a required field - Pid *int64 `locationName:"pid" type:"integer" required:"true"` -} - -// String returns the string representation -func (s AudioPidSelection) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioPidSelection) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AudioPidSelection) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AudioPidSelection"} - if s.Pid == nil { - invalidParams.Add(request.NewErrParamRequired("Pid")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPid sets the Pid field's value. -func (s *AudioPidSelection) SetPid(v int64) *AudioPidSelection { - s.Pid = &v - return s -} - -type AudioSelector struct { - _ struct{} `type:"structure"` - - // The name of this AudioSelector. AudioDescriptions will use this name to uniquely - // identify this Selector. Selector names should be unique per input. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The audio selector settings. - SelectorSettings *AudioSelectorSettings `locationName:"selectorSettings" type:"structure"` -} - -// String returns the string representation -func (s AudioSelector) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioSelector) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AudioSelector) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AudioSelector"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.SelectorSettings != nil { - if err := s.SelectorSettings.Validate(); err != nil { - invalidParams.AddNested("SelectorSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *AudioSelector) SetName(v string) *AudioSelector { - s.Name = &v - return s -} - -// SetSelectorSettings sets the SelectorSettings field's value. -func (s *AudioSelector) SetSelectorSettings(v *AudioSelectorSettings) *AudioSelector { - s.SelectorSettings = v - return s -} - -type AudioSelectorSettings struct { - _ struct{} `type:"structure"` - - AudioLanguageSelection *AudioLanguageSelection `locationName:"audioLanguageSelection" type:"structure"` - - AudioPidSelection *AudioPidSelection `locationName:"audioPidSelection" type:"structure"` -} - -// String returns the string representation -func (s AudioSelectorSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AudioSelectorSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AudioSelectorSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AudioSelectorSettings"} - if s.AudioLanguageSelection != nil { - if err := s.AudioLanguageSelection.Validate(); err != nil { - invalidParams.AddNested("AudioLanguageSelection", err.(request.ErrInvalidParams)) - } - } - if s.AudioPidSelection != nil { - if err := s.AudioPidSelection.Validate(); err != nil { - invalidParams.AddNested("AudioPidSelection", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioLanguageSelection sets the AudioLanguageSelection field's value. -func (s *AudioSelectorSettings) SetAudioLanguageSelection(v *AudioLanguageSelection) *AudioSelectorSettings { - s.AudioLanguageSelection = v - return s -} - -// SetAudioPidSelection sets the AudioPidSelection field's value. -func (s *AudioSelectorSettings) SetAudioPidSelection(v *AudioPidSelection) *AudioSelectorSettings { - s.AudioPidSelection = v - return s -} - -type AvailBlanking struct { - _ struct{} `type:"structure"` - - // Blanking image to be used. Leave empty for solid black. Only bmp and png - // images are supported. - AvailBlankingImage *InputLocation `locationName:"availBlankingImage" type:"structure"` - - // When set to enabled, causes video, audio and captions to be blanked when - // insertion metadata is added. - State *string `locationName:"state" type:"string" enum:"AvailBlankingState"` -} - -// String returns the string representation -func (s AvailBlanking) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailBlanking) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AvailBlanking) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AvailBlanking"} - if s.AvailBlankingImage != nil { - if err := s.AvailBlankingImage.Validate(); err != nil { - invalidParams.AddNested("AvailBlankingImage", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailBlankingImage sets the AvailBlankingImage field's value. -func (s *AvailBlanking) SetAvailBlankingImage(v *InputLocation) *AvailBlanking { - s.AvailBlankingImage = v - return s -} - -// SetState sets the State field's value. -func (s *AvailBlanking) SetState(v string) *AvailBlanking { - s.State = &v - return s -} - -type AvailConfiguration struct { - _ struct{} `type:"structure"` - - // Ad avail settings. - AvailSettings *AvailSettings `locationName:"availSettings" type:"structure"` -} - -// String returns the string representation -func (s AvailConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AvailConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AvailConfiguration"} - if s.AvailSettings != nil { - if err := s.AvailSettings.Validate(); err != nil { - invalidParams.AddNested("AvailSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailSettings sets the AvailSettings field's value. -func (s *AvailConfiguration) SetAvailSettings(v *AvailSettings) *AvailConfiguration { - s.AvailSettings = v - return s -} - -type AvailSettings struct { - _ struct{} `type:"structure"` - - Scte35SpliceInsert *Scte35SpliceInsert `locationName:"scte35SpliceInsert" type:"structure"` - - Scte35TimeSignalApos *Scte35TimeSignalApos `locationName:"scte35TimeSignalApos" type:"structure"` -} - -// String returns the string representation -func (s AvailSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AvailSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AvailSettings"} - if s.Scte35SpliceInsert != nil { - if err := s.Scte35SpliceInsert.Validate(); err != nil { - invalidParams.AddNested("Scte35SpliceInsert", err.(request.ErrInvalidParams)) - } - } - if s.Scte35TimeSignalApos != nil { - if err := s.Scte35TimeSignalApos.Validate(); err != nil { - invalidParams.AddNested("Scte35TimeSignalApos", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetScte35SpliceInsert sets the Scte35SpliceInsert field's value. -func (s *AvailSettings) SetScte35SpliceInsert(v *Scte35SpliceInsert) *AvailSettings { - s.Scte35SpliceInsert = v - return s -} - -// SetScte35TimeSignalApos sets the Scte35TimeSignalApos field's value. -func (s *AvailSettings) SetScte35TimeSignalApos(v *Scte35TimeSignalApos) *AvailSettings { - s.Scte35TimeSignalApos = v - return s -} - -// A list of schedule actions to create (in a request) or that have been created -// (in a response). -type BatchScheduleActionCreateRequest struct { - _ struct{} `type:"structure"` - - // A list of schedule actions to create. - // - // ScheduleActions is a required field - ScheduleActions []*ScheduleAction `locationName:"scheduleActions" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchScheduleActionCreateRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchScheduleActionCreateRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchScheduleActionCreateRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchScheduleActionCreateRequest"} - if s.ScheduleActions == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduleActions")) - } - if s.ScheduleActions != nil { - for i, v := range s.ScheduleActions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ScheduleActions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetScheduleActions sets the ScheduleActions field's value. -func (s *BatchScheduleActionCreateRequest) SetScheduleActions(v []*ScheduleAction) *BatchScheduleActionCreateRequest { - s.ScheduleActions = v - return s -} - -// List of actions that have been created in the schedule. -type BatchScheduleActionCreateResult struct { - _ struct{} `type:"structure"` - - // List of actions that have been created in the schedule. - // - // ScheduleActions is a required field - ScheduleActions []*ScheduleAction `locationName:"scheduleActions" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchScheduleActionCreateResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchScheduleActionCreateResult) GoString() string { - return s.String() -} - -// SetScheduleActions sets the ScheduleActions field's value. -func (s *BatchScheduleActionCreateResult) SetScheduleActions(v []*ScheduleAction) *BatchScheduleActionCreateResult { - s.ScheduleActions = v - return s -} - -// A list of schedule actions to delete. -type BatchScheduleActionDeleteRequest struct { - _ struct{} `type:"structure"` - - // A list of schedule actions to delete. - // - // ActionNames is a required field - ActionNames []*string `locationName:"actionNames" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchScheduleActionDeleteRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchScheduleActionDeleteRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchScheduleActionDeleteRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchScheduleActionDeleteRequest"} - if s.ActionNames == nil { - invalidParams.Add(request.NewErrParamRequired("ActionNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionNames sets the ActionNames field's value. -func (s *BatchScheduleActionDeleteRequest) SetActionNames(v []*string) *BatchScheduleActionDeleteRequest { - s.ActionNames = v - return s -} - -// List of actions that have been deleted from the schedule. -type BatchScheduleActionDeleteResult struct { - _ struct{} `type:"structure"` - - // List of actions that have been deleted from the schedule. - // - // ScheduleActions is a required field - ScheduleActions []*ScheduleAction `locationName:"scheduleActions" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchScheduleActionDeleteResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchScheduleActionDeleteResult) GoString() string { - return s.String() -} - -// SetScheduleActions sets the ScheduleActions field's value. -func (s *BatchScheduleActionDeleteResult) SetScheduleActions(v []*ScheduleAction) *BatchScheduleActionDeleteResult { - s.ScheduleActions = v - return s -} - -// A request to create actions (add actions to the schedule), delete actions -// (remove actions from the schedule), or both create and delete actions. -type BatchUpdateScheduleInput struct { - _ struct{} `type:"structure"` - - // ChannelId is a required field - ChannelId *string `location:"uri" locationName:"channelId" type:"string" required:"true"` - - // Schedule actions to create in the schedule. - Creates *BatchScheduleActionCreateRequest `locationName:"creates" type:"structure"` - - // Schedule actions to delete from the schedule. - Deletes *BatchScheduleActionDeleteRequest `locationName:"deletes" type:"structure"` -} - -// String returns the string representation -func (s BatchUpdateScheduleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchUpdateScheduleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchUpdateScheduleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchUpdateScheduleInput"} - if s.ChannelId == nil { - invalidParams.Add(request.NewErrParamRequired("ChannelId")) - } - if s.ChannelId != nil && len(*s.ChannelId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChannelId", 1)) - } - if s.Creates != nil { - if err := s.Creates.Validate(); err != nil { - invalidParams.AddNested("Creates", err.(request.ErrInvalidParams)) - } - } - if s.Deletes != nil { - if err := s.Deletes.Validate(); err != nil { - invalidParams.AddNested("Deletes", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChannelId sets the ChannelId field's value. -func (s *BatchUpdateScheduleInput) SetChannelId(v string) *BatchUpdateScheduleInput { - s.ChannelId = &v - return s -} - -// SetCreates sets the Creates field's value. -func (s *BatchUpdateScheduleInput) SetCreates(v *BatchScheduleActionCreateRequest) *BatchUpdateScheduleInput { - s.Creates = v - return s -} - -// SetDeletes sets the Deletes field's value. -func (s *BatchUpdateScheduleInput) SetDeletes(v *BatchScheduleActionDeleteRequest) *BatchUpdateScheduleInput { - s.Deletes = v - return s -} - -type BatchUpdateScheduleOutput struct { - _ struct{} `type:"structure"` - - // List of actions that have been created in the schedule. - Creates *BatchScheduleActionCreateResult `locationName:"creates" type:"structure"` - - // List of actions that have been deleted from the schedule. - Deletes *BatchScheduleActionDeleteResult `locationName:"deletes" type:"structure"` -} - -// String returns the string representation -func (s BatchUpdateScheduleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchUpdateScheduleOutput) GoString() string { - return s.String() -} - -// SetCreates sets the Creates field's value. -func (s *BatchUpdateScheduleOutput) SetCreates(v *BatchScheduleActionCreateResult) *BatchUpdateScheduleOutput { - s.Creates = v - return s -} - -// SetDeletes sets the Deletes field's value. -func (s *BatchUpdateScheduleOutput) SetDeletes(v *BatchScheduleActionDeleteResult) *BatchUpdateScheduleOutput { - s.Deletes = v - return s -} - -type BlackoutSlate struct { - _ struct{} `type:"structure"` - - // Blackout slate image to be used. Leave empty for solid black. Only bmp and - // png images are supported. - BlackoutSlateImage *InputLocation `locationName:"blackoutSlateImage" type:"structure"` - - // Setting to enabled causes the encoder to blackout the video, audio, and captions, - // and raise the "Network Blackout Image" slate when an SCTE104/35 Network End - // Segmentation Descriptor is encountered. The blackout will be lifted when - // the Network Start Segmentation Descriptor is encountered. The Network End - // and Network Start descriptors must contain a network ID that matches the - // value entered in "Network ID". - NetworkEndBlackout *string `locationName:"networkEndBlackout" type:"string" enum:"BlackoutSlateNetworkEndBlackout"` - - // Path to local file to use as Network End Blackout image. Image will be scaled - // to fill the entire output raster. - NetworkEndBlackoutImage *InputLocation `locationName:"networkEndBlackoutImage" type:"structure"` - - // Provides Network ID that matches EIDR ID format (e.g., "10.XXXX/XXXX-XXXX-XXXX-XXXX-XXXX-C"). - NetworkId *string `locationName:"networkId" min:"34" type:"string"` - - // When set to enabled, causes video, audio and captions to be blanked when - // indicated by program metadata. - State *string `locationName:"state" type:"string" enum:"BlackoutSlateState"` -} - -// String returns the string representation -func (s BlackoutSlate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BlackoutSlate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BlackoutSlate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BlackoutSlate"} - if s.NetworkId != nil && len(*s.NetworkId) < 34 { - invalidParams.Add(request.NewErrParamMinLen("NetworkId", 34)) - } - if s.BlackoutSlateImage != nil { - if err := s.BlackoutSlateImage.Validate(); err != nil { - invalidParams.AddNested("BlackoutSlateImage", err.(request.ErrInvalidParams)) - } - } - if s.NetworkEndBlackoutImage != nil { - if err := s.NetworkEndBlackoutImage.Validate(); err != nil { - invalidParams.AddNested("NetworkEndBlackoutImage", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBlackoutSlateImage sets the BlackoutSlateImage field's value. -func (s *BlackoutSlate) SetBlackoutSlateImage(v *InputLocation) *BlackoutSlate { - s.BlackoutSlateImage = v - return s -} - -// SetNetworkEndBlackout sets the NetworkEndBlackout field's value. -func (s *BlackoutSlate) SetNetworkEndBlackout(v string) *BlackoutSlate { - s.NetworkEndBlackout = &v - return s -} - -// SetNetworkEndBlackoutImage sets the NetworkEndBlackoutImage field's value. -func (s *BlackoutSlate) SetNetworkEndBlackoutImage(v *InputLocation) *BlackoutSlate { - s.NetworkEndBlackoutImage = v - return s -} - -// SetNetworkId sets the NetworkId field's value. -func (s *BlackoutSlate) SetNetworkId(v string) *BlackoutSlate { - s.NetworkId = &v - return s -} - -// SetState sets the State field's value. -func (s *BlackoutSlate) SetState(v string) *BlackoutSlate { - s.State = &v - return s -} - -type BurnInDestinationSettings struct { - _ struct{} `type:"structure"` - - // If no explicit xPosition or yPosition is provided, setting alignment to centered - // will place the captions at the bottom center of the output. Similarly, setting - // a left alignment will align captions to the bottom left of the output. If - // x and y positions are given in conjunction with the alignment parameter, - // the font will be justified (either left or centered) relative to those coordinates. - // Selecting "smart" justification will left-justify live subtitles and center-justify - // pre-recorded subtitles. All burn-in and DVB-Sub font settings must match. - Alignment *string `locationName:"alignment" type:"string" enum:"BurnInAlignment"` - - // Specifies the color of the rectangle behind the captions. All burn-in and - // DVB-Sub font settings must match. - BackgroundColor *string `locationName:"backgroundColor" type:"string" enum:"BurnInBackgroundColor"` - - // Specifies the opacity of the background rectangle. 255 is opaque; 0 is transparent. - // Leaving this parameter out is equivalent to setting it to 0 (transparent). - // All burn-in and DVB-Sub font settings must match. - BackgroundOpacity *int64 `locationName:"backgroundOpacity" type:"integer"` - - // External font file used for caption burn-in. File extension must be 'ttf' - // or 'tte'. Although the user can select output fonts for many different types - // of input captions, embedded, STL and teletext sources use a strict grid system. - // Using external fonts with these caption sources could cause unexpected display - // of proportional fonts. All burn-in and DVB-Sub font settings must match. - Font *InputLocation `locationName:"font" type:"structure"` - - // Specifies the color of the burned-in captions. This option is not valid for - // source captions that are STL, 608/embedded or teletext. These source settings - // are already pre-defined by the caption stream. All burn-in and DVB-Sub font - // settings must match. - FontColor *string `locationName:"fontColor" type:"string" enum:"BurnInFontColor"` - - // Specifies the opacity of the burned-in captions. 255 is opaque; 0 is transparent. - // All burn-in and DVB-Sub font settings must match. - FontOpacity *int64 `locationName:"fontOpacity" type:"integer"` - - // Font resolution in DPI (dots per inch); default is 96 dpi. All burn-in and - // DVB-Sub font settings must match. - FontResolution *int64 `locationName:"fontResolution" min:"96" type:"integer"` - - // When set to 'auto' fontSize will scale depending on the size of the output. - // Giving a positive integer will specify the exact font size in points. All - // burn-in and DVB-Sub font settings must match. - FontSize *string `locationName:"fontSize" type:"string"` - - // Specifies font outline color. This option is not valid for source captions - // that are either 608/embedded or teletext. These source settings are already - // pre-defined by the caption stream. All burn-in and DVB-Sub font settings - // must match. - OutlineColor *string `locationName:"outlineColor" type:"string" enum:"BurnInOutlineColor"` - - // Specifies font outline size in pixels. This option is not valid for source - // captions that are either 608/embedded or teletext. These source settings - // are already pre-defined by the caption stream. All burn-in and DVB-Sub font - // settings must match. - OutlineSize *int64 `locationName:"outlineSize" type:"integer"` - - // Specifies the color of the shadow cast by the captions. All burn-in and DVB-Sub - // font settings must match. - ShadowColor *string `locationName:"shadowColor" type:"string" enum:"BurnInShadowColor"` - - // Specifies the opacity of the shadow. 255 is opaque; 0 is transparent. Leaving - // this parameter out is equivalent to setting it to 0 (transparent). All burn-in - // and DVB-Sub font settings must match. - ShadowOpacity *int64 `locationName:"shadowOpacity" type:"integer"` - - // Specifies the horizontal offset of the shadow relative to the captions in - // pixels. A value of -2 would result in a shadow offset 2 pixels to the left. - // All burn-in and DVB-Sub font settings must match. - ShadowXOffset *int64 `locationName:"shadowXOffset" type:"integer"` - - // Specifies the vertical offset of the shadow relative to the captions in pixels. - // A value of -2 would result in a shadow offset 2 pixels above the text. All - // burn-in and DVB-Sub font settings must match. - ShadowYOffset *int64 `locationName:"shadowYOffset" type:"integer"` - - // Controls whether a fixed grid size will be used to generate the output subtitles - // bitmap. Only applicable for Teletext inputs and DVB-Sub/Burn-in outputs. - TeletextGridControl *string `locationName:"teletextGridControl" type:"string" enum:"BurnInTeletextGridControl"` - - // Specifies the horizontal position of the caption relative to the left side - // of the output in pixels. A value of 10 would result in the captions starting - // 10 pixels from the left of the output. If no explicit xPosition is provided, - // the horizontal caption position will be determined by the alignment parameter. - // All burn-in and DVB-Sub font settings must match. - XPosition *int64 `locationName:"xPosition" type:"integer"` - - // Specifies the vertical position of the caption relative to the top of the - // output in pixels. A value of 10 would result in the captions starting 10 - // pixels from the top of the output. If no explicit yPosition is provided, - // the caption will be positioned towards the bottom of the output. All burn-in - // and DVB-Sub font settings must match. - YPosition *int64 `locationName:"yPosition" type:"integer"` -} - -// String returns the string representation -func (s BurnInDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BurnInDestinationSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BurnInDestinationSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BurnInDestinationSettings"} - if s.FontResolution != nil && *s.FontResolution < 96 { - invalidParams.Add(request.NewErrParamMinValue("FontResolution", 96)) - } - if s.Font != nil { - if err := s.Font.Validate(); err != nil { - invalidParams.AddNested("Font", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlignment sets the Alignment field's value. -func (s *BurnInDestinationSettings) SetAlignment(v string) *BurnInDestinationSettings { - s.Alignment = &v - return s -} - -// SetBackgroundColor sets the BackgroundColor field's value. -func (s *BurnInDestinationSettings) SetBackgroundColor(v string) *BurnInDestinationSettings { - s.BackgroundColor = &v - return s -} - -// SetBackgroundOpacity sets the BackgroundOpacity field's value. -func (s *BurnInDestinationSettings) SetBackgroundOpacity(v int64) *BurnInDestinationSettings { - s.BackgroundOpacity = &v - return s -} - -// SetFont sets the Font field's value. -func (s *BurnInDestinationSettings) SetFont(v *InputLocation) *BurnInDestinationSettings { - s.Font = v - return s -} - -// SetFontColor sets the FontColor field's value. -func (s *BurnInDestinationSettings) SetFontColor(v string) *BurnInDestinationSettings { - s.FontColor = &v - return s -} - -// SetFontOpacity sets the FontOpacity field's value. -func (s *BurnInDestinationSettings) SetFontOpacity(v int64) *BurnInDestinationSettings { - s.FontOpacity = &v - return s -} - -// SetFontResolution sets the FontResolution field's value. -func (s *BurnInDestinationSettings) SetFontResolution(v int64) *BurnInDestinationSettings { - s.FontResolution = &v - return s -} - -// SetFontSize sets the FontSize field's value. -func (s *BurnInDestinationSettings) SetFontSize(v string) *BurnInDestinationSettings { - s.FontSize = &v - return s -} - -// SetOutlineColor sets the OutlineColor field's value. -func (s *BurnInDestinationSettings) SetOutlineColor(v string) *BurnInDestinationSettings { - s.OutlineColor = &v - return s -} - -// SetOutlineSize sets the OutlineSize field's value. -func (s *BurnInDestinationSettings) SetOutlineSize(v int64) *BurnInDestinationSettings { - s.OutlineSize = &v - return s -} - -// SetShadowColor sets the ShadowColor field's value. -func (s *BurnInDestinationSettings) SetShadowColor(v string) *BurnInDestinationSettings { - s.ShadowColor = &v - return s -} - -// SetShadowOpacity sets the ShadowOpacity field's value. -func (s *BurnInDestinationSettings) SetShadowOpacity(v int64) *BurnInDestinationSettings { - s.ShadowOpacity = &v - return s -} - -// SetShadowXOffset sets the ShadowXOffset field's value. -func (s *BurnInDestinationSettings) SetShadowXOffset(v int64) *BurnInDestinationSettings { - s.ShadowXOffset = &v - return s -} - -// SetShadowYOffset sets the ShadowYOffset field's value. -func (s *BurnInDestinationSettings) SetShadowYOffset(v int64) *BurnInDestinationSettings { - s.ShadowYOffset = &v - return s -} - -// SetTeletextGridControl sets the TeletextGridControl field's value. -func (s *BurnInDestinationSettings) SetTeletextGridControl(v string) *BurnInDestinationSettings { - s.TeletextGridControl = &v - return s -} - -// SetXPosition sets the XPosition field's value. -func (s *BurnInDestinationSettings) SetXPosition(v int64) *BurnInDestinationSettings { - s.XPosition = &v - return s -} - -// SetYPosition sets the YPosition field's value. -func (s *BurnInDestinationSettings) SetYPosition(v int64) *BurnInDestinationSettings { - s.YPosition = &v - return s -} - -// Output groups for this Live Event. Output groups contain information about -// where streams should be distributed. -type CaptionDescription struct { - _ struct{} `type:"structure"` - - // Specifies which input caption selector to use as a caption source when generating - // output captions. This field should match a captionSelector name. - // - // CaptionSelectorName is a required field - CaptionSelectorName *string `locationName:"captionSelectorName" type:"string" required:"true"` - - // Additional settings for captions destination that depend on the destination - // type. - DestinationSettings *CaptionDestinationSettings `locationName:"destinationSettings" type:"structure"` - - // ISO 639-2 three-digit code: http://www.loc.gov/standards/iso639-2/ - LanguageCode *string `locationName:"languageCode" type:"string"` - - // Human readable information to indicate captions available for players (eg. - // English, or Spanish). - LanguageDescription *string `locationName:"languageDescription" type:"string"` - - // Name of the caption description. Used to associate a caption description - // with an output. Names must be unique within an event. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` -} - -// String returns the string representation -func (s CaptionDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CaptionDescription) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CaptionDescription) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CaptionDescription"} - if s.CaptionSelectorName == nil { - invalidParams.Add(request.NewErrParamRequired("CaptionSelectorName")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.DestinationSettings != nil { - if err := s.DestinationSettings.Validate(); err != nil { - invalidParams.AddNested("DestinationSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCaptionSelectorName sets the CaptionSelectorName field's value. -func (s *CaptionDescription) SetCaptionSelectorName(v string) *CaptionDescription { - s.CaptionSelectorName = &v - return s -} - -// SetDestinationSettings sets the DestinationSettings field's value. -func (s *CaptionDescription) SetDestinationSettings(v *CaptionDestinationSettings) *CaptionDescription { - s.DestinationSettings = v - return s -} - -// SetLanguageCode sets the LanguageCode field's value. -func (s *CaptionDescription) SetLanguageCode(v string) *CaptionDescription { - s.LanguageCode = &v - return s -} - -// SetLanguageDescription sets the LanguageDescription field's value. -func (s *CaptionDescription) SetLanguageDescription(v string) *CaptionDescription { - s.LanguageDescription = &v - return s -} - -// SetName sets the Name field's value. -func (s *CaptionDescription) SetName(v string) *CaptionDescription { - s.Name = &v - return s -} - -type CaptionDestinationSettings struct { - _ struct{} `type:"structure"` - - AribDestinationSettings *AribDestinationSettings `locationName:"aribDestinationSettings" type:"structure"` - - BurnInDestinationSettings *BurnInDestinationSettings `locationName:"burnInDestinationSettings" type:"structure"` - - DvbSubDestinationSettings *DvbSubDestinationSettings `locationName:"dvbSubDestinationSettings" type:"structure"` - - EmbeddedDestinationSettings *EmbeddedDestinationSettings `locationName:"embeddedDestinationSettings" type:"structure"` - - EmbeddedPlusScte20DestinationSettings *EmbeddedPlusScte20DestinationSettings `locationName:"embeddedPlusScte20DestinationSettings" type:"structure"` - - RtmpCaptionInfoDestinationSettings *RtmpCaptionInfoDestinationSettings `locationName:"rtmpCaptionInfoDestinationSettings" type:"structure"` - - Scte20PlusEmbeddedDestinationSettings *Scte20PlusEmbeddedDestinationSettings `locationName:"scte20PlusEmbeddedDestinationSettings" type:"structure"` - - Scte27DestinationSettings *Scte27DestinationSettings `locationName:"scte27DestinationSettings" type:"structure"` - - SmpteTtDestinationSettings *SmpteTtDestinationSettings `locationName:"smpteTtDestinationSettings" type:"structure"` - - TeletextDestinationSettings *TeletextDestinationSettings `locationName:"teletextDestinationSettings" type:"structure"` - - TtmlDestinationSettings *TtmlDestinationSettings `locationName:"ttmlDestinationSettings" type:"structure"` - - WebvttDestinationSettings *WebvttDestinationSettings `locationName:"webvttDestinationSettings" type:"structure"` -} - -// String returns the string representation -func (s CaptionDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CaptionDestinationSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CaptionDestinationSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CaptionDestinationSettings"} - if s.BurnInDestinationSettings != nil { - if err := s.BurnInDestinationSettings.Validate(); err != nil { - invalidParams.AddNested("BurnInDestinationSettings", err.(request.ErrInvalidParams)) - } - } - if s.DvbSubDestinationSettings != nil { - if err := s.DvbSubDestinationSettings.Validate(); err != nil { - invalidParams.AddNested("DvbSubDestinationSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAribDestinationSettings sets the AribDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetAribDestinationSettings(v *AribDestinationSettings) *CaptionDestinationSettings { - s.AribDestinationSettings = v - return s -} - -// SetBurnInDestinationSettings sets the BurnInDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetBurnInDestinationSettings(v *BurnInDestinationSettings) *CaptionDestinationSettings { - s.BurnInDestinationSettings = v - return s -} - -// SetDvbSubDestinationSettings sets the DvbSubDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetDvbSubDestinationSettings(v *DvbSubDestinationSettings) *CaptionDestinationSettings { - s.DvbSubDestinationSettings = v - return s -} - -// SetEmbeddedDestinationSettings sets the EmbeddedDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetEmbeddedDestinationSettings(v *EmbeddedDestinationSettings) *CaptionDestinationSettings { - s.EmbeddedDestinationSettings = v - return s -} - -// SetEmbeddedPlusScte20DestinationSettings sets the EmbeddedPlusScte20DestinationSettings field's value. -func (s *CaptionDestinationSettings) SetEmbeddedPlusScte20DestinationSettings(v *EmbeddedPlusScte20DestinationSettings) *CaptionDestinationSettings { - s.EmbeddedPlusScte20DestinationSettings = v - return s -} - -// SetRtmpCaptionInfoDestinationSettings sets the RtmpCaptionInfoDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetRtmpCaptionInfoDestinationSettings(v *RtmpCaptionInfoDestinationSettings) *CaptionDestinationSettings { - s.RtmpCaptionInfoDestinationSettings = v - return s -} - -// SetScte20PlusEmbeddedDestinationSettings sets the Scte20PlusEmbeddedDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetScte20PlusEmbeddedDestinationSettings(v *Scte20PlusEmbeddedDestinationSettings) *CaptionDestinationSettings { - s.Scte20PlusEmbeddedDestinationSettings = v - return s -} - -// SetScte27DestinationSettings sets the Scte27DestinationSettings field's value. -func (s *CaptionDestinationSettings) SetScte27DestinationSettings(v *Scte27DestinationSettings) *CaptionDestinationSettings { - s.Scte27DestinationSettings = v - return s -} - -// SetSmpteTtDestinationSettings sets the SmpteTtDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetSmpteTtDestinationSettings(v *SmpteTtDestinationSettings) *CaptionDestinationSettings { - s.SmpteTtDestinationSettings = v - return s -} - -// SetTeletextDestinationSettings sets the TeletextDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetTeletextDestinationSettings(v *TeletextDestinationSettings) *CaptionDestinationSettings { - s.TeletextDestinationSettings = v - return s -} - -// SetTtmlDestinationSettings sets the TtmlDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetTtmlDestinationSettings(v *TtmlDestinationSettings) *CaptionDestinationSettings { - s.TtmlDestinationSettings = v - return s -} - -// SetWebvttDestinationSettings sets the WebvttDestinationSettings field's value. -func (s *CaptionDestinationSettings) SetWebvttDestinationSettings(v *WebvttDestinationSettings) *CaptionDestinationSettings { - s.WebvttDestinationSettings = v - return s -} - -// Maps a caption channel to an ISO 693-2 language code (http://www.loc.gov/standards/iso639-2), -// with an optional description. -type CaptionLanguageMapping struct { - _ struct{} `type:"structure"` - - // The closed caption channel being described by this CaptionLanguageMapping. - // Each channel mapping must have a unique channel number (maximum of 4) - // - // CaptionChannel is a required field - CaptionChannel *int64 `locationName:"captionChannel" min:"1" type:"integer" required:"true"` - - // Three character ISO 639-2 language code (see http://www.loc.gov/standards/iso639-2) - // - // LanguageCode is a required field - LanguageCode *string `locationName:"languageCode" min:"3" type:"string" required:"true"` - - // Textual description of language - // - // LanguageDescription is a required field - LanguageDescription *string `locationName:"languageDescription" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CaptionLanguageMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CaptionLanguageMapping) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CaptionLanguageMapping) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CaptionLanguageMapping"} - if s.CaptionChannel == nil { - invalidParams.Add(request.NewErrParamRequired("CaptionChannel")) - } - if s.CaptionChannel != nil && *s.CaptionChannel < 1 { - invalidParams.Add(request.NewErrParamMinValue("CaptionChannel", 1)) - } - if s.LanguageCode == nil { - invalidParams.Add(request.NewErrParamRequired("LanguageCode")) - } - if s.LanguageCode != nil && len(*s.LanguageCode) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LanguageCode", 3)) - } - if s.LanguageDescription == nil { - invalidParams.Add(request.NewErrParamRequired("LanguageDescription")) - } - if s.LanguageDescription != nil && len(*s.LanguageDescription) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LanguageDescription", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCaptionChannel sets the CaptionChannel field's value. -func (s *CaptionLanguageMapping) SetCaptionChannel(v int64) *CaptionLanguageMapping { - s.CaptionChannel = &v - return s -} - -// SetLanguageCode sets the LanguageCode field's value. -func (s *CaptionLanguageMapping) SetLanguageCode(v string) *CaptionLanguageMapping { - s.LanguageCode = &v - return s -} - -// SetLanguageDescription sets the LanguageDescription field's value. -func (s *CaptionLanguageMapping) SetLanguageDescription(v string) *CaptionLanguageMapping { - s.LanguageDescription = &v - return s -} - -// Output groups for this Live Event. Output groups contain information about -// where streams should be distributed. -type CaptionSelector struct { - _ struct{} `type:"structure"` - - // When specified this field indicates the three letter language code of the - // caption track to extract from the source. - LanguageCode *string `locationName:"languageCode" type:"string"` - - // Name identifier for a caption selector. This name is used to associate this - // caption selector with one or more caption descriptions. Names must be unique - // within an event. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // Caption selector settings. - SelectorSettings *CaptionSelectorSettings `locationName:"selectorSettings" type:"structure"` -} - -// String returns the string representation -func (s CaptionSelector) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CaptionSelector) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CaptionSelector) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CaptionSelector"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.SelectorSettings != nil { - if err := s.SelectorSettings.Validate(); err != nil { - invalidParams.AddNested("SelectorSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLanguageCode sets the LanguageCode field's value. -func (s *CaptionSelector) SetLanguageCode(v string) *CaptionSelector { - s.LanguageCode = &v - return s -} - -// SetName sets the Name field's value. -func (s *CaptionSelector) SetName(v string) *CaptionSelector { - s.Name = &v - return s -} - -// SetSelectorSettings sets the SelectorSettings field's value. -func (s *CaptionSelector) SetSelectorSettings(v *CaptionSelectorSettings) *CaptionSelector { - s.SelectorSettings = v - return s -} - -type CaptionSelectorSettings struct { - _ struct{} `type:"structure"` - - AribSourceSettings *AribSourceSettings `locationName:"aribSourceSettings" type:"structure"` - - DvbSubSourceSettings *DvbSubSourceSettings `locationName:"dvbSubSourceSettings" type:"structure"` - - EmbeddedSourceSettings *EmbeddedSourceSettings `locationName:"embeddedSourceSettings" type:"structure"` - - Scte20SourceSettings *Scte20SourceSettings `locationName:"scte20SourceSettings" type:"structure"` - - Scte27SourceSettings *Scte27SourceSettings `locationName:"scte27SourceSettings" type:"structure"` - - TeletextSourceSettings *TeletextSourceSettings `locationName:"teletextSourceSettings" type:"structure"` -} - -// String returns the string representation -func (s CaptionSelectorSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CaptionSelectorSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CaptionSelectorSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CaptionSelectorSettings"} - if s.DvbSubSourceSettings != nil { - if err := s.DvbSubSourceSettings.Validate(); err != nil { - invalidParams.AddNested("DvbSubSourceSettings", err.(request.ErrInvalidParams)) - } - } - if s.EmbeddedSourceSettings != nil { - if err := s.EmbeddedSourceSettings.Validate(); err != nil { - invalidParams.AddNested("EmbeddedSourceSettings", err.(request.ErrInvalidParams)) - } - } - if s.Scte20SourceSettings != nil { - if err := s.Scte20SourceSettings.Validate(); err != nil { - invalidParams.AddNested("Scte20SourceSettings", err.(request.ErrInvalidParams)) - } - } - if s.Scte27SourceSettings != nil { - if err := s.Scte27SourceSettings.Validate(); err != nil { - invalidParams.AddNested("Scte27SourceSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAribSourceSettings sets the AribSourceSettings field's value. -func (s *CaptionSelectorSettings) SetAribSourceSettings(v *AribSourceSettings) *CaptionSelectorSettings { - s.AribSourceSettings = v - return s -} - -// SetDvbSubSourceSettings sets the DvbSubSourceSettings field's value. -func (s *CaptionSelectorSettings) SetDvbSubSourceSettings(v *DvbSubSourceSettings) *CaptionSelectorSettings { - s.DvbSubSourceSettings = v - return s -} - -// SetEmbeddedSourceSettings sets the EmbeddedSourceSettings field's value. -func (s *CaptionSelectorSettings) SetEmbeddedSourceSettings(v *EmbeddedSourceSettings) *CaptionSelectorSettings { - s.EmbeddedSourceSettings = v - return s -} - -// SetScte20SourceSettings sets the Scte20SourceSettings field's value. -func (s *CaptionSelectorSettings) SetScte20SourceSettings(v *Scte20SourceSettings) *CaptionSelectorSettings { - s.Scte20SourceSettings = v - return s -} - -// SetScte27SourceSettings sets the Scte27SourceSettings field's value. -func (s *CaptionSelectorSettings) SetScte27SourceSettings(v *Scte27SourceSettings) *CaptionSelectorSettings { - s.Scte27SourceSettings = v - return s -} - -// SetTeletextSourceSettings sets the TeletextSourceSettings field's value. -func (s *CaptionSelectorSettings) SetTeletextSourceSettings(v *TeletextSourceSettings) *CaptionSelectorSettings { - s.TeletextSourceSettings = v - return s -} - -type Channel struct { - _ struct{} `type:"structure"` - - // The unique arn of the channel. - Arn *string `locationName:"arn" type:"string"` - - // A list of destinations of the channel. For UDP outputs, there is onedestination - // per output. For other types (HLS, for example), there isone destination per - // packager. - Destinations []*OutputDestination `locationName:"destinations" type:"list"` - - // The endpoints where outgoing connections initiate from - EgressEndpoints []*ChannelEgressEndpoint `locationName:"egressEndpoints" type:"list"` - - EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` - - // The unique id of the channel. - Id *string `locationName:"id" type:"string"` - - // List of input attachments for channel. - InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` - - InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` - - // The log level being written to CloudWatch Logs. - LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` - - // The name of the channel. (user-mutable) - Name *string `locationName:"name" type:"string"` - - // The number of currently healthy pipelines. - PipelinesRunningCount *int64 `locationName:"pipelinesRunningCount" type:"integer"` - - // The Amazon Resource Name (ARN) of the role assumed when running the Channel. - RoleArn *string `locationName:"roleArn" type:"string"` - - State *string `locationName:"state" type:"string" enum:"ChannelState"` -} - -// String returns the string representation -func (s Channel) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Channel) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Channel) SetArn(v string) *Channel { - s.Arn = &v - return s -} - -// SetDestinations sets the Destinations field's value. -func (s *Channel) SetDestinations(v []*OutputDestination) *Channel { - s.Destinations = v - return s -} - -// SetEgressEndpoints sets the EgressEndpoints field's value. -func (s *Channel) SetEgressEndpoints(v []*ChannelEgressEndpoint) *Channel { - s.EgressEndpoints = v - return s -} - -// SetEncoderSettings sets the EncoderSettings field's value. -func (s *Channel) SetEncoderSettings(v *EncoderSettings) *Channel { - s.EncoderSettings = v - return s -} - -// SetId sets the Id field's value. -func (s *Channel) SetId(v string) *Channel { - s.Id = &v - return s -} - -// SetInputAttachments sets the InputAttachments field's value. -func (s *Channel) SetInputAttachments(v []*InputAttachment) *Channel { - s.InputAttachments = v - return s -} - -// SetInputSpecification sets the InputSpecification field's value. -func (s *Channel) SetInputSpecification(v *InputSpecification) *Channel { - s.InputSpecification = v - return s -} - -// SetLogLevel sets the LogLevel field's value. -func (s *Channel) SetLogLevel(v string) *Channel { - s.LogLevel = &v - return s -} - -// SetName sets the Name field's value. -func (s *Channel) SetName(v string) *Channel { - s.Name = &v - return s -} - -// SetPipelinesRunningCount sets the PipelinesRunningCount field's value. -func (s *Channel) SetPipelinesRunningCount(v int64) *Channel { - s.PipelinesRunningCount = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *Channel) SetRoleArn(v string) *Channel { - s.RoleArn = &v - return s -} - -// SetState sets the State field's value. -func (s *Channel) SetState(v string) *Channel { - s.State = &v - return s -} - -type ChannelEgressEndpoint struct { - _ struct{} `type:"structure"` - - // Public IP of where a channel's output comes from - SourceIp *string `locationName:"sourceIp" type:"string"` -} - -// String returns the string representation -func (s ChannelEgressEndpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChannelEgressEndpoint) GoString() string { - return s.String() -} - -// SetSourceIp sets the SourceIp field's value. -func (s *ChannelEgressEndpoint) SetSourceIp(v string) *ChannelEgressEndpoint { - s.SourceIp = &v - return s -} - -type ChannelSummary struct { - _ struct{} `type:"structure"` - - // The unique arn of the channel. - Arn *string `locationName:"arn" type:"string"` - - // A list of destinations of the channel. For UDP outputs, there is onedestination - // per output. For other types (HLS, for example), there isone destination per - // packager. - Destinations []*OutputDestination `locationName:"destinations" type:"list"` - - // The endpoints where outgoing connections initiate from - EgressEndpoints []*ChannelEgressEndpoint `locationName:"egressEndpoints" type:"list"` - - // The unique id of the channel. - Id *string `locationName:"id" type:"string"` - - // List of input attachments for channel. - InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` - - InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` - - // The log level being written to CloudWatch Logs. - LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` - - // The name of the channel. (user-mutable) - Name *string `locationName:"name" type:"string"` - - // The number of currently healthy pipelines. - PipelinesRunningCount *int64 `locationName:"pipelinesRunningCount" type:"integer"` - - // The Amazon Resource Name (ARN) of the role assumed when running the Channel. - RoleArn *string `locationName:"roleArn" type:"string"` - - State *string `locationName:"state" type:"string" enum:"ChannelState"` -} - -// String returns the string representation -func (s ChannelSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChannelSummary) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ChannelSummary) SetArn(v string) *ChannelSummary { - s.Arn = &v - return s -} - -// SetDestinations sets the Destinations field's value. -func (s *ChannelSummary) SetDestinations(v []*OutputDestination) *ChannelSummary { - s.Destinations = v - return s -} - -// SetEgressEndpoints sets the EgressEndpoints field's value. -func (s *ChannelSummary) SetEgressEndpoints(v []*ChannelEgressEndpoint) *ChannelSummary { - s.EgressEndpoints = v - return s -} - -// SetId sets the Id field's value. -func (s *ChannelSummary) SetId(v string) *ChannelSummary { - s.Id = &v - return s -} - -// SetInputAttachments sets the InputAttachments field's value. -func (s *ChannelSummary) SetInputAttachments(v []*InputAttachment) *ChannelSummary { - s.InputAttachments = v - return s -} - -// SetInputSpecification sets the InputSpecification field's value. -func (s *ChannelSummary) SetInputSpecification(v *InputSpecification) *ChannelSummary { - s.InputSpecification = v - return s -} - -// SetLogLevel sets the LogLevel field's value. -func (s *ChannelSummary) SetLogLevel(v string) *ChannelSummary { - s.LogLevel = &v - return s -} - -// SetName sets the Name field's value. -func (s *ChannelSummary) SetName(v string) *ChannelSummary { - s.Name = &v - return s -} - -// SetPipelinesRunningCount sets the PipelinesRunningCount field's value. -func (s *ChannelSummary) SetPipelinesRunningCount(v int64) *ChannelSummary { - s.PipelinesRunningCount = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *ChannelSummary) SetRoleArn(v string) *ChannelSummary { - s.RoleArn = &v - return s -} - -// SetState sets the State field's value. -func (s *ChannelSummary) SetState(v string) *ChannelSummary { - s.State = &v - return s -} - -type CreateChannelInput struct { - _ struct{} `type:"structure"` - - Destinations []*OutputDestination `locationName:"destinations" type:"list"` - - EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` - - InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` - - InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` - - // The log level the user wants for their channel. - LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` - - Name *string `locationName:"name" type:"string"` - - RequestId *string `locationName:"requestId" type:"string" idempotencyToken:"true"` - - Reserved *string `locationName:"reserved" deprecated:"true" type:"string"` - - RoleArn *string `locationName:"roleArn" type:"string"` -} - -// String returns the string representation -func (s CreateChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateChannelInput"} - if s.EncoderSettings != nil { - if err := s.EncoderSettings.Validate(); err != nil { - invalidParams.AddNested("EncoderSettings", err.(request.ErrInvalidParams)) - } - } - if s.InputAttachments != nil { - for i, v := range s.InputAttachments { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputAttachments", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinations sets the Destinations field's value. -func (s *CreateChannelInput) SetDestinations(v []*OutputDestination) *CreateChannelInput { - s.Destinations = v - return s -} - -// SetEncoderSettings sets the EncoderSettings field's value. -func (s *CreateChannelInput) SetEncoderSettings(v *EncoderSettings) *CreateChannelInput { - s.EncoderSettings = v - return s -} - -// SetInputAttachments sets the InputAttachments field's value. -func (s *CreateChannelInput) SetInputAttachments(v []*InputAttachment) *CreateChannelInput { - s.InputAttachments = v - return s -} - -// SetInputSpecification sets the InputSpecification field's value. -func (s *CreateChannelInput) SetInputSpecification(v *InputSpecification) *CreateChannelInput { - s.InputSpecification = v - return s -} - -// SetLogLevel sets the LogLevel field's value. -func (s *CreateChannelInput) SetLogLevel(v string) *CreateChannelInput { - s.LogLevel = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateChannelInput) SetName(v string) *CreateChannelInput { - s.Name = &v - return s -} - -// SetRequestId sets the RequestId field's value. -func (s *CreateChannelInput) SetRequestId(v string) *CreateChannelInput { - s.RequestId = &v - return s -} - -// SetReserved sets the Reserved field's value. -func (s *CreateChannelInput) SetReserved(v string) *CreateChannelInput { - s.Reserved = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CreateChannelInput) SetRoleArn(v string) *CreateChannelInput { - s.RoleArn = &v - return s -} - -type CreateChannelOutput struct { - _ struct{} `type:"structure"` - - Channel *Channel `locationName:"channel" type:"structure"` -} - -// String returns the string representation -func (s CreateChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateChannelOutput) GoString() string { - return s.String() -} - -// SetChannel sets the Channel field's value. -func (s *CreateChannelOutput) SetChannel(v *Channel) *CreateChannelOutput { - s.Channel = v - return s -} - -type CreateInputInput struct { - _ struct{} `type:"structure"` - - Destinations []*InputDestinationRequest `locationName:"destinations" type:"list"` - - InputSecurityGroups []*string `locationName:"inputSecurityGroups" type:"list"` - - MediaConnectFlows []*MediaConnectFlowRequest `locationName:"mediaConnectFlows" type:"list"` - - Name *string `locationName:"name" type:"string"` - - RequestId *string `locationName:"requestId" type:"string" idempotencyToken:"true"` - - RoleArn *string `locationName:"roleArn" type:"string"` - - Sources []*InputSourceRequest `locationName:"sources" type:"list"` - - Type *string `locationName:"type" type:"string" enum:"InputType"` -} - -// String returns the string representation -func (s CreateInputInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInputInput) GoString() string { - return s.String() -} - -// SetDestinations sets the Destinations field's value. -func (s *CreateInputInput) SetDestinations(v []*InputDestinationRequest) *CreateInputInput { - s.Destinations = v - return s -} - -// SetInputSecurityGroups sets the InputSecurityGroups field's value. -func (s *CreateInputInput) SetInputSecurityGroups(v []*string) *CreateInputInput { - s.InputSecurityGroups = v - return s -} - -// SetMediaConnectFlows sets the MediaConnectFlows field's value. -func (s *CreateInputInput) SetMediaConnectFlows(v []*MediaConnectFlowRequest) *CreateInputInput { - s.MediaConnectFlows = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateInputInput) SetName(v string) *CreateInputInput { - s.Name = &v - return s -} - -// SetRequestId sets the RequestId field's value. -func (s *CreateInputInput) SetRequestId(v string) *CreateInputInput { - s.RequestId = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CreateInputInput) SetRoleArn(v string) *CreateInputInput { - s.RoleArn = &v - return s -} - -// SetSources sets the Sources field's value. -func (s *CreateInputInput) SetSources(v []*InputSourceRequest) *CreateInputInput { - s.Sources = v - return s -} - -// SetType sets the Type field's value. -func (s *CreateInputInput) SetType(v string) *CreateInputInput { - s.Type = &v - return s -} - -type CreateInputOutput struct { - _ struct{} `type:"structure"` - - Input *Input `locationName:"input" type:"structure"` -} - -// String returns the string representation -func (s CreateInputOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInputOutput) GoString() string { - return s.String() -} - -// SetInput sets the Input field's value. -func (s *CreateInputOutput) SetInput(v *Input) *CreateInputOutput { - s.Input = v - return s -} - -type CreateInputSecurityGroupInput struct { - _ struct{} `type:"structure"` - - WhitelistRules []*InputWhitelistRuleCidr `locationName:"whitelistRules" type:"list"` -} - -// String returns the string representation -func (s CreateInputSecurityGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInputSecurityGroupInput) GoString() string { - return s.String() -} - -// SetWhitelistRules sets the WhitelistRules field's value. -func (s *CreateInputSecurityGroupInput) SetWhitelistRules(v []*InputWhitelistRuleCidr) *CreateInputSecurityGroupInput { - s.WhitelistRules = v - return s -} - -type CreateInputSecurityGroupOutput struct { - _ struct{} `type:"structure"` - - // An Input Security Group - SecurityGroup *InputSecurityGroup `locationName:"securityGroup" type:"structure"` -} - -// String returns the string representation -func (s CreateInputSecurityGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInputSecurityGroupOutput) GoString() string { - return s.String() -} - -// SetSecurityGroup sets the SecurityGroup field's value. -func (s *CreateInputSecurityGroupOutput) SetSecurityGroup(v *InputSecurityGroup) *CreateInputSecurityGroupOutput { - s.SecurityGroup = v - return s -} - -type DeleteChannelInput struct { - _ struct{} `type:"structure"` - - // ChannelId is a required field - ChannelId *string `location:"uri" locationName:"channelId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteChannelInput"} - if s.ChannelId == nil { - invalidParams.Add(request.NewErrParamRequired("ChannelId")) - } - if s.ChannelId != nil && len(*s.ChannelId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChannelId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChannelId sets the ChannelId field's value. -func (s *DeleteChannelInput) SetChannelId(v string) *DeleteChannelInput { - s.ChannelId = &v - return s -} - -type DeleteChannelOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Destinations []*OutputDestination `locationName:"destinations" type:"list"` - - EgressEndpoints []*ChannelEgressEndpoint `locationName:"egressEndpoints" type:"list"` - - EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` - - Id *string `locationName:"id" type:"string"` - - InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` - - InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` - - // The log level the user wants for their channel. - LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` - - Name *string `locationName:"name" type:"string"` - - PipelinesRunningCount *int64 `locationName:"pipelinesRunningCount" type:"integer"` - - RoleArn *string `locationName:"roleArn" type:"string"` - - State *string `locationName:"state" type:"string" enum:"ChannelState"` -} - -// String returns the string representation -func (s DeleteChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteChannelOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DeleteChannelOutput) SetArn(v string) *DeleteChannelOutput { - s.Arn = &v - return s -} - -// SetDestinations sets the Destinations field's value. -func (s *DeleteChannelOutput) SetDestinations(v []*OutputDestination) *DeleteChannelOutput { - s.Destinations = v - return s -} - -// SetEgressEndpoints sets the EgressEndpoints field's value. -func (s *DeleteChannelOutput) SetEgressEndpoints(v []*ChannelEgressEndpoint) *DeleteChannelOutput { - s.EgressEndpoints = v - return s -} - -// SetEncoderSettings sets the EncoderSettings field's value. -func (s *DeleteChannelOutput) SetEncoderSettings(v *EncoderSettings) *DeleteChannelOutput { - s.EncoderSettings = v - return s -} - -// SetId sets the Id field's value. -func (s *DeleteChannelOutput) SetId(v string) *DeleteChannelOutput { - s.Id = &v - return s -} - -// SetInputAttachments sets the InputAttachments field's value. -func (s *DeleteChannelOutput) SetInputAttachments(v []*InputAttachment) *DeleteChannelOutput { - s.InputAttachments = v - return s -} - -// SetInputSpecification sets the InputSpecification field's value. -func (s *DeleteChannelOutput) SetInputSpecification(v *InputSpecification) *DeleteChannelOutput { - s.InputSpecification = v - return s -} - -// SetLogLevel sets the LogLevel field's value. -func (s *DeleteChannelOutput) SetLogLevel(v string) *DeleteChannelOutput { - s.LogLevel = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteChannelOutput) SetName(v string) *DeleteChannelOutput { - s.Name = &v - return s -} - -// SetPipelinesRunningCount sets the PipelinesRunningCount field's value. -func (s *DeleteChannelOutput) SetPipelinesRunningCount(v int64) *DeleteChannelOutput { - s.PipelinesRunningCount = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DeleteChannelOutput) SetRoleArn(v string) *DeleteChannelOutput { - s.RoleArn = &v - return s -} - -// SetState sets the State field's value. -func (s *DeleteChannelOutput) SetState(v string) *DeleteChannelOutput { - s.State = &v - return s -} - -type DeleteInputInput struct { - _ struct{} `type:"structure"` - - // InputId is a required field - InputId *string `location:"uri" locationName:"inputId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteInputInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInputInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInputInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInputInput"} - if s.InputId == nil { - invalidParams.Add(request.NewErrParamRequired("InputId")) - } - if s.InputId != nil && len(*s.InputId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputId sets the InputId field's value. -func (s *DeleteInputInput) SetInputId(v string) *DeleteInputInput { - s.InputId = &v - return s -} - -type DeleteInputOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteInputOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInputOutput) GoString() string { - return s.String() -} - -type DeleteInputSecurityGroupInput struct { - _ struct{} `type:"structure"` - - // InputSecurityGroupId is a required field - InputSecurityGroupId *string `location:"uri" locationName:"inputSecurityGroupId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteInputSecurityGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInputSecurityGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInputSecurityGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInputSecurityGroupInput"} - if s.InputSecurityGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("InputSecurityGroupId")) - } - if s.InputSecurityGroupId != nil && len(*s.InputSecurityGroupId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputSecurityGroupId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputSecurityGroupId sets the InputSecurityGroupId field's value. -func (s *DeleteInputSecurityGroupInput) SetInputSecurityGroupId(v string) *DeleteInputSecurityGroupInput { - s.InputSecurityGroupId = &v - return s -} - -type DeleteInputSecurityGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteInputSecurityGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInputSecurityGroupOutput) GoString() string { - return s.String() -} - -type DeleteReservationInput struct { - _ struct{} `type:"structure"` - - // ReservationId is a required field - ReservationId *string `location:"uri" locationName:"reservationId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteReservationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReservationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteReservationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteReservationInput"} - if s.ReservationId == nil { - invalidParams.Add(request.NewErrParamRequired("ReservationId")) - } - if s.ReservationId != nil && len(*s.ReservationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ReservationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReservationId sets the ReservationId field's value. -func (s *DeleteReservationInput) SetReservationId(v string) *DeleteReservationInput { - s.ReservationId = &v - return s -} - -type DeleteReservationOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Count *int64 `locationName:"count" type:"integer"` - - CurrencyCode *string `locationName:"currencyCode" type:"string"` - - Duration *int64 `locationName:"duration" type:"integer"` - - // Units for duration, e.g. 'MONTHS' - DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` - - End *string `locationName:"end" type:"string"` - - FixedPrice *float64 `locationName:"fixedPrice" type:"double"` - - Name *string `locationName:"name" type:"string"` - - OfferingDescription *string `locationName:"offeringDescription" type:"string"` - - OfferingId *string `locationName:"offeringId" type:"string"` - - // Offering type, e.g. 'NO_UPFRONT' - OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` - - Region *string `locationName:"region" type:"string"` - - ReservationId *string `locationName:"reservationId" type:"string"` - - // Resource configuration (codec, resolution, bitrate, ...) - ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` - - Start *string `locationName:"start" type:"string"` - - // Current reservation state - State *string `locationName:"state" type:"string" enum:"ReservationState"` - - UsagePrice *float64 `locationName:"usagePrice" type:"double"` -} - -// String returns the string representation -func (s DeleteReservationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReservationOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DeleteReservationOutput) SetArn(v string) *DeleteReservationOutput { - s.Arn = &v - return s -} - -// SetCount sets the Count field's value. -func (s *DeleteReservationOutput) SetCount(v int64) *DeleteReservationOutput { - s.Count = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *DeleteReservationOutput) SetCurrencyCode(v string) *DeleteReservationOutput { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *DeleteReservationOutput) SetDuration(v int64) *DeleteReservationOutput { - s.Duration = &v - return s -} - -// SetDurationUnits sets the DurationUnits field's value. -func (s *DeleteReservationOutput) SetDurationUnits(v string) *DeleteReservationOutput { - s.DurationUnits = &v - return s -} - -// SetEnd sets the End field's value. -func (s *DeleteReservationOutput) SetEnd(v string) *DeleteReservationOutput { - s.End = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *DeleteReservationOutput) SetFixedPrice(v float64) *DeleteReservationOutput { - s.FixedPrice = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteReservationOutput) SetName(v string) *DeleteReservationOutput { - s.Name = &v - return s -} - -// SetOfferingDescription sets the OfferingDescription field's value. -func (s *DeleteReservationOutput) SetOfferingDescription(v string) *DeleteReservationOutput { - s.OfferingDescription = &v - return s -} - -// SetOfferingId sets the OfferingId field's value. -func (s *DeleteReservationOutput) SetOfferingId(v string) *DeleteReservationOutput { - s.OfferingId = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *DeleteReservationOutput) SetOfferingType(v string) *DeleteReservationOutput { - s.OfferingType = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *DeleteReservationOutput) SetRegion(v string) *DeleteReservationOutput { - s.Region = &v - return s -} - -// SetReservationId sets the ReservationId field's value. -func (s *DeleteReservationOutput) SetReservationId(v string) *DeleteReservationOutput { - s.ReservationId = &v - return s -} - -// SetResourceSpecification sets the ResourceSpecification field's value. -func (s *DeleteReservationOutput) SetResourceSpecification(v *ReservationResourceSpecification) *DeleteReservationOutput { - s.ResourceSpecification = v - return s -} - -// SetStart sets the Start field's value. -func (s *DeleteReservationOutput) SetStart(v string) *DeleteReservationOutput { - s.Start = &v - return s -} - -// SetState sets the State field's value. -func (s *DeleteReservationOutput) SetState(v string) *DeleteReservationOutput { - s.State = &v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *DeleteReservationOutput) SetUsagePrice(v float64) *DeleteReservationOutput { - s.UsagePrice = &v - return s -} - -type DescribeChannelInput struct { - _ struct{} `type:"structure"` - - // ChannelId is a required field - ChannelId *string `location:"uri" locationName:"channelId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeChannelInput"} - if s.ChannelId == nil { - invalidParams.Add(request.NewErrParamRequired("ChannelId")) - } - if s.ChannelId != nil && len(*s.ChannelId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChannelId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChannelId sets the ChannelId field's value. -func (s *DescribeChannelInput) SetChannelId(v string) *DescribeChannelInput { - s.ChannelId = &v - return s -} - -type DescribeChannelOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Destinations []*OutputDestination `locationName:"destinations" type:"list"` - - EgressEndpoints []*ChannelEgressEndpoint `locationName:"egressEndpoints" type:"list"` - - EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` - - Id *string `locationName:"id" type:"string"` - - InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` - - InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` - - // The log level the user wants for their channel. - LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` - - Name *string `locationName:"name" type:"string"` - - PipelinesRunningCount *int64 `locationName:"pipelinesRunningCount" type:"integer"` - - RoleArn *string `locationName:"roleArn" type:"string"` - - State *string `locationName:"state" type:"string" enum:"ChannelState"` -} - -// String returns the string representation -func (s DescribeChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeChannelOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DescribeChannelOutput) SetArn(v string) *DescribeChannelOutput { - s.Arn = &v - return s -} - -// SetDestinations sets the Destinations field's value. -func (s *DescribeChannelOutput) SetDestinations(v []*OutputDestination) *DescribeChannelOutput { - s.Destinations = v - return s -} - -// SetEgressEndpoints sets the EgressEndpoints field's value. -func (s *DescribeChannelOutput) SetEgressEndpoints(v []*ChannelEgressEndpoint) *DescribeChannelOutput { - s.EgressEndpoints = v - return s -} - -// SetEncoderSettings sets the EncoderSettings field's value. -func (s *DescribeChannelOutput) SetEncoderSettings(v *EncoderSettings) *DescribeChannelOutput { - s.EncoderSettings = v - return s -} - -// SetId sets the Id field's value. -func (s *DescribeChannelOutput) SetId(v string) *DescribeChannelOutput { - s.Id = &v - return s -} - -// SetInputAttachments sets the InputAttachments field's value. -func (s *DescribeChannelOutput) SetInputAttachments(v []*InputAttachment) *DescribeChannelOutput { - s.InputAttachments = v - return s -} - -// SetInputSpecification sets the InputSpecification field's value. -func (s *DescribeChannelOutput) SetInputSpecification(v *InputSpecification) *DescribeChannelOutput { - s.InputSpecification = v - return s -} - -// SetLogLevel sets the LogLevel field's value. -func (s *DescribeChannelOutput) SetLogLevel(v string) *DescribeChannelOutput { - s.LogLevel = &v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeChannelOutput) SetName(v string) *DescribeChannelOutput { - s.Name = &v - return s -} - -// SetPipelinesRunningCount sets the PipelinesRunningCount field's value. -func (s *DescribeChannelOutput) SetPipelinesRunningCount(v int64) *DescribeChannelOutput { - s.PipelinesRunningCount = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DescribeChannelOutput) SetRoleArn(v string) *DescribeChannelOutput { - s.RoleArn = &v - return s -} - -// SetState sets the State field's value. -func (s *DescribeChannelOutput) SetState(v string) *DescribeChannelOutput { - s.State = &v - return s -} - -type DescribeInputInput struct { - _ struct{} `type:"structure"` - - // InputId is a required field - InputId *string `location:"uri" locationName:"inputId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeInputInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInputInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInputInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInputInput"} - if s.InputId == nil { - invalidParams.Add(request.NewErrParamRequired("InputId")) - } - if s.InputId != nil && len(*s.InputId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputId sets the InputId field's value. -func (s *DescribeInputInput) SetInputId(v string) *DescribeInputInput { - s.InputId = &v - return s -} - -type DescribeInputOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - AttachedChannels []*string `locationName:"attachedChannels" type:"list"` - - Destinations []*InputDestination `locationName:"destinations" type:"list"` - - Id *string `locationName:"id" type:"string"` - - MediaConnectFlows []*MediaConnectFlow `locationName:"mediaConnectFlows" type:"list"` - - Name *string `locationName:"name" type:"string"` - - RoleArn *string `locationName:"roleArn" type:"string"` - - SecurityGroups []*string `locationName:"securityGroups" type:"list"` - - Sources []*InputSource `locationName:"sources" type:"list"` - - State *string `locationName:"state" type:"string" enum:"InputState"` - - Type *string `locationName:"type" type:"string" enum:"InputType"` -} - -// String returns the string representation -func (s DescribeInputOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInputOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DescribeInputOutput) SetArn(v string) *DescribeInputOutput { - s.Arn = &v - return s -} - -// SetAttachedChannels sets the AttachedChannels field's value. -func (s *DescribeInputOutput) SetAttachedChannels(v []*string) *DescribeInputOutput { - s.AttachedChannels = v - return s -} - -// SetDestinations sets the Destinations field's value. -func (s *DescribeInputOutput) SetDestinations(v []*InputDestination) *DescribeInputOutput { - s.Destinations = v - return s -} - -// SetId sets the Id field's value. -func (s *DescribeInputOutput) SetId(v string) *DescribeInputOutput { - s.Id = &v - return s -} - -// SetMediaConnectFlows sets the MediaConnectFlows field's value. -func (s *DescribeInputOutput) SetMediaConnectFlows(v []*MediaConnectFlow) *DescribeInputOutput { - s.MediaConnectFlows = v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeInputOutput) SetName(v string) *DescribeInputOutput { - s.Name = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DescribeInputOutput) SetRoleArn(v string) *DescribeInputOutput { - s.RoleArn = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *DescribeInputOutput) SetSecurityGroups(v []*string) *DescribeInputOutput { - s.SecurityGroups = v - return s -} - -// SetSources sets the Sources field's value. -func (s *DescribeInputOutput) SetSources(v []*InputSource) *DescribeInputOutput { - s.Sources = v - return s -} - -// SetState sets the State field's value. -func (s *DescribeInputOutput) SetState(v string) *DescribeInputOutput { - s.State = &v - return s -} - -// SetType sets the Type field's value. -func (s *DescribeInputOutput) SetType(v string) *DescribeInputOutput { - s.Type = &v - return s -} - -type DescribeInputSecurityGroupInput struct { - _ struct{} `type:"structure"` - - // InputSecurityGroupId is a required field - InputSecurityGroupId *string `location:"uri" locationName:"inputSecurityGroupId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeInputSecurityGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInputSecurityGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInputSecurityGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInputSecurityGroupInput"} - if s.InputSecurityGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("InputSecurityGroupId")) - } - if s.InputSecurityGroupId != nil && len(*s.InputSecurityGroupId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputSecurityGroupId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputSecurityGroupId sets the InputSecurityGroupId field's value. -func (s *DescribeInputSecurityGroupInput) SetInputSecurityGroupId(v string) *DescribeInputSecurityGroupInput { - s.InputSecurityGroupId = &v - return s -} - -type DescribeInputSecurityGroupOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Id *string `locationName:"id" type:"string"` - - Inputs []*string `locationName:"inputs" type:"list"` - - State *string `locationName:"state" type:"string" enum:"InputSecurityGroupState"` - - WhitelistRules []*InputWhitelistRule `locationName:"whitelistRules" type:"list"` -} - -// String returns the string representation -func (s DescribeInputSecurityGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInputSecurityGroupOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DescribeInputSecurityGroupOutput) SetArn(v string) *DescribeInputSecurityGroupOutput { - s.Arn = &v - return s -} - -// SetId sets the Id field's value. -func (s *DescribeInputSecurityGroupOutput) SetId(v string) *DescribeInputSecurityGroupOutput { - s.Id = &v - return s -} - -// SetInputs sets the Inputs field's value. -func (s *DescribeInputSecurityGroupOutput) SetInputs(v []*string) *DescribeInputSecurityGroupOutput { - s.Inputs = v - return s -} - -// SetState sets the State field's value. -func (s *DescribeInputSecurityGroupOutput) SetState(v string) *DescribeInputSecurityGroupOutput { - s.State = &v - return s -} - -// SetWhitelistRules sets the WhitelistRules field's value. -func (s *DescribeInputSecurityGroupOutput) SetWhitelistRules(v []*InputWhitelistRule) *DescribeInputSecurityGroupOutput { - s.WhitelistRules = v - return s -} - -type DescribeOfferingInput struct { - _ struct{} `type:"structure"` - - // OfferingId is a required field - OfferingId *string `location:"uri" locationName:"offeringId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeOfferingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOfferingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeOfferingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeOfferingInput"} - if s.OfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("OfferingId")) - } - if s.OfferingId != nil && len(*s.OfferingId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OfferingId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOfferingId sets the OfferingId field's value. -func (s *DescribeOfferingInput) SetOfferingId(v string) *DescribeOfferingInput { - s.OfferingId = &v - return s -} - -type DescribeOfferingOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - CurrencyCode *string `locationName:"currencyCode" type:"string"` - - Duration *int64 `locationName:"duration" type:"integer"` - - // Units for duration, e.g. 'MONTHS' - DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` - - FixedPrice *float64 `locationName:"fixedPrice" type:"double"` - - OfferingDescription *string `locationName:"offeringDescription" type:"string"` - - OfferingId *string `locationName:"offeringId" type:"string"` - - // Offering type, e.g. 'NO_UPFRONT' - OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` - - Region *string `locationName:"region" type:"string"` - - // Resource configuration (codec, resolution, bitrate, ...) - ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` - - UsagePrice *float64 `locationName:"usagePrice" type:"double"` -} - -// String returns the string representation -func (s DescribeOfferingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOfferingOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DescribeOfferingOutput) SetArn(v string) *DescribeOfferingOutput { - s.Arn = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *DescribeOfferingOutput) SetCurrencyCode(v string) *DescribeOfferingOutput { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *DescribeOfferingOutput) SetDuration(v int64) *DescribeOfferingOutput { - s.Duration = &v - return s -} - -// SetDurationUnits sets the DurationUnits field's value. -func (s *DescribeOfferingOutput) SetDurationUnits(v string) *DescribeOfferingOutput { - s.DurationUnits = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *DescribeOfferingOutput) SetFixedPrice(v float64) *DescribeOfferingOutput { - s.FixedPrice = &v - return s -} - -// SetOfferingDescription sets the OfferingDescription field's value. -func (s *DescribeOfferingOutput) SetOfferingDescription(v string) *DescribeOfferingOutput { - s.OfferingDescription = &v - return s -} - -// SetOfferingId sets the OfferingId field's value. -func (s *DescribeOfferingOutput) SetOfferingId(v string) *DescribeOfferingOutput { - s.OfferingId = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *DescribeOfferingOutput) SetOfferingType(v string) *DescribeOfferingOutput { - s.OfferingType = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *DescribeOfferingOutput) SetRegion(v string) *DescribeOfferingOutput { - s.Region = &v - return s -} - -// SetResourceSpecification sets the ResourceSpecification field's value. -func (s *DescribeOfferingOutput) SetResourceSpecification(v *ReservationResourceSpecification) *DescribeOfferingOutput { - s.ResourceSpecification = v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *DescribeOfferingOutput) SetUsagePrice(v float64) *DescribeOfferingOutput { - s.UsagePrice = &v - return s -} - -type DescribeReservationInput struct { - _ struct{} `type:"structure"` - - // ReservationId is a required field - ReservationId *string `location:"uri" locationName:"reservationId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeReservationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeReservationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeReservationInput"} - if s.ReservationId == nil { - invalidParams.Add(request.NewErrParamRequired("ReservationId")) - } - if s.ReservationId != nil && len(*s.ReservationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ReservationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReservationId sets the ReservationId field's value. -func (s *DescribeReservationInput) SetReservationId(v string) *DescribeReservationInput { - s.ReservationId = &v - return s -} - -type DescribeReservationOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Count *int64 `locationName:"count" type:"integer"` - - CurrencyCode *string `locationName:"currencyCode" type:"string"` - - Duration *int64 `locationName:"duration" type:"integer"` - - // Units for duration, e.g. 'MONTHS' - DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` - - End *string `locationName:"end" type:"string"` - - FixedPrice *float64 `locationName:"fixedPrice" type:"double"` - - Name *string `locationName:"name" type:"string"` - - OfferingDescription *string `locationName:"offeringDescription" type:"string"` - - OfferingId *string `locationName:"offeringId" type:"string"` - - // Offering type, e.g. 'NO_UPFRONT' - OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` - - Region *string `locationName:"region" type:"string"` - - ReservationId *string `locationName:"reservationId" type:"string"` - - // Resource configuration (codec, resolution, bitrate, ...) - ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` - - Start *string `locationName:"start" type:"string"` - - // Current reservation state - State *string `locationName:"state" type:"string" enum:"ReservationState"` - - UsagePrice *float64 `locationName:"usagePrice" type:"double"` -} - -// String returns the string representation -func (s DescribeReservationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservationOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DescribeReservationOutput) SetArn(v string) *DescribeReservationOutput { - s.Arn = &v - return s -} - -// SetCount sets the Count field's value. -func (s *DescribeReservationOutput) SetCount(v int64) *DescribeReservationOutput { - s.Count = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *DescribeReservationOutput) SetCurrencyCode(v string) *DescribeReservationOutput { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *DescribeReservationOutput) SetDuration(v int64) *DescribeReservationOutput { - s.Duration = &v - return s -} - -// SetDurationUnits sets the DurationUnits field's value. -func (s *DescribeReservationOutput) SetDurationUnits(v string) *DescribeReservationOutput { - s.DurationUnits = &v - return s -} - -// SetEnd sets the End field's value. -func (s *DescribeReservationOutput) SetEnd(v string) *DescribeReservationOutput { - s.End = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *DescribeReservationOutput) SetFixedPrice(v float64) *DescribeReservationOutput { - s.FixedPrice = &v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeReservationOutput) SetName(v string) *DescribeReservationOutput { - s.Name = &v - return s -} - -// SetOfferingDescription sets the OfferingDescription field's value. -func (s *DescribeReservationOutput) SetOfferingDescription(v string) *DescribeReservationOutput { - s.OfferingDescription = &v - return s -} - -// SetOfferingId sets the OfferingId field's value. -func (s *DescribeReservationOutput) SetOfferingId(v string) *DescribeReservationOutput { - s.OfferingId = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *DescribeReservationOutput) SetOfferingType(v string) *DescribeReservationOutput { - s.OfferingType = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *DescribeReservationOutput) SetRegion(v string) *DescribeReservationOutput { - s.Region = &v - return s -} - -// SetReservationId sets the ReservationId field's value. -func (s *DescribeReservationOutput) SetReservationId(v string) *DescribeReservationOutput { - s.ReservationId = &v - return s -} - -// SetResourceSpecification sets the ResourceSpecification field's value. -func (s *DescribeReservationOutput) SetResourceSpecification(v *ReservationResourceSpecification) *DescribeReservationOutput { - s.ResourceSpecification = v - return s -} - -// SetStart sets the Start field's value. -func (s *DescribeReservationOutput) SetStart(v string) *DescribeReservationOutput { - s.Start = &v - return s -} - -// SetState sets the State field's value. -func (s *DescribeReservationOutput) SetState(v string) *DescribeReservationOutput { - s.State = &v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *DescribeReservationOutput) SetUsagePrice(v float64) *DescribeReservationOutput { - s.UsagePrice = &v - return s -} - -type DescribeScheduleInput struct { - _ struct{} `type:"structure"` - - // ChannelId is a required field - ChannelId *string `location:"uri" locationName:"channelId" type:"string" required:"true"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s DescribeScheduleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScheduleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeScheduleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeScheduleInput"} - if s.ChannelId == nil { - invalidParams.Add(request.NewErrParamRequired("ChannelId")) - } - if s.ChannelId != nil && len(*s.ChannelId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChannelId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChannelId sets the ChannelId field's value. -func (s *DescribeScheduleInput) SetChannelId(v string) *DescribeScheduleInput { - s.ChannelId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeScheduleInput) SetMaxResults(v int64) *DescribeScheduleInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScheduleInput) SetNextToken(v string) *DescribeScheduleInput { - s.NextToken = &v - return s -} - -type DescribeScheduleOutput struct { - _ struct{} `type:"structure"` - - NextToken *string `locationName:"nextToken" type:"string"` - - ScheduleActions []*ScheduleAction `locationName:"scheduleActions" type:"list"` -} - -// String returns the string representation -func (s DescribeScheduleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeScheduleOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeScheduleOutput) SetNextToken(v string) *DescribeScheduleOutput { - s.NextToken = &v - return s -} - -// SetScheduleActions sets the ScheduleActions field's value. -func (s *DescribeScheduleOutput) SetScheduleActions(v []*ScheduleAction) *DescribeScheduleOutput { - s.ScheduleActions = v - return s -} - -// DVB Network Information Table (NIT) -type DvbNitSettings struct { - _ struct{} `type:"structure"` - - // The numeric value placed in the Network Information Table (NIT). - // - // NetworkId is a required field - NetworkId *int64 `locationName:"networkId" type:"integer" required:"true"` - - // The network name text placed in the networkNameDescriptor inside the Network - // Information Table. Maximum length is 256 characters. - // - // NetworkName is a required field - NetworkName *string `locationName:"networkName" min:"1" type:"string" required:"true"` - - // The number of milliseconds between instances of this table in the output - // transport stream. - RepInterval *int64 `locationName:"repInterval" min:"25" type:"integer"` -} - -// String returns the string representation -func (s DvbNitSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DvbNitSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DvbNitSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DvbNitSettings"} - if s.NetworkId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkId")) - } - if s.NetworkName == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkName")) - } - if s.NetworkName != nil && len(*s.NetworkName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NetworkName", 1)) - } - if s.RepInterval != nil && *s.RepInterval < 25 { - invalidParams.Add(request.NewErrParamMinValue("RepInterval", 25)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNetworkId sets the NetworkId field's value. -func (s *DvbNitSettings) SetNetworkId(v int64) *DvbNitSettings { - s.NetworkId = &v - return s -} - -// SetNetworkName sets the NetworkName field's value. -func (s *DvbNitSettings) SetNetworkName(v string) *DvbNitSettings { - s.NetworkName = &v - return s -} - -// SetRepInterval sets the RepInterval field's value. -func (s *DvbNitSettings) SetRepInterval(v int64) *DvbNitSettings { - s.RepInterval = &v - return s -} - -// DVB Service Description Table (SDT) -type DvbSdtSettings struct { - _ struct{} `type:"structure"` - - // Selects method of inserting SDT information into output stream. The sdtFollow - // setting copies SDT information from input stream to output stream. The sdtFollowIfPresent - // setting copies SDT information from input stream to output stream if SDT - // information is present in the input, otherwise it will fall back on the user-defined - // values. The sdtManual setting means user will enter the SDT information. - // The sdtNone setting means output stream will not contain SDT information. - OutputSdt *string `locationName:"outputSdt" type:"string" enum:"DvbSdtOutputSdt"` - - // The number of milliseconds between instances of this table in the output - // transport stream. - RepInterval *int64 `locationName:"repInterval" min:"25" type:"integer"` - - // The service name placed in the serviceDescriptor in the Service Description - // Table. Maximum length is 256 characters. - ServiceName *string `locationName:"serviceName" min:"1" type:"string"` - - // The service provider name placed in the serviceDescriptor in the Service - // Description Table. Maximum length is 256 characters. - ServiceProviderName *string `locationName:"serviceProviderName" min:"1" type:"string"` -} - -// String returns the string representation -func (s DvbSdtSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DvbSdtSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DvbSdtSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DvbSdtSettings"} - if s.RepInterval != nil && *s.RepInterval < 25 { - invalidParams.Add(request.NewErrParamMinValue("RepInterval", 25)) - } - if s.ServiceName != nil && len(*s.ServiceName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceName", 1)) - } - if s.ServiceProviderName != nil && len(*s.ServiceProviderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceProviderName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOutputSdt sets the OutputSdt field's value. -func (s *DvbSdtSettings) SetOutputSdt(v string) *DvbSdtSettings { - s.OutputSdt = &v - return s -} - -// SetRepInterval sets the RepInterval field's value. -func (s *DvbSdtSettings) SetRepInterval(v int64) *DvbSdtSettings { - s.RepInterval = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *DvbSdtSettings) SetServiceName(v string) *DvbSdtSettings { - s.ServiceName = &v - return s -} - -// SetServiceProviderName sets the ServiceProviderName field's value. -func (s *DvbSdtSettings) SetServiceProviderName(v string) *DvbSdtSettings { - s.ServiceProviderName = &v - return s -} - -type DvbSubDestinationSettings struct { - _ struct{} `type:"structure"` - - // If no explicit xPosition or yPosition is provided, setting alignment to centered - // will place the captions at the bottom center of the output. Similarly, setting - // a left alignment will align captions to the bottom left of the output. If - // x and y positions are given in conjunction with the alignment parameter, - // the font will be justified (either left or centered) relative to those coordinates. - // Selecting "smart" justification will left-justify live subtitles and center-justify - // pre-recorded subtitles. This option is not valid for source captions that - // are STL or 608/embedded. These source settings are already pre-defined by - // the caption stream. All burn-in and DVB-Sub font settings must match. - Alignment *string `locationName:"alignment" type:"string" enum:"DvbSubDestinationAlignment"` - - // Specifies the color of the rectangle behind the captions. All burn-in and - // DVB-Sub font settings must match. - BackgroundColor *string `locationName:"backgroundColor" type:"string" enum:"DvbSubDestinationBackgroundColor"` - - // Specifies the opacity of the background rectangle. 255 is opaque; 0 is transparent. - // Leaving this parameter blank is equivalent to setting it to 0 (transparent). - // All burn-in and DVB-Sub font settings must match. - BackgroundOpacity *int64 `locationName:"backgroundOpacity" type:"integer"` - - // External font file used for caption burn-in. File extension must be 'ttf' - // or 'tte'. Although the user can select output fonts for many different types - // of input captions, embedded, STL and teletext sources use a strict grid system. - // Using external fonts with these caption sources could cause unexpected display - // of proportional fonts. All burn-in and DVB-Sub font settings must match. - Font *InputLocation `locationName:"font" type:"structure"` - - // Specifies the color of the burned-in captions. This option is not valid for - // source captions that are STL, 608/embedded or teletext. These source settings - // are already pre-defined by the caption stream. All burn-in and DVB-Sub font - // settings must match. - FontColor *string `locationName:"fontColor" type:"string" enum:"DvbSubDestinationFontColor"` - - // Specifies the opacity of the burned-in captions. 255 is opaque; 0 is transparent. - // All burn-in and DVB-Sub font settings must match. - FontOpacity *int64 `locationName:"fontOpacity" type:"integer"` - - // Font resolution in DPI (dots per inch); default is 96 dpi. All burn-in and - // DVB-Sub font settings must match. - FontResolution *int64 `locationName:"fontResolution" min:"96" type:"integer"` - - // When set to auto fontSize will scale depending on the size of the output. - // Giving a positive integer will specify the exact font size in points. All - // burn-in and DVB-Sub font settings must match. - FontSize *string `locationName:"fontSize" type:"string"` - - // Specifies font outline color. This option is not valid for source captions - // that are either 608/embedded or teletext. These source settings are already - // pre-defined by the caption stream. All burn-in and DVB-Sub font settings - // must match. - OutlineColor *string `locationName:"outlineColor" type:"string" enum:"DvbSubDestinationOutlineColor"` - - // Specifies font outline size in pixels. This option is not valid for source - // captions that are either 608/embedded or teletext. These source settings - // are already pre-defined by the caption stream. All burn-in and DVB-Sub font - // settings must match. - OutlineSize *int64 `locationName:"outlineSize" type:"integer"` - - // Specifies the color of the shadow cast by the captions. All burn-in and DVB-Sub - // font settings must match. - ShadowColor *string `locationName:"shadowColor" type:"string" enum:"DvbSubDestinationShadowColor"` - - // Specifies the opacity of the shadow. 255 is opaque; 0 is transparent. Leaving - // this parameter blank is equivalent to setting it to 0 (transparent). All - // burn-in and DVB-Sub font settings must match. - ShadowOpacity *int64 `locationName:"shadowOpacity" type:"integer"` - - // Specifies the horizontal offset of the shadow relative to the captions in - // pixels. A value of -2 would result in a shadow offset 2 pixels to the left. - // All burn-in and DVB-Sub font settings must match. - ShadowXOffset *int64 `locationName:"shadowXOffset" type:"integer"` - - // Specifies the vertical offset of the shadow relative to the captions in pixels. - // A value of -2 would result in a shadow offset 2 pixels above the text. All - // burn-in and DVB-Sub font settings must match. - ShadowYOffset *int64 `locationName:"shadowYOffset" type:"integer"` - - // Controls whether a fixed grid size will be used to generate the output subtitles - // bitmap. Only applicable for Teletext inputs and DVB-Sub/Burn-in outputs. - TeletextGridControl *string `locationName:"teletextGridControl" type:"string" enum:"DvbSubDestinationTeletextGridControl"` - - // Specifies the horizontal position of the caption relative to the left side - // of the output in pixels. A value of 10 would result in the captions starting - // 10 pixels from the left of the output. If no explicit xPosition is provided, - // the horizontal caption position will be determined by the alignment parameter. - // This option is not valid for source captions that are STL, 608/embedded or - // teletext. These source settings are already pre-defined by the caption stream. - // All burn-in and DVB-Sub font settings must match. - XPosition *int64 `locationName:"xPosition" type:"integer"` - - // Specifies the vertical position of the caption relative to the top of the - // output in pixels. A value of 10 would result in the captions starting 10 - // pixels from the top of the output. If no explicit yPosition is provided, - // the caption will be positioned towards the bottom of the output. This option - // is not valid for source captions that are STL, 608/embedded or teletext. - // These source settings are already pre-defined by the caption stream. All - // burn-in and DVB-Sub font settings must match. - YPosition *int64 `locationName:"yPosition" type:"integer"` -} - -// String returns the string representation -func (s DvbSubDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DvbSubDestinationSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DvbSubDestinationSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DvbSubDestinationSettings"} - if s.FontResolution != nil && *s.FontResolution < 96 { - invalidParams.Add(request.NewErrParamMinValue("FontResolution", 96)) - } - if s.Font != nil { - if err := s.Font.Validate(); err != nil { - invalidParams.AddNested("Font", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlignment sets the Alignment field's value. -func (s *DvbSubDestinationSettings) SetAlignment(v string) *DvbSubDestinationSettings { - s.Alignment = &v - return s -} - -// SetBackgroundColor sets the BackgroundColor field's value. -func (s *DvbSubDestinationSettings) SetBackgroundColor(v string) *DvbSubDestinationSettings { - s.BackgroundColor = &v - return s -} - -// SetBackgroundOpacity sets the BackgroundOpacity field's value. -func (s *DvbSubDestinationSettings) SetBackgroundOpacity(v int64) *DvbSubDestinationSettings { - s.BackgroundOpacity = &v - return s -} - -// SetFont sets the Font field's value. -func (s *DvbSubDestinationSettings) SetFont(v *InputLocation) *DvbSubDestinationSettings { - s.Font = v - return s -} - -// SetFontColor sets the FontColor field's value. -func (s *DvbSubDestinationSettings) SetFontColor(v string) *DvbSubDestinationSettings { - s.FontColor = &v - return s -} - -// SetFontOpacity sets the FontOpacity field's value. -func (s *DvbSubDestinationSettings) SetFontOpacity(v int64) *DvbSubDestinationSettings { - s.FontOpacity = &v - return s -} - -// SetFontResolution sets the FontResolution field's value. -func (s *DvbSubDestinationSettings) SetFontResolution(v int64) *DvbSubDestinationSettings { - s.FontResolution = &v - return s -} - -// SetFontSize sets the FontSize field's value. -func (s *DvbSubDestinationSettings) SetFontSize(v string) *DvbSubDestinationSettings { - s.FontSize = &v - return s -} - -// SetOutlineColor sets the OutlineColor field's value. -func (s *DvbSubDestinationSettings) SetOutlineColor(v string) *DvbSubDestinationSettings { - s.OutlineColor = &v - return s -} - -// SetOutlineSize sets the OutlineSize field's value. -func (s *DvbSubDestinationSettings) SetOutlineSize(v int64) *DvbSubDestinationSettings { - s.OutlineSize = &v - return s -} - -// SetShadowColor sets the ShadowColor field's value. -func (s *DvbSubDestinationSettings) SetShadowColor(v string) *DvbSubDestinationSettings { - s.ShadowColor = &v - return s -} - -// SetShadowOpacity sets the ShadowOpacity field's value. -func (s *DvbSubDestinationSettings) SetShadowOpacity(v int64) *DvbSubDestinationSettings { - s.ShadowOpacity = &v - return s -} - -// SetShadowXOffset sets the ShadowXOffset field's value. -func (s *DvbSubDestinationSettings) SetShadowXOffset(v int64) *DvbSubDestinationSettings { - s.ShadowXOffset = &v - return s -} - -// SetShadowYOffset sets the ShadowYOffset field's value. -func (s *DvbSubDestinationSettings) SetShadowYOffset(v int64) *DvbSubDestinationSettings { - s.ShadowYOffset = &v - return s -} - -// SetTeletextGridControl sets the TeletextGridControl field's value. -func (s *DvbSubDestinationSettings) SetTeletextGridControl(v string) *DvbSubDestinationSettings { - s.TeletextGridControl = &v - return s -} - -// SetXPosition sets the XPosition field's value. -func (s *DvbSubDestinationSettings) SetXPosition(v int64) *DvbSubDestinationSettings { - s.XPosition = &v - return s -} - -// SetYPosition sets the YPosition field's value. -func (s *DvbSubDestinationSettings) SetYPosition(v int64) *DvbSubDestinationSettings { - s.YPosition = &v - return s -} - -type DvbSubSourceSettings struct { - _ struct{} `type:"structure"` - - // When using DVB-Sub with Burn-In or SMPTE-TT, use this PID for the source - // content. Unused for DVB-Sub passthrough. All DVB-Sub content is passed through, - // regardless of selectors. - Pid *int64 `locationName:"pid" min:"1" type:"integer"` -} - -// String returns the string representation -func (s DvbSubSourceSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DvbSubSourceSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DvbSubSourceSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DvbSubSourceSettings"} - if s.Pid != nil && *s.Pid < 1 { - invalidParams.Add(request.NewErrParamMinValue("Pid", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPid sets the Pid field's value. -func (s *DvbSubSourceSettings) SetPid(v int64) *DvbSubSourceSettings { - s.Pid = &v - return s -} - -// DVB Time and Date Table (SDT) -type DvbTdtSettings struct { - _ struct{} `type:"structure"` - - // The number of milliseconds between instances of this table in the output - // transport stream. - RepInterval *int64 `locationName:"repInterval" min:"1000" type:"integer"` -} - -// String returns the string representation -func (s DvbTdtSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DvbTdtSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DvbTdtSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DvbTdtSettings"} - if s.RepInterval != nil && *s.RepInterval < 1000 { - invalidParams.Add(request.NewErrParamMinValue("RepInterval", 1000)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRepInterval sets the RepInterval field's value. -func (s *DvbTdtSettings) SetRepInterval(v int64) *DvbTdtSettings { - s.RepInterval = &v - return s -} - -type Eac3Settings struct { - _ struct{} `type:"structure"` - - // When set to attenuate3Db, applies a 3 dB attenuation to the surround channels. - // Only used for 3/2 coding mode. - AttenuationControl *string `locationName:"attenuationControl" type:"string" enum:"Eac3AttenuationControl"` - - // Average bitrate in bits/second. Valid bitrates depend on the coding mode. - Bitrate *float64 `locationName:"bitrate" type:"double"` - - // Specifies the bitstream mode (bsmod) for the emitted E-AC-3 stream. See ATSC - // A/52-2012 (Annex E) for background on these values. - BitstreamMode *string `locationName:"bitstreamMode" type:"string" enum:"Eac3BitstreamMode"` - - // Dolby Digital Plus coding mode. Determines number of channels. - CodingMode *string `locationName:"codingMode" type:"string" enum:"Eac3CodingMode"` - - // When set to enabled, activates a DC highpass filter for all input channels. - DcFilter *string `locationName:"dcFilter" type:"string" enum:"Eac3DcFilter"` - - // Sets the dialnorm for the output. If blank and input audio is Dolby Digital - // Plus, dialnorm will be passed through. - Dialnorm *int64 `locationName:"dialnorm" min:"1" type:"integer"` - - // Sets the Dolby dynamic range compression profile. - DrcLine *string `locationName:"drcLine" type:"string" enum:"Eac3DrcLine"` - - // Sets the profile for heavy Dolby dynamic range compression, ensures that - // the instantaneous signal peaks do not exceed specified levels. - DrcRf *string `locationName:"drcRf" type:"string" enum:"Eac3DrcRf"` - - // When encoding 3/2 audio, setting to lfe enables the LFE channel - LfeControl *string `locationName:"lfeControl" type:"string" enum:"Eac3LfeControl"` - - // When set to enabled, applies a 120Hz lowpass filter to the LFE channel prior - // to encoding. Only valid with codingMode32 coding mode. - LfeFilter *string `locationName:"lfeFilter" type:"string" enum:"Eac3LfeFilter"` - - // Left only/Right only center mix level. Only used for 3/2 coding mode. - LoRoCenterMixLevel *float64 `locationName:"loRoCenterMixLevel" type:"double"` - - // Left only/Right only surround mix level. Only used for 3/2 coding mode. - LoRoSurroundMixLevel *float64 `locationName:"loRoSurroundMixLevel" type:"double"` - - // Left total/Right total center mix level. Only used for 3/2 coding mode. - LtRtCenterMixLevel *float64 `locationName:"ltRtCenterMixLevel" type:"double"` - - // Left total/Right total surround mix level. Only used for 3/2 coding mode. - LtRtSurroundMixLevel *float64 `locationName:"ltRtSurroundMixLevel" type:"double"` - - // When set to followInput, encoder metadata will be sourced from the DD, DD+, - // or DolbyE decoder that supplied this audio data. If audio was not supplied - // from one of these streams, then the static metadata settings will be used. - MetadataControl *string `locationName:"metadataControl" type:"string" enum:"Eac3MetadataControl"` - - // When set to whenPossible, input DD+ audio will be passed through if it is - // present on the input. This detection is dynamic over the life of the transcode. - // Inputs that alternate between DD+ and non-DD+ content will have a consistent - // DD+ output as the system alternates between passthrough and encoding. - PassthroughControl *string `locationName:"passthroughControl" type:"string" enum:"Eac3PassthroughControl"` - - // When set to shift90Degrees, applies a 90-degree phase shift to the surround - // channels. Only used for 3/2 coding mode. - PhaseControl *string `locationName:"phaseControl" type:"string" enum:"Eac3PhaseControl"` - - // Stereo downmix preference. Only used for 3/2 coding mode. - StereoDownmix *string `locationName:"stereoDownmix" type:"string" enum:"Eac3StereoDownmix"` - - // When encoding 3/2 audio, sets whether an extra center back surround channel - // is matrix encoded into the left and right surround channels. - SurroundExMode *string `locationName:"surroundExMode" type:"string" enum:"Eac3SurroundExMode"` - - // When encoding 2/0 audio, sets whether Dolby Surround is matrix encoded into - // the two channels. - SurroundMode *string `locationName:"surroundMode" type:"string" enum:"Eac3SurroundMode"` -} - -// String returns the string representation -func (s Eac3Settings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Eac3Settings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Eac3Settings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Eac3Settings"} - if s.Dialnorm != nil && *s.Dialnorm < 1 { - invalidParams.Add(request.NewErrParamMinValue("Dialnorm", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttenuationControl sets the AttenuationControl field's value. -func (s *Eac3Settings) SetAttenuationControl(v string) *Eac3Settings { - s.AttenuationControl = &v - return s -} - -// SetBitrate sets the Bitrate field's value. -func (s *Eac3Settings) SetBitrate(v float64) *Eac3Settings { - s.Bitrate = &v - return s -} - -// SetBitstreamMode sets the BitstreamMode field's value. -func (s *Eac3Settings) SetBitstreamMode(v string) *Eac3Settings { - s.BitstreamMode = &v - return s -} - -// SetCodingMode sets the CodingMode field's value. -func (s *Eac3Settings) SetCodingMode(v string) *Eac3Settings { - s.CodingMode = &v - return s -} - -// SetDcFilter sets the DcFilter field's value. -func (s *Eac3Settings) SetDcFilter(v string) *Eac3Settings { - s.DcFilter = &v - return s -} - -// SetDialnorm sets the Dialnorm field's value. -func (s *Eac3Settings) SetDialnorm(v int64) *Eac3Settings { - s.Dialnorm = &v - return s -} - -// SetDrcLine sets the DrcLine field's value. -func (s *Eac3Settings) SetDrcLine(v string) *Eac3Settings { - s.DrcLine = &v - return s -} - -// SetDrcRf sets the DrcRf field's value. -func (s *Eac3Settings) SetDrcRf(v string) *Eac3Settings { - s.DrcRf = &v - return s -} - -// SetLfeControl sets the LfeControl field's value. -func (s *Eac3Settings) SetLfeControl(v string) *Eac3Settings { - s.LfeControl = &v - return s -} - -// SetLfeFilter sets the LfeFilter field's value. -func (s *Eac3Settings) SetLfeFilter(v string) *Eac3Settings { - s.LfeFilter = &v - return s -} - -// SetLoRoCenterMixLevel sets the LoRoCenterMixLevel field's value. -func (s *Eac3Settings) SetLoRoCenterMixLevel(v float64) *Eac3Settings { - s.LoRoCenterMixLevel = &v - return s -} - -// SetLoRoSurroundMixLevel sets the LoRoSurroundMixLevel field's value. -func (s *Eac3Settings) SetLoRoSurroundMixLevel(v float64) *Eac3Settings { - s.LoRoSurroundMixLevel = &v - return s -} - -// SetLtRtCenterMixLevel sets the LtRtCenterMixLevel field's value. -func (s *Eac3Settings) SetLtRtCenterMixLevel(v float64) *Eac3Settings { - s.LtRtCenterMixLevel = &v - return s -} - -// SetLtRtSurroundMixLevel sets the LtRtSurroundMixLevel field's value. -func (s *Eac3Settings) SetLtRtSurroundMixLevel(v float64) *Eac3Settings { - s.LtRtSurroundMixLevel = &v - return s -} - -// SetMetadataControl sets the MetadataControl field's value. -func (s *Eac3Settings) SetMetadataControl(v string) *Eac3Settings { - s.MetadataControl = &v - return s -} - -// SetPassthroughControl sets the PassthroughControl field's value. -func (s *Eac3Settings) SetPassthroughControl(v string) *Eac3Settings { - s.PassthroughControl = &v - return s -} - -// SetPhaseControl sets the PhaseControl field's value. -func (s *Eac3Settings) SetPhaseControl(v string) *Eac3Settings { - s.PhaseControl = &v - return s -} - -// SetStereoDownmix sets the StereoDownmix field's value. -func (s *Eac3Settings) SetStereoDownmix(v string) *Eac3Settings { - s.StereoDownmix = &v - return s -} - -// SetSurroundExMode sets the SurroundExMode field's value. -func (s *Eac3Settings) SetSurroundExMode(v string) *Eac3Settings { - s.SurroundExMode = &v - return s -} - -// SetSurroundMode sets the SurroundMode field's value. -func (s *Eac3Settings) SetSurroundMode(v string) *Eac3Settings { - s.SurroundMode = &v - return s -} - -type EmbeddedDestinationSettings struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EmbeddedDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EmbeddedDestinationSettings) GoString() string { - return s.String() -} - -type EmbeddedPlusScte20DestinationSettings struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EmbeddedPlusScte20DestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EmbeddedPlusScte20DestinationSettings) GoString() string { - return s.String() -} - -type EmbeddedSourceSettings struct { - _ struct{} `type:"structure"` - - // If upconvert, 608 data is both passed through via the "608 compatibility - // bytes" fields of the 708 wrapper as well as translated into 708. 708 data - // present in the source content will be discarded. - Convert608To708 *string `locationName:"convert608To708" type:"string" enum:"EmbeddedConvert608To708"` - - // Set to "auto" to handle streams with intermittent and/or non-aligned SCTE-20 - // and Embedded captions. - Scte20Detection *string `locationName:"scte20Detection" type:"string" enum:"EmbeddedScte20Detection"` - - // Specifies the 608/708 channel number within the video track from which to - // extract captions. Unused for passthrough. - Source608ChannelNumber *int64 `locationName:"source608ChannelNumber" min:"1" type:"integer"` - - // This field is unused and deprecated. - Source608TrackNumber *int64 `locationName:"source608TrackNumber" min:"1" type:"integer"` -} - -// String returns the string representation -func (s EmbeddedSourceSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EmbeddedSourceSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EmbeddedSourceSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EmbeddedSourceSettings"} - if s.Source608ChannelNumber != nil && *s.Source608ChannelNumber < 1 { - invalidParams.Add(request.NewErrParamMinValue("Source608ChannelNumber", 1)) - } - if s.Source608TrackNumber != nil && *s.Source608TrackNumber < 1 { - invalidParams.Add(request.NewErrParamMinValue("Source608TrackNumber", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConvert608To708 sets the Convert608To708 field's value. -func (s *EmbeddedSourceSettings) SetConvert608To708(v string) *EmbeddedSourceSettings { - s.Convert608To708 = &v - return s -} - -// SetScte20Detection sets the Scte20Detection field's value. -func (s *EmbeddedSourceSettings) SetScte20Detection(v string) *EmbeddedSourceSettings { - s.Scte20Detection = &v - return s -} - -// SetSource608ChannelNumber sets the Source608ChannelNumber field's value. -func (s *EmbeddedSourceSettings) SetSource608ChannelNumber(v int64) *EmbeddedSourceSettings { - s.Source608ChannelNumber = &v - return s -} - -// SetSource608TrackNumber sets the Source608TrackNumber field's value. -func (s *EmbeddedSourceSettings) SetSource608TrackNumber(v int64) *EmbeddedSourceSettings { - s.Source608TrackNumber = &v - return s -} - -type EncoderSettings struct { - _ struct{} `type:"structure"` - - // AudioDescriptions is a required field - AudioDescriptions []*AudioDescription `locationName:"audioDescriptions" type:"list" required:"true"` - - // Settings for ad avail blanking. - AvailBlanking *AvailBlanking `locationName:"availBlanking" type:"structure"` - - // Event-wide configuration settings for ad avail insertion. - AvailConfiguration *AvailConfiguration `locationName:"availConfiguration" type:"structure"` - - // Settings for blackout slate. - BlackoutSlate *BlackoutSlate `locationName:"blackoutSlate" type:"structure"` - - // Settings for caption decriptions - CaptionDescriptions []*CaptionDescription `locationName:"captionDescriptions" type:"list"` - - // Configuration settings that apply to the event as a whole. - GlobalConfiguration *GlobalConfiguration `locationName:"globalConfiguration" type:"structure"` - - // OutputGroups is a required field - OutputGroups []*OutputGroup `locationName:"outputGroups" type:"list" required:"true"` - - // Contains settings used to acquire and adjust timecode information from inputs. - // - // TimecodeConfig is a required field - TimecodeConfig *TimecodeConfig `locationName:"timecodeConfig" type:"structure" required:"true"` - - // VideoDescriptions is a required field - VideoDescriptions []*VideoDescription `locationName:"videoDescriptions" type:"list" required:"true"` -} - -// String returns the string representation -func (s EncoderSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EncoderSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EncoderSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EncoderSettings"} - if s.AudioDescriptions == nil { - invalidParams.Add(request.NewErrParamRequired("AudioDescriptions")) - } - if s.OutputGroups == nil { - invalidParams.Add(request.NewErrParamRequired("OutputGroups")) - } - if s.TimecodeConfig == nil { - invalidParams.Add(request.NewErrParamRequired("TimecodeConfig")) - } - if s.VideoDescriptions == nil { - invalidParams.Add(request.NewErrParamRequired("VideoDescriptions")) - } - if s.AudioDescriptions != nil { - for i, v := range s.AudioDescriptions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AudioDescriptions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.AvailBlanking != nil { - if err := s.AvailBlanking.Validate(); err != nil { - invalidParams.AddNested("AvailBlanking", err.(request.ErrInvalidParams)) - } - } - if s.AvailConfiguration != nil { - if err := s.AvailConfiguration.Validate(); err != nil { - invalidParams.AddNested("AvailConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.BlackoutSlate != nil { - if err := s.BlackoutSlate.Validate(); err != nil { - invalidParams.AddNested("BlackoutSlate", err.(request.ErrInvalidParams)) - } - } - if s.CaptionDescriptions != nil { - for i, v := range s.CaptionDescriptions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionDescriptions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.GlobalConfiguration != nil { - if err := s.GlobalConfiguration.Validate(); err != nil { - invalidParams.AddNested("GlobalConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.OutputGroups != nil { - for i, v := range s.OutputGroups { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OutputGroups", i), err.(request.ErrInvalidParams)) - } - } - } - if s.TimecodeConfig != nil { - if err := s.TimecodeConfig.Validate(); err != nil { - invalidParams.AddNested("TimecodeConfig", err.(request.ErrInvalidParams)) - } - } - if s.VideoDescriptions != nil { - for i, v := range s.VideoDescriptions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "VideoDescriptions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioDescriptions sets the AudioDescriptions field's value. -func (s *EncoderSettings) SetAudioDescriptions(v []*AudioDescription) *EncoderSettings { - s.AudioDescriptions = v - return s -} - -// SetAvailBlanking sets the AvailBlanking field's value. -func (s *EncoderSettings) SetAvailBlanking(v *AvailBlanking) *EncoderSettings { - s.AvailBlanking = v - return s -} - -// SetAvailConfiguration sets the AvailConfiguration field's value. -func (s *EncoderSettings) SetAvailConfiguration(v *AvailConfiguration) *EncoderSettings { - s.AvailConfiguration = v - return s -} - -// SetBlackoutSlate sets the BlackoutSlate field's value. -func (s *EncoderSettings) SetBlackoutSlate(v *BlackoutSlate) *EncoderSettings { - s.BlackoutSlate = v - return s -} - -// SetCaptionDescriptions sets the CaptionDescriptions field's value. -func (s *EncoderSettings) SetCaptionDescriptions(v []*CaptionDescription) *EncoderSettings { - s.CaptionDescriptions = v - return s -} - -// SetGlobalConfiguration sets the GlobalConfiguration field's value. -func (s *EncoderSettings) SetGlobalConfiguration(v *GlobalConfiguration) *EncoderSettings { - s.GlobalConfiguration = v - return s -} - -// SetOutputGroups sets the OutputGroups field's value. -func (s *EncoderSettings) SetOutputGroups(v []*OutputGroup) *EncoderSettings { - s.OutputGroups = v - return s -} - -// SetTimecodeConfig sets the TimecodeConfig field's value. -func (s *EncoderSettings) SetTimecodeConfig(v *TimecodeConfig) *EncoderSettings { - s.TimecodeConfig = v - return s -} - -// SetVideoDescriptions sets the VideoDescriptions field's value. -func (s *EncoderSettings) SetVideoDescriptions(v []*VideoDescription) *EncoderSettings { - s.VideoDescriptions = v - return s -} - -type FecOutputSettings struct { - _ struct{} `type:"structure"` - - // Parameter D from SMPTE 2022-1. The height of the FEC protection matrix. The - // number of transport stream packets per column error correction packet. Must - // be between 4 and 20, inclusive. - ColumnDepth *int64 `locationName:"columnDepth" min:"4" type:"integer"` - - // Enables column only or column and row based FEC - IncludeFec *string `locationName:"includeFec" type:"string" enum:"FecOutputIncludeFec"` - - // Parameter L from SMPTE 2022-1. The width of the FEC protection matrix. Must - // be between 1 and 20, inclusive. If only Column FEC is used, then larger values - // increase robustness. If Row FEC is used, then this is the number of transport - // stream packets per row error correction packet, and the value must be between - // 4 and 20, inclusive, if includeFec is columnAndRow. If includeFec is column, - // this value must be 1 to 20, inclusive. - RowLength *int64 `locationName:"rowLength" min:"1" type:"integer"` -} - -// String returns the string representation -func (s FecOutputSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FecOutputSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FecOutputSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FecOutputSettings"} - if s.ColumnDepth != nil && *s.ColumnDepth < 4 { - invalidParams.Add(request.NewErrParamMinValue("ColumnDepth", 4)) - } - if s.RowLength != nil && *s.RowLength < 1 { - invalidParams.Add(request.NewErrParamMinValue("RowLength", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetColumnDepth sets the ColumnDepth field's value. -func (s *FecOutputSettings) SetColumnDepth(v int64) *FecOutputSettings { - s.ColumnDepth = &v - return s -} - -// SetIncludeFec sets the IncludeFec field's value. -func (s *FecOutputSettings) SetIncludeFec(v string) *FecOutputSettings { - s.IncludeFec = &v - return s -} - -// SetRowLength sets the RowLength field's value. -func (s *FecOutputSettings) SetRowLength(v int64) *FecOutputSettings { - s.RowLength = &v - return s -} - -// Start time for the action. -type FixedModeScheduleActionStartSettings struct { - _ struct{} `type:"structure"` - - // Start time for the action to start in the channel. (Not the time for the - // action to be added to the schedule: actions are always added to the schedule - // immediately.) UTC format: yyyy-mm-ddThh:mm:ss.nnnZ. All the letters are digits - // (for example, mm might be 01) except for the two constants "T" for time and - // "Z" for "UTC format". - // - // Time is a required field - Time *string `locationName:"time" type:"string" required:"true"` -} - -// String returns the string representation -func (s FixedModeScheduleActionStartSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FixedModeScheduleActionStartSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FixedModeScheduleActionStartSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FixedModeScheduleActionStartSettings"} - if s.Time == nil { - invalidParams.Add(request.NewErrParamRequired("Time")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTime sets the Time field's value. -func (s *FixedModeScheduleActionStartSettings) SetTime(v string) *FixedModeScheduleActionStartSettings { - s.Time = &v - return s -} - -// Settings to specify if an action follows another. -type FollowModeScheduleActionStartSettings struct { - _ struct{} `type:"structure"` - - // Identifies whether this action starts relative to the start or relative to - // the end of the reference action. - // - // FollowPoint is a required field - FollowPoint *string `locationName:"followPoint" type:"string" required:"true" enum:"FollowPoint"` - - // The action name of another action that this one refers to. - // - // ReferenceActionName is a required field - ReferenceActionName *string `locationName:"referenceActionName" type:"string" required:"true"` -} - -// String returns the string representation -func (s FollowModeScheduleActionStartSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FollowModeScheduleActionStartSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FollowModeScheduleActionStartSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FollowModeScheduleActionStartSettings"} - if s.FollowPoint == nil { - invalidParams.Add(request.NewErrParamRequired("FollowPoint")) - } - if s.ReferenceActionName == nil { - invalidParams.Add(request.NewErrParamRequired("ReferenceActionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFollowPoint sets the FollowPoint field's value. -func (s *FollowModeScheduleActionStartSettings) SetFollowPoint(v string) *FollowModeScheduleActionStartSettings { - s.FollowPoint = &v - return s -} - -// SetReferenceActionName sets the ReferenceActionName field's value. -func (s *FollowModeScheduleActionStartSettings) SetReferenceActionName(v string) *FollowModeScheduleActionStartSettings { - s.ReferenceActionName = &v - return s -} - -// Frame Capture Group Settings -type FrameCaptureGroupSettings struct { - _ struct{} `type:"structure"` - - // The destination for the frame capture files. Either the URI for an Amazon - // S3 bucket and object, plus a file name prefix (for example, s3ssl://sportsDelivery/highlights/20180820/curling_) - // or the URI for a MediaStore container, plus a file name prefix (for example, - // mediastoressl://sportsDelivery/20180820/curling_). The final file names consist - // of the prefix from the destination field (for example, "curling_") + name - // modifier + the counter (5 digits, starting from 00001) + extension (which - // is always .jpg). For example, curlingLow.00001.jpg - // - // Destination is a required field - Destination *OutputLocationRef `locationName:"destination" type:"structure" required:"true"` -} - -// String returns the string representation -func (s FrameCaptureGroupSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FrameCaptureGroupSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FrameCaptureGroupSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FrameCaptureGroupSettings"} - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestination sets the Destination field's value. -func (s *FrameCaptureGroupSettings) SetDestination(v *OutputLocationRef) *FrameCaptureGroupSettings { - s.Destination = v - return s -} - -// Frame Capture Output Settings -type FrameCaptureOutputSettings struct { - _ struct{} `type:"structure"` - - // Required if the output group contains more than one output. This modifier - // forms part of the output file name. - NameModifier *string `locationName:"nameModifier" type:"string"` -} - -// String returns the string representation -func (s FrameCaptureOutputSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FrameCaptureOutputSettings) GoString() string { - return s.String() -} - -// SetNameModifier sets the NameModifier field's value. -func (s *FrameCaptureOutputSettings) SetNameModifier(v string) *FrameCaptureOutputSettings { - s.NameModifier = &v - return s -} - -// Frame Capture Settings -type FrameCaptureSettings struct { - _ struct{} `type:"structure"` - - // The frequency, in seconds, for capturing frames for inclusion in the output. - // For example, "10" means capture a frame every 10 seconds. - // - // CaptureInterval is a required field - CaptureInterval *int64 `locationName:"captureInterval" min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s FrameCaptureSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FrameCaptureSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FrameCaptureSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FrameCaptureSettings"} - if s.CaptureInterval == nil { - invalidParams.Add(request.NewErrParamRequired("CaptureInterval")) - } - if s.CaptureInterval != nil && *s.CaptureInterval < 1 { - invalidParams.Add(request.NewErrParamMinValue("CaptureInterval", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCaptureInterval sets the CaptureInterval field's value. -func (s *FrameCaptureSettings) SetCaptureInterval(v int64) *FrameCaptureSettings { - s.CaptureInterval = &v - return s -} - -type GlobalConfiguration struct { - _ struct{} `type:"structure"` - - // Value to set the initial audio gain for the Live Event. - InitialAudioGain *int64 `locationName:"initialAudioGain" type:"integer"` - - // Indicates the action to take when the current input completes (e.g. end-of-file). - // When switchAndLoopInputs is configured the encoder will restart at the beginning - // of the first input. When "none" is configured the encoder will transcode - // either black, a solid color, or a user specified slate images per the "Input - // Loss Behavior" configuration until the next input switch occurs (which is - // controlled through the Channel Schedule API). - InputEndAction *string `locationName:"inputEndAction" type:"string" enum:"GlobalConfigurationInputEndAction"` - - // Settings for system actions when input is lost. - InputLossBehavior *InputLossBehavior `locationName:"inputLossBehavior" type:"structure"` - - // Indicates whether the rate of frames emitted by the Live encoder should be - // paced by its system clock (which optionally may be locked to another source - // via NTP) or should be locked to the clock of the source that is providing - // the input stream. - OutputTimingSource *string `locationName:"outputTimingSource" type:"string" enum:"GlobalConfigurationOutputTimingSource"` - - // Adjusts video input buffer for streams with very low video framerates. This - // is commonly set to enabled for music channels with less than one video frame - // per second. - SupportLowFramerateInputs *string `locationName:"supportLowFramerateInputs" type:"string" enum:"GlobalConfigurationLowFramerateInputs"` -} - -// String returns the string representation -func (s GlobalConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GlobalConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GlobalConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GlobalConfiguration"} - if s.InitialAudioGain != nil && *s.InitialAudioGain < -60 { - invalidParams.Add(request.NewErrParamMinValue("InitialAudioGain", -60)) - } - if s.InputLossBehavior != nil { - if err := s.InputLossBehavior.Validate(); err != nil { - invalidParams.AddNested("InputLossBehavior", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInitialAudioGain sets the InitialAudioGain field's value. -func (s *GlobalConfiguration) SetInitialAudioGain(v int64) *GlobalConfiguration { - s.InitialAudioGain = &v - return s -} - -// SetInputEndAction sets the InputEndAction field's value. -func (s *GlobalConfiguration) SetInputEndAction(v string) *GlobalConfiguration { - s.InputEndAction = &v - return s -} - -// SetInputLossBehavior sets the InputLossBehavior field's value. -func (s *GlobalConfiguration) SetInputLossBehavior(v *InputLossBehavior) *GlobalConfiguration { - s.InputLossBehavior = v - return s -} - -// SetOutputTimingSource sets the OutputTimingSource field's value. -func (s *GlobalConfiguration) SetOutputTimingSource(v string) *GlobalConfiguration { - s.OutputTimingSource = &v - return s -} - -// SetSupportLowFramerateInputs sets the SupportLowFramerateInputs field's value. -func (s *GlobalConfiguration) SetSupportLowFramerateInputs(v string) *GlobalConfiguration { - s.SupportLowFramerateInputs = &v - return s -} - -type H264Settings struct { - _ struct{} `type:"structure"` - - // Adaptive quantization. Allows intra-frame quantizers to vary to improve visual - // quality. - AdaptiveQuantization *string `locationName:"adaptiveQuantization" type:"string" enum:"H264AdaptiveQuantization"` - - // Indicates that AFD values will be written into the output stream. If afdSignaling - // is "auto", the system will try to preserve the input AFD value (in cases - // where multiple AFD values are valid). If set to "fixed", the AFD value will - // be the value configured in the fixedAfd parameter. - AfdSignaling *string `locationName:"afdSignaling" type:"string" enum:"AfdSignaling"` - - // Average bitrate in bits/second. Required when the rate control mode is VBR - // or CBR. Not used for QVBR. In an MS Smooth output group, each output must - // have a unique value when its bitrate is rounded down to the nearest multiple - // of 1000. - Bitrate *int64 `locationName:"bitrate" min:"1000" type:"integer"` - - // Percentage of the buffer that should initially be filled (HRD buffer model). - BufFillPct *int64 `locationName:"bufFillPct" type:"integer"` - - // Size of buffer (HRD buffer model) in bits/second. - BufSize *int64 `locationName:"bufSize" type:"integer"` - - // Includes colorspace metadata in the output. - ColorMetadata *string `locationName:"colorMetadata" type:"string" enum:"H264ColorMetadata"` - - // Entropy encoding mode. Use cabac (must be in Main or High profile) or cavlc. - EntropyEncoding *string `locationName:"entropyEncoding" type:"string" enum:"H264EntropyEncoding"` - - // Four bit AFD value to write on all frames of video in the output stream. - // Only valid when afdSignaling is set to 'Fixed'. - FixedAfd *string `locationName:"fixedAfd" type:"string" enum:"FixedAfd"` - - // If set to enabled, adjust quantization within each frame to reduce flicker - // or 'pop' on I-frames. - FlickerAq *string `locationName:"flickerAq" type:"string" enum:"H264FlickerAq"` - - // This field indicates how the output video frame rate is specified. If "specified" - // is selected then the output video frame rate is determined by framerateNumerator - // and framerateDenominator, else if "initializeFromSource" is selected then - // the output video frame rate will be set equal to the input video frame rate - // of the first input. - FramerateControl *string `locationName:"framerateControl" type:"string" enum:"H264FramerateControl"` - - // Framerate denominator. - FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` - - // Framerate numerator - framerate is a fraction, e.g. 24000 / 1001 = 23.976 - // fps. - FramerateNumerator *int64 `locationName:"framerateNumerator" min:"1" type:"integer"` - - // If enabled, use reference B frames for GOP structures that have B frames - // > 1. - GopBReference *string `locationName:"gopBReference" type:"string" enum:"H264GopBReference"` - - // Frequency of closed GOPs. In streaming applications, it is recommended that - // this be set to 1 so a decoder joining mid-stream will receive an IDR frame - // as quickly as possible. Setting this value to 0 will break output segmenting. - GopClosedCadence *int64 `locationName:"gopClosedCadence" type:"integer"` - - // Number of B-frames between reference frames. - GopNumBFrames *int64 `locationName:"gopNumBFrames" type:"integer"` - - // GOP size (keyframe interval) in units of either frames or seconds per gopSizeUnits. - // Must be greater than zero. - GopSize *float64 `locationName:"gopSize" type:"double"` - - // Indicates if the gopSize is specified in frames or seconds. If seconds the - // system will convert the gopSize into a frame count at run time. - GopSizeUnits *string `locationName:"gopSizeUnits" type:"string" enum:"H264GopSizeUnits"` - - // H.264 Level. - Level *string `locationName:"level" type:"string" enum:"H264Level"` - - // Amount of lookahead. A value of low can decrease latency and memory usage, - // while high can produce better quality for certain content. - LookAheadRateControl *string `locationName:"lookAheadRateControl" type:"string" enum:"H264LookAheadRateControl"` - - // For QVBR: See the tooltip for Quality level For VBR: Set the maximum bitrate - // in order to accommodate expected spikes in the complexity of the video. - MaxBitrate *int64 `locationName:"maxBitrate" min:"1000" type:"integer"` - - // Only meaningful if sceneChangeDetect is set to enabled. Enforces separation - // between repeated (cadence) I-frames and I-frames inserted by Scene Change - // Detection. If a scene change I-frame is within I-interval frames of a cadence - // I-frame, the GOP is shrunk and/or stretched to the scene change I-frame. - // GOP stretch requires enabling lookahead as well as setting I-interval. The - // normal cadence resumes for the next GOP. Note: Maximum GOP stretch = GOP - // size + Min-I-interval - 1 - MinIInterval *int64 `locationName:"minIInterval" type:"integer"` - - // Number of reference frames to use. The encoder may use more than requested - // if using B-frames and/or interlaced encoding. - NumRefFrames *int64 `locationName:"numRefFrames" min:"1" type:"integer"` - - // This field indicates how the output pixel aspect ratio is specified. If "specified" - // is selected then the output video pixel aspect ratio is determined by parNumerator - // and parDenominator, else if "initializeFromSource" is selected then the output - // pixsel aspect ratio will be set equal to the input video pixel aspect ratio - // of the first input. - ParControl *string `locationName:"parControl" type:"string" enum:"H264ParControl"` - - // Pixel Aspect Ratio denominator. - ParDenominator *int64 `locationName:"parDenominator" min:"1" type:"integer"` - - // Pixel Aspect Ratio numerator. - ParNumerator *int64 `locationName:"parNumerator" type:"integer"` - - // H.264 Profile. - Profile *string `locationName:"profile" type:"string" enum:"H264Profile"` - - // Controls the target quality for the video encode. Applies only when the rate - // control mode is QVBR. Set values for the QVBR quality level field and Max - // bitrate field that suit your most important viewing devices. Recommended - // values are:- Primary screen: Quality level: 8 to 10. Max bitrate: 4M- PC - // or tablet: Quality level: 7. Max bitrate: 1.5M to 3M- Smartphone: Quality - // level: 6. Max bitrate: 1M to 1.5M - QvbrQualityLevel *int64 `locationName:"qvbrQualityLevel" min:"1" type:"integer"` - - // Rate control mode. QVBR: Quality will match the specified quality level except - // when it is constrained by themaximum bitrate. Recommended if you or your - // viewers pay for bandwidth.VBR: Quality and bitrate vary, depending on the - // video complexity. Recommended instead of QVBRif you want to maintain a specific - // average bitrate over the duration of the channel.CBR: Quality varies, depending - // on the video complexity. Recommended only if you distributeyour assets to - // devices that cannot handle variable bitrates. - RateControlMode *string `locationName:"rateControlMode" type:"string" enum:"H264RateControlMode"` - - // Sets the scan type of the output to progressive or top-field-first interlaced. - ScanType *string `locationName:"scanType" type:"string" enum:"H264ScanType"` - - // Scene change detection.- On: inserts I-frames when scene change is detected.- - // Off: does not force an I-frame when scene change is detected. - SceneChangeDetect *string `locationName:"sceneChangeDetect" type:"string" enum:"H264SceneChangeDetect"` - - // Number of slices per picture. Must be less than or equal to the number of - // macroblock rows for progressive pictures, and less than or equal to half - // the number of macroblock rows for interlaced pictures.This field is optional; - // when no value is specified the encoder will choose the number of slices based - // on encode resolution. - Slices *int64 `locationName:"slices" min:"1" type:"integer"` - - // Softness. Selects quantizer matrix, larger values reduce high-frequency content - // in the encoded image. - Softness *int64 `locationName:"softness" type:"integer"` - - // If set to enabled, adjust quantization within each frame based on spatial - // variation of content complexity. - SpatialAq *string `locationName:"spatialAq" type:"string" enum:"H264SpatialAq"` - - // If set to fixed, use gopNumBFrames B-frames per sub-GOP. If set to dynamic, - // optimize the number of B-frames used for each sub-GOP to improve visual quality. - SubgopLength *string `locationName:"subgopLength" type:"string" enum:"H264SubGopLength"` - - // Produces a bitstream compliant with SMPTE RP-2027. - Syntax *string `locationName:"syntax" type:"string" enum:"H264Syntax"` - - // If set to enabled, adjust quantization within each frame based on temporal - // variation of content complexity. - TemporalAq *string `locationName:"temporalAq" type:"string" enum:"H264TemporalAq"` - - // Determines how timecodes should be inserted into the video elementary stream.- - // 'disabled': Do not include timecodes- 'picTimingSei': Pass through picture - // timing SEI messages from the source specified in Timecode Config - TimecodeInsertion *string `locationName:"timecodeInsertion" type:"string" enum:"H264TimecodeInsertionBehavior"` -} - -// String returns the string representation -func (s H264Settings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s H264Settings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *H264Settings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "H264Settings"} - if s.Bitrate != nil && *s.Bitrate < 1000 { - invalidParams.Add(request.NewErrParamMinValue("Bitrate", 1000)) - } - if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { - invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) - } - if s.FramerateNumerator != nil && *s.FramerateNumerator < 1 { - invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 1)) - } - if s.MaxBitrate != nil && *s.MaxBitrate < 1000 { - invalidParams.Add(request.NewErrParamMinValue("MaxBitrate", 1000)) - } - if s.NumRefFrames != nil && *s.NumRefFrames < 1 { - invalidParams.Add(request.NewErrParamMinValue("NumRefFrames", 1)) - } - if s.ParDenominator != nil && *s.ParDenominator < 1 { - invalidParams.Add(request.NewErrParamMinValue("ParDenominator", 1)) - } - if s.QvbrQualityLevel != nil && *s.QvbrQualityLevel < 1 { - invalidParams.Add(request.NewErrParamMinValue("QvbrQualityLevel", 1)) - } - if s.Slices != nil && *s.Slices < 1 { - invalidParams.Add(request.NewErrParamMinValue("Slices", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdaptiveQuantization sets the AdaptiveQuantization field's value. -func (s *H264Settings) SetAdaptiveQuantization(v string) *H264Settings { - s.AdaptiveQuantization = &v - return s -} - -// SetAfdSignaling sets the AfdSignaling field's value. -func (s *H264Settings) SetAfdSignaling(v string) *H264Settings { - s.AfdSignaling = &v - return s -} - -// SetBitrate sets the Bitrate field's value. -func (s *H264Settings) SetBitrate(v int64) *H264Settings { - s.Bitrate = &v - return s -} - -// SetBufFillPct sets the BufFillPct field's value. -func (s *H264Settings) SetBufFillPct(v int64) *H264Settings { - s.BufFillPct = &v - return s -} - -// SetBufSize sets the BufSize field's value. -func (s *H264Settings) SetBufSize(v int64) *H264Settings { - s.BufSize = &v - return s -} - -// SetColorMetadata sets the ColorMetadata field's value. -func (s *H264Settings) SetColorMetadata(v string) *H264Settings { - s.ColorMetadata = &v - return s -} - -// SetEntropyEncoding sets the EntropyEncoding field's value. -func (s *H264Settings) SetEntropyEncoding(v string) *H264Settings { - s.EntropyEncoding = &v - return s -} - -// SetFixedAfd sets the FixedAfd field's value. -func (s *H264Settings) SetFixedAfd(v string) *H264Settings { - s.FixedAfd = &v - return s -} - -// SetFlickerAq sets the FlickerAq field's value. -func (s *H264Settings) SetFlickerAq(v string) *H264Settings { - s.FlickerAq = &v - return s -} - -// SetFramerateControl sets the FramerateControl field's value. -func (s *H264Settings) SetFramerateControl(v string) *H264Settings { - s.FramerateControl = &v - return s -} - -// SetFramerateDenominator sets the FramerateDenominator field's value. -func (s *H264Settings) SetFramerateDenominator(v int64) *H264Settings { - s.FramerateDenominator = &v - return s -} - -// SetFramerateNumerator sets the FramerateNumerator field's value. -func (s *H264Settings) SetFramerateNumerator(v int64) *H264Settings { - s.FramerateNumerator = &v - return s -} - -// SetGopBReference sets the GopBReference field's value. -func (s *H264Settings) SetGopBReference(v string) *H264Settings { - s.GopBReference = &v - return s -} - -// SetGopClosedCadence sets the GopClosedCadence field's value. -func (s *H264Settings) SetGopClosedCadence(v int64) *H264Settings { - s.GopClosedCadence = &v - return s -} - -// SetGopNumBFrames sets the GopNumBFrames field's value. -func (s *H264Settings) SetGopNumBFrames(v int64) *H264Settings { - s.GopNumBFrames = &v - return s -} - -// SetGopSize sets the GopSize field's value. -func (s *H264Settings) SetGopSize(v float64) *H264Settings { - s.GopSize = &v - return s -} - -// SetGopSizeUnits sets the GopSizeUnits field's value. -func (s *H264Settings) SetGopSizeUnits(v string) *H264Settings { - s.GopSizeUnits = &v - return s -} - -// SetLevel sets the Level field's value. -func (s *H264Settings) SetLevel(v string) *H264Settings { - s.Level = &v - return s -} - -// SetLookAheadRateControl sets the LookAheadRateControl field's value. -func (s *H264Settings) SetLookAheadRateControl(v string) *H264Settings { - s.LookAheadRateControl = &v - return s -} - -// SetMaxBitrate sets the MaxBitrate field's value. -func (s *H264Settings) SetMaxBitrate(v int64) *H264Settings { - s.MaxBitrate = &v - return s -} - -// SetMinIInterval sets the MinIInterval field's value. -func (s *H264Settings) SetMinIInterval(v int64) *H264Settings { - s.MinIInterval = &v - return s -} - -// SetNumRefFrames sets the NumRefFrames field's value. -func (s *H264Settings) SetNumRefFrames(v int64) *H264Settings { - s.NumRefFrames = &v - return s -} - -// SetParControl sets the ParControl field's value. -func (s *H264Settings) SetParControl(v string) *H264Settings { - s.ParControl = &v - return s -} - -// SetParDenominator sets the ParDenominator field's value. -func (s *H264Settings) SetParDenominator(v int64) *H264Settings { - s.ParDenominator = &v - return s -} - -// SetParNumerator sets the ParNumerator field's value. -func (s *H264Settings) SetParNumerator(v int64) *H264Settings { - s.ParNumerator = &v - return s -} - -// SetProfile sets the Profile field's value. -func (s *H264Settings) SetProfile(v string) *H264Settings { - s.Profile = &v - return s -} - -// SetQvbrQualityLevel sets the QvbrQualityLevel field's value. -func (s *H264Settings) SetQvbrQualityLevel(v int64) *H264Settings { - s.QvbrQualityLevel = &v - return s -} - -// SetRateControlMode sets the RateControlMode field's value. -func (s *H264Settings) SetRateControlMode(v string) *H264Settings { - s.RateControlMode = &v - return s -} - -// SetScanType sets the ScanType field's value. -func (s *H264Settings) SetScanType(v string) *H264Settings { - s.ScanType = &v - return s -} - -// SetSceneChangeDetect sets the SceneChangeDetect field's value. -func (s *H264Settings) SetSceneChangeDetect(v string) *H264Settings { - s.SceneChangeDetect = &v - return s -} - -// SetSlices sets the Slices field's value. -func (s *H264Settings) SetSlices(v int64) *H264Settings { - s.Slices = &v - return s -} - -// SetSoftness sets the Softness field's value. -func (s *H264Settings) SetSoftness(v int64) *H264Settings { - s.Softness = &v - return s -} - -// SetSpatialAq sets the SpatialAq field's value. -func (s *H264Settings) SetSpatialAq(v string) *H264Settings { - s.SpatialAq = &v - return s -} - -// SetSubgopLength sets the SubgopLength field's value. -func (s *H264Settings) SetSubgopLength(v string) *H264Settings { - s.SubgopLength = &v - return s -} - -// SetSyntax sets the Syntax field's value. -func (s *H264Settings) SetSyntax(v string) *H264Settings { - s.Syntax = &v - return s -} - -// SetTemporalAq sets the TemporalAq field's value. -func (s *H264Settings) SetTemporalAq(v string) *H264Settings { - s.TemporalAq = &v - return s -} - -// SetTimecodeInsertion sets the TimecodeInsertion field's value. -func (s *H264Settings) SetTimecodeInsertion(v string) *H264Settings { - s.TimecodeInsertion = &v - return s -} - -type HlsAkamaiSettings struct { - _ struct{} `type:"structure"` - - // Number of seconds to wait before retrying connection to the CDN if the connection - // is lost. - ConnectionRetryInterval *int64 `locationName:"connectionRetryInterval" type:"integer"` - - // Size in seconds of file cache for streaming outputs. - FilecacheDuration *int64 `locationName:"filecacheDuration" type:"integer"` - - // Specify whether or not to use chunked transfer encoding to Akamai. User should - // contact Akamai to enable this feature. - HttpTransferMode *string `locationName:"httpTransferMode" type:"string" enum:"HlsAkamaiHttpTransferMode"` - - // Number of retry attempts that will be made before the Live Event is put into - // an error state. - NumRetries *int64 `locationName:"numRetries" type:"integer"` - - // If a streaming output fails, number of seconds to wait until a restart is - // initiated. A value of 0 means never restart. - RestartDelay *int64 `locationName:"restartDelay" type:"integer"` - - // Salt for authenticated Akamai. - Salt *string `locationName:"salt" type:"string"` - - // Token parameter for authenticated akamai. If not specified, _gda_ is used. - Token *string `locationName:"token" type:"string"` -} - -// String returns the string representation -func (s HlsAkamaiSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsAkamaiSettings) GoString() string { - return s.String() -} - -// SetConnectionRetryInterval sets the ConnectionRetryInterval field's value. -func (s *HlsAkamaiSettings) SetConnectionRetryInterval(v int64) *HlsAkamaiSettings { - s.ConnectionRetryInterval = &v - return s -} - -// SetFilecacheDuration sets the FilecacheDuration field's value. -func (s *HlsAkamaiSettings) SetFilecacheDuration(v int64) *HlsAkamaiSettings { - s.FilecacheDuration = &v - return s -} - -// SetHttpTransferMode sets the HttpTransferMode field's value. -func (s *HlsAkamaiSettings) SetHttpTransferMode(v string) *HlsAkamaiSettings { - s.HttpTransferMode = &v - return s -} - -// SetNumRetries sets the NumRetries field's value. -func (s *HlsAkamaiSettings) SetNumRetries(v int64) *HlsAkamaiSettings { - s.NumRetries = &v - return s -} - -// SetRestartDelay sets the RestartDelay field's value. -func (s *HlsAkamaiSettings) SetRestartDelay(v int64) *HlsAkamaiSettings { - s.RestartDelay = &v - return s -} - -// SetSalt sets the Salt field's value. -func (s *HlsAkamaiSettings) SetSalt(v string) *HlsAkamaiSettings { - s.Salt = &v - return s -} - -// SetToken sets the Token field's value. -func (s *HlsAkamaiSettings) SetToken(v string) *HlsAkamaiSettings { - s.Token = &v - return s -} - -type HlsBasicPutSettings struct { - _ struct{} `type:"structure"` - - // Number of seconds to wait before retrying connection to the CDN if the connection - // is lost. - ConnectionRetryInterval *int64 `locationName:"connectionRetryInterval" type:"integer"` - - // Size in seconds of file cache for streaming outputs. - FilecacheDuration *int64 `locationName:"filecacheDuration" type:"integer"` - - // Number of retry attempts that will be made before the Live Event is put into - // an error state. - NumRetries *int64 `locationName:"numRetries" type:"integer"` - - // If a streaming output fails, number of seconds to wait until a restart is - // initiated. A value of 0 means never restart. - RestartDelay *int64 `locationName:"restartDelay" type:"integer"` -} - -// String returns the string representation -func (s HlsBasicPutSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsBasicPutSettings) GoString() string { - return s.String() -} - -// SetConnectionRetryInterval sets the ConnectionRetryInterval field's value. -func (s *HlsBasicPutSettings) SetConnectionRetryInterval(v int64) *HlsBasicPutSettings { - s.ConnectionRetryInterval = &v - return s -} - -// SetFilecacheDuration sets the FilecacheDuration field's value. -func (s *HlsBasicPutSettings) SetFilecacheDuration(v int64) *HlsBasicPutSettings { - s.FilecacheDuration = &v - return s -} - -// SetNumRetries sets the NumRetries field's value. -func (s *HlsBasicPutSettings) SetNumRetries(v int64) *HlsBasicPutSettings { - s.NumRetries = &v - return s -} - -// SetRestartDelay sets the RestartDelay field's value. -func (s *HlsBasicPutSettings) SetRestartDelay(v int64) *HlsBasicPutSettings { - s.RestartDelay = &v - return s -} - -type HlsCdnSettings struct { - _ struct{} `type:"structure"` - - HlsAkamaiSettings *HlsAkamaiSettings `locationName:"hlsAkamaiSettings" type:"structure"` - - HlsBasicPutSettings *HlsBasicPutSettings `locationName:"hlsBasicPutSettings" type:"structure"` - - HlsMediaStoreSettings *HlsMediaStoreSettings `locationName:"hlsMediaStoreSettings" type:"structure"` - - HlsWebdavSettings *HlsWebdavSettings `locationName:"hlsWebdavSettings" type:"structure"` -} - -// String returns the string representation -func (s HlsCdnSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsCdnSettings) GoString() string { - return s.String() -} - -// SetHlsAkamaiSettings sets the HlsAkamaiSettings field's value. -func (s *HlsCdnSettings) SetHlsAkamaiSettings(v *HlsAkamaiSettings) *HlsCdnSettings { - s.HlsAkamaiSettings = v - return s -} - -// SetHlsBasicPutSettings sets the HlsBasicPutSettings field's value. -func (s *HlsCdnSettings) SetHlsBasicPutSettings(v *HlsBasicPutSettings) *HlsCdnSettings { - s.HlsBasicPutSettings = v - return s -} - -// SetHlsMediaStoreSettings sets the HlsMediaStoreSettings field's value. -func (s *HlsCdnSettings) SetHlsMediaStoreSettings(v *HlsMediaStoreSettings) *HlsCdnSettings { - s.HlsMediaStoreSettings = v - return s -} - -// SetHlsWebdavSettings sets the HlsWebdavSettings field's value. -func (s *HlsCdnSettings) SetHlsWebdavSettings(v *HlsWebdavSettings) *HlsCdnSettings { - s.HlsWebdavSettings = v - return s -} - -type HlsGroupSettings struct { - _ struct{} `type:"structure"` - - // Choose one or more ad marker types to pass SCTE35 signals through to this - // group of Apple HLS outputs. - AdMarkers []*string `locationName:"adMarkers" type:"list"` - - // A partial URI prefix that will be prepended to each output in the media .m3u8 - // file. Can be used if base manifest is delivered from a different URL than - // the main .m3u8 file. - BaseUrlContent *string `locationName:"baseUrlContent" type:"string"` - - // A partial URI prefix that will be prepended to each output in the media .m3u8 - // file. Can be used if base manifest is delivered from a different URL than - // the main .m3u8 file. - BaseUrlManifest *string `locationName:"baseUrlManifest" type:"string"` - - // Mapping of up to 4 caption channels to caption languages. Is only meaningful - // if captionLanguageSetting is set to "insert". - CaptionLanguageMappings []*CaptionLanguageMapping `locationName:"captionLanguageMappings" type:"list"` - - // Applies only to 608 Embedded output captions.insert: Include CLOSED-CAPTIONS - // lines in the manifest. Specify at least one language in the CC1 Language - // Code field. One CLOSED-CAPTION line is added for each Language Code you specify. - // Make sure to specify the languages in the order in which they appear in the - // original source (if the source is embedded format) or the order of the caption - // selectors (if the source is other than embedded). Otherwise, languages in - // the manifest will not match up properly with the output captions.none: Include - // CLOSED-CAPTIONS=NONE line in the manifest.omit: Omit any CLOSED-CAPTIONS - // line from the manifest. - CaptionLanguageSetting *string `locationName:"captionLanguageSetting" type:"string" enum:"HlsCaptionLanguageSetting"` - - // When set to "disabled", sets the #EXT-X-ALLOW-CACHE:no tag in the manifest, - // which prevents clients from saving media segments for later replay. - ClientCache *string `locationName:"clientCache" type:"string" enum:"HlsClientCache"` - - // Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist - // generation. - CodecSpecification *string `locationName:"codecSpecification" type:"string" enum:"HlsCodecSpecification"` - - // For use with encryptionType. This is a 128-bit, 16-byte hex value represented - // by a 32-character text string. If ivSource is set to "explicit" then this - // parameter is required and is used as the IV for encryption. - ConstantIv *string `locationName:"constantIv" min:"32" type:"string"` - - // A directory or HTTP destination for the HLS segments, manifest files, and - // encryption keys (if enabled). - // - // Destination is a required field - Destination *OutputLocationRef `locationName:"destination" type:"structure" required:"true"` - - // Place segments in subdirectories. - DirectoryStructure *string `locationName:"directoryStructure" type:"string" enum:"HlsDirectoryStructure"` - - // Encrypts the segments with the given encryption scheme. Exclude this parameter - // if no encryption is desired. - EncryptionType *string `locationName:"encryptionType" type:"string" enum:"HlsEncryptionType"` - - // Parameters that control interactions with the CDN. - HlsCdnSettings *HlsCdnSettings `locationName:"hlsCdnSettings" type:"structure"` - - // If enabled, writes out I-Frame only playlists in addition to media playlists. - IFrameOnlyPlaylists *string `locationName:"iFrameOnlyPlaylists" type:"string" enum:"IFrameOnlyPlaylistType"` - - // If mode is "live", the number of segments to retain in the manifest (.m3u8) - // file. This number must be less than or equal to keepSegments. If mode is - // "vod", this parameter has no effect. - IndexNSegments *int64 `locationName:"indexNSegments" min:"3" type:"integer"` - - // Parameter that control output group behavior on input loss. - InputLossAction *string `locationName:"inputLossAction" type:"string" enum:"InputLossActionForHlsOut"` - - // For use with encryptionType. The IV (Initialization Vector) is a 128-bit - // number used in conjunction with the key for encrypting blocks. If set to - // "include", IV is listed in the manifest, otherwise the IV is not in the manifest. - IvInManifest *string `locationName:"ivInManifest" type:"string" enum:"HlsIvInManifest"` - - // For use with encryptionType. The IV (Initialization Vector) is a 128-bit - // number used in conjunction with the key for encrypting blocks. If this setting - // is "followsSegmentNumber", it will cause the IV to change every segment (to - // match the segment number). If this is set to "explicit", you must enter a - // constantIv value. - IvSource *string `locationName:"ivSource" type:"string" enum:"HlsIvSource"` - - // If mode is "live", the number of TS segments to retain in the destination - // directory. If mode is "vod", this parameter has no effect. - KeepSegments *int64 `locationName:"keepSegments" min:"1" type:"integer"` - - // The value specifies how the key is represented in the resource identified - // by the URI. If parameter is absent, an implicit value of "identity" is used. - // A reverse DNS string can also be given. - KeyFormat *string `locationName:"keyFormat" type:"string"` - - // Either a single positive integer version value or a slash delimited list - // of version values (1/2/3). - KeyFormatVersions *string `locationName:"keyFormatVersions" type:"string"` - - // The key provider settings. - KeyProviderSettings *KeyProviderSettings `locationName:"keyProviderSettings" type:"structure"` - - // When set to gzip, compresses HLS playlist. - ManifestCompression *string `locationName:"manifestCompression" type:"string" enum:"HlsManifestCompression"` - - // Indicates whether the output manifest should use floating point or integer - // values for segment duration. - ManifestDurationFormat *string `locationName:"manifestDurationFormat" type:"string" enum:"HlsManifestDurationFormat"` - - // When set, minimumSegmentLength is enforced by looking ahead and back within - // the specified range for a nearby avail and extending the segment size if - // needed. - MinSegmentLength *int64 `locationName:"minSegmentLength" type:"integer"` - - // If "vod", all segments are indexed and kept permanently in the destination - // and manifest. If "live", only the number segments specified in keepSegments - // and indexNSegments are kept; newer segments replace older segments, which - // may prevent players from rewinding all the way to the beginning of the event.VOD - // mode uses HLS EXT-X-PLAYLIST-TYPE of EVENT while the channel is running, - // converting it to a "VOD" type manifest on completion of the stream. - Mode *string `locationName:"mode" type:"string" enum:"HlsMode"` - - // Generates the .m3u8 playlist file for this HLS output group. The segmentsOnly - // option will output segments without the .m3u8 file. - OutputSelection *string `locationName:"outputSelection" type:"string" enum:"HlsOutputSelection"` - - // Includes or excludes EXT-X-PROGRAM-DATE-TIME tag in .m3u8 manifest files. - // The value is calculated as follows: either the program date and time are - // initialized using the input timecode source, or the time is initialized using - // the input timecode source and the date is initialized using the timestampOffset. - ProgramDateTime *string `locationName:"programDateTime" type:"string" enum:"HlsProgramDateTime"` - - // Period of insertion of EXT-X-PROGRAM-DATE-TIME entry, in seconds. - ProgramDateTimePeriod *int64 `locationName:"programDateTimePeriod" type:"integer"` - - // When set to "enabled", includes the media playlists from both pipelines in - // the master manifest (.m3u8) file. - RedundantManifest *string `locationName:"redundantManifest" type:"string" enum:"HlsRedundantManifest"` - - // Length of MPEG-2 Transport Stream segments to create (in seconds). Note that - // segments will end on the next keyframe after this number of seconds, so actual - // segment length may be longer. - SegmentLength *int64 `locationName:"segmentLength" min:"1" type:"integer"` - - // useInputSegmentation has been deprecated. The configured segment size is - // always used. - SegmentationMode *string `locationName:"segmentationMode" type:"string" enum:"HlsSegmentationMode"` - - // Number of segments to write to a subdirectory before starting a new one. - // directoryStructure must be subdirectoryPerStream for this setting to have - // an effect. - SegmentsPerSubdirectory *int64 `locationName:"segmentsPerSubdirectory" min:"1" type:"integer"` - - // Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag - // of variant manifest. - StreamInfResolution *string `locationName:"streamInfResolution" type:"string" enum:"HlsStreamInfResolution"` - - // Indicates ID3 frame that has the timecode. - TimedMetadataId3Frame *string `locationName:"timedMetadataId3Frame" type:"string" enum:"HlsTimedMetadataId3Frame"` - - // Timed Metadata interval in seconds. - TimedMetadataId3Period *int64 `locationName:"timedMetadataId3Period" type:"integer"` - - // Provides an extra millisecond delta offset to fine tune the timestamps. - TimestampDeltaMilliseconds *int64 `locationName:"timestampDeltaMilliseconds" type:"integer"` - - // When set to "singleFile", emits the program as a single media resource (.ts) - // file, and uses #EXT-X-BYTERANGE tags to index segment for playback. Playback - // of VOD mode content during event is not guaranteed due to HTTP server caching. - TsFileMode *string `locationName:"tsFileMode" type:"string" enum:"HlsTsFileMode"` -} - -// String returns the string representation -func (s HlsGroupSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsGroupSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HlsGroupSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HlsGroupSettings"} - if s.ConstantIv != nil && len(*s.ConstantIv) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ConstantIv", 32)) - } - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - if s.IndexNSegments != nil && *s.IndexNSegments < 3 { - invalidParams.Add(request.NewErrParamMinValue("IndexNSegments", 3)) - } - if s.KeepSegments != nil && *s.KeepSegments < 1 { - invalidParams.Add(request.NewErrParamMinValue("KeepSegments", 1)) - } - if s.SegmentLength != nil && *s.SegmentLength < 1 { - invalidParams.Add(request.NewErrParamMinValue("SegmentLength", 1)) - } - if s.SegmentsPerSubdirectory != nil && *s.SegmentsPerSubdirectory < 1 { - invalidParams.Add(request.NewErrParamMinValue("SegmentsPerSubdirectory", 1)) - } - if s.CaptionLanguageMappings != nil { - for i, v := range s.CaptionLanguageMappings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionLanguageMappings", i), err.(request.ErrInvalidParams)) - } - } - } - if s.KeyProviderSettings != nil { - if err := s.KeyProviderSettings.Validate(); err != nil { - invalidParams.AddNested("KeyProviderSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdMarkers sets the AdMarkers field's value. -func (s *HlsGroupSettings) SetAdMarkers(v []*string) *HlsGroupSettings { - s.AdMarkers = v - return s -} - -// SetBaseUrlContent sets the BaseUrlContent field's value. -func (s *HlsGroupSettings) SetBaseUrlContent(v string) *HlsGroupSettings { - s.BaseUrlContent = &v - return s -} - -// SetBaseUrlManifest sets the BaseUrlManifest field's value. -func (s *HlsGroupSettings) SetBaseUrlManifest(v string) *HlsGroupSettings { - s.BaseUrlManifest = &v - return s -} - -// SetCaptionLanguageMappings sets the CaptionLanguageMappings field's value. -func (s *HlsGroupSettings) SetCaptionLanguageMappings(v []*CaptionLanguageMapping) *HlsGroupSettings { - s.CaptionLanguageMappings = v - return s -} - -// SetCaptionLanguageSetting sets the CaptionLanguageSetting field's value. -func (s *HlsGroupSettings) SetCaptionLanguageSetting(v string) *HlsGroupSettings { - s.CaptionLanguageSetting = &v - return s -} - -// SetClientCache sets the ClientCache field's value. -func (s *HlsGroupSettings) SetClientCache(v string) *HlsGroupSettings { - s.ClientCache = &v - return s -} - -// SetCodecSpecification sets the CodecSpecification field's value. -func (s *HlsGroupSettings) SetCodecSpecification(v string) *HlsGroupSettings { - s.CodecSpecification = &v - return s -} - -// SetConstantIv sets the ConstantIv field's value. -func (s *HlsGroupSettings) SetConstantIv(v string) *HlsGroupSettings { - s.ConstantIv = &v - return s -} - -// SetDestination sets the Destination field's value. -func (s *HlsGroupSettings) SetDestination(v *OutputLocationRef) *HlsGroupSettings { - s.Destination = v - return s -} - -// SetDirectoryStructure sets the DirectoryStructure field's value. -func (s *HlsGroupSettings) SetDirectoryStructure(v string) *HlsGroupSettings { - s.DirectoryStructure = &v - return s -} - -// SetEncryptionType sets the EncryptionType field's value. -func (s *HlsGroupSettings) SetEncryptionType(v string) *HlsGroupSettings { - s.EncryptionType = &v - return s -} - -// SetHlsCdnSettings sets the HlsCdnSettings field's value. -func (s *HlsGroupSettings) SetHlsCdnSettings(v *HlsCdnSettings) *HlsGroupSettings { - s.HlsCdnSettings = v - return s -} - -// SetIFrameOnlyPlaylists sets the IFrameOnlyPlaylists field's value. -func (s *HlsGroupSettings) SetIFrameOnlyPlaylists(v string) *HlsGroupSettings { - s.IFrameOnlyPlaylists = &v - return s -} - -// SetIndexNSegments sets the IndexNSegments field's value. -func (s *HlsGroupSettings) SetIndexNSegments(v int64) *HlsGroupSettings { - s.IndexNSegments = &v - return s -} - -// SetInputLossAction sets the InputLossAction field's value. -func (s *HlsGroupSettings) SetInputLossAction(v string) *HlsGroupSettings { - s.InputLossAction = &v - return s -} - -// SetIvInManifest sets the IvInManifest field's value. -func (s *HlsGroupSettings) SetIvInManifest(v string) *HlsGroupSettings { - s.IvInManifest = &v - return s -} - -// SetIvSource sets the IvSource field's value. -func (s *HlsGroupSettings) SetIvSource(v string) *HlsGroupSettings { - s.IvSource = &v - return s -} - -// SetKeepSegments sets the KeepSegments field's value. -func (s *HlsGroupSettings) SetKeepSegments(v int64) *HlsGroupSettings { - s.KeepSegments = &v - return s -} - -// SetKeyFormat sets the KeyFormat field's value. -func (s *HlsGroupSettings) SetKeyFormat(v string) *HlsGroupSettings { - s.KeyFormat = &v - return s -} - -// SetKeyFormatVersions sets the KeyFormatVersions field's value. -func (s *HlsGroupSettings) SetKeyFormatVersions(v string) *HlsGroupSettings { - s.KeyFormatVersions = &v - return s -} - -// SetKeyProviderSettings sets the KeyProviderSettings field's value. -func (s *HlsGroupSettings) SetKeyProviderSettings(v *KeyProviderSettings) *HlsGroupSettings { - s.KeyProviderSettings = v - return s -} - -// SetManifestCompression sets the ManifestCompression field's value. -func (s *HlsGroupSettings) SetManifestCompression(v string) *HlsGroupSettings { - s.ManifestCompression = &v - return s -} - -// SetManifestDurationFormat sets the ManifestDurationFormat field's value. -func (s *HlsGroupSettings) SetManifestDurationFormat(v string) *HlsGroupSettings { - s.ManifestDurationFormat = &v - return s -} - -// SetMinSegmentLength sets the MinSegmentLength field's value. -func (s *HlsGroupSettings) SetMinSegmentLength(v int64) *HlsGroupSettings { - s.MinSegmentLength = &v - return s -} - -// SetMode sets the Mode field's value. -func (s *HlsGroupSettings) SetMode(v string) *HlsGroupSettings { - s.Mode = &v - return s -} - -// SetOutputSelection sets the OutputSelection field's value. -func (s *HlsGroupSettings) SetOutputSelection(v string) *HlsGroupSettings { - s.OutputSelection = &v - return s -} - -// SetProgramDateTime sets the ProgramDateTime field's value. -func (s *HlsGroupSettings) SetProgramDateTime(v string) *HlsGroupSettings { - s.ProgramDateTime = &v - return s -} - -// SetProgramDateTimePeriod sets the ProgramDateTimePeriod field's value. -func (s *HlsGroupSettings) SetProgramDateTimePeriod(v int64) *HlsGroupSettings { - s.ProgramDateTimePeriod = &v - return s -} - -// SetRedundantManifest sets the RedundantManifest field's value. -func (s *HlsGroupSettings) SetRedundantManifest(v string) *HlsGroupSettings { - s.RedundantManifest = &v - return s -} - -// SetSegmentLength sets the SegmentLength field's value. -func (s *HlsGroupSettings) SetSegmentLength(v int64) *HlsGroupSettings { - s.SegmentLength = &v - return s -} - -// SetSegmentationMode sets the SegmentationMode field's value. -func (s *HlsGroupSettings) SetSegmentationMode(v string) *HlsGroupSettings { - s.SegmentationMode = &v - return s -} - -// SetSegmentsPerSubdirectory sets the SegmentsPerSubdirectory field's value. -func (s *HlsGroupSettings) SetSegmentsPerSubdirectory(v int64) *HlsGroupSettings { - s.SegmentsPerSubdirectory = &v - return s -} - -// SetStreamInfResolution sets the StreamInfResolution field's value. -func (s *HlsGroupSettings) SetStreamInfResolution(v string) *HlsGroupSettings { - s.StreamInfResolution = &v - return s -} - -// SetTimedMetadataId3Frame sets the TimedMetadataId3Frame field's value. -func (s *HlsGroupSettings) SetTimedMetadataId3Frame(v string) *HlsGroupSettings { - s.TimedMetadataId3Frame = &v - return s -} - -// SetTimedMetadataId3Period sets the TimedMetadataId3Period field's value. -func (s *HlsGroupSettings) SetTimedMetadataId3Period(v int64) *HlsGroupSettings { - s.TimedMetadataId3Period = &v - return s -} - -// SetTimestampDeltaMilliseconds sets the TimestampDeltaMilliseconds field's value. -func (s *HlsGroupSettings) SetTimestampDeltaMilliseconds(v int64) *HlsGroupSettings { - s.TimestampDeltaMilliseconds = &v - return s -} - -// SetTsFileMode sets the TsFileMode field's value. -func (s *HlsGroupSettings) SetTsFileMode(v string) *HlsGroupSettings { - s.TsFileMode = &v - return s -} - -type HlsInputSettings struct { - _ struct{} `type:"structure"` - - // When specified the HLS stream with the m3u8 BANDWIDTH that most closely matches - // this value will be chosen, otherwise the highest bandwidth stream in the - // m3u8 will be chosen. The bitrate is specified in bits per second, as in an - // HLS manifest. - Bandwidth *int64 `locationName:"bandwidth" type:"integer"` - - // When specified, reading of the HLS input will begin this many buffer segments - // from the end (most recently written segment). When not specified, the HLS - // input will begin with the first segment specified in the m3u8. - BufferSegments *int64 `locationName:"bufferSegments" type:"integer"` - - // The number of consecutive times that attempts to read a manifest or segment - // must fail before the input is considered unavailable. - Retries *int64 `locationName:"retries" type:"integer"` - - // The number of seconds between retries when an attempt to read a manifest - // or segment fails. - RetryInterval *int64 `locationName:"retryInterval" type:"integer"` -} - -// String returns the string representation -func (s HlsInputSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsInputSettings) GoString() string { - return s.String() -} - -// SetBandwidth sets the Bandwidth field's value. -func (s *HlsInputSettings) SetBandwidth(v int64) *HlsInputSettings { - s.Bandwidth = &v - return s -} - -// SetBufferSegments sets the BufferSegments field's value. -func (s *HlsInputSettings) SetBufferSegments(v int64) *HlsInputSettings { - s.BufferSegments = &v - return s -} - -// SetRetries sets the Retries field's value. -func (s *HlsInputSettings) SetRetries(v int64) *HlsInputSettings { - s.Retries = &v - return s -} - -// SetRetryInterval sets the RetryInterval field's value. -func (s *HlsInputSettings) SetRetryInterval(v int64) *HlsInputSettings { - s.RetryInterval = &v - return s -} - -type HlsMediaStoreSettings struct { - _ struct{} `type:"structure"` - - // Number of seconds to wait before retrying connection to the CDN if the connection - // is lost. - ConnectionRetryInterval *int64 `locationName:"connectionRetryInterval" type:"integer"` - - // Size in seconds of file cache for streaming outputs. - FilecacheDuration *int64 `locationName:"filecacheDuration" type:"integer"` - - // When set to temporal, output files are stored in non-persistent memory for - // faster reading and writing. - MediaStoreStorageClass *string `locationName:"mediaStoreStorageClass" type:"string" enum:"HlsMediaStoreStorageClass"` - - // Number of retry attempts that will be made before the Live Event is put into - // an error state. - NumRetries *int64 `locationName:"numRetries" type:"integer"` - - // If a streaming output fails, number of seconds to wait until a restart is - // initiated. A value of 0 means never restart. - RestartDelay *int64 `locationName:"restartDelay" type:"integer"` -} - -// String returns the string representation -func (s HlsMediaStoreSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsMediaStoreSettings) GoString() string { - return s.String() -} - -// SetConnectionRetryInterval sets the ConnectionRetryInterval field's value. -func (s *HlsMediaStoreSettings) SetConnectionRetryInterval(v int64) *HlsMediaStoreSettings { - s.ConnectionRetryInterval = &v - return s -} - -// SetFilecacheDuration sets the FilecacheDuration field's value. -func (s *HlsMediaStoreSettings) SetFilecacheDuration(v int64) *HlsMediaStoreSettings { - s.FilecacheDuration = &v - return s -} - -// SetMediaStoreStorageClass sets the MediaStoreStorageClass field's value. -func (s *HlsMediaStoreSettings) SetMediaStoreStorageClass(v string) *HlsMediaStoreSettings { - s.MediaStoreStorageClass = &v - return s -} - -// SetNumRetries sets the NumRetries field's value. -func (s *HlsMediaStoreSettings) SetNumRetries(v int64) *HlsMediaStoreSettings { - s.NumRetries = &v - return s -} - -// SetRestartDelay sets the RestartDelay field's value. -func (s *HlsMediaStoreSettings) SetRestartDelay(v int64) *HlsMediaStoreSettings { - s.RestartDelay = &v - return s -} - -type HlsOutputSettings struct { - _ struct{} `type:"structure"` - - // Settings regarding the underlying stream. These settings are different for - // audio-only outputs. - // - // HlsSettings is a required field - HlsSettings *HlsSettings `locationName:"hlsSettings" type:"structure" required:"true"` - - // String concatenated to the end of the destination filename. Accepts \"Format - // Identifiers\":#formatIdentifierParameters. - NameModifier *string `locationName:"nameModifier" min:"1" type:"string"` - - // String concatenated to end of segment filenames. - SegmentModifier *string `locationName:"segmentModifier" type:"string"` -} - -// String returns the string representation -func (s HlsOutputSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsOutputSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HlsOutputSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HlsOutputSettings"} - if s.HlsSettings == nil { - invalidParams.Add(request.NewErrParamRequired("HlsSettings")) - } - if s.NameModifier != nil && len(*s.NameModifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NameModifier", 1)) - } - if s.HlsSettings != nil { - if err := s.HlsSettings.Validate(); err != nil { - invalidParams.AddNested("HlsSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHlsSettings sets the HlsSettings field's value. -func (s *HlsOutputSettings) SetHlsSettings(v *HlsSettings) *HlsOutputSettings { - s.HlsSettings = v - return s -} - -// SetNameModifier sets the NameModifier field's value. -func (s *HlsOutputSettings) SetNameModifier(v string) *HlsOutputSettings { - s.NameModifier = &v - return s -} - -// SetSegmentModifier sets the SegmentModifier field's value. -func (s *HlsOutputSettings) SetSegmentModifier(v string) *HlsOutputSettings { - s.SegmentModifier = &v - return s -} - -type HlsSettings struct { - _ struct{} `type:"structure"` - - AudioOnlyHlsSettings *AudioOnlyHlsSettings `locationName:"audioOnlyHlsSettings" type:"structure"` - - StandardHlsSettings *StandardHlsSettings `locationName:"standardHlsSettings" type:"structure"` -} - -// String returns the string representation -func (s HlsSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HlsSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HlsSettings"} - if s.AudioOnlyHlsSettings != nil { - if err := s.AudioOnlyHlsSettings.Validate(); err != nil { - invalidParams.AddNested("AudioOnlyHlsSettings", err.(request.ErrInvalidParams)) - } - } - if s.StandardHlsSettings != nil { - if err := s.StandardHlsSettings.Validate(); err != nil { - invalidParams.AddNested("StandardHlsSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioOnlyHlsSettings sets the AudioOnlyHlsSettings field's value. -func (s *HlsSettings) SetAudioOnlyHlsSettings(v *AudioOnlyHlsSettings) *HlsSettings { - s.AudioOnlyHlsSettings = v - return s -} - -// SetStandardHlsSettings sets the StandardHlsSettings field's value. -func (s *HlsSettings) SetStandardHlsSettings(v *StandardHlsSettings) *HlsSettings { - s.StandardHlsSettings = v - return s -} - -// Settings for the action to emit HLS metadata -type HlsTimedMetadataScheduleActionSettings struct { - _ struct{} `type:"structure"` - - // Base64 string formatted according to the ID3 specification: http://id3.org/id3v2.4.0-structure - // - // Id3 is a required field - Id3 *string `locationName:"id3" type:"string" required:"true"` -} - -// String returns the string representation -func (s HlsTimedMetadataScheduleActionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsTimedMetadataScheduleActionSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HlsTimedMetadataScheduleActionSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HlsTimedMetadataScheduleActionSettings"} - if s.Id3 == nil { - invalidParams.Add(request.NewErrParamRequired("Id3")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId3 sets the Id3 field's value. -func (s *HlsTimedMetadataScheduleActionSettings) SetId3(v string) *HlsTimedMetadataScheduleActionSettings { - s.Id3 = &v - return s -} - -type HlsWebdavSettings struct { - _ struct{} `type:"structure"` - - // Number of seconds to wait before retrying connection to the CDN if the connection - // is lost. - ConnectionRetryInterval *int64 `locationName:"connectionRetryInterval" type:"integer"` - - // Size in seconds of file cache for streaming outputs. - FilecacheDuration *int64 `locationName:"filecacheDuration" type:"integer"` - - // Specify whether or not to use chunked transfer encoding to WebDAV. - HttpTransferMode *string `locationName:"httpTransferMode" type:"string" enum:"HlsWebdavHttpTransferMode"` - - // Number of retry attempts that will be made before the Live Event is put into - // an error state. - NumRetries *int64 `locationName:"numRetries" type:"integer"` - - // If a streaming output fails, number of seconds to wait until a restart is - // initiated. A value of 0 means never restart. - RestartDelay *int64 `locationName:"restartDelay" type:"integer"` -} - -// String returns the string representation -func (s HlsWebdavSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsWebdavSettings) GoString() string { - return s.String() -} - -// SetConnectionRetryInterval sets the ConnectionRetryInterval field's value. -func (s *HlsWebdavSettings) SetConnectionRetryInterval(v int64) *HlsWebdavSettings { - s.ConnectionRetryInterval = &v - return s -} - -// SetFilecacheDuration sets the FilecacheDuration field's value. -func (s *HlsWebdavSettings) SetFilecacheDuration(v int64) *HlsWebdavSettings { - s.FilecacheDuration = &v - return s -} - -// SetHttpTransferMode sets the HttpTransferMode field's value. -func (s *HlsWebdavSettings) SetHttpTransferMode(v string) *HlsWebdavSettings { - s.HttpTransferMode = &v - return s -} - -// SetNumRetries sets the NumRetries field's value. -func (s *HlsWebdavSettings) SetNumRetries(v int64) *HlsWebdavSettings { - s.NumRetries = &v - return s -} - -// SetRestartDelay sets the RestartDelay field's value. -func (s *HlsWebdavSettings) SetRestartDelay(v int64) *HlsWebdavSettings { - s.RestartDelay = &v - return s -} - -type Input struct { - _ struct{} `type:"structure"` - - // The Unique ARN of the input (generated, immutable). - Arn *string `locationName:"arn" type:"string"` - - // A list of channel IDs that that input is attached to (currently an input - // can only be attached to one channel). - AttachedChannels []*string `locationName:"attachedChannels" type:"list"` - - // A list of the destinations of the input (PUSH-type). - Destinations []*InputDestination `locationName:"destinations" type:"list"` - - // The generated ID of the input (unique for user account, immutable). - Id *string `locationName:"id" type:"string"` - - // A list of MediaConnect Flows for this input. - MediaConnectFlows []*MediaConnectFlow `locationName:"mediaConnectFlows" type:"list"` - - // The user-assigned name (This is a mutable value). - Name *string `locationName:"name" type:"string"` - - // The Amazon Resource Name (ARN) of the role this input assumes during and - // after creation. - RoleArn *string `locationName:"roleArn" type:"string"` - - // A list of IDs for all the security groups attached to the input. - SecurityGroups []*string `locationName:"securityGroups" type:"list"` - - // A list of the sources of the input (PULL-type). - Sources []*InputSource `locationName:"sources" type:"list"` - - State *string `locationName:"state" type:"string" enum:"InputState"` - - Type *string `locationName:"type" type:"string" enum:"InputType"` -} - -// String returns the string representation -func (s Input) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Input) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Input) SetArn(v string) *Input { - s.Arn = &v - return s -} - -// SetAttachedChannels sets the AttachedChannels field's value. -func (s *Input) SetAttachedChannels(v []*string) *Input { - s.AttachedChannels = v - return s -} - -// SetDestinations sets the Destinations field's value. -func (s *Input) SetDestinations(v []*InputDestination) *Input { - s.Destinations = v - return s -} - -// SetId sets the Id field's value. -func (s *Input) SetId(v string) *Input { - s.Id = &v - return s -} - -// SetMediaConnectFlows sets the MediaConnectFlows field's value. -func (s *Input) SetMediaConnectFlows(v []*MediaConnectFlow) *Input { - s.MediaConnectFlows = v - return s -} - -// SetName sets the Name field's value. -func (s *Input) SetName(v string) *Input { - s.Name = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *Input) SetRoleArn(v string) *Input { - s.RoleArn = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *Input) SetSecurityGroups(v []*string) *Input { - s.SecurityGroups = v - return s -} - -// SetSources sets the Sources field's value. -func (s *Input) SetSources(v []*InputSource) *Input { - s.Sources = v - return s -} - -// SetState sets the State field's value. -func (s *Input) SetState(v string) *Input { - s.State = &v - return s -} - -// SetType sets the Type field's value. -func (s *Input) SetType(v string) *Input { - s.Type = &v - return s -} - -type InputAttachment struct { - _ struct{} `type:"structure"` - - // User-specified name for the attachment. This is required if the user wants - // to use this input in an input switch action. - InputAttachmentName *string `locationName:"inputAttachmentName" type:"string"` - - // The ID of the input - InputId *string `locationName:"inputId" type:"string"` - - // Settings of an input (caption selector, etc.) - InputSettings *InputSettings `locationName:"inputSettings" type:"structure"` -} - -// String returns the string representation -func (s InputAttachment) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputAttachment) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputAttachment) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputAttachment"} - if s.InputSettings != nil { - if err := s.InputSettings.Validate(); err != nil { - invalidParams.AddNested("InputSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputAttachmentName sets the InputAttachmentName field's value. -func (s *InputAttachment) SetInputAttachmentName(v string) *InputAttachment { - s.InputAttachmentName = &v - return s -} - -// SetInputId sets the InputId field's value. -func (s *InputAttachment) SetInputId(v string) *InputAttachment { - s.InputId = &v - return s -} - -// SetInputSettings sets the InputSettings field's value. -func (s *InputAttachment) SetInputSettings(v *InputSettings) *InputAttachment { - s.InputSettings = v - return s -} - -type InputChannelLevel struct { - _ struct{} `type:"structure"` - - // Remixing value. Units are in dB and acceptable values are within the range - // from -60 (mute) and 6 dB. - // - // Gain is a required field - Gain *int64 `locationName:"gain" type:"integer" required:"true"` - - // The index of the input channel used as a source. - // - // InputChannel is a required field - InputChannel *int64 `locationName:"inputChannel" type:"integer" required:"true"` -} - -// String returns the string representation -func (s InputChannelLevel) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputChannelLevel) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputChannelLevel) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputChannelLevel"} - if s.Gain == nil { - invalidParams.Add(request.NewErrParamRequired("Gain")) - } - if s.Gain != nil && *s.Gain < -60 { - invalidParams.Add(request.NewErrParamMinValue("Gain", -60)) - } - if s.InputChannel == nil { - invalidParams.Add(request.NewErrParamRequired("InputChannel")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGain sets the Gain field's value. -func (s *InputChannelLevel) SetGain(v int64) *InputChannelLevel { - s.Gain = &v - return s -} - -// SetInputChannel sets the InputChannel field's value. -func (s *InputChannelLevel) SetInputChannel(v int64) *InputChannelLevel { - s.InputChannel = &v - return s -} - -// The settings for a PUSH type input. -type InputDestination struct { - _ struct{} `type:"structure"` - - // The system-generated static IP address of endpoint.It remains fixed for the - // lifetime of the input. - Ip *string `locationName:"ip" type:"string"` - - // The port number for the input. - Port *string `locationName:"port" type:"string"` - - // This represents the endpoint that the customer stream will bepushed to. - Url *string `locationName:"url" type:"string"` -} - -// String returns the string representation -func (s InputDestination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputDestination) GoString() string { - return s.String() -} - -// SetIp sets the Ip field's value. -func (s *InputDestination) SetIp(v string) *InputDestination { - s.Ip = &v - return s -} - -// SetPort sets the Port field's value. -func (s *InputDestination) SetPort(v string) *InputDestination { - s.Port = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *InputDestination) SetUrl(v string) *InputDestination { - s.Url = &v - return s -} - -// Endpoint settings for a PUSH type input. -type InputDestinationRequest struct { - _ struct{} `type:"structure"` - - // A unique name for the location the RTMP stream is being pushedto. - StreamName *string `locationName:"streamName" type:"string"` -} - -// String returns the string representation -func (s InputDestinationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputDestinationRequest) GoString() string { - return s.String() -} - -// SetStreamName sets the StreamName field's value. -func (s *InputDestinationRequest) SetStreamName(v string) *InputDestinationRequest { - s.StreamName = &v - return s -} - -type InputLocation struct { - _ struct{} `type:"structure"` - - // key used to extract the password from EC2 Parameter store - PasswordParam *string `locationName:"passwordParam" type:"string"` - - // Uniform Resource Identifier - This should be a path to a file accessible - // to the Live system (eg. a http:// URI) depending on the output type. For - // example, a RTMP destination should have a uri simliar to: "rtmp://fmsserver/live". - // - // Uri is a required field - Uri *string `locationName:"uri" type:"string" required:"true"` - - // Username if credentials are required to access a file or publishing point. - // This can be either a plaintext username, or a reference to an AWS parameter - // store name from which the username can be retrieved. AWS Parameter store - // format: "ssm://" - Username *string `locationName:"username" type:"string"` -} - -// String returns the string representation -func (s InputLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputLocation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputLocation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputLocation"} - if s.Uri == nil { - invalidParams.Add(request.NewErrParamRequired("Uri")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPasswordParam sets the PasswordParam field's value. -func (s *InputLocation) SetPasswordParam(v string) *InputLocation { - s.PasswordParam = &v - return s -} - -// SetUri sets the Uri field's value. -func (s *InputLocation) SetUri(v string) *InputLocation { - s.Uri = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *InputLocation) SetUsername(v string) *InputLocation { - s.Username = &v - return s -} - -type InputLossBehavior struct { - _ struct{} `type:"structure"` - - // On input loss, the number of milliseconds to substitute black into the output - // before switching to the frame specified by inputLossImageType. A value x, - // where 0 <= x <= 1,000,000 and a value of 1,000,000 will be interpreted as - // infinite. - BlackFrameMsec *int64 `locationName:"blackFrameMsec" type:"integer"` - - // When input loss image type is "color" this field specifies the color to use. - // Value: 6 hex characters representing the values of RGB. - InputLossImageColor *string `locationName:"inputLossImageColor" min:"6" type:"string"` - - // When input loss image type is "slate" these fields specify the parameters - // for accessing the slate. - InputLossImageSlate *InputLocation `locationName:"inputLossImageSlate" type:"structure"` - - // Indicates whether to substitute a solid color or a slate into the output - // after input loss exceeds blackFrameMsec. - InputLossImageType *string `locationName:"inputLossImageType" type:"string" enum:"InputLossImageType"` - - // On input loss, the number of milliseconds to repeat the previous picture - // before substituting black into the output. A value x, where 0 <= x <= 1,000,000 - // and a value of 1,000,000 will be interpreted as infinite. - RepeatFrameMsec *int64 `locationName:"repeatFrameMsec" type:"integer"` -} - -// String returns the string representation -func (s InputLossBehavior) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputLossBehavior) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputLossBehavior) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputLossBehavior"} - if s.InputLossImageColor != nil && len(*s.InputLossImageColor) < 6 { - invalidParams.Add(request.NewErrParamMinLen("InputLossImageColor", 6)) - } - if s.InputLossImageSlate != nil { - if err := s.InputLossImageSlate.Validate(); err != nil { - invalidParams.AddNested("InputLossImageSlate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBlackFrameMsec sets the BlackFrameMsec field's value. -func (s *InputLossBehavior) SetBlackFrameMsec(v int64) *InputLossBehavior { - s.BlackFrameMsec = &v - return s -} - -// SetInputLossImageColor sets the InputLossImageColor field's value. -func (s *InputLossBehavior) SetInputLossImageColor(v string) *InputLossBehavior { - s.InputLossImageColor = &v - return s -} - -// SetInputLossImageSlate sets the InputLossImageSlate field's value. -func (s *InputLossBehavior) SetInputLossImageSlate(v *InputLocation) *InputLossBehavior { - s.InputLossImageSlate = v - return s -} - -// SetInputLossImageType sets the InputLossImageType field's value. -func (s *InputLossBehavior) SetInputLossImageType(v string) *InputLossBehavior { - s.InputLossImageType = &v - return s -} - -// SetRepeatFrameMsec sets the RepeatFrameMsec field's value. -func (s *InputLossBehavior) SetRepeatFrameMsec(v int64) *InputLossBehavior { - s.RepeatFrameMsec = &v - return s -} - -// An Input Security Group -type InputSecurityGroup struct { - _ struct{} `type:"structure"` - - // Unique ARN of Input Security Group - Arn *string `locationName:"arn" type:"string"` - - // The Id of the Input Security Group - Id *string `locationName:"id" type:"string"` - - // The list of inputs currently using this Input Security Group. - Inputs []*string `locationName:"inputs" type:"list"` - - // The current state of the Input Security Group. - State *string `locationName:"state" type:"string" enum:"InputSecurityGroupState"` - - // Whitelist rules and their sync status - WhitelistRules []*InputWhitelistRule `locationName:"whitelistRules" type:"list"` -} - -// String returns the string representation -func (s InputSecurityGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputSecurityGroup) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *InputSecurityGroup) SetArn(v string) *InputSecurityGroup { - s.Arn = &v - return s -} - -// SetId sets the Id field's value. -func (s *InputSecurityGroup) SetId(v string) *InputSecurityGroup { - s.Id = &v - return s -} - -// SetInputs sets the Inputs field's value. -func (s *InputSecurityGroup) SetInputs(v []*string) *InputSecurityGroup { - s.Inputs = v - return s -} - -// SetState sets the State field's value. -func (s *InputSecurityGroup) SetState(v string) *InputSecurityGroup { - s.State = &v - return s -} - -// SetWhitelistRules sets the WhitelistRules field's value. -func (s *InputSecurityGroup) SetWhitelistRules(v []*InputWhitelistRule) *InputSecurityGroup { - s.WhitelistRules = v - return s -} - -// Live Event input parameters. There can be multiple inputs in a single Live -// Event. -type InputSettings struct { - _ struct{} `type:"structure"` - - // Used to select the audio stream to decode for inputs that have multiple available. - AudioSelectors []*AudioSelector `locationName:"audioSelectors" type:"list"` - - // Used to select the caption input to use for inputs that have multiple available. - CaptionSelectors []*CaptionSelector `locationName:"captionSelectors" type:"list"` - - // Enable or disable the deblock filter when filtering. - DeblockFilter *string `locationName:"deblockFilter" type:"string" enum:"InputDeblockFilter"` - - // Enable or disable the denoise filter when filtering. - DenoiseFilter *string `locationName:"denoiseFilter" type:"string" enum:"InputDenoiseFilter"` - - // Adjusts the magnitude of filtering from 1 (minimal) to 5 (strongest). - FilterStrength *int64 `locationName:"filterStrength" min:"1" type:"integer"` - - // Turns on the filter for this input. MPEG-2 inputs have the deblocking filter - // enabled by default.1) auto - filtering will be applied depending on input - // type/quality2) disabled - no filtering will be applied to the input3) forced - // - filtering will be applied regardless of input type - InputFilter *string `locationName:"inputFilter" type:"string" enum:"InputFilter"` - - // Input settings. - NetworkInputSettings *NetworkInputSettings `locationName:"networkInputSettings" type:"structure"` - - // Loop input if it is a file. This allows a file input to be streamed indefinitely. - SourceEndBehavior *string `locationName:"sourceEndBehavior" type:"string" enum:"InputSourceEndBehavior"` - - // Informs which video elementary stream to decode for input types that have - // multiple available. - VideoSelector *VideoSelector `locationName:"videoSelector" type:"structure"` -} - -// String returns the string representation -func (s InputSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputSettings"} - if s.FilterStrength != nil && *s.FilterStrength < 1 { - invalidParams.Add(request.NewErrParamMinValue("FilterStrength", 1)) - } - if s.AudioSelectors != nil { - for i, v := range s.AudioSelectors { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AudioSelectors", i), err.(request.ErrInvalidParams)) - } - } - } - if s.CaptionSelectors != nil { - for i, v := range s.CaptionSelectors { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionSelectors", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioSelectors sets the AudioSelectors field's value. -func (s *InputSettings) SetAudioSelectors(v []*AudioSelector) *InputSettings { - s.AudioSelectors = v - return s -} - -// SetCaptionSelectors sets the CaptionSelectors field's value. -func (s *InputSettings) SetCaptionSelectors(v []*CaptionSelector) *InputSettings { - s.CaptionSelectors = v - return s -} - -// SetDeblockFilter sets the DeblockFilter field's value. -func (s *InputSettings) SetDeblockFilter(v string) *InputSettings { - s.DeblockFilter = &v - return s -} - -// SetDenoiseFilter sets the DenoiseFilter field's value. -func (s *InputSettings) SetDenoiseFilter(v string) *InputSettings { - s.DenoiseFilter = &v - return s -} - -// SetFilterStrength sets the FilterStrength field's value. -func (s *InputSettings) SetFilterStrength(v int64) *InputSettings { - s.FilterStrength = &v - return s -} - -// SetInputFilter sets the InputFilter field's value. -func (s *InputSettings) SetInputFilter(v string) *InputSettings { - s.InputFilter = &v - return s -} - -// SetNetworkInputSettings sets the NetworkInputSettings field's value. -func (s *InputSettings) SetNetworkInputSettings(v *NetworkInputSettings) *InputSettings { - s.NetworkInputSettings = v - return s -} - -// SetSourceEndBehavior sets the SourceEndBehavior field's value. -func (s *InputSettings) SetSourceEndBehavior(v string) *InputSettings { - s.SourceEndBehavior = &v - return s -} - -// SetVideoSelector sets the VideoSelector field's value. -func (s *InputSettings) SetVideoSelector(v *VideoSelector) *InputSettings { - s.VideoSelector = v - return s -} - -// The settings for a PULL type input. -type InputSource struct { - _ struct{} `type:"structure"` - - // The key used to extract the password from EC2 Parameter store. - PasswordParam *string `locationName:"passwordParam" type:"string"` - - // This represents the customer's source URL where stream ispulled from. - Url *string `locationName:"url" type:"string"` - - // The username for the input source. - Username *string `locationName:"username" type:"string"` -} - -// String returns the string representation -func (s InputSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputSource) GoString() string { - return s.String() -} - -// SetPasswordParam sets the PasswordParam field's value. -func (s *InputSource) SetPasswordParam(v string) *InputSource { - s.PasswordParam = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *InputSource) SetUrl(v string) *InputSource { - s.Url = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *InputSource) SetUsername(v string) *InputSource { - s.Username = &v - return s -} - -// Settings for for a PULL type input. -type InputSourceRequest struct { - _ struct{} `type:"structure"` - - // The key used to extract the password from EC2 Parameter store. - PasswordParam *string `locationName:"passwordParam" type:"string"` - - // This represents the customer's source URL where stream ispulled from. - Url *string `locationName:"url" type:"string"` - - // The username for the input source. - Username *string `locationName:"username" type:"string"` -} - -// String returns the string representation -func (s InputSourceRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputSourceRequest) GoString() string { - return s.String() -} - -// SetPasswordParam sets the PasswordParam field's value. -func (s *InputSourceRequest) SetPasswordParam(v string) *InputSourceRequest { - s.PasswordParam = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *InputSourceRequest) SetUrl(v string) *InputSourceRequest { - s.Url = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *InputSourceRequest) SetUsername(v string) *InputSourceRequest { - s.Username = &v - return s -} - -type InputSpecification struct { - _ struct{} `type:"structure"` - - // Input codec - Codec *string `locationName:"codec" type:"string" enum:"InputCodec"` - - // Maximum input bitrate, categorized coarsely - MaximumBitrate *string `locationName:"maximumBitrate" type:"string" enum:"InputMaximumBitrate"` - - // Input resolution, categorized coarsely - Resolution *string `locationName:"resolution" type:"string" enum:"InputResolution"` -} - -// String returns the string representation -func (s InputSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputSpecification) GoString() string { - return s.String() -} - -// SetCodec sets the Codec field's value. -func (s *InputSpecification) SetCodec(v string) *InputSpecification { - s.Codec = &v - return s -} - -// SetMaximumBitrate sets the MaximumBitrate field's value. -func (s *InputSpecification) SetMaximumBitrate(v string) *InputSpecification { - s.MaximumBitrate = &v - return s -} - -// SetResolution sets the Resolution field's value. -func (s *InputSpecification) SetResolution(v string) *InputSpecification { - s.Resolution = &v - return s -} - -// Settings for the action to switch an input. -type InputSwitchScheduleActionSettings struct { - _ struct{} `type:"structure"` - - // The name of the input attachment that should be switched to by this action. - // - // InputAttachmentNameReference is a required field - InputAttachmentNameReference *string `locationName:"inputAttachmentNameReference" type:"string" required:"true"` -} - -// String returns the string representation -func (s InputSwitchScheduleActionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputSwitchScheduleActionSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputSwitchScheduleActionSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputSwitchScheduleActionSettings"} - if s.InputAttachmentNameReference == nil { - invalidParams.Add(request.NewErrParamRequired("InputAttachmentNameReference")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputAttachmentNameReference sets the InputAttachmentNameReference field's value. -func (s *InputSwitchScheduleActionSettings) SetInputAttachmentNameReference(v string) *InputSwitchScheduleActionSettings { - s.InputAttachmentNameReference = &v - return s -} - -// Whitelist rule -type InputWhitelistRule struct { - _ struct{} `type:"structure"` - - // The IPv4 CIDR that's whitelisted. - Cidr *string `locationName:"cidr" type:"string"` -} - -// String returns the string representation -func (s InputWhitelistRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputWhitelistRule) GoString() string { - return s.String() -} - -// SetCidr sets the Cidr field's value. -func (s *InputWhitelistRule) SetCidr(v string) *InputWhitelistRule { - s.Cidr = &v - return s -} - -// An IPv4 CIDR to whitelist. -type InputWhitelistRuleCidr struct { - _ struct{} `type:"structure"` - - // The IPv4 CIDR to whitelist. - Cidr *string `locationName:"cidr" type:"string"` -} - -// String returns the string representation -func (s InputWhitelistRuleCidr) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputWhitelistRuleCidr) GoString() string { - return s.String() -} - -// SetCidr sets the Cidr field's value. -func (s *InputWhitelistRuleCidr) SetCidr(v string) *InputWhitelistRuleCidr { - s.Cidr = &v - return s -} - -type KeyProviderSettings struct { - _ struct{} `type:"structure"` - - StaticKeySettings *StaticKeySettings `locationName:"staticKeySettings" type:"structure"` -} - -// String returns the string representation -func (s KeyProviderSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KeyProviderSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KeyProviderSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KeyProviderSettings"} - if s.StaticKeySettings != nil { - if err := s.StaticKeySettings.Validate(); err != nil { - invalidParams.AddNested("StaticKeySettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStaticKeySettings sets the StaticKeySettings field's value. -func (s *KeyProviderSettings) SetStaticKeySettings(v *StaticKeySettings) *KeyProviderSettings { - s.StaticKeySettings = v - return s -} - -type ListChannelsInput struct { - _ struct{} `type:"structure"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListChannelsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListChannelsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListChannelsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListChannelsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListChannelsInput) SetMaxResults(v int64) *ListChannelsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListChannelsInput) SetNextToken(v string) *ListChannelsInput { - s.NextToken = &v - return s -} - -type ListChannelsOutput struct { - _ struct{} `type:"structure"` - - Channels []*ChannelSummary `locationName:"channels" type:"list"` - - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListChannelsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListChannelsOutput) GoString() string { - return s.String() -} - -// SetChannels sets the Channels field's value. -func (s *ListChannelsOutput) SetChannels(v []*ChannelSummary) *ListChannelsOutput { - s.Channels = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListChannelsOutput) SetNextToken(v string) *ListChannelsOutput { - s.NextToken = &v - return s -} - -type ListInputSecurityGroupsInput struct { - _ struct{} `type:"structure"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListInputSecurityGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInputSecurityGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInputSecurityGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInputSecurityGroupsInput"} - 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 *ListInputSecurityGroupsInput) SetMaxResults(v int64) *ListInputSecurityGroupsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListInputSecurityGroupsInput) SetNextToken(v string) *ListInputSecurityGroupsInput { - s.NextToken = &v - return s -} - -type ListInputSecurityGroupsOutput struct { - _ struct{} `type:"structure"` - - InputSecurityGroups []*InputSecurityGroup `locationName:"inputSecurityGroups" type:"list"` - - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListInputSecurityGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInputSecurityGroupsOutput) GoString() string { - return s.String() -} - -// SetInputSecurityGroups sets the InputSecurityGroups field's value. -func (s *ListInputSecurityGroupsOutput) SetInputSecurityGroups(v []*InputSecurityGroup) *ListInputSecurityGroupsOutput { - s.InputSecurityGroups = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListInputSecurityGroupsOutput) SetNextToken(v string) *ListInputSecurityGroupsOutput { - s.NextToken = &v - return s -} - -type ListInputsInput struct { - _ struct{} `type:"structure"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListInputsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInputsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInputsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInputsInput"} - 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 *ListInputsInput) SetMaxResults(v int64) *ListInputsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListInputsInput) SetNextToken(v string) *ListInputsInput { - s.NextToken = &v - return s -} - -type ListInputsOutput struct { - _ struct{} `type:"structure"` - - Inputs []*Input `locationName:"inputs" type:"list"` - - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListInputsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInputsOutput) GoString() string { - return s.String() -} - -// SetInputs sets the Inputs field's value. -func (s *ListInputsOutput) SetInputs(v []*Input) *ListInputsOutput { - s.Inputs = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListInputsOutput) SetNextToken(v string) *ListInputsOutput { - s.NextToken = &v - return s -} - -type ListOfferingsInput struct { - _ struct{} `type:"structure"` - - ChannelConfiguration *string `location:"querystring" locationName:"channelConfiguration" type:"string"` - - Codec *string `location:"querystring" locationName:"codec" type:"string"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - MaximumBitrate *string `location:"querystring" locationName:"maximumBitrate" type:"string"` - - MaximumFramerate *string `location:"querystring" locationName:"maximumFramerate" type:"string"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - Resolution *string `location:"querystring" locationName:"resolution" type:"string"` - - ResourceType *string `location:"querystring" locationName:"resourceType" type:"string"` - - SpecialFeature *string `location:"querystring" locationName:"specialFeature" type:"string"` - - VideoQuality *string `location:"querystring" locationName:"videoQuality" type:"string"` -} - -// String returns the string representation -func (s ListOfferingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOfferingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListOfferingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOfferingsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChannelConfiguration sets the ChannelConfiguration field's value. -func (s *ListOfferingsInput) SetChannelConfiguration(v string) *ListOfferingsInput { - s.ChannelConfiguration = &v - return s -} - -// SetCodec sets the Codec field's value. -func (s *ListOfferingsInput) SetCodec(v string) *ListOfferingsInput { - s.Codec = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListOfferingsInput) SetMaxResults(v int64) *ListOfferingsInput { - s.MaxResults = &v - return s -} - -// SetMaximumBitrate sets the MaximumBitrate field's value. -func (s *ListOfferingsInput) SetMaximumBitrate(v string) *ListOfferingsInput { - s.MaximumBitrate = &v - return s -} - -// SetMaximumFramerate sets the MaximumFramerate field's value. -func (s *ListOfferingsInput) SetMaximumFramerate(v string) *ListOfferingsInput { - s.MaximumFramerate = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOfferingsInput) SetNextToken(v string) *ListOfferingsInput { - s.NextToken = &v - return s -} - -// SetResolution sets the Resolution field's value. -func (s *ListOfferingsInput) SetResolution(v string) *ListOfferingsInput { - s.Resolution = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ListOfferingsInput) SetResourceType(v string) *ListOfferingsInput { - s.ResourceType = &v - return s -} - -// SetSpecialFeature sets the SpecialFeature field's value. -func (s *ListOfferingsInput) SetSpecialFeature(v string) *ListOfferingsInput { - s.SpecialFeature = &v - return s -} - -// SetVideoQuality sets the VideoQuality field's value. -func (s *ListOfferingsInput) SetVideoQuality(v string) *ListOfferingsInput { - s.VideoQuality = &v - return s -} - -type ListOfferingsOutput struct { - _ struct{} `type:"structure"` - - NextToken *string `locationName:"nextToken" type:"string"` - - Offerings []*Offering `locationName:"offerings" type:"list"` -} - -// String returns the string representation -func (s ListOfferingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOfferingsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOfferingsOutput) SetNextToken(v string) *ListOfferingsOutput { - s.NextToken = &v - return s -} - -// SetOfferings sets the Offerings field's value. -func (s *ListOfferingsOutput) SetOfferings(v []*Offering) *ListOfferingsOutput { - s.Offerings = v - return s -} - -type ListReservationsInput struct { - _ struct{} `type:"structure"` - - Codec *string `location:"querystring" locationName:"codec" type:"string"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - MaximumBitrate *string `location:"querystring" locationName:"maximumBitrate" type:"string"` - - MaximumFramerate *string `location:"querystring" locationName:"maximumFramerate" type:"string"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - Resolution *string `location:"querystring" locationName:"resolution" type:"string"` - - ResourceType *string `location:"querystring" locationName:"resourceType" type:"string"` - - SpecialFeature *string `location:"querystring" locationName:"specialFeature" type:"string"` - - VideoQuality *string `location:"querystring" locationName:"videoQuality" type:"string"` -} - -// String returns the string representation -func (s ListReservationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListReservationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListReservationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListReservationsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCodec sets the Codec field's value. -func (s *ListReservationsInput) SetCodec(v string) *ListReservationsInput { - s.Codec = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListReservationsInput) SetMaxResults(v int64) *ListReservationsInput { - s.MaxResults = &v - return s -} - -// SetMaximumBitrate sets the MaximumBitrate field's value. -func (s *ListReservationsInput) SetMaximumBitrate(v string) *ListReservationsInput { - s.MaximumBitrate = &v - return s -} - -// SetMaximumFramerate sets the MaximumFramerate field's value. -func (s *ListReservationsInput) SetMaximumFramerate(v string) *ListReservationsInput { - s.MaximumFramerate = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListReservationsInput) SetNextToken(v string) *ListReservationsInput { - s.NextToken = &v - return s -} - -// SetResolution sets the Resolution field's value. -func (s *ListReservationsInput) SetResolution(v string) *ListReservationsInput { - s.Resolution = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ListReservationsInput) SetResourceType(v string) *ListReservationsInput { - s.ResourceType = &v - return s -} - -// SetSpecialFeature sets the SpecialFeature field's value. -func (s *ListReservationsInput) SetSpecialFeature(v string) *ListReservationsInput { - s.SpecialFeature = &v - return s -} - -// SetVideoQuality sets the VideoQuality field's value. -func (s *ListReservationsInput) SetVideoQuality(v string) *ListReservationsInput { - s.VideoQuality = &v - return s -} - -type ListReservationsOutput struct { - _ struct{} `type:"structure"` - - NextToken *string `locationName:"nextToken" type:"string"` - - Reservations []*Reservation `locationName:"reservations" type:"list"` -} - -// String returns the string representation -func (s ListReservationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListReservationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListReservationsOutput) SetNextToken(v string) *ListReservationsOutput { - s.NextToken = &v - return s -} - -// SetReservations sets the Reservations field's value. -func (s *ListReservationsOutput) SetReservations(v []*Reservation) *ListReservationsOutput { - s.Reservations = v - return s -} - -type M2tsSettings struct { - _ struct{} `type:"structure"` - - // When set to drop, output audio streams will be removed from the program if - // the selected input audio stream is removed from the input. This allows the - // output audio configuration to dynamically change based on input configuration. - // If this is set to encodeSilence, all output audio streams will output encoded - // silence when not connected to an active input stream. - AbsentInputAudioBehavior *string `locationName:"absentInputAudioBehavior" type:"string" enum:"M2tsAbsentInputAudioBehavior"` - - // When set to enabled, uses ARIB-compliant field muxing and removes video descriptor. - Arib *string `locationName:"arib" type:"string" enum:"M2tsArib"` - - // Packet Identifier (PID) for ARIB Captions in the transport stream. Can be - // entered as a decimal or hexadecimal value. Valid values are 32 (or 0x20)..8182 - // (or 0x1ff6). - AribCaptionsPid *string `locationName:"aribCaptionsPid" type:"string"` - - // If set to auto, pid number used for ARIB Captions will be auto-selected from - // unused pids. If set to useConfigured, ARIB Captions will be on the configured - // pid number. - AribCaptionsPidControl *string `locationName:"aribCaptionsPidControl" type:"string" enum:"M2tsAribCaptionsPidControl"` - - // When set to dvb, uses DVB buffer model for Dolby Digital audio. When set - // to atsc, the ATSC model is used. - AudioBufferModel *string `locationName:"audioBufferModel" type:"string" enum:"M2tsAudioBufferModel"` - - // The number of audio frames to insert for each PES packet. - AudioFramesPerPes *int64 `locationName:"audioFramesPerPes" type:"integer"` - - // Packet Identifier (PID) of the elementary audio stream(s) in the transport - // stream. Multiple values are accepted, and can be entered in ranges and/or - // by comma separation. Can be entered as decimal or hexadecimal values. Each - // PID specified must be in the range of 32 (or 0x20)..8182 (or 0x1ff6). - AudioPids *string `locationName:"audioPids" type:"string"` - - // When set to atsc, uses stream type = 0x81 for AC3 and stream type = 0x87 - // for EAC3. When set to dvb, uses stream type = 0x06. - AudioStreamType *string `locationName:"audioStreamType" type:"string" enum:"M2tsAudioStreamType"` - - // The output bitrate of the transport stream in bits per second. Setting to - // 0 lets the muxer automatically determine the appropriate bitrate. - Bitrate *int64 `locationName:"bitrate" type:"integer"` - - // If set to multiplex, use multiplex buffer model for accurate interleaving. - // Setting to bufferModel to none can lead to lower latency, but low-memory - // devices may not be able to play back the stream without interruptions. - BufferModel *string `locationName:"bufferModel" type:"string" enum:"M2tsBufferModel"` - - // When set to enabled, generates captionServiceDescriptor in PMT. - CcDescriptor *string `locationName:"ccDescriptor" type:"string" enum:"M2tsCcDescriptor"` - - // Inserts DVB Network Information Table (NIT) at the specified table repetition - // interval. - DvbNitSettings *DvbNitSettings `locationName:"dvbNitSettings" type:"structure"` - - // Inserts DVB Service Description Table (SDT) at the specified table repetition - // interval. - DvbSdtSettings *DvbSdtSettings `locationName:"dvbSdtSettings" type:"structure"` - - // Packet Identifier (PID) for input source DVB Subtitle data to this output. - // Multiple values are accepted, and can be entered in ranges and/or by comma - // separation. Can be entered as decimal or hexadecimal values. Each PID specified - // must be in the range of 32 (or 0x20)..8182 (or 0x1ff6). - DvbSubPids *string `locationName:"dvbSubPids" type:"string"` - - // Inserts DVB Time and Date Table (TDT) at the specified table repetition interval. - DvbTdtSettings *DvbTdtSettings `locationName:"dvbTdtSettings" type:"structure"` - - // Packet Identifier (PID) for input source DVB Teletext data to this output. - // Can be entered as a decimal or hexadecimal value. Valid values are 32 (or - // 0x20)..8182 (or 0x1ff6). - DvbTeletextPid *string `locationName:"dvbTeletextPid" type:"string"` - - // If set to passthrough, passes any EBIF data from the input source to this - // output. - Ebif *string `locationName:"ebif" type:"string" enum:"M2tsEbifControl"` - - // When videoAndFixedIntervals is selected, audio EBP markers will be added - // to partitions 3 and 4. The interval between these additional markers will - // be fixed, and will be slightly shorter than the video EBP marker interval. - // Only available when EBP Cablelabs segmentation markers are selected. Partitions - // 1 and 2 will always follow the video interval. - EbpAudioInterval *string `locationName:"ebpAudioInterval" type:"string" enum:"M2tsAudioInterval"` - - // When set, enforces that Encoder Boundary Points do not come within the specified - // time interval of each other by looking ahead at input video. If another EBP - // is going to come in within the specified time interval, the current EBP is - // not emitted, and the segment is "stretched" to the next marker. The lookahead - // value does not add latency to the system. The Live Event must be configured - // elsewhere to create sufficient latency to make the lookahead accurate. - EbpLookaheadMs *int64 `locationName:"ebpLookaheadMs" type:"integer"` - - // Controls placement of EBP on Audio PIDs. If set to videoAndAudioPids, EBP - // markers will be placed on the video PID and all audio PIDs. If set to videoPid, - // EBP markers will be placed on only the video PID. - EbpPlacement *string `locationName:"ebpPlacement" type:"string" enum:"M2tsEbpPlacement"` - - // This field is unused and deprecated. - EcmPid *string `locationName:"ecmPid" type:"string"` - - // Include or exclude the ES Rate field in the PES header. - EsRateInPes *string `locationName:"esRateInPes" type:"string" enum:"M2tsEsRateInPes"` - - // Packet Identifier (PID) for input source ETV Platform data to this output. - // Can be entered as a decimal or hexadecimal value. Valid values are 32 (or - // 0x20)..8182 (or 0x1ff6). - EtvPlatformPid *string `locationName:"etvPlatformPid" type:"string"` - - // Packet Identifier (PID) for input source ETV Signal data to this output. - // Can be entered as a decimal or hexadecimal value. Valid values are 32 (or - // 0x20)..8182 (or 0x1ff6). - EtvSignalPid *string `locationName:"etvSignalPid" type:"string"` - - // The length in seconds of each fragment. Only used with EBP markers. - FragmentTime *float64 `locationName:"fragmentTime" type:"double"` - - // If set to passthrough, passes any KLV data from the input source to this - // output. - Klv *string `locationName:"klv" type:"string" enum:"M2tsKlv"` - - // Packet Identifier (PID) for input source KLV data to this output. Multiple - // values are accepted, and can be entered in ranges and/or by comma separation. - // Can be entered as decimal or hexadecimal values. Each PID specified must - // be in the range of 32 (or 0x20)..8182 (or 0x1ff6). - KlvDataPids *string `locationName:"klvDataPids" type:"string"` - - // Value in bits per second of extra null packets to insert into the transport - // stream. This can be used if a downstream encryption system requires periodic - // null packets. - NullPacketBitrate *float64 `locationName:"nullPacketBitrate" type:"double"` - - // The number of milliseconds between instances of this table in the output - // transport stream. Valid values are 0, 10..1000. - PatInterval *int64 `locationName:"patInterval" type:"integer"` - - // When set to pcrEveryPesPacket, a Program Clock Reference value is inserted - // for every Packetized Elementary Stream (PES) header. This parameter is effective - // only when the PCR PID is the same as the video or audio elementary stream. - PcrControl *string `locationName:"pcrControl" type:"string" enum:"M2tsPcrControl"` - - // Maximum time in milliseconds between Program Clock Reference (PCRs) inserted - // into the transport stream. - PcrPeriod *int64 `locationName:"pcrPeriod" type:"integer"` - - // Packet Identifier (PID) of the Program Clock Reference (PCR) in the transport - // stream. When no value is given, the encoder will assign the same value as - // the Video PID. Can be entered as a decimal or hexadecimal value. Valid values - // are 32 (or 0x20)..8182 (or 0x1ff6). - PcrPid *string `locationName:"pcrPid" type:"string"` - - // The number of milliseconds between instances of this table in the output - // transport stream. Valid values are 0, 10..1000. - PmtInterval *int64 `locationName:"pmtInterval" type:"integer"` - - // Packet Identifier (PID) for the Program Map Table (PMT) in the transport - // stream. Can be entered as a decimal or hexadecimal value. Valid values are - // 32 (or 0x20)..8182 (or 0x1ff6). - PmtPid *string `locationName:"pmtPid" type:"string"` - - // The value of the program number field in the Program Map Table. - ProgramNum *int64 `locationName:"programNum" type:"integer"` - - // When vbr, does not insert null packets into transport stream to fill specified - // bitrate. The bitrate setting acts as the maximum bitrate when vbr is set. - RateMode *string `locationName:"rateMode" type:"string" enum:"M2tsRateMode"` - - // Packet Identifier (PID) for input source SCTE-27 data to this output. Multiple - // values are accepted, and can be entered in ranges and/or by comma separation. - // Can be entered as decimal or hexadecimal values. Each PID specified must - // be in the range of 32 (or 0x20)..8182 (or 0x1ff6). - Scte27Pids *string `locationName:"scte27Pids" type:"string"` - - // Optionally pass SCTE-35 signals from the input source to this output. - Scte35Control *string `locationName:"scte35Control" type:"string" enum:"M2tsScte35Control"` - - // Packet Identifier (PID) of the SCTE-35 stream in the transport stream. Can - // be entered as a decimal or hexadecimal value. Valid values are 32 (or 0x20)..8182 - // (or 0x1ff6). - Scte35Pid *string `locationName:"scte35Pid" type:"string"` - - // Inserts segmentation markers at each segmentationTime period. raiSegstart - // sets the Random Access Indicator bit in the adaptation field. raiAdapt sets - // the RAI bit and adds the current timecode in the private data bytes. psiSegstart - // inserts PAT and PMT tables at the start of segments. ebp adds Encoder Boundary - // Point information to the adaptation field as per OpenCable specification - // OC-SP-EBP-I01-130118. ebpLegacy adds Encoder Boundary Point information to - // the adaptation field using a legacy proprietary format. - SegmentationMarkers *string `locationName:"segmentationMarkers" type:"string" enum:"M2tsSegmentationMarkers"` - - // The segmentation style parameter controls how segmentation markers are inserted - // into the transport stream. With avails, it is possible that segments may - // be truncated, which can influence where future segmentation markers are inserted.When - // a segmentation style of "resetCadence" is selected and a segment is truncated - // due to an avail, we will reset the segmentation cadence. This means the subsequent - // segment will have a duration of $segmentationTime seconds.When a segmentation - // style of "maintainCadence" is selected and a segment is truncated due to - // an avail, we will not reset the segmentation cadence. This means the subsequent - // segment will likely be truncated as well. However, all segments after that - // will have a duration of $segmentationTime seconds. Note that EBP lookahead - // is a slight exception to this rule. - SegmentationStyle *string `locationName:"segmentationStyle" type:"string" enum:"M2tsSegmentationStyle"` - - // The length in seconds of each segment. Required unless markers is set to - // None_. - SegmentationTime *float64 `locationName:"segmentationTime" type:"double"` - - // When set to passthrough, timed metadata will be passed through from input - // to output. - TimedMetadataBehavior *string `locationName:"timedMetadataBehavior" type:"string" enum:"M2tsTimedMetadataBehavior"` - - // Packet Identifier (PID) of the timed metadata stream in the transport stream. - // Can be entered as a decimal or hexadecimal value. Valid values are 32 (or - // 0x20)..8182 (or 0x1ff6). - TimedMetadataPid *string `locationName:"timedMetadataPid" type:"string"` - - // The value of the transport stream ID field in the Program Map Table. - TransportStreamId *int64 `locationName:"transportStreamId" type:"integer"` - - // Packet Identifier (PID) of the elementary video stream in the transport stream. - // Can be entered as a decimal or hexadecimal value. Valid values are 32 (or - // 0x20)..8182 (or 0x1ff6). - VideoPid *string `locationName:"videoPid" type:"string"` -} - -// String returns the string representation -func (s M2tsSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s M2tsSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *M2tsSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "M2tsSettings"} - if s.DvbNitSettings != nil { - if err := s.DvbNitSettings.Validate(); err != nil { - invalidParams.AddNested("DvbNitSettings", err.(request.ErrInvalidParams)) - } - } - if s.DvbSdtSettings != nil { - if err := s.DvbSdtSettings.Validate(); err != nil { - invalidParams.AddNested("DvbSdtSettings", err.(request.ErrInvalidParams)) - } - } - if s.DvbTdtSettings != nil { - if err := s.DvbTdtSettings.Validate(); err != nil { - invalidParams.AddNested("DvbTdtSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAbsentInputAudioBehavior sets the AbsentInputAudioBehavior field's value. -func (s *M2tsSettings) SetAbsentInputAudioBehavior(v string) *M2tsSettings { - s.AbsentInputAudioBehavior = &v - return s -} - -// SetArib sets the Arib field's value. -func (s *M2tsSettings) SetArib(v string) *M2tsSettings { - s.Arib = &v - return s -} - -// SetAribCaptionsPid sets the AribCaptionsPid field's value. -func (s *M2tsSettings) SetAribCaptionsPid(v string) *M2tsSettings { - s.AribCaptionsPid = &v - return s -} - -// SetAribCaptionsPidControl sets the AribCaptionsPidControl field's value. -func (s *M2tsSettings) SetAribCaptionsPidControl(v string) *M2tsSettings { - s.AribCaptionsPidControl = &v - return s -} - -// SetAudioBufferModel sets the AudioBufferModel field's value. -func (s *M2tsSettings) SetAudioBufferModel(v string) *M2tsSettings { - s.AudioBufferModel = &v - return s -} - -// SetAudioFramesPerPes sets the AudioFramesPerPes field's value. -func (s *M2tsSettings) SetAudioFramesPerPes(v int64) *M2tsSettings { - s.AudioFramesPerPes = &v - return s -} - -// SetAudioPids sets the AudioPids field's value. -func (s *M2tsSettings) SetAudioPids(v string) *M2tsSettings { - s.AudioPids = &v - return s -} - -// SetAudioStreamType sets the AudioStreamType field's value. -func (s *M2tsSettings) SetAudioStreamType(v string) *M2tsSettings { - s.AudioStreamType = &v - return s -} - -// SetBitrate sets the Bitrate field's value. -func (s *M2tsSettings) SetBitrate(v int64) *M2tsSettings { - s.Bitrate = &v - return s -} - -// SetBufferModel sets the BufferModel field's value. -func (s *M2tsSettings) SetBufferModel(v string) *M2tsSettings { - s.BufferModel = &v - return s -} - -// SetCcDescriptor sets the CcDescriptor field's value. -func (s *M2tsSettings) SetCcDescriptor(v string) *M2tsSettings { - s.CcDescriptor = &v - return s -} - -// SetDvbNitSettings sets the DvbNitSettings field's value. -func (s *M2tsSettings) SetDvbNitSettings(v *DvbNitSettings) *M2tsSettings { - s.DvbNitSettings = v - return s -} - -// SetDvbSdtSettings sets the DvbSdtSettings field's value. -func (s *M2tsSettings) SetDvbSdtSettings(v *DvbSdtSettings) *M2tsSettings { - s.DvbSdtSettings = v - return s -} - -// SetDvbSubPids sets the DvbSubPids field's value. -func (s *M2tsSettings) SetDvbSubPids(v string) *M2tsSettings { - s.DvbSubPids = &v - return s -} - -// SetDvbTdtSettings sets the DvbTdtSettings field's value. -func (s *M2tsSettings) SetDvbTdtSettings(v *DvbTdtSettings) *M2tsSettings { - s.DvbTdtSettings = v - return s -} - -// SetDvbTeletextPid sets the DvbTeletextPid field's value. -func (s *M2tsSettings) SetDvbTeletextPid(v string) *M2tsSettings { - s.DvbTeletextPid = &v - return s -} - -// SetEbif sets the Ebif field's value. -func (s *M2tsSettings) SetEbif(v string) *M2tsSettings { - s.Ebif = &v - return s -} - -// SetEbpAudioInterval sets the EbpAudioInterval field's value. -func (s *M2tsSettings) SetEbpAudioInterval(v string) *M2tsSettings { - s.EbpAudioInterval = &v - return s -} - -// SetEbpLookaheadMs sets the EbpLookaheadMs field's value. -func (s *M2tsSettings) SetEbpLookaheadMs(v int64) *M2tsSettings { - s.EbpLookaheadMs = &v - return s -} - -// SetEbpPlacement sets the EbpPlacement field's value. -func (s *M2tsSettings) SetEbpPlacement(v string) *M2tsSettings { - s.EbpPlacement = &v - return s -} - -// SetEcmPid sets the EcmPid field's value. -func (s *M2tsSettings) SetEcmPid(v string) *M2tsSettings { - s.EcmPid = &v - return s -} - -// SetEsRateInPes sets the EsRateInPes field's value. -func (s *M2tsSettings) SetEsRateInPes(v string) *M2tsSettings { - s.EsRateInPes = &v - return s -} - -// SetEtvPlatformPid sets the EtvPlatformPid field's value. -func (s *M2tsSettings) SetEtvPlatformPid(v string) *M2tsSettings { - s.EtvPlatformPid = &v - return s -} - -// SetEtvSignalPid sets the EtvSignalPid field's value. -func (s *M2tsSettings) SetEtvSignalPid(v string) *M2tsSettings { - s.EtvSignalPid = &v - return s -} - -// SetFragmentTime sets the FragmentTime field's value. -func (s *M2tsSettings) SetFragmentTime(v float64) *M2tsSettings { - s.FragmentTime = &v - return s -} - -// SetKlv sets the Klv field's value. -func (s *M2tsSettings) SetKlv(v string) *M2tsSettings { - s.Klv = &v - return s -} - -// SetKlvDataPids sets the KlvDataPids field's value. -func (s *M2tsSettings) SetKlvDataPids(v string) *M2tsSettings { - s.KlvDataPids = &v - return s -} - -// SetNullPacketBitrate sets the NullPacketBitrate field's value. -func (s *M2tsSettings) SetNullPacketBitrate(v float64) *M2tsSettings { - s.NullPacketBitrate = &v - return s -} - -// SetPatInterval sets the PatInterval field's value. -func (s *M2tsSettings) SetPatInterval(v int64) *M2tsSettings { - s.PatInterval = &v - return s -} - -// SetPcrControl sets the PcrControl field's value. -func (s *M2tsSettings) SetPcrControl(v string) *M2tsSettings { - s.PcrControl = &v - return s -} - -// SetPcrPeriod sets the PcrPeriod field's value. -func (s *M2tsSettings) SetPcrPeriod(v int64) *M2tsSettings { - s.PcrPeriod = &v - return s -} - -// SetPcrPid sets the PcrPid field's value. -func (s *M2tsSettings) SetPcrPid(v string) *M2tsSettings { - s.PcrPid = &v - return s -} - -// SetPmtInterval sets the PmtInterval field's value. -func (s *M2tsSettings) SetPmtInterval(v int64) *M2tsSettings { - s.PmtInterval = &v - return s -} - -// SetPmtPid sets the PmtPid field's value. -func (s *M2tsSettings) SetPmtPid(v string) *M2tsSettings { - s.PmtPid = &v - return s -} - -// SetProgramNum sets the ProgramNum field's value. -func (s *M2tsSettings) SetProgramNum(v int64) *M2tsSettings { - s.ProgramNum = &v - return s -} - -// SetRateMode sets the RateMode field's value. -func (s *M2tsSettings) SetRateMode(v string) *M2tsSettings { - s.RateMode = &v - return s -} - -// SetScte27Pids sets the Scte27Pids field's value. -func (s *M2tsSettings) SetScte27Pids(v string) *M2tsSettings { - s.Scte27Pids = &v - return s -} - -// SetScte35Control sets the Scte35Control field's value. -func (s *M2tsSettings) SetScte35Control(v string) *M2tsSettings { - s.Scte35Control = &v - return s -} - -// SetScte35Pid sets the Scte35Pid field's value. -func (s *M2tsSettings) SetScte35Pid(v string) *M2tsSettings { - s.Scte35Pid = &v - return s -} - -// SetSegmentationMarkers sets the SegmentationMarkers field's value. -func (s *M2tsSettings) SetSegmentationMarkers(v string) *M2tsSettings { - s.SegmentationMarkers = &v - return s -} - -// SetSegmentationStyle sets the SegmentationStyle field's value. -func (s *M2tsSettings) SetSegmentationStyle(v string) *M2tsSettings { - s.SegmentationStyle = &v - return s -} - -// SetSegmentationTime sets the SegmentationTime field's value. -func (s *M2tsSettings) SetSegmentationTime(v float64) *M2tsSettings { - s.SegmentationTime = &v - return s -} - -// SetTimedMetadataBehavior sets the TimedMetadataBehavior field's value. -func (s *M2tsSettings) SetTimedMetadataBehavior(v string) *M2tsSettings { - s.TimedMetadataBehavior = &v - return s -} - -// SetTimedMetadataPid sets the TimedMetadataPid field's value. -func (s *M2tsSettings) SetTimedMetadataPid(v string) *M2tsSettings { - s.TimedMetadataPid = &v - return s -} - -// SetTransportStreamId sets the TransportStreamId field's value. -func (s *M2tsSettings) SetTransportStreamId(v int64) *M2tsSettings { - s.TransportStreamId = &v - return s -} - -// SetVideoPid sets the VideoPid field's value. -func (s *M2tsSettings) SetVideoPid(v string) *M2tsSettings { - s.VideoPid = &v - return s -} - -// Settings information for the .m3u8 container -type M3u8Settings struct { - _ struct{} `type:"structure"` - - // The number of audio frames to insert for each PES packet. - AudioFramesPerPes *int64 `locationName:"audioFramesPerPes" type:"integer"` - - // Packet Identifier (PID) of the elementary audio stream(s) in the transport - // stream. Multiple values are accepted, and can be entered in ranges and/or - // by comma separation. Can be entered as decimal or hexadecimal values. - AudioPids *string `locationName:"audioPids" type:"string"` - - // This parameter is unused and deprecated. - EcmPid *string `locationName:"ecmPid" type:"string"` - - // The number of milliseconds between instances of this table in the output - // transport stream. A value of \"0\" writes out the PMT once per segment file. - PatInterval *int64 `locationName:"patInterval" type:"integer"` - - // When set to pcrEveryPesPacket, a Program Clock Reference value is inserted - // for every Packetized Elementary Stream (PES) header. This parameter is effective - // only when the PCR PID is the same as the video or audio elementary stream. - PcrControl *string `locationName:"pcrControl" type:"string" enum:"M3u8PcrControl"` - - // Maximum time in milliseconds between Program Clock References (PCRs) inserted - // into the transport stream. - PcrPeriod *int64 `locationName:"pcrPeriod" type:"integer"` - - // Packet Identifier (PID) of the Program Clock Reference (PCR) in the transport - // stream. When no value is given, the encoder will assign the same value as - // the Video PID. Can be entered as a decimal or hexadecimal value. - PcrPid *string `locationName:"pcrPid" type:"string"` - - // The number of milliseconds between instances of this table in the output - // transport stream. A value of \"0\" writes out the PMT once per segment file. - PmtInterval *int64 `locationName:"pmtInterval" type:"integer"` - - // Packet Identifier (PID) for the Program Map Table (PMT) in the transport - // stream. Can be entered as a decimal or hexadecimal value. - PmtPid *string `locationName:"pmtPid" type:"string"` - - // The value of the program number field in the Program Map Table. - ProgramNum *int64 `locationName:"programNum" type:"integer"` - - // If set to passthrough, passes any SCTE-35 signals from the input source to - // this output. - Scte35Behavior *string `locationName:"scte35Behavior" type:"string" enum:"M3u8Scte35Behavior"` - - // Packet Identifier (PID) of the SCTE-35 stream in the transport stream. Can - // be entered as a decimal or hexadecimal value. - Scte35Pid *string `locationName:"scte35Pid" type:"string"` - - // When set to passthrough, timed metadata is passed through from input to output. - TimedMetadataBehavior *string `locationName:"timedMetadataBehavior" type:"string" enum:"M3u8TimedMetadataBehavior"` - - // Packet Identifier (PID) of the timed metadata stream in the transport stream. - // Can be entered as a decimal or hexadecimal value. Valid values are 32 (or - // 0x20)..8182 (or 0x1ff6). - TimedMetadataPid *string `locationName:"timedMetadataPid" type:"string"` - - // The value of the transport stream ID field in the Program Map Table. - TransportStreamId *int64 `locationName:"transportStreamId" type:"integer"` - - // Packet Identifier (PID) of the elementary video stream in the transport stream. - // Can be entered as a decimal or hexadecimal value. - VideoPid *string `locationName:"videoPid" type:"string"` -} - -// String returns the string representation -func (s M3u8Settings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s M3u8Settings) GoString() string { - return s.String() -} - -// SetAudioFramesPerPes sets the AudioFramesPerPes field's value. -func (s *M3u8Settings) SetAudioFramesPerPes(v int64) *M3u8Settings { - s.AudioFramesPerPes = &v - return s -} - -// SetAudioPids sets the AudioPids field's value. -func (s *M3u8Settings) SetAudioPids(v string) *M3u8Settings { - s.AudioPids = &v - return s -} - -// SetEcmPid sets the EcmPid field's value. -func (s *M3u8Settings) SetEcmPid(v string) *M3u8Settings { - s.EcmPid = &v - return s -} - -// SetPatInterval sets the PatInterval field's value. -func (s *M3u8Settings) SetPatInterval(v int64) *M3u8Settings { - s.PatInterval = &v - return s -} - -// SetPcrControl sets the PcrControl field's value. -func (s *M3u8Settings) SetPcrControl(v string) *M3u8Settings { - s.PcrControl = &v - return s -} - -// SetPcrPeriod sets the PcrPeriod field's value. -func (s *M3u8Settings) SetPcrPeriod(v int64) *M3u8Settings { - s.PcrPeriod = &v - return s -} - -// SetPcrPid sets the PcrPid field's value. -func (s *M3u8Settings) SetPcrPid(v string) *M3u8Settings { - s.PcrPid = &v - return s -} - -// SetPmtInterval sets the PmtInterval field's value. -func (s *M3u8Settings) SetPmtInterval(v int64) *M3u8Settings { - s.PmtInterval = &v - return s -} - -// SetPmtPid sets the PmtPid field's value. -func (s *M3u8Settings) SetPmtPid(v string) *M3u8Settings { - s.PmtPid = &v - return s -} - -// SetProgramNum sets the ProgramNum field's value. -func (s *M3u8Settings) SetProgramNum(v int64) *M3u8Settings { - s.ProgramNum = &v - return s -} - -// SetScte35Behavior sets the Scte35Behavior field's value. -func (s *M3u8Settings) SetScte35Behavior(v string) *M3u8Settings { - s.Scte35Behavior = &v - return s -} - -// SetScte35Pid sets the Scte35Pid field's value. -func (s *M3u8Settings) SetScte35Pid(v string) *M3u8Settings { - s.Scte35Pid = &v - return s -} - -// SetTimedMetadataBehavior sets the TimedMetadataBehavior field's value. -func (s *M3u8Settings) SetTimedMetadataBehavior(v string) *M3u8Settings { - s.TimedMetadataBehavior = &v - return s -} - -// SetTimedMetadataPid sets the TimedMetadataPid field's value. -func (s *M3u8Settings) SetTimedMetadataPid(v string) *M3u8Settings { - s.TimedMetadataPid = &v - return s -} - -// SetTransportStreamId sets the TransportStreamId field's value. -func (s *M3u8Settings) SetTransportStreamId(v int64) *M3u8Settings { - s.TransportStreamId = &v - return s -} - -// SetVideoPid sets the VideoPid field's value. -func (s *M3u8Settings) SetVideoPid(v string) *M3u8Settings { - s.VideoPid = &v - return s -} - -// The settings for a MediaConnect Flow. -type MediaConnectFlow struct { - _ struct{} `type:"structure"` - - // The unique ARN of the MediaConnect Flow being used as a source. - FlowArn *string `locationName:"flowArn" type:"string"` -} - -// String returns the string representation -func (s MediaConnectFlow) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MediaConnectFlow) GoString() string { - return s.String() -} - -// SetFlowArn sets the FlowArn field's value. -func (s *MediaConnectFlow) SetFlowArn(v string) *MediaConnectFlow { - s.FlowArn = &v - return s -} - -// The settings for a MediaConnect Flow. -type MediaConnectFlowRequest struct { - _ struct{} `type:"structure"` - - // The ARN of the MediaConnect Flow that you want to use as a source. - FlowArn *string `locationName:"flowArn" type:"string"` -} - -// String returns the string representation -func (s MediaConnectFlowRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MediaConnectFlowRequest) GoString() string { - return s.String() -} - -// SetFlowArn sets the FlowArn field's value. -func (s *MediaConnectFlowRequest) SetFlowArn(v string) *MediaConnectFlowRequest { - s.FlowArn = &v - return s -} - -type Mp2Settings struct { - _ struct{} `type:"structure"` - - // Average bitrate in bits/second. - Bitrate *float64 `locationName:"bitrate" type:"double"` - - // The MPEG2 Audio coding mode. Valid values are codingMode10 (for mono) or - // codingMode20 (for stereo). - CodingMode *string `locationName:"codingMode" type:"string" enum:"Mp2CodingMode"` - - // Sample rate in Hz. - SampleRate *float64 `locationName:"sampleRate" type:"double"` -} - -// String returns the string representation -func (s Mp2Settings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Mp2Settings) GoString() string { - return s.String() -} - -// SetBitrate sets the Bitrate field's value. -func (s *Mp2Settings) SetBitrate(v float64) *Mp2Settings { - s.Bitrate = &v - return s -} - -// SetCodingMode sets the CodingMode field's value. -func (s *Mp2Settings) SetCodingMode(v string) *Mp2Settings { - s.CodingMode = &v - return s -} - -// SetSampleRate sets the SampleRate field's value. -func (s *Mp2Settings) SetSampleRate(v float64) *Mp2Settings { - s.SampleRate = &v - return s -} - -type MsSmoothGroupSettings struct { - _ struct{} `type:"structure"` - - // The value of the "Acquisition Point Identity" element used in each message - // placed in the sparse track. Only enabled if sparseTrackType is not "none". - AcquisitionPointId *string `locationName:"acquisitionPointId" type:"string"` - - // If set to passthrough for an audio-only MS Smooth output, the fragment absolute - // time will be set to the current timecode. This option does not write timecodes - // to the audio elementary stream. - AudioOnlyTimecodeControl *string `locationName:"audioOnlyTimecodeControl" type:"string" enum:"SmoothGroupAudioOnlyTimecodeControl"` - - // If set to verifyAuthenticity, verify the https certificate chain to a trusted - // Certificate Authority (CA). This will cause https outputs to self-signed - // certificates to fail. - CertificateMode *string `locationName:"certificateMode" type:"string" enum:"SmoothGroupCertificateMode"` - - // Number of seconds to wait before retrying connection to the IIS server if - // the connection is lost. Content will be cached during this time and the cache - // will be be delivered to the IIS server once the connection is re-established. - ConnectionRetryInterval *int64 `locationName:"connectionRetryInterval" type:"integer"` - - // Smooth Streaming publish point on an IIS server. Elemental Live acts as a - // "Push" encoder to IIS. - // - // Destination is a required field - Destination *OutputLocationRef `locationName:"destination" type:"structure" required:"true"` - - // MS Smooth event ID to be sent to the IIS server.Should only be specified - // if eventIdMode is set to useConfigured. - EventId *string `locationName:"eventId" type:"string"` - - // Specifies whether or not to send an event ID to the IIS server. If no event - // ID is sent and the same Live Event is used without changing the publishing - // point, clients might see cached video from the previous run.Options:- "useConfigured" - // - use the value provided in eventId- "useTimestamp" - generate and send an - // event ID based on the current timestamp- "noEventId" - do not send an event - // ID to the IIS server. - EventIdMode *string `locationName:"eventIdMode" type:"string" enum:"SmoothGroupEventIdMode"` - - // When set to sendEos, send EOS signal to IIS server when stopping the event - EventStopBehavior *string `locationName:"eventStopBehavior" type:"string" enum:"SmoothGroupEventStopBehavior"` - - // Size in seconds of file cache for streaming outputs. - FilecacheDuration *int64 `locationName:"filecacheDuration" type:"integer"` - - // Length of mp4 fragments to generate (in seconds). Fragment length must be - // compatible with GOP size and framerate. - FragmentLength *int64 `locationName:"fragmentLength" min:"1" type:"integer"` - - // Parameter that control output group behavior on input loss. - InputLossAction *string `locationName:"inputLossAction" type:"string" enum:"InputLossActionForMsSmoothOut"` - - // Number of retry attempts. - NumRetries *int64 `locationName:"numRetries" type:"integer"` - - // Number of seconds before initiating a restart due to output failure, due - // to exhausting the numRetries on one segment, or exceeding filecacheDuration. - RestartDelay *int64 `locationName:"restartDelay" type:"integer"` - - // useInputSegmentation has been deprecated. The configured segment size is - // always used. - SegmentationMode *string `locationName:"segmentationMode" type:"string" enum:"SmoothGroupSegmentationMode"` - - // Number of milliseconds to delay the output from the second pipeline. - SendDelayMs *int64 `locationName:"sendDelayMs" type:"integer"` - - // If set to scte35, use incoming SCTE-35 messages to generate a sparse track - // in this group of MS-Smooth outputs. - SparseTrackType *string `locationName:"sparseTrackType" type:"string" enum:"SmoothGroupSparseTrackType"` - - // When set to send, send stream manifest so publishing point doesn't start - // until all streams start. - StreamManifestBehavior *string `locationName:"streamManifestBehavior" type:"string" enum:"SmoothGroupStreamManifestBehavior"` - - // Timestamp offset for the event. Only used if timestampOffsetMode is set to - // useConfiguredOffset. - TimestampOffset *string `locationName:"timestampOffset" type:"string"` - - // Type of timestamp date offset to use.- useEventStartDate: Use the date the - // event was started as the offset- useConfiguredOffset: Use an explicitly configured - // date as the offset - TimestampOffsetMode *string `locationName:"timestampOffsetMode" type:"string" enum:"SmoothGroupTimestampOffsetMode"` -} - -// String returns the string representation -func (s MsSmoothGroupSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MsSmoothGroupSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MsSmoothGroupSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MsSmoothGroupSettings"} - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - if s.FragmentLength != nil && *s.FragmentLength < 1 { - invalidParams.Add(request.NewErrParamMinValue("FragmentLength", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcquisitionPointId sets the AcquisitionPointId field's value. -func (s *MsSmoothGroupSettings) SetAcquisitionPointId(v string) *MsSmoothGroupSettings { - s.AcquisitionPointId = &v - return s -} - -// SetAudioOnlyTimecodeControl sets the AudioOnlyTimecodeControl field's value. -func (s *MsSmoothGroupSettings) SetAudioOnlyTimecodeControl(v string) *MsSmoothGroupSettings { - s.AudioOnlyTimecodeControl = &v - return s -} - -// SetCertificateMode sets the CertificateMode field's value. -func (s *MsSmoothGroupSettings) SetCertificateMode(v string) *MsSmoothGroupSettings { - s.CertificateMode = &v - return s -} - -// SetConnectionRetryInterval sets the ConnectionRetryInterval field's value. -func (s *MsSmoothGroupSettings) SetConnectionRetryInterval(v int64) *MsSmoothGroupSettings { - s.ConnectionRetryInterval = &v - return s -} - -// SetDestination sets the Destination field's value. -func (s *MsSmoothGroupSettings) SetDestination(v *OutputLocationRef) *MsSmoothGroupSettings { - s.Destination = v - return s -} - -// SetEventId sets the EventId field's value. -func (s *MsSmoothGroupSettings) SetEventId(v string) *MsSmoothGroupSettings { - s.EventId = &v - return s -} - -// SetEventIdMode sets the EventIdMode field's value. -func (s *MsSmoothGroupSettings) SetEventIdMode(v string) *MsSmoothGroupSettings { - s.EventIdMode = &v - return s -} - -// SetEventStopBehavior sets the EventStopBehavior field's value. -func (s *MsSmoothGroupSettings) SetEventStopBehavior(v string) *MsSmoothGroupSettings { - s.EventStopBehavior = &v - return s -} - -// SetFilecacheDuration sets the FilecacheDuration field's value. -func (s *MsSmoothGroupSettings) SetFilecacheDuration(v int64) *MsSmoothGroupSettings { - s.FilecacheDuration = &v - return s -} - -// SetFragmentLength sets the FragmentLength field's value. -func (s *MsSmoothGroupSettings) SetFragmentLength(v int64) *MsSmoothGroupSettings { - s.FragmentLength = &v - return s -} - -// SetInputLossAction sets the InputLossAction field's value. -func (s *MsSmoothGroupSettings) SetInputLossAction(v string) *MsSmoothGroupSettings { - s.InputLossAction = &v - return s -} - -// SetNumRetries sets the NumRetries field's value. -func (s *MsSmoothGroupSettings) SetNumRetries(v int64) *MsSmoothGroupSettings { - s.NumRetries = &v - return s -} - -// SetRestartDelay sets the RestartDelay field's value. -func (s *MsSmoothGroupSettings) SetRestartDelay(v int64) *MsSmoothGroupSettings { - s.RestartDelay = &v - return s -} - -// SetSegmentationMode sets the SegmentationMode field's value. -func (s *MsSmoothGroupSettings) SetSegmentationMode(v string) *MsSmoothGroupSettings { - s.SegmentationMode = &v - return s -} - -// SetSendDelayMs sets the SendDelayMs field's value. -func (s *MsSmoothGroupSettings) SetSendDelayMs(v int64) *MsSmoothGroupSettings { - s.SendDelayMs = &v - return s -} - -// SetSparseTrackType sets the SparseTrackType field's value. -func (s *MsSmoothGroupSettings) SetSparseTrackType(v string) *MsSmoothGroupSettings { - s.SparseTrackType = &v - return s -} - -// SetStreamManifestBehavior sets the StreamManifestBehavior field's value. -func (s *MsSmoothGroupSettings) SetStreamManifestBehavior(v string) *MsSmoothGroupSettings { - s.StreamManifestBehavior = &v - return s -} - -// SetTimestampOffset sets the TimestampOffset field's value. -func (s *MsSmoothGroupSettings) SetTimestampOffset(v string) *MsSmoothGroupSettings { - s.TimestampOffset = &v - return s -} - -// SetTimestampOffsetMode sets the TimestampOffsetMode field's value. -func (s *MsSmoothGroupSettings) SetTimestampOffsetMode(v string) *MsSmoothGroupSettings { - s.TimestampOffsetMode = &v - return s -} - -type MsSmoothOutputSettings struct { - _ struct{} `type:"structure"` - - // String concatenated to the end of the destination filename. Required for - // multiple outputs of the same type. - NameModifier *string `locationName:"nameModifier" type:"string"` -} - -// String returns the string representation -func (s MsSmoothOutputSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MsSmoothOutputSettings) GoString() string { - return s.String() -} - -// SetNameModifier sets the NameModifier field's value. -func (s *MsSmoothOutputSettings) SetNameModifier(v string) *MsSmoothOutputSettings { - s.NameModifier = &v - return s -} - -// Network source to transcode. Must be accessible to the Elemental Live node -// that is running the live event through a network connection. -type NetworkInputSettings struct { - _ struct{} `type:"structure"` - - // Specifies HLS input settings when the uri is for a HLS manifest. - HlsInputSettings *HlsInputSettings `locationName:"hlsInputSettings" type:"structure"` - - // Check HTTPS server certificates. When set to checkCryptographyOnly, cryptography - // in the certificate will be checked, but not the server's name. Certain subdomains - // (notably S3 buckets that use dots in the bucket name) do not strictly match - // the corresponding certificate's wildcard pattern and would otherwise cause - // the event to error. This setting is ignored for protocols that do not use - // https. - ServerValidation *string `locationName:"serverValidation" type:"string" enum:"NetworkInputServerValidation"` -} - -// String returns the string representation -func (s NetworkInputSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInputSettings) GoString() string { - return s.String() -} - -// SetHlsInputSettings sets the HlsInputSettings field's value. -func (s *NetworkInputSettings) SetHlsInputSettings(v *HlsInputSettings) *NetworkInputSettings { - s.HlsInputSettings = v - return s -} - -// SetServerValidation sets the ServerValidation field's value. -func (s *NetworkInputSettings) SetServerValidation(v string) *NetworkInputSettings { - s.ServerValidation = &v - return s -} - -// Reserved resources available for purchase -type Offering struct { - _ struct{} `type:"structure"` - - // Unique offering ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:offering:87654321' - Arn *string `locationName:"arn" type:"string"` - - // Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD' - CurrencyCode *string `locationName:"currencyCode" type:"string"` - - // Lease duration, e.g. '12' - Duration *int64 `locationName:"duration" type:"integer"` - - // Units for duration, e.g. 'MONTHS' - DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` - - // One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering - FixedPrice *float64 `locationName:"fixedPrice" type:"double"` - - // Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard - // VQ in US West (Oregon)' - OfferingDescription *string `locationName:"offeringDescription" type:"string"` - - // Unique offering ID, e.g. '87654321' - OfferingId *string `locationName:"offeringId" type:"string"` - - // Offering type, e.g. 'NO_UPFRONT' - OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` - - // AWS region, e.g. 'us-west-2' - Region *string `locationName:"region" type:"string"` - - // Resource configuration details - ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` - - // Recurring usage charge for each reserved resource, e.g. '157.0' - UsagePrice *float64 `locationName:"usagePrice" type:"double"` -} - -// String returns the string representation -func (s Offering) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Offering) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Offering) SetArn(v string) *Offering { - s.Arn = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *Offering) SetCurrencyCode(v string) *Offering { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *Offering) SetDuration(v int64) *Offering { - s.Duration = &v - return s -} - -// SetDurationUnits sets the DurationUnits field's value. -func (s *Offering) SetDurationUnits(v string) *Offering { - s.DurationUnits = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *Offering) SetFixedPrice(v float64) *Offering { - s.FixedPrice = &v - return s -} - -// SetOfferingDescription sets the OfferingDescription field's value. -func (s *Offering) SetOfferingDescription(v string) *Offering { - s.OfferingDescription = &v - return s -} - -// SetOfferingId sets the OfferingId field's value. -func (s *Offering) SetOfferingId(v string) *Offering { - s.OfferingId = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *Offering) SetOfferingType(v string) *Offering { - s.OfferingType = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *Offering) SetRegion(v string) *Offering { - s.Region = &v - return s -} - -// SetResourceSpecification sets the ResourceSpecification field's value. -func (s *Offering) SetResourceSpecification(v *ReservationResourceSpecification) *Offering { - s.ResourceSpecification = v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *Offering) SetUsagePrice(v float64) *Offering { - s.UsagePrice = &v - return s -} - -// Output settings. There can be multiple outputs within a group. -type Output struct { - _ struct{} `type:"structure"` - - // The names of the AudioDescriptions used as audio sources for this output. - AudioDescriptionNames []*string `locationName:"audioDescriptionNames" type:"list"` - - // The names of the CaptionDescriptions used as caption sources for this output. - CaptionDescriptionNames []*string `locationName:"captionDescriptionNames" type:"list"` - - // The name used to identify an output. - OutputName *string `locationName:"outputName" min:"1" type:"string"` - - // Output type-specific settings. - // - // OutputSettings is a required field - OutputSettings *OutputSettings `locationName:"outputSettings" type:"structure" required:"true"` - - // The name of the VideoDescription used as the source for this output. - VideoDescriptionName *string `locationName:"videoDescriptionName" type:"string"` -} - -// String returns the string representation -func (s Output) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Output) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Output) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Output"} - if s.OutputName != nil && len(*s.OutputName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OutputName", 1)) - } - if s.OutputSettings == nil { - invalidParams.Add(request.NewErrParamRequired("OutputSettings")) - } - if s.OutputSettings != nil { - if err := s.OutputSettings.Validate(); err != nil { - invalidParams.AddNested("OutputSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioDescriptionNames sets the AudioDescriptionNames field's value. -func (s *Output) SetAudioDescriptionNames(v []*string) *Output { - s.AudioDescriptionNames = v - return s -} - -// SetCaptionDescriptionNames sets the CaptionDescriptionNames field's value. -func (s *Output) SetCaptionDescriptionNames(v []*string) *Output { - s.CaptionDescriptionNames = v - return s -} - -// SetOutputName sets the OutputName field's value. -func (s *Output) SetOutputName(v string) *Output { - s.OutputName = &v - return s -} - -// SetOutputSettings sets the OutputSettings field's value. -func (s *Output) SetOutputSettings(v *OutputSettings) *Output { - s.OutputSettings = v - return s -} - -// SetVideoDescriptionName sets the VideoDescriptionName field's value. -func (s *Output) SetVideoDescriptionName(v string) *Output { - s.VideoDescriptionName = &v - return s -} - -type OutputDestination struct { - _ struct{} `type:"structure"` - - // User-specified id. This is used in an output group or an output. - Id *string `locationName:"id" type:"string"` - - // Destination settings for output; one for each redundant encoder. - Settings []*OutputDestinationSettings `locationName:"settings" type:"list"` -} - -// String returns the string representation -func (s OutputDestination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputDestination) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *OutputDestination) SetId(v string) *OutputDestination { - s.Id = &v - return s -} - -// SetSettings sets the Settings field's value. -func (s *OutputDestination) SetSettings(v []*OutputDestinationSettings) *OutputDestination { - s.Settings = v - return s -} - -type OutputDestinationSettings struct { - _ struct{} `type:"structure"` - - // key used to extract the password from EC2 Parameter store - PasswordParam *string `locationName:"passwordParam" type:"string"` - - // Stream name for RTMP destinations (URLs of type rtmp://) - StreamName *string `locationName:"streamName" type:"string"` - - // A URL specifying a destination - Url *string `locationName:"url" type:"string"` - - // username for destination - Username *string `locationName:"username" type:"string"` -} - -// String returns the string representation -func (s OutputDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputDestinationSettings) GoString() string { - return s.String() -} - -// SetPasswordParam sets the PasswordParam field's value. -func (s *OutputDestinationSettings) SetPasswordParam(v string) *OutputDestinationSettings { - s.PasswordParam = &v - return s -} - -// SetStreamName sets the StreamName field's value. -func (s *OutputDestinationSettings) SetStreamName(v string) *OutputDestinationSettings { - s.StreamName = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *OutputDestinationSettings) SetUrl(v string) *OutputDestinationSettings { - s.Url = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *OutputDestinationSettings) SetUsername(v string) *OutputDestinationSettings { - s.Username = &v - return s -} - -// Output groups for this Live Event. Output groups contain information about -// where streams should be distributed. -type OutputGroup struct { - _ struct{} `type:"structure"` - - // Custom output group name optionally defined by the user. Only letters, numbers, - // and the underscore character allowed; only 32 characters allowed. - Name *string `locationName:"name" type:"string"` - - // Settings associated with the output group. - // - // OutputGroupSettings is a required field - OutputGroupSettings *OutputGroupSettings `locationName:"outputGroupSettings" type:"structure" required:"true"` - - // Outputs is a required field - Outputs []*Output `locationName:"outputs" type:"list" required:"true"` -} - -// String returns the string representation -func (s OutputGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputGroup) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OutputGroup) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OutputGroup"} - if s.OutputGroupSettings == nil { - invalidParams.Add(request.NewErrParamRequired("OutputGroupSettings")) - } - if s.Outputs == nil { - invalidParams.Add(request.NewErrParamRequired("Outputs")) - } - if s.OutputGroupSettings != nil { - if err := s.OutputGroupSettings.Validate(); err != nil { - invalidParams.AddNested("OutputGroupSettings", err.(request.ErrInvalidParams)) - } - } - if s.Outputs != nil { - for i, v := range s.Outputs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Outputs", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *OutputGroup) SetName(v string) *OutputGroup { - s.Name = &v - return s -} - -// SetOutputGroupSettings sets the OutputGroupSettings field's value. -func (s *OutputGroup) SetOutputGroupSettings(v *OutputGroupSettings) *OutputGroup { - s.OutputGroupSettings = v - return s -} - -// SetOutputs sets the Outputs field's value. -func (s *OutputGroup) SetOutputs(v []*Output) *OutputGroup { - s.Outputs = v - return s -} - -type OutputGroupSettings struct { - _ struct{} `type:"structure"` - - ArchiveGroupSettings *ArchiveGroupSettings `locationName:"archiveGroupSettings" type:"structure"` - - // Frame Capture Group Settings - FrameCaptureGroupSettings *FrameCaptureGroupSettings `locationName:"frameCaptureGroupSettings" type:"structure"` - - HlsGroupSettings *HlsGroupSettings `locationName:"hlsGroupSettings" type:"structure"` - - MsSmoothGroupSettings *MsSmoothGroupSettings `locationName:"msSmoothGroupSettings" type:"structure"` - - RtmpGroupSettings *RtmpGroupSettings `locationName:"rtmpGroupSettings" type:"structure"` - - UdpGroupSettings *UdpGroupSettings `locationName:"udpGroupSettings" type:"structure"` -} - -// String returns the string representation -func (s OutputGroupSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputGroupSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OutputGroupSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OutputGroupSettings"} - if s.ArchiveGroupSettings != nil { - if err := s.ArchiveGroupSettings.Validate(); err != nil { - invalidParams.AddNested("ArchiveGroupSettings", err.(request.ErrInvalidParams)) - } - } - if s.FrameCaptureGroupSettings != nil { - if err := s.FrameCaptureGroupSettings.Validate(); err != nil { - invalidParams.AddNested("FrameCaptureGroupSettings", err.(request.ErrInvalidParams)) - } - } - if s.HlsGroupSettings != nil { - if err := s.HlsGroupSettings.Validate(); err != nil { - invalidParams.AddNested("HlsGroupSettings", err.(request.ErrInvalidParams)) - } - } - if s.MsSmoothGroupSettings != nil { - if err := s.MsSmoothGroupSettings.Validate(); err != nil { - invalidParams.AddNested("MsSmoothGroupSettings", err.(request.ErrInvalidParams)) - } - } - if s.RtmpGroupSettings != nil { - if err := s.RtmpGroupSettings.Validate(); err != nil { - invalidParams.AddNested("RtmpGroupSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArchiveGroupSettings sets the ArchiveGroupSettings field's value. -func (s *OutputGroupSettings) SetArchiveGroupSettings(v *ArchiveGroupSettings) *OutputGroupSettings { - s.ArchiveGroupSettings = v - return s -} - -// SetFrameCaptureGroupSettings sets the FrameCaptureGroupSettings field's value. -func (s *OutputGroupSettings) SetFrameCaptureGroupSettings(v *FrameCaptureGroupSettings) *OutputGroupSettings { - s.FrameCaptureGroupSettings = v - return s -} - -// SetHlsGroupSettings sets the HlsGroupSettings field's value. -func (s *OutputGroupSettings) SetHlsGroupSettings(v *HlsGroupSettings) *OutputGroupSettings { - s.HlsGroupSettings = v - return s -} - -// SetMsSmoothGroupSettings sets the MsSmoothGroupSettings field's value. -func (s *OutputGroupSettings) SetMsSmoothGroupSettings(v *MsSmoothGroupSettings) *OutputGroupSettings { - s.MsSmoothGroupSettings = v - return s -} - -// SetRtmpGroupSettings sets the RtmpGroupSettings field's value. -func (s *OutputGroupSettings) SetRtmpGroupSettings(v *RtmpGroupSettings) *OutputGroupSettings { - s.RtmpGroupSettings = v - return s -} - -// SetUdpGroupSettings sets the UdpGroupSettings field's value. -func (s *OutputGroupSettings) SetUdpGroupSettings(v *UdpGroupSettings) *OutputGroupSettings { - s.UdpGroupSettings = v - return s -} - -// Reference to an OutputDestination ID defined in the channel -type OutputLocationRef struct { - _ struct{} `type:"structure"` - - DestinationRefId *string `locationName:"destinationRefId" type:"string"` -} - -// String returns the string representation -func (s OutputLocationRef) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputLocationRef) GoString() string { - return s.String() -} - -// SetDestinationRefId sets the DestinationRefId field's value. -func (s *OutputLocationRef) SetDestinationRefId(v string) *OutputLocationRef { - s.DestinationRefId = &v - return s -} - -type OutputSettings struct { - _ struct{} `type:"structure"` - - ArchiveOutputSettings *ArchiveOutputSettings `locationName:"archiveOutputSettings" type:"structure"` - - // Frame Capture Output Settings - FrameCaptureOutputSettings *FrameCaptureOutputSettings `locationName:"frameCaptureOutputSettings" type:"structure"` - - HlsOutputSettings *HlsOutputSettings `locationName:"hlsOutputSettings" type:"structure"` - - MsSmoothOutputSettings *MsSmoothOutputSettings `locationName:"msSmoothOutputSettings" type:"structure"` - - RtmpOutputSettings *RtmpOutputSettings `locationName:"rtmpOutputSettings" type:"structure"` - - UdpOutputSettings *UdpOutputSettings `locationName:"udpOutputSettings" type:"structure"` -} - -// String returns the string representation -func (s OutputSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OutputSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OutputSettings"} - if s.ArchiveOutputSettings != nil { - if err := s.ArchiveOutputSettings.Validate(); err != nil { - invalidParams.AddNested("ArchiveOutputSettings", err.(request.ErrInvalidParams)) - } - } - if s.HlsOutputSettings != nil { - if err := s.HlsOutputSettings.Validate(); err != nil { - invalidParams.AddNested("HlsOutputSettings", err.(request.ErrInvalidParams)) - } - } - if s.RtmpOutputSettings != nil { - if err := s.RtmpOutputSettings.Validate(); err != nil { - invalidParams.AddNested("RtmpOutputSettings", err.(request.ErrInvalidParams)) - } - } - if s.UdpOutputSettings != nil { - if err := s.UdpOutputSettings.Validate(); err != nil { - invalidParams.AddNested("UdpOutputSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArchiveOutputSettings sets the ArchiveOutputSettings field's value. -func (s *OutputSettings) SetArchiveOutputSettings(v *ArchiveOutputSettings) *OutputSettings { - s.ArchiveOutputSettings = v - return s -} - -// SetFrameCaptureOutputSettings sets the FrameCaptureOutputSettings field's value. -func (s *OutputSettings) SetFrameCaptureOutputSettings(v *FrameCaptureOutputSettings) *OutputSettings { - s.FrameCaptureOutputSettings = v - return s -} - -// SetHlsOutputSettings sets the HlsOutputSettings field's value. -func (s *OutputSettings) SetHlsOutputSettings(v *HlsOutputSettings) *OutputSettings { - s.HlsOutputSettings = v - return s -} - -// SetMsSmoothOutputSettings sets the MsSmoothOutputSettings field's value. -func (s *OutputSettings) SetMsSmoothOutputSettings(v *MsSmoothOutputSettings) *OutputSettings { - s.MsSmoothOutputSettings = v - return s -} - -// SetRtmpOutputSettings sets the RtmpOutputSettings field's value. -func (s *OutputSettings) SetRtmpOutputSettings(v *RtmpOutputSettings) *OutputSettings { - s.RtmpOutputSettings = v - return s -} - -// SetUdpOutputSettings sets the UdpOutputSettings field's value. -func (s *OutputSettings) SetUdpOutputSettings(v *UdpOutputSettings) *OutputSettings { - s.UdpOutputSettings = v - return s -} - -type PassThroughSettings struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PassThroughSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PassThroughSettings) GoString() string { - return s.String() -} - -type PurchaseOfferingInput struct { - _ struct{} `type:"structure"` - - // Count is a required field - Count *int64 `locationName:"count" min:"1" type:"integer" required:"true"` - - Name *string `locationName:"name" type:"string"` - - // OfferingId is a required field - OfferingId *string `location:"uri" locationName:"offeringId" type:"string" required:"true"` - - RequestId *string `locationName:"requestId" type:"string" idempotencyToken:"true"` - - Start *string `locationName:"start" type:"string"` -} - -// String returns the string representation -func (s PurchaseOfferingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseOfferingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseOfferingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseOfferingInput"} - if s.Count == nil { - invalidParams.Add(request.NewErrParamRequired("Count")) - } - if s.Count != nil && *s.Count < 1 { - invalidParams.Add(request.NewErrParamMinValue("Count", 1)) - } - if s.OfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("OfferingId")) - } - if s.OfferingId != nil && len(*s.OfferingId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OfferingId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCount sets the Count field's value. -func (s *PurchaseOfferingInput) SetCount(v int64) *PurchaseOfferingInput { - s.Count = &v - return s -} - -// SetName sets the Name field's value. -func (s *PurchaseOfferingInput) SetName(v string) *PurchaseOfferingInput { - s.Name = &v - return s -} - -// SetOfferingId sets the OfferingId field's value. -func (s *PurchaseOfferingInput) SetOfferingId(v string) *PurchaseOfferingInput { - s.OfferingId = &v - return s -} - -// SetRequestId sets the RequestId field's value. -func (s *PurchaseOfferingInput) SetRequestId(v string) *PurchaseOfferingInput { - s.RequestId = &v - return s -} - -// SetStart sets the Start field's value. -func (s *PurchaseOfferingInput) SetStart(v string) *PurchaseOfferingInput { - s.Start = &v - return s -} - -type PurchaseOfferingOutput struct { - _ struct{} `type:"structure"` - - // Reserved resources available to use - Reservation *Reservation `locationName:"reservation" type:"structure"` -} - -// String returns the string representation -func (s PurchaseOfferingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseOfferingOutput) GoString() string { - return s.String() -} - -// SetReservation sets the Reservation field's value. -func (s *PurchaseOfferingOutput) SetReservation(v *Reservation) *PurchaseOfferingOutput { - s.Reservation = v - return s -} - -type RemixSettings struct { - _ struct{} `type:"structure"` - - // Mapping of input channels to output channels, with appropriate gain adjustments. - // - // ChannelMappings is a required field - ChannelMappings []*AudioChannelMapping `locationName:"channelMappings" type:"list" required:"true"` - - // Number of input channels to be used. - ChannelsIn *int64 `locationName:"channelsIn" min:"1" type:"integer"` - - // Number of output channels to be produced.Valid values: 1, 2, 4, 6, 8 - ChannelsOut *int64 `locationName:"channelsOut" min:"1" type:"integer"` -} - -// String returns the string representation -func (s RemixSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemixSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemixSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemixSettings"} - if s.ChannelMappings == nil { - invalidParams.Add(request.NewErrParamRequired("ChannelMappings")) - } - if s.ChannelsIn != nil && *s.ChannelsIn < 1 { - invalidParams.Add(request.NewErrParamMinValue("ChannelsIn", 1)) - } - if s.ChannelsOut != nil && *s.ChannelsOut < 1 { - invalidParams.Add(request.NewErrParamMinValue("ChannelsOut", 1)) - } - if s.ChannelMappings != nil { - for i, v := range s.ChannelMappings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ChannelMappings", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChannelMappings sets the ChannelMappings field's value. -func (s *RemixSettings) SetChannelMappings(v []*AudioChannelMapping) *RemixSettings { - s.ChannelMappings = v - return s -} - -// SetChannelsIn sets the ChannelsIn field's value. -func (s *RemixSettings) SetChannelsIn(v int64) *RemixSettings { - s.ChannelsIn = &v - return s -} - -// SetChannelsOut sets the ChannelsOut field's value. -func (s *RemixSettings) SetChannelsOut(v int64) *RemixSettings { - s.ChannelsOut = &v - return s -} - -// Reserved resources available to use -type Reservation struct { - _ struct{} `type:"structure"` - - // Unique reservation ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:reservation:1234567' - Arn *string `locationName:"arn" type:"string"` - - // Number of reserved resources - Count *int64 `locationName:"count" type:"integer"` - - // Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD' - CurrencyCode *string `locationName:"currencyCode" type:"string"` - - // Lease duration, e.g. '12' - Duration *int64 `locationName:"duration" type:"integer"` - - // Units for duration, e.g. 'MONTHS' - DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` - - // Reservation UTC end date and time in ISO-8601 format, e.g. '2019-03-01T00:00:00' - End *string `locationName:"end" type:"string"` - - // One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering - FixedPrice *float64 `locationName:"fixedPrice" type:"double"` - - // User specified reservation name - Name *string `locationName:"name" type:"string"` - - // Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard - // VQ in US West (Oregon)' - OfferingDescription *string `locationName:"offeringDescription" type:"string"` - - // Unique offering ID, e.g. '87654321' - OfferingId *string `locationName:"offeringId" type:"string"` - - // Offering type, e.g. 'NO_UPFRONT' - OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` - - // AWS region, e.g. 'us-west-2' - Region *string `locationName:"region" type:"string"` - - // Unique reservation ID, e.g. '1234567' - ReservationId *string `locationName:"reservationId" type:"string"` - - // Resource configuration details - ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` - - // Reservation UTC start date and time in ISO-8601 format, e.g. '2018-03-01T00:00:00' - Start *string `locationName:"start" type:"string"` - - // Current state of reservation, e.g. 'ACTIVE' - State *string `locationName:"state" type:"string" enum:"ReservationState"` - - // Recurring usage charge for each reserved resource, e.g. '157.0' - UsagePrice *float64 `locationName:"usagePrice" type:"double"` -} - -// String returns the string representation -func (s Reservation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Reservation) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Reservation) SetArn(v string) *Reservation { - s.Arn = &v - return s -} - -// SetCount sets the Count field's value. -func (s *Reservation) SetCount(v int64) *Reservation { - s.Count = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *Reservation) SetCurrencyCode(v string) *Reservation { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *Reservation) SetDuration(v int64) *Reservation { - s.Duration = &v - return s -} - -// SetDurationUnits sets the DurationUnits field's value. -func (s *Reservation) SetDurationUnits(v string) *Reservation { - s.DurationUnits = &v - return s -} - -// SetEnd sets the End field's value. -func (s *Reservation) SetEnd(v string) *Reservation { - s.End = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *Reservation) SetFixedPrice(v float64) *Reservation { - s.FixedPrice = &v - return s -} - -// SetName sets the Name field's value. -func (s *Reservation) SetName(v string) *Reservation { - s.Name = &v - return s -} - -// SetOfferingDescription sets the OfferingDescription field's value. -func (s *Reservation) SetOfferingDescription(v string) *Reservation { - s.OfferingDescription = &v - return s -} - -// SetOfferingId sets the OfferingId field's value. -func (s *Reservation) SetOfferingId(v string) *Reservation { - s.OfferingId = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *Reservation) SetOfferingType(v string) *Reservation { - s.OfferingType = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *Reservation) SetRegion(v string) *Reservation { - s.Region = &v - return s -} - -// SetReservationId sets the ReservationId field's value. -func (s *Reservation) SetReservationId(v string) *Reservation { - s.ReservationId = &v - return s -} - -// SetResourceSpecification sets the ResourceSpecification field's value. -func (s *Reservation) SetResourceSpecification(v *ReservationResourceSpecification) *Reservation { - s.ResourceSpecification = v - return s -} - -// SetStart sets the Start field's value. -func (s *Reservation) SetStart(v string) *Reservation { - s.Start = &v - return s -} - -// SetState sets the State field's value. -func (s *Reservation) SetState(v string) *Reservation { - s.State = &v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *Reservation) SetUsagePrice(v float64) *Reservation { - s.UsagePrice = &v - return s -} - -// Resource configuration (codec, resolution, bitrate, ...) -type ReservationResourceSpecification struct { - _ struct{} `type:"structure"` - - // Codec, e.g. 'AVC' - Codec *string `locationName:"codec" type:"string" enum:"ReservationCodec"` - - // Maximum bitrate, e.g. 'MAX_20_MBPS' - MaximumBitrate *string `locationName:"maximumBitrate" type:"string" enum:"ReservationMaximumBitrate"` - - // Maximum framerate, e.g. 'MAX_30_FPS' (Outputs only) - MaximumFramerate *string `locationName:"maximumFramerate" type:"string" enum:"ReservationMaximumFramerate"` - - // Resolution, e.g. 'HD' - Resolution *string `locationName:"resolution" type:"string" enum:"ReservationResolution"` - - // Resource type, 'INPUT', 'OUTPUT', or 'CHANNEL' - ResourceType *string `locationName:"resourceType" type:"string" enum:"ReservationResourceType"` - - // Special feature, e.g. 'AUDIO_NORMALIZATION' (Channels only) - SpecialFeature *string `locationName:"specialFeature" type:"string" enum:"ReservationSpecialFeature"` - - // Video quality, e.g. 'STANDARD' (Outputs only) - VideoQuality *string `locationName:"videoQuality" type:"string" enum:"ReservationVideoQuality"` -} - -// String returns the string representation -func (s ReservationResourceSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservationResourceSpecification) GoString() string { - return s.String() -} - -// SetCodec sets the Codec field's value. -func (s *ReservationResourceSpecification) SetCodec(v string) *ReservationResourceSpecification { - s.Codec = &v - return s -} - -// SetMaximumBitrate sets the MaximumBitrate field's value. -func (s *ReservationResourceSpecification) SetMaximumBitrate(v string) *ReservationResourceSpecification { - s.MaximumBitrate = &v - return s -} - -// SetMaximumFramerate sets the MaximumFramerate field's value. -func (s *ReservationResourceSpecification) SetMaximumFramerate(v string) *ReservationResourceSpecification { - s.MaximumFramerate = &v - return s -} - -// SetResolution sets the Resolution field's value. -func (s *ReservationResourceSpecification) SetResolution(v string) *ReservationResourceSpecification { - s.Resolution = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ReservationResourceSpecification) SetResourceType(v string) *ReservationResourceSpecification { - s.ResourceType = &v - return s -} - -// SetSpecialFeature sets the SpecialFeature field's value. -func (s *ReservationResourceSpecification) SetSpecialFeature(v string) *ReservationResourceSpecification { - s.SpecialFeature = &v - return s -} - -// SetVideoQuality sets the VideoQuality field's value. -func (s *ReservationResourceSpecification) SetVideoQuality(v string) *ReservationResourceSpecification { - s.VideoQuality = &v - return s -} - -type RtmpCaptionInfoDestinationSettings struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RtmpCaptionInfoDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RtmpCaptionInfoDestinationSettings) GoString() string { - return s.String() -} - -type RtmpGroupSettings struct { - _ struct{} `type:"structure"` - - // Authentication scheme to use when connecting with CDN - AuthenticationScheme *string `locationName:"authenticationScheme" type:"string" enum:"AuthenticationScheme"` - - // Controls behavior when content cache fills up. If remote origin server stalls - // the RTMP connection and does not accept content fast enough the 'Media Cache' - // will fill up. When the cache reaches the duration specified by cacheLength - // the cache will stop accepting new content. If set to disconnectImmediately, - // the RTMP output will force a disconnect. Clear the media cache, and reconnect - // after restartDelay seconds. If set to waitForServer, the RTMP output will - // wait up to 5 minutes to allow the origin server to begin accepting data again. - CacheFullBehavior *string `locationName:"cacheFullBehavior" type:"string" enum:"RtmpCacheFullBehavior"` - - // Cache length, in seconds, is used to calculate buffer size. - CacheLength *int64 `locationName:"cacheLength" min:"30" type:"integer"` - - // Controls the types of data that passes to onCaptionInfo outputs. If set to - // 'all' then 608 and 708 carried DTVCC data will be passed. If set to 'field1AndField2608' - // then DTVCC data will be stripped out, but 608 data from both fields will - // be passed. If set to 'field1608' then only the data carried in 608 from field - // 1 video will be passed. - CaptionData *string `locationName:"captionData" type:"string" enum:"RtmpCaptionData"` - - // Controls the behavior of this RTMP group if input becomes unavailable.- emitOutput: - // Emit a slate until input returns.- pauseOutput: Stop transmitting data until - // input returns. This does not close the underlying RTMP connection. - InputLossAction *string `locationName:"inputLossAction" type:"string" enum:"InputLossActionForRtmpOut"` - - // If a streaming output fails, number of seconds to wait until a restart is - // initiated. A value of 0 means never restart. - RestartDelay *int64 `locationName:"restartDelay" type:"integer"` -} - -// String returns the string representation -func (s RtmpGroupSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RtmpGroupSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RtmpGroupSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RtmpGroupSettings"} - if s.CacheLength != nil && *s.CacheLength < 30 { - invalidParams.Add(request.NewErrParamMinValue("CacheLength", 30)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticationScheme sets the AuthenticationScheme field's value. -func (s *RtmpGroupSettings) SetAuthenticationScheme(v string) *RtmpGroupSettings { - s.AuthenticationScheme = &v - return s -} - -// SetCacheFullBehavior sets the CacheFullBehavior field's value. -func (s *RtmpGroupSettings) SetCacheFullBehavior(v string) *RtmpGroupSettings { - s.CacheFullBehavior = &v - return s -} - -// SetCacheLength sets the CacheLength field's value. -func (s *RtmpGroupSettings) SetCacheLength(v int64) *RtmpGroupSettings { - s.CacheLength = &v - return s -} - -// SetCaptionData sets the CaptionData field's value. -func (s *RtmpGroupSettings) SetCaptionData(v string) *RtmpGroupSettings { - s.CaptionData = &v - return s -} - -// SetInputLossAction sets the InputLossAction field's value. -func (s *RtmpGroupSettings) SetInputLossAction(v string) *RtmpGroupSettings { - s.InputLossAction = &v - return s -} - -// SetRestartDelay sets the RestartDelay field's value. -func (s *RtmpGroupSettings) SetRestartDelay(v int64) *RtmpGroupSettings { - s.RestartDelay = &v - return s -} - -type RtmpOutputSettings struct { - _ struct{} `type:"structure"` - - // If set to verifyAuthenticity, verify the tls certificate chain to a trusted - // Certificate Authority (CA). This will cause rtmps outputs with self-signed - // certificates to fail. - CertificateMode *string `locationName:"certificateMode" type:"string" enum:"RtmpOutputCertificateMode"` - - // Number of seconds to wait before retrying a connection to the Flash Media - // server if the connection is lost. - ConnectionRetryInterval *int64 `locationName:"connectionRetryInterval" min:"1" type:"integer"` - - // The RTMP endpoint excluding the stream name (eg. rtmp://host/appname). For - // connection to Akamai, a username and password must be supplied. URI fields - // accept format identifiers. - // - // Destination is a required field - Destination *OutputLocationRef `locationName:"destination" type:"structure" required:"true"` - - // Number of retry attempts. - NumRetries *int64 `locationName:"numRetries" type:"integer"` -} - -// String returns the string representation -func (s RtmpOutputSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RtmpOutputSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RtmpOutputSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RtmpOutputSettings"} - if s.ConnectionRetryInterval != nil && *s.ConnectionRetryInterval < 1 { - invalidParams.Add(request.NewErrParamMinValue("ConnectionRetryInterval", 1)) - } - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateMode sets the CertificateMode field's value. -func (s *RtmpOutputSettings) SetCertificateMode(v string) *RtmpOutputSettings { - s.CertificateMode = &v - return s -} - -// SetConnectionRetryInterval sets the ConnectionRetryInterval field's value. -func (s *RtmpOutputSettings) SetConnectionRetryInterval(v int64) *RtmpOutputSettings { - s.ConnectionRetryInterval = &v - return s -} - -// SetDestination sets the Destination field's value. -func (s *RtmpOutputSettings) SetDestination(v *OutputLocationRef) *RtmpOutputSettings { - s.Destination = v - return s -} - -// SetNumRetries sets the NumRetries field's value. -func (s *RtmpOutputSettings) SetNumRetries(v int64) *RtmpOutputSettings { - s.NumRetries = &v - return s -} - -// Contains information on a single schedule action. -type ScheduleAction struct { - _ struct{} `type:"structure"` - - // The name of the action, must be unique within the schedule. This name provides - // the main reference to an action once it is added to the schedule. A name - // is unique if it is no longer in the schedule. The schedule is automatically - // cleaned up to remove actions with a start time of more than 1 hour ago (approximately) - // so at that point a name can be reused. - // - // ActionName is a required field - ActionName *string `locationName:"actionName" type:"string" required:"true"` - - // Settings for this schedule action. - // - // ScheduleActionSettings is a required field - ScheduleActionSettings *ScheduleActionSettings `locationName:"scheduleActionSettings" type:"structure" required:"true"` - - // The time for the action to start in the channel. - // - // ScheduleActionStartSettings is a required field - ScheduleActionStartSettings *ScheduleActionStartSettings `locationName:"scheduleActionStartSettings" type:"structure" required:"true"` -} - -// String returns the string representation -func (s ScheduleAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduleAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScheduleAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScheduleAction"} - if s.ActionName == nil { - invalidParams.Add(request.NewErrParamRequired("ActionName")) - } - if s.ScheduleActionSettings == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduleActionSettings")) - } - if s.ScheduleActionStartSettings == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduleActionStartSettings")) - } - if s.ScheduleActionSettings != nil { - if err := s.ScheduleActionSettings.Validate(); err != nil { - invalidParams.AddNested("ScheduleActionSettings", err.(request.ErrInvalidParams)) - } - } - if s.ScheduleActionStartSettings != nil { - if err := s.ScheduleActionStartSettings.Validate(); err != nil { - invalidParams.AddNested("ScheduleActionStartSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionName sets the ActionName field's value. -func (s *ScheduleAction) SetActionName(v string) *ScheduleAction { - s.ActionName = &v - return s -} - -// SetScheduleActionSettings sets the ScheduleActionSettings field's value. -func (s *ScheduleAction) SetScheduleActionSettings(v *ScheduleActionSettings) *ScheduleAction { - s.ScheduleActionSettings = v - return s -} - -// SetScheduleActionStartSettings sets the ScheduleActionStartSettings field's value. -func (s *ScheduleAction) SetScheduleActionStartSettings(v *ScheduleActionStartSettings) *ScheduleAction { - s.ScheduleActionStartSettings = v - return s -} - -// Holds the settings for a single schedule action. -type ScheduleActionSettings struct { - _ struct{} `type:"structure"` - - // Settings to emit HLS metadata - HlsTimedMetadataSettings *HlsTimedMetadataScheduleActionSettings `locationName:"hlsTimedMetadataSettings" type:"structure"` - - // Settings to switch an input - InputSwitchSettings *InputSwitchScheduleActionSettings `locationName:"inputSwitchSettings" type:"structure"` - - // Settings for SCTE-35 return_to_network message - Scte35ReturnToNetworkSettings *Scte35ReturnToNetworkScheduleActionSettings `locationName:"scte35ReturnToNetworkSettings" type:"structure"` - - // Settings for SCTE-35 splice_insert message - Scte35SpliceInsertSettings *Scte35SpliceInsertScheduleActionSettings `locationName:"scte35SpliceInsertSettings" type:"structure"` - - // Settings for SCTE-35 time_signal message - Scte35TimeSignalSettings *Scte35TimeSignalScheduleActionSettings `locationName:"scte35TimeSignalSettings" type:"structure"` - - // Settings to activate a static image overlay - StaticImageActivateSettings *StaticImageActivateScheduleActionSettings `locationName:"staticImageActivateSettings" type:"structure"` - - // Settings to deactivate a static image overlay - StaticImageDeactivateSettings *StaticImageDeactivateScheduleActionSettings `locationName:"staticImageDeactivateSettings" type:"structure"` -} - -// String returns the string representation -func (s ScheduleActionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduleActionSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScheduleActionSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScheduleActionSettings"} - if s.HlsTimedMetadataSettings != nil { - if err := s.HlsTimedMetadataSettings.Validate(); err != nil { - invalidParams.AddNested("HlsTimedMetadataSettings", err.(request.ErrInvalidParams)) - } - } - if s.InputSwitchSettings != nil { - if err := s.InputSwitchSettings.Validate(); err != nil { - invalidParams.AddNested("InputSwitchSettings", err.(request.ErrInvalidParams)) - } - } - if s.Scte35ReturnToNetworkSettings != nil { - if err := s.Scte35ReturnToNetworkSettings.Validate(); err != nil { - invalidParams.AddNested("Scte35ReturnToNetworkSettings", err.(request.ErrInvalidParams)) - } - } - if s.Scte35SpliceInsertSettings != nil { - if err := s.Scte35SpliceInsertSettings.Validate(); err != nil { - invalidParams.AddNested("Scte35SpliceInsertSettings", err.(request.ErrInvalidParams)) - } - } - if s.Scte35TimeSignalSettings != nil { - if err := s.Scte35TimeSignalSettings.Validate(); err != nil { - invalidParams.AddNested("Scte35TimeSignalSettings", err.(request.ErrInvalidParams)) - } - } - if s.StaticImageActivateSettings != nil { - if err := s.StaticImageActivateSettings.Validate(); err != nil { - invalidParams.AddNested("StaticImageActivateSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHlsTimedMetadataSettings sets the HlsTimedMetadataSettings field's value. -func (s *ScheduleActionSettings) SetHlsTimedMetadataSettings(v *HlsTimedMetadataScheduleActionSettings) *ScheduleActionSettings { - s.HlsTimedMetadataSettings = v - return s -} - -// SetInputSwitchSettings sets the InputSwitchSettings field's value. -func (s *ScheduleActionSettings) SetInputSwitchSettings(v *InputSwitchScheduleActionSettings) *ScheduleActionSettings { - s.InputSwitchSettings = v - return s -} - -// SetScte35ReturnToNetworkSettings sets the Scte35ReturnToNetworkSettings field's value. -func (s *ScheduleActionSettings) SetScte35ReturnToNetworkSettings(v *Scte35ReturnToNetworkScheduleActionSettings) *ScheduleActionSettings { - s.Scte35ReturnToNetworkSettings = v - return s -} - -// SetScte35SpliceInsertSettings sets the Scte35SpliceInsertSettings field's value. -func (s *ScheduleActionSettings) SetScte35SpliceInsertSettings(v *Scte35SpliceInsertScheduleActionSettings) *ScheduleActionSettings { - s.Scte35SpliceInsertSettings = v - return s -} - -// SetScte35TimeSignalSettings sets the Scte35TimeSignalSettings field's value. -func (s *ScheduleActionSettings) SetScte35TimeSignalSettings(v *Scte35TimeSignalScheduleActionSettings) *ScheduleActionSettings { - s.Scte35TimeSignalSettings = v - return s -} - -// SetStaticImageActivateSettings sets the StaticImageActivateSettings field's value. -func (s *ScheduleActionSettings) SetStaticImageActivateSettings(v *StaticImageActivateScheduleActionSettings) *ScheduleActionSettings { - s.StaticImageActivateSettings = v - return s -} - -// SetStaticImageDeactivateSettings sets the StaticImageDeactivateSettings field's value. -func (s *ScheduleActionSettings) SetStaticImageDeactivateSettings(v *StaticImageDeactivateScheduleActionSettings) *ScheduleActionSettings { - s.StaticImageDeactivateSettings = v - return s -} - -// Settings to specify the start time for an action. -type ScheduleActionStartSettings struct { - _ struct{} `type:"structure"` - - // Holds the start time for the action. - FixedModeScheduleActionStartSettings *FixedModeScheduleActionStartSettings `locationName:"fixedModeScheduleActionStartSettings" type:"structure"` - - // Specifies an action to follow for scheduling this action. - FollowModeScheduleActionStartSettings *FollowModeScheduleActionStartSettings `locationName:"followModeScheduleActionStartSettings" type:"structure"` -} - -// String returns the string representation -func (s ScheduleActionStartSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduleActionStartSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScheduleActionStartSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScheduleActionStartSettings"} - if s.FixedModeScheduleActionStartSettings != nil { - if err := s.FixedModeScheduleActionStartSettings.Validate(); err != nil { - invalidParams.AddNested("FixedModeScheduleActionStartSettings", err.(request.ErrInvalidParams)) - } - } - if s.FollowModeScheduleActionStartSettings != nil { - if err := s.FollowModeScheduleActionStartSettings.Validate(); err != nil { - invalidParams.AddNested("FollowModeScheduleActionStartSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFixedModeScheduleActionStartSettings sets the FixedModeScheduleActionStartSettings field's value. -func (s *ScheduleActionStartSettings) SetFixedModeScheduleActionStartSettings(v *FixedModeScheduleActionStartSettings) *ScheduleActionStartSettings { - s.FixedModeScheduleActionStartSettings = v - return s -} - -// SetFollowModeScheduleActionStartSettings sets the FollowModeScheduleActionStartSettings field's value. -func (s *ScheduleActionStartSettings) SetFollowModeScheduleActionStartSettings(v *FollowModeScheduleActionStartSettings) *ScheduleActionStartSettings { - s.FollowModeScheduleActionStartSettings = v - return s -} - -type Scte20PlusEmbeddedDestinationSettings struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s Scte20PlusEmbeddedDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scte20PlusEmbeddedDestinationSettings) GoString() string { - return s.String() -} - -type Scte20SourceSettings struct { - _ struct{} `type:"structure"` - - // If upconvert, 608 data is both passed through via the "608 compatibility - // bytes" fields of the 708 wrapper as well as translated into 708. 708 data - // present in the source content will be discarded. - Convert608To708 *string `locationName:"convert608To708" type:"string" enum:"Scte20Convert608To708"` - - // Specifies the 608/708 channel number within the video track from which to - // extract captions. Unused for passthrough. - Source608ChannelNumber *int64 `locationName:"source608ChannelNumber" min:"1" type:"integer"` -} - -// String returns the string representation -func (s Scte20SourceSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scte20SourceSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Scte20SourceSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Scte20SourceSettings"} - if s.Source608ChannelNumber != nil && *s.Source608ChannelNumber < 1 { - invalidParams.Add(request.NewErrParamMinValue("Source608ChannelNumber", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConvert608To708 sets the Convert608To708 field's value. -func (s *Scte20SourceSettings) SetConvert608To708(v string) *Scte20SourceSettings { - s.Convert608To708 = &v - return s -} - -// SetSource608ChannelNumber sets the Source608ChannelNumber field's value. -func (s *Scte20SourceSettings) SetSource608ChannelNumber(v int64) *Scte20SourceSettings { - s.Source608ChannelNumber = &v - return s -} - -type Scte27DestinationSettings struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s Scte27DestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scte27DestinationSettings) GoString() string { - return s.String() -} - -type Scte27SourceSettings struct { - _ struct{} `type:"structure"` - - // The pid field is used in conjunction with the caption selector languageCode - // field as follows: - Specify PID and Language: Extracts captions from that - // PID; the language is "informational". - Specify PID and omit Language: Extracts - // the specified PID. - Omit PID and specify Language: Extracts the specified - // language, whichever PID that happens to be. - Omit PID and omit Language: - // Valid only if source is DVB-Sub that is being passed through; all languages - // will be passed through. - Pid *int64 `locationName:"pid" min:"1" type:"integer"` -} - -// String returns the string representation -func (s Scte27SourceSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scte27SourceSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Scte27SourceSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Scte27SourceSettings"} - if s.Pid != nil && *s.Pid < 1 { - invalidParams.Add(request.NewErrParamMinValue("Pid", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPid sets the Pid field's value. -func (s *Scte27SourceSettings) SetPid(v int64) *Scte27SourceSettings { - s.Pid = &v - return s -} - -// Corresponds to SCTE-35 delivery_not_restricted_flag parameter. To declare -// delivery restrictions, include this element and its four "restriction" flags. -// To declare that there are no restrictions, omit this element. -type Scte35DeliveryRestrictions struct { - _ struct{} `type:"structure"` - - // Corresponds to SCTE-35 archive_allowed_flag. - // - // ArchiveAllowedFlag is a required field - ArchiveAllowedFlag *string `locationName:"archiveAllowedFlag" type:"string" required:"true" enum:"Scte35ArchiveAllowedFlag"` - - // Corresponds to SCTE-35 device_restrictions parameter. - // - // DeviceRestrictions is a required field - DeviceRestrictions *string `locationName:"deviceRestrictions" type:"string" required:"true" enum:"Scte35DeviceRestrictions"` - - // Corresponds to SCTE-35 no_regional_blackout_flag parameter. - // - // NoRegionalBlackoutFlag is a required field - NoRegionalBlackoutFlag *string `locationName:"noRegionalBlackoutFlag" type:"string" required:"true" enum:"Scte35NoRegionalBlackoutFlag"` - - // Corresponds to SCTE-35 web_delivery_allowed_flag parameter. - // - // WebDeliveryAllowedFlag is a required field - WebDeliveryAllowedFlag *string `locationName:"webDeliveryAllowedFlag" type:"string" required:"true" enum:"Scte35WebDeliveryAllowedFlag"` -} - -// String returns the string representation -func (s Scte35DeliveryRestrictions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scte35DeliveryRestrictions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Scte35DeliveryRestrictions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Scte35DeliveryRestrictions"} - if s.ArchiveAllowedFlag == nil { - invalidParams.Add(request.NewErrParamRequired("ArchiveAllowedFlag")) - } - if s.DeviceRestrictions == nil { - invalidParams.Add(request.NewErrParamRequired("DeviceRestrictions")) - } - if s.NoRegionalBlackoutFlag == nil { - invalidParams.Add(request.NewErrParamRequired("NoRegionalBlackoutFlag")) - } - if s.WebDeliveryAllowedFlag == nil { - invalidParams.Add(request.NewErrParamRequired("WebDeliveryAllowedFlag")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArchiveAllowedFlag sets the ArchiveAllowedFlag field's value. -func (s *Scte35DeliveryRestrictions) SetArchiveAllowedFlag(v string) *Scte35DeliveryRestrictions { - s.ArchiveAllowedFlag = &v - return s -} - -// SetDeviceRestrictions sets the DeviceRestrictions field's value. -func (s *Scte35DeliveryRestrictions) SetDeviceRestrictions(v string) *Scte35DeliveryRestrictions { - s.DeviceRestrictions = &v - return s -} - -// SetNoRegionalBlackoutFlag sets the NoRegionalBlackoutFlag field's value. -func (s *Scte35DeliveryRestrictions) SetNoRegionalBlackoutFlag(v string) *Scte35DeliveryRestrictions { - s.NoRegionalBlackoutFlag = &v - return s -} - -// SetWebDeliveryAllowedFlag sets the WebDeliveryAllowedFlag field's value. -func (s *Scte35DeliveryRestrictions) SetWebDeliveryAllowedFlag(v string) *Scte35DeliveryRestrictions { - s.WebDeliveryAllowedFlag = &v - return s -} - -// Holds one set of SCTE-35 Descriptor Settings. -type Scte35Descriptor struct { - _ struct{} `type:"structure"` - - // SCTE-35 Descriptor Settings. - // - // Scte35DescriptorSettings is a required field - Scte35DescriptorSettings *Scte35DescriptorSettings `locationName:"scte35DescriptorSettings" type:"structure" required:"true"` -} - -// String returns the string representation -func (s Scte35Descriptor) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scte35Descriptor) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Scte35Descriptor) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Scte35Descriptor"} - if s.Scte35DescriptorSettings == nil { - invalidParams.Add(request.NewErrParamRequired("Scte35DescriptorSettings")) - } - if s.Scte35DescriptorSettings != nil { - if err := s.Scte35DescriptorSettings.Validate(); err != nil { - invalidParams.AddNested("Scte35DescriptorSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetScte35DescriptorSettings sets the Scte35DescriptorSettings field's value. -func (s *Scte35Descriptor) SetScte35DescriptorSettings(v *Scte35DescriptorSettings) *Scte35Descriptor { - s.Scte35DescriptorSettings = v - return s -} - -// SCTE-35 Descriptor settings. -type Scte35DescriptorSettings struct { - _ struct{} `type:"structure"` - - // SCTE-35 Segmentation Descriptor. - // - // SegmentationDescriptorScte35DescriptorSettings is a required field - SegmentationDescriptorScte35DescriptorSettings *Scte35SegmentationDescriptor `locationName:"segmentationDescriptorScte35DescriptorSettings" type:"structure" required:"true"` -} - -// String returns the string representation -func (s Scte35DescriptorSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scte35DescriptorSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Scte35DescriptorSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Scte35DescriptorSettings"} - if s.SegmentationDescriptorScte35DescriptorSettings == nil { - invalidParams.Add(request.NewErrParamRequired("SegmentationDescriptorScte35DescriptorSettings")) - } - if s.SegmentationDescriptorScte35DescriptorSettings != nil { - if err := s.SegmentationDescriptorScte35DescriptorSettings.Validate(); err != nil { - invalidParams.AddNested("SegmentationDescriptorScte35DescriptorSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSegmentationDescriptorScte35DescriptorSettings sets the SegmentationDescriptorScte35DescriptorSettings field's value. -func (s *Scte35DescriptorSettings) SetSegmentationDescriptorScte35DescriptorSettings(v *Scte35SegmentationDescriptor) *Scte35DescriptorSettings { - s.SegmentationDescriptorScte35DescriptorSettings = v - return s -} - -// Settings for a SCTE-35 return_to_network message. -type Scte35ReturnToNetworkScheduleActionSettings struct { - _ struct{} `type:"structure"` - - // The splice_event_id for the SCTE-35 splice_insert, as defined in SCTE-35. - // - // SpliceEventId is a required field - SpliceEventId *int64 `locationName:"spliceEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s Scte35ReturnToNetworkScheduleActionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scte35ReturnToNetworkScheduleActionSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Scte35ReturnToNetworkScheduleActionSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Scte35ReturnToNetworkScheduleActionSettings"} - if s.SpliceEventId == nil { - invalidParams.Add(request.NewErrParamRequired("SpliceEventId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSpliceEventId sets the SpliceEventId field's value. -func (s *Scte35ReturnToNetworkScheduleActionSettings) SetSpliceEventId(v int64) *Scte35ReturnToNetworkScheduleActionSettings { - s.SpliceEventId = &v - return s -} - -// Corresponds to SCTE-35 segmentation_descriptor. -type Scte35SegmentationDescriptor struct { - _ struct{} `type:"structure"` - - // Holds the four SCTE-35 delivery restriction parameters. - DeliveryRestrictions *Scte35DeliveryRestrictions `locationName:"deliveryRestrictions" type:"structure"` - - // Corresponds to SCTE-35 segment_num. A value that is valid for the specified - // segmentation_type_id. - SegmentNum *int64 `locationName:"segmentNum" type:"integer"` - - // Corresponds to SCTE-35 segmentation_event_cancel_indicator. - // - // SegmentationCancelIndicator is a required field - SegmentationCancelIndicator *string `locationName:"segmentationCancelIndicator" type:"string" required:"true" enum:"Scte35SegmentationCancelIndicator"` - - // Corresponds to SCTE-35 segmentation_duration. Optional. The duration for - // the time_signal, in 90 KHz ticks. To convert seconds to ticks, multiple the - // seconds by 90,000. Enter time in 90 KHz clock ticks. If you do not enter - // a duration, the time_signal will continue until you insert a cancellation - // message. - SegmentationDuration *int64 `locationName:"segmentationDuration" type:"long"` - - // Corresponds to SCTE-35 segmentation_event_id. - // - // SegmentationEventId is a required field - SegmentationEventId *int64 `locationName:"segmentationEventId" type:"long" required:"true"` - - // Corresponds to SCTE-35 segmentation_type_id. One of the segmentation_type_id - // values listed in the SCTE-35 specification. On the console, enter the ID - // in decimal (for example, "52"). In the CLI, API, or an SDK, enter the ID - // in hex (for example, "0x34") or decimal (for example, "52"). - SegmentationTypeId *int64 `locationName:"segmentationTypeId" type:"integer"` - - // Corresponds to SCTE-35 segmentation_upid. Enter a string containing the hexadecimal - // representation of the characters that make up the SCTE-35 segmentation_upid - // value. Must contain an even number of hex characters. Do not include spaces - // between each hex pair. For example, the ASCII "ADS Information" becomes hex - // "41445320496e666f726d6174696f6e. - SegmentationUpid *string `locationName:"segmentationUpid" type:"string"` - - // Corresponds to SCTE-35 segmentation_upid_type. On the console, enter one - // of the types listed in the SCTE-35 specification, converted to a decimal. - // For example, "0x0C" hex from the specification is "12" in decimal. In the - // CLI, API, or an SDK, enter one of the types listed in the SCTE-35 specification, - // in either hex (for example, "0x0C" ) or in decimal (for example, "12"). - SegmentationUpidType *int64 `locationName:"segmentationUpidType" type:"integer"` - - // Corresponds to SCTE-35 segments_expected. A value that is valid for the specified - // segmentation_type_id. - SegmentsExpected *int64 `locationName:"segmentsExpected" type:"integer"` - - // Corresponds to SCTE-35 sub_segment_num. A value that is valid for the specified - // segmentation_type_id. - SubSegmentNum *int64 `locationName:"subSegmentNum" type:"integer"` - - // Corresponds to SCTE-35 sub_segments_expected. A value that is valid for the - // specified segmentation_type_id. - SubSegmentsExpected *int64 `locationName:"subSegmentsExpected" type:"integer"` -} - -// String returns the string representation -func (s Scte35SegmentationDescriptor) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scte35SegmentationDescriptor) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Scte35SegmentationDescriptor) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Scte35SegmentationDescriptor"} - if s.SegmentationCancelIndicator == nil { - invalidParams.Add(request.NewErrParamRequired("SegmentationCancelIndicator")) - } - if s.SegmentationEventId == nil { - invalidParams.Add(request.NewErrParamRequired("SegmentationEventId")) - } - if s.DeliveryRestrictions != nil { - if err := s.DeliveryRestrictions.Validate(); err != nil { - invalidParams.AddNested("DeliveryRestrictions", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryRestrictions sets the DeliveryRestrictions field's value. -func (s *Scte35SegmentationDescriptor) SetDeliveryRestrictions(v *Scte35DeliveryRestrictions) *Scte35SegmentationDescriptor { - s.DeliveryRestrictions = v - return s -} - -// SetSegmentNum sets the SegmentNum field's value. -func (s *Scte35SegmentationDescriptor) SetSegmentNum(v int64) *Scte35SegmentationDescriptor { - s.SegmentNum = &v - return s -} - -// SetSegmentationCancelIndicator sets the SegmentationCancelIndicator field's value. -func (s *Scte35SegmentationDescriptor) SetSegmentationCancelIndicator(v string) *Scte35SegmentationDescriptor { - s.SegmentationCancelIndicator = &v - return s -} - -// SetSegmentationDuration sets the SegmentationDuration field's value. -func (s *Scte35SegmentationDescriptor) SetSegmentationDuration(v int64) *Scte35SegmentationDescriptor { - s.SegmentationDuration = &v - return s -} - -// SetSegmentationEventId sets the SegmentationEventId field's value. -func (s *Scte35SegmentationDescriptor) SetSegmentationEventId(v int64) *Scte35SegmentationDescriptor { - s.SegmentationEventId = &v - return s -} - -// SetSegmentationTypeId sets the SegmentationTypeId field's value. -func (s *Scte35SegmentationDescriptor) SetSegmentationTypeId(v int64) *Scte35SegmentationDescriptor { - s.SegmentationTypeId = &v - return s -} - -// SetSegmentationUpid sets the SegmentationUpid field's value. -func (s *Scte35SegmentationDescriptor) SetSegmentationUpid(v string) *Scte35SegmentationDescriptor { - s.SegmentationUpid = &v - return s -} - -// SetSegmentationUpidType sets the SegmentationUpidType field's value. -func (s *Scte35SegmentationDescriptor) SetSegmentationUpidType(v int64) *Scte35SegmentationDescriptor { - s.SegmentationUpidType = &v - return s -} - -// SetSegmentsExpected sets the SegmentsExpected field's value. -func (s *Scte35SegmentationDescriptor) SetSegmentsExpected(v int64) *Scte35SegmentationDescriptor { - s.SegmentsExpected = &v - return s -} - -// SetSubSegmentNum sets the SubSegmentNum field's value. -func (s *Scte35SegmentationDescriptor) SetSubSegmentNum(v int64) *Scte35SegmentationDescriptor { - s.SubSegmentNum = &v - return s -} - -// SetSubSegmentsExpected sets the SubSegmentsExpected field's value. -func (s *Scte35SegmentationDescriptor) SetSubSegmentsExpected(v int64) *Scte35SegmentationDescriptor { - s.SubSegmentsExpected = &v - return s -} - -type Scte35SpliceInsert struct { - _ struct{} `type:"structure"` - - // When specified, this offset (in milliseconds) is added to the input Ad Avail - // PTS time. This only applies to embedded SCTE 104/35 messages and does not - // apply to OOB messages. - AdAvailOffset *int64 `locationName:"adAvailOffset" type:"integer"` - - // When set to ignore, Segment Descriptors with noRegionalBlackoutFlag set to - // 0 will no longer trigger blackouts or Ad Avail slates - NoRegionalBlackoutFlag *string `locationName:"noRegionalBlackoutFlag" type:"string" enum:"Scte35SpliceInsertNoRegionalBlackoutBehavior"` - - // When set to ignore, Segment Descriptors with webDeliveryAllowedFlag set to - // 0 will no longer trigger blackouts or Ad Avail slates - WebDeliveryAllowedFlag *string `locationName:"webDeliveryAllowedFlag" type:"string" enum:"Scte35SpliceInsertWebDeliveryAllowedBehavior"` -} - -// String returns the string representation -func (s Scte35SpliceInsert) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scte35SpliceInsert) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Scte35SpliceInsert) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Scte35SpliceInsert"} - if s.AdAvailOffset != nil && *s.AdAvailOffset < -1000 { - invalidParams.Add(request.NewErrParamMinValue("AdAvailOffset", -1000)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdAvailOffset sets the AdAvailOffset field's value. -func (s *Scte35SpliceInsert) SetAdAvailOffset(v int64) *Scte35SpliceInsert { - s.AdAvailOffset = &v - return s -} - -// SetNoRegionalBlackoutFlag sets the NoRegionalBlackoutFlag field's value. -func (s *Scte35SpliceInsert) SetNoRegionalBlackoutFlag(v string) *Scte35SpliceInsert { - s.NoRegionalBlackoutFlag = &v - return s -} - -// SetWebDeliveryAllowedFlag sets the WebDeliveryAllowedFlag field's value. -func (s *Scte35SpliceInsert) SetWebDeliveryAllowedFlag(v string) *Scte35SpliceInsert { - s.WebDeliveryAllowedFlag = &v - return s -} - -// Settings for a SCTE-35 splice_insert message. -type Scte35SpliceInsertScheduleActionSettings struct { - _ struct{} `type:"structure"` - - // Optional, the duration for the splice_insert, in 90 KHz ticks. To convert - // seconds to ticks, multiple the seconds by 90,000. If you enter a duration, - // there is an expectation that the downstream system can read the duration - // and cue in at that time. If you do not enter a duration, the splice_insert - // will continue indefinitely and there is an expectation that you will enter - // a return_to_network to end the splice_insert at the appropriate time. - Duration *int64 `locationName:"duration" type:"long"` - - // The splice_event_id for the SCTE-35 splice_insert, as defined in SCTE-35. - // - // SpliceEventId is a required field - SpliceEventId *int64 `locationName:"spliceEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s Scte35SpliceInsertScheduleActionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scte35SpliceInsertScheduleActionSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Scte35SpliceInsertScheduleActionSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Scte35SpliceInsertScheduleActionSettings"} - if s.SpliceEventId == nil { - invalidParams.Add(request.NewErrParamRequired("SpliceEventId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDuration sets the Duration field's value. -func (s *Scte35SpliceInsertScheduleActionSettings) SetDuration(v int64) *Scte35SpliceInsertScheduleActionSettings { - s.Duration = &v - return s -} - -// SetSpliceEventId sets the SpliceEventId field's value. -func (s *Scte35SpliceInsertScheduleActionSettings) SetSpliceEventId(v int64) *Scte35SpliceInsertScheduleActionSettings { - s.SpliceEventId = &v - return s -} - -type Scte35TimeSignalApos struct { - _ struct{} `type:"structure"` - - // When specified, this offset (in milliseconds) is added to the input Ad Avail - // PTS time. This only applies to embedded SCTE 104/35 messages and does not - // apply to OOB messages. - AdAvailOffset *int64 `locationName:"adAvailOffset" type:"integer"` - - // When set to ignore, Segment Descriptors with noRegionalBlackoutFlag set to - // 0 will no longer trigger blackouts or Ad Avail slates - NoRegionalBlackoutFlag *string `locationName:"noRegionalBlackoutFlag" type:"string" enum:"Scte35AposNoRegionalBlackoutBehavior"` - - // When set to ignore, Segment Descriptors with webDeliveryAllowedFlag set to - // 0 will no longer trigger blackouts or Ad Avail slates - WebDeliveryAllowedFlag *string `locationName:"webDeliveryAllowedFlag" type:"string" enum:"Scte35AposWebDeliveryAllowedBehavior"` -} - -// String returns the string representation -func (s Scte35TimeSignalApos) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scte35TimeSignalApos) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Scte35TimeSignalApos) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Scte35TimeSignalApos"} - if s.AdAvailOffset != nil && *s.AdAvailOffset < -1000 { - invalidParams.Add(request.NewErrParamMinValue("AdAvailOffset", -1000)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdAvailOffset sets the AdAvailOffset field's value. -func (s *Scte35TimeSignalApos) SetAdAvailOffset(v int64) *Scte35TimeSignalApos { - s.AdAvailOffset = &v - return s -} - -// SetNoRegionalBlackoutFlag sets the NoRegionalBlackoutFlag field's value. -func (s *Scte35TimeSignalApos) SetNoRegionalBlackoutFlag(v string) *Scte35TimeSignalApos { - s.NoRegionalBlackoutFlag = &v - return s -} - -// SetWebDeliveryAllowedFlag sets the WebDeliveryAllowedFlag field's value. -func (s *Scte35TimeSignalApos) SetWebDeliveryAllowedFlag(v string) *Scte35TimeSignalApos { - s.WebDeliveryAllowedFlag = &v - return s -} - -// Settings for a SCTE-35 time_signal. -type Scte35TimeSignalScheduleActionSettings struct { - _ struct{} `type:"structure"` - - // The list of SCTE-35 descriptors accompanying the SCTE-35 time_signal. - // - // Scte35Descriptors is a required field - Scte35Descriptors []*Scte35Descriptor `locationName:"scte35Descriptors" type:"list" required:"true"` -} - -// String returns the string representation -func (s Scte35TimeSignalScheduleActionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Scte35TimeSignalScheduleActionSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Scte35TimeSignalScheduleActionSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Scte35TimeSignalScheduleActionSettings"} - if s.Scte35Descriptors == nil { - invalidParams.Add(request.NewErrParamRequired("Scte35Descriptors")) - } - if s.Scte35Descriptors != nil { - for i, v := range s.Scte35Descriptors { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Scte35Descriptors", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetScte35Descriptors sets the Scte35Descriptors field's value. -func (s *Scte35TimeSignalScheduleActionSettings) SetScte35Descriptors(v []*Scte35Descriptor) *Scte35TimeSignalScheduleActionSettings { - s.Scte35Descriptors = v - return s -} - -type SmpteTtDestinationSettings struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SmpteTtDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SmpteTtDestinationSettings) GoString() string { - return s.String() -} - -type StandardHlsSettings struct { - _ struct{} `type:"structure"` - - // List all the audio groups that are used with the video output stream. Input - // all the audio GROUP-IDs that are associated to the video, separate by ','. - AudioRenditionSets *string `locationName:"audioRenditionSets" type:"string"` - - // Settings information for the .m3u8 container - // - // M3u8Settings is a required field - M3u8Settings *M3u8Settings `locationName:"m3u8Settings" type:"structure" required:"true"` -} - -// String returns the string representation -func (s StandardHlsSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StandardHlsSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StandardHlsSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StandardHlsSettings"} - if s.M3u8Settings == nil { - invalidParams.Add(request.NewErrParamRequired("M3u8Settings")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAudioRenditionSets sets the AudioRenditionSets field's value. -func (s *StandardHlsSettings) SetAudioRenditionSets(v string) *StandardHlsSettings { - s.AudioRenditionSets = &v - return s -} - -// SetM3u8Settings sets the M3u8Settings field's value. -func (s *StandardHlsSettings) SetM3u8Settings(v *M3u8Settings) *StandardHlsSettings { - s.M3u8Settings = v - return s -} - -type StartChannelInput struct { - _ struct{} `type:"structure"` - - // ChannelId is a required field - ChannelId *string `location:"uri" locationName:"channelId" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartChannelInput"} - if s.ChannelId == nil { - invalidParams.Add(request.NewErrParamRequired("ChannelId")) - } - if s.ChannelId != nil && len(*s.ChannelId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChannelId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChannelId sets the ChannelId field's value. -func (s *StartChannelInput) SetChannelId(v string) *StartChannelInput { - s.ChannelId = &v - return s -} - -type StartChannelOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Destinations []*OutputDestination `locationName:"destinations" type:"list"` - - EgressEndpoints []*ChannelEgressEndpoint `locationName:"egressEndpoints" type:"list"` - - EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` - - Id *string `locationName:"id" type:"string"` - - InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` - - InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` - - // The log level the user wants for their channel. - LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` - - Name *string `locationName:"name" type:"string"` - - PipelinesRunningCount *int64 `locationName:"pipelinesRunningCount" type:"integer"` - - RoleArn *string `locationName:"roleArn" type:"string"` - - State *string `locationName:"state" type:"string" enum:"ChannelState"` -} - -// String returns the string representation -func (s StartChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartChannelOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *StartChannelOutput) SetArn(v string) *StartChannelOutput { - s.Arn = &v - return s -} - -// SetDestinations sets the Destinations field's value. -func (s *StartChannelOutput) SetDestinations(v []*OutputDestination) *StartChannelOutput { - s.Destinations = v - return s -} - -// SetEgressEndpoints sets the EgressEndpoints field's value. -func (s *StartChannelOutput) SetEgressEndpoints(v []*ChannelEgressEndpoint) *StartChannelOutput { - s.EgressEndpoints = v - return s -} - -// SetEncoderSettings sets the EncoderSettings field's value. -func (s *StartChannelOutput) SetEncoderSettings(v *EncoderSettings) *StartChannelOutput { - s.EncoderSettings = v - return s -} - -// SetId sets the Id field's value. -func (s *StartChannelOutput) SetId(v string) *StartChannelOutput { - s.Id = &v - return s -} - -// SetInputAttachments sets the InputAttachments field's value. -func (s *StartChannelOutput) SetInputAttachments(v []*InputAttachment) *StartChannelOutput { - s.InputAttachments = v - return s -} - -// SetInputSpecification sets the InputSpecification field's value. -func (s *StartChannelOutput) SetInputSpecification(v *InputSpecification) *StartChannelOutput { - s.InputSpecification = v - return s -} - -// SetLogLevel sets the LogLevel field's value. -func (s *StartChannelOutput) SetLogLevel(v string) *StartChannelOutput { - s.LogLevel = &v - return s -} - -// SetName sets the Name field's value. -func (s *StartChannelOutput) SetName(v string) *StartChannelOutput { - s.Name = &v - return s -} - -// SetPipelinesRunningCount sets the PipelinesRunningCount field's value. -func (s *StartChannelOutput) SetPipelinesRunningCount(v int64) *StartChannelOutput { - s.PipelinesRunningCount = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *StartChannelOutput) SetRoleArn(v string) *StartChannelOutput { - s.RoleArn = &v - return s -} - -// SetState sets the State field's value. -func (s *StartChannelOutput) SetState(v string) *StartChannelOutput { - s.State = &v - return s -} - -// Settings for the action to activate a static image. -type StaticImageActivateScheduleActionSettings struct { - _ struct{} `type:"structure"` - - // The duration in milliseconds for the image to remain on the video. If omitted - // or set to 0 the duration is unlimited and the image will remain until it - // is explicitly deactivated. - Duration *int64 `locationName:"duration" type:"integer"` - - // The time in milliseconds for the image to fade in. The fade-in starts at - // the start time of the overlay. Default is 0 (no fade-in). - FadeIn *int64 `locationName:"fadeIn" type:"integer"` - - // Applies only if a duration is specified. The time in milliseconds for the - // image to fade out. The fade-out starts when the duration time is hit, so - // it effectively extends the duration. Default is 0 (no fade-out). - FadeOut *int64 `locationName:"fadeOut" type:"integer"` - - // The height of the image when inserted into the video, in pixels. The overlay - // will be scaled up or down to the specified height. Leave blank to use the - // native height of the overlay. - Height *int64 `locationName:"height" min:"1" type:"integer"` - - // The location and filename of the image file to overlay on the video. The - // file must be a 32-bit BMP, PNG, or TGA file, and must not be larger (in pixels) - // than the input video. - // - // Image is a required field - Image *InputLocation `locationName:"image" type:"structure" required:"true"` - - // Placement of the left edge of the overlay relative to the left edge of the - // video frame, in pixels. 0 (the default) is the left edge of the frame. If - // the placement causes the overlay to extend beyond the right edge of the underlying - // video, then the overlay is cropped on the right. - ImageX *int64 `locationName:"imageX" type:"integer"` - - // Placement of the top edge of the overlay relative to the top edge of the - // video frame, in pixels. 0 (the default) is the top edge of the frame. If - // the placement causes the overlay to extend beyond the bottom edge of the - // underlying video, then the overlay is cropped on the bottom. - ImageY *int64 `locationName:"imageY" type:"integer"` - - // The number of the layer, 0 to 7. There are 8 layers that can be overlaid - // on the video, each layer with a different image. The layers are in Z order, - // which means that overlays with higher values of layer are inserted on top - // of overlays with lower values of layer. Default is 0. - Layer *int64 `locationName:"layer" type:"integer"` - - // Opacity of image where 0 is transparent and 100 is fully opaque. Default - // is 100. - Opacity *int64 `locationName:"opacity" type:"integer"` - - // The width of the image when inserted into the video, in pixels. The overlay - // will be scaled up or down to the specified width. Leave blank to use the - // native width of the overlay. - Width *int64 `locationName:"width" min:"1" type:"integer"` -} - -// String returns the string representation -func (s StaticImageActivateScheduleActionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StaticImageActivateScheduleActionSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StaticImageActivateScheduleActionSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StaticImageActivateScheduleActionSettings"} - if s.Height != nil && *s.Height < 1 { - invalidParams.Add(request.NewErrParamMinValue("Height", 1)) - } - if s.Image == nil { - invalidParams.Add(request.NewErrParamRequired("Image")) - } - if s.Width != nil && *s.Width < 1 { - invalidParams.Add(request.NewErrParamMinValue("Width", 1)) - } - if s.Image != nil { - if err := s.Image.Validate(); err != nil { - invalidParams.AddNested("Image", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDuration sets the Duration field's value. -func (s *StaticImageActivateScheduleActionSettings) SetDuration(v int64) *StaticImageActivateScheduleActionSettings { - s.Duration = &v - return s -} - -// SetFadeIn sets the FadeIn field's value. -func (s *StaticImageActivateScheduleActionSettings) SetFadeIn(v int64) *StaticImageActivateScheduleActionSettings { - s.FadeIn = &v - return s -} - -// SetFadeOut sets the FadeOut field's value. -func (s *StaticImageActivateScheduleActionSettings) SetFadeOut(v int64) *StaticImageActivateScheduleActionSettings { - s.FadeOut = &v - return s -} - -// SetHeight sets the Height field's value. -func (s *StaticImageActivateScheduleActionSettings) SetHeight(v int64) *StaticImageActivateScheduleActionSettings { - s.Height = &v - return s -} - -// SetImage sets the Image field's value. -func (s *StaticImageActivateScheduleActionSettings) SetImage(v *InputLocation) *StaticImageActivateScheduleActionSettings { - s.Image = v - return s -} - -// SetImageX sets the ImageX field's value. -func (s *StaticImageActivateScheduleActionSettings) SetImageX(v int64) *StaticImageActivateScheduleActionSettings { - s.ImageX = &v - return s -} - -// SetImageY sets the ImageY field's value. -func (s *StaticImageActivateScheduleActionSettings) SetImageY(v int64) *StaticImageActivateScheduleActionSettings { - s.ImageY = &v - return s -} - -// SetLayer sets the Layer field's value. -func (s *StaticImageActivateScheduleActionSettings) SetLayer(v int64) *StaticImageActivateScheduleActionSettings { - s.Layer = &v - return s -} - -// SetOpacity sets the Opacity field's value. -func (s *StaticImageActivateScheduleActionSettings) SetOpacity(v int64) *StaticImageActivateScheduleActionSettings { - s.Opacity = &v - return s -} - -// SetWidth sets the Width field's value. -func (s *StaticImageActivateScheduleActionSettings) SetWidth(v int64) *StaticImageActivateScheduleActionSettings { - s.Width = &v - return s -} - -// Settings for the action to deactivate the image in a specific layer. -type StaticImageDeactivateScheduleActionSettings struct { - _ struct{} `type:"structure"` - - // The time in milliseconds for the image to fade out. Default is 0 (no fade-out). - FadeOut *int64 `locationName:"fadeOut" type:"integer"` - - // The image overlay layer to deactivate, 0 to 7. Default is 0. - Layer *int64 `locationName:"layer" type:"integer"` -} - -// String returns the string representation -func (s StaticImageDeactivateScheduleActionSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StaticImageDeactivateScheduleActionSettings) GoString() string { - return s.String() -} - -// SetFadeOut sets the FadeOut field's value. -func (s *StaticImageDeactivateScheduleActionSettings) SetFadeOut(v int64) *StaticImageDeactivateScheduleActionSettings { - s.FadeOut = &v - return s -} - -// SetLayer sets the Layer field's value. -func (s *StaticImageDeactivateScheduleActionSettings) SetLayer(v int64) *StaticImageDeactivateScheduleActionSettings { - s.Layer = &v - return s -} - -type StaticKeySettings struct { - _ struct{} `type:"structure"` - - // The URL of the license server used for protecting content. - KeyProviderServer *InputLocation `locationName:"keyProviderServer" type:"structure"` - - // Static key value as a 32 character hexadecimal string. - // - // StaticKeyValue is a required field - StaticKeyValue *string `locationName:"staticKeyValue" min:"32" type:"string" required:"true"` -} - -// String returns the string representation -func (s StaticKeySettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StaticKeySettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StaticKeySettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StaticKeySettings"} - if s.StaticKeyValue == nil { - invalidParams.Add(request.NewErrParamRequired("StaticKeyValue")) - } - if s.StaticKeyValue != nil && len(*s.StaticKeyValue) < 32 { - invalidParams.Add(request.NewErrParamMinLen("StaticKeyValue", 32)) - } - if s.KeyProviderServer != nil { - if err := s.KeyProviderServer.Validate(); err != nil { - invalidParams.AddNested("KeyProviderServer", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyProviderServer sets the KeyProviderServer field's value. -func (s *StaticKeySettings) SetKeyProviderServer(v *InputLocation) *StaticKeySettings { - s.KeyProviderServer = v - return s -} - -// SetStaticKeyValue sets the StaticKeyValue field's value. -func (s *StaticKeySettings) SetStaticKeyValue(v string) *StaticKeySettings { - s.StaticKeyValue = &v - return s -} - -type StopChannelInput struct { - _ struct{} `type:"structure"` - - // ChannelId is a required field - ChannelId *string `location:"uri" locationName:"channelId" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopChannelInput"} - if s.ChannelId == nil { - invalidParams.Add(request.NewErrParamRequired("ChannelId")) - } - if s.ChannelId != nil && len(*s.ChannelId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChannelId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChannelId sets the ChannelId field's value. -func (s *StopChannelInput) SetChannelId(v string) *StopChannelInput { - s.ChannelId = &v - return s -} - -type StopChannelOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Destinations []*OutputDestination `locationName:"destinations" type:"list"` - - EgressEndpoints []*ChannelEgressEndpoint `locationName:"egressEndpoints" type:"list"` - - EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` - - Id *string `locationName:"id" type:"string"` - - InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` - - InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` - - // The log level the user wants for their channel. - LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` - - Name *string `locationName:"name" type:"string"` - - PipelinesRunningCount *int64 `locationName:"pipelinesRunningCount" type:"integer"` - - RoleArn *string `locationName:"roleArn" type:"string"` - - State *string `locationName:"state" type:"string" enum:"ChannelState"` -} - -// String returns the string representation -func (s StopChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopChannelOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *StopChannelOutput) SetArn(v string) *StopChannelOutput { - s.Arn = &v - return s -} - -// SetDestinations sets the Destinations field's value. -func (s *StopChannelOutput) SetDestinations(v []*OutputDestination) *StopChannelOutput { - s.Destinations = v - return s -} - -// SetEgressEndpoints sets the EgressEndpoints field's value. -func (s *StopChannelOutput) SetEgressEndpoints(v []*ChannelEgressEndpoint) *StopChannelOutput { - s.EgressEndpoints = v - return s -} - -// SetEncoderSettings sets the EncoderSettings field's value. -func (s *StopChannelOutput) SetEncoderSettings(v *EncoderSettings) *StopChannelOutput { - s.EncoderSettings = v - return s -} - -// SetId sets the Id field's value. -func (s *StopChannelOutput) SetId(v string) *StopChannelOutput { - s.Id = &v - return s -} - -// SetInputAttachments sets the InputAttachments field's value. -func (s *StopChannelOutput) SetInputAttachments(v []*InputAttachment) *StopChannelOutput { - s.InputAttachments = v - return s -} - -// SetInputSpecification sets the InputSpecification field's value. -func (s *StopChannelOutput) SetInputSpecification(v *InputSpecification) *StopChannelOutput { - s.InputSpecification = v - return s -} - -// SetLogLevel sets the LogLevel field's value. -func (s *StopChannelOutput) SetLogLevel(v string) *StopChannelOutput { - s.LogLevel = &v - return s -} - -// SetName sets the Name field's value. -func (s *StopChannelOutput) SetName(v string) *StopChannelOutput { - s.Name = &v - return s -} - -// SetPipelinesRunningCount sets the PipelinesRunningCount field's value. -func (s *StopChannelOutput) SetPipelinesRunningCount(v int64) *StopChannelOutput { - s.PipelinesRunningCount = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *StopChannelOutput) SetRoleArn(v string) *StopChannelOutput { - s.RoleArn = &v - return s -} - -// SetState sets the State field's value. -func (s *StopChannelOutput) SetState(v string) *StopChannelOutput { - s.State = &v - return s -} - -type TeletextDestinationSettings struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TeletextDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TeletextDestinationSettings) GoString() string { - return s.String() -} - -type TeletextSourceSettings struct { - _ struct{} `type:"structure"` - - // Specifies the teletext page number within the data stream from which to extract - // captions. Range of 0x100 (256) to 0x8FF (2303). Unused for passthrough. Should - // be specified as a hexadecimal string with no "0x" prefix. - PageNumber *string `locationName:"pageNumber" type:"string"` -} - -// String returns the string representation -func (s TeletextSourceSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TeletextSourceSettings) GoString() string { - return s.String() -} - -// SetPageNumber sets the PageNumber field's value. -func (s *TeletextSourceSettings) SetPageNumber(v string) *TeletextSourceSettings { - s.PageNumber = &v - return s -} - -type TimecodeConfig struct { - _ struct{} `type:"structure"` - - // Identifies the source for the timecode that will be associated with the events - // outputs.-Embedded (embedded): Initialize the output timecode with timecode - // from the the source. If no embedded timecode is detected in the source, the - // system falls back to using "Start at 0" (zerobased).-System Clock (systemclock): - // Use the UTC time.-Start at 0 (zerobased): The time of the first frame of - // the event will be 00:00:00:00. - // - // Source is a required field - Source *string `locationName:"source" type:"string" required:"true" enum:"TimecodeConfigSource"` - - // Threshold in frames beyond which output timecode is resynchronized to the - // input timecode. Discrepancies below this threshold are permitted to avoid - // unnecessary discontinuities in the output timecode. No timecode sync when - // this is not specified. - SyncThreshold *int64 `locationName:"syncThreshold" min:"1" type:"integer"` -} - -// String returns the string representation -func (s TimecodeConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimecodeConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TimecodeConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TimecodeConfig"} - if s.Source == nil { - invalidParams.Add(request.NewErrParamRequired("Source")) - } - if s.SyncThreshold != nil && *s.SyncThreshold < 1 { - invalidParams.Add(request.NewErrParamMinValue("SyncThreshold", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSource sets the Source field's value. -func (s *TimecodeConfig) SetSource(v string) *TimecodeConfig { - s.Source = &v - return s -} - -// SetSyncThreshold sets the SyncThreshold field's value. -func (s *TimecodeConfig) SetSyncThreshold(v int64) *TimecodeConfig { - s.SyncThreshold = &v - return s -} - -type TtmlDestinationSettings struct { - _ struct{} `type:"structure"` - - // When set to passthrough, passes through style and position information from - // a TTML-like input source (TTML, SMPTE-TT, CFF-TT) to the CFF-TT output or - // TTML output. - StyleControl *string `locationName:"styleControl" type:"string" enum:"TtmlDestinationStyleControl"` -} - -// String returns the string representation -func (s TtmlDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TtmlDestinationSettings) GoString() string { - return s.String() -} - -// SetStyleControl sets the StyleControl field's value. -func (s *TtmlDestinationSettings) SetStyleControl(v string) *TtmlDestinationSettings { - s.StyleControl = &v - return s -} - -type UdpContainerSettings struct { - _ struct{} `type:"structure"` - - M2tsSettings *M2tsSettings `locationName:"m2tsSettings" type:"structure"` -} - -// String returns the string representation -func (s UdpContainerSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UdpContainerSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UdpContainerSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UdpContainerSettings"} - if s.M2tsSettings != nil { - if err := s.M2tsSettings.Validate(); err != nil { - invalidParams.AddNested("M2tsSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetM2tsSettings sets the M2tsSettings field's value. -func (s *UdpContainerSettings) SetM2tsSettings(v *M2tsSettings) *UdpContainerSettings { - s.M2tsSettings = v - return s -} - -type UdpGroupSettings struct { - _ struct{} `type:"structure"` - - // Specifies behavior of last resort when input video is lost, and no more backup - // inputs are available. When dropTs is selected the entire transport stream - // will stop being emitted. When dropProgram is selected the program can be - // dropped from the transport stream (and replaced with null packets to meet - // the TS bitrate requirement). Or, when emitProgram is chosen the transport - // stream will continue to be produced normally with repeat frames, black frames, - // or slate frames substituted for the absent input video. - InputLossAction *string `locationName:"inputLossAction" type:"string" enum:"InputLossActionForUdpOut"` - - // Indicates ID3 frame that has the timecode. - TimedMetadataId3Frame *string `locationName:"timedMetadataId3Frame" type:"string" enum:"UdpTimedMetadataId3Frame"` - - // Timed Metadata interval in seconds. - TimedMetadataId3Period *int64 `locationName:"timedMetadataId3Period" type:"integer"` -} - -// String returns the string representation -func (s UdpGroupSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UdpGroupSettings) GoString() string { - return s.String() -} - -// SetInputLossAction sets the InputLossAction field's value. -func (s *UdpGroupSettings) SetInputLossAction(v string) *UdpGroupSettings { - s.InputLossAction = &v - return s -} - -// SetTimedMetadataId3Frame sets the TimedMetadataId3Frame field's value. -func (s *UdpGroupSettings) SetTimedMetadataId3Frame(v string) *UdpGroupSettings { - s.TimedMetadataId3Frame = &v - return s -} - -// SetTimedMetadataId3Period sets the TimedMetadataId3Period field's value. -func (s *UdpGroupSettings) SetTimedMetadataId3Period(v int64) *UdpGroupSettings { - s.TimedMetadataId3Period = &v - return s -} - -type UdpOutputSettings struct { - _ struct{} `type:"structure"` - - // UDP output buffering in milliseconds. Larger values increase latency through - // the transcoder but simultaneously assist the transcoder in maintaining a - // constant, low-jitter UDP/RTP output while accommodating clock recovery, input - // switching, input disruptions, picture reordering, etc. - BufferMsec *int64 `locationName:"bufferMsec" type:"integer"` - - // ContainerSettings is a required field - ContainerSettings *UdpContainerSettings `locationName:"containerSettings" type:"structure" required:"true"` - - // Destination address and port number for RTP or UDP packets. Can be unicast - // or multicast RTP or UDP (eg. rtp://239.10.10.10:5001 or udp://10.100.100.100:5002). - // - // Destination is a required field - Destination *OutputLocationRef `locationName:"destination" type:"structure" required:"true"` - - // Settings for enabling and adjusting Forward Error Correction on UDP outputs. - FecOutputSettings *FecOutputSettings `locationName:"fecOutputSettings" type:"structure"` -} - -// String returns the string representation -func (s UdpOutputSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UdpOutputSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UdpOutputSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UdpOutputSettings"} - if s.ContainerSettings == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerSettings")) - } - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - if s.ContainerSettings != nil { - if err := s.ContainerSettings.Validate(); err != nil { - invalidParams.AddNested("ContainerSettings", err.(request.ErrInvalidParams)) - } - } - if s.FecOutputSettings != nil { - if err := s.FecOutputSettings.Validate(); err != nil { - invalidParams.AddNested("FecOutputSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBufferMsec sets the BufferMsec field's value. -func (s *UdpOutputSettings) SetBufferMsec(v int64) *UdpOutputSettings { - s.BufferMsec = &v - return s -} - -// SetContainerSettings sets the ContainerSettings field's value. -func (s *UdpOutputSettings) SetContainerSettings(v *UdpContainerSettings) *UdpOutputSettings { - s.ContainerSettings = v - return s -} - -// SetDestination sets the Destination field's value. -func (s *UdpOutputSettings) SetDestination(v *OutputLocationRef) *UdpOutputSettings { - s.Destination = v - return s -} - -// SetFecOutputSettings sets the FecOutputSettings field's value. -func (s *UdpOutputSettings) SetFecOutputSettings(v *FecOutputSettings) *UdpOutputSettings { - s.FecOutputSettings = v - return s -} - -type UpdateChannelInput struct { - _ struct{} `type:"structure"` - - // ChannelId is a required field - ChannelId *string `location:"uri" locationName:"channelId" type:"string" required:"true"` - - Destinations []*OutputDestination `locationName:"destinations" type:"list"` - - EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` - - InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` - - InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` - - // The log level the user wants for their channel. - LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` - - Name *string `locationName:"name" type:"string"` - - RoleArn *string `locationName:"roleArn" type:"string"` -} - -// String returns the string representation -func (s UpdateChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateChannelInput"} - if s.ChannelId == nil { - invalidParams.Add(request.NewErrParamRequired("ChannelId")) - } - if s.ChannelId != nil && len(*s.ChannelId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChannelId", 1)) - } - if s.EncoderSettings != nil { - if err := s.EncoderSettings.Validate(); err != nil { - invalidParams.AddNested("EncoderSettings", err.(request.ErrInvalidParams)) - } - } - if s.InputAttachments != nil { - for i, v := range s.InputAttachments { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputAttachments", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChannelId sets the ChannelId field's value. -func (s *UpdateChannelInput) SetChannelId(v string) *UpdateChannelInput { - s.ChannelId = &v - return s -} - -// SetDestinations sets the Destinations field's value. -func (s *UpdateChannelInput) SetDestinations(v []*OutputDestination) *UpdateChannelInput { - s.Destinations = v - return s -} - -// SetEncoderSettings sets the EncoderSettings field's value. -func (s *UpdateChannelInput) SetEncoderSettings(v *EncoderSettings) *UpdateChannelInput { - s.EncoderSettings = v - return s -} - -// SetInputAttachments sets the InputAttachments field's value. -func (s *UpdateChannelInput) SetInputAttachments(v []*InputAttachment) *UpdateChannelInput { - s.InputAttachments = v - return s -} - -// SetInputSpecification sets the InputSpecification field's value. -func (s *UpdateChannelInput) SetInputSpecification(v *InputSpecification) *UpdateChannelInput { - s.InputSpecification = v - return s -} - -// SetLogLevel sets the LogLevel field's value. -func (s *UpdateChannelInput) SetLogLevel(v string) *UpdateChannelInput { - s.LogLevel = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateChannelInput) SetName(v string) *UpdateChannelInput { - s.Name = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *UpdateChannelInput) SetRoleArn(v string) *UpdateChannelInput { - s.RoleArn = &v - return s -} - -type UpdateChannelOutput struct { - _ struct{} `type:"structure"` - - Channel *Channel `locationName:"channel" type:"structure"` -} - -// String returns the string representation -func (s UpdateChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateChannelOutput) GoString() string { - return s.String() -} - -// SetChannel sets the Channel field's value. -func (s *UpdateChannelOutput) SetChannel(v *Channel) *UpdateChannelOutput { - s.Channel = v - return s -} - -type UpdateInputInput struct { - _ struct{} `type:"structure"` - - Destinations []*InputDestinationRequest `locationName:"destinations" type:"list"` - - // InputId is a required field - InputId *string `location:"uri" locationName:"inputId" type:"string" required:"true"` - - InputSecurityGroups []*string `locationName:"inputSecurityGroups" type:"list"` - - MediaConnectFlows []*MediaConnectFlowRequest `locationName:"mediaConnectFlows" type:"list"` - - Name *string `locationName:"name" type:"string"` - - RoleArn *string `locationName:"roleArn" type:"string"` - - Sources []*InputSourceRequest `locationName:"sources" type:"list"` -} - -// String returns the string representation -func (s UpdateInputInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateInputInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateInputInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateInputInput"} - if s.InputId == nil { - invalidParams.Add(request.NewErrParamRequired("InputId")) - } - if s.InputId != nil && len(*s.InputId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinations sets the Destinations field's value. -func (s *UpdateInputInput) SetDestinations(v []*InputDestinationRequest) *UpdateInputInput { - s.Destinations = v - return s -} - -// SetInputId sets the InputId field's value. -func (s *UpdateInputInput) SetInputId(v string) *UpdateInputInput { - s.InputId = &v - return s -} - -// SetInputSecurityGroups sets the InputSecurityGroups field's value. -func (s *UpdateInputInput) SetInputSecurityGroups(v []*string) *UpdateInputInput { - s.InputSecurityGroups = v - return s -} - -// SetMediaConnectFlows sets the MediaConnectFlows field's value. -func (s *UpdateInputInput) SetMediaConnectFlows(v []*MediaConnectFlowRequest) *UpdateInputInput { - s.MediaConnectFlows = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateInputInput) SetName(v string) *UpdateInputInput { - s.Name = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *UpdateInputInput) SetRoleArn(v string) *UpdateInputInput { - s.RoleArn = &v - return s -} - -// SetSources sets the Sources field's value. -func (s *UpdateInputInput) SetSources(v []*InputSourceRequest) *UpdateInputInput { - s.Sources = v - return s -} - -type UpdateInputOutput struct { - _ struct{} `type:"structure"` - - Input *Input `locationName:"input" type:"structure"` -} - -// String returns the string representation -func (s UpdateInputOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateInputOutput) GoString() string { - return s.String() -} - -// SetInput sets the Input field's value. -func (s *UpdateInputOutput) SetInput(v *Input) *UpdateInputOutput { - s.Input = v - return s -} - -type UpdateInputSecurityGroupInput struct { - _ struct{} `type:"structure"` - - // InputSecurityGroupId is a required field - InputSecurityGroupId *string `location:"uri" locationName:"inputSecurityGroupId" type:"string" required:"true"` - - WhitelistRules []*InputWhitelistRuleCidr `locationName:"whitelistRules" type:"list"` -} - -// String returns the string representation -func (s UpdateInputSecurityGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateInputSecurityGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateInputSecurityGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateInputSecurityGroupInput"} - if s.InputSecurityGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("InputSecurityGroupId")) - } - if s.InputSecurityGroupId != nil && len(*s.InputSecurityGroupId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputSecurityGroupId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInputSecurityGroupId sets the InputSecurityGroupId field's value. -func (s *UpdateInputSecurityGroupInput) SetInputSecurityGroupId(v string) *UpdateInputSecurityGroupInput { - s.InputSecurityGroupId = &v - return s -} - -// SetWhitelistRules sets the WhitelistRules field's value. -func (s *UpdateInputSecurityGroupInput) SetWhitelistRules(v []*InputWhitelistRuleCidr) *UpdateInputSecurityGroupInput { - s.WhitelistRules = v - return s -} - -type UpdateInputSecurityGroupOutput struct { - _ struct{} `type:"structure"` - - // An Input Security Group - SecurityGroup *InputSecurityGroup `locationName:"securityGroup" type:"structure"` -} - -// String returns the string representation -func (s UpdateInputSecurityGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateInputSecurityGroupOutput) GoString() string { - return s.String() -} - -// SetSecurityGroup sets the SecurityGroup field's value. -func (s *UpdateInputSecurityGroupOutput) SetSecurityGroup(v *InputSecurityGroup) *UpdateInputSecurityGroupOutput { - s.SecurityGroup = v - return s -} - -type ValidationError struct { - _ struct{} `type:"structure"` - - ElementPath *string `locationName:"elementPath" type:"string"` - - ErrorMessage *string `locationName:"errorMessage" type:"string"` -} - -// String returns the string representation -func (s ValidationError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidationError) GoString() string { - return s.String() -} - -// SetElementPath sets the ElementPath field's value. -func (s *ValidationError) SetElementPath(v string) *ValidationError { - s.ElementPath = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *ValidationError) SetErrorMessage(v string) *ValidationError { - s.ErrorMessage = &v - return s -} - -type VideoCodecSettings struct { - _ struct{} `type:"structure"` - - // Frame Capture Settings - FrameCaptureSettings *FrameCaptureSettings `locationName:"frameCaptureSettings" type:"structure"` - - H264Settings *H264Settings `locationName:"h264Settings" type:"structure"` -} - -// String returns the string representation -func (s VideoCodecSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VideoCodecSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VideoCodecSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VideoCodecSettings"} - if s.FrameCaptureSettings != nil { - if err := s.FrameCaptureSettings.Validate(); err != nil { - invalidParams.AddNested("FrameCaptureSettings", err.(request.ErrInvalidParams)) - } - } - if s.H264Settings != nil { - if err := s.H264Settings.Validate(); err != nil { - invalidParams.AddNested("H264Settings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFrameCaptureSettings sets the FrameCaptureSettings field's value. -func (s *VideoCodecSettings) SetFrameCaptureSettings(v *FrameCaptureSettings) *VideoCodecSettings { - s.FrameCaptureSettings = v - return s -} - -// SetH264Settings sets the H264Settings field's value. -func (s *VideoCodecSettings) SetH264Settings(v *H264Settings) *VideoCodecSettings { - s.H264Settings = v - return s -} - -// Video settings for this stream. -type VideoDescription struct { - _ struct{} `type:"structure"` - - // Video codec settings. - CodecSettings *VideoCodecSettings `locationName:"codecSettings" type:"structure"` - - // Output video height, in pixels. Must be an even number. For most codecs, - // you can leave this field and width blank in order to use the height and width - // (resolution) from the source. Note, however, that leaving blank is not recommended. - // For the Frame Capture codec, height and width are required. - Height *int64 `locationName:"height" type:"integer"` - - // The name of this VideoDescription. Outputs will use this name to uniquely - // identify this Description. Description names should be unique within this - // Live Event. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // Indicates how to respond to the AFD values in the input stream. RESPOND causes - // input video to be clipped, depending on the AFD value, input display aspect - // ratio, and output display aspect ratio, and (except for FRAMECAPTURE codec) - // includes the values in the output. PASSTHROUGH (does not apply to FRAMECAPTURE - // codec) ignores the AFD values and includes the values in the output, so input - // video is not clipped. NONE ignores the AFD values and does not include the - // values through to the output, so input video is not clipped. - RespondToAfd *string `locationName:"respondToAfd" type:"string" enum:"VideoDescriptionRespondToAfd"` - - // STRETCHTOOUTPUT configures the output position to stretch the video to the - // specified output resolution (height and width). This option will override - // any position value. DEFAULT may insert black boxes (pillar boxes or letter - // boxes) around the video to provide the specified output resolution. - ScalingBehavior *string `locationName:"scalingBehavior" type:"string" enum:"VideoDescriptionScalingBehavior"` - - // Changes the strength of the anti-alias filter used for scaling. 0 is the - // softest setting, 100 is the sharpest. A setting of 50 is recommended for - // most content. - Sharpness *int64 `locationName:"sharpness" type:"integer"` - - // Output video width, in pixels. Must be an even number. For most codecs, you - // can leave this field and height blank in order to use the height and width - // (resolution) from the source. Note, however, that leaving blank is not recommended. - // For the Frame Capture codec, height and width are required. - Width *int64 `locationName:"width" type:"integer"` -} - -// String returns the string representation -func (s VideoDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VideoDescription) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VideoDescription) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VideoDescription"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.CodecSettings != nil { - if err := s.CodecSettings.Validate(); err != nil { - invalidParams.AddNested("CodecSettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCodecSettings sets the CodecSettings field's value. -func (s *VideoDescription) SetCodecSettings(v *VideoCodecSettings) *VideoDescription { - s.CodecSettings = v - return s -} - -// SetHeight sets the Height field's value. -func (s *VideoDescription) SetHeight(v int64) *VideoDescription { - s.Height = &v - return s -} - -// SetName sets the Name field's value. -func (s *VideoDescription) SetName(v string) *VideoDescription { - s.Name = &v - return s -} - -// SetRespondToAfd sets the RespondToAfd field's value. -func (s *VideoDescription) SetRespondToAfd(v string) *VideoDescription { - s.RespondToAfd = &v - return s -} - -// SetScalingBehavior sets the ScalingBehavior field's value. -func (s *VideoDescription) SetScalingBehavior(v string) *VideoDescription { - s.ScalingBehavior = &v - return s -} - -// SetSharpness sets the Sharpness field's value. -func (s *VideoDescription) SetSharpness(v int64) *VideoDescription { - s.Sharpness = &v - return s -} - -// SetWidth sets the Width field's value. -func (s *VideoDescription) SetWidth(v int64) *VideoDescription { - s.Width = &v - return s -} - -// Specifies a particular video stream within an input source. An input may -// have only a single video selector. -type VideoSelector struct { - _ struct{} `type:"structure"` - - // Specifies the colorspace of an input. This setting works in tandem with colorSpaceConversion - // to determine if any conversion will be performed. - ColorSpace *string `locationName:"colorSpace" type:"string" enum:"VideoSelectorColorSpace"` - - // Applies only if colorSpace is a value other than follow. This field controls - // how the value in the colorSpace field will be used. fallback means that when - // the input does include color space data, that data will be used, but when - // the input has no color space data, the value in colorSpace will be used. - // Choose fallback if your input is sometimes missing color space data, but - // when it does have color space data, that data is correct. force means to - // always use the value in colorSpace. Choose force if your input usually has - // no color space data or might have unreliable color space data. - ColorSpaceUsage *string `locationName:"colorSpaceUsage" type:"string" enum:"VideoSelectorColorSpaceUsage"` - - // The video selector settings. - SelectorSettings *VideoSelectorSettings `locationName:"selectorSettings" type:"structure"` -} - -// String returns the string representation -func (s VideoSelector) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VideoSelector) GoString() string { - return s.String() -} - -// SetColorSpace sets the ColorSpace field's value. -func (s *VideoSelector) SetColorSpace(v string) *VideoSelector { - s.ColorSpace = &v - return s -} - -// SetColorSpaceUsage sets the ColorSpaceUsage field's value. -func (s *VideoSelector) SetColorSpaceUsage(v string) *VideoSelector { - s.ColorSpaceUsage = &v - return s -} - -// SetSelectorSettings sets the SelectorSettings field's value. -func (s *VideoSelector) SetSelectorSettings(v *VideoSelectorSettings) *VideoSelector { - s.SelectorSettings = v - return s -} - -type VideoSelectorPid struct { - _ struct{} `type:"structure"` - - // Selects a specific PID from within a video source. - Pid *int64 `locationName:"pid" type:"integer"` -} - -// String returns the string representation -func (s VideoSelectorPid) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VideoSelectorPid) GoString() string { - return s.String() -} - -// SetPid sets the Pid field's value. -func (s *VideoSelectorPid) SetPid(v int64) *VideoSelectorPid { - s.Pid = &v - return s -} - -type VideoSelectorProgramId struct { - _ struct{} `type:"structure"` - - // Selects a specific program from within a multi-program transport stream. - // If the program doesn't exist, the first program within the transport stream - // will be selected by default. - ProgramId *int64 `locationName:"programId" type:"integer"` -} - -// String returns the string representation -func (s VideoSelectorProgramId) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VideoSelectorProgramId) GoString() string { - return s.String() -} - -// SetProgramId sets the ProgramId field's value. -func (s *VideoSelectorProgramId) SetProgramId(v int64) *VideoSelectorProgramId { - s.ProgramId = &v - return s -} - -type VideoSelectorSettings struct { - _ struct{} `type:"structure"` - - VideoSelectorPid *VideoSelectorPid `locationName:"videoSelectorPid" type:"structure"` - - VideoSelectorProgramId *VideoSelectorProgramId `locationName:"videoSelectorProgramId" type:"structure"` -} - -// String returns the string representation -func (s VideoSelectorSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VideoSelectorSettings) GoString() string { - return s.String() -} - -// SetVideoSelectorPid sets the VideoSelectorPid field's value. -func (s *VideoSelectorSettings) SetVideoSelectorPid(v *VideoSelectorPid) *VideoSelectorSettings { - s.VideoSelectorPid = v - return s -} - -// SetVideoSelectorProgramId sets the VideoSelectorProgramId field's value. -func (s *VideoSelectorSettings) SetVideoSelectorProgramId(v *VideoSelectorProgramId) *VideoSelectorSettings { - s.VideoSelectorProgramId = v - return s -} - -type WebvttDestinationSettings struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s WebvttDestinationSettings) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WebvttDestinationSettings) GoString() string { - return s.String() -} - -const ( - // AacCodingModeAdReceiverMix is a AacCodingMode enum value - AacCodingModeAdReceiverMix = "AD_RECEIVER_MIX" - - // AacCodingModeCodingMode10 is a AacCodingMode enum value - AacCodingModeCodingMode10 = "CODING_MODE_1_0" - - // AacCodingModeCodingMode11 is a AacCodingMode enum value - AacCodingModeCodingMode11 = "CODING_MODE_1_1" - - // AacCodingModeCodingMode20 is a AacCodingMode enum value - AacCodingModeCodingMode20 = "CODING_MODE_2_0" - - // AacCodingModeCodingMode51 is a AacCodingMode enum value - AacCodingModeCodingMode51 = "CODING_MODE_5_1" -) - -const ( - // AacInputTypeBroadcasterMixedAd is a AacInputType enum value - AacInputTypeBroadcasterMixedAd = "BROADCASTER_MIXED_AD" - - // AacInputTypeNormal is a AacInputType enum value - AacInputTypeNormal = "NORMAL" -) - -const ( - // AacProfileHev1 is a AacProfile enum value - AacProfileHev1 = "HEV1" - - // AacProfileHev2 is a AacProfile enum value - AacProfileHev2 = "HEV2" - - // AacProfileLc is a AacProfile enum value - AacProfileLc = "LC" -) - -const ( - // AacRateControlModeCbr is a AacRateControlMode enum value - AacRateControlModeCbr = "CBR" - - // AacRateControlModeVbr is a AacRateControlMode enum value - AacRateControlModeVbr = "VBR" -) - -const ( - // AacRawFormatLatmLoas is a AacRawFormat enum value - AacRawFormatLatmLoas = "LATM_LOAS" - - // AacRawFormatNone is a AacRawFormat enum value - AacRawFormatNone = "NONE" -) - -const ( - // AacSpecMpeg2 is a AacSpec enum value - AacSpecMpeg2 = "MPEG2" - - // AacSpecMpeg4 is a AacSpec enum value - AacSpecMpeg4 = "MPEG4" -) - -const ( - // AacVbrQualityHigh is a AacVbrQuality enum value - AacVbrQualityHigh = "HIGH" - - // AacVbrQualityLow is a AacVbrQuality enum value - AacVbrQualityLow = "LOW" - - // AacVbrQualityMediumHigh is a AacVbrQuality enum value - AacVbrQualityMediumHigh = "MEDIUM_HIGH" - - // AacVbrQualityMediumLow is a AacVbrQuality enum value - AacVbrQualityMediumLow = "MEDIUM_LOW" -) - -const ( - // Ac3BitstreamModeCommentary is a Ac3BitstreamMode enum value - Ac3BitstreamModeCommentary = "COMMENTARY" - - // Ac3BitstreamModeCompleteMain is a Ac3BitstreamMode enum value - Ac3BitstreamModeCompleteMain = "COMPLETE_MAIN" - - // Ac3BitstreamModeDialogue is a Ac3BitstreamMode enum value - Ac3BitstreamModeDialogue = "DIALOGUE" - - // Ac3BitstreamModeEmergency is a Ac3BitstreamMode enum value - Ac3BitstreamModeEmergency = "EMERGENCY" - - // Ac3BitstreamModeHearingImpaired is a Ac3BitstreamMode enum value - Ac3BitstreamModeHearingImpaired = "HEARING_IMPAIRED" - - // Ac3BitstreamModeMusicAndEffects is a Ac3BitstreamMode enum value - Ac3BitstreamModeMusicAndEffects = "MUSIC_AND_EFFECTS" - - // Ac3BitstreamModeVisuallyImpaired is a Ac3BitstreamMode enum value - Ac3BitstreamModeVisuallyImpaired = "VISUALLY_IMPAIRED" - - // Ac3BitstreamModeVoiceOver is a Ac3BitstreamMode enum value - Ac3BitstreamModeVoiceOver = "VOICE_OVER" -) - -const ( - // Ac3CodingModeCodingMode10 is a Ac3CodingMode enum value - Ac3CodingModeCodingMode10 = "CODING_MODE_1_0" - - // Ac3CodingModeCodingMode11 is a Ac3CodingMode enum value - Ac3CodingModeCodingMode11 = "CODING_MODE_1_1" - - // Ac3CodingModeCodingMode20 is a Ac3CodingMode enum value - Ac3CodingModeCodingMode20 = "CODING_MODE_2_0" - - // Ac3CodingModeCodingMode32Lfe is a Ac3CodingMode enum value - Ac3CodingModeCodingMode32Lfe = "CODING_MODE_3_2_LFE" -) - -const ( - // Ac3DrcProfileFilmStandard is a Ac3DrcProfile enum value - Ac3DrcProfileFilmStandard = "FILM_STANDARD" - - // Ac3DrcProfileNone is a Ac3DrcProfile enum value - Ac3DrcProfileNone = "NONE" -) - -const ( - // Ac3LfeFilterDisabled is a Ac3LfeFilter enum value - Ac3LfeFilterDisabled = "DISABLED" - - // Ac3LfeFilterEnabled is a Ac3LfeFilter enum value - Ac3LfeFilterEnabled = "ENABLED" -) - -const ( - // Ac3MetadataControlFollowInput is a Ac3MetadataControl enum value - Ac3MetadataControlFollowInput = "FOLLOW_INPUT" - - // Ac3MetadataControlUseConfigured is a Ac3MetadataControl enum value - Ac3MetadataControlUseConfigured = "USE_CONFIGURED" -) - -const ( - // AfdSignalingAuto is a AfdSignaling enum value - AfdSignalingAuto = "AUTO" - - // AfdSignalingFixed is a AfdSignaling enum value - AfdSignalingFixed = "FIXED" - - // AfdSignalingNone is a AfdSignaling enum value - AfdSignalingNone = "NONE" -) - -const ( - // AudioDescriptionAudioTypeControlFollowInput is a AudioDescriptionAudioTypeControl enum value - AudioDescriptionAudioTypeControlFollowInput = "FOLLOW_INPUT" - - // AudioDescriptionAudioTypeControlUseConfigured is a AudioDescriptionAudioTypeControl enum value - AudioDescriptionAudioTypeControlUseConfigured = "USE_CONFIGURED" -) - -const ( - // AudioDescriptionLanguageCodeControlFollowInput is a AudioDescriptionLanguageCodeControl enum value - AudioDescriptionLanguageCodeControlFollowInput = "FOLLOW_INPUT" - - // AudioDescriptionLanguageCodeControlUseConfigured is a AudioDescriptionLanguageCodeControl enum value - AudioDescriptionLanguageCodeControlUseConfigured = "USE_CONFIGURED" -) - -const ( - // AudioLanguageSelectionPolicyLoose is a AudioLanguageSelectionPolicy enum value - AudioLanguageSelectionPolicyLoose = "LOOSE" - - // AudioLanguageSelectionPolicyStrict is a AudioLanguageSelectionPolicy enum value - AudioLanguageSelectionPolicyStrict = "STRICT" -) - -const ( - // AudioNormalizationAlgorithmItu17701 is a AudioNormalizationAlgorithm enum value - AudioNormalizationAlgorithmItu17701 = "ITU_1770_1" - - // AudioNormalizationAlgorithmItu17702 is a AudioNormalizationAlgorithm enum value - AudioNormalizationAlgorithmItu17702 = "ITU_1770_2" -) - -const ( - // AudioNormalizationAlgorithmControlCorrectAudio is a AudioNormalizationAlgorithmControl enum value - AudioNormalizationAlgorithmControlCorrectAudio = "CORRECT_AUDIO" -) - -const ( - // AudioOnlyHlsTrackTypeAlternateAudioAutoSelect is a AudioOnlyHlsTrackType enum value - AudioOnlyHlsTrackTypeAlternateAudioAutoSelect = "ALTERNATE_AUDIO_AUTO_SELECT" - - // AudioOnlyHlsTrackTypeAlternateAudioAutoSelectDefault is a AudioOnlyHlsTrackType enum value - AudioOnlyHlsTrackTypeAlternateAudioAutoSelectDefault = "ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT" - - // AudioOnlyHlsTrackTypeAlternateAudioNotAutoSelect is a AudioOnlyHlsTrackType enum value - AudioOnlyHlsTrackTypeAlternateAudioNotAutoSelect = "ALTERNATE_AUDIO_NOT_AUTO_SELECT" - - // AudioOnlyHlsTrackTypeAudioOnlyVariantStream is a AudioOnlyHlsTrackType enum value - AudioOnlyHlsTrackTypeAudioOnlyVariantStream = "AUDIO_ONLY_VARIANT_STREAM" -) - -const ( - // AudioTypeCleanEffects is a AudioType enum value - AudioTypeCleanEffects = "CLEAN_EFFECTS" - - // AudioTypeHearingImpaired is a AudioType enum value - AudioTypeHearingImpaired = "HEARING_IMPAIRED" - - // AudioTypeUndefined is a AudioType enum value - AudioTypeUndefined = "UNDEFINED" - - // AudioTypeVisualImpairedCommentary is a AudioType enum value - AudioTypeVisualImpairedCommentary = "VISUAL_IMPAIRED_COMMENTARY" -) - -const ( - // AuthenticationSchemeAkamai is a AuthenticationScheme enum value - AuthenticationSchemeAkamai = "AKAMAI" - - // AuthenticationSchemeCommon is a AuthenticationScheme enum value - AuthenticationSchemeCommon = "COMMON" -) - -const ( - // AvailBlankingStateDisabled is a AvailBlankingState enum value - AvailBlankingStateDisabled = "DISABLED" - - // AvailBlankingStateEnabled is a AvailBlankingState enum value - AvailBlankingStateEnabled = "ENABLED" -) - -const ( - // BlackoutSlateNetworkEndBlackoutDisabled is a BlackoutSlateNetworkEndBlackout enum value - BlackoutSlateNetworkEndBlackoutDisabled = "DISABLED" - - // BlackoutSlateNetworkEndBlackoutEnabled is a BlackoutSlateNetworkEndBlackout enum value - BlackoutSlateNetworkEndBlackoutEnabled = "ENABLED" -) - -const ( - // BlackoutSlateStateDisabled is a BlackoutSlateState enum value - BlackoutSlateStateDisabled = "DISABLED" - - // BlackoutSlateStateEnabled is a BlackoutSlateState enum value - BlackoutSlateStateEnabled = "ENABLED" -) - -const ( - // BurnInAlignmentCentered is a BurnInAlignment enum value - BurnInAlignmentCentered = "CENTERED" - - // BurnInAlignmentLeft is a BurnInAlignment enum value - BurnInAlignmentLeft = "LEFT" - - // BurnInAlignmentSmart is a BurnInAlignment enum value - BurnInAlignmentSmart = "SMART" -) - -const ( - // BurnInBackgroundColorBlack is a BurnInBackgroundColor enum value - BurnInBackgroundColorBlack = "BLACK" - - // BurnInBackgroundColorNone is a BurnInBackgroundColor enum value - BurnInBackgroundColorNone = "NONE" - - // BurnInBackgroundColorWhite is a BurnInBackgroundColor enum value - BurnInBackgroundColorWhite = "WHITE" -) - -const ( - // BurnInFontColorBlack is a BurnInFontColor enum value - BurnInFontColorBlack = "BLACK" - - // BurnInFontColorBlue is a BurnInFontColor enum value - BurnInFontColorBlue = "BLUE" - - // BurnInFontColorGreen is a BurnInFontColor enum value - BurnInFontColorGreen = "GREEN" - - // BurnInFontColorRed is a BurnInFontColor enum value - BurnInFontColorRed = "RED" - - // BurnInFontColorWhite is a BurnInFontColor enum value - BurnInFontColorWhite = "WHITE" - - // BurnInFontColorYellow is a BurnInFontColor enum value - BurnInFontColorYellow = "YELLOW" -) - -const ( - // BurnInOutlineColorBlack is a BurnInOutlineColor enum value - BurnInOutlineColorBlack = "BLACK" - - // BurnInOutlineColorBlue is a BurnInOutlineColor enum value - BurnInOutlineColorBlue = "BLUE" - - // BurnInOutlineColorGreen is a BurnInOutlineColor enum value - BurnInOutlineColorGreen = "GREEN" - - // BurnInOutlineColorRed is a BurnInOutlineColor enum value - BurnInOutlineColorRed = "RED" - - // BurnInOutlineColorWhite is a BurnInOutlineColor enum value - BurnInOutlineColorWhite = "WHITE" - - // BurnInOutlineColorYellow is a BurnInOutlineColor enum value - BurnInOutlineColorYellow = "YELLOW" -) - -const ( - // BurnInShadowColorBlack is a BurnInShadowColor enum value - BurnInShadowColorBlack = "BLACK" - - // BurnInShadowColorNone is a BurnInShadowColor enum value - BurnInShadowColorNone = "NONE" - - // BurnInShadowColorWhite is a BurnInShadowColor enum value - BurnInShadowColorWhite = "WHITE" -) - -const ( - // BurnInTeletextGridControlFixed is a BurnInTeletextGridControl enum value - BurnInTeletextGridControlFixed = "FIXED" - - // BurnInTeletextGridControlScaled is a BurnInTeletextGridControl enum value - BurnInTeletextGridControlScaled = "SCALED" -) - -const ( - // ChannelStateCreating is a ChannelState enum value - ChannelStateCreating = "CREATING" - - // ChannelStateCreateFailed is a ChannelState enum value - ChannelStateCreateFailed = "CREATE_FAILED" - - // ChannelStateIdle is a ChannelState enum value - ChannelStateIdle = "IDLE" - - // ChannelStateStarting is a ChannelState enum value - ChannelStateStarting = "STARTING" - - // ChannelStateRunning is a ChannelState enum value - ChannelStateRunning = "RUNNING" - - // ChannelStateRecovering is a ChannelState enum value - ChannelStateRecovering = "RECOVERING" - - // ChannelStateStopping is a ChannelState enum value - ChannelStateStopping = "STOPPING" - - // ChannelStateDeleting is a ChannelState enum value - ChannelStateDeleting = "DELETING" - - // ChannelStateDeleted is a ChannelState enum value - ChannelStateDeleted = "DELETED" -) - -const ( - // DvbSdtOutputSdtSdtFollow is a DvbSdtOutputSdt enum value - DvbSdtOutputSdtSdtFollow = "SDT_FOLLOW" - - // DvbSdtOutputSdtSdtFollowIfPresent is a DvbSdtOutputSdt enum value - DvbSdtOutputSdtSdtFollowIfPresent = "SDT_FOLLOW_IF_PRESENT" - - // DvbSdtOutputSdtSdtManual is a DvbSdtOutputSdt enum value - DvbSdtOutputSdtSdtManual = "SDT_MANUAL" - - // DvbSdtOutputSdtSdtNone is a DvbSdtOutputSdt enum value - DvbSdtOutputSdtSdtNone = "SDT_NONE" -) - -const ( - // DvbSubDestinationAlignmentCentered is a DvbSubDestinationAlignment enum value - DvbSubDestinationAlignmentCentered = "CENTERED" - - // DvbSubDestinationAlignmentLeft is a DvbSubDestinationAlignment enum value - DvbSubDestinationAlignmentLeft = "LEFT" - - // DvbSubDestinationAlignmentSmart is a DvbSubDestinationAlignment enum value - DvbSubDestinationAlignmentSmart = "SMART" -) - -const ( - // DvbSubDestinationBackgroundColorBlack is a DvbSubDestinationBackgroundColor enum value - DvbSubDestinationBackgroundColorBlack = "BLACK" - - // DvbSubDestinationBackgroundColorNone is a DvbSubDestinationBackgroundColor enum value - DvbSubDestinationBackgroundColorNone = "NONE" - - // DvbSubDestinationBackgroundColorWhite is a DvbSubDestinationBackgroundColor enum value - DvbSubDestinationBackgroundColorWhite = "WHITE" -) - -const ( - // DvbSubDestinationFontColorBlack is a DvbSubDestinationFontColor enum value - DvbSubDestinationFontColorBlack = "BLACK" - - // DvbSubDestinationFontColorBlue is a DvbSubDestinationFontColor enum value - DvbSubDestinationFontColorBlue = "BLUE" - - // DvbSubDestinationFontColorGreen is a DvbSubDestinationFontColor enum value - DvbSubDestinationFontColorGreen = "GREEN" - - // DvbSubDestinationFontColorRed is a DvbSubDestinationFontColor enum value - DvbSubDestinationFontColorRed = "RED" - - // DvbSubDestinationFontColorWhite is a DvbSubDestinationFontColor enum value - DvbSubDestinationFontColorWhite = "WHITE" - - // DvbSubDestinationFontColorYellow is a DvbSubDestinationFontColor enum value - DvbSubDestinationFontColorYellow = "YELLOW" -) - -const ( - // DvbSubDestinationOutlineColorBlack is a DvbSubDestinationOutlineColor enum value - DvbSubDestinationOutlineColorBlack = "BLACK" - - // DvbSubDestinationOutlineColorBlue is a DvbSubDestinationOutlineColor enum value - DvbSubDestinationOutlineColorBlue = "BLUE" - - // DvbSubDestinationOutlineColorGreen is a DvbSubDestinationOutlineColor enum value - DvbSubDestinationOutlineColorGreen = "GREEN" - - // DvbSubDestinationOutlineColorRed is a DvbSubDestinationOutlineColor enum value - DvbSubDestinationOutlineColorRed = "RED" - - // DvbSubDestinationOutlineColorWhite is a DvbSubDestinationOutlineColor enum value - DvbSubDestinationOutlineColorWhite = "WHITE" - - // DvbSubDestinationOutlineColorYellow is a DvbSubDestinationOutlineColor enum value - DvbSubDestinationOutlineColorYellow = "YELLOW" -) - -const ( - // DvbSubDestinationShadowColorBlack is a DvbSubDestinationShadowColor enum value - DvbSubDestinationShadowColorBlack = "BLACK" - - // DvbSubDestinationShadowColorNone is a DvbSubDestinationShadowColor enum value - DvbSubDestinationShadowColorNone = "NONE" - - // DvbSubDestinationShadowColorWhite is a DvbSubDestinationShadowColor enum value - DvbSubDestinationShadowColorWhite = "WHITE" -) - -const ( - // DvbSubDestinationTeletextGridControlFixed is a DvbSubDestinationTeletextGridControl enum value - DvbSubDestinationTeletextGridControlFixed = "FIXED" - - // DvbSubDestinationTeletextGridControlScaled is a DvbSubDestinationTeletextGridControl enum value - DvbSubDestinationTeletextGridControlScaled = "SCALED" -) - -const ( - // Eac3AttenuationControlAttenuate3Db is a Eac3AttenuationControl enum value - Eac3AttenuationControlAttenuate3Db = "ATTENUATE_3_DB" - - // Eac3AttenuationControlNone is a Eac3AttenuationControl enum value - Eac3AttenuationControlNone = "NONE" -) - -const ( - // Eac3BitstreamModeCommentary is a Eac3BitstreamMode enum value - Eac3BitstreamModeCommentary = "COMMENTARY" - - // Eac3BitstreamModeCompleteMain is a Eac3BitstreamMode enum value - Eac3BitstreamModeCompleteMain = "COMPLETE_MAIN" - - // Eac3BitstreamModeEmergency is a Eac3BitstreamMode enum value - Eac3BitstreamModeEmergency = "EMERGENCY" - - // Eac3BitstreamModeHearingImpaired is a Eac3BitstreamMode enum value - Eac3BitstreamModeHearingImpaired = "HEARING_IMPAIRED" - - // Eac3BitstreamModeVisuallyImpaired is a Eac3BitstreamMode enum value - Eac3BitstreamModeVisuallyImpaired = "VISUALLY_IMPAIRED" -) - -const ( - // Eac3CodingModeCodingMode10 is a Eac3CodingMode enum value - Eac3CodingModeCodingMode10 = "CODING_MODE_1_0" - - // Eac3CodingModeCodingMode20 is a Eac3CodingMode enum value - Eac3CodingModeCodingMode20 = "CODING_MODE_2_0" - - // Eac3CodingModeCodingMode32 is a Eac3CodingMode enum value - Eac3CodingModeCodingMode32 = "CODING_MODE_3_2" -) - -const ( - // Eac3DcFilterDisabled is a Eac3DcFilter enum value - Eac3DcFilterDisabled = "DISABLED" - - // Eac3DcFilterEnabled is a Eac3DcFilter enum value - Eac3DcFilterEnabled = "ENABLED" -) - -const ( - // Eac3DrcLineFilmLight is a Eac3DrcLine enum value - Eac3DrcLineFilmLight = "FILM_LIGHT" - - // Eac3DrcLineFilmStandard is a Eac3DrcLine enum value - Eac3DrcLineFilmStandard = "FILM_STANDARD" - - // Eac3DrcLineMusicLight is a Eac3DrcLine enum value - Eac3DrcLineMusicLight = "MUSIC_LIGHT" - - // Eac3DrcLineMusicStandard is a Eac3DrcLine enum value - Eac3DrcLineMusicStandard = "MUSIC_STANDARD" - - // Eac3DrcLineNone is a Eac3DrcLine enum value - Eac3DrcLineNone = "NONE" - - // Eac3DrcLineSpeech is a Eac3DrcLine enum value - Eac3DrcLineSpeech = "SPEECH" -) - -const ( - // Eac3DrcRfFilmLight is a Eac3DrcRf enum value - Eac3DrcRfFilmLight = "FILM_LIGHT" - - // Eac3DrcRfFilmStandard is a Eac3DrcRf enum value - Eac3DrcRfFilmStandard = "FILM_STANDARD" - - // Eac3DrcRfMusicLight is a Eac3DrcRf enum value - Eac3DrcRfMusicLight = "MUSIC_LIGHT" - - // Eac3DrcRfMusicStandard is a Eac3DrcRf enum value - Eac3DrcRfMusicStandard = "MUSIC_STANDARD" - - // Eac3DrcRfNone is a Eac3DrcRf enum value - Eac3DrcRfNone = "NONE" - - // Eac3DrcRfSpeech is a Eac3DrcRf enum value - Eac3DrcRfSpeech = "SPEECH" -) - -const ( - // Eac3LfeControlLfe is a Eac3LfeControl enum value - Eac3LfeControlLfe = "LFE" - - // Eac3LfeControlNoLfe is a Eac3LfeControl enum value - Eac3LfeControlNoLfe = "NO_LFE" -) - -const ( - // Eac3LfeFilterDisabled is a Eac3LfeFilter enum value - Eac3LfeFilterDisabled = "DISABLED" - - // Eac3LfeFilterEnabled is a Eac3LfeFilter enum value - Eac3LfeFilterEnabled = "ENABLED" -) - -const ( - // Eac3MetadataControlFollowInput is a Eac3MetadataControl enum value - Eac3MetadataControlFollowInput = "FOLLOW_INPUT" - - // Eac3MetadataControlUseConfigured is a Eac3MetadataControl enum value - Eac3MetadataControlUseConfigured = "USE_CONFIGURED" -) - -const ( - // Eac3PassthroughControlNoPassthrough is a Eac3PassthroughControl enum value - Eac3PassthroughControlNoPassthrough = "NO_PASSTHROUGH" - - // Eac3PassthroughControlWhenPossible is a Eac3PassthroughControl enum value - Eac3PassthroughControlWhenPossible = "WHEN_POSSIBLE" -) - -const ( - // Eac3PhaseControlNoShift is a Eac3PhaseControl enum value - Eac3PhaseControlNoShift = "NO_SHIFT" - - // Eac3PhaseControlShift90Degrees is a Eac3PhaseControl enum value - Eac3PhaseControlShift90Degrees = "SHIFT_90_DEGREES" -) - -const ( - // Eac3StereoDownmixDpl2 is a Eac3StereoDownmix enum value - Eac3StereoDownmixDpl2 = "DPL2" - - // Eac3StereoDownmixLoRo is a Eac3StereoDownmix enum value - Eac3StereoDownmixLoRo = "LO_RO" - - // Eac3StereoDownmixLtRt is a Eac3StereoDownmix enum value - Eac3StereoDownmixLtRt = "LT_RT" - - // Eac3StereoDownmixNotIndicated is a Eac3StereoDownmix enum value - Eac3StereoDownmixNotIndicated = "NOT_INDICATED" -) - -const ( - // Eac3SurroundExModeDisabled is a Eac3SurroundExMode enum value - Eac3SurroundExModeDisabled = "DISABLED" - - // Eac3SurroundExModeEnabled is a Eac3SurroundExMode enum value - Eac3SurroundExModeEnabled = "ENABLED" - - // Eac3SurroundExModeNotIndicated is a Eac3SurroundExMode enum value - Eac3SurroundExModeNotIndicated = "NOT_INDICATED" -) - -const ( - // Eac3SurroundModeDisabled is a Eac3SurroundMode enum value - Eac3SurroundModeDisabled = "DISABLED" - - // Eac3SurroundModeEnabled is a Eac3SurroundMode enum value - Eac3SurroundModeEnabled = "ENABLED" - - // Eac3SurroundModeNotIndicated is a Eac3SurroundMode enum value - Eac3SurroundModeNotIndicated = "NOT_INDICATED" -) - -const ( - // EmbeddedConvert608To708Disabled is a EmbeddedConvert608To708 enum value - EmbeddedConvert608To708Disabled = "DISABLED" - - // EmbeddedConvert608To708Upconvert is a EmbeddedConvert608To708 enum value - EmbeddedConvert608To708Upconvert = "UPCONVERT" -) - -const ( - // EmbeddedScte20DetectionAuto is a EmbeddedScte20Detection enum value - EmbeddedScte20DetectionAuto = "AUTO" - - // EmbeddedScte20DetectionOff is a EmbeddedScte20Detection enum value - EmbeddedScte20DetectionOff = "OFF" -) - -const ( - // FecOutputIncludeFecColumn is a FecOutputIncludeFec enum value - FecOutputIncludeFecColumn = "COLUMN" - - // FecOutputIncludeFecColumnAndRow is a FecOutputIncludeFec enum value - FecOutputIncludeFecColumnAndRow = "COLUMN_AND_ROW" -) - -const ( - // FixedAfdAfd0000 is a FixedAfd enum value - FixedAfdAfd0000 = "AFD_0000" - - // FixedAfdAfd0010 is a FixedAfd enum value - FixedAfdAfd0010 = "AFD_0010" - - // FixedAfdAfd0011 is a FixedAfd enum value - FixedAfdAfd0011 = "AFD_0011" - - // FixedAfdAfd0100 is a FixedAfd enum value - FixedAfdAfd0100 = "AFD_0100" - - // FixedAfdAfd1000 is a FixedAfd enum value - FixedAfdAfd1000 = "AFD_1000" - - // FixedAfdAfd1001 is a FixedAfd enum value - FixedAfdAfd1001 = "AFD_1001" - - // FixedAfdAfd1010 is a FixedAfd enum value - FixedAfdAfd1010 = "AFD_1010" - - // FixedAfdAfd1011 is a FixedAfd enum value - FixedAfdAfd1011 = "AFD_1011" - - // FixedAfdAfd1101 is a FixedAfd enum value - FixedAfdAfd1101 = "AFD_1101" - - // FixedAfdAfd1110 is a FixedAfd enum value - FixedAfdAfd1110 = "AFD_1110" - - // FixedAfdAfd1111 is a FixedAfd enum value - FixedAfdAfd1111 = "AFD_1111" -) - -// Follow reference point. -const ( - // FollowPointEnd is a FollowPoint enum value - FollowPointEnd = "END" - - // FollowPointStart is a FollowPoint enum value - FollowPointStart = "START" -) - -const ( - // GlobalConfigurationInputEndActionNone is a GlobalConfigurationInputEndAction enum value - GlobalConfigurationInputEndActionNone = "NONE" - - // GlobalConfigurationInputEndActionSwitchAndLoopInputs is a GlobalConfigurationInputEndAction enum value - GlobalConfigurationInputEndActionSwitchAndLoopInputs = "SWITCH_AND_LOOP_INPUTS" -) - -const ( - // GlobalConfigurationLowFramerateInputsDisabled is a GlobalConfigurationLowFramerateInputs enum value - GlobalConfigurationLowFramerateInputsDisabled = "DISABLED" - - // GlobalConfigurationLowFramerateInputsEnabled is a GlobalConfigurationLowFramerateInputs enum value - GlobalConfigurationLowFramerateInputsEnabled = "ENABLED" -) - -const ( - // GlobalConfigurationOutputTimingSourceInputClock is a GlobalConfigurationOutputTimingSource enum value - GlobalConfigurationOutputTimingSourceInputClock = "INPUT_CLOCK" - - // GlobalConfigurationOutputTimingSourceSystemClock is a GlobalConfigurationOutputTimingSource enum value - GlobalConfigurationOutputTimingSourceSystemClock = "SYSTEM_CLOCK" -) - -const ( - // H264AdaptiveQuantizationHigh is a H264AdaptiveQuantization enum value - H264AdaptiveQuantizationHigh = "HIGH" - - // H264AdaptiveQuantizationHigher is a H264AdaptiveQuantization enum value - H264AdaptiveQuantizationHigher = "HIGHER" - - // H264AdaptiveQuantizationLow is a H264AdaptiveQuantization enum value - H264AdaptiveQuantizationLow = "LOW" - - // H264AdaptiveQuantizationMax is a H264AdaptiveQuantization enum value - H264AdaptiveQuantizationMax = "MAX" - - // H264AdaptiveQuantizationMedium is a H264AdaptiveQuantization enum value - H264AdaptiveQuantizationMedium = "MEDIUM" - - // H264AdaptiveQuantizationOff is a H264AdaptiveQuantization enum value - H264AdaptiveQuantizationOff = "OFF" -) - -const ( - // H264ColorMetadataIgnore is a H264ColorMetadata enum value - H264ColorMetadataIgnore = "IGNORE" - - // H264ColorMetadataInsert is a H264ColorMetadata enum value - H264ColorMetadataInsert = "INSERT" -) - -const ( - // H264EntropyEncodingCabac is a H264EntropyEncoding enum value - H264EntropyEncodingCabac = "CABAC" - - // H264EntropyEncodingCavlc is a H264EntropyEncoding enum value - H264EntropyEncodingCavlc = "CAVLC" -) - -const ( - // H264FlickerAqDisabled is a H264FlickerAq enum value - H264FlickerAqDisabled = "DISABLED" - - // H264FlickerAqEnabled is a H264FlickerAq enum value - H264FlickerAqEnabled = "ENABLED" -) - -const ( - // H264FramerateControlInitializeFromSource is a H264FramerateControl enum value - H264FramerateControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" - - // H264FramerateControlSpecified is a H264FramerateControl enum value - H264FramerateControlSpecified = "SPECIFIED" -) - -const ( - // H264GopBReferenceDisabled is a H264GopBReference enum value - H264GopBReferenceDisabled = "DISABLED" - - // H264GopBReferenceEnabled is a H264GopBReference enum value - H264GopBReferenceEnabled = "ENABLED" -) - -const ( - // H264GopSizeUnitsFrames is a H264GopSizeUnits enum value - H264GopSizeUnitsFrames = "FRAMES" - - // H264GopSizeUnitsSeconds is a H264GopSizeUnits enum value - H264GopSizeUnitsSeconds = "SECONDS" -) - -const ( - // H264LevelH264Level1 is a H264Level enum value - H264LevelH264Level1 = "H264_LEVEL_1" - - // H264LevelH264Level11 is a H264Level enum value - H264LevelH264Level11 = "H264_LEVEL_1_1" - - // H264LevelH264Level12 is a H264Level enum value - H264LevelH264Level12 = "H264_LEVEL_1_2" - - // H264LevelH264Level13 is a H264Level enum value - H264LevelH264Level13 = "H264_LEVEL_1_3" - - // H264LevelH264Level2 is a H264Level enum value - H264LevelH264Level2 = "H264_LEVEL_2" - - // H264LevelH264Level21 is a H264Level enum value - H264LevelH264Level21 = "H264_LEVEL_2_1" - - // H264LevelH264Level22 is a H264Level enum value - H264LevelH264Level22 = "H264_LEVEL_2_2" - - // H264LevelH264Level3 is a H264Level enum value - H264LevelH264Level3 = "H264_LEVEL_3" - - // H264LevelH264Level31 is a H264Level enum value - H264LevelH264Level31 = "H264_LEVEL_3_1" - - // H264LevelH264Level32 is a H264Level enum value - H264LevelH264Level32 = "H264_LEVEL_3_2" - - // H264LevelH264Level4 is a H264Level enum value - H264LevelH264Level4 = "H264_LEVEL_4" - - // H264LevelH264Level41 is a H264Level enum value - H264LevelH264Level41 = "H264_LEVEL_4_1" - - // H264LevelH264Level42 is a H264Level enum value - H264LevelH264Level42 = "H264_LEVEL_4_2" - - // H264LevelH264Level5 is a H264Level enum value - H264LevelH264Level5 = "H264_LEVEL_5" - - // H264LevelH264Level51 is a H264Level enum value - H264LevelH264Level51 = "H264_LEVEL_5_1" - - // H264LevelH264Level52 is a H264Level enum value - H264LevelH264Level52 = "H264_LEVEL_5_2" - - // H264LevelH264LevelAuto is a H264Level enum value - H264LevelH264LevelAuto = "H264_LEVEL_AUTO" -) - -const ( - // H264LookAheadRateControlHigh is a H264LookAheadRateControl enum value - H264LookAheadRateControlHigh = "HIGH" - - // H264LookAheadRateControlLow is a H264LookAheadRateControl enum value - H264LookAheadRateControlLow = "LOW" - - // H264LookAheadRateControlMedium is a H264LookAheadRateControl enum value - H264LookAheadRateControlMedium = "MEDIUM" -) - -const ( - // H264ParControlInitializeFromSource is a H264ParControl enum value - H264ParControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" - - // H264ParControlSpecified is a H264ParControl enum value - H264ParControlSpecified = "SPECIFIED" -) - -const ( - // H264ProfileBaseline is a H264Profile enum value - H264ProfileBaseline = "BASELINE" - - // H264ProfileHigh is a H264Profile enum value - H264ProfileHigh = "HIGH" - - // H264ProfileHigh10bit is a H264Profile enum value - H264ProfileHigh10bit = "HIGH_10BIT" - - // H264ProfileHigh422 is a H264Profile enum value - H264ProfileHigh422 = "HIGH_422" - - // H264ProfileHigh42210bit is a H264Profile enum value - H264ProfileHigh42210bit = "HIGH_422_10BIT" - - // H264ProfileMain is a H264Profile enum value - H264ProfileMain = "MAIN" -) - -const ( - // H264RateControlModeCbr is a H264RateControlMode enum value - H264RateControlModeCbr = "CBR" - - // H264RateControlModeQvbr is a H264RateControlMode enum value - H264RateControlModeQvbr = "QVBR" - - // H264RateControlModeVbr is a H264RateControlMode enum value - H264RateControlModeVbr = "VBR" -) - -const ( - // H264ScanTypeInterlaced is a H264ScanType enum value - H264ScanTypeInterlaced = "INTERLACED" - - // H264ScanTypeProgressive is a H264ScanType enum value - H264ScanTypeProgressive = "PROGRESSIVE" -) - -const ( - // H264SceneChangeDetectDisabled is a H264SceneChangeDetect enum value - H264SceneChangeDetectDisabled = "DISABLED" - - // H264SceneChangeDetectEnabled is a H264SceneChangeDetect enum value - H264SceneChangeDetectEnabled = "ENABLED" -) - -const ( - // H264SpatialAqDisabled is a H264SpatialAq enum value - H264SpatialAqDisabled = "DISABLED" - - // H264SpatialAqEnabled is a H264SpatialAq enum value - H264SpatialAqEnabled = "ENABLED" -) - -const ( - // H264SubGopLengthDynamic is a H264SubGopLength enum value - H264SubGopLengthDynamic = "DYNAMIC" - - // H264SubGopLengthFixed is a H264SubGopLength enum value - H264SubGopLengthFixed = "FIXED" -) - -const ( - // H264SyntaxDefault is a H264Syntax enum value - H264SyntaxDefault = "DEFAULT" - - // H264SyntaxRp2027 is a H264Syntax enum value - H264SyntaxRp2027 = "RP2027" -) - -const ( - // H264TemporalAqDisabled is a H264TemporalAq enum value - H264TemporalAqDisabled = "DISABLED" - - // H264TemporalAqEnabled is a H264TemporalAq enum value - H264TemporalAqEnabled = "ENABLED" -) - -const ( - // H264TimecodeInsertionBehaviorDisabled is a H264TimecodeInsertionBehavior enum value - H264TimecodeInsertionBehaviorDisabled = "DISABLED" - - // H264TimecodeInsertionBehaviorPicTimingSei is a H264TimecodeInsertionBehavior enum value - H264TimecodeInsertionBehaviorPicTimingSei = "PIC_TIMING_SEI" -) - -const ( - // HlsAdMarkersAdobe is a HlsAdMarkers enum value - HlsAdMarkersAdobe = "ADOBE" - - // HlsAdMarkersElemental is a HlsAdMarkers enum value - HlsAdMarkersElemental = "ELEMENTAL" - - // HlsAdMarkersElementalScte35 is a HlsAdMarkers enum value - HlsAdMarkersElementalScte35 = "ELEMENTAL_SCTE35" -) - -const ( - // HlsAkamaiHttpTransferModeChunked is a HlsAkamaiHttpTransferMode enum value - HlsAkamaiHttpTransferModeChunked = "CHUNKED" - - // HlsAkamaiHttpTransferModeNonChunked is a HlsAkamaiHttpTransferMode enum value - HlsAkamaiHttpTransferModeNonChunked = "NON_CHUNKED" -) - -const ( - // HlsCaptionLanguageSettingInsert is a HlsCaptionLanguageSetting enum value - HlsCaptionLanguageSettingInsert = "INSERT" - - // HlsCaptionLanguageSettingNone is a HlsCaptionLanguageSetting enum value - HlsCaptionLanguageSettingNone = "NONE" - - // HlsCaptionLanguageSettingOmit is a HlsCaptionLanguageSetting enum value - HlsCaptionLanguageSettingOmit = "OMIT" -) - -const ( - // HlsClientCacheDisabled is a HlsClientCache enum value - HlsClientCacheDisabled = "DISABLED" - - // HlsClientCacheEnabled is a HlsClientCache enum value - HlsClientCacheEnabled = "ENABLED" -) - -const ( - // HlsCodecSpecificationRfc4281 is a HlsCodecSpecification enum value - HlsCodecSpecificationRfc4281 = "RFC_4281" - - // HlsCodecSpecificationRfc6381 is a HlsCodecSpecification enum value - HlsCodecSpecificationRfc6381 = "RFC_6381" -) - -const ( - // HlsDirectoryStructureSingleDirectory is a HlsDirectoryStructure enum value - HlsDirectoryStructureSingleDirectory = "SINGLE_DIRECTORY" - - // HlsDirectoryStructureSubdirectoryPerStream is a HlsDirectoryStructure enum value - HlsDirectoryStructureSubdirectoryPerStream = "SUBDIRECTORY_PER_STREAM" -) - -const ( - // HlsEncryptionTypeAes128 is a HlsEncryptionType enum value - HlsEncryptionTypeAes128 = "AES128" - - // HlsEncryptionTypeSampleAes is a HlsEncryptionType enum value - HlsEncryptionTypeSampleAes = "SAMPLE_AES" -) - -const ( - // HlsIvInManifestExclude is a HlsIvInManifest enum value - HlsIvInManifestExclude = "EXCLUDE" - - // HlsIvInManifestInclude is a HlsIvInManifest enum value - HlsIvInManifestInclude = "INCLUDE" -) - -const ( - // HlsIvSourceExplicit is a HlsIvSource enum value - HlsIvSourceExplicit = "EXPLICIT" - - // HlsIvSourceFollowsSegmentNumber is a HlsIvSource enum value - HlsIvSourceFollowsSegmentNumber = "FOLLOWS_SEGMENT_NUMBER" -) - -const ( - // HlsManifestCompressionGzip is a HlsManifestCompression enum value - HlsManifestCompressionGzip = "GZIP" - - // HlsManifestCompressionNone is a HlsManifestCompression enum value - HlsManifestCompressionNone = "NONE" -) - -const ( - // HlsManifestDurationFormatFloatingPoint is a HlsManifestDurationFormat enum value - HlsManifestDurationFormatFloatingPoint = "FLOATING_POINT" - - // HlsManifestDurationFormatInteger is a HlsManifestDurationFormat enum value - HlsManifestDurationFormatInteger = "INTEGER" -) - -const ( - // HlsMediaStoreStorageClassTemporal is a HlsMediaStoreStorageClass enum value - HlsMediaStoreStorageClassTemporal = "TEMPORAL" -) - -const ( - // HlsModeLive is a HlsMode enum value - HlsModeLive = "LIVE" - - // HlsModeVod is a HlsMode enum value - HlsModeVod = "VOD" -) - -const ( - // HlsOutputSelectionManifestsAndSegments is a HlsOutputSelection enum value - HlsOutputSelectionManifestsAndSegments = "MANIFESTS_AND_SEGMENTS" - - // HlsOutputSelectionSegmentsOnly is a HlsOutputSelection enum value - HlsOutputSelectionSegmentsOnly = "SEGMENTS_ONLY" -) - -const ( - // HlsProgramDateTimeExclude is a HlsProgramDateTime enum value - HlsProgramDateTimeExclude = "EXCLUDE" - - // HlsProgramDateTimeInclude is a HlsProgramDateTime enum value - HlsProgramDateTimeInclude = "INCLUDE" -) - -const ( - // HlsRedundantManifestDisabled is a HlsRedundantManifest enum value - HlsRedundantManifestDisabled = "DISABLED" - - // HlsRedundantManifestEnabled is a HlsRedundantManifest enum value - HlsRedundantManifestEnabled = "ENABLED" -) - -const ( - // HlsSegmentationModeUseInputSegmentation is a HlsSegmentationMode enum value - HlsSegmentationModeUseInputSegmentation = "USE_INPUT_SEGMENTATION" - - // HlsSegmentationModeUseSegmentDuration is a HlsSegmentationMode enum value - HlsSegmentationModeUseSegmentDuration = "USE_SEGMENT_DURATION" -) - -const ( - // HlsStreamInfResolutionExclude is a HlsStreamInfResolution enum value - HlsStreamInfResolutionExclude = "EXCLUDE" - - // HlsStreamInfResolutionInclude is a HlsStreamInfResolution enum value - HlsStreamInfResolutionInclude = "INCLUDE" -) - -const ( - // HlsTimedMetadataId3FrameNone is a HlsTimedMetadataId3Frame enum value - HlsTimedMetadataId3FrameNone = "NONE" - - // HlsTimedMetadataId3FramePriv is a HlsTimedMetadataId3Frame enum value - HlsTimedMetadataId3FramePriv = "PRIV" - - // HlsTimedMetadataId3FrameTdrl is a HlsTimedMetadataId3Frame enum value - HlsTimedMetadataId3FrameTdrl = "TDRL" -) - -const ( - // HlsTsFileModeSegmentedFiles is a HlsTsFileMode enum value - HlsTsFileModeSegmentedFiles = "SEGMENTED_FILES" - - // HlsTsFileModeSingleFile is a HlsTsFileMode enum value - HlsTsFileModeSingleFile = "SINGLE_FILE" -) - -const ( - // HlsWebdavHttpTransferModeChunked is a HlsWebdavHttpTransferMode enum value - HlsWebdavHttpTransferModeChunked = "CHUNKED" - - // HlsWebdavHttpTransferModeNonChunked is a HlsWebdavHttpTransferMode enum value - HlsWebdavHttpTransferModeNonChunked = "NON_CHUNKED" -) - -// When set to "standard", an I-Frame only playlist will be written out for -// each video output in the output group. This I-Frame only playlist will contain -// byte range offsets pointing to the I-frame(s) in each segment. -const ( - // IFrameOnlyPlaylistTypeDisabled is a IFrameOnlyPlaylistType enum value - IFrameOnlyPlaylistTypeDisabled = "DISABLED" - - // IFrameOnlyPlaylistTypeStandard is a IFrameOnlyPlaylistType enum value - IFrameOnlyPlaylistTypeStandard = "STANDARD" -) - -// codec in increasing order of complexity -const ( - // InputCodecMpeg2 is a InputCodec enum value - InputCodecMpeg2 = "MPEG2" - - // InputCodecAvc is a InputCodec enum value - InputCodecAvc = "AVC" - - // InputCodecHevc is a InputCodec enum value - InputCodecHevc = "HEVC" -) - -const ( - // InputDeblockFilterDisabled is a InputDeblockFilter enum value - InputDeblockFilterDisabled = "DISABLED" - - // InputDeblockFilterEnabled is a InputDeblockFilter enum value - InputDeblockFilterEnabled = "ENABLED" -) - -const ( - // InputDenoiseFilterDisabled is a InputDenoiseFilter enum value - InputDenoiseFilterDisabled = "DISABLED" - - // InputDenoiseFilterEnabled is a InputDenoiseFilter enum value - InputDenoiseFilterEnabled = "ENABLED" -) - -const ( - // InputFilterAuto is a InputFilter enum value - InputFilterAuto = "AUTO" - - // InputFilterDisabled is a InputFilter enum value - InputFilterDisabled = "DISABLED" - - // InputFilterForced is a InputFilter enum value - InputFilterForced = "FORCED" -) - -const ( - // InputLossActionForHlsOutEmitOutput is a InputLossActionForHlsOut enum value - InputLossActionForHlsOutEmitOutput = "EMIT_OUTPUT" - - // InputLossActionForHlsOutPauseOutput is a InputLossActionForHlsOut enum value - InputLossActionForHlsOutPauseOutput = "PAUSE_OUTPUT" -) - -const ( - // InputLossActionForMsSmoothOutEmitOutput is a InputLossActionForMsSmoothOut enum value - InputLossActionForMsSmoothOutEmitOutput = "EMIT_OUTPUT" - - // InputLossActionForMsSmoothOutPauseOutput is a InputLossActionForMsSmoothOut enum value - InputLossActionForMsSmoothOutPauseOutput = "PAUSE_OUTPUT" -) - -const ( - // InputLossActionForRtmpOutEmitOutput is a InputLossActionForRtmpOut enum value - InputLossActionForRtmpOutEmitOutput = "EMIT_OUTPUT" - - // InputLossActionForRtmpOutPauseOutput is a InputLossActionForRtmpOut enum value - InputLossActionForRtmpOutPauseOutput = "PAUSE_OUTPUT" -) - -const ( - // InputLossActionForUdpOutDropProgram is a InputLossActionForUdpOut enum value - InputLossActionForUdpOutDropProgram = "DROP_PROGRAM" - - // InputLossActionForUdpOutDropTs is a InputLossActionForUdpOut enum value - InputLossActionForUdpOutDropTs = "DROP_TS" - - // InputLossActionForUdpOutEmitProgram is a InputLossActionForUdpOut enum value - InputLossActionForUdpOutEmitProgram = "EMIT_PROGRAM" -) - -const ( - // InputLossImageTypeColor is a InputLossImageType enum value - InputLossImageTypeColor = "COLOR" - - // InputLossImageTypeSlate is a InputLossImageType enum value - InputLossImageTypeSlate = "SLATE" -) - -// Maximum input bitrate in megabits per second. Bitrates up to 50 Mbps are -// supported currently. -const ( - // InputMaximumBitrateMax10Mbps is a InputMaximumBitrate enum value - InputMaximumBitrateMax10Mbps = "MAX_10_MBPS" - - // InputMaximumBitrateMax20Mbps is a InputMaximumBitrate enum value - InputMaximumBitrateMax20Mbps = "MAX_20_MBPS" - - // InputMaximumBitrateMax50Mbps is a InputMaximumBitrate enum value - InputMaximumBitrateMax50Mbps = "MAX_50_MBPS" -) - -// Input resolution based on lines of vertical resolution in the input; SD is -// less than 720 lines, HD is 720 to 1080 lines, UHD is greater than 1080 lines -const ( - // InputResolutionSd is a InputResolution enum value - InputResolutionSd = "SD" - - // InputResolutionHd is a InputResolution enum value - InputResolutionHd = "HD" - - // InputResolutionUhd is a InputResolution enum value - InputResolutionUhd = "UHD" -) - -const ( - // InputSecurityGroupStateIdle is a InputSecurityGroupState enum value - InputSecurityGroupStateIdle = "IDLE" - - // InputSecurityGroupStateInUse is a InputSecurityGroupState enum value - InputSecurityGroupStateInUse = "IN_USE" - - // InputSecurityGroupStateUpdating is a InputSecurityGroupState enum value - InputSecurityGroupStateUpdating = "UPDATING" - - // InputSecurityGroupStateDeleted is a InputSecurityGroupState enum value - InputSecurityGroupStateDeleted = "DELETED" -) - -const ( - // InputSourceEndBehaviorContinue is a InputSourceEndBehavior enum value - InputSourceEndBehaviorContinue = "CONTINUE" - - // InputSourceEndBehaviorLoop is a InputSourceEndBehavior enum value - InputSourceEndBehaviorLoop = "LOOP" -) - -const ( - // InputStateCreating is a InputState enum value - InputStateCreating = "CREATING" - - // InputStateDetached is a InputState enum value - InputStateDetached = "DETACHED" - - // InputStateAttached is a InputState enum value - InputStateAttached = "ATTACHED" - - // InputStateDeleting is a InputState enum value - InputStateDeleting = "DELETING" - - // InputStateDeleted is a InputState enum value - InputStateDeleted = "DELETED" -) - -const ( - // InputTypeUdpPush is a InputType enum value - InputTypeUdpPush = "UDP_PUSH" - - // InputTypeRtpPush is a InputType enum value - InputTypeRtpPush = "RTP_PUSH" - - // InputTypeRtmpPush is a InputType enum value - InputTypeRtmpPush = "RTMP_PUSH" - - // InputTypeRtmpPull is a InputType enum value - InputTypeRtmpPull = "RTMP_PULL" - - // InputTypeUrlPull is a InputType enum value - InputTypeUrlPull = "URL_PULL" - - // InputTypeMp4File is a InputType enum value - InputTypeMp4File = "MP4_FILE" - - // InputTypeMediaconnect is a InputType enum value - InputTypeMediaconnect = "MEDIACONNECT" -) - -// The log level the user wants for their channel. -const ( - // LogLevelError is a LogLevel enum value - LogLevelError = "ERROR" - - // LogLevelWarning is a LogLevel enum value - LogLevelWarning = "WARNING" - - // LogLevelInfo is a LogLevel enum value - LogLevelInfo = "INFO" - - // LogLevelDebug is a LogLevel enum value - LogLevelDebug = "DEBUG" - - // LogLevelDisabled is a LogLevel enum value - LogLevelDisabled = "DISABLED" -) - -const ( - // M2tsAbsentInputAudioBehaviorDrop is a M2tsAbsentInputAudioBehavior enum value - M2tsAbsentInputAudioBehaviorDrop = "DROP" - - // M2tsAbsentInputAudioBehaviorEncodeSilence is a M2tsAbsentInputAudioBehavior enum value - M2tsAbsentInputAudioBehaviorEncodeSilence = "ENCODE_SILENCE" -) - -const ( - // M2tsAribDisabled is a M2tsArib enum value - M2tsAribDisabled = "DISABLED" - - // M2tsAribEnabled is a M2tsArib enum value - M2tsAribEnabled = "ENABLED" -) - -const ( - // M2tsAribCaptionsPidControlAuto is a M2tsAribCaptionsPidControl enum value - M2tsAribCaptionsPidControlAuto = "AUTO" - - // M2tsAribCaptionsPidControlUseConfigured is a M2tsAribCaptionsPidControl enum value - M2tsAribCaptionsPidControlUseConfigured = "USE_CONFIGURED" -) - -const ( - // M2tsAudioBufferModelAtsc is a M2tsAudioBufferModel enum value - M2tsAudioBufferModelAtsc = "ATSC" - - // M2tsAudioBufferModelDvb is a M2tsAudioBufferModel enum value - M2tsAudioBufferModelDvb = "DVB" -) - -const ( - // M2tsAudioIntervalVideoAndFixedIntervals is a M2tsAudioInterval enum value - M2tsAudioIntervalVideoAndFixedIntervals = "VIDEO_AND_FIXED_INTERVALS" - - // M2tsAudioIntervalVideoInterval is a M2tsAudioInterval enum value - M2tsAudioIntervalVideoInterval = "VIDEO_INTERVAL" -) - -const ( - // M2tsAudioStreamTypeAtsc is a M2tsAudioStreamType enum value - M2tsAudioStreamTypeAtsc = "ATSC" - - // M2tsAudioStreamTypeDvb is a M2tsAudioStreamType enum value - M2tsAudioStreamTypeDvb = "DVB" -) - -const ( - // M2tsBufferModelMultiplex is a M2tsBufferModel enum value - M2tsBufferModelMultiplex = "MULTIPLEX" - - // M2tsBufferModelNone is a M2tsBufferModel enum value - M2tsBufferModelNone = "NONE" -) - -const ( - // M2tsCcDescriptorDisabled is a M2tsCcDescriptor enum value - M2tsCcDescriptorDisabled = "DISABLED" - - // M2tsCcDescriptorEnabled is a M2tsCcDescriptor enum value - M2tsCcDescriptorEnabled = "ENABLED" -) - -const ( - // M2tsEbifControlNone is a M2tsEbifControl enum value - M2tsEbifControlNone = "NONE" - - // M2tsEbifControlPassthrough is a M2tsEbifControl enum value - M2tsEbifControlPassthrough = "PASSTHROUGH" -) - -const ( - // M2tsEbpPlacementVideoAndAudioPids is a M2tsEbpPlacement enum value - M2tsEbpPlacementVideoAndAudioPids = "VIDEO_AND_AUDIO_PIDS" - - // M2tsEbpPlacementVideoPid is a M2tsEbpPlacement enum value - M2tsEbpPlacementVideoPid = "VIDEO_PID" -) - -const ( - // M2tsEsRateInPesExclude is a M2tsEsRateInPes enum value - M2tsEsRateInPesExclude = "EXCLUDE" - - // M2tsEsRateInPesInclude is a M2tsEsRateInPes enum value - M2tsEsRateInPesInclude = "INCLUDE" -) - -const ( - // M2tsKlvNone is a M2tsKlv enum value - M2tsKlvNone = "NONE" - - // M2tsKlvPassthrough is a M2tsKlv enum value - M2tsKlvPassthrough = "PASSTHROUGH" -) - -const ( - // M2tsPcrControlConfiguredPcrPeriod is a M2tsPcrControl enum value - M2tsPcrControlConfiguredPcrPeriod = "CONFIGURED_PCR_PERIOD" - - // M2tsPcrControlPcrEveryPesPacket is a M2tsPcrControl enum value - M2tsPcrControlPcrEveryPesPacket = "PCR_EVERY_PES_PACKET" -) - -const ( - // M2tsRateModeCbr is a M2tsRateMode enum value - M2tsRateModeCbr = "CBR" - - // M2tsRateModeVbr is a M2tsRateMode enum value - M2tsRateModeVbr = "VBR" -) - -const ( - // M2tsScte35ControlNone is a M2tsScte35Control enum value - M2tsScte35ControlNone = "NONE" - - // M2tsScte35ControlPassthrough is a M2tsScte35Control enum value - M2tsScte35ControlPassthrough = "PASSTHROUGH" -) - -const ( - // M2tsSegmentationMarkersEbp is a M2tsSegmentationMarkers enum value - M2tsSegmentationMarkersEbp = "EBP" - - // M2tsSegmentationMarkersEbpLegacy is a M2tsSegmentationMarkers enum value - M2tsSegmentationMarkersEbpLegacy = "EBP_LEGACY" - - // M2tsSegmentationMarkersNone is a M2tsSegmentationMarkers enum value - M2tsSegmentationMarkersNone = "NONE" - - // M2tsSegmentationMarkersPsiSegstart is a M2tsSegmentationMarkers enum value - M2tsSegmentationMarkersPsiSegstart = "PSI_SEGSTART" - - // M2tsSegmentationMarkersRaiAdapt is a M2tsSegmentationMarkers enum value - M2tsSegmentationMarkersRaiAdapt = "RAI_ADAPT" - - // M2tsSegmentationMarkersRaiSegstart is a M2tsSegmentationMarkers enum value - M2tsSegmentationMarkersRaiSegstart = "RAI_SEGSTART" -) - -const ( - // M2tsSegmentationStyleMaintainCadence is a M2tsSegmentationStyle enum value - M2tsSegmentationStyleMaintainCadence = "MAINTAIN_CADENCE" - - // M2tsSegmentationStyleResetCadence is a M2tsSegmentationStyle enum value - M2tsSegmentationStyleResetCadence = "RESET_CADENCE" -) - -const ( - // M2tsTimedMetadataBehaviorNoPassthrough is a M2tsTimedMetadataBehavior enum value - M2tsTimedMetadataBehaviorNoPassthrough = "NO_PASSTHROUGH" - - // M2tsTimedMetadataBehaviorPassthrough is a M2tsTimedMetadataBehavior enum value - M2tsTimedMetadataBehaviorPassthrough = "PASSTHROUGH" -) - -const ( - // M3u8PcrControlConfiguredPcrPeriod is a M3u8PcrControl enum value - M3u8PcrControlConfiguredPcrPeriod = "CONFIGURED_PCR_PERIOD" - - // M3u8PcrControlPcrEveryPesPacket is a M3u8PcrControl enum value - M3u8PcrControlPcrEveryPesPacket = "PCR_EVERY_PES_PACKET" -) - -const ( - // M3u8Scte35BehaviorNoPassthrough is a M3u8Scte35Behavior enum value - M3u8Scte35BehaviorNoPassthrough = "NO_PASSTHROUGH" - - // M3u8Scte35BehaviorPassthrough is a M3u8Scte35Behavior enum value - M3u8Scte35BehaviorPassthrough = "PASSTHROUGH" -) - -const ( - // M3u8TimedMetadataBehaviorNoPassthrough is a M3u8TimedMetadataBehavior enum value - M3u8TimedMetadataBehaviorNoPassthrough = "NO_PASSTHROUGH" - - // M3u8TimedMetadataBehaviorPassthrough is a M3u8TimedMetadataBehavior enum value - M3u8TimedMetadataBehaviorPassthrough = "PASSTHROUGH" -) - -const ( - // Mp2CodingModeCodingMode10 is a Mp2CodingMode enum value - Mp2CodingModeCodingMode10 = "CODING_MODE_1_0" - - // Mp2CodingModeCodingMode20 is a Mp2CodingMode enum value - Mp2CodingModeCodingMode20 = "CODING_MODE_2_0" -) - -const ( - // NetworkInputServerValidationCheckCryptographyAndValidateName is a NetworkInputServerValidation enum value - NetworkInputServerValidationCheckCryptographyAndValidateName = "CHECK_CRYPTOGRAPHY_AND_VALIDATE_NAME" - - // NetworkInputServerValidationCheckCryptographyOnly is a NetworkInputServerValidation enum value - NetworkInputServerValidationCheckCryptographyOnly = "CHECK_CRYPTOGRAPHY_ONLY" -) - -// Units for duration, e.g. 'MONTHS' -const ( - // OfferingDurationUnitsMonths is a OfferingDurationUnits enum value - OfferingDurationUnitsMonths = "MONTHS" -) - -// Offering type, e.g. 'NO_UPFRONT' -const ( - // OfferingTypeNoUpfront is a OfferingType enum value - OfferingTypeNoUpfront = "NO_UPFRONT" -) - -// Codec, 'MPEG2', 'AVC', 'HEVC', or 'AUDIO' -const ( - // ReservationCodecMpeg2 is a ReservationCodec enum value - ReservationCodecMpeg2 = "MPEG2" - - // ReservationCodecAvc is a ReservationCodec enum value - ReservationCodecAvc = "AVC" - - // ReservationCodecHevc is a ReservationCodec enum value - ReservationCodecHevc = "HEVC" - - // ReservationCodecAudio is a ReservationCodec enum value - ReservationCodecAudio = "AUDIO" -) - -// Maximum bitrate in megabits per second -const ( - // ReservationMaximumBitrateMax10Mbps is a ReservationMaximumBitrate enum value - ReservationMaximumBitrateMax10Mbps = "MAX_10_MBPS" - - // ReservationMaximumBitrateMax20Mbps is a ReservationMaximumBitrate enum value - ReservationMaximumBitrateMax20Mbps = "MAX_20_MBPS" - - // ReservationMaximumBitrateMax50Mbps is a ReservationMaximumBitrate enum value - ReservationMaximumBitrateMax50Mbps = "MAX_50_MBPS" -) - -// Maximum framerate in frames per second (Outputs only) -const ( - // ReservationMaximumFramerateMax30Fps is a ReservationMaximumFramerate enum value - ReservationMaximumFramerateMax30Fps = "MAX_30_FPS" - - // ReservationMaximumFramerateMax60Fps is a ReservationMaximumFramerate enum value - ReservationMaximumFramerateMax60Fps = "MAX_60_FPS" -) - -// Resolution based on lines of vertical resolution; SD is less than 720 lines, -// HD is 720 to 1080 lines, UHD is greater than 1080 lines -const ( - // ReservationResolutionSd is a ReservationResolution enum value - ReservationResolutionSd = "SD" - - // ReservationResolutionHd is a ReservationResolution enum value - ReservationResolutionHd = "HD" - - // ReservationResolutionUhd is a ReservationResolution enum value - ReservationResolutionUhd = "UHD" -) - -// Resource type, 'INPUT', 'OUTPUT', or 'CHANNEL' -const ( - // ReservationResourceTypeInput is a ReservationResourceType enum value - ReservationResourceTypeInput = "INPUT" - - // ReservationResourceTypeOutput is a ReservationResourceType enum value - ReservationResourceTypeOutput = "OUTPUT" - - // ReservationResourceTypeChannel is a ReservationResourceType enum value - ReservationResourceTypeChannel = "CHANNEL" -) - -// Special features, 'ADVANCED_AUDIO' or 'AUDIO_NORMALIZATION' -const ( - // ReservationSpecialFeatureAdvancedAudio is a ReservationSpecialFeature enum value - ReservationSpecialFeatureAdvancedAudio = "ADVANCED_AUDIO" - - // ReservationSpecialFeatureAudioNormalization is a ReservationSpecialFeature enum value - ReservationSpecialFeatureAudioNormalization = "AUDIO_NORMALIZATION" -) - -// Current reservation state -const ( - // ReservationStateActive is a ReservationState enum value - ReservationStateActive = "ACTIVE" - - // ReservationStateExpired is a ReservationState enum value - ReservationStateExpired = "EXPIRED" - - // ReservationStateCanceled is a ReservationState enum value - ReservationStateCanceled = "CANCELED" - - // ReservationStateDeleted is a ReservationState enum value - ReservationStateDeleted = "DELETED" -) - -// Video quality, e.g. 'STANDARD' (Outputs only) -const ( - // ReservationVideoQualityStandard is a ReservationVideoQuality enum value - ReservationVideoQualityStandard = "STANDARD" - - // ReservationVideoQualityEnhanced is a ReservationVideoQuality enum value - ReservationVideoQualityEnhanced = "ENHANCED" - - // ReservationVideoQualityPremium is a ReservationVideoQuality enum value - ReservationVideoQualityPremium = "PREMIUM" -) - -const ( - // RtmpCacheFullBehaviorDisconnectImmediately is a RtmpCacheFullBehavior enum value - RtmpCacheFullBehaviorDisconnectImmediately = "DISCONNECT_IMMEDIATELY" - - // RtmpCacheFullBehaviorWaitForServer is a RtmpCacheFullBehavior enum value - RtmpCacheFullBehaviorWaitForServer = "WAIT_FOR_SERVER" -) - -const ( - // RtmpCaptionDataAll is a RtmpCaptionData enum value - RtmpCaptionDataAll = "ALL" - - // RtmpCaptionDataField1608 is a RtmpCaptionData enum value - RtmpCaptionDataField1608 = "FIELD1_608" - - // RtmpCaptionDataField1AndField2608 is a RtmpCaptionData enum value - RtmpCaptionDataField1AndField2608 = "FIELD1_AND_FIELD2_608" -) - -const ( - // RtmpOutputCertificateModeSelfSigned is a RtmpOutputCertificateMode enum value - RtmpOutputCertificateModeSelfSigned = "SELF_SIGNED" - - // RtmpOutputCertificateModeVerifyAuthenticity is a RtmpOutputCertificateMode enum value - RtmpOutputCertificateModeVerifyAuthenticity = "VERIFY_AUTHENTICITY" -) - -const ( - // Scte20Convert608To708Disabled is a Scte20Convert608To708 enum value - Scte20Convert608To708Disabled = "DISABLED" - - // Scte20Convert608To708Upconvert is a Scte20Convert608To708 enum value - Scte20Convert608To708Upconvert = "UPCONVERT" -) - -const ( - // Scte35AposNoRegionalBlackoutBehaviorFollow is a Scte35AposNoRegionalBlackoutBehavior enum value - Scte35AposNoRegionalBlackoutBehaviorFollow = "FOLLOW" - - // Scte35AposNoRegionalBlackoutBehaviorIgnore is a Scte35AposNoRegionalBlackoutBehavior enum value - Scte35AposNoRegionalBlackoutBehaviorIgnore = "IGNORE" -) - -const ( - // Scte35AposWebDeliveryAllowedBehaviorFollow is a Scte35AposWebDeliveryAllowedBehavior enum value - Scte35AposWebDeliveryAllowedBehaviorFollow = "FOLLOW" - - // Scte35AposWebDeliveryAllowedBehaviorIgnore is a Scte35AposWebDeliveryAllowedBehavior enum value - Scte35AposWebDeliveryAllowedBehaviorIgnore = "IGNORE" -) - -// Corresponds to the archive_allowed parameter. A value of ARCHIVE_NOT_ALLOWED -// corresponds to 0 (false) in the SCTE-35 specification. If you include one -// of the "restriction" flags then you must include all four of them. -const ( - // Scte35ArchiveAllowedFlagArchiveNotAllowed is a Scte35ArchiveAllowedFlag enum value - Scte35ArchiveAllowedFlagArchiveNotAllowed = "ARCHIVE_NOT_ALLOWED" - - // Scte35ArchiveAllowedFlagArchiveAllowed is a Scte35ArchiveAllowedFlag enum value - Scte35ArchiveAllowedFlagArchiveAllowed = "ARCHIVE_ALLOWED" -) - -// Corresponds to the device_restrictions parameter in a segmentation_descriptor. -// If you include one of the "restriction" flags then you must include all four -// of them. -const ( - // Scte35DeviceRestrictionsNone is a Scte35DeviceRestrictions enum value - Scte35DeviceRestrictionsNone = "NONE" - - // Scte35DeviceRestrictionsRestrictGroup0 is a Scte35DeviceRestrictions enum value - Scte35DeviceRestrictionsRestrictGroup0 = "RESTRICT_GROUP0" - - // Scte35DeviceRestrictionsRestrictGroup1 is a Scte35DeviceRestrictions enum value - Scte35DeviceRestrictionsRestrictGroup1 = "RESTRICT_GROUP1" - - // Scte35DeviceRestrictionsRestrictGroup2 is a Scte35DeviceRestrictions enum value - Scte35DeviceRestrictionsRestrictGroup2 = "RESTRICT_GROUP2" -) - -// Corresponds to the no_regional_blackout_flag parameter. A value of REGIONAL_BLACKOUT -// corresponds to 0 (false) in the SCTE-35 specification. If you include one -// of the "restriction" flags then you must include all four of them. -const ( - // Scte35NoRegionalBlackoutFlagRegionalBlackout is a Scte35NoRegionalBlackoutFlag enum value - Scte35NoRegionalBlackoutFlagRegionalBlackout = "REGIONAL_BLACKOUT" - - // Scte35NoRegionalBlackoutFlagNoRegionalBlackout is a Scte35NoRegionalBlackoutFlag enum value - Scte35NoRegionalBlackoutFlagNoRegionalBlackout = "NO_REGIONAL_BLACKOUT" -) - -// Corresponds to SCTE-35 segmentation_event_cancel_indicator. SEGMENTATION_EVENT_NOT_CANCELED -// corresponds to 0 in the SCTE-35 specification and indicates that this is -// an insertion request. SEGMENTATION_EVENT_CANCELED corresponds to 1 in the -// SCTE-35 specification and indicates that this is a cancelation request, in -// which case complete this field and the existing event ID to cancel. -const ( - // Scte35SegmentationCancelIndicatorSegmentationEventNotCanceled is a Scte35SegmentationCancelIndicator enum value - Scte35SegmentationCancelIndicatorSegmentationEventNotCanceled = "SEGMENTATION_EVENT_NOT_CANCELED" - - // Scte35SegmentationCancelIndicatorSegmentationEventCanceled is a Scte35SegmentationCancelIndicator enum value - Scte35SegmentationCancelIndicatorSegmentationEventCanceled = "SEGMENTATION_EVENT_CANCELED" -) - -const ( - // Scte35SpliceInsertNoRegionalBlackoutBehaviorFollow is a Scte35SpliceInsertNoRegionalBlackoutBehavior enum value - Scte35SpliceInsertNoRegionalBlackoutBehaviorFollow = "FOLLOW" - - // Scte35SpliceInsertNoRegionalBlackoutBehaviorIgnore is a Scte35SpliceInsertNoRegionalBlackoutBehavior enum value - Scte35SpliceInsertNoRegionalBlackoutBehaviorIgnore = "IGNORE" -) - -const ( - // Scte35SpliceInsertWebDeliveryAllowedBehaviorFollow is a Scte35SpliceInsertWebDeliveryAllowedBehavior enum value - Scte35SpliceInsertWebDeliveryAllowedBehaviorFollow = "FOLLOW" - - // Scte35SpliceInsertWebDeliveryAllowedBehaviorIgnore is a Scte35SpliceInsertWebDeliveryAllowedBehavior enum value - Scte35SpliceInsertWebDeliveryAllowedBehaviorIgnore = "IGNORE" -) - -// Corresponds to the web_delivery_allowed_flag parameter. A value of WEB_DELIVERY_NOT_ALLOWED -// corresponds to 0 (false) in the SCTE-35 specification. If you include one -// of the "restriction" flags then you must include all four of them. -const ( - // Scte35WebDeliveryAllowedFlagWebDeliveryNotAllowed is a Scte35WebDeliveryAllowedFlag enum value - Scte35WebDeliveryAllowedFlagWebDeliveryNotAllowed = "WEB_DELIVERY_NOT_ALLOWED" - - // Scte35WebDeliveryAllowedFlagWebDeliveryAllowed is a Scte35WebDeliveryAllowedFlag enum value - Scte35WebDeliveryAllowedFlagWebDeliveryAllowed = "WEB_DELIVERY_ALLOWED" -) - -const ( - // SmoothGroupAudioOnlyTimecodeControlPassthrough is a SmoothGroupAudioOnlyTimecodeControl enum value - SmoothGroupAudioOnlyTimecodeControlPassthrough = "PASSTHROUGH" - - // SmoothGroupAudioOnlyTimecodeControlUseConfiguredClock is a SmoothGroupAudioOnlyTimecodeControl enum value - SmoothGroupAudioOnlyTimecodeControlUseConfiguredClock = "USE_CONFIGURED_CLOCK" -) - -const ( - // SmoothGroupCertificateModeSelfSigned is a SmoothGroupCertificateMode enum value - SmoothGroupCertificateModeSelfSigned = "SELF_SIGNED" - - // SmoothGroupCertificateModeVerifyAuthenticity is a SmoothGroupCertificateMode enum value - SmoothGroupCertificateModeVerifyAuthenticity = "VERIFY_AUTHENTICITY" -) - -const ( - // SmoothGroupEventIdModeNoEventId is a SmoothGroupEventIdMode enum value - SmoothGroupEventIdModeNoEventId = "NO_EVENT_ID" - - // SmoothGroupEventIdModeUseConfigured is a SmoothGroupEventIdMode enum value - SmoothGroupEventIdModeUseConfigured = "USE_CONFIGURED" - - // SmoothGroupEventIdModeUseTimestamp is a SmoothGroupEventIdMode enum value - SmoothGroupEventIdModeUseTimestamp = "USE_TIMESTAMP" -) - -const ( - // SmoothGroupEventStopBehaviorNone is a SmoothGroupEventStopBehavior enum value - SmoothGroupEventStopBehaviorNone = "NONE" - - // SmoothGroupEventStopBehaviorSendEos is a SmoothGroupEventStopBehavior enum value - SmoothGroupEventStopBehaviorSendEos = "SEND_EOS" -) - -const ( - // SmoothGroupSegmentationModeUseInputSegmentation is a SmoothGroupSegmentationMode enum value - SmoothGroupSegmentationModeUseInputSegmentation = "USE_INPUT_SEGMENTATION" - - // SmoothGroupSegmentationModeUseSegmentDuration is a SmoothGroupSegmentationMode enum value - SmoothGroupSegmentationModeUseSegmentDuration = "USE_SEGMENT_DURATION" -) - -const ( - // SmoothGroupSparseTrackTypeNone is a SmoothGroupSparseTrackType enum value - SmoothGroupSparseTrackTypeNone = "NONE" - - // SmoothGroupSparseTrackTypeScte35 is a SmoothGroupSparseTrackType enum value - SmoothGroupSparseTrackTypeScte35 = "SCTE_35" -) - -const ( - // SmoothGroupStreamManifestBehaviorDoNotSend is a SmoothGroupStreamManifestBehavior enum value - SmoothGroupStreamManifestBehaviorDoNotSend = "DO_NOT_SEND" - - // SmoothGroupStreamManifestBehaviorSend is a SmoothGroupStreamManifestBehavior enum value - SmoothGroupStreamManifestBehaviorSend = "SEND" -) - -const ( - // SmoothGroupTimestampOffsetModeUseConfiguredOffset is a SmoothGroupTimestampOffsetMode enum value - SmoothGroupTimestampOffsetModeUseConfiguredOffset = "USE_CONFIGURED_OFFSET" - - // SmoothGroupTimestampOffsetModeUseEventStartDate is a SmoothGroupTimestampOffsetMode enum value - SmoothGroupTimestampOffsetModeUseEventStartDate = "USE_EVENT_START_DATE" -) - -const ( - // TimecodeConfigSourceEmbedded is a TimecodeConfigSource enum value - TimecodeConfigSourceEmbedded = "EMBEDDED" - - // TimecodeConfigSourceSystemclock is a TimecodeConfigSource enum value - TimecodeConfigSourceSystemclock = "SYSTEMCLOCK" - - // TimecodeConfigSourceZerobased is a TimecodeConfigSource enum value - TimecodeConfigSourceZerobased = "ZEROBASED" -) - -const ( - // TtmlDestinationStyleControlPassthrough is a TtmlDestinationStyleControl enum value - TtmlDestinationStyleControlPassthrough = "PASSTHROUGH" - - // TtmlDestinationStyleControlUseConfigured is a TtmlDestinationStyleControl enum value - TtmlDestinationStyleControlUseConfigured = "USE_CONFIGURED" -) - -const ( - // UdpTimedMetadataId3FrameNone is a UdpTimedMetadataId3Frame enum value - UdpTimedMetadataId3FrameNone = "NONE" - - // UdpTimedMetadataId3FramePriv is a UdpTimedMetadataId3Frame enum value - UdpTimedMetadataId3FramePriv = "PRIV" - - // UdpTimedMetadataId3FrameTdrl is a UdpTimedMetadataId3Frame enum value - UdpTimedMetadataId3FrameTdrl = "TDRL" -) - -const ( - // VideoDescriptionRespondToAfdNone is a VideoDescriptionRespondToAfd enum value - VideoDescriptionRespondToAfdNone = "NONE" - - // VideoDescriptionRespondToAfdPassthrough is a VideoDescriptionRespondToAfd enum value - VideoDescriptionRespondToAfdPassthrough = "PASSTHROUGH" - - // VideoDescriptionRespondToAfdRespond is a VideoDescriptionRespondToAfd enum value - VideoDescriptionRespondToAfdRespond = "RESPOND" -) - -const ( - // VideoDescriptionScalingBehaviorDefault is a VideoDescriptionScalingBehavior enum value - VideoDescriptionScalingBehaviorDefault = "DEFAULT" - - // VideoDescriptionScalingBehaviorStretchToOutput is a VideoDescriptionScalingBehavior enum value - VideoDescriptionScalingBehaviorStretchToOutput = "STRETCH_TO_OUTPUT" -) - -const ( - // VideoSelectorColorSpaceFollow is a VideoSelectorColorSpace enum value - VideoSelectorColorSpaceFollow = "FOLLOW" - - // VideoSelectorColorSpaceRec601 is a VideoSelectorColorSpace enum value - VideoSelectorColorSpaceRec601 = "REC_601" - - // VideoSelectorColorSpaceRec709 is a VideoSelectorColorSpace enum value - VideoSelectorColorSpaceRec709 = "REC_709" -) - -const ( - // VideoSelectorColorSpaceUsageFallback is a VideoSelectorColorSpaceUsage enum value - VideoSelectorColorSpaceUsageFallback = "FALLBACK" - - // VideoSelectorColorSpaceUsageForce is a VideoSelectorColorSpaceUsage enum value - VideoSelectorColorSpaceUsageForce = "FORCE" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/doc.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/doc.go deleted file mode 100644 index 22c909872..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/medialive/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package medialive provides the client and types for making API -// requests to AWS Elemental MediaLive. -// -// API for AWS Elemental MediaLive -// -// See https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14 for more information on this service. -// -// See medialive package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/medialive/ -// -// Using the Client -// -// To contact AWS Elemental MediaLive 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 Elemental MediaLive client MediaLive for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/medialive/#New -package medialive diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/errors.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/errors.go deleted file mode 100644 index 247fb52c7..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/medialive/errors.go +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package medialive - -const ( - - // ErrCodeBadGatewayException for service response error code - // "BadGatewayException". - ErrCodeBadGatewayException = "BadGatewayException" - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeConflictException for service response error code - // "ConflictException". - ErrCodeConflictException = "ConflictException" - - // ErrCodeForbiddenException for service response error code - // "ForbiddenException". - ErrCodeForbiddenException = "ForbiddenException" - - // ErrCodeGatewayTimeoutException for service response error code - // "GatewayTimeoutException". - ErrCodeGatewayTimeoutException = "GatewayTimeoutException" - - // ErrCodeInternalServerErrorException for service response error code - // "InternalServerErrorException". - ErrCodeInternalServerErrorException = "InternalServerErrorException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - ErrCodeTooManyRequestsException = "TooManyRequestsException" - - // ErrCodeUnprocessableEntityException for service response error code - // "UnprocessableEntityException". - ErrCodeUnprocessableEntityException = "UnprocessableEntityException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/service.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/service.go deleted file mode 100644 index 582d570f1..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/medialive/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package medialive - -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" -) - -// MediaLive provides the API operation methods for making requests to -// AWS Elemental MediaLive. See this package's package overview docs -// for details on the service. -// -// MediaLive methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type MediaLive 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 = "medialive" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "MediaLive" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the MediaLive client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a MediaLive client from just a session. -// svc := medialive.New(mySession) -// -// // Create a MediaLive client with additional configuration -// svc := medialive.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaLive { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "medialive" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *MediaLive { - svc := &MediaLive{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-10-14", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a MediaLive operation and runs any -// custom request initialization. -func (c *MediaLive) 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/mediapackage/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go deleted file mode 100644 index 13ced8ae2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go +++ /dev/null @@ -1,3954 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediapackage - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opCreateChannel = "CreateChannel" - -// CreateChannelRequest generates a "aws/request.Request" representing the -// client's request for the CreateChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateChannel for more information on using the CreateChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateChannelRequest method. -// req, resp := client.CreateChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/CreateChannel -func (c *MediaPackage) CreateChannelRequest(input *CreateChannelInput) (req *request.Request, output *CreateChannelOutput) { - op := &request.Operation{ - Name: opCreateChannel, - HTTPMethod: "POST", - HTTPPath: "/channels", - } - - if input == nil { - input = &CreateChannelInput{} - } - - output = &CreateChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateChannel API operation for AWS Elemental MediaPackage. -// -// Creates a new Channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaPackage's -// API operation CreateChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/CreateChannel -func (c *MediaPackage) CreateChannel(input *CreateChannelInput) (*CreateChannelOutput, error) { - req, out := c.CreateChannelRequest(input) - return out, req.Send() -} - -// CreateChannelWithContext is the same as CreateChannel with the addition of -// the ability to pass a context and additional request options. -// -// See CreateChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaPackage) CreateChannelWithContext(ctx aws.Context, input *CreateChannelInput, opts ...request.Option) (*CreateChannelOutput, error) { - req, out := c.CreateChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateOriginEndpoint = "CreateOriginEndpoint" - -// CreateOriginEndpointRequest generates a "aws/request.Request" representing the -// client's request for the CreateOriginEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateOriginEndpoint for more information on using the CreateOriginEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateOriginEndpointRequest method. -// req, resp := client.CreateOriginEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/CreateOriginEndpoint -func (c *MediaPackage) CreateOriginEndpointRequest(input *CreateOriginEndpointInput) (req *request.Request, output *CreateOriginEndpointOutput) { - op := &request.Operation{ - Name: opCreateOriginEndpoint, - HTTPMethod: "POST", - HTTPPath: "/origin_endpoints", - } - - if input == nil { - input = &CreateOriginEndpointInput{} - } - - output = &CreateOriginEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateOriginEndpoint API operation for AWS Elemental MediaPackage. -// -// Creates a new OriginEndpoint record. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaPackage's -// API operation CreateOriginEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/CreateOriginEndpoint -func (c *MediaPackage) CreateOriginEndpoint(input *CreateOriginEndpointInput) (*CreateOriginEndpointOutput, error) { - req, out := c.CreateOriginEndpointRequest(input) - return out, req.Send() -} - -// CreateOriginEndpointWithContext is the same as CreateOriginEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See CreateOriginEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaPackage) CreateOriginEndpointWithContext(ctx aws.Context, input *CreateOriginEndpointInput, opts ...request.Option) (*CreateOriginEndpointOutput, error) { - req, out := c.CreateOriginEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteChannel = "DeleteChannel" - -// DeleteChannelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteChannel for more information on using the DeleteChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteChannelRequest method. -// req, resp := client.DeleteChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DeleteChannel -func (c *MediaPackage) DeleteChannelRequest(input *DeleteChannelInput) (req *request.Request, output *DeleteChannelOutput) { - op := &request.Operation{ - Name: opDeleteChannel, - HTTPMethod: "DELETE", - HTTPPath: "/channels/{id}", - } - - if input == nil { - input = &DeleteChannelInput{} - } - - output = &DeleteChannelOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteChannel API operation for AWS Elemental MediaPackage. -// -// Deletes an existing Channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaPackage's -// API operation DeleteChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DeleteChannel -func (c *MediaPackage) DeleteChannel(input *DeleteChannelInput) (*DeleteChannelOutput, error) { - req, out := c.DeleteChannelRequest(input) - return out, req.Send() -} - -// DeleteChannelWithContext is the same as DeleteChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaPackage) DeleteChannelWithContext(ctx aws.Context, input *DeleteChannelInput, opts ...request.Option) (*DeleteChannelOutput, error) { - req, out := c.DeleteChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteOriginEndpoint = "DeleteOriginEndpoint" - -// DeleteOriginEndpointRequest generates a "aws/request.Request" representing the -// client's request for the DeleteOriginEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteOriginEndpoint for more information on using the DeleteOriginEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteOriginEndpointRequest method. -// req, resp := client.DeleteOriginEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DeleteOriginEndpoint -func (c *MediaPackage) DeleteOriginEndpointRequest(input *DeleteOriginEndpointInput) (req *request.Request, output *DeleteOriginEndpointOutput) { - op := &request.Operation{ - Name: opDeleteOriginEndpoint, - HTTPMethod: "DELETE", - HTTPPath: "/origin_endpoints/{id}", - } - - if input == nil { - input = &DeleteOriginEndpointInput{} - } - - output = &DeleteOriginEndpointOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteOriginEndpoint API operation for AWS Elemental MediaPackage. -// -// Deletes an existing OriginEndpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaPackage's -// API operation DeleteOriginEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DeleteOriginEndpoint -func (c *MediaPackage) DeleteOriginEndpoint(input *DeleteOriginEndpointInput) (*DeleteOriginEndpointOutput, error) { - req, out := c.DeleteOriginEndpointRequest(input) - return out, req.Send() -} - -// DeleteOriginEndpointWithContext is the same as DeleteOriginEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteOriginEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaPackage) DeleteOriginEndpointWithContext(ctx aws.Context, input *DeleteOriginEndpointInput, opts ...request.Option) (*DeleteOriginEndpointOutput, error) { - req, out := c.DeleteOriginEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeChannel = "DescribeChannel" - -// DescribeChannelRequest generates a "aws/request.Request" representing the -// client's request for the DescribeChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeChannel for more information on using the DescribeChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeChannelRequest method. -// req, resp := client.DescribeChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DescribeChannel -func (c *MediaPackage) DescribeChannelRequest(input *DescribeChannelInput) (req *request.Request, output *DescribeChannelOutput) { - op := &request.Operation{ - Name: opDescribeChannel, - HTTPMethod: "GET", - HTTPPath: "/channels/{id}", - } - - if input == nil { - input = &DescribeChannelInput{} - } - - output = &DescribeChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeChannel API operation for AWS Elemental MediaPackage. -// -// Gets details about a Channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaPackage's -// API operation DescribeChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DescribeChannel -func (c *MediaPackage) DescribeChannel(input *DescribeChannelInput) (*DescribeChannelOutput, error) { - req, out := c.DescribeChannelRequest(input) - return out, req.Send() -} - -// DescribeChannelWithContext is the same as DescribeChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaPackage) DescribeChannelWithContext(ctx aws.Context, input *DescribeChannelInput, opts ...request.Option) (*DescribeChannelOutput, error) { - req, out := c.DescribeChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeOriginEndpoint = "DescribeOriginEndpoint" - -// DescribeOriginEndpointRequest generates a "aws/request.Request" representing the -// client's request for the DescribeOriginEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeOriginEndpoint for more information on using the DescribeOriginEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeOriginEndpointRequest method. -// req, resp := client.DescribeOriginEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DescribeOriginEndpoint -func (c *MediaPackage) DescribeOriginEndpointRequest(input *DescribeOriginEndpointInput) (req *request.Request, output *DescribeOriginEndpointOutput) { - op := &request.Operation{ - Name: opDescribeOriginEndpoint, - HTTPMethod: "GET", - HTTPPath: "/origin_endpoints/{id}", - } - - if input == nil { - input = &DescribeOriginEndpointInput{} - } - - output = &DescribeOriginEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeOriginEndpoint API operation for AWS Elemental MediaPackage. -// -// Gets details about an existing OriginEndpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaPackage's -// API operation DescribeOriginEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DescribeOriginEndpoint -func (c *MediaPackage) DescribeOriginEndpoint(input *DescribeOriginEndpointInput) (*DescribeOriginEndpointOutput, error) { - req, out := c.DescribeOriginEndpointRequest(input) - return out, req.Send() -} - -// DescribeOriginEndpointWithContext is the same as DescribeOriginEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeOriginEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaPackage) DescribeOriginEndpointWithContext(ctx aws.Context, input *DescribeOriginEndpointInput, opts ...request.Option) (*DescribeOriginEndpointOutput, error) { - req, out := c.DescribeOriginEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListChannels = "ListChannels" - -// ListChannelsRequest generates a "aws/request.Request" representing the -// client's request for the ListChannels operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListChannels for more information on using the ListChannels -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListChannelsRequest method. -// req, resp := client.ListChannelsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListChannels -func (c *MediaPackage) ListChannelsRequest(input *ListChannelsInput) (req *request.Request, output *ListChannelsOutput) { - op := &request.Operation{ - Name: opListChannels, - HTTPMethod: "GET", - HTTPPath: "/channels", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListChannelsInput{} - } - - output = &ListChannelsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListChannels API operation for AWS Elemental MediaPackage. -// -// Returns a collection of Channels. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaPackage's -// API operation ListChannels for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListChannels -func (c *MediaPackage) ListChannels(input *ListChannelsInput) (*ListChannelsOutput, error) { - req, out := c.ListChannelsRequest(input) - return out, req.Send() -} - -// ListChannelsWithContext is the same as ListChannels with the addition of -// the ability to pass a context and additional request options. -// -// See ListChannels for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaPackage) ListChannelsWithContext(ctx aws.Context, input *ListChannelsInput, opts ...request.Option) (*ListChannelsOutput, error) { - req, out := c.ListChannelsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListChannelsPages iterates over the pages of a ListChannels operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListChannels 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 ListChannels operation. -// pageNum := 0 -// err := client.ListChannelsPages(params, -// func(page *ListChannelsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *MediaPackage) ListChannelsPages(input *ListChannelsInput, fn func(*ListChannelsOutput, bool) bool) error { - return c.ListChannelsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListChannelsPagesWithContext same as ListChannelsPages 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 *MediaPackage) ListChannelsPagesWithContext(ctx aws.Context, input *ListChannelsInput, fn func(*ListChannelsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListChannelsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListChannelsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListChannelsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListOriginEndpoints = "ListOriginEndpoints" - -// ListOriginEndpointsRequest generates a "aws/request.Request" representing the -// client's request for the ListOriginEndpoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListOriginEndpoints for more information on using the ListOriginEndpoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListOriginEndpointsRequest method. -// req, resp := client.ListOriginEndpointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListOriginEndpoints -func (c *MediaPackage) ListOriginEndpointsRequest(input *ListOriginEndpointsInput) (req *request.Request, output *ListOriginEndpointsOutput) { - op := &request.Operation{ - Name: opListOriginEndpoints, - HTTPMethod: "GET", - HTTPPath: "/origin_endpoints", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListOriginEndpointsInput{} - } - - output = &ListOriginEndpointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOriginEndpoints API operation for AWS Elemental MediaPackage. -// -// Returns a collection of OriginEndpoint records. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaPackage's -// API operation ListOriginEndpoints for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListOriginEndpoints -func (c *MediaPackage) ListOriginEndpoints(input *ListOriginEndpointsInput) (*ListOriginEndpointsOutput, error) { - req, out := c.ListOriginEndpointsRequest(input) - return out, req.Send() -} - -// ListOriginEndpointsWithContext is the same as ListOriginEndpoints with the addition of -// the ability to pass a context and additional request options. -// -// See ListOriginEndpoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaPackage) ListOriginEndpointsWithContext(ctx aws.Context, input *ListOriginEndpointsInput, opts ...request.Option) (*ListOriginEndpointsOutput, error) { - req, out := c.ListOriginEndpointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListOriginEndpointsPages iterates over the pages of a ListOriginEndpoints operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListOriginEndpoints 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 ListOriginEndpoints operation. -// pageNum := 0 -// err := client.ListOriginEndpointsPages(params, -// func(page *ListOriginEndpointsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *MediaPackage) ListOriginEndpointsPages(input *ListOriginEndpointsInput, fn func(*ListOriginEndpointsOutput, bool) bool) error { - return c.ListOriginEndpointsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListOriginEndpointsPagesWithContext same as ListOriginEndpointsPages 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 *MediaPackage) ListOriginEndpointsPagesWithContext(ctx aws.Context, input *ListOriginEndpointsInput, fn func(*ListOriginEndpointsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListOriginEndpointsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListOriginEndpointsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListOriginEndpointsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opRotateChannelCredentials = "RotateChannelCredentials" - -// RotateChannelCredentialsRequest generates a "aws/request.Request" representing the -// client's request for the RotateChannelCredentials operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RotateChannelCredentials for more information on using the RotateChannelCredentials -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RotateChannelCredentialsRequest method. -// req, resp := client.RotateChannelCredentialsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateChannelCredentials -// -// Deprecated: This API is deprecated. Please use RotateIngestEndpointCredentials instead -func (c *MediaPackage) RotateChannelCredentialsRequest(input *RotateChannelCredentialsInput) (req *request.Request, output *RotateChannelCredentialsOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, RotateChannelCredentials, has been deprecated") - } - op := &request.Operation{ - Name: opRotateChannelCredentials, - HTTPMethod: "PUT", - HTTPPath: "/channels/{id}/credentials", - } - - if input == nil { - input = &RotateChannelCredentialsInput{} - } - - output = &RotateChannelCredentialsOutput{} - req = c.newRequest(op, input, output) - return -} - -// RotateChannelCredentials API operation for AWS Elemental MediaPackage. -// -// Changes the Channel's first IngestEndpoint's username and password. WARNING -// - This API is deprecated. Please use RotateIngestEndpointCredentials instead -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaPackage's -// API operation RotateChannelCredentials for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateChannelCredentials -// -// Deprecated: This API is deprecated. Please use RotateIngestEndpointCredentials instead -func (c *MediaPackage) RotateChannelCredentials(input *RotateChannelCredentialsInput) (*RotateChannelCredentialsOutput, error) { - req, out := c.RotateChannelCredentialsRequest(input) - return out, req.Send() -} - -// RotateChannelCredentialsWithContext is the same as RotateChannelCredentials with the addition of -// the ability to pass a context and additional request options. -// -// See RotateChannelCredentials for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: This API is deprecated. Please use RotateIngestEndpointCredentials instead -func (c *MediaPackage) RotateChannelCredentialsWithContext(ctx aws.Context, input *RotateChannelCredentialsInput, opts ...request.Option) (*RotateChannelCredentialsOutput, error) { - req, out := c.RotateChannelCredentialsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRotateIngestEndpointCredentials = "RotateIngestEndpointCredentials" - -// RotateIngestEndpointCredentialsRequest generates a "aws/request.Request" representing the -// client's request for the RotateIngestEndpointCredentials operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RotateIngestEndpointCredentials for more information on using the RotateIngestEndpointCredentials -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RotateIngestEndpointCredentialsRequest method. -// req, resp := client.RotateIngestEndpointCredentialsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateIngestEndpointCredentials -func (c *MediaPackage) RotateIngestEndpointCredentialsRequest(input *RotateIngestEndpointCredentialsInput) (req *request.Request, output *RotateIngestEndpointCredentialsOutput) { - op := &request.Operation{ - Name: opRotateIngestEndpointCredentials, - HTTPMethod: "PUT", - HTTPPath: "/channels/{id}/ingest_endpoints/{ingest_endpoint_id}/credentials", - } - - if input == nil { - input = &RotateIngestEndpointCredentialsInput{} - } - - output = &RotateIngestEndpointCredentialsOutput{} - req = c.newRequest(op, input, output) - return -} - -// RotateIngestEndpointCredentials API operation for AWS Elemental MediaPackage. -// -// Rotate the IngestEndpoint's username and password, as specified by the IngestEndpoint's -// id. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaPackage's -// API operation RotateIngestEndpointCredentials for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateIngestEndpointCredentials -func (c *MediaPackage) RotateIngestEndpointCredentials(input *RotateIngestEndpointCredentialsInput) (*RotateIngestEndpointCredentialsOutput, error) { - req, out := c.RotateIngestEndpointCredentialsRequest(input) - return out, req.Send() -} - -// RotateIngestEndpointCredentialsWithContext is the same as RotateIngestEndpointCredentials with the addition of -// the ability to pass a context and additional request options. -// -// See RotateIngestEndpointCredentials for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaPackage) RotateIngestEndpointCredentialsWithContext(ctx aws.Context, input *RotateIngestEndpointCredentialsInput, opts ...request.Option) (*RotateIngestEndpointCredentialsOutput, error) { - req, out := c.RotateIngestEndpointCredentialsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateChannel = "UpdateChannel" - -// UpdateChannelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateChannel for more information on using the UpdateChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateChannelRequest method. -// req, resp := client.UpdateChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/UpdateChannel -func (c *MediaPackage) UpdateChannelRequest(input *UpdateChannelInput) (req *request.Request, output *UpdateChannelOutput) { - op := &request.Operation{ - Name: opUpdateChannel, - HTTPMethod: "PUT", - HTTPPath: "/channels/{id}", - } - - if input == nil { - input = &UpdateChannelInput{} - } - - output = &UpdateChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateChannel API operation for AWS Elemental MediaPackage. -// -// Updates an existing Channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaPackage's -// API operation UpdateChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/UpdateChannel -func (c *MediaPackage) UpdateChannel(input *UpdateChannelInput) (*UpdateChannelOutput, error) { - req, out := c.UpdateChannelRequest(input) - return out, req.Send() -} - -// UpdateChannelWithContext is the same as UpdateChannel with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaPackage) UpdateChannelWithContext(ctx aws.Context, input *UpdateChannelInput, opts ...request.Option) (*UpdateChannelOutput, error) { - req, out := c.UpdateChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateOriginEndpoint = "UpdateOriginEndpoint" - -// UpdateOriginEndpointRequest generates a "aws/request.Request" representing the -// client's request for the UpdateOriginEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateOriginEndpoint for more information on using the UpdateOriginEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateOriginEndpointRequest method. -// req, resp := client.UpdateOriginEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/UpdateOriginEndpoint -func (c *MediaPackage) UpdateOriginEndpointRequest(input *UpdateOriginEndpointInput) (req *request.Request, output *UpdateOriginEndpointOutput) { - op := &request.Operation{ - Name: opUpdateOriginEndpoint, - HTTPMethod: "PUT", - HTTPPath: "/origin_endpoints/{id}", - } - - if input == nil { - input = &UpdateOriginEndpointInput{} - } - - output = &UpdateOriginEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateOriginEndpoint API operation for AWS Elemental MediaPackage. -// -// Updates an existing OriginEndpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaPackage's -// API operation UpdateOriginEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// -// * ErrCodeForbiddenException "ForbiddenException" -// -// * ErrCodeNotFoundException "NotFoundException" -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/UpdateOriginEndpoint -func (c *MediaPackage) UpdateOriginEndpoint(input *UpdateOriginEndpointInput) (*UpdateOriginEndpointOutput, error) { - req, out := c.UpdateOriginEndpointRequest(input) - return out, req.Send() -} - -// UpdateOriginEndpointWithContext is the same as UpdateOriginEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateOriginEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaPackage) UpdateOriginEndpointWithContext(ctx aws.Context, input *UpdateOriginEndpointInput, opts ...request.Option) (*UpdateOriginEndpointOutput, error) { - req, out := c.UpdateOriginEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// A Channel resource configuration. -type Channel struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) assigned to the Channel. - Arn *string `locationName:"arn" type:"string"` - - // A short text description of the Channel. - Description *string `locationName:"description" type:"string"` - - // An HTTP Live Streaming (HLS) ingest resource configuration. - HlsIngest *HlsIngest `locationName:"hlsIngest" type:"structure"` - - // The ID of the Channel. - Id *string `locationName:"id" type:"string"` -} - -// String returns the string representation -func (s Channel) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Channel) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Channel) SetArn(v string) *Channel { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Channel) SetDescription(v string) *Channel { - s.Description = &v - return s -} - -// SetHlsIngest sets the HlsIngest field's value. -func (s *Channel) SetHlsIngest(v *HlsIngest) *Channel { - s.HlsIngest = v - return s -} - -// SetId sets the Id field's value. -func (s *Channel) SetId(v string) *Channel { - s.Id = &v - return s -} - -// A Common Media Application Format (CMAF) encryption configuration. -type CmafEncryption struct { - _ struct{} `type:"structure"` - - // Time (in seconds) between each encryption key rotation. - KeyRotationIntervalSeconds *int64 `locationName:"keyRotationIntervalSeconds" type:"integer"` - - // A configuration for accessing an external Secure Packager and Encoder Key - // Exchange (SPEKE) service that will provide encryption keys. - // - // SpekeKeyProvider is a required field - SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure" required:"true"` -} - -// String returns the string representation -func (s CmafEncryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CmafEncryption) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CmafEncryption) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CmafEncryption"} - if s.SpekeKeyProvider == nil { - invalidParams.Add(request.NewErrParamRequired("SpekeKeyProvider")) - } - if s.SpekeKeyProvider != nil { - if err := s.SpekeKeyProvider.Validate(); err != nil { - invalidParams.AddNested("SpekeKeyProvider", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyRotationIntervalSeconds sets the KeyRotationIntervalSeconds field's value. -func (s *CmafEncryption) SetKeyRotationIntervalSeconds(v int64) *CmafEncryption { - s.KeyRotationIntervalSeconds = &v - return s -} - -// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. -func (s *CmafEncryption) SetSpekeKeyProvider(v *SpekeKeyProvider) *CmafEncryption { - s.SpekeKeyProvider = v - return s -} - -// A Common Media Application Format (CMAF) packaging configuration. -type CmafPackage struct { - _ struct{} `type:"structure"` - - // A Common Media Application Format (CMAF) encryption configuration. - Encryption *CmafEncryption `locationName:"encryption" type:"structure"` - - // A list of HLS manifest configurations - HlsManifests []*HlsManifest `locationName:"hlsManifests" type:"list"` - - // Duration (in seconds) of each segment. Actual segments will berounded to - // the nearest multiple of the source segment duration. - SegmentDurationSeconds *int64 `locationName:"segmentDurationSeconds" type:"integer"` - - // An optional custom string that is prepended to the name of each segment. - // If not specified, it defaults to the ChannelId. - SegmentPrefix *string `locationName:"segmentPrefix" type:"string"` - - // A StreamSelection configuration. - StreamSelection *StreamSelection `locationName:"streamSelection" type:"structure"` -} - -// String returns the string representation -func (s CmafPackage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CmafPackage) GoString() string { - return s.String() -} - -// SetEncryption sets the Encryption field's value. -func (s *CmafPackage) SetEncryption(v *CmafEncryption) *CmafPackage { - s.Encryption = v - return s -} - -// SetHlsManifests sets the HlsManifests field's value. -func (s *CmafPackage) SetHlsManifests(v []*HlsManifest) *CmafPackage { - s.HlsManifests = v - return s -} - -// SetSegmentDurationSeconds sets the SegmentDurationSeconds field's value. -func (s *CmafPackage) SetSegmentDurationSeconds(v int64) *CmafPackage { - s.SegmentDurationSeconds = &v - return s -} - -// SetSegmentPrefix sets the SegmentPrefix field's value. -func (s *CmafPackage) SetSegmentPrefix(v string) *CmafPackage { - s.SegmentPrefix = &v - return s -} - -// SetStreamSelection sets the StreamSelection field's value. -func (s *CmafPackage) SetStreamSelection(v *StreamSelection) *CmafPackage { - s.StreamSelection = v - return s -} - -// A Common Media Application Format (CMAF) packaging configuration. -type CmafPackageCreateOrUpdateParameters struct { - _ struct{} `type:"structure"` - - // A Common Media Application Format (CMAF) encryption configuration. - Encryption *CmafEncryption `locationName:"encryption" type:"structure"` - - // A list of HLS manifest configurations - HlsManifests []*HlsManifestCreateOrUpdateParameters `locationName:"hlsManifests" type:"list"` - - // Duration (in seconds) of each segment. Actual segments will berounded to - // the nearest multiple of the source segment duration. - SegmentDurationSeconds *int64 `locationName:"segmentDurationSeconds" type:"integer"` - - // An optional custom string that is prepended to the name of each segment. - // If not specified, it defaults to the ChannelId. - SegmentPrefix *string `locationName:"segmentPrefix" type:"string"` - - // A StreamSelection configuration. - StreamSelection *StreamSelection `locationName:"streamSelection" type:"structure"` -} - -// String returns the string representation -func (s CmafPackageCreateOrUpdateParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CmafPackageCreateOrUpdateParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CmafPackageCreateOrUpdateParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CmafPackageCreateOrUpdateParameters"} - if s.Encryption != nil { - if err := s.Encryption.Validate(); err != nil { - invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) - } - } - if s.HlsManifests != nil { - for i, v := range s.HlsManifests { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "HlsManifests", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryption sets the Encryption field's value. -func (s *CmafPackageCreateOrUpdateParameters) SetEncryption(v *CmafEncryption) *CmafPackageCreateOrUpdateParameters { - s.Encryption = v - return s -} - -// SetHlsManifests sets the HlsManifests field's value. -func (s *CmafPackageCreateOrUpdateParameters) SetHlsManifests(v []*HlsManifestCreateOrUpdateParameters) *CmafPackageCreateOrUpdateParameters { - s.HlsManifests = v - return s -} - -// SetSegmentDurationSeconds sets the SegmentDurationSeconds field's value. -func (s *CmafPackageCreateOrUpdateParameters) SetSegmentDurationSeconds(v int64) *CmafPackageCreateOrUpdateParameters { - s.SegmentDurationSeconds = &v - return s -} - -// SetSegmentPrefix sets the SegmentPrefix field's value. -func (s *CmafPackageCreateOrUpdateParameters) SetSegmentPrefix(v string) *CmafPackageCreateOrUpdateParameters { - s.SegmentPrefix = &v - return s -} - -// SetStreamSelection sets the StreamSelection field's value. -func (s *CmafPackageCreateOrUpdateParameters) SetStreamSelection(v *StreamSelection) *CmafPackageCreateOrUpdateParameters { - s.StreamSelection = v - return s -} - -type CreateChannelInput struct { - _ struct{} `type:"structure"` - - Description *string `locationName:"description" type:"string"` - - // Id is a required field - Id *string `locationName:"id" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateChannelInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateChannelInput) SetDescription(v string) *CreateChannelInput { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *CreateChannelInput) SetId(v string) *CreateChannelInput { - s.Id = &v - return s -} - -type CreateChannelOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Description *string `locationName:"description" type:"string"` - - // An HTTP Live Streaming (HLS) ingest resource configuration. - HlsIngest *HlsIngest `locationName:"hlsIngest" type:"structure"` - - Id *string `locationName:"id" type:"string"` -} - -// String returns the string representation -func (s CreateChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateChannelOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *CreateChannelOutput) SetArn(v string) *CreateChannelOutput { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateChannelOutput) SetDescription(v string) *CreateChannelOutput { - s.Description = &v - return s -} - -// SetHlsIngest sets the HlsIngest field's value. -func (s *CreateChannelOutput) SetHlsIngest(v *HlsIngest) *CreateChannelOutput { - s.HlsIngest = v - return s -} - -// SetId sets the Id field's value. -func (s *CreateChannelOutput) SetId(v string) *CreateChannelOutput { - s.Id = &v - return s -} - -type CreateOriginEndpointInput struct { - _ struct{} `type:"structure"` - - // ChannelId is a required field - ChannelId *string `locationName:"channelId" type:"string" required:"true"` - - // A Common Media Application Format (CMAF) packaging configuration. - CmafPackage *CmafPackageCreateOrUpdateParameters `locationName:"cmafPackage" type:"structure"` - - // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. - DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` - - Description *string `locationName:"description" type:"string"` - - // An HTTP Live Streaming (HLS) packaging configuration. - HlsPackage *HlsPackage `locationName:"hlsPackage" type:"structure"` - - // Id is a required field - Id *string `locationName:"id" type:"string" required:"true"` - - ManifestName *string `locationName:"manifestName" type:"string"` - - // A Microsoft Smooth Streaming (MSS) packaging configuration. - MssPackage *MssPackage `locationName:"mssPackage" type:"structure"` - - StartoverWindowSeconds *int64 `locationName:"startoverWindowSeconds" type:"integer"` - - TimeDelaySeconds *int64 `locationName:"timeDelaySeconds" type:"integer"` - - Whitelist []*string `locationName:"whitelist" type:"list"` -} - -// String returns the string representation -func (s CreateOriginEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateOriginEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateOriginEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateOriginEndpointInput"} - if s.ChannelId == nil { - invalidParams.Add(request.NewErrParamRequired("ChannelId")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.CmafPackage != nil { - if err := s.CmafPackage.Validate(); err != nil { - invalidParams.AddNested("CmafPackage", err.(request.ErrInvalidParams)) - } - } - if s.DashPackage != nil { - if err := s.DashPackage.Validate(); err != nil { - invalidParams.AddNested("DashPackage", err.(request.ErrInvalidParams)) - } - } - if s.HlsPackage != nil { - if err := s.HlsPackage.Validate(); err != nil { - invalidParams.AddNested("HlsPackage", err.(request.ErrInvalidParams)) - } - } - if s.MssPackage != nil { - if err := s.MssPackage.Validate(); err != nil { - invalidParams.AddNested("MssPackage", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChannelId sets the ChannelId field's value. -func (s *CreateOriginEndpointInput) SetChannelId(v string) *CreateOriginEndpointInput { - s.ChannelId = &v - return s -} - -// SetCmafPackage sets the CmafPackage field's value. -func (s *CreateOriginEndpointInput) SetCmafPackage(v *CmafPackageCreateOrUpdateParameters) *CreateOriginEndpointInput { - s.CmafPackage = v - return s -} - -// SetDashPackage sets the DashPackage field's value. -func (s *CreateOriginEndpointInput) SetDashPackage(v *DashPackage) *CreateOriginEndpointInput { - s.DashPackage = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateOriginEndpointInput) SetDescription(v string) *CreateOriginEndpointInput { - s.Description = &v - return s -} - -// SetHlsPackage sets the HlsPackage field's value. -func (s *CreateOriginEndpointInput) SetHlsPackage(v *HlsPackage) *CreateOriginEndpointInput { - s.HlsPackage = v - return s -} - -// SetId sets the Id field's value. -func (s *CreateOriginEndpointInput) SetId(v string) *CreateOriginEndpointInput { - s.Id = &v - return s -} - -// SetManifestName sets the ManifestName field's value. -func (s *CreateOriginEndpointInput) SetManifestName(v string) *CreateOriginEndpointInput { - s.ManifestName = &v - return s -} - -// SetMssPackage sets the MssPackage field's value. -func (s *CreateOriginEndpointInput) SetMssPackage(v *MssPackage) *CreateOriginEndpointInput { - s.MssPackage = v - return s -} - -// SetStartoverWindowSeconds sets the StartoverWindowSeconds field's value. -func (s *CreateOriginEndpointInput) SetStartoverWindowSeconds(v int64) *CreateOriginEndpointInput { - s.StartoverWindowSeconds = &v - return s -} - -// SetTimeDelaySeconds sets the TimeDelaySeconds field's value. -func (s *CreateOriginEndpointInput) SetTimeDelaySeconds(v int64) *CreateOriginEndpointInput { - s.TimeDelaySeconds = &v - return s -} - -// SetWhitelist sets the Whitelist field's value. -func (s *CreateOriginEndpointInput) SetWhitelist(v []*string) *CreateOriginEndpointInput { - s.Whitelist = v - return s -} - -type CreateOriginEndpointOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - ChannelId *string `locationName:"channelId" type:"string"` - - // A Common Media Application Format (CMAF) packaging configuration. - CmafPackage *CmafPackage `locationName:"cmafPackage" type:"structure"` - - // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. - DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` - - Description *string `locationName:"description" type:"string"` - - // An HTTP Live Streaming (HLS) packaging configuration. - HlsPackage *HlsPackage `locationName:"hlsPackage" type:"structure"` - - Id *string `locationName:"id" type:"string"` - - ManifestName *string `locationName:"manifestName" type:"string"` - - // A Microsoft Smooth Streaming (MSS) packaging configuration. - MssPackage *MssPackage `locationName:"mssPackage" type:"structure"` - - StartoverWindowSeconds *int64 `locationName:"startoverWindowSeconds" type:"integer"` - - TimeDelaySeconds *int64 `locationName:"timeDelaySeconds" type:"integer"` - - Url *string `locationName:"url" type:"string"` - - Whitelist []*string `locationName:"whitelist" type:"list"` -} - -// String returns the string representation -func (s CreateOriginEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateOriginEndpointOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *CreateOriginEndpointOutput) SetArn(v string) *CreateOriginEndpointOutput { - s.Arn = &v - return s -} - -// SetChannelId sets the ChannelId field's value. -func (s *CreateOriginEndpointOutput) SetChannelId(v string) *CreateOriginEndpointOutput { - s.ChannelId = &v - return s -} - -// SetCmafPackage sets the CmafPackage field's value. -func (s *CreateOriginEndpointOutput) SetCmafPackage(v *CmafPackage) *CreateOriginEndpointOutput { - s.CmafPackage = v - return s -} - -// SetDashPackage sets the DashPackage field's value. -func (s *CreateOriginEndpointOutput) SetDashPackage(v *DashPackage) *CreateOriginEndpointOutput { - s.DashPackage = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateOriginEndpointOutput) SetDescription(v string) *CreateOriginEndpointOutput { - s.Description = &v - return s -} - -// SetHlsPackage sets the HlsPackage field's value. -func (s *CreateOriginEndpointOutput) SetHlsPackage(v *HlsPackage) *CreateOriginEndpointOutput { - s.HlsPackage = v - return s -} - -// SetId sets the Id field's value. -func (s *CreateOriginEndpointOutput) SetId(v string) *CreateOriginEndpointOutput { - s.Id = &v - return s -} - -// SetManifestName sets the ManifestName field's value. -func (s *CreateOriginEndpointOutput) SetManifestName(v string) *CreateOriginEndpointOutput { - s.ManifestName = &v - return s -} - -// SetMssPackage sets the MssPackage field's value. -func (s *CreateOriginEndpointOutput) SetMssPackage(v *MssPackage) *CreateOriginEndpointOutput { - s.MssPackage = v - return s -} - -// SetStartoverWindowSeconds sets the StartoverWindowSeconds field's value. -func (s *CreateOriginEndpointOutput) SetStartoverWindowSeconds(v int64) *CreateOriginEndpointOutput { - s.StartoverWindowSeconds = &v - return s -} - -// SetTimeDelaySeconds sets the TimeDelaySeconds field's value. -func (s *CreateOriginEndpointOutput) SetTimeDelaySeconds(v int64) *CreateOriginEndpointOutput { - s.TimeDelaySeconds = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *CreateOriginEndpointOutput) SetUrl(v string) *CreateOriginEndpointOutput { - s.Url = &v - return s -} - -// SetWhitelist sets the Whitelist field's value. -func (s *CreateOriginEndpointOutput) SetWhitelist(v []*string) *CreateOriginEndpointOutput { - s.Whitelist = v - return s -} - -// A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration. -type DashEncryption struct { - _ struct{} `type:"structure"` - - // Time (in seconds) between each encryption key rotation. - KeyRotationIntervalSeconds *int64 `locationName:"keyRotationIntervalSeconds" type:"integer"` - - // A configuration for accessing an external Secure Packager and Encoder Key - // Exchange (SPEKE) service that will provide encryption keys. - // - // SpekeKeyProvider is a required field - SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure" required:"true"` -} - -// String returns the string representation -func (s DashEncryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DashEncryption) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DashEncryption) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DashEncryption"} - if s.SpekeKeyProvider == nil { - invalidParams.Add(request.NewErrParamRequired("SpekeKeyProvider")) - } - if s.SpekeKeyProvider != nil { - if err := s.SpekeKeyProvider.Validate(); err != nil { - invalidParams.AddNested("SpekeKeyProvider", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyRotationIntervalSeconds sets the KeyRotationIntervalSeconds field's value. -func (s *DashEncryption) SetKeyRotationIntervalSeconds(v int64) *DashEncryption { - s.KeyRotationIntervalSeconds = &v - return s -} - -// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. -func (s *DashEncryption) SetSpekeKeyProvider(v *SpekeKeyProvider) *DashEncryption { - s.SpekeKeyProvider = v - return s -} - -// A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. -type DashPackage struct { - _ struct{} `type:"structure"` - - // A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration. - Encryption *DashEncryption `locationName:"encryption" type:"structure"` - - // Time window (in seconds) contained in each manifest. - ManifestWindowSeconds *int64 `locationName:"manifestWindowSeconds" type:"integer"` - - // Minimum duration (in seconds) that a player will buffer media before starting - // the presentation. - MinBufferTimeSeconds *int64 `locationName:"minBufferTimeSeconds" type:"integer"` - - // Minimum duration (in seconds) between potential changes to the Dynamic Adaptive - // Streaming over HTTP (DASH) Media Presentation Description (MPD). - MinUpdatePeriodSeconds *int64 `locationName:"minUpdatePeriodSeconds" type:"integer"` - - // A list of triggers that controls when the outgoing Dynamic Adaptive Streaming - // over HTTP (DASH)Media Presentation Description (MPD) will be partitioned - // into multiple periods. If empty, the content will notbe partitioned into - // more than one period. If the list contains "ADS", new periods will be created - // wherethe Channel source contains SCTE-35 ad markers. - PeriodTriggers []*string `locationName:"periodTriggers" type:"list"` - - // The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to - // "HBBTV_1_5", HbbTV 1.5 compliant output is enabled. - Profile *string `locationName:"profile" type:"string" enum:"Profile"` - - // Duration (in seconds) of each segment. Actual segments will berounded to - // the nearest multiple of the source segment duration. - SegmentDurationSeconds *int64 `locationName:"segmentDurationSeconds" type:"integer"` - - // A StreamSelection configuration. - StreamSelection *StreamSelection `locationName:"streamSelection" type:"structure"` - - // Duration (in seconds) to delay live content before presentation. - SuggestedPresentationDelaySeconds *int64 `locationName:"suggestedPresentationDelaySeconds" type:"integer"` -} - -// String returns the string representation -func (s DashPackage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DashPackage) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DashPackage) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DashPackage"} - if s.Encryption != nil { - if err := s.Encryption.Validate(); err != nil { - invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryption sets the Encryption field's value. -func (s *DashPackage) SetEncryption(v *DashEncryption) *DashPackage { - s.Encryption = v - return s -} - -// SetManifestWindowSeconds sets the ManifestWindowSeconds field's value. -func (s *DashPackage) SetManifestWindowSeconds(v int64) *DashPackage { - s.ManifestWindowSeconds = &v - return s -} - -// SetMinBufferTimeSeconds sets the MinBufferTimeSeconds field's value. -func (s *DashPackage) SetMinBufferTimeSeconds(v int64) *DashPackage { - s.MinBufferTimeSeconds = &v - return s -} - -// SetMinUpdatePeriodSeconds sets the MinUpdatePeriodSeconds field's value. -func (s *DashPackage) SetMinUpdatePeriodSeconds(v int64) *DashPackage { - s.MinUpdatePeriodSeconds = &v - return s -} - -// SetPeriodTriggers sets the PeriodTriggers field's value. -func (s *DashPackage) SetPeriodTriggers(v []*string) *DashPackage { - s.PeriodTriggers = v - return s -} - -// SetProfile sets the Profile field's value. -func (s *DashPackage) SetProfile(v string) *DashPackage { - s.Profile = &v - return s -} - -// SetSegmentDurationSeconds sets the SegmentDurationSeconds field's value. -func (s *DashPackage) SetSegmentDurationSeconds(v int64) *DashPackage { - s.SegmentDurationSeconds = &v - return s -} - -// SetStreamSelection sets the StreamSelection field's value. -func (s *DashPackage) SetStreamSelection(v *StreamSelection) *DashPackage { - s.StreamSelection = v - return s -} - -// SetSuggestedPresentationDelaySeconds sets the SuggestedPresentationDelaySeconds field's value. -func (s *DashPackage) SetSuggestedPresentationDelaySeconds(v int64) *DashPackage { - s.SuggestedPresentationDelaySeconds = &v - return s -} - -type DeleteChannelInput struct { - _ struct{} `type:"structure"` - - // Id is a required field - Id *string `location:"uri" locationName:"id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteChannelInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteChannelInput) SetId(v string) *DeleteChannelInput { - s.Id = &v - return s -} - -type DeleteChannelOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteChannelOutput) GoString() string { - return s.String() -} - -type DeleteOriginEndpointInput struct { - _ struct{} `type:"structure"` - - // Id is a required field - Id *string `location:"uri" locationName:"id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteOriginEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteOriginEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteOriginEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteOriginEndpointInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteOriginEndpointInput) SetId(v string) *DeleteOriginEndpointInput { - s.Id = &v - return s -} - -type DeleteOriginEndpointOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteOriginEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteOriginEndpointOutput) GoString() string { - return s.String() -} - -type DescribeChannelInput struct { - _ struct{} `type:"structure"` - - // Id is a required field - Id *string `location:"uri" locationName:"id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeChannelInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DescribeChannelInput) SetId(v string) *DescribeChannelInput { - s.Id = &v - return s -} - -type DescribeChannelOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Description *string `locationName:"description" type:"string"` - - // An HTTP Live Streaming (HLS) ingest resource configuration. - HlsIngest *HlsIngest `locationName:"hlsIngest" type:"structure"` - - Id *string `locationName:"id" type:"string"` -} - -// String returns the string representation -func (s DescribeChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeChannelOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DescribeChannelOutput) SetArn(v string) *DescribeChannelOutput { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DescribeChannelOutput) SetDescription(v string) *DescribeChannelOutput { - s.Description = &v - return s -} - -// SetHlsIngest sets the HlsIngest field's value. -func (s *DescribeChannelOutput) SetHlsIngest(v *HlsIngest) *DescribeChannelOutput { - s.HlsIngest = v - return s -} - -// SetId sets the Id field's value. -func (s *DescribeChannelOutput) SetId(v string) *DescribeChannelOutput { - s.Id = &v - return s -} - -type DescribeOriginEndpointInput struct { - _ struct{} `type:"structure"` - - // Id is a required field - Id *string `location:"uri" locationName:"id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeOriginEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOriginEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeOriginEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeOriginEndpointInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DescribeOriginEndpointInput) SetId(v string) *DescribeOriginEndpointInput { - s.Id = &v - return s -} - -type DescribeOriginEndpointOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - ChannelId *string `locationName:"channelId" type:"string"` - - // A Common Media Application Format (CMAF) packaging configuration. - CmafPackage *CmafPackage `locationName:"cmafPackage" type:"structure"` - - // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. - DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` - - Description *string `locationName:"description" type:"string"` - - // An HTTP Live Streaming (HLS) packaging configuration. - HlsPackage *HlsPackage `locationName:"hlsPackage" type:"structure"` - - Id *string `locationName:"id" type:"string"` - - ManifestName *string `locationName:"manifestName" type:"string"` - - // A Microsoft Smooth Streaming (MSS) packaging configuration. - MssPackage *MssPackage `locationName:"mssPackage" type:"structure"` - - StartoverWindowSeconds *int64 `locationName:"startoverWindowSeconds" type:"integer"` - - TimeDelaySeconds *int64 `locationName:"timeDelaySeconds" type:"integer"` - - Url *string `locationName:"url" type:"string"` - - Whitelist []*string `locationName:"whitelist" type:"list"` -} - -// String returns the string representation -func (s DescribeOriginEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOriginEndpointOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DescribeOriginEndpointOutput) SetArn(v string) *DescribeOriginEndpointOutput { - s.Arn = &v - return s -} - -// SetChannelId sets the ChannelId field's value. -func (s *DescribeOriginEndpointOutput) SetChannelId(v string) *DescribeOriginEndpointOutput { - s.ChannelId = &v - return s -} - -// SetCmafPackage sets the CmafPackage field's value. -func (s *DescribeOriginEndpointOutput) SetCmafPackage(v *CmafPackage) *DescribeOriginEndpointOutput { - s.CmafPackage = v - return s -} - -// SetDashPackage sets the DashPackage field's value. -func (s *DescribeOriginEndpointOutput) SetDashPackage(v *DashPackage) *DescribeOriginEndpointOutput { - s.DashPackage = v - return s -} - -// SetDescription sets the Description field's value. -func (s *DescribeOriginEndpointOutput) SetDescription(v string) *DescribeOriginEndpointOutput { - s.Description = &v - return s -} - -// SetHlsPackage sets the HlsPackage field's value. -func (s *DescribeOriginEndpointOutput) SetHlsPackage(v *HlsPackage) *DescribeOriginEndpointOutput { - s.HlsPackage = v - return s -} - -// SetId sets the Id field's value. -func (s *DescribeOriginEndpointOutput) SetId(v string) *DescribeOriginEndpointOutput { - s.Id = &v - return s -} - -// SetManifestName sets the ManifestName field's value. -func (s *DescribeOriginEndpointOutput) SetManifestName(v string) *DescribeOriginEndpointOutput { - s.ManifestName = &v - return s -} - -// SetMssPackage sets the MssPackage field's value. -func (s *DescribeOriginEndpointOutput) SetMssPackage(v *MssPackage) *DescribeOriginEndpointOutput { - s.MssPackage = v - return s -} - -// SetStartoverWindowSeconds sets the StartoverWindowSeconds field's value. -func (s *DescribeOriginEndpointOutput) SetStartoverWindowSeconds(v int64) *DescribeOriginEndpointOutput { - s.StartoverWindowSeconds = &v - return s -} - -// SetTimeDelaySeconds sets the TimeDelaySeconds field's value. -func (s *DescribeOriginEndpointOutput) SetTimeDelaySeconds(v int64) *DescribeOriginEndpointOutput { - s.TimeDelaySeconds = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *DescribeOriginEndpointOutput) SetUrl(v string) *DescribeOriginEndpointOutput { - s.Url = &v - return s -} - -// SetWhitelist sets the Whitelist field's value. -func (s *DescribeOriginEndpointOutput) SetWhitelist(v []*string) *DescribeOriginEndpointOutput { - s.Whitelist = v - return s -} - -// An HTTP Live Streaming (HLS) encryption configuration. -type HlsEncryption struct { - _ struct{} `type:"structure"` - - // A constant initialization vector for encryption (optional).When not specified - // the initialization vector will be periodically rotated. - ConstantInitializationVector *string `locationName:"constantInitializationVector" type:"string"` - - // The encryption method to use. - EncryptionMethod *string `locationName:"encryptionMethod" type:"string" enum:"EncryptionMethod"` - - // Interval (in seconds) between each encryption key rotation. - KeyRotationIntervalSeconds *int64 `locationName:"keyRotationIntervalSeconds" type:"integer"` - - // When enabled, the EXT-X-KEY tag will be repeated in output manifests. - RepeatExtXKey *bool `locationName:"repeatExtXKey" type:"boolean"` - - // A configuration for accessing an external Secure Packager and Encoder Key - // Exchange (SPEKE) service that will provide encryption keys. - // - // SpekeKeyProvider is a required field - SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure" required:"true"` -} - -// String returns the string representation -func (s HlsEncryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsEncryption) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HlsEncryption) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HlsEncryption"} - if s.SpekeKeyProvider == nil { - invalidParams.Add(request.NewErrParamRequired("SpekeKeyProvider")) - } - if s.SpekeKeyProvider != nil { - if err := s.SpekeKeyProvider.Validate(); err != nil { - invalidParams.AddNested("SpekeKeyProvider", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConstantInitializationVector sets the ConstantInitializationVector field's value. -func (s *HlsEncryption) SetConstantInitializationVector(v string) *HlsEncryption { - s.ConstantInitializationVector = &v - return s -} - -// SetEncryptionMethod sets the EncryptionMethod field's value. -func (s *HlsEncryption) SetEncryptionMethod(v string) *HlsEncryption { - s.EncryptionMethod = &v - return s -} - -// SetKeyRotationIntervalSeconds sets the KeyRotationIntervalSeconds field's value. -func (s *HlsEncryption) SetKeyRotationIntervalSeconds(v int64) *HlsEncryption { - s.KeyRotationIntervalSeconds = &v - return s -} - -// SetRepeatExtXKey sets the RepeatExtXKey field's value. -func (s *HlsEncryption) SetRepeatExtXKey(v bool) *HlsEncryption { - s.RepeatExtXKey = &v - return s -} - -// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. -func (s *HlsEncryption) SetSpekeKeyProvider(v *SpekeKeyProvider) *HlsEncryption { - s.SpekeKeyProvider = v - return s -} - -// An HTTP Live Streaming (HLS) ingest resource configuration. -type HlsIngest struct { - _ struct{} `type:"structure"` - - // A list of endpoints to which the source stream should be sent. - IngestEndpoints []*IngestEndpoint `locationName:"ingestEndpoints" type:"list"` -} - -// String returns the string representation -func (s HlsIngest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsIngest) GoString() string { - return s.String() -} - -// SetIngestEndpoints sets the IngestEndpoints field's value. -func (s *HlsIngest) SetIngestEndpoints(v []*IngestEndpoint) *HlsIngest { - s.IngestEndpoints = v - return s -} - -// A HTTP Live Streaming (HLS) manifest configuration. -type HlsManifest struct { - _ struct{} `type:"structure"` - - // This setting controls how ad markers are included in the packaged OriginEndpoint."NONE" - // will omit all SCTE-35 ad markers from the output."PASSTHROUGH" causes the - // manifest to contain a copy of the SCTE-35 admarkers (comments) taken directly - // from the input HTTP Live Streaming (HLS) manifest."SCTE35_ENHANCED" generates - // ad markers and blackout tags based on SCTE-35messages in the input source. - AdMarkers *string `locationName:"adMarkers" type:"string" enum:"AdMarkers"` - - // The ID of the manifest. The ID must be unique within the OriginEndpoint and - // it cannot be changed after it is created. - // - // Id is a required field - Id *string `locationName:"id" type:"string" required:"true"` - - // When enabled, an I-Frame only stream will be included in the output. - IncludeIframeOnlyStream *bool `locationName:"includeIframeOnlyStream" type:"boolean"` - - // An optional short string appended to the end of the OriginEndpoint URL. If - // not specified, defaults to the manifestName for the OriginEndpoint. - ManifestName *string `locationName:"manifestName" type:"string"` - - // The HTTP Live Streaming (HLS) playlist type.When either "EVENT" or "VOD" - // is specified, a corresponding EXT-X-PLAYLIST-TYPEentry will be included in - // the media playlist. - PlaylistType *string `locationName:"playlistType" type:"string" enum:"PlaylistType"` - - // Time window (in seconds) contained in each parent manifest. - PlaylistWindowSeconds *int64 `locationName:"playlistWindowSeconds" type:"integer"` - - // The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME taginserted - // into manifests. Additionally, when an interval is specifiedID3Timed Metadata - // messages will be generated every 5 seconds using theingest time of the content.If - // the interval is not specified, or set to 0, thenno EXT-X-PROGRAM-DATE-TIME - // tags will be inserted into manifests and noID3Timed Metadata messages will - // be generated. Note that irrespectiveof this parameter, if any ID3 Timed Metadata - // is found in HTTP Live Streaming (HLS) input,it will be passed through to - // HLS output. - ProgramDateTimeIntervalSeconds *int64 `locationName:"programDateTimeIntervalSeconds" type:"integer"` - - // The URL of the packaged OriginEndpoint for consumption. - Url *string `locationName:"url" type:"string"` -} - -// String returns the string representation -func (s HlsManifest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsManifest) GoString() string { - return s.String() -} - -// SetAdMarkers sets the AdMarkers field's value. -func (s *HlsManifest) SetAdMarkers(v string) *HlsManifest { - s.AdMarkers = &v - return s -} - -// SetId sets the Id field's value. -func (s *HlsManifest) SetId(v string) *HlsManifest { - s.Id = &v - return s -} - -// SetIncludeIframeOnlyStream sets the IncludeIframeOnlyStream field's value. -func (s *HlsManifest) SetIncludeIframeOnlyStream(v bool) *HlsManifest { - s.IncludeIframeOnlyStream = &v - return s -} - -// SetManifestName sets the ManifestName field's value. -func (s *HlsManifest) SetManifestName(v string) *HlsManifest { - s.ManifestName = &v - return s -} - -// SetPlaylistType sets the PlaylistType field's value. -func (s *HlsManifest) SetPlaylistType(v string) *HlsManifest { - s.PlaylistType = &v - return s -} - -// SetPlaylistWindowSeconds sets the PlaylistWindowSeconds field's value. -func (s *HlsManifest) SetPlaylistWindowSeconds(v int64) *HlsManifest { - s.PlaylistWindowSeconds = &v - return s -} - -// SetProgramDateTimeIntervalSeconds sets the ProgramDateTimeIntervalSeconds field's value. -func (s *HlsManifest) SetProgramDateTimeIntervalSeconds(v int64) *HlsManifest { - s.ProgramDateTimeIntervalSeconds = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *HlsManifest) SetUrl(v string) *HlsManifest { - s.Url = &v - return s -} - -// A HTTP Live Streaming (HLS) manifest configuration. -type HlsManifestCreateOrUpdateParameters struct { - _ struct{} `type:"structure"` - - // This setting controls how ad markers are included in the packaged OriginEndpoint."NONE" - // will omit all SCTE-35 ad markers from the output."PASSTHROUGH" causes the - // manifest to contain a copy of the SCTE-35 admarkers (comments) taken directly - // from the input HTTP Live Streaming (HLS) manifest."SCTE35_ENHANCED" generates - // ad markers and blackout tags based on SCTE-35messages in the input source. - AdMarkers *string `locationName:"adMarkers" type:"string" enum:"AdMarkers"` - - // The ID of the manifest. The ID must be unique within the OriginEndpoint and - // it cannot be changed after it is created. - // - // Id is a required field - Id *string `locationName:"id" type:"string" required:"true"` - - // When enabled, an I-Frame only stream will be included in the output. - IncludeIframeOnlyStream *bool `locationName:"includeIframeOnlyStream" type:"boolean"` - - // An optional short string appended to the end of the OriginEndpoint URL. If - // not specified, defaults to the manifestName for the OriginEndpoint. - ManifestName *string `locationName:"manifestName" type:"string"` - - // The HTTP Live Streaming (HLS) playlist type.When either "EVENT" or "VOD" - // is specified, a corresponding EXT-X-PLAYLIST-TYPEentry will be included in - // the media playlist. - PlaylistType *string `locationName:"playlistType" type:"string" enum:"PlaylistType"` - - // Time window (in seconds) contained in each parent manifest. - PlaylistWindowSeconds *int64 `locationName:"playlistWindowSeconds" type:"integer"` - - // The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME taginserted - // into manifests. Additionally, when an interval is specifiedID3Timed Metadata - // messages will be generated every 5 seconds using theingest time of the content.If - // the interval is not specified, or set to 0, thenno EXT-X-PROGRAM-DATE-TIME - // tags will be inserted into manifests and noID3Timed Metadata messages will - // be generated. Note that irrespectiveof this parameter, if any ID3 Timed Metadata - // is found in HTTP Live Streaming (HLS) input,it will be passed through to - // HLS output. - ProgramDateTimeIntervalSeconds *int64 `locationName:"programDateTimeIntervalSeconds" type:"integer"` -} - -// String returns the string representation -func (s HlsManifestCreateOrUpdateParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsManifestCreateOrUpdateParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HlsManifestCreateOrUpdateParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HlsManifestCreateOrUpdateParameters"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdMarkers sets the AdMarkers field's value. -func (s *HlsManifestCreateOrUpdateParameters) SetAdMarkers(v string) *HlsManifestCreateOrUpdateParameters { - s.AdMarkers = &v - return s -} - -// SetId sets the Id field's value. -func (s *HlsManifestCreateOrUpdateParameters) SetId(v string) *HlsManifestCreateOrUpdateParameters { - s.Id = &v - return s -} - -// SetIncludeIframeOnlyStream sets the IncludeIframeOnlyStream field's value. -func (s *HlsManifestCreateOrUpdateParameters) SetIncludeIframeOnlyStream(v bool) *HlsManifestCreateOrUpdateParameters { - s.IncludeIframeOnlyStream = &v - return s -} - -// SetManifestName sets the ManifestName field's value. -func (s *HlsManifestCreateOrUpdateParameters) SetManifestName(v string) *HlsManifestCreateOrUpdateParameters { - s.ManifestName = &v - return s -} - -// SetPlaylistType sets the PlaylistType field's value. -func (s *HlsManifestCreateOrUpdateParameters) SetPlaylistType(v string) *HlsManifestCreateOrUpdateParameters { - s.PlaylistType = &v - return s -} - -// SetPlaylistWindowSeconds sets the PlaylistWindowSeconds field's value. -func (s *HlsManifestCreateOrUpdateParameters) SetPlaylistWindowSeconds(v int64) *HlsManifestCreateOrUpdateParameters { - s.PlaylistWindowSeconds = &v - return s -} - -// SetProgramDateTimeIntervalSeconds sets the ProgramDateTimeIntervalSeconds field's value. -func (s *HlsManifestCreateOrUpdateParameters) SetProgramDateTimeIntervalSeconds(v int64) *HlsManifestCreateOrUpdateParameters { - s.ProgramDateTimeIntervalSeconds = &v - return s -} - -// An HTTP Live Streaming (HLS) packaging configuration. -type HlsPackage struct { - _ struct{} `type:"structure"` - - // This setting controls how ad markers are included in the packaged OriginEndpoint."NONE" - // will omit all SCTE-35 ad markers from the output."PASSTHROUGH" causes the - // manifest to contain a copy of the SCTE-35 admarkers (comments) taken directly - // from the input HTTP Live Streaming (HLS) manifest."SCTE35_ENHANCED" generates - // ad markers and blackout tags based on SCTE-35messages in the input source. - AdMarkers *string `locationName:"adMarkers" type:"string" enum:"AdMarkers"` - - // An HTTP Live Streaming (HLS) encryption configuration. - Encryption *HlsEncryption `locationName:"encryption" type:"structure"` - - // When enabled, an I-Frame only stream will be included in the output. - IncludeIframeOnlyStream *bool `locationName:"includeIframeOnlyStream" type:"boolean"` - - // The HTTP Live Streaming (HLS) playlist type.When either "EVENT" or "VOD" - // is specified, a corresponding EXT-X-PLAYLIST-TYPEentry will be included in - // the media playlist. - PlaylistType *string `locationName:"playlistType" type:"string" enum:"PlaylistType"` - - // Time window (in seconds) contained in each parent manifest. - PlaylistWindowSeconds *int64 `locationName:"playlistWindowSeconds" type:"integer"` - - // The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME taginserted - // into manifests. Additionally, when an interval is specifiedID3Timed Metadata - // messages will be generated every 5 seconds using theingest time of the content.If - // the interval is not specified, or set to 0, thenno EXT-X-PROGRAM-DATE-TIME - // tags will be inserted into manifests and noID3Timed Metadata messages will - // be generated. Note that irrespectiveof this parameter, if any ID3 Timed Metadata - // is found in HTTP Live Streaming (HLS) input,it will be passed through to - // HLS output. - ProgramDateTimeIntervalSeconds *int64 `locationName:"programDateTimeIntervalSeconds" type:"integer"` - - // Duration (in seconds) of each fragment. Actual fragments will berounded to - // the nearest multiple of the source fragment duration. - SegmentDurationSeconds *int64 `locationName:"segmentDurationSeconds" type:"integer"` - - // A StreamSelection configuration. - StreamSelection *StreamSelection `locationName:"streamSelection" type:"structure"` - - // When enabled, audio streams will be placed in rendition groups in the output. - UseAudioRenditionGroup *bool `locationName:"useAudioRenditionGroup" type:"boolean"` -} - -// String returns the string representation -func (s HlsPackage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HlsPackage) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HlsPackage) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HlsPackage"} - if s.Encryption != nil { - if err := s.Encryption.Validate(); err != nil { - invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdMarkers sets the AdMarkers field's value. -func (s *HlsPackage) SetAdMarkers(v string) *HlsPackage { - s.AdMarkers = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *HlsPackage) SetEncryption(v *HlsEncryption) *HlsPackage { - s.Encryption = v - return s -} - -// SetIncludeIframeOnlyStream sets the IncludeIframeOnlyStream field's value. -func (s *HlsPackage) SetIncludeIframeOnlyStream(v bool) *HlsPackage { - s.IncludeIframeOnlyStream = &v - return s -} - -// SetPlaylistType sets the PlaylistType field's value. -func (s *HlsPackage) SetPlaylistType(v string) *HlsPackage { - s.PlaylistType = &v - return s -} - -// SetPlaylistWindowSeconds sets the PlaylistWindowSeconds field's value. -func (s *HlsPackage) SetPlaylistWindowSeconds(v int64) *HlsPackage { - s.PlaylistWindowSeconds = &v - return s -} - -// SetProgramDateTimeIntervalSeconds sets the ProgramDateTimeIntervalSeconds field's value. -func (s *HlsPackage) SetProgramDateTimeIntervalSeconds(v int64) *HlsPackage { - s.ProgramDateTimeIntervalSeconds = &v - return s -} - -// SetSegmentDurationSeconds sets the SegmentDurationSeconds field's value. -func (s *HlsPackage) SetSegmentDurationSeconds(v int64) *HlsPackage { - s.SegmentDurationSeconds = &v - return s -} - -// SetStreamSelection sets the StreamSelection field's value. -func (s *HlsPackage) SetStreamSelection(v *StreamSelection) *HlsPackage { - s.StreamSelection = v - return s -} - -// SetUseAudioRenditionGroup sets the UseAudioRenditionGroup field's value. -func (s *HlsPackage) SetUseAudioRenditionGroup(v bool) *HlsPackage { - s.UseAudioRenditionGroup = &v - return s -} - -// An endpoint for ingesting source content for a Channel. -type IngestEndpoint struct { - _ struct{} `type:"structure"` - - // The system generated unique identifier for the IngestEndpoint - Id *string `locationName:"id" type:"string"` - - // The system generated password for ingest authentication. - Password *string `locationName:"password" type:"string"` - - // The ingest URL to which the source stream should be sent. - Url *string `locationName:"url" type:"string"` - - // The system generated username for ingest authentication. - Username *string `locationName:"username" type:"string"` -} - -// String returns the string representation -func (s IngestEndpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IngestEndpoint) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *IngestEndpoint) SetId(v string) *IngestEndpoint { - s.Id = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *IngestEndpoint) SetPassword(v string) *IngestEndpoint { - s.Password = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *IngestEndpoint) SetUrl(v string) *IngestEndpoint { - s.Url = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *IngestEndpoint) SetUsername(v string) *IngestEndpoint { - s.Username = &v - return s -} - -type ListChannelsInput struct { - _ struct{} `type:"structure"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListChannelsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListChannelsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListChannelsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListChannelsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListChannelsInput) SetMaxResults(v int64) *ListChannelsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListChannelsInput) SetNextToken(v string) *ListChannelsInput { - s.NextToken = &v - return s -} - -type ListChannelsOutput struct { - _ struct{} `type:"structure"` - - Channels []*Channel `locationName:"channels" type:"list"` - - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListChannelsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListChannelsOutput) GoString() string { - return s.String() -} - -// SetChannels sets the Channels field's value. -func (s *ListChannelsOutput) SetChannels(v []*Channel) *ListChannelsOutput { - s.Channels = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListChannelsOutput) SetNextToken(v string) *ListChannelsOutput { - s.NextToken = &v - return s -} - -type ListOriginEndpointsInput struct { - _ struct{} `type:"structure"` - - ChannelId *string `location:"querystring" locationName:"channelId" type:"string"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListOriginEndpointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOriginEndpointsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListOriginEndpointsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOriginEndpointsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChannelId sets the ChannelId field's value. -func (s *ListOriginEndpointsInput) SetChannelId(v string) *ListOriginEndpointsInput { - s.ChannelId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListOriginEndpointsInput) SetMaxResults(v int64) *ListOriginEndpointsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOriginEndpointsInput) SetNextToken(v string) *ListOriginEndpointsInput { - s.NextToken = &v - return s -} - -type ListOriginEndpointsOutput struct { - _ struct{} `type:"structure"` - - NextToken *string `locationName:"nextToken" type:"string"` - - OriginEndpoints []*OriginEndpoint `locationName:"originEndpoints" type:"list"` -} - -// String returns the string representation -func (s ListOriginEndpointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOriginEndpointsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOriginEndpointsOutput) SetNextToken(v string) *ListOriginEndpointsOutput { - s.NextToken = &v - return s -} - -// SetOriginEndpoints sets the OriginEndpoints field's value. -func (s *ListOriginEndpointsOutput) SetOriginEndpoints(v []*OriginEndpoint) *ListOriginEndpointsOutput { - s.OriginEndpoints = v - return s -} - -// A Microsoft Smooth Streaming (MSS) encryption configuration. -type MssEncryption struct { - _ struct{} `type:"structure"` - - // A configuration for accessing an external Secure Packager and Encoder Key - // Exchange (SPEKE) service that will provide encryption keys. - // - // SpekeKeyProvider is a required field - SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure" required:"true"` -} - -// String returns the string representation -func (s MssEncryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MssEncryption) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MssEncryption) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MssEncryption"} - if s.SpekeKeyProvider == nil { - invalidParams.Add(request.NewErrParamRequired("SpekeKeyProvider")) - } - if s.SpekeKeyProvider != nil { - if err := s.SpekeKeyProvider.Validate(); err != nil { - invalidParams.AddNested("SpekeKeyProvider", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. -func (s *MssEncryption) SetSpekeKeyProvider(v *SpekeKeyProvider) *MssEncryption { - s.SpekeKeyProvider = v - return s -} - -// A Microsoft Smooth Streaming (MSS) packaging configuration. -type MssPackage struct { - _ struct{} `type:"structure"` - - // A Microsoft Smooth Streaming (MSS) encryption configuration. - Encryption *MssEncryption `locationName:"encryption" type:"structure"` - - // The time window (in seconds) contained in each manifest. - ManifestWindowSeconds *int64 `locationName:"manifestWindowSeconds" type:"integer"` - - // The duration (in seconds) of each segment. - SegmentDurationSeconds *int64 `locationName:"segmentDurationSeconds" type:"integer"` - - // A StreamSelection configuration. - StreamSelection *StreamSelection `locationName:"streamSelection" type:"structure"` -} - -// String returns the string representation -func (s MssPackage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MssPackage) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MssPackage) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MssPackage"} - if s.Encryption != nil { - if err := s.Encryption.Validate(); err != nil { - invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryption sets the Encryption field's value. -func (s *MssPackage) SetEncryption(v *MssEncryption) *MssPackage { - s.Encryption = v - return s -} - -// SetManifestWindowSeconds sets the ManifestWindowSeconds field's value. -func (s *MssPackage) SetManifestWindowSeconds(v int64) *MssPackage { - s.ManifestWindowSeconds = &v - return s -} - -// SetSegmentDurationSeconds sets the SegmentDurationSeconds field's value. -func (s *MssPackage) SetSegmentDurationSeconds(v int64) *MssPackage { - s.SegmentDurationSeconds = &v - return s -} - -// SetStreamSelection sets the StreamSelection field's value. -func (s *MssPackage) SetStreamSelection(v *StreamSelection) *MssPackage { - s.StreamSelection = v - return s -} - -// An OriginEndpoint resource configuration. -type OriginEndpoint struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) assigned to the OriginEndpoint. - Arn *string `locationName:"arn" type:"string"` - - // The ID of the Channel the OriginEndpoint is associated with. - ChannelId *string `locationName:"channelId" type:"string"` - - // A Common Media Application Format (CMAF) packaging configuration. - CmafPackage *CmafPackage `locationName:"cmafPackage" type:"structure"` - - // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. - DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` - - // A short text description of the OriginEndpoint. - Description *string `locationName:"description" type:"string"` - - // An HTTP Live Streaming (HLS) packaging configuration. - HlsPackage *HlsPackage `locationName:"hlsPackage" type:"structure"` - - // The ID of the OriginEndpoint. - Id *string `locationName:"id" type:"string"` - - // A short string appended to the end of the OriginEndpoint URL. - ManifestName *string `locationName:"manifestName" type:"string"` - - // A Microsoft Smooth Streaming (MSS) packaging configuration. - MssPackage *MssPackage `locationName:"mssPackage" type:"structure"` - - // Maximum duration (seconds) of content to retain for startover playback.If - // not specified, startover playback will be disabled for the OriginEndpoint. - StartoverWindowSeconds *int64 `locationName:"startoverWindowSeconds" type:"integer"` - - // Amount of delay (seconds) to enforce on the playback of live content.If not - // specified, there will be no time delay in effect for the OriginEndpoint. - TimeDelaySeconds *int64 `locationName:"timeDelaySeconds" type:"integer"` - - // The URL of the packaged OriginEndpoint for consumption. - Url *string `locationName:"url" type:"string"` - - // A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint. - Whitelist []*string `locationName:"whitelist" type:"list"` -} - -// String returns the string representation -func (s OriginEndpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OriginEndpoint) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *OriginEndpoint) SetArn(v string) *OriginEndpoint { - s.Arn = &v - return s -} - -// SetChannelId sets the ChannelId field's value. -func (s *OriginEndpoint) SetChannelId(v string) *OriginEndpoint { - s.ChannelId = &v - return s -} - -// SetCmafPackage sets the CmafPackage field's value. -func (s *OriginEndpoint) SetCmafPackage(v *CmafPackage) *OriginEndpoint { - s.CmafPackage = v - return s -} - -// SetDashPackage sets the DashPackage field's value. -func (s *OriginEndpoint) SetDashPackage(v *DashPackage) *OriginEndpoint { - s.DashPackage = v - return s -} - -// SetDescription sets the Description field's value. -func (s *OriginEndpoint) SetDescription(v string) *OriginEndpoint { - s.Description = &v - return s -} - -// SetHlsPackage sets the HlsPackage field's value. -func (s *OriginEndpoint) SetHlsPackage(v *HlsPackage) *OriginEndpoint { - s.HlsPackage = v - return s -} - -// SetId sets the Id field's value. -func (s *OriginEndpoint) SetId(v string) *OriginEndpoint { - s.Id = &v - return s -} - -// SetManifestName sets the ManifestName field's value. -func (s *OriginEndpoint) SetManifestName(v string) *OriginEndpoint { - s.ManifestName = &v - return s -} - -// SetMssPackage sets the MssPackage field's value. -func (s *OriginEndpoint) SetMssPackage(v *MssPackage) *OriginEndpoint { - s.MssPackage = v - return s -} - -// SetStartoverWindowSeconds sets the StartoverWindowSeconds field's value. -func (s *OriginEndpoint) SetStartoverWindowSeconds(v int64) *OriginEndpoint { - s.StartoverWindowSeconds = &v - return s -} - -// SetTimeDelaySeconds sets the TimeDelaySeconds field's value. -func (s *OriginEndpoint) SetTimeDelaySeconds(v int64) *OriginEndpoint { - s.TimeDelaySeconds = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *OriginEndpoint) SetUrl(v string) *OriginEndpoint { - s.Url = &v - return s -} - -// SetWhitelist sets the Whitelist field's value. -func (s *OriginEndpoint) SetWhitelist(v []*string) *OriginEndpoint { - s.Whitelist = v - return s -} - -// Deprecated: RotateChannelCredentialsInput has been deprecated -type RotateChannelCredentialsInput struct { - _ struct{} `deprecated:"true" type:"structure"` - - // Id is a required field - Id *string `location:"uri" locationName:"id" type:"string" required:"true"` -} - -// String returns the string representation -func (s RotateChannelCredentialsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RotateChannelCredentialsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RotateChannelCredentialsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RotateChannelCredentialsInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *RotateChannelCredentialsInput) SetId(v string) *RotateChannelCredentialsInput { - s.Id = &v - return s -} - -// Deprecated: RotateChannelCredentialsOutput has been deprecated -type RotateChannelCredentialsOutput struct { - _ struct{} `deprecated:"true" type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Description *string `locationName:"description" type:"string"` - - // An HTTP Live Streaming (HLS) ingest resource configuration. - HlsIngest *HlsIngest `locationName:"hlsIngest" type:"structure"` - - Id *string `locationName:"id" type:"string"` -} - -// String returns the string representation -func (s RotateChannelCredentialsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RotateChannelCredentialsOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *RotateChannelCredentialsOutput) SetArn(v string) *RotateChannelCredentialsOutput { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *RotateChannelCredentialsOutput) SetDescription(v string) *RotateChannelCredentialsOutput { - s.Description = &v - return s -} - -// SetHlsIngest sets the HlsIngest field's value. -func (s *RotateChannelCredentialsOutput) SetHlsIngest(v *HlsIngest) *RotateChannelCredentialsOutput { - s.HlsIngest = v - return s -} - -// SetId sets the Id field's value. -func (s *RotateChannelCredentialsOutput) SetId(v string) *RotateChannelCredentialsOutput { - s.Id = &v - return s -} - -type RotateIngestEndpointCredentialsInput struct { - _ struct{} `type:"structure"` - - // Id is a required field - Id *string `location:"uri" locationName:"id" type:"string" required:"true"` - - // IngestEndpointId is a required field - IngestEndpointId *string `location:"uri" locationName:"ingest_endpoint_id" type:"string" required:"true"` -} - -// String returns the string representation -func (s RotateIngestEndpointCredentialsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RotateIngestEndpointCredentialsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RotateIngestEndpointCredentialsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RotateIngestEndpointCredentialsInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.IngestEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("IngestEndpointId")) - } - if s.IngestEndpointId != nil && len(*s.IngestEndpointId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IngestEndpointId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *RotateIngestEndpointCredentialsInput) SetId(v string) *RotateIngestEndpointCredentialsInput { - s.Id = &v - return s -} - -// SetIngestEndpointId sets the IngestEndpointId field's value. -func (s *RotateIngestEndpointCredentialsInput) SetIngestEndpointId(v string) *RotateIngestEndpointCredentialsInput { - s.IngestEndpointId = &v - return s -} - -type RotateIngestEndpointCredentialsOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Description *string `locationName:"description" type:"string"` - - // An HTTP Live Streaming (HLS) ingest resource configuration. - HlsIngest *HlsIngest `locationName:"hlsIngest" type:"structure"` - - Id *string `locationName:"id" type:"string"` -} - -// String returns the string representation -func (s RotateIngestEndpointCredentialsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RotateIngestEndpointCredentialsOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *RotateIngestEndpointCredentialsOutput) SetArn(v string) *RotateIngestEndpointCredentialsOutput { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *RotateIngestEndpointCredentialsOutput) SetDescription(v string) *RotateIngestEndpointCredentialsOutput { - s.Description = &v - return s -} - -// SetHlsIngest sets the HlsIngest field's value. -func (s *RotateIngestEndpointCredentialsOutput) SetHlsIngest(v *HlsIngest) *RotateIngestEndpointCredentialsOutput { - s.HlsIngest = v - return s -} - -// SetId sets the Id field's value. -func (s *RotateIngestEndpointCredentialsOutput) SetId(v string) *RotateIngestEndpointCredentialsOutput { - s.Id = &v - return s -} - -// A configuration for accessing an external Secure Packager and Encoder Key -// Exchange (SPEKE) service that will provide encryption keys. -type SpekeKeyProvider struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) of a Certificate Manager certificatethat MediaPackage - // will use for enforcing secure end-to-end datatransfer with the key provider - // service. - CertificateArn *string `locationName:"certificateArn" type:"string"` - - // The resource ID to include in key requests. - // - // ResourceId is a required field - ResourceId *string `locationName:"resourceId" type:"string" required:"true"` - - // An Amazon Resource Name (ARN) of an IAM role that AWS ElementalMediaPackage - // will assume when accessing the key provider service. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" type:"string" required:"true"` - - // The system IDs to include in key requests. - // - // SystemIds is a required field - SystemIds []*string `locationName:"systemIds" type:"list" required:"true"` - - // The URL of the external key provider service. - // - // Url is a required field - Url *string `locationName:"url" type:"string" required:"true"` -} - -// String returns the string representation -func (s SpekeKeyProvider) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SpekeKeyProvider) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SpekeKeyProvider) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SpekeKeyProvider"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.SystemIds == nil { - invalidParams.Add(request.NewErrParamRequired("SystemIds")) - } - if s.Url == nil { - invalidParams.Add(request.NewErrParamRequired("Url")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *SpekeKeyProvider) SetCertificateArn(v string) *SpekeKeyProvider { - s.CertificateArn = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *SpekeKeyProvider) SetResourceId(v string) *SpekeKeyProvider { - s.ResourceId = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *SpekeKeyProvider) SetRoleArn(v string) *SpekeKeyProvider { - s.RoleArn = &v - return s -} - -// SetSystemIds sets the SystemIds field's value. -func (s *SpekeKeyProvider) SetSystemIds(v []*string) *SpekeKeyProvider { - s.SystemIds = v - return s -} - -// SetUrl sets the Url field's value. -func (s *SpekeKeyProvider) SetUrl(v string) *SpekeKeyProvider { - s.Url = &v - return s -} - -// A StreamSelection configuration. -type StreamSelection struct { - _ struct{} `type:"structure"` - - // The maximum video bitrate (bps) to include in output. - MaxVideoBitsPerSecond *int64 `locationName:"maxVideoBitsPerSecond" type:"integer"` - - // The minimum video bitrate (bps) to include in output. - MinVideoBitsPerSecond *int64 `locationName:"minVideoBitsPerSecond" type:"integer"` - - // A directive that determines the order of streams in the output. - StreamOrder *string `locationName:"streamOrder" type:"string" enum:"StreamOrder"` -} - -// String returns the string representation -func (s StreamSelection) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StreamSelection) GoString() string { - return s.String() -} - -// SetMaxVideoBitsPerSecond sets the MaxVideoBitsPerSecond field's value. -func (s *StreamSelection) SetMaxVideoBitsPerSecond(v int64) *StreamSelection { - s.MaxVideoBitsPerSecond = &v - return s -} - -// SetMinVideoBitsPerSecond sets the MinVideoBitsPerSecond field's value. -func (s *StreamSelection) SetMinVideoBitsPerSecond(v int64) *StreamSelection { - s.MinVideoBitsPerSecond = &v - return s -} - -// SetStreamOrder sets the StreamOrder field's value. -func (s *StreamSelection) SetStreamOrder(v string) *StreamSelection { - s.StreamOrder = &v - return s -} - -type UpdateChannelInput struct { - _ struct{} `type:"structure"` - - Description *string `locationName:"description" type:"string"` - - // Id is a required field - Id *string `location:"uri" locationName:"id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateChannelInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateChannelInput) SetDescription(v string) *UpdateChannelInput { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateChannelInput) SetId(v string) *UpdateChannelInput { - s.Id = &v - return s -} - -type UpdateChannelOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Description *string `locationName:"description" type:"string"` - - // An HTTP Live Streaming (HLS) ingest resource configuration. - HlsIngest *HlsIngest `locationName:"hlsIngest" type:"structure"` - - Id *string `locationName:"id" type:"string"` -} - -// String returns the string representation -func (s UpdateChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateChannelOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *UpdateChannelOutput) SetArn(v string) *UpdateChannelOutput { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateChannelOutput) SetDescription(v string) *UpdateChannelOutput { - s.Description = &v - return s -} - -// SetHlsIngest sets the HlsIngest field's value. -func (s *UpdateChannelOutput) SetHlsIngest(v *HlsIngest) *UpdateChannelOutput { - s.HlsIngest = v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateChannelOutput) SetId(v string) *UpdateChannelOutput { - s.Id = &v - return s -} - -type UpdateOriginEndpointInput struct { - _ struct{} `type:"structure"` - - // A Common Media Application Format (CMAF) packaging configuration. - CmafPackage *CmafPackageCreateOrUpdateParameters `locationName:"cmafPackage" type:"structure"` - - // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. - DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` - - Description *string `locationName:"description" type:"string"` - - // An HTTP Live Streaming (HLS) packaging configuration. - HlsPackage *HlsPackage `locationName:"hlsPackage" type:"structure"` - - // Id is a required field - Id *string `location:"uri" locationName:"id" type:"string" required:"true"` - - ManifestName *string `locationName:"manifestName" type:"string"` - - // A Microsoft Smooth Streaming (MSS) packaging configuration. - MssPackage *MssPackage `locationName:"mssPackage" type:"structure"` - - StartoverWindowSeconds *int64 `locationName:"startoverWindowSeconds" type:"integer"` - - TimeDelaySeconds *int64 `locationName:"timeDelaySeconds" type:"integer"` - - Whitelist []*string `locationName:"whitelist" type:"list"` -} - -// String returns the string representation -func (s UpdateOriginEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateOriginEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateOriginEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateOriginEndpointInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.CmafPackage != nil { - if err := s.CmafPackage.Validate(); err != nil { - invalidParams.AddNested("CmafPackage", err.(request.ErrInvalidParams)) - } - } - if s.DashPackage != nil { - if err := s.DashPackage.Validate(); err != nil { - invalidParams.AddNested("DashPackage", err.(request.ErrInvalidParams)) - } - } - if s.HlsPackage != nil { - if err := s.HlsPackage.Validate(); err != nil { - invalidParams.AddNested("HlsPackage", err.(request.ErrInvalidParams)) - } - } - if s.MssPackage != nil { - if err := s.MssPackage.Validate(); err != nil { - invalidParams.AddNested("MssPackage", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCmafPackage sets the CmafPackage field's value. -func (s *UpdateOriginEndpointInput) SetCmafPackage(v *CmafPackageCreateOrUpdateParameters) *UpdateOriginEndpointInput { - s.CmafPackage = v - return s -} - -// SetDashPackage sets the DashPackage field's value. -func (s *UpdateOriginEndpointInput) SetDashPackage(v *DashPackage) *UpdateOriginEndpointInput { - s.DashPackage = v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateOriginEndpointInput) SetDescription(v string) *UpdateOriginEndpointInput { - s.Description = &v - return s -} - -// SetHlsPackage sets the HlsPackage field's value. -func (s *UpdateOriginEndpointInput) SetHlsPackage(v *HlsPackage) *UpdateOriginEndpointInput { - s.HlsPackage = v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateOriginEndpointInput) SetId(v string) *UpdateOriginEndpointInput { - s.Id = &v - return s -} - -// SetManifestName sets the ManifestName field's value. -func (s *UpdateOriginEndpointInput) SetManifestName(v string) *UpdateOriginEndpointInput { - s.ManifestName = &v - return s -} - -// SetMssPackage sets the MssPackage field's value. -func (s *UpdateOriginEndpointInput) SetMssPackage(v *MssPackage) *UpdateOriginEndpointInput { - s.MssPackage = v - return s -} - -// SetStartoverWindowSeconds sets the StartoverWindowSeconds field's value. -func (s *UpdateOriginEndpointInput) SetStartoverWindowSeconds(v int64) *UpdateOriginEndpointInput { - s.StartoverWindowSeconds = &v - return s -} - -// SetTimeDelaySeconds sets the TimeDelaySeconds field's value. -func (s *UpdateOriginEndpointInput) SetTimeDelaySeconds(v int64) *UpdateOriginEndpointInput { - s.TimeDelaySeconds = &v - return s -} - -// SetWhitelist sets the Whitelist field's value. -func (s *UpdateOriginEndpointInput) SetWhitelist(v []*string) *UpdateOriginEndpointInput { - s.Whitelist = v - return s -} - -type UpdateOriginEndpointOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - ChannelId *string `locationName:"channelId" type:"string"` - - // A Common Media Application Format (CMAF) packaging configuration. - CmafPackage *CmafPackage `locationName:"cmafPackage" type:"structure"` - - // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. - DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` - - Description *string `locationName:"description" type:"string"` - - // An HTTP Live Streaming (HLS) packaging configuration. - HlsPackage *HlsPackage `locationName:"hlsPackage" type:"structure"` - - Id *string `locationName:"id" type:"string"` - - ManifestName *string `locationName:"manifestName" type:"string"` - - // A Microsoft Smooth Streaming (MSS) packaging configuration. - MssPackage *MssPackage `locationName:"mssPackage" type:"structure"` - - StartoverWindowSeconds *int64 `locationName:"startoverWindowSeconds" type:"integer"` - - TimeDelaySeconds *int64 `locationName:"timeDelaySeconds" type:"integer"` - - Url *string `locationName:"url" type:"string"` - - Whitelist []*string `locationName:"whitelist" type:"list"` -} - -// String returns the string representation -func (s UpdateOriginEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateOriginEndpointOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *UpdateOriginEndpointOutput) SetArn(v string) *UpdateOriginEndpointOutput { - s.Arn = &v - return s -} - -// SetChannelId sets the ChannelId field's value. -func (s *UpdateOriginEndpointOutput) SetChannelId(v string) *UpdateOriginEndpointOutput { - s.ChannelId = &v - return s -} - -// SetCmafPackage sets the CmafPackage field's value. -func (s *UpdateOriginEndpointOutput) SetCmafPackage(v *CmafPackage) *UpdateOriginEndpointOutput { - s.CmafPackage = v - return s -} - -// SetDashPackage sets the DashPackage field's value. -func (s *UpdateOriginEndpointOutput) SetDashPackage(v *DashPackage) *UpdateOriginEndpointOutput { - s.DashPackage = v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateOriginEndpointOutput) SetDescription(v string) *UpdateOriginEndpointOutput { - s.Description = &v - return s -} - -// SetHlsPackage sets the HlsPackage field's value. -func (s *UpdateOriginEndpointOutput) SetHlsPackage(v *HlsPackage) *UpdateOriginEndpointOutput { - s.HlsPackage = v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateOriginEndpointOutput) SetId(v string) *UpdateOriginEndpointOutput { - s.Id = &v - return s -} - -// SetManifestName sets the ManifestName field's value. -func (s *UpdateOriginEndpointOutput) SetManifestName(v string) *UpdateOriginEndpointOutput { - s.ManifestName = &v - return s -} - -// SetMssPackage sets the MssPackage field's value. -func (s *UpdateOriginEndpointOutput) SetMssPackage(v *MssPackage) *UpdateOriginEndpointOutput { - s.MssPackage = v - return s -} - -// SetStartoverWindowSeconds sets the StartoverWindowSeconds field's value. -func (s *UpdateOriginEndpointOutput) SetStartoverWindowSeconds(v int64) *UpdateOriginEndpointOutput { - s.StartoverWindowSeconds = &v - return s -} - -// SetTimeDelaySeconds sets the TimeDelaySeconds field's value. -func (s *UpdateOriginEndpointOutput) SetTimeDelaySeconds(v int64) *UpdateOriginEndpointOutput { - s.TimeDelaySeconds = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *UpdateOriginEndpointOutput) SetUrl(v string) *UpdateOriginEndpointOutput { - s.Url = &v - return s -} - -// SetWhitelist sets the Whitelist field's value. -func (s *UpdateOriginEndpointOutput) SetWhitelist(v []*string) *UpdateOriginEndpointOutput { - s.Whitelist = v - return s -} - -const ( - // AdMarkersNone is a AdMarkers enum value - AdMarkersNone = "NONE" - - // AdMarkersScte35Enhanced is a AdMarkers enum value - AdMarkersScte35Enhanced = "SCTE35_ENHANCED" - - // AdMarkersPassthrough is a AdMarkers enum value - AdMarkersPassthrough = "PASSTHROUGH" -) - -const ( - // EncryptionMethodAes128 is a EncryptionMethod enum value - EncryptionMethodAes128 = "AES_128" - - // EncryptionMethodSampleAes is a EncryptionMethod enum value - EncryptionMethodSampleAes = "SAMPLE_AES" -) - -const ( - // PlaylistTypeNone is a PlaylistType enum value - PlaylistTypeNone = "NONE" - - // PlaylistTypeEvent is a PlaylistType enum value - PlaylistTypeEvent = "EVENT" - - // PlaylistTypeVod is a PlaylistType enum value - PlaylistTypeVod = "VOD" -) - -const ( - // ProfileNone is a Profile enum value - ProfileNone = "NONE" - - // ProfileHbbtv15 is a Profile enum value - ProfileHbbtv15 = "HBBTV_1_5" -) - -const ( - // StreamOrderOriginal is a StreamOrder enum value - StreamOrderOriginal = "ORIGINAL" - - // StreamOrderVideoBitrateAscending is a StreamOrder enum value - StreamOrderVideoBitrateAscending = "VIDEO_BITRATE_ASCENDING" - - // StreamOrderVideoBitrateDescending is a StreamOrder enum value - StreamOrderVideoBitrateDescending = "VIDEO_BITRATE_DESCENDING" -) - -const ( - // __PeriodTriggersElementAds is a __PeriodTriggersElement enum value - __PeriodTriggersElementAds = "ADS" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/doc.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/doc.go deleted file mode 100644 index 03c868349..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package mediapackage provides the client and types for making API -// requests to AWS Elemental MediaPackage. -// -// AWS Elemental MediaPackage -// -// See https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12 for more information on this service. -// -// See mediapackage package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/mediapackage/ -// -// Using the Client -// -// To contact AWS Elemental MediaPackage 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 Elemental MediaPackage client MediaPackage for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/mediapackage/#New -package mediapackage diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/errors.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/errors.go deleted file mode 100644 index c6ba3649e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/errors.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediapackage - -const ( - - // ErrCodeForbiddenException for service response error code - // "ForbiddenException". - ErrCodeForbiddenException = "ForbiddenException" - - // ErrCodeInternalServerErrorException for service response error code - // "InternalServerErrorException". - ErrCodeInternalServerErrorException = "InternalServerErrorException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeServiceUnavailableException for service response error code - // "ServiceUnavailableException". - ErrCodeServiceUnavailableException = "ServiceUnavailableException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - ErrCodeTooManyRequestsException = "TooManyRequestsException" - - // ErrCodeUnprocessableEntityException for service response error code - // "UnprocessableEntityException". - ErrCodeUnprocessableEntityException = "UnprocessableEntityException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go deleted file mode 100644 index 96dd74dcf..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediapackage - -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" -) - -// MediaPackage provides the API operation methods for making requests to -// AWS Elemental MediaPackage. See this package's package overview docs -// for details on the service. -// -// MediaPackage methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type MediaPackage 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 = "mediapackage" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "MediaPackage" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the MediaPackage client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a MediaPackage client from just a session. -// svc := mediapackage.New(mySession) -// -// // Create a MediaPackage client with additional configuration -// svc := mediapackage.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaPackage { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "mediapackage" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *MediaPackage { - svc := &MediaPackage{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-10-12", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a MediaPackage operation and runs any -// custom request initialization. -func (c *MediaPackage) 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/mediastore/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go deleted file mode 100644 index fdce6d30b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go +++ /dev/null @@ -1,2275 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediastore - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateContainer = "CreateContainer" - -// CreateContainerRequest generates a "aws/request.Request" representing the -// client's request for the CreateContainer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateContainer for more information on using the CreateContainer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateContainerRequest method. -// req, resp := client.CreateContainerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/CreateContainer -func (c *MediaStore) CreateContainerRequest(input *CreateContainerInput) (req *request.Request, output *CreateContainerOutput) { - op := &request.Operation{ - Name: opCreateContainer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateContainerInput{} - } - - output = &CreateContainerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateContainer API operation for AWS Elemental MediaStore. -// -// Creates a storage container to hold objects. A container is similar to a -// bucket in the Amazon S3 service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore's -// API operation CreateContainer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerInUseException "ContainerInUseException" -// The container that you specified in the request already exists or is being -// updated. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A service limit has been exceeded. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/CreateContainer -func (c *MediaStore) CreateContainer(input *CreateContainerInput) (*CreateContainerOutput, error) { - req, out := c.CreateContainerRequest(input) - return out, req.Send() -} - -// CreateContainerWithContext is the same as CreateContainer with the addition of -// the ability to pass a context and additional request options. -// -// See CreateContainer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStore) CreateContainerWithContext(ctx aws.Context, input *CreateContainerInput, opts ...request.Option) (*CreateContainerOutput, error) { - req, out := c.CreateContainerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteContainer = "DeleteContainer" - -// DeleteContainerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteContainer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteContainer for more information on using the DeleteContainer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteContainerRequest method. -// req, resp := client.DeleteContainerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainer -func (c *MediaStore) DeleteContainerRequest(input *DeleteContainerInput) (req *request.Request, output *DeleteContainerOutput) { - op := &request.Operation{ - Name: opDeleteContainer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteContainerInput{} - } - - output = &DeleteContainerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteContainer API operation for AWS Elemental MediaStore. -// -// Deletes the specified container. Before you make a DeleteContainer request, -// delete any objects in the container or in any folders in the container. You -// can delete only empty containers. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore's -// API operation DeleteContainer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerInUseException "ContainerInUseException" -// The container that you specified in the request already exists or is being -// updated. -// -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The container that you specified in the request does not exist. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainer -func (c *MediaStore) DeleteContainer(input *DeleteContainerInput) (*DeleteContainerOutput, error) { - req, out := c.DeleteContainerRequest(input) - return out, req.Send() -} - -// DeleteContainerWithContext is the same as DeleteContainer with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteContainer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStore) DeleteContainerWithContext(ctx aws.Context, input *DeleteContainerInput, opts ...request.Option) (*DeleteContainerOutput, error) { - req, out := c.DeleteContainerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteContainerPolicy = "DeleteContainerPolicy" - -// DeleteContainerPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteContainerPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteContainerPolicy for more information on using the DeleteContainerPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteContainerPolicyRequest method. -// req, resp := client.DeleteContainerPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainerPolicy -func (c *MediaStore) DeleteContainerPolicyRequest(input *DeleteContainerPolicyInput) (req *request.Request, output *DeleteContainerPolicyOutput) { - op := &request.Operation{ - Name: opDeleteContainerPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteContainerPolicyInput{} - } - - output = &DeleteContainerPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteContainerPolicy API operation for AWS Elemental MediaStore. -// -// Deletes the access policy that is associated with the specified container. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore's -// API operation DeleteContainerPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerInUseException "ContainerInUseException" -// The container that you specified in the request already exists or is being -// updated. -// -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The container that you specified in the request does not exist. -// -// * ErrCodePolicyNotFoundException "PolicyNotFoundException" -// The policy that you specified in the request does not exist. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainerPolicy -func (c *MediaStore) DeleteContainerPolicy(input *DeleteContainerPolicyInput) (*DeleteContainerPolicyOutput, error) { - req, out := c.DeleteContainerPolicyRequest(input) - return out, req.Send() -} - -// DeleteContainerPolicyWithContext is the same as DeleteContainerPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteContainerPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStore) DeleteContainerPolicyWithContext(ctx aws.Context, input *DeleteContainerPolicyInput, opts ...request.Option) (*DeleteContainerPolicyOutput, error) { - req, out := c.DeleteContainerPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCorsPolicy = "DeleteCorsPolicy" - -// DeleteCorsPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCorsPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCorsPolicy for more information on using the DeleteCorsPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCorsPolicyRequest method. -// req, resp := client.DeleteCorsPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteCorsPolicy -func (c *MediaStore) DeleteCorsPolicyRequest(input *DeleteCorsPolicyInput) (req *request.Request, output *DeleteCorsPolicyOutput) { - op := &request.Operation{ - Name: opDeleteCorsPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCorsPolicyInput{} - } - - output = &DeleteCorsPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCorsPolicy API operation for AWS Elemental MediaStore. -// -// Deletes the cross-origin resource sharing (CORS) configuration information -// that is set for the container. -// -// To use this operation, you must have permission to perform the MediaStore:DeleteCorsPolicy -// action. The container owner has this permission by default and can grant -// this permission to others. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore's -// API operation DeleteCorsPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerInUseException "ContainerInUseException" -// The container that you specified in the request already exists or is being -// updated. -// -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The container that you specified in the request does not exist. -// -// * ErrCodeCorsPolicyNotFoundException "CorsPolicyNotFoundException" -// The CORS policy that you specified in the request does not exist. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteCorsPolicy -func (c *MediaStore) DeleteCorsPolicy(input *DeleteCorsPolicyInput) (*DeleteCorsPolicyOutput, error) { - req, out := c.DeleteCorsPolicyRequest(input) - return out, req.Send() -} - -// DeleteCorsPolicyWithContext is the same as DeleteCorsPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCorsPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStore) DeleteCorsPolicyWithContext(ctx aws.Context, input *DeleteCorsPolicyInput, opts ...request.Option) (*DeleteCorsPolicyOutput, error) { - req, out := c.DeleteCorsPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy" - -// DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLifecyclePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLifecyclePolicy for more information on using the DeleteLifecyclePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLifecyclePolicyRequest method. -// req, resp := client.DeleteLifecyclePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteLifecyclePolicy -func (c *MediaStore) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput) { - op := &request.Operation{ - Name: opDeleteLifecyclePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLifecyclePolicyInput{} - } - - output = &DeleteLifecyclePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLifecyclePolicy API operation for AWS Elemental MediaStore. -// -// Removes an object lifecycle policy from a container. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore's -// API operation DeleteLifecyclePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerInUseException "ContainerInUseException" -// The container that you specified in the request already exists or is being -// updated. -// -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The container that you specified in the request does not exist. -// -// * ErrCodePolicyNotFoundException "PolicyNotFoundException" -// The policy that you specified in the request does not exist. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteLifecyclePolicy -func (c *MediaStore) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error) { - req, out := c.DeleteLifecyclePolicyRequest(input) - return out, req.Send() -} - -// DeleteLifecyclePolicyWithContext is the same as DeleteLifecyclePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLifecyclePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStore) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error) { - req, out := c.DeleteLifecyclePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeContainer = "DescribeContainer" - -// DescribeContainerRequest generates a "aws/request.Request" representing the -// client's request for the DescribeContainer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeContainer for more information on using the DescribeContainer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeContainerRequest method. -// req, resp := client.DescribeContainerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DescribeContainer -func (c *MediaStore) DescribeContainerRequest(input *DescribeContainerInput) (req *request.Request, output *DescribeContainerOutput) { - op := &request.Operation{ - Name: opDescribeContainer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeContainerInput{} - } - - output = &DescribeContainerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeContainer API operation for AWS Elemental MediaStore. -// -// Retrieves the properties of the requested container. This request is commonly -// used to retrieve the endpoint of a container. An endpoint is a value assigned -// by the service when a new container is created. A container's endpoint does -// not change after it has been assigned. The DescribeContainer request returns -// a single Container object based on ContainerName. To return all Container -// objects that are associated with a specified AWS account, use ListContainers. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore's -// API operation DescribeContainer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The container that you specified in the request does not exist. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DescribeContainer -func (c *MediaStore) DescribeContainer(input *DescribeContainerInput) (*DescribeContainerOutput, error) { - req, out := c.DescribeContainerRequest(input) - return out, req.Send() -} - -// DescribeContainerWithContext is the same as DescribeContainer with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeContainer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStore) DescribeContainerWithContext(ctx aws.Context, input *DescribeContainerInput, opts ...request.Option) (*DescribeContainerOutput, error) { - req, out := c.DescribeContainerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetContainerPolicy = "GetContainerPolicy" - -// GetContainerPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetContainerPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetContainerPolicy for more information on using the GetContainerPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetContainerPolicyRequest method. -// req, resp := client.GetContainerPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetContainerPolicy -func (c *MediaStore) GetContainerPolicyRequest(input *GetContainerPolicyInput) (req *request.Request, output *GetContainerPolicyOutput) { - op := &request.Operation{ - Name: opGetContainerPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetContainerPolicyInput{} - } - - output = &GetContainerPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetContainerPolicy API operation for AWS Elemental MediaStore. -// -// Retrieves the access policy for the specified container. For information -// about the data that is included in an access policy, see the AWS Identity -// and Access Management User Guide (https://aws.amazon.com/documentation/iam/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore's -// API operation GetContainerPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerInUseException "ContainerInUseException" -// The container that you specified in the request already exists or is being -// updated. -// -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The container that you specified in the request does not exist. -// -// * ErrCodePolicyNotFoundException "PolicyNotFoundException" -// The policy that you specified in the request does not exist. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetContainerPolicy -func (c *MediaStore) GetContainerPolicy(input *GetContainerPolicyInput) (*GetContainerPolicyOutput, error) { - req, out := c.GetContainerPolicyRequest(input) - return out, req.Send() -} - -// GetContainerPolicyWithContext is the same as GetContainerPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetContainerPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStore) GetContainerPolicyWithContext(ctx aws.Context, input *GetContainerPolicyInput, opts ...request.Option) (*GetContainerPolicyOutput, error) { - req, out := c.GetContainerPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCorsPolicy = "GetCorsPolicy" - -// GetCorsPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetCorsPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCorsPolicy for more information on using the GetCorsPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCorsPolicyRequest method. -// req, resp := client.GetCorsPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetCorsPolicy -func (c *MediaStore) GetCorsPolicyRequest(input *GetCorsPolicyInput) (req *request.Request, output *GetCorsPolicyOutput) { - op := &request.Operation{ - Name: opGetCorsPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCorsPolicyInput{} - } - - output = &GetCorsPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCorsPolicy API operation for AWS Elemental MediaStore. -// -// Returns the cross-origin resource sharing (CORS) configuration information -// that is set for the container. -// -// To use this operation, you must have permission to perform the MediaStore:GetCorsPolicy -// action. By default, the container owner has this permission and can grant -// it to others. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore's -// API operation GetCorsPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerInUseException "ContainerInUseException" -// The container that you specified in the request already exists or is being -// updated. -// -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The container that you specified in the request does not exist. -// -// * ErrCodeCorsPolicyNotFoundException "CorsPolicyNotFoundException" -// The CORS policy that you specified in the request does not exist. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetCorsPolicy -func (c *MediaStore) GetCorsPolicy(input *GetCorsPolicyInput) (*GetCorsPolicyOutput, error) { - req, out := c.GetCorsPolicyRequest(input) - return out, req.Send() -} - -// GetCorsPolicyWithContext is the same as GetCorsPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetCorsPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStore) GetCorsPolicyWithContext(ctx aws.Context, input *GetCorsPolicyInput, opts ...request.Option) (*GetCorsPolicyOutput, error) { - req, out := c.GetCorsPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLifecyclePolicy = "GetLifecyclePolicy" - -// GetLifecyclePolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetLifecyclePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLifecyclePolicy for more information on using the GetLifecyclePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLifecyclePolicyRequest method. -// req, resp := client.GetLifecyclePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetLifecyclePolicy -func (c *MediaStore) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput) { - op := &request.Operation{ - Name: opGetLifecyclePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetLifecyclePolicyInput{} - } - - output = &GetLifecyclePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLifecyclePolicy API operation for AWS Elemental MediaStore. -// -// Retrieves the object lifecycle policy that is assigned to a container. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore's -// API operation GetLifecyclePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerInUseException "ContainerInUseException" -// The container that you specified in the request already exists or is being -// updated. -// -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The container that you specified in the request does not exist. -// -// * ErrCodePolicyNotFoundException "PolicyNotFoundException" -// The policy that you specified in the request does not exist. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetLifecyclePolicy -func (c *MediaStore) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error) { - req, out := c.GetLifecyclePolicyRequest(input) - return out, req.Send() -} - -// GetLifecyclePolicyWithContext is the same as GetLifecyclePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetLifecyclePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStore) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error) { - req, out := c.GetLifecyclePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListContainers = "ListContainers" - -// ListContainersRequest generates a "aws/request.Request" representing the -// client's request for the ListContainers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListContainers for more information on using the ListContainers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListContainersRequest method. -// req, resp := client.ListContainersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListContainers -func (c *MediaStore) ListContainersRequest(input *ListContainersInput) (req *request.Request, output *ListContainersOutput) { - op := &request.Operation{ - Name: opListContainers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListContainersInput{} - } - - output = &ListContainersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListContainers API operation for AWS Elemental MediaStore. -// -// Lists the properties of all containers in AWS Elemental MediaStore. -// -// You can query to receive all the containers in one response. Or you can include -// the MaxResults parameter to receive a limited number of containers in each -// response. In this case, the response includes a token. To get the next set -// of containers, send the command again, this time with the NextToken parameter -// (with the returned token as its value). The next set of responses appears, -// with a token if there are still more containers to receive. -// -// See also DescribeContainer, which gets the properties of one container. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore's -// API operation ListContainers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListContainers -func (c *MediaStore) ListContainers(input *ListContainersInput) (*ListContainersOutput, error) { - req, out := c.ListContainersRequest(input) - return out, req.Send() -} - -// ListContainersWithContext is the same as ListContainers with the addition of -// the ability to pass a context and additional request options. -// -// See ListContainers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStore) ListContainersWithContext(ctx aws.Context, input *ListContainersInput, opts ...request.Option) (*ListContainersOutput, error) { - req, out := c.ListContainersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutContainerPolicy = "PutContainerPolicy" - -// PutContainerPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutContainerPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutContainerPolicy for more information on using the PutContainerPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutContainerPolicyRequest method. -// req, resp := client.PutContainerPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutContainerPolicy -func (c *MediaStore) PutContainerPolicyRequest(input *PutContainerPolicyInput) (req *request.Request, output *PutContainerPolicyOutput) { - op := &request.Operation{ - Name: opPutContainerPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutContainerPolicyInput{} - } - - output = &PutContainerPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutContainerPolicy API operation for AWS Elemental MediaStore. -// -// Creates an access policy for the specified container to restrict the users -// and clients that can access it. For information about the data that is included -// in an access policy, see the AWS Identity and Access Management User Guide -// (https://aws.amazon.com/documentation/iam/). -// -// For this release of the REST API, you can create only one policy for a container. -// If you enter PutContainerPolicy twice, the second command modifies the existing -// policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore's -// API operation PutContainerPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The container that you specified in the request does not exist. -// -// * ErrCodeContainerInUseException "ContainerInUseException" -// The container that you specified in the request already exists or is being -// updated. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutContainerPolicy -func (c *MediaStore) PutContainerPolicy(input *PutContainerPolicyInput) (*PutContainerPolicyOutput, error) { - req, out := c.PutContainerPolicyRequest(input) - return out, req.Send() -} - -// PutContainerPolicyWithContext is the same as PutContainerPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutContainerPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStore) PutContainerPolicyWithContext(ctx aws.Context, input *PutContainerPolicyInput, opts ...request.Option) (*PutContainerPolicyOutput, error) { - req, out := c.PutContainerPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutCorsPolicy = "PutCorsPolicy" - -// PutCorsPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutCorsPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutCorsPolicy for more information on using the PutCorsPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutCorsPolicyRequest method. -// req, resp := client.PutCorsPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutCorsPolicy -func (c *MediaStore) PutCorsPolicyRequest(input *PutCorsPolicyInput) (req *request.Request, output *PutCorsPolicyOutput) { - op := &request.Operation{ - Name: opPutCorsPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutCorsPolicyInput{} - } - - output = &PutCorsPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutCorsPolicy API operation for AWS Elemental MediaStore. -// -// Sets the cross-origin resource sharing (CORS) configuration on a container -// so that the container can service cross-origin requests. For example, you -// might want to enable a request whose origin is http://www.example.com to -// access your AWS Elemental MediaStore container at my.example.container.com -// by using the browser's XMLHttpRequest capability. -// -// To enable CORS on a container, you attach a CORS policy to the container. -// In the CORS policy, you configure rules that identify origins and the HTTP -// methods that can be executed on your container. The policy can contain up -// to 398,000 characters. You can add up to 100 rules to a CORS policy. If more -// than one rule applies, the service uses the first applicable rule listed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore's -// API operation PutCorsPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The container that you specified in the request does not exist. -// -// * ErrCodeContainerInUseException "ContainerInUseException" -// The container that you specified in the request already exists or is being -// updated. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutCorsPolicy -func (c *MediaStore) PutCorsPolicy(input *PutCorsPolicyInput) (*PutCorsPolicyOutput, error) { - req, out := c.PutCorsPolicyRequest(input) - return out, req.Send() -} - -// PutCorsPolicyWithContext is the same as PutCorsPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutCorsPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStore) PutCorsPolicyWithContext(ctx aws.Context, input *PutCorsPolicyInput, opts ...request.Option) (*PutCorsPolicyOutput, error) { - req, out := c.PutCorsPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutLifecyclePolicy = "PutLifecyclePolicy" - -// PutLifecyclePolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutLifecyclePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutLifecyclePolicy for more information on using the PutLifecyclePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutLifecyclePolicyRequest method. -// req, resp := client.PutLifecyclePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutLifecyclePolicy -func (c *MediaStore) PutLifecyclePolicyRequest(input *PutLifecyclePolicyInput) (req *request.Request, output *PutLifecyclePolicyOutput) { - op := &request.Operation{ - Name: opPutLifecyclePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutLifecyclePolicyInput{} - } - - output = &PutLifecyclePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutLifecyclePolicy API operation for AWS Elemental MediaStore. -// -// Writes an object lifecycle policy to a container. If the container already -// has an object lifecycle policy, the service replaces the existing policy -// with the new policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore's -// API operation PutLifecyclePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerInUseException "ContainerInUseException" -// The container that you specified in the request already exists or is being -// updated. -// -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The container that you specified in the request does not exist. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutLifecyclePolicy -func (c *MediaStore) PutLifecyclePolicy(input *PutLifecyclePolicyInput) (*PutLifecyclePolicyOutput, error) { - req, out := c.PutLifecyclePolicyRequest(input) - return out, req.Send() -} - -// PutLifecyclePolicyWithContext is the same as PutLifecyclePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutLifecyclePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStore) PutLifecyclePolicyWithContext(ctx aws.Context, input *PutLifecyclePolicyInput, opts ...request.Option) (*PutLifecyclePolicyOutput, error) { - req, out := c.PutLifecyclePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// This section describes operations that you can perform on an AWS Elemental -// MediaStore container. -type Container struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the container. The ARN has the following - // format: - // - // arn:aws:::container/ - // - // For example: arn:aws:mediastore:us-west-2:111122223333:container/movies - ARN *string `min:"1" type:"string"` - - // Unix timestamp. - CreationTime *time.Time `type:"timestamp"` - - // The DNS endpoint of the container. Use the endpoint to identify the specific - // container when sending requests to the data plane. The service assigns this - // value when the container is created. Once the value has been assigned, it - // does not change. - Endpoint *string `min:"1" type:"string"` - - // The name of the container. - Name *string `min:"1" type:"string"` - - // The status of container creation or deletion. The status is one of the following: - // CREATING, ACTIVE, or DELETING. While the service is creating the container, - // the status is CREATING. When the endpoint is available, the status changes - // to ACTIVE. - Status *string `min:"1" type:"string" enum:"ContainerStatus"` -} - -// String returns the string representation -func (s Container) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Container) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *Container) SetARN(v string) *Container { - s.ARN = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *Container) SetCreationTime(v time.Time) *Container { - s.CreationTime = &v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *Container) SetEndpoint(v string) *Container { - s.Endpoint = &v - return s -} - -// SetName sets the Name field's value. -func (s *Container) SetName(v string) *Container { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Container) SetStatus(v string) *Container { - s.Status = &v - return s -} - -// A rule for a CORS policy. You can add up to 100 rules to a CORS policy. If -// more than one rule applies, the service uses the first applicable rule listed. -type CorsRule struct { - _ struct{} `type:"structure"` - - // Specifies which headers are allowed in a preflight OPTIONS request through - // the Access-Control-Request-Headers header. Each header name that is specified - // in Access-Control-Request-Headers must have a corresponding entry in the - // rule. Only the headers that were requested are sent back. - // - // This element can contain only one wildcard character (*). - // - // AllowedHeaders is a required field - AllowedHeaders []*string `type:"list" required:"true"` - - // Identifies an HTTP method that the origin that is specified in the rule is - // allowed to execute. - // - // Each CORS rule must contain at least one AllowedMethods and one AllowedOrigins - // element. - AllowedMethods []*string `min:"1" type:"list"` - - // One or more response headers that you want users to be able to access from - // their applications (for example, from a JavaScript XMLHttpRequest object). - // - // Each CORS rule must have at least one AllowedOrigins element. The string - // value can include only one wildcard character (*), for example, http://*.example.com. - // Additionally, you can specify only one wildcard character to allow cross-origin - // access for all origins. - // - // AllowedOrigins is a required field - AllowedOrigins []*string `min:"1" type:"list" required:"true"` - - // One or more headers in the response that you want users to be able to access - // from their applications (for example, from a JavaScript XMLHttpRequest object). - // - // This element is optional for each rule. - ExposeHeaders []*string `type:"list"` - - // The time in seconds that your browser caches the preflight response for the - // specified resource. - // - // A CORS rule can have only one MaxAgeSeconds element. - MaxAgeSeconds *int64 `type:"integer"` -} - -// String returns the string representation -func (s CorsRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CorsRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CorsRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CorsRule"} - if s.AllowedHeaders == nil { - invalidParams.Add(request.NewErrParamRequired("AllowedHeaders")) - } - if s.AllowedMethods != nil && len(s.AllowedMethods) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AllowedMethods", 1)) - } - if s.AllowedOrigins == nil { - invalidParams.Add(request.NewErrParamRequired("AllowedOrigins")) - } - if s.AllowedOrigins != nil && len(s.AllowedOrigins) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AllowedOrigins", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowedHeaders sets the AllowedHeaders field's value. -func (s *CorsRule) SetAllowedHeaders(v []*string) *CorsRule { - s.AllowedHeaders = v - return s -} - -// SetAllowedMethods sets the AllowedMethods field's value. -func (s *CorsRule) SetAllowedMethods(v []*string) *CorsRule { - s.AllowedMethods = v - return s -} - -// SetAllowedOrigins sets the AllowedOrigins field's value. -func (s *CorsRule) SetAllowedOrigins(v []*string) *CorsRule { - s.AllowedOrigins = v - return s -} - -// SetExposeHeaders sets the ExposeHeaders field's value. -func (s *CorsRule) SetExposeHeaders(v []*string) *CorsRule { - s.ExposeHeaders = v - return s -} - -// SetMaxAgeSeconds sets the MaxAgeSeconds field's value. -func (s *CorsRule) SetMaxAgeSeconds(v int64) *CorsRule { - s.MaxAgeSeconds = &v - return s -} - -type CreateContainerInput struct { - _ struct{} `type:"structure"` - - // The name for the container. The name must be from 1 to 255 characters. Container - // names must be unique to your AWS account within a specific region. As an - // example, you could create a container named movies in every region, as long - // as you don’t have an existing container with that name. - // - // ContainerName is a required field - ContainerName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateContainerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateContainerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateContainerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateContainerInput"} - if s.ContainerName == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerName")) - } - if s.ContainerName != nil && len(*s.ContainerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerName sets the ContainerName field's value. -func (s *CreateContainerInput) SetContainerName(v string) *CreateContainerInput { - s.ContainerName = &v - return s -} - -type CreateContainerOutput struct { - _ struct{} `type:"structure"` - - // ContainerARN: The Amazon Resource Name (ARN) of the newly created container. - // The ARN has the following format: arn:aws:::container/. For example: arn:aws:mediastore:us-west-2:111122223333:container/movies - // - // ContainerName: The container name as specified in the request. - // - // CreationTime: Unix time stamp. - // - // Status: The status of container creation or deletion. The status is one of - // the following: CREATING, ACTIVE, or DELETING. While the service is creating - // the container, the status is CREATING. When an endpoint is available, the - // status changes to ACTIVE. - // - // The return value does not include the container's endpoint. To make downstream - // requests, you must obtain this value by using DescribeContainer or ListContainers. - // - // Container is a required field - Container *Container `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateContainerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateContainerOutput) GoString() string { - return s.String() -} - -// SetContainer sets the Container field's value. -func (s *CreateContainerOutput) SetContainer(v *Container) *CreateContainerOutput { - s.Container = v - return s -} - -type DeleteContainerInput struct { - _ struct{} `type:"structure"` - - // The name of the container to delete. - // - // ContainerName is a required field - ContainerName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteContainerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteContainerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteContainerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteContainerInput"} - if s.ContainerName == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerName")) - } - if s.ContainerName != nil && len(*s.ContainerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerName sets the ContainerName field's value. -func (s *DeleteContainerInput) SetContainerName(v string) *DeleteContainerInput { - s.ContainerName = &v - return s -} - -type DeleteContainerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteContainerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteContainerOutput) GoString() string { - return s.String() -} - -type DeleteContainerPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the container that holds the policy. - // - // ContainerName is a required field - ContainerName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteContainerPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteContainerPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteContainerPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteContainerPolicyInput"} - if s.ContainerName == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerName")) - } - if s.ContainerName != nil && len(*s.ContainerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerName sets the ContainerName field's value. -func (s *DeleteContainerPolicyInput) SetContainerName(v string) *DeleteContainerPolicyInput { - s.ContainerName = &v - return s -} - -type DeleteContainerPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteContainerPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteContainerPolicyOutput) GoString() string { - return s.String() -} - -type DeleteCorsPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the container to remove the policy from. - // - // ContainerName is a required field - ContainerName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteCorsPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCorsPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCorsPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCorsPolicyInput"} - if s.ContainerName == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerName")) - } - if s.ContainerName != nil && len(*s.ContainerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerName sets the ContainerName field's value. -func (s *DeleteCorsPolicyInput) SetContainerName(v string) *DeleteCorsPolicyInput { - s.ContainerName = &v - return s -} - -type DeleteCorsPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCorsPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCorsPolicyOutput) GoString() string { - return s.String() -} - -type DeleteLifecyclePolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the container that holds the object lifecycle policy. - // - // ContainerName is a required field - ContainerName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLifecyclePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLifecyclePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLifecyclePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLifecyclePolicyInput"} - if s.ContainerName == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerName")) - } - if s.ContainerName != nil && len(*s.ContainerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerName sets the ContainerName field's value. -func (s *DeleteLifecyclePolicyInput) SetContainerName(v string) *DeleteLifecyclePolicyInput { - s.ContainerName = &v - return s -} - -type DeleteLifecyclePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLifecyclePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLifecyclePolicyOutput) GoString() string { - return s.String() -} - -type DescribeContainerInput struct { - _ struct{} `type:"structure"` - - // The name of the container to query. - ContainerName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeContainerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeContainerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeContainerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeContainerInput"} - if s.ContainerName != nil && len(*s.ContainerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerName sets the ContainerName field's value. -func (s *DescribeContainerInput) SetContainerName(v string) *DescribeContainerInput { - s.ContainerName = &v - return s -} - -type DescribeContainerOutput struct { - _ struct{} `type:"structure"` - - // The name of the queried container. - Container *Container `type:"structure"` -} - -// String returns the string representation -func (s DescribeContainerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeContainerOutput) GoString() string { - return s.String() -} - -// SetContainer sets the Container field's value. -func (s *DescribeContainerOutput) SetContainer(v *Container) *DescribeContainerOutput { - s.Container = v - return s -} - -type GetContainerPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the container. - // - // ContainerName is a required field - ContainerName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetContainerPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetContainerPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetContainerPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetContainerPolicyInput"} - if s.ContainerName == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerName")) - } - if s.ContainerName != nil && len(*s.ContainerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerName sets the ContainerName field's value. -func (s *GetContainerPolicyInput) SetContainerName(v string) *GetContainerPolicyInput { - s.ContainerName = &v - return s -} - -type GetContainerPolicyOutput struct { - _ struct{} `type:"structure"` - - // The contents of the access policy. - // - // Policy is a required field - Policy *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetContainerPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetContainerPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *GetContainerPolicyOutput) SetPolicy(v string) *GetContainerPolicyOutput { - s.Policy = &v - return s -} - -type GetCorsPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the container that the policy is assigned to. - // - // ContainerName is a required field - ContainerName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCorsPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCorsPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCorsPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCorsPolicyInput"} - if s.ContainerName == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerName")) - } - if s.ContainerName != nil && len(*s.ContainerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerName sets the ContainerName field's value. -func (s *GetCorsPolicyInput) SetContainerName(v string) *GetCorsPolicyInput { - s.ContainerName = &v - return s -} - -type GetCorsPolicyOutput struct { - _ struct{} `type:"structure"` - - // The CORS policy assigned to the container. - // - // CorsPolicy is a required field - CorsPolicy []*CorsRule `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s GetCorsPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCorsPolicyOutput) GoString() string { - return s.String() -} - -// SetCorsPolicy sets the CorsPolicy field's value. -func (s *GetCorsPolicyOutput) SetCorsPolicy(v []*CorsRule) *GetCorsPolicyOutput { - s.CorsPolicy = v - return s -} - -type GetLifecyclePolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the container that the object lifecycle policy is assigned to. - // - // ContainerName is a required field - ContainerName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetLifecyclePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLifecyclePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLifecyclePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyInput"} - if s.ContainerName == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerName")) - } - if s.ContainerName != nil && len(*s.ContainerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerName sets the ContainerName field's value. -func (s *GetLifecyclePolicyInput) SetContainerName(v string) *GetLifecyclePolicyInput { - s.ContainerName = &v - return s -} - -type GetLifecyclePolicyOutput struct { - _ struct{} `type:"structure"` - - // The object lifecycle policy that is assigned to the container. - // - // LifecyclePolicy is a required field - LifecyclePolicy *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetLifecyclePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLifecyclePolicyOutput) GoString() string { - return s.String() -} - -// SetLifecyclePolicy sets the LifecyclePolicy field's value. -func (s *GetLifecyclePolicyOutput) SetLifecyclePolicy(v string) *GetLifecyclePolicyOutput { - s.LifecyclePolicy = &v - return s -} - -type ListContainersInput struct { - _ struct{} `type:"structure"` - - // Enter the maximum number of containers in the response. Use from 1 to 255 - // characters. - MaxResults *int64 `min:"1" type:"integer"` - - // Only if you used MaxResults in the first command, enter the token (which - // was included in the previous response) to obtain the next set of containers. - // This token is included in a response only if there actually are more containers - // to list. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListContainersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListContainersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListContainersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListContainersInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListContainersInput) SetMaxResults(v int64) *ListContainersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListContainersInput) SetNextToken(v string) *ListContainersInput { - s.NextToken = &v - return s -} - -type ListContainersOutput struct { - _ struct{} `type:"structure"` - - // The names of the containers. - // - // Containers is a required field - Containers []*Container `type:"list" required:"true"` - - // NextToken is the token to use in the next call to ListContainers. This token - // is returned only if you included the MaxResults tag in the original command, - // and only if there are still containers to return. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListContainersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListContainersOutput) GoString() string { - return s.String() -} - -// SetContainers sets the Containers field's value. -func (s *ListContainersOutput) SetContainers(v []*Container) *ListContainersOutput { - s.Containers = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListContainersOutput) SetNextToken(v string) *ListContainersOutput { - s.NextToken = &v - return s -} - -type PutContainerPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the container. - // - // ContainerName is a required field - ContainerName *string `min:"1" type:"string" required:"true"` - - // The contents of the policy, which includes the following: - // - // * One Version tag - // - // * One Statement tag that contains the standard tags for the policy. - // - // Policy is a required field - Policy *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutContainerPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutContainerPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutContainerPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutContainerPolicyInput"} - if s.ContainerName == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerName")) - } - if s.ContainerName != nil && len(*s.ContainerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) - } - if s.Policy == nil { - invalidParams.Add(request.NewErrParamRequired("Policy")) - } - if s.Policy != nil && len(*s.Policy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerName sets the ContainerName field's value. -func (s *PutContainerPolicyInput) SetContainerName(v string) *PutContainerPolicyInput { - s.ContainerName = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *PutContainerPolicyInput) SetPolicy(v string) *PutContainerPolicyInput { - s.Policy = &v - return s -} - -type PutContainerPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutContainerPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutContainerPolicyOutput) GoString() string { - return s.String() -} - -type PutCorsPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the container that you want to assign the CORS policy to. - // - // ContainerName is a required field - ContainerName *string `min:"1" type:"string" required:"true"` - - // The CORS policy to apply to the container. - // - // CorsPolicy is a required field - CorsPolicy []*CorsRule `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s PutCorsPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutCorsPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutCorsPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutCorsPolicyInput"} - if s.ContainerName == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerName")) - } - if s.ContainerName != nil && len(*s.ContainerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) - } - if s.CorsPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("CorsPolicy")) - } - if s.CorsPolicy != nil && len(s.CorsPolicy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CorsPolicy", 1)) - } - if s.CorsPolicy != nil { - for i, v := range s.CorsPolicy { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CorsPolicy", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerName sets the ContainerName field's value. -func (s *PutCorsPolicyInput) SetContainerName(v string) *PutCorsPolicyInput { - s.ContainerName = &v - return s -} - -// SetCorsPolicy sets the CorsPolicy field's value. -func (s *PutCorsPolicyInput) SetCorsPolicy(v []*CorsRule) *PutCorsPolicyInput { - s.CorsPolicy = v - return s -} - -type PutCorsPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutCorsPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutCorsPolicyOutput) GoString() string { - return s.String() -} - -type PutLifecyclePolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the container that you want to assign the object lifecycle policy - // to. - // - // ContainerName is a required field - ContainerName *string `min:"1" type:"string" required:"true"` - - // The object lifecycle policy to apply to the container. - // - // LifecyclePolicy is a required field - LifecyclePolicy *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PutLifecyclePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutLifecyclePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutLifecyclePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutLifecyclePolicyInput"} - if s.ContainerName == nil { - invalidParams.Add(request.NewErrParamRequired("ContainerName")) - } - if s.ContainerName != nil && len(*s.ContainerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) - } - if s.LifecyclePolicy == nil { - invalidParams.Add(request.NewErrParamRequired("LifecyclePolicy")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerName sets the ContainerName field's value. -func (s *PutLifecyclePolicyInput) SetContainerName(v string) *PutLifecyclePolicyInput { - s.ContainerName = &v - return s -} - -// SetLifecyclePolicy sets the LifecyclePolicy field's value. -func (s *PutLifecyclePolicyInput) SetLifecyclePolicy(v string) *PutLifecyclePolicyInput { - s.LifecyclePolicy = &v - return s -} - -type PutLifecyclePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutLifecyclePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutLifecyclePolicyOutput) GoString() string { - return s.String() -} - -const ( - // ContainerStatusActive is a ContainerStatus enum value - ContainerStatusActive = "ACTIVE" - - // ContainerStatusCreating is a ContainerStatus enum value - ContainerStatusCreating = "CREATING" - - // ContainerStatusDeleting is a ContainerStatus enum value - ContainerStatusDeleting = "DELETING" -) - -const ( - // MethodNamePut is a MethodName enum value - MethodNamePut = "PUT" - - // MethodNameGet is a MethodName enum value - MethodNameGet = "GET" - - // MethodNameDelete is a MethodName enum value - MethodNameDelete = "DELETE" - - // MethodNameHead is a MethodName enum value - MethodNameHead = "HEAD" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastore/doc.go b/vendor/github.com/aws/aws-sdk-go/service/mediastore/doc.go deleted file mode 100644 index d8f01e8ad..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastore/doc.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package mediastore provides the client and types for making API -// requests to AWS Elemental MediaStore. -// -// An AWS Elemental MediaStore container is a namespace that holds folders and -// objects. You use a container endpoint to create, read, and delete objects. -// -// See https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01 for more information on this service. -// -// See mediastore package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/mediastore/ -// -// Using the Client -// -// To contact AWS Elemental MediaStore 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 Elemental MediaStore client MediaStore for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/mediastore/#New -package mediastore diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastore/errors.go b/vendor/github.com/aws/aws-sdk-go/service/mediastore/errors.go deleted file mode 100644 index f64caedd3..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastore/errors.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediastore - -const ( - - // ErrCodeContainerInUseException for service response error code - // "ContainerInUseException". - // - // The container that you specified in the request already exists or is being - // updated. - ErrCodeContainerInUseException = "ContainerInUseException" - - // ErrCodeContainerNotFoundException for service response error code - // "ContainerNotFoundException". - // - // The container that you specified in the request does not exist. - ErrCodeContainerNotFoundException = "ContainerNotFoundException" - - // ErrCodeCorsPolicyNotFoundException for service response error code - // "CorsPolicyNotFoundException". - // - // The CORS policy that you specified in the request does not exist. - ErrCodeCorsPolicyNotFoundException = "CorsPolicyNotFoundException" - - // ErrCodeInternalServerError for service response error code - // "InternalServerError". - // - // The service is temporarily unavailable. - ErrCodeInternalServerError = "InternalServerError" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // A service limit has been exceeded. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodePolicyNotFoundException for service response error code - // "PolicyNotFoundException". - // - // The policy that you specified in the request does not exist. - ErrCodePolicyNotFoundException = "PolicyNotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go deleted file mode 100644 index 492b3bf04..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediastore - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// MediaStore provides the API operation methods for making requests to -// AWS Elemental MediaStore. See this package's package overview docs -// for details on the service. -// -// MediaStore methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type MediaStore 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 = "mediastore" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "MediaStore" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the MediaStore client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a MediaStore client from just a session. -// svc := mediastore.New(mySession) -// -// // Create a MediaStore client with additional configuration -// svc := mediastore.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaStore { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "mediastore" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *MediaStore { - svc := &MediaStore{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-09-01", - JSONVersion: "1.1", - TargetPrefix: "MediaStore_20170901", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a MediaStore operation and runs any -// custom request initialization. -func (c *MediaStore) 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/mediastoredata/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go deleted file mode 100644 index a8e1df9fc..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go +++ /dev/null @@ -1,1112 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediastoredata - -import ( - "io" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opDeleteObject = "DeleteObject" - -// DeleteObjectRequest generates a "aws/request.Request" representing the -// client's request for the DeleteObject operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteObject for more information on using the DeleteObject -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteObjectRequest method. -// req, resp := client.DeleteObjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DeleteObject -func (c *MediaStoreData) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) { - op := &request.Operation{ - Name: opDeleteObject, - HTTPMethod: "DELETE", - HTTPPath: "/{Path+}", - } - - if input == nil { - input = &DeleteObjectInput{} - } - - output = &DeleteObjectOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteObject API operation for AWS Elemental MediaStore Data Plane. -// -// Deletes an object at the specified path. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's -// API operation DeleteObject for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The specified container was not found for the specified account. -// -// * ErrCodeObjectNotFoundException "ObjectNotFoundException" -// Could not perform an operation on an object that does not exist. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DeleteObject -func (c *MediaStoreData) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) { - req, out := c.DeleteObjectRequest(input) - return out, req.Send() -} - -// DeleteObjectWithContext is the same as DeleteObject with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteObject for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStoreData) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) { - req, out := c.DeleteObjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeObject = "DescribeObject" - -// DescribeObjectRequest generates a "aws/request.Request" representing the -// client's request for the DescribeObject operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeObject for more information on using the DescribeObject -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeObjectRequest method. -// req, resp := client.DescribeObjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DescribeObject -func (c *MediaStoreData) DescribeObjectRequest(input *DescribeObjectInput) (req *request.Request, output *DescribeObjectOutput) { - op := &request.Operation{ - Name: opDescribeObject, - HTTPMethod: "HEAD", - HTTPPath: "/{Path+}", - } - - if input == nil { - input = &DescribeObjectInput{} - } - - output = &DescribeObjectOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeObject API operation for AWS Elemental MediaStore Data Plane. -// -// Gets the headers for an object at the specified path. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's -// API operation DescribeObject for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The specified container was not found for the specified account. -// -// * ErrCodeObjectNotFoundException "ObjectNotFoundException" -// Could not perform an operation on an object that does not exist. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DescribeObject -func (c *MediaStoreData) DescribeObject(input *DescribeObjectInput) (*DescribeObjectOutput, error) { - req, out := c.DescribeObjectRequest(input) - return out, req.Send() -} - -// DescribeObjectWithContext is the same as DescribeObject with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeObject for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStoreData) DescribeObjectWithContext(ctx aws.Context, input *DescribeObjectInput, opts ...request.Option) (*DescribeObjectOutput, error) { - req, out := c.DescribeObjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetObject = "GetObject" - -// GetObjectRequest generates a "aws/request.Request" representing the -// client's request for the GetObject operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetObject for more information on using the GetObject -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetObjectRequest method. -// req, resp := client.GetObjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/GetObject -func (c *MediaStoreData) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) { - op := &request.Operation{ - Name: opGetObject, - HTTPMethod: "GET", - HTTPPath: "/{Path+}", - } - - if input == nil { - input = &GetObjectInput{} - } - - output = &GetObjectOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetObject API operation for AWS Elemental MediaStore Data Plane. -// -// Downloads the object at the specified path. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's -// API operation GetObject for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The specified container was not found for the specified account. -// -// * ErrCodeObjectNotFoundException "ObjectNotFoundException" -// Could not perform an operation on an object that does not exist. -// -// * ErrCodeRequestedRangeNotSatisfiableException "RequestedRangeNotSatisfiableException" -// The requested content range is not valid. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/GetObject -func (c *MediaStoreData) GetObject(input *GetObjectInput) (*GetObjectOutput, error) { - req, out := c.GetObjectRequest(input) - return out, req.Send() -} - -// GetObjectWithContext is the same as GetObject with the addition of -// the ability to pass a context and additional request options. -// -// See GetObject for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStoreData) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) { - req, out := c.GetObjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListItems = "ListItems" - -// ListItemsRequest generates a "aws/request.Request" representing the -// client's request for the ListItems operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListItems for more information on using the ListItems -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListItemsRequest method. -// req, resp := client.ListItemsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/ListItems -func (c *MediaStoreData) ListItemsRequest(input *ListItemsInput) (req *request.Request, output *ListItemsOutput) { - op := &request.Operation{ - Name: opListItems, - HTTPMethod: "GET", - HTTPPath: "/", - } - - if input == nil { - input = &ListItemsInput{} - } - - output = &ListItemsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListItems API operation for AWS Elemental MediaStore Data Plane. -// -// Provides a list of metadata entries about folders and objects in the specified -// folder. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's -// API operation ListItems for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The specified container was not found for the specified account. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/ListItems -func (c *MediaStoreData) ListItems(input *ListItemsInput) (*ListItemsOutput, error) { - req, out := c.ListItemsRequest(input) - return out, req.Send() -} - -// ListItemsWithContext is the same as ListItems with the addition of -// the ability to pass a context and additional request options. -// -// See ListItems for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStoreData) ListItemsWithContext(ctx aws.Context, input *ListItemsInput, opts ...request.Option) (*ListItemsOutput, error) { - req, out := c.ListItemsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutObject = "PutObject" - -// PutObjectRequest generates a "aws/request.Request" representing the -// client's request for the PutObject operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutObject for more information on using the PutObject -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutObjectRequest method. -// req, resp := client.PutObjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/PutObject -func (c *MediaStoreData) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) { - op := &request.Operation{ - Name: opPutObject, - HTTPMethod: "PUT", - HTTPPath: "/{Path+}", - } - - if input == nil { - input = &PutObjectInput{} - } - - output = &PutObjectOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Sign.Remove(v4.SignRequestHandler) - handler := v4.BuildNamedHandler("v4.CustomSignerHandler", v4.WithUnsignedPayload) - req.Handlers.Sign.PushFrontNamed(handler) - return -} - -// PutObject API operation for AWS Elemental MediaStore Data Plane. -// -// Uploads an object to the specified path. Object sizes are limited to 25 MB. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's -// API operation PutObject for usage and error information. -// -// Returned Error Codes: -// * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// The specified container was not found for the specified account. -// -// * ErrCodeInternalServerError "InternalServerError" -// The service is temporarily unavailable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/PutObject -func (c *MediaStoreData) PutObject(input *PutObjectInput) (*PutObjectOutput, error) { - req, out := c.PutObjectRequest(input) - return out, req.Send() -} - -// PutObjectWithContext is the same as PutObject with the addition of -// the ability to pass a context and additional request options. -// -// See PutObject for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MediaStoreData) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) { - req, out := c.PutObjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type DeleteObjectInput struct { - _ struct{} `type:"structure"` - - // The path (including the file name) where the object is stored in the container. - // Format: // - // - // Path is a required field - Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteObjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteObjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteObjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"} - if s.Path == nil { - invalidParams.Add(request.NewErrParamRequired("Path")) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPath sets the Path field's value. -func (s *DeleteObjectInput) SetPath(v string) *DeleteObjectInput { - s.Path = &v - return s -} - -type DeleteObjectOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteObjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteObjectOutput) GoString() string { - return s.String() -} - -type DescribeObjectInput struct { - _ struct{} `type:"structure"` - - // The path (including the file name) where the object is stored in the container. - // Format: // - // - // Path is a required field - Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeObjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeObjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeObjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeObjectInput"} - if s.Path == nil { - invalidParams.Add(request.NewErrParamRequired("Path")) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPath sets the Path field's value. -func (s *DescribeObjectInput) SetPath(v string) *DescribeObjectInput { - s.Path = &v - return s -} - -type DescribeObjectOutput struct { - _ struct{} `type:"structure"` - - // An optional CacheControl header that allows the caller to control the object's - // cache behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 - // (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9). - // - // Headers with a custom user-defined value are also accepted. - CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` - - // The length of the object in bytes. - ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` - - // The content type of the object. - ContentType *string `location:"header" locationName:"Content-Type" type:"string"` - - // The ETag that represents a unique instance of the object. - ETag *string `location:"header" locationName:"ETag" min:"1" type:"string"` - - // The date and time that the object was last modified. - LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` -} - -// String returns the string representation -func (s DescribeObjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeObjectOutput) GoString() string { - return s.String() -} - -// SetCacheControl sets the CacheControl field's value. -func (s *DescribeObjectOutput) SetCacheControl(v string) *DescribeObjectOutput { - s.CacheControl = &v - return s -} - -// SetContentLength sets the ContentLength field's value. -func (s *DescribeObjectOutput) SetContentLength(v int64) *DescribeObjectOutput { - s.ContentLength = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *DescribeObjectOutput) SetContentType(v string) *DescribeObjectOutput { - s.ContentType = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *DescribeObjectOutput) SetETag(v string) *DescribeObjectOutput { - s.ETag = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *DescribeObjectOutput) SetLastModified(v time.Time) *DescribeObjectOutput { - s.LastModified = &v - return s -} - -type GetObjectInput struct { - _ struct{} `type:"structure"` - - // The path (including the file name) where the object is stored in the container. - // Format: // - // - // For example, to upload the file mlaw.avi to the folder path premium\canada - // in the container movies, enter the path premium/canada/mlaw.avi. - // - // Do not include the container name in this path. - // - // If the path includes any folders that don't exist yet, the service creates - // them. For example, suppose you have an existing premium/usa subfolder. If - // you specify premium/canada, the service creates a canada subfolder in the - // premium folder. You then have two subfolders, usa and canada, in the premium - // folder. - // - // There is no correlation between the path to the source and the path (folders) - // in the container in AWS Elemental MediaStore. - // - // For more information about folders and how they exist in a container, see - // the AWS Elemental MediaStore User Guide (http://docs.aws.amazon.com/mediastore/latest/ug/). - // - // The file name is the name that is assigned to the file that you upload. The - // file can have the same name inside and outside of AWS Elemental MediaStore, - // or it can have the same name. The file name can include or omit an extension. - // - // Path is a required field - Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"` - - // The range bytes of an object to retrieve. For more information about the - // Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35 - // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35). - Range *string `location:"header" locationName:"Range" type:"string"` -} - -// String returns the string representation -func (s GetObjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetObjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetObjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"} - if s.Path == nil { - invalidParams.Add(request.NewErrParamRequired("Path")) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPath sets the Path field's value. -func (s *GetObjectInput) SetPath(v string) *GetObjectInput { - s.Path = &v - return s -} - -// SetRange sets the Range field's value. -func (s *GetObjectInput) SetRange(v string) *GetObjectInput { - s.Range = &v - return s -} - -type GetObjectOutput struct { - _ struct{} `type:"structure" payload:"Body"` - - // The bytes of the object. - Body io.ReadCloser `type:"blob"` - - // An optional CacheControl header that allows the caller to control the object's - // cache behavior. Headers can be passed in as specified in the HTTP spec at - // https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9). - // - // Headers with a custom user-defined value are also accepted. - CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` - - // The length of the object in bytes. - ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` - - // The range of bytes to retrieve. - ContentRange *string `location:"header" locationName:"Content-Range" type:"string"` - - // The content type of the object. - ContentType *string `location:"header" locationName:"Content-Type" type:"string"` - - // The ETag that represents a unique instance of the object. - ETag *string `location:"header" locationName:"ETag" min:"1" type:"string"` - - // The date and time that the object was last modified. - LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` - - // The HTML status code of the request. Status codes ranging from 200 to 299 - // indicate success. All other status codes indicate the type of error that - // occurred. - // - // StatusCode is a required field - StatusCode *int64 `location:"statusCode" type:"integer" required:"true"` -} - -// String returns the string representation -func (s GetObjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetObjectOutput) GoString() string { - return s.String() -} - -// SetBody sets the Body field's value. -func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput { - s.Body = v - return s -} - -// SetCacheControl sets the CacheControl field's value. -func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput { - s.CacheControl = &v - return s -} - -// SetContentLength sets the ContentLength field's value. -func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput { - s.ContentLength = &v - return s -} - -// SetContentRange sets the ContentRange field's value. -func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput { - s.ContentRange = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput { - s.ContentType = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput { - s.ETag = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput { - s.LastModified = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *GetObjectOutput) SetStatusCode(v int64) *GetObjectOutput { - s.StatusCode = &v - return s -} - -// A metadata entry for a folder or object. -type Item struct { - _ struct{} `type:"structure"` - - // The length of the item in bytes. - ContentLength *int64 `type:"long"` - - // The content type of the item. - ContentType *string `type:"string"` - - // The ETag that represents a unique instance of the item. - ETag *string `min:"1" type:"string"` - - // The date and time that the item was last modified. - LastModified *time.Time `type:"timestamp"` - - // The name of the item. - Name *string `type:"string"` - - // The item type (folder or object). - Type *string `type:"string" enum:"ItemType"` -} - -// String returns the string representation -func (s Item) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Item) GoString() string { - return s.String() -} - -// SetContentLength sets the ContentLength field's value. -func (s *Item) SetContentLength(v int64) *Item { - s.ContentLength = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *Item) SetContentType(v string) *Item { - s.ContentType = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *Item) SetETag(v string) *Item { - s.ETag = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *Item) SetLastModified(v time.Time) *Item { - s.LastModified = &v - return s -} - -// SetName sets the Name field's value. -func (s *Item) SetName(v string) *Item { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *Item) SetType(v string) *Item { - s.Type = &v - return s -} - -type ListItemsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return per API request. For example, you - // submit a ListItems request with MaxResults set at 500. Although 2,000 items - // match your request, the service returns no more than the first 500 items. - // (The service also returns a NextToken value that you can use to fetch the - // next batch of results.) The service might return fewer results than the MaxResults - // value. - // - // If MaxResults is not included in the request, the service defaults to pagination - // with a maximum of 1,000 results per page. - MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` - - // The token that identifies which batch of results that you want to see. For - // example, you submit a ListItems request with MaxResults set at 500. The service - // returns the first batch of results (up to 500) and a NextToken value. To - // see the next batch of results, you can submit the ListItems request a second - // time and specify the NextToken value. - // - // Tokens expire after 15 minutes. - NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` - - // The path in the container from which to retrieve items. Format: // - Path *string `location:"querystring" locationName:"Path" type:"string"` -} - -// String returns the string representation -func (s ListItemsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListItemsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListItemsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListItemsInput"} - 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 *ListItemsInput) SetMaxResults(v int64) *ListItemsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListItemsInput) SetNextToken(v string) *ListItemsInput { - s.NextToken = &v - return s -} - -// SetPath sets the Path field's value. -func (s *ListItemsInput) SetPath(v string) *ListItemsInput { - s.Path = &v - return s -} - -type ListItemsOutput struct { - _ struct{} `type:"structure"` - - // The metadata entries for the folders and objects at the requested path. - Items []*Item `type:"list"` - - // The token that can be used in a request to view the next set of results. - // For example, you submit a ListItems request that matches 2,000 items with - // MaxResults set at 500. The service returns the first batch of results (up - // to 500) and a NextToken value that can be used to fetch the next batch of - // results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListItemsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListItemsOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *ListItemsOutput) SetItems(v []*Item) *ListItemsOutput { - s.Items = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListItemsOutput) SetNextToken(v string) *ListItemsOutput { - s.NextToken = &v - return s -} - -type PutObjectInput struct { - _ struct{} `type:"structure" payload:"Body"` - - // The bytes to be stored. - // - // Body is a required field - Body io.ReadSeeker `type:"blob" required:"true"` - - // An optional CacheControl header that allows the caller to control the object's - // cache behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 - // (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9). - // - // Headers with a custom user-defined value are also accepted. - CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` - - // The content type of the object. - ContentType *string `location:"header" locationName:"Content-Type" type:"string"` - - // The path (including the file name) where the object is stored in the container. - // Format: // - // - // For example, to upload the file mlaw.avi to the folder path premium\canada - // in the container movies, enter the path premium/canada/mlaw.avi. - // - // Do not include the container name in this path. - // - // If the path includes any folders that don't exist yet, the service creates - // them. For example, suppose you have an existing premium/usa subfolder. If - // you specify premium/canada, the service creates a canada subfolder in the - // premium folder. You then have two subfolders, usa and canada, in the premium - // folder. - // - // There is no correlation between the path to the source and the path (folders) - // in the container in AWS Elemental MediaStore. - // - // For more information about folders and how they exist in a container, see - // the AWS Elemental MediaStore User Guide (http://docs.aws.amazon.com/mediastore/latest/ug/). - // - // The file name is the name that is assigned to the file that you upload. The - // file can have the same name inside and outside of AWS Elemental MediaStore, - // or it can have the same name. The file name can include or omit an extension. - // - // Path is a required field - Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"` - - // Indicates the storage class of a Put request. Defaults to high-performance - // temporal storage class, and objects are persisted into durable storage shortly - // after being received. - StorageClass *string `location:"header" locationName:"x-amz-storage-class" min:"1" type:"string" enum:"StorageClass"` -} - -// String returns the string representation -func (s PutObjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutObjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutObjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"} - if s.Body == nil { - invalidParams.Add(request.NewErrParamRequired("Body")) - } - if s.Path == nil { - invalidParams.Add(request.NewErrParamRequired("Path")) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.StorageClass != nil && len(*s.StorageClass) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StorageClass", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBody sets the Body field's value. -func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput { - s.Body = v - return s -} - -// SetCacheControl sets the CacheControl field's value. -func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput { - s.CacheControl = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *PutObjectInput) SetContentType(v string) *PutObjectInput { - s.ContentType = &v - return s -} - -// SetPath sets the Path field's value. -func (s *PutObjectInput) SetPath(v string) *PutObjectInput { - s.Path = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput { - s.StorageClass = &v - return s -} - -type PutObjectOutput struct { - _ struct{} `type:"structure"` - - // The SHA256 digest of the object that is persisted. - ContentSHA256 *string `min:"64" type:"string"` - - // Unique identifier of the object in the container. - ETag *string `min:"1" type:"string"` - - // The storage class where the object was persisted. The class should be “Temporal”. - StorageClass *string `min:"1" type:"string" enum:"StorageClass"` -} - -// String returns the string representation -func (s PutObjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutObjectOutput) GoString() string { - return s.String() -} - -// SetContentSHA256 sets the ContentSHA256 field's value. -func (s *PutObjectOutput) SetContentSHA256(v string) *PutObjectOutput { - s.ContentSHA256 = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput { - s.ETag = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *PutObjectOutput) SetStorageClass(v string) *PutObjectOutput { - s.StorageClass = &v - return s -} - -const ( - // ItemTypeObject is a ItemType enum value - ItemTypeObject = "OBJECT" - - // ItemTypeFolder is a ItemType enum value - ItemTypeFolder = "FOLDER" -) - -const ( - // StorageClassTemporal is a StorageClass enum value - StorageClassTemporal = "TEMPORAL" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/doc.go b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/doc.go deleted file mode 100644 index 2d0c4fbea..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/doc.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package mediastoredata provides the client and types for making API -// requests to AWS Elemental MediaStore Data Plane. -// -// An AWS Elemental MediaStore asset is an object, similar to an object in the -// Amazon S3 service. Objects are the fundamental entities that are stored in -// AWS Elemental MediaStore. -// -// See https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01 for more information on this service. -// -// See mediastoredata package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/mediastoredata/ -// -// Using the Client -// -// To contact AWS Elemental MediaStore Data Plane 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 Elemental MediaStore Data Plane client MediaStoreData for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/mediastoredata/#New -package mediastoredata diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/errors.go b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/errors.go deleted file mode 100644 index 95f0acdbd..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/errors.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediastoredata - -const ( - - // ErrCodeContainerNotFoundException for service response error code - // "ContainerNotFoundException". - // - // The specified container was not found for the specified account. - ErrCodeContainerNotFoundException = "ContainerNotFoundException" - - // ErrCodeInternalServerError for service response error code - // "InternalServerError". - // - // The service is temporarily unavailable. - ErrCodeInternalServerError = "InternalServerError" - - // ErrCodeObjectNotFoundException for service response error code - // "ObjectNotFoundException". - // - // Could not perform an operation on an object that does not exist. - ErrCodeObjectNotFoundException = "ObjectNotFoundException" - - // ErrCodeRequestedRangeNotSatisfiableException for service response error code - // "RequestedRangeNotSatisfiableException". - // - // The requested content range is not valid. - ErrCodeRequestedRangeNotSatisfiableException = "RequestedRangeNotSatisfiableException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go deleted file mode 100644 index 420314014..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mediastoredata - -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" -) - -// MediaStoreData provides the API operation methods for making requests to -// AWS Elemental MediaStore Data Plane. See this package's package overview docs -// for details on the service. -// -// MediaStoreData methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type MediaStoreData 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 = "data.mediastore" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "MediaStore Data" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the MediaStoreData client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a MediaStoreData client from just a session. -// svc := mediastoredata.New(mySession) -// -// // Create a MediaStoreData client with additional configuration -// svc := mediastoredata.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaStoreData { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "mediastore" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *MediaStoreData { - svc := &MediaStoreData{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-09-01", - }, - 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 MediaStoreData operation and runs any -// custom request initialization. -func (c *MediaStoreData) 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/mq/api.go b/vendor/github.com/aws/aws-sdk-go/service/mq/api.go deleted file mode 100644 index 7f030ac73..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mq/api.go +++ /dev/null @@ -1,4556 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mq - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opCreateBroker = "CreateBroker" - -// CreateBrokerRequest generates a "aws/request.Request" representing the -// client's request for the CreateBroker operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateBroker for more information on using the CreateBroker -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateBrokerRequest method. -// req, resp := client.CreateBrokerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/CreateBroker -func (c *MQ) CreateBrokerRequest(input *CreateBrokerRequest) (req *request.Request, output *CreateBrokerResponse) { - op := &request.Operation{ - Name: opCreateBroker, - HTTPMethod: "POST", - HTTPPath: "/v1/brokers", - } - - if input == nil { - input = &CreateBrokerRequest{} - } - - output = &CreateBrokerResponse{} - req = c.newRequest(op, input, output) - return -} - -// CreateBroker API operation for AmazonMQ. -// -// Creates a broker. Note: This API is asynchronous. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation CreateBroker for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeUnauthorizedException "UnauthorizedException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeConflictException "ConflictException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/CreateBroker -func (c *MQ) CreateBroker(input *CreateBrokerRequest) (*CreateBrokerResponse, error) { - req, out := c.CreateBrokerRequest(input) - return out, req.Send() -} - -// CreateBrokerWithContext is the same as CreateBroker with the addition of -// the ability to pass a context and additional request options. -// -// See CreateBroker for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) CreateBrokerWithContext(ctx aws.Context, input *CreateBrokerRequest, opts ...request.Option) (*CreateBrokerResponse, error) { - req, out := c.CreateBrokerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateConfiguration = "CreateConfiguration" - -// CreateConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the CreateConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateConfiguration for more information on using the CreateConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateConfigurationRequest method. -// req, resp := client.CreateConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/CreateConfiguration -func (c *MQ) CreateConfigurationRequest(input *CreateConfigurationRequest) (req *request.Request, output *CreateConfigurationResponse) { - op := &request.Operation{ - Name: opCreateConfiguration, - HTTPMethod: "POST", - HTTPPath: "/v1/configurations", - } - - if input == nil { - input = &CreateConfigurationRequest{} - } - - output = &CreateConfigurationResponse{} - req = c.newRequest(op, input, output) - return -} - -// CreateConfiguration API operation for AmazonMQ. -// -// Creates a new configuration for the specified configuration name. Amazon -// MQ uses the default configuration (the engine type and 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 AmazonMQ's -// API operation CreateConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeConflictException "ConflictException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/CreateConfiguration -func (c *MQ) CreateConfiguration(input *CreateConfigurationRequest) (*CreateConfigurationResponse, error) { - req, out := c.CreateConfigurationRequest(input) - return out, req.Send() -} - -// CreateConfigurationWithContext is the same as CreateConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See CreateConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) CreateConfigurationWithContext(ctx aws.Context, input *CreateConfigurationRequest, opts ...request.Option) (*CreateConfigurationResponse, error) { - req, out := c.CreateConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTags = "CreateTags" - -// CreateTagsRequest generates a "aws/request.Request" representing the -// client's request for the CreateTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTags for more information on using the CreateTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTagsRequest method. -// req, resp := client.CreateTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/CreateTags -func (c *MQ) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) { - op := &request.Operation{ - Name: opCreateTags, - HTTPMethod: "POST", - HTTPPath: "/v1/tags/{resource-arn}", - } - - if input == nil { - input = &CreateTagsInput{} - } - - output = &CreateTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateTags API operation for AmazonMQ. -// -// Add a tag to a 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 AmazonMQ's -// API operation CreateTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/CreateTags -func (c *MQ) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) { - req, out := c.CreateTagsRequest(input) - return out, req.Send() -} - -// CreateTagsWithContext is the same as CreateTags with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opts ...request.Option) (*CreateTagsOutput, error) { - req, out := c.CreateTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateUser = "CreateUser" - -// CreateUserRequest generates a "aws/request.Request" representing the -// client's request for the CreateUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateUser for more information on using the CreateUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateUserRequest method. -// req, resp := client.CreateUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/CreateUser -func (c *MQ) CreateUserRequest(input *CreateUserRequest) (req *request.Request, output *CreateUserOutput) { - op := &request.Operation{ - Name: opCreateUser, - HTTPMethod: "POST", - HTTPPath: "/v1/brokers/{broker-id}/users/{username}", - } - - if input == nil { - input = &CreateUserRequest{} - } - - output = &CreateUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateUser API operation for AmazonMQ. -// -// Creates an ActiveMQ user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation CreateUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeConflictException "ConflictException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/CreateUser -func (c *MQ) CreateUser(input *CreateUserRequest) (*CreateUserOutput, error) { - req, out := c.CreateUserRequest(input) - return out, req.Send() -} - -// CreateUserWithContext is the same as CreateUser with the addition of -// the ability to pass a context and additional request options. -// -// See CreateUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) CreateUserWithContext(ctx aws.Context, input *CreateUserRequest, opts ...request.Option) (*CreateUserOutput, error) { - req, out := c.CreateUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBroker = "DeleteBroker" - -// DeleteBrokerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBroker operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBroker for more information on using the DeleteBroker -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBrokerRequest method. -// req, resp := client.DeleteBrokerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DeleteBroker -func (c *MQ) DeleteBrokerRequest(input *DeleteBrokerInput) (req *request.Request, output *DeleteBrokerResponse) { - op := &request.Operation{ - Name: opDeleteBroker, - HTTPMethod: "DELETE", - HTTPPath: "/v1/brokers/{broker-id}", - } - - if input == nil { - input = &DeleteBrokerInput{} - } - - output = &DeleteBrokerResponse{} - req = c.newRequest(op, input, output) - return -} - -// DeleteBroker API operation for AmazonMQ. -// -// Deletes a broker. Note: This API is asynchronous. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation DeleteBroker for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DeleteBroker -func (c *MQ) DeleteBroker(input *DeleteBrokerInput) (*DeleteBrokerResponse, error) { - req, out := c.DeleteBrokerRequest(input) - return out, req.Send() -} - -// DeleteBrokerWithContext is the same as DeleteBroker with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBroker for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) DeleteBrokerWithContext(ctx aws.Context, input *DeleteBrokerInput, opts ...request.Option) (*DeleteBrokerResponse, error) { - req, out := c.DeleteBrokerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTags = "DeleteTags" - -// DeleteTagsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTags for more information on using the DeleteTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTagsRequest method. -// req, resp := client.DeleteTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DeleteTags -func (c *MQ) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { - op := &request.Operation{ - Name: opDeleteTags, - HTTPMethod: "DELETE", - HTTPPath: "/v1/tags/{resource-arn}", - } - - if input == nil { - input = &DeleteTagsInput{} - } - - output = &DeleteTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTags API operation for AmazonMQ. -// -// Remove a tag from a 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 AmazonMQ's -// API operation DeleteTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DeleteTags -func (c *MQ) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - return out, req.Send() -} - -// DeleteTagsWithContext is the same as DeleteTags with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUser = "DeleteUser" - -// DeleteUserRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUser for more information on using the DeleteUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteUserRequest method. -// req, resp := client.DeleteUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DeleteUser -func (c *MQ) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, output *DeleteUserOutput) { - op := &request.Operation{ - Name: opDeleteUser, - HTTPMethod: "DELETE", - HTTPPath: "/v1/brokers/{broker-id}/users/{username}", - } - - if input == nil { - input = &DeleteUserInput{} - } - - output = &DeleteUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUser API operation for AmazonMQ. -// -// Deletes an ActiveMQ user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation DeleteUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DeleteUser -func (c *MQ) DeleteUser(input *DeleteUserInput) (*DeleteUserOutput, error) { - req, out := c.DeleteUserRequest(input) - return out, req.Send() -} - -// DeleteUserWithContext is the same as DeleteUser with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opts ...request.Option) (*DeleteUserOutput, error) { - req, out := c.DeleteUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeBroker = "DescribeBroker" - -// DescribeBrokerRequest generates a "aws/request.Request" representing the -// client's request for the DescribeBroker operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeBroker for more information on using the DescribeBroker -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeBrokerRequest method. -// req, resp := client.DescribeBrokerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DescribeBroker -func (c *MQ) DescribeBrokerRequest(input *DescribeBrokerInput) (req *request.Request, output *DescribeBrokerResponse) { - op := &request.Operation{ - Name: opDescribeBroker, - HTTPMethod: "GET", - HTTPPath: "/v1/brokers/{broker-id}", - } - - if input == nil { - input = &DescribeBrokerInput{} - } - - output = &DescribeBrokerResponse{} - req = c.newRequest(op, input, output) - return -} - -// DescribeBroker API operation for AmazonMQ. -// -// Returns information about the specified broker. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation DescribeBroker for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DescribeBroker -func (c *MQ) DescribeBroker(input *DescribeBrokerInput) (*DescribeBrokerResponse, error) { - req, out := c.DescribeBrokerRequest(input) - return out, req.Send() -} - -// DescribeBrokerWithContext is the same as DescribeBroker with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeBroker for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) DescribeBrokerWithContext(ctx aws.Context, input *DescribeBrokerInput, opts ...request.Option) (*DescribeBrokerResponse, error) { - req, out := c.DescribeBrokerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConfiguration = "DescribeConfiguration" - -// DescribeConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConfiguration for more information on using the DescribeConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConfigurationRequest method. -// req, resp := client.DescribeConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DescribeConfiguration -func (c *MQ) DescribeConfigurationRequest(input *DescribeConfigurationInput) (req *request.Request, output *DescribeConfigurationOutput) { - op := &request.Operation{ - Name: opDescribeConfiguration, - HTTPMethod: "GET", - HTTPPath: "/v1/configurations/{configuration-id}", - } - - if input == nil { - input = &DescribeConfigurationInput{} - } - - output = &DescribeConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConfiguration API operation for AmazonMQ. -// -// Returns information about the specified configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation DescribeConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DescribeConfiguration -func (c *MQ) DescribeConfiguration(input *DescribeConfigurationInput) (*DescribeConfigurationOutput, error) { - req, out := c.DescribeConfigurationRequest(input) - return out, req.Send() -} - -// DescribeConfigurationWithContext is the same as DescribeConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) DescribeConfigurationWithContext(ctx aws.Context, input *DescribeConfigurationInput, opts ...request.Option) (*DescribeConfigurationOutput, error) { - req, out := c.DescribeConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConfigurationRevision = "DescribeConfigurationRevision" - -// DescribeConfigurationRevisionRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConfigurationRevision operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConfigurationRevision for more information on using the DescribeConfigurationRevision -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConfigurationRevisionRequest method. -// req, resp := client.DescribeConfigurationRevisionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DescribeConfigurationRevision -func (c *MQ) DescribeConfigurationRevisionRequest(input *DescribeConfigurationRevisionInput) (req *request.Request, output *DescribeConfigurationRevisionResponse) { - op := &request.Operation{ - Name: opDescribeConfigurationRevision, - HTTPMethod: "GET", - HTTPPath: "/v1/configurations/{configuration-id}/revisions/{configuration-revision}", - } - - if input == nil { - input = &DescribeConfigurationRevisionInput{} - } - - output = &DescribeConfigurationRevisionResponse{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConfigurationRevision API operation for AmazonMQ. -// -// Returns the specified configuration revision for the specified configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation DescribeConfigurationRevision for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DescribeConfigurationRevision -func (c *MQ) DescribeConfigurationRevision(input *DescribeConfigurationRevisionInput) (*DescribeConfigurationRevisionResponse, error) { - req, out := c.DescribeConfigurationRevisionRequest(input) - return out, req.Send() -} - -// DescribeConfigurationRevisionWithContext is the same as DescribeConfigurationRevision with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConfigurationRevision for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) DescribeConfigurationRevisionWithContext(ctx aws.Context, input *DescribeConfigurationRevisionInput, opts ...request.Option) (*DescribeConfigurationRevisionResponse, error) { - req, out := c.DescribeConfigurationRevisionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeUser = "DescribeUser" - -// DescribeUserRequest generates a "aws/request.Request" representing the -// client's request for the DescribeUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeUser for more information on using the DescribeUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeUserRequest method. -// req, resp := client.DescribeUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DescribeUser -func (c *MQ) DescribeUserRequest(input *DescribeUserInput) (req *request.Request, output *DescribeUserResponse) { - op := &request.Operation{ - Name: opDescribeUser, - HTTPMethod: "GET", - HTTPPath: "/v1/brokers/{broker-id}/users/{username}", - } - - if input == nil { - input = &DescribeUserInput{} - } - - output = &DescribeUserResponse{} - req = c.newRequest(op, input, output) - return -} - -// DescribeUser API operation for AmazonMQ. -// -// Returns information about an ActiveMQ user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation DescribeUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DescribeUser -func (c *MQ) DescribeUser(input *DescribeUserInput) (*DescribeUserResponse, error) { - req, out := c.DescribeUserRequest(input) - return out, req.Send() -} - -// DescribeUserWithContext is the same as DescribeUser with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) DescribeUserWithContext(ctx aws.Context, input *DescribeUserInput, opts ...request.Option) (*DescribeUserResponse, error) { - req, out := c.DescribeUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListBrokers = "ListBrokers" - -// ListBrokersRequest generates a "aws/request.Request" representing the -// client's request for the ListBrokers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListBrokers for more information on using the ListBrokers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListBrokersRequest method. -// req, resp := client.ListBrokersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListBrokers -func (c *MQ) ListBrokersRequest(input *ListBrokersInput) (req *request.Request, output *ListBrokersResponse) { - op := &request.Operation{ - Name: opListBrokers, - HTTPMethod: "GET", - HTTPPath: "/v1/brokers", - } - - if input == nil { - input = &ListBrokersInput{} - } - - output = &ListBrokersResponse{} - req = c.newRequest(op, input, output) - return -} - -// ListBrokers API operation for AmazonMQ. -// -// Returns a list of all brokers. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation ListBrokers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListBrokers -func (c *MQ) ListBrokers(input *ListBrokersInput) (*ListBrokersResponse, error) { - req, out := c.ListBrokersRequest(input) - return out, req.Send() -} - -// ListBrokersWithContext is the same as ListBrokers with the addition of -// the ability to pass a context and additional request options. -// -// See ListBrokers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) ListBrokersWithContext(ctx aws.Context, input *ListBrokersInput, opts ...request.Option) (*ListBrokersResponse, error) { - req, out := c.ListBrokersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListConfigurationRevisions = "ListConfigurationRevisions" - -// ListConfigurationRevisionsRequest generates a "aws/request.Request" representing the -// client's request for the ListConfigurationRevisions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListConfigurationRevisions for more information on using the ListConfigurationRevisions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListConfigurationRevisionsRequest method. -// req, resp := client.ListConfigurationRevisionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListConfigurationRevisions -func (c *MQ) ListConfigurationRevisionsRequest(input *ListConfigurationRevisionsInput) (req *request.Request, output *ListConfigurationRevisionsResponse) { - op := &request.Operation{ - Name: opListConfigurationRevisions, - HTTPMethod: "GET", - HTTPPath: "/v1/configurations/{configuration-id}/revisions", - } - - if input == nil { - input = &ListConfigurationRevisionsInput{} - } - - output = &ListConfigurationRevisionsResponse{} - req = c.newRequest(op, input, output) - return -} - -// ListConfigurationRevisions API operation for AmazonMQ. -// -// Returns a list of all revisions for the specified configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation ListConfigurationRevisions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListConfigurationRevisions -func (c *MQ) ListConfigurationRevisions(input *ListConfigurationRevisionsInput) (*ListConfigurationRevisionsResponse, error) { - req, out := c.ListConfigurationRevisionsRequest(input) - return out, req.Send() -} - -// ListConfigurationRevisionsWithContext is the same as ListConfigurationRevisions with the addition of -// the ability to pass a context and additional request options. -// -// See ListConfigurationRevisions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) ListConfigurationRevisionsWithContext(ctx aws.Context, input *ListConfigurationRevisionsInput, opts ...request.Option) (*ListConfigurationRevisionsResponse, error) { - req, out := c.ListConfigurationRevisionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListConfigurations = "ListConfigurations" - -// ListConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the ListConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListConfigurations for more information on using the ListConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListConfigurationsRequest method. -// req, resp := client.ListConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListConfigurations -func (c *MQ) ListConfigurationsRequest(input *ListConfigurationsInput) (req *request.Request, output *ListConfigurationsResponse) { - op := &request.Operation{ - Name: opListConfigurations, - HTTPMethod: "GET", - HTTPPath: "/v1/configurations", - } - - if input == nil { - input = &ListConfigurationsInput{} - } - - output = &ListConfigurationsResponse{} - req = c.newRequest(op, input, output) - return -} - -// ListConfigurations API operation for AmazonMQ. -// -// Returns a list of all 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 AmazonMQ's -// API operation ListConfigurations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListConfigurations -func (c *MQ) ListConfigurations(input *ListConfigurationsInput) (*ListConfigurationsResponse, error) { - req, out := c.ListConfigurationsRequest(input) - return out, req.Send() -} - -// ListConfigurationsWithContext is the same as ListConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See ListConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) ListConfigurationsWithContext(ctx aws.Context, input *ListConfigurationsInput, opts ...request.Option) (*ListConfigurationsResponse, error) { - req, out := c.ListConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTags = "ListTags" - -// ListTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTags for more information on using the ListTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsRequest method. -// req, resp := client.ListTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListTags -func (c *MQ) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { - op := &request.Operation{ - Name: opListTags, - HTTPMethod: "GET", - HTTPPath: "/v1/tags/{resource-arn}", - } - - if input == nil { - input = &ListTagsInput{} - } - - output = &ListTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTags API operation for AmazonMQ. -// -// Lists tags for a 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 AmazonMQ's -// API operation ListTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListTags -func (c *MQ) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - return out, req.Send() -} - -// ListTagsWithContext is the same as ListTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListUsers = "ListUsers" - -// ListUsersRequest generates a "aws/request.Request" representing the -// client's request for the ListUsers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListUsers for more information on using the ListUsers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListUsersRequest method. -// req, resp := client.ListUsersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListUsers -func (c *MQ) ListUsersRequest(input *ListUsersInput) (req *request.Request, output *ListUsersResponse) { - op := &request.Operation{ - Name: opListUsers, - HTTPMethod: "GET", - HTTPPath: "/v1/brokers/{broker-id}/users", - } - - if input == nil { - input = &ListUsersInput{} - } - - output = &ListUsersResponse{} - req = c.newRequest(op, input, output) - return -} - -// ListUsers API operation for AmazonMQ. -// -// Returns a list of all ActiveMQ users. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation ListUsers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListUsers -func (c *MQ) ListUsers(input *ListUsersInput) (*ListUsersResponse, error) { - req, out := c.ListUsersRequest(input) - return out, req.Send() -} - -// ListUsersWithContext is the same as ListUsers with the addition of -// the ability to pass a context and additional request options. -// -// See ListUsers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) ListUsersWithContext(ctx aws.Context, input *ListUsersInput, opts ...request.Option) (*ListUsersResponse, error) { - req, out := c.ListUsersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRebootBroker = "RebootBroker" - -// RebootBrokerRequest generates a "aws/request.Request" representing the -// client's request for the RebootBroker operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebootBroker for more information on using the RebootBroker -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebootBrokerRequest method. -// req, resp := client.RebootBrokerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/RebootBroker -func (c *MQ) RebootBrokerRequest(input *RebootBrokerInput) (req *request.Request, output *RebootBrokerOutput) { - op := &request.Operation{ - Name: opRebootBroker, - HTTPMethod: "POST", - HTTPPath: "/v1/brokers/{broker-id}/reboot", - } - - if input == nil { - input = &RebootBrokerInput{} - } - - output = &RebootBrokerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RebootBroker API operation for AmazonMQ. -// -// Reboots a broker. Note: This API is asynchronous. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation RebootBroker for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/RebootBroker -func (c *MQ) RebootBroker(input *RebootBrokerInput) (*RebootBrokerOutput, error) { - req, out := c.RebootBrokerRequest(input) - return out, req.Send() -} - -// RebootBrokerWithContext is the same as RebootBroker with the addition of -// the ability to pass a context and additional request options. -// -// See RebootBroker for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) RebootBrokerWithContext(ctx aws.Context, input *RebootBrokerInput, opts ...request.Option) (*RebootBrokerOutput, error) { - req, out := c.RebootBrokerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateBroker = "UpdateBroker" - -// UpdateBrokerRequest generates a "aws/request.Request" representing the -// client's request for the UpdateBroker operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateBroker for more information on using the UpdateBroker -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateBrokerRequest method. -// req, resp := client.UpdateBrokerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/UpdateBroker -func (c *MQ) UpdateBrokerRequest(input *UpdateBrokerRequest) (req *request.Request, output *UpdateBrokerResponse) { - op := &request.Operation{ - Name: opUpdateBroker, - HTTPMethod: "PUT", - HTTPPath: "/v1/brokers/{broker-id}", - } - - if input == nil { - input = &UpdateBrokerRequest{} - } - - output = &UpdateBrokerResponse{} - req = c.newRequest(op, input, output) - return -} - -// UpdateBroker API operation for AmazonMQ. -// -// Adds a pending configuration change to a broker. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation UpdateBroker for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeConflictException "ConflictException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/UpdateBroker -func (c *MQ) UpdateBroker(input *UpdateBrokerRequest) (*UpdateBrokerResponse, error) { - req, out := c.UpdateBrokerRequest(input) - return out, req.Send() -} - -// UpdateBrokerWithContext is the same as UpdateBroker with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateBroker for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) UpdateBrokerWithContext(ctx aws.Context, input *UpdateBrokerRequest, opts ...request.Option) (*UpdateBrokerResponse, error) { - req, out := c.UpdateBrokerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateConfiguration = "UpdateConfiguration" - -// UpdateConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateConfiguration for more information on using the UpdateConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateConfigurationRequest method. -// req, resp := client.UpdateConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/UpdateConfiguration -func (c *MQ) UpdateConfigurationRequest(input *UpdateConfigurationRequest) (req *request.Request, output *UpdateConfigurationResponse) { - op := &request.Operation{ - Name: opUpdateConfiguration, - HTTPMethod: "PUT", - HTTPPath: "/v1/configurations/{configuration-id}", - } - - if input == nil { - input = &UpdateConfigurationRequest{} - } - - output = &UpdateConfigurationResponse{} - req = c.newRequest(op, input, output) - return -} - -// UpdateConfiguration API operation for AmazonMQ. -// -// Updates the specified configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation UpdateConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeConflictException "ConflictException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/UpdateConfiguration -func (c *MQ) UpdateConfiguration(input *UpdateConfigurationRequest) (*UpdateConfigurationResponse, error) { - req, out := c.UpdateConfigurationRequest(input) - return out, req.Send() -} - -// UpdateConfigurationWithContext is the same as UpdateConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) UpdateConfigurationWithContext(ctx aws.Context, input *UpdateConfigurationRequest, opts ...request.Option) (*UpdateConfigurationResponse, error) { - req, out := c.UpdateConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateUser = "UpdateUser" - -// UpdateUserRequest generates a "aws/request.Request" representing the -// client's request for the UpdateUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateUser for more information on using the UpdateUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateUserRequest method. -// req, resp := client.UpdateUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/UpdateUser -func (c *MQ) UpdateUserRequest(input *UpdateUserRequest) (req *request.Request, output *UpdateUserOutput) { - op := &request.Operation{ - Name: opUpdateUser, - HTTPMethod: "PUT", - HTTPPath: "/v1/brokers/{broker-id}/users/{username}", - } - - if input == nil { - input = &UpdateUserRequest{} - } - - output = &UpdateUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateUser API operation for AmazonMQ. -// -// Updates the information for an ActiveMQ user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AmazonMQ's -// API operation UpdateUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// Returns information about an error. -// -// * ErrCodeBadRequestException "BadRequestException" -// Returns information about an error. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Returns information about an error. -// -// * ErrCodeConflictException "ConflictException" -// Returns information about an error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Returns information about an error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/UpdateUser -func (c *MQ) UpdateUser(input *UpdateUserRequest) (*UpdateUserOutput, error) { - req, out := c.UpdateUserRequest(input) - return out, req.Send() -} - -// UpdateUserWithContext is the same as UpdateUser with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *MQ) UpdateUserWithContext(ctx aws.Context, input *UpdateUserRequest, opts ...request.Option) (*UpdateUserOutput, error) { - req, out := c.UpdateUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Returns information about all brokers. -type BrokerInstance struct { - _ struct{} `type:"structure"` - - // The URL of the broker's ActiveMQ Web Console. - ConsoleURL *string `locationName:"consoleURL" type:"string"` - - // The broker's wire-level protocol endpoints. - Endpoints []*string `locationName:"endpoints" type:"list"` - - // The IP address of the Elastic Network Interface (ENI) attached to the broker. - IpAddress *string `locationName:"ipAddress" type:"string"` -} - -// String returns the string representation -func (s BrokerInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BrokerInstance) GoString() string { - return s.String() -} - -// SetConsoleURL sets the ConsoleURL field's value. -func (s *BrokerInstance) SetConsoleURL(v string) *BrokerInstance { - s.ConsoleURL = &v - return s -} - -// SetEndpoints sets the Endpoints field's value. -func (s *BrokerInstance) SetEndpoints(v []*string) *BrokerInstance { - s.Endpoints = v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *BrokerInstance) SetIpAddress(v string) *BrokerInstance { - s.IpAddress = &v - return s -} - -// The Amazon Resource Name (ARN) of the broker. -type BrokerSummary struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the broker. - BrokerArn *string `locationName:"brokerArn" type:"string"` - - // The unique ID that Amazon MQ generates for the broker. - BrokerId *string `locationName:"brokerId" type:"string"` - - // The name of the broker. This value must be unique in your AWS account, 1-50 - // characters long, must contain only letters, numbers, dashes, and underscores, - // and must not contain whitespaces, brackets, wildcard characters, or special - // characters. - BrokerName *string `locationName:"brokerName" type:"string"` - - // The status of the broker. - BrokerState *string `locationName:"brokerState" type:"string" enum:"BrokerState"` - - // The time when the broker was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` - - // Required. The deployment mode of the broker. - DeploymentMode *string `locationName:"deploymentMode" type:"string" enum:"DeploymentMode"` - - // The broker's instance type. - HostInstanceType *string `locationName:"hostInstanceType" type:"string"` -} - -// String returns the string representation -func (s BrokerSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BrokerSummary) GoString() string { - return s.String() -} - -// SetBrokerArn sets the BrokerArn field's value. -func (s *BrokerSummary) SetBrokerArn(v string) *BrokerSummary { - s.BrokerArn = &v - return s -} - -// SetBrokerId sets the BrokerId field's value. -func (s *BrokerSummary) SetBrokerId(v string) *BrokerSummary { - s.BrokerId = &v - return s -} - -// SetBrokerName sets the BrokerName field's value. -func (s *BrokerSummary) SetBrokerName(v string) *BrokerSummary { - s.BrokerName = &v - return s -} - -// SetBrokerState sets the BrokerState field's value. -func (s *BrokerSummary) SetBrokerState(v string) *BrokerSummary { - s.BrokerState = &v - return s -} - -// SetCreated sets the Created field's value. -func (s *BrokerSummary) SetCreated(v time.Time) *BrokerSummary { - s.Created = &v - return s -} - -// SetDeploymentMode sets the DeploymentMode field's value. -func (s *BrokerSummary) SetDeploymentMode(v string) *BrokerSummary { - s.DeploymentMode = &v - return s -} - -// SetHostInstanceType sets the HostInstanceType field's value. -func (s *BrokerSummary) SetHostInstanceType(v string) *BrokerSummary { - s.HostInstanceType = &v - return s -} - -// Returns information about all configurations. -type Configuration struct { - _ struct{} `type:"structure"` - - // Required. The ARN of the configuration. - Arn *string `locationName:"arn" type:"string"` - - // Required. The date and time of the configuration revision. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` - - // Required. The description of the configuration. - Description *string `locationName:"description" type:"string"` - - // Required. The type of broker engine. Note: Currently, Amazon MQ supports - // only ACTIVEMQ. - EngineType *string `locationName:"engineType" type:"string" enum:"EngineType"` - - // Required. The version of the broker engine. For a list of supported engine - // versions, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html - EngineVersion *string `locationName:"engineVersion" type:"string"` - - // Required. The unique ID that Amazon MQ generates for the configuration. - Id *string `locationName:"id" type:"string"` - - // Required. The latest revision of the configuration. - LatestRevision *ConfigurationRevision `locationName:"latestRevision" type:"structure"` - - // Required. The name of the configuration. This value can contain only alphanumeric - // characters, dashes, periods, underscores, and tildes (- . _ ~). This value - // must be 1-150 characters long. - Name *string `locationName:"name" type:"string"` - - // The list of all tags associated with this configuration. - Tags map[string]*string `locationName:"tags" type:"map"` -} - -// String returns the string representation -func (s Configuration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Configuration) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Configuration) SetArn(v string) *Configuration { - s.Arn = &v - return s -} - -// SetCreated sets the Created field's value. -func (s *Configuration) SetCreated(v time.Time) *Configuration { - s.Created = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Configuration) SetDescription(v string) *Configuration { - s.Description = &v - return s -} - -// SetEngineType sets the EngineType field's value. -func (s *Configuration) SetEngineType(v string) *Configuration { - s.EngineType = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *Configuration) SetEngineVersion(v string) *Configuration { - s.EngineVersion = &v - return s -} - -// SetId sets the Id field's value. -func (s *Configuration) SetId(v string) *Configuration { - s.Id = &v - return s -} - -// SetLatestRevision sets the LatestRevision field's value. -func (s *Configuration) SetLatestRevision(v *ConfigurationRevision) *Configuration { - s.LatestRevision = v - return s -} - -// SetName sets the Name field's value. -func (s *Configuration) SetName(v string) *Configuration { - s.Name = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Configuration) SetTags(v map[string]*string) *Configuration { - s.Tags = v - return s -} - -// A list of information about the configuration. -type ConfigurationId struct { - _ struct{} `type:"structure"` - - // Required. The unique ID that Amazon MQ generates for the configuration. - Id *string `locationName:"id" type:"string"` - - // The revision number of the configuration. - Revision *int64 `locationName:"revision" type:"integer"` -} - -// String returns the string representation -func (s ConfigurationId) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigurationId) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *ConfigurationId) SetId(v string) *ConfigurationId { - s.Id = &v - return s -} - -// SetRevision sets the Revision field's value. -func (s *ConfigurationId) SetRevision(v int64) *ConfigurationId { - s.Revision = &v - return s -} - -// Returns information about the specified configuration revision. -type ConfigurationRevision struct { - _ struct{} `type:"structure"` - - // Required. The date and time of the configuration revision. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` - - // The description of the configuration revision. - Description *string `locationName:"description" type:"string"` - - // Required. The revision number of the configuration. - Revision *int64 `locationName:"revision" type:"integer"` -} - -// String returns the string representation -func (s ConfigurationRevision) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigurationRevision) GoString() string { - return s.String() -} - -// SetCreated sets the Created field's value. -func (s *ConfigurationRevision) SetCreated(v time.Time) *ConfigurationRevision { - s.Created = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ConfigurationRevision) SetDescription(v string) *ConfigurationRevision { - s.Description = &v - return s -} - -// SetRevision sets the Revision field's value. -func (s *ConfigurationRevision) SetRevision(v int64) *ConfigurationRevision { - s.Revision = &v - return s -} - -// Broker configuration information -type Configurations struct { - _ struct{} `type:"structure"` - - // The current configuration of the broker. - Current *ConfigurationId `locationName:"current" type:"structure"` - - // The history of configurations applied to the broker. - History []*ConfigurationId `locationName:"history" type:"list"` - - // The pending configuration of the broker. - Pending *ConfigurationId `locationName:"pending" type:"structure"` -} - -// String returns the string representation -func (s Configurations) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Configurations) GoString() string { - return s.String() -} - -// SetCurrent sets the Current field's value. -func (s *Configurations) SetCurrent(v *ConfigurationId) *Configurations { - s.Current = v - return s -} - -// SetHistory sets the History field's value. -func (s *Configurations) SetHistory(v []*ConfigurationId) *Configurations { - s.History = v - return s -} - -// SetPending sets the Pending field's value. -func (s *Configurations) SetPending(v *ConfigurationId) *Configurations { - s.Pending = v - return s -} - -type CreateBrokerRequest struct { - _ struct{} `type:"structure"` - - AutoMinorVersionUpgrade *bool `locationName:"autoMinorVersionUpgrade" type:"boolean"` - - BrokerName *string `locationName:"brokerName" type:"string"` - - // A list of information about the configuration. - Configuration *ConfigurationId `locationName:"configuration" type:"structure"` - - CreatorRequestId *string `locationName:"creatorRequestId" type:"string" idempotencyToken:"true"` - - // The deployment mode of the broker. - DeploymentMode *string `locationName:"deploymentMode" type:"string" enum:"DeploymentMode"` - - // The type of broker engine. Note: Currently, Amazon MQ supports only ActiveMQ. - EngineType *string `locationName:"engineType" type:"string" enum:"EngineType"` - - EngineVersion *string `locationName:"engineVersion" type:"string"` - - HostInstanceType *string `locationName:"hostInstanceType" type:"string"` - - // The list of information about logs to be enabled for the specified broker. - Logs *Logs `locationName:"logs" type:"structure"` - - // The scheduled time period relative to UTC during which Amazon MQ begins to - // apply pending updates or patches to the broker. - MaintenanceWindowStartTime *WeeklyStartTime `locationName:"maintenanceWindowStartTime" type:"structure"` - - PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` - - SecurityGroups []*string `locationName:"securityGroups" type:"list"` - - SubnetIds []*string `locationName:"subnetIds" type:"list"` - - Tags map[string]*string `locationName:"tags" type:"map"` - - Users []*User `locationName:"users" type:"list"` -} - -// String returns the string representation -func (s CreateBrokerRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBrokerRequest) GoString() string { - return s.String() -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *CreateBrokerRequest) SetAutoMinorVersionUpgrade(v bool) *CreateBrokerRequest { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetBrokerName sets the BrokerName field's value. -func (s *CreateBrokerRequest) SetBrokerName(v string) *CreateBrokerRequest { - s.BrokerName = &v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *CreateBrokerRequest) SetConfiguration(v *ConfigurationId) *CreateBrokerRequest { - s.Configuration = v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *CreateBrokerRequest) SetCreatorRequestId(v string) *CreateBrokerRequest { - s.CreatorRequestId = &v - return s -} - -// SetDeploymentMode sets the DeploymentMode field's value. -func (s *CreateBrokerRequest) SetDeploymentMode(v string) *CreateBrokerRequest { - s.DeploymentMode = &v - return s -} - -// SetEngineType sets the EngineType field's value. -func (s *CreateBrokerRequest) SetEngineType(v string) *CreateBrokerRequest { - s.EngineType = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *CreateBrokerRequest) SetEngineVersion(v string) *CreateBrokerRequest { - s.EngineVersion = &v - return s -} - -// SetHostInstanceType sets the HostInstanceType field's value. -func (s *CreateBrokerRequest) SetHostInstanceType(v string) *CreateBrokerRequest { - s.HostInstanceType = &v - return s -} - -// SetLogs sets the Logs field's value. -func (s *CreateBrokerRequest) SetLogs(v *Logs) *CreateBrokerRequest { - s.Logs = v - return s -} - -// SetMaintenanceWindowStartTime sets the MaintenanceWindowStartTime field's value. -func (s *CreateBrokerRequest) SetMaintenanceWindowStartTime(v *WeeklyStartTime) *CreateBrokerRequest { - s.MaintenanceWindowStartTime = v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *CreateBrokerRequest) SetPubliclyAccessible(v bool) *CreateBrokerRequest { - s.PubliclyAccessible = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *CreateBrokerRequest) SetSecurityGroups(v []*string) *CreateBrokerRequest { - s.SecurityGroups = v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateBrokerRequest) SetSubnetIds(v []*string) *CreateBrokerRequest { - s.SubnetIds = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateBrokerRequest) SetTags(v map[string]*string) *CreateBrokerRequest { - s.Tags = v - return s -} - -// SetUsers sets the Users field's value. -func (s *CreateBrokerRequest) SetUsers(v []*User) *CreateBrokerRequest { - s.Users = v - return s -} - -type CreateBrokerResponse struct { - _ struct{} `type:"structure"` - - BrokerArn *string `locationName:"brokerArn" type:"string"` - - BrokerId *string `locationName:"brokerId" type:"string"` -} - -// String returns the string representation -func (s CreateBrokerResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateBrokerResponse) GoString() string { - return s.String() -} - -// SetBrokerArn sets the BrokerArn field's value. -func (s *CreateBrokerResponse) SetBrokerArn(v string) *CreateBrokerResponse { - s.BrokerArn = &v - return s -} - -// SetBrokerId sets the BrokerId field's value. -func (s *CreateBrokerResponse) SetBrokerId(v string) *CreateBrokerResponse { - s.BrokerId = &v - return s -} - -type CreateConfigurationRequest struct { - _ struct{} `type:"structure"` - - // The type of broker engine. Note: Currently, Amazon MQ supports only ActiveMQ. - EngineType *string `locationName:"engineType" type:"string" enum:"EngineType"` - - EngineVersion *string `locationName:"engineVersion" type:"string"` - - Name *string `locationName:"name" type:"string"` - - Tags map[string]*string `locationName:"tags" type:"map"` -} - -// String returns the string representation -func (s CreateConfigurationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConfigurationRequest) GoString() string { - return s.String() -} - -// SetEngineType sets the EngineType field's value. -func (s *CreateConfigurationRequest) SetEngineType(v string) *CreateConfigurationRequest { - s.EngineType = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *CreateConfigurationRequest) SetEngineVersion(v string) *CreateConfigurationRequest { - s.EngineVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateConfigurationRequest) SetName(v string) *CreateConfigurationRequest { - s.Name = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateConfigurationRequest) SetTags(v map[string]*string) *CreateConfigurationRequest { - s.Tags = v - return s -} - -type CreateConfigurationResponse struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` - - Id *string `locationName:"id" type:"string"` - - // Returns information about the specified configuration revision. - LatestRevision *ConfigurationRevision `locationName:"latestRevision" type:"structure"` - - Name *string `locationName:"name" type:"string"` -} - -// String returns the string representation -func (s CreateConfigurationResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConfigurationResponse) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *CreateConfigurationResponse) SetArn(v string) *CreateConfigurationResponse { - s.Arn = &v - return s -} - -// SetCreated sets the Created field's value. -func (s *CreateConfigurationResponse) SetCreated(v time.Time) *CreateConfigurationResponse { - s.Created = &v - return s -} - -// SetId sets the Id field's value. -func (s *CreateConfigurationResponse) SetId(v string) *CreateConfigurationResponse { - s.Id = &v - return s -} - -// SetLatestRevision sets the LatestRevision field's value. -func (s *CreateConfigurationResponse) SetLatestRevision(v *ConfigurationRevision) *CreateConfigurationResponse { - s.LatestRevision = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateConfigurationResponse) SetName(v string) *CreateConfigurationResponse { - s.Name = &v - return s -} - -type CreateTagsInput struct { - _ struct{} `type:"structure"` - - // ResourceArn is a required field - ResourceArn *string `location:"uri" locationName:"resource-arn" type:"string" required:"true"` - - Tags map[string]*string `locationName:"tags" type:"map"` -} - -// String returns the string representation -func (s CreateTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"} - 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 *CreateTagsInput) SetResourceArn(v string) *CreateTagsInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateTagsInput) SetTags(v map[string]*string) *CreateTagsInput { - s.Tags = v - return s -} - -type CreateTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTagsOutput) GoString() string { - return s.String() -} - -type CreateUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserOutput) GoString() string { - return s.String() -} - -type CreateUserRequest struct { - _ struct{} `type:"structure"` - - // BrokerId is a required field - BrokerId *string `location:"uri" locationName:"broker-id" type:"string" required:"true"` - - ConsoleAccess *bool `locationName:"consoleAccess" type:"boolean"` - - Groups []*string `locationName:"groups" type:"list"` - - Password *string `locationName:"password" type:"string"` - - // Username is a required field - Username *string `location:"uri" locationName:"username" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateUserRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateUserRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateUserRequest"} - if s.BrokerId == nil { - invalidParams.Add(request.NewErrParamRequired("BrokerId")) - } - if s.BrokerId != nil && len(*s.BrokerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBrokerId sets the BrokerId field's value. -func (s *CreateUserRequest) SetBrokerId(v string) *CreateUserRequest { - s.BrokerId = &v - return s -} - -// SetConsoleAccess sets the ConsoleAccess field's value. -func (s *CreateUserRequest) SetConsoleAccess(v bool) *CreateUserRequest { - s.ConsoleAccess = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *CreateUserRequest) SetGroups(v []*string) *CreateUserRequest { - s.Groups = v - return s -} - -// SetPassword sets the Password field's value. -func (s *CreateUserRequest) SetPassword(v string) *CreateUserRequest { - s.Password = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *CreateUserRequest) SetUsername(v string) *CreateUserRequest { - s.Username = &v - return s -} - -type DeleteBrokerInput struct { - _ struct{} `type:"structure"` - - // BrokerId is a required field - BrokerId *string `location:"uri" locationName:"broker-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBrokerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBrokerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBrokerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBrokerInput"} - if s.BrokerId == nil { - invalidParams.Add(request.NewErrParamRequired("BrokerId")) - } - if s.BrokerId != nil && len(*s.BrokerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBrokerId sets the BrokerId field's value. -func (s *DeleteBrokerInput) SetBrokerId(v string) *DeleteBrokerInput { - s.BrokerId = &v - return s -} - -type DeleteBrokerResponse struct { - _ struct{} `type:"structure"` - - BrokerId *string `locationName:"brokerId" type:"string"` -} - -// String returns the string representation -func (s DeleteBrokerResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBrokerResponse) GoString() string { - return s.String() -} - -// SetBrokerId sets the BrokerId field's value. -func (s *DeleteBrokerResponse) SetBrokerId(v string) *DeleteBrokerResponse { - s.BrokerId = &v - return s -} - -type DeleteTagsInput 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 DeleteTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} - 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 *DeleteTagsInput) SetResourceArn(v string) *DeleteTagsInput { - s.ResourceArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput { - s.TagKeys = v - return s -} - -type DeleteTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagsOutput) GoString() string { - return s.String() -} - -type DeleteUserInput struct { - _ struct{} `type:"structure"` - - // BrokerId is a required field - BrokerId *string `location:"uri" locationName:"broker-id" type:"string" required:"true"` - - // Username is a required field - Username *string `location:"uri" locationName:"username" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserInput"} - if s.BrokerId == nil { - invalidParams.Add(request.NewErrParamRequired("BrokerId")) - } - if s.BrokerId != nil && len(*s.BrokerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBrokerId sets the BrokerId field's value. -func (s *DeleteUserInput) SetBrokerId(v string) *DeleteUserInput { - s.BrokerId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *DeleteUserInput) SetUsername(v string) *DeleteUserInput { - s.Username = &v - return s -} - -type DeleteUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserOutput) GoString() string { - return s.String() -} - -type DescribeBrokerInput struct { - _ struct{} `type:"structure"` - - // BrokerId is a required field - BrokerId *string `location:"uri" locationName:"broker-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeBrokerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBrokerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeBrokerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeBrokerInput"} - if s.BrokerId == nil { - invalidParams.Add(request.NewErrParamRequired("BrokerId")) - } - if s.BrokerId != nil && len(*s.BrokerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBrokerId sets the BrokerId field's value. -func (s *DescribeBrokerInput) SetBrokerId(v string) *DescribeBrokerInput { - s.BrokerId = &v - return s -} - -type DescribeBrokerResponse struct { - _ struct{} `type:"structure"` - - AutoMinorVersionUpgrade *bool `locationName:"autoMinorVersionUpgrade" type:"boolean"` - - BrokerArn *string `locationName:"brokerArn" type:"string"` - - BrokerId *string `locationName:"brokerId" type:"string"` - - BrokerInstances []*BrokerInstance `locationName:"brokerInstances" type:"list"` - - BrokerName *string `locationName:"brokerName" type:"string"` - - // The status of the broker. - BrokerState *string `locationName:"brokerState" type:"string" enum:"BrokerState"` - - // Broker configuration information - Configurations *Configurations `locationName:"configurations" type:"structure"` - - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` - - // The deployment mode of the broker. - DeploymentMode *string `locationName:"deploymentMode" type:"string" enum:"DeploymentMode"` - - // The type of broker engine. Note: Currently, Amazon MQ supports only ActiveMQ. - EngineType *string `locationName:"engineType" type:"string" enum:"EngineType"` - - EngineVersion *string `locationName:"engineVersion" type:"string"` - - HostInstanceType *string `locationName:"hostInstanceType" type:"string"` - - // The list of information about logs currently enabled and pending to be deployed - // for the specified broker. - Logs *LogsSummary `locationName:"logs" type:"structure"` - - // The scheduled time period relative to UTC during which Amazon MQ begins to - // apply pending updates or patches to the broker. - MaintenanceWindowStartTime *WeeklyStartTime `locationName:"maintenanceWindowStartTime" type:"structure"` - - PendingEngineVersion *string `locationName:"pendingEngineVersion" type:"string"` - - PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` - - SecurityGroups []*string `locationName:"securityGroups" type:"list"` - - SubnetIds []*string `locationName:"subnetIds" type:"list"` - - Tags map[string]*string `locationName:"tags" type:"map"` - - Users []*UserSummary `locationName:"users" type:"list"` -} - -// String returns the string representation -func (s DescribeBrokerResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBrokerResponse) GoString() string { - return s.String() -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *DescribeBrokerResponse) SetAutoMinorVersionUpgrade(v bool) *DescribeBrokerResponse { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetBrokerArn sets the BrokerArn field's value. -func (s *DescribeBrokerResponse) SetBrokerArn(v string) *DescribeBrokerResponse { - s.BrokerArn = &v - return s -} - -// SetBrokerId sets the BrokerId field's value. -func (s *DescribeBrokerResponse) SetBrokerId(v string) *DescribeBrokerResponse { - s.BrokerId = &v - return s -} - -// SetBrokerInstances sets the BrokerInstances field's value. -func (s *DescribeBrokerResponse) SetBrokerInstances(v []*BrokerInstance) *DescribeBrokerResponse { - s.BrokerInstances = v - return s -} - -// SetBrokerName sets the BrokerName field's value. -func (s *DescribeBrokerResponse) SetBrokerName(v string) *DescribeBrokerResponse { - s.BrokerName = &v - return s -} - -// SetBrokerState sets the BrokerState field's value. -func (s *DescribeBrokerResponse) SetBrokerState(v string) *DescribeBrokerResponse { - s.BrokerState = &v - return s -} - -// SetConfigurations sets the Configurations field's value. -func (s *DescribeBrokerResponse) SetConfigurations(v *Configurations) *DescribeBrokerResponse { - s.Configurations = v - return s -} - -// SetCreated sets the Created field's value. -func (s *DescribeBrokerResponse) SetCreated(v time.Time) *DescribeBrokerResponse { - s.Created = &v - return s -} - -// SetDeploymentMode sets the DeploymentMode field's value. -func (s *DescribeBrokerResponse) SetDeploymentMode(v string) *DescribeBrokerResponse { - s.DeploymentMode = &v - return s -} - -// SetEngineType sets the EngineType field's value. -func (s *DescribeBrokerResponse) SetEngineType(v string) *DescribeBrokerResponse { - s.EngineType = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DescribeBrokerResponse) SetEngineVersion(v string) *DescribeBrokerResponse { - s.EngineVersion = &v - return s -} - -// SetHostInstanceType sets the HostInstanceType field's value. -func (s *DescribeBrokerResponse) SetHostInstanceType(v string) *DescribeBrokerResponse { - s.HostInstanceType = &v - return s -} - -// SetLogs sets the Logs field's value. -func (s *DescribeBrokerResponse) SetLogs(v *LogsSummary) *DescribeBrokerResponse { - s.Logs = v - return s -} - -// SetMaintenanceWindowStartTime sets the MaintenanceWindowStartTime field's value. -func (s *DescribeBrokerResponse) SetMaintenanceWindowStartTime(v *WeeklyStartTime) *DescribeBrokerResponse { - s.MaintenanceWindowStartTime = v - return s -} - -// SetPendingEngineVersion sets the PendingEngineVersion field's value. -func (s *DescribeBrokerResponse) SetPendingEngineVersion(v string) *DescribeBrokerResponse { - s.PendingEngineVersion = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *DescribeBrokerResponse) SetPubliclyAccessible(v bool) *DescribeBrokerResponse { - s.PubliclyAccessible = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *DescribeBrokerResponse) SetSecurityGroups(v []*string) *DescribeBrokerResponse { - s.SecurityGroups = v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *DescribeBrokerResponse) SetSubnetIds(v []*string) *DescribeBrokerResponse { - s.SubnetIds = v - return s -} - -// SetTags sets the Tags field's value. -func (s *DescribeBrokerResponse) SetTags(v map[string]*string) *DescribeBrokerResponse { - s.Tags = v - return s -} - -// SetUsers sets the Users field's value. -func (s *DescribeBrokerResponse) SetUsers(v []*UserSummary) *DescribeBrokerResponse { - s.Users = v - return s -} - -type DescribeConfigurationInput struct { - _ struct{} `type:"structure"` - - // ConfigurationId is a required field - ConfigurationId *string `location:"uri" locationName:"configuration-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeConfigurationInput"} - if s.ConfigurationId == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationId")) - } - if s.ConfigurationId != nil && len(*s.ConfigurationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationId sets the ConfigurationId field's value. -func (s *DescribeConfigurationInput) SetConfigurationId(v string) *DescribeConfigurationInput { - s.ConfigurationId = &v - return s -} - -type DescribeConfigurationOutput struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` - - Description *string `locationName:"description" type:"string"` - - // The type of broker engine. Note: Currently, Amazon MQ supports only ActiveMQ. - EngineType *string `locationName:"engineType" type:"string" enum:"EngineType"` - - EngineVersion *string `locationName:"engineVersion" type:"string"` - - Id *string `locationName:"id" type:"string"` - - // Returns information about the specified configuration revision. - LatestRevision *ConfigurationRevision `locationName:"latestRevision" type:"structure"` - - Name *string `locationName:"name" type:"string"` - - Tags map[string]*string `locationName:"tags" type:"map"` -} - -// String returns the string representation -func (s DescribeConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DescribeConfigurationOutput) SetArn(v string) *DescribeConfigurationOutput { - s.Arn = &v - return s -} - -// SetCreated sets the Created field's value. -func (s *DescribeConfigurationOutput) SetCreated(v time.Time) *DescribeConfigurationOutput { - s.Created = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DescribeConfigurationOutput) SetDescription(v string) *DescribeConfigurationOutput { - s.Description = &v - return s -} - -// SetEngineType sets the EngineType field's value. -func (s *DescribeConfigurationOutput) SetEngineType(v string) *DescribeConfigurationOutput { - s.EngineType = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DescribeConfigurationOutput) SetEngineVersion(v string) *DescribeConfigurationOutput { - s.EngineVersion = &v - return s -} - -// SetId sets the Id field's value. -func (s *DescribeConfigurationOutput) SetId(v string) *DescribeConfigurationOutput { - s.Id = &v - return s -} - -// SetLatestRevision sets the LatestRevision field's value. -func (s *DescribeConfigurationOutput) SetLatestRevision(v *ConfigurationRevision) *DescribeConfigurationOutput { - s.LatestRevision = v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeConfigurationOutput) SetName(v string) *DescribeConfigurationOutput { - s.Name = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *DescribeConfigurationOutput) SetTags(v map[string]*string) *DescribeConfigurationOutput { - s.Tags = v - return s -} - -type DescribeConfigurationRevisionInput struct { - _ struct{} `type:"structure"` - - // ConfigurationId is a required field - ConfigurationId *string `location:"uri" locationName:"configuration-id" type:"string" required:"true"` - - // ConfigurationRevision is a required field - ConfigurationRevision *string `location:"uri" locationName:"configuration-revision" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeConfigurationRevisionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationRevisionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeConfigurationRevisionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeConfigurationRevisionInput"} - if s.ConfigurationId == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationId")) - } - if s.ConfigurationId != nil && len(*s.ConfigurationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationId", 1)) - } - if s.ConfigurationRevision == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationRevision")) - } - if s.ConfigurationRevision != nil && len(*s.ConfigurationRevision) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationRevision", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationId sets the ConfigurationId field's value. -func (s *DescribeConfigurationRevisionInput) SetConfigurationId(v string) *DescribeConfigurationRevisionInput { - s.ConfigurationId = &v - return s -} - -// SetConfigurationRevision sets the ConfigurationRevision field's value. -func (s *DescribeConfigurationRevisionInput) SetConfigurationRevision(v string) *DescribeConfigurationRevisionInput { - s.ConfigurationRevision = &v - return s -} - -type DescribeConfigurationRevisionResponse struct { - _ struct{} `type:"structure"` - - ConfigurationId *string `locationName:"configurationId" type:"string"` - - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` - - Data *string `locationName:"data" type:"string"` - - Description *string `locationName:"description" type:"string"` -} - -// String returns the string representation -func (s DescribeConfigurationRevisionResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationRevisionResponse) GoString() string { - return s.String() -} - -// SetConfigurationId sets the ConfigurationId field's value. -func (s *DescribeConfigurationRevisionResponse) SetConfigurationId(v string) *DescribeConfigurationRevisionResponse { - s.ConfigurationId = &v - return s -} - -// SetCreated sets the Created field's value. -func (s *DescribeConfigurationRevisionResponse) SetCreated(v time.Time) *DescribeConfigurationRevisionResponse { - s.Created = &v - return s -} - -// SetData sets the Data field's value. -func (s *DescribeConfigurationRevisionResponse) SetData(v string) *DescribeConfigurationRevisionResponse { - s.Data = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DescribeConfigurationRevisionResponse) SetDescription(v string) *DescribeConfigurationRevisionResponse { - s.Description = &v - return s -} - -type DescribeUserInput struct { - _ struct{} `type:"structure"` - - // BrokerId is a required field - BrokerId *string `location:"uri" locationName:"broker-id" type:"string" required:"true"` - - // Username is a required field - Username *string `location:"uri" locationName:"username" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeUserInput"} - if s.BrokerId == nil { - invalidParams.Add(request.NewErrParamRequired("BrokerId")) - } - if s.BrokerId != nil && len(*s.BrokerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBrokerId sets the BrokerId field's value. -func (s *DescribeUserInput) SetBrokerId(v string) *DescribeUserInput { - s.BrokerId = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *DescribeUserInput) SetUsername(v string) *DescribeUserInput { - s.Username = &v - return s -} - -type DescribeUserResponse struct { - _ struct{} `type:"structure"` - - BrokerId *string `locationName:"brokerId" type:"string"` - - ConsoleAccess *bool `locationName:"consoleAccess" type:"boolean"` - - Groups []*string `locationName:"groups" type:"list"` - - // Returns information about the status of the changes pending for the ActiveMQ - // user. - Pending *UserPendingChanges `locationName:"pending" type:"structure"` - - Username *string `locationName:"username" type:"string"` -} - -// String returns the string representation -func (s DescribeUserResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUserResponse) GoString() string { - return s.String() -} - -// SetBrokerId sets the BrokerId field's value. -func (s *DescribeUserResponse) SetBrokerId(v string) *DescribeUserResponse { - s.BrokerId = &v - return s -} - -// SetConsoleAccess sets the ConsoleAccess field's value. -func (s *DescribeUserResponse) SetConsoleAccess(v bool) *DescribeUserResponse { - s.ConsoleAccess = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *DescribeUserResponse) SetGroups(v []*string) *DescribeUserResponse { - s.Groups = v - return s -} - -// SetPending sets the Pending field's value. -func (s *DescribeUserResponse) SetPending(v *UserPendingChanges) *DescribeUserResponse { - s.Pending = v - return s -} - -// SetUsername sets the Username field's value. -func (s *DescribeUserResponse) SetUsername(v string) *DescribeUserResponse { - s.Username = &v - return s -} - -type ListBrokersInput struct { - _ struct{} `type:"structure"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListBrokersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBrokersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBrokersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBrokersInput"} - 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 *ListBrokersInput) SetMaxResults(v int64) *ListBrokersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBrokersInput) SetNextToken(v string) *ListBrokersInput { - s.NextToken = &v - return s -} - -type ListBrokersResponse struct { - _ struct{} `type:"structure"` - - BrokerSummaries []*BrokerSummary `locationName:"brokerSummaries" type:"list"` - - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListBrokersResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListBrokersResponse) GoString() string { - return s.String() -} - -// SetBrokerSummaries sets the BrokerSummaries field's value. -func (s *ListBrokersResponse) SetBrokerSummaries(v []*BrokerSummary) *ListBrokersResponse { - s.BrokerSummaries = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListBrokersResponse) SetNextToken(v string) *ListBrokersResponse { - s.NextToken = &v - return s -} - -type ListConfigurationRevisionsInput struct { - _ struct{} `type:"structure"` - - // ConfigurationId is a required field - ConfigurationId *string `location:"uri" locationName:"configuration-id" type:"string" required:"true"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListConfigurationRevisionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListConfigurationRevisionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListConfigurationRevisionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListConfigurationRevisionsInput"} - if s.ConfigurationId == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationId")) - } - if s.ConfigurationId != nil && len(*s.ConfigurationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationId sets the ConfigurationId field's value. -func (s *ListConfigurationRevisionsInput) SetConfigurationId(v string) *ListConfigurationRevisionsInput { - s.ConfigurationId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListConfigurationRevisionsInput) SetMaxResults(v int64) *ListConfigurationRevisionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListConfigurationRevisionsInput) SetNextToken(v string) *ListConfigurationRevisionsInput { - s.NextToken = &v - return s -} - -type ListConfigurationRevisionsResponse struct { - _ struct{} `type:"structure"` - - ConfigurationId *string `locationName:"configurationId" type:"string"` - - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - NextToken *string `locationName:"nextToken" type:"string"` - - Revisions []*ConfigurationRevision `locationName:"revisions" type:"list"` -} - -// String returns the string representation -func (s ListConfigurationRevisionsResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListConfigurationRevisionsResponse) GoString() string { - return s.String() -} - -// SetConfigurationId sets the ConfigurationId field's value. -func (s *ListConfigurationRevisionsResponse) SetConfigurationId(v string) *ListConfigurationRevisionsResponse { - s.ConfigurationId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListConfigurationRevisionsResponse) SetMaxResults(v int64) *ListConfigurationRevisionsResponse { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListConfigurationRevisionsResponse) SetNextToken(v string) *ListConfigurationRevisionsResponse { - s.NextToken = &v - return s -} - -// SetRevisions sets the Revisions field's value. -func (s *ListConfigurationRevisionsResponse) SetRevisions(v []*ConfigurationRevision) *ListConfigurationRevisionsResponse { - s.Revisions = v - return s -} - -type ListConfigurationsInput struct { - _ struct{} `type:"structure"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListConfigurationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListConfigurationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListConfigurationsInput"} - 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 *ListConfigurationsInput) SetMaxResults(v int64) *ListConfigurationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListConfigurationsInput) SetNextToken(v string) *ListConfigurationsInput { - s.NextToken = &v - return s -} - -type ListConfigurationsResponse struct { - _ struct{} `type:"structure"` - - Configurations []*Configuration `locationName:"configurations" type:"list"` - - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListConfigurationsResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListConfigurationsResponse) GoString() string { - return s.String() -} - -// SetConfigurations sets the Configurations field's value. -func (s *ListConfigurationsResponse) SetConfigurations(v []*Configuration) *ListConfigurationsResponse { - s.Configurations = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListConfigurationsResponse) SetMaxResults(v int64) *ListConfigurationsResponse { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListConfigurationsResponse) SetNextToken(v string) *ListConfigurationsResponse { - s.NextToken = &v - return s -} - -type ListTagsInput 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 ListTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} - if s.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 *ListTagsInput) SetResourceArn(v string) *ListTagsInput { - s.ResourceArn = &v - return s -} - -type ListTagsOutput struct { - _ struct{} `type:"structure"` - - Tags map[string]*string `locationName:"tags" type:"map"` -} - -// String returns the string representation -func (s ListTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput { - s.Tags = v - return s -} - -type ListUsersInput struct { - _ struct{} `type:"structure"` - - // BrokerId is a required field - BrokerId *string `location:"uri" locationName:"broker-id" type:"string" required:"true"` - - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListUsersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUsersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUsersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUsersInput"} - if s.BrokerId == nil { - invalidParams.Add(request.NewErrParamRequired("BrokerId")) - } - if s.BrokerId != nil && len(*s.BrokerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBrokerId sets the BrokerId field's value. -func (s *ListUsersInput) SetBrokerId(v string) *ListUsersInput { - s.BrokerId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListUsersInput) SetMaxResults(v int64) *ListUsersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUsersInput) SetNextToken(v string) *ListUsersInput { - s.NextToken = &v - return s -} - -type ListUsersResponse struct { - _ struct{} `type:"structure"` - - BrokerId *string `locationName:"brokerId" type:"string"` - - MaxResults *int64 `locationName:"maxResults" min:"5" type:"integer"` - - NextToken *string `locationName:"nextToken" type:"string"` - - Users []*UserSummary `locationName:"users" type:"list"` -} - -// String returns the string representation -func (s ListUsersResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUsersResponse) GoString() string { - return s.String() -} - -// SetBrokerId sets the BrokerId field's value. -func (s *ListUsersResponse) SetBrokerId(v string) *ListUsersResponse { - s.BrokerId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListUsersResponse) SetMaxResults(v int64) *ListUsersResponse { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUsersResponse) SetNextToken(v string) *ListUsersResponse { - s.NextToken = &v - return s -} - -// SetUsers sets the Users field's value. -func (s *ListUsersResponse) SetUsers(v []*UserSummary) *ListUsersResponse { - s.Users = v - return s -} - -// The list of information about logs to be enabled for the specified broker. -type Logs struct { - _ struct{} `type:"structure"` - - // Enables audit logging. Every user management action made using JMX or the - // ActiveMQ Web Console is logged. - Audit *bool `locationName:"audit" type:"boolean"` - - // Enables general logging. - General *bool `locationName:"general" type:"boolean"` -} - -// String returns the string representation -func (s Logs) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Logs) GoString() string { - return s.String() -} - -// SetAudit sets the Audit field's value. -func (s *Logs) SetAudit(v bool) *Logs { - s.Audit = &v - return s -} - -// SetGeneral sets the General field's value. -func (s *Logs) SetGeneral(v bool) *Logs { - s.General = &v - return s -} - -// The list of information about logs currently enabled and pending to be deployed -// for the specified broker. -type LogsSummary struct { - _ struct{} `type:"structure"` - - // Enables audit logging. Every user management action made using JMX or the - // ActiveMQ Web Console is logged. - Audit *bool `locationName:"audit" type:"boolean"` - - // The location of the CloudWatch Logs log group where audit logs are sent. - AuditLogGroup *string `locationName:"auditLogGroup" type:"string"` - - // Enables general logging. - General *bool `locationName:"general" type:"boolean"` - - // The location of the CloudWatch Logs log group where general logs are sent. - GeneralLogGroup *string `locationName:"generalLogGroup" type:"string"` - - // The list of information about logs pending to be deployed for the specified - // broker. - Pending *PendingLogs `locationName:"pending" type:"structure"` -} - -// String returns the string representation -func (s LogsSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LogsSummary) GoString() string { - return s.String() -} - -// SetAudit sets the Audit field's value. -func (s *LogsSummary) SetAudit(v bool) *LogsSummary { - s.Audit = &v - return s -} - -// SetAuditLogGroup sets the AuditLogGroup field's value. -func (s *LogsSummary) SetAuditLogGroup(v string) *LogsSummary { - s.AuditLogGroup = &v - return s -} - -// SetGeneral sets the General field's value. -func (s *LogsSummary) SetGeneral(v bool) *LogsSummary { - s.General = &v - return s -} - -// SetGeneralLogGroup sets the GeneralLogGroup field's value. -func (s *LogsSummary) SetGeneralLogGroup(v string) *LogsSummary { - s.GeneralLogGroup = &v - return s -} - -// SetPending sets the Pending field's value. -func (s *LogsSummary) SetPending(v *PendingLogs) *LogsSummary { - s.Pending = v - return s -} - -// The list of information about logs to be enabled for the specified broker. -type PendingLogs struct { - _ struct{} `type:"structure"` - - // Enables audit logging. Every user management action made using JMX or the - // ActiveMQ Web Console is logged. - Audit *bool `locationName:"audit" type:"boolean"` - - // Enables general logging. - General *bool `locationName:"general" type:"boolean"` -} - -// String returns the string representation -func (s PendingLogs) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingLogs) GoString() string { - return s.String() -} - -// SetAudit sets the Audit field's value. -func (s *PendingLogs) SetAudit(v bool) *PendingLogs { - s.Audit = &v - return s -} - -// SetGeneral sets the General field's value. -func (s *PendingLogs) SetGeneral(v bool) *PendingLogs { - s.General = &v - return s -} - -type RebootBrokerInput struct { - _ struct{} `type:"structure"` - - // BrokerId is a required field - BrokerId *string `location:"uri" locationName:"broker-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s RebootBrokerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootBrokerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootBrokerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootBrokerInput"} - if s.BrokerId == nil { - invalidParams.Add(request.NewErrParamRequired("BrokerId")) - } - if s.BrokerId != nil && len(*s.BrokerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBrokerId sets the BrokerId field's value. -func (s *RebootBrokerInput) SetBrokerId(v string) *RebootBrokerInput { - s.BrokerId = &v - return s -} - -type RebootBrokerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RebootBrokerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootBrokerOutput) GoString() string { - return s.String() -} - -// Returns information about the XML element or attribute that was sanitized -// in the configuration. -type SanitizationWarning struct { - _ struct{} `type:"structure"` - - // The name of the XML attribute that has been sanitized. - AttributeName *string `locationName:"attributeName" type:"string"` - - // The name of the XML element that has been sanitized. - ElementName *string `locationName:"elementName" type:"string"` - - // Required. The reason for which the XML elements or attributes were sanitized. - Reason *string `locationName:"reason" type:"string" enum:"SanitizationWarningReason"` -} - -// String returns the string representation -func (s SanitizationWarning) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SanitizationWarning) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *SanitizationWarning) SetAttributeName(v string) *SanitizationWarning { - s.AttributeName = &v - return s -} - -// SetElementName sets the ElementName field's value. -func (s *SanitizationWarning) SetElementName(v string) *SanitizationWarning { - s.ElementName = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *SanitizationWarning) SetReason(v string) *SanitizationWarning { - s.Reason = &v - return s -} - -type UpdateBrokerRequest struct { - _ struct{} `type:"structure"` - - AutoMinorVersionUpgrade *bool `locationName:"autoMinorVersionUpgrade" type:"boolean"` - - // BrokerId is a required field - BrokerId *string `location:"uri" locationName:"broker-id" type:"string" required:"true"` - - // A list of information about the configuration. - Configuration *ConfigurationId `locationName:"configuration" type:"structure"` - - EngineVersion *string `locationName:"engineVersion" type:"string"` - - // The list of information about logs to be enabled for the specified broker. - Logs *Logs `locationName:"logs" type:"structure"` -} - -// String returns the string representation -func (s UpdateBrokerRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBrokerRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateBrokerRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateBrokerRequest"} - if s.BrokerId == nil { - invalidParams.Add(request.NewErrParamRequired("BrokerId")) - } - if s.BrokerId != nil && len(*s.BrokerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *UpdateBrokerRequest) SetAutoMinorVersionUpgrade(v bool) *UpdateBrokerRequest { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetBrokerId sets the BrokerId field's value. -func (s *UpdateBrokerRequest) SetBrokerId(v string) *UpdateBrokerRequest { - s.BrokerId = &v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *UpdateBrokerRequest) SetConfiguration(v *ConfigurationId) *UpdateBrokerRequest { - s.Configuration = v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *UpdateBrokerRequest) SetEngineVersion(v string) *UpdateBrokerRequest { - s.EngineVersion = &v - return s -} - -// SetLogs sets the Logs field's value. -func (s *UpdateBrokerRequest) SetLogs(v *Logs) *UpdateBrokerRequest { - s.Logs = v - return s -} - -type UpdateBrokerResponse struct { - _ struct{} `type:"structure"` - - AutoMinorVersionUpgrade *bool `locationName:"autoMinorVersionUpgrade" type:"boolean"` - - BrokerId *string `locationName:"brokerId" type:"string"` - - // A list of information about the configuration. - Configuration *ConfigurationId `locationName:"configuration" type:"structure"` - - EngineVersion *string `locationName:"engineVersion" type:"string"` - - // The list of information about logs to be enabled for the specified broker. - Logs *Logs `locationName:"logs" type:"structure"` -} - -// String returns the string representation -func (s UpdateBrokerResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBrokerResponse) GoString() string { - return s.String() -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *UpdateBrokerResponse) SetAutoMinorVersionUpgrade(v bool) *UpdateBrokerResponse { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetBrokerId sets the BrokerId field's value. -func (s *UpdateBrokerResponse) SetBrokerId(v string) *UpdateBrokerResponse { - s.BrokerId = &v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *UpdateBrokerResponse) SetConfiguration(v *ConfigurationId) *UpdateBrokerResponse { - s.Configuration = v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *UpdateBrokerResponse) SetEngineVersion(v string) *UpdateBrokerResponse { - s.EngineVersion = &v - return s -} - -// SetLogs sets the Logs field's value. -func (s *UpdateBrokerResponse) SetLogs(v *Logs) *UpdateBrokerResponse { - s.Logs = v - return s -} - -type UpdateConfigurationRequest struct { - _ struct{} `type:"structure"` - - // ConfigurationId is a required field - ConfigurationId *string `location:"uri" locationName:"configuration-id" type:"string" required:"true"` - - Data *string `locationName:"data" type:"string"` - - Description *string `locationName:"description" type:"string"` -} - -// String returns the string representation -func (s UpdateConfigurationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConfigurationRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateConfigurationRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateConfigurationRequest"} - if s.ConfigurationId == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationId")) - } - if s.ConfigurationId != nil && len(*s.ConfigurationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ConfigurationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationId sets the ConfigurationId field's value. -func (s *UpdateConfigurationRequest) SetConfigurationId(v string) *UpdateConfigurationRequest { - s.ConfigurationId = &v - return s -} - -// SetData sets the Data field's value. -func (s *UpdateConfigurationRequest) SetData(v string) *UpdateConfigurationRequest { - s.Data = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateConfigurationRequest) SetDescription(v string) *UpdateConfigurationRequest { - s.Description = &v - return s -} - -type UpdateConfigurationResponse struct { - _ struct{} `type:"structure"` - - Arn *string `locationName:"arn" type:"string"` - - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"iso8601"` - - Id *string `locationName:"id" type:"string"` - - // Returns information about the specified configuration revision. - LatestRevision *ConfigurationRevision `locationName:"latestRevision" type:"structure"` - - Name *string `locationName:"name" type:"string"` - - Warnings []*SanitizationWarning `locationName:"warnings" type:"list"` -} - -// String returns the string representation -func (s UpdateConfigurationResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConfigurationResponse) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *UpdateConfigurationResponse) SetArn(v string) *UpdateConfigurationResponse { - s.Arn = &v - return s -} - -// SetCreated sets the Created field's value. -func (s *UpdateConfigurationResponse) SetCreated(v time.Time) *UpdateConfigurationResponse { - s.Created = &v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateConfigurationResponse) SetId(v string) *UpdateConfigurationResponse { - s.Id = &v - return s -} - -// SetLatestRevision sets the LatestRevision field's value. -func (s *UpdateConfigurationResponse) SetLatestRevision(v *ConfigurationRevision) *UpdateConfigurationResponse { - s.LatestRevision = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateConfigurationResponse) SetName(v string) *UpdateConfigurationResponse { - s.Name = &v - return s -} - -// SetWarnings sets the Warnings field's value. -func (s *UpdateConfigurationResponse) SetWarnings(v []*SanitizationWarning) *UpdateConfigurationResponse { - s.Warnings = v - return s -} - -type UpdateUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserOutput) GoString() string { - return s.String() -} - -type UpdateUserRequest struct { - _ struct{} `type:"structure"` - - // BrokerId is a required field - BrokerId *string `location:"uri" locationName:"broker-id" type:"string" required:"true"` - - ConsoleAccess *bool `locationName:"consoleAccess" type:"boolean"` - - Groups []*string `locationName:"groups" type:"list"` - - Password *string `locationName:"password" type:"string"` - - // Username is a required field - Username *string `location:"uri" locationName:"username" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateUserRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateUserRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateUserRequest"} - if s.BrokerId == nil { - invalidParams.Add(request.NewErrParamRequired("BrokerId")) - } - if s.BrokerId != nil && len(*s.BrokerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBrokerId sets the BrokerId field's value. -func (s *UpdateUserRequest) SetBrokerId(v string) *UpdateUserRequest { - s.BrokerId = &v - return s -} - -// SetConsoleAccess sets the ConsoleAccess field's value. -func (s *UpdateUserRequest) SetConsoleAccess(v bool) *UpdateUserRequest { - s.ConsoleAccess = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *UpdateUserRequest) SetGroups(v []*string) *UpdateUserRequest { - s.Groups = v - return s -} - -// SetPassword sets the Password field's value. -func (s *UpdateUserRequest) SetPassword(v string) *UpdateUserRequest { - s.Password = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *UpdateUserRequest) SetUsername(v string) *UpdateUserRequest { - s.Username = &v - return s -} - -// An ActiveMQ user associated with the broker. -type User struct { - _ struct{} `type:"structure"` - - // Enables access to the the ActiveMQ Web Console for the ActiveMQ user. - ConsoleAccess *bool `locationName:"consoleAccess" type:"boolean"` - - // The list of groups (20 maximum) to which the ActiveMQ user belongs. This - // value can contain only alphanumeric characters, dashes, periods, underscores, - // and tildes (- . _ ~). This value must be 2-100 characters long. - Groups []*string `locationName:"groups" type:"list"` - - // Required. The password of the ActiveMQ user. This value must be at least - // 12 characters long, must contain at least 4 unique characters, and must not - // contain commas. - Password *string `locationName:"password" type:"string"` - - // Required. The username of the ActiveMQ user. This value can contain only - // alphanumeric characters, dashes, periods, underscores, and tildes (- . _ - // ~). This value must be 2-100 characters long. - Username *string `locationName:"username" type:"string"` -} - -// String returns the string representation -func (s User) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s User) GoString() string { - return s.String() -} - -// SetConsoleAccess sets the ConsoleAccess field's value. -func (s *User) SetConsoleAccess(v bool) *User { - s.ConsoleAccess = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *User) SetGroups(v []*string) *User { - s.Groups = v - return s -} - -// SetPassword sets the Password field's value. -func (s *User) SetPassword(v string) *User { - s.Password = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *User) SetUsername(v string) *User { - s.Username = &v - return s -} - -// Returns information about the status of the changes pending for the ActiveMQ -// user. -type UserPendingChanges struct { - _ struct{} `type:"structure"` - - // Enables access to the the ActiveMQ Web Console for the ActiveMQ user. - ConsoleAccess *bool `locationName:"consoleAccess" type:"boolean"` - - // The list of groups (20 maximum) to which the ActiveMQ user belongs. This - // value can contain only alphanumeric characters, dashes, periods, underscores, - // and tildes (- . _ ~). This value must be 2-100 characters long. - Groups []*string `locationName:"groups" type:"list"` - - // Required. The type of change pending for the ActiveMQ user. - PendingChange *string `locationName:"pendingChange" type:"string" enum:"ChangeType"` -} - -// String returns the string representation -func (s UserPendingChanges) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserPendingChanges) GoString() string { - return s.String() -} - -// SetConsoleAccess sets the ConsoleAccess field's value. -func (s *UserPendingChanges) SetConsoleAccess(v bool) *UserPendingChanges { - s.ConsoleAccess = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *UserPendingChanges) SetGroups(v []*string) *UserPendingChanges { - s.Groups = v - return s -} - -// SetPendingChange sets the PendingChange field's value. -func (s *UserPendingChanges) SetPendingChange(v string) *UserPendingChanges { - s.PendingChange = &v - return s -} - -// Returns a list of all ActiveMQ users. -type UserSummary struct { - _ struct{} `type:"structure"` - - // The type of change pending for the ActiveMQ user. - PendingChange *string `locationName:"pendingChange" type:"string" enum:"ChangeType"` - - // Required. The username of the ActiveMQ user. This value can contain only - // alphanumeric characters, dashes, periods, underscores, and tildes (- . _ - // ~). This value must be 2-100 characters long. - Username *string `locationName:"username" type:"string"` -} - -// String returns the string representation -func (s UserSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserSummary) GoString() string { - return s.String() -} - -// SetPendingChange sets the PendingChange field's value. -func (s *UserSummary) SetPendingChange(v string) *UserSummary { - s.PendingChange = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *UserSummary) SetUsername(v string) *UserSummary { - s.Username = &v - return s -} - -// The scheduled time period relative to UTC during which Amazon MQ begins to -// apply pending updates or patches to the broker. -type WeeklyStartTime struct { - _ struct{} `type:"structure"` - - // Required. The day of the week. - DayOfWeek *string `locationName:"dayOfWeek" type:"string" enum:"DayOfWeek"` - - // Required. The time, in 24-hour format. - TimeOfDay *string `locationName:"timeOfDay" type:"string"` - - // The time zone, UTC by default, in either the Country/City format, or the - // UTC offset format. - TimeZone *string `locationName:"timeZone" type:"string"` -} - -// String returns the string representation -func (s WeeklyStartTime) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WeeklyStartTime) GoString() string { - return s.String() -} - -// SetDayOfWeek sets the DayOfWeek field's value. -func (s *WeeklyStartTime) SetDayOfWeek(v string) *WeeklyStartTime { - s.DayOfWeek = &v - return s -} - -// SetTimeOfDay sets the TimeOfDay field's value. -func (s *WeeklyStartTime) SetTimeOfDay(v string) *WeeklyStartTime { - s.TimeOfDay = &v - return s -} - -// SetTimeZone sets the TimeZone field's value. -func (s *WeeklyStartTime) SetTimeZone(v string) *WeeklyStartTime { - s.TimeZone = &v - return s -} - -// The status of the broker. -const ( - // BrokerStateCreationInProgress is a BrokerState enum value - BrokerStateCreationInProgress = "CREATION_IN_PROGRESS" - - // BrokerStateCreationFailed is a BrokerState enum value - BrokerStateCreationFailed = "CREATION_FAILED" - - // BrokerStateDeletionInProgress is a BrokerState enum value - BrokerStateDeletionInProgress = "DELETION_IN_PROGRESS" - - // BrokerStateRunning is a BrokerState enum value - BrokerStateRunning = "RUNNING" - - // BrokerStateRebootInProgress is a BrokerState enum value - BrokerStateRebootInProgress = "REBOOT_IN_PROGRESS" -) - -// The type of change pending for the ActiveMQ user. -const ( - // ChangeTypeCreate is a ChangeType enum value - ChangeTypeCreate = "CREATE" - - // ChangeTypeUpdate is a ChangeType enum value - ChangeTypeUpdate = "UPDATE" - - // ChangeTypeDelete is a ChangeType enum value - ChangeTypeDelete = "DELETE" -) - -const ( - // DayOfWeekMonday is a DayOfWeek enum value - DayOfWeekMonday = "MONDAY" - - // DayOfWeekTuesday is a DayOfWeek enum value - DayOfWeekTuesday = "TUESDAY" - - // DayOfWeekWednesday is a DayOfWeek enum value - DayOfWeekWednesday = "WEDNESDAY" - - // DayOfWeekThursday is a DayOfWeek enum value - DayOfWeekThursday = "THURSDAY" - - // DayOfWeekFriday is a DayOfWeek enum value - DayOfWeekFriday = "FRIDAY" - - // DayOfWeekSaturday is a DayOfWeek enum value - DayOfWeekSaturday = "SATURDAY" - - // DayOfWeekSunday is a DayOfWeek enum value - DayOfWeekSunday = "SUNDAY" -) - -// The deployment mode of the broker. -const ( - // DeploymentModeSingleInstance is a DeploymentMode enum value - DeploymentModeSingleInstance = "SINGLE_INSTANCE" - - // DeploymentModeActiveStandbyMultiAz is a DeploymentMode enum value - DeploymentModeActiveStandbyMultiAz = "ACTIVE_STANDBY_MULTI_AZ" -) - -// The type of broker engine. Note: Currently, Amazon MQ supports only ActiveMQ. -const ( - // EngineTypeActivemq is a EngineType enum value - EngineTypeActivemq = "ACTIVEMQ" -) - -// The reason for which the XML elements or attributes were sanitized. -const ( - // SanitizationWarningReasonDisallowedElementRemoved is a SanitizationWarningReason enum value - SanitizationWarningReasonDisallowedElementRemoved = "DISALLOWED_ELEMENT_REMOVED" - - // SanitizationWarningReasonDisallowedAttributeRemoved is a SanitizationWarningReason enum value - SanitizationWarningReasonDisallowedAttributeRemoved = "DISALLOWED_ATTRIBUTE_REMOVED" - - // SanitizationWarningReasonInvalidAttributeValueRemoved is a SanitizationWarningReason enum value - SanitizationWarningReasonInvalidAttributeValueRemoved = "INVALID_ATTRIBUTE_VALUE_REMOVED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mq/doc.go b/vendor/github.com/aws/aws-sdk-go/service/mq/doc.go deleted file mode 100644 index 70472ab66..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mq/doc.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package mq provides the client and types for making API -// requests to AmazonMQ. -// -// Amazon MQ is a managed message broker service for Apache ActiveMQ that makes -// it easy to set up and operate message brokers in the cloud. A message broker -// allows software applications and components to communicate using various -// programming languages, operating systems, and formal messaging protocols. -// -// See https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27 for more information on this service. -// -// See mq package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/mq/ -// -// Using the Client -// -// To contact AmazonMQ 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 AmazonMQ client MQ for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/mq/#New -package mq diff --git a/vendor/github.com/aws/aws-sdk-go/service/mq/errors.go b/vendor/github.com/aws/aws-sdk-go/service/mq/errors.go deleted file mode 100644 index 064fc8e5b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mq/errors.go +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mq - -const ( - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - // - // Returns information about an error. - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeConflictException for service response error code - // "ConflictException". - // - // Returns information about an error. - ErrCodeConflictException = "ConflictException" - - // ErrCodeForbiddenException for service response error code - // "ForbiddenException". - // - // Returns information about an error. - ErrCodeForbiddenException = "ForbiddenException" - - // ErrCodeInternalServerErrorException for service response error code - // "InternalServerErrorException". - // - // Returns information about an error. - ErrCodeInternalServerErrorException = "InternalServerErrorException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // Returns information about an error. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeUnauthorizedException for service response error code - // "UnauthorizedException". - // - // Returns information about an error. - ErrCodeUnauthorizedException = "UnauthorizedException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mq/service.go b/vendor/github.com/aws/aws-sdk-go/service/mq/service.go deleted file mode 100644 index 1ebb5aeca..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/mq/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package mq - -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" -) - -// MQ provides the API operation methods for making requests to -// AmazonMQ. See this package's package overview docs -// for details on the service. -// -// MQ methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type MQ 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 = "mq" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "mq" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the MQ client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a MQ client from just a session. -// svc := mq.New(mySession) -// -// // Create a MQ client with additional configuration -// svc := mq.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *MQ { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "mq" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *MQ { - svc := &MQ{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-11-27", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a MQ operation and runs any -// custom request initialization. -func (c *MQ) 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/neptune/api.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go deleted file mode 100644 index 93179fe42..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go +++ /dev/null @@ -1,16692 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package neptune - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/query" -) - -const opAddRoleToDBCluster = "AddRoleToDBCluster" - -// AddRoleToDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the AddRoleToDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddRoleToDBCluster for more information on using the AddRoleToDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddRoleToDBClusterRequest method. -// req, resp := client.AddRoleToDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/AddRoleToDBCluster -func (c *Neptune) AddRoleToDBClusterRequest(input *AddRoleToDBClusterInput) (req *request.Request, output *AddRoleToDBClusterOutput) { - op := &request.Operation{ - Name: opAddRoleToDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddRoleToDBClusterInput{} - } - - output = &AddRoleToDBClusterOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddRoleToDBCluster API operation for Amazon Neptune. -// -// Associates an Identity and Access Management (IAM) role from an Neptune DB -// cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation AddRoleToDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. -// -// * ErrCodeDBClusterRoleAlreadyExistsFault "DBClusterRoleAlreadyExists" -// The specified IAM role Amazon Resource Name (ARN) is already associated with -// the specified DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. -// -// * ErrCodeDBClusterRoleQuotaExceededFault "DBClusterRoleQuotaExceeded" -// You have exceeded the maximum number of IAM roles that can be associated -// with the specified DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/AddRoleToDBCluster -func (c *Neptune) AddRoleToDBCluster(input *AddRoleToDBClusterInput) (*AddRoleToDBClusterOutput, error) { - req, out := c.AddRoleToDBClusterRequest(input) - return out, req.Send() -} - -// AddRoleToDBClusterWithContext is the same as AddRoleToDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See AddRoleToDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) AddRoleToDBClusterWithContext(ctx aws.Context, input *AddRoleToDBClusterInput, opts ...request.Option) (*AddRoleToDBClusterOutput, error) { - req, out := c.AddRoleToDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddSourceIdentifierToSubscription = "AddSourceIdentifierToSubscription" - -// AddSourceIdentifierToSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the AddSourceIdentifierToSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddSourceIdentifierToSubscription for more information on using the AddSourceIdentifierToSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddSourceIdentifierToSubscriptionRequest method. -// req, resp := client.AddSourceIdentifierToSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/AddSourceIdentifierToSubscription -func (c *Neptune) AddSourceIdentifierToSubscriptionRequest(input *AddSourceIdentifierToSubscriptionInput) (req *request.Request, output *AddSourceIdentifierToSubscriptionOutput) { - op := &request.Operation{ - Name: opAddSourceIdentifierToSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddSourceIdentifierToSubscriptionInput{} - } - - output = &AddSourceIdentifierToSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddSourceIdentifierToSubscription API operation for Amazon Neptune. -// -// Adds a source identifier to an existing event notification subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation AddSourceIdentifierToSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" -// -// * ErrCodeSourceNotFoundFault "SourceNotFound" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/AddSourceIdentifierToSubscription -func (c *Neptune) AddSourceIdentifierToSubscription(input *AddSourceIdentifierToSubscriptionInput) (*AddSourceIdentifierToSubscriptionOutput, error) { - req, out := c.AddSourceIdentifierToSubscriptionRequest(input) - return out, req.Send() -} - -// AddSourceIdentifierToSubscriptionWithContext is the same as AddSourceIdentifierToSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See AddSourceIdentifierToSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) AddSourceIdentifierToSubscriptionWithContext(ctx aws.Context, input *AddSourceIdentifierToSubscriptionInput, opts ...request.Option) (*AddSourceIdentifierToSubscriptionOutput, error) { - req, out := c.AddSourceIdentifierToSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddTagsToResource = "AddTagsToResource" - -// AddTagsToResourceRequest generates a "aws/request.Request" representing the -// client's request for the AddTagsToResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTagsToResource for more information on using the AddTagsToResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsToResourceRequest method. -// req, resp := client.AddTagsToResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/AddTagsToResource -func (c *Neptune) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *request.Request, output *AddTagsToResourceOutput) { - op := &request.Operation{ - Name: opAddTagsToResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsToResourceInput{} - } - - output = &AddTagsToResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTagsToResource API operation for Amazon Neptune. -// -// Adds metadata tags to an Amazon Neptune resource. These tags can also be -// used with cost allocation reporting to track cost associated with Amazon -// Neptune resources, or used in a Condition statement in an IAM policy for -// Amazon Neptune. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation AddTagsToResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/AddTagsToResource -func (c *Neptune) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { - req, out := c.AddTagsToResourceRequest(input) - return out, req.Send() -} - -// AddTagsToResourceWithContext is the same as AddTagsToResource with the addition of -// the ability to pass a context and additional request options. -// -// See AddTagsToResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) AddTagsToResourceWithContext(ctx aws.Context, input *AddTagsToResourceInput, opts ...request.Option) (*AddTagsToResourceOutput, error) { - req, out := c.AddTagsToResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opApplyPendingMaintenanceAction = "ApplyPendingMaintenanceAction" - -// ApplyPendingMaintenanceActionRequest generates a "aws/request.Request" representing the -// client's request for the ApplyPendingMaintenanceAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ApplyPendingMaintenanceAction for more information on using the ApplyPendingMaintenanceAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ApplyPendingMaintenanceActionRequest method. -// req, resp := client.ApplyPendingMaintenanceActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ApplyPendingMaintenanceAction -func (c *Neptune) ApplyPendingMaintenanceActionRequest(input *ApplyPendingMaintenanceActionInput) (req *request.Request, output *ApplyPendingMaintenanceActionOutput) { - op := &request.Operation{ - Name: opApplyPendingMaintenanceAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ApplyPendingMaintenanceActionInput{} - } - - output = &ApplyPendingMaintenanceActionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ApplyPendingMaintenanceAction API operation for Amazon Neptune. -// -// Applies a pending maintenance action to a resource (for example, to a DB -// instance). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation ApplyPendingMaintenanceAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The specified resource ID was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ApplyPendingMaintenanceAction -func (c *Neptune) ApplyPendingMaintenanceAction(input *ApplyPendingMaintenanceActionInput) (*ApplyPendingMaintenanceActionOutput, error) { - req, out := c.ApplyPendingMaintenanceActionRequest(input) - return out, req.Send() -} - -// ApplyPendingMaintenanceActionWithContext is the same as ApplyPendingMaintenanceAction with the addition of -// the ability to pass a context and additional request options. -// -// See ApplyPendingMaintenanceAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) ApplyPendingMaintenanceActionWithContext(ctx aws.Context, input *ApplyPendingMaintenanceActionInput, opts ...request.Option) (*ApplyPendingMaintenanceActionOutput, error) { - req, out := c.ApplyPendingMaintenanceActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyDBClusterParameterGroup = "CopyDBClusterParameterGroup" - -// CopyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the CopyDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyDBClusterParameterGroup for more information on using the CopyDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyDBClusterParameterGroupRequest method. -// req, resp := client.CopyDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBClusterParameterGroup -func (c *Neptune) CopyDBClusterParameterGroupRequest(input *CopyDBClusterParameterGroupInput) (req *request.Request, output *CopyDBClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opCopyDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyDBClusterParameterGroupInput{} - } - - output = &CopyDBClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyDBClusterParameterGroup API operation for Amazon Neptune. -// -// Copies the specified DB cluster parameter group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation CopyDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. -// -// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB parameter -// groups. -// -// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" -// A DB parameter group with the same name exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBClusterParameterGroup -func (c *Neptune) CopyDBClusterParameterGroup(input *CopyDBClusterParameterGroupInput) (*CopyDBClusterParameterGroupOutput, error) { - req, out := c.CopyDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// CopyDBClusterParameterGroupWithContext is the same as CopyDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CopyDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) CopyDBClusterParameterGroupWithContext(ctx aws.Context, input *CopyDBClusterParameterGroupInput, opts ...request.Option) (*CopyDBClusterParameterGroupOutput, error) { - req, out := c.CopyDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyDBClusterSnapshot = "CopyDBClusterSnapshot" - -// CopyDBClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CopyDBClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyDBClusterSnapshot for more information on using the CopyDBClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyDBClusterSnapshotRequest method. -// req, resp := client.CopyDBClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBClusterSnapshot -func (c *Neptune) CopyDBClusterSnapshotRequest(input *CopyDBClusterSnapshotInput) (req *request.Request, output *CopyDBClusterSnapshotOutput) { - op := &request.Operation{ - Name: opCopyDBClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyDBClusterSnapshotInput{} - } - - output = &CopyDBClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyDBClusterSnapshot API operation for Amazon Neptune. -// -// Copies a snapshot of a DB cluster. -// -// To copy a DB cluster snapshot from a shared manual DB cluster snapshot, SourceDBClusterSnapshotIdentifier -// must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot. -// -// You can copy an encrypted DB cluster snapshot from another AWS Region. In -// that case, the AWS Region where you call the CopyDBClusterSnapshot action -// is the destination AWS Region for the encrypted DB cluster snapshot to be -// copied to. To copy an encrypted DB cluster snapshot from another AWS Region, -// you must provide the following values: -// -// * KmsKeyId - The AWS Key Management System (AWS KMS) key identifier for -// the key to use to encrypt the copy of the DB cluster snapshot in the destination -// AWS Region. -// -// * PreSignedUrl - A URL that contains a Signature Version 4 signed request -// for the CopyDBClusterSnapshot action to be called in the source AWS Region -// where the DB cluster snapshot is copied from. The pre-signed URL must -// be a valid request for the CopyDBClusterSnapshot API action that can be -// executed in the source AWS Region that contains the encrypted DB cluster -// snapshot to be copied. -// -// The pre-signed URL request must contain the following parameter values: -// -// KmsKeyId - The KMS key identifier for the key to use to encrypt the copy -// of the DB cluster snapshot in the destination AWS Region. This is the -// same identifier for both the CopyDBClusterSnapshot action that is called -// in the destination AWS Region, and the action contained in the pre-signed -// URL. -// -// DestinationRegion - The name of the AWS Region that the DB cluster snapshot -// will be created in. -// -// SourceDBClusterSnapshotIdentifier - The DB cluster snapshot identifier for -// the encrypted DB cluster snapshot to be copied. This identifier must be -// in the Amazon Resource Name (ARN) format for the source AWS Region. For -// example, if you are copying an encrypted DB cluster snapshot from the -// us-west-2 AWS Region, then your SourceDBClusterSnapshotIdentifier looks -// like the following example: arn:aws:rds:us-west-2:123456789012:cluster-snapshot:neptune-cluster1-snapshot-20161115. -// -// To learn how to generate a Signature Version 4 signed request, see Authenticating -// Requests: Using Query Parameters (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) -// and Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). -// -// * TargetDBClusterSnapshotIdentifier - The identifier for the new copy -// of the DB cluster snapshot in the destination AWS Region. -// -// * SourceDBClusterSnapshotIdentifier - The DB cluster snapshot identifier -// for the encrypted DB cluster snapshot to be copied. This identifier must -// be in the ARN format for the source AWS Region and is the same value as -// the SourceDBClusterSnapshotIdentifier in the pre-signed URL. -// -// To cancel the copy operation once it is in progress, delete the target DB -// cluster snapshot identified by TargetDBClusterSnapshotIdentifier while that -// DB cluster snapshot is in "copying" 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 Amazon Neptune's -// API operation CopyDBClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// User already has a DB cluster snapshot with the given identifier. -// -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBClusterSnapshot -func (c *Neptune) CopyDBClusterSnapshot(input *CopyDBClusterSnapshotInput) (*CopyDBClusterSnapshotOutput, error) { - req, out := c.CopyDBClusterSnapshotRequest(input) - return out, req.Send() -} - -// CopyDBClusterSnapshotWithContext is the same as CopyDBClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CopyDBClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) CopyDBClusterSnapshotWithContext(ctx aws.Context, input *CopyDBClusterSnapshotInput, opts ...request.Option) (*CopyDBClusterSnapshotOutput, error) { - req, out := c.CopyDBClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyDBParameterGroup = "CopyDBParameterGroup" - -// CopyDBParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the CopyDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyDBParameterGroup for more information on using the CopyDBParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyDBParameterGroupRequest method. -// req, resp := client.CopyDBParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBParameterGroup -func (c *Neptune) CopyDBParameterGroupRequest(input *CopyDBParameterGroupInput) (req *request.Request, output *CopyDBParameterGroupOutput) { - op := &request.Operation{ - Name: opCopyDBParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyDBParameterGroupInput{} - } - - output = &CopyDBParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyDBParameterGroup API operation for Amazon Neptune. -// -// Copies the specified DB parameter group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation CopyDBParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. -// -// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" -// A DB parameter group with the same name exists. -// -// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB parameter -// groups. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBParameterGroup -func (c *Neptune) CopyDBParameterGroup(input *CopyDBParameterGroupInput) (*CopyDBParameterGroupOutput, error) { - req, out := c.CopyDBParameterGroupRequest(input) - return out, req.Send() -} - -// CopyDBParameterGroupWithContext is the same as CopyDBParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CopyDBParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) CopyDBParameterGroupWithContext(ctx aws.Context, input *CopyDBParameterGroupInput, opts ...request.Option) (*CopyDBParameterGroupOutput, error) { - req, out := c.CopyDBParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBCluster = "CreateDBCluster" - -// CreateDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBCluster for more information on using the CreateDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBClusterRequest method. -// req, resp := client.CreateDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBCluster -func (c *Neptune) CreateDBClusterRequest(input *CreateDBClusterInput) (req *request.Request, output *CreateDBClusterOutput) { - op := &request.Operation{ - Name: opCreateDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBClusterInput{} - } - - output = &CreateDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBCluster API operation for Amazon Neptune. -// -// Creates a new Amazon Neptune DB cluster. -// -// You can use the ReplicationSourceIdentifier parameter to create the DB cluster -// as a Read Replica of another DB cluster or Amazon Neptune DB instance. For -// cross-region replication where the DB cluster identified by ReplicationSourceIdentifier -// is encrypted, you must also specify the PreSignedUrl parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation CreateDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// User already has a DB cluster with the given identifier. -// -// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You may be -// able to resolve this error by updating your subnet group to use different -// Availability Zones that have more storage available. -// -// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// User attempted to create a new DB cluster and the user has already reached -// the maximum allowed DB cluster quota. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. -// -// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it is in use. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. -// -// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName does not refer to an existing DB Cluster parameter -// group. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBCluster -func (c *Neptune) CreateDBCluster(input *CreateDBClusterInput) (*CreateDBClusterOutput, error) { - req, out := c.CreateDBClusterRequest(input) - return out, req.Send() -} - -// CreateDBClusterWithContext is the same as CreateDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) CreateDBClusterWithContext(ctx aws.Context, input *CreateDBClusterInput, opts ...request.Option) (*CreateDBClusterOutput, error) { - req, out := c.CreateDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBClusterParameterGroup = "CreateDBClusterParameterGroup" - -// CreateDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBClusterParameterGroup for more information on using the CreateDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBClusterParameterGroupRequest method. -// req, resp := client.CreateDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBClusterParameterGroup -func (c *Neptune) CreateDBClusterParameterGroupRequest(input *CreateDBClusterParameterGroupInput) (req *request.Request, output *CreateDBClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opCreateDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBClusterParameterGroupInput{} - } - - output = &CreateDBClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBClusterParameterGroup API operation for Amazon Neptune. -// -// Creates a new DB cluster parameter group. -// -// Parameters in a DB cluster parameter group apply to all of the instances -// in a DB cluster. -// -// A DB cluster parameter group is initially created with the default parameters -// for the database engine used by instances in the DB cluster. To provide custom -// values for any of the parameters, you must modify the group after creating -// it using ModifyDBClusterParameterGroup. Once you've created a DB cluster -// parameter group, you need to associate it with your DB cluster using ModifyDBCluster. -// When you associate a new DB cluster parameter group with a running DB cluster, -// you need to reboot the DB instances in the DB cluster without failover for -// the new DB cluster parameter group and associated settings to take effect. -// -// After you create a DB cluster parameter group, you should wait at least 5 -// minutes before creating your first DB cluster that uses that DB cluster parameter -// group as the default parameter group. This allows Amazon Neptune to fully -// complete the create action before the DB cluster parameter group is used -// as the default for a new DB cluster. This is especially important for parameters -// that are critical when creating the default database for a DB cluster, such -// as the character set for the default database defined by the character_set_database -// parameter. You can use the Parameter Groups option of the Amazon Neptune -// console (https://console.aws.amazon.com/rds/) or the DescribeDBClusterParameters -// command to verify that your DB cluster parameter group has been created or -// modified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation CreateDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB parameter -// groups. -// -// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" -// A DB parameter group with the same name exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBClusterParameterGroup -func (c *Neptune) CreateDBClusterParameterGroup(input *CreateDBClusterParameterGroupInput) (*CreateDBClusterParameterGroupOutput, error) { - req, out := c.CreateDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// CreateDBClusterParameterGroupWithContext is the same as CreateDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) CreateDBClusterParameterGroupWithContext(ctx aws.Context, input *CreateDBClusterParameterGroupInput, opts ...request.Option) (*CreateDBClusterParameterGroupOutput, error) { - req, out := c.CreateDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBClusterSnapshot = "CreateDBClusterSnapshot" - -// CreateDBClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBClusterSnapshot for more information on using the CreateDBClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBClusterSnapshotRequest method. -// req, resp := client.CreateDBClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBClusterSnapshot -func (c *Neptune) CreateDBClusterSnapshotRequest(input *CreateDBClusterSnapshotInput) (req *request.Request, output *CreateDBClusterSnapshotOutput) { - op := &request.Operation{ - Name: opCreateDBClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBClusterSnapshotInput{} - } - - output = &CreateDBClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBClusterSnapshot API operation for Amazon Neptune. -// -// Creates a snapshot of a DB cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation CreateDBClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// User already has a DB cluster snapshot with the given identifier. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBClusterSnapshot -func (c *Neptune) CreateDBClusterSnapshot(input *CreateDBClusterSnapshotInput) (*CreateDBClusterSnapshotOutput, error) { - req, out := c.CreateDBClusterSnapshotRequest(input) - return out, req.Send() -} - -// CreateDBClusterSnapshotWithContext is the same as CreateDBClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) CreateDBClusterSnapshotWithContext(ctx aws.Context, input *CreateDBClusterSnapshotInput, opts ...request.Option) (*CreateDBClusterSnapshotOutput, error) { - req, out := c.CreateDBClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBInstance = "CreateDBInstance" - -// CreateDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBInstance for more information on using the CreateDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBInstanceRequest method. -// req, resp := client.CreateDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBInstance -func (c *Neptune) CreateDBInstanceRequest(input *CreateDBInstanceInput) (req *request.Request, output *CreateDBInstanceOutput) { - op := &request.Operation{ - Name: opCreateDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBInstanceInput{} - } - - output = &CreateDBInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBInstance API operation for Amazon Neptune. -// -// Creates a new DB instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation CreateDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// User already has a DB instance with the given identifier. -// -// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability -// Zone. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. -// -// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. -// -// * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// Request would result in user exceeding the allowed number of DB instances. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. -// -// * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" -// Provisioned IOPS not available in the specified Availability Zone. -// -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. -// -// * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// StorageType specified cannot be associated with the DB Instance. -// -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. -// -// Neptune may not also be authorized via IAM to perform necessary actions on -// your behalf. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. -// -// * ErrCodeDomainNotFoundFault "DomainNotFoundFault" -// Domain does not refer to an existing Active Directory Domain. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBInstance -func (c *Neptune) CreateDBInstance(input *CreateDBInstanceInput) (*CreateDBInstanceOutput, error) { - req, out := c.CreateDBInstanceRequest(input) - return out, req.Send() -} - -// CreateDBInstanceWithContext is the same as CreateDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) CreateDBInstanceWithContext(ctx aws.Context, input *CreateDBInstanceInput, opts ...request.Option) (*CreateDBInstanceOutput, error) { - req, out := c.CreateDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBParameterGroup = "CreateDBParameterGroup" - -// CreateDBParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBParameterGroup for more information on using the CreateDBParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBParameterGroupRequest method. -// req, resp := client.CreateDBParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBParameterGroup -func (c *Neptune) CreateDBParameterGroupRequest(input *CreateDBParameterGroupInput) (req *request.Request, output *CreateDBParameterGroupOutput) { - op := &request.Operation{ - Name: opCreateDBParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBParameterGroupInput{} - } - - output = &CreateDBParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBParameterGroup API operation for Amazon Neptune. -// -// Creates a new DB parameter group. -// -// A DB parameter group is initially created with the default parameters for -// the database engine used by the DB instance. To provide custom values for -// any of the parameters, you must modify the group after creating it using -// ModifyDBParameterGroup. Once you've created a DB parameter group, you need -// to associate it with your DB instance using ModifyDBInstance. When you associate -// a new DB parameter group with a running DB instance, you need to reboot the -// DB instance without failover for the new DB parameter group and associated -// settings to take effect. -// -// After you create a DB parameter group, you should wait at least 5 minutes -// before creating your first DB instance that uses that DB parameter group -// as the default parameter group. This allows Amazon Neptune to fully complete -// the create action before the parameter group is used as the default for a -// new DB instance. This is especially important for parameters that are critical -// when creating the default database for a DB instance, such as the character -// set for the default database defined by the character_set_database parameter. -// You can use the Parameter Groups option of the Amazon Neptune console or -// the DescribeDBParameters command to verify that your DB parameter group has -// been created or modified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation CreateDBParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB parameter -// groups. -// -// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" -// A DB parameter group with the same name exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBParameterGroup -func (c *Neptune) CreateDBParameterGroup(input *CreateDBParameterGroupInput) (*CreateDBParameterGroupOutput, error) { - req, out := c.CreateDBParameterGroupRequest(input) - return out, req.Send() -} - -// CreateDBParameterGroupWithContext is the same as CreateDBParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) CreateDBParameterGroupWithContext(ctx aws.Context, input *CreateDBParameterGroupInput, opts ...request.Option) (*CreateDBParameterGroupOutput, error) { - req, out := c.CreateDBParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBSubnetGroup = "CreateDBSubnetGroup" - -// CreateDBSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBSubnetGroup for more information on using the CreateDBSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBSubnetGroupRequest method. -// req, resp := client.CreateDBSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBSubnetGroup -func (c *Neptune) CreateDBSubnetGroupRequest(input *CreateDBSubnetGroupInput) (req *request.Request, output *CreateDBSubnetGroupOutput) { - op := &request.Operation{ - Name: opCreateDBSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBSubnetGroupInput{} - } - - output = &CreateDBSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBSubnetGroup API operation for Amazon Neptune. -// -// Creates a new DB subnet group. DB subnet groups must contain at least one -// subnet in at least two AZs in the AWS Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation CreateDBSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSubnetGroupAlreadyExistsFault "DBSubnetGroupAlreadyExists" -// DBSubnetGroupName is already used by an existing DB subnet group. -// -// * ErrCodeDBSubnetGroupQuotaExceededFault "DBSubnetGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB subnet groups. -// -// * ErrCodeDBSubnetQuotaExceededFault "DBSubnetQuotaExceededFault" -// Request would result in user exceeding the allowed number of subnets in a -// DB subnet groups. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBSubnetGroup -func (c *Neptune) CreateDBSubnetGroup(input *CreateDBSubnetGroupInput) (*CreateDBSubnetGroupOutput, error) { - req, out := c.CreateDBSubnetGroupRequest(input) - return out, req.Send() -} - -// CreateDBSubnetGroupWithContext is the same as CreateDBSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) CreateDBSubnetGroupWithContext(ctx aws.Context, input *CreateDBSubnetGroupInput, opts ...request.Option) (*CreateDBSubnetGroupOutput, error) { - req, out := c.CreateDBSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateEventSubscription = "CreateEventSubscription" - -// CreateEventSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the CreateEventSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateEventSubscription for more information on using the CreateEventSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateEventSubscriptionRequest method. -// req, resp := client.CreateEventSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateEventSubscription -func (c *Neptune) CreateEventSubscriptionRequest(input *CreateEventSubscriptionInput) (req *request.Request, output *CreateEventSubscriptionOutput) { - op := &request.Operation{ - Name: opCreateEventSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateEventSubscriptionInput{} - } - - output = &CreateEventSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateEventSubscription API operation for Amazon Neptune. -// -// Creates an event notification subscription. This action requires a topic -// ARN (Amazon Resource Name) created by either the Neptune console, the SNS -// console, or the SNS API. To obtain an ARN with SNS, you must create a topic -// in Amazon SNS and subscribe to the topic. The ARN is displayed in the SNS -// console. -// -// You can specify the type of source (SourceType) you want to be notified of, -// provide a list of Neptune sources (SourceIds) that triggers the events, and -// provide a list of event categories (EventCategories) for events you want -// to be notified of. For example, you can specify SourceType = db-instance, -// SourceIds = mydbinstance1, mydbinstance2 and EventCategories = Availability, -// Backup. -// -// If you specify both the SourceType and SourceIds, such as SourceType = db-instance -// and SourceIdentifier = myDBInstance1, you are notified of all the db-instance -// events for the specified source. If you specify a SourceType but do not specify -// a SourceIdentifier, you receive notice of the events for that source type -// for all your Neptune sources. If you do not specify either the SourceType -// nor the SourceIdentifier, you are notified of events generated from all Neptune -// sources belonging to your customer account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation CreateEventSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEventSubscriptionQuotaExceededFault "EventSubscriptionQuotaExceeded" -// -// * ErrCodeSubscriptionAlreadyExistFault "SubscriptionAlreadyExist" -// -// * ErrCodeSNSInvalidTopicFault "SNSInvalidTopic" -// -// * ErrCodeSNSNoAuthorizationFault "SNSNoAuthorization" -// -// * ErrCodeSNSTopicArnNotFoundFault "SNSTopicArnNotFound" -// -// * ErrCodeSubscriptionCategoryNotFoundFault "SubscriptionCategoryNotFound" -// -// * ErrCodeSourceNotFoundFault "SourceNotFound" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateEventSubscription -func (c *Neptune) CreateEventSubscription(input *CreateEventSubscriptionInput) (*CreateEventSubscriptionOutput, error) { - req, out := c.CreateEventSubscriptionRequest(input) - return out, req.Send() -} - -// CreateEventSubscriptionWithContext is the same as CreateEventSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See CreateEventSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) CreateEventSubscriptionWithContext(ctx aws.Context, input *CreateEventSubscriptionInput, opts ...request.Option) (*CreateEventSubscriptionOutput, error) { - req, out := c.CreateEventSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBCluster = "DeleteDBCluster" - -// DeleteDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBCluster for more information on using the DeleteDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBClusterRequest method. -// req, resp := client.DeleteDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBCluster -func (c *Neptune) DeleteDBClusterRequest(input *DeleteDBClusterInput) (req *request.Request, output *DeleteDBClusterOutput) { - op := &request.Operation{ - Name: opDeleteDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBClusterInput{} - } - - output = &DeleteDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDBCluster API operation for Amazon Neptune. -// -// The DeleteDBCluster action deletes a previously provisioned DB cluster. When -// you delete a DB cluster, all automated backups for that DB cluster are deleted -// and can't be recovered. Manual DB cluster snapshots of the specified DB cluster -// are not deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DeleteDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. -// -// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// User already has a DB cluster snapshot with the given identifier. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBCluster -func (c *Neptune) DeleteDBCluster(input *DeleteDBClusterInput) (*DeleteDBClusterOutput, error) { - req, out := c.DeleteDBClusterRequest(input) - return out, req.Send() -} - -// DeleteDBClusterWithContext is the same as DeleteDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DeleteDBClusterWithContext(ctx aws.Context, input *DeleteDBClusterInput, opts ...request.Option) (*DeleteDBClusterOutput, error) { - req, out := c.DeleteDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBClusterParameterGroup = "DeleteDBClusterParameterGroup" - -// DeleteDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBClusterParameterGroup for more information on using the DeleteDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBClusterParameterGroupRequest method. -// req, resp := client.DeleteDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBClusterParameterGroup -func (c *Neptune) DeleteDBClusterParameterGroupRequest(input *DeleteDBClusterParameterGroupInput) (req *request.Request, output *DeleteDBClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opDeleteDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBClusterParameterGroupInput{} - } - - output = &DeleteDBClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDBClusterParameterGroup API operation for Amazon Neptune. -// -// Deletes a specified DB cluster parameter group. The DB cluster parameter -// group to be deleted can't be associated with any DB clusters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DeleteDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group -// is in this state. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBClusterParameterGroup -func (c *Neptune) DeleteDBClusterParameterGroup(input *DeleteDBClusterParameterGroupInput) (*DeleteDBClusterParameterGroupOutput, error) { - req, out := c.DeleteDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// DeleteDBClusterParameterGroupWithContext is the same as DeleteDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DeleteDBClusterParameterGroupWithContext(ctx aws.Context, input *DeleteDBClusterParameterGroupInput, opts ...request.Option) (*DeleteDBClusterParameterGroupOutput, error) { - req, out := c.DeleteDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBClusterSnapshot = "DeleteDBClusterSnapshot" - -// DeleteDBClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBClusterSnapshot for more information on using the DeleteDBClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBClusterSnapshotRequest method. -// req, resp := client.DeleteDBClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBClusterSnapshot -func (c *Neptune) DeleteDBClusterSnapshotRequest(input *DeleteDBClusterSnapshotInput) (req *request.Request, output *DeleteDBClusterSnapshotOutput) { - op := &request.Operation{ - Name: opDeleteDBClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBClusterSnapshotInput{} - } - - output = &DeleteDBClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDBClusterSnapshot API operation for Amazon Neptune. -// -// Deletes a DB cluster snapshot. If the snapshot is being copied, the copy -// operation is terminated. -// -// The DB cluster snapshot must be in the available state to be deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DeleteDBClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. -// -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBClusterSnapshot -func (c *Neptune) DeleteDBClusterSnapshot(input *DeleteDBClusterSnapshotInput) (*DeleteDBClusterSnapshotOutput, error) { - req, out := c.DeleteDBClusterSnapshotRequest(input) - return out, req.Send() -} - -// DeleteDBClusterSnapshotWithContext is the same as DeleteDBClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DeleteDBClusterSnapshotWithContext(ctx aws.Context, input *DeleteDBClusterSnapshotInput, opts ...request.Option) (*DeleteDBClusterSnapshotOutput, error) { - req, out := c.DeleteDBClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBInstance = "DeleteDBInstance" - -// DeleteDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBInstance for more information on using the DeleteDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBInstanceRequest method. -// req, resp := client.DeleteDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBInstance -func (c *Neptune) DeleteDBInstanceRequest(input *DeleteDBInstanceInput) (req *request.Request, output *DeleteDBInstanceOutput) { - op := &request.Operation{ - Name: opDeleteDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBInstanceInput{} - } - - output = &DeleteDBInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDBInstance API operation for Amazon Neptune. -// -// The DeleteDBInstance action deletes a previously provisioned DB instance. -// When you delete a DB instance, all automated backups for that instance are -// deleted and can't be recovered. Manual DB snapshots of the DB instance to -// be deleted by DeleteDBInstance are not deleted. -// -// If you request a final DB snapshot the status of the Amazon Neptune DB instance -// is deleting until the DB snapshot is created. The API action DescribeDBInstance -// is used to monitor the status of this operation. The action can't be canceled -// or reverted once submitted. -// -// Note that when a DB instance is in a failure state and has a status of failed, -// incompatible-restore, or incompatible-network, you can only delete it when -// the SkipFinalSnapshot parameter is set to true. -// -// If the specified DB instance is part of a DB cluster, you can't delete the -// DB instance if both of the following conditions are true: -// -// * The DB cluster is a Read Replica of another DB cluster. -// -// * The DB instance is the only instance in the DB cluster. -// -// To delete a DB instance in this case, first call the PromoteReadReplicaDBCluster -// API action to promote the DB cluster so it's no longer a Read Replica. After -// the promotion completes, then call the DeleteDBInstance API action to delete -// the final instance in the DB cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DeleteDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. -// -// * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" -// DBSnapshotIdentifier is already used by an existing snapshot. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBInstance -func (c *Neptune) DeleteDBInstance(input *DeleteDBInstanceInput) (*DeleteDBInstanceOutput, error) { - req, out := c.DeleteDBInstanceRequest(input) - return out, req.Send() -} - -// DeleteDBInstanceWithContext is the same as DeleteDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DeleteDBInstanceWithContext(ctx aws.Context, input *DeleteDBInstanceInput, opts ...request.Option) (*DeleteDBInstanceOutput, error) { - req, out := c.DeleteDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBParameterGroup = "DeleteDBParameterGroup" - -// DeleteDBParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBParameterGroup for more information on using the DeleteDBParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBParameterGroupRequest method. -// req, resp := client.DeleteDBParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBParameterGroup -func (c *Neptune) DeleteDBParameterGroupRequest(input *DeleteDBParameterGroupInput) (req *request.Request, output *DeleteDBParameterGroupOutput) { - op := &request.Operation{ - Name: opDeleteDBParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBParameterGroupInput{} - } - - output = &DeleteDBParameterGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDBParameterGroup API operation for Amazon Neptune. -// -// Deletes a specified DBParameterGroup. The DBParameterGroup to be deleted -// can't be associated with any DB instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DeleteDBParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group -// is in this state. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBParameterGroup -func (c *Neptune) DeleteDBParameterGroup(input *DeleteDBParameterGroupInput) (*DeleteDBParameterGroupOutput, error) { - req, out := c.DeleteDBParameterGroupRequest(input) - return out, req.Send() -} - -// DeleteDBParameterGroupWithContext is the same as DeleteDBParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DeleteDBParameterGroupWithContext(ctx aws.Context, input *DeleteDBParameterGroupInput, opts ...request.Option) (*DeleteDBParameterGroupOutput, error) { - req, out := c.DeleteDBParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBSubnetGroup = "DeleteDBSubnetGroup" - -// DeleteDBSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBSubnetGroup for more information on using the DeleteDBSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBSubnetGroupRequest method. -// req, resp := client.DeleteDBSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBSubnetGroup -func (c *Neptune) DeleteDBSubnetGroupRequest(input *DeleteDBSubnetGroupInput) (req *request.Request, output *DeleteDBSubnetGroupOutput) { - op := &request.Operation{ - Name: opDeleteDBSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBSubnetGroupInput{} - } - - output = &DeleteDBSubnetGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDBSubnetGroup API operation for Amazon Neptune. -// -// Deletes a DB subnet group. -// -// The specified database subnet group must not be associated with any DB instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DeleteDBSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it is in use. -// -// * ErrCodeInvalidDBSubnetStateFault "InvalidDBSubnetStateFault" -// The DB subnet is not in the available state. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBSubnetGroup -func (c *Neptune) DeleteDBSubnetGroup(input *DeleteDBSubnetGroupInput) (*DeleteDBSubnetGroupOutput, error) { - req, out := c.DeleteDBSubnetGroupRequest(input) - return out, req.Send() -} - -// DeleteDBSubnetGroupWithContext is the same as DeleteDBSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DeleteDBSubnetGroupWithContext(ctx aws.Context, input *DeleteDBSubnetGroupInput, opts ...request.Option) (*DeleteDBSubnetGroupOutput, error) { - req, out := c.DeleteDBSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEventSubscription = "DeleteEventSubscription" - -// DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEventSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEventSubscription for more information on using the DeleteEventSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEventSubscriptionRequest method. -// req, resp := client.DeleteEventSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteEventSubscription -func (c *Neptune) DeleteEventSubscriptionRequest(input *DeleteEventSubscriptionInput) (req *request.Request, output *DeleteEventSubscriptionOutput) { - op := &request.Operation{ - Name: opDeleteEventSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteEventSubscriptionInput{} - } - - output = &DeleteEventSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteEventSubscription API operation for Amazon Neptune. -// -// Deletes an event notification subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DeleteEventSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" -// -// * ErrCodeInvalidEventSubscriptionStateFault "InvalidEventSubscriptionState" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteEventSubscription -func (c *Neptune) DeleteEventSubscription(input *DeleteEventSubscriptionInput) (*DeleteEventSubscriptionOutput, error) { - req, out := c.DeleteEventSubscriptionRequest(input) - return out, req.Send() -} - -// DeleteEventSubscriptionWithContext is the same as DeleteEventSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEventSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DeleteEventSubscriptionWithContext(ctx aws.Context, input *DeleteEventSubscriptionInput, opts ...request.Option) (*DeleteEventSubscriptionOutput, error) { - req, out := c.DeleteEventSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusterParameterGroups = "DescribeDBClusterParameterGroups" - -// DescribeDBClusterParameterGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusterParameterGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusterParameterGroups for more information on using the DescribeDBClusterParameterGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClusterParameterGroupsRequest method. -// req, resp := client.DescribeDBClusterParameterGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterParameterGroups -func (c *Neptune) DescribeDBClusterParameterGroupsRequest(input *DescribeDBClusterParameterGroupsInput) (req *request.Request, output *DescribeDBClusterParameterGroupsOutput) { - op := &request.Operation{ - Name: opDescribeDBClusterParameterGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClusterParameterGroupsInput{} - } - - output = &DescribeDBClusterParameterGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusterParameterGroups API operation for Amazon Neptune. -// -// Returns a list of DBClusterParameterGroup descriptions. If a DBClusterParameterGroupName -// parameter is specified, the list will contain only the description of the -// specified DB cluster parameter group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeDBClusterParameterGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterParameterGroups -func (c *Neptune) DescribeDBClusterParameterGroups(input *DescribeDBClusterParameterGroupsInput) (*DescribeDBClusterParameterGroupsOutput, error) { - req, out := c.DescribeDBClusterParameterGroupsRequest(input) - return out, req.Send() -} - -// DescribeDBClusterParameterGroupsWithContext is the same as DescribeDBClusterParameterGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusterParameterGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeDBClusterParameterGroupsWithContext(ctx aws.Context, input *DescribeDBClusterParameterGroupsInput, opts ...request.Option) (*DescribeDBClusterParameterGroupsOutput, error) { - req, out := c.DescribeDBClusterParameterGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusterParameters = "DescribeDBClusterParameters" - -// DescribeDBClusterParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusterParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusterParameters for more information on using the DescribeDBClusterParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClusterParametersRequest method. -// req, resp := client.DescribeDBClusterParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterParameters -func (c *Neptune) DescribeDBClusterParametersRequest(input *DescribeDBClusterParametersInput) (req *request.Request, output *DescribeDBClusterParametersOutput) { - op := &request.Operation{ - Name: opDescribeDBClusterParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClusterParametersInput{} - } - - output = &DescribeDBClusterParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusterParameters API operation for Amazon Neptune. -// -// Returns the detailed parameter list for a particular DB cluster parameter -// group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeDBClusterParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterParameters -func (c *Neptune) DescribeDBClusterParameters(input *DescribeDBClusterParametersInput) (*DescribeDBClusterParametersOutput, error) { - req, out := c.DescribeDBClusterParametersRequest(input) - return out, req.Send() -} - -// DescribeDBClusterParametersWithContext is the same as DescribeDBClusterParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusterParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeDBClusterParametersWithContext(ctx aws.Context, input *DescribeDBClusterParametersInput, opts ...request.Option) (*DescribeDBClusterParametersOutput, error) { - req, out := c.DescribeDBClusterParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusterSnapshotAttributes = "DescribeDBClusterSnapshotAttributes" - -// DescribeDBClusterSnapshotAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusterSnapshotAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusterSnapshotAttributes for more information on using the DescribeDBClusterSnapshotAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClusterSnapshotAttributesRequest method. -// req, resp := client.DescribeDBClusterSnapshotAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterSnapshotAttributes -func (c *Neptune) DescribeDBClusterSnapshotAttributesRequest(input *DescribeDBClusterSnapshotAttributesInput) (req *request.Request, output *DescribeDBClusterSnapshotAttributesOutput) { - op := &request.Operation{ - Name: opDescribeDBClusterSnapshotAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClusterSnapshotAttributesInput{} - } - - output = &DescribeDBClusterSnapshotAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusterSnapshotAttributes API operation for Amazon Neptune. -// -// Returns a list of DB cluster snapshot attribute names and values for a manual -// DB cluster snapshot. -// -// When sharing snapshots with other AWS accounts, DescribeDBClusterSnapshotAttributes -// returns the restore attribute and a list of IDs for the AWS accounts that -// are authorized to copy or restore the manual DB cluster snapshot. If all -// is included in the list of values for the restore attribute, then the manual -// DB cluster snapshot is public and can be copied or restored by all AWS accounts. -// -// To add or remove access for an AWS account to copy or restore a manual DB -// cluster snapshot, or to make the manual DB cluster snapshot public or private, -// use the ModifyDBClusterSnapshotAttribute API action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeDBClusterSnapshotAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterSnapshotAttributes -func (c *Neptune) DescribeDBClusterSnapshotAttributes(input *DescribeDBClusterSnapshotAttributesInput) (*DescribeDBClusterSnapshotAttributesOutput, error) { - req, out := c.DescribeDBClusterSnapshotAttributesRequest(input) - return out, req.Send() -} - -// DescribeDBClusterSnapshotAttributesWithContext is the same as DescribeDBClusterSnapshotAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusterSnapshotAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeDBClusterSnapshotAttributesWithContext(ctx aws.Context, input *DescribeDBClusterSnapshotAttributesInput, opts ...request.Option) (*DescribeDBClusterSnapshotAttributesOutput, error) { - req, out := c.DescribeDBClusterSnapshotAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusterSnapshots = "DescribeDBClusterSnapshots" - -// DescribeDBClusterSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusterSnapshots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusterSnapshots for more information on using the DescribeDBClusterSnapshots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClusterSnapshotsRequest method. -// req, resp := client.DescribeDBClusterSnapshotsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterSnapshots -func (c *Neptune) DescribeDBClusterSnapshotsRequest(input *DescribeDBClusterSnapshotsInput) (req *request.Request, output *DescribeDBClusterSnapshotsOutput) { - op := &request.Operation{ - Name: opDescribeDBClusterSnapshots, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClusterSnapshotsInput{} - } - - output = &DescribeDBClusterSnapshotsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusterSnapshots API operation for Amazon Neptune. -// -// Returns information about DB cluster snapshots. This API action supports -// pagination. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeDBClusterSnapshots for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterSnapshots -func (c *Neptune) DescribeDBClusterSnapshots(input *DescribeDBClusterSnapshotsInput) (*DescribeDBClusterSnapshotsOutput, error) { - req, out := c.DescribeDBClusterSnapshotsRequest(input) - return out, req.Send() -} - -// DescribeDBClusterSnapshotsWithContext is the same as DescribeDBClusterSnapshots with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusterSnapshots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeDBClusterSnapshotsWithContext(ctx aws.Context, input *DescribeDBClusterSnapshotsInput, opts ...request.Option) (*DescribeDBClusterSnapshotsOutput, error) { - req, out := c.DescribeDBClusterSnapshotsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusters = "DescribeDBClusters" - -// DescribeDBClustersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusters for more information on using the DescribeDBClusters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClustersRequest method. -// req, resp := client.DescribeDBClustersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusters -func (c *Neptune) DescribeDBClustersRequest(input *DescribeDBClustersInput) (req *request.Request, output *DescribeDBClustersOutput) { - op := &request.Operation{ - Name: opDescribeDBClusters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClustersInput{} - } - - output = &DescribeDBClustersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusters API operation for Amazon Neptune. -// -// Returns information about provisioned DB clusters. This API supports pagination. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeDBClusters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusters -func (c *Neptune) DescribeDBClusters(input *DescribeDBClustersInput) (*DescribeDBClustersOutput, error) { - req, out := c.DescribeDBClustersRequest(input) - return out, req.Send() -} - -// DescribeDBClustersWithContext is the same as DescribeDBClusters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeDBClustersWithContext(ctx aws.Context, input *DescribeDBClustersInput, opts ...request.Option) (*DescribeDBClustersOutput, error) { - req, out := c.DescribeDBClustersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBEngineVersions = "DescribeDBEngineVersions" - -// DescribeDBEngineVersionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBEngineVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBEngineVersions for more information on using the DescribeDBEngineVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBEngineVersionsRequest method. -// req, resp := client.DescribeDBEngineVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBEngineVersions -func (c *Neptune) DescribeDBEngineVersionsRequest(input *DescribeDBEngineVersionsInput) (req *request.Request, output *DescribeDBEngineVersionsOutput) { - op := &request.Operation{ - Name: opDescribeDBEngineVersions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBEngineVersionsInput{} - } - - output = &DescribeDBEngineVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBEngineVersions API operation for Amazon Neptune. -// -// Returns a list of the available DB engines. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeDBEngineVersions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBEngineVersions -func (c *Neptune) DescribeDBEngineVersions(input *DescribeDBEngineVersionsInput) (*DescribeDBEngineVersionsOutput, error) { - req, out := c.DescribeDBEngineVersionsRequest(input) - return out, req.Send() -} - -// DescribeDBEngineVersionsWithContext is the same as DescribeDBEngineVersions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBEngineVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeDBEngineVersionsWithContext(ctx aws.Context, input *DescribeDBEngineVersionsInput, opts ...request.Option) (*DescribeDBEngineVersionsOutput, error) { - req, out := c.DescribeDBEngineVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBEngineVersionsPages iterates over the pages of a DescribeDBEngineVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBEngineVersions 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 DescribeDBEngineVersions operation. -// pageNum := 0 -// err := client.DescribeDBEngineVersionsPages(params, -// func(page *DescribeDBEngineVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Neptune) DescribeDBEngineVersionsPages(input *DescribeDBEngineVersionsInput, fn func(*DescribeDBEngineVersionsOutput, bool) bool) error { - return c.DescribeDBEngineVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBEngineVersionsPagesWithContext same as DescribeDBEngineVersionsPages 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 *Neptune) DescribeDBEngineVersionsPagesWithContext(ctx aws.Context, input *DescribeDBEngineVersionsInput, fn func(*DescribeDBEngineVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBEngineVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBEngineVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBEngineVersionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBInstances = "DescribeDBInstances" - -// DescribeDBInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBInstances for more information on using the DescribeDBInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBInstancesRequest method. -// req, resp := client.DescribeDBInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBInstances -func (c *Neptune) DescribeDBInstancesRequest(input *DescribeDBInstancesInput) (req *request.Request, output *DescribeDBInstancesOutput) { - op := &request.Operation{ - Name: opDescribeDBInstances, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBInstancesInput{} - } - - output = &DescribeDBInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBInstances API operation for Amazon Neptune. -// -// Returns information about provisioned instances. This API supports pagination. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeDBInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBInstances -func (c *Neptune) DescribeDBInstances(input *DescribeDBInstancesInput) (*DescribeDBInstancesOutput, error) { - req, out := c.DescribeDBInstancesRequest(input) - return out, req.Send() -} - -// DescribeDBInstancesWithContext is the same as DescribeDBInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeDBInstancesWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.Option) (*DescribeDBInstancesOutput, error) { - req, out := c.DescribeDBInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBInstancesPages iterates over the pages of a DescribeDBInstances operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBInstances 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 DescribeDBInstances operation. -// pageNum := 0 -// err := client.DescribeDBInstancesPages(params, -// func(page *DescribeDBInstancesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Neptune) DescribeDBInstancesPages(input *DescribeDBInstancesInput, fn func(*DescribeDBInstancesOutput, bool) bool) error { - return c.DescribeDBInstancesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBInstancesPagesWithContext same as DescribeDBInstancesPages 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 *Neptune) DescribeDBInstancesPagesWithContext(ctx aws.Context, input *DescribeDBInstancesInput, fn func(*DescribeDBInstancesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBInstancesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBParameterGroups = "DescribeDBParameterGroups" - -// DescribeDBParameterGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBParameterGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBParameterGroups for more information on using the DescribeDBParameterGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBParameterGroupsRequest method. -// req, resp := client.DescribeDBParameterGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBParameterGroups -func (c *Neptune) DescribeDBParameterGroupsRequest(input *DescribeDBParameterGroupsInput) (req *request.Request, output *DescribeDBParameterGroupsOutput) { - op := &request.Operation{ - Name: opDescribeDBParameterGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBParameterGroupsInput{} - } - - output = &DescribeDBParameterGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBParameterGroups API operation for Amazon Neptune. -// -// Returns a list of DBParameterGroup descriptions. If a DBParameterGroupName -// is specified, the list will contain only the description of the specified -// DB parameter group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeDBParameterGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBParameterGroups -func (c *Neptune) DescribeDBParameterGroups(input *DescribeDBParameterGroupsInput) (*DescribeDBParameterGroupsOutput, error) { - req, out := c.DescribeDBParameterGroupsRequest(input) - return out, req.Send() -} - -// DescribeDBParameterGroupsWithContext is the same as DescribeDBParameterGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBParameterGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeDBParameterGroupsWithContext(ctx aws.Context, input *DescribeDBParameterGroupsInput, opts ...request.Option) (*DescribeDBParameterGroupsOutput, error) { - req, out := c.DescribeDBParameterGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBParameterGroupsPages iterates over the pages of a DescribeDBParameterGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBParameterGroups 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 DescribeDBParameterGroups operation. -// pageNum := 0 -// err := client.DescribeDBParameterGroupsPages(params, -// func(page *DescribeDBParameterGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Neptune) DescribeDBParameterGroupsPages(input *DescribeDBParameterGroupsInput, fn func(*DescribeDBParameterGroupsOutput, bool) bool) error { - return c.DescribeDBParameterGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBParameterGroupsPagesWithContext same as DescribeDBParameterGroupsPages 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 *Neptune) DescribeDBParameterGroupsPagesWithContext(ctx aws.Context, input *DescribeDBParameterGroupsInput, fn func(*DescribeDBParameterGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBParameterGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBParameterGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBParameterGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBParameters = "DescribeDBParameters" - -// DescribeDBParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBParameters for more information on using the DescribeDBParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBParametersRequest method. -// req, resp := client.DescribeDBParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBParameters -func (c *Neptune) DescribeDBParametersRequest(input *DescribeDBParametersInput) (req *request.Request, output *DescribeDBParametersOutput) { - op := &request.Operation{ - Name: opDescribeDBParameters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBParametersInput{} - } - - output = &DescribeDBParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBParameters API operation for Amazon Neptune. -// -// Returns the detailed parameter list for a particular DB parameter group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeDBParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBParameters -func (c *Neptune) DescribeDBParameters(input *DescribeDBParametersInput) (*DescribeDBParametersOutput, error) { - req, out := c.DescribeDBParametersRequest(input) - return out, req.Send() -} - -// DescribeDBParametersWithContext is the same as DescribeDBParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeDBParametersWithContext(ctx aws.Context, input *DescribeDBParametersInput, opts ...request.Option) (*DescribeDBParametersOutput, error) { - req, out := c.DescribeDBParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBParametersPages iterates over the pages of a DescribeDBParameters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBParameters 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 DescribeDBParameters operation. -// pageNum := 0 -// err := client.DescribeDBParametersPages(params, -// func(page *DescribeDBParametersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Neptune) DescribeDBParametersPages(input *DescribeDBParametersInput, fn func(*DescribeDBParametersOutput, bool) bool) error { - return c.DescribeDBParametersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBParametersPagesWithContext same as DescribeDBParametersPages 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 *Neptune) DescribeDBParametersPagesWithContext(ctx aws.Context, input *DescribeDBParametersInput, fn func(*DescribeDBParametersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBParametersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBParametersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBParametersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBSubnetGroups = "DescribeDBSubnetGroups" - -// DescribeDBSubnetGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBSubnetGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBSubnetGroups for more information on using the DescribeDBSubnetGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBSubnetGroupsRequest method. -// req, resp := client.DescribeDBSubnetGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBSubnetGroups -func (c *Neptune) DescribeDBSubnetGroupsRequest(input *DescribeDBSubnetGroupsInput) (req *request.Request, output *DescribeDBSubnetGroupsOutput) { - op := &request.Operation{ - Name: opDescribeDBSubnetGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBSubnetGroupsInput{} - } - - output = &DescribeDBSubnetGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBSubnetGroups API operation for Amazon Neptune. -// -// Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified, -// the list will contain only the descriptions of the specified DBSubnetGroup. -// -// For an overview of CIDR ranges, go to the Wikipedia Tutorial (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeDBSubnetGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBSubnetGroups -func (c *Neptune) DescribeDBSubnetGroups(input *DescribeDBSubnetGroupsInput) (*DescribeDBSubnetGroupsOutput, error) { - req, out := c.DescribeDBSubnetGroupsRequest(input) - return out, req.Send() -} - -// DescribeDBSubnetGroupsWithContext is the same as DescribeDBSubnetGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBSubnetGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeDBSubnetGroupsWithContext(ctx aws.Context, input *DescribeDBSubnetGroupsInput, opts ...request.Option) (*DescribeDBSubnetGroupsOutput, error) { - req, out := c.DescribeDBSubnetGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBSubnetGroupsPages iterates over the pages of a DescribeDBSubnetGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBSubnetGroups 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 DescribeDBSubnetGroups operation. -// pageNum := 0 -// err := client.DescribeDBSubnetGroupsPages(params, -// func(page *DescribeDBSubnetGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Neptune) DescribeDBSubnetGroupsPages(input *DescribeDBSubnetGroupsInput, fn func(*DescribeDBSubnetGroupsOutput, bool) bool) error { - return c.DescribeDBSubnetGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBSubnetGroupsPagesWithContext same as DescribeDBSubnetGroupsPages 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 *Neptune) DescribeDBSubnetGroupsPagesWithContext(ctx aws.Context, input *DescribeDBSubnetGroupsInput, fn func(*DescribeDBSubnetGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBSubnetGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBSubnetGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBSubnetGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEngineDefaultClusterParameters = "DescribeEngineDefaultClusterParameters" - -// DescribeEngineDefaultClusterParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEngineDefaultClusterParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEngineDefaultClusterParameters for more information on using the DescribeEngineDefaultClusterParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEngineDefaultClusterParametersRequest method. -// req, resp := client.DescribeEngineDefaultClusterParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEngineDefaultClusterParameters -func (c *Neptune) DescribeEngineDefaultClusterParametersRequest(input *DescribeEngineDefaultClusterParametersInput) (req *request.Request, output *DescribeEngineDefaultClusterParametersOutput) { - op := &request.Operation{ - Name: opDescribeEngineDefaultClusterParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEngineDefaultClusterParametersInput{} - } - - output = &DescribeEngineDefaultClusterParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEngineDefaultClusterParameters API operation for Amazon Neptune. -// -// Returns the default engine and system parameter information for the cluster -// database engine. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeEngineDefaultClusterParameters for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEngineDefaultClusterParameters -func (c *Neptune) DescribeEngineDefaultClusterParameters(input *DescribeEngineDefaultClusterParametersInput) (*DescribeEngineDefaultClusterParametersOutput, error) { - req, out := c.DescribeEngineDefaultClusterParametersRequest(input) - return out, req.Send() -} - -// DescribeEngineDefaultClusterParametersWithContext is the same as DescribeEngineDefaultClusterParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEngineDefaultClusterParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeEngineDefaultClusterParametersWithContext(ctx aws.Context, input *DescribeEngineDefaultClusterParametersInput, opts ...request.Option) (*DescribeEngineDefaultClusterParametersOutput, error) { - req, out := c.DescribeEngineDefaultClusterParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEngineDefaultParameters = "DescribeEngineDefaultParameters" - -// DescribeEngineDefaultParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEngineDefaultParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEngineDefaultParameters for more information on using the DescribeEngineDefaultParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEngineDefaultParametersRequest method. -// req, resp := client.DescribeEngineDefaultParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEngineDefaultParameters -func (c *Neptune) DescribeEngineDefaultParametersRequest(input *DescribeEngineDefaultParametersInput) (req *request.Request, output *DescribeEngineDefaultParametersOutput) { - op := &request.Operation{ - Name: opDescribeEngineDefaultParameters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"EngineDefaults.Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEngineDefaultParametersInput{} - } - - output = &DescribeEngineDefaultParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEngineDefaultParameters API operation for Amazon Neptune. -// -// Returns the default engine and system parameter information for the specified -// database engine. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeEngineDefaultParameters for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEngineDefaultParameters -func (c *Neptune) DescribeEngineDefaultParameters(input *DescribeEngineDefaultParametersInput) (*DescribeEngineDefaultParametersOutput, error) { - req, out := c.DescribeEngineDefaultParametersRequest(input) - return out, req.Send() -} - -// DescribeEngineDefaultParametersWithContext is the same as DescribeEngineDefaultParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEngineDefaultParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeEngineDefaultParametersWithContext(ctx aws.Context, input *DescribeEngineDefaultParametersInput, opts ...request.Option) (*DescribeEngineDefaultParametersOutput, error) { - req, out := c.DescribeEngineDefaultParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEngineDefaultParametersPages iterates over the pages of a DescribeEngineDefaultParameters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEngineDefaultParameters 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 DescribeEngineDefaultParameters operation. -// pageNum := 0 -// err := client.DescribeEngineDefaultParametersPages(params, -// func(page *DescribeEngineDefaultParametersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Neptune) DescribeEngineDefaultParametersPages(input *DescribeEngineDefaultParametersInput, fn func(*DescribeEngineDefaultParametersOutput, bool) bool) error { - return c.DescribeEngineDefaultParametersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEngineDefaultParametersPagesWithContext same as DescribeEngineDefaultParametersPages 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 *Neptune) DescribeEngineDefaultParametersPagesWithContext(ctx aws.Context, input *DescribeEngineDefaultParametersInput, fn func(*DescribeEngineDefaultParametersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEngineDefaultParametersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEngineDefaultParametersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEngineDefaultParametersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEventCategories = "DescribeEventCategories" - -// DescribeEventCategoriesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEventCategories operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEventCategories for more information on using the DescribeEventCategories -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventCategoriesRequest method. -// req, resp := client.DescribeEventCategoriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEventCategories -func (c *Neptune) DescribeEventCategoriesRequest(input *DescribeEventCategoriesInput) (req *request.Request, output *DescribeEventCategoriesOutput) { - op := &request.Operation{ - Name: opDescribeEventCategories, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEventCategoriesInput{} - } - - output = &DescribeEventCategoriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEventCategories API operation for Amazon Neptune. -// -// Displays a list of categories for all event source types, or, if specified, -// for a specified source type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeEventCategories for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEventCategories -func (c *Neptune) DescribeEventCategories(input *DescribeEventCategoriesInput) (*DescribeEventCategoriesOutput, error) { - req, out := c.DescribeEventCategoriesRequest(input) - return out, req.Send() -} - -// DescribeEventCategoriesWithContext is the same as DescribeEventCategories with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEventCategories for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeEventCategoriesWithContext(ctx aws.Context, input *DescribeEventCategoriesInput, opts ...request.Option) (*DescribeEventCategoriesOutput, error) { - req, out := c.DescribeEventCategoriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEventSubscriptions = "DescribeEventSubscriptions" - -// DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEventSubscriptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEventSubscriptions for more information on using the DescribeEventSubscriptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventSubscriptionsRequest method. -// req, resp := client.DescribeEventSubscriptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEventSubscriptions -func (c *Neptune) DescribeEventSubscriptionsRequest(input *DescribeEventSubscriptionsInput) (req *request.Request, output *DescribeEventSubscriptionsOutput) { - op := &request.Operation{ - Name: opDescribeEventSubscriptions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEventSubscriptionsInput{} - } - - output = &DescribeEventSubscriptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEventSubscriptions API operation for Amazon Neptune. -// -// Lists all the subscription descriptions for a customer account. The description -// for a subscription includes SubscriptionName, SNSTopicARN, CustomerID, SourceType, -// SourceID, CreationTime, and Status. -// -// If you specify a SubscriptionName, lists the description for that subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeEventSubscriptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEventSubscriptions -func (c *Neptune) DescribeEventSubscriptions(input *DescribeEventSubscriptionsInput) (*DescribeEventSubscriptionsOutput, error) { - req, out := c.DescribeEventSubscriptionsRequest(input) - return out, req.Send() -} - -// DescribeEventSubscriptionsWithContext is the same as DescribeEventSubscriptions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEventSubscriptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeEventSubscriptionsWithContext(ctx aws.Context, input *DescribeEventSubscriptionsInput, opts ...request.Option) (*DescribeEventSubscriptionsOutput, error) { - req, out := c.DescribeEventSubscriptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEventSubscriptionsPages iterates over the pages of a DescribeEventSubscriptions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEventSubscriptions 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 DescribeEventSubscriptions operation. -// pageNum := 0 -// err := client.DescribeEventSubscriptionsPages(params, -// func(page *DescribeEventSubscriptionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Neptune) DescribeEventSubscriptionsPages(input *DescribeEventSubscriptionsInput, fn func(*DescribeEventSubscriptionsOutput, bool) bool) error { - return c.DescribeEventSubscriptionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEventSubscriptionsPagesWithContext same as DescribeEventSubscriptionsPages 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 *Neptune) DescribeEventSubscriptionsPagesWithContext(ctx aws.Context, input *DescribeEventSubscriptionsInput, fn func(*DescribeEventSubscriptionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEventSubscriptionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEventSubscriptionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventSubscriptionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEvents = "DescribeEvents" - -// DescribeEventsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEvents for more information on using the DescribeEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventsRequest method. -// req, resp := client.DescribeEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEvents -func (c *Neptune) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Request, output *DescribeEventsOutput) { - op := &request.Operation{ - Name: opDescribeEvents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEventsInput{} - } - - output = &DescribeEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEvents API operation for Amazon Neptune. -// -// Returns events related to DB instances, DB security groups, DB snapshots, -// and DB parameter groups for the past 14 days. Events specific to a particular -// DB instance, DB security group, database snapshot, or DB parameter group -// can be obtained by providing the name as a parameter. By default, the past -// hour of events are returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeEvents for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEvents -func (c *Neptune) DescribeEvents(input *DescribeEventsInput) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - return out, req.Send() -} - -// DescribeEventsWithContext is the same as DescribeEvents with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeEventsWithContext(ctx aws.Context, input *DescribeEventsInput, opts ...request.Option) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEventsPages iterates over the pages of a DescribeEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEvents 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 DescribeEvents operation. -// pageNum := 0 -// err := client.DescribeEventsPages(params, -// func(page *DescribeEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Neptune) DescribeEventsPages(input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool) error { - return c.DescribeEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEventsPagesWithContext same as DescribeEventsPages 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 *Neptune) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeOrderableDBInstanceOptions = "DescribeOrderableDBInstanceOptions" - -// DescribeOrderableDBInstanceOptionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeOrderableDBInstanceOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeOrderableDBInstanceOptions for more information on using the DescribeOrderableDBInstanceOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeOrderableDBInstanceOptionsRequest method. -// req, resp := client.DescribeOrderableDBInstanceOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeOrderableDBInstanceOptions -func (c *Neptune) DescribeOrderableDBInstanceOptionsRequest(input *DescribeOrderableDBInstanceOptionsInput) (req *request.Request, output *DescribeOrderableDBInstanceOptionsOutput) { - op := &request.Operation{ - Name: opDescribeOrderableDBInstanceOptions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeOrderableDBInstanceOptionsInput{} - } - - output = &DescribeOrderableDBInstanceOptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeOrderableDBInstanceOptions API operation for Amazon Neptune. -// -// Returns a list of orderable DB instance options for the specified engine. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeOrderableDBInstanceOptions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeOrderableDBInstanceOptions -func (c *Neptune) DescribeOrderableDBInstanceOptions(input *DescribeOrderableDBInstanceOptionsInput) (*DescribeOrderableDBInstanceOptionsOutput, error) { - req, out := c.DescribeOrderableDBInstanceOptionsRequest(input) - return out, req.Send() -} - -// DescribeOrderableDBInstanceOptionsWithContext is the same as DescribeOrderableDBInstanceOptions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeOrderableDBInstanceOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeOrderableDBInstanceOptionsWithContext(ctx aws.Context, input *DescribeOrderableDBInstanceOptionsInput, opts ...request.Option) (*DescribeOrderableDBInstanceOptionsOutput, error) { - req, out := c.DescribeOrderableDBInstanceOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeOrderableDBInstanceOptionsPages iterates over the pages of a DescribeOrderableDBInstanceOptions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeOrderableDBInstanceOptions 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 DescribeOrderableDBInstanceOptions operation. -// pageNum := 0 -// err := client.DescribeOrderableDBInstanceOptionsPages(params, -// func(page *DescribeOrderableDBInstanceOptionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Neptune) DescribeOrderableDBInstanceOptionsPages(input *DescribeOrderableDBInstanceOptionsInput, fn func(*DescribeOrderableDBInstanceOptionsOutput, bool) bool) error { - return c.DescribeOrderableDBInstanceOptionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeOrderableDBInstanceOptionsPagesWithContext same as DescribeOrderableDBInstanceOptionsPages 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 *Neptune) DescribeOrderableDBInstanceOptionsPagesWithContext(ctx aws.Context, input *DescribeOrderableDBInstanceOptionsInput, fn func(*DescribeOrderableDBInstanceOptionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeOrderableDBInstanceOptionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeOrderableDBInstanceOptionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeOrderableDBInstanceOptionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribePendingMaintenanceActions = "DescribePendingMaintenanceActions" - -// DescribePendingMaintenanceActionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribePendingMaintenanceActions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePendingMaintenanceActions for more information on using the DescribePendingMaintenanceActions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePendingMaintenanceActionsRequest method. -// req, resp := client.DescribePendingMaintenanceActionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribePendingMaintenanceActions -func (c *Neptune) DescribePendingMaintenanceActionsRequest(input *DescribePendingMaintenanceActionsInput) (req *request.Request, output *DescribePendingMaintenanceActionsOutput) { - op := &request.Operation{ - Name: opDescribePendingMaintenanceActions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePendingMaintenanceActionsInput{} - } - - output = &DescribePendingMaintenanceActionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePendingMaintenanceActions API operation for Amazon Neptune. -// -// Returns a list of resources (for example, DB instances) that have at least -// one pending maintenance action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribePendingMaintenanceActions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The specified resource ID was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribePendingMaintenanceActions -func (c *Neptune) DescribePendingMaintenanceActions(input *DescribePendingMaintenanceActionsInput) (*DescribePendingMaintenanceActionsOutput, error) { - req, out := c.DescribePendingMaintenanceActionsRequest(input) - return out, req.Send() -} - -// DescribePendingMaintenanceActionsWithContext is the same as DescribePendingMaintenanceActions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePendingMaintenanceActions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribePendingMaintenanceActionsWithContext(ctx aws.Context, input *DescribePendingMaintenanceActionsInput, opts ...request.Option) (*DescribePendingMaintenanceActionsOutput, error) { - req, out := c.DescribePendingMaintenanceActionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeValidDBInstanceModifications = "DescribeValidDBInstanceModifications" - -// DescribeValidDBInstanceModificationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeValidDBInstanceModifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeValidDBInstanceModifications for more information on using the DescribeValidDBInstanceModifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeValidDBInstanceModificationsRequest method. -// req, resp := client.DescribeValidDBInstanceModificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeValidDBInstanceModifications -func (c *Neptune) DescribeValidDBInstanceModificationsRequest(input *DescribeValidDBInstanceModificationsInput) (req *request.Request, output *DescribeValidDBInstanceModificationsOutput) { - op := &request.Operation{ - Name: opDescribeValidDBInstanceModifications, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeValidDBInstanceModificationsInput{} - } - - output = &DescribeValidDBInstanceModificationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeValidDBInstanceModifications API operation for Amazon Neptune. -// -// You can call DescribeValidDBInstanceModifications to learn what modifications -// you can make to your DB instance. You can use this information when you call -// ModifyDBInstance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation DescribeValidDBInstanceModifications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeValidDBInstanceModifications -func (c *Neptune) DescribeValidDBInstanceModifications(input *DescribeValidDBInstanceModificationsInput) (*DescribeValidDBInstanceModificationsOutput, error) { - req, out := c.DescribeValidDBInstanceModificationsRequest(input) - return out, req.Send() -} - -// DescribeValidDBInstanceModificationsWithContext is the same as DescribeValidDBInstanceModifications with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeValidDBInstanceModifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) DescribeValidDBInstanceModificationsWithContext(ctx aws.Context, input *DescribeValidDBInstanceModificationsInput, opts ...request.Option) (*DescribeValidDBInstanceModificationsOutput, error) { - req, out := c.DescribeValidDBInstanceModificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opFailoverDBCluster = "FailoverDBCluster" - -// FailoverDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the FailoverDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See FailoverDBCluster for more information on using the FailoverDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the FailoverDBClusterRequest method. -// req, resp := client.FailoverDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/FailoverDBCluster -func (c *Neptune) FailoverDBClusterRequest(input *FailoverDBClusterInput) (req *request.Request, output *FailoverDBClusterOutput) { - op := &request.Operation{ - Name: opFailoverDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &FailoverDBClusterInput{} - } - - output = &FailoverDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// FailoverDBCluster API operation for Amazon Neptune. -// -// Forces a failover for a DB cluster. -// -// A failover for a DB cluster promotes one of the Read Replicas (read-only -// instances) in the DB cluster to be the primary instance (the cluster writer). -// -// Amazon Neptune will automatically fail over to a Read Replica, if one exists, -// when the primary instance fails. You can force a failover when you want to -// simulate a failure of a primary instance for testing. Because each instance -// in a DB cluster has its own endpoint address, you will need to clean up and -// re-establish any existing connections that use those endpoint addresses when -// the failover is complete. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation FailoverDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/FailoverDBCluster -func (c *Neptune) FailoverDBCluster(input *FailoverDBClusterInput) (*FailoverDBClusterOutput, error) { - req, out := c.FailoverDBClusterRequest(input) - return out, req.Send() -} - -// FailoverDBClusterWithContext is the same as FailoverDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See FailoverDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) FailoverDBClusterWithContext(ctx aws.Context, input *FailoverDBClusterInput, opts ...request.Option) (*FailoverDBClusterOutput, error) { - req, out := c.FailoverDBClusterRequest(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/neptune-2014-10-31/ListTagsForResource -func (c *Neptune) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for Amazon Neptune. -// -// Lists all tags on an Amazon Neptune resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ListTagsForResource -func (c *Neptune) 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 *Neptune) 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 opModifyDBCluster = "ModifyDBCluster" - -// ModifyDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBCluster for more information on using the ModifyDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBClusterRequest method. -// req, resp := client.ModifyDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBCluster -func (c *Neptune) ModifyDBClusterRequest(input *ModifyDBClusterInput) (req *request.Request, output *ModifyDBClusterOutput) { - op := &request.Operation{ - Name: opModifyDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBClusterInput{} - } - - output = &ModifyDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBCluster API operation for Amazon Neptune. -// -// Modify a setting for a DB cluster. You can change one or more database configuration -// parameters by specifying these parameters and the new values in the request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation ModifyDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. -// -// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it is in use. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName does not refer to an existing DB Cluster parameter -// group. -// -// * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group does not allow deletion. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. -// -// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// User already has a DB cluster with the given identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBCluster -func (c *Neptune) ModifyDBCluster(input *ModifyDBClusterInput) (*ModifyDBClusterOutput, error) { - req, out := c.ModifyDBClusterRequest(input) - return out, req.Send() -} - -// ModifyDBClusterWithContext is the same as ModifyDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) ModifyDBClusterWithContext(ctx aws.Context, input *ModifyDBClusterInput, opts ...request.Option) (*ModifyDBClusterOutput, error) { - req, out := c.ModifyDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBClusterParameterGroup = "ModifyDBClusterParameterGroup" - -// ModifyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBClusterParameterGroup for more information on using the ModifyDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBClusterParameterGroupRequest method. -// req, resp := client.ModifyDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBClusterParameterGroup -func (c *Neptune) ModifyDBClusterParameterGroupRequest(input *ModifyDBClusterParameterGroupInput) (req *request.Request, output *ResetDBClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opModifyDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBClusterParameterGroupInput{} - } - - output = &ResetDBClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBClusterParameterGroup API operation for Amazon Neptune. -// -// Modifies the parameters of a DB cluster parameter group. To modify more than -// one parameter, submit a list of the following: ParameterName, ParameterValue, -// and ApplyMethod. A maximum of 20 parameters can be modified in a single request. -// -// Changes to dynamic parameters are applied immediately. Changes to static -// parameters require a reboot without failover to the DB cluster associated -// with the parameter group before the change can take effect. -// -// After you create a DB cluster parameter group, you should wait at least 5 -// minutes before creating your first DB cluster that uses that DB cluster parameter -// group as the default parameter group. This allows Amazon Neptune to fully -// complete the create action before the parameter group is used as the default -// for a new DB cluster. This is especially important for parameters that are -// critical when creating the default database for a DB cluster, such as the -// character set for the default database defined by the character_set_database -// parameter. You can use the Parameter Groups option of the Amazon Neptune -// console or the DescribeDBClusterParameters command to verify that your DB -// cluster parameter group has been created or modified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation ModifyDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. -// -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group -// is in this state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBClusterParameterGroup -func (c *Neptune) ModifyDBClusterParameterGroup(input *ModifyDBClusterParameterGroupInput) (*ResetDBClusterParameterGroupOutput, error) { - req, out := c.ModifyDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// ModifyDBClusterParameterGroupWithContext is the same as ModifyDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) ModifyDBClusterParameterGroupWithContext(ctx aws.Context, input *ModifyDBClusterParameterGroupInput, opts ...request.Option) (*ResetDBClusterParameterGroupOutput, error) { - req, out := c.ModifyDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBClusterSnapshotAttribute = "ModifyDBClusterSnapshotAttribute" - -// ModifyDBClusterSnapshotAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBClusterSnapshotAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBClusterSnapshotAttribute for more information on using the ModifyDBClusterSnapshotAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBClusterSnapshotAttributeRequest method. -// req, resp := client.ModifyDBClusterSnapshotAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBClusterSnapshotAttribute -func (c *Neptune) ModifyDBClusterSnapshotAttributeRequest(input *ModifyDBClusterSnapshotAttributeInput) (req *request.Request, output *ModifyDBClusterSnapshotAttributeOutput) { - op := &request.Operation{ - Name: opModifyDBClusterSnapshotAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBClusterSnapshotAttributeInput{} - } - - output = &ModifyDBClusterSnapshotAttributeOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBClusterSnapshotAttribute API operation for Amazon Neptune. -// -// Adds an attribute and values to, or removes an attribute and values from, -// a manual DB cluster snapshot. -// -// To share a manual DB cluster snapshot with other AWS accounts, specify restore -// as the AttributeName and use the ValuesToAdd parameter to add a list of IDs -// of the AWS accounts that are authorized to restore the manual DB cluster -// snapshot. Use the value all to make the manual DB cluster snapshot public, -// which means that it can be copied or restored by all AWS accounts. Do not -// add the all value for any manual DB cluster snapshots that contain private -// information that you don't want available to all AWS accounts. If a manual -// DB cluster snapshot is encrypted, it can be shared, but only by specifying -// a list of authorized AWS account IDs for the ValuesToAdd parameter. You can't -// use all as a value for that parameter in this case. -// -// To view which AWS accounts have access to copy or restore a manual DB cluster -// snapshot, or whether a manual DB cluster snapshot public or private, use -// the DescribeDBClusterSnapshotAttributes API action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation ModifyDBClusterSnapshotAttribute for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. -// -// * ErrCodeSharedSnapshotQuotaExceededFault "SharedSnapshotQuotaExceeded" -// You have exceeded the maximum number of accounts that you can share a manual -// DB snapshot with. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBClusterSnapshotAttribute -func (c *Neptune) ModifyDBClusterSnapshotAttribute(input *ModifyDBClusterSnapshotAttributeInput) (*ModifyDBClusterSnapshotAttributeOutput, error) { - req, out := c.ModifyDBClusterSnapshotAttributeRequest(input) - return out, req.Send() -} - -// ModifyDBClusterSnapshotAttributeWithContext is the same as ModifyDBClusterSnapshotAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBClusterSnapshotAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) ModifyDBClusterSnapshotAttributeWithContext(ctx aws.Context, input *ModifyDBClusterSnapshotAttributeInput, opts ...request.Option) (*ModifyDBClusterSnapshotAttributeOutput, error) { - req, out := c.ModifyDBClusterSnapshotAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBInstance = "ModifyDBInstance" - -// ModifyDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBInstance for more information on using the ModifyDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBInstanceRequest method. -// req, resp := client.ModifyDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBInstance -func (c *Neptune) ModifyDBInstanceRequest(input *ModifyDBInstanceInput) (req *request.Request, output *ModifyDBInstanceOutput) { - op := &request.Operation{ - Name: opModifyDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBInstanceInput{} - } - - output = &ModifyDBInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBInstance API operation for Amazon Neptune. -// -// Modifies settings for a DB instance. You can change one or more database -// configuration parameters by specifying these parameters and the new values -// in the request. To learn what modifications you can make to your DB instance, -// call DescribeValidDBInstanceModifications before you call ModifyDBInstance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation ModifyDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. -// -// * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group does not allow deletion. -// -// * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// User already has a DB instance with the given identifier. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. -// -// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. -// -// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability -// Zone. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. -// -// * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" -// Provisioned IOPS not available in the specified Availability Zone. -// -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// -// * ErrCodeDBUpgradeDependencyFailureFault "DBUpgradeDependencyFailure" -// The DB upgrade failed because a resource the DB depends on could not be modified. -// -// * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// StorageType specified cannot be associated with the DB Instance. -// -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. -// -// Neptune may not also be authorized via IAM to perform necessary actions on -// your behalf. -// -// * ErrCodeCertificateNotFoundFault "CertificateNotFound" -// CertificateIdentifier does not refer to an existing certificate. -// -// * ErrCodeDomainNotFoundFault "DomainNotFoundFault" -// Domain does not refer to an existing Active Directory Domain. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBInstance -func (c *Neptune) ModifyDBInstance(input *ModifyDBInstanceInput) (*ModifyDBInstanceOutput, error) { - req, out := c.ModifyDBInstanceRequest(input) - return out, req.Send() -} - -// ModifyDBInstanceWithContext is the same as ModifyDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) ModifyDBInstanceWithContext(ctx aws.Context, input *ModifyDBInstanceInput, opts ...request.Option) (*ModifyDBInstanceOutput, error) { - req, out := c.ModifyDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBParameterGroup = "ModifyDBParameterGroup" - -// ModifyDBParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBParameterGroup for more information on using the ModifyDBParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBParameterGroupRequest method. -// req, resp := client.ModifyDBParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBParameterGroup -func (c *Neptune) ModifyDBParameterGroupRequest(input *ModifyDBParameterGroupInput) (req *request.Request, output *ResetDBParameterGroupOutput) { - op := &request.Operation{ - Name: opModifyDBParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBParameterGroupInput{} - } - - output = &ResetDBParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBParameterGroup API operation for Amazon Neptune. -// -// Modifies the parameters of a DB parameter group. To modify more than one -// parameter, submit a list of the following: ParameterName, ParameterValue, -// and ApplyMethod. A maximum of 20 parameters can be modified in a single request. -// -// Changes to dynamic parameters are applied immediately. Changes to static -// parameters require a reboot without failover to the DB instance associated -// with the parameter group before the change can take effect. -// -// After you modify a DB parameter group, you should wait at least 5 minutes -// before creating your first DB instance that uses that DB parameter group -// as the default parameter group. This allows Amazon Neptune to fully complete -// the modify action before the parameter group is used as the default for a -// new DB instance. This is especially important for parameters that are critical -// when creating the default database for a DB instance, such as the character -// set for the default database defined by the character_set_database parameter. -// You can use the Parameter Groups option of the Amazon Neptune console or -// the DescribeDBParameters command to verify that your DB parameter group has -// been created or modified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation ModifyDBParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. -// -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group -// is in this state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBParameterGroup -func (c *Neptune) ModifyDBParameterGroup(input *ModifyDBParameterGroupInput) (*ResetDBParameterGroupOutput, error) { - req, out := c.ModifyDBParameterGroupRequest(input) - return out, req.Send() -} - -// ModifyDBParameterGroupWithContext is the same as ModifyDBParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) ModifyDBParameterGroupWithContext(ctx aws.Context, input *ModifyDBParameterGroupInput, opts ...request.Option) (*ResetDBParameterGroupOutput, error) { - req, out := c.ModifyDBParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBSubnetGroup = "ModifyDBSubnetGroup" - -// ModifyDBSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBSubnetGroup for more information on using the ModifyDBSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBSubnetGroupRequest method. -// req, resp := client.ModifyDBSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBSubnetGroup -func (c *Neptune) ModifyDBSubnetGroupRequest(input *ModifyDBSubnetGroupInput) (req *request.Request, output *ModifyDBSubnetGroupOutput) { - op := &request.Operation{ - Name: opModifyDBSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBSubnetGroupInput{} - } - - output = &ModifyDBSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBSubnetGroup API operation for Amazon Neptune. -// -// Modifies an existing DB subnet group. DB subnet groups must contain at least -// one subnet in at least two AZs in the AWS Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation ModifyDBSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. -// -// * ErrCodeDBSubnetQuotaExceededFault "DBSubnetQuotaExceededFault" -// Request would result in user exceeding the allowed number of subnets in a -// DB subnet groups. -// -// * ErrCodeSubnetAlreadyInUse "SubnetAlreadyInUse" -// The DB subnet is already in use in the Availability Zone. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBSubnetGroup -func (c *Neptune) ModifyDBSubnetGroup(input *ModifyDBSubnetGroupInput) (*ModifyDBSubnetGroupOutput, error) { - req, out := c.ModifyDBSubnetGroupRequest(input) - return out, req.Send() -} - -// ModifyDBSubnetGroupWithContext is the same as ModifyDBSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) ModifyDBSubnetGroupWithContext(ctx aws.Context, input *ModifyDBSubnetGroupInput, opts ...request.Option) (*ModifyDBSubnetGroupOutput, error) { - req, out := c.ModifyDBSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyEventSubscription = "ModifyEventSubscription" - -// ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the ModifyEventSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyEventSubscription for more information on using the ModifyEventSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyEventSubscriptionRequest method. -// req, resp := client.ModifyEventSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyEventSubscription -func (c *Neptune) ModifyEventSubscriptionRequest(input *ModifyEventSubscriptionInput) (req *request.Request, output *ModifyEventSubscriptionOutput) { - op := &request.Operation{ - Name: opModifyEventSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyEventSubscriptionInput{} - } - - output = &ModifyEventSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyEventSubscription API operation for Amazon Neptune. -// -// Modifies an existing event notification subscription. Note that you can't -// modify the source identifiers using this call; to change source identifiers -// for a subscription, use the AddSourceIdentifierToSubscription and RemoveSourceIdentifierFromSubscription -// calls. -// -// You can see a list of the event categories for a given SourceType by using -// the DescribeEventCategories action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation ModifyEventSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEventSubscriptionQuotaExceededFault "EventSubscriptionQuotaExceeded" -// -// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" -// -// * ErrCodeSNSInvalidTopicFault "SNSInvalidTopic" -// -// * ErrCodeSNSNoAuthorizationFault "SNSNoAuthorization" -// -// * ErrCodeSNSTopicArnNotFoundFault "SNSTopicArnNotFound" -// -// * ErrCodeSubscriptionCategoryNotFoundFault "SubscriptionCategoryNotFound" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyEventSubscription -func (c *Neptune) ModifyEventSubscription(input *ModifyEventSubscriptionInput) (*ModifyEventSubscriptionOutput, error) { - req, out := c.ModifyEventSubscriptionRequest(input) - return out, req.Send() -} - -// ModifyEventSubscriptionWithContext is the same as ModifyEventSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyEventSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) ModifyEventSubscriptionWithContext(ctx aws.Context, input *ModifyEventSubscriptionInput, opts ...request.Option) (*ModifyEventSubscriptionOutput, error) { - req, out := c.ModifyEventSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPromoteReadReplicaDBCluster = "PromoteReadReplicaDBCluster" - -// PromoteReadReplicaDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the PromoteReadReplicaDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PromoteReadReplicaDBCluster for more information on using the PromoteReadReplicaDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PromoteReadReplicaDBClusterRequest method. -// req, resp := client.PromoteReadReplicaDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/PromoteReadReplicaDBCluster -func (c *Neptune) PromoteReadReplicaDBClusterRequest(input *PromoteReadReplicaDBClusterInput) (req *request.Request, output *PromoteReadReplicaDBClusterOutput) { - op := &request.Operation{ - Name: opPromoteReadReplicaDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PromoteReadReplicaDBClusterInput{} - } - - output = &PromoteReadReplicaDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// PromoteReadReplicaDBCluster API operation for Amazon Neptune. -// -// Promotes a Read Replica DB cluster to a standalone DB cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation PromoteReadReplicaDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/PromoteReadReplicaDBCluster -func (c *Neptune) PromoteReadReplicaDBCluster(input *PromoteReadReplicaDBClusterInput) (*PromoteReadReplicaDBClusterOutput, error) { - req, out := c.PromoteReadReplicaDBClusterRequest(input) - return out, req.Send() -} - -// PromoteReadReplicaDBClusterWithContext is the same as PromoteReadReplicaDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See PromoteReadReplicaDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) PromoteReadReplicaDBClusterWithContext(ctx aws.Context, input *PromoteReadReplicaDBClusterInput, opts ...request.Option) (*PromoteReadReplicaDBClusterOutput, error) { - req, out := c.PromoteReadReplicaDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRebootDBInstance = "RebootDBInstance" - -// RebootDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RebootDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebootDBInstance for more information on using the RebootDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebootDBInstanceRequest method. -// req, resp := client.RebootDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RebootDBInstance -func (c *Neptune) RebootDBInstanceRequest(input *RebootDBInstanceInput) (req *request.Request, output *RebootDBInstanceOutput) { - op := &request.Operation{ - Name: opRebootDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RebootDBInstanceInput{} - } - - output = &RebootDBInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// RebootDBInstance API operation for Amazon Neptune. -// -// You might need to reboot your DB instance, usually for maintenance reasons. -// For example, if you make certain modifications, or if you change the DB parameter -// group associated with the DB instance, you must reboot the instance for the -// changes to take effect. -// -// Rebooting a DB instance restarts the database engine service. Rebooting a -// DB instance results in a momentary outage, during which the DB instance status -// is set to rebooting. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation RebootDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RebootDBInstance -func (c *Neptune) RebootDBInstance(input *RebootDBInstanceInput) (*RebootDBInstanceOutput, error) { - req, out := c.RebootDBInstanceRequest(input) - return out, req.Send() -} - -// RebootDBInstanceWithContext is the same as RebootDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See RebootDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) RebootDBInstanceWithContext(ctx aws.Context, input *RebootDBInstanceInput, opts ...request.Option) (*RebootDBInstanceOutput, error) { - req, out := c.RebootDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveRoleFromDBCluster = "RemoveRoleFromDBCluster" - -// RemoveRoleFromDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the RemoveRoleFromDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveRoleFromDBCluster for more information on using the RemoveRoleFromDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveRoleFromDBClusterRequest method. -// req, resp := client.RemoveRoleFromDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RemoveRoleFromDBCluster -func (c *Neptune) RemoveRoleFromDBClusterRequest(input *RemoveRoleFromDBClusterInput) (req *request.Request, output *RemoveRoleFromDBClusterOutput) { - op := &request.Operation{ - Name: opRemoveRoleFromDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveRoleFromDBClusterInput{} - } - - output = &RemoveRoleFromDBClusterOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveRoleFromDBCluster API operation for Amazon Neptune. -// -// Disassociates an Identity and Access Management (IAM) role from a DB cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation RemoveRoleFromDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. -// -// * ErrCodeDBClusterRoleNotFoundFault "DBClusterRoleNotFound" -// The specified IAM role Amazon Resource Name (ARN) is not associated with -// the specified DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RemoveRoleFromDBCluster -func (c *Neptune) RemoveRoleFromDBCluster(input *RemoveRoleFromDBClusterInput) (*RemoveRoleFromDBClusterOutput, error) { - req, out := c.RemoveRoleFromDBClusterRequest(input) - return out, req.Send() -} - -// RemoveRoleFromDBClusterWithContext is the same as RemoveRoleFromDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveRoleFromDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) RemoveRoleFromDBClusterWithContext(ctx aws.Context, input *RemoveRoleFromDBClusterInput, opts ...request.Option) (*RemoveRoleFromDBClusterOutput, error) { - req, out := c.RemoveRoleFromDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveSourceIdentifierFromSubscription = "RemoveSourceIdentifierFromSubscription" - -// RemoveSourceIdentifierFromSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the RemoveSourceIdentifierFromSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveSourceIdentifierFromSubscription for more information on using the RemoveSourceIdentifierFromSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveSourceIdentifierFromSubscriptionRequest method. -// req, resp := client.RemoveSourceIdentifierFromSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RemoveSourceIdentifierFromSubscription -func (c *Neptune) RemoveSourceIdentifierFromSubscriptionRequest(input *RemoveSourceIdentifierFromSubscriptionInput) (req *request.Request, output *RemoveSourceIdentifierFromSubscriptionOutput) { - op := &request.Operation{ - Name: opRemoveSourceIdentifierFromSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveSourceIdentifierFromSubscriptionInput{} - } - - output = &RemoveSourceIdentifierFromSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// RemoveSourceIdentifierFromSubscription API operation for Amazon Neptune. -// -// Removes a source identifier from an existing event notification subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation RemoveSourceIdentifierFromSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" -// -// * ErrCodeSourceNotFoundFault "SourceNotFound" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RemoveSourceIdentifierFromSubscription -func (c *Neptune) RemoveSourceIdentifierFromSubscription(input *RemoveSourceIdentifierFromSubscriptionInput) (*RemoveSourceIdentifierFromSubscriptionOutput, error) { - req, out := c.RemoveSourceIdentifierFromSubscriptionRequest(input) - return out, req.Send() -} - -// RemoveSourceIdentifierFromSubscriptionWithContext is the same as RemoveSourceIdentifierFromSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveSourceIdentifierFromSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) RemoveSourceIdentifierFromSubscriptionWithContext(ctx aws.Context, input *RemoveSourceIdentifierFromSubscriptionInput, opts ...request.Option) (*RemoveSourceIdentifierFromSubscriptionOutput, error) { - req, out := c.RemoveSourceIdentifierFromSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTagsFromResource = "RemoveTagsFromResource" - -// RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTagsFromResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTagsFromResource for more information on using the RemoveTagsFromResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsFromResourceRequest method. -// req, resp := client.RemoveTagsFromResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RemoveTagsFromResource -func (c *Neptune) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *RemoveTagsFromResourceOutput) { - op := &request.Operation{ - Name: opRemoveTagsFromResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsFromResourceInput{} - } - - output = &RemoveTagsFromResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTagsFromResource API operation for Amazon Neptune. -// -// Removes metadata tags from an Amazon Neptune resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation RemoveTagsFromResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RemoveTagsFromResource -func (c *Neptune) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - return out, req.Send() -} - -// RemoveTagsFromResourceWithContext is the same as RemoveTagsFromResource with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTagsFromResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*RemoveTagsFromResourceOutput, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetDBClusterParameterGroup = "ResetDBClusterParameterGroup" - -// ResetDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ResetDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetDBClusterParameterGroup for more information on using the ResetDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetDBClusterParameterGroupRequest method. -// req, resp := client.ResetDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ResetDBClusterParameterGroup -func (c *Neptune) ResetDBClusterParameterGroupRequest(input *ResetDBClusterParameterGroupInput) (req *request.Request, output *ResetDBClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opResetDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetDBClusterParameterGroupInput{} - } - - output = &ResetDBClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ResetDBClusterParameterGroup API operation for Amazon Neptune. -// -// Modifies the parameters of a DB cluster parameter group to the default value. -// To reset specific parameters submit a list of the following: ParameterName -// and ApplyMethod. To reset the entire DB cluster parameter group, specify -// the DBClusterParameterGroupName and ResetAllParameters parameters. -// -// When resetting the entire group, dynamic parameters are updated immediately -// and static parameters are set to pending-reboot to take effect on the next -// DB instance restart or RebootDBInstance request. You must call RebootDBInstance -// for every DB instance in your DB cluster that you want the updated static -// parameter to apply to. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation ResetDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group -// is in this state. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ResetDBClusterParameterGroup -func (c *Neptune) ResetDBClusterParameterGroup(input *ResetDBClusterParameterGroupInput) (*ResetDBClusterParameterGroupOutput, error) { - req, out := c.ResetDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// ResetDBClusterParameterGroupWithContext is the same as ResetDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ResetDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) ResetDBClusterParameterGroupWithContext(ctx aws.Context, input *ResetDBClusterParameterGroupInput, opts ...request.Option) (*ResetDBClusterParameterGroupOutput, error) { - req, out := c.ResetDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetDBParameterGroup = "ResetDBParameterGroup" - -// ResetDBParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ResetDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetDBParameterGroup for more information on using the ResetDBParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetDBParameterGroupRequest method. -// req, resp := client.ResetDBParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ResetDBParameterGroup -func (c *Neptune) ResetDBParameterGroupRequest(input *ResetDBParameterGroupInput) (req *request.Request, output *ResetDBParameterGroupOutput) { - op := &request.Operation{ - Name: opResetDBParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetDBParameterGroupInput{} - } - - output = &ResetDBParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ResetDBParameterGroup API operation for Amazon Neptune. -// -// Modifies the parameters of a DB parameter group to the engine/system default -// value. To reset specific parameters, provide a list of the following: ParameterName -// and ApplyMethod. To reset the entire DB parameter group, specify the DBParameterGroup -// name and ResetAllParameters parameters. When resetting the entire group, -// dynamic parameters are updated immediately and static parameters are set -// to pending-reboot to take effect on the next DB instance restart or RebootDBInstance -// request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation ResetDBParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group -// is in this state. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ResetDBParameterGroup -func (c *Neptune) ResetDBParameterGroup(input *ResetDBParameterGroupInput) (*ResetDBParameterGroupOutput, error) { - req, out := c.ResetDBParameterGroupRequest(input) - return out, req.Send() -} - -// ResetDBParameterGroupWithContext is the same as ResetDBParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ResetDBParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) ResetDBParameterGroupWithContext(ctx aws.Context, input *ResetDBParameterGroupInput, opts ...request.Option) (*ResetDBParameterGroupOutput, error) { - req, out := c.ResetDBParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreDBClusterFromSnapshot = "RestoreDBClusterFromSnapshot" - -// RestoreDBClusterFromSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the RestoreDBClusterFromSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreDBClusterFromSnapshot for more information on using the RestoreDBClusterFromSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreDBClusterFromSnapshotRequest method. -// req, resp := client.RestoreDBClusterFromSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RestoreDBClusterFromSnapshot -func (c *Neptune) RestoreDBClusterFromSnapshotRequest(input *RestoreDBClusterFromSnapshotInput) (req *request.Request, output *RestoreDBClusterFromSnapshotOutput) { - op := &request.Operation{ - Name: opRestoreDBClusterFromSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreDBClusterFromSnapshotInput{} - } - - output = &RestoreDBClusterFromSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// RestoreDBClusterFromSnapshot API operation for Amazon Neptune. -// -// Creates a new DB cluster from a DB snapshot or DB cluster snapshot. -// -// If a DB snapshot is specified, the target DB cluster is created from the -// source DB snapshot with a default configuration and default security group. -// -// If a DB cluster snapshot is specified, the target DB cluster is created from -// the source DB cluster restore point with the same configuration as the original -// source DB cluster, except that the new DB cluster is created with the default -// security group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation RestoreDBClusterFromSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// User already has a DB cluster with the given identifier. -// -// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// User attempted to create a new DB cluster and the user has already reached -// the maximum allowed DB cluster quota. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. -// -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. -// -// * ErrCodeInsufficientDBClusterCapacityFault "InsufficientDBClusterCapacityFault" -// The DB cluster does not have enough capacity for the current operation. -// -// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You may be -// able to resolve this error by updating your subnet group to use different -// Availability Zones that have more storage available. -// -// * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot does not allow deletion. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. -// -// * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// Cannot restore from vpc backup to non-vpc DB instance. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RestoreDBClusterFromSnapshot -func (c *Neptune) RestoreDBClusterFromSnapshot(input *RestoreDBClusterFromSnapshotInput) (*RestoreDBClusterFromSnapshotOutput, error) { - req, out := c.RestoreDBClusterFromSnapshotRequest(input) - return out, req.Send() -} - -// RestoreDBClusterFromSnapshotWithContext is the same as RestoreDBClusterFromSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreDBClusterFromSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) RestoreDBClusterFromSnapshotWithContext(ctx aws.Context, input *RestoreDBClusterFromSnapshotInput, opts ...request.Option) (*RestoreDBClusterFromSnapshotOutput, error) { - req, out := c.RestoreDBClusterFromSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreDBClusterToPointInTime = "RestoreDBClusterToPointInTime" - -// RestoreDBClusterToPointInTimeRequest generates a "aws/request.Request" representing the -// client's request for the RestoreDBClusterToPointInTime operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreDBClusterToPointInTime for more information on using the RestoreDBClusterToPointInTime -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreDBClusterToPointInTimeRequest method. -// req, resp := client.RestoreDBClusterToPointInTimeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RestoreDBClusterToPointInTime -func (c *Neptune) RestoreDBClusterToPointInTimeRequest(input *RestoreDBClusterToPointInTimeInput) (req *request.Request, output *RestoreDBClusterToPointInTimeOutput) { - op := &request.Operation{ - Name: opRestoreDBClusterToPointInTime, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreDBClusterToPointInTimeInput{} - } - - output = &RestoreDBClusterToPointInTimeOutput{} - req = c.newRequest(op, input, output) - return -} - -// RestoreDBClusterToPointInTime API operation for Amazon Neptune. -// -// Restores a DB cluster to an arbitrary point in time. Users can restore to -// any point in time before LatestRestorableTime for up to BackupRetentionPeriod -// days. The target DB cluster is created from the source DB cluster with the -// same configuration as the original DB cluster, except that the new DB cluster -// is created with the default DB security group. -// -// This action only restores the DB cluster, not the DB instances for that DB -// cluster. You must invoke the CreateDBInstance action to create DB instances -// for the restored DB cluster, specifying the identifier of the restored DB -// cluster in DBClusterIdentifier. You can create DB instances only after the -// RestoreDBClusterToPointInTime action has completed and the DB cluster is -// available. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Neptune's -// API operation RestoreDBClusterToPointInTime for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// User already has a DB cluster with the given identifier. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. -// -// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// User attempted to create a new DB cluster and the user has already reached -// the maximum allowed DB cluster quota. -// -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. -// -// * ErrCodeInsufficientDBClusterCapacityFault "InsufficientDBClusterCapacityFault" -// The DB cluster does not have enough capacity for the current operation. -// -// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You may be -// able to resolve this error by updating your subnet group to use different -// Availability Zones that have more storage available. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. -// -// * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot does not allow deletion. -// -// * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// Cannot restore from vpc backup to non-vpc DB instance. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. -// -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RestoreDBClusterToPointInTime -func (c *Neptune) RestoreDBClusterToPointInTime(input *RestoreDBClusterToPointInTimeInput) (*RestoreDBClusterToPointInTimeOutput, error) { - req, out := c.RestoreDBClusterToPointInTimeRequest(input) - return out, req.Send() -} - -// RestoreDBClusterToPointInTimeWithContext is the same as RestoreDBClusterToPointInTime with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreDBClusterToPointInTime for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) RestoreDBClusterToPointInTimeWithContext(ctx aws.Context, input *RestoreDBClusterToPointInTimeInput, opts ...request.Option) (*RestoreDBClusterToPointInTimeOutput, error) { - req, out := c.RestoreDBClusterToPointInTimeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AddRoleToDBClusterInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster to associate the IAM role with. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM role to associate with the Neptune - // DB cluster, for example arn:aws:iam::123456789012:role/NeptuneAccessRole. - // - // RoleArn is a required field - RoleArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AddRoleToDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddRoleToDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddRoleToDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddRoleToDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *AddRoleToDBClusterInput) SetDBClusterIdentifier(v string) *AddRoleToDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *AddRoleToDBClusterInput) SetRoleArn(v string) *AddRoleToDBClusterInput { - s.RoleArn = &v - return s -} - -type AddRoleToDBClusterOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddRoleToDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddRoleToDBClusterOutput) GoString() string { - return s.String() -} - -type AddSourceIdentifierToSubscriptionInput struct { - _ struct{} `type:"structure"` - - // The identifier of the event source to be added. - // - // Constraints: - // - // * If the source type is a DB instance, then a DBInstanceIdentifier must - // be supplied. - // - // * If the source type is a DB security group, a DBSecurityGroupName must - // be supplied. - // - // * If the source type is a DB parameter group, a DBParameterGroupName must - // be supplied. - // - // * If the source type is a DB snapshot, a DBSnapshotIdentifier must be - // supplied. - // - // SourceIdentifier is a required field - SourceIdentifier *string `type:"string" required:"true"` - - // The name of the event notification subscription you want to add a source - // identifier to. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AddSourceIdentifierToSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddSourceIdentifierToSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddSourceIdentifierToSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddSourceIdentifierToSubscriptionInput"} - if s.SourceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceIdentifier")) - } - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *AddSourceIdentifierToSubscriptionInput) SetSourceIdentifier(v string) *AddSourceIdentifierToSubscriptionInput { - s.SourceIdentifier = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *AddSourceIdentifierToSubscriptionInput) SetSubscriptionName(v string) *AddSourceIdentifierToSubscriptionInput { - s.SubscriptionName = &v - return s -} - -type AddSourceIdentifierToSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful invocation of the DescribeEventSubscriptions - // action. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s AddSourceIdentifierToSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddSourceIdentifierToSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *AddSourceIdentifierToSubscriptionOutput) SetEventSubscription(v *EventSubscription) *AddSourceIdentifierToSubscriptionOutput { - s.EventSubscription = v - return s -} - -type AddTagsToResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Neptune resource that the tags are added to. This value is an - // Amazon Resource Name (ARN). For information about creating an ARN, see Constructing - // an Amazon Resource Name (ARN) (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing). - // - // ResourceName is a required field - ResourceName *string `type:"string" required:"true"` - - // The tags to be assigned to the Amazon Neptune resource. - // - // Tags is a required field - Tags []*Tag `locationNameList:"Tag" type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsToResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsToResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *AddTagsToResourceInput) SetResourceName(v string) *AddTagsToResourceInput { - s.ResourceName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { - s.Tags = v - return s -} - -type AddTagsToResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsToResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceOutput) GoString() string { - return s.String() -} - -type ApplyPendingMaintenanceActionInput struct { - _ struct{} `type:"structure"` - - // The pending maintenance action to apply to this resource. - // - // Valid values: system-update, db-upgrade - // - // ApplyAction is a required field - ApplyAction *string `type:"string" required:"true"` - - // A value that specifies the type of opt-in request, or undoes an opt-in request. - // An opt-in request of type immediate can't be undone. - // - // Valid values: - // - // * immediate - Apply the maintenance action immediately. - // - // * next-maintenance - Apply the maintenance action during the next maintenance - // window for the resource. - // - // * undo-opt-in - Cancel any existing next-maintenance opt-in requests. - // - // OptInType is a required field - OptInType *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the resource that the pending maintenance - // action applies to. For information about creating an ARN, see Constructing - // an Amazon Resource Name (ARN) (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing). - // - // ResourceIdentifier is a required field - ResourceIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ApplyPendingMaintenanceActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplyPendingMaintenanceActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ApplyPendingMaintenanceActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ApplyPendingMaintenanceActionInput"} - if s.ApplyAction == nil { - invalidParams.Add(request.NewErrParamRequired("ApplyAction")) - } - if s.OptInType == nil { - invalidParams.Add(request.NewErrParamRequired("OptInType")) - } - if s.ResourceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyAction sets the ApplyAction field's value. -func (s *ApplyPendingMaintenanceActionInput) SetApplyAction(v string) *ApplyPendingMaintenanceActionInput { - s.ApplyAction = &v - return s -} - -// SetOptInType sets the OptInType field's value. -func (s *ApplyPendingMaintenanceActionInput) SetOptInType(v string) *ApplyPendingMaintenanceActionInput { - s.OptInType = &v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *ApplyPendingMaintenanceActionInput) SetResourceIdentifier(v string) *ApplyPendingMaintenanceActionInput { - s.ResourceIdentifier = &v - return s -} - -type ApplyPendingMaintenanceActionOutput struct { - _ struct{} `type:"structure"` - - // Describes the pending maintenance actions for a resource. - ResourcePendingMaintenanceActions *ResourcePendingMaintenanceActions `type:"structure"` -} - -// String returns the string representation -func (s ApplyPendingMaintenanceActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplyPendingMaintenanceActionOutput) GoString() string { - return s.String() -} - -// SetResourcePendingMaintenanceActions sets the ResourcePendingMaintenanceActions field's value. -func (s *ApplyPendingMaintenanceActionOutput) SetResourcePendingMaintenanceActions(v *ResourcePendingMaintenanceActions) *ApplyPendingMaintenanceActionOutput { - s.ResourcePendingMaintenanceActions = v - return s -} - -// Contains Availability Zone information. -// -// This data type is used as an element in the following data type: -// -// * OrderableDBInstanceOption -type AvailabilityZone struct { - _ struct{} `type:"structure"` - - // The name of the availability zone. - Name *string `type:"string"` -} - -// String returns the string representation -func (s AvailabilityZone) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailabilityZone) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { - s.Name = &v - return s -} - -// This data type is used as a response element in the action DescribeDBEngineVersions. -type CharacterSet struct { - _ struct{} `type:"structure"` - - // The description of the character set. - CharacterSetDescription *string `type:"string"` - - // The name of the character set. - CharacterSetName *string `type:"string"` -} - -// String returns the string representation -func (s CharacterSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CharacterSet) GoString() string { - return s.String() -} - -// SetCharacterSetDescription sets the CharacterSetDescription field's value. -func (s *CharacterSet) SetCharacterSetDescription(v string) *CharacterSet { - s.CharacterSetDescription = &v - return s -} - -// SetCharacterSetName sets the CharacterSetName field's value. -func (s *CharacterSet) SetCharacterSetName(v string) *CharacterSet { - s.CharacterSetName = &v - return s -} - -// The configuration setting for the log types to be enabled for export to CloudWatch -// Logs for a specific DB instance or DB cluster. -type CloudwatchLogsExportConfiguration struct { - _ struct{} `type:"structure"` - - // The list of log types to disable. - DisableLogTypes []*string `type:"list"` - - // The list of log types to enable. - EnableLogTypes []*string `type:"list"` -} - -// String returns the string representation -func (s CloudwatchLogsExportConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudwatchLogsExportConfiguration) GoString() string { - return s.String() -} - -// SetDisableLogTypes sets the DisableLogTypes field's value. -func (s *CloudwatchLogsExportConfiguration) SetDisableLogTypes(v []*string) *CloudwatchLogsExportConfiguration { - s.DisableLogTypes = v - return s -} - -// SetEnableLogTypes sets the EnableLogTypes field's value. -func (s *CloudwatchLogsExportConfiguration) SetEnableLogTypes(v []*string) *CloudwatchLogsExportConfiguration { - s.EnableLogTypes = v - return s -} - -type CopyDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The identifier or Amazon Resource Name (ARN) for the source DB cluster parameter - // group. For information about creating an ARN, see Constructing an Amazon - // Resource Name (ARN) (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing). - // - // Constraints: - // - // * Must specify a valid DB cluster parameter group. - // - // * If the source DB cluster parameter group is in the same AWS Region as - // the copy, specify a valid DB parameter group identifier, for example my-db-cluster-param-group, - // or a valid ARN. - // - // * If the source DB parameter group is in a different AWS Region than the - // copy, specify a valid DB cluster parameter group ARN, for example arn:aws:rds:us-east-1:123456789012:cluster-pg:custom-cluster-group1. - // - // SourceDBClusterParameterGroupIdentifier is a required field - SourceDBClusterParameterGroupIdentifier *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon Neptune Resources - // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A description for the copied DB cluster parameter group. - // - // TargetDBClusterParameterGroupDescription is a required field - TargetDBClusterParameterGroupDescription *string `type:"string" required:"true"` - - // The identifier for the copied DB cluster parameter group. - // - // Constraints: - // - // * Cannot be null, empty, or blank - // - // * Must contain from 1 to 255 letters, numbers, or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - // - // Example: my-cluster-param-group1 - // - // TargetDBClusterParameterGroupIdentifier is a required field - TargetDBClusterParameterGroupIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyDBClusterParameterGroupInput"} - if s.SourceDBClusterParameterGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDBClusterParameterGroupIdentifier")) - } - if s.TargetDBClusterParameterGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBClusterParameterGroupDescription")) - } - if s.TargetDBClusterParameterGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBClusterParameterGroupIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceDBClusterParameterGroupIdentifier sets the SourceDBClusterParameterGroupIdentifier field's value. -func (s *CopyDBClusterParameterGroupInput) SetSourceDBClusterParameterGroupIdentifier(v string) *CopyDBClusterParameterGroupInput { - s.SourceDBClusterParameterGroupIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CopyDBClusterParameterGroupInput) SetTags(v []*Tag) *CopyDBClusterParameterGroupInput { - s.Tags = v - return s -} - -// SetTargetDBClusterParameterGroupDescription sets the TargetDBClusterParameterGroupDescription field's value. -func (s *CopyDBClusterParameterGroupInput) SetTargetDBClusterParameterGroupDescription(v string) *CopyDBClusterParameterGroupInput { - s.TargetDBClusterParameterGroupDescription = &v - return s -} - -// SetTargetDBClusterParameterGroupIdentifier sets the TargetDBClusterParameterGroupIdentifier field's value. -func (s *CopyDBClusterParameterGroupInput) SetTargetDBClusterParameterGroupIdentifier(v string) *CopyDBClusterParameterGroupInput { - s.TargetDBClusterParameterGroupIdentifier = &v - return s -} - -type CopyDBClusterParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB cluster parameter group. - // - // This data type is used as a response element in the DescribeDBClusterParameterGroups - // action. - DBClusterParameterGroup *DBClusterParameterGroup `type:"structure"` -} - -// String returns the string representation -func (s CopyDBClusterParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBClusterParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. -func (s *CopyDBClusterParameterGroupOutput) SetDBClusterParameterGroup(v *DBClusterParameterGroup) *CopyDBClusterParameterGroupOutput { - s.DBClusterParameterGroup = v - return s -} - -type CopyDBClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // True to copy all tags from the source DB cluster snapshot to the target DB - // cluster snapshot, and otherwise false. The default is false. - CopyTags *bool `type:"boolean"` - - // The AWS AWS KMS key ID for an encrypted DB cluster snapshot. The KMS key - // ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key - // alias for the KMS encryption key. - // - // If you copy an unencrypted DB cluster snapshot and specify a value for the - // KmsKeyId parameter, Amazon Neptune encrypts the target DB cluster snapshot - // using the specified KMS encryption key. - // - // If you copy an encrypted DB cluster snapshot from your AWS account, you can - // specify a value for KmsKeyId to encrypt the copy with a new KMS encryption - // key. If you don't specify a value for KmsKeyId, then the copy of the DB cluster - // snapshot is encrypted with the same KMS key as the source DB cluster snapshot. - // - // If you copy an encrypted DB cluster snapshot that is shared from another - // AWS account, then you must specify a value for KmsKeyId. - // - // To copy an encrypted DB cluster snapshot to another AWS Region, you must - // set KmsKeyId to the KMS key ID you want to use to encrypt the copy of the - // DB cluster snapshot in the destination AWS Region. KMS encryption keys are - // specific to the AWS Region that they are created in, and you can't use encryption - // keys from one AWS Region in another AWS Region. - KmsKeyId *string `type:"string"` - - // The URL that contains a Signature Version 4 signed request for the CopyDBClusterSnapshot - // API action in the AWS Region that contains the source DB cluster snapshot - // to copy. The PreSignedUrl parameter must be used when copying an encrypted - // DB cluster snapshot from another AWS Region. - // - // The pre-signed URL must be a valid request for the CopyDBSClusterSnapshot - // API action that can be executed in the source AWS Region that contains the - // encrypted DB cluster snapshot to be copied. The pre-signed URL request must - // contain the following parameter values: - // - // * KmsKeyId - The AWS KMS key identifier for the key to use to encrypt - // the copy of the DB cluster snapshot in the destination AWS Region. This - // is the same identifier for both the CopyDBClusterSnapshot action that - // is called in the destination AWS Region, and the action contained in the - // pre-signed URL. - // - // * DestinationRegion - The name of the AWS Region that the DB cluster snapshot - // will be created in. - // - // * SourceDBClusterSnapshotIdentifier - The DB cluster snapshot identifier - // for the encrypted DB cluster snapshot to be copied. This identifier must - // be in the Amazon Resource Name (ARN) format for the source AWS Region. - // For example, if you are copying an encrypted DB cluster snapshot from - // the us-west-2 AWS Region, then your SourceDBClusterSnapshotIdentifier - // looks like the following example: arn:aws:rds:us-west-2:123456789012:cluster-snapshot:neptune-cluster1-snapshot-20161115. - // - // To learn how to generate a Signature Version 4 signed request, see Authenticating - // Requests: Using Query Parameters (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) - // and Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). - PreSignedUrl *string `type:"string"` - - // The identifier of the DB cluster snapshot to copy. This parameter is not - // case-sensitive. - // - // You can't copy an encrypted, shared DB cluster snapshot from one AWS Region - // to another. - // - // Constraints: - // - // * Must specify a valid system snapshot in the "available" state. - // - // * If the source snapshot is in the same AWS Region as the copy, specify - // a valid DB snapshot identifier. - // - // * If the source snapshot is in a different AWS Region than the copy, specify - // a valid DB cluster snapshot ARN. - // - // Example: my-cluster-snapshot1 - // - // SourceDBClusterSnapshotIdentifier is a required field - SourceDBClusterSnapshotIdentifier *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon Neptune Resources - // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // The identifier of the new DB cluster snapshot to create from the source DB - // cluster snapshot. This parameter is not case-sensitive. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster-snapshot2 - // - // TargetDBClusterSnapshotIdentifier is a required field - TargetDBClusterSnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyDBClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyDBClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyDBClusterSnapshotInput"} - if s.SourceDBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDBClusterSnapshotIdentifier")) - } - if s.TargetDBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCopyTags sets the CopyTags field's value. -func (s *CopyDBClusterSnapshotInput) SetCopyTags(v bool) *CopyDBClusterSnapshotInput { - s.CopyTags = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CopyDBClusterSnapshotInput) SetKmsKeyId(v string) *CopyDBClusterSnapshotInput { - s.KmsKeyId = &v - return s -} - -// SetPreSignedUrl sets the PreSignedUrl field's value. -func (s *CopyDBClusterSnapshotInput) SetPreSignedUrl(v string) *CopyDBClusterSnapshotInput { - s.PreSignedUrl = &v - return s -} - -// SetSourceDBClusterSnapshotIdentifier sets the SourceDBClusterSnapshotIdentifier field's value. -func (s *CopyDBClusterSnapshotInput) SetSourceDBClusterSnapshotIdentifier(v string) *CopyDBClusterSnapshotInput { - s.SourceDBClusterSnapshotIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CopyDBClusterSnapshotInput) SetTags(v []*Tag) *CopyDBClusterSnapshotInput { - s.Tags = v - return s -} - -// SetTargetDBClusterSnapshotIdentifier sets the TargetDBClusterSnapshotIdentifier field's value. -func (s *CopyDBClusterSnapshotInput) SetTargetDBClusterSnapshotIdentifier(v string) *CopyDBClusterSnapshotInput { - s.TargetDBClusterSnapshotIdentifier = &v - return s -} - -type CopyDBClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Contains the details for an Amazon Neptune DB cluster snapshot - // - // This data type is used as a response element in the DescribeDBClusterSnapshots - // action. - DBClusterSnapshot *DBClusterSnapshot `type:"structure"` -} - -// String returns the string representation -func (s CopyDBClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. -func (s *CopyDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *CopyDBClusterSnapshotOutput { - s.DBClusterSnapshot = v - return s -} - -type CopyDBParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The identifier or ARN for the source DB parameter group. For information - // about creating an ARN, see Constructing an Amazon Resource Name (ARN) (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing). - // - // Constraints: - // - // * Must specify a valid DB parameter group. - // - // * Must specify a valid DB parameter group identifier, for example my-db-param-group, - // or a valid ARN. - // - // SourceDBParameterGroupIdentifier is a required field - SourceDBParameterGroupIdentifier *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon Neptune Resources - // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A description for the copied DB parameter group. - // - // TargetDBParameterGroupDescription is a required field - TargetDBParameterGroupDescription *string `type:"string" required:"true"` - - // The identifier for the copied DB parameter group. - // - // Constraints: - // - // * Cannot be null, empty, or blank - // - // * Must contain from 1 to 255 letters, numbers, or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - // - // Example: my-db-parameter-group - // - // TargetDBParameterGroupIdentifier is a required field - TargetDBParameterGroupIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyDBParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyDBParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyDBParameterGroupInput"} - if s.SourceDBParameterGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDBParameterGroupIdentifier")) - } - if s.TargetDBParameterGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBParameterGroupDescription")) - } - if s.TargetDBParameterGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBParameterGroupIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceDBParameterGroupIdentifier sets the SourceDBParameterGroupIdentifier field's value. -func (s *CopyDBParameterGroupInput) SetSourceDBParameterGroupIdentifier(v string) *CopyDBParameterGroupInput { - s.SourceDBParameterGroupIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CopyDBParameterGroupInput) SetTags(v []*Tag) *CopyDBParameterGroupInput { - s.Tags = v - return s -} - -// SetTargetDBParameterGroupDescription sets the TargetDBParameterGroupDescription field's value. -func (s *CopyDBParameterGroupInput) SetTargetDBParameterGroupDescription(v string) *CopyDBParameterGroupInput { - s.TargetDBParameterGroupDescription = &v - return s -} - -// SetTargetDBParameterGroupIdentifier sets the TargetDBParameterGroupIdentifier field's value. -func (s *CopyDBParameterGroupInput) SetTargetDBParameterGroupIdentifier(v string) *CopyDBParameterGroupInput { - s.TargetDBParameterGroupIdentifier = &v - return s -} - -type CopyDBParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB parameter group. - // - // This data type is used as a response element in the DescribeDBParameterGroups - // action. - DBParameterGroup *DBParameterGroup `type:"structure"` -} - -// String returns the string representation -func (s CopyDBParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDBParameterGroup sets the DBParameterGroup field's value. -func (s *CopyDBParameterGroupOutput) SetDBParameterGroup(v *DBParameterGroup) *CopyDBParameterGroupOutput { - s.DBParameterGroup = v - return s -} - -type CreateDBClusterInput struct { - _ struct{} `type:"structure"` - - // A list of EC2 Availability Zones that instances in the DB cluster can be - // created in. - AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // The number of days for which automated backups are retained. You must specify - // a minimum value of 1. - // - // Default: 1 - // - // Constraints: - // - // * Must be a value from 1 to 35 - BackupRetentionPeriod *int64 `type:"integer"` - - // A value that indicates that the DB cluster should be associated with the - // specified CharacterSet. - CharacterSetName *string `type:"string"` - - // The DB cluster identifier. This parameter is stored as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster1 - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The name of the DB cluster parameter group to associate with this DB cluster. - // If this argument is omitted, the default is used. - // - // Constraints: - // - // * If supplied, must match the name of an existing DBClusterParameterGroup. - DBClusterParameterGroupName *string `type:"string"` - - // A DB subnet group to associate with this DB cluster. - // - // Constraints: Must match the name of an existing DBSubnetGroup. Must not be - // default. - // - // Example: mySubnetgroup - DBSubnetGroupName *string `type:"string"` - - // The name for your database of up to 64 alpha-numeric characters. If you do - // not provide a name, Amazon Neptune will not create a database in the DB cluster - // you are creating. - DatabaseName *string `type:"string"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // The name of the database engine to be used for this DB cluster. - // - // Valid Values: neptune - // - // Engine is a required field - Engine *string `type:"string" required:"true"` - - // The version number of the database engine to use. - // - // Example: 1.0.1 - EngineVersion *string `type:"string"` - - // The AWS KMS key identifier for an encrypted DB cluster. - // - // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption - // key. If you are creating a DB cluster with the same AWS account that owns - // the KMS encryption key used to encrypt the new DB cluster, then you can use - // the KMS key alias instead of the ARN for the KMS encryption key. - // - // If an encryption key is not specified in KmsKeyId: - // - // * If ReplicationSourceIdentifier identifies an encrypted source, then - // Amazon Neptune will use the encryption key used to encrypt the source. - // Otherwise, Amazon Neptune will use your default encryption key. - // - // * If the StorageEncrypted parameter is true and ReplicationSourceIdentifier - // is not specified, then Amazon Neptune will use your default encryption - // key. - // - // AWS KMS creates the default encryption key for your AWS account. Your AWS - // account has a different default encryption key for each AWS Region. - // - // If you create a Read Replica of an encrypted DB cluster in another AWS Region, - // you must set KmsKeyId to a KMS key ID that is valid in the destination AWS - // Region. This key is used to encrypt the Read Replica in that AWS Region. - KmsKeyId *string `type:"string"` - - // The password for the master database user. This password can contain any - // printable ASCII character except "/", """, or "@". - // - // Constraints: Must contain from 8 to 41 characters. - MasterUserPassword *string `type:"string"` - - // The name of the master user for the DB cluster. - // - // Constraints: - // - // * Must be 1 to 16 letters or numbers. - // - // * First character must be a letter. - // - // * Cannot be a reserved word for the chosen database engine. - MasterUsername *string `type:"string"` - - // A value that indicates that the DB cluster should be associated with the - // specified option group. - // - // Permanent options can't be removed from an option group. The option group - // can't be removed from a DB cluster once it is associated with a DB cluster. - OptionGroupName *string `type:"string"` - - // The port number on which the instances in the DB cluster accept connections. - // - // Default: 8182 - Port *int64 `type:"integer"` - - // A URL that contains a Signature Version 4 signed request for the CreateDBCluster - // action to be called in the source AWS Region where the DB cluster is replicated - // from. You only need to specify PreSignedUrl when you are performing cross-region - // replication from an encrypted DB cluster. - // - // The pre-signed URL must be a valid request for the CreateDBCluster API action - // that can be executed in the source AWS Region that contains the encrypted - // DB cluster to be copied. - // - // The pre-signed URL request must contain the following parameter values: - // - // * KmsKeyId - The AWS KMS key identifier for the key to use to encrypt - // the copy of the DB cluster in the destination AWS Region. This should - // refer to the same KMS key for both the CreateDBCluster action that is - // called in the destination AWS Region, and the action contained in the - // pre-signed URL. - // - // * DestinationRegion - The name of the AWS Region that Read Replica will - // be created in. - // - // * ReplicationSourceIdentifier - The DB cluster identifier for the encrypted - // DB cluster to be copied. This identifier must be in the Amazon Resource - // Name (ARN) format for the source AWS Region. For example, if you are copying - // an encrypted DB cluster from the us-west-2 AWS Region, then your ReplicationSourceIdentifier - // would look like Example: arn:aws:rds:us-west-2:123456789012:cluster:neptune-cluster1. - // - // To learn how to generate a Signature Version 4 signed request, see Authenticating - // Requests: Using Query Parameters (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) - // and Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). - PreSignedUrl *string `type:"string"` - - // The daily time range during which automated backups are created if automated - // backups are enabled using the BackupRetentionPeriod parameter. - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region. To see the time blocks available, see Adjusting - // the Preferred Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html) - // in the Amazon Neptune User Guide. - // - // Constraints: - // - // * Must be in the format hh24:mi-hh24:mi. - // - // * Must be in Universal Coordinated Time (UTC). - // - // * Must not conflict with the preferred maintenance window. - // - // * Must be at least 30 minutes. - PreferredBackupWindow *string `type:"string"` - - // The weekly time range during which system maintenance can occur, in Universal - // Coordinated Time (UTC). - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region, occurring on a random day of the week. To see - // the time blocks available, see Adjusting the Preferred Maintenance Window - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html) - // in the Amazon Neptune User Guide. - // - // Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. - // - // Constraints: Minimum 30-minute window. - PreferredMaintenanceWindow *string `type:"string"` - - // The Amazon Resource Name (ARN) of the source DB instance or DB cluster if - // this DB cluster is created as a Read Replica. - ReplicationSourceIdentifier *string `type:"string"` - - // Specifies whether the DB cluster is encrypted. - StorageEncrypted *bool `type:"boolean"` - - // A list of tags. For more information, see Tagging Amazon Neptune Resources - // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A list of EC2 VPC security groups to associate with this DB cluster. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s CreateDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.Engine == nil { - invalidParams.Add(request.NewErrParamRequired("Engine")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *CreateDBClusterInput) SetAvailabilityZones(v []*string) *CreateDBClusterInput { - s.AvailabilityZones = v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *CreateDBClusterInput) SetBackupRetentionPeriod(v int64) *CreateDBClusterInput { - s.BackupRetentionPeriod = &v - return s -} - -// SetCharacterSetName sets the CharacterSetName field's value. -func (s *CreateDBClusterInput) SetCharacterSetName(v string) *CreateDBClusterInput { - s.CharacterSetName = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *CreateDBClusterInput) SetDBClusterIdentifier(v string) *CreateDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *CreateDBClusterInput) SetDBClusterParameterGroupName(v string) *CreateDBClusterInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *CreateDBClusterInput) SetDBSubnetGroupName(v string) *CreateDBClusterInput { - s.DBSubnetGroupName = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *CreateDBClusterInput) SetDatabaseName(v string) *CreateDBClusterInput { - s.DatabaseName = &v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *CreateDBClusterInput) SetEnableIAMDatabaseAuthentication(v bool) *CreateDBClusterInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *CreateDBClusterInput) SetEngine(v string) *CreateDBClusterInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *CreateDBClusterInput) SetEngineVersion(v string) *CreateDBClusterInput { - s.EngineVersion = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateDBClusterInput) SetKmsKeyId(v string) *CreateDBClusterInput { - s.KmsKeyId = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *CreateDBClusterInput) SetMasterUserPassword(v string) *CreateDBClusterInput { - s.MasterUserPassword = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *CreateDBClusterInput) SetMasterUsername(v string) *CreateDBClusterInput { - s.MasterUsername = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *CreateDBClusterInput) SetOptionGroupName(v string) *CreateDBClusterInput { - s.OptionGroupName = &v - return s -} - -// SetPort sets the Port field's value. -func (s *CreateDBClusterInput) SetPort(v int64) *CreateDBClusterInput { - s.Port = &v - return s -} - -// SetPreSignedUrl sets the PreSignedUrl field's value. -func (s *CreateDBClusterInput) SetPreSignedUrl(v string) *CreateDBClusterInput { - s.PreSignedUrl = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *CreateDBClusterInput) SetPreferredBackupWindow(v string) *CreateDBClusterInput { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CreateDBClusterInput) SetPreferredMaintenanceWindow(v string) *CreateDBClusterInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetReplicationSourceIdentifier sets the ReplicationSourceIdentifier field's value. -func (s *CreateDBClusterInput) SetReplicationSourceIdentifier(v string) *CreateDBClusterInput { - s.ReplicationSourceIdentifier = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *CreateDBClusterInput) SetStorageEncrypted(v bool) *CreateDBClusterInput { - s.StorageEncrypted = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBClusterInput) SetTags(v []*Tag) *CreateDBClusterInput { - s.Tags = v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *CreateDBClusterInput) SetVpcSecurityGroupIds(v []*string) *CreateDBClusterInput { - s.VpcSecurityGroupIds = v - return s -} - -type CreateDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters action. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s CreateDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *CreateDBClusterOutput) SetDBCluster(v *DBCluster) *CreateDBClusterOutput { - s.DBCluster = v - return s -} - -type CreateDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group. - // - // Constraints: - // - // * Must match the name of an existing DBClusterParameterGroup. - // - // This value is stored as a lowercase string. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` - - // The DB cluster parameter group family name. A DB cluster parameter group - // can be associated with one and only one DB cluster parameter group family, - // and can be applied only to a DB cluster running a database engine and engine - // version compatible with that DB cluster parameter group family. - // - // DBParameterGroupFamily is a required field - DBParameterGroupFamily *string `type:"string" required:"true"` - - // The description for the DB cluster parameter group. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon Neptune Resources - // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterParameterGroupInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - if s.DBParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) - } - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *CreateDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *CreateDBClusterParameterGroupInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *CreateDBClusterParameterGroupInput) SetDBParameterGroupFamily(v string) *CreateDBClusterParameterGroupInput { - s.DBParameterGroupFamily = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateDBClusterParameterGroupInput) SetDescription(v string) *CreateDBClusterParameterGroupInput { - s.Description = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBClusterParameterGroupInput) SetTags(v []*Tag) *CreateDBClusterParameterGroupInput { - s.Tags = v - return s -} - -type CreateDBClusterParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB cluster parameter group. - // - // This data type is used as a response element in the DescribeDBClusterParameterGroups - // action. - DBClusterParameterGroup *DBClusterParameterGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateDBClusterParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. -func (s *CreateDBClusterParameterGroupOutput) SetDBClusterParameterGroup(v *DBClusterParameterGroup) *CreateDBClusterParameterGroupOutput { - s.DBClusterParameterGroup = v - return s -} - -type CreateDBClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // The identifier of the DB cluster to create a snapshot for. This parameter - // is not case-sensitive. - // - // Constraints: - // - // * Must match the identifier of an existing DBCluster. - // - // Example: my-cluster1 - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The identifier of the DB cluster snapshot. This parameter is stored as a - // lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster1-snapshot1 - // - // DBClusterSnapshotIdentifier is a required field - DBClusterSnapshotIdentifier *string `type:"string" required:"true"` - - // The tags to be assigned to the DB cluster snapshot. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateDBClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterSnapshotInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.DBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *CreateDBClusterSnapshotInput) SetDBClusterIdentifier(v string) *CreateDBClusterSnapshotInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *CreateDBClusterSnapshotInput) SetDBClusterSnapshotIdentifier(v string) *CreateDBClusterSnapshotInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBClusterSnapshotInput) SetTags(v []*Tag) *CreateDBClusterSnapshotInput { - s.Tags = v - return s -} - -type CreateDBClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Contains the details for an Amazon Neptune DB cluster snapshot - // - // This data type is used as a response element in the DescribeDBClusterSnapshots - // action. - DBClusterSnapshot *DBClusterSnapshot `type:"structure"` -} - -// String returns the string representation -func (s CreateDBClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. -func (s *CreateDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *CreateDBClusterSnapshotOutput { - s.DBClusterSnapshot = v - return s -} - -type CreateDBInstanceInput struct { - _ struct{} `type:"structure"` - - // The amount of storage (in gibibytes) to allocate for the DB instance. - // - // Type: Integer - // - // Not applicable. Neptune cluster volumes automatically grow as the amount - // of data in your database increases, though you are only charged for the space - // that you use in a Neptune cluster volume. - AllocatedStorage *int64 `type:"integer"` - - // Indicates that minor engine upgrades are applied automatically to the DB - // instance during the maintenance window. - // - // Default: true - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The EC2 Availability Zone that the DB instance is created in. - // - // Default: A random, system-chosen Availability Zone in the endpoint's AWS - // Region. - // - // Example: us-east-1d - // - // Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ - // parameter is set to true. The specified Availability Zone must be in the - // same AWS Region as the current endpoint. - AvailabilityZone *string `type:"string"` - - // The number of days for which automated backups are retained. - // - // Not applicable. The retention period for automated backups is managed by - // the DB cluster. For more information, see CreateDBCluster. - // - // Default: 1 - // - // Constraints: - // - // * Must be a value from 0 to 35 - // - // * Cannot be set to 0 if the DB instance is a source to Read Replicas - BackupRetentionPeriod *int64 `type:"integer"` - - // Indicates that the DB instance should be associated with the specified CharacterSet. - // - // Not applicable. The character set is managed by the DB cluster. For more - // information, see CreateDBCluster. - CharacterSetName *string `type:"string"` - - // True to copy all tags from the DB instance to snapshots of the DB instance, - // and otherwise false. The default is false. - CopyTagsToSnapshot *bool `type:"boolean"` - - // The identifier of the DB cluster that the instance will belong to. - // - // For information on creating a DB cluster, see CreateDBCluster. - // - // Type: String - DBClusterIdentifier *string `type:"string"` - - // The compute and memory capacity of the DB instance, for example, db.m4.large. - // Not all DB instance classes are available in all AWS Regions. - // - // DBInstanceClass is a required field - DBInstanceClass *string `type:"string" required:"true"` - - // The DB instance identifier. This parameter is stored as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: mydbinstance - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The database name. - // - // Type: String - DBName *string `type:"string"` - - // The name of the DB parameter group to associate with this DB instance. If - // this argument is omitted, the default DBParameterGroup for the specified - // engine is used. - // - // Constraints: - // - // * Must be 1 to 255 letters, numbers, or hyphens. - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - DBParameterGroupName *string `type:"string"` - - // A list of DB security groups to associate with this DB instance. - // - // Default: The default DB security group for the database engine. - DBSecurityGroups []*string `locationNameList:"DBSecurityGroupName" type:"list"` - - // A DB subnet group to associate with this DB instance. - // - // If there is no DB subnet group, then it is a non-VPC DB instance. - DBSubnetGroupName *string `type:"string"` - - // Specify the Active Directory Domain to create the instance in. - Domain *string `type:"string"` - - // Specify the name of the IAM role to be used when making API calls to the - // Directory Service. - DomainIAMRoleName *string `type:"string"` - - // The list of log types that need to be enabled for exporting to CloudWatch - // Logs. - EnableCloudwatchLogsExports []*string `type:"list"` - - // True to enable AWS Identity and Access Management (IAM) authentication for - // Neptune. - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // True to enable Performance Insights for the DB instance, and otherwise false. - EnablePerformanceInsights *bool `type:"boolean"` - - // The name of the database engine to be used for this instance. - // - // Valid Values: neptune - // - // Engine is a required field - Engine *string `type:"string" required:"true"` - - // The version number of the database engine to use. - EngineVersion *string `type:"string"` - - // The amount of Provisioned IOPS (input/output operations per second) to be - // initially allocated for the DB instance. - Iops *int64 `type:"integer"` - - // The AWS KMS key identifier for an encrypted DB instance. - // - // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption - // key. If you are creating a DB instance with the same AWS account that owns - // the KMS encryption key used to encrypt the new DB instance, then you can - // use the KMS key alias instead of the ARN for the KM encryption key. - // - // Not applicable. The KMS key identifier is managed by the DB cluster. For - // more information, see CreateDBCluster. - // - // If the StorageEncrypted parameter is true, and you do not specify a value - // for the KmsKeyId parameter, then Amazon Neptune will use your default encryption - // key. AWS KMS creates the default encryption key for your AWS account. Your - // AWS account has a different default encryption key for each AWS Region. - KmsKeyId *string `type:"string"` - - // License model information for this DB instance. - // - // Valid values: license-included | bring-your-own-license | general-public-license - LicenseModel *string `type:"string"` - - // The password for the master user. The password can include any printable - // ASCII character except "/", """, or "@". - // - // Not used. - MasterUserPassword *string `type:"string"` - - // The name for the master user. Not used. - MasterUsername *string `type:"string"` - - // The interval, in seconds, between points when Enhanced Monitoring metrics - // are collected for the DB instance. To disable collecting Enhanced Monitoring - // metrics, specify 0. The default is 0. - // - // If MonitoringRoleArn is specified, then you must also set MonitoringInterval - // to a value other than 0. - // - // Valid Values: 0, 1, 5, 10, 15, 30, 60 - MonitoringInterval *int64 `type:"integer"` - - // The ARN for the IAM role that permits Neptune to send enhanced monitoring - // metrics to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. - // - // If MonitoringInterval is set to a value other than 0, then you must supply - // a MonitoringRoleArn value. - MonitoringRoleArn *string `type:"string"` - - // Specifies if the DB instance is a Multi-AZ deployment. You can't set the - // AvailabilityZone parameter if the MultiAZ parameter is set to true. - MultiAZ *bool `type:"boolean"` - - // Indicates that the DB instance should be associated with the specified option - // group. - // - // Permanent options, such as the TDE option for Oracle Advanced Security TDE, - // can't be removed from an option group, and that option group can't be removed - // from a DB instance once it is associated with a DB instance - OptionGroupName *string `type:"string"` - - // The AWS KMS key identifier for encryption of Performance Insights data. The - // KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the - // KMS key alias for the KMS encryption key. - PerformanceInsightsKMSKeyId *string `type:"string"` - - // The port number on which the database accepts connections. - // - // Not applicable. The port is managed by the DB cluster. For more information, - // see CreateDBCluster. - // - // Default: 8182 - // - // Type: Integer - Port *int64 `type:"integer"` - - // The daily time range during which automated backups are created. - // - // Not applicable. The daily time range for creating automated backups is managed - // by the DB cluster. For more information, see CreateDBCluster. - PreferredBackupWindow *string `type:"string"` - - // The time range each week during which system maintenance can occur, in Universal - // Coordinated Time (UTC). - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region, occurring on a random day of the week. - // - // Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. - // - // Constraints: Minimum 30-minute window. - PreferredMaintenanceWindow *string `type:"string"` - - // A value that specifies the order in which an Read Replica is promoted to - // the primary instance after a failure of the existing primary instance. - // - // Default: 1 - // - // Valid Values: 0 - 15 - PromotionTier *int64 `type:"integer"` - - // This parameter is not supported. - // - // Deprecated: PubliclyAccessible has been deprecated - PubliclyAccessible *bool `deprecated:"true" type:"boolean"` - - // Specifies whether the DB instance is encrypted. - // - // Not applicable. The encryption for DB instances is managed by the DB cluster. - // For more information, see CreateDBCluster. - // - // Default: false - StorageEncrypted *bool `type:"boolean"` - - // Specifies the storage type to be associated with the DB instance. - // - // Not applicable. Storage is managed by the DB Cluster. - StorageType *string `type:"string"` - - // A list of tags. For more information, see Tagging Amazon Neptune Resources - // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // The ARN from the key store with which to associate the instance for TDE encryption. - TdeCredentialArn *string `type:"string"` - - // The password for the given ARN from the key store in order to access the - // device. - TdeCredentialPassword *string `type:"string"` - - // The time zone of the DB instance. - Timezone *string `type:"string"` - - // A list of EC2 VPC security groups to associate with this DB instance. - // - // Not applicable. The associated list of EC2 VPC security groups is managed - // by the DB cluster. For more information, see CreateDBCluster. - // - // Default: The default EC2 VPC security group for the DB subnet group's VPC. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s CreateDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBInstanceInput"} - if s.DBInstanceClass == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceClass")) - } - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - if s.Engine == nil { - invalidParams.Add(request.NewErrParamRequired("Engine")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *CreateDBInstanceInput) SetAllocatedStorage(v int64) *CreateDBInstanceInput { - s.AllocatedStorage = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *CreateDBInstanceInput) SetAutoMinorVersionUpgrade(v bool) *CreateDBInstanceInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateDBInstanceInput) SetAvailabilityZone(v string) *CreateDBInstanceInput { - s.AvailabilityZone = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *CreateDBInstanceInput) SetBackupRetentionPeriod(v int64) *CreateDBInstanceInput { - s.BackupRetentionPeriod = &v - return s -} - -// SetCharacterSetName sets the CharacterSetName field's value. -func (s *CreateDBInstanceInput) SetCharacterSetName(v string) *CreateDBInstanceInput { - s.CharacterSetName = &v - return s -} - -// SetCopyTagsToSnapshot sets the CopyTagsToSnapshot field's value. -func (s *CreateDBInstanceInput) SetCopyTagsToSnapshot(v bool) *CreateDBInstanceInput { - s.CopyTagsToSnapshot = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *CreateDBInstanceInput) SetDBClusterIdentifier(v string) *CreateDBInstanceInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *CreateDBInstanceInput) SetDBInstanceClass(v string) *CreateDBInstanceInput { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *CreateDBInstanceInput) SetDBInstanceIdentifier(v string) *CreateDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBName sets the DBName field's value. -func (s *CreateDBInstanceInput) SetDBName(v string) *CreateDBInstanceInput { - s.DBName = &v - return s -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *CreateDBInstanceInput) SetDBParameterGroupName(v string) *CreateDBInstanceInput { - s.DBParameterGroupName = &v - return s -} - -// SetDBSecurityGroups sets the DBSecurityGroups field's value. -func (s *CreateDBInstanceInput) SetDBSecurityGroups(v []*string) *CreateDBInstanceInput { - s.DBSecurityGroups = v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *CreateDBInstanceInput) SetDBSubnetGroupName(v string) *CreateDBInstanceInput { - s.DBSubnetGroupName = &v - return s -} - -// SetDomain sets the Domain field's value. -func (s *CreateDBInstanceInput) SetDomain(v string) *CreateDBInstanceInput { - s.Domain = &v - return s -} - -// SetDomainIAMRoleName sets the DomainIAMRoleName field's value. -func (s *CreateDBInstanceInput) SetDomainIAMRoleName(v string) *CreateDBInstanceInput { - s.DomainIAMRoleName = &v - return s -} - -// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. -func (s *CreateDBInstanceInput) SetEnableCloudwatchLogsExports(v []*string) *CreateDBInstanceInput { - s.EnableCloudwatchLogsExports = v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *CreateDBInstanceInput) SetEnableIAMDatabaseAuthentication(v bool) *CreateDBInstanceInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEnablePerformanceInsights sets the EnablePerformanceInsights field's value. -func (s *CreateDBInstanceInput) SetEnablePerformanceInsights(v bool) *CreateDBInstanceInput { - s.EnablePerformanceInsights = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *CreateDBInstanceInput) SetEngine(v string) *CreateDBInstanceInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *CreateDBInstanceInput) SetEngineVersion(v string) *CreateDBInstanceInput { - s.EngineVersion = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *CreateDBInstanceInput) SetIops(v int64) *CreateDBInstanceInput { - s.Iops = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateDBInstanceInput) SetKmsKeyId(v string) *CreateDBInstanceInput { - s.KmsKeyId = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *CreateDBInstanceInput) SetLicenseModel(v string) *CreateDBInstanceInput { - s.LicenseModel = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *CreateDBInstanceInput) SetMasterUserPassword(v string) *CreateDBInstanceInput { - s.MasterUserPassword = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *CreateDBInstanceInput) SetMasterUsername(v string) *CreateDBInstanceInput { - s.MasterUsername = &v - return s -} - -// SetMonitoringInterval sets the MonitoringInterval field's value. -func (s *CreateDBInstanceInput) SetMonitoringInterval(v int64) *CreateDBInstanceInput { - s.MonitoringInterval = &v - return s -} - -// SetMonitoringRoleArn sets the MonitoringRoleArn field's value. -func (s *CreateDBInstanceInput) SetMonitoringRoleArn(v string) *CreateDBInstanceInput { - s.MonitoringRoleArn = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *CreateDBInstanceInput) SetMultiAZ(v bool) *CreateDBInstanceInput { - s.MultiAZ = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *CreateDBInstanceInput) SetOptionGroupName(v string) *CreateDBInstanceInput { - s.OptionGroupName = &v - return s -} - -// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. -func (s *CreateDBInstanceInput) SetPerformanceInsightsKMSKeyId(v string) *CreateDBInstanceInput { - s.PerformanceInsightsKMSKeyId = &v - return s -} - -// SetPort sets the Port field's value. -func (s *CreateDBInstanceInput) SetPort(v int64) *CreateDBInstanceInput { - s.Port = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *CreateDBInstanceInput) SetPreferredBackupWindow(v string) *CreateDBInstanceInput { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CreateDBInstanceInput) SetPreferredMaintenanceWindow(v string) *CreateDBInstanceInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPromotionTier sets the PromotionTier field's value. -func (s *CreateDBInstanceInput) SetPromotionTier(v int64) *CreateDBInstanceInput { - s.PromotionTier = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *CreateDBInstanceInput) SetPubliclyAccessible(v bool) *CreateDBInstanceInput { - s.PubliclyAccessible = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *CreateDBInstanceInput) SetStorageEncrypted(v bool) *CreateDBInstanceInput { - s.StorageEncrypted = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *CreateDBInstanceInput) SetStorageType(v string) *CreateDBInstanceInput { - s.StorageType = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBInstanceInput) SetTags(v []*Tag) *CreateDBInstanceInput { - s.Tags = v - return s -} - -// SetTdeCredentialArn sets the TdeCredentialArn field's value. -func (s *CreateDBInstanceInput) SetTdeCredentialArn(v string) *CreateDBInstanceInput { - s.TdeCredentialArn = &v - return s -} - -// SetTdeCredentialPassword sets the TdeCredentialPassword field's value. -func (s *CreateDBInstanceInput) SetTdeCredentialPassword(v string) *CreateDBInstanceInput { - s.TdeCredentialPassword = &v - return s -} - -// SetTimezone sets the Timezone field's value. -func (s *CreateDBInstanceInput) SetTimezone(v string) *CreateDBInstanceInput { - s.Timezone = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *CreateDBInstanceInput) SetVpcSecurityGroupIds(v []*string) *CreateDBInstanceInput { - s.VpcSecurityGroupIds = v - return s -} - -type CreateDBInstanceOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s CreateDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBInstanceOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *CreateDBInstanceOutput) SetDBInstance(v *DBInstance) *CreateDBInstanceOutput { - s.DBInstance = v - return s -} - -type CreateDBParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The DB parameter group family name. A DB parameter group can be associated - // with one and only one DB parameter group family, and can be applied only - // to a DB instance running a database engine and engine version compatible - // with that DB parameter group family. - // - // DBParameterGroupFamily is a required field - DBParameterGroupFamily *string `type:"string" required:"true"` - - // The name of the DB parameter group. - // - // Constraints: - // - // * Must be 1 to 255 letters, numbers, or hyphens. - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - // - // This value is stored as a lowercase string. - // - // DBParameterGroupName is a required field - DBParameterGroupName *string `type:"string" required:"true"` - - // The description for the DB parameter group. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon Neptune Resources - // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateDBParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBParameterGroupInput"} - if s.DBParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) - } - if s.DBParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) - } - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *CreateDBParameterGroupInput) SetDBParameterGroupFamily(v string) *CreateDBParameterGroupInput { - s.DBParameterGroupFamily = &v - return s -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *CreateDBParameterGroupInput) SetDBParameterGroupName(v string) *CreateDBParameterGroupInput { - s.DBParameterGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateDBParameterGroupInput) SetDescription(v string) *CreateDBParameterGroupInput { - s.Description = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBParameterGroupInput) SetTags(v []*Tag) *CreateDBParameterGroupInput { - s.Tags = v - return s -} - -type CreateDBParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB parameter group. - // - // This data type is used as a response element in the DescribeDBParameterGroups - // action. - DBParameterGroup *DBParameterGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateDBParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDBParameterGroup sets the DBParameterGroup field's value. -func (s *CreateDBParameterGroupOutput) SetDBParameterGroup(v *DBParameterGroup) *CreateDBParameterGroupOutput { - s.DBParameterGroup = v - return s -} - -type CreateDBSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The description for the DB subnet group. - // - // DBSubnetGroupDescription is a required field - DBSubnetGroupDescription *string `type:"string" required:"true"` - - // The name for the DB subnet group. This value is stored as a lowercase string. - // - // Constraints: Must contain no more than 255 letters, numbers, periods, underscores, - // spaces, or hyphens. Must not be default. - // - // Example: mySubnetgroup - // - // DBSubnetGroupName is a required field - DBSubnetGroupName *string `type:"string" required:"true"` - - // The EC2 Subnet IDs for the DB subnet group. - // - // SubnetIds is a required field - SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` - - // A list of tags. For more information, see Tagging Amazon Neptune Resources - // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateDBSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBSubnetGroupInput"} - if s.DBSubnetGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupDescription")) - } - if s.DBSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. -func (s *CreateDBSubnetGroupInput) SetDBSubnetGroupDescription(v string) *CreateDBSubnetGroupInput { - s.DBSubnetGroupDescription = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *CreateDBSubnetGroupInput) SetDBSubnetGroupName(v string) *CreateDBSubnetGroupInput { - s.DBSubnetGroupName = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateDBSubnetGroupInput) SetSubnetIds(v []*string) *CreateDBSubnetGroupInput { - s.SubnetIds = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBSubnetGroupInput) SetTags(v []*Tag) *CreateDBSubnetGroupInput { - s.Tags = v - return s -} - -type CreateDBSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB subnet group. - // - // This data type is used as a response element in the DescribeDBSubnetGroups - // action. - DBSubnetGroup *DBSubnetGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateDBSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetDBSubnetGroup sets the DBSubnetGroup field's value. -func (s *CreateDBSubnetGroupOutput) SetDBSubnetGroup(v *DBSubnetGroup) *CreateDBSubnetGroupOutput { - s.DBSubnetGroup = v - return s -} - -type CreateEventSubscriptionInput struct { - _ struct{} `type:"structure"` - - // A Boolean value; set to true to activate the subscription, set to false to - // create the subscription but not active it. - Enabled *bool `type:"boolean"` - - // A list of event categories for a SourceType that you want to subscribe to. - // You can see a list of the categories for a given SourceType by using the - // DescribeEventCategories action. - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // The Amazon Resource Name (ARN) of the SNS topic created for event notification. - // The ARN is created by Amazon SNS when you create a topic and subscribe to - // it. - // - // SnsTopicArn is a required field - SnsTopicArn *string `type:"string" required:"true"` - - // The list of identifiers of the event sources for which events are returned. - // If not specified, then all sources are included in the response. An identifier - // must begin with a letter and must contain only ASCII letters, digits, and - // hyphens; it can't end with a hyphen or contain two consecutive hyphens. - // - // Constraints: - // - // * If SourceIds are supplied, SourceType must also be provided. - // - // * If the source type is a DB instance, then a DBInstanceIdentifier must - // be supplied. - // - // * If the source type is a DB security group, a DBSecurityGroupName must - // be supplied. - // - // * If the source type is a DB parameter group, a DBParameterGroupName must - // be supplied. - // - // * If the source type is a DB snapshot, a DBSnapshotIdentifier must be - // supplied. - SourceIds []*string `locationNameList:"SourceId" type:"list"` - - // The type of source that is generating the events. For example, if you want - // to be notified of events generated by a DB instance, you would set this parameter - // to db-instance. if this value is not specified, all events are returned. - // - // Valid values: db-instance | db-cluster | db-parameter-group | db-security-group - // | db-snapshot | db-cluster-snapshot - SourceType *string `type:"string"` - - // The name of the subscription. - // - // Constraints: The name must be less than 255 characters. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon Neptune Resources - // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateEventSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEventSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateEventSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateEventSubscriptionInput"} - if s.SnsTopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("SnsTopicArn")) - } - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *CreateEventSubscriptionInput) SetEnabled(v bool) *CreateEventSubscriptionInput { - s.Enabled = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *CreateEventSubscriptionInput) SetEventCategories(v []*string) *CreateEventSubscriptionInput { - s.EventCategories = v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *CreateEventSubscriptionInput) SetSnsTopicArn(v string) *CreateEventSubscriptionInput { - s.SnsTopicArn = &v - return s -} - -// SetSourceIds sets the SourceIds field's value. -func (s *CreateEventSubscriptionInput) SetSourceIds(v []*string) *CreateEventSubscriptionInput { - s.SourceIds = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *CreateEventSubscriptionInput) SetSourceType(v string) *CreateEventSubscriptionInput { - s.SourceType = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *CreateEventSubscriptionInput) SetSubscriptionName(v string) *CreateEventSubscriptionInput { - s.SubscriptionName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateEventSubscriptionInput) SetTags(v []*Tag) *CreateEventSubscriptionInput { - s.Tags = v - return s -} - -type CreateEventSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful invocation of the DescribeEventSubscriptions - // action. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s CreateEventSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEventSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *CreateEventSubscriptionOutput) SetEventSubscription(v *EventSubscription) *CreateEventSubscriptionOutput { - s.EventSubscription = v - return s -} - -// Contains the details of an Amazon Neptune DB cluster. -// -// This data type is used as a response element in the DescribeDBClusters action. -type DBCluster struct { - _ struct{} `type:"structure"` - - // AllocatedStorage always returns 1, because Neptune DB cluster storage size - // is not fixed, but instead automatically adjusts as needed. - AllocatedStorage *int64 `type:"integer"` - - // Provides a list of the AWS Identity and Access Management (IAM) roles that - // are associated with the DB cluster. IAM roles that are associated with a - // DB cluster grant permission for the DB cluster to access other AWS services - // on your behalf. - AssociatedRoles []*DBClusterRole `locationNameList:"DBClusterRole" type:"list"` - - // Provides the list of EC2 Availability Zones that instances in the DB cluster - // can be created in. - AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // Specifies the number of days for which automatic DB snapshots are retained. - BackupRetentionPeriod *int64 `type:"integer"` - - // If present, specifies the name of the character set that this cluster is - // associated with. - CharacterSetName *string `type:"string"` - - // Identifies the clone group to which the DB cluster is associated. - CloneGroupId *string `type:"string"` - - // Specifies the time when the DB cluster was created, in Universal Coordinated - // Time (UTC). - ClusterCreateTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) for the DB cluster. - DBClusterArn *string `type:"string"` - - // Contains a user-supplied DB cluster identifier. This identifier is the unique - // key that identifies a DB cluster. - DBClusterIdentifier *string `type:"string"` - - // Provides the list of instances that make up the DB cluster. - DBClusterMembers []*DBClusterMember `locationNameList:"DBClusterMember" type:"list"` - - // Provides the list of option group memberships for this DB cluster. - DBClusterOptionGroupMemberships []*DBClusterOptionGroupStatus `locationNameList:"DBClusterOptionGroup" type:"list"` - - // Specifies the name of the DB cluster parameter group for the DB cluster. - DBClusterParameterGroup *string `type:"string"` - - // Specifies information on the subnet group associated with the DB cluster, - // including the name, description, and subnets in the subnet group. - DBSubnetGroup *string `type:"string"` - - // Contains the name of the initial database of this DB cluster that was provided - // at create time, if one was specified when the DB cluster was created. This - // same name is returned for the life of the DB cluster. - DatabaseName *string `type:"string"` - - // The AWS Region-unique, immutable identifier for the DB cluster. This identifier - // is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB - // cluster is accessed. - DbClusterResourceId *string `type:"string"` - - // Specifies the earliest time to which a database can be restored with point-in-time - // restore. - EarliestRestorableTime *time.Time `type:"timestamp"` - - // Specifies the connection endpoint for the primary instance of the DB cluster. - Endpoint *string `type:"string"` - - // Provides the name of the database engine to be used for this DB cluster. - Engine *string `type:"string"` - - // Indicates the database engine version. - EngineVersion *string `type:"string"` - - // Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. - HostedZoneId *string `type:"string"` - - // True if mapping of AWS Identity and Access Management (IAM) accounts to database - // accounts is enabled, and otherwise false. - IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` - - // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted - // DB cluster. - KmsKeyId *string `type:"string"` - - // Specifies the latest time to which a database can be restored with point-in-time - // restore. - LatestRestorableTime *time.Time `type:"timestamp"` - - // Contains the master username for the DB cluster. - MasterUsername *string `type:"string"` - - // Specifies whether the DB cluster has instances in multiple Availability Zones. - MultiAZ *bool `type:"boolean"` - - // Specifies the progress of the operation as a percentage. - PercentProgress *string `type:"string"` - - // Specifies the port that the database engine is listening on. - Port *int64 `type:"integer"` - - // Specifies the daily time range during which automated backups are created - // if automated backups are enabled, as determined by the BackupRetentionPeriod. - PreferredBackupWindow *string `type:"string"` - - // Specifies the weekly time range during which system maintenance can occur, - // in Universal Coordinated Time (UTC). - PreferredMaintenanceWindow *string `type:"string"` - - // Contains one or more identifiers of the Read Replicas associated with this - // DB cluster. - ReadReplicaIdentifiers []*string `locationNameList:"ReadReplicaIdentifier" type:"list"` - - // The reader endpoint for the DB cluster. The reader endpoint for a DB cluster - // load-balances connections across the Read Replicas that are available in - // a DB cluster. As clients request new connections to the reader endpoint, - // Neptune distributes the connection requests among the Read Replicas in the - // DB cluster. This functionality can help balance your read workload across - // multiple Read Replicas in your DB cluster. - // - // If a failover occurs, and the Read Replica that you are connected to is promoted - // to be the primary instance, your connection is dropped. To continue sending - // your read workload to other Read Replicas in the cluster, you can then reconnect - // to the reader endpoint. - ReaderEndpoint *string `type:"string"` - - // Contains the identifier of the source DB cluster if this DB cluster is a - // Read Replica. - ReplicationSourceIdentifier *string `type:"string"` - - // Specifies the current state of this DB cluster. - Status *string `type:"string"` - - // Specifies whether the DB cluster is encrypted. - StorageEncrypted *bool `type:"boolean"` - - // Provides a list of VPC security groups that the DB cluster belongs to. - VpcSecurityGroups []*VpcSecurityGroupMembership `locationNameList:"VpcSecurityGroupMembership" type:"list"` -} - -// String returns the string representation -func (s DBCluster) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBCluster) GoString() string { - return s.String() -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *DBCluster) SetAllocatedStorage(v int64) *DBCluster { - s.AllocatedStorage = &v - return s -} - -// SetAssociatedRoles sets the AssociatedRoles field's value. -func (s *DBCluster) SetAssociatedRoles(v []*DBClusterRole) *DBCluster { - s.AssociatedRoles = v - return s -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DBCluster) SetAvailabilityZones(v []*string) *DBCluster { - s.AvailabilityZones = v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *DBCluster) SetBackupRetentionPeriod(v int64) *DBCluster { - s.BackupRetentionPeriod = &v - return s -} - -// SetCharacterSetName sets the CharacterSetName field's value. -func (s *DBCluster) SetCharacterSetName(v string) *DBCluster { - s.CharacterSetName = &v - return s -} - -// SetCloneGroupId sets the CloneGroupId field's value. -func (s *DBCluster) SetCloneGroupId(v string) *DBCluster { - s.CloneGroupId = &v - return s -} - -// SetClusterCreateTime sets the ClusterCreateTime field's value. -func (s *DBCluster) SetClusterCreateTime(v time.Time) *DBCluster { - s.ClusterCreateTime = &v - return s -} - -// SetDBClusterArn sets the DBClusterArn field's value. -func (s *DBCluster) SetDBClusterArn(v string) *DBCluster { - s.DBClusterArn = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DBCluster) SetDBClusterIdentifier(v string) *DBCluster { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterMembers sets the DBClusterMembers field's value. -func (s *DBCluster) SetDBClusterMembers(v []*DBClusterMember) *DBCluster { - s.DBClusterMembers = v - return s -} - -// SetDBClusterOptionGroupMemberships sets the DBClusterOptionGroupMemberships field's value. -func (s *DBCluster) SetDBClusterOptionGroupMemberships(v []*DBClusterOptionGroupStatus) *DBCluster { - s.DBClusterOptionGroupMemberships = v - return s -} - -// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. -func (s *DBCluster) SetDBClusterParameterGroup(v string) *DBCluster { - s.DBClusterParameterGroup = &v - return s -} - -// SetDBSubnetGroup sets the DBSubnetGroup field's value. -func (s *DBCluster) SetDBSubnetGroup(v string) *DBCluster { - s.DBSubnetGroup = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *DBCluster) SetDatabaseName(v string) *DBCluster { - s.DatabaseName = &v - return s -} - -// SetDbClusterResourceId sets the DbClusterResourceId field's value. -func (s *DBCluster) SetDbClusterResourceId(v string) *DBCluster { - s.DbClusterResourceId = &v - return s -} - -// SetEarliestRestorableTime sets the EarliestRestorableTime field's value. -func (s *DBCluster) SetEarliestRestorableTime(v time.Time) *DBCluster { - s.EarliestRestorableTime = &v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *DBCluster) SetEndpoint(v string) *DBCluster { - s.Endpoint = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DBCluster) SetEngine(v string) *DBCluster { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DBCluster) SetEngineVersion(v string) *DBCluster { - s.EngineVersion = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *DBCluster) SetHostedZoneId(v string) *DBCluster { - s.HostedZoneId = &v - return s -} - -// SetIAMDatabaseAuthenticationEnabled sets the IAMDatabaseAuthenticationEnabled field's value. -func (s *DBCluster) SetIAMDatabaseAuthenticationEnabled(v bool) *DBCluster { - s.IAMDatabaseAuthenticationEnabled = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DBCluster) SetKmsKeyId(v string) *DBCluster { - s.KmsKeyId = &v - return s -} - -// SetLatestRestorableTime sets the LatestRestorableTime field's value. -func (s *DBCluster) SetLatestRestorableTime(v time.Time) *DBCluster { - s.LatestRestorableTime = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *DBCluster) SetMasterUsername(v string) *DBCluster { - s.MasterUsername = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *DBCluster) SetMultiAZ(v bool) *DBCluster { - s.MultiAZ = &v - return s -} - -// SetPercentProgress sets the PercentProgress field's value. -func (s *DBCluster) SetPercentProgress(v string) *DBCluster { - s.PercentProgress = &v - return s -} - -// SetPort sets the Port field's value. -func (s *DBCluster) SetPort(v int64) *DBCluster { - s.Port = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *DBCluster) SetPreferredBackupWindow(v string) *DBCluster { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *DBCluster) SetPreferredMaintenanceWindow(v string) *DBCluster { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetReadReplicaIdentifiers sets the ReadReplicaIdentifiers field's value. -func (s *DBCluster) SetReadReplicaIdentifiers(v []*string) *DBCluster { - s.ReadReplicaIdentifiers = v - return s -} - -// SetReaderEndpoint sets the ReaderEndpoint field's value. -func (s *DBCluster) SetReaderEndpoint(v string) *DBCluster { - s.ReaderEndpoint = &v - return s -} - -// SetReplicationSourceIdentifier sets the ReplicationSourceIdentifier field's value. -func (s *DBCluster) SetReplicationSourceIdentifier(v string) *DBCluster { - s.ReplicationSourceIdentifier = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBCluster) SetStatus(v string) *DBCluster { - s.Status = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *DBCluster) SetStorageEncrypted(v bool) *DBCluster { - s.StorageEncrypted = &v - return s -} - -// SetVpcSecurityGroups sets the VpcSecurityGroups field's value. -func (s *DBCluster) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *DBCluster { - s.VpcSecurityGroups = v - return s -} - -// Contains information about an instance that is part of a DB cluster. -type DBClusterMember struct { - _ struct{} `type:"structure"` - - // Specifies the status of the DB cluster parameter group for this member of - // the DB cluster. - DBClusterParameterGroupStatus *string `type:"string"` - - // Specifies the instance identifier for this member of the DB cluster. - DBInstanceIdentifier *string `type:"string"` - - // Value that is true if the cluster member is the primary instance for the - // DB cluster and false otherwise. - IsClusterWriter *bool `type:"boolean"` - - // A value that specifies the order in which a Read Replica is promoted to the - // primary instance after a failure of the existing primary instance. - PromotionTier *int64 `type:"integer"` -} - -// String returns the string representation -func (s DBClusterMember) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterMember) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroupStatus sets the DBClusterParameterGroupStatus field's value. -func (s *DBClusterMember) SetDBClusterParameterGroupStatus(v string) *DBClusterMember { - s.DBClusterParameterGroupStatus = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DBClusterMember) SetDBInstanceIdentifier(v string) *DBClusterMember { - s.DBInstanceIdentifier = &v - return s -} - -// SetIsClusterWriter sets the IsClusterWriter field's value. -func (s *DBClusterMember) SetIsClusterWriter(v bool) *DBClusterMember { - s.IsClusterWriter = &v - return s -} - -// SetPromotionTier sets the PromotionTier field's value. -func (s *DBClusterMember) SetPromotionTier(v int64) *DBClusterMember { - s.PromotionTier = &v - return s -} - -// Contains status information for a DB cluster option group. -type DBClusterOptionGroupStatus struct { - _ struct{} `type:"structure"` - - // Specifies the name of the DB cluster option group. - DBClusterOptionGroupName *string `type:"string"` - - // Specifies the status of the DB cluster option group. - Status *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterOptionGroupStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterOptionGroupStatus) GoString() string { - return s.String() -} - -// SetDBClusterOptionGroupName sets the DBClusterOptionGroupName field's value. -func (s *DBClusterOptionGroupStatus) SetDBClusterOptionGroupName(v string) *DBClusterOptionGroupStatus { - s.DBClusterOptionGroupName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBClusterOptionGroupStatus) SetStatus(v string) *DBClusterOptionGroupStatus { - s.Status = &v - return s -} - -// Contains the details of an Amazon Neptune DB cluster parameter group. -// -// This data type is used as a response element in the DescribeDBClusterParameterGroups -// action. -type DBClusterParameterGroup struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the DB cluster parameter group. - DBClusterParameterGroupArn *string `type:"string"` - - // Provides the name of the DB cluster parameter group. - DBClusterParameterGroupName *string `type:"string"` - - // Provides the name of the DB parameter group family that this DB cluster parameter - // group is compatible with. - DBParameterGroupFamily *string `type:"string"` - - // Provides the customer-specified description for this DB cluster parameter - // group. - Description *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterParameterGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterParameterGroup) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroupArn sets the DBClusterParameterGroupArn field's value. -func (s *DBClusterParameterGroup) SetDBClusterParameterGroupArn(v string) *DBClusterParameterGroup { - s.DBClusterParameterGroupArn = &v - return s -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *DBClusterParameterGroup) SetDBClusterParameterGroupName(v string) *DBClusterParameterGroup { - s.DBClusterParameterGroupName = &v - return s -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DBClusterParameterGroup) SetDBParameterGroupFamily(v string) *DBClusterParameterGroup { - s.DBParameterGroupFamily = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DBClusterParameterGroup) SetDescription(v string) *DBClusterParameterGroup { - s.Description = &v - return s -} - -// Describes an AWS Identity and Access Management (IAM) role that is associated -// with a DB cluster. -type DBClusterRole struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM role that is associated with the - // DB cluster. - RoleArn *string `type:"string"` - - // Describes the state of association between the IAM role and the DB cluster. - // The Status property returns one of the following values: - // - // * ACTIVE - the IAM role ARN is associated with the DB cluster and can - // be used to access other AWS services on your behalf. - // - // * PENDING - the IAM role ARN is being associated with the DB cluster. - // - // * INVALID - the IAM role ARN is associated with the DB cluster, but the - // DB cluster is unable to assume the IAM role in order to access other AWS - // services on your behalf. - Status *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterRole) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterRole) GoString() string { - return s.String() -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DBClusterRole) SetRoleArn(v string) *DBClusterRole { - s.RoleArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBClusterRole) SetStatus(v string) *DBClusterRole { - s.Status = &v - return s -} - -// Contains the details for an Amazon Neptune DB cluster snapshot -// -// This data type is used as a response element in the DescribeDBClusterSnapshots -// action. -type DBClusterSnapshot struct { - _ struct{} `type:"structure"` - - // Specifies the allocated storage size in gibibytes (GiB). - AllocatedStorage *int64 `type:"integer"` - - // Provides the list of EC2 Availability Zones that instances in the DB cluster - // snapshot can be restored in. - AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // Specifies the time when the DB cluster was created, in Universal Coordinated - // Time (UTC). - ClusterCreateTime *time.Time `type:"timestamp"` - - // Specifies the DB cluster identifier of the DB cluster that this DB cluster - // snapshot was created from. - DBClusterIdentifier *string `type:"string"` - - // The Amazon Resource Name (ARN) for the DB cluster snapshot. - DBClusterSnapshotArn *string `type:"string"` - - // Specifies the identifier for the DB cluster snapshot. - DBClusterSnapshotIdentifier *string `type:"string"` - - // Specifies the name of the database engine. - Engine *string `type:"string"` - - // Provides the version of the database engine for this DB cluster snapshot. - EngineVersion *string `type:"string"` - - // True if mapping of AWS Identity and Access Management (IAM) accounts to database - // accounts is enabled, and otherwise false. - IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` - - // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted - // DB cluster snapshot. - KmsKeyId *string `type:"string"` - - // Provides the license model information for this DB cluster snapshot. - LicenseModel *string `type:"string"` - - // Provides the master username for the DB cluster snapshot. - MasterUsername *string `type:"string"` - - // Specifies the percentage of the estimated data that has been transferred. - PercentProgress *int64 `type:"integer"` - - // Specifies the port that the DB cluster was listening on at the time of the - // snapshot. - Port *int64 `type:"integer"` - - // Provides the time when the snapshot was taken, in Universal Coordinated Time - // (UTC). - SnapshotCreateTime *time.Time `type:"timestamp"` - - // Provides the type of the DB cluster snapshot. - SnapshotType *string `type:"string"` - - // If the DB cluster snapshot was copied from a source DB cluster snapshot, - // the Amazon Resource Name (ARN) for the source DB cluster snapshot, otherwise, - // a null value. - SourceDBClusterSnapshotArn *string `type:"string"` - - // Specifies the status of this DB cluster snapshot. - Status *string `type:"string"` - - // Specifies whether the DB cluster snapshot is encrypted. - StorageEncrypted *bool `type:"boolean"` - - // Provides the VPC ID associated with the DB cluster snapshot. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterSnapshot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterSnapshot) GoString() string { - return s.String() -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *DBClusterSnapshot) SetAllocatedStorage(v int64) *DBClusterSnapshot { - s.AllocatedStorage = &v - return s -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DBClusterSnapshot) SetAvailabilityZones(v []*string) *DBClusterSnapshot { - s.AvailabilityZones = v - return s -} - -// SetClusterCreateTime sets the ClusterCreateTime field's value. -func (s *DBClusterSnapshot) SetClusterCreateTime(v time.Time) *DBClusterSnapshot { - s.ClusterCreateTime = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DBClusterSnapshot) SetDBClusterIdentifier(v string) *DBClusterSnapshot { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterSnapshotArn sets the DBClusterSnapshotArn field's value. -func (s *DBClusterSnapshot) SetDBClusterSnapshotArn(v string) *DBClusterSnapshot { - s.DBClusterSnapshotArn = &v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DBClusterSnapshot) SetDBClusterSnapshotIdentifier(v string) *DBClusterSnapshot { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DBClusterSnapshot) SetEngine(v string) *DBClusterSnapshot { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DBClusterSnapshot) SetEngineVersion(v string) *DBClusterSnapshot { - s.EngineVersion = &v - return s -} - -// SetIAMDatabaseAuthenticationEnabled sets the IAMDatabaseAuthenticationEnabled field's value. -func (s *DBClusterSnapshot) SetIAMDatabaseAuthenticationEnabled(v bool) *DBClusterSnapshot { - s.IAMDatabaseAuthenticationEnabled = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DBClusterSnapshot) SetKmsKeyId(v string) *DBClusterSnapshot { - s.KmsKeyId = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *DBClusterSnapshot) SetLicenseModel(v string) *DBClusterSnapshot { - s.LicenseModel = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *DBClusterSnapshot) SetMasterUsername(v string) *DBClusterSnapshot { - s.MasterUsername = &v - return s -} - -// SetPercentProgress sets the PercentProgress field's value. -func (s *DBClusterSnapshot) SetPercentProgress(v int64) *DBClusterSnapshot { - s.PercentProgress = &v - return s -} - -// SetPort sets the Port field's value. -func (s *DBClusterSnapshot) SetPort(v int64) *DBClusterSnapshot { - s.Port = &v - return s -} - -// SetSnapshotCreateTime sets the SnapshotCreateTime field's value. -func (s *DBClusterSnapshot) SetSnapshotCreateTime(v time.Time) *DBClusterSnapshot { - s.SnapshotCreateTime = &v - return s -} - -// SetSnapshotType sets the SnapshotType field's value. -func (s *DBClusterSnapshot) SetSnapshotType(v string) *DBClusterSnapshot { - s.SnapshotType = &v - return s -} - -// SetSourceDBClusterSnapshotArn sets the SourceDBClusterSnapshotArn field's value. -func (s *DBClusterSnapshot) SetSourceDBClusterSnapshotArn(v string) *DBClusterSnapshot { - s.SourceDBClusterSnapshotArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBClusterSnapshot) SetStatus(v string) *DBClusterSnapshot { - s.Status = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *DBClusterSnapshot) SetStorageEncrypted(v bool) *DBClusterSnapshot { - s.StorageEncrypted = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DBClusterSnapshot) SetVpcId(v string) *DBClusterSnapshot { - s.VpcId = &v - return s -} - -// Contains the name and values of a manual DB cluster snapshot attribute. -// -// Manual DB cluster snapshot attributes are used to authorize other AWS accounts -// to restore a manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute -// API action. -type DBClusterSnapshotAttribute struct { - _ struct{} `type:"structure"` - - // The name of the manual DB cluster snapshot attribute. - // - // The attribute named restore refers to the list of AWS accounts that have - // permission to copy or restore the manual DB cluster snapshot. For more information, - // see the ModifyDBClusterSnapshotAttribute API action. - AttributeName *string `type:"string"` - - // The value(s) for the manual DB cluster snapshot attribute. - // - // If the AttributeName field is set to restore, then this element returns a - // list of IDs of the AWS accounts that are authorized to copy or restore the - // manual DB cluster snapshot. If a value of all is in the list, then the manual - // DB cluster snapshot is public and available for any AWS account to copy or - // restore. - AttributeValues []*string `locationNameList:"AttributeValue" type:"list"` -} - -// String returns the string representation -func (s DBClusterSnapshotAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterSnapshotAttribute) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *DBClusterSnapshotAttribute) SetAttributeName(v string) *DBClusterSnapshotAttribute { - s.AttributeName = &v - return s -} - -// SetAttributeValues sets the AttributeValues field's value. -func (s *DBClusterSnapshotAttribute) SetAttributeValues(v []*string) *DBClusterSnapshotAttribute { - s.AttributeValues = v - return s -} - -// Contains the results of a successful call to the DescribeDBClusterSnapshotAttributes -// API action. -// -// Manual DB cluster snapshot attributes are used to authorize other AWS accounts -// to copy or restore a manual DB cluster snapshot. For more information, see -// the ModifyDBClusterSnapshotAttribute API action. -type DBClusterSnapshotAttributesResult struct { - _ struct{} `type:"structure"` - - // The list of attributes and values for the manual DB cluster snapshot. - DBClusterSnapshotAttributes []*DBClusterSnapshotAttribute `locationNameList:"DBClusterSnapshotAttribute" type:"list"` - - // The identifier of the manual DB cluster snapshot that the attributes apply - // to. - DBClusterSnapshotIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterSnapshotAttributesResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterSnapshotAttributesResult) GoString() string { - return s.String() -} - -// SetDBClusterSnapshotAttributes sets the DBClusterSnapshotAttributes field's value. -func (s *DBClusterSnapshotAttributesResult) SetDBClusterSnapshotAttributes(v []*DBClusterSnapshotAttribute) *DBClusterSnapshotAttributesResult { - s.DBClusterSnapshotAttributes = v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DBClusterSnapshotAttributesResult) SetDBClusterSnapshotIdentifier(v string) *DBClusterSnapshotAttributesResult { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// This data type is used as a response element in the action DescribeDBEngineVersions. -type DBEngineVersion struct { - _ struct{} `type:"structure"` - - // The description of the database engine. - DBEngineDescription *string `type:"string"` - - // The description of the database engine version. - DBEngineVersionDescription *string `type:"string"` - - // The name of the DB parameter group family for the database engine. - DBParameterGroupFamily *string `type:"string"` - - // The default character set for new instances of this engine version, if the - // CharacterSetName parameter of the CreateDBInstance API is not specified. - DefaultCharacterSet *CharacterSet `type:"structure"` - - // The name of the database engine. - Engine *string `type:"string"` - - // The version number of the database engine. - EngineVersion *string `type:"string"` - - // The types of logs that the database engine has available for export to CloudWatch - // Logs. - ExportableLogTypes []*string `type:"list"` - - // A list of the character sets supported by this engine for the CharacterSetName - // parameter of the CreateDBInstance action. - SupportedCharacterSets []*CharacterSet `locationNameList:"CharacterSet" type:"list"` - - // A list of the time zones supported by this engine for the Timezone parameter - // of the CreateDBInstance action. - SupportedTimezones []*Timezone `locationNameList:"Timezone" type:"list"` - - // A value that indicates whether the engine version supports exporting the - // log types specified by ExportableLogTypes to CloudWatch Logs. - SupportsLogExportsToCloudwatchLogs *bool `type:"boolean"` - - // Indicates whether the database engine version supports read replicas. - SupportsReadReplica *bool `type:"boolean"` - - // A list of engine versions that this database engine version can be upgraded - // to. - ValidUpgradeTarget []*UpgradeTarget `locationNameList:"UpgradeTarget" type:"list"` -} - -// String returns the string representation -func (s DBEngineVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBEngineVersion) GoString() string { - return s.String() -} - -// SetDBEngineDescription sets the DBEngineDescription field's value. -func (s *DBEngineVersion) SetDBEngineDescription(v string) *DBEngineVersion { - s.DBEngineDescription = &v - return s -} - -// SetDBEngineVersionDescription sets the DBEngineVersionDescription field's value. -func (s *DBEngineVersion) SetDBEngineVersionDescription(v string) *DBEngineVersion { - s.DBEngineVersionDescription = &v - return s -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DBEngineVersion) SetDBParameterGroupFamily(v string) *DBEngineVersion { - s.DBParameterGroupFamily = &v - return s -} - -// SetDefaultCharacterSet sets the DefaultCharacterSet field's value. -func (s *DBEngineVersion) SetDefaultCharacterSet(v *CharacterSet) *DBEngineVersion { - s.DefaultCharacterSet = v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DBEngineVersion) SetEngine(v string) *DBEngineVersion { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DBEngineVersion) SetEngineVersion(v string) *DBEngineVersion { - s.EngineVersion = &v - return s -} - -// SetExportableLogTypes sets the ExportableLogTypes field's value. -func (s *DBEngineVersion) SetExportableLogTypes(v []*string) *DBEngineVersion { - s.ExportableLogTypes = v - return s -} - -// SetSupportedCharacterSets sets the SupportedCharacterSets field's value. -func (s *DBEngineVersion) SetSupportedCharacterSets(v []*CharacterSet) *DBEngineVersion { - s.SupportedCharacterSets = v - return s -} - -// SetSupportedTimezones sets the SupportedTimezones field's value. -func (s *DBEngineVersion) SetSupportedTimezones(v []*Timezone) *DBEngineVersion { - s.SupportedTimezones = v - return s -} - -// SetSupportsLogExportsToCloudwatchLogs sets the SupportsLogExportsToCloudwatchLogs field's value. -func (s *DBEngineVersion) SetSupportsLogExportsToCloudwatchLogs(v bool) *DBEngineVersion { - s.SupportsLogExportsToCloudwatchLogs = &v - return s -} - -// SetSupportsReadReplica sets the SupportsReadReplica field's value. -func (s *DBEngineVersion) SetSupportsReadReplica(v bool) *DBEngineVersion { - s.SupportsReadReplica = &v - return s -} - -// SetValidUpgradeTarget sets the ValidUpgradeTarget field's value. -func (s *DBEngineVersion) SetValidUpgradeTarget(v []*UpgradeTarget) *DBEngineVersion { - s.ValidUpgradeTarget = v - return s -} - -// Contains the details of an Amazon Neptune DB instance. -// -// This data type is used as a response element in the DescribeDBInstances action. -type DBInstance struct { - _ struct{} `type:"structure"` - - // Specifies the allocated storage size specified in gibibytes. - AllocatedStorage *int64 `type:"integer"` - - // Indicates that minor version patches are applied automatically. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // Specifies the name of the Availability Zone the DB instance is located in. - AvailabilityZone *string `type:"string"` - - // Specifies the number of days for which automatic DB snapshots are retained. - BackupRetentionPeriod *int64 `type:"integer"` - - // The identifier of the CA certificate for this DB instance. - CACertificateIdentifier *string `type:"string"` - - // If present, specifies the name of the character set that this instance is - // associated with. - CharacterSetName *string `type:"string"` - - // Specifies whether tags are copied from the DB instance to snapshots of the - // DB instance. - CopyTagsToSnapshot *bool `type:"boolean"` - - // If the DB instance is a member of a DB cluster, contains the name of the - // DB cluster that the DB instance is a member of. - DBClusterIdentifier *string `type:"string"` - - // The Amazon Resource Name (ARN) for the DB instance. - DBInstanceArn *string `type:"string"` - - // Contains the name of the compute and memory capacity class of the DB instance. - DBInstanceClass *string `type:"string"` - - // Contains a user-supplied database identifier. This identifier is the unique - // key that identifies a DB instance. - DBInstanceIdentifier *string `type:"string"` - - // Specifies the current state of this database. - DBInstanceStatus *string `type:"string"` - - // The database name. - DBName *string `type:"string"` - - // Provides the list of DB parameter groups applied to this DB instance. - DBParameterGroups []*DBParameterGroupStatus `locationNameList:"DBParameterGroup" type:"list"` - - // Provides List of DB security group elements containing only DBSecurityGroup.Name - // and DBSecurityGroup.Status subelements. - DBSecurityGroups []*DBSecurityGroupMembership `locationNameList:"DBSecurityGroup" type:"list"` - - // Specifies information on the subnet group associated with the DB instance, - // including the name, description, and subnets in the subnet group. - DBSubnetGroup *DBSubnetGroup `type:"structure"` - - // Specifies the port that the DB instance listens on. If the DB instance is - // part of a DB cluster, this can be a different port than the DB cluster port. - DbInstancePort *int64 `type:"integer"` - - // The AWS Region-unique, immutable identifier for the DB instance. This identifier - // is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB - // instance is accessed. - DbiResourceId *string `type:"string"` - - // Not supported - DomainMemberships []*DomainMembership `locationNameList:"DomainMembership" type:"list"` - - // A list of log types that this DB instance is configured to export to CloudWatch - // Logs. - EnabledCloudwatchLogsExports []*string `type:"list"` - - // Specifies the connection endpoint. - Endpoint *Endpoint `type:"structure"` - - // Provides the name of the database engine to be used for this DB instance. - Engine *string `type:"string"` - - // Indicates the database engine version. - EngineVersion *string `type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log stream that - // receives the Enhanced Monitoring metrics data for the DB instance. - EnhancedMonitoringResourceArn *string `type:"string"` - - // True if AWS Identity and Access Management (IAM) authentication is enabled, - // and otherwise false. - IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` - - // Provides the date and time the DB instance was created. - InstanceCreateTime *time.Time `type:"timestamp"` - - // Specifies the Provisioned IOPS (I/O operations per second) value. - Iops *int64 `type:"integer"` - - // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted - // DB instance. - KmsKeyId *string `type:"string"` - - // Specifies the latest time to which a database can be restored with point-in-time - // restore. - LatestRestorableTime *time.Time `type:"timestamp"` - - // License model information for this DB instance. - LicenseModel *string `type:"string"` - - // Contains the master username for the DB instance. - MasterUsername *string `type:"string"` - - // The interval, in seconds, between points when Enhanced Monitoring metrics - // are collected for the DB instance. - MonitoringInterval *int64 `type:"integer"` - - // The ARN for the IAM role that permits Neptune to send Enhanced Monitoring - // metrics to Amazon CloudWatch Logs. - MonitoringRoleArn *string `type:"string"` - - // Specifies if the DB instance is a Multi-AZ deployment. - MultiAZ *bool `type:"boolean"` - - // Provides the list of option group memberships for this DB instance. - OptionGroupMemberships []*OptionGroupMembership `locationNameList:"OptionGroupMembership" type:"list"` - - // Specifies that changes to the DB instance are pending. This element is only - // included when changes are pending. Specific changes are identified by subelements. - PendingModifiedValues *PendingModifiedValues `type:"structure"` - - // True if Performance Insights is enabled for the DB instance, and otherwise - // false. - PerformanceInsightsEnabled *bool `type:"boolean"` - - // The AWS KMS key identifier for encryption of Performance Insights data. The - // KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the - // KMS key alias for the KMS encryption key. - PerformanceInsightsKMSKeyId *string `type:"string"` - - // Specifies the daily time range during which automated backups are created - // if automated backups are enabled, as determined by the BackupRetentionPeriod. - PreferredBackupWindow *string `type:"string"` - - // Specifies the weekly time range during which system maintenance can occur, - // in Universal Coordinated Time (UTC). - PreferredMaintenanceWindow *string `type:"string"` - - // A value that specifies the order in which a Read Replica is promoted to the - // primary instance after a failure of the existing primary instance. - PromotionTier *int64 `type:"integer"` - - // This parameter is not supported. - // - // Deprecated: PubliclyAccessible has been deprecated - PubliclyAccessible *bool `deprecated:"true" type:"boolean"` - - // Contains one or more identifiers of DB clusters that are Read Replicas of - // this DB instance. - ReadReplicaDBClusterIdentifiers []*string `locationNameList:"ReadReplicaDBClusterIdentifier" type:"list"` - - // Contains one or more identifiers of the Read Replicas associated with this - // DB instance. - ReadReplicaDBInstanceIdentifiers []*string `locationNameList:"ReadReplicaDBInstanceIdentifier" type:"list"` - - // Contains the identifier of the source DB instance if this DB instance is - // a Read Replica. - ReadReplicaSourceDBInstanceIdentifier *string `type:"string"` - - // If present, specifies the name of the secondary Availability Zone for a DB - // instance with multi-AZ support. - SecondaryAvailabilityZone *string `type:"string"` - - // The status of a Read Replica. If the instance is not a Read Replica, this - // is blank. - StatusInfos []*DBInstanceStatusInfo `locationNameList:"DBInstanceStatusInfo" type:"list"` - - // Specifies whether the DB instance is encrypted. - StorageEncrypted *bool `type:"boolean"` - - // Specifies the storage type associated with DB instance. - StorageType *string `type:"string"` - - // The ARN from the key store with which the instance is associated for TDE - // encryption. - TdeCredentialArn *string `type:"string"` - - // Not supported. - Timezone *string `type:"string"` - - // Provides a list of VPC security group elements that the DB instance belongs - // to. - VpcSecurityGroups []*VpcSecurityGroupMembership `locationNameList:"VpcSecurityGroupMembership" type:"list"` -} - -// String returns the string representation -func (s DBInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBInstance) GoString() string { - return s.String() -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *DBInstance) SetAllocatedStorage(v int64) *DBInstance { - s.AllocatedStorage = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *DBInstance) SetAutoMinorVersionUpgrade(v bool) *DBInstance { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *DBInstance) SetAvailabilityZone(v string) *DBInstance { - s.AvailabilityZone = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *DBInstance) SetBackupRetentionPeriod(v int64) *DBInstance { - s.BackupRetentionPeriod = &v - return s -} - -// SetCACertificateIdentifier sets the CACertificateIdentifier field's value. -func (s *DBInstance) SetCACertificateIdentifier(v string) *DBInstance { - s.CACertificateIdentifier = &v - return s -} - -// SetCharacterSetName sets the CharacterSetName field's value. -func (s *DBInstance) SetCharacterSetName(v string) *DBInstance { - s.CharacterSetName = &v - return s -} - -// SetCopyTagsToSnapshot sets the CopyTagsToSnapshot field's value. -func (s *DBInstance) SetCopyTagsToSnapshot(v bool) *DBInstance { - s.CopyTagsToSnapshot = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DBInstance) SetDBClusterIdentifier(v string) *DBInstance { - s.DBClusterIdentifier = &v - return s -} - -// SetDBInstanceArn sets the DBInstanceArn field's value. -func (s *DBInstance) SetDBInstanceArn(v string) *DBInstance { - s.DBInstanceArn = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *DBInstance) SetDBInstanceClass(v string) *DBInstance { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DBInstance) SetDBInstanceIdentifier(v string) *DBInstance { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBInstanceStatus sets the DBInstanceStatus field's value. -func (s *DBInstance) SetDBInstanceStatus(v string) *DBInstance { - s.DBInstanceStatus = &v - return s -} - -// SetDBName sets the DBName field's value. -func (s *DBInstance) SetDBName(v string) *DBInstance { - s.DBName = &v - return s -} - -// SetDBParameterGroups sets the DBParameterGroups field's value. -func (s *DBInstance) SetDBParameterGroups(v []*DBParameterGroupStatus) *DBInstance { - s.DBParameterGroups = v - return s -} - -// SetDBSecurityGroups sets the DBSecurityGroups field's value. -func (s *DBInstance) SetDBSecurityGroups(v []*DBSecurityGroupMembership) *DBInstance { - s.DBSecurityGroups = v - return s -} - -// SetDBSubnetGroup sets the DBSubnetGroup field's value. -func (s *DBInstance) SetDBSubnetGroup(v *DBSubnetGroup) *DBInstance { - s.DBSubnetGroup = v - return s -} - -// SetDbInstancePort sets the DbInstancePort field's value. -func (s *DBInstance) SetDbInstancePort(v int64) *DBInstance { - s.DbInstancePort = &v - return s -} - -// SetDbiResourceId sets the DbiResourceId field's value. -func (s *DBInstance) SetDbiResourceId(v string) *DBInstance { - s.DbiResourceId = &v - return s -} - -// SetDomainMemberships sets the DomainMemberships field's value. -func (s *DBInstance) SetDomainMemberships(v []*DomainMembership) *DBInstance { - s.DomainMemberships = v - return s -} - -// SetEnabledCloudwatchLogsExports sets the EnabledCloudwatchLogsExports field's value. -func (s *DBInstance) SetEnabledCloudwatchLogsExports(v []*string) *DBInstance { - s.EnabledCloudwatchLogsExports = v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *DBInstance) SetEndpoint(v *Endpoint) *DBInstance { - s.Endpoint = v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DBInstance) SetEngine(v string) *DBInstance { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DBInstance) SetEngineVersion(v string) *DBInstance { - s.EngineVersion = &v - return s -} - -// SetEnhancedMonitoringResourceArn sets the EnhancedMonitoringResourceArn field's value. -func (s *DBInstance) SetEnhancedMonitoringResourceArn(v string) *DBInstance { - s.EnhancedMonitoringResourceArn = &v - return s -} - -// SetIAMDatabaseAuthenticationEnabled sets the IAMDatabaseAuthenticationEnabled field's value. -func (s *DBInstance) SetIAMDatabaseAuthenticationEnabled(v bool) *DBInstance { - s.IAMDatabaseAuthenticationEnabled = &v - return s -} - -// SetInstanceCreateTime sets the InstanceCreateTime field's value. -func (s *DBInstance) SetInstanceCreateTime(v time.Time) *DBInstance { - s.InstanceCreateTime = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *DBInstance) SetIops(v int64) *DBInstance { - s.Iops = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DBInstance) SetKmsKeyId(v string) *DBInstance { - s.KmsKeyId = &v - return s -} - -// SetLatestRestorableTime sets the LatestRestorableTime field's value. -func (s *DBInstance) SetLatestRestorableTime(v time.Time) *DBInstance { - s.LatestRestorableTime = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *DBInstance) SetLicenseModel(v string) *DBInstance { - s.LicenseModel = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *DBInstance) SetMasterUsername(v string) *DBInstance { - s.MasterUsername = &v - return s -} - -// SetMonitoringInterval sets the MonitoringInterval field's value. -func (s *DBInstance) SetMonitoringInterval(v int64) *DBInstance { - s.MonitoringInterval = &v - return s -} - -// SetMonitoringRoleArn sets the MonitoringRoleArn field's value. -func (s *DBInstance) SetMonitoringRoleArn(v string) *DBInstance { - s.MonitoringRoleArn = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *DBInstance) SetMultiAZ(v bool) *DBInstance { - s.MultiAZ = &v - return s -} - -// SetOptionGroupMemberships sets the OptionGroupMemberships field's value. -func (s *DBInstance) SetOptionGroupMemberships(v []*OptionGroupMembership) *DBInstance { - s.OptionGroupMemberships = v - return s -} - -// SetPendingModifiedValues sets the PendingModifiedValues field's value. -func (s *DBInstance) SetPendingModifiedValues(v *PendingModifiedValues) *DBInstance { - s.PendingModifiedValues = v - return s -} - -// SetPerformanceInsightsEnabled sets the PerformanceInsightsEnabled field's value. -func (s *DBInstance) SetPerformanceInsightsEnabled(v bool) *DBInstance { - s.PerformanceInsightsEnabled = &v - return s -} - -// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. -func (s *DBInstance) SetPerformanceInsightsKMSKeyId(v string) *DBInstance { - s.PerformanceInsightsKMSKeyId = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *DBInstance) SetPreferredBackupWindow(v string) *DBInstance { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *DBInstance) SetPreferredMaintenanceWindow(v string) *DBInstance { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPromotionTier sets the PromotionTier field's value. -func (s *DBInstance) SetPromotionTier(v int64) *DBInstance { - s.PromotionTier = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *DBInstance) SetPubliclyAccessible(v bool) *DBInstance { - s.PubliclyAccessible = &v - return s -} - -// SetReadReplicaDBClusterIdentifiers sets the ReadReplicaDBClusterIdentifiers field's value. -func (s *DBInstance) SetReadReplicaDBClusterIdentifiers(v []*string) *DBInstance { - s.ReadReplicaDBClusterIdentifiers = v - return s -} - -// SetReadReplicaDBInstanceIdentifiers sets the ReadReplicaDBInstanceIdentifiers field's value. -func (s *DBInstance) SetReadReplicaDBInstanceIdentifiers(v []*string) *DBInstance { - s.ReadReplicaDBInstanceIdentifiers = v - return s -} - -// SetReadReplicaSourceDBInstanceIdentifier sets the ReadReplicaSourceDBInstanceIdentifier field's value. -func (s *DBInstance) SetReadReplicaSourceDBInstanceIdentifier(v string) *DBInstance { - s.ReadReplicaSourceDBInstanceIdentifier = &v - return s -} - -// SetSecondaryAvailabilityZone sets the SecondaryAvailabilityZone field's value. -func (s *DBInstance) SetSecondaryAvailabilityZone(v string) *DBInstance { - s.SecondaryAvailabilityZone = &v - return s -} - -// SetStatusInfos sets the StatusInfos field's value. -func (s *DBInstance) SetStatusInfos(v []*DBInstanceStatusInfo) *DBInstance { - s.StatusInfos = v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *DBInstance) SetStorageEncrypted(v bool) *DBInstance { - s.StorageEncrypted = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *DBInstance) SetStorageType(v string) *DBInstance { - s.StorageType = &v - return s -} - -// SetTdeCredentialArn sets the TdeCredentialArn field's value. -func (s *DBInstance) SetTdeCredentialArn(v string) *DBInstance { - s.TdeCredentialArn = &v - return s -} - -// SetTimezone sets the Timezone field's value. -func (s *DBInstance) SetTimezone(v string) *DBInstance { - s.Timezone = &v - return s -} - -// SetVpcSecurityGroups sets the VpcSecurityGroups field's value. -func (s *DBInstance) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *DBInstance { - s.VpcSecurityGroups = v - return s -} - -// Provides a list of status information for a DB instance. -type DBInstanceStatusInfo struct { - _ struct{} `type:"structure"` - - // Details of the error if there is an error for the instance. If the instance - // is not in an error state, this value is blank. - Message *string `type:"string"` - - // Boolean value that is true if the instance is operating normally, or false - // if the instance is in an error state. - Normal *bool `type:"boolean"` - - // Status of the DB instance. For a StatusType of read replica, the values can - // be replicating, error, stopped, or terminated. - Status *string `type:"string"` - - // This value is currently "read replication." - StatusType *string `type:"string"` -} - -// String returns the string representation -func (s DBInstanceStatusInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBInstanceStatusInfo) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *DBInstanceStatusInfo) SetMessage(v string) *DBInstanceStatusInfo { - s.Message = &v - return s -} - -// SetNormal sets the Normal field's value. -func (s *DBInstanceStatusInfo) SetNormal(v bool) *DBInstanceStatusInfo { - s.Normal = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBInstanceStatusInfo) SetStatus(v string) *DBInstanceStatusInfo { - s.Status = &v - return s -} - -// SetStatusType sets the StatusType field's value. -func (s *DBInstanceStatusInfo) SetStatusType(v string) *DBInstanceStatusInfo { - s.StatusType = &v - return s -} - -// Contains the details of an Amazon Neptune DB parameter group. -// -// This data type is used as a response element in the DescribeDBParameterGroups -// action. -type DBParameterGroup struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the DB parameter group. - DBParameterGroupArn *string `type:"string"` - - // Provides the name of the DB parameter group family that this DB parameter - // group is compatible with. - DBParameterGroupFamily *string `type:"string"` - - // Provides the name of the DB parameter group. - DBParameterGroupName *string `type:"string"` - - // Provides the customer-specified description for this DB parameter group. - Description *string `type:"string"` -} - -// String returns the string representation -func (s DBParameterGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBParameterGroup) GoString() string { - return s.String() -} - -// SetDBParameterGroupArn sets the DBParameterGroupArn field's value. -func (s *DBParameterGroup) SetDBParameterGroupArn(v string) *DBParameterGroup { - s.DBParameterGroupArn = &v - return s -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DBParameterGroup) SetDBParameterGroupFamily(v string) *DBParameterGroup { - s.DBParameterGroupFamily = &v - return s -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *DBParameterGroup) SetDBParameterGroupName(v string) *DBParameterGroup { - s.DBParameterGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DBParameterGroup) SetDescription(v string) *DBParameterGroup { - s.Description = &v - return s -} - -// The status of the DB parameter group. -// -// This data type is used as a response element in the following actions: -// -// * CreateDBInstance -// -// * DeleteDBInstance -// -// * ModifyDBInstance -// -// * RebootDBInstance -type DBParameterGroupStatus struct { - _ struct{} `type:"structure"` - - // The name of the DP parameter group. - DBParameterGroupName *string `type:"string"` - - // The status of parameter updates. - ParameterApplyStatus *string `type:"string"` -} - -// String returns the string representation -func (s DBParameterGroupStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBParameterGroupStatus) GoString() string { - return s.String() -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *DBParameterGroupStatus) SetDBParameterGroupName(v string) *DBParameterGroupStatus { - s.DBParameterGroupName = &v - return s -} - -// SetParameterApplyStatus sets the ParameterApplyStatus field's value. -func (s *DBParameterGroupStatus) SetParameterApplyStatus(v string) *DBParameterGroupStatus { - s.ParameterApplyStatus = &v - return s -} - -// This data type is used as a response element in the following actions: -// -// * ModifyDBInstance -// -// * RebootDBInstance -type DBSecurityGroupMembership struct { - _ struct{} `type:"structure"` - - // The name of the DB security group. - DBSecurityGroupName *string `type:"string"` - - // The status of the DB security group. - Status *string `type:"string"` -} - -// String returns the string representation -func (s DBSecurityGroupMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBSecurityGroupMembership) GoString() string { - return s.String() -} - -// SetDBSecurityGroupName sets the DBSecurityGroupName field's value. -func (s *DBSecurityGroupMembership) SetDBSecurityGroupName(v string) *DBSecurityGroupMembership { - s.DBSecurityGroupName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBSecurityGroupMembership) SetStatus(v string) *DBSecurityGroupMembership { - s.Status = &v - return s -} - -// Contains the details of an Amazon Neptune DB subnet group. -// -// This data type is used as a response element in the DescribeDBSubnetGroups -// action. -type DBSubnetGroup struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the DB subnet group. - DBSubnetGroupArn *string `type:"string"` - - // Provides the description of the DB subnet group. - DBSubnetGroupDescription *string `type:"string"` - - // The name of the DB subnet group. - DBSubnetGroupName *string `type:"string"` - - // Provides the status of the DB subnet group. - SubnetGroupStatus *string `type:"string"` - - // Contains a list of Subnet elements. - Subnets []*Subnet `locationNameList:"Subnet" type:"list"` - - // Provides the VpcId of the DB subnet group. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s DBSubnetGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBSubnetGroup) GoString() string { - return s.String() -} - -// SetDBSubnetGroupArn sets the DBSubnetGroupArn field's value. -func (s *DBSubnetGroup) SetDBSubnetGroupArn(v string) *DBSubnetGroup { - s.DBSubnetGroupArn = &v - return s -} - -// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. -func (s *DBSubnetGroup) SetDBSubnetGroupDescription(v string) *DBSubnetGroup { - s.DBSubnetGroupDescription = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *DBSubnetGroup) SetDBSubnetGroupName(v string) *DBSubnetGroup { - s.DBSubnetGroupName = &v - return s -} - -// SetSubnetGroupStatus sets the SubnetGroupStatus field's value. -func (s *DBSubnetGroup) SetSubnetGroupStatus(v string) *DBSubnetGroup { - s.SubnetGroupStatus = &v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *DBSubnetGroup) SetSubnets(v []*Subnet) *DBSubnetGroup { - s.Subnets = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DBSubnetGroup) SetVpcId(v string) *DBSubnetGroup { - s.VpcId = &v - return s -} - -type DeleteDBClusterInput struct { - _ struct{} `type:"structure"` - - // The DB cluster identifier for the DB cluster to be deleted. This parameter - // isn't case-sensitive. - // - // Constraints: - // - // * Must match an existing DBClusterIdentifier. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The DB cluster snapshot identifier of the new DB cluster snapshot created - // when SkipFinalSnapshot is set to false. - // - // Specifying this parameter and also setting the SkipFinalShapshot parameter - // to true results in an error. - // - // Constraints: - // - // * Must be 1 to 255 letters, numbers, or hyphens. - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - FinalDBSnapshotIdentifier *string `type:"string"` - - // Determines whether a final DB cluster snapshot is created before the DB cluster - // is deleted. If true is specified, no DB cluster snapshot is created. If false - // is specified, a DB cluster snapshot is created before the DB cluster is deleted. - // - // You must specify a FinalDBSnapshotIdentifier parameter if SkipFinalSnapshot - // is false. - // - // Default: false - SkipFinalSnapshot *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeleteDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DeleteDBClusterInput) SetDBClusterIdentifier(v string) *DeleteDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetFinalDBSnapshotIdentifier sets the FinalDBSnapshotIdentifier field's value. -func (s *DeleteDBClusterInput) SetFinalDBSnapshotIdentifier(v string) *DeleteDBClusterInput { - s.FinalDBSnapshotIdentifier = &v - return s -} - -// SetSkipFinalSnapshot sets the SkipFinalSnapshot field's value. -func (s *DeleteDBClusterInput) SetSkipFinalSnapshot(v bool) *DeleteDBClusterInput { - s.SkipFinalSnapshot = &v - return s -} - -type DeleteDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters action. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *DeleteDBClusterOutput) SetDBCluster(v *DBCluster) *DeleteDBClusterOutput { - s.DBCluster = v - return s -} - -type DeleteDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group. - // - // Constraints: - // - // * Must be the name of an existing DB cluster parameter group. - // - // * You can't delete a default DB cluster parameter group. - // - // * Cannot be associated with any DB clusters. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterParameterGroupInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *DeleteDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *DeleteDBClusterParameterGroupInput { - s.DBClusterParameterGroupName = &v - return s -} - -type DeleteDBClusterParameterGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBClusterParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterParameterGroupOutput) GoString() string { - return s.String() -} - -type DeleteDBClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // The identifier of the DB cluster snapshot to delete. - // - // Constraints: Must be the name of an existing DB cluster snapshot in the available - // state. - // - // DBClusterSnapshotIdentifier is a required field - DBClusterSnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterSnapshotInput"} - if s.DBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DeleteDBClusterSnapshotInput) SetDBClusterSnapshotIdentifier(v string) *DeleteDBClusterSnapshotInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -type DeleteDBClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Contains the details for an Amazon Neptune DB cluster snapshot - // - // This data type is used as a response element in the DescribeDBClusterSnapshots - // action. - DBClusterSnapshot *DBClusterSnapshot `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. -func (s *DeleteDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *DeleteDBClusterSnapshotOutput { - s.DBClusterSnapshot = v - return s -} - -type DeleteDBInstanceInput struct { - _ struct{} `type:"structure"` - - // The DB instance identifier for the DB instance to be deleted. This parameter - // isn't case-sensitive. - // - // Constraints: - // - // * Must match the name of an existing DB instance. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The DBSnapshotIdentifier of the new DBSnapshot created when SkipFinalSnapshot - // is set to false. - // - // Specifying this parameter and also setting the SkipFinalShapshot parameter - // to true results in an error. - // - // Constraints: - // - // * Must be 1 to 255 letters or numbers. - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - // - // * Cannot be specified when deleting a Read Replica. - FinalDBSnapshotIdentifier *string `type:"string"` - - // Determines whether a final DB snapshot is created before the DB instance - // is deleted. If true is specified, no DBSnapshot is created. If false is specified, - // a DB snapshot is created before the DB instance is deleted. - // - // Note that when a DB instance is in a failure state and has a status of 'failed', - // 'incompatible-restore', or 'incompatible-network', it can only be deleted - // when the SkipFinalSnapshot parameter is set to "true". - // - // Specify true when deleting a Read Replica. - // - // The FinalDBSnapshotIdentifier parameter must be specified if SkipFinalSnapshot - // is false. - // - // Default: false - SkipFinalSnapshot *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeleteDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBInstanceInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DeleteDBInstanceInput) SetDBInstanceIdentifier(v string) *DeleteDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetFinalDBSnapshotIdentifier sets the FinalDBSnapshotIdentifier field's value. -func (s *DeleteDBInstanceInput) SetFinalDBSnapshotIdentifier(v string) *DeleteDBInstanceInput { - s.FinalDBSnapshotIdentifier = &v - return s -} - -// SetSkipFinalSnapshot sets the SkipFinalSnapshot field's value. -func (s *DeleteDBInstanceInput) SetSkipFinalSnapshot(v bool) *DeleteDBInstanceInput { - s.SkipFinalSnapshot = &v - return s -} - -type DeleteDBInstanceOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBInstanceOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *DeleteDBInstanceOutput) SetDBInstance(v *DBInstance) *DeleteDBInstanceOutput { - s.DBInstance = v - return s -} - -type DeleteDBParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB parameter group. - // - // Constraints: - // - // * Must be the name of an existing DB parameter group - // - // * You can't delete a default DB parameter group - // - // * Cannot be associated with any DB instances - // - // DBParameterGroupName is a required field - DBParameterGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBParameterGroupInput"} - if s.DBParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *DeleteDBParameterGroupInput) SetDBParameterGroupName(v string) *DeleteDBParameterGroupInput { - s.DBParameterGroupName = &v - return s -} - -type DeleteDBParameterGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBParameterGroupOutput) GoString() string { - return s.String() -} - -type DeleteDBSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the database subnet group to delete. - // - // You can't delete the default subnet group. - // - // Constraints: - // - // Constraints: Must match the name of an existing DBSubnetGroup. Must not be - // default. - // - // Example: mySubnetgroup - // - // DBSubnetGroupName is a required field - DBSubnetGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBSubnetGroupInput"} - if s.DBSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *DeleteDBSubnetGroupInput) SetDBSubnetGroupName(v string) *DeleteDBSubnetGroupInput { - s.DBSubnetGroupName = &v - return s -} - -type DeleteDBSubnetGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBSubnetGroupOutput) GoString() string { - return s.String() -} - -type DeleteEventSubscriptionInput struct { - _ struct{} `type:"structure"` - - // The name of the event notification subscription you want to delete. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEventSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEventSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEventSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEventSubscriptionInput"} - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *DeleteEventSubscriptionInput) SetSubscriptionName(v string) *DeleteEventSubscriptionInput { - s.SubscriptionName = &v - return s -} - -type DeleteEventSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful invocation of the DescribeEventSubscriptions - // action. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s DeleteEventSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEventSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *DeleteEventSubscriptionOutput) SetEventSubscription(v *EventSubscription) *DeleteEventSubscriptionOutput { - s.EventSubscription = v - return s -} - -type DescribeDBClusterParameterGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of a specific DB cluster parameter group to return details for. - // - // Constraints: - // - // * If supplied, must match the name of an existing DBClusterParameterGroup. - DBClusterParameterGroupName *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBClusterParameterGroups - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBClusterParameterGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterParameterGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClusterParameterGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterParameterGroupsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *DescribeDBClusterParameterGroupsInput) SetDBClusterParameterGroupName(v string) *DescribeDBClusterParameterGroupsInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBClusterParameterGroupsInput) SetFilters(v []*Filter) *DescribeDBClusterParameterGroupsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterParameterGroupsInput) SetMarker(v string) *DescribeDBClusterParameterGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBClusterParameterGroupsInput) SetMaxRecords(v int64) *DescribeDBClusterParameterGroupsInput { - s.MaxRecords = &v - return s -} - -type DescribeDBClusterParameterGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of DB cluster parameter groups. - DBClusterParameterGroups []*DBClusterParameterGroup `locationNameList:"DBClusterParameterGroup" type:"list"` - - // An optional pagination token provided by a previous DescribeDBClusterParameterGroups - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClusterParameterGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterParameterGroupsOutput) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroups sets the DBClusterParameterGroups field's value. -func (s *DescribeDBClusterParameterGroupsOutput) SetDBClusterParameterGroups(v []*DBClusterParameterGroup) *DescribeDBClusterParameterGroupsOutput { - s.DBClusterParameterGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterParameterGroupsOutput) SetMarker(v string) *DescribeDBClusterParameterGroupsOutput { - s.Marker = &v - return s -} - -type DescribeDBClusterParametersInput struct { - _ struct{} `type:"structure"` - - // The name of a specific DB cluster parameter group to return parameter details - // for. - // - // Constraints: - // - // * If supplied, must match the name of an existing DBClusterParameterGroup. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBClusterParameters - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // A value that indicates to return only parameters for a specific source. Parameter - // sources can be engine, service, or customer. - Source *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClusterParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClusterParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterParametersInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *DescribeDBClusterParametersInput) SetDBClusterParameterGroupName(v string) *DescribeDBClusterParametersInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBClusterParametersInput) SetFilters(v []*Filter) *DescribeDBClusterParametersInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterParametersInput) SetMarker(v string) *DescribeDBClusterParametersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBClusterParametersInput) SetMaxRecords(v int64) *DescribeDBClusterParametersInput { - s.MaxRecords = &v - return s -} - -// SetSource sets the Source field's value. -func (s *DescribeDBClusterParametersInput) SetSource(v string) *DescribeDBClusterParametersInput { - s.Source = &v - return s -} - -// Provides details about a DB cluster parameter group including the parameters -// in the DB cluster parameter group. -type DescribeDBClusterParametersOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous DescribeDBClusterParameters - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords . - Marker *string `type:"string"` - - // Provides a list of parameters for the DB cluster parameter group. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` -} - -// String returns the string representation -func (s DescribeDBClusterParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterParametersOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterParametersOutput) SetMarker(v string) *DescribeDBClusterParametersOutput { - s.Marker = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DescribeDBClusterParametersOutput) SetParameters(v []*Parameter) *DescribeDBClusterParametersOutput { - s.Parameters = v - return s -} - -type DescribeDBClusterSnapshotAttributesInput struct { - _ struct{} `type:"structure"` - - // The identifier for the DB cluster snapshot to describe the attributes for. - // - // DBClusterSnapshotIdentifier is a required field - DBClusterSnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeDBClusterSnapshotAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterSnapshotAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClusterSnapshotAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterSnapshotAttributesInput"} - if s.DBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DescribeDBClusterSnapshotAttributesInput) SetDBClusterSnapshotIdentifier(v string) *DescribeDBClusterSnapshotAttributesInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -type DescribeDBClusterSnapshotAttributesOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful call to the DescribeDBClusterSnapshotAttributes - // API action. - // - // Manual DB cluster snapshot attributes are used to authorize other AWS accounts - // to copy or restore a manual DB cluster snapshot. For more information, see - // the ModifyDBClusterSnapshotAttribute API action. - DBClusterSnapshotAttributesResult *DBClusterSnapshotAttributesResult `type:"structure"` -} - -// String returns the string representation -func (s DescribeDBClusterSnapshotAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterSnapshotAttributesOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshotAttributesResult sets the DBClusterSnapshotAttributesResult field's value. -func (s *DescribeDBClusterSnapshotAttributesOutput) SetDBClusterSnapshotAttributesResult(v *DBClusterSnapshotAttributesResult) *DescribeDBClusterSnapshotAttributesOutput { - s.DBClusterSnapshotAttributesResult = v - return s -} - -type DescribeDBClusterSnapshotsInput struct { - _ struct{} `type:"structure"` - - // The ID of the DB cluster to retrieve the list of DB cluster snapshots for. - // This parameter can't be used in conjunction with the DBClusterSnapshotIdentifier - // parameter. This parameter is not case-sensitive. - // - // Constraints: - // - // * If supplied, must match the identifier of an existing DBCluster. - DBClusterIdentifier *string `type:"string"` - - // A specific DB cluster snapshot identifier to describe. This parameter can't - // be used in conjunction with the DBClusterIdentifier parameter. This value - // is stored as a lowercase string. - // - // Constraints: - // - // * If supplied, must match the identifier of an existing DBClusterSnapshot. - // - // * If this identifier is for an automated snapshot, the SnapshotType parameter - // must also be specified. - DBClusterSnapshotIdentifier *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // True to include manual DB cluster snapshots that are public and can be copied - // or restored by any AWS account, and otherwise false. The default is false. - // The default is false. - // - // You can share a manual DB cluster snapshot as public by using the ModifyDBClusterSnapshotAttribute - // API action. - IncludePublic *bool `type:"boolean"` - - // True to include shared manual DB cluster snapshots from other AWS accounts - // that this AWS account has been given permission to copy or restore, and otherwise - // false. The default is false. - // - // You can give an AWS account permission to restore a manual DB cluster snapshot - // from another AWS account by the ModifyDBClusterSnapshotAttribute API action. - IncludeShared *bool `type:"boolean"` - - // An optional pagination token provided by a previous DescribeDBClusterSnapshots - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The type of DB cluster snapshots to be returned. You can specify one of the - // following values: - // - // * automated - Return all DB cluster snapshots that have been automatically - // taken by Amazon Neptune for my AWS account. - // - // * manual - Return all DB cluster snapshots that have been taken by my - // AWS account. - // - // * shared - Return all manual DB cluster snapshots that have been shared - // to my AWS account. - // - // * public - Return all DB cluster snapshots that have been marked as public. - // - // If you don't specify a SnapshotType value, then both automated and manual - // DB cluster snapshots are returned. You can include shared DB cluster snapshots - // with these results by setting the IncludeShared parameter to true. You can - // include public DB cluster snapshots with these results by setting the IncludePublic - // parameter to true. - // - // The IncludeShared and IncludePublic parameters don't apply for SnapshotType - // values of manual or automated. The IncludePublic parameter doesn't apply - // when SnapshotType is set to shared. The IncludeShared parameter doesn't apply - // when SnapshotType is set to public. - SnapshotType *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClusterSnapshotsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterSnapshotsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClusterSnapshotsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterSnapshotsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DescribeDBClusterSnapshotsInput) SetDBClusterIdentifier(v string) *DescribeDBClusterSnapshotsInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DescribeDBClusterSnapshotsInput) SetDBClusterSnapshotIdentifier(v string) *DescribeDBClusterSnapshotsInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBClusterSnapshotsInput) SetFilters(v []*Filter) *DescribeDBClusterSnapshotsInput { - s.Filters = v - return s -} - -// SetIncludePublic sets the IncludePublic field's value. -func (s *DescribeDBClusterSnapshotsInput) SetIncludePublic(v bool) *DescribeDBClusterSnapshotsInput { - s.IncludePublic = &v - return s -} - -// SetIncludeShared sets the IncludeShared field's value. -func (s *DescribeDBClusterSnapshotsInput) SetIncludeShared(v bool) *DescribeDBClusterSnapshotsInput { - s.IncludeShared = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterSnapshotsInput) SetMarker(v string) *DescribeDBClusterSnapshotsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBClusterSnapshotsInput) SetMaxRecords(v int64) *DescribeDBClusterSnapshotsInput { - s.MaxRecords = &v - return s -} - -// SetSnapshotType sets the SnapshotType field's value. -func (s *DescribeDBClusterSnapshotsInput) SetSnapshotType(v string) *DescribeDBClusterSnapshotsInput { - s.SnapshotType = &v - return s -} - -// Provides a list of DB cluster snapshots for the user as the result of a call -// to the DescribeDBClusterSnapshots action. -type DescribeDBClusterSnapshotsOutput struct { - _ struct{} `type:"structure"` - - // Provides a list of DB cluster snapshots for the user. - DBClusterSnapshots []*DBClusterSnapshot `locationNameList:"DBClusterSnapshot" type:"list"` - - // An optional pagination token provided by a previous DescribeDBClusterSnapshots - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClusterSnapshotsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterSnapshotsOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshots sets the DBClusterSnapshots field's value. -func (s *DescribeDBClusterSnapshotsOutput) SetDBClusterSnapshots(v []*DBClusterSnapshot) *DescribeDBClusterSnapshotsOutput { - s.DBClusterSnapshots = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterSnapshotsOutput) SetMarker(v string) *DescribeDBClusterSnapshotsOutput { - s.Marker = &v - return s -} - -type DescribeDBClustersInput struct { - _ struct{} `type:"structure"` - - // The user-supplied DB cluster identifier. If this parameter is specified, - // information from only the specific DB cluster is returned. This parameter - // isn't case-sensitive. - // - // Constraints: - // - // * If supplied, must match an existing DBClusterIdentifier. - DBClusterIdentifier *string `type:"string"` - - // A filter that specifies one or more DB clusters to describe. - // - // Supported filters: - // - // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon - // Resource Names (ARNs). The results list will only include information - // about the DB clusters identified by these ARNs. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBClusters request. - // If this parameter is specified, the response includes only records beyond - // the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBClustersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClustersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClustersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClustersInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DescribeDBClustersInput) SetDBClusterIdentifier(v string) *DescribeDBClustersInput { - s.DBClusterIdentifier = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBClustersInput) SetFilters(v []*Filter) *DescribeDBClustersInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClustersInput) SetMarker(v string) *DescribeDBClustersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBClustersInput) SetMaxRecords(v int64) *DescribeDBClustersInput { - s.MaxRecords = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBClusters -// action. -type DescribeDBClustersOutput struct { - _ struct{} `type:"structure"` - - // Contains a list of DB clusters for the user. - DBClusters []*DBCluster `locationNameList:"DBCluster" type:"list"` - - // A pagination token that can be used in a subsequent DescribeDBClusters request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClustersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClustersOutput) GoString() string { - return s.String() -} - -// SetDBClusters sets the DBClusters field's value. -func (s *DescribeDBClustersOutput) SetDBClusters(v []*DBCluster) *DescribeDBClustersOutput { - s.DBClusters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClustersOutput) SetMarker(v string) *DescribeDBClustersOutput { - s.Marker = &v - return s -} - -type DescribeDBEngineVersionsInput struct { - _ struct{} `type:"structure"` - - // The name of a specific DB parameter group family to return details for. - // - // Constraints: - // - // * If supplied, must match an existing DBParameterGroupFamily. - DBParameterGroupFamily *string `type:"string"` - - // Indicates that only the default version of the specified engine or engine - // and major version combination is returned. - DefaultOnly *bool `type:"boolean"` - - // The database engine to return. - Engine *string `type:"string"` - - // The database engine version to return. - // - // Example: 5.1.49 - EngineVersion *string `type:"string"` - - // Not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // If this parameter is specified and the requested engine supports the CharacterSetName - // parameter for CreateDBInstance, the response includes a list of supported - // character sets for each engine version. - ListSupportedCharacterSets *bool `type:"boolean"` - - // If this parameter is specified and the requested engine supports the TimeZone - // parameter for CreateDBInstance, the response includes a list of supported - // time zones for each engine version. - ListSupportedTimezones *bool `type:"boolean"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more than the - // MaxRecords value is available, a pagination token called a marker is included - // in the response so that the following results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBEngineVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBEngineVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBEngineVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBEngineVersionsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DescribeDBEngineVersionsInput) SetDBParameterGroupFamily(v string) *DescribeDBEngineVersionsInput { - s.DBParameterGroupFamily = &v - return s -} - -// SetDefaultOnly sets the DefaultOnly field's value. -func (s *DescribeDBEngineVersionsInput) SetDefaultOnly(v bool) *DescribeDBEngineVersionsInput { - s.DefaultOnly = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DescribeDBEngineVersionsInput) SetEngine(v string) *DescribeDBEngineVersionsInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DescribeDBEngineVersionsInput) SetEngineVersion(v string) *DescribeDBEngineVersionsInput { - s.EngineVersion = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBEngineVersionsInput) SetFilters(v []*Filter) *DescribeDBEngineVersionsInput { - s.Filters = v - return s -} - -// SetListSupportedCharacterSets sets the ListSupportedCharacterSets field's value. -func (s *DescribeDBEngineVersionsInput) SetListSupportedCharacterSets(v bool) *DescribeDBEngineVersionsInput { - s.ListSupportedCharacterSets = &v - return s -} - -// SetListSupportedTimezones sets the ListSupportedTimezones field's value. -func (s *DescribeDBEngineVersionsInput) SetListSupportedTimezones(v bool) *DescribeDBEngineVersionsInput { - s.ListSupportedTimezones = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBEngineVersionsInput) SetMarker(v string) *DescribeDBEngineVersionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBEngineVersionsInput) SetMaxRecords(v int64) *DescribeDBEngineVersionsInput { - s.MaxRecords = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBEngineVersions -// action. -type DescribeDBEngineVersionsOutput struct { - _ struct{} `type:"structure"` - - // A list of DBEngineVersion elements. - DBEngineVersions []*DBEngineVersion `locationNameList:"DBEngineVersion" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBEngineVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBEngineVersionsOutput) GoString() string { - return s.String() -} - -// SetDBEngineVersions sets the DBEngineVersions field's value. -func (s *DescribeDBEngineVersionsOutput) SetDBEngineVersions(v []*DBEngineVersion) *DescribeDBEngineVersionsOutput { - s.DBEngineVersions = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBEngineVersionsOutput) SetMarker(v string) *DescribeDBEngineVersionsOutput { - s.Marker = &v - return s -} - -type DescribeDBInstancesInput struct { - _ struct{} `type:"structure"` - - // The user-supplied instance identifier. If this parameter is specified, information - // from only the specific DB instance is returned. This parameter isn't case-sensitive. - // - // Constraints: - // - // * If supplied, must match the identifier of an existing DBInstance. - DBInstanceIdentifier *string `type:"string"` - - // A filter that specifies one or more DB instances to describe. - // - // Supported filters: - // - // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon - // Resource Names (ARNs). The results list will only include information - // about the DB instances associated with the DB clusters identified by these - // ARNs. - // - // * db-instance-id - Accepts DB instance identifiers and DB instance Amazon - // Resource Names (ARNs). The results list will only include information - // about the DB instances identified by these ARNs. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBInstances request. - // If this parameter is specified, the response includes only records beyond - // the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBInstancesInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DescribeDBInstancesInput) SetDBInstanceIdentifier(v string) *DescribeDBInstancesInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBInstancesInput) SetFilters(v []*Filter) *DescribeDBInstancesInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBInstancesInput) SetMarker(v string) *DescribeDBInstancesInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBInstancesInput) SetMaxRecords(v int64) *DescribeDBInstancesInput { - s.MaxRecords = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBInstances -// action. -type DescribeDBInstancesOutput struct { - _ struct{} `type:"structure"` - - // A list of DBInstance instances. - DBInstances []*DBInstance `locationNameList:"DBInstance" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords . - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBInstancesOutput) GoString() string { - return s.String() -} - -// SetDBInstances sets the DBInstances field's value. -func (s *DescribeDBInstancesOutput) SetDBInstances(v []*DBInstance) *DescribeDBInstancesOutput { - s.DBInstances = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBInstancesOutput) SetMarker(v string) *DescribeDBInstancesOutput { - s.Marker = &v - return s -} - -type DescribeDBParameterGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of a specific DB parameter group to return details for. - // - // Constraints: - // - // * If supplied, must match the name of an existing DBClusterParameterGroup. - DBParameterGroupName *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBParameterGroups - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBParameterGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBParameterGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBParameterGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBParameterGroupsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *DescribeDBParameterGroupsInput) SetDBParameterGroupName(v string) *DescribeDBParameterGroupsInput { - s.DBParameterGroupName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBParameterGroupsInput) SetFilters(v []*Filter) *DescribeDBParameterGroupsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBParameterGroupsInput) SetMarker(v string) *DescribeDBParameterGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBParameterGroupsInput) SetMaxRecords(v int64) *DescribeDBParameterGroupsInput { - s.MaxRecords = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBParameterGroups -// action. -type DescribeDBParameterGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of DBParameterGroup instances. - DBParameterGroups []*DBParameterGroup `locationNameList:"DBParameterGroup" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBParameterGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBParameterGroupsOutput) GoString() string { - return s.String() -} - -// SetDBParameterGroups sets the DBParameterGroups field's value. -func (s *DescribeDBParameterGroupsOutput) SetDBParameterGroups(v []*DBParameterGroup) *DescribeDBParameterGroupsOutput { - s.DBParameterGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBParameterGroupsOutput) SetMarker(v string) *DescribeDBParameterGroupsOutput { - s.Marker = &v - return s -} - -type DescribeDBParametersInput struct { - _ struct{} `type:"structure"` - - // The name of a specific DB parameter group to return details for. - // - // Constraints: - // - // * If supplied, must match the name of an existing DBParameterGroup. - // - // DBParameterGroupName is a required field - DBParameterGroupName *string `type:"string" required:"true"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBParameters - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The parameter types to return. - // - // Default: All parameter types returned - // - // Valid Values: user | system | engine-default - Source *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBParametersInput"} - if s.DBParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *DescribeDBParametersInput) SetDBParameterGroupName(v string) *DescribeDBParametersInput { - s.DBParameterGroupName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBParametersInput) SetFilters(v []*Filter) *DescribeDBParametersInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBParametersInput) SetMarker(v string) *DescribeDBParametersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBParametersInput) SetMaxRecords(v int64) *DescribeDBParametersInput { - s.MaxRecords = &v - return s -} - -// SetSource sets the Source field's value. -func (s *DescribeDBParametersInput) SetSource(v string) *DescribeDBParametersInput { - s.Source = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBParameters -// action. -type DescribeDBParametersOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // A list of Parameter values. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` -} - -// String returns the string representation -func (s DescribeDBParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBParametersOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBParametersOutput) SetMarker(v string) *DescribeDBParametersOutput { - s.Marker = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DescribeDBParametersOutput) SetParameters(v []*Parameter) *DescribeDBParametersOutput { - s.Parameters = v - return s -} - -type DescribeDBSubnetGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of the DB subnet group to return details for. - DBSubnetGroupName *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBSubnetGroups - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBSubnetGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBSubnetGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBSubnetGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBSubnetGroupsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *DescribeDBSubnetGroupsInput) SetDBSubnetGroupName(v string) *DescribeDBSubnetGroupsInput { - s.DBSubnetGroupName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBSubnetGroupsInput) SetFilters(v []*Filter) *DescribeDBSubnetGroupsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBSubnetGroupsInput) SetMarker(v string) *DescribeDBSubnetGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBSubnetGroupsInput) SetMaxRecords(v int64) *DescribeDBSubnetGroupsInput { - s.MaxRecords = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBSubnetGroups -// action. -type DescribeDBSubnetGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of DBSubnetGroup instances. - DBSubnetGroups []*DBSubnetGroup `locationNameList:"DBSubnetGroup" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBSubnetGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBSubnetGroupsOutput) GoString() string { - return s.String() -} - -// SetDBSubnetGroups sets the DBSubnetGroups field's value. -func (s *DescribeDBSubnetGroupsOutput) SetDBSubnetGroups(v []*DBSubnetGroup) *DescribeDBSubnetGroupsOutput { - s.DBSubnetGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBSubnetGroupsOutput) SetMarker(v string) *DescribeDBSubnetGroupsOutput { - s.Marker = &v - return s -} - -type DescribeEngineDefaultClusterParametersInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group family to return engine parameter - // information for. - // - // DBParameterGroupFamily is a required field - DBParameterGroupFamily *string `type:"string" required:"true"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeEngineDefaultClusterParameters - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeEngineDefaultClusterParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEngineDefaultClusterParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEngineDefaultClusterParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEngineDefaultClusterParametersInput"} - if s.DBParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DescribeEngineDefaultClusterParametersInput) SetDBParameterGroupFamily(v string) *DescribeEngineDefaultClusterParametersInput { - s.DBParameterGroupFamily = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEngineDefaultClusterParametersInput) SetFilters(v []*Filter) *DescribeEngineDefaultClusterParametersInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEngineDefaultClusterParametersInput) SetMarker(v string) *DescribeEngineDefaultClusterParametersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEngineDefaultClusterParametersInput) SetMaxRecords(v int64) *DescribeEngineDefaultClusterParametersInput { - s.MaxRecords = &v - return s -} - -type DescribeEngineDefaultClusterParametersOutput struct { - _ struct{} `type:"structure"` - - // Contains the result of a successful invocation of the DescribeEngineDefaultParameters - // action. - EngineDefaults *EngineDefaults `type:"structure"` -} - -// String returns the string representation -func (s DescribeEngineDefaultClusterParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEngineDefaultClusterParametersOutput) GoString() string { - return s.String() -} - -// SetEngineDefaults sets the EngineDefaults field's value. -func (s *DescribeEngineDefaultClusterParametersOutput) SetEngineDefaults(v *EngineDefaults) *DescribeEngineDefaultClusterParametersOutput { - s.EngineDefaults = v - return s -} - -type DescribeEngineDefaultParametersInput struct { - _ struct{} `type:"structure"` - - // The name of the DB parameter group family. - // - // DBParameterGroupFamily is a required field - DBParameterGroupFamily *string `type:"string" required:"true"` - - // Not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeEngineDefaultParameters - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeEngineDefaultParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEngineDefaultParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEngineDefaultParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEngineDefaultParametersInput"} - if s.DBParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DescribeEngineDefaultParametersInput) SetDBParameterGroupFamily(v string) *DescribeEngineDefaultParametersInput { - s.DBParameterGroupFamily = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEngineDefaultParametersInput) SetFilters(v []*Filter) *DescribeEngineDefaultParametersInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEngineDefaultParametersInput) SetMarker(v string) *DescribeEngineDefaultParametersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEngineDefaultParametersInput) SetMaxRecords(v int64) *DescribeEngineDefaultParametersInput { - s.MaxRecords = &v - return s -} - -type DescribeEngineDefaultParametersOutput struct { - _ struct{} `type:"structure"` - - // Contains the result of a successful invocation of the DescribeEngineDefaultParameters - // action. - EngineDefaults *EngineDefaults `type:"structure"` -} - -// String returns the string representation -func (s DescribeEngineDefaultParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEngineDefaultParametersOutput) GoString() string { - return s.String() -} - -// SetEngineDefaults sets the EngineDefaults field's value. -func (s *DescribeEngineDefaultParametersOutput) SetEngineDefaults(v *EngineDefaults) *DescribeEngineDefaultParametersOutput { - s.EngineDefaults = v - return s -} - -type DescribeEventCategoriesInput struct { - _ struct{} `type:"structure"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // The type of source that is generating the events. - // - // Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot - SourceType *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventCategoriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventCategoriesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventCategoriesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventCategoriesInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEventCategoriesInput) SetFilters(v []*Filter) *DescribeEventCategoriesInput { - s.Filters = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *DescribeEventCategoriesInput) SetSourceType(v string) *DescribeEventCategoriesInput { - s.SourceType = &v - return s -} - -// Data returned from the DescribeEventCategories action. -type DescribeEventCategoriesOutput struct { - _ struct{} `type:"structure"` - - // A list of EventCategoriesMap data types. - EventCategoriesMapList []*EventCategoriesMap `locationNameList:"EventCategoriesMap" type:"list"` -} - -// String returns the string representation -func (s DescribeEventCategoriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventCategoriesOutput) GoString() string { - return s.String() -} - -// SetEventCategoriesMapList sets the EventCategoriesMapList field's value. -func (s *DescribeEventCategoriesOutput) SetEventCategoriesMapList(v []*EventCategoriesMap) *DescribeEventCategoriesOutput { - s.EventCategoriesMapList = v - return s -} - -type DescribeEventSubscriptionsInput struct { - _ struct{} `type:"structure"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords . - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The name of the event notification subscription you want to describe. - SubscriptionName *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventSubscriptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventSubscriptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventSubscriptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventSubscriptionsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEventSubscriptionsInput) SetFilters(v []*Filter) *DescribeEventSubscriptionsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventSubscriptionsInput) SetMarker(v string) *DescribeEventSubscriptionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEventSubscriptionsInput) SetMaxRecords(v int64) *DescribeEventSubscriptionsInput { - s.MaxRecords = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *DescribeEventSubscriptionsInput) SetSubscriptionName(v string) *DescribeEventSubscriptionsInput { - s.SubscriptionName = &v - return s -} - -// Data returned by the DescribeEventSubscriptions action. -type DescribeEventSubscriptionsOutput struct { - _ struct{} `type:"structure"` - - // A list of EventSubscriptions data types. - EventSubscriptionsList []*EventSubscription `locationNameList:"EventSubscription" type:"list"` - - // An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventSubscriptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventSubscriptionsOutput) GoString() string { - return s.String() -} - -// SetEventSubscriptionsList sets the EventSubscriptionsList field's value. -func (s *DescribeEventSubscriptionsOutput) SetEventSubscriptionsList(v []*EventSubscription) *DescribeEventSubscriptionsOutput { - s.EventSubscriptionsList = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventSubscriptionsOutput) SetMarker(v string) *DescribeEventSubscriptionsOutput { - s.Marker = &v - return s -} - -type DescribeEventsInput struct { - _ struct{} `type:"structure"` - - // The number of minutes to retrieve events for. - // - // Default: 60 - Duration *int64 `type:"integer"` - - // The end of the time interval for which to retrieve events, specified in ISO - // 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia - // page. (http://en.wikipedia.org/wiki/ISO_8601) - // - // Example: 2009-07-08T18:00Z - EndTime *time.Time `type:"timestamp"` - - // A list of event categories that trigger notifications for a event notification - // subscription. - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeEvents request. - // If this parameter is specified, the response includes only records beyond - // the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The identifier of the event source for which events are returned. If not - // specified, then all sources are included in the response. - // - // Constraints: - // - // * If SourceIdentifier is supplied, SourceType must also be provided. - // - // * If the source type is DBInstance, then a DBInstanceIdentifier must be - // supplied. - // - // * If the source type is DBSecurityGroup, a DBSecurityGroupName must be - // supplied. - // - // * If the source type is DBParameterGroup, a DBParameterGroupName must - // be supplied. - // - // * If the source type is DBSnapshot, a DBSnapshotIdentifier must be supplied. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - SourceIdentifier *string `type:"string"` - - // The event source to retrieve events for. If no value is specified, all events - // are returned. - SourceType *string `type:"string" enum:"SourceType"` - - // The beginning of the time interval to retrieve events for, specified in ISO - // 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia - // page. (http://en.wikipedia.org/wiki/ISO_8601) - // - // Example: 2009-07-08T18:00Z - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s DescribeEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDuration sets the Duration field's value. -func (s *DescribeEventsInput) SetDuration(v int64) *DescribeEventsInput { - s.Duration = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *DescribeEventsInput) SetEndTime(v time.Time) *DescribeEventsInput { - s.EndTime = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *DescribeEventsInput) SetEventCategories(v []*string) *DescribeEventsInput { - s.EventCategories = v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEventsInput) SetFilters(v []*Filter) *DescribeEventsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventsInput) SetMarker(v string) *DescribeEventsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEventsInput) SetMaxRecords(v int64) *DescribeEventsInput { - s.MaxRecords = &v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *DescribeEventsInput) SetSourceIdentifier(v string) *DescribeEventsInput { - s.SourceIdentifier = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *DescribeEventsInput) SetSourceType(v string) *DescribeEventsInput { - s.SourceType = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeEventsInput) SetStartTime(v time.Time) *DescribeEventsInput { - s.StartTime = &v - return s -} - -// Contains the result of a successful invocation of the DescribeEvents action. -type DescribeEventsOutput struct { - _ struct{} `type:"structure"` - - // A list of Event instances. - Events []*Event `locationNameList:"Event" type:"list"` - - // An optional pagination token provided by a previous Events request. If this - // parameter is specified, the response includes only records beyond the marker, - // up to the value specified by MaxRecords . - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { - s.Events = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventsOutput) SetMarker(v string) *DescribeEventsOutput { - s.Marker = &v - return s -} - -type DescribeOrderableDBInstanceOptionsInput struct { - _ struct{} `type:"structure"` - - // The DB instance class filter value. Specify this parameter to show only the - // available offerings matching the specified DB instance class. - DBInstanceClass *string `type:"string"` - - // The name of the engine to retrieve DB instance options for. - // - // Engine is a required field - Engine *string `type:"string" required:"true"` - - // The engine version filter value. Specify this parameter to show only the - // available offerings matching the specified engine version. - EngineVersion *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // The license model filter value. Specify this parameter to show only the available - // offerings matching the specified license model. - LicenseModel *string `type:"string"` - - // An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords . - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The VPC filter value. Specify this parameter to show only the available VPC - // or non-VPC offerings. - Vpc *bool `type:"boolean"` -} - -// String returns the string representation -func (s DescribeOrderableDBInstanceOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOrderableDBInstanceOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeOrderableDBInstanceOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeOrderableDBInstanceOptionsInput"} - if s.Engine == nil { - invalidParams.Add(request.NewErrParamRequired("Engine")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetDBInstanceClass(v string) *DescribeOrderableDBInstanceOptionsInput { - s.DBInstanceClass = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetEngine(v string) *DescribeOrderableDBInstanceOptionsInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetEngineVersion(v string) *DescribeOrderableDBInstanceOptionsInput { - s.EngineVersion = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetFilters(v []*Filter) *DescribeOrderableDBInstanceOptionsInput { - s.Filters = v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetLicenseModel(v string) *DescribeOrderableDBInstanceOptionsInput { - s.LicenseModel = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetMarker(v string) *DescribeOrderableDBInstanceOptionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetMaxRecords(v int64) *DescribeOrderableDBInstanceOptionsInput { - s.MaxRecords = &v - return s -} - -// SetVpc sets the Vpc field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetVpc(v bool) *DescribeOrderableDBInstanceOptionsInput { - s.Vpc = &v - return s -} - -// Contains the result of a successful invocation of the DescribeOrderableDBInstanceOptions -// action. -type DescribeOrderableDBInstanceOptionsOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous OrderableDBInstanceOptions - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords . - Marker *string `type:"string"` - - // An OrderableDBInstanceOption structure containing information about orderable - // options for the DB instance. - OrderableDBInstanceOptions []*OrderableDBInstanceOption `locationNameList:"OrderableDBInstanceOption" type:"list"` -} - -// String returns the string representation -func (s DescribeOrderableDBInstanceOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOrderableDBInstanceOptionsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeOrderableDBInstanceOptionsOutput) SetMarker(v string) *DescribeOrderableDBInstanceOptionsOutput { - s.Marker = &v - return s -} - -// SetOrderableDBInstanceOptions sets the OrderableDBInstanceOptions field's value. -func (s *DescribeOrderableDBInstanceOptionsOutput) SetOrderableDBInstanceOptions(v []*OrderableDBInstanceOption) *DescribeOrderableDBInstanceOptionsOutput { - s.OrderableDBInstanceOptions = v - return s -} - -type DescribePendingMaintenanceActionsInput struct { - _ struct{} `type:"structure"` - - // A filter that specifies one or more resources to return pending maintenance - // actions for. - // - // Supported filters: - // - // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon - // Resource Names (ARNs). The results list will only include pending maintenance - // actions for the DB clusters identified by these ARNs. - // - // * db-instance-id - Accepts DB instance identifiers and DB instance ARNs. - // The results list will only include pending maintenance actions for the - // DB instances identified by these ARNs. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribePendingMaintenanceActions - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to a number of records specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The ARN of a resource to return pending maintenance actions for. - ResourceIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s DescribePendingMaintenanceActionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePendingMaintenanceActionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribePendingMaintenanceActionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribePendingMaintenanceActionsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribePendingMaintenanceActionsInput) SetFilters(v []*Filter) *DescribePendingMaintenanceActionsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribePendingMaintenanceActionsInput) SetMarker(v string) *DescribePendingMaintenanceActionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribePendingMaintenanceActionsInput) SetMaxRecords(v int64) *DescribePendingMaintenanceActionsInput { - s.MaxRecords = &v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *DescribePendingMaintenanceActionsInput) SetResourceIdentifier(v string) *DescribePendingMaintenanceActionsInput { - s.ResourceIdentifier = &v - return s -} - -// Data returned from the DescribePendingMaintenanceActions action. -type DescribePendingMaintenanceActionsOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous DescribePendingMaintenanceActions - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to a number of records specified by MaxRecords. - Marker *string `type:"string"` - - // A list of the pending maintenance actions for the resource. - PendingMaintenanceActions []*ResourcePendingMaintenanceActions `locationNameList:"ResourcePendingMaintenanceActions" type:"list"` -} - -// String returns the string representation -func (s DescribePendingMaintenanceActionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePendingMaintenanceActionsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribePendingMaintenanceActionsOutput) SetMarker(v string) *DescribePendingMaintenanceActionsOutput { - s.Marker = &v - return s -} - -// SetPendingMaintenanceActions sets the PendingMaintenanceActions field's value. -func (s *DescribePendingMaintenanceActionsOutput) SetPendingMaintenanceActions(v []*ResourcePendingMaintenanceActions) *DescribePendingMaintenanceActionsOutput { - s.PendingMaintenanceActions = v - return s -} - -type DescribeValidDBInstanceModificationsInput struct { - _ struct{} `type:"structure"` - - // The customer identifier or the ARN of your DB instance. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeValidDBInstanceModificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeValidDBInstanceModificationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeValidDBInstanceModificationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeValidDBInstanceModificationsInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DescribeValidDBInstanceModificationsInput) SetDBInstanceIdentifier(v string) *DescribeValidDBInstanceModificationsInput { - s.DBInstanceIdentifier = &v - return s -} - -type DescribeValidDBInstanceModificationsOutput struct { - _ struct{} `type:"structure"` - - // Information about valid modifications that you can make to your DB instance. - // Contains the result of a successful call to the DescribeValidDBInstanceModifications - // action. You can use this information when you call ModifyDBInstance. - ValidDBInstanceModificationsMessage *ValidDBInstanceModificationsMessage `type:"structure"` -} - -// String returns the string representation -func (s DescribeValidDBInstanceModificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeValidDBInstanceModificationsOutput) GoString() string { - return s.String() -} - -// SetValidDBInstanceModificationsMessage sets the ValidDBInstanceModificationsMessage field's value. -func (s *DescribeValidDBInstanceModificationsOutput) SetValidDBInstanceModificationsMessage(v *ValidDBInstanceModificationsMessage) *DescribeValidDBInstanceModificationsOutput { - s.ValidDBInstanceModificationsMessage = v - return s -} - -// An Active Directory Domain membership record associated with the DB instance. -type DomainMembership struct { - _ struct{} `type:"structure"` - - // The identifier of the Active Directory Domain. - Domain *string `type:"string"` - - // The fully qualified domain name of the Active Directory Domain. - FQDN *string `type:"string"` - - // The name of the IAM role to be used when making API calls to the Directory - // Service. - IAMRoleName *string `type:"string"` - - // The status of the DB instance's Active Directory Domain membership, such - // as joined, pending-join, failed etc). - Status *string `type:"string"` -} - -// String returns the string representation -func (s DomainMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainMembership) GoString() string { - return s.String() -} - -// SetDomain sets the Domain field's value. -func (s *DomainMembership) SetDomain(v string) *DomainMembership { - s.Domain = &v - return s -} - -// SetFQDN sets the FQDN field's value. -func (s *DomainMembership) SetFQDN(v string) *DomainMembership { - s.FQDN = &v - return s -} - -// SetIAMRoleName sets the IAMRoleName field's value. -func (s *DomainMembership) SetIAMRoleName(v string) *DomainMembership { - s.IAMRoleName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DomainMembership) SetStatus(v string) *DomainMembership { - s.Status = &v - return s -} - -// A range of double values. -type DoubleRange struct { - _ struct{} `type:"structure"` - - // The minimum value in the range. - From *float64 `type:"double"` - - // The maximum value in the range. - To *float64 `type:"double"` -} - -// String returns the string representation -func (s DoubleRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DoubleRange) GoString() string { - return s.String() -} - -// SetFrom sets the From field's value. -func (s *DoubleRange) SetFrom(v float64) *DoubleRange { - s.From = &v - return s -} - -// SetTo sets the To field's value. -func (s *DoubleRange) SetTo(v float64) *DoubleRange { - s.To = &v - return s -} - -// This data type is used as a response element in the following actions: -// -// * CreateDBInstance -// -// * DescribeDBInstances -// -// * DeleteDBInstance -type Endpoint struct { - _ struct{} `type:"structure"` - - // Specifies the DNS address of the DB instance. - Address *string `type:"string"` - - // Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. - HostedZoneId *string `type:"string"` - - // Specifies the port that the database engine is listening on. - Port *int64 `type:"integer"` -} - -// String returns the string representation -func (s Endpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Endpoint) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *Endpoint) SetAddress(v string) *Endpoint { - s.Address = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *Endpoint) SetHostedZoneId(v string) *Endpoint { - s.HostedZoneId = &v - return s -} - -// SetPort sets the Port field's value. -func (s *Endpoint) SetPort(v int64) *Endpoint { - s.Port = &v - return s -} - -// Contains the result of a successful invocation of the DescribeEngineDefaultParameters -// action. -type EngineDefaults struct { - _ struct{} `type:"structure"` - - // Specifies the name of the DB parameter group family that the engine default - // parameters apply to. - DBParameterGroupFamily *string `type:"string"` - - // An optional pagination token provided by a previous EngineDefaults request. - // If this parameter is specified, the response includes only records beyond - // the marker, up to the value specified by MaxRecords . - Marker *string `type:"string"` - - // Contains a list of engine default parameters. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` -} - -// String returns the string representation -func (s EngineDefaults) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EngineDefaults) GoString() string { - return s.String() -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *EngineDefaults) SetDBParameterGroupFamily(v string) *EngineDefaults { - s.DBParameterGroupFamily = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *EngineDefaults) SetMarker(v string) *EngineDefaults { - s.Marker = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *EngineDefaults) SetParameters(v []*Parameter) *EngineDefaults { - s.Parameters = v - return s -} - -// This data type is used as a response element in the DescribeEvents action. -type Event struct { - _ struct{} `type:"structure"` - - // Specifies the date and time of the event. - Date *time.Time `type:"timestamp"` - - // Specifies the category for the event. - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // Provides the text of this event. - Message *string `type:"string"` - - // The Amazon Resource Name (ARN) for the event. - SourceArn *string `type:"string"` - - // Provides the identifier for the source of the event. - SourceIdentifier *string `type:"string"` - - // Specifies the source type for this event. - SourceType *string `type:"string" enum:"SourceType"` -} - -// String returns the string representation -func (s Event) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Event) GoString() string { - return s.String() -} - -// SetDate sets the Date field's value. -func (s *Event) SetDate(v time.Time) *Event { - s.Date = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *Event) SetEventCategories(v []*string) *Event { - s.EventCategories = v - return s -} - -// SetMessage sets the Message field's value. -func (s *Event) SetMessage(v string) *Event { - s.Message = &v - return s -} - -// SetSourceArn sets the SourceArn field's value. -func (s *Event) SetSourceArn(v string) *Event { - s.SourceArn = &v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *Event) SetSourceIdentifier(v string) *Event { - s.SourceIdentifier = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *Event) SetSourceType(v string) *Event { - s.SourceType = &v - return s -} - -// Contains the results of a successful invocation of the DescribeEventCategories -// action. -type EventCategoriesMap struct { - _ struct{} `type:"structure"` - - // The event categories for the specified source type - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // The source type that the returned categories belong to - SourceType *string `type:"string"` -} - -// String returns the string representation -func (s EventCategoriesMap) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventCategoriesMap) GoString() string { - return s.String() -} - -// SetEventCategories sets the EventCategories field's value. -func (s *EventCategoriesMap) SetEventCategories(v []*string) *EventCategoriesMap { - s.EventCategories = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *EventCategoriesMap) SetSourceType(v string) *EventCategoriesMap { - s.SourceType = &v - return s -} - -// Contains the results of a successful invocation of the DescribeEventSubscriptions -// action. -type EventSubscription struct { - _ struct{} `type:"structure"` - - // The event notification subscription Id. - CustSubscriptionId *string `type:"string"` - - // The AWS customer account associated with the event notification subscription. - CustomerAwsId *string `type:"string"` - - // A Boolean value indicating if the subscription is enabled. True indicates - // the subscription is enabled. - Enabled *bool `type:"boolean"` - - // A list of event categories for the event notification subscription. - EventCategoriesList []*string `locationNameList:"EventCategory" type:"list"` - - // The Amazon Resource Name (ARN) for the event subscription. - EventSubscriptionArn *string `type:"string"` - - // The topic ARN of the event notification subscription. - SnsTopicArn *string `type:"string"` - - // A list of source IDs for the event notification subscription. - SourceIdsList []*string `locationNameList:"SourceId" type:"list"` - - // The source type for the event notification subscription. - SourceType *string `type:"string"` - - // The status of the event notification subscription. - // - // Constraints: - // - // Can be one of the following: creating | modifying | deleting | active | no-permission - // | topic-not-exist - // - // The status "no-permission" indicates that Neptune no longer has permission - // to post to the SNS topic. The status "topic-not-exist" indicates that the - // topic was deleted after the subscription was created. - Status *string `type:"string"` - - // The time the event notification subscription was created. - SubscriptionCreationTime *string `type:"string"` -} - -// String returns the string representation -func (s EventSubscription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventSubscription) GoString() string { - return s.String() -} - -// SetCustSubscriptionId sets the CustSubscriptionId field's value. -func (s *EventSubscription) SetCustSubscriptionId(v string) *EventSubscription { - s.CustSubscriptionId = &v - return s -} - -// SetCustomerAwsId sets the CustomerAwsId field's value. -func (s *EventSubscription) SetCustomerAwsId(v string) *EventSubscription { - s.CustomerAwsId = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *EventSubscription) SetEnabled(v bool) *EventSubscription { - s.Enabled = &v - return s -} - -// SetEventCategoriesList sets the EventCategoriesList field's value. -func (s *EventSubscription) SetEventCategoriesList(v []*string) *EventSubscription { - s.EventCategoriesList = v - return s -} - -// SetEventSubscriptionArn sets the EventSubscriptionArn field's value. -func (s *EventSubscription) SetEventSubscriptionArn(v string) *EventSubscription { - s.EventSubscriptionArn = &v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *EventSubscription) SetSnsTopicArn(v string) *EventSubscription { - s.SnsTopicArn = &v - return s -} - -// SetSourceIdsList sets the SourceIdsList field's value. -func (s *EventSubscription) SetSourceIdsList(v []*string) *EventSubscription { - s.SourceIdsList = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *EventSubscription) SetSourceType(v string) *EventSubscription { - s.SourceType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *EventSubscription) SetStatus(v string) *EventSubscription { - s.Status = &v - return s -} - -// SetSubscriptionCreationTime sets the SubscriptionCreationTime field's value. -func (s *EventSubscription) SetSubscriptionCreationTime(v string) *EventSubscription { - s.SubscriptionCreationTime = &v - return s -} - -type FailoverDBClusterInput struct { - _ struct{} `type:"structure"` - - // A DB cluster identifier to force a failover for. This parameter is not case-sensitive. - // - // Constraints: - // - // * Must match the identifier of an existing DBCluster. - DBClusterIdentifier *string `type:"string"` - - // The name of the instance to promote to the primary instance. - // - // You must specify the instance identifier for an Read Replica in the DB cluster. - // For example, mydbcluster-replica1. - TargetDBInstanceIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s FailoverDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailoverDBClusterInput) GoString() string { - return s.String() -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *FailoverDBClusterInput) SetDBClusterIdentifier(v string) *FailoverDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetTargetDBInstanceIdentifier sets the TargetDBInstanceIdentifier field's value. -func (s *FailoverDBClusterInput) SetTargetDBInstanceIdentifier(v string) *FailoverDBClusterInput { - s.TargetDBInstanceIdentifier = &v - return s -} - -type FailoverDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters action. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s FailoverDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailoverDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *FailoverDBClusterOutput) SetDBCluster(v *DBCluster) *FailoverDBClusterOutput { - s.DBCluster = v - return s -} - -// This type is not currently supported. -type Filter struct { - _ struct{} `type:"structure"` - - // This parameter is not currently supported. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // This parameter is not currently supported. - // - // Values is a required field - Values []*string `locationNameList:"Value" type:"list" required:"true"` -} - -// String returns the string representation -func (s Filter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Filter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Filter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Filter"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *Filter) SetName(v string) *Filter { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *Filter) SetValues(v []*string) *Filter { - s.Values = v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // The Amazon Neptune resource with tags to be listed. This value is an Amazon - // Resource Name (ARN). For information about creating an ARN, see Constructing - // an Amazon Resource Name (ARN) (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing). - // - // ResourceName is a required field - ResourceName *string `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.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListTagsForResourceInput) SetFilters(v []*Filter) *ListTagsForResourceInput { - s.Filters = v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *ListTagsForResourceInput) SetResourceName(v string) *ListTagsForResourceInput { - s.ResourceName = &v - return s -} - -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // List of tags returned by the ListTagsForResource operation. - TagList []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetTagList sets the TagList field's value. -func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOutput { - s.TagList = v - return s -} - -type ModifyDBClusterInput struct { - _ struct{} `type:"structure"` - - // A value that specifies whether the modifications in this request and any - // pending modifications are asynchronously applied as soon as possible, regardless - // of the PreferredMaintenanceWindow setting for the DB cluster. If this parameter - // is set to false, changes to the DB cluster are applied during the next maintenance - // window. - // - // The ApplyImmediately parameter only affects the NewDBClusterIdentifier and - // MasterUserPassword values. If you set the ApplyImmediately parameter value - // to false, then changes to the NewDBClusterIdentifier and MasterUserPassword - // values are applied during the next maintenance window. All other changes - // are applied immediately, regardless of the value of the ApplyImmediately - // parameter. - // - // Default: false - ApplyImmediately *bool `type:"boolean"` - - // The number of days for which automated backups are retained. You must specify - // a minimum value of 1. - // - // Default: 1 - // - // Constraints: - // - // * Must be a value from 1 to 35 - BackupRetentionPeriod *int64 `type:"integer"` - - // The DB cluster identifier for the cluster being modified. This parameter - // is not case-sensitive. - // - // Constraints: - // - // * Must match the identifier of an existing DBCluster. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The name of the DB cluster parameter group to use for the DB cluster. - DBClusterParameterGroupName *string `type:"string"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // The version number of the database engine to which you want to upgrade. Changing - // this parameter results in an outage. The change is applied during the next - // maintenance window unless the ApplyImmediately parameter is set to true. - // - // For a list of valid engine versions, see CreateDBInstance, or call DescribeDBEngineVersions. - EngineVersion *string `type:"string"` - - // The new password for the master database user. This password can contain - // any printable ASCII character except "/", """, or "@". - // - // Constraints: Must contain from 8 to 41 characters. - MasterUserPassword *string `type:"string"` - - // The new DB cluster identifier for the DB cluster when renaming a DB cluster. - // This value is stored as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens - // - // * The first character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - // - // Example: my-cluster2 - NewDBClusterIdentifier *string `type:"string"` - - // A value that indicates that the DB cluster should be associated with the - // specified option group. Changing this parameter doesn't result in an outage - // except in the following case, and the change is applied during the next maintenance - // window unless the ApplyImmediately parameter is set to true for this request. - // If the parameter change results in an option group that enables OEM, this - // change can cause a brief (sub-second) period during which new connections - // are rejected but existing connections are not interrupted. - // - // Permanent options can't be removed from an option group. The option group - // can't be removed from a DB cluster once it is associated with a DB cluster. - OptionGroupName *string `type:"string"` - - // The port number on which the DB cluster accepts connections. - // - // Constraints: Value must be 1150-65535 - // - // Default: The same port as the original DB cluster. - Port *int64 `type:"integer"` - - // The daily time range during which automated backups are created if automated - // backups are enabled, using the BackupRetentionPeriod parameter. - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region. - // - // Constraints: - // - // * Must be in the format hh24:mi-hh24:mi. - // - // * Must be in Universal Coordinated Time (UTC). - // - // * Must not conflict with the preferred maintenance window. - // - // * Must be at least 30 minutes. - PreferredBackupWindow *string `type:"string"` - - // The weekly time range during which system maintenance can occur, in Universal - // Coordinated Time (UTC). - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region, occurring on a random day of the week. - // - // Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. - // - // Constraints: Minimum 30-minute window. - PreferredMaintenanceWindow *string `type:"string"` - - // A list of VPC security groups that the DB cluster will belong to. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s ModifyDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *ModifyDBClusterInput) SetApplyImmediately(v bool) *ModifyDBClusterInput { - s.ApplyImmediately = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *ModifyDBClusterInput) SetBackupRetentionPeriod(v int64) *ModifyDBClusterInput { - s.BackupRetentionPeriod = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *ModifyDBClusterInput) SetDBClusterIdentifier(v string) *ModifyDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *ModifyDBClusterInput) SetDBClusterParameterGroupName(v string) *ModifyDBClusterInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *ModifyDBClusterInput) SetEnableIAMDatabaseAuthentication(v bool) *ModifyDBClusterInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *ModifyDBClusterInput) SetEngineVersion(v string) *ModifyDBClusterInput { - s.EngineVersion = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *ModifyDBClusterInput) SetMasterUserPassword(v string) *ModifyDBClusterInput { - s.MasterUserPassword = &v - return s -} - -// SetNewDBClusterIdentifier sets the NewDBClusterIdentifier field's value. -func (s *ModifyDBClusterInput) SetNewDBClusterIdentifier(v string) *ModifyDBClusterInput { - s.NewDBClusterIdentifier = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *ModifyDBClusterInput) SetOptionGroupName(v string) *ModifyDBClusterInput { - s.OptionGroupName = &v - return s -} - -// SetPort sets the Port field's value. -func (s *ModifyDBClusterInput) SetPort(v int64) *ModifyDBClusterInput { - s.Port = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *ModifyDBClusterInput) SetPreferredBackupWindow(v string) *ModifyDBClusterInput { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *ModifyDBClusterInput) SetPreferredMaintenanceWindow(v string) *ModifyDBClusterInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *ModifyDBClusterInput) SetVpcSecurityGroupIds(v []*string) *ModifyDBClusterInput { - s.VpcSecurityGroupIds = v - return s -} - -type ModifyDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters action. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s ModifyDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *ModifyDBClusterOutput) SetDBCluster(v *DBCluster) *ModifyDBClusterOutput { - s.DBCluster = v - return s -} - -type ModifyDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group to modify. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` - - // A list of parameters in the DB cluster parameter group to modify. - // - // Parameters is a required field - Parameters []*Parameter `locationNameList:"Parameter" type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterParameterGroupInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - if s.Parameters == nil { - invalidParams.Add(request.NewErrParamRequired("Parameters")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *ModifyDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *ModifyDBClusterParameterGroupInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ModifyDBClusterParameterGroupInput) SetParameters(v []*Parameter) *ModifyDBClusterParameterGroupInput { - s.Parameters = v - return s -} - -type ModifyDBClusterSnapshotAttributeInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster snapshot attribute to modify. - // - // To manage authorization for other AWS accounts to copy or restore a manual - // DB cluster snapshot, set this value to restore. - // - // AttributeName is a required field - AttributeName *string `type:"string" required:"true"` - - // The identifier for the DB cluster snapshot to modify the attributes for. - // - // DBClusterSnapshotIdentifier is a required field - DBClusterSnapshotIdentifier *string `type:"string" required:"true"` - - // A list of DB cluster snapshot attributes to add to the attribute specified - // by AttributeName. - // - // To authorize other AWS accounts to copy or restore a manual DB cluster snapshot, - // set this list to include one or more AWS account IDs, or all to make the - // manual DB cluster snapshot restorable by any AWS account. Do not add the - // all value for any manual DB cluster snapshots that contain private information - // that you don't want available to all AWS accounts. - ValuesToAdd []*string `locationNameList:"AttributeValue" type:"list"` - - // A list of DB cluster snapshot attributes to remove from the attribute specified - // by AttributeName. - // - // To remove authorization for other AWS accounts to copy or restore a manual - // DB cluster snapshot, set this list to include one or more AWS account identifiers, - // or all to remove authorization for any AWS account to copy or restore the - // DB cluster snapshot. If you specify all, an AWS account whose account ID - // is explicitly added to the restore attribute can still copy or restore a - // manual DB cluster snapshot. - ValuesToRemove []*string `locationNameList:"AttributeValue" type:"list"` -} - -// String returns the string representation -func (s ModifyDBClusterSnapshotAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterSnapshotAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBClusterSnapshotAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterSnapshotAttributeInput"} - if s.AttributeName == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeName")) - } - if s.DBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeName sets the AttributeName field's value. -func (s *ModifyDBClusterSnapshotAttributeInput) SetAttributeName(v string) *ModifyDBClusterSnapshotAttributeInput { - s.AttributeName = &v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *ModifyDBClusterSnapshotAttributeInput) SetDBClusterSnapshotIdentifier(v string) *ModifyDBClusterSnapshotAttributeInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// SetValuesToAdd sets the ValuesToAdd field's value. -func (s *ModifyDBClusterSnapshotAttributeInput) SetValuesToAdd(v []*string) *ModifyDBClusterSnapshotAttributeInput { - s.ValuesToAdd = v - return s -} - -// SetValuesToRemove sets the ValuesToRemove field's value. -func (s *ModifyDBClusterSnapshotAttributeInput) SetValuesToRemove(v []*string) *ModifyDBClusterSnapshotAttributeInput { - s.ValuesToRemove = v - return s -} - -type ModifyDBClusterSnapshotAttributeOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful call to the DescribeDBClusterSnapshotAttributes - // API action. - // - // Manual DB cluster snapshot attributes are used to authorize other AWS accounts - // to copy or restore a manual DB cluster snapshot. For more information, see - // the ModifyDBClusterSnapshotAttribute API action. - DBClusterSnapshotAttributesResult *DBClusterSnapshotAttributesResult `type:"structure"` -} - -// String returns the string representation -func (s ModifyDBClusterSnapshotAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterSnapshotAttributeOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshotAttributesResult sets the DBClusterSnapshotAttributesResult field's value. -func (s *ModifyDBClusterSnapshotAttributeOutput) SetDBClusterSnapshotAttributesResult(v *DBClusterSnapshotAttributesResult) *ModifyDBClusterSnapshotAttributeOutput { - s.DBClusterSnapshotAttributesResult = v - return s -} - -type ModifyDBInstanceInput struct { - _ struct{} `type:"structure"` - - // The new amount of storage (in gibibytes) to allocate for the DB instance. - // - // Not applicable. Storage is managed by the DB Cluster. - AllocatedStorage *int64 `type:"integer"` - - // Indicates that major version upgrades are allowed. Changing this parameter - // doesn't result in an outage and the change is asynchronously applied as soon - // as possible. - // - // Constraints: This parameter must be set to true when specifying a value for - // the EngineVersion parameter that is a different major version than the DB - // instance's current version. - AllowMajorVersionUpgrade *bool `type:"boolean"` - - // Specifies whether the modifications in this request and any pending modifications - // are asynchronously applied as soon as possible, regardless of the PreferredMaintenanceWindow - // setting for the DB instance. - // - // If this parameter is set to false, changes to the DB instance are applied - // during the next maintenance window. Some parameter changes can cause an outage - // and are applied on the next call to RebootDBInstance, or the next failure - // reboot. - // - // Default: false - ApplyImmediately *bool `type:"boolean"` - - // Indicates that minor version upgrades are applied automatically to the DB - // instance during the maintenance window. Changing this parameter doesn't result - // in an outage except in the following case and the change is asynchronously - // applied as soon as possible. An outage will result if this parameter is set - // to true during the maintenance window, and a newer minor version is available, - // and Neptune has enabled auto patching for that engine version. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The number of days to retain automated backups. Setting this parameter to - // a positive number enables backups. Setting this parameter to 0 disables automated - // backups. - // - // Not applicable. The retention period for automated backups is managed by - // the DB cluster. For more information, see ModifyDBCluster. - // - // Default: Uses existing setting - BackupRetentionPeriod *int64 `type:"integer"` - - // Indicates the certificate that needs to be associated with the instance. - CACertificateIdentifier *string `type:"string"` - - // The configuration setting for the log types to be enabled for export to CloudWatch - // Logs for a specific DB instance or DB cluster. - CloudwatchLogsExportConfiguration *CloudwatchLogsExportConfiguration `type:"structure"` - - // True to copy all tags from the DB instance to snapshots of the DB instance, - // and otherwise false. The default is false. - CopyTagsToSnapshot *bool `type:"boolean"` - - // The new compute and memory capacity of the DB instance, for example, db.m4.large. - // Not all DB instance classes are available in all AWS Regions. - // - // If you modify the DB instance class, an outage occurs during the change. - // The change is applied during the next maintenance window, unless ApplyImmediately - // is specified as true for this request. - // - // Default: Uses existing setting - DBInstanceClass *string `type:"string"` - - // The DB instance identifier. This value is stored as a lowercase string. - // - // Constraints: - // - // * Must match the identifier of an existing DBInstance. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The name of the DB parameter group to apply to the DB instance. Changing - // this setting doesn't result in an outage. The parameter group name itself - // is changed immediately, but the actual parameter changes are not applied - // until you reboot the instance without failover. The db instance will NOT - // be rebooted automatically and the parameter changes will NOT be applied during - // the next maintenance window. - // - // Default: Uses existing setting - // - // Constraints: The DB parameter group must be in the same DB parameter group - // family as this DB instance. - DBParameterGroupName *string `type:"string"` - - // The port number on which the database accepts connections. - // - // The value of the DBPortNumber parameter must not match any of the port values - // specified for options in the option group for the DB instance. - // - // Your database will restart when you change the DBPortNumber value regardless - // of the value of the ApplyImmediately parameter. - // - // Default: 8182 - DBPortNumber *int64 `type:"integer"` - - // A list of DB security groups to authorize on this DB instance. Changing this - // setting doesn't result in an outage and the change is asynchronously applied - // as soon as possible. - // - // Constraints: - // - // * If supplied, must match existing DBSecurityGroups. - DBSecurityGroups []*string `locationNameList:"DBSecurityGroupName" type:"list"` - - // The new DB subnet group for the DB instance. You can use this parameter to - // move your DB instance to a different VPC. - // - // Changing the subnet group causes an outage during the change. The change - // is applied during the next maintenance window, unless you specify true for - // the ApplyImmediately parameter. - // - // Constraints: If supplied, must match the name of an existing DBSubnetGroup. - // - // Example: mySubnetGroup - DBSubnetGroupName *string `type:"string"` - - // Not supported. - Domain *string `type:"string"` - - // Not supported - DomainIAMRoleName *string `type:"string"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // You can enable IAM database authentication for the following database engines - // - // Not applicable. Mapping AWS IAM accounts to database accounts is managed - // by the DB cluster. For more information, see ModifyDBCluster. - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // True to enable Performance Insights for the DB instance, and otherwise false. - EnablePerformanceInsights *bool `type:"boolean"` - - // The version number of the database engine to upgrade to. Changing this parameter - // results in an outage and the change is applied during the next maintenance - // window unless the ApplyImmediately parameter is set to true for this request. - // - // For major version upgrades, if a nondefault DB parameter group is currently - // in use, a new DB parameter group in the DB parameter group family for the - // new engine version must be specified. The new DB parameter group can be the - // default for that DB parameter group family. - EngineVersion *string `type:"string"` - - // The new Provisioned IOPS (I/O operations per second) value for the instance. - // - // Changing this setting doesn't result in an outage and the change is applied - // during the next maintenance window unless the ApplyImmediately parameter - // is set to true for this request. - // - // Default: Uses existing setting - Iops *int64 `type:"integer"` - - // The license model for the DB instance. - // - // Valid values: license-included | bring-your-own-license | general-public-license - LicenseModel *string `type:"string"` - - // The new password for the master user. The password can include any printable - // ASCII character except "/", """, or "@". - // - // Not applicable. - // - // Default: Uses existing setting - MasterUserPassword *string `type:"string"` - - // The interval, in seconds, between points when Enhanced Monitoring metrics - // are collected for the DB instance. To disable collecting Enhanced Monitoring - // metrics, specify 0. The default is 0. - // - // If MonitoringRoleArn is specified, then you must also set MonitoringInterval - // to a value other than 0. - // - // Valid Values: 0, 1, 5, 10, 15, 30, 60 - MonitoringInterval *int64 `type:"integer"` - - // The ARN for the IAM role that permits Neptune to send enhanced monitoring - // metrics to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. - // - // If MonitoringInterval is set to a value other than 0, then you must supply - // a MonitoringRoleArn value. - MonitoringRoleArn *string `type:"string"` - - // Specifies if the DB instance is a Multi-AZ deployment. Changing this parameter - // doesn't result in an outage and the change is applied during the next maintenance - // window unless the ApplyImmediately parameter is set to true for this request. - MultiAZ *bool `type:"boolean"` - - // The new DB instance identifier for the DB instance when renaming a DB instance. - // When you change the DB instance identifier, an instance reboot will occur - // immediately if you set Apply Immediately to true, or will occur during the - // next maintenance window if Apply Immediately to false. This value is stored - // as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * The first character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: mydbinstance - NewDBInstanceIdentifier *string `type:"string"` - - // Indicates that the DB instance should be associated with the specified option - // group. Changing this parameter doesn't result in an outage except in the - // following case and the change is applied during the next maintenance window - // unless the ApplyImmediately parameter is set to true for this request. If - // the parameter change results in an option group that enables OEM, this change - // can cause a brief (sub-second) period during which new connections are rejected - // but existing connections are not interrupted. - // - // Permanent options, such as the TDE option for Oracle Advanced Security TDE, - // can't be removed from an option group, and that option group can't be removed - // from a DB instance once it is associated with a DB instance - OptionGroupName *string `type:"string"` - - // The AWS KMS key identifier for encryption of Performance Insights data. The - // KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the - // KMS key alias for the KMS encryption key. - PerformanceInsightsKMSKeyId *string `type:"string"` - - // The daily time range during which automated backups are created if automated - // backups are enabled. - // - // Not applicable. The daily time range for creating automated backups is managed - // by the DB cluster. For more information, see ModifyDBCluster. - // - // Constraints: - // - // * Must be in the format hh24:mi-hh24:mi - // - // * Must be in Universal Time Coordinated (UTC) - // - // * Must not conflict with the preferred maintenance window - // - // * Must be at least 30 minutes - PreferredBackupWindow *string `type:"string"` - - // The weekly time range (in UTC) during which system maintenance can occur, - // which might result in an outage. Changing this parameter doesn't result in - // an outage, except in the following situation, and the change is asynchronously - // applied as soon as possible. If there are pending actions that cause a reboot, - // and the maintenance window is changed to include the current time, then changing - // this parameter will cause a reboot of the DB instance. If moving this window - // to the current time, there must be at least 30 minutes between the current - // time and end of the window to ensure pending changes are applied. - // - // Default: Uses existing setting - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun - // - // Constraints: Must be at least 30 minutes - PreferredMaintenanceWindow *string `type:"string"` - - // A value that specifies the order in which a Read Replica is promoted to the - // primary instance after a failure of the existing primary instance. - // - // Default: 1 - // - // Valid Values: 0 - 15 - PromotionTier *int64 `type:"integer"` - - // This parameter is not supported. - // - // Deprecated: PubliclyAccessible has been deprecated - PubliclyAccessible *bool `deprecated:"true" type:"boolean"` - - // Specifies the storage type to be associated with the DB instance. - // - // If you specify Provisioned IOPS (io1), you must also include a value for - // the Iops parameter. - // - // If you choose to migrate your DB instance from using standard storage to - // using Provisioned IOPS, or from using Provisioned IOPS to using standard - // storage, the process can take time. The duration of the migration depends - // on several factors such as database load, storage size, storage type (standard - // or Provisioned IOPS), amount of IOPS provisioned (if any), and the number - // of prior scale storage operations. Typical migration times are under 24 hours, - // but the process can take up to several days in some cases. During the migration, - // the DB instance is available for use, but might experience performance degradation. - // While the migration takes place, nightly backups for the instance are suspended. - // No other Amazon Neptune operations can take place for the instance, including - // modifying the instance, rebooting the instance, deleting the instance, creating - // a Read Replica for the instance, and creating a DB snapshot of the instance. - // - // Valid values: standard | gp2 | io1 - // - // Default: io1 if the Iops parameter is specified, otherwise standard - StorageType *string `type:"string"` - - // The ARN from the key store with which to associate the instance for TDE encryption. - TdeCredentialArn *string `type:"string"` - - // The password for the given ARN from the key store in order to access the - // device. - TdeCredentialPassword *string `type:"string"` - - // A list of EC2 VPC security groups to authorize on this DB instance. This - // change is asynchronously applied as soon as possible. - // - // Not applicable. The associated list of EC2 VPC security groups is managed - // by the DB cluster. For more information, see ModifyDBCluster. - // - // Constraints: - // - // * If supplied, must match existing VpcSecurityGroupIds. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s ModifyDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBInstanceInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *ModifyDBInstanceInput) SetAllocatedStorage(v int64) *ModifyDBInstanceInput { - s.AllocatedStorage = &v - return s -} - -// SetAllowMajorVersionUpgrade sets the AllowMajorVersionUpgrade field's value. -func (s *ModifyDBInstanceInput) SetAllowMajorVersionUpgrade(v bool) *ModifyDBInstanceInput { - s.AllowMajorVersionUpgrade = &v - return s -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *ModifyDBInstanceInput) SetApplyImmediately(v bool) *ModifyDBInstanceInput { - s.ApplyImmediately = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *ModifyDBInstanceInput) SetAutoMinorVersionUpgrade(v bool) *ModifyDBInstanceInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *ModifyDBInstanceInput) SetBackupRetentionPeriod(v int64) *ModifyDBInstanceInput { - s.BackupRetentionPeriod = &v - return s -} - -// SetCACertificateIdentifier sets the CACertificateIdentifier field's value. -func (s *ModifyDBInstanceInput) SetCACertificateIdentifier(v string) *ModifyDBInstanceInput { - s.CACertificateIdentifier = &v - return s -} - -// SetCloudwatchLogsExportConfiguration sets the CloudwatchLogsExportConfiguration field's value. -func (s *ModifyDBInstanceInput) SetCloudwatchLogsExportConfiguration(v *CloudwatchLogsExportConfiguration) *ModifyDBInstanceInput { - s.CloudwatchLogsExportConfiguration = v - return s -} - -// SetCopyTagsToSnapshot sets the CopyTagsToSnapshot field's value. -func (s *ModifyDBInstanceInput) SetCopyTagsToSnapshot(v bool) *ModifyDBInstanceInput { - s.CopyTagsToSnapshot = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *ModifyDBInstanceInput) SetDBInstanceClass(v string) *ModifyDBInstanceInput { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *ModifyDBInstanceInput) SetDBInstanceIdentifier(v string) *ModifyDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *ModifyDBInstanceInput) SetDBParameterGroupName(v string) *ModifyDBInstanceInput { - s.DBParameterGroupName = &v - return s -} - -// SetDBPortNumber sets the DBPortNumber field's value. -func (s *ModifyDBInstanceInput) SetDBPortNumber(v int64) *ModifyDBInstanceInput { - s.DBPortNumber = &v - return s -} - -// SetDBSecurityGroups sets the DBSecurityGroups field's value. -func (s *ModifyDBInstanceInput) SetDBSecurityGroups(v []*string) *ModifyDBInstanceInput { - s.DBSecurityGroups = v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *ModifyDBInstanceInput) SetDBSubnetGroupName(v string) *ModifyDBInstanceInput { - s.DBSubnetGroupName = &v - return s -} - -// SetDomain sets the Domain field's value. -func (s *ModifyDBInstanceInput) SetDomain(v string) *ModifyDBInstanceInput { - s.Domain = &v - return s -} - -// SetDomainIAMRoleName sets the DomainIAMRoleName field's value. -func (s *ModifyDBInstanceInput) SetDomainIAMRoleName(v string) *ModifyDBInstanceInput { - s.DomainIAMRoleName = &v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *ModifyDBInstanceInput) SetEnableIAMDatabaseAuthentication(v bool) *ModifyDBInstanceInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEnablePerformanceInsights sets the EnablePerformanceInsights field's value. -func (s *ModifyDBInstanceInput) SetEnablePerformanceInsights(v bool) *ModifyDBInstanceInput { - s.EnablePerformanceInsights = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *ModifyDBInstanceInput) SetEngineVersion(v string) *ModifyDBInstanceInput { - s.EngineVersion = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *ModifyDBInstanceInput) SetIops(v int64) *ModifyDBInstanceInput { - s.Iops = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *ModifyDBInstanceInput) SetLicenseModel(v string) *ModifyDBInstanceInput { - s.LicenseModel = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *ModifyDBInstanceInput) SetMasterUserPassword(v string) *ModifyDBInstanceInput { - s.MasterUserPassword = &v - return s -} - -// SetMonitoringInterval sets the MonitoringInterval field's value. -func (s *ModifyDBInstanceInput) SetMonitoringInterval(v int64) *ModifyDBInstanceInput { - s.MonitoringInterval = &v - return s -} - -// SetMonitoringRoleArn sets the MonitoringRoleArn field's value. -func (s *ModifyDBInstanceInput) SetMonitoringRoleArn(v string) *ModifyDBInstanceInput { - s.MonitoringRoleArn = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *ModifyDBInstanceInput) SetMultiAZ(v bool) *ModifyDBInstanceInput { - s.MultiAZ = &v - return s -} - -// SetNewDBInstanceIdentifier sets the NewDBInstanceIdentifier field's value. -func (s *ModifyDBInstanceInput) SetNewDBInstanceIdentifier(v string) *ModifyDBInstanceInput { - s.NewDBInstanceIdentifier = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *ModifyDBInstanceInput) SetOptionGroupName(v string) *ModifyDBInstanceInput { - s.OptionGroupName = &v - return s -} - -// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. -func (s *ModifyDBInstanceInput) SetPerformanceInsightsKMSKeyId(v string) *ModifyDBInstanceInput { - s.PerformanceInsightsKMSKeyId = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *ModifyDBInstanceInput) SetPreferredBackupWindow(v string) *ModifyDBInstanceInput { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *ModifyDBInstanceInput) SetPreferredMaintenanceWindow(v string) *ModifyDBInstanceInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPromotionTier sets the PromotionTier field's value. -func (s *ModifyDBInstanceInput) SetPromotionTier(v int64) *ModifyDBInstanceInput { - s.PromotionTier = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *ModifyDBInstanceInput) SetPubliclyAccessible(v bool) *ModifyDBInstanceInput { - s.PubliclyAccessible = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *ModifyDBInstanceInput) SetStorageType(v string) *ModifyDBInstanceInput { - s.StorageType = &v - return s -} - -// SetTdeCredentialArn sets the TdeCredentialArn field's value. -func (s *ModifyDBInstanceInput) SetTdeCredentialArn(v string) *ModifyDBInstanceInput { - s.TdeCredentialArn = &v - return s -} - -// SetTdeCredentialPassword sets the TdeCredentialPassword field's value. -func (s *ModifyDBInstanceInput) SetTdeCredentialPassword(v string) *ModifyDBInstanceInput { - s.TdeCredentialPassword = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *ModifyDBInstanceInput) SetVpcSecurityGroupIds(v []*string) *ModifyDBInstanceInput { - s.VpcSecurityGroupIds = v - return s -} - -type ModifyDBInstanceOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s ModifyDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBInstanceOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *ModifyDBInstanceOutput) SetDBInstance(v *DBInstance) *ModifyDBInstanceOutput { - s.DBInstance = v - return s -} - -type ModifyDBParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB parameter group. - // - // Constraints: - // - // * If supplied, must match the name of an existing DBParameterGroup. - // - // DBParameterGroupName is a required field - DBParameterGroupName *string `type:"string" required:"true"` - - // An array of parameter names, values, and the apply method for the parameter - // update. At least one parameter name, value, and apply method must be supplied; - // subsequent arguments are optional. A maximum of 20 parameters can be modified - // in a single request. - // - // Valid Values (for the application method): immediate | pending-reboot - // - // You can use the immediate value with dynamic parameters only. You can use - // the pending-reboot value for both dynamic and static parameters, and changes - // are applied when you reboot the DB instance without failover. - // - // Parameters is a required field - Parameters []*Parameter `locationNameList:"Parameter" type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyDBParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBParameterGroupInput"} - if s.DBParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) - } - if s.Parameters == nil { - invalidParams.Add(request.NewErrParamRequired("Parameters")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *ModifyDBParameterGroupInput) SetDBParameterGroupName(v string) *ModifyDBParameterGroupInput { - s.DBParameterGroupName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ModifyDBParameterGroupInput) SetParameters(v []*Parameter) *ModifyDBParameterGroupInput { - s.Parameters = v - return s -} - -type ModifyDBSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The description for the DB subnet group. - DBSubnetGroupDescription *string `type:"string"` - - // The name for the DB subnet group. This value is stored as a lowercase string. - // You can't modify the default subnet group. - // - // Constraints: Must match the name of an existing DBSubnetGroup. Must not be - // default. - // - // Example: mySubnetgroup - // - // DBSubnetGroupName is a required field - DBSubnetGroupName *string `type:"string" required:"true"` - - // The EC2 subnet IDs for the DB subnet group. - // - // SubnetIds is a required field - SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyDBSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBSubnetGroupInput"} - if s.DBSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. -func (s *ModifyDBSubnetGroupInput) SetDBSubnetGroupDescription(v string) *ModifyDBSubnetGroupInput { - s.DBSubnetGroupDescription = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *ModifyDBSubnetGroupInput) SetDBSubnetGroupName(v string) *ModifyDBSubnetGroupInput { - s.DBSubnetGroupName = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *ModifyDBSubnetGroupInput) SetSubnetIds(v []*string) *ModifyDBSubnetGroupInput { - s.SubnetIds = v - return s -} - -type ModifyDBSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB subnet group. - // - // This data type is used as a response element in the DescribeDBSubnetGroups - // action. - DBSubnetGroup *DBSubnetGroup `type:"structure"` -} - -// String returns the string representation -func (s ModifyDBSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetDBSubnetGroup sets the DBSubnetGroup field's value. -func (s *ModifyDBSubnetGroupOutput) SetDBSubnetGroup(v *DBSubnetGroup) *ModifyDBSubnetGroupOutput { - s.DBSubnetGroup = v - return s -} - -type ModifyEventSubscriptionInput struct { - _ struct{} `type:"structure"` - - // A Boolean value; set to true to activate the subscription. - Enabled *bool `type:"boolean"` - - // A list of event categories for a SourceType that you want to subscribe to. - // You can see a list of the categories for a given SourceType by using the - // DescribeEventCategories action. - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // The Amazon Resource Name (ARN) of the SNS topic created for event notification. - // The ARN is created by Amazon SNS when you create a topic and subscribe to - // it. - SnsTopicArn *string `type:"string"` - - // The type of source that is generating the events. For example, if you want - // to be notified of events generated by a DB instance, you would set this parameter - // to db-instance. if this value is not specified, all events are returned. - // - // Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot - SourceType *string `type:"string"` - - // The name of the event notification subscription. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyEventSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyEventSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyEventSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyEventSubscriptionInput"} - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *ModifyEventSubscriptionInput) SetEnabled(v bool) *ModifyEventSubscriptionInput { - s.Enabled = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *ModifyEventSubscriptionInput) SetEventCategories(v []*string) *ModifyEventSubscriptionInput { - s.EventCategories = v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *ModifyEventSubscriptionInput) SetSnsTopicArn(v string) *ModifyEventSubscriptionInput { - s.SnsTopicArn = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *ModifyEventSubscriptionInput) SetSourceType(v string) *ModifyEventSubscriptionInput { - s.SourceType = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *ModifyEventSubscriptionInput) SetSubscriptionName(v string) *ModifyEventSubscriptionInput { - s.SubscriptionName = &v - return s -} - -type ModifyEventSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful invocation of the DescribeEventSubscriptions - // action. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s ModifyEventSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyEventSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *ModifyEventSubscriptionOutput) SetEventSubscription(v *EventSubscription) *ModifyEventSubscriptionOutput { - s.EventSubscription = v - return s -} - -// Provides information on the option groups the DB instance is a member of. -type OptionGroupMembership struct { - _ struct{} `type:"structure"` - - // The name of the option group that the instance belongs to. - OptionGroupName *string `type:"string"` - - // The status of the DB instance's option group membership. Valid values are: - // in-sync, pending-apply, pending-removal, pending-maintenance-apply, pending-maintenance-removal, - // applying, removing, and failed. - Status *string `type:"string"` -} - -// String returns the string representation -func (s OptionGroupMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OptionGroupMembership) GoString() string { - return s.String() -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *OptionGroupMembership) SetOptionGroupName(v string) *OptionGroupMembership { - s.OptionGroupName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *OptionGroupMembership) SetStatus(v string) *OptionGroupMembership { - s.Status = &v - return s -} - -// Contains a list of available options for a DB instance. -// -// This data type is used as a response element in the DescribeOrderableDBInstanceOptions -// action. -type OrderableDBInstanceOption struct { - _ struct{} `type:"structure"` - - // A list of Availability Zones for a DB instance. - AvailabilityZones []*AvailabilityZone `locationNameList:"AvailabilityZone" type:"list"` - - // The DB instance class for a DB instance. - DBInstanceClass *string `type:"string"` - - // The engine type of a DB instance. - Engine *string `type:"string"` - - // The engine version of a DB instance. - EngineVersion *string `type:"string"` - - // The license model for a DB instance. - LicenseModel *string `type:"string"` - - // Maximum total provisioned IOPS for a DB instance. - MaxIopsPerDbInstance *int64 `type:"integer"` - - // Maximum provisioned IOPS per GiB for a DB instance. - MaxIopsPerGib *float64 `type:"double"` - - // Maximum storage size for a DB instance. - MaxStorageSize *int64 `type:"integer"` - - // Minimum total provisioned IOPS for a DB instance. - MinIopsPerDbInstance *int64 `type:"integer"` - - // Minimum provisioned IOPS per GiB for a DB instance. - MinIopsPerGib *float64 `type:"double"` - - // Minimum storage size for a DB instance. - MinStorageSize *int64 `type:"integer"` - - // Indicates whether a DB instance is Multi-AZ capable. - MultiAZCapable *bool `type:"boolean"` - - // Indicates whether a DB instance can have a Read Replica. - ReadReplicaCapable *bool `type:"boolean"` - - // Indicates the storage type for a DB instance. - StorageType *string `type:"string"` - - // Indicates whether a DB instance supports Enhanced Monitoring at intervals - // from 1 to 60 seconds. - SupportsEnhancedMonitoring *bool `type:"boolean"` - - // Indicates whether a DB instance supports IAM database authentication. - SupportsIAMDatabaseAuthentication *bool `type:"boolean"` - - // Indicates whether a DB instance supports provisioned IOPS. - SupportsIops *bool `type:"boolean"` - - // True if a DB instance supports Performance Insights, otherwise false. - SupportsPerformanceInsights *bool `type:"boolean"` - - // Indicates whether a DB instance supports encrypted storage. - SupportsStorageEncryption *bool `type:"boolean"` - - // Indicates whether a DB instance is in a VPC. - Vpc *bool `type:"boolean"` -} - -// String returns the string representation -func (s OrderableDBInstanceOption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OrderableDBInstanceOption) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *OrderableDBInstanceOption) SetAvailabilityZones(v []*AvailabilityZone) *OrderableDBInstanceOption { - s.AvailabilityZones = v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *OrderableDBInstanceOption) SetDBInstanceClass(v string) *OrderableDBInstanceOption { - s.DBInstanceClass = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *OrderableDBInstanceOption) SetEngine(v string) *OrderableDBInstanceOption { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *OrderableDBInstanceOption) SetEngineVersion(v string) *OrderableDBInstanceOption { - s.EngineVersion = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *OrderableDBInstanceOption) SetLicenseModel(v string) *OrderableDBInstanceOption { - s.LicenseModel = &v - return s -} - -// SetMaxIopsPerDbInstance sets the MaxIopsPerDbInstance field's value. -func (s *OrderableDBInstanceOption) SetMaxIopsPerDbInstance(v int64) *OrderableDBInstanceOption { - s.MaxIopsPerDbInstance = &v - return s -} - -// SetMaxIopsPerGib sets the MaxIopsPerGib field's value. -func (s *OrderableDBInstanceOption) SetMaxIopsPerGib(v float64) *OrderableDBInstanceOption { - s.MaxIopsPerGib = &v - return s -} - -// SetMaxStorageSize sets the MaxStorageSize field's value. -func (s *OrderableDBInstanceOption) SetMaxStorageSize(v int64) *OrderableDBInstanceOption { - s.MaxStorageSize = &v - return s -} - -// SetMinIopsPerDbInstance sets the MinIopsPerDbInstance field's value. -func (s *OrderableDBInstanceOption) SetMinIopsPerDbInstance(v int64) *OrderableDBInstanceOption { - s.MinIopsPerDbInstance = &v - return s -} - -// SetMinIopsPerGib sets the MinIopsPerGib field's value. -func (s *OrderableDBInstanceOption) SetMinIopsPerGib(v float64) *OrderableDBInstanceOption { - s.MinIopsPerGib = &v - return s -} - -// SetMinStorageSize sets the MinStorageSize field's value. -func (s *OrderableDBInstanceOption) SetMinStorageSize(v int64) *OrderableDBInstanceOption { - s.MinStorageSize = &v - return s -} - -// SetMultiAZCapable sets the MultiAZCapable field's value. -func (s *OrderableDBInstanceOption) SetMultiAZCapable(v bool) *OrderableDBInstanceOption { - s.MultiAZCapable = &v - return s -} - -// SetReadReplicaCapable sets the ReadReplicaCapable field's value. -func (s *OrderableDBInstanceOption) SetReadReplicaCapable(v bool) *OrderableDBInstanceOption { - s.ReadReplicaCapable = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *OrderableDBInstanceOption) SetStorageType(v string) *OrderableDBInstanceOption { - s.StorageType = &v - return s -} - -// SetSupportsEnhancedMonitoring sets the SupportsEnhancedMonitoring field's value. -func (s *OrderableDBInstanceOption) SetSupportsEnhancedMonitoring(v bool) *OrderableDBInstanceOption { - s.SupportsEnhancedMonitoring = &v - return s -} - -// SetSupportsIAMDatabaseAuthentication sets the SupportsIAMDatabaseAuthentication field's value. -func (s *OrderableDBInstanceOption) SetSupportsIAMDatabaseAuthentication(v bool) *OrderableDBInstanceOption { - s.SupportsIAMDatabaseAuthentication = &v - return s -} - -// SetSupportsIops sets the SupportsIops field's value. -func (s *OrderableDBInstanceOption) SetSupportsIops(v bool) *OrderableDBInstanceOption { - s.SupportsIops = &v - return s -} - -// SetSupportsPerformanceInsights sets the SupportsPerformanceInsights field's value. -func (s *OrderableDBInstanceOption) SetSupportsPerformanceInsights(v bool) *OrderableDBInstanceOption { - s.SupportsPerformanceInsights = &v - return s -} - -// SetSupportsStorageEncryption sets the SupportsStorageEncryption field's value. -func (s *OrderableDBInstanceOption) SetSupportsStorageEncryption(v bool) *OrderableDBInstanceOption { - s.SupportsStorageEncryption = &v - return s -} - -// SetVpc sets the Vpc field's value. -func (s *OrderableDBInstanceOption) SetVpc(v bool) *OrderableDBInstanceOption { - s.Vpc = &v - return s -} - -// This data type is used as a request parameter in the ModifyDBParameterGroup -// and ResetDBParameterGroup actions. -// -// This data type is used as a response element in the DescribeEngineDefaultParameters -// and DescribeDBParameters actions. -type Parameter struct { - _ struct{} `type:"structure"` - - // Specifies the valid range of values for the parameter. - AllowedValues *string `type:"string"` - - // Indicates when to apply parameter updates. - ApplyMethod *string `type:"string" enum:"ApplyMethod"` - - // Specifies the engine specific parameters type. - ApplyType *string `type:"string"` - - // Specifies the valid data type for the parameter. - DataType *string `type:"string"` - - // Provides a description of the parameter. - Description *string `type:"string"` - - // Indicates whether (true) or not (false) the parameter can be modified. Some - // parameters have security or operational implications that prevent them from - // being changed. - IsModifiable *bool `type:"boolean"` - - // The earliest engine version to which the parameter can apply. - MinimumEngineVersion *string `type:"string"` - - // Specifies the name of the parameter. - ParameterName *string `type:"string"` - - // Specifies the value of the parameter. - ParameterValue *string `type:"string"` - - // Indicates the source of the parameter value. - Source *string `type:"string"` -} - -// String returns the string representation -func (s Parameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Parameter) GoString() string { - return s.String() -} - -// SetAllowedValues sets the AllowedValues field's value. -func (s *Parameter) SetAllowedValues(v string) *Parameter { - s.AllowedValues = &v - return s -} - -// SetApplyMethod sets the ApplyMethod field's value. -func (s *Parameter) SetApplyMethod(v string) *Parameter { - s.ApplyMethod = &v - return s -} - -// SetApplyType sets the ApplyType field's value. -func (s *Parameter) SetApplyType(v string) *Parameter { - s.ApplyType = &v - return s -} - -// SetDataType sets the DataType field's value. -func (s *Parameter) SetDataType(v string) *Parameter { - s.DataType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Parameter) SetDescription(v string) *Parameter { - s.Description = &v - return s -} - -// SetIsModifiable sets the IsModifiable field's value. -func (s *Parameter) SetIsModifiable(v bool) *Parameter { - s.IsModifiable = &v - return s -} - -// SetMinimumEngineVersion sets the MinimumEngineVersion field's value. -func (s *Parameter) SetMinimumEngineVersion(v string) *Parameter { - s.MinimumEngineVersion = &v - return s -} - -// SetParameterName sets the ParameterName field's value. -func (s *Parameter) SetParameterName(v string) *Parameter { - s.ParameterName = &v - return s -} - -// SetParameterValue sets the ParameterValue field's value. -func (s *Parameter) SetParameterValue(v string) *Parameter { - s.ParameterValue = &v - return s -} - -// SetSource sets the Source field's value. -func (s *Parameter) SetSource(v string) *Parameter { - s.Source = &v - return s -} - -// A list of the log types whose configuration is still pending. In other words, -// these log types are in the process of being activated or deactivated. -type PendingCloudwatchLogsExports struct { - _ struct{} `type:"structure"` - - // Log types that are in the process of being enabled. After they are enabled, - // these log types are exported to CloudWatch Logs. - LogTypesToDisable []*string `type:"list"` - - // Log types that are in the process of being deactivated. After they are deactivated, - // these log types aren't exported to CloudWatch Logs. - LogTypesToEnable []*string `type:"list"` -} - -// String returns the string representation -func (s PendingCloudwatchLogsExports) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingCloudwatchLogsExports) GoString() string { - return s.String() -} - -// SetLogTypesToDisable sets the LogTypesToDisable field's value. -func (s *PendingCloudwatchLogsExports) SetLogTypesToDisable(v []*string) *PendingCloudwatchLogsExports { - s.LogTypesToDisable = v - return s -} - -// SetLogTypesToEnable sets the LogTypesToEnable field's value. -func (s *PendingCloudwatchLogsExports) SetLogTypesToEnable(v []*string) *PendingCloudwatchLogsExports { - s.LogTypesToEnable = v - return s -} - -// Provides information about a pending maintenance action for a resource. -type PendingMaintenanceAction struct { - _ struct{} `type:"structure"` - - // The type of pending maintenance action that is available for the resource. - Action *string `type:"string"` - - // The date of the maintenance window when the action is applied. The maintenance - // action is applied to the resource during its first maintenance window after - // this date. If this date is specified, any next-maintenance opt-in requests - // are ignored. - AutoAppliedAfterDate *time.Time `type:"timestamp"` - - // The effective date when the pending maintenance action is applied to the - // resource. This date takes into account opt-in requests received from the - // ApplyPendingMaintenanceAction API, the AutoAppliedAfterDate, and the ForcedApplyDate. - // This value is blank if an opt-in request has not been received and nothing - // has been specified as AutoAppliedAfterDate or ForcedApplyDate. - CurrentApplyDate *time.Time `type:"timestamp"` - - // A description providing more detail about the maintenance action. - Description *string `type:"string"` - - // The date when the maintenance action is automatically applied. The maintenance - // action is applied to the resource on this date regardless of the maintenance - // window for the resource. If this date is specified, any immediate opt-in - // requests are ignored. - ForcedApplyDate *time.Time `type:"timestamp"` - - // Indicates the type of opt-in request that has been received for the resource. - OptInStatus *string `type:"string"` -} - -// String returns the string representation -func (s PendingMaintenanceAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingMaintenanceAction) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *PendingMaintenanceAction) SetAction(v string) *PendingMaintenanceAction { - s.Action = &v - return s -} - -// SetAutoAppliedAfterDate sets the AutoAppliedAfterDate field's value. -func (s *PendingMaintenanceAction) SetAutoAppliedAfterDate(v time.Time) *PendingMaintenanceAction { - s.AutoAppliedAfterDate = &v - return s -} - -// SetCurrentApplyDate sets the CurrentApplyDate field's value. -func (s *PendingMaintenanceAction) SetCurrentApplyDate(v time.Time) *PendingMaintenanceAction { - s.CurrentApplyDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PendingMaintenanceAction) SetDescription(v string) *PendingMaintenanceAction { - s.Description = &v - return s -} - -// SetForcedApplyDate sets the ForcedApplyDate field's value. -func (s *PendingMaintenanceAction) SetForcedApplyDate(v time.Time) *PendingMaintenanceAction { - s.ForcedApplyDate = &v - return s -} - -// SetOptInStatus sets the OptInStatus field's value. -func (s *PendingMaintenanceAction) SetOptInStatus(v string) *PendingMaintenanceAction { - s.OptInStatus = &v - return s -} - -// This data type is used as a response element in the ModifyDBInstance action. -type PendingModifiedValues struct { - _ struct{} `type:"structure"` - - // Contains the new AllocatedStorage size for the DB instance that will be applied - // or is currently being applied. - AllocatedStorage *int64 `type:"integer"` - - // Specifies the pending number of days for which automated backups are retained. - BackupRetentionPeriod *int64 `type:"integer"` - - // Specifies the identifier of the CA certificate for the DB instance. - CACertificateIdentifier *string `type:"string"` - - // Contains the new DBInstanceClass for the DB instance that will be applied - // or is currently being applied. - DBInstanceClass *string `type:"string"` - - // Contains the new DBInstanceIdentifier for the DB instance that will be applied - // or is currently being applied. - DBInstanceIdentifier *string `type:"string"` - - // The new DB subnet group for the DB instance. - DBSubnetGroupName *string `type:"string"` - - // Indicates the database engine version. - EngineVersion *string `type:"string"` - - // Specifies the new Provisioned IOPS value for the DB instance that will be - // applied or is currently being applied. - Iops *int64 `type:"integer"` - - // The license model for the DB instance. - // - // Valid values: license-included | bring-your-own-license | general-public-license - LicenseModel *string `type:"string"` - - // Contains the pending or currently-in-progress change of the master credentials - // for the DB instance. - MasterUserPassword *string `type:"string"` - - // Indicates that the Single-AZ DB instance is to change to a Multi-AZ deployment. - MultiAZ *bool `type:"boolean"` - - // A list of the log types whose configuration is still pending. In other words, - // these log types are in the process of being activated or deactivated. - PendingCloudwatchLogsExports *PendingCloudwatchLogsExports `type:"structure"` - - // Specifies the pending port for the DB instance. - Port *int64 `type:"integer"` - - // Specifies the storage type to be associated with the DB instance. - StorageType *string `type:"string"` -} - -// String returns the string representation -func (s PendingModifiedValues) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingModifiedValues) GoString() string { - return s.String() -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *PendingModifiedValues) SetAllocatedStorage(v int64) *PendingModifiedValues { - s.AllocatedStorage = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *PendingModifiedValues) SetBackupRetentionPeriod(v int64) *PendingModifiedValues { - s.BackupRetentionPeriod = &v - return s -} - -// SetCACertificateIdentifier sets the CACertificateIdentifier field's value. -func (s *PendingModifiedValues) SetCACertificateIdentifier(v string) *PendingModifiedValues { - s.CACertificateIdentifier = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *PendingModifiedValues) SetDBInstanceClass(v string) *PendingModifiedValues { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *PendingModifiedValues) SetDBInstanceIdentifier(v string) *PendingModifiedValues { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *PendingModifiedValues) SetDBSubnetGroupName(v string) *PendingModifiedValues { - s.DBSubnetGroupName = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *PendingModifiedValues) SetEngineVersion(v string) *PendingModifiedValues { - s.EngineVersion = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *PendingModifiedValues) SetIops(v int64) *PendingModifiedValues { - s.Iops = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *PendingModifiedValues) SetLicenseModel(v string) *PendingModifiedValues { - s.LicenseModel = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *PendingModifiedValues) SetMasterUserPassword(v string) *PendingModifiedValues { - s.MasterUserPassword = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *PendingModifiedValues) SetMultiAZ(v bool) *PendingModifiedValues { - s.MultiAZ = &v - return s -} - -// SetPendingCloudwatchLogsExports sets the PendingCloudwatchLogsExports field's value. -func (s *PendingModifiedValues) SetPendingCloudwatchLogsExports(v *PendingCloudwatchLogsExports) *PendingModifiedValues { - s.PendingCloudwatchLogsExports = v - return s -} - -// SetPort sets the Port field's value. -func (s *PendingModifiedValues) SetPort(v int64) *PendingModifiedValues { - s.Port = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *PendingModifiedValues) SetStorageType(v string) *PendingModifiedValues { - s.StorageType = &v - return s -} - -type PromoteReadReplicaDBClusterInput struct { - _ struct{} `type:"structure"` - - // The identifier of the DB cluster Read Replica to promote. This parameter - // is not case-sensitive. - // - // Constraints: - // - // * Must match the identifier of an existing DBCluster Read Replica. - // - // Example: my-cluster-replica1 - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PromoteReadReplicaDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PromoteReadReplicaDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PromoteReadReplicaDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PromoteReadReplicaDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *PromoteReadReplicaDBClusterInput) SetDBClusterIdentifier(v string) *PromoteReadReplicaDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -type PromoteReadReplicaDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters action. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s PromoteReadReplicaDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PromoteReadReplicaDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *PromoteReadReplicaDBClusterOutput) SetDBCluster(v *DBCluster) *PromoteReadReplicaDBClusterOutput { - s.DBCluster = v - return s -} - -// A range of integer values. -type Range struct { - _ struct{} `type:"structure"` - - // The minimum value in the range. - From *int64 `type:"integer"` - - // The step value for the range. For example, if you have a range of 5,000 to - // 10,000, with a step value of 1,000, the valid values start at 5,000 and step - // up by 1,000. Even though 7,500 is within the range, it isn't a valid value - // for the range. The valid values are 5,000, 6,000, 7,000, 8,000... - Step *int64 `type:"integer"` - - // The maximum value in the range. - To *int64 `type:"integer"` -} - -// String returns the string representation -func (s Range) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Range) GoString() string { - return s.String() -} - -// SetFrom sets the From field's value. -func (s *Range) SetFrom(v int64) *Range { - s.From = &v - return s -} - -// SetStep sets the Step field's value. -func (s *Range) SetStep(v int64) *Range { - s.Step = &v - return s -} - -// SetTo sets the To field's value. -func (s *Range) SetTo(v int64) *Range { - s.To = &v - return s -} - -type RebootDBInstanceInput struct { - _ struct{} `type:"structure"` - - // The DB instance identifier. This parameter is stored as a lowercase string. - // - // Constraints: - // - // * Must match the identifier of an existing DBInstance. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // When true, the reboot is conducted through a MultiAZ failover. - // - // Constraint: You can't specify true if the instance is not configured for - // MultiAZ. - ForceFailover *bool `type:"boolean"` -} - -// String returns the string representation -func (s RebootDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootDBInstanceInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *RebootDBInstanceInput) SetDBInstanceIdentifier(v string) *RebootDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetForceFailover sets the ForceFailover field's value. -func (s *RebootDBInstanceInput) SetForceFailover(v bool) *RebootDBInstanceInput { - s.ForceFailover = &v - return s -} - -type RebootDBInstanceOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s RebootDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootDBInstanceOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *RebootDBInstanceOutput) SetDBInstance(v *DBInstance) *RebootDBInstanceOutput { - s.DBInstance = v - return s -} - -type RemoveRoleFromDBClusterInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster to disassociate the IAM role from. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM role to disassociate from the DB - // cluster, for example arn:aws:iam::123456789012:role/NeptuneAccessRole. - // - // RoleArn is a required field - RoleArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RemoveRoleFromDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveRoleFromDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveRoleFromDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveRoleFromDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *RemoveRoleFromDBClusterInput) SetDBClusterIdentifier(v string) *RemoveRoleFromDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *RemoveRoleFromDBClusterInput) SetRoleArn(v string) *RemoveRoleFromDBClusterInput { - s.RoleArn = &v - return s -} - -type RemoveRoleFromDBClusterOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveRoleFromDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveRoleFromDBClusterOutput) GoString() string { - return s.String() -} - -type RemoveSourceIdentifierFromSubscriptionInput struct { - _ struct{} `type:"structure"` - - // The source identifier to be removed from the subscription, such as the DB - // instance identifier for a DB instance or the name of a security group. - // - // SourceIdentifier is a required field - SourceIdentifier *string `type:"string" required:"true"` - - // The name of the event notification subscription you want to remove a source - // identifier from. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RemoveSourceIdentifierFromSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveSourceIdentifierFromSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveSourceIdentifierFromSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveSourceIdentifierFromSubscriptionInput"} - if s.SourceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceIdentifier")) - } - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *RemoveSourceIdentifierFromSubscriptionInput) SetSourceIdentifier(v string) *RemoveSourceIdentifierFromSubscriptionInput { - s.SourceIdentifier = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *RemoveSourceIdentifierFromSubscriptionInput) SetSubscriptionName(v string) *RemoveSourceIdentifierFromSubscriptionInput { - s.SubscriptionName = &v - return s -} - -type RemoveSourceIdentifierFromSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful invocation of the DescribeEventSubscriptions - // action. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s RemoveSourceIdentifierFromSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveSourceIdentifierFromSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *RemoveSourceIdentifierFromSubscriptionOutput) SetEventSubscription(v *EventSubscription) *RemoveSourceIdentifierFromSubscriptionOutput { - s.EventSubscription = v - return s -} - -type RemoveTagsFromResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Neptune resource that the tags are removed from. This value is - // an Amazon Resource Name (ARN). For information about creating an ARN, see - // Constructing an Amazon Resource Name (ARN) (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing). - // - // ResourceName is a required field - ResourceName *string `type:"string" required:"true"` - - // The tag key (name) of the tag to be removed. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsFromResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *RemoveTagsFromResourceInput) SetResourceName(v string) *RemoveTagsFromResourceInput { - s.ResourceName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsFromResourceInput) SetTagKeys(v []*string) *RemoveTagsFromResourceInput { - s.TagKeys = v - return s -} - -type RemoveTagsFromResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceOutput) GoString() string { - return s.String() -} - -type ResetDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group to reset. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` - - // A list of parameter names in the DB cluster parameter group to reset to the - // default values. You can't use this parameter if the ResetAllParameters parameter - // is set to true. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` - - // A value that is set to true to reset all parameters in the DB cluster parameter - // group to their default values, and false otherwise. You can't use this parameter - // if there is a list of parameter names specified for the Parameters parameter. - ResetAllParameters *bool `type:"boolean"` -} - -// String returns the string representation -func (s ResetDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetDBClusterParameterGroupInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *ResetDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *ResetDBClusterParameterGroupInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ResetDBClusterParameterGroupInput) SetParameters(v []*Parameter) *ResetDBClusterParameterGroupInput { - s.Parameters = v - return s -} - -// SetResetAllParameters sets the ResetAllParameters field's value. -func (s *ResetDBClusterParameterGroupInput) SetResetAllParameters(v bool) *ResetDBClusterParameterGroupInput { - s.ResetAllParameters = &v - return s -} - -type ResetDBClusterParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group. - // - // Constraints: - // - // * Must be 1 to 255 letters or numbers. - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - // - // This value is stored as a lowercase string. - DBClusterParameterGroupName *string `type:"string"` -} - -// String returns the string representation -func (s ResetDBClusterParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetDBClusterParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *ResetDBClusterParameterGroupOutput) SetDBClusterParameterGroupName(v string) *ResetDBClusterParameterGroupOutput { - s.DBClusterParameterGroupName = &v - return s -} - -type ResetDBParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB parameter group. - // - // Constraints: - // - // * Must match the name of an existing DBParameterGroup. - // - // DBParameterGroupName is a required field - DBParameterGroupName *string `type:"string" required:"true"` - - // To reset the entire DB parameter group, specify the DBParameterGroup name - // and ResetAllParameters parameters. To reset specific parameters, provide - // a list of the following: ParameterName and ApplyMethod. A maximum of 20 parameters - // can be modified in a single request. - // - // Valid Values (for Apply method): pending-reboot - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` - - // Specifies whether (true) or not (false) to reset all parameters in the DB - // parameter group to default values. - // - // Default: true - ResetAllParameters *bool `type:"boolean"` -} - -// String returns the string representation -func (s ResetDBParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetDBParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetDBParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetDBParameterGroupInput"} - if s.DBParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *ResetDBParameterGroupInput) SetDBParameterGroupName(v string) *ResetDBParameterGroupInput { - s.DBParameterGroupName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ResetDBParameterGroupInput) SetParameters(v []*Parameter) *ResetDBParameterGroupInput { - s.Parameters = v - return s -} - -// SetResetAllParameters sets the ResetAllParameters field's value. -func (s *ResetDBParameterGroupInput) SetResetAllParameters(v bool) *ResetDBParameterGroupInput { - s.ResetAllParameters = &v - return s -} - -// Contains the result of a successful invocation of the ModifyDBParameterGroup -// or ResetDBParameterGroup action. -type ResetDBParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // Provides the name of the DB parameter group. - DBParameterGroupName *string `type:"string"` -} - -// String returns the string representation -func (s ResetDBParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetDBParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *ResetDBParameterGroupOutput) SetDBParameterGroupName(v string) *ResetDBParameterGroupOutput { - s.DBParameterGroupName = &v - return s -} - -// Describes the pending maintenance actions for a resource. -type ResourcePendingMaintenanceActions struct { - _ struct{} `type:"structure"` - - // A list that provides details about the pending maintenance actions for the - // resource. - PendingMaintenanceActionDetails []*PendingMaintenanceAction `locationNameList:"PendingMaintenanceAction" type:"list"` - - // The ARN of the resource that has pending maintenance actions. - ResourceIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s ResourcePendingMaintenanceActions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourcePendingMaintenanceActions) GoString() string { - return s.String() -} - -// SetPendingMaintenanceActionDetails sets the PendingMaintenanceActionDetails field's value. -func (s *ResourcePendingMaintenanceActions) SetPendingMaintenanceActionDetails(v []*PendingMaintenanceAction) *ResourcePendingMaintenanceActions { - s.PendingMaintenanceActionDetails = v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *ResourcePendingMaintenanceActions) SetResourceIdentifier(v string) *ResourcePendingMaintenanceActions { - s.ResourceIdentifier = &v - return s -} - -type RestoreDBClusterFromSnapshotInput struct { - _ struct{} `type:"structure"` - - // Provides the list of EC2 Availability Zones that instances in the restored - // DB cluster can be created in. - AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // The name of the DB cluster to create from the DB snapshot or DB cluster snapshot. - // This parameter isn't case-sensitive. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - // - // Example: my-snapshot-id - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The name of the DB subnet group to use for the new DB cluster. - // - // Constraints: If supplied, must match the name of an existing DBSubnetGroup. - // - // Example: mySubnetgroup - DBSubnetGroupName *string `type:"string"` - - // The database name for the restored DB cluster. - DatabaseName *string `type:"string"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // The database engine to use for the new DB cluster. - // - // Default: The same as source - // - // Constraint: Must be compatible with the engine of the source - // - // Engine is a required field - Engine *string `type:"string" required:"true"` - - // The version of the database engine to use for the new DB cluster. - EngineVersion *string `type:"string"` - - // The AWS KMS key identifier to use when restoring an encrypted DB cluster - // from a DB snapshot or DB cluster snapshot. - // - // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption - // key. If you are restoring a DB cluster with the same AWS account that owns - // the KMS encryption key used to encrypt the new DB cluster, then you can use - // the KMS key alias instead of the ARN for the KMS encryption key. - // - // If you do not specify a value for the KmsKeyId parameter, then the following - // will occur: - // - // * If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is encrypted, - // then the restored DB cluster is encrypted using the KMS key that was used - // to encrypt the DB snapshot or DB cluster snapshot. - // - // * If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is not - // encrypted, then the restored DB cluster is not encrypted. - KmsKeyId *string `type:"string"` - - // The name of the option group to use for the restored DB cluster. - OptionGroupName *string `type:"string"` - - // The port number on which the new DB cluster accepts connections. - // - // Constraints: Value must be 1150-65535 - // - // Default: The same port as the original DB cluster. - Port *int64 `type:"integer"` - - // The identifier for the DB snapshot or DB cluster snapshot to restore from. - // - // You can use either the name or the Amazon Resource Name (ARN) to specify - // a DB cluster snapshot. However, you can use only the ARN to specify a DB - // snapshot. - // - // Constraints: - // - // * Must match the identifier of an existing Snapshot. - // - // SnapshotIdentifier is a required field - SnapshotIdentifier *string `type:"string" required:"true"` - - // The tags to be assigned to the restored DB cluster. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A list of VPC security groups that the new DB cluster will belong to. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s RestoreDBClusterFromSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBClusterFromSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreDBClusterFromSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreDBClusterFromSnapshotInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.Engine == nil { - invalidParams.Add(request.NewErrParamRequired("Engine")) - } - if s.SnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetAvailabilityZones(v []*string) *RestoreDBClusterFromSnapshotInput { - s.AvailabilityZones = v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetDBClusterIdentifier(v string) *RestoreDBClusterFromSnapshotInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetDBSubnetGroupName(v string) *RestoreDBClusterFromSnapshotInput { - s.DBSubnetGroupName = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetDatabaseName(v string) *RestoreDBClusterFromSnapshotInput { - s.DatabaseName = &v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBClusterFromSnapshotInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetEngine(v string) *RestoreDBClusterFromSnapshotInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetEngineVersion(v string) *RestoreDBClusterFromSnapshotInput { - s.EngineVersion = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetKmsKeyId(v string) *RestoreDBClusterFromSnapshotInput { - s.KmsKeyId = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetOptionGroupName(v string) *RestoreDBClusterFromSnapshotInput { - s.OptionGroupName = &v - return s -} - -// SetPort sets the Port field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetPort(v int64) *RestoreDBClusterFromSnapshotInput { - s.Port = &v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetSnapshotIdentifier(v string) *RestoreDBClusterFromSnapshotInput { - s.SnapshotIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetTags(v []*Tag) *RestoreDBClusterFromSnapshotInput { - s.Tags = v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetVpcSecurityGroupIds(v []*string) *RestoreDBClusterFromSnapshotInput { - s.VpcSecurityGroupIds = v - return s -} - -type RestoreDBClusterFromSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters action. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s RestoreDBClusterFromSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBClusterFromSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *RestoreDBClusterFromSnapshotOutput) SetDBCluster(v *DBCluster) *RestoreDBClusterFromSnapshotOutput { - s.DBCluster = v - return s -} - -type RestoreDBClusterToPointInTimeInput struct { - _ struct{} `type:"structure"` - - // The name of the new DB cluster to be created. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The DB subnet group name to use for the new DB cluster. - // - // Constraints: If supplied, must match the name of an existing DBSubnetGroup. - // - // Example: mySubnetgroup - DBSubnetGroupName *string `type:"string"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // The AWS KMS key identifier to use when restoring an encrypted DB cluster - // from an encrypted DB cluster. - // - // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption - // key. If you are restoring a DB cluster with the same AWS account that owns - // the KMS encryption key used to encrypt the new DB cluster, then you can use - // the KMS key alias instead of the ARN for the KMS encryption key. - // - // You can restore to a new DB cluster and encrypt the new DB cluster with a - // KMS key that is different than the KMS key used to encrypt the source DB - // cluster. The new DB cluster is encrypted with the KMS key identified by the - // KmsKeyId parameter. - // - // If you do not specify a value for the KmsKeyId parameter, then the following - // will occur: - // - // * If the DB cluster is encrypted, then the restored DB cluster is encrypted - // using the KMS key that was used to encrypt the source DB cluster. - // - // * If the DB cluster is not encrypted, then the restored DB cluster is - // not encrypted. - // - // If DBClusterIdentifier refers to a DB cluster that is not encrypted, then - // the restore request is rejected. - KmsKeyId *string `type:"string"` - - // The name of the option group for the new DB cluster. - OptionGroupName *string `type:"string"` - - // The port number on which the new DB cluster accepts connections. - // - // Constraints: Value must be 1150-65535 - // - // Default: The same port as the original DB cluster. - Port *int64 `type:"integer"` - - // The date and time to restore the DB cluster to. - // - // Valid Values: Value must be a time in Universal Coordinated Time (UTC) format - // - // Constraints: - // - // * Must be before the latest restorable time for the DB instance - // - // * Must be specified if UseLatestRestorableTime parameter is not provided - // - // * Cannot be specified if UseLatestRestorableTime parameter is true - // - // * Cannot be specified if RestoreType parameter is copy-on-write - // - // Example: 2015-03-07T23:45:00Z - RestoreToTime *time.Time `type:"timestamp"` - - // The type of restore to be performed. You can specify one of the following - // values: - // - // * full-copy - The new DB cluster is restored as a full copy of the source - // DB cluster. - // - // * copy-on-write - The new DB cluster is restored as a clone of the source - // DB cluster. - // - // Constraints: You can't specify copy-on-write if the engine version of the - // source DB cluster is earlier than 1.11. - // - // If you don't specify a RestoreType value, then the new DB cluster is restored - // as a full copy of the source DB cluster. - RestoreType *string `type:"string"` - - // The identifier of the source DB cluster from which to restore. - // - // Constraints: - // - // * Must match the identifier of an existing DBCluster. - // - // SourceDBClusterIdentifier is a required field - SourceDBClusterIdentifier *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon Neptune Resources - // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A value that is set to true to restore the DB cluster to the latest restorable - // backup time, and false otherwise. - // - // Default: false - // - // Constraints: Cannot be specified if RestoreToTime parameter is provided. - UseLatestRestorableTime *bool `type:"boolean"` - - // A list of VPC security groups that the new DB cluster belongs to. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s RestoreDBClusterToPointInTimeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBClusterToPointInTimeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreDBClusterToPointInTimeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreDBClusterToPointInTimeInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.SourceDBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetDBClusterIdentifier(v string) *RestoreDBClusterToPointInTimeInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetDBSubnetGroupName(v string) *RestoreDBClusterToPointInTimeInput { - s.DBSubnetGroupName = &v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBClusterToPointInTimeInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetKmsKeyId(v string) *RestoreDBClusterToPointInTimeInput { - s.KmsKeyId = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetOptionGroupName(v string) *RestoreDBClusterToPointInTimeInput { - s.OptionGroupName = &v - return s -} - -// SetPort sets the Port field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetPort(v int64) *RestoreDBClusterToPointInTimeInput { - s.Port = &v - return s -} - -// SetRestoreToTime sets the RestoreToTime field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetRestoreToTime(v time.Time) *RestoreDBClusterToPointInTimeInput { - s.RestoreToTime = &v - return s -} - -// SetRestoreType sets the RestoreType field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetRestoreType(v string) *RestoreDBClusterToPointInTimeInput { - s.RestoreType = &v - return s -} - -// SetSourceDBClusterIdentifier sets the SourceDBClusterIdentifier field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetSourceDBClusterIdentifier(v string) *RestoreDBClusterToPointInTimeInput { - s.SourceDBClusterIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetTags(v []*Tag) *RestoreDBClusterToPointInTimeInput { - s.Tags = v - return s -} - -// SetUseLatestRestorableTime sets the UseLatestRestorableTime field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetUseLatestRestorableTime(v bool) *RestoreDBClusterToPointInTimeInput { - s.UseLatestRestorableTime = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetVpcSecurityGroupIds(v []*string) *RestoreDBClusterToPointInTimeInput { - s.VpcSecurityGroupIds = v - return s -} - -type RestoreDBClusterToPointInTimeOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Neptune DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters action. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s RestoreDBClusterToPointInTimeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBClusterToPointInTimeOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *RestoreDBClusterToPointInTimeOutput) SetDBCluster(v *DBCluster) *RestoreDBClusterToPointInTimeOutput { - s.DBCluster = v - return s -} - -// This data type is used as a response element in the DescribeDBSubnetGroups -// action. -type Subnet struct { - _ struct{} `type:"structure"` - - // Contains Availability Zone information. - // - // This data type is used as an element in the following data type: - // - // * OrderableDBInstanceOption - SubnetAvailabilityZone *AvailabilityZone `type:"structure"` - - // Specifies the identifier of the subnet. - SubnetIdentifier *string `type:"string"` - - // Specifies the status of the subnet. - SubnetStatus *string `type:"string"` -} - -// String returns the string representation -func (s Subnet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Subnet) GoString() string { - return s.String() -} - -// SetSubnetAvailabilityZone sets the SubnetAvailabilityZone field's value. -func (s *Subnet) SetSubnetAvailabilityZone(v *AvailabilityZone) *Subnet { - s.SubnetAvailabilityZone = v - return s -} - -// SetSubnetIdentifier sets the SubnetIdentifier field's value. -func (s *Subnet) SetSubnetIdentifier(v string) *Subnet { - s.SubnetIdentifier = &v - return s -} - -// SetSubnetStatus sets the SubnetStatus field's value. -func (s *Subnet) SetSubnetStatus(v string) *Subnet { - s.SubnetStatus = &v - return s -} - -// Metadata assigned to an Amazon Neptune resource consisting of a key-value -// pair. -type Tag struct { - _ struct{} `type:"structure"` - - // A key is the required name of the tag. The string value can be from 1 to - // 128 Unicode characters in length and can't be prefixed with "aws:" or "rds:". - // The string can only contain only the set of Unicode letters, digits, white-space, - // '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). - Key *string `type:"string"` - - // A value is the optional value of the tag. The string value can be from 1 - // to 256 Unicode characters in length and can't be prefixed with "aws:" or - // "rds:". The string can only contain only the set of Unicode letters, digits, - // white-space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// A time zone associated with a DBInstance. This data type is an element in -// the response to the DescribeDBInstances, and the DescribeDBEngineVersions -// actions. -type Timezone struct { - _ struct{} `type:"structure"` - - // The name of the time zone. - TimezoneName *string `type:"string"` -} - -// String returns the string representation -func (s Timezone) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Timezone) GoString() string { - return s.String() -} - -// SetTimezoneName sets the TimezoneName field's value. -func (s *Timezone) SetTimezoneName(v string) *Timezone { - s.TimezoneName = &v - return s -} - -// The version of the database engine that a DB instance can be upgraded to. -type UpgradeTarget struct { - _ struct{} `type:"structure"` - - // A value that indicates whether the target version is applied to any source - // DB instances that have AutoMinorVersionUpgrade set to true. - AutoUpgrade *bool `type:"boolean"` - - // The version of the database engine that a DB instance can be upgraded to. - Description *string `type:"string"` - - // The name of the upgrade target database engine. - Engine *string `type:"string"` - - // The version number of the upgrade target database engine. - EngineVersion *string `type:"string"` - - // A value that indicates whether a database engine is upgraded to a major version. - IsMajorVersionUpgrade *bool `type:"boolean"` -} - -// String returns the string representation -func (s UpgradeTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpgradeTarget) GoString() string { - return s.String() -} - -// SetAutoUpgrade sets the AutoUpgrade field's value. -func (s *UpgradeTarget) SetAutoUpgrade(v bool) *UpgradeTarget { - s.AutoUpgrade = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpgradeTarget) SetDescription(v string) *UpgradeTarget { - s.Description = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *UpgradeTarget) SetEngine(v string) *UpgradeTarget { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *UpgradeTarget) SetEngineVersion(v string) *UpgradeTarget { - s.EngineVersion = &v - return s -} - -// SetIsMajorVersionUpgrade sets the IsMajorVersionUpgrade field's value. -func (s *UpgradeTarget) SetIsMajorVersionUpgrade(v bool) *UpgradeTarget { - s.IsMajorVersionUpgrade = &v - return s -} - -// Information about valid modifications that you can make to your DB instance. -// Contains the result of a successful call to the DescribeValidDBInstanceModifications -// action. You can use this information when you call ModifyDBInstance. -type ValidDBInstanceModificationsMessage struct { - _ struct{} `type:"structure"` - - // Valid storage options for your DB instance. - Storage []*ValidStorageOptions `locationNameList:"ValidStorageOptions" type:"list"` -} - -// String returns the string representation -func (s ValidDBInstanceModificationsMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidDBInstanceModificationsMessage) GoString() string { - return s.String() -} - -// SetStorage sets the Storage field's value. -func (s *ValidDBInstanceModificationsMessage) SetStorage(v []*ValidStorageOptions) *ValidDBInstanceModificationsMessage { - s.Storage = v - return s -} - -// Information about valid modifications that you can make to your DB instance. -// Contains the result of a successful call to the DescribeValidDBInstanceModifications -// action. -type ValidStorageOptions struct { - _ struct{} `type:"structure"` - - // The valid range of Provisioned IOPS to gibibytes of storage multiplier. For - // example, 3-10, which means that provisioned IOPS can be between 3 and 10 - // times storage. - IopsToStorageRatio []*DoubleRange `locationNameList:"DoubleRange" type:"list"` - - // The valid range of provisioned IOPS. For example, 1000-20000. - ProvisionedIops []*Range `locationNameList:"Range" type:"list"` - - // The valid range of storage in gibibytes. For example, 100 to 16384. - StorageSize []*Range `locationNameList:"Range" type:"list"` - - // The valid storage types for your DB instance. For example, gp2, io1. - StorageType *string `type:"string"` -} - -// String returns the string representation -func (s ValidStorageOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidStorageOptions) GoString() string { - return s.String() -} - -// SetIopsToStorageRatio sets the IopsToStorageRatio field's value. -func (s *ValidStorageOptions) SetIopsToStorageRatio(v []*DoubleRange) *ValidStorageOptions { - s.IopsToStorageRatio = v - return s -} - -// SetProvisionedIops sets the ProvisionedIops field's value. -func (s *ValidStorageOptions) SetProvisionedIops(v []*Range) *ValidStorageOptions { - s.ProvisionedIops = v - return s -} - -// SetStorageSize sets the StorageSize field's value. -func (s *ValidStorageOptions) SetStorageSize(v []*Range) *ValidStorageOptions { - s.StorageSize = v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *ValidStorageOptions) SetStorageType(v string) *ValidStorageOptions { - s.StorageType = &v - return s -} - -// This data type is used as a response element for queries on VPC security -// group membership. -type VpcSecurityGroupMembership struct { - _ struct{} `type:"structure"` - - // The status of the VPC security group. - Status *string `type:"string"` - - // The name of the VPC security group. - VpcSecurityGroupId *string `type:"string"` -} - -// String returns the string representation -func (s VpcSecurityGroupMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcSecurityGroupMembership) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *VpcSecurityGroupMembership) SetStatus(v string) *VpcSecurityGroupMembership { - s.Status = &v - return s -} - -// SetVpcSecurityGroupId sets the VpcSecurityGroupId field's value. -func (s *VpcSecurityGroupMembership) SetVpcSecurityGroupId(v string) *VpcSecurityGroupMembership { - s.VpcSecurityGroupId = &v - return s -} - -const ( - // ApplyMethodImmediate is a ApplyMethod enum value - ApplyMethodImmediate = "immediate" - - // ApplyMethodPendingReboot is a ApplyMethod enum value - ApplyMethodPendingReboot = "pending-reboot" -) - -const ( - // SourceTypeDbInstance is a SourceType enum value - SourceTypeDbInstance = "db-instance" - - // SourceTypeDbParameterGroup is a SourceType enum value - SourceTypeDbParameterGroup = "db-parameter-group" - - // SourceTypeDbSecurityGroup is a SourceType enum value - SourceTypeDbSecurityGroup = "db-security-group" - - // SourceTypeDbSnapshot is a SourceType enum value - SourceTypeDbSnapshot = "db-snapshot" - - // SourceTypeDbCluster is a SourceType enum value - SourceTypeDbCluster = "db-cluster" - - // SourceTypeDbClusterSnapshot is a SourceType enum value - SourceTypeDbClusterSnapshot = "db-cluster-snapshot" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/doc.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/doc.go deleted file mode 100644 index 503af8466..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/neptune/doc.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package neptune provides the client and types for making API -// requests to Amazon Neptune. -// -// Amazon Neptune is a fast, reliable, fully-managed graph database service -// that makes it easy to build and run applications that work with highly connected -// datasets. The core of Amazon Neptune is a purpose-built, high-performance -// graph database engine optimized for storing billions of relationships and -// querying the graph with milliseconds latency. Amazon Neptune supports popular -// graph models Property Graph and W3C's RDF, and their respective query languages -// Apache TinkerPop Gremlin and SPARQL, allowing you to easily build queries -// that efficiently navigate highly connected datasets. Neptune powers graph -// use cases such as recommendation engines, fraud detection, knowledge graphs, -// drug discovery, and network security. -// -// This interface reference for Amazon Neptune contains documentation for a -// programming or command line interface you can use to manage Amazon Neptune. -// Note that Amazon Neptune is asynchronous, which means that some interfaces -// might require techniques such as polling or callback functions to determine -// when a command has been applied. In this reference, the parameter descriptions -// indicate whether a command is applied immediately, on the next instance reboot, -// or during the maintenance window. The reference structure is as follows, -// and we list following some related topics from the user guide. -// -// Amazon Neptune API Reference -// -// See https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31 for more information on this service. -// -// See neptune package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/neptune/ -// -// Using the Client -// -// To contact Amazon Neptune with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Neptune client Neptune for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/neptune/#New -package neptune diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/errors.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/errors.go deleted file mode 100644 index 8c0c3f967..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/neptune/errors.go +++ /dev/null @@ -1,361 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package neptune - -const ( - - // ErrCodeAuthorizationNotFoundFault for service response error code - // "AuthorizationNotFound". - // - // Specified CIDRIP or EC2 security group is not authorized for the specified - // DB security group. - // - // Neptune may not also be authorized via IAM to perform necessary actions on - // your behalf. - ErrCodeAuthorizationNotFoundFault = "AuthorizationNotFound" - - // ErrCodeCertificateNotFoundFault for service response error code - // "CertificateNotFound". - // - // CertificateIdentifier does not refer to an existing certificate. - ErrCodeCertificateNotFoundFault = "CertificateNotFound" - - // ErrCodeDBClusterAlreadyExistsFault for service response error code - // "DBClusterAlreadyExistsFault". - // - // User already has a DB cluster with the given identifier. - ErrCodeDBClusterAlreadyExistsFault = "DBClusterAlreadyExistsFault" - - // ErrCodeDBClusterNotFoundFault for service response error code - // "DBClusterNotFoundFault". - // - // DBClusterIdentifier does not refer to an existing DB cluster. - ErrCodeDBClusterNotFoundFault = "DBClusterNotFoundFault" - - // ErrCodeDBClusterParameterGroupNotFoundFault for service response error code - // "DBClusterParameterGroupNotFound". - // - // DBClusterParameterGroupName does not refer to an existing DB Cluster parameter - // group. - ErrCodeDBClusterParameterGroupNotFoundFault = "DBClusterParameterGroupNotFound" - - // ErrCodeDBClusterQuotaExceededFault for service response error code - // "DBClusterQuotaExceededFault". - // - // User attempted to create a new DB cluster and the user has already reached - // the maximum allowed DB cluster quota. - ErrCodeDBClusterQuotaExceededFault = "DBClusterQuotaExceededFault" - - // ErrCodeDBClusterRoleAlreadyExistsFault for service response error code - // "DBClusterRoleAlreadyExists". - // - // The specified IAM role Amazon Resource Name (ARN) is already associated with - // the specified DB cluster. - ErrCodeDBClusterRoleAlreadyExistsFault = "DBClusterRoleAlreadyExists" - - // ErrCodeDBClusterRoleNotFoundFault for service response error code - // "DBClusterRoleNotFound". - // - // The specified IAM role Amazon Resource Name (ARN) is not associated with - // the specified DB cluster. - ErrCodeDBClusterRoleNotFoundFault = "DBClusterRoleNotFound" - - // ErrCodeDBClusterRoleQuotaExceededFault for service response error code - // "DBClusterRoleQuotaExceeded". - // - // You have exceeded the maximum number of IAM roles that can be associated - // with the specified DB cluster. - ErrCodeDBClusterRoleQuotaExceededFault = "DBClusterRoleQuotaExceeded" - - // ErrCodeDBClusterSnapshotAlreadyExistsFault for service response error code - // "DBClusterSnapshotAlreadyExistsFault". - // - // User already has a DB cluster snapshot with the given identifier. - ErrCodeDBClusterSnapshotAlreadyExistsFault = "DBClusterSnapshotAlreadyExistsFault" - - // ErrCodeDBClusterSnapshotNotFoundFault for service response error code - // "DBClusterSnapshotNotFoundFault". - // - // DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. - ErrCodeDBClusterSnapshotNotFoundFault = "DBClusterSnapshotNotFoundFault" - - // ErrCodeDBInstanceAlreadyExistsFault for service response error code - // "DBInstanceAlreadyExists". - // - // User already has a DB instance with the given identifier. - ErrCodeDBInstanceAlreadyExistsFault = "DBInstanceAlreadyExists" - - // ErrCodeDBInstanceNotFoundFault for service response error code - // "DBInstanceNotFound". - // - // DBInstanceIdentifier does not refer to an existing DB instance. - ErrCodeDBInstanceNotFoundFault = "DBInstanceNotFound" - - // ErrCodeDBParameterGroupAlreadyExistsFault for service response error code - // "DBParameterGroupAlreadyExists". - // - // A DB parameter group with the same name exists. - ErrCodeDBParameterGroupAlreadyExistsFault = "DBParameterGroupAlreadyExists" - - // ErrCodeDBParameterGroupNotFoundFault for service response error code - // "DBParameterGroupNotFound". - // - // DBParameterGroupName does not refer to an existing DB parameter group. - ErrCodeDBParameterGroupNotFoundFault = "DBParameterGroupNotFound" - - // ErrCodeDBParameterGroupQuotaExceededFault for service response error code - // "DBParameterGroupQuotaExceeded". - // - // Request would result in user exceeding the allowed number of DB parameter - // groups. - ErrCodeDBParameterGroupQuotaExceededFault = "DBParameterGroupQuotaExceeded" - - // ErrCodeDBSecurityGroupNotFoundFault for service response error code - // "DBSecurityGroupNotFound". - // - // DBSecurityGroupName does not refer to an existing DB security group. - ErrCodeDBSecurityGroupNotFoundFault = "DBSecurityGroupNotFound" - - // ErrCodeDBSnapshotAlreadyExistsFault for service response error code - // "DBSnapshotAlreadyExists". - // - // DBSnapshotIdentifier is already used by an existing snapshot. - ErrCodeDBSnapshotAlreadyExistsFault = "DBSnapshotAlreadyExists" - - // ErrCodeDBSnapshotNotFoundFault for service response error code - // "DBSnapshotNotFound". - // - // DBSnapshotIdentifier does not refer to an existing DB snapshot. - ErrCodeDBSnapshotNotFoundFault = "DBSnapshotNotFound" - - // ErrCodeDBSubnetGroupAlreadyExistsFault for service response error code - // "DBSubnetGroupAlreadyExists". - // - // DBSubnetGroupName is already used by an existing DB subnet group. - ErrCodeDBSubnetGroupAlreadyExistsFault = "DBSubnetGroupAlreadyExists" - - // ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs for service response error code - // "DBSubnetGroupDoesNotCoverEnoughAZs". - // - // Subnets in the DB subnet group should cover at least two Availability Zones - // unless there is only one Availability Zone. - ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs = "DBSubnetGroupDoesNotCoverEnoughAZs" - - // ErrCodeDBSubnetGroupNotFoundFault for service response error code - // "DBSubnetGroupNotFoundFault". - // - // DBSubnetGroupName does not refer to an existing DB subnet group. - ErrCodeDBSubnetGroupNotFoundFault = "DBSubnetGroupNotFoundFault" - - // ErrCodeDBSubnetGroupQuotaExceededFault for service response error code - // "DBSubnetGroupQuotaExceeded". - // - // Request would result in user exceeding the allowed number of DB subnet groups. - ErrCodeDBSubnetGroupQuotaExceededFault = "DBSubnetGroupQuotaExceeded" - - // ErrCodeDBSubnetQuotaExceededFault for service response error code - // "DBSubnetQuotaExceededFault". - // - // Request would result in user exceeding the allowed number of subnets in a - // DB subnet groups. - ErrCodeDBSubnetQuotaExceededFault = "DBSubnetQuotaExceededFault" - - // ErrCodeDBUpgradeDependencyFailureFault for service response error code - // "DBUpgradeDependencyFailure". - // - // The DB upgrade failed because a resource the DB depends on could not be modified. - ErrCodeDBUpgradeDependencyFailureFault = "DBUpgradeDependencyFailure" - - // ErrCodeDomainNotFoundFault for service response error code - // "DomainNotFoundFault". - // - // Domain does not refer to an existing Active Directory Domain. - ErrCodeDomainNotFoundFault = "DomainNotFoundFault" - - // ErrCodeEventSubscriptionQuotaExceededFault for service response error code - // "EventSubscriptionQuotaExceeded". - ErrCodeEventSubscriptionQuotaExceededFault = "EventSubscriptionQuotaExceeded" - - // ErrCodeInstanceQuotaExceededFault for service response error code - // "InstanceQuotaExceeded". - // - // Request would result in user exceeding the allowed number of DB instances. - ErrCodeInstanceQuotaExceededFault = "InstanceQuotaExceeded" - - // ErrCodeInsufficientDBClusterCapacityFault for service response error code - // "InsufficientDBClusterCapacityFault". - // - // The DB cluster does not have enough capacity for the current operation. - ErrCodeInsufficientDBClusterCapacityFault = "InsufficientDBClusterCapacityFault" - - // ErrCodeInsufficientDBInstanceCapacityFault for service response error code - // "InsufficientDBInstanceCapacity". - // - // Specified DB instance class is not available in the specified Availability - // Zone. - ErrCodeInsufficientDBInstanceCapacityFault = "InsufficientDBInstanceCapacity" - - // ErrCodeInsufficientStorageClusterCapacityFault for service response error code - // "InsufficientStorageClusterCapacity". - // - // There is insufficient storage available for the current action. You may be - // able to resolve this error by updating your subnet group to use different - // Availability Zones that have more storage available. - ErrCodeInsufficientStorageClusterCapacityFault = "InsufficientStorageClusterCapacity" - - // ErrCodeInvalidDBClusterSnapshotStateFault for service response error code - // "InvalidDBClusterSnapshotStateFault". - // - // The supplied value is not a valid DB cluster snapshot state. - ErrCodeInvalidDBClusterSnapshotStateFault = "InvalidDBClusterSnapshotStateFault" - - // ErrCodeInvalidDBClusterStateFault for service response error code - // "InvalidDBClusterStateFault". - // - // The DB cluster is not in a valid state. - ErrCodeInvalidDBClusterStateFault = "InvalidDBClusterStateFault" - - // ErrCodeInvalidDBInstanceStateFault for service response error code - // "InvalidDBInstanceState". - // - // The specified DB instance is not in the available state. - ErrCodeInvalidDBInstanceStateFault = "InvalidDBInstanceState" - - // ErrCodeInvalidDBParameterGroupStateFault for service response error code - // "InvalidDBParameterGroupState". - // - // The DB parameter group is in use or is in an invalid state. If you are attempting - // to delete the parameter group, you cannot delete it when the parameter group - // is in this state. - ErrCodeInvalidDBParameterGroupStateFault = "InvalidDBParameterGroupState" - - // ErrCodeInvalidDBSecurityGroupStateFault for service response error code - // "InvalidDBSecurityGroupState". - // - // The state of the DB security group does not allow deletion. - ErrCodeInvalidDBSecurityGroupStateFault = "InvalidDBSecurityGroupState" - - // ErrCodeInvalidDBSnapshotStateFault for service response error code - // "InvalidDBSnapshotState". - // - // The state of the DB snapshot does not allow deletion. - ErrCodeInvalidDBSnapshotStateFault = "InvalidDBSnapshotState" - - // ErrCodeInvalidDBSubnetGroupStateFault for service response error code - // "InvalidDBSubnetGroupStateFault". - // - // The DB subnet group cannot be deleted because it is in use. - ErrCodeInvalidDBSubnetGroupStateFault = "InvalidDBSubnetGroupStateFault" - - // ErrCodeInvalidDBSubnetStateFault for service response error code - // "InvalidDBSubnetStateFault". - // - // The DB subnet is not in the available state. - ErrCodeInvalidDBSubnetStateFault = "InvalidDBSubnetStateFault" - - // ErrCodeInvalidEventSubscriptionStateFault for service response error code - // "InvalidEventSubscriptionState". - ErrCodeInvalidEventSubscriptionStateFault = "InvalidEventSubscriptionState" - - // ErrCodeInvalidRestoreFault for service response error code - // "InvalidRestoreFault". - // - // Cannot restore from vpc backup to non-vpc DB instance. - ErrCodeInvalidRestoreFault = "InvalidRestoreFault" - - // ErrCodeInvalidSubnet for service response error code - // "InvalidSubnet". - // - // The requested subnet is invalid, or multiple subnets were requested that - // are not all in a common VPC. - ErrCodeInvalidSubnet = "InvalidSubnet" - - // ErrCodeInvalidVPCNetworkStateFault for service response error code - // "InvalidVPCNetworkStateFault". - // - // DB subnet group does not cover all Availability Zones after it is created - // because users' change. - ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault" - - // ErrCodeKMSKeyNotAccessibleFault for service response error code - // "KMSKeyNotAccessibleFault". - // - // Error accessing KMS key. - ErrCodeKMSKeyNotAccessibleFault = "KMSKeyNotAccessibleFault" - - // ErrCodeOptionGroupNotFoundFault for service response error code - // "OptionGroupNotFoundFault". - ErrCodeOptionGroupNotFoundFault = "OptionGroupNotFoundFault" - - // ErrCodeProvisionedIopsNotAvailableInAZFault for service response error code - // "ProvisionedIopsNotAvailableInAZFault". - // - // Provisioned IOPS not available in the specified Availability Zone. - ErrCodeProvisionedIopsNotAvailableInAZFault = "ProvisionedIopsNotAvailableInAZFault" - - // ErrCodeResourceNotFoundFault for service response error code - // "ResourceNotFoundFault". - // - // The specified resource ID was not found. - ErrCodeResourceNotFoundFault = "ResourceNotFoundFault" - - // ErrCodeSNSInvalidTopicFault for service response error code - // "SNSInvalidTopic". - ErrCodeSNSInvalidTopicFault = "SNSInvalidTopic" - - // ErrCodeSNSNoAuthorizationFault for service response error code - // "SNSNoAuthorization". - ErrCodeSNSNoAuthorizationFault = "SNSNoAuthorization" - - // ErrCodeSNSTopicArnNotFoundFault for service response error code - // "SNSTopicArnNotFound". - ErrCodeSNSTopicArnNotFoundFault = "SNSTopicArnNotFound" - - // ErrCodeSharedSnapshotQuotaExceededFault for service response error code - // "SharedSnapshotQuotaExceeded". - // - // You have exceeded the maximum number of accounts that you can share a manual - // DB snapshot with. - ErrCodeSharedSnapshotQuotaExceededFault = "SharedSnapshotQuotaExceeded" - - // ErrCodeSnapshotQuotaExceededFault for service response error code - // "SnapshotQuotaExceeded". - // - // Request would result in user exceeding the allowed number of DB snapshots. - ErrCodeSnapshotQuotaExceededFault = "SnapshotQuotaExceeded" - - // ErrCodeSourceNotFoundFault for service response error code - // "SourceNotFound". - ErrCodeSourceNotFoundFault = "SourceNotFound" - - // ErrCodeStorageQuotaExceededFault for service response error code - // "StorageQuotaExceeded". - // - // Request would result in user exceeding the allowed amount of storage available - // across all DB instances. - ErrCodeStorageQuotaExceededFault = "StorageQuotaExceeded" - - // ErrCodeStorageTypeNotSupportedFault for service response error code - // "StorageTypeNotSupported". - // - // StorageType specified cannot be associated with the DB Instance. - ErrCodeStorageTypeNotSupportedFault = "StorageTypeNotSupported" - - // ErrCodeSubnetAlreadyInUse for service response error code - // "SubnetAlreadyInUse". - // - // The DB subnet is already in use in the Availability Zone. - ErrCodeSubnetAlreadyInUse = "SubnetAlreadyInUse" - - // ErrCodeSubscriptionAlreadyExistFault for service response error code - // "SubscriptionAlreadyExist". - ErrCodeSubscriptionAlreadyExistFault = "SubscriptionAlreadyExist" - - // ErrCodeSubscriptionCategoryNotFoundFault for service response error code - // "SubscriptionCategoryNotFound". - ErrCodeSubscriptionCategoryNotFoundFault = "SubscriptionCategoryNotFound" - - // ErrCodeSubscriptionNotFoundFault for service response error code - // "SubscriptionNotFound". - ErrCodeSubscriptionNotFoundFault = "SubscriptionNotFound" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/service.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/service.go deleted file mode 100644 index 3ddc5e5fb..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/neptune/service.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package neptune - -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/query" -) - -// Neptune provides the API operation methods for making requests to -// Amazon Neptune. See this package's package overview docs -// for details on the service. -// -// Neptune methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Neptune 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 = "rds" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Neptune" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Neptune client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Neptune client from just a session. -// svc := neptune.New(mySession) -// -// // Create a Neptune client with additional configuration -// svc := neptune.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Neptune { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "rds" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Neptune { - svc := &Neptune{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-10-31", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Neptune operation and runs any -// custom request initialization. -func (c *Neptune) 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/neptune/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/waiters.go deleted file mode 100644 index acc80183c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/neptune/waiters.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package neptune - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilDBInstanceAvailable uses the Amazon Neptune API operation -// DescribeDBInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *Neptune) WaitUntilDBInstanceAvailable(input *DescribeDBInstancesInput) error { - return c.WaitUntilDBInstanceAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilDBInstanceAvailableWithContext is an extended version of WaitUntilDBInstanceAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) WaitUntilDBInstanceAvailableWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilDBInstanceAvailable", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "deleted", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "deleting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "incompatible-restore", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "incompatible-parameters", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeDBInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilDBInstanceDeleted uses the Amazon Neptune API operation -// DescribeDBInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *Neptune) WaitUntilDBInstanceDeleted(input *DescribeDBInstancesInput) error { - return c.WaitUntilDBInstanceDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilDBInstanceDeletedWithContext is an extended version of WaitUntilDBInstanceDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Neptune) WaitUntilDBInstanceDeletedWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilDBInstanceDeleted", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "deleted", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "DBInstanceNotFound", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "creating", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "modifying", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "rebooting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "resetting-master-credentials", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeDBInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go deleted file mode 100644 index e2ea62709..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go +++ /dev/null @@ -1,18032 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package opsworks - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAssignInstance = "AssignInstance" - -// AssignInstanceRequest generates a "aws/request.Request" representing the -// client's request for the AssignInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssignInstance for more information on using the AssignInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssignInstanceRequest method. -// req, resp := client.AssignInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/AssignInstance -func (c *OpsWorks) AssignInstanceRequest(input *AssignInstanceInput) (req *request.Request, output *AssignInstanceOutput) { - op := &request.Operation{ - Name: opAssignInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssignInstanceInput{} - } - - output = &AssignInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssignInstance API operation for AWS OpsWorks. -// -// Assign a registered instance to a layer. -// -// * You can assign registered on-premises instances to any layer type. -// -// * You can assign registered Amazon EC2 instances only to custom layers. -// -// * You cannot use this action with instances that were created with AWS -// OpsWorks Stacks. -// -// Required Permissions: To use this action, an AWS Identity and Access Management -// (IAM) user must have a Manage permissions level for the stack or an attached -// policy that explicitly grants permissions. For more information on user permissions, -// see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation AssignInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/AssignInstance -func (c *OpsWorks) AssignInstance(input *AssignInstanceInput) (*AssignInstanceOutput, error) { - req, out := c.AssignInstanceRequest(input) - return out, req.Send() -} - -// AssignInstanceWithContext is the same as AssignInstance with the addition of -// the ability to pass a context and additional request options. -// -// See AssignInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) AssignInstanceWithContext(ctx aws.Context, input *AssignInstanceInput, opts ...request.Option) (*AssignInstanceOutput, error) { - req, out := c.AssignInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssignVolume = "AssignVolume" - -// AssignVolumeRequest generates a "aws/request.Request" representing the -// client's request for the AssignVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssignVolume for more information on using the AssignVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssignVolumeRequest method. -// req, resp := client.AssignVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/AssignVolume -func (c *OpsWorks) AssignVolumeRequest(input *AssignVolumeInput) (req *request.Request, output *AssignVolumeOutput) { - op := &request.Operation{ - Name: opAssignVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssignVolumeInput{} - } - - output = &AssignVolumeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssignVolume API operation for AWS OpsWorks. -// -// Assigns one of the stack's registered Amazon EBS volumes to a specified instance. -// The volume must first be registered with the stack by calling RegisterVolume. -// After you register the volume, you must call UpdateVolume to specify a mount -// point before calling AssignVolume. For more information, see Resource Management -// (http://docs.aws.amazon.com/opsworks/latest/userguide/resources.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation AssignVolume for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/AssignVolume -func (c *OpsWorks) AssignVolume(input *AssignVolumeInput) (*AssignVolumeOutput, error) { - req, out := c.AssignVolumeRequest(input) - return out, req.Send() -} - -// AssignVolumeWithContext is the same as AssignVolume with the addition of -// the ability to pass a context and additional request options. -// -// See AssignVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) AssignVolumeWithContext(ctx aws.Context, input *AssignVolumeInput, opts ...request.Option) (*AssignVolumeOutput, error) { - req, out := c.AssignVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateElasticIp = "AssociateElasticIp" - -// AssociateElasticIpRequest generates a "aws/request.Request" representing the -// client's request for the AssociateElasticIp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateElasticIp for more information on using the AssociateElasticIp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateElasticIpRequest method. -// req, resp := client.AssociateElasticIpRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/AssociateElasticIp -func (c *OpsWorks) AssociateElasticIpRequest(input *AssociateElasticIpInput) (req *request.Request, output *AssociateElasticIpOutput) { - op := &request.Operation{ - Name: opAssociateElasticIp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateElasticIpInput{} - } - - output = &AssociateElasticIpOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssociateElasticIp API operation for AWS OpsWorks. -// -// Associates one of the stack's registered Elastic IP addresses with a specified -// instance. The address must first be registered with the stack by calling -// RegisterElasticIp. For more information, see Resource Management (http://docs.aws.amazon.com/opsworks/latest/userguide/resources.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation AssociateElasticIp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/AssociateElasticIp -func (c *OpsWorks) AssociateElasticIp(input *AssociateElasticIpInput) (*AssociateElasticIpOutput, error) { - req, out := c.AssociateElasticIpRequest(input) - return out, req.Send() -} - -// AssociateElasticIpWithContext is the same as AssociateElasticIp with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateElasticIp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) AssociateElasticIpWithContext(ctx aws.Context, input *AssociateElasticIpInput, opts ...request.Option) (*AssociateElasticIpOutput, error) { - req, out := c.AssociateElasticIpRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachElasticLoadBalancer = "AttachElasticLoadBalancer" - -// AttachElasticLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the AttachElasticLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachElasticLoadBalancer for more information on using the AttachElasticLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachElasticLoadBalancerRequest method. -// req, resp := client.AttachElasticLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/AttachElasticLoadBalancer -func (c *OpsWorks) AttachElasticLoadBalancerRequest(input *AttachElasticLoadBalancerInput) (req *request.Request, output *AttachElasticLoadBalancerOutput) { - op := &request.Operation{ - Name: opAttachElasticLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachElasticLoadBalancerInput{} - } - - output = &AttachElasticLoadBalancerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachElasticLoadBalancer API operation for AWS OpsWorks. -// -// Attaches an Elastic Load Balancing load balancer to a specified layer. AWS -// OpsWorks Stacks does not support Application Load Balancer. You can only -// use Classic Load Balancer with AWS OpsWorks Stacks. For more information, -// see Elastic Load Balancing (http://docs.aws.amazon.com/opsworks/latest/userguide/layers-elb.html). -// -// You must create the Elastic Load Balancing instance separately, by using -// the Elastic Load Balancing console, API, or CLI. For more information, see -// Elastic Load Balancing Developer Guide (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/Welcome.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation AttachElasticLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/AttachElasticLoadBalancer -func (c *OpsWorks) AttachElasticLoadBalancer(input *AttachElasticLoadBalancerInput) (*AttachElasticLoadBalancerOutput, error) { - req, out := c.AttachElasticLoadBalancerRequest(input) - return out, req.Send() -} - -// AttachElasticLoadBalancerWithContext is the same as AttachElasticLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See AttachElasticLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) AttachElasticLoadBalancerWithContext(ctx aws.Context, input *AttachElasticLoadBalancerInput, opts ...request.Option) (*AttachElasticLoadBalancerOutput, error) { - req, out := c.AttachElasticLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCloneStack = "CloneStack" - -// CloneStackRequest generates a "aws/request.Request" representing the -// client's request for the CloneStack operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CloneStack for more information on using the CloneStack -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CloneStackRequest method. -// req, resp := client.CloneStackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/CloneStack -func (c *OpsWorks) CloneStackRequest(input *CloneStackInput) (req *request.Request, output *CloneStackOutput) { - op := &request.Operation{ - Name: opCloneStack, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CloneStackInput{} - } - - output = &CloneStackOutput{} - req = c.newRequest(op, input, output) - return -} - -// CloneStack API operation for AWS OpsWorks. -// -// Creates a clone of a specified stack. For more information, see Clone a Stack -// (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-cloning.html). -// By default, all parameters are set to the values used by the parent stack. -// -// Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information about user -// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation CloneStack for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/CloneStack -func (c *OpsWorks) CloneStack(input *CloneStackInput) (*CloneStackOutput, error) { - req, out := c.CloneStackRequest(input) - return out, req.Send() -} - -// CloneStackWithContext is the same as CloneStack with the addition of -// the ability to pass a context and additional request options. -// -// See CloneStack for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) CloneStackWithContext(ctx aws.Context, input *CloneStackInput, opts ...request.Option) (*CloneStackOutput, error) { - req, out := c.CloneStackRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateApp = "CreateApp" - -// CreateAppRequest generates a "aws/request.Request" representing the -// client's request for the CreateApp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateApp for more information on using the CreateApp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAppRequest method. -// req, resp := client.CreateAppRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/CreateApp -func (c *OpsWorks) CreateAppRequest(input *CreateAppInput) (req *request.Request, output *CreateAppOutput) { - op := &request.Operation{ - Name: opCreateApp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAppInput{} - } - - output = &CreateAppOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateApp API operation for AWS OpsWorks. -// -// Creates an app for a specified stack. For more information, see Creating -// Apps (http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation CreateApp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/CreateApp -func (c *OpsWorks) CreateApp(input *CreateAppInput) (*CreateAppOutput, error) { - req, out := c.CreateAppRequest(input) - return out, req.Send() -} - -// CreateAppWithContext is the same as CreateApp with the addition of -// the ability to pass a context and additional request options. -// -// See CreateApp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) CreateAppWithContext(ctx aws.Context, input *CreateAppInput, opts ...request.Option) (*CreateAppOutput, error) { - req, out := c.CreateAppRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const 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/opsworks-2013-02-18/CreateDeployment -func (c *OpsWorks) CreateDeploymentRequest(input *CreateDeploymentInput) (req *request.Request, output *CreateDeploymentOutput) { - op := &request.Operation{ - Name: opCreateDeployment, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDeploymentInput{} - } - - output = &CreateDeploymentOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDeployment API operation for AWS OpsWorks. -// -// Runs deployment or stack commands. For more information, see Deploying Apps -// (http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-deploying.html) -// and Run Stack Commands (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-commands.html). -// -// Required Permissions: To use this action, an IAM user must have a Deploy -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation CreateDeployment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/CreateDeployment -func (c *OpsWorks) 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 *OpsWorks) 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 opCreateInstance = "CreateInstance" - -// CreateInstanceRequest generates a "aws/request.Request" representing the -// client's request for the CreateInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateInstance for more information on using the CreateInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateInstanceRequest method. -// req, resp := client.CreateInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/CreateInstance -func (c *OpsWorks) CreateInstanceRequest(input *CreateInstanceInput) (req *request.Request, output *CreateInstanceOutput) { - op := &request.Operation{ - Name: opCreateInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateInstanceInput{} - } - - output = &CreateInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateInstance API operation for AWS OpsWorks. -// -// Creates an instance in a specified stack. For more information, see Adding -// an Instance to a Layer (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-add.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation CreateInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/CreateInstance -func (c *OpsWorks) CreateInstance(input *CreateInstanceInput) (*CreateInstanceOutput, error) { - req, out := c.CreateInstanceRequest(input) - return out, req.Send() -} - -// CreateInstanceWithContext is the same as CreateInstance with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) CreateInstanceWithContext(ctx aws.Context, input *CreateInstanceInput, opts ...request.Option) (*CreateInstanceOutput, error) { - req, out := c.CreateInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLayer = "CreateLayer" - -// CreateLayerRequest generates a "aws/request.Request" representing the -// client's request for the CreateLayer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLayer for more information on using the CreateLayer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLayerRequest method. -// req, resp := client.CreateLayerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/CreateLayer -func (c *OpsWorks) CreateLayerRequest(input *CreateLayerInput) (req *request.Request, output *CreateLayerOutput) { - op := &request.Operation{ - Name: opCreateLayer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLayerInput{} - } - - output = &CreateLayerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLayer API operation for AWS OpsWorks. -// -// Creates a layer. For more information, see How to Create a Layer (http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-create.html). -// -// You should use CreateLayer for noncustom layer types such as PHP App Server -// only if the stack does not have an existing layer of that type. A stack can -// have at most one instance of each noncustom layer; if you attempt to create -// a second instance, CreateLayer fails. A stack can have an arbitrary number -// of custom layers, so you can call CreateLayer as many times as you like for -// that layer type. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation CreateLayer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/CreateLayer -func (c *OpsWorks) CreateLayer(input *CreateLayerInput) (*CreateLayerOutput, error) { - req, out := c.CreateLayerRequest(input) - return out, req.Send() -} - -// CreateLayerWithContext is the same as CreateLayer with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLayer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) CreateLayerWithContext(ctx aws.Context, input *CreateLayerInput, opts ...request.Option) (*CreateLayerOutput, error) { - req, out := c.CreateLayerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStack = "CreateStack" - -// CreateStackRequest generates a "aws/request.Request" representing the -// client's request for the CreateStack operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateStack for more information on using the CreateStack -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateStackRequest method. -// req, resp := client.CreateStackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/CreateStack -func (c *OpsWorks) CreateStackRequest(input *CreateStackInput) (req *request.Request, output *CreateStackOutput) { - op := &request.Operation{ - Name: opCreateStack, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateStackInput{} - } - - output = &CreateStackOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateStack API operation for AWS OpsWorks. -// -// Creates a new stack. For more information, see Create a New Stack (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-edit.html). -// -// Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information about user -// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation CreateStack for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/CreateStack -func (c *OpsWorks) CreateStack(input *CreateStackInput) (*CreateStackOutput, error) { - req, out := c.CreateStackRequest(input) - return out, req.Send() -} - -// CreateStackWithContext is the same as CreateStack with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStack for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) CreateStackWithContext(ctx aws.Context, input *CreateStackInput, opts ...request.Option) (*CreateStackOutput, error) { - req, out := c.CreateStackRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateUserProfile = "CreateUserProfile" - -// CreateUserProfileRequest generates a "aws/request.Request" representing the -// client's request for the CreateUserProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateUserProfile for more information on using the CreateUserProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateUserProfileRequest method. -// req, resp := client.CreateUserProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/CreateUserProfile -func (c *OpsWorks) CreateUserProfileRequest(input *CreateUserProfileInput) (req *request.Request, output *CreateUserProfileOutput) { - op := &request.Operation{ - Name: opCreateUserProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateUserProfileInput{} - } - - output = &CreateUserProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateUserProfile API operation for AWS OpsWorks. -// -// Creates a new user profile. -// -// Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information about user -// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation CreateUserProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/CreateUserProfile -func (c *OpsWorks) CreateUserProfile(input *CreateUserProfileInput) (*CreateUserProfileOutput, error) { - req, out := c.CreateUserProfileRequest(input) - return out, req.Send() -} - -// CreateUserProfileWithContext is the same as CreateUserProfile with the addition of -// the ability to pass a context and additional request options. -// -// See CreateUserProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) CreateUserProfileWithContext(ctx aws.Context, input *CreateUserProfileInput, opts ...request.Option) (*CreateUserProfileOutput, error) { - req, out := c.CreateUserProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApp = "DeleteApp" - -// DeleteAppRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApp for more information on using the DeleteApp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAppRequest method. -// req, resp := client.DeleteAppRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeleteApp -func (c *OpsWorks) DeleteAppRequest(input *DeleteAppInput) (req *request.Request, output *DeleteAppOutput) { - op := &request.Operation{ - Name: opDeleteApp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAppInput{} - } - - output = &DeleteAppOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteApp API operation for AWS OpsWorks. -// -// Deletes a specified app. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DeleteApp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeleteApp -func (c *OpsWorks) DeleteApp(input *DeleteAppInput) (*DeleteAppOutput, error) { - req, out := c.DeleteAppRequest(input) - return out, req.Send() -} - -// DeleteAppWithContext is the same as DeleteApp with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DeleteAppWithContext(ctx aws.Context, input *DeleteAppInput, opts ...request.Option) (*DeleteAppOutput, error) { - req, out := c.DeleteAppRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteInstance = "DeleteInstance" - -// DeleteInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteInstance for more information on using the DeleteInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteInstanceRequest method. -// req, resp := client.DeleteInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeleteInstance -func (c *OpsWorks) DeleteInstanceRequest(input *DeleteInstanceInput) (req *request.Request, output *DeleteInstanceOutput) { - op := &request.Operation{ - Name: opDeleteInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteInstanceInput{} - } - - output = &DeleteInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteInstance API operation for AWS OpsWorks. -// -// Deletes a specified instance, which terminates the associated Amazon EC2 -// instance. You must stop an instance before you can delete it. -// -// For more information, see Deleting Instances (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-delete.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DeleteInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeleteInstance -func (c *OpsWorks) DeleteInstance(input *DeleteInstanceInput) (*DeleteInstanceOutput, error) { - req, out := c.DeleteInstanceRequest(input) - return out, req.Send() -} - -// DeleteInstanceWithContext is the same as DeleteInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DeleteInstanceWithContext(ctx aws.Context, input *DeleteInstanceInput, opts ...request.Option) (*DeleteInstanceOutput, error) { - req, out := c.DeleteInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLayer = "DeleteLayer" - -// DeleteLayerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLayer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLayer for more information on using the DeleteLayer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLayerRequest method. -// req, resp := client.DeleteLayerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeleteLayer -func (c *OpsWorks) DeleteLayerRequest(input *DeleteLayerInput) (req *request.Request, output *DeleteLayerOutput) { - op := &request.Operation{ - Name: opDeleteLayer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLayerInput{} - } - - output = &DeleteLayerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLayer API operation for AWS OpsWorks. -// -// Deletes a specified layer. You must first stop and then delete all associated -// instances or unassign registered instances. For more information, see How -// to Delete a Layer (http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-delete.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DeleteLayer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeleteLayer -func (c *OpsWorks) DeleteLayer(input *DeleteLayerInput) (*DeleteLayerOutput, error) { - req, out := c.DeleteLayerRequest(input) - return out, req.Send() -} - -// DeleteLayerWithContext is the same as DeleteLayer with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLayer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DeleteLayerWithContext(ctx aws.Context, input *DeleteLayerInput, opts ...request.Option) (*DeleteLayerOutput, error) { - req, out := c.DeleteLayerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteStack = "DeleteStack" - -// DeleteStackRequest generates a "aws/request.Request" representing the -// client's request for the DeleteStack operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteStack for more information on using the DeleteStack -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteStackRequest method. -// req, resp := client.DeleteStackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeleteStack -func (c *OpsWorks) DeleteStackRequest(input *DeleteStackInput) (req *request.Request, output *DeleteStackOutput) { - op := &request.Operation{ - Name: opDeleteStack, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteStackInput{} - } - - output = &DeleteStackOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteStack API operation for AWS OpsWorks. -// -// Deletes a specified stack. You must first delete all instances, layers, and -// apps or deregister registered instances. For more information, see Shut Down -// a Stack (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-shutting.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DeleteStack for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeleteStack -func (c *OpsWorks) DeleteStack(input *DeleteStackInput) (*DeleteStackOutput, error) { - req, out := c.DeleteStackRequest(input) - return out, req.Send() -} - -// DeleteStackWithContext is the same as DeleteStack with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteStack for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DeleteStackWithContext(ctx aws.Context, input *DeleteStackInput, opts ...request.Option) (*DeleteStackOutput, error) { - req, out := c.DeleteStackRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUserProfile = "DeleteUserProfile" - -// DeleteUserProfileRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUserProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUserProfile for more information on using the DeleteUserProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteUserProfileRequest method. -// req, resp := client.DeleteUserProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeleteUserProfile -func (c *OpsWorks) DeleteUserProfileRequest(input *DeleteUserProfileInput) (req *request.Request, output *DeleteUserProfileOutput) { - op := &request.Operation{ - Name: opDeleteUserProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUserProfileInput{} - } - - output = &DeleteUserProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUserProfile API operation for AWS OpsWorks. -// -// Deletes a user profile. -// -// Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information about user -// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DeleteUserProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeleteUserProfile -func (c *OpsWorks) DeleteUserProfile(input *DeleteUserProfileInput) (*DeleteUserProfileOutput, error) { - req, out := c.DeleteUserProfileRequest(input) - return out, req.Send() -} - -// DeleteUserProfileWithContext is the same as DeleteUserProfile with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUserProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DeleteUserProfileWithContext(ctx aws.Context, input *DeleteUserProfileInput, opts ...request.Option) (*DeleteUserProfileOutput, error) { - req, out := c.DeleteUserProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterEcsCluster = "DeregisterEcsCluster" - -// DeregisterEcsClusterRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterEcsCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterEcsCluster for more information on using the DeregisterEcsCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterEcsClusterRequest method. -// req, resp := client.DeregisterEcsClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeregisterEcsCluster -func (c *OpsWorks) DeregisterEcsClusterRequest(input *DeregisterEcsClusterInput) (req *request.Request, output *DeregisterEcsClusterOutput) { - op := &request.Operation{ - Name: opDeregisterEcsCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterEcsClusterInput{} - } - - output = &DeregisterEcsClusterOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterEcsCluster API operation for AWS OpsWorks. -// -// Deregisters a specified Amazon ECS cluster from a stack. For more information, -// see Resource Management (http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-ecscluster.html#workinglayers-ecscluster-delete). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack or an attached policy that explicitly grants -// permissions. For more information on user permissions, see http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html -// (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DeregisterEcsCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeregisterEcsCluster -func (c *OpsWorks) DeregisterEcsCluster(input *DeregisterEcsClusterInput) (*DeregisterEcsClusterOutput, error) { - req, out := c.DeregisterEcsClusterRequest(input) - return out, req.Send() -} - -// DeregisterEcsClusterWithContext is the same as DeregisterEcsCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterEcsCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DeregisterEcsClusterWithContext(ctx aws.Context, input *DeregisterEcsClusterInput, opts ...request.Option) (*DeregisterEcsClusterOutput, error) { - req, out := c.DeregisterEcsClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterElasticIp = "DeregisterElasticIp" - -// DeregisterElasticIpRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterElasticIp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterElasticIp for more information on using the DeregisterElasticIp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterElasticIpRequest method. -// req, resp := client.DeregisterElasticIpRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeregisterElasticIp -func (c *OpsWorks) DeregisterElasticIpRequest(input *DeregisterElasticIpInput) (req *request.Request, output *DeregisterElasticIpOutput) { - op := &request.Operation{ - Name: opDeregisterElasticIp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterElasticIpInput{} - } - - output = &DeregisterElasticIpOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterElasticIp API operation for AWS OpsWorks. -// -// Deregisters a specified Elastic IP address. The address can then be registered -// by another stack. For more information, see Resource Management (http://docs.aws.amazon.com/opsworks/latest/userguide/resources.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DeregisterElasticIp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeregisterElasticIp -func (c *OpsWorks) DeregisterElasticIp(input *DeregisterElasticIpInput) (*DeregisterElasticIpOutput, error) { - req, out := c.DeregisterElasticIpRequest(input) - return out, req.Send() -} - -// DeregisterElasticIpWithContext is the same as DeregisterElasticIp with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterElasticIp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DeregisterElasticIpWithContext(ctx aws.Context, input *DeregisterElasticIpInput, opts ...request.Option) (*DeregisterElasticIpOutput, error) { - req, out := c.DeregisterElasticIpRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterInstance = "DeregisterInstance" - -// DeregisterInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterInstance for more information on using the DeregisterInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterInstanceRequest method. -// req, resp := client.DeregisterInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeregisterInstance -func (c *OpsWorks) DeregisterInstanceRequest(input *DeregisterInstanceInput) (req *request.Request, output *DeregisterInstanceOutput) { - op := &request.Operation{ - Name: opDeregisterInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterInstanceInput{} - } - - output = &DeregisterInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterInstance API operation for AWS OpsWorks. -// -// Deregister a registered Amazon EC2 or on-premises instance. This action removes -// the instance from the stack and returns it to your control. This action cannot -// be used with instances that were created with AWS OpsWorks Stacks. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DeregisterInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeregisterInstance -func (c *OpsWorks) DeregisterInstance(input *DeregisterInstanceInput) (*DeregisterInstanceOutput, error) { - req, out := c.DeregisterInstanceRequest(input) - return out, req.Send() -} - -// DeregisterInstanceWithContext is the same as DeregisterInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DeregisterInstanceWithContext(ctx aws.Context, input *DeregisterInstanceInput, opts ...request.Option) (*DeregisterInstanceOutput, error) { - req, out := c.DeregisterInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterRdsDbInstance = "DeregisterRdsDbInstance" - -// DeregisterRdsDbInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterRdsDbInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterRdsDbInstance for more information on using the DeregisterRdsDbInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterRdsDbInstanceRequest method. -// req, resp := client.DeregisterRdsDbInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeregisterRdsDbInstance -func (c *OpsWorks) DeregisterRdsDbInstanceRequest(input *DeregisterRdsDbInstanceInput) (req *request.Request, output *DeregisterRdsDbInstanceOutput) { - op := &request.Operation{ - Name: opDeregisterRdsDbInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterRdsDbInstanceInput{} - } - - output = &DeregisterRdsDbInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterRdsDbInstance API operation for AWS OpsWorks. -// -// Deregisters an Amazon RDS instance. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DeregisterRdsDbInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeregisterRdsDbInstance -func (c *OpsWorks) DeregisterRdsDbInstance(input *DeregisterRdsDbInstanceInput) (*DeregisterRdsDbInstanceOutput, error) { - req, out := c.DeregisterRdsDbInstanceRequest(input) - return out, req.Send() -} - -// DeregisterRdsDbInstanceWithContext is the same as DeregisterRdsDbInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterRdsDbInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DeregisterRdsDbInstanceWithContext(ctx aws.Context, input *DeregisterRdsDbInstanceInput, opts ...request.Option) (*DeregisterRdsDbInstanceOutput, error) { - req, out := c.DeregisterRdsDbInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterVolume = "DeregisterVolume" - -// DeregisterVolumeRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterVolume for more information on using the DeregisterVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterVolumeRequest method. -// req, resp := client.DeregisterVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeregisterVolume -func (c *OpsWorks) DeregisterVolumeRequest(input *DeregisterVolumeInput) (req *request.Request, output *DeregisterVolumeOutput) { - op := &request.Operation{ - Name: opDeregisterVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterVolumeInput{} - } - - output = &DeregisterVolumeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterVolume API operation for AWS OpsWorks. -// -// Deregisters an Amazon EBS volume. The volume can then be registered by another -// stack. For more information, see Resource Management (http://docs.aws.amazon.com/opsworks/latest/userguide/resources.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DeregisterVolume for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DeregisterVolume -func (c *OpsWorks) DeregisterVolume(input *DeregisterVolumeInput) (*DeregisterVolumeOutput, error) { - req, out := c.DeregisterVolumeRequest(input) - return out, req.Send() -} - -// DeregisterVolumeWithContext is the same as DeregisterVolume with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DeregisterVolumeWithContext(ctx aws.Context, input *DeregisterVolumeInput, opts ...request.Option) (*DeregisterVolumeOutput, error) { - req, out := c.DeregisterVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAgentVersions = "DescribeAgentVersions" - -// DescribeAgentVersionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAgentVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAgentVersions for more information on using the DescribeAgentVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAgentVersionsRequest method. -// req, resp := client.DescribeAgentVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeAgentVersions -func (c *OpsWorks) DescribeAgentVersionsRequest(input *DescribeAgentVersionsInput) (req *request.Request, output *DescribeAgentVersionsOutput) { - op := &request.Operation{ - Name: opDescribeAgentVersions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAgentVersionsInput{} - } - - output = &DescribeAgentVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAgentVersions API operation for AWS OpsWorks. -// -// Describes the available AWS OpsWorks Stacks agent versions. You must specify -// a stack ID or a configuration manager. DescribeAgentVersions returns a list -// of available agent versions for the specified stack or configuration manager. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeAgentVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeAgentVersions -func (c *OpsWorks) DescribeAgentVersions(input *DescribeAgentVersionsInput) (*DescribeAgentVersionsOutput, error) { - req, out := c.DescribeAgentVersionsRequest(input) - return out, req.Send() -} - -// DescribeAgentVersionsWithContext is the same as DescribeAgentVersions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAgentVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeAgentVersionsWithContext(ctx aws.Context, input *DescribeAgentVersionsInput, opts ...request.Option) (*DescribeAgentVersionsOutput, error) { - req, out := c.DescribeAgentVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeApps = "DescribeApps" - -// DescribeAppsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeApps operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeApps for more information on using the DescribeApps -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAppsRequest method. -// req, resp := client.DescribeAppsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeApps -func (c *OpsWorks) DescribeAppsRequest(input *DescribeAppsInput) (req *request.Request, output *DescribeAppsOutput) { - op := &request.Operation{ - Name: opDescribeApps, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAppsInput{} - } - - output = &DescribeAppsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeApps API operation for AWS OpsWorks. -// -// Requests a description of a specified set of apps. -// -// This call accepts only one resource-identifying parameter. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeApps for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeApps -func (c *OpsWorks) DescribeApps(input *DescribeAppsInput) (*DescribeAppsOutput, error) { - req, out := c.DescribeAppsRequest(input) - return out, req.Send() -} - -// DescribeAppsWithContext is the same as DescribeApps with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeApps for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeAppsWithContext(ctx aws.Context, input *DescribeAppsInput, opts ...request.Option) (*DescribeAppsOutput, error) { - req, out := c.DescribeAppsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCommands = "DescribeCommands" - -// DescribeCommandsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCommands operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCommands for more information on using the DescribeCommands -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCommandsRequest method. -// req, resp := client.DescribeCommandsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeCommands -func (c *OpsWorks) DescribeCommandsRequest(input *DescribeCommandsInput) (req *request.Request, output *DescribeCommandsOutput) { - op := &request.Operation{ - Name: opDescribeCommands, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCommandsInput{} - } - - output = &DescribeCommandsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCommands API operation for AWS OpsWorks. -// -// Describes the results of specified commands. -// -// This call accepts only one resource-identifying parameter. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeCommands for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeCommands -func (c *OpsWorks) DescribeCommands(input *DescribeCommandsInput) (*DescribeCommandsOutput, error) { - req, out := c.DescribeCommandsRequest(input) - return out, req.Send() -} - -// DescribeCommandsWithContext is the same as DescribeCommands with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCommands for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeCommandsWithContext(ctx aws.Context, input *DescribeCommandsInput, opts ...request.Option) (*DescribeCommandsOutput, error) { - req, out := c.DescribeCommandsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDeployments = "DescribeDeployments" - -// DescribeDeploymentsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDeployments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDeployments for more information on using the DescribeDeployments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDeploymentsRequest method. -// req, resp := client.DescribeDeploymentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeDeployments -func (c *OpsWorks) DescribeDeploymentsRequest(input *DescribeDeploymentsInput) (req *request.Request, output *DescribeDeploymentsOutput) { - op := &request.Operation{ - Name: opDescribeDeployments, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDeploymentsInput{} - } - - output = &DescribeDeploymentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDeployments API operation for AWS OpsWorks. -// -// Requests a description of a specified set of deployments. -// -// This call accepts only one resource-identifying parameter. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeDeployments for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeDeployments -func (c *OpsWorks) DescribeDeployments(input *DescribeDeploymentsInput) (*DescribeDeploymentsOutput, error) { - req, out := c.DescribeDeploymentsRequest(input) - return out, req.Send() -} - -// DescribeDeploymentsWithContext is the same as DescribeDeployments with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDeployments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeDeploymentsWithContext(ctx aws.Context, input *DescribeDeploymentsInput, opts ...request.Option) (*DescribeDeploymentsOutput, error) { - req, out := c.DescribeDeploymentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEcsClusters = "DescribeEcsClusters" - -// DescribeEcsClustersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEcsClusters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEcsClusters for more information on using the DescribeEcsClusters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEcsClustersRequest method. -// req, resp := client.DescribeEcsClustersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeEcsClusters -func (c *OpsWorks) DescribeEcsClustersRequest(input *DescribeEcsClustersInput) (req *request.Request, output *DescribeEcsClustersOutput) { - op := &request.Operation{ - Name: opDescribeEcsClusters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEcsClustersInput{} - } - - output = &DescribeEcsClustersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEcsClusters API operation for AWS OpsWorks. -// -// Describes Amazon ECS clusters that are registered with a stack. If you specify -// only a stack ID, you can use the MaxResults and NextToken parameters to paginate -// the response. However, AWS OpsWorks Stacks currently supports only one cluster -// per layer, so the result set has a maximum of one element. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack or an attached policy that explicitly -// grants permission. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// This call accepts only one resource-identifying parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeEcsClusters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeEcsClusters -func (c *OpsWorks) DescribeEcsClusters(input *DescribeEcsClustersInput) (*DescribeEcsClustersOutput, error) { - req, out := c.DescribeEcsClustersRequest(input) - return out, req.Send() -} - -// DescribeEcsClustersWithContext is the same as DescribeEcsClusters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEcsClusters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeEcsClustersWithContext(ctx aws.Context, input *DescribeEcsClustersInput, opts ...request.Option) (*DescribeEcsClustersOutput, error) { - req, out := c.DescribeEcsClustersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEcsClustersPages iterates over the pages of a DescribeEcsClusters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEcsClusters 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 DescribeEcsClusters operation. -// pageNum := 0 -// err := client.DescribeEcsClustersPages(params, -// func(page *DescribeEcsClustersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *OpsWorks) DescribeEcsClustersPages(input *DescribeEcsClustersInput, fn func(*DescribeEcsClustersOutput, bool) bool) error { - return c.DescribeEcsClustersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEcsClustersPagesWithContext same as DescribeEcsClustersPages 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 *OpsWorks) DescribeEcsClustersPagesWithContext(ctx aws.Context, input *DescribeEcsClustersInput, fn func(*DescribeEcsClustersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEcsClustersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEcsClustersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEcsClustersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeElasticIps = "DescribeElasticIps" - -// DescribeElasticIpsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeElasticIps operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeElasticIps for more information on using the DescribeElasticIps -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeElasticIpsRequest method. -// req, resp := client.DescribeElasticIpsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeElasticIps -func (c *OpsWorks) DescribeElasticIpsRequest(input *DescribeElasticIpsInput) (req *request.Request, output *DescribeElasticIpsOutput) { - op := &request.Operation{ - Name: opDescribeElasticIps, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeElasticIpsInput{} - } - - output = &DescribeElasticIpsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeElasticIps API operation for AWS OpsWorks. -// -// Describes Elastic IP addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html). -// -// This call accepts only one resource-identifying parameter. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeElasticIps for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeElasticIps -func (c *OpsWorks) DescribeElasticIps(input *DescribeElasticIpsInput) (*DescribeElasticIpsOutput, error) { - req, out := c.DescribeElasticIpsRequest(input) - return out, req.Send() -} - -// DescribeElasticIpsWithContext is the same as DescribeElasticIps with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeElasticIps for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeElasticIpsWithContext(ctx aws.Context, input *DescribeElasticIpsInput, opts ...request.Option) (*DescribeElasticIpsOutput, error) { - req, out := c.DescribeElasticIpsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeElasticLoadBalancers = "DescribeElasticLoadBalancers" - -// DescribeElasticLoadBalancersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeElasticLoadBalancers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeElasticLoadBalancers for more information on using the DescribeElasticLoadBalancers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeElasticLoadBalancersRequest method. -// req, resp := client.DescribeElasticLoadBalancersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeElasticLoadBalancers -func (c *OpsWorks) DescribeElasticLoadBalancersRequest(input *DescribeElasticLoadBalancersInput) (req *request.Request, output *DescribeElasticLoadBalancersOutput) { - op := &request.Operation{ - Name: opDescribeElasticLoadBalancers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeElasticLoadBalancersInput{} - } - - output = &DescribeElasticLoadBalancersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeElasticLoadBalancers API operation for AWS OpsWorks. -// -// Describes a stack's Elastic Load Balancing instances. -// -// This call accepts only one resource-identifying parameter. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeElasticLoadBalancers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeElasticLoadBalancers -func (c *OpsWorks) DescribeElasticLoadBalancers(input *DescribeElasticLoadBalancersInput) (*DescribeElasticLoadBalancersOutput, error) { - req, out := c.DescribeElasticLoadBalancersRequest(input) - return out, req.Send() -} - -// DescribeElasticLoadBalancersWithContext is the same as DescribeElasticLoadBalancers with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeElasticLoadBalancers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeElasticLoadBalancersWithContext(ctx aws.Context, input *DescribeElasticLoadBalancersInput, opts ...request.Option) (*DescribeElasticLoadBalancersOutput, error) { - req, out := c.DescribeElasticLoadBalancersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInstances = "DescribeInstances" - -// DescribeInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInstances for more information on using the DescribeInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInstancesRequest method. -// req, resp := client.DescribeInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeInstances -func (c *OpsWorks) DescribeInstancesRequest(input *DescribeInstancesInput) (req *request.Request, output *DescribeInstancesOutput) { - op := &request.Operation{ - Name: opDescribeInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInstancesInput{} - } - - output = &DescribeInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInstances API operation for AWS OpsWorks. -// -// Requests a description of a set of instances. -// -// This call accepts only one resource-identifying parameter. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeInstances -func (c *OpsWorks) DescribeInstances(input *DescribeInstancesInput) (*DescribeInstancesOutput, error) { - req, out := c.DescribeInstancesRequest(input) - return out, req.Send() -} - -// DescribeInstancesWithContext is the same as DescribeInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeInstancesWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.Option) (*DescribeInstancesOutput, error) { - req, out := c.DescribeInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLayers = "DescribeLayers" - -// DescribeLayersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLayers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLayers for more information on using the DescribeLayers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLayersRequest method. -// req, resp := client.DescribeLayersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeLayers -func (c *OpsWorks) DescribeLayersRequest(input *DescribeLayersInput) (req *request.Request, output *DescribeLayersOutput) { - op := &request.Operation{ - Name: opDescribeLayers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLayersInput{} - } - - output = &DescribeLayersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLayers API operation for AWS OpsWorks. -// -// Requests a description of one or more layers in a specified stack. -// -// This call accepts only one resource-identifying parameter. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeLayers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeLayers -func (c *OpsWorks) DescribeLayers(input *DescribeLayersInput) (*DescribeLayersOutput, error) { - req, out := c.DescribeLayersRequest(input) - return out, req.Send() -} - -// DescribeLayersWithContext is the same as DescribeLayers with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLayers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeLayersWithContext(ctx aws.Context, input *DescribeLayersInput, opts ...request.Option) (*DescribeLayersOutput, error) { - req, out := c.DescribeLayersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLoadBasedAutoScaling = "DescribeLoadBasedAutoScaling" - -// DescribeLoadBasedAutoScalingRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBasedAutoScaling operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLoadBasedAutoScaling for more information on using the DescribeLoadBasedAutoScaling -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLoadBasedAutoScalingRequest method. -// req, resp := client.DescribeLoadBasedAutoScalingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeLoadBasedAutoScaling -func (c *OpsWorks) DescribeLoadBasedAutoScalingRequest(input *DescribeLoadBasedAutoScalingInput) (req *request.Request, output *DescribeLoadBasedAutoScalingOutput) { - op := &request.Operation{ - Name: opDescribeLoadBasedAutoScaling, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLoadBasedAutoScalingInput{} - } - - output = &DescribeLoadBasedAutoScalingOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBasedAutoScaling API operation for AWS OpsWorks. -// -// Describes load-based auto scaling configurations for specified layers. -// -// You must specify at least one of the parameters. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeLoadBasedAutoScaling for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeLoadBasedAutoScaling -func (c *OpsWorks) DescribeLoadBasedAutoScaling(input *DescribeLoadBasedAutoScalingInput) (*DescribeLoadBasedAutoScalingOutput, error) { - req, out := c.DescribeLoadBasedAutoScalingRequest(input) - return out, req.Send() -} - -// DescribeLoadBasedAutoScalingWithContext is the same as DescribeLoadBasedAutoScaling with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBasedAutoScaling for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeLoadBasedAutoScalingWithContext(ctx aws.Context, input *DescribeLoadBasedAutoScalingInput, opts ...request.Option) (*DescribeLoadBasedAutoScalingOutput, error) { - req, out := c.DescribeLoadBasedAutoScalingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMyUserProfile = "DescribeMyUserProfile" - -// DescribeMyUserProfileRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMyUserProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMyUserProfile for more information on using the DescribeMyUserProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMyUserProfileRequest method. -// req, resp := client.DescribeMyUserProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeMyUserProfile -func (c *OpsWorks) DescribeMyUserProfileRequest(input *DescribeMyUserProfileInput) (req *request.Request, output *DescribeMyUserProfileOutput) { - op := &request.Operation{ - Name: opDescribeMyUserProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMyUserProfileInput{} - } - - output = &DescribeMyUserProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMyUserProfile API operation for AWS OpsWorks. -// -// Describes a user's SSH information. -// -// Required Permissions: To use this action, an IAM user must have self-management -// enabled or an attached policy that explicitly grants permissions. For more -// information about user permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeMyUserProfile for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeMyUserProfile -func (c *OpsWorks) DescribeMyUserProfile(input *DescribeMyUserProfileInput) (*DescribeMyUserProfileOutput, error) { - req, out := c.DescribeMyUserProfileRequest(input) - return out, req.Send() -} - -// DescribeMyUserProfileWithContext is the same as DescribeMyUserProfile with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMyUserProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeMyUserProfileWithContext(ctx aws.Context, input *DescribeMyUserProfileInput, opts ...request.Option) (*DescribeMyUserProfileOutput, error) { - req, out := c.DescribeMyUserProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeOperatingSystems = "DescribeOperatingSystems" - -// DescribeOperatingSystemsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeOperatingSystems operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeOperatingSystems for more information on using the DescribeOperatingSystems -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeOperatingSystemsRequest method. -// req, resp := client.DescribeOperatingSystemsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeOperatingSystems -func (c *OpsWorks) DescribeOperatingSystemsRequest(input *DescribeOperatingSystemsInput) (req *request.Request, output *DescribeOperatingSystemsOutput) { - op := &request.Operation{ - Name: opDescribeOperatingSystems, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeOperatingSystemsInput{} - } - - output = &DescribeOperatingSystemsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeOperatingSystems API operation for AWS OpsWorks. -// -// Describes the operating systems that are supported by AWS OpsWorks Stacks. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeOperatingSystems for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeOperatingSystems -func (c *OpsWorks) DescribeOperatingSystems(input *DescribeOperatingSystemsInput) (*DescribeOperatingSystemsOutput, error) { - req, out := c.DescribeOperatingSystemsRequest(input) - return out, req.Send() -} - -// DescribeOperatingSystemsWithContext is the same as DescribeOperatingSystems with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeOperatingSystems for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeOperatingSystemsWithContext(ctx aws.Context, input *DescribeOperatingSystemsInput, opts ...request.Option) (*DescribeOperatingSystemsOutput, error) { - req, out := c.DescribeOperatingSystemsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribePermissions = "DescribePermissions" - -// DescribePermissionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribePermissions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePermissions for more information on using the DescribePermissions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePermissionsRequest method. -// req, resp := client.DescribePermissionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribePermissions -func (c *OpsWorks) DescribePermissionsRequest(input *DescribePermissionsInput) (req *request.Request, output *DescribePermissionsOutput) { - op := &request.Operation{ - Name: opDescribePermissions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePermissionsInput{} - } - - output = &DescribePermissionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePermissions API operation for AWS OpsWorks. -// -// Describes the permissions for a specified stack. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribePermissions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribePermissions -func (c *OpsWorks) DescribePermissions(input *DescribePermissionsInput) (*DescribePermissionsOutput, error) { - req, out := c.DescribePermissionsRequest(input) - return out, req.Send() -} - -// DescribePermissionsWithContext is the same as DescribePermissions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePermissions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribePermissionsWithContext(ctx aws.Context, input *DescribePermissionsInput, opts ...request.Option) (*DescribePermissionsOutput, error) { - req, out := c.DescribePermissionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeRaidArrays = "DescribeRaidArrays" - -// DescribeRaidArraysRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRaidArrays operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRaidArrays for more information on using the DescribeRaidArrays -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRaidArraysRequest method. -// req, resp := client.DescribeRaidArraysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeRaidArrays -func (c *OpsWorks) DescribeRaidArraysRequest(input *DescribeRaidArraysInput) (req *request.Request, output *DescribeRaidArraysOutput) { - op := &request.Operation{ - Name: opDescribeRaidArrays, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeRaidArraysInput{} - } - - output = &DescribeRaidArraysOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRaidArrays API operation for AWS OpsWorks. -// -// Describe an instance's RAID arrays. -// -// This call accepts only one resource-identifying parameter. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeRaidArrays for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeRaidArrays -func (c *OpsWorks) DescribeRaidArrays(input *DescribeRaidArraysInput) (*DescribeRaidArraysOutput, error) { - req, out := c.DescribeRaidArraysRequest(input) - return out, req.Send() -} - -// DescribeRaidArraysWithContext is the same as DescribeRaidArrays with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRaidArrays for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeRaidArraysWithContext(ctx aws.Context, input *DescribeRaidArraysInput, opts ...request.Option) (*DescribeRaidArraysOutput, error) { - req, out := c.DescribeRaidArraysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeRdsDbInstances = "DescribeRdsDbInstances" - -// DescribeRdsDbInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRdsDbInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRdsDbInstances for more information on using the DescribeRdsDbInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRdsDbInstancesRequest method. -// req, resp := client.DescribeRdsDbInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeRdsDbInstances -func (c *OpsWorks) DescribeRdsDbInstancesRequest(input *DescribeRdsDbInstancesInput) (req *request.Request, output *DescribeRdsDbInstancesOutput) { - op := &request.Operation{ - Name: opDescribeRdsDbInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeRdsDbInstancesInput{} - } - - output = &DescribeRdsDbInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRdsDbInstances API operation for AWS OpsWorks. -// -// Describes Amazon RDS instances. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// This call accepts only one resource-identifying parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeRdsDbInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeRdsDbInstances -func (c *OpsWorks) DescribeRdsDbInstances(input *DescribeRdsDbInstancesInput) (*DescribeRdsDbInstancesOutput, error) { - req, out := c.DescribeRdsDbInstancesRequest(input) - return out, req.Send() -} - -// DescribeRdsDbInstancesWithContext is the same as DescribeRdsDbInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRdsDbInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeRdsDbInstancesWithContext(ctx aws.Context, input *DescribeRdsDbInstancesInput, opts ...request.Option) (*DescribeRdsDbInstancesOutput, error) { - req, out := c.DescribeRdsDbInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeServiceErrors = "DescribeServiceErrors" - -// DescribeServiceErrorsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeServiceErrors operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeServiceErrors for more information on using the DescribeServiceErrors -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeServiceErrorsRequest method. -// req, resp := client.DescribeServiceErrorsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeServiceErrors -func (c *OpsWorks) DescribeServiceErrorsRequest(input *DescribeServiceErrorsInput) (req *request.Request, output *DescribeServiceErrorsOutput) { - op := &request.Operation{ - Name: opDescribeServiceErrors, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeServiceErrorsInput{} - } - - output = &DescribeServiceErrorsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeServiceErrors API operation for AWS OpsWorks. -// -// Describes AWS OpsWorks Stacks service errors. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// This call accepts only one resource-identifying parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeServiceErrors for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeServiceErrors -func (c *OpsWorks) DescribeServiceErrors(input *DescribeServiceErrorsInput) (*DescribeServiceErrorsOutput, error) { - req, out := c.DescribeServiceErrorsRequest(input) - return out, req.Send() -} - -// DescribeServiceErrorsWithContext is the same as DescribeServiceErrors with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeServiceErrors for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeServiceErrorsWithContext(ctx aws.Context, input *DescribeServiceErrorsInput, opts ...request.Option) (*DescribeServiceErrorsOutput, error) { - req, out := c.DescribeServiceErrorsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStackProvisioningParameters = "DescribeStackProvisioningParameters" - -// DescribeStackProvisioningParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStackProvisioningParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStackProvisioningParameters for more information on using the DescribeStackProvisioningParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStackProvisioningParametersRequest method. -// req, resp := client.DescribeStackProvisioningParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeStackProvisioningParameters -func (c *OpsWorks) DescribeStackProvisioningParametersRequest(input *DescribeStackProvisioningParametersInput) (req *request.Request, output *DescribeStackProvisioningParametersOutput) { - op := &request.Operation{ - Name: opDescribeStackProvisioningParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStackProvisioningParametersInput{} - } - - output = &DescribeStackProvisioningParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStackProvisioningParameters API operation for AWS OpsWorks. -// -// Requests a description of a stack's provisioning parameters. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeStackProvisioningParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeStackProvisioningParameters -func (c *OpsWorks) DescribeStackProvisioningParameters(input *DescribeStackProvisioningParametersInput) (*DescribeStackProvisioningParametersOutput, error) { - req, out := c.DescribeStackProvisioningParametersRequest(input) - return out, req.Send() -} - -// DescribeStackProvisioningParametersWithContext is the same as DescribeStackProvisioningParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStackProvisioningParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeStackProvisioningParametersWithContext(ctx aws.Context, input *DescribeStackProvisioningParametersInput, opts ...request.Option) (*DescribeStackProvisioningParametersOutput, error) { - req, out := c.DescribeStackProvisioningParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStackSummary = "DescribeStackSummary" - -// DescribeStackSummaryRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStackSummary operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStackSummary for more information on using the DescribeStackSummary -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStackSummaryRequest method. -// req, resp := client.DescribeStackSummaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeStackSummary -func (c *OpsWorks) DescribeStackSummaryRequest(input *DescribeStackSummaryInput) (req *request.Request, output *DescribeStackSummaryOutput) { - op := &request.Operation{ - Name: opDescribeStackSummary, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStackSummaryInput{} - } - - output = &DescribeStackSummaryOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStackSummary API operation for AWS OpsWorks. -// -// Describes the number of layers and apps in a specified stack, and the number -// of instances in each state, such as running_setup or online. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeStackSummary for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeStackSummary -func (c *OpsWorks) DescribeStackSummary(input *DescribeStackSummaryInput) (*DescribeStackSummaryOutput, error) { - req, out := c.DescribeStackSummaryRequest(input) - return out, req.Send() -} - -// DescribeStackSummaryWithContext is the same as DescribeStackSummary with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStackSummary for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeStackSummaryWithContext(ctx aws.Context, input *DescribeStackSummaryInput, opts ...request.Option) (*DescribeStackSummaryOutput, error) { - req, out := c.DescribeStackSummaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStacks = "DescribeStacks" - -// DescribeStacksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStacks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStacks for more information on using the DescribeStacks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStacksRequest method. -// req, resp := client.DescribeStacksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeStacks -func (c *OpsWorks) DescribeStacksRequest(input *DescribeStacksInput) (req *request.Request, output *DescribeStacksOutput) { - op := &request.Operation{ - Name: opDescribeStacks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStacksInput{} - } - - output = &DescribeStacksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStacks API operation for AWS OpsWorks. -// -// Requests a description of one or more stacks. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeStacks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeStacks -func (c *OpsWorks) DescribeStacks(input *DescribeStacksInput) (*DescribeStacksOutput, error) { - req, out := c.DescribeStacksRequest(input) - return out, req.Send() -} - -// DescribeStacksWithContext is the same as DescribeStacks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStacks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeStacksWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.Option) (*DescribeStacksOutput, error) { - req, out := c.DescribeStacksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTimeBasedAutoScaling = "DescribeTimeBasedAutoScaling" - -// DescribeTimeBasedAutoScalingRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTimeBasedAutoScaling operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTimeBasedAutoScaling for more information on using the DescribeTimeBasedAutoScaling -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTimeBasedAutoScalingRequest method. -// req, resp := client.DescribeTimeBasedAutoScalingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeTimeBasedAutoScaling -func (c *OpsWorks) DescribeTimeBasedAutoScalingRequest(input *DescribeTimeBasedAutoScalingInput) (req *request.Request, output *DescribeTimeBasedAutoScalingOutput) { - op := &request.Operation{ - Name: opDescribeTimeBasedAutoScaling, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTimeBasedAutoScalingInput{} - } - - output = &DescribeTimeBasedAutoScalingOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTimeBasedAutoScaling API operation for AWS OpsWorks. -// -// Describes time-based auto scaling configurations for specified instances. -// -// You must specify at least one of the parameters. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeTimeBasedAutoScaling for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeTimeBasedAutoScaling -func (c *OpsWorks) DescribeTimeBasedAutoScaling(input *DescribeTimeBasedAutoScalingInput) (*DescribeTimeBasedAutoScalingOutput, error) { - req, out := c.DescribeTimeBasedAutoScalingRequest(input) - return out, req.Send() -} - -// DescribeTimeBasedAutoScalingWithContext is the same as DescribeTimeBasedAutoScaling with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTimeBasedAutoScaling for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeTimeBasedAutoScalingWithContext(ctx aws.Context, input *DescribeTimeBasedAutoScalingInput, opts ...request.Option) (*DescribeTimeBasedAutoScalingOutput, error) { - req, out := c.DescribeTimeBasedAutoScalingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeUserProfiles = "DescribeUserProfiles" - -// DescribeUserProfilesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeUserProfiles operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeUserProfiles for more information on using the DescribeUserProfiles -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeUserProfilesRequest method. -// req, resp := client.DescribeUserProfilesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeUserProfiles -func (c *OpsWorks) DescribeUserProfilesRequest(input *DescribeUserProfilesInput) (req *request.Request, output *DescribeUserProfilesOutput) { - op := &request.Operation{ - Name: opDescribeUserProfiles, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeUserProfilesInput{} - } - - output = &DescribeUserProfilesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeUserProfiles API operation for AWS OpsWorks. -// -// Describe specified users. -// -// Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information about user -// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeUserProfiles for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeUserProfiles -func (c *OpsWorks) DescribeUserProfiles(input *DescribeUserProfilesInput) (*DescribeUserProfilesOutput, error) { - req, out := c.DescribeUserProfilesRequest(input) - return out, req.Send() -} - -// DescribeUserProfilesWithContext is the same as DescribeUserProfiles with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeUserProfiles for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeUserProfilesWithContext(ctx aws.Context, input *DescribeUserProfilesInput, opts ...request.Option) (*DescribeUserProfilesOutput, error) { - req, out := c.DescribeUserProfilesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVolumes = "DescribeVolumes" - -// DescribeVolumesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVolumes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVolumes for more information on using the DescribeVolumes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVolumesRequest method. -// req, resp := client.DescribeVolumesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeVolumes -func (c *OpsWorks) DescribeVolumesRequest(input *DescribeVolumesInput) (req *request.Request, output *DescribeVolumesOutput) { - op := &request.Operation{ - Name: opDescribeVolumes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeVolumesInput{} - } - - output = &DescribeVolumesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVolumes API operation for AWS OpsWorks. -// -// Describes an instance's Amazon EBS volumes. -// -// This call accepts only one resource-identifying parameter. -// -// Required Permissions: To use this action, an IAM user must have a Show, Deploy, -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information about user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DescribeVolumes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DescribeVolumes -func (c *OpsWorks) DescribeVolumes(input *DescribeVolumesInput) (*DescribeVolumesOutput, error) { - req, out := c.DescribeVolumesRequest(input) - return out, req.Send() -} - -// DescribeVolumesWithContext is the same as DescribeVolumes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVolumes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DescribeVolumesWithContext(ctx aws.Context, input *DescribeVolumesInput, opts ...request.Option) (*DescribeVolumesOutput, error) { - req, out := c.DescribeVolumesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachElasticLoadBalancer = "DetachElasticLoadBalancer" - -// DetachElasticLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the DetachElasticLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachElasticLoadBalancer for more information on using the DetachElasticLoadBalancer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachElasticLoadBalancerRequest method. -// req, resp := client.DetachElasticLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DetachElasticLoadBalancer -func (c *OpsWorks) DetachElasticLoadBalancerRequest(input *DetachElasticLoadBalancerInput) (req *request.Request, output *DetachElasticLoadBalancerOutput) { - op := &request.Operation{ - Name: opDetachElasticLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachElasticLoadBalancerInput{} - } - - output = &DetachElasticLoadBalancerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachElasticLoadBalancer API operation for AWS OpsWorks. -// -// Detaches a specified Elastic Load Balancing instance from its layer. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DetachElasticLoadBalancer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DetachElasticLoadBalancer -func (c *OpsWorks) DetachElasticLoadBalancer(input *DetachElasticLoadBalancerInput) (*DetachElasticLoadBalancerOutput, error) { - req, out := c.DetachElasticLoadBalancerRequest(input) - return out, req.Send() -} - -// DetachElasticLoadBalancerWithContext is the same as DetachElasticLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See DetachElasticLoadBalancer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DetachElasticLoadBalancerWithContext(ctx aws.Context, input *DetachElasticLoadBalancerInput, opts ...request.Option) (*DetachElasticLoadBalancerOutput, error) { - req, out := c.DetachElasticLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateElasticIp = "DisassociateElasticIp" - -// DisassociateElasticIpRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateElasticIp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateElasticIp for more information on using the DisassociateElasticIp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateElasticIpRequest method. -// req, resp := client.DisassociateElasticIpRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DisassociateElasticIp -func (c *OpsWorks) DisassociateElasticIpRequest(input *DisassociateElasticIpInput) (req *request.Request, output *DisassociateElasticIpOutput) { - op := &request.Operation{ - Name: opDisassociateElasticIp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateElasticIpInput{} - } - - output = &DisassociateElasticIpOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateElasticIp API operation for AWS OpsWorks. -// -// Disassociates an Elastic IP address from its instance. The address remains -// registered with the stack. For more information, see Resource Management -// (http://docs.aws.amazon.com/opsworks/latest/userguide/resources.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation DisassociateElasticIp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/DisassociateElasticIp -func (c *OpsWorks) DisassociateElasticIp(input *DisassociateElasticIpInput) (*DisassociateElasticIpOutput, error) { - req, out := c.DisassociateElasticIpRequest(input) - return out, req.Send() -} - -// DisassociateElasticIpWithContext is the same as DisassociateElasticIp with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateElasticIp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) DisassociateElasticIpWithContext(ctx aws.Context, input *DisassociateElasticIpInput, opts ...request.Option) (*DisassociateElasticIpOutput, error) { - req, out := c.DisassociateElasticIpRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetHostnameSuggestion = "GetHostnameSuggestion" - -// GetHostnameSuggestionRequest generates a "aws/request.Request" representing the -// client's request for the GetHostnameSuggestion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetHostnameSuggestion for more information on using the GetHostnameSuggestion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetHostnameSuggestionRequest method. -// req, resp := client.GetHostnameSuggestionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/GetHostnameSuggestion -func (c *OpsWorks) GetHostnameSuggestionRequest(input *GetHostnameSuggestionInput) (req *request.Request, output *GetHostnameSuggestionOutput) { - op := &request.Operation{ - Name: opGetHostnameSuggestion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetHostnameSuggestionInput{} - } - - output = &GetHostnameSuggestionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetHostnameSuggestion API operation for AWS OpsWorks. -// -// Gets a generated host name for the specified layer, based on the current -// host name theme. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation GetHostnameSuggestion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/GetHostnameSuggestion -func (c *OpsWorks) GetHostnameSuggestion(input *GetHostnameSuggestionInput) (*GetHostnameSuggestionOutput, error) { - req, out := c.GetHostnameSuggestionRequest(input) - return out, req.Send() -} - -// GetHostnameSuggestionWithContext is the same as GetHostnameSuggestion with the addition of -// the ability to pass a context and additional request options. -// -// See GetHostnameSuggestion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) GetHostnameSuggestionWithContext(ctx aws.Context, input *GetHostnameSuggestionInput, opts ...request.Option) (*GetHostnameSuggestionOutput, error) { - req, out := c.GetHostnameSuggestionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGrantAccess = "GrantAccess" - -// GrantAccessRequest generates a "aws/request.Request" representing the -// client's request for the GrantAccess operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GrantAccess for more information on using the GrantAccess -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GrantAccessRequest method. -// req, resp := client.GrantAccessRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/GrantAccess -func (c *OpsWorks) GrantAccessRequest(input *GrantAccessInput) (req *request.Request, output *GrantAccessOutput) { - op := &request.Operation{ - Name: opGrantAccess, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GrantAccessInput{} - } - - output = &GrantAccessOutput{} - req = c.newRequest(op, input, output) - return -} - -// GrantAccess API operation for AWS OpsWorks. -// -// This action can be used only with Windows stacks. -// -// Grants RDP access to a Windows instance for a specified time period. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation GrantAccess for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/GrantAccess -func (c *OpsWorks) GrantAccess(input *GrantAccessInput) (*GrantAccessOutput, error) { - req, out := c.GrantAccessRequest(input) - return out, req.Send() -} - -// GrantAccessWithContext is the same as GrantAccess with the addition of -// the ability to pass a context and additional request options. -// -// See GrantAccess for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) GrantAccessWithContext(ctx aws.Context, input *GrantAccessInput, opts ...request.Option) (*GrantAccessOutput, error) { - req, out := c.GrantAccessRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTags = "ListTags" - -// ListTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTags for more information on using the ListTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsRequest method. -// req, resp := client.ListTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/ListTags -func (c *OpsWorks) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { - op := &request.Operation{ - Name: opListTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsInput{} - } - - output = &ListTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTags API operation for AWS OpsWorks. -// -// Returns a list of tags that are applied to the specified stack or layer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation ListTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/ListTags -func (c *OpsWorks) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - return out, req.Send() -} - -// ListTagsWithContext is the same as ListTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRebootInstance = "RebootInstance" - -// RebootInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RebootInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebootInstance for more information on using the RebootInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebootInstanceRequest method. -// req, resp := client.RebootInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/RebootInstance -func (c *OpsWorks) RebootInstanceRequest(input *RebootInstanceInput) (req *request.Request, output *RebootInstanceOutput) { - op := &request.Operation{ - Name: opRebootInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RebootInstanceInput{} - } - - output = &RebootInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RebootInstance API operation for AWS OpsWorks. -// -// Reboots a specified instance. For more information, see Starting, Stopping, -// and Rebooting Instances (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-starting.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation RebootInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/RebootInstance -func (c *OpsWorks) RebootInstance(input *RebootInstanceInput) (*RebootInstanceOutput, error) { - req, out := c.RebootInstanceRequest(input) - return out, req.Send() -} - -// RebootInstanceWithContext is the same as RebootInstance with the addition of -// the ability to pass a context and additional request options. -// -// See RebootInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) RebootInstanceWithContext(ctx aws.Context, input *RebootInstanceInput, opts ...request.Option) (*RebootInstanceOutput, error) { - req, out := c.RebootInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterEcsCluster = "RegisterEcsCluster" - -// RegisterEcsClusterRequest generates a "aws/request.Request" representing the -// client's request for the RegisterEcsCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterEcsCluster for more information on using the RegisterEcsCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterEcsClusterRequest method. -// req, resp := client.RegisterEcsClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/RegisterEcsCluster -func (c *OpsWorks) RegisterEcsClusterRequest(input *RegisterEcsClusterInput) (req *request.Request, output *RegisterEcsClusterOutput) { - op := &request.Operation{ - Name: opRegisterEcsCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterEcsClusterInput{} - } - - output = &RegisterEcsClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterEcsCluster API operation for AWS OpsWorks. -// -// Registers a specified Amazon ECS cluster with a stack. You can register only -// one cluster with a stack. A cluster can be registered with only one stack. -// For more information, see Resource Management (http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-ecscluster.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation RegisterEcsCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/RegisterEcsCluster -func (c *OpsWorks) RegisterEcsCluster(input *RegisterEcsClusterInput) (*RegisterEcsClusterOutput, error) { - req, out := c.RegisterEcsClusterRequest(input) - return out, req.Send() -} - -// RegisterEcsClusterWithContext is the same as RegisterEcsCluster with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterEcsCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) RegisterEcsClusterWithContext(ctx aws.Context, input *RegisterEcsClusterInput, opts ...request.Option) (*RegisterEcsClusterOutput, error) { - req, out := c.RegisterEcsClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterElasticIp = "RegisterElasticIp" - -// RegisterElasticIpRequest generates a "aws/request.Request" representing the -// client's request for the RegisterElasticIp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterElasticIp for more information on using the RegisterElasticIp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterElasticIpRequest method. -// req, resp := client.RegisterElasticIpRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/RegisterElasticIp -func (c *OpsWorks) RegisterElasticIpRequest(input *RegisterElasticIpInput) (req *request.Request, output *RegisterElasticIpOutput) { - op := &request.Operation{ - Name: opRegisterElasticIp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterElasticIpInput{} - } - - output = &RegisterElasticIpOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterElasticIp API operation for AWS OpsWorks. -// -// Registers an Elastic IP address with a specified stack. An address can be -// registered with only one stack at a time. If the address is already registered, -// you must first deregister it by calling DeregisterElasticIp. For more information, -// see Resource Management (http://docs.aws.amazon.com/opsworks/latest/userguide/resources.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation RegisterElasticIp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/RegisterElasticIp -func (c *OpsWorks) RegisterElasticIp(input *RegisterElasticIpInput) (*RegisterElasticIpOutput, error) { - req, out := c.RegisterElasticIpRequest(input) - return out, req.Send() -} - -// RegisterElasticIpWithContext is the same as RegisterElasticIp with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterElasticIp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) RegisterElasticIpWithContext(ctx aws.Context, input *RegisterElasticIpInput, opts ...request.Option) (*RegisterElasticIpOutput, error) { - req, out := c.RegisterElasticIpRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterInstance = "RegisterInstance" - -// RegisterInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RegisterInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterInstance for more information on using the RegisterInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterInstanceRequest method. -// req, resp := client.RegisterInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/RegisterInstance -func (c *OpsWorks) RegisterInstanceRequest(input *RegisterInstanceInput) (req *request.Request, output *RegisterInstanceOutput) { - op := &request.Operation{ - Name: opRegisterInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterInstanceInput{} - } - - output = &RegisterInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterInstance API operation for AWS OpsWorks. -// -// Registers instances that were created outside of AWS OpsWorks Stacks with -// a specified stack. -// -// We do not recommend using this action to register instances. The complete -// registration operation includes two tasks: installing the AWS OpsWorks Stacks -// agent on the instance, and registering the instance with the stack. RegisterInstance -// handles only the second step. You should instead use the AWS CLI register -// command, which performs the entire registration operation. For more information, -// see Registering an Instance with an AWS OpsWorks Stacks Stack (http://docs.aws.amazon.com/opsworks/latest/userguide/registered-instances-register.html). -// -// Registered instances have the same requirements as instances that are created -// by using the CreateInstance API. For example, registered instances must be -// running a supported Linux-based operating system, and they must have a supported -// instance type. For more information about requirements for instances that -// you want to register, see Preparing the Instance (http://docs.aws.amazon.com/opsworks/latest/userguide/registered-instances-register-registering-preparer.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation RegisterInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/RegisterInstance -func (c *OpsWorks) RegisterInstance(input *RegisterInstanceInput) (*RegisterInstanceOutput, error) { - req, out := c.RegisterInstanceRequest(input) - return out, req.Send() -} - -// RegisterInstanceWithContext is the same as RegisterInstance with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) RegisterInstanceWithContext(ctx aws.Context, input *RegisterInstanceInput, opts ...request.Option) (*RegisterInstanceOutput, error) { - req, out := c.RegisterInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterRdsDbInstance = "RegisterRdsDbInstance" - -// RegisterRdsDbInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RegisterRdsDbInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterRdsDbInstance for more information on using the RegisterRdsDbInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterRdsDbInstanceRequest method. -// req, resp := client.RegisterRdsDbInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/RegisterRdsDbInstance -func (c *OpsWorks) RegisterRdsDbInstanceRequest(input *RegisterRdsDbInstanceInput) (req *request.Request, output *RegisterRdsDbInstanceOutput) { - op := &request.Operation{ - Name: opRegisterRdsDbInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterRdsDbInstanceInput{} - } - - output = &RegisterRdsDbInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RegisterRdsDbInstance API operation for AWS OpsWorks. -// -// Registers an Amazon RDS instance with a stack. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation RegisterRdsDbInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/RegisterRdsDbInstance -func (c *OpsWorks) RegisterRdsDbInstance(input *RegisterRdsDbInstanceInput) (*RegisterRdsDbInstanceOutput, error) { - req, out := c.RegisterRdsDbInstanceRequest(input) - return out, req.Send() -} - -// RegisterRdsDbInstanceWithContext is the same as RegisterRdsDbInstance with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterRdsDbInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) RegisterRdsDbInstanceWithContext(ctx aws.Context, input *RegisterRdsDbInstanceInput, opts ...request.Option) (*RegisterRdsDbInstanceOutput, error) { - req, out := c.RegisterRdsDbInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterVolume = "RegisterVolume" - -// RegisterVolumeRequest generates a "aws/request.Request" representing the -// client's request for the RegisterVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterVolume for more information on using the RegisterVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterVolumeRequest method. -// req, resp := client.RegisterVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/RegisterVolume -func (c *OpsWorks) RegisterVolumeRequest(input *RegisterVolumeInput) (req *request.Request, output *RegisterVolumeOutput) { - op := &request.Operation{ - Name: opRegisterVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterVolumeInput{} - } - - output = &RegisterVolumeOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterVolume API operation for AWS OpsWorks. -// -// Registers an Amazon EBS volume with a specified stack. A volume can be registered -// with only one stack at a time. If the volume is already registered, you must -// first deregister it by calling DeregisterVolume. For more information, see -// Resource Management (http://docs.aws.amazon.com/opsworks/latest/userguide/resources.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation RegisterVolume for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/RegisterVolume -func (c *OpsWorks) RegisterVolume(input *RegisterVolumeInput) (*RegisterVolumeOutput, error) { - req, out := c.RegisterVolumeRequest(input) - return out, req.Send() -} - -// RegisterVolumeWithContext is the same as RegisterVolume with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) RegisterVolumeWithContext(ctx aws.Context, input *RegisterVolumeInput, opts ...request.Option) (*RegisterVolumeOutput, error) { - req, out := c.RegisterVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetLoadBasedAutoScaling = "SetLoadBasedAutoScaling" - -// SetLoadBasedAutoScalingRequest generates a "aws/request.Request" representing the -// client's request for the SetLoadBasedAutoScaling operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetLoadBasedAutoScaling for more information on using the SetLoadBasedAutoScaling -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetLoadBasedAutoScalingRequest method. -// req, resp := client.SetLoadBasedAutoScalingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/SetLoadBasedAutoScaling -func (c *OpsWorks) SetLoadBasedAutoScalingRequest(input *SetLoadBasedAutoScalingInput) (req *request.Request, output *SetLoadBasedAutoScalingOutput) { - op := &request.Operation{ - Name: opSetLoadBasedAutoScaling, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetLoadBasedAutoScalingInput{} - } - - output = &SetLoadBasedAutoScalingOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetLoadBasedAutoScaling API operation for AWS OpsWorks. -// -// Specify the load-based auto scaling configuration for a specified layer. -// For more information, see Managing Load with Time-based and Load-based Instances -// (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-autoscaling.html). -// -// To use load-based auto scaling, you must create a set of load-based auto -// scaling instances. Load-based auto scaling operates only on the instances -// from that set, so you must ensure that you have created enough instances -// to handle the maximum anticipated load. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation SetLoadBasedAutoScaling for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/SetLoadBasedAutoScaling -func (c *OpsWorks) SetLoadBasedAutoScaling(input *SetLoadBasedAutoScalingInput) (*SetLoadBasedAutoScalingOutput, error) { - req, out := c.SetLoadBasedAutoScalingRequest(input) - return out, req.Send() -} - -// SetLoadBasedAutoScalingWithContext is the same as SetLoadBasedAutoScaling with the addition of -// the ability to pass a context and additional request options. -// -// See SetLoadBasedAutoScaling for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) SetLoadBasedAutoScalingWithContext(ctx aws.Context, input *SetLoadBasedAutoScalingInput, opts ...request.Option) (*SetLoadBasedAutoScalingOutput, error) { - req, out := c.SetLoadBasedAutoScalingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetPermission = "SetPermission" - -// SetPermissionRequest generates a "aws/request.Request" representing the -// client's request for the SetPermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetPermission for more information on using the SetPermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetPermissionRequest method. -// req, resp := client.SetPermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/SetPermission -func (c *OpsWorks) SetPermissionRequest(input *SetPermissionInput) (req *request.Request, output *SetPermissionOutput) { - op := &request.Operation{ - Name: opSetPermission, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetPermissionInput{} - } - - output = &SetPermissionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetPermission API operation for AWS OpsWorks. -// -// Specifies a user's permissions. For more information, see Security and Permissions -// (http://docs.aws.amazon.com/opsworks/latest/userguide/workingsecurity.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation SetPermission for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/SetPermission -func (c *OpsWorks) SetPermission(input *SetPermissionInput) (*SetPermissionOutput, error) { - req, out := c.SetPermissionRequest(input) - return out, req.Send() -} - -// SetPermissionWithContext is the same as SetPermission with the addition of -// the ability to pass a context and additional request options. -// -// See SetPermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) SetPermissionWithContext(ctx aws.Context, input *SetPermissionInput, opts ...request.Option) (*SetPermissionOutput, error) { - req, out := c.SetPermissionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetTimeBasedAutoScaling = "SetTimeBasedAutoScaling" - -// SetTimeBasedAutoScalingRequest generates a "aws/request.Request" representing the -// client's request for the SetTimeBasedAutoScaling operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetTimeBasedAutoScaling for more information on using the SetTimeBasedAutoScaling -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetTimeBasedAutoScalingRequest method. -// req, resp := client.SetTimeBasedAutoScalingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/SetTimeBasedAutoScaling -func (c *OpsWorks) SetTimeBasedAutoScalingRequest(input *SetTimeBasedAutoScalingInput) (req *request.Request, output *SetTimeBasedAutoScalingOutput) { - op := &request.Operation{ - Name: opSetTimeBasedAutoScaling, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetTimeBasedAutoScalingInput{} - } - - output = &SetTimeBasedAutoScalingOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetTimeBasedAutoScaling API operation for AWS OpsWorks. -// -// Specify the time-based auto scaling configuration for a specified instance. -// For more information, see Managing Load with Time-based and Load-based Instances -// (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-autoscaling.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation SetTimeBasedAutoScaling for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/SetTimeBasedAutoScaling -func (c *OpsWorks) SetTimeBasedAutoScaling(input *SetTimeBasedAutoScalingInput) (*SetTimeBasedAutoScalingOutput, error) { - req, out := c.SetTimeBasedAutoScalingRequest(input) - return out, req.Send() -} - -// SetTimeBasedAutoScalingWithContext is the same as SetTimeBasedAutoScaling with the addition of -// the ability to pass a context and additional request options. -// -// See SetTimeBasedAutoScaling for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) SetTimeBasedAutoScalingWithContext(ctx aws.Context, input *SetTimeBasedAutoScalingInput, opts ...request.Option) (*SetTimeBasedAutoScalingOutput, error) { - req, out := c.SetTimeBasedAutoScalingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartInstance = "StartInstance" - -// StartInstanceRequest generates a "aws/request.Request" representing the -// client's request for the StartInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartInstance for more information on using the StartInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartInstanceRequest method. -// req, resp := client.StartInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/StartInstance -func (c *OpsWorks) StartInstanceRequest(input *StartInstanceInput) (req *request.Request, output *StartInstanceOutput) { - op := &request.Operation{ - Name: opStartInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartInstanceInput{} - } - - output = &StartInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartInstance API operation for AWS OpsWorks. -// -// Starts a specified instance. For more information, see Starting, Stopping, -// and Rebooting Instances (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-starting.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation StartInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/StartInstance -func (c *OpsWorks) StartInstance(input *StartInstanceInput) (*StartInstanceOutput, error) { - req, out := c.StartInstanceRequest(input) - return out, req.Send() -} - -// StartInstanceWithContext is the same as StartInstance with the addition of -// the ability to pass a context and additional request options. -// -// See StartInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) StartInstanceWithContext(ctx aws.Context, input *StartInstanceInput, opts ...request.Option) (*StartInstanceOutput, error) { - req, out := c.StartInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartStack = "StartStack" - -// StartStackRequest generates a "aws/request.Request" representing the -// client's request for the StartStack operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartStack for more information on using the StartStack -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartStackRequest method. -// req, resp := client.StartStackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/StartStack -func (c *OpsWorks) StartStackRequest(input *StartStackInput) (req *request.Request, output *StartStackOutput) { - op := &request.Operation{ - Name: opStartStack, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartStackInput{} - } - - output = &StartStackOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartStack API operation for AWS OpsWorks. -// -// Starts a stack's instances. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation StartStack for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/StartStack -func (c *OpsWorks) StartStack(input *StartStackInput) (*StartStackOutput, error) { - req, out := c.StartStackRequest(input) - return out, req.Send() -} - -// StartStackWithContext is the same as StartStack with the addition of -// the ability to pass a context and additional request options. -// -// See StartStack for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) StartStackWithContext(ctx aws.Context, input *StartStackInput, opts ...request.Option) (*StartStackOutput, error) { - req, out := c.StartStackRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopInstance = "StopInstance" - -// StopInstanceRequest generates a "aws/request.Request" representing the -// client's request for the StopInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopInstance for more information on using the StopInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopInstanceRequest method. -// req, resp := client.StopInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/StopInstance -func (c *OpsWorks) StopInstanceRequest(input *StopInstanceInput) (req *request.Request, output *StopInstanceOutput) { - op := &request.Operation{ - Name: opStopInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopInstanceInput{} - } - - output = &StopInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopInstance API operation for AWS OpsWorks. -// -// Stops a specified instance. When you stop a standard instance, the data disappears -// and must be reinstalled when you restart the instance. You can stop an Amazon -// EBS-backed instance without losing data. For more information, see Starting, -// Stopping, and Rebooting Instances (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-starting.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation StopInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/StopInstance -func (c *OpsWorks) StopInstance(input *StopInstanceInput) (*StopInstanceOutput, error) { - req, out := c.StopInstanceRequest(input) - return out, req.Send() -} - -// StopInstanceWithContext is the same as StopInstance with the addition of -// the ability to pass a context and additional request options. -// -// See StopInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) StopInstanceWithContext(ctx aws.Context, input *StopInstanceInput, opts ...request.Option) (*StopInstanceOutput, error) { - req, out := c.StopInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopStack = "StopStack" - -// StopStackRequest generates a "aws/request.Request" representing the -// client's request for the StopStack operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopStack for more information on using the StopStack -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopStackRequest method. -// req, resp := client.StopStackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/StopStack -func (c *OpsWorks) StopStackRequest(input *StopStackInput) (req *request.Request, output *StopStackOutput) { - op := &request.Operation{ - Name: opStopStack, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopStackInput{} - } - - output = &StopStackOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopStack API operation for AWS OpsWorks. -// -// Stops a specified stack. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation StopStack for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/StopStack -func (c *OpsWorks) StopStack(input *StopStackInput) (*StopStackOutput, error) { - req, out := c.StopStackRequest(input) - return out, req.Send() -} - -// StopStackWithContext is the same as StopStack with the addition of -// the ability to pass a context and additional request options. -// -// See StopStack for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) StopStackWithContext(ctx aws.Context, input *StopStackInput, opts ...request.Option) (*StopStackOutput, error) { - req, out := c.StopStackRequest(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/opsworks-2013-02-18/TagResource -func (c *OpsWorks) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for AWS OpsWorks. -// -// Apply cost-allocation tags to a specified stack or layer in AWS OpsWorks -// Stacks. For more information about how tagging works, see Tags (http://docs.aws.amazon.com/opsworks/latest/userguide/tagging.html) -// in the AWS OpsWorks User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/TagResource -func (c *OpsWorks) 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 *OpsWorks) 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 opUnassignInstance = "UnassignInstance" - -// UnassignInstanceRequest generates a "aws/request.Request" representing the -// client's request for the UnassignInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UnassignInstance for more information on using the UnassignInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UnassignInstanceRequest method. -// req, resp := client.UnassignInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UnassignInstance -func (c *OpsWorks) UnassignInstanceRequest(input *UnassignInstanceInput) (req *request.Request, output *UnassignInstanceOutput) { - op := &request.Operation{ - Name: opUnassignInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UnassignInstanceInput{} - } - - output = &UnassignInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UnassignInstance API operation for AWS OpsWorks. -// -// Unassigns a registered instance from all layers that are using the instance. -// The instance remains in the stack as an unassigned instance, and can be assigned -// to another layer as needed. You cannot use this action with instances that -// were created with AWS OpsWorks Stacks. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack or an attached policy that explicitly grants -// permissions. For more information about user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation UnassignInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UnassignInstance -func (c *OpsWorks) UnassignInstance(input *UnassignInstanceInput) (*UnassignInstanceOutput, error) { - req, out := c.UnassignInstanceRequest(input) - return out, req.Send() -} - -// UnassignInstanceWithContext is the same as UnassignInstance with the addition of -// the ability to pass a context and additional request options. -// -// See UnassignInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) UnassignInstanceWithContext(ctx aws.Context, input *UnassignInstanceInput, opts ...request.Option) (*UnassignInstanceOutput, error) { - req, out := c.UnassignInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUnassignVolume = "UnassignVolume" - -// UnassignVolumeRequest generates a "aws/request.Request" representing the -// client's request for the UnassignVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UnassignVolume for more information on using the UnassignVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UnassignVolumeRequest method. -// req, resp := client.UnassignVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UnassignVolume -func (c *OpsWorks) UnassignVolumeRequest(input *UnassignVolumeInput) (req *request.Request, output *UnassignVolumeOutput) { - op := &request.Operation{ - Name: opUnassignVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UnassignVolumeInput{} - } - - output = &UnassignVolumeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UnassignVolume API operation for AWS OpsWorks. -// -// Unassigns an assigned Amazon EBS volume. The volume remains registered with -// the stack. For more information, see Resource Management (http://docs.aws.amazon.com/opsworks/latest/userguide/resources.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation UnassignVolume for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UnassignVolume -func (c *OpsWorks) UnassignVolume(input *UnassignVolumeInput) (*UnassignVolumeOutput, error) { - req, out := c.UnassignVolumeRequest(input) - return out, req.Send() -} - -// UnassignVolumeWithContext is the same as UnassignVolume with the addition of -// the ability to pass a context and additional request options. -// -// See UnassignVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) UnassignVolumeWithContext(ctx aws.Context, input *UnassignVolumeInput, opts ...request.Option) (*UnassignVolumeOutput, error) { - req, out := c.UnassignVolumeRequest(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/opsworks-2013-02-18/UntagResource -func (c *OpsWorks) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for AWS OpsWorks. -// -// Removes tags from a specified stack or layer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UntagResource -func (c *OpsWorks) 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 *OpsWorks) 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 opUpdateApp = "UpdateApp" - -// UpdateAppRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApp for more information on using the UpdateApp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAppRequest method. -// req, resp := client.UpdateAppRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateApp -func (c *OpsWorks) UpdateAppRequest(input *UpdateAppInput) (req *request.Request, output *UpdateAppOutput) { - op := &request.Operation{ - Name: opUpdateApp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAppInput{} - } - - output = &UpdateAppOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateApp API operation for AWS OpsWorks. -// -// Updates a specified app. -// -// Required Permissions: To use this action, an IAM user must have a Deploy -// or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing -// User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation UpdateApp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateApp -func (c *OpsWorks) UpdateApp(input *UpdateAppInput) (*UpdateAppOutput, error) { - req, out := c.UpdateAppRequest(input) - return out, req.Send() -} - -// UpdateAppWithContext is the same as UpdateApp with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) UpdateAppWithContext(ctx aws.Context, input *UpdateAppInput, opts ...request.Option) (*UpdateAppOutput, error) { - req, out := c.UpdateAppRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateElasticIp = "UpdateElasticIp" - -// UpdateElasticIpRequest generates a "aws/request.Request" representing the -// client's request for the UpdateElasticIp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateElasticIp for more information on using the UpdateElasticIp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateElasticIpRequest method. -// req, resp := client.UpdateElasticIpRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateElasticIp -func (c *OpsWorks) UpdateElasticIpRequest(input *UpdateElasticIpInput) (req *request.Request, output *UpdateElasticIpOutput) { - op := &request.Operation{ - Name: opUpdateElasticIp, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateElasticIpInput{} - } - - output = &UpdateElasticIpOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateElasticIp API operation for AWS OpsWorks. -// -// Updates a registered Elastic IP address's name. For more information, see -// Resource Management (http://docs.aws.amazon.com/opsworks/latest/userguide/resources.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation UpdateElasticIp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateElasticIp -func (c *OpsWorks) UpdateElasticIp(input *UpdateElasticIpInput) (*UpdateElasticIpOutput, error) { - req, out := c.UpdateElasticIpRequest(input) - return out, req.Send() -} - -// UpdateElasticIpWithContext is the same as UpdateElasticIp with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateElasticIp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) UpdateElasticIpWithContext(ctx aws.Context, input *UpdateElasticIpInput, opts ...request.Option) (*UpdateElasticIpOutput, error) { - req, out := c.UpdateElasticIpRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateInstance = "UpdateInstance" - -// UpdateInstanceRequest generates a "aws/request.Request" representing the -// client's request for the UpdateInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateInstance for more information on using the UpdateInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateInstanceRequest method. -// req, resp := client.UpdateInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateInstance -func (c *OpsWorks) UpdateInstanceRequest(input *UpdateInstanceInput) (req *request.Request, output *UpdateInstanceOutput) { - op := &request.Operation{ - Name: opUpdateInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateInstanceInput{} - } - - output = &UpdateInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateInstance API operation for AWS OpsWorks. -// -// Updates a specified instance. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation UpdateInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateInstance -func (c *OpsWorks) UpdateInstance(input *UpdateInstanceInput) (*UpdateInstanceOutput, error) { - req, out := c.UpdateInstanceRequest(input) - return out, req.Send() -} - -// UpdateInstanceWithContext is the same as UpdateInstance with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) UpdateInstanceWithContext(ctx aws.Context, input *UpdateInstanceInput, opts ...request.Option) (*UpdateInstanceOutput, error) { - req, out := c.UpdateInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateLayer = "UpdateLayer" - -// UpdateLayerRequest generates a "aws/request.Request" representing the -// client's request for the UpdateLayer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateLayer for more information on using the UpdateLayer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateLayerRequest method. -// req, resp := client.UpdateLayerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateLayer -func (c *OpsWorks) UpdateLayerRequest(input *UpdateLayerInput) (req *request.Request, output *UpdateLayerOutput) { - op := &request.Operation{ - Name: opUpdateLayer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateLayerInput{} - } - - output = &UpdateLayerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateLayer API operation for AWS OpsWorks. -// -// Updates a specified layer. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation UpdateLayer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateLayer -func (c *OpsWorks) UpdateLayer(input *UpdateLayerInput) (*UpdateLayerOutput, error) { - req, out := c.UpdateLayerRequest(input) - return out, req.Send() -} - -// UpdateLayerWithContext is the same as UpdateLayer with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateLayer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) UpdateLayerWithContext(ctx aws.Context, input *UpdateLayerInput, opts ...request.Option) (*UpdateLayerOutput, error) { - req, out := c.UpdateLayerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateMyUserProfile = "UpdateMyUserProfile" - -// UpdateMyUserProfileRequest generates a "aws/request.Request" representing the -// client's request for the UpdateMyUserProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateMyUserProfile for more information on using the UpdateMyUserProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateMyUserProfileRequest method. -// req, resp := client.UpdateMyUserProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateMyUserProfile -func (c *OpsWorks) UpdateMyUserProfileRequest(input *UpdateMyUserProfileInput) (req *request.Request, output *UpdateMyUserProfileOutput) { - op := &request.Operation{ - Name: opUpdateMyUserProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateMyUserProfileInput{} - } - - output = &UpdateMyUserProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateMyUserProfile API operation for AWS OpsWorks. -// -// Updates a user's SSH public key. -// -// Required Permissions: To use this action, an IAM user must have self-management -// enabled or an attached policy that explicitly grants permissions. For more -// information about user permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation UpdateMyUserProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateMyUserProfile -func (c *OpsWorks) UpdateMyUserProfile(input *UpdateMyUserProfileInput) (*UpdateMyUserProfileOutput, error) { - req, out := c.UpdateMyUserProfileRequest(input) - return out, req.Send() -} - -// UpdateMyUserProfileWithContext is the same as UpdateMyUserProfile with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateMyUserProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) UpdateMyUserProfileWithContext(ctx aws.Context, input *UpdateMyUserProfileInput, opts ...request.Option) (*UpdateMyUserProfileOutput, error) { - req, out := c.UpdateMyUserProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRdsDbInstance = "UpdateRdsDbInstance" - -// UpdateRdsDbInstanceRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRdsDbInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRdsDbInstance for more information on using the UpdateRdsDbInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRdsDbInstanceRequest method. -// req, resp := client.UpdateRdsDbInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateRdsDbInstance -func (c *OpsWorks) UpdateRdsDbInstanceRequest(input *UpdateRdsDbInstanceInput) (req *request.Request, output *UpdateRdsDbInstanceOutput) { - op := &request.Operation{ - Name: opUpdateRdsDbInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRdsDbInstanceInput{} - } - - output = &UpdateRdsDbInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateRdsDbInstance API operation for AWS OpsWorks. -// -// Updates an Amazon RDS instance. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation UpdateRdsDbInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateRdsDbInstance -func (c *OpsWorks) UpdateRdsDbInstance(input *UpdateRdsDbInstanceInput) (*UpdateRdsDbInstanceOutput, error) { - req, out := c.UpdateRdsDbInstanceRequest(input) - return out, req.Send() -} - -// UpdateRdsDbInstanceWithContext is the same as UpdateRdsDbInstance with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRdsDbInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) UpdateRdsDbInstanceWithContext(ctx aws.Context, input *UpdateRdsDbInstanceInput, opts ...request.Option) (*UpdateRdsDbInstanceOutput, error) { - req, out := c.UpdateRdsDbInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateStack = "UpdateStack" - -// UpdateStackRequest generates a "aws/request.Request" representing the -// client's request for the UpdateStack operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateStack for more information on using the UpdateStack -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateStackRequest method. -// req, resp := client.UpdateStackRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateStack -func (c *OpsWorks) UpdateStackRequest(input *UpdateStackInput) (req *request.Request, output *UpdateStackOutput) { - op := &request.Operation{ - Name: opUpdateStack, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateStackInput{} - } - - output = &UpdateStackOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateStack API operation for AWS OpsWorks. -// -// Updates a specified stack. -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation UpdateStack for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateStack -func (c *OpsWorks) UpdateStack(input *UpdateStackInput) (*UpdateStackOutput, error) { - req, out := c.UpdateStackRequest(input) - return out, req.Send() -} - -// UpdateStackWithContext is the same as UpdateStack with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateStack for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) UpdateStackWithContext(ctx aws.Context, input *UpdateStackInput, opts ...request.Option) (*UpdateStackOutput, error) { - req, out := c.UpdateStackRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateUserProfile = "UpdateUserProfile" - -// UpdateUserProfileRequest generates a "aws/request.Request" representing the -// client's request for the UpdateUserProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateUserProfile for more information on using the UpdateUserProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateUserProfileRequest method. -// req, resp := client.UpdateUserProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateUserProfile -func (c *OpsWorks) UpdateUserProfileRequest(input *UpdateUserProfileInput) (req *request.Request, output *UpdateUserProfileOutput) { - op := &request.Operation{ - Name: opUpdateUserProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateUserProfileInput{} - } - - output = &UpdateUserProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateUserProfile API operation for AWS OpsWorks. -// -// Updates a specified user profile. -// -// Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information about user -// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation UpdateUserProfile for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateUserProfile -func (c *OpsWorks) UpdateUserProfile(input *UpdateUserProfileInput) (*UpdateUserProfileOutput, error) { - req, out := c.UpdateUserProfileRequest(input) - return out, req.Send() -} - -// UpdateUserProfileWithContext is the same as UpdateUserProfile with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateUserProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) UpdateUserProfileWithContext(ctx aws.Context, input *UpdateUserProfileInput, opts ...request.Option) (*UpdateUserProfileOutput, error) { - req, out := c.UpdateUserProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateVolume = "UpdateVolume" - -// UpdateVolumeRequest generates a "aws/request.Request" representing the -// client's request for the UpdateVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateVolume for more information on using the UpdateVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateVolumeRequest method. -// req, resp := client.UpdateVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateVolume -func (c *OpsWorks) UpdateVolumeRequest(input *UpdateVolumeInput) (req *request.Request, output *UpdateVolumeOutput) { - op := &request.Operation{ - Name: opUpdateVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateVolumeInput{} - } - - output = &UpdateVolumeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateVolume API operation for AWS OpsWorks. -// -// Updates an Amazon EBS volume's name or mount point. For more information, -// see Resource Management (http://docs.aws.amazon.com/opsworks/latest/userguide/resources.html). -// -// Required Permissions: To use this action, an IAM user must have a Manage -// permissions level for the stack, or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User -// Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS OpsWorks's -// API operation UpdateVolume for usage and error information. -// -// Returned Error Codes: -// * ErrCodeValidationException "ValidationException" -// Indicates that a request was not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// Indicates that a resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UpdateVolume -func (c *OpsWorks) UpdateVolume(input *UpdateVolumeInput) (*UpdateVolumeOutput, error) { - req, out := c.UpdateVolumeRequest(input) - return out, req.Send() -} - -// UpdateVolumeWithContext is the same as UpdateVolume with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) UpdateVolumeWithContext(ctx aws.Context, input *UpdateVolumeInput, opts ...request.Option) (*UpdateVolumeOutput, error) { - req, out := c.UpdateVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Describes an agent version. -type AgentVersion struct { - _ struct{} `type:"structure"` - - // The configuration manager. - ConfigurationManager *StackConfigurationManager `type:"structure"` - - // The agent version. - Version *string `type:"string"` -} - -// String returns the string representation -func (s AgentVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AgentVersion) GoString() string { - return s.String() -} - -// SetConfigurationManager sets the ConfigurationManager field's value. -func (s *AgentVersion) SetConfigurationManager(v *StackConfigurationManager) *AgentVersion { - s.ConfigurationManager = v - return s -} - -// SetVersion sets the Version field's value. -func (s *AgentVersion) SetVersion(v string) *AgentVersion { - s.Version = &v - return s -} - -// A description of the app. -type App struct { - _ struct{} `type:"structure"` - - // The app ID. - AppId *string `type:"string"` - - // A Source object that describes the app repository. - AppSource *Source `type:"structure"` - - // The stack attributes. - Attributes map[string]*string `type:"map"` - - // When the app was created. - CreatedAt *string `type:"string"` - - // The app's data sources. - DataSources []*DataSource `type:"list"` - - // A description of the app. - Description *string `type:"string"` - - // The app vhost settings with multiple domains separated by commas. For example: - // 'www.example.com, example.com' - Domains []*string `type:"list"` - - // Whether to enable SSL for the app. - EnableSsl *bool `type:"boolean"` - - // An array of EnvironmentVariable objects that specify environment variables - // to be associated with the app. After you deploy the app, these variables - // are defined on the associated app server instances. For more information, - // see Environment Variables (http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html#workingapps-creating-environment). - // - // There is no specific limit on the number of environment variables. However, - // the size of the associated data structure - which includes the variable names, - // values, and protected flag values - cannot exceed 10 KB (10240 Bytes). This - // limit should accommodate most if not all use cases, but if you do exceed - // it, you will cause an exception (API) with an "Environment: is too large - // (maximum is 10KB)" message. - Environment []*EnvironmentVariable `type:"list"` - - // The app name. - Name *string `type:"string"` - - // The app's short name. - Shortname *string `type:"string"` - - // An SslConfiguration object with the SSL configuration. - SslConfiguration *SslConfiguration `type:"structure"` - - // The app stack ID. - StackId *string `type:"string"` - - // The app type. - Type *string `type:"string" enum:"AppType"` -} - -// String returns the string representation -func (s App) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s App) GoString() string { - return s.String() -} - -// SetAppId sets the AppId field's value. -func (s *App) SetAppId(v string) *App { - s.AppId = &v - return s -} - -// SetAppSource sets the AppSource field's value. -func (s *App) SetAppSource(v *Source) *App { - s.AppSource = v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *App) SetAttributes(v map[string]*string) *App { - s.Attributes = v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *App) SetCreatedAt(v string) *App { - s.CreatedAt = &v - return s -} - -// SetDataSources sets the DataSources field's value. -func (s *App) SetDataSources(v []*DataSource) *App { - s.DataSources = v - return s -} - -// SetDescription sets the Description field's value. -func (s *App) SetDescription(v string) *App { - s.Description = &v - return s -} - -// SetDomains sets the Domains field's value. -func (s *App) SetDomains(v []*string) *App { - s.Domains = v - return s -} - -// SetEnableSsl sets the EnableSsl field's value. -func (s *App) SetEnableSsl(v bool) *App { - s.EnableSsl = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *App) SetEnvironment(v []*EnvironmentVariable) *App { - s.Environment = v - return s -} - -// SetName sets the Name field's value. -func (s *App) SetName(v string) *App { - s.Name = &v - return s -} - -// SetShortname sets the Shortname field's value. -func (s *App) SetShortname(v string) *App { - s.Shortname = &v - return s -} - -// SetSslConfiguration sets the SslConfiguration field's value. -func (s *App) SetSslConfiguration(v *SslConfiguration) *App { - s.SslConfiguration = v - return s -} - -// SetStackId sets the StackId field's value. -func (s *App) SetStackId(v string) *App { - s.StackId = &v - return s -} - -// SetType sets the Type field's value. -func (s *App) SetType(v string) *App { - s.Type = &v - return s -} - -type AssignInstanceInput struct { - _ struct{} `type:"structure"` - - // The instance ID. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The layer ID, which must correspond to a custom layer. You cannot assign - // a registered instance to a built-in layer. - // - // LayerIds is a required field - LayerIds []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s AssignInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssignInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssignInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssignInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.LayerIds == nil { - invalidParams.Add(request.NewErrParamRequired("LayerIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *AssignInstanceInput) SetInstanceId(v string) *AssignInstanceInput { - s.InstanceId = &v - return s -} - -// SetLayerIds sets the LayerIds field's value. -func (s *AssignInstanceInput) SetLayerIds(v []*string) *AssignInstanceInput { - s.LayerIds = v - return s -} - -type AssignInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssignInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssignInstanceOutput) GoString() string { - return s.String() -} - -type AssignVolumeInput struct { - _ struct{} `type:"structure"` - - // The instance ID. - InstanceId *string `type:"string"` - - // The volume ID. - // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AssignVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssignVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssignVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssignVolumeInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *AssignVolumeInput) SetInstanceId(v string) *AssignVolumeInput { - s.InstanceId = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *AssignVolumeInput) SetVolumeId(v string) *AssignVolumeInput { - s.VolumeId = &v - return s -} - -type AssignVolumeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssignVolumeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssignVolumeOutput) GoString() string { - return s.String() -} - -type AssociateElasticIpInput struct { - _ struct{} `type:"structure"` - - // The Elastic IP address. - // - // ElasticIp is a required field - ElasticIp *string `type:"string" required:"true"` - - // The instance ID. - InstanceId *string `type:"string"` -} - -// String returns the string representation -func (s AssociateElasticIpInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateElasticIpInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateElasticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateElasticIpInput"} - if s.ElasticIp == nil { - invalidParams.Add(request.NewErrParamRequired("ElasticIp")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetElasticIp sets the ElasticIp field's value. -func (s *AssociateElasticIpInput) SetElasticIp(v string) *AssociateElasticIpInput { - s.ElasticIp = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *AssociateElasticIpInput) SetInstanceId(v string) *AssociateElasticIpInput { - s.InstanceId = &v - return s -} - -type AssociateElasticIpOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssociateElasticIpOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateElasticIpOutput) GoString() string { - return s.String() -} - -type AttachElasticLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The Elastic Load Balancing instance's name. - // - // ElasticLoadBalancerName is a required field - ElasticLoadBalancerName *string `type:"string" required:"true"` - - // The ID of the layer to which the Elastic Load Balancing instance is to be - // attached. - // - // LayerId is a required field - LayerId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachElasticLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachElasticLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachElasticLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachElasticLoadBalancerInput"} - if s.ElasticLoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("ElasticLoadBalancerName")) - } - if s.LayerId == nil { - invalidParams.Add(request.NewErrParamRequired("LayerId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetElasticLoadBalancerName sets the ElasticLoadBalancerName field's value. -func (s *AttachElasticLoadBalancerInput) SetElasticLoadBalancerName(v string) *AttachElasticLoadBalancerInput { - s.ElasticLoadBalancerName = &v - return s -} - -// SetLayerId sets the LayerId field's value. -func (s *AttachElasticLoadBalancerInput) SetLayerId(v string) *AttachElasticLoadBalancerInput { - s.LayerId = &v - return s -} - -type AttachElasticLoadBalancerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AttachElasticLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachElasticLoadBalancerOutput) GoString() string { - return s.String() -} - -// Describes a load-based auto scaling upscaling or downscaling threshold configuration, -// which specifies when AWS OpsWorks Stacks starts or stops load-based instances. -type AutoScalingThresholds struct { - _ struct{} `type:"structure"` - - // Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter - // takes a list of up to five alarm names, which are case sensitive and must - // be in the same region as the stack. - // - // To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms. - // You can either have AWS OpsWorks Stacks update the role for you when you - // first use this feature or you can edit the role manually. For more information, - // see Allowing AWS OpsWorks Stacks to Act on Your Behalf (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-servicerole.html). - Alarms []*string `type:"list"` - - // The CPU utilization threshold, as a percent of the available CPU. A value - // of -1 disables the threshold. - CpuThreshold *float64 `type:"double"` - - // The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks - // Stacks should ignore metrics and suppress additional scaling events. For - // example, AWS OpsWorks Stacks adds new instances following an upscaling event - // but the instances won't start reducing the load until they have been booted - // and configured. There is no point in raising additional scaling events during - // that operation, which typically takes several minutes. IgnoreMetricsTime - // allows you to direct AWS OpsWorks Stacks to suppress scaling events long - // enough to get the new instances online. - IgnoreMetricsTime *int64 `min:"1" type:"integer"` - - // The number of instances to add or remove when the load exceeds a threshold. - InstanceCount *int64 `type:"integer"` - - // The load threshold. A value of -1 disables the threshold. For more information - // about how load is computed, see Load (computing) (http://en.wikipedia.org/wiki/Load_%28computing%29). - LoadThreshold *float64 `type:"double"` - - // The memory utilization threshold, as a percent of the available memory. A - // value of -1 disables the threshold. - MemoryThreshold *float64 `type:"double"` - - // The amount of time, in minutes, that the load must exceed a threshold before - // more instances are added or removed. - ThresholdsWaitTime *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s AutoScalingThresholds) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AutoScalingThresholds) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AutoScalingThresholds) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AutoScalingThresholds"} - if s.IgnoreMetricsTime != nil && *s.IgnoreMetricsTime < 1 { - invalidParams.Add(request.NewErrParamMinValue("IgnoreMetricsTime", 1)) - } - if s.ThresholdsWaitTime != nil && *s.ThresholdsWaitTime < 1 { - invalidParams.Add(request.NewErrParamMinValue("ThresholdsWaitTime", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlarms sets the Alarms field's value. -func (s *AutoScalingThresholds) SetAlarms(v []*string) *AutoScalingThresholds { - s.Alarms = v - return s -} - -// SetCpuThreshold sets the CpuThreshold field's value. -func (s *AutoScalingThresholds) SetCpuThreshold(v float64) *AutoScalingThresholds { - s.CpuThreshold = &v - return s -} - -// SetIgnoreMetricsTime sets the IgnoreMetricsTime field's value. -func (s *AutoScalingThresholds) SetIgnoreMetricsTime(v int64) *AutoScalingThresholds { - s.IgnoreMetricsTime = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *AutoScalingThresholds) SetInstanceCount(v int64) *AutoScalingThresholds { - s.InstanceCount = &v - return s -} - -// SetLoadThreshold sets the LoadThreshold field's value. -func (s *AutoScalingThresholds) SetLoadThreshold(v float64) *AutoScalingThresholds { - s.LoadThreshold = &v - return s -} - -// SetMemoryThreshold sets the MemoryThreshold field's value. -func (s *AutoScalingThresholds) SetMemoryThreshold(v float64) *AutoScalingThresholds { - s.MemoryThreshold = &v - return s -} - -// SetThresholdsWaitTime sets the ThresholdsWaitTime field's value. -func (s *AutoScalingThresholds) SetThresholdsWaitTime(v int64) *AutoScalingThresholds { - s.ThresholdsWaitTime = &v - return s -} - -// Describes a block device mapping. This data type maps directly to the Amazon -// EC2 BlockDeviceMapping (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_BlockDeviceMapping.html) -// data type. -type BlockDeviceMapping struct { - _ struct{} `type:"structure"` - - // The device name that is exposed to the instance, such as /dev/sdh. For the - // root device, you can use the explicit device name or you can set this parameter - // to ROOT_DEVICE and AWS OpsWorks Stacks will provide the correct device name. - DeviceName *string `type:"string"` - - // An EBSBlockDevice that defines how to configure an Amazon EBS volume when - // the instance is launched. - Ebs *EbsBlockDevice `type:"structure"` - - // Suppresses the specified device included in the AMI's block device mapping. - NoDevice *string `type:"string"` - - // The virtual device name. For more information, see BlockDeviceMapping (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_BlockDeviceMapping.html). - VirtualName *string `type:"string"` -} - -// String returns the string representation -func (s BlockDeviceMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BlockDeviceMapping) GoString() string { - return s.String() -} - -// SetDeviceName sets the DeviceName field's value. -func (s *BlockDeviceMapping) SetDeviceName(v string) *BlockDeviceMapping { - s.DeviceName = &v - return s -} - -// SetEbs sets the Ebs field's value. -func (s *BlockDeviceMapping) SetEbs(v *EbsBlockDevice) *BlockDeviceMapping { - s.Ebs = v - return s -} - -// SetNoDevice sets the NoDevice field's value. -func (s *BlockDeviceMapping) SetNoDevice(v string) *BlockDeviceMapping { - s.NoDevice = &v - return s -} - -// SetVirtualName sets the VirtualName field's value. -func (s *BlockDeviceMapping) SetVirtualName(v string) *BlockDeviceMapping { - s.VirtualName = &v - return s -} - -// Describes the Chef configuration. -type ChefConfiguration struct { - _ struct{} `type:"structure"` - - // The Berkshelf version. - BerkshelfVersion *string `type:"string"` - - // Whether to enable Berkshelf. - ManageBerkshelf *bool `type:"boolean"` -} - -// String returns the string representation -func (s ChefConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChefConfiguration) GoString() string { - return s.String() -} - -// SetBerkshelfVersion sets the BerkshelfVersion field's value. -func (s *ChefConfiguration) SetBerkshelfVersion(v string) *ChefConfiguration { - s.BerkshelfVersion = &v - return s -} - -// SetManageBerkshelf sets the ManageBerkshelf field's value. -func (s *ChefConfiguration) SetManageBerkshelf(v bool) *ChefConfiguration { - s.ManageBerkshelf = &v - return s -} - -type CloneStackInput struct { - _ struct{} `type:"structure"` - - // The default AWS OpsWorks Stacks agent version. You have the following options: - // - // * Auto-update - Set this parameter to LATEST. AWS OpsWorks Stacks automatically - // installs new agent versions on the stack's instances as soon as they are - // available. - // - // * Fixed version - Set this parameter to your preferred agent version. - // To update the agent version, you must edit the stack configuration and - // specify a new version. AWS OpsWorks Stacks then automatically installs - // that version on the stack's instances. - // - // The default setting is LATEST. To specify an agent version, you must use - // the complete version number, not the abbreviated number shown on the console. - // For a list of available agent version numbers, call DescribeAgentVersions. - // AgentVersion cannot be set to Chef 12.2. - // - // You can also specify an agent version when you create or update an instance, - // which overrides the stack's default setting. - AgentVersion *string `type:"string"` - - // A list of stack attributes and values as key/value pairs to be added to the - // cloned stack. - Attributes map[string]*string `type:"map"` - - // A ChefConfiguration object that specifies whether to enable Berkshelf and - // the Berkshelf version on Chef 11.10 stacks. For more information, see Create - // a New Stack (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html). - ChefConfiguration *ChefConfiguration `type:"structure"` - - // A list of source stack app IDs to be included in the cloned stack. - CloneAppIds []*string `type:"list"` - - // Whether to clone the source stack's permissions. - ClonePermissions *bool `type:"boolean"` - - // The configuration manager. When you clone a stack we recommend that you use - // the configuration manager to specify the Chef version: 12, 11.10, or 11.4 - // for Linux stacks, or 12.2 for Windows stacks. The default value for Linux - // stacks is currently 12. - ConfigurationManager *StackConfigurationManager `type:"structure"` - - // Contains the information required to retrieve an app or cookbook from a repository. - // For more information, see Creating Apps (http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html) - // or Custom Recipes and Cookbooks (http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html). - CustomCookbooksSource *Source `type:"structure"` - - // A string that contains user-defined, custom JSON. It is used to override - // the corresponding default stack configuration JSON values. The string should - // be in the following format: - // - // "{\"key1\": \"value1\", \"key2\": \"value2\",...}" - // - // For more information about custom JSON, see Use Custom JSON to Modify the - // Stack Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html) - CustomJson *string `type:"string"` - - // The cloned stack's default Availability Zone, which must be in the specified - // region. For more information, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html). - // If you also specify a value for DefaultSubnetId, the subnet must be in the - // same zone. For more information, see the VpcId parameter description. - DefaultAvailabilityZone *string `type:"string"` - - // The Amazon Resource Name (ARN) of an IAM profile that is the default profile - // for all of the stack's EC2 instances. For more information about IAM ARNs, - // see Using Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html). - DefaultInstanceProfileArn *string `type:"string"` - - // The stack's operating system, which must be set to one of the following. - // - // * A supported Linux operating system: An Amazon Linux version, such as - // Amazon Linux 2017.09, Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon - // Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03. - // - // * A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu - // 14.04 LTS, or Ubuntu 12.04 LTS. - // - // * CentOS Linux 7 - // - // * Red Hat Enterprise Linux 7 - // - // * Microsoft Windows Server 2012 R2 Base, Microsoft Windows Server 2012 - // R2 with SQL Server Express, Microsoft Windows Server 2012 R2 with SQL - // Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web. - // - // * A custom AMI: Custom. You specify the custom AMI you want to use when - // you create instances. For more information about how to use custom AMIs - // with OpsWorks, see Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). - // - // The default option is the parent stack's operating system. For more information - // about supported operating systems, see AWS OpsWorks Stacks Operating Systems - // (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). - // - // You can specify a different Linux operating system for the cloned stack, - // but you cannot change from Linux to Windows or Windows to Linux. - DefaultOs *string `type:"string"` - - // The default root device type. This value is used by default for all instances - // in the cloned stack, but you can override it when you create an instance. - // For more information, see Storage for the Root Device (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device). - DefaultRootDeviceType *string `type:"string" enum:"RootDeviceType"` - - // A default Amazon EC2 key pair name. The default value is none. If you specify - // a key pair name, AWS OpsWorks installs the public key on the instance and - // you can use the private key with an SSH client to log in to the instance. - // For more information, see Using SSH to Communicate with an Instance (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-ssh.html) - // and Managing SSH Access (http://docs.aws.amazon.com/opsworks/latest/userguide/security-ssh-access.html). - // You can override this setting by specifying a different key pair, or no key - // pair, when you create an instance (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-add.html). - DefaultSshKeyName *string `type:"string"` - - // The stack's default VPC subnet ID. This parameter is required if you specify - // a value for the VpcId parameter. All instances are launched into this subnet - // unless you specify otherwise when you create the instance. If you also specify - // a value for DefaultAvailabilityZone, the subnet must be in that zone. For - // information on default values and when this parameter is required, see the - // VpcId parameter description. - DefaultSubnetId *string `type:"string"` - - // The stack's host name theme, with spaces are replaced by underscores. The - // theme is used to generate host names for the stack's instances. By default, - // HostnameTheme is set to Layer_Dependent, which creates host names by appending - // integers to the layer's short name. The other themes are: - // - // * Baked_Goods - // - // * Clouds - // - // * Europe_Cities - // - // * Fruits - // - // * Greek_Deities - // - // * Legendary_creatures_from_Japan - // - // * Planets_and_Moons - // - // * Roman_Deities - // - // * Scottish_Islands - // - // * US_Cities - // - // * Wild_Cats - // - // To obtain a generated host name, call GetHostNameSuggestion, which returns - // a host name based on the current theme. - HostnameTheme *string `type:"string"` - - // The cloned stack name. - Name *string `type:"string"` - - // The cloned stack AWS region, such as "ap-northeast-2". For more information - // about AWS regions, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html). - Region *string `type:"string"` - - // The stack AWS Identity and Access Management (IAM) role, which allows AWS - // OpsWorks Stacks to work with AWS resources on your behalf. You must set this - // parameter to the Amazon Resource Name (ARN) for an existing IAM role. If - // you create a stack by using the AWS OpsWorks Stacks console, it creates the - // role for you. You can obtain an existing stack's IAM ARN programmatically - // by calling DescribePermissions. For more information about IAM ARNs, see - // Using Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html). - // - // You must set this parameter to a valid service role ARN or the action will - // fail; there is no default value. You can specify the source stack's service - // role ARN, if you prefer, but you must do so explicitly. - // - // ServiceRoleArn is a required field - ServiceRoleArn *string `type:"string" required:"true"` - - // The source stack ID. - // - // SourceStackId is a required field - SourceStackId *string `type:"string" required:"true"` - - // Whether to use custom cookbooks. - UseCustomCookbooks *bool `type:"boolean"` - - // Whether to associate the AWS OpsWorks Stacks built-in security groups with - // the stack's layers. - // - // AWS OpsWorks Stacks provides a standard set of built-in security groups, - // one for each layer, which are associated with layers by default. With UseOpsworksSecurityGroups - // you can instead provide your own custom security groups. UseOpsworksSecurityGroups - // has the following settings: - // - // * True - AWS OpsWorks Stacks automatically associates the appropriate - // built-in security group with each layer (default setting). You can associate - // additional security groups with a layer after you create it but you cannot - // delete the built-in security group. - // - // * False - AWS OpsWorks Stacks does not associate built-in security groups - // with layers. You must create appropriate Amazon Elastic Compute Cloud - // (Amazon EC2) security groups and associate a security group with each - // layer that you create. However, you can still manually associate a built-in - // security group with a layer on creation; custom security groups are required - // only for those layers that need custom settings. - // - // For more information, see Create a New Stack (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html). - UseOpsworksSecurityGroups *bool `type:"boolean"` - - // The ID of the VPC that the cloned stack is to be launched into. It must be - // in the specified region. All instances are launched into this VPC, and you - // cannot change the ID later. - // - // * If your account supports EC2 Classic, the default value is no VPC. - // - // * If your account does not support EC2 Classic, the default value is the - // default VPC for the specified region. - // - // If the VPC ID corresponds to a default VPC and you have specified either - // the DefaultAvailabilityZone or the DefaultSubnetId parameter only, AWS OpsWorks - // Stacks infers the value of the other parameter. If you specify neither parameter, - // AWS OpsWorks Stacks sets these parameters to the first valid Availability - // Zone for the specified region and the corresponding default VPC subnet ID, - // respectively. - // - // If you specify a nondefault VPC ID, note the following: - // - // * It must belong to a VPC in your account that is in the specified region. - // - // * You must specify a value for DefaultSubnetId. - // - // For more information about how to use AWS OpsWorks Stacks with a VPC, see - // Running a Stack in a VPC (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-vpc.html). - // For more information about default VPC and EC2 Classic, see Supported Platforms - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html). - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s CloneStackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloneStackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CloneStackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloneStackInput"} - if s.ServiceRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceRoleArn")) - } - if s.SourceStackId == nil { - invalidParams.Add(request.NewErrParamRequired("SourceStackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAgentVersion sets the AgentVersion field's value. -func (s *CloneStackInput) SetAgentVersion(v string) *CloneStackInput { - s.AgentVersion = &v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *CloneStackInput) SetAttributes(v map[string]*string) *CloneStackInput { - s.Attributes = v - return s -} - -// SetChefConfiguration sets the ChefConfiguration field's value. -func (s *CloneStackInput) SetChefConfiguration(v *ChefConfiguration) *CloneStackInput { - s.ChefConfiguration = v - return s -} - -// SetCloneAppIds sets the CloneAppIds field's value. -func (s *CloneStackInput) SetCloneAppIds(v []*string) *CloneStackInput { - s.CloneAppIds = v - return s -} - -// SetClonePermissions sets the ClonePermissions field's value. -func (s *CloneStackInput) SetClonePermissions(v bool) *CloneStackInput { - s.ClonePermissions = &v - return s -} - -// SetConfigurationManager sets the ConfigurationManager field's value. -func (s *CloneStackInput) SetConfigurationManager(v *StackConfigurationManager) *CloneStackInput { - s.ConfigurationManager = v - return s -} - -// SetCustomCookbooksSource sets the CustomCookbooksSource field's value. -func (s *CloneStackInput) SetCustomCookbooksSource(v *Source) *CloneStackInput { - s.CustomCookbooksSource = v - return s -} - -// SetCustomJson sets the CustomJson field's value. -func (s *CloneStackInput) SetCustomJson(v string) *CloneStackInput { - s.CustomJson = &v - return s -} - -// SetDefaultAvailabilityZone sets the DefaultAvailabilityZone field's value. -func (s *CloneStackInput) SetDefaultAvailabilityZone(v string) *CloneStackInput { - s.DefaultAvailabilityZone = &v - return s -} - -// SetDefaultInstanceProfileArn sets the DefaultInstanceProfileArn field's value. -func (s *CloneStackInput) SetDefaultInstanceProfileArn(v string) *CloneStackInput { - s.DefaultInstanceProfileArn = &v - return s -} - -// SetDefaultOs sets the DefaultOs field's value. -func (s *CloneStackInput) SetDefaultOs(v string) *CloneStackInput { - s.DefaultOs = &v - return s -} - -// SetDefaultRootDeviceType sets the DefaultRootDeviceType field's value. -func (s *CloneStackInput) SetDefaultRootDeviceType(v string) *CloneStackInput { - s.DefaultRootDeviceType = &v - return s -} - -// SetDefaultSshKeyName sets the DefaultSshKeyName field's value. -func (s *CloneStackInput) SetDefaultSshKeyName(v string) *CloneStackInput { - s.DefaultSshKeyName = &v - return s -} - -// SetDefaultSubnetId sets the DefaultSubnetId field's value. -func (s *CloneStackInput) SetDefaultSubnetId(v string) *CloneStackInput { - s.DefaultSubnetId = &v - return s -} - -// SetHostnameTheme sets the HostnameTheme field's value. -func (s *CloneStackInput) SetHostnameTheme(v string) *CloneStackInput { - s.HostnameTheme = &v - return s -} - -// SetName sets the Name field's value. -func (s *CloneStackInput) SetName(v string) *CloneStackInput { - s.Name = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *CloneStackInput) SetRegion(v string) *CloneStackInput { - s.Region = &v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *CloneStackInput) SetServiceRoleArn(v string) *CloneStackInput { - s.ServiceRoleArn = &v - return s -} - -// SetSourceStackId sets the SourceStackId field's value. -func (s *CloneStackInput) SetSourceStackId(v string) *CloneStackInput { - s.SourceStackId = &v - return s -} - -// SetUseCustomCookbooks sets the UseCustomCookbooks field's value. -func (s *CloneStackInput) SetUseCustomCookbooks(v bool) *CloneStackInput { - s.UseCustomCookbooks = &v - return s -} - -// SetUseOpsworksSecurityGroups sets the UseOpsworksSecurityGroups field's value. -func (s *CloneStackInput) SetUseOpsworksSecurityGroups(v bool) *CloneStackInput { - s.UseOpsworksSecurityGroups = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CloneStackInput) SetVpcId(v string) *CloneStackInput { - s.VpcId = &v - return s -} - -// Contains the response to a CloneStack request. -type CloneStackOutput struct { - _ struct{} `type:"structure"` - - // The cloned stack ID. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s CloneStackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloneStackOutput) GoString() string { - return s.String() -} - -// SetStackId sets the StackId field's value. -func (s *CloneStackOutput) SetStackId(v string) *CloneStackOutput { - s.StackId = &v - return s -} - -// Describes the Amazon CloudWatch logs configuration for a layer. -type CloudWatchLogsConfiguration struct { - _ struct{} `type:"structure"` - - // Whether CloudWatch Logs is enabled for a layer. - Enabled *bool `type:"boolean"` - - // A list of configuration options for CloudWatch Logs. - LogStreams []*CloudWatchLogsLogStream `type:"list"` -} - -// String returns the string representation -func (s CloudWatchLogsConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudWatchLogsConfiguration) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *CloudWatchLogsConfiguration) SetEnabled(v bool) *CloudWatchLogsConfiguration { - s.Enabled = &v - return s -} - -// SetLogStreams sets the LogStreams field's value. -func (s *CloudWatchLogsConfiguration) SetLogStreams(v []*CloudWatchLogsLogStream) *CloudWatchLogsConfiguration { - s.LogStreams = v - return s -} - -// Describes the Amazon CloudWatch logs configuration for a layer. For detailed -// information about members of this data type, see the CloudWatch Logs Agent -// Reference (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AgentReference.html). -type CloudWatchLogsLogStream struct { - _ struct{} `type:"structure"` - - // Specifies the max number of log events in a batch, up to 10000. The default - // value is 1000. - BatchCount *int64 `type:"integer"` - - // Specifies the maximum size of log events in a batch, in bytes, up to 1048576 - // bytes. The default value is 32768 bytes. This size is calculated as the sum - // of all event messages in UTF-8, plus 26 bytes for each log event. - BatchSize *int64 `type:"integer"` - - // Specifies the time duration for the batching of log events. The minimum value - // is 5000ms and default value is 5000ms. - BufferDuration *int64 `type:"integer"` - - // Specifies how the time stamp is extracted from logs. For more information, - // see the CloudWatch Logs Agent Reference (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AgentReference.html). - DatetimeFormat *string `type:"string"` - - // Specifies the encoding of the log file so that the file can be read correctly. - // The default is utf_8. Encodings supported by Python codecs.decode() can be - // used here. - Encoding *string `type:"string" enum:"CloudWatchLogsEncoding"` - - // Specifies log files that you want to push to CloudWatch Logs. - // - // File can point to a specific file or multiple files (by using wild card characters - // such as /var/log/system.log*). Only the latest file is pushed to CloudWatch - // Logs, based on file modification time. We recommend that you use wild card - // characters to specify a series of files of the same type, such as access_log.2014-06-01-01, - // access_log.2014-06-01-02, and so on by using a pattern like access_log.*. - // Don't use a wildcard to match multiple file types, such as access_log_80 - // and access_log_443. To specify multiple, different file types, add another - // log stream entry to the configuration file, so that each log file type is - // stored in a different log group. - // - // Zipped files are not supported. - File *string `type:"string"` - - // Specifies the range of lines for identifying a file. The valid values are - // one number, or two dash-delimited numbers, such as '1', '2-5'. The default - // value is '1', meaning the first line is used to calculate the fingerprint. - // Fingerprint lines are not sent to CloudWatch Logs unless all specified lines - // are available. - FileFingerprintLines *string `type:"string"` - - // Specifies where to start to read data (start_of_file or end_of_file). The - // default is start_of_file. This setting is only used if there is no state - // persisted for that log stream. - InitialPosition *string `type:"string" enum:"CloudWatchLogsInitialPosition"` - - // Specifies the destination log group. A log group is created automatically - // if it doesn't already exist. Log group names can be between 1 and 512 characters - // long. Allowed characters include a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), - // '/' (forward slash), and '.' (period). - LogGroupName *string `type:"string"` - - // Specifies the pattern for identifying the start of a log message. - MultiLineStartPattern *string `type:"string"` - - // Specifies the time zone of log event time stamps. - TimeZone *string `type:"string" enum:"CloudWatchLogsTimeZone"` -} - -// String returns the string representation -func (s CloudWatchLogsLogStream) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudWatchLogsLogStream) GoString() string { - return s.String() -} - -// SetBatchCount sets the BatchCount field's value. -func (s *CloudWatchLogsLogStream) SetBatchCount(v int64) *CloudWatchLogsLogStream { - s.BatchCount = &v - return s -} - -// SetBatchSize sets the BatchSize field's value. -func (s *CloudWatchLogsLogStream) SetBatchSize(v int64) *CloudWatchLogsLogStream { - s.BatchSize = &v - return s -} - -// SetBufferDuration sets the BufferDuration field's value. -func (s *CloudWatchLogsLogStream) SetBufferDuration(v int64) *CloudWatchLogsLogStream { - s.BufferDuration = &v - return s -} - -// SetDatetimeFormat sets the DatetimeFormat field's value. -func (s *CloudWatchLogsLogStream) SetDatetimeFormat(v string) *CloudWatchLogsLogStream { - s.DatetimeFormat = &v - return s -} - -// SetEncoding sets the Encoding field's value. -func (s *CloudWatchLogsLogStream) SetEncoding(v string) *CloudWatchLogsLogStream { - s.Encoding = &v - return s -} - -// SetFile sets the File field's value. -func (s *CloudWatchLogsLogStream) SetFile(v string) *CloudWatchLogsLogStream { - s.File = &v - return s -} - -// SetFileFingerprintLines sets the FileFingerprintLines field's value. -func (s *CloudWatchLogsLogStream) SetFileFingerprintLines(v string) *CloudWatchLogsLogStream { - s.FileFingerprintLines = &v - return s -} - -// SetInitialPosition sets the InitialPosition field's value. -func (s *CloudWatchLogsLogStream) SetInitialPosition(v string) *CloudWatchLogsLogStream { - s.InitialPosition = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *CloudWatchLogsLogStream) SetLogGroupName(v string) *CloudWatchLogsLogStream { - s.LogGroupName = &v - return s -} - -// SetMultiLineStartPattern sets the MultiLineStartPattern field's value. -func (s *CloudWatchLogsLogStream) SetMultiLineStartPattern(v string) *CloudWatchLogsLogStream { - s.MultiLineStartPattern = &v - return s -} - -// SetTimeZone sets the TimeZone field's value. -func (s *CloudWatchLogsLogStream) SetTimeZone(v string) *CloudWatchLogsLogStream { - s.TimeZone = &v - return s -} - -// Describes a command. -type Command struct { - _ struct{} `type:"structure"` - - // Date and time when the command was acknowledged. - AcknowledgedAt *string `type:"string"` - - // The command ID. - CommandId *string `type:"string"` - - // Date when the command completed. - CompletedAt *string `type:"string"` - - // Date and time when the command was run. - CreatedAt *string `type:"string"` - - // The command deployment ID. - DeploymentId *string `type:"string"` - - // The command exit code. - ExitCode *int64 `type:"integer"` - - // The ID of the instance where the command was executed. - InstanceId *string `type:"string"` - - // The URL of the command log. - LogUrl *string `type:"string"` - - // The command status: - // - // * failed - // - // * successful - // - // * skipped - // - // * pending - Status *string `type:"string"` - - // The command type: - // - // * configure - // - // * deploy - // - // * execute_recipes - // - // * install_dependencies - // - // * restart - // - // * rollback - // - // * setup - // - // * start - // - // * stop - // - // * undeploy - // - // * update_custom_cookbooks - // - // * update_dependencies - Type *string `type:"string"` -} - -// String returns the string representation -func (s Command) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Command) GoString() string { - return s.String() -} - -// SetAcknowledgedAt sets the AcknowledgedAt field's value. -func (s *Command) SetAcknowledgedAt(v string) *Command { - s.AcknowledgedAt = &v - return s -} - -// SetCommandId sets the CommandId field's value. -func (s *Command) SetCommandId(v string) *Command { - s.CommandId = &v - return s -} - -// SetCompletedAt sets the CompletedAt field's value. -func (s *Command) SetCompletedAt(v string) *Command { - s.CompletedAt = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Command) SetCreatedAt(v string) *Command { - s.CreatedAt = &v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *Command) SetDeploymentId(v string) *Command { - s.DeploymentId = &v - return s -} - -// SetExitCode sets the ExitCode field's value. -func (s *Command) SetExitCode(v int64) *Command { - s.ExitCode = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *Command) SetInstanceId(v string) *Command { - s.InstanceId = &v - return s -} - -// SetLogUrl sets the LogUrl field's value. -func (s *Command) SetLogUrl(v string) *Command { - s.LogUrl = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Command) SetStatus(v string) *Command { - s.Status = &v - return s -} - -// SetType sets the Type field's value. -func (s *Command) SetType(v string) *Command { - s.Type = &v - return s -} - -type CreateAppInput struct { - _ struct{} `type:"structure"` - - // A Source object that specifies the app repository. - AppSource *Source `type:"structure"` - - // One or more user-defined key/value pairs to be added to the stack attributes. - Attributes map[string]*string `type:"map"` - - // The app's data source. - DataSources []*DataSource `type:"list"` - - // A description of the app. - Description *string `type:"string"` - - // The app virtual host settings, with multiple domains separated by commas. - // For example: 'www.example.com, example.com' - Domains []*string `type:"list"` - - // Whether to enable SSL for the app. - EnableSsl *bool `type:"boolean"` - - // An array of EnvironmentVariable objects that specify environment variables - // to be associated with the app. After you deploy the app, these variables - // are defined on the associated app server instance. For more information, - // see Environment Variables (http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html#workingapps-creating-environment). - // - // There is no specific limit on the number of environment variables. However, - // the size of the associated data structure - which includes the variables' - // names, values, and protected flag values - cannot exceed 10 KB (10240 Bytes). - // This limit should accommodate most if not all use cases. Exceeding it will - // cause an exception with the message, "Environment: is too large (maximum - // is 10KB)." - // - // This parameter is supported only by Chef 11.10 stacks. If you have specified - // one or more environment variables, you cannot modify the stack's Chef version. - Environment []*EnvironmentVariable `type:"list"` - - // The app name. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The app's short name. - Shortname *string `type:"string"` - - // An SslConfiguration object with the SSL configuration. - SslConfiguration *SslConfiguration `type:"structure"` - - // The stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` - - // The app type. Each supported type is associated with a particular layer. - // For example, PHP applications are associated with a PHP layer. AWS OpsWorks - // Stacks deploys an application to those instances that are members of the - // corresponding layer. If your app isn't one of the standard types, or you - // prefer to implement your own Deploy recipes, specify other. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"AppType"` -} - -// String returns the string representation -func (s CreateAppInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAppInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAppInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAppInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Environment != nil { - for i, v := range s.Environment { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Environment", i), err.(request.ErrInvalidParams)) - } - } - } - if s.SslConfiguration != nil { - if err := s.SslConfiguration.Validate(); err != nil { - invalidParams.AddNested("SslConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAppSource sets the AppSource field's value. -func (s *CreateAppInput) SetAppSource(v *Source) *CreateAppInput { - s.AppSource = v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *CreateAppInput) SetAttributes(v map[string]*string) *CreateAppInput { - s.Attributes = v - return s -} - -// SetDataSources sets the DataSources field's value. -func (s *CreateAppInput) SetDataSources(v []*DataSource) *CreateAppInput { - s.DataSources = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateAppInput) SetDescription(v string) *CreateAppInput { - s.Description = &v - return s -} - -// SetDomains sets the Domains field's value. -func (s *CreateAppInput) SetDomains(v []*string) *CreateAppInput { - s.Domains = v - return s -} - -// SetEnableSsl sets the EnableSsl field's value. -func (s *CreateAppInput) SetEnableSsl(v bool) *CreateAppInput { - s.EnableSsl = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *CreateAppInput) SetEnvironment(v []*EnvironmentVariable) *CreateAppInput { - s.Environment = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateAppInput) SetName(v string) *CreateAppInput { - s.Name = &v - return s -} - -// SetShortname sets the Shortname field's value. -func (s *CreateAppInput) SetShortname(v string) *CreateAppInput { - s.Shortname = &v - return s -} - -// SetSslConfiguration sets the SslConfiguration field's value. -func (s *CreateAppInput) SetSslConfiguration(v *SslConfiguration) *CreateAppInput { - s.SslConfiguration = v - return s -} - -// SetStackId sets the StackId field's value. -func (s *CreateAppInput) SetStackId(v string) *CreateAppInput { - s.StackId = &v - return s -} - -// SetType sets the Type field's value. -func (s *CreateAppInput) SetType(v string) *CreateAppInput { - s.Type = &v - return s -} - -// Contains the response to a CreateApp request. -type CreateAppOutput struct { - _ struct{} `type:"structure"` - - // The app ID. - AppId *string `type:"string"` -} - -// String returns the string representation -func (s CreateAppOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAppOutput) GoString() string { - return s.String() -} - -// SetAppId sets the AppId field's value. -func (s *CreateAppOutput) SetAppId(v string) *CreateAppOutput { - s.AppId = &v - return s -} - -type CreateDeploymentInput struct { - _ struct{} `type:"structure"` - - // The app ID. This parameter is required for app deployments, but not for other - // deployment commands. - AppId *string `type:"string"` - - // A DeploymentCommand object that specifies the deployment command and any - // associated arguments. - // - // Command is a required field - Command *DeploymentCommand `type:"structure" required:"true"` - - // A user-defined comment. - Comment *string `type:"string"` - - // A string that contains user-defined, custom JSON. It is used to override - // the corresponding default stack configuration JSON values. The string should - // be in the following format: - // - // "{\"key1\": \"value1\", \"key2\": \"value2\",...}" - // - // For more information about custom JSON, see Use Custom JSON to Modify the - // Stack Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). - CustomJson *string `type:"string"` - - // The instance IDs for the deployment targets. - InstanceIds []*string `type:"list"` - - // The layer IDs for the deployment targets. - LayerIds []*string `type:"list"` - - // The stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` -} - -// 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.Command == nil { - invalidParams.Add(request.NewErrParamRequired("Command")) - } - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - if s.Command != nil { - if err := s.Command.Validate(); err != nil { - invalidParams.AddNested("Command", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAppId sets the AppId field's value. -func (s *CreateDeploymentInput) SetAppId(v string) *CreateDeploymentInput { - s.AppId = &v - return s -} - -// SetCommand sets the Command field's value. -func (s *CreateDeploymentInput) SetCommand(v *DeploymentCommand) *CreateDeploymentInput { - s.Command = v - return s -} - -// SetComment sets the Comment field's value. -func (s *CreateDeploymentInput) SetComment(v string) *CreateDeploymentInput { - s.Comment = &v - return s -} - -// SetCustomJson sets the CustomJson field's value. -func (s *CreateDeploymentInput) SetCustomJson(v string) *CreateDeploymentInput { - s.CustomJson = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *CreateDeploymentInput) SetInstanceIds(v []*string) *CreateDeploymentInput { - s.InstanceIds = v - return s -} - -// SetLayerIds sets the LayerIds field's value. -func (s *CreateDeploymentInput) SetLayerIds(v []*string) *CreateDeploymentInput { - s.LayerIds = v - return s -} - -// SetStackId sets the StackId field's value. -func (s *CreateDeploymentInput) SetStackId(v string) *CreateDeploymentInput { - s.StackId = &v - return s -} - -// Contains the response to a CreateDeployment request. -type CreateDeploymentOutput struct { - _ struct{} `type:"structure"` - - // The deployment ID, which can be used with other requests to identify 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() -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *CreateDeploymentOutput) SetDeploymentId(v string) *CreateDeploymentOutput { - s.DeploymentId = &v - return s -} - -type CreateInstanceInput struct { - _ struct{} `type:"structure"` - - // The default AWS OpsWorks Stacks agent version. You have the following options: - // - // * INHERIT - Use the stack's default agent version setting. - // - // * version_number - Use the specified agent version. This value overrides - // the stack's default setting. To update the agent version, edit the instance - // configuration and specify a new version. AWS OpsWorks Stacks then automatically - // installs that version on the instance. - // - // The default setting is INHERIT. To specify an agent version, you must use - // the complete version number, not the abbreviated number shown on the console. - // For a list of available agent version numbers, call DescribeAgentVersions. - // AgentVersion cannot be set to Chef 12.2. - AgentVersion *string `type:"string"` - - // A custom AMI ID to be used to create the instance. The AMI should be based - // on one of the supported operating systems. For more information, see Using - // Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). - // - // If you specify a custom AMI, you must set Os to Custom. - AmiId *string `type:"string"` - - // The instance architecture. The default option is x86_64. Instance types do - // not necessarily support both architectures. For a list of the architectures - // that are supported by the different instance types, see Instance Families - // and Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html). - Architecture *string `type:"string" enum:"Architecture"` - - // For load-based or time-based instances, the type. Windows stacks can use - // only time-based instances. - AutoScalingType *string `type:"string" enum:"AutoScalingType"` - - // The instance Availability Zone. For more information, see Regions and Endpoints - // (http://docs.aws.amazon.com/general/latest/gr/rande.html). - AvailabilityZone *string `type:"string"` - - // An array of BlockDeviceMapping objects that specify the instance's block - // devices. For more information, see Block Device Mapping (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html). - // Note that block device mappings are not supported for custom AMIs. - BlockDeviceMappings []*BlockDeviceMapping `type:"list"` - - // Whether to create an Amazon EBS-optimized instance. - EbsOptimized *bool `type:"boolean"` - - // The instance host name. - Hostname *string `type:"string"` - - // Whether to install operating system and package updates when the instance - // boots. The default value is true. To control when updates are installed, - // set this value to false. You must then update your instances manually by - // using CreateDeployment to run the update_dependencies stack command or by - // manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. - // - // We strongly recommend using the default value of true to ensure that your - // instances have the latest security updates. - InstallUpdatesOnBoot *bool `type:"boolean"` - - // The instance type, such as t2.micro. For a list of supported instance types, - // open the stack in the console, choose Instances, and choose + Instance. The - // Size list contains the currently supported types. For more information, see - // Instance Families and Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html). - // The parameter values that you use to specify the various types are in the - // API Name column of the Available Instance Types table. - // - // InstanceType is a required field - InstanceType *string `type:"string" required:"true"` - - // An array that contains the instance's layer IDs. - // - // LayerIds is a required field - LayerIds []*string `type:"list" required:"true"` - - // The instance's operating system, which must be set to one of the following. - // - // * A supported Linux operating system: An Amazon Linux version, such as - // Amazon Linux 2017.09, Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon - // Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03. - // - // * A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu - // 14.04 LTS, or Ubuntu 12.04 LTS. - // - // * CentOS Linux 7 - // - // * Red Hat Enterprise Linux 7 - // - // * A supported Windows operating system, such as Microsoft Windows Server - // 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, - // Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft - // Windows Server 2012 R2 with SQL Server Web. - // - // * A custom AMI: Custom. - // - // For more information about the supported operating systems, see AWS OpsWorks - // Stacks Operating Systems (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). - // - // The default option is the current Amazon Linux version. If you set this parameter - // to Custom, you must use the CreateInstance action's AmiId parameter to specify - // the custom AMI that you want to use. Block device mappings are not supported - // if the value is Custom. For more information about supported operating systems, - // see Operating Systems (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html)For - // more information about how to use custom AMIs with AWS OpsWorks Stacks, see - // Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). - Os *string `type:"string"` - - // The instance root device type. For more information, see Storage for the - // Root Device (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device). - RootDeviceType *string `type:"string" enum:"RootDeviceType"` - - // The instance's Amazon EC2 key-pair name. - SshKeyName *string `type:"string"` - - // The stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` - - // The ID of the instance's subnet. If the stack is running in a VPC, you can - // use this parameter to override the stack's default subnet ID value and direct - // AWS OpsWorks Stacks to launch the instance in a different subnet. - SubnetId *string `type:"string"` - - // The instance's tenancy option. The default option is no tenancy, or if the - // instance is running in a VPC, inherit tenancy settings from the VPC. The - // following are valid values for this parameter: dedicated, default, or host. - // Because there are costs associated with changes in tenancy options, we recommend - // that you research tenancy options before choosing them for your instances. - // For more information about dedicated hosts, see Dedicated Hosts Overview - // (http://aws.amazon.com/ec2/dedicated-hosts/) and Amazon EC2 Dedicated Hosts - // (http://aws.amazon.com/ec2/dedicated-hosts/). For more information about - // dedicated instances, see Dedicated Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/dedicated-instance.html) - // and Amazon EC2 Dedicated Instances (http://aws.amazon.com/ec2/purchasing-options/dedicated-instances/). - Tenancy *string `type:"string"` - - // The instance's virtualization type, paravirtual or hvm. - VirtualizationType *string `type:"string"` -} - -// String returns the string representation -func (s CreateInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstanceInput"} - if s.InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceType")) - } - if s.LayerIds == nil { - invalidParams.Add(request.NewErrParamRequired("LayerIds")) - } - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAgentVersion sets the AgentVersion field's value. -func (s *CreateInstanceInput) SetAgentVersion(v string) *CreateInstanceInput { - s.AgentVersion = &v - return s -} - -// SetAmiId sets the AmiId field's value. -func (s *CreateInstanceInput) SetAmiId(v string) *CreateInstanceInput { - s.AmiId = &v - return s -} - -// SetArchitecture sets the Architecture field's value. -func (s *CreateInstanceInput) SetArchitecture(v string) *CreateInstanceInput { - s.Architecture = &v - return s -} - -// SetAutoScalingType sets the AutoScalingType field's value. -func (s *CreateInstanceInput) SetAutoScalingType(v string) *CreateInstanceInput { - s.AutoScalingType = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateInstanceInput) SetAvailabilityZone(v string) *CreateInstanceInput { - s.AvailabilityZone = &v - return s -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *CreateInstanceInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *CreateInstanceInput { - s.BlockDeviceMappings = v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *CreateInstanceInput) SetEbsOptimized(v bool) *CreateInstanceInput { - s.EbsOptimized = &v - return s -} - -// SetHostname sets the Hostname field's value. -func (s *CreateInstanceInput) SetHostname(v string) *CreateInstanceInput { - s.Hostname = &v - return s -} - -// SetInstallUpdatesOnBoot sets the InstallUpdatesOnBoot field's value. -func (s *CreateInstanceInput) SetInstallUpdatesOnBoot(v bool) *CreateInstanceInput { - s.InstallUpdatesOnBoot = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *CreateInstanceInput) SetInstanceType(v string) *CreateInstanceInput { - s.InstanceType = &v - return s -} - -// SetLayerIds sets the LayerIds field's value. -func (s *CreateInstanceInput) SetLayerIds(v []*string) *CreateInstanceInput { - s.LayerIds = v - return s -} - -// SetOs sets the Os field's value. -func (s *CreateInstanceInput) SetOs(v string) *CreateInstanceInput { - s.Os = &v - return s -} - -// SetRootDeviceType sets the RootDeviceType field's value. -func (s *CreateInstanceInput) SetRootDeviceType(v string) *CreateInstanceInput { - s.RootDeviceType = &v - return s -} - -// SetSshKeyName sets the SshKeyName field's value. -func (s *CreateInstanceInput) SetSshKeyName(v string) *CreateInstanceInput { - s.SshKeyName = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *CreateInstanceInput) SetStackId(v string) *CreateInstanceInput { - s.StackId = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *CreateInstanceInput) SetSubnetId(v string) *CreateInstanceInput { - s.SubnetId = &v - return s -} - -// SetTenancy sets the Tenancy field's value. -func (s *CreateInstanceInput) SetTenancy(v string) *CreateInstanceInput { - s.Tenancy = &v - return s -} - -// SetVirtualizationType sets the VirtualizationType field's value. -func (s *CreateInstanceInput) SetVirtualizationType(v string) *CreateInstanceInput { - s.VirtualizationType = &v - return s -} - -// Contains the response to a CreateInstance request. -type CreateInstanceOutput struct { - _ struct{} `type:"structure"` - - // The instance ID. - InstanceId *string `type:"string"` -} - -// String returns the string representation -func (s CreateInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInstanceOutput) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *CreateInstanceOutput) SetInstanceId(v string) *CreateInstanceOutput { - s.InstanceId = &v - return s -} - -type CreateLayerInput struct { - _ struct{} `type:"structure"` - - // One or more user-defined key-value pairs to be added to the stack attributes. - // - // To create a cluster layer, set the EcsClusterArn attribute to the cluster's - // ARN. - Attributes map[string]*string `type:"map"` - - // Whether to automatically assign an Elastic IP address (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) - // to the layer's instances. For more information, see How to Edit a Layer (http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html). - AutoAssignElasticIps *bool `type:"boolean"` - - // For stacks that are running in a VPC, whether to automatically assign a public - // IP address to the layer's instances. For more information, see How to Edit - // a Layer (http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html). - AutoAssignPublicIps *bool `type:"boolean"` - - // Specifies CloudWatch Logs configuration options for the layer. For more information, - // see CloudWatchLogsLogStream. - CloudWatchLogsConfiguration *CloudWatchLogsConfiguration `type:"structure"` - - // The ARN of an IAM profile to be used for the layer's EC2 instances. For more - // information about IAM ARNs, see Using Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html). - CustomInstanceProfileArn *string `type:"string"` - - // A JSON-formatted string containing custom stack configuration and deployment - // attributes to be installed on the layer's instances. For more information, - // see Using Custom JSON (http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-json-override.html). - // This feature is supported as of version 1.7.42 of the AWS CLI. - CustomJson *string `type:"string"` - - // A LayerCustomRecipes object that specifies the layer custom recipes. - CustomRecipes *Recipes `type:"structure"` - - // An array containing the layer custom security group IDs. - CustomSecurityGroupIds []*string `type:"list"` - - // Whether to disable auto healing for the layer. - EnableAutoHealing *bool `type:"boolean"` - - // Whether to install operating system and package updates when the instance - // boots. The default value is true. To control when updates are installed, - // set this value to false. You must then update your instances manually by - // using CreateDeployment to run the update_dependencies stack command or by - // manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. - // - // To ensure that your instances have the latest security updates, we strongly - // recommend using the default value of true. - InstallUpdatesOnBoot *bool `type:"boolean"` - - // A LifeCycleEventConfiguration object that you can use to configure the Shutdown - // event to specify an execution timeout and enable or disable Elastic Load - // Balancer connection draining. - LifecycleEventConfiguration *LifecycleEventConfiguration `type:"structure"` - - // The layer name, which is used by the console. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // An array of Package objects that describes the layer packages. - Packages []*string `type:"list"` - - // For custom layers only, use this parameter to specify the layer's short name, - // which is used internally by AWS OpsWorks Stacks and by Chef recipes. The - // short name is also used as the name for the directory where your app files - // are installed. It can have a maximum of 200 characters, which are limited - // to the alphanumeric characters, '-', '_', and '.'. - // - // The built-in layers' short names are defined by AWS OpsWorks Stacks. For - // more information, see the Layer Reference (http://docs.aws.amazon.com/opsworks/latest/userguide/layers.html). - // - // Shortname is a required field - Shortname *string `type:"string" required:"true"` - - // The layer stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` - - // The layer type. A stack cannot have more than one built-in layer of the same - // type. It can have any number of custom layers. Built-in layers are not available - // in Chef 12 stacks. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"LayerType"` - - // Whether to use Amazon EBS-optimized instances. - UseEbsOptimizedInstances *bool `type:"boolean"` - - // A VolumeConfigurations object that describes the layer's Amazon EBS volumes. - VolumeConfigurations []*VolumeConfiguration `type:"list"` -} - -// String returns the string representation -func (s CreateLayerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLayerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLayerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLayerInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Shortname == nil { - invalidParams.Add(request.NewErrParamRequired("Shortname")) - } - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.VolumeConfigurations != nil { - for i, v := range s.VolumeConfigurations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "VolumeConfigurations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *CreateLayerInput) SetAttributes(v map[string]*string) *CreateLayerInput { - s.Attributes = v - return s -} - -// SetAutoAssignElasticIps sets the AutoAssignElasticIps field's value. -func (s *CreateLayerInput) SetAutoAssignElasticIps(v bool) *CreateLayerInput { - s.AutoAssignElasticIps = &v - return s -} - -// SetAutoAssignPublicIps sets the AutoAssignPublicIps field's value. -func (s *CreateLayerInput) SetAutoAssignPublicIps(v bool) *CreateLayerInput { - s.AutoAssignPublicIps = &v - return s -} - -// SetCloudWatchLogsConfiguration sets the CloudWatchLogsConfiguration field's value. -func (s *CreateLayerInput) SetCloudWatchLogsConfiguration(v *CloudWatchLogsConfiguration) *CreateLayerInput { - s.CloudWatchLogsConfiguration = v - return s -} - -// SetCustomInstanceProfileArn sets the CustomInstanceProfileArn field's value. -func (s *CreateLayerInput) SetCustomInstanceProfileArn(v string) *CreateLayerInput { - s.CustomInstanceProfileArn = &v - return s -} - -// SetCustomJson sets the CustomJson field's value. -func (s *CreateLayerInput) SetCustomJson(v string) *CreateLayerInput { - s.CustomJson = &v - return s -} - -// SetCustomRecipes sets the CustomRecipes field's value. -func (s *CreateLayerInput) SetCustomRecipes(v *Recipes) *CreateLayerInput { - s.CustomRecipes = v - return s -} - -// SetCustomSecurityGroupIds sets the CustomSecurityGroupIds field's value. -func (s *CreateLayerInput) SetCustomSecurityGroupIds(v []*string) *CreateLayerInput { - s.CustomSecurityGroupIds = v - return s -} - -// SetEnableAutoHealing sets the EnableAutoHealing field's value. -func (s *CreateLayerInput) SetEnableAutoHealing(v bool) *CreateLayerInput { - s.EnableAutoHealing = &v - return s -} - -// SetInstallUpdatesOnBoot sets the InstallUpdatesOnBoot field's value. -func (s *CreateLayerInput) SetInstallUpdatesOnBoot(v bool) *CreateLayerInput { - s.InstallUpdatesOnBoot = &v - return s -} - -// SetLifecycleEventConfiguration sets the LifecycleEventConfiguration field's value. -func (s *CreateLayerInput) SetLifecycleEventConfiguration(v *LifecycleEventConfiguration) *CreateLayerInput { - s.LifecycleEventConfiguration = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateLayerInput) SetName(v string) *CreateLayerInput { - s.Name = &v - return s -} - -// SetPackages sets the Packages field's value. -func (s *CreateLayerInput) SetPackages(v []*string) *CreateLayerInput { - s.Packages = v - return s -} - -// SetShortname sets the Shortname field's value. -func (s *CreateLayerInput) SetShortname(v string) *CreateLayerInput { - s.Shortname = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *CreateLayerInput) SetStackId(v string) *CreateLayerInput { - s.StackId = &v - return s -} - -// SetType sets the Type field's value. -func (s *CreateLayerInput) SetType(v string) *CreateLayerInput { - s.Type = &v - return s -} - -// SetUseEbsOptimizedInstances sets the UseEbsOptimizedInstances field's value. -func (s *CreateLayerInput) SetUseEbsOptimizedInstances(v bool) *CreateLayerInput { - s.UseEbsOptimizedInstances = &v - return s -} - -// SetVolumeConfigurations sets the VolumeConfigurations field's value. -func (s *CreateLayerInput) SetVolumeConfigurations(v []*VolumeConfiguration) *CreateLayerInput { - s.VolumeConfigurations = v - return s -} - -// Contains the response to a CreateLayer request. -type CreateLayerOutput struct { - _ struct{} `type:"structure"` - - // The layer ID. - LayerId *string `type:"string"` -} - -// String returns the string representation -func (s CreateLayerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLayerOutput) GoString() string { - return s.String() -} - -// SetLayerId sets the LayerId field's value. -func (s *CreateLayerOutput) SetLayerId(v string) *CreateLayerOutput { - s.LayerId = &v - return s -} - -type CreateStackInput struct { - _ struct{} `type:"structure"` - - // The default AWS OpsWorks Stacks agent version. You have the following options: - // - // * Auto-update - Set this parameter to LATEST. AWS OpsWorks Stacks automatically - // installs new agent versions on the stack's instances as soon as they are - // available. - // - // * Fixed version - Set this parameter to your preferred agent version. - // To update the agent version, you must edit the stack configuration and - // specify a new version. AWS OpsWorks Stacks then automatically installs - // that version on the stack's instances. - // - // The default setting is the most recent release of the agent. To specify an - // agent version, you must use the complete version number, not the abbreviated - // number shown on the console. For a list of available agent version numbers, - // call DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2. - // - // You can also specify an agent version when you create or update an instance, - // which overrides the stack's default setting. - AgentVersion *string `type:"string"` - - // One or more user-defined key-value pairs to be added to the stack attributes. - Attributes map[string]*string `type:"map"` - - // A ChefConfiguration object that specifies whether to enable Berkshelf and - // the Berkshelf version on Chef 11.10 stacks. For more information, see Create - // a New Stack (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html). - ChefConfiguration *ChefConfiguration `type:"structure"` - - // The configuration manager. When you create a stack we recommend that you - // use the configuration manager to specify the Chef version: 12, 11.10, or - // 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for - // Linux stacks is currently 12. - ConfigurationManager *StackConfigurationManager `type:"structure"` - - // Contains the information required to retrieve an app or cookbook from a repository. - // For more information, see Creating Apps (http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html) - // or Custom Recipes and Cookbooks (http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html). - CustomCookbooksSource *Source `type:"structure"` - - // A string that contains user-defined, custom JSON. It can be used to override - // the corresponding default stack configuration attribute values or to pass - // data to recipes. The string should be in the following format: - // - // "{\"key1\": \"value1\", \"key2\": \"value2\",...}" - // - // For more information about custom JSON, see Use Custom JSON to Modify the - // Stack Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). - CustomJson *string `type:"string"` - - // The stack's default Availability Zone, which must be in the specified region. - // For more information, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html). - // If you also specify a value for DefaultSubnetId, the subnet must be in the - // same zone. For more information, see the VpcId parameter description. - DefaultAvailabilityZone *string `type:"string"` - - // The Amazon Resource Name (ARN) of an IAM profile that is the default profile - // for all of the stack's EC2 instances. For more information about IAM ARNs, - // see Using Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html). - // - // DefaultInstanceProfileArn is a required field - DefaultInstanceProfileArn *string `type:"string" required:"true"` - - // The stack's default operating system, which is installed on every instance - // unless you specify a different operating system when you create the instance. - // You can specify one of the following. - // - // * A supported Linux operating system: An Amazon Linux version, such as - // Amazon Linux 2017.09, Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon - // Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03. - // - // * A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu - // 14.04 LTS, or Ubuntu 12.04 LTS. - // - // * CentOS Linux 7 - // - // * Red Hat Enterprise Linux 7 - // - // * A supported Windows operating system, such as Microsoft Windows Server - // 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, - // Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft - // Windows Server 2012 R2 with SQL Server Web. - // - // * A custom AMI: Custom. You specify the custom AMI you want to use when - // you create instances. For more information, see Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). - // - // The default option is the current Amazon Linux version. For more information - // about supported operating systems, see AWS OpsWorks Stacks Operating Systems - // (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). - DefaultOs *string `type:"string"` - - // The default root device type. This value is the default for all instances - // in the stack, but you can override it when you create an instance. The default - // option is instance-store. For more information, see Storage for the Root - // Device (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device). - DefaultRootDeviceType *string `type:"string" enum:"RootDeviceType"` - - // A default Amazon EC2 key pair name. The default value is none. If you specify - // a key pair name, AWS OpsWorks installs the public key on the instance and - // you can use the private key with an SSH client to log in to the instance. - // For more information, see Using SSH to Communicate with an Instance (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-ssh.html) - // and Managing SSH Access (http://docs.aws.amazon.com/opsworks/latest/userguide/security-ssh-access.html). - // You can override this setting by specifying a different key pair, or no key - // pair, when you create an instance (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-add.html). - DefaultSshKeyName *string `type:"string"` - - // The stack's default VPC subnet ID. This parameter is required if you specify - // a value for the VpcId parameter. All instances are launched into this subnet - // unless you specify otherwise when you create the instance. If you also specify - // a value for DefaultAvailabilityZone, the subnet must be in that zone. For - // information on default values and when this parameter is required, see the - // VpcId parameter description. - DefaultSubnetId *string `type:"string"` - - // The stack's host name theme, with spaces replaced by underscores. The theme - // is used to generate host names for the stack's instances. By default, HostnameTheme - // is set to Layer_Dependent, which creates host names by appending integers - // to the layer's short name. The other themes are: - // - // * Baked_Goods - // - // * Clouds - // - // * Europe_Cities - // - // * Fruits - // - // * Greek_Deities - // - // * Legendary_creatures_from_Japan - // - // * Planets_and_Moons - // - // * Roman_Deities - // - // * Scottish_Islands - // - // * US_Cities - // - // * Wild_Cats - // - // To obtain a generated host name, call GetHostNameSuggestion, which returns - // a host name based on the current theme. - HostnameTheme *string `type:"string"` - - // The stack name. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The stack's AWS region, such as ap-south-1. For more information about Amazon - // regions, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html). - // - // In the AWS CLI, this API maps to the --stack-region parameter. If the --stack-region - // parameter and the AWS CLI common parameter --region are set to the same value, - // the stack uses a regional endpoint. If the --stack-region parameter is not - // set, but the AWS CLI --region parameter is, this also results in a stack - // with a regional endpoint. However, if the --region parameter is set to us-east-1, - // and the --stack-region parameter is set to one of the following, then the - // stack uses a legacy or classic region: us-west-1, us-west-2, sa-east-1, eu-central-1, - // eu-west-1, ap-northeast-1, ap-southeast-1, ap-southeast-2. In this case, - // the actual API endpoint of the stack is in us-east-1. Only the preceding - // regions are supported as classic regions in the us-east-1 API endpoint. Because - // it is a best practice to choose the regional endpoint that is closest to - // where you manage AWS, we recommend that you use regional endpoints for new - // stacks. The AWS CLI common --region parameter always specifies a regional - // API endpoint; it cannot be used to specify a classic AWS OpsWorks Stacks - // region. - // - // Region is a required field - Region *string `type:"string" required:"true"` - - // The stack's AWS Identity and Access Management (IAM) role, which allows AWS - // OpsWorks Stacks to work with AWS resources on your behalf. You must set this - // parameter to the Amazon Resource Name (ARN) for an existing IAM role. For - // more information about IAM ARNs, see Using Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html). - // - // ServiceRoleArn is a required field - ServiceRoleArn *string `type:"string" required:"true"` - - // Whether the stack uses custom cookbooks. - UseCustomCookbooks *bool `type:"boolean"` - - // Whether to associate the AWS OpsWorks Stacks built-in security groups with - // the stack's layers. - // - // AWS OpsWorks Stacks provides a standard set of built-in security groups, - // one for each layer, which are associated with layers by default. With UseOpsworksSecurityGroups - // you can instead provide your own custom security groups. UseOpsworksSecurityGroups - // has the following settings: - // - // * True - AWS OpsWorks Stacks automatically associates the appropriate - // built-in security group with each layer (default setting). You can associate - // additional security groups with a layer after you create it, but you cannot - // delete the built-in security group. - // - // * False - AWS OpsWorks Stacks does not associate built-in security groups - // with layers. You must create appropriate EC2 security groups and associate - // a security group with each layer that you create. However, you can still - // manually associate a built-in security group with a layer on creation; - // custom security groups are required only for those layers that need custom - // settings. - // - // For more information, see Create a New Stack (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html). - UseOpsworksSecurityGroups *bool `type:"boolean"` - - // The ID of the VPC that the stack is to be launched into. The VPC must be - // in the stack's region. All instances are launched into this VPC. You cannot - // change the ID later. - // - // * If your account supports EC2-Classic, the default value is no VPC. - // - // * If your account does not support EC2-Classic, the default value is the - // default VPC for the specified region. - // - // If the VPC ID corresponds to a default VPC and you have specified either - // the DefaultAvailabilityZone or the DefaultSubnetId parameter only, AWS OpsWorks - // Stacks infers the value of the other parameter. If you specify neither parameter, - // AWS OpsWorks Stacks sets these parameters to the first valid Availability - // Zone for the specified region and the corresponding default VPC subnet ID, - // respectively. - // - // If you specify a nondefault VPC ID, note the following: - // - // * It must belong to a VPC in your account that is in the specified region. - // - // * You must specify a value for DefaultSubnetId. - // - // For more information about how to use AWS OpsWorks Stacks with a VPC, see - // Running a Stack in a VPC (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-vpc.html). - // For more information about default VPC and EC2-Classic, see Supported Platforms - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html). - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s CreateStackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStackInput"} - if s.DefaultInstanceProfileArn == nil { - invalidParams.Add(request.NewErrParamRequired("DefaultInstanceProfileArn")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Region == nil { - invalidParams.Add(request.NewErrParamRequired("Region")) - } - if s.ServiceRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceRoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAgentVersion sets the AgentVersion field's value. -func (s *CreateStackInput) SetAgentVersion(v string) *CreateStackInput { - s.AgentVersion = &v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *CreateStackInput) SetAttributes(v map[string]*string) *CreateStackInput { - s.Attributes = v - return s -} - -// SetChefConfiguration sets the ChefConfiguration field's value. -func (s *CreateStackInput) SetChefConfiguration(v *ChefConfiguration) *CreateStackInput { - s.ChefConfiguration = v - return s -} - -// SetConfigurationManager sets the ConfigurationManager field's value. -func (s *CreateStackInput) SetConfigurationManager(v *StackConfigurationManager) *CreateStackInput { - s.ConfigurationManager = v - return s -} - -// SetCustomCookbooksSource sets the CustomCookbooksSource field's value. -func (s *CreateStackInput) SetCustomCookbooksSource(v *Source) *CreateStackInput { - s.CustomCookbooksSource = v - return s -} - -// SetCustomJson sets the CustomJson field's value. -func (s *CreateStackInput) SetCustomJson(v string) *CreateStackInput { - s.CustomJson = &v - return s -} - -// SetDefaultAvailabilityZone sets the DefaultAvailabilityZone field's value. -func (s *CreateStackInput) SetDefaultAvailabilityZone(v string) *CreateStackInput { - s.DefaultAvailabilityZone = &v - return s -} - -// SetDefaultInstanceProfileArn sets the DefaultInstanceProfileArn field's value. -func (s *CreateStackInput) SetDefaultInstanceProfileArn(v string) *CreateStackInput { - s.DefaultInstanceProfileArn = &v - return s -} - -// SetDefaultOs sets the DefaultOs field's value. -func (s *CreateStackInput) SetDefaultOs(v string) *CreateStackInput { - s.DefaultOs = &v - return s -} - -// SetDefaultRootDeviceType sets the DefaultRootDeviceType field's value. -func (s *CreateStackInput) SetDefaultRootDeviceType(v string) *CreateStackInput { - s.DefaultRootDeviceType = &v - return s -} - -// SetDefaultSshKeyName sets the DefaultSshKeyName field's value. -func (s *CreateStackInput) SetDefaultSshKeyName(v string) *CreateStackInput { - s.DefaultSshKeyName = &v - return s -} - -// SetDefaultSubnetId sets the DefaultSubnetId field's value. -func (s *CreateStackInput) SetDefaultSubnetId(v string) *CreateStackInput { - s.DefaultSubnetId = &v - return s -} - -// SetHostnameTheme sets the HostnameTheme field's value. -func (s *CreateStackInput) SetHostnameTheme(v string) *CreateStackInput { - s.HostnameTheme = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateStackInput) SetName(v string) *CreateStackInput { - s.Name = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *CreateStackInput) SetRegion(v string) *CreateStackInput { - s.Region = &v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *CreateStackInput) SetServiceRoleArn(v string) *CreateStackInput { - s.ServiceRoleArn = &v - return s -} - -// SetUseCustomCookbooks sets the UseCustomCookbooks field's value. -func (s *CreateStackInput) SetUseCustomCookbooks(v bool) *CreateStackInput { - s.UseCustomCookbooks = &v - return s -} - -// SetUseOpsworksSecurityGroups sets the UseOpsworksSecurityGroups field's value. -func (s *CreateStackInput) SetUseOpsworksSecurityGroups(v bool) *CreateStackInput { - s.UseOpsworksSecurityGroups = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CreateStackInput) SetVpcId(v string) *CreateStackInput { - s.VpcId = &v - return s -} - -// Contains the response to a CreateStack request. -type CreateStackOutput struct { - _ struct{} `type:"structure"` - - // The stack ID, which is an opaque string that you use to identify the stack - // when performing actions such as DescribeStacks. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s CreateStackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStackOutput) GoString() string { - return s.String() -} - -// SetStackId sets the StackId field's value. -func (s *CreateStackOutput) SetStackId(v string) *CreateStackOutput { - s.StackId = &v - return s -} - -type CreateUserProfileInput struct { - _ struct{} `type:"structure"` - - // Whether users can specify their own SSH public key through the My Settings - // page. For more information, see Setting an IAM User's Public SSH Key (http://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html). - AllowSelfManagement *bool `type:"boolean"` - - // The user's IAM ARN; this can also be a federated user's ARN. - // - // IamUserArn is a required field - IamUserArn *string `type:"string" required:"true"` - - // The user's public SSH key. - SshPublicKey *string `type:"string"` - - // The user's SSH user name. The allowable characters are [a-z], [A-Z], [0-9], - // '-', and '_'. If the specified name includes other punctuation marks, AWS - // OpsWorks Stacks removes them. For example, my.name will be changed to myname. - // If you do not specify an SSH user name, AWS OpsWorks Stacks generates one - // from the IAM user name. - SshUsername *string `type:"string"` -} - -// String returns the string representation -func (s CreateUserProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateUserProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateUserProfileInput"} - if s.IamUserArn == nil { - invalidParams.Add(request.NewErrParamRequired("IamUserArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowSelfManagement sets the AllowSelfManagement field's value. -func (s *CreateUserProfileInput) SetAllowSelfManagement(v bool) *CreateUserProfileInput { - s.AllowSelfManagement = &v - return s -} - -// SetIamUserArn sets the IamUserArn field's value. -func (s *CreateUserProfileInput) SetIamUserArn(v string) *CreateUserProfileInput { - s.IamUserArn = &v - return s -} - -// SetSshPublicKey sets the SshPublicKey field's value. -func (s *CreateUserProfileInput) SetSshPublicKey(v string) *CreateUserProfileInput { - s.SshPublicKey = &v - return s -} - -// SetSshUsername sets the SshUsername field's value. -func (s *CreateUserProfileInput) SetSshUsername(v string) *CreateUserProfileInput { - s.SshUsername = &v - return s -} - -// Contains the response to a CreateUserProfile request. -type CreateUserProfileOutput struct { - _ struct{} `type:"structure"` - - // The user's IAM ARN. - IamUserArn *string `type:"string"` -} - -// String returns the string representation -func (s CreateUserProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserProfileOutput) GoString() string { - return s.String() -} - -// SetIamUserArn sets the IamUserArn field's value. -func (s *CreateUserProfileOutput) SetIamUserArn(v string) *CreateUserProfileOutput { - s.IamUserArn = &v - return s -} - -// Describes an app's data source. -type DataSource struct { - _ struct{} `type:"structure"` - - // The data source's ARN. - Arn *string `type:"string"` - - // The database name. - DatabaseName *string `type:"string"` - - // The data source's type, AutoSelectOpsworksMysqlInstance, OpsworksMysqlInstance, - // RdsDbInstance, or None. - Type *string `type:"string"` -} - -// String returns the string representation -func (s DataSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DataSource) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DataSource) SetArn(v string) *DataSource { - s.Arn = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *DataSource) SetDatabaseName(v string) *DataSource { - s.DatabaseName = &v - return s -} - -// SetType sets the Type field's value. -func (s *DataSource) SetType(v string) *DataSource { - s.Type = &v - return s -} - -type DeleteAppInput struct { - _ struct{} `type:"structure"` - - // The app ID. - // - // AppId is a required field - AppId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAppInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAppInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAppInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAppInput"} - if s.AppId == nil { - invalidParams.Add(request.NewErrParamRequired("AppId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAppId sets the AppId field's value. -func (s *DeleteAppInput) SetAppId(v string) *DeleteAppInput { - s.AppId = &v - return s -} - -type DeleteAppOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAppOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAppOutput) GoString() string { - return s.String() -} - -type DeleteInstanceInput struct { - _ struct{} `type:"structure"` - - // Whether to delete the instance Elastic IP address. - DeleteElasticIp *bool `type:"boolean"` - - // Whether to delete the instance's Amazon EBS volumes. - DeleteVolumes *bool `type:"boolean"` - - // The instance ID. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeleteElasticIp sets the DeleteElasticIp field's value. -func (s *DeleteInstanceInput) SetDeleteElasticIp(v bool) *DeleteInstanceInput { - s.DeleteElasticIp = &v - return s -} - -// SetDeleteVolumes sets the DeleteVolumes field's value. -func (s *DeleteInstanceInput) SetDeleteVolumes(v bool) *DeleteInstanceInput { - s.DeleteVolumes = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DeleteInstanceInput) SetInstanceId(v string) *DeleteInstanceInput { - s.InstanceId = &v - return s -} - -type DeleteInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInstanceOutput) GoString() string { - return s.String() -} - -type DeleteLayerInput struct { - _ struct{} `type:"structure"` - - // The layer ID. - // - // LayerId is a required field - LayerId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLayerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLayerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLayerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLayerInput"} - if s.LayerId == nil { - invalidParams.Add(request.NewErrParamRequired("LayerId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLayerId sets the LayerId field's value. -func (s *DeleteLayerInput) SetLayerId(v string) *DeleteLayerInput { - s.LayerId = &v - return s -} - -type DeleteLayerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLayerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLayerOutput) GoString() string { - return s.String() -} - -type DeleteStackInput struct { - _ struct{} `type:"structure"` - - // The stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteStackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteStackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteStackInput"} - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStackId sets the StackId field's value. -func (s *DeleteStackInput) SetStackId(v string) *DeleteStackInput { - s.StackId = &v - return s -} - -type DeleteStackOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteStackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStackOutput) GoString() string { - return s.String() -} - -type DeleteUserProfileInput struct { - _ struct{} `type:"structure"` - - // The user's IAM ARN. This can also be a federated user's ARN. - // - // IamUserArn is a required field - IamUserArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteUserProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserProfileInput"} - if s.IamUserArn == nil { - invalidParams.Add(request.NewErrParamRequired("IamUserArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIamUserArn sets the IamUserArn field's value. -func (s *DeleteUserProfileInput) SetIamUserArn(v string) *DeleteUserProfileInput { - s.IamUserArn = &v - return s -} - -type DeleteUserProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteUserProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserProfileOutput) GoString() string { - return s.String() -} - -// Describes a deployment of a stack or app. -type Deployment struct { - _ struct{} `type:"structure"` - - // The app ID. - AppId *string `type:"string"` - - // Used to specify a stack or deployment command. - Command *DeploymentCommand `type:"structure"` - - // A user-defined comment. - Comment *string `type:"string"` - - // Date when the deployment completed. - CompletedAt *string `type:"string"` - - // Date when the deployment was created. - CreatedAt *string `type:"string"` - - // A string that contains user-defined custom JSON. It can be used to override - // the corresponding default stack configuration attribute values for stack - // or to pass data to recipes. The string should be in the following format: - // - // "{\"key1\": \"value1\", \"key2\": \"value2\",...}" - // - // For more information on custom JSON, see Use Custom JSON to Modify the Stack - // Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). - CustomJson *string `type:"string"` - - // The deployment ID. - DeploymentId *string `type:"string"` - - // The deployment duration. - Duration *int64 `type:"integer"` - - // The user's IAM ARN. - IamUserArn *string `type:"string"` - - // The IDs of the target instances. - InstanceIds []*string `type:"list"` - - // The stack ID. - StackId *string `type:"string"` - - // The deployment status: - // - // * running - // - // * successful - // - // * failed - Status *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() -} - -// SetAppId sets the AppId field's value. -func (s *Deployment) SetAppId(v string) *Deployment { - s.AppId = &v - return s -} - -// SetCommand sets the Command field's value. -func (s *Deployment) SetCommand(v *DeploymentCommand) *Deployment { - s.Command = v - return s -} - -// SetComment sets the Comment field's value. -func (s *Deployment) SetComment(v string) *Deployment { - s.Comment = &v - return s -} - -// SetCompletedAt sets the CompletedAt field's value. -func (s *Deployment) SetCompletedAt(v string) *Deployment { - s.CompletedAt = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Deployment) SetCreatedAt(v string) *Deployment { - s.CreatedAt = &v - return s -} - -// SetCustomJson sets the CustomJson field's value. -func (s *Deployment) SetCustomJson(v string) *Deployment { - s.CustomJson = &v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *Deployment) SetDeploymentId(v string) *Deployment { - s.DeploymentId = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *Deployment) SetDuration(v int64) *Deployment { - s.Duration = &v - return s -} - -// SetIamUserArn sets the IamUserArn field's value. -func (s *Deployment) SetIamUserArn(v string) *Deployment { - s.IamUserArn = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *Deployment) SetInstanceIds(v []*string) *Deployment { - s.InstanceIds = v - return s -} - -// SetStackId sets the StackId field's value. -func (s *Deployment) SetStackId(v string) *Deployment { - s.StackId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Deployment) SetStatus(v string) *Deployment { - s.Status = &v - return s -} - -// Used to specify a stack or deployment command. -type DeploymentCommand struct { - _ struct{} `type:"structure"` - - // The arguments of those commands that take arguments. It should be set to - // a JSON object with the following format: - // - // {"arg_name1" : ["value1", "value2", ...], "arg_name2" : ["value1", "value2", - // ...], ...} - // - // The update_dependencies command takes two arguments: - // - // * upgrade_os_to - Specifies the desired Amazon Linux version for instances - // whose OS you want to upgrade, such as Amazon Linux 2016.09. You must also - // set the allow_reboot argument to true. - // - // * allow_reboot - Specifies whether to allow AWS OpsWorks Stacks to reboot - // the instances if necessary, after installing the updates. This argument - // can be set to either true or false. The default value is false. - // - // For example, to upgrade an instance to Amazon Linux 2016.09, set Args to - // the following. - // - // { "upgrade_os_to":["Amazon Linux 2016.09"], "allow_reboot":["true"] } - Args map[string][]*string `type:"map"` - - // Specifies the operation. You can specify only one command. - // - // For stacks, the following commands are available: - // - // * execute_recipes: Execute one or more recipes. To specify the recipes, - // set an Args parameter named recipes to the list of recipes to be executed. - // For example, to execute phpapp::appsetup, set Args to {"recipes":["phpapp::appsetup"]}. - // - // * install_dependencies: Install the stack's dependencies. - // - // * update_custom_cookbooks: Update the stack's custom cookbooks. - // - // * update_dependencies: Update the stack's dependencies. - // - // The update_dependencies and install_dependencies commands are supported only - // for Linux instances. You can run the commands successfully on Windows instances, - // but they do nothing. - // - // For apps, the following commands are available: - // - // * deploy: Deploy an app. Ruby on Rails apps have an optional Args parameter - // named migrate. Set Args to {"migrate":["true"]} to migrate the database. - // The default setting is {"migrate":["false"]}. - // - // * rollback Roll the app back to the previous version. When you update - // an app, AWS OpsWorks Stacks stores the previous version, up to a maximum - // of five versions. You can use this command to roll an app back as many - // as four versions. - // - // * start: Start the app's web or application server. - // - // * stop: Stop the app's web or application server. - // - // * restart: Restart the app's web or application server. - // - // * undeploy: Undeploy the app. - // - // Name is a required field - Name *string `type:"string" required:"true" enum:"DeploymentCommandName"` -} - -// String returns the string representation -func (s DeploymentCommand) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeploymentCommand) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeploymentCommand) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeploymentCommand"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArgs sets the Args field's value. -func (s *DeploymentCommand) SetArgs(v map[string][]*string) *DeploymentCommand { - s.Args = v - return s -} - -// SetName sets the Name field's value. -func (s *DeploymentCommand) SetName(v string) *DeploymentCommand { - s.Name = &v - return s -} - -type DeregisterEcsClusterInput struct { - _ struct{} `type:"structure"` - - // The cluster's Amazon Resource Number (ARN). - // - // EcsClusterArn is a required field - EcsClusterArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterEcsClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterEcsClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterEcsClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterEcsClusterInput"} - if s.EcsClusterArn == nil { - invalidParams.Add(request.NewErrParamRequired("EcsClusterArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEcsClusterArn sets the EcsClusterArn field's value. -func (s *DeregisterEcsClusterInput) SetEcsClusterArn(v string) *DeregisterEcsClusterInput { - s.EcsClusterArn = &v - return s -} - -type DeregisterEcsClusterOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeregisterEcsClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterEcsClusterOutput) GoString() string { - return s.String() -} - -type DeregisterElasticIpInput struct { - _ struct{} `type:"structure"` - - // The Elastic IP address. - // - // ElasticIp is a required field - ElasticIp *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterElasticIpInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterElasticIpInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterElasticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterElasticIpInput"} - if s.ElasticIp == nil { - invalidParams.Add(request.NewErrParamRequired("ElasticIp")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetElasticIp sets the ElasticIp field's value. -func (s *DeregisterElasticIpInput) SetElasticIp(v string) *DeregisterElasticIpInput { - s.ElasticIp = &v - return s -} - -type DeregisterElasticIpOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeregisterElasticIpOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterElasticIpOutput) GoString() string { - return s.String() -} - -type DeregisterInstanceInput struct { - _ struct{} `type:"structure"` - - // The instance ID. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DeregisterInstanceInput) SetInstanceId(v string) *DeregisterInstanceInput { - s.InstanceId = &v - return s -} - -type DeregisterInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeregisterInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterInstanceOutput) GoString() string { - return s.String() -} - -type DeregisterRdsDbInstanceInput struct { - _ struct{} `type:"structure"` - - // The Amazon RDS instance's ARN. - // - // RdsDbInstanceArn is a required field - RdsDbInstanceArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterRdsDbInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterRdsDbInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterRdsDbInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterRdsDbInstanceInput"} - if s.RdsDbInstanceArn == nil { - invalidParams.Add(request.NewErrParamRequired("RdsDbInstanceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRdsDbInstanceArn sets the RdsDbInstanceArn field's value. -func (s *DeregisterRdsDbInstanceInput) SetRdsDbInstanceArn(v string) *DeregisterRdsDbInstanceInput { - s.RdsDbInstanceArn = &v - return s -} - -type DeregisterRdsDbInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeregisterRdsDbInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterRdsDbInstanceOutput) GoString() string { - return s.String() -} - -type DeregisterVolumeInput struct { - _ struct{} `type:"structure"` - - // The AWS OpsWorks Stacks volume ID, which is the GUID that AWS OpsWorks Stacks - // assigned to the instance when you registered the volume with the stack, not - // the Amazon EC2 volume ID. - // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterVolumeInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVolumeId sets the VolumeId field's value. -func (s *DeregisterVolumeInput) SetVolumeId(v string) *DeregisterVolumeInput { - s.VolumeId = &v - return s -} - -type DeregisterVolumeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeregisterVolumeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterVolumeOutput) GoString() string { - return s.String() -} - -type DescribeAgentVersionsInput struct { - _ struct{} `type:"structure"` - - // The configuration manager. - ConfigurationManager *StackConfigurationManager `type:"structure"` - - // The stack ID. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAgentVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAgentVersionsInput) GoString() string { - return s.String() -} - -// SetConfigurationManager sets the ConfigurationManager field's value. -func (s *DescribeAgentVersionsInput) SetConfigurationManager(v *StackConfigurationManager) *DescribeAgentVersionsInput { - s.ConfigurationManager = v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribeAgentVersionsInput) SetStackId(v string) *DescribeAgentVersionsInput { - s.StackId = &v - return s -} - -// Contains the response to a DescribeAgentVersions request. -type DescribeAgentVersionsOutput struct { - _ struct{} `type:"structure"` - - // The agent versions for the specified stack or configuration manager. Note - // that this value is the complete version number, not the abbreviated number - // used by the console. - AgentVersions []*AgentVersion `type:"list"` -} - -// String returns the string representation -func (s DescribeAgentVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAgentVersionsOutput) GoString() string { - return s.String() -} - -// SetAgentVersions sets the AgentVersions field's value. -func (s *DescribeAgentVersionsOutput) SetAgentVersions(v []*AgentVersion) *DescribeAgentVersionsOutput { - s.AgentVersions = v - return s -} - -type DescribeAppsInput struct { - _ struct{} `type:"structure"` - - // An array of app IDs for the apps to be described. If you use this parameter, - // DescribeApps returns a description of the specified apps. Otherwise, it returns - // a description of every app. - AppIds []*string `type:"list"` - - // The app stack ID. If you use this parameter, DescribeApps returns a description - // of the apps in the specified stack. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAppsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAppsInput) GoString() string { - return s.String() -} - -// SetAppIds sets the AppIds field's value. -func (s *DescribeAppsInput) SetAppIds(v []*string) *DescribeAppsInput { - s.AppIds = v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribeAppsInput) SetStackId(v string) *DescribeAppsInput { - s.StackId = &v - return s -} - -// Contains the response to a DescribeApps request. -type DescribeAppsOutput struct { - _ struct{} `type:"structure"` - - // An array of App objects that describe the specified apps. - Apps []*App `type:"list"` -} - -// String returns the string representation -func (s DescribeAppsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAppsOutput) GoString() string { - return s.String() -} - -// SetApps sets the Apps field's value. -func (s *DescribeAppsOutput) SetApps(v []*App) *DescribeAppsOutput { - s.Apps = v - return s -} - -type DescribeCommandsInput struct { - _ struct{} `type:"structure"` - - // An array of command IDs. If you include this parameter, DescribeCommands - // returns a description of the specified commands. Otherwise, it returns a - // description of every command. - CommandIds []*string `type:"list"` - - // The deployment ID. If you include this parameter, DescribeCommands returns - // a description of the commands associated with the specified deployment. - DeploymentId *string `type:"string"` - - // The instance ID. If you include this parameter, DescribeCommands returns - // a description of the commands associated with the specified instance. - InstanceId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeCommandsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCommandsInput) GoString() string { - return s.String() -} - -// SetCommandIds sets the CommandIds field's value. -func (s *DescribeCommandsInput) SetCommandIds(v []*string) *DescribeCommandsInput { - s.CommandIds = v - return s -} - -// SetDeploymentId sets the DeploymentId field's value. -func (s *DescribeCommandsInput) SetDeploymentId(v string) *DescribeCommandsInput { - s.DeploymentId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DescribeCommandsInput) SetInstanceId(v string) *DescribeCommandsInput { - s.InstanceId = &v - return s -} - -// Contains the response to a DescribeCommands request. -type DescribeCommandsOutput struct { - _ struct{} `type:"structure"` - - // An array of Command objects that describe each of the specified commands. - Commands []*Command `type:"list"` -} - -// String returns the string representation -func (s DescribeCommandsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCommandsOutput) GoString() string { - return s.String() -} - -// SetCommands sets the Commands field's value. -func (s *DescribeCommandsOutput) SetCommands(v []*Command) *DescribeCommandsOutput { - s.Commands = v - return s -} - -type DescribeDeploymentsInput struct { - _ struct{} `type:"structure"` - - // The app ID. If you include this parameter, the command returns a description - // of the commands associated with the specified app. - AppId *string `type:"string"` - - // An array of deployment IDs to be described. If you include this parameter, - // the command returns a description of the specified deployments. Otherwise, - // it returns a description of every deployment. - DeploymentIds []*string `type:"list"` - - // The stack ID. If you include this parameter, the command returns a description - // of the commands associated with the specified stack. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDeploymentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDeploymentsInput) GoString() string { - return s.String() -} - -// SetAppId sets the AppId field's value. -func (s *DescribeDeploymentsInput) SetAppId(v string) *DescribeDeploymentsInput { - s.AppId = &v - return s -} - -// SetDeploymentIds sets the DeploymentIds field's value. -func (s *DescribeDeploymentsInput) SetDeploymentIds(v []*string) *DescribeDeploymentsInput { - s.DeploymentIds = v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribeDeploymentsInput) SetStackId(v string) *DescribeDeploymentsInput { - s.StackId = &v - return s -} - -// Contains the response to a DescribeDeployments request. -type DescribeDeploymentsOutput struct { - _ struct{} `type:"structure"` - - // An array of Deployment objects that describe the deployments. - Deployments []*Deployment `type:"list"` -} - -// String returns the string representation -func (s DescribeDeploymentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDeploymentsOutput) GoString() string { - return s.String() -} - -// SetDeployments sets the Deployments field's value. -func (s *DescribeDeploymentsOutput) SetDeployments(v []*Deployment) *DescribeDeploymentsOutput { - s.Deployments = v - return s -} - -type DescribeEcsClustersInput struct { - _ struct{} `type:"structure"` - - // A list of ARNs, one for each cluster to be described. - EcsClusterArns []*string `type:"list"` - - // To receive a paginated response, use this parameter to specify the maximum - // number of results to be returned with a single call. If the number of available - // results exceeds this maximum, the response includes a NextToken value that - // you can assign to the NextToken request parameter to get the next set of - // results. - MaxResults *int64 `type:"integer"` - - // If the previous paginated request did not return all of the remaining results, - // the response object'sNextToken parameter value is set to a token. To retrieve - // the next set of results, call DescribeEcsClusters again and assign that token - // to the request object's NextToken parameter. If there are no remaining results, - // the previous response object's NextToken parameter is set to null. - NextToken *string `type:"string"` - - // A stack ID. DescribeEcsClusters returns a description of the cluster that - // is registered with the stack. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEcsClustersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEcsClustersInput) GoString() string { - return s.String() -} - -// SetEcsClusterArns sets the EcsClusterArns field's value. -func (s *DescribeEcsClustersInput) SetEcsClusterArns(v []*string) *DescribeEcsClustersInput { - s.EcsClusterArns = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeEcsClustersInput) SetMaxResults(v int64) *DescribeEcsClustersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEcsClustersInput) SetNextToken(v string) *DescribeEcsClustersInput { - s.NextToken = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribeEcsClustersInput) SetStackId(v string) *DescribeEcsClustersInput { - s.StackId = &v - return s -} - -// Contains the response to a DescribeEcsClusters request. -type DescribeEcsClustersOutput struct { - _ struct{} `type:"structure"` - - // A list of EcsCluster objects containing the cluster descriptions. - EcsClusters []*EcsCluster `type:"list"` - - // If a paginated request does not return all of the remaining results, this - // parameter is set to a token that you can assign to the request object's NextToken - // parameter to retrieve the next set of results. If the previous paginated - // request returned all of the remaining results, this parameter is set to null. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEcsClustersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEcsClustersOutput) GoString() string { - return s.String() -} - -// SetEcsClusters sets the EcsClusters field's value. -func (s *DescribeEcsClustersOutput) SetEcsClusters(v []*EcsCluster) *DescribeEcsClustersOutput { - s.EcsClusters = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEcsClustersOutput) SetNextToken(v string) *DescribeEcsClustersOutput { - s.NextToken = &v - return s -} - -type DescribeElasticIpsInput struct { - _ struct{} `type:"structure"` - - // The instance ID. If you include this parameter, DescribeElasticIps returns - // a description of the Elastic IP addresses associated with the specified instance. - InstanceId *string `type:"string"` - - // An array of Elastic IP addresses to be described. If you include this parameter, - // DescribeElasticIps returns a description of the specified Elastic IP addresses. - // Otherwise, it returns a description of every Elastic IP address. - Ips []*string `type:"list"` - - // A stack ID. If you include this parameter, DescribeElasticIps returns a description - // of the Elastic IP addresses that are registered with the specified stack. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeElasticIpsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeElasticIpsInput) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DescribeElasticIpsInput) SetInstanceId(v string) *DescribeElasticIpsInput { - s.InstanceId = &v - return s -} - -// SetIps sets the Ips field's value. -func (s *DescribeElasticIpsInput) SetIps(v []*string) *DescribeElasticIpsInput { - s.Ips = v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribeElasticIpsInput) SetStackId(v string) *DescribeElasticIpsInput { - s.StackId = &v - return s -} - -// Contains the response to a DescribeElasticIps request. -type DescribeElasticIpsOutput struct { - _ struct{} `type:"structure"` - - // An ElasticIps object that describes the specified Elastic IP addresses. - ElasticIps []*ElasticIp `type:"list"` -} - -// String returns the string representation -func (s DescribeElasticIpsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeElasticIpsOutput) GoString() string { - return s.String() -} - -// SetElasticIps sets the ElasticIps field's value. -func (s *DescribeElasticIpsOutput) SetElasticIps(v []*ElasticIp) *DescribeElasticIpsOutput { - s.ElasticIps = v - return s -} - -type DescribeElasticLoadBalancersInput struct { - _ struct{} `type:"structure"` - - // A list of layer IDs. The action describes the Elastic Load Balancing instances - // for the specified layers. - LayerIds []*string `type:"list"` - - // A stack ID. The action describes the stack's Elastic Load Balancing instances. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeElasticLoadBalancersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeElasticLoadBalancersInput) GoString() string { - return s.String() -} - -// SetLayerIds sets the LayerIds field's value. -func (s *DescribeElasticLoadBalancersInput) SetLayerIds(v []*string) *DescribeElasticLoadBalancersInput { - s.LayerIds = v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribeElasticLoadBalancersInput) SetStackId(v string) *DescribeElasticLoadBalancersInput { - s.StackId = &v - return s -} - -// Contains the response to a DescribeElasticLoadBalancers request. -type DescribeElasticLoadBalancersOutput struct { - _ struct{} `type:"structure"` - - // A list of ElasticLoadBalancer objects that describe the specified Elastic - // Load Balancing instances. - ElasticLoadBalancers []*ElasticLoadBalancer `type:"list"` -} - -// String returns the string representation -func (s DescribeElasticLoadBalancersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeElasticLoadBalancersOutput) GoString() string { - return s.String() -} - -// SetElasticLoadBalancers sets the ElasticLoadBalancers field's value. -func (s *DescribeElasticLoadBalancersOutput) SetElasticLoadBalancers(v []*ElasticLoadBalancer) *DescribeElasticLoadBalancersOutput { - s.ElasticLoadBalancers = v - return s -} - -type DescribeInstancesInput struct { - _ struct{} `type:"structure"` - - // An array of instance IDs to be described. If you use this parameter, DescribeInstances - // returns a description of the specified instances. Otherwise, it returns a - // description of every instance. - InstanceIds []*string `type:"list"` - - // A layer ID. If you use this parameter, DescribeInstances returns descriptions - // of the instances associated with the specified layer. - LayerId *string `type:"string"` - - // A stack ID. If you use this parameter, DescribeInstances returns descriptions - // of the instances associated with the specified stack. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstancesInput) GoString() string { - return s.String() -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *DescribeInstancesInput) SetInstanceIds(v []*string) *DescribeInstancesInput { - s.InstanceIds = v - return s -} - -// SetLayerId sets the LayerId field's value. -func (s *DescribeInstancesInput) SetLayerId(v string) *DescribeInstancesInput { - s.LayerId = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribeInstancesInput) SetStackId(v string) *DescribeInstancesInput { - s.StackId = &v - return s -} - -// Contains the response to a DescribeInstances request. -type DescribeInstancesOutput struct { - _ struct{} `type:"structure"` - - // An array of Instance objects that describe the instances. - Instances []*Instance `type:"list"` -} - -// String returns the string representation -func (s DescribeInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstancesOutput) GoString() string { - return s.String() -} - -// SetInstances sets the Instances field's value. -func (s *DescribeInstancesOutput) SetInstances(v []*Instance) *DescribeInstancesOutput { - s.Instances = v - return s -} - -type DescribeLayersInput struct { - _ struct{} `type:"structure"` - - // An array of layer IDs that specify the layers to be described. If you omit - // this parameter, DescribeLayers returns a description of every layer in the - // specified stack. - LayerIds []*string `type:"list"` - - // The stack ID. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeLayersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLayersInput) GoString() string { - return s.String() -} - -// SetLayerIds sets the LayerIds field's value. -func (s *DescribeLayersInput) SetLayerIds(v []*string) *DescribeLayersInput { - s.LayerIds = v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribeLayersInput) SetStackId(v string) *DescribeLayersInput { - s.StackId = &v - return s -} - -// Contains the response to a DescribeLayers request. -type DescribeLayersOutput struct { - _ struct{} `type:"structure"` - - // An array of Layer objects that describe the layers. - Layers []*Layer `type:"list"` -} - -// String returns the string representation -func (s DescribeLayersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLayersOutput) GoString() string { - return s.String() -} - -// SetLayers sets the Layers field's value. -func (s *DescribeLayersOutput) SetLayers(v []*Layer) *DescribeLayersOutput { - s.Layers = v - return s -} - -type DescribeLoadBasedAutoScalingInput struct { - _ struct{} `type:"structure"` - - // An array of layer IDs. - // - // LayerIds is a required field - LayerIds []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeLoadBasedAutoScalingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBasedAutoScalingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLoadBasedAutoScalingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBasedAutoScalingInput"} - if s.LayerIds == nil { - invalidParams.Add(request.NewErrParamRequired("LayerIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLayerIds sets the LayerIds field's value. -func (s *DescribeLoadBasedAutoScalingInput) SetLayerIds(v []*string) *DescribeLoadBasedAutoScalingInput { - s.LayerIds = v - return s -} - -// Contains the response to a DescribeLoadBasedAutoScaling request. -type DescribeLoadBasedAutoScalingOutput struct { - _ struct{} `type:"structure"` - - // An array of LoadBasedAutoScalingConfiguration objects that describe each - // layer's configuration. - LoadBasedAutoScalingConfigurations []*LoadBasedAutoScalingConfiguration `type:"list"` -} - -// String returns the string representation -func (s DescribeLoadBasedAutoScalingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoadBasedAutoScalingOutput) GoString() string { - return s.String() -} - -// SetLoadBasedAutoScalingConfigurations sets the LoadBasedAutoScalingConfigurations field's value. -func (s *DescribeLoadBasedAutoScalingOutput) SetLoadBasedAutoScalingConfigurations(v []*LoadBasedAutoScalingConfiguration) *DescribeLoadBasedAutoScalingOutput { - s.LoadBasedAutoScalingConfigurations = v - return s -} - -type DescribeMyUserProfileInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeMyUserProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMyUserProfileInput) GoString() string { - return s.String() -} - -// Contains the response to a DescribeMyUserProfile request. -type DescribeMyUserProfileOutput struct { - _ struct{} `type:"structure"` - - // A UserProfile object that describes the user's SSH information. - UserProfile *SelfUserProfile `type:"structure"` -} - -// String returns the string representation -func (s DescribeMyUserProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMyUserProfileOutput) GoString() string { - return s.String() -} - -// SetUserProfile sets the UserProfile field's value. -func (s *DescribeMyUserProfileOutput) SetUserProfile(v *SelfUserProfile) *DescribeMyUserProfileOutput { - s.UserProfile = v - return s -} - -type DescribeOperatingSystemsInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeOperatingSystemsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOperatingSystemsInput) GoString() string { - return s.String() -} - -// The response to a DescribeOperatingSystems request. -type DescribeOperatingSystemsOutput struct { - _ struct{} `type:"structure"` - - // Contains information in response to a DescribeOperatingSystems request. - OperatingSystems []*OperatingSystem `type:"list"` -} - -// String returns the string representation -func (s DescribeOperatingSystemsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOperatingSystemsOutput) GoString() string { - return s.String() -} - -// SetOperatingSystems sets the OperatingSystems field's value. -func (s *DescribeOperatingSystemsOutput) SetOperatingSystems(v []*OperatingSystem) *DescribeOperatingSystemsOutput { - s.OperatingSystems = v - return s -} - -type DescribePermissionsInput struct { - _ struct{} `type:"structure"` - - // The user's IAM ARN. This can also be a federated user's ARN. For more information - // about IAM ARNs, see Using Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html). - IamUserArn *string `type:"string"` - - // The stack ID. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s DescribePermissionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePermissionsInput) GoString() string { - return s.String() -} - -// SetIamUserArn sets the IamUserArn field's value. -func (s *DescribePermissionsInput) SetIamUserArn(v string) *DescribePermissionsInput { - s.IamUserArn = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribePermissionsInput) SetStackId(v string) *DescribePermissionsInput { - s.StackId = &v - return s -} - -// Contains the response to a DescribePermissions request. -type DescribePermissionsOutput struct { - _ struct{} `type:"structure"` - - // An array of Permission objects that describe the stack permissions. - // - // * If the request object contains only a stack ID, the array contains a - // Permission object with permissions for each of the stack IAM ARNs. - // - // * If the request object contains only an IAM ARN, the array contains a - // Permission object with permissions for each of the user's stack IDs. - // - // * If the request contains a stack ID and an IAM ARN, the array contains - // a single Permission object with permissions for the specified stack and - // IAM ARN. - Permissions []*Permission `type:"list"` -} - -// String returns the string representation -func (s DescribePermissionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePermissionsOutput) GoString() string { - return s.String() -} - -// SetPermissions sets the Permissions field's value. -func (s *DescribePermissionsOutput) SetPermissions(v []*Permission) *DescribePermissionsOutput { - s.Permissions = v - return s -} - -type DescribeRaidArraysInput struct { - _ struct{} `type:"structure"` - - // The instance ID. If you use this parameter, DescribeRaidArrays returns descriptions - // of the RAID arrays associated with the specified instance. - InstanceId *string `type:"string"` - - // An array of RAID array IDs. If you use this parameter, DescribeRaidArrays - // returns descriptions of the specified arrays. Otherwise, it returns a description - // of every array. - RaidArrayIds []*string `type:"list"` - - // The stack ID. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeRaidArraysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRaidArraysInput) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DescribeRaidArraysInput) SetInstanceId(v string) *DescribeRaidArraysInput { - s.InstanceId = &v - return s -} - -// SetRaidArrayIds sets the RaidArrayIds field's value. -func (s *DescribeRaidArraysInput) SetRaidArrayIds(v []*string) *DescribeRaidArraysInput { - s.RaidArrayIds = v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribeRaidArraysInput) SetStackId(v string) *DescribeRaidArraysInput { - s.StackId = &v - return s -} - -// Contains the response to a DescribeRaidArrays request. -type DescribeRaidArraysOutput struct { - _ struct{} `type:"structure"` - - // A RaidArrays object that describes the specified RAID arrays. - RaidArrays []*RaidArray `type:"list"` -} - -// String returns the string representation -func (s DescribeRaidArraysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRaidArraysOutput) GoString() string { - return s.String() -} - -// SetRaidArrays sets the RaidArrays field's value. -func (s *DescribeRaidArraysOutput) SetRaidArrays(v []*RaidArray) *DescribeRaidArraysOutput { - s.RaidArrays = v - return s -} - -type DescribeRdsDbInstancesInput struct { - _ struct{} `type:"structure"` - - // An array containing the ARNs of the instances to be described. - RdsDbInstanceArns []*string `type:"list"` - - // The ID of the stack with which the instances are registered. The operation - // returns descriptions of all registered Amazon RDS instances. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeRdsDbInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRdsDbInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRdsDbInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRdsDbInstancesInput"} - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRdsDbInstanceArns sets the RdsDbInstanceArns field's value. -func (s *DescribeRdsDbInstancesInput) SetRdsDbInstanceArns(v []*string) *DescribeRdsDbInstancesInput { - s.RdsDbInstanceArns = v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribeRdsDbInstancesInput) SetStackId(v string) *DescribeRdsDbInstancesInput { - s.StackId = &v - return s -} - -// Contains the response to a DescribeRdsDbInstances request. -type DescribeRdsDbInstancesOutput struct { - _ struct{} `type:"structure"` - - // An a array of RdsDbInstance objects that describe the instances. - RdsDbInstances []*RdsDbInstance `type:"list"` -} - -// String returns the string representation -func (s DescribeRdsDbInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRdsDbInstancesOutput) GoString() string { - return s.String() -} - -// SetRdsDbInstances sets the RdsDbInstances field's value. -func (s *DescribeRdsDbInstancesOutput) SetRdsDbInstances(v []*RdsDbInstance) *DescribeRdsDbInstancesOutput { - s.RdsDbInstances = v - return s -} - -type DescribeServiceErrorsInput struct { - _ struct{} `type:"structure"` - - // The instance ID. If you use this parameter, DescribeServiceErrors returns - // descriptions of the errors associated with the specified instance. - InstanceId *string `type:"string"` - - // An array of service error IDs. If you use this parameter, DescribeServiceErrors - // returns descriptions of the specified errors. Otherwise, it returns a description - // of every error. - ServiceErrorIds []*string `type:"list"` - - // The stack ID. If you use this parameter, DescribeServiceErrors returns descriptions - // of the errors associated with the specified stack. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeServiceErrorsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeServiceErrorsInput) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DescribeServiceErrorsInput) SetInstanceId(v string) *DescribeServiceErrorsInput { - s.InstanceId = &v - return s -} - -// SetServiceErrorIds sets the ServiceErrorIds field's value. -func (s *DescribeServiceErrorsInput) SetServiceErrorIds(v []*string) *DescribeServiceErrorsInput { - s.ServiceErrorIds = v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribeServiceErrorsInput) SetStackId(v string) *DescribeServiceErrorsInput { - s.StackId = &v - return s -} - -// Contains the response to a DescribeServiceErrors request. -type DescribeServiceErrorsOutput struct { - _ struct{} `type:"structure"` - - // An array of ServiceError objects that describe the specified service errors. - ServiceErrors []*ServiceError `type:"list"` -} - -// String returns the string representation -func (s DescribeServiceErrorsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeServiceErrorsOutput) GoString() string { - return s.String() -} - -// SetServiceErrors sets the ServiceErrors field's value. -func (s *DescribeServiceErrorsOutput) SetServiceErrors(v []*ServiceError) *DescribeServiceErrorsOutput { - s.ServiceErrors = v - return s -} - -type DescribeStackProvisioningParametersInput struct { - _ struct{} `type:"structure"` - - // The stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeStackProvisioningParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackProvisioningParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStackProvisioningParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStackProvisioningParametersInput"} - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStackId sets the StackId field's value. -func (s *DescribeStackProvisioningParametersInput) SetStackId(v string) *DescribeStackProvisioningParametersInput { - s.StackId = &v - return s -} - -// Contains the response to a DescribeStackProvisioningParameters request. -type DescribeStackProvisioningParametersOutput struct { - _ struct{} `type:"structure"` - - // The AWS OpsWorks Stacks agent installer's URL. - AgentInstallerUrl *string `type:"string"` - - // An embedded object that contains the provisioning parameters. - Parameters map[string]*string `type:"map"` -} - -// String returns the string representation -func (s DescribeStackProvisioningParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackProvisioningParametersOutput) GoString() string { - return s.String() -} - -// SetAgentInstallerUrl sets the AgentInstallerUrl field's value. -func (s *DescribeStackProvisioningParametersOutput) SetAgentInstallerUrl(v string) *DescribeStackProvisioningParametersOutput { - s.AgentInstallerUrl = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DescribeStackProvisioningParametersOutput) SetParameters(v map[string]*string) *DescribeStackProvisioningParametersOutput { - s.Parameters = v - return s -} - -type DescribeStackSummaryInput struct { - _ struct{} `type:"structure"` - - // The stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeStackSummaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackSummaryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStackSummaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStackSummaryInput"} - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStackId sets the StackId field's value. -func (s *DescribeStackSummaryInput) SetStackId(v string) *DescribeStackSummaryInput { - s.StackId = &v - return s -} - -// Contains the response to a DescribeStackSummary request. -type DescribeStackSummaryOutput struct { - _ struct{} `type:"structure"` - - // A StackSummary object that contains the results. - StackSummary *StackSummary `type:"structure"` -} - -// String returns the string representation -func (s DescribeStackSummaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStackSummaryOutput) GoString() string { - return s.String() -} - -// SetStackSummary sets the StackSummary field's value. -func (s *DescribeStackSummaryOutput) SetStackSummary(v *StackSummary) *DescribeStackSummaryOutput { - s.StackSummary = v - return s -} - -type DescribeStacksInput struct { - _ struct{} `type:"structure"` - - // An array of stack IDs that specify the stacks to be described. If you omit - // this parameter, DescribeStacks returns a description of every stack. - StackIds []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeStacksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStacksInput) GoString() string { - return s.String() -} - -// SetStackIds sets the StackIds field's value. -func (s *DescribeStacksInput) SetStackIds(v []*string) *DescribeStacksInput { - s.StackIds = v - return s -} - -// Contains the response to a DescribeStacks request. -type DescribeStacksOutput struct { - _ struct{} `type:"structure"` - - // An array of Stack objects that describe the stacks. - Stacks []*Stack `type:"list"` -} - -// String returns the string representation -func (s DescribeStacksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStacksOutput) GoString() string { - return s.String() -} - -// SetStacks sets the Stacks field's value. -func (s *DescribeStacksOutput) SetStacks(v []*Stack) *DescribeStacksOutput { - s.Stacks = v - return s -} - -type DescribeTimeBasedAutoScalingInput struct { - _ struct{} `type:"structure"` - - // An array of instance IDs. - // - // InstanceIds is a required field - InstanceIds []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeTimeBasedAutoScalingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTimeBasedAutoScalingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTimeBasedAutoScalingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTimeBasedAutoScalingInput"} - if s.InstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *DescribeTimeBasedAutoScalingInput) SetInstanceIds(v []*string) *DescribeTimeBasedAutoScalingInput { - s.InstanceIds = v - return s -} - -// Contains the response to a DescribeTimeBasedAutoScaling request. -type DescribeTimeBasedAutoScalingOutput struct { - _ struct{} `type:"structure"` - - // An array of TimeBasedAutoScalingConfiguration objects that describe the configuration - // for the specified instances. - TimeBasedAutoScalingConfigurations []*TimeBasedAutoScalingConfiguration `type:"list"` -} - -// String returns the string representation -func (s DescribeTimeBasedAutoScalingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTimeBasedAutoScalingOutput) GoString() string { - return s.String() -} - -// SetTimeBasedAutoScalingConfigurations sets the TimeBasedAutoScalingConfigurations field's value. -func (s *DescribeTimeBasedAutoScalingOutput) SetTimeBasedAutoScalingConfigurations(v []*TimeBasedAutoScalingConfiguration) *DescribeTimeBasedAutoScalingOutput { - s.TimeBasedAutoScalingConfigurations = v - return s -} - -type DescribeUserProfilesInput struct { - _ struct{} `type:"structure"` - - // An array of IAM or federated user ARNs that identify the users to be described. - IamUserArns []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeUserProfilesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUserProfilesInput) GoString() string { - return s.String() -} - -// SetIamUserArns sets the IamUserArns field's value. -func (s *DescribeUserProfilesInput) SetIamUserArns(v []*string) *DescribeUserProfilesInput { - s.IamUserArns = v - return s -} - -// Contains the response to a DescribeUserProfiles request. -type DescribeUserProfilesOutput struct { - _ struct{} `type:"structure"` - - // A Users object that describes the specified users. - UserProfiles []*UserProfile `type:"list"` -} - -// String returns the string representation -func (s DescribeUserProfilesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUserProfilesOutput) GoString() string { - return s.String() -} - -// SetUserProfiles sets the UserProfiles field's value. -func (s *DescribeUserProfilesOutput) SetUserProfiles(v []*UserProfile) *DescribeUserProfilesOutput { - s.UserProfiles = v - return s -} - -type DescribeVolumesInput struct { - _ struct{} `type:"structure"` - - // The instance ID. If you use this parameter, DescribeVolumes returns descriptions - // of the volumes associated with the specified instance. - InstanceId *string `type:"string"` - - // The RAID array ID. If you use this parameter, DescribeVolumes returns descriptions - // of the volumes associated with the specified RAID array. - RaidArrayId *string `type:"string"` - - // A stack ID. The action describes the stack's registered Amazon EBS volumes. - StackId *string `type:"string"` - - // Am array of volume IDs. If you use this parameter, DescribeVolumes returns - // descriptions of the specified volumes. Otherwise, it returns a description - // of every volume. - VolumeIds []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeVolumesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVolumesInput) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DescribeVolumesInput) SetInstanceId(v string) *DescribeVolumesInput { - s.InstanceId = &v - return s -} - -// SetRaidArrayId sets the RaidArrayId field's value. -func (s *DescribeVolumesInput) SetRaidArrayId(v string) *DescribeVolumesInput { - s.RaidArrayId = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *DescribeVolumesInput) SetStackId(v string) *DescribeVolumesInput { - s.StackId = &v - return s -} - -// SetVolumeIds sets the VolumeIds field's value. -func (s *DescribeVolumesInput) SetVolumeIds(v []*string) *DescribeVolumesInput { - s.VolumeIds = v - return s -} - -// Contains the response to a DescribeVolumes request. -type DescribeVolumesOutput struct { - _ struct{} `type:"structure"` - - // An array of volume IDs. - Volumes []*Volume `type:"list"` -} - -// String returns the string representation -func (s DescribeVolumesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVolumesOutput) GoString() string { - return s.String() -} - -// SetVolumes sets the Volumes field's value. -func (s *DescribeVolumesOutput) SetVolumes(v []*Volume) *DescribeVolumesOutput { - s.Volumes = v - return s -} - -type DetachElasticLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The Elastic Load Balancing instance's name. - // - // ElasticLoadBalancerName is a required field - ElasticLoadBalancerName *string `type:"string" required:"true"` - - // The ID of the layer that the Elastic Load Balancing instance is attached - // to. - // - // LayerId is a required field - LayerId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachElasticLoadBalancerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachElasticLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachElasticLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachElasticLoadBalancerInput"} - if s.ElasticLoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("ElasticLoadBalancerName")) - } - if s.LayerId == nil { - invalidParams.Add(request.NewErrParamRequired("LayerId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetElasticLoadBalancerName sets the ElasticLoadBalancerName field's value. -func (s *DetachElasticLoadBalancerInput) SetElasticLoadBalancerName(v string) *DetachElasticLoadBalancerInput { - s.ElasticLoadBalancerName = &v - return s -} - -// SetLayerId sets the LayerId field's value. -func (s *DetachElasticLoadBalancerInput) SetLayerId(v string) *DetachElasticLoadBalancerInput { - s.LayerId = &v - return s -} - -type DetachElasticLoadBalancerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DetachElasticLoadBalancerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachElasticLoadBalancerOutput) GoString() string { - return s.String() -} - -type DisassociateElasticIpInput struct { - _ struct{} `type:"structure"` - - // The Elastic IP address. - // - // ElasticIp is a required field - ElasticIp *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateElasticIpInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateElasticIpInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateElasticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateElasticIpInput"} - if s.ElasticIp == nil { - invalidParams.Add(request.NewErrParamRequired("ElasticIp")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetElasticIp sets the ElasticIp field's value. -func (s *DisassociateElasticIpInput) SetElasticIp(v string) *DisassociateElasticIpInput { - s.ElasticIp = &v - return s -} - -type DisassociateElasticIpOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateElasticIpOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateElasticIpOutput) GoString() string { - return s.String() -} - -// Describes an Amazon EBS volume. This data type maps directly to the Amazon -// EC2 EbsBlockDevice (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html) -// data type. -type EbsBlockDevice struct { - _ struct{} `type:"structure"` - - // Whether the volume is deleted on instance termination. - DeleteOnTermination *bool `type:"boolean"` - - // The number of I/O operations per second (IOPS) that the volume supports. - // For more information, see EbsBlockDevice (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html). - Iops *int64 `type:"integer"` - - // The snapshot ID. - SnapshotId *string `type:"string"` - - // The volume size, in GiB. For more information, see EbsBlockDevice (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html). - VolumeSize *int64 `type:"integer"` - - // The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned - // IOPS (SSD) volumes, st1 for Throughput Optimized hard disk drives (HDD), - // sc1 for Cold HDD,and standard for Magnetic volumes. - // - // If you specify the io1 volume type, you must also specify a value for the - // Iops attribute. The maximum ratio of provisioned IOPS to requested volume - // size (in GiB) is 50:1. AWS uses the default volume size (in GiB) specified - // in the AMI attributes to set IOPS to 50 x (volume size). - VolumeType *string `type:"string" enum:"VolumeType"` -} - -// String returns the string representation -func (s EbsBlockDevice) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EbsBlockDevice) GoString() string { - return s.String() -} - -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *EbsBlockDevice) SetDeleteOnTermination(v bool) *EbsBlockDevice { - s.DeleteOnTermination = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *EbsBlockDevice) SetIops(v int64) *EbsBlockDevice { - s.Iops = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *EbsBlockDevice) SetSnapshotId(v string) *EbsBlockDevice { - s.SnapshotId = &v - return s -} - -// SetVolumeSize sets the VolumeSize field's value. -func (s *EbsBlockDevice) SetVolumeSize(v int64) *EbsBlockDevice { - s.VolumeSize = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *EbsBlockDevice) SetVolumeType(v string) *EbsBlockDevice { - s.VolumeType = &v - return s -} - -// Describes a registered Amazon ECS cluster. -type EcsCluster struct { - _ struct{} `type:"structure"` - - // The cluster's ARN. - EcsClusterArn *string `type:"string"` - - // The cluster name. - EcsClusterName *string `type:"string"` - - // The time and date that the cluster was registered with the stack. - RegisteredAt *string `type:"string"` - - // The stack ID. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s EcsCluster) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EcsCluster) GoString() string { - return s.String() -} - -// SetEcsClusterArn sets the EcsClusterArn field's value. -func (s *EcsCluster) SetEcsClusterArn(v string) *EcsCluster { - s.EcsClusterArn = &v - return s -} - -// SetEcsClusterName sets the EcsClusterName field's value. -func (s *EcsCluster) SetEcsClusterName(v string) *EcsCluster { - s.EcsClusterName = &v - return s -} - -// SetRegisteredAt sets the RegisteredAt field's value. -func (s *EcsCluster) SetRegisteredAt(v string) *EcsCluster { - s.RegisteredAt = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *EcsCluster) SetStackId(v string) *EcsCluster { - s.StackId = &v - return s -} - -// Describes an Elastic IP address. -type ElasticIp struct { - _ struct{} `type:"structure"` - - // The domain. - Domain *string `type:"string"` - - // The ID of the instance that the address is attached to. - InstanceId *string `type:"string"` - - // The IP address. - Ip *string `type:"string"` - - // The name. - Name *string `type:"string"` - - // The AWS region. For more information, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html). - Region *string `type:"string"` -} - -// String returns the string representation -func (s ElasticIp) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticIp) GoString() string { - return s.String() -} - -// SetDomain sets the Domain field's value. -func (s *ElasticIp) SetDomain(v string) *ElasticIp { - s.Domain = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ElasticIp) SetInstanceId(v string) *ElasticIp { - s.InstanceId = &v - return s -} - -// SetIp sets the Ip field's value. -func (s *ElasticIp) SetIp(v string) *ElasticIp { - s.Ip = &v - return s -} - -// SetName sets the Name field's value. -func (s *ElasticIp) SetName(v string) *ElasticIp { - s.Name = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *ElasticIp) SetRegion(v string) *ElasticIp { - s.Region = &v - return s -} - -// Describes an Elastic Load Balancing instance. -type ElasticLoadBalancer struct { - _ struct{} `type:"structure"` - - // A list of Availability Zones. - AvailabilityZones []*string `type:"list"` - - // The instance's public DNS name. - DnsName *string `type:"string"` - - // A list of the EC2 instances that the Elastic Load Balancing instance is managing - // traffic for. - Ec2InstanceIds []*string `type:"list"` - - // The Elastic Load Balancing instance's name. - ElasticLoadBalancerName *string `type:"string"` - - // The ID of the layer that the instance is attached to. - LayerId *string `type:"string"` - - // The instance's AWS region. - Region *string `type:"string"` - - // The ID of the stack that the instance is associated with. - StackId *string `type:"string"` - - // A list of subnet IDs, if the stack is running in a VPC. - SubnetIds []*string `type:"list"` - - // The VPC ID. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s ElasticLoadBalancer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticLoadBalancer) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *ElasticLoadBalancer) SetAvailabilityZones(v []*string) *ElasticLoadBalancer { - s.AvailabilityZones = v - return s -} - -// SetDnsName sets the DnsName field's value. -func (s *ElasticLoadBalancer) SetDnsName(v string) *ElasticLoadBalancer { - s.DnsName = &v - return s -} - -// SetEc2InstanceIds sets the Ec2InstanceIds field's value. -func (s *ElasticLoadBalancer) SetEc2InstanceIds(v []*string) *ElasticLoadBalancer { - s.Ec2InstanceIds = v - return s -} - -// SetElasticLoadBalancerName sets the ElasticLoadBalancerName field's value. -func (s *ElasticLoadBalancer) SetElasticLoadBalancerName(v string) *ElasticLoadBalancer { - s.ElasticLoadBalancerName = &v - return s -} - -// SetLayerId sets the LayerId field's value. -func (s *ElasticLoadBalancer) SetLayerId(v string) *ElasticLoadBalancer { - s.LayerId = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *ElasticLoadBalancer) SetRegion(v string) *ElasticLoadBalancer { - s.Region = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *ElasticLoadBalancer) SetStackId(v string) *ElasticLoadBalancer { - s.StackId = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *ElasticLoadBalancer) SetSubnetIds(v []*string) *ElasticLoadBalancer { - s.SubnetIds = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *ElasticLoadBalancer) SetVpcId(v string) *ElasticLoadBalancer { - s.VpcId = &v - return s -} - -// Represents an app's environment variable. -type EnvironmentVariable struct { - _ struct{} `type:"structure"` - - // (Required) The environment variable's name, which can consist of up to 64 - // characters and must be specified. The name can contain upper- and lowercase - // letters, numbers, and underscores (_), but it must start with a letter or - // underscore. - // - // Key is a required field - Key *string `type:"string" required:"true"` - - // (Optional) Whether the variable's value will be returned by the DescribeApps - // action. To conceal an environment variable's value, set Secure to true. DescribeApps - // then returns *****FILTERED***** instead of the actual value. The default - // value for Secure is false. - Secure *bool `type:"boolean"` - - // (Optional) The environment variable's value, which can be left empty. If - // you specify a value, it can contain up to 256 characters, which must all - // be printable. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s EnvironmentVariable) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnvironmentVariable) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnvironmentVariable) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnvironmentVariable"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *EnvironmentVariable) SetKey(v string) *EnvironmentVariable { - s.Key = &v - return s -} - -// SetSecure sets the Secure field's value. -func (s *EnvironmentVariable) SetSecure(v bool) *EnvironmentVariable { - s.Secure = &v - return s -} - -// SetValue sets the Value field's value. -func (s *EnvironmentVariable) SetValue(v string) *EnvironmentVariable { - s.Value = &v - return s -} - -type GetHostnameSuggestionInput struct { - _ struct{} `type:"structure"` - - // The layer ID. - // - // LayerId is a required field - LayerId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetHostnameSuggestionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHostnameSuggestionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetHostnameSuggestionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetHostnameSuggestionInput"} - if s.LayerId == nil { - invalidParams.Add(request.NewErrParamRequired("LayerId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLayerId sets the LayerId field's value. -func (s *GetHostnameSuggestionInput) SetLayerId(v string) *GetHostnameSuggestionInput { - s.LayerId = &v - return s -} - -// Contains the response to a GetHostnameSuggestion request. -type GetHostnameSuggestionOutput struct { - _ struct{} `type:"structure"` - - // The generated host name. - Hostname *string `type:"string"` - - // The layer ID. - LayerId *string `type:"string"` -} - -// String returns the string representation -func (s GetHostnameSuggestionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHostnameSuggestionOutput) GoString() string { - return s.String() -} - -// SetHostname sets the Hostname field's value. -func (s *GetHostnameSuggestionOutput) SetHostname(v string) *GetHostnameSuggestionOutput { - s.Hostname = &v - return s -} - -// SetLayerId sets the LayerId field's value. -func (s *GetHostnameSuggestionOutput) SetLayerId(v string) *GetHostnameSuggestionOutput { - s.LayerId = &v - return s -} - -type GrantAccessInput struct { - _ struct{} `type:"structure"` - - // The instance's AWS OpsWorks Stacks ID. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The length of time (in minutes) that the grant is valid. When the grant expires - // at the end of this period, the user will no longer be able to use the credentials - // to log in. If the user is logged in at the time, he or she automatically - // will be logged out. - ValidForInMinutes *int64 `min:"60" type:"integer"` -} - -// String returns the string representation -func (s GrantAccessInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GrantAccessInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GrantAccessInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GrantAccessInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.ValidForInMinutes != nil && *s.ValidForInMinutes < 60 { - invalidParams.Add(request.NewErrParamMinValue("ValidForInMinutes", 60)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GrantAccessInput) SetInstanceId(v string) *GrantAccessInput { - s.InstanceId = &v - return s -} - -// SetValidForInMinutes sets the ValidForInMinutes field's value. -func (s *GrantAccessInput) SetValidForInMinutes(v int64) *GrantAccessInput { - s.ValidForInMinutes = &v - return s -} - -// Contains the response to a GrantAccess request. -type GrantAccessOutput struct { - _ struct{} `type:"structure"` - - // A TemporaryCredential object that contains the data needed to log in to the - // instance by RDP clients, such as the Microsoft Remote Desktop Connection. - TemporaryCredential *TemporaryCredential `type:"structure"` -} - -// String returns the string representation -func (s GrantAccessOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GrantAccessOutput) GoString() string { - return s.String() -} - -// SetTemporaryCredential sets the TemporaryCredential field's value. -func (s *GrantAccessOutput) SetTemporaryCredential(v *TemporaryCredential) *GrantAccessOutput { - s.TemporaryCredential = v - return s -} - -// Describes an instance. -type Instance struct { - _ struct{} `type:"structure"` - - // The agent version. This parameter is set to INHERIT if the instance inherits - // the default stack setting or to a a version number for a fixed agent version. - AgentVersion *string `type:"string"` - - // A custom AMI ID to be used to create the instance. For more information, - // see Instances (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html) - AmiId *string `type:"string"` - - // The instance architecture: "i386" or "x86_64". - Architecture *string `type:"string" enum:"Architecture"` - - // The instance's Amazon Resource Number (ARN). - Arn *string `type:"string"` - - // For load-based or time-based instances, the type. - AutoScalingType *string `type:"string" enum:"AutoScalingType"` - - // The instance Availability Zone. For more information, see Regions and Endpoints - // (http://docs.aws.amazon.com/general/latest/gr/rande.html). - AvailabilityZone *string `type:"string"` - - // An array of BlockDeviceMapping objects that specify the instance's block - // device mappings. - BlockDeviceMappings []*BlockDeviceMapping `type:"list"` - - // The time that the instance was created. - CreatedAt *string `type:"string"` - - // Whether this is an Amazon EBS-optimized instance. - EbsOptimized *bool `type:"boolean"` - - // The ID of the associated Amazon EC2 instance. - Ec2InstanceId *string `type:"string"` - - // For container instances, the Amazon ECS cluster's ARN. - EcsClusterArn *string `type:"string"` - - // For container instances, the instance's ARN. - EcsContainerInstanceArn *string `type:"string"` - - // The instance Elastic IP address (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html). - ElasticIp *string `type:"string"` - - // The instance host name. - Hostname *string `type:"string"` - - // For registered instances, the infrastructure class: ec2 or on-premises. - InfrastructureClass *string `type:"string"` - - // Whether to install operating system and package updates when the instance - // boots. The default value is true. If this value is set to false, you must - // then update your instances manually by using CreateDeployment to run the - // update_dependencies stack command or by manually running yum (Amazon Linux) - // or apt-get (Ubuntu) on the instances. - // - // We strongly recommend using the default value of true, to ensure that your - // instances have the latest security updates. - InstallUpdatesOnBoot *bool `type:"boolean"` - - // The instance ID. - InstanceId *string `type:"string"` - - // The ARN of the instance's IAM profile. For more information about IAM ARNs, - // see Using Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html). - InstanceProfileArn *string `type:"string"` - - // The instance type, such as t2.micro. - InstanceType *string `type:"string"` - - // The ID of the last service error. For more information, call DescribeServiceErrors. - LastServiceErrorId *string `type:"string"` - - // An array containing the instance layer IDs. - LayerIds []*string `type:"list"` - - // The instance's operating system. - Os *string `type:"string"` - - // The instance's platform. - Platform *string `type:"string"` - - // The instance's private DNS name. - PrivateDns *string `type:"string"` - - // The instance's private IP address. - PrivateIp *string `type:"string"` - - // The instance public DNS name. - PublicDns *string `type:"string"` - - // The instance public IP address. - PublicIp *string `type:"string"` - - // For registered instances, who performed the registration. - RegisteredBy *string `type:"string"` - - // The instance's reported AWS OpsWorks Stacks agent version. - ReportedAgentVersion *string `type:"string"` - - // For registered instances, the reported operating system. - ReportedOs *ReportedOs `type:"structure"` - - // The instance's root device type. For more information, see Storage for the - // Root Device (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device). - RootDeviceType *string `type:"string" enum:"RootDeviceType"` - - // The root device volume ID. - RootDeviceVolumeId *string `type:"string"` - - // An array containing the instance security group IDs. - SecurityGroupIds []*string `type:"list"` - - // The SSH key's Deep Security Agent (DSA) fingerprint. - SshHostDsaKeyFingerprint *string `type:"string"` - - // The SSH key's RSA fingerprint. - SshHostRsaKeyFingerprint *string `type:"string"` - - // The instance's Amazon EC2 key-pair name. - SshKeyName *string `type:"string"` - - // The stack ID. - StackId *string `type:"string"` - - // The instance status: - // - // * booting - // - // * connection_lost - // - // * online - // - // * pending - // - // * rebooting - // - // * requested - // - // * running_setup - // - // * setup_failed - // - // * shutting_down - // - // * start_failed - // - // * stop_failed - // - // * stopped - // - // * stopping - // - // * terminated - // - // * terminating - Status *string `type:"string"` - - // The instance's subnet ID; applicable only if the stack is running in a VPC. - SubnetId *string `type:"string"` - - // The instance's tenancy option, such as dedicated or host. - Tenancy *string `type:"string"` - - // The instance's virtualization type: paravirtual or hvm. - VirtualizationType *string `type:"string" enum:"VirtualizationType"` -} - -// String returns the string representation -func (s Instance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Instance) GoString() string { - return s.String() -} - -// SetAgentVersion sets the AgentVersion field's value. -func (s *Instance) SetAgentVersion(v string) *Instance { - s.AgentVersion = &v - return s -} - -// SetAmiId sets the AmiId field's value. -func (s *Instance) SetAmiId(v string) *Instance { - s.AmiId = &v - return s -} - -// SetArchitecture sets the Architecture field's value. -func (s *Instance) SetArchitecture(v string) *Instance { - s.Architecture = &v - return s -} - -// SetArn sets the Arn field's value. -func (s *Instance) SetArn(v string) *Instance { - s.Arn = &v - return s -} - -// SetAutoScalingType sets the AutoScalingType field's value. -func (s *Instance) SetAutoScalingType(v string) *Instance { - s.AutoScalingType = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Instance) SetAvailabilityZone(v string) *Instance { - s.AvailabilityZone = &v - return s -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *Instance) SetBlockDeviceMappings(v []*BlockDeviceMapping) *Instance { - s.BlockDeviceMappings = v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Instance) SetCreatedAt(v string) *Instance { - s.CreatedAt = &v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *Instance) SetEbsOptimized(v bool) *Instance { - s.EbsOptimized = &v - return s -} - -// SetEc2InstanceId sets the Ec2InstanceId field's value. -func (s *Instance) SetEc2InstanceId(v string) *Instance { - s.Ec2InstanceId = &v - return s -} - -// SetEcsClusterArn sets the EcsClusterArn field's value. -func (s *Instance) SetEcsClusterArn(v string) *Instance { - s.EcsClusterArn = &v - return s -} - -// SetEcsContainerInstanceArn sets the EcsContainerInstanceArn field's value. -func (s *Instance) SetEcsContainerInstanceArn(v string) *Instance { - s.EcsContainerInstanceArn = &v - return s -} - -// SetElasticIp sets the ElasticIp field's value. -func (s *Instance) SetElasticIp(v string) *Instance { - s.ElasticIp = &v - return s -} - -// SetHostname sets the Hostname field's value. -func (s *Instance) SetHostname(v string) *Instance { - s.Hostname = &v - return s -} - -// SetInfrastructureClass sets the InfrastructureClass field's value. -func (s *Instance) SetInfrastructureClass(v string) *Instance { - s.InfrastructureClass = &v - return s -} - -// SetInstallUpdatesOnBoot sets the InstallUpdatesOnBoot field's value. -func (s *Instance) SetInstallUpdatesOnBoot(v bool) *Instance { - s.InstallUpdatesOnBoot = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *Instance) SetInstanceId(v string) *Instance { - s.InstanceId = &v - return s -} - -// SetInstanceProfileArn sets the InstanceProfileArn field's value. -func (s *Instance) SetInstanceProfileArn(v string) *Instance { - s.InstanceProfileArn = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *Instance) SetInstanceType(v string) *Instance { - s.InstanceType = &v - return s -} - -// SetLastServiceErrorId sets the LastServiceErrorId field's value. -func (s *Instance) SetLastServiceErrorId(v string) *Instance { - s.LastServiceErrorId = &v - return s -} - -// SetLayerIds sets the LayerIds field's value. -func (s *Instance) SetLayerIds(v []*string) *Instance { - s.LayerIds = v - return s -} - -// SetOs sets the Os field's value. -func (s *Instance) SetOs(v string) *Instance { - s.Os = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *Instance) SetPlatform(v string) *Instance { - s.Platform = &v - return s -} - -// SetPrivateDns sets the PrivateDns field's value. -func (s *Instance) SetPrivateDns(v string) *Instance { - s.PrivateDns = &v - return s -} - -// SetPrivateIp sets the PrivateIp field's value. -func (s *Instance) SetPrivateIp(v string) *Instance { - s.PrivateIp = &v - return s -} - -// SetPublicDns sets the PublicDns field's value. -func (s *Instance) SetPublicDns(v string) *Instance { - s.PublicDns = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *Instance) SetPublicIp(v string) *Instance { - s.PublicIp = &v - return s -} - -// SetRegisteredBy sets the RegisteredBy field's value. -func (s *Instance) SetRegisteredBy(v string) *Instance { - s.RegisteredBy = &v - return s -} - -// SetReportedAgentVersion sets the ReportedAgentVersion field's value. -func (s *Instance) SetReportedAgentVersion(v string) *Instance { - s.ReportedAgentVersion = &v - return s -} - -// SetReportedOs sets the ReportedOs field's value. -func (s *Instance) SetReportedOs(v *ReportedOs) *Instance { - s.ReportedOs = v - return s -} - -// SetRootDeviceType sets the RootDeviceType field's value. -func (s *Instance) SetRootDeviceType(v string) *Instance { - s.RootDeviceType = &v - return s -} - -// SetRootDeviceVolumeId sets the RootDeviceVolumeId field's value. -func (s *Instance) SetRootDeviceVolumeId(v string) *Instance { - s.RootDeviceVolumeId = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *Instance) SetSecurityGroupIds(v []*string) *Instance { - s.SecurityGroupIds = v - return s -} - -// SetSshHostDsaKeyFingerprint sets the SshHostDsaKeyFingerprint field's value. -func (s *Instance) SetSshHostDsaKeyFingerprint(v string) *Instance { - s.SshHostDsaKeyFingerprint = &v - return s -} - -// SetSshHostRsaKeyFingerprint sets the SshHostRsaKeyFingerprint field's value. -func (s *Instance) SetSshHostRsaKeyFingerprint(v string) *Instance { - s.SshHostRsaKeyFingerprint = &v - return s -} - -// SetSshKeyName sets the SshKeyName field's value. -func (s *Instance) SetSshKeyName(v string) *Instance { - s.SshKeyName = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *Instance) SetStackId(v string) *Instance { - s.StackId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Instance) SetStatus(v string) *Instance { - s.Status = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *Instance) SetSubnetId(v string) *Instance { - s.SubnetId = &v - return s -} - -// SetTenancy sets the Tenancy field's value. -func (s *Instance) SetTenancy(v string) *Instance { - s.Tenancy = &v - return s -} - -// SetVirtualizationType sets the VirtualizationType field's value. -func (s *Instance) SetVirtualizationType(v string) *Instance { - s.VirtualizationType = &v - return s -} - -// Contains a description of an Amazon EC2 instance from the Amazon EC2 metadata -// service. For more information, see Instance Metadata and User Data (http://docs.aws.amazon.com/sdkfornet/latest/apidocs/Index.html). -type InstanceIdentity struct { - _ struct{} `type:"structure"` - - // A JSON document that contains the metadata. - Document *string `type:"string"` - - // A signature that can be used to verify the document's accuracy and authenticity. - Signature *string `type:"string"` -} - -// String returns the string representation -func (s InstanceIdentity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceIdentity) GoString() string { - return s.String() -} - -// SetDocument sets the Document field's value. -func (s *InstanceIdentity) SetDocument(v string) *InstanceIdentity { - s.Document = &v - return s -} - -// SetSignature sets the Signature field's value. -func (s *InstanceIdentity) SetSignature(v string) *InstanceIdentity { - s.Signature = &v - return s -} - -// Describes how many instances a stack has for each status. -type InstancesCount struct { - _ struct{} `type:"structure"` - - // The number of instances in the Assigning state. - Assigning *int64 `type:"integer"` - - // The number of instances with booting status. - Booting *int64 `type:"integer"` - - // The number of instances with connection_lost status. - ConnectionLost *int64 `type:"integer"` - - // The number of instances in the Deregistering state. - Deregistering *int64 `type:"integer"` - - // The number of instances with online status. - Online *int64 `type:"integer"` - - // The number of instances with pending status. - Pending *int64 `type:"integer"` - - // The number of instances with rebooting status. - Rebooting *int64 `type:"integer"` - - // The number of instances in the Registered state. - Registered *int64 `type:"integer"` - - // The number of instances in the Registering state. - Registering *int64 `type:"integer"` - - // The number of instances with requested status. - Requested *int64 `type:"integer"` - - // The number of instances with running_setup status. - RunningSetup *int64 `type:"integer"` - - // The number of instances with setup_failed status. - SetupFailed *int64 `type:"integer"` - - // The number of instances with shutting_down status. - ShuttingDown *int64 `type:"integer"` - - // The number of instances with start_failed status. - StartFailed *int64 `type:"integer"` - - // The number of instances with stop_failed status. - StopFailed *int64 `type:"integer"` - - // The number of instances with stopped status. - Stopped *int64 `type:"integer"` - - // The number of instances with stopping status. - Stopping *int64 `type:"integer"` - - // The number of instances with terminated status. - Terminated *int64 `type:"integer"` - - // The number of instances with terminating status. - Terminating *int64 `type:"integer"` - - // The number of instances in the Unassigning state. - Unassigning *int64 `type:"integer"` -} - -// String returns the string representation -func (s InstancesCount) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstancesCount) GoString() string { - return s.String() -} - -// SetAssigning sets the Assigning field's value. -func (s *InstancesCount) SetAssigning(v int64) *InstancesCount { - s.Assigning = &v - return s -} - -// SetBooting sets the Booting field's value. -func (s *InstancesCount) SetBooting(v int64) *InstancesCount { - s.Booting = &v - return s -} - -// SetConnectionLost sets the ConnectionLost field's value. -func (s *InstancesCount) SetConnectionLost(v int64) *InstancesCount { - s.ConnectionLost = &v - return s -} - -// SetDeregistering sets the Deregistering field's value. -func (s *InstancesCount) SetDeregistering(v int64) *InstancesCount { - s.Deregistering = &v - return s -} - -// SetOnline sets the Online field's value. -func (s *InstancesCount) SetOnline(v int64) *InstancesCount { - s.Online = &v - return s -} - -// SetPending sets the Pending field's value. -func (s *InstancesCount) SetPending(v int64) *InstancesCount { - s.Pending = &v - return s -} - -// SetRebooting sets the Rebooting field's value. -func (s *InstancesCount) SetRebooting(v int64) *InstancesCount { - s.Rebooting = &v - return s -} - -// SetRegistered sets the Registered field's value. -func (s *InstancesCount) SetRegistered(v int64) *InstancesCount { - s.Registered = &v - return s -} - -// SetRegistering sets the Registering field's value. -func (s *InstancesCount) SetRegistering(v int64) *InstancesCount { - s.Registering = &v - return s -} - -// SetRequested sets the Requested field's value. -func (s *InstancesCount) SetRequested(v int64) *InstancesCount { - s.Requested = &v - return s -} - -// SetRunningSetup sets the RunningSetup field's value. -func (s *InstancesCount) SetRunningSetup(v int64) *InstancesCount { - s.RunningSetup = &v - return s -} - -// SetSetupFailed sets the SetupFailed field's value. -func (s *InstancesCount) SetSetupFailed(v int64) *InstancesCount { - s.SetupFailed = &v - return s -} - -// SetShuttingDown sets the ShuttingDown field's value. -func (s *InstancesCount) SetShuttingDown(v int64) *InstancesCount { - s.ShuttingDown = &v - return s -} - -// SetStartFailed sets the StartFailed field's value. -func (s *InstancesCount) SetStartFailed(v int64) *InstancesCount { - s.StartFailed = &v - return s -} - -// SetStopFailed sets the StopFailed field's value. -func (s *InstancesCount) SetStopFailed(v int64) *InstancesCount { - s.StopFailed = &v - return s -} - -// SetStopped sets the Stopped field's value. -func (s *InstancesCount) SetStopped(v int64) *InstancesCount { - s.Stopped = &v - return s -} - -// SetStopping sets the Stopping field's value. -func (s *InstancesCount) SetStopping(v int64) *InstancesCount { - s.Stopping = &v - return s -} - -// SetTerminated sets the Terminated field's value. -func (s *InstancesCount) SetTerminated(v int64) *InstancesCount { - s.Terminated = &v - return s -} - -// SetTerminating sets the Terminating field's value. -func (s *InstancesCount) SetTerminating(v int64) *InstancesCount { - s.Terminating = &v - return s -} - -// SetUnassigning sets the Unassigning field's value. -func (s *InstancesCount) SetUnassigning(v int64) *InstancesCount { - s.Unassigning = &v - return s -} - -// Describes a layer. -type Layer struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Number (ARN) of a layer. - Arn *string `type:"string"` - - // The layer attributes. - // - // For the HaproxyStatsPassword, MysqlRootPassword, and GangliaPassword attributes, - // AWS OpsWorks Stacks returns *****FILTERED***** instead of the actual value - // - // For an ECS Cluster layer, AWS OpsWorks Stacks the EcsClusterArn attribute - // is set to the cluster's ARN. - Attributes map[string]*string `type:"map"` - - // Whether to automatically assign an Elastic IP address (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) - // to the layer's instances. For more information, see How to Edit a Layer (http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html). - AutoAssignElasticIps *bool `type:"boolean"` - - // For stacks that are running in a VPC, whether to automatically assign a public - // IP address to the layer's instances. For more information, see How to Edit - // a Layer (http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html). - AutoAssignPublicIps *bool `type:"boolean"` - - // The Amazon CloudWatch Logs configuration settings for the layer. - CloudWatchLogsConfiguration *CloudWatchLogsConfiguration `type:"structure"` - - // Date when the layer was created. - CreatedAt *string `type:"string"` - - // The ARN of the default IAM profile to be used for the layer's EC2 instances. - // For more information about IAM ARNs, see Using Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html). - CustomInstanceProfileArn *string `type:"string"` - - // A JSON formatted string containing the layer's custom stack configuration - // and deployment attributes. - CustomJson *string `type:"string"` - - // A LayerCustomRecipes object that specifies the layer's custom recipes. - CustomRecipes *Recipes `type:"structure"` - - // An array containing the layer's custom security group IDs. - CustomSecurityGroupIds []*string `type:"list"` - - // AWS OpsWorks Stacks supports five lifecycle events: setup, configuration, - // deploy, undeploy, and shutdown. For each layer, AWS OpsWorks Stacks runs - // a set of standard recipes for each event. In addition, you can provide custom - // recipes for any or all layers and events. AWS OpsWorks Stacks runs custom - // event recipes after the standard recipes. LayerCustomRecipes specifies the - // custom recipes for a particular layer to be run in response to each of the - // five events. - // - // To specify a recipe, use the cookbook's directory name in the repository - // followed by two colons and the recipe name, which is the recipe's file name - // without the .rb extension. For example: phpapp2::dbsetup specifies the dbsetup.rb - // recipe in the repository's phpapp2 folder. - DefaultRecipes *Recipes `type:"structure"` - - // An array containing the layer's security group names. - DefaultSecurityGroupNames []*string `type:"list"` - - // Whether auto healing is disabled for the layer. - EnableAutoHealing *bool `type:"boolean"` - - // Whether to install operating system and package updates when the instance - // boots. The default value is true. If this value is set to false, you must - // then update your instances manually by using CreateDeployment to run the - // update_dependencies stack command or manually running yum (Amazon Linux) - // or apt-get (Ubuntu) on the instances. - // - // We strongly recommend using the default value of true, to ensure that your - // instances have the latest security updates. - InstallUpdatesOnBoot *bool `type:"boolean"` - - // The layer ID. - LayerId *string `type:"string"` - - // A LifeCycleEventConfiguration object that specifies the Shutdown event configuration. - LifecycleEventConfiguration *LifecycleEventConfiguration `type:"structure"` - - // The layer name. - Name *string `type:"string"` - - // An array of Package objects that describe the layer's packages. - Packages []*string `type:"list"` - - // The layer short name. - Shortname *string `type:"string"` - - // The layer stack ID. - StackId *string `type:"string"` - - // The layer type. - Type *string `type:"string" enum:"LayerType"` - - // Whether the layer uses Amazon EBS-optimized instances. - UseEbsOptimizedInstances *bool `type:"boolean"` - - // A VolumeConfigurations object that describes the layer's Amazon EBS volumes. - VolumeConfigurations []*VolumeConfiguration `type:"list"` -} - -// String returns the string representation -func (s Layer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Layer) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Layer) SetArn(v string) *Layer { - s.Arn = &v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *Layer) SetAttributes(v map[string]*string) *Layer { - s.Attributes = v - return s -} - -// SetAutoAssignElasticIps sets the AutoAssignElasticIps field's value. -func (s *Layer) SetAutoAssignElasticIps(v bool) *Layer { - s.AutoAssignElasticIps = &v - return s -} - -// SetAutoAssignPublicIps sets the AutoAssignPublicIps field's value. -func (s *Layer) SetAutoAssignPublicIps(v bool) *Layer { - s.AutoAssignPublicIps = &v - return s -} - -// SetCloudWatchLogsConfiguration sets the CloudWatchLogsConfiguration field's value. -func (s *Layer) SetCloudWatchLogsConfiguration(v *CloudWatchLogsConfiguration) *Layer { - s.CloudWatchLogsConfiguration = v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Layer) SetCreatedAt(v string) *Layer { - s.CreatedAt = &v - return s -} - -// SetCustomInstanceProfileArn sets the CustomInstanceProfileArn field's value. -func (s *Layer) SetCustomInstanceProfileArn(v string) *Layer { - s.CustomInstanceProfileArn = &v - return s -} - -// SetCustomJson sets the CustomJson field's value. -func (s *Layer) SetCustomJson(v string) *Layer { - s.CustomJson = &v - return s -} - -// SetCustomRecipes sets the CustomRecipes field's value. -func (s *Layer) SetCustomRecipes(v *Recipes) *Layer { - s.CustomRecipes = v - return s -} - -// SetCustomSecurityGroupIds sets the CustomSecurityGroupIds field's value. -func (s *Layer) SetCustomSecurityGroupIds(v []*string) *Layer { - s.CustomSecurityGroupIds = v - return s -} - -// SetDefaultRecipes sets the DefaultRecipes field's value. -func (s *Layer) SetDefaultRecipes(v *Recipes) *Layer { - s.DefaultRecipes = v - return s -} - -// SetDefaultSecurityGroupNames sets the DefaultSecurityGroupNames field's value. -func (s *Layer) SetDefaultSecurityGroupNames(v []*string) *Layer { - s.DefaultSecurityGroupNames = v - return s -} - -// SetEnableAutoHealing sets the EnableAutoHealing field's value. -func (s *Layer) SetEnableAutoHealing(v bool) *Layer { - s.EnableAutoHealing = &v - return s -} - -// SetInstallUpdatesOnBoot sets the InstallUpdatesOnBoot field's value. -func (s *Layer) SetInstallUpdatesOnBoot(v bool) *Layer { - s.InstallUpdatesOnBoot = &v - return s -} - -// SetLayerId sets the LayerId field's value. -func (s *Layer) SetLayerId(v string) *Layer { - s.LayerId = &v - return s -} - -// SetLifecycleEventConfiguration sets the LifecycleEventConfiguration field's value. -func (s *Layer) SetLifecycleEventConfiguration(v *LifecycleEventConfiguration) *Layer { - s.LifecycleEventConfiguration = v - return s -} - -// SetName sets the Name field's value. -func (s *Layer) SetName(v string) *Layer { - s.Name = &v - return s -} - -// SetPackages sets the Packages field's value. -func (s *Layer) SetPackages(v []*string) *Layer { - s.Packages = v - return s -} - -// SetShortname sets the Shortname field's value. -func (s *Layer) SetShortname(v string) *Layer { - s.Shortname = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *Layer) SetStackId(v string) *Layer { - s.StackId = &v - return s -} - -// SetType sets the Type field's value. -func (s *Layer) SetType(v string) *Layer { - s.Type = &v - return s -} - -// SetUseEbsOptimizedInstances sets the UseEbsOptimizedInstances field's value. -func (s *Layer) SetUseEbsOptimizedInstances(v bool) *Layer { - s.UseEbsOptimizedInstances = &v - return s -} - -// SetVolumeConfigurations sets the VolumeConfigurations field's value. -func (s *Layer) SetVolumeConfigurations(v []*VolumeConfiguration) *Layer { - s.VolumeConfigurations = v - return s -} - -// Specifies the lifecycle event configuration -type LifecycleEventConfiguration struct { - _ struct{} `type:"structure"` - - // A ShutdownEventConfiguration object that specifies the Shutdown event configuration. - Shutdown *ShutdownEventConfiguration `type:"structure"` -} - -// String returns the string representation -func (s LifecycleEventConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LifecycleEventConfiguration) GoString() string { - return s.String() -} - -// SetShutdown sets the Shutdown field's value. -func (s *LifecycleEventConfiguration) SetShutdown(v *ShutdownEventConfiguration) *LifecycleEventConfiguration { - s.Shutdown = v - return s -} - -type ListTagsInput struct { - _ struct{} `type:"structure"` - - // Do not use. A validation exception occurs if you add a MaxResults parameter - // to a ListTagsRequest call. - MaxResults *int64 `type:"integer"` - - // Do not use. A validation exception occurs if you add a NextToken parameter - // to a ListTagsRequest call. - NextToken *string `type:"string"` - - // The stack or layer's Amazon Resource Number (ARN). - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput { - s.NextToken = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ListTagsInput) SetResourceArn(v string) *ListTagsInput { - s.ResourceArn = &v - return s -} - -// Contains the response to a ListTags request. -type ListTagsOutput struct { - _ struct{} `type:"structure"` - - // If a paginated request does not return all of the remaining results, this - // parameter is set to a token that you can assign to the request object's NextToken - // parameter to get the next set of results. If the previous paginated request - // returned all of the remaining results, this parameter is set to null. - NextToken *string `type:"string"` - - // A set of key-value pairs that contain tag keys and tag values that are attached - // to a stack or layer. - Tags map[string]*string `type:"map"` -} - -// String returns the string representation -func (s ListTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput { - s.NextToken = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput { - s.Tags = v - return s -} - -// Describes a layer's load-based auto scaling configuration. -type LoadBasedAutoScalingConfiguration struct { - _ struct{} `type:"structure"` - - // An AutoScalingThresholds object that describes the downscaling configuration, - // which defines how and when AWS OpsWorks Stacks reduces the number of instances. - DownScaling *AutoScalingThresholds `type:"structure"` - - // Whether load-based auto scaling is enabled for the layer. - Enable *bool `type:"boolean"` - - // The layer ID. - LayerId *string `type:"string"` - - // An AutoScalingThresholds object that describes the upscaling configuration, - // which defines how and when AWS OpsWorks Stacks increases the number of instances. - UpScaling *AutoScalingThresholds `type:"structure"` -} - -// String returns the string representation -func (s LoadBasedAutoScalingConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoadBasedAutoScalingConfiguration) GoString() string { - return s.String() -} - -// SetDownScaling sets the DownScaling field's value. -func (s *LoadBasedAutoScalingConfiguration) SetDownScaling(v *AutoScalingThresholds) *LoadBasedAutoScalingConfiguration { - s.DownScaling = v - return s -} - -// SetEnable sets the Enable field's value. -func (s *LoadBasedAutoScalingConfiguration) SetEnable(v bool) *LoadBasedAutoScalingConfiguration { - s.Enable = &v - return s -} - -// SetLayerId sets the LayerId field's value. -func (s *LoadBasedAutoScalingConfiguration) SetLayerId(v string) *LoadBasedAutoScalingConfiguration { - s.LayerId = &v - return s -} - -// SetUpScaling sets the UpScaling field's value. -func (s *LoadBasedAutoScalingConfiguration) SetUpScaling(v *AutoScalingThresholds) *LoadBasedAutoScalingConfiguration { - s.UpScaling = v - return s -} - -// Describes supported operating systems in AWS OpsWorks Stacks. -type OperatingSystem struct { - _ struct{} `type:"structure"` - - // Supported configuration manager name and versions for an AWS OpsWorks Stacks - // operating system. - ConfigurationManagers []*OperatingSystemConfigurationManager `type:"list"` - - // The ID of a supported operating system, such as Amazon Linux 2017.09. - Id *string `type:"string"` - - // The name of the operating system, such as Amazon Linux 2017.09. - Name *string `type:"string"` - - // A short name for the operating system manufacturer. - ReportedName *string `type:"string"` - - // The version of the operating system, including the release and edition, if - // applicable. - ReportedVersion *string `type:"string"` - - // Indicates that an operating system is not supported for new instances. - Supported *bool `type:"boolean"` - - // The type of a supported operating system, either Linux or Windows. - Type *string `type:"string"` -} - -// String returns the string representation -func (s OperatingSystem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OperatingSystem) GoString() string { - return s.String() -} - -// SetConfigurationManagers sets the ConfigurationManagers field's value. -func (s *OperatingSystem) SetConfigurationManagers(v []*OperatingSystemConfigurationManager) *OperatingSystem { - s.ConfigurationManagers = v - return s -} - -// SetId sets the Id field's value. -func (s *OperatingSystem) SetId(v string) *OperatingSystem { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *OperatingSystem) SetName(v string) *OperatingSystem { - s.Name = &v - return s -} - -// SetReportedName sets the ReportedName field's value. -func (s *OperatingSystem) SetReportedName(v string) *OperatingSystem { - s.ReportedName = &v - return s -} - -// SetReportedVersion sets the ReportedVersion field's value. -func (s *OperatingSystem) SetReportedVersion(v string) *OperatingSystem { - s.ReportedVersion = &v - return s -} - -// SetSupported sets the Supported field's value. -func (s *OperatingSystem) SetSupported(v bool) *OperatingSystem { - s.Supported = &v - return s -} - -// SetType sets the Type field's value. -func (s *OperatingSystem) SetType(v string) *OperatingSystem { - s.Type = &v - return s -} - -// A block that contains information about the configuration manager (Chef) -// and the versions of the configuration manager that are supported for an operating -// system. -type OperatingSystemConfigurationManager struct { - _ struct{} `type:"structure"` - - // The name of the configuration manager, which is Chef. - Name *string `type:"string"` - - // The versions of the configuration manager that are supported by an operating - // system. - Version *string `type:"string"` -} - -// String returns the string representation -func (s OperatingSystemConfigurationManager) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OperatingSystemConfigurationManager) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *OperatingSystemConfigurationManager) SetName(v string) *OperatingSystemConfigurationManager { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *OperatingSystemConfigurationManager) SetVersion(v string) *OperatingSystemConfigurationManager { - s.Version = &v - return s -} - -// Describes stack or user permissions. -type Permission struct { - _ struct{} `type:"structure"` - - // Whether the user can use SSH. - AllowSsh *bool `type:"boolean"` - - // Whether the user can use sudo. - AllowSudo *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) for an AWS Identity and Access Management - // (IAM) role. For more information about IAM ARNs, see Using Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html). - IamUserArn *string `type:"string"` - - // The user's permission level, which must be the following: - // - // * deny - // - // * show - // - // * deploy - // - // * manage - // - // * iam_only - // - // For more information on the permissions associated with these levels, see - // Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html) - Level *string `type:"string"` - - // A stack ID. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s Permission) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Permission) GoString() string { - return s.String() -} - -// SetAllowSsh sets the AllowSsh field's value. -func (s *Permission) SetAllowSsh(v bool) *Permission { - s.AllowSsh = &v - return s -} - -// SetAllowSudo sets the AllowSudo field's value. -func (s *Permission) SetAllowSudo(v bool) *Permission { - s.AllowSudo = &v - return s -} - -// SetIamUserArn sets the IamUserArn field's value. -func (s *Permission) SetIamUserArn(v string) *Permission { - s.IamUserArn = &v - return s -} - -// SetLevel sets the Level field's value. -func (s *Permission) SetLevel(v string) *Permission { - s.Level = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *Permission) SetStackId(v string) *Permission { - s.StackId = &v - return s -} - -// Describes an instance's RAID array. -type RaidArray struct { - _ struct{} `type:"structure"` - - // The array's Availability Zone. For more information, see Regions and Endpoints - // (http://docs.aws.amazon.com/general/latest/gr/rande.html). - AvailabilityZone *string `type:"string"` - - // When the RAID array was created. - CreatedAt *string `type:"string"` - - // The array's Linux device. For example /dev/mdadm0. - Device *string `type:"string"` - - // The instance ID. - InstanceId *string `type:"string"` - - // For PIOPS volumes, the IOPS per disk. - Iops *int64 `type:"integer"` - - // The array's mount point. - MountPoint *string `type:"string"` - - // The array name. - Name *string `type:"string"` - - // The number of disks in the array. - NumberOfDisks *int64 `type:"integer"` - - // The array ID. - RaidArrayId *string `type:"string"` - - // The RAID level (http://en.wikipedia.org/wiki/Standard_RAID_levels). - RaidLevel *int64 `type:"integer"` - - // The array's size. - Size *int64 `type:"integer"` - - // The stack ID. - StackId *string `type:"string"` - - // The volume type, standard or PIOPS. - VolumeType *string `type:"string"` -} - -// String returns the string representation -func (s RaidArray) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RaidArray) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *RaidArray) SetAvailabilityZone(v string) *RaidArray { - s.AvailabilityZone = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *RaidArray) SetCreatedAt(v string) *RaidArray { - s.CreatedAt = &v - return s -} - -// SetDevice sets the Device field's value. -func (s *RaidArray) SetDevice(v string) *RaidArray { - s.Device = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *RaidArray) SetInstanceId(v string) *RaidArray { - s.InstanceId = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *RaidArray) SetIops(v int64) *RaidArray { - s.Iops = &v - return s -} - -// SetMountPoint sets the MountPoint field's value. -func (s *RaidArray) SetMountPoint(v string) *RaidArray { - s.MountPoint = &v - return s -} - -// SetName sets the Name field's value. -func (s *RaidArray) SetName(v string) *RaidArray { - s.Name = &v - return s -} - -// SetNumberOfDisks sets the NumberOfDisks field's value. -func (s *RaidArray) SetNumberOfDisks(v int64) *RaidArray { - s.NumberOfDisks = &v - return s -} - -// SetRaidArrayId sets the RaidArrayId field's value. -func (s *RaidArray) SetRaidArrayId(v string) *RaidArray { - s.RaidArrayId = &v - return s -} - -// SetRaidLevel sets the RaidLevel field's value. -func (s *RaidArray) SetRaidLevel(v int64) *RaidArray { - s.RaidLevel = &v - return s -} - -// SetSize sets the Size field's value. -func (s *RaidArray) SetSize(v int64) *RaidArray { - s.Size = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *RaidArray) SetStackId(v string) *RaidArray { - s.StackId = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *RaidArray) SetVolumeType(v string) *RaidArray { - s.VolumeType = &v - return s -} - -// Describes an Amazon RDS instance. -type RdsDbInstance struct { - _ struct{} `type:"structure"` - - // The instance's address. - Address *string `type:"string"` - - // The DB instance identifier. - DbInstanceIdentifier *string `type:"string"` - - // AWS OpsWorks Stacks returns *****FILTERED***** instead of the actual value. - DbPassword *string `type:"string"` - - // The master user name. - DbUser *string `type:"string"` - - // The instance's database engine. - Engine *string `type:"string"` - - // Set to true if AWS OpsWorks Stacks is unable to discover the Amazon RDS instance. - // AWS OpsWorks Stacks attempts to discover the instance only once. If this - // value is set to true, you must deregister the instance, and then register - // it again. - MissingOnRds *bool `type:"boolean"` - - // The instance's ARN. - RdsDbInstanceArn *string `type:"string"` - - // The instance's AWS region. - Region *string `type:"string"` - - // The ID of the stack with which the instance is registered. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s RdsDbInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RdsDbInstance) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *RdsDbInstance) SetAddress(v string) *RdsDbInstance { - s.Address = &v - return s -} - -// SetDbInstanceIdentifier sets the DbInstanceIdentifier field's value. -func (s *RdsDbInstance) SetDbInstanceIdentifier(v string) *RdsDbInstance { - s.DbInstanceIdentifier = &v - return s -} - -// SetDbPassword sets the DbPassword field's value. -func (s *RdsDbInstance) SetDbPassword(v string) *RdsDbInstance { - s.DbPassword = &v - return s -} - -// SetDbUser sets the DbUser field's value. -func (s *RdsDbInstance) SetDbUser(v string) *RdsDbInstance { - s.DbUser = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *RdsDbInstance) SetEngine(v string) *RdsDbInstance { - s.Engine = &v - return s -} - -// SetMissingOnRds sets the MissingOnRds field's value. -func (s *RdsDbInstance) SetMissingOnRds(v bool) *RdsDbInstance { - s.MissingOnRds = &v - return s -} - -// SetRdsDbInstanceArn sets the RdsDbInstanceArn field's value. -func (s *RdsDbInstance) SetRdsDbInstanceArn(v string) *RdsDbInstance { - s.RdsDbInstanceArn = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *RdsDbInstance) SetRegion(v string) *RdsDbInstance { - s.Region = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *RdsDbInstance) SetStackId(v string) *RdsDbInstance { - s.StackId = &v - return s -} - -type RebootInstanceInput struct { - _ struct{} `type:"structure"` - - // The instance ID. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RebootInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *RebootInstanceInput) SetInstanceId(v string) *RebootInstanceInput { - s.InstanceId = &v - return s -} - -type RebootInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RebootInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootInstanceOutput) GoString() string { - return s.String() -} - -// AWS OpsWorks Stacks supports five lifecycle events: setup, configuration, -// deploy, undeploy, and shutdown. For each layer, AWS OpsWorks Stacks runs -// a set of standard recipes for each event. In addition, you can provide custom -// recipes for any or all layers and events. AWS OpsWorks Stacks runs custom -// event recipes after the standard recipes. LayerCustomRecipes specifies the -// custom recipes for a particular layer to be run in response to each of the -// five events. -// -// To specify a recipe, use the cookbook's directory name in the repository -// followed by two colons and the recipe name, which is the recipe's file name -// without the .rb extension. For example: phpapp2::dbsetup specifies the dbsetup.rb -// recipe in the repository's phpapp2 folder. -type Recipes struct { - _ struct{} `type:"structure"` - - // An array of custom recipe names to be run following a configure event. - Configure []*string `type:"list"` - - // An array of custom recipe names to be run following a deploy event. - Deploy []*string `type:"list"` - - // An array of custom recipe names to be run following a setup event. - Setup []*string `type:"list"` - - // An array of custom recipe names to be run following a shutdown event. - Shutdown []*string `type:"list"` - - // An array of custom recipe names to be run following a undeploy event. - Undeploy []*string `type:"list"` -} - -// String returns the string representation -func (s Recipes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Recipes) GoString() string { - return s.String() -} - -// SetConfigure sets the Configure field's value. -func (s *Recipes) SetConfigure(v []*string) *Recipes { - s.Configure = v - return s -} - -// SetDeploy sets the Deploy field's value. -func (s *Recipes) SetDeploy(v []*string) *Recipes { - s.Deploy = v - return s -} - -// SetSetup sets the Setup field's value. -func (s *Recipes) SetSetup(v []*string) *Recipes { - s.Setup = v - return s -} - -// SetShutdown sets the Shutdown field's value. -func (s *Recipes) SetShutdown(v []*string) *Recipes { - s.Shutdown = v - return s -} - -// SetUndeploy sets the Undeploy field's value. -func (s *Recipes) SetUndeploy(v []*string) *Recipes { - s.Undeploy = v - return s -} - -type RegisterEcsClusterInput struct { - _ struct{} `type:"structure"` - - // The cluster's ARN. - // - // EcsClusterArn is a required field - EcsClusterArn *string `type:"string" required:"true"` - - // The stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterEcsClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterEcsClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterEcsClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterEcsClusterInput"} - if s.EcsClusterArn == nil { - invalidParams.Add(request.NewErrParamRequired("EcsClusterArn")) - } - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEcsClusterArn sets the EcsClusterArn field's value. -func (s *RegisterEcsClusterInput) SetEcsClusterArn(v string) *RegisterEcsClusterInput { - s.EcsClusterArn = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *RegisterEcsClusterInput) SetStackId(v string) *RegisterEcsClusterInput { - s.StackId = &v - return s -} - -// Contains the response to a RegisterEcsCluster request. -type RegisterEcsClusterOutput struct { - _ struct{} `type:"structure"` - - // The cluster's ARN. - EcsClusterArn *string `type:"string"` -} - -// String returns the string representation -func (s RegisterEcsClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterEcsClusterOutput) GoString() string { - return s.String() -} - -// SetEcsClusterArn sets the EcsClusterArn field's value. -func (s *RegisterEcsClusterOutput) SetEcsClusterArn(v string) *RegisterEcsClusterOutput { - s.EcsClusterArn = &v - return s -} - -type RegisterElasticIpInput struct { - _ struct{} `type:"structure"` - - // The Elastic IP address. - // - // ElasticIp is a required field - ElasticIp *string `type:"string" required:"true"` - - // The stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterElasticIpInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterElasticIpInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterElasticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterElasticIpInput"} - if s.ElasticIp == nil { - invalidParams.Add(request.NewErrParamRequired("ElasticIp")) - } - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetElasticIp sets the ElasticIp field's value. -func (s *RegisterElasticIpInput) SetElasticIp(v string) *RegisterElasticIpInput { - s.ElasticIp = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *RegisterElasticIpInput) SetStackId(v string) *RegisterElasticIpInput { - s.StackId = &v - return s -} - -// Contains the response to a RegisterElasticIp request. -type RegisterElasticIpOutput struct { - _ struct{} `type:"structure"` - - // The Elastic IP address. - ElasticIp *string `type:"string"` -} - -// String returns the string representation -func (s RegisterElasticIpOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterElasticIpOutput) GoString() string { - return s.String() -} - -// SetElasticIp sets the ElasticIp field's value. -func (s *RegisterElasticIpOutput) SetElasticIp(v string) *RegisterElasticIpOutput { - s.ElasticIp = &v - return s -} - -type RegisterInstanceInput struct { - _ struct{} `type:"structure"` - - // The instance's hostname. - Hostname *string `type:"string"` - - // An InstanceIdentity object that contains the instance's identity. - InstanceIdentity *InstanceIdentity `type:"structure"` - - // The instance's private IP address. - PrivateIp *string `type:"string"` - - // The instance's public IP address. - PublicIp *string `type:"string"` - - // The instances public RSA key. This key is used to encrypt communication between - // the instance and the service. - RsaPublicKey *string `type:"string"` - - // The instances public RSA key fingerprint. - RsaPublicKeyFingerprint *string `type:"string"` - - // The ID of the stack that the instance is to be registered with. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterInstanceInput"} - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostname sets the Hostname field's value. -func (s *RegisterInstanceInput) SetHostname(v string) *RegisterInstanceInput { - s.Hostname = &v - return s -} - -// SetInstanceIdentity sets the InstanceIdentity field's value. -func (s *RegisterInstanceInput) SetInstanceIdentity(v *InstanceIdentity) *RegisterInstanceInput { - s.InstanceIdentity = v - return s -} - -// SetPrivateIp sets the PrivateIp field's value. -func (s *RegisterInstanceInput) SetPrivateIp(v string) *RegisterInstanceInput { - s.PrivateIp = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *RegisterInstanceInput) SetPublicIp(v string) *RegisterInstanceInput { - s.PublicIp = &v - return s -} - -// SetRsaPublicKey sets the RsaPublicKey field's value. -func (s *RegisterInstanceInput) SetRsaPublicKey(v string) *RegisterInstanceInput { - s.RsaPublicKey = &v - return s -} - -// SetRsaPublicKeyFingerprint sets the RsaPublicKeyFingerprint field's value. -func (s *RegisterInstanceInput) SetRsaPublicKeyFingerprint(v string) *RegisterInstanceInput { - s.RsaPublicKeyFingerprint = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *RegisterInstanceInput) SetStackId(v string) *RegisterInstanceInput { - s.StackId = &v - return s -} - -// Contains the response to a RegisterInstanceResult request. -type RegisterInstanceOutput struct { - _ struct{} `type:"structure"` - - // The registered instance's AWS OpsWorks Stacks ID. - InstanceId *string `type:"string"` -} - -// String returns the string representation -func (s RegisterInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterInstanceOutput) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *RegisterInstanceOutput) SetInstanceId(v string) *RegisterInstanceOutput { - s.InstanceId = &v - return s -} - -type RegisterRdsDbInstanceInput struct { - _ struct{} `type:"structure"` - - // The database password. - // - // DbPassword is a required field - DbPassword *string `type:"string" required:"true"` - - // The database's master user name. - // - // DbUser is a required field - DbUser *string `type:"string" required:"true"` - - // The Amazon RDS instance's ARN. - // - // RdsDbInstanceArn is a required field - RdsDbInstanceArn *string `type:"string" required:"true"` - - // The stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterRdsDbInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterRdsDbInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterRdsDbInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterRdsDbInstanceInput"} - if s.DbPassword == nil { - invalidParams.Add(request.NewErrParamRequired("DbPassword")) - } - if s.DbUser == nil { - invalidParams.Add(request.NewErrParamRequired("DbUser")) - } - if s.RdsDbInstanceArn == nil { - invalidParams.Add(request.NewErrParamRequired("RdsDbInstanceArn")) - } - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDbPassword sets the DbPassword field's value. -func (s *RegisterRdsDbInstanceInput) SetDbPassword(v string) *RegisterRdsDbInstanceInput { - s.DbPassword = &v - return s -} - -// SetDbUser sets the DbUser field's value. -func (s *RegisterRdsDbInstanceInput) SetDbUser(v string) *RegisterRdsDbInstanceInput { - s.DbUser = &v - return s -} - -// SetRdsDbInstanceArn sets the RdsDbInstanceArn field's value. -func (s *RegisterRdsDbInstanceInput) SetRdsDbInstanceArn(v string) *RegisterRdsDbInstanceInput { - s.RdsDbInstanceArn = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *RegisterRdsDbInstanceInput) SetStackId(v string) *RegisterRdsDbInstanceInput { - s.StackId = &v - return s -} - -type RegisterRdsDbInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RegisterRdsDbInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterRdsDbInstanceOutput) GoString() string { - return s.String() -} - -type RegisterVolumeInput struct { - _ struct{} `type:"structure"` - - // The Amazon EBS volume ID. - Ec2VolumeId *string `type:"string"` - - // The stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterVolumeInput"} - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEc2VolumeId sets the Ec2VolumeId field's value. -func (s *RegisterVolumeInput) SetEc2VolumeId(v string) *RegisterVolumeInput { - s.Ec2VolumeId = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *RegisterVolumeInput) SetStackId(v string) *RegisterVolumeInput { - s.StackId = &v - return s -} - -// Contains the response to a RegisterVolume request. -type RegisterVolumeOutput struct { - _ struct{} `type:"structure"` - - // The volume ID. - VolumeId *string `type:"string"` -} - -// String returns the string representation -func (s RegisterVolumeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterVolumeOutput) GoString() string { - return s.String() -} - -// SetVolumeId sets the VolumeId field's value. -func (s *RegisterVolumeOutput) SetVolumeId(v string) *RegisterVolumeOutput { - s.VolumeId = &v - return s -} - -// A registered instance's reported operating system. -type ReportedOs struct { - _ struct{} `type:"structure"` - - // The operating system family. - Family *string `type:"string"` - - // The operating system name. - Name *string `type:"string"` - - // The operating system version. - Version *string `type:"string"` -} - -// String returns the string representation -func (s ReportedOs) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReportedOs) GoString() string { - return s.String() -} - -// SetFamily sets the Family field's value. -func (s *ReportedOs) SetFamily(v string) *ReportedOs { - s.Family = &v - return s -} - -// SetName sets the Name field's value. -func (s *ReportedOs) SetName(v string) *ReportedOs { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *ReportedOs) SetVersion(v string) *ReportedOs { - s.Version = &v - return s -} - -// Describes a user's SSH information. -type SelfUserProfile struct { - _ struct{} `type:"structure"` - - // The user's IAM ARN. - IamUserArn *string `type:"string"` - - // The user's name. - Name *string `type:"string"` - - // The user's SSH public key. - SshPublicKey *string `type:"string"` - - // The user's SSH user name. - SshUsername *string `type:"string"` -} - -// String returns the string representation -func (s SelfUserProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SelfUserProfile) GoString() string { - return s.String() -} - -// SetIamUserArn sets the IamUserArn field's value. -func (s *SelfUserProfile) SetIamUserArn(v string) *SelfUserProfile { - s.IamUserArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *SelfUserProfile) SetName(v string) *SelfUserProfile { - s.Name = &v - return s -} - -// SetSshPublicKey sets the SshPublicKey field's value. -func (s *SelfUserProfile) SetSshPublicKey(v string) *SelfUserProfile { - s.SshPublicKey = &v - return s -} - -// SetSshUsername sets the SshUsername field's value. -func (s *SelfUserProfile) SetSshUsername(v string) *SelfUserProfile { - s.SshUsername = &v - return s -} - -// Describes an AWS OpsWorks Stacks service error. -type ServiceError struct { - _ struct{} `type:"structure"` - - // When the error occurred. - CreatedAt *string `type:"string"` - - // The instance ID. - InstanceId *string `type:"string"` - - // A message that describes the error. - Message *string `type:"string"` - - // The error ID. - ServiceErrorId *string `type:"string"` - - // The stack ID. - StackId *string `type:"string"` - - // The error type. - Type *string `type:"string"` -} - -// String returns the string representation -func (s ServiceError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceError) GoString() string { - return s.String() -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *ServiceError) SetCreatedAt(v string) *ServiceError { - s.CreatedAt = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ServiceError) SetInstanceId(v string) *ServiceError { - s.InstanceId = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ServiceError) SetMessage(v string) *ServiceError { - s.Message = &v - return s -} - -// SetServiceErrorId sets the ServiceErrorId field's value. -func (s *ServiceError) SetServiceErrorId(v string) *ServiceError { - s.ServiceErrorId = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *ServiceError) SetStackId(v string) *ServiceError { - s.StackId = &v - return s -} - -// SetType sets the Type field's value. -func (s *ServiceError) SetType(v string) *ServiceError { - s.Type = &v - return s -} - -type SetLoadBasedAutoScalingInput struct { - _ struct{} `type:"structure"` - - // An AutoScalingThresholds object with the downscaling threshold configuration. - // If the load falls below these thresholds for a specified amount of time, - // AWS OpsWorks Stacks stops a specified number of instances. - DownScaling *AutoScalingThresholds `type:"structure"` - - // Enables load-based auto scaling for the layer. - Enable *bool `type:"boolean"` - - // The layer ID. - // - // LayerId is a required field - LayerId *string `type:"string" required:"true"` - - // An AutoScalingThresholds object with the upscaling threshold configuration. - // If the load exceeds these thresholds for a specified amount of time, AWS - // OpsWorks Stacks starts a specified number of instances. - UpScaling *AutoScalingThresholds `type:"structure"` -} - -// String returns the string representation -func (s SetLoadBasedAutoScalingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetLoadBasedAutoScalingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetLoadBasedAutoScalingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetLoadBasedAutoScalingInput"} - if s.LayerId == nil { - invalidParams.Add(request.NewErrParamRequired("LayerId")) - } - if s.DownScaling != nil { - if err := s.DownScaling.Validate(); err != nil { - invalidParams.AddNested("DownScaling", err.(request.ErrInvalidParams)) - } - } - if s.UpScaling != nil { - if err := s.UpScaling.Validate(); err != nil { - invalidParams.AddNested("UpScaling", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDownScaling sets the DownScaling field's value. -func (s *SetLoadBasedAutoScalingInput) SetDownScaling(v *AutoScalingThresholds) *SetLoadBasedAutoScalingInput { - s.DownScaling = v - return s -} - -// SetEnable sets the Enable field's value. -func (s *SetLoadBasedAutoScalingInput) SetEnable(v bool) *SetLoadBasedAutoScalingInput { - s.Enable = &v - return s -} - -// SetLayerId sets the LayerId field's value. -func (s *SetLoadBasedAutoScalingInput) SetLayerId(v string) *SetLoadBasedAutoScalingInput { - s.LayerId = &v - return s -} - -// SetUpScaling sets the UpScaling field's value. -func (s *SetLoadBasedAutoScalingInput) SetUpScaling(v *AutoScalingThresholds) *SetLoadBasedAutoScalingInput { - s.UpScaling = v - return s -} - -type SetLoadBasedAutoScalingOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetLoadBasedAutoScalingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetLoadBasedAutoScalingOutput) GoString() string { - return s.String() -} - -type SetPermissionInput struct { - _ struct{} `type:"structure"` - - // The user is allowed to use SSH to communicate with the instance. - AllowSsh *bool `type:"boolean"` - - // The user is allowed to use sudo to elevate privileges. - AllowSudo *bool `type:"boolean"` - - // The user's IAM ARN. This can also be a federated user's ARN. - // - // IamUserArn is a required field - IamUserArn *string `type:"string" required:"true"` - - // The user's permission level, which must be set to one of the following strings. - // You cannot set your own permissions level. - // - // * deny - // - // * show - // - // * deploy - // - // * manage - // - // * iam_only - // - // For more information about the permissions associated with these levels, - // see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). - Level *string `type:"string"` - - // The stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SetPermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetPermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetPermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetPermissionInput"} - if s.IamUserArn == nil { - invalidParams.Add(request.NewErrParamRequired("IamUserArn")) - } - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowSsh sets the AllowSsh field's value. -func (s *SetPermissionInput) SetAllowSsh(v bool) *SetPermissionInput { - s.AllowSsh = &v - return s -} - -// SetAllowSudo sets the AllowSudo field's value. -func (s *SetPermissionInput) SetAllowSudo(v bool) *SetPermissionInput { - s.AllowSudo = &v - return s -} - -// SetIamUserArn sets the IamUserArn field's value. -func (s *SetPermissionInput) SetIamUserArn(v string) *SetPermissionInput { - s.IamUserArn = &v - return s -} - -// SetLevel sets the Level field's value. -func (s *SetPermissionInput) SetLevel(v string) *SetPermissionInput { - s.Level = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *SetPermissionInput) SetStackId(v string) *SetPermissionInput { - s.StackId = &v - return s -} - -type SetPermissionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetPermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetPermissionOutput) GoString() string { - return s.String() -} - -type SetTimeBasedAutoScalingInput struct { - _ struct{} `type:"structure"` - - // An AutoScalingSchedule with the instance schedule. - AutoScalingSchedule *WeeklyAutoScalingSchedule `type:"structure"` - - // The instance ID. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SetTimeBasedAutoScalingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetTimeBasedAutoScalingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetTimeBasedAutoScalingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetTimeBasedAutoScalingInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoScalingSchedule sets the AutoScalingSchedule field's value. -func (s *SetTimeBasedAutoScalingInput) SetAutoScalingSchedule(v *WeeklyAutoScalingSchedule) *SetTimeBasedAutoScalingInput { - s.AutoScalingSchedule = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *SetTimeBasedAutoScalingInput) SetInstanceId(v string) *SetTimeBasedAutoScalingInput { - s.InstanceId = &v - return s -} - -type SetTimeBasedAutoScalingOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetTimeBasedAutoScalingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetTimeBasedAutoScalingOutput) GoString() string { - return s.String() -} - -// The Shutdown event configuration. -type ShutdownEventConfiguration struct { - _ struct{} `type:"structure"` - - // Whether to enable Elastic Load Balancing connection draining. For more information, - // see Connection Draining (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/TerminologyandKeyConcepts.html#conn-drain) - DelayUntilElbConnectionsDrained *bool `type:"boolean"` - - // The time, in seconds, that AWS OpsWorks Stacks will wait after triggering - // a Shutdown event before shutting down an instance. - ExecutionTimeout *int64 `type:"integer"` -} - -// String returns the string representation -func (s ShutdownEventConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ShutdownEventConfiguration) GoString() string { - return s.String() -} - -// SetDelayUntilElbConnectionsDrained sets the DelayUntilElbConnectionsDrained field's value. -func (s *ShutdownEventConfiguration) SetDelayUntilElbConnectionsDrained(v bool) *ShutdownEventConfiguration { - s.DelayUntilElbConnectionsDrained = &v - return s -} - -// SetExecutionTimeout sets the ExecutionTimeout field's value. -func (s *ShutdownEventConfiguration) SetExecutionTimeout(v int64) *ShutdownEventConfiguration { - s.ExecutionTimeout = &v - return s -} - -// Contains the information required to retrieve an app or cookbook from a repository. -// For more information, see Creating Apps (http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html) -// or Custom Recipes and Cookbooks (http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html). -type Source struct { - _ struct{} `type:"structure"` - - // When included in a request, the parameter depends on the repository type. - // - // * For Amazon S3 bundles, set Password to the appropriate IAM secret access - // key. - // - // * For HTTP bundles and Subversion repositories, set Password to the password. - // - // For more information on how to safely handle IAM credentials, see http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html - // (http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html). - // - // In responses, AWS OpsWorks Stacks returns *****FILTERED***** instead of the - // actual value. - Password *string `type:"string"` - - // The application's version. AWS OpsWorks Stacks enables you to easily deploy - // new versions of an application. One of the simplest approaches is to have - // branches or revisions in your repository that represent different versions - // that can potentially be deployed. - Revision *string `type:"string"` - - // In requests, the repository's SSH key. - // - // In responses, AWS OpsWorks Stacks returns *****FILTERED***** instead of the - // actual value. - SshKey *string `type:"string"` - - // The repository type. - Type *string `type:"string" enum:"SourceType"` - - // The source URL. The following is an example of an Amazon S3 source URL: https://s3.amazonaws.com/opsworks-demo-bucket/opsworks_cookbook_demo.tar.gz. - Url *string `type:"string"` - - // This parameter depends on the repository type. - // - // * For Amazon S3 bundles, set Username to the appropriate IAM access key - // ID. - // - // * For HTTP bundles, Git repositories, and Subversion repositories, set - // Username to the user name. - Username *string `type:"string"` -} - -// String returns the string representation -func (s Source) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Source) GoString() string { - return s.String() -} - -// SetPassword sets the Password field's value. -func (s *Source) SetPassword(v string) *Source { - s.Password = &v - return s -} - -// SetRevision sets the Revision field's value. -func (s *Source) SetRevision(v string) *Source { - s.Revision = &v - return s -} - -// SetSshKey sets the SshKey field's value. -func (s *Source) SetSshKey(v string) *Source { - s.SshKey = &v - return s -} - -// SetType sets the Type field's value. -func (s *Source) SetType(v string) *Source { - s.Type = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *Source) SetUrl(v string) *Source { - s.Url = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *Source) SetUsername(v string) *Source { - s.Username = &v - return s -} - -// Describes an app's SSL configuration. -type SslConfiguration struct { - _ struct{} `type:"structure"` - - // The contents of the certificate's domain.crt file. - // - // Certificate is a required field - Certificate *string `type:"string" required:"true"` - - // Optional. Can be used to specify an intermediate certificate authority key - // or client authentication. - Chain *string `type:"string"` - - // The private key; the contents of the certificate's domain.kex file. - // - // PrivateKey is a required field - PrivateKey *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SslConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SslConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SslConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SslConfiguration"} - if s.Certificate == nil { - invalidParams.Add(request.NewErrParamRequired("Certificate")) - } - if s.PrivateKey == nil { - invalidParams.Add(request.NewErrParamRequired("PrivateKey")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificate sets the Certificate field's value. -func (s *SslConfiguration) SetCertificate(v string) *SslConfiguration { - s.Certificate = &v - return s -} - -// SetChain sets the Chain field's value. -func (s *SslConfiguration) SetChain(v string) *SslConfiguration { - s.Chain = &v - return s -} - -// SetPrivateKey sets the PrivateKey field's value. -func (s *SslConfiguration) SetPrivateKey(v string) *SslConfiguration { - s.PrivateKey = &v - return s -} - -// Describes a stack. -type Stack struct { - _ struct{} `type:"structure"` - - // The agent version. This parameter is set to LATEST for auto-update. or a - // version number for a fixed agent version. - AgentVersion *string `type:"string"` - - // The stack's ARN. - Arn *string `type:"string"` - - // The stack's attributes. - Attributes map[string]*string `type:"map"` - - // A ChefConfiguration object that specifies whether to enable Berkshelf and - // the Berkshelf version. For more information, see Create a New Stack (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html). - ChefConfiguration *ChefConfiguration `type:"structure"` - - // The configuration manager. - ConfigurationManager *StackConfigurationManager `type:"structure"` - - // The date when the stack was created. - CreatedAt *string `type:"string"` - - // Contains the information required to retrieve an app or cookbook from a repository. - // For more information, see Creating Apps (http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html) - // or Custom Recipes and Cookbooks (http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html). - CustomCookbooksSource *Source `type:"structure"` - - // A JSON object that contains user-defined attributes to be added to the stack - // configuration and deployment attributes. You can use custom JSON to override - // the corresponding default stack configuration attribute values or to pass - // data to recipes. The string should be in the following format: - // - // "{\"key1\": \"value1\", \"key2\": \"value2\",...}" - // - // For more information on custom JSON, see Use Custom JSON to Modify the Stack - // Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). - CustomJson *string `type:"string"` - - // The stack's default Availability Zone. For more information, see Regions - // and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html). - DefaultAvailabilityZone *string `type:"string"` - - // The ARN of an IAM profile that is the default profile for all of the stack's - // EC2 instances. For more information about IAM ARNs, see Using Identifiers - // (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html). - DefaultInstanceProfileArn *string `type:"string"` - - // The stack's default operating system. - DefaultOs *string `type:"string"` - - // The default root device type. This value is used by default for all instances - // in the stack, but you can override it when you create an instance. For more - // information, see Storage for the Root Device (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device). - DefaultRootDeviceType *string `type:"string" enum:"RootDeviceType"` - - // A default Amazon EC2 key pair for the stack's instances. You can override - // this value when you create or update an instance. - DefaultSshKeyName *string `type:"string"` - - // The default subnet ID; applicable only if the stack is running in a VPC. - DefaultSubnetId *string `type:"string"` - - // The stack host name theme, with spaces replaced by underscores. - HostnameTheme *string `type:"string"` - - // The stack name. - Name *string `type:"string"` - - // The stack AWS region, such as "ap-northeast-2". For more information about - // AWS regions, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html). - Region *string `type:"string"` - - // The stack AWS Identity and Access Management (IAM) role. - ServiceRoleArn *string `type:"string"` - - // The stack ID. - StackId *string `type:"string"` - - // Whether the stack uses custom cookbooks. - UseCustomCookbooks *bool `type:"boolean"` - - // Whether the stack automatically associates the AWS OpsWorks Stacks built-in - // security groups with the stack's layers. - UseOpsworksSecurityGroups *bool `type:"boolean"` - - // The VPC ID; applicable only if the stack is running in a VPC. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s Stack) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Stack) GoString() string { - return s.String() -} - -// SetAgentVersion sets the AgentVersion field's value. -func (s *Stack) SetAgentVersion(v string) *Stack { - s.AgentVersion = &v - return s -} - -// SetArn sets the Arn field's value. -func (s *Stack) SetArn(v string) *Stack { - s.Arn = &v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *Stack) SetAttributes(v map[string]*string) *Stack { - s.Attributes = v - return s -} - -// SetChefConfiguration sets the ChefConfiguration field's value. -func (s *Stack) SetChefConfiguration(v *ChefConfiguration) *Stack { - s.ChefConfiguration = v - return s -} - -// SetConfigurationManager sets the ConfigurationManager field's value. -func (s *Stack) SetConfigurationManager(v *StackConfigurationManager) *Stack { - s.ConfigurationManager = v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *Stack) SetCreatedAt(v string) *Stack { - s.CreatedAt = &v - return s -} - -// SetCustomCookbooksSource sets the CustomCookbooksSource field's value. -func (s *Stack) SetCustomCookbooksSource(v *Source) *Stack { - s.CustomCookbooksSource = v - return s -} - -// SetCustomJson sets the CustomJson field's value. -func (s *Stack) SetCustomJson(v string) *Stack { - s.CustomJson = &v - return s -} - -// SetDefaultAvailabilityZone sets the DefaultAvailabilityZone field's value. -func (s *Stack) SetDefaultAvailabilityZone(v string) *Stack { - s.DefaultAvailabilityZone = &v - return s -} - -// SetDefaultInstanceProfileArn sets the DefaultInstanceProfileArn field's value. -func (s *Stack) SetDefaultInstanceProfileArn(v string) *Stack { - s.DefaultInstanceProfileArn = &v - return s -} - -// SetDefaultOs sets the DefaultOs field's value. -func (s *Stack) SetDefaultOs(v string) *Stack { - s.DefaultOs = &v - return s -} - -// SetDefaultRootDeviceType sets the DefaultRootDeviceType field's value. -func (s *Stack) SetDefaultRootDeviceType(v string) *Stack { - s.DefaultRootDeviceType = &v - return s -} - -// SetDefaultSshKeyName sets the DefaultSshKeyName field's value. -func (s *Stack) SetDefaultSshKeyName(v string) *Stack { - s.DefaultSshKeyName = &v - return s -} - -// SetDefaultSubnetId sets the DefaultSubnetId field's value. -func (s *Stack) SetDefaultSubnetId(v string) *Stack { - s.DefaultSubnetId = &v - return s -} - -// SetHostnameTheme sets the HostnameTheme field's value. -func (s *Stack) SetHostnameTheme(v string) *Stack { - s.HostnameTheme = &v - return s -} - -// SetName sets the Name field's value. -func (s *Stack) SetName(v string) *Stack { - s.Name = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *Stack) SetRegion(v string) *Stack { - s.Region = &v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *Stack) SetServiceRoleArn(v string) *Stack { - s.ServiceRoleArn = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *Stack) SetStackId(v string) *Stack { - s.StackId = &v - return s -} - -// SetUseCustomCookbooks sets the UseCustomCookbooks field's value. -func (s *Stack) SetUseCustomCookbooks(v bool) *Stack { - s.UseCustomCookbooks = &v - return s -} - -// SetUseOpsworksSecurityGroups sets the UseOpsworksSecurityGroups field's value. -func (s *Stack) SetUseOpsworksSecurityGroups(v bool) *Stack { - s.UseOpsworksSecurityGroups = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *Stack) SetVpcId(v string) *Stack { - s.VpcId = &v - return s -} - -// Describes the configuration manager. -type StackConfigurationManager struct { - _ struct{} `type:"structure"` - - // The name. This parameter must be set to "Chef". - Name *string `type:"string"` - - // The Chef version. This parameter must be set to 12, 11.10, or 11.4 for Linux - // stacks, and to 12.2 for Windows stacks. The default value for Linux stacks - // is 11.4. - Version *string `type:"string"` -} - -// String returns the string representation -func (s StackConfigurationManager) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackConfigurationManager) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *StackConfigurationManager) SetName(v string) *StackConfigurationManager { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *StackConfigurationManager) SetVersion(v string) *StackConfigurationManager { - s.Version = &v - return s -} - -// Summarizes the number of layers, instances, and apps in a stack. -type StackSummary struct { - _ struct{} `type:"structure"` - - // The number of apps. - AppsCount *int64 `type:"integer"` - - // The stack's ARN. - Arn *string `type:"string"` - - // An InstancesCount object with the number of instances in each status. - InstancesCount *InstancesCount `type:"structure"` - - // The number of layers. - LayersCount *int64 `type:"integer"` - - // The stack name. - Name *string `type:"string"` - - // The stack ID. - StackId *string `type:"string"` -} - -// String returns the string representation -func (s StackSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StackSummary) GoString() string { - return s.String() -} - -// SetAppsCount sets the AppsCount field's value. -func (s *StackSummary) SetAppsCount(v int64) *StackSummary { - s.AppsCount = &v - return s -} - -// SetArn sets the Arn field's value. -func (s *StackSummary) SetArn(v string) *StackSummary { - s.Arn = &v - return s -} - -// SetInstancesCount sets the InstancesCount field's value. -func (s *StackSummary) SetInstancesCount(v *InstancesCount) *StackSummary { - s.InstancesCount = v - return s -} - -// SetLayersCount sets the LayersCount field's value. -func (s *StackSummary) SetLayersCount(v int64) *StackSummary { - s.LayersCount = &v - return s -} - -// SetName sets the Name field's value. -func (s *StackSummary) SetName(v string) *StackSummary { - s.Name = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *StackSummary) SetStackId(v string) *StackSummary { - s.StackId = &v - return s -} - -type StartInstanceInput struct { - _ struct{} `type:"structure"` - - // The instance ID. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StartInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *StartInstanceInput) SetInstanceId(v string) *StartInstanceInput { - s.InstanceId = &v - return s -} - -type StartInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StartInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartInstanceOutput) GoString() string { - return s.String() -} - -type StartStackInput struct { - _ struct{} `type:"structure"` - - // The stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StartStackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartStackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartStackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartStackInput"} - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStackId sets the StackId field's value. -func (s *StartStackInput) SetStackId(v string) *StartStackInput { - s.StackId = &v - return s -} - -type StartStackOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StartStackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartStackOutput) GoString() string { - return s.String() -} - -type StopInstanceInput struct { - _ struct{} `type:"structure"` - - // Specifies whether to force an instance to stop. - Force *bool `type:"boolean"` - - // The instance ID. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StopInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForce sets the Force field's value. -func (s *StopInstanceInput) SetForce(v bool) *StopInstanceInput { - s.Force = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *StopInstanceInput) SetInstanceId(v string) *StopInstanceInput { - s.InstanceId = &v - return s -} - -type StopInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopInstanceOutput) GoString() string { - return s.String() -} - -type StopStackInput struct { - _ struct{} `type:"structure"` - - // The stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StopStackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopStackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopStackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopStackInput"} - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStackId sets the StackId field's value. -func (s *StopStackInput) SetStackId(v string) *StopStackInput { - s.StackId = &v - return s -} - -type StopStackOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopStackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopStackOutput) GoString() string { - return s.String() -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The stack or layer's Amazon Resource Number (ARN). - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` - - // A map that contains tag keys and tag values that are attached to a stack - // or layer. - // - // * The key cannot be empty. - // - // * The key can be a maximum of 127 characters, and can contain only Unicode - // letters, numbers, or separators, or the following special characters: - // + - = . _ : / - // - // * The value can be a maximum 255 characters, and contain only Unicode - // letters, numbers, or separators, or the following special characters: - // + - = . _ : / - // - // * Leading and trailing white spaces are trimmed from both the key and - // value. - // - // * A maximum of 40 tags is allowed for any resource. - // - // Tags is a required field - Tags map[string]*string `type:"map" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v 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() -} - -// Contains the data needed by RDP clients such as the Microsoft Remote Desktop -// Connection to log in to the instance. -type TemporaryCredential struct { - _ struct{} `type:"structure"` - - // The instance's AWS OpsWorks Stacks ID. - InstanceId *string `type:"string"` - - // The password. - Password *string `type:"string"` - - // The user name. - Username *string `type:"string"` - - // The length of time (in minutes) that the grant is valid. When the grant expires, - // at the end of this period, the user will no longer be able to use the credentials - // to log in. If they are logged in at the time, they will be automatically - // logged out. - ValidForInMinutes *int64 `type:"integer"` -} - -// String returns the string representation -func (s TemporaryCredential) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TemporaryCredential) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *TemporaryCredential) SetInstanceId(v string) *TemporaryCredential { - s.InstanceId = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *TemporaryCredential) SetPassword(v string) *TemporaryCredential { - s.Password = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *TemporaryCredential) SetUsername(v string) *TemporaryCredential { - s.Username = &v - return s -} - -// SetValidForInMinutes sets the ValidForInMinutes field's value. -func (s *TemporaryCredential) SetValidForInMinutes(v int64) *TemporaryCredential { - s.ValidForInMinutes = &v - return s -} - -// Describes an instance's time-based auto scaling configuration. -type TimeBasedAutoScalingConfiguration struct { - _ struct{} `type:"structure"` - - // A WeeklyAutoScalingSchedule object with the instance schedule. - AutoScalingSchedule *WeeklyAutoScalingSchedule `type:"structure"` - - // The instance ID. - InstanceId *string `type:"string"` -} - -// String returns the string representation -func (s TimeBasedAutoScalingConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimeBasedAutoScalingConfiguration) GoString() string { - return s.String() -} - -// SetAutoScalingSchedule sets the AutoScalingSchedule field's value. -func (s *TimeBasedAutoScalingConfiguration) SetAutoScalingSchedule(v *WeeklyAutoScalingSchedule) *TimeBasedAutoScalingConfiguration { - s.AutoScalingSchedule = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *TimeBasedAutoScalingConfiguration) SetInstanceId(v string) *TimeBasedAutoScalingConfiguration { - s.InstanceId = &v - return s -} - -type UnassignInstanceInput struct { - _ struct{} `type:"structure"` - - // The instance ID. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UnassignInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnassignInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UnassignInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UnassignInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *UnassignInstanceInput) SetInstanceId(v string) *UnassignInstanceInput { - s.InstanceId = &v - return s -} - -type UnassignInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UnassignInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnassignInstanceOutput) GoString() string { - return s.String() -} - -type UnassignVolumeInput struct { - _ struct{} `type:"structure"` - - // The volume ID. - // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UnassignVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnassignVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UnassignVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UnassignVolumeInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVolumeId sets the VolumeId field's value. -func (s *UnassignVolumeInput) SetVolumeId(v string) *UnassignVolumeInput { - s.VolumeId = &v - return s -} - -type UnassignVolumeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UnassignVolumeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnassignVolumeOutput) GoString() string { - return s.String() -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The stack or layer's Amazon Resource Number (ARN). - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` - - // A list of the keys of tags to be removed from a stack or layer. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s UntagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UpdateAppInput struct { - _ struct{} `type:"structure"` - - // The app ID. - // - // AppId is a required field - AppId *string `type:"string" required:"true"` - - // A Source object that specifies the app repository. - AppSource *Source `type:"structure"` - - // One or more user-defined key/value pairs to be added to the stack attributes. - Attributes map[string]*string `type:"map"` - - // The app's data sources. - DataSources []*DataSource `type:"list"` - - // A description of the app. - Description *string `type:"string"` - - // The app's virtual host settings, with multiple domains separated by commas. - // For example: 'www.example.com, example.com' - Domains []*string `type:"list"` - - // Whether SSL is enabled for the app. - EnableSsl *bool `type:"boolean"` - - // An array of EnvironmentVariable objects that specify environment variables - // to be associated with the app. After you deploy the app, these variables - // are defined on the associated app server instances.For more information, - // see Environment Variables (http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html#workingapps-creating-environment). - // - // There is no specific limit on the number of environment variables. However, - // the size of the associated data structure - which includes the variables' - // names, values, and protected flag values - cannot exceed 10 KB (10240 Bytes). - // This limit should accommodate most if not all use cases. Exceeding it will - // cause an exception with the message, "Environment: is too large (maximum - // is 10KB)." - // - // This parameter is supported only by Chef 11.10 stacks. If you have specified - // one or more environment variables, you cannot modify the stack's Chef version. - Environment []*EnvironmentVariable `type:"list"` - - // The app name. - Name *string `type:"string"` - - // An SslConfiguration object with the SSL configuration. - SslConfiguration *SslConfiguration `type:"structure"` - - // The app type. - Type *string `type:"string" enum:"AppType"` -} - -// String returns the string representation -func (s UpdateAppInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAppInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAppInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAppInput"} - if s.AppId == nil { - invalidParams.Add(request.NewErrParamRequired("AppId")) - } - if s.Environment != nil { - for i, v := range s.Environment { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Environment", i), err.(request.ErrInvalidParams)) - } - } - } - if s.SslConfiguration != nil { - if err := s.SslConfiguration.Validate(); err != nil { - invalidParams.AddNested("SslConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAppId sets the AppId field's value. -func (s *UpdateAppInput) SetAppId(v string) *UpdateAppInput { - s.AppId = &v - return s -} - -// SetAppSource sets the AppSource field's value. -func (s *UpdateAppInput) SetAppSource(v *Source) *UpdateAppInput { - s.AppSource = v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *UpdateAppInput) SetAttributes(v map[string]*string) *UpdateAppInput { - s.Attributes = v - return s -} - -// SetDataSources sets the DataSources field's value. -func (s *UpdateAppInput) SetDataSources(v []*DataSource) *UpdateAppInput { - s.DataSources = v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateAppInput) SetDescription(v string) *UpdateAppInput { - s.Description = &v - return s -} - -// SetDomains sets the Domains field's value. -func (s *UpdateAppInput) SetDomains(v []*string) *UpdateAppInput { - s.Domains = v - return s -} - -// SetEnableSsl sets the EnableSsl field's value. -func (s *UpdateAppInput) SetEnableSsl(v bool) *UpdateAppInput { - s.EnableSsl = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *UpdateAppInput) SetEnvironment(v []*EnvironmentVariable) *UpdateAppInput { - s.Environment = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateAppInput) SetName(v string) *UpdateAppInput { - s.Name = &v - return s -} - -// SetSslConfiguration sets the SslConfiguration field's value. -func (s *UpdateAppInput) SetSslConfiguration(v *SslConfiguration) *UpdateAppInput { - s.SslConfiguration = v - return s -} - -// SetType sets the Type field's value. -func (s *UpdateAppInput) SetType(v string) *UpdateAppInput { - s.Type = &v - return s -} - -type UpdateAppOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateAppOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAppOutput) GoString() string { - return s.String() -} - -type UpdateElasticIpInput struct { - _ struct{} `type:"structure"` - - // The IP address for which you want to update the name. - // - // ElasticIp is a required field - ElasticIp *string `type:"string" required:"true"` - - // The new name. - Name *string `type:"string"` -} - -// String returns the string representation -func (s UpdateElasticIpInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateElasticIpInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateElasticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateElasticIpInput"} - if s.ElasticIp == nil { - invalidParams.Add(request.NewErrParamRequired("ElasticIp")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetElasticIp sets the ElasticIp field's value. -func (s *UpdateElasticIpInput) SetElasticIp(v string) *UpdateElasticIpInput { - s.ElasticIp = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateElasticIpInput) SetName(v string) *UpdateElasticIpInput { - s.Name = &v - return s -} - -type UpdateElasticIpOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateElasticIpOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateElasticIpOutput) GoString() string { - return s.String() -} - -type UpdateInstanceInput struct { - _ struct{} `type:"structure"` - - // The default AWS OpsWorks Stacks agent version. You have the following options: - // - // * INHERIT - Use the stack's default agent version setting. - // - // * version_number - Use the specified agent version. This value overrides - // the stack's default setting. To update the agent version, you must edit - // the instance configuration and specify a new version. AWS OpsWorks Stacks - // then automatically installs that version on the instance. - // - // The default setting is INHERIT. To specify an agent version, you must use - // the complete version number, not the abbreviated number shown on the console. - // For a list of available agent version numbers, call DescribeAgentVersions. - // - // AgentVersion cannot be set to Chef 12.2. - AgentVersion *string `type:"string"` - - // The ID of the AMI that was used to create the instance. The value of this - // parameter must be the same AMI ID that the instance is already using. You - // cannot apply a new AMI to an instance by running UpdateInstance. UpdateInstance - // does not work on instances that are using custom AMIs. - AmiId *string `type:"string"` - - // The instance architecture. Instance types do not necessarily support both - // architectures. For a list of the architectures that are supported by the - // different instance types, see Instance Families and Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html). - Architecture *string `type:"string" enum:"Architecture"` - - // For load-based or time-based instances, the type. Windows stacks can use - // only time-based instances. - AutoScalingType *string `type:"string" enum:"AutoScalingType"` - - // This property cannot be updated. - EbsOptimized *bool `type:"boolean"` - - // The instance host name. - Hostname *string `type:"string"` - - // Whether to install operating system and package updates when the instance - // boots. The default value is true. To control when updates are installed, - // set this value to false. You must then update your instances manually by - // using CreateDeployment to run the update_dependencies stack command or by - // manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. - // - // We strongly recommend using the default value of true, to ensure that your - // instances have the latest security updates. - InstallUpdatesOnBoot *bool `type:"boolean"` - - // The instance ID. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The instance type, such as t2.micro. For a list of supported instance types, - // open the stack in the console, choose Instances, and choose + Instance. The - // Size list contains the currently supported types. For more information, see - // Instance Families and Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html). - // The parameter values that you use to specify the various types are in the - // API Name column of the Available Instance Types table. - InstanceType *string `type:"string"` - - // The instance's layer IDs. - LayerIds []*string `type:"list"` - - // The instance's operating system, which must be set to one of the following. - // You cannot update an instance that is using a custom AMI. - // - // * A supported Linux operating system: An Amazon Linux version, such as - // Amazon Linux 2017.09, Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon - // Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03. - // - // * A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu - // 14.04 LTS, or Ubuntu 12.04 LTS. - // - // * CentOS Linux 7 - // - // * Red Hat Enterprise Linux 7 - // - // * A supported Windows operating system, such as Microsoft Windows Server - // 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, - // Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft - // Windows Server 2012 R2 with SQL Server Web. - // - // For more information about supported operating systems, see AWS OpsWorks - // Stacks Operating Systems (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). - // - // The default option is the current Amazon Linux version. If you set this parameter - // to Custom, you must use the AmiId parameter to specify the custom AMI that - // you want to use. For more information about supported operating systems, - // see Operating Systems (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). - // For more information about how to use custom AMIs with OpsWorks, see Using - // Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). - // - // You can specify a different Linux operating system for the updated stack, - // but you cannot change from Linux to Windows or Windows to Linux. - Os *string `type:"string"` - - // The instance's Amazon EC2 key name. - SshKeyName *string `type:"string"` -} - -// String returns the string representation -func (s UpdateInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAgentVersion sets the AgentVersion field's value. -func (s *UpdateInstanceInput) SetAgentVersion(v string) *UpdateInstanceInput { - s.AgentVersion = &v - return s -} - -// SetAmiId sets the AmiId field's value. -func (s *UpdateInstanceInput) SetAmiId(v string) *UpdateInstanceInput { - s.AmiId = &v - return s -} - -// SetArchitecture sets the Architecture field's value. -func (s *UpdateInstanceInput) SetArchitecture(v string) *UpdateInstanceInput { - s.Architecture = &v - return s -} - -// SetAutoScalingType sets the AutoScalingType field's value. -func (s *UpdateInstanceInput) SetAutoScalingType(v string) *UpdateInstanceInput { - s.AutoScalingType = &v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *UpdateInstanceInput) SetEbsOptimized(v bool) *UpdateInstanceInput { - s.EbsOptimized = &v - return s -} - -// SetHostname sets the Hostname field's value. -func (s *UpdateInstanceInput) SetHostname(v string) *UpdateInstanceInput { - s.Hostname = &v - return s -} - -// SetInstallUpdatesOnBoot sets the InstallUpdatesOnBoot field's value. -func (s *UpdateInstanceInput) SetInstallUpdatesOnBoot(v bool) *UpdateInstanceInput { - s.InstallUpdatesOnBoot = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *UpdateInstanceInput) SetInstanceId(v string) *UpdateInstanceInput { - s.InstanceId = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *UpdateInstanceInput) SetInstanceType(v string) *UpdateInstanceInput { - s.InstanceType = &v - return s -} - -// SetLayerIds sets the LayerIds field's value. -func (s *UpdateInstanceInput) SetLayerIds(v []*string) *UpdateInstanceInput { - s.LayerIds = v - return s -} - -// SetOs sets the Os field's value. -func (s *UpdateInstanceInput) SetOs(v string) *UpdateInstanceInput { - s.Os = &v - return s -} - -// SetSshKeyName sets the SshKeyName field's value. -func (s *UpdateInstanceInput) SetSshKeyName(v string) *UpdateInstanceInput { - s.SshKeyName = &v - return s -} - -type UpdateInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateInstanceOutput) GoString() string { - return s.String() -} - -type UpdateLayerInput struct { - _ struct{} `type:"structure"` - - // One or more user-defined key/value pairs to be added to the stack attributes. - Attributes map[string]*string `type:"map"` - - // Whether to automatically assign an Elastic IP address (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) - // to the layer's instances. For more information, see How to Edit a Layer (http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html). - AutoAssignElasticIps *bool `type:"boolean"` - - // For stacks that are running in a VPC, whether to automatically assign a public - // IP address to the layer's instances. For more information, see How to Edit - // a Layer (http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html). - AutoAssignPublicIps *bool `type:"boolean"` - - // Specifies CloudWatch Logs configuration options for the layer. For more information, - // see CloudWatchLogsLogStream. - CloudWatchLogsConfiguration *CloudWatchLogsConfiguration `type:"structure"` - - // The ARN of an IAM profile to be used for all of the layer's EC2 instances. - // For more information about IAM ARNs, see Using Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html). - CustomInstanceProfileArn *string `type:"string"` - - // A JSON-formatted string containing custom stack configuration and deployment - // attributes to be installed on the layer's instances. For more information, - // see Using Custom JSON (http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-json-override.html). - CustomJson *string `type:"string"` - - // A LayerCustomRecipes object that specifies the layer's custom recipes. - CustomRecipes *Recipes `type:"structure"` - - // An array containing the layer's custom security group IDs. - CustomSecurityGroupIds []*string `type:"list"` - - // Whether to disable auto healing for the layer. - EnableAutoHealing *bool `type:"boolean"` - - // Whether to install operating system and package updates when the instance - // boots. The default value is true. To control when updates are installed, - // set this value to false. You must then update your instances manually by - // using CreateDeployment to run the update_dependencies stack command or manually - // running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. - // - // We strongly recommend using the default value of true, to ensure that your - // instances have the latest security updates. - InstallUpdatesOnBoot *bool `type:"boolean"` - - // The layer ID. - // - // LayerId is a required field - LayerId *string `type:"string" required:"true"` - - // Specifies the lifecycle event configuration - LifecycleEventConfiguration *LifecycleEventConfiguration `type:"structure"` - - // The layer name, which is used by the console. - Name *string `type:"string"` - - // An array of Package objects that describe the layer's packages. - Packages []*string `type:"list"` - - // For custom layers only, use this parameter to specify the layer's short name, - // which is used internally by AWS OpsWorks Stacks and by Chef. The short name - // is also used as the name for the directory where your app files are installed. - // It can have a maximum of 200 characters and must be in the following format: - // /\A[a-z0-9\-\_\.]+\Z/. - // - // The built-in layers' short names are defined by AWS OpsWorks Stacks. For - // more information, see the Layer Reference (http://docs.aws.amazon.com/opsworks/latest/userguide/layers.html) - Shortname *string `type:"string"` - - // Whether to use Amazon EBS-optimized instances. - UseEbsOptimizedInstances *bool `type:"boolean"` - - // A VolumeConfigurations object that describes the layer's Amazon EBS volumes. - VolumeConfigurations []*VolumeConfiguration `type:"list"` -} - -// String returns the string representation -func (s UpdateLayerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateLayerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateLayerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateLayerInput"} - if s.LayerId == nil { - invalidParams.Add(request.NewErrParamRequired("LayerId")) - } - if s.VolumeConfigurations != nil { - for i, v := range s.VolumeConfigurations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "VolumeConfigurations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *UpdateLayerInput) SetAttributes(v map[string]*string) *UpdateLayerInput { - s.Attributes = v - return s -} - -// SetAutoAssignElasticIps sets the AutoAssignElasticIps field's value. -func (s *UpdateLayerInput) SetAutoAssignElasticIps(v bool) *UpdateLayerInput { - s.AutoAssignElasticIps = &v - return s -} - -// SetAutoAssignPublicIps sets the AutoAssignPublicIps field's value. -func (s *UpdateLayerInput) SetAutoAssignPublicIps(v bool) *UpdateLayerInput { - s.AutoAssignPublicIps = &v - return s -} - -// SetCloudWatchLogsConfiguration sets the CloudWatchLogsConfiguration field's value. -func (s *UpdateLayerInput) SetCloudWatchLogsConfiguration(v *CloudWatchLogsConfiguration) *UpdateLayerInput { - s.CloudWatchLogsConfiguration = v - return s -} - -// SetCustomInstanceProfileArn sets the CustomInstanceProfileArn field's value. -func (s *UpdateLayerInput) SetCustomInstanceProfileArn(v string) *UpdateLayerInput { - s.CustomInstanceProfileArn = &v - return s -} - -// SetCustomJson sets the CustomJson field's value. -func (s *UpdateLayerInput) SetCustomJson(v string) *UpdateLayerInput { - s.CustomJson = &v - return s -} - -// SetCustomRecipes sets the CustomRecipes field's value. -func (s *UpdateLayerInput) SetCustomRecipes(v *Recipes) *UpdateLayerInput { - s.CustomRecipes = v - return s -} - -// SetCustomSecurityGroupIds sets the CustomSecurityGroupIds field's value. -func (s *UpdateLayerInput) SetCustomSecurityGroupIds(v []*string) *UpdateLayerInput { - s.CustomSecurityGroupIds = v - return s -} - -// SetEnableAutoHealing sets the EnableAutoHealing field's value. -func (s *UpdateLayerInput) SetEnableAutoHealing(v bool) *UpdateLayerInput { - s.EnableAutoHealing = &v - return s -} - -// SetInstallUpdatesOnBoot sets the InstallUpdatesOnBoot field's value. -func (s *UpdateLayerInput) SetInstallUpdatesOnBoot(v bool) *UpdateLayerInput { - s.InstallUpdatesOnBoot = &v - return s -} - -// SetLayerId sets the LayerId field's value. -func (s *UpdateLayerInput) SetLayerId(v string) *UpdateLayerInput { - s.LayerId = &v - return s -} - -// SetLifecycleEventConfiguration sets the LifecycleEventConfiguration field's value. -func (s *UpdateLayerInput) SetLifecycleEventConfiguration(v *LifecycleEventConfiguration) *UpdateLayerInput { - s.LifecycleEventConfiguration = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateLayerInput) SetName(v string) *UpdateLayerInput { - s.Name = &v - return s -} - -// SetPackages sets the Packages field's value. -func (s *UpdateLayerInput) SetPackages(v []*string) *UpdateLayerInput { - s.Packages = v - return s -} - -// SetShortname sets the Shortname field's value. -func (s *UpdateLayerInput) SetShortname(v string) *UpdateLayerInput { - s.Shortname = &v - return s -} - -// SetUseEbsOptimizedInstances sets the UseEbsOptimizedInstances field's value. -func (s *UpdateLayerInput) SetUseEbsOptimizedInstances(v bool) *UpdateLayerInput { - s.UseEbsOptimizedInstances = &v - return s -} - -// SetVolumeConfigurations sets the VolumeConfigurations field's value. -func (s *UpdateLayerInput) SetVolumeConfigurations(v []*VolumeConfiguration) *UpdateLayerInput { - s.VolumeConfigurations = v - return s -} - -type UpdateLayerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateLayerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateLayerOutput) GoString() string { - return s.String() -} - -type UpdateMyUserProfileInput struct { - _ struct{} `type:"structure"` - - // The user's SSH public key. - SshPublicKey *string `type:"string"` -} - -// String returns the string representation -func (s UpdateMyUserProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateMyUserProfileInput) GoString() string { - return s.String() -} - -// SetSshPublicKey sets the SshPublicKey field's value. -func (s *UpdateMyUserProfileInput) SetSshPublicKey(v string) *UpdateMyUserProfileInput { - s.SshPublicKey = &v - return s -} - -type UpdateMyUserProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateMyUserProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateMyUserProfileOutput) GoString() string { - return s.String() -} - -type UpdateRdsDbInstanceInput struct { - _ struct{} `type:"structure"` - - // The database password. - DbPassword *string `type:"string"` - - // The master user name. - DbUser *string `type:"string"` - - // The Amazon RDS instance's ARN. - // - // RdsDbInstanceArn is a required field - RdsDbInstanceArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateRdsDbInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRdsDbInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRdsDbInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRdsDbInstanceInput"} - if s.RdsDbInstanceArn == nil { - invalidParams.Add(request.NewErrParamRequired("RdsDbInstanceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDbPassword sets the DbPassword field's value. -func (s *UpdateRdsDbInstanceInput) SetDbPassword(v string) *UpdateRdsDbInstanceInput { - s.DbPassword = &v - return s -} - -// SetDbUser sets the DbUser field's value. -func (s *UpdateRdsDbInstanceInput) SetDbUser(v string) *UpdateRdsDbInstanceInput { - s.DbUser = &v - return s -} - -// SetRdsDbInstanceArn sets the RdsDbInstanceArn field's value. -func (s *UpdateRdsDbInstanceInput) SetRdsDbInstanceArn(v string) *UpdateRdsDbInstanceInput { - s.RdsDbInstanceArn = &v - return s -} - -type UpdateRdsDbInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateRdsDbInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRdsDbInstanceOutput) GoString() string { - return s.String() -} - -type UpdateStackInput struct { - _ struct{} `type:"structure"` - - // The default AWS OpsWorks Stacks agent version. You have the following options: - // - // * Auto-update - Set this parameter to LATEST. AWS OpsWorks Stacks automatically - // installs new agent versions on the stack's instances as soon as they are - // available. - // - // * Fixed version - Set this parameter to your preferred agent version. - // To update the agent version, you must edit the stack configuration and - // specify a new version. AWS OpsWorks Stacks then automatically installs - // that version on the stack's instances. - // - // The default setting is LATEST. To specify an agent version, you must use - // the complete version number, not the abbreviated number shown on the console. - // For a list of available agent version numbers, call DescribeAgentVersions. - // AgentVersion cannot be set to Chef 12.2. - // - // You can also specify an agent version when you create or update an instance, - // which overrides the stack's default setting. - AgentVersion *string `type:"string"` - - // One or more user-defined key-value pairs to be added to the stack attributes. - Attributes map[string]*string `type:"map"` - - // A ChefConfiguration object that specifies whether to enable Berkshelf and - // the Berkshelf version on Chef 11.10 stacks. For more information, see Create - // a New Stack (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html). - ChefConfiguration *ChefConfiguration `type:"structure"` - - // The configuration manager. When you update a stack, we recommend that you - // use the configuration manager to specify the Chef version: 12, 11.10, or - // 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for - // Linux stacks is currently 12. - ConfigurationManager *StackConfigurationManager `type:"structure"` - - // Contains the information required to retrieve an app or cookbook from a repository. - // For more information, see Creating Apps (http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html) - // or Custom Recipes and Cookbooks (http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html). - CustomCookbooksSource *Source `type:"structure"` - - // A string that contains user-defined, custom JSON. It can be used to override - // the corresponding default stack configuration JSON values or to pass data - // to recipes. The string should be in the following format: - // - // "{\"key1\": \"value1\", \"key2\": \"value2\",...}" - // - // For more information about custom JSON, see Use Custom JSON to Modify the - // Stack Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). - CustomJson *string `type:"string"` - - // The stack's default Availability Zone, which must be in the stack's region. - // For more information, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html). - // If you also specify a value for DefaultSubnetId, the subnet must be in the - // same zone. For more information, see CreateStack. - DefaultAvailabilityZone *string `type:"string"` - - // The ARN of an IAM profile that is the default profile for all of the stack's - // EC2 instances. For more information about IAM ARNs, see Using Identifiers - // (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html). - DefaultInstanceProfileArn *string `type:"string"` - - // The stack's operating system, which must be set to one of the following: - // - // * A supported Linux operating system: An Amazon Linux version, such as - // Amazon Linux 2017.09, Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon - // Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03. - // - // * A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu - // 14.04 LTS, or Ubuntu 12.04 LTS. - // - // * CentOS Linux 7 - // - // * Red Hat Enterprise Linux 7 - // - // * A supported Windows operating system, such as Microsoft Windows Server - // 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, - // Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft - // Windows Server 2012 R2 with SQL Server Web. - // - // * A custom AMI: Custom. You specify the custom AMI you want to use when - // you create instances. For more information about how to use custom AMIs - // with OpsWorks, see Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). - // - // The default option is the stack's current operating system. For more information - // about supported operating systems, see AWS OpsWorks Stacks Operating Systems - // (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). - DefaultOs *string `type:"string"` - - // The default root device type. This value is used by default for all instances - // in the stack, but you can override it when you create an instance. For more - // information, see Storage for the Root Device (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device). - DefaultRootDeviceType *string `type:"string" enum:"RootDeviceType"` - - // A default Amazon EC2 key-pair name. The default value is none. If you specify - // a key-pair name, AWS OpsWorks Stacks installs the public key on the instance - // and you can use the private key with an SSH client to log in to the instance. - // For more information, see Using SSH to Communicate with an Instance (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-ssh.html) - // and Managing SSH Access (http://docs.aws.amazon.com/opsworks/latest/userguide/security-ssh-access.html). - // You can override this setting by specifying a different key pair, or no key - // pair, when you create an instance (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-add.html). - DefaultSshKeyName *string `type:"string"` - - // The stack's default VPC subnet ID. This parameter is required if you specify - // a value for the VpcId parameter. All instances are launched into this subnet - // unless you specify otherwise when you create the instance. If you also specify - // a value for DefaultAvailabilityZone, the subnet must be in that zone. For - // information on default values and when this parameter is required, see the - // VpcId parameter description. - DefaultSubnetId *string `type:"string"` - - // The stack's new host name theme, with spaces replaced by underscores. The - // theme is used to generate host names for the stack's instances. By default, - // HostnameTheme is set to Layer_Dependent, which creates host names by appending - // integers to the layer's short name. The other themes are: - // - // * Baked_Goods - // - // * Clouds - // - // * Europe_Cities - // - // * Fruits - // - // * Greek_Deities - // - // * Legendary_creatures_from_Japan - // - // * Planets_and_Moons - // - // * Roman_Deities - // - // * Scottish_Islands - // - // * US_Cities - // - // * Wild_Cats - // - // To obtain a generated host name, call GetHostNameSuggestion, which returns - // a host name based on the current theme. - HostnameTheme *string `type:"string"` - - // The stack's new name. - Name *string `type:"string"` - - // Do not use this parameter. You cannot update a stack's service role. - ServiceRoleArn *string `type:"string"` - - // The stack ID. - // - // StackId is a required field - StackId *string `type:"string" required:"true"` - - // Whether the stack uses custom cookbooks. - UseCustomCookbooks *bool `type:"boolean"` - - // Whether to associate the AWS OpsWorks Stacks built-in security groups with - // the stack's layers. - // - // AWS OpsWorks Stacks provides a standard set of built-in security groups, - // one for each layer, which are associated with layers by default. UseOpsworksSecurityGroups - // allows you to provide your own custom security groups instead of using the - // built-in groups. UseOpsworksSecurityGroups has the following settings: - // - // * True - AWS OpsWorks Stacks automatically associates the appropriate - // built-in security group with each layer (default setting). You can associate - // additional security groups with a layer after you create it, but you cannot - // delete the built-in security group. - // - // * False - AWS OpsWorks Stacks does not associate built-in security groups - // with layers. You must create appropriate EC2 security groups and associate - // a security group with each layer that you create. However, you can still - // manually associate a built-in security group with a layer on. Custom security - // groups are required only for those layers that need custom settings. - // - // For more information, see Create a New Stack (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html). - UseOpsworksSecurityGroups *bool `type:"boolean"` -} - -// String returns the string representation -func (s UpdateStackInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStackInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateStackInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateStackInput"} - if s.StackId == nil { - invalidParams.Add(request.NewErrParamRequired("StackId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAgentVersion sets the AgentVersion field's value. -func (s *UpdateStackInput) SetAgentVersion(v string) *UpdateStackInput { - s.AgentVersion = &v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *UpdateStackInput) SetAttributes(v map[string]*string) *UpdateStackInput { - s.Attributes = v - return s -} - -// SetChefConfiguration sets the ChefConfiguration field's value. -func (s *UpdateStackInput) SetChefConfiguration(v *ChefConfiguration) *UpdateStackInput { - s.ChefConfiguration = v - return s -} - -// SetConfigurationManager sets the ConfigurationManager field's value. -func (s *UpdateStackInput) SetConfigurationManager(v *StackConfigurationManager) *UpdateStackInput { - s.ConfigurationManager = v - return s -} - -// SetCustomCookbooksSource sets the CustomCookbooksSource field's value. -func (s *UpdateStackInput) SetCustomCookbooksSource(v *Source) *UpdateStackInput { - s.CustomCookbooksSource = v - return s -} - -// SetCustomJson sets the CustomJson field's value. -func (s *UpdateStackInput) SetCustomJson(v string) *UpdateStackInput { - s.CustomJson = &v - return s -} - -// SetDefaultAvailabilityZone sets the DefaultAvailabilityZone field's value. -func (s *UpdateStackInput) SetDefaultAvailabilityZone(v string) *UpdateStackInput { - s.DefaultAvailabilityZone = &v - return s -} - -// SetDefaultInstanceProfileArn sets the DefaultInstanceProfileArn field's value. -func (s *UpdateStackInput) SetDefaultInstanceProfileArn(v string) *UpdateStackInput { - s.DefaultInstanceProfileArn = &v - return s -} - -// SetDefaultOs sets the DefaultOs field's value. -func (s *UpdateStackInput) SetDefaultOs(v string) *UpdateStackInput { - s.DefaultOs = &v - return s -} - -// SetDefaultRootDeviceType sets the DefaultRootDeviceType field's value. -func (s *UpdateStackInput) SetDefaultRootDeviceType(v string) *UpdateStackInput { - s.DefaultRootDeviceType = &v - return s -} - -// SetDefaultSshKeyName sets the DefaultSshKeyName field's value. -func (s *UpdateStackInput) SetDefaultSshKeyName(v string) *UpdateStackInput { - s.DefaultSshKeyName = &v - return s -} - -// SetDefaultSubnetId sets the DefaultSubnetId field's value. -func (s *UpdateStackInput) SetDefaultSubnetId(v string) *UpdateStackInput { - s.DefaultSubnetId = &v - return s -} - -// SetHostnameTheme sets the HostnameTheme field's value. -func (s *UpdateStackInput) SetHostnameTheme(v string) *UpdateStackInput { - s.HostnameTheme = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateStackInput) SetName(v string) *UpdateStackInput { - s.Name = &v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *UpdateStackInput) SetServiceRoleArn(v string) *UpdateStackInput { - s.ServiceRoleArn = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *UpdateStackInput) SetStackId(v string) *UpdateStackInput { - s.StackId = &v - return s -} - -// SetUseCustomCookbooks sets the UseCustomCookbooks field's value. -func (s *UpdateStackInput) SetUseCustomCookbooks(v bool) *UpdateStackInput { - s.UseCustomCookbooks = &v - return s -} - -// SetUseOpsworksSecurityGroups sets the UseOpsworksSecurityGroups field's value. -func (s *UpdateStackInput) SetUseOpsworksSecurityGroups(v bool) *UpdateStackInput { - s.UseOpsworksSecurityGroups = &v - return s -} - -type UpdateStackOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateStackOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStackOutput) GoString() string { - return s.String() -} - -type UpdateUserProfileInput struct { - _ struct{} `type:"structure"` - - // Whether users can specify their own SSH public key through the My Settings - // page. For more information, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html). - AllowSelfManagement *bool `type:"boolean"` - - // The user IAM ARN. This can also be a federated user's ARN. - // - // IamUserArn is a required field - IamUserArn *string `type:"string" required:"true"` - - // The user's new SSH public key. - SshPublicKey *string `type:"string"` - - // The user's SSH user name. The allowable characters are [a-z], [A-Z], [0-9], - // '-', and '_'. If the specified name includes other punctuation marks, AWS - // OpsWorks Stacks removes them. For example, my.name will be changed to myname. - // If you do not specify an SSH user name, AWS OpsWorks Stacks generates one - // from the IAM user name. - SshUsername *string `type:"string"` -} - -// String returns the string representation -func (s UpdateUserProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateUserProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateUserProfileInput"} - if s.IamUserArn == nil { - invalidParams.Add(request.NewErrParamRequired("IamUserArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowSelfManagement sets the AllowSelfManagement field's value. -func (s *UpdateUserProfileInput) SetAllowSelfManagement(v bool) *UpdateUserProfileInput { - s.AllowSelfManagement = &v - return s -} - -// SetIamUserArn sets the IamUserArn field's value. -func (s *UpdateUserProfileInput) SetIamUserArn(v string) *UpdateUserProfileInput { - s.IamUserArn = &v - return s -} - -// SetSshPublicKey sets the SshPublicKey field's value. -func (s *UpdateUserProfileInput) SetSshPublicKey(v string) *UpdateUserProfileInput { - s.SshPublicKey = &v - return s -} - -// SetSshUsername sets the SshUsername field's value. -func (s *UpdateUserProfileInput) SetSshUsername(v string) *UpdateUserProfileInput { - s.SshUsername = &v - return s -} - -type UpdateUserProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateUserProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserProfileOutput) GoString() string { - return s.String() -} - -type UpdateVolumeInput struct { - _ struct{} `type:"structure"` - - // The new mount point. - MountPoint *string `type:"string"` - - // The new name. - Name *string `type:"string"` - - // The volume ID. - // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateVolumeInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMountPoint sets the MountPoint field's value. -func (s *UpdateVolumeInput) SetMountPoint(v string) *UpdateVolumeInput { - s.MountPoint = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateVolumeInput) SetName(v string) *UpdateVolumeInput { - s.Name = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *UpdateVolumeInput) SetVolumeId(v string) *UpdateVolumeInput { - s.VolumeId = &v - return s -} - -type UpdateVolumeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateVolumeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVolumeOutput) GoString() string { - return s.String() -} - -// Describes a user's SSH information. -type UserProfile struct { - _ struct{} `type:"structure"` - - // Whether users can specify their own SSH public key through the My Settings - // page. For more information, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html). - AllowSelfManagement *bool `type:"boolean"` - - // The user's IAM ARN. - IamUserArn *string `type:"string"` - - // The user's name. - Name *string `type:"string"` - - // The user's SSH public key. - SshPublicKey *string `type:"string"` - - // The user's SSH user name. - SshUsername *string `type:"string"` -} - -// String returns the string representation -func (s UserProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserProfile) GoString() string { - return s.String() -} - -// SetAllowSelfManagement sets the AllowSelfManagement field's value. -func (s *UserProfile) SetAllowSelfManagement(v bool) *UserProfile { - s.AllowSelfManagement = &v - return s -} - -// SetIamUserArn sets the IamUserArn field's value. -func (s *UserProfile) SetIamUserArn(v string) *UserProfile { - s.IamUserArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *UserProfile) SetName(v string) *UserProfile { - s.Name = &v - return s -} - -// SetSshPublicKey sets the SshPublicKey field's value. -func (s *UserProfile) SetSshPublicKey(v string) *UserProfile { - s.SshPublicKey = &v - return s -} - -// SetSshUsername sets the SshUsername field's value. -func (s *UserProfile) SetSshUsername(v string) *UserProfile { - s.SshUsername = &v - return s -} - -// Describes an instance's Amazon EBS volume. -type Volume struct { - _ struct{} `type:"structure"` - - // The volume Availability Zone. For more information, see Regions and Endpoints - // (http://docs.aws.amazon.com/general/latest/gr/rande.html). - AvailabilityZone *string `type:"string"` - - // The device name. - Device *string `type:"string"` - - // The Amazon EC2 volume ID. - Ec2VolumeId *string `type:"string"` - - // Specifies whether an Amazon EBS volume is encrypted. For more information, - // see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html). - Encrypted *bool `type:"boolean"` - - // The instance ID. - InstanceId *string `type:"string"` - - // For PIOPS volumes, the IOPS per disk. - Iops *int64 `type:"integer"` - - // The volume mount point. For example, "/mnt/disk1". - MountPoint *string `type:"string"` - - // The volume name. - Name *string `type:"string"` - - // The RAID array ID. - RaidArrayId *string `type:"string"` - - // The AWS region. For more information about AWS regions, see Regions and Endpoints - // (http://docs.aws.amazon.com/general/latest/gr/rande.html). - Region *string `type:"string"` - - // The volume size. - Size *int64 `type:"integer"` - - // The value returned by DescribeVolumes (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeVolumes.html). - Status *string `type:"string"` - - // The volume ID. - VolumeId *string `type:"string"` - - // The volume type. For more information, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). - // - // * standard - Magnetic. Magnetic volumes must have a minimum size of 1 - // GiB and a maximum size of 1024 GiB. - // - // * io1 - Provisioned IOPS (SSD). PIOPS volumes must have a minimum size - // of 4 GiB and a maximum size of 16384 GiB. - // - // * gp2 - General Purpose (SSD). General purpose volumes must have a minimum - // size of 1 GiB and a maximum size of 16384 GiB. - // - // * st1 - Throughput Optimized hard disk drive (HDD). Throughput optimized - // HDD volumes must have a minimum size of 500 GiB and a maximum size of - // 16384 GiB. - // - // * sc1 - Cold HDD. Cold HDD volumes must have a minimum size of 500 GiB - // and a maximum size of 16384 GiB. - VolumeType *string `type:"string"` -} - -// String returns the string representation -func (s Volume) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Volume) GoString() string { - return s.String() -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Volume) SetAvailabilityZone(v string) *Volume { - s.AvailabilityZone = &v - return s -} - -// SetDevice sets the Device field's value. -func (s *Volume) SetDevice(v string) *Volume { - s.Device = &v - return s -} - -// SetEc2VolumeId sets the Ec2VolumeId field's value. -func (s *Volume) SetEc2VolumeId(v string) *Volume { - s.Ec2VolumeId = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *Volume) SetEncrypted(v bool) *Volume { - s.Encrypted = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *Volume) SetInstanceId(v string) *Volume { - s.InstanceId = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *Volume) SetIops(v int64) *Volume { - s.Iops = &v - return s -} - -// SetMountPoint sets the MountPoint field's value. -func (s *Volume) SetMountPoint(v string) *Volume { - s.MountPoint = &v - return s -} - -// SetName sets the Name field's value. -func (s *Volume) SetName(v string) *Volume { - s.Name = &v - return s -} - -// SetRaidArrayId sets the RaidArrayId field's value. -func (s *Volume) SetRaidArrayId(v string) *Volume { - s.RaidArrayId = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *Volume) SetRegion(v string) *Volume { - s.Region = &v - return s -} - -// SetSize sets the Size field's value. -func (s *Volume) SetSize(v int64) *Volume { - s.Size = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Volume) SetStatus(v string) *Volume { - s.Status = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *Volume) SetVolumeId(v string) *Volume { - s.VolumeId = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *Volume) SetVolumeType(v string) *Volume { - s.VolumeType = &v - return s -} - -// Describes an Amazon EBS volume configuration. -type VolumeConfiguration struct { - _ struct{} `type:"structure"` - - // Specifies whether an Amazon EBS volume is encrypted. For more information, - // see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html). - Encrypted *bool `type:"boolean"` - - // For PIOPS volumes, the IOPS per disk. - Iops *int64 `type:"integer"` - - // The volume mount point. For example "/dev/sdh". - // - // MountPoint is a required field - MountPoint *string `type:"string" required:"true"` - - // The number of disks in the volume. - // - // NumberOfDisks is a required field - NumberOfDisks *int64 `type:"integer" required:"true"` - - // The volume RAID level (http://en.wikipedia.org/wiki/Standard_RAID_levels). - RaidLevel *int64 `type:"integer"` - - // The volume size. - // - // Size is a required field - Size *int64 `type:"integer" required:"true"` - - // The volume type. For more information, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). - // - // * standard - Magnetic. Magnetic volumes must have a minimum size of 1 - // GiB and a maximum size of 1024 GiB. - // - // * io1 - Provisioned IOPS (SSD). PIOPS volumes must have a minimum size - // of 4 GiB and a maximum size of 16384 GiB. - // - // * gp2 - General Purpose (SSD). General purpose volumes must have a minimum - // size of 1 GiB and a maximum size of 16384 GiB. - // - // * st1 - Throughput Optimized hard disk drive (HDD). Throughput optimized - // HDD volumes must have a minimum size of 500 GiB and a maximum size of - // 16384 GiB. - // - // * sc1 - Cold HDD. Cold HDD volumes must have a minimum size of 500 GiB - // and a maximum size of 16384 GiB. - VolumeType *string `type:"string"` -} - -// String returns the string representation -func (s VolumeConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VolumeConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VolumeConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VolumeConfiguration"} - if s.MountPoint == nil { - invalidParams.Add(request.NewErrParamRequired("MountPoint")) - } - if s.NumberOfDisks == nil { - invalidParams.Add(request.NewErrParamRequired("NumberOfDisks")) - } - if s.Size == nil { - invalidParams.Add(request.NewErrParamRequired("Size")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncrypted sets the Encrypted field's value. -func (s *VolumeConfiguration) SetEncrypted(v bool) *VolumeConfiguration { - s.Encrypted = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *VolumeConfiguration) SetIops(v int64) *VolumeConfiguration { - s.Iops = &v - return s -} - -// SetMountPoint sets the MountPoint field's value. -func (s *VolumeConfiguration) SetMountPoint(v string) *VolumeConfiguration { - s.MountPoint = &v - return s -} - -// SetNumberOfDisks sets the NumberOfDisks field's value. -func (s *VolumeConfiguration) SetNumberOfDisks(v int64) *VolumeConfiguration { - s.NumberOfDisks = &v - return s -} - -// SetRaidLevel sets the RaidLevel field's value. -func (s *VolumeConfiguration) SetRaidLevel(v int64) *VolumeConfiguration { - s.RaidLevel = &v - return s -} - -// SetSize sets the Size field's value. -func (s *VolumeConfiguration) SetSize(v int64) *VolumeConfiguration { - s.Size = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *VolumeConfiguration) SetVolumeType(v string) *VolumeConfiguration { - s.VolumeType = &v - return s -} - -// Describes a time-based instance's auto scaling schedule. The schedule consists -// of a set of key-value pairs. -// -// * The key is the time period (a UTC hour) and must be an integer from -// 0 - 23. -// -// * The value indicates whether the instance should be online or offline -// for the specified period, and must be set to "on" or "off" -// -// The default setting for all time periods is off, so you use the following -// parameters primarily to specify the online periods. You don't have to explicitly -// specify offline periods unless you want to change an online period to an -// offline period. -// -// The following example specifies that the instance should be online for four -// hours, from UTC 1200 - 1600. It will be off for the remainder of the day. -// -// { "12":"on", "13":"on", "14":"on", "15":"on" } -type WeeklyAutoScalingSchedule struct { - _ struct{} `type:"structure"` - - // The schedule for Friday. - Friday map[string]*string `type:"map"` - - // The schedule for Monday. - Monday map[string]*string `type:"map"` - - // The schedule for Saturday. - Saturday map[string]*string `type:"map"` - - // The schedule for Sunday. - Sunday map[string]*string `type:"map"` - - // The schedule for Thursday. - Thursday map[string]*string `type:"map"` - - // The schedule for Tuesday. - Tuesday map[string]*string `type:"map"` - - // The schedule for Wednesday. - Wednesday map[string]*string `type:"map"` -} - -// String returns the string representation -func (s WeeklyAutoScalingSchedule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WeeklyAutoScalingSchedule) GoString() string { - return s.String() -} - -// SetFriday sets the Friday field's value. -func (s *WeeklyAutoScalingSchedule) SetFriday(v map[string]*string) *WeeklyAutoScalingSchedule { - s.Friday = v - return s -} - -// SetMonday sets the Monday field's value. -func (s *WeeklyAutoScalingSchedule) SetMonday(v map[string]*string) *WeeklyAutoScalingSchedule { - s.Monday = v - return s -} - -// SetSaturday sets the Saturday field's value. -func (s *WeeklyAutoScalingSchedule) SetSaturday(v map[string]*string) *WeeklyAutoScalingSchedule { - s.Saturday = v - return s -} - -// SetSunday sets the Sunday field's value. -func (s *WeeklyAutoScalingSchedule) SetSunday(v map[string]*string) *WeeklyAutoScalingSchedule { - s.Sunday = v - return s -} - -// SetThursday sets the Thursday field's value. -func (s *WeeklyAutoScalingSchedule) SetThursday(v map[string]*string) *WeeklyAutoScalingSchedule { - s.Thursday = v - return s -} - -// SetTuesday sets the Tuesday field's value. -func (s *WeeklyAutoScalingSchedule) SetTuesday(v map[string]*string) *WeeklyAutoScalingSchedule { - s.Tuesday = v - return s -} - -// SetWednesday sets the Wednesday field's value. -func (s *WeeklyAutoScalingSchedule) SetWednesday(v map[string]*string) *WeeklyAutoScalingSchedule { - s.Wednesday = v - return s -} - -const ( - // AppAttributesKeysDocumentRoot is a AppAttributesKeys enum value - AppAttributesKeysDocumentRoot = "DocumentRoot" - - // AppAttributesKeysRailsEnv is a AppAttributesKeys enum value - AppAttributesKeysRailsEnv = "RailsEnv" - - // AppAttributesKeysAutoBundleOnDeploy is a AppAttributesKeys enum value - AppAttributesKeysAutoBundleOnDeploy = "AutoBundleOnDeploy" - - // AppAttributesKeysAwsFlowRubySettings is a AppAttributesKeys enum value - AppAttributesKeysAwsFlowRubySettings = "AwsFlowRubySettings" -) - -const ( - // AppTypeAwsFlowRuby is a AppType enum value - AppTypeAwsFlowRuby = "aws-flow-ruby" - - // AppTypeJava is a AppType enum value - AppTypeJava = "java" - - // AppTypeRails is a AppType enum value - AppTypeRails = "rails" - - // AppTypePhp is a AppType enum value - AppTypePhp = "php" - - // AppTypeNodejs is a AppType enum value - AppTypeNodejs = "nodejs" - - // AppTypeStatic is a AppType enum value - AppTypeStatic = "static" - - // AppTypeOther is a AppType enum value - AppTypeOther = "other" -) - -const ( - // ArchitectureX8664 is a Architecture enum value - ArchitectureX8664 = "x86_64" - - // ArchitectureI386 is a Architecture enum value - ArchitectureI386 = "i386" -) - -const ( - // AutoScalingTypeLoad is a AutoScalingType enum value - AutoScalingTypeLoad = "load" - - // AutoScalingTypeTimer is a AutoScalingType enum value - AutoScalingTypeTimer = "timer" -) - -// Specifies the encoding of the log file so that the file can be read correctly. -// The default is utf_8. Encodings supported by Python codecs.decode() can be -// used here. -const ( - // CloudWatchLogsEncodingAscii is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingAscii = "ascii" - - // CloudWatchLogsEncodingBig5 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingBig5 = "big5" - - // CloudWatchLogsEncodingBig5hkscs is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingBig5hkscs = "big5hkscs" - - // CloudWatchLogsEncodingCp037 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp037 = "cp037" - - // CloudWatchLogsEncodingCp424 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp424 = "cp424" - - // CloudWatchLogsEncodingCp437 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp437 = "cp437" - - // CloudWatchLogsEncodingCp500 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp500 = "cp500" - - // CloudWatchLogsEncodingCp720 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp720 = "cp720" - - // CloudWatchLogsEncodingCp737 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp737 = "cp737" - - // CloudWatchLogsEncodingCp775 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp775 = "cp775" - - // CloudWatchLogsEncodingCp850 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp850 = "cp850" - - // CloudWatchLogsEncodingCp852 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp852 = "cp852" - - // CloudWatchLogsEncodingCp855 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp855 = "cp855" - - // CloudWatchLogsEncodingCp856 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp856 = "cp856" - - // CloudWatchLogsEncodingCp857 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp857 = "cp857" - - // CloudWatchLogsEncodingCp858 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp858 = "cp858" - - // CloudWatchLogsEncodingCp860 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp860 = "cp860" - - // CloudWatchLogsEncodingCp861 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp861 = "cp861" - - // CloudWatchLogsEncodingCp862 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp862 = "cp862" - - // CloudWatchLogsEncodingCp863 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp863 = "cp863" - - // CloudWatchLogsEncodingCp864 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp864 = "cp864" - - // CloudWatchLogsEncodingCp865 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp865 = "cp865" - - // CloudWatchLogsEncodingCp866 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp866 = "cp866" - - // CloudWatchLogsEncodingCp869 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp869 = "cp869" - - // CloudWatchLogsEncodingCp874 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp874 = "cp874" - - // CloudWatchLogsEncodingCp875 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp875 = "cp875" - - // CloudWatchLogsEncodingCp932 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp932 = "cp932" - - // CloudWatchLogsEncodingCp949 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp949 = "cp949" - - // CloudWatchLogsEncodingCp950 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp950 = "cp950" - - // CloudWatchLogsEncodingCp1006 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp1006 = "cp1006" - - // CloudWatchLogsEncodingCp1026 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp1026 = "cp1026" - - // CloudWatchLogsEncodingCp1140 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp1140 = "cp1140" - - // CloudWatchLogsEncodingCp1250 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp1250 = "cp1250" - - // CloudWatchLogsEncodingCp1251 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp1251 = "cp1251" - - // CloudWatchLogsEncodingCp1252 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp1252 = "cp1252" - - // CloudWatchLogsEncodingCp1253 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp1253 = "cp1253" - - // CloudWatchLogsEncodingCp1254 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp1254 = "cp1254" - - // CloudWatchLogsEncodingCp1255 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp1255 = "cp1255" - - // CloudWatchLogsEncodingCp1256 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp1256 = "cp1256" - - // CloudWatchLogsEncodingCp1257 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp1257 = "cp1257" - - // CloudWatchLogsEncodingCp1258 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingCp1258 = "cp1258" - - // CloudWatchLogsEncodingEucJp is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingEucJp = "euc_jp" - - // CloudWatchLogsEncodingEucJis2004 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingEucJis2004 = "euc_jis_2004" - - // CloudWatchLogsEncodingEucJisx0213 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingEucJisx0213 = "euc_jisx0213" - - // CloudWatchLogsEncodingEucKr is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingEucKr = "euc_kr" - - // CloudWatchLogsEncodingGb2312 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingGb2312 = "gb2312" - - // CloudWatchLogsEncodingGbk is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingGbk = "gbk" - - // CloudWatchLogsEncodingGb18030 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingGb18030 = "gb18030" - - // CloudWatchLogsEncodingHz is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingHz = "hz" - - // CloudWatchLogsEncodingIso2022Jp is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso2022Jp = "iso2022_jp" - - // CloudWatchLogsEncodingIso2022Jp1 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso2022Jp1 = "iso2022_jp_1" - - // CloudWatchLogsEncodingIso2022Jp2 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso2022Jp2 = "iso2022_jp_2" - - // CloudWatchLogsEncodingIso2022Jp2004 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso2022Jp2004 = "iso2022_jp_2004" - - // CloudWatchLogsEncodingIso2022Jp3 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso2022Jp3 = "iso2022_jp_3" - - // CloudWatchLogsEncodingIso2022JpExt is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso2022JpExt = "iso2022_jp_ext" - - // CloudWatchLogsEncodingIso2022Kr is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso2022Kr = "iso2022_kr" - - // CloudWatchLogsEncodingLatin1 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingLatin1 = "latin_1" - - // CloudWatchLogsEncodingIso88592 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso88592 = "iso8859_2" - - // CloudWatchLogsEncodingIso88593 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso88593 = "iso8859_3" - - // CloudWatchLogsEncodingIso88594 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso88594 = "iso8859_4" - - // CloudWatchLogsEncodingIso88595 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso88595 = "iso8859_5" - - // CloudWatchLogsEncodingIso88596 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso88596 = "iso8859_6" - - // CloudWatchLogsEncodingIso88597 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso88597 = "iso8859_7" - - // CloudWatchLogsEncodingIso88598 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso88598 = "iso8859_8" - - // CloudWatchLogsEncodingIso88599 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso88599 = "iso8859_9" - - // CloudWatchLogsEncodingIso885910 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso885910 = "iso8859_10" - - // CloudWatchLogsEncodingIso885913 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso885913 = "iso8859_13" - - // CloudWatchLogsEncodingIso885914 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso885914 = "iso8859_14" - - // CloudWatchLogsEncodingIso885915 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso885915 = "iso8859_15" - - // CloudWatchLogsEncodingIso885916 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingIso885916 = "iso8859_16" - - // CloudWatchLogsEncodingJohab is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingJohab = "johab" - - // CloudWatchLogsEncodingKoi8R is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingKoi8R = "koi8_r" - - // CloudWatchLogsEncodingKoi8U is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingKoi8U = "koi8_u" - - // CloudWatchLogsEncodingMacCyrillic is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingMacCyrillic = "mac_cyrillic" - - // CloudWatchLogsEncodingMacGreek is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingMacGreek = "mac_greek" - - // CloudWatchLogsEncodingMacIceland is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingMacIceland = "mac_iceland" - - // CloudWatchLogsEncodingMacLatin2 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingMacLatin2 = "mac_latin2" - - // CloudWatchLogsEncodingMacRoman is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingMacRoman = "mac_roman" - - // CloudWatchLogsEncodingMacTurkish is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingMacTurkish = "mac_turkish" - - // CloudWatchLogsEncodingPtcp154 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingPtcp154 = "ptcp154" - - // CloudWatchLogsEncodingShiftJis is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingShiftJis = "shift_jis" - - // CloudWatchLogsEncodingShiftJis2004 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingShiftJis2004 = "shift_jis_2004" - - // CloudWatchLogsEncodingShiftJisx0213 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingShiftJisx0213 = "shift_jisx0213" - - // CloudWatchLogsEncodingUtf32 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingUtf32 = "utf_32" - - // CloudWatchLogsEncodingUtf32Be is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingUtf32Be = "utf_32_be" - - // CloudWatchLogsEncodingUtf32Le is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingUtf32Le = "utf_32_le" - - // CloudWatchLogsEncodingUtf16 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingUtf16 = "utf_16" - - // CloudWatchLogsEncodingUtf16Be is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingUtf16Be = "utf_16_be" - - // CloudWatchLogsEncodingUtf16Le is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingUtf16Le = "utf_16_le" - - // CloudWatchLogsEncodingUtf7 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingUtf7 = "utf_7" - - // CloudWatchLogsEncodingUtf8 is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingUtf8 = "utf_8" - - // CloudWatchLogsEncodingUtf8Sig is a CloudWatchLogsEncoding enum value - CloudWatchLogsEncodingUtf8Sig = "utf_8_sig" -) - -// Specifies where to start to read data (start_of_file or end_of_file). The -// default is start_of_file. It's only used if there is no state persisted for -// that log stream. -const ( - // CloudWatchLogsInitialPositionStartOfFile is a CloudWatchLogsInitialPosition enum value - CloudWatchLogsInitialPositionStartOfFile = "start_of_file" - - // CloudWatchLogsInitialPositionEndOfFile is a CloudWatchLogsInitialPosition enum value - CloudWatchLogsInitialPositionEndOfFile = "end_of_file" -) - -// The preferred time zone for logs streamed to CloudWatch Logs. Valid values -// are LOCAL and UTC, for Coordinated Universal Time. -const ( - // CloudWatchLogsTimeZoneLocal is a CloudWatchLogsTimeZone enum value - CloudWatchLogsTimeZoneLocal = "LOCAL" - - // CloudWatchLogsTimeZoneUtc is a CloudWatchLogsTimeZone enum value - CloudWatchLogsTimeZoneUtc = "UTC" -) - -const ( - // DeploymentCommandNameInstallDependencies is a DeploymentCommandName enum value - DeploymentCommandNameInstallDependencies = "install_dependencies" - - // DeploymentCommandNameUpdateDependencies is a DeploymentCommandName enum value - DeploymentCommandNameUpdateDependencies = "update_dependencies" - - // DeploymentCommandNameUpdateCustomCookbooks is a DeploymentCommandName enum value - DeploymentCommandNameUpdateCustomCookbooks = "update_custom_cookbooks" - - // DeploymentCommandNameExecuteRecipes is a DeploymentCommandName enum value - DeploymentCommandNameExecuteRecipes = "execute_recipes" - - // DeploymentCommandNameConfigure is a DeploymentCommandName enum value - DeploymentCommandNameConfigure = "configure" - - // DeploymentCommandNameSetup is a DeploymentCommandName enum value - DeploymentCommandNameSetup = "setup" - - // DeploymentCommandNameDeploy is a DeploymentCommandName enum value - DeploymentCommandNameDeploy = "deploy" - - // DeploymentCommandNameRollback is a DeploymentCommandName enum value - DeploymentCommandNameRollback = "rollback" - - // DeploymentCommandNameStart is a DeploymentCommandName enum value - DeploymentCommandNameStart = "start" - - // DeploymentCommandNameStop is a DeploymentCommandName enum value - DeploymentCommandNameStop = "stop" - - // DeploymentCommandNameRestart is a DeploymentCommandName enum value - DeploymentCommandNameRestart = "restart" - - // DeploymentCommandNameUndeploy is a DeploymentCommandName enum value - DeploymentCommandNameUndeploy = "undeploy" -) - -const ( - // LayerAttributesKeysEcsClusterArn is a LayerAttributesKeys enum value - LayerAttributesKeysEcsClusterArn = "EcsClusterArn" - - // LayerAttributesKeysEnableHaproxyStats is a LayerAttributesKeys enum value - LayerAttributesKeysEnableHaproxyStats = "EnableHaproxyStats" - - // LayerAttributesKeysHaproxyStatsUrl is a LayerAttributesKeys enum value - LayerAttributesKeysHaproxyStatsUrl = "HaproxyStatsUrl" - - // LayerAttributesKeysHaproxyStatsUser is a LayerAttributesKeys enum value - LayerAttributesKeysHaproxyStatsUser = "HaproxyStatsUser" - - // LayerAttributesKeysHaproxyStatsPassword is a LayerAttributesKeys enum value - LayerAttributesKeysHaproxyStatsPassword = "HaproxyStatsPassword" - - // LayerAttributesKeysHaproxyHealthCheckUrl is a LayerAttributesKeys enum value - LayerAttributesKeysHaproxyHealthCheckUrl = "HaproxyHealthCheckUrl" - - // LayerAttributesKeysHaproxyHealthCheckMethod is a LayerAttributesKeys enum value - LayerAttributesKeysHaproxyHealthCheckMethod = "HaproxyHealthCheckMethod" - - // LayerAttributesKeysMysqlRootPassword is a LayerAttributesKeys enum value - LayerAttributesKeysMysqlRootPassword = "MysqlRootPassword" - - // LayerAttributesKeysMysqlRootPasswordUbiquitous is a LayerAttributesKeys enum value - LayerAttributesKeysMysqlRootPasswordUbiquitous = "MysqlRootPasswordUbiquitous" - - // LayerAttributesKeysGangliaUrl is a LayerAttributesKeys enum value - LayerAttributesKeysGangliaUrl = "GangliaUrl" - - // LayerAttributesKeysGangliaUser is a LayerAttributesKeys enum value - LayerAttributesKeysGangliaUser = "GangliaUser" - - // LayerAttributesKeysGangliaPassword is a LayerAttributesKeys enum value - LayerAttributesKeysGangliaPassword = "GangliaPassword" - - // LayerAttributesKeysMemcachedMemory is a LayerAttributesKeys enum value - LayerAttributesKeysMemcachedMemory = "MemcachedMemory" - - // LayerAttributesKeysNodejsVersion is a LayerAttributesKeys enum value - LayerAttributesKeysNodejsVersion = "NodejsVersion" - - // LayerAttributesKeysRubyVersion is a LayerAttributesKeys enum value - LayerAttributesKeysRubyVersion = "RubyVersion" - - // LayerAttributesKeysRubygemsVersion is a LayerAttributesKeys enum value - LayerAttributesKeysRubygemsVersion = "RubygemsVersion" - - // LayerAttributesKeysManageBundler is a LayerAttributesKeys enum value - LayerAttributesKeysManageBundler = "ManageBundler" - - // LayerAttributesKeysBundlerVersion is a LayerAttributesKeys enum value - LayerAttributesKeysBundlerVersion = "BundlerVersion" - - // LayerAttributesKeysRailsStack is a LayerAttributesKeys enum value - LayerAttributesKeysRailsStack = "RailsStack" - - // LayerAttributesKeysPassengerVersion is a LayerAttributesKeys enum value - LayerAttributesKeysPassengerVersion = "PassengerVersion" - - // LayerAttributesKeysJvm is a LayerAttributesKeys enum value - LayerAttributesKeysJvm = "Jvm" - - // LayerAttributesKeysJvmVersion is a LayerAttributesKeys enum value - LayerAttributesKeysJvmVersion = "JvmVersion" - - // LayerAttributesKeysJvmOptions is a LayerAttributesKeys enum value - LayerAttributesKeysJvmOptions = "JvmOptions" - - // LayerAttributesKeysJavaAppServer is a LayerAttributesKeys enum value - LayerAttributesKeysJavaAppServer = "JavaAppServer" - - // LayerAttributesKeysJavaAppServerVersion is a LayerAttributesKeys enum value - LayerAttributesKeysJavaAppServerVersion = "JavaAppServerVersion" -) - -const ( - // LayerTypeAwsFlowRuby is a LayerType enum value - LayerTypeAwsFlowRuby = "aws-flow-ruby" - - // LayerTypeEcsCluster is a LayerType enum value - LayerTypeEcsCluster = "ecs-cluster" - - // LayerTypeJavaApp is a LayerType enum value - LayerTypeJavaApp = "java-app" - - // LayerTypeLb is a LayerType enum value - LayerTypeLb = "lb" - - // LayerTypeWeb is a LayerType enum value - LayerTypeWeb = "web" - - // LayerTypePhpApp is a LayerType enum value - LayerTypePhpApp = "php-app" - - // LayerTypeRailsApp is a LayerType enum value - LayerTypeRailsApp = "rails-app" - - // LayerTypeNodejsApp is a LayerType enum value - LayerTypeNodejsApp = "nodejs-app" - - // LayerTypeMemcached is a LayerType enum value - LayerTypeMemcached = "memcached" - - // LayerTypeDbMaster is a LayerType enum value - LayerTypeDbMaster = "db-master" - - // LayerTypeMonitoringMaster is a LayerType enum value - LayerTypeMonitoringMaster = "monitoring-master" - - // LayerTypeCustom is a LayerType enum value - LayerTypeCustom = "custom" -) - -const ( - // RootDeviceTypeEbs is a RootDeviceType enum value - RootDeviceTypeEbs = "ebs" - - // RootDeviceTypeInstanceStore is a RootDeviceType enum value - RootDeviceTypeInstanceStore = "instance-store" -) - -const ( - // SourceTypeGit is a SourceType enum value - SourceTypeGit = "git" - - // SourceTypeSvn is a SourceType enum value - SourceTypeSvn = "svn" - - // SourceTypeArchive is a SourceType enum value - SourceTypeArchive = "archive" - - // SourceTypeS3 is a SourceType enum value - SourceTypeS3 = "s3" -) - -const ( - // StackAttributesKeysColor is a StackAttributesKeys enum value - StackAttributesKeysColor = "Color" -) - -const ( - // VirtualizationTypeParavirtual is a VirtualizationType enum value - VirtualizationTypeParavirtual = "paravirtual" - - // VirtualizationTypeHvm is a VirtualizationType enum value - VirtualizationTypeHvm = "hvm" -) - -const ( - // VolumeTypeGp2 is a VolumeType enum value - VolumeTypeGp2 = "gp2" - - // VolumeTypeIo1 is a VolumeType enum value - VolumeTypeIo1 = "io1" - - // VolumeTypeStandard is a VolumeType enum value - VolumeTypeStandard = "standard" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/opsworks/doc.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/doc.go deleted file mode 100644 index 4e25ae8d2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/opsworks/doc.go +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package opsworks provides the client and types for making API -// requests to AWS OpsWorks. -// -// Welcome to the AWS OpsWorks Stacks API Reference. This guide provides descriptions, -// syntax, and usage examples for AWS OpsWorks Stacks actions and data types, -// including common parameters and error codes. -// -// AWS OpsWorks Stacks is an application management service that provides an -// integrated experience for overseeing the complete application lifecycle. -// For information about this product, go to the AWS OpsWorks (http://aws.amazon.com/opsworks/) -// details page. -// -// SDKs and CLI -// -// The most common way to use the AWS OpsWorks Stacks API is by using the AWS -// Command Line Interface (CLI) or by using one of the AWS SDKs to implement -// applications in your preferred language. For more information, see: -// -// * AWS CLI (http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) -// -// * AWS SDK for Java (http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/opsworks/AWSOpsWorksClient.html) -// -// * AWS SDK for .NET (http://docs.aws.amazon.com/sdkfornet/latest/apidocs/html/N_Amazon_OpsWorks.htm) -// -// * AWS SDK for PHP 2 (http://docs.aws.amazon.com/aws-sdk-php-2/latest/class-Aws.OpsWorks.OpsWorksClient.html) -// -// * AWS SDK for Ruby (http://docs.aws.amazon.com/sdkforruby/api/) -// -// * AWS SDK for Node.js (http://aws.amazon.com/documentation/sdkforjavascript/) -// -// * AWS SDK for Python(Boto) (http://docs.pythonboto.org/en/latest/ref/opsworks.html) -// -// Endpoints -// -// AWS OpsWorks Stacks supports the following endpoints, all HTTPS. You must -// connect to one of the following endpoints. Stacks can only be accessed or -// managed within the endpoint in which they are created. -// -// * opsworks.us-east-1.amazonaws.com -// -// * opsworks.us-east-2.amazonaws.com -// -// * opsworks.us-west-1.amazonaws.com -// -// * opsworks.us-west-2.amazonaws.com -// -// * opsworks.ca-central-1.amazonaws.com (API only; not available in the -// AWS console) -// -// * opsworks.eu-west-1.amazonaws.com -// -// * opsworks.eu-west-2.amazonaws.com -// -// * opsworks.eu-west-3.amazonaws.com -// -// * opsworks.eu-central-1.amazonaws.com -// -// * opsworks.ap-northeast-1.amazonaws.com -// -// * opsworks.ap-northeast-2.amazonaws.com -// -// * opsworks.ap-south-1.amazonaws.com -// -// * opsworks.ap-southeast-1.amazonaws.com -// -// * opsworks.ap-southeast-2.amazonaws.com -// -// * opsworks.sa-east-1.amazonaws.com -// -// Chef Versions -// -// When you call CreateStack, CloneStack, or UpdateStack we recommend you use -// the ConfigurationManager parameter to specify the Chef version. The recommended -// and default value for Linux stacks is currently 12. Windows stacks use Chef -// 12.2. For more information, see Chef Versions (http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-chef11.html). -// -// You can specify Chef 12, 11.10, or 11.4 for your Linux stack. We recommend -// migrating your existing Linux stacks to Chef 12 as soon as possible. -// -// See https://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18 for more information on this service. -// -// See opsworks package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/opsworks/ -// -// Using the Client -// -// To contact AWS OpsWorks 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 OpsWorks client OpsWorks for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/opsworks/#New -package opsworks diff --git a/vendor/github.com/aws/aws-sdk-go/service/opsworks/errors.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/errors.go deleted file mode 100644 index fc849646c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/opsworks/errors.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package opsworks - -const ( - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // Indicates that a resource was not found. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeValidationException for service response error code - // "ValidationException". - // - // Indicates that a request was not valid. - ErrCodeValidationException = "ValidationException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/opsworks/service.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/service.go deleted file mode 100644 index a1a8307ca..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/opsworks/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package opsworks - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// OpsWorks provides the API operation methods for making requests to -// AWS OpsWorks. See this package's package overview docs -// for details on the service. -// -// OpsWorks methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type OpsWorks 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 = "opsworks" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "OpsWorks" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the OpsWorks client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a OpsWorks client from just a session. -// svc := opsworks.New(mySession) -// -// // Create a OpsWorks client with additional configuration -// svc := opsworks.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *OpsWorks { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *OpsWorks { - svc := &OpsWorks{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2013-02-18", - JSONVersion: "1.1", - TargetPrefix: "OpsWorks_20130218", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a OpsWorks operation and runs any -// custom request initialization. -func (c *OpsWorks) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/opsworks/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/waiters.go deleted file mode 100644 index 63c5ea5ef..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/opsworks/waiters.go +++ /dev/null @@ -1,456 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package opsworks - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilAppExists uses the AWS OpsWorks API operation -// DescribeApps to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *OpsWorks) WaitUntilAppExists(input *DescribeAppsInput) error { - return c.WaitUntilAppExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilAppExistsWithContext is an extended version of WaitUntilAppExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) WaitUntilAppExistsWithContext(ctx aws.Context, input *DescribeAppsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilAppExists", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(1 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.FailureWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 400, - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeAppsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeAppsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilDeploymentSuccessful uses the AWS OpsWorks API operation -// DescribeDeployments to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *OpsWorks) WaitUntilDeploymentSuccessful(input *DescribeDeploymentsInput) error { - return c.WaitUntilDeploymentSuccessfulWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilDeploymentSuccessfulWithContext is an extended version of WaitUntilDeploymentSuccessful. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) WaitUntilDeploymentSuccessfulWithContext(ctx aws.Context, input *DescribeDeploymentsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilDeploymentSuccessful", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Deployments[].Status", - Expected: "successful", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Deployments[].Status", - Expected: "failed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeDeploymentsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDeploymentsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInstanceOnline uses the AWS OpsWorks API operation -// DescribeInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *OpsWorks) WaitUntilInstanceOnline(input *DescribeInstancesInput) error { - return c.WaitUntilInstanceOnlineWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceOnlineWithContext is an extended version of WaitUntilInstanceOnline. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) WaitUntilInstanceOnlineWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceOnline", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Instances[].Status", - Expected: "online", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "setup_failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "shutting_down", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "start_failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "stopped", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "stopping", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "terminating", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "terminated", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "stop_failed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInstanceRegistered uses the AWS OpsWorks API operation -// DescribeInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *OpsWorks) WaitUntilInstanceRegistered(input *DescribeInstancesInput) error { - return c.WaitUntilInstanceRegisteredWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceRegisteredWithContext is an extended version of WaitUntilInstanceRegistered. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) WaitUntilInstanceRegisteredWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceRegistered", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Instances[].Status", - Expected: "registered", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "setup_failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "shutting_down", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "stopped", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "stopping", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "terminating", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "terminated", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "stop_failed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInstanceStopped uses the AWS OpsWorks API operation -// DescribeInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *OpsWorks) WaitUntilInstanceStopped(input *DescribeInstancesInput) error { - return c.WaitUntilInstanceStoppedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceStoppedWithContext is an extended version of WaitUntilInstanceStopped. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) WaitUntilInstanceStoppedWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceStopped", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Instances[].Status", - Expected: "stopped", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "booting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "pending", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "rebooting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "requested", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "running_setup", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "setup_failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "start_failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "stop_failed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInstanceTerminated uses the AWS OpsWorks API operation -// DescribeInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *OpsWorks) WaitUntilInstanceTerminated(input *DescribeInstancesInput) error { - return c.WaitUntilInstanceTerminatedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceTerminatedWithContext is an extended version of WaitUntilInstanceTerminated. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *OpsWorks) WaitUntilInstanceTerminatedWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceTerminated", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Instances[].Status", - Expected: "terminated", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ResourceNotFoundException", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "booting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "online", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "pending", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "rebooting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "requested", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "running_setup", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "setup_failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Instances[].Status", - Expected: "start_failed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go deleted file mode 100644 index f37a867f0..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go +++ /dev/null @@ -1,14338 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package organizations - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAcceptHandshake = "AcceptHandshake" - -// AcceptHandshakeRequest generates a "aws/request.Request" representing the -// client's request for the AcceptHandshake operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcceptHandshake for more information on using the AcceptHandshake -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcceptHandshakeRequest method. -// req, resp := client.AcceptHandshakeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/AcceptHandshake -func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req *request.Request, output *AcceptHandshakeOutput) { - op := &request.Operation{ - Name: opAcceptHandshake, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AcceptHandshakeInput{} - } - - output = &AcceptHandshakeOutput{} - req = c.newRequest(op, input, output) - return -} - -// AcceptHandshake API operation for AWS Organizations. -// -// Sends a response to the originator of a handshake agreeing to the action -// proposed by the handshake request. -// -// This operation can be called only by the following principals when they also -// have the relevant IAM permissions: -// -// * Invitation to join or Approve all features request handshakes: only -// a principal from the member account. -// -// The user who calls the API for an invitation to join must have the organizations:AcceptHandshake -// permission. If you enabled all features in the organization, then the -// user must also have the iam:CreateServiceLinkedRole permission so that -// Organizations can create the required service-linked role named AWSServiceRoleForOrganizations. -// For more information, see AWS Organizations and Service-Linked Roles (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integration_services.html#orgs_integration_service-linked-roles) -// in the AWS Organizations User Guide. -// -// * Enable all features final confirmation handshake: only a principal from -// the master account. -// -// For more information about invitations, see Inviting an AWS Account to Join -// Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_invites.html) -// in the AWS Organizations User Guide. For more information about requests -// to enable all features in the organization, see Enabling All Features -// in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) -// in the AWS Organizations User Guide. -// -// After you accept a handshake, it continues to appear in the results of relevant -// APIs for only 30 days. After that it is deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation AcceptHandshake for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeHandshakeConstraintViolationException "HandshakeConstraintViolationException" -// The requested operation would violate the constraint identified in the reason -// code. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. Note that deleted and closed -// accounts still count toward your limit. -// -// If you get this exception immediately after creating the organization, wait -// one hour and try again. If after an hour it continues to fail with this -// error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because -// the invited account is already a member of an organization. -// -// * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid -// because the organization has already enabled all features. -// -// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations -// to join an organization while it's in the process of enabling all features. -// You can resume inviting accounts after you finalize the process when all -// accounts have agreed to the change. -// -// * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an -// account that doesn't have a payment instrument, such as a credit card, -// associated with it. -// -// * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because -// the account is from a different marketplace than the accounts in the organization. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be from the same -// marketplace. -// -// * ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to -// change the membership of an account too quickly after its previous change. -// -// * ErrCodeHandshakeNotFoundException "HandshakeNotFoundException" -// We can't find a handshake with the HandshakeId that you specified. -// -// * ErrCodeInvalidHandshakeTransitionException "InvalidHandshakeTransitionException" -// You can't perform the operation on the handshake in its current state. For -// example, you can't cancel a handshake that was already accepted or accept -// a handshake that was already declined. -// -// * ErrCodeHandshakeAlreadyInStateException "HandshakeAlreadyInStateException" -// The specified handshake is already in the requested state. For example, you -// can't accept a handshake that was already accepted. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// * ErrCodeAccessDeniedForDependencyException "AccessDeniedForDependencyException" -// The operation that you attempted requires you to have the iam:CreateServiceLinkedRole -// so that AWS Organizations can create the required service-linked role. You -// don't have that permission. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/AcceptHandshake -func (c *Organizations) AcceptHandshake(input *AcceptHandshakeInput) (*AcceptHandshakeOutput, error) { - req, out := c.AcceptHandshakeRequest(input) - return out, req.Send() -} - -// AcceptHandshakeWithContext is the same as AcceptHandshake with the addition of -// the ability to pass a context and additional request options. -// -// See AcceptHandshake for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) AcceptHandshakeWithContext(ctx aws.Context, input *AcceptHandshakeInput, opts ...request.Option) (*AcceptHandshakeOutput, error) { - req, out := c.AcceptHandshakeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachPolicy = "AttachPolicy" - -// AttachPolicyRequest generates a "aws/request.Request" representing the -// client's request for the AttachPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachPolicy for more information on using the AttachPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachPolicyRequest method. -// req, resp := client.AttachPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/AttachPolicy -func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *request.Request, output *AttachPolicyOutput) { - op := &request.Operation{ - Name: opAttachPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachPolicyInput{} - } - - output = &AttachPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachPolicy API operation for AWS Organizations. -// -// Attaches a policy to a root, an organizational unit (OU), or an individual -// account. How the policy affects accounts depends on the type of policy: -// -// * Service control policy (SCP) - An SCP specifies what permissions can -// be delegated to users in affected member accounts. The scope of influence -// for a policy depends on what you attach the policy to: -// -// If you attach an SCP to a root, it affects all accounts in the organization. -// -// If you attach an SCP to an OU, it affects all accounts in that OU and in -// any child OUs. -// -// If you attach the policy directly to an account, then it affects only that -// account. -// -// SCPs essentially are permission "filters". When you attach one SCP to a higher -// level root or OU, and you also attach a different SCP to a child OU or -// to an account, the child policy can further restrict only the permissions -// that pass through the parent filter and are available to the child. An -// SCP that is attached to a child cannot grant a permission that is not -// already granted by the parent. For example, imagine that the parent SCP -// allows permissions A, B, C, D, and E. The child SCP allows C, D, E, F, -// and G. The result is that the accounts affected by the child SCP are allowed -// to use only C, D, and E. They cannot use A or B because they were filtered -// out by the child OU. They also cannot use F and G because they were filtered -// out by the parent OU. They cannot be granted back by the child SCP; child -// SCPs can only filter the permissions they receive from the parent SCP. -// -// AWS Organizations attaches a default SCP named "FullAWSAccess to every root, -// OU, and account. This default SCP allows all services and actions, enabling -// any new child OU or account to inherit the permissions of the parent root -// or OU. If you detach the default policy, you must replace it with a policy -// that specifies the permissions that you want to allow in that OU or account. -// -// For more information about how Organizations policies permissions work, see -// Using Service Control Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) -// in the AWS Organizations User Guide. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation AttachPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeConstraintViolationException "ConstraintViolationException" -// Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last service control policy (SCP) from -// an OU or root, inviting or creating too many accounts to the organization, -// or attaching too many policies to an account, OU, or root. This exception -// includes a reason that contains additional information about the violated -// limit. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. If you need more accounts, -// contactAWS Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. -// -// Or the number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations or -// contact AWS Support to request an increase in the number of accounts. -// -// Deleted and closed accounts still count toward your limit. -// -// If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs -// that you can have in an organization. -// -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is -// too many levels deep. -// -// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation -// that requires the organization to be configured to support all features. -// An organization that supports only consolidated billing features can't -// perform this operation. -// -// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of -// policies that you can have in an organization. -// -// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity -// at one time. -// -// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity that would cause the entity to have fewer than the -// minimum number of policies of a certain type required. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that doesn't yet have enough information to exist -// as a standalone account. This account requires you to first agree to the -// AWS Customer Agreement. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that doesn't yet have enough information -// to exist as a standalone account. This account requires you to first complete -// phone verification. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this master account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation -// with this member account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can create in one day. -// -// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account -// in this organization, you first must migrate the organization's master -// account to the marketplace that corresponds to the master account's address. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be associated -// with the same marketplace. -// -// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you -// must first provide contact a valid address and phone number for the master -// account. Then try the operation again. -// -// * ErrCodeDuplicatePolicyAttachmentException "DuplicatePolicyAttachmentException" -// The selected policy is already attached to the specified target. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodePolicyNotFoundException "PolicyNotFoundException" -// We can't find a policy with the PolicyId that you specified. -// -// * ErrCodePolicyTypeNotEnabledException "PolicyTypeNotEnabledException" -// The specified policy type isn't currently enabled in this root. You can't -// attach policies of the specified type to entities in a root until you enable -// that type in the root. For more information, see Enabling All Features in -// Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) -// in the AWS Organizations User Guide. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTargetNotFoundException "TargetNotFoundException" -// We can't find a root, OU, or account with the TargetId that you specified. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/AttachPolicy -func (c *Organizations) AttachPolicy(input *AttachPolicyInput) (*AttachPolicyOutput, error) { - req, out := c.AttachPolicyRequest(input) - return out, req.Send() -} - -// AttachPolicyWithContext is the same as AttachPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See AttachPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) AttachPolicyWithContext(ctx aws.Context, input *AttachPolicyInput, opts ...request.Option) (*AttachPolicyOutput, error) { - req, out := c.AttachPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelHandshake = "CancelHandshake" - -// CancelHandshakeRequest generates a "aws/request.Request" representing the -// client's request for the CancelHandshake operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelHandshake for more information on using the CancelHandshake -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelHandshakeRequest method. -// req, resp := client.CancelHandshakeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CancelHandshake -func (c *Organizations) CancelHandshakeRequest(input *CancelHandshakeInput) (req *request.Request, output *CancelHandshakeOutput) { - op := &request.Operation{ - Name: opCancelHandshake, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelHandshakeInput{} - } - - output = &CancelHandshakeOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelHandshake API operation for AWS Organizations. -// -// Cancels a handshake. Canceling a handshake sets the handshake state to CANCELED. -// -// This operation can be called only from the account that originated the handshake. -// The recipient of the handshake can't cancel it, but can use DeclineHandshake -// instead. After a handshake is canceled, the recipient can no longer respond -// to that handshake. -// -// After you cancel a handshake, it continues to appear in the results of relevant -// APIs for only 30 days. After that it is deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation CancelHandshake for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeHandshakeNotFoundException "HandshakeNotFoundException" -// We can't find a handshake with the HandshakeId that you specified. -// -// * ErrCodeInvalidHandshakeTransitionException "InvalidHandshakeTransitionException" -// You can't perform the operation on the handshake in its current state. For -// example, you can't cancel a handshake that was already accepted or accept -// a handshake that was already declined. -// -// * ErrCodeHandshakeAlreadyInStateException "HandshakeAlreadyInStateException" -// The specified handshake is already in the requested state. For example, you -// can't accept a handshake that was already accepted. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CancelHandshake -func (c *Organizations) CancelHandshake(input *CancelHandshakeInput) (*CancelHandshakeOutput, error) { - req, out := c.CancelHandshakeRequest(input) - return out, req.Send() -} - -// CancelHandshakeWithContext is the same as CancelHandshake with the addition of -// the ability to pass a context and additional request options. -// -// See CancelHandshake for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) CancelHandshakeWithContext(ctx aws.Context, input *CancelHandshakeInput, opts ...request.Option) (*CancelHandshakeOutput, error) { - req, out := c.CancelHandshakeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAccount = "CreateAccount" - -// CreateAccountRequest generates a "aws/request.Request" representing the -// client's request for the CreateAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAccount for more information on using the CreateAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAccountRequest method. -// req, resp := client.CreateAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateAccount -func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *request.Request, output *CreateAccountOutput) { - op := &request.Operation{ - Name: opCreateAccount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAccountInput{} - } - - output = &CreateAccountOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAccount API operation for AWS Organizations. -// -// Creates an AWS account that is automatically a member of the organization -// whose credentials made the request. This is an asynchronous request that -// AWS performs in the background. Because CreateAccount operates asynchronously, -// it can return a successful completion message even though account initialization -// might still be in progress. You might need to wait a few minutes before you -// can successfully access the account. To check the status of the request, -// do one of the following: -// -// * Use the OperationId response element from this operation to provide -// as a parameter to the DescribeCreateAccountStatus operation. -// -// * Check the AWS CloudTrail log for the CreateAccountResult event. For -// information on using AWS CloudTrail with Organizations, see Monitoring -// the Activity in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_monitoring.html) -// in the AWS Organizations User Guide. -// -// The user who calls the API to create an account must have the organizations:CreateAccountpermission. If you enabled all features in the organization, AWS Organizations -// will create the required service-linked role named AWSServiceRoleForOrganizations. For more information, see AWS Organizations and Service-Linked Roles (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs)in the AWS Organizations User Guide. -// -// AWS Organizations preconfigures the new member account with a role (named -// OrganizationAccountAccessRoleby default) that grants users in the master account administrator permissions -// in the new member account. Principals in the master account can assume the -// role. AWS Organizations clones the company name and address information for -// the new account from the organization's master account. -// -// This operation can be called only from the organization's master account. -// -// For more information about creating accounts, see Creating an AWS Account -// in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html)in the AWS Organizations User Guide. -// -// When you create an account in an organization using the AWS Organizations -// console, API, or CLI commands, the information required for the account to -// operate as a standalone account, such as a payment method and signing the -// end user license agreement (EULA) is not automatically collected. If you -// must remove an account from your organization later, you can do so only after -// you provide the missing information. Follow the steps at To leave an organization -// as a member account (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// If you get an exception that indicates that you exceeded your account limits -// for the organization, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// If you get an exception that indicates that the operation failed because -// your organization is still initializing, wait one hour and then try again. -// If the error persists, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// Using CreateAccount to create multiple temporary accounts is not recommended. -// You can only close an account from the Billing and Cost Management Console, -// and you must be signed in as the root user. For information on the requirements -// and process for closing an account, see Closing an AWS Account (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html) -// in the AWS Organizations User Guide. -// -// When you create a member account with this operation, you can choose whether -// to create the account with the IAM User and Role Access to Billing Information -// switch enabled. If you enable it, IAM users and roles that have appropriate -// permissions can view billing information for the account. If you disable -// it, only the account root user can access billing information. For information -// about how to disable this switch for an account, see Granting Access to Your -// Billing Information and Tools (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation CreateAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeConstraintViolationException "ConstraintViolationException" -// Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last service control policy (SCP) from -// an OU or root, inviting or creating too many accounts to the organization, -// or attaching too many policies to an account, OU, or root. This exception -// includes a reason that contains additional information about the violated -// limit. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. If you need more accounts, -// contactAWS Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. -// -// Or the number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations or -// contact AWS Support to request an increase in the number of accounts. -// -// Deleted and closed accounts still count toward your limit. -// -// If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs -// that you can have in an organization. -// -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is -// too many levels deep. -// -// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation -// that requires the organization to be configured to support all features. -// An organization that supports only consolidated billing features can't -// perform this operation. -// -// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of -// policies that you can have in an organization. -// -// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity -// at one time. -// -// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity that would cause the entity to have fewer than the -// minimum number of policies of a certain type required. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that doesn't yet have enough information to exist -// as a standalone account. This account requires you to first agree to the -// AWS Customer Agreement. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that doesn't yet have enough information -// to exist as a standalone account. This account requires you to first complete -// phone verification. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this master account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation -// with this member account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can create in one day. -// -// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account -// in this organization, you first must migrate the organization's master -// account to the marketplace that corresponds to the master account's address. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be associated -// with the same marketplace. -// -// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you -// must first provide contact a valid address and phone number for the master -// account. Then try the operation again. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeFinalizingOrganizationException "FinalizingOrganizationException" -// AWS Organizations couldn't perform the operation because your organization -// hasn't finished initializing. This can take up to an hour. Try again later. -// If after one hour you continue to receive this error, contact AWS Support -// (https://console.aws.amazon.com/support/home#/). -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateAccount -func (c *Organizations) CreateAccount(input *CreateAccountInput) (*CreateAccountOutput, error) { - req, out := c.CreateAccountRequest(input) - return out, req.Send() -} - -// CreateAccountWithContext is the same as CreateAccount with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) CreateAccountWithContext(ctx aws.Context, input *CreateAccountInput, opts ...request.Option) (*CreateAccountOutput, error) { - req, out := c.CreateAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateOrganization = "CreateOrganization" - -// CreateOrganizationRequest generates a "aws/request.Request" representing the -// client's request for the CreateOrganization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateOrganization for more information on using the CreateOrganization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateOrganizationRequest method. -// req, resp := client.CreateOrganizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateOrganization -func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput) (req *request.Request, output *CreateOrganizationOutput) { - op := &request.Operation{ - Name: opCreateOrganization, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateOrganizationInput{} - } - - output = &CreateOrganizationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateOrganization API operation for AWS Organizations. -// -// Creates an AWS organization. The account whose user is calling the CreateOrganization -// operation automatically becomes the master account (http://docs.aws.amazon.com/IAM/latest/UserGuide/orgs_getting-started_concepts.html#account) -// of the new organization. -// -// This operation must be called using credentials from the account that is -// to become the new organization's master account. The principal must also -// have the relevant IAM permissions. -// -// By default (or if you set the FeatureSet parameter to ALL), the new organization -// is created with all features enabled and service control policies automatically -// enabled in the root. If you instead choose to create the organization supporting -// only the consolidated billing features by setting the FeatureSet parameter -// to CONSOLIDATED_BILLING", then no policy types are enabled by default and -// you cannot use organization policies. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation CreateOrganization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAlreadyInOrganizationException "AlreadyInOrganizationException" -// This account is already a member of an organization. An account can belong -// to only one organization at a time. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeConstraintViolationException "ConstraintViolationException" -// Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last service control policy (SCP) from -// an OU or root, inviting or creating too many accounts to the organization, -// or attaching too many policies to an account, OU, or root. This exception -// includes a reason that contains additional information about the violated -// limit. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. If you need more accounts, -// contactAWS Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. -// -// Or the number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations or -// contact AWS Support to request an increase in the number of accounts. -// -// Deleted and closed accounts still count toward your limit. -// -// If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs -// that you can have in an organization. -// -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is -// too many levels deep. -// -// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation -// that requires the organization to be configured to support all features. -// An organization that supports only consolidated billing features can't -// perform this operation. -// -// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of -// policies that you can have in an organization. -// -// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity -// at one time. -// -// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity that would cause the entity to have fewer than the -// minimum number of policies of a certain type required. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that doesn't yet have enough information to exist -// as a standalone account. This account requires you to first agree to the -// AWS Customer Agreement. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that doesn't yet have enough information -// to exist as a standalone account. This account requires you to first complete -// phone verification. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this master account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation -// with this member account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can create in one day. -// -// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account -// in this organization, you first must migrate the organization's master -// account to the marketplace that corresponds to the master account's address. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be associated -// with the same marketplace. -// -// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you -// must first provide contact a valid address and phone number for the master -// account. Then try the operation again. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// * ErrCodeAccessDeniedForDependencyException "AccessDeniedForDependencyException" -// The operation that you attempted requires you to have the iam:CreateServiceLinkedRole -// so that AWS Organizations can create the required service-linked role. You -// don't have that permission. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateOrganization -func (c *Organizations) CreateOrganization(input *CreateOrganizationInput) (*CreateOrganizationOutput, error) { - req, out := c.CreateOrganizationRequest(input) - return out, req.Send() -} - -// CreateOrganizationWithContext is the same as CreateOrganization with the addition of -// the ability to pass a context and additional request options. -// -// See CreateOrganization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) CreateOrganizationWithContext(ctx aws.Context, input *CreateOrganizationInput, opts ...request.Option) (*CreateOrganizationOutput, error) { - req, out := c.CreateOrganizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateOrganizationalUnit = "CreateOrganizationalUnit" - -// CreateOrganizationalUnitRequest generates a "aws/request.Request" representing the -// client's request for the CreateOrganizationalUnit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateOrganizationalUnit for more information on using the CreateOrganizationalUnit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateOrganizationalUnitRequest method. -// req, resp := client.CreateOrganizationalUnitRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateOrganizationalUnit -func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizationalUnitInput) (req *request.Request, output *CreateOrganizationalUnitOutput) { - op := &request.Operation{ - Name: opCreateOrganizationalUnit, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateOrganizationalUnitInput{} - } - - output = &CreateOrganizationalUnitOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateOrganizationalUnit API operation for AWS Organizations. -// -// Creates an organizational unit (OU) within a root or parent OU. An OU is -// a container for accounts that enables you to organize your accounts to apply -// policies according to your business requirements. The number of levels deep -// that you can nest OUs is dependent upon the policy types enabled for that -// root. For service control policies, the limit is five. -// -// For more information about OUs, see Managing Organizational Units (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_ous.html) -// in the AWS Organizations User Guide. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation CreateOrganizationalUnit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeConstraintViolationException "ConstraintViolationException" -// Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last service control policy (SCP) from -// an OU or root, inviting or creating too many accounts to the organization, -// or attaching too many policies to an account, OU, or root. This exception -// includes a reason that contains additional information about the violated -// limit. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. If you need more accounts, -// contactAWS Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. -// -// Or the number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations or -// contact AWS Support to request an increase in the number of accounts. -// -// Deleted and closed accounts still count toward your limit. -// -// If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs -// that you can have in an organization. -// -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is -// too many levels deep. -// -// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation -// that requires the organization to be configured to support all features. -// An organization that supports only consolidated billing features can't -// perform this operation. -// -// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of -// policies that you can have in an organization. -// -// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity -// at one time. -// -// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity that would cause the entity to have fewer than the -// minimum number of policies of a certain type required. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that doesn't yet have enough information to exist -// as a standalone account. This account requires you to first agree to the -// AWS Customer Agreement. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that doesn't yet have enough information -// to exist as a standalone account. This account requires you to first complete -// phone verification. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this master account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation -// with this member account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can create in one day. -// -// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account -// in this organization, you first must migrate the organization's master -// account to the marketplace that corresponds to the master account's address. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be associated -// with the same marketplace. -// -// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you -// must first provide contact a valid address and phone number for the master -// account. Then try the operation again. -// -// * ErrCodeDuplicateOrganizationalUnitException "DuplicateOrganizationalUnitException" -// An OU with the same name already exists. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeParentNotFoundException "ParentNotFoundException" -// We can't find a root or OU with the ParentId that you specified. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateOrganizationalUnit -func (c *Organizations) CreateOrganizationalUnit(input *CreateOrganizationalUnitInput) (*CreateOrganizationalUnitOutput, error) { - req, out := c.CreateOrganizationalUnitRequest(input) - return out, req.Send() -} - -// CreateOrganizationalUnitWithContext is the same as CreateOrganizationalUnit with the addition of -// the ability to pass a context and additional request options. -// -// See CreateOrganizationalUnit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) CreateOrganizationalUnitWithContext(ctx aws.Context, input *CreateOrganizationalUnitInput, opts ...request.Option) (*CreateOrganizationalUnitOutput, error) { - req, out := c.CreateOrganizationalUnitRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePolicy = "CreatePolicy" - -// CreatePolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreatePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePolicy for more information on using the CreatePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePolicyRequest method. -// req, resp := client.CreatePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreatePolicy -func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *request.Request, output *CreatePolicyOutput) { - op := &request.Operation{ - Name: opCreatePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePolicyInput{} - } - - output = &CreatePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePolicy API operation for AWS Organizations. -// -// Creates a policy of a specified type that you can attach to a root, an organizational -// unit (OU), or an individual AWS account. -// -// For more information about policies and their use, see Managing Organization -// Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html). -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation CreatePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeConstraintViolationException "ConstraintViolationException" -// Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last service control policy (SCP) from -// an OU or root, inviting or creating too many accounts to the organization, -// or attaching too many policies to an account, OU, or root. This exception -// includes a reason that contains additional information about the violated -// limit. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. If you need more accounts, -// contactAWS Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. -// -// Or the number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations or -// contact AWS Support to request an increase in the number of accounts. -// -// Deleted and closed accounts still count toward your limit. -// -// If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs -// that you can have in an organization. -// -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is -// too many levels deep. -// -// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation -// that requires the organization to be configured to support all features. -// An organization that supports only consolidated billing features can't -// perform this operation. -// -// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of -// policies that you can have in an organization. -// -// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity -// at one time. -// -// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity that would cause the entity to have fewer than the -// minimum number of policies of a certain type required. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that doesn't yet have enough information to exist -// as a standalone account. This account requires you to first agree to the -// AWS Customer Agreement. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that doesn't yet have enough information -// to exist as a standalone account. This account requires you to first complete -// phone verification. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this master account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation -// with this member account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can create in one day. -// -// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account -// in this organization, you first must migrate the organization's master -// account to the marketplace that corresponds to the master account's address. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be associated -// with the same marketplace. -// -// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you -// must first provide contact a valid address and phone number for the master -// account. Then try the operation again. -// -// * ErrCodeDuplicatePolicyException "DuplicatePolicyException" -// A policy with the same name already exists. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" -// The provided policy document doesn't meet the requirements of the specified -// policy type. For example, the syntax might be incorrect. For details about -// service control policy syntax, see Service Control Policy Syntax (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html) -// in the AWS Organizations User Guide. -// -// * ErrCodePolicyTypeNotAvailableForOrganizationException "PolicyTypeNotAvailableForOrganizationException" -// You can't use the specified policy type with the feature set currently enabled -// for this organization. For example, you can enable SCPs only after you enable -// all features in the organization. For more information, see Enabling and -// Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) -// in the AWS Organizations User Guide. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreatePolicy -func (c *Organizations) CreatePolicy(input *CreatePolicyInput) (*CreatePolicyOutput, error) { - req, out := c.CreatePolicyRequest(input) - return out, req.Send() -} - -// CreatePolicyWithContext is the same as CreatePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) CreatePolicyWithContext(ctx aws.Context, input *CreatePolicyInput, opts ...request.Option) (*CreatePolicyOutput, error) { - req, out := c.CreatePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeclineHandshake = "DeclineHandshake" - -// DeclineHandshakeRequest generates a "aws/request.Request" representing the -// client's request for the DeclineHandshake operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeclineHandshake for more information on using the DeclineHandshake -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeclineHandshakeRequest method. -// req, resp := client.DeclineHandshakeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeclineHandshake -func (c *Organizations) DeclineHandshakeRequest(input *DeclineHandshakeInput) (req *request.Request, output *DeclineHandshakeOutput) { - op := &request.Operation{ - Name: opDeclineHandshake, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeclineHandshakeInput{} - } - - output = &DeclineHandshakeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeclineHandshake API operation for AWS Organizations. -// -// Declines a handshake request. This sets the handshake state to DECLINED and -// effectively deactivates the request. -// -// This operation can be called only from the account that received the handshake. -// The originator of the handshake can use CancelHandshake instead. The originator -// can't reactivate a declined request, but can re-initiate the process with -// a new handshake request. -// -// After you decline a handshake, it continues to appear in the results of relevant -// APIs for only 30 days. After that it is deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation DeclineHandshake for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeHandshakeNotFoundException "HandshakeNotFoundException" -// We can't find a handshake with the HandshakeId that you specified. -// -// * ErrCodeInvalidHandshakeTransitionException "InvalidHandshakeTransitionException" -// You can't perform the operation on the handshake in its current state. For -// example, you can't cancel a handshake that was already accepted or accept -// a handshake that was already declined. -// -// * ErrCodeHandshakeAlreadyInStateException "HandshakeAlreadyInStateException" -// The specified handshake is already in the requested state. For example, you -// can't accept a handshake that was already accepted. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeclineHandshake -func (c *Organizations) DeclineHandshake(input *DeclineHandshakeInput) (*DeclineHandshakeOutput, error) { - req, out := c.DeclineHandshakeRequest(input) - return out, req.Send() -} - -// DeclineHandshakeWithContext is the same as DeclineHandshake with the addition of -// the ability to pass a context and additional request options. -// -// See DeclineHandshake for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) DeclineHandshakeWithContext(ctx aws.Context, input *DeclineHandshakeInput, opts ...request.Option) (*DeclineHandshakeOutput, error) { - req, out := c.DeclineHandshakeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteOrganization = "DeleteOrganization" - -// DeleteOrganizationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteOrganization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteOrganization for more information on using the DeleteOrganization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteOrganizationRequest method. -// req, resp := client.DeleteOrganizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeleteOrganization -func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput) (req *request.Request, output *DeleteOrganizationOutput) { - op := &request.Operation{ - Name: opDeleteOrganization, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteOrganizationInput{} - } - - output = &DeleteOrganizationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteOrganization API operation for AWS Organizations. -// -// Deletes the organization. You can delete an organization only by using credentials -// from the master account. The organization must be empty of member accounts. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation DeleteOrganization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeOrganizationNotEmptyException "OrganizationNotEmptyException" -// The organization isn't empty. To delete an organization, you must first remove -// all accounts except the master account, delete all OUs, and delete all policies. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeleteOrganization -func (c *Organizations) DeleteOrganization(input *DeleteOrganizationInput) (*DeleteOrganizationOutput, error) { - req, out := c.DeleteOrganizationRequest(input) - return out, req.Send() -} - -// DeleteOrganizationWithContext is the same as DeleteOrganization with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteOrganization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) DeleteOrganizationWithContext(ctx aws.Context, input *DeleteOrganizationInput, opts ...request.Option) (*DeleteOrganizationOutput, error) { - req, out := c.DeleteOrganizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteOrganizationalUnit = "DeleteOrganizationalUnit" - -// DeleteOrganizationalUnitRequest generates a "aws/request.Request" representing the -// client's request for the DeleteOrganizationalUnit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteOrganizationalUnit for more information on using the DeleteOrganizationalUnit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteOrganizationalUnitRequest method. -// req, resp := client.DeleteOrganizationalUnitRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeleteOrganizationalUnit -func (c *Organizations) DeleteOrganizationalUnitRequest(input *DeleteOrganizationalUnitInput) (req *request.Request, output *DeleteOrganizationalUnitOutput) { - op := &request.Operation{ - Name: opDeleteOrganizationalUnit, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteOrganizationalUnitInput{} - } - - output = &DeleteOrganizationalUnitOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteOrganizationalUnit API operation for AWS Organizations. -// -// Deletes an organizational unit (OU) from a root or another OU. You must first -// remove all accounts and child OUs from the OU that you want to delete. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation DeleteOrganizationalUnit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeOrganizationalUnitNotEmptyException "OrganizationalUnitNotEmptyException" -// The specified OU is not empty. Move all accounts to another root or to other -// OUs, remove all child OUs, and try the operation again. -// -// * ErrCodeOrganizationalUnitNotFoundException "OrganizationalUnitNotFoundException" -// We can't find an OU with the OrganizationalUnitId that you specified. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeleteOrganizationalUnit -func (c *Organizations) DeleteOrganizationalUnit(input *DeleteOrganizationalUnitInput) (*DeleteOrganizationalUnitOutput, error) { - req, out := c.DeleteOrganizationalUnitRequest(input) - return out, req.Send() -} - -// DeleteOrganizationalUnitWithContext is the same as DeleteOrganizationalUnit with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteOrganizationalUnit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) DeleteOrganizationalUnitWithContext(ctx aws.Context, input *DeleteOrganizationalUnitInput, opts ...request.Option) (*DeleteOrganizationalUnitOutput, error) { - req, out := c.DeleteOrganizationalUnitRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePolicy = "DeletePolicy" - -// DeletePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeletePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePolicy for more information on using the DeletePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePolicyRequest method. -// req, resp := client.DeletePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeletePolicy -func (c *Organizations) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) { - op := &request.Operation{ - Name: opDeletePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePolicyInput{} - } - - output = &DeletePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePolicy API operation for AWS Organizations. -// -// Deletes the specified policy from your organization. Before you perform this -// operation, you must first detach the policy from all organizational units -// (OUs), roots, and accounts. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation DeletePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodePolicyInUseException "PolicyInUseException" -// The policy is attached to one or more entities. You must detach it from all -// roots, OUs, and accounts before performing this operation. -// -// * ErrCodePolicyNotFoundException "PolicyNotFoundException" -// We can't find a policy with the PolicyId that you specified. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeletePolicy -func (c *Organizations) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) { - req, out := c.DeletePolicyRequest(input) - return out, req.Send() -} - -// DeletePolicyWithContext is the same as DeletePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) { - req, out := c.DeletePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccount = "DescribeAccount" - -// DescribeAccountRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccount for more information on using the DescribeAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAccountRequest method. -// req, resp := client.DescribeAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeAccount -func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req *request.Request, output *DescribeAccountOutput) { - op := &request.Operation{ - Name: opDescribeAccount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAccountInput{} - } - - output = &DescribeAccountOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccount API operation for AWS Organizations. -// -// Retrieves Organizations-related information about the specified account. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation DescribeAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAccountNotFoundException "AccountNotFoundException" -// We can't find an AWS account with the AccountId that you specified, or the -// account whose credentials you used to make this request isn't a member of -// an organization. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeAccount -func (c *Organizations) DescribeAccount(input *DescribeAccountInput) (*DescribeAccountOutput, error) { - req, out := c.DescribeAccountRequest(input) - return out, req.Send() -} - -// DescribeAccountWithContext is the same as DescribeAccount with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) DescribeAccountWithContext(ctx aws.Context, input *DescribeAccountInput, opts ...request.Option) (*DescribeAccountOutput, error) { - req, out := c.DescribeAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCreateAccountStatus = "DescribeCreateAccountStatus" - -// DescribeCreateAccountStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCreateAccountStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCreateAccountStatus for more information on using the DescribeCreateAccountStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCreateAccountStatusRequest method. -// req, resp := client.DescribeCreateAccountStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeCreateAccountStatus -func (c *Organizations) DescribeCreateAccountStatusRequest(input *DescribeCreateAccountStatusInput) (req *request.Request, output *DescribeCreateAccountStatusOutput) { - op := &request.Operation{ - Name: opDescribeCreateAccountStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCreateAccountStatusInput{} - } - - output = &DescribeCreateAccountStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCreateAccountStatus API operation for AWS Organizations. -// -// Retrieves the current status of an asynchronous request to create an account. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation DescribeCreateAccountStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeCreateAccountStatusNotFoundException "CreateAccountStatusNotFoundException" -// We can't find an create account request with the CreateAccountRequestId that -// you specified. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeCreateAccountStatus -func (c *Organizations) DescribeCreateAccountStatus(input *DescribeCreateAccountStatusInput) (*DescribeCreateAccountStatusOutput, error) { - req, out := c.DescribeCreateAccountStatusRequest(input) - return out, req.Send() -} - -// DescribeCreateAccountStatusWithContext is the same as DescribeCreateAccountStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCreateAccountStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) DescribeCreateAccountStatusWithContext(ctx aws.Context, input *DescribeCreateAccountStatusInput, opts ...request.Option) (*DescribeCreateAccountStatusOutput, error) { - req, out := c.DescribeCreateAccountStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeHandshake = "DescribeHandshake" - -// DescribeHandshakeRequest generates a "aws/request.Request" representing the -// client's request for the DescribeHandshake operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeHandshake for more information on using the DescribeHandshake -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeHandshakeRequest method. -// req, resp := client.DescribeHandshakeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeHandshake -func (c *Organizations) DescribeHandshakeRequest(input *DescribeHandshakeInput) (req *request.Request, output *DescribeHandshakeOutput) { - op := &request.Operation{ - Name: opDescribeHandshake, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeHandshakeInput{} - } - - output = &DescribeHandshakeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeHandshake API operation for AWS Organizations. -// -// Retrieves information about a previously requested handshake. The handshake -// ID comes from the response to the original InviteAccountToOrganization operation -// that generated the handshake. -// -// You can access handshakes that are ACCEPTED, DECLINED, or CANCELED for only -// 30 days after they change to that state. They are then deleted and no longer -// accessible. -// -// This operation can be called from any account in the organization. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation DescribeHandshake for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeHandshakeNotFoundException "HandshakeNotFoundException" -// We can't find a handshake with the HandshakeId that you specified. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeHandshake -func (c *Organizations) DescribeHandshake(input *DescribeHandshakeInput) (*DescribeHandshakeOutput, error) { - req, out := c.DescribeHandshakeRequest(input) - return out, req.Send() -} - -// DescribeHandshakeWithContext is the same as DescribeHandshake with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeHandshake for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) DescribeHandshakeWithContext(ctx aws.Context, input *DescribeHandshakeInput, opts ...request.Option) (*DescribeHandshakeOutput, error) { - req, out := c.DescribeHandshakeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeOrganization = "DescribeOrganization" - -// DescribeOrganizationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeOrganization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeOrganization for more information on using the DescribeOrganization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeOrganizationRequest method. -// req, resp := client.DescribeOrganizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeOrganization -func (c *Organizations) DescribeOrganizationRequest(input *DescribeOrganizationInput) (req *request.Request, output *DescribeOrganizationOutput) { - op := &request.Operation{ - Name: opDescribeOrganization, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeOrganizationInput{} - } - - output = &DescribeOrganizationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeOrganization API operation for AWS Organizations. -// -// Retrieves information about the organization that the user's account belongs -// to. -// -// This operation can be called from any account in the organization. -// -// Even if a policy type is shown as available in the organization, it can be -// disabled separately at the root level with DisablePolicyType. Use ListRoots -// to see the status of policy types for a specified root. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation DescribeOrganization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeOrganization -func (c *Organizations) DescribeOrganization(input *DescribeOrganizationInput) (*DescribeOrganizationOutput, error) { - req, out := c.DescribeOrganizationRequest(input) - return out, req.Send() -} - -// DescribeOrganizationWithContext is the same as DescribeOrganization with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeOrganization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) DescribeOrganizationWithContext(ctx aws.Context, input *DescribeOrganizationInput, opts ...request.Option) (*DescribeOrganizationOutput, error) { - req, out := c.DescribeOrganizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeOrganizationalUnit = "DescribeOrganizationalUnit" - -// DescribeOrganizationalUnitRequest generates a "aws/request.Request" representing the -// client's request for the DescribeOrganizationalUnit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeOrganizationalUnit for more information on using the DescribeOrganizationalUnit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeOrganizationalUnitRequest method. -// req, resp := client.DescribeOrganizationalUnitRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeOrganizationalUnit -func (c *Organizations) DescribeOrganizationalUnitRequest(input *DescribeOrganizationalUnitInput) (req *request.Request, output *DescribeOrganizationalUnitOutput) { - op := &request.Operation{ - Name: opDescribeOrganizationalUnit, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeOrganizationalUnitInput{} - } - - output = &DescribeOrganizationalUnitOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeOrganizationalUnit API operation for AWS Organizations. -// -// Retrieves information about an organizational unit (OU). -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation DescribeOrganizationalUnit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeOrganizationalUnitNotFoundException "OrganizationalUnitNotFoundException" -// We can't find an OU with the OrganizationalUnitId that you specified. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeOrganizationalUnit -func (c *Organizations) DescribeOrganizationalUnit(input *DescribeOrganizationalUnitInput) (*DescribeOrganizationalUnitOutput, error) { - req, out := c.DescribeOrganizationalUnitRequest(input) - return out, req.Send() -} - -// DescribeOrganizationalUnitWithContext is the same as DescribeOrganizationalUnit with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeOrganizationalUnit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) DescribeOrganizationalUnitWithContext(ctx aws.Context, input *DescribeOrganizationalUnitInput, opts ...request.Option) (*DescribeOrganizationalUnitOutput, error) { - req, out := c.DescribeOrganizationalUnitRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribePolicy = "DescribePolicy" - -// DescribePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DescribePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePolicy for more information on using the DescribePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePolicyRequest method. -// req, resp := client.DescribePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribePolicy -func (c *Organizations) DescribePolicyRequest(input *DescribePolicyInput) (req *request.Request, output *DescribePolicyOutput) { - op := &request.Operation{ - Name: opDescribePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePolicyInput{} - } - - output = &DescribePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePolicy API operation for AWS Organizations. -// -// Retrieves information about a policy. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation DescribePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodePolicyNotFoundException "PolicyNotFoundException" -// We can't find a policy with the PolicyId that you specified. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribePolicy -func (c *Organizations) DescribePolicy(input *DescribePolicyInput) (*DescribePolicyOutput, error) { - req, out := c.DescribePolicyRequest(input) - return out, req.Send() -} - -// DescribePolicyWithContext is the same as DescribePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) DescribePolicyWithContext(ctx aws.Context, input *DescribePolicyInput, opts ...request.Option) (*DescribePolicyOutput, error) { - req, out := c.DescribePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachPolicy = "DetachPolicy" - -// DetachPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DetachPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachPolicy for more information on using the DetachPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachPolicyRequest method. -// req, resp := client.DetachPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DetachPolicy -func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *request.Request, output *DetachPolicyOutput) { - op := &request.Operation{ - Name: opDetachPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachPolicyInput{} - } - - output = &DetachPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachPolicy API operation for AWS Organizations. -// -// Detaches a policy from a target root, organizational unit (OU), or account. -// If the policy being detached is a service control policy (SCP), the changes -// to permissions for IAM users and roles in affected accounts are immediate. -// -// Note: Every root, OU, and account must have at least one SCP attached. If -// you want to replace the default FullAWSAccess policy with one that limits -// the permissions that can be delegated, then you must attach the replacement -// policy before you can remove the default one. This is the authorization strategy -// of whitelisting (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_about-scps.html#orgs_policies_whitelist). -// If you instead attach a second SCP and leave the FullAWSAccess SCP still -// attached, and specify "Effect": "Deny" in the second SCP to override the -// "Effect": "Allow" in the FullAWSAccess policy (or any other attached SCP), -// then you are using the authorization strategy of blacklisting (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_about-scps.html#orgs_policies_blacklist). -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation DetachPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeConstraintViolationException "ConstraintViolationException" -// Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last service control policy (SCP) from -// an OU or root, inviting or creating too many accounts to the organization, -// or attaching too many policies to an account, OU, or root. This exception -// includes a reason that contains additional information about the violated -// limit. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. If you need more accounts, -// contactAWS Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. -// -// Or the number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations or -// contact AWS Support to request an increase in the number of accounts. -// -// Deleted and closed accounts still count toward your limit. -// -// If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs -// that you can have in an organization. -// -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is -// too many levels deep. -// -// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation -// that requires the organization to be configured to support all features. -// An organization that supports only consolidated billing features can't -// perform this operation. -// -// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of -// policies that you can have in an organization. -// -// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity -// at one time. -// -// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity that would cause the entity to have fewer than the -// minimum number of policies of a certain type required. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that doesn't yet have enough information to exist -// as a standalone account. This account requires you to first agree to the -// AWS Customer Agreement. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that doesn't yet have enough information -// to exist as a standalone account. This account requires you to first complete -// phone verification. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this master account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation -// with this member account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can create in one day. -// -// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account -// in this organization, you first must migrate the organization's master -// account to the marketplace that corresponds to the master account's address. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be associated -// with the same marketplace. -// -// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you -// must first provide contact a valid address and phone number for the master -// account. Then try the operation again. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodePolicyNotAttachedException "PolicyNotAttachedException" -// The policy isn't attached to the specified target in the specified root. -// -// * ErrCodePolicyNotFoundException "PolicyNotFoundException" -// We can't find a policy with the PolicyId that you specified. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTargetNotFoundException "TargetNotFoundException" -// We can't find a root, OU, or account with the TargetId that you specified. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DetachPolicy -func (c *Organizations) DetachPolicy(input *DetachPolicyInput) (*DetachPolicyOutput, error) { - req, out := c.DetachPolicyRequest(input) - return out, req.Send() -} - -// DetachPolicyWithContext is the same as DetachPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DetachPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) DetachPolicyWithContext(ctx aws.Context, input *DetachPolicyInput, opts ...request.Option) (*DetachPolicyOutput, error) { - req, out := c.DetachPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableAWSServiceAccess = "DisableAWSServiceAccess" - -// DisableAWSServiceAccessRequest generates a "aws/request.Request" representing the -// client's request for the DisableAWSServiceAccess operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableAWSServiceAccess for more information on using the DisableAWSServiceAccess -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableAWSServiceAccessRequest method. -// req, resp := client.DisableAWSServiceAccessRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DisableAWSServiceAccess -func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceAccessInput) (req *request.Request, output *DisableAWSServiceAccessOutput) { - op := &request.Operation{ - Name: opDisableAWSServiceAccess, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableAWSServiceAccessInput{} - } - - output = &DisableAWSServiceAccessOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisableAWSServiceAccess API operation for AWS Organizations. -// -// Disables the integration of an AWS service (the service that is specified -// by ServicePrincipal) with AWS Organizations. When you disable integration, -// the specified service no longer can create a service-linked role (http://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html) -// in new accounts in your organization. This means the service can't perform -// operations on your behalf on any new accounts in your organization. The service -// can still perform operations in older accounts until the service completes -// its clean-up from AWS Organizations. -// -// We recommend that you disable integration between AWS Organizations and the -// specified AWS service by using the console or commands that are provided -// by the specified service. Doing so ensures that the other service is aware -// that it can clean up any resources that are required only for the integration. -// How the service cleans up its resources in the organization's accounts depends -// on that service. For more information, see the documentation for the other -// AWS service. -// -// After you perform the DisableAWSServiceAccessoperation, the specified service can no longer perform operations in your -// organization's accounts unless the operations are explicitly permitted by -// the IAM policies that are attached to your roles. -// -// For more information about integrating other services with AWS Organizations, -// including the list of services that work with Organizations, see Integrating -// AWS Organizations with Other AWS Services (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)in the AWS Organizations User Guide -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation DisableAWSServiceAccess for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeConstraintViolationException "ConstraintViolationException" -// Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last service control policy (SCP) from -// an OU or root, inviting or creating too many accounts to the organization, -// or attaching too many policies to an account, OU, or root. This exception -// includes a reason that contains additional information about the violated -// limit. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. If you need more accounts, -// contactAWS Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. -// -// Or the number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations or -// contact AWS Support to request an increase in the number of accounts. -// -// Deleted and closed accounts still count toward your limit. -// -// If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs -// that you can have in an organization. -// -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is -// too many levels deep. -// -// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation -// that requires the organization to be configured to support all features. -// An organization that supports only consolidated billing features can't -// perform this operation. -// -// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of -// policies that you can have in an organization. -// -// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity -// at one time. -// -// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity that would cause the entity to have fewer than the -// minimum number of policies of a certain type required. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that doesn't yet have enough information to exist -// as a standalone account. This account requires you to first agree to the -// AWS Customer Agreement. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that doesn't yet have enough information -// to exist as a standalone account. This account requires you to first complete -// phone verification. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this master account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation -// with this member account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can create in one day. -// -// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account -// in this organization, you first must migrate the organization's master -// account to the marketplace that corresponds to the master account's address. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be associated -// with the same marketplace. -// -// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you -// must first provide contact a valid address and phone number for the master -// account. Then try the operation again. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DisableAWSServiceAccess -func (c *Organizations) DisableAWSServiceAccess(input *DisableAWSServiceAccessInput) (*DisableAWSServiceAccessOutput, error) { - req, out := c.DisableAWSServiceAccessRequest(input) - return out, req.Send() -} - -// DisableAWSServiceAccessWithContext is the same as DisableAWSServiceAccess with the addition of -// the ability to pass a context and additional request options. -// -// See DisableAWSServiceAccess for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) DisableAWSServiceAccessWithContext(ctx aws.Context, input *DisableAWSServiceAccessInput, opts ...request.Option) (*DisableAWSServiceAccessOutput, error) { - req, out := c.DisableAWSServiceAccessRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisablePolicyType = "DisablePolicyType" - -// DisablePolicyTypeRequest generates a "aws/request.Request" representing the -// client's request for the DisablePolicyType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisablePolicyType for more information on using the DisablePolicyType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisablePolicyTypeRequest method. -// req, resp := client.DisablePolicyTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DisablePolicyType -func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) (req *request.Request, output *DisablePolicyTypeOutput) { - op := &request.Operation{ - Name: opDisablePolicyType, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisablePolicyTypeInput{} - } - - output = &DisablePolicyTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisablePolicyType API operation for AWS Organizations. -// -// Disables an organizational control policy type in a root. A policy of a certain -// type can be attached to entities in a root only if that type is enabled in -// the root. After you perform this operation, you no longer can attach policies -// of the specified type to that root or to any organizational unit (OU) or -// account in that root. You can undo this by using the EnablePolicyType operation. -// -// This operation can be called only from the organization's master account. -// -// If you disable a policy type for a root, it still shows as enabled for the -// organization if all features are enabled in that organization. Use ListRoots -// to see the status of policy types for a specified root. Use DescribeOrganization -// to see the status of policy types in the organization. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation DisablePolicyType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeConstraintViolationException "ConstraintViolationException" -// Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last service control policy (SCP) from -// an OU or root, inviting or creating too many accounts to the organization, -// or attaching too many policies to an account, OU, or root. This exception -// includes a reason that contains additional information about the violated -// limit. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. If you need more accounts, -// contactAWS Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. -// -// Or the number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations or -// contact AWS Support to request an increase in the number of accounts. -// -// Deleted and closed accounts still count toward your limit. -// -// If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs -// that you can have in an organization. -// -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is -// too many levels deep. -// -// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation -// that requires the organization to be configured to support all features. -// An organization that supports only consolidated billing features can't -// perform this operation. -// -// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of -// policies that you can have in an organization. -// -// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity -// at one time. -// -// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity that would cause the entity to have fewer than the -// minimum number of policies of a certain type required. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that doesn't yet have enough information to exist -// as a standalone account. This account requires you to first agree to the -// AWS Customer Agreement. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that doesn't yet have enough information -// to exist as a standalone account. This account requires you to first complete -// phone verification. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this master account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation -// with this member account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can create in one day. -// -// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account -// in this organization, you first must migrate the organization's master -// account to the marketplace that corresponds to the master account's address. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be associated -// with the same marketplace. -// -// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you -// must first provide contact a valid address and phone number for the master -// account. Then try the operation again. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodePolicyTypeNotEnabledException "PolicyTypeNotEnabledException" -// The specified policy type isn't currently enabled in this root. You can't -// attach policies of the specified type to entities in a root until you enable -// that type in the root. For more information, see Enabling All Features in -// Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) -// in the AWS Organizations User Guide. -// -// * ErrCodeRootNotFoundException "RootNotFoundException" -// We can't find a root with the RootId that you specified. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DisablePolicyType -func (c *Organizations) DisablePolicyType(input *DisablePolicyTypeInput) (*DisablePolicyTypeOutput, error) { - req, out := c.DisablePolicyTypeRequest(input) - return out, req.Send() -} - -// DisablePolicyTypeWithContext is the same as DisablePolicyType with the addition of -// the ability to pass a context and additional request options. -// -// See DisablePolicyType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) DisablePolicyTypeWithContext(ctx aws.Context, input *DisablePolicyTypeInput, opts ...request.Option) (*DisablePolicyTypeOutput, error) { - req, out := c.DisablePolicyTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableAWSServiceAccess = "EnableAWSServiceAccess" - -// EnableAWSServiceAccessRequest generates a "aws/request.Request" representing the -// client's request for the EnableAWSServiceAccess operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableAWSServiceAccess for more information on using the EnableAWSServiceAccess -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableAWSServiceAccessRequest method. -// req, resp := client.EnableAWSServiceAccessRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnableAWSServiceAccess -func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAccessInput) (req *request.Request, output *EnableAWSServiceAccessOutput) { - op := &request.Operation{ - Name: opEnableAWSServiceAccess, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableAWSServiceAccessInput{} - } - - output = &EnableAWSServiceAccessOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableAWSServiceAccess API operation for AWS Organizations. -// -// Enables the integration of an AWS service (the service that is specified -// by ServicePrincipal) with AWS Organizations. When you enable integration, -// you allow the specified service to create a service-linked role (http://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html) -// in all the accounts in your organization. This allows the service to perform -// operations on your behalf in your organization and its accounts. -// -// We recommend that you enable integration between AWS Organizations and the -// specified AWS service by using the console or commands that are provided -// by the specified service. Doing so ensures that the service is aware that -// it can create the resources that are required for the integration. How the -// service creates those resources in the organization's accounts depends on -// that service. For more information, see the documentation for the other AWS -// service. -// -// For more information about enabling services to integrate with AWS Organizations, -// see Integrating AWS Organizations with Other AWS Services (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) -// in the AWS Organizations User Guide. -// -// This operation can be called only from the organization's master account -// and only if the organization has enabled all features (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation EnableAWSServiceAccess for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeConstraintViolationException "ConstraintViolationException" -// Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last service control policy (SCP) from -// an OU or root, inviting or creating too many accounts to the organization, -// or attaching too many policies to an account, OU, or root. This exception -// includes a reason that contains additional information about the violated -// limit. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. If you need more accounts, -// contactAWS Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. -// -// Or the number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations or -// contact AWS Support to request an increase in the number of accounts. -// -// Deleted and closed accounts still count toward your limit. -// -// If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs -// that you can have in an organization. -// -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is -// too many levels deep. -// -// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation -// that requires the organization to be configured to support all features. -// An organization that supports only consolidated billing features can't -// perform this operation. -// -// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of -// policies that you can have in an organization. -// -// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity -// at one time. -// -// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity that would cause the entity to have fewer than the -// minimum number of policies of a certain type required. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that doesn't yet have enough information to exist -// as a standalone account. This account requires you to first agree to the -// AWS Customer Agreement. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that doesn't yet have enough information -// to exist as a standalone account. This account requires you to first complete -// phone verification. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this master account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation -// with this member account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can create in one day. -// -// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account -// in this organization, you first must migrate the organization's master -// account to the marketplace that corresponds to the master account's address. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be associated -// with the same marketplace. -// -// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you -// must first provide contact a valid address and phone number for the master -// account. Then try the operation again. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnableAWSServiceAccess -func (c *Organizations) EnableAWSServiceAccess(input *EnableAWSServiceAccessInput) (*EnableAWSServiceAccessOutput, error) { - req, out := c.EnableAWSServiceAccessRequest(input) - return out, req.Send() -} - -// EnableAWSServiceAccessWithContext is the same as EnableAWSServiceAccess with the addition of -// the ability to pass a context and additional request options. -// -// See EnableAWSServiceAccess for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) EnableAWSServiceAccessWithContext(ctx aws.Context, input *EnableAWSServiceAccessInput, opts ...request.Option) (*EnableAWSServiceAccessOutput, error) { - req, out := c.EnableAWSServiceAccessRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableAllFeatures = "EnableAllFeatures" - -// EnableAllFeaturesRequest generates a "aws/request.Request" representing the -// client's request for the EnableAllFeatures operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableAllFeatures for more information on using the EnableAllFeatures -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableAllFeaturesRequest method. -// req, resp := client.EnableAllFeaturesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnableAllFeatures -func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) (req *request.Request, output *EnableAllFeaturesOutput) { - op := &request.Operation{ - Name: opEnableAllFeatures, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableAllFeaturesInput{} - } - - output = &EnableAllFeaturesOutput{} - req = c.newRequest(op, input, output) - return -} - -// EnableAllFeatures API operation for AWS Organizations. -// -// Enables all features in an organization. This enables the use of organization -// policies that can restrict the services and actions that can be called in -// each account. Until you enable all features, you have access only to consolidated -// billing, and you can't use any of the advanced account administration features -// that AWS Organizations supports. For more information, see Enabling All Features -// in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) -// in the AWS Organizations User Guide. -// -// This operation is required only for organizations that were created explicitly -// with only the consolidated billing features enabled. Calling this operation -// sends a handshake to every invited account in the organization. The feature -// set change can be finalized and the additional features enabled only after -// all administrators in the invited accounts approve the change by accepting -// the handshake. -// -// After you enable all features, you can separately enable or disable individual -// policy types in a root using EnablePolicyType and DisablePolicyType. To see -// the status of policy types in a root, use ListRoots. -// -// After all invited member accounts accept the handshake, you finalize the -// feature set change by accepting the handshake that contains "Action": "ENABLE_ALL_FEATURES". -// This completes the change. -// -// After you enable all features in your organization, the master account in -// the organization can apply policies on all member accounts. These policies -// can restrict what users and even administrators in those accounts can do. -// The master account can apply policies that prevent accounts from leaving -// the organization. Ensure that your account administrators are aware of this. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation EnableAllFeatures for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeHandshakeConstraintViolationException "HandshakeConstraintViolationException" -// The requested operation would violate the constraint identified in the reason -// code. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. Note that deleted and closed -// accounts still count toward your limit. -// -// If you get this exception immediately after creating the organization, wait -// one hour and try again. If after an hour it continues to fail with this -// error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because -// the invited account is already a member of an organization. -// -// * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid -// because the organization has already enabled all features. -// -// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations -// to join an organization while it's in the process of enabling all features. -// You can resume inviting accounts after you finalize the process when all -// accounts have agreed to the change. -// -// * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an -// account that doesn't have a payment instrument, such as a credit card, -// associated with it. -// -// * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because -// the account is from a different marketplace than the accounts in the organization. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be from the same -// marketplace. -// -// * ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to -// change the membership of an account too quickly after its previous change. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnableAllFeatures -func (c *Organizations) EnableAllFeatures(input *EnableAllFeaturesInput) (*EnableAllFeaturesOutput, error) { - req, out := c.EnableAllFeaturesRequest(input) - return out, req.Send() -} - -// EnableAllFeaturesWithContext is the same as EnableAllFeatures with the addition of -// the ability to pass a context and additional request options. -// -// See EnableAllFeatures for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) EnableAllFeaturesWithContext(ctx aws.Context, input *EnableAllFeaturesInput, opts ...request.Option) (*EnableAllFeaturesOutput, error) { - req, out := c.EnableAllFeaturesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnablePolicyType = "EnablePolicyType" - -// EnablePolicyTypeRequest generates a "aws/request.Request" representing the -// client's request for the EnablePolicyType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnablePolicyType for more information on using the EnablePolicyType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnablePolicyTypeRequest method. -// req, resp := client.EnablePolicyTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnablePolicyType -func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (req *request.Request, output *EnablePolicyTypeOutput) { - op := &request.Operation{ - Name: opEnablePolicyType, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnablePolicyTypeInput{} - } - - output = &EnablePolicyTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// EnablePolicyType API operation for AWS Organizations. -// -// Enables a policy type in a root. After you enable a policy type in a root, -// you can attach policies of that type to the root, any organizational unit -// (OU), or account in that root. You can undo this by using the DisablePolicyType -// operation. -// -// This operation can be called only from the organization's master account. -// -// You can enable a policy type in a root only if that policy type is available -// in the organization. Use DescribeOrganization to view the status of available -// policy types in the organization. -// -// To view the status of policy type in a root, use ListRoots. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation EnablePolicyType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeConstraintViolationException "ConstraintViolationException" -// Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last service control policy (SCP) from -// an OU or root, inviting or creating too many accounts to the organization, -// or attaching too many policies to an account, OU, or root. This exception -// includes a reason that contains additional information about the violated -// limit. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. If you need more accounts, -// contactAWS Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. -// -// Or the number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations or -// contact AWS Support to request an increase in the number of accounts. -// -// Deleted and closed accounts still count toward your limit. -// -// If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs -// that you can have in an organization. -// -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is -// too many levels deep. -// -// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation -// that requires the organization to be configured to support all features. -// An organization that supports only consolidated billing features can't -// perform this operation. -// -// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of -// policies that you can have in an organization. -// -// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity -// at one time. -// -// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity that would cause the entity to have fewer than the -// minimum number of policies of a certain type required. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that doesn't yet have enough information to exist -// as a standalone account. This account requires you to first agree to the -// AWS Customer Agreement. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that doesn't yet have enough information -// to exist as a standalone account. This account requires you to first complete -// phone verification. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this master account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation -// with this member account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can create in one day. -// -// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account -// in this organization, you first must migrate the organization's master -// account to the marketplace that corresponds to the master account's address. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be associated -// with the same marketplace. -// -// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you -// must first provide contact a valid address and phone number for the master -// account. Then try the operation again. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodePolicyTypeAlreadyEnabledException "PolicyTypeAlreadyEnabledException" -// The specified policy type is already enabled in the specified root. -// -// * ErrCodeRootNotFoundException "RootNotFoundException" -// We can't find a root with the RootId that you specified. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// * ErrCodePolicyTypeNotAvailableForOrganizationException "PolicyTypeNotAvailableForOrganizationException" -// You can't use the specified policy type with the feature set currently enabled -// for this organization. For example, you can enable SCPs only after you enable -// all features in the organization. For more information, see Enabling and -// Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) -// in the AWS Organizations User Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnablePolicyType -func (c *Organizations) EnablePolicyType(input *EnablePolicyTypeInput) (*EnablePolicyTypeOutput, error) { - req, out := c.EnablePolicyTypeRequest(input) - return out, req.Send() -} - -// EnablePolicyTypeWithContext is the same as EnablePolicyType with the addition of -// the ability to pass a context and additional request options. -// -// See EnablePolicyType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) EnablePolicyTypeWithContext(ctx aws.Context, input *EnablePolicyTypeInput, opts ...request.Option) (*EnablePolicyTypeOutput, error) { - req, out := c.EnablePolicyTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInviteAccountToOrganization = "InviteAccountToOrganization" - -// InviteAccountToOrganizationRequest generates a "aws/request.Request" representing the -// client's request for the InviteAccountToOrganization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See InviteAccountToOrganization for more information on using the InviteAccountToOrganization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the InviteAccountToOrganizationRequest method. -// req, resp := client.InviteAccountToOrganizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/InviteAccountToOrganization -func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountToOrganizationInput) (req *request.Request, output *InviteAccountToOrganizationOutput) { - op := &request.Operation{ - Name: opInviteAccountToOrganization, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &InviteAccountToOrganizationInput{} - } - - output = &InviteAccountToOrganizationOutput{} - req = c.newRequest(op, input, output) - return -} - -// InviteAccountToOrganization API operation for AWS Organizations. -// -// Sends an invitation to another account to join your organization as a member -// account. Organizations sends email on your behalf to the email address that -// is associated with the other account's owner. The invitation is implemented -// as a Handshake whose details are in the response. -// -// You can invite AWS accounts only from the same seller as the master account. -// For example, if your organization's master account was created by Amazon -// Internet Services Pvt. Ltd (AISPL), an AWS seller in India, then you can -// only invite other AISPL accounts to your organization. You can't combine -// accounts from AISPL and AWS, or any other AWS seller. For more information, -// see Consolidated Billing in India (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/useconsolidatedbilliing-India.html). -// -// If you receive an exception that indicates that you exceeded your account -// limits for the organization or that the operation failed because your organization -// is still initializing, wait one hour and then try again. If the error persists -// after an hour, then contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation InviteAccountToOrganization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeAccountOwnerNotVerifiedException "AccountOwnerNotVerifiedException" -// You can't invite an existing account to your organization until you verify -// that you own the email address associated with the master account. For more -// information, see Email Address Verification (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification) -// in the AWS Organizations User Guide. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeHandshakeConstraintViolationException "HandshakeConstraintViolationException" -// The requested operation would violate the constraint identified in the reason -// code. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. Note that deleted and closed -// accounts still count toward your limit. -// -// If you get this exception immediately after creating the organization, wait -// one hour and try again. If after an hour it continues to fail with this -// error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because -// the invited account is already a member of an organization. -// -// * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid -// because the organization has already enabled all features. -// -// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations -// to join an organization while it's in the process of enabling all features. -// You can resume inviting accounts after you finalize the process when all -// accounts have agreed to the change. -// -// * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an -// account that doesn't have a payment instrument, such as a credit card, -// associated with it. -// -// * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because -// the account is from a different marketplace than the accounts in the organization. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be from the same -// marketplace. -// -// * ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to -// change the membership of an account too quickly after its previous change. -// -// * ErrCodeDuplicateHandshakeException "DuplicateHandshakeException" -// A handshake with the same action and target already exists. For example, -// if you invited an account to join your organization, the invited account -// might already have a pending invitation from this organization. If you intend -// to resend an invitation to an account, ensure that existing handshakes that -// might be considered duplicates are canceled or declined. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeFinalizingOrganizationException "FinalizingOrganizationException" -// AWS Organizations couldn't perform the operation because your organization -// hasn't finished initializing. This can take up to an hour. Try again later. -// If after one hour you continue to receive this error, contact AWS Support -// (https://console.aws.amazon.com/support/home#/). -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/InviteAccountToOrganization -func (c *Organizations) InviteAccountToOrganization(input *InviteAccountToOrganizationInput) (*InviteAccountToOrganizationOutput, error) { - req, out := c.InviteAccountToOrganizationRequest(input) - return out, req.Send() -} - -// InviteAccountToOrganizationWithContext is the same as InviteAccountToOrganization with the addition of -// the ability to pass a context and additional request options. -// -// See InviteAccountToOrganization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) InviteAccountToOrganizationWithContext(ctx aws.Context, input *InviteAccountToOrganizationInput, opts ...request.Option) (*InviteAccountToOrganizationOutput, error) { - req, out := c.InviteAccountToOrganizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opLeaveOrganization = "LeaveOrganization" - -// LeaveOrganizationRequest generates a "aws/request.Request" representing the -// client's request for the LeaveOrganization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See LeaveOrganization for more information on using the LeaveOrganization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the LeaveOrganizationRequest method. -// req, resp := client.LeaveOrganizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/LeaveOrganization -func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) (req *request.Request, output *LeaveOrganizationOutput) { - op := &request.Operation{ - Name: opLeaveOrganization, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &LeaveOrganizationInput{} - } - - output = &LeaveOrganizationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// LeaveOrganization API operation for AWS Organizations. -// -// Removes a member account from its parent organization. This version of the -// operation is performed by the account that wants to leave. To remove a member -// account as a user in the master account, use RemoveAccountFromOrganization -// instead. -// -// This operation can be called only from a member account in the organization. -// -// The master account in an organization with all features enabled can set service -// control policies (SCPs) that can restrict what administrators of member accounts -// can do, including preventing them from successfully calling LeaveOrganization -// and leaving the organization. -// -// You can leave an organization as a member account only if the account is -// configured with the information required to operate as a standalone account. -// When you create an account in an organization using the AWS Organizations -// console, API, or CLI commands, the information required of standalone accounts -// is not automatically collected. For each account that you want to make standalone, -// you must accept the End User License Agreement (EULA), choose a support plan, -// provide and verify the required contact information, and provide a current -// payment method. AWS uses the payment method to charge for any billable (not -// free tier) AWS activity that occurs while the account is not attached to -// an organization. Follow the steps at To leave an organization when all required -// account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// You can leave an organization only after you enable IAM user access to billing -// in your account. For more information, see Activating Access to the Billing -// and Cost Management Console (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate) -// in the AWS Billing and Cost Management User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation LeaveOrganization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAccountNotFoundException "AccountNotFoundException" -// We can't find an AWS account with the AccountId that you specified, or the -// account whose credentials you used to make this request isn't a member of -// an organization. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeConstraintViolationException "ConstraintViolationException" -// Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last service control policy (SCP) from -// an OU or root, inviting or creating too many accounts to the organization, -// or attaching too many policies to an account, OU, or root. This exception -// includes a reason that contains additional information about the violated -// limit. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. If you need more accounts, -// contactAWS Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. -// -// Or the number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations or -// contact AWS Support to request an increase in the number of accounts. -// -// Deleted and closed accounts still count toward your limit. -// -// If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs -// that you can have in an organization. -// -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is -// too many levels deep. -// -// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation -// that requires the organization to be configured to support all features. -// An organization that supports only consolidated billing features can't -// perform this operation. -// -// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of -// policies that you can have in an organization. -// -// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity -// at one time. -// -// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity that would cause the entity to have fewer than the -// minimum number of policies of a certain type required. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that doesn't yet have enough information to exist -// as a standalone account. This account requires you to first agree to the -// AWS Customer Agreement. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that doesn't yet have enough information -// to exist as a standalone account. This account requires you to first complete -// phone verification. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this master account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation -// with this member account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can create in one day. -// -// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account -// in this organization, you first must migrate the organization's master -// account to the marketplace that corresponds to the master account's address. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be associated -// with the same marketplace. -// -// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you -// must first provide contact a valid address and phone number for the master -// account. Then try the operation again. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeMasterCannotLeaveOrganizationException "MasterCannotLeaveOrganizationException" -// You can't remove a master account from an organization. If you want the master -// account to become a member account in another organization, you must first -// delete the current organization of the master account. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/LeaveOrganization -func (c *Organizations) LeaveOrganization(input *LeaveOrganizationInput) (*LeaveOrganizationOutput, error) { - req, out := c.LeaveOrganizationRequest(input) - return out, req.Send() -} - -// LeaveOrganizationWithContext is the same as LeaveOrganization with the addition of -// the ability to pass a context and additional request options. -// -// See LeaveOrganization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) LeaveOrganizationWithContext(ctx aws.Context, input *LeaveOrganizationInput, opts ...request.Option) (*LeaveOrganizationOutput, error) { - req, out := c.LeaveOrganizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAWSServiceAccessForOrganization = "ListAWSServiceAccessForOrganization" - -// ListAWSServiceAccessForOrganizationRequest generates a "aws/request.Request" representing the -// client's request for the ListAWSServiceAccessForOrganization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAWSServiceAccessForOrganization for more information on using the ListAWSServiceAccessForOrganization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAWSServiceAccessForOrganizationRequest method. -// req, resp := client.ListAWSServiceAccessForOrganizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAWSServiceAccessForOrganization -func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAWSServiceAccessForOrganizationInput) (req *request.Request, output *ListAWSServiceAccessForOrganizationOutput) { - op := &request.Operation{ - Name: opListAWSServiceAccessForOrganization, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListAWSServiceAccessForOrganizationInput{} - } - - output = &ListAWSServiceAccessForOrganizationOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAWSServiceAccessForOrganization API operation for AWS Organizations. -// -// Returns a list of the AWS services that you enabled to integrate with your -// organization. After a service on this list creates the resources that it -// requires for the integration, it can perform operations on your organization -// and its accounts. -// -// For more information about integrating other services with AWS Organizations, -// including the list of services that currently work with Organizations, see -// Integrating AWS Organizations with Other AWS Services (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) -// in the AWS Organizations User Guide. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation ListAWSServiceAccessForOrganization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConstraintViolationException "ConstraintViolationException" -// Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last service control policy (SCP) from -// an OU or root, inviting or creating too many accounts to the organization, -// or attaching too many policies to an account, OU, or root. This exception -// includes a reason that contains additional information about the violated -// limit. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. If you need more accounts, -// contactAWS Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. -// -// Or the number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations or -// contact AWS Support to request an increase in the number of accounts. -// -// Deleted and closed accounts still count toward your limit. -// -// If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs -// that you can have in an organization. -// -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is -// too many levels deep. -// -// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation -// that requires the organization to be configured to support all features. -// An organization that supports only consolidated billing features can't -// perform this operation. -// -// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of -// policies that you can have in an organization. -// -// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity -// at one time. -// -// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity that would cause the entity to have fewer than the -// minimum number of policies of a certain type required. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that doesn't yet have enough information to exist -// as a standalone account. This account requires you to first agree to the -// AWS Customer Agreement. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that doesn't yet have enough information -// to exist as a standalone account. This account requires you to first complete -// phone verification. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this master account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation -// with this member account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can create in one day. -// -// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account -// in this organization, you first must migrate the organization's master -// account to the marketplace that corresponds to the master account's address. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be associated -// with the same marketplace. -// -// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you -// must first provide contact a valid address and phone number for the master -// account. Then try the operation again. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAWSServiceAccessForOrganization -func (c *Organizations) ListAWSServiceAccessForOrganization(input *ListAWSServiceAccessForOrganizationInput) (*ListAWSServiceAccessForOrganizationOutput, error) { - req, out := c.ListAWSServiceAccessForOrganizationRequest(input) - return out, req.Send() -} - -// ListAWSServiceAccessForOrganizationWithContext is the same as ListAWSServiceAccessForOrganization with the addition of -// the ability to pass a context and additional request options. -// -// See ListAWSServiceAccessForOrganization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListAWSServiceAccessForOrganizationWithContext(ctx aws.Context, input *ListAWSServiceAccessForOrganizationInput, opts ...request.Option) (*ListAWSServiceAccessForOrganizationOutput, error) { - req, out := c.ListAWSServiceAccessForOrganizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAWSServiceAccessForOrganizationPages iterates over the pages of a ListAWSServiceAccessForOrganization operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAWSServiceAccessForOrganization 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 ListAWSServiceAccessForOrganization operation. -// pageNum := 0 -// err := client.ListAWSServiceAccessForOrganizationPages(params, -// func(page *ListAWSServiceAccessForOrganizationOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Organizations) ListAWSServiceAccessForOrganizationPages(input *ListAWSServiceAccessForOrganizationInput, fn func(*ListAWSServiceAccessForOrganizationOutput, bool) bool) error { - return c.ListAWSServiceAccessForOrganizationPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAWSServiceAccessForOrganizationPagesWithContext same as ListAWSServiceAccessForOrganizationPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListAWSServiceAccessForOrganizationPagesWithContext(ctx aws.Context, input *ListAWSServiceAccessForOrganizationInput, fn func(*ListAWSServiceAccessForOrganizationOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAWSServiceAccessForOrganizationInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAWSServiceAccessForOrganizationRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAWSServiceAccessForOrganizationOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListAccounts = "ListAccounts" - -// ListAccountsRequest generates a "aws/request.Request" representing the -// client's request for the ListAccounts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAccounts for more information on using the ListAccounts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAccountsRequest method. -// req, resp := client.ListAccountsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAccounts -func (c *Organizations) ListAccountsRequest(input *ListAccountsInput) (req *request.Request, output *ListAccountsOutput) { - op := &request.Operation{ - Name: opListAccounts, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListAccountsInput{} - } - - output = &ListAccountsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAccounts API operation for AWS Organizations. -// -// Lists all the accounts in the organization. To request only the accounts -// in a specified root or organizational unit (OU), use the ListAccountsForParent -// operation instead. -// -// Always check the NextToken response parameter for a null value when calling -// a List* operation. These operations can occasionally return an empty set -// of results even when there are more results available. The NextToken response -// parameter value is nullonly when there are no more results to display. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation ListAccounts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAccounts -func (c *Organizations) ListAccounts(input *ListAccountsInput) (*ListAccountsOutput, error) { - req, out := c.ListAccountsRequest(input) - return out, req.Send() -} - -// ListAccountsWithContext is the same as ListAccounts with the addition of -// the ability to pass a context and additional request options. -// -// See ListAccounts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListAccountsWithContext(ctx aws.Context, input *ListAccountsInput, opts ...request.Option) (*ListAccountsOutput, error) { - req, out := c.ListAccountsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAccountsPages iterates over the pages of a ListAccounts operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAccounts 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 ListAccounts operation. -// pageNum := 0 -// err := client.ListAccountsPages(params, -// func(page *ListAccountsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Organizations) ListAccountsPages(input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool) error { - return c.ListAccountsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAccountsPagesWithContext same as ListAccountsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListAccountsPagesWithContext(ctx aws.Context, input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAccountsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAccountsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAccountsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListAccountsForParent = "ListAccountsForParent" - -// ListAccountsForParentRequest generates a "aws/request.Request" representing the -// client's request for the ListAccountsForParent operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAccountsForParent for more information on using the ListAccountsForParent -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAccountsForParentRequest method. -// req, resp := client.ListAccountsForParentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAccountsForParent -func (c *Organizations) ListAccountsForParentRequest(input *ListAccountsForParentInput) (req *request.Request, output *ListAccountsForParentOutput) { - op := &request.Operation{ - Name: opListAccountsForParent, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListAccountsForParentInput{} - } - - output = &ListAccountsForParentOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAccountsForParent API operation for AWS Organizations. -// -// Lists the accounts in an organization that are contained by the specified -// target root or organizational unit (OU). If you specify the root, you get -// a list of all the accounts that are not in any OU. If you specify an OU, -// you get a list of all the accounts in only that OU, and not in any child -// OUs. To get a list of all accounts in the organization, use the ListAccounts -// operation. -// -// Always check the NextToken response parameter for a null value when calling -// a List* operation. These operations can occasionally return an empty set -// of results even when there are more results available. The NextToken response -// parameter value is nullonly when there are no more results to display. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation ListAccountsForParent for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeParentNotFoundException "ParentNotFoundException" -// We can't find a root or OU with the ParentId that you specified. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAccountsForParent -func (c *Organizations) ListAccountsForParent(input *ListAccountsForParentInput) (*ListAccountsForParentOutput, error) { - req, out := c.ListAccountsForParentRequest(input) - return out, req.Send() -} - -// ListAccountsForParentWithContext is the same as ListAccountsForParent with the addition of -// the ability to pass a context and additional request options. -// -// See ListAccountsForParent for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListAccountsForParentWithContext(ctx aws.Context, input *ListAccountsForParentInput, opts ...request.Option) (*ListAccountsForParentOutput, error) { - req, out := c.ListAccountsForParentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAccountsForParentPages iterates over the pages of a ListAccountsForParent operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAccountsForParent 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 ListAccountsForParent operation. -// pageNum := 0 -// err := client.ListAccountsForParentPages(params, -// func(page *ListAccountsForParentOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Organizations) ListAccountsForParentPages(input *ListAccountsForParentInput, fn func(*ListAccountsForParentOutput, bool) bool) error { - return c.ListAccountsForParentPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAccountsForParentPagesWithContext same as ListAccountsForParentPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListAccountsForParentPagesWithContext(ctx aws.Context, input *ListAccountsForParentInput, fn func(*ListAccountsForParentOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAccountsForParentInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAccountsForParentRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAccountsForParentOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListChildren = "ListChildren" - -// ListChildrenRequest generates a "aws/request.Request" representing the -// client's request for the ListChildren operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListChildren for more information on using the ListChildren -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListChildrenRequest method. -// req, resp := client.ListChildrenRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListChildren -func (c *Organizations) ListChildrenRequest(input *ListChildrenInput) (req *request.Request, output *ListChildrenOutput) { - op := &request.Operation{ - Name: opListChildren, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListChildrenInput{} - } - - output = &ListChildrenOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListChildren API operation for AWS Organizations. -// -// Lists all of the organizational units (OUs) or accounts that are contained -// in the specified parent OU or root. This operation, along with ListParents -// enables you to traverse the tree structure that makes up this root. -// -// Always check the NextToken response parameter for a null value when calling -// a List* operation. These operations can occasionally return an empty set -// of results even when there are more results available. The NextToken response -// parameter value is nullonly when there are no more results to display. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation ListChildren for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeParentNotFoundException "ParentNotFoundException" -// We can't find a root or OU with the ParentId that you specified. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListChildren -func (c *Organizations) ListChildren(input *ListChildrenInput) (*ListChildrenOutput, error) { - req, out := c.ListChildrenRequest(input) - return out, req.Send() -} - -// ListChildrenWithContext is the same as ListChildren with the addition of -// the ability to pass a context and additional request options. -// -// See ListChildren for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListChildrenWithContext(ctx aws.Context, input *ListChildrenInput, opts ...request.Option) (*ListChildrenOutput, error) { - req, out := c.ListChildrenRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListChildrenPages iterates over the pages of a ListChildren operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListChildren 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 ListChildren operation. -// pageNum := 0 -// err := client.ListChildrenPages(params, -// func(page *ListChildrenOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Organizations) ListChildrenPages(input *ListChildrenInput, fn func(*ListChildrenOutput, bool) bool) error { - return c.ListChildrenPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListChildrenPagesWithContext same as ListChildrenPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListChildrenPagesWithContext(ctx aws.Context, input *ListChildrenInput, fn func(*ListChildrenOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListChildrenInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListChildrenRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListChildrenOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListCreateAccountStatus = "ListCreateAccountStatus" - -// ListCreateAccountStatusRequest generates a "aws/request.Request" representing the -// client's request for the ListCreateAccountStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListCreateAccountStatus for more information on using the ListCreateAccountStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListCreateAccountStatusRequest method. -// req, resp := client.ListCreateAccountStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListCreateAccountStatus -func (c *Organizations) ListCreateAccountStatusRequest(input *ListCreateAccountStatusInput) (req *request.Request, output *ListCreateAccountStatusOutput) { - op := &request.Operation{ - Name: opListCreateAccountStatus, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListCreateAccountStatusInput{} - } - - output = &ListCreateAccountStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCreateAccountStatus API operation for AWS Organizations. -// -// Lists the account creation requests that match the specified status that -// is currently being tracked for the organization. -// -// Always check the NextToken response parameter for a null value when calling -// a List* operation. These operations can occasionally return an empty set -// of results even when there are more results available. The NextToken response -// parameter value is nullonly when there are no more results to display. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation ListCreateAccountStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListCreateAccountStatus -func (c *Organizations) ListCreateAccountStatus(input *ListCreateAccountStatusInput) (*ListCreateAccountStatusOutput, error) { - req, out := c.ListCreateAccountStatusRequest(input) - return out, req.Send() -} - -// ListCreateAccountStatusWithContext is the same as ListCreateAccountStatus with the addition of -// the ability to pass a context and additional request options. -// -// See ListCreateAccountStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListCreateAccountStatusWithContext(ctx aws.Context, input *ListCreateAccountStatusInput, opts ...request.Option) (*ListCreateAccountStatusOutput, error) { - req, out := c.ListCreateAccountStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListCreateAccountStatusPages iterates over the pages of a ListCreateAccountStatus operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListCreateAccountStatus 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 ListCreateAccountStatus operation. -// pageNum := 0 -// err := client.ListCreateAccountStatusPages(params, -// func(page *ListCreateAccountStatusOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Organizations) ListCreateAccountStatusPages(input *ListCreateAccountStatusInput, fn func(*ListCreateAccountStatusOutput, bool) bool) error { - return c.ListCreateAccountStatusPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListCreateAccountStatusPagesWithContext same as ListCreateAccountStatusPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListCreateAccountStatusPagesWithContext(ctx aws.Context, input *ListCreateAccountStatusInput, fn func(*ListCreateAccountStatusOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListCreateAccountStatusInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListCreateAccountStatusRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCreateAccountStatusOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListHandshakesForAccount = "ListHandshakesForAccount" - -// ListHandshakesForAccountRequest generates a "aws/request.Request" representing the -// client's request for the ListHandshakesForAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListHandshakesForAccount for more information on using the ListHandshakesForAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListHandshakesForAccountRequest method. -// req, resp := client.ListHandshakesForAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListHandshakesForAccount -func (c *Organizations) ListHandshakesForAccountRequest(input *ListHandshakesForAccountInput) (req *request.Request, output *ListHandshakesForAccountOutput) { - op := &request.Operation{ - Name: opListHandshakesForAccount, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListHandshakesForAccountInput{} - } - - output = &ListHandshakesForAccountOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListHandshakesForAccount API operation for AWS Organizations. -// -// Lists the current handshakes that are associated with the account of the -// requesting user. -// -// Handshakes that are ACCEPTED, DECLINED, or CANCELED appear in the results -// of this API for only 30 days after changing to that state. After that they -// are deleted and no longer accessible. -// -// Always check the NextToken response parameter for a null value when calling -// a List* operation. These operations can occasionally return an empty set -// of results even when there are more results available. The NextToken response -// parameter value is nullonly when there are no more results to display. -// -// This operation can be called from any account in the organization. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation ListHandshakesForAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListHandshakesForAccount -func (c *Organizations) ListHandshakesForAccount(input *ListHandshakesForAccountInput) (*ListHandshakesForAccountOutput, error) { - req, out := c.ListHandshakesForAccountRequest(input) - return out, req.Send() -} - -// ListHandshakesForAccountWithContext is the same as ListHandshakesForAccount with the addition of -// the ability to pass a context and additional request options. -// -// See ListHandshakesForAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListHandshakesForAccountWithContext(ctx aws.Context, input *ListHandshakesForAccountInput, opts ...request.Option) (*ListHandshakesForAccountOutput, error) { - req, out := c.ListHandshakesForAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListHandshakesForAccountPages iterates over the pages of a ListHandshakesForAccount operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListHandshakesForAccount 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 ListHandshakesForAccount operation. -// pageNum := 0 -// err := client.ListHandshakesForAccountPages(params, -// func(page *ListHandshakesForAccountOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Organizations) ListHandshakesForAccountPages(input *ListHandshakesForAccountInput, fn func(*ListHandshakesForAccountOutput, bool) bool) error { - return c.ListHandshakesForAccountPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListHandshakesForAccountPagesWithContext same as ListHandshakesForAccountPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListHandshakesForAccountPagesWithContext(ctx aws.Context, input *ListHandshakesForAccountInput, fn func(*ListHandshakesForAccountOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListHandshakesForAccountInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListHandshakesForAccountRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListHandshakesForAccountOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListHandshakesForOrganization = "ListHandshakesForOrganization" - -// ListHandshakesForOrganizationRequest generates a "aws/request.Request" representing the -// client's request for the ListHandshakesForOrganization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListHandshakesForOrganization for more information on using the ListHandshakesForOrganization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListHandshakesForOrganizationRequest method. -// req, resp := client.ListHandshakesForOrganizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListHandshakesForOrganization -func (c *Organizations) ListHandshakesForOrganizationRequest(input *ListHandshakesForOrganizationInput) (req *request.Request, output *ListHandshakesForOrganizationOutput) { - op := &request.Operation{ - Name: opListHandshakesForOrganization, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListHandshakesForOrganizationInput{} - } - - output = &ListHandshakesForOrganizationOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListHandshakesForOrganization API operation for AWS Organizations. -// -// Lists the handshakes that are associated with the organization that the requesting -// user is part of. The ListHandshakesForOrganization operation returns a list -// of handshake structures. Each structure contains details and status about -// a handshake. -// -// Handshakes that are ACCEPTED, DECLINED, or CANCELED appear in the results -// of this API for only 30 days after changing to that state. After that they -// are deleted and no longer accessible. -// -// Always check the NextToken response parameter for a null value when calling -// a List* operation. These operations can occasionally return an empty set -// of results even when there are more results available. The NextToken response -// parameter value is nullonly when there are no more results to display. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation ListHandshakesForOrganization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListHandshakesForOrganization -func (c *Organizations) ListHandshakesForOrganization(input *ListHandshakesForOrganizationInput) (*ListHandshakesForOrganizationOutput, error) { - req, out := c.ListHandshakesForOrganizationRequest(input) - return out, req.Send() -} - -// ListHandshakesForOrganizationWithContext is the same as ListHandshakesForOrganization with the addition of -// the ability to pass a context and additional request options. -// -// See ListHandshakesForOrganization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListHandshakesForOrganizationWithContext(ctx aws.Context, input *ListHandshakesForOrganizationInput, opts ...request.Option) (*ListHandshakesForOrganizationOutput, error) { - req, out := c.ListHandshakesForOrganizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListHandshakesForOrganizationPages iterates over the pages of a ListHandshakesForOrganization operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListHandshakesForOrganization 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 ListHandshakesForOrganization operation. -// pageNum := 0 -// err := client.ListHandshakesForOrganizationPages(params, -// func(page *ListHandshakesForOrganizationOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Organizations) ListHandshakesForOrganizationPages(input *ListHandshakesForOrganizationInput, fn func(*ListHandshakesForOrganizationOutput, bool) bool) error { - return c.ListHandshakesForOrganizationPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListHandshakesForOrganizationPagesWithContext same as ListHandshakesForOrganizationPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListHandshakesForOrganizationPagesWithContext(ctx aws.Context, input *ListHandshakesForOrganizationInput, fn func(*ListHandshakesForOrganizationOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListHandshakesForOrganizationInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListHandshakesForOrganizationRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListHandshakesForOrganizationOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListOrganizationalUnitsForParent = "ListOrganizationalUnitsForParent" - -// ListOrganizationalUnitsForParentRequest generates a "aws/request.Request" representing the -// client's request for the ListOrganizationalUnitsForParent operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListOrganizationalUnitsForParent for more information on using the ListOrganizationalUnitsForParent -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListOrganizationalUnitsForParentRequest method. -// req, resp := client.ListOrganizationalUnitsForParentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListOrganizationalUnitsForParent -func (c *Organizations) ListOrganizationalUnitsForParentRequest(input *ListOrganizationalUnitsForParentInput) (req *request.Request, output *ListOrganizationalUnitsForParentOutput) { - op := &request.Operation{ - Name: opListOrganizationalUnitsForParent, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListOrganizationalUnitsForParentInput{} - } - - output = &ListOrganizationalUnitsForParentOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOrganizationalUnitsForParent API operation for AWS Organizations. -// -// Lists the organizational units (OUs) in a parent organizational unit or root. -// -// Always check the NextToken response parameter for a null value when calling -// a List* operation. These operations can occasionally return an empty set -// of results even when there are more results available. The NextToken response -// parameter value is nullonly when there are no more results to display. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation ListOrganizationalUnitsForParent for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeParentNotFoundException "ParentNotFoundException" -// We can't find a root or OU with the ParentId that you specified. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListOrganizationalUnitsForParent -func (c *Organizations) ListOrganizationalUnitsForParent(input *ListOrganizationalUnitsForParentInput) (*ListOrganizationalUnitsForParentOutput, error) { - req, out := c.ListOrganizationalUnitsForParentRequest(input) - return out, req.Send() -} - -// ListOrganizationalUnitsForParentWithContext is the same as ListOrganizationalUnitsForParent with the addition of -// the ability to pass a context and additional request options. -// -// See ListOrganizationalUnitsForParent for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListOrganizationalUnitsForParentWithContext(ctx aws.Context, input *ListOrganizationalUnitsForParentInput, opts ...request.Option) (*ListOrganizationalUnitsForParentOutput, error) { - req, out := c.ListOrganizationalUnitsForParentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListOrganizationalUnitsForParentPages iterates over the pages of a ListOrganizationalUnitsForParent operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListOrganizationalUnitsForParent 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 ListOrganizationalUnitsForParent operation. -// pageNum := 0 -// err := client.ListOrganizationalUnitsForParentPages(params, -// func(page *ListOrganizationalUnitsForParentOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Organizations) ListOrganizationalUnitsForParentPages(input *ListOrganizationalUnitsForParentInput, fn func(*ListOrganizationalUnitsForParentOutput, bool) bool) error { - return c.ListOrganizationalUnitsForParentPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListOrganizationalUnitsForParentPagesWithContext same as ListOrganizationalUnitsForParentPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListOrganizationalUnitsForParentPagesWithContext(ctx aws.Context, input *ListOrganizationalUnitsForParentInput, fn func(*ListOrganizationalUnitsForParentOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListOrganizationalUnitsForParentInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListOrganizationalUnitsForParentRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListOrganizationalUnitsForParentOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListParents = "ListParents" - -// ListParentsRequest generates a "aws/request.Request" representing the -// client's request for the ListParents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListParents for more information on using the ListParents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListParentsRequest method. -// req, resp := client.ListParentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListParents -func (c *Organizations) ListParentsRequest(input *ListParentsInput) (req *request.Request, output *ListParentsOutput) { - op := &request.Operation{ - Name: opListParents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListParentsInput{} - } - - output = &ListParentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListParents API operation for AWS Organizations. -// -// Lists the root or organizational units (OUs) that serve as the immediate -// parent of the specified child OU or account. This operation, along with ListChildren -// enables you to traverse the tree structure that makes up this root. -// -// Always check the NextToken response parameter for a null value when calling -// a List* operation. These operations can occasionally return an empty set -// of results even when there are more results available. The NextToken response -// parameter value is nullonly when there are no more results to display. -// -// This operation can be called only from the organization's master account. -// -// In the current release, a child can have only a single parent. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation ListParents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeChildNotFoundException "ChildNotFoundException" -// We can't find an organizational unit (OU) or AWS account with the ChildId -// that you specified. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListParents -func (c *Organizations) ListParents(input *ListParentsInput) (*ListParentsOutput, error) { - req, out := c.ListParentsRequest(input) - return out, req.Send() -} - -// ListParentsWithContext is the same as ListParents with the addition of -// the ability to pass a context and additional request options. -// -// See ListParents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListParentsWithContext(ctx aws.Context, input *ListParentsInput, opts ...request.Option) (*ListParentsOutput, error) { - req, out := c.ListParentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListParentsPages iterates over the pages of a ListParents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListParents 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 ListParents operation. -// pageNum := 0 -// err := client.ListParentsPages(params, -// func(page *ListParentsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Organizations) ListParentsPages(input *ListParentsInput, fn func(*ListParentsOutput, bool) bool) error { - return c.ListParentsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListParentsPagesWithContext same as ListParentsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListParentsPagesWithContext(ctx aws.Context, input *ListParentsInput, fn func(*ListParentsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListParentsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListParentsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListParentsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListPolicies = "ListPolicies" - -// ListPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPolicies for more information on using the ListPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPoliciesRequest method. -// req, resp := client.ListPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListPolicies -func (c *Organizations) ListPoliciesRequest(input *ListPoliciesInput) (req *request.Request, output *ListPoliciesOutput) { - op := &request.Operation{ - Name: opListPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListPoliciesInput{} - } - - output = &ListPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPolicies API operation for AWS Organizations. -// -// Retrieves the list of all policies in an organization of a specified type. -// -// Always check the NextToken response parameter for a null value when calling -// a List* operation. These operations can occasionally return an empty set -// of results even when there are more results available. The NextToken response -// parameter value is nullonly when there are no more results to display. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation ListPolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListPolicies -func (c *Organizations) ListPolicies(input *ListPoliciesInput) (*ListPoliciesOutput, error) { - req, out := c.ListPoliciesRequest(input) - return out, req.Send() -} - -// ListPoliciesWithContext is the same as ListPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListPoliciesWithContext(ctx aws.Context, input *ListPoliciesInput, opts ...request.Option) (*ListPoliciesOutput, error) { - req, out := c.ListPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPoliciesPages iterates over the pages of a ListPolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPolicies 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 ListPolicies operation. -// pageNum := 0 -// err := client.ListPoliciesPages(params, -// func(page *ListPoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Organizations) ListPoliciesPages(input *ListPoliciesInput, fn func(*ListPoliciesOutput, bool) bool) error { - return c.ListPoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPoliciesPagesWithContext same as ListPoliciesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListPoliciesPagesWithContext(ctx aws.Context, input *ListPoliciesInput, fn func(*ListPoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPoliciesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListPoliciesForTarget = "ListPoliciesForTarget" - -// ListPoliciesForTargetRequest generates a "aws/request.Request" representing the -// client's request for the ListPoliciesForTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPoliciesForTarget for more information on using the ListPoliciesForTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPoliciesForTargetRequest method. -// req, resp := client.ListPoliciesForTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListPoliciesForTarget -func (c *Organizations) ListPoliciesForTargetRequest(input *ListPoliciesForTargetInput) (req *request.Request, output *ListPoliciesForTargetOutput) { - op := &request.Operation{ - Name: opListPoliciesForTarget, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListPoliciesForTargetInput{} - } - - output = &ListPoliciesForTargetOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPoliciesForTarget API operation for AWS Organizations. -// -// Lists the policies that are directly attached to the specified target root, -// organizational unit (OU), or account. You must specify the policy type that -// you want included in the returned list. -// -// Always check the NextToken response parameter for a null value when calling -// a List* operation. These operations can occasionally return an empty set -// of results even when there are more results available. The NextToken response -// parameter value is nullonly when there are no more results to display. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation ListPoliciesForTarget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTargetNotFoundException "TargetNotFoundException" -// We can't find a root, OU, or account with the TargetId that you specified. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListPoliciesForTarget -func (c *Organizations) ListPoliciesForTarget(input *ListPoliciesForTargetInput) (*ListPoliciesForTargetOutput, error) { - req, out := c.ListPoliciesForTargetRequest(input) - return out, req.Send() -} - -// ListPoliciesForTargetWithContext is the same as ListPoliciesForTarget with the addition of -// the ability to pass a context and additional request options. -// -// See ListPoliciesForTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListPoliciesForTargetWithContext(ctx aws.Context, input *ListPoliciesForTargetInput, opts ...request.Option) (*ListPoliciesForTargetOutput, error) { - req, out := c.ListPoliciesForTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPoliciesForTargetPages iterates over the pages of a ListPoliciesForTarget operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPoliciesForTarget 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 ListPoliciesForTarget operation. -// pageNum := 0 -// err := client.ListPoliciesForTargetPages(params, -// func(page *ListPoliciesForTargetOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Organizations) ListPoliciesForTargetPages(input *ListPoliciesForTargetInput, fn func(*ListPoliciesForTargetOutput, bool) bool) error { - return c.ListPoliciesForTargetPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPoliciesForTargetPagesWithContext same as ListPoliciesForTargetPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListPoliciesForTargetPagesWithContext(ctx aws.Context, input *ListPoliciesForTargetInput, fn func(*ListPoliciesForTargetOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPoliciesForTargetInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPoliciesForTargetRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPoliciesForTargetOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListRoots = "ListRoots" - -// ListRootsRequest generates a "aws/request.Request" representing the -// client's request for the ListRoots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRoots for more information on using the ListRoots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRootsRequest method. -// req, resp := client.ListRootsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListRoots -func (c *Organizations) ListRootsRequest(input *ListRootsInput) (req *request.Request, output *ListRootsOutput) { - op := &request.Operation{ - Name: opListRoots, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListRootsInput{} - } - - output = &ListRootsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRoots API operation for AWS Organizations. -// -// Lists the roots that are defined in the current organization. -// -// Always check the NextToken response parameter for a null value when calling -// a List* operation. These operations can occasionally return an empty set -// of results even when there are more results available. The NextToken response -// parameter value is nullonly when there are no more results to display. -// -// This operation can be called only from the organization's master account. -// -// Policy types can be enabled and disabled in roots. This is distinct from -// whether they are available in the organization. When you enable all features, -// you make policy types available for use in that organization. Individual -// policy types can then be enabled and disabled in a root. To see the availability -// of a policy type in an organization, use DescribeOrganization. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation ListRoots for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListRoots -func (c *Organizations) ListRoots(input *ListRootsInput) (*ListRootsOutput, error) { - req, out := c.ListRootsRequest(input) - return out, req.Send() -} - -// ListRootsWithContext is the same as ListRoots with the addition of -// the ability to pass a context and additional request options. -// -// See ListRoots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListRootsWithContext(ctx aws.Context, input *ListRootsInput, opts ...request.Option) (*ListRootsOutput, error) { - req, out := c.ListRootsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListRootsPages iterates over the pages of a ListRoots operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListRoots 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 ListRoots operation. -// pageNum := 0 -// err := client.ListRootsPages(params, -// func(page *ListRootsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Organizations) ListRootsPages(input *ListRootsInput, fn func(*ListRootsOutput, bool) bool) error { - return c.ListRootsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListRootsPagesWithContext same as ListRootsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListRootsPagesWithContext(ctx aws.Context, input *ListRootsInput, fn func(*ListRootsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListRootsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListRootsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRootsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTargetsForPolicy = "ListTargetsForPolicy" - -// ListTargetsForPolicyRequest generates a "aws/request.Request" representing the -// client's request for the ListTargetsForPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTargetsForPolicy for more information on using the ListTargetsForPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTargetsForPolicyRequest method. -// req, resp := client.ListTargetsForPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListTargetsForPolicy -func (c *Organizations) ListTargetsForPolicyRequest(input *ListTargetsForPolicyInput) (req *request.Request, output *ListTargetsForPolicyOutput) { - op := &request.Operation{ - Name: opListTargetsForPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTargetsForPolicyInput{} - } - - output = &ListTargetsForPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTargetsForPolicy API operation for AWS Organizations. -// -// Lists all the roots, organizaitonal units (OUs), and accounts to which the -// specified policy is attached. -// -// Always check the NextToken response parameter for a null value when calling -// a List* operation. These operations can occasionally return an empty set -// of results even when there are more results available. The NextToken response -// parameter value is nullonly when there are no more results to display. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation ListTargetsForPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodePolicyNotFoundException "PolicyNotFoundException" -// We can't find a policy with the PolicyId that you specified. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListTargetsForPolicy -func (c *Organizations) ListTargetsForPolicy(input *ListTargetsForPolicyInput) (*ListTargetsForPolicyOutput, error) { - req, out := c.ListTargetsForPolicyRequest(input) - return out, req.Send() -} - -// ListTargetsForPolicyWithContext is the same as ListTargetsForPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See ListTargetsForPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListTargetsForPolicyWithContext(ctx aws.Context, input *ListTargetsForPolicyInput, opts ...request.Option) (*ListTargetsForPolicyOutput, error) { - req, out := c.ListTargetsForPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTargetsForPolicyPages iterates over the pages of a ListTargetsForPolicy operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTargetsForPolicy method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListTargetsForPolicy operation. -// pageNum := 0 -// err := client.ListTargetsForPolicyPages(params, -// func(page *ListTargetsForPolicyOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Organizations) ListTargetsForPolicyPages(input *ListTargetsForPolicyInput, fn func(*ListTargetsForPolicyOutput, bool) bool) error { - return c.ListTargetsForPolicyPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTargetsForPolicyPagesWithContext same as ListTargetsForPolicyPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) ListTargetsForPolicyPagesWithContext(ctx aws.Context, input *ListTargetsForPolicyInput, fn func(*ListTargetsForPolicyOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTargetsForPolicyInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTargetsForPolicyRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTargetsForPolicyOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opMoveAccount = "MoveAccount" - -// MoveAccountRequest generates a "aws/request.Request" representing the -// client's request for the MoveAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See MoveAccount for more information on using the MoveAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the MoveAccountRequest method. -// req, resp := client.MoveAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/MoveAccount -func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *request.Request, output *MoveAccountOutput) { - op := &request.Operation{ - Name: opMoveAccount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &MoveAccountInput{} - } - - output = &MoveAccountOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// MoveAccount API operation for AWS Organizations. -// -// Moves an account from its current source parent root or organizational unit -// (OU) to the specified destination parent root or OU. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation MoveAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeSourceParentNotFoundException "SourceParentNotFoundException" -// We can't find a source root or OU with the ParentId that you specified. -// -// * ErrCodeDestinationParentNotFoundException "DestinationParentNotFoundException" -// We can't find the destination container (a root or OU) with the ParentId -// that you specified. -// -// * ErrCodeDuplicateAccountException "DuplicateAccountException" -// That account is already present in the specified destination. -// -// * ErrCodeAccountNotFoundException "AccountNotFoundException" -// We can't find an AWS account with the AccountId that you specified, or the -// account whose credentials you used to make this request isn't a member of -// an organization. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/MoveAccount -func (c *Organizations) MoveAccount(input *MoveAccountInput) (*MoveAccountOutput, error) { - req, out := c.MoveAccountRequest(input) - return out, req.Send() -} - -// MoveAccountWithContext is the same as MoveAccount with the addition of -// the ability to pass a context and additional request options. -// -// See MoveAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) MoveAccountWithContext(ctx aws.Context, input *MoveAccountInput, opts ...request.Option) (*MoveAccountOutput, error) { - req, out := c.MoveAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveAccountFromOrganization = "RemoveAccountFromOrganization" - -// RemoveAccountFromOrganizationRequest generates a "aws/request.Request" representing the -// client's request for the RemoveAccountFromOrganization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveAccountFromOrganization for more information on using the RemoveAccountFromOrganization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveAccountFromOrganizationRequest method. -// req, resp := client.RemoveAccountFromOrganizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/RemoveAccountFromOrganization -func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccountFromOrganizationInput) (req *request.Request, output *RemoveAccountFromOrganizationOutput) { - op := &request.Operation{ - Name: opRemoveAccountFromOrganization, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveAccountFromOrganizationInput{} - } - - output = &RemoveAccountFromOrganizationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveAccountFromOrganization API operation for AWS Organizations. -// -// Removes the specified account from the organization. -// -// The removed account becomes a stand-alone account that is not a member of -// any organization. It is no longer subject to any policies and is responsible -// for its own bill payments. The organization's master account is no longer -// charged for any expenses accrued by the member account after it is removed -// from the organization. -// -// This operation can be called only from the organization's master account. -// Member accounts can remove themselves with LeaveOrganization instead. -// -// You can remove an account from your organization only if the account is configured -// with the information required to operate as a standalone account. When you -// create an account in an organization using the AWS Organizations console, -// API, or CLI commands, the information required of standalone accounts is -// not automatically collected. For an account that you want to make standalone, -// you must accept the End User License Agreement (EULA), choose a support plan, -// provide and verify the required contact information, and provide a current -// payment method. AWS uses the payment method to charge for any billable (not -// free tier) AWS activity that occurs while the account is not attached to -// an organization. To remove an account that does not yet have this information, -// you must sign in as the member account and follow the steps at To leave -// an organization when all required account information has not yet been provided -// (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation RemoveAccountFromOrganization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAccountNotFoundException "AccountNotFoundException" -// We can't find an AWS account with the AccountId that you specified, or the -// account whose credentials you used to make this request isn't a member of -// an organization. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeConstraintViolationException "ConstraintViolationException" -// Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last service control policy (SCP) from -// an OU or root, inviting or creating too many accounts to the organization, -// or attaching too many policies to an account, OU, or root. This exception -// includes a reason that contains additional information about the violated -// limit. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. If you need more accounts, -// contactAWS Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. -// -// Or the number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations or -// contact AWS Support to request an increase in the number of accounts. -// -// Deleted and closed accounts still count toward your limit. -// -// If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs -// that you can have in an organization. -// -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is -// too many levels deep. -// -// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation -// that requires the organization to be configured to support all features. -// An organization that supports only consolidated billing features can't -// perform this operation. -// -// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of -// policies that you can have in an organization. -// -// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity -// at one time. -// -// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity that would cause the entity to have fewer than the -// minimum number of policies of a certain type required. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that doesn't yet have enough information to exist -// as a standalone account. This account requires you to first agree to the -// AWS Customer Agreement. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that doesn't yet have enough information -// to exist as a standalone account. This account requires you to first complete -// phone verification. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this master account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation -// with this member account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can create in one day. -// -// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account -// in this organization, you first must migrate the organization's master -// account to the marketplace that corresponds to the master account's address. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be associated -// with the same marketplace. -// -// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you -// must first provide contact a valid address and phone number for the master -// account. Then try the operation again. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeMasterCannotLeaveOrganizationException "MasterCannotLeaveOrganizationException" -// You can't remove a master account from an organization. If you want the master -// account to become a member account in another organization, you must first -// delete the current organization of the master account. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/RemoveAccountFromOrganization -func (c *Organizations) RemoveAccountFromOrganization(input *RemoveAccountFromOrganizationInput) (*RemoveAccountFromOrganizationOutput, error) { - req, out := c.RemoveAccountFromOrganizationRequest(input) - return out, req.Send() -} - -// RemoveAccountFromOrganizationWithContext is the same as RemoveAccountFromOrganization with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveAccountFromOrganization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) RemoveAccountFromOrganizationWithContext(ctx aws.Context, input *RemoveAccountFromOrganizationInput, opts ...request.Option) (*RemoveAccountFromOrganizationOutput, error) { - req, out := c.RemoveAccountFromOrganizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateOrganizationalUnit = "UpdateOrganizationalUnit" - -// UpdateOrganizationalUnitRequest generates a "aws/request.Request" representing the -// client's request for the UpdateOrganizationalUnit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateOrganizationalUnit for more information on using the UpdateOrganizationalUnit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateOrganizationalUnitRequest method. -// req, resp := client.UpdateOrganizationalUnitRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UpdateOrganizationalUnit -func (c *Organizations) UpdateOrganizationalUnitRequest(input *UpdateOrganizationalUnitInput) (req *request.Request, output *UpdateOrganizationalUnitOutput) { - op := &request.Operation{ - Name: opUpdateOrganizationalUnit, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateOrganizationalUnitInput{} - } - - output = &UpdateOrganizationalUnitOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateOrganizationalUnit API operation for AWS Organizations. -// -// Renames the specified organizational unit (OU). The ID and ARN do not change. -// The child OUs and accounts remain in place, and any attached policies of -// the OU remain attached. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation UpdateOrganizationalUnit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeDuplicateOrganizationalUnitException "DuplicateOrganizationalUnitException" -// An OU with the same name already exists. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeOrganizationalUnitNotFoundException "OrganizationalUnitNotFoundException" -// We can't find an OU with the OrganizationalUnitId that you specified. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UpdateOrganizationalUnit -func (c *Organizations) UpdateOrganizationalUnit(input *UpdateOrganizationalUnitInput) (*UpdateOrganizationalUnitOutput, error) { - req, out := c.UpdateOrganizationalUnitRequest(input) - return out, req.Send() -} - -// UpdateOrganizationalUnitWithContext is the same as UpdateOrganizationalUnit with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateOrganizationalUnit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) UpdateOrganizationalUnitWithContext(ctx aws.Context, input *UpdateOrganizationalUnitInput, opts ...request.Option) (*UpdateOrganizationalUnitOutput, error) { - req, out := c.UpdateOrganizationalUnitRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdatePolicy = "UpdatePolicy" - -// UpdatePolicyRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdatePolicy for more information on using the UpdatePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdatePolicyRequest method. -// req, resp := client.UpdatePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UpdatePolicy -func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *request.Request, output *UpdatePolicyOutput) { - op := &request.Operation{ - Name: opUpdatePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdatePolicyInput{} - } - - output = &UpdatePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdatePolicy API operation for AWS Organizations. -// -// Updates an existing policy with a new name, description, or content. If any -// parameter is not supplied, that value remains unchanged. Note that you cannot -// change a policy's type. -// -// This operation can be called only from the organization's master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Organizations's -// API operation UpdatePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// You don't have permissions to perform the requested operation. The user or -// role that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see -// Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * ErrCodeConstraintViolationException "ConstraintViolationException" -// Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last service control policy (SCP) from -// an OU or root, inviting or creating too many accounts to the organization, -// or attaching too many policies to an account, OU, or root. This exception -// includes a reason that contains additional information about the violated -// limit. -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. If you need more accounts, -// contactAWS Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. -// -// Or the number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations or -// contact AWS Support to request an increase in the number of accounts. -// -// Deleted and closed accounts still count toward your limit. -// -// If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). -// -// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs -// that you can have in an organization. -// -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is -// too many levels deep. -// -// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation -// that requires the organization to be configured to support all features. -// An organization that supports only consolidated billing features can't -// perform this operation. -// -// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of -// policies that you can have in an organization. -// -// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity -// at one time. -// -// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity that would cause the entity to have fewer than the -// minimum number of policies of a certain type required. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that doesn't yet have enough information to exist -// as a standalone account. This account requires you to first agree to the -// AWS Customer Agreement. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that doesn't yet have enough information -// to exist as a standalone account. This account requires you to first complete -// phone verification. Follow the steps at To leave an organization when -// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this master account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation -// with this member account, you first must associate a payment instrument, -// such as a credit card, with the account. Follow the steps at To leave -// an organization when all required account information has not yet been -// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) -// in the AWS Organizations User Guide. -// -// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can create in one day. -// -// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account -// in this organization, you first must migrate the organization's master -// account to the marketplace that corresponds to the master account's address. -// For example, accounts with India addresses must be associated with the -// AISPL marketplace. All accounts in an organization must be associated -// with the same marketplace. -// -// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you -// must first provide contact a valid address and phone number for the master -// account. Then try the operation again. -// -// * ErrCodeDuplicatePolicyException "DuplicatePolicyException" -// A policy with the same name already exists. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The requested operation failed because you provided invalid values for one -// or more of the request parameters. This exception includes a reason that -// contains additional information about the violated limit: -// -// Some of the reasons in the following list might not be applicable to this -// specific API or operation: -// -// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// can't be modified. -// -// * INPUT_REQUIRED: You must include a value for all required parameters. -// -// * INVALID_ENUM: You specified a value that isn't valid for that parameter. -// -// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid -// characters. -// -// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains -// at least one invalid value. -// -// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, -// organization, or email) as a party. -// -// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter -// from the response to a previous call of the operation. -// -// * INVALID_PATTERN: You provided a value that doesn't match the required -// pattern. -// -// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't -// match the required pattern. -// -// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role -// name can't begin with the reserved prefix AWSServiceRoleFor. -// -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource -// Name (ARN) for the organization. -// -// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. -// -// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter -// for the operation. -// -// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer -// than allowed. -// -// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger -// value than allowed. -// -// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter -// than allowed. -// -// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller -// value than allowed. -// -// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only -// between entities in the same root. -// -// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" -// The provided policy document doesn't meet the requirements of the specified -// policy type. For example, the syntax might be incorrect. For details about -// service control policy syntax, see Service Control Policy Syntax (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html) -// in the AWS Organizations User Guide. -// -// * ErrCodePolicyNotFoundException "PolicyNotFoundException" -// We can't find a policy with the PolicyId that you specified. -// -// * ErrCodeServiceException "ServiceException" -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// You've sent too many requests in too short a period of time. The limit helps -// protect against denial-of-service attacks. Try again later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UpdatePolicy -func (c *Organizations) UpdatePolicy(input *UpdatePolicyInput) (*UpdatePolicyOutput, error) { - req, out := c.UpdatePolicyRequest(input) - return out, req.Send() -} - -// UpdatePolicyWithContext is the same as UpdatePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See UpdatePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Organizations) UpdatePolicyWithContext(ctx aws.Context, input *UpdatePolicyInput, opts ...request.Option) (*UpdatePolicyOutput, error) { - req, out := c.UpdatePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AcceptHandshakeInput struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the handshake that you want to accept. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string - // requires "h-" followed by from 8 to 32 lower-case letters or digits. - // - // HandshakeId is a required field - HandshakeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AcceptHandshakeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptHandshakeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AcceptHandshakeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AcceptHandshakeInput"} - if s.HandshakeId == nil { - invalidParams.Add(request.NewErrParamRequired("HandshakeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHandshakeId sets the HandshakeId field's value. -func (s *AcceptHandshakeInput) SetHandshakeId(v string) *AcceptHandshakeInput { - s.HandshakeId = &v - return s -} - -type AcceptHandshakeOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the accepted handshake. - Handshake *Handshake `type:"structure"` -} - -// String returns the string representation -func (s AcceptHandshakeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptHandshakeOutput) GoString() string { - return s.String() -} - -// SetHandshake sets the Handshake field's value. -func (s *AcceptHandshakeOutput) SetHandshake(v *Handshake) *AcceptHandshakeOutput { - s.Handshake = v - return s -} - -// Contains information about an AWS account that is a member of an organization. -type Account struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the account. - // - // For more information about ARNs in Organizations, see ARN Formats Supported - // by Organizations (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns) - // in the AWS Organizations User Guide. - Arn *string `type:"string"` - - // The email address associated with the AWS account. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for this parameter is - // a string of characters that represents a standard Internet email address. - Email *string `min:"6" type:"string" sensitive:"true"` - - // The unique identifier (ID) of the account. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string - // requires exactly 12 digits. - Id *string `type:"string"` - - // The method by which the account joined the organization. - JoinedMethod *string `type:"string" enum:"AccountJoinedMethod"` - - // The date the account became a part of the organization. - JoinedTimestamp *time.Time `type:"timestamp"` - - // The friendly name of the account. - // - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter is a string of any of the characters in the ASCII character - // range. - Name *string `min:"1" type:"string" sensitive:"true"` - - // The status of the account in the organization. - Status *string `type:"string" enum:"AccountStatus"` -} - -// String returns the string representation -func (s Account) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Account) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Account) SetArn(v string) *Account { - s.Arn = &v - return s -} - -// SetEmail sets the Email field's value. -func (s *Account) SetEmail(v string) *Account { - s.Email = &v - return s -} - -// SetId sets the Id field's value. -func (s *Account) SetId(v string) *Account { - s.Id = &v - return s -} - -// SetJoinedMethod sets the JoinedMethod field's value. -func (s *Account) SetJoinedMethod(v string) *Account { - s.JoinedMethod = &v - return s -} - -// SetJoinedTimestamp sets the JoinedTimestamp field's value. -func (s *Account) SetJoinedTimestamp(v time.Time) *Account { - s.JoinedTimestamp = &v - return s -} - -// SetName sets the Name field's value. -func (s *Account) SetName(v string) *Account { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Account) SetStatus(v string) *Account { - s.Status = &v - return s -} - -type AttachPolicyInput struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the policy that you want to attach to the target. - // You can get the ID for the policy by calling the ListPolicies operation. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string - // requires "p-" followed by from 8 to 128 lower-case letters or digits. - // - // PolicyId is a required field - PolicyId *string `type:"string" required:"true"` - - // The unique identifier (ID) of the root, OU, or account that you want to attach - // the policy to. You can get the ID by calling the ListRoots, ListOrganizationalUnitsForParent, - // or ListAccounts operations. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a target ID string - // requires one of the following: - // - // * Root: a string that begins with "r-" followed by from 4 to 32 lower-case - // letters or digits. - // - // * Account: a string that consists of exactly 12 digits. - // - // * Organizational unit (OU): a string that begins with "ou-" followed by - // from 4 to 32 lower-case letters or digits (the ID of the root that the - // OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case - // letters or digits. - // - // TargetId is a required field - TargetId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachPolicyInput"} - if s.PolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyId")) - } - if s.TargetId == nil { - invalidParams.Add(request.NewErrParamRequired("TargetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyId sets the PolicyId field's value. -func (s *AttachPolicyInput) SetPolicyId(v string) *AttachPolicyInput { - s.PolicyId = &v - return s -} - -// SetTargetId sets the TargetId field's value. -func (s *AttachPolicyInput) SetTargetId(v string) *AttachPolicyInput { - s.TargetId = &v - return s -} - -type AttachPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AttachPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachPolicyOutput) GoString() string { - return s.String() -} - -type CancelHandshakeInput struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the handshake that you want to cancel. You - // can get the ID from the ListHandshakesForOrganization operation. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string - // requires "h-" followed by from 8 to 32 lower-case letters or digits. - // - // HandshakeId is a required field - HandshakeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelHandshakeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelHandshakeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelHandshakeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelHandshakeInput"} - if s.HandshakeId == nil { - invalidParams.Add(request.NewErrParamRequired("HandshakeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHandshakeId sets the HandshakeId field's value. -func (s *CancelHandshakeInput) SetHandshakeId(v string) *CancelHandshakeInput { - s.HandshakeId = &v - return s -} - -type CancelHandshakeOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the handshake that you canceled. - Handshake *Handshake `type:"structure"` -} - -// String returns the string representation -func (s CancelHandshakeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelHandshakeOutput) GoString() string { - return s.String() -} - -// SetHandshake sets the Handshake field's value. -func (s *CancelHandshakeOutput) SetHandshake(v *Handshake) *CancelHandshakeOutput { - s.Handshake = v - return s -} - -// Contains a list of child entities, either OUs or accounts. -type Child struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of this child entity. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a child ID string - // requires one of the following: - // - // * Account: a string that consists of exactly 12 digits. - // - // * Organizational unit (OU): a string that begins with "ou-" followed by - // from 4 to 32 lower-case letters or digits (the ID of the root that contains - // the OU) followed by a second "-" dash and from 8 to 32 additional lower-case - // letters or digits. - Id *string `type:"string"` - - // The type of this child entity. - Type *string `type:"string" enum:"ChildType"` -} - -// String returns the string representation -func (s Child) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Child) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *Child) SetId(v string) *Child { - s.Id = &v - return s -} - -// SetType sets the Type field's value. -func (s *Child) SetType(v string) *Child { - s.Type = &v - return s -} - -type CreateAccountInput struct { - _ struct{} `type:"structure"` - - // The friendly name of the member account. - // - // AccountName is a required field - AccountName *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The email address of the owner to assign to the new member account. This - // email address must not already be associated with another AWS account. You - // must use a valid email address to complete account creation. You can't access - // the root user of the account or remove an account that was created with an - // invalid email address. - // - // Email is a required field - Email *string `min:"6" type:"string" required:"true" sensitive:"true"` - - // If set to ALLOW, the new account enables IAM users to access account billing - // information if they have the required permissions. If set to DENY, only the - // root user of the new account can access account billing information. For - // more information, see Activating Access to the Billing and Cost Management - // Console (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate) - // in the AWS Billing and Cost Management User Guide. - // - // If you don't specify this parameter, the value defaults to ALLOW, and IAM - // users and roles with the required permissions can access billing information - // for the new account. - IamUserAccessToBilling *string `type:"string" enum:"IAMUserAccessToBilling"` - - // (Optional) - // - // The name of an IAM role that AWS Organizations automatically preconfigures - // in the new member account. This role trusts the master account, allowing - // users in the master account to assume the role, as permitted by the master - // account administrator. The role has administrator permissions in the new - // member account. - // - // If you don't specify this parameter, the role name defaults to OrganizationAccountAccessRole. - // - // For more information about how to use this role to access the member account, - // see Accessing and Administering the Member Accounts in Your Organization - // (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role) - // in the AWS Organizations User Guide, and steps 2 and 3 in Tutorial: Delegate - // Access Across AWS Accounts Using IAM Roles (http://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html) - // in the IAM User Guide. - // - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter is a string of characters that can consist of uppercase letters, - // lowercase letters, digits with no spaces, and any of the following characters: - // =,.@- - RoleName *string `type:"string"` -} - -// String returns the string representation -func (s CreateAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAccountInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAccountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAccountInput"} - if s.AccountName == nil { - invalidParams.Add(request.NewErrParamRequired("AccountName")) - } - if s.AccountName != nil && len(*s.AccountName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountName", 1)) - } - if s.Email == nil { - invalidParams.Add(request.NewErrParamRequired("Email")) - } - if s.Email != nil && len(*s.Email) < 6 { - invalidParams.Add(request.NewErrParamMinLen("Email", 6)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountName sets the AccountName field's value. -func (s *CreateAccountInput) SetAccountName(v string) *CreateAccountInput { - s.AccountName = &v - return s -} - -// SetEmail sets the Email field's value. -func (s *CreateAccountInput) SetEmail(v string) *CreateAccountInput { - s.Email = &v - return s -} - -// SetIamUserAccessToBilling sets the IamUserAccessToBilling field's value. -func (s *CreateAccountInput) SetIamUserAccessToBilling(v string) *CreateAccountInput { - s.IamUserAccessToBilling = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *CreateAccountInput) SetRoleName(v string) *CreateAccountInput { - s.RoleName = &v - return s -} - -type CreateAccountOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the request to create an account. - // This response structure might not be fully populated when you first receive - // it because account creation is an asynchronous process. You can pass the - // returned CreateAccountStatus ID as a parameter to DescribeCreateAccountStatus - // to get status about the progress of the request at later times. You can also - // check the AWS CloudTrail log for the CreateAccountResult event. For more - // information, see Monitoring the Activity in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_monitoring.html) - // in the AWS Organizations User Guide. - CreateAccountStatus *CreateAccountStatus `type:"structure"` -} - -// String returns the string representation -func (s CreateAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAccountOutput) GoString() string { - return s.String() -} - -// SetCreateAccountStatus sets the CreateAccountStatus field's value. -func (s *CreateAccountOutput) SetCreateAccountStatus(v *CreateAccountStatus) *CreateAccountOutput { - s.CreateAccountStatus = v - return s -} - -// Contains the status about a CreateAccount request to create an AWS account -// in an organization. -type CreateAccountStatus struct { - _ struct{} `type:"structure"` - - // If the account was created successfully, the unique identifier (ID) of the - // new account. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string - // requires exactly 12 digits. - AccountId *string `type:"string"` - - // The account name given to the account when it was created. - AccountName *string `min:"1" type:"string" sensitive:"true"` - - // The date and time that the account was created and the request completed. - CompletedTimestamp *time.Time `type:"timestamp"` - - // If the request failed, a description of the reason for the failure. - // - // * ACCOUNT_LIMIT_EXCEEDED: The account could not be created because you - // have reached the limit on the number of accounts in your organization. - // - // * EMAIL_ALREADY_EXISTS: The account could not be created because another - // AWS account with that email address already exists. - // - // * INVALID_ADDRESS: The account could not be created because the address - // you provided is not valid. - // - // * INVALID_EMAIL: The account could not be created because the email address - // you provided is not valid. - // - // * INTERNAL_FAILURE: The account could not be created because of an internal - // failure. Try again later. If the problem persists, contact Customer Support. - FailureReason *string `type:"string" enum:"CreateAccountFailureReason"` - - // The unique identifier (ID) that references this request. You get this value - // from the response of the initial CreateAccount request to create the account. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for an create account - // request ID string requires "car-" followed by from 8 to 32 lower-case letters - // or digits. - Id *string `type:"string"` - - // The date and time that the request was made for the account creation. - RequestedTimestamp *time.Time `type:"timestamp"` - - // The status of the request. - State *string `type:"string" enum:"CreateAccountState"` -} - -// String returns the string representation -func (s CreateAccountStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAccountStatus) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *CreateAccountStatus) SetAccountId(v string) *CreateAccountStatus { - s.AccountId = &v - return s -} - -// SetAccountName sets the AccountName field's value. -func (s *CreateAccountStatus) SetAccountName(v string) *CreateAccountStatus { - s.AccountName = &v - return s -} - -// SetCompletedTimestamp sets the CompletedTimestamp field's value. -func (s *CreateAccountStatus) SetCompletedTimestamp(v time.Time) *CreateAccountStatus { - s.CompletedTimestamp = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *CreateAccountStatus) SetFailureReason(v string) *CreateAccountStatus { - s.FailureReason = &v - return s -} - -// SetId sets the Id field's value. -func (s *CreateAccountStatus) SetId(v string) *CreateAccountStatus { - s.Id = &v - return s -} - -// SetRequestedTimestamp sets the RequestedTimestamp field's value. -func (s *CreateAccountStatus) SetRequestedTimestamp(v time.Time) *CreateAccountStatus { - s.RequestedTimestamp = &v - return s -} - -// SetState sets the State field's value. -func (s *CreateAccountStatus) SetState(v string) *CreateAccountStatus { - s.State = &v - return s -} - -type CreateOrganizationInput struct { - _ struct{} `type:"structure"` - - // Specifies the feature set supported by the new organization. Each feature - // set supports different levels of functionality. - // - // * CONSOLIDATED_BILLING: All member accounts have their bills consolidated - // to and paid by the master account. For more information, see Consolidated - // billing (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-cb-only) - // in the AWS Organizations User Guide. - // - // * ALL: In addition to all the features supported by the consolidated billing - // feature set, the master account can also apply any type of policy to any - // member account in the organization. For more information, see All features - // (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-all) - // in the AWS Organizations User Guide. - FeatureSet *string `type:"string" enum:"OrganizationFeatureSet"` -} - -// String returns the string representation -func (s CreateOrganizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateOrganizationInput) GoString() string { - return s.String() -} - -// SetFeatureSet sets the FeatureSet field's value. -func (s *CreateOrganizationInput) SetFeatureSet(v string) *CreateOrganizationInput { - s.FeatureSet = &v - return s -} - -type CreateOrganizationOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the newly created organization. - Organization *Organization `type:"structure"` -} - -// String returns the string representation -func (s CreateOrganizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateOrganizationOutput) GoString() string { - return s.String() -} - -// SetOrganization sets the Organization field's value. -func (s *CreateOrganizationOutput) SetOrganization(v *Organization) *CreateOrganizationOutput { - s.Organization = v - return s -} - -type CreateOrganizationalUnitInput struct { - _ struct{} `type:"structure"` - - // The friendly name to assign to the new OU. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The unique identifier (ID) of the parent root or OU in which you want to - // create the new OU. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string - // requires one of the following: - // - // * Root: a string that begins with "r-" followed by from 4 to 32 lower-case - // letters or digits. - // - // * Organizational unit (OU): a string that begins with "ou-" followed by - // from 4 to 32 lower-case letters or digits (the ID of the root that the - // OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case - // letters or digits. - // - // ParentId is a required field - ParentId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateOrganizationalUnitInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateOrganizationalUnitInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateOrganizationalUnitInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateOrganizationalUnitInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.ParentId == nil { - invalidParams.Add(request.NewErrParamRequired("ParentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *CreateOrganizationalUnitInput) SetName(v string) *CreateOrganizationalUnitInput { - s.Name = &v - return s -} - -// SetParentId sets the ParentId field's value. -func (s *CreateOrganizationalUnitInput) SetParentId(v string) *CreateOrganizationalUnitInput { - s.ParentId = &v - return s -} - -type CreateOrganizationalUnitOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the newly created OU. - OrganizationalUnit *OrganizationalUnit `type:"structure"` -} - -// String returns the string representation -func (s CreateOrganizationalUnitOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateOrganizationalUnitOutput) GoString() string { - return s.String() -} - -// SetOrganizationalUnit sets the OrganizationalUnit field's value. -func (s *CreateOrganizationalUnitOutput) SetOrganizationalUnit(v *OrganizationalUnit) *CreateOrganizationalUnitOutput { - s.OrganizationalUnit = v - return s -} - -type CreatePolicyInput struct { - _ struct{} `type:"structure"` - - // The policy content to add to the new policy. For example, if you create a - // service control policy (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) - // (SCP), this string must be JSON text that specifies the permissions that - // admins in attached accounts can delegate to their users, groups, and roles. - // For more information about the SCP syntax, see Service Control Policy Syntax - // (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html) - // in the AWS Organizations User Guide. - // - // Content is a required field - Content *string `min:"1" type:"string" required:"true"` - - // An optional description to assign to the policy. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // The friendly name to assign to the policy. - // - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter is a string of any of the characters in the ASCII character - // range. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The type of policy to create. - // - // In the current release, the only type of policy that you can create is a - // service control policy (SCP). - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"PolicyType"` -} - -// String returns the string representation -func (s CreatePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePolicyInput"} - if s.Content == nil { - invalidParams.Add(request.NewErrParamRequired("Content")) - } - if s.Content != nil && len(*s.Content) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Content", 1)) - } - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContent sets the Content field's value. -func (s *CreatePolicyInput) SetContent(v string) *CreatePolicyInput { - s.Content = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreatePolicyInput) SetDescription(v string) *CreatePolicyInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreatePolicyInput) SetName(v string) *CreatePolicyInput { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *CreatePolicyInput) SetType(v string) *CreatePolicyInput { - s.Type = &v - return s -} - -type CreatePolicyOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the newly created policy. - Policy *Policy `type:"structure"` -} - -// String returns the string representation -func (s CreatePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *CreatePolicyOutput) SetPolicy(v *Policy) *CreatePolicyOutput { - s.Policy = v - return s -} - -type DeclineHandshakeInput struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the handshake that you want to decline. You - // can get the ID from the ListHandshakesForAccount operation. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string - // requires "h-" followed by from 8 to 32 lower-case letters or digits. - // - // HandshakeId is a required field - HandshakeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeclineHandshakeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeclineHandshakeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeclineHandshakeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeclineHandshakeInput"} - if s.HandshakeId == nil { - invalidParams.Add(request.NewErrParamRequired("HandshakeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHandshakeId sets the HandshakeId field's value. -func (s *DeclineHandshakeInput) SetHandshakeId(v string) *DeclineHandshakeInput { - s.HandshakeId = &v - return s -} - -type DeclineHandshakeOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the declined handshake. The state - // is updated to show the value DECLINED. - Handshake *Handshake `type:"structure"` -} - -// String returns the string representation -func (s DeclineHandshakeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeclineHandshakeOutput) GoString() string { - return s.String() -} - -// SetHandshake sets the Handshake field's value. -func (s *DeclineHandshakeOutput) SetHandshake(v *Handshake) *DeclineHandshakeOutput { - s.Handshake = v - return s -} - -type DeleteOrganizationInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteOrganizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteOrganizationInput) GoString() string { - return s.String() -} - -type DeleteOrganizationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteOrganizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteOrganizationOutput) GoString() string { - return s.String() -} - -type DeleteOrganizationalUnitInput struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the organizational unit that you want to delete. - // You can get the ID from the ListOrganizationalUnitsForParent operation. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for an organizational - // unit ID string requires "ou-" followed by from 4 to 32 lower-case letters - // or digits (the ID of the root that contains the OU) followed by a second - // "-" dash and from 8 to 32 additional lower-case letters or digits. - // - // OrganizationalUnitId is a required field - OrganizationalUnitId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteOrganizationalUnitInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteOrganizationalUnitInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteOrganizationalUnitInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteOrganizationalUnitInput"} - if s.OrganizationalUnitId == nil { - invalidParams.Add(request.NewErrParamRequired("OrganizationalUnitId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOrganizationalUnitId sets the OrganizationalUnitId field's value. -func (s *DeleteOrganizationalUnitInput) SetOrganizationalUnitId(v string) *DeleteOrganizationalUnitInput { - s.OrganizationalUnitId = &v - return s -} - -type DeleteOrganizationalUnitOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteOrganizationalUnitOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteOrganizationalUnitOutput) GoString() string { - return s.String() -} - -type DeletePolicyInput struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the policy that you want to delete. You can - // get the ID from the ListPolicies or ListPoliciesForTarget operations. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string - // requires "p-" followed by from 8 to 128 lower-case letters or digits. - // - // PolicyId is a required field - PolicyId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"} - if s.PolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyId sets the PolicyId field's value. -func (s *DeletePolicyInput) SetPolicyId(v string) *DeletePolicyInput { - s.PolicyId = &v - return s -} - -type DeletePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePolicyOutput) GoString() string { - return s.String() -} - -type DescribeAccountInput struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the AWS account that you want information about. - // You can get the ID from the ListAccounts or ListAccountsForParent operations. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string - // requires exactly 12 digits. - // - // AccountId is a required field - AccountId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAccountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAccountInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DescribeAccountInput) SetAccountId(v string) *DescribeAccountInput { - s.AccountId = &v - return s -} - -type DescribeAccountOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains information about the requested account. - Account *Account `type:"structure"` -} - -// String returns the string representation -func (s DescribeAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountOutput) GoString() string { - return s.String() -} - -// SetAccount sets the Account field's value. -func (s *DescribeAccountOutput) SetAccount(v *Account) *DescribeAccountOutput { - s.Account = v - return s -} - -type DescribeCreateAccountStatusInput struct { - _ struct{} `type:"structure"` - - // Specifies the operationId that uniquely identifies the request. You can get - // the ID from the response to an earlier CreateAccount request, or from the - // ListCreateAccountStatus operation. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for an create account - // request ID string requires "car-" followed by from 8 to 32 lower-case letters - // or digits. - // - // CreateAccountRequestId is a required field - CreateAccountRequestId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeCreateAccountStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCreateAccountStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCreateAccountStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCreateAccountStatusInput"} - if s.CreateAccountRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("CreateAccountRequestId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreateAccountRequestId sets the CreateAccountRequestId field's value. -func (s *DescribeCreateAccountStatusInput) SetCreateAccountRequestId(v string) *DescribeCreateAccountStatusInput { - s.CreateAccountRequestId = &v - return s -} - -type DescribeCreateAccountStatusOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains the current status of an account creation request. - CreateAccountStatus *CreateAccountStatus `type:"structure"` -} - -// String returns the string representation -func (s DescribeCreateAccountStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCreateAccountStatusOutput) GoString() string { - return s.String() -} - -// SetCreateAccountStatus sets the CreateAccountStatus field's value. -func (s *DescribeCreateAccountStatusOutput) SetCreateAccountStatus(v *CreateAccountStatus) *DescribeCreateAccountStatusOutput { - s.CreateAccountStatus = v - return s -} - -type DescribeHandshakeInput struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the handshake that you want information about. - // You can get the ID from the original call to InviteAccountToOrganization, - // or from a call to ListHandshakesForAccount or ListHandshakesForOrganization. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string - // requires "h-" followed by from 8 to 32 lower-case letters or digits. - // - // HandshakeId is a required field - HandshakeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeHandshakeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHandshakeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeHandshakeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeHandshakeInput"} - if s.HandshakeId == nil { - invalidParams.Add(request.NewErrParamRequired("HandshakeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHandshakeId sets the HandshakeId field's value. -func (s *DescribeHandshakeInput) SetHandshakeId(v string) *DescribeHandshakeInput { - s.HandshakeId = &v - return s -} - -type DescribeHandshakeOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains information about the specified handshake. - Handshake *Handshake `type:"structure"` -} - -// String returns the string representation -func (s DescribeHandshakeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHandshakeOutput) GoString() string { - return s.String() -} - -// SetHandshake sets the Handshake field's value. -func (s *DescribeHandshakeOutput) SetHandshake(v *Handshake) *DescribeHandshakeOutput { - s.Handshake = v - return s -} - -type DescribeOrganizationInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeOrganizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOrganizationInput) GoString() string { - return s.String() -} - -type DescribeOrganizationOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains information about the organization. - Organization *Organization `type:"structure"` -} - -// String returns the string representation -func (s DescribeOrganizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOrganizationOutput) GoString() string { - return s.String() -} - -// SetOrganization sets the Organization field's value. -func (s *DescribeOrganizationOutput) SetOrganization(v *Organization) *DescribeOrganizationOutput { - s.Organization = v - return s -} - -type DescribeOrganizationalUnitInput struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the organizational unit that you want details - // about. You can get the ID from the ListOrganizationalUnitsForParent operation. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for an organizational - // unit ID string requires "ou-" followed by from 4 to 32 lower-case letters - // or digits (the ID of the root that contains the OU) followed by a second - // "-" dash and from 8 to 32 additional lower-case letters or digits. - // - // OrganizationalUnitId is a required field - OrganizationalUnitId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeOrganizationalUnitInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOrganizationalUnitInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeOrganizationalUnitInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeOrganizationalUnitInput"} - if s.OrganizationalUnitId == nil { - invalidParams.Add(request.NewErrParamRequired("OrganizationalUnitId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOrganizationalUnitId sets the OrganizationalUnitId field's value. -func (s *DescribeOrganizationalUnitInput) SetOrganizationalUnitId(v string) *DescribeOrganizationalUnitInput { - s.OrganizationalUnitId = &v - return s -} - -type DescribeOrganizationalUnitOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the specified OU. - OrganizationalUnit *OrganizationalUnit `type:"structure"` -} - -// String returns the string representation -func (s DescribeOrganizationalUnitOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOrganizationalUnitOutput) GoString() string { - return s.String() -} - -// SetOrganizationalUnit sets the OrganizationalUnit field's value. -func (s *DescribeOrganizationalUnitOutput) SetOrganizationalUnit(v *OrganizationalUnit) *DescribeOrganizationalUnitOutput { - s.OrganizationalUnit = v - return s -} - -type DescribePolicyInput struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the policy that you want details about. You - // can get the ID from the ListPolicies or ListPoliciesForTarget operations. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string - // requires "p-" followed by from 8 to 128 lower-case letters or digits. - // - // PolicyId is a required field - PolicyId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribePolicyInput"} - if s.PolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyId sets the PolicyId field's value. -func (s *DescribePolicyInput) SetPolicyId(v string) *DescribePolicyInput { - s.PolicyId = &v - return s -} - -type DescribePolicyOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the specified policy. - Policy *Policy `type:"structure"` -} - -// String returns the string representation -func (s DescribePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *DescribePolicyOutput) SetPolicy(v *Policy) *DescribePolicyOutput { - s.Policy = v - return s -} - -type DetachPolicyInput struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the policy you want to detach. You can get - // the ID from the ListPolicies or ListPoliciesForTarget operations. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string - // requires "p-" followed by from 8 to 128 lower-case letters or digits. - // - // PolicyId is a required field - PolicyId *string `type:"string" required:"true"` - - // The unique identifier (ID) of the root, OU, or account from which you want - // to detach the policy. You can get the ID from the ListRoots, ListOrganizationalUnitsForParent, - // or ListAccounts operations. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a target ID string - // requires one of the following: - // - // * Root: a string that begins with "r-" followed by from 4 to 32 lower-case - // letters or digits. - // - // * Account: a string that consists of exactly 12 digits. - // - // * Organizational unit (OU): a string that begins with "ou-" followed by - // from 4 to 32 lower-case letters or digits (the ID of the root that the - // OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case - // letters or digits. - // - // TargetId is a required field - TargetId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachPolicyInput"} - if s.PolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyId")) - } - if s.TargetId == nil { - invalidParams.Add(request.NewErrParamRequired("TargetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyId sets the PolicyId field's value. -func (s *DetachPolicyInput) SetPolicyId(v string) *DetachPolicyInput { - s.PolicyId = &v - return s -} - -// SetTargetId sets the TargetId field's value. -func (s *DetachPolicyInput) SetTargetId(v string) *DetachPolicyInput { - s.TargetId = &v - return s -} - -type DetachPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DetachPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachPolicyOutput) GoString() string { - return s.String() -} - -type DisableAWSServiceAccessInput struct { - _ struct{} `type:"structure"` - - // The service principal name of the AWS service for which you want to disable - // integration with your organization. This is typically in the form of a URL, - // such as service-abbreviation.amazonaws.com. - // - // ServicePrincipal is a required field - ServicePrincipal *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableAWSServiceAccessInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableAWSServiceAccessInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableAWSServiceAccessInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableAWSServiceAccessInput"} - if s.ServicePrincipal == nil { - invalidParams.Add(request.NewErrParamRequired("ServicePrincipal")) - } - if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServicePrincipal sets the ServicePrincipal field's value. -func (s *DisableAWSServiceAccessInput) SetServicePrincipal(v string) *DisableAWSServiceAccessInput { - s.ServicePrincipal = &v - return s -} - -type DisableAWSServiceAccessOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableAWSServiceAccessOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableAWSServiceAccessOutput) GoString() string { - return s.String() -} - -type DisablePolicyTypeInput struct { - _ struct{} `type:"structure"` - - // The policy type that you want to disable in this root. - // - // PolicyType is a required field - PolicyType *string `type:"string" required:"true" enum:"PolicyType"` - - // The unique identifier (ID) of the root in which you want to disable a policy - // type. You can get the ID from the ListRoots operation. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a root ID string - // requires "r-" followed by from 4 to 32 lower-case letters or digits. - // - // RootId is a required field - RootId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DisablePolicyTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisablePolicyTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisablePolicyTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisablePolicyTypeInput"} - if s.PolicyType == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyType")) - } - if s.RootId == nil { - invalidParams.Add(request.NewErrParamRequired("RootId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyType sets the PolicyType field's value. -func (s *DisablePolicyTypeInput) SetPolicyType(v string) *DisablePolicyTypeInput { - s.PolicyType = &v - return s -} - -// SetRootId sets the RootId field's value. -func (s *DisablePolicyTypeInput) SetRootId(v string) *DisablePolicyTypeInput { - s.RootId = &v - return s -} - -type DisablePolicyTypeOutput struct { - _ struct{} `type:"structure"` - - // A structure that shows the root with the updated list of enabled policy types. - Root *Root `type:"structure"` -} - -// String returns the string representation -func (s DisablePolicyTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisablePolicyTypeOutput) GoString() string { - return s.String() -} - -// SetRoot sets the Root field's value. -func (s *DisablePolicyTypeOutput) SetRoot(v *Root) *DisablePolicyTypeOutput { - s.Root = v - return s -} - -type EnableAWSServiceAccessInput struct { - _ struct{} `type:"structure"` - - // The service principal name of the AWS service for which you want to enable - // integration with your organization. This is typically in the form of a URL, - // such as service-abbreviation.amazonaws.com. - // - // ServicePrincipal is a required field - ServicePrincipal *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s EnableAWSServiceAccessInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableAWSServiceAccessInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableAWSServiceAccessInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableAWSServiceAccessInput"} - if s.ServicePrincipal == nil { - invalidParams.Add(request.NewErrParamRequired("ServicePrincipal")) - } - if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServicePrincipal sets the ServicePrincipal field's value. -func (s *EnableAWSServiceAccessInput) SetServicePrincipal(v string) *EnableAWSServiceAccessInput { - s.ServicePrincipal = &v - return s -} - -type EnableAWSServiceAccessOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableAWSServiceAccessOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableAWSServiceAccessOutput) GoString() string { - return s.String() -} - -type EnableAllFeaturesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableAllFeaturesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableAllFeaturesInput) GoString() string { - return s.String() -} - -type EnableAllFeaturesOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the handshake created to support - // this request to enable all features in the organization. - Handshake *Handshake `type:"structure"` -} - -// String returns the string representation -func (s EnableAllFeaturesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableAllFeaturesOutput) GoString() string { - return s.String() -} - -// SetHandshake sets the Handshake field's value. -func (s *EnableAllFeaturesOutput) SetHandshake(v *Handshake) *EnableAllFeaturesOutput { - s.Handshake = v - return s -} - -type EnablePolicyTypeInput struct { - _ struct{} `type:"structure"` - - // The policy type that you want to enable. - // - // PolicyType is a required field - PolicyType *string `type:"string" required:"true" enum:"PolicyType"` - - // The unique identifier (ID) of the root in which you want to enable a policy - // type. You can get the ID from the ListRoots operation. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a root ID string - // requires "r-" followed by from 4 to 32 lower-case letters or digits. - // - // RootId is a required field - RootId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s EnablePolicyTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnablePolicyTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnablePolicyTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnablePolicyTypeInput"} - if s.PolicyType == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyType")) - } - if s.RootId == nil { - invalidParams.Add(request.NewErrParamRequired("RootId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyType sets the PolicyType field's value. -func (s *EnablePolicyTypeInput) SetPolicyType(v string) *EnablePolicyTypeInput { - s.PolicyType = &v - return s -} - -// SetRootId sets the RootId field's value. -func (s *EnablePolicyTypeInput) SetRootId(v string) *EnablePolicyTypeInput { - s.RootId = &v - return s -} - -type EnablePolicyTypeOutput struct { - _ struct{} `type:"structure"` - - // A structure that shows the root with the updated list of enabled policy types. - Root *Root `type:"structure"` -} - -// String returns the string representation -func (s EnablePolicyTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnablePolicyTypeOutput) GoString() string { - return s.String() -} - -// SetRoot sets the Root field's value. -func (s *EnablePolicyTypeOutput) SetRoot(v *Root) *EnablePolicyTypeOutput { - s.Root = v - return s -} - -// A structure that contains details of a service principal that is enabled -// to integrate with AWS Organizations. -type EnabledServicePrincipal struct { - _ struct{} `type:"structure"` - - // The date that the service principal was enabled for integration with AWS - // Organizations. - DateEnabled *time.Time `type:"timestamp"` - - // The name of the service principal. This is typically in the form of a URL, - // such as: servicename.amazonaws.com. - ServicePrincipal *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s EnabledServicePrincipal) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnabledServicePrincipal) GoString() string { - return s.String() -} - -// SetDateEnabled sets the DateEnabled field's value. -func (s *EnabledServicePrincipal) SetDateEnabled(v time.Time) *EnabledServicePrincipal { - s.DateEnabled = &v - return s -} - -// SetServicePrincipal sets the ServicePrincipal field's value. -func (s *EnabledServicePrincipal) SetServicePrincipal(v string) *EnabledServicePrincipal { - s.ServicePrincipal = &v - return s -} - -// Contains information that must be exchanged to securely establish a relationship -// between two accounts (an originator and a recipient). For example, when a -// master account (the originator) invites another account (the recipient) to -// join its organization, the two accounts exchange information as a series -// of handshake requests and responses. -// -// Note: Handshakes that are CANCELED, ACCEPTED, or DECLINED show up in lists -// for only 30 days after entering that state After that they are deleted. -type Handshake struct { - _ struct{} `type:"structure"` - - // The type of handshake, indicating what action occurs when the recipient accepts - // the handshake. The following handshake types are supported: - // - // * INVITE: This type of handshake represents a request to join an organization. - // It is always sent from the master account to only non-member accounts. - // - // * ENABLE_ALL_FEATURES: This type of handshake represents a request to - // enable all features in an organization. It is always sent from the master - // account to only invited member accounts. Created accounts do not receive - // this because those accounts were created by the organization's master - // account and approval is inferred. - // - // * APPROVE_ALL_FEATURES: This type of handshake is sent from the Organizations - // service when all member accounts have approved the ENABLE_ALL_FEATURES - // invitation. It is sent only to the master account and signals the master - // that it can finalize the process to enable all features. - Action *string `type:"string" enum:"ActionType"` - - // The Amazon Resource Name (ARN) of a handshake. - // - // For more information about ARNs in Organizations, see ARN Formats Supported - // by Organizations (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns) - // in the AWS Organizations User Guide. - Arn *string `type:"string"` - - // The date and time that the handshake expires. If the recipient of the handshake - // request fails to respond before the specified date and time, the handshake - // becomes inactive and is no longer valid. - ExpirationTimestamp *time.Time `type:"timestamp"` - - // The unique identifier (ID) of a handshake. The originating account creates - // the ID when it initiates the handshake. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string - // requires "h-" followed by from 8 to 32 lower-case letters or digits. - Id *string `type:"string"` - - // Information about the two accounts that are participating in the handshake. - Parties []*HandshakeParty `type:"list"` - - // The date and time that the handshake request was made. - RequestedTimestamp *time.Time `type:"timestamp"` - - // Additional information that is needed to process the handshake. - Resources []*HandshakeResource `type:"list"` - - // The current state of the handshake. Use the state to trace the flow of the - // handshake through the process from its creation to its acceptance. The meaning - // of each of the valid values is as follows: - // - // * REQUESTED: This handshake was sent to multiple recipients (applicable - // to only some handshake types) and not all recipients have responded yet. - // The request stays in this state until all recipients respond. - // - // * OPEN: This handshake was sent to multiple recipients (applicable to - // only some policy types) and all recipients have responded, allowing the - // originator to complete the handshake action. - // - // * CANCELED: This handshake is no longer active because it was canceled - // by the originating account. - // - // * ACCEPTED: This handshake is complete because it has been accepted by - // the recipient. - // - // * DECLINED: This handshake is no longer active because it was declined - // by the recipient account. - // - // * EXPIRED: This handshake is no longer active because the originator did - // not receive a response of any kind from the recipient before the expiration - // time (15 days). - State *string `type:"string" enum:"HandshakeState"` -} - -// String returns the string representation -func (s Handshake) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Handshake) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *Handshake) SetAction(v string) *Handshake { - s.Action = &v - return s -} - -// SetArn sets the Arn field's value. -func (s *Handshake) SetArn(v string) *Handshake { - s.Arn = &v - return s -} - -// SetExpirationTimestamp sets the ExpirationTimestamp field's value. -func (s *Handshake) SetExpirationTimestamp(v time.Time) *Handshake { - s.ExpirationTimestamp = &v - return s -} - -// SetId sets the Id field's value. -func (s *Handshake) SetId(v string) *Handshake { - s.Id = &v - return s -} - -// SetParties sets the Parties field's value. -func (s *Handshake) SetParties(v []*HandshakeParty) *Handshake { - s.Parties = v - return s -} - -// SetRequestedTimestamp sets the RequestedTimestamp field's value. -func (s *Handshake) SetRequestedTimestamp(v time.Time) *Handshake { - s.RequestedTimestamp = &v - return s -} - -// SetResources sets the Resources field's value. -func (s *Handshake) SetResources(v []*HandshakeResource) *Handshake { - s.Resources = v - return s -} - -// SetState sets the State field's value. -func (s *Handshake) SetState(v string) *Handshake { - s.State = &v - return s -} - -// Specifies the criteria that are used to select the handshakes for the operation. -type HandshakeFilter struct { - _ struct{} `type:"structure"` - - // Specifies the type of handshake action. - // - // If you specify ActionType, you cannot also specify ParentHandshakeId. - ActionType *string `type:"string" enum:"ActionType"` - - // Specifies the parent handshake. Only used for handshake types that are a - // child of another type. - // - // If you specify ParentHandshakeId, you cannot also specify ActionType. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string - // requires "h-" followed by from 8 to 32 lower-case letters or digits. - ParentHandshakeId *string `type:"string"` -} - -// String returns the string representation -func (s HandshakeFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HandshakeFilter) GoString() string { - return s.String() -} - -// SetActionType sets the ActionType field's value. -func (s *HandshakeFilter) SetActionType(v string) *HandshakeFilter { - s.ActionType = &v - return s -} - -// SetParentHandshakeId sets the ParentHandshakeId field's value. -func (s *HandshakeFilter) SetParentHandshakeId(v string) *HandshakeFilter { - s.ParentHandshakeId = &v - return s -} - -// Identifies a participant in a handshake. -type HandshakeParty struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) for the party. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string - // requires "h-" followed by from 8 to 32 lower-case letters or digits. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The type of party. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"HandshakePartyType"` -} - -// String returns the string representation -func (s HandshakeParty) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HandshakeParty) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HandshakeParty) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HandshakeParty"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *HandshakeParty) SetId(v string) *HandshakeParty { - s.Id = &v - return s -} - -// SetType sets the Type field's value. -func (s *HandshakeParty) SetType(v string) *HandshakeParty { - s.Type = &v - return s -} - -// Contains additional data that is needed to process a handshake. -type HandshakeResource struct { - _ struct{} `type:"structure"` - - // When needed, contains an additional array of HandshakeResource objects. - Resources []*HandshakeResource `type:"list"` - - // The type of information being passed, specifying how the value is to be interpreted - // by the other party: - // - // * ACCOUNT - Specifies an AWS account ID number. - // - // * ORGANIZATION - Specifies an organization ID number. - // - // * EMAIL - Specifies the email address that is associated with the account - // that receives the handshake. - // - // * OWNER_EMAIL - Specifies the email address associated with the master - // account. Included as information about an organization. - // - // * OWNER_NAME - Specifies the name associated with the master account. - // Included as information about an organization. - // - // * NOTES - Additional text provided by the handshake initiator and intended - // for the recipient to read. - Type *string `type:"string" enum:"HandshakeResourceType"` - - // The information that is passed to the other party in the handshake. The format - // of the value string must match the requirements of the specified type. - Value *string `type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s HandshakeResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HandshakeResource) GoString() string { - return s.String() -} - -// SetResources sets the Resources field's value. -func (s *HandshakeResource) SetResources(v []*HandshakeResource) *HandshakeResource { - s.Resources = v - return s -} - -// SetType sets the Type field's value. -func (s *HandshakeResource) SetType(v string) *HandshakeResource { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *HandshakeResource) SetValue(v string) *HandshakeResource { - s.Value = &v - return s -} - -type InviteAccountToOrganizationInput struct { - _ struct{} `type:"structure"` - - // Additional information that you want to include in the generated email to - // the recipient account owner. - Notes *string `type:"string" sensitive:"true"` - - // The identifier (ID) of the AWS account that you want to invite to join your - // organization. This is a JSON object that contains the following elements: - // - // { "Type": "ACCOUNT", "Id": "" } - // - // If you use the AWS CLI, you can submit this as a single string, similar to - // the following example: - // - // --target Id=123456789012,Type=ACCOUNT - // - // If you specify "Type": "ACCOUNT", then you must provide the AWS account ID - // number as the Id. If you specify "Type": "EMAIL", then you must specify the - // email address that is associated with the account. - // - // --target Id=diego@example.com,Type=EMAIL - // - // Target is a required field - Target *HandshakeParty `type:"structure" required:"true"` -} - -// String returns the string representation -func (s InviteAccountToOrganizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InviteAccountToOrganizationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InviteAccountToOrganizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InviteAccountToOrganizationInput"} - if s.Target == nil { - invalidParams.Add(request.NewErrParamRequired("Target")) - } - if s.Target != nil { - if err := s.Target.Validate(); err != nil { - invalidParams.AddNested("Target", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNotes sets the Notes field's value. -func (s *InviteAccountToOrganizationInput) SetNotes(v string) *InviteAccountToOrganizationInput { - s.Notes = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *InviteAccountToOrganizationInput) SetTarget(v *HandshakeParty) *InviteAccountToOrganizationInput { - s.Target = v - return s -} - -type InviteAccountToOrganizationOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the handshake that is created to - // support this invitation request. - Handshake *Handshake `type:"structure"` -} - -// String returns the string representation -func (s InviteAccountToOrganizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InviteAccountToOrganizationOutput) GoString() string { - return s.String() -} - -// SetHandshake sets the Handshake field's value. -func (s *InviteAccountToOrganizationOutput) SetHandshake(v *Handshake) *InviteAccountToOrganizationOutput { - s.Handshake = v - return s -} - -type LeaveOrganizationInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s LeaveOrganizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LeaveOrganizationInput) GoString() string { - return s.String() -} - -type LeaveOrganizationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s LeaveOrganizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LeaveOrganizationOutput) GoString() string { - return s.String() -} - -type ListAWSServiceAccessForOrganizationInput struct { - _ struct{} `type:"structure"` - - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not null). Include that value as the NextToken request parameter - // in the next call to the operation to get the next part of the results. Note - // that Organizations might return fewer results than the maximum even when - // there are more results available. You should check NextToken after every - // operation to ensure that you receive all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAWSServiceAccessForOrganizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAWSServiceAccessForOrganizationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAWSServiceAccessForOrganizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAWSServiceAccessForOrganizationInput"} - 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 *ListAWSServiceAccessForOrganizationInput) SetMaxResults(v int64) *ListAWSServiceAccessForOrganizationInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAWSServiceAccessForOrganizationInput) SetNextToken(v string) *ListAWSServiceAccessForOrganizationInput { - s.NextToken = &v - return s -} - -type ListAWSServiceAccessForOrganizationOutput struct { - _ struct{} `type:"structure"` - - // A list of the service principals for the services that are enabled to integrate - // with your organization. Each principal is a structure that includes the name - // and the date that it was enabled for integration with AWS Organizations. - EnabledServicePrincipals []*EnabledServicePrincipal `type:"list"` - - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAWSServiceAccessForOrganizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAWSServiceAccessForOrganizationOutput) GoString() string { - return s.String() -} - -// SetEnabledServicePrincipals sets the EnabledServicePrincipals field's value. -func (s *ListAWSServiceAccessForOrganizationOutput) SetEnabledServicePrincipals(v []*EnabledServicePrincipal) *ListAWSServiceAccessForOrganizationOutput { - s.EnabledServicePrincipals = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAWSServiceAccessForOrganizationOutput) SetNextToken(v string) *ListAWSServiceAccessForOrganizationOutput { - s.NextToken = &v - return s -} - -type ListAccountsForParentInput struct { - _ struct{} `type:"structure"` - - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not null). Include that value as the NextToken request parameter - // in the next call to the operation to get the next part of the results. Note - // that Organizations might return fewer results than the maximum even when - // there are more results available. You should check NextToken after every - // operation to ensure that you receive all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. - NextToken *string `type:"string"` - - // The unique identifier (ID) for the parent root or organization unit (OU) - // whose accounts you want to list. - // - // ParentId is a required field - ParentId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListAccountsForParentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAccountsForParentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAccountsForParentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAccountsForParentInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ParentId == nil { - invalidParams.Add(request.NewErrParamRequired("ParentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAccountsForParentInput) SetMaxResults(v int64) *ListAccountsForParentInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAccountsForParentInput) SetNextToken(v string) *ListAccountsForParentInput { - s.NextToken = &v - return s -} - -// SetParentId sets the ParentId field's value. -func (s *ListAccountsForParentInput) SetParentId(v string) *ListAccountsForParentInput { - s.ParentId = &v - return s -} - -type ListAccountsForParentOutput struct { - _ struct{} `type:"structure"` - - // A list of the accounts in the specified root or OU. - Accounts []*Account `type:"list"` - - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAccountsForParentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAccountsForParentOutput) GoString() string { - return s.String() -} - -// SetAccounts sets the Accounts field's value. -func (s *ListAccountsForParentOutput) SetAccounts(v []*Account) *ListAccountsForParentOutput { - s.Accounts = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAccountsForParentOutput) SetNextToken(v string) *ListAccountsForParentOutput { - s.NextToken = &v - return s -} - -type ListAccountsInput struct { - _ struct{} `type:"structure"` - - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not null). Include that value as the NextToken request parameter - // in the next call to the operation to get the next part of the results. Note - // that Organizations might return fewer results than the maximum even when - // there are more results available. You should check NextToken after every - // operation to ensure that you receive all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAccountsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAccountsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAccountsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAccountsInput"} - 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 *ListAccountsInput) SetMaxResults(v int64) *ListAccountsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAccountsInput) SetNextToken(v string) *ListAccountsInput { - s.NextToken = &v - return s -} - -type ListAccountsOutput struct { - _ struct{} `type:"structure"` - - // A list of objects in the organization. - Accounts []*Account `type:"list"` - - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAccountsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAccountsOutput) GoString() string { - return s.String() -} - -// SetAccounts sets the Accounts field's value. -func (s *ListAccountsOutput) SetAccounts(v []*Account) *ListAccountsOutput { - s.Accounts = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAccountsOutput) SetNextToken(v string) *ListAccountsOutput { - s.NextToken = &v - return s -} - -type ListChildrenInput struct { - _ struct{} `type:"structure"` - - // Filters the output to include only the specified child type. - // - // ChildType is a required field - ChildType *string `type:"string" required:"true" enum:"ChildType"` - - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not null). Include that value as the NextToken request parameter - // in the next call to the operation to get the next part of the results. Note - // that Organizations might return fewer results than the maximum even when - // there are more results available. You should check NextToken after every - // operation to ensure that you receive all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. - NextToken *string `type:"string"` - - // The unique identifier (ID) for the parent root or OU whose children you want - // to list. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string - // requires one of the following: - // - // * Root: a string that begins with "r-" followed by from 4 to 32 lower-case - // letters or digits. - // - // * Organizational unit (OU): a string that begins with "ou-" followed by - // from 4 to 32 lower-case letters or digits (the ID of the root that the - // OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case - // letters or digits. - // - // ParentId is a required field - ParentId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListChildrenInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListChildrenInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListChildrenInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListChildrenInput"} - if s.ChildType == nil { - invalidParams.Add(request.NewErrParamRequired("ChildType")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ParentId == nil { - invalidParams.Add(request.NewErrParamRequired("ParentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChildType sets the ChildType field's value. -func (s *ListChildrenInput) SetChildType(v string) *ListChildrenInput { - s.ChildType = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListChildrenInput) SetMaxResults(v int64) *ListChildrenInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListChildrenInput) SetNextToken(v string) *ListChildrenInput { - s.NextToken = &v - return s -} - -// SetParentId sets the ParentId field's value. -func (s *ListChildrenInput) SetParentId(v string) *ListChildrenInput { - s.ParentId = &v - return s -} - -type ListChildrenOutput struct { - _ struct{} `type:"structure"` - - // The list of children of the specified parent container. - Children []*Child `type:"list"` - - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListChildrenOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListChildrenOutput) GoString() string { - return s.String() -} - -// SetChildren sets the Children field's value. -func (s *ListChildrenOutput) SetChildren(v []*Child) *ListChildrenOutput { - s.Children = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListChildrenOutput) SetNextToken(v string) *ListChildrenOutput { - s.NextToken = &v - return s -} - -type ListCreateAccountStatusInput struct { - _ struct{} `type:"structure"` - - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not null). Include that value as the NextToken request parameter - // in the next call to the operation to get the next part of the results. Note - // that Organizations might return fewer results than the maximum even when - // there are more results available. You should check NextToken after every - // operation to ensure that you receive all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. - NextToken *string `type:"string"` - - // A list of one or more states that you want included in the response. If this - // parameter is not present, then all requests are included in the response. - States []*string `type:"list"` -} - -// String returns the string representation -func (s ListCreateAccountStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCreateAccountStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListCreateAccountStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListCreateAccountStatusInput"} - 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 *ListCreateAccountStatusInput) SetMaxResults(v int64) *ListCreateAccountStatusInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCreateAccountStatusInput) SetNextToken(v string) *ListCreateAccountStatusInput { - s.NextToken = &v - return s -} - -// SetStates sets the States field's value. -func (s *ListCreateAccountStatusInput) SetStates(v []*string) *ListCreateAccountStatusInput { - s.States = v - return s -} - -type ListCreateAccountStatusOutput struct { - _ struct{} `type:"structure"` - - // A list of objects with details about the requests. Certain elements, such - // as the accountId number, are present in the output only after the account - // has been successfully created. - CreateAccountStatuses []*CreateAccountStatus `type:"list"` - - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListCreateAccountStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCreateAccountStatusOutput) GoString() string { - return s.String() -} - -// SetCreateAccountStatuses sets the CreateAccountStatuses field's value. -func (s *ListCreateAccountStatusOutput) SetCreateAccountStatuses(v []*CreateAccountStatus) *ListCreateAccountStatusOutput { - s.CreateAccountStatuses = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCreateAccountStatusOutput) SetNextToken(v string) *ListCreateAccountStatusOutput { - s.NextToken = &v - return s -} - -type ListHandshakesForAccountInput struct { - _ struct{} `type:"structure"` - - // Filters the handshakes that you want included in the response. The default - // is all types. Use the ActionType element to limit the output to only a specified - // type, such as INVITE, ENABLE-FULL-CONTROL, or APPROVE-FULL-CONTROL. Alternatively, - // for the ENABLE-FULL-CONTROL handshake that generates a separate child handshake - // for each member account, you can specify ParentHandshakeId to see only the - // handshakes that were generated by that parent request. - Filter *HandshakeFilter `type:"structure"` - - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not null). Include that value as the NextToken request parameter - // in the next call to the operation to get the next part of the results. Note - // that Organizations might return fewer results than the maximum even when - // there are more results available. You should check NextToken after every - // operation to ensure that you receive all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListHandshakesForAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListHandshakesForAccountInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListHandshakesForAccountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListHandshakesForAccountInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *ListHandshakesForAccountInput) SetFilter(v *HandshakeFilter) *ListHandshakesForAccountInput { - s.Filter = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListHandshakesForAccountInput) SetMaxResults(v int64) *ListHandshakesForAccountInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListHandshakesForAccountInput) SetNextToken(v string) *ListHandshakesForAccountInput { - s.NextToken = &v - return s -} - -type ListHandshakesForAccountOutput struct { - _ struct{} `type:"structure"` - - // A list of Handshake objects with details about each of the handshakes that - // is associated with the specified account. - Handshakes []*Handshake `type:"list"` - - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListHandshakesForAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListHandshakesForAccountOutput) GoString() string { - return s.String() -} - -// SetHandshakes sets the Handshakes field's value. -func (s *ListHandshakesForAccountOutput) SetHandshakes(v []*Handshake) *ListHandshakesForAccountOutput { - s.Handshakes = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListHandshakesForAccountOutput) SetNextToken(v string) *ListHandshakesForAccountOutput { - s.NextToken = &v - return s -} - -type ListHandshakesForOrganizationInput struct { - _ struct{} `type:"structure"` - - // A filter of the handshakes that you want included in the response. The default - // is all types. Use the ActionType element to limit the output to only a specified - // type, such as INVITE, ENABLE-ALL-FEATURES, or APPROVE-ALL-FEATURES. Alternatively, - // for the ENABLE-ALL-FEATURES handshake that generates a separate child handshake - // for each member account, you can specify the ParentHandshakeId to see only - // the handshakes that were generated by that parent request. - Filter *HandshakeFilter `type:"structure"` - - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not null). Include that value as the NextToken request parameter - // in the next call to the operation to get the next part of the results. Note - // that Organizations might return fewer results than the maximum even when - // there are more results available. You should check NextToken after every - // operation to ensure that you receive all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListHandshakesForOrganizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListHandshakesForOrganizationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListHandshakesForOrganizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListHandshakesForOrganizationInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *ListHandshakesForOrganizationInput) SetFilter(v *HandshakeFilter) *ListHandshakesForOrganizationInput { - s.Filter = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListHandshakesForOrganizationInput) SetMaxResults(v int64) *ListHandshakesForOrganizationInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListHandshakesForOrganizationInput) SetNextToken(v string) *ListHandshakesForOrganizationInput { - s.NextToken = &v - return s -} - -type ListHandshakesForOrganizationOutput struct { - _ struct{} `type:"structure"` - - // A list of Handshake objects with details about each of the handshakes that - // are associated with an organization. - Handshakes []*Handshake `type:"list"` - - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListHandshakesForOrganizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListHandshakesForOrganizationOutput) GoString() string { - return s.String() -} - -// SetHandshakes sets the Handshakes field's value. -func (s *ListHandshakesForOrganizationOutput) SetHandshakes(v []*Handshake) *ListHandshakesForOrganizationOutput { - s.Handshakes = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListHandshakesForOrganizationOutput) SetNextToken(v string) *ListHandshakesForOrganizationOutput { - s.NextToken = &v - return s -} - -type ListOrganizationalUnitsForParentInput struct { - _ struct{} `type:"structure"` - - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not null). Include that value as the NextToken request parameter - // in the next call to the operation to get the next part of the results. Note - // that Organizations might return fewer results than the maximum even when - // there are more results available. You should check NextToken after every - // operation to ensure that you receive all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. - NextToken *string `type:"string"` - - // The unique identifier (ID) of the root or OU whose child OUs you want to - // list. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string - // requires one of the following: - // - // * Root: a string that begins with "r-" followed by from 4 to 32 lower-case - // letters or digits. - // - // * Organizational unit (OU): a string that begins with "ou-" followed by - // from 4 to 32 lower-case letters or digits (the ID of the root that the - // OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case - // letters or digits. - // - // ParentId is a required field - ParentId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListOrganizationalUnitsForParentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOrganizationalUnitsForParentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListOrganizationalUnitsForParentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOrganizationalUnitsForParentInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ParentId == nil { - invalidParams.Add(request.NewErrParamRequired("ParentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListOrganizationalUnitsForParentInput) SetMaxResults(v int64) *ListOrganizationalUnitsForParentInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOrganizationalUnitsForParentInput) SetNextToken(v string) *ListOrganizationalUnitsForParentInput { - s.NextToken = &v - return s -} - -// SetParentId sets the ParentId field's value. -func (s *ListOrganizationalUnitsForParentInput) SetParentId(v string) *ListOrganizationalUnitsForParentInput { - s.ParentId = &v - return s -} - -type ListOrganizationalUnitsForParentOutput struct { - _ struct{} `type:"structure"` - - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. - NextToken *string `type:"string"` - - // A list of the OUs in the specified root or parent OU. - OrganizationalUnits []*OrganizationalUnit `type:"list"` -} - -// String returns the string representation -func (s ListOrganizationalUnitsForParentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOrganizationalUnitsForParentOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOrganizationalUnitsForParentOutput) SetNextToken(v string) *ListOrganizationalUnitsForParentOutput { - s.NextToken = &v - return s -} - -// SetOrganizationalUnits sets the OrganizationalUnits field's value. -func (s *ListOrganizationalUnitsForParentOutput) SetOrganizationalUnits(v []*OrganizationalUnit) *ListOrganizationalUnitsForParentOutput { - s.OrganizationalUnits = v - return s -} - -type ListParentsInput struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the OU or account whose parent containers you - // want to list. Do not specify a root. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a child ID string - // requires one of the following: - // - // * Account: a string that consists of exactly 12 digits. - // - // * Organizational unit (OU): a string that begins with "ou-" followed by - // from 4 to 32 lower-case letters or digits (the ID of the root that contains - // the OU) followed by a second "-" dash and from 8 to 32 additional lower-case - // letters or digits. - // - // ChildId is a required field - ChildId *string `type:"string" required:"true"` - - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not null). Include that value as the NextToken request parameter - // in the next call to the operation to get the next part of the results. Note - // that Organizations might return fewer results than the maximum even when - // there are more results available. You should check NextToken after every - // operation to ensure that you receive all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListParentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListParentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListParentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListParentsInput"} - if s.ChildId == nil { - invalidParams.Add(request.NewErrParamRequired("ChildId")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChildId sets the ChildId field's value. -func (s *ListParentsInput) SetChildId(v string) *ListParentsInput { - s.ChildId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListParentsInput) SetMaxResults(v int64) *ListParentsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListParentsInput) SetNextToken(v string) *ListParentsInput { - s.NextToken = &v - return s -} - -type ListParentsOutput struct { - _ struct{} `type:"structure"` - - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. - NextToken *string `type:"string"` - - // A list of parents for the specified child account or OU. - Parents []*Parent `type:"list"` -} - -// String returns the string representation -func (s ListParentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListParentsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListParentsOutput) SetNextToken(v string) *ListParentsOutput { - s.NextToken = &v - return s -} - -// SetParents sets the Parents field's value. -func (s *ListParentsOutput) SetParents(v []*Parent) *ListParentsOutput { - s.Parents = v - return s -} - -type ListPoliciesForTargetInput struct { - _ struct{} `type:"structure"` - - // The type of policy that you want to include in the returned list. - // - // Filter is a required field - Filter *string `type:"string" required:"true" enum:"PolicyType"` - - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not null). Include that value as the NextToken request parameter - // in the next call to the operation to get the next part of the results. Note - // that Organizations might return fewer results than the maximum even when - // there are more results available. You should check NextToken after every - // operation to ensure that you receive all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. - NextToken *string `type:"string"` - - // The unique identifier (ID) of the root, organizational unit, or account whose - // policies you want to list. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a target ID string - // requires one of the following: - // - // * Root: a string that begins with "r-" followed by from 4 to 32 lower-case - // letters or digits. - // - // * Account: a string that consists of exactly 12 digits. - // - // * Organizational unit (OU): a string that begins with "ou-" followed by - // from 4 to 32 lower-case letters or digits (the ID of the root that the - // OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case - // letters or digits. - // - // TargetId is a required field - TargetId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListPoliciesForTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPoliciesForTargetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPoliciesForTargetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPoliciesForTargetInput"} - if s.Filter == nil { - invalidParams.Add(request.NewErrParamRequired("Filter")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.TargetId == nil { - invalidParams.Add(request.NewErrParamRequired("TargetId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *ListPoliciesForTargetInput) SetFilter(v string) *ListPoliciesForTargetInput { - s.Filter = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListPoliciesForTargetInput) SetMaxResults(v int64) *ListPoliciesForTargetInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPoliciesForTargetInput) SetNextToken(v string) *ListPoliciesForTargetInput { - s.NextToken = &v - return s -} - -// SetTargetId sets the TargetId field's value. -func (s *ListPoliciesForTargetInput) SetTargetId(v string) *ListPoliciesForTargetInput { - s.TargetId = &v - return s -} - -type ListPoliciesForTargetOutput struct { - _ struct{} `type:"structure"` - - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. - NextToken *string `type:"string"` - - // The list of policies that match the criteria in the request. - Policies []*PolicySummary `type:"list"` -} - -// String returns the string representation -func (s ListPoliciesForTargetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPoliciesForTargetOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPoliciesForTargetOutput) SetNextToken(v string) *ListPoliciesForTargetOutput { - s.NextToken = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *ListPoliciesForTargetOutput) SetPolicies(v []*PolicySummary) *ListPoliciesForTargetOutput { - s.Policies = v - return s -} - -type ListPoliciesInput struct { - _ struct{} `type:"structure"` - - // Specifies the type of policy that you want to include in the response. - // - // Filter is a required field - Filter *string `type:"string" required:"true" enum:"PolicyType"` - - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not null). Include that value as the NextToken request parameter - // in the next call to the operation to get the next part of the results. Note - // that Organizations might return fewer results than the maximum even when - // there are more results available. You should check NextToken after every - // operation to ensure that you receive all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPoliciesInput"} - if s.Filter == nil { - invalidParams.Add(request.NewErrParamRequired("Filter")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *ListPoliciesInput) SetFilter(v string) *ListPoliciesInput { - s.Filter = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListPoliciesInput) SetMaxResults(v int64) *ListPoliciesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPoliciesInput) SetNextToken(v string) *ListPoliciesInput { - s.NextToken = &v - return s -} - -type ListPoliciesOutput struct { - _ struct{} `type:"structure"` - - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. - NextToken *string `type:"string"` - - // A list of policies that match the filter criteria in the request. The output - // list does not include the policy contents. To see the content for a policy, - // see DescribePolicy. - Policies []*PolicySummary `type:"list"` -} - -// String returns the string representation -func (s ListPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPoliciesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPoliciesOutput) SetNextToken(v string) *ListPoliciesOutput { - s.NextToken = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *ListPoliciesOutput) SetPolicies(v []*PolicySummary) *ListPoliciesOutput { - s.Policies = v - return s -} - -type ListRootsInput struct { - _ struct{} `type:"structure"` - - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not null). Include that value as the NextToken request parameter - // in the next call to the operation to get the next part of the results. Note - // that Organizations might return fewer results than the maximum even when - // there are more results available. You should check NextToken after every - // operation to ensure that you receive all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListRootsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRootsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRootsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRootsInput"} - 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 *ListRootsInput) SetMaxResults(v int64) *ListRootsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRootsInput) SetNextToken(v string) *ListRootsInput { - s.NextToken = &v - return s -} - -type ListRootsOutput struct { - _ struct{} `type:"structure"` - - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. - NextToken *string `type:"string"` - - // A list of roots that are defined in an organization. - Roots []*Root `type:"list"` -} - -// String returns the string representation -func (s ListRootsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRootsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRootsOutput) SetNextToken(v string) *ListRootsOutput { - s.NextToken = &v - return s -} - -// SetRoots sets the Roots field's value. -func (s *ListRootsOutput) SetRoots(v []*Root) *ListRootsOutput { - s.Roots = v - return s -} - -type ListTargetsForPolicyInput struct { - _ struct{} `type:"structure"` - - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not null). Include that value as the NextToken request parameter - // in the next call to the operation to get the next part of the results. Note - // that Organizations might return fewer results than the maximum even when - // there are more results available. You should check NextToken after every - // operation to ensure that you receive all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. - NextToken *string `type:"string"` - - // The unique identifier (ID) of the policy for which you want to know its attachments. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string - // requires "p-" followed by from 8 to 128 lower-case letters or digits. - // - // PolicyId is a required field - PolicyId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTargetsForPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTargetsForPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTargetsForPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTargetsForPolicyInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.PolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTargetsForPolicyInput) SetMaxResults(v int64) *ListTargetsForPolicyInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTargetsForPolicyInput) SetNextToken(v string) *ListTargetsForPolicyInput { - s.NextToken = &v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *ListTargetsForPolicyInput) SetPolicyId(v string) *ListTargetsForPolicyInput { - s.PolicyId = &v - return s -} - -type ListTargetsForPolicyOutput struct { - _ struct{} `type:"structure"` - - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. - NextToken *string `type:"string"` - - // A list of structures, each of which contains details about one of the entities - // to which the specified policy is attached. - Targets []*PolicyTargetSummary `type:"list"` -} - -// String returns the string representation -func (s ListTargetsForPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTargetsForPolicyOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTargetsForPolicyOutput) SetNextToken(v string) *ListTargetsForPolicyOutput { - s.NextToken = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *ListTargetsForPolicyOutput) SetTargets(v []*PolicyTargetSummary) *ListTargetsForPolicyOutput { - s.Targets = v - return s -} - -type MoveAccountInput struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the account that you want to move. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string - // requires exactly 12 digits. - // - // AccountId is a required field - AccountId *string `type:"string" required:"true"` - - // The unique identifier (ID) of the root or organizational unit that you want - // to move the account to. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string - // requires one of the following: - // - // * Root: a string that begins with "r-" followed by from 4 to 32 lower-case - // letters or digits. - // - // * Organizational unit (OU): a string that begins with "ou-" followed by - // from 4 to 32 lower-case letters or digits (the ID of the root that the - // OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case - // letters or digits. - // - // DestinationParentId is a required field - DestinationParentId *string `type:"string" required:"true"` - - // The unique identifier (ID) of the root or organizational unit that you want - // to move the account from. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string - // requires one of the following: - // - // * Root: a string that begins with "r-" followed by from 4 to 32 lower-case - // letters or digits. - // - // * Organizational unit (OU): a string that begins with "ou-" followed by - // from 4 to 32 lower-case letters or digits (the ID of the root that the - // OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case - // letters or digits. - // - // SourceParentId is a required field - SourceParentId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s MoveAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MoveAccountInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MoveAccountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MoveAccountInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.DestinationParentId == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationParentId")) - } - if s.SourceParentId == nil { - invalidParams.Add(request.NewErrParamRequired("SourceParentId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *MoveAccountInput) SetAccountId(v string) *MoveAccountInput { - s.AccountId = &v - return s -} - -// SetDestinationParentId sets the DestinationParentId field's value. -func (s *MoveAccountInput) SetDestinationParentId(v string) *MoveAccountInput { - s.DestinationParentId = &v - return s -} - -// SetSourceParentId sets the SourceParentId field's value. -func (s *MoveAccountInput) SetSourceParentId(v string) *MoveAccountInput { - s.SourceParentId = &v - return s -} - -type MoveAccountOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s MoveAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MoveAccountOutput) GoString() string { - return s.String() -} - -// Contains details about an organization. An organization is a collection of -// accounts that are centrally managed together using consolidated billing, -// organized hierarchically with organizational units (OUs), and controlled -// with policies . -type Organization struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of an organization. - // - // For more information about ARNs in Organizations, see ARN Formats Supported - // by Organizations (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns) - // in the AWS Organizations User Guide. - Arn *string `type:"string"` - - // A list of policy types that are enabled for this organization. For example, - // if your organization has all features enabled, then service control policies - // (SCPs) are included in the list. - // - // Even if a policy type is shown as available in the organization, you can - // separately enable and disable them at the root level by using EnablePolicyType - // and DisablePolicyType. Use ListRoots to see the status of a policy type in - // that root. - AvailablePolicyTypes []*PolicyTypeSummary `type:"list"` - - // Specifies the functionality that currently is available to the organization. - // If set to "ALL", then all features are enabled and policies can be applied - // to accounts in the organization. If set to "CONSOLIDATED_BILLING", then only - // consolidated billing functionality is available. For more information, see - // Enabling All Features in Your Organization (http://docs.aws.amazon.com/IAM/latest/UserGuide/orgs_manage_org_support-all-features.html) - // in the AWS Organizations User Guide. - FeatureSet *string `type:"string" enum:"OrganizationFeatureSet"` - - // The unique identifier (ID) of an organization. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for an organization ID - // string requires "o-" followed by from 10 to 32 lower-case letters or digits. - Id *string `type:"string"` - - // The Amazon Resource Name (ARN) of the account that is designated as the master - // account for the organization. - // - // For more information about ARNs in Organizations, see ARN Formats Supported - // by Organizations (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns) - // in the AWS Organizations User Guide. - MasterAccountArn *string `type:"string"` - - // The email address that is associated with the AWS account that is designated - // as the master account for the organization. - MasterAccountEmail *string `min:"6" type:"string" sensitive:"true"` - - // The unique identifier (ID) of the master account of an organization. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string - // requires exactly 12 digits. - MasterAccountId *string `type:"string"` -} - -// String returns the string representation -func (s Organization) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Organization) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Organization) SetArn(v string) *Organization { - s.Arn = &v - return s -} - -// SetAvailablePolicyTypes sets the AvailablePolicyTypes field's value. -func (s *Organization) SetAvailablePolicyTypes(v []*PolicyTypeSummary) *Organization { - s.AvailablePolicyTypes = v - return s -} - -// SetFeatureSet sets the FeatureSet field's value. -func (s *Organization) SetFeatureSet(v string) *Organization { - s.FeatureSet = &v - return s -} - -// SetId sets the Id field's value. -func (s *Organization) SetId(v string) *Organization { - s.Id = &v - return s -} - -// SetMasterAccountArn sets the MasterAccountArn field's value. -func (s *Organization) SetMasterAccountArn(v string) *Organization { - s.MasterAccountArn = &v - return s -} - -// SetMasterAccountEmail sets the MasterAccountEmail field's value. -func (s *Organization) SetMasterAccountEmail(v string) *Organization { - s.MasterAccountEmail = &v - return s -} - -// SetMasterAccountId sets the MasterAccountId field's value. -func (s *Organization) SetMasterAccountId(v string) *Organization { - s.MasterAccountId = &v - return s -} - -// Contains details about an organizational unit (OU). An OU is a container -// of AWS accounts within a root of an organization. Policies that are attached -// to an OU apply to all accounts contained in that OU and in any child OUs. -type OrganizationalUnit struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of this OU. - // - // For more information about ARNs in Organizations, see ARN Formats Supported - // by Organizations (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns) - // in the AWS Organizations User Guide. - Arn *string `type:"string"` - - // The unique identifier (ID) associated with this OU. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for an organizational - // unit ID string requires "ou-" followed by from 4 to 32 lower-case letters - // or digits (the ID of the root that contains the OU) followed by a second - // "-" dash and from 8 to 32 additional lower-case letters or digits. - Id *string `type:"string"` - - // The friendly name of this OU. - // - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter is a string of any of the characters in the ASCII character - // range. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s OrganizationalUnit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OrganizationalUnit) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *OrganizationalUnit) SetArn(v string) *OrganizationalUnit { - s.Arn = &v - return s -} - -// SetId sets the Id field's value. -func (s *OrganizationalUnit) SetId(v string) *OrganizationalUnit { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *OrganizationalUnit) SetName(v string) *OrganizationalUnit { - s.Name = &v - return s -} - -// Contains information about either a root or an organizational unit (OU) that -// can contain OUs or accounts in an organization. -type Parent struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the parent entity. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string - // requires one of the following: - // - // * Root: a string that begins with "r-" followed by from 4 to 32 lower-case - // letters or digits. - // - // * Organizational unit (OU): a string that begins with "ou-" followed by - // from 4 to 32 lower-case letters or digits (the ID of the root that the - // OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case - // letters or digits. - Id *string `type:"string"` - - // The type of the parent entity. - Type *string `type:"string" enum:"ParentType"` -} - -// String returns the string representation -func (s Parent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Parent) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *Parent) SetId(v string) *Parent { - s.Id = &v - return s -} - -// SetType sets the Type field's value. -func (s *Parent) SetType(v string) *Parent { - s.Type = &v - return s -} - -// Contains rules to be applied to the affected accounts. Policies can be attached -// directly to accounts, or to roots and OUs to affect all accounts in those -// hierarchies. -type Policy struct { - _ struct{} `type:"structure"` - - // The text content of the policy. - Content *string `min:"1" type:"string"` - - // A structure that contains additional details about the policy. - PolicySummary *PolicySummary `type:"structure"` -} - -// String returns the string representation -func (s Policy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Policy) GoString() string { - return s.String() -} - -// SetContent sets the Content field's value. -func (s *Policy) SetContent(v string) *Policy { - s.Content = &v - return s -} - -// SetPolicySummary sets the PolicySummary field's value. -func (s *Policy) SetPolicySummary(v *PolicySummary) *Policy { - s.PolicySummary = v - return s -} - -// Contains information about a policy, but does not include the content. To -// see the content of a policy, see DescribePolicy. -type PolicySummary struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the policy. - // - // For more information about ARNs in Organizations, see ARN Formats Supported - // by Organizations (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns) - // in the AWS Organizations User Guide. - Arn *string `type:"string"` - - // A boolean value that indicates whether the specified policy is an AWS managed - // policy. If true, then you can attach the policy to roots, OUs, or accounts, - // but you cannot edit it. - AwsManaged *bool `type:"boolean"` - - // The description of the policy. - Description *string `type:"string"` - - // The unique identifier (ID) of the policy. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string - // requires "p-" followed by from 8 to 128 lower-case letters or digits. - Id *string `type:"string"` - - // The friendly name of the policy. - // - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter is a string of any of the characters in the ASCII character - // range. - Name *string `min:"1" type:"string"` - - // The type of policy. - Type *string `type:"string" enum:"PolicyType"` -} - -// String returns the string representation -func (s PolicySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PolicySummary) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *PolicySummary) SetArn(v string) *PolicySummary { - s.Arn = &v - return s -} - -// SetAwsManaged sets the AwsManaged field's value. -func (s *PolicySummary) SetAwsManaged(v bool) *PolicySummary { - s.AwsManaged = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PolicySummary) SetDescription(v string) *PolicySummary { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *PolicySummary) SetId(v string) *PolicySummary { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *PolicySummary) SetName(v string) *PolicySummary { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *PolicySummary) SetType(v string) *PolicySummary { - s.Type = &v - return s -} - -// Contains information about a root, OU, or account that a policy is attached -// to. -type PolicyTargetSummary struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the policy target. - // - // For more information about ARNs in Organizations, see ARN Formats Supported - // by Organizations (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns) - // in the AWS Organizations User Guide. - Arn *string `type:"string"` - - // The friendly name of the policy target. - // - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter is a string of any of the characters in the ASCII character - // range. - Name *string `min:"1" type:"string"` - - // The unique identifier (ID) of the policy target. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a target ID string - // requires one of the following: - // - // * Root: a string that begins with "r-" followed by from 4 to 32 lower-case - // letters or digits. - // - // * Account: a string that consists of exactly 12 digits. - // - // * Organizational unit (OU): a string that begins with "ou-" followed by - // from 4 to 32 lower-case letters or digits (the ID of the root that the - // OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case - // letters or digits. - TargetId *string `type:"string"` - - // The type of the policy target. - Type *string `type:"string" enum:"TargetType"` -} - -// String returns the string representation -func (s PolicyTargetSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PolicyTargetSummary) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *PolicyTargetSummary) SetArn(v string) *PolicyTargetSummary { - s.Arn = &v - return s -} - -// SetName sets the Name field's value. -func (s *PolicyTargetSummary) SetName(v string) *PolicyTargetSummary { - s.Name = &v - return s -} - -// SetTargetId sets the TargetId field's value. -func (s *PolicyTargetSummary) SetTargetId(v string) *PolicyTargetSummary { - s.TargetId = &v - return s -} - -// SetType sets the Type field's value. -func (s *PolicyTargetSummary) SetType(v string) *PolicyTargetSummary { - s.Type = &v - return s -} - -// Contains information about a policy type and its status in the associated -// root. -type PolicyTypeSummary struct { - _ struct{} `type:"structure"` - - // The status of the policy type as it relates to the associated root. To attach - // a policy of the specified type to a root or to an OU or account in that root, - // it must be available in the organization and enabled for that root. - Status *string `type:"string" enum:"PolicyTypeStatus"` - - // The name of the policy type. - Type *string `type:"string" enum:"PolicyType"` -} - -// String returns the string representation -func (s PolicyTypeSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PolicyTypeSummary) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *PolicyTypeSummary) SetStatus(v string) *PolicyTypeSummary { - s.Status = &v - return s -} - -// SetType sets the Type field's value. -func (s *PolicyTypeSummary) SetType(v string) *PolicyTypeSummary { - s.Type = &v - return s -} - -type RemoveAccountFromOrganizationInput struct { - _ struct{} `type:"structure"` - - // The unique identifier (ID) of the member account that you want to remove - // from the organization. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string - // requires exactly 12 digits. - // - // AccountId is a required field - AccountId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RemoveAccountFromOrganizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveAccountFromOrganizationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveAccountFromOrganizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveAccountFromOrganizationInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *RemoveAccountFromOrganizationInput) SetAccountId(v string) *RemoveAccountFromOrganizationInput { - s.AccountId = &v - return s -} - -type RemoveAccountFromOrganizationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveAccountFromOrganizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveAccountFromOrganizationOutput) GoString() string { - return s.String() -} - -// Contains details about a root. A root is a top-level parent node in the hierarchy -// of an organization that can contain organizational units (OUs) and accounts. -// Every root contains every AWS account in the organization. Each root enables -// the accounts to be organized in a different way and to have different policy -// types enabled for use in that root. -type Root struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the root. - // - // For more information about ARNs in Organizations, see ARN Formats Supported - // by Organizations (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns) - // in the AWS Organizations User Guide. - Arn *string `type:"string"` - - // The unique identifier (ID) for the root. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a root ID string - // requires "r-" followed by from 4 to 32 lower-case letters or digits. - Id *string `type:"string"` - - // The friendly name of the root. - // - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter is a string of any of the characters in the ASCII character - // range. - Name *string `min:"1" type:"string"` - - // The types of policies that are currently enabled for the root and therefore - // can be attached to the root or to its OUs or accounts. - // - // Even if a policy type is shown as available in the organization, you can - // separately enable and disable them at the root level by using EnablePolicyType - // and DisablePolicyType. Use DescribeOrganization to see the availability of - // the policy types in that organization. - PolicyTypes []*PolicyTypeSummary `type:"list"` -} - -// String returns the string representation -func (s Root) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Root) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Root) SetArn(v string) *Root { - s.Arn = &v - return s -} - -// SetId sets the Id field's value. -func (s *Root) SetId(v string) *Root { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *Root) SetName(v string) *Root { - s.Name = &v - return s -} - -// SetPolicyTypes sets the PolicyTypes field's value. -func (s *Root) SetPolicyTypes(v []*PolicyTypeSummary) *Root { - s.PolicyTypes = v - return s -} - -type UpdateOrganizationalUnitInput struct { - _ struct{} `type:"structure"` - - // The new name that you want to assign to the OU. - // - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter is a string of any of the characters in the ASCII character - // range. - Name *string `min:"1" type:"string"` - - // The unique identifier (ID) of the OU that you want to rename. You can get - // the ID from the ListOrganizationalUnitsForParent operation. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for an organizational - // unit ID string requires "ou-" followed by from 4 to 32 lower-case letters - // or digits (the ID of the root that contains the OU) followed by a second - // "-" dash and from 8 to 32 additional lower-case letters or digits. - // - // OrganizationalUnitId is a required field - OrganizationalUnitId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateOrganizationalUnitInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateOrganizationalUnitInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateOrganizationalUnitInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateOrganizationalUnitInput"} - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.OrganizationalUnitId == nil { - invalidParams.Add(request.NewErrParamRequired("OrganizationalUnitId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *UpdateOrganizationalUnitInput) SetName(v string) *UpdateOrganizationalUnitInput { - s.Name = &v - return s -} - -// SetOrganizationalUnitId sets the OrganizationalUnitId field's value. -func (s *UpdateOrganizationalUnitInput) SetOrganizationalUnitId(v string) *UpdateOrganizationalUnitInput { - s.OrganizationalUnitId = &v - return s -} - -type UpdateOrganizationalUnitOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains the details about the specified OU, including its - // new name. - OrganizationalUnit *OrganizationalUnit `type:"structure"` -} - -// String returns the string representation -func (s UpdateOrganizationalUnitOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateOrganizationalUnitOutput) GoString() string { - return s.String() -} - -// SetOrganizationalUnit sets the OrganizationalUnit field's value. -func (s *UpdateOrganizationalUnitOutput) SetOrganizationalUnit(v *OrganizationalUnit) *UpdateOrganizationalUnitOutput { - s.OrganizationalUnit = v - return s -} - -type UpdatePolicyInput struct { - _ struct{} `type:"structure"` - - // If provided, the new content for the policy. The text must be correctly formatted - // JSON that complies with the syntax for the policy's type. For more information, - // see Service Control Policy Syntax (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html) - // in the AWS Organizations User Guide. - Content *string `min:"1" type:"string"` - - // If provided, the new description for the policy. - Description *string `type:"string"` - - // If provided, the new name for the policy. - // - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter is a string of any of the characters in the ASCII character - // range. - Name *string `min:"1" type:"string"` - - // The unique identifier (ID) of the policy that you want to update. - // - // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string - // requires "p-" followed by from 8 to 128 lower-case letters or digits. - // - // PolicyId is a required field - PolicyId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdatePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdatePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdatePolicyInput"} - if s.Content != nil && len(*s.Content) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Content", 1)) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.PolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContent sets the Content field's value. -func (s *UpdatePolicyInput) SetContent(v string) *UpdatePolicyInput { - s.Content = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdatePolicyInput) SetDescription(v string) *UpdatePolicyInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdatePolicyInput) SetName(v string) *UpdatePolicyInput { - s.Name = &v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *UpdatePolicyInput) SetPolicyId(v string) *UpdatePolicyInput { - s.PolicyId = &v - return s -} - -type UpdatePolicyOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the updated policy, showing the requested - // changes. - Policy *Policy `type:"structure"` -} - -// String returns the string representation -func (s UpdatePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *UpdatePolicyOutput) SetPolicy(v *Policy) *UpdatePolicyOutput { - s.Policy = v - return s -} - -const ( - // AccessDeniedForDependencyExceptionReasonAccessDeniedDuringCreateServiceLinkedRole is a AccessDeniedForDependencyExceptionReason enum value - AccessDeniedForDependencyExceptionReasonAccessDeniedDuringCreateServiceLinkedRole = "ACCESS_DENIED_DURING_CREATE_SERVICE_LINKED_ROLE" -) - -const ( - // AccountJoinedMethodInvited is a AccountJoinedMethod enum value - AccountJoinedMethodInvited = "INVITED" - - // AccountJoinedMethodCreated is a AccountJoinedMethod enum value - AccountJoinedMethodCreated = "CREATED" -) - -const ( - // AccountStatusActive is a AccountStatus enum value - AccountStatusActive = "ACTIVE" - - // AccountStatusSuspended is a AccountStatus enum value - AccountStatusSuspended = "SUSPENDED" -) - -const ( - // ActionTypeInvite is a ActionType enum value - ActionTypeInvite = "INVITE" - - // ActionTypeEnableAllFeatures is a ActionType enum value - ActionTypeEnableAllFeatures = "ENABLE_ALL_FEATURES" - - // ActionTypeApproveAllFeatures is a ActionType enum value - ActionTypeApproveAllFeatures = "APPROVE_ALL_FEATURES" - - // ActionTypeAddOrganizationsServiceLinkedRole is a ActionType enum value - ActionTypeAddOrganizationsServiceLinkedRole = "ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE" -) - -const ( - // ChildTypeAccount is a ChildType enum value - ChildTypeAccount = "ACCOUNT" - - // ChildTypeOrganizationalUnit is a ChildType enum value - ChildTypeOrganizationalUnit = "ORGANIZATIONAL_UNIT" -) - -const ( - // ConstraintViolationExceptionReasonAccountNumberLimitExceeded is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonAccountNumberLimitExceeded = "ACCOUNT_NUMBER_LIMIT_EXCEEDED" - - // ConstraintViolationExceptionReasonHandshakeRateLimitExceeded is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonHandshakeRateLimitExceeded = "HANDSHAKE_RATE_LIMIT_EXCEEDED" - - // ConstraintViolationExceptionReasonOuNumberLimitExceeded is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonOuNumberLimitExceeded = "OU_NUMBER_LIMIT_EXCEEDED" - - // ConstraintViolationExceptionReasonOuDepthLimitExceeded is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonOuDepthLimitExceeded = "OU_DEPTH_LIMIT_EXCEEDED" - - // ConstraintViolationExceptionReasonPolicyNumberLimitExceeded is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonPolicyNumberLimitExceeded = "POLICY_NUMBER_LIMIT_EXCEEDED" - - // ConstraintViolationExceptionReasonMaxPolicyTypeAttachmentLimitExceeded is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonMaxPolicyTypeAttachmentLimitExceeded = "MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED" - - // ConstraintViolationExceptionReasonMinPolicyTypeAttachmentLimitExceeded is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonMinPolicyTypeAttachmentLimitExceeded = "MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED" - - // ConstraintViolationExceptionReasonAccountCannotLeaveOrganization is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonAccountCannotLeaveOrganization = "ACCOUNT_CANNOT_LEAVE_ORGANIZATION" - - // ConstraintViolationExceptionReasonAccountCannotLeaveWithoutEula is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonAccountCannotLeaveWithoutEula = "ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA" - - // ConstraintViolationExceptionReasonAccountCannotLeaveWithoutPhoneVerification is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonAccountCannotLeaveWithoutPhoneVerification = "ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION" - - // ConstraintViolationExceptionReasonMasterAccountPaymentInstrumentRequired is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonMasterAccountPaymentInstrumentRequired = "MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED" - - // ConstraintViolationExceptionReasonMemberAccountPaymentInstrumentRequired is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonMemberAccountPaymentInstrumentRequired = "MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED" - - // ConstraintViolationExceptionReasonAccountCreationRateLimitExceeded is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonAccountCreationRateLimitExceeded = "ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED" - - // ConstraintViolationExceptionReasonMasterAccountAddressDoesNotMatchMarketplace is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonMasterAccountAddressDoesNotMatchMarketplace = "MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE" - - // ConstraintViolationExceptionReasonMasterAccountMissingContactInfo is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonMasterAccountMissingContactInfo = "MASTER_ACCOUNT_MISSING_CONTACT_INFO" - - // ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode = "ORGANIZATION_NOT_IN_ALL_FEATURES_MODE" - - // ConstraintViolationExceptionReasonEmailVerificationCodeExpired is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonEmailVerificationCodeExpired = "EMAIL_VERIFICATION_CODE_EXPIRED" - - // ConstraintViolationExceptionReasonWaitPeriodActive is a ConstraintViolationExceptionReason enum value - ConstraintViolationExceptionReasonWaitPeriodActive = "WAIT_PERIOD_ACTIVE" -) - -const ( - // CreateAccountFailureReasonAccountLimitExceeded is a CreateAccountFailureReason enum value - CreateAccountFailureReasonAccountLimitExceeded = "ACCOUNT_LIMIT_EXCEEDED" - - // CreateAccountFailureReasonEmailAlreadyExists is a CreateAccountFailureReason enum value - CreateAccountFailureReasonEmailAlreadyExists = "EMAIL_ALREADY_EXISTS" - - // CreateAccountFailureReasonInvalidAddress is a CreateAccountFailureReason enum value - CreateAccountFailureReasonInvalidAddress = "INVALID_ADDRESS" - - // CreateAccountFailureReasonInvalidEmail is a CreateAccountFailureReason enum value - CreateAccountFailureReasonInvalidEmail = "INVALID_EMAIL" - - // CreateAccountFailureReasonConcurrentAccountModification is a CreateAccountFailureReason enum value - CreateAccountFailureReasonConcurrentAccountModification = "CONCURRENT_ACCOUNT_MODIFICATION" - - // CreateAccountFailureReasonInternalFailure is a CreateAccountFailureReason enum value - CreateAccountFailureReasonInternalFailure = "INTERNAL_FAILURE" -) - -const ( - // CreateAccountStateInProgress is a CreateAccountState enum value - CreateAccountStateInProgress = "IN_PROGRESS" - - // CreateAccountStateSucceeded is a CreateAccountState enum value - CreateAccountStateSucceeded = "SUCCEEDED" - - // CreateAccountStateFailed is a CreateAccountState enum value - CreateAccountStateFailed = "FAILED" -) - -const ( - // HandshakeConstraintViolationExceptionReasonAccountNumberLimitExceeded is a HandshakeConstraintViolationExceptionReason enum value - HandshakeConstraintViolationExceptionReasonAccountNumberLimitExceeded = "ACCOUNT_NUMBER_LIMIT_EXCEEDED" - - // HandshakeConstraintViolationExceptionReasonHandshakeRateLimitExceeded is a HandshakeConstraintViolationExceptionReason enum value - HandshakeConstraintViolationExceptionReasonHandshakeRateLimitExceeded = "HANDSHAKE_RATE_LIMIT_EXCEEDED" - - // HandshakeConstraintViolationExceptionReasonAlreadyInAnOrganization is a HandshakeConstraintViolationExceptionReason enum value - HandshakeConstraintViolationExceptionReasonAlreadyInAnOrganization = "ALREADY_IN_AN_ORGANIZATION" - - // HandshakeConstraintViolationExceptionReasonOrganizationAlreadyHasAllFeatures is a HandshakeConstraintViolationExceptionReason enum value - HandshakeConstraintViolationExceptionReasonOrganizationAlreadyHasAllFeatures = "ORGANIZATION_ALREADY_HAS_ALL_FEATURES" - - // HandshakeConstraintViolationExceptionReasonInviteDisabledDuringEnableAllFeatures is a HandshakeConstraintViolationExceptionReason enum value - HandshakeConstraintViolationExceptionReasonInviteDisabledDuringEnableAllFeatures = "INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES" - - // HandshakeConstraintViolationExceptionReasonPaymentInstrumentRequired is a HandshakeConstraintViolationExceptionReason enum value - HandshakeConstraintViolationExceptionReasonPaymentInstrumentRequired = "PAYMENT_INSTRUMENT_REQUIRED" - - // HandshakeConstraintViolationExceptionReasonOrganizationFromDifferentSellerOfRecord is a HandshakeConstraintViolationExceptionReason enum value - HandshakeConstraintViolationExceptionReasonOrganizationFromDifferentSellerOfRecord = "ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD" - - // HandshakeConstraintViolationExceptionReasonOrganizationMembershipChangeRateLimitExceeded is a HandshakeConstraintViolationExceptionReason enum value - HandshakeConstraintViolationExceptionReasonOrganizationMembershipChangeRateLimitExceeded = "ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED" -) - -const ( - // HandshakePartyTypeAccount is a HandshakePartyType enum value - HandshakePartyTypeAccount = "ACCOUNT" - - // HandshakePartyTypeOrganization is a HandshakePartyType enum value - HandshakePartyTypeOrganization = "ORGANIZATION" - - // HandshakePartyTypeEmail is a HandshakePartyType enum value - HandshakePartyTypeEmail = "EMAIL" -) - -const ( - // HandshakeResourceTypeAccount is a HandshakeResourceType enum value - HandshakeResourceTypeAccount = "ACCOUNT" - - // HandshakeResourceTypeOrganization is a HandshakeResourceType enum value - HandshakeResourceTypeOrganization = "ORGANIZATION" - - // HandshakeResourceTypeOrganizationFeatureSet is a HandshakeResourceType enum value - HandshakeResourceTypeOrganizationFeatureSet = "ORGANIZATION_FEATURE_SET" - - // HandshakeResourceTypeEmail is a HandshakeResourceType enum value - HandshakeResourceTypeEmail = "EMAIL" - - // HandshakeResourceTypeMasterEmail is a HandshakeResourceType enum value - HandshakeResourceTypeMasterEmail = "MASTER_EMAIL" - - // HandshakeResourceTypeMasterName is a HandshakeResourceType enum value - HandshakeResourceTypeMasterName = "MASTER_NAME" - - // HandshakeResourceTypeNotes is a HandshakeResourceType enum value - HandshakeResourceTypeNotes = "NOTES" - - // HandshakeResourceTypeParentHandshake is a HandshakeResourceType enum value - HandshakeResourceTypeParentHandshake = "PARENT_HANDSHAKE" -) - -const ( - // HandshakeStateRequested is a HandshakeState enum value - HandshakeStateRequested = "REQUESTED" - - // HandshakeStateOpen is a HandshakeState enum value - HandshakeStateOpen = "OPEN" - - // HandshakeStateCanceled is a HandshakeState enum value - HandshakeStateCanceled = "CANCELED" - - // HandshakeStateAccepted is a HandshakeState enum value - HandshakeStateAccepted = "ACCEPTED" - - // HandshakeStateDeclined is a HandshakeState enum value - HandshakeStateDeclined = "DECLINED" - - // HandshakeStateExpired is a HandshakeState enum value - HandshakeStateExpired = "EXPIRED" -) - -const ( - // IAMUserAccessToBillingAllow is a IAMUserAccessToBilling enum value - IAMUserAccessToBillingAllow = "ALLOW" - - // IAMUserAccessToBillingDeny is a IAMUserAccessToBilling enum value - IAMUserAccessToBillingDeny = "DENY" -) - -const ( - // InvalidInputExceptionReasonInvalidPartyTypeTarget is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonInvalidPartyTypeTarget = "INVALID_PARTY_TYPE_TARGET" - - // InvalidInputExceptionReasonInvalidSyntaxOrganizationArn is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonInvalidSyntaxOrganizationArn = "INVALID_SYNTAX_ORGANIZATION_ARN" - - // InvalidInputExceptionReasonInvalidSyntaxPolicyId is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonInvalidSyntaxPolicyId = "INVALID_SYNTAX_POLICY_ID" - - // InvalidInputExceptionReasonInvalidEnum is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonInvalidEnum = "INVALID_ENUM" - - // InvalidInputExceptionReasonInvalidListMember is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonInvalidListMember = "INVALID_LIST_MEMBER" - - // InvalidInputExceptionReasonMaxLengthExceeded is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonMaxLengthExceeded = "MAX_LENGTH_EXCEEDED" - - // InvalidInputExceptionReasonMaxValueExceeded is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonMaxValueExceeded = "MAX_VALUE_EXCEEDED" - - // InvalidInputExceptionReasonMinLengthExceeded is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonMinLengthExceeded = "MIN_LENGTH_EXCEEDED" - - // InvalidInputExceptionReasonMinValueExceeded is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonMinValueExceeded = "MIN_VALUE_EXCEEDED" - - // InvalidInputExceptionReasonImmutablePolicy is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonImmutablePolicy = "IMMUTABLE_POLICY" - - // InvalidInputExceptionReasonInvalidPattern is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonInvalidPattern = "INVALID_PATTERN" - - // InvalidInputExceptionReasonInvalidPatternTargetId is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonInvalidPatternTargetId = "INVALID_PATTERN_TARGET_ID" - - // InvalidInputExceptionReasonInputRequired is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonInputRequired = "INPUT_REQUIRED" - - // InvalidInputExceptionReasonInvalidNextToken is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonInvalidNextToken = "INVALID_NEXT_TOKEN" - - // InvalidInputExceptionReasonMaxLimitExceededFilter is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonMaxLimitExceededFilter = "MAX_LIMIT_EXCEEDED_FILTER" - - // InvalidInputExceptionReasonMovingAccountBetweenDifferentRoots is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonMovingAccountBetweenDifferentRoots = "MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS" - - // InvalidInputExceptionReasonInvalidFullNameTarget is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonInvalidFullNameTarget = "INVALID_FULL_NAME_TARGET" - - // InvalidInputExceptionReasonUnrecognizedServicePrincipal is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonUnrecognizedServicePrincipal = "UNRECOGNIZED_SERVICE_PRINCIPAL" - - // InvalidInputExceptionReasonInvalidRoleName is a InvalidInputExceptionReason enum value - InvalidInputExceptionReasonInvalidRoleName = "INVALID_ROLE_NAME" -) - -const ( - // OrganizationFeatureSetAll is a OrganizationFeatureSet enum value - OrganizationFeatureSetAll = "ALL" - - // OrganizationFeatureSetConsolidatedBilling is a OrganizationFeatureSet enum value - OrganizationFeatureSetConsolidatedBilling = "CONSOLIDATED_BILLING" -) - -const ( - // ParentTypeRoot is a ParentType enum value - ParentTypeRoot = "ROOT" - - // ParentTypeOrganizationalUnit is a ParentType enum value - ParentTypeOrganizationalUnit = "ORGANIZATIONAL_UNIT" -) - -const ( - // PolicyTypeServiceControlPolicy is a PolicyType enum value - PolicyTypeServiceControlPolicy = "SERVICE_CONTROL_POLICY" -) - -const ( - // PolicyTypeStatusEnabled is a PolicyTypeStatus enum value - PolicyTypeStatusEnabled = "ENABLED" - - // PolicyTypeStatusPendingEnable is a PolicyTypeStatus enum value - PolicyTypeStatusPendingEnable = "PENDING_ENABLE" - - // PolicyTypeStatusPendingDisable is a PolicyTypeStatus enum value - PolicyTypeStatusPendingDisable = "PENDING_DISABLE" -) - -const ( - // TargetTypeAccount is a TargetType enum value - TargetTypeAccount = "ACCOUNT" - - // TargetTypeOrganizationalUnit is a TargetType enum value - TargetTypeOrganizationalUnit = "ORGANIZATIONAL_UNIT" - - // TargetTypeRoot is a TargetType enum value - TargetTypeRoot = "ROOT" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/doc.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/doc.go deleted file mode 100644 index cc704a61a..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/doc.go +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package organizations provides the client and types for making API -// requests to AWS Organizations. -// -// AWS Organizations is a web service that enables you to consolidate your multiple -// AWS accounts into an organization and centrally manage your accounts and -// their resources. -// -// This guide provides descriptions of the Organizations API. For more information -// about using this service, see the AWS Organizations User Guide (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html). -// -// API Version -// -// This version of the Organizations API Reference documents the Organizations -// API version 2016-11-28. -// -// As an alternative to using the API directly, you can use one of the AWS SDKs, -// which consist of libraries and sample code for various programming languages -// and platforms (Java, Ruby, .NET, iOS, Android, and more). The SDKs provide -// a convenient way to create programmatic access to AWS Organizations. For -// example, the SDKs take care of cryptographically signing requests, managing -// errors, and retrying requests automatically. For more information about the -// AWS SDKs, including how to download and install them, see Tools for Amazon -// Web Services (http://aws.amazon.com/tools/). -// -// We recommend that you use the AWS SDKs to make programmatic API calls to -// Organizations. However, you also can use the Organizations Query API to make -// direct calls to the Organizations web service. To learn more about the Organizations -// Query API, see Making Query Requests (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_query-requests.html) -// in the AWS Organizations User Guide. Organizations supports GET and POST -// requests for all actions. That is, the API does not require you to use GET -// for some actions and POST for others. However, GET requests are subject to -// the limitation size of a URL. Therefore, for operations that require larger -// sizes, use a POST request. -// -// Signing Requests -// -// When you send HTTP requests to AWS, you must sign the requests so that AWS -// can identify who sent them. You sign requests with your AWS access key, which -// consists of an access key ID and a secret access key. We strongly recommend -// that you do not create an access key for your root account. Anyone who has -// the access key for your root account has unrestricted access to all the resources -// in your account. Instead, create an access key for an IAM user account that -// has administrative privileges. As another option, use AWS Security Token -// Service to generate temporary security credentials, and use those credentials -// to sign requests. -// -// To sign requests, we recommend that you use Signature Version 4 (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). -// If you have an existing application that uses Signature Version 2, you do -// not have to update it to use Signature Version 4. However, some operations -// now require Signature Version 4. The documentation for operations that require -// version 4 indicate this requirement. -// -// When you use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs -// to make requests to AWS, these tools automatically sign the requests for -// you with the access key that you specify when you configure the tools. -// -// In this release, each organization can have only one root. In a future release, -// a single organization will support multiple roots. -// -// Support and Feedback for AWS Organizations -// -// We welcome your feedback. Send your comments to feedback-awsorganizations@amazon.com -// (mailto:feedback-awsorganizations@amazon.com) or post your feedback and questions -// in the AWS Organizations support forum (http://forums.aws.amazon.com/forum.jspa?forumID=219). -// For more information about the AWS support forums, see Forums Help (http://forums.aws.amazon.com/help.jspa). -// -// Endpoint to Call When Using the CLI or the AWS API -// -// For the current release of Organizations, you must specify the us-east-1 -// region for all AWS API and CLI calls. You can do this in the CLI by using -// these parameters and commands: -// -// * Use the following parameter with each command to specify both the endpoint -// and its region: -// -// --endpoint-url https://organizations.us-east-1.amazonaws.com -// -// * Use the default endpoint, but configure your default region with this -// command: -// -// aws configure set default.region us-east-1 -// -// * Use the following parameter with each command to specify the endpoint: -// -// --region us-east-1 -// -// For the various SDKs used to call the APIs, see the documentation for the -// SDK of interest to learn how to direct the requests to a specific endpoint. -// For more information, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#sts_region) -// in the AWS General Reference. -// -// How examples are presented -// -// The JSON returned by the AWS Organizations service as response to your requests -// is returned as a single long string without line breaks or formatting whitespace. -// Both line breaks and whitespace are included in the examples in this guide -// to improve readability. When example input parameters also would result in -// long strings that would extend beyond the screen, we insert line breaks to -// enhance readability. You should always submit the input as a single JSON -// text string. -// -// Recording API Requests -// -// AWS Organizations supports AWS CloudTrail, a service that records AWS API -// calls for your AWS account and delivers log files to an Amazon S3 bucket. -// By using information collected by AWS CloudTrail, you can determine which -// requests were successfully made to Organizations, who made the request, when -// it was made, and so on. For more about AWS Organizations and its support -// for AWS CloudTrail, see Logging AWS Organizations Events with AWS CloudTrail -// (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_monitoring.html#orgs_cloudtrail-integration) -// in the AWS Organizations User Guide. To learn more about CloudTrail, including -// how to turn it on and find your log files, see the AWS CloudTrail User Guide -// (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28 for more information on this service. -// -// See organizations package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/organizations/ -// -// Using the Client -// -// To contact AWS Organizations 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 Organizations client Organizations for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/organizations/#New -package organizations diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go deleted file mode 100644 index 5d886170e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go +++ /dev/null @@ -1,470 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package organizations - -const ( - - // ErrCodeAWSOrganizationsNotInUseException for service response error code - // "AWSOrganizationsNotInUseException". - // - // Your account isn't a member of an organization. To make this request, you - // must use the credentials of an account that belongs to an organization. - ErrCodeAWSOrganizationsNotInUseException = "AWSOrganizationsNotInUseException" - - // ErrCodeAccessDeniedException for service response error code - // "AccessDeniedException". - // - // You don't have permissions to perform the requested operation. The user or - // role that is making the request must have at least one IAM permissions policy - // attached that grants the required permissions. For more information, see - // Access Management (http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) - // in the IAM User Guide. - ErrCodeAccessDeniedException = "AccessDeniedException" - - // ErrCodeAccessDeniedForDependencyException for service response error code - // "AccessDeniedForDependencyException". - // - // The operation that you attempted requires you to have the iam:CreateServiceLinkedRole - // so that AWS Organizations can create the required service-linked role. You - // don't have that permission. - ErrCodeAccessDeniedForDependencyException = "AccessDeniedForDependencyException" - - // ErrCodeAccountNotFoundException for service response error code - // "AccountNotFoundException". - // - // We can't find an AWS account with the AccountId that you specified, or the - // account whose credentials you used to make this request isn't a member of - // an organization. - ErrCodeAccountNotFoundException = "AccountNotFoundException" - - // ErrCodeAccountOwnerNotVerifiedException for service response error code - // "AccountOwnerNotVerifiedException". - // - // You can't invite an existing account to your organization until you verify - // that you own the email address associated with the master account. For more - // information, see Email Address Verification (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification) - // in the AWS Organizations User Guide. - ErrCodeAccountOwnerNotVerifiedException = "AccountOwnerNotVerifiedException" - - // ErrCodeAlreadyInOrganizationException for service response error code - // "AlreadyInOrganizationException". - // - // This account is already a member of an organization. An account can belong - // to only one organization at a time. - ErrCodeAlreadyInOrganizationException = "AlreadyInOrganizationException" - - // ErrCodeChildNotFoundException for service response error code - // "ChildNotFoundException". - // - // We can't find an organizational unit (OU) or AWS account with the ChildId - // that you specified. - ErrCodeChildNotFoundException = "ChildNotFoundException" - - // ErrCodeConcurrentModificationException for service response error code - // "ConcurrentModificationException". - // - // The target of the operation is currently being modified by a different request. - // Try again later. - ErrCodeConcurrentModificationException = "ConcurrentModificationException" - - // ErrCodeConstraintViolationException for service response error code - // "ConstraintViolationException". - // - // Performing this operation violates a minimum or maximum value limit. For - // example, attempting to removing the last service control policy (SCP) from - // an OU or root, inviting or creating too many accounts to the organization, - // or attaching too many policies to an account, OU, or root. This exception - // includes a reason that contains additional information about the violated - // limit. - // - // Some of the reasons in the following list might not be applicable to this - // specific API or operation: - // - // * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on - // the number of accounts in an organization. If you need more accounts, - // contactAWS Support (https://console.aws.amazon.com/support/home#/) to - // request an increase in your limit. - // - // Or the number of invitations that you tried to send would cause you to exceed - // the limit of accounts in your organization. Send fewer invitations or - // contact AWS Support to request an increase in the number of accounts. - // - // Deleted and closed accounts still count toward your limit. - // - // If you get receive this exception when running a command immediately after - // creating the organization, wait one hour and try again. If after an hour - // it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). - // - // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of - // handshakes that you can send in one day. - // - // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs - // that you can have in an organization. - // - // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is - // too many levels deep. - // - // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation - // that requires the organization to be configured to support all features. - // An organization that supports only consolidated billing features can't - // perform this operation. - // - // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of - // policies that you can have in an organization. - // - // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the - // number of policies of a certain type that can be attached to an entity - // at one time. - // - // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a - // policy from an entity that would cause the entity to have fewer than the - // minimum number of policies of a certain type required. - // - // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account - // from the organization that doesn't yet have enough information to exist - // as a standalone account. This account requires you to first agree to the - // AWS Customer Agreement. Follow the steps at To leave an organization when - // all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) - // in the AWS Organizations User Guide. - // - // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove - // an account from the organization that doesn't yet have enough information - // to exist as a standalone account. This account requires you to first complete - // phone verification. Follow the steps at To leave an organization when - // all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) - // in the AWS Organizations User Guide. - // - // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization - // with this master account, you first must associate a payment instrument, - // such as a credit card, with the account. Follow the steps at To leave - // an organization when all required account information has not yet been - // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) - // in the AWS Organizations User Guide. - // - // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation - // with this member account, you first must associate a payment instrument, - // such as a credit card, with the account. Follow the steps at To leave - // an organization when all required account information has not yet been - // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) - // in the AWS Organizations User Guide. - // - // * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number - // of accounts that you can create in one day. - // - // * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account - // in this organization, you first must migrate the organization's master - // account to the marketplace that corresponds to the master account's address. - // For example, accounts with India addresses must be associated with the - // AISPL marketplace. All accounts in an organization must be associated - // with the same marketplace. - // - // * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you - // must first provide contact a valid address and phone number for the master - // account. Then try the operation again. - ErrCodeConstraintViolationException = "ConstraintViolationException" - - // ErrCodeCreateAccountStatusNotFoundException for service response error code - // "CreateAccountStatusNotFoundException". - // - // We can't find an create account request with the CreateAccountRequestId that - // you specified. - ErrCodeCreateAccountStatusNotFoundException = "CreateAccountStatusNotFoundException" - - // ErrCodeDestinationParentNotFoundException for service response error code - // "DestinationParentNotFoundException". - // - // We can't find the destination container (a root or OU) with the ParentId - // that you specified. - ErrCodeDestinationParentNotFoundException = "DestinationParentNotFoundException" - - // ErrCodeDuplicateAccountException for service response error code - // "DuplicateAccountException". - // - // That account is already present in the specified destination. - ErrCodeDuplicateAccountException = "DuplicateAccountException" - - // ErrCodeDuplicateHandshakeException for service response error code - // "DuplicateHandshakeException". - // - // A handshake with the same action and target already exists. For example, - // if you invited an account to join your organization, the invited account - // might already have a pending invitation from this organization. If you intend - // to resend an invitation to an account, ensure that existing handshakes that - // might be considered duplicates are canceled or declined. - ErrCodeDuplicateHandshakeException = "DuplicateHandshakeException" - - // ErrCodeDuplicateOrganizationalUnitException for service response error code - // "DuplicateOrganizationalUnitException". - // - // An OU with the same name already exists. - ErrCodeDuplicateOrganizationalUnitException = "DuplicateOrganizationalUnitException" - - // ErrCodeDuplicatePolicyAttachmentException for service response error code - // "DuplicatePolicyAttachmentException". - // - // The selected policy is already attached to the specified target. - ErrCodeDuplicatePolicyAttachmentException = "DuplicatePolicyAttachmentException" - - // ErrCodeDuplicatePolicyException for service response error code - // "DuplicatePolicyException". - // - // A policy with the same name already exists. - ErrCodeDuplicatePolicyException = "DuplicatePolicyException" - - // ErrCodeFinalizingOrganizationException for service response error code - // "FinalizingOrganizationException". - // - // AWS Organizations couldn't perform the operation because your organization - // hasn't finished initializing. This can take up to an hour. Try again later. - // If after one hour you continue to receive this error, contact AWS Support - // (https://console.aws.amazon.com/support/home#/). - ErrCodeFinalizingOrganizationException = "FinalizingOrganizationException" - - // ErrCodeHandshakeAlreadyInStateException for service response error code - // "HandshakeAlreadyInStateException". - // - // The specified handshake is already in the requested state. For example, you - // can't accept a handshake that was already accepted. - ErrCodeHandshakeAlreadyInStateException = "HandshakeAlreadyInStateException" - - // ErrCodeHandshakeConstraintViolationException for service response error code - // "HandshakeConstraintViolationException". - // - // The requested operation would violate the constraint identified in the reason - // code. - // - // Some of the reasons in the following list might not be applicable to this - // specific API or operation: - // - // * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on - // the number of accounts in an organization. Note that deleted and closed - // accounts still count toward your limit. - // - // If you get this exception immediately after creating the organization, wait - // one hour and try again. If after an hour it continues to fail with this - // error, contact AWS Support (https://console.aws.amazon.com/support/home#/). - // - // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of - // handshakes that you can send in one day. - // - // * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because - // the invited account is already a member of an organization. - // - // * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid - // because the organization has already enabled all features. - // - // * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations - // to join an organization while it's in the process of enabling all features. - // You can resume inviting accounts after you finalize the process when all - // accounts have agreed to the change. - // - // * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an - // account that doesn't have a payment instrument, such as a credit card, - // associated with it. - // - // * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because - // the account is from a different marketplace than the accounts in the organization. - // For example, accounts with India addresses must be associated with the - // AISPL marketplace. All accounts in an organization must be from the same - // marketplace. - // - // * ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to - // change the membership of an account too quickly after its previous change. - ErrCodeHandshakeConstraintViolationException = "HandshakeConstraintViolationException" - - // ErrCodeHandshakeNotFoundException for service response error code - // "HandshakeNotFoundException". - // - // We can't find a handshake with the HandshakeId that you specified. - ErrCodeHandshakeNotFoundException = "HandshakeNotFoundException" - - // ErrCodeInvalidHandshakeTransitionException for service response error code - // "InvalidHandshakeTransitionException". - // - // You can't perform the operation on the handshake in its current state. For - // example, you can't cancel a handshake that was already accepted or accept - // a handshake that was already declined. - ErrCodeInvalidHandshakeTransitionException = "InvalidHandshakeTransitionException" - - // ErrCodeInvalidInputException for service response error code - // "InvalidInputException". - // - // The requested operation failed because you provided invalid values for one - // or more of the request parameters. This exception includes a reason that - // contains additional information about the violated limit: - // - // Some of the reasons in the following list might not be applicable to this - // specific API or operation: - // - // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and - // can't be modified. - // - // * INPUT_REQUIRED: You must include a value for all required parameters. - // - // * INVALID_ENUM: You specified a value that isn't valid for that parameter. - // - // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid - // characters. - // - // * INVALID_LIST_MEMBER: You provided a list to a parameter that contains - // at least one invalid value. - // - // * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, - // organization, or email) as a party. - // - // * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter - // from the response to a previous call of the operation. - // - // * INVALID_PATTERN: You provided a value that doesn't match the required - // pattern. - // - // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't - // match the required pattern. - // - // * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role - // name can't begin with the reserved prefix AWSServiceRoleFor. - // - // * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource - // Name (ARN) for the organization. - // - // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. - // - // * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter - // for the operation. - // - // * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer - // than allowed. - // - // * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger - // value than allowed. - // - // * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter - // than allowed. - // - // * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller - // value than allowed. - // - // * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only - // between entities in the same root. - ErrCodeInvalidInputException = "InvalidInputException" - - // ErrCodeMalformedPolicyDocumentException for service response error code - // "MalformedPolicyDocumentException". - // - // The provided policy document doesn't meet the requirements of the specified - // policy type. For example, the syntax might be incorrect. For details about - // service control policy syntax, see Service Control Policy Syntax (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html) - // in the AWS Organizations User Guide. - ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocumentException" - - // ErrCodeMasterCannotLeaveOrganizationException for service response error code - // "MasterCannotLeaveOrganizationException". - // - // You can't remove a master account from an organization. If you want the master - // account to become a member account in another organization, you must first - // delete the current organization of the master account. - ErrCodeMasterCannotLeaveOrganizationException = "MasterCannotLeaveOrganizationException" - - // ErrCodeOrganizationNotEmptyException for service response error code - // "OrganizationNotEmptyException". - // - // The organization isn't empty. To delete an organization, you must first remove - // all accounts except the master account, delete all OUs, and delete all policies. - ErrCodeOrganizationNotEmptyException = "OrganizationNotEmptyException" - - // ErrCodeOrganizationalUnitNotEmptyException for service response error code - // "OrganizationalUnitNotEmptyException". - // - // The specified OU is not empty. Move all accounts to another root or to other - // OUs, remove all child OUs, and try the operation again. - ErrCodeOrganizationalUnitNotEmptyException = "OrganizationalUnitNotEmptyException" - - // ErrCodeOrganizationalUnitNotFoundException for service response error code - // "OrganizationalUnitNotFoundException". - // - // We can't find an OU with the OrganizationalUnitId that you specified. - ErrCodeOrganizationalUnitNotFoundException = "OrganizationalUnitNotFoundException" - - // ErrCodeParentNotFoundException for service response error code - // "ParentNotFoundException". - // - // We can't find a root or OU with the ParentId that you specified. - ErrCodeParentNotFoundException = "ParentNotFoundException" - - // ErrCodePolicyInUseException for service response error code - // "PolicyInUseException". - // - // The policy is attached to one or more entities. You must detach it from all - // roots, OUs, and accounts before performing this operation. - ErrCodePolicyInUseException = "PolicyInUseException" - - // ErrCodePolicyNotAttachedException for service response error code - // "PolicyNotAttachedException". - // - // The policy isn't attached to the specified target in the specified root. - ErrCodePolicyNotAttachedException = "PolicyNotAttachedException" - - // ErrCodePolicyNotFoundException for service response error code - // "PolicyNotFoundException". - // - // We can't find a policy with the PolicyId that you specified. - ErrCodePolicyNotFoundException = "PolicyNotFoundException" - - // ErrCodePolicyTypeAlreadyEnabledException for service response error code - // "PolicyTypeAlreadyEnabledException". - // - // The specified policy type is already enabled in the specified root. - ErrCodePolicyTypeAlreadyEnabledException = "PolicyTypeAlreadyEnabledException" - - // ErrCodePolicyTypeNotAvailableForOrganizationException for service response error code - // "PolicyTypeNotAvailableForOrganizationException". - // - // You can't use the specified policy type with the feature set currently enabled - // for this organization. For example, you can enable SCPs only after you enable - // all features in the organization. For more information, see Enabling and - // Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) - // in the AWS Organizations User Guide. - ErrCodePolicyTypeNotAvailableForOrganizationException = "PolicyTypeNotAvailableForOrganizationException" - - // ErrCodePolicyTypeNotEnabledException for service response error code - // "PolicyTypeNotEnabledException". - // - // The specified policy type isn't currently enabled in this root. You can't - // attach policies of the specified type to entities in a root until you enable - // that type in the root. For more information, see Enabling All Features in - // Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) - // in the AWS Organizations User Guide. - ErrCodePolicyTypeNotEnabledException = "PolicyTypeNotEnabledException" - - // ErrCodeRootNotFoundException for service response error code - // "RootNotFoundException". - // - // We can't find a root with the RootId that you specified. - ErrCodeRootNotFoundException = "RootNotFoundException" - - // ErrCodeServiceException for service response error code - // "ServiceException". - // - // AWS Organizations can't complete your request because of an internal service - // error. Try again later. - ErrCodeServiceException = "ServiceException" - - // ErrCodeSourceParentNotFoundException for service response error code - // "SourceParentNotFoundException". - // - // We can't find a source root or OU with the ParentId that you specified. - ErrCodeSourceParentNotFoundException = "SourceParentNotFoundException" - - // ErrCodeTargetNotFoundException for service response error code - // "TargetNotFoundException". - // - // We can't find a root, OU, or account with the TargetId that you specified. - ErrCodeTargetNotFoundException = "TargetNotFoundException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // You've sent too many requests in too short a period of time. The limit helps - // protect against denial-of-service attacks. Try again later. - ErrCodeTooManyRequestsException = "TooManyRequestsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/service.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/service.go deleted file mode 100644 index 565c1715f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package organizations - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// Organizations provides the API operation methods for making requests to -// AWS Organizations. See this package's package overview docs -// for details on the service. -// -// Organizations methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Organizations 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 = "organizations" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Organizations" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Organizations client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Organizations client from just a session. -// svc := organizations.New(mySession) -// -// // Create a Organizations client with additional configuration -// svc := organizations.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Organizations { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Organizations { - svc := &Organizations{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2016-11-28", - JSONVersion: "1.1", - TargetPrefix: "AWSOrganizationsV20161128", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Organizations operation and runs any -// custom request initialization. -func (c *Organizations) 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/pinpoint/api.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go deleted file mode 100644 index a93bdb91c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go +++ /dev/null @@ -1,21039 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package pinpoint - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" -) - -const opCreateApp = "CreateApp" - -// CreateAppRequest generates a "aws/request.Request" representing the -// client's request for the CreateApp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateApp for more information on using the CreateApp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAppRequest method. -// req, resp := client.CreateAppRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateApp -func (c *Pinpoint) CreateAppRequest(input *CreateAppInput) (req *request.Request, output *CreateAppOutput) { - op := &request.Operation{ - Name: opCreateApp, - HTTPMethod: "POST", - HTTPPath: "/v1/apps", - } - - if input == nil { - input = &CreateAppInput{} - } - - output = &CreateAppOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateApp API operation for Amazon Pinpoint. -// -// Creates or updates an app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation CreateApp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateApp -func (c *Pinpoint) CreateApp(input *CreateAppInput) (*CreateAppOutput, error) { - req, out := c.CreateAppRequest(input) - return out, req.Send() -} - -// CreateAppWithContext is the same as CreateApp with the addition of -// the ability to pass a context and additional request options. -// -// See CreateApp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) CreateAppWithContext(ctx aws.Context, input *CreateAppInput, opts ...request.Option) (*CreateAppOutput, error) { - req, out := c.CreateAppRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCampaign = "CreateCampaign" - -// CreateCampaignRequest generates a "aws/request.Request" representing the -// client's request for the CreateCampaign operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCampaign for more information on using the CreateCampaign -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCampaignRequest method. -// req, resp := client.CreateCampaignRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateCampaign -func (c *Pinpoint) CreateCampaignRequest(input *CreateCampaignInput) (req *request.Request, output *CreateCampaignOutput) { - op := &request.Operation{ - Name: opCreateCampaign, - HTTPMethod: "POST", - HTTPPath: "/v1/apps/{application-id}/campaigns", - } - - if input == nil { - input = &CreateCampaignInput{} - } - - output = &CreateCampaignOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCampaign API operation for Amazon Pinpoint. -// -// Creates or updates a campaign. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation CreateCampaign for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateCampaign -func (c *Pinpoint) CreateCampaign(input *CreateCampaignInput) (*CreateCampaignOutput, error) { - req, out := c.CreateCampaignRequest(input) - return out, req.Send() -} - -// CreateCampaignWithContext is the same as CreateCampaign with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCampaign for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) CreateCampaignWithContext(ctx aws.Context, input *CreateCampaignInput, opts ...request.Option) (*CreateCampaignOutput, error) { - req, out := c.CreateCampaignRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateExportJob = "CreateExportJob" - -// CreateExportJobRequest generates a "aws/request.Request" representing the -// client's request for the CreateExportJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateExportJob for more information on using the CreateExportJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateExportJobRequest method. -// req, resp := client.CreateExportJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateExportJob -func (c *Pinpoint) CreateExportJobRequest(input *CreateExportJobInput) (req *request.Request, output *CreateExportJobOutput) { - op := &request.Operation{ - Name: opCreateExportJob, - HTTPMethod: "POST", - HTTPPath: "/v1/apps/{application-id}/jobs/export", - } - - if input == nil { - input = &CreateExportJobInput{} - } - - output = &CreateExportJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateExportJob API operation for Amazon Pinpoint. -// -// Creates an export job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation CreateExportJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateExportJob -func (c *Pinpoint) CreateExportJob(input *CreateExportJobInput) (*CreateExportJobOutput, error) { - req, out := c.CreateExportJobRequest(input) - return out, req.Send() -} - -// CreateExportJobWithContext is the same as CreateExportJob with the addition of -// the ability to pass a context and additional request options. -// -// See CreateExportJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) CreateExportJobWithContext(ctx aws.Context, input *CreateExportJobInput, opts ...request.Option) (*CreateExportJobOutput, error) { - req, out := c.CreateExportJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateImportJob = "CreateImportJob" - -// CreateImportJobRequest generates a "aws/request.Request" representing the -// client's request for the CreateImportJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateImportJob for more information on using the CreateImportJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateImportJobRequest method. -// req, resp := client.CreateImportJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateImportJob -func (c *Pinpoint) CreateImportJobRequest(input *CreateImportJobInput) (req *request.Request, output *CreateImportJobOutput) { - op := &request.Operation{ - Name: opCreateImportJob, - HTTPMethod: "POST", - HTTPPath: "/v1/apps/{application-id}/jobs/import", - } - - if input == nil { - input = &CreateImportJobInput{} - } - - output = &CreateImportJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateImportJob API operation for Amazon Pinpoint. -// -// Creates or updates an import job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation CreateImportJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateImportJob -func (c *Pinpoint) CreateImportJob(input *CreateImportJobInput) (*CreateImportJobOutput, error) { - req, out := c.CreateImportJobRequest(input) - return out, req.Send() -} - -// CreateImportJobWithContext is the same as CreateImportJob with the addition of -// the ability to pass a context and additional request options. -// -// See CreateImportJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) CreateImportJobWithContext(ctx aws.Context, input *CreateImportJobInput, opts ...request.Option) (*CreateImportJobOutput, error) { - req, out := c.CreateImportJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSegment = "CreateSegment" - -// CreateSegmentRequest generates a "aws/request.Request" representing the -// client's request for the CreateSegment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSegment for more information on using the CreateSegment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSegmentRequest method. -// req, resp := client.CreateSegmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateSegment -func (c *Pinpoint) CreateSegmentRequest(input *CreateSegmentInput) (req *request.Request, output *CreateSegmentOutput) { - op := &request.Operation{ - Name: opCreateSegment, - HTTPMethod: "POST", - HTTPPath: "/v1/apps/{application-id}/segments", - } - - if input == nil { - input = &CreateSegmentInput{} - } - - output = &CreateSegmentOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSegment API operation for Amazon Pinpoint. -// -// Used to create or update a segment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation CreateSegment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateSegment -func (c *Pinpoint) CreateSegment(input *CreateSegmentInput) (*CreateSegmentOutput, error) { - req, out := c.CreateSegmentRequest(input) - return out, req.Send() -} - -// CreateSegmentWithContext is the same as CreateSegment with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSegment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) CreateSegmentWithContext(ctx aws.Context, input *CreateSegmentInput, opts ...request.Option) (*CreateSegmentOutput, error) { - req, out := c.CreateSegmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAdmChannel = "DeleteAdmChannel" - -// DeleteAdmChannelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAdmChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAdmChannel for more information on using the DeleteAdmChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAdmChannelRequest method. -// req, resp := client.DeleteAdmChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteAdmChannel -func (c *Pinpoint) DeleteAdmChannelRequest(input *DeleteAdmChannelInput) (req *request.Request, output *DeleteAdmChannelOutput) { - op := &request.Operation{ - Name: opDeleteAdmChannel, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/channels/adm", - } - - if input == nil { - input = &DeleteAdmChannelInput{} - } - - output = &DeleteAdmChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteAdmChannel API operation for Amazon Pinpoint. -// -// Delete an ADM channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteAdmChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteAdmChannel -func (c *Pinpoint) DeleteAdmChannel(input *DeleteAdmChannelInput) (*DeleteAdmChannelOutput, error) { - req, out := c.DeleteAdmChannelRequest(input) - return out, req.Send() -} - -// DeleteAdmChannelWithContext is the same as DeleteAdmChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAdmChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteAdmChannelWithContext(ctx aws.Context, input *DeleteAdmChannelInput, opts ...request.Option) (*DeleteAdmChannelOutput, error) { - req, out := c.DeleteAdmChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApnsChannel = "DeleteApnsChannel" - -// DeleteApnsChannelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApnsChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApnsChannel for more information on using the DeleteApnsChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApnsChannelRequest method. -// req, resp := client.DeleteApnsChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsChannel -func (c *Pinpoint) DeleteApnsChannelRequest(input *DeleteApnsChannelInput) (req *request.Request, output *DeleteApnsChannelOutput) { - op := &request.Operation{ - Name: opDeleteApnsChannel, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/channels/apns", - } - - if input == nil { - input = &DeleteApnsChannelInput{} - } - - output = &DeleteApnsChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteApnsChannel API operation for Amazon Pinpoint. -// -// Deletes the APNs channel for an app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteApnsChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsChannel -func (c *Pinpoint) DeleteApnsChannel(input *DeleteApnsChannelInput) (*DeleteApnsChannelOutput, error) { - req, out := c.DeleteApnsChannelRequest(input) - return out, req.Send() -} - -// DeleteApnsChannelWithContext is the same as DeleteApnsChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApnsChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteApnsChannelWithContext(ctx aws.Context, input *DeleteApnsChannelInput, opts ...request.Option) (*DeleteApnsChannelOutput, error) { - req, out := c.DeleteApnsChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApnsSandboxChannel = "DeleteApnsSandboxChannel" - -// DeleteApnsSandboxChannelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApnsSandboxChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApnsSandboxChannel for more information on using the DeleteApnsSandboxChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApnsSandboxChannelRequest method. -// req, resp := client.DeleteApnsSandboxChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsSandboxChannel -func (c *Pinpoint) DeleteApnsSandboxChannelRequest(input *DeleteApnsSandboxChannelInput) (req *request.Request, output *DeleteApnsSandboxChannelOutput) { - op := &request.Operation{ - Name: opDeleteApnsSandboxChannel, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/channels/apns_sandbox", - } - - if input == nil { - input = &DeleteApnsSandboxChannelInput{} - } - - output = &DeleteApnsSandboxChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteApnsSandboxChannel API operation for Amazon Pinpoint. -// -// Delete an APNS sandbox channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteApnsSandboxChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsSandboxChannel -func (c *Pinpoint) DeleteApnsSandboxChannel(input *DeleteApnsSandboxChannelInput) (*DeleteApnsSandboxChannelOutput, error) { - req, out := c.DeleteApnsSandboxChannelRequest(input) - return out, req.Send() -} - -// DeleteApnsSandboxChannelWithContext is the same as DeleteApnsSandboxChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApnsSandboxChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteApnsSandboxChannelWithContext(ctx aws.Context, input *DeleteApnsSandboxChannelInput, opts ...request.Option) (*DeleteApnsSandboxChannelOutput, error) { - req, out := c.DeleteApnsSandboxChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApnsVoipChannel = "DeleteApnsVoipChannel" - -// DeleteApnsVoipChannelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApnsVoipChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApnsVoipChannel for more information on using the DeleteApnsVoipChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApnsVoipChannelRequest method. -// req, resp := client.DeleteApnsVoipChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipChannel -func (c *Pinpoint) DeleteApnsVoipChannelRequest(input *DeleteApnsVoipChannelInput) (req *request.Request, output *DeleteApnsVoipChannelOutput) { - op := &request.Operation{ - Name: opDeleteApnsVoipChannel, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/channels/apns_voip", - } - - if input == nil { - input = &DeleteApnsVoipChannelInput{} - } - - output = &DeleteApnsVoipChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteApnsVoipChannel API operation for Amazon Pinpoint. -// -// Delete an APNS VoIP channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteApnsVoipChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipChannel -func (c *Pinpoint) DeleteApnsVoipChannel(input *DeleteApnsVoipChannelInput) (*DeleteApnsVoipChannelOutput, error) { - req, out := c.DeleteApnsVoipChannelRequest(input) - return out, req.Send() -} - -// DeleteApnsVoipChannelWithContext is the same as DeleteApnsVoipChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApnsVoipChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteApnsVoipChannelWithContext(ctx aws.Context, input *DeleteApnsVoipChannelInput, opts ...request.Option) (*DeleteApnsVoipChannelOutput, error) { - req, out := c.DeleteApnsVoipChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApnsVoipSandboxChannel = "DeleteApnsVoipSandboxChannel" - -// DeleteApnsVoipSandboxChannelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApnsVoipSandboxChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApnsVoipSandboxChannel for more information on using the DeleteApnsVoipSandboxChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApnsVoipSandboxChannelRequest method. -// req, resp := client.DeleteApnsVoipSandboxChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipSandboxChannel -func (c *Pinpoint) DeleteApnsVoipSandboxChannelRequest(input *DeleteApnsVoipSandboxChannelInput) (req *request.Request, output *DeleteApnsVoipSandboxChannelOutput) { - op := &request.Operation{ - Name: opDeleteApnsVoipSandboxChannel, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/channels/apns_voip_sandbox", - } - - if input == nil { - input = &DeleteApnsVoipSandboxChannelInput{} - } - - output = &DeleteApnsVoipSandboxChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteApnsVoipSandboxChannel API operation for Amazon Pinpoint. -// -// Delete an APNS VoIP sandbox channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteApnsVoipSandboxChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipSandboxChannel -func (c *Pinpoint) DeleteApnsVoipSandboxChannel(input *DeleteApnsVoipSandboxChannelInput) (*DeleteApnsVoipSandboxChannelOutput, error) { - req, out := c.DeleteApnsVoipSandboxChannelRequest(input) - return out, req.Send() -} - -// DeleteApnsVoipSandboxChannelWithContext is the same as DeleteApnsVoipSandboxChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApnsVoipSandboxChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteApnsVoipSandboxChannelWithContext(ctx aws.Context, input *DeleteApnsVoipSandboxChannelInput, opts ...request.Option) (*DeleteApnsVoipSandboxChannelOutput, error) { - req, out := c.DeleteApnsVoipSandboxChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApp = "DeleteApp" - -// DeleteAppRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApp for more information on using the DeleteApp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAppRequest method. -// req, resp := client.DeleteAppRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApp -func (c *Pinpoint) DeleteAppRequest(input *DeleteAppInput) (req *request.Request, output *DeleteAppOutput) { - op := &request.Operation{ - Name: opDeleteApp, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}", - } - - if input == nil { - input = &DeleteAppInput{} - } - - output = &DeleteAppOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteApp API operation for Amazon Pinpoint. -// -// Deletes an app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteApp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApp -func (c *Pinpoint) DeleteApp(input *DeleteAppInput) (*DeleteAppOutput, error) { - req, out := c.DeleteAppRequest(input) - return out, req.Send() -} - -// DeleteAppWithContext is the same as DeleteApp with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteAppWithContext(ctx aws.Context, input *DeleteAppInput, opts ...request.Option) (*DeleteAppOutput, error) { - req, out := c.DeleteAppRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBaiduChannel = "DeleteBaiduChannel" - -// DeleteBaiduChannelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBaiduChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBaiduChannel for more information on using the DeleteBaiduChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBaiduChannelRequest method. -// req, resp := client.DeleteBaiduChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteBaiduChannel -func (c *Pinpoint) DeleteBaiduChannelRequest(input *DeleteBaiduChannelInput) (req *request.Request, output *DeleteBaiduChannelOutput) { - op := &request.Operation{ - Name: opDeleteBaiduChannel, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/channels/baidu", - } - - if input == nil { - input = &DeleteBaiduChannelInput{} - } - - output = &DeleteBaiduChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteBaiduChannel API operation for Amazon Pinpoint. -// -// Delete a BAIDU GCM channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteBaiduChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteBaiduChannel -func (c *Pinpoint) DeleteBaiduChannel(input *DeleteBaiduChannelInput) (*DeleteBaiduChannelOutput, error) { - req, out := c.DeleteBaiduChannelRequest(input) - return out, req.Send() -} - -// DeleteBaiduChannelWithContext is the same as DeleteBaiduChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBaiduChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteBaiduChannelWithContext(ctx aws.Context, input *DeleteBaiduChannelInput, opts ...request.Option) (*DeleteBaiduChannelOutput, error) { - req, out := c.DeleteBaiduChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCampaign = "DeleteCampaign" - -// DeleteCampaignRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCampaign operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCampaign for more information on using the DeleteCampaign -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCampaignRequest method. -// req, resp := client.DeleteCampaignRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteCampaign -func (c *Pinpoint) DeleteCampaignRequest(input *DeleteCampaignInput) (req *request.Request, output *DeleteCampaignOutput) { - op := &request.Operation{ - Name: opDeleteCampaign, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}", - } - - if input == nil { - input = &DeleteCampaignInput{} - } - - output = &DeleteCampaignOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteCampaign API operation for Amazon Pinpoint. -// -// Deletes a campaign. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteCampaign for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteCampaign -func (c *Pinpoint) DeleteCampaign(input *DeleteCampaignInput) (*DeleteCampaignOutput, error) { - req, out := c.DeleteCampaignRequest(input) - return out, req.Send() -} - -// DeleteCampaignWithContext is the same as DeleteCampaign with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCampaign for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteCampaignWithContext(ctx aws.Context, input *DeleteCampaignInput, opts ...request.Option) (*DeleteCampaignOutput, error) { - req, out := c.DeleteCampaignRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEmailChannel = "DeleteEmailChannel" - -// DeleteEmailChannelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEmailChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEmailChannel for more information on using the DeleteEmailChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEmailChannelRequest method. -// req, resp := client.DeleteEmailChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEmailChannel -func (c *Pinpoint) DeleteEmailChannelRequest(input *DeleteEmailChannelInput) (req *request.Request, output *DeleteEmailChannelOutput) { - op := &request.Operation{ - Name: opDeleteEmailChannel, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/channels/email", - } - - if input == nil { - input = &DeleteEmailChannelInput{} - } - - output = &DeleteEmailChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteEmailChannel API operation for Amazon Pinpoint. -// -// Delete an email channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteEmailChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEmailChannel -func (c *Pinpoint) DeleteEmailChannel(input *DeleteEmailChannelInput) (*DeleteEmailChannelOutput, error) { - req, out := c.DeleteEmailChannelRequest(input) - return out, req.Send() -} - -// DeleteEmailChannelWithContext is the same as DeleteEmailChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEmailChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteEmailChannelWithContext(ctx aws.Context, input *DeleteEmailChannelInput, opts ...request.Option) (*DeleteEmailChannelOutput, error) { - req, out := c.DeleteEmailChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEndpoint = "DeleteEndpoint" - -// DeleteEndpointRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEndpoint for more information on using the DeleteEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEndpointRequest method. -// req, resp := client.DeleteEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEndpoint -func (c *Pinpoint) DeleteEndpointRequest(input *DeleteEndpointInput) (req *request.Request, output *DeleteEndpointOutput) { - op := &request.Operation{ - Name: opDeleteEndpoint, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/endpoints/{endpoint-id}", - } - - if input == nil { - input = &DeleteEndpointInput{} - } - - output = &DeleteEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteEndpoint API operation for Amazon Pinpoint. -// -// Deletes an endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEndpoint -func (c *Pinpoint) DeleteEndpoint(input *DeleteEndpointInput) (*DeleteEndpointOutput, error) { - req, out := c.DeleteEndpointRequest(input) - return out, req.Send() -} - -// DeleteEndpointWithContext is the same as DeleteEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteEndpointWithContext(ctx aws.Context, input *DeleteEndpointInput, opts ...request.Option) (*DeleteEndpointOutput, error) { - req, out := c.DeleteEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEventStream = "DeleteEventStream" - -// DeleteEventStreamRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEventStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEventStream for more information on using the DeleteEventStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEventStreamRequest method. -// req, resp := client.DeleteEventStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEventStream -func (c *Pinpoint) DeleteEventStreamRequest(input *DeleteEventStreamInput) (req *request.Request, output *DeleteEventStreamOutput) { - op := &request.Operation{ - Name: opDeleteEventStream, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/eventstream", - } - - if input == nil { - input = &DeleteEventStreamInput{} - } - - output = &DeleteEventStreamOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteEventStream API operation for Amazon Pinpoint. -// -// Deletes the event stream for an app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteEventStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEventStream -func (c *Pinpoint) DeleteEventStream(input *DeleteEventStreamInput) (*DeleteEventStreamOutput, error) { - req, out := c.DeleteEventStreamRequest(input) - return out, req.Send() -} - -// DeleteEventStreamWithContext is the same as DeleteEventStream with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEventStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteEventStreamWithContext(ctx aws.Context, input *DeleteEventStreamInput, opts ...request.Option) (*DeleteEventStreamOutput, error) { - req, out := c.DeleteEventStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteGcmChannel = "DeleteGcmChannel" - -// DeleteGcmChannelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteGcmChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteGcmChannel for more information on using the DeleteGcmChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteGcmChannelRequest method. -// req, resp := client.DeleteGcmChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteGcmChannel -func (c *Pinpoint) DeleteGcmChannelRequest(input *DeleteGcmChannelInput) (req *request.Request, output *DeleteGcmChannelOutput) { - op := &request.Operation{ - Name: opDeleteGcmChannel, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/channels/gcm", - } - - if input == nil { - input = &DeleteGcmChannelInput{} - } - - output = &DeleteGcmChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteGcmChannel API operation for Amazon Pinpoint. -// -// Deletes the GCM channel for an app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteGcmChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteGcmChannel -func (c *Pinpoint) DeleteGcmChannel(input *DeleteGcmChannelInput) (*DeleteGcmChannelOutput, error) { - req, out := c.DeleteGcmChannelRequest(input) - return out, req.Send() -} - -// DeleteGcmChannelWithContext is the same as DeleteGcmChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteGcmChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteGcmChannelWithContext(ctx aws.Context, input *DeleteGcmChannelInput, opts ...request.Option) (*DeleteGcmChannelOutput, error) { - req, out := c.DeleteGcmChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSegment = "DeleteSegment" - -// DeleteSegmentRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSegment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSegment for more information on using the DeleteSegment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSegmentRequest method. -// req, resp := client.DeleteSegmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSegment -func (c *Pinpoint) DeleteSegmentRequest(input *DeleteSegmentInput) (req *request.Request, output *DeleteSegmentOutput) { - op := &request.Operation{ - Name: opDeleteSegment, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}", - } - - if input == nil { - input = &DeleteSegmentInput{} - } - - output = &DeleteSegmentOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteSegment API operation for Amazon Pinpoint. -// -// Deletes a segment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteSegment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSegment -func (c *Pinpoint) DeleteSegment(input *DeleteSegmentInput) (*DeleteSegmentOutput, error) { - req, out := c.DeleteSegmentRequest(input) - return out, req.Send() -} - -// DeleteSegmentWithContext is the same as DeleteSegment with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSegment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteSegmentWithContext(ctx aws.Context, input *DeleteSegmentInput, opts ...request.Option) (*DeleteSegmentOutput, error) { - req, out := c.DeleteSegmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSmsChannel = "DeleteSmsChannel" - -// DeleteSmsChannelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSmsChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSmsChannel for more information on using the DeleteSmsChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSmsChannelRequest method. -// req, resp := client.DeleteSmsChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSmsChannel -func (c *Pinpoint) DeleteSmsChannelRequest(input *DeleteSmsChannelInput) (req *request.Request, output *DeleteSmsChannelOutput) { - op := &request.Operation{ - Name: opDeleteSmsChannel, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/channels/sms", - } - - if input == nil { - input = &DeleteSmsChannelInput{} - } - - output = &DeleteSmsChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteSmsChannel API operation for Amazon Pinpoint. -// -// Delete an SMS channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteSmsChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSmsChannel -func (c *Pinpoint) DeleteSmsChannel(input *DeleteSmsChannelInput) (*DeleteSmsChannelOutput, error) { - req, out := c.DeleteSmsChannelRequest(input) - return out, req.Send() -} - -// DeleteSmsChannelWithContext is the same as DeleteSmsChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSmsChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteSmsChannelWithContext(ctx aws.Context, input *DeleteSmsChannelInput, opts ...request.Option) (*DeleteSmsChannelOutput, error) { - req, out := c.DeleteSmsChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUserEndpoints = "DeleteUserEndpoints" - -// DeleteUserEndpointsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUserEndpoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUserEndpoints for more information on using the DeleteUserEndpoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteUserEndpointsRequest method. -// req, resp := client.DeleteUserEndpointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteUserEndpoints -func (c *Pinpoint) DeleteUserEndpointsRequest(input *DeleteUserEndpointsInput) (req *request.Request, output *DeleteUserEndpointsOutput) { - op := &request.Operation{ - Name: opDeleteUserEndpoints, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/users/{user-id}", - } - - if input == nil { - input = &DeleteUserEndpointsInput{} - } - - output = &DeleteUserEndpointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteUserEndpoints API operation for Amazon Pinpoint. -// -// Deletes endpoints that are associated with a User ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteUserEndpoints for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteUserEndpoints -func (c *Pinpoint) DeleteUserEndpoints(input *DeleteUserEndpointsInput) (*DeleteUserEndpointsOutput, error) { - req, out := c.DeleteUserEndpointsRequest(input) - return out, req.Send() -} - -// DeleteUserEndpointsWithContext is the same as DeleteUserEndpoints with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUserEndpoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteUserEndpointsWithContext(ctx aws.Context, input *DeleteUserEndpointsInput, opts ...request.Option) (*DeleteUserEndpointsOutput, error) { - req, out := c.DeleteUserEndpointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVoiceChannel = "DeleteVoiceChannel" - -// DeleteVoiceChannelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVoiceChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVoiceChannel for more information on using the DeleteVoiceChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVoiceChannelRequest method. -// req, resp := client.DeleteVoiceChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteVoiceChannel -func (c *Pinpoint) DeleteVoiceChannelRequest(input *DeleteVoiceChannelInput) (req *request.Request, output *DeleteVoiceChannelOutput) { - op := &request.Operation{ - Name: opDeleteVoiceChannel, - HTTPMethod: "DELETE", - HTTPPath: "/v1/apps/{application-id}/channels/voice", - } - - if input == nil { - input = &DeleteVoiceChannelInput{} - } - - output = &DeleteVoiceChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteVoiceChannel API operation for Amazon Pinpoint. -// -// Delete an Voice channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation DeleteVoiceChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteVoiceChannel -func (c *Pinpoint) DeleteVoiceChannel(input *DeleteVoiceChannelInput) (*DeleteVoiceChannelOutput, error) { - req, out := c.DeleteVoiceChannelRequest(input) - return out, req.Send() -} - -// DeleteVoiceChannelWithContext is the same as DeleteVoiceChannel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVoiceChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) DeleteVoiceChannelWithContext(ctx aws.Context, input *DeleteVoiceChannelInput, opts ...request.Option) (*DeleteVoiceChannelOutput, error) { - req, out := c.DeleteVoiceChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAdmChannel = "GetAdmChannel" - -// GetAdmChannelRequest generates a "aws/request.Request" representing the -// client's request for the GetAdmChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAdmChannel for more information on using the GetAdmChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAdmChannelRequest method. -// req, resp := client.GetAdmChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetAdmChannel -func (c *Pinpoint) GetAdmChannelRequest(input *GetAdmChannelInput) (req *request.Request, output *GetAdmChannelOutput) { - op := &request.Operation{ - Name: opGetAdmChannel, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/channels/adm", - } - - if input == nil { - input = &GetAdmChannelInput{} - } - - output = &GetAdmChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAdmChannel API operation for Amazon Pinpoint. -// -// Get an ADM channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetAdmChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetAdmChannel -func (c *Pinpoint) GetAdmChannel(input *GetAdmChannelInput) (*GetAdmChannelOutput, error) { - req, out := c.GetAdmChannelRequest(input) - return out, req.Send() -} - -// GetAdmChannelWithContext is the same as GetAdmChannel with the addition of -// the ability to pass a context and additional request options. -// -// See GetAdmChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetAdmChannelWithContext(ctx aws.Context, input *GetAdmChannelInput, opts ...request.Option) (*GetAdmChannelOutput, error) { - req, out := c.GetAdmChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApnsChannel = "GetApnsChannel" - -// GetApnsChannelRequest generates a "aws/request.Request" representing the -// client's request for the GetApnsChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApnsChannel for more information on using the GetApnsChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApnsChannelRequest method. -// req, resp := client.GetApnsChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsChannel -func (c *Pinpoint) GetApnsChannelRequest(input *GetApnsChannelInput) (req *request.Request, output *GetApnsChannelOutput) { - op := &request.Operation{ - Name: opGetApnsChannel, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/channels/apns", - } - - if input == nil { - input = &GetApnsChannelInput{} - } - - output = &GetApnsChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApnsChannel API operation for Amazon Pinpoint. -// -// Returns information about the APNs channel for an app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetApnsChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsChannel -func (c *Pinpoint) GetApnsChannel(input *GetApnsChannelInput) (*GetApnsChannelOutput, error) { - req, out := c.GetApnsChannelRequest(input) - return out, req.Send() -} - -// GetApnsChannelWithContext is the same as GetApnsChannel with the addition of -// the ability to pass a context and additional request options. -// -// See GetApnsChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetApnsChannelWithContext(ctx aws.Context, input *GetApnsChannelInput, opts ...request.Option) (*GetApnsChannelOutput, error) { - req, out := c.GetApnsChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApnsSandboxChannel = "GetApnsSandboxChannel" - -// GetApnsSandboxChannelRequest generates a "aws/request.Request" representing the -// client's request for the GetApnsSandboxChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApnsSandboxChannel for more information on using the GetApnsSandboxChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApnsSandboxChannelRequest method. -// req, resp := client.GetApnsSandboxChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsSandboxChannel -func (c *Pinpoint) GetApnsSandboxChannelRequest(input *GetApnsSandboxChannelInput) (req *request.Request, output *GetApnsSandboxChannelOutput) { - op := &request.Operation{ - Name: opGetApnsSandboxChannel, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/channels/apns_sandbox", - } - - if input == nil { - input = &GetApnsSandboxChannelInput{} - } - - output = &GetApnsSandboxChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApnsSandboxChannel API operation for Amazon Pinpoint. -// -// Get an APNS sandbox channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetApnsSandboxChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsSandboxChannel -func (c *Pinpoint) GetApnsSandboxChannel(input *GetApnsSandboxChannelInput) (*GetApnsSandboxChannelOutput, error) { - req, out := c.GetApnsSandboxChannelRequest(input) - return out, req.Send() -} - -// GetApnsSandboxChannelWithContext is the same as GetApnsSandboxChannel with the addition of -// the ability to pass a context and additional request options. -// -// See GetApnsSandboxChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetApnsSandboxChannelWithContext(ctx aws.Context, input *GetApnsSandboxChannelInput, opts ...request.Option) (*GetApnsSandboxChannelOutput, error) { - req, out := c.GetApnsSandboxChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApnsVoipChannel = "GetApnsVoipChannel" - -// GetApnsVoipChannelRequest generates a "aws/request.Request" representing the -// client's request for the GetApnsVoipChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApnsVoipChannel for more information on using the GetApnsVoipChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApnsVoipChannelRequest method. -// req, resp := client.GetApnsVoipChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipChannel -func (c *Pinpoint) GetApnsVoipChannelRequest(input *GetApnsVoipChannelInput) (req *request.Request, output *GetApnsVoipChannelOutput) { - op := &request.Operation{ - Name: opGetApnsVoipChannel, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/channels/apns_voip", - } - - if input == nil { - input = &GetApnsVoipChannelInput{} - } - - output = &GetApnsVoipChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApnsVoipChannel API operation for Amazon Pinpoint. -// -// Get an APNS VoIP channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetApnsVoipChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipChannel -func (c *Pinpoint) GetApnsVoipChannel(input *GetApnsVoipChannelInput) (*GetApnsVoipChannelOutput, error) { - req, out := c.GetApnsVoipChannelRequest(input) - return out, req.Send() -} - -// GetApnsVoipChannelWithContext is the same as GetApnsVoipChannel with the addition of -// the ability to pass a context and additional request options. -// -// See GetApnsVoipChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetApnsVoipChannelWithContext(ctx aws.Context, input *GetApnsVoipChannelInput, opts ...request.Option) (*GetApnsVoipChannelOutput, error) { - req, out := c.GetApnsVoipChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApnsVoipSandboxChannel = "GetApnsVoipSandboxChannel" - -// GetApnsVoipSandboxChannelRequest generates a "aws/request.Request" representing the -// client's request for the GetApnsVoipSandboxChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApnsVoipSandboxChannel for more information on using the GetApnsVoipSandboxChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApnsVoipSandboxChannelRequest method. -// req, resp := client.GetApnsVoipSandboxChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipSandboxChannel -func (c *Pinpoint) GetApnsVoipSandboxChannelRequest(input *GetApnsVoipSandboxChannelInput) (req *request.Request, output *GetApnsVoipSandboxChannelOutput) { - op := &request.Operation{ - Name: opGetApnsVoipSandboxChannel, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/channels/apns_voip_sandbox", - } - - if input == nil { - input = &GetApnsVoipSandboxChannelInput{} - } - - output = &GetApnsVoipSandboxChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApnsVoipSandboxChannel API operation for Amazon Pinpoint. -// -// Get an APNS VoIPSandbox channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetApnsVoipSandboxChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipSandboxChannel -func (c *Pinpoint) GetApnsVoipSandboxChannel(input *GetApnsVoipSandboxChannelInput) (*GetApnsVoipSandboxChannelOutput, error) { - req, out := c.GetApnsVoipSandboxChannelRequest(input) - return out, req.Send() -} - -// GetApnsVoipSandboxChannelWithContext is the same as GetApnsVoipSandboxChannel with the addition of -// the ability to pass a context and additional request options. -// -// See GetApnsVoipSandboxChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetApnsVoipSandboxChannelWithContext(ctx aws.Context, input *GetApnsVoipSandboxChannelInput, opts ...request.Option) (*GetApnsVoipSandboxChannelOutput, error) { - req, out := c.GetApnsVoipSandboxChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApp = "GetApp" - -// GetAppRequest generates a "aws/request.Request" representing the -// client's request for the GetApp operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApp for more information on using the GetApp -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAppRequest method. -// req, resp := client.GetAppRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApp -func (c *Pinpoint) GetAppRequest(input *GetAppInput) (req *request.Request, output *GetAppOutput) { - op := &request.Operation{ - Name: opGetApp, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}", - } - - if input == nil { - input = &GetAppInput{} - } - - output = &GetAppOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApp API operation for Amazon Pinpoint. -// -// Returns information about an app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetApp for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApp -func (c *Pinpoint) GetApp(input *GetAppInput) (*GetAppOutput, error) { - req, out := c.GetAppRequest(input) - return out, req.Send() -} - -// GetAppWithContext is the same as GetApp with the addition of -// the ability to pass a context and additional request options. -// -// See GetApp for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetAppWithContext(ctx aws.Context, input *GetAppInput, opts ...request.Option) (*GetAppOutput, error) { - req, out := c.GetAppRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApplicationSettings = "GetApplicationSettings" - -// GetApplicationSettingsRequest generates a "aws/request.Request" representing the -// client's request for the GetApplicationSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApplicationSettings for more information on using the GetApplicationSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApplicationSettingsRequest method. -// req, resp := client.GetApplicationSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApplicationSettings -func (c *Pinpoint) GetApplicationSettingsRequest(input *GetApplicationSettingsInput) (req *request.Request, output *GetApplicationSettingsOutput) { - op := &request.Operation{ - Name: opGetApplicationSettings, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/settings", - } - - if input == nil { - input = &GetApplicationSettingsInput{} - } - - output = &GetApplicationSettingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApplicationSettings API operation for Amazon Pinpoint. -// -// Used to request the settings for an app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetApplicationSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApplicationSettings -func (c *Pinpoint) GetApplicationSettings(input *GetApplicationSettingsInput) (*GetApplicationSettingsOutput, error) { - req, out := c.GetApplicationSettingsRequest(input) - return out, req.Send() -} - -// GetApplicationSettingsWithContext is the same as GetApplicationSettings with the addition of -// the ability to pass a context and additional request options. -// -// See GetApplicationSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetApplicationSettingsWithContext(ctx aws.Context, input *GetApplicationSettingsInput, opts ...request.Option) (*GetApplicationSettingsOutput, error) { - req, out := c.GetApplicationSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApps = "GetApps" - -// GetAppsRequest generates a "aws/request.Request" representing the -// client's request for the GetApps operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApps for more information on using the GetApps -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAppsRequest method. -// req, resp := client.GetAppsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApps -func (c *Pinpoint) GetAppsRequest(input *GetAppsInput) (req *request.Request, output *GetAppsOutput) { - op := &request.Operation{ - Name: opGetApps, - HTTPMethod: "GET", - HTTPPath: "/v1/apps", - } - - if input == nil { - input = &GetAppsInput{} - } - - output = &GetAppsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApps API operation for Amazon Pinpoint. -// -// Returns information about your apps. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetApps for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApps -func (c *Pinpoint) GetApps(input *GetAppsInput) (*GetAppsOutput, error) { - req, out := c.GetAppsRequest(input) - return out, req.Send() -} - -// GetAppsWithContext is the same as GetApps with the addition of -// the ability to pass a context and additional request options. -// -// See GetApps for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetAppsWithContext(ctx aws.Context, input *GetAppsInput, opts ...request.Option) (*GetAppsOutput, error) { - req, out := c.GetAppsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBaiduChannel = "GetBaiduChannel" - -// GetBaiduChannelRequest generates a "aws/request.Request" representing the -// client's request for the GetBaiduChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetBaiduChannel for more information on using the GetBaiduChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetBaiduChannelRequest method. -// req, resp := client.GetBaiduChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetBaiduChannel -func (c *Pinpoint) GetBaiduChannelRequest(input *GetBaiduChannelInput) (req *request.Request, output *GetBaiduChannelOutput) { - op := &request.Operation{ - Name: opGetBaiduChannel, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/channels/baidu", - } - - if input == nil { - input = &GetBaiduChannelInput{} - } - - output = &GetBaiduChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBaiduChannel API operation for Amazon Pinpoint. -// -// Get a BAIDU GCM channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetBaiduChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetBaiduChannel -func (c *Pinpoint) GetBaiduChannel(input *GetBaiduChannelInput) (*GetBaiduChannelOutput, error) { - req, out := c.GetBaiduChannelRequest(input) - return out, req.Send() -} - -// GetBaiduChannelWithContext is the same as GetBaiduChannel with the addition of -// the ability to pass a context and additional request options. -// -// See GetBaiduChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetBaiduChannelWithContext(ctx aws.Context, input *GetBaiduChannelInput, opts ...request.Option) (*GetBaiduChannelOutput, error) { - req, out := c.GetBaiduChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCampaign = "GetCampaign" - -// GetCampaignRequest generates a "aws/request.Request" representing the -// client's request for the GetCampaign operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCampaign for more information on using the GetCampaign -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCampaignRequest method. -// req, resp := client.GetCampaignRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaign -func (c *Pinpoint) GetCampaignRequest(input *GetCampaignInput) (req *request.Request, output *GetCampaignOutput) { - op := &request.Operation{ - Name: opGetCampaign, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}", - } - - if input == nil { - input = &GetCampaignInput{} - } - - output = &GetCampaignOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCampaign API operation for Amazon Pinpoint. -// -// Returns information about a campaign. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetCampaign for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaign -func (c *Pinpoint) GetCampaign(input *GetCampaignInput) (*GetCampaignOutput, error) { - req, out := c.GetCampaignRequest(input) - return out, req.Send() -} - -// GetCampaignWithContext is the same as GetCampaign with the addition of -// the ability to pass a context and additional request options. -// -// See GetCampaign for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetCampaignWithContext(ctx aws.Context, input *GetCampaignInput, opts ...request.Option) (*GetCampaignOutput, error) { - req, out := c.GetCampaignRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCampaignActivities = "GetCampaignActivities" - -// GetCampaignActivitiesRequest generates a "aws/request.Request" representing the -// client's request for the GetCampaignActivities operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCampaignActivities for more information on using the GetCampaignActivities -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCampaignActivitiesRequest method. -// req, resp := client.GetCampaignActivitiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignActivities -func (c *Pinpoint) GetCampaignActivitiesRequest(input *GetCampaignActivitiesInput) (req *request.Request, output *GetCampaignActivitiesOutput) { - op := &request.Operation{ - Name: opGetCampaignActivities, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}/activities", - } - - if input == nil { - input = &GetCampaignActivitiesInput{} - } - - output = &GetCampaignActivitiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCampaignActivities API operation for Amazon Pinpoint. -// -// Returns information about the activity performed by a campaign. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetCampaignActivities for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignActivities -func (c *Pinpoint) GetCampaignActivities(input *GetCampaignActivitiesInput) (*GetCampaignActivitiesOutput, error) { - req, out := c.GetCampaignActivitiesRequest(input) - return out, req.Send() -} - -// GetCampaignActivitiesWithContext is the same as GetCampaignActivities with the addition of -// the ability to pass a context and additional request options. -// -// See GetCampaignActivities for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetCampaignActivitiesWithContext(ctx aws.Context, input *GetCampaignActivitiesInput, opts ...request.Option) (*GetCampaignActivitiesOutput, error) { - req, out := c.GetCampaignActivitiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCampaignVersion = "GetCampaignVersion" - -// GetCampaignVersionRequest generates a "aws/request.Request" representing the -// client's request for the GetCampaignVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCampaignVersion for more information on using the GetCampaignVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCampaignVersionRequest method. -// req, resp := client.GetCampaignVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersion -func (c *Pinpoint) GetCampaignVersionRequest(input *GetCampaignVersionInput) (req *request.Request, output *GetCampaignVersionOutput) { - op := &request.Operation{ - Name: opGetCampaignVersion, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}/versions/{version}", - } - - if input == nil { - input = &GetCampaignVersionInput{} - } - - output = &GetCampaignVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCampaignVersion API operation for Amazon Pinpoint. -// -// Returns information about a specific version of a campaign. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetCampaignVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersion -func (c *Pinpoint) GetCampaignVersion(input *GetCampaignVersionInput) (*GetCampaignVersionOutput, error) { - req, out := c.GetCampaignVersionRequest(input) - return out, req.Send() -} - -// GetCampaignVersionWithContext is the same as GetCampaignVersion with the addition of -// the ability to pass a context and additional request options. -// -// See GetCampaignVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetCampaignVersionWithContext(ctx aws.Context, input *GetCampaignVersionInput, opts ...request.Option) (*GetCampaignVersionOutput, error) { - req, out := c.GetCampaignVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCampaignVersions = "GetCampaignVersions" - -// GetCampaignVersionsRequest generates a "aws/request.Request" representing the -// client's request for the GetCampaignVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCampaignVersions for more information on using the GetCampaignVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCampaignVersionsRequest method. -// req, resp := client.GetCampaignVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersions -func (c *Pinpoint) GetCampaignVersionsRequest(input *GetCampaignVersionsInput) (req *request.Request, output *GetCampaignVersionsOutput) { - op := &request.Operation{ - Name: opGetCampaignVersions, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}/versions", - } - - if input == nil { - input = &GetCampaignVersionsInput{} - } - - output = &GetCampaignVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCampaignVersions API operation for Amazon Pinpoint. -// -// Returns information about your campaign versions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetCampaignVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersions -func (c *Pinpoint) GetCampaignVersions(input *GetCampaignVersionsInput) (*GetCampaignVersionsOutput, error) { - req, out := c.GetCampaignVersionsRequest(input) - return out, req.Send() -} - -// GetCampaignVersionsWithContext is the same as GetCampaignVersions with the addition of -// the ability to pass a context and additional request options. -// -// See GetCampaignVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetCampaignVersionsWithContext(ctx aws.Context, input *GetCampaignVersionsInput, opts ...request.Option) (*GetCampaignVersionsOutput, error) { - req, out := c.GetCampaignVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCampaigns = "GetCampaigns" - -// GetCampaignsRequest generates a "aws/request.Request" representing the -// client's request for the GetCampaigns operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCampaigns for more information on using the GetCampaigns -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCampaignsRequest method. -// req, resp := client.GetCampaignsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaigns -func (c *Pinpoint) GetCampaignsRequest(input *GetCampaignsInput) (req *request.Request, output *GetCampaignsOutput) { - op := &request.Operation{ - Name: opGetCampaigns, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/campaigns", - } - - if input == nil { - input = &GetCampaignsInput{} - } - - output = &GetCampaignsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCampaigns API operation for Amazon Pinpoint. -// -// Returns information about your campaigns. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetCampaigns for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaigns -func (c *Pinpoint) GetCampaigns(input *GetCampaignsInput) (*GetCampaignsOutput, error) { - req, out := c.GetCampaignsRequest(input) - return out, req.Send() -} - -// GetCampaignsWithContext is the same as GetCampaigns with the addition of -// the ability to pass a context and additional request options. -// -// See GetCampaigns for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetCampaignsWithContext(ctx aws.Context, input *GetCampaignsInput, opts ...request.Option) (*GetCampaignsOutput, error) { - req, out := c.GetCampaignsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetChannels = "GetChannels" - -// GetChannelsRequest generates a "aws/request.Request" representing the -// client's request for the GetChannels operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetChannels for more information on using the GetChannels -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetChannelsRequest method. -// req, resp := client.GetChannelsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetChannels -func (c *Pinpoint) GetChannelsRequest(input *GetChannelsInput) (req *request.Request, output *GetChannelsOutput) { - op := &request.Operation{ - Name: opGetChannels, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/channels", - } - - if input == nil { - input = &GetChannelsInput{} - } - - output = &GetChannelsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetChannels API operation for Amazon Pinpoint. -// -// Get all channels. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetChannels for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetChannels -func (c *Pinpoint) GetChannels(input *GetChannelsInput) (*GetChannelsOutput, error) { - req, out := c.GetChannelsRequest(input) - return out, req.Send() -} - -// GetChannelsWithContext is the same as GetChannels with the addition of -// the ability to pass a context and additional request options. -// -// See GetChannels for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetChannelsWithContext(ctx aws.Context, input *GetChannelsInput, opts ...request.Option) (*GetChannelsOutput, error) { - req, out := c.GetChannelsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetEmailChannel = "GetEmailChannel" - -// GetEmailChannelRequest generates a "aws/request.Request" representing the -// client's request for the GetEmailChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetEmailChannel for more information on using the GetEmailChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetEmailChannelRequest method. -// req, resp := client.GetEmailChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEmailChannel -func (c *Pinpoint) GetEmailChannelRequest(input *GetEmailChannelInput) (req *request.Request, output *GetEmailChannelOutput) { - op := &request.Operation{ - Name: opGetEmailChannel, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/channels/email", - } - - if input == nil { - input = &GetEmailChannelInput{} - } - - output = &GetEmailChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetEmailChannel API operation for Amazon Pinpoint. -// -// Get an email channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetEmailChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEmailChannel -func (c *Pinpoint) GetEmailChannel(input *GetEmailChannelInput) (*GetEmailChannelOutput, error) { - req, out := c.GetEmailChannelRequest(input) - return out, req.Send() -} - -// GetEmailChannelWithContext is the same as GetEmailChannel with the addition of -// the ability to pass a context and additional request options. -// -// See GetEmailChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetEmailChannelWithContext(ctx aws.Context, input *GetEmailChannelInput, opts ...request.Option) (*GetEmailChannelOutput, error) { - req, out := c.GetEmailChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetEndpoint = "GetEndpoint" - -// GetEndpointRequest generates a "aws/request.Request" representing the -// client's request for the GetEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetEndpoint for more information on using the GetEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetEndpointRequest method. -// req, resp := client.GetEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEndpoint -func (c *Pinpoint) GetEndpointRequest(input *GetEndpointInput) (req *request.Request, output *GetEndpointOutput) { - op := &request.Operation{ - Name: opGetEndpoint, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/endpoints/{endpoint-id}", - } - - if input == nil { - input = &GetEndpointInput{} - } - - output = &GetEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetEndpoint API operation for Amazon Pinpoint. -// -// Returns information about an endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEndpoint -func (c *Pinpoint) GetEndpoint(input *GetEndpointInput) (*GetEndpointOutput, error) { - req, out := c.GetEndpointRequest(input) - return out, req.Send() -} - -// GetEndpointWithContext is the same as GetEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See GetEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetEndpointWithContext(ctx aws.Context, input *GetEndpointInput, opts ...request.Option) (*GetEndpointOutput, error) { - req, out := c.GetEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetEventStream = "GetEventStream" - -// GetEventStreamRequest generates a "aws/request.Request" representing the -// client's request for the GetEventStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetEventStream for more information on using the GetEventStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetEventStreamRequest method. -// req, resp := client.GetEventStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEventStream -func (c *Pinpoint) GetEventStreamRequest(input *GetEventStreamInput) (req *request.Request, output *GetEventStreamOutput) { - op := &request.Operation{ - Name: opGetEventStream, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/eventstream", - } - - if input == nil { - input = &GetEventStreamInput{} - } - - output = &GetEventStreamOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetEventStream API operation for Amazon Pinpoint. -// -// Returns the event stream for an app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetEventStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEventStream -func (c *Pinpoint) GetEventStream(input *GetEventStreamInput) (*GetEventStreamOutput, error) { - req, out := c.GetEventStreamRequest(input) - return out, req.Send() -} - -// GetEventStreamWithContext is the same as GetEventStream with the addition of -// the ability to pass a context and additional request options. -// -// See GetEventStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetEventStreamWithContext(ctx aws.Context, input *GetEventStreamInput, opts ...request.Option) (*GetEventStreamOutput, error) { - req, out := c.GetEventStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetExportJob = "GetExportJob" - -// GetExportJobRequest generates a "aws/request.Request" representing the -// client's request for the GetExportJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetExportJob for more information on using the GetExportJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetExportJobRequest method. -// req, resp := client.GetExportJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJob -func (c *Pinpoint) GetExportJobRequest(input *GetExportJobInput) (req *request.Request, output *GetExportJobOutput) { - op := &request.Operation{ - Name: opGetExportJob, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/jobs/export/{job-id}", - } - - if input == nil { - input = &GetExportJobInput{} - } - - output = &GetExportJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetExportJob API operation for Amazon Pinpoint. -// -// Returns information about an export job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetExportJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJob -func (c *Pinpoint) GetExportJob(input *GetExportJobInput) (*GetExportJobOutput, error) { - req, out := c.GetExportJobRequest(input) - return out, req.Send() -} - -// GetExportJobWithContext is the same as GetExportJob with the addition of -// the ability to pass a context and additional request options. -// -// See GetExportJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetExportJobWithContext(ctx aws.Context, input *GetExportJobInput, opts ...request.Option) (*GetExportJobOutput, error) { - req, out := c.GetExportJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetExportJobs = "GetExportJobs" - -// GetExportJobsRequest generates a "aws/request.Request" representing the -// client's request for the GetExportJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetExportJobs for more information on using the GetExportJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetExportJobsRequest method. -// req, resp := client.GetExportJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJobs -func (c *Pinpoint) GetExportJobsRequest(input *GetExportJobsInput) (req *request.Request, output *GetExportJobsOutput) { - op := &request.Operation{ - Name: opGetExportJobs, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/jobs/export", - } - - if input == nil { - input = &GetExportJobsInput{} - } - - output = &GetExportJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetExportJobs API operation for Amazon Pinpoint. -// -// Returns information about your export jobs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetExportJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJobs -func (c *Pinpoint) GetExportJobs(input *GetExportJobsInput) (*GetExportJobsOutput, error) { - req, out := c.GetExportJobsRequest(input) - return out, req.Send() -} - -// GetExportJobsWithContext is the same as GetExportJobs with the addition of -// the ability to pass a context and additional request options. -// -// See GetExportJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetExportJobsWithContext(ctx aws.Context, input *GetExportJobsInput, opts ...request.Option) (*GetExportJobsOutput, error) { - req, out := c.GetExportJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetGcmChannel = "GetGcmChannel" - -// GetGcmChannelRequest generates a "aws/request.Request" representing the -// client's request for the GetGcmChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetGcmChannel for more information on using the GetGcmChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetGcmChannelRequest method. -// req, resp := client.GetGcmChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetGcmChannel -func (c *Pinpoint) GetGcmChannelRequest(input *GetGcmChannelInput) (req *request.Request, output *GetGcmChannelOutput) { - op := &request.Operation{ - Name: opGetGcmChannel, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/channels/gcm", - } - - if input == nil { - input = &GetGcmChannelInput{} - } - - output = &GetGcmChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGcmChannel API operation for Amazon Pinpoint. -// -// Returns information about the GCM channel for an app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetGcmChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetGcmChannel -func (c *Pinpoint) GetGcmChannel(input *GetGcmChannelInput) (*GetGcmChannelOutput, error) { - req, out := c.GetGcmChannelRequest(input) - return out, req.Send() -} - -// GetGcmChannelWithContext is the same as GetGcmChannel with the addition of -// the ability to pass a context and additional request options. -// -// See GetGcmChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetGcmChannelWithContext(ctx aws.Context, input *GetGcmChannelInput, opts ...request.Option) (*GetGcmChannelOutput, error) { - req, out := c.GetGcmChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetImportJob = "GetImportJob" - -// GetImportJobRequest generates a "aws/request.Request" representing the -// client's request for the GetImportJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetImportJob for more information on using the GetImportJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetImportJobRequest method. -// req, resp := client.GetImportJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJob -func (c *Pinpoint) GetImportJobRequest(input *GetImportJobInput) (req *request.Request, output *GetImportJobOutput) { - op := &request.Operation{ - Name: opGetImportJob, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/jobs/import/{job-id}", - } - - if input == nil { - input = &GetImportJobInput{} - } - - output = &GetImportJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetImportJob API operation for Amazon Pinpoint. -// -// Returns information about an import job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetImportJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJob -func (c *Pinpoint) GetImportJob(input *GetImportJobInput) (*GetImportJobOutput, error) { - req, out := c.GetImportJobRequest(input) - return out, req.Send() -} - -// GetImportJobWithContext is the same as GetImportJob with the addition of -// the ability to pass a context and additional request options. -// -// See GetImportJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetImportJobWithContext(ctx aws.Context, input *GetImportJobInput, opts ...request.Option) (*GetImportJobOutput, error) { - req, out := c.GetImportJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetImportJobs = "GetImportJobs" - -// GetImportJobsRequest generates a "aws/request.Request" representing the -// client's request for the GetImportJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetImportJobs for more information on using the GetImportJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetImportJobsRequest method. -// req, resp := client.GetImportJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJobs -func (c *Pinpoint) GetImportJobsRequest(input *GetImportJobsInput) (req *request.Request, output *GetImportJobsOutput) { - op := &request.Operation{ - Name: opGetImportJobs, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/jobs/import", - } - - if input == nil { - input = &GetImportJobsInput{} - } - - output = &GetImportJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetImportJobs API operation for Amazon Pinpoint. -// -// Returns information about your import jobs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetImportJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJobs -func (c *Pinpoint) GetImportJobs(input *GetImportJobsInput) (*GetImportJobsOutput, error) { - req, out := c.GetImportJobsRequest(input) - return out, req.Send() -} - -// GetImportJobsWithContext is the same as GetImportJobs with the addition of -// the ability to pass a context and additional request options. -// -// See GetImportJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetImportJobsWithContext(ctx aws.Context, input *GetImportJobsInput, opts ...request.Option) (*GetImportJobsOutput, error) { - req, out := c.GetImportJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSegment = "GetSegment" - -// GetSegmentRequest generates a "aws/request.Request" representing the -// client's request for the GetSegment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSegment for more information on using the GetSegment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSegmentRequest method. -// req, resp := client.GetSegmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegment -func (c *Pinpoint) GetSegmentRequest(input *GetSegmentInput) (req *request.Request, output *GetSegmentOutput) { - op := &request.Operation{ - Name: opGetSegment, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}", - } - - if input == nil { - input = &GetSegmentInput{} - } - - output = &GetSegmentOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSegment API operation for Amazon Pinpoint. -// -// Returns information about a segment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetSegment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegment -func (c *Pinpoint) GetSegment(input *GetSegmentInput) (*GetSegmentOutput, error) { - req, out := c.GetSegmentRequest(input) - return out, req.Send() -} - -// GetSegmentWithContext is the same as GetSegment with the addition of -// the ability to pass a context and additional request options. -// -// See GetSegment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetSegmentWithContext(ctx aws.Context, input *GetSegmentInput, opts ...request.Option) (*GetSegmentOutput, error) { - req, out := c.GetSegmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSegmentExportJobs = "GetSegmentExportJobs" - -// GetSegmentExportJobsRequest generates a "aws/request.Request" representing the -// client's request for the GetSegmentExportJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSegmentExportJobs for more information on using the GetSegmentExportJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSegmentExportJobsRequest method. -// req, resp := client.GetSegmentExportJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentExportJobs -func (c *Pinpoint) GetSegmentExportJobsRequest(input *GetSegmentExportJobsInput) (req *request.Request, output *GetSegmentExportJobsOutput) { - op := &request.Operation{ - Name: opGetSegmentExportJobs, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}/jobs/export", - } - - if input == nil { - input = &GetSegmentExportJobsInput{} - } - - output = &GetSegmentExportJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSegmentExportJobs API operation for Amazon Pinpoint. -// -// Returns a list of export jobs for a specific segment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetSegmentExportJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentExportJobs -func (c *Pinpoint) GetSegmentExportJobs(input *GetSegmentExportJobsInput) (*GetSegmentExportJobsOutput, error) { - req, out := c.GetSegmentExportJobsRequest(input) - return out, req.Send() -} - -// GetSegmentExportJobsWithContext is the same as GetSegmentExportJobs with the addition of -// the ability to pass a context and additional request options. -// -// See GetSegmentExportJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetSegmentExportJobsWithContext(ctx aws.Context, input *GetSegmentExportJobsInput, opts ...request.Option) (*GetSegmentExportJobsOutput, error) { - req, out := c.GetSegmentExportJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSegmentImportJobs = "GetSegmentImportJobs" - -// GetSegmentImportJobsRequest generates a "aws/request.Request" representing the -// client's request for the GetSegmentImportJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSegmentImportJobs for more information on using the GetSegmentImportJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSegmentImportJobsRequest method. -// req, resp := client.GetSegmentImportJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentImportJobs -func (c *Pinpoint) GetSegmentImportJobsRequest(input *GetSegmentImportJobsInput) (req *request.Request, output *GetSegmentImportJobsOutput) { - op := &request.Operation{ - Name: opGetSegmentImportJobs, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}/jobs/import", - } - - if input == nil { - input = &GetSegmentImportJobsInput{} - } - - output = &GetSegmentImportJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSegmentImportJobs API operation for Amazon Pinpoint. -// -// Returns a list of import jobs for a specific segment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetSegmentImportJobs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentImportJobs -func (c *Pinpoint) GetSegmentImportJobs(input *GetSegmentImportJobsInput) (*GetSegmentImportJobsOutput, error) { - req, out := c.GetSegmentImportJobsRequest(input) - return out, req.Send() -} - -// GetSegmentImportJobsWithContext is the same as GetSegmentImportJobs with the addition of -// the ability to pass a context and additional request options. -// -// See GetSegmentImportJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetSegmentImportJobsWithContext(ctx aws.Context, input *GetSegmentImportJobsInput, opts ...request.Option) (*GetSegmentImportJobsOutput, error) { - req, out := c.GetSegmentImportJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSegmentVersion = "GetSegmentVersion" - -// GetSegmentVersionRequest generates a "aws/request.Request" representing the -// client's request for the GetSegmentVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSegmentVersion for more information on using the GetSegmentVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSegmentVersionRequest method. -// req, resp := client.GetSegmentVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersion -func (c *Pinpoint) GetSegmentVersionRequest(input *GetSegmentVersionInput) (req *request.Request, output *GetSegmentVersionOutput) { - op := &request.Operation{ - Name: opGetSegmentVersion, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}/versions/{version}", - } - - if input == nil { - input = &GetSegmentVersionInput{} - } - - output = &GetSegmentVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSegmentVersion API operation for Amazon Pinpoint. -// -// Returns information about a segment version. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetSegmentVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersion -func (c *Pinpoint) GetSegmentVersion(input *GetSegmentVersionInput) (*GetSegmentVersionOutput, error) { - req, out := c.GetSegmentVersionRequest(input) - return out, req.Send() -} - -// GetSegmentVersionWithContext is the same as GetSegmentVersion with the addition of -// the ability to pass a context and additional request options. -// -// See GetSegmentVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetSegmentVersionWithContext(ctx aws.Context, input *GetSegmentVersionInput, opts ...request.Option) (*GetSegmentVersionOutput, error) { - req, out := c.GetSegmentVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSegmentVersions = "GetSegmentVersions" - -// GetSegmentVersionsRequest generates a "aws/request.Request" representing the -// client's request for the GetSegmentVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSegmentVersions for more information on using the GetSegmentVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSegmentVersionsRequest method. -// req, resp := client.GetSegmentVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersions -func (c *Pinpoint) GetSegmentVersionsRequest(input *GetSegmentVersionsInput) (req *request.Request, output *GetSegmentVersionsOutput) { - op := &request.Operation{ - Name: opGetSegmentVersions, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}/versions", - } - - if input == nil { - input = &GetSegmentVersionsInput{} - } - - output = &GetSegmentVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSegmentVersions API operation for Amazon Pinpoint. -// -// Returns information about your segment versions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetSegmentVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersions -func (c *Pinpoint) GetSegmentVersions(input *GetSegmentVersionsInput) (*GetSegmentVersionsOutput, error) { - req, out := c.GetSegmentVersionsRequest(input) - return out, req.Send() -} - -// GetSegmentVersionsWithContext is the same as GetSegmentVersions with the addition of -// the ability to pass a context and additional request options. -// -// See GetSegmentVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetSegmentVersionsWithContext(ctx aws.Context, input *GetSegmentVersionsInput, opts ...request.Option) (*GetSegmentVersionsOutput, error) { - req, out := c.GetSegmentVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSegments = "GetSegments" - -// GetSegmentsRequest generates a "aws/request.Request" representing the -// client's request for the GetSegments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSegments for more information on using the GetSegments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSegmentsRequest method. -// req, resp := client.GetSegmentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegments -func (c *Pinpoint) GetSegmentsRequest(input *GetSegmentsInput) (req *request.Request, output *GetSegmentsOutput) { - op := &request.Operation{ - Name: opGetSegments, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/segments", - } - - if input == nil { - input = &GetSegmentsInput{} - } - - output = &GetSegmentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSegments API operation for Amazon Pinpoint. -// -// Used to get information about your segments. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetSegments for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegments -func (c *Pinpoint) GetSegments(input *GetSegmentsInput) (*GetSegmentsOutput, error) { - req, out := c.GetSegmentsRequest(input) - return out, req.Send() -} - -// GetSegmentsWithContext is the same as GetSegments with the addition of -// the ability to pass a context and additional request options. -// -// See GetSegments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetSegmentsWithContext(ctx aws.Context, input *GetSegmentsInput, opts ...request.Option) (*GetSegmentsOutput, error) { - req, out := c.GetSegmentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSmsChannel = "GetSmsChannel" - -// GetSmsChannelRequest generates a "aws/request.Request" representing the -// client's request for the GetSmsChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSmsChannel for more information on using the GetSmsChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSmsChannelRequest method. -// req, resp := client.GetSmsChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSmsChannel -func (c *Pinpoint) GetSmsChannelRequest(input *GetSmsChannelInput) (req *request.Request, output *GetSmsChannelOutput) { - op := &request.Operation{ - Name: opGetSmsChannel, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/channels/sms", - } - - if input == nil { - input = &GetSmsChannelInput{} - } - - output = &GetSmsChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSmsChannel API operation for Amazon Pinpoint. -// -// Get an SMS channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetSmsChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSmsChannel -func (c *Pinpoint) GetSmsChannel(input *GetSmsChannelInput) (*GetSmsChannelOutput, error) { - req, out := c.GetSmsChannelRequest(input) - return out, req.Send() -} - -// GetSmsChannelWithContext is the same as GetSmsChannel with the addition of -// the ability to pass a context and additional request options. -// -// See GetSmsChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetSmsChannelWithContext(ctx aws.Context, input *GetSmsChannelInput, opts ...request.Option) (*GetSmsChannelOutput, error) { - req, out := c.GetSmsChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUserEndpoints = "GetUserEndpoints" - -// GetUserEndpointsRequest generates a "aws/request.Request" representing the -// client's request for the GetUserEndpoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUserEndpoints for more information on using the GetUserEndpoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetUserEndpointsRequest method. -// req, resp := client.GetUserEndpointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetUserEndpoints -func (c *Pinpoint) GetUserEndpointsRequest(input *GetUserEndpointsInput) (req *request.Request, output *GetUserEndpointsOutput) { - op := &request.Operation{ - Name: opGetUserEndpoints, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/users/{user-id}", - } - - if input == nil { - input = &GetUserEndpointsInput{} - } - - output = &GetUserEndpointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUserEndpoints API operation for Amazon Pinpoint. -// -// Returns information about the endpoints that are associated with a User ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetUserEndpoints for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetUserEndpoints -func (c *Pinpoint) GetUserEndpoints(input *GetUserEndpointsInput) (*GetUserEndpointsOutput, error) { - req, out := c.GetUserEndpointsRequest(input) - return out, req.Send() -} - -// GetUserEndpointsWithContext is the same as GetUserEndpoints with the addition of -// the ability to pass a context and additional request options. -// -// See GetUserEndpoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetUserEndpointsWithContext(ctx aws.Context, input *GetUserEndpointsInput, opts ...request.Option) (*GetUserEndpointsOutput, error) { - req, out := c.GetUserEndpointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetVoiceChannel = "GetVoiceChannel" - -// GetVoiceChannelRequest generates a "aws/request.Request" representing the -// client's request for the GetVoiceChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetVoiceChannel for more information on using the GetVoiceChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetVoiceChannelRequest method. -// req, resp := client.GetVoiceChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetVoiceChannel -func (c *Pinpoint) GetVoiceChannelRequest(input *GetVoiceChannelInput) (req *request.Request, output *GetVoiceChannelOutput) { - op := &request.Operation{ - Name: opGetVoiceChannel, - HTTPMethod: "GET", - HTTPPath: "/v1/apps/{application-id}/channels/voice", - } - - if input == nil { - input = &GetVoiceChannelInput{} - } - - output = &GetVoiceChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetVoiceChannel API operation for Amazon Pinpoint. -// -// Get a Voice Channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation GetVoiceChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetVoiceChannel -func (c *Pinpoint) GetVoiceChannel(input *GetVoiceChannelInput) (*GetVoiceChannelOutput, error) { - req, out := c.GetVoiceChannelRequest(input) - return out, req.Send() -} - -// GetVoiceChannelWithContext is the same as GetVoiceChannel with the addition of -// the ability to pass a context and additional request options. -// -// See GetVoiceChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) GetVoiceChannelWithContext(ctx aws.Context, input *GetVoiceChannelInput, opts ...request.Option) (*GetVoiceChannelOutput, error) { - req, out := c.GetVoiceChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPhoneNumberValidate = "PhoneNumberValidate" - -// PhoneNumberValidateRequest generates a "aws/request.Request" representing the -// client's request for the PhoneNumberValidate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PhoneNumberValidate for more information on using the PhoneNumberValidate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PhoneNumberValidateRequest method. -// req, resp := client.PhoneNumberValidateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PhoneNumberValidate -func (c *Pinpoint) PhoneNumberValidateRequest(input *PhoneNumberValidateInput) (req *request.Request, output *PhoneNumberValidateOutput) { - op := &request.Operation{ - Name: opPhoneNumberValidate, - HTTPMethod: "POST", - HTTPPath: "/v1/phone/number/validate", - } - - if input == nil { - input = &PhoneNumberValidateInput{} - } - - output = &PhoneNumberValidateOutput{} - req = c.newRequest(op, input, output) - return -} - -// PhoneNumberValidate API operation for Amazon Pinpoint. -// -// Returns information about the specified phone number. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation PhoneNumberValidate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PhoneNumberValidate -func (c *Pinpoint) PhoneNumberValidate(input *PhoneNumberValidateInput) (*PhoneNumberValidateOutput, error) { - req, out := c.PhoneNumberValidateRequest(input) - return out, req.Send() -} - -// PhoneNumberValidateWithContext is the same as PhoneNumberValidate with the addition of -// the ability to pass a context and additional request options. -// -// See PhoneNumberValidate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) PhoneNumberValidateWithContext(ctx aws.Context, input *PhoneNumberValidateInput, opts ...request.Option) (*PhoneNumberValidateOutput, error) { - req, out := c.PhoneNumberValidateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutEventStream = "PutEventStream" - -// PutEventStreamRequest generates a "aws/request.Request" representing the -// client's request for the PutEventStream operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutEventStream for more information on using the PutEventStream -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutEventStreamRequest method. -// req, resp := client.PutEventStreamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEventStream -func (c *Pinpoint) PutEventStreamRequest(input *PutEventStreamInput) (req *request.Request, output *PutEventStreamOutput) { - op := &request.Operation{ - Name: opPutEventStream, - HTTPMethod: "POST", - HTTPPath: "/v1/apps/{application-id}/eventstream", - } - - if input == nil { - input = &PutEventStreamInput{} - } - - output = &PutEventStreamOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutEventStream API operation for Amazon Pinpoint. -// -// Use to create or update the event stream for an app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation PutEventStream for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEventStream -func (c *Pinpoint) PutEventStream(input *PutEventStreamInput) (*PutEventStreamOutput, error) { - req, out := c.PutEventStreamRequest(input) - return out, req.Send() -} - -// PutEventStreamWithContext is the same as PutEventStream with the addition of -// the ability to pass a context and additional request options. -// -// See PutEventStream for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) PutEventStreamWithContext(ctx aws.Context, input *PutEventStreamInput, opts ...request.Option) (*PutEventStreamOutput, error) { - req, out := c.PutEventStreamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutEvents = "PutEvents" - -// PutEventsRequest generates a "aws/request.Request" representing the -// client's request for the PutEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutEvents for more information on using the PutEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutEventsRequest method. -// req, resp := client.PutEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEvents -func (c *Pinpoint) PutEventsRequest(input *PutEventsInput) (req *request.Request, output *PutEventsOutput) { - op := &request.Operation{ - Name: opPutEvents, - HTTPMethod: "POST", - HTTPPath: "/v1/apps/{application-id}/events", - } - - if input == nil { - input = &PutEventsInput{} - } - - output = &PutEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutEvents API operation for Amazon Pinpoint. -// -// Use to record events for endpoints. This method creates events and creates -// or updates the endpoints that those events are associated with. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation PutEvents for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEvents -func (c *Pinpoint) PutEvents(input *PutEventsInput) (*PutEventsOutput, error) { - req, out := c.PutEventsRequest(input) - return out, req.Send() -} - -// PutEventsWithContext is the same as PutEvents with the addition of -// the ability to pass a context and additional request options. -// -// See PutEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) PutEventsWithContext(ctx aws.Context, input *PutEventsInput, opts ...request.Option) (*PutEventsOutput, error) { - req, out := c.PutEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveAttributes = "RemoveAttributes" - -// RemoveAttributesRequest generates a "aws/request.Request" representing the -// client's request for the RemoveAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveAttributes for more information on using the RemoveAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveAttributesRequest method. -// req, resp := client.RemoveAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/RemoveAttributes -func (c *Pinpoint) RemoveAttributesRequest(input *RemoveAttributesInput) (req *request.Request, output *RemoveAttributesOutput) { - op := &request.Operation{ - Name: opRemoveAttributes, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/attributes/{attribute-type}", - } - - if input == nil { - input = &RemoveAttributesInput{} - } - - output = &RemoveAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// RemoveAttributes API operation for Amazon Pinpoint. -// -// Used to remove the attributes for an app -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation RemoveAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/RemoveAttributes -func (c *Pinpoint) RemoveAttributes(input *RemoveAttributesInput) (*RemoveAttributesOutput, error) { - req, out := c.RemoveAttributesRequest(input) - return out, req.Send() -} - -// RemoveAttributesWithContext is the same as RemoveAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) RemoveAttributesWithContext(ctx aws.Context, input *RemoveAttributesInput, opts ...request.Option) (*RemoveAttributesOutput, error) { - req, out := c.RemoveAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSendMessages = "SendMessages" - -// SendMessagesRequest generates a "aws/request.Request" representing the -// client's request for the SendMessages operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendMessages for more information on using the SendMessages -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendMessagesRequest method. -// req, resp := client.SendMessagesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendMessages -func (c *Pinpoint) SendMessagesRequest(input *SendMessagesInput) (req *request.Request, output *SendMessagesOutput) { - op := &request.Operation{ - Name: opSendMessages, - HTTPMethod: "POST", - HTTPPath: "/v1/apps/{application-id}/messages", - } - - if input == nil { - input = &SendMessagesInput{} - } - - output = &SendMessagesOutput{} - req = c.newRequest(op, input, output) - return -} - -// SendMessages API operation for Amazon Pinpoint. -// -// Used to send a direct message. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation SendMessages for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendMessages -func (c *Pinpoint) SendMessages(input *SendMessagesInput) (*SendMessagesOutput, error) { - req, out := c.SendMessagesRequest(input) - return out, req.Send() -} - -// SendMessagesWithContext is the same as SendMessages with the addition of -// the ability to pass a context and additional request options. -// -// See SendMessages for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) SendMessagesWithContext(ctx aws.Context, input *SendMessagesInput, opts ...request.Option) (*SendMessagesOutput, error) { - req, out := c.SendMessagesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSendUsersMessages = "SendUsersMessages" - -// SendUsersMessagesRequest generates a "aws/request.Request" representing the -// client's request for the SendUsersMessages operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendUsersMessages for more information on using the SendUsersMessages -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendUsersMessagesRequest method. -// req, resp := client.SendUsersMessagesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessages -func (c *Pinpoint) SendUsersMessagesRequest(input *SendUsersMessagesInput) (req *request.Request, output *SendUsersMessagesOutput) { - op := &request.Operation{ - Name: opSendUsersMessages, - HTTPMethod: "POST", - HTTPPath: "/v1/apps/{application-id}/users-messages", - } - - if input == nil { - input = &SendUsersMessagesInput{} - } - - output = &SendUsersMessagesOutput{} - req = c.newRequest(op, input, output) - return -} - -// SendUsersMessages API operation for Amazon Pinpoint. -// -// Used to send a message to a list of users. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation SendUsersMessages for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessages -func (c *Pinpoint) SendUsersMessages(input *SendUsersMessagesInput) (*SendUsersMessagesOutput, error) { - req, out := c.SendUsersMessagesRequest(input) - return out, req.Send() -} - -// SendUsersMessagesWithContext is the same as SendUsersMessages with the addition of -// the ability to pass a context and additional request options. -// -// See SendUsersMessages for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) SendUsersMessagesWithContext(ctx aws.Context, input *SendUsersMessagesInput, opts ...request.Option) (*SendUsersMessagesOutput, error) { - req, out := c.SendUsersMessagesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAdmChannel = "UpdateAdmChannel" - -// UpdateAdmChannelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAdmChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAdmChannel for more information on using the UpdateAdmChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAdmChannelRequest method. -// req, resp := client.UpdateAdmChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateAdmChannel -func (c *Pinpoint) UpdateAdmChannelRequest(input *UpdateAdmChannelInput) (req *request.Request, output *UpdateAdmChannelOutput) { - op := &request.Operation{ - Name: opUpdateAdmChannel, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/channels/adm", - } - - if input == nil { - input = &UpdateAdmChannelInput{} - } - - output = &UpdateAdmChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateAdmChannel API operation for Amazon Pinpoint. -// -// Update an ADM channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateAdmChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateAdmChannel -func (c *Pinpoint) UpdateAdmChannel(input *UpdateAdmChannelInput) (*UpdateAdmChannelOutput, error) { - req, out := c.UpdateAdmChannelRequest(input) - return out, req.Send() -} - -// UpdateAdmChannelWithContext is the same as UpdateAdmChannel with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAdmChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateAdmChannelWithContext(ctx aws.Context, input *UpdateAdmChannelInput, opts ...request.Option) (*UpdateAdmChannelOutput, error) { - req, out := c.UpdateAdmChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApnsChannel = "UpdateApnsChannel" - -// UpdateApnsChannelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApnsChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApnsChannel for more information on using the UpdateApnsChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApnsChannelRequest method. -// req, resp := client.UpdateApnsChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsChannel -func (c *Pinpoint) UpdateApnsChannelRequest(input *UpdateApnsChannelInput) (req *request.Request, output *UpdateApnsChannelOutput) { - op := &request.Operation{ - Name: opUpdateApnsChannel, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/channels/apns", - } - - if input == nil { - input = &UpdateApnsChannelInput{} - } - - output = &UpdateApnsChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateApnsChannel API operation for Amazon Pinpoint. -// -// Use to update the APNs channel for an app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateApnsChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsChannel -func (c *Pinpoint) UpdateApnsChannel(input *UpdateApnsChannelInput) (*UpdateApnsChannelOutput, error) { - req, out := c.UpdateApnsChannelRequest(input) - return out, req.Send() -} - -// UpdateApnsChannelWithContext is the same as UpdateApnsChannel with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApnsChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateApnsChannelWithContext(ctx aws.Context, input *UpdateApnsChannelInput, opts ...request.Option) (*UpdateApnsChannelOutput, error) { - req, out := c.UpdateApnsChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApnsSandboxChannel = "UpdateApnsSandboxChannel" - -// UpdateApnsSandboxChannelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApnsSandboxChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApnsSandboxChannel for more information on using the UpdateApnsSandboxChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApnsSandboxChannelRequest method. -// req, resp := client.UpdateApnsSandboxChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsSandboxChannel -func (c *Pinpoint) UpdateApnsSandboxChannelRequest(input *UpdateApnsSandboxChannelInput) (req *request.Request, output *UpdateApnsSandboxChannelOutput) { - op := &request.Operation{ - Name: opUpdateApnsSandboxChannel, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/channels/apns_sandbox", - } - - if input == nil { - input = &UpdateApnsSandboxChannelInput{} - } - - output = &UpdateApnsSandboxChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateApnsSandboxChannel API operation for Amazon Pinpoint. -// -// Update an APNS sandbox channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateApnsSandboxChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsSandboxChannel -func (c *Pinpoint) UpdateApnsSandboxChannel(input *UpdateApnsSandboxChannelInput) (*UpdateApnsSandboxChannelOutput, error) { - req, out := c.UpdateApnsSandboxChannelRequest(input) - return out, req.Send() -} - -// UpdateApnsSandboxChannelWithContext is the same as UpdateApnsSandboxChannel with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApnsSandboxChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateApnsSandboxChannelWithContext(ctx aws.Context, input *UpdateApnsSandboxChannelInput, opts ...request.Option) (*UpdateApnsSandboxChannelOutput, error) { - req, out := c.UpdateApnsSandboxChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApnsVoipChannel = "UpdateApnsVoipChannel" - -// UpdateApnsVoipChannelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApnsVoipChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApnsVoipChannel for more information on using the UpdateApnsVoipChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApnsVoipChannelRequest method. -// req, resp := client.UpdateApnsVoipChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipChannel -func (c *Pinpoint) UpdateApnsVoipChannelRequest(input *UpdateApnsVoipChannelInput) (req *request.Request, output *UpdateApnsVoipChannelOutput) { - op := &request.Operation{ - Name: opUpdateApnsVoipChannel, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/channels/apns_voip", - } - - if input == nil { - input = &UpdateApnsVoipChannelInput{} - } - - output = &UpdateApnsVoipChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateApnsVoipChannel API operation for Amazon Pinpoint. -// -// Update an APNS VoIP channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateApnsVoipChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipChannel -func (c *Pinpoint) UpdateApnsVoipChannel(input *UpdateApnsVoipChannelInput) (*UpdateApnsVoipChannelOutput, error) { - req, out := c.UpdateApnsVoipChannelRequest(input) - return out, req.Send() -} - -// UpdateApnsVoipChannelWithContext is the same as UpdateApnsVoipChannel with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApnsVoipChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateApnsVoipChannelWithContext(ctx aws.Context, input *UpdateApnsVoipChannelInput, opts ...request.Option) (*UpdateApnsVoipChannelOutput, error) { - req, out := c.UpdateApnsVoipChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApnsVoipSandboxChannel = "UpdateApnsVoipSandboxChannel" - -// UpdateApnsVoipSandboxChannelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApnsVoipSandboxChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApnsVoipSandboxChannel for more information on using the UpdateApnsVoipSandboxChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApnsVoipSandboxChannelRequest method. -// req, resp := client.UpdateApnsVoipSandboxChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipSandboxChannel -func (c *Pinpoint) UpdateApnsVoipSandboxChannelRequest(input *UpdateApnsVoipSandboxChannelInput) (req *request.Request, output *UpdateApnsVoipSandboxChannelOutput) { - op := &request.Operation{ - Name: opUpdateApnsVoipSandboxChannel, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/channels/apns_voip_sandbox", - } - - if input == nil { - input = &UpdateApnsVoipSandboxChannelInput{} - } - - output = &UpdateApnsVoipSandboxChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateApnsVoipSandboxChannel API operation for Amazon Pinpoint. -// -// Update an APNS VoIP sandbox channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateApnsVoipSandboxChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipSandboxChannel -func (c *Pinpoint) UpdateApnsVoipSandboxChannel(input *UpdateApnsVoipSandboxChannelInput) (*UpdateApnsVoipSandboxChannelOutput, error) { - req, out := c.UpdateApnsVoipSandboxChannelRequest(input) - return out, req.Send() -} - -// UpdateApnsVoipSandboxChannelWithContext is the same as UpdateApnsVoipSandboxChannel with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApnsVoipSandboxChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateApnsVoipSandboxChannelWithContext(ctx aws.Context, input *UpdateApnsVoipSandboxChannelInput, opts ...request.Option) (*UpdateApnsVoipSandboxChannelOutput, error) { - req, out := c.UpdateApnsVoipSandboxChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApplicationSettings = "UpdateApplicationSettings" - -// UpdateApplicationSettingsRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApplicationSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApplicationSettings for more information on using the UpdateApplicationSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApplicationSettingsRequest method. -// req, resp := client.UpdateApplicationSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApplicationSettings -func (c *Pinpoint) UpdateApplicationSettingsRequest(input *UpdateApplicationSettingsInput) (req *request.Request, output *UpdateApplicationSettingsOutput) { - op := &request.Operation{ - Name: opUpdateApplicationSettings, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/settings", - } - - if input == nil { - input = &UpdateApplicationSettingsInput{} - } - - output = &UpdateApplicationSettingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateApplicationSettings API operation for Amazon Pinpoint. -// -// Used to update the settings for an app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateApplicationSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApplicationSettings -func (c *Pinpoint) UpdateApplicationSettings(input *UpdateApplicationSettingsInput) (*UpdateApplicationSettingsOutput, error) { - req, out := c.UpdateApplicationSettingsRequest(input) - return out, req.Send() -} - -// UpdateApplicationSettingsWithContext is the same as UpdateApplicationSettings with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApplicationSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateApplicationSettingsWithContext(ctx aws.Context, input *UpdateApplicationSettingsInput, opts ...request.Option) (*UpdateApplicationSettingsOutput, error) { - req, out := c.UpdateApplicationSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateBaiduChannel = "UpdateBaiduChannel" - -// UpdateBaiduChannelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateBaiduChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateBaiduChannel for more information on using the UpdateBaiduChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateBaiduChannelRequest method. -// req, resp := client.UpdateBaiduChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateBaiduChannel -func (c *Pinpoint) UpdateBaiduChannelRequest(input *UpdateBaiduChannelInput) (req *request.Request, output *UpdateBaiduChannelOutput) { - op := &request.Operation{ - Name: opUpdateBaiduChannel, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/channels/baidu", - } - - if input == nil { - input = &UpdateBaiduChannelInput{} - } - - output = &UpdateBaiduChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateBaiduChannel API operation for Amazon Pinpoint. -// -// Update a BAIDU GCM channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateBaiduChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateBaiduChannel -func (c *Pinpoint) UpdateBaiduChannel(input *UpdateBaiduChannelInput) (*UpdateBaiduChannelOutput, error) { - req, out := c.UpdateBaiduChannelRequest(input) - return out, req.Send() -} - -// UpdateBaiduChannelWithContext is the same as UpdateBaiduChannel with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateBaiduChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateBaiduChannelWithContext(ctx aws.Context, input *UpdateBaiduChannelInput, opts ...request.Option) (*UpdateBaiduChannelOutput, error) { - req, out := c.UpdateBaiduChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateCampaign = "UpdateCampaign" - -// UpdateCampaignRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCampaign operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateCampaign for more information on using the UpdateCampaign -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateCampaignRequest method. -// req, resp := client.UpdateCampaignRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateCampaign -func (c *Pinpoint) UpdateCampaignRequest(input *UpdateCampaignInput) (req *request.Request, output *UpdateCampaignOutput) { - op := &request.Operation{ - Name: opUpdateCampaign, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}", - } - - if input == nil { - input = &UpdateCampaignInput{} - } - - output = &UpdateCampaignOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateCampaign API operation for Amazon Pinpoint. -// -// Use to update a campaign. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateCampaign for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateCampaign -func (c *Pinpoint) UpdateCampaign(input *UpdateCampaignInput) (*UpdateCampaignOutput, error) { - req, out := c.UpdateCampaignRequest(input) - return out, req.Send() -} - -// UpdateCampaignWithContext is the same as UpdateCampaign with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCampaign for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateCampaignWithContext(ctx aws.Context, input *UpdateCampaignInput, opts ...request.Option) (*UpdateCampaignOutput, error) { - req, out := c.UpdateCampaignRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateEmailChannel = "UpdateEmailChannel" - -// UpdateEmailChannelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateEmailChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateEmailChannel for more information on using the UpdateEmailChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateEmailChannelRequest method. -// req, resp := client.UpdateEmailChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEmailChannel -func (c *Pinpoint) UpdateEmailChannelRequest(input *UpdateEmailChannelInput) (req *request.Request, output *UpdateEmailChannelOutput) { - op := &request.Operation{ - Name: opUpdateEmailChannel, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/channels/email", - } - - if input == nil { - input = &UpdateEmailChannelInput{} - } - - output = &UpdateEmailChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateEmailChannel API operation for Amazon Pinpoint. -// -// Update an email channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateEmailChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEmailChannel -func (c *Pinpoint) UpdateEmailChannel(input *UpdateEmailChannelInput) (*UpdateEmailChannelOutput, error) { - req, out := c.UpdateEmailChannelRequest(input) - return out, req.Send() -} - -// UpdateEmailChannelWithContext is the same as UpdateEmailChannel with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateEmailChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateEmailChannelWithContext(ctx aws.Context, input *UpdateEmailChannelInput, opts ...request.Option) (*UpdateEmailChannelOutput, error) { - req, out := c.UpdateEmailChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateEndpoint = "UpdateEndpoint" - -// UpdateEndpointRequest generates a "aws/request.Request" representing the -// client's request for the UpdateEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateEndpoint for more information on using the UpdateEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateEndpointRequest method. -// req, resp := client.UpdateEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpoint -func (c *Pinpoint) UpdateEndpointRequest(input *UpdateEndpointInput) (req *request.Request, output *UpdateEndpointOutput) { - op := &request.Operation{ - Name: opUpdateEndpoint, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/endpoints/{endpoint-id}", - } - - if input == nil { - input = &UpdateEndpointInput{} - } - - output = &UpdateEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateEndpoint API operation for Amazon Pinpoint. -// -// Creates or updates an endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpoint -func (c *Pinpoint) UpdateEndpoint(input *UpdateEndpointInput) (*UpdateEndpointOutput, error) { - req, out := c.UpdateEndpointRequest(input) - return out, req.Send() -} - -// UpdateEndpointWithContext is the same as UpdateEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateEndpointWithContext(ctx aws.Context, input *UpdateEndpointInput, opts ...request.Option) (*UpdateEndpointOutput, error) { - req, out := c.UpdateEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateEndpointsBatch = "UpdateEndpointsBatch" - -// UpdateEndpointsBatchRequest generates a "aws/request.Request" representing the -// client's request for the UpdateEndpointsBatch operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateEndpointsBatch for more information on using the UpdateEndpointsBatch -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateEndpointsBatchRequest method. -// req, resp := client.UpdateEndpointsBatchRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpointsBatch -func (c *Pinpoint) UpdateEndpointsBatchRequest(input *UpdateEndpointsBatchInput) (req *request.Request, output *UpdateEndpointsBatchOutput) { - op := &request.Operation{ - Name: opUpdateEndpointsBatch, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/endpoints", - } - - if input == nil { - input = &UpdateEndpointsBatchInput{} - } - - output = &UpdateEndpointsBatchOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateEndpointsBatch API operation for Amazon Pinpoint. -// -// Use to update a batch of endpoints. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateEndpointsBatch for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpointsBatch -func (c *Pinpoint) UpdateEndpointsBatch(input *UpdateEndpointsBatchInput) (*UpdateEndpointsBatchOutput, error) { - req, out := c.UpdateEndpointsBatchRequest(input) - return out, req.Send() -} - -// UpdateEndpointsBatchWithContext is the same as UpdateEndpointsBatch with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateEndpointsBatch for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateEndpointsBatchWithContext(ctx aws.Context, input *UpdateEndpointsBatchInput, opts ...request.Option) (*UpdateEndpointsBatchOutput, error) { - req, out := c.UpdateEndpointsBatchRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateGcmChannel = "UpdateGcmChannel" - -// UpdateGcmChannelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateGcmChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateGcmChannel for more information on using the UpdateGcmChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateGcmChannelRequest method. -// req, resp := client.UpdateGcmChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateGcmChannel -func (c *Pinpoint) UpdateGcmChannelRequest(input *UpdateGcmChannelInput) (req *request.Request, output *UpdateGcmChannelOutput) { - op := &request.Operation{ - Name: opUpdateGcmChannel, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/channels/gcm", - } - - if input == nil { - input = &UpdateGcmChannelInput{} - } - - output = &UpdateGcmChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateGcmChannel API operation for Amazon Pinpoint. -// -// Use to update the GCM channel for an app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateGcmChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateGcmChannel -func (c *Pinpoint) UpdateGcmChannel(input *UpdateGcmChannelInput) (*UpdateGcmChannelOutput, error) { - req, out := c.UpdateGcmChannelRequest(input) - return out, req.Send() -} - -// UpdateGcmChannelWithContext is the same as UpdateGcmChannel with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateGcmChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateGcmChannelWithContext(ctx aws.Context, input *UpdateGcmChannelInput, opts ...request.Option) (*UpdateGcmChannelOutput, error) { - req, out := c.UpdateGcmChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSegment = "UpdateSegment" - -// UpdateSegmentRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSegment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSegment for more information on using the UpdateSegment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSegmentRequest method. -// req, resp := client.UpdateSegmentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSegment -func (c *Pinpoint) UpdateSegmentRequest(input *UpdateSegmentInput) (req *request.Request, output *UpdateSegmentOutput) { - op := &request.Operation{ - Name: opUpdateSegment, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}", - } - - if input == nil { - input = &UpdateSegmentInput{} - } - - output = &UpdateSegmentOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSegment API operation for Amazon Pinpoint. -// -// Used to update a segment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateSegment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSegment -func (c *Pinpoint) UpdateSegment(input *UpdateSegmentInput) (*UpdateSegmentOutput, error) { - req, out := c.UpdateSegmentRequest(input) - return out, req.Send() -} - -// UpdateSegmentWithContext is the same as UpdateSegment with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSegment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateSegmentWithContext(ctx aws.Context, input *UpdateSegmentInput, opts ...request.Option) (*UpdateSegmentOutput, error) { - req, out := c.UpdateSegmentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSmsChannel = "UpdateSmsChannel" - -// UpdateSmsChannelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSmsChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSmsChannel for more information on using the UpdateSmsChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSmsChannelRequest method. -// req, resp := client.UpdateSmsChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSmsChannel -func (c *Pinpoint) UpdateSmsChannelRequest(input *UpdateSmsChannelInput) (req *request.Request, output *UpdateSmsChannelOutput) { - op := &request.Operation{ - Name: opUpdateSmsChannel, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/channels/sms", - } - - if input == nil { - input = &UpdateSmsChannelInput{} - } - - output = &UpdateSmsChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSmsChannel API operation for Amazon Pinpoint. -// -// Update an SMS channel. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateSmsChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSmsChannel -func (c *Pinpoint) UpdateSmsChannel(input *UpdateSmsChannelInput) (*UpdateSmsChannelOutput, error) { - req, out := c.UpdateSmsChannelRequest(input) - return out, req.Send() -} - -// UpdateSmsChannelWithContext is the same as UpdateSmsChannel with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSmsChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateSmsChannelWithContext(ctx aws.Context, input *UpdateSmsChannelInput, opts ...request.Option) (*UpdateSmsChannelOutput, error) { - req, out := c.UpdateSmsChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateVoiceChannel = "UpdateVoiceChannel" - -// UpdateVoiceChannelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateVoiceChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateVoiceChannel for more information on using the UpdateVoiceChannel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateVoiceChannelRequest method. -// req, resp := client.UpdateVoiceChannelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateVoiceChannel -func (c *Pinpoint) UpdateVoiceChannelRequest(input *UpdateVoiceChannelInput) (req *request.Request, output *UpdateVoiceChannelOutput) { - op := &request.Operation{ - Name: opUpdateVoiceChannel, - HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/channels/voice", - } - - if input == nil { - input = &UpdateVoiceChannelInput{} - } - - output = &UpdateVoiceChannelOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateVoiceChannel API operation for Amazon Pinpoint. -// -// Update an Voice channel -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateVoiceChannel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// Simple message object. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// Simple message object. -// -// * ErrCodeForbiddenException "ForbiddenException" -// Simple message object. -// -// * ErrCodeNotFoundException "NotFoundException" -// Simple message object. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// Simple message object. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Simple message object. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateVoiceChannel -func (c *Pinpoint) UpdateVoiceChannel(input *UpdateVoiceChannelInput) (*UpdateVoiceChannelOutput, error) { - req, out := c.UpdateVoiceChannelRequest(input) - return out, req.Send() -} - -// UpdateVoiceChannelWithContext is the same as UpdateVoiceChannel with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateVoiceChannel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pinpoint) UpdateVoiceChannelWithContext(ctx aws.Context, input *UpdateVoiceChannelInput, opts ...request.Option) (*UpdateVoiceChannelOutput, error) { - req, out := c.UpdateVoiceChannelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Amazon Device Messaging channel definition. -type ADMChannelRequest struct { - _ struct{} `type:"structure"` - - // The Client ID that you obtained from the Amazon App Distribution Portal. - ClientId *string `type:"string"` - - // The Client Secret that you obtained from the Amazon App Distribution Portal. - ClientSecret *string `type:"string"` - - // Indicates whether or not the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s ADMChannelRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ADMChannelRequest) GoString() string { - return s.String() -} - -// SetClientId sets the ClientId field's value. -func (s *ADMChannelRequest) SetClientId(v string) *ADMChannelRequest { - s.ClientId = &v - return s -} - -// SetClientSecret sets the ClientSecret field's value. -func (s *ADMChannelRequest) SetClientSecret(v string) *ADMChannelRequest { - s.ClientSecret = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *ADMChannelRequest) SetEnabled(v bool) *ADMChannelRequest { - s.Enabled = &v - return s -} - -// Amazon Device Messaging channel definition. -type ADMChannelResponse struct { - _ struct{} `type:"structure"` - - // The ID of the application to which the channel applies. - ApplicationId *string `type:"string"` - - // The date and time when this channel was created. - CreationDate *string `type:"string"` - - // Indicates whether or not the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // Not used. Retained for backwards compatibility. - HasCredential *bool `type:"boolean"` - - // (Deprecated) An identifier for the channel. Retained for backwards compatibility. - Id *string `type:"string"` - - // Indicates whether or not the channel is archived. - IsArchived *bool `type:"boolean"` - - // The user who last updated this channel. - LastModifiedBy *string `type:"string"` - - // The date and time when this channel was last modified. - LastModifiedDate *string `type:"string"` - - // The platform type. For this channel, the value is always "ADM." - Platform *string `type:"string"` - - // The channel version. - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s ADMChannelResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ADMChannelResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *ADMChannelResponse) SetApplicationId(v string) *ADMChannelResponse { - s.ApplicationId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *ADMChannelResponse) SetCreationDate(v string) *ADMChannelResponse { - s.CreationDate = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *ADMChannelResponse) SetEnabled(v bool) *ADMChannelResponse { - s.Enabled = &v - return s -} - -// SetHasCredential sets the HasCredential field's value. -func (s *ADMChannelResponse) SetHasCredential(v bool) *ADMChannelResponse { - s.HasCredential = &v - return s -} - -// SetId sets the Id field's value. -func (s *ADMChannelResponse) SetId(v string) *ADMChannelResponse { - s.Id = &v - return s -} - -// SetIsArchived sets the IsArchived field's value. -func (s *ADMChannelResponse) SetIsArchived(v bool) *ADMChannelResponse { - s.IsArchived = &v - return s -} - -// SetLastModifiedBy sets the LastModifiedBy field's value. -func (s *ADMChannelResponse) SetLastModifiedBy(v string) *ADMChannelResponse { - s.LastModifiedBy = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *ADMChannelResponse) SetLastModifiedDate(v string) *ADMChannelResponse { - s.LastModifiedDate = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *ADMChannelResponse) SetPlatform(v string) *ADMChannelResponse { - s.Platform = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *ADMChannelResponse) SetVersion(v int64) *ADMChannelResponse { - s.Version = &v - return s -} - -// ADM Message. -type ADMMessage struct { - _ struct{} `type:"structure"` - - // The action that occurs if the user taps a push notification delivered by - // the campaign: OPEN_APP - Your app launches, or it becomes the foreground - // app if it has been sent to the background. This is the default action. DEEP_LINK - // - Uses deep linking features in iOS and Android to open your app and display - // a designated user interface within the app. URL - The default mobile browser - // on the user's device launches and opens a web page at the URL you specify. - // Possible values include: OPEN_APP | DEEP_LINK | URL - Action *string `type:"string" enum:"Action"` - - // The message body of the notification. - Body *string `type:"string"` - - // Optional. Arbitrary string used to indicate multiple messages are logically - // the same and that ADM is allowed to drop previously enqueued messages in - // favor of this one. - ConsolidationKey *string `type:"string"` - - // The data payload used for a silent push. This payload is added to the notifications' - // data.pinpoint.jsonBody' object - Data map[string]*string `type:"map"` - - // Optional. Number of seconds ADM should retain the message if the device is - // offline - ExpiresAfter *string `type:"string"` - - // The icon image name of the asset saved in your application. - IconReference *string `type:"string"` - - // The URL that points to an image used as the large icon to the notification - // content view. - ImageIconUrl *string `type:"string"` - - // The URL that points to an image used in the push notification. - ImageUrl *string `type:"string"` - - // Optional. Base-64-encoded MD5 checksum of the data parameter. Used to verify - // data integrity - MD5 *string `type:"string"` - - // The Raw JSON formatted string to be used as the payload. This value overrides - // the message. - RawContent *string `type:"string"` - - // Indicates if the message should display on the users device. Silent pushes - // can be used for Remote Configuration and Phone Home use cases. - SilentPush *bool `type:"boolean"` - - // The URL that points to an image used as the small icon for the notification - // which will be used to represent the notification in the status bar and content - // view - SmallImageIconUrl *string `type:"string"` - - // Indicates a sound to play when the device receives the notification. Supports - // default, or the filename of a sound resource bundled in the app. Android - // sound files must reside in /res/raw/ - Sound *string `type:"string"` - - // Default message substitutions. Can be overridden by individual address substitutions. - Substitutions map[string][]*string `type:"map"` - - // The message title that displays above the message on the user's device. - Title *string `type:"string"` - - // The URL to open in the user's mobile browser. Used if the value for Action - // is URL. - Url *string `type:"string"` -} - -// String returns the string representation -func (s ADMMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ADMMessage) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *ADMMessage) SetAction(v string) *ADMMessage { - s.Action = &v - return s -} - -// SetBody sets the Body field's value. -func (s *ADMMessage) SetBody(v string) *ADMMessage { - s.Body = &v - return s -} - -// SetConsolidationKey sets the ConsolidationKey field's value. -func (s *ADMMessage) SetConsolidationKey(v string) *ADMMessage { - s.ConsolidationKey = &v - return s -} - -// SetData sets the Data field's value. -func (s *ADMMessage) SetData(v map[string]*string) *ADMMessage { - s.Data = v - return s -} - -// SetExpiresAfter sets the ExpiresAfter field's value. -func (s *ADMMessage) SetExpiresAfter(v string) *ADMMessage { - s.ExpiresAfter = &v - return s -} - -// SetIconReference sets the IconReference field's value. -func (s *ADMMessage) SetIconReference(v string) *ADMMessage { - s.IconReference = &v - return s -} - -// SetImageIconUrl sets the ImageIconUrl field's value. -func (s *ADMMessage) SetImageIconUrl(v string) *ADMMessage { - s.ImageIconUrl = &v - return s -} - -// SetImageUrl sets the ImageUrl field's value. -func (s *ADMMessage) SetImageUrl(v string) *ADMMessage { - s.ImageUrl = &v - return s -} - -// SetMD5 sets the MD5 field's value. -func (s *ADMMessage) SetMD5(v string) *ADMMessage { - s.MD5 = &v - return s -} - -// SetRawContent sets the RawContent field's value. -func (s *ADMMessage) SetRawContent(v string) *ADMMessage { - s.RawContent = &v - return s -} - -// SetSilentPush sets the SilentPush field's value. -func (s *ADMMessage) SetSilentPush(v bool) *ADMMessage { - s.SilentPush = &v - return s -} - -// SetSmallImageIconUrl sets the SmallImageIconUrl field's value. -func (s *ADMMessage) SetSmallImageIconUrl(v string) *ADMMessage { - s.SmallImageIconUrl = &v - return s -} - -// SetSound sets the Sound field's value. -func (s *ADMMessage) SetSound(v string) *ADMMessage { - s.Sound = &v - return s -} - -// SetSubstitutions sets the Substitutions field's value. -func (s *ADMMessage) SetSubstitutions(v map[string][]*string) *ADMMessage { - s.Substitutions = v - return s -} - -// SetTitle sets the Title field's value. -func (s *ADMMessage) SetTitle(v string) *ADMMessage { - s.Title = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *ADMMessage) SetUrl(v string) *ADMMessage { - s.Url = &v - return s -} - -// Apple Push Notification Service channel definition. -type APNSChannelRequest struct { - _ struct{} `type:"structure"` - - // The bundle id used for APNs Tokens. - BundleId *string `type:"string"` - - // The distribution certificate from Apple. - Certificate *string `type:"string"` - - // The default authentication method used for APNs. - DefaultAuthenticationMethod *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // The certificate private key. - PrivateKey *string `type:"string"` - - // The team id used for APNs Tokens. - TeamId *string `type:"string"` - - // The token key used for APNs Tokens. - TokenKey *string `type:"string"` - - // The token key used for APNs Tokens. - TokenKeyId *string `type:"string"` -} - -// String returns the string representation -func (s APNSChannelRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s APNSChannelRequest) GoString() string { - return s.String() -} - -// SetBundleId sets the BundleId field's value. -func (s *APNSChannelRequest) SetBundleId(v string) *APNSChannelRequest { - s.BundleId = &v - return s -} - -// SetCertificate sets the Certificate field's value. -func (s *APNSChannelRequest) SetCertificate(v string) *APNSChannelRequest { - s.Certificate = &v - return s -} - -// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. -func (s *APNSChannelRequest) SetDefaultAuthenticationMethod(v string) *APNSChannelRequest { - s.DefaultAuthenticationMethod = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *APNSChannelRequest) SetEnabled(v bool) *APNSChannelRequest { - s.Enabled = &v - return s -} - -// SetPrivateKey sets the PrivateKey field's value. -func (s *APNSChannelRequest) SetPrivateKey(v string) *APNSChannelRequest { - s.PrivateKey = &v - return s -} - -// SetTeamId sets the TeamId field's value. -func (s *APNSChannelRequest) SetTeamId(v string) *APNSChannelRequest { - s.TeamId = &v - return s -} - -// SetTokenKey sets the TokenKey field's value. -func (s *APNSChannelRequest) SetTokenKey(v string) *APNSChannelRequest { - s.TokenKey = &v - return s -} - -// SetTokenKeyId sets the TokenKeyId field's value. -func (s *APNSChannelRequest) SetTokenKeyId(v string) *APNSChannelRequest { - s.TokenKeyId = &v - return s -} - -// Apple Distribution Push Notification Service channel definition. -type APNSChannelResponse struct { - _ struct{} `type:"structure"` - - // The ID of the application that the channel applies to. - ApplicationId *string `type:"string"` - - // The date and time when this channel was created. - CreationDate *string `type:"string"` - - // The default authentication method used for APNs. - DefaultAuthenticationMethod *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // Not used. Retained for backwards compatibility. - HasCredential *bool `type:"boolean"` - - // Indicates whether the channel is configured with a key for APNs token authentication. - // Provide a token key by setting the TokenKey attribute. - HasTokenKey *bool `type:"boolean"` - - // (Deprecated) An identifier for the channel. Retained for backwards compatibility. - Id *string `type:"string"` - - // Indicates whether or not the channel is archived. - IsArchived *bool `type:"boolean"` - - // The user who last updated this channel. - LastModifiedBy *string `type:"string"` - - // The date and time when this channel was last modified. - LastModifiedDate *string `type:"string"` - - // The platform type. For this channel, the value is always "ADM." - Platform *string `type:"string"` - - // The channel version. - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s APNSChannelResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s APNSChannelResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *APNSChannelResponse) SetApplicationId(v string) *APNSChannelResponse { - s.ApplicationId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *APNSChannelResponse) SetCreationDate(v string) *APNSChannelResponse { - s.CreationDate = &v - return s -} - -// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. -func (s *APNSChannelResponse) SetDefaultAuthenticationMethod(v string) *APNSChannelResponse { - s.DefaultAuthenticationMethod = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *APNSChannelResponse) SetEnabled(v bool) *APNSChannelResponse { - s.Enabled = &v - return s -} - -// SetHasCredential sets the HasCredential field's value. -func (s *APNSChannelResponse) SetHasCredential(v bool) *APNSChannelResponse { - s.HasCredential = &v - return s -} - -// SetHasTokenKey sets the HasTokenKey field's value. -func (s *APNSChannelResponse) SetHasTokenKey(v bool) *APNSChannelResponse { - s.HasTokenKey = &v - return s -} - -// SetId sets the Id field's value. -func (s *APNSChannelResponse) SetId(v string) *APNSChannelResponse { - s.Id = &v - return s -} - -// SetIsArchived sets the IsArchived field's value. -func (s *APNSChannelResponse) SetIsArchived(v bool) *APNSChannelResponse { - s.IsArchived = &v - return s -} - -// SetLastModifiedBy sets the LastModifiedBy field's value. -func (s *APNSChannelResponse) SetLastModifiedBy(v string) *APNSChannelResponse { - s.LastModifiedBy = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *APNSChannelResponse) SetLastModifiedDate(v string) *APNSChannelResponse { - s.LastModifiedDate = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *APNSChannelResponse) SetPlatform(v string) *APNSChannelResponse { - s.Platform = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *APNSChannelResponse) SetVersion(v int64) *APNSChannelResponse { - s.Version = &v - return s -} - -// APNS Message. -type APNSMessage struct { - _ struct{} `type:"structure"` - - // The action that occurs if the user taps a push notification delivered by - // the campaign: OPEN_APP - Your app launches, or it becomes the foreground - // app if it has been sent to the background. This is the default action. DEEP_LINK - // - Uses deep linking features in iOS and Android to open your app and display - // a designated user interface within the app. URL - The default mobile browser - // on the user's device launches and opens a web page at the URL you specify. - // Possible values include: OPEN_APP | DEEP_LINK | URL - Action *string `type:"string" enum:"Action"` - - // Include this key when you want the system to modify the badge of your app - // icon. If this key is not included in the dictionary, the badge is not changed. - // To remove the badge, set the value of this key to 0. - Badge *int64 `type:"integer"` - - // The message body of the notification. - Body *string `type:"string"` - - // Provide this key with a string value that represents the notification's type. - // This value corresponds to the value in the identifier property of one of - // your app's registered categories. - Category *string `type:"string"` - - // An ID that, if assigned to multiple messages, causes APNs to coalesce the - // messages into a single push notification instead of delivering each message - // individually. The value must not exceed 64 bytes. Amazon Pinpoint uses this - // value to set the apns-collapse-id request header when it sends the message - // to APNs. - CollapseId *string `type:"string"` - - // The data payload used for a silent push. This payload is added to the notifications' - // data.pinpoint.jsonBody' object - Data map[string]*string `type:"map"` - - // A URL that refers to the location of an image or video that you want to display - // in the push notification. - MediaUrl *string `type:"string"` - - // The preferred authentication method, either "CERTIFICATE" or "TOKEN" - PreferredAuthenticationMethod *string `type:"string"` - - // The message priority. Amazon Pinpoint uses this value to set the apns-priority - // request header when it sends the message to APNs. Accepts the following values:"5" - // - Low priority. Messages might be delayed, delivered in groups, and throttled."10" - // - High priority. Messages are sent immediately. High priority messages must - // cause an alert, sound, or badge on the receiving device.The default value - // is "10".The equivalent values for FCM or GCM messages are "normal" and "high". - // Amazon Pinpoint accepts these values for APNs messages and converts them.For - // more information about the apns-priority parameter, see Communicating with - // APNs in the APNs Local and Remote Notification Programming Guide. - Priority *string `type:"string"` - - // The Raw JSON formatted string to be used as the payload. This value overrides - // the message. - RawContent *string `type:"string"` - - // Indicates if the message should display on the users device. Silent pushes - // can be used for Remote Configuration and Phone Home use cases. - SilentPush *bool `type:"boolean"` - - // Include this key when you want the system to play a sound. The value of this - // key is the name of a sound file in your app's main bundle or in the Library/Sounds - // folder of your app's data container. If the sound file cannot be found, or - // if you specify defaultfor the value, the system plays the default alert sound. - Sound *string `type:"string"` - - // Default message substitutions. Can be overridden by individual address substitutions. - Substitutions map[string][]*string `type:"map"` - - // Provide this key with a string value that represents the app-specific identifier - // for grouping notifications. If you provide a Notification Content app extension, - // you can use this value to group your notifications together. - ThreadId *string `type:"string"` - - // The length of time (in seconds) that APNs stores and attempts to deliver - // the message. If the value is 0, APNs does not store the message or attempt - // to deliver it more than once. Amazon Pinpoint uses this value to set the - // apns-expiration request header when it sends the message to APNs. - TimeToLive *int64 `type:"integer"` - - // The message title that displays above the message on the user's device. - Title *string `type:"string"` - - // The URL to open in the user's mobile browser. Used if the value for Action - // is URL. - Url *string `type:"string"` -} - -// String returns the string representation -func (s APNSMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s APNSMessage) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *APNSMessage) SetAction(v string) *APNSMessage { - s.Action = &v - return s -} - -// SetBadge sets the Badge field's value. -func (s *APNSMessage) SetBadge(v int64) *APNSMessage { - s.Badge = &v - return s -} - -// SetBody sets the Body field's value. -func (s *APNSMessage) SetBody(v string) *APNSMessage { - s.Body = &v - return s -} - -// SetCategory sets the Category field's value. -func (s *APNSMessage) SetCategory(v string) *APNSMessage { - s.Category = &v - return s -} - -// SetCollapseId sets the CollapseId field's value. -func (s *APNSMessage) SetCollapseId(v string) *APNSMessage { - s.CollapseId = &v - return s -} - -// SetData sets the Data field's value. -func (s *APNSMessage) SetData(v map[string]*string) *APNSMessage { - s.Data = v - return s -} - -// SetMediaUrl sets the MediaUrl field's value. -func (s *APNSMessage) SetMediaUrl(v string) *APNSMessage { - s.MediaUrl = &v - return s -} - -// SetPreferredAuthenticationMethod sets the PreferredAuthenticationMethod field's value. -func (s *APNSMessage) SetPreferredAuthenticationMethod(v string) *APNSMessage { - s.PreferredAuthenticationMethod = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *APNSMessage) SetPriority(v string) *APNSMessage { - s.Priority = &v - return s -} - -// SetRawContent sets the RawContent field's value. -func (s *APNSMessage) SetRawContent(v string) *APNSMessage { - s.RawContent = &v - return s -} - -// SetSilentPush sets the SilentPush field's value. -func (s *APNSMessage) SetSilentPush(v bool) *APNSMessage { - s.SilentPush = &v - return s -} - -// SetSound sets the Sound field's value. -func (s *APNSMessage) SetSound(v string) *APNSMessage { - s.Sound = &v - return s -} - -// SetSubstitutions sets the Substitutions field's value. -func (s *APNSMessage) SetSubstitutions(v map[string][]*string) *APNSMessage { - s.Substitutions = v - return s -} - -// SetThreadId sets the ThreadId field's value. -func (s *APNSMessage) SetThreadId(v string) *APNSMessage { - s.ThreadId = &v - return s -} - -// SetTimeToLive sets the TimeToLive field's value. -func (s *APNSMessage) SetTimeToLive(v int64) *APNSMessage { - s.TimeToLive = &v - return s -} - -// SetTitle sets the Title field's value. -func (s *APNSMessage) SetTitle(v string) *APNSMessage { - s.Title = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *APNSMessage) SetUrl(v string) *APNSMessage { - s.Url = &v - return s -} - -// Apple Development Push Notification Service channel definition. -type APNSSandboxChannelRequest struct { - _ struct{} `type:"structure"` - - // The bundle id used for APNs Tokens. - BundleId *string `type:"string"` - - // The distribution certificate from Apple. - Certificate *string `type:"string"` - - // The default authentication method used for APNs. - DefaultAuthenticationMethod *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // The certificate private key. - PrivateKey *string `type:"string"` - - // The team id used for APNs Tokens. - TeamId *string `type:"string"` - - // The token key used for APNs Tokens. - TokenKey *string `type:"string"` - - // The token key used for APNs Tokens. - TokenKeyId *string `type:"string"` -} - -// String returns the string representation -func (s APNSSandboxChannelRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s APNSSandboxChannelRequest) GoString() string { - return s.String() -} - -// SetBundleId sets the BundleId field's value. -func (s *APNSSandboxChannelRequest) SetBundleId(v string) *APNSSandboxChannelRequest { - s.BundleId = &v - return s -} - -// SetCertificate sets the Certificate field's value. -func (s *APNSSandboxChannelRequest) SetCertificate(v string) *APNSSandboxChannelRequest { - s.Certificate = &v - return s -} - -// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. -func (s *APNSSandboxChannelRequest) SetDefaultAuthenticationMethod(v string) *APNSSandboxChannelRequest { - s.DefaultAuthenticationMethod = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *APNSSandboxChannelRequest) SetEnabled(v bool) *APNSSandboxChannelRequest { - s.Enabled = &v - return s -} - -// SetPrivateKey sets the PrivateKey field's value. -func (s *APNSSandboxChannelRequest) SetPrivateKey(v string) *APNSSandboxChannelRequest { - s.PrivateKey = &v - return s -} - -// SetTeamId sets the TeamId field's value. -func (s *APNSSandboxChannelRequest) SetTeamId(v string) *APNSSandboxChannelRequest { - s.TeamId = &v - return s -} - -// SetTokenKey sets the TokenKey field's value. -func (s *APNSSandboxChannelRequest) SetTokenKey(v string) *APNSSandboxChannelRequest { - s.TokenKey = &v - return s -} - -// SetTokenKeyId sets the TokenKeyId field's value. -func (s *APNSSandboxChannelRequest) SetTokenKeyId(v string) *APNSSandboxChannelRequest { - s.TokenKeyId = &v - return s -} - -// Apple Development Push Notification Service channel definition. -type APNSSandboxChannelResponse struct { - _ struct{} `type:"structure"` - - // The ID of the application to which the channel applies. - ApplicationId *string `type:"string"` - - // When was this segment created - CreationDate *string `type:"string"` - - // The default authentication method used for APNs. - DefaultAuthenticationMethod *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // Not used. Retained for backwards compatibility. - HasCredential *bool `type:"boolean"` - - // Indicates whether the channel is configured with a key for APNs token authentication. - // Provide a token key by setting the TokenKey attribute. - HasTokenKey *bool `type:"boolean"` - - // Channel ID. Not used, only for backwards compatibility. - Id *string `type:"string"` - - // Is this channel archived - IsArchived *bool `type:"boolean"` - - // Who last updated this entry - LastModifiedBy *string `type:"string"` - - // Last date this was updated - LastModifiedDate *string `type:"string"` - - // The platform type. Will be APNS_SANDBOX. - Platform *string `type:"string"` - - // Version of channel - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s APNSSandboxChannelResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s APNSSandboxChannelResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *APNSSandboxChannelResponse) SetApplicationId(v string) *APNSSandboxChannelResponse { - s.ApplicationId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *APNSSandboxChannelResponse) SetCreationDate(v string) *APNSSandboxChannelResponse { - s.CreationDate = &v - return s -} - -// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. -func (s *APNSSandboxChannelResponse) SetDefaultAuthenticationMethod(v string) *APNSSandboxChannelResponse { - s.DefaultAuthenticationMethod = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *APNSSandboxChannelResponse) SetEnabled(v bool) *APNSSandboxChannelResponse { - s.Enabled = &v - return s -} - -// SetHasCredential sets the HasCredential field's value. -func (s *APNSSandboxChannelResponse) SetHasCredential(v bool) *APNSSandboxChannelResponse { - s.HasCredential = &v - return s -} - -// SetHasTokenKey sets the HasTokenKey field's value. -func (s *APNSSandboxChannelResponse) SetHasTokenKey(v bool) *APNSSandboxChannelResponse { - s.HasTokenKey = &v - return s -} - -// SetId sets the Id field's value. -func (s *APNSSandboxChannelResponse) SetId(v string) *APNSSandboxChannelResponse { - s.Id = &v - return s -} - -// SetIsArchived sets the IsArchived field's value. -func (s *APNSSandboxChannelResponse) SetIsArchived(v bool) *APNSSandboxChannelResponse { - s.IsArchived = &v - return s -} - -// SetLastModifiedBy sets the LastModifiedBy field's value. -func (s *APNSSandboxChannelResponse) SetLastModifiedBy(v string) *APNSSandboxChannelResponse { - s.LastModifiedBy = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *APNSSandboxChannelResponse) SetLastModifiedDate(v string) *APNSSandboxChannelResponse { - s.LastModifiedDate = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *APNSSandboxChannelResponse) SetPlatform(v string) *APNSSandboxChannelResponse { - s.Platform = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *APNSSandboxChannelResponse) SetVersion(v int64) *APNSSandboxChannelResponse { - s.Version = &v - return s -} - -// Apple VoIP Push Notification Service channel definition. -type APNSVoipChannelRequest struct { - _ struct{} `type:"structure"` - - // The bundle id used for APNs Tokens. - BundleId *string `type:"string"` - - // The distribution certificate from Apple. - Certificate *string `type:"string"` - - // The default authentication method used for APNs. - DefaultAuthenticationMethod *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // The certificate private key. - PrivateKey *string `type:"string"` - - // The team id used for APNs Tokens. - TeamId *string `type:"string"` - - // The token key used for APNs Tokens. - TokenKey *string `type:"string"` - - // The token key used for APNs Tokens. - TokenKeyId *string `type:"string"` -} - -// String returns the string representation -func (s APNSVoipChannelRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s APNSVoipChannelRequest) GoString() string { - return s.String() -} - -// SetBundleId sets the BundleId field's value. -func (s *APNSVoipChannelRequest) SetBundleId(v string) *APNSVoipChannelRequest { - s.BundleId = &v - return s -} - -// SetCertificate sets the Certificate field's value. -func (s *APNSVoipChannelRequest) SetCertificate(v string) *APNSVoipChannelRequest { - s.Certificate = &v - return s -} - -// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. -func (s *APNSVoipChannelRequest) SetDefaultAuthenticationMethod(v string) *APNSVoipChannelRequest { - s.DefaultAuthenticationMethod = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *APNSVoipChannelRequest) SetEnabled(v bool) *APNSVoipChannelRequest { - s.Enabled = &v - return s -} - -// SetPrivateKey sets the PrivateKey field's value. -func (s *APNSVoipChannelRequest) SetPrivateKey(v string) *APNSVoipChannelRequest { - s.PrivateKey = &v - return s -} - -// SetTeamId sets the TeamId field's value. -func (s *APNSVoipChannelRequest) SetTeamId(v string) *APNSVoipChannelRequest { - s.TeamId = &v - return s -} - -// SetTokenKey sets the TokenKey field's value. -func (s *APNSVoipChannelRequest) SetTokenKey(v string) *APNSVoipChannelRequest { - s.TokenKey = &v - return s -} - -// SetTokenKeyId sets the TokenKeyId field's value. -func (s *APNSVoipChannelRequest) SetTokenKeyId(v string) *APNSVoipChannelRequest { - s.TokenKeyId = &v - return s -} - -// Apple VoIP Push Notification Service channel definition. -type APNSVoipChannelResponse struct { - _ struct{} `type:"structure"` - - // Application id - ApplicationId *string `type:"string"` - - // When was this segment created - CreationDate *string `type:"string"` - - // The default authentication method used for APNs. - DefaultAuthenticationMethod *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // Not used. Retained for backwards compatibility. - HasCredential *bool `type:"boolean"` - - // If the channel is registered with a token key for authentication. - HasTokenKey *bool `type:"boolean"` - - // Channel ID. Not used, only for backwards compatibility. - Id *string `type:"string"` - - // Is this channel archived - IsArchived *bool `type:"boolean"` - - // Who made the last change - LastModifiedBy *string `type:"string"` - - // Last date this was updated - LastModifiedDate *string `type:"string"` - - // The platform type. Will be APNS. - Platform *string `type:"string"` - - // Version of channel - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s APNSVoipChannelResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s APNSVoipChannelResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *APNSVoipChannelResponse) SetApplicationId(v string) *APNSVoipChannelResponse { - s.ApplicationId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *APNSVoipChannelResponse) SetCreationDate(v string) *APNSVoipChannelResponse { - s.CreationDate = &v - return s -} - -// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. -func (s *APNSVoipChannelResponse) SetDefaultAuthenticationMethod(v string) *APNSVoipChannelResponse { - s.DefaultAuthenticationMethod = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *APNSVoipChannelResponse) SetEnabled(v bool) *APNSVoipChannelResponse { - s.Enabled = &v - return s -} - -// SetHasCredential sets the HasCredential field's value. -func (s *APNSVoipChannelResponse) SetHasCredential(v bool) *APNSVoipChannelResponse { - s.HasCredential = &v - return s -} - -// SetHasTokenKey sets the HasTokenKey field's value. -func (s *APNSVoipChannelResponse) SetHasTokenKey(v bool) *APNSVoipChannelResponse { - s.HasTokenKey = &v - return s -} - -// SetId sets the Id field's value. -func (s *APNSVoipChannelResponse) SetId(v string) *APNSVoipChannelResponse { - s.Id = &v - return s -} - -// SetIsArchived sets the IsArchived field's value. -func (s *APNSVoipChannelResponse) SetIsArchived(v bool) *APNSVoipChannelResponse { - s.IsArchived = &v - return s -} - -// SetLastModifiedBy sets the LastModifiedBy field's value. -func (s *APNSVoipChannelResponse) SetLastModifiedBy(v string) *APNSVoipChannelResponse { - s.LastModifiedBy = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *APNSVoipChannelResponse) SetLastModifiedDate(v string) *APNSVoipChannelResponse { - s.LastModifiedDate = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *APNSVoipChannelResponse) SetPlatform(v string) *APNSVoipChannelResponse { - s.Platform = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *APNSVoipChannelResponse) SetVersion(v int64) *APNSVoipChannelResponse { - s.Version = &v - return s -} - -// Apple VoIP Developer Push Notification Service channel definition. -type APNSVoipSandboxChannelRequest struct { - _ struct{} `type:"structure"` - - // The bundle id used for APNs Tokens. - BundleId *string `type:"string"` - - // The distribution certificate from Apple. - Certificate *string `type:"string"` - - // The default authentication method used for APNs. - DefaultAuthenticationMethod *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // The certificate private key. - PrivateKey *string `type:"string"` - - // The team id used for APNs Tokens. - TeamId *string `type:"string"` - - // The token key used for APNs Tokens. - TokenKey *string `type:"string"` - - // The token key used for APNs Tokens. - TokenKeyId *string `type:"string"` -} - -// String returns the string representation -func (s APNSVoipSandboxChannelRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s APNSVoipSandboxChannelRequest) GoString() string { - return s.String() -} - -// SetBundleId sets the BundleId field's value. -func (s *APNSVoipSandboxChannelRequest) SetBundleId(v string) *APNSVoipSandboxChannelRequest { - s.BundleId = &v - return s -} - -// SetCertificate sets the Certificate field's value. -func (s *APNSVoipSandboxChannelRequest) SetCertificate(v string) *APNSVoipSandboxChannelRequest { - s.Certificate = &v - return s -} - -// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. -func (s *APNSVoipSandboxChannelRequest) SetDefaultAuthenticationMethod(v string) *APNSVoipSandboxChannelRequest { - s.DefaultAuthenticationMethod = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *APNSVoipSandboxChannelRequest) SetEnabled(v bool) *APNSVoipSandboxChannelRequest { - s.Enabled = &v - return s -} - -// SetPrivateKey sets the PrivateKey field's value. -func (s *APNSVoipSandboxChannelRequest) SetPrivateKey(v string) *APNSVoipSandboxChannelRequest { - s.PrivateKey = &v - return s -} - -// SetTeamId sets the TeamId field's value. -func (s *APNSVoipSandboxChannelRequest) SetTeamId(v string) *APNSVoipSandboxChannelRequest { - s.TeamId = &v - return s -} - -// SetTokenKey sets the TokenKey field's value. -func (s *APNSVoipSandboxChannelRequest) SetTokenKey(v string) *APNSVoipSandboxChannelRequest { - s.TokenKey = &v - return s -} - -// SetTokenKeyId sets the TokenKeyId field's value. -func (s *APNSVoipSandboxChannelRequest) SetTokenKeyId(v string) *APNSVoipSandboxChannelRequest { - s.TokenKeyId = &v - return s -} - -// Apple VoIP Developer Push Notification Service channel definition. -type APNSVoipSandboxChannelResponse struct { - _ struct{} `type:"structure"` - - // Application id - ApplicationId *string `type:"string"` - - // When was this segment created - CreationDate *string `type:"string"` - - // The default authentication method used for APNs. - DefaultAuthenticationMethod *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // Not used. Retained for backwards compatibility. - HasCredential *bool `type:"boolean"` - - // If the channel is registered with a token key for authentication. - HasTokenKey *bool `type:"boolean"` - - // Channel ID. Not used, only for backwards compatibility. - Id *string `type:"string"` - - // Is this channel archived - IsArchived *bool `type:"boolean"` - - // Who made the last change - LastModifiedBy *string `type:"string"` - - // Last date this was updated - LastModifiedDate *string `type:"string"` - - // The platform type. Will be APNS. - Platform *string `type:"string"` - - // Version of channel - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s APNSVoipSandboxChannelResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s APNSVoipSandboxChannelResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *APNSVoipSandboxChannelResponse) SetApplicationId(v string) *APNSVoipSandboxChannelResponse { - s.ApplicationId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *APNSVoipSandboxChannelResponse) SetCreationDate(v string) *APNSVoipSandboxChannelResponse { - s.CreationDate = &v - return s -} - -// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. -func (s *APNSVoipSandboxChannelResponse) SetDefaultAuthenticationMethod(v string) *APNSVoipSandboxChannelResponse { - s.DefaultAuthenticationMethod = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *APNSVoipSandboxChannelResponse) SetEnabled(v bool) *APNSVoipSandboxChannelResponse { - s.Enabled = &v - return s -} - -// SetHasCredential sets the HasCredential field's value. -func (s *APNSVoipSandboxChannelResponse) SetHasCredential(v bool) *APNSVoipSandboxChannelResponse { - s.HasCredential = &v - return s -} - -// SetHasTokenKey sets the HasTokenKey field's value. -func (s *APNSVoipSandboxChannelResponse) SetHasTokenKey(v bool) *APNSVoipSandboxChannelResponse { - s.HasTokenKey = &v - return s -} - -// SetId sets the Id field's value. -func (s *APNSVoipSandboxChannelResponse) SetId(v string) *APNSVoipSandboxChannelResponse { - s.Id = &v - return s -} - -// SetIsArchived sets the IsArchived field's value. -func (s *APNSVoipSandboxChannelResponse) SetIsArchived(v bool) *APNSVoipSandboxChannelResponse { - s.IsArchived = &v - return s -} - -// SetLastModifiedBy sets the LastModifiedBy field's value. -func (s *APNSVoipSandboxChannelResponse) SetLastModifiedBy(v string) *APNSVoipSandboxChannelResponse { - s.LastModifiedBy = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *APNSVoipSandboxChannelResponse) SetLastModifiedDate(v string) *APNSVoipSandboxChannelResponse { - s.LastModifiedDate = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *APNSVoipSandboxChannelResponse) SetPlatform(v string) *APNSVoipSandboxChannelResponse { - s.Platform = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *APNSVoipSandboxChannelResponse) SetVersion(v int64) *APNSVoipSandboxChannelResponse { - s.Version = &v - return s -} - -// Activities for campaign. -type ActivitiesResponse struct { - _ struct{} `type:"structure"` - - // List of campaign activities - Item []*ActivityResponse `type:"list"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ActivitiesResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivitiesResponse) GoString() string { - return s.String() -} - -// SetItem sets the Item field's value. -func (s *ActivitiesResponse) SetItem(v []*ActivityResponse) *ActivitiesResponse { - s.Item = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ActivitiesResponse) SetNextToken(v string) *ActivitiesResponse { - s.NextToken = &v - return s -} - -// Activity definition -type ActivityResponse struct { - _ struct{} `type:"structure"` - - // The ID of the application to which the campaign applies. - ApplicationId *string `type:"string"` - - // The ID of the campaign to which the activity applies. - CampaignId *string `type:"string"` - - // The actual time the activity was marked CANCELLED or COMPLETED. Provided - // in ISO 8601 format. - End *string `type:"string"` - - // The unique activity ID. - Id *string `type:"string"` - - // Indicates whether the activity succeeded.Valid values: SUCCESS, FAIL - Result *string `type:"string"` - - // The scheduled start time for the activity in ISO 8601 format. - ScheduledStart *string `type:"string"` - - // The actual start time of the activity in ISO 8601 format. - Start *string `type:"string"` - - // The state of the activity.Valid values: PENDING, INITIALIZING, RUNNING, PAUSED, - // CANCELLED, COMPLETED - State *string `type:"string"` - - // The total number of endpoints to which the campaign successfully delivered - // messages. - SuccessfulEndpointCount *int64 `type:"integer"` - - // The total number of timezones completed. - TimezonesCompletedCount *int64 `type:"integer"` - - // The total number of unique timezones present in the segment. - TimezonesTotalCount *int64 `type:"integer"` - - // The total number of endpoints to which the campaign attempts to deliver messages. - TotalEndpointCount *int64 `type:"integer"` - - // The ID of a variation of the campaign used for A/B testing. - TreatmentId *string `type:"string"` -} - -// String returns the string representation -func (s ActivityResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *ActivityResponse) SetApplicationId(v string) *ActivityResponse { - s.ApplicationId = &v - return s -} - -// SetCampaignId sets the CampaignId field's value. -func (s *ActivityResponse) SetCampaignId(v string) *ActivityResponse { - s.CampaignId = &v - return s -} - -// SetEnd sets the End field's value. -func (s *ActivityResponse) SetEnd(v string) *ActivityResponse { - s.End = &v - return s -} - -// SetId sets the Id field's value. -func (s *ActivityResponse) SetId(v string) *ActivityResponse { - s.Id = &v - return s -} - -// SetResult sets the Result field's value. -func (s *ActivityResponse) SetResult(v string) *ActivityResponse { - s.Result = &v - return s -} - -// SetScheduledStart sets the ScheduledStart field's value. -func (s *ActivityResponse) SetScheduledStart(v string) *ActivityResponse { - s.ScheduledStart = &v - return s -} - -// SetStart sets the Start field's value. -func (s *ActivityResponse) SetStart(v string) *ActivityResponse { - s.Start = &v - return s -} - -// SetState sets the State field's value. -func (s *ActivityResponse) SetState(v string) *ActivityResponse { - s.State = &v - return s -} - -// SetSuccessfulEndpointCount sets the SuccessfulEndpointCount field's value. -func (s *ActivityResponse) SetSuccessfulEndpointCount(v int64) *ActivityResponse { - s.SuccessfulEndpointCount = &v - return s -} - -// SetTimezonesCompletedCount sets the TimezonesCompletedCount field's value. -func (s *ActivityResponse) SetTimezonesCompletedCount(v int64) *ActivityResponse { - s.TimezonesCompletedCount = &v - return s -} - -// SetTimezonesTotalCount sets the TimezonesTotalCount field's value. -func (s *ActivityResponse) SetTimezonesTotalCount(v int64) *ActivityResponse { - s.TimezonesTotalCount = &v - return s -} - -// SetTotalEndpointCount sets the TotalEndpointCount field's value. -func (s *ActivityResponse) SetTotalEndpointCount(v int64) *ActivityResponse { - s.TotalEndpointCount = &v - return s -} - -// SetTreatmentId sets the TreatmentId field's value. -func (s *ActivityResponse) SetTreatmentId(v string) *ActivityResponse { - s.TreatmentId = &v - return s -} - -// Address configuration. -type AddressConfiguration struct { - _ struct{} `type:"structure"` - - // Body override. If specified will override default body. - BodyOverride *string `type:"string"` - - // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX - // | ADM | SMS | EMAIL | BAIDU - ChannelType *string `type:"string" enum:"ChannelType"` - - // A map of custom attributes to attributes to be attached to the message for - // this address. This payload is added to the push notification's 'data.pinpoint' - // object or added to the email/sms delivery receipt event attributes. - Context map[string]*string `type:"map"` - - // The Raw JSON formatted string to be used as the payload. This value overrides - // the message. - RawContent *string `type:"string"` - - // A map of substitution values for the message to be merged with the DefaultMessage's - // substitutions. Substitutions on this map take precedence over the all other - // substitutions. - Substitutions map[string][]*string `type:"map"` - - // Title override. If specified will override default title if applicable. - TitleOverride *string `type:"string"` -} - -// String returns the string representation -func (s AddressConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddressConfiguration) GoString() string { - return s.String() -} - -// SetBodyOverride sets the BodyOverride field's value. -func (s *AddressConfiguration) SetBodyOverride(v string) *AddressConfiguration { - s.BodyOverride = &v - return s -} - -// SetChannelType sets the ChannelType field's value. -func (s *AddressConfiguration) SetChannelType(v string) *AddressConfiguration { - s.ChannelType = &v - return s -} - -// SetContext sets the Context field's value. -func (s *AddressConfiguration) SetContext(v map[string]*string) *AddressConfiguration { - s.Context = v - return s -} - -// SetRawContent sets the RawContent field's value. -func (s *AddressConfiguration) SetRawContent(v string) *AddressConfiguration { - s.RawContent = &v - return s -} - -// SetSubstitutions sets the Substitutions field's value. -func (s *AddressConfiguration) SetSubstitutions(v map[string][]*string) *AddressConfiguration { - s.Substitutions = v - return s -} - -// SetTitleOverride sets the TitleOverride field's value. -func (s *AddressConfiguration) SetTitleOverride(v string) *AddressConfiguration { - s.TitleOverride = &v - return s -} - -// Application Response. -type ApplicationResponse struct { - _ struct{} `type:"structure"` - - // The unique application ID. - Id *string `type:"string"` - - // The display name of the application. - Name *string `type:"string"` -} - -// String returns the string representation -func (s ApplicationResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationResponse) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *ApplicationResponse) SetId(v string) *ApplicationResponse { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *ApplicationResponse) SetName(v string) *ApplicationResponse { - s.Name = &v - return s -} - -// Application settings. -type ApplicationSettingsResource struct { - _ struct{} `type:"structure"` - - // The unique ID for the application. - ApplicationId *string `type:"string"` - - // Default campaign hook. - CampaignHook *CampaignHook `type:"structure"` - - // The date that the settings were last updated in ISO 8601 format. - LastModifiedDate *string `type:"string"` - - // The default campaign limits for the app. These limits apply to each campaign - // for the app, unless the campaign overrides the default with limits of its - // own. - Limits *CampaignLimits `type:"structure"` - - // The default quiet time for the app. Campaigns in the app don't send messages - // to endpoints during the quiet time.Note: Make sure that your endpoints include - // the Demographics.Timezone attribute if you plan to enable a quiet time for - // your app. If your endpoints don't include this attribute, they'll receive - // the messages that you send them, even if quiet time is enabled.When you set - // up an app to use quiet time, campaigns in that app don't send messages during - // the time range you specified, as long as all of the following are true:- - // The endpoint includes a valid Demographic.Timezone attribute.- The current - // time in the endpoint's time zone is later than or equal to the time specified - // in the QuietTime.Start attribute for the app (or campaign, if applicable).- - // The current time in the endpoint's time zone is earlier than or equal to - // the time specified in the QuietTime.End attribute for the app (or campaign, - // if applicable).Individual campaigns within the app can have their own quiet - // time settings, which override the quiet time settings at the app level. - QuietTime *QuietTime `type:"structure"` -} - -// String returns the string representation -func (s ApplicationSettingsResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationSettingsResource) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *ApplicationSettingsResource) SetApplicationId(v string) *ApplicationSettingsResource { - s.ApplicationId = &v - return s -} - -// SetCampaignHook sets the CampaignHook field's value. -func (s *ApplicationSettingsResource) SetCampaignHook(v *CampaignHook) *ApplicationSettingsResource { - s.CampaignHook = v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *ApplicationSettingsResource) SetLastModifiedDate(v string) *ApplicationSettingsResource { - s.LastModifiedDate = &v - return s -} - -// SetLimits sets the Limits field's value. -func (s *ApplicationSettingsResource) SetLimits(v *CampaignLimits) *ApplicationSettingsResource { - s.Limits = v - return s -} - -// SetQuietTime sets the QuietTime field's value. -func (s *ApplicationSettingsResource) SetQuietTime(v *QuietTime) *ApplicationSettingsResource { - s.QuietTime = v - return s -} - -// Get Applications Result. -type ApplicationsResponse struct { - _ struct{} `type:"structure"` - - // List of applications returned in this page. - Item []*ApplicationResponse `type:"list"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ApplicationsResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationsResponse) GoString() string { - return s.String() -} - -// SetItem sets the Item field's value. -func (s *ApplicationsResponse) SetItem(v []*ApplicationResponse) *ApplicationsResponse { - s.Item = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ApplicationsResponse) SetNextToken(v string) *ApplicationsResponse { - s.NextToken = &v - return s -} - -// Custom attibute dimension -type AttributeDimension struct { - _ struct{} `type:"structure"` - - // The type of dimension:INCLUSIVE - Endpoints that match the criteria are included - // in the segment.EXCLUSIVE - Endpoints that match the criteria are excluded - // from the segment. - AttributeType *string `type:"string" enum:"AttributeType"` - - // The criteria values for the segment dimension. Endpoints with matching attribute - // values are included or excluded from the segment, depending on the setting - // for Type. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s AttributeDimension) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttributeDimension) GoString() string { - return s.String() -} - -// SetAttributeType sets the AttributeType field's value. -func (s *AttributeDimension) SetAttributeType(v string) *AttributeDimension { - s.AttributeType = &v - return s -} - -// SetValues sets the Values field's value. -func (s *AttributeDimension) SetValues(v []*string) *AttributeDimension { - s.Values = v - return s -} - -// Attributes. -type AttributesResource struct { - _ struct{} `type:"structure"` - - // The unique ID for the application. - ApplicationId *string `type:"string"` - - // The attribute type for the application. - AttributeType *string `type:"string"` - - // The attributes for the application. - Attributes []*string `type:"list"` -} - -// String returns the string representation -func (s AttributesResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttributesResource) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *AttributesResource) SetApplicationId(v string) *AttributesResource { - s.ApplicationId = &v - return s -} - -// SetAttributeType sets the AttributeType field's value. -func (s *AttributesResource) SetAttributeType(v string) *AttributesResource { - s.AttributeType = &v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *AttributesResource) SetAttributes(v []*string) *AttributesResource { - s.Attributes = v - return s -} - -// Baidu Cloud Push credentials -type BaiduChannelRequest struct { - _ struct{} `type:"structure"` - - // Platform credential API key from Baidu. - ApiKey *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // Platform credential Secret key from Baidu. - SecretKey *string `type:"string"` -} - -// String returns the string representation -func (s BaiduChannelRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BaiduChannelRequest) GoString() string { - return s.String() -} - -// SetApiKey sets the ApiKey field's value. -func (s *BaiduChannelRequest) SetApiKey(v string) *BaiduChannelRequest { - s.ApiKey = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *BaiduChannelRequest) SetEnabled(v bool) *BaiduChannelRequest { - s.Enabled = &v - return s -} - -// SetSecretKey sets the SecretKey field's value. -func (s *BaiduChannelRequest) SetSecretKey(v string) *BaiduChannelRequest { - s.SecretKey = &v - return s -} - -// Baidu Cloud Messaging channel definition -type BaiduChannelResponse struct { - _ struct{} `type:"structure"` - - // Application id - ApplicationId *string `type:"string"` - - // When was this segment created - CreationDate *string `type:"string"` - - // The Baidu API key from Baidu. - Credential *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // Not used. Retained for backwards compatibility. - HasCredential *bool `type:"boolean"` - - // Channel ID. Not used, only for backwards compatibility. - Id *string `type:"string"` - - // Is this channel archived - IsArchived *bool `type:"boolean"` - - // Who made the last change - LastModifiedBy *string `type:"string"` - - // Last date this was updated - LastModifiedDate *string `type:"string"` - - // The platform type. Will be BAIDU - Platform *string `type:"string"` - - // Version of channel - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s BaiduChannelResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BaiduChannelResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *BaiduChannelResponse) SetApplicationId(v string) *BaiduChannelResponse { - s.ApplicationId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *BaiduChannelResponse) SetCreationDate(v string) *BaiduChannelResponse { - s.CreationDate = &v - return s -} - -// SetCredential sets the Credential field's value. -func (s *BaiduChannelResponse) SetCredential(v string) *BaiduChannelResponse { - s.Credential = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *BaiduChannelResponse) SetEnabled(v bool) *BaiduChannelResponse { - s.Enabled = &v - return s -} - -// SetHasCredential sets the HasCredential field's value. -func (s *BaiduChannelResponse) SetHasCredential(v bool) *BaiduChannelResponse { - s.HasCredential = &v - return s -} - -// SetId sets the Id field's value. -func (s *BaiduChannelResponse) SetId(v string) *BaiduChannelResponse { - s.Id = &v - return s -} - -// SetIsArchived sets the IsArchived field's value. -func (s *BaiduChannelResponse) SetIsArchived(v bool) *BaiduChannelResponse { - s.IsArchived = &v - return s -} - -// SetLastModifiedBy sets the LastModifiedBy field's value. -func (s *BaiduChannelResponse) SetLastModifiedBy(v string) *BaiduChannelResponse { - s.LastModifiedBy = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *BaiduChannelResponse) SetLastModifiedDate(v string) *BaiduChannelResponse { - s.LastModifiedDate = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *BaiduChannelResponse) SetPlatform(v string) *BaiduChannelResponse { - s.Platform = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *BaiduChannelResponse) SetVersion(v int64) *BaiduChannelResponse { - s.Version = &v - return s -} - -// Baidu Message. -type BaiduMessage struct { - _ struct{} `type:"structure"` - - // The action that occurs if the user taps a push notification delivered by - // the campaign: OPEN_APP - Your app launches, or it becomes the foreground - // app if it has been sent to the background. This is the default action. DEEP_LINK - // - Uses deep linking features in iOS and Android to open your app and display - // a designated user interface within the app. URL - The default mobile browser - // on the user's device launches and opens a web page at the URL you specify. - // Possible values include: OPEN_APP | DEEP_LINK | URL - Action *string `type:"string" enum:"Action"` - - // The message body of the notification. - Body *string `type:"string"` - - // The data payload used for a silent push. This payload is added to the notifications' - // data.pinpoint.jsonBody' object - Data map[string]*string `type:"map"` - - // The icon image name of the asset saved in your application. - IconReference *string `type:"string"` - - // The URL that points to an image used as the large icon to the notification - // content view. - ImageIconUrl *string `type:"string"` - - // The URL that points to an image used in the push notification. - ImageUrl *string `type:"string"` - - // The Raw JSON formatted string to be used as the payload. This value overrides - // the message. - RawContent *string `type:"string"` - - // Indicates if the message should display on the users device. Silent pushes - // can be used for Remote Configuration and Phone Home use cases. - SilentPush *bool `type:"boolean"` - - // The URL that points to an image used as the small icon for the notification - // which will be used to represent the notification in the status bar and content - // view - SmallImageIconUrl *string `type:"string"` - - // Indicates a sound to play when the device receives the notification. Supports - // default, or the filename of a sound resource bundled in the app. Android - // sound files must reside in /res/raw/ - Sound *string `type:"string"` - - // Default message substitutions. Can be overridden by individual address substitutions. - Substitutions map[string][]*string `type:"map"` - - // This parameter specifies how long (in seconds) the message should be kept - // in Baidu storage if the device is offline. The and the default value and - // the maximum time to live supported is 7 days (604800 seconds) - TimeToLive *int64 `type:"integer"` - - // The message title that displays above the message on the user's device. - Title *string `type:"string"` - - // The URL to open in the user's mobile browser. Used if the value for Action - // is URL. - Url *string `type:"string"` -} - -// String returns the string representation -func (s BaiduMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BaiduMessage) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *BaiduMessage) SetAction(v string) *BaiduMessage { - s.Action = &v - return s -} - -// SetBody sets the Body field's value. -func (s *BaiduMessage) SetBody(v string) *BaiduMessage { - s.Body = &v - return s -} - -// SetData sets the Data field's value. -func (s *BaiduMessage) SetData(v map[string]*string) *BaiduMessage { - s.Data = v - return s -} - -// SetIconReference sets the IconReference field's value. -func (s *BaiduMessage) SetIconReference(v string) *BaiduMessage { - s.IconReference = &v - return s -} - -// SetImageIconUrl sets the ImageIconUrl field's value. -func (s *BaiduMessage) SetImageIconUrl(v string) *BaiduMessage { - s.ImageIconUrl = &v - return s -} - -// SetImageUrl sets the ImageUrl field's value. -func (s *BaiduMessage) SetImageUrl(v string) *BaiduMessage { - s.ImageUrl = &v - return s -} - -// SetRawContent sets the RawContent field's value. -func (s *BaiduMessage) SetRawContent(v string) *BaiduMessage { - s.RawContent = &v - return s -} - -// SetSilentPush sets the SilentPush field's value. -func (s *BaiduMessage) SetSilentPush(v bool) *BaiduMessage { - s.SilentPush = &v - return s -} - -// SetSmallImageIconUrl sets the SmallImageIconUrl field's value. -func (s *BaiduMessage) SetSmallImageIconUrl(v string) *BaiduMessage { - s.SmallImageIconUrl = &v - return s -} - -// SetSound sets the Sound field's value. -func (s *BaiduMessage) SetSound(v string) *BaiduMessage { - s.Sound = &v - return s -} - -// SetSubstitutions sets the Substitutions field's value. -func (s *BaiduMessage) SetSubstitutions(v map[string][]*string) *BaiduMessage { - s.Substitutions = v - return s -} - -// SetTimeToLive sets the TimeToLive field's value. -func (s *BaiduMessage) SetTimeToLive(v int64) *BaiduMessage { - s.TimeToLive = &v - return s -} - -// SetTitle sets the Title field's value. -func (s *BaiduMessage) SetTitle(v string) *BaiduMessage { - s.Title = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *BaiduMessage) SetUrl(v string) *BaiduMessage { - s.Url = &v - return s -} - -// The email message configuration. -type CampaignEmailMessage struct { - _ struct{} `type:"structure"` - - // The email text body. - Body *string `type:"string"` - - // The email address used to send the email from. Defaults to use FromAddress - // specified in the Email Channel. - FromAddress *string `type:"string"` - - // The email html body. - HtmlBody *string `type:"string"` - - // The email title (Or subject). - Title *string `type:"string"` -} - -// String returns the string representation -func (s CampaignEmailMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CampaignEmailMessage) GoString() string { - return s.String() -} - -// SetBody sets the Body field's value. -func (s *CampaignEmailMessage) SetBody(v string) *CampaignEmailMessage { - s.Body = &v - return s -} - -// SetFromAddress sets the FromAddress field's value. -func (s *CampaignEmailMessage) SetFromAddress(v string) *CampaignEmailMessage { - s.FromAddress = &v - return s -} - -// SetHtmlBody sets the HtmlBody field's value. -func (s *CampaignEmailMessage) SetHtmlBody(v string) *CampaignEmailMessage { - s.HtmlBody = &v - return s -} - -// SetTitle sets the Title field's value. -func (s *CampaignEmailMessage) SetTitle(v string) *CampaignEmailMessage { - s.Title = &v - return s -} - -// An object that defines the events that cause the campaign to be sent. -type CampaignEventFilter struct { - _ struct{} `type:"structure"` - - // An object that defines the dimensions for the event filter. - Dimensions *EventDimensions `type:"structure"` - - // The type of event that causes the campaign to be sent. Possible values:SYSTEM - // - Send the campaign when a system event occurs. See the System resource for - // more information.ENDPOINT - Send the campaign when an endpoint event occurs. - // See the Event resource for more information. - FilterType *string `type:"string" enum:"FilterType"` -} - -// String returns the string representation -func (s CampaignEventFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CampaignEventFilter) GoString() string { - return s.String() -} - -// SetDimensions sets the Dimensions field's value. -func (s *CampaignEventFilter) SetDimensions(v *EventDimensions) *CampaignEventFilter { - s.Dimensions = v - return s -} - -// SetFilterType sets the FilterType field's value. -func (s *CampaignEventFilter) SetFilterType(v string) *CampaignEventFilter { - s.FilterType = &v - return s -} - -// Campaign hook information. -type CampaignHook struct { - _ struct{} `type:"structure"` - - // Lambda function name or arn to be called for delivery - LambdaFunctionName *string `type:"string"` - - // What mode Lambda should be invoked in. - Mode *string `type:"string" enum:"Mode"` - - // Web URL to call for hook. If the URL has authentication specified it will - // be added as authentication to the request - WebUrl *string `type:"string"` -} - -// String returns the string representation -func (s CampaignHook) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CampaignHook) GoString() string { - return s.String() -} - -// SetLambdaFunctionName sets the LambdaFunctionName field's value. -func (s *CampaignHook) SetLambdaFunctionName(v string) *CampaignHook { - s.LambdaFunctionName = &v - return s -} - -// SetMode sets the Mode field's value. -func (s *CampaignHook) SetMode(v string) *CampaignHook { - s.Mode = &v - return s -} - -// SetWebUrl sets the WebUrl field's value. -func (s *CampaignHook) SetWebUrl(v string) *CampaignHook { - s.WebUrl = &v - return s -} - -// Campaign Limits are used to limit the number of messages that can be sent -// to a single endpoint. -type CampaignLimits struct { - _ struct{} `type:"structure"` - - // The maximum number of messages that each campaign can send to a single endpoint - // in a 24-hour period. - Daily *int64 `type:"integer"` - - // The length of time (in seconds) that the campaign can run before it ends - // and message deliveries stop. This duration begins at the scheduled start - // time for the campaign. The minimum value is 60. - MaximumDuration *int64 `type:"integer"` - - // The number of messages that the campaign can send per second. The minimum - // value is 50, and the maximum is 20000. - MessagesPerSecond *int64 `type:"integer"` - - // The maximum number of messages that an individual campaign can send to a - // single endpoint over the course of the campaign. - Total *int64 `type:"integer"` -} - -// String returns the string representation -func (s CampaignLimits) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CampaignLimits) GoString() string { - return s.String() -} - -// SetDaily sets the Daily field's value. -func (s *CampaignLimits) SetDaily(v int64) *CampaignLimits { - s.Daily = &v - return s -} - -// SetMaximumDuration sets the MaximumDuration field's value. -func (s *CampaignLimits) SetMaximumDuration(v int64) *CampaignLimits { - s.MaximumDuration = &v - return s -} - -// SetMessagesPerSecond sets the MessagesPerSecond field's value. -func (s *CampaignLimits) SetMessagesPerSecond(v int64) *CampaignLimits { - s.MessagesPerSecond = &v - return s -} - -// SetTotal sets the Total field's value. -func (s *CampaignLimits) SetTotal(v int64) *CampaignLimits { - s.Total = &v - return s -} - -// Campaign definition -type CampaignResponse struct { - _ struct{} `type:"structure"` - - // Treatments that are defined in addition to the default treatment. - AdditionalTreatments []*TreatmentResource `type:"list"` - - // The ID of the application to which the campaign applies. - ApplicationId *string `type:"string"` - - // The date the campaign was created in ISO 8601 format. - CreationDate *string `type:"string"` - - // The status of the campaign's default treatment. Only present for A/B test - // campaigns. - DefaultState *CampaignState `type:"structure"` - - // A description of the campaign. - Description *string `type:"string"` - - // The allocated percentage of end users who will not receive messages from - // this campaign. - HoldoutPercent *int64 `type:"integer"` - - // Campaign hook information. - Hook *CampaignHook `type:"structure"` - - // The unique campaign ID. - Id *string `type:"string"` - - // Indicates whether the campaign is paused. A paused campaign does not send - // messages unless you resume it by setting IsPaused to false. - IsPaused *bool `type:"boolean"` - - // The date the campaign was last updated in ISO 8601 format. - LastModifiedDate *string `type:"string"` - - // The campaign limits settings. - Limits *CampaignLimits `type:"structure"` - - // The message configuration settings. - MessageConfiguration *MessageConfiguration `type:"structure"` - - // The custom name of the campaign. - Name *string `type:"string"` - - // The campaign schedule. - Schedule *Schedule `type:"structure"` - - // The ID of the segment to which the campaign sends messages. - SegmentId *string `type:"string"` - - // The version of the segment to which the campaign sends messages. - SegmentVersion *int64 `type:"integer"` - - // The campaign status.An A/B test campaign will have a status of COMPLETED - // only when all treatments have a status of COMPLETED. - State *CampaignState `type:"structure"` - - // A custom description for the treatment. - TreatmentDescription *string `type:"string"` - - // The custom name of a variation of the campaign used for A/B testing. - TreatmentName *string `type:"string"` - - // The campaign version number. - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s CampaignResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CampaignResponse) GoString() string { - return s.String() -} - -// SetAdditionalTreatments sets the AdditionalTreatments field's value. -func (s *CampaignResponse) SetAdditionalTreatments(v []*TreatmentResource) *CampaignResponse { - s.AdditionalTreatments = v - return s -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *CampaignResponse) SetApplicationId(v string) *CampaignResponse { - s.ApplicationId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *CampaignResponse) SetCreationDate(v string) *CampaignResponse { - s.CreationDate = &v - return s -} - -// SetDefaultState sets the DefaultState field's value. -func (s *CampaignResponse) SetDefaultState(v *CampaignState) *CampaignResponse { - s.DefaultState = v - return s -} - -// SetDescription sets the Description field's value. -func (s *CampaignResponse) SetDescription(v string) *CampaignResponse { - s.Description = &v - return s -} - -// SetHoldoutPercent sets the HoldoutPercent field's value. -func (s *CampaignResponse) SetHoldoutPercent(v int64) *CampaignResponse { - s.HoldoutPercent = &v - return s -} - -// SetHook sets the Hook field's value. -func (s *CampaignResponse) SetHook(v *CampaignHook) *CampaignResponse { - s.Hook = v - return s -} - -// SetId sets the Id field's value. -func (s *CampaignResponse) SetId(v string) *CampaignResponse { - s.Id = &v - return s -} - -// SetIsPaused sets the IsPaused field's value. -func (s *CampaignResponse) SetIsPaused(v bool) *CampaignResponse { - s.IsPaused = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *CampaignResponse) SetLastModifiedDate(v string) *CampaignResponse { - s.LastModifiedDate = &v - return s -} - -// SetLimits sets the Limits field's value. -func (s *CampaignResponse) SetLimits(v *CampaignLimits) *CampaignResponse { - s.Limits = v - return s -} - -// SetMessageConfiguration sets the MessageConfiguration field's value. -func (s *CampaignResponse) SetMessageConfiguration(v *MessageConfiguration) *CampaignResponse { - s.MessageConfiguration = v - return s -} - -// SetName sets the Name field's value. -func (s *CampaignResponse) SetName(v string) *CampaignResponse { - s.Name = &v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *CampaignResponse) SetSchedule(v *Schedule) *CampaignResponse { - s.Schedule = v - return s -} - -// SetSegmentId sets the SegmentId field's value. -func (s *CampaignResponse) SetSegmentId(v string) *CampaignResponse { - s.SegmentId = &v - return s -} - -// SetSegmentVersion sets the SegmentVersion field's value. -func (s *CampaignResponse) SetSegmentVersion(v int64) *CampaignResponse { - s.SegmentVersion = &v - return s -} - -// SetState sets the State field's value. -func (s *CampaignResponse) SetState(v *CampaignState) *CampaignResponse { - s.State = v - return s -} - -// SetTreatmentDescription sets the TreatmentDescription field's value. -func (s *CampaignResponse) SetTreatmentDescription(v string) *CampaignResponse { - s.TreatmentDescription = &v - return s -} - -// SetTreatmentName sets the TreatmentName field's value. -func (s *CampaignResponse) SetTreatmentName(v string) *CampaignResponse { - s.TreatmentName = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *CampaignResponse) SetVersion(v int64) *CampaignResponse { - s.Version = &v - return s -} - -// SMS message configuration. -type CampaignSmsMessage struct { - _ struct{} `type:"structure"` - - // The SMS text body. - Body *string `type:"string"` - - // Is this is a transactional SMS message, otherwise a promotional message. - MessageType *string `type:"string" enum:"MessageType"` - - // Sender ID of sent message. - SenderId *string `type:"string"` -} - -// String returns the string representation -func (s CampaignSmsMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CampaignSmsMessage) GoString() string { - return s.String() -} - -// SetBody sets the Body field's value. -func (s *CampaignSmsMessage) SetBody(v string) *CampaignSmsMessage { - s.Body = &v - return s -} - -// SetMessageType sets the MessageType field's value. -func (s *CampaignSmsMessage) SetMessageType(v string) *CampaignSmsMessage { - s.MessageType = &v - return s -} - -// SetSenderId sets the SenderId field's value. -func (s *CampaignSmsMessage) SetSenderId(v string) *CampaignSmsMessage { - s.SenderId = &v - return s -} - -// State of the Campaign -type CampaignState struct { - _ struct{} `type:"structure"` - - // The status of the campaign, or the status of a treatment that belongs to - // an A/B test campaign.Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, - // COMPLETED, PAUSED - CampaignStatus *string `type:"string" enum:"CampaignStatus"` -} - -// String returns the string representation -func (s CampaignState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CampaignState) GoString() string { - return s.String() -} - -// SetCampaignStatus sets the CampaignStatus field's value. -func (s *CampaignState) SetCampaignStatus(v string) *CampaignState { - s.CampaignStatus = &v - return s -} - -// List of available campaigns. -type CampaignsResponse struct { - _ struct{} `type:"structure"` - - // A list of campaigns. - Item []*CampaignResponse `type:"list"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s CampaignsResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CampaignsResponse) GoString() string { - return s.String() -} - -// SetItem sets the Item field's value. -func (s *CampaignsResponse) SetItem(v []*CampaignResponse) *CampaignsResponse { - s.Item = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *CampaignsResponse) SetNextToken(v string) *CampaignsResponse { - s.NextToken = &v - return s -} - -// Base definition for channel response. -type ChannelResponse struct { - _ struct{} `type:"structure"` - - // Application id - ApplicationId *string `type:"string"` - - // When was this segment created - CreationDate *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // Not used. Retained for backwards compatibility. - HasCredential *bool `type:"boolean"` - - // Channel ID. Not used, only for backwards compatibility. - Id *string `type:"string"` - - // Is this channel archived - IsArchived *bool `type:"boolean"` - - // Who made the last change - LastModifiedBy *string `type:"string"` - - // Last date this was updated - LastModifiedDate *string `type:"string"` - - // Version of channel - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s ChannelResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChannelResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *ChannelResponse) SetApplicationId(v string) *ChannelResponse { - s.ApplicationId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *ChannelResponse) SetCreationDate(v string) *ChannelResponse { - s.CreationDate = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *ChannelResponse) SetEnabled(v bool) *ChannelResponse { - s.Enabled = &v - return s -} - -// SetHasCredential sets the HasCredential field's value. -func (s *ChannelResponse) SetHasCredential(v bool) *ChannelResponse { - s.HasCredential = &v - return s -} - -// SetId sets the Id field's value. -func (s *ChannelResponse) SetId(v string) *ChannelResponse { - s.Id = &v - return s -} - -// SetIsArchived sets the IsArchived field's value. -func (s *ChannelResponse) SetIsArchived(v bool) *ChannelResponse { - s.IsArchived = &v - return s -} - -// SetLastModifiedBy sets the LastModifiedBy field's value. -func (s *ChannelResponse) SetLastModifiedBy(v string) *ChannelResponse { - s.LastModifiedBy = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *ChannelResponse) SetLastModifiedDate(v string) *ChannelResponse { - s.LastModifiedDate = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *ChannelResponse) SetVersion(v int64) *ChannelResponse { - s.Version = &v - return s -} - -// Get channels definition -type ChannelsResponse struct { - _ struct{} `type:"structure"` - - // A map of channels, with the ChannelType as the key and the Channel as the - // value. - Channels map[string]*ChannelResponse `type:"map"` -} - -// String returns the string representation -func (s ChannelsResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChannelsResponse) GoString() string { - return s.String() -} - -// SetChannels sets the Channels field's value. -func (s *ChannelsResponse) SetChannels(v map[string]*ChannelResponse) *ChannelsResponse { - s.Channels = v - return s -} - -type CreateAppInput struct { - _ struct{} `type:"structure" payload:"CreateApplicationRequest"` - - // Application Request. - // - // CreateApplicationRequest is a required field - CreateApplicationRequest *CreateApplicationRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateAppInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAppInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAppInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAppInput"} - if s.CreateApplicationRequest == nil { - invalidParams.Add(request.NewErrParamRequired("CreateApplicationRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreateApplicationRequest sets the CreateApplicationRequest field's value. -func (s *CreateAppInput) SetCreateApplicationRequest(v *CreateApplicationRequest) *CreateAppInput { - s.CreateApplicationRequest = v - return s -} - -type CreateAppOutput struct { - _ struct{} `type:"structure" payload:"ApplicationResponse"` - - // Application Response. - // - // ApplicationResponse is a required field - ApplicationResponse *ApplicationResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateAppOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAppOutput) GoString() string { - return s.String() -} - -// SetApplicationResponse sets the ApplicationResponse field's value. -func (s *CreateAppOutput) SetApplicationResponse(v *ApplicationResponse) *CreateAppOutput { - s.ApplicationResponse = v - return s -} - -// Application Request. -type CreateApplicationRequest struct { - _ struct{} `type:"structure"` - - // The display name of the application. Used in the Amazon Pinpoint console. - Name *string `type:"string"` -} - -// String returns the string representation -func (s CreateApplicationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApplicationRequest) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *CreateApplicationRequest) SetName(v string) *CreateApplicationRequest { - s.Name = &v - return s -} - -type CreateCampaignInput struct { - _ struct{} `type:"structure" payload:"WriteCampaignRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // Used to create a campaign. - // - // WriteCampaignRequest is a required field - WriteCampaignRequest *WriteCampaignRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateCampaignInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCampaignInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCampaignInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCampaignInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.WriteCampaignRequest == nil { - invalidParams.Add(request.NewErrParamRequired("WriteCampaignRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *CreateCampaignInput) SetApplicationId(v string) *CreateCampaignInput { - s.ApplicationId = &v - return s -} - -// SetWriteCampaignRequest sets the WriteCampaignRequest field's value. -func (s *CreateCampaignInput) SetWriteCampaignRequest(v *WriteCampaignRequest) *CreateCampaignInput { - s.WriteCampaignRequest = v - return s -} - -type CreateCampaignOutput struct { - _ struct{} `type:"structure" payload:"CampaignResponse"` - - // Campaign definition - // - // CampaignResponse is a required field - CampaignResponse *CampaignResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateCampaignOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCampaignOutput) GoString() string { - return s.String() -} - -// SetCampaignResponse sets the CampaignResponse field's value. -func (s *CreateCampaignOutput) SetCampaignResponse(v *CampaignResponse) *CreateCampaignOutput { - s.CampaignResponse = v - return s -} - -type CreateExportJobInput struct { - _ struct{} `type:"structure" payload:"ExportJobRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // Export job request. - // - // ExportJobRequest is a required field - ExportJobRequest *ExportJobRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateExportJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateExportJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateExportJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateExportJobInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.ExportJobRequest == nil { - invalidParams.Add(request.NewErrParamRequired("ExportJobRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *CreateExportJobInput) SetApplicationId(v string) *CreateExportJobInput { - s.ApplicationId = &v - return s -} - -// SetExportJobRequest sets the ExportJobRequest field's value. -func (s *CreateExportJobInput) SetExportJobRequest(v *ExportJobRequest) *CreateExportJobInput { - s.ExportJobRequest = v - return s -} - -type CreateExportJobOutput struct { - _ struct{} `type:"structure" payload:"ExportJobResponse"` - - // Export job response. - // - // ExportJobResponse is a required field - ExportJobResponse *ExportJobResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateExportJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateExportJobOutput) GoString() string { - return s.String() -} - -// SetExportJobResponse sets the ExportJobResponse field's value. -func (s *CreateExportJobOutput) SetExportJobResponse(v *ExportJobResponse) *CreateExportJobOutput { - s.ExportJobResponse = v - return s -} - -type CreateImportJobInput struct { - _ struct{} `type:"structure" payload:"ImportJobRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // Import job request. - // - // ImportJobRequest is a required field - ImportJobRequest *ImportJobRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateImportJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateImportJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateImportJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateImportJobInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.ImportJobRequest == nil { - invalidParams.Add(request.NewErrParamRequired("ImportJobRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *CreateImportJobInput) SetApplicationId(v string) *CreateImportJobInput { - s.ApplicationId = &v - return s -} - -// SetImportJobRequest sets the ImportJobRequest field's value. -func (s *CreateImportJobInput) SetImportJobRequest(v *ImportJobRequest) *CreateImportJobInput { - s.ImportJobRequest = v - return s -} - -type CreateImportJobOutput struct { - _ struct{} `type:"structure" payload:"ImportJobResponse"` - - // Import job response. - // - // ImportJobResponse is a required field - ImportJobResponse *ImportJobResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateImportJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateImportJobOutput) GoString() string { - return s.String() -} - -// SetImportJobResponse sets the ImportJobResponse field's value. -func (s *CreateImportJobOutput) SetImportJobResponse(v *ImportJobResponse) *CreateImportJobOutput { - s.ImportJobResponse = v - return s -} - -type CreateSegmentInput struct { - _ struct{} `type:"structure" payload:"WriteSegmentRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // Segment definition. - // - // WriteSegmentRequest is a required field - WriteSegmentRequest *WriteSegmentRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateSegmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSegmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSegmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSegmentInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.WriteSegmentRequest == nil { - invalidParams.Add(request.NewErrParamRequired("WriteSegmentRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *CreateSegmentInput) SetApplicationId(v string) *CreateSegmentInput { - s.ApplicationId = &v - return s -} - -// SetWriteSegmentRequest sets the WriteSegmentRequest field's value. -func (s *CreateSegmentInput) SetWriteSegmentRequest(v *WriteSegmentRequest) *CreateSegmentInput { - s.WriteSegmentRequest = v - return s -} - -type CreateSegmentOutput struct { - _ struct{} `type:"structure" payload:"SegmentResponse"` - - // Segment definition. - // - // SegmentResponse is a required field - SegmentResponse *SegmentResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateSegmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSegmentOutput) GoString() string { - return s.String() -} - -// SetSegmentResponse sets the SegmentResponse field's value. -func (s *CreateSegmentOutput) SetSegmentResponse(v *SegmentResponse) *CreateSegmentOutput { - s.SegmentResponse = v - return s -} - -// The default message to use across all channels. -type DefaultMessage struct { - _ struct{} `type:"structure"` - - // The message body of the notification, the email body or the text message. - Body *string `type:"string"` - - // Default message substitutions. Can be overridden by individual address substitutions. - Substitutions map[string][]*string `type:"map"` -} - -// String returns the string representation -func (s DefaultMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DefaultMessage) GoString() string { - return s.String() -} - -// SetBody sets the Body field's value. -func (s *DefaultMessage) SetBody(v string) *DefaultMessage { - s.Body = &v - return s -} - -// SetSubstitutions sets the Substitutions field's value. -func (s *DefaultMessage) SetSubstitutions(v map[string][]*string) *DefaultMessage { - s.Substitutions = v - return s -} - -// Default Push Notification Message. -type DefaultPushNotificationMessage struct { - _ struct{} `type:"structure"` - - // The action that occurs if the user taps a push notification delivered by - // the campaign: OPEN_APP - Your app launches, or it becomes the foreground - // app if it has been sent to the background. This is the default action. DEEP_LINK - // - Uses deep linking features in iOS and Android to open your app and display - // a designated user interface within the app. URL - The default mobile browser - // on the user's device launches and opens a web page at the URL you specify. - // Possible values include: OPEN_APP | DEEP_LINK | URL - Action *string `type:"string" enum:"Action"` - - // The message body of the notification. - Body *string `type:"string"` - - // The data payload used for a silent push. This payload is added to the notifications' - // data.pinpoint.jsonBody' object - Data map[string]*string `type:"map"` - - // Indicates if the message should display on the recipient's device. You can - // use silent pushes for remote configuration or to deliver messages to in-app - // notification centers. - SilentPush *bool `type:"boolean"` - - // Default message substitutions. Can be overridden by individual address substitutions. - Substitutions map[string][]*string `type:"map"` - - // The message title that displays above the message on the user's device. - Title *string `type:"string"` - - // The URL to open in the user's mobile browser. Used if the value for Action - // is URL. - Url *string `type:"string"` -} - -// String returns the string representation -func (s DefaultPushNotificationMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DefaultPushNotificationMessage) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *DefaultPushNotificationMessage) SetAction(v string) *DefaultPushNotificationMessage { - s.Action = &v - return s -} - -// SetBody sets the Body field's value. -func (s *DefaultPushNotificationMessage) SetBody(v string) *DefaultPushNotificationMessage { - s.Body = &v - return s -} - -// SetData sets the Data field's value. -func (s *DefaultPushNotificationMessage) SetData(v map[string]*string) *DefaultPushNotificationMessage { - s.Data = v - return s -} - -// SetSilentPush sets the SilentPush field's value. -func (s *DefaultPushNotificationMessage) SetSilentPush(v bool) *DefaultPushNotificationMessage { - s.SilentPush = &v - return s -} - -// SetSubstitutions sets the Substitutions field's value. -func (s *DefaultPushNotificationMessage) SetSubstitutions(v map[string][]*string) *DefaultPushNotificationMessage { - s.Substitutions = v - return s -} - -// SetTitle sets the Title field's value. -func (s *DefaultPushNotificationMessage) SetTitle(v string) *DefaultPushNotificationMessage { - s.Title = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *DefaultPushNotificationMessage) SetUrl(v string) *DefaultPushNotificationMessage { - s.Url = &v - return s -} - -type DeleteAdmChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAdmChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAdmChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAdmChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAdmChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteAdmChannelInput) SetApplicationId(v string) *DeleteAdmChannelInput { - s.ApplicationId = &v - return s -} - -type DeleteAdmChannelOutput struct { - _ struct{} `type:"structure" payload:"ADMChannelResponse"` - - // Amazon Device Messaging channel definition. - // - // ADMChannelResponse is a required field - ADMChannelResponse *ADMChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteAdmChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAdmChannelOutput) GoString() string { - return s.String() -} - -// SetADMChannelResponse sets the ADMChannelResponse field's value. -func (s *DeleteAdmChannelOutput) SetADMChannelResponse(v *ADMChannelResponse) *DeleteAdmChannelOutput { - s.ADMChannelResponse = v - return s -} - -type DeleteApnsChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteApnsChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApnsChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApnsChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApnsChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteApnsChannelInput) SetApplicationId(v string) *DeleteApnsChannelInput { - s.ApplicationId = &v - return s -} - -type DeleteApnsChannelOutput struct { - _ struct{} `type:"structure" payload:"APNSChannelResponse"` - - // Apple Distribution Push Notification Service channel definition. - // - // APNSChannelResponse is a required field - APNSChannelResponse *APNSChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteApnsChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApnsChannelOutput) GoString() string { - return s.String() -} - -// SetAPNSChannelResponse sets the APNSChannelResponse field's value. -func (s *DeleteApnsChannelOutput) SetAPNSChannelResponse(v *APNSChannelResponse) *DeleteApnsChannelOutput { - s.APNSChannelResponse = v - return s -} - -type DeleteApnsSandboxChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteApnsSandboxChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApnsSandboxChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApnsSandboxChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApnsSandboxChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteApnsSandboxChannelInput) SetApplicationId(v string) *DeleteApnsSandboxChannelInput { - s.ApplicationId = &v - return s -} - -type DeleteApnsSandboxChannelOutput struct { - _ struct{} `type:"structure" payload:"APNSSandboxChannelResponse"` - - // Apple Development Push Notification Service channel definition. - // - // APNSSandboxChannelResponse is a required field - APNSSandboxChannelResponse *APNSSandboxChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteApnsSandboxChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApnsSandboxChannelOutput) GoString() string { - return s.String() -} - -// SetAPNSSandboxChannelResponse sets the APNSSandboxChannelResponse field's value. -func (s *DeleteApnsSandboxChannelOutput) SetAPNSSandboxChannelResponse(v *APNSSandboxChannelResponse) *DeleteApnsSandboxChannelOutput { - s.APNSSandboxChannelResponse = v - return s -} - -type DeleteApnsVoipChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteApnsVoipChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApnsVoipChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApnsVoipChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApnsVoipChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteApnsVoipChannelInput) SetApplicationId(v string) *DeleteApnsVoipChannelInput { - s.ApplicationId = &v - return s -} - -type DeleteApnsVoipChannelOutput struct { - _ struct{} `type:"structure" payload:"APNSVoipChannelResponse"` - - // Apple VoIP Push Notification Service channel definition. - // - // APNSVoipChannelResponse is a required field - APNSVoipChannelResponse *APNSVoipChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteApnsVoipChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApnsVoipChannelOutput) GoString() string { - return s.String() -} - -// SetAPNSVoipChannelResponse sets the APNSVoipChannelResponse field's value. -func (s *DeleteApnsVoipChannelOutput) SetAPNSVoipChannelResponse(v *APNSVoipChannelResponse) *DeleteApnsVoipChannelOutput { - s.APNSVoipChannelResponse = v - return s -} - -type DeleteApnsVoipSandboxChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteApnsVoipSandboxChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApnsVoipSandboxChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApnsVoipSandboxChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApnsVoipSandboxChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteApnsVoipSandboxChannelInput) SetApplicationId(v string) *DeleteApnsVoipSandboxChannelInput { - s.ApplicationId = &v - return s -} - -type DeleteApnsVoipSandboxChannelOutput struct { - _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelResponse"` - - // Apple VoIP Developer Push Notification Service channel definition. - // - // APNSVoipSandboxChannelResponse is a required field - APNSVoipSandboxChannelResponse *APNSVoipSandboxChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteApnsVoipSandboxChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApnsVoipSandboxChannelOutput) GoString() string { - return s.String() -} - -// SetAPNSVoipSandboxChannelResponse sets the APNSVoipSandboxChannelResponse field's value. -func (s *DeleteApnsVoipSandboxChannelOutput) SetAPNSVoipSandboxChannelResponse(v *APNSVoipSandboxChannelResponse) *DeleteApnsVoipSandboxChannelOutput { - s.APNSVoipSandboxChannelResponse = v - return s -} - -type DeleteAppInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAppInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAppInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAppInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAppInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteAppInput) SetApplicationId(v string) *DeleteAppInput { - s.ApplicationId = &v - return s -} - -type DeleteAppOutput struct { - _ struct{} `type:"structure" payload:"ApplicationResponse"` - - // Application Response. - // - // ApplicationResponse is a required field - ApplicationResponse *ApplicationResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteAppOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAppOutput) GoString() string { - return s.String() -} - -// SetApplicationResponse sets the ApplicationResponse field's value. -func (s *DeleteAppOutput) SetApplicationResponse(v *ApplicationResponse) *DeleteAppOutput { - s.ApplicationResponse = v - return s -} - -type DeleteBaiduChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBaiduChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBaiduChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBaiduChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBaiduChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteBaiduChannelInput) SetApplicationId(v string) *DeleteBaiduChannelInput { - s.ApplicationId = &v - return s -} - -type DeleteBaiduChannelOutput struct { - _ struct{} `type:"structure" payload:"BaiduChannelResponse"` - - // Baidu Cloud Messaging channel definition - // - // BaiduChannelResponse is a required field - BaiduChannelResponse *BaiduChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteBaiduChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBaiduChannelOutput) GoString() string { - return s.String() -} - -// SetBaiduChannelResponse sets the BaiduChannelResponse field's value. -func (s *DeleteBaiduChannelOutput) SetBaiduChannelResponse(v *BaiduChannelResponse) *DeleteBaiduChannelOutput { - s.BaiduChannelResponse = v - return s -} - -type DeleteCampaignInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // CampaignId is a required field - CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteCampaignInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCampaignInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCampaignInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCampaignInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.CampaignId == nil { - invalidParams.Add(request.NewErrParamRequired("CampaignId")) - } - if s.CampaignId != nil && len(*s.CampaignId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CampaignId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteCampaignInput) SetApplicationId(v string) *DeleteCampaignInput { - s.ApplicationId = &v - return s -} - -// SetCampaignId sets the CampaignId field's value. -func (s *DeleteCampaignInput) SetCampaignId(v string) *DeleteCampaignInput { - s.CampaignId = &v - return s -} - -type DeleteCampaignOutput struct { - _ struct{} `type:"structure" payload:"CampaignResponse"` - - // Campaign definition - // - // CampaignResponse is a required field - CampaignResponse *CampaignResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteCampaignOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCampaignOutput) GoString() string { - return s.String() -} - -// SetCampaignResponse sets the CampaignResponse field's value. -func (s *DeleteCampaignOutput) SetCampaignResponse(v *CampaignResponse) *DeleteCampaignOutput { - s.CampaignResponse = v - return s -} - -type DeleteEmailChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEmailChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEmailChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEmailChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEmailChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteEmailChannelInput) SetApplicationId(v string) *DeleteEmailChannelInput { - s.ApplicationId = &v - return s -} - -type DeleteEmailChannelOutput struct { - _ struct{} `type:"structure" payload:"EmailChannelResponse"` - - // Email Channel Response. - // - // EmailChannelResponse is a required field - EmailChannelResponse *EmailChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteEmailChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEmailChannelOutput) GoString() string { - return s.String() -} - -// SetEmailChannelResponse sets the EmailChannelResponse field's value. -func (s *DeleteEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelResponse) *DeleteEmailChannelOutput { - s.EmailChannelResponse = v - return s -} - -type DeleteEndpointInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // EndpointId is a required field - EndpointId *string `location:"uri" locationName:"endpoint-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.EndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointId")) - } - if s.EndpointId != nil && len(*s.EndpointId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EndpointId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteEndpointInput) SetApplicationId(v string) *DeleteEndpointInput { - s.ApplicationId = &v - return s -} - -// SetEndpointId sets the EndpointId field's value. -func (s *DeleteEndpointInput) SetEndpointId(v string) *DeleteEndpointInput { - s.EndpointId = &v - return s -} - -type DeleteEndpointOutput struct { - _ struct{} `type:"structure" payload:"EndpointResponse"` - - // Endpoint response - // - // EndpointResponse is a required field - EndpointResponse *EndpointResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEndpointOutput) GoString() string { - return s.String() -} - -// SetEndpointResponse sets the EndpointResponse field's value. -func (s *DeleteEndpointOutput) SetEndpointResponse(v *EndpointResponse) *DeleteEndpointOutput { - s.EndpointResponse = v - return s -} - -type DeleteEventStreamInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEventStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEventStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEventStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEventStreamInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteEventStreamInput) SetApplicationId(v string) *DeleteEventStreamInput { - s.ApplicationId = &v - return s -} - -type DeleteEventStreamOutput struct { - _ struct{} `type:"structure" payload:"EventStream"` - - // Model for an event publishing subscription export. - // - // EventStream is a required field - EventStream *EventStream `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteEventStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEventStreamOutput) GoString() string { - return s.String() -} - -// SetEventStream sets the EventStream field's value. -func (s *DeleteEventStreamOutput) SetEventStream(v *EventStream) *DeleteEventStreamOutput { - s.EventStream = v - return s -} - -type DeleteGcmChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteGcmChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGcmChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteGcmChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteGcmChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteGcmChannelInput) SetApplicationId(v string) *DeleteGcmChannelInput { - s.ApplicationId = &v - return s -} - -type DeleteGcmChannelOutput struct { - _ struct{} `type:"structure" payload:"GCMChannelResponse"` - - // Google Cloud Messaging channel definition - // - // GCMChannelResponse is a required field - GCMChannelResponse *GCMChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteGcmChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGcmChannelOutput) GoString() string { - return s.String() -} - -// SetGCMChannelResponse sets the GCMChannelResponse field's value. -func (s *DeleteGcmChannelOutput) SetGCMChannelResponse(v *GCMChannelResponse) *DeleteGcmChannelOutput { - s.GCMChannelResponse = v - return s -} - -type DeleteSegmentInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // SegmentId is a required field - SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSegmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSegmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSegmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSegmentInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.SegmentId == nil { - invalidParams.Add(request.NewErrParamRequired("SegmentId")) - } - if s.SegmentId != nil && len(*s.SegmentId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SegmentId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteSegmentInput) SetApplicationId(v string) *DeleteSegmentInput { - s.ApplicationId = &v - return s -} - -// SetSegmentId sets the SegmentId field's value. -func (s *DeleteSegmentInput) SetSegmentId(v string) *DeleteSegmentInput { - s.SegmentId = &v - return s -} - -type DeleteSegmentOutput struct { - _ struct{} `type:"structure" payload:"SegmentResponse"` - - // Segment definition. - // - // SegmentResponse is a required field - SegmentResponse *SegmentResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteSegmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSegmentOutput) GoString() string { - return s.String() -} - -// SetSegmentResponse sets the SegmentResponse field's value. -func (s *DeleteSegmentOutput) SetSegmentResponse(v *SegmentResponse) *DeleteSegmentOutput { - s.SegmentResponse = v - return s -} - -type DeleteSmsChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSmsChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSmsChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSmsChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSmsChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteSmsChannelInput) SetApplicationId(v string) *DeleteSmsChannelInput { - s.ApplicationId = &v - return s -} - -type DeleteSmsChannelOutput struct { - _ struct{} `type:"structure" payload:"SMSChannelResponse"` - - // SMS Channel Response. - // - // SMSChannelResponse is a required field - SMSChannelResponse *SMSChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteSmsChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSmsChannelOutput) GoString() string { - return s.String() -} - -// SetSMSChannelResponse sets the SMSChannelResponse field's value. -func (s *DeleteSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *DeleteSmsChannelOutput { - s.SMSChannelResponse = v - return s -} - -type DeleteUserEndpointsInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // UserId is a required field - UserId *string `location:"uri" locationName:"user-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteUserEndpointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserEndpointsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserEndpointsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserEndpointsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.UserId == nil { - invalidParams.Add(request.NewErrParamRequired("UserId")) - } - if s.UserId != nil && len(*s.UserId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteUserEndpointsInput) SetApplicationId(v string) *DeleteUserEndpointsInput { - s.ApplicationId = &v - return s -} - -// SetUserId sets the UserId field's value. -func (s *DeleteUserEndpointsInput) SetUserId(v string) *DeleteUserEndpointsInput { - s.UserId = &v - return s -} - -type DeleteUserEndpointsOutput struct { - _ struct{} `type:"structure" payload:"EndpointsResponse"` - - // List of endpoints - // - // EndpointsResponse is a required field - EndpointsResponse *EndpointsResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteUserEndpointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserEndpointsOutput) GoString() string { - return s.String() -} - -// SetEndpointsResponse sets the EndpointsResponse field's value. -func (s *DeleteUserEndpointsOutput) SetEndpointsResponse(v *EndpointsResponse) *DeleteUserEndpointsOutput { - s.EndpointsResponse = v - return s -} - -type DeleteVoiceChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVoiceChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVoiceChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVoiceChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVoiceChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteVoiceChannelInput) SetApplicationId(v string) *DeleteVoiceChannelInput { - s.ApplicationId = &v - return s -} - -type DeleteVoiceChannelOutput struct { - _ struct{} `type:"structure" payload:"VoiceChannelResponse"` - - // Voice Channel Response. - // - // VoiceChannelResponse is a required field - VoiceChannelResponse *VoiceChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteVoiceChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVoiceChannelOutput) GoString() string { - return s.String() -} - -// SetVoiceChannelResponse sets the VoiceChannelResponse field's value. -func (s *DeleteVoiceChannelOutput) SetVoiceChannelResponse(v *VoiceChannelResponse) *DeleteVoiceChannelOutput { - s.VoiceChannelResponse = v - return s -} - -// Message definitions for the default message and any messages that are tailored -// for specific channels. -type DirectMessageConfiguration struct { - _ struct{} `type:"structure"` - - // The message to ADM channels. Overrides the default push notification message. - ADMMessage *ADMMessage `type:"structure"` - - // The message to APNS channels. Overrides the default push notification message. - APNSMessage *APNSMessage `type:"structure"` - - // The message to Baidu GCM channels. Overrides the default push notification - // message. - BaiduMessage *BaiduMessage `type:"structure"` - - // The default message for all channels. - DefaultMessage *DefaultMessage `type:"structure"` - - // The default push notification message for all push channels. - DefaultPushNotificationMessage *DefaultPushNotificationMessage `type:"structure"` - - // The message to Email channels. Overrides the default message. - EmailMessage *EmailMessage `type:"structure"` - - // The message to GCM channels. Overrides the default push notification message. - GCMMessage *GCMMessage `type:"structure"` - - // The message to SMS channels. Overrides the default message. - SMSMessage *SMSMessage `type:"structure"` - - // The message to Voice channels. Overrides the default message. - VoiceMessage *VoiceMessage `type:"structure"` -} - -// String returns the string representation -func (s DirectMessageConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DirectMessageConfiguration) GoString() string { - return s.String() -} - -// SetADMMessage sets the ADMMessage field's value. -func (s *DirectMessageConfiguration) SetADMMessage(v *ADMMessage) *DirectMessageConfiguration { - s.ADMMessage = v - return s -} - -// SetAPNSMessage sets the APNSMessage field's value. -func (s *DirectMessageConfiguration) SetAPNSMessage(v *APNSMessage) *DirectMessageConfiguration { - s.APNSMessage = v - return s -} - -// SetBaiduMessage sets the BaiduMessage field's value. -func (s *DirectMessageConfiguration) SetBaiduMessage(v *BaiduMessage) *DirectMessageConfiguration { - s.BaiduMessage = v - return s -} - -// SetDefaultMessage sets the DefaultMessage field's value. -func (s *DirectMessageConfiguration) SetDefaultMessage(v *DefaultMessage) *DirectMessageConfiguration { - s.DefaultMessage = v - return s -} - -// SetDefaultPushNotificationMessage sets the DefaultPushNotificationMessage field's value. -func (s *DirectMessageConfiguration) SetDefaultPushNotificationMessage(v *DefaultPushNotificationMessage) *DirectMessageConfiguration { - s.DefaultPushNotificationMessage = v - return s -} - -// SetEmailMessage sets the EmailMessage field's value. -func (s *DirectMessageConfiguration) SetEmailMessage(v *EmailMessage) *DirectMessageConfiguration { - s.EmailMessage = v - return s -} - -// SetGCMMessage sets the GCMMessage field's value. -func (s *DirectMessageConfiguration) SetGCMMessage(v *GCMMessage) *DirectMessageConfiguration { - s.GCMMessage = v - return s -} - -// SetSMSMessage sets the SMSMessage field's value. -func (s *DirectMessageConfiguration) SetSMSMessage(v *SMSMessage) *DirectMessageConfiguration { - s.SMSMessage = v - return s -} - -// SetVoiceMessage sets the VoiceMessage field's value. -func (s *DirectMessageConfiguration) SetVoiceMessage(v *VoiceMessage) *DirectMessageConfiguration { - s.VoiceMessage = v - return s -} - -// Email Channel Request -type EmailChannelRequest struct { - _ struct{} `type:"structure"` - - // The configuration set that you want to use when you send email using the - // Pinpoint Email API. - ConfigurationSet *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // The email address used to send emails from. - FromAddress *string `type:"string"` - - // The ARN of an identity verified with SES. - Identity *string `type:"string"` - - // The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion - // service - RoleArn *string `type:"string"` -} - -// String returns the string representation -func (s EmailChannelRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EmailChannelRequest) GoString() string { - return s.String() -} - -// SetConfigurationSet sets the ConfigurationSet field's value. -func (s *EmailChannelRequest) SetConfigurationSet(v string) *EmailChannelRequest { - s.ConfigurationSet = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *EmailChannelRequest) SetEnabled(v bool) *EmailChannelRequest { - s.Enabled = &v - return s -} - -// SetFromAddress sets the FromAddress field's value. -func (s *EmailChannelRequest) SetFromAddress(v string) *EmailChannelRequest { - s.FromAddress = &v - return s -} - -// SetIdentity sets the Identity field's value. -func (s *EmailChannelRequest) SetIdentity(v string) *EmailChannelRequest { - s.Identity = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *EmailChannelRequest) SetRoleArn(v string) *EmailChannelRequest { - s.RoleArn = &v - return s -} - -// Email Channel Response. -type EmailChannelResponse struct { - _ struct{} `type:"structure"` - - // The unique ID of the application to which the email channel belongs. - ApplicationId *string `type:"string"` - - // The configuration set that you want to use when you send email using the - // Pinpoint Email API. - ConfigurationSet *string `type:"string"` - - // The date that the settings were last updated in ISO 8601 format. - CreationDate *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // The email address used to send emails from. - FromAddress *string `type:"string"` - - // Not used. Retained for backwards compatibility. - HasCredential *bool `type:"boolean"` - - // Channel ID. Not used, only for backwards compatibility. - Id *string `type:"string"` - - // The ARN of an identity verified with SES. - Identity *string `type:"string"` - - // Is this channel archived - IsArchived *bool `type:"boolean"` - - // Who last updated this entry - LastModifiedBy *string `type:"string"` - - // Last date this was updated - LastModifiedDate *string `type:"string"` - - // Messages per second that can be sent - MessagesPerSecond *int64 `type:"integer"` - - // Platform type. Will be "EMAIL" - Platform *string `type:"string"` - - // The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion - // service - RoleArn *string `type:"string"` - - // Version of channel - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s EmailChannelResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EmailChannelResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *EmailChannelResponse) SetApplicationId(v string) *EmailChannelResponse { - s.ApplicationId = &v - return s -} - -// SetConfigurationSet sets the ConfigurationSet field's value. -func (s *EmailChannelResponse) SetConfigurationSet(v string) *EmailChannelResponse { - s.ConfigurationSet = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *EmailChannelResponse) SetCreationDate(v string) *EmailChannelResponse { - s.CreationDate = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *EmailChannelResponse) SetEnabled(v bool) *EmailChannelResponse { - s.Enabled = &v - return s -} - -// SetFromAddress sets the FromAddress field's value. -func (s *EmailChannelResponse) SetFromAddress(v string) *EmailChannelResponse { - s.FromAddress = &v - return s -} - -// SetHasCredential sets the HasCredential field's value. -func (s *EmailChannelResponse) SetHasCredential(v bool) *EmailChannelResponse { - s.HasCredential = &v - return s -} - -// SetId sets the Id field's value. -func (s *EmailChannelResponse) SetId(v string) *EmailChannelResponse { - s.Id = &v - return s -} - -// SetIdentity sets the Identity field's value. -func (s *EmailChannelResponse) SetIdentity(v string) *EmailChannelResponse { - s.Identity = &v - return s -} - -// SetIsArchived sets the IsArchived field's value. -func (s *EmailChannelResponse) SetIsArchived(v bool) *EmailChannelResponse { - s.IsArchived = &v - return s -} - -// SetLastModifiedBy sets the LastModifiedBy field's value. -func (s *EmailChannelResponse) SetLastModifiedBy(v string) *EmailChannelResponse { - s.LastModifiedBy = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *EmailChannelResponse) SetLastModifiedDate(v string) *EmailChannelResponse { - s.LastModifiedDate = &v - return s -} - -// SetMessagesPerSecond sets the MessagesPerSecond field's value. -func (s *EmailChannelResponse) SetMessagesPerSecond(v int64) *EmailChannelResponse { - s.MessagesPerSecond = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *EmailChannelResponse) SetPlatform(v string) *EmailChannelResponse { - s.Platform = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *EmailChannelResponse) SetRoleArn(v string) *EmailChannelResponse { - s.RoleArn = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *EmailChannelResponse) SetVersion(v int64) *EmailChannelResponse { - s.Version = &v - return s -} - -// Email Message. -type EmailMessage struct { - _ struct{} `type:"structure"` - - // The body of the email message. - Body *string `type:"string"` - - // The email address that bounces and complaints will be forwarded to when feedback - // forwarding is enabled. - FeedbackForwardingAddress *string `type:"string"` - - // The email address used to send the email from. Defaults to use FromAddress - // specified in the Email Channel. - FromAddress *string `type:"string"` - - // An email represented as a raw MIME message. - RawEmail *RawEmail `type:"structure"` - - // The reply-to email address(es) for the email. If the recipient replies to - // the email, each reply-to address will receive the reply. - ReplyToAddresses []*string `type:"list"` - - // An email composed of a subject, a text part and a html part. - SimpleEmail *SimpleEmail `type:"structure"` - - // Default message substitutions. Can be overridden by individual address substitutions. - Substitutions map[string][]*string `type:"map"` -} - -// String returns the string representation -func (s EmailMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EmailMessage) GoString() string { - return s.String() -} - -// SetBody sets the Body field's value. -func (s *EmailMessage) SetBody(v string) *EmailMessage { - s.Body = &v - return s -} - -// SetFeedbackForwardingAddress sets the FeedbackForwardingAddress field's value. -func (s *EmailMessage) SetFeedbackForwardingAddress(v string) *EmailMessage { - s.FeedbackForwardingAddress = &v - return s -} - -// SetFromAddress sets the FromAddress field's value. -func (s *EmailMessage) SetFromAddress(v string) *EmailMessage { - s.FromAddress = &v - return s -} - -// SetRawEmail sets the RawEmail field's value. -func (s *EmailMessage) SetRawEmail(v *RawEmail) *EmailMessage { - s.RawEmail = v - return s -} - -// SetReplyToAddresses sets the ReplyToAddresses field's value. -func (s *EmailMessage) SetReplyToAddresses(v []*string) *EmailMessage { - s.ReplyToAddresses = v - return s -} - -// SetSimpleEmail sets the SimpleEmail field's value. -func (s *EmailMessage) SetSimpleEmail(v *SimpleEmail) *EmailMessage { - s.SimpleEmail = v - return s -} - -// SetSubstitutions sets the Substitutions field's value. -func (s *EmailMessage) SetSubstitutions(v map[string][]*string) *EmailMessage { - s.Substitutions = v - return s -} - -// Endpoint update request -type EndpointBatchItem struct { - _ struct{} `type:"structure"` - - // The destination for messages that you send to this endpoint. The address - // varies by channel. For mobile push channels, use the token provided by the - // push notification service, such as the APNs device token or the FCM registration - // token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. - // For the email channel, use an email address. - Address *string `type:"string"` - - // Custom attributes that describe the endpoint by associating a name with an - // array of values. For example, an attribute named "interests" might have the - // values ["science", "politics", "travel"]. You can use these attributes as - // selection criteria when you create a segment of users to engage with a messaging - // campaign.The following characters are not recommended in attribute names: - // # : ? \ /. The Amazon Pinpoint console does not display attributes that include - // these characters in the name. This limitation does not apply to attribute - // values. - Attributes map[string][]*string `type:"map"` - - // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX - // | ADM | SMS | EMAIL | BAIDU - ChannelType *string `type:"string" enum:"ChannelType"` - - // The endpoint demographic attributes. - Demographic *EndpointDemographic `type:"structure"` - - // The last time the endpoint was updated. Provided in ISO 8601 format. - EffectiveDate *string `type:"string"` - - // Unused. - EndpointStatus *string `type:"string"` - - // The unique Id for the Endpoint in the batch. - Id *string `type:"string"` - - // The endpoint location attributes. - Location *EndpointLocation `type:"structure"` - - // Custom metrics that your app reports to Amazon Pinpoint. - Metrics map[string]*float64 `type:"map"` - - // Indicates whether a user has opted out of receiving messages with one of - // the following values:ALL - User has opted out of all messages.NONE - Users - // has not opted out and receives all messages. - OptOut *string `type:"string"` - - // The unique ID for the most recent request to update the endpoint. - RequestId *string `type:"string"` - - // Custom user-specific attributes that your app reports to Amazon Pinpoint. - User *EndpointUser `type:"structure"` -} - -// String returns the string representation -func (s EndpointBatchItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointBatchItem) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *EndpointBatchItem) SetAddress(v string) *EndpointBatchItem { - s.Address = &v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *EndpointBatchItem) SetAttributes(v map[string][]*string) *EndpointBatchItem { - s.Attributes = v - return s -} - -// SetChannelType sets the ChannelType field's value. -func (s *EndpointBatchItem) SetChannelType(v string) *EndpointBatchItem { - s.ChannelType = &v - return s -} - -// SetDemographic sets the Demographic field's value. -func (s *EndpointBatchItem) SetDemographic(v *EndpointDemographic) *EndpointBatchItem { - s.Demographic = v - return s -} - -// SetEffectiveDate sets the EffectiveDate field's value. -func (s *EndpointBatchItem) SetEffectiveDate(v string) *EndpointBatchItem { - s.EffectiveDate = &v - return s -} - -// SetEndpointStatus sets the EndpointStatus field's value. -func (s *EndpointBatchItem) SetEndpointStatus(v string) *EndpointBatchItem { - s.EndpointStatus = &v - return s -} - -// SetId sets the Id field's value. -func (s *EndpointBatchItem) SetId(v string) *EndpointBatchItem { - s.Id = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *EndpointBatchItem) SetLocation(v *EndpointLocation) *EndpointBatchItem { - s.Location = v - return s -} - -// SetMetrics sets the Metrics field's value. -func (s *EndpointBatchItem) SetMetrics(v map[string]*float64) *EndpointBatchItem { - s.Metrics = v - return s -} - -// SetOptOut sets the OptOut field's value. -func (s *EndpointBatchItem) SetOptOut(v string) *EndpointBatchItem { - s.OptOut = &v - return s -} - -// SetRequestId sets the RequestId field's value. -func (s *EndpointBatchItem) SetRequestId(v string) *EndpointBatchItem { - s.RequestId = &v - return s -} - -// SetUser sets the User field's value. -func (s *EndpointBatchItem) SetUser(v *EndpointUser) *EndpointBatchItem { - s.User = v - return s -} - -// Endpoint batch update request. -type EndpointBatchRequest struct { - _ struct{} `type:"structure"` - - // List of items to update. Maximum 100 items - Item []*EndpointBatchItem `type:"list"` -} - -// String returns the string representation -func (s EndpointBatchRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointBatchRequest) GoString() string { - return s.String() -} - -// SetItem sets the Item field's value. -func (s *EndpointBatchRequest) SetItem(v []*EndpointBatchItem) *EndpointBatchRequest { - s.Item = v - return s -} - -// Demographic information about the endpoint. -type EndpointDemographic struct { - _ struct{} `type:"structure"` - - // The version of the application associated with the endpoint. - AppVersion *string `type:"string"` - - // The endpoint locale in the following format: The ISO 639-1 alpha-2 code, - // followed by an underscore, followed by an ISO 3166-1 alpha-2 value. - Locale *string `type:"string"` - - // The manufacturer of the endpoint device, such as Apple or Samsung. - Make *string `type:"string"` - - // The model name or number of the endpoint device, such as iPhone. - Model *string `type:"string"` - - // The model version of the endpoint device. - ModelVersion *string `type:"string"` - - // The platform of the endpoint device, such as iOS or Android. - Platform *string `type:"string"` - - // The platform version of the endpoint device. - PlatformVersion *string `type:"string"` - - // The timezone of the endpoint. Specified as a tz database value, such as Americas/Los_Angeles. - Timezone *string `type:"string"` -} - -// String returns the string representation -func (s EndpointDemographic) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointDemographic) GoString() string { - return s.String() -} - -// SetAppVersion sets the AppVersion field's value. -func (s *EndpointDemographic) SetAppVersion(v string) *EndpointDemographic { - s.AppVersion = &v - return s -} - -// SetLocale sets the Locale field's value. -func (s *EndpointDemographic) SetLocale(v string) *EndpointDemographic { - s.Locale = &v - return s -} - -// SetMake sets the Make field's value. -func (s *EndpointDemographic) SetMake(v string) *EndpointDemographic { - s.Make = &v - return s -} - -// SetModel sets the Model field's value. -func (s *EndpointDemographic) SetModel(v string) *EndpointDemographic { - s.Model = &v - return s -} - -// SetModelVersion sets the ModelVersion field's value. -func (s *EndpointDemographic) SetModelVersion(v string) *EndpointDemographic { - s.ModelVersion = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *EndpointDemographic) SetPlatform(v string) *EndpointDemographic { - s.Platform = &v - return s -} - -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *EndpointDemographic) SetPlatformVersion(v string) *EndpointDemographic { - s.PlatformVersion = &v - return s -} - -// SetTimezone sets the Timezone field's value. -func (s *EndpointDemographic) SetTimezone(v string) *EndpointDemographic { - s.Timezone = &v - return s -} - -// A complex object that holds the status code and message as a result of processing -// an endpoint. -type EndpointItemResponse struct { - _ struct{} `type:"structure"` - - // A custom message associated with the registration of an endpoint when issuing - // a response. - Message *string `type:"string"` - - // The status code associated with the merging of an endpoint when issuing a - // response. - StatusCode *int64 `type:"integer"` -} - -// String returns the string representation -func (s EndpointItemResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointItemResponse) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *EndpointItemResponse) SetMessage(v string) *EndpointItemResponse { - s.Message = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *EndpointItemResponse) SetStatusCode(v int64) *EndpointItemResponse { - s.StatusCode = &v - return s -} - -// Location data for the endpoint. -type EndpointLocation struct { - _ struct{} `type:"structure"` - - // The city where the endpoint is located. - City *string `type:"string"` - - // The two-letter code for the country or region of the endpoint. Specified - // as an ISO 3166-1 alpha-2 code, such as "US" for the United States. - Country *string `type:"string"` - - // The latitude of the endpoint location, rounded to one decimal place. - Latitude *float64 `type:"double"` - - // The longitude of the endpoint location, rounded to one decimal place. - Longitude *float64 `type:"double"` - - // The postal code or zip code of the endpoint. - PostalCode *string `type:"string"` - - // The region of the endpoint location. For example, in the United States, this - // corresponds to a state. - Region *string `type:"string"` -} - -// String returns the string representation -func (s EndpointLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointLocation) GoString() string { - return s.String() -} - -// SetCity sets the City field's value. -func (s *EndpointLocation) SetCity(v string) *EndpointLocation { - s.City = &v - return s -} - -// SetCountry sets the Country field's value. -func (s *EndpointLocation) SetCountry(v string) *EndpointLocation { - s.Country = &v - return s -} - -// SetLatitude sets the Latitude field's value. -func (s *EndpointLocation) SetLatitude(v float64) *EndpointLocation { - s.Latitude = &v - return s -} - -// SetLongitude sets the Longitude field's value. -func (s *EndpointLocation) SetLongitude(v float64) *EndpointLocation { - s.Longitude = &v - return s -} - -// SetPostalCode sets the PostalCode field's value. -func (s *EndpointLocation) SetPostalCode(v string) *EndpointLocation { - s.PostalCode = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *EndpointLocation) SetRegion(v string) *EndpointLocation { - s.Region = &v - return s -} - -// The result from sending a message to an endpoint. -type EndpointMessageResult struct { - _ struct{} `type:"structure"` - - // Address that endpoint message was delivered to. - Address *string `type:"string"` - - // The delivery status of the message. Possible values:SUCCESS - The message - // was successfully delivered to the endpoint.TRANSIENT_FAILURE - A temporary - // error occurred. Amazon Pinpoint will attempt to deliver the message again - // later.FAILURE_PERMANENT - An error occurred when delivering the message to - // the endpoint. Amazon Pinpoint won't attempt to send the message again.TIMEOUT - // - The message couldn't be sent within the timeout period.QUIET_TIME - The - // local time for the endpoint was within the QuietTime for the campaign or - // app.DAILY_CAP - The endpoint has received the maximum number of messages - // it can receive within a 24-hour period.HOLDOUT - The endpoint was in a hold - // out treatment for the campaign.THROTTLED - Amazon Pinpoint throttled sending - // to this endpoint.EXPIRED - The endpoint address is expired.CAMPAIGN_CAP - - // The endpoint received the maximum number of messages allowed by the campaign.SERVICE_FAILURE - // - A service-level failure prevented Amazon Pinpoint from delivering the message.UNKNOWN - // - An unknown error occurred. - DeliveryStatus *string `type:"string" enum:"DeliveryStatus"` - - // Unique message identifier associated with the message that was sent. - MessageId *string `type:"string"` - - // Downstream service status code. - StatusCode *int64 `type:"integer"` - - // Status message for message delivery. - StatusMessage *string `type:"string"` - - // If token was updated as part of delivery. (This is GCM Specific) - UpdatedToken *string `type:"string"` -} - -// String returns the string representation -func (s EndpointMessageResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointMessageResult) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *EndpointMessageResult) SetAddress(v string) *EndpointMessageResult { - s.Address = &v - return s -} - -// SetDeliveryStatus sets the DeliveryStatus field's value. -func (s *EndpointMessageResult) SetDeliveryStatus(v string) *EndpointMessageResult { - s.DeliveryStatus = &v - return s -} - -// SetMessageId sets the MessageId field's value. -func (s *EndpointMessageResult) SetMessageId(v string) *EndpointMessageResult { - s.MessageId = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *EndpointMessageResult) SetStatusCode(v int64) *EndpointMessageResult { - s.StatusCode = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *EndpointMessageResult) SetStatusMessage(v string) *EndpointMessageResult { - s.StatusMessage = &v - return s -} - -// SetUpdatedToken sets the UpdatedToken field's value. -func (s *EndpointMessageResult) SetUpdatedToken(v string) *EndpointMessageResult { - s.UpdatedToken = &v - return s -} - -// An endpoint update request. -type EndpointRequest struct { - _ struct{} `type:"structure"` - - // The destination for messages that you send to this endpoint. The address - // varies by channel. For mobile push channels, use the token provided by the - // push notification service, such as the APNs device token or the FCM registration - // token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. - // For the email channel, use an email address. - Address *string `type:"string"` - - // Custom attributes that describe the endpoint by associating a name with an - // array of values. For example, an attribute named "interests" might have the - // values ["science", "politics", "travel"]. You can use these attributes as - // selection criteria when you create a segment of users to engage with a messaging - // campaign.The following characters are not recommended in attribute names: - // # : ? \ /. The Amazon Pinpoint console does not display attributes that include - // these characters in the name. This limitation does not apply to attribute - // values. - Attributes map[string][]*string `type:"map"` - - // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX - // | ADM | SMS | EMAIL | BAIDU - ChannelType *string `type:"string" enum:"ChannelType"` - - // Demographic attributes for the endpoint. - Demographic *EndpointDemographic `type:"structure"` - - // The date and time when the endpoint was updated, shown in ISO 8601 format. - EffectiveDate *string `type:"string"` - - // Unused. - EndpointStatus *string `type:"string"` - - // The endpoint location attributes. - Location *EndpointLocation `type:"structure"` - - // Custom metrics that your app reports to Amazon Pinpoint. - Metrics map[string]*float64 `type:"map"` - - // Indicates whether a user has opted out of receiving messages with one of - // the following values:ALL - User has opted out of all messages.NONE - Users - // has not opted out and receives all messages. - OptOut *string `type:"string"` - - // The unique ID for the most recent request to update the endpoint. - RequestId *string `type:"string"` - - // Custom user-specific attributes that your app reports to Amazon Pinpoint. - User *EndpointUser `type:"structure"` -} - -// String returns the string representation -func (s EndpointRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointRequest) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *EndpointRequest) SetAddress(v string) *EndpointRequest { - s.Address = &v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *EndpointRequest) SetAttributes(v map[string][]*string) *EndpointRequest { - s.Attributes = v - return s -} - -// SetChannelType sets the ChannelType field's value. -func (s *EndpointRequest) SetChannelType(v string) *EndpointRequest { - s.ChannelType = &v - return s -} - -// SetDemographic sets the Demographic field's value. -func (s *EndpointRequest) SetDemographic(v *EndpointDemographic) *EndpointRequest { - s.Demographic = v - return s -} - -// SetEffectiveDate sets the EffectiveDate field's value. -func (s *EndpointRequest) SetEffectiveDate(v string) *EndpointRequest { - s.EffectiveDate = &v - return s -} - -// SetEndpointStatus sets the EndpointStatus field's value. -func (s *EndpointRequest) SetEndpointStatus(v string) *EndpointRequest { - s.EndpointStatus = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *EndpointRequest) SetLocation(v *EndpointLocation) *EndpointRequest { - s.Location = v - return s -} - -// SetMetrics sets the Metrics field's value. -func (s *EndpointRequest) SetMetrics(v map[string]*float64) *EndpointRequest { - s.Metrics = v - return s -} - -// SetOptOut sets the OptOut field's value. -func (s *EndpointRequest) SetOptOut(v string) *EndpointRequest { - s.OptOut = &v - return s -} - -// SetRequestId sets the RequestId field's value. -func (s *EndpointRequest) SetRequestId(v string) *EndpointRequest { - s.RequestId = &v - return s -} - -// SetUser sets the User field's value. -func (s *EndpointRequest) SetUser(v *EndpointUser) *EndpointRequest { - s.User = v - return s -} - -// Endpoint response -type EndpointResponse struct { - _ struct{} `type:"structure"` - - // The address of the endpoint as provided by your push provider. For example, - // the DeviceToken or RegistrationId. - Address *string `type:"string"` - - // The ID of the application that is associated with the endpoint. - ApplicationId *string `type:"string"` - - // Custom attributes that describe the endpoint by associating a name with an - // array of values. For example, an attribute named "interests" might have the - // following values: ["science", "politics", "travel"]. You can use these attributes - // as selection criteria when you create segments.The Amazon Pinpoint console - // can't display attribute names that include the following characters: hash/pound - // sign (#), colon (:), question mark (?), backslash (\), and forward slash - // (/). For this reason, you should avoid using these characters in the names - // of custom attributes. - Attributes map[string][]*string `type:"map"` - - // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX - // | ADM | SMS | EMAIL | BAIDU - ChannelType *string `type:"string" enum:"ChannelType"` - - // A number from 0-99 that represents the cohort the endpoint is assigned to. - // Endpoints are grouped into cohorts randomly, and each cohort contains approximately - // 1 percent of the endpoints for an app. Amazon Pinpoint assigns cohorts to - // the holdout or treatment allocations for a campaign. - CohortId *string `type:"string"` - - // The date and time when the endpoint was created, shown in ISO 8601 format. - CreationDate *string `type:"string"` - - // The endpoint demographic attributes. - Demographic *EndpointDemographic `type:"structure"` - - // The date and time when the endpoint was last updated, shown in ISO 8601 format. - EffectiveDate *string `type:"string"` - - // Unused. - EndpointStatus *string `type:"string"` - - // The unique ID that you assigned to the endpoint. The ID should be a globally - // unique identifier (GUID) to ensure that it doesn't conflict with other endpoint - // IDs associated with the application. - Id *string `type:"string"` - - // The endpoint location attributes. - Location *EndpointLocation `type:"structure"` - - // Custom metrics that your app reports to Amazon Pinpoint. - Metrics map[string]*float64 `type:"map"` - - // Indicates whether a user has opted out of receiving messages with one of - // the following values:ALL - User has opted out of all messages.NONE - Users - // has not opted out and receives all messages. - OptOut *string `type:"string"` - - // The unique ID for the most recent request to update the endpoint. - RequestId *string `type:"string"` - - // Custom user-specific attributes that your app reports to Amazon Pinpoint. - User *EndpointUser `type:"structure"` -} - -// String returns the string representation -func (s EndpointResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointResponse) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *EndpointResponse) SetAddress(v string) *EndpointResponse { - s.Address = &v - return s -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *EndpointResponse) SetApplicationId(v string) *EndpointResponse { - s.ApplicationId = &v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *EndpointResponse) SetAttributes(v map[string][]*string) *EndpointResponse { - s.Attributes = v - return s -} - -// SetChannelType sets the ChannelType field's value. -func (s *EndpointResponse) SetChannelType(v string) *EndpointResponse { - s.ChannelType = &v - return s -} - -// SetCohortId sets the CohortId field's value. -func (s *EndpointResponse) SetCohortId(v string) *EndpointResponse { - s.CohortId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *EndpointResponse) SetCreationDate(v string) *EndpointResponse { - s.CreationDate = &v - return s -} - -// SetDemographic sets the Demographic field's value. -func (s *EndpointResponse) SetDemographic(v *EndpointDemographic) *EndpointResponse { - s.Demographic = v - return s -} - -// SetEffectiveDate sets the EffectiveDate field's value. -func (s *EndpointResponse) SetEffectiveDate(v string) *EndpointResponse { - s.EffectiveDate = &v - return s -} - -// SetEndpointStatus sets the EndpointStatus field's value. -func (s *EndpointResponse) SetEndpointStatus(v string) *EndpointResponse { - s.EndpointStatus = &v - return s -} - -// SetId sets the Id field's value. -func (s *EndpointResponse) SetId(v string) *EndpointResponse { - s.Id = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *EndpointResponse) SetLocation(v *EndpointLocation) *EndpointResponse { - s.Location = v - return s -} - -// SetMetrics sets the Metrics field's value. -func (s *EndpointResponse) SetMetrics(v map[string]*float64) *EndpointResponse { - s.Metrics = v - return s -} - -// SetOptOut sets the OptOut field's value. -func (s *EndpointResponse) SetOptOut(v string) *EndpointResponse { - s.OptOut = &v - return s -} - -// SetRequestId sets the RequestId field's value. -func (s *EndpointResponse) SetRequestId(v string) *EndpointResponse { - s.RequestId = &v - return s -} - -// SetUser sets the User field's value. -func (s *EndpointResponse) SetUser(v *EndpointUser) *EndpointResponse { - s.User = v - return s -} - -// Endpoint send configuration. -type EndpointSendConfiguration struct { - _ struct{} `type:"structure"` - - // Body override. If specified will override default body. - BodyOverride *string `type:"string"` - - // A map of custom attributes to attributes to be attached to the message for - // this address. This payload is added to the push notification's 'data.pinpoint' - // object or added to the email/sms delivery receipt event attributes. - Context map[string]*string `type:"map"` - - // The Raw JSON formatted string to be used as the payload. This value overrides - // the message. - RawContent *string `type:"string"` - - // A map of substitution values for the message to be merged with the DefaultMessage's - // substitutions. Substitutions on this map take precedence over the all other - // substitutions. - Substitutions map[string][]*string `type:"map"` - - // Title override. If specified will override default title if applicable. - TitleOverride *string `type:"string"` -} - -// String returns the string representation -func (s EndpointSendConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointSendConfiguration) GoString() string { - return s.String() -} - -// SetBodyOverride sets the BodyOverride field's value. -func (s *EndpointSendConfiguration) SetBodyOverride(v string) *EndpointSendConfiguration { - s.BodyOverride = &v - return s -} - -// SetContext sets the Context field's value. -func (s *EndpointSendConfiguration) SetContext(v map[string]*string) *EndpointSendConfiguration { - s.Context = v - return s -} - -// SetRawContent sets the RawContent field's value. -func (s *EndpointSendConfiguration) SetRawContent(v string) *EndpointSendConfiguration { - s.RawContent = &v - return s -} - -// SetSubstitutions sets the Substitutions field's value. -func (s *EndpointSendConfiguration) SetSubstitutions(v map[string][]*string) *EndpointSendConfiguration { - s.Substitutions = v - return s -} - -// SetTitleOverride sets the TitleOverride field's value. -func (s *EndpointSendConfiguration) SetTitleOverride(v string) *EndpointSendConfiguration { - s.TitleOverride = &v - return s -} - -// Endpoint user specific custom userAttributes -type EndpointUser struct { - _ struct{} `type:"structure"` - - // Custom attributes that describe the user by associating a name with an array - // of values. For example, an attribute named "interests" might have the following - // values: ["science", "politics", "travel"]. You can use these attributes as - // selection criteria when you create segments.The Amazon Pinpoint console can't - // display attribute names that include the following characters: hash/pound - // sign (#), colon (:), question mark (?), backslash (\), and forward slash - // (/). For this reason, you should avoid using these characters in the names - // of custom attributes. - UserAttributes map[string][]*string `type:"map"` - - // The unique ID of the user. - UserId *string `type:"string"` -} - -// String returns the string representation -func (s EndpointUser) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointUser) GoString() string { - return s.String() -} - -// SetUserAttributes sets the UserAttributes field's value. -func (s *EndpointUser) SetUserAttributes(v map[string][]*string) *EndpointUser { - s.UserAttributes = v - return s -} - -// SetUserId sets the UserId field's value. -func (s *EndpointUser) SetUserId(v string) *EndpointUser { - s.UserId = &v - return s -} - -// List of endpoints -type EndpointsResponse struct { - _ struct{} `type:"structure"` - - // The list of endpoints. - Item []*EndpointResponse `type:"list"` -} - -// String returns the string representation -func (s EndpointsResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointsResponse) GoString() string { - return s.String() -} - -// SetItem sets the Item field's value. -func (s *EndpointsResponse) SetItem(v []*EndpointResponse) *EndpointsResponse { - s.Item = v - return s -} - -// Model for creating or updating events. -type Event struct { - _ struct{} `type:"structure"` - - // The package name associated with the app that's recording the event. - AppPackageName *string `type:"string"` - - // The title of the app that's recording the event. - AppTitle *string `type:"string"` - - // The version number of the app that's recording the event. - AppVersionCode *string `type:"string"` - - // Custom attributes that are associated with the event you're adding or updating. - Attributes map[string]*string `type:"map"` - - // The version of the SDK that's running on the client device. - ClientSdkVersion *string `type:"string"` - - // The name of the custom event that you're recording. - EventType *string `type:"string"` - - // Custom metrics related to the event. - Metrics map[string]*float64 `type:"map"` - - // The name of the SDK that's being used to record the event. - SdkName *string `type:"string"` - - // Information about the session in which the event occurred. - Session *Session `type:"structure"` - - // The date and time when the event occurred, in ISO 8601 format. - Timestamp *string `type:"string"` -} - -// String returns the string representation -func (s Event) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Event) GoString() string { - return s.String() -} - -// SetAppPackageName sets the AppPackageName field's value. -func (s *Event) SetAppPackageName(v string) *Event { - s.AppPackageName = &v - return s -} - -// SetAppTitle sets the AppTitle field's value. -func (s *Event) SetAppTitle(v string) *Event { - s.AppTitle = &v - return s -} - -// SetAppVersionCode sets the AppVersionCode field's value. -func (s *Event) SetAppVersionCode(v string) *Event { - s.AppVersionCode = &v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *Event) SetAttributes(v map[string]*string) *Event { - s.Attributes = v - return s -} - -// SetClientSdkVersion sets the ClientSdkVersion field's value. -func (s *Event) SetClientSdkVersion(v string) *Event { - s.ClientSdkVersion = &v - return s -} - -// SetEventType sets the EventType field's value. -func (s *Event) SetEventType(v string) *Event { - s.EventType = &v - return s -} - -// SetMetrics sets the Metrics field's value. -func (s *Event) SetMetrics(v map[string]*float64) *Event { - s.Metrics = v - return s -} - -// SetSdkName sets the SdkName field's value. -func (s *Event) SetSdkName(v string) *Event { - s.SdkName = &v - return s -} - -// SetSession sets the Session field's value. -func (s *Event) SetSession(v *Session) *Event { - s.Session = v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *Event) SetTimestamp(v string) *Event { - s.Timestamp = &v - return s -} - -// Event dimensions. -type EventDimensions struct { - _ struct{} `type:"structure"` - - // Custom attributes that your app reports to Amazon Pinpoint. You can use these - // attributes as selection criteria when you create an event filter. - Attributes map[string]*AttributeDimension `type:"map"` - - // The name of the event that causes the campaign to be sent. This can be a - // standard event type that Amazon Pinpoint generates, such as _session.start, - // or a custom event that's specific to your app. - EventType *SetDimension `type:"structure"` - - // Custom metrics that your app reports to Amazon Pinpoint. You can use these - // attributes as selection criteria when you create an event filter. - Metrics map[string]*MetricDimension `type:"map"` -} - -// String returns the string representation -func (s EventDimensions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventDimensions) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *EventDimensions) SetAttributes(v map[string]*AttributeDimension) *EventDimensions { - s.Attributes = v - return s -} - -// SetEventType sets the EventType field's value. -func (s *EventDimensions) SetEventType(v *SetDimension) *EventDimensions { - s.EventType = v - return s -} - -// SetMetrics sets the Metrics field's value. -func (s *EventDimensions) SetMetrics(v map[string]*MetricDimension) *EventDimensions { - s.Metrics = v - return s -} - -// A complex object that holds the status code and message as a result of processing -// an event. -type EventItemResponse struct { - _ struct{} `type:"structure"` - - // A custom message that is associated with the processing of an event. - Message *string `type:"string"` - - // The status returned in the response as a result of processing the event.Possible - // values: 400 (for invalid events) and 202 (for events that were accepted). - StatusCode *int64 `type:"integer"` -} - -// String returns the string representation -func (s EventItemResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventItemResponse) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *EventItemResponse) SetMessage(v string) *EventItemResponse { - s.Message = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *EventItemResponse) SetStatusCode(v int64) *EventItemResponse { - s.StatusCode = &v - return s -} - -// Model for an event publishing subscription export. -type EventStream struct { - _ struct{} `type:"structure"` - - // The ID of the application from which events should be published. - ApplicationId *string `type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery - // stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME - // Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME - DestinationStreamArn *string `type:"string"` - - // (Deprecated) Your AWS account ID, which you assigned to the ExternalID key - // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This - // requirement is removed, and external IDs are not recommended for IAM roles - // assumed by Amazon Pinpoint. - ExternalId *string `type:"string"` - - // The date the event stream was last updated in ISO 8601 format. - LastModifiedDate *string `type:"string"` - - // The IAM user who last modified the event stream. - LastUpdatedBy *string `type:"string"` - - // The IAM role that authorizes Amazon Pinpoint to publish events to the stream - // in your account. - RoleArn *string `type:"string"` -} - -// String returns the string representation -func (s EventStream) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventStream) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *EventStream) SetApplicationId(v string) *EventStream { - s.ApplicationId = &v - return s -} - -// SetDestinationStreamArn sets the DestinationStreamArn field's value. -func (s *EventStream) SetDestinationStreamArn(v string) *EventStream { - s.DestinationStreamArn = &v - return s -} - -// SetExternalId sets the ExternalId field's value. -func (s *EventStream) SetExternalId(v string) *EventStream { - s.ExternalId = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *EventStream) SetLastModifiedDate(v string) *EventStream { - s.LastModifiedDate = &v - return s -} - -// SetLastUpdatedBy sets the LastUpdatedBy field's value. -func (s *EventStream) SetLastUpdatedBy(v string) *EventStream { - s.LastUpdatedBy = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *EventStream) SetRoleArn(v string) *EventStream { - s.RoleArn = &v - return s -} - -// A batch of PublicEndpoints and Events to process. -type EventsBatch struct { - _ struct{} `type:"structure"` - - // The PublicEndpoint attached to the EndpointId from the request. - Endpoint *PublicEndpoint `type:"structure"` - - // An object that contains a set of events associated with the endpoint. - Events map[string]*Event `type:"map"` -} - -// String returns the string representation -func (s EventsBatch) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventsBatch) GoString() string { - return s.String() -} - -// SetEndpoint sets the Endpoint field's value. -func (s *EventsBatch) SetEndpoint(v *PublicEndpoint) *EventsBatch { - s.Endpoint = v - return s -} - -// SetEvents sets the Events field's value. -func (s *EventsBatch) SetEvents(v map[string]*Event) *EventsBatch { - s.Events = v - return s -} - -// A set of events to process. -type EventsRequest struct { - _ struct{} `type:"structure"` - - // A batch of events to process. Each BatchItem consists of an endpoint ID as - // the key, and an EventsBatch object as the value. - BatchItem map[string]*EventsBatch `type:"map"` -} - -// String returns the string representation -func (s EventsRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventsRequest) GoString() string { - return s.String() -} - -// SetBatchItem sets the BatchItem field's value. -func (s *EventsRequest) SetBatchItem(v map[string]*EventsBatch) *EventsRequest { - s.BatchItem = v - return s -} - -// Custom messages associated with events. -type EventsResponse struct { - _ struct{} `type:"structure"` - - // A map that contains a multipart response for each endpoint. Each item in - // this object uses the endpoint ID as the key, and the item response as the - // value.If no item response exists, the value can also be one of the following: - // 202 (if the request was processed successfully) or 400 (if the payload was - // invalid, or required fields were missing). - Results map[string]*ItemResponse `type:"map"` -} - -// String returns the string representation -func (s EventsResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventsResponse) GoString() string { - return s.String() -} - -// SetResults sets the Results field's value. -func (s *EventsResponse) SetResults(v map[string]*ItemResponse) *EventsResponse { - s.Results = v - return s -} - -// Export job request. -type ExportJobRequest struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint - // access to the Amazon S3 location that endpoints will be exported to. - RoleArn *string `type:"string"` - - // A URL that points to the location within an Amazon S3 bucket that will receive - // the export. The location is typically a folder with multiple files.The URL - // should follow this format: s3://bucket-name/folder-name/Amazon Pinpoint will - // export endpoints to this location. - S3UrlPrefix *string `type:"string"` - - // The ID of the segment to export endpoints from. If not present, Amazon Pinpoint - // exports all of the endpoints that belong to the application. - SegmentId *string `type:"string"` - - // The version of the segment to export if specified. - SegmentVersion *int64 `type:"integer"` -} - -// String returns the string representation -func (s ExportJobRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportJobRequest) GoString() string { - return s.String() -} - -// SetRoleArn sets the RoleArn field's value. -func (s *ExportJobRequest) SetRoleArn(v string) *ExportJobRequest { - s.RoleArn = &v - return s -} - -// SetS3UrlPrefix sets the S3UrlPrefix field's value. -func (s *ExportJobRequest) SetS3UrlPrefix(v string) *ExportJobRequest { - s.S3UrlPrefix = &v - return s -} - -// SetSegmentId sets the SegmentId field's value. -func (s *ExportJobRequest) SetSegmentId(v string) *ExportJobRequest { - s.SegmentId = &v - return s -} - -// SetSegmentVersion sets the SegmentVersion field's value. -func (s *ExportJobRequest) SetSegmentVersion(v int64) *ExportJobRequest { - s.SegmentVersion = &v - return s -} - -// Export job resource. -type ExportJobResource struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint - // access to the Amazon S3 location that endpoints will be exported to. - RoleArn *string `type:"string"` - - // A URL that points to the location within an Amazon S3 bucket that will receive - // the export. The location is typically a folder with multiple files.The URL - // should follow this format: s3://bucket-name/folder-name/Amazon Pinpoint will - // export endpoints to this location. - S3UrlPrefix *string `type:"string"` - - // The ID of the segment to export endpoints from. If not present, Amazon Pinpoint - // exports all of the endpoints that belong to the application. - SegmentId *string `type:"string"` - - // The version of the segment to export if specified. - SegmentVersion *int64 `type:"integer"` -} - -// String returns the string representation -func (s ExportJobResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportJobResource) GoString() string { - return s.String() -} - -// SetRoleArn sets the RoleArn field's value. -func (s *ExportJobResource) SetRoleArn(v string) *ExportJobResource { - s.RoleArn = &v - return s -} - -// SetS3UrlPrefix sets the S3UrlPrefix field's value. -func (s *ExportJobResource) SetS3UrlPrefix(v string) *ExportJobResource { - s.S3UrlPrefix = &v - return s -} - -// SetSegmentId sets the SegmentId field's value. -func (s *ExportJobResource) SetSegmentId(v string) *ExportJobResource { - s.SegmentId = &v - return s -} - -// SetSegmentVersion sets the SegmentVersion field's value. -func (s *ExportJobResource) SetSegmentVersion(v int64) *ExportJobResource { - s.SegmentVersion = &v - return s -} - -// Export job response. -type ExportJobResponse struct { - _ struct{} `type:"structure"` - - // The unique ID of the application associated with the export job. - ApplicationId *string `type:"string"` - - // The number of pieces that have successfully completed as of the time of the - // request. - CompletedPieces *int64 `type:"integer"` - - // The date the job completed in ISO 8601 format. - CompletionDate *string `type:"string"` - - // The date the job was created in ISO 8601 format. - CreationDate *string `type:"string"` - - // The export job settings. - Definition *ExportJobResource `type:"structure"` - - // The number of pieces that failed to be processed as of the time of the request. - FailedPieces *int64 `type:"integer"` - - // Provides up to 100 of the first failed entries for the job, if any exist. - Failures []*string `type:"list"` - - // The unique ID of the job. - Id *string `type:"string"` - - // The status of the job.Valid values: CREATED, INITIALIZING, PROCESSING, COMPLETING, - // COMPLETED, FAILING, FAILEDThe job status is FAILED if one or more pieces - // failed. - JobStatus *string `type:"string" enum:"JobStatus"` - - // The number of endpoints that were not processed; for example, because of - // syntax errors. - TotalFailures *int64 `type:"integer"` - - // The total number of pieces that must be processed to finish the job. Each - // piece is an approximately equal portion of the endpoints. - TotalPieces *int64 `type:"integer"` - - // The number of endpoints that were processed by the job. - TotalProcessed *int64 `type:"integer"` - - // The job type. Will be 'EXPORT'. - Type *string `type:"string"` -} - -// String returns the string representation -func (s ExportJobResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportJobResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *ExportJobResponse) SetApplicationId(v string) *ExportJobResponse { - s.ApplicationId = &v - return s -} - -// SetCompletedPieces sets the CompletedPieces field's value. -func (s *ExportJobResponse) SetCompletedPieces(v int64) *ExportJobResponse { - s.CompletedPieces = &v - return s -} - -// SetCompletionDate sets the CompletionDate field's value. -func (s *ExportJobResponse) SetCompletionDate(v string) *ExportJobResponse { - s.CompletionDate = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *ExportJobResponse) SetCreationDate(v string) *ExportJobResponse { - s.CreationDate = &v - return s -} - -// SetDefinition sets the Definition field's value. -func (s *ExportJobResponse) SetDefinition(v *ExportJobResource) *ExportJobResponse { - s.Definition = v - return s -} - -// SetFailedPieces sets the FailedPieces field's value. -func (s *ExportJobResponse) SetFailedPieces(v int64) *ExportJobResponse { - s.FailedPieces = &v - return s -} - -// SetFailures sets the Failures field's value. -func (s *ExportJobResponse) SetFailures(v []*string) *ExportJobResponse { - s.Failures = v - return s -} - -// SetId sets the Id field's value. -func (s *ExportJobResponse) SetId(v string) *ExportJobResponse { - s.Id = &v - return s -} - -// SetJobStatus sets the JobStatus field's value. -func (s *ExportJobResponse) SetJobStatus(v string) *ExportJobResponse { - s.JobStatus = &v - return s -} - -// SetTotalFailures sets the TotalFailures field's value. -func (s *ExportJobResponse) SetTotalFailures(v int64) *ExportJobResponse { - s.TotalFailures = &v - return s -} - -// SetTotalPieces sets the TotalPieces field's value. -func (s *ExportJobResponse) SetTotalPieces(v int64) *ExportJobResponse { - s.TotalPieces = &v - return s -} - -// SetTotalProcessed sets the TotalProcessed field's value. -func (s *ExportJobResponse) SetTotalProcessed(v int64) *ExportJobResponse { - s.TotalProcessed = &v - return s -} - -// SetType sets the Type field's value. -func (s *ExportJobResponse) SetType(v string) *ExportJobResponse { - s.Type = &v - return s -} - -// Export job list. -type ExportJobsResponse struct { - _ struct{} `type:"structure"` - - // A list of export jobs for the application. - Item []*ExportJobResponse `type:"list"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ExportJobsResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExportJobsResponse) GoString() string { - return s.String() -} - -// SetItem sets the Item field's value. -func (s *ExportJobsResponse) SetItem(v []*ExportJobResponse) *ExportJobsResponse { - s.Item = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ExportJobsResponse) SetNextToken(v string) *ExportJobsResponse { - s.NextToken = &v - return s -} - -// Google Cloud Messaging credentials -type GCMChannelRequest struct { - _ struct{} `type:"structure"` - - // Platform credential API key from Google. - ApiKey *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s GCMChannelRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GCMChannelRequest) GoString() string { - return s.String() -} - -// SetApiKey sets the ApiKey field's value. -func (s *GCMChannelRequest) SetApiKey(v string) *GCMChannelRequest { - s.ApiKey = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *GCMChannelRequest) SetEnabled(v bool) *GCMChannelRequest { - s.Enabled = &v - return s -} - -// Google Cloud Messaging channel definition -type GCMChannelResponse struct { - _ struct{} `type:"structure"` - - // The ID of the application to which the channel applies. - ApplicationId *string `type:"string"` - - // When was this segment created - CreationDate *string `type:"string"` - - // The GCM API key from Google. - Credential *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // Not used. Retained for backwards compatibility. - HasCredential *bool `type:"boolean"` - - // Channel ID. Not used. Present only for backwards compatibility. - Id *string `type:"string"` - - // Is this channel archived - IsArchived *bool `type:"boolean"` - - // Who last updated this entry - LastModifiedBy *string `type:"string"` - - // Last date this was updated - LastModifiedDate *string `type:"string"` - - // The platform type. Will be GCM - Platform *string `type:"string"` - - // Version of channel - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s GCMChannelResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GCMChannelResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GCMChannelResponse) SetApplicationId(v string) *GCMChannelResponse { - s.ApplicationId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *GCMChannelResponse) SetCreationDate(v string) *GCMChannelResponse { - s.CreationDate = &v - return s -} - -// SetCredential sets the Credential field's value. -func (s *GCMChannelResponse) SetCredential(v string) *GCMChannelResponse { - s.Credential = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *GCMChannelResponse) SetEnabled(v bool) *GCMChannelResponse { - s.Enabled = &v - return s -} - -// SetHasCredential sets the HasCredential field's value. -func (s *GCMChannelResponse) SetHasCredential(v bool) *GCMChannelResponse { - s.HasCredential = &v - return s -} - -// SetId sets the Id field's value. -func (s *GCMChannelResponse) SetId(v string) *GCMChannelResponse { - s.Id = &v - return s -} - -// SetIsArchived sets the IsArchived field's value. -func (s *GCMChannelResponse) SetIsArchived(v bool) *GCMChannelResponse { - s.IsArchived = &v - return s -} - -// SetLastModifiedBy sets the LastModifiedBy field's value. -func (s *GCMChannelResponse) SetLastModifiedBy(v string) *GCMChannelResponse { - s.LastModifiedBy = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *GCMChannelResponse) SetLastModifiedDate(v string) *GCMChannelResponse { - s.LastModifiedDate = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *GCMChannelResponse) SetPlatform(v string) *GCMChannelResponse { - s.Platform = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GCMChannelResponse) SetVersion(v int64) *GCMChannelResponse { - s.Version = &v - return s -} - -// GCM Message. -type GCMMessage struct { - _ struct{} `type:"structure"` - - // The action that occurs if the user taps a push notification delivered by - // the campaign: OPEN_APP - Your app launches, or it becomes the foreground - // app if it has been sent to the background. This is the default action. DEEP_LINK - // - Uses deep linking features in iOS and Android to open your app and display - // a designated user interface within the app. URL - The default mobile browser - // on the user's device launches and opens a web page at the URL you specify. - // Possible values include: OPEN_APP | DEEP_LINK | URL - Action *string `type:"string" enum:"Action"` - - // The message body of the notification. - Body *string `type:"string"` - - // This parameter identifies a group of messages (e.g., with collapse_key: "Updates - // Available") that can be collapsed, so that only the last message gets sent - // when delivery can be resumed. This is intended to avoid sending too many - // of the same messages when the device comes back online or becomes active. - CollapseKey *string `type:"string"` - - // The data payload used for a silent push. This payload is added to the notifications' - // data.pinpoint.jsonBody' object - Data map[string]*string `type:"map"` - - // The icon image name of the asset saved in your application. - IconReference *string `type:"string"` - - // The URL that points to an image used as the large icon to the notification - // content view. - ImageIconUrl *string `type:"string"` - - // The URL that points to an image used in the push notification. - ImageUrl *string `type:"string"` - - // The message priority. Amazon Pinpoint uses this value to set the FCM or GCM - // priority parameter when it sends the message. Accepts the following values:"Normal" - // - Messages might be delayed. Delivery is optimized for battery usage on the - // receiving device. Use normal priority unless immediate delivery is required."High" - // - Messages are sent immediately and might wake a sleeping device.The equivalent - // values for APNs messages are "5" and "10". Amazon Pinpoint accepts these - // values here and converts them.For more information, see About FCM Messages - // in the Firebase documentation. - Priority *string `type:"string"` - - // The Raw JSON formatted string to be used as the payload. This value overrides - // the message. - RawContent *string `type:"string"` - - // This parameter specifies the package name of the application where the registration - // tokens must match in order to receive the message. - RestrictedPackageName *string `type:"string"` - - // Indicates if the message should display on the users device. Silent pushes - // can be used for Remote Configuration and Phone Home use cases. - SilentPush *bool `type:"boolean"` - - // The URL that points to an image used as the small icon for the notification - // which will be used to represent the notification in the status bar and content - // view - SmallImageIconUrl *string `type:"string"` - - // Indicates a sound to play when the device receives the notification. Supports - // default, or the filename of a sound resource bundled in the app. Android - // sound files must reside in /res/raw/ - Sound *string `type:"string"` - - // Default message substitutions. Can be overridden by individual address substitutions. - Substitutions map[string][]*string `type:"map"` - - // The length of time (in seconds) that FCM or GCM stores and attempts to deliver - // the message. If unspecified, the value defaults to the maximum, which is - // 2,419,200 seconds (28 days). Amazon Pinpoint uses this value to set the FCM - // or GCM time_to_live parameter. - TimeToLive *int64 `type:"integer"` - - // The message title that displays above the message on the user's device. - Title *string `type:"string"` - - // The URL to open in the user's mobile browser. Used if the value for Action - // is URL. - Url *string `type:"string"` -} - -// String returns the string representation -func (s GCMMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GCMMessage) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *GCMMessage) SetAction(v string) *GCMMessage { - s.Action = &v - return s -} - -// SetBody sets the Body field's value. -func (s *GCMMessage) SetBody(v string) *GCMMessage { - s.Body = &v - return s -} - -// SetCollapseKey sets the CollapseKey field's value. -func (s *GCMMessage) SetCollapseKey(v string) *GCMMessage { - s.CollapseKey = &v - return s -} - -// SetData sets the Data field's value. -func (s *GCMMessage) SetData(v map[string]*string) *GCMMessage { - s.Data = v - return s -} - -// SetIconReference sets the IconReference field's value. -func (s *GCMMessage) SetIconReference(v string) *GCMMessage { - s.IconReference = &v - return s -} - -// SetImageIconUrl sets the ImageIconUrl field's value. -func (s *GCMMessage) SetImageIconUrl(v string) *GCMMessage { - s.ImageIconUrl = &v - return s -} - -// SetImageUrl sets the ImageUrl field's value. -func (s *GCMMessage) SetImageUrl(v string) *GCMMessage { - s.ImageUrl = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *GCMMessage) SetPriority(v string) *GCMMessage { - s.Priority = &v - return s -} - -// SetRawContent sets the RawContent field's value. -func (s *GCMMessage) SetRawContent(v string) *GCMMessage { - s.RawContent = &v - return s -} - -// SetRestrictedPackageName sets the RestrictedPackageName field's value. -func (s *GCMMessage) SetRestrictedPackageName(v string) *GCMMessage { - s.RestrictedPackageName = &v - return s -} - -// SetSilentPush sets the SilentPush field's value. -func (s *GCMMessage) SetSilentPush(v bool) *GCMMessage { - s.SilentPush = &v - return s -} - -// SetSmallImageIconUrl sets the SmallImageIconUrl field's value. -func (s *GCMMessage) SetSmallImageIconUrl(v string) *GCMMessage { - s.SmallImageIconUrl = &v - return s -} - -// SetSound sets the Sound field's value. -func (s *GCMMessage) SetSound(v string) *GCMMessage { - s.Sound = &v - return s -} - -// SetSubstitutions sets the Substitutions field's value. -func (s *GCMMessage) SetSubstitutions(v map[string][]*string) *GCMMessage { - s.Substitutions = v - return s -} - -// SetTimeToLive sets the TimeToLive field's value. -func (s *GCMMessage) SetTimeToLive(v int64) *GCMMessage { - s.TimeToLive = &v - return s -} - -// SetTitle sets the Title field's value. -func (s *GCMMessage) SetTitle(v string) *GCMMessage { - s.Title = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *GCMMessage) SetUrl(v string) *GCMMessage { - s.Url = &v - return s -} - -// GPS coordinates -type GPSCoordinates struct { - _ struct{} `type:"structure"` - - // Latitude - Latitude *float64 `type:"double"` - - // Longitude - Longitude *float64 `type:"double"` -} - -// String returns the string representation -func (s GPSCoordinates) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GPSCoordinates) GoString() string { - return s.String() -} - -// SetLatitude sets the Latitude field's value. -func (s *GPSCoordinates) SetLatitude(v float64) *GPSCoordinates { - s.Latitude = &v - return s -} - -// SetLongitude sets the Longitude field's value. -func (s *GPSCoordinates) SetLongitude(v float64) *GPSCoordinates { - s.Longitude = &v - return s -} - -// GPS point location dimension -type GPSPointDimension struct { - _ struct{} `type:"structure"` - - // Coordinate to measure distance from. - Coordinates *GPSCoordinates `type:"structure"` - - // Range in kilometers from the coordinate. - RangeInKilometers *float64 `type:"double"` -} - -// String returns the string representation -func (s GPSPointDimension) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GPSPointDimension) GoString() string { - return s.String() -} - -// SetCoordinates sets the Coordinates field's value. -func (s *GPSPointDimension) SetCoordinates(v *GPSCoordinates) *GPSPointDimension { - s.Coordinates = v - return s -} - -// SetRangeInKilometers sets the RangeInKilometers field's value. -func (s *GPSPointDimension) SetRangeInKilometers(v float64) *GPSPointDimension { - s.RangeInKilometers = &v - return s -} - -type GetAdmChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetAdmChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAdmChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAdmChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAdmChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetAdmChannelInput) SetApplicationId(v string) *GetAdmChannelInput { - s.ApplicationId = &v - return s -} - -type GetAdmChannelOutput struct { - _ struct{} `type:"structure" payload:"ADMChannelResponse"` - - // Amazon Device Messaging channel definition. - // - // ADMChannelResponse is a required field - ADMChannelResponse *ADMChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetAdmChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAdmChannelOutput) GoString() string { - return s.String() -} - -// SetADMChannelResponse sets the ADMChannelResponse field's value. -func (s *GetAdmChannelOutput) SetADMChannelResponse(v *ADMChannelResponse) *GetAdmChannelOutput { - s.ADMChannelResponse = v - return s -} - -type GetApnsChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetApnsChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApnsChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetApnsChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetApnsChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetApnsChannelInput) SetApplicationId(v string) *GetApnsChannelInput { - s.ApplicationId = &v - return s -} - -type GetApnsChannelOutput struct { - _ struct{} `type:"structure" payload:"APNSChannelResponse"` - - // Apple Distribution Push Notification Service channel definition. - // - // APNSChannelResponse is a required field - APNSChannelResponse *APNSChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetApnsChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApnsChannelOutput) GoString() string { - return s.String() -} - -// SetAPNSChannelResponse sets the APNSChannelResponse field's value. -func (s *GetApnsChannelOutput) SetAPNSChannelResponse(v *APNSChannelResponse) *GetApnsChannelOutput { - s.APNSChannelResponse = v - return s -} - -type GetApnsSandboxChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetApnsSandboxChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApnsSandboxChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetApnsSandboxChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetApnsSandboxChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetApnsSandboxChannelInput) SetApplicationId(v string) *GetApnsSandboxChannelInput { - s.ApplicationId = &v - return s -} - -type GetApnsSandboxChannelOutput struct { - _ struct{} `type:"structure" payload:"APNSSandboxChannelResponse"` - - // Apple Development Push Notification Service channel definition. - // - // APNSSandboxChannelResponse is a required field - APNSSandboxChannelResponse *APNSSandboxChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetApnsSandboxChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApnsSandboxChannelOutput) GoString() string { - return s.String() -} - -// SetAPNSSandboxChannelResponse sets the APNSSandboxChannelResponse field's value. -func (s *GetApnsSandboxChannelOutput) SetAPNSSandboxChannelResponse(v *APNSSandboxChannelResponse) *GetApnsSandboxChannelOutput { - s.APNSSandboxChannelResponse = v - return s -} - -type GetApnsVoipChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetApnsVoipChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApnsVoipChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetApnsVoipChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetApnsVoipChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetApnsVoipChannelInput) SetApplicationId(v string) *GetApnsVoipChannelInput { - s.ApplicationId = &v - return s -} - -type GetApnsVoipChannelOutput struct { - _ struct{} `type:"structure" payload:"APNSVoipChannelResponse"` - - // Apple VoIP Push Notification Service channel definition. - // - // APNSVoipChannelResponse is a required field - APNSVoipChannelResponse *APNSVoipChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetApnsVoipChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApnsVoipChannelOutput) GoString() string { - return s.String() -} - -// SetAPNSVoipChannelResponse sets the APNSVoipChannelResponse field's value. -func (s *GetApnsVoipChannelOutput) SetAPNSVoipChannelResponse(v *APNSVoipChannelResponse) *GetApnsVoipChannelOutput { - s.APNSVoipChannelResponse = v - return s -} - -type GetApnsVoipSandboxChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetApnsVoipSandboxChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApnsVoipSandboxChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetApnsVoipSandboxChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetApnsVoipSandboxChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetApnsVoipSandboxChannelInput) SetApplicationId(v string) *GetApnsVoipSandboxChannelInput { - s.ApplicationId = &v - return s -} - -type GetApnsVoipSandboxChannelOutput struct { - _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelResponse"` - - // Apple VoIP Developer Push Notification Service channel definition. - // - // APNSVoipSandboxChannelResponse is a required field - APNSVoipSandboxChannelResponse *APNSVoipSandboxChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetApnsVoipSandboxChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApnsVoipSandboxChannelOutput) GoString() string { - return s.String() -} - -// SetAPNSVoipSandboxChannelResponse sets the APNSVoipSandboxChannelResponse field's value. -func (s *GetApnsVoipSandboxChannelOutput) SetAPNSVoipSandboxChannelResponse(v *APNSVoipSandboxChannelResponse) *GetApnsVoipSandboxChannelOutput { - s.APNSVoipSandboxChannelResponse = v - return s -} - -type GetAppInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetAppInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAppInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAppInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAppInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetAppInput) SetApplicationId(v string) *GetAppInput { - s.ApplicationId = &v - return s -} - -type GetAppOutput struct { - _ struct{} `type:"structure" payload:"ApplicationResponse"` - - // Application Response. - // - // ApplicationResponse is a required field - ApplicationResponse *ApplicationResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetAppOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAppOutput) GoString() string { - return s.String() -} - -// SetApplicationResponse sets the ApplicationResponse field's value. -func (s *GetAppOutput) SetApplicationResponse(v *ApplicationResponse) *GetAppOutput { - s.ApplicationResponse = v - return s -} - -type GetApplicationSettingsInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetApplicationSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApplicationSettingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetApplicationSettingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetApplicationSettingsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetApplicationSettingsInput) SetApplicationId(v string) *GetApplicationSettingsInput { - s.ApplicationId = &v - return s -} - -type GetApplicationSettingsOutput struct { - _ struct{} `type:"structure" payload:"ApplicationSettingsResource"` - - // Application settings. - // - // ApplicationSettingsResource is a required field - ApplicationSettingsResource *ApplicationSettingsResource `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetApplicationSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApplicationSettingsOutput) GoString() string { - return s.String() -} - -// SetApplicationSettingsResource sets the ApplicationSettingsResource field's value. -func (s *GetApplicationSettingsOutput) SetApplicationSettingsResource(v *ApplicationSettingsResource) *GetApplicationSettingsOutput { - s.ApplicationSettingsResource = v - return s -} - -type GetAppsInput struct { - _ struct{} `type:"structure"` - - PageSize *string `location:"querystring" locationName:"page-size" type:"string"` - - Token *string `location:"querystring" locationName:"token" type:"string"` -} - -// String returns the string representation -func (s GetAppsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAppsInput) GoString() string { - return s.String() -} - -// SetPageSize sets the PageSize field's value. -func (s *GetAppsInput) SetPageSize(v string) *GetAppsInput { - s.PageSize = &v - return s -} - -// SetToken sets the Token field's value. -func (s *GetAppsInput) SetToken(v string) *GetAppsInput { - s.Token = &v - return s -} - -type GetAppsOutput struct { - _ struct{} `type:"structure" payload:"ApplicationsResponse"` - - // Get Applications Result. - // - // ApplicationsResponse is a required field - ApplicationsResponse *ApplicationsResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetAppsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAppsOutput) GoString() string { - return s.String() -} - -// SetApplicationsResponse sets the ApplicationsResponse field's value. -func (s *GetAppsOutput) SetApplicationsResponse(v *ApplicationsResponse) *GetAppsOutput { - s.ApplicationsResponse = v - return s -} - -type GetBaiduChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetBaiduChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBaiduChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBaiduChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBaiduChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetBaiduChannelInput) SetApplicationId(v string) *GetBaiduChannelInput { - s.ApplicationId = &v - return s -} - -type GetBaiduChannelOutput struct { - _ struct{} `type:"structure" payload:"BaiduChannelResponse"` - - // Baidu Cloud Messaging channel definition - // - // BaiduChannelResponse is a required field - BaiduChannelResponse *BaiduChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetBaiduChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetBaiduChannelOutput) GoString() string { - return s.String() -} - -// SetBaiduChannelResponse sets the BaiduChannelResponse field's value. -func (s *GetBaiduChannelOutput) SetBaiduChannelResponse(v *BaiduChannelResponse) *GetBaiduChannelOutput { - s.BaiduChannelResponse = v - return s -} - -type GetCampaignActivitiesInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // CampaignId is a required field - CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` - - PageSize *string `location:"querystring" locationName:"page-size" type:"string"` - - Token *string `location:"querystring" locationName:"token" type:"string"` -} - -// String returns the string representation -func (s GetCampaignActivitiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCampaignActivitiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCampaignActivitiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCampaignActivitiesInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.CampaignId == nil { - invalidParams.Add(request.NewErrParamRequired("CampaignId")) - } - if s.CampaignId != nil && len(*s.CampaignId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CampaignId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetCampaignActivitiesInput) SetApplicationId(v string) *GetCampaignActivitiesInput { - s.ApplicationId = &v - return s -} - -// SetCampaignId sets the CampaignId field's value. -func (s *GetCampaignActivitiesInput) SetCampaignId(v string) *GetCampaignActivitiesInput { - s.CampaignId = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *GetCampaignActivitiesInput) SetPageSize(v string) *GetCampaignActivitiesInput { - s.PageSize = &v - return s -} - -// SetToken sets the Token field's value. -func (s *GetCampaignActivitiesInput) SetToken(v string) *GetCampaignActivitiesInput { - s.Token = &v - return s -} - -type GetCampaignActivitiesOutput struct { - _ struct{} `type:"structure" payload:"ActivitiesResponse"` - - // Activities for campaign. - // - // ActivitiesResponse is a required field - ActivitiesResponse *ActivitiesResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetCampaignActivitiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCampaignActivitiesOutput) GoString() string { - return s.String() -} - -// SetActivitiesResponse sets the ActivitiesResponse field's value. -func (s *GetCampaignActivitiesOutput) SetActivitiesResponse(v *ActivitiesResponse) *GetCampaignActivitiesOutput { - s.ActivitiesResponse = v - return s -} - -type GetCampaignInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // CampaignId is a required field - CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCampaignInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCampaignInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCampaignInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCampaignInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.CampaignId == nil { - invalidParams.Add(request.NewErrParamRequired("CampaignId")) - } - if s.CampaignId != nil && len(*s.CampaignId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CampaignId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetCampaignInput) SetApplicationId(v string) *GetCampaignInput { - s.ApplicationId = &v - return s -} - -// SetCampaignId sets the CampaignId field's value. -func (s *GetCampaignInput) SetCampaignId(v string) *GetCampaignInput { - s.CampaignId = &v - return s -} - -type GetCampaignOutput struct { - _ struct{} `type:"structure" payload:"CampaignResponse"` - - // Campaign definition - // - // CampaignResponse is a required field - CampaignResponse *CampaignResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetCampaignOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCampaignOutput) GoString() string { - return s.String() -} - -// SetCampaignResponse sets the CampaignResponse field's value. -func (s *GetCampaignOutput) SetCampaignResponse(v *CampaignResponse) *GetCampaignOutput { - s.CampaignResponse = v - return s -} - -type GetCampaignVersionInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // CampaignId is a required field - CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` - - // Version is a required field - Version *string `location:"uri" locationName:"version" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCampaignVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCampaignVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCampaignVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCampaignVersionInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.CampaignId == nil { - invalidParams.Add(request.NewErrParamRequired("CampaignId")) - } - if s.CampaignId != nil && len(*s.CampaignId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CampaignId", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetCampaignVersionInput) SetApplicationId(v string) *GetCampaignVersionInput { - s.ApplicationId = &v - return s -} - -// SetCampaignId sets the CampaignId field's value. -func (s *GetCampaignVersionInput) SetCampaignId(v string) *GetCampaignVersionInput { - s.CampaignId = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetCampaignVersionInput) SetVersion(v string) *GetCampaignVersionInput { - s.Version = &v - return s -} - -type GetCampaignVersionOutput struct { - _ struct{} `type:"structure" payload:"CampaignResponse"` - - // Campaign definition - // - // CampaignResponse is a required field - CampaignResponse *CampaignResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetCampaignVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCampaignVersionOutput) GoString() string { - return s.String() -} - -// SetCampaignResponse sets the CampaignResponse field's value. -func (s *GetCampaignVersionOutput) SetCampaignResponse(v *CampaignResponse) *GetCampaignVersionOutput { - s.CampaignResponse = v - return s -} - -type GetCampaignVersionsInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // CampaignId is a required field - CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` - - PageSize *string `location:"querystring" locationName:"page-size" type:"string"` - - Token *string `location:"querystring" locationName:"token" type:"string"` -} - -// String returns the string representation -func (s GetCampaignVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCampaignVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCampaignVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCampaignVersionsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.CampaignId == nil { - invalidParams.Add(request.NewErrParamRequired("CampaignId")) - } - if s.CampaignId != nil && len(*s.CampaignId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CampaignId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetCampaignVersionsInput) SetApplicationId(v string) *GetCampaignVersionsInput { - s.ApplicationId = &v - return s -} - -// SetCampaignId sets the CampaignId field's value. -func (s *GetCampaignVersionsInput) SetCampaignId(v string) *GetCampaignVersionsInput { - s.CampaignId = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *GetCampaignVersionsInput) SetPageSize(v string) *GetCampaignVersionsInput { - s.PageSize = &v - return s -} - -// SetToken sets the Token field's value. -func (s *GetCampaignVersionsInput) SetToken(v string) *GetCampaignVersionsInput { - s.Token = &v - return s -} - -type GetCampaignVersionsOutput struct { - _ struct{} `type:"structure" payload:"CampaignsResponse"` - - // List of available campaigns. - // - // CampaignsResponse is a required field - CampaignsResponse *CampaignsResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetCampaignVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCampaignVersionsOutput) GoString() string { - return s.String() -} - -// SetCampaignsResponse sets the CampaignsResponse field's value. -func (s *GetCampaignVersionsOutput) SetCampaignsResponse(v *CampaignsResponse) *GetCampaignVersionsOutput { - s.CampaignsResponse = v - return s -} - -type GetCampaignsInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - PageSize *string `location:"querystring" locationName:"page-size" type:"string"` - - Token *string `location:"querystring" locationName:"token" type:"string"` -} - -// String returns the string representation -func (s GetCampaignsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCampaignsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCampaignsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCampaignsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetCampaignsInput) SetApplicationId(v string) *GetCampaignsInput { - s.ApplicationId = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *GetCampaignsInput) SetPageSize(v string) *GetCampaignsInput { - s.PageSize = &v - return s -} - -// SetToken sets the Token field's value. -func (s *GetCampaignsInput) SetToken(v string) *GetCampaignsInput { - s.Token = &v - return s -} - -type GetCampaignsOutput struct { - _ struct{} `type:"structure" payload:"CampaignsResponse"` - - // List of available campaigns. - // - // CampaignsResponse is a required field - CampaignsResponse *CampaignsResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetCampaignsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCampaignsOutput) GoString() string { - return s.String() -} - -// SetCampaignsResponse sets the CampaignsResponse field's value. -func (s *GetCampaignsOutput) SetCampaignsResponse(v *CampaignsResponse) *GetCampaignsOutput { - s.CampaignsResponse = v - return s -} - -type GetChannelsInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetChannelsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetChannelsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetChannelsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetChannelsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetChannelsInput) SetApplicationId(v string) *GetChannelsInput { - s.ApplicationId = &v - return s -} - -type GetChannelsOutput struct { - _ struct{} `type:"structure" payload:"ChannelsResponse"` - - // Get channels definition - // - // ChannelsResponse is a required field - ChannelsResponse *ChannelsResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetChannelsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetChannelsOutput) GoString() string { - return s.String() -} - -// SetChannelsResponse sets the ChannelsResponse field's value. -func (s *GetChannelsOutput) SetChannelsResponse(v *ChannelsResponse) *GetChannelsOutput { - s.ChannelsResponse = v - return s -} - -type GetEmailChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetEmailChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEmailChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetEmailChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetEmailChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetEmailChannelInput) SetApplicationId(v string) *GetEmailChannelInput { - s.ApplicationId = &v - return s -} - -type GetEmailChannelOutput struct { - _ struct{} `type:"structure" payload:"EmailChannelResponse"` - - // Email Channel Response. - // - // EmailChannelResponse is a required field - EmailChannelResponse *EmailChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetEmailChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEmailChannelOutput) GoString() string { - return s.String() -} - -// SetEmailChannelResponse sets the EmailChannelResponse field's value. -func (s *GetEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelResponse) *GetEmailChannelOutput { - s.EmailChannelResponse = v - return s -} - -type GetEndpointInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // EndpointId is a required field - EndpointId *string `location:"uri" locationName:"endpoint-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetEndpointInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.EndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointId")) - } - if s.EndpointId != nil && len(*s.EndpointId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EndpointId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetEndpointInput) SetApplicationId(v string) *GetEndpointInput { - s.ApplicationId = &v - return s -} - -// SetEndpointId sets the EndpointId field's value. -func (s *GetEndpointInput) SetEndpointId(v string) *GetEndpointInput { - s.EndpointId = &v - return s -} - -type GetEndpointOutput struct { - _ struct{} `type:"structure" payload:"EndpointResponse"` - - // Endpoint response - // - // EndpointResponse is a required field - EndpointResponse *EndpointResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEndpointOutput) GoString() string { - return s.String() -} - -// SetEndpointResponse sets the EndpointResponse field's value. -func (s *GetEndpointOutput) SetEndpointResponse(v *EndpointResponse) *GetEndpointOutput { - s.EndpointResponse = v - return s -} - -type GetEventStreamInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetEventStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEventStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetEventStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetEventStreamInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetEventStreamInput) SetApplicationId(v string) *GetEventStreamInput { - s.ApplicationId = &v - return s -} - -type GetEventStreamOutput struct { - _ struct{} `type:"structure" payload:"EventStream"` - - // Model for an event publishing subscription export. - // - // EventStream is a required field - EventStream *EventStream `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetEventStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEventStreamOutput) GoString() string { - return s.String() -} - -// SetEventStream sets the EventStream field's value. -func (s *GetEventStreamOutput) SetEventStream(v *EventStream) *GetEventStreamOutput { - s.EventStream = v - return s -} - -type GetExportJobInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // JobId is a required field - JobId *string `location:"uri" locationName:"job-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetExportJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetExportJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetExportJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetExportJobInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetExportJobInput) SetApplicationId(v string) *GetExportJobInput { - s.ApplicationId = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *GetExportJobInput) SetJobId(v string) *GetExportJobInput { - s.JobId = &v - return s -} - -type GetExportJobOutput struct { - _ struct{} `type:"structure" payload:"ExportJobResponse"` - - // Export job response. - // - // ExportJobResponse is a required field - ExportJobResponse *ExportJobResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetExportJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetExportJobOutput) GoString() string { - return s.String() -} - -// SetExportJobResponse sets the ExportJobResponse field's value. -func (s *GetExportJobOutput) SetExportJobResponse(v *ExportJobResponse) *GetExportJobOutput { - s.ExportJobResponse = v - return s -} - -type GetExportJobsInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - PageSize *string `location:"querystring" locationName:"page-size" type:"string"` - - Token *string `location:"querystring" locationName:"token" type:"string"` -} - -// String returns the string representation -func (s GetExportJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetExportJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetExportJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetExportJobsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetExportJobsInput) SetApplicationId(v string) *GetExportJobsInput { - s.ApplicationId = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *GetExportJobsInput) SetPageSize(v string) *GetExportJobsInput { - s.PageSize = &v - return s -} - -// SetToken sets the Token field's value. -func (s *GetExportJobsInput) SetToken(v string) *GetExportJobsInput { - s.Token = &v - return s -} - -type GetExportJobsOutput struct { - _ struct{} `type:"structure" payload:"ExportJobsResponse"` - - // Export job list. - // - // ExportJobsResponse is a required field - ExportJobsResponse *ExportJobsResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetExportJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetExportJobsOutput) GoString() string { - return s.String() -} - -// SetExportJobsResponse sets the ExportJobsResponse field's value. -func (s *GetExportJobsOutput) SetExportJobsResponse(v *ExportJobsResponse) *GetExportJobsOutput { - s.ExportJobsResponse = v - return s -} - -type GetGcmChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetGcmChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGcmChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetGcmChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetGcmChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetGcmChannelInput) SetApplicationId(v string) *GetGcmChannelInput { - s.ApplicationId = &v - return s -} - -type GetGcmChannelOutput struct { - _ struct{} `type:"structure" payload:"GCMChannelResponse"` - - // Google Cloud Messaging channel definition - // - // GCMChannelResponse is a required field - GCMChannelResponse *GCMChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetGcmChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGcmChannelOutput) GoString() string { - return s.String() -} - -// SetGCMChannelResponse sets the GCMChannelResponse field's value. -func (s *GetGcmChannelOutput) SetGCMChannelResponse(v *GCMChannelResponse) *GetGcmChannelOutput { - s.GCMChannelResponse = v - return s -} - -type GetImportJobInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // JobId is a required field - JobId *string `location:"uri" locationName:"job-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetImportJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetImportJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetImportJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetImportJobInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetImportJobInput) SetApplicationId(v string) *GetImportJobInput { - s.ApplicationId = &v - return s -} - -// SetJobId sets the JobId field's value. -func (s *GetImportJobInput) SetJobId(v string) *GetImportJobInput { - s.JobId = &v - return s -} - -type GetImportJobOutput struct { - _ struct{} `type:"structure" payload:"ImportJobResponse"` - - // Import job response. - // - // ImportJobResponse is a required field - ImportJobResponse *ImportJobResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetImportJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetImportJobOutput) GoString() string { - return s.String() -} - -// SetImportJobResponse sets the ImportJobResponse field's value. -func (s *GetImportJobOutput) SetImportJobResponse(v *ImportJobResponse) *GetImportJobOutput { - s.ImportJobResponse = v - return s -} - -type GetImportJobsInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - PageSize *string `location:"querystring" locationName:"page-size" type:"string"` - - Token *string `location:"querystring" locationName:"token" type:"string"` -} - -// String returns the string representation -func (s GetImportJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetImportJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetImportJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetImportJobsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetImportJobsInput) SetApplicationId(v string) *GetImportJobsInput { - s.ApplicationId = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *GetImportJobsInput) SetPageSize(v string) *GetImportJobsInput { - s.PageSize = &v - return s -} - -// SetToken sets the Token field's value. -func (s *GetImportJobsInput) SetToken(v string) *GetImportJobsInput { - s.Token = &v - return s -} - -type GetImportJobsOutput struct { - _ struct{} `type:"structure" payload:"ImportJobsResponse"` - - // Import job list. - // - // ImportJobsResponse is a required field - ImportJobsResponse *ImportJobsResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetImportJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetImportJobsOutput) GoString() string { - return s.String() -} - -// SetImportJobsResponse sets the ImportJobsResponse field's value. -func (s *GetImportJobsOutput) SetImportJobsResponse(v *ImportJobsResponse) *GetImportJobsOutput { - s.ImportJobsResponse = v - return s -} - -type GetSegmentExportJobsInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - PageSize *string `location:"querystring" locationName:"page-size" type:"string"` - - // SegmentId is a required field - SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` - - Token *string `location:"querystring" locationName:"token" type:"string"` -} - -// String returns the string representation -func (s GetSegmentExportJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSegmentExportJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSegmentExportJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSegmentExportJobsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.SegmentId == nil { - invalidParams.Add(request.NewErrParamRequired("SegmentId")) - } - if s.SegmentId != nil && len(*s.SegmentId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SegmentId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetSegmentExportJobsInput) SetApplicationId(v string) *GetSegmentExportJobsInput { - s.ApplicationId = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *GetSegmentExportJobsInput) SetPageSize(v string) *GetSegmentExportJobsInput { - s.PageSize = &v - return s -} - -// SetSegmentId sets the SegmentId field's value. -func (s *GetSegmentExportJobsInput) SetSegmentId(v string) *GetSegmentExportJobsInput { - s.SegmentId = &v - return s -} - -// SetToken sets the Token field's value. -func (s *GetSegmentExportJobsInput) SetToken(v string) *GetSegmentExportJobsInput { - s.Token = &v - return s -} - -type GetSegmentExportJobsOutput struct { - _ struct{} `type:"structure" payload:"ExportJobsResponse"` - - // Export job list. - // - // ExportJobsResponse is a required field - ExportJobsResponse *ExportJobsResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetSegmentExportJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSegmentExportJobsOutput) GoString() string { - return s.String() -} - -// SetExportJobsResponse sets the ExportJobsResponse field's value. -func (s *GetSegmentExportJobsOutput) SetExportJobsResponse(v *ExportJobsResponse) *GetSegmentExportJobsOutput { - s.ExportJobsResponse = v - return s -} - -type GetSegmentImportJobsInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - PageSize *string `location:"querystring" locationName:"page-size" type:"string"` - - // SegmentId is a required field - SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` - - Token *string `location:"querystring" locationName:"token" type:"string"` -} - -// String returns the string representation -func (s GetSegmentImportJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSegmentImportJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSegmentImportJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSegmentImportJobsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.SegmentId == nil { - invalidParams.Add(request.NewErrParamRequired("SegmentId")) - } - if s.SegmentId != nil && len(*s.SegmentId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SegmentId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetSegmentImportJobsInput) SetApplicationId(v string) *GetSegmentImportJobsInput { - s.ApplicationId = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *GetSegmentImportJobsInput) SetPageSize(v string) *GetSegmentImportJobsInput { - s.PageSize = &v - return s -} - -// SetSegmentId sets the SegmentId field's value. -func (s *GetSegmentImportJobsInput) SetSegmentId(v string) *GetSegmentImportJobsInput { - s.SegmentId = &v - return s -} - -// SetToken sets the Token field's value. -func (s *GetSegmentImportJobsInput) SetToken(v string) *GetSegmentImportJobsInput { - s.Token = &v - return s -} - -type GetSegmentImportJobsOutput struct { - _ struct{} `type:"structure" payload:"ImportJobsResponse"` - - // Import job list. - // - // ImportJobsResponse is a required field - ImportJobsResponse *ImportJobsResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetSegmentImportJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSegmentImportJobsOutput) GoString() string { - return s.String() -} - -// SetImportJobsResponse sets the ImportJobsResponse field's value. -func (s *GetSegmentImportJobsOutput) SetImportJobsResponse(v *ImportJobsResponse) *GetSegmentImportJobsOutput { - s.ImportJobsResponse = v - return s -} - -type GetSegmentInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // SegmentId is a required field - SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSegmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSegmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSegmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSegmentInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.SegmentId == nil { - invalidParams.Add(request.NewErrParamRequired("SegmentId")) - } - if s.SegmentId != nil && len(*s.SegmentId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SegmentId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetSegmentInput) SetApplicationId(v string) *GetSegmentInput { - s.ApplicationId = &v - return s -} - -// SetSegmentId sets the SegmentId field's value. -func (s *GetSegmentInput) SetSegmentId(v string) *GetSegmentInput { - s.SegmentId = &v - return s -} - -type GetSegmentOutput struct { - _ struct{} `type:"structure" payload:"SegmentResponse"` - - // Segment definition. - // - // SegmentResponse is a required field - SegmentResponse *SegmentResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetSegmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSegmentOutput) GoString() string { - return s.String() -} - -// SetSegmentResponse sets the SegmentResponse field's value. -func (s *GetSegmentOutput) SetSegmentResponse(v *SegmentResponse) *GetSegmentOutput { - s.SegmentResponse = v - return s -} - -type GetSegmentVersionInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // SegmentId is a required field - SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` - - // Version is a required field - Version *string `location:"uri" locationName:"version" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSegmentVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSegmentVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSegmentVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSegmentVersionInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.SegmentId == nil { - invalidParams.Add(request.NewErrParamRequired("SegmentId")) - } - if s.SegmentId != nil && len(*s.SegmentId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SegmentId", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetSegmentVersionInput) SetApplicationId(v string) *GetSegmentVersionInput { - s.ApplicationId = &v - return s -} - -// SetSegmentId sets the SegmentId field's value. -func (s *GetSegmentVersionInput) SetSegmentId(v string) *GetSegmentVersionInput { - s.SegmentId = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetSegmentVersionInput) SetVersion(v string) *GetSegmentVersionInput { - s.Version = &v - return s -} - -type GetSegmentVersionOutput struct { - _ struct{} `type:"structure" payload:"SegmentResponse"` - - // Segment definition. - // - // SegmentResponse is a required field - SegmentResponse *SegmentResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetSegmentVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSegmentVersionOutput) GoString() string { - return s.String() -} - -// SetSegmentResponse sets the SegmentResponse field's value. -func (s *GetSegmentVersionOutput) SetSegmentResponse(v *SegmentResponse) *GetSegmentVersionOutput { - s.SegmentResponse = v - return s -} - -type GetSegmentVersionsInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - PageSize *string `location:"querystring" locationName:"page-size" type:"string"` - - // SegmentId is a required field - SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` - - Token *string `location:"querystring" locationName:"token" type:"string"` -} - -// String returns the string representation -func (s GetSegmentVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSegmentVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSegmentVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSegmentVersionsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.SegmentId == nil { - invalidParams.Add(request.NewErrParamRequired("SegmentId")) - } - if s.SegmentId != nil && len(*s.SegmentId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SegmentId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetSegmentVersionsInput) SetApplicationId(v string) *GetSegmentVersionsInput { - s.ApplicationId = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *GetSegmentVersionsInput) SetPageSize(v string) *GetSegmentVersionsInput { - s.PageSize = &v - return s -} - -// SetSegmentId sets the SegmentId field's value. -func (s *GetSegmentVersionsInput) SetSegmentId(v string) *GetSegmentVersionsInput { - s.SegmentId = &v - return s -} - -// SetToken sets the Token field's value. -func (s *GetSegmentVersionsInput) SetToken(v string) *GetSegmentVersionsInput { - s.Token = &v - return s -} - -type GetSegmentVersionsOutput struct { - _ struct{} `type:"structure" payload:"SegmentsResponse"` - - // Segments in your account. - // - // SegmentsResponse is a required field - SegmentsResponse *SegmentsResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetSegmentVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSegmentVersionsOutput) GoString() string { - return s.String() -} - -// SetSegmentsResponse sets the SegmentsResponse field's value. -func (s *GetSegmentVersionsOutput) SetSegmentsResponse(v *SegmentsResponse) *GetSegmentVersionsOutput { - s.SegmentsResponse = v - return s -} - -type GetSegmentsInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - PageSize *string `location:"querystring" locationName:"page-size" type:"string"` - - Token *string `location:"querystring" locationName:"token" type:"string"` -} - -// String returns the string representation -func (s GetSegmentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSegmentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSegmentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSegmentsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetSegmentsInput) SetApplicationId(v string) *GetSegmentsInput { - s.ApplicationId = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *GetSegmentsInput) SetPageSize(v string) *GetSegmentsInput { - s.PageSize = &v - return s -} - -// SetToken sets the Token field's value. -func (s *GetSegmentsInput) SetToken(v string) *GetSegmentsInput { - s.Token = &v - return s -} - -type GetSegmentsOutput struct { - _ struct{} `type:"structure" payload:"SegmentsResponse"` - - // Segments in your account. - // - // SegmentsResponse is a required field - SegmentsResponse *SegmentsResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetSegmentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSegmentsOutput) GoString() string { - return s.String() -} - -// SetSegmentsResponse sets the SegmentsResponse field's value. -func (s *GetSegmentsOutput) SetSegmentsResponse(v *SegmentsResponse) *GetSegmentsOutput { - s.SegmentsResponse = v - return s -} - -type GetSmsChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSmsChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSmsChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSmsChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSmsChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetSmsChannelInput) SetApplicationId(v string) *GetSmsChannelInput { - s.ApplicationId = &v - return s -} - -type GetSmsChannelOutput struct { - _ struct{} `type:"structure" payload:"SMSChannelResponse"` - - // SMS Channel Response. - // - // SMSChannelResponse is a required field - SMSChannelResponse *SMSChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetSmsChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSmsChannelOutput) GoString() string { - return s.String() -} - -// SetSMSChannelResponse sets the SMSChannelResponse field's value. -func (s *GetSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *GetSmsChannelOutput { - s.SMSChannelResponse = v - return s -} - -type GetUserEndpointsInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // UserId is a required field - UserId *string `location:"uri" locationName:"user-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetUserEndpointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUserEndpointsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUserEndpointsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUserEndpointsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.UserId == nil { - invalidParams.Add(request.NewErrParamRequired("UserId")) - } - if s.UserId != nil && len(*s.UserId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetUserEndpointsInput) SetApplicationId(v string) *GetUserEndpointsInput { - s.ApplicationId = &v - return s -} - -// SetUserId sets the UserId field's value. -func (s *GetUserEndpointsInput) SetUserId(v string) *GetUserEndpointsInput { - s.UserId = &v - return s -} - -type GetUserEndpointsOutput struct { - _ struct{} `type:"structure" payload:"EndpointsResponse"` - - // List of endpoints - // - // EndpointsResponse is a required field - EndpointsResponse *EndpointsResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetUserEndpointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetUserEndpointsOutput) GoString() string { - return s.String() -} - -// SetEndpointsResponse sets the EndpointsResponse field's value. -func (s *GetUserEndpointsOutput) SetEndpointsResponse(v *EndpointsResponse) *GetUserEndpointsOutput { - s.EndpointsResponse = v - return s -} - -type GetVoiceChannelInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetVoiceChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetVoiceChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetVoiceChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetVoiceChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetVoiceChannelInput) SetApplicationId(v string) *GetVoiceChannelInput { - s.ApplicationId = &v - return s -} - -type GetVoiceChannelOutput struct { - _ struct{} `type:"structure" payload:"VoiceChannelResponse"` - - // Voice Channel Response. - // - // VoiceChannelResponse is a required field - VoiceChannelResponse *VoiceChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetVoiceChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetVoiceChannelOutput) GoString() string { - return s.String() -} - -// SetVoiceChannelResponse sets the VoiceChannelResponse field's value. -func (s *GetVoiceChannelOutput) SetVoiceChannelResponse(v *VoiceChannelResponse) *GetVoiceChannelOutput { - s.VoiceChannelResponse = v - return s -} - -// Import job request. -type ImportJobRequest struct { - _ struct{} `type:"structure"` - - // Sets whether the endpoints create a segment when they are imported. - DefineSegment *bool `type:"boolean"` - - // (Deprecated) Your AWS account ID, which you assigned to the ExternalID key - // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This - // requirement is removed, and external IDs are not recommended for IAM roles - // assumed by Amazon Pinpoint. - ExternalId *string `type:"string"` - - // The format of the files that contain the endpoint definitions.Valid values: - // CSV, JSON - Format *string `type:"string" enum:"Format"` - - // Sets whether the endpoints are registered with Amazon Pinpoint when they - // are imported. - RegisterEndpoints *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint - // access to the Amazon S3 location that contains the endpoints to import. - RoleArn *string `type:"string"` - - // The URL of the S3 bucket that contains the segment information to import. - // The location can be a folder or a single file. The URL should use the following - // format: s3://bucket-name/folder-name/file-nameAmazon Pinpoint imports endpoints - // from this location and any subfolders it contains. - S3Url *string `type:"string"` - - // The ID of the segment to update if the import job is meant to update an existing - // segment. - SegmentId *string `type:"string"` - - // A custom name for the segment created by the import job. Use if DefineSegment - // is true. - SegmentName *string `type:"string"` -} - -// String returns the string representation -func (s ImportJobRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportJobRequest) GoString() string { - return s.String() -} - -// SetDefineSegment sets the DefineSegment field's value. -func (s *ImportJobRequest) SetDefineSegment(v bool) *ImportJobRequest { - s.DefineSegment = &v - return s -} - -// SetExternalId sets the ExternalId field's value. -func (s *ImportJobRequest) SetExternalId(v string) *ImportJobRequest { - s.ExternalId = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *ImportJobRequest) SetFormat(v string) *ImportJobRequest { - s.Format = &v - return s -} - -// SetRegisterEndpoints sets the RegisterEndpoints field's value. -func (s *ImportJobRequest) SetRegisterEndpoints(v bool) *ImportJobRequest { - s.RegisterEndpoints = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *ImportJobRequest) SetRoleArn(v string) *ImportJobRequest { - s.RoleArn = &v - return s -} - -// SetS3Url sets the S3Url field's value. -func (s *ImportJobRequest) SetS3Url(v string) *ImportJobRequest { - s.S3Url = &v - return s -} - -// SetSegmentId sets the SegmentId field's value. -func (s *ImportJobRequest) SetSegmentId(v string) *ImportJobRequest { - s.SegmentId = &v - return s -} - -// SetSegmentName sets the SegmentName field's value. -func (s *ImportJobRequest) SetSegmentName(v string) *ImportJobRequest { - s.SegmentName = &v - return s -} - -// Import job resource -type ImportJobResource struct { - _ struct{} `type:"structure"` - - // Sets whether the endpoints create a segment when they are imported. - DefineSegment *bool `type:"boolean"` - - // (Deprecated) Your AWS account ID, which you assigned to the ExternalID key - // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This - // requirement is removed, and external IDs are not recommended for IAM roles - // assumed by Amazon Pinpoint. - ExternalId *string `type:"string"` - - // The format of the files that contain the endpoint definitions.Valid values: - // CSV, JSON - Format *string `type:"string" enum:"Format"` - - // Sets whether the endpoints are registered with Amazon Pinpoint when they - // are imported. - RegisterEndpoints *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint - // access to the Amazon S3 location that contains the endpoints to import. - RoleArn *string `type:"string"` - - // The URL of the S3 bucket that contains the segment information to import. - // The location can be a folder or a single file. The URL should use the following - // format: s3://bucket-name/folder-name/file-nameAmazon Pinpoint imports endpoints - // from this location and any subfolders it contains. - S3Url *string `type:"string"` - - // The ID of the segment to update if the import job is meant to update an existing - // segment. - SegmentId *string `type:"string"` - - // A custom name for the segment created by the import job. Use if DefineSegment - // is true. - SegmentName *string `type:"string"` -} - -// String returns the string representation -func (s ImportJobResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportJobResource) GoString() string { - return s.String() -} - -// SetDefineSegment sets the DefineSegment field's value. -func (s *ImportJobResource) SetDefineSegment(v bool) *ImportJobResource { - s.DefineSegment = &v - return s -} - -// SetExternalId sets the ExternalId field's value. -func (s *ImportJobResource) SetExternalId(v string) *ImportJobResource { - s.ExternalId = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *ImportJobResource) SetFormat(v string) *ImportJobResource { - s.Format = &v - return s -} - -// SetRegisterEndpoints sets the RegisterEndpoints field's value. -func (s *ImportJobResource) SetRegisterEndpoints(v bool) *ImportJobResource { - s.RegisterEndpoints = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *ImportJobResource) SetRoleArn(v string) *ImportJobResource { - s.RoleArn = &v - return s -} - -// SetS3Url sets the S3Url field's value. -func (s *ImportJobResource) SetS3Url(v string) *ImportJobResource { - s.S3Url = &v - return s -} - -// SetSegmentId sets the SegmentId field's value. -func (s *ImportJobResource) SetSegmentId(v string) *ImportJobResource { - s.SegmentId = &v - return s -} - -// SetSegmentName sets the SegmentName field's value. -func (s *ImportJobResource) SetSegmentName(v string) *ImportJobResource { - s.SegmentName = &v - return s -} - -// Import job response. -type ImportJobResponse struct { - _ struct{} `type:"structure"` - - // The unique ID of the application to which the import job applies. - ApplicationId *string `type:"string"` - - // The number of pieces that have successfully imported as of the time of the - // request. - CompletedPieces *int64 `type:"integer"` - - // The date the import job completed in ISO 8601 format. - CompletionDate *string `type:"string"` - - // The date the import job was created in ISO 8601 format. - CreationDate *string `type:"string"` - - // The import job settings. - Definition *ImportJobResource `type:"structure"` - - // The number of pieces that have failed to import as of the time of the request. - FailedPieces *int64 `type:"integer"` - - // Provides up to 100 of the first failed entries for the job, if any exist. - Failures []*string `type:"list"` - - // The unique ID of the import job. - Id *string `type:"string"` - - // The status of the import job.Valid values: CREATED, INITIALIZING, PROCESSING, - // COMPLETING, COMPLETED, FAILING, FAILEDThe job status is FAILED if one or - // more pieces failed to import. - JobStatus *string `type:"string" enum:"JobStatus"` - - // The number of endpoints that failed to import; for example, because of syntax - // errors. - TotalFailures *int64 `type:"integer"` - - // The total number of pieces that must be imported to finish the job. Each - // piece is an approximately equal portion of the endpoints to import. - TotalPieces *int64 `type:"integer"` - - // The number of endpoints that were processed by the import job. - TotalProcessed *int64 `type:"integer"` - - // The job type. Will be Import. - Type *string `type:"string"` -} - -// String returns the string representation -func (s ImportJobResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportJobResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *ImportJobResponse) SetApplicationId(v string) *ImportJobResponse { - s.ApplicationId = &v - return s -} - -// SetCompletedPieces sets the CompletedPieces field's value. -func (s *ImportJobResponse) SetCompletedPieces(v int64) *ImportJobResponse { - s.CompletedPieces = &v - return s -} - -// SetCompletionDate sets the CompletionDate field's value. -func (s *ImportJobResponse) SetCompletionDate(v string) *ImportJobResponse { - s.CompletionDate = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *ImportJobResponse) SetCreationDate(v string) *ImportJobResponse { - s.CreationDate = &v - return s -} - -// SetDefinition sets the Definition field's value. -func (s *ImportJobResponse) SetDefinition(v *ImportJobResource) *ImportJobResponse { - s.Definition = v - return s -} - -// SetFailedPieces sets the FailedPieces field's value. -func (s *ImportJobResponse) SetFailedPieces(v int64) *ImportJobResponse { - s.FailedPieces = &v - return s -} - -// SetFailures sets the Failures field's value. -func (s *ImportJobResponse) SetFailures(v []*string) *ImportJobResponse { - s.Failures = v - return s -} - -// SetId sets the Id field's value. -func (s *ImportJobResponse) SetId(v string) *ImportJobResponse { - s.Id = &v - return s -} - -// SetJobStatus sets the JobStatus field's value. -func (s *ImportJobResponse) SetJobStatus(v string) *ImportJobResponse { - s.JobStatus = &v - return s -} - -// SetTotalFailures sets the TotalFailures field's value. -func (s *ImportJobResponse) SetTotalFailures(v int64) *ImportJobResponse { - s.TotalFailures = &v - return s -} - -// SetTotalPieces sets the TotalPieces field's value. -func (s *ImportJobResponse) SetTotalPieces(v int64) *ImportJobResponse { - s.TotalPieces = &v - return s -} - -// SetTotalProcessed sets the TotalProcessed field's value. -func (s *ImportJobResponse) SetTotalProcessed(v int64) *ImportJobResponse { - s.TotalProcessed = &v - return s -} - -// SetType sets the Type field's value. -func (s *ImportJobResponse) SetType(v string) *ImportJobResponse { - s.Type = &v - return s -} - -// Import job list. -type ImportJobsResponse struct { - _ struct{} `type:"structure"` - - // A list of import jobs for the application. - Item []*ImportJobResponse `type:"list"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ImportJobsResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportJobsResponse) GoString() string { - return s.String() -} - -// SetItem sets the Item field's value. -func (s *ImportJobsResponse) SetItem(v []*ImportJobResponse) *ImportJobsResponse { - s.Item = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ImportJobsResponse) SetNextToken(v string) *ImportJobsResponse { - s.NextToken = &v - return s -} - -// The response that's provided after registering the endpoint. -type ItemResponse struct { - _ struct{} `type:"structure"` - - // The response received after the endpoint was accepted. - EndpointItemResponse *EndpointItemResponse `type:"structure"` - - // A multipart response object that contains a key and value for each event - // ID in the request. In each object, the event ID is the key, and an EventItemResponse - // object is the value. - EventsItemResponse map[string]*EventItemResponse `type:"map"` -} - -// String returns the string representation -func (s ItemResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ItemResponse) GoString() string { - return s.String() -} - -// SetEndpointItemResponse sets the EndpointItemResponse field's value. -func (s *ItemResponse) SetEndpointItemResponse(v *EndpointItemResponse) *ItemResponse { - s.EndpointItemResponse = v - return s -} - -// SetEventsItemResponse sets the EventsItemResponse field's value. -func (s *ItemResponse) SetEventsItemResponse(v map[string]*EventItemResponse) *ItemResponse { - s.EventsItemResponse = v - return s -} - -// Message to send -type Message struct { - _ struct{} `type:"structure"` - - // The action that occurs if the user taps a push notification delivered by - // the campaign:OPEN_APP - Your app launches, or it becomes the foreground app - // if it has been sent to the background. This is the default action.DEEP_LINK - // - Uses deep linking features in iOS and Android to open your app and display - // a designated user interface within the app.URL - The default mobile browser - // on the user's device launches and opens a web page at the URL you specify. - Action *string `type:"string" enum:"Action"` - - // The message body. Can include up to 140 characters. - Body *string `type:"string"` - - // The URL that points to the icon image for the push notification icon, for - // example, the app icon. - ImageIconUrl *string `type:"string"` - - // The URL that points to the small icon image for the push notification icon, - // for example, the app icon. - ImageSmallIconUrl *string `type:"string"` - - // The URL that points to an image used in the push notification. - ImageUrl *string `type:"string"` - - // The JSON payload used for a silent push. - JsonBody *string `type:"string"` - - // A URL that refers to the location of an image or video that you want to display - // in the push notification. - MediaUrl *string `type:"string"` - - // The Raw JSON formatted string to be used as the payload. This value overrides - // the message. - RawContent *string `type:"string"` - - // Indicates if the message should display on the users device.Silent pushes - // can be used for Remote Configuration and Phone Home use cases. - SilentPush *bool `type:"boolean"` - - // This parameter specifies how long (in seconds) the message should be kept - // if the service is unable to deliver the notification the first time. If the - // value is 0, it treats the notification as if it expires immediately and does - // not store the notification or attempt to redeliver it. This value is converted - // to the expiration field when sent to the service. It only applies to APNs - // and GCM - TimeToLive *int64 `type:"integer"` - - // The message title that displays above the message on the user's device. - Title *string `type:"string"` - - // The URL to open in the user's mobile browser. Used if the value for Action - // is URL. - Url *string `type:"string"` -} - -// String returns the string representation -func (s Message) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Message) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *Message) SetAction(v string) *Message { - s.Action = &v - return s -} - -// SetBody sets the Body field's value. -func (s *Message) SetBody(v string) *Message { - s.Body = &v - return s -} - -// SetImageIconUrl sets the ImageIconUrl field's value. -func (s *Message) SetImageIconUrl(v string) *Message { - s.ImageIconUrl = &v - return s -} - -// SetImageSmallIconUrl sets the ImageSmallIconUrl field's value. -func (s *Message) SetImageSmallIconUrl(v string) *Message { - s.ImageSmallIconUrl = &v - return s -} - -// SetImageUrl sets the ImageUrl field's value. -func (s *Message) SetImageUrl(v string) *Message { - s.ImageUrl = &v - return s -} - -// SetJsonBody sets the JsonBody field's value. -func (s *Message) SetJsonBody(v string) *Message { - s.JsonBody = &v - return s -} - -// SetMediaUrl sets the MediaUrl field's value. -func (s *Message) SetMediaUrl(v string) *Message { - s.MediaUrl = &v - return s -} - -// SetRawContent sets the RawContent field's value. -func (s *Message) SetRawContent(v string) *Message { - s.RawContent = &v - return s -} - -// SetSilentPush sets the SilentPush field's value. -func (s *Message) SetSilentPush(v bool) *Message { - s.SilentPush = &v - return s -} - -// SetTimeToLive sets the TimeToLive field's value. -func (s *Message) SetTimeToLive(v int64) *Message { - s.TimeToLive = &v - return s -} - -// SetTitle sets the Title field's value. -func (s *Message) SetTitle(v string) *Message { - s.Title = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *Message) SetUrl(v string) *Message { - s.Url = &v - return s -} - -// Simple message object. -type MessageBody struct { - _ struct{} `type:"structure"` - - // The error message that's returned from the API. - Message *string `type:"string"` - - // The unique message body ID. - RequestID *string `type:"string"` -} - -// String returns the string representation -func (s MessageBody) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MessageBody) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *MessageBody) SetMessage(v string) *MessageBody { - s.Message = &v - return s -} - -// SetRequestID sets the RequestID field's value. -func (s *MessageBody) SetRequestID(v string) *MessageBody { - s.RequestID = &v - return s -} - -// Message configuration for a campaign. -type MessageConfiguration struct { - _ struct{} `type:"structure"` - - // The message that the campaign delivers to ADM channels. Overrides the default - // message. - ADMMessage *Message `type:"structure"` - - // The message that the campaign delivers to APNS channels. Overrides the default - // message. - APNSMessage *Message `type:"structure"` - - // The message that the campaign delivers to Baidu channels. Overrides the default - // message. - BaiduMessage *Message `type:"structure"` - - // The default message for all channels. - DefaultMessage *Message `type:"structure"` - - // The email message configuration. - EmailMessage *CampaignEmailMessage `type:"structure"` - - // The message that the campaign delivers to GCM channels. Overrides the default - // message. - GCMMessage *Message `type:"structure"` - - // The SMS message configuration. - SMSMessage *CampaignSmsMessage `type:"structure"` -} - -// String returns the string representation -func (s MessageConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MessageConfiguration) GoString() string { - return s.String() -} - -// SetADMMessage sets the ADMMessage field's value. -func (s *MessageConfiguration) SetADMMessage(v *Message) *MessageConfiguration { - s.ADMMessage = v - return s -} - -// SetAPNSMessage sets the APNSMessage field's value. -func (s *MessageConfiguration) SetAPNSMessage(v *Message) *MessageConfiguration { - s.APNSMessage = v - return s -} - -// SetBaiduMessage sets the BaiduMessage field's value. -func (s *MessageConfiguration) SetBaiduMessage(v *Message) *MessageConfiguration { - s.BaiduMessage = v - return s -} - -// SetDefaultMessage sets the DefaultMessage field's value. -func (s *MessageConfiguration) SetDefaultMessage(v *Message) *MessageConfiguration { - s.DefaultMessage = v - return s -} - -// SetEmailMessage sets the EmailMessage field's value. -func (s *MessageConfiguration) SetEmailMessage(v *CampaignEmailMessage) *MessageConfiguration { - s.EmailMessage = v - return s -} - -// SetGCMMessage sets the GCMMessage field's value. -func (s *MessageConfiguration) SetGCMMessage(v *Message) *MessageConfiguration { - s.GCMMessage = v - return s -} - -// SetSMSMessage sets the SMSMessage field's value. -func (s *MessageConfiguration) SetSMSMessage(v *CampaignSmsMessage) *MessageConfiguration { - s.SMSMessage = v - return s -} - -// Send message request. -type MessageRequest struct { - _ struct{} `type:"structure"` - - // A map of key-value pairs, where each key is an address and each value is - // an AddressConfiguration object. An address can be a push notification token, - // a phone number, or an email address. - Addresses map[string]*AddressConfiguration `type:"map"` - - // A map of custom attributes to attributes to be attached to the message. This - // payload is added to the push notification's 'data.pinpoint' object or added - // to the email/sms delivery receipt event attributes. - Context map[string]*string `type:"map"` - - // A map of key-value pairs, where each key is an endpoint ID and each value - // is an EndpointSendConfiguration object. Within an EndpointSendConfiguration - // object, you can tailor the message for an endpoint by specifying message - // overrides or substitutions. - Endpoints map[string]*EndpointSendConfiguration `type:"map"` - - // Message configuration. - MessageConfiguration *DirectMessageConfiguration `type:"structure"` - - // A unique ID that you can use to trace a message. This ID is visible to recipients. - TraceId *string `type:"string"` -} - -// String returns the string representation -func (s MessageRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MessageRequest) GoString() string { - return s.String() -} - -// SetAddresses sets the Addresses field's value. -func (s *MessageRequest) SetAddresses(v map[string]*AddressConfiguration) *MessageRequest { - s.Addresses = v - return s -} - -// SetContext sets the Context field's value. -func (s *MessageRequest) SetContext(v map[string]*string) *MessageRequest { - s.Context = v - return s -} - -// SetEndpoints sets the Endpoints field's value. -func (s *MessageRequest) SetEndpoints(v map[string]*EndpointSendConfiguration) *MessageRequest { - s.Endpoints = v - return s -} - -// SetMessageConfiguration sets the MessageConfiguration field's value. -func (s *MessageRequest) SetMessageConfiguration(v *DirectMessageConfiguration) *MessageRequest { - s.MessageConfiguration = v - return s -} - -// SetTraceId sets the TraceId field's value. -func (s *MessageRequest) SetTraceId(v string) *MessageRequest { - s.TraceId = &v - return s -} - -// Send message response. -type MessageResponse struct { - _ struct{} `type:"structure"` - - // Application id of the message. - ApplicationId *string `type:"string"` - - // A map containing a multi part response for each address, with the endpointId - // as the key and the result as the value. - EndpointResult map[string]*EndpointMessageResult `type:"map"` - - // Original request Id for which this message was delivered. - RequestId *string `type:"string"` - - // A map containing a multi part response for each address, with the address - // as the key(Email address, phone number or push token) and the result as the - // value. - Result map[string]*MessageResult `type:"map"` -} - -// String returns the string representation -func (s MessageResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MessageResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *MessageResponse) SetApplicationId(v string) *MessageResponse { - s.ApplicationId = &v - return s -} - -// SetEndpointResult sets the EndpointResult field's value. -func (s *MessageResponse) SetEndpointResult(v map[string]*EndpointMessageResult) *MessageResponse { - s.EndpointResult = v - return s -} - -// SetRequestId sets the RequestId field's value. -func (s *MessageResponse) SetRequestId(v string) *MessageResponse { - s.RequestId = &v - return s -} - -// SetResult sets the Result field's value. -func (s *MessageResponse) SetResult(v map[string]*MessageResult) *MessageResponse { - s.Result = v - return s -} - -// The result from sending a message to an address. -type MessageResult struct { - _ struct{} `type:"structure"` - - // The delivery status of the message. Possible values:SUCCESS - The message - // was successfully delivered to the endpoint.TRANSIENT_FAILURE - A temporary - // error occurred. Amazon Pinpoint will attempt to deliver the message again - // later.FAILURE_PERMANENT - An error occurred when delivering the message to - // the endpoint. Amazon Pinpoint won't attempt to send the message again.TIMEOUT - // - The message couldn't be sent within the timeout period.QUIET_TIME - The - // local time for the endpoint was within the QuietTime for the campaign or - // app.DAILY_CAP - The endpoint has received the maximum number of messages - // it can receive within a 24-hour period.HOLDOUT - The endpoint was in a hold - // out treatment for the campaign.THROTTLED - Amazon Pinpoint throttled sending - // to this endpoint.EXPIRED - The endpoint address is expired.CAMPAIGN_CAP - - // The endpoint received the maximum number of messages allowed by the campaign.SERVICE_FAILURE - // - A service-level failure prevented Amazon Pinpoint from delivering the message.UNKNOWN - // - An unknown error occurred. - DeliveryStatus *string `type:"string" enum:"DeliveryStatus"` - - // Unique message identifier associated with the message that was sent. - MessageId *string `type:"string"` - - // Downstream service status code. - StatusCode *int64 `type:"integer"` - - // Status message for message delivery. - StatusMessage *string `type:"string"` - - // If token was updated as part of delivery. (This is GCM Specific) - UpdatedToken *string `type:"string"` -} - -// String returns the string representation -func (s MessageResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MessageResult) GoString() string { - return s.String() -} - -// SetDeliveryStatus sets the DeliveryStatus field's value. -func (s *MessageResult) SetDeliveryStatus(v string) *MessageResult { - s.DeliveryStatus = &v - return s -} - -// SetMessageId sets the MessageId field's value. -func (s *MessageResult) SetMessageId(v string) *MessageResult { - s.MessageId = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *MessageResult) SetStatusCode(v int64) *MessageResult { - s.StatusCode = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *MessageResult) SetStatusMessage(v string) *MessageResult { - s.StatusMessage = &v - return s -} - -// SetUpdatedToken sets the UpdatedToken field's value. -func (s *MessageResult) SetUpdatedToken(v string) *MessageResult { - s.UpdatedToken = &v - return s -} - -// Custom metric dimension -type MetricDimension struct { - _ struct{} `type:"structure"` - - // The operator that you're using to compare metric values. Possible values: - // GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL - ComparisonOperator *string `type:"string"` - - // The value to be compared. - Value *float64 `type:"double"` -} - -// String returns the string representation -func (s MetricDimension) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricDimension) GoString() string { - return s.String() -} - -// SetComparisonOperator sets the ComparisonOperator field's value. -func (s *MetricDimension) SetComparisonOperator(v string) *MetricDimension { - s.ComparisonOperator = &v - return s -} - -// SetValue sets the Value field's value. -func (s *MetricDimension) SetValue(v float64) *MetricDimension { - s.Value = &v - return s -} - -// Phone Number Validate request. -type NumberValidateRequest struct { - _ struct{} `type:"structure"` - - // (Optional) The two-character ISO country code for the country or region where - // the phone number was originally registered. - IsoCountryCode *string `type:"string"` - - // The phone number to get information about. The phone number that you provide - // should include a country code. If the number doesn't include a valid country - // code, the operation might result in an error. - PhoneNumber *string `type:"string"` -} - -// String returns the string representation -func (s NumberValidateRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NumberValidateRequest) GoString() string { - return s.String() -} - -// SetIsoCountryCode sets the IsoCountryCode field's value. -func (s *NumberValidateRequest) SetIsoCountryCode(v string) *NumberValidateRequest { - s.IsoCountryCode = &v - return s -} - -// SetPhoneNumber sets the PhoneNumber field's value. -func (s *NumberValidateRequest) SetPhoneNumber(v string) *NumberValidateRequest { - s.PhoneNumber = &v - return s -} - -// Phone Number Validate response. -type NumberValidateResponse struct { - _ struct{} `type:"structure"` - - // The carrier or servive provider that the phone number is currently registered - // with. - Carrier *string `type:"string"` - - // The city where the phone number was originally registered. - City *string `type:"string"` - - // The cleansed phone number, shown in E.164 format. - CleansedPhoneNumberE164 *string `type:"string"` - - // The cleansed phone number, shown in the local phone number format. - CleansedPhoneNumberNational *string `type:"string"` - - // The country or region where the phone number was originally registered. - Country *string `type:"string"` - - // The two-character ISO code for the country or region where the phone number - // was originally registered. - CountryCodeIso2 *string `type:"string"` - - // The numeric code for the country or region where the phone number was originally - // registered. - CountryCodeNumeric *string `type:"string"` - - // The county where the phone number was originally registered. - County *string `type:"string"` - - // The two-character code (in ISO 3166-1 alpha-2 format) for the country or - // region in the request body. - OriginalCountryCodeIso2 *string `type:"string"` - - // The phone number that you included in the request body. - OriginalPhoneNumber *string `type:"string"` - - // A description of the phone type. Possible values are MOBILE, LANDLINE, VOIP, - // INVALID, PREPAID, and OTHER. - PhoneType *string `type:"string"` - - // The phone type, represented by an integer. Possible values include 0 (MOBILE), - // 1 (LANDLINE), 2 (VOIP), 3 (INVALID), 4 (OTHER), and 5 (PREPAID). - PhoneTypeCode *int64 `type:"integer"` - - // The time zone for the location where the phone number was originally registered. - Timezone *string `type:"string"` - - // The postal code for the location where the phone number was originally registered. - ZipCode *string `type:"string"` -} - -// String returns the string representation -func (s NumberValidateResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NumberValidateResponse) GoString() string { - return s.String() -} - -// SetCarrier sets the Carrier field's value. -func (s *NumberValidateResponse) SetCarrier(v string) *NumberValidateResponse { - s.Carrier = &v - return s -} - -// SetCity sets the City field's value. -func (s *NumberValidateResponse) SetCity(v string) *NumberValidateResponse { - s.City = &v - return s -} - -// SetCleansedPhoneNumberE164 sets the CleansedPhoneNumberE164 field's value. -func (s *NumberValidateResponse) SetCleansedPhoneNumberE164(v string) *NumberValidateResponse { - s.CleansedPhoneNumberE164 = &v - return s -} - -// SetCleansedPhoneNumberNational sets the CleansedPhoneNumberNational field's value. -func (s *NumberValidateResponse) SetCleansedPhoneNumberNational(v string) *NumberValidateResponse { - s.CleansedPhoneNumberNational = &v - return s -} - -// SetCountry sets the Country field's value. -func (s *NumberValidateResponse) SetCountry(v string) *NumberValidateResponse { - s.Country = &v - return s -} - -// SetCountryCodeIso2 sets the CountryCodeIso2 field's value. -func (s *NumberValidateResponse) SetCountryCodeIso2(v string) *NumberValidateResponse { - s.CountryCodeIso2 = &v - return s -} - -// SetCountryCodeNumeric sets the CountryCodeNumeric field's value. -func (s *NumberValidateResponse) SetCountryCodeNumeric(v string) *NumberValidateResponse { - s.CountryCodeNumeric = &v - return s -} - -// SetCounty sets the County field's value. -func (s *NumberValidateResponse) SetCounty(v string) *NumberValidateResponse { - s.County = &v - return s -} - -// SetOriginalCountryCodeIso2 sets the OriginalCountryCodeIso2 field's value. -func (s *NumberValidateResponse) SetOriginalCountryCodeIso2(v string) *NumberValidateResponse { - s.OriginalCountryCodeIso2 = &v - return s -} - -// SetOriginalPhoneNumber sets the OriginalPhoneNumber field's value. -func (s *NumberValidateResponse) SetOriginalPhoneNumber(v string) *NumberValidateResponse { - s.OriginalPhoneNumber = &v - return s -} - -// SetPhoneType sets the PhoneType field's value. -func (s *NumberValidateResponse) SetPhoneType(v string) *NumberValidateResponse { - s.PhoneType = &v - return s -} - -// SetPhoneTypeCode sets the PhoneTypeCode field's value. -func (s *NumberValidateResponse) SetPhoneTypeCode(v int64) *NumberValidateResponse { - s.PhoneTypeCode = &v - return s -} - -// SetTimezone sets the Timezone field's value. -func (s *NumberValidateResponse) SetTimezone(v string) *NumberValidateResponse { - s.Timezone = &v - return s -} - -// SetZipCode sets the ZipCode field's value. -func (s *NumberValidateResponse) SetZipCode(v string) *NumberValidateResponse { - s.ZipCode = &v - return s -} - -type PhoneNumberValidateInput struct { - _ struct{} `type:"structure" payload:"NumberValidateRequest"` - - // Phone Number Validate request. - // - // NumberValidateRequest is a required field - NumberValidateRequest *NumberValidateRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PhoneNumberValidateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PhoneNumberValidateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PhoneNumberValidateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PhoneNumberValidateInput"} - if s.NumberValidateRequest == nil { - invalidParams.Add(request.NewErrParamRequired("NumberValidateRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNumberValidateRequest sets the NumberValidateRequest field's value. -func (s *PhoneNumberValidateInput) SetNumberValidateRequest(v *NumberValidateRequest) *PhoneNumberValidateInput { - s.NumberValidateRequest = v - return s -} - -type PhoneNumberValidateOutput struct { - _ struct{} `type:"structure" payload:"NumberValidateResponse"` - - // Phone Number Validate response. - // - // NumberValidateResponse is a required field - NumberValidateResponse *NumberValidateResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PhoneNumberValidateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PhoneNumberValidateOutput) GoString() string { - return s.String() -} - -// SetNumberValidateResponse sets the NumberValidateResponse field's value. -func (s *PhoneNumberValidateOutput) SetNumberValidateResponse(v *NumberValidateResponse) *PhoneNumberValidateOutput { - s.NumberValidateResponse = v - return s -} - -// Public endpoint attributes. -type PublicEndpoint struct { - _ struct{} `type:"structure"` - - // The unique identifier for the recipient. For example, an address could be - // a device token, email address, or mobile phone number. - Address *string `type:"string"` - - // Custom attributes that your app reports to Amazon Pinpoint. You can use these - // attributes as selection criteria when you create a segment. - Attributes map[string][]*string `type:"map"` - - // The channel type.Valid values: APNS, GCM - ChannelType *string `type:"string" enum:"ChannelType"` - - // The endpoint demographic attributes. - Demographic *EndpointDemographic `type:"structure"` - - // The date and time when the endpoint was last updated, in ISO 8601 format. - EffectiveDate *string `type:"string"` - - // The status of the endpoint. If the update fails, the value is INACTIVE. If - // the endpoint is updated successfully, the value is ACTIVE. - EndpointStatus *string `type:"string"` - - // The endpoint location attributes. - Location *EndpointLocation `type:"structure"` - - // Custom metrics that your app reports to Amazon Pinpoint. - Metrics map[string]*float64 `type:"map"` - - // Indicates whether a user has opted out of receiving messages with one of - // the following values:ALL - User has opted out of all messages.NONE - Users - // has not opted out and receives all messages. - OptOut *string `type:"string"` - - // A unique identifier that is generated each time the endpoint is updated. - RequestId *string `type:"string"` - - // Custom user-specific attributes that your app reports to Amazon Pinpoint. - User *EndpointUser `type:"structure"` -} - -// String returns the string representation -func (s PublicEndpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublicEndpoint) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *PublicEndpoint) SetAddress(v string) *PublicEndpoint { - s.Address = &v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *PublicEndpoint) SetAttributes(v map[string][]*string) *PublicEndpoint { - s.Attributes = v - return s -} - -// SetChannelType sets the ChannelType field's value. -func (s *PublicEndpoint) SetChannelType(v string) *PublicEndpoint { - s.ChannelType = &v - return s -} - -// SetDemographic sets the Demographic field's value. -func (s *PublicEndpoint) SetDemographic(v *EndpointDemographic) *PublicEndpoint { - s.Demographic = v - return s -} - -// SetEffectiveDate sets the EffectiveDate field's value. -func (s *PublicEndpoint) SetEffectiveDate(v string) *PublicEndpoint { - s.EffectiveDate = &v - return s -} - -// SetEndpointStatus sets the EndpointStatus field's value. -func (s *PublicEndpoint) SetEndpointStatus(v string) *PublicEndpoint { - s.EndpointStatus = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *PublicEndpoint) SetLocation(v *EndpointLocation) *PublicEndpoint { - s.Location = v - return s -} - -// SetMetrics sets the Metrics field's value. -func (s *PublicEndpoint) SetMetrics(v map[string]*float64) *PublicEndpoint { - s.Metrics = v - return s -} - -// SetOptOut sets the OptOut field's value. -func (s *PublicEndpoint) SetOptOut(v string) *PublicEndpoint { - s.OptOut = &v - return s -} - -// SetRequestId sets the RequestId field's value. -func (s *PublicEndpoint) SetRequestId(v string) *PublicEndpoint { - s.RequestId = &v - return s -} - -// SetUser sets the User field's value. -func (s *PublicEndpoint) SetUser(v *EndpointUser) *PublicEndpoint { - s.User = v - return s -} - -type PutEventStreamInput struct { - _ struct{} `type:"structure" payload:"WriteEventStream"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // Request to save an EventStream. - // - // WriteEventStream is a required field - WriteEventStream *WriteEventStream `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PutEventStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutEventStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutEventStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutEventStreamInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.WriteEventStream == nil { - invalidParams.Add(request.NewErrParamRequired("WriteEventStream")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *PutEventStreamInput) SetApplicationId(v string) *PutEventStreamInput { - s.ApplicationId = &v - return s -} - -// SetWriteEventStream sets the WriteEventStream field's value. -func (s *PutEventStreamInput) SetWriteEventStream(v *WriteEventStream) *PutEventStreamInput { - s.WriteEventStream = v - return s -} - -type PutEventStreamOutput struct { - _ struct{} `type:"structure" payload:"EventStream"` - - // Model for an event publishing subscription export. - // - // EventStream is a required field - EventStream *EventStream `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PutEventStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutEventStreamOutput) GoString() string { - return s.String() -} - -// SetEventStream sets the EventStream field's value. -func (s *PutEventStreamOutput) SetEventStream(v *EventStream) *PutEventStreamOutput { - s.EventStream = v - return s -} - -type PutEventsInput struct { - _ struct{} `type:"structure" payload:"EventsRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // A set of events to process. - // - // EventsRequest is a required field - EventsRequest *EventsRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PutEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutEventsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.EventsRequest == nil { - invalidParams.Add(request.NewErrParamRequired("EventsRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *PutEventsInput) SetApplicationId(v string) *PutEventsInput { - s.ApplicationId = &v - return s -} - -// SetEventsRequest sets the EventsRequest field's value. -func (s *PutEventsInput) SetEventsRequest(v *EventsRequest) *PutEventsInput { - s.EventsRequest = v - return s -} - -type PutEventsOutput struct { - _ struct{} `type:"structure" payload:"EventsResponse"` - - // Custom messages associated with events. - // - // EventsResponse is a required field - EventsResponse *EventsResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PutEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutEventsOutput) GoString() string { - return s.String() -} - -// SetEventsResponse sets the EventsResponse field's value. -func (s *PutEventsOutput) SetEventsResponse(v *EventsResponse) *PutEventsOutput { - s.EventsResponse = v - return s -} - -// Quiet Time -type QuietTime struct { - _ struct{} `type:"structure"` - - // The time at which quiet time should end. The value that you specify has to - // be in HH:mm format, where HH is the hour in 24-hour format (with a leading - // zero, if applicable), and mm is the minutes. For example, use 02:30 to represent - // 2:30 AM, or 14:30 to represent 2:30 PM. - End *string `type:"string"` - - // The time at which quiet time should begin. The value that you specify has - // to be in HH:mm format, where HH is the hour in 24-hour format (with a leading - // zero, if applicable), and mm is the minutes. For example, use 02:30 to represent - // 2:30 AM, or 14:30 to represent 2:30 PM. - Start *string `type:"string"` -} - -// String returns the string representation -func (s QuietTime) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QuietTime) GoString() string { - return s.String() -} - -// SetEnd sets the End field's value. -func (s *QuietTime) SetEnd(v string) *QuietTime { - s.End = &v - return s -} - -// SetStart sets the Start field's value. -func (s *QuietTime) SetStart(v string) *QuietTime { - s.Start = &v - return s -} - -// An email represented as a raw MIME message. -type RawEmail struct { - _ struct{} `type:"structure"` - - // The raw email message itself. Then entire message must be base64-encoded. - // - // Data is automatically base64 encoded/decoded by the SDK. - Data []byte `type:"blob"` -} - -// String returns the string representation -func (s RawEmail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RawEmail) GoString() string { - return s.String() -} - -// SetData sets the Data field's value. -func (s *RawEmail) SetData(v []byte) *RawEmail { - s.Data = v - return s -} - -// Define how a segment based on recency of use. -type RecencyDimension struct { - _ struct{} `type:"structure"` - - // The length of time during which users have been active or inactive with your - // app.Valid values: HR_24, DAY_7, DAY_14, DAY_30 - Duration *string `type:"string" enum:"Duration"` - - // The recency dimension type:ACTIVE - Users who have used your app within the - // specified duration are included in the segment.INACTIVE - Users who have - // not used your app within the specified duration are included in the segment. - RecencyType *string `type:"string" enum:"RecencyType"` -} - -// String returns the string representation -func (s RecencyDimension) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecencyDimension) GoString() string { - return s.String() -} - -// SetDuration sets the Duration field's value. -func (s *RecencyDimension) SetDuration(v string) *RecencyDimension { - s.Duration = &v - return s -} - -// SetRecencyType sets the RecencyType field's value. -func (s *RecencyDimension) SetRecencyType(v string) *RecencyDimension { - s.RecencyType = &v - return s -} - -type RemoveAttributesInput struct { - _ struct{} `type:"structure" payload:"UpdateAttributesRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // AttributeType is a required field - AttributeType *string `location:"uri" locationName:"attribute-type" type:"string" required:"true"` - - // Update attributes request - // - // UpdateAttributesRequest is a required field - UpdateAttributesRequest *UpdateAttributesRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s RemoveAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveAttributesInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.AttributeType == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeType")) - } - if s.AttributeType != nil && len(*s.AttributeType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AttributeType", 1)) - } - if s.UpdateAttributesRequest == nil { - invalidParams.Add(request.NewErrParamRequired("UpdateAttributesRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *RemoveAttributesInput) SetApplicationId(v string) *RemoveAttributesInput { - s.ApplicationId = &v - return s -} - -// SetAttributeType sets the AttributeType field's value. -func (s *RemoveAttributesInput) SetAttributeType(v string) *RemoveAttributesInput { - s.AttributeType = &v - return s -} - -// SetUpdateAttributesRequest sets the UpdateAttributesRequest field's value. -func (s *RemoveAttributesInput) SetUpdateAttributesRequest(v *UpdateAttributesRequest) *RemoveAttributesInput { - s.UpdateAttributesRequest = v - return s -} - -type RemoveAttributesOutput struct { - _ struct{} `type:"structure" payload:"AttributesResource"` - - // Attributes. - // - // AttributesResource is a required field - AttributesResource *AttributesResource `type:"structure" required:"true"` -} - -// String returns the string representation -func (s RemoveAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributesResource sets the AttributesResource field's value. -func (s *RemoveAttributesOutput) SetAttributesResource(v *AttributesResource) *RemoveAttributesOutput { - s.AttributesResource = v - return s -} - -// SMS Channel Request -type SMSChannelRequest struct { - _ struct{} `type:"structure"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // Sender identifier of your messages. - SenderId *string `type:"string"` - - // ShortCode registered with phone provider. - ShortCode *string `type:"string"` -} - -// String returns the string representation -func (s SMSChannelRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SMSChannelRequest) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *SMSChannelRequest) SetEnabled(v bool) *SMSChannelRequest { - s.Enabled = &v - return s -} - -// SetSenderId sets the SenderId field's value. -func (s *SMSChannelRequest) SetSenderId(v string) *SMSChannelRequest { - s.SenderId = &v - return s -} - -// SetShortCode sets the ShortCode field's value. -func (s *SMSChannelRequest) SetShortCode(v string) *SMSChannelRequest { - s.ShortCode = &v - return s -} - -// SMS Channel Response. -type SMSChannelResponse struct { - _ struct{} `type:"structure"` - - // The unique ID of the application to which the SMS channel belongs. - ApplicationId *string `type:"string"` - - // The date that the settings were last updated in ISO 8601 format. - CreationDate *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - // Not used. Retained for backwards compatibility. - HasCredential *bool `type:"boolean"` - - // Channel ID. Not used, only for backwards compatibility. - Id *string `type:"string"` - - // Is this channel archived - IsArchived *bool `type:"boolean"` - - // Who last updated this entry - LastModifiedBy *string `type:"string"` - - // Last date this was updated - LastModifiedDate *string `type:"string"` - - // Platform type. Will be "SMS" - Platform *string `type:"string"` - - // Promotional messages per second that can be sent - PromotionalMessagesPerSecond *int64 `type:"integer"` - - // Sender identifier of your messages. - SenderId *string `type:"string"` - - // The short code registered with the phone provider. - ShortCode *string `type:"string"` - - // Transactional messages per second that can be sent - TransactionalMessagesPerSecond *int64 `type:"integer"` - - // Version of channel - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s SMSChannelResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SMSChannelResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *SMSChannelResponse) SetApplicationId(v string) *SMSChannelResponse { - s.ApplicationId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *SMSChannelResponse) SetCreationDate(v string) *SMSChannelResponse { - s.CreationDate = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *SMSChannelResponse) SetEnabled(v bool) *SMSChannelResponse { - s.Enabled = &v - return s -} - -// SetHasCredential sets the HasCredential field's value. -func (s *SMSChannelResponse) SetHasCredential(v bool) *SMSChannelResponse { - s.HasCredential = &v - return s -} - -// SetId sets the Id field's value. -func (s *SMSChannelResponse) SetId(v string) *SMSChannelResponse { - s.Id = &v - return s -} - -// SetIsArchived sets the IsArchived field's value. -func (s *SMSChannelResponse) SetIsArchived(v bool) *SMSChannelResponse { - s.IsArchived = &v - return s -} - -// SetLastModifiedBy sets the LastModifiedBy field's value. -func (s *SMSChannelResponse) SetLastModifiedBy(v string) *SMSChannelResponse { - s.LastModifiedBy = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *SMSChannelResponse) SetLastModifiedDate(v string) *SMSChannelResponse { - s.LastModifiedDate = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *SMSChannelResponse) SetPlatform(v string) *SMSChannelResponse { - s.Platform = &v - return s -} - -// SetPromotionalMessagesPerSecond sets the PromotionalMessagesPerSecond field's value. -func (s *SMSChannelResponse) SetPromotionalMessagesPerSecond(v int64) *SMSChannelResponse { - s.PromotionalMessagesPerSecond = &v - return s -} - -// SetSenderId sets the SenderId field's value. -func (s *SMSChannelResponse) SetSenderId(v string) *SMSChannelResponse { - s.SenderId = &v - return s -} - -// SetShortCode sets the ShortCode field's value. -func (s *SMSChannelResponse) SetShortCode(v string) *SMSChannelResponse { - s.ShortCode = &v - return s -} - -// SetTransactionalMessagesPerSecond sets the TransactionalMessagesPerSecond field's value. -func (s *SMSChannelResponse) SetTransactionalMessagesPerSecond(v int64) *SMSChannelResponse { - s.TransactionalMessagesPerSecond = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *SMSChannelResponse) SetVersion(v int64) *SMSChannelResponse { - s.Version = &v - return s -} - -// SMS Message. -type SMSMessage struct { - _ struct{} `type:"structure"` - - // The body of the SMS message. - Body *string `type:"string"` - - // The SMS program name that you provided to AWS Support when you requested - // your dedicated number. - Keyword *string `type:"string"` - - // Is this a transaction priority message or lower priority. - MessageType *string `type:"string" enum:"MessageType"` - - // The phone number that the SMS message originates from. Specify one of the - // dedicated long codes or short codes that you requested from AWS Support and - // that is assigned to your account. If this attribute is not specified, Amazon - // Pinpoint randomly assigns a long code. - OriginationNumber *string `type:"string"` - - // The sender ID that is shown as the message sender on the recipient's device. - // Support for sender IDs varies by country or region. - SenderId *string `type:"string"` - - // Default message substitutions. Can be overridden by individual address substitutions. - Substitutions map[string][]*string `type:"map"` -} - -// String returns the string representation -func (s SMSMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SMSMessage) GoString() string { - return s.String() -} - -// SetBody sets the Body field's value. -func (s *SMSMessage) SetBody(v string) *SMSMessage { - s.Body = &v - return s -} - -// SetKeyword sets the Keyword field's value. -func (s *SMSMessage) SetKeyword(v string) *SMSMessage { - s.Keyword = &v - return s -} - -// SetMessageType sets the MessageType field's value. -func (s *SMSMessage) SetMessageType(v string) *SMSMessage { - s.MessageType = &v - return s -} - -// SetOriginationNumber sets the OriginationNumber field's value. -func (s *SMSMessage) SetOriginationNumber(v string) *SMSMessage { - s.OriginationNumber = &v - return s -} - -// SetSenderId sets the SenderId field's value. -func (s *SMSMessage) SetSenderId(v string) *SMSMessage { - s.SenderId = &v - return s -} - -// SetSubstitutions sets the Substitutions field's value. -func (s *SMSMessage) SetSubstitutions(v map[string][]*string) *SMSMessage { - s.Substitutions = v - return s -} - -// Shcedule that defines when a campaign is run. -type Schedule struct { - _ struct{} `type:"structure"` - - // The scheduled time that the campaign ends in ISO 8601 format. - EndTime *string `type:"string"` - - // Defines the type of events that can trigger the campaign. Used when the Frequency - // is set to EVENT. - EventFilter *CampaignEventFilter `type:"structure"` - - // How often the campaign delivers messages.Valid values:ONCEHOURLYDAILYWEEKLYMONTHLYEVENT - Frequency *string `type:"string" enum:"Frequency"` - - // Indicates whether the campaign schedule takes effect according to each user's - // local time. - IsLocalTime *bool `type:"boolean"` - - // The default quiet time for the campaign. The campaign doesn't send messages - // to endpoints during the quiet time.Note: Make sure that your endpoints include - // the Demographics.Timezone attribute if you plan to enable a quiet time for - // your campaign. If your endpoints don't include this attribute, they'll receive - // the messages that you send them, even if quiet time is enabled.When you set - // up a campaign to use quiet time, the campaign doesn't send messages during - // the time range you specified, as long as all of the following are true:- - // The endpoint includes a valid Demographic.Timezone attribute.- The current - // time in the endpoint's time zone is later than or equal to the time specified - // in the QuietTime.Start attribute for the campaign.- The current time in the - // endpoint's time zone is earlier than or equal to the time specified in the - // QuietTime.End attribute for the campaign. - QuietTime *QuietTime `type:"structure"` - - // The scheduled time that the campaign begins in ISO 8601 format. - StartTime *string `type:"string"` - - // The starting UTC offset for the schedule if the value for isLocalTime is - // trueValid values: UTCUTC+01UTC+02UTC+03UTC+03:30UTC+04UTC+04:30UTC+05UTC+05:30UTC+05:45UTC+06UTC+06:30UTC+07UTC+08UTC+09UTC+09:30UTC+10UTC+10:30UTC+11UTC+12UTC+13UTC-02UTC-03UTC-04UTC-05UTC-06UTC-07UTC-08UTC-09UTC-10UTC-11 - Timezone *string `type:"string"` -} - -// String returns the string representation -func (s Schedule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Schedule) GoString() string { - return s.String() -} - -// SetEndTime sets the EndTime field's value. -func (s *Schedule) SetEndTime(v string) *Schedule { - s.EndTime = &v - return s -} - -// SetEventFilter sets the EventFilter field's value. -func (s *Schedule) SetEventFilter(v *CampaignEventFilter) *Schedule { - s.EventFilter = v - return s -} - -// SetFrequency sets the Frequency field's value. -func (s *Schedule) SetFrequency(v string) *Schedule { - s.Frequency = &v - return s -} - -// SetIsLocalTime sets the IsLocalTime field's value. -func (s *Schedule) SetIsLocalTime(v bool) *Schedule { - s.IsLocalTime = &v - return s -} - -// SetQuietTime sets the QuietTime field's value. -func (s *Schedule) SetQuietTime(v *QuietTime) *Schedule { - s.QuietTime = v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *Schedule) SetStartTime(v string) *Schedule { - s.StartTime = &v - return s -} - -// SetTimezone sets the Timezone field's value. -func (s *Schedule) SetTimezone(v string) *Schedule { - s.Timezone = &v - return s -} - -// Segment behavior dimensions -type SegmentBehaviors struct { - _ struct{} `type:"structure"` - - // The recency of use. - Recency *RecencyDimension `type:"structure"` -} - -// String returns the string representation -func (s SegmentBehaviors) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SegmentBehaviors) GoString() string { - return s.String() -} - -// SetRecency sets the Recency field's value. -func (s *SegmentBehaviors) SetRecency(v *RecencyDimension) *SegmentBehaviors { - s.Recency = v - return s -} - -// Segment demographic dimensions -type SegmentDemographics struct { - _ struct{} `type:"structure"` - - // The app version criteria for the segment. - AppVersion *SetDimension `type:"structure"` - - // The channel criteria for the segment. - Channel *SetDimension `type:"structure"` - - // The device type criteria for the segment. - DeviceType *SetDimension `type:"structure"` - - // The device make criteria for the segment. - Make *SetDimension `type:"structure"` - - // The device model criteria for the segment. - Model *SetDimension `type:"structure"` - - // The device platform criteria for the segment. - Platform *SetDimension `type:"structure"` -} - -// String returns the string representation -func (s SegmentDemographics) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SegmentDemographics) GoString() string { - return s.String() -} - -// SetAppVersion sets the AppVersion field's value. -func (s *SegmentDemographics) SetAppVersion(v *SetDimension) *SegmentDemographics { - s.AppVersion = v - return s -} - -// SetChannel sets the Channel field's value. -func (s *SegmentDemographics) SetChannel(v *SetDimension) *SegmentDemographics { - s.Channel = v - return s -} - -// SetDeviceType sets the DeviceType field's value. -func (s *SegmentDemographics) SetDeviceType(v *SetDimension) *SegmentDemographics { - s.DeviceType = v - return s -} - -// SetMake sets the Make field's value. -func (s *SegmentDemographics) SetMake(v *SetDimension) *SegmentDemographics { - s.Make = v - return s -} - -// SetModel sets the Model field's value. -func (s *SegmentDemographics) SetModel(v *SetDimension) *SegmentDemographics { - s.Model = v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *SegmentDemographics) SetPlatform(v *SetDimension) *SegmentDemographics { - s.Platform = v - return s -} - -// Segment dimensions -type SegmentDimensions struct { - _ struct{} `type:"structure"` - - // Custom segment attributes. - Attributes map[string]*AttributeDimension `type:"map"` - - // The segment behaviors attributes. - Behavior *SegmentBehaviors `type:"structure"` - - // The segment demographics attributes. - Demographic *SegmentDemographics `type:"structure"` - - // The segment location attributes. - Location *SegmentLocation `type:"structure"` - - // Custom segment metrics. - Metrics map[string]*MetricDimension `type:"map"` - - // Custom segment user attributes. - UserAttributes map[string]*AttributeDimension `type:"map"` -} - -// String returns the string representation -func (s SegmentDimensions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SegmentDimensions) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *SegmentDimensions) SetAttributes(v map[string]*AttributeDimension) *SegmentDimensions { - s.Attributes = v - return s -} - -// SetBehavior sets the Behavior field's value. -func (s *SegmentDimensions) SetBehavior(v *SegmentBehaviors) *SegmentDimensions { - s.Behavior = v - return s -} - -// SetDemographic sets the Demographic field's value. -func (s *SegmentDimensions) SetDemographic(v *SegmentDemographics) *SegmentDimensions { - s.Demographic = v - return s -} - -// SetLocation sets the Location field's value. -func (s *SegmentDimensions) SetLocation(v *SegmentLocation) *SegmentDimensions { - s.Location = v - return s -} - -// SetMetrics sets the Metrics field's value. -func (s *SegmentDimensions) SetMetrics(v map[string]*MetricDimension) *SegmentDimensions { - s.Metrics = v - return s -} - -// SetUserAttributes sets the UserAttributes field's value. -func (s *SegmentDimensions) SetUserAttributes(v map[string]*AttributeDimension) *SegmentDimensions { - s.UserAttributes = v - return s -} - -// Segment group definition. -type SegmentGroup struct { - _ struct{} `type:"structure"` - - // List of dimensions to include or exclude. - Dimensions []*SegmentDimensions `type:"list"` - - // The base segment that you build your segment on. The source segment defines - // the starting "universe" of endpoints. When you add dimensions to the segment, - // it filters the source segment based on the dimensions that you specify. You - // can specify more than one dimensional segment. You can only specify one imported - // segment.NOTE: If you specify an imported segment for this attribute, the - // segment size estimate that appears in the Amazon Pinpoint console shows the - // size of the imported segment, without any filters applied to it. - SourceSegments []*SegmentReference `type:"list"` - - // Specify how to handle multiple source segments. For example, if you specify - // three source segments, should the resulting segment be based on any or all - // of the segments? Acceptable values: ANY or ALL. - SourceType *string `type:"string" enum:"SourceType"` - - // Specify how to handle multiple segment dimensions. For example, if you specify - // three dimensions, should the resulting segment include endpoints that are - // matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, - // or NONE. - Type *string `type:"string" enum:"Type"` -} - -// String returns the string representation -func (s SegmentGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SegmentGroup) GoString() string { - return s.String() -} - -// SetDimensions sets the Dimensions field's value. -func (s *SegmentGroup) SetDimensions(v []*SegmentDimensions) *SegmentGroup { - s.Dimensions = v - return s -} - -// SetSourceSegments sets the SourceSegments field's value. -func (s *SegmentGroup) SetSourceSegments(v []*SegmentReference) *SegmentGroup { - s.SourceSegments = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *SegmentGroup) SetSourceType(v string) *SegmentGroup { - s.SourceType = &v - return s -} - -// SetType sets the Type field's value. -func (s *SegmentGroup) SetType(v string) *SegmentGroup { - s.Type = &v - return s -} - -// Segment group definition. -type SegmentGroupList struct { - _ struct{} `type:"structure"` - - // A set of segment criteria to evaluate. - Groups []*SegmentGroup `type:"list"` - - // Specify how to handle multiple segment groups. For example, if the segment - // includes three segment groups, should the resulting segment include endpoints - // that are matched by all, any, or none of the segment groups you created. - // Acceptable values: ALL, ANY, or NONE. - Include *string `type:"string" enum:"Include"` -} - -// String returns the string representation -func (s SegmentGroupList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SegmentGroupList) GoString() string { - return s.String() -} - -// SetGroups sets the Groups field's value. -func (s *SegmentGroupList) SetGroups(v []*SegmentGroup) *SegmentGroupList { - s.Groups = v - return s -} - -// SetInclude sets the Include field's value. -func (s *SegmentGroupList) SetInclude(v string) *SegmentGroupList { - s.Include = &v - return s -} - -// Segment import definition. -type SegmentImportResource struct { - _ struct{} `type:"structure"` - - // The number of channel types in the imported segment. - ChannelCounts map[string]*int64 `type:"map"` - - // (Deprecated) Your AWS account ID, which you assigned to the ExternalID key - // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This - // requirement is removed, and external IDs are not recommended for IAM roles - // assumed by Amazon Pinpoint. - ExternalId *string `type:"string"` - - // The format of the endpoint files that were imported to create this segment.Valid - // values: CSV, JSON - Format *string `type:"string" enum:"Format"` - - // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint - // access to the endpoints in Amazon S3. - RoleArn *string `type:"string"` - - // The URL of the S3 bucket that the segment was imported from. - S3Url *string `type:"string"` - - // The number of endpoints that were successfully imported to create this segment. - Size *int64 `type:"integer"` -} - -// String returns the string representation -func (s SegmentImportResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SegmentImportResource) GoString() string { - return s.String() -} - -// SetChannelCounts sets the ChannelCounts field's value. -func (s *SegmentImportResource) SetChannelCounts(v map[string]*int64) *SegmentImportResource { - s.ChannelCounts = v - return s -} - -// SetExternalId sets the ExternalId field's value. -func (s *SegmentImportResource) SetExternalId(v string) *SegmentImportResource { - s.ExternalId = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *SegmentImportResource) SetFormat(v string) *SegmentImportResource { - s.Format = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *SegmentImportResource) SetRoleArn(v string) *SegmentImportResource { - s.RoleArn = &v - return s -} - -// SetS3Url sets the S3Url field's value. -func (s *SegmentImportResource) SetS3Url(v string) *SegmentImportResource { - s.S3Url = &v - return s -} - -// SetSize sets the Size field's value. -func (s *SegmentImportResource) SetSize(v int64) *SegmentImportResource { - s.Size = &v - return s -} - -// Segment location dimensions -type SegmentLocation struct { - _ struct{} `type:"structure"` - - // The country or region, in ISO 3166-1 alpha-2 format. - Country *SetDimension `type:"structure"` - - // The GPS Point dimension. - GPSPoint *GPSPointDimension `type:"structure"` -} - -// String returns the string representation -func (s SegmentLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SegmentLocation) GoString() string { - return s.String() -} - -// SetCountry sets the Country field's value. -func (s *SegmentLocation) SetCountry(v *SetDimension) *SegmentLocation { - s.Country = v - return s -} - -// SetGPSPoint sets the GPSPoint field's value. -func (s *SegmentLocation) SetGPSPoint(v *GPSPointDimension) *SegmentLocation { - s.GPSPoint = v - return s -} - -// Segment reference. -type SegmentReference struct { - _ struct{} `type:"structure"` - - // A unique identifier for the segment. - Id *string `type:"string"` - - // If specified contains a specific version of the segment included. - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s SegmentReference) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SegmentReference) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *SegmentReference) SetId(v string) *SegmentReference { - s.Id = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *SegmentReference) SetVersion(v int64) *SegmentReference { - s.Version = &v - return s -} - -// Segment definition. -type SegmentResponse struct { - _ struct{} `type:"structure"` - - // The ID of the application that the segment applies to. - ApplicationId *string `type:"string"` - - // The date and time when the segment was created. - CreationDate *string `type:"string"` - - // The segment dimensions attributes. - Dimensions *SegmentDimensions `type:"structure"` - - // The unique segment ID. - Id *string `type:"string"` - - // The import job settings. - ImportDefinition *SegmentImportResource `type:"structure"` - - // The date and time when the segment was last modified. - LastModifiedDate *string `type:"string"` - - // The name of the segment. - Name *string `type:"string"` - - // A segment group, which consists of zero or more source segments, plus dimensions - // that are applied to those source segments. - SegmentGroups *SegmentGroupList `type:"structure"` - - // The segment type:DIMENSIONAL - A dynamic segment built from selection criteria - // based on endpoint data reported by your app. You create this type of segment - // by using the segment builder in the Amazon Pinpoint console or by making - // a POST request to the segments resource.IMPORT - A static segment built from - // an imported set of endpoint definitions. You create this type of segment - // by importing a segment in the Amazon Pinpoint console or by making a POST - // request to the jobs/import resource. - SegmentType *string `type:"string" enum:"SegmentType"` - - // The segment version number. - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s SegmentResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SegmentResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *SegmentResponse) SetApplicationId(v string) *SegmentResponse { - s.ApplicationId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *SegmentResponse) SetCreationDate(v string) *SegmentResponse { - s.CreationDate = &v - return s -} - -// SetDimensions sets the Dimensions field's value. -func (s *SegmentResponse) SetDimensions(v *SegmentDimensions) *SegmentResponse { - s.Dimensions = v - return s -} - -// SetId sets the Id field's value. -func (s *SegmentResponse) SetId(v string) *SegmentResponse { - s.Id = &v - return s -} - -// SetImportDefinition sets the ImportDefinition field's value. -func (s *SegmentResponse) SetImportDefinition(v *SegmentImportResource) *SegmentResponse { - s.ImportDefinition = v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *SegmentResponse) SetLastModifiedDate(v string) *SegmentResponse { - s.LastModifiedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *SegmentResponse) SetName(v string) *SegmentResponse { - s.Name = &v - return s -} - -// SetSegmentGroups sets the SegmentGroups field's value. -func (s *SegmentResponse) SetSegmentGroups(v *SegmentGroupList) *SegmentResponse { - s.SegmentGroups = v - return s -} - -// SetSegmentType sets the SegmentType field's value. -func (s *SegmentResponse) SetSegmentType(v string) *SegmentResponse { - s.SegmentType = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *SegmentResponse) SetVersion(v int64) *SegmentResponse { - s.Version = &v - return s -} - -// Segments in your account. -type SegmentsResponse struct { - _ struct{} `type:"structure"` - - // The list of segments. - Item []*SegmentResponse `type:"list"` - - // An identifier used to retrieve the next page of results. The token is null - // if no additional pages exist. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s SegmentsResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SegmentsResponse) GoString() string { - return s.String() -} - -// SetItem sets the Item field's value. -func (s *SegmentsResponse) SetItem(v []*SegmentResponse) *SegmentsResponse { - s.Item = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *SegmentsResponse) SetNextToken(v string) *SegmentsResponse { - s.NextToken = &v - return s -} - -type SendMessagesInput struct { - _ struct{} `type:"structure" payload:"MessageRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // Send message request. - // - // MessageRequest is a required field - MessageRequest *MessageRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s SendMessagesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendMessagesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendMessagesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendMessagesInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.MessageRequest == nil { - invalidParams.Add(request.NewErrParamRequired("MessageRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *SendMessagesInput) SetApplicationId(v string) *SendMessagesInput { - s.ApplicationId = &v - return s -} - -// SetMessageRequest sets the MessageRequest field's value. -func (s *SendMessagesInput) SetMessageRequest(v *MessageRequest) *SendMessagesInput { - s.MessageRequest = v - return s -} - -type SendMessagesOutput struct { - _ struct{} `type:"structure" payload:"MessageResponse"` - - // Send message response. - // - // MessageResponse is a required field - MessageResponse *MessageResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s SendMessagesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendMessagesOutput) GoString() string { - return s.String() -} - -// SetMessageResponse sets the MessageResponse field's value. -func (s *SendMessagesOutput) SetMessageResponse(v *MessageResponse) *SendMessagesOutput { - s.MessageResponse = v - return s -} - -// Send message request. -type SendUsersMessageRequest struct { - _ struct{} `type:"structure"` - - // A map of custom attribute-value pairs. Amazon Pinpoint adds these attributes - // to the data.pinpoint object in the body of the push notification payload. - // Amazon Pinpoint also provides these attributes in the events that it generates - // for users-messages deliveries. - Context map[string]*string `type:"map"` - - // Message definitions for the default message and any messages that are tailored - // for specific channels. - MessageConfiguration *DirectMessageConfiguration `type:"structure"` - - // A unique ID that you can use to trace a message. This ID is visible to recipients. - TraceId *string `type:"string"` - - // A map that associates user IDs with EndpointSendConfiguration objects. Within - // an EndpointSendConfiguration object, you can tailor the message for a user - // by specifying message overrides or substitutions. - Users map[string]*EndpointSendConfiguration `type:"map"` -} - -// String returns the string representation -func (s SendUsersMessageRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendUsersMessageRequest) GoString() string { - return s.String() -} - -// SetContext sets the Context field's value. -func (s *SendUsersMessageRequest) SetContext(v map[string]*string) *SendUsersMessageRequest { - s.Context = v - return s -} - -// SetMessageConfiguration sets the MessageConfiguration field's value. -func (s *SendUsersMessageRequest) SetMessageConfiguration(v *DirectMessageConfiguration) *SendUsersMessageRequest { - s.MessageConfiguration = v - return s -} - -// SetTraceId sets the TraceId field's value. -func (s *SendUsersMessageRequest) SetTraceId(v string) *SendUsersMessageRequest { - s.TraceId = &v - return s -} - -// SetUsers sets the Users field's value. -func (s *SendUsersMessageRequest) SetUsers(v map[string]*EndpointSendConfiguration) *SendUsersMessageRequest { - s.Users = v - return s -} - -// User send message response. -type SendUsersMessageResponse struct { - _ struct{} `type:"structure"` - - // The unique ID of the Amazon Pinpoint project used to send the message. - ApplicationId *string `type:"string"` - - // The unique ID assigned to the users-messages request. - RequestId *string `type:"string"` - - // An object that shows the endpoints that were messaged for each user. The - // object provides a list of user IDs. For each user ID, it provides the endpoint - // IDs that were messaged. For each endpoint ID, it provides an EndpointMessageResult - // object. - Result map[string]map[string]*EndpointMessageResult `type:"map"` -} - -// String returns the string representation -func (s SendUsersMessageResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendUsersMessageResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *SendUsersMessageResponse) SetApplicationId(v string) *SendUsersMessageResponse { - s.ApplicationId = &v - return s -} - -// SetRequestId sets the RequestId field's value. -func (s *SendUsersMessageResponse) SetRequestId(v string) *SendUsersMessageResponse { - s.RequestId = &v - return s -} - -// SetResult sets the Result field's value. -func (s *SendUsersMessageResponse) SetResult(v map[string]map[string]*EndpointMessageResult) *SendUsersMessageResponse { - s.Result = v - return s -} - -type SendUsersMessagesInput struct { - _ struct{} `type:"structure" payload:"SendUsersMessageRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // Send message request. - // - // SendUsersMessageRequest is a required field - SendUsersMessageRequest *SendUsersMessageRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s SendUsersMessagesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendUsersMessagesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendUsersMessagesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendUsersMessagesInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.SendUsersMessageRequest == nil { - invalidParams.Add(request.NewErrParamRequired("SendUsersMessageRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *SendUsersMessagesInput) SetApplicationId(v string) *SendUsersMessagesInput { - s.ApplicationId = &v - return s -} - -// SetSendUsersMessageRequest sets the SendUsersMessageRequest field's value. -func (s *SendUsersMessagesInput) SetSendUsersMessageRequest(v *SendUsersMessageRequest) *SendUsersMessagesInput { - s.SendUsersMessageRequest = v - return s -} - -type SendUsersMessagesOutput struct { - _ struct{} `type:"structure" payload:"SendUsersMessageResponse"` - - // User send message response. - // - // SendUsersMessageResponse is a required field - SendUsersMessageResponse *SendUsersMessageResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s SendUsersMessagesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendUsersMessagesOutput) GoString() string { - return s.String() -} - -// SetSendUsersMessageResponse sets the SendUsersMessageResponse field's value. -func (s *SendUsersMessagesOutput) SetSendUsersMessageResponse(v *SendUsersMessageResponse) *SendUsersMessagesOutput { - s.SendUsersMessageResponse = v - return s -} - -// Information about a session. -type Session struct { - _ struct{} `type:"structure"` - - // The duration of the session, in milliseconds. - Duration *int64 `type:"integer"` - - // A unique identifier for the session. - Id *string `type:"string"` - - // The date and time when the session began. - StartTimestamp *string `type:"string"` - - // The date and time when the session ended. - StopTimestamp *string `type:"string"` -} - -// String returns the string representation -func (s Session) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Session) GoString() string { - return s.String() -} - -// SetDuration sets the Duration field's value. -func (s *Session) SetDuration(v int64) *Session { - s.Duration = &v - return s -} - -// SetId sets the Id field's value. -func (s *Session) SetId(v string) *Session { - s.Id = &v - return s -} - -// SetStartTimestamp sets the StartTimestamp field's value. -func (s *Session) SetStartTimestamp(v string) *Session { - s.StartTimestamp = &v - return s -} - -// SetStopTimestamp sets the StopTimestamp field's value. -func (s *Session) SetStopTimestamp(v string) *Session { - s.StopTimestamp = &v - return s -} - -// Dimension specification of a segment. -type SetDimension struct { - _ struct{} `type:"structure"` - - // The type of dimension:INCLUSIVE - Endpoints that match the criteria are included - // in the segment.EXCLUSIVE - Endpoints that match the criteria are excluded - // from the segment. - DimensionType *string `type:"string" enum:"DimensionType"` - - // The criteria values for the segment dimension. Endpoints with matching attribute - // values are included or excluded from the segment, depending on the setting - // for Type. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s SetDimension) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetDimension) GoString() string { - return s.String() -} - -// SetDimensionType sets the DimensionType field's value. -func (s *SetDimension) SetDimensionType(v string) *SetDimension { - s.DimensionType = &v - return s -} - -// SetValues sets the Values field's value. -func (s *SetDimension) SetValues(v []*string) *SetDimension { - s.Values = v - return s -} - -// An email composed of a subject, a text part and a html part. -type SimpleEmail struct { - _ struct{} `type:"structure"` - - // The content of the message, in HTML format. Use this for email clients that - // can process HTML. You can include clickable links, formatted text, and much - // more in an HTML message. - HtmlPart *SimpleEmailPart `type:"structure"` - - // The subject of the message: A short summary of the content, which will appear - // in the recipient's inbox. - Subject *SimpleEmailPart `type:"structure"` - - // The content of the message, in text format. Use this for text-based email - // clients, or clients on high-latency networks (such as mobile devices). - TextPart *SimpleEmailPart `type:"structure"` -} - -// String returns the string representation -func (s SimpleEmail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SimpleEmail) GoString() string { - return s.String() -} - -// SetHtmlPart sets the HtmlPart field's value. -func (s *SimpleEmail) SetHtmlPart(v *SimpleEmailPart) *SimpleEmail { - s.HtmlPart = v - return s -} - -// SetSubject sets the Subject field's value. -func (s *SimpleEmail) SetSubject(v *SimpleEmailPart) *SimpleEmail { - s.Subject = v - return s -} - -// SetTextPart sets the TextPart field's value. -func (s *SimpleEmail) SetTextPart(v *SimpleEmailPart) *SimpleEmail { - s.TextPart = v - return s -} - -// Textual email data, plus an optional character set specification. -type SimpleEmailPart struct { - _ struct{} `type:"structure"` - - // The character set of the content. - Charset *string `type:"string"` - - // The textual data of the content. - Data *string `type:"string"` -} - -// String returns the string representation -func (s SimpleEmailPart) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SimpleEmailPart) GoString() string { - return s.String() -} - -// SetCharset sets the Charset field's value. -func (s *SimpleEmailPart) SetCharset(v string) *SimpleEmailPart { - s.Charset = &v - return s -} - -// SetData sets the Data field's value. -func (s *SimpleEmailPart) SetData(v string) *SimpleEmailPart { - s.Data = &v - return s -} - -// Treatment resource -type TreatmentResource struct { - _ struct{} `type:"structure"` - - // The unique treatment ID. - Id *string `type:"string"` - - // The message configuration settings. - MessageConfiguration *MessageConfiguration `type:"structure"` - - // The campaign schedule. - Schedule *Schedule `type:"structure"` - - // The allocated percentage of users for this treatment. - SizePercent *int64 `type:"integer"` - - // The treatment status. - State *CampaignState `type:"structure"` - - // A custom description for the treatment. - TreatmentDescription *string `type:"string"` - - // The custom name of a variation of the campaign used for A/B testing. - TreatmentName *string `type:"string"` -} - -// String returns the string representation -func (s TreatmentResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TreatmentResource) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *TreatmentResource) SetId(v string) *TreatmentResource { - s.Id = &v - return s -} - -// SetMessageConfiguration sets the MessageConfiguration field's value. -func (s *TreatmentResource) SetMessageConfiguration(v *MessageConfiguration) *TreatmentResource { - s.MessageConfiguration = v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *TreatmentResource) SetSchedule(v *Schedule) *TreatmentResource { - s.Schedule = v - return s -} - -// SetSizePercent sets the SizePercent field's value. -func (s *TreatmentResource) SetSizePercent(v int64) *TreatmentResource { - s.SizePercent = &v - return s -} - -// SetState sets the State field's value. -func (s *TreatmentResource) SetState(v *CampaignState) *TreatmentResource { - s.State = v - return s -} - -// SetTreatmentDescription sets the TreatmentDescription field's value. -func (s *TreatmentResource) SetTreatmentDescription(v string) *TreatmentResource { - s.TreatmentDescription = &v - return s -} - -// SetTreatmentName sets the TreatmentName field's value. -func (s *TreatmentResource) SetTreatmentName(v string) *TreatmentResource { - s.TreatmentName = &v - return s -} - -type UpdateAdmChannelInput struct { - _ struct{} `type:"structure" payload:"ADMChannelRequest"` - - // Amazon Device Messaging channel definition. - // - // ADMChannelRequest is a required field - ADMChannelRequest *ADMChannelRequest `type:"structure" required:"true"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateAdmChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAdmChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAdmChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAdmChannelInput"} - if s.ADMChannelRequest == nil { - invalidParams.Add(request.NewErrParamRequired("ADMChannelRequest")) - } - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetADMChannelRequest sets the ADMChannelRequest field's value. -func (s *UpdateAdmChannelInput) SetADMChannelRequest(v *ADMChannelRequest) *UpdateAdmChannelInput { - s.ADMChannelRequest = v - return s -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateAdmChannelInput) SetApplicationId(v string) *UpdateAdmChannelInput { - s.ApplicationId = &v - return s -} - -type UpdateAdmChannelOutput struct { - _ struct{} `type:"structure" payload:"ADMChannelResponse"` - - // Amazon Device Messaging channel definition. - // - // ADMChannelResponse is a required field - ADMChannelResponse *ADMChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateAdmChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAdmChannelOutput) GoString() string { - return s.String() -} - -// SetADMChannelResponse sets the ADMChannelResponse field's value. -func (s *UpdateAdmChannelOutput) SetADMChannelResponse(v *ADMChannelResponse) *UpdateAdmChannelOutput { - s.ADMChannelResponse = v - return s -} - -type UpdateApnsChannelInput struct { - _ struct{} `type:"structure" payload:"APNSChannelRequest"` - - // Apple Push Notification Service channel definition. - // - // APNSChannelRequest is a required field - APNSChannelRequest *APNSChannelRequest `type:"structure" required:"true"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateApnsChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApnsChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApnsChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApnsChannelInput"} - if s.APNSChannelRequest == nil { - invalidParams.Add(request.NewErrParamRequired("APNSChannelRequest")) - } - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAPNSChannelRequest sets the APNSChannelRequest field's value. -func (s *UpdateApnsChannelInput) SetAPNSChannelRequest(v *APNSChannelRequest) *UpdateApnsChannelInput { - s.APNSChannelRequest = v - return s -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateApnsChannelInput) SetApplicationId(v string) *UpdateApnsChannelInput { - s.ApplicationId = &v - return s -} - -type UpdateApnsChannelOutput struct { - _ struct{} `type:"structure" payload:"APNSChannelResponse"` - - // Apple Distribution Push Notification Service channel definition. - // - // APNSChannelResponse is a required field - APNSChannelResponse *APNSChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateApnsChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApnsChannelOutput) GoString() string { - return s.String() -} - -// SetAPNSChannelResponse sets the APNSChannelResponse field's value. -func (s *UpdateApnsChannelOutput) SetAPNSChannelResponse(v *APNSChannelResponse) *UpdateApnsChannelOutput { - s.APNSChannelResponse = v - return s -} - -type UpdateApnsSandboxChannelInput struct { - _ struct{} `type:"structure" payload:"APNSSandboxChannelRequest"` - - // Apple Development Push Notification Service channel definition. - // - // APNSSandboxChannelRequest is a required field - APNSSandboxChannelRequest *APNSSandboxChannelRequest `type:"structure" required:"true"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateApnsSandboxChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApnsSandboxChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApnsSandboxChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApnsSandboxChannelInput"} - if s.APNSSandboxChannelRequest == nil { - invalidParams.Add(request.NewErrParamRequired("APNSSandboxChannelRequest")) - } - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAPNSSandboxChannelRequest sets the APNSSandboxChannelRequest field's value. -func (s *UpdateApnsSandboxChannelInput) SetAPNSSandboxChannelRequest(v *APNSSandboxChannelRequest) *UpdateApnsSandboxChannelInput { - s.APNSSandboxChannelRequest = v - return s -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateApnsSandboxChannelInput) SetApplicationId(v string) *UpdateApnsSandboxChannelInput { - s.ApplicationId = &v - return s -} - -type UpdateApnsSandboxChannelOutput struct { - _ struct{} `type:"structure" payload:"APNSSandboxChannelResponse"` - - // Apple Development Push Notification Service channel definition. - // - // APNSSandboxChannelResponse is a required field - APNSSandboxChannelResponse *APNSSandboxChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateApnsSandboxChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApnsSandboxChannelOutput) GoString() string { - return s.String() -} - -// SetAPNSSandboxChannelResponse sets the APNSSandboxChannelResponse field's value. -func (s *UpdateApnsSandboxChannelOutput) SetAPNSSandboxChannelResponse(v *APNSSandboxChannelResponse) *UpdateApnsSandboxChannelOutput { - s.APNSSandboxChannelResponse = v - return s -} - -type UpdateApnsVoipChannelInput struct { - _ struct{} `type:"structure" payload:"APNSVoipChannelRequest"` - - // Apple VoIP Push Notification Service channel definition. - // - // APNSVoipChannelRequest is a required field - APNSVoipChannelRequest *APNSVoipChannelRequest `type:"structure" required:"true"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateApnsVoipChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApnsVoipChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApnsVoipChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApnsVoipChannelInput"} - if s.APNSVoipChannelRequest == nil { - invalidParams.Add(request.NewErrParamRequired("APNSVoipChannelRequest")) - } - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAPNSVoipChannelRequest sets the APNSVoipChannelRequest field's value. -func (s *UpdateApnsVoipChannelInput) SetAPNSVoipChannelRequest(v *APNSVoipChannelRequest) *UpdateApnsVoipChannelInput { - s.APNSVoipChannelRequest = v - return s -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateApnsVoipChannelInput) SetApplicationId(v string) *UpdateApnsVoipChannelInput { - s.ApplicationId = &v - return s -} - -type UpdateApnsVoipChannelOutput struct { - _ struct{} `type:"structure" payload:"APNSVoipChannelResponse"` - - // Apple VoIP Push Notification Service channel definition. - // - // APNSVoipChannelResponse is a required field - APNSVoipChannelResponse *APNSVoipChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateApnsVoipChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApnsVoipChannelOutput) GoString() string { - return s.String() -} - -// SetAPNSVoipChannelResponse sets the APNSVoipChannelResponse field's value. -func (s *UpdateApnsVoipChannelOutput) SetAPNSVoipChannelResponse(v *APNSVoipChannelResponse) *UpdateApnsVoipChannelOutput { - s.APNSVoipChannelResponse = v - return s -} - -type UpdateApnsVoipSandboxChannelInput struct { - _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelRequest"` - - // Apple VoIP Developer Push Notification Service channel definition. - // - // APNSVoipSandboxChannelRequest is a required field - APNSVoipSandboxChannelRequest *APNSVoipSandboxChannelRequest `type:"structure" required:"true"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateApnsVoipSandboxChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApnsVoipSandboxChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApnsVoipSandboxChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApnsVoipSandboxChannelInput"} - if s.APNSVoipSandboxChannelRequest == nil { - invalidParams.Add(request.NewErrParamRequired("APNSVoipSandboxChannelRequest")) - } - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAPNSVoipSandboxChannelRequest sets the APNSVoipSandboxChannelRequest field's value. -func (s *UpdateApnsVoipSandboxChannelInput) SetAPNSVoipSandboxChannelRequest(v *APNSVoipSandboxChannelRequest) *UpdateApnsVoipSandboxChannelInput { - s.APNSVoipSandboxChannelRequest = v - return s -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateApnsVoipSandboxChannelInput) SetApplicationId(v string) *UpdateApnsVoipSandboxChannelInput { - s.ApplicationId = &v - return s -} - -type UpdateApnsVoipSandboxChannelOutput struct { - _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelResponse"` - - // Apple VoIP Developer Push Notification Service channel definition. - // - // APNSVoipSandboxChannelResponse is a required field - APNSVoipSandboxChannelResponse *APNSVoipSandboxChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateApnsVoipSandboxChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApnsVoipSandboxChannelOutput) GoString() string { - return s.String() -} - -// SetAPNSVoipSandboxChannelResponse sets the APNSVoipSandboxChannelResponse field's value. -func (s *UpdateApnsVoipSandboxChannelOutput) SetAPNSVoipSandboxChannelResponse(v *APNSVoipSandboxChannelResponse) *UpdateApnsVoipSandboxChannelOutput { - s.APNSVoipSandboxChannelResponse = v - return s -} - -type UpdateApplicationSettingsInput struct { - _ struct{} `type:"structure" payload:"WriteApplicationSettingsRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // Creating application setting request - // - // WriteApplicationSettingsRequest is a required field - WriteApplicationSettingsRequest *WriteApplicationSettingsRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateApplicationSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApplicationSettingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApplicationSettingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationSettingsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.WriteApplicationSettingsRequest == nil { - invalidParams.Add(request.NewErrParamRequired("WriteApplicationSettingsRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateApplicationSettingsInput) SetApplicationId(v string) *UpdateApplicationSettingsInput { - s.ApplicationId = &v - return s -} - -// SetWriteApplicationSettingsRequest sets the WriteApplicationSettingsRequest field's value. -func (s *UpdateApplicationSettingsInput) SetWriteApplicationSettingsRequest(v *WriteApplicationSettingsRequest) *UpdateApplicationSettingsInput { - s.WriteApplicationSettingsRequest = v - return s -} - -type UpdateApplicationSettingsOutput struct { - _ struct{} `type:"structure" payload:"ApplicationSettingsResource"` - - // Application settings. - // - // ApplicationSettingsResource is a required field - ApplicationSettingsResource *ApplicationSettingsResource `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateApplicationSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApplicationSettingsOutput) GoString() string { - return s.String() -} - -// SetApplicationSettingsResource sets the ApplicationSettingsResource field's value. -func (s *UpdateApplicationSettingsOutput) SetApplicationSettingsResource(v *ApplicationSettingsResource) *UpdateApplicationSettingsOutput { - s.ApplicationSettingsResource = v - return s -} - -// Update attributes request -type UpdateAttributesRequest struct { - _ struct{} `type:"structure"` - - // The GLOB wildcard for removing the attributes in the application - Blacklist []*string `type:"list"` -} - -// String returns the string representation -func (s UpdateAttributesRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAttributesRequest) GoString() string { - return s.String() -} - -// SetBlacklist sets the Blacklist field's value. -func (s *UpdateAttributesRequest) SetBlacklist(v []*string) *UpdateAttributesRequest { - s.Blacklist = v - return s -} - -type UpdateBaiduChannelInput struct { - _ struct{} `type:"structure" payload:"BaiduChannelRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // Baidu Cloud Push credentials - // - // BaiduChannelRequest is a required field - BaiduChannelRequest *BaiduChannelRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateBaiduChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBaiduChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateBaiduChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateBaiduChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.BaiduChannelRequest == nil { - invalidParams.Add(request.NewErrParamRequired("BaiduChannelRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateBaiduChannelInput) SetApplicationId(v string) *UpdateBaiduChannelInput { - s.ApplicationId = &v - return s -} - -// SetBaiduChannelRequest sets the BaiduChannelRequest field's value. -func (s *UpdateBaiduChannelInput) SetBaiduChannelRequest(v *BaiduChannelRequest) *UpdateBaiduChannelInput { - s.BaiduChannelRequest = v - return s -} - -type UpdateBaiduChannelOutput struct { - _ struct{} `type:"structure" payload:"BaiduChannelResponse"` - - // Baidu Cloud Messaging channel definition - // - // BaiduChannelResponse is a required field - BaiduChannelResponse *BaiduChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateBaiduChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBaiduChannelOutput) GoString() string { - return s.String() -} - -// SetBaiduChannelResponse sets the BaiduChannelResponse field's value. -func (s *UpdateBaiduChannelOutput) SetBaiduChannelResponse(v *BaiduChannelResponse) *UpdateBaiduChannelOutput { - s.BaiduChannelResponse = v - return s -} - -type UpdateCampaignInput struct { - _ struct{} `type:"structure" payload:"WriteCampaignRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // CampaignId is a required field - CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` - - // Used to create a campaign. - // - // WriteCampaignRequest is a required field - WriteCampaignRequest *WriteCampaignRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateCampaignInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCampaignInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCampaignInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCampaignInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.CampaignId == nil { - invalidParams.Add(request.NewErrParamRequired("CampaignId")) - } - if s.CampaignId != nil && len(*s.CampaignId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CampaignId", 1)) - } - if s.WriteCampaignRequest == nil { - invalidParams.Add(request.NewErrParamRequired("WriteCampaignRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateCampaignInput) SetApplicationId(v string) *UpdateCampaignInput { - s.ApplicationId = &v - return s -} - -// SetCampaignId sets the CampaignId field's value. -func (s *UpdateCampaignInput) SetCampaignId(v string) *UpdateCampaignInput { - s.CampaignId = &v - return s -} - -// SetWriteCampaignRequest sets the WriteCampaignRequest field's value. -func (s *UpdateCampaignInput) SetWriteCampaignRequest(v *WriteCampaignRequest) *UpdateCampaignInput { - s.WriteCampaignRequest = v - return s -} - -type UpdateCampaignOutput struct { - _ struct{} `type:"structure" payload:"CampaignResponse"` - - // Campaign definition - // - // CampaignResponse is a required field - CampaignResponse *CampaignResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateCampaignOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCampaignOutput) GoString() string { - return s.String() -} - -// SetCampaignResponse sets the CampaignResponse field's value. -func (s *UpdateCampaignOutput) SetCampaignResponse(v *CampaignResponse) *UpdateCampaignOutput { - s.CampaignResponse = v - return s -} - -type UpdateEmailChannelInput struct { - _ struct{} `type:"structure" payload:"EmailChannelRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // Email Channel Request - // - // EmailChannelRequest is a required field - EmailChannelRequest *EmailChannelRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateEmailChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEmailChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateEmailChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateEmailChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.EmailChannelRequest == nil { - invalidParams.Add(request.NewErrParamRequired("EmailChannelRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateEmailChannelInput) SetApplicationId(v string) *UpdateEmailChannelInput { - s.ApplicationId = &v - return s -} - -// SetEmailChannelRequest sets the EmailChannelRequest field's value. -func (s *UpdateEmailChannelInput) SetEmailChannelRequest(v *EmailChannelRequest) *UpdateEmailChannelInput { - s.EmailChannelRequest = v - return s -} - -type UpdateEmailChannelOutput struct { - _ struct{} `type:"structure" payload:"EmailChannelResponse"` - - // Email Channel Response. - // - // EmailChannelResponse is a required field - EmailChannelResponse *EmailChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateEmailChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEmailChannelOutput) GoString() string { - return s.String() -} - -// SetEmailChannelResponse sets the EmailChannelResponse field's value. -func (s *UpdateEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelResponse) *UpdateEmailChannelOutput { - s.EmailChannelResponse = v - return s -} - -type UpdateEndpointInput struct { - _ struct{} `type:"structure" payload:"EndpointRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // EndpointId is a required field - EndpointId *string `location:"uri" locationName:"endpoint-id" type:"string" required:"true"` - - // An endpoint update request. - // - // EndpointRequest is a required field - EndpointRequest *EndpointRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateEndpointInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.EndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointId")) - } - if s.EndpointId != nil && len(*s.EndpointId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EndpointId", 1)) - } - if s.EndpointRequest == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateEndpointInput) SetApplicationId(v string) *UpdateEndpointInput { - s.ApplicationId = &v - return s -} - -// SetEndpointId sets the EndpointId field's value. -func (s *UpdateEndpointInput) SetEndpointId(v string) *UpdateEndpointInput { - s.EndpointId = &v - return s -} - -// SetEndpointRequest sets the EndpointRequest field's value. -func (s *UpdateEndpointInput) SetEndpointRequest(v *EndpointRequest) *UpdateEndpointInput { - s.EndpointRequest = v - return s -} - -type UpdateEndpointOutput struct { - _ struct{} `type:"structure" payload:"MessageBody"` - - // Simple message object. - // - // MessageBody is a required field - MessageBody *MessageBody `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEndpointOutput) GoString() string { - return s.String() -} - -// SetMessageBody sets the MessageBody field's value. -func (s *UpdateEndpointOutput) SetMessageBody(v *MessageBody) *UpdateEndpointOutput { - s.MessageBody = v - return s -} - -type UpdateEndpointsBatchInput struct { - _ struct{} `type:"structure" payload:"EndpointBatchRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // Endpoint batch update request. - // - // EndpointBatchRequest is a required field - EndpointBatchRequest *EndpointBatchRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateEndpointsBatchInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEndpointsBatchInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateEndpointsBatchInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateEndpointsBatchInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.EndpointBatchRequest == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointBatchRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateEndpointsBatchInput) SetApplicationId(v string) *UpdateEndpointsBatchInput { - s.ApplicationId = &v - return s -} - -// SetEndpointBatchRequest sets the EndpointBatchRequest field's value. -func (s *UpdateEndpointsBatchInput) SetEndpointBatchRequest(v *EndpointBatchRequest) *UpdateEndpointsBatchInput { - s.EndpointBatchRequest = v - return s -} - -type UpdateEndpointsBatchOutput struct { - _ struct{} `type:"structure" payload:"MessageBody"` - - // Simple message object. - // - // MessageBody is a required field - MessageBody *MessageBody `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateEndpointsBatchOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEndpointsBatchOutput) GoString() string { - return s.String() -} - -// SetMessageBody sets the MessageBody field's value. -func (s *UpdateEndpointsBatchOutput) SetMessageBody(v *MessageBody) *UpdateEndpointsBatchOutput { - s.MessageBody = v - return s -} - -type UpdateGcmChannelInput struct { - _ struct{} `type:"structure" payload:"GCMChannelRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // Google Cloud Messaging credentials - // - // GCMChannelRequest is a required field - GCMChannelRequest *GCMChannelRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateGcmChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGcmChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateGcmChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateGcmChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.GCMChannelRequest == nil { - invalidParams.Add(request.NewErrParamRequired("GCMChannelRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateGcmChannelInput) SetApplicationId(v string) *UpdateGcmChannelInput { - s.ApplicationId = &v - return s -} - -// SetGCMChannelRequest sets the GCMChannelRequest field's value. -func (s *UpdateGcmChannelInput) SetGCMChannelRequest(v *GCMChannelRequest) *UpdateGcmChannelInput { - s.GCMChannelRequest = v - return s -} - -type UpdateGcmChannelOutput struct { - _ struct{} `type:"structure" payload:"GCMChannelResponse"` - - // Google Cloud Messaging channel definition - // - // GCMChannelResponse is a required field - GCMChannelResponse *GCMChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateGcmChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGcmChannelOutput) GoString() string { - return s.String() -} - -// SetGCMChannelResponse sets the GCMChannelResponse field's value. -func (s *UpdateGcmChannelOutput) SetGCMChannelResponse(v *GCMChannelResponse) *UpdateGcmChannelOutput { - s.GCMChannelResponse = v - return s -} - -type UpdateSegmentInput struct { - _ struct{} `type:"structure" payload:"WriteSegmentRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // SegmentId is a required field - SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` - - // Segment definition. - // - // WriteSegmentRequest is a required field - WriteSegmentRequest *WriteSegmentRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateSegmentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSegmentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSegmentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSegmentInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.SegmentId == nil { - invalidParams.Add(request.NewErrParamRequired("SegmentId")) - } - if s.SegmentId != nil && len(*s.SegmentId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SegmentId", 1)) - } - if s.WriteSegmentRequest == nil { - invalidParams.Add(request.NewErrParamRequired("WriteSegmentRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateSegmentInput) SetApplicationId(v string) *UpdateSegmentInput { - s.ApplicationId = &v - return s -} - -// SetSegmentId sets the SegmentId field's value. -func (s *UpdateSegmentInput) SetSegmentId(v string) *UpdateSegmentInput { - s.SegmentId = &v - return s -} - -// SetWriteSegmentRequest sets the WriteSegmentRequest field's value. -func (s *UpdateSegmentInput) SetWriteSegmentRequest(v *WriteSegmentRequest) *UpdateSegmentInput { - s.WriteSegmentRequest = v - return s -} - -type UpdateSegmentOutput struct { - _ struct{} `type:"structure" payload:"SegmentResponse"` - - // Segment definition. - // - // SegmentResponse is a required field - SegmentResponse *SegmentResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateSegmentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSegmentOutput) GoString() string { - return s.String() -} - -// SetSegmentResponse sets the SegmentResponse field's value. -func (s *UpdateSegmentOutput) SetSegmentResponse(v *SegmentResponse) *UpdateSegmentOutput { - s.SegmentResponse = v - return s -} - -type UpdateSmsChannelInput struct { - _ struct{} `type:"structure" payload:"SMSChannelRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // SMS Channel Request - // - // SMSChannelRequest is a required field - SMSChannelRequest *SMSChannelRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateSmsChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSmsChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSmsChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSmsChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.SMSChannelRequest == nil { - invalidParams.Add(request.NewErrParamRequired("SMSChannelRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateSmsChannelInput) SetApplicationId(v string) *UpdateSmsChannelInput { - s.ApplicationId = &v - return s -} - -// SetSMSChannelRequest sets the SMSChannelRequest field's value. -func (s *UpdateSmsChannelInput) SetSMSChannelRequest(v *SMSChannelRequest) *UpdateSmsChannelInput { - s.SMSChannelRequest = v - return s -} - -type UpdateSmsChannelOutput struct { - _ struct{} `type:"structure" payload:"SMSChannelResponse"` - - // SMS Channel Response. - // - // SMSChannelResponse is a required field - SMSChannelResponse *SMSChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateSmsChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSmsChannelOutput) GoString() string { - return s.String() -} - -// SetSMSChannelResponse sets the SMSChannelResponse field's value. -func (s *UpdateSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *UpdateSmsChannelOutput { - s.SMSChannelResponse = v - return s -} - -type UpdateVoiceChannelInput struct { - _ struct{} `type:"structure" payload:"VoiceChannelRequest"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - - // Voice Channel Request - // - // VoiceChannelRequest is a required field - VoiceChannelRequest *VoiceChannelRequest `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateVoiceChannelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVoiceChannelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateVoiceChannelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateVoiceChannelInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.VoiceChannelRequest == nil { - invalidParams.Add(request.NewErrParamRequired("VoiceChannelRequest")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateVoiceChannelInput) SetApplicationId(v string) *UpdateVoiceChannelInput { - s.ApplicationId = &v - return s -} - -// SetVoiceChannelRequest sets the VoiceChannelRequest field's value. -func (s *UpdateVoiceChannelInput) SetVoiceChannelRequest(v *VoiceChannelRequest) *UpdateVoiceChannelInput { - s.VoiceChannelRequest = v - return s -} - -type UpdateVoiceChannelOutput struct { - _ struct{} `type:"structure" payload:"VoiceChannelResponse"` - - // Voice Channel Response. - // - // VoiceChannelResponse is a required field - VoiceChannelResponse *VoiceChannelResponse `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateVoiceChannelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVoiceChannelOutput) GoString() string { - return s.String() -} - -// SetVoiceChannelResponse sets the VoiceChannelResponse field's value. -func (s *UpdateVoiceChannelOutput) SetVoiceChannelResponse(v *VoiceChannelResponse) *UpdateVoiceChannelOutput { - s.VoiceChannelResponse = v - return s -} - -// Voice Channel Request -type VoiceChannelRequest struct { - _ struct{} `type:"structure"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s VoiceChannelRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VoiceChannelRequest) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *VoiceChannelRequest) SetEnabled(v bool) *VoiceChannelRequest { - s.Enabled = &v - return s -} - -// Voice Channel Response. -type VoiceChannelResponse struct { - _ struct{} `type:"structure"` - - // Application id - ApplicationId *string `type:"string"` - - // The date that the settings were last updated in ISO 8601 format. - CreationDate *string `type:"string"` - - // If the channel is enabled for sending messages. - Enabled *bool `type:"boolean"` - - HasCredential *bool `type:"boolean"` - - // Channel ID. Not used, only for backwards compatibility. - Id *string `type:"string"` - - // Is this channel archived - IsArchived *bool `type:"boolean"` - - // Who made the last change - LastModifiedBy *string `type:"string"` - - // Last date this was updated - LastModifiedDate *string `type:"string"` - - // Platform type. Will be "Voice" - Platform *string `type:"string"` - - // Version of channel - Version *int64 `type:"integer"` -} - -// String returns the string representation -func (s VoiceChannelResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VoiceChannelResponse) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *VoiceChannelResponse) SetApplicationId(v string) *VoiceChannelResponse { - s.ApplicationId = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *VoiceChannelResponse) SetCreationDate(v string) *VoiceChannelResponse { - s.CreationDate = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *VoiceChannelResponse) SetEnabled(v bool) *VoiceChannelResponse { - s.Enabled = &v - return s -} - -// SetHasCredential sets the HasCredential field's value. -func (s *VoiceChannelResponse) SetHasCredential(v bool) *VoiceChannelResponse { - s.HasCredential = &v - return s -} - -// SetId sets the Id field's value. -func (s *VoiceChannelResponse) SetId(v string) *VoiceChannelResponse { - s.Id = &v - return s -} - -// SetIsArchived sets the IsArchived field's value. -func (s *VoiceChannelResponse) SetIsArchived(v bool) *VoiceChannelResponse { - s.IsArchived = &v - return s -} - -// SetLastModifiedBy sets the LastModifiedBy field's value. -func (s *VoiceChannelResponse) SetLastModifiedBy(v string) *VoiceChannelResponse { - s.LastModifiedBy = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *VoiceChannelResponse) SetLastModifiedDate(v string) *VoiceChannelResponse { - s.LastModifiedDate = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *VoiceChannelResponse) SetPlatform(v string) *VoiceChannelResponse { - s.Platform = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *VoiceChannelResponse) SetVersion(v int64) *VoiceChannelResponse { - s.Version = &v - return s -} - -// Voice Message. -type VoiceMessage struct { - _ struct{} `type:"structure"` - - // The message body of the notification, the email body or the text message. - Body *string `type:"string"` - - // Language of sent message - LanguageCode *string `type:"string"` - - // Is the number from the pool or messaging service to send from. - OriginationNumber *string `type:"string"` - - // Default message substitutions. Can be overridden by individual address substitutions. - Substitutions map[string][]*string `type:"map"` - - // Voice ID of sent message. - VoiceId *string `type:"string"` -} - -// String returns the string representation -func (s VoiceMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VoiceMessage) GoString() string { - return s.String() -} - -// SetBody sets the Body field's value. -func (s *VoiceMessage) SetBody(v string) *VoiceMessage { - s.Body = &v - return s -} - -// SetLanguageCode sets the LanguageCode field's value. -func (s *VoiceMessage) SetLanguageCode(v string) *VoiceMessage { - s.LanguageCode = &v - return s -} - -// SetOriginationNumber sets the OriginationNumber field's value. -func (s *VoiceMessage) SetOriginationNumber(v string) *VoiceMessage { - s.OriginationNumber = &v - return s -} - -// SetSubstitutions sets the Substitutions field's value. -func (s *VoiceMessage) SetSubstitutions(v map[string][]*string) *VoiceMessage { - s.Substitutions = v - return s -} - -// SetVoiceId sets the VoiceId field's value. -func (s *VoiceMessage) SetVoiceId(v string) *VoiceMessage { - s.VoiceId = &v - return s -} - -// Creating application setting request -type WriteApplicationSettingsRequest struct { - _ struct{} `type:"structure"` - - // Default campaign hook information. - CampaignHook *CampaignHook `type:"structure"` - - // The CloudWatchMetrics settings for the app. - CloudWatchMetricsEnabled *bool `type:"boolean"` - - // The limits that apply to each campaign in the project by default. Campaigns - // can also have their own limits, which override the settings at the project - // level. - Limits *CampaignLimits `type:"structure"` - - // The default quiet time for the app. Campaigns in the app don't send messages - // to endpoints during the quiet time.Note: Make sure that your endpoints include - // the Demographics.Timezone attribute if you plan to enable a quiet time for - // your app. If your endpoints don't include this attribute, they'll receive - // the messages that you send them, even if quiet time is enabled.When you set - // up an app to use quiet time, campaigns in that app don't send messages during - // the time range you specified, as long as all of the following are true:- - // The endpoint includes a valid Demographic.Timezone attribute.- The current - // time in the endpoint's time zone is later than or equal to the time specified - // in the QuietTime.Start attribute for the app (or campaign, if applicable).- - // The current time in the endpoint's time zone is earlier than or equal to - // the time specified in the QuietTime.End attribute for the app (or campaign, - // if applicable).Individual campaigns within the app can have their own quiet - // time settings, which override the quiet time settings at the app level. - QuietTime *QuietTime `type:"structure"` -} - -// String returns the string representation -func (s WriteApplicationSettingsRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WriteApplicationSettingsRequest) GoString() string { - return s.String() -} - -// SetCampaignHook sets the CampaignHook field's value. -func (s *WriteApplicationSettingsRequest) SetCampaignHook(v *CampaignHook) *WriteApplicationSettingsRequest { - s.CampaignHook = v - return s -} - -// SetCloudWatchMetricsEnabled sets the CloudWatchMetricsEnabled field's value. -func (s *WriteApplicationSettingsRequest) SetCloudWatchMetricsEnabled(v bool) *WriteApplicationSettingsRequest { - s.CloudWatchMetricsEnabled = &v - return s -} - -// SetLimits sets the Limits field's value. -func (s *WriteApplicationSettingsRequest) SetLimits(v *CampaignLimits) *WriteApplicationSettingsRequest { - s.Limits = v - return s -} - -// SetQuietTime sets the QuietTime field's value. -func (s *WriteApplicationSettingsRequest) SetQuietTime(v *QuietTime) *WriteApplicationSettingsRequest { - s.QuietTime = v - return s -} - -// Used to create a campaign. -type WriteCampaignRequest struct { - _ struct{} `type:"structure"` - - // Treatments that are defined in addition to the default treatment. - AdditionalTreatments []*WriteTreatmentResource `type:"list"` - - // A description of the campaign. - Description *string `type:"string"` - - // The allocated percentage of end users who will not receive messages from - // this campaign. - HoldoutPercent *int64 `type:"integer"` - - // Campaign hook information. - Hook *CampaignHook `type:"structure"` - - // Indicates whether the campaign is paused. A paused campaign does not send - // messages unless you resume it by setting IsPaused to false. - IsPaused *bool `type:"boolean"` - - // The campaign limits settings. - Limits *CampaignLimits `type:"structure"` - - // The message configuration settings. - MessageConfiguration *MessageConfiguration `type:"structure"` - - // The custom name of the campaign. - Name *string `type:"string"` - - // The campaign schedule. - Schedule *Schedule `type:"structure"` - - // The ID of the segment to which the campaign sends messages. - SegmentId *string `type:"string"` - - // The version of the segment to which the campaign sends messages. - SegmentVersion *int64 `type:"integer"` - - // A custom description for the treatment. - TreatmentDescription *string `type:"string"` - - // The custom name of a variation of the campaign used for A/B testing. - TreatmentName *string `type:"string"` -} - -// String returns the string representation -func (s WriteCampaignRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WriteCampaignRequest) GoString() string { - return s.String() -} - -// SetAdditionalTreatments sets the AdditionalTreatments field's value. -func (s *WriteCampaignRequest) SetAdditionalTreatments(v []*WriteTreatmentResource) *WriteCampaignRequest { - s.AdditionalTreatments = v - return s -} - -// SetDescription sets the Description field's value. -func (s *WriteCampaignRequest) SetDescription(v string) *WriteCampaignRequest { - s.Description = &v - return s -} - -// SetHoldoutPercent sets the HoldoutPercent field's value. -func (s *WriteCampaignRequest) SetHoldoutPercent(v int64) *WriteCampaignRequest { - s.HoldoutPercent = &v - return s -} - -// SetHook sets the Hook field's value. -func (s *WriteCampaignRequest) SetHook(v *CampaignHook) *WriteCampaignRequest { - s.Hook = v - return s -} - -// SetIsPaused sets the IsPaused field's value. -func (s *WriteCampaignRequest) SetIsPaused(v bool) *WriteCampaignRequest { - s.IsPaused = &v - return s -} - -// SetLimits sets the Limits field's value. -func (s *WriteCampaignRequest) SetLimits(v *CampaignLimits) *WriteCampaignRequest { - s.Limits = v - return s -} - -// SetMessageConfiguration sets the MessageConfiguration field's value. -func (s *WriteCampaignRequest) SetMessageConfiguration(v *MessageConfiguration) *WriteCampaignRequest { - s.MessageConfiguration = v - return s -} - -// SetName sets the Name field's value. -func (s *WriteCampaignRequest) SetName(v string) *WriteCampaignRequest { - s.Name = &v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *WriteCampaignRequest) SetSchedule(v *Schedule) *WriteCampaignRequest { - s.Schedule = v - return s -} - -// SetSegmentId sets the SegmentId field's value. -func (s *WriteCampaignRequest) SetSegmentId(v string) *WriteCampaignRequest { - s.SegmentId = &v - return s -} - -// SetSegmentVersion sets the SegmentVersion field's value. -func (s *WriteCampaignRequest) SetSegmentVersion(v int64) *WriteCampaignRequest { - s.SegmentVersion = &v - return s -} - -// SetTreatmentDescription sets the TreatmentDescription field's value. -func (s *WriteCampaignRequest) SetTreatmentDescription(v string) *WriteCampaignRequest { - s.TreatmentDescription = &v - return s -} - -// SetTreatmentName sets the TreatmentName field's value. -func (s *WriteCampaignRequest) SetTreatmentName(v string) *WriteCampaignRequest { - s.TreatmentName = &v - return s -} - -// Request to save an EventStream. -type WriteEventStream struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery - // stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME - // Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME - DestinationStreamArn *string `type:"string"` - - // The IAM role that authorizes Amazon Pinpoint to publish events to the stream - // in your account. - RoleArn *string `type:"string"` -} - -// String returns the string representation -func (s WriteEventStream) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WriteEventStream) GoString() string { - return s.String() -} - -// SetDestinationStreamArn sets the DestinationStreamArn field's value. -func (s *WriteEventStream) SetDestinationStreamArn(v string) *WriteEventStream { - s.DestinationStreamArn = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *WriteEventStream) SetRoleArn(v string) *WriteEventStream { - s.RoleArn = &v - return s -} - -// Segment definition. -type WriteSegmentRequest struct { - _ struct{} `type:"structure"` - - // The segment dimensions attributes. - Dimensions *SegmentDimensions `type:"structure"` - - // The name of segment - Name *string `type:"string"` - - // A segment group, which consists of zero or more source segments, plus dimensions - // that are applied to those source segments. Your request can only include - // one segment group. Your request can include either a SegmentGroups object - // or a Dimensions object, but not both. - SegmentGroups *SegmentGroupList `type:"structure"` -} - -// String returns the string representation -func (s WriteSegmentRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WriteSegmentRequest) GoString() string { - return s.String() -} - -// SetDimensions sets the Dimensions field's value. -func (s *WriteSegmentRequest) SetDimensions(v *SegmentDimensions) *WriteSegmentRequest { - s.Dimensions = v - return s -} - -// SetName sets the Name field's value. -func (s *WriteSegmentRequest) SetName(v string) *WriteSegmentRequest { - s.Name = &v - return s -} - -// SetSegmentGroups sets the SegmentGroups field's value. -func (s *WriteSegmentRequest) SetSegmentGroups(v *SegmentGroupList) *WriteSegmentRequest { - s.SegmentGroups = v - return s -} - -// Used to create a campaign treatment. -type WriteTreatmentResource struct { - _ struct{} `type:"structure"` - - // The message configuration settings. - MessageConfiguration *MessageConfiguration `type:"structure"` - - // The campaign schedule. - Schedule *Schedule `type:"structure"` - - // The allocated percentage of users for this treatment. - SizePercent *int64 `type:"integer"` - - // A custom description for the treatment. - TreatmentDescription *string `type:"string"` - - // The custom name of a variation of the campaign used for A/B testing. - TreatmentName *string `type:"string"` -} - -// String returns the string representation -func (s WriteTreatmentResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WriteTreatmentResource) GoString() string { - return s.String() -} - -// SetMessageConfiguration sets the MessageConfiguration field's value. -func (s *WriteTreatmentResource) SetMessageConfiguration(v *MessageConfiguration) *WriteTreatmentResource { - s.MessageConfiguration = v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *WriteTreatmentResource) SetSchedule(v *Schedule) *WriteTreatmentResource { - s.Schedule = v - return s -} - -// SetSizePercent sets the SizePercent field's value. -func (s *WriteTreatmentResource) SetSizePercent(v int64) *WriteTreatmentResource { - s.SizePercent = &v - return s -} - -// SetTreatmentDescription sets the TreatmentDescription field's value. -func (s *WriteTreatmentResource) SetTreatmentDescription(v string) *WriteTreatmentResource { - s.TreatmentDescription = &v - return s -} - -// SetTreatmentName sets the TreatmentName field's value. -func (s *WriteTreatmentResource) SetTreatmentName(v string) *WriteTreatmentResource { - s.TreatmentName = &v - return s -} - -const ( - // ActionOpenApp is a Action enum value - ActionOpenApp = "OPEN_APP" - - // ActionDeepLink is a Action enum value - ActionDeepLink = "DEEP_LINK" - - // ActionUrl is a Action enum value - ActionUrl = "URL" -) - -const ( - // AttributeTypeInclusive is a AttributeType enum value - AttributeTypeInclusive = "INCLUSIVE" - - // AttributeTypeExclusive is a AttributeType enum value - AttributeTypeExclusive = "EXCLUSIVE" -) - -const ( - // CampaignStatusScheduled is a CampaignStatus enum value - CampaignStatusScheduled = "SCHEDULED" - - // CampaignStatusExecuting is a CampaignStatus enum value - CampaignStatusExecuting = "EXECUTING" - - // CampaignStatusPendingNextRun is a CampaignStatus enum value - CampaignStatusPendingNextRun = "PENDING_NEXT_RUN" - - // CampaignStatusCompleted is a CampaignStatus enum value - CampaignStatusCompleted = "COMPLETED" - - // CampaignStatusPaused is a CampaignStatus enum value - CampaignStatusPaused = "PAUSED" - - // CampaignStatusDeleted is a CampaignStatus enum value - CampaignStatusDeleted = "DELETED" -) - -const ( - // ChannelTypeGcm is a ChannelType enum value - ChannelTypeGcm = "GCM" - - // ChannelTypeApns is a ChannelType enum value - ChannelTypeApns = "APNS" - - // ChannelTypeApnsSandbox is a ChannelType enum value - ChannelTypeApnsSandbox = "APNS_SANDBOX" - - // ChannelTypeApnsVoip is a ChannelType enum value - ChannelTypeApnsVoip = "APNS_VOIP" - - // ChannelTypeApnsVoipSandbox is a ChannelType enum value - ChannelTypeApnsVoipSandbox = "APNS_VOIP_SANDBOX" - - // ChannelTypeAdm is a ChannelType enum value - ChannelTypeAdm = "ADM" - - // ChannelTypeSms is a ChannelType enum value - ChannelTypeSms = "SMS" - - // ChannelTypeVoice is a ChannelType enum value - ChannelTypeVoice = "VOICE" - - // ChannelTypeEmail is a ChannelType enum value - ChannelTypeEmail = "EMAIL" - - // ChannelTypeBaidu is a ChannelType enum value - ChannelTypeBaidu = "BAIDU" - - // ChannelTypeCustom is a ChannelType enum value - ChannelTypeCustom = "CUSTOM" -) - -const ( - // DeliveryStatusSuccessful is a DeliveryStatus enum value - DeliveryStatusSuccessful = "SUCCESSFUL" - - // DeliveryStatusThrottled is a DeliveryStatus enum value - DeliveryStatusThrottled = "THROTTLED" - - // DeliveryStatusTemporaryFailure is a DeliveryStatus enum value - DeliveryStatusTemporaryFailure = "TEMPORARY_FAILURE" - - // DeliveryStatusPermanentFailure is a DeliveryStatus enum value - DeliveryStatusPermanentFailure = "PERMANENT_FAILURE" - - // DeliveryStatusUnknownFailure is a DeliveryStatus enum value - DeliveryStatusUnknownFailure = "UNKNOWN_FAILURE" - - // DeliveryStatusOptOut is a DeliveryStatus enum value - DeliveryStatusOptOut = "OPT_OUT" - - // DeliveryStatusDuplicate is a DeliveryStatus enum value - DeliveryStatusDuplicate = "DUPLICATE" -) - -const ( - // DimensionTypeInclusive is a DimensionType enum value - DimensionTypeInclusive = "INCLUSIVE" - - // DimensionTypeExclusive is a DimensionType enum value - DimensionTypeExclusive = "EXCLUSIVE" -) - -const ( - // DurationHr24 is a Duration enum value - DurationHr24 = "HR_24" - - // DurationDay7 is a Duration enum value - DurationDay7 = "DAY_7" - - // DurationDay14 is a Duration enum value - DurationDay14 = "DAY_14" - - // DurationDay30 is a Duration enum value - DurationDay30 = "DAY_30" -) - -const ( - // FilterTypeSystem is a FilterType enum value - FilterTypeSystem = "SYSTEM" - - // FilterTypeEndpoint is a FilterType enum value - FilterTypeEndpoint = "ENDPOINT" -) - -const ( - // FormatCsv is a Format enum value - FormatCsv = "CSV" - - // FormatJson is a Format enum value - FormatJson = "JSON" -) - -const ( - // FrequencyOnce is a Frequency enum value - FrequencyOnce = "ONCE" - - // FrequencyHourly is a Frequency enum value - FrequencyHourly = "HOURLY" - - // FrequencyDaily is a Frequency enum value - FrequencyDaily = "DAILY" - - // FrequencyWeekly is a Frequency enum value - FrequencyWeekly = "WEEKLY" - - // FrequencyMonthly is a Frequency enum value - FrequencyMonthly = "MONTHLY" - - // FrequencyEvent is a Frequency enum value - FrequencyEvent = "EVENT" -) - -const ( - // IncludeAll is a Include enum value - IncludeAll = "ALL" - - // IncludeAny is a Include enum value - IncludeAny = "ANY" - - // IncludeNone is a Include enum value - IncludeNone = "NONE" -) - -const ( - // JobStatusCreated is a JobStatus enum value - JobStatusCreated = "CREATED" - - // JobStatusInitializing is a JobStatus enum value - JobStatusInitializing = "INITIALIZING" - - // JobStatusProcessing is a JobStatus enum value - JobStatusProcessing = "PROCESSING" - - // JobStatusCompleting is a JobStatus enum value - JobStatusCompleting = "COMPLETING" - - // JobStatusCompleted is a JobStatus enum value - JobStatusCompleted = "COMPLETED" - - // JobStatusFailing is a JobStatus enum value - JobStatusFailing = "FAILING" - - // JobStatusFailed is a JobStatus enum value - JobStatusFailed = "FAILED" -) - -const ( - // MessageTypeTransactional is a MessageType enum value - MessageTypeTransactional = "TRANSACTIONAL" - - // MessageTypePromotional is a MessageType enum value - MessageTypePromotional = "PROMOTIONAL" -) - -const ( - // ModeDelivery is a Mode enum value - ModeDelivery = "DELIVERY" - - // ModeFilter is a Mode enum value - ModeFilter = "FILTER" -) - -const ( - // RecencyTypeActive is a RecencyType enum value - RecencyTypeActive = "ACTIVE" - - // RecencyTypeInactive is a RecencyType enum value - RecencyTypeInactive = "INACTIVE" -) - -const ( - // SegmentTypeDimensional is a SegmentType enum value - SegmentTypeDimensional = "DIMENSIONAL" - - // SegmentTypeImport is a SegmentType enum value - SegmentTypeImport = "IMPORT" -) - -const ( - // SourceTypeAll is a SourceType enum value - SourceTypeAll = "ALL" - - // SourceTypeAny is a SourceType enum value - SourceTypeAny = "ANY" - - // SourceTypeNone is a SourceType enum value - SourceTypeNone = "NONE" -) - -const ( - // TypeAll is a Type enum value - TypeAll = "ALL" - - // TypeAny is a Type enum value - TypeAny = "ANY" - - // TypeNone is a Type enum value - TypeNone = "NONE" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/doc.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/doc.go deleted file mode 100644 index f41551af6..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/doc.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package pinpoint provides the client and types for making API -// requests to Amazon Pinpoint. -// -// See https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01 for more information on this service. -// -// See pinpoint package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/pinpoint/ -// -// Using the Client -// -// To contact Amazon Pinpoint with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Pinpoint client Pinpoint for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/pinpoint/#New -package pinpoint diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go deleted file mode 100644 index 7bd7525b6..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package pinpoint - -const ( - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - // - // Simple message object. - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeForbiddenException for service response error code - // "ForbiddenException". - // - // Simple message object. - ErrCodeForbiddenException = "ForbiddenException" - - // ErrCodeInternalServerErrorException for service response error code - // "InternalServerErrorException". - // - // Simple message object. - ErrCodeInternalServerErrorException = "InternalServerErrorException" - - // ErrCodeMethodNotAllowedException for service response error code - // "MethodNotAllowedException". - // - // Simple message object. - ErrCodeMethodNotAllowedException = "MethodNotAllowedException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // Simple message object. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // Simple message object. - ErrCodeTooManyRequestsException = "TooManyRequestsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/service.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/service.go deleted file mode 100644 index 9bee611da..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package pinpoint - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -// Pinpoint provides the API operation methods for making requests to -// Amazon Pinpoint. See this package's package overview docs -// for details on the service. -// -// Pinpoint methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Pinpoint struct { - *client.Client -} - -// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) - -// Service information constants -const ( - ServiceName = "pinpoint" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Pinpoint" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Pinpoint client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Pinpoint client from just a session. -// svc := pinpoint.New(mySession) -// -// // Create a Pinpoint client with additional configuration -// svc := pinpoint.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Pinpoint { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "mobiletargeting" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Pinpoint { - svc := &Pinpoint{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2016-12-01", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Pinpoint operation and runs any -// custom request initialization. -func (c *Pinpoint) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go deleted file mode 100644 index 395d8c6e5..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go +++ /dev/null @@ -1,955 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package pricing - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" -) - -const opDescribeServices = "DescribeServices" - -// DescribeServicesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeServices operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeServices for more information on using the DescribeServices -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeServicesRequest method. -// req, resp := client.DescribeServicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/DescribeServices -func (c *Pricing) DescribeServicesRequest(input *DescribeServicesInput) (req *request.Request, output *DescribeServicesOutput) { - op := &request.Operation{ - Name: opDescribeServices, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeServicesInput{} - } - - output = &DescribeServicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeServices API operation for AWS Price List Service. -// -// Returns the metadata for one service or a list of the metadata for all services. -// Use this without a service code to get the service codes for all services. -// Use it with a service code, such as AmazonEC2, to get information specific -// to that service, such as the attribute names available for that service. -// For example, some of the attribute names available for EC2 are volumeType, -// maxIopsVolume, operation, locationType, and instanceCapacity10xlarge. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Price List Service's -// API operation DescribeServices for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters had an invalid value. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource can't be found. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The pagination token is invalid. Try again without a pagination token. -// -// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" -// The pagination token expired. Try again without a pagination token. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/DescribeServices -func (c *Pricing) DescribeServices(input *DescribeServicesInput) (*DescribeServicesOutput, error) { - req, out := c.DescribeServicesRequest(input) - return out, req.Send() -} - -// DescribeServicesWithContext is the same as DescribeServices with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeServices for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pricing) DescribeServicesWithContext(ctx aws.Context, input *DescribeServicesInput, opts ...request.Option) (*DescribeServicesOutput, error) { - req, out := c.DescribeServicesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeServicesPages iterates over the pages of a DescribeServices operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeServices method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeServices operation. -// pageNum := 0 -// err := client.DescribeServicesPages(params, -// func(page *DescribeServicesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Pricing) DescribeServicesPages(input *DescribeServicesInput, fn func(*DescribeServicesOutput, bool) bool) error { - return c.DescribeServicesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeServicesPagesWithContext same as DescribeServicesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pricing) DescribeServicesPagesWithContext(ctx aws.Context, input *DescribeServicesInput, fn func(*DescribeServicesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeServicesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeServicesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeServicesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetAttributeValues = "GetAttributeValues" - -// GetAttributeValuesRequest generates a "aws/request.Request" representing the -// client's request for the GetAttributeValues operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAttributeValues for more information on using the GetAttributeValues -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAttributeValuesRequest method. -// req, resp := client.GetAttributeValuesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetAttributeValues -func (c *Pricing) GetAttributeValuesRequest(input *GetAttributeValuesInput) (req *request.Request, output *GetAttributeValuesOutput) { - op := &request.Operation{ - Name: opGetAttributeValues, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetAttributeValuesInput{} - } - - output = &GetAttributeValuesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAttributeValues API operation for AWS Price List Service. -// -// Returns a list of attribute values. Attibutes are similar to the details -// in a Price List API offer file. For a list of available attributes, see Offer -// File Definitions (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/reading-an-offer.html#pps-defs) -// in the AWS Billing and Cost Management User Guide (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-what-is.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Price List Service's -// API operation GetAttributeValues for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters had an invalid value. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource can't be found. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The pagination token is invalid. Try again without a pagination token. -// -// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" -// The pagination token expired. Try again without a pagination token. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetAttributeValues -func (c *Pricing) GetAttributeValues(input *GetAttributeValuesInput) (*GetAttributeValuesOutput, error) { - req, out := c.GetAttributeValuesRequest(input) - return out, req.Send() -} - -// GetAttributeValuesWithContext is the same as GetAttributeValues with the addition of -// the ability to pass a context and additional request options. -// -// See GetAttributeValues for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pricing) GetAttributeValuesWithContext(ctx aws.Context, input *GetAttributeValuesInput, opts ...request.Option) (*GetAttributeValuesOutput, error) { - req, out := c.GetAttributeValuesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetAttributeValuesPages iterates over the pages of a GetAttributeValues operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetAttributeValues method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a GetAttributeValues operation. -// pageNum := 0 -// err := client.GetAttributeValuesPages(params, -// func(page *GetAttributeValuesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Pricing) GetAttributeValuesPages(input *GetAttributeValuesInput, fn func(*GetAttributeValuesOutput, bool) bool) error { - return c.GetAttributeValuesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetAttributeValuesPagesWithContext same as GetAttributeValuesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pricing) GetAttributeValuesPagesWithContext(ctx aws.Context, input *GetAttributeValuesInput, fn func(*GetAttributeValuesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetAttributeValuesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetAttributeValuesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetAttributeValuesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetProducts = "GetProducts" - -// GetProductsRequest generates a "aws/request.Request" representing the -// client's request for the GetProducts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetProducts for more information on using the GetProducts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetProductsRequest method. -// req, resp := client.GetProductsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetProducts -func (c *Pricing) GetProductsRequest(input *GetProductsInput) (req *request.Request, output *GetProductsOutput) { - op := &request.Operation{ - Name: opGetProducts, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetProductsInput{} - } - - output = &GetProductsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetProducts API operation for AWS Price List Service. -// -// Returns a list of all products that match the filter criteria. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Price List Service's -// API operation GetProducts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" -// An error on the server occurred during the processing of your request. Try -// again later. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters had an invalid value. -// -// * ErrCodeNotFoundException "NotFoundException" -// The requested resource can't be found. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The pagination token is invalid. Try again without a pagination token. -// -// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" -// The pagination token expired. Try again without a pagination token. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetProducts -func (c *Pricing) GetProducts(input *GetProductsInput) (*GetProductsOutput, error) { - req, out := c.GetProductsRequest(input) - return out, req.Send() -} - -// GetProductsWithContext is the same as GetProducts with the addition of -// the ability to pass a context and additional request options. -// -// See GetProducts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pricing) GetProductsWithContext(ctx aws.Context, input *GetProductsInput, opts ...request.Option) (*GetProductsOutput, error) { - req, out := c.GetProductsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetProductsPages iterates over the pages of a GetProducts operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetProducts method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a GetProducts operation. -// pageNum := 0 -// err := client.GetProductsPages(params, -// func(page *GetProductsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Pricing) GetProductsPages(input *GetProductsInput, fn func(*GetProductsOutput, bool) bool) error { - return c.GetProductsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetProductsPagesWithContext same as GetProductsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Pricing) GetProductsPagesWithContext(ctx aws.Context, input *GetProductsInput, fn func(*GetProductsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetProductsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetProductsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetProductsOutput), !p.HasNextPage()) - } - return p.Err() -} - -// The values of a given attribute, such as Throughput Optimized HDD or Provisioned -// IOPS for the Amazon EC2volumeType attribute. -type AttributeValue struct { - _ struct{} `type:"structure"` - - // The specific value of an attributeName. - Value *string `type:"string"` -} - -// String returns the string representation -func (s AttributeValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttributeValue) GoString() string { - return s.String() -} - -// SetValue sets the Value field's value. -func (s *AttributeValue) SetValue(v string) *AttributeValue { - s.Value = &v - return s -} - -type DescribeServicesInput struct { - _ struct{} `type:"structure"` - - // The format version that you want the response to be in. - // - // Valid values are: aws_v1 - FormatVersion *string `type:"string"` - - // The maximum number of results that you want returned in the response. - MaxResults *int64 `min:"1" type:"integer"` - - // The pagination token that indicates the next set of results that you want - // to retrieve. - NextToken *string `type:"string"` - - // The code for the service whose information you want to retrieve, such as - // AmazonEC2. You can use the ServiceCode to filter the results in a GetProducts - // call. To retrieve a list of all services, leave this blank. - ServiceCode *string `type:"string"` -} - -// String returns the string representation -func (s DescribeServicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeServicesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeServicesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeServicesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFormatVersion sets the FormatVersion field's value. -func (s *DescribeServicesInput) SetFormatVersion(v string) *DescribeServicesInput { - s.FormatVersion = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeServicesInput) SetMaxResults(v int64) *DescribeServicesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeServicesInput) SetNextToken(v string) *DescribeServicesInput { - s.NextToken = &v - return s -} - -// SetServiceCode sets the ServiceCode field's value. -func (s *DescribeServicesInput) SetServiceCode(v string) *DescribeServicesInput { - s.ServiceCode = &v - return s -} - -type DescribeServicesOutput struct { - _ struct{} `type:"structure"` - - // The format version of the response. For example, aws_v1. - FormatVersion *string `type:"string"` - - // The pagination token for the next set of retreivable results. - NextToken *string `type:"string"` - - // The service metadata for the service or services in the response. - Services []*Service `type:"list"` -} - -// String returns the string representation -func (s DescribeServicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeServicesOutput) GoString() string { - return s.String() -} - -// SetFormatVersion sets the FormatVersion field's value. -func (s *DescribeServicesOutput) SetFormatVersion(v string) *DescribeServicesOutput { - s.FormatVersion = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeServicesOutput) SetNextToken(v string) *DescribeServicesOutput { - s.NextToken = &v - return s -} - -// SetServices sets the Services field's value. -func (s *DescribeServicesOutput) SetServices(v []*Service) *DescribeServicesOutput { - s.Services = v - return s -} - -// The constraints that you want all returned products to match. -type Filter struct { - _ struct{} `type:"structure"` - - // The product metadata field that you want to filter on. You can filter by - // just the service code to see all products for a specific service, filter - // by just the attribute name to see a specific attribute for multiple services, - // or use both a service code and an attribute name to retrieve only products - // that match both fields. - // - // Valid values include: ServiceCode, and all attribute names - // - // For example, you can filter by the AmazonEC2 service code and the volumeType - // attribute name to get the prices for only Amazon EC2 volumes. - // - // Field is a required field - Field *string `type:"string" required:"true"` - - // The type of filter that you want to use. - // - // Valid values are: TERM_MATCH. TERM_MATCH returns only products that match - // both the given filter field and the given value. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"FilterType"` - - // The service code or attribute value that you want to filter by. If you are - // filtering by service code this is the actual service code, such as AmazonEC2. - // If you are filtering by attribute name, this is the attribute value that - // you want the returned products to match, such as a Provisioned IOPS volume. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Filter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Filter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Filter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Filter"} - if s.Field == nil { - invalidParams.Add(request.NewErrParamRequired("Field")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetField sets the Field field's value. -func (s *Filter) SetField(v string) *Filter { - s.Field = &v - return s -} - -// SetType sets the Type field's value. -func (s *Filter) SetType(v string) *Filter { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Filter) SetValue(v string) *Filter { - s.Value = &v - return s -} - -type GetAttributeValuesInput struct { - _ struct{} `type:"structure"` - - // The name of the attribute that you want to retrieve the values for, such - // as volumeType. - // - // AttributeName is a required field - AttributeName *string `type:"string" required:"true"` - - // The maximum number of results to return in response. - MaxResults *int64 `min:"1" type:"integer"` - - // The pagination token that indicates the next set of results that you want - // to retrieve. - NextToken *string `type:"string"` - - // The service code for the service whose attributes you want to retrieve. For - // example, if you want the retrieve an EC2 attribute, use AmazonEC2. - // - // ServiceCode is a required field - ServiceCode *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetAttributeValuesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAttributeValuesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAttributeValuesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAttributeValuesInput"} - if s.AttributeName == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeName")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ServiceCode == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceCode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeName sets the AttributeName field's value. -func (s *GetAttributeValuesInput) SetAttributeName(v string) *GetAttributeValuesInput { - s.AttributeName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetAttributeValuesInput) SetMaxResults(v int64) *GetAttributeValuesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetAttributeValuesInput) SetNextToken(v string) *GetAttributeValuesInput { - s.NextToken = &v - return s -} - -// SetServiceCode sets the ServiceCode field's value. -func (s *GetAttributeValuesInput) SetServiceCode(v string) *GetAttributeValuesInput { - s.ServiceCode = &v - return s -} - -type GetAttributeValuesOutput struct { - _ struct{} `type:"structure"` - - // The list of values for an attribute. For example, Throughput Optimized HDD - // and Provisioned IOPS are two available values for the AmazonEC2volumeType. - AttributeValues []*AttributeValue `type:"list"` - - // The pagination token that indicates the next set of results to retrieve. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetAttributeValuesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAttributeValuesOutput) GoString() string { - return s.String() -} - -// SetAttributeValues sets the AttributeValues field's value. -func (s *GetAttributeValuesOutput) SetAttributeValues(v []*AttributeValue) *GetAttributeValuesOutput { - s.AttributeValues = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetAttributeValuesOutput) SetNextToken(v string) *GetAttributeValuesOutput { - s.NextToken = &v - return s -} - -type GetProductsInput struct { - _ struct{} `type:"structure"` - - // The list of filters that limit the returned products. only products that - // match all filters are returned. - Filters []*Filter `type:"list"` - - // The format version that you want the response to be in. - // - // Valid values are: aws_v1 - FormatVersion *string `type:"string"` - - // The maximum number of results to return in the response. - MaxResults *int64 `min:"1" type:"integer"` - - // The pagination token that indicates the next set of results that you want - // to retrieve. - NextToken *string `type:"string"` - - // The code for the service whose products you want to retrieve. - ServiceCode *string `type:"string"` -} - -// String returns the string representation -func (s GetProductsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetProductsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetProductsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetProductsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *GetProductsInput) SetFilters(v []*Filter) *GetProductsInput { - s.Filters = v - return s -} - -// SetFormatVersion sets the FormatVersion field's value. -func (s *GetProductsInput) SetFormatVersion(v string) *GetProductsInput { - s.FormatVersion = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetProductsInput) SetMaxResults(v int64) *GetProductsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetProductsInput) SetNextToken(v string) *GetProductsInput { - s.NextToken = &v - return s -} - -// SetServiceCode sets the ServiceCode field's value. -func (s *GetProductsInput) SetServiceCode(v string) *GetProductsInput { - s.ServiceCode = &v - return s -} - -type GetProductsOutput struct { - _ struct{} `type:"structure"` - - // The format version of the response. For example, aws_v1. - FormatVersion *string `type:"string"` - - // The pagination token that indicates the next set of results to retrieve. - NextToken *string `type:"string"` - - // The list of products that match your filters. The list contains both the - // product metadata and the price information. - PriceList []aws.JSONValue `type:"list"` -} - -// String returns the string representation -func (s GetProductsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetProductsOutput) GoString() string { - return s.String() -} - -// SetFormatVersion sets the FormatVersion field's value. -func (s *GetProductsOutput) SetFormatVersion(v string) *GetProductsOutput { - s.FormatVersion = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetProductsOutput) SetNextToken(v string) *GetProductsOutput { - s.NextToken = &v - return s -} - -// SetPriceList sets the PriceList field's value. -func (s *GetProductsOutput) SetPriceList(v []aws.JSONValue) *GetProductsOutput { - s.PriceList = v - return s -} - -// The metadata for a service, such as the service code and available attribute -// names. -type Service struct { - _ struct{} `type:"structure"` - - // The attributes that are available for this service. - AttributeNames []*string `type:"list"` - - // The code for the AWS service. - ServiceCode *string `type:"string"` -} - -// String returns the string representation -func (s Service) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Service) GoString() string { - return s.String() -} - -// SetAttributeNames sets the AttributeNames field's value. -func (s *Service) SetAttributeNames(v []*string) *Service { - s.AttributeNames = v - return s -} - -// SetServiceCode sets the ServiceCode field's value. -func (s *Service) SetServiceCode(v string) *Service { - s.ServiceCode = &v - return s -} - -const ( - // FilterTypeTermMatch is a FilterType enum value - FilterTypeTermMatch = "TERM_MATCH" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pricing/doc.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/doc.go deleted file mode 100644 index 0555bc4c3..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/pricing/doc.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package pricing provides the client and types for making API -// requests to AWS Price List Service. -// -// AWS Price List Service API (AWS Price List Service) is a centralized and -// convenient way to programmatically query Amazon Web Services for services, -// products, and pricing information. The AWS Price List Service uses standardized -// product attributes such as Location, Storage Class, and Operating System, -// and provides prices at the SKU level. You can use the AWS Price List Service -// to build cost control and scenario planning tools, reconcile billing data, -// forecast future spend for budgeting purposes, and provide cost benefit analysis -// that compare your internal workloads with AWS. -// -// Use GetServices without a service code to retrieve the service codes for -// all AWS services, then GetServices with a service code to retreive the attribute -// names for that service. After you have the service code and attribute names, -// you can use GetAttributeValues to see what values are available for an attribute. -// With the service code and an attribute name and value, you can use GetProducts -// to find specific products that you're interested in, such as an AmazonEC2 -// instance, with a Provisioned IOPSvolumeType. -// -// Service Endpoint -// -// AWS Price List Service API provides the following two endpoints: -// -// * https://api.pricing.us-east-1.amazonaws.com -// -// * https://api.pricing.ap-south-1.amazonaws.com -// -// See https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15 for more information on this service. -// -// See pricing package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/pricing/ -// -// Using the Client -// -// To contact AWS Price List Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS Price List Service client Pricing for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/pricing/#New -package pricing diff --git a/vendor/github.com/aws/aws-sdk-go/service/pricing/errors.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/errors.go deleted file mode 100644 index 10e4c44fe..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/pricing/errors.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package pricing - -const ( - - // ErrCodeExpiredNextTokenException for service response error code - // "ExpiredNextTokenException". - // - // The pagination token expired. Try again without a pagination token. - ErrCodeExpiredNextTokenException = "ExpiredNextTokenException" - - // ErrCodeInternalErrorException for service response error code - // "InternalErrorException". - // - // An error on the server occurred during the processing of your request. Try - // again later. - ErrCodeInternalErrorException = "InternalErrorException" - - // ErrCodeInvalidNextTokenException for service response error code - // "InvalidNextTokenException". - // - // The pagination token is invalid. Try again without a pagination token. - ErrCodeInvalidNextTokenException = "InvalidNextTokenException" - - // ErrCodeInvalidParameterException for service response error code - // "InvalidParameterException". - // - // One or more parameters had an invalid value. - ErrCodeInvalidParameterException = "InvalidParameterException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // The requested resource can't be found. - ErrCodeNotFoundException = "NotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pricing/service.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/service.go deleted file mode 100644 index 90ff33d0a..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/pricing/service.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package pricing - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// Pricing provides the API operation methods for making requests to -// AWS Price List Service. See this package's package overview docs -// for details on the service. -// -// Pricing methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Pricing struct { - *client.Client -} - -// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) - -// Service information constants -const ( - ServiceName = "api.pricing" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Pricing" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Pricing client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Pricing client from just a session. -// svc := pricing.New(mySession) -// -// // Create a Pricing client with additional configuration -// svc := pricing.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Pricing { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "pricing" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Pricing { - svc := &Pricing{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-10-15", - JSONVersion: "1.1", - TargetPrefix: "AWSPriceListService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Pricing operation and runs any -// custom request initialization. -func (c *Pricing) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/ram/api.go b/vendor/github.com/aws/aws-sdk-go/service/ram/api.go deleted file mode 100644 index 0359d03b2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ram/api.go +++ /dev/null @@ -1,4029 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ram - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opAcceptResourceShareInvitation = "AcceptResourceShareInvitation" - -// AcceptResourceShareInvitationRequest generates a "aws/request.Request" representing the -// client's request for the AcceptResourceShareInvitation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcceptResourceShareInvitation for more information on using the AcceptResourceShareInvitation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcceptResourceShareInvitationRequest method. -// req, resp := client.AcceptResourceShareInvitationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/AcceptResourceShareInvitation -func (c *RAM) AcceptResourceShareInvitationRequest(input *AcceptResourceShareInvitationInput) (req *request.Request, output *AcceptResourceShareInvitationOutput) { - op := &request.Operation{ - Name: opAcceptResourceShareInvitation, - HTTPMethod: "POST", - HTTPPath: "/acceptresourceshareinvitation", - } - - if input == nil { - input = &AcceptResourceShareInvitationInput{} - } - - output = &AcceptResourceShareInvitationOutput{} - req = c.newRequest(op, input, output) - return -} - -// AcceptResourceShareInvitation API operation for AWS Resource Access Manager. -// -// Accepts an invitation to a resource share from another AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation AcceptResourceShareInvitation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMalformedArnException "MalformedArnException" -// The format of an Amazon Resource Name (ARN) is not valid. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// The requested operation is not permitted. -// -// * ErrCodeResourceShareInvitationArnNotFoundException "ResourceShareInvitationArnNotFoundException" -// The Amazon Resource Name (ARN) for an invitation was not found. -// -// * ErrCodeResourceShareInvitationAlreadyAcceptedException "ResourceShareInvitationAlreadyAcceptedException" -// The invitation was already accepted. -// -// * ErrCodeResourceShareInvitationAlreadyRejectedException "ResourceShareInvitationAlreadyRejectedException" -// The invitation was already rejected. -// -// * ErrCodeResourceShareInvitationExpiredException "ResourceShareInvitationExpiredException" -// The invitation is expired. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/AcceptResourceShareInvitation -func (c *RAM) AcceptResourceShareInvitation(input *AcceptResourceShareInvitationInput) (*AcceptResourceShareInvitationOutput, error) { - req, out := c.AcceptResourceShareInvitationRequest(input) - return out, req.Send() -} - -// AcceptResourceShareInvitationWithContext is the same as AcceptResourceShareInvitation with the addition of -// the ability to pass a context and additional request options. -// -// See AcceptResourceShareInvitation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RAM) AcceptResourceShareInvitationWithContext(ctx aws.Context, input *AcceptResourceShareInvitationInput, opts ...request.Option) (*AcceptResourceShareInvitationOutput, error) { - req, out := c.AcceptResourceShareInvitationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateResourceShare = "AssociateResourceShare" - -// AssociateResourceShareRequest generates a "aws/request.Request" representing the -// client's request for the AssociateResourceShare operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateResourceShare for more information on using the AssociateResourceShare -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateResourceShareRequest method. -// req, resp := client.AssociateResourceShareRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/AssociateResourceShare -func (c *RAM) AssociateResourceShareRequest(input *AssociateResourceShareInput) (req *request.Request, output *AssociateResourceShareOutput) { - op := &request.Operation{ - Name: opAssociateResourceShare, - HTTPMethod: "POST", - HTTPPath: "/associateresourceshare", - } - - if input == nil { - input = &AssociateResourceShareInput{} - } - - output = &AssociateResourceShareOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateResourceShare API operation for AWS Resource Access Manager. -// -// Associates the specified resource share with the specified principals and -// resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation AssociateResourceShare for usage and error information. -// -// Returned Error Codes: -// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" -// A client token input parameter was reused with an operation, but at least -// one of the other input parameters is different from the previous call to -// the operation. -// -// * ErrCodeUnknownResourceException "UnknownResourceException" -// A specified resource was not found. -// -// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" -// The requested state transition is not valid. -// -// * ErrCodeResourceShareLimitExceededException "ResourceShareLimitExceededException" -// The requested resource share exceeds the limit for your account. -// -// * ErrCodeMalformedArnException "MalformedArnException" -// The format of an Amazon Resource Name (ARN) is not valid. -// -// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" -// The requested state transition is not valid. -// -// * ErrCodeInvalidClientTokenException "InvalidClientTokenException" -// A client token is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is not valid. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// The requested operation is not permitted. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// * ErrCodeUnknownResourceException "UnknownResourceException" -// A specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/AssociateResourceShare -func (c *RAM) AssociateResourceShare(input *AssociateResourceShareInput) (*AssociateResourceShareOutput, error) { - req, out := c.AssociateResourceShareRequest(input) - return out, req.Send() -} - -// AssociateResourceShareWithContext is the same as AssociateResourceShare with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateResourceShare for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RAM) AssociateResourceShareWithContext(ctx aws.Context, input *AssociateResourceShareInput, opts ...request.Option) (*AssociateResourceShareOutput, error) { - req, out := c.AssociateResourceShareRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateResourceShare = "CreateResourceShare" - -// CreateResourceShareRequest generates a "aws/request.Request" representing the -// client's request for the CreateResourceShare operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateResourceShare for more information on using the CreateResourceShare -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateResourceShareRequest method. -// req, resp := client.CreateResourceShareRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/CreateResourceShare -func (c *RAM) CreateResourceShareRequest(input *CreateResourceShareInput) (req *request.Request, output *CreateResourceShareOutput) { - op := &request.Operation{ - Name: opCreateResourceShare, - HTTPMethod: "POST", - HTTPPath: "/createresourceshare", - } - - if input == nil { - input = &CreateResourceShareInput{} - } - - output = &CreateResourceShareOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateResourceShare API operation for AWS Resource Access Manager. -// -// Creates a resource share. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation CreateResourceShare for usage and error information. -// -// Returned Error Codes: -// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" -// A client token input parameter was reused with an operation, but at least -// one of the other input parameters is different from the previous call to -// the operation. -// -// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" -// The requested state transition is not valid. -// -// * ErrCodeUnknownResourceException "UnknownResourceException" -// A specified resource was not found. -// -// * ErrCodeMalformedArnException "MalformedArnException" -// The format of an Amazon Resource Name (ARN) is not valid. -// -// * ErrCodeInvalidClientTokenException "InvalidClientTokenException" -// A client token is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is not valid. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// The requested operation is not permitted. -// -// * ErrCodeResourceShareLimitExceededException "ResourceShareLimitExceededException" -// The requested resource share exceeds the limit for your account. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/CreateResourceShare -func (c *RAM) CreateResourceShare(input *CreateResourceShareInput) (*CreateResourceShareOutput, error) { - req, out := c.CreateResourceShareRequest(input) - return out, req.Send() -} - -// CreateResourceShareWithContext is the same as CreateResourceShare with the addition of -// the ability to pass a context and additional request options. -// -// See CreateResourceShare for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RAM) CreateResourceShareWithContext(ctx aws.Context, input *CreateResourceShareInput, opts ...request.Option) (*CreateResourceShareOutput, error) { - req, out := c.CreateResourceShareRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteResourceShare = "DeleteResourceShare" - -// DeleteResourceShareRequest generates a "aws/request.Request" representing the -// client's request for the DeleteResourceShare operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteResourceShare for more information on using the DeleteResourceShare -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteResourceShareRequest method. -// req, resp := client.DeleteResourceShareRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/DeleteResourceShare -func (c *RAM) DeleteResourceShareRequest(input *DeleteResourceShareInput) (req *request.Request, output *DeleteResourceShareOutput) { - op := &request.Operation{ - Name: opDeleteResourceShare, - HTTPMethod: "DELETE", - HTTPPath: "/deleteresourceshare", - } - - if input == nil { - input = &DeleteResourceShareInput{} - } - - output = &DeleteResourceShareOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteResourceShare API operation for AWS Resource Access Manager. -// -// Deletes the specified resource share. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation DeleteResourceShare for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// The requested operation is not permitted. -// -// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" -// A client token input parameter was reused with an operation, but at least -// one of the other input parameters is different from the previous call to -// the operation. -// -// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" -// The requested state transition is not valid. -// -// * ErrCodeUnknownResourceException "UnknownResourceException" -// A specified resource was not found. -// -// * ErrCodeMalformedArnException "MalformedArnException" -// The format of an Amazon Resource Name (ARN) is not valid. -// -// * ErrCodeInvalidClientTokenException "InvalidClientTokenException" -// A client token is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/DeleteResourceShare -func (c *RAM) DeleteResourceShare(input *DeleteResourceShareInput) (*DeleteResourceShareOutput, error) { - req, out := c.DeleteResourceShareRequest(input) - return out, req.Send() -} - -// DeleteResourceShareWithContext is the same as DeleteResourceShare with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteResourceShare for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RAM) DeleteResourceShareWithContext(ctx aws.Context, input *DeleteResourceShareInput, opts ...request.Option) (*DeleteResourceShareOutput, error) { - req, out := c.DeleteResourceShareRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateResourceShare = "DisassociateResourceShare" - -// DisassociateResourceShareRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateResourceShare operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateResourceShare for more information on using the DisassociateResourceShare -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateResourceShareRequest method. -// req, resp := client.DisassociateResourceShareRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/DisassociateResourceShare -func (c *RAM) DisassociateResourceShareRequest(input *DisassociateResourceShareInput) (req *request.Request, output *DisassociateResourceShareOutput) { - op := &request.Operation{ - Name: opDisassociateResourceShare, - HTTPMethod: "POST", - HTTPPath: "/disassociateresourceshare", - } - - if input == nil { - input = &DisassociateResourceShareInput{} - } - - output = &DisassociateResourceShareOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisassociateResourceShare API operation for AWS Resource Access Manager. -// -// Disassociates the specified principals or resources from the specified resource -// share. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation DisassociateResourceShare for usage and error information. -// -// Returned Error Codes: -// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" -// A client token input parameter was reused with an operation, but at least -// one of the other input parameters is different from the previous call to -// the operation. -// -// * ErrCodeResourceShareLimitExceededException "ResourceShareLimitExceededException" -// The requested resource share exceeds the limit for your account. -// -// * ErrCodeMalformedArnException "MalformedArnException" -// The format of an Amazon Resource Name (ARN) is not valid. -// -// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" -// The requested state transition is not valid. -// -// * ErrCodeInvalidClientTokenException "InvalidClientTokenException" -// A client token is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is not valid. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// The requested operation is not permitted. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// * ErrCodeUnknownResourceException "UnknownResourceException" -// A specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/DisassociateResourceShare -func (c *RAM) DisassociateResourceShare(input *DisassociateResourceShareInput) (*DisassociateResourceShareOutput, error) { - req, out := c.DisassociateResourceShareRequest(input) - return out, req.Send() -} - -// DisassociateResourceShareWithContext is the same as DisassociateResourceShare with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateResourceShare for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RAM) DisassociateResourceShareWithContext(ctx aws.Context, input *DisassociateResourceShareInput, opts ...request.Option) (*DisassociateResourceShareOutput, error) { - req, out := c.DisassociateResourceShareRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableSharingWithAwsOrganization = "EnableSharingWithAwsOrganization" - -// EnableSharingWithAwsOrganizationRequest generates a "aws/request.Request" representing the -// client's request for the EnableSharingWithAwsOrganization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableSharingWithAwsOrganization for more information on using the EnableSharingWithAwsOrganization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableSharingWithAwsOrganizationRequest method. -// req, resp := client.EnableSharingWithAwsOrganizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/EnableSharingWithAwsOrganization -func (c *RAM) EnableSharingWithAwsOrganizationRequest(input *EnableSharingWithAwsOrganizationInput) (req *request.Request, output *EnableSharingWithAwsOrganizationOutput) { - op := &request.Operation{ - Name: opEnableSharingWithAwsOrganization, - HTTPMethod: "POST", - HTTPPath: "/enablesharingwithawsorganization", - } - - if input == nil { - input = &EnableSharingWithAwsOrganizationInput{} - } - - output = &EnableSharingWithAwsOrganizationOutput{} - req = c.newRequest(op, input, output) - return -} - -// EnableSharingWithAwsOrganization API operation for AWS Resource Access Manager. -// -// Enables resource sharing within your organization. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation EnableSharingWithAwsOrganization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// The requested operation is not permitted. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/EnableSharingWithAwsOrganization -func (c *RAM) EnableSharingWithAwsOrganization(input *EnableSharingWithAwsOrganizationInput) (*EnableSharingWithAwsOrganizationOutput, error) { - req, out := c.EnableSharingWithAwsOrganizationRequest(input) - return out, req.Send() -} - -// EnableSharingWithAwsOrganizationWithContext is the same as EnableSharingWithAwsOrganization with the addition of -// the ability to pass a context and additional request options. -// -// See EnableSharingWithAwsOrganization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RAM) EnableSharingWithAwsOrganizationWithContext(ctx aws.Context, input *EnableSharingWithAwsOrganizationInput, opts ...request.Option) (*EnableSharingWithAwsOrganizationOutput, error) { - req, out := c.EnableSharingWithAwsOrganizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetResourcePolicies = "GetResourcePolicies" - -// GetResourcePoliciesRequest generates a "aws/request.Request" representing the -// client's request for the GetResourcePolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResourcePolicies for more information on using the GetResourcePolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetResourcePoliciesRequest method. -// req, resp := client.GetResourcePoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourcePolicies -func (c *RAM) GetResourcePoliciesRequest(input *GetResourcePoliciesInput) (req *request.Request, output *GetResourcePoliciesOutput) { - op := &request.Operation{ - Name: opGetResourcePolicies, - HTTPMethod: "POST", - HTTPPath: "/getresourcepolicies", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetResourcePoliciesInput{} - } - - output = &GetResourcePoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResourcePolicies API operation for AWS Resource Access Manager. -// -// Gets the policies for the specifies resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation GetResourcePolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMalformedArnException "MalformedArnException" -// The format of an Amazon Resource Name (ARN) is not valid. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified value for NextToken is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourcePolicies -func (c *RAM) GetResourcePolicies(input *GetResourcePoliciesInput) (*GetResourcePoliciesOutput, error) { - req, out := c.GetResourcePoliciesRequest(input) - return out, req.Send() -} - -// GetResourcePoliciesWithContext is the same as GetResourcePolicies with the addition of -// the ability to pass a context and additional request options. -// -// See GetResourcePolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RAM) GetResourcePoliciesWithContext(ctx aws.Context, input *GetResourcePoliciesInput, opts ...request.Option) (*GetResourcePoliciesOutput, error) { - req, out := c.GetResourcePoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetResourcePoliciesPages iterates over the pages of a GetResourcePolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetResourcePolicies 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 GetResourcePolicies operation. -// pageNum := 0 -// err := client.GetResourcePoliciesPages(params, -// func(page *GetResourcePoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RAM) GetResourcePoliciesPages(input *GetResourcePoliciesInput, fn func(*GetResourcePoliciesOutput, bool) bool) error { - return c.GetResourcePoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetResourcePoliciesPagesWithContext same as GetResourcePoliciesPages 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 *RAM) GetResourcePoliciesPagesWithContext(ctx aws.Context, input *GetResourcePoliciesInput, fn func(*GetResourcePoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetResourcePoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetResourcePoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetResourcePoliciesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetResourceShareAssociations = "GetResourceShareAssociations" - -// GetResourceShareAssociationsRequest generates a "aws/request.Request" representing the -// client's request for the GetResourceShareAssociations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResourceShareAssociations for more information on using the GetResourceShareAssociations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetResourceShareAssociationsRequest method. -// req, resp := client.GetResourceShareAssociationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShareAssociations -func (c *RAM) GetResourceShareAssociationsRequest(input *GetResourceShareAssociationsInput) (req *request.Request, output *GetResourceShareAssociationsOutput) { - op := &request.Operation{ - Name: opGetResourceShareAssociations, - HTTPMethod: "POST", - HTTPPath: "/getresourceshareassociations", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetResourceShareAssociationsInput{} - } - - output = &GetResourceShareAssociationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResourceShareAssociations API operation for AWS Resource Access Manager. -// -// Gets the associations for the specified resource share. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation GetResourceShareAssociations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceException "UnknownResourceException" -// A specified resource was not found. -// -// * ErrCodeMalformedArnException "MalformedArnException" -// The format of an Amazon Resource Name (ARN) is not valid. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified value for NextToken is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is not valid. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// The requested operation is not permitted. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShareAssociations -func (c *RAM) GetResourceShareAssociations(input *GetResourceShareAssociationsInput) (*GetResourceShareAssociationsOutput, error) { - req, out := c.GetResourceShareAssociationsRequest(input) - return out, req.Send() -} - -// GetResourceShareAssociationsWithContext is the same as GetResourceShareAssociations with the addition of -// the ability to pass a context and additional request options. -// -// See GetResourceShareAssociations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RAM) GetResourceShareAssociationsWithContext(ctx aws.Context, input *GetResourceShareAssociationsInput, opts ...request.Option) (*GetResourceShareAssociationsOutput, error) { - req, out := c.GetResourceShareAssociationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetResourceShareAssociationsPages iterates over the pages of a GetResourceShareAssociations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetResourceShareAssociations 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 GetResourceShareAssociations operation. -// pageNum := 0 -// err := client.GetResourceShareAssociationsPages(params, -// func(page *GetResourceShareAssociationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RAM) GetResourceShareAssociationsPages(input *GetResourceShareAssociationsInput, fn func(*GetResourceShareAssociationsOutput, bool) bool) error { - return c.GetResourceShareAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetResourceShareAssociationsPagesWithContext same as GetResourceShareAssociationsPages 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 *RAM) GetResourceShareAssociationsPagesWithContext(ctx aws.Context, input *GetResourceShareAssociationsInput, fn func(*GetResourceShareAssociationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetResourceShareAssociationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetResourceShareAssociationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetResourceShareAssociationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetResourceShareInvitations = "GetResourceShareInvitations" - -// GetResourceShareInvitationsRequest generates a "aws/request.Request" representing the -// client's request for the GetResourceShareInvitations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResourceShareInvitations for more information on using the GetResourceShareInvitations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetResourceShareInvitationsRequest method. -// req, resp := client.GetResourceShareInvitationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShareInvitations -func (c *RAM) GetResourceShareInvitationsRequest(input *GetResourceShareInvitationsInput) (req *request.Request, output *GetResourceShareInvitationsOutput) { - op := &request.Operation{ - Name: opGetResourceShareInvitations, - HTTPMethod: "POST", - HTTPPath: "/getresourceshareinvitations", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetResourceShareInvitationsInput{} - } - - output = &GetResourceShareInvitationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResourceShareInvitations API operation for AWS Resource Access Manager. -// -// Gets the specified invitations for resource sharing. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation GetResourceShareInvitations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceShareInvitationArnNotFoundException "ResourceShareInvitationArnNotFoundException" -// The Amazon Resource Name (ARN) for an invitation was not found. -// -// * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException" -// The specified value for MaxResults is not valid. -// -// * ErrCodeMalformedArnException "MalformedArnException" -// The format of an Amazon Resource Name (ARN) is not valid. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified value for NextToken is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShareInvitations -func (c *RAM) GetResourceShareInvitations(input *GetResourceShareInvitationsInput) (*GetResourceShareInvitationsOutput, error) { - req, out := c.GetResourceShareInvitationsRequest(input) - return out, req.Send() -} - -// GetResourceShareInvitationsWithContext is the same as GetResourceShareInvitations with the addition of -// the ability to pass a context and additional request options. -// -// See GetResourceShareInvitations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RAM) GetResourceShareInvitationsWithContext(ctx aws.Context, input *GetResourceShareInvitationsInput, opts ...request.Option) (*GetResourceShareInvitationsOutput, error) { - req, out := c.GetResourceShareInvitationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetResourceShareInvitationsPages iterates over the pages of a GetResourceShareInvitations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetResourceShareInvitations 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 GetResourceShareInvitations operation. -// pageNum := 0 -// err := client.GetResourceShareInvitationsPages(params, -// func(page *GetResourceShareInvitationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RAM) GetResourceShareInvitationsPages(input *GetResourceShareInvitationsInput, fn func(*GetResourceShareInvitationsOutput, bool) bool) error { - return c.GetResourceShareInvitationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetResourceShareInvitationsPagesWithContext same as GetResourceShareInvitationsPages 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 *RAM) GetResourceShareInvitationsPagesWithContext(ctx aws.Context, input *GetResourceShareInvitationsInput, fn func(*GetResourceShareInvitationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetResourceShareInvitationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetResourceShareInvitationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetResourceShareInvitationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetResourceShares = "GetResourceShares" - -// GetResourceSharesRequest generates a "aws/request.Request" representing the -// client's request for the GetResourceShares operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResourceShares for more information on using the GetResourceShares -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetResourceSharesRequest method. -// req, resp := client.GetResourceSharesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShares -func (c *RAM) GetResourceSharesRequest(input *GetResourceSharesInput) (req *request.Request, output *GetResourceSharesOutput) { - op := &request.Operation{ - Name: opGetResourceShares, - HTTPMethod: "POST", - HTTPPath: "/getresourceshares", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetResourceSharesInput{} - } - - output = &GetResourceSharesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResourceShares API operation for AWS Resource Access Manager. -// -// Gets the specified resource shares or all of your resource shares. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation GetResourceShares for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceException "UnknownResourceException" -// A specified resource was not found. -// -// * ErrCodeMalformedArnException "MalformedArnException" -// The format of an Amazon Resource Name (ARN) is not valid. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified value for NextToken is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShares -func (c *RAM) GetResourceShares(input *GetResourceSharesInput) (*GetResourceSharesOutput, error) { - req, out := c.GetResourceSharesRequest(input) - return out, req.Send() -} - -// GetResourceSharesWithContext is the same as GetResourceShares with the addition of -// the ability to pass a context and additional request options. -// -// See GetResourceShares for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RAM) GetResourceSharesWithContext(ctx aws.Context, input *GetResourceSharesInput, opts ...request.Option) (*GetResourceSharesOutput, error) { - req, out := c.GetResourceSharesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetResourceSharesPages iterates over the pages of a GetResourceShares operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetResourceShares 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 GetResourceShares operation. -// pageNum := 0 -// err := client.GetResourceSharesPages(params, -// func(page *GetResourceSharesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RAM) GetResourceSharesPages(input *GetResourceSharesInput, fn func(*GetResourceSharesOutput, bool) bool) error { - return c.GetResourceSharesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetResourceSharesPagesWithContext same as GetResourceSharesPages 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 *RAM) GetResourceSharesPagesWithContext(ctx aws.Context, input *GetResourceSharesInput, fn func(*GetResourceSharesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetResourceSharesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetResourceSharesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetResourceSharesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListPrincipals = "ListPrincipals" - -// ListPrincipalsRequest generates a "aws/request.Request" representing the -// client's request for the ListPrincipals operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPrincipals for more information on using the ListPrincipals -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPrincipalsRequest method. -// req, resp := client.ListPrincipalsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/ListPrincipals -func (c *RAM) ListPrincipalsRequest(input *ListPrincipalsInput) (req *request.Request, output *ListPrincipalsOutput) { - op := &request.Operation{ - Name: opListPrincipals, - HTTPMethod: "POST", - HTTPPath: "/listprincipals", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListPrincipalsInput{} - } - - output = &ListPrincipalsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPrincipals API operation for AWS Resource Access Manager. -// -// Lists the principals with access to the specified resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation ListPrincipals for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMalformedArnException "MalformedArnException" -// The format of an Amazon Resource Name (ARN) is not valid. -// -// * ErrCodeUnknownResourceException "UnknownResourceException" -// A specified resource was not found. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified value for NextToken is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/ListPrincipals -func (c *RAM) ListPrincipals(input *ListPrincipalsInput) (*ListPrincipalsOutput, error) { - req, out := c.ListPrincipalsRequest(input) - return out, req.Send() -} - -// ListPrincipalsWithContext is the same as ListPrincipals with the addition of -// the ability to pass a context and additional request options. -// -// See ListPrincipals for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RAM) ListPrincipalsWithContext(ctx aws.Context, input *ListPrincipalsInput, opts ...request.Option) (*ListPrincipalsOutput, error) { - req, out := c.ListPrincipalsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPrincipalsPages iterates over the pages of a ListPrincipals operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPrincipals 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 ListPrincipals operation. -// pageNum := 0 -// err := client.ListPrincipalsPages(params, -// func(page *ListPrincipalsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RAM) ListPrincipalsPages(input *ListPrincipalsInput, fn func(*ListPrincipalsOutput, bool) bool) error { - return c.ListPrincipalsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPrincipalsPagesWithContext same as ListPrincipalsPages 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 *RAM) ListPrincipalsPagesWithContext(ctx aws.Context, input *ListPrincipalsInput, fn func(*ListPrincipalsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPrincipalsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPrincipalsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPrincipalsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListResources = "ListResources" - -// ListResourcesRequest generates a "aws/request.Request" representing the -// client's request for the ListResources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResources for more information on using the ListResources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResourcesRequest method. -// req, resp := client.ListResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/ListResources -func (c *RAM) ListResourcesRequest(input *ListResourcesInput) (req *request.Request, output *ListResourcesOutput) { - op := &request.Operation{ - Name: opListResources, - HTTPMethod: "POST", - HTTPPath: "/listresources", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListResourcesInput{} - } - - output = &ListResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResources API operation for AWS Resource Access Manager. -// -// Lists the resources that the specified principal can access. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation ListResources for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceTypeException "InvalidResourceTypeException" -// The specified resource type is not valid. -// -// * ErrCodeUnknownResourceException "UnknownResourceException" -// A specified resource was not found. -// -// * ErrCodeMalformedArnException "MalformedArnException" -// The format of an Amazon Resource Name (ARN) is not valid. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified value for NextToken is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/ListResources -func (c *RAM) ListResources(input *ListResourcesInput) (*ListResourcesOutput, error) { - req, out := c.ListResourcesRequest(input) - return out, req.Send() -} - -// ListResourcesWithContext is the same as ListResources with the addition of -// the ability to pass a context and additional request options. -// -// See ListResources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RAM) ListResourcesWithContext(ctx aws.Context, input *ListResourcesInput, opts ...request.Option) (*ListResourcesOutput, error) { - req, out := c.ListResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListResourcesPages iterates over the pages of a ListResources operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListResources 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 ListResources operation. -// pageNum := 0 -// err := client.ListResourcesPages(params, -// func(page *ListResourcesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RAM) ListResourcesPages(input *ListResourcesInput, fn func(*ListResourcesOutput, bool) bool) error { - return c.ListResourcesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListResourcesPagesWithContext same as ListResourcesPages 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 *RAM) ListResourcesPagesWithContext(ctx aws.Context, input *ListResourcesInput, fn func(*ListResourcesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListResourcesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListResourcesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResourcesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opRejectResourceShareInvitation = "RejectResourceShareInvitation" - -// RejectResourceShareInvitationRequest generates a "aws/request.Request" representing the -// client's request for the RejectResourceShareInvitation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RejectResourceShareInvitation for more information on using the RejectResourceShareInvitation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RejectResourceShareInvitationRequest method. -// req, resp := client.RejectResourceShareInvitationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/RejectResourceShareInvitation -func (c *RAM) RejectResourceShareInvitationRequest(input *RejectResourceShareInvitationInput) (req *request.Request, output *RejectResourceShareInvitationOutput) { - op := &request.Operation{ - Name: opRejectResourceShareInvitation, - HTTPMethod: "POST", - HTTPPath: "/rejectresourceshareinvitation", - } - - if input == nil { - input = &RejectResourceShareInvitationInput{} - } - - output = &RejectResourceShareInvitationOutput{} - req = c.newRequest(op, input, output) - return -} - -// RejectResourceShareInvitation API operation for AWS Resource Access Manager. -// -// Rejects an invitation to a resource share from another AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation RejectResourceShareInvitation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMalformedArnException "MalformedArnException" -// The format of an Amazon Resource Name (ARN) is not valid. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// The requested operation is not permitted. -// -// * ErrCodeResourceShareInvitationArnNotFoundException "ResourceShareInvitationArnNotFoundException" -// The Amazon Resource Name (ARN) for an invitation was not found. -// -// * ErrCodeResourceShareInvitationAlreadyAcceptedException "ResourceShareInvitationAlreadyAcceptedException" -// The invitation was already accepted. -// -// * ErrCodeResourceShareInvitationAlreadyRejectedException "ResourceShareInvitationAlreadyRejectedException" -// The invitation was already rejected. -// -// * ErrCodeResourceShareInvitationExpiredException "ResourceShareInvitationExpiredException" -// The invitation is expired. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/RejectResourceShareInvitation -func (c *RAM) RejectResourceShareInvitation(input *RejectResourceShareInvitationInput) (*RejectResourceShareInvitationOutput, error) { - req, out := c.RejectResourceShareInvitationRequest(input) - return out, req.Send() -} - -// RejectResourceShareInvitationWithContext is the same as RejectResourceShareInvitation with the addition of -// the ability to pass a context and additional request options. -// -// See RejectResourceShareInvitation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RAM) RejectResourceShareInvitationWithContext(ctx aws.Context, input *RejectResourceShareInvitationInput, opts ...request.Option) (*RejectResourceShareInvitationOutput, error) { - req, out := c.RejectResourceShareInvitationRequest(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/ram-2018-01-04/TagResource -func (c *RAM) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/tagresource", - } - - 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 Resource Access Manager. -// -// Adds the specified tags to the specified resource share. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is not valid. -// -// * ErrCodeMalformedArnException "MalformedArnException" -// The format of an Amazon Resource Name (ARN) is not valid. -// -// * ErrCodeTagLimitExceededException "TagLimitExceededException" -// The requested tags exceed the limit for your account. -// -// * ErrCodeResourceArnNotFoundException "ResourceArnNotFoundException" -// An Amazon Resource Name (ARN) was not found. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/TagResource -func (c *RAM) 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 *RAM) 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/ram-2018-01-04/UntagResource -func (c *RAM) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/untagresource", - } - - 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 Resource Access Manager. -// -// Removes the specified tags from the specified resource share. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is not valid. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/UntagResource -func (c *RAM) 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 *RAM) 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 opUpdateResourceShare = "UpdateResourceShare" - -// UpdateResourceShareRequest generates a "aws/request.Request" representing the -// client's request for the UpdateResourceShare operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateResourceShare for more information on using the UpdateResourceShare -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateResourceShareRequest method. -// req, resp := client.UpdateResourceShareRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/UpdateResourceShare -func (c *RAM) UpdateResourceShareRequest(input *UpdateResourceShareInput) (req *request.Request, output *UpdateResourceShareOutput) { - op := &request.Operation{ - Name: opUpdateResourceShare, - HTTPMethod: "POST", - HTTPPath: "/updateresourceshare", - } - - if input == nil { - input = &UpdateResourceShareInput{} - } - - output = &UpdateResourceShareOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateResourceShare API operation for AWS Resource Access Manager. -// -// Updates the specified resource share. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Access Manager's -// API operation UpdateResourceShare for usage and error information. -// -// Returned Error Codes: -// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" -// A client token input parameter was reused with an operation, but at least -// one of the other input parameters is different from the previous call to -// the operation. -// -// * ErrCodeMissingRequiredParameterException "MissingRequiredParameterException" -// A required input parameter is missing. -// -// * ErrCodeUnknownResourceException "UnknownResourceException" -// A specified resource was not found. -// -// * ErrCodeMalformedArnException "MalformedArnException" -// The format of an Amazon Resource Name (ARN) is not valid. -// -// * ErrCodeInvalidClientTokenException "InvalidClientTokenException" -// A client token is not valid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// A parameter is not valid. -// -// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" -// The requested operation is not permitted. -// -// * ErrCodeServerInternalException "ServerInternalException" -// The service could not respond to the request due to an internal problem. -// -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/UpdateResourceShare -func (c *RAM) UpdateResourceShare(input *UpdateResourceShareInput) (*UpdateResourceShareOutput, error) { - req, out := c.UpdateResourceShareRequest(input) - return out, req.Send() -} - -// UpdateResourceShareWithContext is the same as UpdateResourceShare with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateResourceShare for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RAM) UpdateResourceShareWithContext(ctx aws.Context, input *UpdateResourceShareInput, opts ...request.Option) (*UpdateResourceShareOutput, error) { - req, out := c.UpdateResourceShareRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AcceptResourceShareInvitationInput struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // The Amazon Resource Name (ARN) of the invitation. - // - // ResourceShareInvitationArn is a required field - ResourceShareInvitationArn *string `locationName:"resourceShareInvitationArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s AcceptResourceShareInvitationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptResourceShareInvitationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AcceptResourceShareInvitationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AcceptResourceShareInvitationInput"} - if s.ResourceShareInvitationArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceShareInvitationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *AcceptResourceShareInvitationInput) SetClientToken(v string) *AcceptResourceShareInvitationInput { - s.ClientToken = &v - return s -} - -// SetResourceShareInvitationArn sets the ResourceShareInvitationArn field's value. -func (s *AcceptResourceShareInvitationInput) SetResourceShareInvitationArn(v string) *AcceptResourceShareInvitationInput { - s.ResourceShareInvitationArn = &v - return s -} - -type AcceptResourceShareInvitationOutput struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the invitation. - ResourceShareInvitation *ResourceShareInvitation `locationName:"resourceShareInvitation" type:"structure"` -} - -// String returns the string representation -func (s AcceptResourceShareInvitationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptResourceShareInvitationOutput) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *AcceptResourceShareInvitationOutput) SetClientToken(v string) *AcceptResourceShareInvitationOutput { - s.ClientToken = &v - return s -} - -// SetResourceShareInvitation sets the ResourceShareInvitation field's value. -func (s *AcceptResourceShareInvitationOutput) SetResourceShareInvitation(v *ResourceShareInvitation) *AcceptResourceShareInvitationOutput { - s.ResourceShareInvitation = v - return s -} - -type AssociateResourceShareInput struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // The principals. - Principals []*string `locationName:"principals" type:"list"` - - // The Amazon Resource Names (ARN) of the resources. - ResourceArns []*string `locationName:"resourceArns" type:"list"` - - // The Amazon Resource Name (ARN) of the resource share. - // - // ResourceShareArn is a required field - ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateResourceShareInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateResourceShareInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateResourceShareInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateResourceShareInput"} - if s.ResourceShareArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceShareArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *AssociateResourceShareInput) SetClientToken(v string) *AssociateResourceShareInput { - s.ClientToken = &v - return s -} - -// SetPrincipals sets the Principals field's value. -func (s *AssociateResourceShareInput) SetPrincipals(v []*string) *AssociateResourceShareInput { - s.Principals = v - return s -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *AssociateResourceShareInput) SetResourceArns(v []*string) *AssociateResourceShareInput { - s.ResourceArns = v - return s -} - -// SetResourceShareArn sets the ResourceShareArn field's value. -func (s *AssociateResourceShareInput) SetResourceShareArn(v string) *AssociateResourceShareInput { - s.ResourceShareArn = &v - return s -} - -type AssociateResourceShareOutput struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the associations. - ResourceShareAssociations []*ResourceShareAssociation `locationName:"resourceShareAssociations" type:"list"` -} - -// String returns the string representation -func (s AssociateResourceShareOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateResourceShareOutput) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *AssociateResourceShareOutput) SetClientToken(v string) *AssociateResourceShareOutput { - s.ClientToken = &v - return s -} - -// SetResourceShareAssociations sets the ResourceShareAssociations field's value. -func (s *AssociateResourceShareOutput) SetResourceShareAssociations(v []*ResourceShareAssociation) *AssociateResourceShareOutput { - s.ResourceShareAssociations = v - return s -} - -type CreateResourceShareInput struct { - _ struct{} `type:"structure"` - - // Indicates whether principals outside your organization can be associated - // with a resource share. - AllowExternalPrincipals *bool `locationName:"allowExternalPrincipals" type:"boolean"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // The name of the resource share. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The principals to associate with the resource share. The possible values - // are IDs of AWS accounts, the ARN of an OU or organization from AWS Organizations. - Principals []*string `locationName:"principals" type:"list"` - - // The Amazon Resource Names (ARN) of the resources to associate with the resource - // share. - ResourceArns []*string `locationName:"resourceArns" type:"list"` - - // One or more tags. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s CreateResourceShareInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResourceShareInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateResourceShareInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateResourceShareInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowExternalPrincipals sets the AllowExternalPrincipals field's value. -func (s *CreateResourceShareInput) SetAllowExternalPrincipals(v bool) *CreateResourceShareInput { - s.AllowExternalPrincipals = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateResourceShareInput) SetClientToken(v string) *CreateResourceShareInput { - s.ClientToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateResourceShareInput) SetName(v string) *CreateResourceShareInput { - s.Name = &v - return s -} - -// SetPrincipals sets the Principals field's value. -func (s *CreateResourceShareInput) SetPrincipals(v []*string) *CreateResourceShareInput { - s.Principals = v - return s -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *CreateResourceShareInput) SetResourceArns(v []*string) *CreateResourceShareInput { - s.ResourceArns = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateResourceShareInput) SetTags(v []*Tag) *CreateResourceShareInput { - s.Tags = v - return s -} - -type CreateResourceShareOutput struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the resource share. - ResourceShare *ResourceShare `locationName:"resourceShare" type:"structure"` -} - -// String returns the string representation -func (s CreateResourceShareOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResourceShareOutput) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateResourceShareOutput) SetClientToken(v string) *CreateResourceShareOutput { - s.ClientToken = &v - return s -} - -// SetResourceShare sets the ResourceShare field's value. -func (s *CreateResourceShareOutput) SetResourceShare(v *ResourceShare) *CreateResourceShareOutput { - s.ResourceShare = v - return s -} - -type DeleteResourceShareInput struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `location:"querystring" locationName:"clientToken" type:"string"` - - // The Amazon Resource Name (ARN) of the resource share. - // - // ResourceShareArn is a required field - ResourceShareArn *string `location:"querystring" locationName:"resourceShareArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteResourceShareInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResourceShareInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteResourceShareInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteResourceShareInput"} - if s.ResourceShareArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceShareArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *DeleteResourceShareInput) SetClientToken(v string) *DeleteResourceShareInput { - s.ClientToken = &v - return s -} - -// SetResourceShareArn sets the ResourceShareArn field's value. -func (s *DeleteResourceShareInput) SetResourceShareArn(v string) *DeleteResourceShareInput { - s.ResourceShareArn = &v - return s -} - -type DeleteResourceShareOutput struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Indicates whether the request succeeded. - ReturnValue *bool `locationName:"returnValue" type:"boolean"` -} - -// String returns the string representation -func (s DeleteResourceShareOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResourceShareOutput) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *DeleteResourceShareOutput) SetClientToken(v string) *DeleteResourceShareOutput { - s.ClientToken = &v - return s -} - -// SetReturnValue sets the ReturnValue field's value. -func (s *DeleteResourceShareOutput) SetReturnValue(v bool) *DeleteResourceShareOutput { - s.ReturnValue = &v - return s -} - -type DisassociateResourceShareInput struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // The principals. - Principals []*string `locationName:"principals" type:"list"` - - // The Amazon Resource Names (ARN) of the resources. - ResourceArns []*string `locationName:"resourceArns" type:"list"` - - // The Amazon Resource Name (ARN) of the resource share. - // - // ResourceShareArn is a required field - ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateResourceShareInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateResourceShareInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateResourceShareInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateResourceShareInput"} - if s.ResourceShareArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceShareArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *DisassociateResourceShareInput) SetClientToken(v string) *DisassociateResourceShareInput { - s.ClientToken = &v - return s -} - -// SetPrincipals sets the Principals field's value. -func (s *DisassociateResourceShareInput) SetPrincipals(v []*string) *DisassociateResourceShareInput { - s.Principals = v - return s -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *DisassociateResourceShareInput) SetResourceArns(v []*string) *DisassociateResourceShareInput { - s.ResourceArns = v - return s -} - -// SetResourceShareArn sets the ResourceShareArn field's value. -func (s *DisassociateResourceShareInput) SetResourceShareArn(v string) *DisassociateResourceShareInput { - s.ResourceShareArn = &v - return s -} - -type DisassociateResourceShareOutput struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the associations. - ResourceShareAssociations []*ResourceShareAssociation `locationName:"resourceShareAssociations" type:"list"` -} - -// String returns the string representation -func (s DisassociateResourceShareOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateResourceShareOutput) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *DisassociateResourceShareOutput) SetClientToken(v string) *DisassociateResourceShareOutput { - s.ClientToken = &v - return s -} - -// SetResourceShareAssociations sets the ResourceShareAssociations field's value. -func (s *DisassociateResourceShareOutput) SetResourceShareAssociations(v []*ResourceShareAssociation) *DisassociateResourceShareOutput { - s.ResourceShareAssociations = v - return s -} - -type EnableSharingWithAwsOrganizationInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableSharingWithAwsOrganizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableSharingWithAwsOrganizationInput) GoString() string { - return s.String() -} - -type EnableSharingWithAwsOrganizationOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether the request succeeded. - ReturnValue *bool `locationName:"returnValue" type:"boolean"` -} - -// String returns the string representation -func (s EnableSharingWithAwsOrganizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableSharingWithAwsOrganizationOutput) GoString() string { - return s.String() -} - -// SetReturnValue sets the ReturnValue field's value. -func (s *EnableSharingWithAwsOrganizationOutput) SetReturnValue(v bool) *EnableSharingWithAwsOrganizationOutput { - s.ReturnValue = &v - return s -} - -type GetResourcePoliciesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // The token for the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The principal. - Principal *string `locationName:"principal" type:"string"` - - // The Amazon Resource Names (ARN) of the resources. - // - // ResourceArns is a required field - ResourceArns []*string `locationName:"resourceArns" type:"list" required:"true"` -} - -// String returns the string representation -func (s GetResourcePoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourcePoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResourcePoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResourcePoliciesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ResourceArns == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArns")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetResourcePoliciesInput) SetMaxResults(v int64) *GetResourcePoliciesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetResourcePoliciesInput) SetNextToken(v string) *GetResourcePoliciesInput { - s.NextToken = &v - return s -} - -// SetPrincipal sets the Principal field's value. -func (s *GetResourcePoliciesInput) SetPrincipal(v string) *GetResourcePoliciesInput { - s.Principal = &v - return s -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *GetResourcePoliciesInput) SetResourceArns(v []*string) *GetResourcePoliciesInput { - s.ResourceArns = v - return s -} - -type GetResourcePoliciesOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // A key policy document, in JSON format. - Policies []*string `locationName:"policies" type:"list"` -} - -// String returns the string representation -func (s GetResourcePoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourcePoliciesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetResourcePoliciesOutput) SetNextToken(v string) *GetResourcePoliciesOutput { - s.NextToken = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *GetResourcePoliciesOutput) SetPolicies(v []*string) *GetResourcePoliciesOutput { - s.Policies = v - return s -} - -type GetResourceShareAssociationsInput struct { - _ struct{} `type:"structure"` - - // The status of the association. - AssociationStatus *string `locationName:"associationStatus" type:"string" enum:"ResourceShareAssociationStatus"` - - // The association type. - // - // AssociationType is a required field - AssociationType *string `locationName:"associationType" type:"string" required:"true" enum:"ResourceShareAssociationType"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // The token for the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The principal. - Principal *string `locationName:"principal" type:"string"` - - // The Amazon Resource Name (ARN) of the resource. - ResourceArn *string `locationName:"resourceArn" type:"string"` - - // The Amazon Resource Names (ARN) of the resource shares. - ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"` -} - -// String returns the string representation -func (s GetResourceShareAssociationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourceShareAssociationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResourceShareAssociationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResourceShareAssociationsInput"} - if s.AssociationType == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationType")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationStatus sets the AssociationStatus field's value. -func (s *GetResourceShareAssociationsInput) SetAssociationStatus(v string) *GetResourceShareAssociationsInput { - s.AssociationStatus = &v - return s -} - -// SetAssociationType sets the AssociationType field's value. -func (s *GetResourceShareAssociationsInput) SetAssociationType(v string) *GetResourceShareAssociationsInput { - s.AssociationType = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetResourceShareAssociationsInput) SetMaxResults(v int64) *GetResourceShareAssociationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetResourceShareAssociationsInput) SetNextToken(v string) *GetResourceShareAssociationsInput { - s.NextToken = &v - return s -} - -// SetPrincipal sets the Principal field's value. -func (s *GetResourceShareAssociationsInput) SetPrincipal(v string) *GetResourceShareAssociationsInput { - s.Principal = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *GetResourceShareAssociationsInput) SetResourceArn(v string) *GetResourceShareAssociationsInput { - s.ResourceArn = &v - return s -} - -// SetResourceShareArns sets the ResourceShareArns field's value. -func (s *GetResourceShareAssociationsInput) SetResourceShareArns(v []*string) *GetResourceShareAssociationsInput { - s.ResourceShareArns = v - return s -} - -type GetResourceShareAssociationsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the association. - ResourceShareAssociations []*ResourceShareAssociation `locationName:"resourceShareAssociations" type:"list"` -} - -// String returns the string representation -func (s GetResourceShareAssociationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourceShareAssociationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetResourceShareAssociationsOutput) SetNextToken(v string) *GetResourceShareAssociationsOutput { - s.NextToken = &v - return s -} - -// SetResourceShareAssociations sets the ResourceShareAssociations field's value. -func (s *GetResourceShareAssociationsOutput) SetResourceShareAssociations(v []*ResourceShareAssociation) *GetResourceShareAssociationsOutput { - s.ResourceShareAssociations = v - return s -} - -type GetResourceShareInvitationsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // The token for the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The Amazon Resource Names (ARN) of the resource shares. - ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"` - - // The Amazon Resource Names (ARN) of the invitations. - ResourceShareInvitationArns []*string `locationName:"resourceShareInvitationArns" type:"list"` -} - -// String returns the string representation -func (s GetResourceShareInvitationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourceShareInvitationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResourceShareInvitationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResourceShareInvitationsInput"} - 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 *GetResourceShareInvitationsInput) SetMaxResults(v int64) *GetResourceShareInvitationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetResourceShareInvitationsInput) SetNextToken(v string) *GetResourceShareInvitationsInput { - s.NextToken = &v - return s -} - -// SetResourceShareArns sets the ResourceShareArns field's value. -func (s *GetResourceShareInvitationsInput) SetResourceShareArns(v []*string) *GetResourceShareInvitationsInput { - s.ResourceShareArns = v - return s -} - -// SetResourceShareInvitationArns sets the ResourceShareInvitationArns field's value. -func (s *GetResourceShareInvitationsInput) SetResourceShareInvitationArns(v []*string) *GetResourceShareInvitationsInput { - s.ResourceShareInvitationArns = v - return s -} - -type GetResourceShareInvitationsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the invitations. - ResourceShareInvitations []*ResourceShareInvitation `locationName:"resourceShareInvitations" type:"list"` -} - -// String returns the string representation -func (s GetResourceShareInvitationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourceShareInvitationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetResourceShareInvitationsOutput) SetNextToken(v string) *GetResourceShareInvitationsOutput { - s.NextToken = &v - return s -} - -// SetResourceShareInvitations sets the ResourceShareInvitations field's value. -func (s *GetResourceShareInvitationsOutput) SetResourceShareInvitations(v []*ResourceShareInvitation) *GetResourceShareInvitationsOutput { - s.ResourceShareInvitations = v - return s -} - -type GetResourceSharesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // The name of the resource share. - Name *string `locationName:"name" type:"string"` - - // The token for the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The type of owner. - // - // ResourceOwner is a required field - ResourceOwner *string `locationName:"resourceOwner" type:"string" required:"true" enum:"ResourceOwner"` - - // The Amazon Resource Names (ARN) of the resource shares. - ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"` - - // The status of the resource share. - ResourceShareStatus *string `locationName:"resourceShareStatus" type:"string" enum:"ResourceShareStatus"` - - // One or more tag filters. - TagFilters []*TagFilter `locationName:"tagFilters" type:"list"` -} - -// String returns the string representation -func (s GetResourceSharesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourceSharesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResourceSharesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResourceSharesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ResourceOwner == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceOwner")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetResourceSharesInput) SetMaxResults(v int64) *GetResourceSharesInput { - s.MaxResults = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetResourceSharesInput) SetName(v string) *GetResourceSharesInput { - s.Name = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetResourceSharesInput) SetNextToken(v string) *GetResourceSharesInput { - s.NextToken = &v - return s -} - -// SetResourceOwner sets the ResourceOwner field's value. -func (s *GetResourceSharesInput) SetResourceOwner(v string) *GetResourceSharesInput { - s.ResourceOwner = &v - return s -} - -// SetResourceShareArns sets the ResourceShareArns field's value. -func (s *GetResourceSharesInput) SetResourceShareArns(v []*string) *GetResourceSharesInput { - s.ResourceShareArns = v - return s -} - -// SetResourceShareStatus sets the ResourceShareStatus field's value. -func (s *GetResourceSharesInput) SetResourceShareStatus(v string) *GetResourceSharesInput { - s.ResourceShareStatus = &v - return s -} - -// SetTagFilters sets the TagFilters field's value. -func (s *GetResourceSharesInput) SetTagFilters(v []*TagFilter) *GetResourceSharesInput { - s.TagFilters = v - return s -} - -type GetResourceSharesOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the resource shares. - ResourceShares []*ResourceShare `locationName:"resourceShares" type:"list"` -} - -// String returns the string representation -func (s GetResourceSharesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourceSharesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetResourceSharesOutput) SetNextToken(v string) *GetResourceSharesOutput { - s.NextToken = &v - return s -} - -// SetResourceShares sets the ResourceShares field's value. -func (s *GetResourceSharesOutput) SetResourceShares(v []*ResourceShare) *GetResourceSharesOutput { - s.ResourceShares = v - return s -} - -type ListPrincipalsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // The token for the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The principals. - Principals []*string `locationName:"principals" type:"list"` - - // The Amazon Resource Name (ARN) of the resource. - ResourceArn *string `locationName:"resourceArn" type:"string"` - - // The type of owner. - // - // ResourceOwner is a required field - ResourceOwner *string `locationName:"resourceOwner" type:"string" required:"true" enum:"ResourceOwner"` - - // The Amazon Resource Names (ARN) of the resource shares. - ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"` - - // The resource type. - ResourceType *string `locationName:"resourceType" type:"string"` -} - -// String returns the string representation -func (s ListPrincipalsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPrincipalsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPrincipalsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPrincipalsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ResourceOwner == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceOwner")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListPrincipalsInput) SetMaxResults(v int64) *ListPrincipalsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPrincipalsInput) SetNextToken(v string) *ListPrincipalsInput { - s.NextToken = &v - return s -} - -// SetPrincipals sets the Principals field's value. -func (s *ListPrincipalsInput) SetPrincipals(v []*string) *ListPrincipalsInput { - s.Principals = v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ListPrincipalsInput) SetResourceArn(v string) *ListPrincipalsInput { - s.ResourceArn = &v - return s -} - -// SetResourceOwner sets the ResourceOwner field's value. -func (s *ListPrincipalsInput) SetResourceOwner(v string) *ListPrincipalsInput { - s.ResourceOwner = &v - return s -} - -// SetResourceShareArns sets the ResourceShareArns field's value. -func (s *ListPrincipalsInput) SetResourceShareArns(v []*string) *ListPrincipalsInput { - s.ResourceShareArns = v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ListPrincipalsInput) SetResourceType(v string) *ListPrincipalsInput { - s.ResourceType = &v - return s -} - -type ListPrincipalsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // The principals. - Principals []*Principal `locationName:"principals" type:"list"` -} - -// String returns the string representation -func (s ListPrincipalsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPrincipalsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPrincipalsOutput) SetNextToken(v string) *ListPrincipalsOutput { - s.NextToken = &v - return s -} - -// SetPrincipals sets the Principals field's value. -func (s *ListPrincipalsOutput) SetPrincipals(v []*Principal) *ListPrincipalsOutput { - s.Principals = v - return s -} - -type ListResourcesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - - // The token for the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The principal. - Principal *string `locationName:"principal" type:"string"` - - // The Amazon Resource Names (ARN) of the resources. - ResourceArns []*string `locationName:"resourceArns" type:"list"` - - // The type of owner. - // - // ResourceOwner is a required field - ResourceOwner *string `locationName:"resourceOwner" type:"string" required:"true" enum:"ResourceOwner"` - - // The Amazon Resource Names (ARN) of the resource shares. - ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"` - - // The resource type. - ResourceType *string `locationName:"resourceType" type:"string"` -} - -// String returns the string representation -func (s ListResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResourcesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ResourceOwner == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceOwner")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListResourcesInput) SetMaxResults(v int64) *ListResourcesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResourcesInput) SetNextToken(v string) *ListResourcesInput { - s.NextToken = &v - return s -} - -// SetPrincipal sets the Principal field's value. -func (s *ListResourcesInput) SetPrincipal(v string) *ListResourcesInput { - s.Principal = &v - return s -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *ListResourcesInput) SetResourceArns(v []*string) *ListResourcesInput { - s.ResourceArns = v - return s -} - -// SetResourceOwner sets the ResourceOwner field's value. -func (s *ListResourcesInput) SetResourceOwner(v string) *ListResourcesInput { - s.ResourceOwner = &v - return s -} - -// SetResourceShareArns sets the ResourceShareArns field's value. -func (s *ListResourcesInput) SetResourceShareArns(v []*string) *ListResourcesInput { - s.ResourceShareArns = v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ListResourcesInput) SetResourceType(v string) *ListResourcesInput { - s.ResourceType = &v - return s -} - -type ListResourcesOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the resources. - Resources []*Resource `locationName:"resources" type:"list"` -} - -// String returns the string representation -func (s ListResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourcesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResourcesOutput) SetNextToken(v string) *ListResourcesOutput { - s.NextToken = &v - return s -} - -// SetResources sets the Resources field's value. -func (s *ListResourcesOutput) SetResources(v []*Resource) *ListResourcesOutput { - s.Resources = v - return s -} - -// Describes a principal for use with AWS Resource Access Manager. -type Principal struct { - _ struct{} `type:"structure"` - - // The time when the principal was associated with the resource share. - CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` - - // Indicates whether the principal belongs to the same organization as the AWS - // account that owns the resource share. - External *bool `locationName:"external" type:"boolean"` - - // The ID of the principal. - Id *string `locationName:"id" type:"string"` - - // The time when the association was last updated. - LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` - - // The Amazon Resource Name (ARN) of the resource share. - ResourceShareArn *string `locationName:"resourceShareArn" type:"string"` -} - -// String returns the string representation -func (s Principal) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Principal) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *Principal) SetCreationTime(v time.Time) *Principal { - s.CreationTime = &v - return s -} - -// SetExternal sets the External field's value. -func (s *Principal) SetExternal(v bool) *Principal { - s.External = &v - return s -} - -// SetId sets the Id field's value. -func (s *Principal) SetId(v string) *Principal { - s.Id = &v - return s -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *Principal) SetLastUpdatedTime(v time.Time) *Principal { - s.LastUpdatedTime = &v - return s -} - -// SetResourceShareArn sets the ResourceShareArn field's value. -func (s *Principal) SetResourceShareArn(v string) *Principal { - s.ResourceShareArn = &v - return s -} - -type RejectResourceShareInvitationInput struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // The Amazon Resource Name (ARN) of the invitation. - // - // ResourceShareInvitationArn is a required field - ResourceShareInvitationArn *string `locationName:"resourceShareInvitationArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s RejectResourceShareInvitationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectResourceShareInvitationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RejectResourceShareInvitationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RejectResourceShareInvitationInput"} - if s.ResourceShareInvitationArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceShareInvitationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *RejectResourceShareInvitationInput) SetClientToken(v string) *RejectResourceShareInvitationInput { - s.ClientToken = &v - return s -} - -// SetResourceShareInvitationArn sets the ResourceShareInvitationArn field's value. -func (s *RejectResourceShareInvitationInput) SetResourceShareInvitationArn(v string) *RejectResourceShareInvitationInput { - s.ResourceShareInvitationArn = &v - return s -} - -type RejectResourceShareInvitationOutput struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the invitation. - ResourceShareInvitation *ResourceShareInvitation `locationName:"resourceShareInvitation" type:"structure"` -} - -// String returns the string representation -func (s RejectResourceShareInvitationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectResourceShareInvitationOutput) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *RejectResourceShareInvitationOutput) SetClientToken(v string) *RejectResourceShareInvitationOutput { - s.ClientToken = &v - return s -} - -// SetResourceShareInvitation sets the ResourceShareInvitation field's value. -func (s *RejectResourceShareInvitationOutput) SetResourceShareInvitation(v *ResourceShareInvitation) *RejectResourceShareInvitationOutput { - s.ResourceShareInvitation = v - return s -} - -// Describes a resource associated with a resource share. -type Resource struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource. - Arn *string `locationName:"arn" type:"string"` - - // The time when the resource was associated with the resource share. - CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` - - // The time when the association was last updated. - LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` - - // The Amazon Resource Name (ARN) of the resource share. - ResourceShareArn *string `locationName:"resourceShareArn" type:"string"` - - // The status of the resource. - Status *string `locationName:"status" type:"string" enum:"ResourceStatus"` - - // A message about the status of the resource. - StatusMessage *string `locationName:"statusMessage" type:"string"` - - // The resource type. - Type *string `locationName:"type" type:"string"` -} - -// 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() -} - -// SetArn sets the Arn field's value. -func (s *Resource) SetArn(v string) *Resource { - s.Arn = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *Resource) SetCreationTime(v time.Time) *Resource { - s.CreationTime = &v - return s -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *Resource) SetLastUpdatedTime(v time.Time) *Resource { - s.LastUpdatedTime = &v - return s -} - -// SetResourceShareArn sets the ResourceShareArn field's value. -func (s *Resource) SetResourceShareArn(v string) *Resource { - s.ResourceShareArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Resource) SetStatus(v string) *Resource { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *Resource) SetStatusMessage(v string) *Resource { - s.StatusMessage = &v - return s -} - -// SetType sets the Type field's value. -func (s *Resource) SetType(v string) *Resource { - s.Type = &v - return s -} - -// Describes a resource share. -type ResourceShare struct { - _ struct{} `type:"structure"` - - // Indicates whether principals outside your organization can be associated - // with a resource share. - AllowExternalPrincipals *bool `locationName:"allowExternalPrincipals" type:"boolean"` - - // The time when the resource share was created. - CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` - - // The time when the resource share was last updated. - LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` - - // The name of the resource share. - Name *string `locationName:"name" type:"string"` - - // The ID of the AWS account that owns the resource share. - OwningAccountId *string `locationName:"owningAccountId" type:"string"` - - // The Amazon Resource Name (ARN) of the resource share. - ResourceShareArn *string `locationName:"resourceShareArn" type:"string"` - - // The status of the resource share. - Status *string `locationName:"status" type:"string" enum:"ResourceShareStatus"` - - // A message about the status of the resource share. - StatusMessage *string `locationName:"statusMessage" type:"string"` - - // The tags for the resource share. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s ResourceShare) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceShare) GoString() string { - return s.String() -} - -// SetAllowExternalPrincipals sets the AllowExternalPrincipals field's value. -func (s *ResourceShare) SetAllowExternalPrincipals(v bool) *ResourceShare { - s.AllowExternalPrincipals = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ResourceShare) SetCreationTime(v time.Time) *ResourceShare { - s.CreationTime = &v - return s -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *ResourceShare) SetLastUpdatedTime(v time.Time) *ResourceShare { - s.LastUpdatedTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *ResourceShare) SetName(v string) *ResourceShare { - s.Name = &v - return s -} - -// SetOwningAccountId sets the OwningAccountId field's value. -func (s *ResourceShare) SetOwningAccountId(v string) *ResourceShare { - s.OwningAccountId = &v - return s -} - -// SetResourceShareArn sets the ResourceShareArn field's value. -func (s *ResourceShare) SetResourceShareArn(v string) *ResourceShare { - s.ResourceShareArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ResourceShare) SetStatus(v string) *ResourceShare { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ResourceShare) SetStatusMessage(v string) *ResourceShare { - s.StatusMessage = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ResourceShare) SetTags(v []*Tag) *ResourceShare { - s.Tags = v - return s -} - -// Describes an association with a resource share. -type ResourceShareAssociation struct { - _ struct{} `type:"structure"` - - // The associated entity. For resource associations, this is the ARN of the - // resource. For principal associations, this is the ID of an AWS account or - // the ARN of an OU or organization from AWS Organizations. - AssociatedEntity *string `locationName:"associatedEntity" type:"string"` - - // The association type. - AssociationType *string `locationName:"associationType" type:"string" enum:"ResourceShareAssociationType"` - - // The time when the association was created. - CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` - - // Indicates whether the principal belongs to the same organization as the AWS - // account that owns the resource share. - External *bool `locationName:"external" type:"boolean"` - - // The time when the association was last updated. - LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` - - // The Amazon Resource Name (ARN) of the resource share. - ResourceShareArn *string `locationName:"resourceShareArn" type:"string"` - - // The status of the association. - Status *string `locationName:"status" type:"string" enum:"ResourceShareAssociationStatus"` - - // A message about the status of the association. - StatusMessage *string `locationName:"statusMessage" type:"string"` -} - -// String returns the string representation -func (s ResourceShareAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceShareAssociation) GoString() string { - return s.String() -} - -// SetAssociatedEntity sets the AssociatedEntity field's value. -func (s *ResourceShareAssociation) SetAssociatedEntity(v string) *ResourceShareAssociation { - s.AssociatedEntity = &v - return s -} - -// SetAssociationType sets the AssociationType field's value. -func (s *ResourceShareAssociation) SetAssociationType(v string) *ResourceShareAssociation { - s.AssociationType = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ResourceShareAssociation) SetCreationTime(v time.Time) *ResourceShareAssociation { - s.CreationTime = &v - return s -} - -// SetExternal sets the External field's value. -func (s *ResourceShareAssociation) SetExternal(v bool) *ResourceShareAssociation { - s.External = &v - return s -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *ResourceShareAssociation) SetLastUpdatedTime(v time.Time) *ResourceShareAssociation { - s.LastUpdatedTime = &v - return s -} - -// SetResourceShareArn sets the ResourceShareArn field's value. -func (s *ResourceShareAssociation) SetResourceShareArn(v string) *ResourceShareAssociation { - s.ResourceShareArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ResourceShareAssociation) SetStatus(v string) *ResourceShareAssociation { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ResourceShareAssociation) SetStatusMessage(v string) *ResourceShareAssociation { - s.StatusMessage = &v - return s -} - -// Describes an invitation to join a resource share. -type ResourceShareInvitation struct { - _ struct{} `type:"structure"` - - // The date and time when the invitation was sent. - InvitationTimestamp *time.Time `locationName:"invitationTimestamp" type:"timestamp"` - - // The ID of the AWS account that received the invitation. - ReceiverAccountId *string `locationName:"receiverAccountId" type:"string"` - - // The Amazon Resource Name (ARN) of the resource share. - ResourceShareArn *string `locationName:"resourceShareArn" type:"string"` - - // The resources associated with the resource share. - ResourceShareAssociations []*ResourceShareAssociation `locationName:"resourceShareAssociations" type:"list"` - - // The Amazon Resource Name (ARN) of the invitation. - ResourceShareInvitationArn *string `locationName:"resourceShareInvitationArn" type:"string"` - - // The name of the resource share. - ResourceShareName *string `locationName:"resourceShareName" type:"string"` - - // The ID of the AWS account that sent the invitation. - SenderAccountId *string `locationName:"senderAccountId" type:"string"` - - // The status of the invitation. - Status *string `locationName:"status" type:"string" enum:"ResourceShareInvitationStatus"` -} - -// String returns the string representation -func (s ResourceShareInvitation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceShareInvitation) GoString() string { - return s.String() -} - -// SetInvitationTimestamp sets the InvitationTimestamp field's value. -func (s *ResourceShareInvitation) SetInvitationTimestamp(v time.Time) *ResourceShareInvitation { - s.InvitationTimestamp = &v - return s -} - -// SetReceiverAccountId sets the ReceiverAccountId field's value. -func (s *ResourceShareInvitation) SetReceiverAccountId(v string) *ResourceShareInvitation { - s.ReceiverAccountId = &v - return s -} - -// SetResourceShareArn sets the ResourceShareArn field's value. -func (s *ResourceShareInvitation) SetResourceShareArn(v string) *ResourceShareInvitation { - s.ResourceShareArn = &v - return s -} - -// SetResourceShareAssociations sets the ResourceShareAssociations field's value. -func (s *ResourceShareInvitation) SetResourceShareAssociations(v []*ResourceShareAssociation) *ResourceShareInvitation { - s.ResourceShareAssociations = v - return s -} - -// SetResourceShareInvitationArn sets the ResourceShareInvitationArn field's value. -func (s *ResourceShareInvitation) SetResourceShareInvitationArn(v string) *ResourceShareInvitation { - s.ResourceShareInvitationArn = &v - return s -} - -// SetResourceShareName sets the ResourceShareName field's value. -func (s *ResourceShareInvitation) SetResourceShareName(v string) *ResourceShareInvitation { - s.ResourceShareName = &v - return s -} - -// SetSenderAccountId sets the SenderAccountId field's value. -func (s *ResourceShareInvitation) SetSenderAccountId(v string) *ResourceShareInvitation { - s.SenderAccountId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ResourceShareInvitation) SetStatus(v string) *ResourceShareInvitation { - s.Status = &v - return s -} - -// Information about a tag. -type Tag struct { - _ struct{} `type:"structure"` - - // The key of the tag. - Key *string `locationName:"key" type:"string"` - - // The value of the tag. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Used to filter information based on tags. -type TagFilter struct { - _ struct{} `type:"structure"` - - // The tag key. - TagKey *string `locationName:"tagKey" type:"string"` - - // The tag values. - TagValues []*string `locationName:"tagValues" type:"list"` -} - -// String returns the string representation -func (s TagFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagFilter) GoString() string { - return s.String() -} - -// SetTagKey sets the TagKey field's value. -func (s *TagFilter) SetTagKey(v string) *TagFilter { - s.TagKey = &v - return s -} - -// SetTagValues sets the TagValues field's value. -func (s *TagFilter) SetTagValues(v []*string) *TagFilter { - s.TagValues = v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource share. - // - // ResourceShareArn is a required field - ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"` - - // One or more tags. - // - // Tags is a required field - Tags []*Tag `locationName:"tags" type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceShareArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceShareArn")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceShareArn sets the ResourceShareArn field's value. -func (s *TagResourceInput) SetResourceShareArn(v string) *TagResourceInput { - s.ResourceShareArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource share. - // - // ResourceShareArn is a required field - ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"` - - // The tag keys of the tags to remove. - // - // TagKeys is a required field - TagKeys []*string `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.ResourceShareArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceShareArn")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceShareArn sets the ResourceShareArn field's value. -func (s *UntagResourceInput) SetResourceShareArn(v string) *UntagResourceInput { - s.ResourceShareArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UpdateResourceShareInput struct { - _ struct{} `type:"structure"` - - // Indicates whether principals outside your organization can be associated - // with a resource share. - AllowExternalPrincipals *bool `locationName:"allowExternalPrincipals" type:"boolean"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // The name of the resource share. - Name *string `locationName:"name" type:"string"` - - // The Amazon Resource Name (ARN) of the resource share. - // - // ResourceShareArn is a required field - ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateResourceShareInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateResourceShareInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateResourceShareInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateResourceShareInput"} - if s.ResourceShareArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceShareArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowExternalPrincipals sets the AllowExternalPrincipals field's value. -func (s *UpdateResourceShareInput) SetAllowExternalPrincipals(v bool) *UpdateResourceShareInput { - s.AllowExternalPrincipals = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *UpdateResourceShareInput) SetClientToken(v string) *UpdateResourceShareInput { - s.ClientToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateResourceShareInput) SetName(v string) *UpdateResourceShareInput { - s.Name = &v - return s -} - -// SetResourceShareArn sets the ResourceShareArn field's value. -func (s *UpdateResourceShareInput) SetResourceShareArn(v string) *UpdateResourceShareInput { - s.ResourceShareArn = &v - return s -} - -type UpdateResourceShareOutput struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the resource share. - ResourceShare *ResourceShare `locationName:"resourceShare" type:"structure"` -} - -// String returns the string representation -func (s UpdateResourceShareOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateResourceShareOutput) GoString() string { - return s.String() -} - -// SetClientToken sets the ClientToken field's value. -func (s *UpdateResourceShareOutput) SetClientToken(v string) *UpdateResourceShareOutput { - s.ClientToken = &v - return s -} - -// SetResourceShare sets the ResourceShare field's value. -func (s *UpdateResourceShareOutput) SetResourceShare(v *ResourceShare) *UpdateResourceShareOutput { - s.ResourceShare = v - return s -} - -const ( - // ResourceOwnerSelf is a ResourceOwner enum value - ResourceOwnerSelf = "SELF" - - // ResourceOwnerOtherAccounts is a ResourceOwner enum value - ResourceOwnerOtherAccounts = "OTHER-ACCOUNTS" -) - -const ( - // ResourceShareAssociationStatusAssociating is a ResourceShareAssociationStatus enum value - ResourceShareAssociationStatusAssociating = "ASSOCIATING" - - // ResourceShareAssociationStatusAssociated is a ResourceShareAssociationStatus enum value - ResourceShareAssociationStatusAssociated = "ASSOCIATED" - - // ResourceShareAssociationStatusFailed is a ResourceShareAssociationStatus enum value - ResourceShareAssociationStatusFailed = "FAILED" - - // ResourceShareAssociationStatusDisassociating is a ResourceShareAssociationStatus enum value - ResourceShareAssociationStatusDisassociating = "DISASSOCIATING" - - // ResourceShareAssociationStatusDisassociated is a ResourceShareAssociationStatus enum value - ResourceShareAssociationStatusDisassociated = "DISASSOCIATED" -) - -const ( - // ResourceShareAssociationTypePrincipal is a ResourceShareAssociationType enum value - ResourceShareAssociationTypePrincipal = "PRINCIPAL" - - // ResourceShareAssociationTypeResource is a ResourceShareAssociationType enum value - ResourceShareAssociationTypeResource = "RESOURCE" -) - -const ( - // ResourceShareInvitationStatusPending is a ResourceShareInvitationStatus enum value - ResourceShareInvitationStatusPending = "PENDING" - - // ResourceShareInvitationStatusAccepted is a ResourceShareInvitationStatus enum value - ResourceShareInvitationStatusAccepted = "ACCEPTED" - - // ResourceShareInvitationStatusRejected is a ResourceShareInvitationStatus enum value - ResourceShareInvitationStatusRejected = "REJECTED" - - // ResourceShareInvitationStatusExpired is a ResourceShareInvitationStatus enum value - ResourceShareInvitationStatusExpired = "EXPIRED" -) - -const ( - // ResourceShareStatusPending is a ResourceShareStatus enum value - ResourceShareStatusPending = "PENDING" - - // ResourceShareStatusActive is a ResourceShareStatus enum value - ResourceShareStatusActive = "ACTIVE" - - // ResourceShareStatusFailed is a ResourceShareStatus enum value - ResourceShareStatusFailed = "FAILED" - - // ResourceShareStatusDeleting is a ResourceShareStatus enum value - ResourceShareStatusDeleting = "DELETING" - - // ResourceShareStatusDeleted is a ResourceShareStatus enum value - ResourceShareStatusDeleted = "DELETED" -) - -const ( - // ResourceStatusAvailable is a ResourceStatus enum value - ResourceStatusAvailable = "AVAILABLE" - - // ResourceStatusZonalResourceInaccessible is a ResourceStatus enum value - ResourceStatusZonalResourceInaccessible = "ZONAL_RESOURCE_INACCESSIBLE" - - // ResourceStatusLimitExceeded is a ResourceStatus enum value - ResourceStatusLimitExceeded = "LIMIT_EXCEEDED" - - // ResourceStatusUnavailable is a ResourceStatus enum value - ResourceStatusUnavailable = "UNAVAILABLE" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ram/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ram/doc.go deleted file mode 100644 index 234b180b8..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ram/doc.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package ram provides the client and types for making API -// requests to AWS Resource Access Manager. -// -// Use AWS Resource Access Manager to share AWS resources between AWS accounts. -// To share a resource, you create a resource share, associate the resource -// with the resource share, and specify the principals that can access the resource. -// The following principals are supported: -// -// * The ID of an AWS account -// -// * The Amazon Resource Name (ARN) of an OU from AWS Organizations -// -// * The Amazon Resource Name (ARN) of an organization from AWS Organizations -// -// If you specify an AWS account that doesn't exist in the same organization -// as the account that owns the resource share, the owner of the specified account -// receives an invitation to accept the resource share. After the owner accepts -// the invitation, they can access the resources in the resource share. An administrator -// of the specified account can use IAM policies to restrict access resources -// in the resource share. -// -// See https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04 for more information on this service. -// -// See ram package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/ram/ -// -// Using the Client -// -// To contact AWS Resource Access Manager with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS Resource Access Manager client RAM for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/ram/#New -package ram diff --git a/vendor/github.com/aws/aws-sdk-go/service/ram/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ram/errors.go deleted file mode 100644 index e0f0af48c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ram/errors.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ram - -const ( - - // ErrCodeIdempotentParameterMismatchException for service response error code - // "IdempotentParameterMismatchException". - // - // A client token input parameter was reused with an operation, but at least - // one of the other input parameters is different from the previous call to - // the operation. - ErrCodeIdempotentParameterMismatchException = "IdempotentParameterMismatchException" - - // ErrCodeInvalidClientTokenException for service response error code - // "InvalidClientTokenException". - // - // A client token is not valid. - ErrCodeInvalidClientTokenException = "InvalidClientTokenException" - - // ErrCodeInvalidMaxResultsException for service response error code - // "InvalidMaxResultsException". - // - // The specified value for MaxResults is not valid. - ErrCodeInvalidMaxResultsException = "InvalidMaxResultsException" - - // ErrCodeInvalidNextTokenException for service response error code - // "InvalidNextTokenException". - // - // The specified value for NextToken is not valid. - ErrCodeInvalidNextTokenException = "InvalidNextTokenException" - - // ErrCodeInvalidParameterException for service response error code - // "InvalidParameterException". - // - // A parameter is not valid. - ErrCodeInvalidParameterException = "InvalidParameterException" - - // ErrCodeInvalidResourceTypeException for service response error code - // "InvalidResourceTypeException". - // - // The specified resource type is not valid. - ErrCodeInvalidResourceTypeException = "InvalidResourceTypeException" - - // ErrCodeInvalidStateTransitionException for service response error code - // "InvalidStateTransitionException". - // - // The requested state transition is not valid. - ErrCodeInvalidStateTransitionException = "InvalidStateTransitionException" - - // ErrCodeMalformedArnException for service response error code - // "MalformedArnException". - // - // The format of an Amazon Resource Name (ARN) is not valid. - ErrCodeMalformedArnException = "MalformedArnException" - - // ErrCodeMissingRequiredParameterException for service response error code - // "MissingRequiredParameterException". - // - // A required input parameter is missing. - ErrCodeMissingRequiredParameterException = "MissingRequiredParameterException" - - // ErrCodeOperationNotPermittedException for service response error code - // "OperationNotPermittedException". - // - // The requested operation is not permitted. - ErrCodeOperationNotPermittedException = "OperationNotPermittedException" - - // ErrCodeResourceArnNotFoundException for service response error code - // "ResourceArnNotFoundException". - // - // An Amazon Resource Name (ARN) was not found. - ErrCodeResourceArnNotFoundException = "ResourceArnNotFoundException" - - // ErrCodeResourceShareInvitationAlreadyAcceptedException for service response error code - // "ResourceShareInvitationAlreadyAcceptedException". - // - // The invitation was already accepted. - ErrCodeResourceShareInvitationAlreadyAcceptedException = "ResourceShareInvitationAlreadyAcceptedException" - - // ErrCodeResourceShareInvitationAlreadyRejectedException for service response error code - // "ResourceShareInvitationAlreadyRejectedException". - // - // The invitation was already rejected. - ErrCodeResourceShareInvitationAlreadyRejectedException = "ResourceShareInvitationAlreadyRejectedException" - - // ErrCodeResourceShareInvitationArnNotFoundException for service response error code - // "ResourceShareInvitationArnNotFoundException". - // - // The Amazon Resource Name (ARN) for an invitation was not found. - ErrCodeResourceShareInvitationArnNotFoundException = "ResourceShareInvitationArnNotFoundException" - - // ErrCodeResourceShareInvitationExpiredException for service response error code - // "ResourceShareInvitationExpiredException". - // - // The invitation is expired. - ErrCodeResourceShareInvitationExpiredException = "ResourceShareInvitationExpiredException" - - // ErrCodeResourceShareLimitExceededException for service response error code - // "ResourceShareLimitExceededException". - // - // The requested resource share exceeds the limit for your account. - ErrCodeResourceShareLimitExceededException = "ResourceShareLimitExceededException" - - // ErrCodeServerInternalException for service response error code - // "ServerInternalException". - // - // The service could not respond to the request due to an internal problem. - ErrCodeServerInternalException = "ServerInternalException" - - // ErrCodeServiceUnavailableException for service response error code - // "ServiceUnavailableException". - // - // The service is not available. - ErrCodeServiceUnavailableException = "ServiceUnavailableException" - - // ErrCodeTagLimitExceededException for service response error code - // "TagLimitExceededException". - // - // The requested tags exceed the limit for your account. - ErrCodeTagLimitExceededException = "TagLimitExceededException" - - // ErrCodeUnknownResourceException for service response error code - // "UnknownResourceException". - // - // A specified resource was not found. - ErrCodeUnknownResourceException = "UnknownResourceException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ram/service.go b/vendor/github.com/aws/aws-sdk-go/service/ram/service.go deleted file mode 100644 index 8781113a9..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ram/service.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ram - -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" -) - -// RAM provides the API operation methods for making requests to -// AWS Resource Access Manager. See this package's package overview docs -// for details on the service. -// -// RAM methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type RAM 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 = "RAM" // Name of service. - EndpointsID = "ram" // ID to lookup a service endpoint with. - ServiceID = "RAM" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the RAM 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 RAM client from just a session. -// svc := ram.New(mySession) -// -// // Create a RAM client with additional configuration -// svc := ram.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *RAM { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *RAM { - svc := &RAM{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-01-04", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a RAM operation and runs any -// custom request initialization. -func (c *RAM) 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/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go deleted file mode 100644 index 03adeefd7..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ /dev/null @@ -1,34232 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package rds - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/query" -) - -const opAddRoleToDBCluster = "AddRoleToDBCluster" - -// AddRoleToDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the AddRoleToDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddRoleToDBCluster for more information on using the AddRoleToDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddRoleToDBClusterRequest method. -// req, resp := client.AddRoleToDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddRoleToDBCluster -func (c *RDS) AddRoleToDBClusterRequest(input *AddRoleToDBClusterInput) (req *request.Request, output *AddRoleToDBClusterOutput) { - op := &request.Operation{ - Name: opAddRoleToDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddRoleToDBClusterInput{} - } - - output = &AddRoleToDBClusterOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddRoleToDBCluster API operation for Amazon Relational Database Service. -// -// Associates an Identity and Access Management (IAM) role from an Amazon Aurora -// DB cluster. For more information, see Authorizing Amazon Aurora MySQL to -// Access Other AWS Services on Your Behalf (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation AddRoleToDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeDBClusterRoleAlreadyExistsFault "DBClusterRoleAlreadyExists" -// The specified IAM role Amazon Resource Name (ARN) is already associated with -// the specified DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeDBClusterRoleQuotaExceededFault "DBClusterRoleQuotaExceeded" -// You have exceeded the maximum number of IAM roles that can be associated -// with the specified DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddRoleToDBCluster -func (c *RDS) AddRoleToDBCluster(input *AddRoleToDBClusterInput) (*AddRoleToDBClusterOutput, error) { - req, out := c.AddRoleToDBClusterRequest(input) - return out, req.Send() -} - -// AddRoleToDBClusterWithContext is the same as AddRoleToDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See AddRoleToDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) AddRoleToDBClusterWithContext(ctx aws.Context, input *AddRoleToDBClusterInput, opts ...request.Option) (*AddRoleToDBClusterOutput, error) { - req, out := c.AddRoleToDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddRoleToDBInstance = "AddRoleToDBInstance" - -// AddRoleToDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the AddRoleToDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddRoleToDBInstance for more information on using the AddRoleToDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddRoleToDBInstanceRequest method. -// req, resp := client.AddRoleToDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddRoleToDBInstance -func (c *RDS) AddRoleToDBInstanceRequest(input *AddRoleToDBInstanceInput) (req *request.Request, output *AddRoleToDBInstanceOutput) { - op := &request.Operation{ - Name: opAddRoleToDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddRoleToDBInstanceInput{} - } - - output = &AddRoleToDBInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddRoleToDBInstance API operation for Amazon Relational Database Service. -// -// Associates an AWS Identity and Access Management (IAM) role with a DB instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation AddRoleToDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeDBInstanceRoleAlreadyExistsFault "DBInstanceRoleAlreadyExists" -// The specified RoleArn or FeatureName value is already associated with the -// DB instance. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// * ErrCodeDBInstanceRoleQuotaExceededFault "DBInstanceRoleQuotaExceeded" -// You can't associate any more AWS Identity and Access Management (IAM) roles -// with the DB instance because the quota has been reached. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddRoleToDBInstance -func (c *RDS) AddRoleToDBInstance(input *AddRoleToDBInstanceInput) (*AddRoleToDBInstanceOutput, error) { - req, out := c.AddRoleToDBInstanceRequest(input) - return out, req.Send() -} - -// AddRoleToDBInstanceWithContext is the same as AddRoleToDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See AddRoleToDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) AddRoleToDBInstanceWithContext(ctx aws.Context, input *AddRoleToDBInstanceInput, opts ...request.Option) (*AddRoleToDBInstanceOutput, error) { - req, out := c.AddRoleToDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddSourceIdentifierToSubscription = "AddSourceIdentifierToSubscription" - -// AddSourceIdentifierToSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the AddSourceIdentifierToSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddSourceIdentifierToSubscription for more information on using the AddSourceIdentifierToSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddSourceIdentifierToSubscriptionRequest method. -// req, resp := client.AddSourceIdentifierToSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddSourceIdentifierToSubscription -func (c *RDS) AddSourceIdentifierToSubscriptionRequest(input *AddSourceIdentifierToSubscriptionInput) (req *request.Request, output *AddSourceIdentifierToSubscriptionOutput) { - op := &request.Operation{ - Name: opAddSourceIdentifierToSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddSourceIdentifierToSubscriptionInput{} - } - - output = &AddSourceIdentifierToSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddSourceIdentifierToSubscription API operation for Amazon Relational Database Service. -// -// Adds a source identifier to an existing RDS event notification subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation AddSourceIdentifierToSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" -// The subscription name does not exist. -// -// * ErrCodeSourceNotFoundFault "SourceNotFound" -// The requested source could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddSourceIdentifierToSubscription -func (c *RDS) AddSourceIdentifierToSubscription(input *AddSourceIdentifierToSubscriptionInput) (*AddSourceIdentifierToSubscriptionOutput, error) { - req, out := c.AddSourceIdentifierToSubscriptionRequest(input) - return out, req.Send() -} - -// AddSourceIdentifierToSubscriptionWithContext is the same as AddSourceIdentifierToSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See AddSourceIdentifierToSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) AddSourceIdentifierToSubscriptionWithContext(ctx aws.Context, input *AddSourceIdentifierToSubscriptionInput, opts ...request.Option) (*AddSourceIdentifierToSubscriptionOutput, error) { - req, out := c.AddSourceIdentifierToSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddTagsToResource = "AddTagsToResource" - -// AddTagsToResourceRequest generates a "aws/request.Request" representing the -// client's request for the AddTagsToResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTagsToResource for more information on using the AddTagsToResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsToResourceRequest method. -// req, resp := client.AddTagsToResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddTagsToResource -func (c *RDS) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *request.Request, output *AddTagsToResourceOutput) { - op := &request.Operation{ - Name: opAddTagsToResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsToResourceInput{} - } - - output = &AddTagsToResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTagsToResource API operation for Amazon Relational Database Service. -// -// Adds metadata tags to an Amazon RDS resource. These tags can also be used -// with cost allocation reporting to track cost associated with Amazon RDS resources, -// or used in a Condition statement in an IAM policy for Amazon RDS. -// -// For an overview on tagging Amazon RDS resources, see Tagging Amazon RDS Resources -// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation AddTagsToResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddTagsToResource -func (c *RDS) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { - req, out := c.AddTagsToResourceRequest(input) - return out, req.Send() -} - -// AddTagsToResourceWithContext is the same as AddTagsToResource with the addition of -// the ability to pass a context and additional request options. -// -// See AddTagsToResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) AddTagsToResourceWithContext(ctx aws.Context, input *AddTagsToResourceInput, opts ...request.Option) (*AddTagsToResourceOutput, error) { - req, out := c.AddTagsToResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opApplyPendingMaintenanceAction = "ApplyPendingMaintenanceAction" - -// ApplyPendingMaintenanceActionRequest generates a "aws/request.Request" representing the -// client's request for the ApplyPendingMaintenanceAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ApplyPendingMaintenanceAction for more information on using the ApplyPendingMaintenanceAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ApplyPendingMaintenanceActionRequest method. -// req, resp := client.ApplyPendingMaintenanceActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ApplyPendingMaintenanceAction -func (c *RDS) ApplyPendingMaintenanceActionRequest(input *ApplyPendingMaintenanceActionInput) (req *request.Request, output *ApplyPendingMaintenanceActionOutput) { - op := &request.Operation{ - Name: opApplyPendingMaintenanceAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ApplyPendingMaintenanceActionInput{} - } - - output = &ApplyPendingMaintenanceActionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ApplyPendingMaintenanceAction API operation for Amazon Relational Database Service. -// -// Applies a pending maintenance action to a resource (for example, to a DB -// instance). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ApplyPendingMaintenanceAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The specified resource ID was not found. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ApplyPendingMaintenanceAction -func (c *RDS) ApplyPendingMaintenanceAction(input *ApplyPendingMaintenanceActionInput) (*ApplyPendingMaintenanceActionOutput, error) { - req, out := c.ApplyPendingMaintenanceActionRequest(input) - return out, req.Send() -} - -// ApplyPendingMaintenanceActionWithContext is the same as ApplyPendingMaintenanceAction with the addition of -// the ability to pass a context and additional request options. -// -// See ApplyPendingMaintenanceAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ApplyPendingMaintenanceActionWithContext(ctx aws.Context, input *ApplyPendingMaintenanceActionInput, opts ...request.Option) (*ApplyPendingMaintenanceActionOutput, error) { - req, out := c.ApplyPendingMaintenanceActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAuthorizeDBSecurityGroupIngress = "AuthorizeDBSecurityGroupIngress" - -// AuthorizeDBSecurityGroupIngressRequest generates a "aws/request.Request" representing the -// client's request for the AuthorizeDBSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AuthorizeDBSecurityGroupIngress for more information on using the AuthorizeDBSecurityGroupIngress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AuthorizeDBSecurityGroupIngressRequest method. -// req, resp := client.AuthorizeDBSecurityGroupIngressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AuthorizeDBSecurityGroupIngress -func (c *RDS) AuthorizeDBSecurityGroupIngressRequest(input *AuthorizeDBSecurityGroupIngressInput) (req *request.Request, output *AuthorizeDBSecurityGroupIngressOutput) { - op := &request.Operation{ - Name: opAuthorizeDBSecurityGroupIngress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AuthorizeDBSecurityGroupIngressInput{} - } - - output = &AuthorizeDBSecurityGroupIngressOutput{} - req = c.newRequest(op, input, output) - return -} - -// AuthorizeDBSecurityGroupIngress API operation for Amazon Relational Database Service. -// -// Enables ingress to a DBSecurityGroup using one of two forms of authorization. -// First, EC2 or VPC security groups can be added to the DBSecurityGroup if -// the application using the database is running on EC2 or VPC instances. Second, -// IP ranges are available if the application accessing your database is running -// on the Internet. Required parameters for this API are one of CIDR range, -// EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId and either EC2SecurityGroupName -// or EC2SecurityGroupId for non-VPC). -// -// You can't authorize ingress from an EC2 security group in one AWS Region -// to an Amazon RDS DB instance in another. You can't authorize ingress from -// a VPC security group in one VPC to an Amazon RDS DB instance in another. -// -// For an overview of CIDR ranges, go to the Wikipedia Tutorial (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation AuthorizeDBSecurityGroupIngress for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName doesn't refer to an existing DB security group. -// -// * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group doesn't allow deletion. -// -// * ErrCodeAuthorizationAlreadyExistsFault "AuthorizationAlreadyExists" -// The specified CIDRIP or Amazon EC2 security group is already authorized for -// the specified DB security group. -// -// * ErrCodeAuthorizationQuotaExceededFault "AuthorizationQuotaExceeded" -// The DB security group authorization quota has been reached. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AuthorizeDBSecurityGroupIngress -func (c *RDS) AuthorizeDBSecurityGroupIngress(input *AuthorizeDBSecurityGroupIngressInput) (*AuthorizeDBSecurityGroupIngressOutput, error) { - req, out := c.AuthorizeDBSecurityGroupIngressRequest(input) - return out, req.Send() -} - -// AuthorizeDBSecurityGroupIngressWithContext is the same as AuthorizeDBSecurityGroupIngress with the addition of -// the ability to pass a context and additional request options. -// -// See AuthorizeDBSecurityGroupIngress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) AuthorizeDBSecurityGroupIngressWithContext(ctx aws.Context, input *AuthorizeDBSecurityGroupIngressInput, opts ...request.Option) (*AuthorizeDBSecurityGroupIngressOutput, error) { - req, out := c.AuthorizeDBSecurityGroupIngressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBacktrackDBCluster = "BacktrackDBCluster" - -// BacktrackDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the BacktrackDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BacktrackDBCluster for more information on using the BacktrackDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BacktrackDBClusterRequest method. -// req, resp := client.BacktrackDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/BacktrackDBCluster -func (c *RDS) BacktrackDBClusterRequest(input *BacktrackDBClusterInput) (req *request.Request, output *BacktrackDBClusterOutput) { - op := &request.Operation{ - Name: opBacktrackDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BacktrackDBClusterInput{} - } - - output = &BacktrackDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// BacktrackDBCluster API operation for Amazon Relational Database Service. -// -// Backtracks a DB cluster to a specific time, without creating a new DB cluster. -// -// For more information on backtracking, see Backtracking an Aurora DB Cluster -// (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Managing.Backtrack.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation BacktrackDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/BacktrackDBCluster -func (c *RDS) BacktrackDBCluster(input *BacktrackDBClusterInput) (*BacktrackDBClusterOutput, error) { - req, out := c.BacktrackDBClusterRequest(input) - return out, req.Send() -} - -// BacktrackDBClusterWithContext is the same as BacktrackDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See BacktrackDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) BacktrackDBClusterWithContext(ctx aws.Context, input *BacktrackDBClusterInput, opts ...request.Option) (*BacktrackDBClusterOutput, error) { - req, out := c.BacktrackDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyDBClusterParameterGroup = "CopyDBClusterParameterGroup" - -// CopyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the CopyDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyDBClusterParameterGroup for more information on using the CopyDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyDBClusterParameterGroupRequest method. -// req, resp := client.CopyDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBClusterParameterGroup -func (c *RDS) CopyDBClusterParameterGroupRequest(input *CopyDBClusterParameterGroupInput) (req *request.Request, output *CopyDBClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opCopyDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyDBClusterParameterGroupInput{} - } - - output = &CopyDBClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyDBClusterParameterGroup API operation for Amazon Relational Database Service. -// -// Copies the specified DB cluster parameter group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CopyDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB parameter -// groups. -// -// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" -// A DB parameter group with the same name exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBClusterParameterGroup -func (c *RDS) CopyDBClusterParameterGroup(input *CopyDBClusterParameterGroupInput) (*CopyDBClusterParameterGroupOutput, error) { - req, out := c.CopyDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// CopyDBClusterParameterGroupWithContext is the same as CopyDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CopyDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CopyDBClusterParameterGroupWithContext(ctx aws.Context, input *CopyDBClusterParameterGroupInput, opts ...request.Option) (*CopyDBClusterParameterGroupOutput, error) { - req, out := c.CopyDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyDBClusterSnapshot = "CopyDBClusterSnapshot" - -// CopyDBClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CopyDBClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyDBClusterSnapshot for more information on using the CopyDBClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyDBClusterSnapshotRequest method. -// req, resp := client.CopyDBClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBClusterSnapshot -func (c *RDS) CopyDBClusterSnapshotRequest(input *CopyDBClusterSnapshotInput) (req *request.Request, output *CopyDBClusterSnapshotOutput) { - op := &request.Operation{ - Name: opCopyDBClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyDBClusterSnapshotInput{} - } - - output = &CopyDBClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyDBClusterSnapshot API operation for Amazon Relational Database Service. -// -// Copies a snapshot of a DB cluster. -// -// To copy a DB cluster snapshot from a shared manual DB cluster snapshot, SourceDBClusterSnapshotIdentifier -// must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot. -// -// You can copy an encrypted DB cluster snapshot from another AWS Region. In -// that case, the AWS Region where you call the CopyDBClusterSnapshot action -// is the destination AWS Region for the encrypted DB cluster snapshot to be -// copied to. To copy an encrypted DB cluster snapshot from another AWS Region, -// you must provide the following values: -// -// * KmsKeyId - The AWS Key Management System (AWS KMS) key identifier for -// the key to use to encrypt the copy of the DB cluster snapshot in the destination -// AWS Region. -// -// * PreSignedUrl - A URL that contains a Signature Version 4 signed request -// for the CopyDBClusterSnapshot action to be called in the source AWS Region -// where the DB cluster snapshot is copied from. The pre-signed URL must -// be a valid request for the CopyDBClusterSnapshot API action that can be -// executed in the source AWS Region that contains the encrypted DB cluster -// snapshot to be copied. -// -// The pre-signed URL request must contain the following parameter values: -// -// KmsKeyId - The KMS key identifier for the key to use to encrypt the copy -// of the DB cluster snapshot in the destination AWS Region. This is the -// same identifier for both the CopyDBClusterSnapshot action that is called -// in the destination AWS Region, and the action contained in the pre-signed -// URL. -// -// DestinationRegion - The name of the AWS Region that the DB cluster snapshot -// will be created in. -// -// SourceDBClusterSnapshotIdentifier - The DB cluster snapshot identifier for -// the encrypted DB cluster snapshot to be copied. This identifier must be -// in the Amazon Resource Name (ARN) format for the source AWS Region. For -// example, if you are copying an encrypted DB cluster snapshot from the -// us-west-2 AWS Region, then your SourceDBClusterSnapshotIdentifier looks -// like the following example: arn:aws:rds:us-west-2:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20161115. -// -// To learn how to generate a Signature Version 4 signed request, see Authenticating -// Requests: Using Query Parameters (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) -// and Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). -// -// * TargetDBClusterSnapshotIdentifier - The identifier for the new copy -// of the DB cluster snapshot in the destination AWS Region. -// -// * SourceDBClusterSnapshotIdentifier - The DB cluster snapshot identifier -// for the encrypted DB cluster snapshot to be copied. This identifier must -// be in the ARN format for the source AWS Region and is the same value as -// the SourceDBClusterSnapshotIdentifier in the pre-signed URL. -// -// To cancel the copy operation once it is in progress, delete the target DB -// cluster snapshot identified by TargetDBClusterSnapshotIdentifier while that -// DB cluster snapshot is in "copying" status. -// -// For more information on copying encrypted DB cluster snapshots from one AWS -// Region to another, see Copying a Snapshot (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CopySnapshot.html) -// in the Amazon Aurora User Guide. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CopyDBClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// The user already has a DB cluster snapshot with the given identifier. -// -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value isn't a valid DB cluster snapshot state. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB snapshots. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred accessing an AWS KMS key. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBClusterSnapshot -func (c *RDS) CopyDBClusterSnapshot(input *CopyDBClusterSnapshotInput) (*CopyDBClusterSnapshotOutput, error) { - req, out := c.CopyDBClusterSnapshotRequest(input) - return out, req.Send() -} - -// CopyDBClusterSnapshotWithContext is the same as CopyDBClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CopyDBClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CopyDBClusterSnapshotWithContext(ctx aws.Context, input *CopyDBClusterSnapshotInput, opts ...request.Option) (*CopyDBClusterSnapshotOutput, error) { - req, out := c.CopyDBClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyDBParameterGroup = "CopyDBParameterGroup" - -// CopyDBParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the CopyDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyDBParameterGroup for more information on using the CopyDBParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyDBParameterGroupRequest method. -// req, resp := client.CopyDBParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBParameterGroup -func (c *RDS) CopyDBParameterGroupRequest(input *CopyDBParameterGroupInput) (req *request.Request, output *CopyDBParameterGroupOutput) { - op := &request.Operation{ - Name: opCopyDBParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyDBParameterGroupInput{} - } - - output = &CopyDBParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyDBParameterGroup API operation for Amazon Relational Database Service. -// -// Copies the specified DB parameter group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CopyDBParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" -// A DB parameter group with the same name exists. -// -// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB parameter -// groups. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBParameterGroup -func (c *RDS) CopyDBParameterGroup(input *CopyDBParameterGroupInput) (*CopyDBParameterGroupOutput, error) { - req, out := c.CopyDBParameterGroupRequest(input) - return out, req.Send() -} - -// CopyDBParameterGroupWithContext is the same as CopyDBParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CopyDBParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CopyDBParameterGroupWithContext(ctx aws.Context, input *CopyDBParameterGroupInput, opts ...request.Option) (*CopyDBParameterGroupOutput, error) { - req, out := c.CopyDBParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyDBSnapshot = "CopyDBSnapshot" - -// CopyDBSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CopyDBSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyDBSnapshot for more information on using the CopyDBSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyDBSnapshotRequest method. -// req, resp := client.CopyDBSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBSnapshot -func (c *RDS) CopyDBSnapshotRequest(input *CopyDBSnapshotInput) (req *request.Request, output *CopyDBSnapshotOutput) { - op := &request.Operation{ - Name: opCopyDBSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyDBSnapshotInput{} - } - - output = &CopyDBSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyDBSnapshot API operation for Amazon Relational Database Service. -// -// Copies the specified DB snapshot. The source DB snapshot must be in the "available" -// state. -// -// You can copy a snapshot from one AWS Region to another. In that case, the -// AWS Region where you call the CopyDBSnapshot action is the destination AWS -// Region for the DB snapshot copy. -// -// For more information about copying snapshots, see Copying a DB Snapshot (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CopyDBSnapshot.html) -// in the Amazon RDS User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CopyDBSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" -// DBSnapshotIdentifier is already used by an existing snapshot. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot doesn't allow deletion. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB snapshots. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred accessing an AWS KMS key. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBSnapshot -func (c *RDS) CopyDBSnapshot(input *CopyDBSnapshotInput) (*CopyDBSnapshotOutput, error) { - req, out := c.CopyDBSnapshotRequest(input) - return out, req.Send() -} - -// CopyDBSnapshotWithContext is the same as CopyDBSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CopyDBSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CopyDBSnapshotWithContext(ctx aws.Context, input *CopyDBSnapshotInput, opts ...request.Option) (*CopyDBSnapshotOutput, error) { - req, out := c.CopyDBSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyOptionGroup = "CopyOptionGroup" - -// CopyOptionGroupRequest generates a "aws/request.Request" representing the -// client's request for the CopyOptionGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyOptionGroup for more information on using the CopyOptionGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyOptionGroupRequest method. -// req, resp := client.CopyOptionGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyOptionGroup -func (c *RDS) CopyOptionGroupRequest(input *CopyOptionGroupInput) (req *request.Request, output *CopyOptionGroupOutput) { - op := &request.Operation{ - Name: opCopyOptionGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyOptionGroupInput{} - } - - output = &CopyOptionGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyOptionGroup API operation for Amazon Relational Database Service. -// -// Copies the specified option group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CopyOptionGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOptionGroupAlreadyExistsFault "OptionGroupAlreadyExistsFault" -// The option group you are trying to create already exists. -// -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// The specified option group could not be found. -// -// * ErrCodeOptionGroupQuotaExceededFault "OptionGroupQuotaExceededFault" -// The quota of 20 option groups was exceeded for this AWS account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyOptionGroup -func (c *RDS) CopyOptionGroup(input *CopyOptionGroupInput) (*CopyOptionGroupOutput, error) { - req, out := c.CopyOptionGroupRequest(input) - return out, req.Send() -} - -// CopyOptionGroupWithContext is the same as CopyOptionGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CopyOptionGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CopyOptionGroupWithContext(ctx aws.Context, input *CopyOptionGroupInput, opts ...request.Option) (*CopyOptionGroupOutput, error) { - req, out := c.CopyOptionGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBCluster = "CreateDBCluster" - -// CreateDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBCluster for more information on using the CreateDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBClusterRequest method. -// req, resp := client.CreateDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBCluster -func (c *RDS) CreateDBClusterRequest(input *CreateDBClusterInput) (req *request.Request, output *CreateDBClusterOutput) { - op := &request.Operation{ - Name: opCreateDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBClusterInput{} - } - - output = &CreateDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBCluster API operation for Amazon Relational Database Service. -// -// Creates a new Amazon Aurora DB cluster. -// -// You can use the ReplicationSourceIdentifier parameter to create the DB cluster -// as a Read Replica of another DB cluster or Amazon RDS MySQL DB instance. -// For cross-region replication where the DB cluster identified by ReplicationSourceIdentifier -// is encrypted, you must also specify the PreSignedUrl parameter. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CreateDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// The user already has a DB cluster with the given identifier. -// -// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You might -// be able to resolve this error by updating your subnet group to use different -// Availability Zones that have more storage available. -// -// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// The user attempted to create a new DB cluster and the user has already reached -// the maximum allowed DB cluster quota. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would result in the user exceeding the allowed amount of storage -// available across all DB instances. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it's created -// because of users' change. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it's in use. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter -// group. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred accessing an AWS KMS key. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeGlobalClusterNotFoundFault "GlobalClusterNotFoundFault" -// -// * ErrCodeInvalidGlobalClusterStateFault "InvalidGlobalClusterStateFault" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBCluster -func (c *RDS) CreateDBCluster(input *CreateDBClusterInput) (*CreateDBClusterOutput, error) { - req, out := c.CreateDBClusterRequest(input) - return out, req.Send() -} - -// CreateDBClusterWithContext is the same as CreateDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CreateDBClusterWithContext(ctx aws.Context, input *CreateDBClusterInput, opts ...request.Option) (*CreateDBClusterOutput, error) { - req, out := c.CreateDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBClusterEndpoint = "CreateDBClusterEndpoint" - -// CreateDBClusterEndpointRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBClusterEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBClusterEndpoint for more information on using the CreateDBClusterEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBClusterEndpointRequest method. -// req, resp := client.CreateDBClusterEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterEndpoint -func (c *RDS) CreateDBClusterEndpointRequest(input *CreateDBClusterEndpointInput) (req *request.Request, output *CreateDBClusterEndpointOutput) { - op := &request.Operation{ - Name: opCreateDBClusterEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBClusterEndpointInput{} - } - - output = &CreateDBClusterEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBClusterEndpoint API operation for Amazon Relational Database Service. -// -// Creates a new custom endpoint and associates it with an Amazon Aurora DB -// cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CreateDBClusterEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterEndpointQuotaExceededFault "DBClusterEndpointQuotaExceededFault" -// The cluster already has the maximum number of custom endpoints. -// -// * ErrCodeDBClusterEndpointAlreadyExistsFault "DBClusterEndpointAlreadyExistsFault" -// The specified custom endpoint can't be created because it already exists. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterEndpoint -func (c *RDS) CreateDBClusterEndpoint(input *CreateDBClusterEndpointInput) (*CreateDBClusterEndpointOutput, error) { - req, out := c.CreateDBClusterEndpointRequest(input) - return out, req.Send() -} - -// CreateDBClusterEndpointWithContext is the same as CreateDBClusterEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBClusterEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CreateDBClusterEndpointWithContext(ctx aws.Context, input *CreateDBClusterEndpointInput, opts ...request.Option) (*CreateDBClusterEndpointOutput, error) { - req, out := c.CreateDBClusterEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBClusterParameterGroup = "CreateDBClusterParameterGroup" - -// CreateDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBClusterParameterGroup for more information on using the CreateDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBClusterParameterGroupRequest method. -// req, resp := client.CreateDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterParameterGroup -func (c *RDS) CreateDBClusterParameterGroupRequest(input *CreateDBClusterParameterGroupInput) (req *request.Request, output *CreateDBClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opCreateDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBClusterParameterGroupInput{} - } - - output = &CreateDBClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBClusterParameterGroup API operation for Amazon Relational Database Service. -// -// Creates a new DB cluster parameter group. -// -// Parameters in a DB cluster parameter group apply to all of the instances -// in a DB cluster. -// -// A DB cluster parameter group is initially created with the default parameters -// for the database engine used by instances in the DB cluster. To provide custom -// values for any of the parameters, you must modify the group after creating -// it using ModifyDBClusterParameterGroup. Once you've created a DB cluster -// parameter group, you need to associate it with your DB cluster using ModifyDBCluster. -// When you associate a new DB cluster parameter group with a running DB cluster, -// you need to reboot the DB instances in the DB cluster without failover for -// the new DB cluster parameter group and associated settings to take effect. -// -// After you create a DB cluster parameter group, you should wait at least 5 -// minutes before creating your first DB cluster that uses that DB cluster parameter -// group as the default parameter group. This allows Amazon RDS to fully complete -// the create action before the DB cluster parameter group is used as the default -// for a new DB cluster. This is especially important for parameters that are -// critical when creating the default database for a DB cluster, such as the -// character set for the default database defined by the character_set_database -// parameter. You can use the Parameter Groups option of the Amazon RDS console -// (https://console.aws.amazon.com/rds/) or the DescribeDBClusterParameters -// command to verify that your DB cluster parameter group has been created or -// modified. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CreateDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB parameter -// groups. -// -// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" -// A DB parameter group with the same name exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterParameterGroup -func (c *RDS) CreateDBClusterParameterGroup(input *CreateDBClusterParameterGroupInput) (*CreateDBClusterParameterGroupOutput, error) { - req, out := c.CreateDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// CreateDBClusterParameterGroupWithContext is the same as CreateDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CreateDBClusterParameterGroupWithContext(ctx aws.Context, input *CreateDBClusterParameterGroupInput, opts ...request.Option) (*CreateDBClusterParameterGroupOutput, error) { - req, out := c.CreateDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBClusterSnapshot = "CreateDBClusterSnapshot" - -// CreateDBClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBClusterSnapshot for more information on using the CreateDBClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBClusterSnapshotRequest method. -// req, resp := client.CreateDBClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterSnapshot -func (c *RDS) CreateDBClusterSnapshotRequest(input *CreateDBClusterSnapshotInput) (req *request.Request, output *CreateDBClusterSnapshotOutput) { - op := &request.Operation{ - Name: opCreateDBClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBClusterSnapshotInput{} - } - - output = &CreateDBClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBClusterSnapshot API operation for Amazon Relational Database Service. -// -// Creates a snapshot of a DB cluster. For more information on Amazon Aurora, -// see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CreateDBClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// The user already has a DB cluster snapshot with the given identifier. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB snapshots. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value isn't a valid DB cluster snapshot state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterSnapshot -func (c *RDS) CreateDBClusterSnapshot(input *CreateDBClusterSnapshotInput) (*CreateDBClusterSnapshotOutput, error) { - req, out := c.CreateDBClusterSnapshotRequest(input) - return out, req.Send() -} - -// CreateDBClusterSnapshotWithContext is the same as CreateDBClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CreateDBClusterSnapshotWithContext(ctx aws.Context, input *CreateDBClusterSnapshotInput, opts ...request.Option) (*CreateDBClusterSnapshotOutput, error) { - req, out := c.CreateDBClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBInstance = "CreateDBInstance" - -// CreateDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBInstance for more information on using the CreateDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBInstanceRequest method. -// req, resp := client.CreateDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBInstance -func (c *RDS) CreateDBInstanceRequest(input *CreateDBInstanceInput) (req *request.Request, output *CreateDBInstanceOutput) { - op := &request.Operation{ - Name: opCreateDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBInstanceInput{} - } - - output = &CreateDBInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBInstance API operation for Amazon Relational Database Service. -// -// Creates a new DB instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CreateDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// The user already has a DB instance with the given identifier. -// -// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// The specified DB instance class isn't available in the specified Availability -// Zone. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName doesn't refer to an existing DB security group. -// -// * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB instances. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would result in the user exceeding the allowed amount of storage -// available across all DB instances. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it's created -// because of users' change. -// -// * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" -// Provisioned IOPS not available in the specified Availability Zone. -// -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// The specified option group could not be found. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// Storage of the StorageType specified can't be associated with the DB instance. -// -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// The specified CIDRIP or Amazon EC2 security group isn't authorized for the -// specified DB security group. -// -// RDS also may not be authorized by using IAM to perform necessary actions -// on your behalf. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred accessing an AWS KMS key. -// -// * ErrCodeDomainNotFoundFault "DomainNotFoundFault" -// Domain doesn't refer to an existing Active Directory domain. -// -// * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" -// The backup policy was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBInstance -func (c *RDS) CreateDBInstance(input *CreateDBInstanceInput) (*CreateDBInstanceOutput, error) { - req, out := c.CreateDBInstanceRequest(input) - return out, req.Send() -} - -// CreateDBInstanceWithContext is the same as CreateDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CreateDBInstanceWithContext(ctx aws.Context, input *CreateDBInstanceInput, opts ...request.Option) (*CreateDBInstanceOutput, error) { - req, out := c.CreateDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBInstanceReadReplica = "CreateDBInstanceReadReplica" - -// CreateDBInstanceReadReplicaRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBInstanceReadReplica operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBInstanceReadReplica for more information on using the CreateDBInstanceReadReplica -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBInstanceReadReplicaRequest method. -// req, resp := client.CreateDBInstanceReadReplicaRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBInstanceReadReplica -func (c *RDS) CreateDBInstanceReadReplicaRequest(input *CreateDBInstanceReadReplicaInput) (req *request.Request, output *CreateDBInstanceReadReplicaOutput) { - op := &request.Operation{ - Name: opCreateDBInstanceReadReplica, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBInstanceReadReplicaInput{} - } - - output = &CreateDBInstanceReadReplicaOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBInstanceReadReplica API operation for Amazon Relational Database Service. -// -// Creates a new DB instance that acts as a Read Replica for an existing source -// DB instance. You can create a Read Replica for a DB instance running MySQL, -// MariaDB, or PostgreSQL. For more information, see Working with PostgreSQL, -// MySQL, and MariaDB Read Replicas (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html) -// in the Amazon RDS User Guide. -// -// Amazon Aurora doesn't support this action. You must call the CreateDBInstance -// action to create a DB instance for an Aurora DB cluster. -// -// All Read Replica DB instances are created with backups disabled. All other -// DB instance attributes (including DB security groups and DB parameter groups) -// are inherited from the source DB instance, except as specified following. -// -// Your source DB instance must have backup retention enabled. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CreateDBInstanceReadReplica for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// The user already has a DB instance with the given identifier. -// -// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// The specified DB instance class isn't available in the specified Availability -// Zone. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName doesn't refer to an existing DB security group. -// -// * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB instances. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would result in the user exceeding the allowed amount of storage -// available across all DB instances. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it's created -// because of users' change. -// -// * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" -// Provisioned IOPS not available in the specified Availability Zone. -// -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// The specified option group could not be found. -// -// * ErrCodeDBSubnetGroupNotAllowedFault "DBSubnetGroupNotAllowedFault" -// The DBSubnetGroup shouldn't be specified while creating read replicas that -// lie in the same region as the source instance. -// -// * ErrCodeInvalidDBSubnetGroupFault "InvalidDBSubnetGroupFault" -// The DBSubnetGroup doesn't belong to the same VPC as that of an existing cross-region -// read replica of the same source instance. -// -// * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// Storage of the StorageType specified can't be associated with the DB instance. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred accessing an AWS KMS key. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBInstanceReadReplica -func (c *RDS) CreateDBInstanceReadReplica(input *CreateDBInstanceReadReplicaInput) (*CreateDBInstanceReadReplicaOutput, error) { - req, out := c.CreateDBInstanceReadReplicaRequest(input) - return out, req.Send() -} - -// CreateDBInstanceReadReplicaWithContext is the same as CreateDBInstanceReadReplica with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBInstanceReadReplica for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CreateDBInstanceReadReplicaWithContext(ctx aws.Context, input *CreateDBInstanceReadReplicaInput, opts ...request.Option) (*CreateDBInstanceReadReplicaOutput, error) { - req, out := c.CreateDBInstanceReadReplicaRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBParameterGroup = "CreateDBParameterGroup" - -// CreateDBParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBParameterGroup for more information on using the CreateDBParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBParameterGroupRequest method. -// req, resp := client.CreateDBParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBParameterGroup -func (c *RDS) CreateDBParameterGroupRequest(input *CreateDBParameterGroupInput) (req *request.Request, output *CreateDBParameterGroupOutput) { - op := &request.Operation{ - Name: opCreateDBParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBParameterGroupInput{} - } - - output = &CreateDBParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBParameterGroup API operation for Amazon Relational Database Service. -// -// Creates a new DB parameter group. -// -// A DB parameter group is initially created with the default parameters for -// the database engine used by the DB instance. To provide custom values for -// any of the parameters, you must modify the group after creating it using -// ModifyDBParameterGroup. Once you've created a DB parameter group, you need -// to associate it with your DB instance using ModifyDBInstance. When you associate -// a new DB parameter group with a running DB instance, you need to reboot the -// DB instance without failover for the new DB parameter group and associated -// settings to take effect. -// -// After you create a DB parameter group, you should wait at least 5 minutes -// before creating your first DB instance that uses that DB parameter group -// as the default parameter group. This allows Amazon RDS to fully complete -// the create action before the parameter group is used as the default for a -// new DB instance. This is especially important for parameters that are critical -// when creating the default database for a DB instance, such as the character -// set for the default database defined by the character_set_database parameter. -// You can use the Parameter Groups option of the Amazon RDS console (https://console.aws.amazon.com/rds/) -// or the DescribeDBParameters command to verify that your DB parameter group -// has been created or modified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CreateDBParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB parameter -// groups. -// -// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" -// A DB parameter group with the same name exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBParameterGroup -func (c *RDS) CreateDBParameterGroup(input *CreateDBParameterGroupInput) (*CreateDBParameterGroupOutput, error) { - req, out := c.CreateDBParameterGroupRequest(input) - return out, req.Send() -} - -// CreateDBParameterGroupWithContext is the same as CreateDBParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CreateDBParameterGroupWithContext(ctx aws.Context, input *CreateDBParameterGroupInput, opts ...request.Option) (*CreateDBParameterGroupOutput, error) { - req, out := c.CreateDBParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBSecurityGroup = "CreateDBSecurityGroup" - -// CreateDBSecurityGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBSecurityGroup for more information on using the CreateDBSecurityGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBSecurityGroupRequest method. -// req, resp := client.CreateDBSecurityGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSecurityGroup -func (c *RDS) CreateDBSecurityGroupRequest(input *CreateDBSecurityGroupInput) (req *request.Request, output *CreateDBSecurityGroupOutput) { - op := &request.Operation{ - Name: opCreateDBSecurityGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBSecurityGroupInput{} - } - - output = &CreateDBSecurityGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBSecurityGroup API operation for Amazon Relational Database Service. -// -// Creates a new DB security group. DB security groups control access to a DB -// instance. -// -// A DB security group controls access to EC2-Classic DB instances that are -// not in a VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CreateDBSecurityGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSecurityGroupAlreadyExistsFault "DBSecurityGroupAlreadyExists" -// A DB security group with the name specified in DBSecurityGroupName already -// exists. -// -// * ErrCodeDBSecurityGroupQuotaExceededFault "QuotaExceeded.DBSecurityGroup" -// The request would result in the user exceeding the allowed number of DB security -// groups. -// -// * ErrCodeDBSecurityGroupNotSupportedFault "DBSecurityGroupNotSupported" -// A DB security group isn't allowed for this action. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSecurityGroup -func (c *RDS) CreateDBSecurityGroup(input *CreateDBSecurityGroupInput) (*CreateDBSecurityGroupOutput, error) { - req, out := c.CreateDBSecurityGroupRequest(input) - return out, req.Send() -} - -// CreateDBSecurityGroupWithContext is the same as CreateDBSecurityGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBSecurityGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CreateDBSecurityGroupWithContext(ctx aws.Context, input *CreateDBSecurityGroupInput, opts ...request.Option) (*CreateDBSecurityGroupOutput, error) { - req, out := c.CreateDBSecurityGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBSnapshot = "CreateDBSnapshot" - -// CreateDBSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBSnapshot for more information on using the CreateDBSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBSnapshotRequest method. -// req, resp := client.CreateDBSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSnapshot -func (c *RDS) CreateDBSnapshotRequest(input *CreateDBSnapshotInput) (req *request.Request, output *CreateDBSnapshotOutput) { - op := &request.Operation{ - Name: opCreateDBSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBSnapshotInput{} - } - - output = &CreateDBSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBSnapshot API operation for Amazon Relational Database Service. -// -// Creates a DBSnapshot. The source DBInstance must be in "available" state. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CreateDBSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" -// DBSnapshotIdentifier is already used by an existing snapshot. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB snapshots. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSnapshot -func (c *RDS) CreateDBSnapshot(input *CreateDBSnapshotInput) (*CreateDBSnapshotOutput, error) { - req, out := c.CreateDBSnapshotRequest(input) - return out, req.Send() -} - -// CreateDBSnapshotWithContext is the same as CreateDBSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CreateDBSnapshotWithContext(ctx aws.Context, input *CreateDBSnapshotInput, opts ...request.Option) (*CreateDBSnapshotOutput, error) { - req, out := c.CreateDBSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDBSubnetGroup = "CreateDBSubnetGroup" - -// CreateDBSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateDBSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDBSubnetGroup for more information on using the CreateDBSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDBSubnetGroupRequest method. -// req, resp := client.CreateDBSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSubnetGroup -func (c *RDS) CreateDBSubnetGroupRequest(input *CreateDBSubnetGroupInput) (req *request.Request, output *CreateDBSubnetGroupOutput) { - op := &request.Operation{ - Name: opCreateDBSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDBSubnetGroupInput{} - } - - output = &CreateDBSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDBSubnetGroup API operation for Amazon Relational Database Service. -// -// Creates a new DB subnet group. DB subnet groups must contain at least one -// subnet in at least two AZs in the AWS Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CreateDBSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSubnetGroupAlreadyExistsFault "DBSubnetGroupAlreadyExists" -// DBSubnetGroupName is already used by an existing DB subnet group. -// -// * ErrCodeDBSubnetGroupQuotaExceededFault "DBSubnetGroupQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB subnet -// groups. -// -// * ErrCodeDBSubnetQuotaExceededFault "DBSubnetQuotaExceededFault" -// The request would result in the user exceeding the allowed number of subnets -// in a DB subnet groups. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSubnetGroup -func (c *RDS) CreateDBSubnetGroup(input *CreateDBSubnetGroupInput) (*CreateDBSubnetGroupOutput, error) { - req, out := c.CreateDBSubnetGroupRequest(input) - return out, req.Send() -} - -// CreateDBSubnetGroupWithContext is the same as CreateDBSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDBSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CreateDBSubnetGroupWithContext(ctx aws.Context, input *CreateDBSubnetGroupInput, opts ...request.Option) (*CreateDBSubnetGroupOutput, error) { - req, out := c.CreateDBSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateEventSubscription = "CreateEventSubscription" - -// CreateEventSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the CreateEventSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateEventSubscription for more information on using the CreateEventSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateEventSubscriptionRequest method. -// req, resp := client.CreateEventSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateEventSubscription -func (c *RDS) CreateEventSubscriptionRequest(input *CreateEventSubscriptionInput) (req *request.Request, output *CreateEventSubscriptionOutput) { - op := &request.Operation{ - Name: opCreateEventSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateEventSubscriptionInput{} - } - - output = &CreateEventSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateEventSubscription API operation for Amazon Relational Database Service. -// -// Creates an RDS event notification subscription. This action requires a topic -// ARN (Amazon Resource Name) created by either the RDS console, the SNS console, -// or the SNS API. To obtain an ARN with SNS, you must create a topic in Amazon -// SNS and subscribe to the topic. The ARN is displayed in the SNS console. -// -// You can specify the type of source (SourceType) you want to be notified of, -// provide a list of RDS sources (SourceIds) that triggers the events, and provide -// a list of event categories (EventCategories) for events you want to be notified -// of. For example, you can specify SourceType = db-instance, SourceIds = mydbinstance1, -// mydbinstance2 and EventCategories = Availability, Backup. -// -// If you specify both the SourceType and SourceIds, such as SourceType = db-instance -// and SourceIdentifier = myDBInstance1, you are notified of all the db-instance -// events for the specified source. If you specify a SourceType but do not specify -// a SourceIdentifier, you receive notice of the events for that source type -// for all your RDS sources. If you do not specify either the SourceType nor -// the SourceIdentifier, you are notified of events generated from all RDS sources -// belonging to your customer account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CreateEventSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEventSubscriptionQuotaExceededFault "EventSubscriptionQuotaExceeded" -// You have reached the maximum number of event subscriptions. -// -// * ErrCodeSubscriptionAlreadyExistFault "SubscriptionAlreadyExist" -// The supplied subscription name already exists. -// -// * ErrCodeSNSInvalidTopicFault "SNSInvalidTopic" -// SNS has responded that there is a problem with the SND topic specified. -// -// * ErrCodeSNSNoAuthorizationFault "SNSNoAuthorization" -// You do not have permission to publish to the SNS topic ARN. -// -// * ErrCodeSNSTopicArnNotFoundFault "SNSTopicArnNotFound" -// The SNS topic ARN does not exist. -// -// * ErrCodeSubscriptionCategoryNotFoundFault "SubscriptionCategoryNotFound" -// The supplied category does not exist. -// -// * ErrCodeSourceNotFoundFault "SourceNotFound" -// The requested source could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateEventSubscription -func (c *RDS) CreateEventSubscription(input *CreateEventSubscriptionInput) (*CreateEventSubscriptionOutput, error) { - req, out := c.CreateEventSubscriptionRequest(input) - return out, req.Send() -} - -// CreateEventSubscriptionWithContext is the same as CreateEventSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See CreateEventSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CreateEventSubscriptionWithContext(ctx aws.Context, input *CreateEventSubscriptionInput, opts ...request.Option) (*CreateEventSubscriptionOutput, error) { - req, out := c.CreateEventSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateGlobalCluster = "CreateGlobalCluster" - -// CreateGlobalClusterRequest generates a "aws/request.Request" representing the -// client's request for the CreateGlobalCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateGlobalCluster for more information on using the CreateGlobalCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateGlobalClusterRequest method. -// req, resp := client.CreateGlobalClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateGlobalCluster -func (c *RDS) CreateGlobalClusterRequest(input *CreateGlobalClusterInput) (req *request.Request, output *CreateGlobalClusterOutput) { - op := &request.Operation{ - Name: opCreateGlobalCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateGlobalClusterInput{} - } - - output = &CreateGlobalClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateGlobalCluster API operation for Amazon Relational Database Service. -// -// Creates an Aurora global database spread across multiple regions. The global -// database contains a single primary cluster with read-write capability, and -// a read-only secondary cluster that receives data from the primary cluster -// through high-speed replication performed by the Aurora storage subsystem. -// -// You can create a global database that is initially empty, and then add a -// primary cluster and a secondary cluster to it. Or you can specify an existing -// Aurora cluster during the create operation, and this cluster becomes the -// primary cluster of the global database. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CreateGlobalCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeGlobalClusterAlreadyExistsFault "GlobalClusterAlreadyExistsFault" -// -// * ErrCodeGlobalClusterQuotaExceededFault "GlobalClusterQuotaExceededFault" -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateGlobalCluster -func (c *RDS) CreateGlobalCluster(input *CreateGlobalClusterInput) (*CreateGlobalClusterOutput, error) { - req, out := c.CreateGlobalClusterRequest(input) - return out, req.Send() -} - -// CreateGlobalClusterWithContext is the same as CreateGlobalCluster with the addition of -// the ability to pass a context and additional request options. -// -// See CreateGlobalCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CreateGlobalClusterWithContext(ctx aws.Context, input *CreateGlobalClusterInput, opts ...request.Option) (*CreateGlobalClusterOutput, error) { - req, out := c.CreateGlobalClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateOptionGroup = "CreateOptionGroup" - -// CreateOptionGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateOptionGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateOptionGroup for more information on using the CreateOptionGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateOptionGroupRequest method. -// req, resp := client.CreateOptionGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateOptionGroup -func (c *RDS) CreateOptionGroupRequest(input *CreateOptionGroupInput) (req *request.Request, output *CreateOptionGroupOutput) { - op := &request.Operation{ - Name: opCreateOptionGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateOptionGroupInput{} - } - - output = &CreateOptionGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateOptionGroup API operation for Amazon Relational Database Service. -// -// Creates a new option group. You can create up to 20 option groups. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation CreateOptionGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOptionGroupAlreadyExistsFault "OptionGroupAlreadyExistsFault" -// The option group you are trying to create already exists. -// -// * ErrCodeOptionGroupQuotaExceededFault "OptionGroupQuotaExceededFault" -// The quota of 20 option groups was exceeded for this AWS account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateOptionGroup -func (c *RDS) CreateOptionGroup(input *CreateOptionGroupInput) (*CreateOptionGroupOutput, error) { - req, out := c.CreateOptionGroupRequest(input) - return out, req.Send() -} - -// CreateOptionGroupWithContext is the same as CreateOptionGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateOptionGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) CreateOptionGroupWithContext(ctx aws.Context, input *CreateOptionGroupInput, opts ...request.Option) (*CreateOptionGroupOutput, error) { - req, out := c.CreateOptionGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBCluster = "DeleteDBCluster" - -// DeleteDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBCluster for more information on using the DeleteDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBClusterRequest method. -// req, resp := client.DeleteDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBCluster -func (c *RDS) DeleteDBClusterRequest(input *DeleteDBClusterInput) (req *request.Request, output *DeleteDBClusterOutput) { - op := &request.Operation{ - Name: opDeleteDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBClusterInput{} - } - - output = &DeleteDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDBCluster API operation for Amazon Relational Database Service. -// -// The DeleteDBCluster action deletes a previously provisioned DB cluster. When -// you delete a DB cluster, all automated backups for that DB cluster are deleted -// and can't be recovered. Manual DB cluster snapshots of the specified DB cluster -// are not deleted. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DeleteDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// The user already has a DB cluster snapshot with the given identifier. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB snapshots. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value isn't a valid DB cluster snapshot state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBCluster -func (c *RDS) DeleteDBCluster(input *DeleteDBClusterInput) (*DeleteDBClusterOutput, error) { - req, out := c.DeleteDBClusterRequest(input) - return out, req.Send() -} - -// DeleteDBClusterWithContext is the same as DeleteDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DeleteDBClusterWithContext(ctx aws.Context, input *DeleteDBClusterInput, opts ...request.Option) (*DeleteDBClusterOutput, error) { - req, out := c.DeleteDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBClusterEndpoint = "DeleteDBClusterEndpoint" - -// DeleteDBClusterEndpointRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBClusterEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBClusterEndpoint for more information on using the DeleteDBClusterEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBClusterEndpointRequest method. -// req, resp := client.DeleteDBClusterEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterEndpoint -func (c *RDS) DeleteDBClusterEndpointRequest(input *DeleteDBClusterEndpointInput) (req *request.Request, output *DeleteDBClusterEndpointOutput) { - op := &request.Operation{ - Name: opDeleteDBClusterEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBClusterEndpointInput{} - } - - output = &DeleteDBClusterEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDBClusterEndpoint API operation for Amazon Relational Database Service. -// -// Deletes a custom endpoint and removes it from an Amazon Aurora DB cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DeleteDBClusterEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBClusterEndpointStateFault "InvalidDBClusterEndpointStateFault" -// The requested operation can't be performed on the endpoint while the endpoint -// is in this state. -// -// * ErrCodeDBClusterEndpointNotFoundFault "DBClusterEndpointNotFoundFault" -// The specified custom endpoint doesn't exist. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterEndpoint -func (c *RDS) DeleteDBClusterEndpoint(input *DeleteDBClusterEndpointInput) (*DeleteDBClusterEndpointOutput, error) { - req, out := c.DeleteDBClusterEndpointRequest(input) - return out, req.Send() -} - -// DeleteDBClusterEndpointWithContext is the same as DeleteDBClusterEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBClusterEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DeleteDBClusterEndpointWithContext(ctx aws.Context, input *DeleteDBClusterEndpointInput, opts ...request.Option) (*DeleteDBClusterEndpointOutput, error) { - req, out := c.DeleteDBClusterEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBClusterParameterGroup = "DeleteDBClusterParameterGroup" - -// DeleteDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBClusterParameterGroup for more information on using the DeleteDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBClusterParameterGroupRequest method. -// req, resp := client.DeleteDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterParameterGroup -func (c *RDS) DeleteDBClusterParameterGroupRequest(input *DeleteDBClusterParameterGroupInput) (req *request.Request, output *DeleteDBClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opDeleteDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBClusterParameterGroupInput{} - } - - output = &DeleteDBClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDBClusterParameterGroup API operation for Amazon Relational Database Service. -// -// Deletes a specified DB cluster parameter group. The DB cluster parameter -// group to be deleted can't be associated with any DB clusters. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DeleteDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you can't delete it when the parameter group -// is in this state. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterParameterGroup -func (c *RDS) DeleteDBClusterParameterGroup(input *DeleteDBClusterParameterGroupInput) (*DeleteDBClusterParameterGroupOutput, error) { - req, out := c.DeleteDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// DeleteDBClusterParameterGroupWithContext is the same as DeleteDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DeleteDBClusterParameterGroupWithContext(ctx aws.Context, input *DeleteDBClusterParameterGroupInput, opts ...request.Option) (*DeleteDBClusterParameterGroupOutput, error) { - req, out := c.DeleteDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBClusterSnapshot = "DeleteDBClusterSnapshot" - -// DeleteDBClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBClusterSnapshot for more information on using the DeleteDBClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBClusterSnapshotRequest method. -// req, resp := client.DeleteDBClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterSnapshot -func (c *RDS) DeleteDBClusterSnapshotRequest(input *DeleteDBClusterSnapshotInput) (req *request.Request, output *DeleteDBClusterSnapshotOutput) { - op := &request.Operation{ - Name: opDeleteDBClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBClusterSnapshotInput{} - } - - output = &DeleteDBClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDBClusterSnapshot API operation for Amazon Relational Database Service. -// -// Deletes a DB cluster snapshot. If the snapshot is being copied, the copy -// operation is terminated. -// -// The DB cluster snapshot must be in the available state to be deleted. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DeleteDBClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value isn't a valid DB cluster snapshot state. -// -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterSnapshot -func (c *RDS) DeleteDBClusterSnapshot(input *DeleteDBClusterSnapshotInput) (*DeleteDBClusterSnapshotOutput, error) { - req, out := c.DeleteDBClusterSnapshotRequest(input) - return out, req.Send() -} - -// DeleteDBClusterSnapshotWithContext is the same as DeleteDBClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DeleteDBClusterSnapshotWithContext(ctx aws.Context, input *DeleteDBClusterSnapshotInput, opts ...request.Option) (*DeleteDBClusterSnapshotOutput, error) { - req, out := c.DeleteDBClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBInstance = "DeleteDBInstance" - -// DeleteDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBInstance for more information on using the DeleteDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBInstanceRequest method. -// req, resp := client.DeleteDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBInstance -func (c *RDS) DeleteDBInstanceRequest(input *DeleteDBInstanceInput) (req *request.Request, output *DeleteDBInstanceOutput) { - op := &request.Operation{ - Name: opDeleteDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBInstanceInput{} - } - - output = &DeleteDBInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDBInstance API operation for Amazon Relational Database Service. -// -// The DeleteDBInstance action deletes a previously provisioned DB instance. -// When you delete a DB instance, all automated backups for that instance are -// deleted and can't be recovered. Manual DB snapshots of the DB instance to -// be deleted by DeleteDBInstance are not deleted. -// -// If you request a final DB snapshot the status of the Amazon RDS DB instance -// is deleting until the DB snapshot is created. The API action DescribeDBInstance -// is used to monitor the status of this operation. The action can't be canceled -// or reverted once submitted. -// -// Note that when a DB instance is in a failure state and has a status of failed, -// incompatible-restore, or incompatible-network, you can only delete it when -// the SkipFinalSnapshot parameter is set to true. -// -// If the specified DB instance is part of an Amazon Aurora DB cluster, you -// can't delete the DB instance if both of the following conditions are true: -// -// * The DB cluster is a Read Replica of another Amazon Aurora DB cluster. -// -// * The DB instance is the only instance in the DB cluster. -// -// To delete a DB instance in this case, first call the PromoteReadReplicaDBCluster -// API action to promote the DB cluster so it's no longer a Read Replica. After -// the promotion completes, then call the DeleteDBInstance API action to delete -// the final instance in the DB cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DeleteDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" -// DBSnapshotIdentifier is already used by an existing snapshot. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB snapshots. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeDBInstanceAutomatedBackupQuotaExceededFault "DBInstanceAutomatedBackupQuotaExceeded" -// The quota for retained automated backups was exceeded. This prevents you -// from retaining any additional automated backups. The retained automated backups -// quota is the same as your DB Instance quota. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBInstance -func (c *RDS) DeleteDBInstance(input *DeleteDBInstanceInput) (*DeleteDBInstanceOutput, error) { - req, out := c.DeleteDBInstanceRequest(input) - return out, req.Send() -} - -// DeleteDBInstanceWithContext is the same as DeleteDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DeleteDBInstanceWithContext(ctx aws.Context, input *DeleteDBInstanceInput, opts ...request.Option) (*DeleteDBInstanceOutput, error) { - req, out := c.DeleteDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBInstanceAutomatedBackup = "DeleteDBInstanceAutomatedBackup" - -// DeleteDBInstanceAutomatedBackupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBInstanceAutomatedBackup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBInstanceAutomatedBackup for more information on using the DeleteDBInstanceAutomatedBackup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBInstanceAutomatedBackupRequest method. -// req, resp := client.DeleteDBInstanceAutomatedBackupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBInstanceAutomatedBackup -func (c *RDS) DeleteDBInstanceAutomatedBackupRequest(input *DeleteDBInstanceAutomatedBackupInput) (req *request.Request, output *DeleteDBInstanceAutomatedBackupOutput) { - op := &request.Operation{ - Name: opDeleteDBInstanceAutomatedBackup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBInstanceAutomatedBackupInput{} - } - - output = &DeleteDBInstanceAutomatedBackupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDBInstanceAutomatedBackup API operation for Amazon Relational Database Service. -// -// Deletes automated backups based on the source instance's DbiResourceId value -// or the restorable instance's resource ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DeleteDBInstanceAutomatedBackup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBInstanceAutomatedBackupStateFault "InvalidDBInstanceAutomatedBackupState" -// The automated backup is in an invalid state. For example, this automated -// backup is associated with an active instance. -// -// * ErrCodeDBInstanceAutomatedBackupNotFoundFault "DBInstanceAutomatedBackupNotFound" -// No automated backup for this DB instance was found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBInstanceAutomatedBackup -func (c *RDS) DeleteDBInstanceAutomatedBackup(input *DeleteDBInstanceAutomatedBackupInput) (*DeleteDBInstanceAutomatedBackupOutput, error) { - req, out := c.DeleteDBInstanceAutomatedBackupRequest(input) - return out, req.Send() -} - -// DeleteDBInstanceAutomatedBackupWithContext is the same as DeleteDBInstanceAutomatedBackup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBInstanceAutomatedBackup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DeleteDBInstanceAutomatedBackupWithContext(ctx aws.Context, input *DeleteDBInstanceAutomatedBackupInput, opts ...request.Option) (*DeleteDBInstanceAutomatedBackupOutput, error) { - req, out := c.DeleteDBInstanceAutomatedBackupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBParameterGroup = "DeleteDBParameterGroup" - -// DeleteDBParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBParameterGroup for more information on using the DeleteDBParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBParameterGroupRequest method. -// req, resp := client.DeleteDBParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBParameterGroup -func (c *RDS) DeleteDBParameterGroupRequest(input *DeleteDBParameterGroupInput) (req *request.Request, output *DeleteDBParameterGroupOutput) { - op := &request.Operation{ - Name: opDeleteDBParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBParameterGroupInput{} - } - - output = &DeleteDBParameterGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDBParameterGroup API operation for Amazon Relational Database Service. -// -// Deletes a specified DB parameter group. The DB parameter group to be deleted -// can't be associated with any DB instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DeleteDBParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you can't delete it when the parameter group -// is in this state. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBParameterGroup -func (c *RDS) DeleteDBParameterGroup(input *DeleteDBParameterGroupInput) (*DeleteDBParameterGroupOutput, error) { - req, out := c.DeleteDBParameterGroupRequest(input) - return out, req.Send() -} - -// DeleteDBParameterGroupWithContext is the same as DeleteDBParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DeleteDBParameterGroupWithContext(ctx aws.Context, input *DeleteDBParameterGroupInput, opts ...request.Option) (*DeleteDBParameterGroupOutput, error) { - req, out := c.DeleteDBParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBSecurityGroup = "DeleteDBSecurityGroup" - -// DeleteDBSecurityGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBSecurityGroup for more information on using the DeleteDBSecurityGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBSecurityGroupRequest method. -// req, resp := client.DeleteDBSecurityGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSecurityGroup -func (c *RDS) DeleteDBSecurityGroupRequest(input *DeleteDBSecurityGroupInput) (req *request.Request, output *DeleteDBSecurityGroupOutput) { - op := &request.Operation{ - Name: opDeleteDBSecurityGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBSecurityGroupInput{} - } - - output = &DeleteDBSecurityGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDBSecurityGroup API operation for Amazon Relational Database Service. -// -// Deletes a DB security group. -// -// The specified DB security group must not be associated with any DB instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DeleteDBSecurityGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group doesn't allow deletion. -// -// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName doesn't refer to an existing DB security group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSecurityGroup -func (c *RDS) DeleteDBSecurityGroup(input *DeleteDBSecurityGroupInput) (*DeleteDBSecurityGroupOutput, error) { - req, out := c.DeleteDBSecurityGroupRequest(input) - return out, req.Send() -} - -// DeleteDBSecurityGroupWithContext is the same as DeleteDBSecurityGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBSecurityGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DeleteDBSecurityGroupWithContext(ctx aws.Context, input *DeleteDBSecurityGroupInput, opts ...request.Option) (*DeleteDBSecurityGroupOutput, error) { - req, out := c.DeleteDBSecurityGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBSnapshot = "DeleteDBSnapshot" - -// DeleteDBSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBSnapshot for more information on using the DeleteDBSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBSnapshotRequest method. -// req, resp := client.DeleteDBSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSnapshot -func (c *RDS) DeleteDBSnapshotRequest(input *DeleteDBSnapshotInput) (req *request.Request, output *DeleteDBSnapshotOutput) { - op := &request.Operation{ - Name: opDeleteDBSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBSnapshotInput{} - } - - output = &DeleteDBSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteDBSnapshot API operation for Amazon Relational Database Service. -// -// Deletes a DB snapshot. If the snapshot is being copied, the copy operation -// is terminated. -// -// The DB snapshot must be in the available state to be deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DeleteDBSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot doesn't allow deletion. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSnapshot -func (c *RDS) DeleteDBSnapshot(input *DeleteDBSnapshotInput) (*DeleteDBSnapshotOutput, error) { - req, out := c.DeleteDBSnapshotRequest(input) - return out, req.Send() -} - -// DeleteDBSnapshotWithContext is the same as DeleteDBSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DeleteDBSnapshotWithContext(ctx aws.Context, input *DeleteDBSnapshotInput, opts ...request.Option) (*DeleteDBSnapshotOutput, error) { - req, out := c.DeleteDBSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDBSubnetGroup = "DeleteDBSubnetGroup" - -// DeleteDBSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDBSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDBSubnetGroup for more information on using the DeleteDBSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDBSubnetGroupRequest method. -// req, resp := client.DeleteDBSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSubnetGroup -func (c *RDS) DeleteDBSubnetGroupRequest(input *DeleteDBSubnetGroupInput) (req *request.Request, output *DeleteDBSubnetGroupOutput) { - op := &request.Operation{ - Name: opDeleteDBSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDBSubnetGroupInput{} - } - - output = &DeleteDBSubnetGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDBSubnetGroup API operation for Amazon Relational Database Service. -// -// Deletes a DB subnet group. -// -// The specified database subnet group must not be associated with any DB instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DeleteDBSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it's in use. -// -// * ErrCodeInvalidDBSubnetStateFault "InvalidDBSubnetStateFault" -// The DB subnet isn't in the available state. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSubnetGroup -func (c *RDS) DeleteDBSubnetGroup(input *DeleteDBSubnetGroupInput) (*DeleteDBSubnetGroupOutput, error) { - req, out := c.DeleteDBSubnetGroupRequest(input) - return out, req.Send() -} - -// DeleteDBSubnetGroupWithContext is the same as DeleteDBSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDBSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DeleteDBSubnetGroupWithContext(ctx aws.Context, input *DeleteDBSubnetGroupInput, opts ...request.Option) (*DeleteDBSubnetGroupOutput, error) { - req, out := c.DeleteDBSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEventSubscription = "DeleteEventSubscription" - -// DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEventSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEventSubscription for more information on using the DeleteEventSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEventSubscriptionRequest method. -// req, resp := client.DeleteEventSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteEventSubscription -func (c *RDS) DeleteEventSubscriptionRequest(input *DeleteEventSubscriptionInput) (req *request.Request, output *DeleteEventSubscriptionOutput) { - op := &request.Operation{ - Name: opDeleteEventSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteEventSubscriptionInput{} - } - - output = &DeleteEventSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteEventSubscription API operation for Amazon Relational Database Service. -// -// Deletes an RDS event notification subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DeleteEventSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" -// The subscription name does not exist. -// -// * ErrCodeInvalidEventSubscriptionStateFault "InvalidEventSubscriptionState" -// This error can occur if someone else is modifying a subscription. You should -// retry the action. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteEventSubscription -func (c *RDS) DeleteEventSubscription(input *DeleteEventSubscriptionInput) (*DeleteEventSubscriptionOutput, error) { - req, out := c.DeleteEventSubscriptionRequest(input) - return out, req.Send() -} - -// DeleteEventSubscriptionWithContext is the same as DeleteEventSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEventSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DeleteEventSubscriptionWithContext(ctx aws.Context, input *DeleteEventSubscriptionInput, opts ...request.Option) (*DeleteEventSubscriptionOutput, error) { - req, out := c.DeleteEventSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteGlobalCluster = "DeleteGlobalCluster" - -// DeleteGlobalClusterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteGlobalCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteGlobalCluster for more information on using the DeleteGlobalCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteGlobalClusterRequest method. -// req, resp := client.DeleteGlobalClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteGlobalCluster -func (c *RDS) DeleteGlobalClusterRequest(input *DeleteGlobalClusterInput) (req *request.Request, output *DeleteGlobalClusterOutput) { - op := &request.Operation{ - Name: opDeleteGlobalCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteGlobalClusterInput{} - } - - output = &DeleteGlobalClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteGlobalCluster API operation for Amazon Relational Database Service. -// -// Deletes a global database cluster. The primary and secondary clusters must -// already be detached or destroyed first. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DeleteGlobalCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeGlobalClusterNotFoundFault "GlobalClusterNotFoundFault" -// -// * ErrCodeInvalidGlobalClusterStateFault "InvalidGlobalClusterStateFault" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteGlobalCluster -func (c *RDS) DeleteGlobalCluster(input *DeleteGlobalClusterInput) (*DeleteGlobalClusterOutput, error) { - req, out := c.DeleteGlobalClusterRequest(input) - return out, req.Send() -} - -// DeleteGlobalClusterWithContext is the same as DeleteGlobalCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteGlobalCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DeleteGlobalClusterWithContext(ctx aws.Context, input *DeleteGlobalClusterInput, opts ...request.Option) (*DeleteGlobalClusterOutput, error) { - req, out := c.DeleteGlobalClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteOptionGroup = "DeleteOptionGroup" - -// DeleteOptionGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteOptionGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteOptionGroup for more information on using the DeleteOptionGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteOptionGroupRequest method. -// req, resp := client.DeleteOptionGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteOptionGroup -func (c *RDS) DeleteOptionGroupRequest(input *DeleteOptionGroupInput) (req *request.Request, output *DeleteOptionGroupOutput) { - op := &request.Operation{ - Name: opDeleteOptionGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteOptionGroupInput{} - } - - output = &DeleteOptionGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteOptionGroup API operation for Amazon Relational Database Service. -// -// Deletes an existing option group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DeleteOptionGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// The specified option group could not be found. -// -// * ErrCodeInvalidOptionGroupStateFault "InvalidOptionGroupStateFault" -// The option group isn't in the available state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteOptionGroup -func (c *RDS) DeleteOptionGroup(input *DeleteOptionGroupInput) (*DeleteOptionGroupOutput, error) { - req, out := c.DeleteOptionGroupRequest(input) - return out, req.Send() -} - -// DeleteOptionGroupWithContext is the same as DeleteOptionGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteOptionGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DeleteOptionGroupWithContext(ctx aws.Context, input *DeleteOptionGroupInput, opts ...request.Option) (*DeleteOptionGroupOutput, error) { - req, out := c.DeleteOptionGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccountAttributes = "DescribeAccountAttributes" - -// DescribeAccountAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccountAttributes for more information on using the DescribeAccountAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAccountAttributesRequest method. -// req, resp := client.DescribeAccountAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeAccountAttributes -func (c *RDS) DescribeAccountAttributesRequest(input *DescribeAccountAttributesInput) (req *request.Request, output *DescribeAccountAttributesOutput) { - op := &request.Operation{ - Name: opDescribeAccountAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAccountAttributesInput{} - } - - output = &DescribeAccountAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccountAttributes API operation for Amazon Relational Database Service. -// -// Lists all of the attributes for a customer account. The attributes include -// Amazon RDS quotas for the account, such as the number of DB instances allowed. -// The description for a quota includes the quota name, current usage toward -// that quota, and the quota's maximum value. -// -// This command doesn't take any parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeAccountAttributes for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeAccountAttributes -func (c *RDS) DescribeAccountAttributes(input *DescribeAccountAttributesInput) (*DescribeAccountAttributesOutput, error) { - req, out := c.DescribeAccountAttributesRequest(input) - return out, req.Send() -} - -// DescribeAccountAttributesWithContext is the same as DescribeAccountAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeAccountAttributesWithContext(ctx aws.Context, input *DescribeAccountAttributesInput, opts ...request.Option) (*DescribeAccountAttributesOutput, error) { - req, out := c.DescribeAccountAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCertificates = "DescribeCertificates" - -// DescribeCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCertificates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCertificates for more information on using the DescribeCertificates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCertificatesRequest method. -// req, resp := client.DescribeCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeCertificates -func (c *RDS) DescribeCertificatesRequest(input *DescribeCertificatesInput) (req *request.Request, output *DescribeCertificatesOutput) { - op := &request.Operation{ - Name: opDescribeCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCertificatesInput{} - } - - output = &DescribeCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCertificates API operation for Amazon Relational Database Service. -// -// Lists the set of CA certificates provided by Amazon RDS for this AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeCertificates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCertificateNotFoundFault "CertificateNotFound" -// CertificateIdentifier doesn't refer to an existing certificate. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeCertificates -func (c *RDS) DescribeCertificates(input *DescribeCertificatesInput) (*DescribeCertificatesOutput, error) { - req, out := c.DescribeCertificatesRequest(input) - return out, req.Send() -} - -// DescribeCertificatesWithContext is the same as DescribeCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCertificates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeCertificatesWithContext(ctx aws.Context, input *DescribeCertificatesInput, opts ...request.Option) (*DescribeCertificatesOutput, error) { - req, out := c.DescribeCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusterBacktracks = "DescribeDBClusterBacktracks" - -// DescribeDBClusterBacktracksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusterBacktracks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusterBacktracks for more information on using the DescribeDBClusterBacktracks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClusterBacktracksRequest method. -// req, resp := client.DescribeDBClusterBacktracksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterBacktracks -func (c *RDS) DescribeDBClusterBacktracksRequest(input *DescribeDBClusterBacktracksInput) (req *request.Request, output *DescribeDBClusterBacktracksOutput) { - op := &request.Operation{ - Name: opDescribeDBClusterBacktracks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClusterBacktracksInput{} - } - - output = &DescribeDBClusterBacktracksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusterBacktracks API operation for Amazon Relational Database Service. -// -// Returns information about backtracks for a DB cluster. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBClusterBacktracks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeDBClusterBacktrackNotFoundFault "DBClusterBacktrackNotFoundFault" -// BacktrackIdentifier doesn't refer to an existing backtrack. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterBacktracks -func (c *RDS) DescribeDBClusterBacktracks(input *DescribeDBClusterBacktracksInput) (*DescribeDBClusterBacktracksOutput, error) { - req, out := c.DescribeDBClusterBacktracksRequest(input) - return out, req.Send() -} - -// DescribeDBClusterBacktracksWithContext is the same as DescribeDBClusterBacktracks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusterBacktracks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBClusterBacktracksWithContext(ctx aws.Context, input *DescribeDBClusterBacktracksInput, opts ...request.Option) (*DescribeDBClusterBacktracksOutput, error) { - req, out := c.DescribeDBClusterBacktracksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusterEndpoints = "DescribeDBClusterEndpoints" - -// DescribeDBClusterEndpointsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusterEndpoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusterEndpoints for more information on using the DescribeDBClusterEndpoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClusterEndpointsRequest method. -// req, resp := client.DescribeDBClusterEndpointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterEndpoints -func (c *RDS) DescribeDBClusterEndpointsRequest(input *DescribeDBClusterEndpointsInput) (req *request.Request, output *DescribeDBClusterEndpointsOutput) { - op := &request.Operation{ - Name: opDescribeDBClusterEndpoints, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClusterEndpointsInput{} - } - - output = &DescribeDBClusterEndpointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusterEndpoints API operation for Amazon Relational Database Service. -// -// Returns information about endpoints for an Amazon Aurora DB cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBClusterEndpoints for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterEndpoints -func (c *RDS) DescribeDBClusterEndpoints(input *DescribeDBClusterEndpointsInput) (*DescribeDBClusterEndpointsOutput, error) { - req, out := c.DescribeDBClusterEndpointsRequest(input) - return out, req.Send() -} - -// DescribeDBClusterEndpointsWithContext is the same as DescribeDBClusterEndpoints with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusterEndpoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBClusterEndpointsWithContext(ctx aws.Context, input *DescribeDBClusterEndpointsInput, opts ...request.Option) (*DescribeDBClusterEndpointsOutput, error) { - req, out := c.DescribeDBClusterEndpointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusterParameterGroups = "DescribeDBClusterParameterGroups" - -// DescribeDBClusterParameterGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusterParameterGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusterParameterGroups for more information on using the DescribeDBClusterParameterGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClusterParameterGroupsRequest method. -// req, resp := client.DescribeDBClusterParameterGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterParameterGroups -func (c *RDS) DescribeDBClusterParameterGroupsRequest(input *DescribeDBClusterParameterGroupsInput) (req *request.Request, output *DescribeDBClusterParameterGroupsOutput) { - op := &request.Operation{ - Name: opDescribeDBClusterParameterGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClusterParameterGroupsInput{} - } - - output = &DescribeDBClusterParameterGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusterParameterGroups API operation for Amazon Relational Database Service. -// -// Returns a list of DBClusterParameterGroup descriptions. If a DBClusterParameterGroupName -// parameter is specified, the list will contain only the description of the -// specified DB cluster parameter group. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBClusterParameterGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterParameterGroups -func (c *RDS) DescribeDBClusterParameterGroups(input *DescribeDBClusterParameterGroupsInput) (*DescribeDBClusterParameterGroupsOutput, error) { - req, out := c.DescribeDBClusterParameterGroupsRequest(input) - return out, req.Send() -} - -// DescribeDBClusterParameterGroupsWithContext is the same as DescribeDBClusterParameterGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusterParameterGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBClusterParameterGroupsWithContext(ctx aws.Context, input *DescribeDBClusterParameterGroupsInput, opts ...request.Option) (*DescribeDBClusterParameterGroupsOutput, error) { - req, out := c.DescribeDBClusterParameterGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusterParameters = "DescribeDBClusterParameters" - -// DescribeDBClusterParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusterParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusterParameters for more information on using the DescribeDBClusterParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClusterParametersRequest method. -// req, resp := client.DescribeDBClusterParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterParameters -func (c *RDS) DescribeDBClusterParametersRequest(input *DescribeDBClusterParametersInput) (req *request.Request, output *DescribeDBClusterParametersOutput) { - op := &request.Operation{ - Name: opDescribeDBClusterParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClusterParametersInput{} - } - - output = &DescribeDBClusterParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusterParameters API operation for Amazon Relational Database Service. -// -// Returns the detailed parameter list for a particular DB cluster parameter -// group. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBClusterParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterParameters -func (c *RDS) DescribeDBClusterParameters(input *DescribeDBClusterParametersInput) (*DescribeDBClusterParametersOutput, error) { - req, out := c.DescribeDBClusterParametersRequest(input) - return out, req.Send() -} - -// DescribeDBClusterParametersWithContext is the same as DescribeDBClusterParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusterParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBClusterParametersWithContext(ctx aws.Context, input *DescribeDBClusterParametersInput, opts ...request.Option) (*DescribeDBClusterParametersOutput, error) { - req, out := c.DescribeDBClusterParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusterSnapshotAttributes = "DescribeDBClusterSnapshotAttributes" - -// DescribeDBClusterSnapshotAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusterSnapshotAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusterSnapshotAttributes for more information on using the DescribeDBClusterSnapshotAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClusterSnapshotAttributesRequest method. -// req, resp := client.DescribeDBClusterSnapshotAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterSnapshotAttributes -func (c *RDS) DescribeDBClusterSnapshotAttributesRequest(input *DescribeDBClusterSnapshotAttributesInput) (req *request.Request, output *DescribeDBClusterSnapshotAttributesOutput) { - op := &request.Operation{ - Name: opDescribeDBClusterSnapshotAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClusterSnapshotAttributesInput{} - } - - output = &DescribeDBClusterSnapshotAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusterSnapshotAttributes API operation for Amazon Relational Database Service. -// -// Returns a list of DB cluster snapshot attribute names and values for a manual -// DB cluster snapshot. -// -// When sharing snapshots with other AWS accounts, DescribeDBClusterSnapshotAttributes -// returns the restore attribute and a list of IDs for the AWS accounts that -// are authorized to copy or restore the manual DB cluster snapshot. If all -// is included in the list of values for the restore attribute, then the manual -// DB cluster snapshot is public and can be copied or restored by all AWS accounts. -// -// To add or remove access for an AWS account to copy or restore a manual DB -// cluster snapshot, or to make the manual DB cluster snapshot public or private, -// use the ModifyDBClusterSnapshotAttribute API action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBClusterSnapshotAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterSnapshotAttributes -func (c *RDS) DescribeDBClusterSnapshotAttributes(input *DescribeDBClusterSnapshotAttributesInput) (*DescribeDBClusterSnapshotAttributesOutput, error) { - req, out := c.DescribeDBClusterSnapshotAttributesRequest(input) - return out, req.Send() -} - -// DescribeDBClusterSnapshotAttributesWithContext is the same as DescribeDBClusterSnapshotAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusterSnapshotAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBClusterSnapshotAttributesWithContext(ctx aws.Context, input *DescribeDBClusterSnapshotAttributesInput, opts ...request.Option) (*DescribeDBClusterSnapshotAttributesOutput, error) { - req, out := c.DescribeDBClusterSnapshotAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusterSnapshots = "DescribeDBClusterSnapshots" - -// DescribeDBClusterSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusterSnapshots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusterSnapshots for more information on using the DescribeDBClusterSnapshots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClusterSnapshotsRequest method. -// req, resp := client.DescribeDBClusterSnapshotsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterSnapshots -func (c *RDS) DescribeDBClusterSnapshotsRequest(input *DescribeDBClusterSnapshotsInput) (req *request.Request, output *DescribeDBClusterSnapshotsOutput) { - op := &request.Operation{ - Name: opDescribeDBClusterSnapshots, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBClusterSnapshotsInput{} - } - - output = &DescribeDBClusterSnapshotsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusterSnapshots API operation for Amazon Relational Database Service. -// -// Returns information about DB cluster snapshots. This API action supports -// pagination. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBClusterSnapshots for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterSnapshots -func (c *RDS) DescribeDBClusterSnapshots(input *DescribeDBClusterSnapshotsInput) (*DescribeDBClusterSnapshotsOutput, error) { - req, out := c.DescribeDBClusterSnapshotsRequest(input) - return out, req.Send() -} - -// DescribeDBClusterSnapshotsWithContext is the same as DescribeDBClusterSnapshots with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusterSnapshots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBClusterSnapshotsWithContext(ctx aws.Context, input *DescribeDBClusterSnapshotsInput, opts ...request.Option) (*DescribeDBClusterSnapshotsOutput, error) { - req, out := c.DescribeDBClusterSnapshotsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBClusters = "DescribeDBClusters" - -// DescribeDBClustersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBClusters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBClusters for more information on using the DescribeDBClusters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBClustersRequest method. -// req, resp := client.DescribeDBClustersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusters -func (c *RDS) DescribeDBClustersRequest(input *DescribeDBClustersInput) (req *request.Request, output *DescribeDBClustersOutput) { - op := &request.Operation{ - Name: opDescribeDBClusters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBClustersInput{} - } - - output = &DescribeDBClustersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBClusters API operation for Amazon Relational Database Service. -// -// Returns information about provisioned Aurora DB clusters. This API supports -// pagination. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBClusters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusters -func (c *RDS) DescribeDBClusters(input *DescribeDBClustersInput) (*DescribeDBClustersOutput, error) { - req, out := c.DescribeDBClustersRequest(input) - return out, req.Send() -} - -// DescribeDBClustersWithContext is the same as DescribeDBClusters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBClusters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBClustersWithContext(ctx aws.Context, input *DescribeDBClustersInput, opts ...request.Option) (*DescribeDBClustersOutput, error) { - req, out := c.DescribeDBClustersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBClustersPages iterates over the pages of a DescribeDBClusters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBClusters 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 DescribeDBClusters operation. -// pageNum := 0 -// err := client.DescribeDBClustersPages(params, -// func(page *DescribeDBClustersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeDBClustersPages(input *DescribeDBClustersInput, fn func(*DescribeDBClustersOutput, bool) bool) error { - return c.DescribeDBClustersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBClustersPagesWithContext same as DescribeDBClustersPages 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 *RDS) DescribeDBClustersPagesWithContext(ctx aws.Context, input *DescribeDBClustersInput, fn func(*DescribeDBClustersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBClustersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBClustersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBClustersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBEngineVersions = "DescribeDBEngineVersions" - -// DescribeDBEngineVersionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBEngineVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBEngineVersions for more information on using the DescribeDBEngineVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBEngineVersionsRequest method. -// req, resp := client.DescribeDBEngineVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBEngineVersions -func (c *RDS) DescribeDBEngineVersionsRequest(input *DescribeDBEngineVersionsInput) (req *request.Request, output *DescribeDBEngineVersionsOutput) { - op := &request.Operation{ - Name: opDescribeDBEngineVersions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBEngineVersionsInput{} - } - - output = &DescribeDBEngineVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBEngineVersions API operation for Amazon Relational Database Service. -// -// Returns a list of the available DB engines. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBEngineVersions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBEngineVersions -func (c *RDS) DescribeDBEngineVersions(input *DescribeDBEngineVersionsInput) (*DescribeDBEngineVersionsOutput, error) { - req, out := c.DescribeDBEngineVersionsRequest(input) - return out, req.Send() -} - -// DescribeDBEngineVersionsWithContext is the same as DescribeDBEngineVersions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBEngineVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBEngineVersionsWithContext(ctx aws.Context, input *DescribeDBEngineVersionsInput, opts ...request.Option) (*DescribeDBEngineVersionsOutput, error) { - req, out := c.DescribeDBEngineVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBEngineVersionsPages iterates over the pages of a DescribeDBEngineVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBEngineVersions 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 DescribeDBEngineVersions operation. -// pageNum := 0 -// err := client.DescribeDBEngineVersionsPages(params, -// func(page *DescribeDBEngineVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeDBEngineVersionsPages(input *DescribeDBEngineVersionsInput, fn func(*DescribeDBEngineVersionsOutput, bool) bool) error { - return c.DescribeDBEngineVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBEngineVersionsPagesWithContext same as DescribeDBEngineVersionsPages 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 *RDS) DescribeDBEngineVersionsPagesWithContext(ctx aws.Context, input *DescribeDBEngineVersionsInput, fn func(*DescribeDBEngineVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBEngineVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBEngineVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBEngineVersionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBInstanceAutomatedBackups = "DescribeDBInstanceAutomatedBackups" - -// DescribeDBInstanceAutomatedBackupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBInstanceAutomatedBackups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBInstanceAutomatedBackups for more information on using the DescribeDBInstanceAutomatedBackups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBInstanceAutomatedBackupsRequest method. -// req, resp := client.DescribeDBInstanceAutomatedBackupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBInstanceAutomatedBackups -func (c *RDS) DescribeDBInstanceAutomatedBackupsRequest(input *DescribeDBInstanceAutomatedBackupsInput) (req *request.Request, output *DescribeDBInstanceAutomatedBackupsOutput) { - op := &request.Operation{ - Name: opDescribeDBInstanceAutomatedBackups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBInstanceAutomatedBackupsInput{} - } - - output = &DescribeDBInstanceAutomatedBackupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBInstanceAutomatedBackups API operation for Amazon Relational Database Service. -// -// Displays backups for both current and deleted instances. For example, use -// this operation to find details about automated backups for previously deleted -// instances. Current instances with retention periods greater than zero (0) -// are returned for both the DescribeDBInstanceAutomatedBackups and DescribeDBInstances -// operations. -// -// All parameters are optional. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBInstanceAutomatedBackups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceAutomatedBackupNotFoundFault "DBInstanceAutomatedBackupNotFound" -// No automated backup for this DB instance was found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBInstanceAutomatedBackups -func (c *RDS) DescribeDBInstanceAutomatedBackups(input *DescribeDBInstanceAutomatedBackupsInput) (*DescribeDBInstanceAutomatedBackupsOutput, error) { - req, out := c.DescribeDBInstanceAutomatedBackupsRequest(input) - return out, req.Send() -} - -// DescribeDBInstanceAutomatedBackupsWithContext is the same as DescribeDBInstanceAutomatedBackups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBInstanceAutomatedBackups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBInstanceAutomatedBackupsWithContext(ctx aws.Context, input *DescribeDBInstanceAutomatedBackupsInput, opts ...request.Option) (*DescribeDBInstanceAutomatedBackupsOutput, error) { - req, out := c.DescribeDBInstanceAutomatedBackupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBInstanceAutomatedBackupsPages iterates over the pages of a DescribeDBInstanceAutomatedBackups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBInstanceAutomatedBackups 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 DescribeDBInstanceAutomatedBackups operation. -// pageNum := 0 -// err := client.DescribeDBInstanceAutomatedBackupsPages(params, -// func(page *DescribeDBInstanceAutomatedBackupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeDBInstanceAutomatedBackupsPages(input *DescribeDBInstanceAutomatedBackupsInput, fn func(*DescribeDBInstanceAutomatedBackupsOutput, bool) bool) error { - return c.DescribeDBInstanceAutomatedBackupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBInstanceAutomatedBackupsPagesWithContext same as DescribeDBInstanceAutomatedBackupsPages 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 *RDS) DescribeDBInstanceAutomatedBackupsPagesWithContext(ctx aws.Context, input *DescribeDBInstanceAutomatedBackupsInput, fn func(*DescribeDBInstanceAutomatedBackupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBInstanceAutomatedBackupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBInstanceAutomatedBackupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBInstanceAutomatedBackupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBInstances = "DescribeDBInstances" - -// DescribeDBInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBInstances for more information on using the DescribeDBInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBInstancesRequest method. -// req, resp := client.DescribeDBInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBInstances -func (c *RDS) DescribeDBInstancesRequest(input *DescribeDBInstancesInput) (req *request.Request, output *DescribeDBInstancesOutput) { - op := &request.Operation{ - Name: opDescribeDBInstances, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBInstancesInput{} - } - - output = &DescribeDBInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBInstances API operation for Amazon Relational Database Service. -// -// Returns information about provisioned RDS instances. This API supports pagination. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBInstances -func (c *RDS) DescribeDBInstances(input *DescribeDBInstancesInput) (*DescribeDBInstancesOutput, error) { - req, out := c.DescribeDBInstancesRequest(input) - return out, req.Send() -} - -// DescribeDBInstancesWithContext is the same as DescribeDBInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBInstancesWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.Option) (*DescribeDBInstancesOutput, error) { - req, out := c.DescribeDBInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBInstancesPages iterates over the pages of a DescribeDBInstances operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBInstances 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 DescribeDBInstances operation. -// pageNum := 0 -// err := client.DescribeDBInstancesPages(params, -// func(page *DescribeDBInstancesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeDBInstancesPages(input *DescribeDBInstancesInput, fn func(*DescribeDBInstancesOutput, bool) bool) error { - return c.DescribeDBInstancesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBInstancesPagesWithContext same as DescribeDBInstancesPages 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 *RDS) DescribeDBInstancesPagesWithContext(ctx aws.Context, input *DescribeDBInstancesInput, fn func(*DescribeDBInstancesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBInstancesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBLogFiles = "DescribeDBLogFiles" - -// DescribeDBLogFilesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBLogFiles operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBLogFiles for more information on using the DescribeDBLogFiles -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBLogFilesRequest method. -// req, resp := client.DescribeDBLogFilesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBLogFiles -func (c *RDS) DescribeDBLogFilesRequest(input *DescribeDBLogFilesInput) (req *request.Request, output *DescribeDBLogFilesOutput) { - op := &request.Operation{ - Name: opDescribeDBLogFiles, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBLogFilesInput{} - } - - output = &DescribeDBLogFilesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBLogFiles API operation for Amazon Relational Database Service. -// -// Returns a list of DB log files for the DB instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBLogFiles for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBLogFiles -func (c *RDS) DescribeDBLogFiles(input *DescribeDBLogFilesInput) (*DescribeDBLogFilesOutput, error) { - req, out := c.DescribeDBLogFilesRequest(input) - return out, req.Send() -} - -// DescribeDBLogFilesWithContext is the same as DescribeDBLogFiles with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBLogFiles for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBLogFilesWithContext(ctx aws.Context, input *DescribeDBLogFilesInput, opts ...request.Option) (*DescribeDBLogFilesOutput, error) { - req, out := c.DescribeDBLogFilesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBLogFilesPages iterates over the pages of a DescribeDBLogFiles operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBLogFiles 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 DescribeDBLogFiles operation. -// pageNum := 0 -// err := client.DescribeDBLogFilesPages(params, -// func(page *DescribeDBLogFilesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeDBLogFilesPages(input *DescribeDBLogFilesInput, fn func(*DescribeDBLogFilesOutput, bool) bool) error { - return c.DescribeDBLogFilesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBLogFilesPagesWithContext same as DescribeDBLogFilesPages 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 *RDS) DescribeDBLogFilesPagesWithContext(ctx aws.Context, input *DescribeDBLogFilesInput, fn func(*DescribeDBLogFilesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBLogFilesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBLogFilesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBLogFilesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBParameterGroups = "DescribeDBParameterGroups" - -// DescribeDBParameterGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBParameterGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBParameterGroups for more information on using the DescribeDBParameterGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBParameterGroupsRequest method. -// req, resp := client.DescribeDBParameterGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBParameterGroups -func (c *RDS) DescribeDBParameterGroupsRequest(input *DescribeDBParameterGroupsInput) (req *request.Request, output *DescribeDBParameterGroupsOutput) { - op := &request.Operation{ - Name: opDescribeDBParameterGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBParameterGroupsInput{} - } - - output = &DescribeDBParameterGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBParameterGroups API operation for Amazon Relational Database Service. -// -// Returns a list of DBParameterGroup descriptions. If a DBParameterGroupName -// is specified, the list will contain only the description of the specified -// DB parameter group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBParameterGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBParameterGroups -func (c *RDS) DescribeDBParameterGroups(input *DescribeDBParameterGroupsInput) (*DescribeDBParameterGroupsOutput, error) { - req, out := c.DescribeDBParameterGroupsRequest(input) - return out, req.Send() -} - -// DescribeDBParameterGroupsWithContext is the same as DescribeDBParameterGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBParameterGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBParameterGroupsWithContext(ctx aws.Context, input *DescribeDBParameterGroupsInput, opts ...request.Option) (*DescribeDBParameterGroupsOutput, error) { - req, out := c.DescribeDBParameterGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBParameterGroupsPages iterates over the pages of a DescribeDBParameterGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBParameterGroups 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 DescribeDBParameterGroups operation. -// pageNum := 0 -// err := client.DescribeDBParameterGroupsPages(params, -// func(page *DescribeDBParameterGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeDBParameterGroupsPages(input *DescribeDBParameterGroupsInput, fn func(*DescribeDBParameterGroupsOutput, bool) bool) error { - return c.DescribeDBParameterGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBParameterGroupsPagesWithContext same as DescribeDBParameterGroupsPages 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 *RDS) DescribeDBParameterGroupsPagesWithContext(ctx aws.Context, input *DescribeDBParameterGroupsInput, fn func(*DescribeDBParameterGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBParameterGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBParameterGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBParameterGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBParameters = "DescribeDBParameters" - -// DescribeDBParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBParameters for more information on using the DescribeDBParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBParametersRequest method. -// req, resp := client.DescribeDBParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBParameters -func (c *RDS) DescribeDBParametersRequest(input *DescribeDBParametersInput) (req *request.Request, output *DescribeDBParametersOutput) { - op := &request.Operation{ - Name: opDescribeDBParameters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBParametersInput{} - } - - output = &DescribeDBParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBParameters API operation for Amazon Relational Database Service. -// -// Returns the detailed parameter list for a particular DB parameter group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBParameters -func (c *RDS) DescribeDBParameters(input *DescribeDBParametersInput) (*DescribeDBParametersOutput, error) { - req, out := c.DescribeDBParametersRequest(input) - return out, req.Send() -} - -// DescribeDBParametersWithContext is the same as DescribeDBParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBParametersWithContext(ctx aws.Context, input *DescribeDBParametersInput, opts ...request.Option) (*DescribeDBParametersOutput, error) { - req, out := c.DescribeDBParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBParametersPages iterates over the pages of a DescribeDBParameters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBParameters 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 DescribeDBParameters operation. -// pageNum := 0 -// err := client.DescribeDBParametersPages(params, -// func(page *DescribeDBParametersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeDBParametersPages(input *DescribeDBParametersInput, fn func(*DescribeDBParametersOutput, bool) bool) error { - return c.DescribeDBParametersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBParametersPagesWithContext same as DescribeDBParametersPages 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 *RDS) DescribeDBParametersPagesWithContext(ctx aws.Context, input *DescribeDBParametersInput, fn func(*DescribeDBParametersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBParametersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBParametersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBParametersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBSecurityGroups = "DescribeDBSecurityGroups" - -// DescribeDBSecurityGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBSecurityGroups for more information on using the DescribeDBSecurityGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBSecurityGroupsRequest method. -// req, resp := client.DescribeDBSecurityGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSecurityGroups -func (c *RDS) DescribeDBSecurityGroupsRequest(input *DescribeDBSecurityGroupsInput) (req *request.Request, output *DescribeDBSecurityGroupsOutput) { - op := &request.Operation{ - Name: opDescribeDBSecurityGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBSecurityGroupsInput{} - } - - output = &DescribeDBSecurityGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBSecurityGroups API operation for Amazon Relational Database Service. -// -// Returns a list of DBSecurityGroup descriptions. If a DBSecurityGroupName -// is specified, the list will contain only the descriptions of the specified -// DB security group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBSecurityGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName doesn't refer to an existing DB security group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSecurityGroups -func (c *RDS) DescribeDBSecurityGroups(input *DescribeDBSecurityGroupsInput) (*DescribeDBSecurityGroupsOutput, error) { - req, out := c.DescribeDBSecurityGroupsRequest(input) - return out, req.Send() -} - -// DescribeDBSecurityGroupsWithContext is the same as DescribeDBSecurityGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBSecurityGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBSecurityGroupsWithContext(ctx aws.Context, input *DescribeDBSecurityGroupsInput, opts ...request.Option) (*DescribeDBSecurityGroupsOutput, error) { - req, out := c.DescribeDBSecurityGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBSecurityGroupsPages iterates over the pages of a DescribeDBSecurityGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBSecurityGroups 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 DescribeDBSecurityGroups operation. -// pageNum := 0 -// err := client.DescribeDBSecurityGroupsPages(params, -// func(page *DescribeDBSecurityGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeDBSecurityGroupsPages(input *DescribeDBSecurityGroupsInput, fn func(*DescribeDBSecurityGroupsOutput, bool) bool) error { - return c.DescribeDBSecurityGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBSecurityGroupsPagesWithContext same as DescribeDBSecurityGroupsPages 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 *RDS) DescribeDBSecurityGroupsPagesWithContext(ctx aws.Context, input *DescribeDBSecurityGroupsInput, fn func(*DescribeDBSecurityGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBSecurityGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBSecurityGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBSecurityGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBSnapshotAttributes = "DescribeDBSnapshotAttributes" - -// DescribeDBSnapshotAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBSnapshotAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBSnapshotAttributes for more information on using the DescribeDBSnapshotAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBSnapshotAttributesRequest method. -// req, resp := client.DescribeDBSnapshotAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSnapshotAttributes -func (c *RDS) DescribeDBSnapshotAttributesRequest(input *DescribeDBSnapshotAttributesInput) (req *request.Request, output *DescribeDBSnapshotAttributesOutput) { - op := &request.Operation{ - Name: opDescribeDBSnapshotAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDBSnapshotAttributesInput{} - } - - output = &DescribeDBSnapshotAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBSnapshotAttributes API operation for Amazon Relational Database Service. -// -// Returns a list of DB snapshot attribute names and values for a manual DB -// snapshot. -// -// When sharing snapshots with other AWS accounts, DescribeDBSnapshotAttributes -// returns the restore attribute and a list of IDs for the AWS accounts that -// are authorized to copy or restore the manual DB snapshot. If all is included -// in the list of values for the restore attribute, then the manual DB snapshot -// is public and can be copied or restored by all AWS accounts. -// -// To add or remove access for an AWS account to copy or restore a manual DB -// snapshot, or to make the manual DB snapshot public or private, use the ModifyDBSnapshotAttribute -// API action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBSnapshotAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSnapshotAttributes -func (c *RDS) DescribeDBSnapshotAttributes(input *DescribeDBSnapshotAttributesInput) (*DescribeDBSnapshotAttributesOutput, error) { - req, out := c.DescribeDBSnapshotAttributesRequest(input) - return out, req.Send() -} - -// DescribeDBSnapshotAttributesWithContext is the same as DescribeDBSnapshotAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBSnapshotAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBSnapshotAttributesWithContext(ctx aws.Context, input *DescribeDBSnapshotAttributesInput, opts ...request.Option) (*DescribeDBSnapshotAttributesOutput, error) { - req, out := c.DescribeDBSnapshotAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDBSnapshots = "DescribeDBSnapshots" - -// DescribeDBSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBSnapshots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBSnapshots for more information on using the DescribeDBSnapshots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBSnapshotsRequest method. -// req, resp := client.DescribeDBSnapshotsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSnapshots -func (c *RDS) DescribeDBSnapshotsRequest(input *DescribeDBSnapshotsInput) (req *request.Request, output *DescribeDBSnapshotsOutput) { - op := &request.Operation{ - Name: opDescribeDBSnapshots, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBSnapshotsInput{} - } - - output = &DescribeDBSnapshotsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBSnapshots API operation for Amazon Relational Database Service. -// -// Returns information about DB snapshots. This API action supports pagination. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBSnapshots for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSnapshots -func (c *RDS) DescribeDBSnapshots(input *DescribeDBSnapshotsInput) (*DescribeDBSnapshotsOutput, error) { - req, out := c.DescribeDBSnapshotsRequest(input) - return out, req.Send() -} - -// DescribeDBSnapshotsWithContext is the same as DescribeDBSnapshots with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBSnapshots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBSnapshotsWithContext(ctx aws.Context, input *DescribeDBSnapshotsInput, opts ...request.Option) (*DescribeDBSnapshotsOutput, error) { - req, out := c.DescribeDBSnapshotsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBSnapshotsPages iterates over the pages of a DescribeDBSnapshots operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBSnapshots 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 DescribeDBSnapshots operation. -// pageNum := 0 -// err := client.DescribeDBSnapshotsPages(params, -// func(page *DescribeDBSnapshotsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeDBSnapshotsPages(input *DescribeDBSnapshotsInput, fn func(*DescribeDBSnapshotsOutput, bool) bool) error { - return c.DescribeDBSnapshotsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBSnapshotsPagesWithContext same as DescribeDBSnapshotsPages 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 *RDS) DescribeDBSnapshotsPagesWithContext(ctx aws.Context, input *DescribeDBSnapshotsInput, fn func(*DescribeDBSnapshotsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBSnapshotsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBSnapshotsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBSnapshotsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDBSubnetGroups = "DescribeDBSubnetGroups" - -// DescribeDBSubnetGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDBSubnetGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDBSubnetGroups for more information on using the DescribeDBSubnetGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDBSubnetGroupsRequest method. -// req, resp := client.DescribeDBSubnetGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSubnetGroups -func (c *RDS) DescribeDBSubnetGroupsRequest(input *DescribeDBSubnetGroupsInput) (req *request.Request, output *DescribeDBSubnetGroupsOutput) { - op := &request.Operation{ - Name: opDescribeDBSubnetGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDBSubnetGroupsInput{} - } - - output = &DescribeDBSubnetGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDBSubnetGroups API operation for Amazon Relational Database Service. -// -// Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified, -// the list will contain only the descriptions of the specified DBSubnetGroup. -// -// For an overview of CIDR ranges, go to the Wikipedia Tutorial (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeDBSubnetGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSubnetGroups -func (c *RDS) DescribeDBSubnetGroups(input *DescribeDBSubnetGroupsInput) (*DescribeDBSubnetGroupsOutput, error) { - req, out := c.DescribeDBSubnetGroupsRequest(input) - return out, req.Send() -} - -// DescribeDBSubnetGroupsWithContext is the same as DescribeDBSubnetGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDBSubnetGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeDBSubnetGroupsWithContext(ctx aws.Context, input *DescribeDBSubnetGroupsInput, opts ...request.Option) (*DescribeDBSubnetGroupsOutput, error) { - req, out := c.DescribeDBSubnetGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDBSubnetGroupsPages iterates over the pages of a DescribeDBSubnetGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDBSubnetGroups 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 DescribeDBSubnetGroups operation. -// pageNum := 0 -// err := client.DescribeDBSubnetGroupsPages(params, -// func(page *DescribeDBSubnetGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeDBSubnetGroupsPages(input *DescribeDBSubnetGroupsInput, fn func(*DescribeDBSubnetGroupsOutput, bool) bool) error { - return c.DescribeDBSubnetGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDBSubnetGroupsPagesWithContext same as DescribeDBSubnetGroupsPages 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 *RDS) DescribeDBSubnetGroupsPagesWithContext(ctx aws.Context, input *DescribeDBSubnetGroupsInput, fn func(*DescribeDBSubnetGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDBSubnetGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBSubnetGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBSubnetGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEngineDefaultClusterParameters = "DescribeEngineDefaultClusterParameters" - -// DescribeEngineDefaultClusterParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEngineDefaultClusterParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEngineDefaultClusterParameters for more information on using the DescribeEngineDefaultClusterParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEngineDefaultClusterParametersRequest method. -// req, resp := client.DescribeEngineDefaultClusterParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEngineDefaultClusterParameters -func (c *RDS) DescribeEngineDefaultClusterParametersRequest(input *DescribeEngineDefaultClusterParametersInput) (req *request.Request, output *DescribeEngineDefaultClusterParametersOutput) { - op := &request.Operation{ - Name: opDescribeEngineDefaultClusterParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEngineDefaultClusterParametersInput{} - } - - output = &DescribeEngineDefaultClusterParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEngineDefaultClusterParameters API operation for Amazon Relational Database Service. -// -// Returns the default engine and system parameter information for the cluster -// database engine. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeEngineDefaultClusterParameters for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEngineDefaultClusterParameters -func (c *RDS) DescribeEngineDefaultClusterParameters(input *DescribeEngineDefaultClusterParametersInput) (*DescribeEngineDefaultClusterParametersOutput, error) { - req, out := c.DescribeEngineDefaultClusterParametersRequest(input) - return out, req.Send() -} - -// DescribeEngineDefaultClusterParametersWithContext is the same as DescribeEngineDefaultClusterParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEngineDefaultClusterParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeEngineDefaultClusterParametersWithContext(ctx aws.Context, input *DescribeEngineDefaultClusterParametersInput, opts ...request.Option) (*DescribeEngineDefaultClusterParametersOutput, error) { - req, out := c.DescribeEngineDefaultClusterParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEngineDefaultParameters = "DescribeEngineDefaultParameters" - -// DescribeEngineDefaultParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEngineDefaultParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEngineDefaultParameters for more information on using the DescribeEngineDefaultParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEngineDefaultParametersRequest method. -// req, resp := client.DescribeEngineDefaultParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEngineDefaultParameters -func (c *RDS) DescribeEngineDefaultParametersRequest(input *DescribeEngineDefaultParametersInput) (req *request.Request, output *DescribeEngineDefaultParametersOutput) { - op := &request.Operation{ - Name: opDescribeEngineDefaultParameters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"EngineDefaults.Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEngineDefaultParametersInput{} - } - - output = &DescribeEngineDefaultParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEngineDefaultParameters API operation for Amazon Relational Database Service. -// -// Returns the default engine and system parameter information for the specified -// database engine. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeEngineDefaultParameters for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEngineDefaultParameters -func (c *RDS) DescribeEngineDefaultParameters(input *DescribeEngineDefaultParametersInput) (*DescribeEngineDefaultParametersOutput, error) { - req, out := c.DescribeEngineDefaultParametersRequest(input) - return out, req.Send() -} - -// DescribeEngineDefaultParametersWithContext is the same as DescribeEngineDefaultParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEngineDefaultParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeEngineDefaultParametersWithContext(ctx aws.Context, input *DescribeEngineDefaultParametersInput, opts ...request.Option) (*DescribeEngineDefaultParametersOutput, error) { - req, out := c.DescribeEngineDefaultParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEngineDefaultParametersPages iterates over the pages of a DescribeEngineDefaultParameters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEngineDefaultParameters 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 DescribeEngineDefaultParameters operation. -// pageNum := 0 -// err := client.DescribeEngineDefaultParametersPages(params, -// func(page *DescribeEngineDefaultParametersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeEngineDefaultParametersPages(input *DescribeEngineDefaultParametersInput, fn func(*DescribeEngineDefaultParametersOutput, bool) bool) error { - return c.DescribeEngineDefaultParametersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEngineDefaultParametersPagesWithContext same as DescribeEngineDefaultParametersPages 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 *RDS) DescribeEngineDefaultParametersPagesWithContext(ctx aws.Context, input *DescribeEngineDefaultParametersInput, fn func(*DescribeEngineDefaultParametersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEngineDefaultParametersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEngineDefaultParametersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEngineDefaultParametersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEventCategories = "DescribeEventCategories" - -// DescribeEventCategoriesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEventCategories operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEventCategories for more information on using the DescribeEventCategories -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventCategoriesRequest method. -// req, resp := client.DescribeEventCategoriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEventCategories -func (c *RDS) DescribeEventCategoriesRequest(input *DescribeEventCategoriesInput) (req *request.Request, output *DescribeEventCategoriesOutput) { - op := &request.Operation{ - Name: opDescribeEventCategories, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEventCategoriesInput{} - } - - output = &DescribeEventCategoriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEventCategories API operation for Amazon Relational Database Service. -// -// Displays a list of categories for all event source types, or, if specified, -// for a specified source type. You can see a list of the event categories and -// source types in the Events (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html) -// topic in the Amazon RDS User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeEventCategories for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEventCategories -func (c *RDS) DescribeEventCategories(input *DescribeEventCategoriesInput) (*DescribeEventCategoriesOutput, error) { - req, out := c.DescribeEventCategoriesRequest(input) - return out, req.Send() -} - -// DescribeEventCategoriesWithContext is the same as DescribeEventCategories with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEventCategories for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeEventCategoriesWithContext(ctx aws.Context, input *DescribeEventCategoriesInput, opts ...request.Option) (*DescribeEventCategoriesOutput, error) { - req, out := c.DescribeEventCategoriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEventSubscriptions = "DescribeEventSubscriptions" - -// DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEventSubscriptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEventSubscriptions for more information on using the DescribeEventSubscriptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventSubscriptionsRequest method. -// req, resp := client.DescribeEventSubscriptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEventSubscriptions -func (c *RDS) DescribeEventSubscriptionsRequest(input *DescribeEventSubscriptionsInput) (req *request.Request, output *DescribeEventSubscriptionsOutput) { - op := &request.Operation{ - Name: opDescribeEventSubscriptions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEventSubscriptionsInput{} - } - - output = &DescribeEventSubscriptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEventSubscriptions API operation for Amazon Relational Database Service. -// -// Lists all the subscription descriptions for a customer account. The description -// for a subscription includes SubscriptionName, SNSTopicARN, CustomerID, SourceType, -// SourceID, CreationTime, and Status. -// -// If you specify a SubscriptionName, lists the description for that subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeEventSubscriptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" -// The subscription name does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEventSubscriptions -func (c *RDS) DescribeEventSubscriptions(input *DescribeEventSubscriptionsInput) (*DescribeEventSubscriptionsOutput, error) { - req, out := c.DescribeEventSubscriptionsRequest(input) - return out, req.Send() -} - -// DescribeEventSubscriptionsWithContext is the same as DescribeEventSubscriptions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEventSubscriptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeEventSubscriptionsWithContext(ctx aws.Context, input *DescribeEventSubscriptionsInput, opts ...request.Option) (*DescribeEventSubscriptionsOutput, error) { - req, out := c.DescribeEventSubscriptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEventSubscriptionsPages iterates over the pages of a DescribeEventSubscriptions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEventSubscriptions 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 DescribeEventSubscriptions operation. -// pageNum := 0 -// err := client.DescribeEventSubscriptionsPages(params, -// func(page *DescribeEventSubscriptionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeEventSubscriptionsPages(input *DescribeEventSubscriptionsInput, fn func(*DescribeEventSubscriptionsOutput, bool) bool) error { - return c.DescribeEventSubscriptionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEventSubscriptionsPagesWithContext same as DescribeEventSubscriptionsPages 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 *RDS) DescribeEventSubscriptionsPagesWithContext(ctx aws.Context, input *DescribeEventSubscriptionsInput, fn func(*DescribeEventSubscriptionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEventSubscriptionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEventSubscriptionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventSubscriptionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEvents = "DescribeEvents" - -// DescribeEventsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEvents for more information on using the DescribeEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventsRequest method. -// req, resp := client.DescribeEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEvents -func (c *RDS) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Request, output *DescribeEventsOutput) { - op := &request.Operation{ - Name: opDescribeEvents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEventsInput{} - } - - output = &DescribeEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEvents API operation for Amazon Relational Database Service. -// -// Returns events related to DB instances, DB security groups, DB snapshots, -// and DB parameter groups for the past 14 days. Events specific to a particular -// DB instance, DB security group, database snapshot, or DB parameter group -// can be obtained by providing the name as a parameter. By default, the past -// hour of events are returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeEvents for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEvents -func (c *RDS) DescribeEvents(input *DescribeEventsInput) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - return out, req.Send() -} - -// DescribeEventsWithContext is the same as DescribeEvents with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeEventsWithContext(ctx aws.Context, input *DescribeEventsInput, opts ...request.Option) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEventsPages iterates over the pages of a DescribeEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEvents 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 DescribeEvents operation. -// pageNum := 0 -// err := client.DescribeEventsPages(params, -// func(page *DescribeEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeEventsPages(input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool) error { - return c.DescribeEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEventsPagesWithContext same as DescribeEventsPages 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 *RDS) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeGlobalClusters = "DescribeGlobalClusters" - -// DescribeGlobalClustersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeGlobalClusters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeGlobalClusters for more information on using the DescribeGlobalClusters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeGlobalClustersRequest method. -// req, resp := client.DescribeGlobalClustersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeGlobalClusters -func (c *RDS) DescribeGlobalClustersRequest(input *DescribeGlobalClustersInput) (req *request.Request, output *DescribeGlobalClustersOutput) { - op := &request.Operation{ - Name: opDescribeGlobalClusters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeGlobalClustersInput{} - } - - output = &DescribeGlobalClustersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeGlobalClusters API operation for Amazon Relational Database Service. -// -// Returns information about Aurora global database clusters. This API supports -// pagination. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeGlobalClusters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeGlobalClusterNotFoundFault "GlobalClusterNotFoundFault" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeGlobalClusters -func (c *RDS) DescribeGlobalClusters(input *DescribeGlobalClustersInput) (*DescribeGlobalClustersOutput, error) { - req, out := c.DescribeGlobalClustersRequest(input) - return out, req.Send() -} - -// DescribeGlobalClustersWithContext is the same as DescribeGlobalClusters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeGlobalClusters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeGlobalClustersWithContext(ctx aws.Context, input *DescribeGlobalClustersInput, opts ...request.Option) (*DescribeGlobalClustersOutput, error) { - req, out := c.DescribeGlobalClustersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeGlobalClustersPages iterates over the pages of a DescribeGlobalClusters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeGlobalClusters 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 DescribeGlobalClusters operation. -// pageNum := 0 -// err := client.DescribeGlobalClustersPages(params, -// func(page *DescribeGlobalClustersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeGlobalClustersPages(input *DescribeGlobalClustersInput, fn func(*DescribeGlobalClustersOutput, bool) bool) error { - return c.DescribeGlobalClustersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeGlobalClustersPagesWithContext same as DescribeGlobalClustersPages 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 *RDS) DescribeGlobalClustersPagesWithContext(ctx aws.Context, input *DescribeGlobalClustersInput, fn func(*DescribeGlobalClustersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeGlobalClustersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeGlobalClustersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeGlobalClustersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeOptionGroupOptions = "DescribeOptionGroupOptions" - -// DescribeOptionGroupOptionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeOptionGroupOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeOptionGroupOptions for more information on using the DescribeOptionGroupOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeOptionGroupOptionsRequest method. -// req, resp := client.DescribeOptionGroupOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOptionGroupOptions -func (c *RDS) DescribeOptionGroupOptionsRequest(input *DescribeOptionGroupOptionsInput) (req *request.Request, output *DescribeOptionGroupOptionsOutput) { - op := &request.Operation{ - Name: opDescribeOptionGroupOptions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeOptionGroupOptionsInput{} - } - - output = &DescribeOptionGroupOptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeOptionGroupOptions API operation for Amazon Relational Database Service. -// -// Describes all available options. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeOptionGroupOptions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOptionGroupOptions -func (c *RDS) DescribeOptionGroupOptions(input *DescribeOptionGroupOptionsInput) (*DescribeOptionGroupOptionsOutput, error) { - req, out := c.DescribeOptionGroupOptionsRequest(input) - return out, req.Send() -} - -// DescribeOptionGroupOptionsWithContext is the same as DescribeOptionGroupOptions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeOptionGroupOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeOptionGroupOptionsWithContext(ctx aws.Context, input *DescribeOptionGroupOptionsInput, opts ...request.Option) (*DescribeOptionGroupOptionsOutput, error) { - req, out := c.DescribeOptionGroupOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeOptionGroupOptionsPages iterates over the pages of a DescribeOptionGroupOptions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeOptionGroupOptions 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 DescribeOptionGroupOptions operation. -// pageNum := 0 -// err := client.DescribeOptionGroupOptionsPages(params, -// func(page *DescribeOptionGroupOptionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeOptionGroupOptionsPages(input *DescribeOptionGroupOptionsInput, fn func(*DescribeOptionGroupOptionsOutput, bool) bool) error { - return c.DescribeOptionGroupOptionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeOptionGroupOptionsPagesWithContext same as DescribeOptionGroupOptionsPages 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 *RDS) DescribeOptionGroupOptionsPagesWithContext(ctx aws.Context, input *DescribeOptionGroupOptionsInput, fn func(*DescribeOptionGroupOptionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeOptionGroupOptionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeOptionGroupOptionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeOptionGroupOptionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeOptionGroups = "DescribeOptionGroups" - -// DescribeOptionGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeOptionGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeOptionGroups for more information on using the DescribeOptionGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeOptionGroupsRequest method. -// req, resp := client.DescribeOptionGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOptionGroups -func (c *RDS) DescribeOptionGroupsRequest(input *DescribeOptionGroupsInput) (req *request.Request, output *DescribeOptionGroupsOutput) { - op := &request.Operation{ - Name: opDescribeOptionGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeOptionGroupsInput{} - } - - output = &DescribeOptionGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeOptionGroups API operation for Amazon Relational Database Service. -// -// Describes the available option groups. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeOptionGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// The specified option group could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOptionGroups -func (c *RDS) DescribeOptionGroups(input *DescribeOptionGroupsInput) (*DescribeOptionGroupsOutput, error) { - req, out := c.DescribeOptionGroupsRequest(input) - return out, req.Send() -} - -// DescribeOptionGroupsWithContext is the same as DescribeOptionGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeOptionGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeOptionGroupsWithContext(ctx aws.Context, input *DescribeOptionGroupsInput, opts ...request.Option) (*DescribeOptionGroupsOutput, error) { - req, out := c.DescribeOptionGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeOptionGroupsPages iterates over the pages of a DescribeOptionGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeOptionGroups 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 DescribeOptionGroups operation. -// pageNum := 0 -// err := client.DescribeOptionGroupsPages(params, -// func(page *DescribeOptionGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeOptionGroupsPages(input *DescribeOptionGroupsInput, fn func(*DescribeOptionGroupsOutput, bool) bool) error { - return c.DescribeOptionGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeOptionGroupsPagesWithContext same as DescribeOptionGroupsPages 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 *RDS) DescribeOptionGroupsPagesWithContext(ctx aws.Context, input *DescribeOptionGroupsInput, fn func(*DescribeOptionGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeOptionGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeOptionGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeOptionGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeOrderableDBInstanceOptions = "DescribeOrderableDBInstanceOptions" - -// DescribeOrderableDBInstanceOptionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeOrderableDBInstanceOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeOrderableDBInstanceOptions for more information on using the DescribeOrderableDBInstanceOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeOrderableDBInstanceOptionsRequest method. -// req, resp := client.DescribeOrderableDBInstanceOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOrderableDBInstanceOptions -func (c *RDS) DescribeOrderableDBInstanceOptionsRequest(input *DescribeOrderableDBInstanceOptionsInput) (req *request.Request, output *DescribeOrderableDBInstanceOptionsOutput) { - op := &request.Operation{ - Name: opDescribeOrderableDBInstanceOptions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeOrderableDBInstanceOptionsInput{} - } - - output = &DescribeOrderableDBInstanceOptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeOrderableDBInstanceOptions API operation for Amazon Relational Database Service. -// -// Returns a list of orderable DB instance options for the specified engine. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeOrderableDBInstanceOptions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOrderableDBInstanceOptions -func (c *RDS) DescribeOrderableDBInstanceOptions(input *DescribeOrderableDBInstanceOptionsInput) (*DescribeOrderableDBInstanceOptionsOutput, error) { - req, out := c.DescribeOrderableDBInstanceOptionsRequest(input) - return out, req.Send() -} - -// DescribeOrderableDBInstanceOptionsWithContext is the same as DescribeOrderableDBInstanceOptions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeOrderableDBInstanceOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeOrderableDBInstanceOptionsWithContext(ctx aws.Context, input *DescribeOrderableDBInstanceOptionsInput, opts ...request.Option) (*DescribeOrderableDBInstanceOptionsOutput, error) { - req, out := c.DescribeOrderableDBInstanceOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeOrderableDBInstanceOptionsPages iterates over the pages of a DescribeOrderableDBInstanceOptions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeOrderableDBInstanceOptions 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 DescribeOrderableDBInstanceOptions operation. -// pageNum := 0 -// err := client.DescribeOrderableDBInstanceOptionsPages(params, -// func(page *DescribeOrderableDBInstanceOptionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeOrderableDBInstanceOptionsPages(input *DescribeOrderableDBInstanceOptionsInput, fn func(*DescribeOrderableDBInstanceOptionsOutput, bool) bool) error { - return c.DescribeOrderableDBInstanceOptionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeOrderableDBInstanceOptionsPagesWithContext same as DescribeOrderableDBInstanceOptionsPages 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 *RDS) DescribeOrderableDBInstanceOptionsPagesWithContext(ctx aws.Context, input *DescribeOrderableDBInstanceOptionsInput, fn func(*DescribeOrderableDBInstanceOptionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeOrderableDBInstanceOptionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeOrderableDBInstanceOptionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeOrderableDBInstanceOptionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribePendingMaintenanceActions = "DescribePendingMaintenanceActions" - -// DescribePendingMaintenanceActionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribePendingMaintenanceActions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePendingMaintenanceActions for more information on using the DescribePendingMaintenanceActions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePendingMaintenanceActionsRequest method. -// req, resp := client.DescribePendingMaintenanceActionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribePendingMaintenanceActions -func (c *RDS) DescribePendingMaintenanceActionsRequest(input *DescribePendingMaintenanceActionsInput) (req *request.Request, output *DescribePendingMaintenanceActionsOutput) { - op := &request.Operation{ - Name: opDescribePendingMaintenanceActions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePendingMaintenanceActionsInput{} - } - - output = &DescribePendingMaintenanceActionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePendingMaintenanceActions API operation for Amazon Relational Database Service. -// -// Returns a list of resources (for example, DB instances) that have at least -// one pending maintenance action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribePendingMaintenanceActions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The specified resource ID was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribePendingMaintenanceActions -func (c *RDS) DescribePendingMaintenanceActions(input *DescribePendingMaintenanceActionsInput) (*DescribePendingMaintenanceActionsOutput, error) { - req, out := c.DescribePendingMaintenanceActionsRequest(input) - return out, req.Send() -} - -// DescribePendingMaintenanceActionsWithContext is the same as DescribePendingMaintenanceActions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePendingMaintenanceActions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribePendingMaintenanceActionsWithContext(ctx aws.Context, input *DescribePendingMaintenanceActionsInput, opts ...request.Option) (*DescribePendingMaintenanceActionsOutput, error) { - req, out := c.DescribePendingMaintenanceActionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeReservedDBInstances = "DescribeReservedDBInstances" - -// DescribeReservedDBInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservedDBInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReservedDBInstances for more information on using the DescribeReservedDBInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReservedDBInstancesRequest method. -// req, resp := client.DescribeReservedDBInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeReservedDBInstances -func (c *RDS) DescribeReservedDBInstancesRequest(input *DescribeReservedDBInstancesInput) (req *request.Request, output *DescribeReservedDBInstancesOutput) { - op := &request.Operation{ - Name: opDescribeReservedDBInstances, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReservedDBInstancesInput{} - } - - output = &DescribeReservedDBInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReservedDBInstances API operation for Amazon Relational Database Service. -// -// Returns information about reserved DB instances for this account, or about -// a specified reserved DB instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeReservedDBInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReservedDBInstanceNotFoundFault "ReservedDBInstanceNotFound" -// The specified reserved DB Instance not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeReservedDBInstances -func (c *RDS) DescribeReservedDBInstances(input *DescribeReservedDBInstancesInput) (*DescribeReservedDBInstancesOutput, error) { - req, out := c.DescribeReservedDBInstancesRequest(input) - return out, req.Send() -} - -// DescribeReservedDBInstancesWithContext is the same as DescribeReservedDBInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReservedDBInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeReservedDBInstancesWithContext(ctx aws.Context, input *DescribeReservedDBInstancesInput, opts ...request.Option) (*DescribeReservedDBInstancesOutput, error) { - req, out := c.DescribeReservedDBInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReservedDBInstancesPages iterates over the pages of a DescribeReservedDBInstances operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReservedDBInstances 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 DescribeReservedDBInstances operation. -// pageNum := 0 -// err := client.DescribeReservedDBInstancesPages(params, -// func(page *DescribeReservedDBInstancesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeReservedDBInstancesPages(input *DescribeReservedDBInstancesInput, fn func(*DescribeReservedDBInstancesOutput, bool) bool) error { - return c.DescribeReservedDBInstancesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReservedDBInstancesPagesWithContext same as DescribeReservedDBInstancesPages 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 *RDS) DescribeReservedDBInstancesPagesWithContext(ctx aws.Context, input *DescribeReservedDBInstancesInput, fn func(*DescribeReservedDBInstancesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReservedDBInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReservedDBInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedDBInstancesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeReservedDBInstancesOfferings = "DescribeReservedDBInstancesOfferings" - -// DescribeReservedDBInstancesOfferingsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservedDBInstancesOfferings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReservedDBInstancesOfferings for more information on using the DescribeReservedDBInstancesOfferings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReservedDBInstancesOfferingsRequest method. -// req, resp := client.DescribeReservedDBInstancesOfferingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeReservedDBInstancesOfferings -func (c *RDS) DescribeReservedDBInstancesOfferingsRequest(input *DescribeReservedDBInstancesOfferingsInput) (req *request.Request, output *DescribeReservedDBInstancesOfferingsOutput) { - op := &request.Operation{ - Name: opDescribeReservedDBInstancesOfferings, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReservedDBInstancesOfferingsInput{} - } - - output = &DescribeReservedDBInstancesOfferingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReservedDBInstancesOfferings API operation for Amazon Relational Database Service. -// -// Lists available reserved DB instance offerings. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeReservedDBInstancesOfferings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReservedDBInstancesOfferingNotFoundFault "ReservedDBInstancesOfferingNotFound" -// Specified offering does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeReservedDBInstancesOfferings -func (c *RDS) DescribeReservedDBInstancesOfferings(input *DescribeReservedDBInstancesOfferingsInput) (*DescribeReservedDBInstancesOfferingsOutput, error) { - req, out := c.DescribeReservedDBInstancesOfferingsRequest(input) - return out, req.Send() -} - -// DescribeReservedDBInstancesOfferingsWithContext is the same as DescribeReservedDBInstancesOfferings with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReservedDBInstancesOfferings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeReservedDBInstancesOfferingsWithContext(ctx aws.Context, input *DescribeReservedDBInstancesOfferingsInput, opts ...request.Option) (*DescribeReservedDBInstancesOfferingsOutput, error) { - req, out := c.DescribeReservedDBInstancesOfferingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReservedDBInstancesOfferingsPages iterates over the pages of a DescribeReservedDBInstancesOfferings operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReservedDBInstancesOfferings 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 DescribeReservedDBInstancesOfferings operation. -// pageNum := 0 -// err := client.DescribeReservedDBInstancesOfferingsPages(params, -// func(page *DescribeReservedDBInstancesOfferingsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DescribeReservedDBInstancesOfferingsPages(input *DescribeReservedDBInstancesOfferingsInput, fn func(*DescribeReservedDBInstancesOfferingsOutput, bool) bool) error { - return c.DescribeReservedDBInstancesOfferingsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReservedDBInstancesOfferingsPagesWithContext same as DescribeReservedDBInstancesOfferingsPages 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 *RDS) DescribeReservedDBInstancesOfferingsPagesWithContext(ctx aws.Context, input *DescribeReservedDBInstancesOfferingsInput, fn func(*DescribeReservedDBInstancesOfferingsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReservedDBInstancesOfferingsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReservedDBInstancesOfferingsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedDBInstancesOfferingsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeSourceRegions = "DescribeSourceRegions" - -// DescribeSourceRegionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSourceRegions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSourceRegions for more information on using the DescribeSourceRegions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSourceRegionsRequest method. -// req, resp := client.DescribeSourceRegionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeSourceRegions -func (c *RDS) DescribeSourceRegionsRequest(input *DescribeSourceRegionsInput) (req *request.Request, output *DescribeSourceRegionsOutput) { - op := &request.Operation{ - Name: opDescribeSourceRegions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSourceRegionsInput{} - } - - output = &DescribeSourceRegionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSourceRegions API operation for Amazon Relational Database Service. -// -// Returns a list of the source AWS Regions where the current AWS Region can -// create a Read Replica or copy a DB snapshot from. This API action supports -// pagination. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeSourceRegions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeSourceRegions -func (c *RDS) DescribeSourceRegions(input *DescribeSourceRegionsInput) (*DescribeSourceRegionsOutput, error) { - req, out := c.DescribeSourceRegionsRequest(input) - return out, req.Send() -} - -// DescribeSourceRegionsWithContext is the same as DescribeSourceRegions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSourceRegions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeSourceRegionsWithContext(ctx aws.Context, input *DescribeSourceRegionsInput, opts ...request.Option) (*DescribeSourceRegionsOutput, error) { - req, out := c.DescribeSourceRegionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeValidDBInstanceModifications = "DescribeValidDBInstanceModifications" - -// DescribeValidDBInstanceModificationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeValidDBInstanceModifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeValidDBInstanceModifications for more information on using the DescribeValidDBInstanceModifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeValidDBInstanceModificationsRequest method. -// req, resp := client.DescribeValidDBInstanceModificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeValidDBInstanceModifications -func (c *RDS) DescribeValidDBInstanceModificationsRequest(input *DescribeValidDBInstanceModificationsInput) (req *request.Request, output *DescribeValidDBInstanceModificationsOutput) { - op := &request.Operation{ - Name: opDescribeValidDBInstanceModifications, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeValidDBInstanceModificationsInput{} - } - - output = &DescribeValidDBInstanceModificationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeValidDBInstanceModifications API operation for Amazon Relational Database Service. -// -// You can call DescribeValidDBInstanceModifications to learn what modifications -// you can make to your DB instance. You can use this information when you call -// ModifyDBInstance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DescribeValidDBInstanceModifications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeValidDBInstanceModifications -func (c *RDS) DescribeValidDBInstanceModifications(input *DescribeValidDBInstanceModificationsInput) (*DescribeValidDBInstanceModificationsOutput, error) { - req, out := c.DescribeValidDBInstanceModificationsRequest(input) - return out, req.Send() -} - -// DescribeValidDBInstanceModificationsWithContext is the same as DescribeValidDBInstanceModifications with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeValidDBInstanceModifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DescribeValidDBInstanceModificationsWithContext(ctx aws.Context, input *DescribeValidDBInstanceModificationsInput, opts ...request.Option) (*DescribeValidDBInstanceModificationsOutput, error) { - req, out := c.DescribeValidDBInstanceModificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDownloadDBLogFilePortion = "DownloadDBLogFilePortion" - -// DownloadDBLogFilePortionRequest generates a "aws/request.Request" representing the -// client's request for the DownloadDBLogFilePortion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DownloadDBLogFilePortion for more information on using the DownloadDBLogFilePortion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DownloadDBLogFilePortionRequest method. -// req, resp := client.DownloadDBLogFilePortionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DownloadDBLogFilePortion -func (c *RDS) DownloadDBLogFilePortionRequest(input *DownloadDBLogFilePortionInput) (req *request.Request, output *DownloadDBLogFilePortionOutput) { - op := &request.Operation{ - Name: opDownloadDBLogFilePortion, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "NumberOfLines", - TruncationToken: "AdditionalDataPending", - }, - } - - if input == nil { - input = &DownloadDBLogFilePortionInput{} - } - - output = &DownloadDBLogFilePortionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DownloadDBLogFilePortion API operation for Amazon Relational Database Service. -// -// Downloads all or a portion of the specified log file, up to 1 MB in size. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation DownloadDBLogFilePortion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeDBLogFileNotFoundFault "DBLogFileNotFoundFault" -// LogFileName doesn't refer to an existing DB log file. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DownloadDBLogFilePortion -func (c *RDS) DownloadDBLogFilePortion(input *DownloadDBLogFilePortionInput) (*DownloadDBLogFilePortionOutput, error) { - req, out := c.DownloadDBLogFilePortionRequest(input) - return out, req.Send() -} - -// DownloadDBLogFilePortionWithContext is the same as DownloadDBLogFilePortion with the addition of -// the ability to pass a context and additional request options. -// -// See DownloadDBLogFilePortion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) DownloadDBLogFilePortionWithContext(ctx aws.Context, input *DownloadDBLogFilePortionInput, opts ...request.Option) (*DownloadDBLogFilePortionOutput, error) { - req, out := c.DownloadDBLogFilePortionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DownloadDBLogFilePortionPages iterates over the pages of a DownloadDBLogFilePortion operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DownloadDBLogFilePortion 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 DownloadDBLogFilePortion operation. -// pageNum := 0 -// err := client.DownloadDBLogFilePortionPages(params, -// func(page *DownloadDBLogFilePortionOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *RDS) DownloadDBLogFilePortionPages(input *DownloadDBLogFilePortionInput, fn func(*DownloadDBLogFilePortionOutput, bool) bool) error { - return c.DownloadDBLogFilePortionPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DownloadDBLogFilePortionPagesWithContext same as DownloadDBLogFilePortionPages 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 *RDS) DownloadDBLogFilePortionPagesWithContext(ctx aws.Context, input *DownloadDBLogFilePortionInput, fn func(*DownloadDBLogFilePortionOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DownloadDBLogFilePortionInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DownloadDBLogFilePortionRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DownloadDBLogFilePortionOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opFailoverDBCluster = "FailoverDBCluster" - -// FailoverDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the FailoverDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See FailoverDBCluster for more information on using the FailoverDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the FailoverDBClusterRequest method. -// req, resp := client.FailoverDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/FailoverDBCluster -func (c *RDS) FailoverDBClusterRequest(input *FailoverDBClusterInput) (req *request.Request, output *FailoverDBClusterOutput) { - op := &request.Operation{ - Name: opFailoverDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &FailoverDBClusterInput{} - } - - output = &FailoverDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// FailoverDBCluster API operation for Amazon Relational Database Service. -// -// Forces a failover for a DB cluster. -// -// A failover for a DB cluster promotes one of the Aurora Replicas (read-only -// instances) in the DB cluster to be the primary instance (the cluster writer). -// -// Amazon Aurora will automatically fail over to an Aurora Replica, if one exists, -// when the primary instance fails. You can force a failover when you want to -// simulate a failure of a primary instance for testing. Because each instance -// in a DB cluster has its own endpoint address, you will need to clean up and -// re-establish any existing connections that use those endpoint addresses when -// the failover is complete. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation FailoverDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/FailoverDBCluster -func (c *RDS) FailoverDBCluster(input *FailoverDBClusterInput) (*FailoverDBClusterOutput, error) { - req, out := c.FailoverDBClusterRequest(input) - return out, req.Send() -} - -// FailoverDBClusterWithContext is the same as FailoverDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See FailoverDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) FailoverDBClusterWithContext(ctx aws.Context, input *FailoverDBClusterInput, opts ...request.Option) (*FailoverDBClusterOutput, error) { - req, out := c.FailoverDBClusterRequest(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/rds-2014-10-31/ListTagsForResource -func (c *RDS) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for Amazon Relational Database Service. -// -// Lists all tags on an Amazon RDS resource. -// -// For an overview on tagging an Amazon RDS resource, see Tagging Amazon RDS -// Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html) -// in the Amazon RDS User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ListTagsForResource -func (c *RDS) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { - 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 *RDS) 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 opModifyCurrentDBClusterCapacity = "ModifyCurrentDBClusterCapacity" - -// ModifyCurrentDBClusterCapacityRequest generates a "aws/request.Request" representing the -// client's request for the ModifyCurrentDBClusterCapacity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyCurrentDBClusterCapacity for more information on using the ModifyCurrentDBClusterCapacity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyCurrentDBClusterCapacityRequest method. -// req, resp := client.ModifyCurrentDBClusterCapacityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyCurrentDBClusterCapacity -func (c *RDS) ModifyCurrentDBClusterCapacityRequest(input *ModifyCurrentDBClusterCapacityInput) (req *request.Request, output *ModifyCurrentDBClusterCapacityOutput) { - op := &request.Operation{ - Name: opModifyCurrentDBClusterCapacity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyCurrentDBClusterCapacityInput{} - } - - output = &ModifyCurrentDBClusterCapacityOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyCurrentDBClusterCapacity API operation for Amazon Relational Database Service. -// -// Set the capacity of an Aurora Serverless DB cluster to a specific value. -// -// Aurora Serverless scales seamlessly based on the workload on the DB cluster. -// In some cases, the capacity might not scale fast enough to meet a sudden -// change in workload, such as a large number of new transactions. Call ModifyCurrentDBClusterCapacity -// to set the capacity explicitly. -// -// After this call sets the DB cluster capacity, Aurora Serverless can automatically -// scale the DB cluster based on the cooldown period for scaling up and the -// cooldown period for scaling down. -// -// For more information about Aurora Serverless, see Using Amazon Aurora Serverless -// (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) -// in the Amazon Aurora User Guide. -// -// If you call ModifyCurrentDBClusterCapacity with the default TimeoutAction, -// connections that prevent Aurora Serverless from finding a scaling point might -// be dropped. For more information about scaling points, see Autoscaling for -// Aurora Serverless (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html#aurora-serverless.how-it-works.auto-scaling) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ModifyCurrentDBClusterCapacity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeInvalidDBClusterCapacityFault "InvalidDBClusterCapacityFault" -// Capacity isn't a valid Aurora Serverless DB cluster capacity. Valid capacity -// values are 2, 4, 8, 16, 32, 64, 128, and 256. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyCurrentDBClusterCapacity -func (c *RDS) ModifyCurrentDBClusterCapacity(input *ModifyCurrentDBClusterCapacityInput) (*ModifyCurrentDBClusterCapacityOutput, error) { - req, out := c.ModifyCurrentDBClusterCapacityRequest(input) - return out, req.Send() -} - -// ModifyCurrentDBClusterCapacityWithContext is the same as ModifyCurrentDBClusterCapacity with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyCurrentDBClusterCapacity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ModifyCurrentDBClusterCapacityWithContext(ctx aws.Context, input *ModifyCurrentDBClusterCapacityInput, opts ...request.Option) (*ModifyCurrentDBClusterCapacityOutput, error) { - req, out := c.ModifyCurrentDBClusterCapacityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBCluster = "ModifyDBCluster" - -// ModifyDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBCluster for more information on using the ModifyDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBClusterRequest method. -// req, resp := client.ModifyDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBCluster -func (c *RDS) ModifyDBClusterRequest(input *ModifyDBClusterInput) (req *request.Request, output *ModifyDBClusterOutput) { - op := &request.Operation{ - Name: opModifyDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBClusterInput{} - } - - output = &ModifyDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBCluster API operation for Amazon Relational Database Service. -// -// Modify a setting for an Amazon Aurora DB cluster. You can change one or more -// database configuration parameters by specifying these parameters and the -// new values in the request. For more information on Amazon Aurora, see What -// Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ModifyDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would result in the user exceeding the allowed amount of storage -// available across all DB instances. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it's created -// because of users' change. -// -// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it's in use. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter -// group. -// -// * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group doesn't allow deletion. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// The user already has a DB cluster with the given identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBCluster -func (c *RDS) ModifyDBCluster(input *ModifyDBClusterInput) (*ModifyDBClusterOutput, error) { - req, out := c.ModifyDBClusterRequest(input) - return out, req.Send() -} - -// ModifyDBClusterWithContext is the same as ModifyDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ModifyDBClusterWithContext(ctx aws.Context, input *ModifyDBClusterInput, opts ...request.Option) (*ModifyDBClusterOutput, error) { - req, out := c.ModifyDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBClusterEndpoint = "ModifyDBClusterEndpoint" - -// ModifyDBClusterEndpointRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBClusterEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBClusterEndpoint for more information on using the ModifyDBClusterEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBClusterEndpointRequest method. -// req, resp := client.ModifyDBClusterEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterEndpoint -func (c *RDS) ModifyDBClusterEndpointRequest(input *ModifyDBClusterEndpointInput) (req *request.Request, output *ModifyDBClusterEndpointOutput) { - op := &request.Operation{ - Name: opModifyDBClusterEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBClusterEndpointInput{} - } - - output = &ModifyDBClusterEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBClusterEndpoint API operation for Amazon Relational Database Service. -// -// Modifies the properties of an endpoint in an Amazon Aurora DB cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ModifyDBClusterEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeInvalidDBClusterEndpointStateFault "InvalidDBClusterEndpointStateFault" -// The requested operation can't be performed on the endpoint while the endpoint -// is in this state. -// -// * ErrCodeDBClusterEndpointNotFoundFault "DBClusterEndpointNotFoundFault" -// The specified custom endpoint doesn't exist. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterEndpoint -func (c *RDS) ModifyDBClusterEndpoint(input *ModifyDBClusterEndpointInput) (*ModifyDBClusterEndpointOutput, error) { - req, out := c.ModifyDBClusterEndpointRequest(input) - return out, req.Send() -} - -// ModifyDBClusterEndpointWithContext is the same as ModifyDBClusterEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBClusterEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ModifyDBClusterEndpointWithContext(ctx aws.Context, input *ModifyDBClusterEndpointInput, opts ...request.Option) (*ModifyDBClusterEndpointOutput, error) { - req, out := c.ModifyDBClusterEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBClusterParameterGroup = "ModifyDBClusterParameterGroup" - -// ModifyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBClusterParameterGroup for more information on using the ModifyDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBClusterParameterGroupRequest method. -// req, resp := client.ModifyDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterParameterGroup -func (c *RDS) ModifyDBClusterParameterGroupRequest(input *ModifyDBClusterParameterGroupInput) (req *request.Request, output *DBClusterParameterGroupNameMessage) { - op := &request.Operation{ - Name: opModifyDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBClusterParameterGroupInput{} - } - - output = &DBClusterParameterGroupNameMessage{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBClusterParameterGroup API operation for Amazon Relational Database Service. -// -// Modifies the parameters of a DB cluster parameter group. To modify more than -// one parameter, submit a list of the following: ParameterName, ParameterValue, -// and ApplyMethod. A maximum of 20 parameters can be modified in a single request. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Changes to dynamic parameters are applied immediately. Changes to static -// parameters require a reboot without failover to the DB cluster associated -// with the parameter group before the change can take effect. -// -// After you create a DB cluster parameter group, you should wait at least 5 -// minutes before creating your first DB cluster that uses that DB cluster parameter -// group as the default parameter group. This allows Amazon RDS to fully complete -// the create action before the parameter group is used as the default for a -// new DB cluster. This is especially important for parameters that are critical -// when creating the default database for a DB cluster, such as the character -// set for the default database defined by the character_set_database parameter. -// You can use the Parameter Groups option of the Amazon RDS console (https://console.aws.amazon.com/rds/) -// or the DescribeDBClusterParameters command to verify that your DB cluster -// parameter group has been created or modified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ModifyDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you can't delete it when the parameter group -// is in this state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterParameterGroup -func (c *RDS) ModifyDBClusterParameterGroup(input *ModifyDBClusterParameterGroupInput) (*DBClusterParameterGroupNameMessage, error) { - req, out := c.ModifyDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// ModifyDBClusterParameterGroupWithContext is the same as ModifyDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ModifyDBClusterParameterGroupWithContext(ctx aws.Context, input *ModifyDBClusterParameterGroupInput, opts ...request.Option) (*DBClusterParameterGroupNameMessage, error) { - req, out := c.ModifyDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBClusterSnapshotAttribute = "ModifyDBClusterSnapshotAttribute" - -// ModifyDBClusterSnapshotAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBClusterSnapshotAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBClusterSnapshotAttribute for more information on using the ModifyDBClusterSnapshotAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBClusterSnapshotAttributeRequest method. -// req, resp := client.ModifyDBClusterSnapshotAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterSnapshotAttribute -func (c *RDS) ModifyDBClusterSnapshotAttributeRequest(input *ModifyDBClusterSnapshotAttributeInput) (req *request.Request, output *ModifyDBClusterSnapshotAttributeOutput) { - op := &request.Operation{ - Name: opModifyDBClusterSnapshotAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBClusterSnapshotAttributeInput{} - } - - output = &ModifyDBClusterSnapshotAttributeOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBClusterSnapshotAttribute API operation for Amazon Relational Database Service. -// -// Adds an attribute and values to, or removes an attribute and values from, -// a manual DB cluster snapshot. -// -// To share a manual DB cluster snapshot with other AWS accounts, specify restore -// as the AttributeName and use the ValuesToAdd parameter to add a list of IDs -// of the AWS accounts that are authorized to restore the manual DB cluster -// snapshot. Use the value all to make the manual DB cluster snapshot public, -// which means that it can be copied or restored by all AWS accounts. Do not -// add the all value for any manual DB cluster snapshots that contain private -// information that you don't want available to all AWS accounts. If a manual -// DB cluster snapshot is encrypted, it can be shared, but only by specifying -// a list of authorized AWS account IDs for the ValuesToAdd parameter. You can't -// use all as a value for that parameter in this case. -// -// To view which AWS accounts have access to copy or restore a manual DB cluster -// snapshot, or whether a manual DB cluster snapshot public or private, use -// the DescribeDBClusterSnapshotAttributes API action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ModifyDBClusterSnapshotAttribute for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value isn't a valid DB cluster snapshot state. -// -// * ErrCodeSharedSnapshotQuotaExceededFault "SharedSnapshotQuotaExceeded" -// You have exceeded the maximum number of accounts that you can share a manual -// DB snapshot with. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterSnapshotAttribute -func (c *RDS) ModifyDBClusterSnapshotAttribute(input *ModifyDBClusterSnapshotAttributeInput) (*ModifyDBClusterSnapshotAttributeOutput, error) { - req, out := c.ModifyDBClusterSnapshotAttributeRequest(input) - return out, req.Send() -} - -// ModifyDBClusterSnapshotAttributeWithContext is the same as ModifyDBClusterSnapshotAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBClusterSnapshotAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ModifyDBClusterSnapshotAttributeWithContext(ctx aws.Context, input *ModifyDBClusterSnapshotAttributeInput, opts ...request.Option) (*ModifyDBClusterSnapshotAttributeOutput, error) { - req, out := c.ModifyDBClusterSnapshotAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBInstance = "ModifyDBInstance" - -// ModifyDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBInstance for more information on using the ModifyDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBInstanceRequest method. -// req, resp := client.ModifyDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBInstance -func (c *RDS) ModifyDBInstanceRequest(input *ModifyDBInstanceInput) (req *request.Request, output *ModifyDBInstanceOutput) { - op := &request.Operation{ - Name: opModifyDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBInstanceInput{} - } - - output = &ModifyDBInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBInstance API operation for Amazon Relational Database Service. -// -// Modifies settings for a DB instance. You can change one or more database -// configuration parameters by specifying these parameters and the new values -// in the request. To learn what modifications you can make to your DB instance, -// call DescribeValidDBInstanceModifications before you call ModifyDBInstance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ModifyDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group doesn't allow deletion. -// -// * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// The user already has a DB instance with the given identifier. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName doesn't refer to an existing DB security group. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// The specified DB instance class isn't available in the specified Availability -// Zone. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would result in the user exceeding the allowed amount of storage -// available across all DB instances. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it's created -// because of users' change. -// -// * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" -// Provisioned IOPS not available in the specified Availability Zone. -// -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// The specified option group could not be found. -// -// * ErrCodeDBUpgradeDependencyFailureFault "DBUpgradeDependencyFailure" -// The DB upgrade failed because a resource the DB depends on can't be modified. -// -// * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// Storage of the StorageType specified can't be associated with the DB instance. -// -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// The specified CIDRIP or Amazon EC2 security group isn't authorized for the -// specified DB security group. -// -// RDS also may not be authorized by using IAM to perform necessary actions -// on your behalf. -// -// * ErrCodeCertificateNotFoundFault "CertificateNotFound" -// CertificateIdentifier doesn't refer to an existing certificate. -// -// * ErrCodeDomainNotFoundFault "DomainNotFoundFault" -// Domain doesn't refer to an existing Active Directory domain. -// -// * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" -// The backup policy was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBInstance -func (c *RDS) ModifyDBInstance(input *ModifyDBInstanceInput) (*ModifyDBInstanceOutput, error) { - req, out := c.ModifyDBInstanceRequest(input) - return out, req.Send() -} - -// ModifyDBInstanceWithContext is the same as ModifyDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ModifyDBInstanceWithContext(ctx aws.Context, input *ModifyDBInstanceInput, opts ...request.Option) (*ModifyDBInstanceOutput, error) { - req, out := c.ModifyDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBParameterGroup = "ModifyDBParameterGroup" - -// ModifyDBParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBParameterGroup for more information on using the ModifyDBParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBParameterGroupRequest method. -// req, resp := client.ModifyDBParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBParameterGroup -func (c *RDS) ModifyDBParameterGroupRequest(input *ModifyDBParameterGroupInput) (req *request.Request, output *DBParameterGroupNameMessage) { - op := &request.Operation{ - Name: opModifyDBParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBParameterGroupInput{} - } - - output = &DBParameterGroupNameMessage{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBParameterGroup API operation for Amazon Relational Database Service. -// -// Modifies the parameters of a DB parameter group. To modify more than one -// parameter, submit a list of the following: ParameterName, ParameterValue, -// and ApplyMethod. A maximum of 20 parameters can be modified in a single request. -// -// Changes to dynamic parameters are applied immediately. Changes to static -// parameters require a reboot without failover to the DB instance associated -// with the parameter group before the change can take effect. -// -// After you modify a DB parameter group, you should wait at least 5 minutes -// before creating your first DB instance that uses that DB parameter group -// as the default parameter group. This allows Amazon RDS to fully complete -// the modify action before the parameter group is used as the default for a -// new DB instance. This is especially important for parameters that are critical -// when creating the default database for a DB instance, such as the character -// set for the default database defined by the character_set_database parameter. -// You can use the Parameter Groups option of the Amazon RDS console (https://console.aws.amazon.com/rds/) -// or the DescribeDBParameters command to verify that your DB parameter group -// has been created or modified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ModifyDBParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you can't delete it when the parameter group -// is in this state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBParameterGroup -func (c *RDS) ModifyDBParameterGroup(input *ModifyDBParameterGroupInput) (*DBParameterGroupNameMessage, error) { - req, out := c.ModifyDBParameterGroupRequest(input) - return out, req.Send() -} - -// ModifyDBParameterGroupWithContext is the same as ModifyDBParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ModifyDBParameterGroupWithContext(ctx aws.Context, input *ModifyDBParameterGroupInput, opts ...request.Option) (*DBParameterGroupNameMessage, error) { - req, out := c.ModifyDBParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBSnapshot = "ModifyDBSnapshot" - -// ModifyDBSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBSnapshot for more information on using the ModifyDBSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBSnapshotRequest method. -// req, resp := client.ModifyDBSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSnapshot -func (c *RDS) ModifyDBSnapshotRequest(input *ModifyDBSnapshotInput) (req *request.Request, output *ModifyDBSnapshotOutput) { - op := &request.Operation{ - Name: opModifyDBSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBSnapshotInput{} - } - - output = &ModifyDBSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBSnapshot API operation for Amazon Relational Database Service. -// -// Updates a manual DB snapshot, which can be encrypted or not encrypted, with -// a new engine version. -// -// Amazon RDS supports upgrading DB snapshots for MySQL and Oracle. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ModifyDBSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSnapshot -func (c *RDS) ModifyDBSnapshot(input *ModifyDBSnapshotInput) (*ModifyDBSnapshotOutput, error) { - req, out := c.ModifyDBSnapshotRequest(input) - return out, req.Send() -} - -// ModifyDBSnapshotWithContext is the same as ModifyDBSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ModifyDBSnapshotWithContext(ctx aws.Context, input *ModifyDBSnapshotInput, opts ...request.Option) (*ModifyDBSnapshotOutput, error) { - req, out := c.ModifyDBSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBSnapshotAttribute = "ModifyDBSnapshotAttribute" - -// ModifyDBSnapshotAttributeRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBSnapshotAttribute operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBSnapshotAttribute for more information on using the ModifyDBSnapshotAttribute -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBSnapshotAttributeRequest method. -// req, resp := client.ModifyDBSnapshotAttributeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSnapshotAttribute -func (c *RDS) ModifyDBSnapshotAttributeRequest(input *ModifyDBSnapshotAttributeInput) (req *request.Request, output *ModifyDBSnapshotAttributeOutput) { - op := &request.Operation{ - Name: opModifyDBSnapshotAttribute, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBSnapshotAttributeInput{} - } - - output = &ModifyDBSnapshotAttributeOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBSnapshotAttribute API operation for Amazon Relational Database Service. -// -// Adds an attribute and values to, or removes an attribute and values from, -// a manual DB snapshot. -// -// To share a manual DB snapshot with other AWS accounts, specify restore as -// the AttributeName and use the ValuesToAdd parameter to add a list of IDs -// of the AWS accounts that are authorized to restore the manual DB snapshot. -// Uses the value all to make the manual DB snapshot public, which means it -// can be copied or restored by all AWS accounts. Do not add the all value for -// any manual DB snapshots that contain private information that you don't want -// available to all AWS accounts. If the manual DB snapshot is encrypted, it -// can be shared, but only by specifying a list of authorized AWS account IDs -// for the ValuesToAdd parameter. You can't use all as a value for that parameter -// in this case. -// -// To view which AWS accounts have access to copy or restore a manual DB snapshot, -// or whether a manual DB snapshot public or private, use the DescribeDBSnapshotAttributes -// API action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ModifyDBSnapshotAttribute for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot doesn't allow deletion. -// -// * ErrCodeSharedSnapshotQuotaExceededFault "SharedSnapshotQuotaExceeded" -// You have exceeded the maximum number of accounts that you can share a manual -// DB snapshot with. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSnapshotAttribute -func (c *RDS) ModifyDBSnapshotAttribute(input *ModifyDBSnapshotAttributeInput) (*ModifyDBSnapshotAttributeOutput, error) { - req, out := c.ModifyDBSnapshotAttributeRequest(input) - return out, req.Send() -} - -// ModifyDBSnapshotAttributeWithContext is the same as ModifyDBSnapshotAttribute with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBSnapshotAttribute for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ModifyDBSnapshotAttributeWithContext(ctx aws.Context, input *ModifyDBSnapshotAttributeInput, opts ...request.Option) (*ModifyDBSnapshotAttributeOutput, error) { - req, out := c.ModifyDBSnapshotAttributeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyDBSubnetGroup = "ModifyDBSubnetGroup" - -// ModifyDBSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDBSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDBSubnetGroup for more information on using the ModifyDBSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDBSubnetGroupRequest method. -// req, resp := client.ModifyDBSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSubnetGroup -func (c *RDS) ModifyDBSubnetGroupRequest(input *ModifyDBSubnetGroupInput) (req *request.Request, output *ModifyDBSubnetGroupOutput) { - op := &request.Operation{ - Name: opModifyDBSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDBSubnetGroupInput{} - } - - output = &ModifyDBSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyDBSubnetGroup API operation for Amazon Relational Database Service. -// -// Modifies an existing DB subnet group. DB subnet groups must contain at least -// one subnet in at least two AZs in the AWS Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ModifyDBSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeDBSubnetQuotaExceededFault "DBSubnetQuotaExceededFault" -// The request would result in the user exceeding the allowed number of subnets -// in a DB subnet groups. -// -// * ErrCodeSubnetAlreadyInUse "SubnetAlreadyInUse" -// The DB subnet is already in use in the Availability Zone. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSubnetGroup -func (c *RDS) ModifyDBSubnetGroup(input *ModifyDBSubnetGroupInput) (*ModifyDBSubnetGroupOutput, error) { - req, out := c.ModifyDBSubnetGroupRequest(input) - return out, req.Send() -} - -// ModifyDBSubnetGroupWithContext is the same as ModifyDBSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDBSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ModifyDBSubnetGroupWithContext(ctx aws.Context, input *ModifyDBSubnetGroupInput, opts ...request.Option) (*ModifyDBSubnetGroupOutput, error) { - req, out := c.ModifyDBSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyEventSubscription = "ModifyEventSubscription" - -// ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the ModifyEventSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyEventSubscription for more information on using the ModifyEventSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyEventSubscriptionRequest method. -// req, resp := client.ModifyEventSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyEventSubscription -func (c *RDS) ModifyEventSubscriptionRequest(input *ModifyEventSubscriptionInput) (req *request.Request, output *ModifyEventSubscriptionOutput) { - op := &request.Operation{ - Name: opModifyEventSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyEventSubscriptionInput{} - } - - output = &ModifyEventSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyEventSubscription API operation for Amazon Relational Database Service. -// -// Modifies an existing RDS event notification subscription. Note that you can't -// modify the source identifiers using this call; to change source identifiers -// for a subscription, use the AddSourceIdentifierToSubscription and RemoveSourceIdentifierFromSubscription -// calls. -// -// You can see a list of the event categories for a given SourceType in the -// Events (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html) -// topic in the Amazon RDS User Guide or by using the DescribeEventCategories -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ModifyEventSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEventSubscriptionQuotaExceededFault "EventSubscriptionQuotaExceeded" -// You have reached the maximum number of event subscriptions. -// -// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" -// The subscription name does not exist. -// -// * ErrCodeSNSInvalidTopicFault "SNSInvalidTopic" -// SNS has responded that there is a problem with the SND topic specified. -// -// * ErrCodeSNSNoAuthorizationFault "SNSNoAuthorization" -// You do not have permission to publish to the SNS topic ARN. -// -// * ErrCodeSNSTopicArnNotFoundFault "SNSTopicArnNotFound" -// The SNS topic ARN does not exist. -// -// * ErrCodeSubscriptionCategoryNotFoundFault "SubscriptionCategoryNotFound" -// The supplied category does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyEventSubscription -func (c *RDS) ModifyEventSubscription(input *ModifyEventSubscriptionInput) (*ModifyEventSubscriptionOutput, error) { - req, out := c.ModifyEventSubscriptionRequest(input) - return out, req.Send() -} - -// ModifyEventSubscriptionWithContext is the same as ModifyEventSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyEventSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ModifyEventSubscriptionWithContext(ctx aws.Context, input *ModifyEventSubscriptionInput, opts ...request.Option) (*ModifyEventSubscriptionOutput, error) { - req, out := c.ModifyEventSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyGlobalCluster = "ModifyGlobalCluster" - -// ModifyGlobalClusterRequest generates a "aws/request.Request" representing the -// client's request for the ModifyGlobalCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyGlobalCluster for more information on using the ModifyGlobalCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyGlobalClusterRequest method. -// req, resp := client.ModifyGlobalClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyGlobalCluster -func (c *RDS) ModifyGlobalClusterRequest(input *ModifyGlobalClusterInput) (req *request.Request, output *ModifyGlobalClusterOutput) { - op := &request.Operation{ - Name: opModifyGlobalCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyGlobalClusterInput{} - } - - output = &ModifyGlobalClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyGlobalCluster API operation for Amazon Relational Database Service. -// -// Modify a setting for an Amazon Aurora global cluster. You can change one -// or more database configuration parameters by specifying these parameters -// and the new values in the request. For more information on Amazon Aurora, -// see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ModifyGlobalCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeGlobalClusterNotFoundFault "GlobalClusterNotFoundFault" -// -// * ErrCodeInvalidGlobalClusterStateFault "InvalidGlobalClusterStateFault" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyGlobalCluster -func (c *RDS) ModifyGlobalCluster(input *ModifyGlobalClusterInput) (*ModifyGlobalClusterOutput, error) { - req, out := c.ModifyGlobalClusterRequest(input) - return out, req.Send() -} - -// ModifyGlobalClusterWithContext is the same as ModifyGlobalCluster with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyGlobalCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ModifyGlobalClusterWithContext(ctx aws.Context, input *ModifyGlobalClusterInput, opts ...request.Option) (*ModifyGlobalClusterOutput, error) { - req, out := c.ModifyGlobalClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyOptionGroup = "ModifyOptionGroup" - -// ModifyOptionGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyOptionGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyOptionGroup for more information on using the ModifyOptionGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyOptionGroupRequest method. -// req, resp := client.ModifyOptionGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyOptionGroup -func (c *RDS) ModifyOptionGroupRequest(input *ModifyOptionGroupInput) (req *request.Request, output *ModifyOptionGroupOutput) { - op := &request.Operation{ - Name: opModifyOptionGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyOptionGroupInput{} - } - - output = &ModifyOptionGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyOptionGroup API operation for Amazon Relational Database Service. -// -// Modifies an existing option group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ModifyOptionGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidOptionGroupStateFault "InvalidOptionGroupStateFault" -// The option group isn't in the available state. -// -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// The specified option group could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyOptionGroup -func (c *RDS) ModifyOptionGroup(input *ModifyOptionGroupInput) (*ModifyOptionGroupOutput, error) { - req, out := c.ModifyOptionGroupRequest(input) - return out, req.Send() -} - -// ModifyOptionGroupWithContext is the same as ModifyOptionGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyOptionGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ModifyOptionGroupWithContext(ctx aws.Context, input *ModifyOptionGroupInput, opts ...request.Option) (*ModifyOptionGroupOutput, error) { - req, out := c.ModifyOptionGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPromoteReadReplica = "PromoteReadReplica" - -// PromoteReadReplicaRequest generates a "aws/request.Request" representing the -// client's request for the PromoteReadReplica operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PromoteReadReplica for more information on using the PromoteReadReplica -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PromoteReadReplicaRequest method. -// req, resp := client.PromoteReadReplicaRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PromoteReadReplica -func (c *RDS) PromoteReadReplicaRequest(input *PromoteReadReplicaInput) (req *request.Request, output *PromoteReadReplicaOutput) { - op := &request.Operation{ - Name: opPromoteReadReplica, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PromoteReadReplicaInput{} - } - - output = &PromoteReadReplicaOutput{} - req = c.newRequest(op, input, output) - return -} - -// PromoteReadReplica API operation for Amazon Relational Database Service. -// -// Promotes a Read Replica DB instance to a standalone DB instance. -// -// Backup duration is a function of the amount of changes to the database since -// the previous backup. If you plan to promote a Read Replica to a standalone -// instance, we recommend that you enable backups and complete at least one -// backup prior to promotion. In addition, a Read Replica cannot be promoted -// to a standalone instance when it is in the backing-up status. If you have -// enabled backups on your Read Replica, configure the automated backup window -// so that daily backups do not interfere with Read Replica promotion. -// -// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation PromoteReadReplica for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PromoteReadReplica -func (c *RDS) PromoteReadReplica(input *PromoteReadReplicaInput) (*PromoteReadReplicaOutput, error) { - req, out := c.PromoteReadReplicaRequest(input) - return out, req.Send() -} - -// PromoteReadReplicaWithContext is the same as PromoteReadReplica with the addition of -// the ability to pass a context and additional request options. -// -// See PromoteReadReplica for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) PromoteReadReplicaWithContext(ctx aws.Context, input *PromoteReadReplicaInput, opts ...request.Option) (*PromoteReadReplicaOutput, error) { - req, out := c.PromoteReadReplicaRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPromoteReadReplicaDBCluster = "PromoteReadReplicaDBCluster" - -// PromoteReadReplicaDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the PromoteReadReplicaDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PromoteReadReplicaDBCluster for more information on using the PromoteReadReplicaDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PromoteReadReplicaDBClusterRequest method. -// req, resp := client.PromoteReadReplicaDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PromoteReadReplicaDBCluster -func (c *RDS) PromoteReadReplicaDBClusterRequest(input *PromoteReadReplicaDBClusterInput) (req *request.Request, output *PromoteReadReplicaDBClusterOutput) { - op := &request.Operation{ - Name: opPromoteReadReplicaDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PromoteReadReplicaDBClusterInput{} - } - - output = &PromoteReadReplicaDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// PromoteReadReplicaDBCluster API operation for Amazon Relational Database Service. -// -// Promotes a Read Replica DB cluster to a standalone DB cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation PromoteReadReplicaDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PromoteReadReplicaDBCluster -func (c *RDS) PromoteReadReplicaDBCluster(input *PromoteReadReplicaDBClusterInput) (*PromoteReadReplicaDBClusterOutput, error) { - req, out := c.PromoteReadReplicaDBClusterRequest(input) - return out, req.Send() -} - -// PromoteReadReplicaDBClusterWithContext is the same as PromoteReadReplicaDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See PromoteReadReplicaDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) PromoteReadReplicaDBClusterWithContext(ctx aws.Context, input *PromoteReadReplicaDBClusterInput, opts ...request.Option) (*PromoteReadReplicaDBClusterOutput, error) { - req, out := c.PromoteReadReplicaDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPurchaseReservedDBInstancesOffering = "PurchaseReservedDBInstancesOffering" - -// PurchaseReservedDBInstancesOfferingRequest generates a "aws/request.Request" representing the -// client's request for the PurchaseReservedDBInstancesOffering operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PurchaseReservedDBInstancesOffering for more information on using the PurchaseReservedDBInstancesOffering -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PurchaseReservedDBInstancesOfferingRequest method. -// req, resp := client.PurchaseReservedDBInstancesOfferingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PurchaseReservedDBInstancesOffering -func (c *RDS) PurchaseReservedDBInstancesOfferingRequest(input *PurchaseReservedDBInstancesOfferingInput) (req *request.Request, output *PurchaseReservedDBInstancesOfferingOutput) { - op := &request.Operation{ - Name: opPurchaseReservedDBInstancesOffering, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PurchaseReservedDBInstancesOfferingInput{} - } - - output = &PurchaseReservedDBInstancesOfferingOutput{} - req = c.newRequest(op, input, output) - return -} - -// PurchaseReservedDBInstancesOffering API operation for Amazon Relational Database Service. -// -// Purchases a reserved DB instance offering. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation PurchaseReservedDBInstancesOffering for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReservedDBInstancesOfferingNotFoundFault "ReservedDBInstancesOfferingNotFound" -// Specified offering does not exist. -// -// * ErrCodeReservedDBInstanceAlreadyExistsFault "ReservedDBInstanceAlreadyExists" -// User already has a reservation with the given identifier. -// -// * ErrCodeReservedDBInstanceQuotaExceededFault "ReservedDBInstanceQuotaExceeded" -// Request would exceed the user's DB Instance quota. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PurchaseReservedDBInstancesOffering -func (c *RDS) PurchaseReservedDBInstancesOffering(input *PurchaseReservedDBInstancesOfferingInput) (*PurchaseReservedDBInstancesOfferingOutput, error) { - req, out := c.PurchaseReservedDBInstancesOfferingRequest(input) - return out, req.Send() -} - -// PurchaseReservedDBInstancesOfferingWithContext is the same as PurchaseReservedDBInstancesOffering with the addition of -// the ability to pass a context and additional request options. -// -// See PurchaseReservedDBInstancesOffering for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) PurchaseReservedDBInstancesOfferingWithContext(ctx aws.Context, input *PurchaseReservedDBInstancesOfferingInput, opts ...request.Option) (*PurchaseReservedDBInstancesOfferingOutput, error) { - req, out := c.PurchaseReservedDBInstancesOfferingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRebootDBInstance = "RebootDBInstance" - -// RebootDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RebootDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebootDBInstance for more information on using the RebootDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebootDBInstanceRequest method. -// req, resp := client.RebootDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RebootDBInstance -func (c *RDS) RebootDBInstanceRequest(input *RebootDBInstanceInput) (req *request.Request, output *RebootDBInstanceOutput) { - op := &request.Operation{ - Name: opRebootDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RebootDBInstanceInput{} - } - - output = &RebootDBInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// RebootDBInstance API operation for Amazon Relational Database Service. -// -// You might need to reboot your DB instance, usually for maintenance reasons. -// For example, if you make certain modifications, or if you change the DB parameter -// group associated with the DB instance, you must reboot the instance for the -// changes to take effect. -// -// Rebooting a DB instance restarts the database engine service. Rebooting a -// DB instance results in a momentary outage, during which the DB instance status -// is set to rebooting. -// -// For more information about rebooting, see Rebooting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RebootInstance.html) -// in the Amazon RDS User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation RebootDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RebootDBInstance -func (c *RDS) RebootDBInstance(input *RebootDBInstanceInput) (*RebootDBInstanceOutput, error) { - req, out := c.RebootDBInstanceRequest(input) - return out, req.Send() -} - -// RebootDBInstanceWithContext is the same as RebootDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See RebootDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) RebootDBInstanceWithContext(ctx aws.Context, input *RebootDBInstanceInput, opts ...request.Option) (*RebootDBInstanceOutput, error) { - req, out := c.RebootDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveFromGlobalCluster = "RemoveFromGlobalCluster" - -// RemoveFromGlobalClusterRequest generates a "aws/request.Request" representing the -// client's request for the RemoveFromGlobalCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveFromGlobalCluster for more information on using the RemoveFromGlobalCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveFromGlobalClusterRequest method. -// req, resp := client.RemoveFromGlobalClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveFromGlobalCluster -func (c *RDS) RemoveFromGlobalClusterRequest(input *RemoveFromGlobalClusterInput) (req *request.Request, output *RemoveFromGlobalClusterOutput) { - op := &request.Operation{ - Name: opRemoveFromGlobalCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveFromGlobalClusterInput{} - } - - output = &RemoveFromGlobalClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// RemoveFromGlobalCluster API operation for Amazon Relational Database Service. -// -// Detaches an Aurora secondary cluster from an Aurora global database cluster. -// The cluster becomes a standalone cluster with read-write capability instead -// of being read-only and receiving data from a primary cluster in a different -// region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation RemoveFromGlobalCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeGlobalClusterNotFoundFault "GlobalClusterNotFoundFault" -// -// * ErrCodeInvalidGlobalClusterStateFault "InvalidGlobalClusterStateFault" -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveFromGlobalCluster -func (c *RDS) RemoveFromGlobalCluster(input *RemoveFromGlobalClusterInput) (*RemoveFromGlobalClusterOutput, error) { - req, out := c.RemoveFromGlobalClusterRequest(input) - return out, req.Send() -} - -// RemoveFromGlobalClusterWithContext is the same as RemoveFromGlobalCluster with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveFromGlobalCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) RemoveFromGlobalClusterWithContext(ctx aws.Context, input *RemoveFromGlobalClusterInput, opts ...request.Option) (*RemoveFromGlobalClusterOutput, error) { - req, out := c.RemoveFromGlobalClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveRoleFromDBCluster = "RemoveRoleFromDBCluster" - -// RemoveRoleFromDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the RemoveRoleFromDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveRoleFromDBCluster for more information on using the RemoveRoleFromDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveRoleFromDBClusterRequest method. -// req, resp := client.RemoveRoleFromDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBCluster -func (c *RDS) RemoveRoleFromDBClusterRequest(input *RemoveRoleFromDBClusterInput) (req *request.Request, output *RemoveRoleFromDBClusterOutput) { - op := &request.Operation{ - Name: opRemoveRoleFromDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveRoleFromDBClusterInput{} - } - - output = &RemoveRoleFromDBClusterOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveRoleFromDBCluster API operation for Amazon Relational Database Service. -// -// Disassociates an AWS Identity and Access Management (IAM) role from an Amazon -// Aurora DB cluster. For more information, see Authorizing Amazon Aurora MySQL -// to Access Other AWS Services on Your Behalf (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation RemoveRoleFromDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeDBClusterRoleNotFoundFault "DBClusterRoleNotFound" -// The specified IAM role Amazon Resource Name (ARN) isn't associated with the -// specified DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBCluster -func (c *RDS) RemoveRoleFromDBCluster(input *RemoveRoleFromDBClusterInput) (*RemoveRoleFromDBClusterOutput, error) { - req, out := c.RemoveRoleFromDBClusterRequest(input) - return out, req.Send() -} - -// RemoveRoleFromDBClusterWithContext is the same as RemoveRoleFromDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveRoleFromDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) RemoveRoleFromDBClusterWithContext(ctx aws.Context, input *RemoveRoleFromDBClusterInput, opts ...request.Option) (*RemoveRoleFromDBClusterOutput, error) { - req, out := c.RemoveRoleFromDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveRoleFromDBInstance = "RemoveRoleFromDBInstance" - -// RemoveRoleFromDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RemoveRoleFromDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveRoleFromDBInstance for more information on using the RemoveRoleFromDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveRoleFromDBInstanceRequest method. -// req, resp := client.RemoveRoleFromDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBInstance -func (c *RDS) RemoveRoleFromDBInstanceRequest(input *RemoveRoleFromDBInstanceInput) (req *request.Request, output *RemoveRoleFromDBInstanceOutput) { - op := &request.Operation{ - Name: opRemoveRoleFromDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveRoleFromDBInstanceInput{} - } - - output = &RemoveRoleFromDBInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveRoleFromDBInstance API operation for Amazon Relational Database Service. -// -// Disassociates an AWS Identity and Access Management (IAM) role from a DB -// instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation RemoveRoleFromDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeDBInstanceRoleNotFoundFault "DBInstanceRoleNotFound" -// The specified RoleArn value doesn't match the specifed feature for the DB -// instance. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBInstance -func (c *RDS) RemoveRoleFromDBInstance(input *RemoveRoleFromDBInstanceInput) (*RemoveRoleFromDBInstanceOutput, error) { - req, out := c.RemoveRoleFromDBInstanceRequest(input) - return out, req.Send() -} - -// RemoveRoleFromDBInstanceWithContext is the same as RemoveRoleFromDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveRoleFromDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) RemoveRoleFromDBInstanceWithContext(ctx aws.Context, input *RemoveRoleFromDBInstanceInput, opts ...request.Option) (*RemoveRoleFromDBInstanceOutput, error) { - req, out := c.RemoveRoleFromDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveSourceIdentifierFromSubscription = "RemoveSourceIdentifierFromSubscription" - -// RemoveSourceIdentifierFromSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the RemoveSourceIdentifierFromSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveSourceIdentifierFromSubscription for more information on using the RemoveSourceIdentifierFromSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveSourceIdentifierFromSubscriptionRequest method. -// req, resp := client.RemoveSourceIdentifierFromSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveSourceIdentifierFromSubscription -func (c *RDS) RemoveSourceIdentifierFromSubscriptionRequest(input *RemoveSourceIdentifierFromSubscriptionInput) (req *request.Request, output *RemoveSourceIdentifierFromSubscriptionOutput) { - op := &request.Operation{ - Name: opRemoveSourceIdentifierFromSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveSourceIdentifierFromSubscriptionInput{} - } - - output = &RemoveSourceIdentifierFromSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// RemoveSourceIdentifierFromSubscription API operation for Amazon Relational Database Service. -// -// Removes a source identifier from an existing RDS event notification subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation RemoveSourceIdentifierFromSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" -// The subscription name does not exist. -// -// * ErrCodeSourceNotFoundFault "SourceNotFound" -// The requested source could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveSourceIdentifierFromSubscription -func (c *RDS) RemoveSourceIdentifierFromSubscription(input *RemoveSourceIdentifierFromSubscriptionInput) (*RemoveSourceIdentifierFromSubscriptionOutput, error) { - req, out := c.RemoveSourceIdentifierFromSubscriptionRequest(input) - return out, req.Send() -} - -// RemoveSourceIdentifierFromSubscriptionWithContext is the same as RemoveSourceIdentifierFromSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveSourceIdentifierFromSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) RemoveSourceIdentifierFromSubscriptionWithContext(ctx aws.Context, input *RemoveSourceIdentifierFromSubscriptionInput, opts ...request.Option) (*RemoveSourceIdentifierFromSubscriptionOutput, error) { - req, out := c.RemoveSourceIdentifierFromSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTagsFromResource = "RemoveTagsFromResource" - -// RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTagsFromResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTagsFromResource for more information on using the RemoveTagsFromResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsFromResourceRequest method. -// req, resp := client.RemoveTagsFromResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveTagsFromResource -func (c *RDS) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *RemoveTagsFromResourceOutput) { - op := &request.Operation{ - Name: opRemoveTagsFromResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsFromResourceInput{} - } - - output = &RemoveTagsFromResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTagsFromResource API operation for Amazon Relational Database Service. -// -// Removes metadata tags from an Amazon RDS resource. -// -// For an overview on tagging an Amazon RDS resource, see Tagging Amazon RDS -// Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html) -// in the Amazon RDS User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation RemoveTagsFromResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveTagsFromResource -func (c *RDS) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - return out, req.Send() -} - -// RemoveTagsFromResourceWithContext is the same as RemoveTagsFromResource with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTagsFromResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*RemoveTagsFromResourceOutput, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetDBClusterParameterGroup = "ResetDBClusterParameterGroup" - -// ResetDBClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ResetDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetDBClusterParameterGroup for more information on using the ResetDBClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetDBClusterParameterGroupRequest method. -// req, resp := client.ResetDBClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ResetDBClusterParameterGroup -func (c *RDS) ResetDBClusterParameterGroupRequest(input *ResetDBClusterParameterGroupInput) (req *request.Request, output *DBClusterParameterGroupNameMessage) { - op := &request.Operation{ - Name: opResetDBClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetDBClusterParameterGroupInput{} - } - - output = &DBClusterParameterGroupNameMessage{} - req = c.newRequest(op, input, output) - return -} - -// ResetDBClusterParameterGroup API operation for Amazon Relational Database Service. -// -// Modifies the parameters of a DB cluster parameter group to the default value. -// To reset specific parameters submit a list of the following: ParameterName -// and ApplyMethod. To reset the entire DB cluster parameter group, specify -// the DBClusterParameterGroupName and ResetAllParameters parameters. -// -// When resetting the entire group, dynamic parameters are updated immediately -// and static parameters are set to pending-reboot to take effect on the next -// DB instance restart or RebootDBInstance request. You must call RebootDBInstance -// for every DB instance in your DB cluster that you want the updated static -// parameter to apply to. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ResetDBClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you can't delete it when the parameter group -// is in this state. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ResetDBClusterParameterGroup -func (c *RDS) ResetDBClusterParameterGroup(input *ResetDBClusterParameterGroupInput) (*DBClusterParameterGroupNameMessage, error) { - req, out := c.ResetDBClusterParameterGroupRequest(input) - return out, req.Send() -} - -// ResetDBClusterParameterGroupWithContext is the same as ResetDBClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ResetDBClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ResetDBClusterParameterGroupWithContext(ctx aws.Context, input *ResetDBClusterParameterGroupInput, opts ...request.Option) (*DBClusterParameterGroupNameMessage, error) { - req, out := c.ResetDBClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetDBParameterGroup = "ResetDBParameterGroup" - -// ResetDBParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ResetDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetDBParameterGroup for more information on using the ResetDBParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetDBParameterGroupRequest method. -// req, resp := client.ResetDBParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ResetDBParameterGroup -func (c *RDS) ResetDBParameterGroupRequest(input *ResetDBParameterGroupInput) (req *request.Request, output *DBParameterGroupNameMessage) { - op := &request.Operation{ - Name: opResetDBParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetDBParameterGroupInput{} - } - - output = &DBParameterGroupNameMessage{} - req = c.newRequest(op, input, output) - return -} - -// ResetDBParameterGroup API operation for Amazon Relational Database Service. -// -// Modifies the parameters of a DB parameter group to the engine/system default -// value. To reset specific parameters, provide a list of the following: ParameterName -// and ApplyMethod. To reset the entire DB parameter group, specify the DBParameterGroup -// name and ResetAllParameters parameters. When resetting the entire group, -// dynamic parameters are updated immediately and static parameters are set -// to pending-reboot to take effect on the next DB instance restart or RebootDBInstance -// request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation ResetDBParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" -// The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you can't delete it when the parameter group -// is in this state. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ResetDBParameterGroup -func (c *RDS) ResetDBParameterGroup(input *ResetDBParameterGroupInput) (*DBParameterGroupNameMessage, error) { - req, out := c.ResetDBParameterGroupRequest(input) - return out, req.Send() -} - -// ResetDBParameterGroupWithContext is the same as ResetDBParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ResetDBParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) ResetDBParameterGroupWithContext(ctx aws.Context, input *ResetDBParameterGroupInput, opts ...request.Option) (*DBParameterGroupNameMessage, error) { - req, out := c.ResetDBParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreDBClusterFromS3 = "RestoreDBClusterFromS3" - -// RestoreDBClusterFromS3Request generates a "aws/request.Request" representing the -// client's request for the RestoreDBClusterFromS3 operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreDBClusterFromS3 for more information on using the RestoreDBClusterFromS3 -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreDBClusterFromS3Request method. -// req, resp := client.RestoreDBClusterFromS3Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterFromS3 -func (c *RDS) RestoreDBClusterFromS3Request(input *RestoreDBClusterFromS3Input) (req *request.Request, output *RestoreDBClusterFromS3Output) { - op := &request.Operation{ - Name: opRestoreDBClusterFromS3, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreDBClusterFromS3Input{} - } - - output = &RestoreDBClusterFromS3Output{} - req = c.newRequest(op, input, output) - return -} - -// RestoreDBClusterFromS3 API operation for Amazon Relational Database Service. -// -// Creates an Amazon Aurora DB cluster from data stored in an Amazon S3 bucket. -// Amazon RDS must be authorized to access the Amazon S3 bucket and the data -// must be created using the Percona XtraBackup utility as described in Migrating -// Data to an Amazon Aurora MySQL DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Migrating.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation RestoreDBClusterFromS3 for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// The user already has a DB cluster with the given identifier. -// -// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// The user attempted to create a new DB cluster and the user has already reached -// the maximum allowed DB cluster quota. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would result in the user exceeding the allowed amount of storage -// available across all DB instances. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it's created -// because of users' change. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it's in use. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeInvalidS3BucketFault "InvalidS3BucketFault" -// The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized -// to access the specified Amazon S3 bucket. Verify the SourceS3BucketName and -// S3IngestionRoleArn values and try again. -// -// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter -// group. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred accessing an AWS KMS key. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You might -// be able to resolve this error by updating your subnet group to use different -// Availability Zones that have more storage available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterFromS3 -func (c *RDS) RestoreDBClusterFromS3(input *RestoreDBClusterFromS3Input) (*RestoreDBClusterFromS3Output, error) { - req, out := c.RestoreDBClusterFromS3Request(input) - return out, req.Send() -} - -// RestoreDBClusterFromS3WithContext is the same as RestoreDBClusterFromS3 with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreDBClusterFromS3 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) RestoreDBClusterFromS3WithContext(ctx aws.Context, input *RestoreDBClusterFromS3Input, opts ...request.Option) (*RestoreDBClusterFromS3Output, error) { - req, out := c.RestoreDBClusterFromS3Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreDBClusterFromSnapshot = "RestoreDBClusterFromSnapshot" - -// RestoreDBClusterFromSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the RestoreDBClusterFromSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreDBClusterFromSnapshot for more information on using the RestoreDBClusterFromSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreDBClusterFromSnapshotRequest method. -// req, resp := client.RestoreDBClusterFromSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterFromSnapshot -func (c *RDS) RestoreDBClusterFromSnapshotRequest(input *RestoreDBClusterFromSnapshotInput) (req *request.Request, output *RestoreDBClusterFromSnapshotOutput) { - op := &request.Operation{ - Name: opRestoreDBClusterFromSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreDBClusterFromSnapshotInput{} - } - - output = &RestoreDBClusterFromSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// RestoreDBClusterFromSnapshot API operation for Amazon Relational Database Service. -// -// Creates a new DB cluster from a DB snapshot or DB cluster snapshot. -// -// If a DB snapshot is specified, the target DB cluster is created from the -// source DB snapshot with a default configuration and default security group. -// -// If a DB cluster snapshot is specified, the target DB cluster is created from -// the source DB cluster restore point with the same configuration as the original -// source DB cluster, except that the new DB cluster is created with the default -// security group. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation RestoreDBClusterFromSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// The user already has a DB cluster with the given identifier. -// -// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// The user attempted to create a new DB cluster and the user has already reached -// the maximum allowed DB cluster quota. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would result in the user exceeding the allowed amount of storage -// available across all DB instances. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. -// -// * ErrCodeInsufficientDBClusterCapacityFault "InsufficientDBClusterCapacityFault" -// The DB cluster doesn't have enough capacity for the current operation. -// -// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You might -// be able to resolve this error by updating your subnet group to use different -// Availability Zones that have more storage available. -// -// * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot doesn't allow deletion. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value isn't a valid DB cluster snapshot state. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would result in the user exceeding the allowed amount of storage -// available across all DB instances. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it's created -// because of users' change. -// -// * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// Cannot restore from VPC backup to non-VPC DB instance. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// The specified option group could not be found. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred accessing an AWS KMS key. -// -// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter -// group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterFromSnapshot -func (c *RDS) RestoreDBClusterFromSnapshot(input *RestoreDBClusterFromSnapshotInput) (*RestoreDBClusterFromSnapshotOutput, error) { - req, out := c.RestoreDBClusterFromSnapshotRequest(input) - return out, req.Send() -} - -// RestoreDBClusterFromSnapshotWithContext is the same as RestoreDBClusterFromSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreDBClusterFromSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) RestoreDBClusterFromSnapshotWithContext(ctx aws.Context, input *RestoreDBClusterFromSnapshotInput, opts ...request.Option) (*RestoreDBClusterFromSnapshotOutput, error) { - req, out := c.RestoreDBClusterFromSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreDBClusterToPointInTime = "RestoreDBClusterToPointInTime" - -// RestoreDBClusterToPointInTimeRequest generates a "aws/request.Request" representing the -// client's request for the RestoreDBClusterToPointInTime operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreDBClusterToPointInTime for more information on using the RestoreDBClusterToPointInTime -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreDBClusterToPointInTimeRequest method. -// req, resp := client.RestoreDBClusterToPointInTimeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterToPointInTime -func (c *RDS) RestoreDBClusterToPointInTimeRequest(input *RestoreDBClusterToPointInTimeInput) (req *request.Request, output *RestoreDBClusterToPointInTimeOutput) { - op := &request.Operation{ - Name: opRestoreDBClusterToPointInTime, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreDBClusterToPointInTimeInput{} - } - - output = &RestoreDBClusterToPointInTimeOutput{} - req = c.newRequest(op, input, output) - return -} - -// RestoreDBClusterToPointInTime API operation for Amazon Relational Database Service. -// -// Restores a DB cluster to an arbitrary point in time. Users can restore to -// any point in time before LatestRestorableTime for up to BackupRetentionPeriod -// days. The target DB cluster is created from the source DB cluster with the -// same configuration as the original DB cluster, except that the new DB cluster -// is created with the default DB security group. -// -// This action only restores the DB cluster, not the DB instances for that DB -// cluster. You must invoke the CreateDBInstance action to create DB instances -// for the restored DB cluster, specifying the identifier of the restored DB -// cluster in DBClusterIdentifier. You can create DB instances only after the -// RestoreDBClusterToPointInTime action has completed and the DB cluster is -// available. -// -// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation RestoreDBClusterToPointInTime for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// The user already has a DB cluster with the given identifier. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// The user attempted to create a new DB cluster and the user has already reached -// the maximum allowed DB cluster quota. -// -// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeInsufficientDBClusterCapacityFault "InsufficientDBClusterCapacityFault" -// The DB cluster doesn't have enough capacity for the current operation. -// -// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You might -// be able to resolve this error by updating your subnet group to use different -// Availability Zones that have more storage available. -// -// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value isn't a valid DB cluster snapshot state. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot doesn't allow deletion. -// -// * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// Cannot restore from VPC backup to non-VPC DB instance. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it's created -// because of users' change. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred accessing an AWS KMS key. -// -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// The specified option group could not be found. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would result in the user exceeding the allowed amount of storage -// available across all DB instances. -// -// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter -// group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterToPointInTime -func (c *RDS) RestoreDBClusterToPointInTime(input *RestoreDBClusterToPointInTimeInput) (*RestoreDBClusterToPointInTimeOutput, error) { - req, out := c.RestoreDBClusterToPointInTimeRequest(input) - return out, req.Send() -} - -// RestoreDBClusterToPointInTimeWithContext is the same as RestoreDBClusterToPointInTime with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreDBClusterToPointInTime for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) RestoreDBClusterToPointInTimeWithContext(ctx aws.Context, input *RestoreDBClusterToPointInTimeInput, opts ...request.Option) (*RestoreDBClusterToPointInTimeOutput, error) { - req, out := c.RestoreDBClusterToPointInTimeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreDBInstanceFromDBSnapshot = "RestoreDBInstanceFromDBSnapshot" - -// RestoreDBInstanceFromDBSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the RestoreDBInstanceFromDBSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreDBInstanceFromDBSnapshot for more information on using the RestoreDBInstanceFromDBSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreDBInstanceFromDBSnapshotRequest method. -// req, resp := client.RestoreDBInstanceFromDBSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromDBSnapshot -func (c *RDS) RestoreDBInstanceFromDBSnapshotRequest(input *RestoreDBInstanceFromDBSnapshotInput) (req *request.Request, output *RestoreDBInstanceFromDBSnapshotOutput) { - op := &request.Operation{ - Name: opRestoreDBInstanceFromDBSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreDBInstanceFromDBSnapshotInput{} - } - - output = &RestoreDBInstanceFromDBSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// RestoreDBInstanceFromDBSnapshot API operation for Amazon Relational Database Service. -// -// Creates a new DB instance from a DB snapshot. The target database is created -// from the source database restore point with the most of original configuration -// with the default security group and the default DB parameter group. By default, -// the new DB instance is created as a single-AZ deployment except when the -// instance is a SQL Server instance that has an option group that is associated -// with mirroring; in this case, the instance becomes a mirrored AZ deployment -// and not a single-AZ deployment. -// -// If your intent is to replace your original DB instance with the new, restored -// DB instance, then rename your original DB instance before you call the RestoreDBInstanceFromDBSnapshot -// action. RDS doesn't allow two DB instances with the same name. Once you have -// renamed your original DB instance with a different identifier, then you can -// pass the original name of the DB instance as the DBInstanceIdentifier in -// the call to the RestoreDBInstanceFromDBSnapshot action. The result is that -// you will replace the original DB instance with the DB instance created from -// the snapshot. -// -// If you are restoring from a shared manual DB snapshot, the DBSnapshotIdentifier -// must be the ARN of the shared DB snapshot. -// -// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora, -// use RestoreDBClusterFromSnapshot. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation RestoreDBInstanceFromDBSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// The user already has a DB instance with the given identifier. -// -// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. -// -// * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB instances. -// -// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// The specified DB instance class isn't available in the specified Availability -// Zone. -// -// * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot doesn't allow deletion. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would result in the user exceeding the allowed amount of storage -// available across all DB instances. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it's created -// because of users' change. -// -// * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// Cannot restore from VPC backup to non-VPC DB instance. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" -// Provisioned IOPS not available in the specified Availability Zone. -// -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// The specified option group could not be found. -// -// * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// Storage of the StorageType specified can't be associated with the DB instance. -// -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// The specified CIDRIP or Amazon EC2 security group isn't authorized for the -// specified DB security group. -// -// RDS also may not be authorized by using IAM to perform necessary actions -// on your behalf. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred accessing an AWS KMS key. -// -// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName doesn't refer to an existing DB security group. -// -// * ErrCodeDomainNotFoundFault "DomainNotFoundFault" -// Domain doesn't refer to an existing Active Directory domain. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" -// The backup policy was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromDBSnapshot -func (c *RDS) RestoreDBInstanceFromDBSnapshot(input *RestoreDBInstanceFromDBSnapshotInput) (*RestoreDBInstanceFromDBSnapshotOutput, error) { - req, out := c.RestoreDBInstanceFromDBSnapshotRequest(input) - return out, req.Send() -} - -// RestoreDBInstanceFromDBSnapshotWithContext is the same as RestoreDBInstanceFromDBSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreDBInstanceFromDBSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) RestoreDBInstanceFromDBSnapshotWithContext(ctx aws.Context, input *RestoreDBInstanceFromDBSnapshotInput, opts ...request.Option) (*RestoreDBInstanceFromDBSnapshotOutput, error) { - req, out := c.RestoreDBInstanceFromDBSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreDBInstanceFromS3 = "RestoreDBInstanceFromS3" - -// RestoreDBInstanceFromS3Request generates a "aws/request.Request" representing the -// client's request for the RestoreDBInstanceFromS3 operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreDBInstanceFromS3 for more information on using the RestoreDBInstanceFromS3 -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreDBInstanceFromS3Request method. -// req, resp := client.RestoreDBInstanceFromS3Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromS3 -func (c *RDS) RestoreDBInstanceFromS3Request(input *RestoreDBInstanceFromS3Input) (req *request.Request, output *RestoreDBInstanceFromS3Output) { - op := &request.Operation{ - Name: opRestoreDBInstanceFromS3, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreDBInstanceFromS3Input{} - } - - output = &RestoreDBInstanceFromS3Output{} - req = c.newRequest(op, input, output) - return -} - -// RestoreDBInstanceFromS3 API operation for Amazon Relational Database Service. -// -// Amazon Relational Database Service (Amazon RDS) supports importing MySQL -// databases by using backup files. You can create a backup of your on-premises -// database, store it on Amazon Simple Storage Service (Amazon S3), and then -// restore the backup file onto a new Amazon RDS DB instance running MySQL. -// For more information, see Importing Data into an Amazon RDS MySQL DB Instance -// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html) -// in the Amazon RDS User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation RestoreDBInstanceFromS3 for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// The user already has a DB instance with the given identifier. -// -// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// The specified DB instance class isn't available in the specified Availability -// Zone. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName doesn't refer to an existing DB security group. -// -// * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB instances. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would result in the user exceeding the allowed amount of storage -// available across all DB instances. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it's created -// because of users' change. -// -// * ErrCodeInvalidS3BucketFault "InvalidS3BucketFault" -// The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized -// to access the specified Amazon S3 bucket. Verify the SourceS3BucketName and -// S3IngestionRoleArn values and try again. -// -// * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" -// Provisioned IOPS not available in the specified Availability Zone. -// -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// The specified option group could not be found. -// -// * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// Storage of the StorageType specified can't be associated with the DB instance. -// -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// The specified CIDRIP or Amazon EC2 security group isn't authorized for the -// specified DB security group. -// -// RDS also may not be authorized by using IAM to perform necessary actions -// on your behalf. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred accessing an AWS KMS key. -// -// * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" -// The backup policy was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromS3 -func (c *RDS) RestoreDBInstanceFromS3(input *RestoreDBInstanceFromS3Input) (*RestoreDBInstanceFromS3Output, error) { - req, out := c.RestoreDBInstanceFromS3Request(input) - return out, req.Send() -} - -// RestoreDBInstanceFromS3WithContext is the same as RestoreDBInstanceFromS3 with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreDBInstanceFromS3 for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) RestoreDBInstanceFromS3WithContext(ctx aws.Context, input *RestoreDBInstanceFromS3Input, opts ...request.Option) (*RestoreDBInstanceFromS3Output, error) { - req, out := c.RestoreDBInstanceFromS3Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreDBInstanceToPointInTime = "RestoreDBInstanceToPointInTime" - -// RestoreDBInstanceToPointInTimeRequest generates a "aws/request.Request" representing the -// client's request for the RestoreDBInstanceToPointInTime operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreDBInstanceToPointInTime for more information on using the RestoreDBInstanceToPointInTime -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreDBInstanceToPointInTimeRequest method. -// req, resp := client.RestoreDBInstanceToPointInTimeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceToPointInTime -func (c *RDS) RestoreDBInstanceToPointInTimeRequest(input *RestoreDBInstanceToPointInTimeInput) (req *request.Request, output *RestoreDBInstanceToPointInTimeOutput) { - op := &request.Operation{ - Name: opRestoreDBInstanceToPointInTime, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreDBInstanceToPointInTimeInput{} - } - - output = &RestoreDBInstanceToPointInTimeOutput{} - req = c.newRequest(op, input, output) - return -} - -// RestoreDBInstanceToPointInTime API operation for Amazon Relational Database Service. -// -// Restores a DB instance to an arbitrary point in time. You can restore to -// any point in time before the time identified by the LatestRestorableTime -// property. You can restore to a point up to the number of days specified by -// the BackupRetentionPeriod property. -// -// The target database is created with most of the original configuration, but -// in a system-selected Availability Zone, with the default security group, -// the default subnet group, and the default DB parameter group. By default, -// the new DB instance is created as a single-AZ deployment except when the -// instance is a SQL Server instance that has an option group that is associated -// with mirroring; in this case, the instance becomes a mirrored deployment -// and not a single-AZ deployment. -// -// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora, -// use RestoreDBClusterToPointInTime. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation RestoreDBInstanceToPointInTime for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// The user already has a DB instance with the given identifier. -// -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB instances. -// -// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// The specified DB instance class isn't available in the specified Availability -// Zone. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// * ErrCodePointInTimeRestoreNotEnabledFault "PointInTimeRestoreNotEnabled" -// SourceDBInstanceIdentifier refers to a DB instance with BackupRetentionPeriod -// equal to 0. -// -// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// The request would result in the user exceeding the allowed amount of storage -// available across all DB instances. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it's created -// because of users' change. -// -// * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// Cannot restore from VPC backup to non-VPC DB instance. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" -// Provisioned IOPS not available in the specified Availability Zone. -// -// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" -// The specified option group could not be found. -// -// * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// Storage of the StorageType specified can't be associated with the DB instance. -// -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// The specified CIDRIP or Amazon EC2 security group isn't authorized for the -// specified DB security group. -// -// RDS also may not be authorized by using IAM to perform necessary actions -// on your behalf. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred accessing an AWS KMS key. -// -// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName doesn't refer to an existing DB security group. -// -// * ErrCodeDomainNotFoundFault "DomainNotFoundFault" -// Domain doesn't refer to an existing Active Directory domain. -// -// * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" -// The backup policy was not found. -// -// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName doesn't refer to an existing DB parameter group. -// -// * ErrCodeDBInstanceAutomatedBackupNotFoundFault "DBInstanceAutomatedBackupNotFound" -// No automated backup for this DB instance was found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceToPointInTime -func (c *RDS) RestoreDBInstanceToPointInTime(input *RestoreDBInstanceToPointInTimeInput) (*RestoreDBInstanceToPointInTimeOutput, error) { - req, out := c.RestoreDBInstanceToPointInTimeRequest(input) - return out, req.Send() -} - -// RestoreDBInstanceToPointInTimeWithContext is the same as RestoreDBInstanceToPointInTime with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreDBInstanceToPointInTime for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) RestoreDBInstanceToPointInTimeWithContext(ctx aws.Context, input *RestoreDBInstanceToPointInTimeInput, opts ...request.Option) (*RestoreDBInstanceToPointInTimeOutput, error) { - req, out := c.RestoreDBInstanceToPointInTimeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRevokeDBSecurityGroupIngress = "RevokeDBSecurityGroupIngress" - -// RevokeDBSecurityGroupIngressRequest generates a "aws/request.Request" representing the -// client's request for the RevokeDBSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RevokeDBSecurityGroupIngress for more information on using the RevokeDBSecurityGroupIngress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RevokeDBSecurityGroupIngressRequest method. -// req, resp := client.RevokeDBSecurityGroupIngressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RevokeDBSecurityGroupIngress -func (c *RDS) RevokeDBSecurityGroupIngressRequest(input *RevokeDBSecurityGroupIngressInput) (req *request.Request, output *RevokeDBSecurityGroupIngressOutput) { - op := &request.Operation{ - Name: opRevokeDBSecurityGroupIngress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RevokeDBSecurityGroupIngressInput{} - } - - output = &RevokeDBSecurityGroupIngressOutput{} - req = c.newRequest(op, input, output) - return -} - -// RevokeDBSecurityGroupIngress API operation for Amazon Relational Database Service. -// -// Revokes ingress from a DBSecurityGroup for previously authorized IP ranges -// or EC2 or VPC Security Groups. Required parameters for this API are one of -// CIDRIP, EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId and either -// EC2SecurityGroupName or EC2SecurityGroupId). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation RevokeDBSecurityGroupIngress for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName doesn't refer to an existing DB security group. -// -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// The specified CIDRIP or Amazon EC2 security group isn't authorized for the -// specified DB security group. -// -// RDS also may not be authorized by using IAM to perform necessary actions -// on your behalf. -// -// * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group doesn't allow deletion. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RevokeDBSecurityGroupIngress -func (c *RDS) RevokeDBSecurityGroupIngress(input *RevokeDBSecurityGroupIngressInput) (*RevokeDBSecurityGroupIngressOutput, error) { - req, out := c.RevokeDBSecurityGroupIngressRequest(input) - return out, req.Send() -} - -// RevokeDBSecurityGroupIngressWithContext is the same as RevokeDBSecurityGroupIngress with the addition of -// the ability to pass a context and additional request options. -// -// See RevokeDBSecurityGroupIngress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) RevokeDBSecurityGroupIngressWithContext(ctx aws.Context, input *RevokeDBSecurityGroupIngressInput, opts ...request.Option) (*RevokeDBSecurityGroupIngressOutput, error) { - req, out := c.RevokeDBSecurityGroupIngressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartDBCluster = "StartDBCluster" - -// StartDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the StartDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartDBCluster for more information on using the StartDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartDBClusterRequest method. -// req, resp := client.StartDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster -func (c *RDS) StartDBClusterRequest(input *StartDBClusterInput) (req *request.Request, output *StartDBClusterOutput) { - op := &request.Operation{ - Name: opStartDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartDBClusterInput{} - } - - output = &StartDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartDBCluster API operation for Amazon Relational Database Service. -// -// Starts an Amazon Aurora DB cluster that was stopped using the AWS console, -// the stop-db-cluster AWS CLI command, or the StopDBCluster action. -// -// For more information, see Stopping and Starting an Aurora Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation StartDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster -func (c *RDS) StartDBCluster(input *StartDBClusterInput) (*StartDBClusterOutput, error) { - req, out := c.StartDBClusterRequest(input) - return out, req.Send() -} - -// StartDBClusterWithContext is the same as StartDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See StartDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) StartDBClusterWithContext(ctx aws.Context, input *StartDBClusterInput, opts ...request.Option) (*StartDBClusterOutput, error) { - req, out := c.StartDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartDBInstance = "StartDBInstance" - -// StartDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the StartDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartDBInstance for more information on using the StartDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartDBInstanceRequest method. -// req, resp := client.StartDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBInstance -func (c *RDS) StartDBInstanceRequest(input *StartDBInstanceInput) (req *request.Request, output *StartDBInstanceOutput) { - op := &request.Operation{ - Name: opStartDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartDBInstanceInput{} - } - - output = &StartDBInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartDBInstance API operation for Amazon Relational Database Service. -// -// Starts an Amazon RDS DB instance that was stopped using the AWS console, -// the stop-db-instance AWS CLI command, or the StopDBInstance action. -// -// For more information, see Starting an Amazon RDS DB instance That Was Previously -// Stopped (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StartInstance.html) -// in the Amazon RDS User Guide. -// -// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora -// DB clusters, use StartDBCluster instead. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation StartDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// The specified DB instance class isn't available in the specified Availability -// Zone. -// -// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName doesn't refer to an existing DB subnet group. -// -// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" -// Subnets in the DB subnet group should cover at least two Availability Zones -// unless there is only one Availability Zone. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is invalid, or multiple subnets were requested that -// are not all in a common VPC. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The DB subnet group doesn't cover all Availability Zones after it's created -// because of users' change. -// -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// The specified CIDRIP or Amazon EC2 security group isn't authorized for the -// specified DB security group. -// -// RDS also may not be authorized by using IAM to perform necessary actions -// on your behalf. -// -// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// An error occurred accessing an AWS KMS key. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBInstance -func (c *RDS) StartDBInstance(input *StartDBInstanceInput) (*StartDBInstanceOutput, error) { - req, out := c.StartDBInstanceRequest(input) - return out, req.Send() -} - -// StartDBInstanceWithContext is the same as StartDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See StartDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) StartDBInstanceWithContext(ctx aws.Context, input *StartDBInstanceInput, opts ...request.Option) (*StartDBInstanceOutput, error) { - req, out := c.StartDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopDBCluster = "StopDBCluster" - -// StopDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the StopDBCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopDBCluster for more information on using the StopDBCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopDBClusterRequest method. -// req, resp := client.StopDBClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster -func (c *RDS) StopDBClusterRequest(input *StopDBClusterInput) (req *request.Request, output *StopDBClusterOutput) { - op := &request.Operation{ - Name: opStopDBCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopDBClusterInput{} - } - - output = &StopDBClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopDBCluster API operation for Amazon Relational Database Service. -// -// Stops an Amazon Aurora DB cluster. When you stop a DB cluster, Aurora retains -// the DB cluster's metadata, including its endpoints and DB parameter groups. -// Aurora also retains the transaction logs so you can do a point-in-time restore -// if necessary. -// -// For more information, see Stopping and Starting an Aurora Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html) -// in the Amazon Aurora User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation StopDBCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster -func (c *RDS) StopDBCluster(input *StopDBClusterInput) (*StopDBClusterOutput, error) { - req, out := c.StopDBClusterRequest(input) - return out, req.Send() -} - -// StopDBClusterWithContext is the same as StopDBCluster with the addition of -// the ability to pass a context and additional request options. -// -// See StopDBCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) StopDBClusterWithContext(ctx aws.Context, input *StopDBClusterInput, opts ...request.Option) (*StopDBClusterOutput, error) { - req, out := c.StopDBClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopDBInstance = "StopDBInstance" - -// StopDBInstanceRequest generates a "aws/request.Request" representing the -// client's request for the StopDBInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopDBInstance for more information on using the StopDBInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopDBInstanceRequest method. -// req, resp := client.StopDBInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBInstance -func (c *RDS) StopDBInstanceRequest(input *StopDBInstanceInput) (req *request.Request, output *StopDBInstanceOutput) { - op := &request.Operation{ - Name: opStopDBInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopDBInstanceInput{} - } - - output = &StopDBInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopDBInstance API operation for Amazon Relational Database Service. -// -// Stops an Amazon RDS DB instance. When you stop a DB instance, Amazon RDS -// retains the DB instance's metadata, including its endpoint, DB parameter -// group, and option group membership. Amazon RDS also retains the transaction -// logs so you can do a point-in-time restore if necessary. -// -// For more information, see Stopping an Amazon RDS DB Instance Temporarily -// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StopInstance.html) -// in the Amazon RDS User Guide. -// -// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora -// clusters, use StopDBCluster instead. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Relational Database Service's -// API operation StopDBInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier doesn't refer to an existing DB instance. -// -// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The DB instance isn't in a valid state. -// -// * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" -// DBSnapshotIdentifier is already used by an existing snapshot. -// -// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// The request would result in the user exceeding the allowed number of DB snapshots. -// -// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The requested operation can't be performed while the cluster is in this state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBInstance -func (c *RDS) StopDBInstance(input *StopDBInstanceInput) (*StopDBInstanceOutput, error) { - req, out := c.StopDBInstanceRequest(input) - return out, req.Send() -} - -// StopDBInstanceWithContext is the same as StopDBInstance with the addition of -// the ability to pass a context and additional request options. -// -// See StopDBInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) StopDBInstanceWithContext(ctx aws.Context, input *StopDBInstanceInput, opts ...request.Option) (*StopDBInstanceOutput, error) { - req, out := c.StopDBInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Describes a quota for an AWS account, for example, the number of DB instances -// allowed. -type AccountQuota struct { - _ struct{} `type:"structure"` - - // The name of the Amazon RDS quota for this AWS account. - AccountQuotaName *string `type:"string"` - - // The maximum allowed value for the quota. - Max *int64 `type:"long"` - - // The amount currently used toward the quota maximum. - Used *int64 `type:"long"` -} - -// String returns the string representation -func (s AccountQuota) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountQuota) GoString() string { - return s.String() -} - -// SetAccountQuotaName sets the AccountQuotaName field's value. -func (s *AccountQuota) SetAccountQuotaName(v string) *AccountQuota { - s.AccountQuotaName = &v - return s -} - -// SetMax sets the Max field's value. -func (s *AccountQuota) SetMax(v int64) *AccountQuota { - s.Max = &v - return s -} - -// SetUsed sets the Used field's value. -func (s *AccountQuota) SetUsed(v int64) *AccountQuota { - s.Used = &v - return s -} - -type AddRoleToDBClusterInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster to associate the IAM role with. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM role to associate with the Aurora - // DB cluster, for example arn:aws:iam::123456789012:role/AuroraAccessRole. - // - // RoleArn is a required field - RoleArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AddRoleToDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddRoleToDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddRoleToDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddRoleToDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *AddRoleToDBClusterInput) SetDBClusterIdentifier(v string) *AddRoleToDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *AddRoleToDBClusterInput) SetRoleArn(v string) *AddRoleToDBClusterInput { - s.RoleArn = &v - return s -} - -type AddRoleToDBClusterOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddRoleToDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddRoleToDBClusterOutput) GoString() string { - return s.String() -} - -type AddRoleToDBInstanceInput struct { - _ struct{} `type:"structure"` - - // The name of the DB instance to associate the IAM role with. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The name of the feature for the DB instance that the IAM role is to be associated - // with. For the list of supported feature names, see DBEngineVersion. - // - // FeatureName is a required field - FeatureName *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM role to associate with the DB instance, - // for example arn:aws:iam::123456789012:role/AccessRole. - // - // RoleArn is a required field - RoleArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AddRoleToDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddRoleToDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddRoleToDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddRoleToDBInstanceInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - if s.FeatureName == nil { - invalidParams.Add(request.NewErrParamRequired("FeatureName")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *AddRoleToDBInstanceInput) SetDBInstanceIdentifier(v string) *AddRoleToDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetFeatureName sets the FeatureName field's value. -func (s *AddRoleToDBInstanceInput) SetFeatureName(v string) *AddRoleToDBInstanceInput { - s.FeatureName = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *AddRoleToDBInstanceInput) SetRoleArn(v string) *AddRoleToDBInstanceInput { - s.RoleArn = &v - return s -} - -type AddRoleToDBInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddRoleToDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddRoleToDBInstanceOutput) GoString() string { - return s.String() -} - -type AddSourceIdentifierToSubscriptionInput struct { - _ struct{} `type:"structure"` - - // The identifier of the event source to be added. - // - // Constraints: - // - // * If the source type is a DB instance, then a DBInstanceIdentifier must - // be supplied. - // - // * If the source type is a DB security group, a DBSecurityGroupName must - // be supplied. - // - // * If the source type is a DB parameter group, a DBParameterGroupName must - // be supplied. - // - // * If the source type is a DB snapshot, a DBSnapshotIdentifier must be - // supplied. - // - // SourceIdentifier is a required field - SourceIdentifier *string `type:"string" required:"true"` - - // The name of the RDS event notification subscription you want to add a source - // identifier to. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AddSourceIdentifierToSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddSourceIdentifierToSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddSourceIdentifierToSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddSourceIdentifierToSubscriptionInput"} - if s.SourceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceIdentifier")) - } - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *AddSourceIdentifierToSubscriptionInput) SetSourceIdentifier(v string) *AddSourceIdentifierToSubscriptionInput { - s.SourceIdentifier = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *AddSourceIdentifierToSubscriptionInput) SetSubscriptionName(v string) *AddSourceIdentifierToSubscriptionInput { - s.SubscriptionName = &v - return s -} - -type AddSourceIdentifierToSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful invocation of the DescribeEventSubscriptions - // action. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s AddSourceIdentifierToSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddSourceIdentifierToSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *AddSourceIdentifierToSubscriptionOutput) SetEventSubscription(v *EventSubscription) *AddSourceIdentifierToSubscriptionOutput { - s.EventSubscription = v - return s -} - -type AddTagsToResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon RDS resource that the tags are added to. This value is an Amazon - // Resource Name (ARN). For information about creating an ARN, see Constructing - // an RDS Amazon Resource Name (ARN) (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing). - // - // ResourceName is a required field - ResourceName *string `type:"string" required:"true"` - - // The tags to be assigned to the Amazon RDS resource. - // - // Tags is a required field - Tags []*Tag `locationNameList:"Tag" type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsToResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsToResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *AddTagsToResourceInput) SetResourceName(v string) *AddTagsToResourceInput { - s.ResourceName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { - s.Tags = v - return s -} - -type AddTagsToResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsToResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceOutput) GoString() string { - return s.String() -} - -type ApplyPendingMaintenanceActionInput struct { - _ struct{} `type:"structure"` - - // The pending maintenance action to apply to this resource. - // - // Valid values: system-update, db-upgrade - // - // ApplyAction is a required field - ApplyAction *string `type:"string" required:"true"` - - // A value that specifies the type of opt-in request, or undoes an opt-in request. - // An opt-in request of type immediate can't be undone. - // - // Valid values: - // - // * immediate - Apply the maintenance action immediately. - // - // * next-maintenance - Apply the maintenance action during the next maintenance - // window for the resource. - // - // * undo-opt-in - Cancel any existing next-maintenance opt-in requests. - // - // OptInType is a required field - OptInType *string `type:"string" required:"true"` - - // The RDS Amazon Resource Name (ARN) of the resource that the pending maintenance - // action applies to. For information about creating an ARN, see Constructing - // an RDS Amazon Resource Name (ARN) (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing). - // - // ResourceIdentifier is a required field - ResourceIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ApplyPendingMaintenanceActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplyPendingMaintenanceActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ApplyPendingMaintenanceActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ApplyPendingMaintenanceActionInput"} - if s.ApplyAction == nil { - invalidParams.Add(request.NewErrParamRequired("ApplyAction")) - } - if s.OptInType == nil { - invalidParams.Add(request.NewErrParamRequired("OptInType")) - } - if s.ResourceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyAction sets the ApplyAction field's value. -func (s *ApplyPendingMaintenanceActionInput) SetApplyAction(v string) *ApplyPendingMaintenanceActionInput { - s.ApplyAction = &v - return s -} - -// SetOptInType sets the OptInType field's value. -func (s *ApplyPendingMaintenanceActionInput) SetOptInType(v string) *ApplyPendingMaintenanceActionInput { - s.OptInType = &v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *ApplyPendingMaintenanceActionInput) SetResourceIdentifier(v string) *ApplyPendingMaintenanceActionInput { - s.ResourceIdentifier = &v - return s -} - -type ApplyPendingMaintenanceActionOutput struct { - _ struct{} `type:"structure"` - - // Describes the pending maintenance actions for a resource. - ResourcePendingMaintenanceActions *ResourcePendingMaintenanceActions `type:"structure"` -} - -// String returns the string representation -func (s ApplyPendingMaintenanceActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplyPendingMaintenanceActionOutput) GoString() string { - return s.String() -} - -// SetResourcePendingMaintenanceActions sets the ResourcePendingMaintenanceActions field's value. -func (s *ApplyPendingMaintenanceActionOutput) SetResourcePendingMaintenanceActions(v *ResourcePendingMaintenanceActions) *ApplyPendingMaintenanceActionOutput { - s.ResourcePendingMaintenanceActions = v - return s -} - -type AuthorizeDBSecurityGroupIngressInput struct { - _ struct{} `type:"structure"` - - // The IP range to authorize. - CIDRIP *string `type:"string"` - - // The name of the DB security group to add authorization to. - // - // DBSecurityGroupName is a required field - DBSecurityGroupName *string `type:"string" required:"true"` - - // Id of the EC2 security group to authorize. For VPC DB security groups, EC2SecurityGroupId - // must be provided. Otherwise, EC2SecurityGroupOwnerId and either EC2SecurityGroupName - // or EC2SecurityGroupId must be provided. - EC2SecurityGroupId *string `type:"string"` - - // Name of the EC2 security group to authorize. For VPC DB security groups, - // EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId and - // either EC2SecurityGroupName or EC2SecurityGroupId must be provided. - EC2SecurityGroupName *string `type:"string"` - - // AWS account number of the owner of the EC2 security group specified in the - // EC2SecurityGroupName parameter. The AWS Access Key ID is not an acceptable - // value. For VPC DB security groups, EC2SecurityGroupId must be provided. Otherwise, - // EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId - // must be provided. - EC2SecurityGroupOwnerId *string `type:"string"` -} - -// String returns the string representation -func (s AuthorizeDBSecurityGroupIngressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeDBSecurityGroupIngressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AuthorizeDBSecurityGroupIngressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuthorizeDBSecurityGroupIngressInput"} - if s.DBSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBSecurityGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCIDRIP sets the CIDRIP field's value. -func (s *AuthorizeDBSecurityGroupIngressInput) SetCIDRIP(v string) *AuthorizeDBSecurityGroupIngressInput { - s.CIDRIP = &v - return s -} - -// SetDBSecurityGroupName sets the DBSecurityGroupName field's value. -func (s *AuthorizeDBSecurityGroupIngressInput) SetDBSecurityGroupName(v string) *AuthorizeDBSecurityGroupIngressInput { - s.DBSecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupId sets the EC2SecurityGroupId field's value. -func (s *AuthorizeDBSecurityGroupIngressInput) SetEC2SecurityGroupId(v string) *AuthorizeDBSecurityGroupIngressInput { - s.EC2SecurityGroupId = &v - return s -} - -// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. -func (s *AuthorizeDBSecurityGroupIngressInput) SetEC2SecurityGroupName(v string) *AuthorizeDBSecurityGroupIngressInput { - s.EC2SecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. -func (s *AuthorizeDBSecurityGroupIngressInput) SetEC2SecurityGroupOwnerId(v string) *AuthorizeDBSecurityGroupIngressInput { - s.EC2SecurityGroupOwnerId = &v - return s -} - -type AuthorizeDBSecurityGroupIngressOutput struct { - _ struct{} `type:"structure"` - - // Contains the details for an Amazon RDS DB security group. - // - // This data type is used as a response element in the DescribeDBSecurityGroups - // action. - DBSecurityGroup *DBSecurityGroup `type:"structure"` -} - -// String returns the string representation -func (s AuthorizeDBSecurityGroupIngressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeDBSecurityGroupIngressOutput) GoString() string { - return s.String() -} - -// SetDBSecurityGroup sets the DBSecurityGroup field's value. -func (s *AuthorizeDBSecurityGroupIngressOutput) SetDBSecurityGroup(v *DBSecurityGroup) *AuthorizeDBSecurityGroupIngressOutput { - s.DBSecurityGroup = v - return s -} - -// Contains Availability Zone information. -// -// This data type is used as an element in the following data type: -// -// * OrderableDBInstanceOption -type AvailabilityZone struct { - _ struct{} `type:"structure"` - - // The name of the Availability Zone. - Name *string `type:"string"` -} - -// String returns the string representation -func (s AvailabilityZone) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailabilityZone) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { - s.Name = &v - return s -} - -// Contains the available processor feature information for the DB instance -// class of a DB instance. -// -// For more information, see Configuring the Processor of the DB Instance Class -// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#USER_ConfigureProcessor) -// in the Amazon RDS User Guide. -type AvailableProcessorFeature struct { - _ struct{} `type:"structure"` - - // The allowed values for the processor feature of the DB instance class. - AllowedValues *string `type:"string"` - - // The default value for the processor feature of the DB instance class. - DefaultValue *string `type:"string"` - - // The name of the processor feature. Valid names are coreCount and threadsPerCore. - Name *string `type:"string"` -} - -// String returns the string representation -func (s AvailableProcessorFeature) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailableProcessorFeature) GoString() string { - return s.String() -} - -// SetAllowedValues sets the AllowedValues field's value. -func (s *AvailableProcessorFeature) SetAllowedValues(v string) *AvailableProcessorFeature { - s.AllowedValues = &v - return s -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *AvailableProcessorFeature) SetDefaultValue(v string) *AvailableProcessorFeature { - s.DefaultValue = &v - return s -} - -// SetName sets the Name field's value. -func (s *AvailableProcessorFeature) SetName(v string) *AvailableProcessorFeature { - s.Name = &v - return s -} - -type BacktrackDBClusterInput struct { - _ struct{} `type:"structure"` - - // The timestamp of the time to backtrack the DB cluster to, specified in ISO - // 8601 format. For more information about ISO 8601, see the ISO8601 Wikipedia - // page. (http://en.wikipedia.org/wiki/ISO_8601) - // - // If the specified time is not a consistent time for the DB cluster, Aurora - // automatically chooses the nearest possible consistent time for the DB cluster. - // - // Constraints: - // - // * Must contain a valid ISO 8601 timestamp. - // - // * Can't contain a timestamp set in the future. - // - // Example: 2017-07-08T18:00Z - // - // BacktrackTo is a required field - BacktrackTo *time.Time `type:"timestamp" required:"true"` - - // The DB cluster identifier of the DB cluster to be backtracked. This parameter - // is stored as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster1 - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // A value that, if specified, forces the DB cluster to backtrack when binary - // logging is enabled. Otherwise, an error occurs when binary logging is enabled. - Force *bool `type:"boolean"` - - // If BacktrackTo is set to a timestamp earlier than the earliest backtrack - // time, this value backtracks the DB cluster to the earliest possible backtrack - // time. Otherwise, an error occurs. - UseEarliestTimeOnPointInTimeUnavailable *bool `type:"boolean"` -} - -// String returns the string representation -func (s BacktrackDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BacktrackDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BacktrackDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BacktrackDBClusterInput"} - if s.BacktrackTo == nil { - invalidParams.Add(request.NewErrParamRequired("BacktrackTo")) - } - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBacktrackTo sets the BacktrackTo field's value. -func (s *BacktrackDBClusterInput) SetBacktrackTo(v time.Time) *BacktrackDBClusterInput { - s.BacktrackTo = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *BacktrackDBClusterInput) SetDBClusterIdentifier(v string) *BacktrackDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetForce sets the Force field's value. -func (s *BacktrackDBClusterInput) SetForce(v bool) *BacktrackDBClusterInput { - s.Force = &v - return s -} - -// SetUseEarliestTimeOnPointInTimeUnavailable sets the UseEarliestTimeOnPointInTimeUnavailable field's value. -func (s *BacktrackDBClusterInput) SetUseEarliestTimeOnPointInTimeUnavailable(v bool) *BacktrackDBClusterInput { - s.UseEarliestTimeOnPointInTimeUnavailable = &v - return s -} - -// This data type is used as a response element in the DescribeDBClusterBacktracks -// action. -type BacktrackDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains the backtrack identifier. - BacktrackIdentifier *string `type:"string"` - - // The timestamp of the time at which the backtrack was requested. - BacktrackRequestCreationTime *time.Time `type:"timestamp"` - - // The timestamp of the time to which the DB cluster was backtracked. - BacktrackTo *time.Time `type:"timestamp"` - - // The timestamp of the time from which the DB cluster was backtracked. - BacktrackedFrom *time.Time `type:"timestamp"` - - // Contains a user-supplied DB cluster identifier. This identifier is the unique - // key that identifies a DB cluster. - DBClusterIdentifier *string `type:"string"` - - // The status of the backtrack. This property returns one of the following values: - // - // * applying - The backtrack is currently being applied to or rolled back - // from the DB cluster. - // - // * completed - The backtrack has successfully been applied to or rolled - // back from the DB cluster. - // - // * failed - An error occurred while the backtrack was applied to or rolled - // back from the DB cluster. - // - // * pending - The backtrack is currently pending application to or rollback - // from the DB cluster. - Status *string `type:"string"` -} - -// String returns the string representation -func (s BacktrackDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BacktrackDBClusterOutput) GoString() string { - return s.String() -} - -// SetBacktrackIdentifier sets the BacktrackIdentifier field's value. -func (s *BacktrackDBClusterOutput) SetBacktrackIdentifier(v string) *BacktrackDBClusterOutput { - s.BacktrackIdentifier = &v - return s -} - -// SetBacktrackRequestCreationTime sets the BacktrackRequestCreationTime field's value. -func (s *BacktrackDBClusterOutput) SetBacktrackRequestCreationTime(v time.Time) *BacktrackDBClusterOutput { - s.BacktrackRequestCreationTime = &v - return s -} - -// SetBacktrackTo sets the BacktrackTo field's value. -func (s *BacktrackDBClusterOutput) SetBacktrackTo(v time.Time) *BacktrackDBClusterOutput { - s.BacktrackTo = &v - return s -} - -// SetBacktrackedFrom sets the BacktrackedFrom field's value. -func (s *BacktrackDBClusterOutput) SetBacktrackedFrom(v time.Time) *BacktrackDBClusterOutput { - s.BacktrackedFrom = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *BacktrackDBClusterOutput) SetDBClusterIdentifier(v string) *BacktrackDBClusterOutput { - s.DBClusterIdentifier = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *BacktrackDBClusterOutput) SetStatus(v string) *BacktrackDBClusterOutput { - s.Status = &v - return s -} - -// A CA certificate for an AWS account. -type Certificate struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the certificate. - CertificateArn *string `type:"string"` - - // The unique key that identifies a certificate. - CertificateIdentifier *string `type:"string"` - - // The type of the certificate. - CertificateType *string `type:"string"` - - // The thumbprint of the certificate. - Thumbprint *string `type:"string"` - - // The starting date from which the certificate is valid. - ValidFrom *time.Time `type:"timestamp"` - - // The final date that the certificate continues to be valid. - ValidTill *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s Certificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Certificate) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *Certificate) SetCertificateArn(v string) *Certificate { - s.CertificateArn = &v - return s -} - -// SetCertificateIdentifier sets the CertificateIdentifier field's value. -func (s *Certificate) SetCertificateIdentifier(v string) *Certificate { - s.CertificateIdentifier = &v - return s -} - -// SetCertificateType sets the CertificateType field's value. -func (s *Certificate) SetCertificateType(v string) *Certificate { - s.CertificateType = &v - return s -} - -// SetThumbprint sets the Thumbprint field's value. -func (s *Certificate) SetThumbprint(v string) *Certificate { - s.Thumbprint = &v - return s -} - -// SetValidFrom sets the ValidFrom field's value. -func (s *Certificate) SetValidFrom(v time.Time) *Certificate { - s.ValidFrom = &v - return s -} - -// SetValidTill sets the ValidTill field's value. -func (s *Certificate) SetValidTill(v time.Time) *Certificate { - s.ValidTill = &v - return s -} - -// This data type is used as a response element in the action DescribeDBEngineVersions. -type CharacterSet struct { - _ struct{} `type:"structure"` - - // The description of the character set. - CharacterSetDescription *string `type:"string"` - - // The name of the character set. - CharacterSetName *string `type:"string"` -} - -// String returns the string representation -func (s CharacterSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CharacterSet) GoString() string { - return s.String() -} - -// SetCharacterSetDescription sets the CharacterSetDescription field's value. -func (s *CharacterSet) SetCharacterSetDescription(v string) *CharacterSet { - s.CharacterSetDescription = &v - return s -} - -// SetCharacterSetName sets the CharacterSetName field's value. -func (s *CharacterSet) SetCharacterSetName(v string) *CharacterSet { - s.CharacterSetName = &v - return s -} - -// The configuration setting for the log types to be enabled for export to CloudWatch -// Logs for a specific DB instance or DB cluster. -// -// The EnableLogTypes and DisableLogTypes arrays determine which logs will be -// exported (or not exported) to CloudWatch Logs. The values within these arrays -// depend on the DB engine being used. For more information, see Publishing -// Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) -// in the Amazon RDS User Guide. -type CloudwatchLogsExportConfiguration struct { - _ struct{} `type:"structure"` - - // The list of log types to disable. - DisableLogTypes []*string `type:"list"` - - // The list of log types to enable. - EnableLogTypes []*string `type:"list"` -} - -// String returns the string representation -func (s CloudwatchLogsExportConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudwatchLogsExportConfiguration) GoString() string { - return s.String() -} - -// SetDisableLogTypes sets the DisableLogTypes field's value. -func (s *CloudwatchLogsExportConfiguration) SetDisableLogTypes(v []*string) *CloudwatchLogsExportConfiguration { - s.DisableLogTypes = v - return s -} - -// SetEnableLogTypes sets the EnableLogTypes field's value. -func (s *CloudwatchLogsExportConfiguration) SetEnableLogTypes(v []*string) *CloudwatchLogsExportConfiguration { - s.EnableLogTypes = v - return s -} - -type CopyDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The identifier or Amazon Resource Name (ARN) for the source DB cluster parameter - // group. For information about creating an ARN, see Constructing an ARN for - // Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) - // in the Amazon Aurora User Guide. - // - // Constraints: - // - // * Must specify a valid DB cluster parameter group. - // - // * If the source DB cluster parameter group is in the same AWS Region as - // the copy, specify a valid DB parameter group identifier, for example my-db-cluster-param-group, - // or a valid ARN. - // - // * If the source DB parameter group is in a different AWS Region than the - // copy, specify a valid DB cluster parameter group ARN, for example arn:aws:rds:us-east-1:123456789012:cluster-pg:custom-cluster-group1. - // - // SourceDBClusterParameterGroupIdentifier is a required field - SourceDBClusterParameterGroupIdentifier *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A description for the copied DB cluster parameter group. - // - // TargetDBClusterParameterGroupDescription is a required field - TargetDBClusterParameterGroupDescription *string `type:"string" required:"true"` - - // The identifier for the copied DB cluster parameter group. - // - // Constraints: - // - // * Can't be null, empty, or blank - // - // * Must contain from 1 to 255 letters, numbers, or hyphens - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // Example: my-cluster-param-group1 - // - // TargetDBClusterParameterGroupIdentifier is a required field - TargetDBClusterParameterGroupIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyDBClusterParameterGroupInput"} - if s.SourceDBClusterParameterGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDBClusterParameterGroupIdentifier")) - } - if s.TargetDBClusterParameterGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBClusterParameterGroupDescription")) - } - if s.TargetDBClusterParameterGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBClusterParameterGroupIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceDBClusterParameterGroupIdentifier sets the SourceDBClusterParameterGroupIdentifier field's value. -func (s *CopyDBClusterParameterGroupInput) SetSourceDBClusterParameterGroupIdentifier(v string) *CopyDBClusterParameterGroupInput { - s.SourceDBClusterParameterGroupIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CopyDBClusterParameterGroupInput) SetTags(v []*Tag) *CopyDBClusterParameterGroupInput { - s.Tags = v - return s -} - -// SetTargetDBClusterParameterGroupDescription sets the TargetDBClusterParameterGroupDescription field's value. -func (s *CopyDBClusterParameterGroupInput) SetTargetDBClusterParameterGroupDescription(v string) *CopyDBClusterParameterGroupInput { - s.TargetDBClusterParameterGroupDescription = &v - return s -} - -// SetTargetDBClusterParameterGroupIdentifier sets the TargetDBClusterParameterGroupIdentifier field's value. -func (s *CopyDBClusterParameterGroupInput) SetTargetDBClusterParameterGroupIdentifier(v string) *CopyDBClusterParameterGroupInput { - s.TargetDBClusterParameterGroupIdentifier = &v - return s -} - -type CopyDBClusterParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB cluster parameter group. - // - // This data type is used as a response element in the DescribeDBClusterParameterGroups - // action. - DBClusterParameterGroup *DBClusterParameterGroup `type:"structure"` -} - -// String returns the string representation -func (s CopyDBClusterParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBClusterParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. -func (s *CopyDBClusterParameterGroupOutput) SetDBClusterParameterGroup(v *DBClusterParameterGroup) *CopyDBClusterParameterGroupOutput { - s.DBClusterParameterGroup = v - return s -} - -type CopyDBClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // True to copy all tags from the source DB cluster snapshot to the target DB - // cluster snapshot, and otherwise false. The default is false. - CopyTags *bool `type:"boolean"` - - // DestinationRegion is used for presigning the request to a given region. - DestinationRegion *string `type:"string"` - - // The AWS AWS KMS key ID for an encrypted DB cluster snapshot. The KMS key - // ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key - // alias for the KMS encryption key. - // - // If you copy an encrypted DB cluster snapshot from your AWS account, you can - // specify a value for KmsKeyId to encrypt the copy with a new KMS encryption - // key. If you don't specify a value for KmsKeyId, then the copy of the DB cluster - // snapshot is encrypted with the same KMS key as the source DB cluster snapshot. - // - // If you copy an encrypted DB cluster snapshot that is shared from another - // AWS account, then you must specify a value for KmsKeyId. - // - // To copy an encrypted DB cluster snapshot to another AWS Region, you must - // set KmsKeyId to the KMS key ID you want to use to encrypt the copy of the - // DB cluster snapshot in the destination AWS Region. KMS encryption keys are - // specific to the AWS Region that they are created in, and you can't use encryption - // keys from one AWS Region in another AWS Region. - // - // If you copy an unencrypted DB cluster snapshot and specify a value for the - // KmsKeyId parameter, an error is returned. - KmsKeyId *string `type:"string"` - - // The URL that contains a Signature Version 4 signed request for the CopyDBClusterSnapshot - // API action in the AWS Region that contains the source DB cluster snapshot - // to copy. The PreSignedUrl parameter must be used when copying an encrypted - // DB cluster snapshot from another AWS Region. - // - // The pre-signed URL must be a valid request for the CopyDBSClusterSnapshot - // API action that can be executed in the source AWS Region that contains the - // encrypted DB cluster snapshot to be copied. The pre-signed URL request must - // contain the following parameter values: - // - // * KmsKeyId - The AWS KMS key identifier for the key to use to encrypt - // the copy of the DB cluster snapshot in the destination AWS Region. This - // is the same identifier for both the CopyDBClusterSnapshot action that - // is called in the destination AWS Region, and the action contained in the - // pre-signed URL. - // - // * DestinationRegion - The name of the AWS Region that the DB cluster snapshot - // will be created in. - // - // * SourceDBClusterSnapshotIdentifier - The DB cluster snapshot identifier - // for the encrypted DB cluster snapshot to be copied. This identifier must - // be in the Amazon Resource Name (ARN) format for the source AWS Region. - // For example, if you are copying an encrypted DB cluster snapshot from - // the us-west-2 AWS Region, then your SourceDBClusterSnapshotIdentifier - // looks like the following example: arn:aws:rds:us-west-2:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20161115. - // - // To learn how to generate a Signature Version 4 signed request, see Authenticating - // Requests: Using Query Parameters (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) - // and Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). - PreSignedUrl *string `type:"string"` - - // The identifier of the DB cluster snapshot to copy. This parameter is not - // case-sensitive. - // - // You can't copy an encrypted, shared DB cluster snapshot from one AWS Region - // to another. - // - // Constraints: - // - // * Must specify a valid system snapshot in the "available" state. - // - // * If the source snapshot is in the same AWS Region as the copy, specify - // a valid DB snapshot identifier. - // - // * If the source snapshot is in a different AWS Region than the copy, specify - // a valid DB cluster snapshot ARN. For more information, go to Copying - // Snapshots Across AWS Regions (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CopySnapshot.html#USER_CopySnapshot.AcrossRegions) - // in the Amazon Aurora User Guide. - // - // Example: my-cluster-snapshot1 - // - // SourceDBClusterSnapshotIdentifier is a required field - SourceDBClusterSnapshotIdentifier *string `type:"string" required:"true"` - - // SourceRegion is the source region where the resource exists. This is not - // sent over the wire and is only used for presigning. This value should always - // have the same region as the source ARN. - SourceRegion *string `type:"string" ignore:"true"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // The identifier of the new DB cluster snapshot to create from the source DB - // cluster snapshot. This parameter is not case-sensitive. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster-snapshot2 - // - // TargetDBClusterSnapshotIdentifier is a required field - TargetDBClusterSnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyDBClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyDBClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyDBClusterSnapshotInput"} - if s.SourceDBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDBClusterSnapshotIdentifier")) - } - if s.TargetDBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCopyTags sets the CopyTags field's value. -func (s *CopyDBClusterSnapshotInput) SetCopyTags(v bool) *CopyDBClusterSnapshotInput { - s.CopyTags = &v - return s -} - -// SetDestinationRegion sets the DestinationRegion field's value. -func (s *CopyDBClusterSnapshotInput) SetDestinationRegion(v string) *CopyDBClusterSnapshotInput { - s.DestinationRegion = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CopyDBClusterSnapshotInput) SetKmsKeyId(v string) *CopyDBClusterSnapshotInput { - s.KmsKeyId = &v - return s -} - -// SetPreSignedUrl sets the PreSignedUrl field's value. -func (s *CopyDBClusterSnapshotInput) SetPreSignedUrl(v string) *CopyDBClusterSnapshotInput { - s.PreSignedUrl = &v - return s -} - -// SetSourceDBClusterSnapshotIdentifier sets the SourceDBClusterSnapshotIdentifier field's value. -func (s *CopyDBClusterSnapshotInput) SetSourceDBClusterSnapshotIdentifier(v string) *CopyDBClusterSnapshotInput { - s.SourceDBClusterSnapshotIdentifier = &v - return s -} - -// SetSourceRegion sets the SourceRegion field's value. -func (s *CopyDBClusterSnapshotInput) SetSourceRegion(v string) *CopyDBClusterSnapshotInput { - s.SourceRegion = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CopyDBClusterSnapshotInput) SetTags(v []*Tag) *CopyDBClusterSnapshotInput { - s.Tags = v - return s -} - -// SetTargetDBClusterSnapshotIdentifier sets the TargetDBClusterSnapshotIdentifier field's value. -func (s *CopyDBClusterSnapshotInput) SetTargetDBClusterSnapshotIdentifier(v string) *CopyDBClusterSnapshotInput { - s.TargetDBClusterSnapshotIdentifier = &v - return s -} - -type CopyDBClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Contains the details for an Amazon RDS DB cluster snapshot - // - // This data type is used as a response element in the DescribeDBClusterSnapshots - // action. - DBClusterSnapshot *DBClusterSnapshot `type:"structure"` -} - -// String returns the string representation -func (s CopyDBClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. -func (s *CopyDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *CopyDBClusterSnapshotOutput { - s.DBClusterSnapshot = v - return s -} - -type CopyDBParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The identifier or ARN for the source DB parameter group. For information - // about creating an ARN, see Constructing an ARN for Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) - // in the Amazon RDS User Guide. - // - // Constraints: - // - // * Must specify a valid DB parameter group. - // - // * Must specify a valid DB parameter group identifier, for example my-db-param-group, - // or a valid ARN. - // - // SourceDBParameterGroupIdentifier is a required field - SourceDBParameterGroupIdentifier *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A description for the copied DB parameter group. - // - // TargetDBParameterGroupDescription is a required field - TargetDBParameterGroupDescription *string `type:"string" required:"true"` - - // The identifier for the copied DB parameter group. - // - // Constraints: - // - // * Can't be null, empty, or blank - // - // * Must contain from 1 to 255 letters, numbers, or hyphens - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // Example: my-db-parameter-group - // - // TargetDBParameterGroupIdentifier is a required field - TargetDBParameterGroupIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyDBParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyDBParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyDBParameterGroupInput"} - if s.SourceDBParameterGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDBParameterGroupIdentifier")) - } - if s.TargetDBParameterGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBParameterGroupDescription")) - } - if s.TargetDBParameterGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBParameterGroupIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceDBParameterGroupIdentifier sets the SourceDBParameterGroupIdentifier field's value. -func (s *CopyDBParameterGroupInput) SetSourceDBParameterGroupIdentifier(v string) *CopyDBParameterGroupInput { - s.SourceDBParameterGroupIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CopyDBParameterGroupInput) SetTags(v []*Tag) *CopyDBParameterGroupInput { - s.Tags = v - return s -} - -// SetTargetDBParameterGroupDescription sets the TargetDBParameterGroupDescription field's value. -func (s *CopyDBParameterGroupInput) SetTargetDBParameterGroupDescription(v string) *CopyDBParameterGroupInput { - s.TargetDBParameterGroupDescription = &v - return s -} - -// SetTargetDBParameterGroupIdentifier sets the TargetDBParameterGroupIdentifier field's value. -func (s *CopyDBParameterGroupInput) SetTargetDBParameterGroupIdentifier(v string) *CopyDBParameterGroupInput { - s.TargetDBParameterGroupIdentifier = &v - return s -} - -type CopyDBParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB parameter group. - // - // This data type is used as a response element in the DescribeDBParameterGroups - // action. - DBParameterGroup *DBParameterGroup `type:"structure"` -} - -// String returns the string representation -func (s CopyDBParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDBParameterGroup sets the DBParameterGroup field's value. -func (s *CopyDBParameterGroupOutput) SetDBParameterGroup(v *DBParameterGroup) *CopyDBParameterGroupOutput { - s.DBParameterGroup = v - return s -} - -type CopyDBSnapshotInput struct { - _ struct{} `type:"structure"` - - // True to copy all tags from the source DB snapshot to the target DB snapshot, - // and otherwise false. The default is false. - CopyTags *bool `type:"boolean"` - - // DestinationRegion is used for presigning the request to a given region. - DestinationRegion *string `type:"string"` - - // The AWS KMS key ID for an encrypted DB snapshot. The KMS key ID is the Amazon - // Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS - // encryption key. - // - // If you copy an encrypted DB snapshot from your AWS account, you can specify - // a value for this parameter to encrypt the copy with a new KMS encryption - // key. If you don't specify a value for this parameter, then the copy of the - // DB snapshot is encrypted with the same KMS key as the source DB snapshot. - // - // If you copy an encrypted DB snapshot that is shared from another AWS account, - // then you must specify a value for this parameter. - // - // If you specify this parameter when you copy an unencrypted snapshot, the - // copy is encrypted. - // - // If you copy an encrypted snapshot to a different AWS Region, then you must - // specify a KMS key for the destination AWS Region. KMS encryption keys are - // specific to the AWS Region that they are created in, and you can't use encryption - // keys from one AWS Region in another AWS Region. - KmsKeyId *string `type:"string"` - - // The name of an option group to associate with the copy of the snapshot. - // - // Specify this option if you are copying a snapshot from one AWS Region to - // another, and your DB instance uses a nondefault option group. If your source - // DB instance uses Transparent Data Encryption for Oracle or Microsoft SQL - // Server, you must specify this option when copying across AWS Regions. For - // more information, see Option Group Considerations (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CopySnapshot.html#USER_CopySnapshot.Options) - // in the Amazon RDS User Guide. - OptionGroupName *string `type:"string"` - - // The URL that contains a Signature Version 4 signed request for the CopyDBSnapshot - // API action in the source AWS Region that contains the source DB snapshot - // to copy. - // - // You must specify this parameter when you copy an encrypted DB snapshot from - // another AWS Region by using the Amazon RDS API. You can specify the --source-region - // option instead of this parameter when you copy an encrypted DB snapshot from - // another AWS Region by using the AWS CLI. - // - // The presigned URL must be a valid request for the CopyDBSnapshot API action - // that can be executed in the source AWS Region that contains the encrypted - // DB snapshot to be copied. The presigned URL request must contain the following - // parameter values: - // - // * DestinationRegion - The AWS Region that the encrypted DB snapshot is - // copied to. This AWS Region is the same one where the CopyDBSnapshot action - // is called that contains this presigned URL. - // - // For example, if you copy an encrypted DB snapshot from the us-west-2 AWS - // Region to the us-east-1 AWS Region, then you call the CopyDBSnapshot action - // in the us-east-1 AWS Region and provide a presigned URL that contains - // a call to the CopyDBSnapshot action in the us-west-2 AWS Region. For this - // example, the DestinationRegion in the presigned URL must be set to the - // us-east-1 AWS Region. - // - // * KmsKeyId - The AWS KMS key identifier for the key to use to encrypt - // the copy of the DB snapshot in the destination AWS Region. This is the - // same identifier for both the CopyDBSnapshot action that is called in the - // destination AWS Region, and the action contained in the presigned URL. - // - // - // * SourceDBSnapshotIdentifier - The DB snapshot identifier for the encrypted - // snapshot to be copied. This identifier must be in the Amazon Resource - // Name (ARN) format for the source AWS Region. For example, if you are copying - // an encrypted DB snapshot from the us-west-2 AWS Region, then your SourceDBSnapshotIdentifier - // looks like the following example: arn:aws:rds:us-west-2:123456789012:snapshot:mysql-instance1-snapshot-20161115. - // - // - // To learn how to generate a Signature Version 4 signed request, see Authenticating - // Requests: Using Query Parameters (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) - // and Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). - PreSignedUrl *string `type:"string"` - - // The identifier for the source DB snapshot. - // - // If the source snapshot is in the same AWS Region as the copy, specify a valid - // DB snapshot identifier. For example, you might specify rds:mysql-instance1-snapshot-20130805. - // - // If the source snapshot is in a different AWS Region than the copy, specify - // a valid DB snapshot ARN. For example, you might specify arn:aws:rds:us-west-2:123456789012:snapshot:mysql-instance1-snapshot-20130805. - // - // If you are copying from a shared manual DB snapshot, this parameter must - // be the Amazon Resource Name (ARN) of the shared DB snapshot. - // - // If you are copying an encrypted snapshot this parameter must be in the ARN - // format for the source AWS Region, and must match the SourceDBSnapshotIdentifier - // in the PreSignedUrl parameter. - // - // Constraints: - // - // * Must specify a valid system snapshot in the "available" state. - // - // Example: rds:mydb-2012-04-02-00-01 - // - // Example: arn:aws:rds:us-west-2:123456789012:snapshot:mysql-instance1-snapshot-20130805 - // - // SourceDBSnapshotIdentifier is a required field - SourceDBSnapshotIdentifier *string `type:"string" required:"true"` - - // SourceRegion is the source region where the resource exists. This is not - // sent over the wire and is only used for presigning. This value should always - // have the same region as the source ARN. - SourceRegion *string `type:"string" ignore:"true"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // The identifier for the copy of the snapshot. - // - // Constraints: - // - // * Can't be null, empty, or blank - // - // * Must contain from 1 to 255 letters, numbers, or hyphens - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // Example: my-db-snapshot - // - // TargetDBSnapshotIdentifier is a required field - TargetDBSnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyDBSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyDBSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyDBSnapshotInput"} - if s.SourceDBSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDBSnapshotIdentifier")) - } - if s.TargetDBSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCopyTags sets the CopyTags field's value. -func (s *CopyDBSnapshotInput) SetCopyTags(v bool) *CopyDBSnapshotInput { - s.CopyTags = &v - return s -} - -// SetDestinationRegion sets the DestinationRegion field's value. -func (s *CopyDBSnapshotInput) SetDestinationRegion(v string) *CopyDBSnapshotInput { - s.DestinationRegion = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CopyDBSnapshotInput) SetKmsKeyId(v string) *CopyDBSnapshotInput { - s.KmsKeyId = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *CopyDBSnapshotInput) SetOptionGroupName(v string) *CopyDBSnapshotInput { - s.OptionGroupName = &v - return s -} - -// SetPreSignedUrl sets the PreSignedUrl field's value. -func (s *CopyDBSnapshotInput) SetPreSignedUrl(v string) *CopyDBSnapshotInput { - s.PreSignedUrl = &v - return s -} - -// SetSourceDBSnapshotIdentifier sets the SourceDBSnapshotIdentifier field's value. -func (s *CopyDBSnapshotInput) SetSourceDBSnapshotIdentifier(v string) *CopyDBSnapshotInput { - s.SourceDBSnapshotIdentifier = &v - return s -} - -// SetSourceRegion sets the SourceRegion field's value. -func (s *CopyDBSnapshotInput) SetSourceRegion(v string) *CopyDBSnapshotInput { - s.SourceRegion = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CopyDBSnapshotInput) SetTags(v []*Tag) *CopyDBSnapshotInput { - s.Tags = v - return s -} - -// SetTargetDBSnapshotIdentifier sets the TargetDBSnapshotIdentifier field's value. -func (s *CopyDBSnapshotInput) SetTargetDBSnapshotIdentifier(v string) *CopyDBSnapshotInput { - s.TargetDBSnapshotIdentifier = &v - return s -} - -type CopyDBSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB snapshot. - // - // This data type is used as a response element in the DescribeDBSnapshots action. - DBSnapshot *DBSnapshot `type:"structure"` -} - -// String returns the string representation -func (s CopyDBSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyDBSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBSnapshot sets the DBSnapshot field's value. -func (s *CopyDBSnapshotOutput) SetDBSnapshot(v *DBSnapshot) *CopyDBSnapshotOutput { - s.DBSnapshot = v - return s -} - -type CopyOptionGroupInput struct { - _ struct{} `type:"structure"` - - // The identifier or ARN for the source option group. For information about - // creating an ARN, see Constructing an ARN for Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) - // in the Amazon RDS User Guide. - // - // Constraints: - // - // * Must specify a valid option group. - // - // * If the source option group is in the same AWS Region as the copy, specify - // a valid option group identifier, for example my-option-group, or a valid - // ARN. - // - // * If the source option group is in a different AWS Region than the copy, - // specify a valid option group ARN, for example arn:aws:rds:us-west-2:123456789012:og:special-options. - // - // SourceOptionGroupIdentifier is a required field - SourceOptionGroupIdentifier *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // The description for the copied option group. - // - // TargetOptionGroupDescription is a required field - TargetOptionGroupDescription *string `type:"string" required:"true"` - - // The identifier for the copied option group. - // - // Constraints: - // - // * Can't be null, empty, or blank - // - // * Must contain from 1 to 255 letters, numbers, or hyphens - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // Example: my-option-group - // - // TargetOptionGroupIdentifier is a required field - TargetOptionGroupIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyOptionGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyOptionGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyOptionGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyOptionGroupInput"} - if s.SourceOptionGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceOptionGroupIdentifier")) - } - if s.TargetOptionGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("TargetOptionGroupDescription")) - } - if s.TargetOptionGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("TargetOptionGroupIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceOptionGroupIdentifier sets the SourceOptionGroupIdentifier field's value. -func (s *CopyOptionGroupInput) SetSourceOptionGroupIdentifier(v string) *CopyOptionGroupInput { - s.SourceOptionGroupIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CopyOptionGroupInput) SetTags(v []*Tag) *CopyOptionGroupInput { - s.Tags = v - return s -} - -// SetTargetOptionGroupDescription sets the TargetOptionGroupDescription field's value. -func (s *CopyOptionGroupInput) SetTargetOptionGroupDescription(v string) *CopyOptionGroupInput { - s.TargetOptionGroupDescription = &v - return s -} - -// SetTargetOptionGroupIdentifier sets the TargetOptionGroupIdentifier field's value. -func (s *CopyOptionGroupInput) SetTargetOptionGroupIdentifier(v string) *CopyOptionGroupInput { - s.TargetOptionGroupIdentifier = &v - return s -} - -type CopyOptionGroupOutput struct { - _ struct{} `type:"structure"` - - OptionGroup *OptionGroup `type:"structure"` -} - -// String returns the string representation -func (s CopyOptionGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyOptionGroupOutput) GoString() string { - return s.String() -} - -// SetOptionGroup sets the OptionGroup field's value. -func (s *CopyOptionGroupOutput) SetOptionGroup(v *OptionGroup) *CopyOptionGroupOutput { - s.OptionGroup = v - return s -} - -type CreateDBClusterEndpointInput struct { - _ struct{} `type:"structure"` - - // The identifier to use for the new endpoint. This parameter is stored as a - // lowercase string. - // - // DBClusterEndpointIdentifier is a required field - DBClusterEndpointIdentifier *string `type:"string" required:"true"` - - // The DB cluster identifier of the DB cluster associated with the endpoint. - // This parameter is stored as a lowercase string. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The type of the endpoint. One of: READER, ANY. - // - // EndpointType is a required field - EndpointType *string `type:"string" required:"true"` - - // List of DB instance identifiers that aren't part of the custom endpoint group. - // All other eligible instances are reachable through the custom endpoint. Only - // relevant if the list of static members is empty. - ExcludedMembers []*string `type:"list"` - - // List of DB instance identifiers that are part of the custom endpoint group. - StaticMembers []*string `type:"list"` -} - -// String returns the string representation -func (s CreateDBClusterEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBClusterEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterEndpointInput"} - if s.DBClusterEndpointIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterEndpointIdentifier")) - } - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.EndpointType == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. -func (s *CreateDBClusterEndpointInput) SetDBClusterEndpointIdentifier(v string) *CreateDBClusterEndpointInput { - s.DBClusterEndpointIdentifier = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *CreateDBClusterEndpointInput) SetDBClusterIdentifier(v string) *CreateDBClusterEndpointInput { - s.DBClusterIdentifier = &v - return s -} - -// SetEndpointType sets the EndpointType field's value. -func (s *CreateDBClusterEndpointInput) SetEndpointType(v string) *CreateDBClusterEndpointInput { - s.EndpointType = &v - return s -} - -// SetExcludedMembers sets the ExcludedMembers field's value. -func (s *CreateDBClusterEndpointInput) SetExcludedMembers(v []*string) *CreateDBClusterEndpointInput { - s.ExcludedMembers = v - return s -} - -// SetStaticMembers sets the StaticMembers field's value. -func (s *CreateDBClusterEndpointInput) SetStaticMembers(v []*string) *CreateDBClusterEndpointInput { - s.StaticMembers = v - return s -} - -// This data type represents the information you need to connect to an Amazon -// Aurora DB cluster. This data type is used as a response element in the following -// actions: -// -// * CreateDBClusterEndpoint -// -// * DescribeDBClusterEndpoints -// -// * ModifyDBClusterEndpoint -// -// * DeleteDBClusterEndpoint -// -// For the data structure that represents Amazon RDS DB instance endpoints, -// see Endpoint. -type CreateDBClusterEndpointOutput struct { - _ struct{} `type:"structure"` - - // The type associated with a custom endpoint. One of: READER, ANY. - CustomEndpointType *string `type:"string"` - - // The Amazon Resource Name (ARN) for the endpoint. - DBClusterEndpointArn *string `type:"string"` - - // The identifier associated with the endpoint. This parameter is stored as - // a lowercase string. - DBClusterEndpointIdentifier *string `type:"string"` - - // A unique system-generated identifier for an endpoint. It remains the same - // for the whole life of the endpoint. - DBClusterEndpointResourceIdentifier *string `type:"string"` - - // The DB cluster identifier of the DB cluster associated with the endpoint. - // This parameter is stored as a lowercase string. - DBClusterIdentifier *string `type:"string"` - - // The DNS address of the endpoint. - Endpoint *string `type:"string"` - - // The type of the endpoint. One of: READER, WRITER, CUSTOM. - EndpointType *string `type:"string"` - - // List of DB instance identifiers that aren't part of the custom endpoint group. - // All other eligible instances are reachable through the custom endpoint. Only - // relevant if the list of static members is empty. - ExcludedMembers []*string `type:"list"` - - // List of DB instance identifiers that are part of the custom endpoint group. - StaticMembers []*string `type:"list"` - - // The current status of the endpoint. One of: creating, available, deleting, - // modifying. - Status *string `type:"string"` -} - -// String returns the string representation -func (s CreateDBClusterEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterEndpointOutput) GoString() string { - return s.String() -} - -// SetCustomEndpointType sets the CustomEndpointType field's value. -func (s *CreateDBClusterEndpointOutput) SetCustomEndpointType(v string) *CreateDBClusterEndpointOutput { - s.CustomEndpointType = &v - return s -} - -// SetDBClusterEndpointArn sets the DBClusterEndpointArn field's value. -func (s *CreateDBClusterEndpointOutput) SetDBClusterEndpointArn(v string) *CreateDBClusterEndpointOutput { - s.DBClusterEndpointArn = &v - return s -} - -// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. -func (s *CreateDBClusterEndpointOutput) SetDBClusterEndpointIdentifier(v string) *CreateDBClusterEndpointOutput { - s.DBClusterEndpointIdentifier = &v - return s -} - -// SetDBClusterEndpointResourceIdentifier sets the DBClusterEndpointResourceIdentifier field's value. -func (s *CreateDBClusterEndpointOutput) SetDBClusterEndpointResourceIdentifier(v string) *CreateDBClusterEndpointOutput { - s.DBClusterEndpointResourceIdentifier = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *CreateDBClusterEndpointOutput) SetDBClusterIdentifier(v string) *CreateDBClusterEndpointOutput { - s.DBClusterIdentifier = &v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *CreateDBClusterEndpointOutput) SetEndpoint(v string) *CreateDBClusterEndpointOutput { - s.Endpoint = &v - return s -} - -// SetEndpointType sets the EndpointType field's value. -func (s *CreateDBClusterEndpointOutput) SetEndpointType(v string) *CreateDBClusterEndpointOutput { - s.EndpointType = &v - return s -} - -// SetExcludedMembers sets the ExcludedMembers field's value. -func (s *CreateDBClusterEndpointOutput) SetExcludedMembers(v []*string) *CreateDBClusterEndpointOutput { - s.ExcludedMembers = v - return s -} - -// SetStaticMembers sets the StaticMembers field's value. -func (s *CreateDBClusterEndpointOutput) SetStaticMembers(v []*string) *CreateDBClusterEndpointOutput { - s.StaticMembers = v - return s -} - -// SetStatus sets the Status field's value. -func (s *CreateDBClusterEndpointOutput) SetStatus(v string) *CreateDBClusterEndpointOutput { - s.Status = &v - return s -} - -type CreateDBClusterInput struct { - _ struct{} `type:"structure"` - - // A list of EC2 Availability Zones that instances in the DB cluster can be - // created in. For information on AWS Regions and Availability Zones, see Choosing - // the Regions and Availability Zones (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.RegionsAndAvailabilityZones.html) - // in the Amazon Aurora User Guide. - AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // The target backtrack window, in seconds. To disable backtracking, set this - // value to 0. - // - // Default: 0 - // - // Constraints: - // - // * If specified, this value must be set to a number from 0 to 259,200 (72 - // hours). - BacktrackWindow *int64 `type:"long"` - - // The number of days for which automated backups are retained. You must specify - // a minimum value of 1. - // - // Default: 1 - // - // Constraints: - // - // * Must be a value from 1 to 35 - BackupRetentionPeriod *int64 `type:"integer"` - - // A value that indicates that the DB cluster should be associated with the - // specified CharacterSet. - CharacterSetName *string `type:"string"` - - // The DB cluster identifier. This parameter is stored as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster1 - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The name of the DB cluster parameter group to associate with this DB cluster. - // If this argument is omitted, default.aurora5.6 is used. - // - // Constraints: - // - // * If supplied, must match the name of an existing DB cluster parameter - // group. - DBClusterParameterGroupName *string `type:"string"` - - // A DB subnet group to associate with this DB cluster. - // - // Constraints: Must match the name of an existing DBSubnetGroup. Must not be - // default. - // - // Example: mySubnetgroup - DBSubnetGroupName *string `type:"string"` - - // The name for your database of up to 64 alpha-numeric characters. If you do - // not provide a name, Amazon RDS will not create a database in the DB cluster - // you are creating. - DatabaseName *string `type:"string"` - - // Indicates if the DB cluster should have deletion protection enabled. The - // database can't be deleted when this value is set to true. The default is - // false. - DeletionProtection *bool `type:"boolean"` - - // DestinationRegion is used for presigning the request to a given region. - DestinationRegion *string `type:"string"` - - // The list of log types that need to be enabled for exporting to CloudWatch - // Logs. The values in the list depend on the DB engine being used. For more - // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) - // in the Amazon Aurora User Guide. - EnableCloudwatchLogsExports []*string `type:"list"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // The name of the database engine to be used for this DB cluster. - // - // Valid Values: aurora (for MySQL 5.6-compatible Aurora), aurora-mysql (for - // MySQL 5.7-compatible Aurora), and aurora-postgresql - // - // Engine is a required field - Engine *string `type:"string" required:"true"` - - // The DB engine mode of the DB cluster, either provisioned, serverless, parallelquery, - // or global. - EngineMode *string `type:"string"` - - // The version number of the database engine to use. - // - // Aurora MySQL - // - // Example: 5.6.10a, 5.7.12 - // - // Aurora PostgreSQL - // - // Example: 9.6.3 - EngineVersion *string `type:"string"` - - // The global cluster ID of an Aurora cluster that becomes the primary cluster - // in the new global database cluster. - GlobalClusterIdentifier *string `type:"string"` - - // The AWS KMS key identifier for an encrypted DB cluster. - // - // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption - // key. If you are creating a DB cluster with the same AWS account that owns - // the KMS encryption key used to encrypt the new DB cluster, then you can use - // the KMS key alias instead of the ARN for the KMS encryption key. - // - // If an encryption key is not specified in KmsKeyId: - // - // * If ReplicationSourceIdentifier identifies an encrypted source, then - // Amazon RDS will use the encryption key used to encrypt the source. Otherwise, - // Amazon RDS will use your default encryption key. - // - // * If the StorageEncrypted parameter is true and ReplicationSourceIdentifier - // is not specified, then Amazon RDS will use your default encryption key. - // - // AWS KMS creates the default encryption key for your AWS account. Your AWS - // account has a different default encryption key for each AWS Region. - // - // If you create a Read Replica of an encrypted DB cluster in another AWS Region, - // you must set KmsKeyId to a KMS key ID that is valid in the destination AWS - // Region. This key is used to encrypt the Read Replica in that AWS Region. - KmsKeyId *string `type:"string"` - - // The password for the master database user. This password can contain any - // printable ASCII character except "/", """, or "@". - // - // Constraints: Must contain from 8 to 41 characters. - MasterUserPassword *string `type:"string"` - - // The name of the master user for the DB cluster. - // - // Constraints: - // - // * Must be 1 to 16 letters or numbers. - // - // * First character must be a letter. - // - // * Can't be a reserved word for the chosen database engine. - MasterUsername *string `type:"string"` - - // A value that indicates that the DB cluster should be associated with the - // specified option group. - // - // Permanent options can't be removed from an option group. The option group - // can't be removed from a DB cluster once it is associated with a DB cluster. - OptionGroupName *string `type:"string"` - - // The port number on which the instances in the DB cluster accept connections. - // - // Default: 3306 if engine is set as aurora or 5432 if set to aurora-postgresql. - Port *int64 `type:"integer"` - - // A URL that contains a Signature Version 4 signed request for the CreateDBCluster - // action to be called in the source AWS Region where the DB cluster is replicated - // from. You only need to specify PreSignedUrl when you are performing cross-region - // replication from an encrypted DB cluster. - // - // The pre-signed URL must be a valid request for the CreateDBCluster API action - // that can be executed in the source AWS Region that contains the encrypted - // DB cluster to be copied. - // - // The pre-signed URL request must contain the following parameter values: - // - // * KmsKeyId - The AWS KMS key identifier for the key to use to encrypt - // the copy of the DB cluster in the destination AWS Region. This should - // refer to the same KMS key for both the CreateDBCluster action that is - // called in the destination AWS Region, and the action contained in the - // pre-signed URL. - // - // * DestinationRegion - The name of the AWS Region that Aurora Read Replica - // will be created in. - // - // * ReplicationSourceIdentifier - The DB cluster identifier for the encrypted - // DB cluster to be copied. This identifier must be in the Amazon Resource - // Name (ARN) format for the source AWS Region. For example, if you are copying - // an encrypted DB cluster from the us-west-2 AWS Region, then your ReplicationSourceIdentifier - // would look like Example: arn:aws:rds:us-west-2:123456789012:cluster:aurora-cluster1. - // - // To learn how to generate a Signature Version 4 signed request, see Authenticating - // Requests: Using Query Parameters (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) - // and Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). - PreSignedUrl *string `type:"string"` - - // The daily time range during which automated backups are created if automated - // backups are enabled using the BackupRetentionPeriod parameter. - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region. To see the time blocks available, see Adjusting - // the Preferred DB Cluster Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) - // in the Amazon Aurora User Guide. - // - // Constraints: - // - // * Must be in the format hh24:mi-hh24:mi. - // - // * Must be in Universal Coordinated Time (UTC). - // - // * Must not conflict with the preferred maintenance window. - // - // * Must be at least 30 minutes. - PreferredBackupWindow *string `type:"string"` - - // The weekly time range during which system maintenance can occur, in Universal - // Coordinated Time (UTC). - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region, occurring on a random day of the week. To see - // the time blocks available, see Adjusting the Preferred DB Cluster Maintenance - // Window (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) - // in the Amazon Aurora User Guide. - // - // Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. - // - // Constraints: Minimum 30-minute window. - PreferredMaintenanceWindow *string `type:"string"` - - // The Amazon Resource Name (ARN) of the source DB instance or DB cluster if - // this DB cluster is created as a Read Replica. - ReplicationSourceIdentifier *string `type:"string"` - - // For DB clusters in serverless DB engine mode, the scaling properties of the - // DB cluster. - ScalingConfiguration *ScalingConfiguration `type:"structure"` - - // SourceRegion is the source region where the resource exists. This is not - // sent over the wire and is only used for presigning. This value should always - // have the same region as the source ARN. - SourceRegion *string `type:"string" ignore:"true"` - - // Specifies whether the DB cluster is encrypted. - StorageEncrypted *bool `type:"boolean"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A list of EC2 VPC security groups to associate with this DB cluster. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s CreateDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.Engine == nil { - invalidParams.Add(request.NewErrParamRequired("Engine")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *CreateDBClusterInput) SetAvailabilityZones(v []*string) *CreateDBClusterInput { - s.AvailabilityZones = v - return s -} - -// SetBacktrackWindow sets the BacktrackWindow field's value. -func (s *CreateDBClusterInput) SetBacktrackWindow(v int64) *CreateDBClusterInput { - s.BacktrackWindow = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *CreateDBClusterInput) SetBackupRetentionPeriod(v int64) *CreateDBClusterInput { - s.BackupRetentionPeriod = &v - return s -} - -// SetCharacterSetName sets the CharacterSetName field's value. -func (s *CreateDBClusterInput) SetCharacterSetName(v string) *CreateDBClusterInput { - s.CharacterSetName = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *CreateDBClusterInput) SetDBClusterIdentifier(v string) *CreateDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *CreateDBClusterInput) SetDBClusterParameterGroupName(v string) *CreateDBClusterInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *CreateDBClusterInput) SetDBSubnetGroupName(v string) *CreateDBClusterInput { - s.DBSubnetGroupName = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *CreateDBClusterInput) SetDatabaseName(v string) *CreateDBClusterInput { - s.DatabaseName = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *CreateDBClusterInput) SetDeletionProtection(v bool) *CreateDBClusterInput { - s.DeletionProtection = &v - return s -} - -// SetDestinationRegion sets the DestinationRegion field's value. -func (s *CreateDBClusterInput) SetDestinationRegion(v string) *CreateDBClusterInput { - s.DestinationRegion = &v - return s -} - -// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. -func (s *CreateDBClusterInput) SetEnableCloudwatchLogsExports(v []*string) *CreateDBClusterInput { - s.EnableCloudwatchLogsExports = v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *CreateDBClusterInput) SetEnableIAMDatabaseAuthentication(v bool) *CreateDBClusterInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *CreateDBClusterInput) SetEngine(v string) *CreateDBClusterInput { - s.Engine = &v - return s -} - -// SetEngineMode sets the EngineMode field's value. -func (s *CreateDBClusterInput) SetEngineMode(v string) *CreateDBClusterInput { - s.EngineMode = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *CreateDBClusterInput) SetEngineVersion(v string) *CreateDBClusterInput { - s.EngineVersion = &v - return s -} - -// SetGlobalClusterIdentifier sets the GlobalClusterIdentifier field's value. -func (s *CreateDBClusterInput) SetGlobalClusterIdentifier(v string) *CreateDBClusterInput { - s.GlobalClusterIdentifier = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateDBClusterInput) SetKmsKeyId(v string) *CreateDBClusterInput { - s.KmsKeyId = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *CreateDBClusterInput) SetMasterUserPassword(v string) *CreateDBClusterInput { - s.MasterUserPassword = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *CreateDBClusterInput) SetMasterUsername(v string) *CreateDBClusterInput { - s.MasterUsername = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *CreateDBClusterInput) SetOptionGroupName(v string) *CreateDBClusterInput { - s.OptionGroupName = &v - return s -} - -// SetPort sets the Port field's value. -func (s *CreateDBClusterInput) SetPort(v int64) *CreateDBClusterInput { - s.Port = &v - return s -} - -// SetPreSignedUrl sets the PreSignedUrl field's value. -func (s *CreateDBClusterInput) SetPreSignedUrl(v string) *CreateDBClusterInput { - s.PreSignedUrl = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *CreateDBClusterInput) SetPreferredBackupWindow(v string) *CreateDBClusterInput { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CreateDBClusterInput) SetPreferredMaintenanceWindow(v string) *CreateDBClusterInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetReplicationSourceIdentifier sets the ReplicationSourceIdentifier field's value. -func (s *CreateDBClusterInput) SetReplicationSourceIdentifier(v string) *CreateDBClusterInput { - s.ReplicationSourceIdentifier = &v - return s -} - -// SetScalingConfiguration sets the ScalingConfiguration field's value. -func (s *CreateDBClusterInput) SetScalingConfiguration(v *ScalingConfiguration) *CreateDBClusterInput { - s.ScalingConfiguration = v - return s -} - -// SetSourceRegion sets the SourceRegion field's value. -func (s *CreateDBClusterInput) SetSourceRegion(v string) *CreateDBClusterInput { - s.SourceRegion = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *CreateDBClusterInput) SetStorageEncrypted(v bool) *CreateDBClusterInput { - s.StorageEncrypted = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBClusterInput) SetTags(v []*Tag) *CreateDBClusterInput { - s.Tags = v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *CreateDBClusterInput) SetVpcSecurityGroupIds(v []*string) *CreateDBClusterInput { - s.VpcSecurityGroupIds = v - return s -} - -type CreateDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Aurora DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, - // and StartDBCluster actions. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s CreateDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *CreateDBClusterOutput) SetDBCluster(v *DBCluster) *CreateDBClusterOutput { - s.DBCluster = v - return s -} - -type CreateDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group. - // - // Constraints: - // - // * Must match the name of an existing DB cluster parameter group. - // - // This value is stored as a lowercase string. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` - - // The DB cluster parameter group family name. A DB cluster parameter group - // can be associated with one and only one DB cluster parameter group family, - // and can be applied only to a DB cluster running a database engine and engine - // version compatible with that DB cluster parameter group family. - // - // Aurora MySQL - // - // Example: aurora5.6, aurora-mysql5.7 - // - // Aurora PostgreSQL - // - // Example: aurora-postgresql9.6 - // - // DBParameterGroupFamily is a required field - DBParameterGroupFamily *string `type:"string" required:"true"` - - // The description for the DB cluster parameter group. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterParameterGroupInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - if s.DBParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) - } - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *CreateDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *CreateDBClusterParameterGroupInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *CreateDBClusterParameterGroupInput) SetDBParameterGroupFamily(v string) *CreateDBClusterParameterGroupInput { - s.DBParameterGroupFamily = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateDBClusterParameterGroupInput) SetDescription(v string) *CreateDBClusterParameterGroupInput { - s.Description = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBClusterParameterGroupInput) SetTags(v []*Tag) *CreateDBClusterParameterGroupInput { - s.Tags = v - return s -} - -type CreateDBClusterParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB cluster parameter group. - // - // This data type is used as a response element in the DescribeDBClusterParameterGroups - // action. - DBClusterParameterGroup *DBClusterParameterGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateDBClusterParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. -func (s *CreateDBClusterParameterGroupOutput) SetDBClusterParameterGroup(v *DBClusterParameterGroup) *CreateDBClusterParameterGroupOutput { - s.DBClusterParameterGroup = v - return s -} - -type CreateDBClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // The identifier of the DB cluster to create a snapshot for. This parameter - // is not case-sensitive. - // - // Constraints: - // - // * Must match the identifier of an existing DBCluster. - // - // Example: my-cluster1 - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The identifier of the DB cluster snapshot. This parameter is stored as a - // lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster1-snapshot1 - // - // DBClusterSnapshotIdentifier is a required field - DBClusterSnapshotIdentifier *string `type:"string" required:"true"` - - // The tags to be assigned to the DB cluster snapshot. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateDBClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterSnapshotInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.DBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *CreateDBClusterSnapshotInput) SetDBClusterIdentifier(v string) *CreateDBClusterSnapshotInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *CreateDBClusterSnapshotInput) SetDBClusterSnapshotIdentifier(v string) *CreateDBClusterSnapshotInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBClusterSnapshotInput) SetTags(v []*Tag) *CreateDBClusterSnapshotInput { - s.Tags = v - return s -} - -type CreateDBClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Contains the details for an Amazon RDS DB cluster snapshot - // - // This data type is used as a response element in the DescribeDBClusterSnapshots - // action. - DBClusterSnapshot *DBClusterSnapshot `type:"structure"` -} - -// String returns the string representation -func (s CreateDBClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. -func (s *CreateDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *CreateDBClusterSnapshotOutput { - s.DBClusterSnapshot = v - return s -} - -type CreateDBInstanceInput struct { - _ struct{} `type:"structure"` - - // The amount of storage (in gibibytes) to allocate for the DB instance. - // - // Type: Integer - // - // Amazon Aurora - // - // Not applicable. Aurora cluster volumes automatically grow as the amount of - // data in your database increases, though you are only charged for the space - // that you use in an Aurora cluster volume. - // - // MySQL - // - // Constraints to the amount of storage for each storage type are the following: - // - // * General Purpose (SSD) storage (gp2): Must be an integer from 20 to 16384. - // - // * Provisioned IOPS storage (io1): Must be an integer from 100 to 16384. - // - // * Magnetic storage (standard): Must be an integer from 5 to 3072. - // - // MariaDB - // - // Constraints to the amount of storage for each storage type are the following: - // - // * General Purpose (SSD) storage (gp2): Must be an integer from 20 to 16384. - // - // * Provisioned IOPS storage (io1): Must be an integer from 100 to 16384. - // - // * Magnetic storage (standard): Must be an integer from 5 to 3072. - // - // PostgreSQL - // - // Constraints to the amount of storage for each storage type are the following: - // - // * General Purpose (SSD) storage (gp2): Must be an integer from 20 to 16384. - // - // * Provisioned IOPS storage (io1): Must be an integer from 100 to 16384. - // - // * Magnetic storage (standard): Must be an integer from 5 to 3072. - // - // Oracle - // - // Constraints to the amount of storage for each storage type are the following: - // - // * General Purpose (SSD) storage (gp2): Must be an integer from 20 to 32768. - // - // * Provisioned IOPS storage (io1): Must be an integer from 100 to 32768. - // - // * Magnetic storage (standard): Must be an integer from 10 to 3072. - // - // SQL Server - // - // Constraints to the amount of storage for each storage type are the following: - // - // * General Purpose (SSD) storage (gp2): - // - // Enterprise and Standard editions: Must be an integer from 200 to 16384. - // - // Web and Express editions: Must be an integer from 20 to 16384. - // - // * Provisioned IOPS storage (io1): - // - // Enterprise and Standard editions: Must be an integer from 200 to 16384. - // - // Web and Express editions: Must be an integer from 100 to 16384. - // - // * Magnetic storage (standard): - // - // Enterprise and Standard editions: Must be an integer from 200 to 1024. - // - // Web and Express editions: Must be an integer from 20 to 1024. - AllocatedStorage *int64 `type:"integer"` - - // Indicates that minor engine upgrades are applied automatically to the DB - // instance during the maintenance window. - // - // Default: true - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The EC2 Availability Zone that the DB instance is created in. For information - // on AWS Regions and Availability Zones, see Regions and Availability Zones - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html). - // - // Default: A random, system-chosen Availability Zone in the endpoint's AWS - // Region. - // - // Example: us-east-1d - // - // Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ - // parameter is set to true. The specified Availability Zone must be in the - // same AWS Region as the current endpoint. - AvailabilityZone *string `type:"string"` - - // The number of days for which automated backups are retained. Setting this - // parameter to a positive number enables backups. Setting this parameter to - // 0 disables automated backups. - // - // Amazon Aurora - // - // Not applicable. The retention period for automated backups is managed by - // the DB cluster. For more information, see CreateDBCluster. - // - // Default: 1 - // - // Constraints: - // - // * Must be a value from 0 to 35 - // - // * Can't be set to 0 if the DB instance is a source to Read Replicas - BackupRetentionPeriod *int64 `type:"integer"` - - // For supported engines, indicates that the DB instance should be associated - // with the specified CharacterSet. - // - // Amazon Aurora - // - // Not applicable. The character set is managed by the DB cluster. For more - // information, see CreateDBCluster. - CharacterSetName *string `type:"string"` - - // True to copy all tags from the DB instance to snapshots of the DB instance, - // and otherwise false. The default is false. - CopyTagsToSnapshot *bool `type:"boolean"` - - // The identifier of the DB cluster that the instance will belong to. - // - // For information on creating a DB cluster, see CreateDBCluster. - // - // Type: String - DBClusterIdentifier *string `type:"string"` - - // The compute and memory capacity of the DB instance, for example, db.m4.large. - // Not all DB instance classes are available in all AWS Regions, or for all - // database engines. For the full list of DB instance classes, and availability - // for your engine, see DB Instance Class (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) - // in the Amazon RDS User Guide. - // - // DBInstanceClass is a required field - DBInstanceClass *string `type:"string" required:"true"` - - // The DB instance identifier. This parameter is stored as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - // - // Example: mydbinstance - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The meaning of this parameter differs according to the database engine you - // use. - // - // Type: String - // - // MySQL - // - // The name of the database to create when the DB instance is created. If this - // parameter is not specified, no database is created in the DB instance. - // - // Constraints: - // - // * Must contain 1 to 64 letters or numbers. - // - // * Can't be a word reserved by the specified database engine - // - // MariaDB - // - // The name of the database to create when the DB instance is created. If this - // parameter is not specified, no database is created in the DB instance. - // - // Constraints: - // - // * Must contain 1 to 64 letters or numbers. - // - // * Can't be a word reserved by the specified database engine - // - // PostgreSQL - // - // The name of the database to create when the DB instance is created. If this - // parameter is not specified, the default "postgres" database is created in - // the DB instance. - // - // Constraints: - // - // * Must contain 1 to 63 letters, numbers, or underscores. - // - // * Must begin with a letter or an underscore. Subsequent characters can - // be letters, underscores, or digits (0-9). - // - // * Can't be a word reserved by the specified database engine - // - // Oracle - // - // The Oracle System ID (SID) of the created DB instance. If you specify null, - // the default value ORCL is used. You can't specify the string NULL, or any - // other reserved word, for DBName. - // - // Default: ORCL - // - // Constraints: - // - // * Can't be longer than 8 characters - // - // SQL Server - // - // Not applicable. Must be null. - // - // Amazon Aurora - // - // The name of the database to create when the primary instance of the DB cluster - // is created. If this parameter is not specified, no database is created in - // the DB instance. - // - // Constraints: - // - // * Must contain 1 to 64 letters or numbers. - // - // * Can't be a word reserved by the specified database engine - DBName *string `type:"string"` - - // The name of the DB parameter group to associate with this DB instance. If - // this argument is omitted, the default DBParameterGroup for the specified - // engine is used. - // - // Constraints: - // - // * Must be 1 to 255 letters, numbers, or hyphens. - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - DBParameterGroupName *string `type:"string"` - - // A list of DB security groups to associate with this DB instance. - // - // Default: The default DB security group for the database engine. - DBSecurityGroups []*string `locationNameList:"DBSecurityGroupName" type:"list"` - - // A DB subnet group to associate with this DB instance. - // - // If there is no DB subnet group, then it is a non-VPC DB instance. - DBSubnetGroupName *string `type:"string"` - - // Indicates if the DB instance should have deletion protection enabled. The - // database can't be deleted when this value is set to true. The default is - // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). - DeletionProtection *bool `type:"boolean"` - - // Specify the Active Directory Domain to create the instance in. - Domain *string `type:"string"` - - // Specify the name of the IAM role to be used when making API calls to the - // Directory Service. - DomainIAMRoleName *string `type:"string"` - - // The list of log types that need to be enabled for exporting to CloudWatch - // Logs. The values in the list depend on the DB engine being used. For more - // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) - // in the Amazon Relational Database Service User Guide. - EnableCloudwatchLogsExports []*string `type:"list"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // You can enable IAM database authentication for the following database engines: - // - // Amazon Aurora - // - // Not applicable. Mapping AWS IAM accounts to database accounts is managed - // by the DB cluster. For more information, see CreateDBCluster. - // - // MySQL - // - // * For MySQL 5.6, minor version 5.6.34 or higher - // - // * For MySQL 5.7, minor version 5.7.16 or higher - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // True to enable Performance Insights for the DB instance, and otherwise false. - // - // For more information, see Using Amazon Performance Insights (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) - // in the Amazon Relational Database Service User Guide. - EnablePerformanceInsights *bool `type:"boolean"` - - // The name of the database engine to be used for this instance. - // - // Not every database engine is available for every AWS Region. - // - // Valid Values: - // - // * aurora (for MySQL 5.6-compatible Aurora) - // - // * aurora-mysql (for MySQL 5.7-compatible Aurora) - // - // * aurora-postgresql - // - // * mariadb - // - // * mysql - // - // * oracle-ee - // - // * oracle-se2 - // - // * oracle-se1 - // - // * oracle-se - // - // * postgres - // - // * sqlserver-ee - // - // * sqlserver-se - // - // * sqlserver-ex - // - // * sqlserver-web - // - // Engine is a required field - Engine *string `type:"string" required:"true"` - - // The version number of the database engine to use. - // - // For a list of valid engine versions, call DescribeDBEngineVersions. - // - // The following are the database engines and links to information about the - // major and minor versions that are available with Amazon RDS. Not every database - // engine is available for every AWS Region. - // - // Amazon Aurora - // - // Not applicable. The version number of the database engine to be used by the - // DB instance is managed by the DB cluster. For more information, see CreateDBCluster. - // - // MariaDB - // - // See MariaDB on Amazon RDS Versions (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.VersionMgmt) - // in the Amazon RDS User Guide. - // - // Microsoft SQL Server - // - // See Version and Feature Support on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.FeatureSupport) - // in the Amazon RDS User Guide. - // - // MySQL - // - // See MySQL on Amazon RDS Versions (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt) - // in the Amazon RDS User Guide. - // - // Oracle - // - // See Oracle Database Engine Release Notes (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.PatchComposition.html) - // in the Amazon RDS User Guide. - // - // PostgreSQL - // - // See Supported PostgreSQL Database Versions (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.DBVersions) - // in the Amazon RDS User Guide. - EngineVersion *string `type:"string"` - - // The amount of Provisioned IOPS (input/output operations per second) to be - // initially allocated for the DB instance. For information about valid Iops - // values, see see Amazon RDS Provisioned IOPS Storage to Improve Performance - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) - // in the Amazon RDS User Guide. - // - // Constraints: Must be a multiple between 1 and 50 of the storage amount for - // the DB instance. - Iops *int64 `type:"integer"` - - // The AWS KMS key identifier for an encrypted DB instance. - // - // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption - // key. If you are creating a DB instance with the same AWS account that owns - // the KMS encryption key used to encrypt the new DB instance, then you can - // use the KMS key alias instead of the ARN for the KM encryption key. - // - // Amazon Aurora - // - // Not applicable. The KMS key identifier is managed by the DB cluster. For - // more information, see CreateDBCluster. - // - // If the StorageEncrypted parameter is true, and you do not specify a value - // for the KmsKeyId parameter, then Amazon RDS will use your default encryption - // key. AWS KMS creates the default encryption key for your AWS account. Your - // AWS account has a different default encryption key for each AWS Region. - KmsKeyId *string `type:"string"` - - // License model information for this DB instance. - // - // Valid values: license-included | bring-your-own-license | general-public-license - LicenseModel *string `type:"string"` - - // The password for the master user. The password can include any printable - // ASCII character except "/", """, or "@". - // - // Amazon Aurora - // - // Not applicable. The password for the master user is managed by the DB cluster. - // For more information, see CreateDBCluster. - // - // MariaDB - // - // Constraints: Must contain from 8 to 41 characters. - // - // Microsoft SQL Server - // - // Constraints: Must contain from 8 to 128 characters. - // - // MySQL - // - // Constraints: Must contain from 8 to 41 characters. - // - // Oracle - // - // Constraints: Must contain from 8 to 30 characters. - // - // PostgreSQL - // - // Constraints: Must contain from 8 to 128 characters. - MasterUserPassword *string `type:"string"` - - // The name for the master user. - // - // Amazon Aurora - // - // Not applicable. The name for the master user is managed by the DB cluster. - // For more information, see CreateDBCluster. - // - // MariaDB - // - // Constraints: - // - // * Required for MariaDB. - // - // * Must be 1 to 16 letters or numbers. - // - // * Can't be a reserved word for the chosen database engine. - // - // Microsoft SQL Server - // - // Constraints: - // - // * Required for SQL Server. - // - // * Must be 1 to 128 letters or numbers. - // - // * The first character must be a letter. - // - // * Can't be a reserved word for the chosen database engine. - // - // MySQL - // - // Constraints: - // - // * Required for MySQL. - // - // * Must be 1 to 16 letters or numbers. - // - // * First character must be a letter. - // - // * Can't be a reserved word for the chosen database engine. - // - // Oracle - // - // Constraints: - // - // * Required for Oracle. - // - // * Must be 1 to 30 letters or numbers. - // - // * First character must be a letter. - // - // * Can't be a reserved word for the chosen database engine. - // - // PostgreSQL - // - // Constraints: - // - // * Required for PostgreSQL. - // - // * Must be 1 to 63 letters or numbers. - // - // * First character must be a letter. - // - // * Can't be a reserved word for the chosen database engine. - MasterUsername *string `type:"string"` - - // The interval, in seconds, between points when Enhanced Monitoring metrics - // are collected for the DB instance. To disable collecting Enhanced Monitoring - // metrics, specify 0. The default is 0. - // - // If MonitoringRoleArn is specified, then you must also set MonitoringInterval - // to a value other than 0. - // - // Valid Values: 0, 1, 5, 10, 15, 30, 60 - MonitoringInterval *int64 `type:"integer"` - - // The ARN for the IAM role that permits RDS to send enhanced monitoring metrics - // to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. - // For information on creating a monitoring role, go to Setting Up and Enabling - // Enhanced Monitoring (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling) - // in the Amazon RDS User Guide. - // - // If MonitoringInterval is set to a value other than 0, then you must supply - // a MonitoringRoleArn value. - MonitoringRoleArn *string `type:"string"` - - // A value that specifies whether the DB instance is a Multi-AZ deployment. - // You can't set the AvailabilityZone parameter if the MultiAZ parameter is - // set to true. - MultiAZ *bool `type:"boolean"` - - // Indicates that the DB instance should be associated with the specified option - // group. - // - // Permanent options, such as the TDE option for Oracle Advanced Security TDE, - // can't be removed from an option group, and that option group can't be removed - // from a DB instance once it is associated with a DB instance - OptionGroupName *string `type:"string"` - - // The AWS KMS key identifier for encryption of Performance Insights data. The - // KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the - // KMS key alias for the KMS encryption key. - PerformanceInsightsKMSKeyId *string `type:"string"` - - // The amount of time, in days, to retain Performance Insights data. Valid values - // are 7 or 731 (2 years). - PerformanceInsightsRetentionPeriod *int64 `type:"integer"` - - // The port number on which the database accepts connections. - // - // MySQL - // - // Default: 3306 - // - // Valid Values: 1150-65535 - // - // Type: Integer - // - // MariaDB - // - // Default: 3306 - // - // Valid Values: 1150-65535 - // - // Type: Integer - // - // PostgreSQL - // - // Default: 5432 - // - // Valid Values: 1150-65535 - // - // Type: Integer - // - // Oracle - // - // Default: 1521 - // - // Valid Values: 1150-65535 - // - // SQL Server - // - // Default: 1433 - // - // Valid Values: 1150-65535 except for 1434, 3389, 47001, 49152, and 49152 through - // 49156. - // - // Amazon Aurora - // - // Default: 3306 - // - // Valid Values: 1150-65535 - // - // Type: Integer - Port *int64 `type:"integer"` - - // The daily time range during which automated backups are created if automated - // backups are enabled, using the BackupRetentionPeriod parameter. For more - // information, see The Backup Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow) - // in the Amazon RDS User Guide. - // - // Amazon Aurora - // - // Not applicable. The daily time range for creating automated backups is managed - // by the DB cluster. For more information, see CreateDBCluster. - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region. To see the time blocks available, see Adjusting - // the Preferred DB Instance Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow) - // in the Amazon RDS User Guide. - // - // Constraints: - // - // * Must be in the format hh24:mi-hh24:mi. - // - // * Must be in Universal Coordinated Time (UTC). - // - // * Must not conflict with the preferred maintenance window. - // - // * Must be at least 30 minutes. - PreferredBackupWindow *string `type:"string"` - - // The time range each week during which system maintenance can occur, in Universal - // Coordinated Time (UTC). For more information, see Amazon RDS Maintenance - // Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance). - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region, occurring on a random day of the week. - // - // Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. - // - // Constraints: Minimum 30-minute window. - PreferredMaintenanceWindow *string `type:"string"` - - // The number of CPU cores and the number of threads per core for the DB instance - // class of the DB instance. - ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` - - // A value that specifies the order in which an Aurora Replica is promoted to - // the primary instance after a failure of the existing primary instance. For - // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.FaultTolerance) - // in the Amazon Aurora User Guide. - // - // Default: 1 - // - // Valid Values: 0 - 15 - PromotionTier *int64 `type:"integer"` - - // Specifies the accessibility options for the DB instance. A value of true - // specifies an Internet-facing instance with a publicly resolvable DNS name, - // which resolves to a public IP address. A value of false specifies an internal - // instance with a DNS name that resolves to a private IP address. - // - // Default: The default behavior varies depending on whether DBSubnetGroupName - // is specified. - // - // If DBSubnetGroupName is not specified, and PubliclyAccessible is not specified, - // the following applies: - // - // * If the default VPC in the target region doesn’t have an Internet gateway - // attached to it, the DB instance is private. - // - // * If the default VPC in the target region has an Internet gateway attached - // to it, the DB instance is public. - // - // If DBSubnetGroupName is specified, and PubliclyAccessible is not specified, - // the following applies: - // - // * If the subnets are part of a VPC that doesn’t have an Internet gateway - // attached to it, the DB instance is private. - // - // * If the subnets are part of a VPC that has an Internet gateway attached - // to it, the DB instance is public. - PubliclyAccessible *bool `type:"boolean"` - - // Specifies whether the DB instance is encrypted. - // - // Amazon Aurora - // - // Not applicable. The encryption for DB instances is managed by the DB cluster. - // For more information, see CreateDBCluster. - // - // Default: false - StorageEncrypted *bool `type:"boolean"` - - // Specifies the storage type to be associated with the DB instance. - // - // Valid values: standard | gp2 | io1 - // - // If you specify io1, you must also include a value for the Iops parameter. - // - // Default: io1 if the Iops parameter is specified, otherwise standard - StorageType *string `type:"string"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // The ARN from the key store with which to associate the instance for TDE encryption. - TdeCredentialArn *string `type:"string"` - - // The password for the given ARN from the key store in order to access the - // device. - TdeCredentialPassword *string `type:"string"` - - // The time zone of the DB instance. The time zone parameter is currently supported - // only by Microsoft SQL Server (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.TimeZone). - Timezone *string `type:"string"` - - // A list of Amazon EC2 VPC security groups to associate with this DB instance. - // - // Amazon Aurora - // - // Not applicable. The associated list of EC2 VPC security groups is managed - // by the DB cluster. For more information, see CreateDBCluster. - // - // Default: The default EC2 VPC security group for the DB subnet group's VPC. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s CreateDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBInstanceInput"} - if s.DBInstanceClass == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceClass")) - } - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - if s.Engine == nil { - invalidParams.Add(request.NewErrParamRequired("Engine")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *CreateDBInstanceInput) SetAllocatedStorage(v int64) *CreateDBInstanceInput { - s.AllocatedStorage = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *CreateDBInstanceInput) SetAutoMinorVersionUpgrade(v bool) *CreateDBInstanceInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateDBInstanceInput) SetAvailabilityZone(v string) *CreateDBInstanceInput { - s.AvailabilityZone = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *CreateDBInstanceInput) SetBackupRetentionPeriod(v int64) *CreateDBInstanceInput { - s.BackupRetentionPeriod = &v - return s -} - -// SetCharacterSetName sets the CharacterSetName field's value. -func (s *CreateDBInstanceInput) SetCharacterSetName(v string) *CreateDBInstanceInput { - s.CharacterSetName = &v - return s -} - -// SetCopyTagsToSnapshot sets the CopyTagsToSnapshot field's value. -func (s *CreateDBInstanceInput) SetCopyTagsToSnapshot(v bool) *CreateDBInstanceInput { - s.CopyTagsToSnapshot = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *CreateDBInstanceInput) SetDBClusterIdentifier(v string) *CreateDBInstanceInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *CreateDBInstanceInput) SetDBInstanceClass(v string) *CreateDBInstanceInput { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *CreateDBInstanceInput) SetDBInstanceIdentifier(v string) *CreateDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBName sets the DBName field's value. -func (s *CreateDBInstanceInput) SetDBName(v string) *CreateDBInstanceInput { - s.DBName = &v - return s -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *CreateDBInstanceInput) SetDBParameterGroupName(v string) *CreateDBInstanceInput { - s.DBParameterGroupName = &v - return s -} - -// SetDBSecurityGroups sets the DBSecurityGroups field's value. -func (s *CreateDBInstanceInput) SetDBSecurityGroups(v []*string) *CreateDBInstanceInput { - s.DBSecurityGroups = v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *CreateDBInstanceInput) SetDBSubnetGroupName(v string) *CreateDBInstanceInput { - s.DBSubnetGroupName = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *CreateDBInstanceInput) SetDeletionProtection(v bool) *CreateDBInstanceInput { - s.DeletionProtection = &v - return s -} - -// SetDomain sets the Domain field's value. -func (s *CreateDBInstanceInput) SetDomain(v string) *CreateDBInstanceInput { - s.Domain = &v - return s -} - -// SetDomainIAMRoleName sets the DomainIAMRoleName field's value. -func (s *CreateDBInstanceInput) SetDomainIAMRoleName(v string) *CreateDBInstanceInput { - s.DomainIAMRoleName = &v - return s -} - -// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. -func (s *CreateDBInstanceInput) SetEnableCloudwatchLogsExports(v []*string) *CreateDBInstanceInput { - s.EnableCloudwatchLogsExports = v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *CreateDBInstanceInput) SetEnableIAMDatabaseAuthentication(v bool) *CreateDBInstanceInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEnablePerformanceInsights sets the EnablePerformanceInsights field's value. -func (s *CreateDBInstanceInput) SetEnablePerformanceInsights(v bool) *CreateDBInstanceInput { - s.EnablePerformanceInsights = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *CreateDBInstanceInput) SetEngine(v string) *CreateDBInstanceInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *CreateDBInstanceInput) SetEngineVersion(v string) *CreateDBInstanceInput { - s.EngineVersion = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *CreateDBInstanceInput) SetIops(v int64) *CreateDBInstanceInput { - s.Iops = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateDBInstanceInput) SetKmsKeyId(v string) *CreateDBInstanceInput { - s.KmsKeyId = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *CreateDBInstanceInput) SetLicenseModel(v string) *CreateDBInstanceInput { - s.LicenseModel = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *CreateDBInstanceInput) SetMasterUserPassword(v string) *CreateDBInstanceInput { - s.MasterUserPassword = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *CreateDBInstanceInput) SetMasterUsername(v string) *CreateDBInstanceInput { - s.MasterUsername = &v - return s -} - -// SetMonitoringInterval sets the MonitoringInterval field's value. -func (s *CreateDBInstanceInput) SetMonitoringInterval(v int64) *CreateDBInstanceInput { - s.MonitoringInterval = &v - return s -} - -// SetMonitoringRoleArn sets the MonitoringRoleArn field's value. -func (s *CreateDBInstanceInput) SetMonitoringRoleArn(v string) *CreateDBInstanceInput { - s.MonitoringRoleArn = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *CreateDBInstanceInput) SetMultiAZ(v bool) *CreateDBInstanceInput { - s.MultiAZ = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *CreateDBInstanceInput) SetOptionGroupName(v string) *CreateDBInstanceInput { - s.OptionGroupName = &v - return s -} - -// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. -func (s *CreateDBInstanceInput) SetPerformanceInsightsKMSKeyId(v string) *CreateDBInstanceInput { - s.PerformanceInsightsKMSKeyId = &v - return s -} - -// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. -func (s *CreateDBInstanceInput) SetPerformanceInsightsRetentionPeriod(v int64) *CreateDBInstanceInput { - s.PerformanceInsightsRetentionPeriod = &v - return s -} - -// SetPort sets the Port field's value. -func (s *CreateDBInstanceInput) SetPort(v int64) *CreateDBInstanceInput { - s.Port = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *CreateDBInstanceInput) SetPreferredBackupWindow(v string) *CreateDBInstanceInput { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CreateDBInstanceInput) SetPreferredMaintenanceWindow(v string) *CreateDBInstanceInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetProcessorFeatures sets the ProcessorFeatures field's value. -func (s *CreateDBInstanceInput) SetProcessorFeatures(v []*ProcessorFeature) *CreateDBInstanceInput { - s.ProcessorFeatures = v - return s -} - -// SetPromotionTier sets the PromotionTier field's value. -func (s *CreateDBInstanceInput) SetPromotionTier(v int64) *CreateDBInstanceInput { - s.PromotionTier = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *CreateDBInstanceInput) SetPubliclyAccessible(v bool) *CreateDBInstanceInput { - s.PubliclyAccessible = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *CreateDBInstanceInput) SetStorageEncrypted(v bool) *CreateDBInstanceInput { - s.StorageEncrypted = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *CreateDBInstanceInput) SetStorageType(v string) *CreateDBInstanceInput { - s.StorageType = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBInstanceInput) SetTags(v []*Tag) *CreateDBInstanceInput { - s.Tags = v - return s -} - -// SetTdeCredentialArn sets the TdeCredentialArn field's value. -func (s *CreateDBInstanceInput) SetTdeCredentialArn(v string) *CreateDBInstanceInput { - s.TdeCredentialArn = &v - return s -} - -// SetTdeCredentialPassword sets the TdeCredentialPassword field's value. -func (s *CreateDBInstanceInput) SetTdeCredentialPassword(v string) *CreateDBInstanceInput { - s.TdeCredentialPassword = &v - return s -} - -// SetTimezone sets the Timezone field's value. -func (s *CreateDBInstanceInput) SetTimezone(v string) *CreateDBInstanceInput { - s.Timezone = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *CreateDBInstanceInput) SetVpcSecurityGroupIds(v []*string) *CreateDBInstanceInput { - s.VpcSecurityGroupIds = v - return s -} - -type CreateDBInstanceOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s CreateDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBInstanceOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *CreateDBInstanceOutput) SetDBInstance(v *DBInstance) *CreateDBInstanceOutput { - s.DBInstance = v - return s -} - -type CreateDBInstanceReadReplicaInput struct { - _ struct{} `type:"structure"` - - // Indicates that minor engine upgrades are applied automatically to the Read - // Replica during the maintenance window. - // - // Default: Inherits from the source DB instance - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The Amazon EC2 Availability Zone that the Read Replica is created in. - // - // Default: A random, system-chosen Availability Zone in the endpoint's AWS - // Region. - // - // Example: us-east-1d - AvailabilityZone *string `type:"string"` - - // True to copy all tags from the Read Replica to snapshots of the Read Replica, - // and otherwise false. The default is false. - CopyTagsToSnapshot *bool `type:"boolean"` - - // The compute and memory capacity of the Read Replica, for example, db.m4.large. - // Not all DB instance classes are available in all AWS Regions, or for all - // database engines. For the full list of DB instance classes, and availability - // for your engine, see DB Instance Class (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) - // in the Amazon RDS User Guide. - // - // Default: Inherits from the source DB instance. - DBInstanceClass *string `type:"string"` - - // The DB instance identifier of the Read Replica. This identifier is the unique - // key that identifies a DB instance. This parameter is stored as a lowercase - // string. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // Specifies a DB subnet group for the DB instance. The new DB instance is created - // in the VPC associated with the DB subnet group. If no DB subnet group is - // specified, then the new DB instance is not created in a VPC. - // - // Constraints: - // - // * Can only be specified if the source DB instance identifier specifies - // a DB instance in another AWS Region. - // - // * If supplied, must match the name of an existing DBSubnetGroup. - // - // * The specified DB subnet group must be in the same AWS Region in which - // the operation is running. - // - // * All Read Replicas in one AWS Region that are created from the same source - // DB instance must either:> - // - // Specify DB subnet groups from the same VPC. All these Read Replicas are created - // in the same VPC. - // - // Not specify a DB subnet group. All these Read Replicas are created outside - // of any VPC. - // - // Example: mySubnetgroup - DBSubnetGroupName *string `type:"string"` - - // Indicates if the DB instance should have deletion protection enabled. The - // database can't be deleted when this value is set to true. The default is - // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). - DeletionProtection *bool `type:"boolean"` - - // DestinationRegion is used for presigning the request to a given region. - DestinationRegion *string `type:"string"` - - // The list of logs that the new DB instance is to export to CloudWatch Logs. - // The values in the list depend on the DB engine being used. For more information, - // see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) - // in the Amazon RDS User Guide. - EnableCloudwatchLogsExports []*string `type:"list"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // You can enable IAM database authentication for the following database engines - // - // * For MySQL 5.6, minor version 5.6.34 or higher - // - // * For MySQL 5.7, minor version 5.7.16 or higher - // - // * Aurora MySQL 5.6 or higher - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // True to enable Performance Insights for the read replica, and otherwise false. - // - // For more information, see Using Amazon Performance Insights (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) - // in the Amazon RDS User Guide. - EnablePerformanceInsights *bool `type:"boolean"` - - // The amount of Provisioned IOPS (input/output operations per second) to be - // initially allocated for the DB instance. - Iops *int64 `type:"integer"` - - // The AWS KMS key ID for an encrypted Read Replica. The KMS key ID is the Amazon - // Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS - // encryption key. - // - // If you create an encrypted Read Replica in the same AWS Region as the source - // DB instance, then you do not have to specify a value for this parameter. - // The Read Replica is encrypted with the same KMS key as the source DB instance. - // - // If you create an encrypted Read Replica in a different AWS Region, then you - // must specify a KMS key for the destination AWS Region. KMS encryption keys - // are specific to the AWS Region that they are created in, and you can't use - // encryption keys from one AWS Region in another AWS Region. - // - // You can't create an encrypted Read Replica from an unencrypted DB instance. - KmsKeyId *string `type:"string"` - - // The interval, in seconds, between points when Enhanced Monitoring metrics - // are collected for the Read Replica. To disable collecting Enhanced Monitoring - // metrics, specify 0. The default is 0. - // - // If MonitoringRoleArn is specified, then you must also set MonitoringInterval - // to a value other than 0. - // - // Valid Values: 0, 1, 5, 10, 15, 30, 60 - MonitoringInterval *int64 `type:"integer"` - - // The ARN for the IAM role that permits RDS to send enhanced monitoring metrics - // to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. - // For information on creating a monitoring role, go to To create an IAM role - // for Amazon RDS Enhanced Monitoring (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole) - // in the Amazon RDS User Guide. - // - // If MonitoringInterval is set to a value other than 0, then you must supply - // a MonitoringRoleArn value. - MonitoringRoleArn *string `type:"string"` - - // Specifies whether the Read Replica is in a Multi-AZ deployment. - // - // You can create a Read Replica as a Multi-AZ DB instance. RDS creates a standby - // of your replica in another Availability Zone for failover support for the - // replica. Creating your Read Replica as a Multi-AZ DB instance is independent - // of whether the source database is a Multi-AZ DB instance. - MultiAZ *bool `type:"boolean"` - - // The option group the DB instance is associated with. If omitted, the default - // option group for the engine specified is used. - OptionGroupName *string `type:"string"` - - // The AWS KMS key identifier for encryption of Performance Insights data. The - // KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the - // KMS key alias for the KMS encryption key. - PerformanceInsightsKMSKeyId *string `type:"string"` - - // The amount of time, in days, to retain Performance Insights data. Valid values - // are 7 or 731 (2 years). - PerformanceInsightsRetentionPeriod *int64 `type:"integer"` - - // The port number that the DB instance uses for connections. - // - // Default: Inherits from the source DB instance - // - // Valid Values: 1150-65535 - Port *int64 `type:"integer"` - - // The URL that contains a Signature Version 4 signed request for the CreateDBInstanceReadReplica - // API action in the source AWS Region that contains the source DB instance. - // - // You must specify this parameter when you create an encrypted Read Replica - // from another AWS Region by using the Amazon RDS API. You can specify the - // --source-region option instead of this parameter when you create an encrypted - // Read Replica from another AWS Region by using the AWS CLI. - // - // The presigned URL must be a valid request for the CreateDBInstanceReadReplica - // API action that can be executed in the source AWS Region that contains the - // encrypted source DB instance. The presigned URL request must contain the - // following parameter values: - // - // * DestinationRegion - The AWS Region that the encrypted Read Replica is - // created in. This AWS Region is the same one where the CreateDBInstanceReadReplica - // action is called that contains this presigned URL. - // - // For example, if you create an encrypted DB instance in the us-west-1 AWS - // Region, from a source DB instance in the us-east-2 AWS Region, then you - // call the CreateDBInstanceReadReplica action in the us-east-1 AWS Region - // and provide a presigned URL that contains a call to the CreateDBInstanceReadReplica - // action in the us-west-2 AWS Region. For this example, the DestinationRegion - // in the presigned URL must be set to the us-east-1 AWS Region. - // - // * KmsKeyId - The AWS KMS key identifier for the key to use to encrypt - // the Read Replica in the destination AWS Region. This is the same identifier - // for both the CreateDBInstanceReadReplica action that is called in the - // destination AWS Region, and the action contained in the presigned URL. - // - // - // * SourceDBInstanceIdentifier - The DB instance identifier for the encrypted - // DB instance to be replicated. This identifier must be in the Amazon Resource - // Name (ARN) format for the source AWS Region. For example, if you are creating - // an encrypted Read Replica from a DB instance in the us-west-2 AWS Region, - // then your SourceDBInstanceIdentifier looks like the following example: - // arn:aws:rds:us-west-2:123456789012:instance:mysql-instance1-20161115. - // - // - // To learn how to generate a Signature Version 4 signed request, see Authenticating - // Requests: Using Query Parameters (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) - // and Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). - PreSignedUrl *string `type:"string"` - - // The number of CPU cores and the number of threads per core for the DB instance - // class of the DB instance. - ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` - - // Specifies the accessibility options for the DB instance. A value of true - // specifies an Internet-facing instance with a publicly resolvable DNS name, - // which resolves to a public IP address. A value of false specifies an internal - // instance with a DNS name that resolves to a private IP address. For more - // information, see CreateDBInstance. - PubliclyAccessible *bool `type:"boolean"` - - // The identifier of the DB instance that will act as the source for the Read - // Replica. Each DB instance can have up to five Read Replicas. - // - // Constraints: - // - // * Must be the identifier of an existing MySQL, MariaDB, or PostgreSQL - // DB instance. - // - // * Can specify a DB instance that is a MySQL Read Replica only if the source - // is running MySQL 5.6 or later. - // - // * Can specify a DB instance that is a PostgreSQL DB instance only if the - // source is running PostgreSQL 9.3.5 or later (9.4.7 and higher for cross-region - // replication). - // - // * The specified DB instance must have automatic backups enabled, its backup - // retention period must be greater than 0. - // - // * If the source DB instance is in the same AWS Region as the Read Replica, - // specify a valid DB instance identifier. - // - // * If the source DB instance is in a different AWS Region than the Read - // Replica, specify a valid DB instance ARN. For more information, go to - // Constructing an ARN for Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) - // in the Amazon RDS User Guide. - // - // SourceDBInstanceIdentifier is a required field - SourceDBInstanceIdentifier *string `type:"string" required:"true"` - - // SourceRegion is the source region where the resource exists. This is not - // sent over the wire and is only used for presigning. This value should always - // have the same region as the source ARN. - SourceRegion *string `type:"string" ignore:"true"` - - // Specifies the storage type to be associated with the Read Replica. - // - // Valid values: standard | gp2 | io1 - // - // If you specify io1, you must also include a value for the Iops parameter. - // - // Default: io1 if the Iops parameter is specified, otherwise standard - StorageType *string `type:"string"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A value that specifies that the DB instance class of the DB instance uses - // its default processor features. - UseDefaultProcessorFeatures *bool `type:"boolean"` - - // A list of EC2 VPC security groups to associate with the Read Replica. - // - // Default: The default EC2 VPC security group for the DB subnet group's VPC. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s CreateDBInstanceReadReplicaInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBInstanceReadReplicaInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBInstanceReadReplicaInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBInstanceReadReplicaInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - if s.SourceDBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *CreateDBInstanceReadReplicaInput) SetAutoMinorVersionUpgrade(v bool) *CreateDBInstanceReadReplicaInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateDBInstanceReadReplicaInput) SetAvailabilityZone(v string) *CreateDBInstanceReadReplicaInput { - s.AvailabilityZone = &v - return s -} - -// SetCopyTagsToSnapshot sets the CopyTagsToSnapshot field's value. -func (s *CreateDBInstanceReadReplicaInput) SetCopyTagsToSnapshot(v bool) *CreateDBInstanceReadReplicaInput { - s.CopyTagsToSnapshot = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *CreateDBInstanceReadReplicaInput) SetDBInstanceClass(v string) *CreateDBInstanceReadReplicaInput { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *CreateDBInstanceReadReplicaInput) SetDBInstanceIdentifier(v string) *CreateDBInstanceReadReplicaInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *CreateDBInstanceReadReplicaInput) SetDBSubnetGroupName(v string) *CreateDBInstanceReadReplicaInput { - s.DBSubnetGroupName = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *CreateDBInstanceReadReplicaInput) SetDeletionProtection(v bool) *CreateDBInstanceReadReplicaInput { - s.DeletionProtection = &v - return s -} - -// SetDestinationRegion sets the DestinationRegion field's value. -func (s *CreateDBInstanceReadReplicaInput) SetDestinationRegion(v string) *CreateDBInstanceReadReplicaInput { - s.DestinationRegion = &v - return s -} - -// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. -func (s *CreateDBInstanceReadReplicaInput) SetEnableCloudwatchLogsExports(v []*string) *CreateDBInstanceReadReplicaInput { - s.EnableCloudwatchLogsExports = v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *CreateDBInstanceReadReplicaInput) SetEnableIAMDatabaseAuthentication(v bool) *CreateDBInstanceReadReplicaInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEnablePerformanceInsights sets the EnablePerformanceInsights field's value. -func (s *CreateDBInstanceReadReplicaInput) SetEnablePerformanceInsights(v bool) *CreateDBInstanceReadReplicaInput { - s.EnablePerformanceInsights = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *CreateDBInstanceReadReplicaInput) SetIops(v int64) *CreateDBInstanceReadReplicaInput { - s.Iops = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateDBInstanceReadReplicaInput) SetKmsKeyId(v string) *CreateDBInstanceReadReplicaInput { - s.KmsKeyId = &v - return s -} - -// SetMonitoringInterval sets the MonitoringInterval field's value. -func (s *CreateDBInstanceReadReplicaInput) SetMonitoringInterval(v int64) *CreateDBInstanceReadReplicaInput { - s.MonitoringInterval = &v - return s -} - -// SetMonitoringRoleArn sets the MonitoringRoleArn field's value. -func (s *CreateDBInstanceReadReplicaInput) SetMonitoringRoleArn(v string) *CreateDBInstanceReadReplicaInput { - s.MonitoringRoleArn = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *CreateDBInstanceReadReplicaInput) SetMultiAZ(v bool) *CreateDBInstanceReadReplicaInput { - s.MultiAZ = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *CreateDBInstanceReadReplicaInput) SetOptionGroupName(v string) *CreateDBInstanceReadReplicaInput { - s.OptionGroupName = &v - return s -} - -// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. -func (s *CreateDBInstanceReadReplicaInput) SetPerformanceInsightsKMSKeyId(v string) *CreateDBInstanceReadReplicaInput { - s.PerformanceInsightsKMSKeyId = &v - return s -} - -// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. -func (s *CreateDBInstanceReadReplicaInput) SetPerformanceInsightsRetentionPeriod(v int64) *CreateDBInstanceReadReplicaInput { - s.PerformanceInsightsRetentionPeriod = &v - return s -} - -// SetPort sets the Port field's value. -func (s *CreateDBInstanceReadReplicaInput) SetPort(v int64) *CreateDBInstanceReadReplicaInput { - s.Port = &v - return s -} - -// SetPreSignedUrl sets the PreSignedUrl field's value. -func (s *CreateDBInstanceReadReplicaInput) SetPreSignedUrl(v string) *CreateDBInstanceReadReplicaInput { - s.PreSignedUrl = &v - return s -} - -// SetProcessorFeatures sets the ProcessorFeatures field's value. -func (s *CreateDBInstanceReadReplicaInput) SetProcessorFeatures(v []*ProcessorFeature) *CreateDBInstanceReadReplicaInput { - s.ProcessorFeatures = v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *CreateDBInstanceReadReplicaInput) SetPubliclyAccessible(v bool) *CreateDBInstanceReadReplicaInput { - s.PubliclyAccessible = &v - return s -} - -// SetSourceDBInstanceIdentifier sets the SourceDBInstanceIdentifier field's value. -func (s *CreateDBInstanceReadReplicaInput) SetSourceDBInstanceIdentifier(v string) *CreateDBInstanceReadReplicaInput { - s.SourceDBInstanceIdentifier = &v - return s -} - -// SetSourceRegion sets the SourceRegion field's value. -func (s *CreateDBInstanceReadReplicaInput) SetSourceRegion(v string) *CreateDBInstanceReadReplicaInput { - s.SourceRegion = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *CreateDBInstanceReadReplicaInput) SetStorageType(v string) *CreateDBInstanceReadReplicaInput { - s.StorageType = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBInstanceReadReplicaInput) SetTags(v []*Tag) *CreateDBInstanceReadReplicaInput { - s.Tags = v - return s -} - -// SetUseDefaultProcessorFeatures sets the UseDefaultProcessorFeatures field's value. -func (s *CreateDBInstanceReadReplicaInput) SetUseDefaultProcessorFeatures(v bool) *CreateDBInstanceReadReplicaInput { - s.UseDefaultProcessorFeatures = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *CreateDBInstanceReadReplicaInput) SetVpcSecurityGroupIds(v []*string) *CreateDBInstanceReadReplicaInput { - s.VpcSecurityGroupIds = v - return s -} - -type CreateDBInstanceReadReplicaOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s CreateDBInstanceReadReplicaOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBInstanceReadReplicaOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *CreateDBInstanceReadReplicaOutput) SetDBInstance(v *DBInstance) *CreateDBInstanceReadReplicaOutput { - s.DBInstance = v - return s -} - -type CreateDBParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The DB parameter group family name. A DB parameter group can be associated - // with one and only one DB parameter group family, and can be applied only - // to a DB instance running a database engine and engine version compatible - // with that DB parameter group family. - // - // To list all of the available parameter group families, use the following - // command: - // - // aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily" - // - // The output contains duplicates. - // - // DBParameterGroupFamily is a required field - DBParameterGroupFamily *string `type:"string" required:"true"` - - // The name of the DB parameter group. - // - // Constraints: - // - // * Must be 1 to 255 letters, numbers, or hyphens. - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // This value is stored as a lowercase string. - // - // DBParameterGroupName is a required field - DBParameterGroupName *string `type:"string" required:"true"` - - // The description for the DB parameter group. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateDBParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBParameterGroupInput"} - if s.DBParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) - } - if s.DBParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) - } - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *CreateDBParameterGroupInput) SetDBParameterGroupFamily(v string) *CreateDBParameterGroupInput { - s.DBParameterGroupFamily = &v - return s -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *CreateDBParameterGroupInput) SetDBParameterGroupName(v string) *CreateDBParameterGroupInput { - s.DBParameterGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateDBParameterGroupInput) SetDescription(v string) *CreateDBParameterGroupInput { - s.Description = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBParameterGroupInput) SetTags(v []*Tag) *CreateDBParameterGroupInput { - s.Tags = v - return s -} - -type CreateDBParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB parameter group. - // - // This data type is used as a response element in the DescribeDBParameterGroups - // action. - DBParameterGroup *DBParameterGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateDBParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBParameterGroupOutput) GoString() string { - return s.String() -} - -// SetDBParameterGroup sets the DBParameterGroup field's value. -func (s *CreateDBParameterGroupOutput) SetDBParameterGroup(v *DBParameterGroup) *CreateDBParameterGroupOutput { - s.DBParameterGroup = v - return s -} - -type CreateDBSecurityGroupInput struct { - _ struct{} `type:"structure"` - - // The description for the DB security group. - // - // DBSecurityGroupDescription is a required field - DBSecurityGroupDescription *string `type:"string" required:"true"` - - // The name for the DB security group. This value is stored as a lowercase string. - // - // Constraints: - // - // * Must be 1 to 255 letters, numbers, or hyphens. - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // * Must not be "Default" - // - // Example: mysecuritygroup - // - // DBSecurityGroupName is a required field - DBSecurityGroupName *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateDBSecurityGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBSecurityGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBSecurityGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBSecurityGroupInput"} - if s.DBSecurityGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("DBSecurityGroupDescription")) - } - if s.DBSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBSecurityGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSecurityGroupDescription sets the DBSecurityGroupDescription field's value. -func (s *CreateDBSecurityGroupInput) SetDBSecurityGroupDescription(v string) *CreateDBSecurityGroupInput { - s.DBSecurityGroupDescription = &v - return s -} - -// SetDBSecurityGroupName sets the DBSecurityGroupName field's value. -func (s *CreateDBSecurityGroupInput) SetDBSecurityGroupName(v string) *CreateDBSecurityGroupInput { - s.DBSecurityGroupName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBSecurityGroupInput) SetTags(v []*Tag) *CreateDBSecurityGroupInput { - s.Tags = v - return s -} - -type CreateDBSecurityGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains the details for an Amazon RDS DB security group. - // - // This data type is used as a response element in the DescribeDBSecurityGroups - // action. - DBSecurityGroup *DBSecurityGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateDBSecurityGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBSecurityGroupOutput) GoString() string { - return s.String() -} - -// SetDBSecurityGroup sets the DBSecurityGroup field's value. -func (s *CreateDBSecurityGroupOutput) SetDBSecurityGroup(v *DBSecurityGroup) *CreateDBSecurityGroupOutput { - s.DBSecurityGroup = v - return s -} - -type CreateDBSnapshotInput struct { - _ struct{} `type:"structure"` - - // The identifier of the DB instance that you want to create the snapshot of. - // - // Constraints: - // - // * Must match the identifier of an existing DBInstance. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The identifier for the DB snapshot. - // - // Constraints: - // - // * Can't be null, empty, or blank - // - // * Must contain from 1 to 255 letters, numbers, or hyphens - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // Example: my-snapshot-id - // - // DBSnapshotIdentifier is a required field - DBSnapshotIdentifier *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateDBSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBSnapshotInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - if s.DBSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *CreateDBSnapshotInput) SetDBInstanceIdentifier(v string) *CreateDBSnapshotInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBSnapshotIdentifier sets the DBSnapshotIdentifier field's value. -func (s *CreateDBSnapshotInput) SetDBSnapshotIdentifier(v string) *CreateDBSnapshotInput { - s.DBSnapshotIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBSnapshotInput) SetTags(v []*Tag) *CreateDBSnapshotInput { - s.Tags = v - return s -} - -type CreateDBSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB snapshot. - // - // This data type is used as a response element in the DescribeDBSnapshots action. - DBSnapshot *DBSnapshot `type:"structure"` -} - -// String returns the string representation -func (s CreateDBSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBSnapshot sets the DBSnapshot field's value. -func (s *CreateDBSnapshotOutput) SetDBSnapshot(v *DBSnapshot) *CreateDBSnapshotOutput { - s.DBSnapshot = v - return s -} - -type CreateDBSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The description for the DB subnet group. - // - // DBSubnetGroupDescription is a required field - DBSubnetGroupDescription *string `type:"string" required:"true"` - - // The name for the DB subnet group. This value is stored as a lowercase string. - // - // Constraints: Must contain no more than 255 letters, numbers, periods, underscores, - // spaces, or hyphens. Must not be default. - // - // Example: mySubnetgroup - // - // DBSubnetGroupName is a required field - DBSubnetGroupName *string `type:"string" required:"true"` - - // The EC2 Subnet IDs for the DB subnet group. - // - // SubnetIds is a required field - SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateDBSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDBSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDBSubnetGroupInput"} - if s.DBSubnetGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupDescription")) - } - if s.DBSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. -func (s *CreateDBSubnetGroupInput) SetDBSubnetGroupDescription(v string) *CreateDBSubnetGroupInput { - s.DBSubnetGroupDescription = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *CreateDBSubnetGroupInput) SetDBSubnetGroupName(v string) *CreateDBSubnetGroupInput { - s.DBSubnetGroupName = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateDBSubnetGroupInput) SetSubnetIds(v []*string) *CreateDBSubnetGroupInput { - s.SubnetIds = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDBSubnetGroupInput) SetTags(v []*Tag) *CreateDBSubnetGroupInput { - s.Tags = v - return s -} - -type CreateDBSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB subnet group. - // - // This data type is used as a response element in the DescribeDBSubnetGroups - // action. - DBSubnetGroup *DBSubnetGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateDBSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDBSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetDBSubnetGroup sets the DBSubnetGroup field's value. -func (s *CreateDBSubnetGroupOutput) SetDBSubnetGroup(v *DBSubnetGroup) *CreateDBSubnetGroupOutput { - s.DBSubnetGroup = v - return s -} - -type CreateEventSubscriptionInput struct { - _ struct{} `type:"structure"` - - // A Boolean value; set to true to activate the subscription, set to false to - // create the subscription but not active it. - Enabled *bool `type:"boolean"` - - // A list of event categories for a SourceType that you want to subscribe to. - // You can see a list of the categories for a given SourceType in the Events - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html) - // topic in the Amazon RDS User Guide or by using the DescribeEventCategories - // action. - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // The Amazon Resource Name (ARN) of the SNS topic created for event notification. - // The ARN is created by Amazon SNS when you create a topic and subscribe to - // it. - // - // SnsTopicArn is a required field - SnsTopicArn *string `type:"string" required:"true"` - - // The list of identifiers of the event sources for which events are returned. - // If not specified, then all sources are included in the response. An identifier - // must begin with a letter and must contain only ASCII letters, digits, and - // hyphens; it can't end with a hyphen or contain two consecutive hyphens. - // - // Constraints: - // - // * If SourceIds are supplied, SourceType must also be provided. - // - // * If the source type is a DB instance, then a DBInstanceIdentifier must - // be supplied. - // - // * If the source type is a DB security group, a DBSecurityGroupName must - // be supplied. - // - // * If the source type is a DB parameter group, a DBParameterGroupName must - // be supplied. - // - // * If the source type is a DB snapshot, a DBSnapshotIdentifier must be - // supplied. - SourceIds []*string `locationNameList:"SourceId" type:"list"` - - // The type of source that is generating the events. For example, if you want - // to be notified of events generated by a DB instance, you would set this parameter - // to db-instance. if this value is not specified, all events are returned. - // - // Valid values: db-instance | db-cluster | db-parameter-group | db-security-group - // | db-snapshot | db-cluster-snapshot - SourceType *string `type:"string"` - - // The name of the subscription. - // - // Constraints: The name must be less than 255 characters. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateEventSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEventSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateEventSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateEventSubscriptionInput"} - if s.SnsTopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("SnsTopicArn")) - } - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *CreateEventSubscriptionInput) SetEnabled(v bool) *CreateEventSubscriptionInput { - s.Enabled = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *CreateEventSubscriptionInput) SetEventCategories(v []*string) *CreateEventSubscriptionInput { - s.EventCategories = v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *CreateEventSubscriptionInput) SetSnsTopicArn(v string) *CreateEventSubscriptionInput { - s.SnsTopicArn = &v - return s -} - -// SetSourceIds sets the SourceIds field's value. -func (s *CreateEventSubscriptionInput) SetSourceIds(v []*string) *CreateEventSubscriptionInput { - s.SourceIds = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *CreateEventSubscriptionInput) SetSourceType(v string) *CreateEventSubscriptionInput { - s.SourceType = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *CreateEventSubscriptionInput) SetSubscriptionName(v string) *CreateEventSubscriptionInput { - s.SubscriptionName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateEventSubscriptionInput) SetTags(v []*Tag) *CreateEventSubscriptionInput { - s.Tags = v - return s -} - -type CreateEventSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful invocation of the DescribeEventSubscriptions - // action. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s CreateEventSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEventSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *CreateEventSubscriptionOutput) SetEventSubscription(v *EventSubscription) *CreateEventSubscriptionOutput { - s.EventSubscription = v - return s -} - -type CreateGlobalClusterInput struct { - _ struct{} `type:"structure"` - - // The name for your database of up to 64 alpha-numeric characters. If you do - // not provide a name, Amazon Aurora will not create a database in the global - // database cluster you are creating. - DatabaseName *string `type:"string"` - - // The deletion protection setting for the new global database. The global database - // can't be deleted when this value is set to true. - DeletionProtection *bool `type:"boolean"` - - // Provides the name of the database engine to be used for this DB cluster. - Engine *string `type:"string"` - - // The engine version of the Aurora global database. - EngineVersion *string `type:"string"` - - // The cluster identifier of the new global database cluster. - GlobalClusterIdentifier *string `type:"string"` - - // The Amazon Resource Name (ARN) to use as the primary cluster of the global - // database. This parameter is optional. - SourceDBClusterIdentifier *string `type:"string"` - - // The storage encryption setting for the new global database cluster. - StorageEncrypted *bool `type:"boolean"` -} - -// String returns the string representation -func (s CreateGlobalClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateGlobalClusterInput) GoString() string { - return s.String() -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *CreateGlobalClusterInput) SetDatabaseName(v string) *CreateGlobalClusterInput { - s.DatabaseName = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *CreateGlobalClusterInput) SetDeletionProtection(v bool) *CreateGlobalClusterInput { - s.DeletionProtection = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *CreateGlobalClusterInput) SetEngine(v string) *CreateGlobalClusterInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *CreateGlobalClusterInput) SetEngineVersion(v string) *CreateGlobalClusterInput { - s.EngineVersion = &v - return s -} - -// SetGlobalClusterIdentifier sets the GlobalClusterIdentifier field's value. -func (s *CreateGlobalClusterInput) SetGlobalClusterIdentifier(v string) *CreateGlobalClusterInput { - s.GlobalClusterIdentifier = &v - return s -} - -// SetSourceDBClusterIdentifier sets the SourceDBClusterIdentifier field's value. -func (s *CreateGlobalClusterInput) SetSourceDBClusterIdentifier(v string) *CreateGlobalClusterInput { - s.SourceDBClusterIdentifier = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *CreateGlobalClusterInput) SetStorageEncrypted(v bool) *CreateGlobalClusterInput { - s.StorageEncrypted = &v - return s -} - -type CreateGlobalClusterOutput struct { - _ struct{} `type:"structure"` - - // A data type representing an Aurora global database. - GlobalCluster *GlobalCluster `type:"structure"` -} - -// String returns the string representation -func (s CreateGlobalClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateGlobalClusterOutput) GoString() string { - return s.String() -} - -// SetGlobalCluster sets the GlobalCluster field's value. -func (s *CreateGlobalClusterOutput) SetGlobalCluster(v *GlobalCluster) *CreateGlobalClusterOutput { - s.GlobalCluster = v - return s -} - -type CreateOptionGroupInput struct { - _ struct{} `type:"structure"` - - // Specifies the name of the engine that this option group should be associated - // with. - // - // EngineName is a required field - EngineName *string `type:"string" required:"true"` - - // Specifies the major version of the engine that this option group should be - // associated with. - // - // MajorEngineVersion is a required field - MajorEngineVersion *string `type:"string" required:"true"` - - // The description of the option group. - // - // OptionGroupDescription is a required field - OptionGroupDescription *string `type:"string" required:"true"` - - // Specifies the name of the option group to be created. - // - // Constraints: - // - // * Must be 1 to 255 letters, numbers, or hyphens - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // Example: myoptiongroup - // - // OptionGroupName is a required field - OptionGroupName *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateOptionGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateOptionGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateOptionGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateOptionGroupInput"} - if s.EngineName == nil { - invalidParams.Add(request.NewErrParamRequired("EngineName")) - } - if s.MajorEngineVersion == nil { - invalidParams.Add(request.NewErrParamRequired("MajorEngineVersion")) - } - if s.OptionGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("OptionGroupDescription")) - } - if s.OptionGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("OptionGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEngineName sets the EngineName field's value. -func (s *CreateOptionGroupInput) SetEngineName(v string) *CreateOptionGroupInput { - s.EngineName = &v - return s -} - -// SetMajorEngineVersion sets the MajorEngineVersion field's value. -func (s *CreateOptionGroupInput) SetMajorEngineVersion(v string) *CreateOptionGroupInput { - s.MajorEngineVersion = &v - return s -} - -// SetOptionGroupDescription sets the OptionGroupDescription field's value. -func (s *CreateOptionGroupInput) SetOptionGroupDescription(v string) *CreateOptionGroupInput { - s.OptionGroupDescription = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *CreateOptionGroupInput) SetOptionGroupName(v string) *CreateOptionGroupInput { - s.OptionGroupName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateOptionGroupInput) SetTags(v []*Tag) *CreateOptionGroupInput { - s.Tags = v - return s -} - -type CreateOptionGroupOutput struct { - _ struct{} `type:"structure"` - - OptionGroup *OptionGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateOptionGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateOptionGroupOutput) GoString() string { - return s.String() -} - -// SetOptionGroup sets the OptionGroup field's value. -func (s *CreateOptionGroupOutput) SetOptionGroup(v *OptionGroup) *CreateOptionGroupOutput { - s.OptionGroup = v - return s -} - -// Contains the details of an Amazon Aurora DB cluster. -// -// This data type is used as a response element in the DescribeDBClusters, StopDBCluster, -// and StartDBCluster actions. -type DBCluster struct { - _ struct{} `type:"structure"` - - // For all database engines except Amazon Aurora, AllocatedStorage specifies - // the allocated storage size in gibibytes (GiB). For Aurora, AllocatedStorage - // always returns 1, because Aurora DB cluster storage size is not fixed, but - // instead automatically adjusts as needed. - AllocatedStorage *int64 `type:"integer"` - - // Provides a list of the AWS Identity and Access Management (IAM) roles that - // are associated with the DB cluster. IAM roles that are associated with a - // DB cluster grant permission for the DB cluster to access other AWS services - // on your behalf. - AssociatedRoles []*DBClusterRole `locationNameList:"DBClusterRole" type:"list"` - - // Provides the list of EC2 Availability Zones that instances in the DB cluster - // can be created in. - AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // The number of change records stored for Backtrack. - BacktrackConsumedChangeRecords *int64 `type:"long"` - - // The target backtrack window, in seconds. If this value is set to 0, backtracking - // is disabled for the DB cluster. Otherwise, backtracking is enabled. - BacktrackWindow *int64 `type:"long"` - - // Specifies the number of days for which automatic DB snapshots are retained. - BackupRetentionPeriod *int64 `type:"integer"` - - // The current capacity of an Aurora Serverless DB cluster. The capacity is - // 0 (zero) when the cluster is paused. - // - // For more information about Aurora Serverless, see Using Amazon Aurora Serverless - // (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) - // in the Amazon Aurora User Guide. - Capacity *int64 `type:"integer"` - - // If present, specifies the name of the character set that this cluster is - // associated with. - CharacterSetName *string `type:"string"` - - // Identifies the clone group to which the DB cluster is associated. - CloneGroupId *string `type:"string"` - - // Specifies the time when the DB cluster was created, in Universal Coordinated - // Time (UTC). - ClusterCreateTime *time.Time `type:"timestamp"` - - // Identifies all custom endpoints associated with the cluster. - CustomEndpoints []*string `type:"list"` - - // The Amazon Resource Name (ARN) for the DB cluster. - DBClusterArn *string `type:"string"` - - // Contains a user-supplied DB cluster identifier. This identifier is the unique - // key that identifies a DB cluster. - DBClusterIdentifier *string `type:"string"` - - // Provides the list of instances that make up the DB cluster. - DBClusterMembers []*DBClusterMember `locationNameList:"DBClusterMember" type:"list"` - - // Provides the list of option group memberships for this DB cluster. - DBClusterOptionGroupMemberships []*DBClusterOptionGroupStatus `locationNameList:"DBClusterOptionGroup" type:"list"` - - // Specifies the name of the DB cluster parameter group for the DB cluster. - DBClusterParameterGroup *string `type:"string"` - - // Specifies information on the subnet group associated with the DB cluster, - // including the name, description, and subnets in the subnet group. - DBSubnetGroup *string `type:"string"` - - // Contains the name of the initial database of this DB cluster that was provided - // at create time, if one was specified when the DB cluster was created. This - // same name is returned for the life of the DB cluster. - DatabaseName *string `type:"string"` - - // The AWS Region-unique, immutable identifier for the DB cluster. This identifier - // is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB - // cluster is accessed. - DbClusterResourceId *string `type:"string"` - - // Indicates if the DB cluster has deletion protection enabled. The database - // can't be deleted when this value is set to true. - DeletionProtection *bool `type:"boolean"` - - // The earliest time to which a DB cluster can be backtracked. - EarliestBacktrackTime *time.Time `type:"timestamp"` - - // The earliest time to which a database can be restored with point-in-time - // restore. - EarliestRestorableTime *time.Time `type:"timestamp"` - - // A list of log types that this DB cluster is configured to export to CloudWatch - // Logs. - // - // Log types vary by DB engine. For information about the log types for each - // DB engine, see Amazon RDS Database Log Files (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html) - // in the Amazon Aurora User Guide. - EnabledCloudwatchLogsExports []*string `type:"list"` - - // Specifies the connection endpoint for the primary instance of the DB cluster. - Endpoint *string `type:"string"` - - // Provides the name of the database engine to be used for this DB cluster. - Engine *string `type:"string"` - - // The DB engine mode of the DB cluster, either provisioned, serverless, or - // parallelquery. - EngineMode *string `type:"string"` - - // Indicates the database engine version. - EngineVersion *string `type:"string"` - - // Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. - HostedZoneId *string `type:"string"` - - // HTTP endpoint functionality is in beta for Aurora Serverless and is subject - // to change. - // - // Value that is true if the HTTP endpoint for an Aurora Serverless DB cluster - // is enabled and false otherwise. - // - // When enabled, the HTTP endpoint provides a connectionless web service API - // for running SQL queries on the Aurora Serverless DB cluster. You can also - // query your database from inside the RDS console with the query editor. - // - // For more information about Aurora Serverless, see Using Amazon Aurora Serverless - // (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) - // in the Amazon Aurora User Guide. - HttpEndpointEnabled *bool `type:"boolean"` - - // True if mapping of AWS Identity and Access Management (IAM) accounts to database - // accounts is enabled, and otherwise false. - IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` - - // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted - // DB cluster. - KmsKeyId *string `type:"string"` - - // Specifies the latest time to which a database can be restored with point-in-time - // restore. - LatestRestorableTime *time.Time `type:"timestamp"` - - // Contains the master username for the DB cluster. - MasterUsername *string `type:"string"` - - // Specifies whether the DB cluster has instances in multiple Availability Zones. - MultiAZ *bool `type:"boolean"` - - // Specifies the progress of the operation as a percentage. - PercentProgress *string `type:"string"` - - // Specifies the port that the database engine is listening on. - Port *int64 `type:"integer"` - - // Specifies the daily time range during which automated backups are created - // if automated backups are enabled, as determined by the BackupRetentionPeriod. - PreferredBackupWindow *string `type:"string"` - - // Specifies the weekly time range during which system maintenance can occur, - // in Universal Coordinated Time (UTC). - PreferredMaintenanceWindow *string `type:"string"` - - // Contains one or more identifiers of the Read Replicas associated with this - // DB cluster. - ReadReplicaIdentifiers []*string `locationNameList:"ReadReplicaIdentifier" type:"list"` - - // The reader endpoint for the DB cluster. The reader endpoint for a DB cluster - // load-balances connections across the Aurora Replicas that are available in - // a DB cluster. As clients request new connections to the reader endpoint, - // Aurora distributes the connection requests among the Aurora Replicas in the - // DB cluster. This functionality can help balance your read workload across - // multiple Aurora Replicas in your DB cluster. - // - // If a failover occurs, and the Aurora Replica that you are connected to is - // promoted to be the primary instance, your connection is dropped. To continue - // sending your read workload to other Aurora Replicas in the cluster, you can - // then reconnect to the reader endpoint. - ReaderEndpoint *string `type:"string"` - - // Contains the identifier of the source DB cluster if this DB cluster is a - // Read Replica. - ReplicationSourceIdentifier *string `type:"string"` - - // Shows the scaling configuration for an Aurora DB cluster in serverless DB - // engine mode. - // - // For more information, see Using Amazon Aurora Serverless (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) - // in the Amazon Aurora User Guide. - ScalingConfigurationInfo *ScalingConfigurationInfo `type:"structure"` - - // Specifies the current state of this DB cluster. - Status *string `type:"string"` - - // Specifies whether the DB cluster is encrypted. - StorageEncrypted *bool `type:"boolean"` - - // Provides a list of VPC security groups that the DB cluster belongs to. - VpcSecurityGroups []*VpcSecurityGroupMembership `locationNameList:"VpcSecurityGroupMembership" type:"list"` -} - -// String returns the string representation -func (s DBCluster) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBCluster) GoString() string { - return s.String() -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *DBCluster) SetAllocatedStorage(v int64) *DBCluster { - s.AllocatedStorage = &v - return s -} - -// SetAssociatedRoles sets the AssociatedRoles field's value. -func (s *DBCluster) SetAssociatedRoles(v []*DBClusterRole) *DBCluster { - s.AssociatedRoles = v - return s -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DBCluster) SetAvailabilityZones(v []*string) *DBCluster { - s.AvailabilityZones = v - return s -} - -// SetBacktrackConsumedChangeRecords sets the BacktrackConsumedChangeRecords field's value. -func (s *DBCluster) SetBacktrackConsumedChangeRecords(v int64) *DBCluster { - s.BacktrackConsumedChangeRecords = &v - return s -} - -// SetBacktrackWindow sets the BacktrackWindow field's value. -func (s *DBCluster) SetBacktrackWindow(v int64) *DBCluster { - s.BacktrackWindow = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *DBCluster) SetBackupRetentionPeriod(v int64) *DBCluster { - s.BackupRetentionPeriod = &v - return s -} - -// SetCapacity sets the Capacity field's value. -func (s *DBCluster) SetCapacity(v int64) *DBCluster { - s.Capacity = &v - return s -} - -// SetCharacterSetName sets the CharacterSetName field's value. -func (s *DBCluster) SetCharacterSetName(v string) *DBCluster { - s.CharacterSetName = &v - return s -} - -// SetCloneGroupId sets the CloneGroupId field's value. -func (s *DBCluster) SetCloneGroupId(v string) *DBCluster { - s.CloneGroupId = &v - return s -} - -// SetClusterCreateTime sets the ClusterCreateTime field's value. -func (s *DBCluster) SetClusterCreateTime(v time.Time) *DBCluster { - s.ClusterCreateTime = &v - return s -} - -// SetCustomEndpoints sets the CustomEndpoints field's value. -func (s *DBCluster) SetCustomEndpoints(v []*string) *DBCluster { - s.CustomEndpoints = v - return s -} - -// SetDBClusterArn sets the DBClusterArn field's value. -func (s *DBCluster) SetDBClusterArn(v string) *DBCluster { - s.DBClusterArn = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DBCluster) SetDBClusterIdentifier(v string) *DBCluster { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterMembers sets the DBClusterMembers field's value. -func (s *DBCluster) SetDBClusterMembers(v []*DBClusterMember) *DBCluster { - s.DBClusterMembers = v - return s -} - -// SetDBClusterOptionGroupMemberships sets the DBClusterOptionGroupMemberships field's value. -func (s *DBCluster) SetDBClusterOptionGroupMemberships(v []*DBClusterOptionGroupStatus) *DBCluster { - s.DBClusterOptionGroupMemberships = v - return s -} - -// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. -func (s *DBCluster) SetDBClusterParameterGroup(v string) *DBCluster { - s.DBClusterParameterGroup = &v - return s -} - -// SetDBSubnetGroup sets the DBSubnetGroup field's value. -func (s *DBCluster) SetDBSubnetGroup(v string) *DBCluster { - s.DBSubnetGroup = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *DBCluster) SetDatabaseName(v string) *DBCluster { - s.DatabaseName = &v - return s -} - -// SetDbClusterResourceId sets the DbClusterResourceId field's value. -func (s *DBCluster) SetDbClusterResourceId(v string) *DBCluster { - s.DbClusterResourceId = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *DBCluster) SetDeletionProtection(v bool) *DBCluster { - s.DeletionProtection = &v - return s -} - -// SetEarliestBacktrackTime sets the EarliestBacktrackTime field's value. -func (s *DBCluster) SetEarliestBacktrackTime(v time.Time) *DBCluster { - s.EarliestBacktrackTime = &v - return s -} - -// SetEarliestRestorableTime sets the EarliestRestorableTime field's value. -func (s *DBCluster) SetEarliestRestorableTime(v time.Time) *DBCluster { - s.EarliestRestorableTime = &v - return s -} - -// SetEnabledCloudwatchLogsExports sets the EnabledCloudwatchLogsExports field's value. -func (s *DBCluster) SetEnabledCloudwatchLogsExports(v []*string) *DBCluster { - s.EnabledCloudwatchLogsExports = v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *DBCluster) SetEndpoint(v string) *DBCluster { - s.Endpoint = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DBCluster) SetEngine(v string) *DBCluster { - s.Engine = &v - return s -} - -// SetEngineMode sets the EngineMode field's value. -func (s *DBCluster) SetEngineMode(v string) *DBCluster { - s.EngineMode = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DBCluster) SetEngineVersion(v string) *DBCluster { - s.EngineVersion = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *DBCluster) SetHostedZoneId(v string) *DBCluster { - s.HostedZoneId = &v - return s -} - -// SetHttpEndpointEnabled sets the HttpEndpointEnabled field's value. -func (s *DBCluster) SetHttpEndpointEnabled(v bool) *DBCluster { - s.HttpEndpointEnabled = &v - return s -} - -// SetIAMDatabaseAuthenticationEnabled sets the IAMDatabaseAuthenticationEnabled field's value. -func (s *DBCluster) SetIAMDatabaseAuthenticationEnabled(v bool) *DBCluster { - s.IAMDatabaseAuthenticationEnabled = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DBCluster) SetKmsKeyId(v string) *DBCluster { - s.KmsKeyId = &v - return s -} - -// SetLatestRestorableTime sets the LatestRestorableTime field's value. -func (s *DBCluster) SetLatestRestorableTime(v time.Time) *DBCluster { - s.LatestRestorableTime = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *DBCluster) SetMasterUsername(v string) *DBCluster { - s.MasterUsername = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *DBCluster) SetMultiAZ(v bool) *DBCluster { - s.MultiAZ = &v - return s -} - -// SetPercentProgress sets the PercentProgress field's value. -func (s *DBCluster) SetPercentProgress(v string) *DBCluster { - s.PercentProgress = &v - return s -} - -// SetPort sets the Port field's value. -func (s *DBCluster) SetPort(v int64) *DBCluster { - s.Port = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *DBCluster) SetPreferredBackupWindow(v string) *DBCluster { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *DBCluster) SetPreferredMaintenanceWindow(v string) *DBCluster { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetReadReplicaIdentifiers sets the ReadReplicaIdentifiers field's value. -func (s *DBCluster) SetReadReplicaIdentifiers(v []*string) *DBCluster { - s.ReadReplicaIdentifiers = v - return s -} - -// SetReaderEndpoint sets the ReaderEndpoint field's value. -func (s *DBCluster) SetReaderEndpoint(v string) *DBCluster { - s.ReaderEndpoint = &v - return s -} - -// SetReplicationSourceIdentifier sets the ReplicationSourceIdentifier field's value. -func (s *DBCluster) SetReplicationSourceIdentifier(v string) *DBCluster { - s.ReplicationSourceIdentifier = &v - return s -} - -// SetScalingConfigurationInfo sets the ScalingConfigurationInfo field's value. -func (s *DBCluster) SetScalingConfigurationInfo(v *ScalingConfigurationInfo) *DBCluster { - s.ScalingConfigurationInfo = v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBCluster) SetStatus(v string) *DBCluster { - s.Status = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *DBCluster) SetStorageEncrypted(v bool) *DBCluster { - s.StorageEncrypted = &v - return s -} - -// SetVpcSecurityGroups sets the VpcSecurityGroups field's value. -func (s *DBCluster) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *DBCluster { - s.VpcSecurityGroups = v - return s -} - -// This data type represents the information you need to connect to an Amazon -// Aurora DB cluster. This data type is used as a response element in the following -// actions: -// -// * CreateDBClusterEndpoint -// -// * DescribeDBClusterEndpoints -// -// * ModifyDBClusterEndpoint -// -// * DeleteDBClusterEndpoint -// -// For the data structure that represents Amazon RDS DB instance endpoints, -// see Endpoint. -type DBClusterEndpoint struct { - _ struct{} `type:"structure"` - - // The type associated with a custom endpoint. One of: READER, ANY. - CustomEndpointType *string `type:"string"` - - // The Amazon Resource Name (ARN) for the endpoint. - DBClusterEndpointArn *string `type:"string"` - - // The identifier associated with the endpoint. This parameter is stored as - // a lowercase string. - DBClusterEndpointIdentifier *string `type:"string"` - - // A unique system-generated identifier for an endpoint. It remains the same - // for the whole life of the endpoint. - DBClusterEndpointResourceIdentifier *string `type:"string"` - - // The DB cluster identifier of the DB cluster associated with the endpoint. - // This parameter is stored as a lowercase string. - DBClusterIdentifier *string `type:"string"` - - // The DNS address of the endpoint. - Endpoint *string `type:"string"` - - // The type of the endpoint. One of: READER, WRITER, CUSTOM. - EndpointType *string `type:"string"` - - // List of DB instance identifiers that aren't part of the custom endpoint group. - // All other eligible instances are reachable through the custom endpoint. Only - // relevant if the list of static members is empty. - ExcludedMembers []*string `type:"list"` - - // List of DB instance identifiers that are part of the custom endpoint group. - StaticMembers []*string `type:"list"` - - // The current status of the endpoint. One of: creating, available, deleting, - // modifying. - Status *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterEndpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterEndpoint) GoString() string { - return s.String() -} - -// SetCustomEndpointType sets the CustomEndpointType field's value. -func (s *DBClusterEndpoint) SetCustomEndpointType(v string) *DBClusterEndpoint { - s.CustomEndpointType = &v - return s -} - -// SetDBClusterEndpointArn sets the DBClusterEndpointArn field's value. -func (s *DBClusterEndpoint) SetDBClusterEndpointArn(v string) *DBClusterEndpoint { - s.DBClusterEndpointArn = &v - return s -} - -// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. -func (s *DBClusterEndpoint) SetDBClusterEndpointIdentifier(v string) *DBClusterEndpoint { - s.DBClusterEndpointIdentifier = &v - return s -} - -// SetDBClusterEndpointResourceIdentifier sets the DBClusterEndpointResourceIdentifier field's value. -func (s *DBClusterEndpoint) SetDBClusterEndpointResourceIdentifier(v string) *DBClusterEndpoint { - s.DBClusterEndpointResourceIdentifier = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DBClusterEndpoint) SetDBClusterIdentifier(v string) *DBClusterEndpoint { - s.DBClusterIdentifier = &v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *DBClusterEndpoint) SetEndpoint(v string) *DBClusterEndpoint { - s.Endpoint = &v - return s -} - -// SetEndpointType sets the EndpointType field's value. -func (s *DBClusterEndpoint) SetEndpointType(v string) *DBClusterEndpoint { - s.EndpointType = &v - return s -} - -// SetExcludedMembers sets the ExcludedMembers field's value. -func (s *DBClusterEndpoint) SetExcludedMembers(v []*string) *DBClusterEndpoint { - s.ExcludedMembers = v - return s -} - -// SetStaticMembers sets the StaticMembers field's value. -func (s *DBClusterEndpoint) SetStaticMembers(v []*string) *DBClusterEndpoint { - s.StaticMembers = v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBClusterEndpoint) SetStatus(v string) *DBClusterEndpoint { - s.Status = &v - return s -} - -// Contains information about an instance that is part of a DB cluster. -type DBClusterMember struct { - _ struct{} `type:"structure"` - - // Specifies the status of the DB cluster parameter group for this member of - // the DB cluster. - DBClusterParameterGroupStatus *string `type:"string"` - - // Specifies the instance identifier for this member of the DB cluster. - DBInstanceIdentifier *string `type:"string"` - - // Value that is true if the cluster member is the primary instance for the - // DB cluster and false otherwise. - IsClusterWriter *bool `type:"boolean"` - - // A value that specifies the order in which an Aurora Replica is promoted to - // the primary instance after a failure of the existing primary instance. For - // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.FaultTolerance) - // in the Amazon Aurora User Guide. - PromotionTier *int64 `type:"integer"` -} - -// String returns the string representation -func (s DBClusterMember) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterMember) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroupStatus sets the DBClusterParameterGroupStatus field's value. -func (s *DBClusterMember) SetDBClusterParameterGroupStatus(v string) *DBClusterMember { - s.DBClusterParameterGroupStatus = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DBClusterMember) SetDBInstanceIdentifier(v string) *DBClusterMember { - s.DBInstanceIdentifier = &v - return s -} - -// SetIsClusterWriter sets the IsClusterWriter field's value. -func (s *DBClusterMember) SetIsClusterWriter(v bool) *DBClusterMember { - s.IsClusterWriter = &v - return s -} - -// SetPromotionTier sets the PromotionTier field's value. -func (s *DBClusterMember) SetPromotionTier(v int64) *DBClusterMember { - s.PromotionTier = &v - return s -} - -// Contains status information for a DB cluster option group. -type DBClusterOptionGroupStatus struct { - _ struct{} `type:"structure"` - - // Specifies the name of the DB cluster option group. - DBClusterOptionGroupName *string `type:"string"` - - // Specifies the status of the DB cluster option group. - Status *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterOptionGroupStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterOptionGroupStatus) GoString() string { - return s.String() -} - -// SetDBClusterOptionGroupName sets the DBClusterOptionGroupName field's value. -func (s *DBClusterOptionGroupStatus) SetDBClusterOptionGroupName(v string) *DBClusterOptionGroupStatus { - s.DBClusterOptionGroupName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBClusterOptionGroupStatus) SetStatus(v string) *DBClusterOptionGroupStatus { - s.Status = &v - return s -} - -// Contains the details of an Amazon RDS DB cluster parameter group. -// -// This data type is used as a response element in the DescribeDBClusterParameterGroups -// action. -type DBClusterParameterGroup struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the DB cluster parameter group. - DBClusterParameterGroupArn *string `type:"string"` - - // Provides the name of the DB cluster parameter group. - DBClusterParameterGroupName *string `type:"string"` - - // Provides the name of the DB parameter group family that this DB cluster parameter - // group is compatible with. - DBParameterGroupFamily *string `type:"string"` - - // Provides the customer-specified description for this DB cluster parameter - // group. - Description *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterParameterGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterParameterGroup) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroupArn sets the DBClusterParameterGroupArn field's value. -func (s *DBClusterParameterGroup) SetDBClusterParameterGroupArn(v string) *DBClusterParameterGroup { - s.DBClusterParameterGroupArn = &v - return s -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *DBClusterParameterGroup) SetDBClusterParameterGroupName(v string) *DBClusterParameterGroup { - s.DBClusterParameterGroupName = &v - return s -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DBClusterParameterGroup) SetDBParameterGroupFamily(v string) *DBClusterParameterGroup { - s.DBParameterGroupFamily = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DBClusterParameterGroup) SetDescription(v string) *DBClusterParameterGroup { - s.Description = &v - return s -} - -type DBClusterParameterGroupNameMessage struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group. - // - // Constraints: - // - // * Must be 1 to 255 letters or numbers. - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // This value is stored as a lowercase string. - DBClusterParameterGroupName *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterParameterGroupNameMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterParameterGroupNameMessage) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *DBClusterParameterGroupNameMessage) SetDBClusterParameterGroupName(v string) *DBClusterParameterGroupNameMessage { - s.DBClusterParameterGroupName = &v - return s -} - -// Describes an AWS Identity and Access Management (IAM) role that is associated -// with a DB cluster. -type DBClusterRole struct { - _ struct{} `type:"structure"` - - FeatureName *string `type:"string"` - - // The Amazon Resource Name (ARN) of the IAM role that is associated with the - // DB cluster. - RoleArn *string `type:"string"` - - // Describes the state of association between the IAM role and the DB cluster. - // The Status property returns one of the following values: - // - // * ACTIVE - the IAM role ARN is associated with the DB cluster and can - // be used to access other AWS services on your behalf. - // - // * PENDING - the IAM role ARN is being associated with the DB cluster. - // - // * INVALID - the IAM role ARN is associated with the DB cluster, but the - // DB cluster is unable to assume the IAM role in order to access other AWS - // services on your behalf. - Status *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterRole) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterRole) GoString() string { - return s.String() -} - -// SetFeatureName sets the FeatureName field's value. -func (s *DBClusterRole) SetFeatureName(v string) *DBClusterRole { - s.FeatureName = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DBClusterRole) SetRoleArn(v string) *DBClusterRole { - s.RoleArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBClusterRole) SetStatus(v string) *DBClusterRole { - s.Status = &v - return s -} - -// Contains the details for an Amazon RDS DB cluster snapshot -// -// This data type is used as a response element in the DescribeDBClusterSnapshots -// action. -type DBClusterSnapshot struct { - _ struct{} `type:"structure"` - - // Specifies the allocated storage size in gibibytes (GiB). - AllocatedStorage *int64 `type:"integer"` - - // Provides the list of EC2 Availability Zones that instances in the DB cluster - // snapshot can be restored in. - AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // Specifies the time when the DB cluster was created, in Universal Coordinated - // Time (UTC). - ClusterCreateTime *time.Time `type:"timestamp"` - - // Specifies the DB cluster identifier of the DB cluster that this DB cluster - // snapshot was created from. - DBClusterIdentifier *string `type:"string"` - - // The Amazon Resource Name (ARN) for the DB cluster snapshot. - DBClusterSnapshotArn *string `type:"string"` - - // Specifies the identifier for the DB cluster snapshot. - DBClusterSnapshotIdentifier *string `type:"string"` - - // Specifies the name of the database engine. - Engine *string `type:"string"` - - // Provides the version of the database engine for this DB cluster snapshot. - EngineVersion *string `type:"string"` - - // True if mapping of AWS Identity and Access Management (IAM) accounts to database - // accounts is enabled, and otherwise false. - IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` - - // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted - // DB cluster snapshot. - KmsKeyId *string `type:"string"` - - // Provides the license model information for this DB cluster snapshot. - LicenseModel *string `type:"string"` - - // Provides the master username for the DB cluster snapshot. - MasterUsername *string `type:"string"` - - // Specifies the percentage of the estimated data that has been transferred. - PercentProgress *int64 `type:"integer"` - - // Specifies the port that the DB cluster was listening on at the time of the - // snapshot. - Port *int64 `type:"integer"` - - // Provides the time when the snapshot was taken, in Universal Coordinated Time - // (UTC). - SnapshotCreateTime *time.Time `type:"timestamp"` - - // Provides the type of the DB cluster snapshot. - SnapshotType *string `type:"string"` - - // If the DB cluster snapshot was copied from a source DB cluster snapshot, - // the Amazon Resource Name (ARN) for the source DB cluster snapshot, otherwise, - // a null value. - SourceDBClusterSnapshotArn *string `type:"string"` - - // Specifies the status of this DB cluster snapshot. - Status *string `type:"string"` - - // Specifies whether the DB cluster snapshot is encrypted. - StorageEncrypted *bool `type:"boolean"` - - // Provides the VPC ID associated with the DB cluster snapshot. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterSnapshot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterSnapshot) GoString() string { - return s.String() -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *DBClusterSnapshot) SetAllocatedStorage(v int64) *DBClusterSnapshot { - s.AllocatedStorage = &v - return s -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DBClusterSnapshot) SetAvailabilityZones(v []*string) *DBClusterSnapshot { - s.AvailabilityZones = v - return s -} - -// SetClusterCreateTime sets the ClusterCreateTime field's value. -func (s *DBClusterSnapshot) SetClusterCreateTime(v time.Time) *DBClusterSnapshot { - s.ClusterCreateTime = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DBClusterSnapshot) SetDBClusterIdentifier(v string) *DBClusterSnapshot { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterSnapshotArn sets the DBClusterSnapshotArn field's value. -func (s *DBClusterSnapshot) SetDBClusterSnapshotArn(v string) *DBClusterSnapshot { - s.DBClusterSnapshotArn = &v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DBClusterSnapshot) SetDBClusterSnapshotIdentifier(v string) *DBClusterSnapshot { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DBClusterSnapshot) SetEngine(v string) *DBClusterSnapshot { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DBClusterSnapshot) SetEngineVersion(v string) *DBClusterSnapshot { - s.EngineVersion = &v - return s -} - -// SetIAMDatabaseAuthenticationEnabled sets the IAMDatabaseAuthenticationEnabled field's value. -func (s *DBClusterSnapshot) SetIAMDatabaseAuthenticationEnabled(v bool) *DBClusterSnapshot { - s.IAMDatabaseAuthenticationEnabled = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DBClusterSnapshot) SetKmsKeyId(v string) *DBClusterSnapshot { - s.KmsKeyId = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *DBClusterSnapshot) SetLicenseModel(v string) *DBClusterSnapshot { - s.LicenseModel = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *DBClusterSnapshot) SetMasterUsername(v string) *DBClusterSnapshot { - s.MasterUsername = &v - return s -} - -// SetPercentProgress sets the PercentProgress field's value. -func (s *DBClusterSnapshot) SetPercentProgress(v int64) *DBClusterSnapshot { - s.PercentProgress = &v - return s -} - -// SetPort sets the Port field's value. -func (s *DBClusterSnapshot) SetPort(v int64) *DBClusterSnapshot { - s.Port = &v - return s -} - -// SetSnapshotCreateTime sets the SnapshotCreateTime field's value. -func (s *DBClusterSnapshot) SetSnapshotCreateTime(v time.Time) *DBClusterSnapshot { - s.SnapshotCreateTime = &v - return s -} - -// SetSnapshotType sets the SnapshotType field's value. -func (s *DBClusterSnapshot) SetSnapshotType(v string) *DBClusterSnapshot { - s.SnapshotType = &v - return s -} - -// SetSourceDBClusterSnapshotArn sets the SourceDBClusterSnapshotArn field's value. -func (s *DBClusterSnapshot) SetSourceDBClusterSnapshotArn(v string) *DBClusterSnapshot { - s.SourceDBClusterSnapshotArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBClusterSnapshot) SetStatus(v string) *DBClusterSnapshot { - s.Status = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *DBClusterSnapshot) SetStorageEncrypted(v bool) *DBClusterSnapshot { - s.StorageEncrypted = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DBClusterSnapshot) SetVpcId(v string) *DBClusterSnapshot { - s.VpcId = &v - return s -} - -// Contains the name and values of a manual DB cluster snapshot attribute. -// -// Manual DB cluster snapshot attributes are used to authorize other AWS accounts -// to restore a manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute -// API action. -type DBClusterSnapshotAttribute struct { - _ struct{} `type:"structure"` - - // The name of the manual DB cluster snapshot attribute. - // - // The attribute named restore refers to the list of AWS accounts that have - // permission to copy or restore the manual DB cluster snapshot. For more information, - // see the ModifyDBClusterSnapshotAttribute API action. - AttributeName *string `type:"string"` - - // The value(s) for the manual DB cluster snapshot attribute. - // - // If the AttributeName field is set to restore, then this element returns a - // list of IDs of the AWS accounts that are authorized to copy or restore the - // manual DB cluster snapshot. If a value of all is in the list, then the manual - // DB cluster snapshot is public and available for any AWS account to copy or - // restore. - AttributeValues []*string `locationNameList:"AttributeValue" type:"list"` -} - -// String returns the string representation -func (s DBClusterSnapshotAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterSnapshotAttribute) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *DBClusterSnapshotAttribute) SetAttributeName(v string) *DBClusterSnapshotAttribute { - s.AttributeName = &v - return s -} - -// SetAttributeValues sets the AttributeValues field's value. -func (s *DBClusterSnapshotAttribute) SetAttributeValues(v []*string) *DBClusterSnapshotAttribute { - s.AttributeValues = v - return s -} - -// Contains the results of a successful call to the DescribeDBClusterSnapshotAttributes -// API action. -// -// Manual DB cluster snapshot attributes are used to authorize other AWS accounts -// to copy or restore a manual DB cluster snapshot. For more information, see -// the ModifyDBClusterSnapshotAttribute API action. -type DBClusterSnapshotAttributesResult struct { - _ struct{} `type:"structure"` - - // The list of attributes and values for the manual DB cluster snapshot. - DBClusterSnapshotAttributes []*DBClusterSnapshotAttribute `locationNameList:"DBClusterSnapshotAttribute" type:"list"` - - // The identifier of the manual DB cluster snapshot that the attributes apply - // to. - DBClusterSnapshotIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s DBClusterSnapshotAttributesResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBClusterSnapshotAttributesResult) GoString() string { - return s.String() -} - -// SetDBClusterSnapshotAttributes sets the DBClusterSnapshotAttributes field's value. -func (s *DBClusterSnapshotAttributesResult) SetDBClusterSnapshotAttributes(v []*DBClusterSnapshotAttribute) *DBClusterSnapshotAttributesResult { - s.DBClusterSnapshotAttributes = v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DBClusterSnapshotAttributesResult) SetDBClusterSnapshotIdentifier(v string) *DBClusterSnapshotAttributesResult { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// This data type is used as a response element in the action DescribeDBEngineVersions. -type DBEngineVersion struct { - _ struct{} `type:"structure"` - - // The description of the database engine. - DBEngineDescription *string `type:"string"` - - // The description of the database engine version. - DBEngineVersionDescription *string `type:"string"` - - // The name of the DB parameter group family for the database engine. - DBParameterGroupFamily *string `type:"string"` - - // The default character set for new instances of this engine version, if the - // CharacterSetName parameter of the CreateDBInstance API is not specified. - DefaultCharacterSet *CharacterSet `type:"structure"` - - // The name of the database engine. - Engine *string `type:"string"` - - // The version number of the database engine. - EngineVersion *string `type:"string"` - - // The types of logs that the database engine has available for export to CloudWatch - // Logs. - ExportableLogTypes []*string `type:"list"` - - // A list of the character sets supported by this engine for the CharacterSetName - // parameter of the CreateDBInstance action. - SupportedCharacterSets []*CharacterSet `locationNameList:"CharacterSet" type:"list"` - - // A list of the supported DB engine modes. - SupportedEngineModes []*string `type:"list"` - - // A list of features supported by the DB engine. Supported feature names include - // the following. - // - // * s3Import - SupportedFeatureNames []*string `type:"list"` - - // A list of the time zones supported by this engine for the Timezone parameter - // of the CreateDBInstance action. - SupportedTimezones []*Timezone `locationNameList:"Timezone" type:"list"` - - // A value that indicates whether the engine version supports exporting the - // log types specified by ExportableLogTypes to CloudWatch Logs. - SupportsLogExportsToCloudwatchLogs *bool `type:"boolean"` - - // Indicates whether the database engine version supports read replicas. - SupportsReadReplica *bool `type:"boolean"` - - // A list of engine versions that this database engine version can be upgraded - // to. - ValidUpgradeTarget []*UpgradeTarget `locationNameList:"UpgradeTarget" type:"list"` -} - -// String returns the string representation -func (s DBEngineVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBEngineVersion) GoString() string { - return s.String() -} - -// SetDBEngineDescription sets the DBEngineDescription field's value. -func (s *DBEngineVersion) SetDBEngineDescription(v string) *DBEngineVersion { - s.DBEngineDescription = &v - return s -} - -// SetDBEngineVersionDescription sets the DBEngineVersionDescription field's value. -func (s *DBEngineVersion) SetDBEngineVersionDescription(v string) *DBEngineVersion { - s.DBEngineVersionDescription = &v - return s -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DBEngineVersion) SetDBParameterGroupFamily(v string) *DBEngineVersion { - s.DBParameterGroupFamily = &v - return s -} - -// SetDefaultCharacterSet sets the DefaultCharacterSet field's value. -func (s *DBEngineVersion) SetDefaultCharacterSet(v *CharacterSet) *DBEngineVersion { - s.DefaultCharacterSet = v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DBEngineVersion) SetEngine(v string) *DBEngineVersion { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DBEngineVersion) SetEngineVersion(v string) *DBEngineVersion { - s.EngineVersion = &v - return s -} - -// SetExportableLogTypes sets the ExportableLogTypes field's value. -func (s *DBEngineVersion) SetExportableLogTypes(v []*string) *DBEngineVersion { - s.ExportableLogTypes = v - return s -} - -// SetSupportedCharacterSets sets the SupportedCharacterSets field's value. -func (s *DBEngineVersion) SetSupportedCharacterSets(v []*CharacterSet) *DBEngineVersion { - s.SupportedCharacterSets = v - return s -} - -// SetSupportedEngineModes sets the SupportedEngineModes field's value. -func (s *DBEngineVersion) SetSupportedEngineModes(v []*string) *DBEngineVersion { - s.SupportedEngineModes = v - return s -} - -// SetSupportedFeatureNames sets the SupportedFeatureNames field's value. -func (s *DBEngineVersion) SetSupportedFeatureNames(v []*string) *DBEngineVersion { - s.SupportedFeatureNames = v - return s -} - -// SetSupportedTimezones sets the SupportedTimezones field's value. -func (s *DBEngineVersion) SetSupportedTimezones(v []*Timezone) *DBEngineVersion { - s.SupportedTimezones = v - return s -} - -// SetSupportsLogExportsToCloudwatchLogs sets the SupportsLogExportsToCloudwatchLogs field's value. -func (s *DBEngineVersion) SetSupportsLogExportsToCloudwatchLogs(v bool) *DBEngineVersion { - s.SupportsLogExportsToCloudwatchLogs = &v - return s -} - -// SetSupportsReadReplica sets the SupportsReadReplica field's value. -func (s *DBEngineVersion) SetSupportsReadReplica(v bool) *DBEngineVersion { - s.SupportsReadReplica = &v - return s -} - -// SetValidUpgradeTarget sets the ValidUpgradeTarget field's value. -func (s *DBEngineVersion) SetValidUpgradeTarget(v []*UpgradeTarget) *DBEngineVersion { - s.ValidUpgradeTarget = v - return s -} - -// Contains the details of an Amazon RDS DB instance. -// -// This data type is used as a response element in the DescribeDBInstances action. -type DBInstance struct { - _ struct{} `type:"structure"` - - // Specifies the allocated storage size specified in gibibytes. - AllocatedStorage *int64 `type:"integer"` - - // The AWS Identity and Access Management (IAM) roles associated with the DB - // instance. - AssociatedRoles []*DBInstanceRole `locationNameList:"DBInstanceRole" type:"list"` - - // Indicates that minor version patches are applied automatically. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // Specifies the name of the Availability Zone the DB instance is located in. - AvailabilityZone *string `type:"string"` - - // Specifies the number of days for which automatic DB snapshots are retained. - BackupRetentionPeriod *int64 `type:"integer"` - - // The identifier of the CA certificate for this DB instance. - CACertificateIdentifier *string `type:"string"` - - // If present, specifies the name of the character set that this instance is - // associated with. - CharacterSetName *string `type:"string"` - - // Specifies whether tags are copied from the DB instance to snapshots of the - // DB instance. - CopyTagsToSnapshot *bool `type:"boolean"` - - // If the DB instance is a member of a DB cluster, contains the name of the - // DB cluster that the DB instance is a member of. - DBClusterIdentifier *string `type:"string"` - - // The Amazon Resource Name (ARN) for the DB instance. - DBInstanceArn *string `type:"string"` - - // Contains the name of the compute and memory capacity class of the DB instance. - DBInstanceClass *string `type:"string"` - - // Contains a user-supplied database identifier. This identifier is the unique - // key that identifies a DB instance. - DBInstanceIdentifier *string `type:"string"` - - // Specifies the current state of this database. - DBInstanceStatus *string `type:"string"` - - // The meaning of this parameter differs according to the database engine you - // use. For example, this value returns MySQL, MariaDB, or PostgreSQL information - // when returning values from CreateDBInstanceReadReplica since Read Replicas - // are only supported for these engines. - // - // MySQL, MariaDB, SQL Server, PostgreSQL - // - // Contains the name of the initial database of this instance that was provided - // at create time, if one was specified when the DB instance was created. This - // same name is returned for the life of the DB instance. - // - // Type: String - // - // Oracle - // - // Contains the Oracle System ID (SID) of the created DB instance. Not shown - // when the returned parameters do not apply to an Oracle DB instance. - DBName *string `type:"string"` - - // Provides the list of DB parameter groups applied to this DB instance. - DBParameterGroups []*DBParameterGroupStatus `locationNameList:"DBParameterGroup" type:"list"` - - // Provides List of DB security group elements containing only DBSecurityGroup.Name - // and DBSecurityGroup.Status subelements. - DBSecurityGroups []*DBSecurityGroupMembership `locationNameList:"DBSecurityGroup" type:"list"` - - // Specifies information on the subnet group associated with the DB instance, - // including the name, description, and subnets in the subnet group. - DBSubnetGroup *DBSubnetGroup `type:"structure"` - - // Specifies the port that the DB instance listens on. If the DB instance is - // part of a DB cluster, this can be a different port than the DB cluster port. - DbInstancePort *int64 `type:"integer"` - - // The AWS Region-unique, immutable identifier for the DB instance. This identifier - // is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB - // instance is accessed. - DbiResourceId *string `type:"string"` - - // Indicates if the DB instance has deletion protection enabled. The database - // can't be deleted when this value is set to true. For more information, see - // Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). - DeletionProtection *bool `type:"boolean"` - - // The Active Directory Domain membership records associated with the DB instance. - DomainMemberships []*DomainMembership `locationNameList:"DomainMembership" type:"list"` - - // A list of log types that this DB instance is configured to export to CloudWatch - // Logs. - // - // Log types vary by DB engine. For information about the log types for each - // DB engine, see Amazon RDS Database Log Files (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html) - // in the Amazon RDS User Guide. - EnabledCloudwatchLogsExports []*string `type:"list"` - - // Specifies the connection endpoint. - Endpoint *Endpoint `type:"structure"` - - // Provides the name of the database engine to be used for this DB instance. - Engine *string `type:"string"` - - // Indicates the database engine version. - EngineVersion *string `type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log stream that - // receives the Enhanced Monitoring metrics data for the DB instance. - EnhancedMonitoringResourceArn *string `type:"string"` - - // True if mapping of AWS Identity and Access Management (IAM) accounts to database - // accounts is enabled, and otherwise false. - // - // IAM database authentication can be enabled for the following database engines - // - // * For MySQL 5.6, minor version 5.6.34 or higher - // - // * For MySQL 5.7, minor version 5.7.16 or higher - // - // * Aurora 5.6 or higher. To enable IAM database authentication for Aurora, - // see DBCluster Type. - IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` - - // Provides the date and time the DB instance was created. - InstanceCreateTime *time.Time `type:"timestamp"` - - // Specifies the Provisioned IOPS (I/O operations per second) value. - Iops *int64 `type:"integer"` - - // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted - // DB instance. - KmsKeyId *string `type:"string"` - - // Specifies the latest time to which a database can be restored with point-in-time - // restore. - LatestRestorableTime *time.Time `type:"timestamp"` - - // License model information for this DB instance. - LicenseModel *string `type:"string"` - - // Specifies the listener connection endpoint for SQL Server Always On. - ListenerEndpoint *Endpoint `type:"structure"` - - // Contains the master username for the DB instance. - MasterUsername *string `type:"string"` - - // The interval, in seconds, between points when Enhanced Monitoring metrics - // are collected for the DB instance. - MonitoringInterval *int64 `type:"integer"` - - // The ARN for the IAM role that permits RDS to send Enhanced Monitoring metrics - // to Amazon CloudWatch Logs. - MonitoringRoleArn *string `type:"string"` - - // Specifies if the DB instance is a Multi-AZ deployment. - MultiAZ *bool `type:"boolean"` - - // Provides the list of option group memberships for this DB instance. - OptionGroupMemberships []*OptionGroupMembership `locationNameList:"OptionGroupMembership" type:"list"` - - // Specifies that changes to the DB instance are pending. This element is only - // included when changes are pending. Specific changes are identified by subelements. - PendingModifiedValues *PendingModifiedValues `type:"structure"` - - // True if Performance Insights is enabled for the DB instance, and otherwise - // false. - PerformanceInsightsEnabled *bool `type:"boolean"` - - // The AWS KMS key identifier for encryption of Performance Insights data. The - // KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the - // KMS key alias for the KMS encryption key. - PerformanceInsightsKMSKeyId *string `type:"string"` - - // The amount of time, in days, to retain Performance Insights data. Valid values - // are 7 or 731 (2 years). - PerformanceInsightsRetentionPeriod *int64 `type:"integer"` - - // Specifies the daily time range during which automated backups are created - // if automated backups are enabled, as determined by the BackupRetentionPeriod. - PreferredBackupWindow *string `type:"string"` - - // Specifies the weekly time range during which system maintenance can occur, - // in Universal Coordinated Time (UTC). - PreferredMaintenanceWindow *string `type:"string"` - - // The number of CPU cores and the number of threads per core for the DB instance - // class of the DB instance. - ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` - - // A value that specifies the order in which an Aurora Replica is promoted to - // the primary instance after a failure of the existing primary instance. For - // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.FaultTolerance) - // in the Amazon Aurora User Guide. - PromotionTier *int64 `type:"integer"` - - // Specifies the accessibility options for the DB instance. A value of true - // specifies an Internet-facing instance with a publicly resolvable DNS name, - // which resolves to a public IP address. A value of false specifies an internal - // instance with a DNS name that resolves to a private IP address. - PubliclyAccessible *bool `type:"boolean"` - - // Contains one or more identifiers of Aurora DB clusters to which the RDS DB - // instance is replicated as a Read Replica. For example, when you create an - // Aurora Read Replica of an RDS MySQL DB instance, the Aurora MySQL DB cluster - // for the Aurora Read Replica is shown. This output does not contain information - // about cross region Aurora Read Replicas. - // - // Currently, each RDS DB instance can have only one Aurora Read Replica. - ReadReplicaDBClusterIdentifiers []*string `locationNameList:"ReadReplicaDBClusterIdentifier" type:"list"` - - // Contains one or more identifiers of the Read Replicas associated with this - // DB instance. - ReadReplicaDBInstanceIdentifiers []*string `locationNameList:"ReadReplicaDBInstanceIdentifier" type:"list"` - - // Contains the identifier of the source DB instance if this DB instance is - // a Read Replica. - ReadReplicaSourceDBInstanceIdentifier *string `type:"string"` - - // If present, specifies the name of the secondary Availability Zone for a DB - // instance with multi-AZ support. - SecondaryAvailabilityZone *string `type:"string"` - - // The status of a Read Replica. If the instance is not a Read Replica, this - // is blank. - StatusInfos []*DBInstanceStatusInfo `locationNameList:"DBInstanceStatusInfo" type:"list"` - - // Specifies whether the DB instance is encrypted. - StorageEncrypted *bool `type:"boolean"` - - // Specifies the storage type associated with DB instance. - StorageType *string `type:"string"` - - // The ARN from the key store with which the instance is associated for TDE - // encryption. - TdeCredentialArn *string `type:"string"` - - // The time zone of the DB instance. In most cases, the Timezone element is - // empty. Timezone content appears only for Microsoft SQL Server DB instances - // that were created with a time zone specified. - Timezone *string `type:"string"` - - // Provides a list of VPC security group elements that the DB instance belongs - // to. - VpcSecurityGroups []*VpcSecurityGroupMembership `locationNameList:"VpcSecurityGroupMembership" type:"list"` -} - -// String returns the string representation -func (s DBInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBInstance) GoString() string { - return s.String() -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *DBInstance) SetAllocatedStorage(v int64) *DBInstance { - s.AllocatedStorage = &v - return s -} - -// SetAssociatedRoles sets the AssociatedRoles field's value. -func (s *DBInstance) SetAssociatedRoles(v []*DBInstanceRole) *DBInstance { - s.AssociatedRoles = v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *DBInstance) SetAutoMinorVersionUpgrade(v bool) *DBInstance { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *DBInstance) SetAvailabilityZone(v string) *DBInstance { - s.AvailabilityZone = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *DBInstance) SetBackupRetentionPeriod(v int64) *DBInstance { - s.BackupRetentionPeriod = &v - return s -} - -// SetCACertificateIdentifier sets the CACertificateIdentifier field's value. -func (s *DBInstance) SetCACertificateIdentifier(v string) *DBInstance { - s.CACertificateIdentifier = &v - return s -} - -// SetCharacterSetName sets the CharacterSetName field's value. -func (s *DBInstance) SetCharacterSetName(v string) *DBInstance { - s.CharacterSetName = &v - return s -} - -// SetCopyTagsToSnapshot sets the CopyTagsToSnapshot field's value. -func (s *DBInstance) SetCopyTagsToSnapshot(v bool) *DBInstance { - s.CopyTagsToSnapshot = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DBInstance) SetDBClusterIdentifier(v string) *DBInstance { - s.DBClusterIdentifier = &v - return s -} - -// SetDBInstanceArn sets the DBInstanceArn field's value. -func (s *DBInstance) SetDBInstanceArn(v string) *DBInstance { - s.DBInstanceArn = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *DBInstance) SetDBInstanceClass(v string) *DBInstance { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DBInstance) SetDBInstanceIdentifier(v string) *DBInstance { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBInstanceStatus sets the DBInstanceStatus field's value. -func (s *DBInstance) SetDBInstanceStatus(v string) *DBInstance { - s.DBInstanceStatus = &v - return s -} - -// SetDBName sets the DBName field's value. -func (s *DBInstance) SetDBName(v string) *DBInstance { - s.DBName = &v - return s -} - -// SetDBParameterGroups sets the DBParameterGroups field's value. -func (s *DBInstance) SetDBParameterGroups(v []*DBParameterGroupStatus) *DBInstance { - s.DBParameterGroups = v - return s -} - -// SetDBSecurityGroups sets the DBSecurityGroups field's value. -func (s *DBInstance) SetDBSecurityGroups(v []*DBSecurityGroupMembership) *DBInstance { - s.DBSecurityGroups = v - return s -} - -// SetDBSubnetGroup sets the DBSubnetGroup field's value. -func (s *DBInstance) SetDBSubnetGroup(v *DBSubnetGroup) *DBInstance { - s.DBSubnetGroup = v - return s -} - -// SetDbInstancePort sets the DbInstancePort field's value. -func (s *DBInstance) SetDbInstancePort(v int64) *DBInstance { - s.DbInstancePort = &v - return s -} - -// SetDbiResourceId sets the DbiResourceId field's value. -func (s *DBInstance) SetDbiResourceId(v string) *DBInstance { - s.DbiResourceId = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *DBInstance) SetDeletionProtection(v bool) *DBInstance { - s.DeletionProtection = &v - return s -} - -// SetDomainMemberships sets the DomainMemberships field's value. -func (s *DBInstance) SetDomainMemberships(v []*DomainMembership) *DBInstance { - s.DomainMemberships = v - return s -} - -// SetEnabledCloudwatchLogsExports sets the EnabledCloudwatchLogsExports field's value. -func (s *DBInstance) SetEnabledCloudwatchLogsExports(v []*string) *DBInstance { - s.EnabledCloudwatchLogsExports = v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *DBInstance) SetEndpoint(v *Endpoint) *DBInstance { - s.Endpoint = v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DBInstance) SetEngine(v string) *DBInstance { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DBInstance) SetEngineVersion(v string) *DBInstance { - s.EngineVersion = &v - return s -} - -// SetEnhancedMonitoringResourceArn sets the EnhancedMonitoringResourceArn field's value. -func (s *DBInstance) SetEnhancedMonitoringResourceArn(v string) *DBInstance { - s.EnhancedMonitoringResourceArn = &v - return s -} - -// SetIAMDatabaseAuthenticationEnabled sets the IAMDatabaseAuthenticationEnabled field's value. -func (s *DBInstance) SetIAMDatabaseAuthenticationEnabled(v bool) *DBInstance { - s.IAMDatabaseAuthenticationEnabled = &v - return s -} - -// SetInstanceCreateTime sets the InstanceCreateTime field's value. -func (s *DBInstance) SetInstanceCreateTime(v time.Time) *DBInstance { - s.InstanceCreateTime = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *DBInstance) SetIops(v int64) *DBInstance { - s.Iops = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DBInstance) SetKmsKeyId(v string) *DBInstance { - s.KmsKeyId = &v - return s -} - -// SetLatestRestorableTime sets the LatestRestorableTime field's value. -func (s *DBInstance) SetLatestRestorableTime(v time.Time) *DBInstance { - s.LatestRestorableTime = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *DBInstance) SetLicenseModel(v string) *DBInstance { - s.LicenseModel = &v - return s -} - -// SetListenerEndpoint sets the ListenerEndpoint field's value. -func (s *DBInstance) SetListenerEndpoint(v *Endpoint) *DBInstance { - s.ListenerEndpoint = v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *DBInstance) SetMasterUsername(v string) *DBInstance { - s.MasterUsername = &v - return s -} - -// SetMonitoringInterval sets the MonitoringInterval field's value. -func (s *DBInstance) SetMonitoringInterval(v int64) *DBInstance { - s.MonitoringInterval = &v - return s -} - -// SetMonitoringRoleArn sets the MonitoringRoleArn field's value. -func (s *DBInstance) SetMonitoringRoleArn(v string) *DBInstance { - s.MonitoringRoleArn = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *DBInstance) SetMultiAZ(v bool) *DBInstance { - s.MultiAZ = &v - return s -} - -// SetOptionGroupMemberships sets the OptionGroupMemberships field's value. -func (s *DBInstance) SetOptionGroupMemberships(v []*OptionGroupMembership) *DBInstance { - s.OptionGroupMemberships = v - return s -} - -// SetPendingModifiedValues sets the PendingModifiedValues field's value. -func (s *DBInstance) SetPendingModifiedValues(v *PendingModifiedValues) *DBInstance { - s.PendingModifiedValues = v - return s -} - -// SetPerformanceInsightsEnabled sets the PerformanceInsightsEnabled field's value. -func (s *DBInstance) SetPerformanceInsightsEnabled(v bool) *DBInstance { - s.PerformanceInsightsEnabled = &v - return s -} - -// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. -func (s *DBInstance) SetPerformanceInsightsKMSKeyId(v string) *DBInstance { - s.PerformanceInsightsKMSKeyId = &v - return s -} - -// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. -func (s *DBInstance) SetPerformanceInsightsRetentionPeriod(v int64) *DBInstance { - s.PerformanceInsightsRetentionPeriod = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *DBInstance) SetPreferredBackupWindow(v string) *DBInstance { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *DBInstance) SetPreferredMaintenanceWindow(v string) *DBInstance { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetProcessorFeatures sets the ProcessorFeatures field's value. -func (s *DBInstance) SetProcessorFeatures(v []*ProcessorFeature) *DBInstance { - s.ProcessorFeatures = v - return s -} - -// SetPromotionTier sets the PromotionTier field's value. -func (s *DBInstance) SetPromotionTier(v int64) *DBInstance { - s.PromotionTier = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *DBInstance) SetPubliclyAccessible(v bool) *DBInstance { - s.PubliclyAccessible = &v - return s -} - -// SetReadReplicaDBClusterIdentifiers sets the ReadReplicaDBClusterIdentifiers field's value. -func (s *DBInstance) SetReadReplicaDBClusterIdentifiers(v []*string) *DBInstance { - s.ReadReplicaDBClusterIdentifiers = v - return s -} - -// SetReadReplicaDBInstanceIdentifiers sets the ReadReplicaDBInstanceIdentifiers field's value. -func (s *DBInstance) SetReadReplicaDBInstanceIdentifiers(v []*string) *DBInstance { - s.ReadReplicaDBInstanceIdentifiers = v - return s -} - -// SetReadReplicaSourceDBInstanceIdentifier sets the ReadReplicaSourceDBInstanceIdentifier field's value. -func (s *DBInstance) SetReadReplicaSourceDBInstanceIdentifier(v string) *DBInstance { - s.ReadReplicaSourceDBInstanceIdentifier = &v - return s -} - -// SetSecondaryAvailabilityZone sets the SecondaryAvailabilityZone field's value. -func (s *DBInstance) SetSecondaryAvailabilityZone(v string) *DBInstance { - s.SecondaryAvailabilityZone = &v - return s -} - -// SetStatusInfos sets the StatusInfos field's value. -func (s *DBInstance) SetStatusInfos(v []*DBInstanceStatusInfo) *DBInstance { - s.StatusInfos = v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *DBInstance) SetStorageEncrypted(v bool) *DBInstance { - s.StorageEncrypted = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *DBInstance) SetStorageType(v string) *DBInstance { - s.StorageType = &v - return s -} - -// SetTdeCredentialArn sets the TdeCredentialArn field's value. -func (s *DBInstance) SetTdeCredentialArn(v string) *DBInstance { - s.TdeCredentialArn = &v - return s -} - -// SetTimezone sets the Timezone field's value. -func (s *DBInstance) SetTimezone(v string) *DBInstance { - s.Timezone = &v - return s -} - -// SetVpcSecurityGroups sets the VpcSecurityGroups field's value. -func (s *DBInstance) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *DBInstance { - s.VpcSecurityGroups = v - return s -} - -// An automated backup of a DB instance. It it consists of system backups, transaction -// logs, and the database instance properties that existed at the time you deleted -// the source instance. -type DBInstanceAutomatedBackup struct { - _ struct{} `type:"structure"` - - // Specifies the allocated storage size in gibibytes (GiB). - AllocatedStorage *int64 `type:"integer"` - - // The Availability Zone that the automated backup was created in. For information - // on AWS Regions and Availability Zones, see Regions and Availability Zones - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html). - AvailabilityZone *string `type:"string"` - - // The Amazon Resource Name (ARN) for the automated backup. - DBInstanceArn *string `type:"string"` - - // The customer id of the instance that is/was associated with the automated - // backup. - DBInstanceIdentifier *string `type:"string"` - - // The identifier for the source DB instance, which can't be changed and which - // is unique to an AWS Region. - DbiResourceId *string `type:"string"` - - // Specifies whether the automated backup is encrypted. - Encrypted *bool `type:"boolean"` - - // The name of the database engine for this automated backup. - Engine *string `type:"string"` - - // The version of the database engine for the automated backup. - EngineVersion *string `type:"string"` - - // True if mapping of AWS Identity and Access Management (IAM) accounts to database - // accounts is enabled, and otherwise false. - IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` - - // Provides the date and time that the DB instance was created. - InstanceCreateTime *time.Time `type:"timestamp"` - - // The IOPS (I/O operations per second) value for the automated backup. - Iops *int64 `type:"integer"` - - // The AWS KMS key ID for an automated backup. The KMS key ID is the Amazon - // Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS - // encryption key. - KmsKeyId *string `type:"string"` - - // License model information for the automated backup. - LicenseModel *string `type:"string"` - - // The license model of an automated backup. - MasterUsername *string `type:"string"` - - // The option group the automated backup is associated with. If omitted, the - // default option group for the engine specified is used. - OptionGroupName *string `type:"string"` - - // The port number that the automated backup used for connections. - // - // Default: Inherits from the source DB instance - // - // Valid Values: 1150-65535 - Port *int64 `type:"integer"` - - // The AWS Region associated with the automated backup. - Region *string `type:"string"` - - // Earliest and latest time an instance can be restored to. - RestoreWindow *RestoreWindow `type:"structure"` - - // Provides a list of status information for an automated backup: - // - // * active - automated backups for current instances - // - // * retained - automated backups for deleted instances - // - // * creating - automated backups that are waiting for the first automated - // snapshot to be available. - Status *string `type:"string"` - - // Specifies the storage type associated with the automated backup. - StorageType *string `type:"string"` - - // The ARN from the key store with which the automated backup is associated - // for TDE encryption. - TdeCredentialArn *string `type:"string"` - - // The time zone of the automated backup. In most cases, the Timezone element - // is empty. Timezone content appears only for Microsoft SQL Server DB instances - // that were created with a time zone specified. - Timezone *string `type:"string"` - - // Provides the VPC ID associated with the DB instance - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s DBInstanceAutomatedBackup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBInstanceAutomatedBackup) GoString() string { - return s.String() -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *DBInstanceAutomatedBackup) SetAllocatedStorage(v int64) *DBInstanceAutomatedBackup { - s.AllocatedStorage = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *DBInstanceAutomatedBackup) SetAvailabilityZone(v string) *DBInstanceAutomatedBackup { - s.AvailabilityZone = &v - return s -} - -// SetDBInstanceArn sets the DBInstanceArn field's value. -func (s *DBInstanceAutomatedBackup) SetDBInstanceArn(v string) *DBInstanceAutomatedBackup { - s.DBInstanceArn = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DBInstanceAutomatedBackup) SetDBInstanceIdentifier(v string) *DBInstanceAutomatedBackup { - s.DBInstanceIdentifier = &v - return s -} - -// SetDbiResourceId sets the DbiResourceId field's value. -func (s *DBInstanceAutomatedBackup) SetDbiResourceId(v string) *DBInstanceAutomatedBackup { - s.DbiResourceId = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *DBInstanceAutomatedBackup) SetEncrypted(v bool) *DBInstanceAutomatedBackup { - s.Encrypted = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DBInstanceAutomatedBackup) SetEngine(v string) *DBInstanceAutomatedBackup { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DBInstanceAutomatedBackup) SetEngineVersion(v string) *DBInstanceAutomatedBackup { - s.EngineVersion = &v - return s -} - -// SetIAMDatabaseAuthenticationEnabled sets the IAMDatabaseAuthenticationEnabled field's value. -func (s *DBInstanceAutomatedBackup) SetIAMDatabaseAuthenticationEnabled(v bool) *DBInstanceAutomatedBackup { - s.IAMDatabaseAuthenticationEnabled = &v - return s -} - -// SetInstanceCreateTime sets the InstanceCreateTime field's value. -func (s *DBInstanceAutomatedBackup) SetInstanceCreateTime(v time.Time) *DBInstanceAutomatedBackup { - s.InstanceCreateTime = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *DBInstanceAutomatedBackup) SetIops(v int64) *DBInstanceAutomatedBackup { - s.Iops = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DBInstanceAutomatedBackup) SetKmsKeyId(v string) *DBInstanceAutomatedBackup { - s.KmsKeyId = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *DBInstanceAutomatedBackup) SetLicenseModel(v string) *DBInstanceAutomatedBackup { - s.LicenseModel = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *DBInstanceAutomatedBackup) SetMasterUsername(v string) *DBInstanceAutomatedBackup { - s.MasterUsername = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *DBInstanceAutomatedBackup) SetOptionGroupName(v string) *DBInstanceAutomatedBackup { - s.OptionGroupName = &v - return s -} - -// SetPort sets the Port field's value. -func (s *DBInstanceAutomatedBackup) SetPort(v int64) *DBInstanceAutomatedBackup { - s.Port = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *DBInstanceAutomatedBackup) SetRegion(v string) *DBInstanceAutomatedBackup { - s.Region = &v - return s -} - -// SetRestoreWindow sets the RestoreWindow field's value. -func (s *DBInstanceAutomatedBackup) SetRestoreWindow(v *RestoreWindow) *DBInstanceAutomatedBackup { - s.RestoreWindow = v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBInstanceAutomatedBackup) SetStatus(v string) *DBInstanceAutomatedBackup { - s.Status = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *DBInstanceAutomatedBackup) SetStorageType(v string) *DBInstanceAutomatedBackup { - s.StorageType = &v - return s -} - -// SetTdeCredentialArn sets the TdeCredentialArn field's value. -func (s *DBInstanceAutomatedBackup) SetTdeCredentialArn(v string) *DBInstanceAutomatedBackup { - s.TdeCredentialArn = &v - return s -} - -// SetTimezone sets the Timezone field's value. -func (s *DBInstanceAutomatedBackup) SetTimezone(v string) *DBInstanceAutomatedBackup { - s.Timezone = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DBInstanceAutomatedBackup) SetVpcId(v string) *DBInstanceAutomatedBackup { - s.VpcId = &v - return s -} - -// Describes an AWS Identity and Access Management (IAM) role that is associated -// with a DB instance. -type DBInstanceRole struct { - _ struct{} `type:"structure"` - - // The name of the feature associated with the AWS Identity and Access Management - // (IAM) role. For the list of supported feature names, see DBEngineVersion. - FeatureName *string `type:"string"` - - // The Amazon Resource Name (ARN) of the IAM role that is associated with the - // DB instance. - RoleArn *string `type:"string"` - - // Describes the state of association between the IAM role and the DB instance. - // The Status property returns one of the following values: - // - // * ACTIVE - the IAM role ARN is associated with the DB instance and can - // be used to access other AWS services on your behalf. - // - // * PENDING - the IAM role ARN is being associated with the DB instance. - // - // * INVALID - the IAM role ARN is associated with the DB instance, but the - // DB instance is unable to assume the IAM role in order to access other - // AWS services on your behalf. - Status *string `type:"string"` -} - -// String returns the string representation -func (s DBInstanceRole) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBInstanceRole) GoString() string { - return s.String() -} - -// SetFeatureName sets the FeatureName field's value. -func (s *DBInstanceRole) SetFeatureName(v string) *DBInstanceRole { - s.FeatureName = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DBInstanceRole) SetRoleArn(v string) *DBInstanceRole { - s.RoleArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBInstanceRole) SetStatus(v string) *DBInstanceRole { - s.Status = &v - return s -} - -// Provides a list of status information for a DB instance. -type DBInstanceStatusInfo struct { - _ struct{} `type:"structure"` - - // Details of the error if there is an error for the instance. If the instance - // is not in an error state, this value is blank. - Message *string `type:"string"` - - // Boolean value that is true if the instance is operating normally, or false - // if the instance is in an error state. - Normal *bool `type:"boolean"` - - // Status of the DB instance. For a StatusType of read replica, the values can - // be replicating, replication stop point set, replication stop point reached, - // error, stopped, or terminated. - Status *string `type:"string"` - - // This value is currently "read replication." - StatusType *string `type:"string"` -} - -// String returns the string representation -func (s DBInstanceStatusInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBInstanceStatusInfo) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *DBInstanceStatusInfo) SetMessage(v string) *DBInstanceStatusInfo { - s.Message = &v - return s -} - -// SetNormal sets the Normal field's value. -func (s *DBInstanceStatusInfo) SetNormal(v bool) *DBInstanceStatusInfo { - s.Normal = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBInstanceStatusInfo) SetStatus(v string) *DBInstanceStatusInfo { - s.Status = &v - return s -} - -// SetStatusType sets the StatusType field's value. -func (s *DBInstanceStatusInfo) SetStatusType(v string) *DBInstanceStatusInfo { - s.StatusType = &v - return s -} - -// Contains the details of an Amazon RDS DB parameter group. -// -// This data type is used as a response element in the DescribeDBParameterGroups -// action. -type DBParameterGroup struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the DB parameter group. - DBParameterGroupArn *string `type:"string"` - - // Provides the name of the DB parameter group family that this DB parameter - // group is compatible with. - DBParameterGroupFamily *string `type:"string"` - - // Provides the name of the DB parameter group. - DBParameterGroupName *string `type:"string"` - - // Provides the customer-specified description for this DB parameter group. - Description *string `type:"string"` -} - -// String returns the string representation -func (s DBParameterGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBParameterGroup) GoString() string { - return s.String() -} - -// SetDBParameterGroupArn sets the DBParameterGroupArn field's value. -func (s *DBParameterGroup) SetDBParameterGroupArn(v string) *DBParameterGroup { - s.DBParameterGroupArn = &v - return s -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DBParameterGroup) SetDBParameterGroupFamily(v string) *DBParameterGroup { - s.DBParameterGroupFamily = &v - return s -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *DBParameterGroup) SetDBParameterGroupName(v string) *DBParameterGroup { - s.DBParameterGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DBParameterGroup) SetDescription(v string) *DBParameterGroup { - s.Description = &v - return s -} - -// Contains the result of a successful invocation of the ModifyDBParameterGroup -// or ResetDBParameterGroup action. -type DBParameterGroupNameMessage struct { - _ struct{} `type:"structure"` - - // Provides the name of the DB parameter group. - DBParameterGroupName *string `type:"string"` -} - -// String returns the string representation -func (s DBParameterGroupNameMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBParameterGroupNameMessage) GoString() string { - return s.String() -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *DBParameterGroupNameMessage) SetDBParameterGroupName(v string) *DBParameterGroupNameMessage { - s.DBParameterGroupName = &v - return s -} - -// The status of the DB parameter group. -// -// This data type is used as a response element in the following actions: -// -// * CreateDBInstance -// -// * CreateDBInstanceReadReplica -// -// * DeleteDBInstance -// -// * ModifyDBInstance -// -// * RebootDBInstance -// -// * RestoreDBInstanceFromDBSnapshot -type DBParameterGroupStatus struct { - _ struct{} `type:"structure"` - - // The name of the DP parameter group. - DBParameterGroupName *string `type:"string"` - - // The status of parameter updates. - ParameterApplyStatus *string `type:"string"` -} - -// String returns the string representation -func (s DBParameterGroupStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBParameterGroupStatus) GoString() string { - return s.String() -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *DBParameterGroupStatus) SetDBParameterGroupName(v string) *DBParameterGroupStatus { - s.DBParameterGroupName = &v - return s -} - -// SetParameterApplyStatus sets the ParameterApplyStatus field's value. -func (s *DBParameterGroupStatus) SetParameterApplyStatus(v string) *DBParameterGroupStatus { - s.ParameterApplyStatus = &v - return s -} - -// Contains the details for an Amazon RDS DB security group. -// -// This data type is used as a response element in the DescribeDBSecurityGroups -// action. -type DBSecurityGroup struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the DB security group. - DBSecurityGroupArn *string `type:"string"` - - // Provides the description of the DB security group. - DBSecurityGroupDescription *string `type:"string"` - - // Specifies the name of the DB security group. - DBSecurityGroupName *string `type:"string"` - - // Contains a list of EC2SecurityGroup elements. - EC2SecurityGroups []*EC2SecurityGroup `locationNameList:"EC2SecurityGroup" type:"list"` - - // Contains a list of IPRange elements. - IPRanges []*IPRange `locationNameList:"IPRange" type:"list"` - - // Provides the AWS ID of the owner of a specific DB security group. - OwnerId *string `type:"string"` - - // Provides the VpcId of the DB security group. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s DBSecurityGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBSecurityGroup) GoString() string { - return s.String() -} - -// SetDBSecurityGroupArn sets the DBSecurityGroupArn field's value. -func (s *DBSecurityGroup) SetDBSecurityGroupArn(v string) *DBSecurityGroup { - s.DBSecurityGroupArn = &v - return s -} - -// SetDBSecurityGroupDescription sets the DBSecurityGroupDescription field's value. -func (s *DBSecurityGroup) SetDBSecurityGroupDescription(v string) *DBSecurityGroup { - s.DBSecurityGroupDescription = &v - return s -} - -// SetDBSecurityGroupName sets the DBSecurityGroupName field's value. -func (s *DBSecurityGroup) SetDBSecurityGroupName(v string) *DBSecurityGroup { - s.DBSecurityGroupName = &v - return s -} - -// SetEC2SecurityGroups sets the EC2SecurityGroups field's value. -func (s *DBSecurityGroup) SetEC2SecurityGroups(v []*EC2SecurityGroup) *DBSecurityGroup { - s.EC2SecurityGroups = v - return s -} - -// SetIPRanges sets the IPRanges field's value. -func (s *DBSecurityGroup) SetIPRanges(v []*IPRange) *DBSecurityGroup { - s.IPRanges = v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *DBSecurityGroup) SetOwnerId(v string) *DBSecurityGroup { - s.OwnerId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DBSecurityGroup) SetVpcId(v string) *DBSecurityGroup { - s.VpcId = &v - return s -} - -// This data type is used as a response element in the following actions: -// -// * ModifyDBInstance -// -// * RebootDBInstance -// -// * RestoreDBInstanceFromDBSnapshot -// -// * RestoreDBInstanceToPointInTime -type DBSecurityGroupMembership struct { - _ struct{} `type:"structure"` - - // The name of the DB security group. - DBSecurityGroupName *string `type:"string"` - - // The status of the DB security group. - Status *string `type:"string"` -} - -// String returns the string representation -func (s DBSecurityGroupMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBSecurityGroupMembership) GoString() string { - return s.String() -} - -// SetDBSecurityGroupName sets the DBSecurityGroupName field's value. -func (s *DBSecurityGroupMembership) SetDBSecurityGroupName(v string) *DBSecurityGroupMembership { - s.DBSecurityGroupName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBSecurityGroupMembership) SetStatus(v string) *DBSecurityGroupMembership { - s.Status = &v - return s -} - -// Contains the details of an Amazon RDS DB snapshot. -// -// This data type is used as a response element in the DescribeDBSnapshots action. -type DBSnapshot struct { - _ struct{} `type:"structure"` - - // Specifies the allocated storage size in gibibytes (GiB). - AllocatedStorage *int64 `type:"integer"` - - // Specifies the name of the Availability Zone the DB instance was located in - // at the time of the DB snapshot. - AvailabilityZone *string `type:"string"` - - // Specifies the DB instance identifier of the DB instance this DB snapshot - // was created from. - DBInstanceIdentifier *string `type:"string"` - - // The Amazon Resource Name (ARN) for the DB snapshot. - DBSnapshotArn *string `type:"string"` - - // Specifies the identifier for the DB snapshot. - DBSnapshotIdentifier *string `type:"string"` - - // The identifier for the source DB instance, which can't be changed and which - // is unique to an AWS Region. - DbiResourceId *string `type:"string"` - - // Specifies whether the DB snapshot is encrypted. - Encrypted *bool `type:"boolean"` - - // Specifies the name of the database engine. - Engine *string `type:"string"` - - // Specifies the version of the database engine. - EngineVersion *string `type:"string"` - - // True if mapping of AWS Identity and Access Management (IAM) accounts to database - // accounts is enabled, and otherwise false. - IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` - - // Specifies the time when the snapshot was taken, in Universal Coordinated - // Time (UTC). - InstanceCreateTime *time.Time `type:"timestamp"` - - // Specifies the Provisioned IOPS (I/O operations per second) value of the DB - // instance at the time of the snapshot. - Iops *int64 `type:"integer"` - - // If Encrypted is true, the AWS KMS key identifier for the encrypted DB snapshot. - KmsKeyId *string `type:"string"` - - // License model information for the restored DB instance. - LicenseModel *string `type:"string"` - - // Provides the master username for the DB snapshot. - MasterUsername *string `type:"string"` - - // Provides the option group name for the DB snapshot. - OptionGroupName *string `type:"string"` - - // The percentage of the estimated data that has been transferred. - PercentProgress *int64 `type:"integer"` - - // Specifies the port that the database engine was listening on at the time - // of the snapshot. - Port *int64 `type:"integer"` - - // The number of CPU cores and the number of threads per core for the DB instance - // class of the DB instance when the DB snapshot was created. - ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` - - // Provides the time when the snapshot was taken, in Universal Coordinated Time - // (UTC). - SnapshotCreateTime *time.Time `type:"timestamp"` - - // Provides the type of the DB snapshot. - SnapshotType *string `type:"string"` - - // The DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied - // from. It only has value in case of cross-customer or cross-region copy. - SourceDBSnapshotIdentifier *string `type:"string"` - - // The AWS Region that the DB snapshot was created in or copied from. - SourceRegion *string `type:"string"` - - // Specifies the status of this DB snapshot. - Status *string `type:"string"` - - // Specifies the storage type associated with DB snapshot. - StorageType *string `type:"string"` - - // The ARN from the key store with which to associate the instance for TDE encryption. - TdeCredentialArn *string `type:"string"` - - // The time zone of the DB snapshot. In most cases, the Timezone element is - // empty. Timezone content appears only for snapshots taken from Microsoft SQL - // Server DB instances that were created with a time zone specified. - Timezone *string `type:"string"` - - // Provides the VPC ID associated with the DB snapshot. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s DBSnapshot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBSnapshot) GoString() string { - return s.String() -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *DBSnapshot) SetAllocatedStorage(v int64) *DBSnapshot { - s.AllocatedStorage = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *DBSnapshot) SetAvailabilityZone(v string) *DBSnapshot { - s.AvailabilityZone = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DBSnapshot) SetDBInstanceIdentifier(v string) *DBSnapshot { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBSnapshotArn sets the DBSnapshotArn field's value. -func (s *DBSnapshot) SetDBSnapshotArn(v string) *DBSnapshot { - s.DBSnapshotArn = &v - return s -} - -// SetDBSnapshotIdentifier sets the DBSnapshotIdentifier field's value. -func (s *DBSnapshot) SetDBSnapshotIdentifier(v string) *DBSnapshot { - s.DBSnapshotIdentifier = &v - return s -} - -// SetDbiResourceId sets the DbiResourceId field's value. -func (s *DBSnapshot) SetDbiResourceId(v string) *DBSnapshot { - s.DbiResourceId = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *DBSnapshot) SetEncrypted(v bool) *DBSnapshot { - s.Encrypted = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DBSnapshot) SetEngine(v string) *DBSnapshot { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DBSnapshot) SetEngineVersion(v string) *DBSnapshot { - s.EngineVersion = &v - return s -} - -// SetIAMDatabaseAuthenticationEnabled sets the IAMDatabaseAuthenticationEnabled field's value. -func (s *DBSnapshot) SetIAMDatabaseAuthenticationEnabled(v bool) *DBSnapshot { - s.IAMDatabaseAuthenticationEnabled = &v - return s -} - -// SetInstanceCreateTime sets the InstanceCreateTime field's value. -func (s *DBSnapshot) SetInstanceCreateTime(v time.Time) *DBSnapshot { - s.InstanceCreateTime = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *DBSnapshot) SetIops(v int64) *DBSnapshot { - s.Iops = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DBSnapshot) SetKmsKeyId(v string) *DBSnapshot { - s.KmsKeyId = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *DBSnapshot) SetLicenseModel(v string) *DBSnapshot { - s.LicenseModel = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *DBSnapshot) SetMasterUsername(v string) *DBSnapshot { - s.MasterUsername = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *DBSnapshot) SetOptionGroupName(v string) *DBSnapshot { - s.OptionGroupName = &v - return s -} - -// SetPercentProgress sets the PercentProgress field's value. -func (s *DBSnapshot) SetPercentProgress(v int64) *DBSnapshot { - s.PercentProgress = &v - return s -} - -// SetPort sets the Port field's value. -func (s *DBSnapshot) SetPort(v int64) *DBSnapshot { - s.Port = &v - return s -} - -// SetProcessorFeatures sets the ProcessorFeatures field's value. -func (s *DBSnapshot) SetProcessorFeatures(v []*ProcessorFeature) *DBSnapshot { - s.ProcessorFeatures = v - return s -} - -// SetSnapshotCreateTime sets the SnapshotCreateTime field's value. -func (s *DBSnapshot) SetSnapshotCreateTime(v time.Time) *DBSnapshot { - s.SnapshotCreateTime = &v - return s -} - -// SetSnapshotType sets the SnapshotType field's value. -func (s *DBSnapshot) SetSnapshotType(v string) *DBSnapshot { - s.SnapshotType = &v - return s -} - -// SetSourceDBSnapshotIdentifier sets the SourceDBSnapshotIdentifier field's value. -func (s *DBSnapshot) SetSourceDBSnapshotIdentifier(v string) *DBSnapshot { - s.SourceDBSnapshotIdentifier = &v - return s -} - -// SetSourceRegion sets the SourceRegion field's value. -func (s *DBSnapshot) SetSourceRegion(v string) *DBSnapshot { - s.SourceRegion = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DBSnapshot) SetStatus(v string) *DBSnapshot { - s.Status = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *DBSnapshot) SetStorageType(v string) *DBSnapshot { - s.StorageType = &v - return s -} - -// SetTdeCredentialArn sets the TdeCredentialArn field's value. -func (s *DBSnapshot) SetTdeCredentialArn(v string) *DBSnapshot { - s.TdeCredentialArn = &v - return s -} - -// SetTimezone sets the Timezone field's value. -func (s *DBSnapshot) SetTimezone(v string) *DBSnapshot { - s.Timezone = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DBSnapshot) SetVpcId(v string) *DBSnapshot { - s.VpcId = &v - return s -} - -// Contains the name and values of a manual DB snapshot attribute -// -// Manual DB snapshot attributes are used to authorize other AWS accounts to -// restore a manual DB snapshot. For more information, see the ModifyDBSnapshotAttribute -// API. -type DBSnapshotAttribute struct { - _ struct{} `type:"structure"` - - // The name of the manual DB snapshot attribute. - // - // The attribute named restore refers to the list of AWS accounts that have - // permission to copy or restore the manual DB cluster snapshot. For more information, - // see the ModifyDBSnapshotAttribute API action. - AttributeName *string `type:"string"` - - // The value or values for the manual DB snapshot attribute. - // - // If the AttributeName field is set to restore, then this element returns a - // list of IDs of the AWS accounts that are authorized to copy or restore the - // manual DB snapshot. If a value of all is in the list, then the manual DB - // snapshot is public and available for any AWS account to copy or restore. - AttributeValues []*string `locationNameList:"AttributeValue" type:"list"` -} - -// String returns the string representation -func (s DBSnapshotAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBSnapshotAttribute) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *DBSnapshotAttribute) SetAttributeName(v string) *DBSnapshotAttribute { - s.AttributeName = &v - return s -} - -// SetAttributeValues sets the AttributeValues field's value. -func (s *DBSnapshotAttribute) SetAttributeValues(v []*string) *DBSnapshotAttribute { - s.AttributeValues = v - return s -} - -// Contains the results of a successful call to the DescribeDBSnapshotAttributes -// API action. -// -// Manual DB snapshot attributes are used to authorize other AWS accounts to -// copy or restore a manual DB snapshot. For more information, see the ModifyDBSnapshotAttribute -// API action. -type DBSnapshotAttributesResult struct { - _ struct{} `type:"structure"` - - // The list of attributes and values for the manual DB snapshot. - DBSnapshotAttributes []*DBSnapshotAttribute `locationNameList:"DBSnapshotAttribute" type:"list"` - - // The identifier of the manual DB snapshot that the attributes apply to. - DBSnapshotIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s DBSnapshotAttributesResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBSnapshotAttributesResult) GoString() string { - return s.String() -} - -// SetDBSnapshotAttributes sets the DBSnapshotAttributes field's value. -func (s *DBSnapshotAttributesResult) SetDBSnapshotAttributes(v []*DBSnapshotAttribute) *DBSnapshotAttributesResult { - s.DBSnapshotAttributes = v - return s -} - -// SetDBSnapshotIdentifier sets the DBSnapshotIdentifier field's value. -func (s *DBSnapshotAttributesResult) SetDBSnapshotIdentifier(v string) *DBSnapshotAttributesResult { - s.DBSnapshotIdentifier = &v - return s -} - -// Contains the details of an Amazon RDS DB subnet group. -// -// This data type is used as a response element in the DescribeDBSubnetGroups -// action. -type DBSubnetGroup struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the DB subnet group. - DBSubnetGroupArn *string `type:"string"` - - // Provides the description of the DB subnet group. - DBSubnetGroupDescription *string `type:"string"` - - // The name of the DB subnet group. - DBSubnetGroupName *string `type:"string"` - - // Provides the status of the DB subnet group. - SubnetGroupStatus *string `type:"string"` - - // Contains a list of Subnet elements. - Subnets []*Subnet `locationNameList:"Subnet" type:"list"` - - // Provides the VpcId of the DB subnet group. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s DBSubnetGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DBSubnetGroup) GoString() string { - return s.String() -} - -// SetDBSubnetGroupArn sets the DBSubnetGroupArn field's value. -func (s *DBSubnetGroup) SetDBSubnetGroupArn(v string) *DBSubnetGroup { - s.DBSubnetGroupArn = &v - return s -} - -// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. -func (s *DBSubnetGroup) SetDBSubnetGroupDescription(v string) *DBSubnetGroup { - s.DBSubnetGroupDescription = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *DBSubnetGroup) SetDBSubnetGroupName(v string) *DBSubnetGroup { - s.DBSubnetGroupName = &v - return s -} - -// SetSubnetGroupStatus sets the SubnetGroupStatus field's value. -func (s *DBSubnetGroup) SetSubnetGroupStatus(v string) *DBSubnetGroup { - s.SubnetGroupStatus = &v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *DBSubnetGroup) SetSubnets(v []*Subnet) *DBSubnetGroup { - s.Subnets = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DBSubnetGroup) SetVpcId(v string) *DBSubnetGroup { - s.VpcId = &v - return s -} - -type DeleteDBClusterEndpointInput struct { - _ struct{} `type:"structure"` - - // The identifier associated with the custom endpoint. This parameter is stored - // as a lowercase string. - // - // DBClusterEndpointIdentifier is a required field - DBClusterEndpointIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBClusterEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBClusterEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterEndpointInput"} - if s.DBClusterEndpointIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterEndpointIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. -func (s *DeleteDBClusterEndpointInput) SetDBClusterEndpointIdentifier(v string) *DeleteDBClusterEndpointInput { - s.DBClusterEndpointIdentifier = &v - return s -} - -// This data type represents the information you need to connect to an Amazon -// Aurora DB cluster. This data type is used as a response element in the following -// actions: -// -// * CreateDBClusterEndpoint -// -// * DescribeDBClusterEndpoints -// -// * ModifyDBClusterEndpoint -// -// * DeleteDBClusterEndpoint -// -// For the data structure that represents Amazon RDS DB instance endpoints, -// see Endpoint. -type DeleteDBClusterEndpointOutput struct { - _ struct{} `type:"structure"` - - // The type associated with a custom endpoint. One of: READER, ANY. - CustomEndpointType *string `type:"string"` - - // The Amazon Resource Name (ARN) for the endpoint. - DBClusterEndpointArn *string `type:"string"` - - // The identifier associated with the endpoint. This parameter is stored as - // a lowercase string. - DBClusterEndpointIdentifier *string `type:"string"` - - // A unique system-generated identifier for an endpoint. It remains the same - // for the whole life of the endpoint. - DBClusterEndpointResourceIdentifier *string `type:"string"` - - // The DB cluster identifier of the DB cluster associated with the endpoint. - // This parameter is stored as a lowercase string. - DBClusterIdentifier *string `type:"string"` - - // The DNS address of the endpoint. - Endpoint *string `type:"string"` - - // The type of the endpoint. One of: READER, WRITER, CUSTOM. - EndpointType *string `type:"string"` - - // List of DB instance identifiers that aren't part of the custom endpoint group. - // All other eligible instances are reachable through the custom endpoint. Only - // relevant if the list of static members is empty. - ExcludedMembers []*string `type:"list"` - - // List of DB instance identifiers that are part of the custom endpoint group. - StaticMembers []*string `type:"list"` - - // The current status of the endpoint. One of: creating, available, deleting, - // modifying. - Status *string `type:"string"` -} - -// String returns the string representation -func (s DeleteDBClusterEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterEndpointOutput) GoString() string { - return s.String() -} - -// SetCustomEndpointType sets the CustomEndpointType field's value. -func (s *DeleteDBClusterEndpointOutput) SetCustomEndpointType(v string) *DeleteDBClusterEndpointOutput { - s.CustomEndpointType = &v - return s -} - -// SetDBClusterEndpointArn sets the DBClusterEndpointArn field's value. -func (s *DeleteDBClusterEndpointOutput) SetDBClusterEndpointArn(v string) *DeleteDBClusterEndpointOutput { - s.DBClusterEndpointArn = &v - return s -} - -// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. -func (s *DeleteDBClusterEndpointOutput) SetDBClusterEndpointIdentifier(v string) *DeleteDBClusterEndpointOutput { - s.DBClusterEndpointIdentifier = &v - return s -} - -// SetDBClusterEndpointResourceIdentifier sets the DBClusterEndpointResourceIdentifier field's value. -func (s *DeleteDBClusterEndpointOutput) SetDBClusterEndpointResourceIdentifier(v string) *DeleteDBClusterEndpointOutput { - s.DBClusterEndpointResourceIdentifier = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DeleteDBClusterEndpointOutput) SetDBClusterIdentifier(v string) *DeleteDBClusterEndpointOutput { - s.DBClusterIdentifier = &v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *DeleteDBClusterEndpointOutput) SetEndpoint(v string) *DeleteDBClusterEndpointOutput { - s.Endpoint = &v - return s -} - -// SetEndpointType sets the EndpointType field's value. -func (s *DeleteDBClusterEndpointOutput) SetEndpointType(v string) *DeleteDBClusterEndpointOutput { - s.EndpointType = &v - return s -} - -// SetExcludedMembers sets the ExcludedMembers field's value. -func (s *DeleteDBClusterEndpointOutput) SetExcludedMembers(v []*string) *DeleteDBClusterEndpointOutput { - s.ExcludedMembers = v - return s -} - -// SetStaticMembers sets the StaticMembers field's value. -func (s *DeleteDBClusterEndpointOutput) SetStaticMembers(v []*string) *DeleteDBClusterEndpointOutput { - s.StaticMembers = v - return s -} - -// SetStatus sets the Status field's value. -func (s *DeleteDBClusterEndpointOutput) SetStatus(v string) *DeleteDBClusterEndpointOutput { - s.Status = &v - return s -} - -type DeleteDBClusterInput struct { - _ struct{} `type:"structure"` - - // The DB cluster identifier for the DB cluster to be deleted. This parameter - // isn't case-sensitive. - // - // Constraints: - // - // * Must match an existing DBClusterIdentifier. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The DB cluster snapshot identifier of the new DB cluster snapshot created - // when SkipFinalSnapshot is set to false. - // - // Specifying this parameter and also setting the SkipFinalShapshot parameter - // to true results in an error. - // - // Constraints: - // - // * Must be 1 to 255 letters, numbers, or hyphens. - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - FinalDBSnapshotIdentifier *string `type:"string"` - - // Determines whether a final DB cluster snapshot is created before the DB cluster - // is deleted. If true is specified, no DB cluster snapshot is created. If false - // is specified, a DB cluster snapshot is created before the DB cluster is deleted. - // - // You must specify a FinalDBSnapshotIdentifier parameter if SkipFinalSnapshot - // is false. - // - // Default: false - SkipFinalSnapshot *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeleteDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DeleteDBClusterInput) SetDBClusterIdentifier(v string) *DeleteDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetFinalDBSnapshotIdentifier sets the FinalDBSnapshotIdentifier field's value. -func (s *DeleteDBClusterInput) SetFinalDBSnapshotIdentifier(v string) *DeleteDBClusterInput { - s.FinalDBSnapshotIdentifier = &v - return s -} - -// SetSkipFinalSnapshot sets the SkipFinalSnapshot field's value. -func (s *DeleteDBClusterInput) SetSkipFinalSnapshot(v bool) *DeleteDBClusterInput { - s.SkipFinalSnapshot = &v - return s -} - -type DeleteDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Aurora DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, - // and StartDBCluster actions. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *DeleteDBClusterOutput) SetDBCluster(v *DBCluster) *DeleteDBClusterOutput { - s.DBCluster = v - return s -} - -type DeleteDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group. - // - // Constraints: - // - // * Must be the name of an existing DB cluster parameter group. - // - // * You can't delete a default DB cluster parameter group. - // - // * Can't be associated with any DB clusters. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterParameterGroupInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *DeleteDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *DeleteDBClusterParameterGroupInput { - s.DBClusterParameterGroupName = &v - return s -} - -type DeleteDBClusterParameterGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBClusterParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterParameterGroupOutput) GoString() string { - return s.String() -} - -type DeleteDBClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // The identifier of the DB cluster snapshot to delete. - // - // Constraints: Must be the name of an existing DB cluster snapshot in the available - // state. - // - // DBClusterSnapshotIdentifier is a required field - DBClusterSnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterSnapshotInput"} - if s.DBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DeleteDBClusterSnapshotInput) SetDBClusterSnapshotIdentifier(v string) *DeleteDBClusterSnapshotInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -type DeleteDBClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Contains the details for an Amazon RDS DB cluster snapshot - // - // This data type is used as a response element in the DescribeDBClusterSnapshots - // action. - DBClusterSnapshot *DBClusterSnapshot `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. -func (s *DeleteDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *DeleteDBClusterSnapshotOutput { - s.DBClusterSnapshot = v - return s -} - -// Parameter input for the DeleteDBInstanceAutomatedBackup operation. -type DeleteDBInstanceAutomatedBackupInput struct { - _ struct{} `type:"structure"` - - // The identifier for the source DB instance, which can't be changed and which - // is unique to an AWS Region. - // - // DbiResourceId is a required field - DbiResourceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBInstanceAutomatedBackupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBInstanceAutomatedBackupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBInstanceAutomatedBackupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBInstanceAutomatedBackupInput"} - if s.DbiResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("DbiResourceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDbiResourceId sets the DbiResourceId field's value. -func (s *DeleteDBInstanceAutomatedBackupInput) SetDbiResourceId(v string) *DeleteDBInstanceAutomatedBackupInput { - s.DbiResourceId = &v - return s -} - -type DeleteDBInstanceAutomatedBackupOutput struct { - _ struct{} `type:"structure"` - - // An automated backup of a DB instance. It it consists of system backups, transaction - // logs, and the database instance properties that existed at the time you deleted - // the source instance. - DBInstanceAutomatedBackup *DBInstanceAutomatedBackup `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBInstanceAutomatedBackupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBInstanceAutomatedBackupOutput) GoString() string { - return s.String() -} - -// SetDBInstanceAutomatedBackup sets the DBInstanceAutomatedBackup field's value. -func (s *DeleteDBInstanceAutomatedBackupOutput) SetDBInstanceAutomatedBackup(v *DBInstanceAutomatedBackup) *DeleteDBInstanceAutomatedBackupOutput { - s.DBInstanceAutomatedBackup = v - return s -} - -type DeleteDBInstanceInput struct { - _ struct{} `type:"structure"` - - // The DB instance identifier for the DB instance to be deleted. This parameter - // isn't case-sensitive. - // - // Constraints: - // - // * Must match the name of an existing DB instance. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // A value that indicates whether to remove automated backups immediately after - // the DB instance is deleted. This parameter isn't case-sensitive. This parameter - // defaults to true. - DeleteAutomatedBackups *bool `type:"boolean"` - - // The DBSnapshotIdentifier of the new DB snapshot created when SkipFinalSnapshot - // is set to false. - // - // Specifying this parameter and also setting the SkipFinalShapshot parameter - // to true results in an error. - // - // Constraints: - // - // * Must be 1 to 255 letters or numbers. - // - // * First character must be a letter. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - // - // * Can't be specified when deleting a Read Replica. - FinalDBSnapshotIdentifier *string `type:"string"` - - // A value that indicates whether a final DB snapshot is created before the - // DB instance is deleted. If true is specified, no DB snapshot is created. - // If false is specified, a DB snapshot is created before the DB instance is - // deleted. - // - // When a DB instance is in a failure state and has a status of failed, incompatible-restore, - // or incompatible-network, you can only delete it when the SkipFinalSnapshot - // parameter is set to true. - // - // Specify true when deleting a Read Replica. - // - // The FinalDBSnapshotIdentifier parameter must be specified if SkipFinalSnapshot - // is false. - // - // Default: false - SkipFinalSnapshot *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeleteDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBInstanceInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DeleteDBInstanceInput) SetDBInstanceIdentifier(v string) *DeleteDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetDeleteAutomatedBackups sets the DeleteAutomatedBackups field's value. -func (s *DeleteDBInstanceInput) SetDeleteAutomatedBackups(v bool) *DeleteDBInstanceInput { - s.DeleteAutomatedBackups = &v - return s -} - -// SetFinalDBSnapshotIdentifier sets the FinalDBSnapshotIdentifier field's value. -func (s *DeleteDBInstanceInput) SetFinalDBSnapshotIdentifier(v string) *DeleteDBInstanceInput { - s.FinalDBSnapshotIdentifier = &v - return s -} - -// SetSkipFinalSnapshot sets the SkipFinalSnapshot field's value. -func (s *DeleteDBInstanceInput) SetSkipFinalSnapshot(v bool) *DeleteDBInstanceInput { - s.SkipFinalSnapshot = &v - return s -} - -type DeleteDBInstanceOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBInstanceOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *DeleteDBInstanceOutput) SetDBInstance(v *DBInstance) *DeleteDBInstanceOutput { - s.DBInstance = v - return s -} - -type DeleteDBParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB parameter group. - // - // Constraints: - // - // * Must be the name of an existing DB parameter group - // - // * You can't delete a default DB parameter group - // - // * Can't be associated with any DB instances - // - // DBParameterGroupName is a required field - DBParameterGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBParameterGroupInput"} - if s.DBParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *DeleteDBParameterGroupInput) SetDBParameterGroupName(v string) *DeleteDBParameterGroupInput { - s.DBParameterGroupName = &v - return s -} - -type DeleteDBParameterGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBParameterGroupOutput) GoString() string { - return s.String() -} - -type DeleteDBSecurityGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB security group to delete. - // - // You can't delete the default DB security group. - // - // Constraints: - // - // * Must be 1 to 255 letters, numbers, or hyphens. - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // * Must not be "Default" - // - // DBSecurityGroupName is a required field - DBSecurityGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBSecurityGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBSecurityGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBSecurityGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBSecurityGroupInput"} - if s.DBSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBSecurityGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSecurityGroupName sets the DBSecurityGroupName field's value. -func (s *DeleteDBSecurityGroupInput) SetDBSecurityGroupName(v string) *DeleteDBSecurityGroupInput { - s.DBSecurityGroupName = &v - return s -} - -type DeleteDBSecurityGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBSecurityGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBSecurityGroupOutput) GoString() string { - return s.String() -} - -type DeleteDBSnapshotInput struct { - _ struct{} `type:"structure"` - - // The DB snapshot identifier. - // - // Constraints: Must be the name of an existing DB snapshot in the available - // state. - // - // DBSnapshotIdentifier is a required field - DBSnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBSnapshotInput"} - if s.DBSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSnapshotIdentifier sets the DBSnapshotIdentifier field's value. -func (s *DeleteDBSnapshotInput) SetDBSnapshotIdentifier(v string) *DeleteDBSnapshotInput { - s.DBSnapshotIdentifier = &v - return s -} - -type DeleteDBSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB snapshot. - // - // This data type is used as a response element in the DescribeDBSnapshots action. - DBSnapshot *DBSnapshot `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBSnapshot sets the DBSnapshot field's value. -func (s *DeleteDBSnapshotOutput) SetDBSnapshot(v *DBSnapshot) *DeleteDBSnapshotOutput { - s.DBSnapshot = v - return s -} - -type DeleteDBSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the database subnet group to delete. - // - // You can't delete the default subnet group. - // - // Constraints: - // - // Constraints: Must match the name of an existing DBSubnetGroup. Must not be - // default. - // - // Example: mySubnetgroup - // - // DBSubnetGroupName is a required field - DBSubnetGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDBSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDBSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDBSubnetGroupInput"} - if s.DBSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *DeleteDBSubnetGroupInput) SetDBSubnetGroupName(v string) *DeleteDBSubnetGroupInput { - s.DBSubnetGroupName = &v - return s -} - -type DeleteDBSubnetGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDBSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDBSubnetGroupOutput) GoString() string { - return s.String() -} - -type DeleteEventSubscriptionInput struct { - _ struct{} `type:"structure"` - - // The name of the RDS event notification subscription you want to delete. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEventSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEventSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEventSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEventSubscriptionInput"} - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *DeleteEventSubscriptionInput) SetSubscriptionName(v string) *DeleteEventSubscriptionInput { - s.SubscriptionName = &v - return s -} - -type DeleteEventSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful invocation of the DescribeEventSubscriptions - // action. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s DeleteEventSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEventSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *DeleteEventSubscriptionOutput) SetEventSubscription(v *EventSubscription) *DeleteEventSubscriptionOutput { - s.EventSubscription = v - return s -} - -type DeleteGlobalClusterInput struct { - _ struct{} `type:"structure"` - - // The cluster identifier of the global database cluster being deleted. - // - // GlobalClusterIdentifier is a required field - GlobalClusterIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteGlobalClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGlobalClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteGlobalClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteGlobalClusterInput"} - if s.GlobalClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("GlobalClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGlobalClusterIdentifier sets the GlobalClusterIdentifier field's value. -func (s *DeleteGlobalClusterInput) SetGlobalClusterIdentifier(v string) *DeleteGlobalClusterInput { - s.GlobalClusterIdentifier = &v - return s -} - -type DeleteGlobalClusterOutput struct { - _ struct{} `type:"structure"` - - // A data type representing an Aurora global database. - GlobalCluster *GlobalCluster `type:"structure"` -} - -// String returns the string representation -func (s DeleteGlobalClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGlobalClusterOutput) GoString() string { - return s.String() -} - -// SetGlobalCluster sets the GlobalCluster field's value. -func (s *DeleteGlobalClusterOutput) SetGlobalCluster(v *GlobalCluster) *DeleteGlobalClusterOutput { - s.GlobalCluster = v - return s -} - -type DeleteOptionGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the option group to be deleted. - // - // You can't delete default option groups. - // - // OptionGroupName is a required field - OptionGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteOptionGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteOptionGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteOptionGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteOptionGroupInput"} - if s.OptionGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("OptionGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *DeleteOptionGroupInput) SetOptionGroupName(v string) *DeleteOptionGroupInput { - s.OptionGroupName = &v - return s -} - -type DeleteOptionGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteOptionGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteOptionGroupOutput) GoString() string { - return s.String() -} - -type DescribeAccountAttributesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeAccountAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountAttributesInput) GoString() string { - return s.String() -} - -// Data returned by the DescribeAccountAttributes action. -type DescribeAccountAttributesOutput struct { - _ struct{} `type:"structure"` - - // A list of AccountQuota objects. Within this list, each quota has a name, - // a count of usage toward the quota maximum, and a maximum value for the quota. - AccountQuotas []*AccountQuota `locationNameList:"AccountQuota" type:"list"` -} - -// String returns the string representation -func (s DescribeAccountAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountAttributesOutput) GoString() string { - return s.String() -} - -// SetAccountQuotas sets the AccountQuotas field's value. -func (s *DescribeAccountAttributesOutput) SetAccountQuotas(v []*AccountQuota) *DescribeAccountAttributesOutput { - s.AccountQuotas = v - return s -} - -type DescribeCertificatesInput struct { - _ struct{} `type:"structure"` - - // The user-supplied certificate identifier. If this parameter is specified, - // information for only the identified certificate is returned. This parameter - // isn't case-sensitive. - // - // Constraints: - // - // * Must match an existing CertificateIdentifier. - CertificateIdentifier *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeCertificates - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCertificatesInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateIdentifier sets the CertificateIdentifier field's value. -func (s *DescribeCertificatesInput) SetCertificateIdentifier(v string) *DescribeCertificatesInput { - s.CertificateIdentifier = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeCertificatesInput) SetFilters(v []*Filter) *DescribeCertificatesInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCertificatesInput) SetMarker(v string) *DescribeCertificatesInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeCertificatesInput) SetMaxRecords(v int64) *DescribeCertificatesInput { - s.MaxRecords = &v - return s -} - -// Data returned by the DescribeCertificates action. -type DescribeCertificatesOutput struct { - _ struct{} `type:"structure"` - - // The list of Certificate objects for the AWS account. - Certificates []*Certificate `locationNameList:"Certificate" type:"list"` - - // An optional pagination token provided by a previous DescribeCertificates - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords . - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCertificatesOutput) GoString() string { - return s.String() -} - -// SetCertificates sets the Certificates field's value. -func (s *DescribeCertificatesOutput) SetCertificates(v []*Certificate) *DescribeCertificatesOutput { - s.Certificates = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCertificatesOutput) SetMarker(v string) *DescribeCertificatesOutput { - s.Marker = &v - return s -} - -type DescribeDBClusterBacktracksInput struct { - _ struct{} `type:"structure"` - - // If specified, this value is the backtrack identifier of the backtrack to - // be described. - // - // Constraints: - // - // * Must contain a valid universally unique identifier (UUID). For more - // information about UUIDs, see A Universally Unique Identifier (UUID) URN - // Namespace (http://www.ietf.org/rfc/rfc4122.txt). - // - // Example: 123e4567-e89b-12d3-a456-426655440000 - BacktrackIdentifier *string `type:"string"` - - // The DB cluster identifier of the DB cluster to be described. This parameter - // is stored as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster1 - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // A filter that specifies one or more DB clusters to describe. Supported filters - // include the following: - // - // * db-cluster-backtrack-id - Accepts backtrack identifiers. The results - // list includes information about only the backtracks identified by these - // identifiers. - // - // * db-cluster-backtrack-status - Accepts any of the following backtrack - // status values: - // - // applying - // - // completed - // - // failed - // - // pending - // - // The results list includes information about only the backtracks identified - // by these values. For more information about backtrack status values, see - // DBClusterBacktrack. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBClusterBacktracks - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBClusterBacktracksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterBacktracksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClusterBacktracksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterBacktracksInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBacktrackIdentifier sets the BacktrackIdentifier field's value. -func (s *DescribeDBClusterBacktracksInput) SetBacktrackIdentifier(v string) *DescribeDBClusterBacktracksInput { - s.BacktrackIdentifier = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DescribeDBClusterBacktracksInput) SetDBClusterIdentifier(v string) *DescribeDBClusterBacktracksInput { - s.DBClusterIdentifier = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBClusterBacktracksInput) SetFilters(v []*Filter) *DescribeDBClusterBacktracksInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterBacktracksInput) SetMarker(v string) *DescribeDBClusterBacktracksInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBClusterBacktracksInput) SetMaxRecords(v int64) *DescribeDBClusterBacktracksInput { - s.MaxRecords = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBClusterBacktracks -// action. -type DescribeDBClusterBacktracksOutput struct { - _ struct{} `type:"structure"` - - // Contains a list of backtracks for the user. - DBClusterBacktracks []*BacktrackDBClusterOutput `locationNameList:"DBClusterBacktrack" type:"list"` - - // A pagination token that can be used in a subsequent DescribeDBClusterBacktracks - // request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClusterBacktracksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterBacktracksOutput) GoString() string { - return s.String() -} - -// SetDBClusterBacktracks sets the DBClusterBacktracks field's value. -func (s *DescribeDBClusterBacktracksOutput) SetDBClusterBacktracks(v []*BacktrackDBClusterOutput) *DescribeDBClusterBacktracksOutput { - s.DBClusterBacktracks = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterBacktracksOutput) SetMarker(v string) *DescribeDBClusterBacktracksOutput { - s.Marker = &v - return s -} - -type DescribeDBClusterEndpointsInput struct { - _ struct{} `type:"structure"` - - // The identifier of the endpoint to describe. This parameter is stored as a - // lowercase string. - DBClusterEndpointIdentifier *string `type:"string"` - - // The DB cluster identifier of the DB cluster associated with the endpoint. - // This parameter is stored as a lowercase string. - DBClusterIdentifier *string `type:"string"` - - // A set of name-value pairs that define which endpoints to include in the output. - // The filters are specified as name-value pairs, in the format Name=endpoint_type,Values=endpoint_type1,endpoint_type2,.... - // Name can be one of: db-cluster-endpoint-type, db-cluster-endpoint-custom-type, - // db-cluster-endpoint-id, db-cluster-endpoint-status. Values for the db-cluster-endpoint-type - // filter can be one or more of: reader, writer, custom. Values for the db-cluster-endpoint-custom-type - // filter can be one or more of: reader, any. Values for the db-cluster-endpoint-status - // filter can be one or more of: available, creating, deleting, modifying. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBClusterEndpoints - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBClusterEndpointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterEndpointsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClusterEndpointsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterEndpointsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. -func (s *DescribeDBClusterEndpointsInput) SetDBClusterEndpointIdentifier(v string) *DescribeDBClusterEndpointsInput { - s.DBClusterEndpointIdentifier = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DescribeDBClusterEndpointsInput) SetDBClusterIdentifier(v string) *DescribeDBClusterEndpointsInput { - s.DBClusterIdentifier = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBClusterEndpointsInput) SetFilters(v []*Filter) *DescribeDBClusterEndpointsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterEndpointsInput) SetMarker(v string) *DescribeDBClusterEndpointsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBClusterEndpointsInput) SetMaxRecords(v int64) *DescribeDBClusterEndpointsInput { - s.MaxRecords = &v - return s -} - -type DescribeDBClusterEndpointsOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of the endpoints associated with the cluster and matching - // any filter conditions. - DBClusterEndpoints []*DBClusterEndpoint `locationNameList:"DBClusterEndpointList" type:"list"` - - // An optional pagination token provided by a previous DescribeDBClusterEndpoints - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClusterEndpointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterEndpointsOutput) GoString() string { - return s.String() -} - -// SetDBClusterEndpoints sets the DBClusterEndpoints field's value. -func (s *DescribeDBClusterEndpointsOutput) SetDBClusterEndpoints(v []*DBClusterEndpoint) *DescribeDBClusterEndpointsOutput { - s.DBClusterEndpoints = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterEndpointsOutput) SetMarker(v string) *DescribeDBClusterEndpointsOutput { - s.Marker = &v - return s -} - -type DescribeDBClusterParameterGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of a specific DB cluster parameter group to return details for. - // - // Constraints: - // - // * If supplied, must match the name of an existing DBClusterParameterGroup. - DBClusterParameterGroupName *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBClusterParameterGroups - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBClusterParameterGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterParameterGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClusterParameterGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterParameterGroupsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *DescribeDBClusterParameterGroupsInput) SetDBClusterParameterGroupName(v string) *DescribeDBClusterParameterGroupsInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBClusterParameterGroupsInput) SetFilters(v []*Filter) *DescribeDBClusterParameterGroupsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterParameterGroupsInput) SetMarker(v string) *DescribeDBClusterParameterGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBClusterParameterGroupsInput) SetMaxRecords(v int64) *DescribeDBClusterParameterGroupsInput { - s.MaxRecords = &v - return s -} - -type DescribeDBClusterParameterGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of DB cluster parameter groups. - DBClusterParameterGroups []*DBClusterParameterGroup `locationNameList:"DBClusterParameterGroup" type:"list"` - - // An optional pagination token provided by a previous DescribeDBClusterParameterGroups - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClusterParameterGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterParameterGroupsOutput) GoString() string { - return s.String() -} - -// SetDBClusterParameterGroups sets the DBClusterParameterGroups field's value. -func (s *DescribeDBClusterParameterGroupsOutput) SetDBClusterParameterGroups(v []*DBClusterParameterGroup) *DescribeDBClusterParameterGroupsOutput { - s.DBClusterParameterGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterParameterGroupsOutput) SetMarker(v string) *DescribeDBClusterParameterGroupsOutput { - s.Marker = &v - return s -} - -type DescribeDBClusterParametersInput struct { - _ struct{} `type:"structure"` - - // The name of a specific DB cluster parameter group to return parameter details - // for. - // - // Constraints: - // - // * If supplied, must match the name of an existing DBClusterParameterGroup. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBClusterParameters - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // A value that indicates to return only parameters for a specific source. Parameter - // sources can be engine, service, or customer. - Source *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClusterParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClusterParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterParametersInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *DescribeDBClusterParametersInput) SetDBClusterParameterGroupName(v string) *DescribeDBClusterParametersInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBClusterParametersInput) SetFilters(v []*Filter) *DescribeDBClusterParametersInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterParametersInput) SetMarker(v string) *DescribeDBClusterParametersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBClusterParametersInput) SetMaxRecords(v int64) *DescribeDBClusterParametersInput { - s.MaxRecords = &v - return s -} - -// SetSource sets the Source field's value. -func (s *DescribeDBClusterParametersInput) SetSource(v string) *DescribeDBClusterParametersInput { - s.Source = &v - return s -} - -// Provides details about a DB cluster parameter group including the parameters -// in the DB cluster parameter group. -type DescribeDBClusterParametersOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous DescribeDBClusterParameters - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords . - Marker *string `type:"string"` - - // Provides a list of parameters for the DB cluster parameter group. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` -} - -// String returns the string representation -func (s DescribeDBClusterParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterParametersOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterParametersOutput) SetMarker(v string) *DescribeDBClusterParametersOutput { - s.Marker = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DescribeDBClusterParametersOutput) SetParameters(v []*Parameter) *DescribeDBClusterParametersOutput { - s.Parameters = v - return s -} - -type DescribeDBClusterSnapshotAttributesInput struct { - _ struct{} `type:"structure"` - - // The identifier for the DB cluster snapshot to describe the attributes for. - // - // DBClusterSnapshotIdentifier is a required field - DBClusterSnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeDBClusterSnapshotAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterSnapshotAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClusterSnapshotAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterSnapshotAttributesInput"} - if s.DBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DescribeDBClusterSnapshotAttributesInput) SetDBClusterSnapshotIdentifier(v string) *DescribeDBClusterSnapshotAttributesInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -type DescribeDBClusterSnapshotAttributesOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful call to the DescribeDBClusterSnapshotAttributes - // API action. - // - // Manual DB cluster snapshot attributes are used to authorize other AWS accounts - // to copy or restore a manual DB cluster snapshot. For more information, see - // the ModifyDBClusterSnapshotAttribute API action. - DBClusterSnapshotAttributesResult *DBClusterSnapshotAttributesResult `type:"structure"` -} - -// String returns the string representation -func (s DescribeDBClusterSnapshotAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterSnapshotAttributesOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshotAttributesResult sets the DBClusterSnapshotAttributesResult field's value. -func (s *DescribeDBClusterSnapshotAttributesOutput) SetDBClusterSnapshotAttributesResult(v *DBClusterSnapshotAttributesResult) *DescribeDBClusterSnapshotAttributesOutput { - s.DBClusterSnapshotAttributesResult = v - return s -} - -type DescribeDBClusterSnapshotsInput struct { - _ struct{} `type:"structure"` - - // The ID of the DB cluster to retrieve the list of DB cluster snapshots for. - // This parameter can't be used in conjunction with the DBClusterSnapshotIdentifier - // parameter. This parameter is not case-sensitive. - // - // Constraints: - // - // * If supplied, must match the identifier of an existing DBCluster. - DBClusterIdentifier *string `type:"string"` - - // A specific DB cluster snapshot identifier to describe. This parameter can't - // be used in conjunction with the DBClusterIdentifier parameter. This value - // is stored as a lowercase string. - // - // Constraints: - // - // * If supplied, must match the identifier of an existing DBClusterSnapshot. - // - // * If this identifier is for an automated snapshot, the SnapshotType parameter - // must also be specified. - DBClusterSnapshotIdentifier *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // True to include manual DB cluster snapshots that are public and can be copied - // or restored by any AWS account, and otherwise false. The default is false. - // The default is false. - // - // You can share a manual DB cluster snapshot as public by using the ModifyDBClusterSnapshotAttribute - // API action. - IncludePublic *bool `type:"boolean"` - - // True to include shared manual DB cluster snapshots from other AWS accounts - // that this AWS account has been given permission to copy or restore, and otherwise - // false. The default is false. - // - // You can give an AWS account permission to restore a manual DB cluster snapshot - // from another AWS account by the ModifyDBClusterSnapshotAttribute API action. - IncludeShared *bool `type:"boolean"` - - // An optional pagination token provided by a previous DescribeDBClusterSnapshots - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The type of DB cluster snapshots to be returned. You can specify one of the - // following values: - // - // * automated - Return all DB cluster snapshots that have been automatically - // taken by Amazon RDS for my AWS account. - // - // * manual - Return all DB cluster snapshots that have been taken by my - // AWS account. - // - // * shared - Return all manual DB cluster snapshots that have been shared - // to my AWS account. - // - // * public - Return all DB cluster snapshots that have been marked as public. - // - // If you don't specify a SnapshotType value, then both automated and manual - // DB cluster snapshots are returned. You can include shared DB cluster snapshots - // with these results by setting the IncludeShared parameter to true. You can - // include public DB cluster snapshots with these results by setting the IncludePublic - // parameter to true. - // - // The IncludeShared and IncludePublic parameters don't apply for SnapshotType - // values of manual or automated. The IncludePublic parameter doesn't apply - // when SnapshotType is set to shared. The IncludeShared parameter doesn't apply - // when SnapshotType is set to public. - SnapshotType *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClusterSnapshotsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterSnapshotsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClusterSnapshotsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterSnapshotsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DescribeDBClusterSnapshotsInput) SetDBClusterIdentifier(v string) *DescribeDBClusterSnapshotsInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *DescribeDBClusterSnapshotsInput) SetDBClusterSnapshotIdentifier(v string) *DescribeDBClusterSnapshotsInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBClusterSnapshotsInput) SetFilters(v []*Filter) *DescribeDBClusterSnapshotsInput { - s.Filters = v - return s -} - -// SetIncludePublic sets the IncludePublic field's value. -func (s *DescribeDBClusterSnapshotsInput) SetIncludePublic(v bool) *DescribeDBClusterSnapshotsInput { - s.IncludePublic = &v - return s -} - -// SetIncludeShared sets the IncludeShared field's value. -func (s *DescribeDBClusterSnapshotsInput) SetIncludeShared(v bool) *DescribeDBClusterSnapshotsInput { - s.IncludeShared = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterSnapshotsInput) SetMarker(v string) *DescribeDBClusterSnapshotsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBClusterSnapshotsInput) SetMaxRecords(v int64) *DescribeDBClusterSnapshotsInput { - s.MaxRecords = &v - return s -} - -// SetSnapshotType sets the SnapshotType field's value. -func (s *DescribeDBClusterSnapshotsInput) SetSnapshotType(v string) *DescribeDBClusterSnapshotsInput { - s.SnapshotType = &v - return s -} - -// Provides a list of DB cluster snapshots for the user as the result of a call -// to the DescribeDBClusterSnapshots action. -type DescribeDBClusterSnapshotsOutput struct { - _ struct{} `type:"structure"` - - // Provides a list of DB cluster snapshots for the user. - DBClusterSnapshots []*DBClusterSnapshot `locationNameList:"DBClusterSnapshot" type:"list"` - - // An optional pagination token provided by a previous DescribeDBClusterSnapshots - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClusterSnapshotsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClusterSnapshotsOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshots sets the DBClusterSnapshots field's value. -func (s *DescribeDBClusterSnapshotsOutput) SetDBClusterSnapshots(v []*DBClusterSnapshot) *DescribeDBClusterSnapshotsOutput { - s.DBClusterSnapshots = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClusterSnapshotsOutput) SetMarker(v string) *DescribeDBClusterSnapshotsOutput { - s.Marker = &v - return s -} - -type DescribeDBClustersInput struct { - _ struct{} `type:"structure"` - - // The user-supplied DB cluster identifier. If this parameter is specified, - // information from only the specific DB cluster is returned. This parameter - // isn't case-sensitive. - // - // Constraints: - // - // * If supplied, must match an existing DBClusterIdentifier. - DBClusterIdentifier *string `type:"string"` - - // A filter that specifies one or more DB clusters to describe. - // - // Supported filters: - // - // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon - // Resource Names (ARNs). The results list will only include information - // about the DB clusters identified by these ARNs. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBClusters request. - // If this parameter is specified, the response includes only records beyond - // the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBClustersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClustersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBClustersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBClustersInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *DescribeDBClustersInput) SetDBClusterIdentifier(v string) *DescribeDBClustersInput { - s.DBClusterIdentifier = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBClustersInput) SetFilters(v []*Filter) *DescribeDBClustersInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClustersInput) SetMarker(v string) *DescribeDBClustersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBClustersInput) SetMaxRecords(v int64) *DescribeDBClustersInput { - s.MaxRecords = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBClusters -// action. -type DescribeDBClustersOutput struct { - _ struct{} `type:"structure"` - - // Contains a list of DB clusters for the user. - DBClusters []*DBCluster `locationNameList:"DBCluster" type:"list"` - - // A pagination token that can be used in a subsequent DescribeDBClusters request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBClustersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBClustersOutput) GoString() string { - return s.String() -} - -// SetDBClusters sets the DBClusters field's value. -func (s *DescribeDBClustersOutput) SetDBClusters(v []*DBCluster) *DescribeDBClustersOutput { - s.DBClusters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBClustersOutput) SetMarker(v string) *DescribeDBClustersOutput { - s.Marker = &v - return s -} - -type DescribeDBEngineVersionsInput struct { - _ struct{} `type:"structure"` - - // The name of a specific DB parameter group family to return details for. - // - // Constraints: - // - // * If supplied, must match an existing DBParameterGroupFamily. - DBParameterGroupFamily *string `type:"string"` - - // Indicates that only the default version of the specified engine or engine - // and major version combination is returned. - DefaultOnly *bool `type:"boolean"` - - // The database engine to return. - Engine *string `type:"string"` - - // The database engine version to return. - // - // Example: 5.1.49 - EngineVersion *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // If this parameter is specified and the requested engine supports the CharacterSetName - // parameter for CreateDBInstance, the response includes a list of supported - // character sets for each engine version. - ListSupportedCharacterSets *bool `type:"boolean"` - - // If this parameter is specified and the requested engine supports the TimeZone - // parameter for CreateDBInstance, the response includes a list of supported - // time zones for each engine version. - ListSupportedTimezones *bool `type:"boolean"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more than the - // MaxRecords value is available, a pagination token called a marker is included - // in the response so that the following results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBEngineVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBEngineVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBEngineVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBEngineVersionsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DescribeDBEngineVersionsInput) SetDBParameterGroupFamily(v string) *DescribeDBEngineVersionsInput { - s.DBParameterGroupFamily = &v - return s -} - -// SetDefaultOnly sets the DefaultOnly field's value. -func (s *DescribeDBEngineVersionsInput) SetDefaultOnly(v bool) *DescribeDBEngineVersionsInput { - s.DefaultOnly = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DescribeDBEngineVersionsInput) SetEngine(v string) *DescribeDBEngineVersionsInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DescribeDBEngineVersionsInput) SetEngineVersion(v string) *DescribeDBEngineVersionsInput { - s.EngineVersion = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBEngineVersionsInput) SetFilters(v []*Filter) *DescribeDBEngineVersionsInput { - s.Filters = v - return s -} - -// SetListSupportedCharacterSets sets the ListSupportedCharacterSets field's value. -func (s *DescribeDBEngineVersionsInput) SetListSupportedCharacterSets(v bool) *DescribeDBEngineVersionsInput { - s.ListSupportedCharacterSets = &v - return s -} - -// SetListSupportedTimezones sets the ListSupportedTimezones field's value. -func (s *DescribeDBEngineVersionsInput) SetListSupportedTimezones(v bool) *DescribeDBEngineVersionsInput { - s.ListSupportedTimezones = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBEngineVersionsInput) SetMarker(v string) *DescribeDBEngineVersionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBEngineVersionsInput) SetMaxRecords(v int64) *DescribeDBEngineVersionsInput { - s.MaxRecords = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBEngineVersions -// action. -type DescribeDBEngineVersionsOutput struct { - _ struct{} `type:"structure"` - - // A list of DBEngineVersion elements. - DBEngineVersions []*DBEngineVersion `locationNameList:"DBEngineVersion" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBEngineVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBEngineVersionsOutput) GoString() string { - return s.String() -} - -// SetDBEngineVersions sets the DBEngineVersions field's value. -func (s *DescribeDBEngineVersionsOutput) SetDBEngineVersions(v []*DBEngineVersion) *DescribeDBEngineVersionsOutput { - s.DBEngineVersions = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBEngineVersionsOutput) SetMarker(v string) *DescribeDBEngineVersionsOutput { - s.Marker = &v - return s -} - -// Parameter input for DescribeDBInstanceAutomatedBackups. -type DescribeDBInstanceAutomatedBackupsInput struct { - _ struct{} `type:"structure"` - - // (Optional) The user-supplied instance identifier. If this parameter is specified, - // it must match the identifier of an existing DB instance. It returns information - // from the specific DB instance' automated backup. This parameter isn't case-sensitive. - DBInstanceIdentifier *string `type:"string"` - - // The resource ID of the DB instance that is the source of the automated backup. - // This parameter isn't case-sensitive. - DbiResourceId *string `type:"string"` - - // A filter that specifies which resources to return based on status. - // - // Supported filters are the following: - // - // * status - // - // active - automated backups for current instances - // - // retained - automated backups for deleted instances - // - // creating - automated backups that are waiting for the first automated snapshot - // to be available - // - // * db-instance-id - Accepts DB instance identifiers and Amazon Resource - // Names (ARNs) for DB instances. The results list includes only information - // about the DB instance automated backupss identified by these ARNs. - // - // * dbi-resource-id - Accepts DB instance resource identifiers and DB Amazon - // Resource Names (ARNs) for DB instances. The results list includes only - // information about the DB instance resources identified by these ARNs. - // - // Returns all resources by default. The status for each resource is specified - // in the response. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // The pagination token provided in the previous request. If this parameter - // is specified the response includes only records beyond the marker, up to - // MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBInstanceAutomatedBackupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBInstanceAutomatedBackupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBInstanceAutomatedBackupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBInstanceAutomatedBackupsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DescribeDBInstanceAutomatedBackupsInput) SetDBInstanceIdentifier(v string) *DescribeDBInstanceAutomatedBackupsInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetDbiResourceId sets the DbiResourceId field's value. -func (s *DescribeDBInstanceAutomatedBackupsInput) SetDbiResourceId(v string) *DescribeDBInstanceAutomatedBackupsInput { - s.DbiResourceId = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBInstanceAutomatedBackupsInput) SetFilters(v []*Filter) *DescribeDBInstanceAutomatedBackupsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBInstanceAutomatedBackupsInput) SetMarker(v string) *DescribeDBInstanceAutomatedBackupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBInstanceAutomatedBackupsInput) SetMaxRecords(v int64) *DescribeDBInstanceAutomatedBackupsInput { - s.MaxRecords = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBInstanceAutomatedBackups -// action. -type DescribeDBInstanceAutomatedBackupsOutput struct { - _ struct{} `type:"structure"` - - // A list of DBInstanceAutomatedBackup instances. - DBInstanceAutomatedBackups []*DBInstanceAutomatedBackup `locationNameList:"DBInstanceAutomatedBackup" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords . - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBInstanceAutomatedBackupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBInstanceAutomatedBackupsOutput) GoString() string { - return s.String() -} - -// SetDBInstanceAutomatedBackups sets the DBInstanceAutomatedBackups field's value. -func (s *DescribeDBInstanceAutomatedBackupsOutput) SetDBInstanceAutomatedBackups(v []*DBInstanceAutomatedBackup) *DescribeDBInstanceAutomatedBackupsOutput { - s.DBInstanceAutomatedBackups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBInstanceAutomatedBackupsOutput) SetMarker(v string) *DescribeDBInstanceAutomatedBackupsOutput { - s.Marker = &v - return s -} - -type DescribeDBInstancesInput struct { - _ struct{} `type:"structure"` - - // The user-supplied instance identifier. If this parameter is specified, information - // from only the specific DB instance is returned. This parameter isn't case-sensitive. - // - // Constraints: - // - // * If supplied, must match the identifier of an existing DBInstance. - DBInstanceIdentifier *string `type:"string"` - - // A filter that specifies one or more DB instances to describe. - // - // Supported filters: - // - // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon - // Resource Names (ARNs). The results list will only include information - // about the DB instances associated with the DB clusters identified by these - // ARNs. - // - // * db-instance-id - Accepts DB instance identifiers and DB instance Amazon - // Resource Names (ARNs). The results list will only include information - // about the DB instances identified by these ARNs. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBInstances request. - // If this parameter is specified, the response includes only records beyond - // the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBInstancesInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DescribeDBInstancesInput) SetDBInstanceIdentifier(v string) *DescribeDBInstancesInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBInstancesInput) SetFilters(v []*Filter) *DescribeDBInstancesInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBInstancesInput) SetMarker(v string) *DescribeDBInstancesInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBInstancesInput) SetMaxRecords(v int64) *DescribeDBInstancesInput { - s.MaxRecords = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBInstances -// action. -type DescribeDBInstancesOutput struct { - _ struct{} `type:"structure"` - - // A list of DBInstance instances. - DBInstances []*DBInstance `locationNameList:"DBInstance" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords . - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBInstancesOutput) GoString() string { - return s.String() -} - -// SetDBInstances sets the DBInstances field's value. -func (s *DescribeDBInstancesOutput) SetDBInstances(v []*DBInstance) *DescribeDBInstancesOutput { - s.DBInstances = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBInstancesOutput) SetMarker(v string) *DescribeDBInstancesOutput { - s.Marker = &v - return s -} - -// This data type is used as a response element to DescribeDBLogFiles. -type DescribeDBLogFilesDetails struct { - _ struct{} `type:"structure"` - - // A POSIX timestamp when the last log entry was written. - LastWritten *int64 `type:"long"` - - // The name of the log file for the specified DB instance. - LogFileName *string `type:"string"` - - // The size, in bytes, of the log file for the specified DB instance. - Size *int64 `type:"long"` -} - -// String returns the string representation -func (s DescribeDBLogFilesDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBLogFilesDetails) GoString() string { - return s.String() -} - -// SetLastWritten sets the LastWritten field's value. -func (s *DescribeDBLogFilesDetails) SetLastWritten(v int64) *DescribeDBLogFilesDetails { - s.LastWritten = &v - return s -} - -// SetLogFileName sets the LogFileName field's value. -func (s *DescribeDBLogFilesDetails) SetLogFileName(v string) *DescribeDBLogFilesDetails { - s.LogFileName = &v - return s -} - -// SetSize sets the Size field's value. -func (s *DescribeDBLogFilesDetails) SetSize(v int64) *DescribeDBLogFilesDetails { - s.Size = &v - return s -} - -type DescribeDBLogFilesInput struct { - _ struct{} `type:"structure"` - - // The customer-assigned name of the DB instance that contains the log files - // you want to list. - // - // Constraints: - // - // * Must match the identifier of an existing DBInstance. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // Filters the available log files for files written since the specified date, - // in POSIX timestamp format with milliseconds. - FileLastWritten *int64 `type:"long"` - - // Filters the available log files for files larger than the specified size. - FileSize *int64 `type:"long"` - - // Filters the available log files for log file names that contain the specified - // string. - FilenameContains *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // The pagination token provided in the previous request. If this parameter - // is specified the response includes only records beyond the marker, up to - // MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBLogFilesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBLogFilesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBLogFilesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBLogFilesInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DescribeDBLogFilesInput) SetDBInstanceIdentifier(v string) *DescribeDBLogFilesInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetFileLastWritten sets the FileLastWritten field's value. -func (s *DescribeDBLogFilesInput) SetFileLastWritten(v int64) *DescribeDBLogFilesInput { - s.FileLastWritten = &v - return s -} - -// SetFileSize sets the FileSize field's value. -func (s *DescribeDBLogFilesInput) SetFileSize(v int64) *DescribeDBLogFilesInput { - s.FileSize = &v - return s -} - -// SetFilenameContains sets the FilenameContains field's value. -func (s *DescribeDBLogFilesInput) SetFilenameContains(v string) *DescribeDBLogFilesInput { - s.FilenameContains = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBLogFilesInput) SetFilters(v []*Filter) *DescribeDBLogFilesInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBLogFilesInput) SetMarker(v string) *DescribeDBLogFilesInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBLogFilesInput) SetMaxRecords(v int64) *DescribeDBLogFilesInput { - s.MaxRecords = &v - return s -} - -// The response from a call to DescribeDBLogFiles. -type DescribeDBLogFilesOutput struct { - _ struct{} `type:"structure"` - - // The DB log files returned. - DescribeDBLogFiles []*DescribeDBLogFilesDetails `locationNameList:"DescribeDBLogFilesDetails" type:"list"` - - // A pagination token that can be used in a subsequent DescribeDBLogFiles request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBLogFilesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBLogFilesOutput) GoString() string { - return s.String() -} - -// SetDescribeDBLogFiles sets the DescribeDBLogFiles field's value. -func (s *DescribeDBLogFilesOutput) SetDescribeDBLogFiles(v []*DescribeDBLogFilesDetails) *DescribeDBLogFilesOutput { - s.DescribeDBLogFiles = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBLogFilesOutput) SetMarker(v string) *DescribeDBLogFilesOutput { - s.Marker = &v - return s -} - -type DescribeDBParameterGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of a specific DB parameter group to return details for. - // - // Constraints: - // - // * If supplied, must match the name of an existing DBClusterParameterGroup. - DBParameterGroupName *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBParameterGroups - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBParameterGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBParameterGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBParameterGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBParameterGroupsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *DescribeDBParameterGroupsInput) SetDBParameterGroupName(v string) *DescribeDBParameterGroupsInput { - s.DBParameterGroupName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBParameterGroupsInput) SetFilters(v []*Filter) *DescribeDBParameterGroupsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBParameterGroupsInput) SetMarker(v string) *DescribeDBParameterGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBParameterGroupsInput) SetMaxRecords(v int64) *DescribeDBParameterGroupsInput { - s.MaxRecords = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBParameterGroups -// action. -type DescribeDBParameterGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of DBParameterGroup instances. - DBParameterGroups []*DBParameterGroup `locationNameList:"DBParameterGroup" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBParameterGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBParameterGroupsOutput) GoString() string { - return s.String() -} - -// SetDBParameterGroups sets the DBParameterGroups field's value. -func (s *DescribeDBParameterGroupsOutput) SetDBParameterGroups(v []*DBParameterGroup) *DescribeDBParameterGroupsOutput { - s.DBParameterGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBParameterGroupsOutput) SetMarker(v string) *DescribeDBParameterGroupsOutput { - s.Marker = &v - return s -} - -type DescribeDBParametersInput struct { - _ struct{} `type:"structure"` - - // The name of a specific DB parameter group to return details for. - // - // Constraints: - // - // * If supplied, must match the name of an existing DBParameterGroup. - // - // DBParameterGroupName is a required field - DBParameterGroupName *string `type:"string" required:"true"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBParameters - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The parameter types to return. - // - // Default: All parameter types returned - // - // Valid Values: user | system | engine-default - Source *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBParametersInput"} - if s.DBParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *DescribeDBParametersInput) SetDBParameterGroupName(v string) *DescribeDBParametersInput { - s.DBParameterGroupName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBParametersInput) SetFilters(v []*Filter) *DescribeDBParametersInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBParametersInput) SetMarker(v string) *DescribeDBParametersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBParametersInput) SetMaxRecords(v int64) *DescribeDBParametersInput { - s.MaxRecords = &v - return s -} - -// SetSource sets the Source field's value. -func (s *DescribeDBParametersInput) SetSource(v string) *DescribeDBParametersInput { - s.Source = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBParameters -// action. -type DescribeDBParametersOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // A list of Parameter values. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` -} - -// String returns the string representation -func (s DescribeDBParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBParametersOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBParametersOutput) SetMarker(v string) *DescribeDBParametersOutput { - s.Marker = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DescribeDBParametersOutput) SetParameters(v []*Parameter) *DescribeDBParametersOutput { - s.Parameters = v - return s -} - -type DescribeDBSecurityGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of the DB security group to return details for. - DBSecurityGroupName *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBSecurityGroups - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBSecurityGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBSecurityGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBSecurityGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBSecurityGroupsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSecurityGroupName sets the DBSecurityGroupName field's value. -func (s *DescribeDBSecurityGroupsInput) SetDBSecurityGroupName(v string) *DescribeDBSecurityGroupsInput { - s.DBSecurityGroupName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBSecurityGroupsInput) SetFilters(v []*Filter) *DescribeDBSecurityGroupsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBSecurityGroupsInput) SetMarker(v string) *DescribeDBSecurityGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBSecurityGroupsInput) SetMaxRecords(v int64) *DescribeDBSecurityGroupsInput { - s.MaxRecords = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBSecurityGroups -// action. -type DescribeDBSecurityGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of DBSecurityGroup instances. - DBSecurityGroups []*DBSecurityGroup `locationNameList:"DBSecurityGroup" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBSecurityGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBSecurityGroupsOutput) GoString() string { - return s.String() -} - -// SetDBSecurityGroups sets the DBSecurityGroups field's value. -func (s *DescribeDBSecurityGroupsOutput) SetDBSecurityGroups(v []*DBSecurityGroup) *DescribeDBSecurityGroupsOutput { - s.DBSecurityGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBSecurityGroupsOutput) SetMarker(v string) *DescribeDBSecurityGroupsOutput { - s.Marker = &v - return s -} - -type DescribeDBSnapshotAttributesInput struct { - _ struct{} `type:"structure"` - - // The identifier for the DB snapshot to describe the attributes for. - // - // DBSnapshotIdentifier is a required field - DBSnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeDBSnapshotAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBSnapshotAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBSnapshotAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBSnapshotAttributesInput"} - if s.DBSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSnapshotIdentifier sets the DBSnapshotIdentifier field's value. -func (s *DescribeDBSnapshotAttributesInput) SetDBSnapshotIdentifier(v string) *DescribeDBSnapshotAttributesInput { - s.DBSnapshotIdentifier = &v - return s -} - -type DescribeDBSnapshotAttributesOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful call to the DescribeDBSnapshotAttributes - // API action. - // - // Manual DB snapshot attributes are used to authorize other AWS accounts to - // copy or restore a manual DB snapshot. For more information, see the ModifyDBSnapshotAttribute - // API action. - DBSnapshotAttributesResult *DBSnapshotAttributesResult `type:"structure"` -} - -// String returns the string representation -func (s DescribeDBSnapshotAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBSnapshotAttributesOutput) GoString() string { - return s.String() -} - -// SetDBSnapshotAttributesResult sets the DBSnapshotAttributesResult field's value. -func (s *DescribeDBSnapshotAttributesOutput) SetDBSnapshotAttributesResult(v *DBSnapshotAttributesResult) *DescribeDBSnapshotAttributesOutput { - s.DBSnapshotAttributesResult = v - return s -} - -type DescribeDBSnapshotsInput struct { - _ struct{} `type:"structure"` - - // The ID of the DB instance to retrieve the list of DB snapshots for. This - // parameter can't be used in conjunction with DBSnapshotIdentifier. This parameter - // is not case-sensitive. - // - // Constraints: - // - // * If supplied, must match the identifier of an existing DBInstance. - DBInstanceIdentifier *string `type:"string"` - - // A specific DB snapshot identifier to describe. This parameter can't be used - // in conjunction with DBInstanceIdentifier. This value is stored as a lowercase - // string. - // - // Constraints: - // - // * If supplied, must match the identifier of an existing DBSnapshot. - // - // * If this identifier is for an automated snapshot, the SnapshotType parameter - // must also be specified. - DBSnapshotIdentifier *string `type:"string"` - - // A specific DB resource ID to describe. - DbiResourceId *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // True to include manual DB snapshots that are public and can be copied or - // restored by any AWS account, and otherwise false. The default is false. - // - // You can share a manual DB snapshot as public by using the ModifyDBSnapshotAttribute - // API. - IncludePublic *bool `type:"boolean"` - - // True to include shared manual DB snapshots from other AWS accounts that this - // AWS account has been given permission to copy or restore, and otherwise false. - // The default is false. - // - // You can give an AWS account permission to restore a manual DB snapshot from - // another AWS account by using the ModifyDBSnapshotAttribute API action. - IncludeShared *bool `type:"boolean"` - - // An optional pagination token provided by a previous DescribeDBSnapshots request. - // If this parameter is specified, the response includes only records beyond - // the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The type of snapshots to be returned. You can specify one of the following - // values: - // - // * automated - Return all DB snapshots that have been automatically taken - // by Amazon RDS for my AWS account. - // - // * manual - Return all DB snapshots that have been taken by my AWS account. - // - // * shared - Return all manual DB snapshots that have been shared to my - // AWS account. - // - // * public - Return all DB snapshots that have been marked as public. - // - // If you don't specify a SnapshotType value, then both automated and manual - // snapshots are returned. Shared and public DB snapshots are not included in - // the returned results by default. You can include shared snapshots with these - // results by setting the IncludeShared parameter to true. You can include public - // snapshots with these results by setting the IncludePublic parameter to true. - // - // The IncludeShared and IncludePublic parameters don't apply for SnapshotType - // values of manual or automated. The IncludePublic parameter doesn't apply - // when SnapshotType is set to shared. The IncludeShared parameter doesn't apply - // when SnapshotType is set to public. - SnapshotType *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBSnapshotsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBSnapshotsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBSnapshotsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBSnapshotsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DescribeDBSnapshotsInput) SetDBInstanceIdentifier(v string) *DescribeDBSnapshotsInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBSnapshotIdentifier sets the DBSnapshotIdentifier field's value. -func (s *DescribeDBSnapshotsInput) SetDBSnapshotIdentifier(v string) *DescribeDBSnapshotsInput { - s.DBSnapshotIdentifier = &v - return s -} - -// SetDbiResourceId sets the DbiResourceId field's value. -func (s *DescribeDBSnapshotsInput) SetDbiResourceId(v string) *DescribeDBSnapshotsInput { - s.DbiResourceId = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBSnapshotsInput) SetFilters(v []*Filter) *DescribeDBSnapshotsInput { - s.Filters = v - return s -} - -// SetIncludePublic sets the IncludePublic field's value. -func (s *DescribeDBSnapshotsInput) SetIncludePublic(v bool) *DescribeDBSnapshotsInput { - s.IncludePublic = &v - return s -} - -// SetIncludeShared sets the IncludeShared field's value. -func (s *DescribeDBSnapshotsInput) SetIncludeShared(v bool) *DescribeDBSnapshotsInput { - s.IncludeShared = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBSnapshotsInput) SetMarker(v string) *DescribeDBSnapshotsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBSnapshotsInput) SetMaxRecords(v int64) *DescribeDBSnapshotsInput { - s.MaxRecords = &v - return s -} - -// SetSnapshotType sets the SnapshotType field's value. -func (s *DescribeDBSnapshotsInput) SetSnapshotType(v string) *DescribeDBSnapshotsInput { - s.SnapshotType = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBSnapshots -// action. -type DescribeDBSnapshotsOutput struct { - _ struct{} `type:"structure"` - - // A list of DBSnapshot instances. - DBSnapshots []*DBSnapshot `locationNameList:"DBSnapshot" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBSnapshotsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBSnapshotsOutput) GoString() string { - return s.String() -} - -// SetDBSnapshots sets the DBSnapshots field's value. -func (s *DescribeDBSnapshotsOutput) SetDBSnapshots(v []*DBSnapshot) *DescribeDBSnapshotsOutput { - s.DBSnapshots = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBSnapshotsOutput) SetMarker(v string) *DescribeDBSnapshotsOutput { - s.Marker = &v - return s -} - -type DescribeDBSubnetGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of the DB subnet group to return details for. - DBSubnetGroupName *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeDBSubnetGroups - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeDBSubnetGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBSubnetGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDBSubnetGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDBSubnetGroupsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *DescribeDBSubnetGroupsInput) SetDBSubnetGroupName(v string) *DescribeDBSubnetGroupsInput { - s.DBSubnetGroupName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeDBSubnetGroupsInput) SetFilters(v []*Filter) *DescribeDBSubnetGroupsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBSubnetGroupsInput) SetMarker(v string) *DescribeDBSubnetGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBSubnetGroupsInput) SetMaxRecords(v int64) *DescribeDBSubnetGroupsInput { - s.MaxRecords = &v - return s -} - -// Contains the result of a successful invocation of the DescribeDBSubnetGroups -// action. -type DescribeDBSubnetGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of DBSubnetGroup instances. - DBSubnetGroups []*DBSubnetGroup `locationNameList:"DBSubnetGroup" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDBSubnetGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDBSubnetGroupsOutput) GoString() string { - return s.String() -} - -// SetDBSubnetGroups sets the DBSubnetGroups field's value. -func (s *DescribeDBSubnetGroupsOutput) SetDBSubnetGroups(v []*DBSubnetGroup) *DescribeDBSubnetGroupsOutput { - s.DBSubnetGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDBSubnetGroupsOutput) SetMarker(v string) *DescribeDBSubnetGroupsOutput { - s.Marker = &v - return s -} - -type DescribeEngineDefaultClusterParametersInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group family to return engine parameter - // information for. - // - // DBParameterGroupFamily is a required field - DBParameterGroupFamily *string `type:"string" required:"true"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeEngineDefaultClusterParameters - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeEngineDefaultClusterParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEngineDefaultClusterParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEngineDefaultClusterParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEngineDefaultClusterParametersInput"} - if s.DBParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DescribeEngineDefaultClusterParametersInput) SetDBParameterGroupFamily(v string) *DescribeEngineDefaultClusterParametersInput { - s.DBParameterGroupFamily = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEngineDefaultClusterParametersInput) SetFilters(v []*Filter) *DescribeEngineDefaultClusterParametersInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEngineDefaultClusterParametersInput) SetMarker(v string) *DescribeEngineDefaultClusterParametersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEngineDefaultClusterParametersInput) SetMaxRecords(v int64) *DescribeEngineDefaultClusterParametersInput { - s.MaxRecords = &v - return s -} - -type DescribeEngineDefaultClusterParametersOutput struct { - _ struct{} `type:"structure"` - - // Contains the result of a successful invocation of the DescribeEngineDefaultParameters - // action. - EngineDefaults *EngineDefaults `type:"structure"` -} - -// String returns the string representation -func (s DescribeEngineDefaultClusterParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEngineDefaultClusterParametersOutput) GoString() string { - return s.String() -} - -// SetEngineDefaults sets the EngineDefaults field's value. -func (s *DescribeEngineDefaultClusterParametersOutput) SetEngineDefaults(v *EngineDefaults) *DescribeEngineDefaultClusterParametersOutput { - s.EngineDefaults = v - return s -} - -type DescribeEngineDefaultParametersInput struct { - _ struct{} `type:"structure"` - - // The name of the DB parameter group family. - // - // DBParameterGroupFamily is a required field - DBParameterGroupFamily *string `type:"string" required:"true"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeEngineDefaultParameters - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeEngineDefaultParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEngineDefaultParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEngineDefaultParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEngineDefaultParametersInput"} - if s.DBParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *DescribeEngineDefaultParametersInput) SetDBParameterGroupFamily(v string) *DescribeEngineDefaultParametersInput { - s.DBParameterGroupFamily = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEngineDefaultParametersInput) SetFilters(v []*Filter) *DescribeEngineDefaultParametersInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEngineDefaultParametersInput) SetMarker(v string) *DescribeEngineDefaultParametersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEngineDefaultParametersInput) SetMaxRecords(v int64) *DescribeEngineDefaultParametersInput { - s.MaxRecords = &v - return s -} - -type DescribeEngineDefaultParametersOutput struct { - _ struct{} `type:"structure"` - - // Contains the result of a successful invocation of the DescribeEngineDefaultParameters - // action. - EngineDefaults *EngineDefaults `type:"structure"` -} - -// String returns the string representation -func (s DescribeEngineDefaultParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEngineDefaultParametersOutput) GoString() string { - return s.String() -} - -// SetEngineDefaults sets the EngineDefaults field's value. -func (s *DescribeEngineDefaultParametersOutput) SetEngineDefaults(v *EngineDefaults) *DescribeEngineDefaultParametersOutput { - s.EngineDefaults = v - return s -} - -type DescribeEventCategoriesInput struct { - _ struct{} `type:"structure"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // The type of source that is generating the events. - // - // Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot - SourceType *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventCategoriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventCategoriesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventCategoriesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventCategoriesInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEventCategoriesInput) SetFilters(v []*Filter) *DescribeEventCategoriesInput { - s.Filters = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *DescribeEventCategoriesInput) SetSourceType(v string) *DescribeEventCategoriesInput { - s.SourceType = &v - return s -} - -// Data returned from the DescribeEventCategories action. -type DescribeEventCategoriesOutput struct { - _ struct{} `type:"structure"` - - // A list of EventCategoriesMap data types. - EventCategoriesMapList []*EventCategoriesMap `locationNameList:"EventCategoriesMap" type:"list"` -} - -// String returns the string representation -func (s DescribeEventCategoriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventCategoriesOutput) GoString() string { - return s.String() -} - -// SetEventCategoriesMapList sets the EventCategoriesMapList field's value. -func (s *DescribeEventCategoriesOutput) SetEventCategoriesMapList(v []*EventCategoriesMap) *DescribeEventCategoriesOutput { - s.EventCategoriesMapList = v - return s -} - -type DescribeEventSubscriptionsInput struct { - _ struct{} `type:"structure"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords . - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The name of the RDS event notification subscription you want to describe. - SubscriptionName *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventSubscriptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventSubscriptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventSubscriptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventSubscriptionsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEventSubscriptionsInput) SetFilters(v []*Filter) *DescribeEventSubscriptionsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventSubscriptionsInput) SetMarker(v string) *DescribeEventSubscriptionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEventSubscriptionsInput) SetMaxRecords(v int64) *DescribeEventSubscriptionsInput { - s.MaxRecords = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *DescribeEventSubscriptionsInput) SetSubscriptionName(v string) *DescribeEventSubscriptionsInput { - s.SubscriptionName = &v - return s -} - -// Data returned by the DescribeEventSubscriptions action. -type DescribeEventSubscriptionsOutput struct { - _ struct{} `type:"structure"` - - // A list of EventSubscriptions data types. - EventSubscriptionsList []*EventSubscription `locationNameList:"EventSubscription" type:"list"` - - // An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventSubscriptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventSubscriptionsOutput) GoString() string { - return s.String() -} - -// SetEventSubscriptionsList sets the EventSubscriptionsList field's value. -func (s *DescribeEventSubscriptionsOutput) SetEventSubscriptionsList(v []*EventSubscription) *DescribeEventSubscriptionsOutput { - s.EventSubscriptionsList = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventSubscriptionsOutput) SetMarker(v string) *DescribeEventSubscriptionsOutput { - s.Marker = &v - return s -} - -type DescribeEventsInput struct { - _ struct{} `type:"structure"` - - // The number of minutes to retrieve events for. - // - // Default: 60 - Duration *int64 `type:"integer"` - - // The end of the time interval for which to retrieve events, specified in ISO - // 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia - // page. (http://en.wikipedia.org/wiki/ISO_8601) - // - // Example: 2009-07-08T18:00Z - EndTime *time.Time `type:"timestamp"` - - // A list of event categories that trigger notifications for a event notification - // subscription. - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeEvents request. - // If this parameter is specified, the response includes only records beyond - // the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The identifier of the event source for which events are returned. If not - // specified, then all sources are included in the response. - // - // Constraints: - // - // * If SourceIdentifier is supplied, SourceType must also be provided. - // - // * If the source type is DBInstance, then a DBInstanceIdentifier must be - // supplied. - // - // * If the source type is DBSecurityGroup, a DBSecurityGroupName must be - // supplied. - // - // * If the source type is DBParameterGroup, a DBParameterGroupName must - // be supplied. - // - // * If the source type is DBSnapshot, a DBSnapshotIdentifier must be supplied. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - SourceIdentifier *string `type:"string"` - - // The event source to retrieve events for. If no value is specified, all events - // are returned. - SourceType *string `type:"string" enum:"SourceType"` - - // The beginning of the time interval to retrieve events for, specified in ISO - // 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia - // page. (http://en.wikipedia.org/wiki/ISO_8601) - // - // Example: 2009-07-08T18:00Z - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s DescribeEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDuration sets the Duration field's value. -func (s *DescribeEventsInput) SetDuration(v int64) *DescribeEventsInput { - s.Duration = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *DescribeEventsInput) SetEndTime(v time.Time) *DescribeEventsInput { - s.EndTime = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *DescribeEventsInput) SetEventCategories(v []*string) *DescribeEventsInput { - s.EventCategories = v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeEventsInput) SetFilters(v []*Filter) *DescribeEventsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventsInput) SetMarker(v string) *DescribeEventsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEventsInput) SetMaxRecords(v int64) *DescribeEventsInput { - s.MaxRecords = &v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *DescribeEventsInput) SetSourceIdentifier(v string) *DescribeEventsInput { - s.SourceIdentifier = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *DescribeEventsInput) SetSourceType(v string) *DescribeEventsInput { - s.SourceType = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeEventsInput) SetStartTime(v time.Time) *DescribeEventsInput { - s.StartTime = &v - return s -} - -// Contains the result of a successful invocation of the DescribeEvents action. -type DescribeEventsOutput struct { - _ struct{} `type:"structure"` - - // A list of Event instances. - Events []*Event `locationNameList:"Event" type:"list"` - - // An optional pagination token provided by a previous Events request. If this - // parameter is specified, the response includes only records beyond the marker, - // up to the value specified by MaxRecords . - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { - s.Events = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventsOutput) SetMarker(v string) *DescribeEventsOutput { - s.Marker = &v - return s -} - -type DescribeGlobalClustersInput struct { - _ struct{} `type:"structure"` - - // A filter that specifies one or more global DB clusters to describe. - // - // Supported filters: - // - // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon - // Resource Names (ARNs). The results list will only include information - // about the DB clusters identified by these ARNs. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // The user-supplied DB cluster identifier. If this parameter is specified, - // information from only the specific DB cluster is returned. This parameter - // isn't case-sensitive. - // - // Constraints: - // - // * If supplied, must match an existing DBClusterIdentifier. - GlobalClusterIdentifier *string `type:"string"` - - // An optional pagination token provided by a previous DescribeGlobalClusters - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeGlobalClustersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeGlobalClustersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeGlobalClustersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeGlobalClustersInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeGlobalClustersInput) SetFilters(v []*Filter) *DescribeGlobalClustersInput { - s.Filters = v - return s -} - -// SetGlobalClusterIdentifier sets the GlobalClusterIdentifier field's value. -func (s *DescribeGlobalClustersInput) SetGlobalClusterIdentifier(v string) *DescribeGlobalClustersInput { - s.GlobalClusterIdentifier = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeGlobalClustersInput) SetMarker(v string) *DescribeGlobalClustersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeGlobalClustersInput) SetMaxRecords(v int64) *DescribeGlobalClustersInput { - s.MaxRecords = &v - return s -} - -type DescribeGlobalClustersOutput struct { - _ struct{} `type:"structure"` - - // The list of global clusters returned by this request. - GlobalClusters []*GlobalCluster `locationNameList:"GlobalClusterMember" type:"list"` - - // An optional pagination token provided by a previous DescribeGlobalClusters - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeGlobalClustersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeGlobalClustersOutput) GoString() string { - return s.String() -} - -// SetGlobalClusters sets the GlobalClusters field's value. -func (s *DescribeGlobalClustersOutput) SetGlobalClusters(v []*GlobalCluster) *DescribeGlobalClustersOutput { - s.GlobalClusters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeGlobalClustersOutput) SetMarker(v string) *DescribeGlobalClustersOutput { - s.Marker = &v - return s -} - -type DescribeOptionGroupOptionsInput struct { - _ struct{} `type:"structure"` - - // A required parameter. Options available for the given engine name are described. - // - // EngineName is a required field - EngineName *string `type:"string" required:"true"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // If specified, filters the results to include only options for the specified - // major engine version. - MajorEngineVersion *string `type:"string"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeOptionGroupOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOptionGroupOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeOptionGroupOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeOptionGroupOptionsInput"} - if s.EngineName == nil { - invalidParams.Add(request.NewErrParamRequired("EngineName")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEngineName sets the EngineName field's value. -func (s *DescribeOptionGroupOptionsInput) SetEngineName(v string) *DescribeOptionGroupOptionsInput { - s.EngineName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeOptionGroupOptionsInput) SetFilters(v []*Filter) *DescribeOptionGroupOptionsInput { - s.Filters = v - return s -} - -// SetMajorEngineVersion sets the MajorEngineVersion field's value. -func (s *DescribeOptionGroupOptionsInput) SetMajorEngineVersion(v string) *DescribeOptionGroupOptionsInput { - s.MajorEngineVersion = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeOptionGroupOptionsInput) SetMarker(v string) *DescribeOptionGroupOptionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeOptionGroupOptionsInput) SetMaxRecords(v int64) *DescribeOptionGroupOptionsInput { - s.MaxRecords = &v - return s -} - -type DescribeOptionGroupOptionsOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // List of available option group options. - OptionGroupOptions []*OptionGroupOption `locationNameList:"OptionGroupOption" type:"list"` -} - -// String returns the string representation -func (s DescribeOptionGroupOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOptionGroupOptionsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeOptionGroupOptionsOutput) SetMarker(v string) *DescribeOptionGroupOptionsOutput { - s.Marker = &v - return s -} - -// SetOptionGroupOptions sets the OptionGroupOptions field's value. -func (s *DescribeOptionGroupOptionsOutput) SetOptionGroupOptions(v []*OptionGroupOption) *DescribeOptionGroupOptionsOutput { - s.OptionGroupOptions = v - return s -} - -type DescribeOptionGroupsInput struct { - _ struct{} `type:"structure"` - - // Filters the list of option groups to only include groups associated with - // a specific database engine. - EngineName *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // Filters the list of option groups to only include groups associated with - // a specific database engine version. If specified, then EngineName must also - // be specified. - MajorEngineVersion *string `type:"string"` - - // An optional pagination token provided by a previous DescribeOptionGroups - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The name of the option group to describe. Can't be supplied together with - // EngineName or MajorEngineVersion. - OptionGroupName *string `type:"string"` -} - -// String returns the string representation -func (s DescribeOptionGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOptionGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeOptionGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeOptionGroupsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEngineName sets the EngineName field's value. -func (s *DescribeOptionGroupsInput) SetEngineName(v string) *DescribeOptionGroupsInput { - s.EngineName = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeOptionGroupsInput) SetFilters(v []*Filter) *DescribeOptionGroupsInput { - s.Filters = v - return s -} - -// SetMajorEngineVersion sets the MajorEngineVersion field's value. -func (s *DescribeOptionGroupsInput) SetMajorEngineVersion(v string) *DescribeOptionGroupsInput { - s.MajorEngineVersion = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeOptionGroupsInput) SetMarker(v string) *DescribeOptionGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeOptionGroupsInput) SetMaxRecords(v int64) *DescribeOptionGroupsInput { - s.MaxRecords = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *DescribeOptionGroupsInput) SetOptionGroupName(v string) *DescribeOptionGroupsInput { - s.OptionGroupName = &v - return s -} - -// List of option groups. -type DescribeOptionGroupsOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // List of option groups. - OptionGroupsList []*OptionGroup `locationNameList:"OptionGroup" type:"list"` -} - -// String returns the string representation -func (s DescribeOptionGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOptionGroupsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeOptionGroupsOutput) SetMarker(v string) *DescribeOptionGroupsOutput { - s.Marker = &v - return s -} - -// SetOptionGroupsList sets the OptionGroupsList field's value. -func (s *DescribeOptionGroupsOutput) SetOptionGroupsList(v []*OptionGroup) *DescribeOptionGroupsOutput { - s.OptionGroupsList = v - return s -} - -type DescribeOrderableDBInstanceOptionsInput struct { - _ struct{} `type:"structure"` - - // The DB instance class filter value. Specify this parameter to show only the - // available offerings matching the specified DB instance class. - DBInstanceClass *string `type:"string"` - - // The name of the engine to retrieve DB instance options for. - // - // Engine is a required field - Engine *string `type:"string" required:"true"` - - // The engine version filter value. Specify this parameter to show only the - // available offerings matching the specified engine version. - EngineVersion *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // The license model filter value. Specify this parameter to show only the available - // offerings matching the specified license model. - LicenseModel *string `type:"string"` - - // An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords . - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The VPC filter value. Specify this parameter to show only the available VPC - // or non-VPC offerings. - Vpc *bool `type:"boolean"` -} - -// String returns the string representation -func (s DescribeOrderableDBInstanceOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOrderableDBInstanceOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeOrderableDBInstanceOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeOrderableDBInstanceOptionsInput"} - if s.Engine == nil { - invalidParams.Add(request.NewErrParamRequired("Engine")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetDBInstanceClass(v string) *DescribeOrderableDBInstanceOptionsInput { - s.DBInstanceClass = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetEngine(v string) *DescribeOrderableDBInstanceOptionsInput { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetEngineVersion(v string) *DescribeOrderableDBInstanceOptionsInput { - s.EngineVersion = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetFilters(v []*Filter) *DescribeOrderableDBInstanceOptionsInput { - s.Filters = v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetLicenseModel(v string) *DescribeOrderableDBInstanceOptionsInput { - s.LicenseModel = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetMarker(v string) *DescribeOrderableDBInstanceOptionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetMaxRecords(v int64) *DescribeOrderableDBInstanceOptionsInput { - s.MaxRecords = &v - return s -} - -// SetVpc sets the Vpc field's value. -func (s *DescribeOrderableDBInstanceOptionsInput) SetVpc(v bool) *DescribeOrderableDBInstanceOptionsInput { - s.Vpc = &v - return s -} - -// Contains the result of a successful invocation of the DescribeOrderableDBInstanceOptions -// action. -type DescribeOrderableDBInstanceOptionsOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous OrderableDBInstanceOptions - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords . - Marker *string `type:"string"` - - // An OrderableDBInstanceOption structure containing information about orderable - // options for the DB instance. - OrderableDBInstanceOptions []*OrderableDBInstanceOption `locationNameList:"OrderableDBInstanceOption" type:"list"` -} - -// String returns the string representation -func (s DescribeOrderableDBInstanceOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOrderableDBInstanceOptionsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeOrderableDBInstanceOptionsOutput) SetMarker(v string) *DescribeOrderableDBInstanceOptionsOutput { - s.Marker = &v - return s -} - -// SetOrderableDBInstanceOptions sets the OrderableDBInstanceOptions field's value. -func (s *DescribeOrderableDBInstanceOptionsOutput) SetOrderableDBInstanceOptions(v []*OrderableDBInstanceOption) *DescribeOrderableDBInstanceOptionsOutput { - s.OrderableDBInstanceOptions = v - return s -} - -type DescribePendingMaintenanceActionsInput struct { - _ struct{} `type:"structure"` - - // A filter that specifies one or more resources to return pending maintenance - // actions for. - // - // Supported filters: - // - // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon - // Resource Names (ARNs). The results list will only include pending maintenance - // actions for the DB clusters identified by these ARNs. - // - // * db-instance-id - Accepts DB instance identifiers and DB instance ARNs. - // The results list will only include pending maintenance actions for the - // DB instances identified by these ARNs. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribePendingMaintenanceActions - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to a number of records specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The ARN of a resource to return pending maintenance actions for. - ResourceIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s DescribePendingMaintenanceActionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePendingMaintenanceActionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribePendingMaintenanceActionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribePendingMaintenanceActionsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribePendingMaintenanceActionsInput) SetFilters(v []*Filter) *DescribePendingMaintenanceActionsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribePendingMaintenanceActionsInput) SetMarker(v string) *DescribePendingMaintenanceActionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribePendingMaintenanceActionsInput) SetMaxRecords(v int64) *DescribePendingMaintenanceActionsInput { - s.MaxRecords = &v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *DescribePendingMaintenanceActionsInput) SetResourceIdentifier(v string) *DescribePendingMaintenanceActionsInput { - s.ResourceIdentifier = &v - return s -} - -// Data returned from the DescribePendingMaintenanceActions action. -type DescribePendingMaintenanceActionsOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous DescribePendingMaintenanceActions - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to a number of records specified by MaxRecords. - Marker *string `type:"string"` - - // A list of the pending maintenance actions for the resource. - PendingMaintenanceActions []*ResourcePendingMaintenanceActions `locationNameList:"ResourcePendingMaintenanceActions" type:"list"` -} - -// String returns the string representation -func (s DescribePendingMaintenanceActionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePendingMaintenanceActionsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribePendingMaintenanceActionsOutput) SetMarker(v string) *DescribePendingMaintenanceActionsOutput { - s.Marker = &v - return s -} - -// SetPendingMaintenanceActions sets the PendingMaintenanceActions field's value. -func (s *DescribePendingMaintenanceActionsOutput) SetPendingMaintenanceActions(v []*ResourcePendingMaintenanceActions) *DescribePendingMaintenanceActionsOutput { - s.PendingMaintenanceActions = v - return s -} - -type DescribeReservedDBInstancesInput struct { - _ struct{} `type:"structure"` - - // The DB instance class filter value. Specify this parameter to show only those - // reservations matching the specified DB instances class. - DBInstanceClass *string `type:"string"` - - // The duration filter value, specified in years or seconds. Specify this parameter - // to show only reservations for this duration. - // - // Valid Values: 1 | 3 | 31536000 | 94608000 - Duration *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more than the - // MaxRecords value is available, a pagination token called a marker is included - // in the response so that the following results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The Multi-AZ filter value. Specify this parameter to show only those reservations - // matching the specified Multi-AZ parameter. - MultiAZ *bool `type:"boolean"` - - // The offering type filter value. Specify this parameter to show only the available - // offerings matching the specified offering type. - // - // Valid Values: "Partial Upfront" | "All Upfront" | "No Upfront" - OfferingType *string `type:"string"` - - // The product description filter value. Specify this parameter to show only - // those reservations matching the specified product description. - ProductDescription *string `type:"string"` - - // The reserved DB instance identifier filter value. Specify this parameter - // to show only the reservation that matches the specified reservation ID. - ReservedDBInstanceId *string `type:"string"` - - // The offering identifier filter value. Specify this parameter to show only - // purchased reservations matching the specified offering identifier. - ReservedDBInstancesOfferingId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeReservedDBInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedDBInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeReservedDBInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeReservedDBInstancesInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *DescribeReservedDBInstancesInput) SetDBInstanceClass(v string) *DescribeReservedDBInstancesInput { - s.DBInstanceClass = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *DescribeReservedDBInstancesInput) SetDuration(v string) *DescribeReservedDBInstancesInput { - s.Duration = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeReservedDBInstancesInput) SetFilters(v []*Filter) *DescribeReservedDBInstancesInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReservedDBInstancesInput) SetMarker(v string) *DescribeReservedDBInstancesInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReservedDBInstancesInput) SetMaxRecords(v int64) *DescribeReservedDBInstancesInput { - s.MaxRecords = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *DescribeReservedDBInstancesInput) SetMultiAZ(v bool) *DescribeReservedDBInstancesInput { - s.MultiAZ = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *DescribeReservedDBInstancesInput) SetOfferingType(v string) *DescribeReservedDBInstancesInput { - s.OfferingType = &v - return s -} - -// SetProductDescription sets the ProductDescription field's value. -func (s *DescribeReservedDBInstancesInput) SetProductDescription(v string) *DescribeReservedDBInstancesInput { - s.ProductDescription = &v - return s -} - -// SetReservedDBInstanceId sets the ReservedDBInstanceId field's value. -func (s *DescribeReservedDBInstancesInput) SetReservedDBInstanceId(v string) *DescribeReservedDBInstancesInput { - s.ReservedDBInstanceId = &v - return s -} - -// SetReservedDBInstancesOfferingId sets the ReservedDBInstancesOfferingId field's value. -func (s *DescribeReservedDBInstancesInput) SetReservedDBInstancesOfferingId(v string) *DescribeReservedDBInstancesInput { - s.ReservedDBInstancesOfferingId = &v - return s -} - -type DescribeReservedDBInstancesOfferingsInput struct { - _ struct{} `type:"structure"` - - // The DB instance class filter value. Specify this parameter to show only the - // available offerings matching the specified DB instance class. - DBInstanceClass *string `type:"string"` - - // Duration filter value, specified in years or seconds. Specify this parameter - // to show only reservations for this duration. - // - // Valid Values: 1 | 3 | 31536000 | 94608000 - Duration *string `type:"string"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more than the - // MaxRecords value is available, a pagination token called a marker is included - // in the response so that the following results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The Multi-AZ filter value. Specify this parameter to show only the available - // offerings matching the specified Multi-AZ parameter. - MultiAZ *bool `type:"boolean"` - - // The offering type filter value. Specify this parameter to show only the available - // offerings matching the specified offering type. - // - // Valid Values: "Partial Upfront" | "All Upfront" | "No Upfront" - OfferingType *string `type:"string"` - - // Product description filter value. Specify this parameter to show only the - // available offerings that contain the specified product description. - // - // The results show offerings that partially match the filter value. - ProductDescription *string `type:"string"` - - // The offering identifier filter value. Specify this parameter to show only - // the available offering that matches the specified reservation identifier. - // - // Example: 438012d3-4052-4cc7-b2e3-8d3372e0e706 - ReservedDBInstancesOfferingId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeReservedDBInstancesOfferingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedDBInstancesOfferingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeReservedDBInstancesOfferingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeReservedDBInstancesOfferingsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *DescribeReservedDBInstancesOfferingsInput) SetDBInstanceClass(v string) *DescribeReservedDBInstancesOfferingsInput { - s.DBInstanceClass = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *DescribeReservedDBInstancesOfferingsInput) SetDuration(v string) *DescribeReservedDBInstancesOfferingsInput { - s.Duration = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeReservedDBInstancesOfferingsInput) SetFilters(v []*Filter) *DescribeReservedDBInstancesOfferingsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReservedDBInstancesOfferingsInput) SetMarker(v string) *DescribeReservedDBInstancesOfferingsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReservedDBInstancesOfferingsInput) SetMaxRecords(v int64) *DescribeReservedDBInstancesOfferingsInput { - s.MaxRecords = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *DescribeReservedDBInstancesOfferingsInput) SetMultiAZ(v bool) *DescribeReservedDBInstancesOfferingsInput { - s.MultiAZ = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *DescribeReservedDBInstancesOfferingsInput) SetOfferingType(v string) *DescribeReservedDBInstancesOfferingsInput { - s.OfferingType = &v - return s -} - -// SetProductDescription sets the ProductDescription field's value. -func (s *DescribeReservedDBInstancesOfferingsInput) SetProductDescription(v string) *DescribeReservedDBInstancesOfferingsInput { - s.ProductDescription = &v - return s -} - -// SetReservedDBInstancesOfferingId sets the ReservedDBInstancesOfferingId field's value. -func (s *DescribeReservedDBInstancesOfferingsInput) SetReservedDBInstancesOfferingId(v string) *DescribeReservedDBInstancesOfferingsInput { - s.ReservedDBInstancesOfferingId = &v - return s -} - -// Contains the result of a successful invocation of the DescribeReservedDBInstancesOfferings -// action. -type DescribeReservedDBInstancesOfferingsOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // A list of reserved DB instance offerings. - ReservedDBInstancesOfferings []*ReservedDBInstancesOffering `locationNameList:"ReservedDBInstancesOffering" type:"list"` -} - -// String returns the string representation -func (s DescribeReservedDBInstancesOfferingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedDBInstancesOfferingsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReservedDBInstancesOfferingsOutput) SetMarker(v string) *DescribeReservedDBInstancesOfferingsOutput { - s.Marker = &v - return s -} - -// SetReservedDBInstancesOfferings sets the ReservedDBInstancesOfferings field's value. -func (s *DescribeReservedDBInstancesOfferingsOutput) SetReservedDBInstancesOfferings(v []*ReservedDBInstancesOffering) *DescribeReservedDBInstancesOfferingsOutput { - s.ReservedDBInstancesOfferings = v - return s -} - -// Contains the result of a successful invocation of the DescribeReservedDBInstances -// action. -type DescribeReservedDBInstancesOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // A list of reserved DB instances. - ReservedDBInstances []*ReservedDBInstance `locationNameList:"ReservedDBInstance" type:"list"` -} - -// String returns the string representation -func (s DescribeReservedDBInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedDBInstancesOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReservedDBInstancesOutput) SetMarker(v string) *DescribeReservedDBInstancesOutput { - s.Marker = &v - return s -} - -// SetReservedDBInstances sets the ReservedDBInstances field's value. -func (s *DescribeReservedDBInstancesOutput) SetReservedDBInstances(v []*ReservedDBInstance) *DescribeReservedDBInstancesOutput { - s.ReservedDBInstances = v - return s -} - -type DescribeSourceRegionsInput struct { - _ struct{} `type:"structure"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // An optional pagination token provided by a previous DescribeSourceRegions - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The source AWS Region name. For example, us-east-1. - // - // Constraints: - // - // * Must specify a valid AWS Region name. - RegionName *string `type:"string"` -} - -// String returns the string representation -func (s DescribeSourceRegionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSourceRegionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSourceRegionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSourceRegionsInput"} - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeSourceRegionsInput) SetFilters(v []*Filter) *DescribeSourceRegionsInput { - s.Filters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeSourceRegionsInput) SetMarker(v string) *DescribeSourceRegionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeSourceRegionsInput) SetMaxRecords(v int64) *DescribeSourceRegionsInput { - s.MaxRecords = &v - return s -} - -// SetRegionName sets the RegionName field's value. -func (s *DescribeSourceRegionsInput) SetRegionName(v string) *DescribeSourceRegionsInput { - s.RegionName = &v - return s -} - -// Contains the result of a successful invocation of the DescribeSourceRegions -// action. -type DescribeSourceRegionsOutput struct { - _ struct{} `type:"structure"` - - // An optional pagination token provided by a previous request. If this parameter - // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. - Marker *string `type:"string"` - - // A list of SourceRegion instances that contains each source AWS Region that - // the current AWS Region can get a Read Replica or a DB snapshot from. - SourceRegions []*SourceRegion `locationNameList:"SourceRegion" type:"list"` -} - -// String returns the string representation -func (s DescribeSourceRegionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSourceRegionsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeSourceRegionsOutput) SetMarker(v string) *DescribeSourceRegionsOutput { - s.Marker = &v - return s -} - -// SetSourceRegions sets the SourceRegions field's value. -func (s *DescribeSourceRegionsOutput) SetSourceRegions(v []*SourceRegion) *DescribeSourceRegionsOutput { - s.SourceRegions = v - return s -} - -type DescribeValidDBInstanceModificationsInput struct { - _ struct{} `type:"structure"` - - // The customer identifier or the ARN of your DB instance. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeValidDBInstanceModificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeValidDBInstanceModificationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeValidDBInstanceModificationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeValidDBInstanceModificationsInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DescribeValidDBInstanceModificationsInput) SetDBInstanceIdentifier(v string) *DescribeValidDBInstanceModificationsInput { - s.DBInstanceIdentifier = &v - return s -} - -type DescribeValidDBInstanceModificationsOutput struct { - _ struct{} `type:"structure"` - - // Information about valid modifications that you can make to your DB instance. - // Contains the result of a successful call to the DescribeValidDBInstanceModifications - // action. You can use this information when you call ModifyDBInstance. - ValidDBInstanceModificationsMessage *ValidDBInstanceModificationsMessage `type:"structure"` -} - -// String returns the string representation -func (s DescribeValidDBInstanceModificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeValidDBInstanceModificationsOutput) GoString() string { - return s.String() -} - -// SetValidDBInstanceModificationsMessage sets the ValidDBInstanceModificationsMessage field's value. -func (s *DescribeValidDBInstanceModificationsOutput) SetValidDBInstanceModificationsMessage(v *ValidDBInstanceModificationsMessage) *DescribeValidDBInstanceModificationsOutput { - s.ValidDBInstanceModificationsMessage = v - return s -} - -// An Active Directory Domain membership record associated with the DB instance. -type DomainMembership struct { - _ struct{} `type:"structure"` - - // The identifier of the Active Directory Domain. - Domain *string `type:"string"` - - // The fully qualified domain name of the Active Directory Domain. - FQDN *string `type:"string"` - - // The name of the IAM role to be used when making API calls to the Directory - // Service. - IAMRoleName *string `type:"string"` - - // The status of the DB instance's Active Directory Domain membership, such - // as joined, pending-join, failed etc). - Status *string `type:"string"` -} - -// String returns the string representation -func (s DomainMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainMembership) GoString() string { - return s.String() -} - -// SetDomain sets the Domain field's value. -func (s *DomainMembership) SetDomain(v string) *DomainMembership { - s.Domain = &v - return s -} - -// SetFQDN sets the FQDN field's value. -func (s *DomainMembership) SetFQDN(v string) *DomainMembership { - s.FQDN = &v - return s -} - -// SetIAMRoleName sets the IAMRoleName field's value. -func (s *DomainMembership) SetIAMRoleName(v string) *DomainMembership { - s.IAMRoleName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DomainMembership) SetStatus(v string) *DomainMembership { - s.Status = &v - return s -} - -// A range of double values. -type DoubleRange struct { - _ struct{} `type:"structure"` - - // The minimum value in the range. - From *float64 `type:"double"` - - // The maximum value in the range. - To *float64 `type:"double"` -} - -// String returns the string representation -func (s DoubleRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DoubleRange) GoString() string { - return s.String() -} - -// SetFrom sets the From field's value. -func (s *DoubleRange) SetFrom(v float64) *DoubleRange { - s.From = &v - return s -} - -// SetTo sets the To field's value. -func (s *DoubleRange) SetTo(v float64) *DoubleRange { - s.To = &v - return s -} - -type DownloadDBLogFilePortionInput struct { - _ struct{} `type:"structure"` - - // The customer-assigned name of the DB instance that contains the log files - // you want to list. - // - // Constraints: - // - // * Must match the identifier of an existing DBInstance. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The name of the log file to be downloaded. - // - // LogFileName is a required field - LogFileName *string `type:"string" required:"true"` - - // The pagination token provided in the previous request or "0". If the Marker - // parameter is specified the response includes only records beyond the marker - // until the end of the file or up to NumberOfLines. - Marker *string `type:"string"` - - // The number of lines to download. If the number of lines specified results - // in a file over 1 MB in size, the file is truncated at 1 MB in size. - // - // If the NumberOfLines parameter is specified, then the block of lines returned - // can be from the beginning or the end of the log file, depending on the value - // of the Marker parameter. - // - // * If neither Marker or NumberOfLines are specified, the entire log file - // is returned up to a maximum of 10000 lines, starting with the most recent - // log entries first. - // - // * If NumberOfLines is specified and Marker is not specified, then the - // most recent lines from the end of the log file are returned. - // - // * If Marker is specified as "0", then the specified number of lines from - // the beginning of the log file are returned. - // - // * You can download the log file in blocks of lines by specifying the size - // of the block using the NumberOfLines parameter, and by specifying a value - // of "0" for the Marker parameter in your first request. Include the Marker - // value returned in the response as the Marker value for the next request, - // continuing until the AdditionalDataPending response element returns false. - NumberOfLines *int64 `type:"integer"` -} - -// String returns the string representation -func (s DownloadDBLogFilePortionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DownloadDBLogFilePortionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DownloadDBLogFilePortionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DownloadDBLogFilePortionInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - if s.LogFileName == nil { - invalidParams.Add(request.NewErrParamRequired("LogFileName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *DownloadDBLogFilePortionInput) SetDBInstanceIdentifier(v string) *DownloadDBLogFilePortionInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetLogFileName sets the LogFileName field's value. -func (s *DownloadDBLogFilePortionInput) SetLogFileName(v string) *DownloadDBLogFilePortionInput { - s.LogFileName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DownloadDBLogFilePortionInput) SetMarker(v string) *DownloadDBLogFilePortionInput { - s.Marker = &v - return s -} - -// SetNumberOfLines sets the NumberOfLines field's value. -func (s *DownloadDBLogFilePortionInput) SetNumberOfLines(v int64) *DownloadDBLogFilePortionInput { - s.NumberOfLines = &v - return s -} - -// This data type is used as a response element to DownloadDBLogFilePortion. -type DownloadDBLogFilePortionOutput struct { - _ struct{} `type:"structure"` - - // Boolean value that if true, indicates there is more data to be downloaded. - AdditionalDataPending *bool `type:"boolean"` - - // Entries from the specified log file. - LogFileData *string `type:"string"` - - // A pagination token that can be used in a subsequent DownloadDBLogFilePortion - // request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DownloadDBLogFilePortionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DownloadDBLogFilePortionOutput) GoString() string { - return s.String() -} - -// SetAdditionalDataPending sets the AdditionalDataPending field's value. -func (s *DownloadDBLogFilePortionOutput) SetAdditionalDataPending(v bool) *DownloadDBLogFilePortionOutput { - s.AdditionalDataPending = &v - return s -} - -// SetLogFileData sets the LogFileData field's value. -func (s *DownloadDBLogFilePortionOutput) SetLogFileData(v string) *DownloadDBLogFilePortionOutput { - s.LogFileData = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DownloadDBLogFilePortionOutput) SetMarker(v string) *DownloadDBLogFilePortionOutput { - s.Marker = &v - return s -} - -// This data type is used as a response element in the following actions: -// -// * AuthorizeDBSecurityGroupIngress -// -// * DescribeDBSecurityGroups -// -// * RevokeDBSecurityGroupIngress -type EC2SecurityGroup struct { - _ struct{} `type:"structure"` - - // Specifies the id of the EC2 security group. - EC2SecurityGroupId *string `type:"string"` - - // Specifies the name of the EC2 security group. - EC2SecurityGroupName *string `type:"string"` - - // Specifies the AWS ID of the owner of the EC2 security group specified in - // the EC2SecurityGroupName field. - EC2SecurityGroupOwnerId *string `type:"string"` - - // Provides the status of the EC2 security group. Status can be "authorizing", - // "authorized", "revoking", and "revoked". - Status *string `type:"string"` -} - -// String returns the string representation -func (s EC2SecurityGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EC2SecurityGroup) GoString() string { - return s.String() -} - -// SetEC2SecurityGroupId sets the EC2SecurityGroupId field's value. -func (s *EC2SecurityGroup) SetEC2SecurityGroupId(v string) *EC2SecurityGroup { - s.EC2SecurityGroupId = &v - return s -} - -// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. -func (s *EC2SecurityGroup) SetEC2SecurityGroupName(v string) *EC2SecurityGroup { - s.EC2SecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. -func (s *EC2SecurityGroup) SetEC2SecurityGroupOwnerId(v string) *EC2SecurityGroup { - s.EC2SecurityGroupOwnerId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *EC2SecurityGroup) SetStatus(v string) *EC2SecurityGroup { - s.Status = &v - return s -} - -// This data type represents the information you need to connect to an Amazon -// RDS DB instance. This data type is used as a response element in the following -// actions: -// -// * CreateDBInstance -// -// * DescribeDBInstances -// -// * DeleteDBInstance -// -// For the data structure that represents Amazon Aurora DB cluster endpoints, -// see DBClusterEndpoint. -type Endpoint struct { - _ struct{} `type:"structure"` - - // Specifies the DNS address of the DB instance. - Address *string `type:"string"` - - // Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. - HostedZoneId *string `type:"string"` - - // Specifies the port that the database engine is listening on. - Port *int64 `type:"integer"` -} - -// String returns the string representation -func (s Endpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Endpoint) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *Endpoint) SetAddress(v string) *Endpoint { - s.Address = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *Endpoint) SetHostedZoneId(v string) *Endpoint { - s.HostedZoneId = &v - return s -} - -// SetPort sets the Port field's value. -func (s *Endpoint) SetPort(v int64) *Endpoint { - s.Port = &v - return s -} - -// Contains the result of a successful invocation of the DescribeEngineDefaultParameters -// action. -type EngineDefaults struct { - _ struct{} `type:"structure"` - - // Specifies the name of the DB parameter group family that the engine default - // parameters apply to. - DBParameterGroupFamily *string `type:"string"` - - // An optional pagination token provided by a previous EngineDefaults request. - // If this parameter is specified, the response includes only records beyond - // the marker, up to the value specified by MaxRecords . - Marker *string `type:"string"` - - // Contains a list of engine default parameters. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` -} - -// String returns the string representation -func (s EngineDefaults) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EngineDefaults) GoString() string { - return s.String() -} - -// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. -func (s *EngineDefaults) SetDBParameterGroupFamily(v string) *EngineDefaults { - s.DBParameterGroupFamily = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *EngineDefaults) SetMarker(v string) *EngineDefaults { - s.Marker = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *EngineDefaults) SetParameters(v []*Parameter) *EngineDefaults { - s.Parameters = v - return s -} - -// This data type is used as a response element in the DescribeEvents action. -type Event struct { - _ struct{} `type:"structure"` - - // Specifies the date and time of the event. - Date *time.Time `type:"timestamp"` - - // Specifies the category for the event. - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // Provides the text of this event. - Message *string `type:"string"` - - // The Amazon Resource Name (ARN) for the event. - SourceArn *string `type:"string"` - - // Provides the identifier for the source of the event. - SourceIdentifier *string `type:"string"` - - // Specifies the source type for this event. - SourceType *string `type:"string" enum:"SourceType"` -} - -// String returns the string representation -func (s Event) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Event) GoString() string { - return s.String() -} - -// SetDate sets the Date field's value. -func (s *Event) SetDate(v time.Time) *Event { - s.Date = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *Event) SetEventCategories(v []*string) *Event { - s.EventCategories = v - return s -} - -// SetMessage sets the Message field's value. -func (s *Event) SetMessage(v string) *Event { - s.Message = &v - return s -} - -// SetSourceArn sets the SourceArn field's value. -func (s *Event) SetSourceArn(v string) *Event { - s.SourceArn = &v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *Event) SetSourceIdentifier(v string) *Event { - s.SourceIdentifier = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *Event) SetSourceType(v string) *Event { - s.SourceType = &v - return s -} - -// Contains the results of a successful invocation of the DescribeEventCategories -// action. -type EventCategoriesMap struct { - _ struct{} `type:"structure"` - - // The event categories for the specified source type - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // The source type that the returned categories belong to - SourceType *string `type:"string"` -} - -// String returns the string representation -func (s EventCategoriesMap) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventCategoriesMap) GoString() string { - return s.String() -} - -// SetEventCategories sets the EventCategories field's value. -func (s *EventCategoriesMap) SetEventCategories(v []*string) *EventCategoriesMap { - s.EventCategories = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *EventCategoriesMap) SetSourceType(v string) *EventCategoriesMap { - s.SourceType = &v - return s -} - -// Contains the results of a successful invocation of the DescribeEventSubscriptions -// action. -type EventSubscription struct { - _ struct{} `type:"structure"` - - // The RDS event notification subscription Id. - CustSubscriptionId *string `type:"string"` - - // The AWS customer account associated with the RDS event notification subscription. - CustomerAwsId *string `type:"string"` - - // A Boolean value indicating if the subscription is enabled. True indicates - // the subscription is enabled. - Enabled *bool `type:"boolean"` - - // A list of event categories for the RDS event notification subscription. - EventCategoriesList []*string `locationNameList:"EventCategory" type:"list"` - - // The Amazon Resource Name (ARN) for the event subscription. - EventSubscriptionArn *string `type:"string"` - - // The topic ARN of the RDS event notification subscription. - SnsTopicArn *string `type:"string"` - - // A list of source IDs for the RDS event notification subscription. - SourceIdsList []*string `locationNameList:"SourceId" type:"list"` - - // The source type for the RDS event notification subscription. - SourceType *string `type:"string"` - - // The status of the RDS event notification subscription. - // - // Constraints: - // - // Can be one of the following: creating | modifying | deleting | active | no-permission - // | topic-not-exist - // - // The status "no-permission" indicates that RDS no longer has permission to - // post to the SNS topic. The status "topic-not-exist" indicates that the topic - // was deleted after the subscription was created. - Status *string `type:"string"` - - // The time the RDS event notification subscription was created. - SubscriptionCreationTime *string `type:"string"` -} - -// String returns the string representation -func (s EventSubscription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventSubscription) GoString() string { - return s.String() -} - -// SetCustSubscriptionId sets the CustSubscriptionId field's value. -func (s *EventSubscription) SetCustSubscriptionId(v string) *EventSubscription { - s.CustSubscriptionId = &v - return s -} - -// SetCustomerAwsId sets the CustomerAwsId field's value. -func (s *EventSubscription) SetCustomerAwsId(v string) *EventSubscription { - s.CustomerAwsId = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *EventSubscription) SetEnabled(v bool) *EventSubscription { - s.Enabled = &v - return s -} - -// SetEventCategoriesList sets the EventCategoriesList field's value. -func (s *EventSubscription) SetEventCategoriesList(v []*string) *EventSubscription { - s.EventCategoriesList = v - return s -} - -// SetEventSubscriptionArn sets the EventSubscriptionArn field's value. -func (s *EventSubscription) SetEventSubscriptionArn(v string) *EventSubscription { - s.EventSubscriptionArn = &v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *EventSubscription) SetSnsTopicArn(v string) *EventSubscription { - s.SnsTopicArn = &v - return s -} - -// SetSourceIdsList sets the SourceIdsList field's value. -func (s *EventSubscription) SetSourceIdsList(v []*string) *EventSubscription { - s.SourceIdsList = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *EventSubscription) SetSourceType(v string) *EventSubscription { - s.SourceType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *EventSubscription) SetStatus(v string) *EventSubscription { - s.Status = &v - return s -} - -// SetSubscriptionCreationTime sets the SubscriptionCreationTime field's value. -func (s *EventSubscription) SetSubscriptionCreationTime(v string) *EventSubscription { - s.SubscriptionCreationTime = &v - return s -} - -type FailoverDBClusterInput struct { - _ struct{} `type:"structure"` - - // A DB cluster identifier to force a failover for. This parameter is not case-sensitive. - // - // Constraints: - // - // * Must match the identifier of an existing DBCluster. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The name of the instance to promote to the primary instance. - // - // You must specify the instance identifier for an Aurora Replica in the DB - // cluster. For example, mydbcluster-replica1. - TargetDBInstanceIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s FailoverDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailoverDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FailoverDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FailoverDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *FailoverDBClusterInput) SetDBClusterIdentifier(v string) *FailoverDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetTargetDBInstanceIdentifier sets the TargetDBInstanceIdentifier field's value. -func (s *FailoverDBClusterInput) SetTargetDBInstanceIdentifier(v string) *FailoverDBClusterInput { - s.TargetDBInstanceIdentifier = &v - return s -} - -type FailoverDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Aurora DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, - // and StartDBCluster actions. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s FailoverDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailoverDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *FailoverDBClusterOutput) SetDBCluster(v *DBCluster) *FailoverDBClusterOutput { - s.DBCluster = v - return s -} - -// A filter name and value pair that is used to return a more specific list -// of results from a describe operation. Filters can be used to match a set -// of resources by specific criteria, such as IDs. The filters supported by -// a describe operation are documented with the describe operation. -// -// Currently, wildcards are not supported in filters. -// -// The following actions can be filtered: -// -// * DescribeDBClusterBacktracks -// -// * DescribeDBClusterEndpoints -// -// * DescribeDBClusters -// -// * DescribeDBInstances -// -// * DescribePendingMaintenanceActions -type Filter struct { - _ struct{} `type:"structure"` - - // The name of the filter. Filter names are case-sensitive. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // One or more filter values. Filter values are case-sensitive. - // - // Values is a required field - Values []*string `locationNameList:"Value" type:"list" required:"true"` -} - -// String returns the string representation -func (s Filter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Filter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Filter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Filter"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *Filter) SetName(v string) *Filter { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *Filter) SetValues(v []*string) *Filter { - s.Values = v - return s -} - -// A data type representing an Aurora global database. -type GlobalCluster struct { - _ struct{} `type:"structure"` - - // The default database name within the new global database cluster. - DatabaseName *string `type:"string"` - - // The deletion protection setting for the new global database cluster. - DeletionProtection *bool `type:"boolean"` - - // The Aurora database engine used by the global database cluster. - Engine *string `type:"string"` - - // Indicates the database engine version. - EngineVersion *string `type:"string"` - - // The Amazon Resource Name (ARN) for the global database cluster. - GlobalClusterArn *string `type:"string"` - - // Contains a user-supplied global database cluster identifier. This identifier - // is the unique key that identifies a global database cluster. - GlobalClusterIdentifier *string `type:"string"` - - // The list of cluster IDs for secondary clusters within the global database - // cluster. Currently limited to 1 item. - GlobalClusterMembers []*GlobalClusterMember `locationNameList:"GlobalClusterMember" type:"list"` - - // The AWS Region-unique, immutable identifier for the global database cluster. - // This identifier is found in AWS CloudTrail log entries whenever the AWS KMS - // key for the DB cluster is accessed. - GlobalClusterResourceId *string `type:"string"` - - // Specifies the current state of this global database cluster. - Status *string `type:"string"` - - // The storage encryption setting for the global database cluster. - StorageEncrypted *bool `type:"boolean"` -} - -// String returns the string representation -func (s GlobalCluster) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GlobalCluster) GoString() string { - return s.String() -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *GlobalCluster) SetDatabaseName(v string) *GlobalCluster { - s.DatabaseName = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *GlobalCluster) SetDeletionProtection(v bool) *GlobalCluster { - s.DeletionProtection = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *GlobalCluster) SetEngine(v string) *GlobalCluster { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *GlobalCluster) SetEngineVersion(v string) *GlobalCluster { - s.EngineVersion = &v - return s -} - -// SetGlobalClusterArn sets the GlobalClusterArn field's value. -func (s *GlobalCluster) SetGlobalClusterArn(v string) *GlobalCluster { - s.GlobalClusterArn = &v - return s -} - -// SetGlobalClusterIdentifier sets the GlobalClusterIdentifier field's value. -func (s *GlobalCluster) SetGlobalClusterIdentifier(v string) *GlobalCluster { - s.GlobalClusterIdentifier = &v - return s -} - -// SetGlobalClusterMembers sets the GlobalClusterMembers field's value. -func (s *GlobalCluster) SetGlobalClusterMembers(v []*GlobalClusterMember) *GlobalCluster { - s.GlobalClusterMembers = v - return s -} - -// SetGlobalClusterResourceId sets the GlobalClusterResourceId field's value. -func (s *GlobalCluster) SetGlobalClusterResourceId(v string) *GlobalCluster { - s.GlobalClusterResourceId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GlobalCluster) SetStatus(v string) *GlobalCluster { - s.Status = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *GlobalCluster) SetStorageEncrypted(v bool) *GlobalCluster { - s.StorageEncrypted = &v - return s -} - -// A data structure with information about any primary and secondary clusters -// associated with an Aurora global database. -type GlobalClusterMember struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for each Aurora cluster. - DBClusterArn *string `type:"string"` - - // Specifies whether the Aurora cluster is the primary cluster (that is, has - // read-write capability) for the Aurora global database with which it is associated. - IsWriter *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) for each read-only secondary cluster associated - // with the Aurora global database. - Readers []*string `type:"list"` -} - -// String returns the string representation -func (s GlobalClusterMember) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GlobalClusterMember) GoString() string { - return s.String() -} - -// SetDBClusterArn sets the DBClusterArn field's value. -func (s *GlobalClusterMember) SetDBClusterArn(v string) *GlobalClusterMember { - s.DBClusterArn = &v - return s -} - -// SetIsWriter sets the IsWriter field's value. -func (s *GlobalClusterMember) SetIsWriter(v bool) *GlobalClusterMember { - s.IsWriter = &v - return s -} - -// SetReaders sets the Readers field's value. -func (s *GlobalClusterMember) SetReaders(v []*string) *GlobalClusterMember { - s.Readers = v - return s -} - -// This data type is used as a response element in the DescribeDBSecurityGroups -// action. -type IPRange struct { - _ struct{} `type:"structure"` - - // Specifies the IP range. - CIDRIP *string `type:"string"` - - // Specifies the status of the IP range. Status can be "authorizing", "authorized", - // "revoking", and "revoked". - Status *string `type:"string"` -} - -// String returns the string representation -func (s IPRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IPRange) GoString() string { - return s.String() -} - -// SetCIDRIP sets the CIDRIP field's value. -func (s *IPRange) SetCIDRIP(v string) *IPRange { - s.CIDRIP = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *IPRange) SetStatus(v string) *IPRange { - s.Status = &v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // This parameter is not currently supported. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // The Amazon RDS resource with tags to be listed. This value is an Amazon Resource - // Name (ARN). For information about creating an ARN, see Constructing an ARN - // for Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) - // in the Amazon RDS User Guide. - // - // ResourceName is a required field - ResourceName *string `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.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListTagsForResourceInput) SetFilters(v []*Filter) *ListTagsForResourceInput { - s.Filters = v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *ListTagsForResourceInput) SetResourceName(v string) *ListTagsForResourceInput { - s.ResourceName = &v - return s -} - -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // List of tags returned by the ListTagsForResource operation. - TagList []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetTagList sets the TagList field's value. -func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOutput { - s.TagList = v - return s -} - -// The minimum DB engine version required for each corresponding allowed value -// for an option setting. -type MinimumEngineVersionPerAllowedValue struct { - _ struct{} `type:"structure"` - - // The allowed value for an option setting. - AllowedValue *string `type:"string"` - - // The minimum DB engine version required for the allowed value. - MinimumEngineVersion *string `type:"string"` -} - -// String returns the string representation -func (s MinimumEngineVersionPerAllowedValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MinimumEngineVersionPerAllowedValue) GoString() string { - return s.String() -} - -// SetAllowedValue sets the AllowedValue field's value. -func (s *MinimumEngineVersionPerAllowedValue) SetAllowedValue(v string) *MinimumEngineVersionPerAllowedValue { - s.AllowedValue = &v - return s -} - -// SetMinimumEngineVersion sets the MinimumEngineVersion field's value. -func (s *MinimumEngineVersionPerAllowedValue) SetMinimumEngineVersion(v string) *MinimumEngineVersionPerAllowedValue { - s.MinimumEngineVersion = &v - return s -} - -type ModifyCurrentDBClusterCapacityInput struct { - _ struct{} `type:"structure"` - - // The DB cluster capacity. - // - // Constraints: - // - // * Value must be 2, 4, 8, 16, 32, 64, 128, or 256. - Capacity *int64 `type:"integer"` - - // The DB cluster identifier for the cluster being modified. This parameter - // is not case-sensitive. - // - // Constraints: - // - // * Must match the identifier of an existing DB cluster. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The amount of time, in seconds, that Aurora Serverless tries to find a scaling - // point to perform seamless scaling before enforcing the timeout action. The - // default is 300. - // - // * Value must be from 10 through 600. - SecondsBeforeTimeout *int64 `type:"integer"` - - // The action to take when the timeout is reached, either ForceApplyCapacityChange - // or RollbackCapacityChange. - // - // ForceApplyCapacityChange, the default, sets the capacity to the specified - // value as soon as possible. - // - // RollbackCapacityChange ignores the capacity change if a scaling point is - // not found in the timeout period. - TimeoutAction *string `type:"string"` -} - -// String returns the string representation -func (s ModifyCurrentDBClusterCapacityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyCurrentDBClusterCapacityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyCurrentDBClusterCapacityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyCurrentDBClusterCapacityInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCapacity sets the Capacity field's value. -func (s *ModifyCurrentDBClusterCapacityInput) SetCapacity(v int64) *ModifyCurrentDBClusterCapacityInput { - s.Capacity = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *ModifyCurrentDBClusterCapacityInput) SetDBClusterIdentifier(v string) *ModifyCurrentDBClusterCapacityInput { - s.DBClusterIdentifier = &v - return s -} - -// SetSecondsBeforeTimeout sets the SecondsBeforeTimeout field's value. -func (s *ModifyCurrentDBClusterCapacityInput) SetSecondsBeforeTimeout(v int64) *ModifyCurrentDBClusterCapacityInput { - s.SecondsBeforeTimeout = &v - return s -} - -// SetTimeoutAction sets the TimeoutAction field's value. -func (s *ModifyCurrentDBClusterCapacityInput) SetTimeoutAction(v string) *ModifyCurrentDBClusterCapacityInput { - s.TimeoutAction = &v - return s -} - -type ModifyCurrentDBClusterCapacityOutput struct { - _ struct{} `type:"structure"` - - // The current capacity of the DB cluster. - CurrentCapacity *int64 `type:"integer"` - - // A user-supplied DB cluster identifier. This identifier is the unique key - // that identifies a DB cluster. - DBClusterIdentifier *string `type:"string"` - - // A value that specifies the capacity that the DB cluster scales to next. - PendingCapacity *int64 `type:"integer"` - - // The number of seconds before a call to ModifyCurrentDBClusterCapacity times - // out. - SecondsBeforeTimeout *int64 `type:"integer"` - - // The timeout action of a call to ModifyCurrentDBClusterCapacity, either ForceApplyCapacityChange - // or RollbackCapacityChange. - TimeoutAction *string `type:"string"` -} - -// String returns the string representation -func (s ModifyCurrentDBClusterCapacityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyCurrentDBClusterCapacityOutput) GoString() string { - return s.String() -} - -// SetCurrentCapacity sets the CurrentCapacity field's value. -func (s *ModifyCurrentDBClusterCapacityOutput) SetCurrentCapacity(v int64) *ModifyCurrentDBClusterCapacityOutput { - s.CurrentCapacity = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *ModifyCurrentDBClusterCapacityOutput) SetDBClusterIdentifier(v string) *ModifyCurrentDBClusterCapacityOutput { - s.DBClusterIdentifier = &v - return s -} - -// SetPendingCapacity sets the PendingCapacity field's value. -func (s *ModifyCurrentDBClusterCapacityOutput) SetPendingCapacity(v int64) *ModifyCurrentDBClusterCapacityOutput { - s.PendingCapacity = &v - return s -} - -// SetSecondsBeforeTimeout sets the SecondsBeforeTimeout field's value. -func (s *ModifyCurrentDBClusterCapacityOutput) SetSecondsBeforeTimeout(v int64) *ModifyCurrentDBClusterCapacityOutput { - s.SecondsBeforeTimeout = &v - return s -} - -// SetTimeoutAction sets the TimeoutAction field's value. -func (s *ModifyCurrentDBClusterCapacityOutput) SetTimeoutAction(v string) *ModifyCurrentDBClusterCapacityOutput { - s.TimeoutAction = &v - return s -} - -type ModifyDBClusterEndpointInput struct { - _ struct{} `type:"structure"` - - // The identifier of the endpoint to modify. This parameter is stored as a lowercase - // string. - // - // DBClusterEndpointIdentifier is a required field - DBClusterEndpointIdentifier *string `type:"string" required:"true"` - - // The type of the endpoint. One of: READER, ANY. - EndpointType *string `type:"string"` - - // List of DB instance identifiers that aren't part of the custom endpoint group. - // All other eligible instances are reachable through the custom endpoint. Only - // relevant if the list of static members is empty. - ExcludedMembers []*string `type:"list"` - - // List of DB instance identifiers that are part of the custom endpoint group. - StaticMembers []*string `type:"list"` -} - -// String returns the string representation -func (s ModifyDBClusterEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBClusterEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterEndpointInput"} - if s.DBClusterEndpointIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterEndpointIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. -func (s *ModifyDBClusterEndpointInput) SetDBClusterEndpointIdentifier(v string) *ModifyDBClusterEndpointInput { - s.DBClusterEndpointIdentifier = &v - return s -} - -// SetEndpointType sets the EndpointType field's value. -func (s *ModifyDBClusterEndpointInput) SetEndpointType(v string) *ModifyDBClusterEndpointInput { - s.EndpointType = &v - return s -} - -// SetExcludedMembers sets the ExcludedMembers field's value. -func (s *ModifyDBClusterEndpointInput) SetExcludedMembers(v []*string) *ModifyDBClusterEndpointInput { - s.ExcludedMembers = v - return s -} - -// SetStaticMembers sets the StaticMembers field's value. -func (s *ModifyDBClusterEndpointInput) SetStaticMembers(v []*string) *ModifyDBClusterEndpointInput { - s.StaticMembers = v - return s -} - -// This data type represents the information you need to connect to an Amazon -// Aurora DB cluster. This data type is used as a response element in the following -// actions: -// -// * CreateDBClusterEndpoint -// -// * DescribeDBClusterEndpoints -// -// * ModifyDBClusterEndpoint -// -// * DeleteDBClusterEndpoint -// -// For the data structure that represents Amazon RDS DB instance endpoints, -// see Endpoint. -type ModifyDBClusterEndpointOutput struct { - _ struct{} `type:"structure"` - - // The type associated with a custom endpoint. One of: READER, ANY. - CustomEndpointType *string `type:"string"` - - // The Amazon Resource Name (ARN) for the endpoint. - DBClusterEndpointArn *string `type:"string"` - - // The identifier associated with the endpoint. This parameter is stored as - // a lowercase string. - DBClusterEndpointIdentifier *string `type:"string"` - - // A unique system-generated identifier for an endpoint. It remains the same - // for the whole life of the endpoint. - DBClusterEndpointResourceIdentifier *string `type:"string"` - - // The DB cluster identifier of the DB cluster associated with the endpoint. - // This parameter is stored as a lowercase string. - DBClusterIdentifier *string `type:"string"` - - // The DNS address of the endpoint. - Endpoint *string `type:"string"` - - // The type of the endpoint. One of: READER, WRITER, CUSTOM. - EndpointType *string `type:"string"` - - // List of DB instance identifiers that aren't part of the custom endpoint group. - // All other eligible instances are reachable through the custom endpoint. Only - // relevant if the list of static members is empty. - ExcludedMembers []*string `type:"list"` - - // List of DB instance identifiers that are part of the custom endpoint group. - StaticMembers []*string `type:"list"` - - // The current status of the endpoint. One of: creating, available, deleting, - // modifying. - Status *string `type:"string"` -} - -// String returns the string representation -func (s ModifyDBClusterEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterEndpointOutput) GoString() string { - return s.String() -} - -// SetCustomEndpointType sets the CustomEndpointType field's value. -func (s *ModifyDBClusterEndpointOutput) SetCustomEndpointType(v string) *ModifyDBClusterEndpointOutput { - s.CustomEndpointType = &v - return s -} - -// SetDBClusterEndpointArn sets the DBClusterEndpointArn field's value. -func (s *ModifyDBClusterEndpointOutput) SetDBClusterEndpointArn(v string) *ModifyDBClusterEndpointOutput { - s.DBClusterEndpointArn = &v - return s -} - -// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. -func (s *ModifyDBClusterEndpointOutput) SetDBClusterEndpointIdentifier(v string) *ModifyDBClusterEndpointOutput { - s.DBClusterEndpointIdentifier = &v - return s -} - -// SetDBClusterEndpointResourceIdentifier sets the DBClusterEndpointResourceIdentifier field's value. -func (s *ModifyDBClusterEndpointOutput) SetDBClusterEndpointResourceIdentifier(v string) *ModifyDBClusterEndpointOutput { - s.DBClusterEndpointResourceIdentifier = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *ModifyDBClusterEndpointOutput) SetDBClusterIdentifier(v string) *ModifyDBClusterEndpointOutput { - s.DBClusterIdentifier = &v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *ModifyDBClusterEndpointOutput) SetEndpoint(v string) *ModifyDBClusterEndpointOutput { - s.Endpoint = &v - return s -} - -// SetEndpointType sets the EndpointType field's value. -func (s *ModifyDBClusterEndpointOutput) SetEndpointType(v string) *ModifyDBClusterEndpointOutput { - s.EndpointType = &v - return s -} - -// SetExcludedMembers sets the ExcludedMembers field's value. -func (s *ModifyDBClusterEndpointOutput) SetExcludedMembers(v []*string) *ModifyDBClusterEndpointOutput { - s.ExcludedMembers = v - return s -} - -// SetStaticMembers sets the StaticMembers field's value. -func (s *ModifyDBClusterEndpointOutput) SetStaticMembers(v []*string) *ModifyDBClusterEndpointOutput { - s.StaticMembers = v - return s -} - -// SetStatus sets the Status field's value. -func (s *ModifyDBClusterEndpointOutput) SetStatus(v string) *ModifyDBClusterEndpointOutput { - s.Status = &v - return s -} - -type ModifyDBClusterInput struct { - _ struct{} `type:"structure"` - - // A value that specifies whether the modifications in this request and any - // pending modifications are asynchronously applied as soon as possible, regardless - // of the PreferredMaintenanceWindow setting for the DB cluster. If this parameter - // is set to false, changes to the DB cluster are applied during the next maintenance - // window. - // - // The ApplyImmediately parameter only affects the EnableIAMDatabaseAuthentication, - // MasterUserPassword, and NewDBClusterIdentifier values. If you set the ApplyImmediately - // parameter value to false, then changes to the EnableIAMDatabaseAuthentication, - // MasterUserPassword, and NewDBClusterIdentifier values are applied during - // the next maintenance window. All other changes are applied immediately, regardless - // of the value of the ApplyImmediately parameter. - // - // Default: false - ApplyImmediately *bool `type:"boolean"` - - // The target backtrack window, in seconds. To disable backtracking, set this - // value to 0. - // - // Default: 0 - // - // Constraints: - // - // * If specified, this value must be set to a number from 0 to 259,200 (72 - // hours). - BacktrackWindow *int64 `type:"long"` - - // The number of days for which automated backups are retained. You must specify - // a minimum value of 1. - // - // Default: 1 - // - // Constraints: - // - // * Must be a value from 1 to 35 - BackupRetentionPeriod *int64 `type:"integer"` - - // The configuration setting for the log types to be enabled for export to CloudWatch - // Logs for a specific DB cluster. - CloudwatchLogsExportConfiguration *CloudwatchLogsExportConfiguration `type:"structure"` - - // The DB cluster identifier for the cluster being modified. This parameter - // is not case-sensitive. - // - // Constraints: - // - // * Must match the identifier of an existing DBCluster. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The name of the DB cluster parameter group to use for the DB cluster. - DBClusterParameterGroupName *string `type:"string"` - - // Indicates if the DB cluster has deletion protection enabled. The database - // can't be deleted when this value is set to true. - DeletionProtection *bool `type:"boolean"` - - // HTTP endpoint functionality is in beta for Aurora Serverless and is subject - // to change. - // - // A value that indicates whether to enable the HTTP endpoint for an Aurora - // Serverless DB cluster. By default, the HTTP endpoint is disabled. - // - // When enabled, the HTTP endpoint provides a connectionless web service API - // for running SQL queries on the Aurora Serverless DB cluster. You can also - // query your database from inside the RDS console with the query editor. - // - // For more information about Aurora Serverless, see Using Amazon Aurora Serverless - // (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) - // in the Amazon Aurora User Guide. - EnableHttpEndpoint *bool `type:"boolean"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // The version number of the database engine to which you want to upgrade. Changing - // this parameter results in an outage. The change is applied during the next - // maintenance window unless the ApplyImmediately parameter is set to true. - // - // For a list of valid engine versions, see CreateDBCluster, or call DescribeDBEngineVersions. - EngineVersion *string `type:"string"` - - // The new password for the master database user. This password can contain - // any printable ASCII character except "/", """, or "@". - // - // Constraints: Must contain from 8 to 41 characters. - MasterUserPassword *string `type:"string"` - - // The new DB cluster identifier for the DB cluster when renaming a DB cluster. - // This value is stored as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens - // - // * The first character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // Example: my-cluster2 - NewDBClusterIdentifier *string `type:"string"` - - // A value that indicates that the DB cluster should be associated with the - // specified option group. Changing this parameter doesn't result in an outage - // except in the following case, and the change is applied during the next maintenance - // window unless the ApplyImmediately parameter is set to true for this request. - // If the parameter change results in an option group that enables OEM, this - // change can cause a brief (sub-second) period during which new connections - // are rejected but existing connections are not interrupted. - // - // Permanent options can't be removed from an option group. The option group - // can't be removed from a DB cluster once it is associated with a DB cluster. - OptionGroupName *string `type:"string"` - - // The port number on which the DB cluster accepts connections. - // - // Constraints: Value must be 1150-65535 - // - // Default: The same port as the original DB cluster. - Port *int64 `type:"integer"` - - // The daily time range during which automated backups are created if automated - // backups are enabled, using the BackupRetentionPeriod parameter. - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region. To see the time blocks available, see Adjusting - // the Preferred DB Cluster Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) - // in the Amazon Aurora User Guide. - // - // Constraints: - // - // * Must be in the format hh24:mi-hh24:mi. - // - // * Must be in Universal Coordinated Time (UTC). - // - // * Must not conflict with the preferred maintenance window. - // - // * Must be at least 30 minutes. - PreferredBackupWindow *string `type:"string"` - - // The weekly time range during which system maintenance can occur, in Universal - // Coordinated Time (UTC). - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region, occurring on a random day of the week. To see - // the time blocks available, see Adjusting the Preferred DB Cluster Maintenance - // Window (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) - // in the Amazon Aurora User Guide. - // - // Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. - // - // Constraints: Minimum 30-minute window. - PreferredMaintenanceWindow *string `type:"string"` - - // The scaling properties of the DB cluster. You can only modify scaling properties - // for DB clusters in serverless DB engine mode. - ScalingConfiguration *ScalingConfiguration `type:"structure"` - - // A list of VPC security groups that the DB cluster will belong to. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s ModifyDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *ModifyDBClusterInput) SetApplyImmediately(v bool) *ModifyDBClusterInput { - s.ApplyImmediately = &v - return s -} - -// SetBacktrackWindow sets the BacktrackWindow field's value. -func (s *ModifyDBClusterInput) SetBacktrackWindow(v int64) *ModifyDBClusterInput { - s.BacktrackWindow = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *ModifyDBClusterInput) SetBackupRetentionPeriod(v int64) *ModifyDBClusterInput { - s.BackupRetentionPeriod = &v - return s -} - -// SetCloudwatchLogsExportConfiguration sets the CloudwatchLogsExportConfiguration field's value. -func (s *ModifyDBClusterInput) SetCloudwatchLogsExportConfiguration(v *CloudwatchLogsExportConfiguration) *ModifyDBClusterInput { - s.CloudwatchLogsExportConfiguration = v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *ModifyDBClusterInput) SetDBClusterIdentifier(v string) *ModifyDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *ModifyDBClusterInput) SetDBClusterParameterGroupName(v string) *ModifyDBClusterInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *ModifyDBClusterInput) SetDeletionProtection(v bool) *ModifyDBClusterInput { - s.DeletionProtection = &v - return s -} - -// SetEnableHttpEndpoint sets the EnableHttpEndpoint field's value. -func (s *ModifyDBClusterInput) SetEnableHttpEndpoint(v bool) *ModifyDBClusterInput { - s.EnableHttpEndpoint = &v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *ModifyDBClusterInput) SetEnableIAMDatabaseAuthentication(v bool) *ModifyDBClusterInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *ModifyDBClusterInput) SetEngineVersion(v string) *ModifyDBClusterInput { - s.EngineVersion = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *ModifyDBClusterInput) SetMasterUserPassword(v string) *ModifyDBClusterInput { - s.MasterUserPassword = &v - return s -} - -// SetNewDBClusterIdentifier sets the NewDBClusterIdentifier field's value. -func (s *ModifyDBClusterInput) SetNewDBClusterIdentifier(v string) *ModifyDBClusterInput { - s.NewDBClusterIdentifier = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *ModifyDBClusterInput) SetOptionGroupName(v string) *ModifyDBClusterInput { - s.OptionGroupName = &v - return s -} - -// SetPort sets the Port field's value. -func (s *ModifyDBClusterInput) SetPort(v int64) *ModifyDBClusterInput { - s.Port = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *ModifyDBClusterInput) SetPreferredBackupWindow(v string) *ModifyDBClusterInput { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *ModifyDBClusterInput) SetPreferredMaintenanceWindow(v string) *ModifyDBClusterInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetScalingConfiguration sets the ScalingConfiguration field's value. -func (s *ModifyDBClusterInput) SetScalingConfiguration(v *ScalingConfiguration) *ModifyDBClusterInput { - s.ScalingConfiguration = v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *ModifyDBClusterInput) SetVpcSecurityGroupIds(v []*string) *ModifyDBClusterInput { - s.VpcSecurityGroupIds = v - return s -} - -type ModifyDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Aurora DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, - // and StartDBCluster actions. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s ModifyDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *ModifyDBClusterOutput) SetDBCluster(v *DBCluster) *ModifyDBClusterOutput { - s.DBCluster = v - return s -} - -type ModifyDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group to modify. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` - - // A list of parameters in the DB cluster parameter group to modify. - // - // Parameters is a required field - Parameters []*Parameter `locationNameList:"Parameter" type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterParameterGroupInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - if s.Parameters == nil { - invalidParams.Add(request.NewErrParamRequired("Parameters")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *ModifyDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *ModifyDBClusterParameterGroupInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ModifyDBClusterParameterGroupInput) SetParameters(v []*Parameter) *ModifyDBClusterParameterGroupInput { - s.Parameters = v - return s -} - -type ModifyDBClusterSnapshotAttributeInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster snapshot attribute to modify. - // - // To manage authorization for other AWS accounts to copy or restore a manual - // DB cluster snapshot, set this value to restore. - // - // AttributeName is a required field - AttributeName *string `type:"string" required:"true"` - - // The identifier for the DB cluster snapshot to modify the attributes for. - // - // DBClusterSnapshotIdentifier is a required field - DBClusterSnapshotIdentifier *string `type:"string" required:"true"` - - // A list of DB cluster snapshot attributes to add to the attribute specified - // by AttributeName. - // - // To authorize other AWS accounts to copy or restore a manual DB cluster snapshot, - // set this list to include one or more AWS account IDs, or all to make the - // manual DB cluster snapshot restorable by any AWS account. Do not add the - // all value for any manual DB cluster snapshots that contain private information - // that you don't want available to all AWS accounts. - ValuesToAdd []*string `locationNameList:"AttributeValue" type:"list"` - - // A list of DB cluster snapshot attributes to remove from the attribute specified - // by AttributeName. - // - // To remove authorization for other AWS accounts to copy or restore a manual - // DB cluster snapshot, set this list to include one or more AWS account identifiers, - // or all to remove authorization for any AWS account to copy or restore the - // DB cluster snapshot. If you specify all, an AWS account whose account ID - // is explicitly added to the restore attribute can still copy or restore a - // manual DB cluster snapshot. - ValuesToRemove []*string `locationNameList:"AttributeValue" type:"list"` -} - -// String returns the string representation -func (s ModifyDBClusterSnapshotAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterSnapshotAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBClusterSnapshotAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterSnapshotAttributeInput"} - if s.AttributeName == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeName")) - } - if s.DBClusterSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeName sets the AttributeName field's value. -func (s *ModifyDBClusterSnapshotAttributeInput) SetAttributeName(v string) *ModifyDBClusterSnapshotAttributeInput { - s.AttributeName = &v - return s -} - -// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. -func (s *ModifyDBClusterSnapshotAttributeInput) SetDBClusterSnapshotIdentifier(v string) *ModifyDBClusterSnapshotAttributeInput { - s.DBClusterSnapshotIdentifier = &v - return s -} - -// SetValuesToAdd sets the ValuesToAdd field's value. -func (s *ModifyDBClusterSnapshotAttributeInput) SetValuesToAdd(v []*string) *ModifyDBClusterSnapshotAttributeInput { - s.ValuesToAdd = v - return s -} - -// SetValuesToRemove sets the ValuesToRemove field's value. -func (s *ModifyDBClusterSnapshotAttributeInput) SetValuesToRemove(v []*string) *ModifyDBClusterSnapshotAttributeInput { - s.ValuesToRemove = v - return s -} - -type ModifyDBClusterSnapshotAttributeOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful call to the DescribeDBClusterSnapshotAttributes - // API action. - // - // Manual DB cluster snapshot attributes are used to authorize other AWS accounts - // to copy or restore a manual DB cluster snapshot. For more information, see - // the ModifyDBClusterSnapshotAttribute API action. - DBClusterSnapshotAttributesResult *DBClusterSnapshotAttributesResult `type:"structure"` -} - -// String returns the string representation -func (s ModifyDBClusterSnapshotAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBClusterSnapshotAttributeOutput) GoString() string { - return s.String() -} - -// SetDBClusterSnapshotAttributesResult sets the DBClusterSnapshotAttributesResult field's value. -func (s *ModifyDBClusterSnapshotAttributeOutput) SetDBClusterSnapshotAttributesResult(v *DBClusterSnapshotAttributesResult) *ModifyDBClusterSnapshotAttributeOutput { - s.DBClusterSnapshotAttributesResult = v - return s -} - -type ModifyDBInstanceInput struct { - _ struct{} `type:"structure"` - - // The new amount of storage (in gibibytes) to allocate for the DB instance. - // - // For MariaDB, MySQL, Oracle, and PostgreSQL, the value supplied must be at - // least 10% greater than the current value. Values that are not at least 10% - // greater than the existing value are rounded up so that they are 10% greater - // than the current value. - // - // For the valid values for allocated storage for each engine, see CreateDBInstance. - AllocatedStorage *int64 `type:"integer"` - - // Indicates that major version upgrades are allowed. Changing this parameter - // doesn't result in an outage and the change is asynchronously applied as soon - // as possible. - // - // Constraints: This parameter must be set to true when specifying a value for - // the EngineVersion parameter that is a different major version than the DB - // instance's current version. - AllowMajorVersionUpgrade *bool `type:"boolean"` - - // Specifies whether the modifications in this request and any pending modifications - // are asynchronously applied as soon as possible, regardless of the PreferredMaintenanceWindow - // setting for the DB instance. - // - // If this parameter is set to false, changes to the DB instance are applied - // during the next maintenance window. Some parameter changes can cause an outage - // and are applied on the next call to RebootDBInstance, or the next failure - // reboot. Review the table of parameters in Modifying a DB Instance and Using - // the Apply Immediately Parameter (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html) - // in the Amazon RDS User Guide. to see the impact that setting ApplyImmediately - // to true or false has for each modified parameter and to determine when the - // changes are applied. - // - // Default: false - ApplyImmediately *bool `type:"boolean"` - - // Indicates that minor version upgrades are applied automatically to the DB - // instance during the maintenance window. Changing this parameter doesn't result - // in an outage except in the following case and the change is asynchronously - // applied as soon as possible. An outage will result if this parameter is set - // to true during the maintenance window, and a newer minor version is available, - // and RDS has enabled auto patching for that engine version. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The number of days to retain automated backups. Setting this parameter to - // a positive number enables backups. Setting this parameter to 0 disables automated - // backups. - // - // Changing this parameter can result in an outage if you change from 0 to a - // non-zero value or from a non-zero value to 0. These changes are applied during - // the next maintenance window unless the ApplyImmediately parameter is set - // to true for this request. If you change the parameter from one non-zero value - // to another non-zero value, the change is asynchronously applied as soon as - // possible. - // - // Amazon Aurora - // - // Not applicable. The retention period for automated backups is managed by - // the DB cluster. For more information, see ModifyDBCluster. - // - // Default: Uses existing setting - // - // Constraints: - // - // * Must be a value from 0 to 35 - // - // * Can be specified for a MySQL Read Replica only if the source is running - // MySQL 5.6 or later - // - // * Can be specified for a PostgreSQL Read Replica only if the source is - // running PostgreSQL 9.3.5 - // - // * Can't be set to 0 if the DB instance is a source to Read Replicas - BackupRetentionPeriod *int64 `type:"integer"` - - // Indicates the certificate that needs to be associated with the instance. - CACertificateIdentifier *string `type:"string"` - - // The configuration setting for the log types to be enabled for export to CloudWatch - // Logs for a specific DB instance. - // - // A change to the CloudwatchLogsExportConfiguration parameter is always applied - // to the DB instance immediately. Therefore, the ApplyImmediately parameter - // has no effect. - CloudwatchLogsExportConfiguration *CloudwatchLogsExportConfiguration `type:"structure"` - - // True to copy all tags from the DB instance to snapshots of the DB instance, - // and otherwise false. The default is false. - CopyTagsToSnapshot *bool `type:"boolean"` - - // The new compute and memory capacity of the DB instance, for example, db.m4.large. - // Not all DB instance classes are available in all AWS Regions, or for all - // database engines. For the full list of DB instance classes, and availability - // for your engine, see DB Instance Class (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) - // in the Amazon RDS User Guide. - // - // If you modify the DB instance class, an outage occurs during the change. - // The change is applied during the next maintenance window, unless ApplyImmediately - // is specified as true for this request. - // - // Default: Uses existing setting - DBInstanceClass *string `type:"string"` - - // The DB instance identifier. This value is stored as a lowercase string. - // - // Constraints: - // - // * Must match the identifier of an existing DBInstance. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The name of the DB parameter group to apply to the DB instance. Changing - // this setting doesn't result in an outage. The parameter group name itself - // is changed immediately, but the actual parameter changes are not applied - // until you reboot the instance without failover. The db instance will NOT - // be rebooted automatically and the parameter changes will NOT be applied during - // the next maintenance window. - // - // Default: Uses existing setting - // - // Constraints: The DB parameter group must be in the same DB parameter group - // family as this DB instance. - DBParameterGroupName *string `type:"string"` - - // The port number on which the database accepts connections. - // - // The value of the DBPortNumber parameter must not match any of the port values - // specified for options in the option group for the DB instance. - // - // Your database will restart when you change the DBPortNumber value regardless - // of the value of the ApplyImmediately parameter. - // - // MySQL - // - // Default: 3306 - // - // Valid Values: 1150-65535 - // - // MariaDB - // - // Default: 3306 - // - // Valid Values: 1150-65535 - // - // PostgreSQL - // - // Default: 5432 - // - // Valid Values: 1150-65535 - // - // Type: Integer - // - // Oracle - // - // Default: 1521 - // - // Valid Values: 1150-65535 - // - // SQL Server - // - // Default: 1433 - // - // Valid Values: 1150-65535 except for 1434, 3389, 47001, 49152, and 49152 through - // 49156. - // - // Amazon Aurora - // - // Default: 3306 - // - // Valid Values: 1150-65535 - DBPortNumber *int64 `type:"integer"` - - // A list of DB security groups to authorize on this DB instance. Changing this - // setting doesn't result in an outage and the change is asynchronously applied - // as soon as possible. - // - // Constraints: - // - // * If supplied, must match existing DBSecurityGroups. - DBSecurityGroups []*string `locationNameList:"DBSecurityGroupName" type:"list"` - - // The new DB subnet group for the DB instance. You can use this parameter to - // move your DB instance to a different VPC. If your DB instance is not in a - // VPC, you can also use this parameter to move your DB instance into a VPC. - // For more information, see Updating the VPC for a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Non-VPC2VPC) - // in the Amazon RDS User Guide. - // - // Changing the subnet group causes an outage during the change. The change - // is applied during the next maintenance window, unless you specify true for - // the ApplyImmediately parameter. - // - // Constraints: If supplied, must match the name of an existing DBSubnetGroup. - // - // Example: mySubnetGroup - DBSubnetGroupName *string `type:"string"` - - // Indicates if the DB instance has deletion protection enabled. The database - // can't be deleted when this value is set to true. For more information, see - // Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). - DeletionProtection *bool `type:"boolean"` - - // The Active Directory Domain to move the instance to. Specify none to remove - // the instance from its current domain. The domain must be created prior to - // this operation. Currently only a Microsoft SQL Server instance can be created - // in a Active Directory Domain. - Domain *string `type:"string"` - - // The name of the IAM role to use when making API calls to the Directory Service. - DomainIAMRoleName *string `type:"string"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // You can enable IAM database authentication for the following database engines - // - // Amazon Aurora - // - // Not applicable. Mapping AWS IAM accounts to database accounts is managed - // by the DB cluster. For more information, see ModifyDBCluster. - // - // MySQL - // - // * For MySQL 5.6, minor version 5.6.34 or higher - // - // * For MySQL 5.7, minor version 5.7.16 or higher - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // True to enable Performance Insights for the DB instance, and otherwise false. - // - // For more information, see Using Amazon Performance Insights (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) - // in the Amazon Relational Database Service User Guide. - EnablePerformanceInsights *bool `type:"boolean"` - - // The version number of the database engine to upgrade to. Changing this parameter - // results in an outage and the change is applied during the next maintenance - // window unless the ApplyImmediately parameter is set to true for this request. - // - // For major version upgrades, if a nondefault DB parameter group is currently - // in use, a new DB parameter group in the DB parameter group family for the - // new engine version must be specified. The new DB parameter group can be the - // default for that DB parameter group family. - // - // For information about valid engine versions, see CreateDBInstance, or call - // DescribeDBEngineVersions. - EngineVersion *string `type:"string"` - - // The new Provisioned IOPS (I/O operations per second) value for the RDS instance. - // - // Changing this setting doesn't result in an outage and the change is applied - // during the next maintenance window unless the ApplyImmediately parameter - // is set to true for this request. If you are migrating from Provisioned IOPS - // to standard storage, set this value to 0. The DB instance will require a - // reboot for the change in storage type to take effect. - // - // If you choose to migrate your DB instance from using standard storage to - // using Provisioned IOPS, or from using Provisioned IOPS to using standard - // storage, the process can take time. The duration of the migration depends - // on several factors such as database load, storage size, storage type (standard - // or Provisioned IOPS), amount of IOPS provisioned (if any), and the number - // of prior scale storage operations. Typical migration times are under 24 hours, - // but the process can take up to several days in some cases. During the migration, - // the DB instance is available for use, but might experience performance degradation. - // While the migration takes place, nightly backups for the instance are suspended. - // No other Amazon RDS operations can take place for the instance, including - // modifying the instance, rebooting the instance, deleting the instance, creating - // a Read Replica for the instance, and creating a DB snapshot of the instance. - // - // Constraints: For MariaDB, MySQL, Oracle, and PostgreSQL, the value supplied - // must be at least 10% greater than the current value. Values that are not - // at least 10% greater than the existing value are rounded up so that they - // are 10% greater than the current value. - // - // Default: Uses existing setting - Iops *int64 `type:"integer"` - - // The license model for the DB instance. - // - // Valid values: license-included | bring-your-own-license | general-public-license - LicenseModel *string `type:"string"` - - // The new password for the master user. The password can include any printable - // ASCII character except "/", """, or "@". - // - // Changing this parameter doesn't result in an outage and the change is asynchronously - // applied as soon as possible. Between the time of the request and the completion - // of the request, the MasterUserPassword element exists in the PendingModifiedValues - // element of the operation response. - // - // Amazon Aurora - // - // Not applicable. The password for the master user is managed by the DB cluster. - // For more information, see ModifyDBCluster. - // - // Default: Uses existing setting - // - // MariaDB - // - // Constraints: Must contain from 8 to 41 characters. - // - // Microsoft SQL Server - // - // Constraints: Must contain from 8 to 128 characters. - // - // MySQL - // - // Constraints: Must contain from 8 to 41 characters. - // - // Oracle - // - // Constraints: Must contain from 8 to 30 characters. - // - // PostgreSQL - // - // Constraints: Must contain from 8 to 128 characters. - // - // Amazon RDS API actions never return the password, so this action provides - // a way to regain access to a primary instance user if the password is lost. - // This includes restoring privileges that might have been accidentally revoked. - MasterUserPassword *string `type:"string"` - - // The interval, in seconds, between points when Enhanced Monitoring metrics - // are collected for the DB instance. To disable collecting Enhanced Monitoring - // metrics, specify 0. The default is 0. - // - // If MonitoringRoleArn is specified, then you must also set MonitoringInterval - // to a value other than 0. - // - // Valid Values: 0, 1, 5, 10, 15, 30, 60 - MonitoringInterval *int64 `type:"integer"` - - // The ARN for the IAM role that permits RDS to send enhanced monitoring metrics - // to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. - // For information on creating a monitoring role, go to To create an IAM role - // for Amazon RDS Enhanced Monitoring (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole) - // in the Amazon RDS User Guide. - // - // If MonitoringInterval is set to a value other than 0, then you must supply - // a MonitoringRoleArn value. - MonitoringRoleArn *string `type:"string"` - - // Specifies if the DB instance is a Multi-AZ deployment. Changing this parameter - // doesn't result in an outage and the change is applied during the next maintenance - // window unless the ApplyImmediately parameter is set to true for this request. - MultiAZ *bool `type:"boolean"` - - // The new DB instance identifier for the DB instance when renaming a DB instance. - // When you change the DB instance identifier, an instance reboot will occur - // immediately if you set Apply Immediately to true, or will occur during the - // next maintenance window if Apply Immediately to false. This value is stored - // as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * The first character must be a letter. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - // - // Example: mydbinstance - NewDBInstanceIdentifier *string `type:"string"` - - // Indicates that the DB instance should be associated with the specified option - // group. Changing this parameter doesn't result in an outage except in the - // following case and the change is applied during the next maintenance window - // unless the ApplyImmediately parameter is set to true for this request. If - // the parameter change results in an option group that enables OEM, this change - // can cause a brief (sub-second) period during which new connections are rejected - // but existing connections are not interrupted. - // - // Permanent options, such as the TDE option for Oracle Advanced Security TDE, - // can't be removed from an option group, and that option group can't be removed - // from a DB instance once it is associated with a DB instance - OptionGroupName *string `type:"string"` - - // The AWS KMS key identifier for encryption of Performance Insights data. The - // KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the - // KMS key alias for the KMS encryption key. - PerformanceInsightsKMSKeyId *string `type:"string"` - - // The amount of time, in days, to retain Performance Insights data. Valid values - // are 7 or 731 (2 years). - PerformanceInsightsRetentionPeriod *int64 `type:"integer"` - - // The daily time range during which automated backups are created if automated - // backups are enabled, as determined by the BackupRetentionPeriod parameter. - // Changing this parameter doesn't result in an outage and the change is asynchronously - // applied as soon as possible. - // - // Amazon Aurora - // - // Not applicable. The daily time range for creating automated backups is managed - // by the DB cluster. For more information, see ModifyDBCluster. - // - // Constraints: - // - // * Must be in the format hh24:mi-hh24:mi - // - // * Must be in Universal Time Coordinated (UTC) - // - // * Must not conflict with the preferred maintenance window - // - // * Must be at least 30 minutes - PreferredBackupWindow *string `type:"string"` - - // The weekly time range (in UTC) during which system maintenance can occur, - // which might result in an outage. Changing this parameter doesn't result in - // an outage, except in the following situation, and the change is asynchronously - // applied as soon as possible. If there are pending actions that cause a reboot, - // and the maintenance window is changed to include the current time, then changing - // this parameter will cause a reboot of the DB instance. If moving this window - // to the current time, there must be at least 30 minutes between the current - // time and end of the window to ensure pending changes are applied. - // - // Default: Uses existing setting - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun - // - // Constraints: Must be at least 30 minutes - PreferredMaintenanceWindow *string `type:"string"` - - // The number of CPU cores and the number of threads per core for the DB instance - // class of the DB instance. - ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` - - // A value that specifies the order in which an Aurora Replica is promoted to - // the primary instance after a failure of the existing primary instance. For - // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.FaultTolerance) - // in the Amazon Aurora User Guide. - // - // Default: 1 - // - // Valid Values: 0 - 15 - PromotionTier *int64 `type:"integer"` - - // Boolean value that indicates if the DB instance has a publicly resolvable - // DNS name. Set to True to make the DB instance Internet-facing with a publicly - // resolvable DNS name, which resolves to a public IP address. Set to False - // to make the DB instance internal with a DNS name that resolves to a private - // IP address. - // - // PubliclyAccessible only applies to DB instances in a VPC. The DB instance - // must be part of a public subnet and PubliclyAccessible must be true in order - // for it to be publicly accessible. - // - // Changes to the PubliclyAccessible parameter are applied immediately regardless - // of the value of the ApplyImmediately parameter. - // - // Default: false - PubliclyAccessible *bool `type:"boolean"` - - // Specifies the storage type to be associated with the DB instance. - // - // If you specify Provisioned IOPS (io1), you must also include a value for - // the Iops parameter. - // - // If you choose to migrate your DB instance from using standard storage to - // using Provisioned IOPS, or from using Provisioned IOPS to using standard - // storage, the process can take time. The duration of the migration depends - // on several factors such as database load, storage size, storage type (standard - // or Provisioned IOPS), amount of IOPS provisioned (if any), and the number - // of prior scale storage operations. Typical migration times are under 24 hours, - // but the process can take up to several days in some cases. During the migration, - // the DB instance is available for use, but might experience performance degradation. - // While the migration takes place, nightly backups for the instance are suspended. - // No other Amazon RDS operations can take place for the instance, including - // modifying the instance, rebooting the instance, deleting the instance, creating - // a Read Replica for the instance, and creating a DB snapshot of the instance. - // - // Valid values: standard | gp2 | io1 - // - // Default: io1 if the Iops parameter is specified, otherwise standard - StorageType *string `type:"string"` - - // The ARN from the key store with which to associate the instance for TDE encryption. - TdeCredentialArn *string `type:"string"` - - // The password for the given ARN from the key store in order to access the - // device. - TdeCredentialPassword *string `type:"string"` - - // A value that specifies that the DB instance class of the DB instance uses - // its default processor features. - UseDefaultProcessorFeatures *bool `type:"boolean"` - - // A list of EC2 VPC security groups to authorize on this DB instance. This - // change is asynchronously applied as soon as possible. - // - // Amazon Aurora - // - // Not applicable. The associated list of EC2 VPC security groups is managed - // by the DB cluster. For more information, see ModifyDBCluster. - // - // Constraints: - // - // * If supplied, must match existing VpcSecurityGroupIds. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s ModifyDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBInstanceInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *ModifyDBInstanceInput) SetAllocatedStorage(v int64) *ModifyDBInstanceInput { - s.AllocatedStorage = &v - return s -} - -// SetAllowMajorVersionUpgrade sets the AllowMajorVersionUpgrade field's value. -func (s *ModifyDBInstanceInput) SetAllowMajorVersionUpgrade(v bool) *ModifyDBInstanceInput { - s.AllowMajorVersionUpgrade = &v - return s -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *ModifyDBInstanceInput) SetApplyImmediately(v bool) *ModifyDBInstanceInput { - s.ApplyImmediately = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *ModifyDBInstanceInput) SetAutoMinorVersionUpgrade(v bool) *ModifyDBInstanceInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *ModifyDBInstanceInput) SetBackupRetentionPeriod(v int64) *ModifyDBInstanceInput { - s.BackupRetentionPeriod = &v - return s -} - -// SetCACertificateIdentifier sets the CACertificateIdentifier field's value. -func (s *ModifyDBInstanceInput) SetCACertificateIdentifier(v string) *ModifyDBInstanceInput { - s.CACertificateIdentifier = &v - return s -} - -// SetCloudwatchLogsExportConfiguration sets the CloudwatchLogsExportConfiguration field's value. -func (s *ModifyDBInstanceInput) SetCloudwatchLogsExportConfiguration(v *CloudwatchLogsExportConfiguration) *ModifyDBInstanceInput { - s.CloudwatchLogsExportConfiguration = v - return s -} - -// SetCopyTagsToSnapshot sets the CopyTagsToSnapshot field's value. -func (s *ModifyDBInstanceInput) SetCopyTagsToSnapshot(v bool) *ModifyDBInstanceInput { - s.CopyTagsToSnapshot = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *ModifyDBInstanceInput) SetDBInstanceClass(v string) *ModifyDBInstanceInput { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *ModifyDBInstanceInput) SetDBInstanceIdentifier(v string) *ModifyDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *ModifyDBInstanceInput) SetDBParameterGroupName(v string) *ModifyDBInstanceInput { - s.DBParameterGroupName = &v - return s -} - -// SetDBPortNumber sets the DBPortNumber field's value. -func (s *ModifyDBInstanceInput) SetDBPortNumber(v int64) *ModifyDBInstanceInput { - s.DBPortNumber = &v - return s -} - -// SetDBSecurityGroups sets the DBSecurityGroups field's value. -func (s *ModifyDBInstanceInput) SetDBSecurityGroups(v []*string) *ModifyDBInstanceInput { - s.DBSecurityGroups = v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *ModifyDBInstanceInput) SetDBSubnetGroupName(v string) *ModifyDBInstanceInput { - s.DBSubnetGroupName = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *ModifyDBInstanceInput) SetDeletionProtection(v bool) *ModifyDBInstanceInput { - s.DeletionProtection = &v - return s -} - -// SetDomain sets the Domain field's value. -func (s *ModifyDBInstanceInput) SetDomain(v string) *ModifyDBInstanceInput { - s.Domain = &v - return s -} - -// SetDomainIAMRoleName sets the DomainIAMRoleName field's value. -func (s *ModifyDBInstanceInput) SetDomainIAMRoleName(v string) *ModifyDBInstanceInput { - s.DomainIAMRoleName = &v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *ModifyDBInstanceInput) SetEnableIAMDatabaseAuthentication(v bool) *ModifyDBInstanceInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEnablePerformanceInsights sets the EnablePerformanceInsights field's value. -func (s *ModifyDBInstanceInput) SetEnablePerformanceInsights(v bool) *ModifyDBInstanceInput { - s.EnablePerformanceInsights = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *ModifyDBInstanceInput) SetEngineVersion(v string) *ModifyDBInstanceInput { - s.EngineVersion = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *ModifyDBInstanceInput) SetIops(v int64) *ModifyDBInstanceInput { - s.Iops = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *ModifyDBInstanceInput) SetLicenseModel(v string) *ModifyDBInstanceInput { - s.LicenseModel = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *ModifyDBInstanceInput) SetMasterUserPassword(v string) *ModifyDBInstanceInput { - s.MasterUserPassword = &v - return s -} - -// SetMonitoringInterval sets the MonitoringInterval field's value. -func (s *ModifyDBInstanceInput) SetMonitoringInterval(v int64) *ModifyDBInstanceInput { - s.MonitoringInterval = &v - return s -} - -// SetMonitoringRoleArn sets the MonitoringRoleArn field's value. -func (s *ModifyDBInstanceInput) SetMonitoringRoleArn(v string) *ModifyDBInstanceInput { - s.MonitoringRoleArn = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *ModifyDBInstanceInput) SetMultiAZ(v bool) *ModifyDBInstanceInput { - s.MultiAZ = &v - return s -} - -// SetNewDBInstanceIdentifier sets the NewDBInstanceIdentifier field's value. -func (s *ModifyDBInstanceInput) SetNewDBInstanceIdentifier(v string) *ModifyDBInstanceInput { - s.NewDBInstanceIdentifier = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *ModifyDBInstanceInput) SetOptionGroupName(v string) *ModifyDBInstanceInput { - s.OptionGroupName = &v - return s -} - -// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. -func (s *ModifyDBInstanceInput) SetPerformanceInsightsKMSKeyId(v string) *ModifyDBInstanceInput { - s.PerformanceInsightsKMSKeyId = &v - return s -} - -// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. -func (s *ModifyDBInstanceInput) SetPerformanceInsightsRetentionPeriod(v int64) *ModifyDBInstanceInput { - s.PerformanceInsightsRetentionPeriod = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *ModifyDBInstanceInput) SetPreferredBackupWindow(v string) *ModifyDBInstanceInput { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *ModifyDBInstanceInput) SetPreferredMaintenanceWindow(v string) *ModifyDBInstanceInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetProcessorFeatures sets the ProcessorFeatures field's value. -func (s *ModifyDBInstanceInput) SetProcessorFeatures(v []*ProcessorFeature) *ModifyDBInstanceInput { - s.ProcessorFeatures = v - return s -} - -// SetPromotionTier sets the PromotionTier field's value. -func (s *ModifyDBInstanceInput) SetPromotionTier(v int64) *ModifyDBInstanceInput { - s.PromotionTier = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *ModifyDBInstanceInput) SetPubliclyAccessible(v bool) *ModifyDBInstanceInput { - s.PubliclyAccessible = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *ModifyDBInstanceInput) SetStorageType(v string) *ModifyDBInstanceInput { - s.StorageType = &v - return s -} - -// SetTdeCredentialArn sets the TdeCredentialArn field's value. -func (s *ModifyDBInstanceInput) SetTdeCredentialArn(v string) *ModifyDBInstanceInput { - s.TdeCredentialArn = &v - return s -} - -// SetTdeCredentialPassword sets the TdeCredentialPassword field's value. -func (s *ModifyDBInstanceInput) SetTdeCredentialPassword(v string) *ModifyDBInstanceInput { - s.TdeCredentialPassword = &v - return s -} - -// SetUseDefaultProcessorFeatures sets the UseDefaultProcessorFeatures field's value. -func (s *ModifyDBInstanceInput) SetUseDefaultProcessorFeatures(v bool) *ModifyDBInstanceInput { - s.UseDefaultProcessorFeatures = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *ModifyDBInstanceInput) SetVpcSecurityGroupIds(v []*string) *ModifyDBInstanceInput { - s.VpcSecurityGroupIds = v - return s -} - -type ModifyDBInstanceOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s ModifyDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBInstanceOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *ModifyDBInstanceOutput) SetDBInstance(v *DBInstance) *ModifyDBInstanceOutput { - s.DBInstance = v - return s -} - -type ModifyDBParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB parameter group. - // - // Constraints: - // - // * If supplied, must match the name of an existing DBParameterGroup. - // - // DBParameterGroupName is a required field - DBParameterGroupName *string `type:"string" required:"true"` - - // An array of parameter names, values, and the apply method for the parameter - // update. At least one parameter name, value, and apply method must be supplied; - // subsequent arguments are optional. A maximum of 20 parameters can be modified - // in a single request. - // - // Valid Values (for the application method): immediate | pending-reboot - // - // You can use the immediate value with dynamic parameters only. You can use - // the pending-reboot value for both dynamic and static parameters, and changes - // are applied when you reboot the DB instance without failover. - // - // Parameters is a required field - Parameters []*Parameter `locationNameList:"Parameter" type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyDBParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBParameterGroupInput"} - if s.DBParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) - } - if s.Parameters == nil { - invalidParams.Add(request.NewErrParamRequired("Parameters")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *ModifyDBParameterGroupInput) SetDBParameterGroupName(v string) *ModifyDBParameterGroupInput { - s.DBParameterGroupName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ModifyDBParameterGroupInput) SetParameters(v []*Parameter) *ModifyDBParameterGroupInput { - s.Parameters = v - return s -} - -type ModifyDBSnapshotAttributeInput struct { - _ struct{} `type:"structure"` - - // The name of the DB snapshot attribute to modify. - // - // To manage authorization for other AWS accounts to copy or restore a manual - // DB snapshot, set this value to restore. - // - // AttributeName is a required field - AttributeName *string `type:"string" required:"true"` - - // The identifier for the DB snapshot to modify the attributes for. - // - // DBSnapshotIdentifier is a required field - DBSnapshotIdentifier *string `type:"string" required:"true"` - - // A list of DB snapshot attributes to add to the attribute specified by AttributeName. - // - // To authorize other AWS accounts to copy or restore a manual snapshot, set - // this list to include one or more AWS account IDs, or all to make the manual - // DB snapshot restorable by any AWS account. Do not add the all value for any - // manual DB snapshots that contain private information that you don't want - // available to all AWS accounts. - ValuesToAdd []*string `locationNameList:"AttributeValue" type:"list"` - - // A list of DB snapshot attributes to remove from the attribute specified by - // AttributeName. - // - // To remove authorization for other AWS accounts to copy or restore a manual - // snapshot, set this list to include one or more AWS account identifiers, or - // all to remove authorization for any AWS account to copy or restore the DB - // snapshot. If you specify all, an AWS account whose account ID is explicitly - // added to the restore attribute can still copy or restore the manual DB snapshot. - ValuesToRemove []*string `locationNameList:"AttributeValue" type:"list"` -} - -// String returns the string representation -func (s ModifyDBSnapshotAttributeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBSnapshotAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBSnapshotAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBSnapshotAttributeInput"} - if s.AttributeName == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeName")) - } - if s.DBSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeName sets the AttributeName field's value. -func (s *ModifyDBSnapshotAttributeInput) SetAttributeName(v string) *ModifyDBSnapshotAttributeInput { - s.AttributeName = &v - return s -} - -// SetDBSnapshotIdentifier sets the DBSnapshotIdentifier field's value. -func (s *ModifyDBSnapshotAttributeInput) SetDBSnapshotIdentifier(v string) *ModifyDBSnapshotAttributeInput { - s.DBSnapshotIdentifier = &v - return s -} - -// SetValuesToAdd sets the ValuesToAdd field's value. -func (s *ModifyDBSnapshotAttributeInput) SetValuesToAdd(v []*string) *ModifyDBSnapshotAttributeInput { - s.ValuesToAdd = v - return s -} - -// SetValuesToRemove sets the ValuesToRemove field's value. -func (s *ModifyDBSnapshotAttributeInput) SetValuesToRemove(v []*string) *ModifyDBSnapshotAttributeInput { - s.ValuesToRemove = v - return s -} - -type ModifyDBSnapshotAttributeOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful call to the DescribeDBSnapshotAttributes - // API action. - // - // Manual DB snapshot attributes are used to authorize other AWS accounts to - // copy or restore a manual DB snapshot. For more information, see the ModifyDBSnapshotAttribute - // API action. - DBSnapshotAttributesResult *DBSnapshotAttributesResult `type:"structure"` -} - -// String returns the string representation -func (s ModifyDBSnapshotAttributeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBSnapshotAttributeOutput) GoString() string { - return s.String() -} - -// SetDBSnapshotAttributesResult sets the DBSnapshotAttributesResult field's value. -func (s *ModifyDBSnapshotAttributeOutput) SetDBSnapshotAttributesResult(v *DBSnapshotAttributesResult) *ModifyDBSnapshotAttributeOutput { - s.DBSnapshotAttributesResult = v - return s -} - -type ModifyDBSnapshotInput struct { - _ struct{} `type:"structure"` - - // The identifier of the DB snapshot to modify. - // - // DBSnapshotIdentifier is a required field - DBSnapshotIdentifier *string `type:"string" required:"true"` - - // The engine version to upgrade the DB snapshot to. - // - // The following are the database engines and engine versions that are available - // when you upgrade a DB snapshot. - // - // MySQL - // - // * 5.5.46 (supported for 5.1 DB snapshots) - // - // Oracle - // - // * 12.1.0.2.v8 (supported for 12.1.0.1 DB snapshots) - // - // * 11.2.0.4.v12 (supported for 11.2.0.2 DB snapshots) - // - // * 11.2.0.4.v11 (supported for 11.2.0.3 DB snapshots) - EngineVersion *string `type:"string"` - - // The option group to identify with the upgraded DB snapshot. - // - // You can specify this parameter when you upgrade an Oracle DB snapshot. The - // same option group considerations apply when upgrading a DB snapshot as when - // upgrading a DB instance. For more information, see Option Group Considerations - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.html#USER_UpgradeDBInstance.Oracle.OGPG.OG) - // in the Amazon RDS User Guide. - OptionGroupName *string `type:"string"` -} - -// String returns the string representation -func (s ModifyDBSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBSnapshotInput"} - if s.DBSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSnapshotIdentifier sets the DBSnapshotIdentifier field's value. -func (s *ModifyDBSnapshotInput) SetDBSnapshotIdentifier(v string) *ModifyDBSnapshotInput { - s.DBSnapshotIdentifier = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *ModifyDBSnapshotInput) SetEngineVersion(v string) *ModifyDBSnapshotInput { - s.EngineVersion = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *ModifyDBSnapshotInput) SetOptionGroupName(v string) *ModifyDBSnapshotInput { - s.OptionGroupName = &v - return s -} - -type ModifyDBSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB snapshot. - // - // This data type is used as a response element in the DescribeDBSnapshots action. - DBSnapshot *DBSnapshot `type:"structure"` -} - -// String returns the string representation -func (s ModifyDBSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBSnapshot sets the DBSnapshot field's value. -func (s *ModifyDBSnapshotOutput) SetDBSnapshot(v *DBSnapshot) *ModifyDBSnapshotOutput { - s.DBSnapshot = v - return s -} - -type ModifyDBSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The description for the DB subnet group. - DBSubnetGroupDescription *string `type:"string"` - - // The name for the DB subnet group. This value is stored as a lowercase string. - // You can't modify the default subnet group. - // - // Constraints: Must match the name of an existing DBSubnetGroup. Must not be - // default. - // - // Example: mySubnetgroup - // - // DBSubnetGroupName is a required field - DBSubnetGroupName *string `type:"string" required:"true"` - - // The EC2 subnet IDs for the DB subnet group. - // - // SubnetIds is a required field - SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyDBSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDBSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDBSubnetGroupInput"} - if s.DBSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. -func (s *ModifyDBSubnetGroupInput) SetDBSubnetGroupDescription(v string) *ModifyDBSubnetGroupInput { - s.DBSubnetGroupDescription = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *ModifyDBSubnetGroupInput) SetDBSubnetGroupName(v string) *ModifyDBSubnetGroupInput { - s.DBSubnetGroupName = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *ModifyDBSubnetGroupInput) SetSubnetIds(v []*string) *ModifyDBSubnetGroupInput { - s.SubnetIds = v - return s -} - -type ModifyDBSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB subnet group. - // - // This data type is used as a response element in the DescribeDBSubnetGroups - // action. - DBSubnetGroup *DBSubnetGroup `type:"structure"` -} - -// String returns the string representation -func (s ModifyDBSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDBSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetDBSubnetGroup sets the DBSubnetGroup field's value. -func (s *ModifyDBSubnetGroupOutput) SetDBSubnetGroup(v *DBSubnetGroup) *ModifyDBSubnetGroupOutput { - s.DBSubnetGroup = v - return s -} - -type ModifyEventSubscriptionInput struct { - _ struct{} `type:"structure"` - - // A Boolean value; set to true to activate the subscription. - Enabled *bool `type:"boolean"` - - // A list of event categories for a SourceType that you want to subscribe to. - // You can see a list of the categories for a given SourceType in the Events - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html) - // topic in the Amazon RDS User Guide or by using the DescribeEventCategories - // action. - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // The Amazon Resource Name (ARN) of the SNS topic created for event notification. - // The ARN is created by Amazon SNS when you create a topic and subscribe to - // it. - SnsTopicArn *string `type:"string"` - - // The type of source that is generating the events. For example, if you want - // to be notified of events generated by a DB instance, you would set this parameter - // to db-instance. if this value is not specified, all events are returned. - // - // Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot - SourceType *string `type:"string"` - - // The name of the RDS event notification subscription. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyEventSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyEventSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyEventSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyEventSubscriptionInput"} - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *ModifyEventSubscriptionInput) SetEnabled(v bool) *ModifyEventSubscriptionInput { - s.Enabled = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *ModifyEventSubscriptionInput) SetEventCategories(v []*string) *ModifyEventSubscriptionInput { - s.EventCategories = v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *ModifyEventSubscriptionInput) SetSnsTopicArn(v string) *ModifyEventSubscriptionInput { - s.SnsTopicArn = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *ModifyEventSubscriptionInput) SetSourceType(v string) *ModifyEventSubscriptionInput { - s.SourceType = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *ModifyEventSubscriptionInput) SetSubscriptionName(v string) *ModifyEventSubscriptionInput { - s.SubscriptionName = &v - return s -} - -type ModifyEventSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful invocation of the DescribeEventSubscriptions - // action. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s ModifyEventSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyEventSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *ModifyEventSubscriptionOutput) SetEventSubscription(v *EventSubscription) *ModifyEventSubscriptionOutput { - s.EventSubscription = v - return s -} - -type ModifyGlobalClusterInput struct { - _ struct{} `type:"structure"` - - // Indicates if the global database cluster has deletion protection enabled. - // The global database cluster can't be deleted when this value is set to true. - DeletionProtection *bool `type:"boolean"` - - // The DB cluster identifier for the global cluster being modified. This parameter - // is not case-sensitive. - // - // Constraints: - // - // * Must match the identifier of an existing global database cluster. - GlobalClusterIdentifier *string `type:"string"` - - // The new cluster identifier for the global database cluster when modifying - // a global database cluster. This value is stored as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens - // - // * The first character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // Example: my-cluster2 - NewGlobalClusterIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s ModifyGlobalClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyGlobalClusterInput) GoString() string { - return s.String() -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *ModifyGlobalClusterInput) SetDeletionProtection(v bool) *ModifyGlobalClusterInput { - s.DeletionProtection = &v - return s -} - -// SetGlobalClusterIdentifier sets the GlobalClusterIdentifier field's value. -func (s *ModifyGlobalClusterInput) SetGlobalClusterIdentifier(v string) *ModifyGlobalClusterInput { - s.GlobalClusterIdentifier = &v - return s -} - -// SetNewGlobalClusterIdentifier sets the NewGlobalClusterIdentifier field's value. -func (s *ModifyGlobalClusterInput) SetNewGlobalClusterIdentifier(v string) *ModifyGlobalClusterInput { - s.NewGlobalClusterIdentifier = &v - return s -} - -type ModifyGlobalClusterOutput struct { - _ struct{} `type:"structure"` - - // A data type representing an Aurora global database. - GlobalCluster *GlobalCluster `type:"structure"` -} - -// String returns the string representation -func (s ModifyGlobalClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyGlobalClusterOutput) GoString() string { - return s.String() -} - -// SetGlobalCluster sets the GlobalCluster field's value. -func (s *ModifyGlobalClusterOutput) SetGlobalCluster(v *GlobalCluster) *ModifyGlobalClusterOutput { - s.GlobalCluster = v - return s -} - -type ModifyOptionGroupInput struct { - _ struct{} `type:"structure"` - - // Indicates whether the changes should be applied immediately, or during the - // next maintenance window for each instance associated with the option group. - ApplyImmediately *bool `type:"boolean"` - - // The name of the option group to be modified. - // - // Permanent options, such as the TDE option for Oracle Advanced Security TDE, - // can't be removed from an option group, and that option group can't be removed - // from a DB instance once it is associated with a DB instance - // - // OptionGroupName is a required field - OptionGroupName *string `type:"string" required:"true"` - - // Options in this list are added to the option group or, if already present, - // the specified configuration is used to update the existing configuration. - OptionsToInclude []*OptionConfiguration `locationNameList:"OptionConfiguration" type:"list"` - - // Options in this list are removed from the option group. - OptionsToRemove []*string `type:"list"` -} - -// String returns the string representation -func (s ModifyOptionGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyOptionGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyOptionGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyOptionGroupInput"} - if s.OptionGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("OptionGroupName")) - } - if s.OptionsToInclude != nil { - for i, v := range s.OptionsToInclude { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionsToInclude", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *ModifyOptionGroupInput) SetApplyImmediately(v bool) *ModifyOptionGroupInput { - s.ApplyImmediately = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *ModifyOptionGroupInput) SetOptionGroupName(v string) *ModifyOptionGroupInput { - s.OptionGroupName = &v - return s -} - -// SetOptionsToInclude sets the OptionsToInclude field's value. -func (s *ModifyOptionGroupInput) SetOptionsToInclude(v []*OptionConfiguration) *ModifyOptionGroupInput { - s.OptionsToInclude = v - return s -} - -// SetOptionsToRemove sets the OptionsToRemove field's value. -func (s *ModifyOptionGroupInput) SetOptionsToRemove(v []*string) *ModifyOptionGroupInput { - s.OptionsToRemove = v - return s -} - -type ModifyOptionGroupOutput struct { - _ struct{} `type:"structure"` - - OptionGroup *OptionGroup `type:"structure"` -} - -// String returns the string representation -func (s ModifyOptionGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyOptionGroupOutput) GoString() string { - return s.String() -} - -// SetOptionGroup sets the OptionGroup field's value. -func (s *ModifyOptionGroupOutput) SetOptionGroup(v *OptionGroup) *ModifyOptionGroupOutput { - s.OptionGroup = v - return s -} - -// Option details. -type Option struct { - _ struct{} `type:"structure"` - - // If the option requires access to a port, then this DB security group allows - // access to the port. - DBSecurityGroupMemberships []*DBSecurityGroupMembership `locationNameList:"DBSecurityGroup" type:"list"` - - // The description of the option. - OptionDescription *string `type:"string"` - - // The name of the option. - OptionName *string `type:"string"` - - // The option settings for this option. - OptionSettings []*OptionSetting `locationNameList:"OptionSetting" type:"list"` - - // The version of the option. - OptionVersion *string `type:"string"` - - // Indicate if this option is permanent. - Permanent *bool `type:"boolean"` - - // Indicate if this option is persistent. - Persistent *bool `type:"boolean"` - - // If required, the port configured for this option to use. - Port *int64 `type:"integer"` - - // If the option requires access to a port, then this VPC security group allows - // access to the port. - VpcSecurityGroupMemberships []*VpcSecurityGroupMembership `locationNameList:"VpcSecurityGroupMembership" type:"list"` -} - -// String returns the string representation -func (s Option) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Option) GoString() string { - return s.String() -} - -// SetDBSecurityGroupMemberships sets the DBSecurityGroupMemberships field's value. -func (s *Option) SetDBSecurityGroupMemberships(v []*DBSecurityGroupMembership) *Option { - s.DBSecurityGroupMemberships = v - return s -} - -// SetOptionDescription sets the OptionDescription field's value. -func (s *Option) SetOptionDescription(v string) *Option { - s.OptionDescription = &v - return s -} - -// SetOptionName sets the OptionName field's value. -func (s *Option) SetOptionName(v string) *Option { - s.OptionName = &v - return s -} - -// SetOptionSettings sets the OptionSettings field's value. -func (s *Option) SetOptionSettings(v []*OptionSetting) *Option { - s.OptionSettings = v - return s -} - -// SetOptionVersion sets the OptionVersion field's value. -func (s *Option) SetOptionVersion(v string) *Option { - s.OptionVersion = &v - return s -} - -// SetPermanent sets the Permanent field's value. -func (s *Option) SetPermanent(v bool) *Option { - s.Permanent = &v - return s -} - -// SetPersistent sets the Persistent field's value. -func (s *Option) SetPersistent(v bool) *Option { - s.Persistent = &v - return s -} - -// SetPort sets the Port field's value. -func (s *Option) SetPort(v int64) *Option { - s.Port = &v - return s -} - -// SetVpcSecurityGroupMemberships sets the VpcSecurityGroupMemberships field's value. -func (s *Option) SetVpcSecurityGroupMemberships(v []*VpcSecurityGroupMembership) *Option { - s.VpcSecurityGroupMemberships = v - return s -} - -// A list of all available options -type OptionConfiguration struct { - _ struct{} `type:"structure"` - - // A list of DBSecurityGroupMemebrship name strings used for this option. - DBSecurityGroupMemberships []*string `locationNameList:"DBSecurityGroupName" type:"list"` - - // The configuration of options to include in a group. - // - // OptionName is a required field - OptionName *string `type:"string" required:"true"` - - // The option settings to include in an option group. - OptionSettings []*OptionSetting `locationNameList:"OptionSetting" type:"list"` - - // The version for the option. - OptionVersion *string `type:"string"` - - // The optional port for the option. - Port *int64 `type:"integer"` - - // A list of VpcSecurityGroupMemebrship name strings used for this option. - VpcSecurityGroupMemberships []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s OptionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OptionConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OptionConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OptionConfiguration"} - if s.OptionName == nil { - invalidParams.Add(request.NewErrParamRequired("OptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBSecurityGroupMemberships sets the DBSecurityGroupMemberships field's value. -func (s *OptionConfiguration) SetDBSecurityGroupMemberships(v []*string) *OptionConfiguration { - s.DBSecurityGroupMemberships = v - return s -} - -// SetOptionName sets the OptionName field's value. -func (s *OptionConfiguration) SetOptionName(v string) *OptionConfiguration { - s.OptionName = &v - return s -} - -// SetOptionSettings sets the OptionSettings field's value. -func (s *OptionConfiguration) SetOptionSettings(v []*OptionSetting) *OptionConfiguration { - s.OptionSettings = v - return s -} - -// SetOptionVersion sets the OptionVersion field's value. -func (s *OptionConfiguration) SetOptionVersion(v string) *OptionConfiguration { - s.OptionVersion = &v - return s -} - -// SetPort sets the Port field's value. -func (s *OptionConfiguration) SetPort(v int64) *OptionConfiguration { - s.Port = &v - return s -} - -// SetVpcSecurityGroupMemberships sets the VpcSecurityGroupMemberships field's value. -func (s *OptionConfiguration) SetVpcSecurityGroupMemberships(v []*string) *OptionConfiguration { - s.VpcSecurityGroupMemberships = v - return s -} - -type OptionGroup struct { - _ struct{} `type:"structure"` - - // Indicates whether this option group can be applied to both VPC and non-VPC - // instances. The value true indicates the option group can be applied to both - // VPC and non-VPC instances. - AllowsVpcAndNonVpcInstanceMemberships *bool `type:"boolean"` - - // Indicates the name of the engine that this option group can be applied to. - EngineName *string `type:"string"` - - // Indicates the major engine version associated with this option group. - MajorEngineVersion *string `type:"string"` - - // The Amazon Resource Name (ARN) for the option group. - OptionGroupArn *string `type:"string"` - - // Provides a description of the option group. - OptionGroupDescription *string `type:"string"` - - // Specifies the name of the option group. - OptionGroupName *string `type:"string"` - - // Indicates what options are available in the option group. - Options []*Option `locationNameList:"Option" type:"list"` - - // If AllowsVpcAndNonVpcInstanceMemberships is false, this field is blank. If - // AllowsVpcAndNonVpcInstanceMemberships is true and this field is blank, then - // this option group can be applied to both VPC and non-VPC instances. If this - // field contains a value, then this option group can only be applied to instances - // that are in the VPC indicated by this field. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s OptionGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OptionGroup) GoString() string { - return s.String() -} - -// SetAllowsVpcAndNonVpcInstanceMemberships sets the AllowsVpcAndNonVpcInstanceMemberships field's value. -func (s *OptionGroup) SetAllowsVpcAndNonVpcInstanceMemberships(v bool) *OptionGroup { - s.AllowsVpcAndNonVpcInstanceMemberships = &v - return s -} - -// SetEngineName sets the EngineName field's value. -func (s *OptionGroup) SetEngineName(v string) *OptionGroup { - s.EngineName = &v - return s -} - -// SetMajorEngineVersion sets the MajorEngineVersion field's value. -func (s *OptionGroup) SetMajorEngineVersion(v string) *OptionGroup { - s.MajorEngineVersion = &v - return s -} - -// SetOptionGroupArn sets the OptionGroupArn field's value. -func (s *OptionGroup) SetOptionGroupArn(v string) *OptionGroup { - s.OptionGroupArn = &v - return s -} - -// SetOptionGroupDescription sets the OptionGroupDescription field's value. -func (s *OptionGroup) SetOptionGroupDescription(v string) *OptionGroup { - s.OptionGroupDescription = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *OptionGroup) SetOptionGroupName(v string) *OptionGroup { - s.OptionGroupName = &v - return s -} - -// SetOptions sets the Options field's value. -func (s *OptionGroup) SetOptions(v []*Option) *OptionGroup { - s.Options = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *OptionGroup) SetVpcId(v string) *OptionGroup { - s.VpcId = &v - return s -} - -// Provides information on the option groups the DB instance is a member of. -type OptionGroupMembership struct { - _ struct{} `type:"structure"` - - // The name of the option group that the instance belongs to. - OptionGroupName *string `type:"string"` - - // The status of the DB instance's option group membership. Valid values are: - // in-sync, pending-apply, pending-removal, pending-maintenance-apply, pending-maintenance-removal, - // applying, removing, and failed. - Status *string `type:"string"` -} - -// String returns the string representation -func (s OptionGroupMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OptionGroupMembership) GoString() string { - return s.String() -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *OptionGroupMembership) SetOptionGroupName(v string) *OptionGroupMembership { - s.OptionGroupName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *OptionGroupMembership) SetStatus(v string) *OptionGroupMembership { - s.Status = &v - return s -} - -// Available option. -type OptionGroupOption struct { - _ struct{} `type:"structure"` - - // If the option requires a port, specifies the default port for the option. - DefaultPort *int64 `type:"integer"` - - // The description of the option. - Description *string `type:"string"` - - // The name of the engine that this option can be applied to. - EngineName *string `type:"string"` - - // Indicates the major engine version that the option is available for. - MajorEngineVersion *string `type:"string"` - - // The minimum required engine version for the option to be applied. - MinimumRequiredMinorEngineVersion *string `type:"string"` - - // The name of the option. - Name *string `type:"string"` - - // The option settings that are available (and the default value) for each option - // in an option group. - OptionGroupOptionSettings []*OptionGroupOptionSetting `locationNameList:"OptionGroupOptionSetting" type:"list"` - - // The versions that are available for the option. - OptionGroupOptionVersions []*OptionVersion `locationNameList:"OptionVersion" type:"list"` - - // The options that conflict with this option. - OptionsConflictsWith []*string `locationNameList:"OptionConflictName" type:"list"` - - // The options that are prerequisites for this option. - OptionsDependedOn []*string `locationNameList:"OptionName" type:"list"` - - // Permanent options can never be removed from an option group. An option group - // containing a permanent option can't be removed from a DB instance. - Permanent *bool `type:"boolean"` - - // Persistent options can't be removed from an option group while DB instances - // are associated with the option group. If you disassociate all DB instances - // from the option group, your can remove the persistent option from the option - // group. - Persistent *bool `type:"boolean"` - - // Specifies whether the option requires a port. - PortRequired *bool `type:"boolean"` - - // If true, you must enable the Auto Minor Version Upgrade setting for your - // DB instance before you can use this option. You can enable Auto Minor Version - // Upgrade when you first create your DB instance, or by modifying your DB instance - // later. - RequiresAutoMinorEngineVersionUpgrade *bool `type:"boolean"` - - // If true, you can change the option to an earlier version of the option. This - // only applies to options that have different versions available. - SupportsOptionVersionDowngrade *bool `type:"boolean"` - - // If true, you can only use this option with a DB instance that is in a VPC. - VpcOnly *bool `type:"boolean"` -} - -// String returns the string representation -func (s OptionGroupOption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OptionGroupOption) GoString() string { - return s.String() -} - -// SetDefaultPort sets the DefaultPort field's value. -func (s *OptionGroupOption) SetDefaultPort(v int64) *OptionGroupOption { - s.DefaultPort = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *OptionGroupOption) SetDescription(v string) *OptionGroupOption { - s.Description = &v - return s -} - -// SetEngineName sets the EngineName field's value. -func (s *OptionGroupOption) SetEngineName(v string) *OptionGroupOption { - s.EngineName = &v - return s -} - -// SetMajorEngineVersion sets the MajorEngineVersion field's value. -func (s *OptionGroupOption) SetMajorEngineVersion(v string) *OptionGroupOption { - s.MajorEngineVersion = &v - return s -} - -// SetMinimumRequiredMinorEngineVersion sets the MinimumRequiredMinorEngineVersion field's value. -func (s *OptionGroupOption) SetMinimumRequiredMinorEngineVersion(v string) *OptionGroupOption { - s.MinimumRequiredMinorEngineVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *OptionGroupOption) SetName(v string) *OptionGroupOption { - s.Name = &v - return s -} - -// SetOptionGroupOptionSettings sets the OptionGroupOptionSettings field's value. -func (s *OptionGroupOption) SetOptionGroupOptionSettings(v []*OptionGroupOptionSetting) *OptionGroupOption { - s.OptionGroupOptionSettings = v - return s -} - -// SetOptionGroupOptionVersions sets the OptionGroupOptionVersions field's value. -func (s *OptionGroupOption) SetOptionGroupOptionVersions(v []*OptionVersion) *OptionGroupOption { - s.OptionGroupOptionVersions = v - return s -} - -// SetOptionsConflictsWith sets the OptionsConflictsWith field's value. -func (s *OptionGroupOption) SetOptionsConflictsWith(v []*string) *OptionGroupOption { - s.OptionsConflictsWith = v - return s -} - -// SetOptionsDependedOn sets the OptionsDependedOn field's value. -func (s *OptionGroupOption) SetOptionsDependedOn(v []*string) *OptionGroupOption { - s.OptionsDependedOn = v - return s -} - -// SetPermanent sets the Permanent field's value. -func (s *OptionGroupOption) SetPermanent(v bool) *OptionGroupOption { - s.Permanent = &v - return s -} - -// SetPersistent sets the Persistent field's value. -func (s *OptionGroupOption) SetPersistent(v bool) *OptionGroupOption { - s.Persistent = &v - return s -} - -// SetPortRequired sets the PortRequired field's value. -func (s *OptionGroupOption) SetPortRequired(v bool) *OptionGroupOption { - s.PortRequired = &v - return s -} - -// SetRequiresAutoMinorEngineVersionUpgrade sets the RequiresAutoMinorEngineVersionUpgrade field's value. -func (s *OptionGroupOption) SetRequiresAutoMinorEngineVersionUpgrade(v bool) *OptionGroupOption { - s.RequiresAutoMinorEngineVersionUpgrade = &v - return s -} - -// SetSupportsOptionVersionDowngrade sets the SupportsOptionVersionDowngrade field's value. -func (s *OptionGroupOption) SetSupportsOptionVersionDowngrade(v bool) *OptionGroupOption { - s.SupportsOptionVersionDowngrade = &v - return s -} - -// SetVpcOnly sets the VpcOnly field's value. -func (s *OptionGroupOption) SetVpcOnly(v bool) *OptionGroupOption { - s.VpcOnly = &v - return s -} - -// Option group option settings are used to display settings available for each -// option with their default values and other information. These values are -// used with the DescribeOptionGroupOptions action. -type OptionGroupOptionSetting struct { - _ struct{} `type:"structure"` - - // Indicates the acceptable values for the option group option. - AllowedValues *string `type:"string"` - - // The DB engine specific parameter type for the option group option. - ApplyType *string `type:"string"` - - // The default value for the option group option. - DefaultValue *string `type:"string"` - - // Boolean value where true indicates that this option group option can be changed - // from the default value. - IsModifiable *bool `type:"boolean"` - - // Boolean value where true indicates that a value must be specified for this - // option setting of the option group option. - IsRequired *bool `type:"boolean"` - - // The minimum DB engine version required for the corresponding allowed value - // for this option setting. - MinimumEngineVersionPerAllowedValue []*MinimumEngineVersionPerAllowedValue `locationNameList:"MinimumEngineVersionPerAllowedValue" type:"list"` - - // The description of the option group option. - SettingDescription *string `type:"string"` - - // The name of the option group option. - SettingName *string `type:"string"` -} - -// String returns the string representation -func (s OptionGroupOptionSetting) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OptionGroupOptionSetting) GoString() string { - return s.String() -} - -// SetAllowedValues sets the AllowedValues field's value. -func (s *OptionGroupOptionSetting) SetAllowedValues(v string) *OptionGroupOptionSetting { - s.AllowedValues = &v - return s -} - -// SetApplyType sets the ApplyType field's value. -func (s *OptionGroupOptionSetting) SetApplyType(v string) *OptionGroupOptionSetting { - s.ApplyType = &v - return s -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *OptionGroupOptionSetting) SetDefaultValue(v string) *OptionGroupOptionSetting { - s.DefaultValue = &v - return s -} - -// SetIsModifiable sets the IsModifiable field's value. -func (s *OptionGroupOptionSetting) SetIsModifiable(v bool) *OptionGroupOptionSetting { - s.IsModifiable = &v - return s -} - -// SetIsRequired sets the IsRequired field's value. -func (s *OptionGroupOptionSetting) SetIsRequired(v bool) *OptionGroupOptionSetting { - s.IsRequired = &v - return s -} - -// SetMinimumEngineVersionPerAllowedValue sets the MinimumEngineVersionPerAllowedValue field's value. -func (s *OptionGroupOptionSetting) SetMinimumEngineVersionPerAllowedValue(v []*MinimumEngineVersionPerAllowedValue) *OptionGroupOptionSetting { - s.MinimumEngineVersionPerAllowedValue = v - return s -} - -// SetSettingDescription sets the SettingDescription field's value. -func (s *OptionGroupOptionSetting) SetSettingDescription(v string) *OptionGroupOptionSetting { - s.SettingDescription = &v - return s -} - -// SetSettingName sets the SettingName field's value. -func (s *OptionGroupOptionSetting) SetSettingName(v string) *OptionGroupOptionSetting { - s.SettingName = &v - return s -} - -// Option settings are the actual settings being applied or configured for that -// option. It is used when you modify an option group or describe option groups. -// For example, the NATIVE_NETWORK_ENCRYPTION option has a setting called SQLNET.ENCRYPTION_SERVER -// that can have several different values. -type OptionSetting struct { - _ struct{} `type:"structure"` - - // The allowed values of the option setting. - AllowedValues *string `type:"string"` - - // The DB engine specific parameter type. - ApplyType *string `type:"string"` - - // The data type of the option setting. - DataType *string `type:"string"` - - // The default value of the option setting. - DefaultValue *string `type:"string"` - - // The description of the option setting. - Description *string `type:"string"` - - // Indicates if the option setting is part of a collection. - IsCollection *bool `type:"boolean"` - - // A Boolean value that, when true, indicates the option setting can be modified - // from the default. - IsModifiable *bool `type:"boolean"` - - // The name of the option that has settings that you can set. - Name *string `type:"string"` - - // The current value of the option setting. - Value *string `type:"string"` -} - -// String returns the string representation -func (s OptionSetting) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OptionSetting) GoString() string { - return s.String() -} - -// SetAllowedValues sets the AllowedValues field's value. -func (s *OptionSetting) SetAllowedValues(v string) *OptionSetting { - s.AllowedValues = &v - return s -} - -// SetApplyType sets the ApplyType field's value. -func (s *OptionSetting) SetApplyType(v string) *OptionSetting { - s.ApplyType = &v - return s -} - -// SetDataType sets the DataType field's value. -func (s *OptionSetting) SetDataType(v string) *OptionSetting { - s.DataType = &v - return s -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *OptionSetting) SetDefaultValue(v string) *OptionSetting { - s.DefaultValue = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *OptionSetting) SetDescription(v string) *OptionSetting { - s.Description = &v - return s -} - -// SetIsCollection sets the IsCollection field's value. -func (s *OptionSetting) SetIsCollection(v bool) *OptionSetting { - s.IsCollection = &v - return s -} - -// SetIsModifiable sets the IsModifiable field's value. -func (s *OptionSetting) SetIsModifiable(v bool) *OptionSetting { - s.IsModifiable = &v - return s -} - -// SetName sets the Name field's value. -func (s *OptionSetting) SetName(v string) *OptionSetting { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *OptionSetting) SetValue(v string) *OptionSetting { - s.Value = &v - return s -} - -// The version for an option. Option group option versions are returned by the -// DescribeOptionGroupOptions action. -type OptionVersion struct { - _ struct{} `type:"structure"` - - // True if the version is the default version of the option, and otherwise false. - IsDefault *bool `type:"boolean"` - - // The version of the option. - Version *string `type:"string"` -} - -// String returns the string representation -func (s OptionVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OptionVersion) GoString() string { - return s.String() -} - -// SetIsDefault sets the IsDefault field's value. -func (s *OptionVersion) SetIsDefault(v bool) *OptionVersion { - s.IsDefault = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *OptionVersion) SetVersion(v string) *OptionVersion { - s.Version = &v - return s -} - -// Contains a list of available options for a DB instance. -// -// This data type is used as a response element in the DescribeOrderableDBInstanceOptions -// action. -type OrderableDBInstanceOption struct { - _ struct{} `type:"structure"` - - // A list of Availability Zones for a DB instance. - AvailabilityZones []*AvailabilityZone `locationNameList:"AvailabilityZone" type:"list"` - - // A list of the available processor features for the DB instance class of a - // DB instance. - AvailableProcessorFeatures []*AvailableProcessorFeature `locationNameList:"AvailableProcessorFeature" type:"list"` - - // The DB instance class for a DB instance. - DBInstanceClass *string `type:"string"` - - // The engine type of a DB instance. - Engine *string `type:"string"` - - // The engine version of a DB instance. - EngineVersion *string `type:"string"` - - // The license model for a DB instance. - LicenseModel *string `type:"string"` - - // Maximum total provisioned IOPS for a DB instance. - MaxIopsPerDbInstance *int64 `type:"integer"` - - // Maximum provisioned IOPS per GiB for a DB instance. - MaxIopsPerGib *float64 `type:"double"` - - // Maximum storage size for a DB instance. - MaxStorageSize *int64 `type:"integer"` - - // Minimum total provisioned IOPS for a DB instance. - MinIopsPerDbInstance *int64 `type:"integer"` - - // Minimum provisioned IOPS per GiB for a DB instance. - MinIopsPerGib *float64 `type:"double"` - - // Minimum storage size for a DB instance. - MinStorageSize *int64 `type:"integer"` - - // Indicates whether a DB instance is Multi-AZ capable. - MultiAZCapable *bool `type:"boolean"` - - // Indicates whether a DB instance can have a Read Replica. - ReadReplicaCapable *bool `type:"boolean"` - - // Indicates the storage type for a DB instance. - StorageType *string `type:"string"` - - // A list of the supported DB engine modes. - SupportedEngineModes []*string `type:"list"` - - // Indicates whether a DB instance supports Enhanced Monitoring at intervals - // from 1 to 60 seconds. - SupportsEnhancedMonitoring *bool `type:"boolean"` - - // Indicates whether a DB instance supports IAM database authentication. - SupportsIAMDatabaseAuthentication *bool `type:"boolean"` - - // Indicates whether a DB instance supports provisioned IOPS. - SupportsIops *bool `type:"boolean"` - - // True if a DB instance supports Performance Insights, otherwise false. - SupportsPerformanceInsights *bool `type:"boolean"` - - // Indicates whether a DB instance supports encrypted storage. - SupportsStorageEncryption *bool `type:"boolean"` - - // Indicates whether a DB instance is in a VPC. - Vpc *bool `type:"boolean"` -} - -// String returns the string representation -func (s OrderableDBInstanceOption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OrderableDBInstanceOption) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *OrderableDBInstanceOption) SetAvailabilityZones(v []*AvailabilityZone) *OrderableDBInstanceOption { - s.AvailabilityZones = v - return s -} - -// SetAvailableProcessorFeatures sets the AvailableProcessorFeatures field's value. -func (s *OrderableDBInstanceOption) SetAvailableProcessorFeatures(v []*AvailableProcessorFeature) *OrderableDBInstanceOption { - s.AvailableProcessorFeatures = v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *OrderableDBInstanceOption) SetDBInstanceClass(v string) *OrderableDBInstanceOption { - s.DBInstanceClass = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *OrderableDBInstanceOption) SetEngine(v string) *OrderableDBInstanceOption { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *OrderableDBInstanceOption) SetEngineVersion(v string) *OrderableDBInstanceOption { - s.EngineVersion = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *OrderableDBInstanceOption) SetLicenseModel(v string) *OrderableDBInstanceOption { - s.LicenseModel = &v - return s -} - -// SetMaxIopsPerDbInstance sets the MaxIopsPerDbInstance field's value. -func (s *OrderableDBInstanceOption) SetMaxIopsPerDbInstance(v int64) *OrderableDBInstanceOption { - s.MaxIopsPerDbInstance = &v - return s -} - -// SetMaxIopsPerGib sets the MaxIopsPerGib field's value. -func (s *OrderableDBInstanceOption) SetMaxIopsPerGib(v float64) *OrderableDBInstanceOption { - s.MaxIopsPerGib = &v - return s -} - -// SetMaxStorageSize sets the MaxStorageSize field's value. -func (s *OrderableDBInstanceOption) SetMaxStorageSize(v int64) *OrderableDBInstanceOption { - s.MaxStorageSize = &v - return s -} - -// SetMinIopsPerDbInstance sets the MinIopsPerDbInstance field's value. -func (s *OrderableDBInstanceOption) SetMinIopsPerDbInstance(v int64) *OrderableDBInstanceOption { - s.MinIopsPerDbInstance = &v - return s -} - -// SetMinIopsPerGib sets the MinIopsPerGib field's value. -func (s *OrderableDBInstanceOption) SetMinIopsPerGib(v float64) *OrderableDBInstanceOption { - s.MinIopsPerGib = &v - return s -} - -// SetMinStorageSize sets the MinStorageSize field's value. -func (s *OrderableDBInstanceOption) SetMinStorageSize(v int64) *OrderableDBInstanceOption { - s.MinStorageSize = &v - return s -} - -// SetMultiAZCapable sets the MultiAZCapable field's value. -func (s *OrderableDBInstanceOption) SetMultiAZCapable(v bool) *OrderableDBInstanceOption { - s.MultiAZCapable = &v - return s -} - -// SetReadReplicaCapable sets the ReadReplicaCapable field's value. -func (s *OrderableDBInstanceOption) SetReadReplicaCapable(v bool) *OrderableDBInstanceOption { - s.ReadReplicaCapable = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *OrderableDBInstanceOption) SetStorageType(v string) *OrderableDBInstanceOption { - s.StorageType = &v - return s -} - -// SetSupportedEngineModes sets the SupportedEngineModes field's value. -func (s *OrderableDBInstanceOption) SetSupportedEngineModes(v []*string) *OrderableDBInstanceOption { - s.SupportedEngineModes = v - return s -} - -// SetSupportsEnhancedMonitoring sets the SupportsEnhancedMonitoring field's value. -func (s *OrderableDBInstanceOption) SetSupportsEnhancedMonitoring(v bool) *OrderableDBInstanceOption { - s.SupportsEnhancedMonitoring = &v - return s -} - -// SetSupportsIAMDatabaseAuthentication sets the SupportsIAMDatabaseAuthentication field's value. -func (s *OrderableDBInstanceOption) SetSupportsIAMDatabaseAuthentication(v bool) *OrderableDBInstanceOption { - s.SupportsIAMDatabaseAuthentication = &v - return s -} - -// SetSupportsIops sets the SupportsIops field's value. -func (s *OrderableDBInstanceOption) SetSupportsIops(v bool) *OrderableDBInstanceOption { - s.SupportsIops = &v - return s -} - -// SetSupportsPerformanceInsights sets the SupportsPerformanceInsights field's value. -func (s *OrderableDBInstanceOption) SetSupportsPerformanceInsights(v bool) *OrderableDBInstanceOption { - s.SupportsPerformanceInsights = &v - return s -} - -// SetSupportsStorageEncryption sets the SupportsStorageEncryption field's value. -func (s *OrderableDBInstanceOption) SetSupportsStorageEncryption(v bool) *OrderableDBInstanceOption { - s.SupportsStorageEncryption = &v - return s -} - -// SetVpc sets the Vpc field's value. -func (s *OrderableDBInstanceOption) SetVpc(v bool) *OrderableDBInstanceOption { - s.Vpc = &v - return s -} - -// This data type is used as a request parameter in the ModifyDBParameterGroup -// and ResetDBParameterGroup actions. -// -// This data type is used as a response element in the DescribeEngineDefaultParameters -// and DescribeDBParameters actions. -type Parameter struct { - _ struct{} `type:"structure"` - - // Specifies the valid range of values for the parameter. - AllowedValues *string `type:"string"` - - // Indicates when to apply parameter updates. - ApplyMethod *string `type:"string" enum:"ApplyMethod"` - - // Specifies the engine specific parameters type. - ApplyType *string `type:"string"` - - // Specifies the valid data type for the parameter. - DataType *string `type:"string"` - - // Provides a description of the parameter. - Description *string `type:"string"` - - // Indicates whether (true) or not (false) the parameter can be modified. Some - // parameters have security or operational implications that prevent them from - // being changed. - IsModifiable *bool `type:"boolean"` - - // The earliest engine version to which the parameter can apply. - MinimumEngineVersion *string `type:"string"` - - // Specifies the name of the parameter. - ParameterName *string `type:"string"` - - // Specifies the value of the parameter. - ParameterValue *string `type:"string"` - - // Indicates the source of the parameter value. - Source *string `type:"string"` - - // The valid DB engine modes. - SupportedEngineModes []*string `type:"list"` -} - -// String returns the string representation -func (s Parameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Parameter) GoString() string { - return s.String() -} - -// SetAllowedValues sets the AllowedValues field's value. -func (s *Parameter) SetAllowedValues(v string) *Parameter { - s.AllowedValues = &v - return s -} - -// SetApplyMethod sets the ApplyMethod field's value. -func (s *Parameter) SetApplyMethod(v string) *Parameter { - s.ApplyMethod = &v - return s -} - -// SetApplyType sets the ApplyType field's value. -func (s *Parameter) SetApplyType(v string) *Parameter { - s.ApplyType = &v - return s -} - -// SetDataType sets the DataType field's value. -func (s *Parameter) SetDataType(v string) *Parameter { - s.DataType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Parameter) SetDescription(v string) *Parameter { - s.Description = &v - return s -} - -// SetIsModifiable sets the IsModifiable field's value. -func (s *Parameter) SetIsModifiable(v bool) *Parameter { - s.IsModifiable = &v - return s -} - -// SetMinimumEngineVersion sets the MinimumEngineVersion field's value. -func (s *Parameter) SetMinimumEngineVersion(v string) *Parameter { - s.MinimumEngineVersion = &v - return s -} - -// SetParameterName sets the ParameterName field's value. -func (s *Parameter) SetParameterName(v string) *Parameter { - s.ParameterName = &v - return s -} - -// SetParameterValue sets the ParameterValue field's value. -func (s *Parameter) SetParameterValue(v string) *Parameter { - s.ParameterValue = &v - return s -} - -// SetSource sets the Source field's value. -func (s *Parameter) SetSource(v string) *Parameter { - s.Source = &v - return s -} - -// SetSupportedEngineModes sets the SupportedEngineModes field's value. -func (s *Parameter) SetSupportedEngineModes(v []*string) *Parameter { - s.SupportedEngineModes = v - return s -} - -// A list of the log types whose configuration is still pending. In other words, -// these log types are in the process of being activated or deactivated. -type PendingCloudwatchLogsExports struct { - _ struct{} `type:"structure"` - - // Log types that are in the process of being enabled. After they are enabled, - // these log types are exported to CloudWatch Logs. - LogTypesToDisable []*string `type:"list"` - - // Log types that are in the process of being deactivated. After they are deactivated, - // these log types aren't exported to CloudWatch Logs. - LogTypesToEnable []*string `type:"list"` -} - -// String returns the string representation -func (s PendingCloudwatchLogsExports) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingCloudwatchLogsExports) GoString() string { - return s.String() -} - -// SetLogTypesToDisable sets the LogTypesToDisable field's value. -func (s *PendingCloudwatchLogsExports) SetLogTypesToDisable(v []*string) *PendingCloudwatchLogsExports { - s.LogTypesToDisable = v - return s -} - -// SetLogTypesToEnable sets the LogTypesToEnable field's value. -func (s *PendingCloudwatchLogsExports) SetLogTypesToEnable(v []*string) *PendingCloudwatchLogsExports { - s.LogTypesToEnable = v - return s -} - -// Provides information about a pending maintenance action for a resource. -type PendingMaintenanceAction struct { - _ struct{} `type:"structure"` - - // The type of pending maintenance action that is available for the resource. - Action *string `type:"string"` - - // The date of the maintenance window when the action is applied. The maintenance - // action is applied to the resource during its first maintenance window after - // this date. If this date is specified, any next-maintenance opt-in requests - // are ignored. - AutoAppliedAfterDate *time.Time `type:"timestamp"` - - // The effective date when the pending maintenance action is applied to the - // resource. This date takes into account opt-in requests received from the - // ApplyPendingMaintenanceAction API, the AutoAppliedAfterDate, and the ForcedApplyDate. - // This value is blank if an opt-in request has not been received and nothing - // has been specified as AutoAppliedAfterDate or ForcedApplyDate. - CurrentApplyDate *time.Time `type:"timestamp"` - - // A description providing more detail about the maintenance action. - Description *string `type:"string"` - - // The date when the maintenance action is automatically applied. The maintenance - // action is applied to the resource on this date regardless of the maintenance - // window for the resource. If this date is specified, any immediate opt-in - // requests are ignored. - ForcedApplyDate *time.Time `type:"timestamp"` - - // Indicates the type of opt-in request that has been received for the resource. - OptInStatus *string `type:"string"` -} - -// String returns the string representation -func (s PendingMaintenanceAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingMaintenanceAction) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *PendingMaintenanceAction) SetAction(v string) *PendingMaintenanceAction { - s.Action = &v - return s -} - -// SetAutoAppliedAfterDate sets the AutoAppliedAfterDate field's value. -func (s *PendingMaintenanceAction) SetAutoAppliedAfterDate(v time.Time) *PendingMaintenanceAction { - s.AutoAppliedAfterDate = &v - return s -} - -// SetCurrentApplyDate sets the CurrentApplyDate field's value. -func (s *PendingMaintenanceAction) SetCurrentApplyDate(v time.Time) *PendingMaintenanceAction { - s.CurrentApplyDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PendingMaintenanceAction) SetDescription(v string) *PendingMaintenanceAction { - s.Description = &v - return s -} - -// SetForcedApplyDate sets the ForcedApplyDate field's value. -func (s *PendingMaintenanceAction) SetForcedApplyDate(v time.Time) *PendingMaintenanceAction { - s.ForcedApplyDate = &v - return s -} - -// SetOptInStatus sets the OptInStatus field's value. -func (s *PendingMaintenanceAction) SetOptInStatus(v string) *PendingMaintenanceAction { - s.OptInStatus = &v - return s -} - -// This data type is used as a response element in the ModifyDBInstance action. -type PendingModifiedValues struct { - _ struct{} `type:"structure"` - - // Contains the new AllocatedStorage size for the DB instance that will be applied - // or is currently being applied. - AllocatedStorage *int64 `type:"integer"` - - // Specifies the pending number of days for which automated backups are retained. - BackupRetentionPeriod *int64 `type:"integer"` - - // Specifies the identifier of the CA certificate for the DB instance. - CACertificateIdentifier *string `type:"string"` - - // Contains the new DBInstanceClass for the DB instance that will be applied - // or is currently being applied. - DBInstanceClass *string `type:"string"` - - // Contains the new DBInstanceIdentifier for the DB instance that will be applied - // or is currently being applied. - DBInstanceIdentifier *string `type:"string"` - - // The new DB subnet group for the DB instance. - DBSubnetGroupName *string `type:"string"` - - // Indicates the database engine version. - EngineVersion *string `type:"string"` - - // Specifies the new Provisioned IOPS value for the DB instance that will be - // applied or is currently being applied. - Iops *int64 `type:"integer"` - - // The license model for the DB instance. - // - // Valid values: license-included | bring-your-own-license | general-public-license - LicenseModel *string `type:"string"` - - // Contains the pending or currently-in-progress change of the master credentials - // for the DB instance. - MasterUserPassword *string `type:"string"` - - // Indicates that the Single-AZ DB instance is to change to a Multi-AZ deployment. - MultiAZ *bool `type:"boolean"` - - // A list of the log types whose configuration is still pending. In other words, - // these log types are in the process of being activated or deactivated. - PendingCloudwatchLogsExports *PendingCloudwatchLogsExports `type:"structure"` - - // Specifies the pending port for the DB instance. - Port *int64 `type:"integer"` - - // The number of CPU cores and the number of threads per core for the DB instance - // class of the DB instance. - ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` - - // Specifies the storage type to be associated with the DB instance. - StorageType *string `type:"string"` -} - -// String returns the string representation -func (s PendingModifiedValues) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingModifiedValues) GoString() string { - return s.String() -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *PendingModifiedValues) SetAllocatedStorage(v int64) *PendingModifiedValues { - s.AllocatedStorage = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *PendingModifiedValues) SetBackupRetentionPeriod(v int64) *PendingModifiedValues { - s.BackupRetentionPeriod = &v - return s -} - -// SetCACertificateIdentifier sets the CACertificateIdentifier field's value. -func (s *PendingModifiedValues) SetCACertificateIdentifier(v string) *PendingModifiedValues { - s.CACertificateIdentifier = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *PendingModifiedValues) SetDBInstanceClass(v string) *PendingModifiedValues { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *PendingModifiedValues) SetDBInstanceIdentifier(v string) *PendingModifiedValues { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *PendingModifiedValues) SetDBSubnetGroupName(v string) *PendingModifiedValues { - s.DBSubnetGroupName = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *PendingModifiedValues) SetEngineVersion(v string) *PendingModifiedValues { - s.EngineVersion = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *PendingModifiedValues) SetIops(v int64) *PendingModifiedValues { - s.Iops = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *PendingModifiedValues) SetLicenseModel(v string) *PendingModifiedValues { - s.LicenseModel = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *PendingModifiedValues) SetMasterUserPassword(v string) *PendingModifiedValues { - s.MasterUserPassword = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *PendingModifiedValues) SetMultiAZ(v bool) *PendingModifiedValues { - s.MultiAZ = &v - return s -} - -// SetPendingCloudwatchLogsExports sets the PendingCloudwatchLogsExports field's value. -func (s *PendingModifiedValues) SetPendingCloudwatchLogsExports(v *PendingCloudwatchLogsExports) *PendingModifiedValues { - s.PendingCloudwatchLogsExports = v - return s -} - -// SetPort sets the Port field's value. -func (s *PendingModifiedValues) SetPort(v int64) *PendingModifiedValues { - s.Port = &v - return s -} - -// SetProcessorFeatures sets the ProcessorFeatures field's value. -func (s *PendingModifiedValues) SetProcessorFeatures(v []*ProcessorFeature) *PendingModifiedValues { - s.ProcessorFeatures = v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *PendingModifiedValues) SetStorageType(v string) *PendingModifiedValues { - s.StorageType = &v - return s -} - -// Contains the processor features of a DB instance class. -// -// To specify the number of CPU cores, use the coreCount feature name for the -// Name parameter. To specify the number of threads per core, use the threadsPerCore -// feature name for the Name parameter. -// -// You can set the processor features of the DB instance class for a DB instance -// when you call one of the following actions: -// -// * CreateDBInstance -// -// * ModifyDBInstance -// -// * RestoreDBInstanceFromDBSnapshot -// -// * RestoreDBInstanceFromS3 -// -// * RestoreDBInstanceToPointInTime -// -// You can view the valid processor values for a particular instance class by -// calling the DescribeOrderableDBInstanceOptions action and specifying the -// instance class for the DBInstanceClass parameter. -// -// In addition, you can use the following actions for DB instance class processor -// information: -// -// * DescribeDBInstances -// -// * DescribeDBSnapshots -// -// * DescribeValidDBInstanceModifications -// -// For more information, see Configuring the Processor of the DB Instance Class -// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#USER_ConfigureProcessor) -// in the Amazon RDS User Guide. -type ProcessorFeature struct { - _ struct{} `type:"structure"` - - // The name of the processor feature. Valid names are coreCount and threadsPerCore. - Name *string `type:"string"` - - // The value of a processor feature name. - Value *string `type:"string"` -} - -// String returns the string representation -func (s ProcessorFeature) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProcessorFeature) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *ProcessorFeature) SetName(v string) *ProcessorFeature { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ProcessorFeature) SetValue(v string) *ProcessorFeature { - s.Value = &v - return s -} - -type PromoteReadReplicaDBClusterInput struct { - _ struct{} `type:"structure"` - - // The identifier of the DB cluster Read Replica to promote. This parameter - // is not case-sensitive. - // - // Constraints: - // - // * Must match the identifier of an existing DBCluster Read Replica. - // - // Example: my-cluster-replica1 - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PromoteReadReplicaDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PromoteReadReplicaDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PromoteReadReplicaDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PromoteReadReplicaDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *PromoteReadReplicaDBClusterInput) SetDBClusterIdentifier(v string) *PromoteReadReplicaDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -type PromoteReadReplicaDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Aurora DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, - // and StartDBCluster actions. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s PromoteReadReplicaDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PromoteReadReplicaDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *PromoteReadReplicaDBClusterOutput) SetDBCluster(v *DBCluster) *PromoteReadReplicaDBClusterOutput { - s.DBCluster = v - return s -} - -type PromoteReadReplicaInput struct { - _ struct{} `type:"structure"` - - // The number of days to retain automated backups. Setting this parameter to - // a positive number enables backups. Setting this parameter to 0 disables automated - // backups. - // - // Default: 1 - // - // Constraints: - // - // * Must be a value from 0 to 8 - BackupRetentionPeriod *int64 `type:"integer"` - - // The DB instance identifier. This value is stored as a lowercase string. - // - // Constraints: - // - // * Must match the identifier of an existing Read Replica DB instance. - // - // Example: mydbinstance - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The daily time range during which automated backups are created if automated - // backups are enabled, using the BackupRetentionPeriod parameter. - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region. To see the time blocks available, see Adjusting - // the Preferred Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html) - // in the Amazon RDS User Guide. - // - // Constraints: - // - // * Must be in the format hh24:mi-hh24:mi. - // - // * Must be in Universal Coordinated Time (UTC). - // - // * Must not conflict with the preferred maintenance window. - // - // * Must be at least 30 minutes. - PreferredBackupWindow *string `type:"string"` -} - -// String returns the string representation -func (s PromoteReadReplicaInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PromoteReadReplicaInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PromoteReadReplicaInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PromoteReadReplicaInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *PromoteReadReplicaInput) SetBackupRetentionPeriod(v int64) *PromoteReadReplicaInput { - s.BackupRetentionPeriod = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *PromoteReadReplicaInput) SetDBInstanceIdentifier(v string) *PromoteReadReplicaInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *PromoteReadReplicaInput) SetPreferredBackupWindow(v string) *PromoteReadReplicaInput { - s.PreferredBackupWindow = &v - return s -} - -type PromoteReadReplicaOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s PromoteReadReplicaOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PromoteReadReplicaOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *PromoteReadReplicaOutput) SetDBInstance(v *DBInstance) *PromoteReadReplicaOutput { - s.DBInstance = v - return s -} - -type PurchaseReservedDBInstancesOfferingInput struct { - _ struct{} `type:"structure"` - - // The number of instances to reserve. - // - // Default: 1 - DBInstanceCount *int64 `type:"integer"` - - // Customer-specified identifier to track this reservation. - // - // Example: myreservationID - ReservedDBInstanceId *string `type:"string"` - - // The ID of the Reserved DB instance offering to purchase. - // - // Example: 438012d3-4052-4cc7-b2e3-8d3372e0e706 - // - // ReservedDBInstancesOfferingId is a required field - ReservedDBInstancesOfferingId *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s PurchaseReservedDBInstancesOfferingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseReservedDBInstancesOfferingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseReservedDBInstancesOfferingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseReservedDBInstancesOfferingInput"} - if s.ReservedDBInstancesOfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedDBInstancesOfferingId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceCount sets the DBInstanceCount field's value. -func (s *PurchaseReservedDBInstancesOfferingInput) SetDBInstanceCount(v int64) *PurchaseReservedDBInstancesOfferingInput { - s.DBInstanceCount = &v - return s -} - -// SetReservedDBInstanceId sets the ReservedDBInstanceId field's value. -func (s *PurchaseReservedDBInstancesOfferingInput) SetReservedDBInstanceId(v string) *PurchaseReservedDBInstancesOfferingInput { - s.ReservedDBInstanceId = &v - return s -} - -// SetReservedDBInstancesOfferingId sets the ReservedDBInstancesOfferingId field's value. -func (s *PurchaseReservedDBInstancesOfferingInput) SetReservedDBInstancesOfferingId(v string) *PurchaseReservedDBInstancesOfferingInput { - s.ReservedDBInstancesOfferingId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *PurchaseReservedDBInstancesOfferingInput) SetTags(v []*Tag) *PurchaseReservedDBInstancesOfferingInput { - s.Tags = v - return s -} - -type PurchaseReservedDBInstancesOfferingOutput struct { - _ struct{} `type:"structure"` - - // This data type is used as a response element in the DescribeReservedDBInstances - // and PurchaseReservedDBInstancesOffering actions. - ReservedDBInstance *ReservedDBInstance `type:"structure"` -} - -// String returns the string representation -func (s PurchaseReservedDBInstancesOfferingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseReservedDBInstancesOfferingOutput) GoString() string { - return s.String() -} - -// SetReservedDBInstance sets the ReservedDBInstance field's value. -func (s *PurchaseReservedDBInstancesOfferingOutput) SetReservedDBInstance(v *ReservedDBInstance) *PurchaseReservedDBInstancesOfferingOutput { - s.ReservedDBInstance = v - return s -} - -// A range of integer values. -type Range struct { - _ struct{} `type:"structure"` - - // The minimum value in the range. - From *int64 `type:"integer"` - - // The step value for the range. For example, if you have a range of 5,000 to - // 10,000, with a step value of 1,000, the valid values start at 5,000 and step - // up by 1,000. Even though 7,500 is within the range, it isn't a valid value - // for the range. The valid values are 5,000, 6,000, 7,000, 8,000... - Step *int64 `type:"integer"` - - // The maximum value in the range. - To *int64 `type:"integer"` -} - -// String returns the string representation -func (s Range) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Range) GoString() string { - return s.String() -} - -// SetFrom sets the From field's value. -func (s *Range) SetFrom(v int64) *Range { - s.From = &v - return s -} - -// SetStep sets the Step field's value. -func (s *Range) SetStep(v int64) *Range { - s.Step = &v - return s -} - -// SetTo sets the To field's value. -func (s *Range) SetTo(v int64) *Range { - s.To = &v - return s -} - -type RebootDBInstanceInput struct { - _ struct{} `type:"structure"` - - // The DB instance identifier. This parameter is stored as a lowercase string. - // - // Constraints: - // - // * Must match the identifier of an existing DBInstance. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // When true, the reboot is conducted through a MultiAZ failover. - // - // Constraint: You can't specify true if the instance is not configured for - // MultiAZ. - ForceFailover *bool `type:"boolean"` -} - -// String returns the string representation -func (s RebootDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootDBInstanceInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *RebootDBInstanceInput) SetDBInstanceIdentifier(v string) *RebootDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetForceFailover sets the ForceFailover field's value. -func (s *RebootDBInstanceInput) SetForceFailover(v bool) *RebootDBInstanceInput { - s.ForceFailover = &v - return s -} - -type RebootDBInstanceOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s RebootDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootDBInstanceOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *RebootDBInstanceOutput) SetDBInstance(v *DBInstance) *RebootDBInstanceOutput { - s.DBInstance = v - return s -} - -// This data type is used as a response element in the DescribeReservedDBInstances -// and DescribeReservedDBInstancesOfferings actions. -type RecurringCharge struct { - _ struct{} `type:"structure"` - - // The amount of the recurring charge. - RecurringChargeAmount *float64 `type:"double"` - - // The frequency of the recurring charge. - RecurringChargeFrequency *string `type:"string"` -} - -// String returns the string representation -func (s RecurringCharge) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecurringCharge) GoString() string { - return s.String() -} - -// SetRecurringChargeAmount sets the RecurringChargeAmount field's value. -func (s *RecurringCharge) SetRecurringChargeAmount(v float64) *RecurringCharge { - s.RecurringChargeAmount = &v - return s -} - -// SetRecurringChargeFrequency sets the RecurringChargeFrequency field's value. -func (s *RecurringCharge) SetRecurringChargeFrequency(v string) *RecurringCharge { - s.RecurringChargeFrequency = &v - return s -} - -type RemoveFromGlobalClusterInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) identifying the cluster that was detached - // from the Aurora global database cluster. - DbClusterIdentifier *string `type:"string"` - - // The cluster identifier to detach from the Aurora global database cluster. - GlobalClusterIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s RemoveFromGlobalClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveFromGlobalClusterInput) GoString() string { - return s.String() -} - -// SetDbClusterIdentifier sets the DbClusterIdentifier field's value. -func (s *RemoveFromGlobalClusterInput) SetDbClusterIdentifier(v string) *RemoveFromGlobalClusterInput { - s.DbClusterIdentifier = &v - return s -} - -// SetGlobalClusterIdentifier sets the GlobalClusterIdentifier field's value. -func (s *RemoveFromGlobalClusterInput) SetGlobalClusterIdentifier(v string) *RemoveFromGlobalClusterInput { - s.GlobalClusterIdentifier = &v - return s -} - -type RemoveFromGlobalClusterOutput struct { - _ struct{} `type:"structure"` - - // A data type representing an Aurora global database. - GlobalCluster *GlobalCluster `type:"structure"` -} - -// String returns the string representation -func (s RemoveFromGlobalClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveFromGlobalClusterOutput) GoString() string { - return s.String() -} - -// SetGlobalCluster sets the GlobalCluster field's value. -func (s *RemoveFromGlobalClusterOutput) SetGlobalCluster(v *GlobalCluster) *RemoveFromGlobalClusterOutput { - s.GlobalCluster = v - return s -} - -type RemoveRoleFromDBClusterInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster to disassociate the IAM role from. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM role to disassociate from the Aurora - // DB cluster, for example arn:aws:iam::123456789012:role/AuroraAccessRole. - // - // RoleArn is a required field - RoleArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RemoveRoleFromDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveRoleFromDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveRoleFromDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveRoleFromDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *RemoveRoleFromDBClusterInput) SetDBClusterIdentifier(v string) *RemoveRoleFromDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *RemoveRoleFromDBClusterInput) SetRoleArn(v string) *RemoveRoleFromDBClusterInput { - s.RoleArn = &v - return s -} - -type RemoveRoleFromDBClusterOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveRoleFromDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveRoleFromDBClusterOutput) GoString() string { - return s.String() -} - -type RemoveRoleFromDBInstanceInput struct { - _ struct{} `type:"structure"` - - // The name of the DB instance to disassociate the IAM role from. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The name of the feature for the DB instance that the IAM role is to be disassociated - // from. For the list of supported feature names, see DBEngineVersion. - // - // FeatureName is a required field - FeatureName *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM role to disassociate from the DB - // instance, for example arn:aws:iam::123456789012:role/AccessRole. - // - // RoleArn is a required field - RoleArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RemoveRoleFromDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveRoleFromDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveRoleFromDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveRoleFromDBInstanceInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - if s.FeatureName == nil { - invalidParams.Add(request.NewErrParamRequired("FeatureName")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *RemoveRoleFromDBInstanceInput) SetDBInstanceIdentifier(v string) *RemoveRoleFromDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetFeatureName sets the FeatureName field's value. -func (s *RemoveRoleFromDBInstanceInput) SetFeatureName(v string) *RemoveRoleFromDBInstanceInput { - s.FeatureName = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *RemoveRoleFromDBInstanceInput) SetRoleArn(v string) *RemoveRoleFromDBInstanceInput { - s.RoleArn = &v - return s -} - -type RemoveRoleFromDBInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveRoleFromDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveRoleFromDBInstanceOutput) GoString() string { - return s.String() -} - -type RemoveSourceIdentifierFromSubscriptionInput struct { - _ struct{} `type:"structure"` - - // The source identifier to be removed from the subscription, such as the DB - // instance identifier for a DB instance or the name of a security group. - // - // SourceIdentifier is a required field - SourceIdentifier *string `type:"string" required:"true"` - - // The name of the RDS event notification subscription you want to remove a - // source identifier from. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RemoveSourceIdentifierFromSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveSourceIdentifierFromSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveSourceIdentifierFromSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveSourceIdentifierFromSubscriptionInput"} - if s.SourceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceIdentifier")) - } - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *RemoveSourceIdentifierFromSubscriptionInput) SetSourceIdentifier(v string) *RemoveSourceIdentifierFromSubscriptionInput { - s.SourceIdentifier = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *RemoveSourceIdentifierFromSubscriptionInput) SetSubscriptionName(v string) *RemoveSourceIdentifierFromSubscriptionInput { - s.SubscriptionName = &v - return s -} - -type RemoveSourceIdentifierFromSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // Contains the results of a successful invocation of the DescribeEventSubscriptions - // action. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s RemoveSourceIdentifierFromSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveSourceIdentifierFromSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *RemoveSourceIdentifierFromSubscriptionOutput) SetEventSubscription(v *EventSubscription) *RemoveSourceIdentifierFromSubscriptionOutput { - s.EventSubscription = v - return s -} - -type RemoveTagsFromResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon RDS resource that the tags are removed from. This value is an - // Amazon Resource Name (ARN). For information about creating an ARN, see Constructing - // an ARN for Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) - // in the Amazon RDS User Guide. - // - // ResourceName is a required field - ResourceName *string `type:"string" required:"true"` - - // The tag key (name) of the tag to be removed. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsFromResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *RemoveTagsFromResourceInput) SetResourceName(v string) *RemoveTagsFromResourceInput { - s.ResourceName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsFromResourceInput) SetTagKeys(v []*string) *RemoveTagsFromResourceInput { - s.TagKeys = v - return s -} - -type RemoveTagsFromResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceOutput) GoString() string { - return s.String() -} - -// This data type is used as a response element in the DescribeReservedDBInstances -// and PurchaseReservedDBInstancesOffering actions. -type ReservedDBInstance struct { - _ struct{} `type:"structure"` - - // The currency code for the reserved DB instance. - CurrencyCode *string `type:"string"` - - // The DB instance class for the reserved DB instance. - DBInstanceClass *string `type:"string"` - - // The number of reserved DB instances. - DBInstanceCount *int64 `type:"integer"` - - // The duration of the reservation in seconds. - Duration *int64 `type:"integer"` - - // The fixed price charged for this reserved DB instance. - FixedPrice *float64 `type:"double"` - - // Indicates if the reservation applies to Multi-AZ deployments. - MultiAZ *bool `type:"boolean"` - - // The offering type of this reserved DB instance. - OfferingType *string `type:"string"` - - // The description of the reserved DB instance. - ProductDescription *string `type:"string"` - - // The recurring price charged to run this reserved DB instance. - RecurringCharges []*RecurringCharge `locationNameList:"RecurringCharge" type:"list"` - - // The Amazon Resource Name (ARN) for the reserved DB instance. - ReservedDBInstanceArn *string `type:"string"` - - // The unique identifier for the reservation. - ReservedDBInstanceId *string `type:"string"` - - // The offering identifier. - ReservedDBInstancesOfferingId *string `type:"string"` - - // The time the reservation started. - StartTime *time.Time `type:"timestamp"` - - // The state of the reserved DB instance. - State *string `type:"string"` - - // The hourly price charged for this reserved DB instance. - UsagePrice *float64 `type:"double"` -} - -// String returns the string representation -func (s ReservedDBInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedDBInstance) GoString() string { - return s.String() -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *ReservedDBInstance) SetCurrencyCode(v string) *ReservedDBInstance { - s.CurrencyCode = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *ReservedDBInstance) SetDBInstanceClass(v string) *ReservedDBInstance { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceCount sets the DBInstanceCount field's value. -func (s *ReservedDBInstance) SetDBInstanceCount(v int64) *ReservedDBInstance { - s.DBInstanceCount = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *ReservedDBInstance) SetDuration(v int64) *ReservedDBInstance { - s.Duration = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *ReservedDBInstance) SetFixedPrice(v float64) *ReservedDBInstance { - s.FixedPrice = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *ReservedDBInstance) SetMultiAZ(v bool) *ReservedDBInstance { - s.MultiAZ = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *ReservedDBInstance) SetOfferingType(v string) *ReservedDBInstance { - s.OfferingType = &v - return s -} - -// SetProductDescription sets the ProductDescription field's value. -func (s *ReservedDBInstance) SetProductDescription(v string) *ReservedDBInstance { - s.ProductDescription = &v - return s -} - -// SetRecurringCharges sets the RecurringCharges field's value. -func (s *ReservedDBInstance) SetRecurringCharges(v []*RecurringCharge) *ReservedDBInstance { - s.RecurringCharges = v - return s -} - -// SetReservedDBInstanceArn sets the ReservedDBInstanceArn field's value. -func (s *ReservedDBInstance) SetReservedDBInstanceArn(v string) *ReservedDBInstance { - s.ReservedDBInstanceArn = &v - return s -} - -// SetReservedDBInstanceId sets the ReservedDBInstanceId field's value. -func (s *ReservedDBInstance) SetReservedDBInstanceId(v string) *ReservedDBInstance { - s.ReservedDBInstanceId = &v - return s -} - -// SetReservedDBInstancesOfferingId sets the ReservedDBInstancesOfferingId field's value. -func (s *ReservedDBInstance) SetReservedDBInstancesOfferingId(v string) *ReservedDBInstance { - s.ReservedDBInstancesOfferingId = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *ReservedDBInstance) SetStartTime(v time.Time) *ReservedDBInstance { - s.StartTime = &v - return s -} - -// SetState sets the State field's value. -func (s *ReservedDBInstance) SetState(v string) *ReservedDBInstance { - s.State = &v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *ReservedDBInstance) SetUsagePrice(v float64) *ReservedDBInstance { - s.UsagePrice = &v - return s -} - -// This data type is used as a response element in the DescribeReservedDBInstancesOfferings -// action. -type ReservedDBInstancesOffering struct { - _ struct{} `type:"structure"` - - // The currency code for the reserved DB instance offering. - CurrencyCode *string `type:"string"` - - // The DB instance class for the reserved DB instance. - DBInstanceClass *string `type:"string"` - - // The duration of the offering in seconds. - Duration *int64 `type:"integer"` - - // The fixed price charged for this offering. - FixedPrice *float64 `type:"double"` - - // Indicates if the offering applies to Multi-AZ deployments. - MultiAZ *bool `type:"boolean"` - - // The offering type. - OfferingType *string `type:"string"` - - // The database engine used by the offering. - ProductDescription *string `type:"string"` - - // The recurring price charged to run this reserved DB instance. - RecurringCharges []*RecurringCharge `locationNameList:"RecurringCharge" type:"list"` - - // The offering identifier. - ReservedDBInstancesOfferingId *string `type:"string"` - - // The hourly price charged for this offering. - UsagePrice *float64 `type:"double"` -} - -// String returns the string representation -func (s ReservedDBInstancesOffering) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedDBInstancesOffering) GoString() string { - return s.String() -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *ReservedDBInstancesOffering) SetCurrencyCode(v string) *ReservedDBInstancesOffering { - s.CurrencyCode = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *ReservedDBInstancesOffering) SetDBInstanceClass(v string) *ReservedDBInstancesOffering { - s.DBInstanceClass = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *ReservedDBInstancesOffering) SetDuration(v int64) *ReservedDBInstancesOffering { - s.Duration = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *ReservedDBInstancesOffering) SetFixedPrice(v float64) *ReservedDBInstancesOffering { - s.FixedPrice = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *ReservedDBInstancesOffering) SetMultiAZ(v bool) *ReservedDBInstancesOffering { - s.MultiAZ = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *ReservedDBInstancesOffering) SetOfferingType(v string) *ReservedDBInstancesOffering { - s.OfferingType = &v - return s -} - -// SetProductDescription sets the ProductDescription field's value. -func (s *ReservedDBInstancesOffering) SetProductDescription(v string) *ReservedDBInstancesOffering { - s.ProductDescription = &v - return s -} - -// SetRecurringCharges sets the RecurringCharges field's value. -func (s *ReservedDBInstancesOffering) SetRecurringCharges(v []*RecurringCharge) *ReservedDBInstancesOffering { - s.RecurringCharges = v - return s -} - -// SetReservedDBInstancesOfferingId sets the ReservedDBInstancesOfferingId field's value. -func (s *ReservedDBInstancesOffering) SetReservedDBInstancesOfferingId(v string) *ReservedDBInstancesOffering { - s.ReservedDBInstancesOfferingId = &v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *ReservedDBInstancesOffering) SetUsagePrice(v float64) *ReservedDBInstancesOffering { - s.UsagePrice = &v - return s -} - -type ResetDBClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB cluster parameter group to reset. - // - // DBClusterParameterGroupName is a required field - DBClusterParameterGroupName *string `type:"string" required:"true"` - - // A list of parameter names in the DB cluster parameter group to reset to the - // default values. You can't use this parameter if the ResetAllParameters parameter - // is set to true. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` - - // A value that is set to true to reset all parameters in the DB cluster parameter - // group to their default values, and false otherwise. You can't use this parameter - // if there is a list of parameter names specified for the Parameters parameter. - ResetAllParameters *bool `type:"boolean"` -} - -// String returns the string representation -func (s ResetDBClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetDBClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetDBClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetDBClusterParameterGroupInput"} - if s.DBClusterParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *ResetDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *ResetDBClusterParameterGroupInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ResetDBClusterParameterGroupInput) SetParameters(v []*Parameter) *ResetDBClusterParameterGroupInput { - s.Parameters = v - return s -} - -// SetResetAllParameters sets the ResetAllParameters field's value. -func (s *ResetDBClusterParameterGroupInput) SetResetAllParameters(v bool) *ResetDBClusterParameterGroupInput { - s.ResetAllParameters = &v - return s -} - -type ResetDBParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the DB parameter group. - // - // Constraints: - // - // * Must match the name of an existing DBParameterGroup. - // - // DBParameterGroupName is a required field - DBParameterGroupName *string `type:"string" required:"true"` - - // To reset the entire DB parameter group, specify the DBParameterGroup name - // and ResetAllParameters parameters. To reset specific parameters, provide - // a list of the following: ParameterName and ApplyMethod. A maximum of 20 parameters - // can be modified in a single request. - // - // MySQL - // - // Valid Values (for Apply method): immediate | pending-reboot - // - // You can use the immediate value with dynamic parameters only. You can use - // the pending-reboot value for both dynamic and static parameters, and changes - // are applied when DB instance reboots. - // - // MariaDB - // - // Valid Values (for Apply method): immediate | pending-reboot - // - // You can use the immediate value with dynamic parameters only. You can use - // the pending-reboot value for both dynamic and static parameters, and changes - // are applied when DB instance reboots. - // - // Oracle - // - // Valid Values (for Apply method): pending-reboot - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` - - // Specifies whether (true) or not (false) to reset all parameters in the DB - // parameter group to default values. - // - // Default: true - ResetAllParameters *bool `type:"boolean"` -} - -// String returns the string representation -func (s ResetDBParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetDBParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetDBParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetDBParameterGroupInput"} - if s.DBParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *ResetDBParameterGroupInput) SetDBParameterGroupName(v string) *ResetDBParameterGroupInput { - s.DBParameterGroupName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ResetDBParameterGroupInput) SetParameters(v []*Parameter) *ResetDBParameterGroupInput { - s.Parameters = v - return s -} - -// SetResetAllParameters sets the ResetAllParameters field's value. -func (s *ResetDBParameterGroupInput) SetResetAllParameters(v bool) *ResetDBParameterGroupInput { - s.ResetAllParameters = &v - return s -} - -// Describes the pending maintenance actions for a resource. -type ResourcePendingMaintenanceActions struct { - _ struct{} `type:"structure"` - - // A list that provides details about the pending maintenance actions for the - // resource. - PendingMaintenanceActionDetails []*PendingMaintenanceAction `locationNameList:"PendingMaintenanceAction" type:"list"` - - // The ARN of the resource that has pending maintenance actions. - ResourceIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s ResourcePendingMaintenanceActions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourcePendingMaintenanceActions) GoString() string { - return s.String() -} - -// SetPendingMaintenanceActionDetails sets the PendingMaintenanceActionDetails field's value. -func (s *ResourcePendingMaintenanceActions) SetPendingMaintenanceActionDetails(v []*PendingMaintenanceAction) *ResourcePendingMaintenanceActions { - s.PendingMaintenanceActionDetails = v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *ResourcePendingMaintenanceActions) SetResourceIdentifier(v string) *ResourcePendingMaintenanceActions { - s.ResourceIdentifier = &v - return s -} - -type RestoreDBClusterFromS3Input struct { - _ struct{} `type:"structure"` - - // A list of EC2 Availability Zones that instances in the restored DB cluster - // can be created in. - AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // The target backtrack window, in seconds. To disable backtracking, set this - // value to 0. - // - // Default: 0 - // - // Constraints: - // - // * If specified, this value must be set to a number from 0 to 259,200 (72 - // hours). - BacktrackWindow *int64 `type:"long"` - - // The number of days for which automated backups of the restored DB cluster - // are retained. You must specify a minimum value of 1. - // - // Default: 1 - // - // Constraints: - // - // * Must be a value from 1 to 35 - BackupRetentionPeriod *int64 `type:"integer"` - - // A value that indicates that the restored DB cluster should be associated - // with the specified CharacterSet. - CharacterSetName *string `type:"string"` - - // The name of the DB cluster to create from the source data in the Amazon S3 - // bucket. This parameter is isn't case-sensitive. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster1 - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The name of the DB cluster parameter group to associate with the restored - // DB cluster. If this argument is omitted, default.aurora5.6 is used. - // - // Constraints: - // - // * If supplied, must match the name of an existing DBClusterParameterGroup. - DBClusterParameterGroupName *string `type:"string"` - - // A DB subnet group to associate with the restored DB cluster. - // - // Constraints: If supplied, must match the name of an existing DBSubnetGroup. - // - // Example: mySubnetgroup - DBSubnetGroupName *string `type:"string"` - - // The database name for the restored DB cluster. - DatabaseName *string `type:"string"` - - // Indicates if the DB cluster should have deletion protection enabled. The - // database can't be deleted when this value is set to true. The default is - // false. - DeletionProtection *bool `type:"boolean"` - - // The list of logs that the restored DB cluster is to export to CloudWatch - // Logs. The values in the list depend on the DB engine being used. For more - // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) - // in the Amazon Aurora User Guide. - EnableCloudwatchLogsExports []*string `type:"list"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // The name of the database engine to be used for the restored DB cluster. - // - // Valid Values: aurora, aurora-postgresql - // - // Engine is a required field - Engine *string `type:"string" required:"true"` - - // The version number of the database engine to use. - // - // Aurora MySQL - // - // Example: 5.6.10a - // - // Aurora PostgreSQL - // - // Example: 9.6.3 - EngineVersion *string `type:"string"` - - // The AWS KMS key identifier for an encrypted DB cluster. - // - // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption - // key. If you are creating a DB cluster with the same AWS account that owns - // the KMS encryption key used to encrypt the new DB cluster, then you can use - // the KMS key alias instead of the ARN for the KM encryption key. - // - // If the StorageEncrypted parameter is true, and you do not specify a value - // for the KmsKeyId parameter, then Amazon RDS will use your default encryption - // key. AWS KMS creates the default encryption key for your AWS account. Your - // AWS account has a different default encryption key for each AWS Region. - KmsKeyId *string `type:"string"` - - // The password for the master database user. This password can contain any - // printable ASCII character except "/", """, or "@". - // - // Constraints: Must contain from 8 to 41 characters. - // - // MasterUserPassword is a required field - MasterUserPassword *string `type:"string" required:"true"` - - // The name of the master user for the restored DB cluster. - // - // Constraints: - // - // * Must be 1 to 16 letters or numbers. - // - // * First character must be a letter. - // - // * Can't be a reserved word for the chosen database engine. - // - // MasterUsername is a required field - MasterUsername *string `type:"string" required:"true"` - - // A value that indicates that the restored DB cluster should be associated - // with the specified option group. - // - // Permanent options can't be removed from an option group. An option group - // can't be removed from a DB cluster once it is associated with a DB cluster. - OptionGroupName *string `type:"string"` - - // The port number on which the instances in the restored DB cluster accept - // connections. - // - // Default: 3306 - Port *int64 `type:"integer"` - - // The daily time range during which automated backups are created if automated - // backups are enabled using the BackupRetentionPeriod parameter. - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region. To see the time blocks available, see Adjusting - // the Preferred Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) - // in the Amazon Aurora User Guide. - // - // Constraints: - // - // * Must be in the format hh24:mi-hh24:mi. - // - // * Must be in Universal Coordinated Time (UTC). - // - // * Must not conflict with the preferred maintenance window. - // - // * Must be at least 30 minutes. - PreferredBackupWindow *string `type:"string"` - - // The weekly time range during which system maintenance can occur, in Universal - // Coordinated Time (UTC). - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // The default is a 30-minute window selected at random from an 8-hour block - // of time for each AWS Region, occurring on a random day of the week. To see - // the time blocks available, see Adjusting the Preferred Maintenance Window - // (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) - // in the Amazon Aurora User Guide. - // - // Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. - // - // Constraints: Minimum 30-minute window. - PreferredMaintenanceWindow *string `type:"string"` - - // The name of the Amazon S3 bucket that contains the data used to create the - // Amazon Aurora DB cluster. - // - // S3BucketName is a required field - S3BucketName *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the AWS Identity and Access Management - // (IAM) role that authorizes Amazon RDS to access the Amazon S3 bucket on your - // behalf. - // - // S3IngestionRoleArn is a required field - S3IngestionRoleArn *string `type:"string" required:"true"` - - // The prefix for all of the file names that contain the data used to create - // the Amazon Aurora DB cluster. If you do not specify a SourceS3Prefix value, - // then the Amazon Aurora DB cluster is created by using all of the files in - // the Amazon S3 bucket. - S3Prefix *string `type:"string"` - - // The identifier for the database engine that was backed up to create the files - // stored in the Amazon S3 bucket. - // - // Valid values: mysql - // - // SourceEngine is a required field - SourceEngine *string `type:"string" required:"true"` - - // The version of the database that the backup files were created from. - // - // MySQL version 5.5 and 5.6 are supported. - // - // Example: 5.6.22 - // - // SourceEngineVersion is a required field - SourceEngineVersion *string `type:"string" required:"true"` - - // Specifies whether the restored DB cluster is encrypted. - StorageEncrypted *bool `type:"boolean"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A list of EC2 VPC security groups to associate with the restored DB cluster. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s RestoreDBClusterFromS3Input) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBClusterFromS3Input) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreDBClusterFromS3Input) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreDBClusterFromS3Input"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.Engine == nil { - invalidParams.Add(request.NewErrParamRequired("Engine")) - } - if s.MasterUserPassword == nil { - invalidParams.Add(request.NewErrParamRequired("MasterUserPassword")) - } - if s.MasterUsername == nil { - invalidParams.Add(request.NewErrParamRequired("MasterUsername")) - } - if s.S3BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("S3BucketName")) - } - if s.S3IngestionRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("S3IngestionRoleArn")) - } - if s.SourceEngine == nil { - invalidParams.Add(request.NewErrParamRequired("SourceEngine")) - } - if s.SourceEngineVersion == nil { - invalidParams.Add(request.NewErrParamRequired("SourceEngineVersion")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *RestoreDBClusterFromS3Input) SetAvailabilityZones(v []*string) *RestoreDBClusterFromS3Input { - s.AvailabilityZones = v - return s -} - -// SetBacktrackWindow sets the BacktrackWindow field's value. -func (s *RestoreDBClusterFromS3Input) SetBacktrackWindow(v int64) *RestoreDBClusterFromS3Input { - s.BacktrackWindow = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *RestoreDBClusterFromS3Input) SetBackupRetentionPeriod(v int64) *RestoreDBClusterFromS3Input { - s.BackupRetentionPeriod = &v - return s -} - -// SetCharacterSetName sets the CharacterSetName field's value. -func (s *RestoreDBClusterFromS3Input) SetCharacterSetName(v string) *RestoreDBClusterFromS3Input { - s.CharacterSetName = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *RestoreDBClusterFromS3Input) SetDBClusterIdentifier(v string) *RestoreDBClusterFromS3Input { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *RestoreDBClusterFromS3Input) SetDBClusterParameterGroupName(v string) *RestoreDBClusterFromS3Input { - s.DBClusterParameterGroupName = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *RestoreDBClusterFromS3Input) SetDBSubnetGroupName(v string) *RestoreDBClusterFromS3Input { - s.DBSubnetGroupName = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *RestoreDBClusterFromS3Input) SetDatabaseName(v string) *RestoreDBClusterFromS3Input { - s.DatabaseName = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *RestoreDBClusterFromS3Input) SetDeletionProtection(v bool) *RestoreDBClusterFromS3Input { - s.DeletionProtection = &v - return s -} - -// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. -func (s *RestoreDBClusterFromS3Input) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterFromS3Input { - s.EnableCloudwatchLogsExports = v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *RestoreDBClusterFromS3Input) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBClusterFromS3Input { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *RestoreDBClusterFromS3Input) SetEngine(v string) *RestoreDBClusterFromS3Input { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *RestoreDBClusterFromS3Input) SetEngineVersion(v string) *RestoreDBClusterFromS3Input { - s.EngineVersion = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *RestoreDBClusterFromS3Input) SetKmsKeyId(v string) *RestoreDBClusterFromS3Input { - s.KmsKeyId = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *RestoreDBClusterFromS3Input) SetMasterUserPassword(v string) *RestoreDBClusterFromS3Input { - s.MasterUserPassword = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *RestoreDBClusterFromS3Input) SetMasterUsername(v string) *RestoreDBClusterFromS3Input { - s.MasterUsername = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *RestoreDBClusterFromS3Input) SetOptionGroupName(v string) *RestoreDBClusterFromS3Input { - s.OptionGroupName = &v - return s -} - -// SetPort sets the Port field's value. -func (s *RestoreDBClusterFromS3Input) SetPort(v int64) *RestoreDBClusterFromS3Input { - s.Port = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *RestoreDBClusterFromS3Input) SetPreferredBackupWindow(v string) *RestoreDBClusterFromS3Input { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *RestoreDBClusterFromS3Input) SetPreferredMaintenanceWindow(v string) *RestoreDBClusterFromS3Input { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetS3BucketName sets the S3BucketName field's value. -func (s *RestoreDBClusterFromS3Input) SetS3BucketName(v string) *RestoreDBClusterFromS3Input { - s.S3BucketName = &v - return s -} - -// SetS3IngestionRoleArn sets the S3IngestionRoleArn field's value. -func (s *RestoreDBClusterFromS3Input) SetS3IngestionRoleArn(v string) *RestoreDBClusterFromS3Input { - s.S3IngestionRoleArn = &v - return s -} - -// SetS3Prefix sets the S3Prefix field's value. -func (s *RestoreDBClusterFromS3Input) SetS3Prefix(v string) *RestoreDBClusterFromS3Input { - s.S3Prefix = &v - return s -} - -// SetSourceEngine sets the SourceEngine field's value. -func (s *RestoreDBClusterFromS3Input) SetSourceEngine(v string) *RestoreDBClusterFromS3Input { - s.SourceEngine = &v - return s -} - -// SetSourceEngineVersion sets the SourceEngineVersion field's value. -func (s *RestoreDBClusterFromS3Input) SetSourceEngineVersion(v string) *RestoreDBClusterFromS3Input { - s.SourceEngineVersion = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *RestoreDBClusterFromS3Input) SetStorageEncrypted(v bool) *RestoreDBClusterFromS3Input { - s.StorageEncrypted = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RestoreDBClusterFromS3Input) SetTags(v []*Tag) *RestoreDBClusterFromS3Input { - s.Tags = v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *RestoreDBClusterFromS3Input) SetVpcSecurityGroupIds(v []*string) *RestoreDBClusterFromS3Input { - s.VpcSecurityGroupIds = v - return s -} - -type RestoreDBClusterFromS3Output struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Aurora DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, - // and StartDBCluster actions. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s RestoreDBClusterFromS3Output) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBClusterFromS3Output) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *RestoreDBClusterFromS3Output) SetDBCluster(v *DBCluster) *RestoreDBClusterFromS3Output { - s.DBCluster = v - return s -} - -type RestoreDBClusterFromSnapshotInput struct { - _ struct{} `type:"structure"` - - // Provides the list of Amazon EC2 Availability Zones that instances in the - // restored DB cluster can be created in. - AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // The target backtrack window, in seconds. To disable backtracking, set this - // value to 0. - // - // Default: 0 - // - // Constraints: - // - // * If specified, this value must be set to a number from 0 to 259,200 (72 - // hours). - BacktrackWindow *int64 `type:"long"` - - // The name of the DB cluster to create from the DB snapshot or DB cluster snapshot. - // This parameter isn't case-sensitive. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // Example: my-snapshot-id - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The name of the DB cluster parameter group to associate with this DB cluster. - // If this argument is omitted, the default DB cluster parameter group for the - // specified engine is used. - // - // Constraints: - // - // * If supplied, must match the name of an existing default DB cluster parameter - // group. - // - // * Must be 1 to 255 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - DBClusterParameterGroupName *string `type:"string"` - - // The name of the DB subnet group to use for the new DB cluster. - // - // Constraints: If supplied, must match the name of an existing DB subnet group. - // - // Example: mySubnetgroup - DBSubnetGroupName *string `type:"string"` - - // The database name for the restored DB cluster. - DatabaseName *string `type:"string"` - - // Indicates if the DB cluster should have deletion protection enabled. The - // database can't be deleted when this value is set to true. The default is - // false. - DeletionProtection *bool `type:"boolean"` - - // The list of logs that the restored DB cluster is to export to Amazon CloudWatch - // Logs. The values in the list depend on the DB engine being used. For more - // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) - // in the Amazon Aurora User Guide. - EnableCloudwatchLogsExports []*string `type:"list"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // The database engine to use for the new DB cluster. - // - // Default: The same as source - // - // Constraint: Must be compatible with the engine of the source - // - // Engine is a required field - Engine *string `type:"string" required:"true"` - - // The DB engine mode of the DB cluster, either provisioned, serverless, or - // parallelquery. - EngineMode *string `type:"string"` - - // The version of the database engine to use for the new DB cluster. - EngineVersion *string `type:"string"` - - // The AWS KMS key identifier to use when restoring an encrypted DB cluster - // from a DB snapshot or DB cluster snapshot. - // - // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption - // key. If you are restoring a DB cluster with the same AWS account that owns - // the KMS encryption key used to encrypt the new DB cluster, then you can use - // the KMS key alias instead of the ARN for the KMS encryption key. - // - // If you don't specify a value for the KmsKeyId parameter, then the following - // occurs: - // - // * If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is encrypted, - // then the restored DB cluster is encrypted using the KMS key that was used - // to encrypt the DB snapshot or DB cluster snapshot. - // - // * If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is not - // encrypted, then the restored DB cluster is not encrypted. - KmsKeyId *string `type:"string"` - - // The name of the option group to use for the restored DB cluster. - OptionGroupName *string `type:"string"` - - // The port number on which the new DB cluster accepts connections. - // - // Constraints: This value must be 1150-65535 - // - // Default: The same port as the original DB cluster. - Port *int64 `type:"integer"` - - // For DB clusters in serverless DB engine mode, the scaling properties of the - // DB cluster. - ScalingConfiguration *ScalingConfiguration `type:"structure"` - - // The identifier for the DB snapshot or DB cluster snapshot to restore from. - // - // You can use either the name or the Amazon Resource Name (ARN) to specify - // a DB cluster snapshot. However, you can use only the ARN to specify a DB - // snapshot. - // - // Constraints: - // - // * Must match the identifier of an existing Snapshot. - // - // SnapshotIdentifier is a required field - SnapshotIdentifier *string `type:"string" required:"true"` - - // The tags to be assigned to the restored DB cluster. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A list of VPC security groups that the new DB cluster will belong to. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s RestoreDBClusterFromSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBClusterFromSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreDBClusterFromSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreDBClusterFromSnapshotInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.Engine == nil { - invalidParams.Add(request.NewErrParamRequired("Engine")) - } - if s.SnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetAvailabilityZones(v []*string) *RestoreDBClusterFromSnapshotInput { - s.AvailabilityZones = v - return s -} - -// SetBacktrackWindow sets the BacktrackWindow field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetBacktrackWindow(v int64) *RestoreDBClusterFromSnapshotInput { - s.BacktrackWindow = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetDBClusterIdentifier(v string) *RestoreDBClusterFromSnapshotInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetDBClusterParameterGroupName(v string) *RestoreDBClusterFromSnapshotInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetDBSubnetGroupName(v string) *RestoreDBClusterFromSnapshotInput { - s.DBSubnetGroupName = &v - return s -} - -// SetDatabaseName sets the DatabaseName field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetDatabaseName(v string) *RestoreDBClusterFromSnapshotInput { - s.DatabaseName = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetDeletionProtection(v bool) *RestoreDBClusterFromSnapshotInput { - s.DeletionProtection = &v - return s -} - -// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterFromSnapshotInput { - s.EnableCloudwatchLogsExports = v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBClusterFromSnapshotInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetEngine(v string) *RestoreDBClusterFromSnapshotInput { - s.Engine = &v - return s -} - -// SetEngineMode sets the EngineMode field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetEngineMode(v string) *RestoreDBClusterFromSnapshotInput { - s.EngineMode = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetEngineVersion(v string) *RestoreDBClusterFromSnapshotInput { - s.EngineVersion = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetKmsKeyId(v string) *RestoreDBClusterFromSnapshotInput { - s.KmsKeyId = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetOptionGroupName(v string) *RestoreDBClusterFromSnapshotInput { - s.OptionGroupName = &v - return s -} - -// SetPort sets the Port field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetPort(v int64) *RestoreDBClusterFromSnapshotInput { - s.Port = &v - return s -} - -// SetScalingConfiguration sets the ScalingConfiguration field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetScalingConfiguration(v *ScalingConfiguration) *RestoreDBClusterFromSnapshotInput { - s.ScalingConfiguration = v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetSnapshotIdentifier(v string) *RestoreDBClusterFromSnapshotInput { - s.SnapshotIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetTags(v []*Tag) *RestoreDBClusterFromSnapshotInput { - s.Tags = v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *RestoreDBClusterFromSnapshotInput) SetVpcSecurityGroupIds(v []*string) *RestoreDBClusterFromSnapshotInput { - s.VpcSecurityGroupIds = v - return s -} - -type RestoreDBClusterFromSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Aurora DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, - // and StartDBCluster actions. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s RestoreDBClusterFromSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBClusterFromSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *RestoreDBClusterFromSnapshotOutput) SetDBCluster(v *DBCluster) *RestoreDBClusterFromSnapshotOutput { - s.DBCluster = v - return s -} - -type RestoreDBClusterToPointInTimeInput struct { - _ struct{} `type:"structure"` - - // The target backtrack window, in seconds. To disable backtracking, set this - // value to 0. - // - // Default: 0 - // - // Constraints: - // - // * If specified, this value must be set to a number from 0 to 259,200 (72 - // hours). - BacktrackWindow *int64 `type:"long"` - - // The name of the new DB cluster to be created. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` - - // The name of the DB cluster parameter group to associate with this DB cluster. - // If this argument is omitted, the default DB cluster parameter group for the - // specified engine is used. - // - // Constraints: - // - // * If supplied, must match the name of an existing DB cluster parameter - // group. - // - // * Must be 1 to 255 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - DBClusterParameterGroupName *string `type:"string"` - - // The DB subnet group name to use for the new DB cluster. - // - // Constraints: If supplied, must match the name of an existing DBSubnetGroup. - // - // Example: mySubnetgroup - DBSubnetGroupName *string `type:"string"` - - // Indicates if the DB cluster should have deletion protection enabled. The - // database can't be deleted when this value is set to true. The default is - // false. - DeletionProtection *bool `type:"boolean"` - - // The list of logs that the restored DB cluster is to export to CloudWatch - // Logs. The values in the list depend on the DB engine being used. For more - // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) - // in the Amazon Aurora User Guide. - EnableCloudwatchLogsExports []*string `type:"list"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // The AWS KMS key identifier to use when restoring an encrypted DB cluster - // from an encrypted DB cluster. - // - // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption - // key. If you are restoring a DB cluster with the same AWS account that owns - // the KMS encryption key used to encrypt the new DB cluster, then you can use - // the KMS key alias instead of the ARN for the KMS encryption key. - // - // You can restore to a new DB cluster and encrypt the new DB cluster with a - // KMS key that is different than the KMS key used to encrypt the source DB - // cluster. The new DB cluster is encrypted with the KMS key identified by the - // KmsKeyId parameter. - // - // If you don't specify a value for the KmsKeyId parameter, then the following - // occurs: - // - // * If the DB cluster is encrypted, then the restored DB cluster is encrypted - // using the KMS key that was used to encrypt the source DB cluster. - // - // * If the DB cluster is not encrypted, then the restored DB cluster is - // not encrypted. - // - // If DBClusterIdentifier refers to a DB cluster that is not encrypted, then - // the restore request is rejected. - KmsKeyId *string `type:"string"` - - // The name of the option group for the new DB cluster. - OptionGroupName *string `type:"string"` - - // The port number on which the new DB cluster accepts connections. - // - // Constraints: A value from 1150-65535. - // - // Default: The default port for the engine. - Port *int64 `type:"integer"` - - // The date and time to restore the DB cluster to. - // - // Valid Values: Value must be a time in Universal Coordinated Time (UTC) format - // - // Constraints: - // - // * Must be before the latest restorable time for the DB instance - // - // * Must be specified if UseLatestRestorableTime parameter is not provided - // - // * Can't be specified if UseLatestRestorableTime parameter is true - // - // * Can't be specified if RestoreType parameter is copy-on-write - // - // Example: 2015-03-07T23:45:00Z - RestoreToTime *time.Time `type:"timestamp"` - - // The type of restore to be performed. You can specify one of the following - // values: - // - // * full-copy - The new DB cluster is restored as a full copy of the source - // DB cluster. - // - // * copy-on-write - The new DB cluster is restored as a clone of the source - // DB cluster. - // - // Constraints: You can't specify copy-on-write if the engine version of the - // source DB cluster is earlier than 1.11. - // - // If you don't specify a RestoreType value, then the new DB cluster is restored - // as a full copy of the source DB cluster. - RestoreType *string `type:"string"` - - // The identifier of the source DB cluster from which to restore. - // - // Constraints: - // - // * Must match the identifier of an existing DBCluster. - // - // SourceDBClusterIdentifier is a required field - SourceDBClusterIdentifier *string `type:"string" required:"true"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A value that is set to true to restore the DB cluster to the latest restorable - // backup time, and false otherwise. - // - // Default: false - // - // Constraints: Can't be specified if RestoreToTime parameter is provided. - UseLatestRestorableTime *bool `type:"boolean"` - - // A list of VPC security groups that the new DB cluster belongs to. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s RestoreDBClusterToPointInTimeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBClusterToPointInTimeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreDBClusterToPointInTimeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreDBClusterToPointInTimeInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - if s.SourceDBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBacktrackWindow sets the BacktrackWindow field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetBacktrackWindow(v int64) *RestoreDBClusterToPointInTimeInput { - s.BacktrackWindow = &v - return s -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetDBClusterIdentifier(v string) *RestoreDBClusterToPointInTimeInput { - s.DBClusterIdentifier = &v - return s -} - -// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetDBClusterParameterGroupName(v string) *RestoreDBClusterToPointInTimeInput { - s.DBClusterParameterGroupName = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetDBSubnetGroupName(v string) *RestoreDBClusterToPointInTimeInput { - s.DBSubnetGroupName = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetDeletionProtection(v bool) *RestoreDBClusterToPointInTimeInput { - s.DeletionProtection = &v - return s -} - -// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterToPointInTimeInput { - s.EnableCloudwatchLogsExports = v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBClusterToPointInTimeInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetKmsKeyId(v string) *RestoreDBClusterToPointInTimeInput { - s.KmsKeyId = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetOptionGroupName(v string) *RestoreDBClusterToPointInTimeInput { - s.OptionGroupName = &v - return s -} - -// SetPort sets the Port field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetPort(v int64) *RestoreDBClusterToPointInTimeInput { - s.Port = &v - return s -} - -// SetRestoreToTime sets the RestoreToTime field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetRestoreToTime(v time.Time) *RestoreDBClusterToPointInTimeInput { - s.RestoreToTime = &v - return s -} - -// SetRestoreType sets the RestoreType field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetRestoreType(v string) *RestoreDBClusterToPointInTimeInput { - s.RestoreType = &v - return s -} - -// SetSourceDBClusterIdentifier sets the SourceDBClusterIdentifier field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetSourceDBClusterIdentifier(v string) *RestoreDBClusterToPointInTimeInput { - s.SourceDBClusterIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetTags(v []*Tag) *RestoreDBClusterToPointInTimeInput { - s.Tags = v - return s -} - -// SetUseLatestRestorableTime sets the UseLatestRestorableTime field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetUseLatestRestorableTime(v bool) *RestoreDBClusterToPointInTimeInput { - s.UseLatestRestorableTime = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *RestoreDBClusterToPointInTimeInput) SetVpcSecurityGroupIds(v []*string) *RestoreDBClusterToPointInTimeInput { - s.VpcSecurityGroupIds = v - return s -} - -type RestoreDBClusterToPointInTimeOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Aurora DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, - // and StartDBCluster actions. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s RestoreDBClusterToPointInTimeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBClusterToPointInTimeOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *RestoreDBClusterToPointInTimeOutput) SetDBCluster(v *DBCluster) *RestoreDBClusterToPointInTimeOutput { - s.DBCluster = v - return s -} - -type RestoreDBInstanceFromDBSnapshotInput struct { - _ struct{} `type:"structure"` - - // Indicates that minor version upgrades are applied automatically to the DB - // instance during the maintenance window. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The EC2 Availability Zone that the DB instance is created in. - // - // Default: A random, system-chosen Availability Zone. - // - // Constraint: You can't specify the AvailabilityZone parameter if the MultiAZ - // parameter is set to true. - // - // Example: us-east-1a - AvailabilityZone *string `type:"string"` - - // True to copy all tags from the restored DB instance to snapshots of the DB - // instance, and otherwise false. The default is false. - CopyTagsToSnapshot *bool `type:"boolean"` - - // The compute and memory capacity of the Amazon RDS DB instance, for example, - // db.m4.large. Not all DB instance classes are available in all AWS Regions, - // or for all database engines. For the full list of DB instance classes, and - // availability for your engine, see DB Instance Class (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) - // in the Amazon RDS User Guide. - // - // Default: The same DBInstanceClass as the original DB instance. - DBInstanceClass *string `type:"string"` - - // Name of the DB instance to create from the DB snapshot. This parameter isn't - // case-sensitive. - // - // Constraints: - // - // * Must contain from 1 to 63 numbers, letters, or hyphens - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // Example: my-snapshot-id - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The database name for the restored DB instance. - // - // This parameter doesn't apply to the MySQL, PostgreSQL, or MariaDB engines. - DBName *string `type:"string"` - - // The name of the DB parameter group to associate with this DB instance. If - // this argument is omitted, the default DBParameterGroup for the specified - // engine is used. - // - // Constraints: - // - // * If supplied, must match the name of an existing DBParameterGroup. - // - // * Must be 1 to 255 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - DBParameterGroupName *string `type:"string"` - - // The identifier for the DB snapshot to restore from. - // - // Constraints: - // - // * Must match the identifier of an existing DBSnapshot. - // - // * If you are restoring from a shared manual DB snapshot, the DBSnapshotIdentifier - // must be the ARN of the shared DB snapshot. - // - // DBSnapshotIdentifier is a required field - DBSnapshotIdentifier *string `type:"string" required:"true"` - - // The DB subnet group name to use for the new instance. - // - // Constraints: If supplied, must match the name of an existing DBSubnetGroup. - // - // Example: mySubnetgroup - DBSubnetGroupName *string `type:"string"` - - // Indicates if the DB instance should have deletion protection enabled. The - // database can't be deleted when this value is set to true. The default is - // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). - DeletionProtection *bool `type:"boolean"` - - // Specify the Active Directory Domain to restore the instance in. - Domain *string `type:"string"` - - // Specify the name of the IAM role to be used when making API calls to the - // Directory Service. - DomainIAMRoleName *string `type:"string"` - - // The list of logs that the restored DB instance is to export to CloudWatch - // Logs. The values in the list depend on the DB engine being used. For more - // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) - // in the Amazon Aurora User Guide. - EnableCloudwatchLogsExports []*string `type:"list"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // You can enable IAM database authentication for the following database engines - // - // * For MySQL 5.6, minor version 5.6.34 or higher - // - // * For MySQL 5.7, minor version 5.7.16 or higher - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // The database engine to use for the new instance. - // - // Default: The same as source - // - // Constraint: Must be compatible with the engine of the source. For example, - // you can restore a MariaDB 10.1 DB instance from a MySQL 5.6 snapshot. - // - // Valid Values: - // - // * mariadb - // - // * mysql - // - // * oracle-ee - // - // * oracle-se2 - // - // * oracle-se1 - // - // * oracle-se - // - // * postgres - // - // * sqlserver-ee - // - // * sqlserver-se - // - // * sqlserver-ex - // - // * sqlserver-web - Engine *string `type:"string"` - - // Specifies the amount of provisioned IOPS for the DB instance, expressed in - // I/O operations per second. If this parameter is not specified, the IOPS value - // is taken from the backup. If this parameter is set to 0, the new instance - // is converted to a non-PIOPS instance. The conversion takes additional time, - // though your DB instance is available for connections before the conversion - // starts. - // - // The provisioned IOPS value must follow the requirements for your database - // engine. For more information, see Amazon RDS Provisioned IOPS Storage to - // Improve Performance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) - // in the Amazon RDS User Guide. - // - // Constraints: Must be an integer greater than 1000. - Iops *int64 `type:"integer"` - - // License model information for the restored DB instance. - // - // Default: Same as source. - // - // Valid values: license-included | bring-your-own-license | general-public-license - LicenseModel *string `type:"string"` - - // Specifies if the DB instance is a Multi-AZ deployment. - // - // Constraint: You can't specify the AvailabilityZone parameter if the MultiAZ - // parameter is set to true. - MultiAZ *bool `type:"boolean"` - - // The name of the option group to be used for the restored DB instance. - // - // Permanent options, such as the TDE option for Oracle Advanced Security TDE, - // can't be removed from an option group, and that option group can't be removed - // from a DB instance once it is associated with a DB instance - OptionGroupName *string `type:"string"` - - // The port number on which the database accepts connections. - // - // Default: The same port as the original DB instance - // - // Constraints: Value must be 1150-65535 - Port *int64 `type:"integer"` - - // The number of CPU cores and the number of threads per core for the DB instance - // class of the DB instance. - ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` - - // Specifies the accessibility options for the DB instance. A value of true - // specifies an Internet-facing instance with a publicly resolvable DNS name, - // which resolves to a public IP address. A value of false specifies an internal - // instance with a DNS name that resolves to a private IP address. For more - // information, see CreateDBInstance. - PubliclyAccessible *bool `type:"boolean"` - - // Specifies the storage type to be associated with the DB instance. - // - // Valid values: standard | gp2 | io1 - // - // If you specify io1, you must also include a value for the Iops parameter. - // - // Default: io1 if the Iops parameter is specified, otherwise standard - StorageType *string `type:"string"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // The ARN from the key store with which to associate the instance for TDE encryption. - TdeCredentialArn *string `type:"string"` - - // The password for the given ARN from the key store in order to access the - // device. - TdeCredentialPassword *string `type:"string"` - - // A value that specifies that the DB instance class of the DB instance uses - // its default processor features. - UseDefaultProcessorFeatures *bool `type:"boolean"` - - // A list of EC2 VPC security groups to associate with this DB instance. - // - // Default: The default EC2 VPC security group for the DB subnet group's VPC. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s RestoreDBInstanceFromDBSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBInstanceFromDBSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreDBInstanceFromDBSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreDBInstanceFromDBSnapshotInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - if s.DBSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetAutoMinorVersionUpgrade(v bool) *RestoreDBInstanceFromDBSnapshotInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetAvailabilityZone(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.AvailabilityZone = &v - return s -} - -// SetCopyTagsToSnapshot sets the CopyTagsToSnapshot field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetCopyTagsToSnapshot(v bool) *RestoreDBInstanceFromDBSnapshotInput { - s.CopyTagsToSnapshot = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetDBInstanceClass(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetDBInstanceIdentifier(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBName sets the DBName field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetDBName(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.DBName = &v - return s -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetDBParameterGroupName(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.DBParameterGroupName = &v - return s -} - -// SetDBSnapshotIdentifier sets the DBSnapshotIdentifier field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetDBSnapshotIdentifier(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.DBSnapshotIdentifier = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetDBSubnetGroupName(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.DBSubnetGroupName = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetDeletionProtection(v bool) *RestoreDBInstanceFromDBSnapshotInput { - s.DeletionProtection = &v - return s -} - -// SetDomain sets the Domain field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetDomain(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.Domain = &v - return s -} - -// SetDomainIAMRoleName sets the DomainIAMRoleName field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetDomainIAMRoleName(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.DomainIAMRoleName = &v - return s -} - -// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBInstanceFromDBSnapshotInput { - s.EnableCloudwatchLogsExports = v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBInstanceFromDBSnapshotInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetEngine(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.Engine = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetIops(v int64) *RestoreDBInstanceFromDBSnapshotInput { - s.Iops = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetLicenseModel(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.LicenseModel = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetMultiAZ(v bool) *RestoreDBInstanceFromDBSnapshotInput { - s.MultiAZ = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetOptionGroupName(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.OptionGroupName = &v - return s -} - -// SetPort sets the Port field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetPort(v int64) *RestoreDBInstanceFromDBSnapshotInput { - s.Port = &v - return s -} - -// SetProcessorFeatures sets the ProcessorFeatures field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetProcessorFeatures(v []*ProcessorFeature) *RestoreDBInstanceFromDBSnapshotInput { - s.ProcessorFeatures = v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetPubliclyAccessible(v bool) *RestoreDBInstanceFromDBSnapshotInput { - s.PubliclyAccessible = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetStorageType(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.StorageType = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetTags(v []*Tag) *RestoreDBInstanceFromDBSnapshotInput { - s.Tags = v - return s -} - -// SetTdeCredentialArn sets the TdeCredentialArn field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetTdeCredentialArn(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.TdeCredentialArn = &v - return s -} - -// SetTdeCredentialPassword sets the TdeCredentialPassword field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetTdeCredentialPassword(v string) *RestoreDBInstanceFromDBSnapshotInput { - s.TdeCredentialPassword = &v - return s -} - -// SetUseDefaultProcessorFeatures sets the UseDefaultProcessorFeatures field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetUseDefaultProcessorFeatures(v bool) *RestoreDBInstanceFromDBSnapshotInput { - s.UseDefaultProcessorFeatures = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *RestoreDBInstanceFromDBSnapshotInput) SetVpcSecurityGroupIds(v []*string) *RestoreDBInstanceFromDBSnapshotInput { - s.VpcSecurityGroupIds = v - return s -} - -type RestoreDBInstanceFromDBSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s RestoreDBInstanceFromDBSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBInstanceFromDBSnapshotOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *RestoreDBInstanceFromDBSnapshotOutput) SetDBInstance(v *DBInstance) *RestoreDBInstanceFromDBSnapshotOutput { - s.DBInstance = v - return s -} - -type RestoreDBInstanceFromS3Input struct { - _ struct{} `type:"structure"` - - // The amount of storage (in gigabytes) to allocate initially for the DB instance. - // Follow the allocation rules specified in CreateDBInstance. - // - // Be sure to allocate enough memory for your new DB instance so that the restore - // operation can succeed. You can also allocate additional memory for future - // growth. - AllocatedStorage *int64 `type:"integer"` - - // True to indicate that minor engine upgrades are applied automatically to - // the DB instance during the maintenance window, and otherwise false. - // - // Default: true - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The Availability Zone that the DB instance is created in. For information - // about AWS Regions and Availability Zones, see Regions and Availability Zones - // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html) - // in the Amazon RDS User Guide. - // - // Default: A random, system-chosen Availability Zone in the endpoint's AWS - // Region. - // - // Example: us-east-1d - // - // Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ - // parameter is set to true. The specified Availability Zone must be in the - // same AWS Region as the current endpoint. - AvailabilityZone *string `type:"string"` - - // The number of days for which automated backups are retained. Setting this - // parameter to a positive number enables backups. For more information, see - // CreateDBInstance. - BackupRetentionPeriod *int64 `type:"integer"` - - // True to copy all tags from the DB instance to snapshots of the DB instance, - // and otherwise false. - // - // Default: false. - CopyTagsToSnapshot *bool `type:"boolean"` - - // The compute and memory capacity of the DB instance, for example, db.m4.large. - // Not all DB instance classes are available in all AWS Regions, or for all - // database engines. For the full list of DB instance classes, and availability - // for your engine, see DB Instance Class (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) - // in the Amazon RDS User Guide. - // - // Importing from Amazon S3 is not supported on the db.t2.micro DB instance - // class. - // - // DBInstanceClass is a required field - DBInstanceClass *string `type:"string" required:"true"` - - // The DB instance identifier. This parameter is stored as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - // - // Example: mydbinstance - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The name of the database to create when the DB instance is created. Follow - // the naming rules specified in CreateDBInstance. - DBName *string `type:"string"` - - // The name of the DB parameter group to associate with this DB instance. If - // this argument is omitted, the default parameter group for the specified engine - // is used. - DBParameterGroupName *string `type:"string"` - - // A list of DB security groups to associate with this DB instance. - // - // Default: The default DB security group for the database engine. - DBSecurityGroups []*string `locationNameList:"DBSecurityGroupName" type:"list"` - - // A DB subnet group to associate with this DB instance. - DBSubnetGroupName *string `type:"string"` - - // Indicates if the DB instance should have deletion protection enabled. The - // database can't be deleted when this value is set to true. The default is - // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). - DeletionProtection *bool `type:"boolean"` - - // The list of logs that the restored DB instance is to export to CloudWatch - // Logs. The values in the list depend on the DB engine being used. For more - // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) - // in the Amazon RDS User Guide. - EnableCloudwatchLogsExports []*string `type:"list"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // True to enable Performance Insights for the DB instance, and otherwise false. - // - // For more information, see Using Amazon Performance Insights (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) - // in the Amazon Relational Database Service User Guide. - EnablePerformanceInsights *bool `type:"boolean"` - - // The name of the database engine to be used for this instance. - // - // Valid Values: mysql - // - // Engine is a required field - Engine *string `type:"string" required:"true"` - - // The version number of the database engine to use. Choose the latest minor - // version of your database engine. For information about engine versions, see - // CreateDBInstance, or call DescribeDBEngineVersions. - EngineVersion *string `type:"string"` - - // The amount of Provisioned IOPS (input/output operations per second) to allocate - // initially for the DB instance. For information about valid Iops values, see - // see Amazon RDS Provisioned IOPS Storage to Improve Performance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) - // in the Amazon RDS User Guide. - Iops *int64 `type:"integer"` - - // The AWS KMS key identifier for an encrypted DB instance. - // - // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption - // key. If you are creating a DB instance with the same AWS account that owns - // the KMS encryption key used to encrypt the new DB instance, then you can - // use the KMS key alias instead of the ARN for the KM encryption key. - // - // If the StorageEncrypted parameter is true, and you do not specify a value - // for the KmsKeyId parameter, then Amazon RDS will use your default encryption - // key. AWS KMS creates the default encryption key for your AWS account. Your - // AWS account has a different default encryption key for each AWS Region. - KmsKeyId *string `type:"string"` - - // The license model for this DB instance. Use general-public-license. - LicenseModel *string `type:"string"` - - // The password for the master user. The password can include any printable - // ASCII character except "/", """, or "@". - // - // Constraints: Must contain from 8 to 41 characters. - MasterUserPassword *string `type:"string"` - - // The name for the master user. - // - // Constraints: - // - // * Must be 1 to 16 letters or numbers. - // - // * First character must be a letter. - // - // * Can't be a reserved word for the chosen database engine. - MasterUsername *string `type:"string"` - - // The interval, in seconds, between points when Enhanced Monitoring metrics - // are collected for the DB instance. To disable collecting Enhanced Monitoring - // metrics, specify 0. - // - // If MonitoringRoleArn is specified, then you must also set MonitoringInterval - // to a value other than 0. - // - // Valid Values: 0, 1, 5, 10, 15, 30, 60 - // - // Default: 0 - MonitoringInterval *int64 `type:"integer"` - - // The ARN for the IAM role that permits RDS to send enhanced monitoring metrics - // to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. - // For information on creating a monitoring role, see Setting Up and Enabling - // Enhanced Monitoring (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling) - // in the Amazon RDS User Guide. - // - // If MonitoringInterval is set to a value other than 0, then you must supply - // a MonitoringRoleArn value. - MonitoringRoleArn *string `type:"string"` - - // Specifies whether the DB instance is a Multi-AZ deployment. If MultiAZ is - // set to true, you can't set the AvailabilityZone parameter. - MultiAZ *bool `type:"boolean"` - - // The name of the option group to associate with this DB instance. If this - // argument is omitted, the default option group for the specified engine is - // used. - OptionGroupName *string `type:"string"` - - // The AWS KMS key identifier for encryption of Performance Insights data. The - // KMS key ID is the Amazon Resource Name (ARN), the KMS key identifier, or - // the KMS key alias for the KMS encryption key. - PerformanceInsightsKMSKeyId *string `type:"string"` - - // The amount of time, in days, to retain Performance Insights data. Valid values - // are 7 or 731 (2 years). - PerformanceInsightsRetentionPeriod *int64 `type:"integer"` - - // The port number on which the database accepts connections. - // - // Type: Integer - // - // Valid Values: 1150-65535 - // - // Default: 3306 - Port *int64 `type:"integer"` - - // The time range each day during which automated backups are created if automated - // backups are enabled. For more information, see The Backup Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow) - // in the Amazon RDS User Guide. - // - // Constraints: - // - // * Must be in the format hh24:mi-hh24:mi. - // - // * Must be in Universal Coordinated Time (UTC). - // - // * Must not conflict with the preferred maintenance window. - // - // * Must be at least 30 minutes. - PreferredBackupWindow *string `type:"string"` - - // The time range each week during which system maintenance can occur, in Universal - // Coordinated Time (UTC). For more information, see Amazon RDS Maintenance - // Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance) - // in the Amazon RDS User Guide. - // - // Constraints: - // - // * Must be in the format ddd:hh24:mi-ddd:hh24:mi. - // - // * Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. - // - // * Must be in Universal Coordinated Time (UTC). - // - // * Must not conflict with the preferred backup window. - // - // * Must be at least 30 minutes. - PreferredMaintenanceWindow *string `type:"string"` - - // The number of CPU cores and the number of threads per core for the DB instance - // class of the DB instance. - ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` - - // Specifies the accessibility options for the DB instance. A value of true - // specifies an Internet-facing instance with a publicly resolvable DNS name, - // which resolves to a public IP address. A value of false specifies an internal - // instance with a DNS name that resolves to a private IP address. For more - // information, see CreateDBInstance. - PubliclyAccessible *bool `type:"boolean"` - - // The name of your Amazon S3 bucket that contains your database backup file. - // - // S3BucketName is a required field - S3BucketName *string `type:"string" required:"true"` - - // An AWS Identity and Access Management (IAM) role to allow Amazon RDS to access - // your Amazon S3 bucket. - // - // S3IngestionRoleArn is a required field - S3IngestionRoleArn *string `type:"string" required:"true"` - - // The prefix of your Amazon S3 bucket. - S3Prefix *string `type:"string"` - - // The name of the engine of your source database. - // - // Valid Values: mysql - // - // SourceEngine is a required field - SourceEngine *string `type:"string" required:"true"` - - // The engine version of your source database. - // - // Valid Values: 5.6 - // - // SourceEngineVersion is a required field - SourceEngineVersion *string `type:"string" required:"true"` - - // Specifies whether the new DB instance is encrypted or not. - StorageEncrypted *bool `type:"boolean"` - - // Specifies the storage type to be associated with the DB instance. - // - // Valid values: standard | gp2 | io1 - // - // If you specify io1, you must also include a value for the Iops parameter. - // - // Default: io1 if the Iops parameter is specified; otherwise standard - StorageType *string `type:"string"` - - // A list of tags to associate with this DB instance. For more information, - // see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A value that specifies that the DB instance class of the DB instance uses - // its default processor features. - UseDefaultProcessorFeatures *bool `type:"boolean"` - - // A list of VPC security groups to associate with this DB instance. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s RestoreDBInstanceFromS3Input) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBInstanceFromS3Input) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreDBInstanceFromS3Input) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreDBInstanceFromS3Input"} - if s.DBInstanceClass == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceClass")) - } - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - if s.Engine == nil { - invalidParams.Add(request.NewErrParamRequired("Engine")) - } - if s.S3BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("S3BucketName")) - } - if s.S3IngestionRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("S3IngestionRoleArn")) - } - if s.SourceEngine == nil { - invalidParams.Add(request.NewErrParamRequired("SourceEngine")) - } - if s.SourceEngineVersion == nil { - invalidParams.Add(request.NewErrParamRequired("SourceEngineVersion")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllocatedStorage sets the AllocatedStorage field's value. -func (s *RestoreDBInstanceFromS3Input) SetAllocatedStorage(v int64) *RestoreDBInstanceFromS3Input { - s.AllocatedStorage = &v - return s -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *RestoreDBInstanceFromS3Input) SetAutoMinorVersionUpgrade(v bool) *RestoreDBInstanceFromS3Input { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *RestoreDBInstanceFromS3Input) SetAvailabilityZone(v string) *RestoreDBInstanceFromS3Input { - s.AvailabilityZone = &v - return s -} - -// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. -func (s *RestoreDBInstanceFromS3Input) SetBackupRetentionPeriod(v int64) *RestoreDBInstanceFromS3Input { - s.BackupRetentionPeriod = &v - return s -} - -// SetCopyTagsToSnapshot sets the CopyTagsToSnapshot field's value. -func (s *RestoreDBInstanceFromS3Input) SetCopyTagsToSnapshot(v bool) *RestoreDBInstanceFromS3Input { - s.CopyTagsToSnapshot = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *RestoreDBInstanceFromS3Input) SetDBInstanceClass(v string) *RestoreDBInstanceFromS3Input { - s.DBInstanceClass = &v - return s -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *RestoreDBInstanceFromS3Input) SetDBInstanceIdentifier(v string) *RestoreDBInstanceFromS3Input { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBName sets the DBName field's value. -func (s *RestoreDBInstanceFromS3Input) SetDBName(v string) *RestoreDBInstanceFromS3Input { - s.DBName = &v - return s -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *RestoreDBInstanceFromS3Input) SetDBParameterGroupName(v string) *RestoreDBInstanceFromS3Input { - s.DBParameterGroupName = &v - return s -} - -// SetDBSecurityGroups sets the DBSecurityGroups field's value. -func (s *RestoreDBInstanceFromS3Input) SetDBSecurityGroups(v []*string) *RestoreDBInstanceFromS3Input { - s.DBSecurityGroups = v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *RestoreDBInstanceFromS3Input) SetDBSubnetGroupName(v string) *RestoreDBInstanceFromS3Input { - s.DBSubnetGroupName = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *RestoreDBInstanceFromS3Input) SetDeletionProtection(v bool) *RestoreDBInstanceFromS3Input { - s.DeletionProtection = &v - return s -} - -// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. -func (s *RestoreDBInstanceFromS3Input) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBInstanceFromS3Input { - s.EnableCloudwatchLogsExports = v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *RestoreDBInstanceFromS3Input) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBInstanceFromS3Input { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEnablePerformanceInsights sets the EnablePerformanceInsights field's value. -func (s *RestoreDBInstanceFromS3Input) SetEnablePerformanceInsights(v bool) *RestoreDBInstanceFromS3Input { - s.EnablePerformanceInsights = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *RestoreDBInstanceFromS3Input) SetEngine(v string) *RestoreDBInstanceFromS3Input { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *RestoreDBInstanceFromS3Input) SetEngineVersion(v string) *RestoreDBInstanceFromS3Input { - s.EngineVersion = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *RestoreDBInstanceFromS3Input) SetIops(v int64) *RestoreDBInstanceFromS3Input { - s.Iops = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *RestoreDBInstanceFromS3Input) SetKmsKeyId(v string) *RestoreDBInstanceFromS3Input { - s.KmsKeyId = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *RestoreDBInstanceFromS3Input) SetLicenseModel(v string) *RestoreDBInstanceFromS3Input { - s.LicenseModel = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *RestoreDBInstanceFromS3Input) SetMasterUserPassword(v string) *RestoreDBInstanceFromS3Input { - s.MasterUserPassword = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *RestoreDBInstanceFromS3Input) SetMasterUsername(v string) *RestoreDBInstanceFromS3Input { - s.MasterUsername = &v - return s -} - -// SetMonitoringInterval sets the MonitoringInterval field's value. -func (s *RestoreDBInstanceFromS3Input) SetMonitoringInterval(v int64) *RestoreDBInstanceFromS3Input { - s.MonitoringInterval = &v - return s -} - -// SetMonitoringRoleArn sets the MonitoringRoleArn field's value. -func (s *RestoreDBInstanceFromS3Input) SetMonitoringRoleArn(v string) *RestoreDBInstanceFromS3Input { - s.MonitoringRoleArn = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *RestoreDBInstanceFromS3Input) SetMultiAZ(v bool) *RestoreDBInstanceFromS3Input { - s.MultiAZ = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *RestoreDBInstanceFromS3Input) SetOptionGroupName(v string) *RestoreDBInstanceFromS3Input { - s.OptionGroupName = &v - return s -} - -// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. -func (s *RestoreDBInstanceFromS3Input) SetPerformanceInsightsKMSKeyId(v string) *RestoreDBInstanceFromS3Input { - s.PerformanceInsightsKMSKeyId = &v - return s -} - -// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. -func (s *RestoreDBInstanceFromS3Input) SetPerformanceInsightsRetentionPeriod(v int64) *RestoreDBInstanceFromS3Input { - s.PerformanceInsightsRetentionPeriod = &v - return s -} - -// SetPort sets the Port field's value. -func (s *RestoreDBInstanceFromS3Input) SetPort(v int64) *RestoreDBInstanceFromS3Input { - s.Port = &v - return s -} - -// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. -func (s *RestoreDBInstanceFromS3Input) SetPreferredBackupWindow(v string) *RestoreDBInstanceFromS3Input { - s.PreferredBackupWindow = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *RestoreDBInstanceFromS3Input) SetPreferredMaintenanceWindow(v string) *RestoreDBInstanceFromS3Input { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetProcessorFeatures sets the ProcessorFeatures field's value. -func (s *RestoreDBInstanceFromS3Input) SetProcessorFeatures(v []*ProcessorFeature) *RestoreDBInstanceFromS3Input { - s.ProcessorFeatures = v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *RestoreDBInstanceFromS3Input) SetPubliclyAccessible(v bool) *RestoreDBInstanceFromS3Input { - s.PubliclyAccessible = &v - return s -} - -// SetS3BucketName sets the S3BucketName field's value. -func (s *RestoreDBInstanceFromS3Input) SetS3BucketName(v string) *RestoreDBInstanceFromS3Input { - s.S3BucketName = &v - return s -} - -// SetS3IngestionRoleArn sets the S3IngestionRoleArn field's value. -func (s *RestoreDBInstanceFromS3Input) SetS3IngestionRoleArn(v string) *RestoreDBInstanceFromS3Input { - s.S3IngestionRoleArn = &v - return s -} - -// SetS3Prefix sets the S3Prefix field's value. -func (s *RestoreDBInstanceFromS3Input) SetS3Prefix(v string) *RestoreDBInstanceFromS3Input { - s.S3Prefix = &v - return s -} - -// SetSourceEngine sets the SourceEngine field's value. -func (s *RestoreDBInstanceFromS3Input) SetSourceEngine(v string) *RestoreDBInstanceFromS3Input { - s.SourceEngine = &v - return s -} - -// SetSourceEngineVersion sets the SourceEngineVersion field's value. -func (s *RestoreDBInstanceFromS3Input) SetSourceEngineVersion(v string) *RestoreDBInstanceFromS3Input { - s.SourceEngineVersion = &v - return s -} - -// SetStorageEncrypted sets the StorageEncrypted field's value. -func (s *RestoreDBInstanceFromS3Input) SetStorageEncrypted(v bool) *RestoreDBInstanceFromS3Input { - s.StorageEncrypted = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *RestoreDBInstanceFromS3Input) SetStorageType(v string) *RestoreDBInstanceFromS3Input { - s.StorageType = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RestoreDBInstanceFromS3Input) SetTags(v []*Tag) *RestoreDBInstanceFromS3Input { - s.Tags = v - return s -} - -// SetUseDefaultProcessorFeatures sets the UseDefaultProcessorFeatures field's value. -func (s *RestoreDBInstanceFromS3Input) SetUseDefaultProcessorFeatures(v bool) *RestoreDBInstanceFromS3Input { - s.UseDefaultProcessorFeatures = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *RestoreDBInstanceFromS3Input) SetVpcSecurityGroupIds(v []*string) *RestoreDBInstanceFromS3Input { - s.VpcSecurityGroupIds = v - return s -} - -type RestoreDBInstanceFromS3Output struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s RestoreDBInstanceFromS3Output) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBInstanceFromS3Output) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *RestoreDBInstanceFromS3Output) SetDBInstance(v *DBInstance) *RestoreDBInstanceFromS3Output { - s.DBInstance = v - return s -} - -type RestoreDBInstanceToPointInTimeInput struct { - _ struct{} `type:"structure"` - - // Indicates that minor version upgrades are applied automatically to the DB - // instance during the maintenance window. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // The EC2 Availability Zone that the DB instance is created in. - // - // Default: A random, system-chosen Availability Zone. - // - // Constraint: You can't specify the AvailabilityZone parameter if the MultiAZ - // parameter is set to true. - // - // Example: us-east-1a - AvailabilityZone *string `type:"string"` - - // True to copy all tags from the restored DB instance to snapshots of the DB - // instance, and otherwise false. The default is false. - CopyTagsToSnapshot *bool `type:"boolean"` - - // The compute and memory capacity of the Amazon RDS DB instance, for example, - // db.m4.large. Not all DB instance classes are available in all AWS Regions, - // or for all database engines. For the full list of DB instance classes, and - // availability for your engine, see DB Instance Class (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) - // in the Amazon RDS User Guide. - // - // Default: The same DBInstanceClass as the original DB instance. - DBInstanceClass *string `type:"string"` - - // The database name for the restored DB instance. - // - // This parameter is not used for the MySQL or MariaDB engines. - DBName *string `type:"string"` - - // The name of the DB parameter group to associate with this DB instance. If - // this argument is omitted, the default DBParameterGroup for the specified - // engine is used. - // - // Constraints: - // - // * If supplied, must match the name of an existing DBParameterGroup. - // - // * Must be 1 to 255 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Can't end with a hyphen or contain two consecutive hyphens. - DBParameterGroupName *string `type:"string"` - - // The DB subnet group name to use for the new instance. - // - // Constraints: If supplied, must match the name of an existing DBSubnetGroup. - // - // Example: mySubnetgroup - DBSubnetGroupName *string `type:"string"` - - // Indicates if the DB instance should have deletion protection enabled. The - // database can't be deleted when this value is set to true. The default is - // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). - DeletionProtection *bool `type:"boolean"` - - // Specify the Active Directory Domain to restore the instance in. - Domain *string `type:"string"` - - // Specify the name of the IAM role to be used when making API calls to the - // Directory Service. - DomainIAMRoleName *string `type:"string"` - - // The list of logs that the restored DB instance is to export to CloudWatch - // Logs. The values in the list depend on the DB engine being used. For more - // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) - // in the Amazon RDS User Guide. - EnableCloudwatchLogsExports []*string `type:"list"` - - // True to enable mapping of AWS Identity and Access Management (IAM) accounts - // to database accounts, and otherwise false. - // - // You can enable IAM database authentication for the following database engines - // - // * For MySQL 5.6, minor version 5.6.34 or higher - // - // * For MySQL 5.7, minor version 5.7.16 or higher - // - // Default: false - EnableIAMDatabaseAuthentication *bool `type:"boolean"` - - // The database engine to use for the new instance. - // - // Default: The same as source - // - // Constraint: Must be compatible with the engine of the source - // - // Valid Values: - // - // * mariadb - // - // * mysql - // - // * oracle-ee - // - // * oracle-se2 - // - // * oracle-se1 - // - // * oracle-se - // - // * postgres - // - // * sqlserver-ee - // - // * sqlserver-se - // - // * sqlserver-ex - // - // * sqlserver-web - Engine *string `type:"string"` - - // The amount of Provisioned IOPS (input/output operations per second) to be - // initially allocated for the DB instance. - // - // Constraints: Must be an integer greater than 1000. - // - // SQL Server - // - // Setting the IOPS value for the SQL Server database engine is not supported. - Iops *int64 `type:"integer"` - - // License model information for the restored DB instance. - // - // Default: Same as source. - // - // Valid values: license-included | bring-your-own-license | general-public-license - LicenseModel *string `type:"string"` - - // Specifies if the DB instance is a Multi-AZ deployment. - // - // Constraint: You can't specify the AvailabilityZone parameter if the MultiAZ - // parameter is set to true. - MultiAZ *bool `type:"boolean"` - - // The name of the option group to be used for the restored DB instance. - // - // Permanent options, such as the TDE option for Oracle Advanced Security TDE, - // can't be removed from an option group, and that option group can't be removed - // from a DB instance once it is associated with a DB instance - OptionGroupName *string `type:"string"` - - // The port number on which the database accepts connections. - // - // Constraints: Value must be 1150-65535 - // - // Default: The same port as the original DB instance. - Port *int64 `type:"integer"` - - // The number of CPU cores and the number of threads per core for the DB instance - // class of the DB instance. - ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` - - // Specifies the accessibility options for the DB instance. A value of true - // specifies an Internet-facing instance with a publicly resolvable DNS name, - // which resolves to a public IP address. A value of false specifies an internal - // instance with a DNS name that resolves to a private IP address. For more - // information, see CreateDBInstance. - PubliclyAccessible *bool `type:"boolean"` - - // The date and time to restore from. - // - // Valid Values: Value must be a time in Universal Coordinated Time (UTC) format - // - // Constraints: - // - // * Must be before the latest restorable time for the DB instance - // - // * Can't be specified if UseLatestRestorableTime parameter is true - // - // Example: 2009-09-07T23:45:00Z - RestoreTime *time.Time `type:"timestamp"` - - // The identifier of the source DB instance from which to restore. - // - // Constraints: - // - // * Must match the identifier of an existing DB instance. - SourceDBInstanceIdentifier *string `type:"string"` - - // The resource ID of the source DB instance from which to restore. - SourceDbiResourceId *string `type:"string"` - - // Specifies the storage type to be associated with the DB instance. - // - // Valid values: standard | gp2 | io1 - // - // If you specify io1, you must also include a value for the Iops parameter. - // - // Default: io1 if the Iops parameter is specified, otherwise standard - StorageType *string `type:"string"` - - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // The name of the new DB instance to be created. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens - // - // * First character must be a letter - // - // * Can't end with a hyphen or contain two consecutive hyphens - // - // TargetDBInstanceIdentifier is a required field - TargetDBInstanceIdentifier *string `type:"string" required:"true"` - - // The ARN from the key store with which to associate the instance for TDE encryption. - TdeCredentialArn *string `type:"string"` - - // The password for the given ARN from the key store in order to access the - // device. - TdeCredentialPassword *string `type:"string"` - - // A value that specifies that the DB instance class of the DB instance uses - // its default processor features. - UseDefaultProcessorFeatures *bool `type:"boolean"` - - // Specifies whether (true) or not (false) the DB instance is restored from - // the latest backup time. - // - // Default: false - // - // Constraints: Can't be specified if RestoreTime parameter is provided. - UseLatestRestorableTime *bool `type:"boolean"` - - // A list of EC2 VPC security groups to associate with this DB instance. - // - // Default: The default EC2 VPC security group for the DB subnet group's VPC. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s RestoreDBInstanceToPointInTimeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBInstanceToPointInTimeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreDBInstanceToPointInTimeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreDBInstanceToPointInTimeInput"} - if s.TargetDBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetAutoMinorVersionUpgrade(v bool) *RestoreDBInstanceToPointInTimeInput { - s.AutoMinorVersionUpgrade = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetAvailabilityZone(v string) *RestoreDBInstanceToPointInTimeInput { - s.AvailabilityZone = &v - return s -} - -// SetCopyTagsToSnapshot sets the CopyTagsToSnapshot field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetCopyTagsToSnapshot(v bool) *RestoreDBInstanceToPointInTimeInput { - s.CopyTagsToSnapshot = &v - return s -} - -// SetDBInstanceClass sets the DBInstanceClass field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetDBInstanceClass(v string) *RestoreDBInstanceToPointInTimeInput { - s.DBInstanceClass = &v - return s -} - -// SetDBName sets the DBName field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetDBName(v string) *RestoreDBInstanceToPointInTimeInput { - s.DBName = &v - return s -} - -// SetDBParameterGroupName sets the DBParameterGroupName field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetDBParameterGroupName(v string) *RestoreDBInstanceToPointInTimeInput { - s.DBParameterGroupName = &v - return s -} - -// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetDBSubnetGroupName(v string) *RestoreDBInstanceToPointInTimeInput { - s.DBSubnetGroupName = &v - return s -} - -// SetDeletionProtection sets the DeletionProtection field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetDeletionProtection(v bool) *RestoreDBInstanceToPointInTimeInput { - s.DeletionProtection = &v - return s -} - -// SetDomain sets the Domain field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetDomain(v string) *RestoreDBInstanceToPointInTimeInput { - s.Domain = &v - return s -} - -// SetDomainIAMRoleName sets the DomainIAMRoleName field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetDomainIAMRoleName(v string) *RestoreDBInstanceToPointInTimeInput { - s.DomainIAMRoleName = &v - return s -} - -// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBInstanceToPointInTimeInput { - s.EnableCloudwatchLogsExports = v - return s -} - -// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBInstanceToPointInTimeInput { - s.EnableIAMDatabaseAuthentication = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetEngine(v string) *RestoreDBInstanceToPointInTimeInput { - s.Engine = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetIops(v int64) *RestoreDBInstanceToPointInTimeInput { - s.Iops = &v - return s -} - -// SetLicenseModel sets the LicenseModel field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetLicenseModel(v string) *RestoreDBInstanceToPointInTimeInput { - s.LicenseModel = &v - return s -} - -// SetMultiAZ sets the MultiAZ field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetMultiAZ(v bool) *RestoreDBInstanceToPointInTimeInput { - s.MultiAZ = &v - return s -} - -// SetOptionGroupName sets the OptionGroupName field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetOptionGroupName(v string) *RestoreDBInstanceToPointInTimeInput { - s.OptionGroupName = &v - return s -} - -// SetPort sets the Port field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetPort(v int64) *RestoreDBInstanceToPointInTimeInput { - s.Port = &v - return s -} - -// SetProcessorFeatures sets the ProcessorFeatures field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetProcessorFeatures(v []*ProcessorFeature) *RestoreDBInstanceToPointInTimeInput { - s.ProcessorFeatures = v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetPubliclyAccessible(v bool) *RestoreDBInstanceToPointInTimeInput { - s.PubliclyAccessible = &v - return s -} - -// SetRestoreTime sets the RestoreTime field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetRestoreTime(v time.Time) *RestoreDBInstanceToPointInTimeInput { - s.RestoreTime = &v - return s -} - -// SetSourceDBInstanceIdentifier sets the SourceDBInstanceIdentifier field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetSourceDBInstanceIdentifier(v string) *RestoreDBInstanceToPointInTimeInput { - s.SourceDBInstanceIdentifier = &v - return s -} - -// SetSourceDbiResourceId sets the SourceDbiResourceId field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetSourceDbiResourceId(v string) *RestoreDBInstanceToPointInTimeInput { - s.SourceDbiResourceId = &v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetStorageType(v string) *RestoreDBInstanceToPointInTimeInput { - s.StorageType = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetTags(v []*Tag) *RestoreDBInstanceToPointInTimeInput { - s.Tags = v - return s -} - -// SetTargetDBInstanceIdentifier sets the TargetDBInstanceIdentifier field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetTargetDBInstanceIdentifier(v string) *RestoreDBInstanceToPointInTimeInput { - s.TargetDBInstanceIdentifier = &v - return s -} - -// SetTdeCredentialArn sets the TdeCredentialArn field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetTdeCredentialArn(v string) *RestoreDBInstanceToPointInTimeInput { - s.TdeCredentialArn = &v - return s -} - -// SetTdeCredentialPassword sets the TdeCredentialPassword field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetTdeCredentialPassword(v string) *RestoreDBInstanceToPointInTimeInput { - s.TdeCredentialPassword = &v - return s -} - -// SetUseDefaultProcessorFeatures sets the UseDefaultProcessorFeatures field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetUseDefaultProcessorFeatures(v bool) *RestoreDBInstanceToPointInTimeInput { - s.UseDefaultProcessorFeatures = &v - return s -} - -// SetUseLatestRestorableTime sets the UseLatestRestorableTime field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetUseLatestRestorableTime(v bool) *RestoreDBInstanceToPointInTimeInput { - s.UseLatestRestorableTime = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *RestoreDBInstanceToPointInTimeInput) SetVpcSecurityGroupIds(v []*string) *RestoreDBInstanceToPointInTimeInput { - s.VpcSecurityGroupIds = v - return s -} - -type RestoreDBInstanceToPointInTimeOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s RestoreDBInstanceToPointInTimeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreDBInstanceToPointInTimeOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *RestoreDBInstanceToPointInTimeOutput) SetDBInstance(v *DBInstance) *RestoreDBInstanceToPointInTimeOutput { - s.DBInstance = v - return s -} - -// Earliest and latest time an instance can be restored to: -type RestoreWindow struct { - _ struct{} `type:"structure"` - - // The earliest time you can restore an instance to. - EarliestTime *time.Time `type:"timestamp"` - - // The latest time you can restore an instance to. - LatestTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s RestoreWindow) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreWindow) GoString() string { - return s.String() -} - -// SetEarliestTime sets the EarliestTime field's value. -func (s *RestoreWindow) SetEarliestTime(v time.Time) *RestoreWindow { - s.EarliestTime = &v - return s -} - -// SetLatestTime sets the LatestTime field's value. -func (s *RestoreWindow) SetLatestTime(v time.Time) *RestoreWindow { - s.LatestTime = &v - return s -} - -type RevokeDBSecurityGroupIngressInput struct { - _ struct{} `type:"structure"` - - // The IP range to revoke access from. Must be a valid CIDR range. If CIDRIP - // is specified, EC2SecurityGroupName, EC2SecurityGroupId and EC2SecurityGroupOwnerId - // can't be provided. - CIDRIP *string `type:"string"` - - // The name of the DB security group to revoke ingress from. - // - // DBSecurityGroupName is a required field - DBSecurityGroupName *string `type:"string" required:"true"` - - // The id of the EC2 security group to revoke access from. For VPC DB security - // groups, EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId - // and either EC2SecurityGroupName or EC2SecurityGroupId must be provided. - EC2SecurityGroupId *string `type:"string"` - - // The name of the EC2 security group to revoke access from. For VPC DB security - // groups, EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId - // and either EC2SecurityGroupName or EC2SecurityGroupId must be provided. - EC2SecurityGroupName *string `type:"string"` - - // The AWS Account Number of the owner of the EC2 security group specified in - // the EC2SecurityGroupName parameter. The AWS Access Key ID is not an acceptable - // value. For VPC DB security groups, EC2SecurityGroupId must be provided. Otherwise, - // EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId - // must be provided. - EC2SecurityGroupOwnerId *string `type:"string"` -} - -// String returns the string representation -func (s RevokeDBSecurityGroupIngressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeDBSecurityGroupIngressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RevokeDBSecurityGroupIngressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RevokeDBSecurityGroupIngressInput"} - if s.DBSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("DBSecurityGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCIDRIP sets the CIDRIP field's value. -func (s *RevokeDBSecurityGroupIngressInput) SetCIDRIP(v string) *RevokeDBSecurityGroupIngressInput { - s.CIDRIP = &v - return s -} - -// SetDBSecurityGroupName sets the DBSecurityGroupName field's value. -func (s *RevokeDBSecurityGroupIngressInput) SetDBSecurityGroupName(v string) *RevokeDBSecurityGroupIngressInput { - s.DBSecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupId sets the EC2SecurityGroupId field's value. -func (s *RevokeDBSecurityGroupIngressInput) SetEC2SecurityGroupId(v string) *RevokeDBSecurityGroupIngressInput { - s.EC2SecurityGroupId = &v - return s -} - -// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. -func (s *RevokeDBSecurityGroupIngressInput) SetEC2SecurityGroupName(v string) *RevokeDBSecurityGroupIngressInput { - s.EC2SecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. -func (s *RevokeDBSecurityGroupIngressInput) SetEC2SecurityGroupOwnerId(v string) *RevokeDBSecurityGroupIngressInput { - s.EC2SecurityGroupOwnerId = &v - return s -} - -type RevokeDBSecurityGroupIngressOutput struct { - _ struct{} `type:"structure"` - - // Contains the details for an Amazon RDS DB security group. - // - // This data type is used as a response element in the DescribeDBSecurityGroups - // action. - DBSecurityGroup *DBSecurityGroup `type:"structure"` -} - -// String returns the string representation -func (s RevokeDBSecurityGroupIngressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeDBSecurityGroupIngressOutput) GoString() string { - return s.String() -} - -// SetDBSecurityGroup sets the DBSecurityGroup field's value. -func (s *RevokeDBSecurityGroupIngressOutput) SetDBSecurityGroup(v *DBSecurityGroup) *RevokeDBSecurityGroupIngressOutput { - s.DBSecurityGroup = v - return s -} - -// Contains the scaling configuration of an Aurora Serverless DB cluster. -// -// For more information, see Using Amazon Aurora Serverless (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) -// in the Amazon Aurora User Guide. -type ScalingConfiguration struct { - _ struct{} `type:"structure"` - - // A value that specifies whether to allow or disallow automatic pause for an - // Aurora DB cluster in serverless DB engine mode. A DB cluster can be paused - // only when it's idle (it has no connections). - // - // If a DB cluster is paused for more than seven days, the DB cluster might - // be backed up with a snapshot. In this case, the DB cluster is restored when - // there is a request to connect to it. - AutoPause *bool `type:"boolean"` - - // The maximum capacity for an Aurora DB cluster in serverless DB engine mode. - // - // Valid capacity values are 2, 4, 8, 16, 32, 64, 128, and 256. - // - // The maximum capacity must be greater than or equal to the minimum capacity. - MaxCapacity *int64 `type:"integer"` - - // The minimum capacity for an Aurora DB cluster in serverless DB engine mode. - // - // Valid capacity values are 2, 4, 8, 16, 32, 64, 128, and 256. - // - // The minimum capacity must be less than or equal to the maximum capacity. - MinCapacity *int64 `type:"integer"` - - // The time, in seconds, before an Aurora DB cluster in serverless mode is paused. - SecondsUntilAutoPause *int64 `type:"integer"` -} - -// String returns the string representation -func (s ScalingConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalingConfiguration) GoString() string { - return s.String() -} - -// SetAutoPause sets the AutoPause field's value. -func (s *ScalingConfiguration) SetAutoPause(v bool) *ScalingConfiguration { - s.AutoPause = &v - return s -} - -// SetMaxCapacity sets the MaxCapacity field's value. -func (s *ScalingConfiguration) SetMaxCapacity(v int64) *ScalingConfiguration { - s.MaxCapacity = &v - return s -} - -// SetMinCapacity sets the MinCapacity field's value. -func (s *ScalingConfiguration) SetMinCapacity(v int64) *ScalingConfiguration { - s.MinCapacity = &v - return s -} - -// SetSecondsUntilAutoPause sets the SecondsUntilAutoPause field's value. -func (s *ScalingConfiguration) SetSecondsUntilAutoPause(v int64) *ScalingConfiguration { - s.SecondsUntilAutoPause = &v - return s -} - -// Shows the scaling configuration for an Aurora DB cluster in serverless DB -// engine mode. -// -// For more information, see Using Amazon Aurora Serverless (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) -// in the Amazon Aurora User Guide. -type ScalingConfigurationInfo struct { - _ struct{} `type:"structure"` - - // A value that indicates whether automatic pause is allowed for the Aurora - // DB cluster in serverless DB engine mode. - AutoPause *bool `type:"boolean"` - - // The maximum capacity for an Aurora DB cluster in serverless DB engine mode. - MaxCapacity *int64 `type:"integer"` - - // The maximum capacity for the Aurora DB cluster in serverless DB engine mode. - MinCapacity *int64 `type:"integer"` - - // The remaining amount of time, in seconds, before the Aurora DB cluster in - // serverless mode is paused. A DB cluster can be paused only when it's idle - // (it has no connections). - SecondsUntilAutoPause *int64 `type:"integer"` -} - -// String returns the string representation -func (s ScalingConfigurationInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScalingConfigurationInfo) GoString() string { - return s.String() -} - -// SetAutoPause sets the AutoPause field's value. -func (s *ScalingConfigurationInfo) SetAutoPause(v bool) *ScalingConfigurationInfo { - s.AutoPause = &v - return s -} - -// SetMaxCapacity sets the MaxCapacity field's value. -func (s *ScalingConfigurationInfo) SetMaxCapacity(v int64) *ScalingConfigurationInfo { - s.MaxCapacity = &v - return s -} - -// SetMinCapacity sets the MinCapacity field's value. -func (s *ScalingConfigurationInfo) SetMinCapacity(v int64) *ScalingConfigurationInfo { - s.MinCapacity = &v - return s -} - -// SetSecondsUntilAutoPause sets the SecondsUntilAutoPause field's value. -func (s *ScalingConfigurationInfo) SetSecondsUntilAutoPause(v int64) *ScalingConfigurationInfo { - s.SecondsUntilAutoPause = &v - return s -} - -// Contains an AWS Region name as the result of a successful call to the DescribeSourceRegions -// action. -type SourceRegion struct { - _ struct{} `type:"structure"` - - // The endpoint for the source AWS Region endpoint. - Endpoint *string `type:"string"` - - // The name of the source AWS Region. - RegionName *string `type:"string"` - - // The status of the source AWS Region. - Status *string `type:"string"` -} - -// String returns the string representation -func (s SourceRegion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SourceRegion) GoString() string { - return s.String() -} - -// SetEndpoint sets the Endpoint field's value. -func (s *SourceRegion) SetEndpoint(v string) *SourceRegion { - s.Endpoint = &v - return s -} - -// SetRegionName sets the RegionName field's value. -func (s *SourceRegion) SetRegionName(v string) *SourceRegion { - s.RegionName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SourceRegion) SetStatus(v string) *SourceRegion { - s.Status = &v - return s -} - -type StartDBClusterInput struct { - _ struct{} `type:"structure"` - - // The DB cluster identifier of the Amazon Aurora DB cluster to be started. - // This parameter is stored as a lowercase string. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StartDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *StartDBClusterInput) SetDBClusterIdentifier(v string) *StartDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -type StartDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Aurora DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, - // and StartDBCluster actions. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s StartDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *StartDBClusterOutput) SetDBCluster(v *DBCluster) *StartDBClusterOutput { - s.DBCluster = v - return s -} - -type StartDBInstanceInput struct { - _ struct{} `type:"structure"` - - // The user-supplied instance identifier. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StartDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartDBInstanceInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *StartDBInstanceInput) SetDBInstanceIdentifier(v string) *StartDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -type StartDBInstanceOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s StartDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartDBInstanceOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *StartDBInstanceOutput) SetDBInstance(v *DBInstance) *StartDBInstanceOutput { - s.DBInstance = v - return s -} - -type StopDBClusterInput struct { - _ struct{} `type:"structure"` - - // The DB cluster identifier of the Amazon Aurora DB cluster to be stopped. - // This parameter is stored as a lowercase string. - // - // DBClusterIdentifier is a required field - DBClusterIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StopDBClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopDBClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopDBClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopDBClusterInput"} - if s.DBClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. -func (s *StopDBClusterInput) SetDBClusterIdentifier(v string) *StopDBClusterInput { - s.DBClusterIdentifier = &v - return s -} - -type StopDBClusterOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon Aurora DB cluster. - // - // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, - // and StartDBCluster actions. - DBCluster *DBCluster `type:"structure"` -} - -// String returns the string representation -func (s StopDBClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopDBClusterOutput) GoString() string { - return s.String() -} - -// SetDBCluster sets the DBCluster field's value. -func (s *StopDBClusterOutput) SetDBCluster(v *DBCluster) *StopDBClusterOutput { - s.DBCluster = v - return s -} - -type StopDBInstanceInput struct { - _ struct{} `type:"structure"` - - // The user-supplied instance identifier. - // - // DBInstanceIdentifier is a required field - DBInstanceIdentifier *string `type:"string" required:"true"` - - // The user-supplied instance identifier of the DB Snapshot created immediately - // before the DB instance is stopped. - DBSnapshotIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s StopDBInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopDBInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopDBInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopDBInstanceInput"} - if s.DBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. -func (s *StopDBInstanceInput) SetDBInstanceIdentifier(v string) *StopDBInstanceInput { - s.DBInstanceIdentifier = &v - return s -} - -// SetDBSnapshotIdentifier sets the DBSnapshotIdentifier field's value. -func (s *StopDBInstanceInput) SetDBSnapshotIdentifier(v string) *StopDBInstanceInput { - s.DBSnapshotIdentifier = &v - return s -} - -type StopDBInstanceOutput struct { - _ struct{} `type:"structure"` - - // Contains the details of an Amazon RDS DB instance. - // - // This data type is used as a response element in the DescribeDBInstances action. - DBInstance *DBInstance `type:"structure"` -} - -// String returns the string representation -func (s StopDBInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopDBInstanceOutput) GoString() string { - return s.String() -} - -// SetDBInstance sets the DBInstance field's value. -func (s *StopDBInstanceOutput) SetDBInstance(v *DBInstance) *StopDBInstanceOutput { - s.DBInstance = v - return s -} - -// This data type is used as a response element in the DescribeDBSubnetGroups -// action. -type Subnet struct { - _ struct{} `type:"structure"` - - // Contains Availability Zone information. - // - // This data type is used as an element in the following data type: - // - // * OrderableDBInstanceOption - SubnetAvailabilityZone *AvailabilityZone `type:"structure"` - - // Specifies the identifier of the subnet. - SubnetIdentifier *string `type:"string"` - - // Specifies the status of the subnet. - SubnetStatus *string `type:"string"` -} - -// String returns the string representation -func (s Subnet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Subnet) GoString() string { - return s.String() -} - -// SetSubnetAvailabilityZone sets the SubnetAvailabilityZone field's value. -func (s *Subnet) SetSubnetAvailabilityZone(v *AvailabilityZone) *Subnet { - s.SubnetAvailabilityZone = v - return s -} - -// SetSubnetIdentifier sets the SubnetIdentifier field's value. -func (s *Subnet) SetSubnetIdentifier(v string) *Subnet { - s.SubnetIdentifier = &v - return s -} - -// SetSubnetStatus sets the SubnetStatus field's value. -func (s *Subnet) SetSubnetStatus(v string) *Subnet { - s.SubnetStatus = &v - return s -} - -// Metadata assigned to an Amazon RDS resource consisting of a key-value pair. -type Tag struct { - _ struct{} `type:"structure"` - - // A key is the required name of the tag. The string value can be from 1 to - // 128 Unicode characters in length and can't be prefixed with "aws:" or "rds:". - // The string can only contain only the set of Unicode letters, digits, white-space, - // '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). - Key *string `type:"string"` - - // A value is the optional value of the tag. The string value can be from 1 - // to 256 Unicode characters in length and can't be prefixed with "aws:" or - // "rds:". The string can only contain only the set of Unicode letters, digits, - // white-space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// A time zone associated with a DBInstance or a DBSnapshot. This data type -// is an element in the response to the DescribeDBInstances, the DescribeDBSnapshots, -// and the DescribeDBEngineVersions actions. -type Timezone struct { - _ struct{} `type:"structure"` - - // The name of the time zone. - TimezoneName *string `type:"string"` -} - -// String returns the string representation -func (s Timezone) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Timezone) GoString() string { - return s.String() -} - -// SetTimezoneName sets the TimezoneName field's value. -func (s *Timezone) SetTimezoneName(v string) *Timezone { - s.TimezoneName = &v - return s -} - -// The version of the database engine that a DB instance can be upgraded to. -type UpgradeTarget struct { - _ struct{} `type:"structure"` - - // A value that indicates whether the target version is applied to any source - // DB instances that have AutoMinorVersionUpgrade set to true. - AutoUpgrade *bool `type:"boolean"` - - // The version of the database engine that a DB instance can be upgraded to. - Description *string `type:"string"` - - // The name of the upgrade target database engine. - Engine *string `type:"string"` - - // The version number of the upgrade target database engine. - EngineVersion *string `type:"string"` - - // A value that indicates whether a database engine is upgraded to a major version. - IsMajorVersionUpgrade *bool `type:"boolean"` -} - -// String returns the string representation -func (s UpgradeTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpgradeTarget) GoString() string { - return s.String() -} - -// SetAutoUpgrade sets the AutoUpgrade field's value. -func (s *UpgradeTarget) SetAutoUpgrade(v bool) *UpgradeTarget { - s.AutoUpgrade = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpgradeTarget) SetDescription(v string) *UpgradeTarget { - s.Description = &v - return s -} - -// SetEngine sets the Engine field's value. -func (s *UpgradeTarget) SetEngine(v string) *UpgradeTarget { - s.Engine = &v - return s -} - -// SetEngineVersion sets the EngineVersion field's value. -func (s *UpgradeTarget) SetEngineVersion(v string) *UpgradeTarget { - s.EngineVersion = &v - return s -} - -// SetIsMajorVersionUpgrade sets the IsMajorVersionUpgrade field's value. -func (s *UpgradeTarget) SetIsMajorVersionUpgrade(v bool) *UpgradeTarget { - s.IsMajorVersionUpgrade = &v - return s -} - -// Information about valid modifications that you can make to your DB instance. -// Contains the result of a successful call to the DescribeValidDBInstanceModifications -// action. You can use this information when you call ModifyDBInstance. -type ValidDBInstanceModificationsMessage struct { - _ struct{} `type:"structure"` - - // Valid storage options for your DB instance. - Storage []*ValidStorageOptions `locationNameList:"ValidStorageOptions" type:"list"` - - // Valid processor features for your DB instance. - ValidProcessorFeatures []*AvailableProcessorFeature `locationNameList:"AvailableProcessorFeature" type:"list"` -} - -// String returns the string representation -func (s ValidDBInstanceModificationsMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidDBInstanceModificationsMessage) GoString() string { - return s.String() -} - -// SetStorage sets the Storage field's value. -func (s *ValidDBInstanceModificationsMessage) SetStorage(v []*ValidStorageOptions) *ValidDBInstanceModificationsMessage { - s.Storage = v - return s -} - -// SetValidProcessorFeatures sets the ValidProcessorFeatures field's value. -func (s *ValidDBInstanceModificationsMessage) SetValidProcessorFeatures(v []*AvailableProcessorFeature) *ValidDBInstanceModificationsMessage { - s.ValidProcessorFeatures = v - return s -} - -// Information about valid modifications that you can make to your DB instance. -// Contains the result of a successful call to the DescribeValidDBInstanceModifications -// action. -type ValidStorageOptions struct { - _ struct{} `type:"structure"` - - // The valid range of Provisioned IOPS to gibibytes of storage multiplier. For - // example, 3-10, which means that provisioned IOPS can be between 3 and 10 - // times storage. - IopsToStorageRatio []*DoubleRange `locationNameList:"DoubleRange" type:"list"` - - // The valid range of provisioned IOPS. For example, 1000-20000. - ProvisionedIops []*Range `locationNameList:"Range" type:"list"` - - // The valid range of storage in gibibytes. For example, 100 to 16384. - StorageSize []*Range `locationNameList:"Range" type:"list"` - - // The valid storage types for your DB instance. For example, gp2, io1. - StorageType *string `type:"string"` -} - -// String returns the string representation -func (s ValidStorageOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ValidStorageOptions) GoString() string { - return s.String() -} - -// SetIopsToStorageRatio sets the IopsToStorageRatio field's value. -func (s *ValidStorageOptions) SetIopsToStorageRatio(v []*DoubleRange) *ValidStorageOptions { - s.IopsToStorageRatio = v - return s -} - -// SetProvisionedIops sets the ProvisionedIops field's value. -func (s *ValidStorageOptions) SetProvisionedIops(v []*Range) *ValidStorageOptions { - s.ProvisionedIops = v - return s -} - -// SetStorageSize sets the StorageSize field's value. -func (s *ValidStorageOptions) SetStorageSize(v []*Range) *ValidStorageOptions { - s.StorageSize = v - return s -} - -// SetStorageType sets the StorageType field's value. -func (s *ValidStorageOptions) SetStorageType(v string) *ValidStorageOptions { - s.StorageType = &v - return s -} - -// This data type is used as a response element for queries on VPC security -// group membership. -type VpcSecurityGroupMembership struct { - _ struct{} `type:"structure"` - - // The status of the VPC security group. - Status *string `type:"string"` - - // The name of the VPC security group. - VpcSecurityGroupId *string `type:"string"` -} - -// String returns the string representation -func (s VpcSecurityGroupMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcSecurityGroupMembership) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *VpcSecurityGroupMembership) SetStatus(v string) *VpcSecurityGroupMembership { - s.Status = &v - return s -} - -// SetVpcSecurityGroupId sets the VpcSecurityGroupId field's value. -func (s *VpcSecurityGroupMembership) SetVpcSecurityGroupId(v string) *VpcSecurityGroupMembership { - s.VpcSecurityGroupId = &v - return s -} - -const ( - // ApplyMethodImmediate is a ApplyMethod enum value - ApplyMethodImmediate = "immediate" - - // ApplyMethodPendingReboot is a ApplyMethod enum value - ApplyMethodPendingReboot = "pending-reboot" -) - -const ( - // SourceTypeDbInstance is a SourceType enum value - SourceTypeDbInstance = "db-instance" - - // SourceTypeDbParameterGroup is a SourceType enum value - SourceTypeDbParameterGroup = "db-parameter-group" - - // SourceTypeDbSecurityGroup is a SourceType enum value - SourceTypeDbSecurityGroup = "db-security-group" - - // SourceTypeDbSnapshot is a SourceType enum value - SourceTypeDbSnapshot = "db-snapshot" - - // SourceTypeDbCluster is a SourceType enum value - SourceTypeDbCluster = "db-cluster" - - // SourceTypeDbClusterSnapshot is a SourceType enum value - SourceTypeDbClusterSnapshot = "db-cluster-snapshot" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/rds/customizations.go deleted file mode 100644 index d412fb282..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/customizations.go +++ /dev/null @@ -1,125 +0,0 @@ -package rds - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/endpoints" - "github.com/aws/aws-sdk-go/aws/request" -) - -func init() { - ops := []string{ - opCopyDBSnapshot, - opCreateDBInstanceReadReplica, - opCopyDBClusterSnapshot, - opCreateDBCluster, - } - initRequest = func(r *request.Request) { - for _, operation := range ops { - if r.Operation.Name == operation { - r.Handlers.Build.PushFront(fillPresignedURL) - } - } - } -} - -func fillPresignedURL(r *request.Request) { - fns := map[string]func(r *request.Request){ - opCopyDBSnapshot: copyDBSnapshotPresign, - opCreateDBInstanceReadReplica: createDBInstanceReadReplicaPresign, - opCopyDBClusterSnapshot: copyDBClusterSnapshotPresign, - opCreateDBCluster: createDBClusterPresign, - } - if !r.ParamsFilled() { - return - } - if f, ok := fns[r.Operation.Name]; ok { - f(r) - } -} - -func copyDBSnapshotPresign(r *request.Request) { - originParams := r.Params.(*CopyDBSnapshotInput) - - if originParams.SourceRegion == nil || originParams.PreSignedUrl != nil || originParams.DestinationRegion != nil { - return - } - - originParams.DestinationRegion = r.Config.Region - newParams := awsutil.CopyOf(r.Params).(*CopyDBSnapshotInput) - originParams.PreSignedUrl = presignURL(r, originParams.SourceRegion, newParams) -} - -func createDBInstanceReadReplicaPresign(r *request.Request) { - originParams := r.Params.(*CreateDBInstanceReadReplicaInput) - - if originParams.SourceRegion == nil || originParams.PreSignedUrl != nil || originParams.DestinationRegion != nil { - return - } - - originParams.DestinationRegion = r.Config.Region - newParams := awsutil.CopyOf(r.Params).(*CreateDBInstanceReadReplicaInput) - originParams.PreSignedUrl = presignURL(r, originParams.SourceRegion, newParams) -} - -func copyDBClusterSnapshotPresign(r *request.Request) { - originParams := r.Params.(*CopyDBClusterSnapshotInput) - - if originParams.SourceRegion == nil || originParams.PreSignedUrl != nil || originParams.DestinationRegion != nil { - return - } - - originParams.DestinationRegion = r.Config.Region - newParams := awsutil.CopyOf(r.Params).(*CopyDBClusterSnapshotInput) - originParams.PreSignedUrl = presignURL(r, originParams.SourceRegion, newParams) -} - -func createDBClusterPresign(r *request.Request) { - originParams := r.Params.(*CreateDBClusterInput) - - if originParams.SourceRegion == nil || originParams.PreSignedUrl != nil || originParams.DestinationRegion != nil { - return - } - - originParams.DestinationRegion = r.Config.Region - newParams := awsutil.CopyOf(r.Params).(*CreateDBClusterInput) - originParams.PreSignedUrl = presignURL(r, originParams.SourceRegion, newParams) -} - -// presignURL will presign the request by using SoureRegion to sign with. SourceRegion is not -// sent to the service, and is only used to not have the SDKs parsing ARNs. -func presignURL(r *request.Request, sourceRegion *string, newParams interface{}) *string { - cfg := r.Config.Copy(aws.NewConfig(). - WithEndpoint(""). - WithRegion(aws.StringValue(sourceRegion))) - - clientInfo := r.ClientInfo - resolved, err := r.Config.EndpointResolver.EndpointFor( - clientInfo.ServiceName, aws.StringValue(cfg.Region), - func(opt *endpoints.Options) { - opt.DisableSSL = aws.BoolValue(cfg.DisableSSL) - opt.UseDualStack = aws.BoolValue(cfg.UseDualStack) - }, - ) - if err != nil { - r.Error = err - return nil - } - - clientInfo.Endpoint = resolved.URL - clientInfo.SigningRegion = resolved.SigningRegion - - // Presign a request with modified params - req := request.New(*cfg, clientInfo, r.Handlers, r.Retryer, r.Operation, newParams, r.Data) - req.Operation.HTTPMethod = "GET" - uri, err := req.Presign(5 * time.Minute) // 5 minutes should be enough. - if err != nil { // bubble error back up to original request - r.Error = err - return nil - } - - // We have our URL, set it on params - return &uri -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/doc.go b/vendor/github.com/aws/aws-sdk-go/service/rds/doc.go deleted file mode 100644 index 4a99624e1..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/doc.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package rds provides the client and types for making API -// requests to Amazon Relational Database Service. -// -// Amazon Relational Database Service (Amazon RDS) is a web service that makes -// it easier to set up, operate, and scale a relational database in the cloud. -// It provides cost-efficient, resizable capacity for an industry-standard relational -// database and manages common database administration tasks, freeing up developers -// to focus on what makes their applications and businesses unique. -// -// Amazon RDS gives you access to the capabilities of a MySQL, MariaDB, PostgreSQL, -// Microsoft SQL Server, Oracle, or Amazon Aurora database server. These capabilities -// mean that the code, applications, and tools you already use today with your -// existing databases work with Amazon RDS without modification. Amazon RDS -// automatically backs up your database and maintains the database software -// that powers your DB instance. Amazon RDS is flexible: you can scale your -// DB instance's compute resources and storage capacity to meet your application's -// demand. As with all Amazon Web Services, there are no up-front investments, -// and you pay only for the resources you use. -// -// This interface reference for Amazon RDS contains documentation for a programming -// or command line interface you can use to manage Amazon RDS. Note that Amazon -// RDS is asynchronous, which means that some interfaces might require techniques -// such as polling or callback functions to determine when a command has been -// applied. In this reference, the parameter descriptions indicate whether a -// command is applied immediately, on the next instance reboot, or during the -// maintenance window. The reference structure is as follows, and we list following -// some related topics from the user guide. -// -// Amazon RDS API Reference -// -// * For the alphabetical list of API actions, see API Actions (http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_Operations.html). -// -// * For the alphabetical list of data types, see Data Types (http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_Types.html). -// -// * For a list of common query parameters, see Common Parameters (http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/CommonParameters.html). -// -// * For descriptions of the error codes, see Common Errors (http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/CommonErrors.html). -// -// Amazon RDS User Guide -// -// * For a summary of the Amazon RDS interfaces, see Available RDS Interfaces -// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html#Welcome.Interfaces). -// -// * For more information about how to use the Query API, see Using the Query -// API (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Using_the_Query_API.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31 for more information on this service. -// -// See rds package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/rds/ -// -// Using the Client -// -// To contact Amazon Relational Database Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Relational Database Service client RDS for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/rds/#New -package rds diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/doc_custom.go b/vendor/github.com/aws/aws-sdk-go/service/rds/doc_custom.go deleted file mode 100644 index 3a4b87905..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/doc_custom.go +++ /dev/null @@ -1,25 +0,0 @@ -// IAM User or Role Database Authentication -// -// The rdsutil package's BuildAuthToken function provides a connection -// authentication token builder. Given an endpoint of the RDS database, -// AWS region, DB user, and AWS credentials the function will create an -// presigned URL to use as the authentication token for the database's -// connection. -// -// The following example shows how to use BuildAuthToken to create an authentication -// token for connecting to a MySQL database in RDS. -// -// authToken, err := rdsutils.BuildAuthToken(dbEndpoint, awsRegion, dbUser, awsCreds) -// -// // Create the MySQL DNS string for the DB connection -// // user:password@protocol(endpoint)/dbname? -// dnsStr = fmt.Sprintf("%s:%s@tcp(%s)/%s?tls=true", -// dbUser, authToken, dbEndpoint, dbName, -// ) -// -// // Use db to perform SQL operations on database -// db, err := sql.Open("mysql", dnsStr) -// -// See rdsutil package for more information. -// http://docs.aws.amazon.com/sdk-for-go/api/service/rds/rdsutils/ -package rds diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go b/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go deleted file mode 100644 index f4561e797..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go +++ /dev/null @@ -1,595 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package rds - -const ( - - // ErrCodeAuthorizationAlreadyExistsFault for service response error code - // "AuthorizationAlreadyExists". - // - // The specified CIDRIP or Amazon EC2 security group is already authorized for - // the specified DB security group. - ErrCodeAuthorizationAlreadyExistsFault = "AuthorizationAlreadyExists" - - // ErrCodeAuthorizationNotFoundFault for service response error code - // "AuthorizationNotFound". - // - // The specified CIDRIP or Amazon EC2 security group isn't authorized for the - // specified DB security group. - // - // RDS also may not be authorized by using IAM to perform necessary actions - // on your behalf. - ErrCodeAuthorizationNotFoundFault = "AuthorizationNotFound" - - // ErrCodeAuthorizationQuotaExceededFault for service response error code - // "AuthorizationQuotaExceeded". - // - // The DB security group authorization quota has been reached. - ErrCodeAuthorizationQuotaExceededFault = "AuthorizationQuotaExceeded" - - // ErrCodeBackupPolicyNotFoundFault for service response error code - // "BackupPolicyNotFoundFault". - // - // The backup policy was not found. - ErrCodeBackupPolicyNotFoundFault = "BackupPolicyNotFoundFault" - - // ErrCodeCertificateNotFoundFault for service response error code - // "CertificateNotFound". - // - // CertificateIdentifier doesn't refer to an existing certificate. - ErrCodeCertificateNotFoundFault = "CertificateNotFound" - - // ErrCodeDBClusterAlreadyExistsFault for service response error code - // "DBClusterAlreadyExistsFault". - // - // The user already has a DB cluster with the given identifier. - ErrCodeDBClusterAlreadyExistsFault = "DBClusterAlreadyExistsFault" - - // ErrCodeDBClusterBacktrackNotFoundFault for service response error code - // "DBClusterBacktrackNotFoundFault". - // - // BacktrackIdentifier doesn't refer to an existing backtrack. - ErrCodeDBClusterBacktrackNotFoundFault = "DBClusterBacktrackNotFoundFault" - - // ErrCodeDBClusterEndpointAlreadyExistsFault for service response error code - // "DBClusterEndpointAlreadyExistsFault". - // - // The specified custom endpoint can't be created because it already exists. - ErrCodeDBClusterEndpointAlreadyExistsFault = "DBClusterEndpointAlreadyExistsFault" - - // ErrCodeDBClusterEndpointNotFoundFault for service response error code - // "DBClusterEndpointNotFoundFault". - // - // The specified custom endpoint doesn't exist. - ErrCodeDBClusterEndpointNotFoundFault = "DBClusterEndpointNotFoundFault" - - // ErrCodeDBClusterEndpointQuotaExceededFault for service response error code - // "DBClusterEndpointQuotaExceededFault". - // - // The cluster already has the maximum number of custom endpoints. - ErrCodeDBClusterEndpointQuotaExceededFault = "DBClusterEndpointQuotaExceededFault" - - // ErrCodeDBClusterNotFoundFault for service response error code - // "DBClusterNotFoundFault". - // - // DBClusterIdentifier doesn't refer to an existing DB cluster. - ErrCodeDBClusterNotFoundFault = "DBClusterNotFoundFault" - - // ErrCodeDBClusterParameterGroupNotFoundFault for service response error code - // "DBClusterParameterGroupNotFound". - // - // DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter - // group. - ErrCodeDBClusterParameterGroupNotFoundFault = "DBClusterParameterGroupNotFound" - - // ErrCodeDBClusterQuotaExceededFault for service response error code - // "DBClusterQuotaExceededFault". - // - // The user attempted to create a new DB cluster and the user has already reached - // the maximum allowed DB cluster quota. - ErrCodeDBClusterQuotaExceededFault = "DBClusterQuotaExceededFault" - - // ErrCodeDBClusterRoleAlreadyExistsFault for service response error code - // "DBClusterRoleAlreadyExists". - // - // The specified IAM role Amazon Resource Name (ARN) is already associated with - // the specified DB cluster. - ErrCodeDBClusterRoleAlreadyExistsFault = "DBClusterRoleAlreadyExists" - - // ErrCodeDBClusterRoleNotFoundFault for service response error code - // "DBClusterRoleNotFound". - // - // The specified IAM role Amazon Resource Name (ARN) isn't associated with the - // specified DB cluster. - ErrCodeDBClusterRoleNotFoundFault = "DBClusterRoleNotFound" - - // ErrCodeDBClusterRoleQuotaExceededFault for service response error code - // "DBClusterRoleQuotaExceeded". - // - // You have exceeded the maximum number of IAM roles that can be associated - // with the specified DB cluster. - ErrCodeDBClusterRoleQuotaExceededFault = "DBClusterRoleQuotaExceeded" - - // ErrCodeDBClusterSnapshotAlreadyExistsFault for service response error code - // "DBClusterSnapshotAlreadyExistsFault". - // - // The user already has a DB cluster snapshot with the given identifier. - ErrCodeDBClusterSnapshotAlreadyExistsFault = "DBClusterSnapshotAlreadyExistsFault" - - // ErrCodeDBClusterSnapshotNotFoundFault for service response error code - // "DBClusterSnapshotNotFoundFault". - // - // DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. - ErrCodeDBClusterSnapshotNotFoundFault = "DBClusterSnapshotNotFoundFault" - - // ErrCodeDBInstanceAlreadyExistsFault for service response error code - // "DBInstanceAlreadyExists". - // - // The user already has a DB instance with the given identifier. - ErrCodeDBInstanceAlreadyExistsFault = "DBInstanceAlreadyExists" - - // ErrCodeDBInstanceAutomatedBackupNotFoundFault for service response error code - // "DBInstanceAutomatedBackupNotFound". - // - // No automated backup for this DB instance was found. - ErrCodeDBInstanceAutomatedBackupNotFoundFault = "DBInstanceAutomatedBackupNotFound" - - // ErrCodeDBInstanceAutomatedBackupQuotaExceededFault for service response error code - // "DBInstanceAutomatedBackupQuotaExceeded". - // - // The quota for retained automated backups was exceeded. This prevents you - // from retaining any additional automated backups. The retained automated backups - // quota is the same as your DB Instance quota. - ErrCodeDBInstanceAutomatedBackupQuotaExceededFault = "DBInstanceAutomatedBackupQuotaExceeded" - - // ErrCodeDBInstanceNotFoundFault for service response error code - // "DBInstanceNotFound". - // - // DBInstanceIdentifier doesn't refer to an existing DB instance. - ErrCodeDBInstanceNotFoundFault = "DBInstanceNotFound" - - // ErrCodeDBInstanceRoleAlreadyExistsFault for service response error code - // "DBInstanceRoleAlreadyExists". - // - // The specified RoleArn or FeatureName value is already associated with the - // DB instance. - ErrCodeDBInstanceRoleAlreadyExistsFault = "DBInstanceRoleAlreadyExists" - - // ErrCodeDBInstanceRoleNotFoundFault for service response error code - // "DBInstanceRoleNotFound". - // - // The specified RoleArn value doesn't match the specifed feature for the DB - // instance. - ErrCodeDBInstanceRoleNotFoundFault = "DBInstanceRoleNotFound" - - // ErrCodeDBInstanceRoleQuotaExceededFault for service response error code - // "DBInstanceRoleQuotaExceeded". - // - // You can't associate any more AWS Identity and Access Management (IAM) roles - // with the DB instance because the quota has been reached. - ErrCodeDBInstanceRoleQuotaExceededFault = "DBInstanceRoleQuotaExceeded" - - // ErrCodeDBLogFileNotFoundFault for service response error code - // "DBLogFileNotFoundFault". - // - // LogFileName doesn't refer to an existing DB log file. - ErrCodeDBLogFileNotFoundFault = "DBLogFileNotFoundFault" - - // ErrCodeDBParameterGroupAlreadyExistsFault for service response error code - // "DBParameterGroupAlreadyExists". - // - // A DB parameter group with the same name exists. - ErrCodeDBParameterGroupAlreadyExistsFault = "DBParameterGroupAlreadyExists" - - // ErrCodeDBParameterGroupNotFoundFault for service response error code - // "DBParameterGroupNotFound". - // - // DBParameterGroupName doesn't refer to an existing DB parameter group. - ErrCodeDBParameterGroupNotFoundFault = "DBParameterGroupNotFound" - - // ErrCodeDBParameterGroupQuotaExceededFault for service response error code - // "DBParameterGroupQuotaExceeded". - // - // The request would result in the user exceeding the allowed number of DB parameter - // groups. - ErrCodeDBParameterGroupQuotaExceededFault = "DBParameterGroupQuotaExceeded" - - // ErrCodeDBSecurityGroupAlreadyExistsFault for service response error code - // "DBSecurityGroupAlreadyExists". - // - // A DB security group with the name specified in DBSecurityGroupName already - // exists. - ErrCodeDBSecurityGroupAlreadyExistsFault = "DBSecurityGroupAlreadyExists" - - // ErrCodeDBSecurityGroupNotFoundFault for service response error code - // "DBSecurityGroupNotFound". - // - // DBSecurityGroupName doesn't refer to an existing DB security group. - ErrCodeDBSecurityGroupNotFoundFault = "DBSecurityGroupNotFound" - - // ErrCodeDBSecurityGroupNotSupportedFault for service response error code - // "DBSecurityGroupNotSupported". - // - // A DB security group isn't allowed for this action. - ErrCodeDBSecurityGroupNotSupportedFault = "DBSecurityGroupNotSupported" - - // ErrCodeDBSecurityGroupQuotaExceededFault for service response error code - // "QuotaExceeded.DBSecurityGroup". - // - // The request would result in the user exceeding the allowed number of DB security - // groups. - ErrCodeDBSecurityGroupQuotaExceededFault = "QuotaExceeded.DBSecurityGroup" - - // ErrCodeDBSnapshotAlreadyExistsFault for service response error code - // "DBSnapshotAlreadyExists". - // - // DBSnapshotIdentifier is already used by an existing snapshot. - ErrCodeDBSnapshotAlreadyExistsFault = "DBSnapshotAlreadyExists" - - // ErrCodeDBSnapshotNotFoundFault for service response error code - // "DBSnapshotNotFound". - // - // DBSnapshotIdentifier doesn't refer to an existing DB snapshot. - ErrCodeDBSnapshotNotFoundFault = "DBSnapshotNotFound" - - // ErrCodeDBSubnetGroupAlreadyExistsFault for service response error code - // "DBSubnetGroupAlreadyExists". - // - // DBSubnetGroupName is already used by an existing DB subnet group. - ErrCodeDBSubnetGroupAlreadyExistsFault = "DBSubnetGroupAlreadyExists" - - // ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs for service response error code - // "DBSubnetGroupDoesNotCoverEnoughAZs". - // - // Subnets in the DB subnet group should cover at least two Availability Zones - // unless there is only one Availability Zone. - ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs = "DBSubnetGroupDoesNotCoverEnoughAZs" - - // ErrCodeDBSubnetGroupNotAllowedFault for service response error code - // "DBSubnetGroupNotAllowedFault". - // - // The DBSubnetGroup shouldn't be specified while creating read replicas that - // lie in the same region as the source instance. - ErrCodeDBSubnetGroupNotAllowedFault = "DBSubnetGroupNotAllowedFault" - - // ErrCodeDBSubnetGroupNotFoundFault for service response error code - // "DBSubnetGroupNotFoundFault". - // - // DBSubnetGroupName doesn't refer to an existing DB subnet group. - ErrCodeDBSubnetGroupNotFoundFault = "DBSubnetGroupNotFoundFault" - - // ErrCodeDBSubnetGroupQuotaExceededFault for service response error code - // "DBSubnetGroupQuotaExceeded". - // - // The request would result in the user exceeding the allowed number of DB subnet - // groups. - ErrCodeDBSubnetGroupQuotaExceededFault = "DBSubnetGroupQuotaExceeded" - - // ErrCodeDBSubnetQuotaExceededFault for service response error code - // "DBSubnetQuotaExceededFault". - // - // The request would result in the user exceeding the allowed number of subnets - // in a DB subnet groups. - ErrCodeDBSubnetQuotaExceededFault = "DBSubnetQuotaExceededFault" - - // ErrCodeDBUpgradeDependencyFailureFault for service response error code - // "DBUpgradeDependencyFailure". - // - // The DB upgrade failed because a resource the DB depends on can't be modified. - ErrCodeDBUpgradeDependencyFailureFault = "DBUpgradeDependencyFailure" - - // ErrCodeDomainNotFoundFault for service response error code - // "DomainNotFoundFault". - // - // Domain doesn't refer to an existing Active Directory domain. - ErrCodeDomainNotFoundFault = "DomainNotFoundFault" - - // ErrCodeEventSubscriptionQuotaExceededFault for service response error code - // "EventSubscriptionQuotaExceeded". - // - // You have reached the maximum number of event subscriptions. - ErrCodeEventSubscriptionQuotaExceededFault = "EventSubscriptionQuotaExceeded" - - // ErrCodeGlobalClusterAlreadyExistsFault for service response error code - // "GlobalClusterAlreadyExistsFault". - ErrCodeGlobalClusterAlreadyExistsFault = "GlobalClusterAlreadyExistsFault" - - // ErrCodeGlobalClusterNotFoundFault for service response error code - // "GlobalClusterNotFoundFault". - ErrCodeGlobalClusterNotFoundFault = "GlobalClusterNotFoundFault" - - // ErrCodeGlobalClusterQuotaExceededFault for service response error code - // "GlobalClusterQuotaExceededFault". - ErrCodeGlobalClusterQuotaExceededFault = "GlobalClusterQuotaExceededFault" - - // ErrCodeInstanceQuotaExceededFault for service response error code - // "InstanceQuotaExceeded". - // - // The request would result in the user exceeding the allowed number of DB instances. - ErrCodeInstanceQuotaExceededFault = "InstanceQuotaExceeded" - - // ErrCodeInsufficientDBClusterCapacityFault for service response error code - // "InsufficientDBClusterCapacityFault". - // - // The DB cluster doesn't have enough capacity for the current operation. - ErrCodeInsufficientDBClusterCapacityFault = "InsufficientDBClusterCapacityFault" - - // ErrCodeInsufficientDBInstanceCapacityFault for service response error code - // "InsufficientDBInstanceCapacity". - // - // The specified DB instance class isn't available in the specified Availability - // Zone. - ErrCodeInsufficientDBInstanceCapacityFault = "InsufficientDBInstanceCapacity" - - // ErrCodeInsufficientStorageClusterCapacityFault for service response error code - // "InsufficientStorageClusterCapacity". - // - // There is insufficient storage available for the current action. You might - // be able to resolve this error by updating your subnet group to use different - // Availability Zones that have more storage available. - ErrCodeInsufficientStorageClusterCapacityFault = "InsufficientStorageClusterCapacity" - - // ErrCodeInvalidDBClusterCapacityFault for service response error code - // "InvalidDBClusterCapacityFault". - // - // Capacity isn't a valid Aurora Serverless DB cluster capacity. Valid capacity - // values are 2, 4, 8, 16, 32, 64, 128, and 256. - ErrCodeInvalidDBClusterCapacityFault = "InvalidDBClusterCapacityFault" - - // ErrCodeInvalidDBClusterEndpointStateFault for service response error code - // "InvalidDBClusterEndpointStateFault". - // - // The requested operation can't be performed on the endpoint while the endpoint - // is in this state. - ErrCodeInvalidDBClusterEndpointStateFault = "InvalidDBClusterEndpointStateFault" - - // ErrCodeInvalidDBClusterSnapshotStateFault for service response error code - // "InvalidDBClusterSnapshotStateFault". - // - // The supplied value isn't a valid DB cluster snapshot state. - ErrCodeInvalidDBClusterSnapshotStateFault = "InvalidDBClusterSnapshotStateFault" - - // ErrCodeInvalidDBClusterStateFault for service response error code - // "InvalidDBClusterStateFault". - // - // The requested operation can't be performed while the cluster is in this state. - ErrCodeInvalidDBClusterStateFault = "InvalidDBClusterStateFault" - - // ErrCodeInvalidDBInstanceAutomatedBackupStateFault for service response error code - // "InvalidDBInstanceAutomatedBackupState". - // - // The automated backup is in an invalid state. For example, this automated - // backup is associated with an active instance. - ErrCodeInvalidDBInstanceAutomatedBackupStateFault = "InvalidDBInstanceAutomatedBackupState" - - // ErrCodeInvalidDBInstanceStateFault for service response error code - // "InvalidDBInstanceState". - // - // The DB instance isn't in a valid state. - ErrCodeInvalidDBInstanceStateFault = "InvalidDBInstanceState" - - // ErrCodeInvalidDBParameterGroupStateFault for service response error code - // "InvalidDBParameterGroupState". - // - // The DB parameter group is in use or is in an invalid state. If you are attempting - // to delete the parameter group, you can't delete it when the parameter group - // is in this state. - ErrCodeInvalidDBParameterGroupStateFault = "InvalidDBParameterGroupState" - - // ErrCodeInvalidDBSecurityGroupStateFault for service response error code - // "InvalidDBSecurityGroupState". - // - // The state of the DB security group doesn't allow deletion. - ErrCodeInvalidDBSecurityGroupStateFault = "InvalidDBSecurityGroupState" - - // ErrCodeInvalidDBSnapshotStateFault for service response error code - // "InvalidDBSnapshotState". - // - // The state of the DB snapshot doesn't allow deletion. - ErrCodeInvalidDBSnapshotStateFault = "InvalidDBSnapshotState" - - // ErrCodeInvalidDBSubnetGroupFault for service response error code - // "InvalidDBSubnetGroupFault". - // - // The DBSubnetGroup doesn't belong to the same VPC as that of an existing cross-region - // read replica of the same source instance. - ErrCodeInvalidDBSubnetGroupFault = "InvalidDBSubnetGroupFault" - - // ErrCodeInvalidDBSubnetGroupStateFault for service response error code - // "InvalidDBSubnetGroupStateFault". - // - // The DB subnet group cannot be deleted because it's in use. - ErrCodeInvalidDBSubnetGroupStateFault = "InvalidDBSubnetGroupStateFault" - - // ErrCodeInvalidDBSubnetStateFault for service response error code - // "InvalidDBSubnetStateFault". - // - // The DB subnet isn't in the available state. - ErrCodeInvalidDBSubnetStateFault = "InvalidDBSubnetStateFault" - - // ErrCodeInvalidEventSubscriptionStateFault for service response error code - // "InvalidEventSubscriptionState". - // - // This error can occur if someone else is modifying a subscription. You should - // retry the action. - ErrCodeInvalidEventSubscriptionStateFault = "InvalidEventSubscriptionState" - - // ErrCodeInvalidGlobalClusterStateFault for service response error code - // "InvalidGlobalClusterStateFault". - ErrCodeInvalidGlobalClusterStateFault = "InvalidGlobalClusterStateFault" - - // ErrCodeInvalidOptionGroupStateFault for service response error code - // "InvalidOptionGroupStateFault". - // - // The option group isn't in the available state. - ErrCodeInvalidOptionGroupStateFault = "InvalidOptionGroupStateFault" - - // ErrCodeInvalidRestoreFault for service response error code - // "InvalidRestoreFault". - // - // Cannot restore from VPC backup to non-VPC DB instance. - ErrCodeInvalidRestoreFault = "InvalidRestoreFault" - - // ErrCodeInvalidS3BucketFault for service response error code - // "InvalidS3BucketFault". - // - // The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized - // to access the specified Amazon S3 bucket. Verify the SourceS3BucketName and - // S3IngestionRoleArn values and try again. - ErrCodeInvalidS3BucketFault = "InvalidS3BucketFault" - - // ErrCodeInvalidSubnet for service response error code - // "InvalidSubnet". - // - // The requested subnet is invalid, or multiple subnets were requested that - // are not all in a common VPC. - ErrCodeInvalidSubnet = "InvalidSubnet" - - // ErrCodeInvalidVPCNetworkStateFault for service response error code - // "InvalidVPCNetworkStateFault". - // - // The DB subnet group doesn't cover all Availability Zones after it's created - // because of users' change. - ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault" - - // ErrCodeKMSKeyNotAccessibleFault for service response error code - // "KMSKeyNotAccessibleFault". - // - // An error occurred accessing an AWS KMS key. - ErrCodeKMSKeyNotAccessibleFault = "KMSKeyNotAccessibleFault" - - // ErrCodeOptionGroupAlreadyExistsFault for service response error code - // "OptionGroupAlreadyExistsFault". - // - // The option group you are trying to create already exists. - ErrCodeOptionGroupAlreadyExistsFault = "OptionGroupAlreadyExistsFault" - - // ErrCodeOptionGroupNotFoundFault for service response error code - // "OptionGroupNotFoundFault". - // - // The specified option group could not be found. - ErrCodeOptionGroupNotFoundFault = "OptionGroupNotFoundFault" - - // ErrCodeOptionGroupQuotaExceededFault for service response error code - // "OptionGroupQuotaExceededFault". - // - // The quota of 20 option groups was exceeded for this AWS account. - ErrCodeOptionGroupQuotaExceededFault = "OptionGroupQuotaExceededFault" - - // ErrCodePointInTimeRestoreNotEnabledFault for service response error code - // "PointInTimeRestoreNotEnabled". - // - // SourceDBInstanceIdentifier refers to a DB instance with BackupRetentionPeriod - // equal to 0. - ErrCodePointInTimeRestoreNotEnabledFault = "PointInTimeRestoreNotEnabled" - - // ErrCodeProvisionedIopsNotAvailableInAZFault for service response error code - // "ProvisionedIopsNotAvailableInAZFault". - // - // Provisioned IOPS not available in the specified Availability Zone. - ErrCodeProvisionedIopsNotAvailableInAZFault = "ProvisionedIopsNotAvailableInAZFault" - - // ErrCodeReservedDBInstanceAlreadyExistsFault for service response error code - // "ReservedDBInstanceAlreadyExists". - // - // User already has a reservation with the given identifier. - ErrCodeReservedDBInstanceAlreadyExistsFault = "ReservedDBInstanceAlreadyExists" - - // ErrCodeReservedDBInstanceNotFoundFault for service response error code - // "ReservedDBInstanceNotFound". - // - // The specified reserved DB Instance not found. - ErrCodeReservedDBInstanceNotFoundFault = "ReservedDBInstanceNotFound" - - // ErrCodeReservedDBInstanceQuotaExceededFault for service response error code - // "ReservedDBInstanceQuotaExceeded". - // - // Request would exceed the user's DB Instance quota. - ErrCodeReservedDBInstanceQuotaExceededFault = "ReservedDBInstanceQuotaExceeded" - - // ErrCodeReservedDBInstancesOfferingNotFoundFault for service response error code - // "ReservedDBInstancesOfferingNotFound". - // - // Specified offering does not exist. - ErrCodeReservedDBInstancesOfferingNotFoundFault = "ReservedDBInstancesOfferingNotFound" - - // ErrCodeResourceNotFoundFault for service response error code - // "ResourceNotFoundFault". - // - // The specified resource ID was not found. - ErrCodeResourceNotFoundFault = "ResourceNotFoundFault" - - // ErrCodeSNSInvalidTopicFault for service response error code - // "SNSInvalidTopic". - // - // SNS has responded that there is a problem with the SND topic specified. - ErrCodeSNSInvalidTopicFault = "SNSInvalidTopic" - - // ErrCodeSNSNoAuthorizationFault for service response error code - // "SNSNoAuthorization". - // - // You do not have permission to publish to the SNS topic ARN. - ErrCodeSNSNoAuthorizationFault = "SNSNoAuthorization" - - // ErrCodeSNSTopicArnNotFoundFault for service response error code - // "SNSTopicArnNotFound". - // - // The SNS topic ARN does not exist. - ErrCodeSNSTopicArnNotFoundFault = "SNSTopicArnNotFound" - - // ErrCodeSharedSnapshotQuotaExceededFault for service response error code - // "SharedSnapshotQuotaExceeded". - // - // You have exceeded the maximum number of accounts that you can share a manual - // DB snapshot with. - ErrCodeSharedSnapshotQuotaExceededFault = "SharedSnapshotQuotaExceeded" - - // ErrCodeSnapshotQuotaExceededFault for service response error code - // "SnapshotQuotaExceeded". - // - // The request would result in the user exceeding the allowed number of DB snapshots. - ErrCodeSnapshotQuotaExceededFault = "SnapshotQuotaExceeded" - - // ErrCodeSourceNotFoundFault for service response error code - // "SourceNotFound". - // - // The requested source could not be found. - ErrCodeSourceNotFoundFault = "SourceNotFound" - - // ErrCodeStorageQuotaExceededFault for service response error code - // "StorageQuotaExceeded". - // - // The request would result in the user exceeding the allowed amount of storage - // available across all DB instances. - ErrCodeStorageQuotaExceededFault = "StorageQuotaExceeded" - - // ErrCodeStorageTypeNotSupportedFault for service response error code - // "StorageTypeNotSupported". - // - // Storage of the StorageType specified can't be associated with the DB instance. - ErrCodeStorageTypeNotSupportedFault = "StorageTypeNotSupported" - - // ErrCodeSubnetAlreadyInUse for service response error code - // "SubnetAlreadyInUse". - // - // The DB subnet is already in use in the Availability Zone. - ErrCodeSubnetAlreadyInUse = "SubnetAlreadyInUse" - - // ErrCodeSubscriptionAlreadyExistFault for service response error code - // "SubscriptionAlreadyExist". - // - // The supplied subscription name already exists. - ErrCodeSubscriptionAlreadyExistFault = "SubscriptionAlreadyExist" - - // ErrCodeSubscriptionCategoryNotFoundFault for service response error code - // "SubscriptionCategoryNotFound". - // - // The supplied category does not exist. - ErrCodeSubscriptionCategoryNotFoundFault = "SubscriptionCategoryNotFound" - - // ErrCodeSubscriptionNotFoundFault for service response error code - // "SubscriptionNotFound". - // - // The subscription name does not exist. - ErrCodeSubscriptionNotFoundFault = "SubscriptionNotFound" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/service.go b/vendor/github.com/aws/aws-sdk-go/service/rds/service.go deleted file mode 100644 index f2d0efaf7..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package rds - -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/query" -) - -// RDS provides the API operation methods for making requests to -// Amazon Relational Database Service. See this package's package overview docs -// for details on the service. -// -// RDS methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type RDS 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 = "rds" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "RDS" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the RDS client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a RDS client from just a session. -// svc := rds.New(mySession) -// -// // Create a RDS client with additional configuration -// svc := rds.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *RDS { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *RDS { - svc := &RDS{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-10-31", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a RDS operation and runs any -// custom request initialization. -func (c *RDS) 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/rds/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/rds/waiters.go deleted file mode 100644 index 0c21e88bb..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/waiters.go +++ /dev/null @@ -1,294 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package rds - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilDBInstanceAvailable uses the Amazon RDS API operation -// DescribeDBInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *RDS) WaitUntilDBInstanceAvailable(input *DescribeDBInstancesInput) error { - return c.WaitUntilDBInstanceAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilDBInstanceAvailableWithContext is an extended version of WaitUntilDBInstanceAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) WaitUntilDBInstanceAvailableWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilDBInstanceAvailable", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "deleted", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "deleting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "incompatible-restore", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "incompatible-parameters", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeDBInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilDBInstanceDeleted uses the Amazon RDS API operation -// DescribeDBInstances to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *RDS) WaitUntilDBInstanceDeleted(input *DescribeDBInstancesInput) error { - return c.WaitUntilDBInstanceDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilDBInstanceDeletedWithContext is an extended version of WaitUntilDBInstanceDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) WaitUntilDBInstanceDeletedWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilDBInstanceDeleted", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "deleted", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "DBInstanceNotFound", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "creating", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "modifying", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "rebooting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", - Expected: "resetting-master-credentials", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeDBInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilDBSnapshotAvailable uses the Amazon RDS API operation -// DescribeDBSnapshots to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *RDS) WaitUntilDBSnapshotAvailable(input *DescribeDBSnapshotsInput) error { - return c.WaitUntilDBSnapshotAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilDBSnapshotAvailableWithContext is an extended version of WaitUntilDBSnapshotAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) WaitUntilDBSnapshotAvailableWithContext(ctx aws.Context, input *DescribeDBSnapshotsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilDBSnapshotAvailable", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "DBSnapshots[].Status", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", - Expected: "deleted", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", - Expected: "deleting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", - Expected: "failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", - Expected: "incompatible-restore", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", - Expected: "incompatible-parameters", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeDBSnapshotsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBSnapshotsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilDBSnapshotDeleted uses the Amazon RDS API operation -// DescribeDBSnapshots to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *RDS) WaitUntilDBSnapshotDeleted(input *DescribeDBSnapshotsInput) error { - return c.WaitUntilDBSnapshotDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilDBSnapshotDeletedWithContext is an extended version of WaitUntilDBSnapshotDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *RDS) WaitUntilDBSnapshotDeletedWithContext(ctx aws.Context, input *DescribeDBSnapshotsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilDBSnapshotDeleted", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "DBSnapshots[].Status", - Expected: "deleted", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "DBSnapshotNotFound", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", - Expected: "creating", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", - Expected: "modifying", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", - Expected: "rebooting", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", - Expected: "resetting-master-credentials", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeDBSnapshotsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDBSnapshotsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go deleted file mode 100644 index 8e4ad1925..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go +++ /dev/null @@ -1,21531 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package redshift - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/query" -) - -const opAcceptReservedNodeExchange = "AcceptReservedNodeExchange" - -// AcceptReservedNodeExchangeRequest generates a "aws/request.Request" representing the -// client's request for the AcceptReservedNodeExchange operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcceptReservedNodeExchange for more information on using the AcceptReservedNodeExchange -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcceptReservedNodeExchangeRequest method. -// req, resp := client.AcceptReservedNodeExchangeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/AcceptReservedNodeExchange -func (c *Redshift) AcceptReservedNodeExchangeRequest(input *AcceptReservedNodeExchangeInput) (req *request.Request, output *AcceptReservedNodeExchangeOutput) { - op := &request.Operation{ - Name: opAcceptReservedNodeExchange, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AcceptReservedNodeExchangeInput{} - } - - output = &AcceptReservedNodeExchangeOutput{} - req = c.newRequest(op, input, output) - return -} - -// AcceptReservedNodeExchange API operation for Amazon Redshift. -// -// Exchanges a DC1 Reserved Node for a DC2 Reserved Node with no changes to -// the configuration (term, payment type, or number of nodes) and no additional -// costs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation AcceptReservedNodeExchange for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReservedNodeNotFoundFault "ReservedNodeNotFound" -// The specified reserved compute node not found. -// -// * ErrCodeInvalidReservedNodeStateFault "InvalidReservedNodeState" -// Indicates that the Reserved Node being exchanged is not in an active state. -// -// * ErrCodeReservedNodeAlreadyMigratedFault "ReservedNodeAlreadyMigrated" -// Indicates that the reserved node has already been exchanged. -// -// * ErrCodeReservedNodeOfferingNotFoundFault "ReservedNodeOfferingNotFound" -// Specified offering does not exist. -// -// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" -// The requested operation isn't supported. -// -// * ErrCodeDependentServiceUnavailableFault "DependentServiceUnavailableFault" -// Your request cannot be completed because a dependent internal service is -// temporarily unavailable. Wait 30 to 60 seconds and try again. -// -// * ErrCodeReservedNodeAlreadyExistsFault "ReservedNodeAlreadyExists" -// User already has a reservation with the given identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/AcceptReservedNodeExchange -func (c *Redshift) AcceptReservedNodeExchange(input *AcceptReservedNodeExchangeInput) (*AcceptReservedNodeExchangeOutput, error) { - req, out := c.AcceptReservedNodeExchangeRequest(input) - return out, req.Send() -} - -// AcceptReservedNodeExchangeWithContext is the same as AcceptReservedNodeExchange with the addition of -// the ability to pass a context and additional request options. -// -// See AcceptReservedNodeExchange for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) AcceptReservedNodeExchangeWithContext(ctx aws.Context, input *AcceptReservedNodeExchangeInput, opts ...request.Option) (*AcceptReservedNodeExchangeOutput, error) { - req, out := c.AcceptReservedNodeExchangeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAuthorizeClusterSecurityGroupIngress = "AuthorizeClusterSecurityGroupIngress" - -// AuthorizeClusterSecurityGroupIngressRequest generates a "aws/request.Request" representing the -// client's request for the AuthorizeClusterSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AuthorizeClusterSecurityGroupIngress for more information on using the AuthorizeClusterSecurityGroupIngress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AuthorizeClusterSecurityGroupIngressRequest method. -// req, resp := client.AuthorizeClusterSecurityGroupIngressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/AuthorizeClusterSecurityGroupIngress -func (c *Redshift) AuthorizeClusterSecurityGroupIngressRequest(input *AuthorizeClusterSecurityGroupIngressInput) (req *request.Request, output *AuthorizeClusterSecurityGroupIngressOutput) { - op := &request.Operation{ - Name: opAuthorizeClusterSecurityGroupIngress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AuthorizeClusterSecurityGroupIngressInput{} - } - - output = &AuthorizeClusterSecurityGroupIngressOutput{} - req = c.newRequest(op, input, output) - return -} - -// AuthorizeClusterSecurityGroupIngress API operation for Amazon Redshift. -// -// Adds an inbound (ingress) rule to an Amazon Redshift security group. Depending -// on whether the application accessing your cluster is running on the Internet -// or an Amazon EC2 instance, you can authorize inbound access to either a Classless -// Interdomain Routing (CIDR)/Internet Protocol (IP) range or to an Amazon EC2 -// security group. You can add as many as 20 ingress rules to an Amazon Redshift -// security group. -// -// If you authorize access to an Amazon EC2 security group, specify EC2SecurityGroupName -// and EC2SecurityGroupOwnerId. The Amazon EC2 security group and Amazon Redshift -// cluster must be in the same AWS Region. -// -// If you authorize access to a CIDR/IP address range, specify CIDRIP. For an -// overview of CIDR blocks, see the Wikipedia article on Classless Inter-Domain -// Routing (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). -// -// You must also associate the security group with a cluster so that clients -// running on these IP addresses or the EC2 instance are authorized to connect -// to the cluster. For information about managing security groups, go to Working -// with Security Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation AuthorizeClusterSecurityGroupIngress for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterSecurityGroupNotFoundFault "ClusterSecurityGroupNotFound" -// The cluster security group name does not refer to an existing cluster security -// group. -// -// * ErrCodeInvalidClusterSecurityGroupStateFault "InvalidClusterSecurityGroupState" -// The state of the cluster security group is not available. -// -// * ErrCodeAuthorizationAlreadyExistsFault "AuthorizationAlreadyExists" -// The specified CIDR block or EC2 security group is already authorized for -// the specified cluster security group. -// -// * ErrCodeAuthorizationQuotaExceededFault "AuthorizationQuotaExceeded" -// The authorization quota for the cluster security group has been reached. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/AuthorizeClusterSecurityGroupIngress -func (c *Redshift) AuthorizeClusterSecurityGroupIngress(input *AuthorizeClusterSecurityGroupIngressInput) (*AuthorizeClusterSecurityGroupIngressOutput, error) { - req, out := c.AuthorizeClusterSecurityGroupIngressRequest(input) - return out, req.Send() -} - -// AuthorizeClusterSecurityGroupIngressWithContext is the same as AuthorizeClusterSecurityGroupIngress with the addition of -// the ability to pass a context and additional request options. -// -// See AuthorizeClusterSecurityGroupIngress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) AuthorizeClusterSecurityGroupIngressWithContext(ctx aws.Context, input *AuthorizeClusterSecurityGroupIngressInput, opts ...request.Option) (*AuthorizeClusterSecurityGroupIngressOutput, error) { - req, out := c.AuthorizeClusterSecurityGroupIngressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAuthorizeSnapshotAccess = "AuthorizeSnapshotAccess" - -// AuthorizeSnapshotAccessRequest generates a "aws/request.Request" representing the -// client's request for the AuthorizeSnapshotAccess operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AuthorizeSnapshotAccess for more information on using the AuthorizeSnapshotAccess -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AuthorizeSnapshotAccessRequest method. -// req, resp := client.AuthorizeSnapshotAccessRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/AuthorizeSnapshotAccess -func (c *Redshift) AuthorizeSnapshotAccessRequest(input *AuthorizeSnapshotAccessInput) (req *request.Request, output *AuthorizeSnapshotAccessOutput) { - op := &request.Operation{ - Name: opAuthorizeSnapshotAccess, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AuthorizeSnapshotAccessInput{} - } - - output = &AuthorizeSnapshotAccessOutput{} - req = c.newRequest(op, input, output) - return -} - -// AuthorizeSnapshotAccess API operation for Amazon Redshift. -// -// Authorizes the specified AWS customer account to restore the specified snapshot. -// -// For more information about working with snapshots, go to Amazon Redshift -// Snapshots (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation AuthorizeSnapshotAccess for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterSnapshotNotFoundFault "ClusterSnapshotNotFound" -// The snapshot identifier does not refer to an existing cluster snapshot. -// -// * ErrCodeAuthorizationAlreadyExistsFault "AuthorizationAlreadyExists" -// The specified CIDR block or EC2 security group is already authorized for -// the specified cluster security group. -// -// * ErrCodeAuthorizationQuotaExceededFault "AuthorizationQuotaExceeded" -// The authorization quota for the cluster security group has been reached. -// -// * ErrCodeDependentServiceRequestThrottlingFault "DependentServiceRequestThrottlingFault" -// The request cannot be completed because a dependent service is throttling -// requests made by Amazon Redshift on your behalf. Wait and retry the request. -// -// * ErrCodeInvalidClusterSnapshotStateFault "InvalidClusterSnapshotState" -// The specified cluster snapshot is not in the available state, or other accounts -// are authorized to access the snapshot. -// -// * ErrCodeLimitExceededFault "LimitExceededFault" -// The encryption key has exceeded its grant limit in AWS KMS. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/AuthorizeSnapshotAccess -func (c *Redshift) AuthorizeSnapshotAccess(input *AuthorizeSnapshotAccessInput) (*AuthorizeSnapshotAccessOutput, error) { - req, out := c.AuthorizeSnapshotAccessRequest(input) - return out, req.Send() -} - -// AuthorizeSnapshotAccessWithContext is the same as AuthorizeSnapshotAccess with the addition of -// the ability to pass a context and additional request options. -// -// See AuthorizeSnapshotAccess for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) AuthorizeSnapshotAccessWithContext(ctx aws.Context, input *AuthorizeSnapshotAccessInput, opts ...request.Option) (*AuthorizeSnapshotAccessOutput, error) { - req, out := c.AuthorizeSnapshotAccessRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchDeleteClusterSnapshots = "BatchDeleteClusterSnapshots" - -// BatchDeleteClusterSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the BatchDeleteClusterSnapshots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchDeleteClusterSnapshots for more information on using the BatchDeleteClusterSnapshots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchDeleteClusterSnapshotsRequest method. -// req, resp := client.BatchDeleteClusterSnapshotsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/BatchDeleteClusterSnapshots -func (c *Redshift) BatchDeleteClusterSnapshotsRequest(input *BatchDeleteClusterSnapshotsInput) (req *request.Request, output *BatchDeleteClusterSnapshotsOutput) { - op := &request.Operation{ - Name: opBatchDeleteClusterSnapshots, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchDeleteClusterSnapshotsInput{} - } - - output = &BatchDeleteClusterSnapshotsOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchDeleteClusterSnapshots API operation for Amazon Redshift. -// -// Deletes a set of cluster snapshots. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation BatchDeleteClusterSnapshots for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBatchDeleteRequestSizeExceededFault "BatchDeleteRequestSizeExceeded" -// The maximum number for a batch delete of snapshots has been reached. The -// limit is 100. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/BatchDeleteClusterSnapshots -func (c *Redshift) BatchDeleteClusterSnapshots(input *BatchDeleteClusterSnapshotsInput) (*BatchDeleteClusterSnapshotsOutput, error) { - req, out := c.BatchDeleteClusterSnapshotsRequest(input) - return out, req.Send() -} - -// BatchDeleteClusterSnapshotsWithContext is the same as BatchDeleteClusterSnapshots with the addition of -// the ability to pass a context and additional request options. -// -// See BatchDeleteClusterSnapshots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) BatchDeleteClusterSnapshotsWithContext(ctx aws.Context, input *BatchDeleteClusterSnapshotsInput, opts ...request.Option) (*BatchDeleteClusterSnapshotsOutput, error) { - req, out := c.BatchDeleteClusterSnapshotsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchModifyClusterSnapshots = "BatchModifyClusterSnapshots" - -// BatchModifyClusterSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the BatchModifyClusterSnapshots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchModifyClusterSnapshots for more information on using the BatchModifyClusterSnapshots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchModifyClusterSnapshotsRequest method. -// req, resp := client.BatchModifyClusterSnapshotsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/BatchModifyClusterSnapshots -func (c *Redshift) BatchModifyClusterSnapshotsRequest(input *BatchModifyClusterSnapshotsInput) (req *request.Request, output *BatchModifyClusterSnapshotsOutput) { - op := &request.Operation{ - Name: opBatchModifyClusterSnapshots, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchModifyClusterSnapshotsInput{} - } - - output = &BatchModifyClusterSnapshotsOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchModifyClusterSnapshots API operation for Amazon Redshift. -// -// Modifies the settings for a list of snapshots. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation BatchModifyClusterSnapshots for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" -// The retention period specified is either in the past or is not a valid value. -// -// The value must be either -1 or an integer between 1 and 3,653. -// -// * ErrCodeBatchModifyClusterSnapshotsLimitExceededFault "BatchModifyClusterSnapshotsLimitExceededFault" -// The maximum number for snapshot identifiers has been reached. The limit is -// 100. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/BatchModifyClusterSnapshots -func (c *Redshift) BatchModifyClusterSnapshots(input *BatchModifyClusterSnapshotsInput) (*BatchModifyClusterSnapshotsOutput, error) { - req, out := c.BatchModifyClusterSnapshotsRequest(input) - return out, req.Send() -} - -// BatchModifyClusterSnapshotsWithContext is the same as BatchModifyClusterSnapshots with the addition of -// the ability to pass a context and additional request options. -// -// See BatchModifyClusterSnapshots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) BatchModifyClusterSnapshotsWithContext(ctx aws.Context, input *BatchModifyClusterSnapshotsInput, opts ...request.Option) (*BatchModifyClusterSnapshotsOutput, error) { - req, out := c.BatchModifyClusterSnapshotsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelResize = "CancelResize" - -// CancelResizeRequest generates a "aws/request.Request" representing the -// client's request for the CancelResize operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelResize for more information on using the CancelResize -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelResizeRequest method. -// req, resp := client.CancelResizeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CancelResize -func (c *Redshift) CancelResizeRequest(input *CancelResizeInput) (req *request.Request, output *CancelResizeOutput) { - op := &request.Operation{ - Name: opCancelResize, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelResizeInput{} - } - - output = &CancelResizeOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelResize API operation for Amazon Redshift. -// -// Cancels a resize operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation CancelResize for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeResizeNotFoundFault "ResizeNotFound" -// A resize operation for the specified cluster is not found. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterState" -// The specified cluster is not in the available state. -// -// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" -// The requested operation isn't supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CancelResize -func (c *Redshift) CancelResize(input *CancelResizeInput) (*CancelResizeOutput, error) { - req, out := c.CancelResizeRequest(input) - return out, req.Send() -} - -// CancelResizeWithContext is the same as CancelResize with the addition of -// the ability to pass a context and additional request options. -// -// See CancelResize for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) CancelResizeWithContext(ctx aws.Context, input *CancelResizeInput, opts ...request.Option) (*CancelResizeOutput, error) { - req, out := c.CancelResizeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyClusterSnapshot = "CopyClusterSnapshot" - -// CopyClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CopyClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyClusterSnapshot for more information on using the CopyClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyClusterSnapshotRequest method. -// req, resp := client.CopyClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CopyClusterSnapshot -func (c *Redshift) CopyClusterSnapshotRequest(input *CopyClusterSnapshotInput) (req *request.Request, output *CopyClusterSnapshotOutput) { - op := &request.Operation{ - Name: opCopyClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyClusterSnapshotInput{} - } - - output = &CopyClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyClusterSnapshot API operation for Amazon Redshift. -// -// Copies the specified automated cluster snapshot to a new manual cluster snapshot. -// The source must be an automated snapshot and it must be in the available -// state. -// -// When you delete a cluster, Amazon Redshift deletes any automated snapshots -// of the cluster. Also, when the retention period of the snapshot expires, -// Amazon Redshift automatically deletes it. If you want to keep an automated -// snapshot for a longer period, you can make a manual copy of the snapshot. -// Manual snapshots are retained until you delete them. -// -// For more information about working with snapshots, go to Amazon Redshift -// Snapshots (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation CopyClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterSnapshotAlreadyExistsFault "ClusterSnapshotAlreadyExists" -// The value specified as a snapshot identifier is already used by an existing -// snapshot. -// -// * ErrCodeClusterSnapshotNotFoundFault "ClusterSnapshotNotFound" -// The snapshot identifier does not refer to an existing cluster snapshot. -// -// * ErrCodeInvalidClusterSnapshotStateFault "InvalidClusterSnapshotState" -// The specified cluster snapshot is not in the available state, or other accounts -// are authorized to access the snapshot. -// -// * ErrCodeClusterSnapshotQuotaExceededFault "ClusterSnapshotQuotaExceeded" -// The request would result in the user exceeding the allowed number of cluster -// snapshots. -// -// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" -// The retention period specified is either in the past or is not a valid value. -// -// The value must be either -1 or an integer between 1 and 3,653. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CopyClusterSnapshot -func (c *Redshift) CopyClusterSnapshot(input *CopyClusterSnapshotInput) (*CopyClusterSnapshotOutput, error) { - req, out := c.CopyClusterSnapshotRequest(input) - return out, req.Send() -} - -// CopyClusterSnapshotWithContext is the same as CopyClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CopyClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) CopyClusterSnapshotWithContext(ctx aws.Context, input *CopyClusterSnapshotInput, opts ...request.Option) (*CopyClusterSnapshotOutput, error) { - req, out := c.CopyClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCluster = "CreateCluster" - -// CreateClusterRequest generates a "aws/request.Request" representing the -// client's request for the CreateCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCluster for more information on using the CreateCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateClusterRequest method. -// req, resp := client.CreateClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateCluster -func (c *Redshift) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) { - op := &request.Operation{ - Name: opCreateCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateClusterInput{} - } - - output = &CreateClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCluster API operation for Amazon Redshift. -// -// Creates a new cluster. -// -// To create a cluster in Virtual Private Cloud (VPC), you must provide a cluster -// subnet group name. The cluster subnet group identifies the subnets of your -// VPC that Amazon Redshift uses when creating the cluster. For more information -// about managing clusters, go to Amazon Redshift Clusters (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation CreateCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterAlreadyExistsFault "ClusterAlreadyExists" -// The account already has a cluster with the given identifier. -// -// * ErrCodeInsufficientClusterCapacityFault "InsufficientClusterCapacity" -// The number of nodes specified exceeds the allotted capacity of the cluster. -// -// * ErrCodeClusterParameterGroupNotFoundFault "ClusterParameterGroupNotFound" -// The parameter group name does not refer to an existing parameter group. -// -// * ErrCodeClusterSecurityGroupNotFoundFault "ClusterSecurityGroupNotFound" -// The cluster security group name does not refer to an existing cluster security -// group. -// -// * ErrCodeClusterQuotaExceededFault "ClusterQuotaExceeded" -// The request would exceed the allowed number of cluster instances for this -// account. For information about increasing your quota, go to Limits in Amazon -// Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeNumberOfNodesQuotaExceededFault "NumberOfNodesQuotaExceeded" -// The operation would exceed the number of nodes allotted to the account. For -// information about increasing your quota, go to Limits in Amazon Redshift -// (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeNumberOfNodesPerClusterLimitExceededFault "NumberOfNodesPerClusterLimitExceeded" -// The operation would exceed the number of nodes allowed for a cluster. -// -// * ErrCodeClusterSubnetGroupNotFoundFault "ClusterSubnetGroupNotFoundFault" -// The cluster subnet group name does not refer to an existing cluster subnet -// group. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The cluster subnet group does not cover all Availability Zones. -// -// * ErrCodeInvalidClusterSubnetGroupStateFault "InvalidClusterSubnetGroupStateFault" -// The cluster subnet group cannot be deleted because it is in use. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is not valid, or not all of the subnets are in the same -// VPC. -// -// * ErrCodeUnauthorizedOperation "UnauthorizedOperation" -// Your account is not authorized to perform the requested operation. -// -// * ErrCodeHsmClientCertificateNotFoundFault "HsmClientCertificateNotFoundFault" -// There is no Amazon Redshift HSM client certificate with the specified identifier. -// -// * ErrCodeHsmConfigurationNotFoundFault "HsmConfigurationNotFoundFault" -// There is no Amazon Redshift HSM configuration with the specified identifier. -// -// * ErrCodeInvalidElasticIpFault "InvalidElasticIpFault" -// The Elastic IP (EIP) is invalid or cannot be found. -// -// * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// You have exceeded the number of tags allowed. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// * ErrCodeLimitExceededFault "LimitExceededFault" -// The encryption key has exceeded its grant limit in AWS KMS. -// -// * ErrCodeDependentServiceRequestThrottlingFault "DependentServiceRequestThrottlingFault" -// The request cannot be completed because a dependent service is throttling -// requests made by Amazon Redshift on your behalf. Wait and retry the request. -// -// * ErrCodeInvalidClusterTrackFault "InvalidClusterTrack" -// The provided cluster track name is not valid. -// -// * ErrCodeSnapshotScheduleNotFoundFault "SnapshotScheduleNotFound" -// We could not find the specified snapshot schedule. -// -// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" -// The retention period specified is either in the past or is not a valid value. -// -// The value must be either -1 or an integer between 1 and 3,653. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateCluster -func (c *Redshift) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) { - req, out := c.CreateClusterRequest(input) - return out, req.Send() -} - -// CreateClusterWithContext is the same as CreateCluster with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) { - req, out := c.CreateClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateClusterParameterGroup = "CreateClusterParameterGroup" - -// CreateClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateClusterParameterGroup for more information on using the CreateClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateClusterParameterGroupRequest method. -// req, resp := client.CreateClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateClusterParameterGroup -func (c *Redshift) CreateClusterParameterGroupRequest(input *CreateClusterParameterGroupInput) (req *request.Request, output *CreateClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opCreateClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateClusterParameterGroupInput{} - } - - output = &CreateClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateClusterParameterGroup API operation for Amazon Redshift. -// -// Creates an Amazon Redshift parameter group. -// -// Creating parameter groups is independent of creating clusters. You can associate -// a cluster with a parameter group when you create the cluster. You can also -// associate an existing cluster with a parameter group after the cluster is -// created by using ModifyCluster. -// -// Parameters in the parameter group define specific behavior that applies to -// the databases you create on the cluster. For more information about parameters -// and parameter groups, go to Amazon Redshift Parameter Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation CreateClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterParameterGroupQuotaExceededFault "ClusterParameterGroupQuotaExceeded" -// The request would result in the user exceeding the allowed number of cluster -// parameter groups. For information about increasing your quota, go to Limits -// in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeClusterParameterGroupAlreadyExistsFault "ClusterParameterGroupAlreadyExists" -// A cluster parameter group with the same name already exists. -// -// * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// You have exceeded the number of tags allowed. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateClusterParameterGroup -func (c *Redshift) CreateClusterParameterGroup(input *CreateClusterParameterGroupInput) (*CreateClusterParameterGroupOutput, error) { - req, out := c.CreateClusterParameterGroupRequest(input) - return out, req.Send() -} - -// CreateClusterParameterGroupWithContext is the same as CreateClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) CreateClusterParameterGroupWithContext(ctx aws.Context, input *CreateClusterParameterGroupInput, opts ...request.Option) (*CreateClusterParameterGroupOutput, error) { - req, out := c.CreateClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateClusterSecurityGroup = "CreateClusterSecurityGroup" - -// CreateClusterSecurityGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateClusterSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateClusterSecurityGroup for more information on using the CreateClusterSecurityGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateClusterSecurityGroupRequest method. -// req, resp := client.CreateClusterSecurityGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateClusterSecurityGroup -func (c *Redshift) CreateClusterSecurityGroupRequest(input *CreateClusterSecurityGroupInput) (req *request.Request, output *CreateClusterSecurityGroupOutput) { - op := &request.Operation{ - Name: opCreateClusterSecurityGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateClusterSecurityGroupInput{} - } - - output = &CreateClusterSecurityGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateClusterSecurityGroup API operation for Amazon Redshift. -// -// Creates a new Amazon Redshift security group. You use security groups to -// control access to non-VPC clusters. -// -// For information about managing security groups, go to Amazon Redshift Cluster -// Security Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation CreateClusterSecurityGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterSecurityGroupAlreadyExistsFault "ClusterSecurityGroupAlreadyExists" -// A cluster security group with the same name already exists. -// -// * ErrCodeClusterSecurityGroupQuotaExceededFault "QuotaExceeded.ClusterSecurityGroup" -// The request would result in the user exceeding the allowed number of cluster -// security groups. For information about increasing your quota, go to Limits -// in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// You have exceeded the number of tags allowed. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateClusterSecurityGroup -func (c *Redshift) CreateClusterSecurityGroup(input *CreateClusterSecurityGroupInput) (*CreateClusterSecurityGroupOutput, error) { - req, out := c.CreateClusterSecurityGroupRequest(input) - return out, req.Send() -} - -// CreateClusterSecurityGroupWithContext is the same as CreateClusterSecurityGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateClusterSecurityGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) CreateClusterSecurityGroupWithContext(ctx aws.Context, input *CreateClusterSecurityGroupInput, opts ...request.Option) (*CreateClusterSecurityGroupOutput, error) { - req, out := c.CreateClusterSecurityGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateClusterSnapshot = "CreateClusterSnapshot" - -// CreateClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateClusterSnapshot for more information on using the CreateClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateClusterSnapshotRequest method. -// req, resp := client.CreateClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateClusterSnapshot -func (c *Redshift) CreateClusterSnapshotRequest(input *CreateClusterSnapshotInput) (req *request.Request, output *CreateClusterSnapshotOutput) { - op := &request.Operation{ - Name: opCreateClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateClusterSnapshotInput{} - } - - output = &CreateClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateClusterSnapshot API operation for Amazon Redshift. -// -// Creates a manual snapshot of the specified cluster. The cluster must be in -// the available state. -// -// For more information about working with snapshots, go to Amazon Redshift -// Snapshots (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation CreateClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterSnapshotAlreadyExistsFault "ClusterSnapshotAlreadyExists" -// The value specified as a snapshot identifier is already used by an existing -// snapshot. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterState" -// The specified cluster is not in the available state. -// -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeClusterSnapshotQuotaExceededFault "ClusterSnapshotQuotaExceeded" -// The request would result in the user exceeding the allowed number of cluster -// snapshots. -// -// * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// You have exceeded the number of tags allowed. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" -// The retention period specified is either in the past or is not a valid value. -// -// The value must be either -1 or an integer between 1 and 3,653. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateClusterSnapshot -func (c *Redshift) CreateClusterSnapshot(input *CreateClusterSnapshotInput) (*CreateClusterSnapshotOutput, error) { - req, out := c.CreateClusterSnapshotRequest(input) - return out, req.Send() -} - -// CreateClusterSnapshotWithContext is the same as CreateClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) CreateClusterSnapshotWithContext(ctx aws.Context, input *CreateClusterSnapshotInput, opts ...request.Option) (*CreateClusterSnapshotOutput, error) { - req, out := c.CreateClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateClusterSubnetGroup = "CreateClusterSubnetGroup" - -// CreateClusterSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateClusterSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateClusterSubnetGroup for more information on using the CreateClusterSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateClusterSubnetGroupRequest method. -// req, resp := client.CreateClusterSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateClusterSubnetGroup -func (c *Redshift) CreateClusterSubnetGroupRequest(input *CreateClusterSubnetGroupInput) (req *request.Request, output *CreateClusterSubnetGroupOutput) { - op := &request.Operation{ - Name: opCreateClusterSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateClusterSubnetGroupInput{} - } - - output = &CreateClusterSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateClusterSubnetGroup API operation for Amazon Redshift. -// -// Creates a new Amazon Redshift subnet group. You must provide a list of one -// or more subnets in your existing Amazon Virtual Private Cloud (Amazon VPC) -// when creating Amazon Redshift subnet group. -// -// For information about subnet groups, go to Amazon Redshift Cluster Subnet -// Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-cluster-subnet-groups.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation CreateClusterSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterSubnetGroupAlreadyExistsFault "ClusterSubnetGroupAlreadyExists" -// A ClusterSubnetGroupName is already used by an existing cluster subnet group. -// -// * ErrCodeClusterSubnetGroupQuotaExceededFault "ClusterSubnetGroupQuotaExceeded" -// The request would result in user exceeding the allowed number of cluster -// subnet groups. For information about increasing your quota, go to Limits -// in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeClusterSubnetQuotaExceededFault "ClusterSubnetQuotaExceededFault" -// The request would result in user exceeding the allowed number of subnets -// in a cluster subnet groups. For information about increasing your quota, -// go to Limits in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is not valid, or not all of the subnets are in the same -// VPC. -// -// * ErrCodeUnauthorizedOperation "UnauthorizedOperation" -// Your account is not authorized to perform the requested operation. -// -// * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// You have exceeded the number of tags allowed. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// * ErrCodeDependentServiceRequestThrottlingFault "DependentServiceRequestThrottlingFault" -// The request cannot be completed because a dependent service is throttling -// requests made by Amazon Redshift on your behalf. Wait and retry the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateClusterSubnetGroup -func (c *Redshift) CreateClusterSubnetGroup(input *CreateClusterSubnetGroupInput) (*CreateClusterSubnetGroupOutput, error) { - req, out := c.CreateClusterSubnetGroupRequest(input) - return out, req.Send() -} - -// CreateClusterSubnetGroupWithContext is the same as CreateClusterSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateClusterSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) CreateClusterSubnetGroupWithContext(ctx aws.Context, input *CreateClusterSubnetGroupInput, opts ...request.Option) (*CreateClusterSubnetGroupOutput, error) { - req, out := c.CreateClusterSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateEventSubscription = "CreateEventSubscription" - -// CreateEventSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the CreateEventSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateEventSubscription for more information on using the CreateEventSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateEventSubscriptionRequest method. -// req, resp := client.CreateEventSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateEventSubscription -func (c *Redshift) CreateEventSubscriptionRequest(input *CreateEventSubscriptionInput) (req *request.Request, output *CreateEventSubscriptionOutput) { - op := &request.Operation{ - Name: opCreateEventSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateEventSubscriptionInput{} - } - - output = &CreateEventSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateEventSubscription API operation for Amazon Redshift. -// -// Creates an Amazon Redshift event notification subscription. This action requires -// an ARN (Amazon Resource Name) of an Amazon SNS topic created by either the -// Amazon Redshift console, the Amazon SNS console, or the Amazon SNS API. To -// obtain an ARN with Amazon SNS, you must create a topic in Amazon SNS and -// subscribe to the topic. The ARN is displayed in the SNS console. -// -// You can specify the source type, and lists of Amazon Redshift source IDs, -// event categories, and event severities. Notifications will be sent for all -// events you want that match those criteria. For example, you can specify source -// type = cluster, source ID = my-cluster-1 and mycluster2, event categories -// = Availability, Backup, and severity = ERROR. The subscription will only -// send notifications for those ERROR events in the Availability and Backup -// categories for the specified clusters. -// -// If you specify both the source type and source IDs, such as source type = -// cluster and source identifier = my-cluster-1, notifications will be sent -// for all the cluster events for my-cluster-1. If you specify a source type -// but do not specify a source identifier, you will receive notice of the events -// for the objects of that type in your AWS account. If you do not specify either -// the SourceType nor the SourceIdentifier, you will be notified of events generated -// from all Amazon Redshift sources belonging to your AWS account. You must -// specify a source type if you specify a source ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation CreateEventSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeEventSubscriptionQuotaExceededFault "EventSubscriptionQuotaExceeded" -// The request would exceed the allowed number of event subscriptions for this -// account. For information about increasing your quota, go to Limits in Amazon -// Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeSubscriptionAlreadyExistFault "SubscriptionAlreadyExist" -// There is already an existing event notification subscription with the specified -// name. -// -// * ErrCodeSNSInvalidTopicFault "SNSInvalidTopic" -// Amazon SNS has responded that there is a problem with the specified Amazon -// SNS topic. -// -// * ErrCodeSNSNoAuthorizationFault "SNSNoAuthorization" -// You do not have permission to publish to the specified Amazon SNS topic. -// -// * ErrCodeSNSTopicArnNotFoundFault "SNSTopicArnNotFound" -// An Amazon SNS topic with the specified Amazon Resource Name (ARN) does not -// exist. -// -// * ErrCodeSubscriptionEventIdNotFoundFault "SubscriptionEventIdNotFound" -// An Amazon Redshift event with the specified event ID does not exist. -// -// * ErrCodeSubscriptionCategoryNotFoundFault "SubscriptionCategoryNotFound" -// The value specified for the event category was not one of the allowed values, -// or it specified a category that does not apply to the specified source type. -// The allowed values are Configuration, Management, Monitoring, and Security. -// -// * ErrCodeSubscriptionSeverityNotFoundFault "SubscriptionSeverityNotFound" -// The value specified for the event severity was not one of the allowed values, -// or it specified a severity that does not apply to the specified source type. -// The allowed values are ERROR and INFO. -// -// * ErrCodeSourceNotFoundFault "SourceNotFound" -// The specified Amazon Redshift event source could not be found. -// -// * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// You have exceeded the number of tags allowed. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateEventSubscription -func (c *Redshift) CreateEventSubscription(input *CreateEventSubscriptionInput) (*CreateEventSubscriptionOutput, error) { - req, out := c.CreateEventSubscriptionRequest(input) - return out, req.Send() -} - -// CreateEventSubscriptionWithContext is the same as CreateEventSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See CreateEventSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) CreateEventSubscriptionWithContext(ctx aws.Context, input *CreateEventSubscriptionInput, opts ...request.Option) (*CreateEventSubscriptionOutput, error) { - req, out := c.CreateEventSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateHsmClientCertificate = "CreateHsmClientCertificate" - -// CreateHsmClientCertificateRequest generates a "aws/request.Request" representing the -// client's request for the CreateHsmClientCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateHsmClientCertificate for more information on using the CreateHsmClientCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateHsmClientCertificateRequest method. -// req, resp := client.CreateHsmClientCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateHsmClientCertificate -func (c *Redshift) CreateHsmClientCertificateRequest(input *CreateHsmClientCertificateInput) (req *request.Request, output *CreateHsmClientCertificateOutput) { - op := &request.Operation{ - Name: opCreateHsmClientCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateHsmClientCertificateInput{} - } - - output = &CreateHsmClientCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateHsmClientCertificate API operation for Amazon Redshift. -// -// Creates an HSM client certificate that an Amazon Redshift cluster will use -// to connect to the client's HSM in order to store and retrieve the keys used -// to encrypt the cluster databases. -// -// The command returns a public key, which you must store in the HSM. In addition -// to creating the HSM certificate, you must create an Amazon Redshift HSM configuration -// that provides a cluster the information needed to store and use encryption -// keys in the HSM. For more information, go to Hardware Security Modules (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-HSM.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation CreateHsmClientCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeHsmClientCertificateAlreadyExistsFault "HsmClientCertificateAlreadyExistsFault" -// There is already an existing Amazon Redshift HSM client certificate with -// the specified identifier. -// -// * ErrCodeHsmClientCertificateQuotaExceededFault "HsmClientCertificateQuotaExceededFault" -// The quota for HSM client certificates has been reached. For information about -// increasing your quota, go to Limits in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// You have exceeded the number of tags allowed. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateHsmClientCertificate -func (c *Redshift) CreateHsmClientCertificate(input *CreateHsmClientCertificateInput) (*CreateHsmClientCertificateOutput, error) { - req, out := c.CreateHsmClientCertificateRequest(input) - return out, req.Send() -} - -// CreateHsmClientCertificateWithContext is the same as CreateHsmClientCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See CreateHsmClientCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) CreateHsmClientCertificateWithContext(ctx aws.Context, input *CreateHsmClientCertificateInput, opts ...request.Option) (*CreateHsmClientCertificateOutput, error) { - req, out := c.CreateHsmClientCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateHsmConfiguration = "CreateHsmConfiguration" - -// CreateHsmConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the CreateHsmConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateHsmConfiguration for more information on using the CreateHsmConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateHsmConfigurationRequest method. -// req, resp := client.CreateHsmConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateHsmConfiguration -func (c *Redshift) CreateHsmConfigurationRequest(input *CreateHsmConfigurationInput) (req *request.Request, output *CreateHsmConfigurationOutput) { - op := &request.Operation{ - Name: opCreateHsmConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateHsmConfigurationInput{} - } - - output = &CreateHsmConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateHsmConfiguration API operation for Amazon Redshift. -// -// Creates an HSM configuration that contains the information required by an -// Amazon Redshift cluster to store and use database encryption keys in a Hardware -// Security Module (HSM). After creating the HSM configuration, you can specify -// it as a parameter when creating a cluster. The cluster will then store its -// encryption keys in the HSM. -// -// In addition to creating an HSM configuration, you must also create an HSM -// client certificate. For more information, go to Hardware Security Modules -// (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-HSM.html) in -// the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation CreateHsmConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeHsmConfigurationAlreadyExistsFault "HsmConfigurationAlreadyExistsFault" -// There is already an existing Amazon Redshift HSM configuration with the specified -// identifier. -// -// * ErrCodeHsmConfigurationQuotaExceededFault "HsmConfigurationQuotaExceededFault" -// The quota for HSM configurations has been reached. For information about -// increasing your quota, go to Limits in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// You have exceeded the number of tags allowed. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateHsmConfiguration -func (c *Redshift) CreateHsmConfiguration(input *CreateHsmConfigurationInput) (*CreateHsmConfigurationOutput, error) { - req, out := c.CreateHsmConfigurationRequest(input) - return out, req.Send() -} - -// CreateHsmConfigurationWithContext is the same as CreateHsmConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See CreateHsmConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) CreateHsmConfigurationWithContext(ctx aws.Context, input *CreateHsmConfigurationInput, opts ...request.Option) (*CreateHsmConfigurationOutput, error) { - req, out := c.CreateHsmConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSnapshotCopyGrant = "CreateSnapshotCopyGrant" - -// CreateSnapshotCopyGrantRequest generates a "aws/request.Request" representing the -// client's request for the CreateSnapshotCopyGrant operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSnapshotCopyGrant for more information on using the CreateSnapshotCopyGrant -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSnapshotCopyGrantRequest method. -// req, resp := client.CreateSnapshotCopyGrantRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateSnapshotCopyGrant -func (c *Redshift) CreateSnapshotCopyGrantRequest(input *CreateSnapshotCopyGrantInput) (req *request.Request, output *CreateSnapshotCopyGrantOutput) { - op := &request.Operation{ - Name: opCreateSnapshotCopyGrant, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSnapshotCopyGrantInput{} - } - - output = &CreateSnapshotCopyGrantOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSnapshotCopyGrant API operation for Amazon Redshift. -// -// Creates a snapshot copy grant that permits Amazon Redshift to use a customer -// master key (CMK) from AWS Key Management Service (AWS KMS) to encrypt copied -// snapshots in a destination region. -// -// For more information about managing snapshot copy grants, go to Amazon Redshift -// Database Encryption (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation CreateSnapshotCopyGrant for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSnapshotCopyGrantAlreadyExistsFault "SnapshotCopyGrantAlreadyExistsFault" -// The snapshot copy grant can't be created because a grant with the same name -// already exists. -// -// * ErrCodeSnapshotCopyGrantQuotaExceededFault "SnapshotCopyGrantQuotaExceededFault" -// The AWS account has exceeded the maximum number of snapshot copy grants in -// this region. -// -// * ErrCodeLimitExceededFault "LimitExceededFault" -// The encryption key has exceeded its grant limit in AWS KMS. -// -// * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// You have exceeded the number of tags allowed. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// * ErrCodeDependentServiceRequestThrottlingFault "DependentServiceRequestThrottlingFault" -// The request cannot be completed because a dependent service is throttling -// requests made by Amazon Redshift on your behalf. Wait and retry the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateSnapshotCopyGrant -func (c *Redshift) CreateSnapshotCopyGrant(input *CreateSnapshotCopyGrantInput) (*CreateSnapshotCopyGrantOutput, error) { - req, out := c.CreateSnapshotCopyGrantRequest(input) - return out, req.Send() -} - -// CreateSnapshotCopyGrantWithContext is the same as CreateSnapshotCopyGrant with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSnapshotCopyGrant for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) CreateSnapshotCopyGrantWithContext(ctx aws.Context, input *CreateSnapshotCopyGrantInput, opts ...request.Option) (*CreateSnapshotCopyGrantOutput, error) { - req, out := c.CreateSnapshotCopyGrantRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSnapshotSchedule = "CreateSnapshotSchedule" - -// CreateSnapshotScheduleRequest generates a "aws/request.Request" representing the -// client's request for the CreateSnapshotSchedule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSnapshotSchedule for more information on using the CreateSnapshotSchedule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSnapshotScheduleRequest method. -// req, resp := client.CreateSnapshotScheduleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateSnapshotSchedule -func (c *Redshift) CreateSnapshotScheduleRequest(input *CreateSnapshotScheduleInput) (req *request.Request, output *CreateSnapshotScheduleOutput) { - op := &request.Operation{ - Name: opCreateSnapshotSchedule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSnapshotScheduleInput{} - } - - output = &CreateSnapshotScheduleOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSnapshotSchedule API operation for Amazon Redshift. -// -// Creates a new snapshot schedule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation CreateSnapshotSchedule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSnapshotScheduleAlreadyExistsFault "SnapshotScheduleAlreadyExists" -// The specified snapshot schedule already exists. -// -// * ErrCodeInvalidScheduleFault "InvalidSchedule" -// The schedule you submitted isn't valid. -// -// * ErrCodeSnapshotScheduleQuotaExceededFault "SnapshotScheduleQuotaExceeded" -// You have exceeded the quota of snapshot schedules. -// -// * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// You have exceeded the number of tags allowed. -// -// * ErrCodeScheduleDefinitionTypeUnsupportedFault "ScheduleDefinitionTypeUnsupported" -// The definition you submitted is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateSnapshotSchedule -func (c *Redshift) CreateSnapshotSchedule(input *CreateSnapshotScheduleInput) (*CreateSnapshotScheduleOutput, error) { - req, out := c.CreateSnapshotScheduleRequest(input) - return out, req.Send() -} - -// CreateSnapshotScheduleWithContext is the same as CreateSnapshotSchedule with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSnapshotSchedule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) CreateSnapshotScheduleWithContext(ctx aws.Context, input *CreateSnapshotScheduleInput, opts ...request.Option) (*CreateSnapshotScheduleOutput, error) { - req, out := c.CreateSnapshotScheduleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTags = "CreateTags" - -// CreateTagsRequest generates a "aws/request.Request" representing the -// client's request for the CreateTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTags for more information on using the CreateTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTagsRequest method. -// req, resp := client.CreateTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateTags -func (c *Redshift) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) { - op := &request.Operation{ - Name: opCreateTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTagsInput{} - } - - output = &CreateTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateTags API operation for Amazon Redshift. -// -// Adds one or more tags to a specified resource. -// -// A resource can have up to 50 tags. If you try to create more than 50 tags -// for a resource, you will receive an error and the attempt will fail. -// -// If you specify a key that already exists for the resource, the value for -// that key will be updated with the new value. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation CreateTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// You have exceeded the number of tags allowed. -// -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateTags -func (c *Redshift) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) { - req, out := c.CreateTagsRequest(input) - return out, req.Send() -} - -// CreateTagsWithContext is the same as CreateTags with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opts ...request.Option) (*CreateTagsOutput, error) { - req, out := c.CreateTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCluster = "DeleteCluster" - -// DeleteClusterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCluster for more information on using the DeleteCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteClusterRequest method. -// req, resp := client.DeleteClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteCluster -func (c *Redshift) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) { - op := &request.Operation{ - Name: opDeleteCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteClusterInput{} - } - - output = &DeleteClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteCluster API operation for Amazon Redshift. -// -// Deletes a previously provisioned cluster. A successful response from the -// web service indicates that the request was received correctly. Use DescribeClusters -// to monitor the status of the deletion. The delete operation cannot be canceled -// or reverted once submitted. For more information about managing clusters, -// go to Amazon Redshift Clusters (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) -// in the Amazon Redshift Cluster Management Guide. -// -// If you want to shut down the cluster and retain it for future use, set SkipFinalClusterSnapshot -// to false and specify a name for FinalClusterSnapshotIdentifier. You can later -// restore this snapshot to resume using the cluster. If a final cluster snapshot -// is requested, the status of the cluster will be "final-snapshot" while the -// snapshot is being taken, then it's "deleting" once Amazon Redshift begins -// deleting the cluster. -// -// For more information about managing clusters, go to Amazon Redshift Clusters -// (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DeleteCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterState" -// The specified cluster is not in the available state. -// -// * ErrCodeClusterSnapshotAlreadyExistsFault "ClusterSnapshotAlreadyExists" -// The value specified as a snapshot identifier is already used by an existing -// snapshot. -// -// * ErrCodeClusterSnapshotQuotaExceededFault "ClusterSnapshotQuotaExceeded" -// The request would result in the user exceeding the allowed number of cluster -// snapshots. -// -// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" -// The retention period specified is either in the past or is not a valid value. -// -// The value must be either -1 or an integer between 1 and 3,653. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteCluster -func (c *Redshift) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) { - req, out := c.DeleteClusterRequest(input) - return out, req.Send() -} - -// DeleteClusterWithContext is the same as DeleteCluster with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) { - req, out := c.DeleteClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteClusterParameterGroup = "DeleteClusterParameterGroup" - -// DeleteClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteClusterParameterGroup for more information on using the DeleteClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteClusterParameterGroupRequest method. -// req, resp := client.DeleteClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteClusterParameterGroup -func (c *Redshift) DeleteClusterParameterGroupRequest(input *DeleteClusterParameterGroupInput) (req *request.Request, output *DeleteClusterParameterGroupOutput) { - op := &request.Operation{ - Name: opDeleteClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteClusterParameterGroupInput{} - } - - output = &DeleteClusterParameterGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteClusterParameterGroup API operation for Amazon Redshift. -// -// Deletes a specified Amazon Redshift parameter group. -// -// You cannot delete a parameter group if it is associated with a cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DeleteClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidClusterParameterGroupStateFault "InvalidClusterParameterGroupState" -// The cluster parameter group action can not be completed because another task -// is in progress that involves the parameter group. Wait a few moments and -// try the operation again. -// -// * ErrCodeClusterParameterGroupNotFoundFault "ClusterParameterGroupNotFound" -// The parameter group name does not refer to an existing parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteClusterParameterGroup -func (c *Redshift) DeleteClusterParameterGroup(input *DeleteClusterParameterGroupInput) (*DeleteClusterParameterGroupOutput, error) { - req, out := c.DeleteClusterParameterGroupRequest(input) - return out, req.Send() -} - -// DeleteClusterParameterGroupWithContext is the same as DeleteClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DeleteClusterParameterGroupWithContext(ctx aws.Context, input *DeleteClusterParameterGroupInput, opts ...request.Option) (*DeleteClusterParameterGroupOutput, error) { - req, out := c.DeleteClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteClusterSecurityGroup = "DeleteClusterSecurityGroup" - -// DeleteClusterSecurityGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteClusterSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteClusterSecurityGroup for more information on using the DeleteClusterSecurityGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteClusterSecurityGroupRequest method. -// req, resp := client.DeleteClusterSecurityGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteClusterSecurityGroup -func (c *Redshift) DeleteClusterSecurityGroupRequest(input *DeleteClusterSecurityGroupInput) (req *request.Request, output *DeleteClusterSecurityGroupOutput) { - op := &request.Operation{ - Name: opDeleteClusterSecurityGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteClusterSecurityGroupInput{} - } - - output = &DeleteClusterSecurityGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteClusterSecurityGroup API operation for Amazon Redshift. -// -// Deletes an Amazon Redshift security group. -// -// You cannot delete a security group that is associated with any clusters. -// You cannot delete the default security group. -// -// For information about managing security groups, go to Amazon Redshift Cluster -// Security Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DeleteClusterSecurityGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidClusterSecurityGroupStateFault "InvalidClusterSecurityGroupState" -// The state of the cluster security group is not available. -// -// * ErrCodeClusterSecurityGroupNotFoundFault "ClusterSecurityGroupNotFound" -// The cluster security group name does not refer to an existing cluster security -// group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteClusterSecurityGroup -func (c *Redshift) DeleteClusterSecurityGroup(input *DeleteClusterSecurityGroupInput) (*DeleteClusterSecurityGroupOutput, error) { - req, out := c.DeleteClusterSecurityGroupRequest(input) - return out, req.Send() -} - -// DeleteClusterSecurityGroupWithContext is the same as DeleteClusterSecurityGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteClusterSecurityGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DeleteClusterSecurityGroupWithContext(ctx aws.Context, input *DeleteClusterSecurityGroupInput, opts ...request.Option) (*DeleteClusterSecurityGroupOutput, error) { - req, out := c.DeleteClusterSecurityGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteClusterSnapshot = "DeleteClusterSnapshot" - -// DeleteClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the DeleteClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteClusterSnapshot for more information on using the DeleteClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteClusterSnapshotRequest method. -// req, resp := client.DeleteClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteClusterSnapshot -func (c *Redshift) DeleteClusterSnapshotRequest(input *DeleteClusterSnapshotInput) (req *request.Request, output *DeleteClusterSnapshotOutput) { - op := &request.Operation{ - Name: opDeleteClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteClusterSnapshotInput{} - } - - output = &DeleteClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteClusterSnapshot API operation for Amazon Redshift. -// -// Deletes the specified manual snapshot. The snapshot must be in the available -// state, with no other users authorized to access the snapshot. -// -// Unlike automated snapshots, manual snapshots are retained even after you -// delete your cluster. Amazon Redshift does not delete your manual snapshots. -// You must delete manual snapshot explicitly to avoid getting charged. If other -// accounts are authorized to access the snapshot, you must revoke all of the -// authorizations before you can delete the snapshot. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DeleteClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidClusterSnapshotStateFault "InvalidClusterSnapshotState" -// The specified cluster snapshot is not in the available state, or other accounts -// are authorized to access the snapshot. -// -// * ErrCodeClusterSnapshotNotFoundFault "ClusterSnapshotNotFound" -// The snapshot identifier does not refer to an existing cluster snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteClusterSnapshot -func (c *Redshift) DeleteClusterSnapshot(input *DeleteClusterSnapshotInput) (*DeleteClusterSnapshotOutput, error) { - req, out := c.DeleteClusterSnapshotRequest(input) - return out, req.Send() -} - -// DeleteClusterSnapshotWithContext is the same as DeleteClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DeleteClusterSnapshotWithContext(ctx aws.Context, input *DeleteClusterSnapshotInput, opts ...request.Option) (*DeleteClusterSnapshotOutput, error) { - req, out := c.DeleteClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteClusterSubnetGroup = "DeleteClusterSubnetGroup" - -// DeleteClusterSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteClusterSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteClusterSubnetGroup for more information on using the DeleteClusterSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteClusterSubnetGroupRequest method. -// req, resp := client.DeleteClusterSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteClusterSubnetGroup -func (c *Redshift) DeleteClusterSubnetGroupRequest(input *DeleteClusterSubnetGroupInput) (req *request.Request, output *DeleteClusterSubnetGroupOutput) { - op := &request.Operation{ - Name: opDeleteClusterSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteClusterSubnetGroupInput{} - } - - output = &DeleteClusterSubnetGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteClusterSubnetGroup API operation for Amazon Redshift. -// -// Deletes the specified cluster subnet group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DeleteClusterSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidClusterSubnetGroupStateFault "InvalidClusterSubnetGroupStateFault" -// The cluster subnet group cannot be deleted because it is in use. -// -// * ErrCodeInvalidClusterSubnetStateFault "InvalidClusterSubnetStateFault" -// The state of the subnet is invalid. -// -// * ErrCodeClusterSubnetGroupNotFoundFault "ClusterSubnetGroupNotFoundFault" -// The cluster subnet group name does not refer to an existing cluster subnet -// group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteClusterSubnetGroup -func (c *Redshift) DeleteClusterSubnetGroup(input *DeleteClusterSubnetGroupInput) (*DeleteClusterSubnetGroupOutput, error) { - req, out := c.DeleteClusterSubnetGroupRequest(input) - return out, req.Send() -} - -// DeleteClusterSubnetGroupWithContext is the same as DeleteClusterSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteClusterSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DeleteClusterSubnetGroupWithContext(ctx aws.Context, input *DeleteClusterSubnetGroupInput, opts ...request.Option) (*DeleteClusterSubnetGroupOutput, error) { - req, out := c.DeleteClusterSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEventSubscription = "DeleteEventSubscription" - -// DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEventSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEventSubscription for more information on using the DeleteEventSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEventSubscriptionRequest method. -// req, resp := client.DeleteEventSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteEventSubscription -func (c *Redshift) DeleteEventSubscriptionRequest(input *DeleteEventSubscriptionInput) (req *request.Request, output *DeleteEventSubscriptionOutput) { - op := &request.Operation{ - Name: opDeleteEventSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteEventSubscriptionInput{} - } - - output = &DeleteEventSubscriptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteEventSubscription API operation for Amazon Redshift. -// -// Deletes an Amazon Redshift event notification subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DeleteEventSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" -// An Amazon Redshift event notification subscription with the specified name -// does not exist. -// -// * ErrCodeInvalidSubscriptionStateFault "InvalidSubscriptionStateFault" -// The subscription request is invalid because it is a duplicate request. This -// subscription request is already in progress. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteEventSubscription -func (c *Redshift) DeleteEventSubscription(input *DeleteEventSubscriptionInput) (*DeleteEventSubscriptionOutput, error) { - req, out := c.DeleteEventSubscriptionRequest(input) - return out, req.Send() -} - -// DeleteEventSubscriptionWithContext is the same as DeleteEventSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEventSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DeleteEventSubscriptionWithContext(ctx aws.Context, input *DeleteEventSubscriptionInput, opts ...request.Option) (*DeleteEventSubscriptionOutput, error) { - req, out := c.DeleteEventSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteHsmClientCertificate = "DeleteHsmClientCertificate" - -// DeleteHsmClientCertificateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteHsmClientCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteHsmClientCertificate for more information on using the DeleteHsmClientCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteHsmClientCertificateRequest method. -// req, resp := client.DeleteHsmClientCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteHsmClientCertificate -func (c *Redshift) DeleteHsmClientCertificateRequest(input *DeleteHsmClientCertificateInput) (req *request.Request, output *DeleteHsmClientCertificateOutput) { - op := &request.Operation{ - Name: opDeleteHsmClientCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteHsmClientCertificateInput{} - } - - output = &DeleteHsmClientCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteHsmClientCertificate API operation for Amazon Redshift. -// -// Deletes the specified HSM client certificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DeleteHsmClientCertificate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidHsmClientCertificateStateFault "InvalidHsmClientCertificateStateFault" -// The specified HSM client certificate is not in the available state, or it -// is still in use by one or more Amazon Redshift clusters. -// -// * ErrCodeHsmClientCertificateNotFoundFault "HsmClientCertificateNotFoundFault" -// There is no Amazon Redshift HSM client certificate with the specified identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteHsmClientCertificate -func (c *Redshift) DeleteHsmClientCertificate(input *DeleteHsmClientCertificateInput) (*DeleteHsmClientCertificateOutput, error) { - req, out := c.DeleteHsmClientCertificateRequest(input) - return out, req.Send() -} - -// DeleteHsmClientCertificateWithContext is the same as DeleteHsmClientCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteHsmClientCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DeleteHsmClientCertificateWithContext(ctx aws.Context, input *DeleteHsmClientCertificateInput, opts ...request.Option) (*DeleteHsmClientCertificateOutput, error) { - req, out := c.DeleteHsmClientCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteHsmConfiguration = "DeleteHsmConfiguration" - -// DeleteHsmConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteHsmConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteHsmConfiguration for more information on using the DeleteHsmConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteHsmConfigurationRequest method. -// req, resp := client.DeleteHsmConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteHsmConfiguration -func (c *Redshift) DeleteHsmConfigurationRequest(input *DeleteHsmConfigurationInput) (req *request.Request, output *DeleteHsmConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteHsmConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteHsmConfigurationInput{} - } - - output = &DeleteHsmConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteHsmConfiguration API operation for Amazon Redshift. -// -// Deletes the specified Amazon Redshift HSM configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DeleteHsmConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidHsmConfigurationStateFault "InvalidHsmConfigurationStateFault" -// The specified HSM configuration is not in the available state, or it is still -// in use by one or more Amazon Redshift clusters. -// -// * ErrCodeHsmConfigurationNotFoundFault "HsmConfigurationNotFoundFault" -// There is no Amazon Redshift HSM configuration with the specified identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteHsmConfiguration -func (c *Redshift) DeleteHsmConfiguration(input *DeleteHsmConfigurationInput) (*DeleteHsmConfigurationOutput, error) { - req, out := c.DeleteHsmConfigurationRequest(input) - return out, req.Send() -} - -// DeleteHsmConfigurationWithContext is the same as DeleteHsmConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteHsmConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DeleteHsmConfigurationWithContext(ctx aws.Context, input *DeleteHsmConfigurationInput, opts ...request.Option) (*DeleteHsmConfigurationOutput, error) { - req, out := c.DeleteHsmConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSnapshotCopyGrant = "DeleteSnapshotCopyGrant" - -// DeleteSnapshotCopyGrantRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSnapshotCopyGrant operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSnapshotCopyGrant for more information on using the DeleteSnapshotCopyGrant -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSnapshotCopyGrantRequest method. -// req, resp := client.DeleteSnapshotCopyGrantRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteSnapshotCopyGrant -func (c *Redshift) DeleteSnapshotCopyGrantRequest(input *DeleteSnapshotCopyGrantInput) (req *request.Request, output *DeleteSnapshotCopyGrantOutput) { - op := &request.Operation{ - Name: opDeleteSnapshotCopyGrant, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSnapshotCopyGrantInput{} - } - - output = &DeleteSnapshotCopyGrantOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSnapshotCopyGrant API operation for Amazon Redshift. -// -// Deletes the specified snapshot copy grant. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DeleteSnapshotCopyGrant for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidSnapshotCopyGrantStateFault "InvalidSnapshotCopyGrantStateFault" -// The snapshot copy grant can't be deleted because it is used by one or more -// clusters. -// -// * ErrCodeSnapshotCopyGrantNotFoundFault "SnapshotCopyGrantNotFoundFault" -// The specified snapshot copy grant can't be found. Make sure that the name -// is typed correctly and that the grant exists in the destination region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteSnapshotCopyGrant -func (c *Redshift) DeleteSnapshotCopyGrant(input *DeleteSnapshotCopyGrantInput) (*DeleteSnapshotCopyGrantOutput, error) { - req, out := c.DeleteSnapshotCopyGrantRequest(input) - return out, req.Send() -} - -// DeleteSnapshotCopyGrantWithContext is the same as DeleteSnapshotCopyGrant with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSnapshotCopyGrant for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DeleteSnapshotCopyGrantWithContext(ctx aws.Context, input *DeleteSnapshotCopyGrantInput, opts ...request.Option) (*DeleteSnapshotCopyGrantOutput, error) { - req, out := c.DeleteSnapshotCopyGrantRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSnapshotSchedule = "DeleteSnapshotSchedule" - -// DeleteSnapshotScheduleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSnapshotSchedule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSnapshotSchedule for more information on using the DeleteSnapshotSchedule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSnapshotScheduleRequest method. -// req, resp := client.DeleteSnapshotScheduleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteSnapshotSchedule -func (c *Redshift) DeleteSnapshotScheduleRequest(input *DeleteSnapshotScheduleInput) (req *request.Request, output *DeleteSnapshotScheduleOutput) { - op := &request.Operation{ - Name: opDeleteSnapshotSchedule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSnapshotScheduleInput{} - } - - output = &DeleteSnapshotScheduleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSnapshotSchedule API operation for Amazon Redshift. -// -// Deletes a snapshot schedule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DeleteSnapshotSchedule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidClusterSnapshotScheduleStateFault "InvalidClusterSnapshotScheduleState" -// The cluster snapshot schedule state is not valid. -// -// * ErrCodeSnapshotScheduleNotFoundFault "SnapshotScheduleNotFound" -// We could not find the specified snapshot schedule. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteSnapshotSchedule -func (c *Redshift) DeleteSnapshotSchedule(input *DeleteSnapshotScheduleInput) (*DeleteSnapshotScheduleOutput, error) { - req, out := c.DeleteSnapshotScheduleRequest(input) - return out, req.Send() -} - -// DeleteSnapshotScheduleWithContext is the same as DeleteSnapshotSchedule with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSnapshotSchedule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DeleteSnapshotScheduleWithContext(ctx aws.Context, input *DeleteSnapshotScheduleInput, opts ...request.Option) (*DeleteSnapshotScheduleOutput, error) { - req, out := c.DeleteSnapshotScheduleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTags = "DeleteTags" - -// DeleteTagsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTags for more information on using the DeleteTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTagsRequest method. -// req, resp := client.DeleteTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteTags -func (c *Redshift) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { - op := &request.Operation{ - Name: opDeleteTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTagsInput{} - } - - output = &DeleteTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTags API operation for Amazon Redshift. -// -// Deletes a tag or tags from a resource. You must provide the ARN of the resource -// from which you want to delete the tag or tags. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DeleteTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteTags -func (c *Redshift) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - return out, req.Send() -} - -// DeleteTagsWithContext is the same as DeleteTags with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccountAttributes = "DescribeAccountAttributes" - -// DescribeAccountAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccountAttributes for more information on using the DescribeAccountAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAccountAttributesRequest method. -// req, resp := client.DescribeAccountAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeAccountAttributes -func (c *Redshift) DescribeAccountAttributesRequest(input *DescribeAccountAttributesInput) (req *request.Request, output *DescribeAccountAttributesOutput) { - op := &request.Operation{ - Name: opDescribeAccountAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAccountAttributesInput{} - } - - output = &DescribeAccountAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccountAttributes API operation for Amazon Redshift. -// -// Returns a list of attributes attached to an account -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeAccountAttributes for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeAccountAttributes -func (c *Redshift) DescribeAccountAttributes(input *DescribeAccountAttributesInput) (*DescribeAccountAttributesOutput, error) { - req, out := c.DescribeAccountAttributesRequest(input) - return out, req.Send() -} - -// DescribeAccountAttributesWithContext is the same as DescribeAccountAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeAccountAttributesWithContext(ctx aws.Context, input *DescribeAccountAttributesInput, opts ...request.Option) (*DescribeAccountAttributesOutput, error) { - req, out := c.DescribeAccountAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeClusterDbRevisions = "DescribeClusterDbRevisions" - -// DescribeClusterDbRevisionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClusterDbRevisions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClusterDbRevisions for more information on using the DescribeClusterDbRevisions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClusterDbRevisionsRequest method. -// req, resp := client.DescribeClusterDbRevisionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterDbRevisions -func (c *Redshift) DescribeClusterDbRevisionsRequest(input *DescribeClusterDbRevisionsInput) (req *request.Request, output *DescribeClusterDbRevisionsOutput) { - op := &request.Operation{ - Name: opDescribeClusterDbRevisions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeClusterDbRevisionsInput{} - } - - output = &DescribeClusterDbRevisionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClusterDbRevisions API operation for Amazon Redshift. -// -// Returns an array of ClusterDbRevision objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeClusterDbRevisions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterState" -// The specified cluster is not in the available state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterDbRevisions -func (c *Redshift) DescribeClusterDbRevisions(input *DescribeClusterDbRevisionsInput) (*DescribeClusterDbRevisionsOutput, error) { - req, out := c.DescribeClusterDbRevisionsRequest(input) - return out, req.Send() -} - -// DescribeClusterDbRevisionsWithContext is the same as DescribeClusterDbRevisions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClusterDbRevisions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClusterDbRevisionsWithContext(ctx aws.Context, input *DescribeClusterDbRevisionsInput, opts ...request.Option) (*DescribeClusterDbRevisionsOutput, error) { - req, out := c.DescribeClusterDbRevisionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeClusterParameterGroups = "DescribeClusterParameterGroups" - -// DescribeClusterParameterGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClusterParameterGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClusterParameterGroups for more information on using the DescribeClusterParameterGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClusterParameterGroupsRequest method. -// req, resp := client.DescribeClusterParameterGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterParameterGroups -func (c *Redshift) DescribeClusterParameterGroupsRequest(input *DescribeClusterParameterGroupsInput) (req *request.Request, output *DescribeClusterParameterGroupsOutput) { - op := &request.Operation{ - Name: opDescribeClusterParameterGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeClusterParameterGroupsInput{} - } - - output = &DescribeClusterParameterGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClusterParameterGroups API operation for Amazon Redshift. -// -// Returns a list of Amazon Redshift parameter groups, including parameter groups -// you created and the default parameter group. For each parameter group, the -// response includes the parameter group name, description, and parameter group -// family name. You can optionally specify a name to retrieve the description -// of a specific parameter group. -// -// For more information about parameters and parameter groups, go to Amazon -// Redshift Parameter Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) -// in the Amazon Redshift Cluster Management Guide. -// -// If you specify both tag keys and tag values in the same request, Amazon Redshift -// returns all parameter groups that match any combination of the specified -// keys and values. For example, if you have owner and environment for tag keys, -// and admin and test for tag values, all parameter groups that have any combination -// of those values are returned. -// -// If both tag keys and values are omitted from the request, parameter groups -// are returned regardless of whether they have tag keys or values associated -// with them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeClusterParameterGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterParameterGroupNotFoundFault "ClusterParameterGroupNotFound" -// The parameter group name does not refer to an existing parameter group. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterParameterGroups -func (c *Redshift) DescribeClusterParameterGroups(input *DescribeClusterParameterGroupsInput) (*DescribeClusterParameterGroupsOutput, error) { - req, out := c.DescribeClusterParameterGroupsRequest(input) - return out, req.Send() -} - -// DescribeClusterParameterGroupsWithContext is the same as DescribeClusterParameterGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClusterParameterGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClusterParameterGroupsWithContext(ctx aws.Context, input *DescribeClusterParameterGroupsInput, opts ...request.Option) (*DescribeClusterParameterGroupsOutput, error) { - req, out := c.DescribeClusterParameterGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeClusterParameterGroupsPages iterates over the pages of a DescribeClusterParameterGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeClusterParameterGroups 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 DescribeClusterParameterGroups operation. -// pageNum := 0 -// err := client.DescribeClusterParameterGroupsPages(params, -// func(page *DescribeClusterParameterGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeClusterParameterGroupsPages(input *DescribeClusterParameterGroupsInput, fn func(*DescribeClusterParameterGroupsOutput, bool) bool) error { - return c.DescribeClusterParameterGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeClusterParameterGroupsPagesWithContext same as DescribeClusterParameterGroupsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClusterParameterGroupsPagesWithContext(ctx aws.Context, input *DescribeClusterParameterGroupsInput, fn func(*DescribeClusterParameterGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeClusterParameterGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClusterParameterGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClusterParameterGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeClusterParameters = "DescribeClusterParameters" - -// DescribeClusterParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClusterParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClusterParameters for more information on using the DescribeClusterParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClusterParametersRequest method. -// req, resp := client.DescribeClusterParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterParameters -func (c *Redshift) DescribeClusterParametersRequest(input *DescribeClusterParametersInput) (req *request.Request, output *DescribeClusterParametersOutput) { - op := &request.Operation{ - Name: opDescribeClusterParameters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeClusterParametersInput{} - } - - output = &DescribeClusterParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClusterParameters API operation for Amazon Redshift. -// -// Returns a detailed list of parameters contained within the specified Amazon -// Redshift parameter group. For each parameter the response includes information -// such as parameter name, description, data type, value, whether the parameter -// value is modifiable, and so on. -// -// You can specify source filter to retrieve parameters of only specific type. -// For example, to retrieve parameters that were modified by a user action such -// as from ModifyClusterParameterGroup, you can specify source equal to user. -// -// For more information about parameters and parameter groups, go to Amazon -// Redshift Parameter Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeClusterParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterParameterGroupNotFoundFault "ClusterParameterGroupNotFound" -// The parameter group name does not refer to an existing parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterParameters -func (c *Redshift) DescribeClusterParameters(input *DescribeClusterParametersInput) (*DescribeClusterParametersOutput, error) { - req, out := c.DescribeClusterParametersRequest(input) - return out, req.Send() -} - -// DescribeClusterParametersWithContext is the same as DescribeClusterParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClusterParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClusterParametersWithContext(ctx aws.Context, input *DescribeClusterParametersInput, opts ...request.Option) (*DescribeClusterParametersOutput, error) { - req, out := c.DescribeClusterParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeClusterParametersPages iterates over the pages of a DescribeClusterParameters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeClusterParameters 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 DescribeClusterParameters operation. -// pageNum := 0 -// err := client.DescribeClusterParametersPages(params, -// func(page *DescribeClusterParametersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeClusterParametersPages(input *DescribeClusterParametersInput, fn func(*DescribeClusterParametersOutput, bool) bool) error { - return c.DescribeClusterParametersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeClusterParametersPagesWithContext same as DescribeClusterParametersPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClusterParametersPagesWithContext(ctx aws.Context, input *DescribeClusterParametersInput, fn func(*DescribeClusterParametersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeClusterParametersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClusterParametersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClusterParametersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeClusterSecurityGroups = "DescribeClusterSecurityGroups" - -// DescribeClusterSecurityGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClusterSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClusterSecurityGroups for more information on using the DescribeClusterSecurityGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClusterSecurityGroupsRequest method. -// req, resp := client.DescribeClusterSecurityGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterSecurityGroups -func (c *Redshift) DescribeClusterSecurityGroupsRequest(input *DescribeClusterSecurityGroupsInput) (req *request.Request, output *DescribeClusterSecurityGroupsOutput) { - op := &request.Operation{ - Name: opDescribeClusterSecurityGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeClusterSecurityGroupsInput{} - } - - output = &DescribeClusterSecurityGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClusterSecurityGroups API operation for Amazon Redshift. -// -// Returns information about Amazon Redshift security groups. If the name of -// a security group is specified, the response will contain only information -// about only that security group. -// -// For information about managing security groups, go to Amazon Redshift Cluster -// Security Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html) -// in the Amazon Redshift Cluster Management Guide. -// -// If you specify both tag keys and tag values in the same request, Amazon Redshift -// returns all security groups that match any combination of the specified keys -// and values. For example, if you have owner and environment for tag keys, -// and admin and test for tag values, all security groups that have any combination -// of those values are returned. -// -// If both tag keys and values are omitted from the request, security groups -// are returned regardless of whether they have tag keys or values associated -// with them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeClusterSecurityGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterSecurityGroupNotFoundFault "ClusterSecurityGroupNotFound" -// The cluster security group name does not refer to an existing cluster security -// group. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterSecurityGroups -func (c *Redshift) DescribeClusterSecurityGroups(input *DescribeClusterSecurityGroupsInput) (*DescribeClusterSecurityGroupsOutput, error) { - req, out := c.DescribeClusterSecurityGroupsRequest(input) - return out, req.Send() -} - -// DescribeClusterSecurityGroupsWithContext is the same as DescribeClusterSecurityGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClusterSecurityGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClusterSecurityGroupsWithContext(ctx aws.Context, input *DescribeClusterSecurityGroupsInput, opts ...request.Option) (*DescribeClusterSecurityGroupsOutput, error) { - req, out := c.DescribeClusterSecurityGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeClusterSecurityGroupsPages iterates over the pages of a DescribeClusterSecurityGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeClusterSecurityGroups 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 DescribeClusterSecurityGroups operation. -// pageNum := 0 -// err := client.DescribeClusterSecurityGroupsPages(params, -// func(page *DescribeClusterSecurityGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeClusterSecurityGroupsPages(input *DescribeClusterSecurityGroupsInput, fn func(*DescribeClusterSecurityGroupsOutput, bool) bool) error { - return c.DescribeClusterSecurityGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeClusterSecurityGroupsPagesWithContext same as DescribeClusterSecurityGroupsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClusterSecurityGroupsPagesWithContext(ctx aws.Context, input *DescribeClusterSecurityGroupsInput, fn func(*DescribeClusterSecurityGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeClusterSecurityGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClusterSecurityGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClusterSecurityGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeClusterSnapshots = "DescribeClusterSnapshots" - -// DescribeClusterSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClusterSnapshots operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClusterSnapshots for more information on using the DescribeClusterSnapshots -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClusterSnapshotsRequest method. -// req, resp := client.DescribeClusterSnapshotsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterSnapshots -func (c *Redshift) DescribeClusterSnapshotsRequest(input *DescribeClusterSnapshotsInput) (req *request.Request, output *DescribeClusterSnapshotsOutput) { - op := &request.Operation{ - Name: opDescribeClusterSnapshots, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeClusterSnapshotsInput{} - } - - output = &DescribeClusterSnapshotsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClusterSnapshots API operation for Amazon Redshift. -// -// Returns one or more snapshot objects, which contain metadata about your cluster -// snapshots. By default, this operation returns information about all snapshots -// of all clusters that are owned by you AWS customer account. No information -// is returned for snapshots owned by inactive AWS customer accounts. -// -// If you specify both tag keys and tag values in the same request, Amazon Redshift -// returns all snapshots that match any combination of the specified keys and -// values. For example, if you have owner and environment for tag keys, and -// admin and test for tag values, all snapshots that have any combination of -// those values are returned. Only snapshots that you own are returned in the -// response; shared snapshots are not returned with the tag key and tag value -// request parameters. -// -// If both tag keys and values are omitted from the request, snapshots are returned -// regardless of whether they have tag keys or values associated with them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeClusterSnapshots for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeClusterSnapshotNotFoundFault "ClusterSnapshotNotFound" -// The snapshot identifier does not refer to an existing cluster snapshot. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterSnapshots -func (c *Redshift) DescribeClusterSnapshots(input *DescribeClusterSnapshotsInput) (*DescribeClusterSnapshotsOutput, error) { - req, out := c.DescribeClusterSnapshotsRequest(input) - return out, req.Send() -} - -// DescribeClusterSnapshotsWithContext is the same as DescribeClusterSnapshots with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClusterSnapshots for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClusterSnapshotsWithContext(ctx aws.Context, input *DescribeClusterSnapshotsInput, opts ...request.Option) (*DescribeClusterSnapshotsOutput, error) { - req, out := c.DescribeClusterSnapshotsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeClusterSnapshotsPages iterates over the pages of a DescribeClusterSnapshots operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeClusterSnapshots 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 DescribeClusterSnapshots operation. -// pageNum := 0 -// err := client.DescribeClusterSnapshotsPages(params, -// func(page *DescribeClusterSnapshotsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeClusterSnapshotsPages(input *DescribeClusterSnapshotsInput, fn func(*DescribeClusterSnapshotsOutput, bool) bool) error { - return c.DescribeClusterSnapshotsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeClusterSnapshotsPagesWithContext same as DescribeClusterSnapshotsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClusterSnapshotsPagesWithContext(ctx aws.Context, input *DescribeClusterSnapshotsInput, fn func(*DescribeClusterSnapshotsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeClusterSnapshotsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClusterSnapshotsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClusterSnapshotsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeClusterSubnetGroups = "DescribeClusterSubnetGroups" - -// DescribeClusterSubnetGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClusterSubnetGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClusterSubnetGroups for more information on using the DescribeClusterSubnetGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClusterSubnetGroupsRequest method. -// req, resp := client.DescribeClusterSubnetGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterSubnetGroups -func (c *Redshift) DescribeClusterSubnetGroupsRequest(input *DescribeClusterSubnetGroupsInput) (req *request.Request, output *DescribeClusterSubnetGroupsOutput) { - op := &request.Operation{ - Name: opDescribeClusterSubnetGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeClusterSubnetGroupsInput{} - } - - output = &DescribeClusterSubnetGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClusterSubnetGroups API operation for Amazon Redshift. -// -// Returns one or more cluster subnet group objects, which contain metadata -// about your cluster subnet groups. By default, this operation returns information -// about all cluster subnet groups that are defined in you AWS account. -// -// If you specify both tag keys and tag values in the same request, Amazon Redshift -// returns all subnet groups that match any combination of the specified keys -// and values. For example, if you have owner and environment for tag keys, -// and admin and test for tag values, all subnet groups that have any combination -// of those values are returned. -// -// If both tag keys and values are omitted from the request, subnet groups are -// returned regardless of whether they have tag keys or values associated with -// them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeClusterSubnetGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterSubnetGroupNotFoundFault "ClusterSubnetGroupNotFoundFault" -// The cluster subnet group name does not refer to an existing cluster subnet -// group. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterSubnetGroups -func (c *Redshift) DescribeClusterSubnetGroups(input *DescribeClusterSubnetGroupsInput) (*DescribeClusterSubnetGroupsOutput, error) { - req, out := c.DescribeClusterSubnetGroupsRequest(input) - return out, req.Send() -} - -// DescribeClusterSubnetGroupsWithContext is the same as DescribeClusterSubnetGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClusterSubnetGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClusterSubnetGroupsWithContext(ctx aws.Context, input *DescribeClusterSubnetGroupsInput, opts ...request.Option) (*DescribeClusterSubnetGroupsOutput, error) { - req, out := c.DescribeClusterSubnetGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeClusterSubnetGroupsPages iterates over the pages of a DescribeClusterSubnetGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeClusterSubnetGroups 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 DescribeClusterSubnetGroups operation. -// pageNum := 0 -// err := client.DescribeClusterSubnetGroupsPages(params, -// func(page *DescribeClusterSubnetGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeClusterSubnetGroupsPages(input *DescribeClusterSubnetGroupsInput, fn func(*DescribeClusterSubnetGroupsOutput, bool) bool) error { - return c.DescribeClusterSubnetGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeClusterSubnetGroupsPagesWithContext same as DescribeClusterSubnetGroupsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClusterSubnetGroupsPagesWithContext(ctx aws.Context, input *DescribeClusterSubnetGroupsInput, fn func(*DescribeClusterSubnetGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeClusterSubnetGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClusterSubnetGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClusterSubnetGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeClusterTracks = "DescribeClusterTracks" - -// DescribeClusterTracksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClusterTracks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClusterTracks for more information on using the DescribeClusterTracks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClusterTracksRequest method. -// req, resp := client.DescribeClusterTracksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterTracks -func (c *Redshift) DescribeClusterTracksRequest(input *DescribeClusterTracksInput) (req *request.Request, output *DescribeClusterTracksOutput) { - op := &request.Operation{ - Name: opDescribeClusterTracks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeClusterTracksInput{} - } - - output = &DescribeClusterTracksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClusterTracks API operation for Amazon Redshift. -// -// Returns a list of all the available maintenance tracks. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeClusterTracks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidClusterTrackFault "InvalidClusterTrack" -// The provided cluster track name is not valid. -// -// * ErrCodeUnauthorizedOperation "UnauthorizedOperation" -// Your account is not authorized to perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterTracks -func (c *Redshift) DescribeClusterTracks(input *DescribeClusterTracksInput) (*DescribeClusterTracksOutput, error) { - req, out := c.DescribeClusterTracksRequest(input) - return out, req.Send() -} - -// DescribeClusterTracksWithContext is the same as DescribeClusterTracks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClusterTracks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClusterTracksWithContext(ctx aws.Context, input *DescribeClusterTracksInput, opts ...request.Option) (*DescribeClusterTracksOutput, error) { - req, out := c.DescribeClusterTracksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeClusterVersions = "DescribeClusterVersions" - -// DescribeClusterVersionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClusterVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClusterVersions for more information on using the DescribeClusterVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClusterVersionsRequest method. -// req, resp := client.DescribeClusterVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterVersions -func (c *Redshift) DescribeClusterVersionsRequest(input *DescribeClusterVersionsInput) (req *request.Request, output *DescribeClusterVersionsOutput) { - op := &request.Operation{ - Name: opDescribeClusterVersions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeClusterVersionsInput{} - } - - output = &DescribeClusterVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClusterVersions API operation for Amazon Redshift. -// -// Returns descriptions of the available Amazon Redshift cluster versions. You -// can call this operation even before creating any clusters to learn more about -// the Amazon Redshift versions. For more information about managing clusters, -// go to Amazon Redshift Clusters (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeClusterVersions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterVersions -func (c *Redshift) DescribeClusterVersions(input *DescribeClusterVersionsInput) (*DescribeClusterVersionsOutput, error) { - req, out := c.DescribeClusterVersionsRequest(input) - return out, req.Send() -} - -// DescribeClusterVersionsWithContext is the same as DescribeClusterVersions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClusterVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClusterVersionsWithContext(ctx aws.Context, input *DescribeClusterVersionsInput, opts ...request.Option) (*DescribeClusterVersionsOutput, error) { - req, out := c.DescribeClusterVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeClusterVersionsPages iterates over the pages of a DescribeClusterVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeClusterVersions 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 DescribeClusterVersions operation. -// pageNum := 0 -// err := client.DescribeClusterVersionsPages(params, -// func(page *DescribeClusterVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeClusterVersionsPages(input *DescribeClusterVersionsInput, fn func(*DescribeClusterVersionsOutput, bool) bool) error { - return c.DescribeClusterVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeClusterVersionsPagesWithContext same as DescribeClusterVersionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClusterVersionsPagesWithContext(ctx aws.Context, input *DescribeClusterVersionsInput, fn func(*DescribeClusterVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeClusterVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClusterVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClusterVersionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeClusters = "DescribeClusters" - -// DescribeClustersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClusters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClusters for more information on using the DescribeClusters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClustersRequest method. -// req, resp := client.DescribeClustersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusters -func (c *Redshift) DescribeClustersRequest(input *DescribeClustersInput) (req *request.Request, output *DescribeClustersOutput) { - op := &request.Operation{ - Name: opDescribeClusters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeClustersInput{} - } - - output = &DescribeClustersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClusters API operation for Amazon Redshift. -// -// Returns properties of provisioned clusters including general cluster properties, -// cluster database properties, maintenance and backup properties, and security -// and access properties. This operation supports pagination. For more information -// about managing clusters, go to Amazon Redshift Clusters (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) -// in the Amazon Redshift Cluster Management Guide. -// -// If you specify both tag keys and tag values in the same request, Amazon Redshift -// returns all clusters that match any combination of the specified keys and -// values. For example, if you have owner and environment for tag keys, and -// admin and test for tag values, all clusters that have any combination of -// those values are returned. -// -// If both tag keys and values are omitted from the request, clusters are returned -// regardless of whether they have tag keys or values associated with them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeClusters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusters -func (c *Redshift) DescribeClusters(input *DescribeClustersInput) (*DescribeClustersOutput, error) { - req, out := c.DescribeClustersRequest(input) - return out, req.Send() -} - -// DescribeClustersWithContext is the same as DescribeClusters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClusters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClustersWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.Option) (*DescribeClustersOutput, error) { - req, out := c.DescribeClustersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeClustersPages iterates over the pages of a DescribeClusters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeClusters method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeClusters operation. -// pageNum := 0 -// err := client.DescribeClustersPages(params, -// func(page *DescribeClustersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeClustersPages(input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool) error { - return c.DescribeClustersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeClustersPagesWithContext same as DescribeClustersPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeClustersPagesWithContext(ctx aws.Context, input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeClustersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClustersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClustersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeDefaultClusterParameters = "DescribeDefaultClusterParameters" - -// DescribeDefaultClusterParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDefaultClusterParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDefaultClusterParameters for more information on using the DescribeDefaultClusterParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDefaultClusterParametersRequest method. -// req, resp := client.DescribeDefaultClusterParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeDefaultClusterParameters -func (c *Redshift) DescribeDefaultClusterParametersRequest(input *DescribeDefaultClusterParametersInput) (req *request.Request, output *DescribeDefaultClusterParametersOutput) { - op := &request.Operation{ - Name: opDescribeDefaultClusterParameters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"DefaultClusterParameters.Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDefaultClusterParametersInput{} - } - - output = &DescribeDefaultClusterParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDefaultClusterParameters API operation for Amazon Redshift. -// -// Returns a list of parameter settings for the specified parameter group family. -// -// For more information about parameters and parameter groups, go to Amazon -// Redshift Parameter Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeDefaultClusterParameters for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeDefaultClusterParameters -func (c *Redshift) DescribeDefaultClusterParameters(input *DescribeDefaultClusterParametersInput) (*DescribeDefaultClusterParametersOutput, error) { - req, out := c.DescribeDefaultClusterParametersRequest(input) - return out, req.Send() -} - -// DescribeDefaultClusterParametersWithContext is the same as DescribeDefaultClusterParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDefaultClusterParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeDefaultClusterParametersWithContext(ctx aws.Context, input *DescribeDefaultClusterParametersInput, opts ...request.Option) (*DescribeDefaultClusterParametersOutput, error) { - req, out := c.DescribeDefaultClusterParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeDefaultClusterParametersPages iterates over the pages of a DescribeDefaultClusterParameters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDefaultClusterParameters 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 DescribeDefaultClusterParameters operation. -// pageNum := 0 -// err := client.DescribeDefaultClusterParametersPages(params, -// func(page *DescribeDefaultClusterParametersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeDefaultClusterParametersPages(input *DescribeDefaultClusterParametersInput, fn func(*DescribeDefaultClusterParametersOutput, bool) bool) error { - return c.DescribeDefaultClusterParametersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDefaultClusterParametersPagesWithContext same as DescribeDefaultClusterParametersPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeDefaultClusterParametersPagesWithContext(ctx aws.Context, input *DescribeDefaultClusterParametersInput, fn func(*DescribeDefaultClusterParametersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDefaultClusterParametersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDefaultClusterParametersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDefaultClusterParametersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEventCategories = "DescribeEventCategories" - -// DescribeEventCategoriesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEventCategories operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEventCategories for more information on using the DescribeEventCategories -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventCategoriesRequest method. -// req, resp := client.DescribeEventCategoriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeEventCategories -func (c *Redshift) DescribeEventCategoriesRequest(input *DescribeEventCategoriesInput) (req *request.Request, output *DescribeEventCategoriesOutput) { - op := &request.Operation{ - Name: opDescribeEventCategories, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEventCategoriesInput{} - } - - output = &DescribeEventCategoriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEventCategories API operation for Amazon Redshift. -// -// Displays a list of event categories for all event source types, or for a -// specified source type. For a list of the event categories and source types, -// go to Amazon Redshift Event Notifications (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeEventCategories for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeEventCategories -func (c *Redshift) DescribeEventCategories(input *DescribeEventCategoriesInput) (*DescribeEventCategoriesOutput, error) { - req, out := c.DescribeEventCategoriesRequest(input) - return out, req.Send() -} - -// DescribeEventCategoriesWithContext is the same as DescribeEventCategories with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEventCategories for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeEventCategoriesWithContext(ctx aws.Context, input *DescribeEventCategoriesInput, opts ...request.Option) (*DescribeEventCategoriesOutput, error) { - req, out := c.DescribeEventCategoriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEventSubscriptions = "DescribeEventSubscriptions" - -// DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEventSubscriptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEventSubscriptions for more information on using the DescribeEventSubscriptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventSubscriptionsRequest method. -// req, resp := client.DescribeEventSubscriptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeEventSubscriptions -func (c *Redshift) DescribeEventSubscriptionsRequest(input *DescribeEventSubscriptionsInput) (req *request.Request, output *DescribeEventSubscriptionsOutput) { - op := &request.Operation{ - Name: opDescribeEventSubscriptions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEventSubscriptionsInput{} - } - - output = &DescribeEventSubscriptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEventSubscriptions API operation for Amazon Redshift. -// -// Lists descriptions of all the Amazon Redshift event notification subscriptions -// for a customer account. If you specify a subscription name, lists the description -// for that subscription. -// -// If you specify both tag keys and tag values in the same request, Amazon Redshift -// returns all event notification subscriptions that match any combination of -// the specified keys and values. For example, if you have owner and environment -// for tag keys, and admin and test for tag values, all subscriptions that have -// any combination of those values are returned. -// -// If both tag keys and values are omitted from the request, subscriptions are -// returned regardless of whether they have tag keys or values associated with -// them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeEventSubscriptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" -// An Amazon Redshift event notification subscription with the specified name -// does not exist. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeEventSubscriptions -func (c *Redshift) DescribeEventSubscriptions(input *DescribeEventSubscriptionsInput) (*DescribeEventSubscriptionsOutput, error) { - req, out := c.DescribeEventSubscriptionsRequest(input) - return out, req.Send() -} - -// DescribeEventSubscriptionsWithContext is the same as DescribeEventSubscriptions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEventSubscriptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeEventSubscriptionsWithContext(ctx aws.Context, input *DescribeEventSubscriptionsInput, opts ...request.Option) (*DescribeEventSubscriptionsOutput, error) { - req, out := c.DescribeEventSubscriptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEventSubscriptionsPages iterates over the pages of a DescribeEventSubscriptions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEventSubscriptions 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 DescribeEventSubscriptions operation. -// pageNum := 0 -// err := client.DescribeEventSubscriptionsPages(params, -// func(page *DescribeEventSubscriptionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeEventSubscriptionsPages(input *DescribeEventSubscriptionsInput, fn func(*DescribeEventSubscriptionsOutput, bool) bool) error { - return c.DescribeEventSubscriptionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEventSubscriptionsPagesWithContext same as DescribeEventSubscriptionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeEventSubscriptionsPagesWithContext(ctx aws.Context, input *DescribeEventSubscriptionsInput, fn func(*DescribeEventSubscriptionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEventSubscriptionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEventSubscriptionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventSubscriptionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeEvents = "DescribeEvents" - -// DescribeEventsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEvents for more information on using the DescribeEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEventsRequest method. -// req, resp := client.DescribeEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeEvents -func (c *Redshift) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Request, output *DescribeEventsOutput) { - op := &request.Operation{ - Name: opDescribeEvents, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeEventsInput{} - } - - output = &DescribeEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEvents API operation for Amazon Redshift. -// -// Returns events related to clusters, security groups, snapshots, and parameter -// groups for the past 14 days. Events specific to a particular cluster, security -// group, snapshot or parameter group can be obtained by providing the name -// as a parameter. By default, the past hour of events are returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeEvents for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeEvents -func (c *Redshift) DescribeEvents(input *DescribeEventsInput) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - return out, req.Send() -} - -// DescribeEventsWithContext is the same as DescribeEvents with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeEventsWithContext(ctx aws.Context, input *DescribeEventsInput, opts ...request.Option) (*DescribeEventsOutput, error) { - req, out := c.DescribeEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeEventsPages iterates over the pages of a DescribeEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEvents 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 DescribeEvents operation. -// pageNum := 0 -// err := client.DescribeEventsPages(params, -// func(page *DescribeEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeEventsPages(input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool) error { - return c.DescribeEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeEventsPagesWithContext same as DescribeEventsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeHsmClientCertificates = "DescribeHsmClientCertificates" - -// DescribeHsmClientCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeHsmClientCertificates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeHsmClientCertificates for more information on using the DescribeHsmClientCertificates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeHsmClientCertificatesRequest method. -// req, resp := client.DescribeHsmClientCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeHsmClientCertificates -func (c *Redshift) DescribeHsmClientCertificatesRequest(input *DescribeHsmClientCertificatesInput) (req *request.Request, output *DescribeHsmClientCertificatesOutput) { - op := &request.Operation{ - Name: opDescribeHsmClientCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeHsmClientCertificatesInput{} - } - - output = &DescribeHsmClientCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeHsmClientCertificates API operation for Amazon Redshift. -// -// Returns information about the specified HSM client certificate. If no certificate -// ID is specified, returns information about all the HSM certificates owned -// by your AWS customer account. -// -// If you specify both tag keys and tag values in the same request, Amazon Redshift -// returns all HSM client certificates that match any combination of the specified -// keys and values. For example, if you have owner and environment for tag keys, -// and admin and test for tag values, all HSM client certificates that have -// any combination of those values are returned. -// -// If both tag keys and values are omitted from the request, HSM client certificates -// are returned regardless of whether they have tag keys or values associated -// with them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeHsmClientCertificates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeHsmClientCertificateNotFoundFault "HsmClientCertificateNotFoundFault" -// There is no Amazon Redshift HSM client certificate with the specified identifier. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeHsmClientCertificates -func (c *Redshift) DescribeHsmClientCertificates(input *DescribeHsmClientCertificatesInput) (*DescribeHsmClientCertificatesOutput, error) { - req, out := c.DescribeHsmClientCertificatesRequest(input) - return out, req.Send() -} - -// DescribeHsmClientCertificatesWithContext is the same as DescribeHsmClientCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeHsmClientCertificates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeHsmClientCertificatesWithContext(ctx aws.Context, input *DescribeHsmClientCertificatesInput, opts ...request.Option) (*DescribeHsmClientCertificatesOutput, error) { - req, out := c.DescribeHsmClientCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeHsmClientCertificatesPages iterates over the pages of a DescribeHsmClientCertificates operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeHsmClientCertificates 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 DescribeHsmClientCertificates operation. -// pageNum := 0 -// err := client.DescribeHsmClientCertificatesPages(params, -// func(page *DescribeHsmClientCertificatesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeHsmClientCertificatesPages(input *DescribeHsmClientCertificatesInput, fn func(*DescribeHsmClientCertificatesOutput, bool) bool) error { - return c.DescribeHsmClientCertificatesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeHsmClientCertificatesPagesWithContext same as DescribeHsmClientCertificatesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeHsmClientCertificatesPagesWithContext(ctx aws.Context, input *DescribeHsmClientCertificatesInput, fn func(*DescribeHsmClientCertificatesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeHsmClientCertificatesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeHsmClientCertificatesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeHsmClientCertificatesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeHsmConfigurations = "DescribeHsmConfigurations" - -// DescribeHsmConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeHsmConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeHsmConfigurations for more information on using the DescribeHsmConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeHsmConfigurationsRequest method. -// req, resp := client.DescribeHsmConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeHsmConfigurations -func (c *Redshift) DescribeHsmConfigurationsRequest(input *DescribeHsmConfigurationsInput) (req *request.Request, output *DescribeHsmConfigurationsOutput) { - op := &request.Operation{ - Name: opDescribeHsmConfigurations, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeHsmConfigurationsInput{} - } - - output = &DescribeHsmConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeHsmConfigurations API operation for Amazon Redshift. -// -// Returns information about the specified Amazon Redshift HSM configuration. -// If no configuration ID is specified, returns information about all the HSM -// configurations owned by your AWS customer account. -// -// If you specify both tag keys and tag values in the same request, Amazon Redshift -// returns all HSM connections that match any combination of the specified keys -// and values. For example, if you have owner and environment for tag keys, -// and admin and test for tag values, all HSM connections that have any combination -// of those values are returned. -// -// If both tag keys and values are omitted from the request, HSM connections -// are returned regardless of whether they have tag keys or values associated -// with them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeHsmConfigurations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeHsmConfigurationNotFoundFault "HsmConfigurationNotFoundFault" -// There is no Amazon Redshift HSM configuration with the specified identifier. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeHsmConfigurations -func (c *Redshift) DescribeHsmConfigurations(input *DescribeHsmConfigurationsInput) (*DescribeHsmConfigurationsOutput, error) { - req, out := c.DescribeHsmConfigurationsRequest(input) - return out, req.Send() -} - -// DescribeHsmConfigurationsWithContext is the same as DescribeHsmConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeHsmConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeHsmConfigurationsWithContext(ctx aws.Context, input *DescribeHsmConfigurationsInput, opts ...request.Option) (*DescribeHsmConfigurationsOutput, error) { - req, out := c.DescribeHsmConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeHsmConfigurationsPages iterates over the pages of a DescribeHsmConfigurations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeHsmConfigurations 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 DescribeHsmConfigurations operation. -// pageNum := 0 -// err := client.DescribeHsmConfigurationsPages(params, -// func(page *DescribeHsmConfigurationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeHsmConfigurationsPages(input *DescribeHsmConfigurationsInput, fn func(*DescribeHsmConfigurationsOutput, bool) bool) error { - return c.DescribeHsmConfigurationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeHsmConfigurationsPagesWithContext same as DescribeHsmConfigurationsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeHsmConfigurationsPagesWithContext(ctx aws.Context, input *DescribeHsmConfigurationsInput, fn func(*DescribeHsmConfigurationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeHsmConfigurationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeHsmConfigurationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeHsmConfigurationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeLoggingStatus = "DescribeLoggingStatus" - -// DescribeLoggingStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoggingStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLoggingStatus for more information on using the DescribeLoggingStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLoggingStatusRequest method. -// req, resp := client.DescribeLoggingStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeLoggingStatus -func (c *Redshift) DescribeLoggingStatusRequest(input *DescribeLoggingStatusInput) (req *request.Request, output *LoggingStatus) { - op := &request.Operation{ - Name: opDescribeLoggingStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLoggingStatusInput{} - } - - output = &LoggingStatus{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoggingStatus API operation for Amazon Redshift. -// -// Describes whether information, such as queries and connection attempts, is -// being logged for the specified Amazon Redshift cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeLoggingStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeLoggingStatus -func (c *Redshift) DescribeLoggingStatus(input *DescribeLoggingStatusInput) (*LoggingStatus, error) { - req, out := c.DescribeLoggingStatusRequest(input) - return out, req.Send() -} - -// DescribeLoggingStatusWithContext is the same as DescribeLoggingStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoggingStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeLoggingStatusWithContext(ctx aws.Context, input *DescribeLoggingStatusInput, opts ...request.Option) (*LoggingStatus, error) { - req, out := c.DescribeLoggingStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeOrderableClusterOptions = "DescribeOrderableClusterOptions" - -// DescribeOrderableClusterOptionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeOrderableClusterOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeOrderableClusterOptions for more information on using the DescribeOrderableClusterOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeOrderableClusterOptionsRequest method. -// req, resp := client.DescribeOrderableClusterOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeOrderableClusterOptions -func (c *Redshift) DescribeOrderableClusterOptionsRequest(input *DescribeOrderableClusterOptionsInput) (req *request.Request, output *DescribeOrderableClusterOptionsOutput) { - op := &request.Operation{ - Name: opDescribeOrderableClusterOptions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeOrderableClusterOptionsInput{} - } - - output = &DescribeOrderableClusterOptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeOrderableClusterOptions API operation for Amazon Redshift. -// -// Returns a list of orderable cluster options. Before you create a new cluster -// you can use this operation to find what options are available, such as the -// EC2 Availability Zones (AZ) in the specific AWS Region that you can specify, -// and the node types you can request. The node types differ by available storage, -// memory, CPU and price. With the cost involved you might want to obtain a -// list of cluster options in the specific region and specify values when creating -// a cluster. For more information about managing clusters, go to Amazon Redshift -// Clusters (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeOrderableClusterOptions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeOrderableClusterOptions -func (c *Redshift) DescribeOrderableClusterOptions(input *DescribeOrderableClusterOptionsInput) (*DescribeOrderableClusterOptionsOutput, error) { - req, out := c.DescribeOrderableClusterOptionsRequest(input) - return out, req.Send() -} - -// DescribeOrderableClusterOptionsWithContext is the same as DescribeOrderableClusterOptions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeOrderableClusterOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeOrderableClusterOptionsWithContext(ctx aws.Context, input *DescribeOrderableClusterOptionsInput, opts ...request.Option) (*DescribeOrderableClusterOptionsOutput, error) { - req, out := c.DescribeOrderableClusterOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeOrderableClusterOptionsPages iterates over the pages of a DescribeOrderableClusterOptions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeOrderableClusterOptions 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 DescribeOrderableClusterOptions operation. -// pageNum := 0 -// err := client.DescribeOrderableClusterOptionsPages(params, -// func(page *DescribeOrderableClusterOptionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeOrderableClusterOptionsPages(input *DescribeOrderableClusterOptionsInput, fn func(*DescribeOrderableClusterOptionsOutput, bool) bool) error { - return c.DescribeOrderableClusterOptionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeOrderableClusterOptionsPagesWithContext same as DescribeOrderableClusterOptionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeOrderableClusterOptionsPagesWithContext(ctx aws.Context, input *DescribeOrderableClusterOptionsInput, fn func(*DescribeOrderableClusterOptionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeOrderableClusterOptionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeOrderableClusterOptionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeOrderableClusterOptionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeReservedNodeOfferings = "DescribeReservedNodeOfferings" - -// DescribeReservedNodeOfferingsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservedNodeOfferings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReservedNodeOfferings for more information on using the DescribeReservedNodeOfferings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReservedNodeOfferingsRequest method. -// req, resp := client.DescribeReservedNodeOfferingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeReservedNodeOfferings -func (c *Redshift) DescribeReservedNodeOfferingsRequest(input *DescribeReservedNodeOfferingsInput) (req *request.Request, output *DescribeReservedNodeOfferingsOutput) { - op := &request.Operation{ - Name: opDescribeReservedNodeOfferings, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReservedNodeOfferingsInput{} - } - - output = &DescribeReservedNodeOfferingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReservedNodeOfferings API operation for Amazon Redshift. -// -// Returns a list of the available reserved node offerings by Amazon Redshift -// with their descriptions including the node type, the fixed and recurring -// costs of reserving the node and duration the node will be reserved for you. -// These descriptions help you determine which reserve node offering you want -// to purchase. You then use the unique offering ID in you call to PurchaseReservedNodeOffering -// to reserve one or more nodes for your Amazon Redshift cluster. -// -// For more information about reserved node offerings, go to Purchasing Reserved -// Nodes (http://docs.aws.amazon.com/redshift/latest/mgmt/purchase-reserved-node-instance.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeReservedNodeOfferings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReservedNodeOfferingNotFoundFault "ReservedNodeOfferingNotFound" -// Specified offering does not exist. -// -// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" -// The requested operation isn't supported. -// -// * ErrCodeDependentServiceUnavailableFault "DependentServiceUnavailableFault" -// Your request cannot be completed because a dependent internal service is -// temporarily unavailable. Wait 30 to 60 seconds and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeReservedNodeOfferings -func (c *Redshift) DescribeReservedNodeOfferings(input *DescribeReservedNodeOfferingsInput) (*DescribeReservedNodeOfferingsOutput, error) { - req, out := c.DescribeReservedNodeOfferingsRequest(input) - return out, req.Send() -} - -// DescribeReservedNodeOfferingsWithContext is the same as DescribeReservedNodeOfferings with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReservedNodeOfferings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeReservedNodeOfferingsWithContext(ctx aws.Context, input *DescribeReservedNodeOfferingsInput, opts ...request.Option) (*DescribeReservedNodeOfferingsOutput, error) { - req, out := c.DescribeReservedNodeOfferingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReservedNodeOfferingsPages iterates over the pages of a DescribeReservedNodeOfferings operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReservedNodeOfferings 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 DescribeReservedNodeOfferings operation. -// pageNum := 0 -// err := client.DescribeReservedNodeOfferingsPages(params, -// func(page *DescribeReservedNodeOfferingsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeReservedNodeOfferingsPages(input *DescribeReservedNodeOfferingsInput, fn func(*DescribeReservedNodeOfferingsOutput, bool) bool) error { - return c.DescribeReservedNodeOfferingsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReservedNodeOfferingsPagesWithContext same as DescribeReservedNodeOfferingsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeReservedNodeOfferingsPagesWithContext(ctx aws.Context, input *DescribeReservedNodeOfferingsInput, fn func(*DescribeReservedNodeOfferingsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReservedNodeOfferingsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReservedNodeOfferingsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedNodeOfferingsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeReservedNodes = "DescribeReservedNodes" - -// DescribeReservedNodesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservedNodes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReservedNodes for more information on using the DescribeReservedNodes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReservedNodesRequest method. -// req, resp := client.DescribeReservedNodesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeReservedNodes -func (c *Redshift) DescribeReservedNodesRequest(input *DescribeReservedNodesInput) (req *request.Request, output *DescribeReservedNodesOutput) { - op := &request.Operation{ - Name: opDescribeReservedNodes, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReservedNodesInput{} - } - - output = &DescribeReservedNodesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReservedNodes API operation for Amazon Redshift. -// -// Returns the descriptions of the reserved nodes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeReservedNodes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReservedNodeNotFoundFault "ReservedNodeNotFound" -// The specified reserved compute node not found. -// -// * ErrCodeDependentServiceUnavailableFault "DependentServiceUnavailableFault" -// Your request cannot be completed because a dependent internal service is -// temporarily unavailable. Wait 30 to 60 seconds and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeReservedNodes -func (c *Redshift) DescribeReservedNodes(input *DescribeReservedNodesInput) (*DescribeReservedNodesOutput, error) { - req, out := c.DescribeReservedNodesRequest(input) - return out, req.Send() -} - -// DescribeReservedNodesWithContext is the same as DescribeReservedNodes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReservedNodes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeReservedNodesWithContext(ctx aws.Context, input *DescribeReservedNodesInput, opts ...request.Option) (*DescribeReservedNodesOutput, error) { - req, out := c.DescribeReservedNodesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReservedNodesPages iterates over the pages of a DescribeReservedNodes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReservedNodes 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 DescribeReservedNodes operation. -// pageNum := 0 -// err := client.DescribeReservedNodesPages(params, -// func(page *DescribeReservedNodesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Redshift) DescribeReservedNodesPages(input *DescribeReservedNodesInput, fn func(*DescribeReservedNodesOutput, bool) bool) error { - return c.DescribeReservedNodesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReservedNodesPagesWithContext same as DescribeReservedNodesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeReservedNodesPagesWithContext(ctx aws.Context, input *DescribeReservedNodesInput, fn func(*DescribeReservedNodesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReservedNodesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReservedNodesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedNodesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeResize = "DescribeResize" - -// DescribeResizeRequest generates a "aws/request.Request" representing the -// client's request for the DescribeResize operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeResize for more information on using the DescribeResize -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeResizeRequest method. -// req, resp := client.DescribeResizeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeResize -func (c *Redshift) DescribeResizeRequest(input *DescribeResizeInput) (req *request.Request, output *DescribeResizeOutput) { - op := &request.Operation{ - Name: opDescribeResize, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeResizeInput{} - } - - output = &DescribeResizeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeResize API operation for Amazon Redshift. -// -// Returns information about the last resize operation for the specified cluster. -// If no resize operation has ever been initiated for the specified cluster, -// a HTTP 404 error is returned. If a resize operation was initiated and completed, -// the status of the resize remains as SUCCEEDED until the next resize. -// -// A resize operation can be requested using ModifyCluster and specifying a -// different number or type of nodes for the cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeResize for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeResizeNotFoundFault "ResizeNotFound" -// A resize operation for the specified cluster is not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeResize -func (c *Redshift) DescribeResize(input *DescribeResizeInput) (*DescribeResizeOutput, error) { - req, out := c.DescribeResizeRequest(input) - return out, req.Send() -} - -// DescribeResizeWithContext is the same as DescribeResize with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeResize for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeResizeWithContext(ctx aws.Context, input *DescribeResizeInput, opts ...request.Option) (*DescribeResizeOutput, error) { - req, out := c.DescribeResizeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSnapshotCopyGrants = "DescribeSnapshotCopyGrants" - -// DescribeSnapshotCopyGrantsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSnapshotCopyGrants operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSnapshotCopyGrants for more information on using the DescribeSnapshotCopyGrants -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSnapshotCopyGrantsRequest method. -// req, resp := client.DescribeSnapshotCopyGrantsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeSnapshotCopyGrants -func (c *Redshift) DescribeSnapshotCopyGrantsRequest(input *DescribeSnapshotCopyGrantsInput) (req *request.Request, output *DescribeSnapshotCopyGrantsOutput) { - op := &request.Operation{ - Name: opDescribeSnapshotCopyGrants, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSnapshotCopyGrantsInput{} - } - - output = &DescribeSnapshotCopyGrantsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSnapshotCopyGrants API operation for Amazon Redshift. -// -// Returns a list of snapshot copy grants owned by the AWS account in the destination -// region. -// -// For more information about managing snapshot copy grants, go to Amazon Redshift -// Database Encryption (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeSnapshotCopyGrants for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSnapshotCopyGrantNotFoundFault "SnapshotCopyGrantNotFoundFault" -// The specified snapshot copy grant can't be found. Make sure that the name -// is typed correctly and that the grant exists in the destination region. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeSnapshotCopyGrants -func (c *Redshift) DescribeSnapshotCopyGrants(input *DescribeSnapshotCopyGrantsInput) (*DescribeSnapshotCopyGrantsOutput, error) { - req, out := c.DescribeSnapshotCopyGrantsRequest(input) - return out, req.Send() -} - -// DescribeSnapshotCopyGrantsWithContext is the same as DescribeSnapshotCopyGrants with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSnapshotCopyGrants for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeSnapshotCopyGrantsWithContext(ctx aws.Context, input *DescribeSnapshotCopyGrantsInput, opts ...request.Option) (*DescribeSnapshotCopyGrantsOutput, error) { - req, out := c.DescribeSnapshotCopyGrantsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSnapshotSchedules = "DescribeSnapshotSchedules" - -// DescribeSnapshotSchedulesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSnapshotSchedules operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSnapshotSchedules for more information on using the DescribeSnapshotSchedules -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSnapshotSchedulesRequest method. -// req, resp := client.DescribeSnapshotSchedulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeSnapshotSchedules -func (c *Redshift) DescribeSnapshotSchedulesRequest(input *DescribeSnapshotSchedulesInput) (req *request.Request, output *DescribeSnapshotSchedulesOutput) { - op := &request.Operation{ - Name: opDescribeSnapshotSchedules, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSnapshotSchedulesInput{} - } - - output = &DescribeSnapshotSchedulesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSnapshotSchedules API operation for Amazon Redshift. -// -// Returns a list of snapshot schedules. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeSnapshotSchedules for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeSnapshotSchedules -func (c *Redshift) DescribeSnapshotSchedules(input *DescribeSnapshotSchedulesInput) (*DescribeSnapshotSchedulesOutput, error) { - req, out := c.DescribeSnapshotSchedulesRequest(input) - return out, req.Send() -} - -// DescribeSnapshotSchedulesWithContext is the same as DescribeSnapshotSchedules with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSnapshotSchedules for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeSnapshotSchedulesWithContext(ctx aws.Context, input *DescribeSnapshotSchedulesInput, opts ...request.Option) (*DescribeSnapshotSchedulesOutput, error) { - req, out := c.DescribeSnapshotSchedulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStorage = "DescribeStorage" - -// DescribeStorageRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStorage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStorage for more information on using the DescribeStorage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStorageRequest method. -// req, resp := client.DescribeStorageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeStorage -func (c *Redshift) DescribeStorageRequest(input *DescribeStorageInput) (req *request.Request, output *DescribeStorageOutput) { - op := &request.Operation{ - Name: opDescribeStorage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStorageInput{} - } - - output = &DescribeStorageOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStorage API operation for Amazon Redshift. -// -// Returns the total amount of snapshot usage and provisioned storage for a -// user in megabytes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeStorage for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeStorage -func (c *Redshift) DescribeStorage(input *DescribeStorageInput) (*DescribeStorageOutput, error) { - req, out := c.DescribeStorageRequest(input) - return out, req.Send() -} - -// DescribeStorageWithContext is the same as DescribeStorage with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStorage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeStorageWithContext(ctx aws.Context, input *DescribeStorageInput, opts ...request.Option) (*DescribeStorageOutput, error) { - req, out := c.DescribeStorageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTableRestoreStatus = "DescribeTableRestoreStatus" - -// DescribeTableRestoreStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTableRestoreStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTableRestoreStatus for more information on using the DescribeTableRestoreStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTableRestoreStatusRequest method. -// req, resp := client.DescribeTableRestoreStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeTableRestoreStatus -func (c *Redshift) DescribeTableRestoreStatusRequest(input *DescribeTableRestoreStatusInput) (req *request.Request, output *DescribeTableRestoreStatusOutput) { - op := &request.Operation{ - Name: opDescribeTableRestoreStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTableRestoreStatusInput{} - } - - output = &DescribeTableRestoreStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTableRestoreStatus API operation for Amazon Redshift. -// -// Lists the status of one or more table restore requests made using the RestoreTableFromClusterSnapshot -// API action. If you don't specify a value for the TableRestoreRequestId parameter, -// then DescribeTableRestoreStatus returns the status of all table restore requests -// ordered by the date and time of the request in ascending order. Otherwise -// DescribeTableRestoreStatus returns the status of the table specified by TableRestoreRequestId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeTableRestoreStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTableRestoreNotFoundFault "TableRestoreNotFoundFault" -// The specified TableRestoreRequestId value was not found. -// -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeTableRestoreStatus -func (c *Redshift) DescribeTableRestoreStatus(input *DescribeTableRestoreStatusInput) (*DescribeTableRestoreStatusOutput, error) { - req, out := c.DescribeTableRestoreStatusRequest(input) - return out, req.Send() -} - -// DescribeTableRestoreStatusWithContext is the same as DescribeTableRestoreStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTableRestoreStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeTableRestoreStatusWithContext(ctx aws.Context, input *DescribeTableRestoreStatusInput, opts ...request.Option) (*DescribeTableRestoreStatusOutput, error) { - req, out := c.DescribeTableRestoreStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTags = "DescribeTags" - -// DescribeTagsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTags for more information on using the DescribeTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTagsRequest method. -// req, resp := client.DescribeTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeTags -func (c *Redshift) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { - op := &request.Operation{ - Name: opDescribeTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTagsInput{} - } - - output = &DescribeTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTags API operation for Amazon Redshift. -// -// Returns a list of tags. You can return tags from a specific resource by specifying -// an ARN, or you can return all tags for a given type of resource, such as -// clusters, snapshots, and so on. -// -// The following are limitations for DescribeTags: -// -// * You cannot specify an ARN and a resource-type value together in the -// same request. -// -// * You cannot use the MaxRecords and Marker parameters together with the -// ARN parameter. -// -// * The MaxRecords parameter can be a range from 10 to 50 results to return -// in a request. -// -// If you specify both tag keys and tag values in the same request, Amazon Redshift -// returns all resources that match any combination of the specified keys and -// values. For example, if you have owner and environment for tag keys, and -// admin and test for tag values, all resources that have any combination of -// those values are returned. -// -// If both tag keys and values are omitted from the request, resources are returned -// regardless of whether they have tag keys or values associated with them. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DescribeTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" -// The resource could not be found. -// -// * ErrCodeInvalidTagFault "InvalidTagFault" -// The tag is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeTags -func (c *Redshift) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - return out, req.Send() -} - -// DescribeTagsWithContext is the same as DescribeTags with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableLogging = "DisableLogging" - -// DisableLoggingRequest generates a "aws/request.Request" representing the -// client's request for the DisableLogging operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableLogging for more information on using the DisableLogging -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableLoggingRequest method. -// req, resp := client.DisableLoggingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DisableLogging -func (c *Redshift) DisableLoggingRequest(input *DisableLoggingInput) (req *request.Request, output *LoggingStatus) { - op := &request.Operation{ - Name: opDisableLogging, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableLoggingInput{} - } - - output = &LoggingStatus{} - req = c.newRequest(op, input, output) - return -} - -// DisableLogging API operation for Amazon Redshift. -// -// Stops logging information, such as queries and connection attempts, for the -// specified Amazon Redshift cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DisableLogging for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DisableLogging -func (c *Redshift) DisableLogging(input *DisableLoggingInput) (*LoggingStatus, error) { - req, out := c.DisableLoggingRequest(input) - return out, req.Send() -} - -// DisableLoggingWithContext is the same as DisableLogging with the addition of -// the ability to pass a context and additional request options. -// -// See DisableLogging for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DisableLoggingWithContext(ctx aws.Context, input *DisableLoggingInput, opts ...request.Option) (*LoggingStatus, error) { - req, out := c.DisableLoggingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableSnapshotCopy = "DisableSnapshotCopy" - -// DisableSnapshotCopyRequest generates a "aws/request.Request" representing the -// client's request for the DisableSnapshotCopy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableSnapshotCopy for more information on using the DisableSnapshotCopy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableSnapshotCopyRequest method. -// req, resp := client.DisableSnapshotCopyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DisableSnapshotCopy -func (c *Redshift) DisableSnapshotCopyRequest(input *DisableSnapshotCopyInput) (req *request.Request, output *DisableSnapshotCopyOutput) { - op := &request.Operation{ - Name: opDisableSnapshotCopy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableSnapshotCopyInput{} - } - - output = &DisableSnapshotCopyOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisableSnapshotCopy API operation for Amazon Redshift. -// -// Disables the automatic copying of snapshots from one region to another region -// for a specified cluster. -// -// If your cluster and its snapshots are encrypted using a customer master key -// (CMK) from AWS KMS, use DeleteSnapshotCopyGrant to delete the grant that -// grants Amazon Redshift permission to the CMK in the destination region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation DisableSnapshotCopy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeSnapshotCopyAlreadyDisabledFault "SnapshotCopyAlreadyDisabledFault" -// The cluster already has cross-region snapshot copy disabled. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterState" -// The specified cluster is not in the available state. -// -// * ErrCodeUnauthorizedOperation "UnauthorizedOperation" -// Your account is not authorized to perform the requested operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DisableSnapshotCopy -func (c *Redshift) DisableSnapshotCopy(input *DisableSnapshotCopyInput) (*DisableSnapshotCopyOutput, error) { - req, out := c.DisableSnapshotCopyRequest(input) - return out, req.Send() -} - -// DisableSnapshotCopyWithContext is the same as DisableSnapshotCopy with the addition of -// the ability to pass a context and additional request options. -// -// See DisableSnapshotCopy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) DisableSnapshotCopyWithContext(ctx aws.Context, input *DisableSnapshotCopyInput, opts ...request.Option) (*DisableSnapshotCopyOutput, error) { - req, out := c.DisableSnapshotCopyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableLogging = "EnableLogging" - -// EnableLoggingRequest generates a "aws/request.Request" representing the -// client's request for the EnableLogging operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableLogging for more information on using the EnableLogging -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableLoggingRequest method. -// req, resp := client.EnableLoggingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/EnableLogging -func (c *Redshift) EnableLoggingRequest(input *EnableLoggingInput) (req *request.Request, output *LoggingStatus) { - op := &request.Operation{ - Name: opEnableLogging, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableLoggingInput{} - } - - output = &LoggingStatus{} - req = c.newRequest(op, input, output) - return -} - -// EnableLogging API operation for Amazon Redshift. -// -// Starts logging information, such as queries and connection attempts, for -// the specified Amazon Redshift cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation EnableLogging for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeBucketNotFoundFault "BucketNotFoundFault" -// Could not find the specified S3 bucket. -// -// * ErrCodeInsufficientS3BucketPolicyFault "InsufficientS3BucketPolicyFault" -// The cluster does not have read bucket or put object permissions on the S3 -// bucket specified when enabling logging. -// -// * ErrCodeInvalidS3KeyPrefixFault "InvalidS3KeyPrefixFault" -// The string specified for the logging S3 key prefix does not comply with the -// documented constraints. -// -// * ErrCodeInvalidS3BucketNameFault "InvalidS3BucketNameFault" -// The S3 bucket name is invalid. For more information about naming rules, go -// to Bucket Restrictions and Limitations (http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html) -// in the Amazon Simple Storage Service (S3) Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/EnableLogging -func (c *Redshift) EnableLogging(input *EnableLoggingInput) (*LoggingStatus, error) { - req, out := c.EnableLoggingRequest(input) - return out, req.Send() -} - -// EnableLoggingWithContext is the same as EnableLogging with the addition of -// the ability to pass a context and additional request options. -// -// See EnableLogging for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) EnableLoggingWithContext(ctx aws.Context, input *EnableLoggingInput, opts ...request.Option) (*LoggingStatus, error) { - req, out := c.EnableLoggingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableSnapshotCopy = "EnableSnapshotCopy" - -// EnableSnapshotCopyRequest generates a "aws/request.Request" representing the -// client's request for the EnableSnapshotCopy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableSnapshotCopy for more information on using the EnableSnapshotCopy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableSnapshotCopyRequest method. -// req, resp := client.EnableSnapshotCopyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/EnableSnapshotCopy -func (c *Redshift) EnableSnapshotCopyRequest(input *EnableSnapshotCopyInput) (req *request.Request, output *EnableSnapshotCopyOutput) { - op := &request.Operation{ - Name: opEnableSnapshotCopy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableSnapshotCopyInput{} - } - - output = &EnableSnapshotCopyOutput{} - req = c.newRequest(op, input, output) - return -} - -// EnableSnapshotCopy API operation for Amazon Redshift. -// -// Enables the automatic copy of snapshots from one region to another region -// for a specified cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation EnableSnapshotCopy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeIncompatibleOrderableOptions "IncompatibleOrderableOptions" -// The specified options are incompatible. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterState" -// The specified cluster is not in the available state. -// -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeCopyToRegionDisabledFault "CopyToRegionDisabledFault" -// Cross-region snapshot copy was temporarily disabled. Try your request again. -// -// * ErrCodeSnapshotCopyAlreadyEnabledFault "SnapshotCopyAlreadyEnabledFault" -// The cluster already has cross-region snapshot copy enabled. -// -// * ErrCodeUnknownSnapshotCopyRegionFault "UnknownSnapshotCopyRegionFault" -// The specified region is incorrect or does not exist. -// -// * ErrCodeUnauthorizedOperation "UnauthorizedOperation" -// Your account is not authorized to perform the requested operation. -// -// * ErrCodeSnapshotCopyGrantNotFoundFault "SnapshotCopyGrantNotFoundFault" -// The specified snapshot copy grant can't be found. Make sure that the name -// is typed correctly and that the grant exists in the destination region. -// -// * ErrCodeLimitExceededFault "LimitExceededFault" -// The encryption key has exceeded its grant limit in AWS KMS. -// -// * ErrCodeDependentServiceRequestThrottlingFault "DependentServiceRequestThrottlingFault" -// The request cannot be completed because a dependent service is throttling -// requests made by Amazon Redshift on your behalf. Wait and retry the request. -// -// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" -// The retention period specified is either in the past or is not a valid value. -// -// The value must be either -1 or an integer between 1 and 3,653. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/EnableSnapshotCopy -func (c *Redshift) EnableSnapshotCopy(input *EnableSnapshotCopyInput) (*EnableSnapshotCopyOutput, error) { - req, out := c.EnableSnapshotCopyRequest(input) - return out, req.Send() -} - -// EnableSnapshotCopyWithContext is the same as EnableSnapshotCopy with the addition of -// the ability to pass a context and additional request options. -// -// See EnableSnapshotCopy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) EnableSnapshotCopyWithContext(ctx aws.Context, input *EnableSnapshotCopyInput, opts ...request.Option) (*EnableSnapshotCopyOutput, error) { - req, out := c.EnableSnapshotCopyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetClusterCredentials = "GetClusterCredentials" - -// GetClusterCredentialsRequest generates a "aws/request.Request" representing the -// client's request for the GetClusterCredentials operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetClusterCredentials for more information on using the GetClusterCredentials -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetClusterCredentialsRequest method. -// req, resp := client.GetClusterCredentialsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/GetClusterCredentials -func (c *Redshift) GetClusterCredentialsRequest(input *GetClusterCredentialsInput) (req *request.Request, output *GetClusterCredentialsOutput) { - op := &request.Operation{ - Name: opGetClusterCredentials, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetClusterCredentialsInput{} - } - - output = &GetClusterCredentialsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetClusterCredentials API operation for Amazon Redshift. -// -// Returns a database user name and temporary password with temporary authorization -// to log on to an Amazon Redshift database. The action returns the database -// user name prefixed with IAM: if AutoCreate is False or IAMA: if AutoCreate -// is True. You can optionally specify one or more database user groups that -// the user will join at log on. By default, the temporary credentials expire -// in 900 seconds. You can optionally specify a duration between 900 seconds -// (15 minutes) and 3600 seconds (60 minutes). For more information, see Using -// IAM Authentication to Generate Database User Credentials (http://docs.aws.amazon.com/redshift/latest/mgmt/generating-user-credentials.html) -// in the Amazon Redshift Cluster Management Guide. -// -// The AWS Identity and Access Management (IAM)user or role that executes GetClusterCredentials -// must have an IAM policy attached that allows access to all necessary actions -// and resources. For more information about permissions, see Resource Policies -// for GetClusterCredentials (http://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-identity-based.html#redshift-policy-resources.getclustercredentials-resources) -// in the Amazon Redshift Cluster Management Guide. -// -// If the DbGroups parameter is specified, the IAM policy must allow the redshift:JoinGroup -// action with access to the listed dbgroups. -// -// In addition, if the AutoCreate parameter is set to True, then the policy -// must include the redshift:CreateClusterUser privilege. -// -// If the DbName parameter is specified, the IAM policy must allow access to -// the resource dbname for the specified database name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation GetClusterCredentials for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" -// The requested operation isn't supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/GetClusterCredentials -func (c *Redshift) GetClusterCredentials(input *GetClusterCredentialsInput) (*GetClusterCredentialsOutput, error) { - req, out := c.GetClusterCredentialsRequest(input) - return out, req.Send() -} - -// GetClusterCredentialsWithContext is the same as GetClusterCredentials with the addition of -// the ability to pass a context and additional request options. -// -// See GetClusterCredentials for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) GetClusterCredentialsWithContext(ctx aws.Context, input *GetClusterCredentialsInput, opts ...request.Option) (*GetClusterCredentialsOutput, error) { - req, out := c.GetClusterCredentialsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetReservedNodeExchangeOfferings = "GetReservedNodeExchangeOfferings" - -// GetReservedNodeExchangeOfferingsRequest generates a "aws/request.Request" representing the -// client's request for the GetReservedNodeExchangeOfferings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetReservedNodeExchangeOfferings for more information on using the GetReservedNodeExchangeOfferings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetReservedNodeExchangeOfferingsRequest method. -// req, resp := client.GetReservedNodeExchangeOfferingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/GetReservedNodeExchangeOfferings -func (c *Redshift) GetReservedNodeExchangeOfferingsRequest(input *GetReservedNodeExchangeOfferingsInput) (req *request.Request, output *GetReservedNodeExchangeOfferingsOutput) { - op := &request.Operation{ - Name: opGetReservedNodeExchangeOfferings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetReservedNodeExchangeOfferingsInput{} - } - - output = &GetReservedNodeExchangeOfferingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetReservedNodeExchangeOfferings API operation for Amazon Redshift. -// -// Returns an array of DC2 ReservedNodeOfferings that matches the payment type, -// term, and usage price of the given DC1 reserved node. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation GetReservedNodeExchangeOfferings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReservedNodeNotFoundFault "ReservedNodeNotFound" -// The specified reserved compute node not found. -// -// * ErrCodeInvalidReservedNodeStateFault "InvalidReservedNodeState" -// Indicates that the Reserved Node being exchanged is not in an active state. -// -// * ErrCodeReservedNodeAlreadyMigratedFault "ReservedNodeAlreadyMigrated" -// Indicates that the reserved node has already been exchanged. -// -// * ErrCodeReservedNodeOfferingNotFoundFault "ReservedNodeOfferingNotFound" -// Specified offering does not exist. -// -// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" -// The requested operation isn't supported. -// -// * ErrCodeDependentServiceUnavailableFault "DependentServiceUnavailableFault" -// Your request cannot be completed because a dependent internal service is -// temporarily unavailable. Wait 30 to 60 seconds and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/GetReservedNodeExchangeOfferings -func (c *Redshift) GetReservedNodeExchangeOfferings(input *GetReservedNodeExchangeOfferingsInput) (*GetReservedNodeExchangeOfferingsOutput, error) { - req, out := c.GetReservedNodeExchangeOfferingsRequest(input) - return out, req.Send() -} - -// GetReservedNodeExchangeOfferingsWithContext is the same as GetReservedNodeExchangeOfferings with the addition of -// the ability to pass a context and additional request options. -// -// See GetReservedNodeExchangeOfferings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) GetReservedNodeExchangeOfferingsWithContext(ctx aws.Context, input *GetReservedNodeExchangeOfferingsInput, opts ...request.Option) (*GetReservedNodeExchangeOfferingsOutput, error) { - req, out := c.GetReservedNodeExchangeOfferingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyCluster = "ModifyCluster" - -// ModifyClusterRequest generates a "aws/request.Request" representing the -// client's request for the ModifyCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyCluster for more information on using the ModifyCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyClusterRequest method. -// req, resp := client.ModifyClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyCluster -func (c *Redshift) ModifyClusterRequest(input *ModifyClusterInput) (req *request.Request, output *ModifyClusterOutput) { - op := &request.Operation{ - Name: opModifyCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyClusterInput{} - } - - output = &ModifyClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyCluster API operation for Amazon Redshift. -// -// Modifies the settings for a cluster. For example, you can add another security -// or parameter group, update the preferred maintenance window, or change the -// master user password. Resetting a cluster password or modifying the security -// groups associated with a cluster do not need a reboot. However, modifying -// a parameter group requires a reboot for parameters to take effect. For more -// information about managing clusters, go to Amazon Redshift Clusters (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) -// in the Amazon Redshift Cluster Management Guide. -// -// You can also change node type and the number of nodes to scale up or down -// the cluster. When resizing a cluster, you must specify both the number of -// nodes and the node type even if one of the parameters does not change. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation ModifyCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidClusterStateFault "InvalidClusterState" -// The specified cluster is not in the available state. -// -// * ErrCodeInvalidClusterSecurityGroupStateFault "InvalidClusterSecurityGroupState" -// The state of the cluster security group is not available. -// -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeNumberOfNodesQuotaExceededFault "NumberOfNodesQuotaExceeded" -// The operation would exceed the number of nodes allotted to the account. For -// information about increasing your quota, go to Limits in Amazon Redshift -// (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeNumberOfNodesPerClusterLimitExceededFault "NumberOfNodesPerClusterLimitExceeded" -// The operation would exceed the number of nodes allowed for a cluster. -// -// * ErrCodeClusterSecurityGroupNotFoundFault "ClusterSecurityGroupNotFound" -// The cluster security group name does not refer to an existing cluster security -// group. -// -// * ErrCodeClusterParameterGroupNotFoundFault "ClusterParameterGroupNotFound" -// The parameter group name does not refer to an existing parameter group. -// -// * ErrCodeInsufficientClusterCapacityFault "InsufficientClusterCapacity" -// The number of nodes specified exceeds the allotted capacity of the cluster. -// -// * ErrCodeUnsupportedOptionFault "UnsupportedOptionFault" -// A request option was specified that is not supported. -// -// * ErrCodeUnauthorizedOperation "UnauthorizedOperation" -// Your account is not authorized to perform the requested operation. -// -// * ErrCodeHsmClientCertificateNotFoundFault "HsmClientCertificateNotFoundFault" -// There is no Amazon Redshift HSM client certificate with the specified identifier. -// -// * ErrCodeHsmConfigurationNotFoundFault "HsmConfigurationNotFoundFault" -// There is no Amazon Redshift HSM configuration with the specified identifier. -// -// * ErrCodeClusterAlreadyExistsFault "ClusterAlreadyExists" -// The account already has a cluster with the given identifier. -// -// * ErrCodeLimitExceededFault "LimitExceededFault" -// The encryption key has exceeded its grant limit in AWS KMS. -// -// * ErrCodeDependentServiceRequestThrottlingFault "DependentServiceRequestThrottlingFault" -// The request cannot be completed because a dependent service is throttling -// requests made by Amazon Redshift on your behalf. Wait and retry the request. -// -// * ErrCodeInvalidElasticIpFault "InvalidElasticIpFault" -// The Elastic IP (EIP) is invalid or cannot be found. -// -// * ErrCodeTableLimitExceededFault "TableLimitExceeded" -// The number of tables in the cluster exceeds the limit for the requested new -// cluster node type. -// -// * ErrCodeInvalidClusterTrackFault "InvalidClusterTrack" -// The provided cluster track name is not valid. -// -// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" -// The retention period specified is either in the past or is not a valid value. -// -// The value must be either -1 or an integer between 1 and 3,653. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyCluster -func (c *Redshift) ModifyCluster(input *ModifyClusterInput) (*ModifyClusterOutput, error) { - req, out := c.ModifyClusterRequest(input) - return out, req.Send() -} - -// ModifyClusterWithContext is the same as ModifyCluster with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) ModifyClusterWithContext(ctx aws.Context, input *ModifyClusterInput, opts ...request.Option) (*ModifyClusterOutput, error) { - req, out := c.ModifyClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyClusterDbRevision = "ModifyClusterDbRevision" - -// ModifyClusterDbRevisionRequest generates a "aws/request.Request" representing the -// client's request for the ModifyClusterDbRevision operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyClusterDbRevision for more information on using the ModifyClusterDbRevision -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyClusterDbRevisionRequest method. -// req, resp := client.ModifyClusterDbRevisionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterDbRevision -func (c *Redshift) ModifyClusterDbRevisionRequest(input *ModifyClusterDbRevisionInput) (req *request.Request, output *ModifyClusterDbRevisionOutput) { - op := &request.Operation{ - Name: opModifyClusterDbRevision, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyClusterDbRevisionInput{} - } - - output = &ModifyClusterDbRevisionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyClusterDbRevision API operation for Amazon Redshift. -// -// Modifies the database revision of a cluster. The database revision is a unique -// revision of the database running in a cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation ModifyClusterDbRevision for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeClusterOnLatestRevisionFault "ClusterOnLatestRevision" -// Cluster is already on the latest database revision. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterState" -// The specified cluster is not in the available state. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterDbRevision -func (c *Redshift) ModifyClusterDbRevision(input *ModifyClusterDbRevisionInput) (*ModifyClusterDbRevisionOutput, error) { - req, out := c.ModifyClusterDbRevisionRequest(input) - return out, req.Send() -} - -// ModifyClusterDbRevisionWithContext is the same as ModifyClusterDbRevision with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyClusterDbRevision for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) ModifyClusterDbRevisionWithContext(ctx aws.Context, input *ModifyClusterDbRevisionInput, opts ...request.Option) (*ModifyClusterDbRevisionOutput, error) { - req, out := c.ModifyClusterDbRevisionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyClusterIamRoles = "ModifyClusterIamRoles" - -// ModifyClusterIamRolesRequest generates a "aws/request.Request" representing the -// client's request for the ModifyClusterIamRoles operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyClusterIamRoles for more information on using the ModifyClusterIamRoles -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyClusterIamRolesRequest method. -// req, resp := client.ModifyClusterIamRolesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterIamRoles -func (c *Redshift) ModifyClusterIamRolesRequest(input *ModifyClusterIamRolesInput) (req *request.Request, output *ModifyClusterIamRolesOutput) { - op := &request.Operation{ - Name: opModifyClusterIamRoles, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyClusterIamRolesInput{} - } - - output = &ModifyClusterIamRolesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyClusterIamRoles API operation for Amazon Redshift. -// -// Modifies the list of AWS Identity and Access Management (IAM) roles that -// can be used by the cluster to access other AWS services. -// -// A cluster can have up to 10 IAM roles associated at any time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation ModifyClusterIamRoles for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidClusterStateFault "InvalidClusterState" -// The specified cluster is not in the available state. -// -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterIamRoles -func (c *Redshift) ModifyClusterIamRoles(input *ModifyClusterIamRolesInput) (*ModifyClusterIamRolesOutput, error) { - req, out := c.ModifyClusterIamRolesRequest(input) - return out, req.Send() -} - -// ModifyClusterIamRolesWithContext is the same as ModifyClusterIamRoles with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyClusterIamRoles for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) ModifyClusterIamRolesWithContext(ctx aws.Context, input *ModifyClusterIamRolesInput, opts ...request.Option) (*ModifyClusterIamRolesOutput, error) { - req, out := c.ModifyClusterIamRolesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyClusterMaintenance = "ModifyClusterMaintenance" - -// ModifyClusterMaintenanceRequest generates a "aws/request.Request" representing the -// client's request for the ModifyClusterMaintenance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyClusterMaintenance for more information on using the ModifyClusterMaintenance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyClusterMaintenanceRequest method. -// req, resp := client.ModifyClusterMaintenanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterMaintenance -func (c *Redshift) ModifyClusterMaintenanceRequest(input *ModifyClusterMaintenanceInput) (req *request.Request, output *ModifyClusterMaintenanceOutput) { - op := &request.Operation{ - Name: opModifyClusterMaintenance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyClusterMaintenanceInput{} - } - - output = &ModifyClusterMaintenanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyClusterMaintenance API operation for Amazon Redshift. -// -// Modifies the maintenance settings of a cluster. For example, you can defer -// a maintenance window. You can also update or cancel a deferment. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation ModifyClusterMaintenance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterMaintenance -func (c *Redshift) ModifyClusterMaintenance(input *ModifyClusterMaintenanceInput) (*ModifyClusterMaintenanceOutput, error) { - req, out := c.ModifyClusterMaintenanceRequest(input) - return out, req.Send() -} - -// ModifyClusterMaintenanceWithContext is the same as ModifyClusterMaintenance with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyClusterMaintenance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) ModifyClusterMaintenanceWithContext(ctx aws.Context, input *ModifyClusterMaintenanceInput, opts ...request.Option) (*ModifyClusterMaintenanceOutput, error) { - req, out := c.ModifyClusterMaintenanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyClusterParameterGroup = "ModifyClusterParameterGroup" - -// ModifyClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyClusterParameterGroup for more information on using the ModifyClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyClusterParameterGroupRequest method. -// req, resp := client.ModifyClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterParameterGroup -func (c *Redshift) ModifyClusterParameterGroupRequest(input *ModifyClusterParameterGroupInput) (req *request.Request, output *ClusterParameterGroupNameMessage) { - op := &request.Operation{ - Name: opModifyClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyClusterParameterGroupInput{} - } - - output = &ClusterParameterGroupNameMessage{} - req = c.newRequest(op, input, output) - return -} - -// ModifyClusterParameterGroup API operation for Amazon Redshift. -// -// Modifies the parameters of a parameter group. -// -// For more information about parameters and parameter groups, go to Amazon -// Redshift Parameter Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation ModifyClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterParameterGroupNotFoundFault "ClusterParameterGroupNotFound" -// The parameter group name does not refer to an existing parameter group. -// -// * ErrCodeInvalidClusterParameterGroupStateFault "InvalidClusterParameterGroupState" -// The cluster parameter group action can not be completed because another task -// is in progress that involves the parameter group. Wait a few moments and -// try the operation again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterParameterGroup -func (c *Redshift) ModifyClusterParameterGroup(input *ModifyClusterParameterGroupInput) (*ClusterParameterGroupNameMessage, error) { - req, out := c.ModifyClusterParameterGroupRequest(input) - return out, req.Send() -} - -// ModifyClusterParameterGroupWithContext is the same as ModifyClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) ModifyClusterParameterGroupWithContext(ctx aws.Context, input *ModifyClusterParameterGroupInput, opts ...request.Option) (*ClusterParameterGroupNameMessage, error) { - req, out := c.ModifyClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyClusterSnapshot = "ModifyClusterSnapshot" - -// ModifyClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the ModifyClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyClusterSnapshot for more information on using the ModifyClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyClusterSnapshotRequest method. -// req, resp := client.ModifyClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterSnapshot -func (c *Redshift) ModifyClusterSnapshotRequest(input *ModifyClusterSnapshotInput) (req *request.Request, output *ModifyClusterSnapshotOutput) { - op := &request.Operation{ - Name: opModifyClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyClusterSnapshotInput{} - } - - output = &ModifyClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyClusterSnapshot API operation for Amazon Redshift. -// -// Modifies the settings for a snapshot. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation ModifyClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidClusterSnapshotStateFault "InvalidClusterSnapshotState" -// The specified cluster snapshot is not in the available state, or other accounts -// are authorized to access the snapshot. -// -// * ErrCodeClusterSnapshotNotFoundFault "ClusterSnapshotNotFound" -// The snapshot identifier does not refer to an existing cluster snapshot. -// -// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" -// The retention period specified is either in the past or is not a valid value. -// -// The value must be either -1 or an integer between 1 and 3,653. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterSnapshot -func (c *Redshift) ModifyClusterSnapshot(input *ModifyClusterSnapshotInput) (*ModifyClusterSnapshotOutput, error) { - req, out := c.ModifyClusterSnapshotRequest(input) - return out, req.Send() -} - -// ModifyClusterSnapshotWithContext is the same as ModifyClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) ModifyClusterSnapshotWithContext(ctx aws.Context, input *ModifyClusterSnapshotInput, opts ...request.Option) (*ModifyClusterSnapshotOutput, error) { - req, out := c.ModifyClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyClusterSnapshotSchedule = "ModifyClusterSnapshotSchedule" - -// ModifyClusterSnapshotScheduleRequest generates a "aws/request.Request" representing the -// client's request for the ModifyClusterSnapshotSchedule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyClusterSnapshotSchedule for more information on using the ModifyClusterSnapshotSchedule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyClusterSnapshotScheduleRequest method. -// req, resp := client.ModifyClusterSnapshotScheduleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterSnapshotSchedule -func (c *Redshift) ModifyClusterSnapshotScheduleRequest(input *ModifyClusterSnapshotScheduleInput) (req *request.Request, output *ModifyClusterSnapshotScheduleOutput) { - op := &request.Operation{ - Name: opModifyClusterSnapshotSchedule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyClusterSnapshotScheduleInput{} - } - - output = &ModifyClusterSnapshotScheduleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyClusterSnapshotSchedule API operation for Amazon Redshift. -// -// Modifies a snapshot schedule for a cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation ModifyClusterSnapshotSchedule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeSnapshotScheduleNotFoundFault "SnapshotScheduleNotFound" -// We could not find the specified snapshot schedule. -// -// * ErrCodeInvalidClusterSnapshotScheduleStateFault "InvalidClusterSnapshotScheduleState" -// The cluster snapshot schedule state is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterSnapshotSchedule -func (c *Redshift) ModifyClusterSnapshotSchedule(input *ModifyClusterSnapshotScheduleInput) (*ModifyClusterSnapshotScheduleOutput, error) { - req, out := c.ModifyClusterSnapshotScheduleRequest(input) - return out, req.Send() -} - -// ModifyClusterSnapshotScheduleWithContext is the same as ModifyClusterSnapshotSchedule with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyClusterSnapshotSchedule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) ModifyClusterSnapshotScheduleWithContext(ctx aws.Context, input *ModifyClusterSnapshotScheduleInput, opts ...request.Option) (*ModifyClusterSnapshotScheduleOutput, error) { - req, out := c.ModifyClusterSnapshotScheduleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyClusterSubnetGroup = "ModifyClusterSubnetGroup" - -// ModifyClusterSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyClusterSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyClusterSubnetGroup for more information on using the ModifyClusterSubnetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyClusterSubnetGroupRequest method. -// req, resp := client.ModifyClusterSubnetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterSubnetGroup -func (c *Redshift) ModifyClusterSubnetGroupRequest(input *ModifyClusterSubnetGroupInput) (req *request.Request, output *ModifyClusterSubnetGroupOutput) { - op := &request.Operation{ - Name: opModifyClusterSubnetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyClusterSubnetGroupInput{} - } - - output = &ModifyClusterSubnetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyClusterSubnetGroup API operation for Amazon Redshift. -// -// Modifies a cluster subnet group to include the specified list of VPC subnets. -// The operation replaces the existing list of subnets with the new list of -// subnets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation ModifyClusterSubnetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterSubnetGroupNotFoundFault "ClusterSubnetGroupNotFoundFault" -// The cluster subnet group name does not refer to an existing cluster subnet -// group. -// -// * ErrCodeClusterSubnetQuotaExceededFault "ClusterSubnetQuotaExceededFault" -// The request would result in user exceeding the allowed number of subnets -// in a cluster subnet groups. For information about increasing your quota, -// go to Limits in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeSubnetAlreadyInUse "SubnetAlreadyInUse" -// A specified subnet is already in use by another cluster. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is not valid, or not all of the subnets are in the same -// VPC. -// -// * ErrCodeUnauthorizedOperation "UnauthorizedOperation" -// Your account is not authorized to perform the requested operation. -// -// * ErrCodeDependentServiceRequestThrottlingFault "DependentServiceRequestThrottlingFault" -// The request cannot be completed because a dependent service is throttling -// requests made by Amazon Redshift on your behalf. Wait and retry the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterSubnetGroup -func (c *Redshift) ModifyClusterSubnetGroup(input *ModifyClusterSubnetGroupInput) (*ModifyClusterSubnetGroupOutput, error) { - req, out := c.ModifyClusterSubnetGroupRequest(input) - return out, req.Send() -} - -// ModifyClusterSubnetGroupWithContext is the same as ModifyClusterSubnetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyClusterSubnetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) ModifyClusterSubnetGroupWithContext(ctx aws.Context, input *ModifyClusterSubnetGroupInput, opts ...request.Option) (*ModifyClusterSubnetGroupOutput, error) { - req, out := c.ModifyClusterSubnetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyEventSubscription = "ModifyEventSubscription" - -// ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the ModifyEventSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyEventSubscription for more information on using the ModifyEventSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyEventSubscriptionRequest method. -// req, resp := client.ModifyEventSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyEventSubscription -func (c *Redshift) ModifyEventSubscriptionRequest(input *ModifyEventSubscriptionInput) (req *request.Request, output *ModifyEventSubscriptionOutput) { - op := &request.Operation{ - Name: opModifyEventSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyEventSubscriptionInput{} - } - - output = &ModifyEventSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyEventSubscription API operation for Amazon Redshift. -// -// Modifies an existing Amazon Redshift event notification subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation ModifyEventSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" -// An Amazon Redshift event notification subscription with the specified name -// does not exist. -// -// * ErrCodeSNSInvalidTopicFault "SNSInvalidTopic" -// Amazon SNS has responded that there is a problem with the specified Amazon -// SNS topic. -// -// * ErrCodeSNSNoAuthorizationFault "SNSNoAuthorization" -// You do not have permission to publish to the specified Amazon SNS topic. -// -// * ErrCodeSNSTopicArnNotFoundFault "SNSTopicArnNotFound" -// An Amazon SNS topic with the specified Amazon Resource Name (ARN) does not -// exist. -// -// * ErrCodeSubscriptionEventIdNotFoundFault "SubscriptionEventIdNotFound" -// An Amazon Redshift event with the specified event ID does not exist. -// -// * ErrCodeSubscriptionCategoryNotFoundFault "SubscriptionCategoryNotFound" -// The value specified for the event category was not one of the allowed values, -// or it specified a category that does not apply to the specified source type. -// The allowed values are Configuration, Management, Monitoring, and Security. -// -// * ErrCodeSubscriptionSeverityNotFoundFault "SubscriptionSeverityNotFound" -// The value specified for the event severity was not one of the allowed values, -// or it specified a severity that does not apply to the specified source type. -// The allowed values are ERROR and INFO. -// -// * ErrCodeSourceNotFoundFault "SourceNotFound" -// The specified Amazon Redshift event source could not be found. -// -// * ErrCodeInvalidSubscriptionStateFault "InvalidSubscriptionStateFault" -// The subscription request is invalid because it is a duplicate request. This -// subscription request is already in progress. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyEventSubscription -func (c *Redshift) ModifyEventSubscription(input *ModifyEventSubscriptionInput) (*ModifyEventSubscriptionOutput, error) { - req, out := c.ModifyEventSubscriptionRequest(input) - return out, req.Send() -} - -// ModifyEventSubscriptionWithContext is the same as ModifyEventSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyEventSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) ModifyEventSubscriptionWithContext(ctx aws.Context, input *ModifyEventSubscriptionInput, opts ...request.Option) (*ModifyEventSubscriptionOutput, error) { - req, out := c.ModifyEventSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifySnapshotCopyRetentionPeriod = "ModifySnapshotCopyRetentionPeriod" - -// ModifySnapshotCopyRetentionPeriodRequest generates a "aws/request.Request" representing the -// client's request for the ModifySnapshotCopyRetentionPeriod operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifySnapshotCopyRetentionPeriod for more information on using the ModifySnapshotCopyRetentionPeriod -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifySnapshotCopyRetentionPeriodRequest method. -// req, resp := client.ModifySnapshotCopyRetentionPeriodRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifySnapshotCopyRetentionPeriod -func (c *Redshift) ModifySnapshotCopyRetentionPeriodRequest(input *ModifySnapshotCopyRetentionPeriodInput) (req *request.Request, output *ModifySnapshotCopyRetentionPeriodOutput) { - op := &request.Operation{ - Name: opModifySnapshotCopyRetentionPeriod, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifySnapshotCopyRetentionPeriodInput{} - } - - output = &ModifySnapshotCopyRetentionPeriodOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifySnapshotCopyRetentionPeriod API operation for Amazon Redshift. -// -// Modifies the number of days to retain snapshots in the destination AWS Region -// after they are copied from the source AWS Region. By default, this operation -// only changes the retention period of copied automated snapshots. The retention -// periods for both new and existing copied automated snapshots are updated -// with the new retention period. You can set the manual option to change only -// the retention periods of copied manual snapshots. If you set this option, -// only newly copied manual snapshots have the new retention period. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation ModifySnapshotCopyRetentionPeriod for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeSnapshotCopyDisabledFault "SnapshotCopyDisabledFault" -// Cross-region snapshot copy was temporarily disabled. Try your request again. -// -// * ErrCodeUnauthorizedOperation "UnauthorizedOperation" -// Your account is not authorized to perform the requested operation. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterState" -// The specified cluster is not in the available state. -// -// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" -// The retention period specified is either in the past or is not a valid value. -// -// The value must be either -1 or an integer between 1 and 3,653. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifySnapshotCopyRetentionPeriod -func (c *Redshift) ModifySnapshotCopyRetentionPeriod(input *ModifySnapshotCopyRetentionPeriodInput) (*ModifySnapshotCopyRetentionPeriodOutput, error) { - req, out := c.ModifySnapshotCopyRetentionPeriodRequest(input) - return out, req.Send() -} - -// ModifySnapshotCopyRetentionPeriodWithContext is the same as ModifySnapshotCopyRetentionPeriod with the addition of -// the ability to pass a context and additional request options. -// -// See ModifySnapshotCopyRetentionPeriod for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) ModifySnapshotCopyRetentionPeriodWithContext(ctx aws.Context, input *ModifySnapshotCopyRetentionPeriodInput, opts ...request.Option) (*ModifySnapshotCopyRetentionPeriodOutput, error) { - req, out := c.ModifySnapshotCopyRetentionPeriodRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifySnapshotSchedule = "ModifySnapshotSchedule" - -// ModifySnapshotScheduleRequest generates a "aws/request.Request" representing the -// client's request for the ModifySnapshotSchedule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifySnapshotSchedule for more information on using the ModifySnapshotSchedule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifySnapshotScheduleRequest method. -// req, resp := client.ModifySnapshotScheduleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifySnapshotSchedule -func (c *Redshift) ModifySnapshotScheduleRequest(input *ModifySnapshotScheduleInput) (req *request.Request, output *ModifySnapshotScheduleOutput) { - op := &request.Operation{ - Name: opModifySnapshotSchedule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifySnapshotScheduleInput{} - } - - output = &ModifySnapshotScheduleOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifySnapshotSchedule API operation for Amazon Redshift. -// -// Modifies a snapshot schedule. Any schedule associated with a cluster is modified -// asynchronously. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation ModifySnapshotSchedule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidScheduleFault "InvalidSchedule" -// The schedule you submitted isn't valid. -// -// * ErrCodeSnapshotScheduleNotFoundFault "SnapshotScheduleNotFound" -// We could not find the specified snapshot schedule. -// -// * ErrCodeSnapshotScheduleUpdateInProgressFault "SnapshotScheduleUpdateInProgress" -// The specified snapshot schedule is already being updated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifySnapshotSchedule -func (c *Redshift) ModifySnapshotSchedule(input *ModifySnapshotScheduleInput) (*ModifySnapshotScheduleOutput, error) { - req, out := c.ModifySnapshotScheduleRequest(input) - return out, req.Send() -} - -// ModifySnapshotScheduleWithContext is the same as ModifySnapshotSchedule with the addition of -// the ability to pass a context and additional request options. -// -// See ModifySnapshotSchedule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) ModifySnapshotScheduleWithContext(ctx aws.Context, input *ModifySnapshotScheduleInput, opts ...request.Option) (*ModifySnapshotScheduleOutput, error) { - req, out := c.ModifySnapshotScheduleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPurchaseReservedNodeOffering = "PurchaseReservedNodeOffering" - -// PurchaseReservedNodeOfferingRequest generates a "aws/request.Request" representing the -// client's request for the PurchaseReservedNodeOffering operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PurchaseReservedNodeOffering for more information on using the PurchaseReservedNodeOffering -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PurchaseReservedNodeOfferingRequest method. -// req, resp := client.PurchaseReservedNodeOfferingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/PurchaseReservedNodeOffering -func (c *Redshift) PurchaseReservedNodeOfferingRequest(input *PurchaseReservedNodeOfferingInput) (req *request.Request, output *PurchaseReservedNodeOfferingOutput) { - op := &request.Operation{ - Name: opPurchaseReservedNodeOffering, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PurchaseReservedNodeOfferingInput{} - } - - output = &PurchaseReservedNodeOfferingOutput{} - req = c.newRequest(op, input, output) - return -} - -// PurchaseReservedNodeOffering API operation for Amazon Redshift. -// -// Allows you to purchase reserved nodes. Amazon Redshift offers a predefined -// set of reserved node offerings. You can purchase one or more of the offerings. -// You can call the DescribeReservedNodeOfferings API to obtain the available -// reserved node offerings. You can call this API by providing a specific reserved -// node offering and the number of nodes you want to reserve. -// -// For more information about reserved node offerings, go to Purchasing Reserved -// Nodes (http://docs.aws.amazon.com/redshift/latest/mgmt/purchase-reserved-node-instance.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation PurchaseReservedNodeOffering for usage and error information. -// -// Returned Error Codes: -// * ErrCodeReservedNodeOfferingNotFoundFault "ReservedNodeOfferingNotFound" -// Specified offering does not exist. -// -// * ErrCodeReservedNodeAlreadyExistsFault "ReservedNodeAlreadyExists" -// User already has a reservation with the given identifier. -// -// * ErrCodeReservedNodeQuotaExceededFault "ReservedNodeQuotaExceeded" -// Request would exceed the user's compute node quota. For information about -// increasing your quota, go to Limits in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" -// The requested operation isn't supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/PurchaseReservedNodeOffering -func (c *Redshift) PurchaseReservedNodeOffering(input *PurchaseReservedNodeOfferingInput) (*PurchaseReservedNodeOfferingOutput, error) { - req, out := c.PurchaseReservedNodeOfferingRequest(input) - return out, req.Send() -} - -// PurchaseReservedNodeOfferingWithContext is the same as PurchaseReservedNodeOffering with the addition of -// the ability to pass a context and additional request options. -// -// See PurchaseReservedNodeOffering for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) PurchaseReservedNodeOfferingWithContext(ctx aws.Context, input *PurchaseReservedNodeOfferingInput, opts ...request.Option) (*PurchaseReservedNodeOfferingOutput, error) { - req, out := c.PurchaseReservedNodeOfferingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRebootCluster = "RebootCluster" - -// RebootClusterRequest generates a "aws/request.Request" representing the -// client's request for the RebootCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebootCluster for more information on using the RebootCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebootClusterRequest method. -// req, resp := client.RebootClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/RebootCluster -func (c *Redshift) RebootClusterRequest(input *RebootClusterInput) (req *request.Request, output *RebootClusterOutput) { - op := &request.Operation{ - Name: opRebootCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RebootClusterInput{} - } - - output = &RebootClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// RebootCluster API operation for Amazon Redshift. -// -// Reboots a cluster. This action is taken as soon as possible. It results in -// a momentary outage to the cluster, during which the cluster status is set -// to rebooting. A cluster event is created when the reboot is completed. Any -// pending cluster modifications (see ModifyCluster) are applied at this reboot. -// For more information about managing clusters, go to Amazon Redshift Clusters -// (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation RebootCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidClusterStateFault "InvalidClusterState" -// The specified cluster is not in the available state. -// -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/RebootCluster -func (c *Redshift) RebootCluster(input *RebootClusterInput) (*RebootClusterOutput, error) { - req, out := c.RebootClusterRequest(input) - return out, req.Send() -} - -// RebootClusterWithContext is the same as RebootCluster with the addition of -// the ability to pass a context and additional request options. -// -// See RebootCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) RebootClusterWithContext(ctx aws.Context, input *RebootClusterInput, opts ...request.Option) (*RebootClusterOutput, error) { - req, out := c.RebootClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetClusterParameterGroup = "ResetClusterParameterGroup" - -// ResetClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ResetClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetClusterParameterGroup for more information on using the ResetClusterParameterGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetClusterParameterGroupRequest method. -// req, resp := client.ResetClusterParameterGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ResetClusterParameterGroup -func (c *Redshift) ResetClusterParameterGroupRequest(input *ResetClusterParameterGroupInput) (req *request.Request, output *ClusterParameterGroupNameMessage) { - op := &request.Operation{ - Name: opResetClusterParameterGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetClusterParameterGroupInput{} - } - - output = &ClusterParameterGroupNameMessage{} - req = c.newRequest(op, input, output) - return -} - -// ResetClusterParameterGroup API operation for Amazon Redshift. -// -// Sets one or more parameters of the specified parameter group to their default -// values and sets the source values of the parameters to "engine-default". -// To reset the entire parameter group specify the ResetAllParameters parameter. -// For parameter changes to take effect you must reboot any associated clusters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation ResetClusterParameterGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidClusterParameterGroupStateFault "InvalidClusterParameterGroupState" -// The cluster parameter group action can not be completed because another task -// is in progress that involves the parameter group. Wait a few moments and -// try the operation again. -// -// * ErrCodeClusterParameterGroupNotFoundFault "ClusterParameterGroupNotFound" -// The parameter group name does not refer to an existing parameter group. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ResetClusterParameterGroup -func (c *Redshift) ResetClusterParameterGroup(input *ResetClusterParameterGroupInput) (*ClusterParameterGroupNameMessage, error) { - req, out := c.ResetClusterParameterGroupRequest(input) - return out, req.Send() -} - -// ResetClusterParameterGroupWithContext is the same as ResetClusterParameterGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ResetClusterParameterGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) ResetClusterParameterGroupWithContext(ctx aws.Context, input *ResetClusterParameterGroupInput, opts ...request.Option) (*ClusterParameterGroupNameMessage, error) { - req, out := c.ResetClusterParameterGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResizeCluster = "ResizeCluster" - -// ResizeClusterRequest generates a "aws/request.Request" representing the -// client's request for the ResizeCluster operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResizeCluster for more information on using the ResizeCluster -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResizeClusterRequest method. -// req, resp := client.ResizeClusterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ResizeCluster -func (c *Redshift) ResizeClusterRequest(input *ResizeClusterInput) (req *request.Request, output *ResizeClusterOutput) { - op := &request.Operation{ - Name: opResizeCluster, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResizeClusterInput{} - } - - output = &ResizeClusterOutput{} - req = c.newRequest(op, input, output) - return -} - -// ResizeCluster API operation for Amazon Redshift. -// -// Changes the size of the cluster. You can change the cluster's type, or change -// the number or type of nodes. The default behavior is to use the elastic resize -// method. With an elastic resize, your cluster is available for read and write -// operations more quickly than with the classic resize method. -// -// Elastic resize operations have the following restrictions: -// -// * You can only resize clusters of the following types: -// -// dc2.large -// -// dc2.8xlarge -// -// ds2.xlarge -// -// ds2.8xlarge -// -// * The type of nodes that you add must match the node type for the cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation ResizeCluster for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidClusterStateFault "InvalidClusterState" -// The specified cluster is not in the available state. -// -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeNumberOfNodesQuotaExceededFault "NumberOfNodesQuotaExceeded" -// The operation would exceed the number of nodes allotted to the account. For -// information about increasing your quota, go to Limits in Amazon Redshift -// (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeNumberOfNodesPerClusterLimitExceededFault "NumberOfNodesPerClusterLimitExceeded" -// The operation would exceed the number of nodes allowed for a cluster. -// -// * ErrCodeInsufficientClusterCapacityFault "InsufficientClusterCapacity" -// The number of nodes specified exceeds the allotted capacity of the cluster. -// -// * ErrCodeUnsupportedOptionFault "UnsupportedOptionFault" -// A request option was specified that is not supported. -// -// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" -// The requested operation isn't supported. -// -// * ErrCodeUnauthorizedOperation "UnauthorizedOperation" -// Your account is not authorized to perform the requested operation. -// -// * ErrCodeLimitExceededFault "LimitExceededFault" -// The encryption key has exceeded its grant limit in AWS KMS. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ResizeCluster -func (c *Redshift) ResizeCluster(input *ResizeClusterInput) (*ResizeClusterOutput, error) { - req, out := c.ResizeClusterRequest(input) - return out, req.Send() -} - -// ResizeClusterWithContext is the same as ResizeCluster with the addition of -// the ability to pass a context and additional request options. -// -// See ResizeCluster for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) ResizeClusterWithContext(ctx aws.Context, input *ResizeClusterInput, opts ...request.Option) (*ResizeClusterOutput, error) { - req, out := c.ResizeClusterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreFromClusterSnapshot = "RestoreFromClusterSnapshot" - -// RestoreFromClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the RestoreFromClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreFromClusterSnapshot for more information on using the RestoreFromClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreFromClusterSnapshotRequest method. -// req, resp := client.RestoreFromClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/RestoreFromClusterSnapshot -func (c *Redshift) RestoreFromClusterSnapshotRequest(input *RestoreFromClusterSnapshotInput) (req *request.Request, output *RestoreFromClusterSnapshotOutput) { - op := &request.Operation{ - Name: opRestoreFromClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreFromClusterSnapshotInput{} - } - - output = &RestoreFromClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// RestoreFromClusterSnapshot API operation for Amazon Redshift. -// -// Creates a new cluster from a snapshot. By default, Amazon Redshift creates -// the resulting cluster with the same configuration as the original cluster -// from which the snapshot was created, except that the new cluster is created -// with the default cluster security and parameter groups. After Amazon Redshift -// creates the cluster, you can use the ModifyCluster API to associate a different -// security group and different parameter group with the restored cluster. If -// you are using a DS node type, you can also choose to change to another DS -// node type of the same size during restore. -// -// If you restore a cluster into a VPC, you must provide a cluster subnet group -// where you want the cluster restored. -// -// For more information about working with snapshots, go to Amazon Redshift -// Snapshots (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation RestoreFromClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessToSnapshotDeniedFault "AccessToSnapshotDenied" -// The owner of the specified snapshot has not authorized your account to access -// the snapshot. -// -// * ErrCodeClusterAlreadyExistsFault "ClusterAlreadyExists" -// The account already has a cluster with the given identifier. -// -// * ErrCodeClusterSnapshotNotFoundFault "ClusterSnapshotNotFound" -// The snapshot identifier does not refer to an existing cluster snapshot. -// -// * ErrCodeClusterQuotaExceededFault "ClusterQuotaExceeded" -// The request would exceed the allowed number of cluster instances for this -// account. For information about increasing your quota, go to Limits in Amazon -// Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeInsufficientClusterCapacityFault "InsufficientClusterCapacity" -// The number of nodes specified exceeds the allotted capacity of the cluster. -// -// * ErrCodeInvalidClusterSnapshotStateFault "InvalidClusterSnapshotState" -// The specified cluster snapshot is not in the available state, or other accounts -// are authorized to access the snapshot. -// -// * ErrCodeInvalidRestoreFault "InvalidRestore" -// The restore is invalid. -// -// * ErrCodeNumberOfNodesQuotaExceededFault "NumberOfNodesQuotaExceeded" -// The operation would exceed the number of nodes allotted to the account. For -// information about increasing your quota, go to Limits in Amazon Redshift -// (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. -// -// * ErrCodeNumberOfNodesPerClusterLimitExceededFault "NumberOfNodesPerClusterLimitExceeded" -// The operation would exceed the number of nodes allowed for a cluster. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The cluster subnet group does not cover all Availability Zones. -// -// * ErrCodeInvalidClusterSubnetGroupStateFault "InvalidClusterSubnetGroupStateFault" -// The cluster subnet group cannot be deleted because it is in use. -// -// * ErrCodeInvalidSubnet "InvalidSubnet" -// The requested subnet is not valid, or not all of the subnets are in the same -// VPC. -// -// * ErrCodeClusterSubnetGroupNotFoundFault "ClusterSubnetGroupNotFoundFault" -// The cluster subnet group name does not refer to an existing cluster subnet -// group. -// -// * ErrCodeUnauthorizedOperation "UnauthorizedOperation" -// Your account is not authorized to perform the requested operation. -// -// * ErrCodeHsmClientCertificateNotFoundFault "HsmClientCertificateNotFoundFault" -// There is no Amazon Redshift HSM client certificate with the specified identifier. -// -// * ErrCodeHsmConfigurationNotFoundFault "HsmConfigurationNotFoundFault" -// There is no Amazon Redshift HSM configuration with the specified identifier. -// -// * ErrCodeInvalidElasticIpFault "InvalidElasticIpFault" -// The Elastic IP (EIP) is invalid or cannot be found. -// -// * ErrCodeClusterParameterGroupNotFoundFault "ClusterParameterGroupNotFound" -// The parameter group name does not refer to an existing parameter group. -// -// * ErrCodeClusterSecurityGroupNotFoundFault "ClusterSecurityGroupNotFound" -// The cluster security group name does not refer to an existing cluster security -// group. -// -// * ErrCodeLimitExceededFault "LimitExceededFault" -// The encryption key has exceeded its grant limit in AWS KMS. -// -// * ErrCodeDependentServiceRequestThrottlingFault "DependentServiceRequestThrottlingFault" -// The request cannot be completed because a dependent service is throttling -// requests made by Amazon Redshift on your behalf. Wait and retry the request. -// -// * ErrCodeInvalidClusterTrackFault "InvalidClusterTrack" -// The provided cluster track name is not valid. -// -// * ErrCodeSnapshotScheduleNotFoundFault "SnapshotScheduleNotFound" -// We could not find the specified snapshot schedule. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/RestoreFromClusterSnapshot -func (c *Redshift) RestoreFromClusterSnapshot(input *RestoreFromClusterSnapshotInput) (*RestoreFromClusterSnapshotOutput, error) { - req, out := c.RestoreFromClusterSnapshotRequest(input) - return out, req.Send() -} - -// RestoreFromClusterSnapshotWithContext is the same as RestoreFromClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreFromClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) RestoreFromClusterSnapshotWithContext(ctx aws.Context, input *RestoreFromClusterSnapshotInput, opts ...request.Option) (*RestoreFromClusterSnapshotOutput, error) { - req, out := c.RestoreFromClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreTableFromClusterSnapshot = "RestoreTableFromClusterSnapshot" - -// RestoreTableFromClusterSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the RestoreTableFromClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreTableFromClusterSnapshot for more information on using the RestoreTableFromClusterSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreTableFromClusterSnapshotRequest method. -// req, resp := client.RestoreTableFromClusterSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/RestoreTableFromClusterSnapshot -func (c *Redshift) RestoreTableFromClusterSnapshotRequest(input *RestoreTableFromClusterSnapshotInput) (req *request.Request, output *RestoreTableFromClusterSnapshotOutput) { - op := &request.Operation{ - Name: opRestoreTableFromClusterSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreTableFromClusterSnapshotInput{} - } - - output = &RestoreTableFromClusterSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// RestoreTableFromClusterSnapshot API operation for Amazon Redshift. -// -// Creates a new table from a table in an Amazon Redshift cluster snapshot. -// You must create the new table within the Amazon Redshift cluster that the -// snapshot was taken from. -// -// You cannot use RestoreTableFromClusterSnapshot to restore a table with the -// same name as an existing table in an Amazon Redshift cluster. That is, you -// cannot overwrite an existing table in a cluster with a restored table. If -// you want to replace your original table with a new, restored table, then -// rename or drop your original table before you call RestoreTableFromClusterSnapshot. -// When you have renamed your original table, then you can pass the original -// name of the table as the NewTableName parameter value in the call to RestoreTableFromClusterSnapshot. -// This way, you can replace the original table with the table created from -// the snapshot. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation RestoreTableFromClusterSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterSnapshotNotFoundFault "ClusterSnapshotNotFound" -// The snapshot identifier does not refer to an existing cluster snapshot. -// -// * ErrCodeInProgressTableRestoreQuotaExceededFault "InProgressTableRestoreQuotaExceededFault" -// You have exceeded the allowed number of table restore requests. Wait for -// your current table restore requests to complete before making a new request. -// -// * ErrCodeInvalidClusterSnapshotStateFault "InvalidClusterSnapshotState" -// The specified cluster snapshot is not in the available state, or other accounts -// are authorized to access the snapshot. -// -// * ErrCodeInvalidTableRestoreArgumentFault "InvalidTableRestoreArgument" -// The value specified for the sourceDatabaseName, sourceSchemaName, or sourceTableName -// parameter, or a combination of these, doesn't exist in the snapshot. -// -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterState" -// The specified cluster is not in the available state. -// -// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" -// The requested operation isn't supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/RestoreTableFromClusterSnapshot -func (c *Redshift) RestoreTableFromClusterSnapshot(input *RestoreTableFromClusterSnapshotInput) (*RestoreTableFromClusterSnapshotOutput, error) { - req, out := c.RestoreTableFromClusterSnapshotRequest(input) - return out, req.Send() -} - -// RestoreTableFromClusterSnapshotWithContext is the same as RestoreTableFromClusterSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreTableFromClusterSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) RestoreTableFromClusterSnapshotWithContext(ctx aws.Context, input *RestoreTableFromClusterSnapshotInput, opts ...request.Option) (*RestoreTableFromClusterSnapshotOutput, error) { - req, out := c.RestoreTableFromClusterSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRevokeClusterSecurityGroupIngress = "RevokeClusterSecurityGroupIngress" - -// RevokeClusterSecurityGroupIngressRequest generates a "aws/request.Request" representing the -// client's request for the RevokeClusterSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RevokeClusterSecurityGroupIngress for more information on using the RevokeClusterSecurityGroupIngress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RevokeClusterSecurityGroupIngressRequest method. -// req, resp := client.RevokeClusterSecurityGroupIngressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/RevokeClusterSecurityGroupIngress -func (c *Redshift) RevokeClusterSecurityGroupIngressRequest(input *RevokeClusterSecurityGroupIngressInput) (req *request.Request, output *RevokeClusterSecurityGroupIngressOutput) { - op := &request.Operation{ - Name: opRevokeClusterSecurityGroupIngress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RevokeClusterSecurityGroupIngressInput{} - } - - output = &RevokeClusterSecurityGroupIngressOutput{} - req = c.newRequest(op, input, output) - return -} - -// RevokeClusterSecurityGroupIngress API operation for Amazon Redshift. -// -// Revokes an ingress rule in an Amazon Redshift security group for a previously -// authorized IP range or Amazon EC2 security group. To add an ingress rule, -// see AuthorizeClusterSecurityGroupIngress. For information about managing -// security groups, go to Amazon Redshift Cluster Security Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation RevokeClusterSecurityGroupIngress for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterSecurityGroupNotFoundFault "ClusterSecurityGroupNotFound" -// The cluster security group name does not refer to an existing cluster security -// group. -// -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// The specified CIDR IP range or EC2 security group is not authorized for the -// specified cluster security group. -// -// * ErrCodeInvalidClusterSecurityGroupStateFault "InvalidClusterSecurityGroupState" -// The state of the cluster security group is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/RevokeClusterSecurityGroupIngress -func (c *Redshift) RevokeClusterSecurityGroupIngress(input *RevokeClusterSecurityGroupIngressInput) (*RevokeClusterSecurityGroupIngressOutput, error) { - req, out := c.RevokeClusterSecurityGroupIngressRequest(input) - return out, req.Send() -} - -// RevokeClusterSecurityGroupIngressWithContext is the same as RevokeClusterSecurityGroupIngress with the addition of -// the ability to pass a context and additional request options. -// -// See RevokeClusterSecurityGroupIngress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) RevokeClusterSecurityGroupIngressWithContext(ctx aws.Context, input *RevokeClusterSecurityGroupIngressInput, opts ...request.Option) (*RevokeClusterSecurityGroupIngressOutput, error) { - req, out := c.RevokeClusterSecurityGroupIngressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRevokeSnapshotAccess = "RevokeSnapshotAccess" - -// RevokeSnapshotAccessRequest generates a "aws/request.Request" representing the -// client's request for the RevokeSnapshotAccess operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RevokeSnapshotAccess for more information on using the RevokeSnapshotAccess -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RevokeSnapshotAccessRequest method. -// req, resp := client.RevokeSnapshotAccessRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/RevokeSnapshotAccess -func (c *Redshift) RevokeSnapshotAccessRequest(input *RevokeSnapshotAccessInput) (req *request.Request, output *RevokeSnapshotAccessOutput) { - op := &request.Operation{ - Name: opRevokeSnapshotAccess, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RevokeSnapshotAccessInput{} - } - - output = &RevokeSnapshotAccessOutput{} - req = c.newRequest(op, input, output) - return -} - -// RevokeSnapshotAccess API operation for Amazon Redshift. -// -// Removes the ability of the specified AWS customer account to restore the -// specified snapshot. If the account is currently restoring the snapshot, the -// restore will run to completion. -// -// For more information about working with snapshots, go to Amazon Redshift -// Snapshots (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html) -// in the Amazon Redshift Cluster Management Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation RevokeSnapshotAccess for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessToSnapshotDeniedFault "AccessToSnapshotDenied" -// The owner of the specified snapshot has not authorized your account to access -// the snapshot. -// -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// The specified CIDR IP range or EC2 security group is not authorized for the -// specified cluster security group. -// -// * ErrCodeClusterSnapshotNotFoundFault "ClusterSnapshotNotFound" -// The snapshot identifier does not refer to an existing cluster snapshot. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/RevokeSnapshotAccess -func (c *Redshift) RevokeSnapshotAccess(input *RevokeSnapshotAccessInput) (*RevokeSnapshotAccessOutput, error) { - req, out := c.RevokeSnapshotAccessRequest(input) - return out, req.Send() -} - -// RevokeSnapshotAccessWithContext is the same as RevokeSnapshotAccess with the addition of -// the ability to pass a context and additional request options. -// -// See RevokeSnapshotAccess for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) RevokeSnapshotAccessWithContext(ctx aws.Context, input *RevokeSnapshotAccessInput, opts ...request.Option) (*RevokeSnapshotAccessOutput, error) { - req, out := c.RevokeSnapshotAccessRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRotateEncryptionKey = "RotateEncryptionKey" - -// RotateEncryptionKeyRequest generates a "aws/request.Request" representing the -// client's request for the RotateEncryptionKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RotateEncryptionKey for more information on using the RotateEncryptionKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RotateEncryptionKeyRequest method. -// req, resp := client.RotateEncryptionKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/RotateEncryptionKey -func (c *Redshift) RotateEncryptionKeyRequest(input *RotateEncryptionKeyInput) (req *request.Request, output *RotateEncryptionKeyOutput) { - op := &request.Operation{ - Name: opRotateEncryptionKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RotateEncryptionKeyInput{} - } - - output = &RotateEncryptionKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// RotateEncryptionKey API operation for Amazon Redshift. -// -// Rotates the encryption keys for a cluster. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Redshift's -// API operation RotateEncryptionKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeClusterNotFoundFault "ClusterNotFound" -// The ClusterIdentifier parameter does not refer to an existing cluster. -// -// * ErrCodeInvalidClusterStateFault "InvalidClusterState" -// The specified cluster is not in the available state. -// -// * ErrCodeDependentServiceRequestThrottlingFault "DependentServiceRequestThrottlingFault" -// The request cannot be completed because a dependent service is throttling -// requests made by Amazon Redshift on your behalf. Wait and retry the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/RotateEncryptionKey -func (c *Redshift) RotateEncryptionKey(input *RotateEncryptionKeyInput) (*RotateEncryptionKeyOutput, error) { - req, out := c.RotateEncryptionKeyRequest(input) - return out, req.Send() -} - -// RotateEncryptionKeyWithContext is the same as RotateEncryptionKey with the addition of -// the ability to pass a context and additional request options. -// -// See RotateEncryptionKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) RotateEncryptionKeyWithContext(ctx aws.Context, input *RotateEncryptionKeyInput, opts ...request.Option) (*RotateEncryptionKeyOutput, error) { - req, out := c.RotateEncryptionKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AcceptReservedNodeExchangeInput struct { - _ struct{} `type:"structure"` - - // A string representing the node identifier of the DC1 Reserved Node to be - // exchanged. - // - // ReservedNodeId is a required field - ReservedNodeId *string `type:"string" required:"true"` - - // The unique identifier of the DC2 Reserved Node offering to be used for the - // exchange. You can obtain the value for the parameter by calling GetReservedNodeExchangeOfferings - // - // TargetReservedNodeOfferingId is a required field - TargetReservedNodeOfferingId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AcceptReservedNodeExchangeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptReservedNodeExchangeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AcceptReservedNodeExchangeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AcceptReservedNodeExchangeInput"} - if s.ReservedNodeId == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedNodeId")) - } - if s.TargetReservedNodeOfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("TargetReservedNodeOfferingId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReservedNodeId sets the ReservedNodeId field's value. -func (s *AcceptReservedNodeExchangeInput) SetReservedNodeId(v string) *AcceptReservedNodeExchangeInput { - s.ReservedNodeId = &v - return s -} - -// SetTargetReservedNodeOfferingId sets the TargetReservedNodeOfferingId field's value. -func (s *AcceptReservedNodeExchangeInput) SetTargetReservedNodeOfferingId(v string) *AcceptReservedNodeExchangeInput { - s.TargetReservedNodeOfferingId = &v - return s -} - -type AcceptReservedNodeExchangeOutput struct { - _ struct{} `type:"structure"` - - // Describes a reserved node. You can call the DescribeReservedNodeOfferings - // API to obtain the available reserved node offerings. - ExchangedReservedNode *ReservedNode `type:"structure"` -} - -// String returns the string representation -func (s AcceptReservedNodeExchangeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptReservedNodeExchangeOutput) GoString() string { - return s.String() -} - -// SetExchangedReservedNode sets the ExchangedReservedNode field's value. -func (s *AcceptReservedNodeExchangeOutput) SetExchangedReservedNode(v *ReservedNode) *AcceptReservedNodeExchangeOutput { - s.ExchangedReservedNode = v - return s -} - -// A name value pair that describes an aspect of an account. -type AccountAttribute struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - AttributeName *string `type:"string"` - - // A list of attribute values. - AttributeValues []*AttributeValueTarget `locationNameList:"AttributeValueTarget" type:"list"` -} - -// String returns the string representation -func (s AccountAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountAttribute) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *AccountAttribute) SetAttributeName(v string) *AccountAttribute { - s.AttributeName = &v - return s -} - -// SetAttributeValues sets the AttributeValues field's value. -func (s *AccountAttribute) SetAttributeValues(v []*AttributeValueTarget) *AccountAttribute { - s.AttributeValues = v - return s -} - -// Describes an AWS customer account authorized to restore a snapshot. -type AccountWithRestoreAccess struct { - _ struct{} `type:"structure"` - - // The identifier of an AWS support account authorized to restore a snapshot. - // For AWS support, the identifier is amazon-redshift-support. - AccountAlias *string `type:"string"` - - // The identifier of an AWS customer account authorized to restore a snapshot. - AccountId *string `type:"string"` -} - -// String returns the string representation -func (s AccountWithRestoreAccess) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountWithRestoreAccess) GoString() string { - return s.String() -} - -// SetAccountAlias sets the AccountAlias field's value. -func (s *AccountWithRestoreAccess) SetAccountAlias(v string) *AccountWithRestoreAccess { - s.AccountAlias = &v - return s -} - -// SetAccountId sets the AccountId field's value. -func (s *AccountWithRestoreAccess) SetAccountId(v string) *AccountWithRestoreAccess { - s.AccountId = &v - return s -} - -// Describes an attribute value. -type AttributeValueTarget struct { - _ struct{} `type:"structure"` - - // The value of the attribute. - AttributeValue *string `type:"string"` -} - -// String returns the string representation -func (s AttributeValueTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttributeValueTarget) GoString() string { - return s.String() -} - -// SetAttributeValue sets the AttributeValue field's value. -func (s *AttributeValueTarget) SetAttributeValue(v string) *AttributeValueTarget { - s.AttributeValue = &v - return s -} - -type AuthorizeClusterSecurityGroupIngressInput struct { - _ struct{} `type:"structure"` - - // The IP range to be added the Amazon Redshift security group. - CIDRIP *string `type:"string"` - - // The name of the security group to which the ingress rule is added. - // - // ClusterSecurityGroupName is a required field - ClusterSecurityGroupName *string `type:"string" required:"true"` - - // The EC2 security group to be added the Amazon Redshift security group. - EC2SecurityGroupName *string `type:"string"` - - // The AWS account number of the owner of the security group specified by the - // EC2SecurityGroupName parameter. The AWS Access Key ID is not an acceptable - // value. - // - // Example: 111122223333 - EC2SecurityGroupOwnerId *string `type:"string"` -} - -// String returns the string representation -func (s AuthorizeClusterSecurityGroupIngressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeClusterSecurityGroupIngressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AuthorizeClusterSecurityGroupIngressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuthorizeClusterSecurityGroupIngressInput"} - if s.ClusterSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterSecurityGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCIDRIP sets the CIDRIP field's value. -func (s *AuthorizeClusterSecurityGroupIngressInput) SetCIDRIP(v string) *AuthorizeClusterSecurityGroupIngressInput { - s.CIDRIP = &v - return s -} - -// SetClusterSecurityGroupName sets the ClusterSecurityGroupName field's value. -func (s *AuthorizeClusterSecurityGroupIngressInput) SetClusterSecurityGroupName(v string) *AuthorizeClusterSecurityGroupIngressInput { - s.ClusterSecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. -func (s *AuthorizeClusterSecurityGroupIngressInput) SetEC2SecurityGroupName(v string) *AuthorizeClusterSecurityGroupIngressInput { - s.EC2SecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. -func (s *AuthorizeClusterSecurityGroupIngressInput) SetEC2SecurityGroupOwnerId(v string) *AuthorizeClusterSecurityGroupIngressInput { - s.EC2SecurityGroupOwnerId = &v - return s -} - -type AuthorizeClusterSecurityGroupIngressOutput struct { - _ struct{} `type:"structure"` - - // Describes a security group. - ClusterSecurityGroup *ClusterSecurityGroup `type:"structure"` -} - -// String returns the string representation -func (s AuthorizeClusterSecurityGroupIngressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeClusterSecurityGroupIngressOutput) GoString() string { - return s.String() -} - -// SetClusterSecurityGroup sets the ClusterSecurityGroup field's value. -func (s *AuthorizeClusterSecurityGroupIngressOutput) SetClusterSecurityGroup(v *ClusterSecurityGroup) *AuthorizeClusterSecurityGroupIngressOutput { - s.ClusterSecurityGroup = v - return s -} - -type AuthorizeSnapshotAccessInput struct { - _ struct{} `type:"structure"` - - // The identifier of the AWS customer account authorized to restore the specified - // snapshot. - // - // To share a snapshot with AWS support, specify amazon-redshift-support. - // - // AccountWithRestoreAccess is a required field - AccountWithRestoreAccess *string `type:"string" required:"true"` - - // The identifier of the cluster the snapshot was created from. This parameter - // is required if your IAM user has a policy containing a snapshot resource - // element that specifies anything other than * for the cluster name. - SnapshotClusterIdentifier *string `type:"string"` - - // The identifier of the snapshot the account is authorized to restore. - // - // SnapshotIdentifier is a required field - SnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AuthorizeSnapshotAccessInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeSnapshotAccessInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AuthorizeSnapshotAccessInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuthorizeSnapshotAccessInput"} - if s.AccountWithRestoreAccess == nil { - invalidParams.Add(request.NewErrParamRequired("AccountWithRestoreAccess")) - } - if s.SnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountWithRestoreAccess sets the AccountWithRestoreAccess field's value. -func (s *AuthorizeSnapshotAccessInput) SetAccountWithRestoreAccess(v string) *AuthorizeSnapshotAccessInput { - s.AccountWithRestoreAccess = &v - return s -} - -// SetSnapshotClusterIdentifier sets the SnapshotClusterIdentifier field's value. -func (s *AuthorizeSnapshotAccessInput) SetSnapshotClusterIdentifier(v string) *AuthorizeSnapshotAccessInput { - s.SnapshotClusterIdentifier = &v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *AuthorizeSnapshotAccessInput) SetSnapshotIdentifier(v string) *AuthorizeSnapshotAccessInput { - s.SnapshotIdentifier = &v - return s -} - -type AuthorizeSnapshotAccessOutput struct { - _ struct{} `type:"structure"` - - // Describes a snapshot. - Snapshot *Snapshot `type:"structure"` -} - -// String returns the string representation -func (s AuthorizeSnapshotAccessOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeSnapshotAccessOutput) GoString() string { - return s.String() -} - -// SetSnapshot sets the Snapshot field's value. -func (s *AuthorizeSnapshotAccessOutput) SetSnapshot(v *Snapshot) *AuthorizeSnapshotAccessOutput { - s.Snapshot = v - return s -} - -// Describes an availability zone. -type AvailabilityZone struct { - _ struct{} `type:"structure"` - - // The name of the availability zone. - Name *string `type:"string"` - - SupportedPlatforms []*SupportedPlatform `locationNameList:"SupportedPlatform" type:"list"` -} - -// String returns the string representation -func (s AvailabilityZone) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AvailabilityZone) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { - s.Name = &v - return s -} - -// SetSupportedPlatforms sets the SupportedPlatforms field's value. -func (s *AvailabilityZone) SetSupportedPlatforms(v []*SupportedPlatform) *AvailabilityZone { - s.SupportedPlatforms = v - return s -} - -type BatchDeleteClusterSnapshotsInput struct { - _ struct{} `type:"structure"` - - // A list of identifiers for the snapshots that you want to delete. - // - // Identifiers is a required field - Identifiers []*DeleteClusterSnapshotMessage `locationNameList:"DeleteClusterSnapshotMessage" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchDeleteClusterSnapshotsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteClusterSnapshotsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchDeleteClusterSnapshotsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchDeleteClusterSnapshotsInput"} - if s.Identifiers == nil { - invalidParams.Add(request.NewErrParamRequired("Identifiers")) - } - if s.Identifiers != nil { - for i, v := range s.Identifiers { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Identifiers", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentifiers sets the Identifiers field's value. -func (s *BatchDeleteClusterSnapshotsInput) SetIdentifiers(v []*DeleteClusterSnapshotMessage) *BatchDeleteClusterSnapshotsInput { - s.Identifiers = v - return s -} - -type BatchDeleteClusterSnapshotsOutput struct { - _ struct{} `type:"structure"` - - // A list of any errors returned. - Errors []*SnapshotErrorMessage `locationNameList:"SnapshotErrorMessage" type:"list"` - - // A list of the snapshot identifiers that were deleted. - Resources []*string `locationNameList:"String" type:"list"` -} - -// String returns the string representation -func (s BatchDeleteClusterSnapshotsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteClusterSnapshotsOutput) GoString() string { - return s.String() -} - -// SetErrors sets the Errors field's value. -func (s *BatchDeleteClusterSnapshotsOutput) SetErrors(v []*SnapshotErrorMessage) *BatchDeleteClusterSnapshotsOutput { - s.Errors = v - return s -} - -// SetResources sets the Resources field's value. -func (s *BatchDeleteClusterSnapshotsOutput) SetResources(v []*string) *BatchDeleteClusterSnapshotsOutput { - s.Resources = v - return s -} - -type BatchModifyClusterSnapshotsInput struct { - _ struct{} `type:"structure"` - - // A boolean value indicating whether to override an exception if the retention - // period has passed. - Force *bool `type:"boolean"` - - // The number of days that a manual snapshot is retained. If you specify the - // value -1, the manual snapshot is retained indefinitely. - // - // The number must be either -1 or an integer between 1 and 3,653. - // - // If you decrease the manual snapshot retention period from its current value, - // existing manual snapshots that fall outside of the new retention period will - // return an error. If you want to suppress the errors and delete the snapshots, - // use the force option. - ManualSnapshotRetentionPeriod *int64 `type:"integer"` - - // A list of snapshot identifiers you want to modify. - // - // SnapshotIdentifierList is a required field - SnapshotIdentifierList []*string `locationNameList:"String" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchModifyClusterSnapshotsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchModifyClusterSnapshotsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchModifyClusterSnapshotsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchModifyClusterSnapshotsInput"} - if s.SnapshotIdentifierList == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifierList")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForce sets the Force field's value. -func (s *BatchModifyClusterSnapshotsInput) SetForce(v bool) *BatchModifyClusterSnapshotsInput { - s.Force = &v - return s -} - -// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. -func (s *BatchModifyClusterSnapshotsInput) SetManualSnapshotRetentionPeriod(v int64) *BatchModifyClusterSnapshotsInput { - s.ManualSnapshotRetentionPeriod = &v - return s -} - -// SetSnapshotIdentifierList sets the SnapshotIdentifierList field's value. -func (s *BatchModifyClusterSnapshotsInput) SetSnapshotIdentifierList(v []*string) *BatchModifyClusterSnapshotsInput { - s.SnapshotIdentifierList = v - return s -} - -type BatchModifyClusterSnapshotsOutput struct { - _ struct{} `type:"structure"` - - // A list of any errors returned. - Errors []*SnapshotErrorMessage `locationNameList:"SnapshotErrorMessage" type:"list"` - - // A list of the snapshots that were modified. - Resources []*string `locationNameList:"String" type:"list"` -} - -// String returns the string representation -func (s BatchModifyClusterSnapshotsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchModifyClusterSnapshotsOutput) GoString() string { - return s.String() -} - -// SetErrors sets the Errors field's value. -func (s *BatchModifyClusterSnapshotsOutput) SetErrors(v []*SnapshotErrorMessage) *BatchModifyClusterSnapshotsOutput { - s.Errors = v - return s -} - -// SetResources sets the Resources field's value. -func (s *BatchModifyClusterSnapshotsOutput) SetResources(v []*string) *BatchModifyClusterSnapshotsOutput { - s.Resources = v - return s -} - -type CancelResizeInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for the cluster that you want to cancel a resize operation - // for. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelResizeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelResizeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelResizeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelResizeInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *CancelResizeInput) SetClusterIdentifier(v string) *CancelResizeInput { - s.ClusterIdentifier = &v - return s -} - -// Describes the result of a cluster resize operation. -type CancelResizeOutput struct { - _ struct{} `type:"structure"` - - // The average rate of the resize operation over the last few minutes, measured - // in megabytes per second. After the resize operation completes, this value - // shows the average rate of the entire resize operation. - AvgResizeRateInMegaBytesPerSecond *float64 `type:"double"` - - // The amount of seconds that have elapsed since the resize operation began. - // After the resize operation completes, this value shows the total actual time, - // in seconds, for the resize operation. - ElapsedTimeInSeconds *int64 `type:"long"` - - // The estimated time remaining, in seconds, until the resize operation is complete. - // This value is calculated based on the average resize rate and the estimated - // amount of data remaining to be processed. Once the resize operation is complete, - // this value will be 0. - EstimatedTimeToCompletionInSeconds *int64 `type:"long"` - - // The names of tables that have been completely imported . - // - // Valid Values: List of table names. - ImportTablesCompleted []*string `type:"list"` - - // The names of tables that are being currently imported. - // - // Valid Values: List of table names. - ImportTablesInProgress []*string `type:"list"` - - // The names of tables that have not been yet imported. - // - // Valid Values: List of table names - ImportTablesNotStarted []*string `type:"list"` - - // An optional string to provide additional details about the resize action. - Message *string `type:"string"` - - // While the resize operation is in progress, this value shows the current amount - // of data, in megabytes, that has been processed so far. When the resize operation - // is complete, this value shows the total amount of data, in megabytes, on - // the cluster, which may be more or less than TotalResizeDataInMegaBytes (the - // estimated total amount of data before resize). - ProgressInMegaBytes *int64 `type:"long"` - - // An enum with possible values of ClassicResize and ElasticResize. These values - // describe the type of resize operation being performed. - ResizeType *string `type:"string"` - - // The status of the resize operation. - // - // Valid Values: NONE | IN_PROGRESS | FAILED | SUCCEEDED | CANCELLING - Status *string `type:"string"` - - // The cluster type after the resize operation is complete. - // - // Valid Values: multi-node | single-node - TargetClusterType *string `type:"string"` - - // The type of encryption for the cluster after the resize is complete. - // - // Possible values are KMS and None. In the China region possible values are: - // Legacy and None. - TargetEncryptionType *string `type:"string"` - - // The node type that the cluster will have after the resize operation is complete. - TargetNodeType *string `type:"string"` - - // The number of nodes that the cluster will have after the resize operation - // is complete. - TargetNumberOfNodes *int64 `type:"integer"` - - // The estimated total amount of data, in megabytes, on the cluster before the - // resize operation began. - TotalResizeDataInMegaBytes *int64 `type:"long"` -} - -// String returns the string representation -func (s CancelResizeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelResizeOutput) GoString() string { - return s.String() -} - -// SetAvgResizeRateInMegaBytesPerSecond sets the AvgResizeRateInMegaBytesPerSecond field's value. -func (s *CancelResizeOutput) SetAvgResizeRateInMegaBytesPerSecond(v float64) *CancelResizeOutput { - s.AvgResizeRateInMegaBytesPerSecond = &v - return s -} - -// SetElapsedTimeInSeconds sets the ElapsedTimeInSeconds field's value. -func (s *CancelResizeOutput) SetElapsedTimeInSeconds(v int64) *CancelResizeOutput { - s.ElapsedTimeInSeconds = &v - return s -} - -// SetEstimatedTimeToCompletionInSeconds sets the EstimatedTimeToCompletionInSeconds field's value. -func (s *CancelResizeOutput) SetEstimatedTimeToCompletionInSeconds(v int64) *CancelResizeOutput { - s.EstimatedTimeToCompletionInSeconds = &v - return s -} - -// SetImportTablesCompleted sets the ImportTablesCompleted field's value. -func (s *CancelResizeOutput) SetImportTablesCompleted(v []*string) *CancelResizeOutput { - s.ImportTablesCompleted = v - return s -} - -// SetImportTablesInProgress sets the ImportTablesInProgress field's value. -func (s *CancelResizeOutput) SetImportTablesInProgress(v []*string) *CancelResizeOutput { - s.ImportTablesInProgress = v - return s -} - -// SetImportTablesNotStarted sets the ImportTablesNotStarted field's value. -func (s *CancelResizeOutput) SetImportTablesNotStarted(v []*string) *CancelResizeOutput { - s.ImportTablesNotStarted = v - return s -} - -// SetMessage sets the Message field's value. -func (s *CancelResizeOutput) SetMessage(v string) *CancelResizeOutput { - s.Message = &v - return s -} - -// SetProgressInMegaBytes sets the ProgressInMegaBytes field's value. -func (s *CancelResizeOutput) SetProgressInMegaBytes(v int64) *CancelResizeOutput { - s.ProgressInMegaBytes = &v - return s -} - -// SetResizeType sets the ResizeType field's value. -func (s *CancelResizeOutput) SetResizeType(v string) *CancelResizeOutput { - s.ResizeType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CancelResizeOutput) SetStatus(v string) *CancelResizeOutput { - s.Status = &v - return s -} - -// SetTargetClusterType sets the TargetClusterType field's value. -func (s *CancelResizeOutput) SetTargetClusterType(v string) *CancelResizeOutput { - s.TargetClusterType = &v - return s -} - -// SetTargetEncryptionType sets the TargetEncryptionType field's value. -func (s *CancelResizeOutput) SetTargetEncryptionType(v string) *CancelResizeOutput { - s.TargetEncryptionType = &v - return s -} - -// SetTargetNodeType sets the TargetNodeType field's value. -func (s *CancelResizeOutput) SetTargetNodeType(v string) *CancelResizeOutput { - s.TargetNodeType = &v - return s -} - -// SetTargetNumberOfNodes sets the TargetNumberOfNodes field's value. -func (s *CancelResizeOutput) SetTargetNumberOfNodes(v int64) *CancelResizeOutput { - s.TargetNumberOfNodes = &v - return s -} - -// SetTotalResizeDataInMegaBytes sets the TotalResizeDataInMegaBytes field's value. -func (s *CancelResizeOutput) SetTotalResizeDataInMegaBytes(v int64) *CancelResizeOutput { - s.TotalResizeDataInMegaBytes = &v - return s -} - -// Describes a cluster. -type Cluster struct { - _ struct{} `type:"structure"` - - // A boolean value that, if true, indicates that major version upgrades will - // be applied automatically to the cluster during the maintenance window. - AllowVersionUpgrade *bool `type:"boolean"` - - // The number of days that automatic cluster snapshots are retained. - AutomatedSnapshotRetentionPeriod *int64 `type:"integer"` - - // The name of the Availability Zone in which the cluster is located. - AvailabilityZone *string `type:"string"` - - // The date and time that the cluster was created. - ClusterCreateTime *time.Time `type:"timestamp"` - - // The unique identifier of the cluster. - ClusterIdentifier *string `type:"string"` - - // The nodes in the cluster. - ClusterNodes []*ClusterNode `type:"list"` - - // The list of cluster parameter groups that are associated with this cluster. - // Each parameter group in the list is returned with its status. - ClusterParameterGroups []*ClusterParameterGroupStatus `locationNameList:"ClusterParameterGroup" type:"list"` - - // The public key for the cluster. - ClusterPublicKey *string `type:"string"` - - // The specific revision number of the database in the cluster. - ClusterRevisionNumber *string `type:"string"` - - // A list of cluster security group that are associated with the cluster. Each - // security group is represented by an element that contains ClusterSecurityGroup.Name - // and ClusterSecurityGroup.Status subelements. - // - // Cluster security groups are used when the cluster is not created in an Amazon - // Virtual Private Cloud (VPC). Clusters that are created in a VPC use VPC security - // groups, which are listed by the VpcSecurityGroups parameter. - ClusterSecurityGroups []*ClusterSecurityGroupMembership `locationNameList:"ClusterSecurityGroup" type:"list"` - - // A value that returns the destination region and retention period that are - // configured for cross-region snapshot copy. - ClusterSnapshotCopyStatus *ClusterSnapshotCopyStatus `type:"structure"` - - // The current state of the cluster. Possible values are the following: - // - // * available - // - // * available, prep-for-resize - // - // * available, resize-cleanup - // - // * cancelling-resize - // - // * creating - // - // * deleting - // - // * final-snapshot - // - // * hardware-failure - // - // * incompatible-hsm - // - // * incompatible-network - // - // * incompatible-parameters - // - // * incompatible-restore - // - // * modifying - // - // * rebooting - // - // * renaming - // - // * resizing - // - // * rotating-keys - // - // * storage-full - // - // * updating-hsm - ClusterStatus *string `type:"string"` - - // The name of the subnet group that is associated with the cluster. This parameter - // is valid only when the cluster is in a VPC. - ClusterSubnetGroupName *string `type:"string"` - - // The version ID of the Amazon Redshift engine that is running on the cluster. - ClusterVersion *string `type:"string"` - - // The name of the initial database that was created when the cluster was created. - // This same name is returned for the life of the cluster. If an initial database - // was not specified, a database named devdev was created by default. - DBName *string `type:"string"` - - // Describes the status of a cluster while it is in the process of resizing - // with an incremental resize. - DataTransferProgress *DataTransferProgress `type:"structure"` - - // Describes a group of DeferredMaintenanceWindow objects. - DeferredMaintenanceWindows []*DeferredMaintenanceWindow `locationNameList:"DeferredMaintenanceWindow" type:"list"` - - // The status of the elastic IP (EIP) address. - ElasticIpStatus *ElasticIpStatus `type:"structure"` - - // The number of nodes that you can resize the cluster to with the elastic resize - // method. - ElasticResizeNumberOfNodeOptions *string `type:"string"` - - // A boolean value that, if true, indicates that data in the cluster is encrypted - // at rest. - Encrypted *bool `type:"boolean"` - - // The connection endpoint. - Endpoint *Endpoint `type:"structure"` - - // An option that specifies whether to create the cluster with enhanced VPC - // routing enabled. To create a cluster that uses enhanced VPC routing, the - // cluster must be in a VPC. For more information, see Enhanced VPC Routing - // (http://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html) - // in the Amazon Redshift Cluster Management Guide. - // - // If this option is true, enhanced VPC routing is enabled. - // - // Default: false - EnhancedVpcRouting *bool `type:"boolean"` - - // A value that reports whether the Amazon Redshift cluster has finished applying - // any hardware security module (HSM) settings changes specified in a modify - // cluster command. - // - // Values: active, applying - HsmStatus *HsmStatus `type:"structure"` - - // A list of AWS Identity and Access Management (IAM) roles that can be used - // by the cluster to access other AWS services. - IamRoles []*ClusterIamRole `locationNameList:"ClusterIamRole" type:"list"` - - // The AWS Key Management Service (AWS KMS) key ID of the encryption key used - // to encrypt data in the cluster. - KmsKeyId *string `type:"string"` - - // The name of the maintenance track for the cluster. - MaintenanceTrackName *string `type:"string"` - - // The default number of days to retain a manual snapshot. If the value is -1, - // the snapshot is retained indefinitely. This setting doesn't change the retention - // period of existing snapshots. - // - // The value must be either -1 or an integer between 1 and 3,653. - ManualSnapshotRetentionPeriod *int64 `type:"integer"` - - // The master user name for the cluster. This name is used to connect to the - // database that is specified in the DBName parameter. - MasterUsername *string `type:"string"` - - // The status of a modify operation, if any, initiated for the cluster. - ModifyStatus *string `type:"string"` - - // The node type for the nodes in the cluster. - NodeType *string `type:"string"` - - // The number of compute nodes in the cluster. - NumberOfNodes *int64 `type:"integer"` - - // Cluster operations that are waiting to be started. - PendingActions []*string `type:"list"` - - // A value that, if present, indicates that changes to the cluster are pending. - // Specific pending changes are identified by subelements. - PendingModifiedValues *PendingModifiedValues `type:"structure"` - - // The weekly time range, in Universal Coordinated Time (UTC), during which - // system maintenance can occur. - PreferredMaintenanceWindow *string `type:"string"` - - // A boolean value that, if true, indicates that the cluster can be accessed - // from a public network. - PubliclyAccessible *bool `type:"boolean"` - - // Returns the following: - // - // * AllowCancelResize: a boolean value indicating if the resize operation - // can be cancelled. - // - // * ResizeType: Returns ClassicResize - ResizeInfo *ResizeInfo `type:"structure"` - - // A value that describes the status of a cluster restore action. This parameter - // returns null if the cluster was not created by restoring a snapshot. - RestoreStatus *RestoreStatus `type:"structure"` - - // A unique identifier for the cluster snapshot schedule. - SnapshotScheduleIdentifier *string `type:"string"` - - // The current state of the cluster snapshot schedule. - SnapshotScheduleState *string `type:"string" enum:"ScheduleState"` - - // The list of tags for the cluster. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // The identifier of the VPC the cluster is in, if the cluster is in a VPC. - VpcId *string `type:"string"` - - // A list of Amazon Virtual Private Cloud (Amazon VPC) security groups that - // are associated with the cluster. This parameter is returned only if the cluster - // is in a VPC. - VpcSecurityGroups []*VpcSecurityGroupMembership `locationNameList:"VpcSecurityGroup" type:"list"` -} - -// String returns the string representation -func (s Cluster) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Cluster) GoString() string { - return s.String() -} - -// SetAllowVersionUpgrade sets the AllowVersionUpgrade field's value. -func (s *Cluster) SetAllowVersionUpgrade(v bool) *Cluster { - s.AllowVersionUpgrade = &v - return s -} - -// SetAutomatedSnapshotRetentionPeriod sets the AutomatedSnapshotRetentionPeriod field's value. -func (s *Cluster) SetAutomatedSnapshotRetentionPeriod(v int64) *Cluster { - s.AutomatedSnapshotRetentionPeriod = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Cluster) SetAvailabilityZone(v string) *Cluster { - s.AvailabilityZone = &v - return s -} - -// SetClusterCreateTime sets the ClusterCreateTime field's value. -func (s *Cluster) SetClusterCreateTime(v time.Time) *Cluster { - s.ClusterCreateTime = &v - return s -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *Cluster) SetClusterIdentifier(v string) *Cluster { - s.ClusterIdentifier = &v - return s -} - -// SetClusterNodes sets the ClusterNodes field's value. -func (s *Cluster) SetClusterNodes(v []*ClusterNode) *Cluster { - s.ClusterNodes = v - return s -} - -// SetClusterParameterGroups sets the ClusterParameterGroups field's value. -func (s *Cluster) SetClusterParameterGroups(v []*ClusterParameterGroupStatus) *Cluster { - s.ClusterParameterGroups = v - return s -} - -// SetClusterPublicKey sets the ClusterPublicKey field's value. -func (s *Cluster) SetClusterPublicKey(v string) *Cluster { - s.ClusterPublicKey = &v - return s -} - -// SetClusterRevisionNumber sets the ClusterRevisionNumber field's value. -func (s *Cluster) SetClusterRevisionNumber(v string) *Cluster { - s.ClusterRevisionNumber = &v - return s -} - -// SetClusterSecurityGroups sets the ClusterSecurityGroups field's value. -func (s *Cluster) SetClusterSecurityGroups(v []*ClusterSecurityGroupMembership) *Cluster { - s.ClusterSecurityGroups = v - return s -} - -// SetClusterSnapshotCopyStatus sets the ClusterSnapshotCopyStatus field's value. -func (s *Cluster) SetClusterSnapshotCopyStatus(v *ClusterSnapshotCopyStatus) *Cluster { - s.ClusterSnapshotCopyStatus = v - return s -} - -// SetClusterStatus sets the ClusterStatus field's value. -func (s *Cluster) SetClusterStatus(v string) *Cluster { - s.ClusterStatus = &v - return s -} - -// SetClusterSubnetGroupName sets the ClusterSubnetGroupName field's value. -func (s *Cluster) SetClusterSubnetGroupName(v string) *Cluster { - s.ClusterSubnetGroupName = &v - return s -} - -// SetClusterVersion sets the ClusterVersion field's value. -func (s *Cluster) SetClusterVersion(v string) *Cluster { - s.ClusterVersion = &v - return s -} - -// SetDBName sets the DBName field's value. -func (s *Cluster) SetDBName(v string) *Cluster { - s.DBName = &v - return s -} - -// SetDataTransferProgress sets the DataTransferProgress field's value. -func (s *Cluster) SetDataTransferProgress(v *DataTransferProgress) *Cluster { - s.DataTransferProgress = v - return s -} - -// SetDeferredMaintenanceWindows sets the DeferredMaintenanceWindows field's value. -func (s *Cluster) SetDeferredMaintenanceWindows(v []*DeferredMaintenanceWindow) *Cluster { - s.DeferredMaintenanceWindows = v - return s -} - -// SetElasticIpStatus sets the ElasticIpStatus field's value. -func (s *Cluster) SetElasticIpStatus(v *ElasticIpStatus) *Cluster { - s.ElasticIpStatus = v - return s -} - -// SetElasticResizeNumberOfNodeOptions sets the ElasticResizeNumberOfNodeOptions field's value. -func (s *Cluster) SetElasticResizeNumberOfNodeOptions(v string) *Cluster { - s.ElasticResizeNumberOfNodeOptions = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *Cluster) SetEncrypted(v bool) *Cluster { - s.Encrypted = &v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *Cluster) SetEndpoint(v *Endpoint) *Cluster { - s.Endpoint = v - return s -} - -// SetEnhancedVpcRouting sets the EnhancedVpcRouting field's value. -func (s *Cluster) SetEnhancedVpcRouting(v bool) *Cluster { - s.EnhancedVpcRouting = &v - return s -} - -// SetHsmStatus sets the HsmStatus field's value. -func (s *Cluster) SetHsmStatus(v *HsmStatus) *Cluster { - s.HsmStatus = v - return s -} - -// SetIamRoles sets the IamRoles field's value. -func (s *Cluster) SetIamRoles(v []*ClusterIamRole) *Cluster { - s.IamRoles = v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *Cluster) SetKmsKeyId(v string) *Cluster { - s.KmsKeyId = &v - return s -} - -// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. -func (s *Cluster) SetMaintenanceTrackName(v string) *Cluster { - s.MaintenanceTrackName = &v - return s -} - -// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. -func (s *Cluster) SetManualSnapshotRetentionPeriod(v int64) *Cluster { - s.ManualSnapshotRetentionPeriod = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *Cluster) SetMasterUsername(v string) *Cluster { - s.MasterUsername = &v - return s -} - -// SetModifyStatus sets the ModifyStatus field's value. -func (s *Cluster) SetModifyStatus(v string) *Cluster { - s.ModifyStatus = &v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *Cluster) SetNodeType(v string) *Cluster { - s.NodeType = &v - return s -} - -// SetNumberOfNodes sets the NumberOfNodes field's value. -func (s *Cluster) SetNumberOfNodes(v int64) *Cluster { - s.NumberOfNodes = &v - return s -} - -// SetPendingActions sets the PendingActions field's value. -func (s *Cluster) SetPendingActions(v []*string) *Cluster { - s.PendingActions = v - return s -} - -// SetPendingModifiedValues sets the PendingModifiedValues field's value. -func (s *Cluster) SetPendingModifiedValues(v *PendingModifiedValues) *Cluster { - s.PendingModifiedValues = v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *Cluster) SetPreferredMaintenanceWindow(v string) *Cluster { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *Cluster) SetPubliclyAccessible(v bool) *Cluster { - s.PubliclyAccessible = &v - return s -} - -// SetResizeInfo sets the ResizeInfo field's value. -func (s *Cluster) SetResizeInfo(v *ResizeInfo) *Cluster { - s.ResizeInfo = v - return s -} - -// SetRestoreStatus sets the RestoreStatus field's value. -func (s *Cluster) SetRestoreStatus(v *RestoreStatus) *Cluster { - s.RestoreStatus = v - return s -} - -// SetSnapshotScheduleIdentifier sets the SnapshotScheduleIdentifier field's value. -func (s *Cluster) SetSnapshotScheduleIdentifier(v string) *Cluster { - s.SnapshotScheduleIdentifier = &v - return s -} - -// SetSnapshotScheduleState sets the SnapshotScheduleState field's value. -func (s *Cluster) SetSnapshotScheduleState(v string) *Cluster { - s.SnapshotScheduleState = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Cluster) SetTags(v []*Tag) *Cluster { - s.Tags = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *Cluster) SetVpcId(v string) *Cluster { - s.VpcId = &v - return s -} - -// SetVpcSecurityGroups sets the VpcSecurityGroups field's value. -func (s *Cluster) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *Cluster { - s.VpcSecurityGroups = v - return s -} - -type ClusterAssociatedToSchedule struct { - _ struct{} `type:"structure"` - - ClusterIdentifier *string `type:"string"` - - ScheduleAssociationState *string `type:"string" enum:"ScheduleState"` -} - -// String returns the string representation -func (s ClusterAssociatedToSchedule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterAssociatedToSchedule) GoString() string { - return s.String() -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *ClusterAssociatedToSchedule) SetClusterIdentifier(v string) *ClusterAssociatedToSchedule { - s.ClusterIdentifier = &v - return s -} - -// SetScheduleAssociationState sets the ScheduleAssociationState field's value. -func (s *ClusterAssociatedToSchedule) SetScheduleAssociationState(v string) *ClusterAssociatedToSchedule { - s.ScheduleAssociationState = &v - return s -} - -// Describes a ClusterDbRevision. -type ClusterDbRevision struct { - _ struct{} `type:"structure"` - - // The unique identifier of the cluster. - ClusterIdentifier *string `type:"string"` - - // A string representing the current cluster version. - CurrentDatabaseRevision *string `type:"string"` - - // The date on which the database revision was released. - DatabaseRevisionReleaseDate *time.Time `type:"timestamp"` - - // A list of RevisionTarget objects, where each object describes the database - // revision that a cluster can be updated to. - RevisionTargets []*RevisionTarget `locationNameList:"RevisionTarget" type:"list"` -} - -// String returns the string representation -func (s ClusterDbRevision) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterDbRevision) GoString() string { - return s.String() -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *ClusterDbRevision) SetClusterIdentifier(v string) *ClusterDbRevision { - s.ClusterIdentifier = &v - return s -} - -// SetCurrentDatabaseRevision sets the CurrentDatabaseRevision field's value. -func (s *ClusterDbRevision) SetCurrentDatabaseRevision(v string) *ClusterDbRevision { - s.CurrentDatabaseRevision = &v - return s -} - -// SetDatabaseRevisionReleaseDate sets the DatabaseRevisionReleaseDate field's value. -func (s *ClusterDbRevision) SetDatabaseRevisionReleaseDate(v time.Time) *ClusterDbRevision { - s.DatabaseRevisionReleaseDate = &v - return s -} - -// SetRevisionTargets sets the RevisionTargets field's value. -func (s *ClusterDbRevision) SetRevisionTargets(v []*RevisionTarget) *ClusterDbRevision { - s.RevisionTargets = v - return s -} - -// An AWS Identity and Access Management (IAM) role that can be used by the -// associated Amazon Redshift cluster to access other AWS services. -type ClusterIamRole struct { - _ struct{} `type:"structure"` - - // A value that describes the status of the IAM role's association with an Amazon - // Redshift cluster. - // - // The following are possible statuses and descriptions. - // - // * in-sync: The role is available for use by the cluster. - // - // * adding: The role is in the process of being associated with the cluster. - // - // * removing: The role is in the process of being disassociated with the - // cluster. - ApplyStatus *string `type:"string"` - - // The Amazon Resource Name (ARN) of the IAM role, for example, arn:aws:iam::123456789012:role/RedshiftCopyUnload. - IamRoleArn *string `type:"string"` -} - -// String returns the string representation -func (s ClusterIamRole) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterIamRole) GoString() string { - return s.String() -} - -// SetApplyStatus sets the ApplyStatus field's value. -func (s *ClusterIamRole) SetApplyStatus(v string) *ClusterIamRole { - s.ApplyStatus = &v - return s -} - -// SetIamRoleArn sets the IamRoleArn field's value. -func (s *ClusterIamRole) SetIamRoleArn(v string) *ClusterIamRole { - s.IamRoleArn = &v - return s -} - -// The identifier of a node in a cluster. -type ClusterNode struct { - _ struct{} `type:"structure"` - - // Whether the node is a leader node or a compute node. - NodeRole *string `type:"string"` - - // The private IP address of a node within a cluster. - PrivateIPAddress *string `type:"string"` - - // The public IP address of a node within a cluster. - PublicIPAddress *string `type:"string"` -} - -// String returns the string representation -func (s ClusterNode) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterNode) GoString() string { - return s.String() -} - -// SetNodeRole sets the NodeRole field's value. -func (s *ClusterNode) SetNodeRole(v string) *ClusterNode { - s.NodeRole = &v - return s -} - -// SetPrivateIPAddress sets the PrivateIPAddress field's value. -func (s *ClusterNode) SetPrivateIPAddress(v string) *ClusterNode { - s.PrivateIPAddress = &v - return s -} - -// SetPublicIPAddress sets the PublicIPAddress field's value. -func (s *ClusterNode) SetPublicIPAddress(v string) *ClusterNode { - s.PublicIPAddress = &v - return s -} - -// Describes a parameter group. -type ClusterParameterGroup struct { - _ struct{} `type:"structure"` - - // The description of the parameter group. - Description *string `type:"string"` - - // The name of the cluster parameter group family that this cluster parameter - // group is compatible with. - ParameterGroupFamily *string `type:"string"` - - // The name of the cluster parameter group. - ParameterGroupName *string `type:"string"` - - // The list of tags for the cluster parameter group. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s ClusterParameterGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterParameterGroup) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *ClusterParameterGroup) SetDescription(v string) *ClusterParameterGroup { - s.Description = &v - return s -} - -// SetParameterGroupFamily sets the ParameterGroupFamily field's value. -func (s *ClusterParameterGroup) SetParameterGroupFamily(v string) *ClusterParameterGroup { - s.ParameterGroupFamily = &v - return s -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *ClusterParameterGroup) SetParameterGroupName(v string) *ClusterParameterGroup { - s.ParameterGroupName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ClusterParameterGroup) SetTags(v []*Tag) *ClusterParameterGroup { - s.Tags = v - return s -} - -type ClusterParameterGroupNameMessage struct { - _ struct{} `type:"structure"` - - // The name of the cluster parameter group. - ParameterGroupName *string `type:"string"` - - // The status of the parameter group. For example, if you made a change to a - // parameter group name-value pair, then the change could be pending a reboot - // of an associated cluster. - ParameterGroupStatus *string `type:"string"` -} - -// String returns the string representation -func (s ClusterParameterGroupNameMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterParameterGroupNameMessage) GoString() string { - return s.String() -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *ClusterParameterGroupNameMessage) SetParameterGroupName(v string) *ClusterParameterGroupNameMessage { - s.ParameterGroupName = &v - return s -} - -// SetParameterGroupStatus sets the ParameterGroupStatus field's value. -func (s *ClusterParameterGroupNameMessage) SetParameterGroupStatus(v string) *ClusterParameterGroupNameMessage { - s.ParameterGroupStatus = &v - return s -} - -// Describes the status of a parameter group. -type ClusterParameterGroupStatus struct { - _ struct{} `type:"structure"` - - // The list of parameter statuses. - // - // For more information about parameters and parameter groups, go to Amazon - // Redshift Parameter Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) - // in the Amazon Redshift Cluster Management Guide. - ClusterParameterStatusList []*ClusterParameterStatus `type:"list"` - - // The status of parameter updates. - ParameterApplyStatus *string `type:"string"` - - // The name of the cluster parameter group. - ParameterGroupName *string `type:"string"` -} - -// String returns the string representation -func (s ClusterParameterGroupStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterParameterGroupStatus) GoString() string { - return s.String() -} - -// SetClusterParameterStatusList sets the ClusterParameterStatusList field's value. -func (s *ClusterParameterGroupStatus) SetClusterParameterStatusList(v []*ClusterParameterStatus) *ClusterParameterGroupStatus { - s.ClusterParameterStatusList = v - return s -} - -// SetParameterApplyStatus sets the ParameterApplyStatus field's value. -func (s *ClusterParameterGroupStatus) SetParameterApplyStatus(v string) *ClusterParameterGroupStatus { - s.ParameterApplyStatus = &v - return s -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *ClusterParameterGroupStatus) SetParameterGroupName(v string) *ClusterParameterGroupStatus { - s.ParameterGroupName = &v - return s -} - -// Describes the status of a parameter group. -type ClusterParameterStatus struct { - _ struct{} `type:"structure"` - - // The error that prevented the parameter from being applied to the database. - ParameterApplyErrorDescription *string `type:"string"` - - // The status of the parameter that indicates whether the parameter is in sync - // with the database, waiting for a cluster reboot, or encountered an error - // when being applied. - // - // The following are possible statuses and descriptions. - // - // * in-sync: The parameter value is in sync with the database. - // - // * pending-reboot: The parameter value will be applied after the cluster - // reboots. - // - // * applying: The parameter value is being applied to the database. - // - // * invalid-parameter: Cannot apply the parameter value because it has an - // invalid value or syntax. - // - // * apply-deferred: The parameter contains static property changes. The - // changes are deferred until the cluster reboots. - // - // * apply-error: Cannot connect to the cluster. The parameter change will - // be applied after the cluster reboots. - // - // * unknown-error: Cannot apply the parameter change right now. The change - // will be applied after the cluster reboots. - ParameterApplyStatus *string `type:"string"` - - // The name of the parameter. - ParameterName *string `type:"string"` -} - -// String returns the string representation -func (s ClusterParameterStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterParameterStatus) GoString() string { - return s.String() -} - -// SetParameterApplyErrorDescription sets the ParameterApplyErrorDescription field's value. -func (s *ClusterParameterStatus) SetParameterApplyErrorDescription(v string) *ClusterParameterStatus { - s.ParameterApplyErrorDescription = &v - return s -} - -// SetParameterApplyStatus sets the ParameterApplyStatus field's value. -func (s *ClusterParameterStatus) SetParameterApplyStatus(v string) *ClusterParameterStatus { - s.ParameterApplyStatus = &v - return s -} - -// SetParameterName sets the ParameterName field's value. -func (s *ClusterParameterStatus) SetParameterName(v string) *ClusterParameterStatus { - s.ParameterName = &v - return s -} - -// Describes a security group. -type ClusterSecurityGroup struct { - _ struct{} `type:"structure"` - - // The name of the cluster security group to which the operation was applied. - ClusterSecurityGroupName *string `type:"string"` - - // A description of the security group. - Description *string `type:"string"` - - // A list of EC2 security groups that are permitted to access clusters associated - // with this cluster security group. - EC2SecurityGroups []*EC2SecurityGroup `locationNameList:"EC2SecurityGroup" type:"list"` - - // A list of IP ranges (CIDR blocks) that are permitted to access clusters associated - // with this cluster security group. - IPRanges []*IPRange `locationNameList:"IPRange" type:"list"` - - // The list of tags for the cluster security group. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s ClusterSecurityGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterSecurityGroup) GoString() string { - return s.String() -} - -// SetClusterSecurityGroupName sets the ClusterSecurityGroupName field's value. -func (s *ClusterSecurityGroup) SetClusterSecurityGroupName(v string) *ClusterSecurityGroup { - s.ClusterSecurityGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ClusterSecurityGroup) SetDescription(v string) *ClusterSecurityGroup { - s.Description = &v - return s -} - -// SetEC2SecurityGroups sets the EC2SecurityGroups field's value. -func (s *ClusterSecurityGroup) SetEC2SecurityGroups(v []*EC2SecurityGroup) *ClusterSecurityGroup { - s.EC2SecurityGroups = v - return s -} - -// SetIPRanges sets the IPRanges field's value. -func (s *ClusterSecurityGroup) SetIPRanges(v []*IPRange) *ClusterSecurityGroup { - s.IPRanges = v - return s -} - -// SetTags sets the Tags field's value. -func (s *ClusterSecurityGroup) SetTags(v []*Tag) *ClusterSecurityGroup { - s.Tags = v - return s -} - -// Describes a cluster security group. -type ClusterSecurityGroupMembership struct { - _ struct{} `type:"structure"` - - // The name of the cluster security group. - ClusterSecurityGroupName *string `type:"string"` - - // The status of the cluster security group. - Status *string `type:"string"` -} - -// String returns the string representation -func (s ClusterSecurityGroupMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterSecurityGroupMembership) GoString() string { - return s.String() -} - -// SetClusterSecurityGroupName sets the ClusterSecurityGroupName field's value. -func (s *ClusterSecurityGroupMembership) SetClusterSecurityGroupName(v string) *ClusterSecurityGroupMembership { - s.ClusterSecurityGroupName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ClusterSecurityGroupMembership) SetStatus(v string) *ClusterSecurityGroupMembership { - s.Status = &v - return s -} - -// Returns the destination region and retention period that are configured for -// cross-region snapshot copy. -type ClusterSnapshotCopyStatus struct { - _ struct{} `type:"structure"` - - // The destination region that snapshots are automatically copied to when cross-region - // snapshot copy is enabled. - DestinationRegion *string `type:"string"` - - // The number of days that automated snapshots are retained in the destination - // region after they are copied from a source region. If the value is -1, the - // manual snapshot is retained indefinitely. - // - // The value must be either -1 or an integer between 1 and 3,653. - ManualSnapshotRetentionPeriod *int64 `type:"integer"` - - // The number of days that automated snapshots are retained in the destination - // region after they are copied from a source region. - RetentionPeriod *int64 `type:"long"` - - // The name of the snapshot copy grant. - SnapshotCopyGrantName *string `type:"string"` -} - -// String returns the string representation -func (s ClusterSnapshotCopyStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterSnapshotCopyStatus) GoString() string { - return s.String() -} - -// SetDestinationRegion sets the DestinationRegion field's value. -func (s *ClusterSnapshotCopyStatus) SetDestinationRegion(v string) *ClusterSnapshotCopyStatus { - s.DestinationRegion = &v - return s -} - -// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. -func (s *ClusterSnapshotCopyStatus) SetManualSnapshotRetentionPeriod(v int64) *ClusterSnapshotCopyStatus { - s.ManualSnapshotRetentionPeriod = &v - return s -} - -// SetRetentionPeriod sets the RetentionPeriod field's value. -func (s *ClusterSnapshotCopyStatus) SetRetentionPeriod(v int64) *ClusterSnapshotCopyStatus { - s.RetentionPeriod = &v - return s -} - -// SetSnapshotCopyGrantName sets the SnapshotCopyGrantName field's value. -func (s *ClusterSnapshotCopyStatus) SetSnapshotCopyGrantName(v string) *ClusterSnapshotCopyStatus { - s.SnapshotCopyGrantName = &v - return s -} - -// Describes a subnet group. -type ClusterSubnetGroup struct { - _ struct{} `type:"structure"` - - // The name of the cluster subnet group. - ClusterSubnetGroupName *string `type:"string"` - - // The description of the cluster subnet group. - Description *string `type:"string"` - - // The status of the cluster subnet group. Possible values are Complete, Incomplete - // and Invalid. - SubnetGroupStatus *string `type:"string"` - - // A list of the VPC Subnet elements. - Subnets []*Subnet `locationNameList:"Subnet" type:"list"` - - // The list of tags for the cluster subnet group. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // The VPC ID of the cluster subnet group. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s ClusterSubnetGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterSubnetGroup) GoString() string { - return s.String() -} - -// SetClusterSubnetGroupName sets the ClusterSubnetGroupName field's value. -func (s *ClusterSubnetGroup) SetClusterSubnetGroupName(v string) *ClusterSubnetGroup { - s.ClusterSubnetGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ClusterSubnetGroup) SetDescription(v string) *ClusterSubnetGroup { - s.Description = &v - return s -} - -// SetSubnetGroupStatus sets the SubnetGroupStatus field's value. -func (s *ClusterSubnetGroup) SetSubnetGroupStatus(v string) *ClusterSubnetGroup { - s.SubnetGroupStatus = &v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *ClusterSubnetGroup) SetSubnets(v []*Subnet) *ClusterSubnetGroup { - s.Subnets = v - return s -} - -// SetTags sets the Tags field's value. -func (s *ClusterSubnetGroup) SetTags(v []*Tag) *ClusterSubnetGroup { - s.Tags = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *ClusterSubnetGroup) SetVpcId(v string) *ClusterSubnetGroup { - s.VpcId = &v - return s -} - -// Describes a cluster version, including the parameter group family and description -// of the version. -type ClusterVersion struct { - _ struct{} `type:"structure"` - - // The name of the cluster parameter group family for the cluster. - ClusterParameterGroupFamily *string `type:"string"` - - // The version number used by the cluster. - ClusterVersion *string `type:"string"` - - // The description of the cluster version. - Description *string `type:"string"` -} - -// String returns the string representation -func (s ClusterVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClusterVersion) GoString() string { - return s.String() -} - -// SetClusterParameterGroupFamily sets the ClusterParameterGroupFamily field's value. -func (s *ClusterVersion) SetClusterParameterGroupFamily(v string) *ClusterVersion { - s.ClusterParameterGroupFamily = &v - return s -} - -// SetClusterVersion sets the ClusterVersion field's value. -func (s *ClusterVersion) SetClusterVersion(v string) *ClusterVersion { - s.ClusterVersion = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ClusterVersion) SetDescription(v string) *ClusterVersion { - s.Description = &v - return s -} - -type CopyClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // The number of days that a manual snapshot is retained. If the value is -1, - // the manual snapshot is retained indefinitely. - // - // The value must be either -1 or an integer between 1 and 3,653. - // - // The default value is -1. - ManualSnapshotRetentionPeriod *int64 `type:"integer"` - - // The identifier of the cluster the source snapshot was created from. This - // parameter is required if your IAM user has a policy containing a snapshot - // resource element that specifies anything other than * for the cluster name. - // - // Constraints: - // - // * Must be the identifier for a valid cluster. - SourceSnapshotClusterIdentifier *string `type:"string"` - - // The identifier for the source snapshot. - // - // Constraints: - // - // * Must be the identifier for a valid automated snapshot whose state is - // available. - // - // SourceSnapshotIdentifier is a required field - SourceSnapshotIdentifier *string `type:"string" required:"true"` - - // The identifier given to the new manual snapshot. - // - // Constraints: - // - // * Cannot be null, empty, or blank. - // - // * Must contain from 1 to 255 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // * Must be unique for the AWS account that is making the request. - // - // TargetSnapshotIdentifier is a required field - TargetSnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CopyClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyClusterSnapshotInput"} - if s.SourceSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceSnapshotIdentifier")) - } - if s.TargetSnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("TargetSnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. -func (s *CopyClusterSnapshotInput) SetManualSnapshotRetentionPeriod(v int64) *CopyClusterSnapshotInput { - s.ManualSnapshotRetentionPeriod = &v - return s -} - -// SetSourceSnapshotClusterIdentifier sets the SourceSnapshotClusterIdentifier field's value. -func (s *CopyClusterSnapshotInput) SetSourceSnapshotClusterIdentifier(v string) *CopyClusterSnapshotInput { - s.SourceSnapshotClusterIdentifier = &v - return s -} - -// SetSourceSnapshotIdentifier sets the SourceSnapshotIdentifier field's value. -func (s *CopyClusterSnapshotInput) SetSourceSnapshotIdentifier(v string) *CopyClusterSnapshotInput { - s.SourceSnapshotIdentifier = &v - return s -} - -// SetTargetSnapshotIdentifier sets the TargetSnapshotIdentifier field's value. -func (s *CopyClusterSnapshotInput) SetTargetSnapshotIdentifier(v string) *CopyClusterSnapshotInput { - s.TargetSnapshotIdentifier = &v - return s -} - -type CopyClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Describes a snapshot. - Snapshot *Snapshot `type:"structure"` -} - -// String returns the string representation -func (s CopyClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetSnapshot sets the Snapshot field's value. -func (s *CopyClusterSnapshotOutput) SetSnapshot(v *Snapshot) *CopyClusterSnapshotOutput { - s.Snapshot = v - return s -} - -type CreateClusterInput struct { - _ struct{} `type:"structure"` - - // Reserved. - AdditionalInfo *string `type:"string"` - - // If true, major version upgrades can be applied during the maintenance window - // to the Amazon Redshift engine that is running on the cluster. - // - // When a new major version of the Amazon Redshift engine is released, you can - // request that the service automatically apply upgrades during the maintenance - // window to the Amazon Redshift engine that is running on your cluster. - // - // Default: true - AllowVersionUpgrade *bool `type:"boolean"` - - // The number of days that automated snapshots are retained. If the value is - // 0, automated snapshots are disabled. Even if automated snapshots are disabled, - // you can still create manual snapshots when you want with CreateClusterSnapshot. - // - // Default: 1 - // - // Constraints: Must be a value from 0 to 35. - AutomatedSnapshotRetentionPeriod *int64 `type:"integer"` - - // The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision - // the cluster. For example, if you have several EC2 instances running in a - // specific Availability Zone, then you might want the cluster to be provisioned - // in the same zone in order to decrease network latency. - // - // Default: A random, system-chosen Availability Zone in the region that is - // specified by the endpoint. - // - // Example: us-east-1d - // - // Constraint: The specified Availability Zone must be in the same region as - // the current endpoint. - AvailabilityZone *string `type:"string"` - - // A unique identifier for the cluster. You use this identifier to refer to - // the cluster for any subsequent cluster operations such as deleting or modifying. - // The identifier also appears in the Amazon Redshift console. - // - // Constraints: - // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. - // - // * Alphabetic characters must be lowercase. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // * Must be unique for all clusters within an AWS account. - // - // Example: myexamplecluster - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // The name of the parameter group to be associated with this cluster. - // - // Default: The default Amazon Redshift cluster parameter group. For information - // about the default parameter group, go to Working with Amazon Redshift Parameter - // Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) - // - // Constraints: - // - // * Must be 1 to 255 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - ClusterParameterGroupName *string `type:"string"` - - // A list of security groups to be associated with this cluster. - // - // Default: The default cluster security group for Amazon Redshift. - ClusterSecurityGroups []*string `locationNameList:"ClusterSecurityGroupName" type:"list"` - - // The name of a cluster subnet group to be associated with this cluster. - // - // If this parameter is not provided the resulting cluster will be deployed - // outside virtual private cloud (VPC). - ClusterSubnetGroupName *string `type:"string"` - - // The type of the cluster. When cluster type is specified as - // - // * single-node, the NumberOfNodes parameter is not required. - // - // * multi-node, the NumberOfNodes parameter is required. - // - // Valid Values: multi-node | single-node - // - // Default: multi-node - ClusterType *string `type:"string"` - - // The version of the Amazon Redshift engine software that you want to deploy - // on the cluster. - // - // The version selected runs on all the nodes in the cluster. - // - // Constraints: Only version 1.0 is currently available. - // - // Example: 1.0 - ClusterVersion *string `type:"string"` - - // The name of the first database to be created when the cluster is created. - // - // To create additional databases after the cluster is created, connect to the - // cluster with a SQL client and use SQL commands to create a database. For - // more information, go to Create a Database (http://docs.aws.amazon.com/redshift/latest/dg/t_creating_database.html) - // in the Amazon Redshift Database Developer Guide. - // - // Default: dev - // - // Constraints: - // - // * Must contain 1 to 64 alphanumeric characters. - // - // * Must contain only lowercase letters. - // - // * Cannot be a word that is reserved by the service. A list of reserved - // words can be found in Reserved Words (http://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html) - // in the Amazon Redshift Database Developer Guide. - DBName *string `type:"string"` - - // The Elastic IP (EIP) address for the cluster. - // - // Constraints: The cluster must be provisioned in EC2-VPC and publicly-accessible - // through an Internet gateway. For more information about provisioning clusters - // in EC2-VPC, go to Supported Platforms to Launch Your Cluster (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#cluster-platforms) - // in the Amazon Redshift Cluster Management Guide. - ElasticIp *string `type:"string"` - - // If true, the data in the cluster is encrypted at rest. - // - // Default: false - Encrypted *bool `type:"boolean"` - - // An option that specifies whether to create the cluster with enhanced VPC - // routing enabled. To create a cluster that uses enhanced VPC routing, the - // cluster must be in a VPC. For more information, see Enhanced VPC Routing - // (http://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html) - // in the Amazon Redshift Cluster Management Guide. - // - // If this option is true, enhanced VPC routing is enabled. - // - // Default: false - EnhancedVpcRouting *bool `type:"boolean"` - - // Specifies the name of the HSM client certificate the Amazon Redshift cluster - // uses to retrieve the data encryption keys stored in an HSM. - HsmClientCertificateIdentifier *string `type:"string"` - - // Specifies the name of the HSM configuration that contains the information - // the Amazon Redshift cluster can use to retrieve and store keys in an HSM. - HsmConfigurationIdentifier *string `type:"string"` - - // A list of AWS Identity and Access Management (IAM) roles that can be used - // by the cluster to access other AWS services. You must supply the IAM roles - // in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles - // in a single request. - // - // A cluster can have up to 10 IAM roles associated with it at any time. - IamRoles []*string `locationNameList:"IamRoleArn" type:"list"` - - // The AWS Key Management Service (KMS) key ID of the encryption key that you - // want to use to encrypt data in the cluster. - KmsKeyId *string `type:"string"` - - // An optional parameter for the name of the maintenance track for the cluster. - // If you don't provide a maintenance track name, the cluster is assigned to - // the current track. - MaintenanceTrackName *string `type:"string"` - - // The default number of days to retain a manual snapshot. If the value is -1, - // the snapshot is retained indefinitely. This setting doesn't change the retention - // period of existing snapshots. - // - // The value must be either -1 or an integer between 1 and 3,653. - ManualSnapshotRetentionPeriod *int64 `type:"integer"` - - // The password associated with the master user account for the cluster that - // is being created. - // - // Constraints: - // - // * Must be between 8 and 64 characters in length. - // - // * Must contain at least one uppercase letter. - // - // * Must contain at least one lowercase letter. - // - // * Must contain one number. - // - // * Can be any printable ASCII character (ASCII code 33 to 126) except ' - // (single quote), " (double quote), \, /, @, or space. - // - // MasterUserPassword is a required field - MasterUserPassword *string `type:"string" required:"true"` - - // The user name associated with the master user account for the cluster that - // is being created. - // - // Constraints: - // - // * Must be 1 - 128 alphanumeric characters. The user name can't be PUBLIC. - // - // * First character must be a letter. - // - // * Cannot be a reserved word. A list of reserved words can be found in - // Reserved Words (http://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html) - // in the Amazon Redshift Database Developer Guide. - // - // MasterUsername is a required field - MasterUsername *string `type:"string" required:"true"` - - // The node type to be provisioned for the cluster. For information about node - // types, go to Working with Clusters (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#how-many-nodes) - // in the Amazon Redshift Cluster Management Guide. - // - // Valid Values: ds2.xlarge | ds2.8xlarge | ds2.xlarge | ds2.8xlarge | dc1.large - // | dc1.8xlarge | dc2.large | dc2.8xlarge - // - // NodeType is a required field - NodeType *string `type:"string" required:"true"` - - // The number of compute nodes in the cluster. This parameter is required when - // the ClusterType parameter is specified as multi-node. - // - // For information about determining how many nodes you need, go to Working - // with Clusters (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#how-many-nodes) - // in the Amazon Redshift Cluster Management Guide. - // - // If you don't specify this parameter, you get a single-node cluster. When - // requesting a multi-node cluster, you must specify the number of nodes that - // you want in the cluster. - // - // Default: 1 - // - // Constraints: Value must be at least 1 and no more than 100. - NumberOfNodes *int64 `type:"integer"` - - // The port number on which the cluster accepts incoming connections. - // - // The cluster is accessible only via the JDBC and ODBC connection strings. - // Part of the connection string requires the port on which the cluster will - // listen for incoming connections. - // - // Default: 5439 - // - // Valid Values: 1150-65535 - Port *int64 `type:"integer"` - - // The weekly time range (in UTC) during which automated cluster maintenance - // can occur. - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // Default: A 30-minute window selected at random from an 8-hour block of time - // per region, occurring on a random day of the week. For more information about - // the time blocks for each region, see Maintenance Windows (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-maintenance-windows) - // in Amazon Redshift Cluster Management Guide. - // - // Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun - // - // Constraints: Minimum 30-minute window. - PreferredMaintenanceWindow *string `type:"string"` - - // If true, the cluster can be accessed from a public network. - PubliclyAccessible *bool `type:"boolean"` - - // A unique identifier for the snapshot schedule. - SnapshotScheduleIdentifier *string `type:"string"` - - // A list of tag instances. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // A list of Virtual Private Cloud (VPC) security groups to be associated with - // the cluster. - // - // Default: The default VPC security group is associated with the cluster. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s CreateClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - if s.MasterUserPassword == nil { - invalidParams.Add(request.NewErrParamRequired("MasterUserPassword")) - } - if s.MasterUsername == nil { - invalidParams.Add(request.NewErrParamRequired("MasterUsername")) - } - if s.NodeType == nil { - invalidParams.Add(request.NewErrParamRequired("NodeType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdditionalInfo sets the AdditionalInfo field's value. -func (s *CreateClusterInput) SetAdditionalInfo(v string) *CreateClusterInput { - s.AdditionalInfo = &v - return s -} - -// SetAllowVersionUpgrade sets the AllowVersionUpgrade field's value. -func (s *CreateClusterInput) SetAllowVersionUpgrade(v bool) *CreateClusterInput { - s.AllowVersionUpgrade = &v - return s -} - -// SetAutomatedSnapshotRetentionPeriod sets the AutomatedSnapshotRetentionPeriod field's value. -func (s *CreateClusterInput) SetAutomatedSnapshotRetentionPeriod(v int64) *CreateClusterInput { - s.AutomatedSnapshotRetentionPeriod = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateClusterInput) SetAvailabilityZone(v string) *CreateClusterInput { - s.AvailabilityZone = &v - return s -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *CreateClusterInput) SetClusterIdentifier(v string) *CreateClusterInput { - s.ClusterIdentifier = &v - return s -} - -// SetClusterParameterGroupName sets the ClusterParameterGroupName field's value. -func (s *CreateClusterInput) SetClusterParameterGroupName(v string) *CreateClusterInput { - s.ClusterParameterGroupName = &v - return s -} - -// SetClusterSecurityGroups sets the ClusterSecurityGroups field's value. -func (s *CreateClusterInput) SetClusterSecurityGroups(v []*string) *CreateClusterInput { - s.ClusterSecurityGroups = v - return s -} - -// SetClusterSubnetGroupName sets the ClusterSubnetGroupName field's value. -func (s *CreateClusterInput) SetClusterSubnetGroupName(v string) *CreateClusterInput { - s.ClusterSubnetGroupName = &v - return s -} - -// SetClusterType sets the ClusterType field's value. -func (s *CreateClusterInput) SetClusterType(v string) *CreateClusterInput { - s.ClusterType = &v - return s -} - -// SetClusterVersion sets the ClusterVersion field's value. -func (s *CreateClusterInput) SetClusterVersion(v string) *CreateClusterInput { - s.ClusterVersion = &v - return s -} - -// SetDBName sets the DBName field's value. -func (s *CreateClusterInput) SetDBName(v string) *CreateClusterInput { - s.DBName = &v - return s -} - -// SetElasticIp sets the ElasticIp field's value. -func (s *CreateClusterInput) SetElasticIp(v string) *CreateClusterInput { - s.ElasticIp = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *CreateClusterInput) SetEncrypted(v bool) *CreateClusterInput { - s.Encrypted = &v - return s -} - -// SetEnhancedVpcRouting sets the EnhancedVpcRouting field's value. -func (s *CreateClusterInput) SetEnhancedVpcRouting(v bool) *CreateClusterInput { - s.EnhancedVpcRouting = &v - return s -} - -// SetHsmClientCertificateIdentifier sets the HsmClientCertificateIdentifier field's value. -func (s *CreateClusterInput) SetHsmClientCertificateIdentifier(v string) *CreateClusterInput { - s.HsmClientCertificateIdentifier = &v - return s -} - -// SetHsmConfigurationIdentifier sets the HsmConfigurationIdentifier field's value. -func (s *CreateClusterInput) SetHsmConfigurationIdentifier(v string) *CreateClusterInput { - s.HsmConfigurationIdentifier = &v - return s -} - -// SetIamRoles sets the IamRoles field's value. -func (s *CreateClusterInput) SetIamRoles(v []*string) *CreateClusterInput { - s.IamRoles = v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateClusterInput) SetKmsKeyId(v string) *CreateClusterInput { - s.KmsKeyId = &v - return s -} - -// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. -func (s *CreateClusterInput) SetMaintenanceTrackName(v string) *CreateClusterInput { - s.MaintenanceTrackName = &v - return s -} - -// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. -func (s *CreateClusterInput) SetManualSnapshotRetentionPeriod(v int64) *CreateClusterInput { - s.ManualSnapshotRetentionPeriod = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *CreateClusterInput) SetMasterUserPassword(v string) *CreateClusterInput { - s.MasterUserPassword = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *CreateClusterInput) SetMasterUsername(v string) *CreateClusterInput { - s.MasterUsername = &v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *CreateClusterInput) SetNodeType(v string) *CreateClusterInput { - s.NodeType = &v - return s -} - -// SetNumberOfNodes sets the NumberOfNodes field's value. -func (s *CreateClusterInput) SetNumberOfNodes(v int64) *CreateClusterInput { - s.NumberOfNodes = &v - return s -} - -// SetPort sets the Port field's value. -func (s *CreateClusterInput) SetPort(v int64) *CreateClusterInput { - s.Port = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CreateClusterInput) SetPreferredMaintenanceWindow(v string) *CreateClusterInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *CreateClusterInput) SetPubliclyAccessible(v bool) *CreateClusterInput { - s.PubliclyAccessible = &v - return s -} - -// SetSnapshotScheduleIdentifier sets the SnapshotScheduleIdentifier field's value. -func (s *CreateClusterInput) SetSnapshotScheduleIdentifier(v string) *CreateClusterInput { - s.SnapshotScheduleIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateClusterInput) SetTags(v []*Tag) *CreateClusterInput { - s.Tags = v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *CreateClusterInput) SetVpcSecurityGroupIds(v []*string) *CreateClusterInput { - s.VpcSecurityGroupIds = v - return s -} - -type CreateClusterOutput struct { - _ struct{} `type:"structure"` - - // Describes a cluster. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s CreateClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *CreateClusterOutput) SetCluster(v *Cluster) *CreateClusterOutput { - s.Cluster = v - return s -} - -type CreateClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // A description of the parameter group. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // The Amazon Redshift engine version to which the cluster parameter group applies. - // The cluster engine version determines the set of parameters. - // - // To get a list of valid parameter group family names, you can call DescribeClusterParameterGroups. - // By default, Amazon Redshift returns a list of all the parameter groups that - // are owned by your AWS account, including the default parameter groups for - // each Amazon Redshift engine version. The parameter group family names associated - // with the default parameter groups provide you the valid values. For example, - // a valid family name is "redshift-1.0". - // - // ParameterGroupFamily is a required field - ParameterGroupFamily *string `type:"string" required:"true"` - - // The name of the cluster parameter group. - // - // Constraints: - // - // * Must be 1 to 255 alphanumeric characters or hyphens - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // * Must be unique withing your AWS account. - // - // This value is stored as a lower-case string. - // - // ParameterGroupName is a required field - ParameterGroupName *string `type:"string" required:"true"` - - // A list of tag instances. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateClusterParameterGroupInput"} - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - if s.ParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterGroupFamily")) - } - if s.ParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateClusterParameterGroupInput) SetDescription(v string) *CreateClusterParameterGroupInput { - s.Description = &v - return s -} - -// SetParameterGroupFamily sets the ParameterGroupFamily field's value. -func (s *CreateClusterParameterGroupInput) SetParameterGroupFamily(v string) *CreateClusterParameterGroupInput { - s.ParameterGroupFamily = &v - return s -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *CreateClusterParameterGroupInput) SetParameterGroupName(v string) *CreateClusterParameterGroupInput { - s.ParameterGroupName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateClusterParameterGroupInput) SetTags(v []*Tag) *CreateClusterParameterGroupInput { - s.Tags = v - return s -} - -type CreateClusterParameterGroupOutput struct { - _ struct{} `type:"structure"` - - // Describes a parameter group. - ClusterParameterGroup *ClusterParameterGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateClusterParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterParameterGroupOutput) GoString() string { - return s.String() -} - -// SetClusterParameterGroup sets the ClusterParameterGroup field's value. -func (s *CreateClusterParameterGroupOutput) SetClusterParameterGroup(v *ClusterParameterGroup) *CreateClusterParameterGroupOutput { - s.ClusterParameterGroup = v - return s -} - -type CreateClusterSecurityGroupInput struct { - _ struct{} `type:"structure"` - - // The name for the security group. Amazon Redshift stores the value as a lowercase - // string. - // - // Constraints: - // - // * Must contain no more than 255 alphanumeric characters or hyphens. - // - // * Must not be "Default". - // - // * Must be unique for all security groups that are created by your AWS - // account. - // - // Example: examplesecuritygroup - // - // ClusterSecurityGroupName is a required field - ClusterSecurityGroupName *string `type:"string" required:"true"` - - // A description for the security group. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // A list of tag instances. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateClusterSecurityGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterSecurityGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateClusterSecurityGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateClusterSecurityGroupInput"} - if s.ClusterSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterSecurityGroupName")) - } - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterSecurityGroupName sets the ClusterSecurityGroupName field's value. -func (s *CreateClusterSecurityGroupInput) SetClusterSecurityGroupName(v string) *CreateClusterSecurityGroupInput { - s.ClusterSecurityGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateClusterSecurityGroupInput) SetDescription(v string) *CreateClusterSecurityGroupInput { - s.Description = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateClusterSecurityGroupInput) SetTags(v []*Tag) *CreateClusterSecurityGroupInput { - s.Tags = v - return s -} - -type CreateClusterSecurityGroupOutput struct { - _ struct{} `type:"structure"` - - // Describes a security group. - ClusterSecurityGroup *ClusterSecurityGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateClusterSecurityGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterSecurityGroupOutput) GoString() string { - return s.String() -} - -// SetClusterSecurityGroup sets the ClusterSecurityGroup field's value. -func (s *CreateClusterSecurityGroupOutput) SetClusterSecurityGroup(v *ClusterSecurityGroup) *CreateClusterSecurityGroupOutput { - s.ClusterSecurityGroup = v - return s -} - -type CreateClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // The cluster identifier for which you want a snapshot. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // The number of days that a manual snapshot is retained. If the value is -1, - // the manual snapshot is retained indefinitely. - // - // The value must be either -1 or an integer between 1 and 3,653. - // - // The default value is -1. - ManualSnapshotRetentionPeriod *int64 `type:"integer"` - - // A unique identifier for the snapshot that you are requesting. This identifier - // must be unique for all snapshots within the AWS account. - // - // Constraints: - // - // * Cannot be null, empty, or blank - // - // * Must contain from 1 to 255 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - // - // Example: my-snapshot-id - // - // SnapshotIdentifier is a required field - SnapshotIdentifier *string `type:"string" required:"true"` - - // A list of tag instances. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateClusterSnapshotInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - if s.SnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *CreateClusterSnapshotInput) SetClusterIdentifier(v string) *CreateClusterSnapshotInput { - s.ClusterIdentifier = &v - return s -} - -// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. -func (s *CreateClusterSnapshotInput) SetManualSnapshotRetentionPeriod(v int64) *CreateClusterSnapshotInput { - s.ManualSnapshotRetentionPeriod = &v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *CreateClusterSnapshotInput) SetSnapshotIdentifier(v string) *CreateClusterSnapshotInput { - s.SnapshotIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateClusterSnapshotInput) SetTags(v []*Tag) *CreateClusterSnapshotInput { - s.Tags = v - return s -} - -type CreateClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Describes a snapshot. - Snapshot *Snapshot `type:"structure"` -} - -// String returns the string representation -func (s CreateClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetSnapshot sets the Snapshot field's value. -func (s *CreateClusterSnapshotOutput) SetSnapshot(v *Snapshot) *CreateClusterSnapshotOutput { - s.Snapshot = v - return s -} - -type CreateClusterSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The name for the subnet group. Amazon Redshift stores the value as a lowercase - // string. - // - // Constraints: - // - // * Must contain no more than 255 alphanumeric characters or hyphens. - // - // * Must not be "Default". - // - // * Must be unique for all subnet groups that are created by your AWS account. - // - // Example: examplesubnetgroup - // - // ClusterSubnetGroupName is a required field - ClusterSubnetGroupName *string `type:"string" required:"true"` - - // A description for the subnet group. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a - // single request. - // - // SubnetIds is a required field - SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` - - // A list of tag instances. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateClusterSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateClusterSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateClusterSubnetGroupInput"} - if s.ClusterSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterSubnetGroupName")) - } - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterSubnetGroupName sets the ClusterSubnetGroupName field's value. -func (s *CreateClusterSubnetGroupInput) SetClusterSubnetGroupName(v string) *CreateClusterSubnetGroupInput { - s.ClusterSubnetGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateClusterSubnetGroupInput) SetDescription(v string) *CreateClusterSubnetGroupInput { - s.Description = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateClusterSubnetGroupInput) SetSubnetIds(v []*string) *CreateClusterSubnetGroupInput { - s.SubnetIds = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateClusterSubnetGroupInput) SetTags(v []*Tag) *CreateClusterSubnetGroupInput { - s.Tags = v - return s -} - -type CreateClusterSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // Describes a subnet group. - ClusterSubnetGroup *ClusterSubnetGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateClusterSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateClusterSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetClusterSubnetGroup sets the ClusterSubnetGroup field's value. -func (s *CreateClusterSubnetGroupOutput) SetClusterSubnetGroup(v *ClusterSubnetGroup) *CreateClusterSubnetGroupOutput { - s.ClusterSubnetGroup = v - return s -} - -type CreateEventSubscriptionInput struct { - _ struct{} `type:"structure"` - - // A boolean value; set to true to activate the subscription, and set to false - // to create the subscription but not activate it. - Enabled *bool `type:"boolean"` - - // Specifies the Amazon Redshift event categories to be published by the event - // notification subscription. - // - // Values: configuration, management, monitoring, security - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // Specifies the Amazon Redshift event severity to be published by the event - // notification subscription. - // - // Values: ERROR, INFO - Severity *string `type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the - // event notifications. The ARN is created by Amazon SNS when you create a topic - // and subscribe to it. - // - // SnsTopicArn is a required field - SnsTopicArn *string `type:"string" required:"true"` - - // A list of one or more identifiers of Amazon Redshift source objects. All - // of the objects must be of the same type as was specified in the source type - // parameter. The event subscription will return only events generated by the - // specified objects. If not specified, then events are returned for all objects - // within the source type specified. - // - // Example: my-cluster-1, my-cluster-2 - // - // Example: my-snapshot-20131010 - SourceIds []*string `locationNameList:"SourceId" type:"list"` - - // The type of source that will be generating the events. For example, if you - // want to be notified of events generated by a cluster, you would set this - // parameter to cluster. If this value is not specified, events are returned - // for all Amazon Redshift objects in your AWS account. You must specify a source - // type in order to specify source IDs. - // - // Valid values: cluster, cluster-parameter-group, cluster-security-group, and - // cluster-snapshot. - SourceType *string `type:"string"` - - // The name of the event subscription to be created. - // - // Constraints: - // - // * Cannot be null, empty, or blank. - // - // * Must contain from 1 to 255 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` - - // A list of tag instances. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateEventSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEventSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateEventSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateEventSubscriptionInput"} - if s.SnsTopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("SnsTopicArn")) - } - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *CreateEventSubscriptionInput) SetEnabled(v bool) *CreateEventSubscriptionInput { - s.Enabled = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *CreateEventSubscriptionInput) SetEventCategories(v []*string) *CreateEventSubscriptionInput { - s.EventCategories = v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *CreateEventSubscriptionInput) SetSeverity(v string) *CreateEventSubscriptionInput { - s.Severity = &v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *CreateEventSubscriptionInput) SetSnsTopicArn(v string) *CreateEventSubscriptionInput { - s.SnsTopicArn = &v - return s -} - -// SetSourceIds sets the SourceIds field's value. -func (s *CreateEventSubscriptionInput) SetSourceIds(v []*string) *CreateEventSubscriptionInput { - s.SourceIds = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *CreateEventSubscriptionInput) SetSourceType(v string) *CreateEventSubscriptionInput { - s.SourceType = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *CreateEventSubscriptionInput) SetSubscriptionName(v string) *CreateEventSubscriptionInput { - s.SubscriptionName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateEventSubscriptionInput) SetTags(v []*Tag) *CreateEventSubscriptionInput { - s.Tags = v - return s -} - -type CreateEventSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // Describes event subscriptions. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s CreateEventSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEventSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *CreateEventSubscriptionOutput) SetEventSubscription(v *EventSubscription) *CreateEventSubscriptionOutput { - s.EventSubscription = v - return s -} - -type CreateHsmClientCertificateInput struct { - _ struct{} `type:"structure"` - - // The identifier to be assigned to the new HSM client certificate that the - // cluster will use to connect to the HSM to use the database encryption keys. - // - // HsmClientCertificateIdentifier is a required field - HsmClientCertificateIdentifier *string `type:"string" required:"true"` - - // A list of tag instances. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateHsmClientCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateHsmClientCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateHsmClientCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateHsmClientCertificateInput"} - if s.HsmClientCertificateIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("HsmClientCertificateIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHsmClientCertificateIdentifier sets the HsmClientCertificateIdentifier field's value. -func (s *CreateHsmClientCertificateInput) SetHsmClientCertificateIdentifier(v string) *CreateHsmClientCertificateInput { - s.HsmClientCertificateIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateHsmClientCertificateInput) SetTags(v []*Tag) *CreateHsmClientCertificateInput { - s.Tags = v - return s -} - -type CreateHsmClientCertificateOutput struct { - _ struct{} `type:"structure"` - - // Returns information about an HSM client certificate. The certificate is stored - // in a secure Hardware Storage Module (HSM), and used by the Amazon Redshift - // cluster to encrypt data files. - HsmClientCertificate *HsmClientCertificate `type:"structure"` -} - -// String returns the string representation -func (s CreateHsmClientCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateHsmClientCertificateOutput) GoString() string { - return s.String() -} - -// SetHsmClientCertificate sets the HsmClientCertificate field's value. -func (s *CreateHsmClientCertificateOutput) SetHsmClientCertificate(v *HsmClientCertificate) *CreateHsmClientCertificateOutput { - s.HsmClientCertificate = v - return s -} - -type CreateHsmConfigurationInput struct { - _ struct{} `type:"structure"` - - // A text description of the HSM configuration to be created. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // The identifier to be assigned to the new Amazon Redshift HSM configuration. - // - // HsmConfigurationIdentifier is a required field - HsmConfigurationIdentifier *string `type:"string" required:"true"` - - // The IP address that the Amazon Redshift cluster must use to access the HSM. - // - // HsmIpAddress is a required field - HsmIpAddress *string `type:"string" required:"true"` - - // The name of the partition in the HSM where the Amazon Redshift clusters will - // store their database encryption keys. - // - // HsmPartitionName is a required field - HsmPartitionName *string `type:"string" required:"true"` - - // The password required to access the HSM partition. - // - // HsmPartitionPassword is a required field - HsmPartitionPassword *string `type:"string" required:"true"` - - // The HSMs public certificate file. When using Cloud HSM, the file name is - // server.pem. - // - // HsmServerPublicCertificate is a required field - HsmServerPublicCertificate *string `type:"string" required:"true"` - - // A list of tag instances. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateHsmConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateHsmConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateHsmConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateHsmConfigurationInput"} - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - if s.HsmConfigurationIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("HsmConfigurationIdentifier")) - } - if s.HsmIpAddress == nil { - invalidParams.Add(request.NewErrParamRequired("HsmIpAddress")) - } - if s.HsmPartitionName == nil { - invalidParams.Add(request.NewErrParamRequired("HsmPartitionName")) - } - if s.HsmPartitionPassword == nil { - invalidParams.Add(request.NewErrParamRequired("HsmPartitionPassword")) - } - if s.HsmServerPublicCertificate == nil { - invalidParams.Add(request.NewErrParamRequired("HsmServerPublicCertificate")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateHsmConfigurationInput) SetDescription(v string) *CreateHsmConfigurationInput { - s.Description = &v - return s -} - -// SetHsmConfigurationIdentifier sets the HsmConfigurationIdentifier field's value. -func (s *CreateHsmConfigurationInput) SetHsmConfigurationIdentifier(v string) *CreateHsmConfigurationInput { - s.HsmConfigurationIdentifier = &v - return s -} - -// SetHsmIpAddress sets the HsmIpAddress field's value. -func (s *CreateHsmConfigurationInput) SetHsmIpAddress(v string) *CreateHsmConfigurationInput { - s.HsmIpAddress = &v - return s -} - -// SetHsmPartitionName sets the HsmPartitionName field's value. -func (s *CreateHsmConfigurationInput) SetHsmPartitionName(v string) *CreateHsmConfigurationInput { - s.HsmPartitionName = &v - return s -} - -// SetHsmPartitionPassword sets the HsmPartitionPassword field's value. -func (s *CreateHsmConfigurationInput) SetHsmPartitionPassword(v string) *CreateHsmConfigurationInput { - s.HsmPartitionPassword = &v - return s -} - -// SetHsmServerPublicCertificate sets the HsmServerPublicCertificate field's value. -func (s *CreateHsmConfigurationInput) SetHsmServerPublicCertificate(v string) *CreateHsmConfigurationInput { - s.HsmServerPublicCertificate = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateHsmConfigurationInput) SetTags(v []*Tag) *CreateHsmConfigurationInput { - s.Tags = v - return s -} - -type CreateHsmConfigurationOutput struct { - _ struct{} `type:"structure"` - - // Returns information about an HSM configuration, which is an object that describes - // to Amazon Redshift clusters the information they require to connect to an - // HSM where they can store database encryption keys. - HsmConfiguration *HsmConfiguration `type:"structure"` -} - -// String returns the string representation -func (s CreateHsmConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateHsmConfigurationOutput) GoString() string { - return s.String() -} - -// SetHsmConfiguration sets the HsmConfiguration field's value. -func (s *CreateHsmConfigurationOutput) SetHsmConfiguration(v *HsmConfiguration) *CreateHsmConfigurationOutput { - s.HsmConfiguration = v - return s -} - -// The result of the CreateSnapshotCopyGrant action. -type CreateSnapshotCopyGrantInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the customer master key (CMK) to which to grant - // Amazon Redshift permission. If no key is specified, the default key is used. - KmsKeyId *string `type:"string"` - - // The name of the snapshot copy grant. This name must be unique in the region - // for the AWS account. - // - // Constraints: - // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. - // - // * Alphabetic characters must be lowercase. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // * Must be unique for all clusters within an AWS account. - // - // SnapshotCopyGrantName is a required field - SnapshotCopyGrantName *string `type:"string" required:"true"` - - // A list of tag instances. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateSnapshotCopyGrantInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSnapshotCopyGrantInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSnapshotCopyGrantInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotCopyGrantInput"} - if s.SnapshotCopyGrantName == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotCopyGrantName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateSnapshotCopyGrantInput) SetKmsKeyId(v string) *CreateSnapshotCopyGrantInput { - s.KmsKeyId = &v - return s -} - -// SetSnapshotCopyGrantName sets the SnapshotCopyGrantName field's value. -func (s *CreateSnapshotCopyGrantInput) SetSnapshotCopyGrantName(v string) *CreateSnapshotCopyGrantInput { - s.SnapshotCopyGrantName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateSnapshotCopyGrantInput) SetTags(v []*Tag) *CreateSnapshotCopyGrantInput { - s.Tags = v - return s -} - -type CreateSnapshotCopyGrantOutput struct { - _ struct{} `type:"structure"` - - // The snapshot copy grant that grants Amazon Redshift permission to encrypt - // copied snapshots with the specified customer master key (CMK) from AWS KMS - // in the destination region. - // - // For more information about managing snapshot copy grants, go to Amazon Redshift - // Database Encryption (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html) - // in the Amazon Redshift Cluster Management Guide. - SnapshotCopyGrant *SnapshotCopyGrant `type:"structure"` -} - -// String returns the string representation -func (s CreateSnapshotCopyGrantOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSnapshotCopyGrantOutput) GoString() string { - return s.String() -} - -// SetSnapshotCopyGrant sets the SnapshotCopyGrant field's value. -func (s *CreateSnapshotCopyGrantOutput) SetSnapshotCopyGrant(v *SnapshotCopyGrant) *CreateSnapshotCopyGrantOutput { - s.SnapshotCopyGrant = v - return s -} - -type CreateSnapshotScheduleInput struct { - _ struct{} `type:"structure"` - - DryRun *bool `type:"boolean"` - - NextInvocations *int64 `type:"integer"` - - // The definition of the snapshot schedule. The definition is made up of schedule - // expressions, for example "cron(30 12 *)" or "rate(12 hours)". - ScheduleDefinitions []*string `locationNameList:"ScheduleDefinition" type:"list"` - - // The description of the snapshot schedule. - ScheduleDescription *string `type:"string"` - - // A unique identifier for a snapshot schedule. Only alphanumeric characters - // are allowed for the identifier. - ScheduleIdentifier *string `type:"string"` - - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateSnapshotScheduleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSnapshotScheduleInput) GoString() string { - return s.String() -} - -// SetDryRun sets the DryRun field's value. -func (s *CreateSnapshotScheduleInput) SetDryRun(v bool) *CreateSnapshotScheduleInput { - s.DryRun = &v - return s -} - -// SetNextInvocations sets the NextInvocations field's value. -func (s *CreateSnapshotScheduleInput) SetNextInvocations(v int64) *CreateSnapshotScheduleInput { - s.NextInvocations = &v - return s -} - -// SetScheduleDefinitions sets the ScheduleDefinitions field's value. -func (s *CreateSnapshotScheduleInput) SetScheduleDefinitions(v []*string) *CreateSnapshotScheduleInput { - s.ScheduleDefinitions = v - return s -} - -// SetScheduleDescription sets the ScheduleDescription field's value. -func (s *CreateSnapshotScheduleInput) SetScheduleDescription(v string) *CreateSnapshotScheduleInput { - s.ScheduleDescription = &v - return s -} - -// SetScheduleIdentifier sets the ScheduleIdentifier field's value. -func (s *CreateSnapshotScheduleInput) SetScheduleIdentifier(v string) *CreateSnapshotScheduleInput { - s.ScheduleIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateSnapshotScheduleInput) SetTags(v []*Tag) *CreateSnapshotScheduleInput { - s.Tags = v - return s -} - -// Describes a snapshot schedule. You can set a regular interval for creating -// snapshots of a cluster. You can also schedule snapshots for specific dates. -type CreateSnapshotScheduleOutput struct { - _ struct{} `type:"structure"` - - AssociatedClusterCount *int64 `type:"integer"` - - AssociatedClusters []*ClusterAssociatedToSchedule `locationNameList:"ClusterAssociatedToSchedule" type:"list"` - - NextInvocations []*time.Time `locationNameList:"SnapshotTime" type:"list"` - - // A list of ScheduleDefinitions - ScheduleDefinitions []*string `locationNameList:"ScheduleDefinition" type:"list"` - - // The description of the schedule. - ScheduleDescription *string `type:"string"` - - // A unique identifier for the schedule. - ScheduleIdentifier *string `type:"string"` - - // An optional set of tags describing the schedule. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s CreateSnapshotScheduleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSnapshotScheduleOutput) GoString() string { - return s.String() -} - -// SetAssociatedClusterCount sets the AssociatedClusterCount field's value. -func (s *CreateSnapshotScheduleOutput) SetAssociatedClusterCount(v int64) *CreateSnapshotScheduleOutput { - s.AssociatedClusterCount = &v - return s -} - -// SetAssociatedClusters sets the AssociatedClusters field's value. -func (s *CreateSnapshotScheduleOutput) SetAssociatedClusters(v []*ClusterAssociatedToSchedule) *CreateSnapshotScheduleOutput { - s.AssociatedClusters = v - return s -} - -// SetNextInvocations sets the NextInvocations field's value. -func (s *CreateSnapshotScheduleOutput) SetNextInvocations(v []*time.Time) *CreateSnapshotScheduleOutput { - s.NextInvocations = v - return s -} - -// SetScheduleDefinitions sets the ScheduleDefinitions field's value. -func (s *CreateSnapshotScheduleOutput) SetScheduleDefinitions(v []*string) *CreateSnapshotScheduleOutput { - s.ScheduleDefinitions = v - return s -} - -// SetScheduleDescription sets the ScheduleDescription field's value. -func (s *CreateSnapshotScheduleOutput) SetScheduleDescription(v string) *CreateSnapshotScheduleOutput { - s.ScheduleDescription = &v - return s -} - -// SetScheduleIdentifier sets the ScheduleIdentifier field's value. -func (s *CreateSnapshotScheduleOutput) SetScheduleIdentifier(v string) *CreateSnapshotScheduleOutput { - s.ScheduleIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateSnapshotScheduleOutput) SetTags(v []*Tag) *CreateSnapshotScheduleOutput { - s.Tags = v - return s -} - -// Contains the output from the CreateTags action. -type CreateTagsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) to which you want to add the tag or tags. - // For example, arn:aws:redshift:us-east-1:123456789:cluster:t1. - // - // ResourceName is a required field - ResourceName *string `type:"string" required:"true"` - - // One or more name/value pairs to add as tags to the specified resource. Each - // tag name is passed in with the parameter Key and the corresponding value - // is passed in with the parameter Value. The Key and Value parameters are separated - // by a comma (,). Separate multiple tags with a space. For example, --tags - // "Key"="owner","Value"="admin" "Key"="environment","Value"="test" "Key"="version","Value"="1.0". - // - // Tags is a required field - Tags []*Tag `locationNameList:"Tag" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *CreateTagsInput) SetResourceName(v string) *CreateTagsInput { - s.ResourceName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateTagsInput) SetTags(v []*Tag) *CreateTagsInput { - s.Tags = v - return s -} - -type CreateTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTagsOutput) GoString() string { - return s.String() -} - -// Describes the status of a cluster while it is in the process of resizing -// with an incremental resize. -type DataTransferProgress struct { - _ struct{} `type:"structure"` - - // Describes the data transfer rate in MB's per second. - CurrentRateInMegaBytesPerSecond *float64 `type:"double"` - - // Describes the total amount of data that has been transfered in MB's. - DataTransferredInMegaBytes *int64 `type:"long"` - - // Describes the number of seconds that have elapsed during the data transfer. - ElapsedTimeInSeconds *int64 `type:"long"` - - // Describes the estimated number of seconds remaining to complete the transfer. - EstimatedTimeToCompletionInSeconds *int64 `type:"long"` - - // Describes the status of the cluster. While the transfer is in progress the - // status is transferringdata. - Status *string `type:"string"` - - // Describes the total amount of data to be transfered in megabytes. - TotalDataInMegaBytes *int64 `type:"long"` -} - -// String returns the string representation -func (s DataTransferProgress) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DataTransferProgress) GoString() string { - return s.String() -} - -// SetCurrentRateInMegaBytesPerSecond sets the CurrentRateInMegaBytesPerSecond field's value. -func (s *DataTransferProgress) SetCurrentRateInMegaBytesPerSecond(v float64) *DataTransferProgress { - s.CurrentRateInMegaBytesPerSecond = &v - return s -} - -// SetDataTransferredInMegaBytes sets the DataTransferredInMegaBytes field's value. -func (s *DataTransferProgress) SetDataTransferredInMegaBytes(v int64) *DataTransferProgress { - s.DataTransferredInMegaBytes = &v - return s -} - -// SetElapsedTimeInSeconds sets the ElapsedTimeInSeconds field's value. -func (s *DataTransferProgress) SetElapsedTimeInSeconds(v int64) *DataTransferProgress { - s.ElapsedTimeInSeconds = &v - return s -} - -// SetEstimatedTimeToCompletionInSeconds sets the EstimatedTimeToCompletionInSeconds field's value. -func (s *DataTransferProgress) SetEstimatedTimeToCompletionInSeconds(v int64) *DataTransferProgress { - s.EstimatedTimeToCompletionInSeconds = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DataTransferProgress) SetStatus(v string) *DataTransferProgress { - s.Status = &v - return s -} - -// SetTotalDataInMegaBytes sets the TotalDataInMegaBytes field's value. -func (s *DataTransferProgress) SetTotalDataInMegaBytes(v int64) *DataTransferProgress { - s.TotalDataInMegaBytes = &v - return s -} - -// Describes the default cluster parameters for a parameter group family. -type DefaultClusterParameters struct { - _ struct{} `type:"structure"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` - - // The name of the cluster parameter group family to which the engine default - // parameters apply. - ParameterGroupFamily *string `type:"string"` - - // The list of cluster default parameters. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` -} - -// String returns the string representation -func (s DefaultClusterParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DefaultClusterParameters) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DefaultClusterParameters) SetMarker(v string) *DefaultClusterParameters { - s.Marker = &v - return s -} - -// SetParameterGroupFamily sets the ParameterGroupFamily field's value. -func (s *DefaultClusterParameters) SetParameterGroupFamily(v string) *DefaultClusterParameters { - s.ParameterGroupFamily = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DefaultClusterParameters) SetParameters(v []*Parameter) *DefaultClusterParameters { - s.Parameters = v - return s -} - -// Describes a deferred maintenance window -type DeferredMaintenanceWindow struct { - _ struct{} `type:"structure"` - - // A timestamp for the end of the time period when we defer maintenance. - DeferMaintenanceEndTime *time.Time `type:"timestamp"` - - // A unique identifier for the maintenance window. - DeferMaintenanceIdentifier *string `type:"string"` - - // A timestamp for the beginning of the time period when we defer maintenance. - DeferMaintenanceStartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s DeferredMaintenanceWindow) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeferredMaintenanceWindow) GoString() string { - return s.String() -} - -// SetDeferMaintenanceEndTime sets the DeferMaintenanceEndTime field's value. -func (s *DeferredMaintenanceWindow) SetDeferMaintenanceEndTime(v time.Time) *DeferredMaintenanceWindow { - s.DeferMaintenanceEndTime = &v - return s -} - -// SetDeferMaintenanceIdentifier sets the DeferMaintenanceIdentifier field's value. -func (s *DeferredMaintenanceWindow) SetDeferMaintenanceIdentifier(v string) *DeferredMaintenanceWindow { - s.DeferMaintenanceIdentifier = &v - return s -} - -// SetDeferMaintenanceStartTime sets the DeferMaintenanceStartTime field's value. -func (s *DeferredMaintenanceWindow) SetDeferMaintenanceStartTime(v time.Time) *DeferredMaintenanceWindow { - s.DeferMaintenanceStartTime = &v - return s -} - -type DeleteClusterInput struct { - _ struct{} `type:"structure"` - - // The identifier of the cluster to be deleted. - // - // Constraints: - // - // * Must contain lowercase characters. - // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // The identifier of the final snapshot that is to be created immediately before - // deleting the cluster. If this parameter is provided, SkipFinalClusterSnapshot - // must be false. - // - // Constraints: - // - // * Must be 1 to 255 alphanumeric characters. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - FinalClusterSnapshotIdentifier *string `type:"string"` - - // The number of days that a manual snapshot is retained. If the value is -1, - // the manual snapshot is retained indefinitely. - // - // The value must be either -1 or an integer between 1 and 3,653. - // - // The default value is -1. - FinalClusterSnapshotRetentionPeriod *int64 `type:"integer"` - - // Determines whether a final snapshot of the cluster is created before Amazon - // Redshift deletes the cluster. If true, a final cluster snapshot is not created. - // If false, a final cluster snapshot is created before the cluster is deleted. - // - // The FinalClusterSnapshotIdentifier parameter must be specified if SkipFinalClusterSnapshot - // is false. - // - // Default: false - SkipFinalClusterSnapshot *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeleteClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *DeleteClusterInput) SetClusterIdentifier(v string) *DeleteClusterInput { - s.ClusterIdentifier = &v - return s -} - -// SetFinalClusterSnapshotIdentifier sets the FinalClusterSnapshotIdentifier field's value. -func (s *DeleteClusterInput) SetFinalClusterSnapshotIdentifier(v string) *DeleteClusterInput { - s.FinalClusterSnapshotIdentifier = &v - return s -} - -// SetFinalClusterSnapshotRetentionPeriod sets the FinalClusterSnapshotRetentionPeriod field's value. -func (s *DeleteClusterInput) SetFinalClusterSnapshotRetentionPeriod(v int64) *DeleteClusterInput { - s.FinalClusterSnapshotRetentionPeriod = &v - return s -} - -// SetSkipFinalClusterSnapshot sets the SkipFinalClusterSnapshot field's value. -func (s *DeleteClusterInput) SetSkipFinalClusterSnapshot(v bool) *DeleteClusterInput { - s.SkipFinalClusterSnapshot = &v - return s -} - -type DeleteClusterOutput struct { - _ struct{} `type:"structure"` - - // Describes a cluster. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s DeleteClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *DeleteClusterOutput) SetCluster(v *Cluster) *DeleteClusterOutput { - s.Cluster = v - return s -} - -type DeleteClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the parameter group to be deleted. - // - // Constraints: - // - // * Must be the name of an existing cluster parameter group. - // - // * Cannot delete a default cluster parameter group. - // - // ParameterGroupName is a required field - ParameterGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClusterParameterGroupInput"} - if s.ParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *DeleteClusterParameterGroupInput) SetParameterGroupName(v string) *DeleteClusterParameterGroupInput { - s.ParameterGroupName = &v - return s -} - -type DeleteClusterParameterGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteClusterParameterGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterParameterGroupOutput) GoString() string { - return s.String() -} - -type DeleteClusterSecurityGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the cluster security group to be deleted. - // - // ClusterSecurityGroupName is a required field - ClusterSecurityGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteClusterSecurityGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterSecurityGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClusterSecurityGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClusterSecurityGroupInput"} - if s.ClusterSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterSecurityGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterSecurityGroupName sets the ClusterSecurityGroupName field's value. -func (s *DeleteClusterSecurityGroupInput) SetClusterSecurityGroupName(v string) *DeleteClusterSecurityGroupInput { - s.ClusterSecurityGroupName = &v - return s -} - -type DeleteClusterSecurityGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteClusterSecurityGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterSecurityGroupOutput) GoString() string { - return s.String() -} - -type DeleteClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the cluster the snapshot was created from. This - // parameter is required if your IAM user has a policy containing a snapshot - // resource element that specifies anything other than * for the cluster name. - // - // Constraints: Must be the name of valid cluster. - SnapshotClusterIdentifier *string `type:"string"` - - // The unique identifier of the manual snapshot to be deleted. - // - // Constraints: Must be the name of an existing snapshot that is in the available, - // failed, or cancelled state. - // - // SnapshotIdentifier is a required field - SnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClusterSnapshotInput"} - if s.SnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSnapshotClusterIdentifier sets the SnapshotClusterIdentifier field's value. -func (s *DeleteClusterSnapshotInput) SetSnapshotClusterIdentifier(v string) *DeleteClusterSnapshotInput { - s.SnapshotClusterIdentifier = &v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *DeleteClusterSnapshotInput) SetSnapshotIdentifier(v string) *DeleteClusterSnapshotInput { - s.SnapshotIdentifier = &v - return s -} - -type DeleteClusterSnapshotMessage struct { - _ struct{} `type:"structure"` - - // The unique identifier of the cluster the snapshot was created from. This - // parameter is required if your IAM user has a policy containing a snapshot - // resource element that specifies anything other than * for the cluster name. - // - // Constraints: Must be the name of valid cluster. - SnapshotClusterIdentifier *string `type:"string"` - - // The unique identifier of the manual snapshot to be deleted. - // - // Constraints: Must be the name of an existing snapshot that is in the available, - // failed, or cancelled state. - // - // SnapshotIdentifier is a required field - SnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteClusterSnapshotMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterSnapshotMessage) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClusterSnapshotMessage) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClusterSnapshotMessage"} - if s.SnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSnapshotClusterIdentifier sets the SnapshotClusterIdentifier field's value. -func (s *DeleteClusterSnapshotMessage) SetSnapshotClusterIdentifier(v string) *DeleteClusterSnapshotMessage { - s.SnapshotClusterIdentifier = &v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *DeleteClusterSnapshotMessage) SetSnapshotIdentifier(v string) *DeleteClusterSnapshotMessage { - s.SnapshotIdentifier = &v - return s -} - -type DeleteClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Describes a snapshot. - Snapshot *Snapshot `type:"structure"` -} - -// String returns the string representation -func (s DeleteClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetSnapshot sets the Snapshot field's value. -func (s *DeleteClusterSnapshotOutput) SetSnapshot(v *Snapshot) *DeleteClusterSnapshotOutput { - s.Snapshot = v - return s -} - -type DeleteClusterSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the cluster subnet group name to be deleted. - // - // ClusterSubnetGroupName is a required field - ClusterSubnetGroupName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteClusterSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClusterSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClusterSubnetGroupInput"} - if s.ClusterSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterSubnetGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterSubnetGroupName sets the ClusterSubnetGroupName field's value. -func (s *DeleteClusterSubnetGroupInput) SetClusterSubnetGroupName(v string) *DeleteClusterSubnetGroupInput { - s.ClusterSubnetGroupName = &v - return s -} - -type DeleteClusterSubnetGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteClusterSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteClusterSubnetGroupOutput) GoString() string { - return s.String() -} - -type DeleteEventSubscriptionInput struct { - _ struct{} `type:"structure"` - - // The name of the Amazon Redshift event notification subscription to be deleted. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEventSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEventSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEventSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEventSubscriptionInput"} - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *DeleteEventSubscriptionInput) SetSubscriptionName(v string) *DeleteEventSubscriptionInput { - s.SubscriptionName = &v - return s -} - -type DeleteEventSubscriptionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteEventSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEventSubscriptionOutput) GoString() string { - return s.String() -} - -type DeleteHsmClientCertificateInput struct { - _ struct{} `type:"structure"` - - // The identifier of the HSM client certificate to be deleted. - // - // HsmClientCertificateIdentifier is a required field - HsmClientCertificateIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteHsmClientCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteHsmClientCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteHsmClientCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteHsmClientCertificateInput"} - if s.HsmClientCertificateIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("HsmClientCertificateIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHsmClientCertificateIdentifier sets the HsmClientCertificateIdentifier field's value. -func (s *DeleteHsmClientCertificateInput) SetHsmClientCertificateIdentifier(v string) *DeleteHsmClientCertificateInput { - s.HsmClientCertificateIdentifier = &v - return s -} - -type DeleteHsmClientCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteHsmClientCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteHsmClientCertificateOutput) GoString() string { - return s.String() -} - -type DeleteHsmConfigurationInput struct { - _ struct{} `type:"structure"` - - // The identifier of the Amazon Redshift HSM configuration to be deleted. - // - // HsmConfigurationIdentifier is a required field - HsmConfigurationIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteHsmConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteHsmConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteHsmConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteHsmConfigurationInput"} - if s.HsmConfigurationIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("HsmConfigurationIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHsmConfigurationIdentifier sets the HsmConfigurationIdentifier field's value. -func (s *DeleteHsmConfigurationInput) SetHsmConfigurationIdentifier(v string) *DeleteHsmConfigurationInput { - s.HsmConfigurationIdentifier = &v - return s -} - -type DeleteHsmConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteHsmConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteHsmConfigurationOutput) GoString() string { - return s.String() -} - -// The result of the DeleteSnapshotCopyGrant action. -type DeleteSnapshotCopyGrantInput struct { - _ struct{} `type:"structure"` - - // The name of the snapshot copy grant to delete. - // - // SnapshotCopyGrantName is a required field - SnapshotCopyGrantName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSnapshotCopyGrantInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSnapshotCopyGrantInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSnapshotCopyGrantInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotCopyGrantInput"} - if s.SnapshotCopyGrantName == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotCopyGrantName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSnapshotCopyGrantName sets the SnapshotCopyGrantName field's value. -func (s *DeleteSnapshotCopyGrantInput) SetSnapshotCopyGrantName(v string) *DeleteSnapshotCopyGrantInput { - s.SnapshotCopyGrantName = &v - return s -} - -type DeleteSnapshotCopyGrantOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteSnapshotCopyGrantOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSnapshotCopyGrantOutput) GoString() string { - return s.String() -} - -type DeleteSnapshotScheduleInput struct { - _ struct{} `type:"structure"` - - // A unique identifier of the snapshot schedule to delete. - // - // ScheduleIdentifier is a required field - ScheduleIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSnapshotScheduleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSnapshotScheduleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSnapshotScheduleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotScheduleInput"} - if s.ScheduleIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduleIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetScheduleIdentifier sets the ScheduleIdentifier field's value. -func (s *DeleteSnapshotScheduleInput) SetScheduleIdentifier(v string) *DeleteSnapshotScheduleInput { - s.ScheduleIdentifier = &v - return s -} - -type DeleteSnapshotScheduleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteSnapshotScheduleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSnapshotScheduleOutput) GoString() string { - return s.String() -} - -// Contains the output from the DeleteTags action. -type DeleteTagsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) from which you want to remove the tag or tags. - // For example, arn:aws:redshift:us-east-1:123456789:cluster:t1. - // - // ResourceName is a required field - ResourceName *string `type:"string" required:"true"` - - // The tag key that you want to delete. - // - // TagKeys is a required field - TagKeys []*string `locationNameList:"TagKey" type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceName sets the ResourceName field's value. -func (s *DeleteTagsInput) SetResourceName(v string) *DeleteTagsInput { - s.ResourceName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput { - s.TagKeys = v - return s -} - -type DeleteTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagsOutput) GoString() string { - return s.String() -} - -type DescribeAccountAttributesInput struct { - _ struct{} `type:"structure"` - - // A list of attribute names. - AttributeNames []*string `locationNameList:"AttributeName" type:"list"` -} - -// String returns the string representation -func (s DescribeAccountAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountAttributesInput) GoString() string { - return s.String() -} - -// SetAttributeNames sets the AttributeNames field's value. -func (s *DescribeAccountAttributesInput) SetAttributeNames(v []*string) *DescribeAccountAttributesInput { - s.AttributeNames = v - return s -} - -type DescribeAccountAttributesOutput struct { - _ struct{} `type:"structure"` - - // A list of attributes assigned to an account. - AccountAttributes []*AccountAttribute `locationNameList:"AccountAttribute" type:"list"` -} - -// String returns the string representation -func (s DescribeAccountAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountAttributesOutput) GoString() string { - return s.String() -} - -// SetAccountAttributes sets the AccountAttributes field's value. -func (s *DescribeAccountAttributesOutput) SetAccountAttributes(v []*AccountAttribute) *DescribeAccountAttributesOutput { - s.AccountAttributes = v - return s -} - -type DescribeClusterDbRevisionsInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for a cluster whose ClusterDbRevisions you are requesting. - // This parameter is case sensitive. All clusters defined for an account are - // returned by default. - ClusterIdentifier *string `type:"string"` - - // An optional parameter that specifies the starting point for returning a set - // of response records. When the results of a DescribeClusterDbRevisions request - // exceed the value specified in MaxRecords, Amazon Redshift returns a value - // in the marker field of the response. You can retrieve the next set of response - // records by providing the returned marker value in the marker parameter and - // retrying the request. - // - // Constraints: You can specify either the ClusterIdentifier parameter, or the - // marker parameter, but not both. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in the marker field of the response. You can retrieve the next - // set of response records by providing the returned marker value in the marker - // parameter and retrying the request. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeClusterDbRevisionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterDbRevisionsInput) GoString() string { - return s.String() -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *DescribeClusterDbRevisionsInput) SetClusterIdentifier(v string) *DescribeClusterDbRevisionsInput { - s.ClusterIdentifier = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterDbRevisionsInput) SetMarker(v string) *DescribeClusterDbRevisionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeClusterDbRevisionsInput) SetMaxRecords(v int64) *DescribeClusterDbRevisionsInput { - s.MaxRecords = &v - return s -} - -type DescribeClusterDbRevisionsOutput struct { - _ struct{} `type:"structure"` - - // A list of revisions. - ClusterDbRevisions []*ClusterDbRevision `locationNameList:"ClusterDbRevision" type:"list"` - - // A string representing the starting point for the next set of revisions. If - // a value is returned in a response, you can retrieve the next set of revisions - // by providing the value in the marker parameter and retrying the command. - // If the marker field is empty, all revisions have already been returned. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeClusterDbRevisionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterDbRevisionsOutput) GoString() string { - return s.String() -} - -// SetClusterDbRevisions sets the ClusterDbRevisions field's value. -func (s *DescribeClusterDbRevisionsOutput) SetClusterDbRevisions(v []*ClusterDbRevision) *DescribeClusterDbRevisionsOutput { - s.ClusterDbRevisions = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterDbRevisionsOutput) SetMarker(v string) *DescribeClusterDbRevisionsOutput { - s.Marker = &v - return s -} - -type DescribeClusterParameterGroupsInput struct { - _ struct{} `type:"structure"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeClusterParameterGroups request - // exceed the value specified in MaxRecords, AWS returns a value in the Marker - // field of the response. You can retrieve the next set of response records - // by providing the returned marker value in the Marker parameter and retrying - // the request. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The name of a specific parameter group for which to return details. By default, - // details about all parameter groups and the default parameter group are returned. - ParameterGroupName *string `type:"string"` - - // A tag key or keys for which you want to return all matching cluster parameter - // groups that are associated with the specified key or keys. For example, suppose - // that you have parameter groups that are tagged with keys called owner and - // environment. If you specify both of these tag keys in the request, Amazon - // Redshift returns a response with the parameter groups that have either or - // both of these tag keys associated with them. - TagKeys []*string `locationNameList:"TagKey" type:"list"` - - // A tag value or values for which you want to return all matching cluster parameter - // groups that are associated with the specified tag value or values. For example, - // suppose that you have parameter groups that are tagged with values called - // admin and test. If you specify both of these tag values in the request, Amazon - // Redshift returns a response with the parameter groups that have either or - // both of these tag values associated with them. - TagValues []*string `locationNameList:"TagValue" type:"list"` -} - -// String returns the string representation -func (s DescribeClusterParameterGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterParameterGroupsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterParameterGroupsInput) SetMarker(v string) *DescribeClusterParameterGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeClusterParameterGroupsInput) SetMaxRecords(v int64) *DescribeClusterParameterGroupsInput { - s.MaxRecords = &v - return s -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *DescribeClusterParameterGroupsInput) SetParameterGroupName(v string) *DescribeClusterParameterGroupsInput { - s.ParameterGroupName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DescribeClusterParameterGroupsInput) SetTagKeys(v []*string) *DescribeClusterParameterGroupsInput { - s.TagKeys = v - return s -} - -// SetTagValues sets the TagValues field's value. -func (s *DescribeClusterParameterGroupsInput) SetTagValues(v []*string) *DescribeClusterParameterGroupsInput { - s.TagValues = v - return s -} - -// Contains the output from the DescribeClusterParameterGroups action. -type DescribeClusterParameterGroupsOutput struct { - _ struct{} `type:"structure"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` - - // A list of ClusterParameterGroup instances. Each instance describes one cluster - // parameter group. - ParameterGroups []*ClusterParameterGroup `locationNameList:"ClusterParameterGroup" type:"list"` -} - -// String returns the string representation -func (s DescribeClusterParameterGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterParameterGroupsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterParameterGroupsOutput) SetMarker(v string) *DescribeClusterParameterGroupsOutput { - s.Marker = &v - return s -} - -// SetParameterGroups sets the ParameterGroups field's value. -func (s *DescribeClusterParameterGroupsOutput) SetParameterGroups(v []*ClusterParameterGroup) *DescribeClusterParameterGroupsOutput { - s.ParameterGroups = v - return s -} - -type DescribeClusterParametersInput struct { - _ struct{} `type:"structure"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeClusterParameters request - // exceed the value specified in MaxRecords, AWS returns a value in the Marker - // field of the response. You can retrieve the next set of response records - // by providing the returned marker value in the Marker parameter and retrying - // the request. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The name of a cluster parameter group for which to return details. - // - // ParameterGroupName is a required field - ParameterGroupName *string `type:"string" required:"true"` - - // The parameter types to return. Specify user to show parameters that are different - // form the default. Similarly, specify engine-default to show parameters that - // are the same as the default parameter group. - // - // Default: All parameter types returned. - // - // Valid Values: user | engine-default - Source *string `type:"string"` -} - -// String returns the string representation -func (s DescribeClusterParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeClusterParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeClusterParametersInput"} - if s.ParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterParametersInput) SetMarker(v string) *DescribeClusterParametersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeClusterParametersInput) SetMaxRecords(v int64) *DescribeClusterParametersInput { - s.MaxRecords = &v - return s -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *DescribeClusterParametersInput) SetParameterGroupName(v string) *DescribeClusterParametersInput { - s.ParameterGroupName = &v - return s -} - -// SetSource sets the Source field's value. -func (s *DescribeClusterParametersInput) SetSource(v string) *DescribeClusterParametersInput { - s.Source = &v - return s -} - -// Contains the output from the DescribeClusterParameters action. -type DescribeClusterParametersOutput struct { - _ struct{} `type:"structure"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` - - // A list of Parameter instances. Each instance lists the parameters of one - // cluster parameter group. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` -} - -// String returns the string representation -func (s DescribeClusterParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterParametersOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterParametersOutput) SetMarker(v string) *DescribeClusterParametersOutput { - s.Marker = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DescribeClusterParametersOutput) SetParameters(v []*Parameter) *DescribeClusterParametersOutput { - s.Parameters = v - return s -} - -type DescribeClusterSecurityGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of a cluster security group for which you are requesting details. - // You can specify either the Marker parameter or a ClusterSecurityGroupName - // parameter, but not both. - // - // Example: securitygroup1 - ClusterSecurityGroupName *string `type:"string"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeClusterSecurityGroups request - // exceed the value specified in MaxRecords, AWS returns a value in the Marker - // field of the response. You can retrieve the next set of response records - // by providing the returned marker value in the Marker parameter and retrying - // the request. - // - // Constraints: You can specify either the ClusterSecurityGroupName parameter - // or the Marker parameter, but not both. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // A tag key or keys for which you want to return all matching cluster security - // groups that are associated with the specified key or keys. For example, suppose - // that you have security groups that are tagged with keys called owner and - // environment. If you specify both of these tag keys in the request, Amazon - // Redshift returns a response with the security groups that have either or - // both of these tag keys associated with them. - TagKeys []*string `locationNameList:"TagKey" type:"list"` - - // A tag value or values for which you want to return all matching cluster security - // groups that are associated with the specified tag value or values. For example, - // suppose that you have security groups that are tagged with values called - // admin and test. If you specify both of these tag values in the request, Amazon - // Redshift returns a response with the security groups that have either or - // both of these tag values associated with them. - TagValues []*string `locationNameList:"TagValue" type:"list"` -} - -// String returns the string representation -func (s DescribeClusterSecurityGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterSecurityGroupsInput) GoString() string { - return s.String() -} - -// SetClusterSecurityGroupName sets the ClusterSecurityGroupName field's value. -func (s *DescribeClusterSecurityGroupsInput) SetClusterSecurityGroupName(v string) *DescribeClusterSecurityGroupsInput { - s.ClusterSecurityGroupName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterSecurityGroupsInput) SetMarker(v string) *DescribeClusterSecurityGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeClusterSecurityGroupsInput) SetMaxRecords(v int64) *DescribeClusterSecurityGroupsInput { - s.MaxRecords = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DescribeClusterSecurityGroupsInput) SetTagKeys(v []*string) *DescribeClusterSecurityGroupsInput { - s.TagKeys = v - return s -} - -// SetTagValues sets the TagValues field's value. -func (s *DescribeClusterSecurityGroupsInput) SetTagValues(v []*string) *DescribeClusterSecurityGroupsInput { - s.TagValues = v - return s -} - -type DescribeClusterSecurityGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of ClusterSecurityGroup instances. - ClusterSecurityGroups []*ClusterSecurityGroup `locationNameList:"ClusterSecurityGroup" type:"list"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeClusterSecurityGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterSecurityGroupsOutput) GoString() string { - return s.String() -} - -// SetClusterSecurityGroups sets the ClusterSecurityGroups field's value. -func (s *DescribeClusterSecurityGroupsOutput) SetClusterSecurityGroups(v []*ClusterSecurityGroup) *DescribeClusterSecurityGroupsOutput { - s.ClusterSecurityGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterSecurityGroupsOutput) SetMarker(v string) *DescribeClusterSecurityGroupsOutput { - s.Marker = &v - return s -} - -type DescribeClusterSnapshotsInput struct { - _ struct{} `type:"structure"` - - // A value that indicates whether to return snapshots only for an existing cluster. - // Table-level restore can be performed only using a snapshot of an existing - // cluster, that is, a cluster that has not been deleted. If ClusterExists is - // set to true, ClusterIdentifier is required. - ClusterExists *bool `type:"boolean"` - - // The identifier of the cluster for which information about snapshots is requested. - ClusterIdentifier *string `type:"string"` - - // A time value that requests only snapshots created at or before the specified - // time. The time value is specified in ISO 8601 format. For more information - // about ISO 8601, go to the ISO8601 Wikipedia page. (http://en.wikipedia.org/wiki/ISO_8601) - // - // Example: 2012-07-16T18:00:00Z - EndTime *time.Time `type:"timestamp"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeClusterSnapshots request - // exceed the value specified in MaxRecords, AWS returns a value in the Marker - // field of the response. You can retrieve the next set of response records - // by providing the returned marker value in the Marker parameter and retrying - // the request. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The AWS customer account used to create or copy the snapshot. Use this field - // to filter the results to snapshots owned by a particular account. To describe - // snapshots you own, either specify your AWS customer account, or do not specify - // the parameter. - OwnerAccount *string `type:"string"` - - // The snapshot identifier of the snapshot about which to return information. - SnapshotIdentifier *string `type:"string"` - - // The type of snapshots for which you are requesting information. By default, - // snapshots of all types are returned. - // - // Valid Values: automated | manual - SnapshotType *string `type:"string"` - - SortingEntities []*SnapshotSortingEntity `locationNameList:"SnapshotSortingEntity" type:"list"` - - // A value that requests only snapshots created at or after the specified time. - // The time value is specified in ISO 8601 format. For more information about - // ISO 8601, go to the ISO8601 Wikipedia page. (http://en.wikipedia.org/wiki/ISO_8601) - // - // Example: 2012-07-16T18:00:00Z - StartTime *time.Time `type:"timestamp"` - - // A tag key or keys for which you want to return all matching cluster snapshots - // that are associated with the specified key or keys. For example, suppose - // that you have snapshots that are tagged with keys called owner and environment. - // If you specify both of these tag keys in the request, Amazon Redshift returns - // a response with the snapshots that have either or both of these tag keys - // associated with them. - TagKeys []*string `locationNameList:"TagKey" type:"list"` - - // A tag value or values for which you want to return all matching cluster snapshots - // that are associated with the specified tag value or values. For example, - // suppose that you have snapshots that are tagged with values called admin - // and test. If you specify both of these tag values in the request, Amazon - // Redshift returns a response with the snapshots that have either or both of - // these tag values associated with them. - TagValues []*string `locationNameList:"TagValue" type:"list"` -} - -// String returns the string representation -func (s DescribeClusterSnapshotsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterSnapshotsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeClusterSnapshotsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeClusterSnapshotsInput"} - if s.SortingEntities != nil { - for i, v := range s.SortingEntities { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SortingEntities", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterExists sets the ClusterExists field's value. -func (s *DescribeClusterSnapshotsInput) SetClusterExists(v bool) *DescribeClusterSnapshotsInput { - s.ClusterExists = &v - return s -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *DescribeClusterSnapshotsInput) SetClusterIdentifier(v string) *DescribeClusterSnapshotsInput { - s.ClusterIdentifier = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *DescribeClusterSnapshotsInput) SetEndTime(v time.Time) *DescribeClusterSnapshotsInput { - s.EndTime = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterSnapshotsInput) SetMarker(v string) *DescribeClusterSnapshotsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeClusterSnapshotsInput) SetMaxRecords(v int64) *DescribeClusterSnapshotsInput { - s.MaxRecords = &v - return s -} - -// SetOwnerAccount sets the OwnerAccount field's value. -func (s *DescribeClusterSnapshotsInput) SetOwnerAccount(v string) *DescribeClusterSnapshotsInput { - s.OwnerAccount = &v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *DescribeClusterSnapshotsInput) SetSnapshotIdentifier(v string) *DescribeClusterSnapshotsInput { - s.SnapshotIdentifier = &v - return s -} - -// SetSnapshotType sets the SnapshotType field's value. -func (s *DescribeClusterSnapshotsInput) SetSnapshotType(v string) *DescribeClusterSnapshotsInput { - s.SnapshotType = &v - return s -} - -// SetSortingEntities sets the SortingEntities field's value. -func (s *DescribeClusterSnapshotsInput) SetSortingEntities(v []*SnapshotSortingEntity) *DescribeClusterSnapshotsInput { - s.SortingEntities = v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeClusterSnapshotsInput) SetStartTime(v time.Time) *DescribeClusterSnapshotsInput { - s.StartTime = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DescribeClusterSnapshotsInput) SetTagKeys(v []*string) *DescribeClusterSnapshotsInput { - s.TagKeys = v - return s -} - -// SetTagValues sets the TagValues field's value. -func (s *DescribeClusterSnapshotsInput) SetTagValues(v []*string) *DescribeClusterSnapshotsInput { - s.TagValues = v - return s -} - -// Contains the output from the DescribeClusterSnapshots action. -type DescribeClusterSnapshotsOutput struct { - _ struct{} `type:"structure"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` - - // A list of Snapshot instances. - Snapshots []*Snapshot `locationNameList:"Snapshot" type:"list"` -} - -// String returns the string representation -func (s DescribeClusterSnapshotsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterSnapshotsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterSnapshotsOutput) SetMarker(v string) *DescribeClusterSnapshotsOutput { - s.Marker = &v - return s -} - -// SetSnapshots sets the Snapshots field's value. -func (s *DescribeClusterSnapshotsOutput) SetSnapshots(v []*Snapshot) *DescribeClusterSnapshotsOutput { - s.Snapshots = v - return s -} - -type DescribeClusterSubnetGroupsInput struct { - _ struct{} `type:"structure"` - - // The name of the cluster subnet group for which information is requested. - ClusterSubnetGroupName *string `type:"string"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeClusterSubnetGroups request - // exceed the value specified in MaxRecords, AWS returns a value in the Marker - // field of the response. You can retrieve the next set of response records - // by providing the returned marker value in the Marker parameter and retrying - // the request. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // A tag key or keys for which you want to return all matching cluster subnet - // groups that are associated with the specified key or keys. For example, suppose - // that you have subnet groups that are tagged with keys called owner and environment. - // If you specify both of these tag keys in the request, Amazon Redshift returns - // a response with the subnet groups that have either or both of these tag keys - // associated with them. - TagKeys []*string `locationNameList:"TagKey" type:"list"` - - // A tag value or values for which you want to return all matching cluster subnet - // groups that are associated with the specified tag value or values. For example, - // suppose that you have subnet groups that are tagged with values called admin - // and test. If you specify both of these tag values in the request, Amazon - // Redshift returns a response with the subnet groups that have either or both - // of these tag values associated with them. - TagValues []*string `locationNameList:"TagValue" type:"list"` -} - -// String returns the string representation -func (s DescribeClusterSubnetGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterSubnetGroupsInput) GoString() string { - return s.String() -} - -// SetClusterSubnetGroupName sets the ClusterSubnetGroupName field's value. -func (s *DescribeClusterSubnetGroupsInput) SetClusterSubnetGroupName(v string) *DescribeClusterSubnetGroupsInput { - s.ClusterSubnetGroupName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterSubnetGroupsInput) SetMarker(v string) *DescribeClusterSubnetGroupsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeClusterSubnetGroupsInput) SetMaxRecords(v int64) *DescribeClusterSubnetGroupsInput { - s.MaxRecords = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DescribeClusterSubnetGroupsInput) SetTagKeys(v []*string) *DescribeClusterSubnetGroupsInput { - s.TagKeys = v - return s -} - -// SetTagValues sets the TagValues field's value. -func (s *DescribeClusterSubnetGroupsInput) SetTagValues(v []*string) *DescribeClusterSubnetGroupsInput { - s.TagValues = v - return s -} - -// Contains the output from the DescribeClusterSubnetGroups action. -type DescribeClusterSubnetGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of ClusterSubnetGroup instances. - ClusterSubnetGroups []*ClusterSubnetGroup `locationNameList:"ClusterSubnetGroup" type:"list"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeClusterSubnetGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterSubnetGroupsOutput) GoString() string { - return s.String() -} - -// SetClusterSubnetGroups sets the ClusterSubnetGroups field's value. -func (s *DescribeClusterSubnetGroupsOutput) SetClusterSubnetGroups(v []*ClusterSubnetGroup) *DescribeClusterSubnetGroupsOutput { - s.ClusterSubnetGroups = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterSubnetGroupsOutput) SetMarker(v string) *DescribeClusterSubnetGroupsOutput { - s.Marker = &v - return s -} - -type DescribeClusterTracksInput struct { - _ struct{} `type:"structure"` - - // The name of the maintenance track. - MaintenanceTrackName *string `type:"string"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeClusterTracks request exceed - // the value specified in MaxRecords, Amazon Redshift returns a value in the - // Marker field of the response. You can retrieve the next set of response records - // by providing the returned marker value in the Marker parameter and retrying - // the request. - Marker *string `type:"string"` - - // An integer value for the maximum number of maintenance tracks to return. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeClusterTracksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterTracksInput) GoString() string { - return s.String() -} - -// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. -func (s *DescribeClusterTracksInput) SetMaintenanceTrackName(v string) *DescribeClusterTracksInput { - s.MaintenanceTrackName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterTracksInput) SetMarker(v string) *DescribeClusterTracksInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeClusterTracksInput) SetMaxRecords(v int64) *DescribeClusterTracksInput { - s.MaxRecords = &v - return s -} - -type DescribeClusterTracksOutput struct { - _ struct{} `type:"structure"` - - // A list of maintenance tracks output by the DescribeClusterTracks operation. - MaintenanceTracks []*MaintenanceTrack `locationNameList:"MaintenanceTrack" type:"list"` - - // The starting point to return a set of response tracklist records. You can - // retrieve the next set of response records by providing the returned marker - // value in the Marker parameter and retrying the request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeClusterTracksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterTracksOutput) GoString() string { - return s.String() -} - -// SetMaintenanceTracks sets the MaintenanceTracks field's value. -func (s *DescribeClusterTracksOutput) SetMaintenanceTracks(v []*MaintenanceTrack) *DescribeClusterTracksOutput { - s.MaintenanceTracks = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterTracksOutput) SetMarker(v string) *DescribeClusterTracksOutput { - s.Marker = &v - return s -} - -type DescribeClusterVersionsInput struct { - _ struct{} `type:"structure"` - - // The name of a specific cluster parameter group family to return details for. - // - // Constraints: - // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - ClusterParameterGroupFamily *string `type:"string"` - - // The specific cluster version to return. - // - // Example: 1.0 - ClusterVersion *string `type:"string"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeClusterVersions request exceed - // the value specified in MaxRecords, AWS returns a value in the Marker field - // of the response. You can retrieve the next set of response records by providing - // the returned marker value in the Marker parameter and retrying the request. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribeClusterVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterVersionsInput) GoString() string { - return s.String() -} - -// SetClusterParameterGroupFamily sets the ClusterParameterGroupFamily field's value. -func (s *DescribeClusterVersionsInput) SetClusterParameterGroupFamily(v string) *DescribeClusterVersionsInput { - s.ClusterParameterGroupFamily = &v - return s -} - -// SetClusterVersion sets the ClusterVersion field's value. -func (s *DescribeClusterVersionsInput) SetClusterVersion(v string) *DescribeClusterVersionsInput { - s.ClusterVersion = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterVersionsInput) SetMarker(v string) *DescribeClusterVersionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeClusterVersionsInput) SetMaxRecords(v int64) *DescribeClusterVersionsInput { - s.MaxRecords = &v - return s -} - -// Contains the output from the DescribeClusterVersions action. -type DescribeClusterVersionsOutput struct { - _ struct{} `type:"structure"` - - // A list of Version elements. - ClusterVersions []*ClusterVersion `locationNameList:"ClusterVersion" type:"list"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeClusterVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClusterVersionsOutput) GoString() string { - return s.String() -} - -// SetClusterVersions sets the ClusterVersions field's value. -func (s *DescribeClusterVersionsOutput) SetClusterVersions(v []*ClusterVersion) *DescribeClusterVersionsOutput { - s.ClusterVersions = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClusterVersionsOutput) SetMarker(v string) *DescribeClusterVersionsOutput { - s.Marker = &v - return s -} - -type DescribeClustersInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of a cluster whose properties you are requesting. This - // parameter is case sensitive. - // - // The default is that all clusters defined for an account are returned. - ClusterIdentifier *string `type:"string"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeClusters request exceed the - // value specified in MaxRecords, AWS returns a value in the Marker field of - // the response. You can retrieve the next set of response records by providing - // the returned marker value in the Marker parameter and retrying the request. - // - // Constraints: You can specify either the ClusterIdentifier parameter or the - // Marker parameter, but not both. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // A tag key or keys for which you want to return all matching clusters that - // are associated with the specified key or keys. For example, suppose that - // you have clusters that are tagged with keys called owner and environment. - // If you specify both of these tag keys in the request, Amazon Redshift returns - // a response with the clusters that have either or both of these tag keys associated - // with them. - TagKeys []*string `locationNameList:"TagKey" type:"list"` - - // A tag value or values for which you want to return all matching clusters - // that are associated with the specified tag value or values. For example, - // suppose that you have clusters that are tagged with values called admin and - // test. If you specify both of these tag values in the request, Amazon Redshift - // returns a response with the clusters that have either or both of these tag - // values associated with them. - TagValues []*string `locationNameList:"TagValue" type:"list"` -} - -// String returns the string representation -func (s DescribeClustersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClustersInput) GoString() string { - return s.String() -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *DescribeClustersInput) SetClusterIdentifier(v string) *DescribeClustersInput { - s.ClusterIdentifier = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClustersInput) SetMarker(v string) *DescribeClustersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeClustersInput) SetMaxRecords(v int64) *DescribeClustersInput { - s.MaxRecords = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DescribeClustersInput) SetTagKeys(v []*string) *DescribeClustersInput { - s.TagKeys = v - return s -} - -// SetTagValues sets the TagValues field's value. -func (s *DescribeClustersInput) SetTagValues(v []*string) *DescribeClustersInput { - s.TagValues = v - return s -} - -// Contains the output from the DescribeClusters action. -type DescribeClustersOutput struct { - _ struct{} `type:"structure"` - - // A list of Cluster objects, where each object describes one cluster. - Clusters []*Cluster `locationNameList:"Cluster" type:"list"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeClustersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClustersOutput) GoString() string { - return s.String() -} - -// SetClusters sets the Clusters field's value. -func (s *DescribeClustersOutput) SetClusters(v []*Cluster) *DescribeClustersOutput { - s.Clusters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeClustersOutput) SetMarker(v string) *DescribeClustersOutput { - s.Marker = &v - return s -} - -type DescribeDefaultClusterParametersInput struct { - _ struct{} `type:"structure"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeDefaultClusterParameters - // request exceed the value specified in MaxRecords, AWS returns a value in - // the Marker field of the response. You can retrieve the next set of response - // records by providing the returned marker value in the Marker parameter and - // retrying the request. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The name of the cluster parameter group family. - // - // ParameterGroupFamily is a required field - ParameterGroupFamily *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeDefaultClusterParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDefaultClusterParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDefaultClusterParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDefaultClusterParametersInput"} - if s.ParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterGroupFamily")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *DescribeDefaultClusterParametersInput) SetMarker(v string) *DescribeDefaultClusterParametersInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDefaultClusterParametersInput) SetMaxRecords(v int64) *DescribeDefaultClusterParametersInput { - s.MaxRecords = &v - return s -} - -// SetParameterGroupFamily sets the ParameterGroupFamily field's value. -func (s *DescribeDefaultClusterParametersInput) SetParameterGroupFamily(v string) *DescribeDefaultClusterParametersInput { - s.ParameterGroupFamily = &v - return s -} - -type DescribeDefaultClusterParametersOutput struct { - _ struct{} `type:"structure"` - - // Describes the default cluster parameters for a parameter group family. - DefaultClusterParameters *DefaultClusterParameters `type:"structure"` -} - -// String returns the string representation -func (s DescribeDefaultClusterParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDefaultClusterParametersOutput) GoString() string { - return s.String() -} - -// SetDefaultClusterParameters sets the DefaultClusterParameters field's value. -func (s *DescribeDefaultClusterParametersOutput) SetDefaultClusterParameters(v *DefaultClusterParameters) *DescribeDefaultClusterParametersOutput { - s.DefaultClusterParameters = v - return s -} - -type DescribeEventCategoriesInput struct { - _ struct{} `type:"structure"` - - // The source type, such as cluster or parameter group, to which the described - // event categories apply. - // - // Valid values: cluster, cluster-snapshot, cluster-parameter-group, and cluster-security-group. - SourceType *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventCategoriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventCategoriesInput) GoString() string { - return s.String() -} - -// SetSourceType sets the SourceType field's value. -func (s *DescribeEventCategoriesInput) SetSourceType(v string) *DescribeEventCategoriesInput { - s.SourceType = &v - return s -} - -type DescribeEventCategoriesOutput struct { - _ struct{} `type:"structure"` - - // A list of event categories descriptions. - EventCategoriesMapList []*EventCategoriesMap `locationNameList:"EventCategoriesMap" type:"list"` -} - -// String returns the string representation -func (s DescribeEventCategoriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventCategoriesOutput) GoString() string { - return s.String() -} - -// SetEventCategoriesMapList sets the EventCategoriesMapList field's value. -func (s *DescribeEventCategoriesOutput) SetEventCategoriesMapList(v []*EventCategoriesMap) *DescribeEventCategoriesOutput { - s.EventCategoriesMapList = v - return s -} - -type DescribeEventSubscriptionsInput struct { - _ struct{} `type:"structure"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeEventSubscriptions request - // exceed the value specified in MaxRecords, AWS returns a value in the Marker - // field of the response. You can retrieve the next set of response records - // by providing the returned marker value in the Marker parameter and retrying - // the request. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The name of the Amazon Redshift event notification subscription to be described. - SubscriptionName *string `type:"string"` - - // A tag key or keys for which you want to return all matching event notification - // subscriptions that are associated with the specified key or keys. For example, - // suppose that you have subscriptions that are tagged with keys called owner - // and environment. If you specify both of these tag keys in the request, Amazon - // Redshift returns a response with the subscriptions that have either or both - // of these tag keys associated with them. - TagKeys []*string `locationNameList:"TagKey" type:"list"` - - // A tag value or values for which you want to return all matching event notification - // subscriptions that are associated with the specified tag value or values. - // For example, suppose that you have subscriptions that are tagged with values - // called admin and test. If you specify both of these tag values in the request, - // Amazon Redshift returns a response with the subscriptions that have either - // or both of these tag values associated with them. - TagValues []*string `locationNameList:"TagValue" type:"list"` -} - -// String returns the string representation -func (s DescribeEventSubscriptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventSubscriptionsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventSubscriptionsInput) SetMarker(v string) *DescribeEventSubscriptionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEventSubscriptionsInput) SetMaxRecords(v int64) *DescribeEventSubscriptionsInput { - s.MaxRecords = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *DescribeEventSubscriptionsInput) SetSubscriptionName(v string) *DescribeEventSubscriptionsInput { - s.SubscriptionName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DescribeEventSubscriptionsInput) SetTagKeys(v []*string) *DescribeEventSubscriptionsInput { - s.TagKeys = v - return s -} - -// SetTagValues sets the TagValues field's value. -func (s *DescribeEventSubscriptionsInput) SetTagValues(v []*string) *DescribeEventSubscriptionsInput { - s.TagValues = v - return s -} - -type DescribeEventSubscriptionsOutput struct { - _ struct{} `type:"structure"` - - // A list of event subscriptions. - EventSubscriptionsList []*EventSubscription `locationNameList:"EventSubscription" type:"list"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventSubscriptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventSubscriptionsOutput) GoString() string { - return s.String() -} - -// SetEventSubscriptionsList sets the EventSubscriptionsList field's value. -func (s *DescribeEventSubscriptionsOutput) SetEventSubscriptionsList(v []*EventSubscription) *DescribeEventSubscriptionsOutput { - s.EventSubscriptionsList = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventSubscriptionsOutput) SetMarker(v string) *DescribeEventSubscriptionsOutput { - s.Marker = &v - return s -} - -type DescribeEventsInput struct { - _ struct{} `type:"structure"` - - // The number of minutes prior to the time of the request for which to retrieve - // events. For example, if the request is sent at 18:00 and you specify a duration - // of 60, then only events which have occurred after 17:00 will be returned. - // - // Default: 60 - Duration *int64 `type:"integer"` - - // The end of the time interval for which to retrieve events, specified in ISO - // 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia - // page. (http://en.wikipedia.org/wiki/ISO_8601) - // - // Example: 2009-07-08T18:00Z - EndTime *time.Time `type:"timestamp"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeEvents request exceed the - // value specified in MaxRecords, AWS returns a value in the Marker field of - // the response. You can retrieve the next set of response records by providing - // the returned marker value in the Marker parameter and retrying the request. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The identifier of the event source for which events will be returned. If - // this parameter is not specified, then all sources are included in the response. - // - // Constraints: - // - // If SourceIdentifier is supplied, SourceType must also be provided. - // - // * Specify a cluster identifier when SourceType is cluster. - // - // * Specify a cluster security group name when SourceType is cluster-security-group. - // - // * Specify a cluster parameter group name when SourceType is cluster-parameter-group. - // - // * Specify a cluster snapshot identifier when SourceType is cluster-snapshot. - SourceIdentifier *string `type:"string"` - - // The event source to retrieve events for. If no value is specified, all events - // are returned. - // - // Constraints: - // - // If SourceType is supplied, SourceIdentifier must also be provided. - // - // * Specify cluster when SourceIdentifier is a cluster identifier. - // - // * Specify cluster-security-group when SourceIdentifier is a cluster security - // group name. - // - // * Specify cluster-parameter-group when SourceIdentifier is a cluster parameter - // group name. - // - // * Specify cluster-snapshot when SourceIdentifier is a cluster snapshot - // identifier. - SourceType *string `type:"string" enum:"SourceType"` - - // The beginning of the time interval to retrieve events for, specified in ISO - // 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia - // page. (http://en.wikipedia.org/wiki/ISO_8601) - // - // Example: 2009-07-08T18:00Z - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s DescribeEventsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsInput) GoString() string { - return s.String() -} - -// SetDuration sets the Duration field's value. -func (s *DescribeEventsInput) SetDuration(v int64) *DescribeEventsInput { - s.Duration = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *DescribeEventsInput) SetEndTime(v time.Time) *DescribeEventsInput { - s.EndTime = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventsInput) SetMarker(v string) *DescribeEventsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEventsInput) SetMaxRecords(v int64) *DescribeEventsInput { - s.MaxRecords = &v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *DescribeEventsInput) SetSourceIdentifier(v string) *DescribeEventsInput { - s.SourceIdentifier = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *DescribeEventsInput) SetSourceType(v string) *DescribeEventsInput { - s.SourceType = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *DescribeEventsInput) SetStartTime(v time.Time) *DescribeEventsInput { - s.StartTime = &v - return s -} - -type DescribeEventsOutput struct { - _ struct{} `type:"structure"` - - // A list of Event instances. - Events []*Event `locationNameList:"Event" type:"list"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEventsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEventsOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { - s.Events = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeEventsOutput) SetMarker(v string) *DescribeEventsOutput { - s.Marker = &v - return s -} - -type DescribeHsmClientCertificatesInput struct { - _ struct{} `type:"structure"` - - // The identifier of a specific HSM client certificate for which you want information. - // If no identifier is specified, information is returned for all HSM client - // certificates owned by your AWS customer account. - HsmClientCertificateIdentifier *string `type:"string"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeHsmClientCertificates request - // exceed the value specified in MaxRecords, AWS returns a value in the Marker - // field of the response. You can retrieve the next set of response records - // by providing the returned marker value in the Marker parameter and retrying - // the request. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // A tag key or keys for which you want to return all matching HSM client certificates - // that are associated with the specified key or keys. For example, suppose - // that you have HSM client certificates that are tagged with keys called owner - // and environment. If you specify both of these tag keys in the request, Amazon - // Redshift returns a response with the HSM client certificates that have either - // or both of these tag keys associated with them. - TagKeys []*string `locationNameList:"TagKey" type:"list"` - - // A tag value or values for which you want to return all matching HSM client - // certificates that are associated with the specified tag value or values. - // For example, suppose that you have HSM client certificates that are tagged - // with values called admin and test. If you specify both of these tag values - // in the request, Amazon Redshift returns a response with the HSM client certificates - // that have either or both of these tag values associated with them. - TagValues []*string `locationNameList:"TagValue" type:"list"` -} - -// String returns the string representation -func (s DescribeHsmClientCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHsmClientCertificatesInput) GoString() string { - return s.String() -} - -// SetHsmClientCertificateIdentifier sets the HsmClientCertificateIdentifier field's value. -func (s *DescribeHsmClientCertificatesInput) SetHsmClientCertificateIdentifier(v string) *DescribeHsmClientCertificatesInput { - s.HsmClientCertificateIdentifier = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeHsmClientCertificatesInput) SetMarker(v string) *DescribeHsmClientCertificatesInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeHsmClientCertificatesInput) SetMaxRecords(v int64) *DescribeHsmClientCertificatesInput { - s.MaxRecords = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DescribeHsmClientCertificatesInput) SetTagKeys(v []*string) *DescribeHsmClientCertificatesInput { - s.TagKeys = v - return s -} - -// SetTagValues sets the TagValues field's value. -func (s *DescribeHsmClientCertificatesInput) SetTagValues(v []*string) *DescribeHsmClientCertificatesInput { - s.TagValues = v - return s -} - -type DescribeHsmClientCertificatesOutput struct { - _ struct{} `type:"structure"` - - // A list of the identifiers for one or more HSM client certificates used by - // Amazon Redshift clusters to store and retrieve database encryption keys in - // an HSM. - HsmClientCertificates []*HsmClientCertificate `locationNameList:"HsmClientCertificate" type:"list"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeHsmClientCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHsmClientCertificatesOutput) GoString() string { - return s.String() -} - -// SetHsmClientCertificates sets the HsmClientCertificates field's value. -func (s *DescribeHsmClientCertificatesOutput) SetHsmClientCertificates(v []*HsmClientCertificate) *DescribeHsmClientCertificatesOutput { - s.HsmClientCertificates = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeHsmClientCertificatesOutput) SetMarker(v string) *DescribeHsmClientCertificatesOutput { - s.Marker = &v - return s -} - -type DescribeHsmConfigurationsInput struct { - _ struct{} `type:"structure"` - - // The identifier of a specific Amazon Redshift HSM configuration to be described. - // If no identifier is specified, information is returned for all HSM configurations - // owned by your AWS customer account. - HsmConfigurationIdentifier *string `type:"string"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeHsmConfigurations request - // exceed the value specified in MaxRecords, AWS returns a value in the Marker - // field of the response. You can retrieve the next set of response records - // by providing the returned marker value in the Marker parameter and retrying - // the request. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // A tag key or keys for which you want to return all matching HSM configurations - // that are associated with the specified key or keys. For example, suppose - // that you have HSM configurations that are tagged with keys called owner and - // environment. If you specify both of these tag keys in the request, Amazon - // Redshift returns a response with the HSM configurations that have either - // or both of these tag keys associated with them. - TagKeys []*string `locationNameList:"TagKey" type:"list"` - - // A tag value or values for which you want to return all matching HSM configurations - // that are associated with the specified tag value or values. For example, - // suppose that you have HSM configurations that are tagged with values called - // admin and test. If you specify both of these tag values in the request, Amazon - // Redshift returns a response with the HSM configurations that have either - // or both of these tag values associated with them. - TagValues []*string `locationNameList:"TagValue" type:"list"` -} - -// String returns the string representation -func (s DescribeHsmConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHsmConfigurationsInput) GoString() string { - return s.String() -} - -// SetHsmConfigurationIdentifier sets the HsmConfigurationIdentifier field's value. -func (s *DescribeHsmConfigurationsInput) SetHsmConfigurationIdentifier(v string) *DescribeHsmConfigurationsInput { - s.HsmConfigurationIdentifier = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeHsmConfigurationsInput) SetMarker(v string) *DescribeHsmConfigurationsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeHsmConfigurationsInput) SetMaxRecords(v int64) *DescribeHsmConfigurationsInput { - s.MaxRecords = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DescribeHsmConfigurationsInput) SetTagKeys(v []*string) *DescribeHsmConfigurationsInput { - s.TagKeys = v - return s -} - -// SetTagValues sets the TagValues field's value. -func (s *DescribeHsmConfigurationsInput) SetTagValues(v []*string) *DescribeHsmConfigurationsInput { - s.TagValues = v - return s -} - -type DescribeHsmConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // A list of HsmConfiguration objects. - HsmConfigurations []*HsmConfiguration `locationNameList:"HsmConfiguration" type:"list"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeHsmConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHsmConfigurationsOutput) GoString() string { - return s.String() -} - -// SetHsmConfigurations sets the HsmConfigurations field's value. -func (s *DescribeHsmConfigurationsOutput) SetHsmConfigurations(v []*HsmConfiguration) *DescribeHsmConfigurationsOutput { - s.HsmConfigurations = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeHsmConfigurationsOutput) SetMarker(v string) *DescribeHsmConfigurationsOutput { - s.Marker = &v - return s -} - -type DescribeLoggingStatusInput struct { - _ struct{} `type:"structure"` - - // The identifier of the cluster from which to get the logging status. - // - // Example: examplecluster - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeLoggingStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLoggingStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLoggingStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLoggingStatusInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *DescribeLoggingStatusInput) SetClusterIdentifier(v string) *DescribeLoggingStatusInput { - s.ClusterIdentifier = &v - return s -} - -type DescribeOrderableClusterOptionsInput struct { - _ struct{} `type:"structure"` - - // The version filter value. Specify this parameter to show only the available - // offerings matching the specified version. - // - // Default: All versions. - // - // Constraints: Must be one of the version returned from DescribeClusterVersions. - ClusterVersion *string `type:"string"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeOrderableClusterOptions request - // exceed the value specified in MaxRecords, AWS returns a value in the Marker - // field of the response. You can retrieve the next set of response records - // by providing the returned marker value in the Marker parameter and retrying - // the request. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The node type filter value. Specify this parameter to show only the available - // offerings matching the specified node type. - NodeType *string `type:"string"` -} - -// String returns the string representation -func (s DescribeOrderableClusterOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOrderableClusterOptionsInput) GoString() string { - return s.String() -} - -// SetClusterVersion sets the ClusterVersion field's value. -func (s *DescribeOrderableClusterOptionsInput) SetClusterVersion(v string) *DescribeOrderableClusterOptionsInput { - s.ClusterVersion = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeOrderableClusterOptionsInput) SetMarker(v string) *DescribeOrderableClusterOptionsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeOrderableClusterOptionsInput) SetMaxRecords(v int64) *DescribeOrderableClusterOptionsInput { - s.MaxRecords = &v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *DescribeOrderableClusterOptionsInput) SetNodeType(v string) *DescribeOrderableClusterOptionsInput { - s.NodeType = &v - return s -} - -// Contains the output from the DescribeOrderableClusterOptions action. -type DescribeOrderableClusterOptionsOutput struct { - _ struct{} `type:"structure"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` - - // An OrderableClusterOption structure containing information about orderable - // options for the cluster. - OrderableClusterOptions []*OrderableClusterOption `locationNameList:"OrderableClusterOption" type:"list"` -} - -// String returns the string representation -func (s DescribeOrderableClusterOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeOrderableClusterOptionsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeOrderableClusterOptionsOutput) SetMarker(v string) *DescribeOrderableClusterOptionsOutput { - s.Marker = &v - return s -} - -// SetOrderableClusterOptions sets the OrderableClusterOptions field's value. -func (s *DescribeOrderableClusterOptionsOutput) SetOrderableClusterOptions(v []*OrderableClusterOption) *DescribeOrderableClusterOptionsOutput { - s.OrderableClusterOptions = v - return s -} - -type DescribeReservedNodeOfferingsInput struct { - _ struct{} `type:"structure"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeReservedNodeOfferings request - // exceed the value specified in MaxRecords, AWS returns a value in the Marker - // field of the response. You can retrieve the next set of response records - // by providing the returned marker value in the Marker parameter and retrying - // the request. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The unique identifier for the offering. - ReservedNodeOfferingId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeReservedNodeOfferingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedNodeOfferingsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReservedNodeOfferingsInput) SetMarker(v string) *DescribeReservedNodeOfferingsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReservedNodeOfferingsInput) SetMaxRecords(v int64) *DescribeReservedNodeOfferingsInput { - s.MaxRecords = &v - return s -} - -// SetReservedNodeOfferingId sets the ReservedNodeOfferingId field's value. -func (s *DescribeReservedNodeOfferingsInput) SetReservedNodeOfferingId(v string) *DescribeReservedNodeOfferingsInput { - s.ReservedNodeOfferingId = &v - return s -} - -type DescribeReservedNodeOfferingsOutput struct { - _ struct{} `type:"structure"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` - - // A list of ReservedNodeOffering objects. - ReservedNodeOfferings []*ReservedNodeOffering `locationNameList:"ReservedNodeOffering" type:"list"` -} - -// String returns the string representation -func (s DescribeReservedNodeOfferingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedNodeOfferingsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReservedNodeOfferingsOutput) SetMarker(v string) *DescribeReservedNodeOfferingsOutput { - s.Marker = &v - return s -} - -// SetReservedNodeOfferings sets the ReservedNodeOfferings field's value. -func (s *DescribeReservedNodeOfferingsOutput) SetReservedNodeOfferings(v []*ReservedNodeOffering) *DescribeReservedNodeOfferingsOutput { - s.ReservedNodeOfferings = v - return s -} - -type DescribeReservedNodesInput struct { - _ struct{} `type:"structure"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeReservedNodes request exceed - // the value specified in MaxRecords, AWS returns a value in the Marker field - // of the response. You can retrieve the next set of response records by providing - // the returned marker value in the Marker parameter and retrying the request. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // Identifier for the node reservation. - ReservedNodeId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeReservedNodesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedNodesInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReservedNodesInput) SetMarker(v string) *DescribeReservedNodesInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReservedNodesInput) SetMaxRecords(v int64) *DescribeReservedNodesInput { - s.MaxRecords = &v - return s -} - -// SetReservedNodeId sets the ReservedNodeId field's value. -func (s *DescribeReservedNodesInput) SetReservedNodeId(v string) *DescribeReservedNodesInput { - s.ReservedNodeId = &v - return s -} - -type DescribeReservedNodesOutput struct { - _ struct{} `type:"structure"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` - - // The list of ReservedNode objects. - ReservedNodes []*ReservedNode `locationNameList:"ReservedNode" type:"list"` -} - -// String returns the string representation -func (s DescribeReservedNodesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReservedNodesOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeReservedNodesOutput) SetMarker(v string) *DescribeReservedNodesOutput { - s.Marker = &v - return s -} - -// SetReservedNodes sets the ReservedNodes field's value. -func (s *DescribeReservedNodesOutput) SetReservedNodes(v []*ReservedNode) *DescribeReservedNodesOutput { - s.ReservedNodes = v - return s -} - -type DescribeResizeInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of a cluster whose resize progress you are requesting. - // This parameter is case-sensitive. - // - // By default, resize operations for all clusters defined for an AWS account - // are returned. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeResizeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeResizeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeResizeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeResizeInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *DescribeResizeInput) SetClusterIdentifier(v string) *DescribeResizeInput { - s.ClusterIdentifier = &v - return s -} - -// Describes the result of a cluster resize operation. -type DescribeResizeOutput struct { - _ struct{} `type:"structure"` - - // The average rate of the resize operation over the last few minutes, measured - // in megabytes per second. After the resize operation completes, this value - // shows the average rate of the entire resize operation. - AvgResizeRateInMegaBytesPerSecond *float64 `type:"double"` - - // The amount of seconds that have elapsed since the resize operation began. - // After the resize operation completes, this value shows the total actual time, - // in seconds, for the resize operation. - ElapsedTimeInSeconds *int64 `type:"long"` - - // The estimated time remaining, in seconds, until the resize operation is complete. - // This value is calculated based on the average resize rate and the estimated - // amount of data remaining to be processed. Once the resize operation is complete, - // this value will be 0. - EstimatedTimeToCompletionInSeconds *int64 `type:"long"` - - // The names of tables that have been completely imported . - // - // Valid Values: List of table names. - ImportTablesCompleted []*string `type:"list"` - - // The names of tables that are being currently imported. - // - // Valid Values: List of table names. - ImportTablesInProgress []*string `type:"list"` - - // The names of tables that have not been yet imported. - // - // Valid Values: List of table names - ImportTablesNotStarted []*string `type:"list"` - - // An optional string to provide additional details about the resize action. - Message *string `type:"string"` - - // While the resize operation is in progress, this value shows the current amount - // of data, in megabytes, that has been processed so far. When the resize operation - // is complete, this value shows the total amount of data, in megabytes, on - // the cluster, which may be more or less than TotalResizeDataInMegaBytes (the - // estimated total amount of data before resize). - ProgressInMegaBytes *int64 `type:"long"` - - // An enum with possible values of ClassicResize and ElasticResize. These values - // describe the type of resize operation being performed. - ResizeType *string `type:"string"` - - // The status of the resize operation. - // - // Valid Values: NONE | IN_PROGRESS | FAILED | SUCCEEDED | CANCELLING - Status *string `type:"string"` - - // The cluster type after the resize operation is complete. - // - // Valid Values: multi-node | single-node - TargetClusterType *string `type:"string"` - - // The type of encryption for the cluster after the resize is complete. - // - // Possible values are KMS and None. In the China region possible values are: - // Legacy and None. - TargetEncryptionType *string `type:"string"` - - // The node type that the cluster will have after the resize operation is complete. - TargetNodeType *string `type:"string"` - - // The number of nodes that the cluster will have after the resize operation - // is complete. - TargetNumberOfNodes *int64 `type:"integer"` - - // The estimated total amount of data, in megabytes, on the cluster before the - // resize operation began. - TotalResizeDataInMegaBytes *int64 `type:"long"` -} - -// String returns the string representation -func (s DescribeResizeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeResizeOutput) GoString() string { - return s.String() -} - -// SetAvgResizeRateInMegaBytesPerSecond sets the AvgResizeRateInMegaBytesPerSecond field's value. -func (s *DescribeResizeOutput) SetAvgResizeRateInMegaBytesPerSecond(v float64) *DescribeResizeOutput { - s.AvgResizeRateInMegaBytesPerSecond = &v - return s -} - -// SetElapsedTimeInSeconds sets the ElapsedTimeInSeconds field's value. -func (s *DescribeResizeOutput) SetElapsedTimeInSeconds(v int64) *DescribeResizeOutput { - s.ElapsedTimeInSeconds = &v - return s -} - -// SetEstimatedTimeToCompletionInSeconds sets the EstimatedTimeToCompletionInSeconds field's value. -func (s *DescribeResizeOutput) SetEstimatedTimeToCompletionInSeconds(v int64) *DescribeResizeOutput { - s.EstimatedTimeToCompletionInSeconds = &v - return s -} - -// SetImportTablesCompleted sets the ImportTablesCompleted field's value. -func (s *DescribeResizeOutput) SetImportTablesCompleted(v []*string) *DescribeResizeOutput { - s.ImportTablesCompleted = v - return s -} - -// SetImportTablesInProgress sets the ImportTablesInProgress field's value. -func (s *DescribeResizeOutput) SetImportTablesInProgress(v []*string) *DescribeResizeOutput { - s.ImportTablesInProgress = v - return s -} - -// SetImportTablesNotStarted sets the ImportTablesNotStarted field's value. -func (s *DescribeResizeOutput) SetImportTablesNotStarted(v []*string) *DescribeResizeOutput { - s.ImportTablesNotStarted = v - return s -} - -// SetMessage sets the Message field's value. -func (s *DescribeResizeOutput) SetMessage(v string) *DescribeResizeOutput { - s.Message = &v - return s -} - -// SetProgressInMegaBytes sets the ProgressInMegaBytes field's value. -func (s *DescribeResizeOutput) SetProgressInMegaBytes(v int64) *DescribeResizeOutput { - s.ProgressInMegaBytes = &v - return s -} - -// SetResizeType sets the ResizeType field's value. -func (s *DescribeResizeOutput) SetResizeType(v string) *DescribeResizeOutput { - s.ResizeType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeResizeOutput) SetStatus(v string) *DescribeResizeOutput { - s.Status = &v - return s -} - -// SetTargetClusterType sets the TargetClusterType field's value. -func (s *DescribeResizeOutput) SetTargetClusterType(v string) *DescribeResizeOutput { - s.TargetClusterType = &v - return s -} - -// SetTargetEncryptionType sets the TargetEncryptionType field's value. -func (s *DescribeResizeOutput) SetTargetEncryptionType(v string) *DescribeResizeOutput { - s.TargetEncryptionType = &v - return s -} - -// SetTargetNodeType sets the TargetNodeType field's value. -func (s *DescribeResizeOutput) SetTargetNodeType(v string) *DescribeResizeOutput { - s.TargetNodeType = &v - return s -} - -// SetTargetNumberOfNodes sets the TargetNumberOfNodes field's value. -func (s *DescribeResizeOutput) SetTargetNumberOfNodes(v int64) *DescribeResizeOutput { - s.TargetNumberOfNodes = &v - return s -} - -// SetTotalResizeDataInMegaBytes sets the TotalResizeDataInMegaBytes field's value. -func (s *DescribeResizeOutput) SetTotalResizeDataInMegaBytes(v int64) *DescribeResizeOutput { - s.TotalResizeDataInMegaBytes = &v - return s -} - -// The result of the DescribeSnapshotCopyGrants action. -type DescribeSnapshotCopyGrantsInput struct { - _ struct{} `type:"structure"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeSnapshotCopyGrant request - // exceed the value specified in MaxRecords, AWS returns a value in the Marker - // field of the response. You can retrieve the next set of response records - // by providing the returned marker value in the Marker parameter and retrying - // the request. - // - // Constraints: You can specify either the SnapshotCopyGrantName parameter or - // the Marker parameter, but not both. - Marker *string `type:"string"` - - // The maximum number of response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - MaxRecords *int64 `type:"integer"` - - // The name of the snapshot copy grant. - SnapshotCopyGrantName *string `type:"string"` - - // A tag key or keys for which you want to return all matching resources that - // are associated with the specified key or keys. For example, suppose that - // you have resources tagged with keys called owner and environment. If you - // specify both of these tag keys in the request, Amazon Redshift returns a - // response with all resources that have either or both of these tag keys associated - // with them. - TagKeys []*string `locationNameList:"TagKey" type:"list"` - - // A tag value or values for which you want to return all matching resources - // that are associated with the specified value or values. For example, suppose - // that you have resources tagged with values called admin and test. If you - // specify both of these tag values in the request, Amazon Redshift returns - // a response with all resources that have either or both of these tag values - // associated with them. - TagValues []*string `locationNameList:"TagValue" type:"list"` -} - -// String returns the string representation -func (s DescribeSnapshotCopyGrantsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSnapshotCopyGrantsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeSnapshotCopyGrantsInput) SetMarker(v string) *DescribeSnapshotCopyGrantsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeSnapshotCopyGrantsInput) SetMaxRecords(v int64) *DescribeSnapshotCopyGrantsInput { - s.MaxRecords = &v - return s -} - -// SetSnapshotCopyGrantName sets the SnapshotCopyGrantName field's value. -func (s *DescribeSnapshotCopyGrantsInput) SetSnapshotCopyGrantName(v string) *DescribeSnapshotCopyGrantsInput { - s.SnapshotCopyGrantName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DescribeSnapshotCopyGrantsInput) SetTagKeys(v []*string) *DescribeSnapshotCopyGrantsInput { - s.TagKeys = v - return s -} - -// SetTagValues sets the TagValues field's value. -func (s *DescribeSnapshotCopyGrantsInput) SetTagValues(v []*string) *DescribeSnapshotCopyGrantsInput { - s.TagValues = v - return s -} - -type DescribeSnapshotCopyGrantsOutput struct { - _ struct{} `type:"structure"` - - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeSnapshotCopyGrant request - // exceed the value specified in MaxRecords, AWS returns a value in the Marker - // field of the response. You can retrieve the next set of response records - // by providing the returned marker value in the Marker parameter and retrying - // the request. - // - // Constraints: You can specify either the SnapshotCopyGrantName parameter or - // the Marker parameter, but not both. - Marker *string `type:"string"` - - // The list of SnapshotCopyGrant objects. - SnapshotCopyGrants []*SnapshotCopyGrant `locationNameList:"SnapshotCopyGrant" type:"list"` -} - -// String returns the string representation -func (s DescribeSnapshotCopyGrantsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSnapshotCopyGrantsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeSnapshotCopyGrantsOutput) SetMarker(v string) *DescribeSnapshotCopyGrantsOutput { - s.Marker = &v - return s -} - -// SetSnapshotCopyGrants sets the SnapshotCopyGrants field's value. -func (s *DescribeSnapshotCopyGrantsOutput) SetSnapshotCopyGrants(v []*SnapshotCopyGrant) *DescribeSnapshotCopyGrantsOutput { - s.SnapshotCopyGrants = v - return s -} - -type DescribeSnapshotSchedulesInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for the cluster whose snapshot schedules you want to - // view. - ClusterIdentifier *string `type:"string"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the marker - // parameter and retrying the command. If the marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` - - // The maximum number or response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - MaxRecords *int64 `type:"integer"` - - // A unique identifier for a snapshot schedule. - ScheduleIdentifier *string `type:"string"` - - // The key value for a snapshot schedule tag. - TagKeys []*string `locationNameList:"TagKey" type:"list"` - - // The value corresponding to the key of the snapshot schedule tag. - TagValues []*string `locationNameList:"TagValue" type:"list"` -} - -// String returns the string representation -func (s DescribeSnapshotSchedulesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSnapshotSchedulesInput) GoString() string { - return s.String() -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *DescribeSnapshotSchedulesInput) SetClusterIdentifier(v string) *DescribeSnapshotSchedulesInput { - s.ClusterIdentifier = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeSnapshotSchedulesInput) SetMarker(v string) *DescribeSnapshotSchedulesInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeSnapshotSchedulesInput) SetMaxRecords(v int64) *DescribeSnapshotSchedulesInput { - s.MaxRecords = &v - return s -} - -// SetScheduleIdentifier sets the ScheduleIdentifier field's value. -func (s *DescribeSnapshotSchedulesInput) SetScheduleIdentifier(v string) *DescribeSnapshotSchedulesInput { - s.ScheduleIdentifier = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DescribeSnapshotSchedulesInput) SetTagKeys(v []*string) *DescribeSnapshotSchedulesInput { - s.TagKeys = v - return s -} - -// SetTagValues sets the TagValues field's value. -func (s *DescribeSnapshotSchedulesInput) SetTagValues(v []*string) *DescribeSnapshotSchedulesInput { - s.TagValues = v - return s -} - -type DescribeSnapshotSchedulesOutput struct { - _ struct{} `type:"structure"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the marker - // parameter and retrying the command. If the marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` - - // A list of SnapshotSchedules. - SnapshotSchedules []*SnapshotSchedule `locationNameList:"SnapshotSchedule" type:"list"` -} - -// String returns the string representation -func (s DescribeSnapshotSchedulesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSnapshotSchedulesOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeSnapshotSchedulesOutput) SetMarker(v string) *DescribeSnapshotSchedulesOutput { - s.Marker = &v - return s -} - -// SetSnapshotSchedules sets the SnapshotSchedules field's value. -func (s *DescribeSnapshotSchedulesOutput) SetSnapshotSchedules(v []*SnapshotSchedule) *DescribeSnapshotSchedulesOutput { - s.SnapshotSchedules = v - return s -} - -type DescribeStorageInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeStorageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStorageInput) GoString() string { - return s.String() -} - -type DescribeStorageOutput struct { - _ struct{} `type:"structure"` - - // The total amount of storage currently used for snapshots. - TotalBackupSizeInMegaBytes *float64 `type:"double"` - - // The total amount of storage currently provisioned. - TotalProvisionedStorageInMegaBytes *float64 `type:"double"` -} - -// String returns the string representation -func (s DescribeStorageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStorageOutput) GoString() string { - return s.String() -} - -// SetTotalBackupSizeInMegaBytes sets the TotalBackupSizeInMegaBytes field's value. -func (s *DescribeStorageOutput) SetTotalBackupSizeInMegaBytes(v float64) *DescribeStorageOutput { - s.TotalBackupSizeInMegaBytes = &v - return s -} - -// SetTotalProvisionedStorageInMegaBytes sets the TotalProvisionedStorageInMegaBytes field's value. -func (s *DescribeStorageOutput) SetTotalProvisionedStorageInMegaBytes(v float64) *DescribeStorageOutput { - s.TotalProvisionedStorageInMegaBytes = &v - return s -} - -type DescribeTableRestoreStatusInput struct { - _ struct{} `type:"structure"` - - // The Amazon Redshift cluster that the table is being restored to. - ClusterIdentifier *string `type:"string"` - - // An optional pagination token provided by a previous DescribeTableRestoreStatus - // request. If this parameter is specified, the response includes only records - // beyond the marker, up to the value specified by the MaxRecords parameter. - Marker *string `type:"string"` - - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - MaxRecords *int64 `type:"integer"` - - // The identifier of the table restore request to return status for. If you - // don't specify a TableRestoreRequestId value, then DescribeTableRestoreStatus - // returns the status of all in-progress table restore requests. - TableRestoreRequestId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeTableRestoreStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTableRestoreStatusInput) GoString() string { - return s.String() -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *DescribeTableRestoreStatusInput) SetClusterIdentifier(v string) *DescribeTableRestoreStatusInput { - s.ClusterIdentifier = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTableRestoreStatusInput) SetMarker(v string) *DescribeTableRestoreStatusInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeTableRestoreStatusInput) SetMaxRecords(v int64) *DescribeTableRestoreStatusInput { - s.MaxRecords = &v - return s -} - -// SetTableRestoreRequestId sets the TableRestoreRequestId field's value. -func (s *DescribeTableRestoreStatusInput) SetTableRestoreRequestId(v string) *DescribeTableRestoreStatusInput { - s.TableRestoreRequestId = &v - return s -} - -type DescribeTableRestoreStatusOutput struct { - _ struct{} `type:"structure"` - - // A pagination token that can be used in a subsequent DescribeTableRestoreStatus - // request. - Marker *string `type:"string"` - - // A list of status details for one or more table restore requests. - TableRestoreStatusDetails []*TableRestoreStatus `locationNameList:"TableRestoreStatus" type:"list"` -} - -// String returns the string representation -func (s DescribeTableRestoreStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTableRestoreStatusOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTableRestoreStatusOutput) SetMarker(v string) *DescribeTableRestoreStatusOutput { - s.Marker = &v - return s -} - -// SetTableRestoreStatusDetails sets the TableRestoreStatusDetails field's value. -func (s *DescribeTableRestoreStatusOutput) SetTableRestoreStatusDetails(v []*TableRestoreStatus) *DescribeTableRestoreStatusOutput { - s.TableRestoreStatusDetails = v - return s -} - -type DescribeTagsInput struct { - _ struct{} `type:"structure"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the marker - // parameter and retrying the command. If the marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` - - // The maximum number or response records to return in each call. If the number - // of remaining response records exceeds the specified MaxRecords value, a value - // is returned in a marker field of the response. You can retrieve the next - // set of records by retrying the command with the returned marker value. - MaxRecords *int64 `type:"integer"` - - // The Amazon Resource Name (ARN) for which you want to describe the tag or - // tags. For example, arn:aws:redshift:us-east-1:123456789:cluster:t1. - ResourceName *string `type:"string"` - - // The type of resource with which you want to view tags. Valid resource types - // are: - // - // * Cluster - // - // * CIDR/IP - // - // * EC2 security group - // - // * Snapshot - // - // * Cluster security group - // - // * Subnet group - // - // * HSM connection - // - // * HSM certificate - // - // * Parameter group - // - // * Snapshot copy grant - // - // For more information about Amazon Redshift resource types and constructing - // ARNs, go to Specifying Policy Elements: Actions, Effects, Resources, and - // Principals (http://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-overview.html#redshift-iam-access-control-specify-actions) - // in the Amazon Redshift Cluster Management Guide. - ResourceType *string `type:"string"` - - // A tag key or keys for which you want to return all matching resources that - // are associated with the specified key or keys. For example, suppose that - // you have resources tagged with keys called owner and environment. If you - // specify both of these tag keys in the request, Amazon Redshift returns a - // response with all resources that have either or both of these tag keys associated - // with them. - TagKeys []*string `locationNameList:"TagKey" type:"list"` - - // A tag value or values for which you want to return all matching resources - // that are associated with the specified value or values. For example, suppose - // that you have resources tagged with values called admin and test. If you - // specify both of these tag values in the request, Amazon Redshift returns - // a response with all resources that have either or both of these tag values - // associated with them. - TagValues []*string `locationNameList:"TagValue" type:"list"` -} - -// String returns the string representation -func (s DescribeTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTagsInput) SetMarker(v string) *DescribeTagsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeTagsInput) SetMaxRecords(v int64) *DescribeTagsInput { - s.MaxRecords = &v - return s -} - -// SetResourceName sets the ResourceName field's value. -func (s *DescribeTagsInput) SetResourceName(v string) *DescribeTagsInput { - s.ResourceName = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *DescribeTagsInput) SetResourceType(v string) *DescribeTagsInput { - s.ResourceType = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DescribeTagsInput) SetTagKeys(v []*string) *DescribeTagsInput { - s.TagKeys = v - return s -} - -// SetTagValues sets the TagValues field's value. -func (s *DescribeTagsInput) SetTagValues(v []*string) *DescribeTagsInput { - s.TagValues = v - return s -} - -type DescribeTagsOutput struct { - _ struct{} `type:"structure"` - - // A value that indicates the starting point for the next set of response records - // in a subsequent request. If a value is returned in a response, you can retrieve - // the next set of records by providing this returned marker value in the Marker - // parameter and retrying the command. If the Marker field is empty, all response - // records have been retrieved for the request. - Marker *string `type:"string"` - - // A list of tags with their associated resources. - TaggedResources []*TaggedResource `locationNameList:"TaggedResource" type:"list"` -} - -// String returns the string representation -func (s DescribeTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTagsOutput) SetMarker(v string) *DescribeTagsOutput { - s.Marker = &v - return s -} - -// SetTaggedResources sets the TaggedResources field's value. -func (s *DescribeTagsOutput) SetTaggedResources(v []*TaggedResource) *DescribeTagsOutput { - s.TaggedResources = v - return s -} - -type DisableLoggingInput struct { - _ struct{} `type:"structure"` - - // The identifier of the cluster on which logging is to be stopped. - // - // Example: examplecluster - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableLoggingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableLoggingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableLoggingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableLoggingInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *DisableLoggingInput) SetClusterIdentifier(v string) *DisableLoggingInput { - s.ClusterIdentifier = &v - return s -} - -type DisableSnapshotCopyInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the source cluster that you want to disable copying - // of snapshots to a destination region. - // - // Constraints: Must be the valid name of an existing cluster that has cross-region - // snapshot copy enabled. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableSnapshotCopyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableSnapshotCopyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableSnapshotCopyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableSnapshotCopyInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *DisableSnapshotCopyInput) SetClusterIdentifier(v string) *DisableSnapshotCopyInput { - s.ClusterIdentifier = &v - return s -} - -type DisableSnapshotCopyOutput struct { - _ struct{} `type:"structure"` - - // Describes a cluster. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s DisableSnapshotCopyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableSnapshotCopyOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *DisableSnapshotCopyOutput) SetCluster(v *Cluster) *DisableSnapshotCopyOutput { - s.Cluster = v - return s -} - -// Describes an Amazon EC2 security group. -type EC2SecurityGroup struct { - _ struct{} `type:"structure"` - - // The name of the EC2 Security Group. - EC2SecurityGroupName *string `type:"string"` - - // The AWS ID of the owner of the EC2 security group specified in the EC2SecurityGroupName - // field. - EC2SecurityGroupOwnerId *string `type:"string"` - - // The status of the EC2 security group. - Status *string `type:"string"` - - // The list of tags for the EC2 security group. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s EC2SecurityGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EC2SecurityGroup) GoString() string { - return s.String() -} - -// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. -func (s *EC2SecurityGroup) SetEC2SecurityGroupName(v string) *EC2SecurityGroup { - s.EC2SecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. -func (s *EC2SecurityGroup) SetEC2SecurityGroupOwnerId(v string) *EC2SecurityGroup { - s.EC2SecurityGroupOwnerId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *EC2SecurityGroup) SetStatus(v string) *EC2SecurityGroup { - s.Status = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *EC2SecurityGroup) SetTags(v []*Tag) *EC2SecurityGroup { - s.Tags = v - return s -} - -// Describes the status of the elastic IP (EIP) address. -type ElasticIpStatus struct { - _ struct{} `type:"structure"` - - // The elastic IP (EIP) address for the cluster. - ElasticIp *string `type:"string"` - - // The status of the elastic IP (EIP) address. - Status *string `type:"string"` -} - -// String returns the string representation -func (s ElasticIpStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ElasticIpStatus) GoString() string { - return s.String() -} - -// SetElasticIp sets the ElasticIp field's value. -func (s *ElasticIpStatus) SetElasticIp(v string) *ElasticIpStatus { - s.ElasticIp = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ElasticIpStatus) SetStatus(v string) *ElasticIpStatus { - s.Status = &v - return s -} - -type EnableLoggingInput struct { - _ struct{} `type:"structure"` - - // The name of an existing S3 bucket where the log files are to be stored. - // - // Constraints: - // - // * Must be in the same region as the cluster - // - // * The cluster must have read bucket and put object permissions - // - // BucketName is a required field - BucketName *string `type:"string" required:"true"` - - // The identifier of the cluster on which logging is to be started. - // - // Example: examplecluster - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // The prefix applied to the log file names. - // - // Constraints: - // - // * Cannot exceed 512 characters - // - // * Cannot contain spaces( ), double quotes ("), single quotes ('), a backslash - // (\), or control characters. The hexadecimal codes for invalid characters - // are: - // - // x00 to x20 - // - // x22 - // - // x27 - // - // x5c - // - // x7f or larger - S3KeyPrefix *string `type:"string"` -} - -// String returns the string representation -func (s EnableLoggingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableLoggingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableLoggingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableLoggingInput"} - if s.BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("BucketName")) - } - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketName sets the BucketName field's value. -func (s *EnableLoggingInput) SetBucketName(v string) *EnableLoggingInput { - s.BucketName = &v - return s -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *EnableLoggingInput) SetClusterIdentifier(v string) *EnableLoggingInput { - s.ClusterIdentifier = &v - return s -} - -// SetS3KeyPrefix sets the S3KeyPrefix field's value. -func (s *EnableLoggingInput) SetS3KeyPrefix(v string) *EnableLoggingInput { - s.S3KeyPrefix = &v - return s -} - -type EnableSnapshotCopyInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the source cluster to copy snapshots from. - // - // Constraints: Must be the valid name of an existing cluster that does not - // already have cross-region snapshot copy enabled. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // The destination AWS Region that you want to copy snapshots to. - // - // Constraints: Must be the name of a valid AWS Region. For more information, - // see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region) - // in the Amazon Web Services General Reference. - // - // DestinationRegion is a required field - DestinationRegion *string `type:"string" required:"true"` - - // The number of days to retain newly copied snapshots in the destination AWS - // Region after they are copied from the source AWS Region. If the value is - // -1, the manual snapshot is retained indefinitely. - // - // The value must be either -1 or an integer between 1 and 3,653. - ManualSnapshotRetentionPeriod *int64 `type:"integer"` - - // The number of days to retain automated snapshots in the destination region - // after they are copied from the source region. - // - // Default: 7. - // - // Constraints: Must be at least 1 and no more than 35. - RetentionPeriod *int64 `type:"integer"` - - // The name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted - // cluster are copied to the destination region. - SnapshotCopyGrantName *string `type:"string"` -} - -// String returns the string representation -func (s EnableSnapshotCopyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableSnapshotCopyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableSnapshotCopyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableSnapshotCopyInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - if s.DestinationRegion == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationRegion")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *EnableSnapshotCopyInput) SetClusterIdentifier(v string) *EnableSnapshotCopyInput { - s.ClusterIdentifier = &v - return s -} - -// SetDestinationRegion sets the DestinationRegion field's value. -func (s *EnableSnapshotCopyInput) SetDestinationRegion(v string) *EnableSnapshotCopyInput { - s.DestinationRegion = &v - return s -} - -// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. -func (s *EnableSnapshotCopyInput) SetManualSnapshotRetentionPeriod(v int64) *EnableSnapshotCopyInput { - s.ManualSnapshotRetentionPeriod = &v - return s -} - -// SetRetentionPeriod sets the RetentionPeriod field's value. -func (s *EnableSnapshotCopyInput) SetRetentionPeriod(v int64) *EnableSnapshotCopyInput { - s.RetentionPeriod = &v - return s -} - -// SetSnapshotCopyGrantName sets the SnapshotCopyGrantName field's value. -func (s *EnableSnapshotCopyInput) SetSnapshotCopyGrantName(v string) *EnableSnapshotCopyInput { - s.SnapshotCopyGrantName = &v - return s -} - -type EnableSnapshotCopyOutput struct { - _ struct{} `type:"structure"` - - // Describes a cluster. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s EnableSnapshotCopyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableSnapshotCopyOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *EnableSnapshotCopyOutput) SetCluster(v *Cluster) *EnableSnapshotCopyOutput { - s.Cluster = v - return s -} - -// Describes a connection endpoint. -type Endpoint struct { - _ struct{} `type:"structure"` - - // The DNS address of the Cluster. - Address *string `type:"string"` - - // The port that the database engine is listening on. - Port *int64 `type:"integer"` -} - -// String returns the string representation -func (s Endpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Endpoint) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *Endpoint) SetAddress(v string) *Endpoint { - s.Address = &v - return s -} - -// SetPort sets the Port field's value. -func (s *Endpoint) SetPort(v int64) *Endpoint { - s.Port = &v - return s -} - -// Describes an event. -type Event struct { - _ struct{} `type:"structure"` - - // The date and time of the event. - Date *time.Time `type:"timestamp"` - - // A list of the event categories. - // - // Values: Configuration, Management, Monitoring, Security - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // The identifier of the event. - EventId *string `type:"string"` - - // The text of this event. - Message *string `type:"string"` - - // The severity of the event. - // - // Values: ERROR, INFO - Severity *string `type:"string"` - - // The identifier for the source of the event. - SourceIdentifier *string `type:"string"` - - // The source type for this event. - SourceType *string `type:"string" enum:"SourceType"` -} - -// String returns the string representation -func (s Event) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Event) GoString() string { - return s.String() -} - -// SetDate sets the Date field's value. -func (s *Event) SetDate(v time.Time) *Event { - s.Date = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *Event) SetEventCategories(v []*string) *Event { - s.EventCategories = v - return s -} - -// SetEventId sets the EventId field's value. -func (s *Event) SetEventId(v string) *Event { - s.EventId = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *Event) SetMessage(v string) *Event { - s.Message = &v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *Event) SetSeverity(v string) *Event { - s.Severity = &v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *Event) SetSourceIdentifier(v string) *Event { - s.SourceIdentifier = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *Event) SetSourceType(v string) *Event { - s.SourceType = &v - return s -} - -// Describes event categories. -type EventCategoriesMap struct { - _ struct{} `type:"structure"` - - // The events in the event category. - Events []*EventInfoMap `locationNameList:"EventInfoMap" type:"list"` - - // The source type, such as cluster or cluster-snapshot, that the returned categories - // belong to. - SourceType *string `type:"string"` -} - -// String returns the string representation -func (s EventCategoriesMap) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventCategoriesMap) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *EventCategoriesMap) SetEvents(v []*EventInfoMap) *EventCategoriesMap { - s.Events = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *EventCategoriesMap) SetSourceType(v string) *EventCategoriesMap { - s.SourceType = &v - return s -} - -// Describes event information. -type EventInfoMap struct { - _ struct{} `type:"structure"` - - // The category of an Amazon Redshift event. - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // The description of an Amazon Redshift event. - EventDescription *string `type:"string"` - - // The identifier of an Amazon Redshift event. - EventId *string `type:"string"` - - // The severity of the event. - // - // Values: ERROR, INFO - Severity *string `type:"string"` -} - -// String returns the string representation -func (s EventInfoMap) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventInfoMap) GoString() string { - return s.String() -} - -// SetEventCategories sets the EventCategories field's value. -func (s *EventInfoMap) SetEventCategories(v []*string) *EventInfoMap { - s.EventCategories = v - return s -} - -// SetEventDescription sets the EventDescription field's value. -func (s *EventInfoMap) SetEventDescription(v string) *EventInfoMap { - s.EventDescription = &v - return s -} - -// SetEventId sets the EventId field's value. -func (s *EventInfoMap) SetEventId(v string) *EventInfoMap { - s.EventId = &v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *EventInfoMap) SetSeverity(v string) *EventInfoMap { - s.Severity = &v - return s -} - -// Describes event subscriptions. -type EventSubscription struct { - _ struct{} `type:"structure"` - - // The name of the Amazon Redshift event notification subscription. - CustSubscriptionId *string `type:"string"` - - // The AWS customer account associated with the Amazon Redshift event notification - // subscription. - CustomerAwsId *string `type:"string"` - - // A boolean value indicating whether the subscription is enabled; true indicates - // that the subscription is enabled. - Enabled *bool `type:"boolean"` - - // The list of Amazon Redshift event categories specified in the event notification - // subscription. - // - // Values: Configuration, Management, Monitoring, Security - EventCategoriesList []*string `locationNameList:"EventCategory" type:"list"` - - // The event severity specified in the Amazon Redshift event notification subscription. - // - // Values: ERROR, INFO - Severity *string `type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event - // notification subscription. - SnsTopicArn *string `type:"string"` - - // A list of the sources that publish events to the Amazon Redshift event notification - // subscription. - SourceIdsList []*string `locationNameList:"SourceId" type:"list"` - - // The source type of the events returned the Amazon Redshift event notification, - // such as cluster, or cluster-snapshot. - SourceType *string `type:"string"` - - // The status of the Amazon Redshift event notification subscription. - // - // Constraints: - // - // * Can be one of the following: active | no-permission | topic-not-exist - // - // * The status "no-permission" indicates that Amazon Redshift no longer - // has permission to post to the Amazon SNS topic. The status "topic-not-exist" - // indicates that the topic was deleted after the subscription was created. - Status *string `type:"string"` - - // The date and time the Amazon Redshift event notification subscription was - // created. - SubscriptionCreationTime *time.Time `type:"timestamp"` - - // The list of tags for the event subscription. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s EventSubscription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventSubscription) GoString() string { - return s.String() -} - -// SetCustSubscriptionId sets the CustSubscriptionId field's value. -func (s *EventSubscription) SetCustSubscriptionId(v string) *EventSubscription { - s.CustSubscriptionId = &v - return s -} - -// SetCustomerAwsId sets the CustomerAwsId field's value. -func (s *EventSubscription) SetCustomerAwsId(v string) *EventSubscription { - s.CustomerAwsId = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *EventSubscription) SetEnabled(v bool) *EventSubscription { - s.Enabled = &v - return s -} - -// SetEventCategoriesList sets the EventCategoriesList field's value. -func (s *EventSubscription) SetEventCategoriesList(v []*string) *EventSubscription { - s.EventCategoriesList = v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *EventSubscription) SetSeverity(v string) *EventSubscription { - s.Severity = &v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *EventSubscription) SetSnsTopicArn(v string) *EventSubscription { - s.SnsTopicArn = &v - return s -} - -// SetSourceIdsList sets the SourceIdsList field's value. -func (s *EventSubscription) SetSourceIdsList(v []*string) *EventSubscription { - s.SourceIdsList = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *EventSubscription) SetSourceType(v string) *EventSubscription { - s.SourceType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *EventSubscription) SetStatus(v string) *EventSubscription { - s.Status = &v - return s -} - -// SetSubscriptionCreationTime sets the SubscriptionCreationTime field's value. -func (s *EventSubscription) SetSubscriptionCreationTime(v time.Time) *EventSubscription { - s.SubscriptionCreationTime = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *EventSubscription) SetTags(v []*Tag) *EventSubscription { - s.Tags = v - return s -} - -// The request parameters to get cluster credentials. -type GetClusterCredentialsInput struct { - _ struct{} `type:"structure"` - - // Create a database user with the name specified for the user named in DbUser - // if one does not exist. - AutoCreate *bool `type:"boolean"` - - // The unique identifier of the cluster that contains the database for which - // your are requesting credentials. This parameter is case sensitive. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // A list of the names of existing database groups that the user named in DbUser - // will join for the current session, in addition to any group memberships for - // an existing user. If not specified, a new user is added only to PUBLIC. - // - // Database group name constraints - // - // * Must be 1 to 64 alphanumeric characters or hyphens - // - // * Must contain only lowercase letters, numbers, underscore, plus sign, - // period (dot), at symbol (@), or hyphen. - // - // * First character must be a letter. - // - // * Must not contain a colon ( : ) or slash ( / ). - // - // * Cannot be a reserved word. A list of reserved words can be found in - // Reserved Words (http://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html) - // in the Amazon Redshift Database Developer Guide. - DbGroups []*string `locationNameList:"DbGroup" type:"list"` - - // The name of a database that DbUser is authorized to log on to. If DbName - // is not specified, DbUser can log on to any existing database. - // - // Constraints: - // - // * Must be 1 to 64 alphanumeric characters or hyphens - // - // * Must contain only lowercase letters, numbers, underscore, plus sign, - // period (dot), at symbol (@), or hyphen. - // - // * First character must be a letter. - // - // * Must not contain a colon ( : ) or slash ( / ). - // - // * Cannot be a reserved word. A list of reserved words can be found in - // Reserved Words (http://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html) - // in the Amazon Redshift Database Developer Guide. - DbName *string `type:"string"` - - // The name of a database user. If a user name matching DbUser exists in the - // database, the temporary user credentials have the same permissions as the - // existing user. If DbUser doesn't exist in the database and Autocreate is - // True, a new user is created using the value for DbUser with PUBLIC permissions. - // If a database user matching the value for DbUser doesn't exist and Autocreate - // is False, then the command succeeds but the connection attempt will fail - // because the user doesn't exist in the database. - // - // For more information, see CREATE USER (http://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_USER.html) - // in the Amazon Redshift Database Developer Guide. - // - // Constraints: - // - // * Must be 1 to 64 alphanumeric characters or hyphens. The user name can't - // be PUBLIC. - // - // * Must contain only lowercase letters, numbers, underscore, plus sign, - // period (dot), at symbol (@), or hyphen. - // - // * First character must be a letter. - // - // * Must not contain a colon ( : ) or slash ( / ). - // - // * Cannot be a reserved word. A list of reserved words can be found in - // Reserved Words (http://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html) - // in the Amazon Redshift Database Developer Guide. - // - // DbUser is a required field - DbUser *string `type:"string" required:"true"` - - // The number of seconds until the returned temporary password expires. - // - // Constraint: minimum 900, maximum 3600. - // - // Default: 900 - DurationSeconds *int64 `type:"integer"` -} - -// String returns the string representation -func (s GetClusterCredentialsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetClusterCredentialsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetClusterCredentialsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetClusterCredentialsInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - if s.DbUser == nil { - invalidParams.Add(request.NewErrParamRequired("DbUser")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutoCreate sets the AutoCreate field's value. -func (s *GetClusterCredentialsInput) SetAutoCreate(v bool) *GetClusterCredentialsInput { - s.AutoCreate = &v - return s -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *GetClusterCredentialsInput) SetClusterIdentifier(v string) *GetClusterCredentialsInput { - s.ClusterIdentifier = &v - return s -} - -// SetDbGroups sets the DbGroups field's value. -func (s *GetClusterCredentialsInput) SetDbGroups(v []*string) *GetClusterCredentialsInput { - s.DbGroups = v - return s -} - -// SetDbName sets the DbName field's value. -func (s *GetClusterCredentialsInput) SetDbName(v string) *GetClusterCredentialsInput { - s.DbName = &v - return s -} - -// SetDbUser sets the DbUser field's value. -func (s *GetClusterCredentialsInput) SetDbUser(v string) *GetClusterCredentialsInput { - s.DbUser = &v - return s -} - -// SetDurationSeconds sets the DurationSeconds field's value. -func (s *GetClusterCredentialsInput) SetDurationSeconds(v int64) *GetClusterCredentialsInput { - s.DurationSeconds = &v - return s -} - -// Temporary credentials with authorization to log on to an Amazon Redshift -// database. -type GetClusterCredentialsOutput struct { - _ struct{} `type:"structure"` - - // A temporary password that authorizes the user name returned by DbUser to - // log on to the database DbName. - DbPassword *string `type:"string" sensitive:"true"` - - // A database user name that is authorized to log on to the database DbName - // using the password DbPassword. If the specified DbUser exists in the database, - // the new user name has the same database privileges as the the user named - // in DbUser. By default, the user is added to PUBLIC. If the DbGroups parameter - // is specifed, DbUser is added to the listed groups for any sessions created - // using these credentials. - DbUser *string `type:"string"` - - // The date and time the password in DbPassword expires. - Expiration *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s GetClusterCredentialsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetClusterCredentialsOutput) GoString() string { - return s.String() -} - -// SetDbPassword sets the DbPassword field's value. -func (s *GetClusterCredentialsOutput) SetDbPassword(v string) *GetClusterCredentialsOutput { - s.DbPassword = &v - return s -} - -// SetDbUser sets the DbUser field's value. -func (s *GetClusterCredentialsOutput) SetDbUser(v string) *GetClusterCredentialsOutput { - s.DbUser = &v - return s -} - -// SetExpiration sets the Expiration field's value. -func (s *GetClusterCredentialsOutput) SetExpiration(v time.Time) *GetClusterCredentialsOutput { - s.Expiration = &v - return s -} - -type GetReservedNodeExchangeOfferingsInput struct { - _ struct{} `type:"structure"` - - // A value that indicates the starting point for the next set of ReservedNodeOfferings. - Marker *string `type:"string"` - - // An integer setting the maximum number of ReservedNodeOfferings to retrieve. - MaxRecords *int64 `type:"integer"` - - // A string representing the node identifier for the DC1 Reserved Node to be - // exchanged. - // - // ReservedNodeId is a required field - ReservedNodeId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetReservedNodeExchangeOfferingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetReservedNodeExchangeOfferingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetReservedNodeExchangeOfferingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetReservedNodeExchangeOfferingsInput"} - if s.ReservedNodeId == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedNodeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *GetReservedNodeExchangeOfferingsInput) SetMarker(v string) *GetReservedNodeExchangeOfferingsInput { - s.Marker = &v - return s -} - -// SetMaxRecords sets the MaxRecords field's value. -func (s *GetReservedNodeExchangeOfferingsInput) SetMaxRecords(v int64) *GetReservedNodeExchangeOfferingsInput { - s.MaxRecords = &v - return s -} - -// SetReservedNodeId sets the ReservedNodeId field's value. -func (s *GetReservedNodeExchangeOfferingsInput) SetReservedNodeId(v string) *GetReservedNodeExchangeOfferingsInput { - s.ReservedNodeId = &v - return s -} - -type GetReservedNodeExchangeOfferingsOutput struct { - _ struct{} `type:"structure"` - - // An optional parameter that specifies the starting point for returning a set - // of response records. When the results of a GetReservedNodeExchangeOfferings - // request exceed the value specified in MaxRecords, Amazon Redshift returns - // a value in the marker field of the response. You can retrieve the next set - // of response records by providing the returned marker value in the marker - // parameter and retrying the request. - Marker *string `type:"string"` - - // Returns an array of ReservedNodeOffering objects. - ReservedNodeOfferings []*ReservedNodeOffering `locationNameList:"ReservedNodeOffering" type:"list"` -} - -// String returns the string representation -func (s GetReservedNodeExchangeOfferingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetReservedNodeExchangeOfferingsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *GetReservedNodeExchangeOfferingsOutput) SetMarker(v string) *GetReservedNodeExchangeOfferingsOutput { - s.Marker = &v - return s -} - -// SetReservedNodeOfferings sets the ReservedNodeOfferings field's value. -func (s *GetReservedNodeExchangeOfferingsOutput) SetReservedNodeOfferings(v []*ReservedNodeOffering) *GetReservedNodeExchangeOfferingsOutput { - s.ReservedNodeOfferings = v - return s -} - -// Returns information about an HSM client certificate. The certificate is stored -// in a secure Hardware Storage Module (HSM), and used by the Amazon Redshift -// cluster to encrypt data files. -type HsmClientCertificate struct { - _ struct{} `type:"structure"` - - // The identifier of the HSM client certificate. - HsmClientCertificateIdentifier *string `type:"string"` - - // The public key that the Amazon Redshift cluster will use to connect to the - // HSM. You must register the public key in the HSM. - HsmClientCertificatePublicKey *string `type:"string"` - - // The list of tags for the HSM client certificate. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s HsmClientCertificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HsmClientCertificate) GoString() string { - return s.String() -} - -// SetHsmClientCertificateIdentifier sets the HsmClientCertificateIdentifier field's value. -func (s *HsmClientCertificate) SetHsmClientCertificateIdentifier(v string) *HsmClientCertificate { - s.HsmClientCertificateIdentifier = &v - return s -} - -// SetHsmClientCertificatePublicKey sets the HsmClientCertificatePublicKey field's value. -func (s *HsmClientCertificate) SetHsmClientCertificatePublicKey(v string) *HsmClientCertificate { - s.HsmClientCertificatePublicKey = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *HsmClientCertificate) SetTags(v []*Tag) *HsmClientCertificate { - s.Tags = v - return s -} - -// Returns information about an HSM configuration, which is an object that describes -// to Amazon Redshift clusters the information they require to connect to an -// HSM where they can store database encryption keys. -type HsmConfiguration struct { - _ struct{} `type:"structure"` - - // A text description of the HSM configuration. - Description *string `type:"string"` - - // The name of the Amazon Redshift HSM configuration. - HsmConfigurationIdentifier *string `type:"string"` - - // The IP address that the Amazon Redshift cluster must use to access the HSM. - HsmIpAddress *string `type:"string"` - - // The name of the partition in the HSM where the Amazon Redshift clusters will - // store their database encryption keys. - HsmPartitionName *string `type:"string"` - - // The list of tags for the HSM configuration. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s HsmConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HsmConfiguration) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *HsmConfiguration) SetDescription(v string) *HsmConfiguration { - s.Description = &v - return s -} - -// SetHsmConfigurationIdentifier sets the HsmConfigurationIdentifier field's value. -func (s *HsmConfiguration) SetHsmConfigurationIdentifier(v string) *HsmConfiguration { - s.HsmConfigurationIdentifier = &v - return s -} - -// SetHsmIpAddress sets the HsmIpAddress field's value. -func (s *HsmConfiguration) SetHsmIpAddress(v string) *HsmConfiguration { - s.HsmIpAddress = &v - return s -} - -// SetHsmPartitionName sets the HsmPartitionName field's value. -func (s *HsmConfiguration) SetHsmPartitionName(v string) *HsmConfiguration { - s.HsmPartitionName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *HsmConfiguration) SetTags(v []*Tag) *HsmConfiguration { - s.Tags = v - return s -} - -// Describes the status of changes to HSM settings. -type HsmStatus struct { - _ struct{} `type:"structure"` - - // Specifies the name of the HSM client certificate the Amazon Redshift cluster - // uses to retrieve the data encryption keys stored in an HSM. - HsmClientCertificateIdentifier *string `type:"string"` - - // Specifies the name of the HSM configuration that contains the information - // the Amazon Redshift cluster can use to retrieve and store keys in an HSM. - HsmConfigurationIdentifier *string `type:"string"` - - // Reports whether the Amazon Redshift cluster has finished applying any HSM - // settings changes specified in a modify cluster command. - // - // Values: active, applying - Status *string `type:"string"` -} - -// String returns the string representation -func (s HsmStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HsmStatus) GoString() string { - return s.String() -} - -// SetHsmClientCertificateIdentifier sets the HsmClientCertificateIdentifier field's value. -func (s *HsmStatus) SetHsmClientCertificateIdentifier(v string) *HsmStatus { - s.HsmClientCertificateIdentifier = &v - return s -} - -// SetHsmConfigurationIdentifier sets the HsmConfigurationIdentifier field's value. -func (s *HsmStatus) SetHsmConfigurationIdentifier(v string) *HsmStatus { - s.HsmConfigurationIdentifier = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *HsmStatus) SetStatus(v string) *HsmStatus { - s.Status = &v - return s -} - -// Describes an IP range used in a security group. -type IPRange struct { - _ struct{} `type:"structure"` - - // The IP range in Classless Inter-Domain Routing (CIDR) notation. - CIDRIP *string `type:"string"` - - // The status of the IP range, for example, "authorized". - Status *string `type:"string"` - - // The list of tags for the IP range. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s IPRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IPRange) GoString() string { - return s.String() -} - -// SetCIDRIP sets the CIDRIP field's value. -func (s *IPRange) SetCIDRIP(v string) *IPRange { - s.CIDRIP = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *IPRange) SetStatus(v string) *IPRange { - s.Status = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *IPRange) SetTags(v []*Tag) *IPRange { - s.Tags = v - return s -} - -// Describes the status of logging for a cluster. -type LoggingStatus struct { - _ struct{} `type:"structure"` - - // The name of the S3 bucket where the log files are stored. - BucketName *string `type:"string"` - - // The message indicating that logs failed to be delivered. - LastFailureMessage *string `type:"string"` - - // The last time when logs failed to be delivered. - LastFailureTime *time.Time `type:"timestamp"` - - // The last time that logs were delivered. - LastSuccessfulDeliveryTime *time.Time `type:"timestamp"` - - // true if logging is on, false if logging is off. - LoggingEnabled *bool `type:"boolean"` - - // The prefix applied to the log file names. - S3KeyPrefix *string `type:"string"` -} - -// String returns the string representation -func (s LoggingStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoggingStatus) GoString() string { - return s.String() -} - -// SetBucketName sets the BucketName field's value. -func (s *LoggingStatus) SetBucketName(v string) *LoggingStatus { - s.BucketName = &v - return s -} - -// SetLastFailureMessage sets the LastFailureMessage field's value. -func (s *LoggingStatus) SetLastFailureMessage(v string) *LoggingStatus { - s.LastFailureMessage = &v - return s -} - -// SetLastFailureTime sets the LastFailureTime field's value. -func (s *LoggingStatus) SetLastFailureTime(v time.Time) *LoggingStatus { - s.LastFailureTime = &v - return s -} - -// SetLastSuccessfulDeliveryTime sets the LastSuccessfulDeliveryTime field's value. -func (s *LoggingStatus) SetLastSuccessfulDeliveryTime(v time.Time) *LoggingStatus { - s.LastSuccessfulDeliveryTime = &v - return s -} - -// SetLoggingEnabled sets the LoggingEnabled field's value. -func (s *LoggingStatus) SetLoggingEnabled(v bool) *LoggingStatus { - s.LoggingEnabled = &v - return s -} - -// SetS3KeyPrefix sets the S3KeyPrefix field's value. -func (s *LoggingStatus) SetS3KeyPrefix(v string) *LoggingStatus { - s.S3KeyPrefix = &v - return s -} - -// Defines a maintenance track that determines which Amazon Redshift version -// to apply during a maintenance window. If the value for MaintenanceTrack is -// current, the cluster is updated to the most recently certified maintenance -// release. If the value is trailing, the cluster is updated to the previously -// certified maintenance release. -type MaintenanceTrack struct { - _ struct{} `type:"structure"` - - // The version number for the cluster release. - DatabaseVersion *string `type:"string"` - - // The name of the maintenance track. Possible values are current and trailing. - MaintenanceTrackName *string `type:"string"` - - // An array of UpdateTarget objects to update with the maintenance track. - UpdateTargets []*UpdateTarget `locationNameList:"UpdateTarget" type:"list"` -} - -// String returns the string representation -func (s MaintenanceTrack) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceTrack) GoString() string { - return s.String() -} - -// SetDatabaseVersion sets the DatabaseVersion field's value. -func (s *MaintenanceTrack) SetDatabaseVersion(v string) *MaintenanceTrack { - s.DatabaseVersion = &v - return s -} - -// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. -func (s *MaintenanceTrack) SetMaintenanceTrackName(v string) *MaintenanceTrack { - s.MaintenanceTrackName = &v - return s -} - -// SetUpdateTargets sets the UpdateTargets field's value. -func (s *MaintenanceTrack) SetUpdateTargets(v []*UpdateTarget) *MaintenanceTrack { - s.UpdateTargets = v - return s -} - -type ModifyClusterDbRevisionInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of a cluster whose database revision you want to modify. - // - // Example: examplecluster - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // The identifier of the database revision. You can retrieve this value from - // the response to the DescribeClusterDbRevisions request. - // - // RevisionTarget is a required field - RevisionTarget *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyClusterDbRevisionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterDbRevisionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyClusterDbRevisionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyClusterDbRevisionInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - if s.RevisionTarget == nil { - invalidParams.Add(request.NewErrParamRequired("RevisionTarget")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *ModifyClusterDbRevisionInput) SetClusterIdentifier(v string) *ModifyClusterDbRevisionInput { - s.ClusterIdentifier = &v - return s -} - -// SetRevisionTarget sets the RevisionTarget field's value. -func (s *ModifyClusterDbRevisionInput) SetRevisionTarget(v string) *ModifyClusterDbRevisionInput { - s.RevisionTarget = &v - return s -} - -type ModifyClusterDbRevisionOutput struct { - _ struct{} `type:"structure"` - - // Describes a cluster. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s ModifyClusterDbRevisionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterDbRevisionOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *ModifyClusterDbRevisionOutput) SetCluster(v *Cluster) *ModifyClusterDbRevisionOutput { - s.Cluster = v - return s -} - -type ModifyClusterIamRolesInput struct { - _ struct{} `type:"structure"` - - // Zero or more IAM roles to associate with the cluster. The roles must be in - // their Amazon Resource Name (ARN) format. You can associate up to 10 IAM roles - // with a single cluster in a single request. - AddIamRoles []*string `locationNameList:"IamRoleArn" type:"list"` - - // The unique identifier of the cluster for which you want to associate or disassociate - // IAM roles. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // Zero or more IAM roles in ARN format to disassociate from the cluster. You - // can disassociate up to 10 IAM roles from a single cluster in a single request. - RemoveIamRoles []*string `locationNameList:"IamRoleArn" type:"list"` -} - -// String returns the string representation -func (s ModifyClusterIamRolesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterIamRolesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyClusterIamRolesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyClusterIamRolesInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddIamRoles sets the AddIamRoles field's value. -func (s *ModifyClusterIamRolesInput) SetAddIamRoles(v []*string) *ModifyClusterIamRolesInput { - s.AddIamRoles = v - return s -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *ModifyClusterIamRolesInput) SetClusterIdentifier(v string) *ModifyClusterIamRolesInput { - s.ClusterIdentifier = &v - return s -} - -// SetRemoveIamRoles sets the RemoveIamRoles field's value. -func (s *ModifyClusterIamRolesInput) SetRemoveIamRoles(v []*string) *ModifyClusterIamRolesInput { - s.RemoveIamRoles = v - return s -} - -type ModifyClusterIamRolesOutput struct { - _ struct{} `type:"structure"` - - // Describes a cluster. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s ModifyClusterIamRolesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterIamRolesOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *ModifyClusterIamRolesOutput) SetCluster(v *Cluster) *ModifyClusterIamRolesOutput { - s.Cluster = v - return s -} - -type ModifyClusterInput struct { - _ struct{} `type:"structure"` - - // If true, major version upgrades will be applied automatically to the cluster - // during the maintenance window. - // - // Default: false - AllowVersionUpgrade *bool `type:"boolean"` - - // The number of days that automated snapshots are retained. If the value is - // 0, automated snapshots are disabled. Even if automated snapshots are disabled, - // you can still create manual snapshots when you want with CreateClusterSnapshot. - // - // If you decrease the automated snapshot retention period from its current - // value, existing automated snapshots that fall outside of the new retention - // period will be immediately deleted. - // - // Default: Uses existing setting. - // - // Constraints: Must be a value from 0 to 35. - AutomatedSnapshotRetentionPeriod *int64 `type:"integer"` - - // The unique identifier of the cluster to be modified. - // - // Example: examplecluster - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // The name of the cluster parameter group to apply to this cluster. This change - // is applied only after the cluster is rebooted. To reboot a cluster use RebootCluster. - // - // Default: Uses existing setting. - // - // Constraints: The cluster parameter group must be in the same parameter group - // family that matches the cluster version. - ClusterParameterGroupName *string `type:"string"` - - // A list of cluster security groups to be authorized on this cluster. This - // change is asynchronously applied as soon as possible. - // - // Security groups currently associated with the cluster, and not in the list - // of groups to apply, will be revoked from the cluster. - // - // Constraints: - // - // * Must be 1 to 255 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - ClusterSecurityGroups []*string `locationNameList:"ClusterSecurityGroupName" type:"list"` - - // The new cluster type. - // - // When you submit your cluster resize request, your existing cluster goes into - // a read-only mode. After Amazon Redshift provisions a new cluster based on - // your resize requirements, there will be outage for a period while the old - // cluster is deleted and your connection is switched to the new cluster. You - // can use DescribeResize to track the progress of the resize request. - // - // Valid Values: multi-node | single-node - ClusterType *string `type:"string"` - - // The new version number of the Amazon Redshift engine to upgrade to. - // - // For major version upgrades, if a non-default cluster parameter group is currently - // in use, a new cluster parameter group in the cluster parameter group family - // for the new version must be specified. The new cluster parameter group can - // be the default for that cluster parameter group family. For more information - // about parameters and parameter groups, go to Amazon Redshift Parameter Groups - // (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) - // in the Amazon Redshift Cluster Management Guide. - // - // Example: 1.0 - ClusterVersion *string `type:"string"` - - // The Elastic IP (EIP) address for the cluster. - // - // Constraints: The cluster must be provisioned in EC2-VPC and publicly-accessible - // through an Internet gateway. For more information about provisioning clusters - // in EC2-VPC, go to Supported Platforms to Launch Your Cluster (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#cluster-platforms) - // in the Amazon Redshift Cluster Management Guide. - ElasticIp *string `type:"string"` - - // Indicates whether the cluster is encrypted. If the cluster is encrypted and - // you provide a value for the KmsKeyId parameter, we will encrypt the cluster - // with the provided KmsKeyId. If you don't provide a KmsKeyId, we will encrypt - // with the default key. In the China region we will use legacy encryption if - // you specify that the cluster is encrypted. - Encrypted *bool `type:"boolean"` - - // An option that specifies whether to create the cluster with enhanced VPC - // routing enabled. To create a cluster that uses enhanced VPC routing, the - // cluster must be in a VPC. For more information, see Enhanced VPC Routing - // (http://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html) - // in the Amazon Redshift Cluster Management Guide. - // - // If this option is true, enhanced VPC routing is enabled. - // - // Default: false - EnhancedVpcRouting *bool `type:"boolean"` - - // Specifies the name of the HSM client certificate the Amazon Redshift cluster - // uses to retrieve the data encryption keys stored in an HSM. - HsmClientCertificateIdentifier *string `type:"string"` - - // Specifies the name of the HSM configuration that contains the information - // the Amazon Redshift cluster can use to retrieve and store keys in an HSM. - HsmConfigurationIdentifier *string `type:"string"` - - // The AWS Key Management Service (KMS) key ID of the encryption key that you - // want to use to encrypt data in the cluster. - KmsKeyId *string `type:"string"` - - // The name for the maintenance track that you want to assign for the cluster. - // This name change is asynchronous. The new track name stays in the PendingModifiedValues - // for the cluster until the next maintenance window. When the maintenance track - // changes, the cluster is switched to the latest cluster release available - // for the maintenance track. At this point, the maintenance track name is applied. - MaintenanceTrackName *string `type:"string"` - - // The default for number of days that a newly created manual snapshot is retained. - // If the value is -1, the manual snapshot is retained indefinitely. This value - // doesn't retroactively change the retention periods of existing manual snapshots. - // - // The value must be either -1 or an integer between 1 and 3,653. - // - // The default value is -1. - ManualSnapshotRetentionPeriod *int64 `type:"integer"` - - // The new password for the cluster master user. This change is asynchronously - // applied as soon as possible. Between the time of the request and the completion - // of the request, the MasterUserPassword element exists in the PendingModifiedValues - // element of the operation response. - // - // Operations never return the password, so this operation provides a way to - // regain access to the master user account for a cluster if the password is - // lost. - // - // Default: Uses existing setting. - // - // Constraints: - // - // * Must be between 8 and 64 characters in length. - // - // * Must contain at least one uppercase letter. - // - // * Must contain at least one lowercase letter. - // - // * Must contain one number. - // - // * Can be any printable ASCII character (ASCII code 33 to 126) except ' - // (single quote), " (double quote), \, /, @, or space. - MasterUserPassword *string `type:"string"` - - // The new identifier for the cluster. - // - // Constraints: - // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. - // - // * Alphabetic characters must be lowercase. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // * Must be unique for all clusters within an AWS account. - // - // Example: examplecluster - NewClusterIdentifier *string `type:"string"` - - // The new node type of the cluster. If you specify a new node type, you must - // also specify the number of nodes parameter. - // - // When you submit your request to resize a cluster, Amazon Redshift sets access - // permissions for the cluster to read-only. After Amazon Redshift provisions - // a new cluster according to your resize requirements, there will be a temporary - // outage while the old cluster is deleted and your connection is switched to - // the new cluster. When the new connection is complete, the original access - // permissions for the cluster are restored. You can use DescribeResize to track - // the progress of the resize request. - // - // Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large - // | dc2.8xlarge - NodeType *string `type:"string"` - - // The new number of nodes of the cluster. If you specify a new number of nodes, - // you must also specify the node type parameter. - // - // When you submit your request to resize a cluster, Amazon Redshift sets access - // permissions for the cluster to read-only. After Amazon Redshift provisions - // a new cluster according to your resize requirements, there will be a temporary - // outage while the old cluster is deleted and your connection is switched to - // the new cluster. When the new connection is complete, the original access - // permissions for the cluster are restored. You can use DescribeResize to track - // the progress of the resize request. - // - // Valid Values: Integer greater than 0. - NumberOfNodes *int64 `type:"integer"` - - // The weekly time range (in UTC) during which system maintenance can occur, - // if necessary. If system maintenance is necessary during the window, it may - // result in an outage. - // - // This maintenance window change is made immediately. If the new maintenance - // window indicates the current time, there must be at least 120 minutes between - // the current time and end of the window in order to ensure that pending changes - // are applied. - // - // Default: Uses existing setting. - // - // Format: ddd:hh24:mi-ddd:hh24:mi, for example wed:07:30-wed:08:00. - // - // Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun - // - // Constraints: Must be at least 30 minutes. - PreferredMaintenanceWindow *string `type:"string"` - - // If true, the cluster can be accessed from a public network. Only clusters - // in VPCs can be set to be publicly available. - PubliclyAccessible *bool `type:"boolean"` - - // A list of virtual private cloud (VPC) security groups to be associated with - // the cluster. This change is asynchronously applied as soon as possible. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s ModifyClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyClusterInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowVersionUpgrade sets the AllowVersionUpgrade field's value. -func (s *ModifyClusterInput) SetAllowVersionUpgrade(v bool) *ModifyClusterInput { - s.AllowVersionUpgrade = &v - return s -} - -// SetAutomatedSnapshotRetentionPeriod sets the AutomatedSnapshotRetentionPeriod field's value. -func (s *ModifyClusterInput) SetAutomatedSnapshotRetentionPeriod(v int64) *ModifyClusterInput { - s.AutomatedSnapshotRetentionPeriod = &v - return s -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *ModifyClusterInput) SetClusterIdentifier(v string) *ModifyClusterInput { - s.ClusterIdentifier = &v - return s -} - -// SetClusterParameterGroupName sets the ClusterParameterGroupName field's value. -func (s *ModifyClusterInput) SetClusterParameterGroupName(v string) *ModifyClusterInput { - s.ClusterParameterGroupName = &v - return s -} - -// SetClusterSecurityGroups sets the ClusterSecurityGroups field's value. -func (s *ModifyClusterInput) SetClusterSecurityGroups(v []*string) *ModifyClusterInput { - s.ClusterSecurityGroups = v - return s -} - -// SetClusterType sets the ClusterType field's value. -func (s *ModifyClusterInput) SetClusterType(v string) *ModifyClusterInput { - s.ClusterType = &v - return s -} - -// SetClusterVersion sets the ClusterVersion field's value. -func (s *ModifyClusterInput) SetClusterVersion(v string) *ModifyClusterInput { - s.ClusterVersion = &v - return s -} - -// SetElasticIp sets the ElasticIp field's value. -func (s *ModifyClusterInput) SetElasticIp(v string) *ModifyClusterInput { - s.ElasticIp = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *ModifyClusterInput) SetEncrypted(v bool) *ModifyClusterInput { - s.Encrypted = &v - return s -} - -// SetEnhancedVpcRouting sets the EnhancedVpcRouting field's value. -func (s *ModifyClusterInput) SetEnhancedVpcRouting(v bool) *ModifyClusterInput { - s.EnhancedVpcRouting = &v - return s -} - -// SetHsmClientCertificateIdentifier sets the HsmClientCertificateIdentifier field's value. -func (s *ModifyClusterInput) SetHsmClientCertificateIdentifier(v string) *ModifyClusterInput { - s.HsmClientCertificateIdentifier = &v - return s -} - -// SetHsmConfigurationIdentifier sets the HsmConfigurationIdentifier field's value. -func (s *ModifyClusterInput) SetHsmConfigurationIdentifier(v string) *ModifyClusterInput { - s.HsmConfigurationIdentifier = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *ModifyClusterInput) SetKmsKeyId(v string) *ModifyClusterInput { - s.KmsKeyId = &v - return s -} - -// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. -func (s *ModifyClusterInput) SetMaintenanceTrackName(v string) *ModifyClusterInput { - s.MaintenanceTrackName = &v - return s -} - -// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. -func (s *ModifyClusterInput) SetManualSnapshotRetentionPeriod(v int64) *ModifyClusterInput { - s.ManualSnapshotRetentionPeriod = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *ModifyClusterInput) SetMasterUserPassword(v string) *ModifyClusterInput { - s.MasterUserPassword = &v - return s -} - -// SetNewClusterIdentifier sets the NewClusterIdentifier field's value. -func (s *ModifyClusterInput) SetNewClusterIdentifier(v string) *ModifyClusterInput { - s.NewClusterIdentifier = &v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *ModifyClusterInput) SetNodeType(v string) *ModifyClusterInput { - s.NodeType = &v - return s -} - -// SetNumberOfNodes sets the NumberOfNodes field's value. -func (s *ModifyClusterInput) SetNumberOfNodes(v int64) *ModifyClusterInput { - s.NumberOfNodes = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *ModifyClusterInput) SetPreferredMaintenanceWindow(v string) *ModifyClusterInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *ModifyClusterInput) SetPubliclyAccessible(v bool) *ModifyClusterInput { - s.PubliclyAccessible = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *ModifyClusterInput) SetVpcSecurityGroupIds(v []*string) *ModifyClusterInput { - s.VpcSecurityGroupIds = v - return s -} - -type ModifyClusterMaintenanceInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the cluster. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // A boolean indicating whether to enable the deferred maintenance window. - DeferMaintenance *bool `type:"boolean"` - - // An integer indicating the duration of the maintenance window in days. If - // you specify a duration, you can't specify an end time. The duration must - // be 14 days or less. - DeferMaintenanceDuration *int64 `type:"integer"` - - // A timestamp indicating end time for the deferred maintenance window. If you - // specify an end time, you can't specify a duration. - DeferMaintenanceEndTime *time.Time `type:"timestamp"` - - // A unique identifier for the deferred maintenance window. - DeferMaintenanceIdentifier *string `type:"string"` - - // A timestamp indicating the start time for the deferred maintenance window. - DeferMaintenanceStartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s ModifyClusterMaintenanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterMaintenanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyClusterMaintenanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyClusterMaintenanceInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *ModifyClusterMaintenanceInput) SetClusterIdentifier(v string) *ModifyClusterMaintenanceInput { - s.ClusterIdentifier = &v - return s -} - -// SetDeferMaintenance sets the DeferMaintenance field's value. -func (s *ModifyClusterMaintenanceInput) SetDeferMaintenance(v bool) *ModifyClusterMaintenanceInput { - s.DeferMaintenance = &v - return s -} - -// SetDeferMaintenanceDuration sets the DeferMaintenanceDuration field's value. -func (s *ModifyClusterMaintenanceInput) SetDeferMaintenanceDuration(v int64) *ModifyClusterMaintenanceInput { - s.DeferMaintenanceDuration = &v - return s -} - -// SetDeferMaintenanceEndTime sets the DeferMaintenanceEndTime field's value. -func (s *ModifyClusterMaintenanceInput) SetDeferMaintenanceEndTime(v time.Time) *ModifyClusterMaintenanceInput { - s.DeferMaintenanceEndTime = &v - return s -} - -// SetDeferMaintenanceIdentifier sets the DeferMaintenanceIdentifier field's value. -func (s *ModifyClusterMaintenanceInput) SetDeferMaintenanceIdentifier(v string) *ModifyClusterMaintenanceInput { - s.DeferMaintenanceIdentifier = &v - return s -} - -// SetDeferMaintenanceStartTime sets the DeferMaintenanceStartTime field's value. -func (s *ModifyClusterMaintenanceInput) SetDeferMaintenanceStartTime(v time.Time) *ModifyClusterMaintenanceInput { - s.DeferMaintenanceStartTime = &v - return s -} - -type ModifyClusterMaintenanceOutput struct { - _ struct{} `type:"structure"` - - // Describes a cluster. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s ModifyClusterMaintenanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterMaintenanceOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *ModifyClusterMaintenanceOutput) SetCluster(v *Cluster) *ModifyClusterMaintenanceOutput { - s.Cluster = v - return s -} - -type ModifyClusterOutput struct { - _ struct{} `type:"structure"` - - // Describes a cluster. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s ModifyClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *ModifyClusterOutput) SetCluster(v *Cluster) *ModifyClusterOutput { - s.Cluster = v - return s -} - -type ModifyClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the parameter group to be modified. - // - // ParameterGroupName is a required field - ParameterGroupName *string `type:"string" required:"true"` - - // An array of parameters to be modified. A maximum of 20 parameters can be - // modified in a single request. - // - // For each parameter to be modified, you must supply at least the parameter - // name and parameter value; other name-value pairs of the parameter are optional. - // - // For the workload management (WLM) configuration, you must supply all the - // name-value pairs in the wlm_json_configuration parameter. - // - // Parameters is a required field - Parameters []*Parameter `locationNameList:"Parameter" type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyClusterParameterGroupInput"} - if s.ParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) - } - if s.Parameters == nil { - invalidParams.Add(request.NewErrParamRequired("Parameters")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *ModifyClusterParameterGroupInput) SetParameterGroupName(v string) *ModifyClusterParameterGroupInput { - s.ParameterGroupName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ModifyClusterParameterGroupInput) SetParameters(v []*Parameter) *ModifyClusterParameterGroupInput { - s.Parameters = v - return s -} - -type ModifyClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // A Boolean option to override an exception if the retention period has already - // passed. - Force *bool `type:"boolean"` - - // The number of days that a manual snapshot is retained. If the value is -1, - // the manual snapshot is retained indefinitely. - // - // If the manual snapshot falls outside of the new retention period, you can - // specify the force option to immediately delete the snapshot. - // - // The value must be either -1 or an integer between 1 and 3,653. - ManualSnapshotRetentionPeriod *int64 `type:"integer"` - - // The identifier of the snapshot whose setting you want to modify. - // - // SnapshotIdentifier is a required field - SnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyClusterSnapshotInput"} - if s.SnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForce sets the Force field's value. -func (s *ModifyClusterSnapshotInput) SetForce(v bool) *ModifyClusterSnapshotInput { - s.Force = &v - return s -} - -// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. -func (s *ModifyClusterSnapshotInput) SetManualSnapshotRetentionPeriod(v int64) *ModifyClusterSnapshotInput { - s.ManualSnapshotRetentionPeriod = &v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *ModifyClusterSnapshotInput) SetSnapshotIdentifier(v string) *ModifyClusterSnapshotInput { - s.SnapshotIdentifier = &v - return s -} - -type ModifyClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Describes a snapshot. - Snapshot *Snapshot `type:"structure"` -} - -// String returns the string representation -func (s ModifyClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetSnapshot sets the Snapshot field's value. -func (s *ModifyClusterSnapshotOutput) SetSnapshot(v *Snapshot) *ModifyClusterSnapshotOutput { - s.Snapshot = v - return s -} - -type ModifyClusterSnapshotScheduleInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the cluster whose snapshot schedule you want to modify. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // A boolean to indicate whether to remove the assoiciation between the cluster - // and the schedule. - DisassociateSchedule *bool `type:"boolean"` - - // A unique alphanumeric identifier for the schedule that you want to associate - // with the cluster. - ScheduleIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s ModifyClusterSnapshotScheduleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterSnapshotScheduleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyClusterSnapshotScheduleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyClusterSnapshotScheduleInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *ModifyClusterSnapshotScheduleInput) SetClusterIdentifier(v string) *ModifyClusterSnapshotScheduleInput { - s.ClusterIdentifier = &v - return s -} - -// SetDisassociateSchedule sets the DisassociateSchedule field's value. -func (s *ModifyClusterSnapshotScheduleInput) SetDisassociateSchedule(v bool) *ModifyClusterSnapshotScheduleInput { - s.DisassociateSchedule = &v - return s -} - -// SetScheduleIdentifier sets the ScheduleIdentifier field's value. -func (s *ModifyClusterSnapshotScheduleInput) SetScheduleIdentifier(v string) *ModifyClusterSnapshotScheduleInput { - s.ScheduleIdentifier = &v - return s -} - -type ModifyClusterSnapshotScheduleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyClusterSnapshotScheduleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterSnapshotScheduleOutput) GoString() string { - return s.String() -} - -type ModifyClusterSubnetGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the subnet group to be modified. - // - // ClusterSubnetGroupName is a required field - ClusterSubnetGroupName *string `type:"string" required:"true"` - - // A text description of the subnet group to be modified. - Description *string `type:"string"` - - // An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a - // single request. - // - // SubnetIds is a required field - SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` -} - -// String returns the string representation -func (s ModifyClusterSubnetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterSubnetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyClusterSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyClusterSubnetGroupInput"} - if s.ClusterSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterSubnetGroupName")) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterSubnetGroupName sets the ClusterSubnetGroupName field's value. -func (s *ModifyClusterSubnetGroupInput) SetClusterSubnetGroupName(v string) *ModifyClusterSubnetGroupInput { - s.ClusterSubnetGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ModifyClusterSubnetGroupInput) SetDescription(v string) *ModifyClusterSubnetGroupInput { - s.Description = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *ModifyClusterSubnetGroupInput) SetSubnetIds(v []*string) *ModifyClusterSubnetGroupInput { - s.SubnetIds = v - return s -} - -type ModifyClusterSubnetGroupOutput struct { - _ struct{} `type:"structure"` - - // Describes a subnet group. - ClusterSubnetGroup *ClusterSubnetGroup `type:"structure"` -} - -// String returns the string representation -func (s ModifyClusterSubnetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClusterSubnetGroupOutput) GoString() string { - return s.String() -} - -// SetClusterSubnetGroup sets the ClusterSubnetGroup field's value. -func (s *ModifyClusterSubnetGroupOutput) SetClusterSubnetGroup(v *ClusterSubnetGroup) *ModifyClusterSubnetGroupOutput { - s.ClusterSubnetGroup = v - return s -} - -type ModifyEventSubscriptionInput struct { - _ struct{} `type:"structure"` - - // A Boolean value indicating if the subscription is enabled. true indicates - // the subscription is enabled - Enabled *bool `type:"boolean"` - - // Specifies the Amazon Redshift event categories to be published by the event - // notification subscription. - // - // Values: configuration, management, monitoring, security - EventCategories []*string `locationNameList:"EventCategory" type:"list"` - - // Specifies the Amazon Redshift event severity to be published by the event - // notification subscription. - // - // Values: ERROR, INFO - Severity *string `type:"string"` - - // The Amazon Resource Name (ARN) of the SNS topic to be used by the event notification - // subscription. - SnsTopicArn *string `type:"string"` - - // A list of one or more identifiers of Amazon Redshift source objects. All - // of the objects must be of the same type as was specified in the source type - // parameter. The event subscription will return only events generated by the - // specified objects. If not specified, then events are returned for all objects - // within the source type specified. - // - // Example: my-cluster-1, my-cluster-2 - // - // Example: my-snapshot-20131010 - SourceIds []*string `locationNameList:"SourceId" type:"list"` - - // The type of source that will be generating the events. For example, if you - // want to be notified of events generated by a cluster, you would set this - // parameter to cluster. If this value is not specified, events are returned - // for all Amazon Redshift objects in your AWS account. You must specify a source - // type in order to specify source IDs. - // - // Valid values: cluster, cluster-parameter-group, cluster-security-group, and - // cluster-snapshot. - SourceType *string `type:"string"` - - // The name of the modified Amazon Redshift event notification subscription. - // - // SubscriptionName is a required field - SubscriptionName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyEventSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyEventSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyEventSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyEventSubscriptionInput"} - if s.SubscriptionName == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *ModifyEventSubscriptionInput) SetEnabled(v bool) *ModifyEventSubscriptionInput { - s.Enabled = &v - return s -} - -// SetEventCategories sets the EventCategories field's value. -func (s *ModifyEventSubscriptionInput) SetEventCategories(v []*string) *ModifyEventSubscriptionInput { - s.EventCategories = v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *ModifyEventSubscriptionInput) SetSeverity(v string) *ModifyEventSubscriptionInput { - s.Severity = &v - return s -} - -// SetSnsTopicArn sets the SnsTopicArn field's value. -func (s *ModifyEventSubscriptionInput) SetSnsTopicArn(v string) *ModifyEventSubscriptionInput { - s.SnsTopicArn = &v - return s -} - -// SetSourceIds sets the SourceIds field's value. -func (s *ModifyEventSubscriptionInput) SetSourceIds(v []*string) *ModifyEventSubscriptionInput { - s.SourceIds = v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *ModifyEventSubscriptionInput) SetSourceType(v string) *ModifyEventSubscriptionInput { - s.SourceType = &v - return s -} - -// SetSubscriptionName sets the SubscriptionName field's value. -func (s *ModifyEventSubscriptionInput) SetSubscriptionName(v string) *ModifyEventSubscriptionInput { - s.SubscriptionName = &v - return s -} - -type ModifyEventSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // Describes event subscriptions. - EventSubscription *EventSubscription `type:"structure"` -} - -// String returns the string representation -func (s ModifyEventSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyEventSubscriptionOutput) GoString() string { - return s.String() -} - -// SetEventSubscription sets the EventSubscription field's value. -func (s *ModifyEventSubscriptionOutput) SetEventSubscription(v *EventSubscription) *ModifyEventSubscriptionOutput { - s.EventSubscription = v - return s -} - -type ModifySnapshotCopyRetentionPeriodInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the cluster for which you want to change the retention - // period for either automated or manual snapshots that are copied to a destination - // AWS Region. - // - // Constraints: Must be the valid name of an existing cluster that has cross-region - // snapshot copy enabled. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // Indicates whether to apply the snapshot retention period to newly copied - // manual snapshots instead of automated snapshots. - Manual *bool `type:"boolean"` - - // The number of days to retain automated snapshots in the destination AWS Region - // after they are copied from the source AWS Region. - // - // By default, this only changes the retention period of copied automated snapshots. - // - // If you decrease the retention period for automated snapshots that are copied - // to a destination AWS Region, Amazon Redshift deletes any existing automated - // snapshots that were copied to the destination AWS Region and that fall outside - // of the new retention period. - // - // Constraints: Must be at least 1 and no more than 35 for automated snapshots. - // - // If you specify the manual option, only newly copied manual snapshots will - // have the new retention period. - // - // If you specify the value of -1 newly copied manual snapshots are retained - // indefinitely. - // - // Constraints: The number of days must be either -1 or an integer between 1 - // and 3,653 for manual snapshots. - // - // RetentionPeriod is a required field - RetentionPeriod *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s ModifySnapshotCopyRetentionPeriodInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifySnapshotCopyRetentionPeriodInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifySnapshotCopyRetentionPeriodInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifySnapshotCopyRetentionPeriodInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - if s.RetentionPeriod == nil { - invalidParams.Add(request.NewErrParamRequired("RetentionPeriod")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *ModifySnapshotCopyRetentionPeriodInput) SetClusterIdentifier(v string) *ModifySnapshotCopyRetentionPeriodInput { - s.ClusterIdentifier = &v - return s -} - -// SetManual sets the Manual field's value. -func (s *ModifySnapshotCopyRetentionPeriodInput) SetManual(v bool) *ModifySnapshotCopyRetentionPeriodInput { - s.Manual = &v - return s -} - -// SetRetentionPeriod sets the RetentionPeriod field's value. -func (s *ModifySnapshotCopyRetentionPeriodInput) SetRetentionPeriod(v int64) *ModifySnapshotCopyRetentionPeriodInput { - s.RetentionPeriod = &v - return s -} - -type ModifySnapshotCopyRetentionPeriodOutput struct { - _ struct{} `type:"structure"` - - // Describes a cluster. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s ModifySnapshotCopyRetentionPeriodOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifySnapshotCopyRetentionPeriodOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *ModifySnapshotCopyRetentionPeriodOutput) SetCluster(v *Cluster) *ModifySnapshotCopyRetentionPeriodOutput { - s.Cluster = v - return s -} - -type ModifySnapshotScheduleInput struct { - _ struct{} `type:"structure"` - - // An updated list of schedule definitions. A schedule definition is made up - // of schedule expressions, for example, "cron(30 12 *)" or "rate(12 hours)". - // - // ScheduleDefinitions is a required field - ScheduleDefinitions []*string `locationNameList:"ScheduleDefinition" type:"list" required:"true"` - - // A unique alphanumeric identifier of the schedule to modify. - // - // ScheduleIdentifier is a required field - ScheduleIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifySnapshotScheduleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifySnapshotScheduleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifySnapshotScheduleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifySnapshotScheduleInput"} - if s.ScheduleDefinitions == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduleDefinitions")) - } - if s.ScheduleIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduleIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetScheduleDefinitions sets the ScheduleDefinitions field's value. -func (s *ModifySnapshotScheduleInput) SetScheduleDefinitions(v []*string) *ModifySnapshotScheduleInput { - s.ScheduleDefinitions = v - return s -} - -// SetScheduleIdentifier sets the ScheduleIdentifier field's value. -func (s *ModifySnapshotScheduleInput) SetScheduleIdentifier(v string) *ModifySnapshotScheduleInput { - s.ScheduleIdentifier = &v - return s -} - -// Describes a snapshot schedule. You can set a regular interval for creating -// snapshots of a cluster. You can also schedule snapshots for specific dates. -type ModifySnapshotScheduleOutput struct { - _ struct{} `type:"structure"` - - AssociatedClusterCount *int64 `type:"integer"` - - AssociatedClusters []*ClusterAssociatedToSchedule `locationNameList:"ClusterAssociatedToSchedule" type:"list"` - - NextInvocations []*time.Time `locationNameList:"SnapshotTime" type:"list"` - - // A list of ScheduleDefinitions - ScheduleDefinitions []*string `locationNameList:"ScheduleDefinition" type:"list"` - - // The description of the schedule. - ScheduleDescription *string `type:"string"` - - // A unique identifier for the schedule. - ScheduleIdentifier *string `type:"string"` - - // An optional set of tags describing the schedule. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s ModifySnapshotScheduleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifySnapshotScheduleOutput) GoString() string { - return s.String() -} - -// SetAssociatedClusterCount sets the AssociatedClusterCount field's value. -func (s *ModifySnapshotScheduleOutput) SetAssociatedClusterCount(v int64) *ModifySnapshotScheduleOutput { - s.AssociatedClusterCount = &v - return s -} - -// SetAssociatedClusters sets the AssociatedClusters field's value. -func (s *ModifySnapshotScheduleOutput) SetAssociatedClusters(v []*ClusterAssociatedToSchedule) *ModifySnapshotScheduleOutput { - s.AssociatedClusters = v - return s -} - -// SetNextInvocations sets the NextInvocations field's value. -func (s *ModifySnapshotScheduleOutput) SetNextInvocations(v []*time.Time) *ModifySnapshotScheduleOutput { - s.NextInvocations = v - return s -} - -// SetScheduleDefinitions sets the ScheduleDefinitions field's value. -func (s *ModifySnapshotScheduleOutput) SetScheduleDefinitions(v []*string) *ModifySnapshotScheduleOutput { - s.ScheduleDefinitions = v - return s -} - -// SetScheduleDescription sets the ScheduleDescription field's value. -func (s *ModifySnapshotScheduleOutput) SetScheduleDescription(v string) *ModifySnapshotScheduleOutput { - s.ScheduleDescription = &v - return s -} - -// SetScheduleIdentifier sets the ScheduleIdentifier field's value. -func (s *ModifySnapshotScheduleOutput) SetScheduleIdentifier(v string) *ModifySnapshotScheduleOutput { - s.ScheduleIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ModifySnapshotScheduleOutput) SetTags(v []*Tag) *ModifySnapshotScheduleOutput { - s.Tags = v - return s -} - -// Describes an orderable cluster option. -type OrderableClusterOption struct { - _ struct{} `type:"structure"` - - // A list of availability zones for the orderable cluster. - AvailabilityZones []*AvailabilityZone `locationNameList:"AvailabilityZone" type:"list"` - - // The cluster type, for example multi-node. - ClusterType *string `type:"string"` - - // The version of the orderable cluster. - ClusterVersion *string `type:"string"` - - // The node type for the orderable cluster. - NodeType *string `type:"string"` -} - -// String returns the string representation -func (s OrderableClusterOption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OrderableClusterOption) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *OrderableClusterOption) SetAvailabilityZones(v []*AvailabilityZone) *OrderableClusterOption { - s.AvailabilityZones = v - return s -} - -// SetClusterType sets the ClusterType field's value. -func (s *OrderableClusterOption) SetClusterType(v string) *OrderableClusterOption { - s.ClusterType = &v - return s -} - -// SetClusterVersion sets the ClusterVersion field's value. -func (s *OrderableClusterOption) SetClusterVersion(v string) *OrderableClusterOption { - s.ClusterVersion = &v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *OrderableClusterOption) SetNodeType(v string) *OrderableClusterOption { - s.NodeType = &v - return s -} - -// Describes a parameter in a cluster parameter group. -type Parameter struct { - _ struct{} `type:"structure"` - - // The valid range of values for the parameter. - AllowedValues *string `type:"string"` - - // Specifies how to apply the WLM configuration parameter. Some properties can - // be applied dynamically, while other properties require that any associated - // clusters be rebooted for the configuration changes to be applied. For more - // information about parameters and parameter groups, go to Amazon Redshift - // Parameter Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) - // in the Amazon Redshift Cluster Management Guide. - ApplyType *string `type:"string" enum:"ParameterApplyType"` - - // The data type of the parameter. - DataType *string `type:"string"` - - // A description of the parameter. - Description *string `type:"string"` - - // If true, the parameter can be modified. Some parameters have security or - // operational implications that prevent them from being changed. - IsModifiable *bool `type:"boolean"` - - // The earliest engine version to which the parameter can apply. - MinimumEngineVersion *string `type:"string"` - - // The name of the parameter. - ParameterName *string `type:"string"` - - // The value of the parameter. - ParameterValue *string `type:"string"` - - // The source of the parameter value, such as "engine-default" or "user". - Source *string `type:"string"` -} - -// String returns the string representation -func (s Parameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Parameter) GoString() string { - return s.String() -} - -// SetAllowedValues sets the AllowedValues field's value. -func (s *Parameter) SetAllowedValues(v string) *Parameter { - s.AllowedValues = &v - return s -} - -// SetApplyType sets the ApplyType field's value. -func (s *Parameter) SetApplyType(v string) *Parameter { - s.ApplyType = &v - return s -} - -// SetDataType sets the DataType field's value. -func (s *Parameter) SetDataType(v string) *Parameter { - s.DataType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Parameter) SetDescription(v string) *Parameter { - s.Description = &v - return s -} - -// SetIsModifiable sets the IsModifiable field's value. -func (s *Parameter) SetIsModifiable(v bool) *Parameter { - s.IsModifiable = &v - return s -} - -// SetMinimumEngineVersion sets the MinimumEngineVersion field's value. -func (s *Parameter) SetMinimumEngineVersion(v string) *Parameter { - s.MinimumEngineVersion = &v - return s -} - -// SetParameterName sets the ParameterName field's value. -func (s *Parameter) SetParameterName(v string) *Parameter { - s.ParameterName = &v - return s -} - -// SetParameterValue sets the ParameterValue field's value. -func (s *Parameter) SetParameterValue(v string) *Parameter { - s.ParameterValue = &v - return s -} - -// SetSource sets the Source field's value. -func (s *Parameter) SetSource(v string) *Parameter { - s.Source = &v - return s -} - -// Describes cluster attributes that are in a pending state. A change to one -// or more the attributes was requested and is in progress or will be applied. -type PendingModifiedValues struct { - _ struct{} `type:"structure"` - - // The pending or in-progress change of the automated snapshot retention period. - AutomatedSnapshotRetentionPeriod *int64 `type:"integer"` - - // The pending or in-progress change of the new identifier for the cluster. - ClusterIdentifier *string `type:"string"` - - // The pending or in-progress change of the cluster type. - ClusterType *string `type:"string"` - - // The pending or in-progress change of the service version. - ClusterVersion *string `type:"string"` - - // The encryption type for a cluster. Possible values are: KMS and None. For - // the China region the possible values are None, and Legacy. - EncryptionType *string `type:"string"` - - // An option that specifies whether to create the cluster with enhanced VPC - // routing enabled. To create a cluster that uses enhanced VPC routing, the - // cluster must be in a VPC. For more information, see Enhanced VPC Routing - // (http://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html) - // in the Amazon Redshift Cluster Management Guide. - // - // If this option is true, enhanced VPC routing is enabled. - // - // Default: false - EnhancedVpcRouting *bool `type:"boolean"` - - // The name of the maintenance track that the cluster will change to during - // the next maintenance window. - MaintenanceTrackName *string `type:"string"` - - // The pending or in-progress change of the master user password for the cluster. - MasterUserPassword *string `type:"string"` - - // The pending or in-progress change of the cluster's node type. - NodeType *string `type:"string"` - - // The pending or in-progress change of the number of nodes in the cluster. - NumberOfNodes *int64 `type:"integer"` - - // The pending or in-progress change of the ability to connect to the cluster - // from the public network. - PubliclyAccessible *bool `type:"boolean"` -} - -// String returns the string representation -func (s PendingModifiedValues) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingModifiedValues) GoString() string { - return s.String() -} - -// SetAutomatedSnapshotRetentionPeriod sets the AutomatedSnapshotRetentionPeriod field's value. -func (s *PendingModifiedValues) SetAutomatedSnapshotRetentionPeriod(v int64) *PendingModifiedValues { - s.AutomatedSnapshotRetentionPeriod = &v - return s -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *PendingModifiedValues) SetClusterIdentifier(v string) *PendingModifiedValues { - s.ClusterIdentifier = &v - return s -} - -// SetClusterType sets the ClusterType field's value. -func (s *PendingModifiedValues) SetClusterType(v string) *PendingModifiedValues { - s.ClusterType = &v - return s -} - -// SetClusterVersion sets the ClusterVersion field's value. -func (s *PendingModifiedValues) SetClusterVersion(v string) *PendingModifiedValues { - s.ClusterVersion = &v - return s -} - -// SetEncryptionType sets the EncryptionType field's value. -func (s *PendingModifiedValues) SetEncryptionType(v string) *PendingModifiedValues { - s.EncryptionType = &v - return s -} - -// SetEnhancedVpcRouting sets the EnhancedVpcRouting field's value. -func (s *PendingModifiedValues) SetEnhancedVpcRouting(v bool) *PendingModifiedValues { - s.EnhancedVpcRouting = &v - return s -} - -// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. -func (s *PendingModifiedValues) SetMaintenanceTrackName(v string) *PendingModifiedValues { - s.MaintenanceTrackName = &v - return s -} - -// SetMasterUserPassword sets the MasterUserPassword field's value. -func (s *PendingModifiedValues) SetMasterUserPassword(v string) *PendingModifiedValues { - s.MasterUserPassword = &v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *PendingModifiedValues) SetNodeType(v string) *PendingModifiedValues { - s.NodeType = &v - return s -} - -// SetNumberOfNodes sets the NumberOfNodes field's value. -func (s *PendingModifiedValues) SetNumberOfNodes(v int64) *PendingModifiedValues { - s.NumberOfNodes = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *PendingModifiedValues) SetPubliclyAccessible(v bool) *PendingModifiedValues { - s.PubliclyAccessible = &v - return s -} - -type PurchaseReservedNodeOfferingInput struct { - _ struct{} `type:"structure"` - - // The number of reserved nodes that you want to purchase. - // - // Default: 1 - NodeCount *int64 `type:"integer"` - - // The unique identifier of the reserved node offering you want to purchase. - // - // ReservedNodeOfferingId is a required field - ReservedNodeOfferingId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PurchaseReservedNodeOfferingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseReservedNodeOfferingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseReservedNodeOfferingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseReservedNodeOfferingInput"} - if s.ReservedNodeOfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedNodeOfferingId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNodeCount sets the NodeCount field's value. -func (s *PurchaseReservedNodeOfferingInput) SetNodeCount(v int64) *PurchaseReservedNodeOfferingInput { - s.NodeCount = &v - return s -} - -// SetReservedNodeOfferingId sets the ReservedNodeOfferingId field's value. -func (s *PurchaseReservedNodeOfferingInput) SetReservedNodeOfferingId(v string) *PurchaseReservedNodeOfferingInput { - s.ReservedNodeOfferingId = &v - return s -} - -type PurchaseReservedNodeOfferingOutput struct { - _ struct{} `type:"structure"` - - // Describes a reserved node. You can call the DescribeReservedNodeOfferings - // API to obtain the available reserved node offerings. - ReservedNode *ReservedNode `type:"structure"` -} - -// String returns the string representation -func (s PurchaseReservedNodeOfferingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurchaseReservedNodeOfferingOutput) GoString() string { - return s.String() -} - -// SetReservedNode sets the ReservedNode field's value. -func (s *PurchaseReservedNodeOfferingOutput) SetReservedNode(v *ReservedNode) *PurchaseReservedNodeOfferingOutput { - s.ReservedNode = v - return s -} - -type RebootClusterInput struct { - _ struct{} `type:"structure"` - - // The cluster identifier. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RebootClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootClusterInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *RebootClusterInput) SetClusterIdentifier(v string) *RebootClusterInput { - s.ClusterIdentifier = &v - return s -} - -type RebootClusterOutput struct { - _ struct{} `type:"structure"` - - // Describes a cluster. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s RebootClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *RebootClusterOutput) SetCluster(v *Cluster) *RebootClusterOutput { - s.Cluster = v - return s -} - -// Describes a recurring charge. -type RecurringCharge struct { - _ struct{} `type:"structure"` - - // The amount charged per the period of time specified by the recurring charge - // frequency. - RecurringChargeAmount *float64 `type:"double"` - - // The frequency at which the recurring charge amount is applied. - RecurringChargeFrequency *string `type:"string"` -} - -// String returns the string representation -func (s RecurringCharge) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecurringCharge) GoString() string { - return s.String() -} - -// SetRecurringChargeAmount sets the RecurringChargeAmount field's value. -func (s *RecurringCharge) SetRecurringChargeAmount(v float64) *RecurringCharge { - s.RecurringChargeAmount = &v - return s -} - -// SetRecurringChargeFrequency sets the RecurringChargeFrequency field's value. -func (s *RecurringCharge) SetRecurringChargeFrequency(v string) *RecurringCharge { - s.RecurringChargeFrequency = &v - return s -} - -// Describes a reserved node. You can call the DescribeReservedNodeOfferings -// API to obtain the available reserved node offerings. -type ReservedNode struct { - _ struct{} `type:"structure"` - - // The currency code for the reserved cluster. - CurrencyCode *string `type:"string"` - - // The duration of the node reservation in seconds. - Duration *int64 `type:"integer"` - - // The fixed cost Amazon Redshift charges you for this reserved node. - FixedPrice *float64 `type:"double"` - - // The number of reserved compute nodes. - NodeCount *int64 `type:"integer"` - - // The node type of the reserved node. - NodeType *string `type:"string"` - - // The anticipated utilization of the reserved node, as defined in the reserved - // node offering. - OfferingType *string `type:"string"` - - // The recurring charges for the reserved node. - RecurringCharges []*RecurringCharge `locationNameList:"RecurringCharge" type:"list"` - - // The unique identifier for the reservation. - ReservedNodeId *string `type:"string"` - - // The identifier for the reserved node offering. - ReservedNodeOfferingId *string `type:"string"` - - ReservedNodeOfferingType *string `type:"string" enum:"ReservedNodeOfferingType"` - - // The time the reservation started. You purchase a reserved node offering for - // a duration. This is the start time of that duration. - StartTime *time.Time `type:"timestamp"` - - // The state of the reserved compute node. - // - // Possible Values: - // - // * pending-payment-This reserved node has recently been purchased, and - // the sale has been approved, but payment has not yet been confirmed. - // - // * active-This reserved node is owned by the caller and is available for - // use. - // - // * payment-failed-Payment failed for the purchase attempt. - // - // * retired-The reserved node is no longer available. - // - // * exchanging-The owner is exchanging the reserved node for another reserved - // node. - State *string `type:"string"` - - // The hourly rate Amazon Redshift charges you for this reserved node. - UsagePrice *float64 `type:"double"` -} - -// String returns the string representation -func (s ReservedNode) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedNode) GoString() string { - return s.String() -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *ReservedNode) SetCurrencyCode(v string) *ReservedNode { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *ReservedNode) SetDuration(v int64) *ReservedNode { - s.Duration = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *ReservedNode) SetFixedPrice(v float64) *ReservedNode { - s.FixedPrice = &v - return s -} - -// SetNodeCount sets the NodeCount field's value. -func (s *ReservedNode) SetNodeCount(v int64) *ReservedNode { - s.NodeCount = &v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *ReservedNode) SetNodeType(v string) *ReservedNode { - s.NodeType = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *ReservedNode) SetOfferingType(v string) *ReservedNode { - s.OfferingType = &v - return s -} - -// SetRecurringCharges sets the RecurringCharges field's value. -func (s *ReservedNode) SetRecurringCharges(v []*RecurringCharge) *ReservedNode { - s.RecurringCharges = v - return s -} - -// SetReservedNodeId sets the ReservedNodeId field's value. -func (s *ReservedNode) SetReservedNodeId(v string) *ReservedNode { - s.ReservedNodeId = &v - return s -} - -// SetReservedNodeOfferingId sets the ReservedNodeOfferingId field's value. -func (s *ReservedNode) SetReservedNodeOfferingId(v string) *ReservedNode { - s.ReservedNodeOfferingId = &v - return s -} - -// SetReservedNodeOfferingType sets the ReservedNodeOfferingType field's value. -func (s *ReservedNode) SetReservedNodeOfferingType(v string) *ReservedNode { - s.ReservedNodeOfferingType = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *ReservedNode) SetStartTime(v time.Time) *ReservedNode { - s.StartTime = &v - return s -} - -// SetState sets the State field's value. -func (s *ReservedNode) SetState(v string) *ReservedNode { - s.State = &v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *ReservedNode) SetUsagePrice(v float64) *ReservedNode { - s.UsagePrice = &v - return s -} - -// Describes a reserved node offering. -type ReservedNodeOffering struct { - _ struct{} `type:"structure"` - - // The currency code for the compute nodes offering. - CurrencyCode *string `type:"string"` - - // The duration, in seconds, for which the offering will reserve the node. - Duration *int64 `type:"integer"` - - // The upfront fixed charge you will pay to purchase the specific reserved node - // offering. - FixedPrice *float64 `type:"double"` - - // The node type offered by the reserved node offering. - NodeType *string `type:"string"` - - // The anticipated utilization of the reserved node, as defined in the reserved - // node offering. - OfferingType *string `type:"string"` - - // The charge to your account regardless of whether you are creating any clusters - // using the node offering. Recurring charges are only in effect for heavy-utilization - // reserved nodes. - RecurringCharges []*RecurringCharge `locationNameList:"RecurringCharge" type:"list"` - - // The offering identifier. - ReservedNodeOfferingId *string `type:"string"` - - ReservedNodeOfferingType *string `type:"string" enum:"ReservedNodeOfferingType"` - - // The rate you are charged for each hour the cluster that is using the offering - // is running. - UsagePrice *float64 `type:"double"` -} - -// String returns the string representation -func (s ReservedNodeOffering) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedNodeOffering) GoString() string { - return s.String() -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *ReservedNodeOffering) SetCurrencyCode(v string) *ReservedNodeOffering { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *ReservedNodeOffering) SetDuration(v int64) *ReservedNodeOffering { - s.Duration = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *ReservedNodeOffering) SetFixedPrice(v float64) *ReservedNodeOffering { - s.FixedPrice = &v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *ReservedNodeOffering) SetNodeType(v string) *ReservedNodeOffering { - s.NodeType = &v - return s -} - -// SetOfferingType sets the OfferingType field's value. -func (s *ReservedNodeOffering) SetOfferingType(v string) *ReservedNodeOffering { - s.OfferingType = &v - return s -} - -// SetRecurringCharges sets the RecurringCharges field's value. -func (s *ReservedNodeOffering) SetRecurringCharges(v []*RecurringCharge) *ReservedNodeOffering { - s.RecurringCharges = v - return s -} - -// SetReservedNodeOfferingId sets the ReservedNodeOfferingId field's value. -func (s *ReservedNodeOffering) SetReservedNodeOfferingId(v string) *ReservedNodeOffering { - s.ReservedNodeOfferingId = &v - return s -} - -// SetReservedNodeOfferingType sets the ReservedNodeOfferingType field's value. -func (s *ReservedNodeOffering) SetReservedNodeOfferingType(v string) *ReservedNodeOffering { - s.ReservedNodeOfferingType = &v - return s -} - -// SetUsagePrice sets the UsagePrice field's value. -func (s *ReservedNodeOffering) SetUsagePrice(v float64) *ReservedNodeOffering { - s.UsagePrice = &v - return s -} - -type ResetClusterParameterGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the cluster parameter group to be reset. - // - // ParameterGroupName is a required field - ParameterGroupName *string `type:"string" required:"true"` - - // An array of names of parameters to be reset. If ResetAllParameters option - // is not used, then at least one parameter name must be supplied. - // - // Constraints: A maximum of 20 parameters can be reset in a single request. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` - - // If true, all parameters in the specified parameter group will be reset to - // their default values. - // - // Default: true - ResetAllParameters *bool `type:"boolean"` -} - -// String returns the string representation -func (s ResetClusterParameterGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetClusterParameterGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetClusterParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetClusterParameterGroupInput"} - if s.ParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParameterGroupName sets the ParameterGroupName field's value. -func (s *ResetClusterParameterGroupInput) SetParameterGroupName(v string) *ResetClusterParameterGroupInput { - s.ParameterGroupName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *ResetClusterParameterGroupInput) SetParameters(v []*Parameter) *ResetClusterParameterGroupInput { - s.Parameters = v - return s -} - -// SetResetAllParameters sets the ResetAllParameters field's value. -func (s *ResetClusterParameterGroupInput) SetResetAllParameters(v bool) *ResetClusterParameterGroupInput { - s.ResetAllParameters = &v - return s -} - -type ResizeClusterInput struct { - _ struct{} `type:"structure"` - - // A boolean value indicating whether the resize operation is using the classic - // resize process. If you don't provide this parameter or set the value to false, - // the resize type is elastic. - Classic *bool `type:"boolean"` - - // The unique identifier for the cluster to resize. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // The new cluster type for the specified cluster. - ClusterType *string `type:"string"` - - // The new node type for the nodes you are adding. - NodeType *string `type:"string"` - - // The new number of nodes for the cluster. - // - // NumberOfNodes is a required field - NumberOfNodes *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s ResizeClusterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResizeClusterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResizeClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResizeClusterInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - if s.NumberOfNodes == nil { - invalidParams.Add(request.NewErrParamRequired("NumberOfNodes")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClassic sets the Classic field's value. -func (s *ResizeClusterInput) SetClassic(v bool) *ResizeClusterInput { - s.Classic = &v - return s -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *ResizeClusterInput) SetClusterIdentifier(v string) *ResizeClusterInput { - s.ClusterIdentifier = &v - return s -} - -// SetClusterType sets the ClusterType field's value. -func (s *ResizeClusterInput) SetClusterType(v string) *ResizeClusterInput { - s.ClusterType = &v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *ResizeClusterInput) SetNodeType(v string) *ResizeClusterInput { - s.NodeType = &v - return s -} - -// SetNumberOfNodes sets the NumberOfNodes field's value. -func (s *ResizeClusterInput) SetNumberOfNodes(v int64) *ResizeClusterInput { - s.NumberOfNodes = &v - return s -} - -type ResizeClusterOutput struct { - _ struct{} `type:"structure"` - - // Describes a cluster. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s ResizeClusterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResizeClusterOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *ResizeClusterOutput) SetCluster(v *Cluster) *ResizeClusterOutput { - s.Cluster = v - return s -} - -// Describes a resize operation. -type ResizeInfo struct { - _ struct{} `type:"structure"` - - // A boolean value indicating if the resize operation can be cancelled. - AllowCancelResize *bool `type:"boolean"` - - // Returns the value ClassicResize. - ResizeType *string `type:"string"` -} - -// String returns the string representation -func (s ResizeInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResizeInfo) GoString() string { - return s.String() -} - -// SetAllowCancelResize sets the AllowCancelResize field's value. -func (s *ResizeInfo) SetAllowCancelResize(v bool) *ResizeInfo { - s.AllowCancelResize = &v - return s -} - -// SetResizeType sets the ResizeType field's value. -func (s *ResizeInfo) SetResizeType(v string) *ResizeInfo { - s.ResizeType = &v - return s -} - -type RestoreFromClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // Reserved. - AdditionalInfo *string `type:"string"` - - // If true, major version upgrades can be applied during the maintenance window - // to the Amazon Redshift engine that is running on the cluster. - // - // Default: true - AllowVersionUpgrade *bool `type:"boolean"` - - // The number of days that automated snapshots are retained. If the value is - // 0, automated snapshots are disabled. Even if automated snapshots are disabled, - // you can still create manual snapshots when you want with CreateClusterSnapshot. - // - // Default: The value selected for the cluster from which the snapshot was taken. - // - // Constraints: Must be a value from 0 to 35. - AutomatedSnapshotRetentionPeriod *int64 `type:"integer"` - - // The Amazon EC2 Availability Zone in which to restore the cluster. - // - // Default: A random, system-chosen Availability Zone. - // - // Example: us-east-1a - AvailabilityZone *string `type:"string"` - - // The identifier of the cluster that will be created from restoring the snapshot. - // - // Constraints: - // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. - // - // * Alphabetic characters must be lowercase. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // * Must be unique for all clusters within an AWS account. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // The name of the parameter group to be associated with this cluster. - // - // Default: The default Amazon Redshift cluster parameter group. For information - // about the default parameter group, go to Working with Amazon Redshift Parameter - // Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html). - // - // Constraints: - // - // * Must be 1 to 255 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - ClusterParameterGroupName *string `type:"string"` - - // A list of security groups to be associated with this cluster. - // - // Default: The default cluster security group for Amazon Redshift. - // - // Cluster security groups only apply to clusters outside of VPCs. - ClusterSecurityGroups []*string `locationNameList:"ClusterSecurityGroupName" type:"list"` - - // The name of the subnet group where you want to cluster restored. - // - // A snapshot of cluster in VPC can be restored only in VPC. Therefore, you - // must provide subnet group name where you want the cluster restored. - ClusterSubnetGroupName *string `type:"string"` - - // The elastic IP (EIP) address for the cluster. - ElasticIp *string `type:"string"` - - // An option that specifies whether to create the cluster with enhanced VPC - // routing enabled. To create a cluster that uses enhanced VPC routing, the - // cluster must be in a VPC. For more information, see Enhanced VPC Routing - // (http://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html) - // in the Amazon Redshift Cluster Management Guide. - // - // If this option is true, enhanced VPC routing is enabled. - // - // Default: false - EnhancedVpcRouting *bool `type:"boolean"` - - // Specifies the name of the HSM client certificate the Amazon Redshift cluster - // uses to retrieve the data encryption keys stored in an HSM. - HsmClientCertificateIdentifier *string `type:"string"` - - // Specifies the name of the HSM configuration that contains the information - // the Amazon Redshift cluster can use to retrieve and store keys in an HSM. - HsmConfigurationIdentifier *string `type:"string"` - - // A list of AWS Identity and Access Management (IAM) roles that can be used - // by the cluster to access other AWS services. You must supply the IAM roles - // in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles - // in a single request. - // - // A cluster can have up to 10 IAM roles associated at any time. - IamRoles []*string `locationNameList:"IamRoleArn" type:"list"` - - // The AWS Key Management Service (KMS) key ID of the encryption key that you - // want to use to encrypt data in the cluster that you restore from a shared - // snapshot. - KmsKeyId *string `type:"string"` - - // The name of the maintenance track for the restored cluster. When you take - // a snapshot, the snapshot inherits the MaintenanceTrack value from the cluster. - // The snapshot might be on a different track than the cluster that was the - // source for the snapshot. For example, suppose that you take a snapshot of - // a cluster that is on the current track and then change the cluster to be - // on the trailing track. In this case, the snapshot and the source cluster - // are on different tracks. - MaintenanceTrackName *string `type:"string"` - - ManualSnapshotRetentionPeriod *int64 `type:"integer"` - - // The node type that the restored cluster will be provisioned with. - // - // Default: The node type of the cluster from which the snapshot was taken. - // You can modify this if you are using any DS node type. In that case, you - // can choose to restore into another DS node type of the same size. For example, - // you can restore ds1.8xlarge into ds2.8xlarge, or ds1.xlarge into ds2.xlarge. - // If you have a DC instance type, you must restore into that same instance - // type and size. In other words, you can only restore a dc1.large instance - // type into another dc1.large instance type or dc2.large instance type. You - // can't restore dc1.8xlarge to dc2.8xlarge. First restore to a dc1.8xlareg - // cluster, then resize to a dc2.8large cluster. For more information about - // node types, see About Clusters and Nodes (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-about-clusters-and-nodes) - // in the Amazon Redshift Cluster Management Guide. - NodeType *string `type:"string"` - - // The AWS customer account used to create or copy the snapshot. Required if - // you are restoring a snapshot you do not own, optional if you own the snapshot. - OwnerAccount *string `type:"string"` - - // The port number on which the cluster accepts connections. - // - // Default: The same port as the original cluster. - // - // Constraints: Must be between 1115 and 65535. - Port *int64 `type:"integer"` - - // The weekly time range (in UTC) during which automated cluster maintenance - // can occur. - // - // Format: ddd:hh24:mi-ddd:hh24:mi - // - // Default: The value selected for the cluster from which the snapshot was taken. - // For more information about the time blocks for each region, see Maintenance - // Windows (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-maintenance-windows) - // in Amazon Redshift Cluster Management Guide. - // - // Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun - // - // Constraints: Minimum 30-minute window. - PreferredMaintenanceWindow *string `type:"string"` - - // If true, the cluster can be accessed from a public network. - PubliclyAccessible *bool `type:"boolean"` - - // The name of the cluster the source snapshot was created from. This parameter - // is required if your IAM user has a policy containing a snapshot resource - // element that specifies anything other than * for the cluster name. - SnapshotClusterIdentifier *string `type:"string"` - - // The name of the snapshot from which to create the new cluster. This parameter - // isn't case sensitive. - // - // Example: my-snapshot-id - // - // SnapshotIdentifier is a required field - SnapshotIdentifier *string `type:"string" required:"true"` - - // A unique identifier for the snapshot schedule. - SnapshotScheduleIdentifier *string `type:"string"` - - // A list of Virtual Private Cloud (VPC) security groups to be associated with - // the cluster. - // - // Default: The default VPC security group is associated with the cluster. - // - // VPC security groups only apply to clusters in VPCs. - VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` -} - -// String returns the string representation -func (s RestoreFromClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreFromClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreFromClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreFromClusterSnapshotInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - if s.SnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdditionalInfo sets the AdditionalInfo field's value. -func (s *RestoreFromClusterSnapshotInput) SetAdditionalInfo(v string) *RestoreFromClusterSnapshotInput { - s.AdditionalInfo = &v - return s -} - -// SetAllowVersionUpgrade sets the AllowVersionUpgrade field's value. -func (s *RestoreFromClusterSnapshotInput) SetAllowVersionUpgrade(v bool) *RestoreFromClusterSnapshotInput { - s.AllowVersionUpgrade = &v - return s -} - -// SetAutomatedSnapshotRetentionPeriod sets the AutomatedSnapshotRetentionPeriod field's value. -func (s *RestoreFromClusterSnapshotInput) SetAutomatedSnapshotRetentionPeriod(v int64) *RestoreFromClusterSnapshotInput { - s.AutomatedSnapshotRetentionPeriod = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *RestoreFromClusterSnapshotInput) SetAvailabilityZone(v string) *RestoreFromClusterSnapshotInput { - s.AvailabilityZone = &v - return s -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *RestoreFromClusterSnapshotInput) SetClusterIdentifier(v string) *RestoreFromClusterSnapshotInput { - s.ClusterIdentifier = &v - return s -} - -// SetClusterParameterGroupName sets the ClusterParameterGroupName field's value. -func (s *RestoreFromClusterSnapshotInput) SetClusterParameterGroupName(v string) *RestoreFromClusterSnapshotInput { - s.ClusterParameterGroupName = &v - return s -} - -// SetClusterSecurityGroups sets the ClusterSecurityGroups field's value. -func (s *RestoreFromClusterSnapshotInput) SetClusterSecurityGroups(v []*string) *RestoreFromClusterSnapshotInput { - s.ClusterSecurityGroups = v - return s -} - -// SetClusterSubnetGroupName sets the ClusterSubnetGroupName field's value. -func (s *RestoreFromClusterSnapshotInput) SetClusterSubnetGroupName(v string) *RestoreFromClusterSnapshotInput { - s.ClusterSubnetGroupName = &v - return s -} - -// SetElasticIp sets the ElasticIp field's value. -func (s *RestoreFromClusterSnapshotInput) SetElasticIp(v string) *RestoreFromClusterSnapshotInput { - s.ElasticIp = &v - return s -} - -// SetEnhancedVpcRouting sets the EnhancedVpcRouting field's value. -func (s *RestoreFromClusterSnapshotInput) SetEnhancedVpcRouting(v bool) *RestoreFromClusterSnapshotInput { - s.EnhancedVpcRouting = &v - return s -} - -// SetHsmClientCertificateIdentifier sets the HsmClientCertificateIdentifier field's value. -func (s *RestoreFromClusterSnapshotInput) SetHsmClientCertificateIdentifier(v string) *RestoreFromClusterSnapshotInput { - s.HsmClientCertificateIdentifier = &v - return s -} - -// SetHsmConfigurationIdentifier sets the HsmConfigurationIdentifier field's value. -func (s *RestoreFromClusterSnapshotInput) SetHsmConfigurationIdentifier(v string) *RestoreFromClusterSnapshotInput { - s.HsmConfigurationIdentifier = &v - return s -} - -// SetIamRoles sets the IamRoles field's value. -func (s *RestoreFromClusterSnapshotInput) SetIamRoles(v []*string) *RestoreFromClusterSnapshotInput { - s.IamRoles = v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *RestoreFromClusterSnapshotInput) SetKmsKeyId(v string) *RestoreFromClusterSnapshotInput { - s.KmsKeyId = &v - return s -} - -// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. -func (s *RestoreFromClusterSnapshotInput) SetMaintenanceTrackName(v string) *RestoreFromClusterSnapshotInput { - s.MaintenanceTrackName = &v - return s -} - -// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. -func (s *RestoreFromClusterSnapshotInput) SetManualSnapshotRetentionPeriod(v int64) *RestoreFromClusterSnapshotInput { - s.ManualSnapshotRetentionPeriod = &v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *RestoreFromClusterSnapshotInput) SetNodeType(v string) *RestoreFromClusterSnapshotInput { - s.NodeType = &v - return s -} - -// SetOwnerAccount sets the OwnerAccount field's value. -func (s *RestoreFromClusterSnapshotInput) SetOwnerAccount(v string) *RestoreFromClusterSnapshotInput { - s.OwnerAccount = &v - return s -} - -// SetPort sets the Port field's value. -func (s *RestoreFromClusterSnapshotInput) SetPort(v int64) *RestoreFromClusterSnapshotInput { - s.Port = &v - return s -} - -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *RestoreFromClusterSnapshotInput) SetPreferredMaintenanceWindow(v string) *RestoreFromClusterSnapshotInput { - s.PreferredMaintenanceWindow = &v - return s -} - -// SetPubliclyAccessible sets the PubliclyAccessible field's value. -func (s *RestoreFromClusterSnapshotInput) SetPubliclyAccessible(v bool) *RestoreFromClusterSnapshotInput { - s.PubliclyAccessible = &v - return s -} - -// SetSnapshotClusterIdentifier sets the SnapshotClusterIdentifier field's value. -func (s *RestoreFromClusterSnapshotInput) SetSnapshotClusterIdentifier(v string) *RestoreFromClusterSnapshotInput { - s.SnapshotClusterIdentifier = &v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *RestoreFromClusterSnapshotInput) SetSnapshotIdentifier(v string) *RestoreFromClusterSnapshotInput { - s.SnapshotIdentifier = &v - return s -} - -// SetSnapshotScheduleIdentifier sets the SnapshotScheduleIdentifier field's value. -func (s *RestoreFromClusterSnapshotInput) SetSnapshotScheduleIdentifier(v string) *RestoreFromClusterSnapshotInput { - s.SnapshotScheduleIdentifier = &v - return s -} - -// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. -func (s *RestoreFromClusterSnapshotInput) SetVpcSecurityGroupIds(v []*string) *RestoreFromClusterSnapshotInput { - s.VpcSecurityGroupIds = v - return s -} - -type RestoreFromClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Describes a cluster. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s RestoreFromClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreFromClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *RestoreFromClusterSnapshotOutput) SetCluster(v *Cluster) *RestoreFromClusterSnapshotOutput { - s.Cluster = v - return s -} - -// Describes the status of a cluster restore action. Returns null if the cluster -// was not created by restoring a snapshot. -type RestoreStatus struct { - _ struct{} `type:"structure"` - - // The number of megabytes per second being transferred from the backup storage. - // Returns the average rate for a completed backup. - CurrentRestoreRateInMegaBytesPerSecond *float64 `type:"double"` - - // The amount of time an in-progress restore has been running, or the amount - // of time it took a completed restore to finish. - ElapsedTimeInSeconds *int64 `type:"long"` - - // The estimate of the time remaining before the restore will complete. Returns - // 0 for a completed restore. - EstimatedTimeToCompletionInSeconds *int64 `type:"long"` - - // The number of megabytes that have been transferred from snapshot storage. - ProgressInMegaBytes *int64 `type:"long"` - - // The size of the set of snapshot data used to restore the cluster. - SnapshotSizeInMegaBytes *int64 `type:"long"` - - // The status of the restore action. Returns starting, restoring, completed, - // or failed. - Status *string `type:"string"` -} - -// String returns the string representation -func (s RestoreStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreStatus) GoString() string { - return s.String() -} - -// SetCurrentRestoreRateInMegaBytesPerSecond sets the CurrentRestoreRateInMegaBytesPerSecond field's value. -func (s *RestoreStatus) SetCurrentRestoreRateInMegaBytesPerSecond(v float64) *RestoreStatus { - s.CurrentRestoreRateInMegaBytesPerSecond = &v - return s -} - -// SetElapsedTimeInSeconds sets the ElapsedTimeInSeconds field's value. -func (s *RestoreStatus) SetElapsedTimeInSeconds(v int64) *RestoreStatus { - s.ElapsedTimeInSeconds = &v - return s -} - -// SetEstimatedTimeToCompletionInSeconds sets the EstimatedTimeToCompletionInSeconds field's value. -func (s *RestoreStatus) SetEstimatedTimeToCompletionInSeconds(v int64) *RestoreStatus { - s.EstimatedTimeToCompletionInSeconds = &v - return s -} - -// SetProgressInMegaBytes sets the ProgressInMegaBytes field's value. -func (s *RestoreStatus) SetProgressInMegaBytes(v int64) *RestoreStatus { - s.ProgressInMegaBytes = &v - return s -} - -// SetSnapshotSizeInMegaBytes sets the SnapshotSizeInMegaBytes field's value. -func (s *RestoreStatus) SetSnapshotSizeInMegaBytes(v int64) *RestoreStatus { - s.SnapshotSizeInMegaBytes = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *RestoreStatus) SetStatus(v string) *RestoreStatus { - s.Status = &v - return s -} - -type RestoreTableFromClusterSnapshotInput struct { - _ struct{} `type:"structure"` - - // The identifier of the Amazon Redshift cluster to restore the table to. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` - - // The name of the table to create as a result of the current request. - // - // NewTableName is a required field - NewTableName *string `type:"string" required:"true"` - - // The identifier of the snapshot to restore the table from. This snapshot must - // have been created from the Amazon Redshift cluster specified by the ClusterIdentifier - // parameter. - // - // SnapshotIdentifier is a required field - SnapshotIdentifier *string `type:"string" required:"true"` - - // The name of the source database that contains the table to restore from. - // - // SourceDatabaseName is a required field - SourceDatabaseName *string `type:"string" required:"true"` - - // The name of the source schema that contains the table to restore from. If - // you do not specify a SourceSchemaName value, the default is public. - SourceSchemaName *string `type:"string"` - - // The name of the source table to restore from. - // - // SourceTableName is a required field - SourceTableName *string `type:"string" required:"true"` - - // The name of the database to restore the table to. - TargetDatabaseName *string `type:"string"` - - // The name of the schema to restore the table to. - TargetSchemaName *string `type:"string"` -} - -// String returns the string representation -func (s RestoreTableFromClusterSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreTableFromClusterSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreTableFromClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreTableFromClusterSnapshotInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - if s.NewTableName == nil { - invalidParams.Add(request.NewErrParamRequired("NewTableName")) - } - if s.SnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) - } - if s.SourceDatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDatabaseName")) - } - if s.SourceTableName == nil { - invalidParams.Add(request.NewErrParamRequired("SourceTableName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *RestoreTableFromClusterSnapshotInput) SetClusterIdentifier(v string) *RestoreTableFromClusterSnapshotInput { - s.ClusterIdentifier = &v - return s -} - -// SetNewTableName sets the NewTableName field's value. -func (s *RestoreTableFromClusterSnapshotInput) SetNewTableName(v string) *RestoreTableFromClusterSnapshotInput { - s.NewTableName = &v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *RestoreTableFromClusterSnapshotInput) SetSnapshotIdentifier(v string) *RestoreTableFromClusterSnapshotInput { - s.SnapshotIdentifier = &v - return s -} - -// SetSourceDatabaseName sets the SourceDatabaseName field's value. -func (s *RestoreTableFromClusterSnapshotInput) SetSourceDatabaseName(v string) *RestoreTableFromClusterSnapshotInput { - s.SourceDatabaseName = &v - return s -} - -// SetSourceSchemaName sets the SourceSchemaName field's value. -func (s *RestoreTableFromClusterSnapshotInput) SetSourceSchemaName(v string) *RestoreTableFromClusterSnapshotInput { - s.SourceSchemaName = &v - return s -} - -// SetSourceTableName sets the SourceTableName field's value. -func (s *RestoreTableFromClusterSnapshotInput) SetSourceTableName(v string) *RestoreTableFromClusterSnapshotInput { - s.SourceTableName = &v - return s -} - -// SetTargetDatabaseName sets the TargetDatabaseName field's value. -func (s *RestoreTableFromClusterSnapshotInput) SetTargetDatabaseName(v string) *RestoreTableFromClusterSnapshotInput { - s.TargetDatabaseName = &v - return s -} - -// SetTargetSchemaName sets the TargetSchemaName field's value. -func (s *RestoreTableFromClusterSnapshotInput) SetTargetSchemaName(v string) *RestoreTableFromClusterSnapshotInput { - s.TargetSchemaName = &v - return s -} - -type RestoreTableFromClusterSnapshotOutput struct { - _ struct{} `type:"structure"` - - // Describes the status of a RestoreTableFromClusterSnapshot operation. - TableRestoreStatus *TableRestoreStatus `type:"structure"` -} - -// String returns the string representation -func (s RestoreTableFromClusterSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreTableFromClusterSnapshotOutput) GoString() string { - return s.String() -} - -// SetTableRestoreStatus sets the TableRestoreStatus field's value. -func (s *RestoreTableFromClusterSnapshotOutput) SetTableRestoreStatus(v *TableRestoreStatus) *RestoreTableFromClusterSnapshotOutput { - s.TableRestoreStatus = v - return s -} - -// Describes a RevisionTarget. -type RevisionTarget struct { - _ struct{} `type:"structure"` - - // A unique string that identifies the version to update the cluster to. You - // can use this value in ModifyClusterDbRevision. - DatabaseRevision *string `type:"string"` - - // The date on which the database revision was released. - DatabaseRevisionReleaseDate *time.Time `type:"timestamp"` - - // A string that describes the changes and features that will be applied to - // the cluster when it is updated to the corresponding ClusterDbRevision. - Description *string `type:"string"` -} - -// String returns the string representation -func (s RevisionTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevisionTarget) GoString() string { - return s.String() -} - -// SetDatabaseRevision sets the DatabaseRevision field's value. -func (s *RevisionTarget) SetDatabaseRevision(v string) *RevisionTarget { - s.DatabaseRevision = &v - return s -} - -// SetDatabaseRevisionReleaseDate sets the DatabaseRevisionReleaseDate field's value. -func (s *RevisionTarget) SetDatabaseRevisionReleaseDate(v time.Time) *RevisionTarget { - s.DatabaseRevisionReleaseDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *RevisionTarget) SetDescription(v string) *RevisionTarget { - s.Description = &v - return s -} - -type RevokeClusterSecurityGroupIngressInput struct { - _ struct{} `type:"structure"` - - // The IP range for which to revoke access. This range must be a valid Classless - // Inter-Domain Routing (CIDR) block of IP addresses. If CIDRIP is specified, - // EC2SecurityGroupName and EC2SecurityGroupOwnerId cannot be provided. - CIDRIP *string `type:"string"` - - // The name of the security Group from which to revoke the ingress rule. - // - // ClusterSecurityGroupName is a required field - ClusterSecurityGroupName *string `type:"string" required:"true"` - - // The name of the EC2 Security Group whose access is to be revoked. If EC2SecurityGroupName - // is specified, EC2SecurityGroupOwnerId must also be provided and CIDRIP cannot - // be provided. - EC2SecurityGroupName *string `type:"string"` - - // The AWS account number of the owner of the security group specified in the - // EC2SecurityGroupName parameter. The AWS access key ID is not an acceptable - // value. If EC2SecurityGroupOwnerId is specified, EC2SecurityGroupName must - // also be provided. and CIDRIP cannot be provided. - // - // Example: 111122223333 - EC2SecurityGroupOwnerId *string `type:"string"` -} - -// String returns the string representation -func (s RevokeClusterSecurityGroupIngressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeClusterSecurityGroupIngressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RevokeClusterSecurityGroupIngressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RevokeClusterSecurityGroupIngressInput"} - if s.ClusterSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterSecurityGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCIDRIP sets the CIDRIP field's value. -func (s *RevokeClusterSecurityGroupIngressInput) SetCIDRIP(v string) *RevokeClusterSecurityGroupIngressInput { - s.CIDRIP = &v - return s -} - -// SetClusterSecurityGroupName sets the ClusterSecurityGroupName field's value. -func (s *RevokeClusterSecurityGroupIngressInput) SetClusterSecurityGroupName(v string) *RevokeClusterSecurityGroupIngressInput { - s.ClusterSecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. -func (s *RevokeClusterSecurityGroupIngressInput) SetEC2SecurityGroupName(v string) *RevokeClusterSecurityGroupIngressInput { - s.EC2SecurityGroupName = &v - return s -} - -// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. -func (s *RevokeClusterSecurityGroupIngressInput) SetEC2SecurityGroupOwnerId(v string) *RevokeClusterSecurityGroupIngressInput { - s.EC2SecurityGroupOwnerId = &v - return s -} - -type RevokeClusterSecurityGroupIngressOutput struct { - _ struct{} `type:"structure"` - - // Describes a security group. - ClusterSecurityGroup *ClusterSecurityGroup `type:"structure"` -} - -// String returns the string representation -func (s RevokeClusterSecurityGroupIngressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeClusterSecurityGroupIngressOutput) GoString() string { - return s.String() -} - -// SetClusterSecurityGroup sets the ClusterSecurityGroup field's value. -func (s *RevokeClusterSecurityGroupIngressOutput) SetClusterSecurityGroup(v *ClusterSecurityGroup) *RevokeClusterSecurityGroupIngressOutput { - s.ClusterSecurityGroup = v - return s -} - -type RevokeSnapshotAccessInput struct { - _ struct{} `type:"structure"` - - // The identifier of the AWS customer account that can no longer restore the - // specified snapshot. - // - // AccountWithRestoreAccess is a required field - AccountWithRestoreAccess *string `type:"string" required:"true"` - - // The identifier of the cluster the snapshot was created from. This parameter - // is required if your IAM user has a policy containing a snapshot resource - // element that specifies anything other than * for the cluster name. - SnapshotClusterIdentifier *string `type:"string"` - - // The identifier of the snapshot that the account can no longer access. - // - // SnapshotIdentifier is a required field - SnapshotIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RevokeSnapshotAccessInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeSnapshotAccessInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RevokeSnapshotAccessInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RevokeSnapshotAccessInput"} - if s.AccountWithRestoreAccess == nil { - invalidParams.Add(request.NewErrParamRequired("AccountWithRestoreAccess")) - } - if s.SnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountWithRestoreAccess sets the AccountWithRestoreAccess field's value. -func (s *RevokeSnapshotAccessInput) SetAccountWithRestoreAccess(v string) *RevokeSnapshotAccessInput { - s.AccountWithRestoreAccess = &v - return s -} - -// SetSnapshotClusterIdentifier sets the SnapshotClusterIdentifier field's value. -func (s *RevokeSnapshotAccessInput) SetSnapshotClusterIdentifier(v string) *RevokeSnapshotAccessInput { - s.SnapshotClusterIdentifier = &v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *RevokeSnapshotAccessInput) SetSnapshotIdentifier(v string) *RevokeSnapshotAccessInput { - s.SnapshotIdentifier = &v - return s -} - -type RevokeSnapshotAccessOutput struct { - _ struct{} `type:"structure"` - - // Describes a snapshot. - Snapshot *Snapshot `type:"structure"` -} - -// String returns the string representation -func (s RevokeSnapshotAccessOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeSnapshotAccessOutput) GoString() string { - return s.String() -} - -// SetSnapshot sets the Snapshot field's value. -func (s *RevokeSnapshotAccessOutput) SetSnapshot(v *Snapshot) *RevokeSnapshotAccessOutput { - s.Snapshot = v - return s -} - -type RotateEncryptionKeyInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the cluster that you want to rotate the encryption - // keys for. - // - // Constraints: Must be the name of valid cluster that has encryption enabled. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RotateEncryptionKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RotateEncryptionKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RotateEncryptionKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RotateEncryptionKeyInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *RotateEncryptionKeyInput) SetClusterIdentifier(v string) *RotateEncryptionKeyInput { - s.ClusterIdentifier = &v - return s -} - -type RotateEncryptionKeyOutput struct { - _ struct{} `type:"structure"` - - // Describes a cluster. - Cluster *Cluster `type:"structure"` -} - -// String returns the string representation -func (s RotateEncryptionKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RotateEncryptionKeyOutput) GoString() string { - return s.String() -} - -// SetCluster sets the Cluster field's value. -func (s *RotateEncryptionKeyOutput) SetCluster(v *Cluster) *RotateEncryptionKeyOutput { - s.Cluster = v - return s -} - -// Describes a snapshot. -type Snapshot struct { - _ struct{} `type:"structure"` - - // A list of the AWS customer accounts authorized to restore the snapshot. Returns - // null if no accounts are authorized. Visible only to the snapshot owner. - AccountsWithRestoreAccess []*AccountWithRestoreAccess `locationNameList:"AccountWithRestoreAccess" type:"list"` - - // The size of the incremental backup. - ActualIncrementalBackupSizeInMegaBytes *float64 `type:"double"` - - // The Availability Zone in which the cluster was created. - AvailabilityZone *string `type:"string"` - - // The number of megabytes that have been transferred to the snapshot backup. - BackupProgressInMegaBytes *float64 `type:"double"` - - // The time (UTC) when the cluster was originally created. - ClusterCreateTime *time.Time `type:"timestamp"` - - // The identifier of the cluster for which the snapshot was taken. - ClusterIdentifier *string `type:"string"` - - // The version ID of the Amazon Redshift engine that is running on the cluster. - ClusterVersion *string `type:"string"` - - // The number of megabytes per second being transferred to the snapshot backup. - // Returns 0 for a completed backup. - CurrentBackupRateInMegaBytesPerSecond *float64 `type:"double"` - - // The name of the database that was created when the cluster was created. - DBName *string `type:"string"` - - // The amount of time an in-progress snapshot backup has been running, or the - // amount of time it took a completed backup to finish. - ElapsedTimeInSeconds *int64 `type:"long"` - - // If true, the data in the snapshot is encrypted at rest. - Encrypted *bool `type:"boolean"` - - // A boolean that indicates whether the snapshot data is encrypted using the - // HSM keys of the source cluster. true indicates that the data is encrypted - // using HSM keys. - EncryptedWithHSM *bool `type:"boolean"` - - // An option that specifies whether to create the cluster with enhanced VPC - // routing enabled. To create a cluster that uses enhanced VPC routing, the - // cluster must be in a VPC. For more information, see Enhanced VPC Routing - // (http://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html) - // in the Amazon Redshift Cluster Management Guide. - // - // If this option is true, enhanced VPC routing is enabled. - // - // Default: false - EnhancedVpcRouting *bool `type:"boolean"` - - // The estimate of the time remaining before the snapshot backup will complete. - // Returns 0 for a completed backup. - EstimatedSecondsToCompletion *int64 `type:"long"` - - // The AWS Key Management Service (KMS) key ID of the encryption key that was - // used to encrypt data in the cluster from which the snapshot was taken. - KmsKeyId *string `type:"string"` - - // The name of the maintenance track for the snapshot. - MaintenanceTrackName *string `type:"string"` - - // The number of days until a manual snapshot will pass its retention period. - ManualSnapshotRemainingDays *int64 `type:"integer"` - - // The number of days that a manual snapshot is retained. If the value is -1, - // the manual snapshot is retained indefinitely. - // - // The value must be either -1 or an integer between 1 and 3,653. - ManualSnapshotRetentionPeriod *int64 `type:"integer"` - - // The master user name for the cluster. - MasterUsername *string `type:"string"` - - // The node type of the nodes in the cluster. - NodeType *string `type:"string"` - - // The number of nodes in the cluster. - NumberOfNodes *int64 `type:"integer"` - - // For manual snapshots, the AWS customer account used to create or copy the - // snapshot. For automatic snapshots, the owner of the cluster. The owner can - // perform all snapshot actions, such as sharing a manual snapshot. - OwnerAccount *string `type:"string"` - - // The port that the cluster is listening on. - Port *int64 `type:"integer"` - - // The list of node types that this cluster snapshot is able to restore into. - RestorableNodeTypes []*string `locationNameList:"NodeType" type:"list"` - - // The time (in UTC format) when Amazon Redshift began the snapshot. A snapshot - // contains a copy of the cluster data as of this exact time. - SnapshotCreateTime *time.Time `type:"timestamp"` - - // The snapshot identifier that is provided in the request. - SnapshotIdentifier *string `type:"string"` - - // A timestamp representing the start of the retention period for the snapshot. - SnapshotRetentionStartTime *time.Time `type:"timestamp"` - - // The snapshot type. Snapshots created using CreateClusterSnapshot and CopyClusterSnapshot - // are of type "manual". - SnapshotType *string `type:"string"` - - // The source region from which the snapshot was copied. - SourceRegion *string `type:"string"` - - // The snapshot status. The value of the status depends on the API operation - // used: - // - // * CreateClusterSnapshot and CopyClusterSnapshot returns status as "creating". - // - // - // * DescribeClusterSnapshots returns status as "creating", "available", - // "final snapshot", or "failed". - // - // * DeleteClusterSnapshot returns status as "deleted". - Status *string `type:"string"` - - // The list of tags for the cluster snapshot. - Tags []*Tag `locationNameList:"Tag" type:"list"` - - // The size of the complete set of backup data that would be used to restore - // the cluster. - TotalBackupSizeInMegaBytes *float64 `type:"double"` - - // The VPC identifier of the cluster if the snapshot is from a cluster in a - // VPC. Otherwise, this field is not in the output. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s Snapshot) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Snapshot) GoString() string { - return s.String() -} - -// SetAccountsWithRestoreAccess sets the AccountsWithRestoreAccess field's value. -func (s *Snapshot) SetAccountsWithRestoreAccess(v []*AccountWithRestoreAccess) *Snapshot { - s.AccountsWithRestoreAccess = v - return s -} - -// SetActualIncrementalBackupSizeInMegaBytes sets the ActualIncrementalBackupSizeInMegaBytes field's value. -func (s *Snapshot) SetActualIncrementalBackupSizeInMegaBytes(v float64) *Snapshot { - s.ActualIncrementalBackupSizeInMegaBytes = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Snapshot) SetAvailabilityZone(v string) *Snapshot { - s.AvailabilityZone = &v - return s -} - -// SetBackupProgressInMegaBytes sets the BackupProgressInMegaBytes field's value. -func (s *Snapshot) SetBackupProgressInMegaBytes(v float64) *Snapshot { - s.BackupProgressInMegaBytes = &v - return s -} - -// SetClusterCreateTime sets the ClusterCreateTime field's value. -func (s *Snapshot) SetClusterCreateTime(v time.Time) *Snapshot { - s.ClusterCreateTime = &v - return s -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *Snapshot) SetClusterIdentifier(v string) *Snapshot { - s.ClusterIdentifier = &v - return s -} - -// SetClusterVersion sets the ClusterVersion field's value. -func (s *Snapshot) SetClusterVersion(v string) *Snapshot { - s.ClusterVersion = &v - return s -} - -// SetCurrentBackupRateInMegaBytesPerSecond sets the CurrentBackupRateInMegaBytesPerSecond field's value. -func (s *Snapshot) SetCurrentBackupRateInMegaBytesPerSecond(v float64) *Snapshot { - s.CurrentBackupRateInMegaBytesPerSecond = &v - return s -} - -// SetDBName sets the DBName field's value. -func (s *Snapshot) SetDBName(v string) *Snapshot { - s.DBName = &v - return s -} - -// SetElapsedTimeInSeconds sets the ElapsedTimeInSeconds field's value. -func (s *Snapshot) SetElapsedTimeInSeconds(v int64) *Snapshot { - s.ElapsedTimeInSeconds = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *Snapshot) SetEncrypted(v bool) *Snapshot { - s.Encrypted = &v - return s -} - -// SetEncryptedWithHSM sets the EncryptedWithHSM field's value. -func (s *Snapshot) SetEncryptedWithHSM(v bool) *Snapshot { - s.EncryptedWithHSM = &v - return s -} - -// SetEnhancedVpcRouting sets the EnhancedVpcRouting field's value. -func (s *Snapshot) SetEnhancedVpcRouting(v bool) *Snapshot { - s.EnhancedVpcRouting = &v - return s -} - -// SetEstimatedSecondsToCompletion sets the EstimatedSecondsToCompletion field's value. -func (s *Snapshot) SetEstimatedSecondsToCompletion(v int64) *Snapshot { - s.EstimatedSecondsToCompletion = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *Snapshot) SetKmsKeyId(v string) *Snapshot { - s.KmsKeyId = &v - return s -} - -// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. -func (s *Snapshot) SetMaintenanceTrackName(v string) *Snapshot { - s.MaintenanceTrackName = &v - return s -} - -// SetManualSnapshotRemainingDays sets the ManualSnapshotRemainingDays field's value. -func (s *Snapshot) SetManualSnapshotRemainingDays(v int64) *Snapshot { - s.ManualSnapshotRemainingDays = &v - return s -} - -// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. -func (s *Snapshot) SetManualSnapshotRetentionPeriod(v int64) *Snapshot { - s.ManualSnapshotRetentionPeriod = &v - return s -} - -// SetMasterUsername sets the MasterUsername field's value. -func (s *Snapshot) SetMasterUsername(v string) *Snapshot { - s.MasterUsername = &v - return s -} - -// SetNodeType sets the NodeType field's value. -func (s *Snapshot) SetNodeType(v string) *Snapshot { - s.NodeType = &v - return s -} - -// SetNumberOfNodes sets the NumberOfNodes field's value. -func (s *Snapshot) SetNumberOfNodes(v int64) *Snapshot { - s.NumberOfNodes = &v - return s -} - -// SetOwnerAccount sets the OwnerAccount field's value. -func (s *Snapshot) SetOwnerAccount(v string) *Snapshot { - s.OwnerAccount = &v - return s -} - -// SetPort sets the Port field's value. -func (s *Snapshot) SetPort(v int64) *Snapshot { - s.Port = &v - return s -} - -// SetRestorableNodeTypes sets the RestorableNodeTypes field's value. -func (s *Snapshot) SetRestorableNodeTypes(v []*string) *Snapshot { - s.RestorableNodeTypes = v - return s -} - -// SetSnapshotCreateTime sets the SnapshotCreateTime field's value. -func (s *Snapshot) SetSnapshotCreateTime(v time.Time) *Snapshot { - s.SnapshotCreateTime = &v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *Snapshot) SetSnapshotIdentifier(v string) *Snapshot { - s.SnapshotIdentifier = &v - return s -} - -// SetSnapshotRetentionStartTime sets the SnapshotRetentionStartTime field's value. -func (s *Snapshot) SetSnapshotRetentionStartTime(v time.Time) *Snapshot { - s.SnapshotRetentionStartTime = &v - return s -} - -// SetSnapshotType sets the SnapshotType field's value. -func (s *Snapshot) SetSnapshotType(v string) *Snapshot { - s.SnapshotType = &v - return s -} - -// SetSourceRegion sets the SourceRegion field's value. -func (s *Snapshot) SetSourceRegion(v string) *Snapshot { - s.SourceRegion = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Snapshot) SetStatus(v string) *Snapshot { - s.Status = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Snapshot) SetTags(v []*Tag) *Snapshot { - s.Tags = v - return s -} - -// SetTotalBackupSizeInMegaBytes sets the TotalBackupSizeInMegaBytes field's value. -func (s *Snapshot) SetTotalBackupSizeInMegaBytes(v float64) *Snapshot { - s.TotalBackupSizeInMegaBytes = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *Snapshot) SetVpcId(v string) *Snapshot { - s.VpcId = &v - return s -} - -// The snapshot copy grant that grants Amazon Redshift permission to encrypt -// copied snapshots with the specified customer master key (CMK) from AWS KMS -// in the destination region. -// -// For more information about managing snapshot copy grants, go to Amazon Redshift -// Database Encryption (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html) -// in the Amazon Redshift Cluster Management Guide. -type SnapshotCopyGrant struct { - _ struct{} `type:"structure"` - - // The unique identifier of the customer master key (CMK) in AWS KMS to which - // Amazon Redshift is granted permission. - KmsKeyId *string `type:"string"` - - // The name of the snapshot copy grant. - SnapshotCopyGrantName *string `type:"string"` - - // A list of tag instances. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s SnapshotCopyGrant) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SnapshotCopyGrant) GoString() string { - return s.String() -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *SnapshotCopyGrant) SetKmsKeyId(v string) *SnapshotCopyGrant { - s.KmsKeyId = &v - return s -} - -// SetSnapshotCopyGrantName sets the SnapshotCopyGrantName field's value. -func (s *SnapshotCopyGrant) SetSnapshotCopyGrantName(v string) *SnapshotCopyGrant { - s.SnapshotCopyGrantName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *SnapshotCopyGrant) SetTags(v []*Tag) *SnapshotCopyGrant { - s.Tags = v - return s -} - -// Describes the errors returned by a snapshot. -type SnapshotErrorMessage struct { - _ struct{} `type:"structure"` - - // The failure code for the error. - FailureCode *string `type:"string"` - - // The text message describing the error. - FailureReason *string `type:"string"` - - // A unique identifier for the cluster. - SnapshotClusterIdentifier *string `type:"string"` - - // A unique identifier for the snapshot returning the error. - SnapshotIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s SnapshotErrorMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SnapshotErrorMessage) GoString() string { - return s.String() -} - -// SetFailureCode sets the FailureCode field's value. -func (s *SnapshotErrorMessage) SetFailureCode(v string) *SnapshotErrorMessage { - s.FailureCode = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *SnapshotErrorMessage) SetFailureReason(v string) *SnapshotErrorMessage { - s.FailureReason = &v - return s -} - -// SetSnapshotClusterIdentifier sets the SnapshotClusterIdentifier field's value. -func (s *SnapshotErrorMessage) SetSnapshotClusterIdentifier(v string) *SnapshotErrorMessage { - s.SnapshotClusterIdentifier = &v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *SnapshotErrorMessage) SetSnapshotIdentifier(v string) *SnapshotErrorMessage { - s.SnapshotIdentifier = &v - return s -} - -// Describes a snapshot schedule. You can set a regular interval for creating -// snapshots of a cluster. You can also schedule snapshots for specific dates. -type SnapshotSchedule struct { - _ struct{} `type:"structure"` - - AssociatedClusterCount *int64 `type:"integer"` - - AssociatedClusters []*ClusterAssociatedToSchedule `locationNameList:"ClusterAssociatedToSchedule" type:"list"` - - NextInvocations []*time.Time `locationNameList:"SnapshotTime" type:"list"` - - // A list of ScheduleDefinitions - ScheduleDefinitions []*string `locationNameList:"ScheduleDefinition" type:"list"` - - // The description of the schedule. - ScheduleDescription *string `type:"string"` - - // A unique identifier for the schedule. - ScheduleIdentifier *string `type:"string"` - - // An optional set of tags describing the schedule. - Tags []*Tag `locationNameList:"Tag" type:"list"` -} - -// String returns the string representation -func (s SnapshotSchedule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SnapshotSchedule) GoString() string { - return s.String() -} - -// SetAssociatedClusterCount sets the AssociatedClusterCount field's value. -func (s *SnapshotSchedule) SetAssociatedClusterCount(v int64) *SnapshotSchedule { - s.AssociatedClusterCount = &v - return s -} - -// SetAssociatedClusters sets the AssociatedClusters field's value. -func (s *SnapshotSchedule) SetAssociatedClusters(v []*ClusterAssociatedToSchedule) *SnapshotSchedule { - s.AssociatedClusters = v - return s -} - -// SetNextInvocations sets the NextInvocations field's value. -func (s *SnapshotSchedule) SetNextInvocations(v []*time.Time) *SnapshotSchedule { - s.NextInvocations = v - return s -} - -// SetScheduleDefinitions sets the ScheduleDefinitions field's value. -func (s *SnapshotSchedule) SetScheduleDefinitions(v []*string) *SnapshotSchedule { - s.ScheduleDefinitions = v - return s -} - -// SetScheduleDescription sets the ScheduleDescription field's value. -func (s *SnapshotSchedule) SetScheduleDescription(v string) *SnapshotSchedule { - s.ScheduleDescription = &v - return s -} - -// SetScheduleIdentifier sets the ScheduleIdentifier field's value. -func (s *SnapshotSchedule) SetScheduleIdentifier(v string) *SnapshotSchedule { - s.ScheduleIdentifier = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *SnapshotSchedule) SetTags(v []*Tag) *SnapshotSchedule { - s.Tags = v - return s -} - -// Describes a sorting entity -type SnapshotSortingEntity struct { - _ struct{} `type:"structure"` - - // The category for sorting the snapshots. - // - // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"SnapshotAttributeToSortBy"` - - // The order for listing the attributes. - SortOrder *string `type:"string" enum:"SortByOrder"` -} - -// String returns the string representation -func (s SnapshotSortingEntity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SnapshotSortingEntity) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SnapshotSortingEntity) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SnapshotSortingEntity"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *SnapshotSortingEntity) SetAttribute(v string) *SnapshotSortingEntity { - s.Attribute = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *SnapshotSortingEntity) SetSortOrder(v string) *SnapshotSortingEntity { - s.SortOrder = &v - return s -} - -// Describes a subnet. -type Subnet struct { - _ struct{} `type:"structure"` - - // Describes an availability zone. - SubnetAvailabilityZone *AvailabilityZone `type:"structure"` - - // The identifier of the subnet. - SubnetIdentifier *string `type:"string"` - - // The status of the subnet. - SubnetStatus *string `type:"string"` -} - -// String returns the string representation -func (s Subnet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Subnet) GoString() string { - return s.String() -} - -// SetSubnetAvailabilityZone sets the SubnetAvailabilityZone field's value. -func (s *Subnet) SetSubnetAvailabilityZone(v *AvailabilityZone) *Subnet { - s.SubnetAvailabilityZone = v - return s -} - -// SetSubnetIdentifier sets the SubnetIdentifier field's value. -func (s *Subnet) SetSubnetIdentifier(v string) *Subnet { - s.SubnetIdentifier = &v - return s -} - -// SetSubnetStatus sets the SubnetStatus field's value. -func (s *Subnet) SetSubnetStatus(v string) *Subnet { - s.SubnetStatus = &v - return s -} - -// Describes the operations that are allowed on a maintenance track. -type SupportedOperation struct { - _ struct{} `type:"structure"` - - // A list of the supported operations. - OperationName *string `type:"string"` -} - -// String returns the string representation -func (s SupportedOperation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SupportedOperation) GoString() string { - return s.String() -} - -// SetOperationName sets the OperationName field's value. -func (s *SupportedOperation) SetOperationName(v string) *SupportedOperation { - s.OperationName = &v - return s -} - -// A list of supported platforms for orderable clusters. -type SupportedPlatform struct { - _ struct{} `type:"structure"` - - Name *string `type:"string"` -} - -// String returns the string representation -func (s SupportedPlatform) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SupportedPlatform) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *SupportedPlatform) SetName(v string) *SupportedPlatform { - s.Name = &v - return s -} - -// Describes the status of a RestoreTableFromClusterSnapshot operation. -type TableRestoreStatus struct { - _ struct{} `type:"structure"` - - // The identifier of the Amazon Redshift cluster that the table is being restored - // to. - ClusterIdentifier *string `type:"string"` - - // A description of the status of the table restore request. Status values include - // SUCCEEDED, FAILED, CANCELED, PENDING, IN_PROGRESS. - Message *string `type:"string"` - - // The name of the table to create as a result of the table restore request. - NewTableName *string `type:"string"` - - // The amount of data restored to the new table so far, in megabytes (MB). - ProgressInMegaBytes *int64 `type:"long"` - - // The time that the table restore request was made, in Universal Coordinated - // Time (UTC). - RequestTime *time.Time `type:"timestamp"` - - // The identifier of the snapshot that the table is being restored from. - SnapshotIdentifier *string `type:"string"` - - // The name of the source database that contains the table being restored. - SourceDatabaseName *string `type:"string"` - - // The name of the source schema that contains the table being restored. - SourceSchemaName *string `type:"string"` - - // The name of the source table being restored. - SourceTableName *string `type:"string"` - - // A value that describes the current state of the table restore request. - // - // Valid Values: SUCCEEDED, FAILED, CANCELED, PENDING, IN_PROGRESS - Status *string `type:"string" enum:"TableRestoreStatusType"` - - // The unique identifier for the table restore request. - TableRestoreRequestId *string `type:"string"` - - // The name of the database to restore the table to. - TargetDatabaseName *string `type:"string"` - - // The name of the schema to restore the table to. - TargetSchemaName *string `type:"string"` - - // The total amount of data to restore to the new table, in megabytes (MB). - TotalDataInMegaBytes *int64 `type:"long"` -} - -// String returns the string representation -func (s TableRestoreStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TableRestoreStatus) GoString() string { - return s.String() -} - -// SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *TableRestoreStatus) SetClusterIdentifier(v string) *TableRestoreStatus { - s.ClusterIdentifier = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *TableRestoreStatus) SetMessage(v string) *TableRestoreStatus { - s.Message = &v - return s -} - -// SetNewTableName sets the NewTableName field's value. -func (s *TableRestoreStatus) SetNewTableName(v string) *TableRestoreStatus { - s.NewTableName = &v - return s -} - -// SetProgressInMegaBytes sets the ProgressInMegaBytes field's value. -func (s *TableRestoreStatus) SetProgressInMegaBytes(v int64) *TableRestoreStatus { - s.ProgressInMegaBytes = &v - return s -} - -// SetRequestTime sets the RequestTime field's value. -func (s *TableRestoreStatus) SetRequestTime(v time.Time) *TableRestoreStatus { - s.RequestTime = &v - return s -} - -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *TableRestoreStatus) SetSnapshotIdentifier(v string) *TableRestoreStatus { - s.SnapshotIdentifier = &v - return s -} - -// SetSourceDatabaseName sets the SourceDatabaseName field's value. -func (s *TableRestoreStatus) SetSourceDatabaseName(v string) *TableRestoreStatus { - s.SourceDatabaseName = &v - return s -} - -// SetSourceSchemaName sets the SourceSchemaName field's value. -func (s *TableRestoreStatus) SetSourceSchemaName(v string) *TableRestoreStatus { - s.SourceSchemaName = &v - return s -} - -// SetSourceTableName sets the SourceTableName field's value. -func (s *TableRestoreStatus) SetSourceTableName(v string) *TableRestoreStatus { - s.SourceTableName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *TableRestoreStatus) SetStatus(v string) *TableRestoreStatus { - s.Status = &v - return s -} - -// SetTableRestoreRequestId sets the TableRestoreRequestId field's value. -func (s *TableRestoreStatus) SetTableRestoreRequestId(v string) *TableRestoreStatus { - s.TableRestoreRequestId = &v - return s -} - -// SetTargetDatabaseName sets the TargetDatabaseName field's value. -func (s *TableRestoreStatus) SetTargetDatabaseName(v string) *TableRestoreStatus { - s.TargetDatabaseName = &v - return s -} - -// SetTargetSchemaName sets the TargetSchemaName field's value. -func (s *TableRestoreStatus) SetTargetSchemaName(v string) *TableRestoreStatus { - s.TargetSchemaName = &v - return s -} - -// SetTotalDataInMegaBytes sets the TotalDataInMegaBytes field's value. -func (s *TableRestoreStatus) SetTotalDataInMegaBytes(v int64) *TableRestoreStatus { - s.TotalDataInMegaBytes = &v - return s -} - -// A tag consisting of a name/value pair for a resource. -type Tag struct { - _ struct{} `type:"structure"` - - // The key, or name, for the resource tag. - Key *string `type:"string"` - - // The value for the resource tag. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// A tag and its associated resource. -type TaggedResource struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) with which the tag is associated, for example: - // arn:aws:redshift:us-east-1:123456789:cluster:t1. - ResourceName *string `type:"string"` - - // The type of resource with which the tag is associated. Valid resource types - // are: - // - // * Cluster - // - // * CIDR/IP - // - // * EC2 security group - // - // * Snapshot - // - // * Cluster security group - // - // * Subnet group - // - // * HSM connection - // - // * HSM certificate - // - // * Parameter group - // - // For more information about Amazon Redshift resource types and constructing - // ARNs, go to Constructing an Amazon Redshift Amazon Resource Name (ARN) (http://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-overview.html#redshift-iam-access-control-specify-actions) - // in the Amazon Redshift Cluster Management Guide. - ResourceType *string `type:"string"` - - // The tag for the resource. - Tag *Tag `type:"structure"` -} - -// String returns the string representation -func (s TaggedResource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaggedResource) GoString() string { - return s.String() -} - -// SetResourceName sets the ResourceName field's value. -func (s *TaggedResource) SetResourceName(v string) *TaggedResource { - s.ResourceName = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TaggedResource) SetResourceType(v string) *TaggedResource { - s.ResourceType = &v - return s -} - -// SetTag sets the Tag field's value. -func (s *TaggedResource) SetTag(v *Tag) *TaggedResource { - s.Tag = v - return s -} - -// A maintenance track that you can switch the current track to. -type UpdateTarget struct { - _ struct{} `type:"structure"` - - // The cluster version for the new maintenance track. - DatabaseVersion *string `type:"string"` - - // The name of the new maintenance track. - MaintenanceTrackName *string `type:"string"` - - // A list of operations supported by the maintenance track. - SupportedOperations []*SupportedOperation `locationNameList:"SupportedOperation" type:"list"` -} - -// String returns the string representation -func (s UpdateTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTarget) GoString() string { - return s.String() -} - -// SetDatabaseVersion sets the DatabaseVersion field's value. -func (s *UpdateTarget) SetDatabaseVersion(v string) *UpdateTarget { - s.DatabaseVersion = &v - return s -} - -// SetMaintenanceTrackName sets the MaintenanceTrackName field's value. -func (s *UpdateTarget) SetMaintenanceTrackName(v string) *UpdateTarget { - s.MaintenanceTrackName = &v - return s -} - -// SetSupportedOperations sets the SupportedOperations field's value. -func (s *UpdateTarget) SetSupportedOperations(v []*SupportedOperation) *UpdateTarget { - s.SupportedOperations = v - return s -} - -// Describes the members of a VPC security group. -type VpcSecurityGroupMembership struct { - _ struct{} `type:"structure"` - - // The status of the VPC security group. - Status *string `type:"string"` - - // The identifier of the VPC security group. - VpcSecurityGroupId *string `type:"string"` -} - -// String returns the string representation -func (s VpcSecurityGroupMembership) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcSecurityGroupMembership) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *VpcSecurityGroupMembership) SetStatus(v string) *VpcSecurityGroupMembership { - s.Status = &v - return s -} - -// SetVpcSecurityGroupId sets the VpcSecurityGroupId field's value. -func (s *VpcSecurityGroupMembership) SetVpcSecurityGroupId(v string) *VpcSecurityGroupMembership { - s.VpcSecurityGroupId = &v - return s -} - -const ( - // ParameterApplyTypeStatic is a ParameterApplyType enum value - ParameterApplyTypeStatic = "static" - - // ParameterApplyTypeDynamic is a ParameterApplyType enum value - ParameterApplyTypeDynamic = "dynamic" -) - -const ( - // ReservedNodeOfferingTypeRegular is a ReservedNodeOfferingType enum value - ReservedNodeOfferingTypeRegular = "Regular" - - // ReservedNodeOfferingTypeUpgradable is a ReservedNodeOfferingType enum value - ReservedNodeOfferingTypeUpgradable = "Upgradable" -) - -const ( - // ScheduleStateModifying is a ScheduleState enum value - ScheduleStateModifying = "MODIFYING" - - // ScheduleStateActive is a ScheduleState enum value - ScheduleStateActive = "ACTIVE" - - // ScheduleStateFailed is a ScheduleState enum value - ScheduleStateFailed = "FAILED" -) - -const ( - // SnapshotAttributeToSortBySourceType is a SnapshotAttributeToSortBy enum value - SnapshotAttributeToSortBySourceType = "SOURCE_TYPE" - - // SnapshotAttributeToSortByTotalSize is a SnapshotAttributeToSortBy enum value - SnapshotAttributeToSortByTotalSize = "TOTAL_SIZE" - - // SnapshotAttributeToSortByCreateTime is a SnapshotAttributeToSortBy enum value - SnapshotAttributeToSortByCreateTime = "CREATE_TIME" -) - -const ( - // SortByOrderAsc is a SortByOrder enum value - SortByOrderAsc = "ASC" - - // SortByOrderDesc is a SortByOrder enum value - SortByOrderDesc = "DESC" -) - -const ( - // SourceTypeCluster is a SourceType enum value - SourceTypeCluster = "cluster" - - // SourceTypeClusterParameterGroup is a SourceType enum value - SourceTypeClusterParameterGroup = "cluster-parameter-group" - - // SourceTypeClusterSecurityGroup is a SourceType enum value - SourceTypeClusterSecurityGroup = "cluster-security-group" - - // SourceTypeClusterSnapshot is a SourceType enum value - SourceTypeClusterSnapshot = "cluster-snapshot" -) - -const ( - // TableRestoreStatusTypePending is a TableRestoreStatusType enum value - TableRestoreStatusTypePending = "PENDING" - - // TableRestoreStatusTypeInProgress is a TableRestoreStatusType enum value - TableRestoreStatusTypeInProgress = "IN_PROGRESS" - - // TableRestoreStatusTypeSucceeded is a TableRestoreStatusType enum value - TableRestoreStatusTypeSucceeded = "SUCCEEDED" - - // TableRestoreStatusTypeFailed is a TableRestoreStatusType enum value - TableRestoreStatusTypeFailed = "FAILED" - - // TableRestoreStatusTypeCanceled is a TableRestoreStatusType enum value - TableRestoreStatusTypeCanceled = "CANCELED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/doc.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/doc.go deleted file mode 100644 index a5709ff7d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/doc.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package redshift provides the client and types for making API -// requests to Amazon Redshift. -// -// Overview -// -// This is an interface reference for Amazon Redshift. It contains documentation -// for one of the programming or command line interfaces you can use to manage -// Amazon Redshift clusters. Note that Amazon Redshift is asynchronous, which -// means that some interfaces may require techniques, such as polling or asynchronous -// callback handlers, to determine when a command has been applied. In this -// reference, the parameter descriptions indicate whether a change is applied -// immediately, on the next instance reboot, or during the next maintenance -// window. For a summary of the Amazon Redshift cluster management interfaces, -// go to Using the Amazon Redshift Management Interfaces (http://docs.aws.amazon.com/redshift/latest/mgmt/using-aws-sdk.html). -// -// Amazon Redshift manages all the work of setting up, operating, and scaling -// a data warehouse: provisioning capacity, monitoring and backing up the cluster, -// and applying patches and upgrades to the Amazon Redshift engine. You can -// focus on using your data to acquire new insights for your business and customers. -// -// If you are a first-time user of Amazon Redshift, we recommend that you begin -// by reading the Amazon Redshift Getting Started Guide (http://docs.aws.amazon.com/redshift/latest/gsg/getting-started.html). -// -// If you are a database developer, the Amazon Redshift Database Developer Guide -// (http://docs.aws.amazon.com/redshift/latest/dg/welcome.html) explains how -// to design, build, query, and maintain the databases that make up your data -// warehouse. -// -// See https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01 for more information on this service. -// -// See redshift package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/redshift/ -// -// Using the Client -// -// To contact Amazon Redshift with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Redshift client Redshift for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/redshift/#New -package redshift diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go deleted file mode 100644 index 4cb2a6778..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go +++ /dev/null @@ -1,668 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package redshift - -const ( - - // ErrCodeAccessToSnapshotDeniedFault for service response error code - // "AccessToSnapshotDenied". - // - // The owner of the specified snapshot has not authorized your account to access - // the snapshot. - ErrCodeAccessToSnapshotDeniedFault = "AccessToSnapshotDenied" - - // ErrCodeAuthorizationAlreadyExistsFault for service response error code - // "AuthorizationAlreadyExists". - // - // The specified CIDR block or EC2 security group is already authorized for - // the specified cluster security group. - ErrCodeAuthorizationAlreadyExistsFault = "AuthorizationAlreadyExists" - - // ErrCodeAuthorizationNotFoundFault for service response error code - // "AuthorizationNotFound". - // - // The specified CIDR IP range or EC2 security group is not authorized for the - // specified cluster security group. - ErrCodeAuthorizationNotFoundFault = "AuthorizationNotFound" - - // ErrCodeAuthorizationQuotaExceededFault for service response error code - // "AuthorizationQuotaExceeded". - // - // The authorization quota for the cluster security group has been reached. - ErrCodeAuthorizationQuotaExceededFault = "AuthorizationQuotaExceeded" - - // ErrCodeBatchDeleteRequestSizeExceededFault for service response error code - // "BatchDeleteRequestSizeExceeded". - // - // The maximum number for a batch delete of snapshots has been reached. The - // limit is 100. - ErrCodeBatchDeleteRequestSizeExceededFault = "BatchDeleteRequestSizeExceeded" - - // ErrCodeBatchModifyClusterSnapshotsLimitExceededFault for service response error code - // "BatchModifyClusterSnapshotsLimitExceededFault". - // - // The maximum number for snapshot identifiers has been reached. The limit is - // 100. - ErrCodeBatchModifyClusterSnapshotsLimitExceededFault = "BatchModifyClusterSnapshotsLimitExceededFault" - - // ErrCodeBucketNotFoundFault for service response error code - // "BucketNotFoundFault". - // - // Could not find the specified S3 bucket. - ErrCodeBucketNotFoundFault = "BucketNotFoundFault" - - // ErrCodeClusterAlreadyExistsFault for service response error code - // "ClusterAlreadyExists". - // - // The account already has a cluster with the given identifier. - ErrCodeClusterAlreadyExistsFault = "ClusterAlreadyExists" - - // ErrCodeClusterNotFoundFault for service response error code - // "ClusterNotFound". - // - // The ClusterIdentifier parameter does not refer to an existing cluster. - ErrCodeClusterNotFoundFault = "ClusterNotFound" - - // ErrCodeClusterOnLatestRevisionFault for service response error code - // "ClusterOnLatestRevision". - // - // Cluster is already on the latest database revision. - ErrCodeClusterOnLatestRevisionFault = "ClusterOnLatestRevision" - - // ErrCodeClusterParameterGroupAlreadyExistsFault for service response error code - // "ClusterParameterGroupAlreadyExists". - // - // A cluster parameter group with the same name already exists. - ErrCodeClusterParameterGroupAlreadyExistsFault = "ClusterParameterGroupAlreadyExists" - - // ErrCodeClusterParameterGroupNotFoundFault for service response error code - // "ClusterParameterGroupNotFound". - // - // The parameter group name does not refer to an existing parameter group. - ErrCodeClusterParameterGroupNotFoundFault = "ClusterParameterGroupNotFound" - - // ErrCodeClusterParameterGroupQuotaExceededFault for service response error code - // "ClusterParameterGroupQuotaExceeded". - // - // The request would result in the user exceeding the allowed number of cluster - // parameter groups. For information about increasing your quota, go to Limits - // in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) - // in the Amazon Redshift Cluster Management Guide. - ErrCodeClusterParameterGroupQuotaExceededFault = "ClusterParameterGroupQuotaExceeded" - - // ErrCodeClusterQuotaExceededFault for service response error code - // "ClusterQuotaExceeded". - // - // The request would exceed the allowed number of cluster instances for this - // account. For information about increasing your quota, go to Limits in Amazon - // Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) - // in the Amazon Redshift Cluster Management Guide. - ErrCodeClusterQuotaExceededFault = "ClusterQuotaExceeded" - - // ErrCodeClusterSecurityGroupAlreadyExistsFault for service response error code - // "ClusterSecurityGroupAlreadyExists". - // - // A cluster security group with the same name already exists. - ErrCodeClusterSecurityGroupAlreadyExistsFault = "ClusterSecurityGroupAlreadyExists" - - // ErrCodeClusterSecurityGroupNotFoundFault for service response error code - // "ClusterSecurityGroupNotFound". - // - // The cluster security group name does not refer to an existing cluster security - // group. - ErrCodeClusterSecurityGroupNotFoundFault = "ClusterSecurityGroupNotFound" - - // ErrCodeClusterSecurityGroupQuotaExceededFault for service response error code - // "QuotaExceeded.ClusterSecurityGroup". - // - // The request would result in the user exceeding the allowed number of cluster - // security groups. For information about increasing your quota, go to Limits - // in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) - // in the Amazon Redshift Cluster Management Guide. - ErrCodeClusterSecurityGroupQuotaExceededFault = "QuotaExceeded.ClusterSecurityGroup" - - // ErrCodeClusterSnapshotAlreadyExistsFault for service response error code - // "ClusterSnapshotAlreadyExists". - // - // The value specified as a snapshot identifier is already used by an existing - // snapshot. - ErrCodeClusterSnapshotAlreadyExistsFault = "ClusterSnapshotAlreadyExists" - - // ErrCodeClusterSnapshotNotFoundFault for service response error code - // "ClusterSnapshotNotFound". - // - // The snapshot identifier does not refer to an existing cluster snapshot. - ErrCodeClusterSnapshotNotFoundFault = "ClusterSnapshotNotFound" - - // ErrCodeClusterSnapshotQuotaExceededFault for service response error code - // "ClusterSnapshotQuotaExceeded". - // - // The request would result in the user exceeding the allowed number of cluster - // snapshots. - ErrCodeClusterSnapshotQuotaExceededFault = "ClusterSnapshotQuotaExceeded" - - // ErrCodeClusterSubnetGroupAlreadyExistsFault for service response error code - // "ClusterSubnetGroupAlreadyExists". - // - // A ClusterSubnetGroupName is already used by an existing cluster subnet group. - ErrCodeClusterSubnetGroupAlreadyExistsFault = "ClusterSubnetGroupAlreadyExists" - - // ErrCodeClusterSubnetGroupNotFoundFault for service response error code - // "ClusterSubnetGroupNotFoundFault". - // - // The cluster subnet group name does not refer to an existing cluster subnet - // group. - ErrCodeClusterSubnetGroupNotFoundFault = "ClusterSubnetGroupNotFoundFault" - - // ErrCodeClusterSubnetGroupQuotaExceededFault for service response error code - // "ClusterSubnetGroupQuotaExceeded". - // - // The request would result in user exceeding the allowed number of cluster - // subnet groups. For information about increasing your quota, go to Limits - // in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) - // in the Amazon Redshift Cluster Management Guide. - ErrCodeClusterSubnetGroupQuotaExceededFault = "ClusterSubnetGroupQuotaExceeded" - - // ErrCodeClusterSubnetQuotaExceededFault for service response error code - // "ClusterSubnetQuotaExceededFault". - // - // The request would result in user exceeding the allowed number of subnets - // in a cluster subnet groups. For information about increasing your quota, - // go to Limits in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) - // in the Amazon Redshift Cluster Management Guide. - ErrCodeClusterSubnetQuotaExceededFault = "ClusterSubnetQuotaExceededFault" - - // ErrCodeCopyToRegionDisabledFault for service response error code - // "CopyToRegionDisabledFault". - // - // Cross-region snapshot copy was temporarily disabled. Try your request again. - ErrCodeCopyToRegionDisabledFault = "CopyToRegionDisabledFault" - - // ErrCodeDependentServiceRequestThrottlingFault for service response error code - // "DependentServiceRequestThrottlingFault". - // - // The request cannot be completed because a dependent service is throttling - // requests made by Amazon Redshift on your behalf. Wait and retry the request. - ErrCodeDependentServiceRequestThrottlingFault = "DependentServiceRequestThrottlingFault" - - // ErrCodeDependentServiceUnavailableFault for service response error code - // "DependentServiceUnavailableFault". - // - // Your request cannot be completed because a dependent internal service is - // temporarily unavailable. Wait 30 to 60 seconds and try again. - ErrCodeDependentServiceUnavailableFault = "DependentServiceUnavailableFault" - - // ErrCodeEventSubscriptionQuotaExceededFault for service response error code - // "EventSubscriptionQuotaExceeded". - // - // The request would exceed the allowed number of event subscriptions for this - // account. For information about increasing your quota, go to Limits in Amazon - // Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) - // in the Amazon Redshift Cluster Management Guide. - ErrCodeEventSubscriptionQuotaExceededFault = "EventSubscriptionQuotaExceeded" - - // ErrCodeHsmClientCertificateAlreadyExistsFault for service response error code - // "HsmClientCertificateAlreadyExistsFault". - // - // There is already an existing Amazon Redshift HSM client certificate with - // the specified identifier. - ErrCodeHsmClientCertificateAlreadyExistsFault = "HsmClientCertificateAlreadyExistsFault" - - // ErrCodeHsmClientCertificateNotFoundFault for service response error code - // "HsmClientCertificateNotFoundFault". - // - // There is no Amazon Redshift HSM client certificate with the specified identifier. - ErrCodeHsmClientCertificateNotFoundFault = "HsmClientCertificateNotFoundFault" - - // ErrCodeHsmClientCertificateQuotaExceededFault for service response error code - // "HsmClientCertificateQuotaExceededFault". - // - // The quota for HSM client certificates has been reached. For information about - // increasing your quota, go to Limits in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) - // in the Amazon Redshift Cluster Management Guide. - ErrCodeHsmClientCertificateQuotaExceededFault = "HsmClientCertificateQuotaExceededFault" - - // ErrCodeHsmConfigurationAlreadyExistsFault for service response error code - // "HsmConfigurationAlreadyExistsFault". - // - // There is already an existing Amazon Redshift HSM configuration with the specified - // identifier. - ErrCodeHsmConfigurationAlreadyExistsFault = "HsmConfigurationAlreadyExistsFault" - - // ErrCodeHsmConfigurationNotFoundFault for service response error code - // "HsmConfigurationNotFoundFault". - // - // There is no Amazon Redshift HSM configuration with the specified identifier. - ErrCodeHsmConfigurationNotFoundFault = "HsmConfigurationNotFoundFault" - - // ErrCodeHsmConfigurationQuotaExceededFault for service response error code - // "HsmConfigurationQuotaExceededFault". - // - // The quota for HSM configurations has been reached. For information about - // increasing your quota, go to Limits in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) - // in the Amazon Redshift Cluster Management Guide. - ErrCodeHsmConfigurationQuotaExceededFault = "HsmConfigurationQuotaExceededFault" - - // ErrCodeInProgressTableRestoreQuotaExceededFault for service response error code - // "InProgressTableRestoreQuotaExceededFault". - // - // You have exceeded the allowed number of table restore requests. Wait for - // your current table restore requests to complete before making a new request. - ErrCodeInProgressTableRestoreQuotaExceededFault = "InProgressTableRestoreQuotaExceededFault" - - // ErrCodeIncompatibleOrderableOptions for service response error code - // "IncompatibleOrderableOptions". - // - // The specified options are incompatible. - ErrCodeIncompatibleOrderableOptions = "IncompatibleOrderableOptions" - - // ErrCodeInsufficientClusterCapacityFault for service response error code - // "InsufficientClusterCapacity". - // - // The number of nodes specified exceeds the allotted capacity of the cluster. - ErrCodeInsufficientClusterCapacityFault = "InsufficientClusterCapacity" - - // ErrCodeInsufficientS3BucketPolicyFault for service response error code - // "InsufficientS3BucketPolicyFault". - // - // The cluster does not have read bucket or put object permissions on the S3 - // bucket specified when enabling logging. - ErrCodeInsufficientS3BucketPolicyFault = "InsufficientS3BucketPolicyFault" - - // ErrCodeInvalidClusterParameterGroupStateFault for service response error code - // "InvalidClusterParameterGroupState". - // - // The cluster parameter group action can not be completed because another task - // is in progress that involves the parameter group. Wait a few moments and - // try the operation again. - ErrCodeInvalidClusterParameterGroupStateFault = "InvalidClusterParameterGroupState" - - // ErrCodeInvalidClusterSecurityGroupStateFault for service response error code - // "InvalidClusterSecurityGroupState". - // - // The state of the cluster security group is not available. - ErrCodeInvalidClusterSecurityGroupStateFault = "InvalidClusterSecurityGroupState" - - // ErrCodeInvalidClusterSnapshotScheduleStateFault for service response error code - // "InvalidClusterSnapshotScheduleState". - // - // The cluster snapshot schedule state is not valid. - ErrCodeInvalidClusterSnapshotScheduleStateFault = "InvalidClusterSnapshotScheduleState" - - // ErrCodeInvalidClusterSnapshotStateFault for service response error code - // "InvalidClusterSnapshotState". - // - // The specified cluster snapshot is not in the available state, or other accounts - // are authorized to access the snapshot. - ErrCodeInvalidClusterSnapshotStateFault = "InvalidClusterSnapshotState" - - // ErrCodeInvalidClusterStateFault for service response error code - // "InvalidClusterState". - // - // The specified cluster is not in the available state. - ErrCodeInvalidClusterStateFault = "InvalidClusterState" - - // ErrCodeInvalidClusterSubnetGroupStateFault for service response error code - // "InvalidClusterSubnetGroupStateFault". - // - // The cluster subnet group cannot be deleted because it is in use. - ErrCodeInvalidClusterSubnetGroupStateFault = "InvalidClusterSubnetGroupStateFault" - - // ErrCodeInvalidClusterSubnetStateFault for service response error code - // "InvalidClusterSubnetStateFault". - // - // The state of the subnet is invalid. - ErrCodeInvalidClusterSubnetStateFault = "InvalidClusterSubnetStateFault" - - // ErrCodeInvalidClusterTrackFault for service response error code - // "InvalidClusterTrack". - // - // The provided cluster track name is not valid. - ErrCodeInvalidClusterTrackFault = "InvalidClusterTrack" - - // ErrCodeInvalidElasticIpFault for service response error code - // "InvalidElasticIpFault". - // - // The Elastic IP (EIP) is invalid or cannot be found. - ErrCodeInvalidElasticIpFault = "InvalidElasticIpFault" - - // ErrCodeInvalidHsmClientCertificateStateFault for service response error code - // "InvalidHsmClientCertificateStateFault". - // - // The specified HSM client certificate is not in the available state, or it - // is still in use by one or more Amazon Redshift clusters. - ErrCodeInvalidHsmClientCertificateStateFault = "InvalidHsmClientCertificateStateFault" - - // ErrCodeInvalidHsmConfigurationStateFault for service response error code - // "InvalidHsmConfigurationStateFault". - // - // The specified HSM configuration is not in the available state, or it is still - // in use by one or more Amazon Redshift clusters. - ErrCodeInvalidHsmConfigurationStateFault = "InvalidHsmConfigurationStateFault" - - // ErrCodeInvalidReservedNodeStateFault for service response error code - // "InvalidReservedNodeState". - // - // Indicates that the Reserved Node being exchanged is not in an active state. - ErrCodeInvalidReservedNodeStateFault = "InvalidReservedNodeState" - - // ErrCodeInvalidRestoreFault for service response error code - // "InvalidRestore". - // - // The restore is invalid. - ErrCodeInvalidRestoreFault = "InvalidRestore" - - // ErrCodeInvalidRetentionPeriodFault for service response error code - // "InvalidRetentionPeriodFault". - // - // The retention period specified is either in the past or is not a valid value. - // - // The value must be either -1 or an integer between 1 and 3,653. - ErrCodeInvalidRetentionPeriodFault = "InvalidRetentionPeriodFault" - - // ErrCodeInvalidS3BucketNameFault for service response error code - // "InvalidS3BucketNameFault". - // - // The S3 bucket name is invalid. For more information about naming rules, go - // to Bucket Restrictions and Limitations (http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html) - // in the Amazon Simple Storage Service (S3) Developer Guide. - ErrCodeInvalidS3BucketNameFault = "InvalidS3BucketNameFault" - - // ErrCodeInvalidS3KeyPrefixFault for service response error code - // "InvalidS3KeyPrefixFault". - // - // The string specified for the logging S3 key prefix does not comply with the - // documented constraints. - ErrCodeInvalidS3KeyPrefixFault = "InvalidS3KeyPrefixFault" - - // ErrCodeInvalidScheduleFault for service response error code - // "InvalidSchedule". - // - // The schedule you submitted isn't valid. - ErrCodeInvalidScheduleFault = "InvalidSchedule" - - // ErrCodeInvalidSnapshotCopyGrantStateFault for service response error code - // "InvalidSnapshotCopyGrantStateFault". - // - // The snapshot copy grant can't be deleted because it is used by one or more - // clusters. - ErrCodeInvalidSnapshotCopyGrantStateFault = "InvalidSnapshotCopyGrantStateFault" - - // ErrCodeInvalidSubnet for service response error code - // "InvalidSubnet". - // - // The requested subnet is not valid, or not all of the subnets are in the same - // VPC. - ErrCodeInvalidSubnet = "InvalidSubnet" - - // ErrCodeInvalidSubscriptionStateFault for service response error code - // "InvalidSubscriptionStateFault". - // - // The subscription request is invalid because it is a duplicate request. This - // subscription request is already in progress. - ErrCodeInvalidSubscriptionStateFault = "InvalidSubscriptionStateFault" - - // ErrCodeInvalidTableRestoreArgumentFault for service response error code - // "InvalidTableRestoreArgument". - // - // The value specified for the sourceDatabaseName, sourceSchemaName, or sourceTableName - // parameter, or a combination of these, doesn't exist in the snapshot. - ErrCodeInvalidTableRestoreArgumentFault = "InvalidTableRestoreArgument" - - // ErrCodeInvalidTagFault for service response error code - // "InvalidTagFault". - // - // The tag is invalid. - ErrCodeInvalidTagFault = "InvalidTagFault" - - // ErrCodeInvalidVPCNetworkStateFault for service response error code - // "InvalidVPCNetworkStateFault". - // - // The cluster subnet group does not cover all Availability Zones. - ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault" - - // ErrCodeLimitExceededFault for service response error code - // "LimitExceededFault". - // - // The encryption key has exceeded its grant limit in AWS KMS. - ErrCodeLimitExceededFault = "LimitExceededFault" - - // ErrCodeNumberOfNodesPerClusterLimitExceededFault for service response error code - // "NumberOfNodesPerClusterLimitExceeded". - // - // The operation would exceed the number of nodes allowed for a cluster. - ErrCodeNumberOfNodesPerClusterLimitExceededFault = "NumberOfNodesPerClusterLimitExceeded" - - // ErrCodeNumberOfNodesQuotaExceededFault for service response error code - // "NumberOfNodesQuotaExceeded". - // - // The operation would exceed the number of nodes allotted to the account. For - // information about increasing your quota, go to Limits in Amazon Redshift - // (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) - // in the Amazon Redshift Cluster Management Guide. - ErrCodeNumberOfNodesQuotaExceededFault = "NumberOfNodesQuotaExceeded" - - // ErrCodeReservedNodeAlreadyExistsFault for service response error code - // "ReservedNodeAlreadyExists". - // - // User already has a reservation with the given identifier. - ErrCodeReservedNodeAlreadyExistsFault = "ReservedNodeAlreadyExists" - - // ErrCodeReservedNodeAlreadyMigratedFault for service response error code - // "ReservedNodeAlreadyMigrated". - // - // Indicates that the reserved node has already been exchanged. - ErrCodeReservedNodeAlreadyMigratedFault = "ReservedNodeAlreadyMigrated" - - // ErrCodeReservedNodeNotFoundFault for service response error code - // "ReservedNodeNotFound". - // - // The specified reserved compute node not found. - ErrCodeReservedNodeNotFoundFault = "ReservedNodeNotFound" - - // ErrCodeReservedNodeOfferingNotFoundFault for service response error code - // "ReservedNodeOfferingNotFound". - // - // Specified offering does not exist. - ErrCodeReservedNodeOfferingNotFoundFault = "ReservedNodeOfferingNotFound" - - // ErrCodeReservedNodeQuotaExceededFault for service response error code - // "ReservedNodeQuotaExceeded". - // - // Request would exceed the user's compute node quota. For information about - // increasing your quota, go to Limits in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) - // in the Amazon Redshift Cluster Management Guide. - ErrCodeReservedNodeQuotaExceededFault = "ReservedNodeQuotaExceeded" - - // ErrCodeResizeNotFoundFault for service response error code - // "ResizeNotFound". - // - // A resize operation for the specified cluster is not found. - ErrCodeResizeNotFoundFault = "ResizeNotFound" - - // ErrCodeResourceNotFoundFault for service response error code - // "ResourceNotFoundFault". - // - // The resource could not be found. - ErrCodeResourceNotFoundFault = "ResourceNotFoundFault" - - // ErrCodeSNSInvalidTopicFault for service response error code - // "SNSInvalidTopic". - // - // Amazon SNS has responded that there is a problem with the specified Amazon - // SNS topic. - ErrCodeSNSInvalidTopicFault = "SNSInvalidTopic" - - // ErrCodeSNSNoAuthorizationFault for service response error code - // "SNSNoAuthorization". - // - // You do not have permission to publish to the specified Amazon SNS topic. - ErrCodeSNSNoAuthorizationFault = "SNSNoAuthorization" - - // ErrCodeSNSTopicArnNotFoundFault for service response error code - // "SNSTopicArnNotFound". - // - // An Amazon SNS topic with the specified Amazon Resource Name (ARN) does not - // exist. - ErrCodeSNSTopicArnNotFoundFault = "SNSTopicArnNotFound" - - // ErrCodeScheduleDefinitionTypeUnsupportedFault for service response error code - // "ScheduleDefinitionTypeUnsupported". - // - // The definition you submitted is not supported. - ErrCodeScheduleDefinitionTypeUnsupportedFault = "ScheduleDefinitionTypeUnsupported" - - // ErrCodeSnapshotCopyAlreadyDisabledFault for service response error code - // "SnapshotCopyAlreadyDisabledFault". - // - // The cluster already has cross-region snapshot copy disabled. - ErrCodeSnapshotCopyAlreadyDisabledFault = "SnapshotCopyAlreadyDisabledFault" - - // ErrCodeSnapshotCopyAlreadyEnabledFault for service response error code - // "SnapshotCopyAlreadyEnabledFault". - // - // The cluster already has cross-region snapshot copy enabled. - ErrCodeSnapshotCopyAlreadyEnabledFault = "SnapshotCopyAlreadyEnabledFault" - - // ErrCodeSnapshotCopyDisabledFault for service response error code - // "SnapshotCopyDisabledFault". - // - // Cross-region snapshot copy was temporarily disabled. Try your request again. - ErrCodeSnapshotCopyDisabledFault = "SnapshotCopyDisabledFault" - - // ErrCodeSnapshotCopyGrantAlreadyExistsFault for service response error code - // "SnapshotCopyGrantAlreadyExistsFault". - // - // The snapshot copy grant can't be created because a grant with the same name - // already exists. - ErrCodeSnapshotCopyGrantAlreadyExistsFault = "SnapshotCopyGrantAlreadyExistsFault" - - // ErrCodeSnapshotCopyGrantNotFoundFault for service response error code - // "SnapshotCopyGrantNotFoundFault". - // - // The specified snapshot copy grant can't be found. Make sure that the name - // is typed correctly and that the grant exists in the destination region. - ErrCodeSnapshotCopyGrantNotFoundFault = "SnapshotCopyGrantNotFoundFault" - - // ErrCodeSnapshotCopyGrantQuotaExceededFault for service response error code - // "SnapshotCopyGrantQuotaExceededFault". - // - // The AWS account has exceeded the maximum number of snapshot copy grants in - // this region. - ErrCodeSnapshotCopyGrantQuotaExceededFault = "SnapshotCopyGrantQuotaExceededFault" - - // ErrCodeSnapshotScheduleAlreadyExistsFault for service response error code - // "SnapshotScheduleAlreadyExists". - // - // The specified snapshot schedule already exists. - ErrCodeSnapshotScheduleAlreadyExistsFault = "SnapshotScheduleAlreadyExists" - - // ErrCodeSnapshotScheduleNotFoundFault for service response error code - // "SnapshotScheduleNotFound". - // - // We could not find the specified snapshot schedule. - ErrCodeSnapshotScheduleNotFoundFault = "SnapshotScheduleNotFound" - - // ErrCodeSnapshotScheduleQuotaExceededFault for service response error code - // "SnapshotScheduleQuotaExceeded". - // - // You have exceeded the quota of snapshot schedules. - ErrCodeSnapshotScheduleQuotaExceededFault = "SnapshotScheduleQuotaExceeded" - - // ErrCodeSnapshotScheduleUpdateInProgressFault for service response error code - // "SnapshotScheduleUpdateInProgress". - // - // The specified snapshot schedule is already being updated. - ErrCodeSnapshotScheduleUpdateInProgressFault = "SnapshotScheduleUpdateInProgress" - - // ErrCodeSourceNotFoundFault for service response error code - // "SourceNotFound". - // - // The specified Amazon Redshift event source could not be found. - ErrCodeSourceNotFoundFault = "SourceNotFound" - - // ErrCodeSubnetAlreadyInUse for service response error code - // "SubnetAlreadyInUse". - // - // A specified subnet is already in use by another cluster. - ErrCodeSubnetAlreadyInUse = "SubnetAlreadyInUse" - - // ErrCodeSubscriptionAlreadyExistFault for service response error code - // "SubscriptionAlreadyExist". - // - // There is already an existing event notification subscription with the specified - // name. - ErrCodeSubscriptionAlreadyExistFault = "SubscriptionAlreadyExist" - - // ErrCodeSubscriptionCategoryNotFoundFault for service response error code - // "SubscriptionCategoryNotFound". - // - // The value specified for the event category was not one of the allowed values, - // or it specified a category that does not apply to the specified source type. - // The allowed values are Configuration, Management, Monitoring, and Security. - ErrCodeSubscriptionCategoryNotFoundFault = "SubscriptionCategoryNotFound" - - // ErrCodeSubscriptionEventIdNotFoundFault for service response error code - // "SubscriptionEventIdNotFound". - // - // An Amazon Redshift event with the specified event ID does not exist. - ErrCodeSubscriptionEventIdNotFoundFault = "SubscriptionEventIdNotFound" - - // ErrCodeSubscriptionNotFoundFault for service response error code - // "SubscriptionNotFound". - // - // An Amazon Redshift event notification subscription with the specified name - // does not exist. - ErrCodeSubscriptionNotFoundFault = "SubscriptionNotFound" - - // ErrCodeSubscriptionSeverityNotFoundFault for service response error code - // "SubscriptionSeverityNotFound". - // - // The value specified for the event severity was not one of the allowed values, - // or it specified a severity that does not apply to the specified source type. - // The allowed values are ERROR and INFO. - ErrCodeSubscriptionSeverityNotFoundFault = "SubscriptionSeverityNotFound" - - // ErrCodeTableLimitExceededFault for service response error code - // "TableLimitExceeded". - // - // The number of tables in the cluster exceeds the limit for the requested new - // cluster node type. - ErrCodeTableLimitExceededFault = "TableLimitExceeded" - - // ErrCodeTableRestoreNotFoundFault for service response error code - // "TableRestoreNotFoundFault". - // - // The specified TableRestoreRequestId value was not found. - ErrCodeTableRestoreNotFoundFault = "TableRestoreNotFoundFault" - - // ErrCodeTagLimitExceededFault for service response error code - // "TagLimitExceededFault". - // - // You have exceeded the number of tags allowed. - ErrCodeTagLimitExceededFault = "TagLimitExceededFault" - - // ErrCodeUnauthorizedOperation for service response error code - // "UnauthorizedOperation". - // - // Your account is not authorized to perform the requested operation. - ErrCodeUnauthorizedOperation = "UnauthorizedOperation" - - // ErrCodeUnknownSnapshotCopyRegionFault for service response error code - // "UnknownSnapshotCopyRegionFault". - // - // The specified region is incorrect or does not exist. - ErrCodeUnknownSnapshotCopyRegionFault = "UnknownSnapshotCopyRegionFault" - - // ErrCodeUnsupportedOperationFault for service response error code - // "UnsupportedOperation". - // - // The requested operation isn't supported. - ErrCodeUnsupportedOperationFault = "UnsupportedOperation" - - // ErrCodeUnsupportedOptionFault for service response error code - // "UnsupportedOptionFault". - // - // A request option was specified that is not supported. - ErrCodeUnsupportedOptionFault = "UnsupportedOptionFault" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/service.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/service.go deleted file mode 100644 index a750d141c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package redshift - -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/query" -) - -// Redshift provides the API operation methods for making requests to -// Amazon Redshift. See this package's package overview docs -// for details on the service. -// -// Redshift methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Redshift 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 = "redshift" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Redshift" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Redshift client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Redshift client from just a session. -// svc := redshift.New(mySession) -// -// // Create a Redshift client with additional configuration -// svc := redshift.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Redshift { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Redshift { - svc := &Redshift{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2012-12-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Redshift operation and runs any -// custom request initialization. -func (c *Redshift) 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/redshift/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/waiters.go deleted file mode 100644 index 6bd0f1f59..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/waiters.go +++ /dev/null @@ -1,229 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package redshift - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilClusterAvailable uses the Amazon Redshift API operation -// DescribeClusters to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *Redshift) WaitUntilClusterAvailable(input *DescribeClustersInput) error { - return c.WaitUntilClusterAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilClusterAvailableWithContext is an extended version of WaitUntilClusterAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) WaitUntilClusterAvailableWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilClusterAvailable", - MaxAttempts: 30, - Delay: request.ConstantWaiterDelay(60 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Clusters[].ClusterStatus", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Clusters[].ClusterStatus", - Expected: "deleting", - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ClusterNotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeClustersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClustersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilClusterDeleted uses the Amazon Redshift API operation -// DescribeClusters to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *Redshift) WaitUntilClusterDeleted(input *DescribeClustersInput) error { - return c.WaitUntilClusterDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilClusterDeletedWithContext is an extended version of WaitUntilClusterDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) WaitUntilClusterDeletedWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilClusterDeleted", - MaxAttempts: 30, - Delay: request.ConstantWaiterDelay(60 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ClusterNotFound", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Clusters[].ClusterStatus", - Expected: "creating", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Clusters[].ClusterStatus", - Expected: "modifying", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeClustersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClustersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilClusterRestored uses the Amazon Redshift API operation -// DescribeClusters to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *Redshift) WaitUntilClusterRestored(input *DescribeClustersInput) error { - return c.WaitUntilClusterRestoredWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilClusterRestoredWithContext is an extended version of WaitUntilClusterRestored. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) WaitUntilClusterRestoredWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilClusterRestored", - MaxAttempts: 30, - Delay: request.ConstantWaiterDelay(60 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Clusters[].RestoreStatus.Status", - Expected: "completed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Clusters[].ClusterStatus", - Expected: "deleting", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeClustersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClustersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilSnapshotAvailable uses the Amazon Redshift API operation -// DescribeClusterSnapshots to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *Redshift) WaitUntilSnapshotAvailable(input *DescribeClusterSnapshotsInput) error { - return c.WaitUntilSnapshotAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilSnapshotAvailableWithContext is an extended version of WaitUntilSnapshotAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Redshift) WaitUntilSnapshotAvailableWithContext(ctx aws.Context, input *DescribeClusterSnapshotsInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilSnapshotAvailable", - MaxAttempts: 20, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "Snapshots[].Status", - Expected: "available", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Snapshots[].Status", - Expected: "failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "Snapshots[].Status", - Expected: "deleted", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeClusterSnapshotsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeClusterSnapshotsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/api.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/api.go deleted file mode 100644 index 3343d13d4..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/api.go +++ /dev/null @@ -1,2839 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package resourcegroups - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" -) - -const 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/resource-groups-2017-11-27/CreateGroup -func (c *ResourceGroups) CreateGroupRequest(input *CreateGroupInput) (req *request.Request, output *CreateGroupOutput) { - op := &request.Operation{ - Name: opCreateGroup, - HTTPMethod: "POST", - HTTPPath: "/groups", - } - - if input == nil { - input = &CreateGroupInput{} - } - - output = &CreateGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateGroup API operation for AWS Resource Groups. -// -// Creates a group with a specified name, description, and resource query. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Groups's -// API operation CreateGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request does not comply with validation rules that are defined for the -// request parameters. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The caller is not authorized to make the request. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// The request uses an HTTP method which is not allowed for the specified resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The caller has exceeded throttling limits. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal error occurred while processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/CreateGroup -func (c *ResourceGroups) 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 *ResourceGroups) 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 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/resource-groups-2017-11-27/DeleteGroup -func (c *ResourceGroups) DeleteGroupRequest(input *DeleteGroupInput) (req *request.Request, output *DeleteGroupOutput) { - op := &request.Operation{ - Name: opDeleteGroup, - HTTPMethod: "DELETE", - HTTPPath: "/groups/{GroupName}", - } - - if input == nil { - input = &DeleteGroupInput{} - } - - output = &DeleteGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteGroup API operation for AWS Resource Groups. -// -// Deletes a specified resource group. Deleting a resource group does not delete -// resources that are members of the group; it only deletes the group structure. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Groups's -// API operation DeleteGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request does not comply with validation rules that are defined for the -// request parameters. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The caller is not authorized to make the request. -// -// * ErrCodeNotFoundException "NotFoundException" -// One or more resources specified in the request do not exist. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// The request uses an HTTP method which is not allowed for the specified resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The caller has exceeded throttling limits. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal error occurred while processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/DeleteGroup -func (c *ResourceGroups) 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 *ResourceGroups) 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 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/resource-groups-2017-11-27/GetGroup -func (c *ResourceGroups) GetGroupRequest(input *GetGroupInput) (req *request.Request, output *GetGroupOutput) { - op := &request.Operation{ - Name: opGetGroup, - HTTPMethod: "GET", - HTTPPath: "/groups/{GroupName}", - } - - if input == nil { - input = &GetGroupInput{} - } - - output = &GetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGroup API operation for AWS Resource Groups. -// -// Returns information about a specified resource 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 Resource Groups's -// API operation GetGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request does not comply with validation rules that are defined for the -// request parameters. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The caller is not authorized to make the request. -// -// * ErrCodeNotFoundException "NotFoundException" -// One or more resources specified in the request do not exist. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// The request uses an HTTP method which is not allowed for the specified resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The caller has exceeded throttling limits. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal error occurred while processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroup -func (c *ResourceGroups) 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 *ResourceGroups) 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 opGetGroupQuery = "GetGroupQuery" - -// GetGroupQueryRequest generates a "aws/request.Request" representing the -// client's request for the GetGroupQuery operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetGroupQuery for more information on using the GetGroupQuery -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetGroupQueryRequest method. -// req, resp := client.GetGroupQueryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroupQuery -func (c *ResourceGroups) GetGroupQueryRequest(input *GetGroupQueryInput) (req *request.Request, output *GetGroupQueryOutput) { - op := &request.Operation{ - Name: opGetGroupQuery, - HTTPMethod: "GET", - HTTPPath: "/groups/{GroupName}/query", - } - - if input == nil { - input = &GetGroupQueryInput{} - } - - output = &GetGroupQueryOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGroupQuery API operation for AWS Resource Groups. -// -// Returns the resource query associated with the specified resource 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 Resource Groups's -// API operation GetGroupQuery for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request does not comply with validation rules that are defined for the -// request parameters. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The caller is not authorized to make the request. -// -// * ErrCodeNotFoundException "NotFoundException" -// One or more resources specified in the request do not exist. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// The request uses an HTTP method which is not allowed for the specified resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The caller has exceeded throttling limits. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal error occurred while processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroupQuery -func (c *ResourceGroups) GetGroupQuery(input *GetGroupQueryInput) (*GetGroupQueryOutput, error) { - req, out := c.GetGroupQueryRequest(input) - return out, req.Send() -} - -// GetGroupQueryWithContext is the same as GetGroupQuery with the addition of -// the ability to pass a context and additional request options. -// -// See GetGroupQuery for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroups) GetGroupQueryWithContext(ctx aws.Context, input *GetGroupQueryInput, opts ...request.Option) (*GetGroupQueryOutput, error) { - req, out := c.GetGroupQueryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTags = "GetTags" - -// GetTagsRequest generates a "aws/request.Request" representing the -// client's request for the GetTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTags for more information on using the GetTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTagsRequest method. -// req, resp := client.GetTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetTags -func (c *ResourceGroups) GetTagsRequest(input *GetTagsInput) (req *request.Request, output *GetTagsOutput) { - op := &request.Operation{ - Name: opGetTags, - HTTPMethod: "GET", - HTTPPath: "/resources/{Arn}/tags", - } - - if input == nil { - input = &GetTagsInput{} - } - - output = &GetTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTags API operation for AWS Resource Groups. -// -// Returns a list of tags that are associated with a resource, specified by -// an 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 Resource Groups's -// API operation GetTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request does not comply with validation rules that are defined for the -// request parameters. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The caller is not authorized to make the request. -// -// * ErrCodeNotFoundException "NotFoundException" -// One or more resources specified in the request do not exist. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// The request uses an HTTP method which is not allowed for the specified resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The caller has exceeded throttling limits. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal error occurred while processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetTags -func (c *ResourceGroups) GetTags(input *GetTagsInput) (*GetTagsOutput, error) { - req, out := c.GetTagsRequest(input) - return out, req.Send() -} - -// GetTagsWithContext is the same as GetTags with the addition of -// the ability to pass a context and additional request options. -// -// See GetTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroups) GetTagsWithContext(ctx aws.Context, input *GetTagsInput, opts ...request.Option) (*GetTagsOutput, error) { - req, out := c.GetTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListGroupResources = "ListGroupResources" - -// ListGroupResourcesRequest generates a "aws/request.Request" representing the -// client's request for the ListGroupResources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListGroupResources for more information on using the ListGroupResources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListGroupResourcesRequest method. -// req, resp := client.ListGroupResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroupResources -func (c *ResourceGroups) ListGroupResourcesRequest(input *ListGroupResourcesInput) (req *request.Request, output *ListGroupResourcesOutput) { - op := &request.Operation{ - Name: opListGroupResources, - HTTPMethod: "POST", - HTTPPath: "/groups/{GroupName}/resource-identifiers-list", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListGroupResourcesInput{} - } - - output = &ListGroupResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGroupResources API operation for AWS Resource Groups. -// -// Returns a list of ARNs of resources that are members of a specified resource -// 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 Resource Groups's -// API operation ListGroupResources for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request has not been applied because it lacks valid authentication credentials -// for the target resource. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request does not comply with validation rules that are defined for the -// request parameters. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The caller is not authorized to make the request. -// -// * ErrCodeNotFoundException "NotFoundException" -// One or more resources specified in the request do not exist. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// The request uses an HTTP method which is not allowed for the specified resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The caller has exceeded throttling limits. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal error occurred while processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroupResources -func (c *ResourceGroups) ListGroupResources(input *ListGroupResourcesInput) (*ListGroupResourcesOutput, error) { - req, out := c.ListGroupResourcesRequest(input) - return out, req.Send() -} - -// ListGroupResourcesWithContext is the same as ListGroupResources with the addition of -// the ability to pass a context and additional request options. -// -// See ListGroupResources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroups) ListGroupResourcesWithContext(ctx aws.Context, input *ListGroupResourcesInput, opts ...request.Option) (*ListGroupResourcesOutput, error) { - req, out := c.ListGroupResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListGroupResourcesPages iterates over the pages of a ListGroupResources operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListGroupResources 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 ListGroupResources operation. -// pageNum := 0 -// err := client.ListGroupResourcesPages(params, -// func(page *ListGroupResourcesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ResourceGroups) ListGroupResourcesPages(input *ListGroupResourcesInput, fn func(*ListGroupResourcesOutput, bool) bool) error { - return c.ListGroupResourcesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListGroupResourcesPagesWithContext same as ListGroupResourcesPages 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 *ResourceGroups) ListGroupResourcesPagesWithContext(ctx aws.Context, input *ListGroupResourcesInput, fn func(*ListGroupResourcesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListGroupResourcesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListGroupResourcesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListGroupResourcesOutput), !p.HasNextPage()) - } - return p.Err() -} - -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/resource-groups-2017-11-27/ListGroups -func (c *ResourceGroups) ListGroupsRequest(input *ListGroupsInput) (req *request.Request, output *ListGroupsOutput) { - op := &request.Operation{ - Name: opListGroups, - HTTPMethod: "POST", - HTTPPath: "/groups-list", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListGroupsInput{} - } - - output = &ListGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGroups API operation for AWS Resource Groups. -// -// Returns a list of existing resource groups in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Groups's -// API operation ListGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request does not comply with validation rules that are defined for the -// request parameters. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The caller is not authorized to make the request. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// The request uses an HTTP method which is not allowed for the specified resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The caller has exceeded throttling limits. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal error occurred while processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroups -func (c *ResourceGroups) 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 *ResourceGroups) 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() -} - -// ListGroupsPages iterates over the pages of a ListGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListGroups 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 ListGroups operation. -// pageNum := 0 -// err := client.ListGroupsPages(params, -// func(page *ListGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ResourceGroups) ListGroupsPages(input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool) error { - return c.ListGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListGroupsPagesWithContext same as ListGroupsPages 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 *ResourceGroups) ListGroupsPagesWithContext(ctx aws.Context, input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opSearchResources = "SearchResources" - -// SearchResourcesRequest generates a "aws/request.Request" representing the -// client's request for the SearchResources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SearchResources for more information on using the SearchResources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SearchResourcesRequest method. -// req, resp := client.SearchResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/SearchResources -func (c *ResourceGroups) SearchResourcesRequest(input *SearchResourcesInput) (req *request.Request, output *SearchResourcesOutput) { - op := &request.Operation{ - Name: opSearchResources, - HTTPMethod: "POST", - HTTPPath: "/resources/search", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &SearchResourcesInput{} - } - - output = &SearchResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// SearchResources API operation for AWS Resource Groups. -// -// Returns a list of AWS resource identifiers that matches a specified query. -// The query uses the same format as a resource query in a CreateGroup or UpdateGroupQuery -// operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Groups's -// API operation SearchResources for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The request has not been applied because it lacks valid authentication credentials -// for the target resource. -// -// * ErrCodeBadRequestException "BadRequestException" -// The request does not comply with validation rules that are defined for the -// request parameters. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The caller is not authorized to make the request. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// The request uses an HTTP method which is not allowed for the specified resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The caller has exceeded throttling limits. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal error occurred while processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/SearchResources -func (c *ResourceGroups) SearchResources(input *SearchResourcesInput) (*SearchResourcesOutput, error) { - req, out := c.SearchResourcesRequest(input) - return out, req.Send() -} - -// SearchResourcesWithContext is the same as SearchResources with the addition of -// the ability to pass a context and additional request options. -// -// See SearchResources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroups) SearchResourcesWithContext(ctx aws.Context, input *SearchResourcesInput, opts ...request.Option) (*SearchResourcesOutput, error) { - req, out := c.SearchResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// SearchResourcesPages iterates over the pages of a SearchResources operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See SearchResources 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 SearchResources operation. -// pageNum := 0 -// err := client.SearchResourcesPages(params, -// func(page *SearchResourcesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ResourceGroups) SearchResourcesPages(input *SearchResourcesInput, fn func(*SearchResourcesOutput, bool) bool) error { - return c.SearchResourcesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// SearchResourcesPagesWithContext same as SearchResourcesPages 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 *ResourceGroups) SearchResourcesPagesWithContext(ctx aws.Context, input *SearchResourcesInput, fn func(*SearchResourcesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *SearchResourcesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.SearchResourcesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SearchResourcesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opTag = "Tag" - -// TagRequest generates a "aws/request.Request" representing the -// client's request for the Tag operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See Tag for more information on using the Tag -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TagRequest method. -// req, resp := client.TagRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Tag -func (c *ResourceGroups) TagRequest(input *TagInput) (req *request.Request, output *TagOutput) { - op := &request.Operation{ - Name: opTag, - HTTPMethod: "PUT", - HTTPPath: "/resources/{Arn}/tags", - } - - if input == nil { - input = &TagInput{} - } - - output = &TagOutput{} - req = c.newRequest(op, input, output) - return -} - -// Tag API operation for AWS Resource Groups. -// -// Adds specified tags to a resource with the specified ARN. Existing tags on -// a resource are not changed if they are not specified in 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 Resource Groups's -// API operation Tag for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request does not comply with validation rules that are defined for the -// request parameters. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The caller is not authorized to make the request. -// -// * ErrCodeNotFoundException "NotFoundException" -// One or more resources specified in the request do not exist. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// The request uses an HTTP method which is not allowed for the specified resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The caller has exceeded throttling limits. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal error occurred while processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Tag -func (c *ResourceGroups) Tag(input *TagInput) (*TagOutput, error) { - req, out := c.TagRequest(input) - return out, req.Send() -} - -// TagWithContext is the same as Tag with the addition of -// the ability to pass a context and additional request options. -// -// See Tag for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroups) TagWithContext(ctx aws.Context, input *TagInput, opts ...request.Option) (*TagOutput, error) { - req, out := c.TagRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntag = "Untag" - -// UntagRequest generates a "aws/request.Request" representing the -// client's request for the Untag operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See Untag for more information on using the Untag -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UntagRequest method. -// req, resp := client.UntagRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Untag -func (c *ResourceGroups) UntagRequest(input *UntagInput) (req *request.Request, output *UntagOutput) { - op := &request.Operation{ - Name: opUntag, - HTTPMethod: "PATCH", - HTTPPath: "/resources/{Arn}/tags", - } - - if input == nil { - input = &UntagInput{} - } - - output = &UntagOutput{} - req = c.newRequest(op, input, output) - return -} - -// Untag API operation for AWS Resource Groups. -// -// Deletes specified tags from a specified resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Groups's -// API operation Untag for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request does not comply with validation rules that are defined for the -// request parameters. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The caller is not authorized to make the request. -// -// * ErrCodeNotFoundException "NotFoundException" -// One or more resources specified in the request do not exist. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// The request uses an HTTP method which is not allowed for the specified resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The caller has exceeded throttling limits. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal error occurred while processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Untag -func (c *ResourceGroups) Untag(input *UntagInput) (*UntagOutput, error) { - req, out := c.UntagRequest(input) - return out, req.Send() -} - -// UntagWithContext is the same as Untag with the addition of -// the ability to pass a context and additional request options. -// -// See Untag for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroups) UntagWithContext(ctx aws.Context, input *UntagInput, opts ...request.Option) (*UntagOutput, error) { - req, out := c.UntagRequest(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/resource-groups-2017-11-27/UpdateGroup -func (c *ResourceGroups) UpdateGroupRequest(input *UpdateGroupInput) (req *request.Request, output *UpdateGroupOutput) { - op := &request.Operation{ - Name: opUpdateGroup, - HTTPMethod: "PUT", - HTTPPath: "/groups/{GroupName}", - } - - if input == nil { - input = &UpdateGroupInput{} - } - - output = &UpdateGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateGroup API operation for AWS Resource Groups. -// -// Updates an existing group with a new or changed description. You cannot update -// the name of a resource 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 Resource Groups's -// API operation UpdateGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request does not comply with validation rules that are defined for the -// request parameters. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The caller is not authorized to make the request. -// -// * ErrCodeNotFoundException "NotFoundException" -// One or more resources specified in the request do not exist. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// The request uses an HTTP method which is not allowed for the specified resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The caller has exceeded throttling limits. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal error occurred while processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroup -func (c *ResourceGroups) 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 *ResourceGroups) 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 opUpdateGroupQuery = "UpdateGroupQuery" - -// UpdateGroupQueryRequest generates a "aws/request.Request" representing the -// client's request for the UpdateGroupQuery operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateGroupQuery for more information on using the UpdateGroupQuery -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateGroupQueryRequest method. -// req, resp := client.UpdateGroupQueryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroupQuery -func (c *ResourceGroups) UpdateGroupQueryRequest(input *UpdateGroupQueryInput) (req *request.Request, output *UpdateGroupQueryOutput) { - op := &request.Operation{ - Name: opUpdateGroupQuery, - HTTPMethod: "PUT", - HTTPPath: "/groups/{GroupName}/query", - } - - if input == nil { - input = &UpdateGroupQueryInput{} - } - - output = &UpdateGroupQueryOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateGroupQuery API operation for AWS Resource Groups. -// -// Updates the resource query 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 Resource Groups's -// API operation UpdateGroupQuery for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// The request does not comply with validation rules that are defined for the -// request parameters. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The caller is not authorized to make the request. -// -// * ErrCodeNotFoundException "NotFoundException" -// One or more resources specified in the request do not exist. -// -// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" -// The request uses an HTTP method which is not allowed for the specified resource. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The caller has exceeded throttling limits. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// An internal error occurred while processing the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroupQuery -func (c *ResourceGroups) UpdateGroupQuery(input *UpdateGroupQueryInput) (*UpdateGroupQueryOutput, error) { - req, out := c.UpdateGroupQueryRequest(input) - return out, req.Send() -} - -// UpdateGroupQueryWithContext is the same as UpdateGroupQuery with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateGroupQuery for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroups) UpdateGroupQueryWithContext(ctx aws.Context, input *UpdateGroupQueryInput, opts ...request.Option) (*UpdateGroupQueryOutput, error) { - req, out := c.UpdateGroupQueryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type CreateGroupInput struct { - _ struct{} `type:"structure"` - - // The description of the resource group. Descriptions can have a maximum of - // 511 characters, including letters, numbers, hyphens, underscores, punctuation, - // and spaces. - Description *string `type:"string"` - - // The name of the group, which is the identifier of the group in other operations. - // A resource group name cannot be updated after it is created. A resource group - // name can have a maximum of 128 characters, including letters, numbers, hyphens, - // dots, and underscores. The name cannot start with AWS or aws; these are reserved. - // A resource group name must be unique within your account. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The resource query that determines which AWS resources are members of this - // group. - // - // ResourceQuery is a required field - ResourceQuery *ResourceQuery `type:"structure" required:"true"` - - // The tags to add to the group. A tag is a string-to-string map of key-value - // pairs. Tag keys can have a maximum character length of 128 characters, and - // tag values can have a maximum length of 256 characters. - Tags map[string]*string `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() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateGroupInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.ResourceQuery == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceQuery")) - } - if s.ResourceQuery != nil { - if err := s.ResourceQuery.Validate(); err != nil { - invalidParams.AddNested("ResourceQuery", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateGroupInput) SetDescription(v string) *CreateGroupInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateGroupInput) SetName(v string) *CreateGroupInput { - s.Name = &v - return s -} - -// SetResourceQuery sets the ResourceQuery field's value. -func (s *CreateGroupInput) SetResourceQuery(v *ResourceQuery) *CreateGroupInput { - s.ResourceQuery = 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"` - - // A full description of the resource group after it is created. - Group *Group `type:"structure"` - - // The resource query associated with the group. - ResourceQuery *ResourceQuery `type:"structure"` - - // The tags associated with the group. - Tags map[string]*string `type:"map"` -} - -// 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() -} - -// SetGroup sets the Group field's value. -func (s *CreateGroupOutput) SetGroup(v *Group) *CreateGroupOutput { - s.Group = v - return s -} - -// SetResourceQuery sets the ResourceQuery field's value. -func (s *CreateGroupOutput) SetResourceQuery(v *ResourceQuery) *CreateGroupOutput { - s.ResourceQuery = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateGroupOutput) SetTags(v map[string]*string) *CreateGroupOutput { - s.Tags = v - return s -} - -type DeleteGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the resource group to delete. - // - // GroupName is a required field - GroupName *string `location:"uri" locationName:"GroupName" min:"1" 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.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *DeleteGroupInput) SetGroupName(v string) *DeleteGroupInput { - s.GroupName = &v - return s -} - -type DeleteGroupOutput struct { - _ struct{} `type:"structure"` - - // A full description of the deleted resource group. - Group *Group `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() -} - -// SetGroup sets the Group field's value. -func (s *DeleteGroupOutput) SetGroup(v *Group) *DeleteGroupOutput { - s.Group = v - return s -} - -type GetGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the resource group. - // - // GroupName is a required field - GroupName *string `location:"uri" locationName:"GroupName" min:"1" 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.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *GetGroupInput) SetGroupName(v string) *GetGroupInput { - s.GroupName = &v - return s -} - -type GetGroupOutput struct { - _ struct{} `type:"structure"` - - // A full description of the resource group. - Group *Group `type:"structure"` -} - -// 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() -} - -// SetGroup sets the Group field's value. -func (s *GetGroupOutput) SetGroup(v *Group) *GetGroupOutput { - s.Group = v - return s -} - -type GetGroupQueryInput struct { - _ struct{} `type:"structure"` - - // The name of the resource group. - // - // GroupName is a required field - GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetGroupQueryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGroupQueryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetGroupQueryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetGroupQueryInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *GetGroupQueryInput) SetGroupName(v string) *GetGroupQueryInput { - s.GroupName = &v - return s -} - -type GetGroupQueryOutput struct { - _ struct{} `type:"structure"` - - // The resource query associated with the specified group. - GroupQuery *GroupQuery `type:"structure"` -} - -// String returns the string representation -func (s GetGroupQueryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGroupQueryOutput) GoString() string { - return s.String() -} - -// SetGroupQuery sets the GroupQuery field's value. -func (s *GetGroupQueryOutput) SetGroupQuery(v *GroupQuery) *GetGroupQueryOutput { - s.GroupQuery = v - return s -} - -type GetTagsInput struct { - _ struct{} `type:"structure"` - - // The ARN of the resource for which you want a list of tags. The resource must - // exist within the account you are using. - // - // Arn is a required field - Arn *string `location:"uri" locationName:"Arn" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTagsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetTagsInput) SetArn(v string) *GetTagsInput { - s.Arn = &v - return s -} - -type GetTagsOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the tagged resource. - Arn *string `type:"string"` - - // The tags associated with the specified resource. - Tags map[string]*string `type:"map"` -} - -// String returns the string representation -func (s GetTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTagsOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *GetTagsOutput) SetArn(v string) *GetTagsOutput { - s.Arn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *GetTagsOutput) SetTags(v map[string]*string) *GetTagsOutput { - s.Tags = v - return s -} - -// A resource group. -type Group struct { - _ struct{} `type:"structure"` - - // The description of the resource group. - Description *string `type:"string"` - - // The ARN of a resource group. - // - // GroupArn is a required field - GroupArn *string `type:"string" required:"true"` - - // The name of a resource group. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Group) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Group) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *Group) SetDescription(v string) *Group { - s.Description = &v - return s -} - -// SetGroupArn sets the GroupArn field's value. -func (s *Group) SetGroupArn(v string) *Group { - s.GroupArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *Group) SetName(v string) *Group { - s.Name = &v - return s -} - -// A filter name and value pair that is used to obtain more specific results -// from a list of groups. -type GroupFilter struct { - _ struct{} `type:"structure"` - - // The name of the filter. Filter names are case-sensitive. - // - // Name is a required field - Name *string `type:"string" required:"true" enum:"GroupFilterName"` - - // One or more filter values. Allowed filter values vary by group filter name, - // and are case-sensitive. - // - // Values is a required field - Values []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s GroupFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GroupFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GroupFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GroupFilter"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GroupFilter) SetName(v string) *GroupFilter { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *GroupFilter) SetValues(v []*string) *GroupFilter { - s.Values = v - return s -} - -// The ARN and group name of a group. -type GroupIdentifier struct { - _ struct{} `type:"structure"` - - // The ARN of a resource group. - GroupArn *string `type:"string"` - - // The name of a resource group. - GroupName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GroupIdentifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GroupIdentifier) GoString() string { - return s.String() -} - -// SetGroupArn sets the GroupArn field's value. -func (s *GroupIdentifier) SetGroupArn(v string) *GroupIdentifier { - s.GroupArn = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *GroupIdentifier) SetGroupName(v string) *GroupIdentifier { - s.GroupName = &v - return s -} - -// The underlying resource query of a resource group. Resources that match query -// results are part of the group. -type GroupQuery struct { - _ struct{} `type:"structure"` - - // The name of a resource group that is associated with a specific resource - // query. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The resource query which determines which AWS resources are members of the - // associated resource group. - // - // ResourceQuery is a required field - ResourceQuery *ResourceQuery `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GroupQuery) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GroupQuery) GoString() string { - return s.String() -} - -// SetGroupName sets the GroupName field's value. -func (s *GroupQuery) SetGroupName(v string) *GroupQuery { - s.GroupName = &v - return s -} - -// SetResourceQuery sets the ResourceQuery field's value. -func (s *GroupQuery) SetResourceQuery(v *ResourceQuery) *GroupQuery { - s.ResourceQuery = v - return s -} - -type ListGroupResourcesInput struct { - _ struct{} `type:"structure"` - - // Filters, formatted as ResourceFilter objects, that you want to apply to a - // ListGroupResources operation. - // - // * resource-type - Filter resources by their type. Specify up to five resource - // types in the format AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, - // or AWS::S3::Bucket. - Filters []*ResourceFilter `type:"list"` - - // The name of the resource group. - // - // GroupName is a required field - GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"` - - // The maximum number of group member ARNs that are returned in a single call - // by ListGroupResources, in paginated output. By default, this number is 50. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The NextToken value that is returned in a paginated ListGroupResources request. - // To get the next page of results, run the call again, add the NextToken parameter, - // and specify the NextToken value. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListGroupResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListGroupResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListGroupResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListGroupResourcesInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListGroupResourcesInput) SetFilters(v []*ResourceFilter) *ListGroupResourcesInput { - s.Filters = v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *ListGroupResourcesInput) SetGroupName(v string) *ListGroupResourcesInput { - s.GroupName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListGroupResourcesInput) SetMaxResults(v int64) *ListGroupResourcesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListGroupResourcesInput) SetNextToken(v string) *ListGroupResourcesInput { - s.NextToken = &v - return s -} - -type ListGroupResourcesOutput struct { - _ struct{} `type:"structure"` - - // The NextToken value to include in a subsequent ListGroupResources request, - // to get more results. - NextToken *string `type:"string"` - - // A list of QueryError objects. Each error is an object that contains ErrorCode - // and Message structures. Possible values for ErrorCode are CLOUDFORMATION_STACK_INACTIVE - // and CLOUDFORMATION_STACK_NOT_EXISTING. - QueryErrors []*QueryError `type:"list"` - - // The ARNs and resource types of resources that are members of the group that - // you specified. - ResourceIdentifiers []*ResourceIdentifier `type:"list"` -} - -// String returns the string representation -func (s ListGroupResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListGroupResourcesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListGroupResourcesOutput) SetNextToken(v string) *ListGroupResourcesOutput { - s.NextToken = &v - return s -} - -// SetQueryErrors sets the QueryErrors field's value. -func (s *ListGroupResourcesOutput) SetQueryErrors(v []*QueryError) *ListGroupResourcesOutput { - s.QueryErrors = v - return s -} - -// SetResourceIdentifiers sets the ResourceIdentifiers field's value. -func (s *ListGroupResourcesOutput) SetResourceIdentifiers(v []*ResourceIdentifier) *ListGroupResourcesOutput { - s.ResourceIdentifiers = v - return s -} - -type ListGroupsInput struct { - _ struct{} `type:"structure"` - - // Filters, formatted as GroupFilter objects, that you want to apply to a ListGroups - // operation. - // - // * resource-type - Filter groups by resource type. Specify up to five resource - // types in the format AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, - // or AWS::S3::Bucket. - Filters []*GroupFilter `type:"list"` - - // The maximum number of resource group results that are returned by ListGroups - // in paginated output. By default, this number is 50. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - - // The NextToken value that is returned in a paginated ListGroups request. To - // get the next page of results, run the call again, add the NextToken parameter, - // and specify the NextToken value. - 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() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListGroupsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListGroupsInput) SetFilters(v []*GroupFilter) *ListGroupsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListGroupsInput) SetMaxResults(v int64) *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"` - - // A list of GroupIdentifier objects. Each identifier is an object that contains - // both the GroupName and the GroupArn. - GroupIdentifiers []*GroupIdentifier `type:"list"` - - // A list of resource groups. - // - // Deprecated: This field is deprecated, use GroupIdentifiers instead. - Groups []*Group `deprecated:"true" type:"list"` - - // The NextToken value to include in a subsequent ListGroups request, to get - // more 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() -} - -// SetGroupIdentifiers sets the GroupIdentifiers field's value. -func (s *ListGroupsOutput) SetGroupIdentifiers(v []*GroupIdentifier) *ListGroupsOutput { - s.GroupIdentifiers = v - return s -} - -// SetGroups sets the Groups field's value. -func (s *ListGroupsOutput) SetGroups(v []*Group) *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 -} - -// A two-part error structure that can occur in ListGroupResources or SearchResources -// operations on CloudFormation stack-based queries. The error occurs if the -// CloudFormation stack on which the query is based either does not exist, or -// has a status that renders the stack inactive. A QueryError occurrence does -// not necessarily mean that AWS Resource Groups could not complete the operation, -// but the resulting group might have no member resources. -type QueryError struct { - _ struct{} `type:"structure"` - - // Possible values are CLOUDFORMATION_STACK_INACTIVE and CLOUDFORMATION_STACK_NOT_EXISTING. - ErrorCode *string `type:"string" enum:"QueryErrorCode"` - - // A message that explains the ErrorCode value. Messages might state that the - // specified CloudFormation stack does not exist (or no longer exists). For - // CLOUDFORMATION_STACK_INACTIVE, the message typically states that the CloudFormation - // stack has a status that is not (or no longer) active, such as CREATE_FAILED. - Message *string `type:"string"` -} - -// String returns the string representation -func (s QueryError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryError) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *QueryError) SetErrorCode(v string) *QueryError { - s.ErrorCode = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *QueryError) SetMessage(v string) *QueryError { - s.Message = &v - return s -} - -// A filter name and value pair that is used to obtain more specific results -// from a list of resources. -type ResourceFilter struct { - _ struct{} `type:"structure"` - - // The name of the filter. Filter names are case-sensitive. - // - // Name is a required field - Name *string `type:"string" required:"true" enum:"ResourceFilterName"` - - // One or more filter values. Allowed filter values vary by resource filter - // name, and are case-sensitive. - // - // Values is a required field - Values []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s ResourceFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceFilter"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *ResourceFilter) SetName(v string) *ResourceFilter { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *ResourceFilter) SetValues(v []*string) *ResourceFilter { - s.Values = v - return s -} - -// The ARN of a resource, and its resource type. -type ResourceIdentifier struct { - _ struct{} `type:"structure"` - - // The ARN of a resource. - ResourceArn *string `type:"string"` - - // The resource type of a resource, such as AWS::EC2::Instance. - ResourceType *string `type:"string"` -} - -// String returns the string representation -func (s ResourceIdentifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceIdentifier) GoString() string { - return s.String() -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ResourceIdentifier) SetResourceArn(v string) *ResourceIdentifier { - s.ResourceArn = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ResourceIdentifier) SetResourceType(v string) *ResourceIdentifier { - s.ResourceType = &v - return s -} - -// The query that is used to define a resource group or a search for resources. -type ResourceQuery struct { - _ struct{} `type:"structure"` - - // The query that defines a group or a search. - // - // Query is a required field - Query *string `type:"string" required:"true"` - - // The type of the query. The valid values in this release are TAG_FILTERS_1_0 - // and CLOUDFORMATION_STACK_1_0. - // - // TAG_FILTERS_1_0: A JSON syntax that lets you specify a collection of simple - // tag filters for resource types and tags, as supported by the AWS Tagging - // API GetResources (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_GetResources.html) - // operation. If you specify more than one tag key, only resources that match - // all tag keys, and at least one value of each specified tag key, are returned - // in your query. If you specify more than one value for a tag key, a resource - // matches the filter if it has a tag key value that matches any of the specified - // values. - // - // For example, consider the following sample query for resources that have - // two tags, Stage and Version, with two values each. ([{"Key":"Stage","Values":["Test","Deploy"]},{"Key":"Version","Values":["1","2"]}]) - // The results of this query might include the following. - // - // * An EC2 instance that has the following two tags: {"Key":"Stage","Values":["Deploy"]}, - // and {"Key":"Version","Values":["2"]} - // - // * An S3 bucket that has the following two tags: {"Key":"Stage","Values":["Test","Deploy"]}, - // and {"Key":"Version","Values":["1"]} - // - // The query would not return the following results, however. The following - // EC2 instance does not have all tag keys specified in the filter, so it is - // rejected. The RDS database has all of the tag keys, but no values that match - // at least one of the specified tag key values in the filter. - // - // * An EC2 instance that has only the following tag: {"Key":"Stage","Values":["Deploy"]}. - // - // * An RDS database that has the following two tags: {"Key":"Stage","Values":["Archived"]}, - // and {"Key":"Version","Values":["4"]} - // - // CLOUDFORMATION_STACK_1_0: A JSON syntax that lets you specify a CloudFormation - // stack ARN. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"QueryType"` -} - -// String returns the string representation -func (s ResourceQuery) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceQuery) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceQuery) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceQuery"} - if s.Query == nil { - invalidParams.Add(request.NewErrParamRequired("Query")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQuery sets the Query field's value. -func (s *ResourceQuery) SetQuery(v string) *ResourceQuery { - s.Query = &v - return s -} - -// SetType sets the Type field's value. -func (s *ResourceQuery) SetType(v string) *ResourceQuery { - s.Type = &v - return s -} - -type SearchResourcesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of group member ARNs returned by SearchResources in paginated - // output. By default, this number is 50. - MaxResults *int64 `min:"1" type:"integer"` - - // The NextToken value that is returned in a paginated SearchResources request. - // To get the next page of results, run the call again, add the NextToken parameter, - // and specify the NextToken value. - NextToken *string `type:"string"` - - // The search query, using the same formats that are supported for resource - // group definition. - // - // ResourceQuery is a required field - ResourceQuery *ResourceQuery `type:"structure" required:"true"` -} - -// String returns the string representation -func (s SearchResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SearchResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SearchResourcesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ResourceQuery == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceQuery")) - } - if s.ResourceQuery != nil { - if err := s.ResourceQuery.Validate(); err != nil { - invalidParams.AddNested("ResourceQuery", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *SearchResourcesInput) SetMaxResults(v int64) *SearchResourcesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *SearchResourcesInput) SetNextToken(v string) *SearchResourcesInput { - s.NextToken = &v - return s -} - -// SetResourceQuery sets the ResourceQuery field's value. -func (s *SearchResourcesInput) SetResourceQuery(v *ResourceQuery) *SearchResourcesInput { - s.ResourceQuery = v - return s -} - -type SearchResourcesOutput struct { - _ struct{} `type:"structure"` - - // The NextToken value to include in a subsequent SearchResources request, to - // get more results. - NextToken *string `type:"string"` - - // A list of QueryError objects. Each error is an object that contains ErrorCode - // and Message structures. Possible values for ErrorCode are CLOUDFORMATION_STACK_INACTIVE - // and CLOUDFORMATION_STACK_NOT_EXISTING. - QueryErrors []*QueryError `type:"list"` - - // The ARNs and resource types of resources that are members of the group that - // you specified. - ResourceIdentifiers []*ResourceIdentifier `type:"list"` -} - -// String returns the string representation -func (s SearchResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchResourcesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *SearchResourcesOutput) SetNextToken(v string) *SearchResourcesOutput { - s.NextToken = &v - return s -} - -// SetQueryErrors sets the QueryErrors field's value. -func (s *SearchResourcesOutput) SetQueryErrors(v []*QueryError) *SearchResourcesOutput { - s.QueryErrors = v - return s -} - -// SetResourceIdentifiers sets the ResourceIdentifiers field's value. -func (s *SearchResourcesOutput) SetResourceIdentifiers(v []*ResourceIdentifier) *SearchResourcesOutput { - s.ResourceIdentifiers = v - return s -} - -type TagInput struct { - _ struct{} `type:"structure"` - - // The ARN of the resource to which to add tags. - // - // Arn is a required field - Arn *string `location:"uri" locationName:"Arn" type:"string" required:"true"` - - // The tags to add to the specified resource. A tag is a string-to-string map - // of key-value pairs. Tag keys can have a maximum character length of 128 characters, - // and tag values can have a maximum length of 256 characters. - // - // Tags is a required field - Tags map[string]*string `type:"map" required:"true"` -} - -// String returns the string representation -func (s TagInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *TagInput) SetArn(v string) *TagInput { - s.Arn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagInput) SetTags(v map[string]*string) *TagInput { - s.Tags = v - return s -} - -type TagOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the tagged resource. - Arn *string `type:"string"` - - // The tags that have been added to the specified resource. - Tags map[string]*string `type:"map"` -} - -// String returns the string representation -func (s TagOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *TagOutput) SetArn(v string) *TagOutput { - s.Arn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagOutput) SetTags(v map[string]*string) *TagOutput { - s.Tags = v - return s -} - -type UntagInput struct { - _ struct{} `type:"structure"` - - // The ARN of the resource from which to remove tags. - // - // Arn is a required field - Arn *string `location:"uri" locationName:"Arn" type:"string" required:"true"` - - // The keys of the tags to be removed. - // - // Keys is a required field - Keys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s UntagInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) - } - if s.Keys == nil { - invalidParams.Add(request.NewErrParamRequired("Keys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *UntagInput) SetArn(v string) *UntagInput { - s.Arn = &v - return s -} - -// SetKeys sets the Keys field's value. -func (s *UntagInput) SetKeys(v []*string) *UntagInput { - s.Keys = v - return s -} - -type UntagOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the resource from which tags have been removed. - Arn *string `type:"string"` - - // The keys of tags that have been removed. - Keys []*string `type:"list"` -} - -// String returns the string representation -func (s UntagOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *UntagOutput) SetArn(v string) *UntagOutput { - s.Arn = &v - return s -} - -// SetKeys sets the Keys field's value. -func (s *UntagOutput) SetKeys(v []*string) *UntagOutput { - s.Keys = v - return s -} - -type UpdateGroupInput struct { - _ struct{} `type:"structure"` - - // The description of the resource group. Descriptions can have a maximum of - // 511 characters, including letters, numbers, hyphens, underscores, punctuation, - // and spaces. - Description *string `type:"string"` - - // The name of the resource group for which you want to update its description. - // - // GroupName is a required field - GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"` -} - -// 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.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateGroupInput) SetDescription(v string) *UpdateGroupInput { - s.Description = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *UpdateGroupInput) SetGroupName(v string) *UpdateGroupInput { - s.GroupName = &v - return s -} - -type UpdateGroupOutput struct { - _ struct{} `type:"structure"` - - // The full description of the resource group after it has been updated. - Group *Group `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() -} - -// SetGroup sets the Group field's value. -func (s *UpdateGroupOutput) SetGroup(v *Group) *UpdateGroupOutput { - s.Group = v - return s -} - -type UpdateGroupQueryInput struct { - _ struct{} `type:"structure"` - - // The name of the resource group for which you want to edit the query. - // - // GroupName is a required field - GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"` - - // The resource query that determines which AWS resources are members of the - // resource group. - // - // ResourceQuery is a required field - ResourceQuery *ResourceQuery `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateGroupQueryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGroupQueryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateGroupQueryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateGroupQueryInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.ResourceQuery == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceQuery")) - } - if s.ResourceQuery != nil { - if err := s.ResourceQuery.Validate(); err != nil { - invalidParams.AddNested("ResourceQuery", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *UpdateGroupQueryInput) SetGroupName(v string) *UpdateGroupQueryInput { - s.GroupName = &v - return s -} - -// SetResourceQuery sets the ResourceQuery field's value. -func (s *UpdateGroupQueryInput) SetResourceQuery(v *ResourceQuery) *UpdateGroupQueryInput { - s.ResourceQuery = v - return s -} - -type UpdateGroupQueryOutput struct { - _ struct{} `type:"structure"` - - // The resource query associated with the resource group after the update. - GroupQuery *GroupQuery `type:"structure"` -} - -// String returns the string representation -func (s UpdateGroupQueryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGroupQueryOutput) GoString() string { - return s.String() -} - -// SetGroupQuery sets the GroupQuery field's value. -func (s *UpdateGroupQueryOutput) SetGroupQuery(v *GroupQuery) *UpdateGroupQueryOutput { - s.GroupQuery = v - return s -} - -const ( - // GroupFilterNameResourceType is a GroupFilterName enum value - GroupFilterNameResourceType = "resource-type" -) - -const ( - // QueryErrorCodeCloudformationStackInactive is a QueryErrorCode enum value - QueryErrorCodeCloudformationStackInactive = "CLOUDFORMATION_STACK_INACTIVE" - - // QueryErrorCodeCloudformationStackNotExisting is a QueryErrorCode enum value - QueryErrorCodeCloudformationStackNotExisting = "CLOUDFORMATION_STACK_NOT_EXISTING" -) - -const ( - // QueryTypeTagFilters10 is a QueryType enum value - QueryTypeTagFilters10 = "TAG_FILTERS_1_0" - - // QueryTypeCloudformationStack10 is a QueryType enum value - QueryTypeCloudformationStack10 = "CLOUDFORMATION_STACK_1_0" -) - -const ( - // ResourceFilterNameResourceType is a ResourceFilterName enum value - ResourceFilterNameResourceType = "resource-type" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/doc.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/doc.go deleted file mode 100644 index 5d182652d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/doc.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package resourcegroups provides the client and types for making API -// requests to AWS Resource Groups. -// -// AWS Resource Groups lets you organize AWS resources such as Amazon EC2 instances, -// Amazon Relational Database Service databases, and Amazon S3 buckets into -// groups using criteria that you define as tags. A resource group is a collection -// of resources that match the resource types specified in a query, and share -// one or more tags or portions of tags. You can create a group of resources -// based on their roles in your cloud infrastructure, lifecycle stages, regions, -// application layers, or virtually any criteria. Resource groups enable you -// to automate management tasks, such as those in AWS Systems Manager Automation -// documents, on tag-related resources in AWS Systems Manager. Groups of tagged -// resources also let you quickly view a custom console in AWS Systems Manager -// that shows AWS Config compliance and other monitoring data about member resources. -// -// To create a resource group, build a resource query, and specify tags that -// identify the criteria that members of the group have in common. Tags are -// key-value pairs. -// -// For more information about Resource Groups, see the AWS Resource Groups User -// Guide (https://docs.aws.amazon.com/ARG/latest/userguide/welcome.html). -// -// AWS Resource Groups uses a REST-compliant API that you can use to perform -// the following types of operations. -// -// * Create, Read, Update, and Delete (CRUD) operations on resource groups -// and resource query entities -// -// * Applying, editing, and removing tags from resource groups -// -// * Resolving resource group member ARNs so they can be returned as search -// results -// -// * Getting data about resources that are members of a group -// -// * Searching AWS resources based on a resource query -// -// See https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27 for more information on this service. -// -// See resourcegroups package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/resourcegroups/ -// -// Using the Client -// -// To contact AWS Resource Groups 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 Resource Groups client ResourceGroups for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/resourcegroups/#New -package resourcegroups diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/errors.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/errors.go deleted file mode 100644 index 02234d494..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/errors.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package resourcegroups - -const ( - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - // - // The request does not comply with validation rules that are defined for the - // request parameters. - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeForbiddenException for service response error code - // "ForbiddenException". - // - // The caller is not authorized to make the request. - ErrCodeForbiddenException = "ForbiddenException" - - // ErrCodeInternalServerErrorException for service response error code - // "InternalServerErrorException". - // - // An internal error occurred while processing the request. - ErrCodeInternalServerErrorException = "InternalServerErrorException" - - // ErrCodeMethodNotAllowedException for service response error code - // "MethodNotAllowedException". - // - // The request uses an HTTP method which is not allowed for the specified resource. - ErrCodeMethodNotAllowedException = "MethodNotAllowedException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // One or more resources specified in the request do not exist. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // The caller has exceeded throttling limits. - ErrCodeTooManyRequestsException = "TooManyRequestsException" - - // ErrCodeUnauthorizedException for service response error code - // "UnauthorizedException". - // - // The request has not been applied because it lacks valid authentication credentials - // for the target resource. - ErrCodeUnauthorizedException = "UnauthorizedException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/service.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/service.go deleted file mode 100644 index 46a19ff23..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/service.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package resourcegroups - -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" -) - -// ResourceGroups provides the API operation methods for making requests to -// AWS Resource Groups. See this package's package overview docs -// for details on the service. -// -// ResourceGroups methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ResourceGroups 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 = "resource-groups" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Resource Groups" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ResourceGroups 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 ResourceGroups client from just a session. -// svc := resourcegroups.New(mySession) -// -// // Create a ResourceGroups client with additional configuration -// svc := resourcegroups.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ResourceGroups { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "resource-groups" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ResourceGroups { - svc := &ResourceGroups{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-11-27", - }, - 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 ResourceGroups operation and runs any -// custom request initialization. -func (c *ResourceGroups) 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/route53/api.go b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go deleted file mode 100644 index b73e0deb5..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go +++ /dev/null @@ -1,15242 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package route53 - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restxml" -) - -const opAssociateVPCWithHostedZone = "AssociateVPCWithHostedZone" - -// AssociateVPCWithHostedZoneRequest generates a "aws/request.Request" representing the -// client's request for the AssociateVPCWithHostedZone operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateVPCWithHostedZone for more information on using the AssociateVPCWithHostedZone -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateVPCWithHostedZoneRequest method. -// req, resp := client.AssociateVPCWithHostedZoneRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/AssociateVPCWithHostedZone -func (c *Route53) AssociateVPCWithHostedZoneRequest(input *AssociateVPCWithHostedZoneInput) (req *request.Request, output *AssociateVPCWithHostedZoneOutput) { - op := &request.Operation{ - Name: opAssociateVPCWithHostedZone, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/hostedzone/{Id}/associatevpc", - } - - if input == nil { - input = &AssociateVPCWithHostedZoneInput{} - } - - output = &AssociateVPCWithHostedZoneOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateVPCWithHostedZone API operation for Amazon Route 53. -// -// Associates an Amazon VPC with a private hosted zone. -// -// To perform the association, the VPC and the private hosted zone must already -// exist. You can't convert a public hosted zone into a private hosted zone. -// -// If you want to associate a VPC that was created by using one AWS account -// with a private hosted zone that was created by using a different account, -// the AWS account that created the private hosted zone must first submit a -// CreateVPCAssociationAuthorization request. Then the account that created -// the VPC must submit an AssociateVPCWithHostedZone request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation AssociateVPCWithHostedZone for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodeNotAuthorizedException "NotAuthorizedException" -// Associating the specified VPC with the specified hosted zone has not been -// authorized. -// -// * ErrCodeInvalidVPCId "InvalidVPCId" -// The VPC ID that you specified either isn't a valid ID or the current account -// is not authorized to access this VPC. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodePublicZoneVPCAssociation "PublicZoneVPCAssociation" -// You're trying to associate a VPC with a public hosted zone. Amazon Route -// 53 doesn't support associating a VPC with a public hosted zone. -// -// * ErrCodeConflictingDomainExists "ConflictingDomainExists" -// The cause of this error depends on whether you're trying to create a public -// or a private hosted zone: -// -// * Public hosted zone: Two hosted zones that have the same name or that -// have a parent/child relationship (example.com and test.example.com) can't -// have any common name servers. You tried to create a hosted zone that has -// the same name as an existing hosted zone or that's the parent or child -// of an existing hosted zone, and you specified a delegation set that shares -// one or more name servers with the existing hosted zone. For more information, -// see CreateReusableDelegationSet. -// -// * Private hosted zone: You specified an Amazon VPC that you're already -// using for another hosted zone, and the domain that you specified for one -// of the hosted zones is a subdomain of the domain that you specified for -// the other hosted zone. For example, you can't use the same Amazon VPC -// for the hosted zones for example.com and test.example.com. -// -// * ErrCodeLimitsExceeded "LimitsExceeded" -// This operation can't be completed either because the current account has -// reached the limit on reusable delegation sets that it can create or because -// you've reached the limit on the number of Amazon VPCs that you can associate -// with a private hosted zone. To get the current limit on the number of reusable -// delegation sets, see GetAccountLimit. To get the current limit on the number -// of Amazon VPCs that you can associate with a private hosted zone, see GetHostedZoneLimit. -// To request a higher limit, create a case (http://aws.amazon.com/route53-request) -// with the AWS Support Center. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/AssociateVPCWithHostedZone -func (c *Route53) AssociateVPCWithHostedZone(input *AssociateVPCWithHostedZoneInput) (*AssociateVPCWithHostedZoneOutput, error) { - req, out := c.AssociateVPCWithHostedZoneRequest(input) - return out, req.Send() -} - -// AssociateVPCWithHostedZoneWithContext is the same as AssociateVPCWithHostedZone with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateVPCWithHostedZone for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) AssociateVPCWithHostedZoneWithContext(ctx aws.Context, input *AssociateVPCWithHostedZoneInput, opts ...request.Option) (*AssociateVPCWithHostedZoneOutput, error) { - req, out := c.AssociateVPCWithHostedZoneRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opChangeResourceRecordSets = "ChangeResourceRecordSets" - -// ChangeResourceRecordSetsRequest generates a "aws/request.Request" representing the -// client's request for the ChangeResourceRecordSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ChangeResourceRecordSets for more information on using the ChangeResourceRecordSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ChangeResourceRecordSetsRequest method. -// req, resp := client.ChangeResourceRecordSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ChangeResourceRecordSets -func (c *Route53) ChangeResourceRecordSetsRequest(input *ChangeResourceRecordSetsInput) (req *request.Request, output *ChangeResourceRecordSetsOutput) { - op := &request.Operation{ - Name: opChangeResourceRecordSets, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/hostedzone/{Id}/rrset/", - } - - if input == nil { - input = &ChangeResourceRecordSetsInput{} - } - - output = &ChangeResourceRecordSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ChangeResourceRecordSets API operation for Amazon Route 53. -// -// Creates, changes, or deletes a resource record set, which contains authoritative -// DNS information for a specified domain name or subdomain name. For example, -// you can use ChangeResourceRecordSets to create a resource record set that -// routes traffic for test.example.com to a web server that has an IP address -// of 192.0.2.44. -// -// Change Batches and Transactional Changes -// -// The request body must include a document with a ChangeResourceRecordSetsRequest -// element. The request body contains a list of change items, known as a change -// batch. Change batches are considered transactional changes. When using the -// Amazon Route 53 API to change resource record sets, Route 53 either makes -// all or none of the changes in a change batch request. This ensures that Route -// 53 never partially implements the intended changes to the resource record -// sets in a hosted zone. -// -// For example, a change batch request that deletes the CNAME record for www.example.com -// and creates an alias resource record set for www.example.com. Route 53 deletes -// the first resource record set and creates the second resource record set -// in a single operation. If either the DELETE or the CREATE action fails, then -// both changes (plus any other changes in the batch) fail, and the original -// CNAME record continues to exist. -// -// Due to the nature of transactional changes, you can't delete the same resource -// record set more than once in a single change batch. If you attempt to delete -// the same change batch more than once, Route 53 returns an InvalidChangeBatch -// error. -// -// Traffic Flow -// -// To create resource record sets for complex routing configurations, use either -// the traffic flow visual editor in the Route 53 console or the API actions -// for traffic policies and traffic policy instances. Save the configuration -// as a traffic policy, then associate the traffic policy with one or more domain -// names (such as example.com) or subdomain names (such as www.example.com), -// in the same hosted zone or in multiple hosted zones. You can roll back the -// updates if the new configuration isn't performing as expected. For more information, -// see Using Traffic Flow to Route DNS Traffic (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/traffic-flow.html) -// in the Amazon Route 53 Developer Guide. -// -// Create, Delete, and Upsert -// -// Use ChangeResourceRecordsSetsRequest to perform the following actions: -// -// * CREATE: Creates a resource record set that has the specified values. -// -// * DELETE: Deletes an existing resource record set that has the specified -// values. -// -// * UPSERT: If a resource record set does not already exist, AWS creates -// it. If a resource set does exist, Route 53 updates it with the values -// in the request. -// -// Syntaxes for Creating, Updating, and Deleting Resource Record Sets -// -// The syntax for a request depends on the type of resource record set that -// you want to create, delete, or update, such as weighted, alias, or failover. -// The XML elements in your request must appear in the order listed in the syntax. -// -// For an example for each type of resource record set, see "Examples." -// -// Don't refer to the syntax in the "Parameter Syntax" section, which includes -// all of the elements for every kind of resource record set that you can create, -// delete, or update by using ChangeResourceRecordSets. -// -// Change Propagation to Route 53 DNS Servers -// -// When you submit a ChangeResourceRecordSets request, Route 53 propagates your -// changes to all of the Route 53 authoritative DNS servers. While your changes -// are propagating, GetChange returns a status of PENDING. When propagation -// is complete, GetChange returns a status of INSYNC. Changes generally propagate -// to all Route 53 name servers within 60 seconds. For more information, see -// GetChange. -// -// Limits on ChangeResourceRecordSets Requests -// -// For information about the limits on a ChangeResourceRecordSets request, see -// Limits (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) -// in the Amazon Route 53 Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ChangeResourceRecordSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the specified ID. -// -// * ErrCodeInvalidChangeBatch "InvalidChangeBatch" -// This exception contains a list of messages that might contain one or more -// error messages. Each error message indicates one error in the change batch. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" -// If Amazon Route 53 can't process a request before the next request arrives, -// it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for -// the same request, we recommend that you wait, in intervals of increasing -// duration, before you try the request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ChangeResourceRecordSets -func (c *Route53) ChangeResourceRecordSets(input *ChangeResourceRecordSetsInput) (*ChangeResourceRecordSetsOutput, error) { - req, out := c.ChangeResourceRecordSetsRequest(input) - return out, req.Send() -} - -// ChangeResourceRecordSetsWithContext is the same as ChangeResourceRecordSets with the addition of -// the ability to pass a context and additional request options. -// -// See ChangeResourceRecordSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ChangeResourceRecordSetsWithContext(ctx aws.Context, input *ChangeResourceRecordSetsInput, opts ...request.Option) (*ChangeResourceRecordSetsOutput, error) { - req, out := c.ChangeResourceRecordSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opChangeTagsForResource = "ChangeTagsForResource" - -// ChangeTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ChangeTagsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ChangeTagsForResource for more information on using the ChangeTagsForResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ChangeTagsForResourceRequest method. -// req, resp := client.ChangeTagsForResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ChangeTagsForResource -func (c *Route53) ChangeTagsForResourceRequest(input *ChangeTagsForResourceInput) (req *request.Request, output *ChangeTagsForResourceOutput) { - op := &request.Operation{ - Name: opChangeTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/tags/{ResourceType}/{ResourceId}", - } - - if input == nil { - input = &ChangeTagsForResourceInput{} - } - - output = &ChangeTagsForResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ChangeTagsForResource API operation for Amazon Route 53. -// -// Adds, edits, or deletes tags for a health check or a hosted zone. -// -// For information about using tags for cost allocation, see Using Cost Allocation -// Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) -// in the AWS Billing and Cost Management User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ChangeTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the specified ID. -// -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" -// If Amazon Route 53 can't process a request before the next request arrives, -// it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for -// the same request, we recommend that you wait, in intervals of increasing -// duration, before you try the request again. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The limit on the number of requests per second was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ChangeTagsForResource -func (c *Route53) ChangeTagsForResource(input *ChangeTagsForResourceInput) (*ChangeTagsForResourceOutput, error) { - req, out := c.ChangeTagsForResourceRequest(input) - return out, req.Send() -} - -// ChangeTagsForResourceWithContext is the same as ChangeTagsForResource with the addition of -// the ability to pass a context and additional request options. -// -// See ChangeTagsForResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ChangeTagsForResourceWithContext(ctx aws.Context, input *ChangeTagsForResourceInput, opts ...request.Option) (*ChangeTagsForResourceOutput, error) { - req, out := c.ChangeTagsForResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateHealthCheck = "CreateHealthCheck" - -// CreateHealthCheckRequest generates a "aws/request.Request" representing the -// client's request for the CreateHealthCheck operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateHealthCheck for more information on using the CreateHealthCheck -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateHealthCheckRequest method. -// req, resp := client.CreateHealthCheckRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateHealthCheck -func (c *Route53) CreateHealthCheckRequest(input *CreateHealthCheckInput) (req *request.Request, output *CreateHealthCheckOutput) { - op := &request.Operation{ - Name: opCreateHealthCheck, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/healthcheck", - } - - if input == nil { - input = &CreateHealthCheckInput{} - } - - output = &CreateHealthCheckOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateHealthCheck API operation for Amazon Route 53. -// -// Creates a new health check. -// -// For information about adding health checks to resource record sets, see ResourceRecordSet$HealthCheckId -// in ChangeResourceRecordSets. -// -// ELB Load Balancers -// -// If you're registering EC2 instances with an Elastic Load Balancing (ELB) -// load balancer, do not create Amazon Route 53 health checks for the EC2 instances. -// When you register an EC2 instance with a load balancer, you configure settings -// for an ELB health check, which performs a similar function to a Route 53 -// health check. -// -// Private Hosted Zones -// -// You can associate health checks with failover resource record sets in a private -// hosted zone. Note the following: -// -// * Route 53 health checkers are outside the VPC. To check the health of -// an endpoint within a VPC by IP address, you must assign a public IP address -// to the instance in the VPC. -// -// * You can configure a health checker to check the health of an external -// resource that the instance relies on, such as a database server. -// -// * You can create a CloudWatch metric, associate an alarm with the metric, -// and then create a health check that is based on the state of the alarm. -// For example, you might create a CloudWatch metric that checks the status -// of the Amazon EC2 StatusCheckFailed metric, add an alarm to the metric, -// and then create a health check that is based on the state of the alarm. -// For information about creating CloudWatch metrics and alarms by using -// the CloudWatch console, see the Amazon CloudWatch User Guide (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/WhatIsCloudWatch.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation CreateHealthCheck for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyHealthChecks "TooManyHealthChecks" -// This health check can't be created because the current account has reached -// the limit on the number of active health checks. -// -// For information about default limits, see Limits (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) -// in the Amazon Route 53 Developer Guide. -// -// For information about how to get the current limit for an account, see GetAccountLimit. -// To request a higher limit, create a case (http://aws.amazon.com/route53-request) -// with the AWS Support Center. -// -// You have reached the maximum number of active health checks for an AWS account. -// To request a higher limit, create a case (http://aws.amazon.com/route53-request) -// with the AWS Support Center. -// -// * ErrCodeHealthCheckAlreadyExists "HealthCheckAlreadyExists" -// The health check you're attempting to create already exists. Amazon Route -// 53 returns this error when you submit a request that has the following values: -// -// * The same value for CallerReference as an existing health check, and -// one or more values that differ from the existing health check that has -// the same caller reference. -// -// * The same value for CallerReference as a health check that you created -// and later deleted, regardless of the other settings in the request. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateHealthCheck -func (c *Route53) CreateHealthCheck(input *CreateHealthCheckInput) (*CreateHealthCheckOutput, error) { - req, out := c.CreateHealthCheckRequest(input) - return out, req.Send() -} - -// CreateHealthCheckWithContext is the same as CreateHealthCheck with the addition of -// the ability to pass a context and additional request options. -// -// See CreateHealthCheck for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) CreateHealthCheckWithContext(ctx aws.Context, input *CreateHealthCheckInput, opts ...request.Option) (*CreateHealthCheckOutput, error) { - req, out := c.CreateHealthCheckRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateHostedZone = "CreateHostedZone" - -// CreateHostedZoneRequest generates a "aws/request.Request" representing the -// client's request for the CreateHostedZone operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateHostedZone for more information on using the CreateHostedZone -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateHostedZoneRequest method. -// req, resp := client.CreateHostedZoneRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateHostedZone -func (c *Route53) CreateHostedZoneRequest(input *CreateHostedZoneInput) (req *request.Request, output *CreateHostedZoneOutput) { - op := &request.Operation{ - Name: opCreateHostedZone, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/hostedzone", - } - - if input == nil { - input = &CreateHostedZoneInput{} - } - - output = &CreateHostedZoneOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateHostedZone API operation for Amazon Route 53. -// -// Creates a new public or private hosted zone. You create records in a public -// hosted zone to define how you want to route traffic on the internet for a -// domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). -// You create records in a private hosted zone to define how you want to route -// traffic for a domain and its subdomains within one or more Amazon Virtual -// Private Clouds (Amazon VPCs). -// -// You can't convert a public hosted zone to a private hosted zone or vice versa. -// Instead, you must create a new hosted zone with the same name and create -// new resource record sets. -// -// For more information about charges for hosted zones, see Amazon Route 53 -// Pricing (http://aws.amazon.com/route53/pricing/). -// -// Note the following: -// -// * You can't create a hosted zone for a top-level domain (TLD) such as -// .com. -// -// * For public hosted zones, Amazon Route 53 automatically creates a default -// SOA record and four NS records for the zone. For more information about -// SOA and NS records, see NS and SOA Records that Route 53 Creates for a -// Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html) -// in the Amazon Route 53 Developer Guide. -// -// If you want to use the same name servers for multiple public hosted zones, -// you can optionally associate a reusable delegation set with the hosted -// zone. See the DelegationSetId element. -// -// * If your domain is registered with a registrar other than Route 53, you -// must update the name servers with your registrar to make Route 53 the -// DNS service for the domain. For more information, see Migrating DNS Service -// for an Existing Domain to Amazon Route 53 (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html) -// in the Amazon Route 53 Developer Guide. -// -// When you submit a CreateHostedZone request, the initial status of the hosted -// zone is PENDING. For public hosted zones, this means that the NS and SOA -// records are not yet available on all Route 53 DNS servers. When the NS and -// SOA records are available, the status of the zone changes to INSYNC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation CreateHostedZone for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDomainName "InvalidDomainName" -// The specified domain name is not valid. -// -// * ErrCodeHostedZoneAlreadyExists "HostedZoneAlreadyExists" -// The hosted zone you're trying to create already exists. Amazon Route 53 returns -// this error when a hosted zone has already been created with the specified -// CallerReference. -// -// * ErrCodeTooManyHostedZones "TooManyHostedZones" -// This operation can't be completed either because the current account has -// reached the limit on the number of hosted zones or because you've reached -// the limit on the number of hosted zones that can be associated with a reusable -// delegation set. -// -// For information about default limits, see Limits (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) -// in the Amazon Route 53 Developer Guide. -// -// To get the current limit on hosted zones that can be created by an account, -// see GetAccountLimit. -// -// To get the current limit on hosted zones that can be associated with a reusable -// delegation set, see GetReusableDelegationSetLimit. -// -// To request a higher limit, create a case (http://aws.amazon.com/route53-request) -// with the AWS Support Center. -// -// * ErrCodeInvalidVPCId "InvalidVPCId" -// The VPC ID that you specified either isn't a valid ID or the current account -// is not authorized to access this VPC. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeDelegationSetNotAvailable "DelegationSetNotAvailable" -// You can create a hosted zone that has the same name as an existing hosted -// zone (example.com is common), but there is a limit to the number of hosted -// zones that have the same name. If you get this error, Amazon Route 53 has -// reached that limit. If you own the domain name and Route 53 generates this -// error, contact Customer Support. -// -// * ErrCodeConflictingDomainExists "ConflictingDomainExists" -// The cause of this error depends on whether you're trying to create a public -// or a private hosted zone: -// -// * Public hosted zone: Two hosted zones that have the same name or that -// have a parent/child relationship (example.com and test.example.com) can't -// have any common name servers. You tried to create a hosted zone that has -// the same name as an existing hosted zone or that's the parent or child -// of an existing hosted zone, and you specified a delegation set that shares -// one or more name servers with the existing hosted zone. For more information, -// see CreateReusableDelegationSet. -// -// * Private hosted zone: You specified an Amazon VPC that you're already -// using for another hosted zone, and the domain that you specified for one -// of the hosted zones is a subdomain of the domain that you specified for -// the other hosted zone. For example, you can't use the same Amazon VPC -// for the hosted zones for example.com and test.example.com. -// -// * ErrCodeNoSuchDelegationSet "NoSuchDelegationSet" -// A reusable delegation set with the specified ID does not exist. -// -// * ErrCodeDelegationSetNotReusable "DelegationSetNotReusable" -// A reusable delegation set with the specified ID does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateHostedZone -func (c *Route53) CreateHostedZone(input *CreateHostedZoneInput) (*CreateHostedZoneOutput, error) { - req, out := c.CreateHostedZoneRequest(input) - return out, req.Send() -} - -// CreateHostedZoneWithContext is the same as CreateHostedZone with the addition of -// the ability to pass a context and additional request options. -// -// See CreateHostedZone for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) CreateHostedZoneWithContext(ctx aws.Context, input *CreateHostedZoneInput, opts ...request.Option) (*CreateHostedZoneOutput, error) { - req, out := c.CreateHostedZoneRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateQueryLoggingConfig = "CreateQueryLoggingConfig" - -// CreateQueryLoggingConfigRequest generates a "aws/request.Request" representing the -// client's request for the CreateQueryLoggingConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateQueryLoggingConfig for more information on using the CreateQueryLoggingConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateQueryLoggingConfigRequest method. -// req, resp := client.CreateQueryLoggingConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateQueryLoggingConfig -func (c *Route53) CreateQueryLoggingConfigRequest(input *CreateQueryLoggingConfigInput) (req *request.Request, output *CreateQueryLoggingConfigOutput) { - op := &request.Operation{ - Name: opCreateQueryLoggingConfig, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/queryloggingconfig", - } - - if input == nil { - input = &CreateQueryLoggingConfigInput{} - } - - output = &CreateQueryLoggingConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateQueryLoggingConfig API operation for Amazon Route 53. -// -// Creates a configuration for DNS query logging. After you create a query logging -// configuration, Amazon Route 53 begins to publish log data to an Amazon CloudWatch -// Logs log group. -// -// DNS query logs contain information about the queries that Route 53 receives -// for a specified public hosted zone, such as the following: -// -// * Route 53 edge location that responded to the DNS query -// -// * Domain or subdomain that was requested -// -// * DNS record type, such as A or AAAA -// -// * DNS response code, such as NoError or ServFail -// -// Log Group and Resource PolicyBefore you create a query logging configuration, -// perform the following operations. -// -// If you create a query logging configuration using the Route 53 console, Route -// 53 performs these operations automatically. -// -// Create a CloudWatch Logs log group, and make note of the ARN, which you specify -// when you create a query logging configuration. Note the following: -// -// You must create the log group in the us-east-1 region. -// -// You must use the same AWS account to create the log group and the hosted -// zone that you want to configure query logging for. -// -// When you create log groups for query logging, we recommend that you use a -// consistent prefix, for example: -// -// /aws/route53/hosted zone name -// -// In the next step, you'll create a resource policy, which controls access -// to one or more log groups and the associated AWS resources, such as Route -// 53 hosted zones. There's a limit on the number of resource policies that -// you can create, so we recommend that you use a consistent prefix so you can -// use the same resource policy for all the log groups that you create for query -// logging. -// -// Create a CloudWatch Logs resource policy, and give it the permissions that -// Route 53 needs to create log streams and to send query logs to log streams. -// For the value of Resource, specify the ARN for the log group that you created -// in the previous step. To use the same resource policy for all the CloudWatch -// Logs log groups that you created for query logging configurations, replace -// the hosted zone name with *, for example: -// -// arn:aws:logs:us-east-1:123412341234:log-group:/aws/route53/* -// -// You can't use the CloudWatch console to create or edit a resource policy. -// You must use the CloudWatch API, one of the AWS SDKs, or the AWS CLI. -// -// Log Streams and Edge LocationsWhen Route 53 finishes creating the configuration -// for DNS query logging, it does the following: -// -// Creates a log stream for an edge location the first time that the edge location -// responds to DNS queries for the specified hosted zone. That log stream is -// used to log all queries that Route 53 responds to for that edge location. -// -// Begins to send query logs to the applicable log stream. -// -// The name of each log stream is in the following format: -// -// hosted zone ID/edge location code -// -// The edge location code is a three-letter code and an arbitrarily assigned -// number, for example, DFW3. The three-letter code typically corresponds with -// the International Air Transport Association airport code for an airport near -// the edge location. (These abbreviations might change in the future.) For -// a list of edge locations, see "The Route 53 Global Network" on the Route -// 53 Product Details (http://aws.amazon.com/route53/details/) page. -// -// Queries That Are LoggedQuery logs contain only the queries that DNS resolvers -// forward to Route 53. If a DNS resolver has already cached the response to -// a query (such as the IP address for a load balancer for example.com), the -// resolver will continue to return the cached response. It doesn't forward -// another query to Route 53 until the TTL for the corresponding resource record -// set expires. Depending on how many DNS queries are submitted for a resource -// record set, and depending on the TTL for that resource record set, query -// logs might contain information about only one query out of every several -// thousand queries that are submitted to DNS. For more information about how -// DNS works, see Routing Internet Traffic to Your Website or Web Application -// (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-dns-service.html) -// in the Amazon Route 53 Developer Guide. -// -// Log File FormatFor a list of the values in each query log and the format -// of each value, see Logging DNS Queries (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html) -// in the Amazon Route 53 Developer Guide. -// -// PricingFor information about charges for query logs, see Amazon CloudWatch -// Pricing (http://aws.amazon.com/cloudwatch/pricing/). -// -// How to Stop LoggingIf you want Route 53 to stop sending query logs to CloudWatch -// Logs, delete the query logging configuration. For more information, see DeleteQueryLoggingConfig. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation CreateQueryLoggingConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModification "ConcurrentModification" -// Another user submitted a request to create, update, or delete the object -// at the same time that you did. Retry the request. -// -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodeNoSuchCloudWatchLogsLogGroup "NoSuchCloudWatchLogsLogGroup" -// There is no CloudWatch Logs log group with the specified ARN. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeQueryLoggingConfigAlreadyExists "QueryLoggingConfigAlreadyExists" -// You can create only one query logging configuration for a hosted zone, and -// a query logging configuration already exists for this hosted zone. -// -// * ErrCodeInsufficientCloudWatchLogsResourcePolicy "InsufficientCloudWatchLogsResourcePolicy" -// Amazon Route 53 doesn't have the permissions required to create log streams -// and send query logs to log streams. Possible causes include the following: -// -// * There is no resource policy that specifies the log group ARN in the -// value for Resource. -// -// * The resource policy that includes the log group ARN in the value for -// Resource doesn't have the necessary permissions. -// -// * The resource policy hasn't finished propagating yet. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateQueryLoggingConfig -func (c *Route53) CreateQueryLoggingConfig(input *CreateQueryLoggingConfigInput) (*CreateQueryLoggingConfigOutput, error) { - req, out := c.CreateQueryLoggingConfigRequest(input) - return out, req.Send() -} - -// CreateQueryLoggingConfigWithContext is the same as CreateQueryLoggingConfig with the addition of -// the ability to pass a context and additional request options. -// -// See CreateQueryLoggingConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) CreateQueryLoggingConfigWithContext(ctx aws.Context, input *CreateQueryLoggingConfigInput, opts ...request.Option) (*CreateQueryLoggingConfigOutput, error) { - req, out := c.CreateQueryLoggingConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateReusableDelegationSet = "CreateReusableDelegationSet" - -// CreateReusableDelegationSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateReusableDelegationSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateReusableDelegationSet for more information on using the CreateReusableDelegationSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateReusableDelegationSetRequest method. -// req, resp := client.CreateReusableDelegationSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateReusableDelegationSet -func (c *Route53) CreateReusableDelegationSetRequest(input *CreateReusableDelegationSetInput) (req *request.Request, output *CreateReusableDelegationSetOutput) { - op := &request.Operation{ - Name: opCreateReusableDelegationSet, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/delegationset", - } - - if input == nil { - input = &CreateReusableDelegationSetInput{} - } - - output = &CreateReusableDelegationSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateReusableDelegationSet API operation for Amazon Route 53. -// -// Creates a delegation set (a group of four name servers) that can be reused -// by multiple hosted zones. If a hosted zoned ID is specified, CreateReusableDelegationSet -// marks the delegation set associated with that zone as reusable. -// -// You can't associate a reusable delegation set with a private hosted zone. -// -// For information about using a reusable delegation set to configure white -// label name servers, see Configuring White Label Name Servers (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/white-label-name-servers.html). -// -// The process for migrating existing hosted zones to use a reusable delegation -// set is comparable to the process for configuring white label name servers. -// You need to perform the following steps: -// -// Create a reusable delegation set. -// -// Recreate hosted zones, and reduce the TTL to 60 seconds or less. -// -// Recreate resource record sets in the new hosted zones. -// -// Change the registrar's name servers to use the name servers for the new hosted -// zones. -// -// Monitor traffic for the website or application. -// -// Change TTLs back to their original values. -// -// If you want to migrate existing hosted zones to use a reusable delegation -// set, the existing hosted zones can't use any of the name servers that are -// assigned to the reusable delegation set. If one or more hosted zones do use -// one or more name servers that are assigned to the reusable delegation set, -// you can do one of the following: -// -// * For small numbers of hosted zones—up to a few hundred—it's relatively -// easy to create reusable delegation sets until you get one that has four -// name servers that don't overlap with any of the name servers in your hosted -// zones. -// -// * For larger numbers of hosted zones, the easiest solution is to use more -// than one reusable delegation set. -// -// * For larger numbers of hosted zones, you can also migrate hosted zones -// that have overlapping name servers to hosted zones that don't have overlapping -// name servers, then migrate the hosted zones again to use the reusable -// delegation set. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation CreateReusableDelegationSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDelegationSetAlreadyCreated "DelegationSetAlreadyCreated" -// A delegation set with the same owner and caller reference combination has -// already been created. -// -// * ErrCodeLimitsExceeded "LimitsExceeded" -// This operation can't be completed either because the current account has -// reached the limit on reusable delegation sets that it can create or because -// you've reached the limit on the number of Amazon VPCs that you can associate -// with a private hosted zone. To get the current limit on the number of reusable -// delegation sets, see GetAccountLimit. To get the current limit on the number -// of Amazon VPCs that you can associate with a private hosted zone, see GetHostedZoneLimit. -// To request a higher limit, create a case (http://aws.amazon.com/route53-request) -// with the AWS Support Center. -// -// * ErrCodeHostedZoneNotFound "HostedZoneNotFound" -// The specified HostedZone can't be found. -// -// * ErrCodeInvalidArgument "InvalidArgument" -// Parameter name is invalid. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeDelegationSetNotAvailable "DelegationSetNotAvailable" -// You can create a hosted zone that has the same name as an existing hosted -// zone (example.com is common), but there is a limit to the number of hosted -// zones that have the same name. If you get this error, Amazon Route 53 has -// reached that limit. If you own the domain name and Route 53 generates this -// error, contact Customer Support. -// -// * ErrCodeDelegationSetAlreadyReusable "DelegationSetAlreadyReusable" -// The specified delegation set has already been marked as reusable. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateReusableDelegationSet -func (c *Route53) CreateReusableDelegationSet(input *CreateReusableDelegationSetInput) (*CreateReusableDelegationSetOutput, error) { - req, out := c.CreateReusableDelegationSetRequest(input) - return out, req.Send() -} - -// CreateReusableDelegationSetWithContext is the same as CreateReusableDelegationSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateReusableDelegationSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) CreateReusableDelegationSetWithContext(ctx aws.Context, input *CreateReusableDelegationSetInput, opts ...request.Option) (*CreateReusableDelegationSetOutput, error) { - req, out := c.CreateReusableDelegationSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTrafficPolicy = "CreateTrafficPolicy" - -// CreateTrafficPolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreateTrafficPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTrafficPolicy for more information on using the CreateTrafficPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTrafficPolicyRequest method. -// req, resp := client.CreateTrafficPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateTrafficPolicy -func (c *Route53) CreateTrafficPolicyRequest(input *CreateTrafficPolicyInput) (req *request.Request, output *CreateTrafficPolicyOutput) { - op := &request.Operation{ - Name: opCreateTrafficPolicy, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/trafficpolicy", - } - - if input == nil { - input = &CreateTrafficPolicyInput{} - } - - output = &CreateTrafficPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTrafficPolicy API operation for Amazon Route 53. -// -// Creates a traffic policy, which you use to create multiple DNS resource record -// sets for one domain name (such as example.com) or one subdomain name (such -// as www.example.com). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation CreateTrafficPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeTooManyTrafficPolicies "TooManyTrafficPolicies" -// This traffic policy can't be created because the current account has reached -// the limit on the number of traffic policies. -// -// For information about default limits, see Limits (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) -// in the Amazon Route 53 Developer Guide. -// -// To get the current limit for an account, see GetAccountLimit. -// -// To request a higher limit, create a case (http://aws.amazon.com/route53-request) -// with the AWS Support Center. -// -// * ErrCodeTrafficPolicyAlreadyExists "TrafficPolicyAlreadyExists" -// A traffic policy that has the same value for Name already exists. -// -// * ErrCodeInvalidTrafficPolicyDocument "InvalidTrafficPolicyDocument" -// The format of the traffic policy document that you specified in the Document -// element is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateTrafficPolicy -func (c *Route53) CreateTrafficPolicy(input *CreateTrafficPolicyInput) (*CreateTrafficPolicyOutput, error) { - req, out := c.CreateTrafficPolicyRequest(input) - return out, req.Send() -} - -// CreateTrafficPolicyWithContext is the same as CreateTrafficPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTrafficPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) CreateTrafficPolicyWithContext(ctx aws.Context, input *CreateTrafficPolicyInput, opts ...request.Option) (*CreateTrafficPolicyOutput, error) { - req, out := c.CreateTrafficPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTrafficPolicyInstance = "CreateTrafficPolicyInstance" - -// CreateTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the -// client's request for the CreateTrafficPolicyInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTrafficPolicyInstance for more information on using the CreateTrafficPolicyInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTrafficPolicyInstanceRequest method. -// req, resp := client.CreateTrafficPolicyInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateTrafficPolicyInstance -func (c *Route53) CreateTrafficPolicyInstanceRequest(input *CreateTrafficPolicyInstanceInput) (req *request.Request, output *CreateTrafficPolicyInstanceOutput) { - op := &request.Operation{ - Name: opCreateTrafficPolicyInstance, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/trafficpolicyinstance", - } - - if input == nil { - input = &CreateTrafficPolicyInstanceInput{} - } - - output = &CreateTrafficPolicyInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTrafficPolicyInstance API operation for Amazon Route 53. -// -// Creates resource record sets in a specified hosted zone based on the settings -// in a specified traffic policy version. In addition, CreateTrafficPolicyInstance -// associates the resource record sets with a specified domain name (such as -// example.com) or subdomain name (such as www.example.com). Amazon Route 53 -// responds to DNS queries for the domain or subdomain name by using the resource -// record sets that CreateTrafficPolicyInstance created. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation CreateTrafficPolicyInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeTooManyTrafficPolicyInstances "TooManyTrafficPolicyInstances" -// This traffic policy instance can't be created because the current account -// has reached the limit on the number of traffic policy instances. -// -// For information about default limits, see Limits (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) -// in the Amazon Route 53 Developer Guide. -// -// For information about how to get the current limit for an account, see GetAccountLimit. -// -// To request a higher limit, create a case (http://aws.amazon.com/route53-request) -// with the AWS Support Center. -// -// * ErrCodeNoSuchTrafficPolicy "NoSuchTrafficPolicy" -// No traffic policy exists with the specified ID. -// -// * ErrCodeTrafficPolicyInstanceAlreadyExists "TrafficPolicyInstanceAlreadyExists" -// There is already a traffic policy instance with the specified ID. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateTrafficPolicyInstance -func (c *Route53) CreateTrafficPolicyInstance(input *CreateTrafficPolicyInstanceInput) (*CreateTrafficPolicyInstanceOutput, error) { - req, out := c.CreateTrafficPolicyInstanceRequest(input) - return out, req.Send() -} - -// CreateTrafficPolicyInstanceWithContext is the same as CreateTrafficPolicyInstance with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTrafficPolicyInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) CreateTrafficPolicyInstanceWithContext(ctx aws.Context, input *CreateTrafficPolicyInstanceInput, opts ...request.Option) (*CreateTrafficPolicyInstanceOutput, error) { - req, out := c.CreateTrafficPolicyInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTrafficPolicyVersion = "CreateTrafficPolicyVersion" - -// CreateTrafficPolicyVersionRequest generates a "aws/request.Request" representing the -// client's request for the CreateTrafficPolicyVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTrafficPolicyVersion for more information on using the CreateTrafficPolicyVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTrafficPolicyVersionRequest method. -// req, resp := client.CreateTrafficPolicyVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateTrafficPolicyVersion -func (c *Route53) CreateTrafficPolicyVersionRequest(input *CreateTrafficPolicyVersionInput) (req *request.Request, output *CreateTrafficPolicyVersionOutput) { - op := &request.Operation{ - Name: opCreateTrafficPolicyVersion, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/trafficpolicy/{Id}", - } - - if input == nil { - input = &CreateTrafficPolicyVersionInput{} - } - - output = &CreateTrafficPolicyVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTrafficPolicyVersion API operation for Amazon Route 53. -// -// Creates a new version of an existing traffic policy. When you create a new -// version of a traffic policy, you specify the ID of the traffic policy that -// you want to update and a JSON-formatted document that describes the new version. -// You use traffic policies to create multiple DNS resource record sets for -// one domain name (such as example.com) or one subdomain name (such as www.example.com). -// You can create a maximum of 1000 versions of a traffic policy. If you reach -// the limit and need to create another version, you'll need to start a new -// traffic policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation CreateTrafficPolicyVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchTrafficPolicy "NoSuchTrafficPolicy" -// No traffic policy exists with the specified ID. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeTooManyTrafficPolicyVersionsForCurrentPolicy "TooManyTrafficPolicyVersionsForCurrentPolicy" -// This traffic policy version can't be created because you've reached the limit -// of 1000 on the number of versions that you can create for the current traffic -// policy. -// -// To create more traffic policy versions, you can use GetTrafficPolicy to get -// the traffic policy document for a specified traffic policy version, and then -// use CreateTrafficPolicy to create a new traffic policy using the traffic -// policy document. -// -// * ErrCodeConcurrentModification "ConcurrentModification" -// Another user submitted a request to create, update, or delete the object -// at the same time that you did. Retry the request. -// -// * ErrCodeInvalidTrafficPolicyDocument "InvalidTrafficPolicyDocument" -// The format of the traffic policy document that you specified in the Document -// element is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateTrafficPolicyVersion -func (c *Route53) CreateTrafficPolicyVersion(input *CreateTrafficPolicyVersionInput) (*CreateTrafficPolicyVersionOutput, error) { - req, out := c.CreateTrafficPolicyVersionRequest(input) - return out, req.Send() -} - -// CreateTrafficPolicyVersionWithContext is the same as CreateTrafficPolicyVersion with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTrafficPolicyVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) CreateTrafficPolicyVersionWithContext(ctx aws.Context, input *CreateTrafficPolicyVersionInput, opts ...request.Option) (*CreateTrafficPolicyVersionOutput, error) { - req, out := c.CreateTrafficPolicyVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVPCAssociationAuthorization = "CreateVPCAssociationAuthorization" - -// CreateVPCAssociationAuthorizationRequest generates a "aws/request.Request" representing the -// client's request for the CreateVPCAssociationAuthorization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVPCAssociationAuthorization for more information on using the CreateVPCAssociationAuthorization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateVPCAssociationAuthorizationRequest method. -// req, resp := client.CreateVPCAssociationAuthorizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateVPCAssociationAuthorization -func (c *Route53) CreateVPCAssociationAuthorizationRequest(input *CreateVPCAssociationAuthorizationInput) (req *request.Request, output *CreateVPCAssociationAuthorizationOutput) { - op := &request.Operation{ - Name: opCreateVPCAssociationAuthorization, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/hostedzone/{Id}/authorizevpcassociation", - } - - if input == nil { - input = &CreateVPCAssociationAuthorizationInput{} - } - - output = &CreateVPCAssociationAuthorizationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVPCAssociationAuthorization API operation for Amazon Route 53. -// -// Authorizes the AWS account that created a specified VPC to submit an AssociateVPCWithHostedZone -// request to associate the VPC with a specified hosted zone that was created -// by a different account. To submit a CreateVPCAssociationAuthorization request, -// you must use the account that created the hosted zone. After you authorize -// the association, use the account that created the VPC to submit an AssociateVPCWithHostedZone -// request. -// -// If you want to associate multiple VPCs that you created by using one account -// with a hosted zone that you created by using a different account, you must -// submit one authorization request for each VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation CreateVPCAssociationAuthorization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModification "ConcurrentModification" -// Another user submitted a request to create, update, or delete the object -// at the same time that you did. Retry the request. -// -// * ErrCodeTooManyVPCAssociationAuthorizations "TooManyVPCAssociationAuthorizations" -// You've created the maximum number of authorizations that can be created for -// the specified hosted zone. To authorize another VPC to be associated with -// the hosted zone, submit a DeleteVPCAssociationAuthorization request to remove -// an existing authorization. To get a list of existing authorizations, submit -// a ListVPCAssociationAuthorizations request. -// -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodeInvalidVPCId "InvalidVPCId" -// The VPC ID that you specified either isn't a valid ID or the current account -// is not authorized to access this VPC. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateVPCAssociationAuthorization -func (c *Route53) CreateVPCAssociationAuthorization(input *CreateVPCAssociationAuthorizationInput) (*CreateVPCAssociationAuthorizationOutput, error) { - req, out := c.CreateVPCAssociationAuthorizationRequest(input) - return out, req.Send() -} - -// CreateVPCAssociationAuthorizationWithContext is the same as CreateVPCAssociationAuthorization with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVPCAssociationAuthorization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) CreateVPCAssociationAuthorizationWithContext(ctx aws.Context, input *CreateVPCAssociationAuthorizationInput, opts ...request.Option) (*CreateVPCAssociationAuthorizationOutput, error) { - req, out := c.CreateVPCAssociationAuthorizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteHealthCheck = "DeleteHealthCheck" - -// DeleteHealthCheckRequest generates a "aws/request.Request" representing the -// client's request for the DeleteHealthCheck operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteHealthCheck for more information on using the DeleteHealthCheck -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteHealthCheckRequest method. -// req, resp := client.DeleteHealthCheckRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteHealthCheck -func (c *Route53) DeleteHealthCheckRequest(input *DeleteHealthCheckInput) (req *request.Request, output *DeleteHealthCheckOutput) { - op := &request.Operation{ - Name: opDeleteHealthCheck, - HTTPMethod: "DELETE", - HTTPPath: "/2013-04-01/healthcheck/{HealthCheckId}", - } - - if input == nil { - input = &DeleteHealthCheckInput{} - } - - output = &DeleteHealthCheckOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteHealthCheck API operation for Amazon Route 53. -// -// Deletes a health check. -// -// Amazon Route 53 does not prevent you from deleting a health check even if -// the health check is associated with one or more resource record sets. If -// you delete a health check and you don't update the associated resource record -// sets, the future status of the health check can't be predicted and may change. -// This will affect the routing of DNS queries for your DNS failover configuration. -// For more information, see Replacing and Deleting Health Checks (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/health-checks-creating-deleting.html#health-checks-deleting.html) -// in the Amazon Route 53 Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation DeleteHealthCheck for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the specified ID. -// -// * ErrCodeHealthCheckInUse "HealthCheckInUse" -// This error code is not in use. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteHealthCheck -func (c *Route53) DeleteHealthCheck(input *DeleteHealthCheckInput) (*DeleteHealthCheckOutput, error) { - req, out := c.DeleteHealthCheckRequest(input) - return out, req.Send() -} - -// DeleteHealthCheckWithContext is the same as DeleteHealthCheck with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteHealthCheck for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) DeleteHealthCheckWithContext(ctx aws.Context, input *DeleteHealthCheckInput, opts ...request.Option) (*DeleteHealthCheckOutput, error) { - req, out := c.DeleteHealthCheckRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteHostedZone = "DeleteHostedZone" - -// DeleteHostedZoneRequest generates a "aws/request.Request" representing the -// client's request for the DeleteHostedZone operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteHostedZone for more information on using the DeleteHostedZone -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteHostedZoneRequest method. -// req, resp := client.DeleteHostedZoneRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteHostedZone -func (c *Route53) DeleteHostedZoneRequest(input *DeleteHostedZoneInput) (req *request.Request, output *DeleteHostedZoneOutput) { - op := &request.Operation{ - Name: opDeleteHostedZone, - HTTPMethod: "DELETE", - HTTPPath: "/2013-04-01/hostedzone/{Id}", - } - - if input == nil { - input = &DeleteHostedZoneInput{} - } - - output = &DeleteHostedZoneOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteHostedZone API operation for Amazon Route 53. -// -// Deletes a hosted zone. -// -// If the name servers for the hosted zone are associated with a domain and -// if you want to make the domain unavailable on the Internet, we recommend -// that you delete the name servers from the domain to prevent future DNS queries -// from possibly being misrouted. If the domain is registered with Amazon Route -// 53, see UpdateDomainNameservers. If the domain is registered with another -// registrar, use the method provided by the registrar to delete name servers -// for the domain. -// -// Some domain registries don't allow you to remove all of the name servers -// for a domain. If the registry for your domain requires one or more name servers, -// we recommend that you delete the hosted zone only if you transfer DNS service -// to another service provider, and you replace the name servers for the domain -// with name servers from the new provider. -// -// You can delete a hosted zone only if it contains only the default SOA record -// and NS resource record sets. If the hosted zone contains other resource record -// sets, you must delete them before you can delete the hosted zone. If you -// try to delete a hosted zone that contains other resource record sets, the -// request fails, and Route 53 returns a HostedZoneNotEmpty error. For information -// about deleting records from your hosted zone, see ChangeResourceRecordSets. -// -// To verify that the hosted zone has been deleted, do one of the following: -// -// * Use the GetHostedZone action to request information about the hosted -// zone. -// -// * Use the ListHostedZones action to get a list of the hosted zones associated -// with the current AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation DeleteHostedZone for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodeHostedZoneNotEmpty "HostedZoneNotEmpty" -// The hosted zone contains resource records that are not SOA or NS records. -// -// * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" -// If Amazon Route 53 can't process a request before the next request arrives, -// it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for -// the same request, we recommend that you wait, in intervals of increasing -// duration, before you try the request again. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeInvalidDomainName "InvalidDomainName" -// The specified domain name is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteHostedZone -func (c *Route53) DeleteHostedZone(input *DeleteHostedZoneInput) (*DeleteHostedZoneOutput, error) { - req, out := c.DeleteHostedZoneRequest(input) - return out, req.Send() -} - -// DeleteHostedZoneWithContext is the same as DeleteHostedZone with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteHostedZone for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) DeleteHostedZoneWithContext(ctx aws.Context, input *DeleteHostedZoneInput, opts ...request.Option) (*DeleteHostedZoneOutput, error) { - req, out := c.DeleteHostedZoneRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteQueryLoggingConfig = "DeleteQueryLoggingConfig" - -// DeleteQueryLoggingConfigRequest generates a "aws/request.Request" representing the -// client's request for the DeleteQueryLoggingConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteQueryLoggingConfig for more information on using the DeleteQueryLoggingConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteQueryLoggingConfigRequest method. -// req, resp := client.DeleteQueryLoggingConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteQueryLoggingConfig -func (c *Route53) DeleteQueryLoggingConfigRequest(input *DeleteQueryLoggingConfigInput) (req *request.Request, output *DeleteQueryLoggingConfigOutput) { - op := &request.Operation{ - Name: opDeleteQueryLoggingConfig, - HTTPMethod: "DELETE", - HTTPPath: "/2013-04-01/queryloggingconfig/{Id}", - } - - if input == nil { - input = &DeleteQueryLoggingConfigInput{} - } - - output = &DeleteQueryLoggingConfigOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteQueryLoggingConfig API operation for Amazon Route 53. -// -// Deletes a configuration for DNS query logging. If you delete a configuration, -// Amazon Route 53 stops sending query logs to CloudWatch Logs. Route 53 doesn't -// delete any logs that are already in CloudWatch Logs. -// -// For more information about DNS query logs, see CreateQueryLoggingConfig. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation DeleteQueryLoggingConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModification "ConcurrentModification" -// Another user submitted a request to create, update, or delete the object -// at the same time that you did. Retry the request. -// -// * ErrCodeNoSuchQueryLoggingConfig "NoSuchQueryLoggingConfig" -// There is no DNS query logging configuration with the specified ID. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteQueryLoggingConfig -func (c *Route53) DeleteQueryLoggingConfig(input *DeleteQueryLoggingConfigInput) (*DeleteQueryLoggingConfigOutput, error) { - req, out := c.DeleteQueryLoggingConfigRequest(input) - return out, req.Send() -} - -// DeleteQueryLoggingConfigWithContext is the same as DeleteQueryLoggingConfig with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteQueryLoggingConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) DeleteQueryLoggingConfigWithContext(ctx aws.Context, input *DeleteQueryLoggingConfigInput, opts ...request.Option) (*DeleteQueryLoggingConfigOutput, error) { - req, out := c.DeleteQueryLoggingConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteReusableDelegationSet = "DeleteReusableDelegationSet" - -// DeleteReusableDelegationSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteReusableDelegationSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteReusableDelegationSet for more information on using the DeleteReusableDelegationSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteReusableDelegationSetRequest method. -// req, resp := client.DeleteReusableDelegationSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteReusableDelegationSet -func (c *Route53) DeleteReusableDelegationSetRequest(input *DeleteReusableDelegationSetInput) (req *request.Request, output *DeleteReusableDelegationSetOutput) { - op := &request.Operation{ - Name: opDeleteReusableDelegationSet, - HTTPMethod: "DELETE", - HTTPPath: "/2013-04-01/delegationset/{Id}", - } - - if input == nil { - input = &DeleteReusableDelegationSetInput{} - } - - output = &DeleteReusableDelegationSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteReusableDelegationSet API operation for Amazon Route 53. -// -// Deletes a reusable delegation set. -// -// You can delete a reusable delegation set only if it isn't associated with -// any hosted zones. -// -// To verify that the reusable delegation set is not associated with any hosted -// zones, submit a GetReusableDelegationSet request and specify the ID of the -// reusable delegation set that you want to delete. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation DeleteReusableDelegationSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchDelegationSet "NoSuchDelegationSet" -// A reusable delegation set with the specified ID does not exist. -// -// * ErrCodeDelegationSetInUse "DelegationSetInUse" -// The specified delegation contains associated hosted zones which must be deleted -// before the reusable delegation set can be deleted. -// -// * ErrCodeDelegationSetNotReusable "DelegationSetNotReusable" -// A reusable delegation set with the specified ID does not exist. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteReusableDelegationSet -func (c *Route53) DeleteReusableDelegationSet(input *DeleteReusableDelegationSetInput) (*DeleteReusableDelegationSetOutput, error) { - req, out := c.DeleteReusableDelegationSetRequest(input) - return out, req.Send() -} - -// DeleteReusableDelegationSetWithContext is the same as DeleteReusableDelegationSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteReusableDelegationSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) DeleteReusableDelegationSetWithContext(ctx aws.Context, input *DeleteReusableDelegationSetInput, opts ...request.Option) (*DeleteReusableDelegationSetOutput, error) { - req, out := c.DeleteReusableDelegationSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTrafficPolicy = "DeleteTrafficPolicy" - -// DeleteTrafficPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTrafficPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTrafficPolicy for more information on using the DeleteTrafficPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTrafficPolicyRequest method. -// req, resp := client.DeleteTrafficPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteTrafficPolicy -func (c *Route53) DeleteTrafficPolicyRequest(input *DeleteTrafficPolicyInput) (req *request.Request, output *DeleteTrafficPolicyOutput) { - op := &request.Operation{ - Name: opDeleteTrafficPolicy, - HTTPMethod: "DELETE", - HTTPPath: "/2013-04-01/trafficpolicy/{Id}/{Version}", - } - - if input == nil { - input = &DeleteTrafficPolicyInput{} - } - - output = &DeleteTrafficPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTrafficPolicy API operation for Amazon Route 53. -// -// Deletes a traffic policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation DeleteTrafficPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchTrafficPolicy "NoSuchTrafficPolicy" -// No traffic policy exists with the specified ID. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeTrafficPolicyInUse "TrafficPolicyInUse" -// One or more traffic policy instances were created by using the specified -// traffic policy. -// -// * ErrCodeConcurrentModification "ConcurrentModification" -// Another user submitted a request to create, update, or delete the object -// at the same time that you did. Retry the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteTrafficPolicy -func (c *Route53) DeleteTrafficPolicy(input *DeleteTrafficPolicyInput) (*DeleteTrafficPolicyOutput, error) { - req, out := c.DeleteTrafficPolicyRequest(input) - return out, req.Send() -} - -// DeleteTrafficPolicyWithContext is the same as DeleteTrafficPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTrafficPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) DeleteTrafficPolicyWithContext(ctx aws.Context, input *DeleteTrafficPolicyInput, opts ...request.Option) (*DeleteTrafficPolicyOutput, error) { - req, out := c.DeleteTrafficPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTrafficPolicyInstance = "DeleteTrafficPolicyInstance" - -// DeleteTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTrafficPolicyInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTrafficPolicyInstance for more information on using the DeleteTrafficPolicyInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTrafficPolicyInstanceRequest method. -// req, resp := client.DeleteTrafficPolicyInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteTrafficPolicyInstance -func (c *Route53) DeleteTrafficPolicyInstanceRequest(input *DeleteTrafficPolicyInstanceInput) (req *request.Request, output *DeleteTrafficPolicyInstanceOutput) { - op := &request.Operation{ - Name: opDeleteTrafficPolicyInstance, - HTTPMethod: "DELETE", - HTTPPath: "/2013-04-01/trafficpolicyinstance/{Id}", - } - - if input == nil { - input = &DeleteTrafficPolicyInstanceInput{} - } - - output = &DeleteTrafficPolicyInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTrafficPolicyInstance API operation for Amazon Route 53. -// -// Deletes a traffic policy instance and all of the resource record sets that -// Amazon Route 53 created when you created the instance. -// -// In the Route 53 console, traffic policy instances are known as policy records. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation DeleteTrafficPolicyInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchTrafficPolicyInstance "NoSuchTrafficPolicyInstance" -// No traffic policy instance exists with the specified ID. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" -// If Amazon Route 53 can't process a request before the next request arrives, -// it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for -// the same request, we recommend that you wait, in intervals of increasing -// duration, before you try the request again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteTrafficPolicyInstance -func (c *Route53) DeleteTrafficPolicyInstance(input *DeleteTrafficPolicyInstanceInput) (*DeleteTrafficPolicyInstanceOutput, error) { - req, out := c.DeleteTrafficPolicyInstanceRequest(input) - return out, req.Send() -} - -// DeleteTrafficPolicyInstanceWithContext is the same as DeleteTrafficPolicyInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTrafficPolicyInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) DeleteTrafficPolicyInstanceWithContext(ctx aws.Context, input *DeleteTrafficPolicyInstanceInput, opts ...request.Option) (*DeleteTrafficPolicyInstanceOutput, error) { - req, out := c.DeleteTrafficPolicyInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVPCAssociationAuthorization = "DeleteVPCAssociationAuthorization" - -// DeleteVPCAssociationAuthorizationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVPCAssociationAuthorization operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVPCAssociationAuthorization for more information on using the DeleteVPCAssociationAuthorization -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVPCAssociationAuthorizationRequest method. -// req, resp := client.DeleteVPCAssociationAuthorizationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteVPCAssociationAuthorization -func (c *Route53) DeleteVPCAssociationAuthorizationRequest(input *DeleteVPCAssociationAuthorizationInput) (req *request.Request, output *DeleteVPCAssociationAuthorizationOutput) { - op := &request.Operation{ - Name: opDeleteVPCAssociationAuthorization, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/hostedzone/{Id}/deauthorizevpcassociation", - } - - if input == nil { - input = &DeleteVPCAssociationAuthorizationInput{} - } - - output = &DeleteVPCAssociationAuthorizationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVPCAssociationAuthorization API operation for Amazon Route 53. -// -// Removes authorization to submit an AssociateVPCWithHostedZone request to -// associate a specified VPC with a hosted zone that was created by a different -// account. You must use the account that created the hosted zone to submit -// a DeleteVPCAssociationAuthorization request. -// -// Sending this request only prevents the AWS account that created the VPC from -// associating the VPC with the Amazon Route 53 hosted zone in the future. If -// the VPC is already associated with the hosted zone, DeleteVPCAssociationAuthorization -// won't disassociate the VPC from the hosted zone. If you want to delete an -// existing association, use DisassociateVPCFromHostedZone. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation DeleteVPCAssociationAuthorization for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConcurrentModification "ConcurrentModification" -// Another user submitted a request to create, update, or delete the object -// at the same time that you did. Retry the request. -// -// * ErrCodeVPCAssociationAuthorizationNotFound "VPCAssociationAuthorizationNotFound" -// The VPC that you specified is not authorized to be associated with the hosted -// zone. -// -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodeInvalidVPCId "InvalidVPCId" -// The VPC ID that you specified either isn't a valid ID or the current account -// is not authorized to access this VPC. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteVPCAssociationAuthorization -func (c *Route53) DeleteVPCAssociationAuthorization(input *DeleteVPCAssociationAuthorizationInput) (*DeleteVPCAssociationAuthorizationOutput, error) { - req, out := c.DeleteVPCAssociationAuthorizationRequest(input) - return out, req.Send() -} - -// DeleteVPCAssociationAuthorizationWithContext is the same as DeleteVPCAssociationAuthorization with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVPCAssociationAuthorization for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) DeleteVPCAssociationAuthorizationWithContext(ctx aws.Context, input *DeleteVPCAssociationAuthorizationInput, opts ...request.Option) (*DeleteVPCAssociationAuthorizationOutput, error) { - req, out := c.DeleteVPCAssociationAuthorizationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateVPCFromHostedZone = "DisassociateVPCFromHostedZone" - -// DisassociateVPCFromHostedZoneRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateVPCFromHostedZone operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateVPCFromHostedZone for more information on using the DisassociateVPCFromHostedZone -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateVPCFromHostedZoneRequest method. -// req, resp := client.DisassociateVPCFromHostedZoneRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DisassociateVPCFromHostedZone -func (c *Route53) DisassociateVPCFromHostedZoneRequest(input *DisassociateVPCFromHostedZoneInput) (req *request.Request, output *DisassociateVPCFromHostedZoneOutput) { - op := &request.Operation{ - Name: opDisassociateVPCFromHostedZone, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/hostedzone/{Id}/disassociatevpc", - } - - if input == nil { - input = &DisassociateVPCFromHostedZoneInput{} - } - - output = &DisassociateVPCFromHostedZoneOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisassociateVPCFromHostedZone API operation for Amazon Route 53. -// -// Disassociates a VPC from a Amazon Route 53 private hosted zone. Note the -// following: -// -// * You can't disassociate the last VPC from a private hosted zone. -// -// * You can't convert a private hosted zone into a public hosted zone. -// -// * You can submit a DisassociateVPCFromHostedZone request using either -// the account that created the hosted zone or the account that created the -// VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation DisassociateVPCFromHostedZone for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodeInvalidVPCId "InvalidVPCId" -// The VPC ID that you specified either isn't a valid ID or the current account -// is not authorized to access this VPC. -// -// * ErrCodeVPCAssociationNotFound "VPCAssociationNotFound" -// The specified VPC and hosted zone are not currently associated. -// -// * ErrCodeLastVPCAssociation "LastVPCAssociation" -// The VPC that you're trying to disassociate from the private hosted zone is -// the last VPC that is associated with the hosted zone. Amazon Route 53 doesn't -// support disassociating the last VPC from a hosted zone. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DisassociateVPCFromHostedZone -func (c *Route53) DisassociateVPCFromHostedZone(input *DisassociateVPCFromHostedZoneInput) (*DisassociateVPCFromHostedZoneOutput, error) { - req, out := c.DisassociateVPCFromHostedZoneRequest(input) - return out, req.Send() -} - -// DisassociateVPCFromHostedZoneWithContext is the same as DisassociateVPCFromHostedZone with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateVPCFromHostedZone for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) DisassociateVPCFromHostedZoneWithContext(ctx aws.Context, input *DisassociateVPCFromHostedZoneInput, opts ...request.Option) (*DisassociateVPCFromHostedZoneOutput, error) { - req, out := c.DisassociateVPCFromHostedZoneRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAccountLimit = "GetAccountLimit" - -// GetAccountLimitRequest generates a "aws/request.Request" representing the -// client's request for the GetAccountLimit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAccountLimit for more information on using the GetAccountLimit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAccountLimitRequest method. -// req, resp := client.GetAccountLimitRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetAccountLimit -func (c *Route53) GetAccountLimitRequest(input *GetAccountLimitInput) (req *request.Request, output *GetAccountLimitOutput) { - op := &request.Operation{ - Name: opGetAccountLimit, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/accountlimit/{Type}", - } - - if input == nil { - input = &GetAccountLimitInput{} - } - - output = &GetAccountLimitOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAccountLimit API operation for Amazon Route 53. -// -// Gets the specified limit for the current account, for example, the maximum -// number of health checks that you can create using the account. -// -// For the default limit, see Limits (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) -// in the Amazon Route 53 Developer Guide. To request a higher limit, open a -// case (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetAccountLimit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetAccountLimit -func (c *Route53) GetAccountLimit(input *GetAccountLimitInput) (*GetAccountLimitOutput, error) { - req, out := c.GetAccountLimitRequest(input) - return out, req.Send() -} - -// GetAccountLimitWithContext is the same as GetAccountLimit with the addition of -// the ability to pass a context and additional request options. -// -// See GetAccountLimit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetAccountLimitWithContext(ctx aws.Context, input *GetAccountLimitInput, opts ...request.Option) (*GetAccountLimitOutput, error) { - req, out := c.GetAccountLimitRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetChange = "GetChange" - -// GetChangeRequest generates a "aws/request.Request" representing the -// client's request for the GetChange operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetChange for more information on using the GetChange -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetChangeRequest method. -// req, resp := client.GetChangeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetChange -func (c *Route53) GetChangeRequest(input *GetChangeInput) (req *request.Request, output *GetChangeOutput) { - op := &request.Operation{ - Name: opGetChange, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/change/{Id}", - } - - if input == nil { - input = &GetChangeInput{} - } - - output = &GetChangeOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetChange API operation for Amazon Route 53. -// -// Returns the current status of a change batch request. The status is one of -// the following values: -// -// * PENDING indicates that the changes in this request have not propagated -// to all Amazon Route 53 DNS servers. This is the initial status of all -// change batch requests. -// -// * INSYNC indicates that the changes have propagated to all Route 53 DNS -// servers. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetChange for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchChange "NoSuchChange" -// A change with the specified change ID does not exist. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetChange -func (c *Route53) GetChange(input *GetChangeInput) (*GetChangeOutput, error) { - req, out := c.GetChangeRequest(input) - return out, req.Send() -} - -// GetChangeWithContext is the same as GetChange with the addition of -// the ability to pass a context and additional request options. -// -// See GetChange for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetChangeWithContext(ctx aws.Context, input *GetChangeInput, opts ...request.Option) (*GetChangeOutput, error) { - req, out := c.GetChangeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCheckerIpRanges = "GetCheckerIpRanges" - -// GetCheckerIpRangesRequest generates a "aws/request.Request" representing the -// client's request for the GetCheckerIpRanges operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCheckerIpRanges for more information on using the GetCheckerIpRanges -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCheckerIpRangesRequest method. -// req, resp := client.GetCheckerIpRangesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetCheckerIpRanges -func (c *Route53) GetCheckerIpRangesRequest(input *GetCheckerIpRangesInput) (req *request.Request, output *GetCheckerIpRangesOutput) { - op := &request.Operation{ - Name: opGetCheckerIpRanges, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/checkeripranges", - } - - if input == nil { - input = &GetCheckerIpRangesInput{} - } - - output = &GetCheckerIpRangesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCheckerIpRanges API operation for Amazon Route 53. -// -// GetCheckerIpRanges still works, but we recommend that you download ip-ranges.json, -// which includes IP address ranges for all AWS services. For more information, -// see IP Address Ranges of Amazon Route 53 Servers (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/route-53-ip-addresses.html) -// in the Amazon Route 53 Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetCheckerIpRanges for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetCheckerIpRanges -func (c *Route53) GetCheckerIpRanges(input *GetCheckerIpRangesInput) (*GetCheckerIpRangesOutput, error) { - req, out := c.GetCheckerIpRangesRequest(input) - return out, req.Send() -} - -// GetCheckerIpRangesWithContext is the same as GetCheckerIpRanges with the addition of -// the ability to pass a context and additional request options. -// -// See GetCheckerIpRanges for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetCheckerIpRangesWithContext(ctx aws.Context, input *GetCheckerIpRangesInput, opts ...request.Option) (*GetCheckerIpRangesOutput, error) { - req, out := c.GetCheckerIpRangesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetGeoLocation = "GetGeoLocation" - -// GetGeoLocationRequest generates a "aws/request.Request" representing the -// client's request for the GetGeoLocation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetGeoLocation for more information on using the GetGeoLocation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetGeoLocationRequest method. -// req, resp := client.GetGeoLocationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetGeoLocation -func (c *Route53) GetGeoLocationRequest(input *GetGeoLocationInput) (req *request.Request, output *GetGeoLocationOutput) { - op := &request.Operation{ - Name: opGetGeoLocation, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/geolocation", - } - - if input == nil { - input = &GetGeoLocationInput{} - } - - output = &GetGeoLocationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGeoLocation API operation for Amazon Route 53. -// -// Gets information about whether a specified geographic location is supported -// for Amazon Route 53 geolocation resource record sets. -// -// Use the following syntax to determine whether a continent is supported for -// geolocation: -// -// GET /2013-04-01/geolocation?continentcode=two-letter abbreviation for a continent -// -// Use the following syntax to determine whether a country is supported for -// geolocation: -// -// GET /2013-04-01/geolocation?countrycode=two-character country code -// -// Use the following syntax to determine whether a subdivision of a country -// is supported for geolocation: -// -// GET /2013-04-01/geolocation?countrycode=two-character country code&subdivisioncode=subdivision -// code -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetGeoLocation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchGeoLocation "NoSuchGeoLocation" -// Amazon Route 53 doesn't support the specified geographic location. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetGeoLocation -func (c *Route53) GetGeoLocation(input *GetGeoLocationInput) (*GetGeoLocationOutput, error) { - req, out := c.GetGeoLocationRequest(input) - return out, req.Send() -} - -// GetGeoLocationWithContext is the same as GetGeoLocation with the addition of -// the ability to pass a context and additional request options. -// -// See GetGeoLocation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetGeoLocationWithContext(ctx aws.Context, input *GetGeoLocationInput, opts ...request.Option) (*GetGeoLocationOutput, error) { - req, out := c.GetGeoLocationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetHealthCheck = "GetHealthCheck" - -// GetHealthCheckRequest generates a "aws/request.Request" representing the -// client's request for the GetHealthCheck operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetHealthCheck for more information on using the GetHealthCheck -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetHealthCheckRequest method. -// req, resp := client.GetHealthCheckRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheck -func (c *Route53) GetHealthCheckRequest(input *GetHealthCheckInput) (req *request.Request, output *GetHealthCheckOutput) { - op := &request.Operation{ - Name: opGetHealthCheck, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/healthcheck/{HealthCheckId}", - } - - if input == nil { - input = &GetHealthCheckInput{} - } - - output = &GetHealthCheckOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetHealthCheck API operation for Amazon Route 53. -// -// Gets information about a specified health check. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetHealthCheck for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the specified ID. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeIncompatibleVersion "IncompatibleVersion" -// The resource you're trying to access is unsupported on this Amazon Route -// 53 endpoint. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheck -func (c *Route53) GetHealthCheck(input *GetHealthCheckInput) (*GetHealthCheckOutput, error) { - req, out := c.GetHealthCheckRequest(input) - return out, req.Send() -} - -// GetHealthCheckWithContext is the same as GetHealthCheck with the addition of -// the ability to pass a context and additional request options. -// -// See GetHealthCheck for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetHealthCheckWithContext(ctx aws.Context, input *GetHealthCheckInput, opts ...request.Option) (*GetHealthCheckOutput, error) { - req, out := c.GetHealthCheckRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetHealthCheckCount = "GetHealthCheckCount" - -// GetHealthCheckCountRequest generates a "aws/request.Request" representing the -// client's request for the GetHealthCheckCount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetHealthCheckCount for more information on using the GetHealthCheckCount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetHealthCheckCountRequest method. -// req, resp := client.GetHealthCheckCountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheckCount -func (c *Route53) GetHealthCheckCountRequest(input *GetHealthCheckCountInput) (req *request.Request, output *GetHealthCheckCountOutput) { - op := &request.Operation{ - Name: opGetHealthCheckCount, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/healthcheckcount", - } - - if input == nil { - input = &GetHealthCheckCountInput{} - } - - output = &GetHealthCheckCountOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetHealthCheckCount API operation for Amazon Route 53. -// -// Retrieves the number of health checks that are associated with the current -// AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetHealthCheckCount for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheckCount -func (c *Route53) GetHealthCheckCount(input *GetHealthCheckCountInput) (*GetHealthCheckCountOutput, error) { - req, out := c.GetHealthCheckCountRequest(input) - return out, req.Send() -} - -// GetHealthCheckCountWithContext is the same as GetHealthCheckCount with the addition of -// the ability to pass a context and additional request options. -// -// See GetHealthCheckCount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetHealthCheckCountWithContext(ctx aws.Context, input *GetHealthCheckCountInput, opts ...request.Option) (*GetHealthCheckCountOutput, error) { - req, out := c.GetHealthCheckCountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetHealthCheckLastFailureReason = "GetHealthCheckLastFailureReason" - -// GetHealthCheckLastFailureReasonRequest generates a "aws/request.Request" representing the -// client's request for the GetHealthCheckLastFailureReason operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetHealthCheckLastFailureReason for more information on using the GetHealthCheckLastFailureReason -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetHealthCheckLastFailureReasonRequest method. -// req, resp := client.GetHealthCheckLastFailureReasonRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheckLastFailureReason -func (c *Route53) GetHealthCheckLastFailureReasonRequest(input *GetHealthCheckLastFailureReasonInput) (req *request.Request, output *GetHealthCheckLastFailureReasonOutput) { - op := &request.Operation{ - Name: opGetHealthCheckLastFailureReason, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason", - } - - if input == nil { - input = &GetHealthCheckLastFailureReasonInput{} - } - - output = &GetHealthCheckLastFailureReasonOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetHealthCheckLastFailureReason API operation for Amazon Route 53. -// -// Gets the reason that a specified health check failed most recently. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetHealthCheckLastFailureReason for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the specified ID. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheckLastFailureReason -func (c *Route53) GetHealthCheckLastFailureReason(input *GetHealthCheckLastFailureReasonInput) (*GetHealthCheckLastFailureReasonOutput, error) { - req, out := c.GetHealthCheckLastFailureReasonRequest(input) - return out, req.Send() -} - -// GetHealthCheckLastFailureReasonWithContext is the same as GetHealthCheckLastFailureReason with the addition of -// the ability to pass a context and additional request options. -// -// See GetHealthCheckLastFailureReason for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetHealthCheckLastFailureReasonWithContext(ctx aws.Context, input *GetHealthCheckLastFailureReasonInput, opts ...request.Option) (*GetHealthCheckLastFailureReasonOutput, error) { - req, out := c.GetHealthCheckLastFailureReasonRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetHealthCheckStatus = "GetHealthCheckStatus" - -// GetHealthCheckStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetHealthCheckStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetHealthCheckStatus for more information on using the GetHealthCheckStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetHealthCheckStatusRequest method. -// req, resp := client.GetHealthCheckStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheckStatus -func (c *Route53) GetHealthCheckStatusRequest(input *GetHealthCheckStatusInput) (req *request.Request, output *GetHealthCheckStatusOutput) { - op := &request.Operation{ - Name: opGetHealthCheckStatus, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/healthcheck/{HealthCheckId}/status", - } - - if input == nil { - input = &GetHealthCheckStatusInput{} - } - - output = &GetHealthCheckStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetHealthCheckStatus API operation for Amazon Route 53. -// -// Gets status of a specified health check. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetHealthCheckStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the specified ID. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheckStatus -func (c *Route53) GetHealthCheckStatus(input *GetHealthCheckStatusInput) (*GetHealthCheckStatusOutput, error) { - req, out := c.GetHealthCheckStatusRequest(input) - return out, req.Send() -} - -// GetHealthCheckStatusWithContext is the same as GetHealthCheckStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetHealthCheckStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetHealthCheckStatusWithContext(ctx aws.Context, input *GetHealthCheckStatusInput, opts ...request.Option) (*GetHealthCheckStatusOutput, error) { - req, out := c.GetHealthCheckStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetHostedZone = "GetHostedZone" - -// GetHostedZoneRequest generates a "aws/request.Request" representing the -// client's request for the GetHostedZone operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetHostedZone for more information on using the GetHostedZone -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetHostedZoneRequest method. -// req, resp := client.GetHostedZoneRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHostedZone -func (c *Route53) GetHostedZoneRequest(input *GetHostedZoneInput) (req *request.Request, output *GetHostedZoneOutput) { - op := &request.Operation{ - Name: opGetHostedZone, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/hostedzone/{Id}", - } - - if input == nil { - input = &GetHostedZoneInput{} - } - - output = &GetHostedZoneOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetHostedZone API operation for Amazon Route 53. -// -// Gets information about a specified hosted zone including the four name servers -// assigned to the hosted zone. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetHostedZone for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHostedZone -func (c *Route53) GetHostedZone(input *GetHostedZoneInput) (*GetHostedZoneOutput, error) { - req, out := c.GetHostedZoneRequest(input) - return out, req.Send() -} - -// GetHostedZoneWithContext is the same as GetHostedZone with the addition of -// the ability to pass a context and additional request options. -// -// See GetHostedZone for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetHostedZoneWithContext(ctx aws.Context, input *GetHostedZoneInput, opts ...request.Option) (*GetHostedZoneOutput, error) { - req, out := c.GetHostedZoneRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetHostedZoneCount = "GetHostedZoneCount" - -// GetHostedZoneCountRequest generates a "aws/request.Request" representing the -// client's request for the GetHostedZoneCount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetHostedZoneCount for more information on using the GetHostedZoneCount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetHostedZoneCountRequest method. -// req, resp := client.GetHostedZoneCountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHostedZoneCount -func (c *Route53) GetHostedZoneCountRequest(input *GetHostedZoneCountInput) (req *request.Request, output *GetHostedZoneCountOutput) { - op := &request.Operation{ - Name: opGetHostedZoneCount, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/hostedzonecount", - } - - if input == nil { - input = &GetHostedZoneCountInput{} - } - - output = &GetHostedZoneCountOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetHostedZoneCount API operation for Amazon Route 53. -// -// Retrieves the number of hosted zones that are associated with the current -// AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetHostedZoneCount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHostedZoneCount -func (c *Route53) GetHostedZoneCount(input *GetHostedZoneCountInput) (*GetHostedZoneCountOutput, error) { - req, out := c.GetHostedZoneCountRequest(input) - return out, req.Send() -} - -// GetHostedZoneCountWithContext is the same as GetHostedZoneCount with the addition of -// the ability to pass a context and additional request options. -// -// See GetHostedZoneCount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetHostedZoneCountWithContext(ctx aws.Context, input *GetHostedZoneCountInput, opts ...request.Option) (*GetHostedZoneCountOutput, error) { - req, out := c.GetHostedZoneCountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetHostedZoneLimit = "GetHostedZoneLimit" - -// GetHostedZoneLimitRequest generates a "aws/request.Request" representing the -// client's request for the GetHostedZoneLimit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetHostedZoneLimit for more information on using the GetHostedZoneLimit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetHostedZoneLimitRequest method. -// req, resp := client.GetHostedZoneLimitRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHostedZoneLimit -func (c *Route53) GetHostedZoneLimitRequest(input *GetHostedZoneLimitInput) (req *request.Request, output *GetHostedZoneLimitOutput) { - op := &request.Operation{ - Name: opGetHostedZoneLimit, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/hostedzonelimit/{Id}/{Type}", - } - - if input == nil { - input = &GetHostedZoneLimitInput{} - } - - output = &GetHostedZoneLimitOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetHostedZoneLimit API operation for Amazon Route 53. -// -// Gets the specified limit for a specified hosted zone, for example, the maximum -// number of records that you can create in the hosted zone. -// -// For the default limit, see Limits (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) -// in the Amazon Route 53 Developer Guide. To request a higher limit, open a -// case (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetHostedZoneLimit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeHostedZoneNotPrivate "HostedZoneNotPrivate" -// The specified hosted zone is a public hosted zone, not a private hosted zone. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHostedZoneLimit -func (c *Route53) GetHostedZoneLimit(input *GetHostedZoneLimitInput) (*GetHostedZoneLimitOutput, error) { - req, out := c.GetHostedZoneLimitRequest(input) - return out, req.Send() -} - -// GetHostedZoneLimitWithContext is the same as GetHostedZoneLimit with the addition of -// the ability to pass a context and additional request options. -// -// See GetHostedZoneLimit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetHostedZoneLimitWithContext(ctx aws.Context, input *GetHostedZoneLimitInput, opts ...request.Option) (*GetHostedZoneLimitOutput, error) { - req, out := c.GetHostedZoneLimitRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetQueryLoggingConfig = "GetQueryLoggingConfig" - -// GetQueryLoggingConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetQueryLoggingConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetQueryLoggingConfig for more information on using the GetQueryLoggingConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetQueryLoggingConfigRequest method. -// req, resp := client.GetQueryLoggingConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetQueryLoggingConfig -func (c *Route53) GetQueryLoggingConfigRequest(input *GetQueryLoggingConfigInput) (req *request.Request, output *GetQueryLoggingConfigOutput) { - op := &request.Operation{ - Name: opGetQueryLoggingConfig, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/queryloggingconfig/{Id}", - } - - if input == nil { - input = &GetQueryLoggingConfigInput{} - } - - output = &GetQueryLoggingConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetQueryLoggingConfig API operation for Amazon Route 53. -// -// Gets information about a specified configuration for DNS query logging. -// -// For more information about DNS query logs, see CreateQueryLoggingConfig and -// Logging DNS Queries (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetQueryLoggingConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchQueryLoggingConfig "NoSuchQueryLoggingConfig" -// There is no DNS query logging configuration with the specified ID. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetQueryLoggingConfig -func (c *Route53) GetQueryLoggingConfig(input *GetQueryLoggingConfigInput) (*GetQueryLoggingConfigOutput, error) { - req, out := c.GetQueryLoggingConfigRequest(input) - return out, req.Send() -} - -// GetQueryLoggingConfigWithContext is the same as GetQueryLoggingConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetQueryLoggingConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetQueryLoggingConfigWithContext(ctx aws.Context, input *GetQueryLoggingConfigInput, opts ...request.Option) (*GetQueryLoggingConfigOutput, error) { - req, out := c.GetQueryLoggingConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetReusableDelegationSet = "GetReusableDelegationSet" - -// GetReusableDelegationSetRequest generates a "aws/request.Request" representing the -// client's request for the GetReusableDelegationSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetReusableDelegationSet for more information on using the GetReusableDelegationSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetReusableDelegationSetRequest method. -// req, resp := client.GetReusableDelegationSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetReusableDelegationSet -func (c *Route53) GetReusableDelegationSetRequest(input *GetReusableDelegationSetInput) (req *request.Request, output *GetReusableDelegationSetOutput) { - op := &request.Operation{ - Name: opGetReusableDelegationSet, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/delegationset/{Id}", - } - - if input == nil { - input = &GetReusableDelegationSetInput{} - } - - output = &GetReusableDelegationSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetReusableDelegationSet API operation for Amazon Route 53. -// -// Retrieves information about a specified reusable delegation set, including -// the four name servers that are assigned to the delegation set. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetReusableDelegationSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchDelegationSet "NoSuchDelegationSet" -// A reusable delegation set with the specified ID does not exist. -// -// * ErrCodeDelegationSetNotReusable "DelegationSetNotReusable" -// A reusable delegation set with the specified ID does not exist. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetReusableDelegationSet -func (c *Route53) GetReusableDelegationSet(input *GetReusableDelegationSetInput) (*GetReusableDelegationSetOutput, error) { - req, out := c.GetReusableDelegationSetRequest(input) - return out, req.Send() -} - -// GetReusableDelegationSetWithContext is the same as GetReusableDelegationSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetReusableDelegationSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetReusableDelegationSetWithContext(ctx aws.Context, input *GetReusableDelegationSetInput, opts ...request.Option) (*GetReusableDelegationSetOutput, error) { - req, out := c.GetReusableDelegationSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetReusableDelegationSetLimit = "GetReusableDelegationSetLimit" - -// GetReusableDelegationSetLimitRequest generates a "aws/request.Request" representing the -// client's request for the GetReusableDelegationSetLimit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetReusableDelegationSetLimit for more information on using the GetReusableDelegationSetLimit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetReusableDelegationSetLimitRequest method. -// req, resp := client.GetReusableDelegationSetLimitRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetReusableDelegationSetLimit -func (c *Route53) GetReusableDelegationSetLimitRequest(input *GetReusableDelegationSetLimitInput) (req *request.Request, output *GetReusableDelegationSetLimitOutput) { - op := &request.Operation{ - Name: opGetReusableDelegationSetLimit, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/reusabledelegationsetlimit/{Id}/{Type}", - } - - if input == nil { - input = &GetReusableDelegationSetLimitInput{} - } - - output = &GetReusableDelegationSetLimitOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetReusableDelegationSetLimit API operation for Amazon Route 53. -// -// Gets the maximum number of hosted zones that you can associate with the specified -// reusable delegation set. -// -// For the default limit, see Limits (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) -// in the Amazon Route 53 Developer Guide. To request a higher limit, open a -// case (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetReusableDelegationSetLimit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeNoSuchDelegationSet "NoSuchDelegationSet" -// A reusable delegation set with the specified ID does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetReusableDelegationSetLimit -func (c *Route53) GetReusableDelegationSetLimit(input *GetReusableDelegationSetLimitInput) (*GetReusableDelegationSetLimitOutput, error) { - req, out := c.GetReusableDelegationSetLimitRequest(input) - return out, req.Send() -} - -// GetReusableDelegationSetLimitWithContext is the same as GetReusableDelegationSetLimit with the addition of -// the ability to pass a context and additional request options. -// -// See GetReusableDelegationSetLimit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetReusableDelegationSetLimitWithContext(ctx aws.Context, input *GetReusableDelegationSetLimitInput, opts ...request.Option) (*GetReusableDelegationSetLimitOutput, error) { - req, out := c.GetReusableDelegationSetLimitRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTrafficPolicy = "GetTrafficPolicy" - -// GetTrafficPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetTrafficPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTrafficPolicy for more information on using the GetTrafficPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTrafficPolicyRequest method. -// req, resp := client.GetTrafficPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetTrafficPolicy -func (c *Route53) GetTrafficPolicyRequest(input *GetTrafficPolicyInput) (req *request.Request, output *GetTrafficPolicyOutput) { - op := &request.Operation{ - Name: opGetTrafficPolicy, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/trafficpolicy/{Id}/{Version}", - } - - if input == nil { - input = &GetTrafficPolicyInput{} - } - - output = &GetTrafficPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTrafficPolicy API operation for Amazon Route 53. -// -// Gets information about a specific traffic policy 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 Route 53's -// API operation GetTrafficPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchTrafficPolicy "NoSuchTrafficPolicy" -// No traffic policy exists with the specified ID. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetTrafficPolicy -func (c *Route53) GetTrafficPolicy(input *GetTrafficPolicyInput) (*GetTrafficPolicyOutput, error) { - req, out := c.GetTrafficPolicyRequest(input) - return out, req.Send() -} - -// GetTrafficPolicyWithContext is the same as GetTrafficPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetTrafficPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetTrafficPolicyWithContext(ctx aws.Context, input *GetTrafficPolicyInput, opts ...request.Option) (*GetTrafficPolicyOutput, error) { - req, out := c.GetTrafficPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTrafficPolicyInstance = "GetTrafficPolicyInstance" - -// GetTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the -// client's request for the GetTrafficPolicyInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTrafficPolicyInstance for more information on using the GetTrafficPolicyInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTrafficPolicyInstanceRequest method. -// req, resp := client.GetTrafficPolicyInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetTrafficPolicyInstance -func (c *Route53) GetTrafficPolicyInstanceRequest(input *GetTrafficPolicyInstanceInput) (req *request.Request, output *GetTrafficPolicyInstanceOutput) { - op := &request.Operation{ - Name: opGetTrafficPolicyInstance, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/trafficpolicyinstance/{Id}", - } - - if input == nil { - input = &GetTrafficPolicyInstanceInput{} - } - - output = &GetTrafficPolicyInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTrafficPolicyInstance API operation for Amazon Route 53. -// -// Gets information about a specified traffic policy instance. -// -// After you submit a CreateTrafficPolicyInstance or an UpdateTrafficPolicyInstance -// request, there's a brief delay while Amazon Route 53 creates the resource -// record sets that are specified in the traffic policy definition. For more -// information, see the State response element. -// -// In the Route 53 console, traffic policy instances are known as policy records. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetTrafficPolicyInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchTrafficPolicyInstance "NoSuchTrafficPolicyInstance" -// No traffic policy instance exists with the specified ID. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetTrafficPolicyInstance -func (c *Route53) GetTrafficPolicyInstance(input *GetTrafficPolicyInstanceInput) (*GetTrafficPolicyInstanceOutput, error) { - req, out := c.GetTrafficPolicyInstanceRequest(input) - return out, req.Send() -} - -// GetTrafficPolicyInstanceWithContext is the same as GetTrafficPolicyInstance with the addition of -// the ability to pass a context and additional request options. -// -// See GetTrafficPolicyInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetTrafficPolicyInstanceWithContext(ctx aws.Context, input *GetTrafficPolicyInstanceInput, opts ...request.Option) (*GetTrafficPolicyInstanceOutput, error) { - req, out := c.GetTrafficPolicyInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTrafficPolicyInstanceCount = "GetTrafficPolicyInstanceCount" - -// GetTrafficPolicyInstanceCountRequest generates a "aws/request.Request" representing the -// client's request for the GetTrafficPolicyInstanceCount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTrafficPolicyInstanceCount for more information on using the GetTrafficPolicyInstanceCount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTrafficPolicyInstanceCountRequest method. -// req, resp := client.GetTrafficPolicyInstanceCountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetTrafficPolicyInstanceCount -func (c *Route53) GetTrafficPolicyInstanceCountRequest(input *GetTrafficPolicyInstanceCountInput) (req *request.Request, output *GetTrafficPolicyInstanceCountOutput) { - op := &request.Operation{ - Name: opGetTrafficPolicyInstanceCount, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/trafficpolicyinstancecount", - } - - if input == nil { - input = &GetTrafficPolicyInstanceCountInput{} - } - - output = &GetTrafficPolicyInstanceCountOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTrafficPolicyInstanceCount API operation for Amazon Route 53. -// -// Gets the number of traffic policy instances that are associated with the -// current AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation GetTrafficPolicyInstanceCount for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetTrafficPolicyInstanceCount -func (c *Route53) GetTrafficPolicyInstanceCount(input *GetTrafficPolicyInstanceCountInput) (*GetTrafficPolicyInstanceCountOutput, error) { - req, out := c.GetTrafficPolicyInstanceCountRequest(input) - return out, req.Send() -} - -// GetTrafficPolicyInstanceCountWithContext is the same as GetTrafficPolicyInstanceCount with the addition of -// the ability to pass a context and additional request options. -// -// See GetTrafficPolicyInstanceCount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) GetTrafficPolicyInstanceCountWithContext(ctx aws.Context, input *GetTrafficPolicyInstanceCountInput, opts ...request.Option) (*GetTrafficPolicyInstanceCountOutput, error) { - req, out := c.GetTrafficPolicyInstanceCountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListGeoLocations = "ListGeoLocations" - -// ListGeoLocationsRequest generates a "aws/request.Request" representing the -// client's request for the ListGeoLocations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListGeoLocations for more information on using the ListGeoLocations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListGeoLocationsRequest method. -// req, resp := client.ListGeoLocationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListGeoLocations -func (c *Route53) ListGeoLocationsRequest(input *ListGeoLocationsInput) (req *request.Request, output *ListGeoLocationsOutput) { - op := &request.Operation{ - Name: opListGeoLocations, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/geolocations", - } - - if input == nil { - input = &ListGeoLocationsInput{} - } - - output = &ListGeoLocationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGeoLocations API operation for Amazon Route 53. -// -// Retrieves a list of supported geographic locations. -// -// Countries are listed first, and continents are listed last. If Amazon Route -// 53 supports subdivisions for a country (for example, states or provinces), -// the subdivisions for that country are listed in alphabetical order immediately -// after the corresponding country. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListGeoLocations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListGeoLocations -func (c *Route53) ListGeoLocations(input *ListGeoLocationsInput) (*ListGeoLocationsOutput, error) { - req, out := c.ListGeoLocationsRequest(input) - return out, req.Send() -} - -// ListGeoLocationsWithContext is the same as ListGeoLocations with the addition of -// the ability to pass a context and additional request options. -// -// See ListGeoLocations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListGeoLocationsWithContext(ctx aws.Context, input *ListGeoLocationsInput, opts ...request.Option) (*ListGeoLocationsOutput, error) { - req, out := c.ListGeoLocationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListHealthChecks = "ListHealthChecks" - -// ListHealthChecksRequest generates a "aws/request.Request" representing the -// client's request for the ListHealthChecks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListHealthChecks for more information on using the ListHealthChecks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListHealthChecksRequest method. -// req, resp := client.ListHealthChecksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListHealthChecks -func (c *Route53) ListHealthChecksRequest(input *ListHealthChecksInput) (req *request.Request, output *ListHealthChecksOutput) { - op := &request.Operation{ - Name: opListHealthChecks, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/healthcheck", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListHealthChecksInput{} - } - - output = &ListHealthChecksOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListHealthChecks API operation for Amazon Route 53. -// -// Retrieve a list of the health checks that are associated with the current -// AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListHealthChecks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeIncompatibleVersion "IncompatibleVersion" -// The resource you're trying to access is unsupported on this Amazon Route -// 53 endpoint. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListHealthChecks -func (c *Route53) ListHealthChecks(input *ListHealthChecksInput) (*ListHealthChecksOutput, error) { - req, out := c.ListHealthChecksRequest(input) - return out, req.Send() -} - -// ListHealthChecksWithContext is the same as ListHealthChecks with the addition of -// the ability to pass a context and additional request options. -// -// See ListHealthChecks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListHealthChecksWithContext(ctx aws.Context, input *ListHealthChecksInput, opts ...request.Option) (*ListHealthChecksOutput, error) { - req, out := c.ListHealthChecksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListHealthChecksPages iterates over the pages of a ListHealthChecks operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListHealthChecks 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 ListHealthChecks operation. -// pageNum := 0 -// err := client.ListHealthChecksPages(params, -// func(page *ListHealthChecksOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Route53) ListHealthChecksPages(input *ListHealthChecksInput, fn func(*ListHealthChecksOutput, bool) bool) error { - return c.ListHealthChecksPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListHealthChecksPagesWithContext same as ListHealthChecksPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListHealthChecksPagesWithContext(ctx aws.Context, input *ListHealthChecksInput, fn func(*ListHealthChecksOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListHealthChecksInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListHealthChecksRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListHealthChecksOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListHostedZones = "ListHostedZones" - -// ListHostedZonesRequest generates a "aws/request.Request" representing the -// client's request for the ListHostedZones operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListHostedZones for more information on using the ListHostedZones -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListHostedZonesRequest method. -// req, resp := client.ListHostedZonesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListHostedZones -func (c *Route53) ListHostedZonesRequest(input *ListHostedZonesInput) (req *request.Request, output *ListHostedZonesOutput) { - op := &request.Operation{ - Name: opListHostedZones, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/hostedzone", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListHostedZonesInput{} - } - - output = &ListHostedZonesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListHostedZones API operation for Amazon Route 53. -// -// Retrieves a list of the public and private hosted zones that are associated -// with the current AWS account. The response includes a HostedZones child element -// for each hosted zone. -// -// Amazon Route 53 returns a maximum of 100 items in each response. If you have -// a lot of hosted zones, you can use the maxitems parameter to list them in -// groups of up to 100. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListHostedZones for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeNoSuchDelegationSet "NoSuchDelegationSet" -// A reusable delegation set with the specified ID does not exist. -// -// * ErrCodeDelegationSetNotReusable "DelegationSetNotReusable" -// A reusable delegation set with the specified ID does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListHostedZones -func (c *Route53) ListHostedZones(input *ListHostedZonesInput) (*ListHostedZonesOutput, error) { - req, out := c.ListHostedZonesRequest(input) - return out, req.Send() -} - -// ListHostedZonesWithContext is the same as ListHostedZones with the addition of -// the ability to pass a context and additional request options. -// -// See ListHostedZones for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListHostedZonesWithContext(ctx aws.Context, input *ListHostedZonesInput, opts ...request.Option) (*ListHostedZonesOutput, error) { - req, out := c.ListHostedZonesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListHostedZonesPages iterates over the pages of a ListHostedZones operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListHostedZones 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 ListHostedZones operation. -// pageNum := 0 -// err := client.ListHostedZonesPages(params, -// func(page *ListHostedZonesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Route53) ListHostedZonesPages(input *ListHostedZonesInput, fn func(*ListHostedZonesOutput, bool) bool) error { - return c.ListHostedZonesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListHostedZonesPagesWithContext same as ListHostedZonesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListHostedZonesPagesWithContext(ctx aws.Context, input *ListHostedZonesInput, fn func(*ListHostedZonesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListHostedZonesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListHostedZonesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListHostedZonesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListHostedZonesByName = "ListHostedZonesByName" - -// ListHostedZonesByNameRequest generates a "aws/request.Request" representing the -// client's request for the ListHostedZonesByName operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListHostedZonesByName for more information on using the ListHostedZonesByName -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListHostedZonesByNameRequest method. -// req, resp := client.ListHostedZonesByNameRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListHostedZonesByName -func (c *Route53) ListHostedZonesByNameRequest(input *ListHostedZonesByNameInput) (req *request.Request, output *ListHostedZonesByNameOutput) { - op := &request.Operation{ - Name: opListHostedZonesByName, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/hostedzonesbyname", - } - - if input == nil { - input = &ListHostedZonesByNameInput{} - } - - output = &ListHostedZonesByNameOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListHostedZonesByName API operation for Amazon Route 53. -// -// Retrieves a list of your hosted zones in lexicographic order. The response -// includes a HostedZones child element for each hosted zone created by the -// current AWS account. -// -// ListHostedZonesByName sorts hosted zones by name with the labels reversed. -// For example: -// -// com.example.www. -// -// Note the trailing dot, which can change the sort order in some circumstances. -// -// If the domain name includes escape characters or Punycode, ListHostedZonesByName -// alphabetizes the domain name using the escaped or Punycoded value, which -// is the format that Amazon Route 53 saves in its database. For example, to -// create a hosted zone for exämple.com, you specify ex\344mple.com for the -// domain name. ListHostedZonesByName alphabetizes it as: -// -// com.ex\344mple. -// -// The labels are reversed and alphabetized using the escaped value. For more -// information about valid domain name formats, including internationalized -// domain names, see DNS Domain Name Format (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html) -// in the Amazon Route 53 Developer Guide. -// -// Route 53 returns up to 100 items in each response. If you have a lot of hosted -// zones, use the MaxItems parameter to list them in groups of up to 100. The -// response includes values that help navigate from one group of MaxItems hosted -// zones to the next: -// -// * The DNSName and HostedZoneId elements in the response contain the values, -// if any, specified for the dnsname and hostedzoneid parameters in the request -// that produced the current response. -// -// * The MaxItems element in the response contains the value, if any, that -// you specified for the maxitems parameter in the request that produced -// the current response. -// -// * If the value of IsTruncated in the response is true, there are more -// hosted zones associated with the current AWS account. -// -// If IsTruncated is false, this response includes the last hosted zone that -// is associated with the current account. The NextDNSName element and NextHostedZoneId -// elements are omitted from the response. -// -// * The NextDNSName and NextHostedZoneId elements in the response contain -// the domain name and the hosted zone ID of the next hosted zone that is -// associated with the current AWS account. If you want to list more hosted -// zones, make another call to ListHostedZonesByName, and specify the value -// of NextDNSName and NextHostedZoneId in the dnsname and hostedzoneid parameters, -// respectively. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListHostedZonesByName for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeInvalidDomainName "InvalidDomainName" -// The specified domain name is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListHostedZonesByName -func (c *Route53) ListHostedZonesByName(input *ListHostedZonesByNameInput) (*ListHostedZonesByNameOutput, error) { - req, out := c.ListHostedZonesByNameRequest(input) - return out, req.Send() -} - -// ListHostedZonesByNameWithContext is the same as ListHostedZonesByName with the addition of -// the ability to pass a context and additional request options. -// -// See ListHostedZonesByName for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListHostedZonesByNameWithContext(ctx aws.Context, input *ListHostedZonesByNameInput, opts ...request.Option) (*ListHostedZonesByNameOutput, error) { - req, out := c.ListHostedZonesByNameRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListQueryLoggingConfigs = "ListQueryLoggingConfigs" - -// ListQueryLoggingConfigsRequest generates a "aws/request.Request" representing the -// client's request for the ListQueryLoggingConfigs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListQueryLoggingConfigs for more information on using the ListQueryLoggingConfigs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListQueryLoggingConfigsRequest method. -// req, resp := client.ListQueryLoggingConfigsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListQueryLoggingConfigs -func (c *Route53) ListQueryLoggingConfigsRequest(input *ListQueryLoggingConfigsInput) (req *request.Request, output *ListQueryLoggingConfigsOutput) { - op := &request.Operation{ - Name: opListQueryLoggingConfigs, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/queryloggingconfig", - } - - if input == nil { - input = &ListQueryLoggingConfigsInput{} - } - - output = &ListQueryLoggingConfigsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListQueryLoggingConfigs API operation for Amazon Route 53. -// -// Lists the configurations for DNS query logging that are associated with the -// current AWS account or the configuration that is associated with a specified -// hosted zone. -// -// For more information about DNS query logs, see CreateQueryLoggingConfig. -// Additional information, including the format of DNS query logs, appears in -// Logging DNS Queries (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html) -// in the Amazon Route 53 Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListQueryLoggingConfigs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeInvalidPaginationToken "InvalidPaginationToken" -// The value that you specified to get the second or subsequent page of results -// is invalid. -// -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListQueryLoggingConfigs -func (c *Route53) ListQueryLoggingConfigs(input *ListQueryLoggingConfigsInput) (*ListQueryLoggingConfigsOutput, error) { - req, out := c.ListQueryLoggingConfigsRequest(input) - return out, req.Send() -} - -// ListQueryLoggingConfigsWithContext is the same as ListQueryLoggingConfigs with the addition of -// the ability to pass a context and additional request options. -// -// See ListQueryLoggingConfigs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListQueryLoggingConfigsWithContext(ctx aws.Context, input *ListQueryLoggingConfigsInput, opts ...request.Option) (*ListQueryLoggingConfigsOutput, error) { - req, out := c.ListQueryLoggingConfigsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListResourceRecordSets = "ListResourceRecordSets" - -// ListResourceRecordSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListResourceRecordSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResourceRecordSets for more information on using the ListResourceRecordSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResourceRecordSetsRequest method. -// req, resp := client.ListResourceRecordSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListResourceRecordSets -func (c *Route53) ListResourceRecordSetsRequest(input *ListResourceRecordSetsInput) (req *request.Request, output *ListResourceRecordSetsOutput) { - op := &request.Operation{ - Name: opListResourceRecordSets, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/hostedzone/{Id}/rrset", - Paginator: &request.Paginator{ - InputTokens: []string{"StartRecordName", "StartRecordType", "StartRecordIdentifier"}, - OutputTokens: []string{"NextRecordName", "NextRecordType", "NextRecordIdentifier"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListResourceRecordSetsInput{} - } - - output = &ListResourceRecordSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResourceRecordSets API operation for Amazon Route 53. -// -// Lists the resource record sets in a specified hosted zone. -// -// ListResourceRecordSets returns up to 100 resource record sets at a time in -// ASCII order, beginning at a position specified by the name and type elements. -// -// Sort order -// -// ListResourceRecordSets sorts results first by DNS name with the labels reversed, -// for example: -// -// com.example.www. -// -// Note the trailing dot, which can change the sort order when the record name -// contains characters that appear before . (decimal 46) in the ASCII table. -// These characters include the following: ! " # $ % & ' ( ) * + , - -// -// When multiple records have the same DNS name, ListResourceRecordSets sorts -// results by the record type. -// -// Specifying where to start listing records -// -// You can use the name and type elements to specify the resource record set -// that the list begins with: -// -// If you do not specify Name or TypeThe results begin with the first resource -// record set that the hosted zone contains. -// -// If you specify Name but not TypeThe results begin with the first resource -// record set in the list whose name is greater than or equal to Name. -// -// If you specify Type but not NameAmazon Route 53 returns the InvalidInput -// error. -// -// If you specify both Name and TypeThe results begin with the first resource -// record set in the list whose name is greater than or equal to Name, and whose -// type is greater than or equal to Type. -// -// Resource record sets that are PENDING -// -// This action returns the most current version of the records. This includes -// records that are PENDING, and that are not yet available on all Route 53 -// DNS servers. -// -// Changing resource record sets -// -// To ensure that you get an accurate listing of the resource record sets for -// a hosted zone at a point in time, do not submit a ChangeResourceRecordSets -// request while you're paging through the results of a ListResourceRecordSets -// request. If you do, some pages may display results without the latest changes -// while other pages display results with the latest changes. -// -// Displaying the next page of results -// -// If a ListResourceRecordSets command returns more than one page of results, -// the value of IsTruncated is true. To display the next page of results, get -// the values of NextRecordName, NextRecordType, and NextRecordIdentifier (if -// any) from the response. Then submit another ListResourceRecordSets request, -// and specify those values for StartRecordName, StartRecordType, and StartRecordIdentifier. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListResourceRecordSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListResourceRecordSets -func (c *Route53) ListResourceRecordSets(input *ListResourceRecordSetsInput) (*ListResourceRecordSetsOutput, error) { - req, out := c.ListResourceRecordSetsRequest(input) - return out, req.Send() -} - -// ListResourceRecordSetsWithContext is the same as ListResourceRecordSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListResourceRecordSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListResourceRecordSetsWithContext(ctx aws.Context, input *ListResourceRecordSetsInput, opts ...request.Option) (*ListResourceRecordSetsOutput, error) { - req, out := c.ListResourceRecordSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListResourceRecordSetsPages iterates over the pages of a ListResourceRecordSets operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListResourceRecordSets 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 ListResourceRecordSets operation. -// pageNum := 0 -// err := client.ListResourceRecordSetsPages(params, -// func(page *ListResourceRecordSetsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Route53) ListResourceRecordSetsPages(input *ListResourceRecordSetsInput, fn func(*ListResourceRecordSetsOutput, bool) bool) error { - return c.ListResourceRecordSetsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListResourceRecordSetsPagesWithContext same as ListResourceRecordSetsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListResourceRecordSetsPagesWithContext(ctx aws.Context, input *ListResourceRecordSetsInput, fn func(*ListResourceRecordSetsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListResourceRecordSetsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListResourceRecordSetsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResourceRecordSetsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListReusableDelegationSets = "ListReusableDelegationSets" - -// ListReusableDelegationSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListReusableDelegationSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListReusableDelegationSets for more information on using the ListReusableDelegationSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListReusableDelegationSetsRequest method. -// req, resp := client.ListReusableDelegationSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListReusableDelegationSets -func (c *Route53) ListReusableDelegationSetsRequest(input *ListReusableDelegationSetsInput) (req *request.Request, output *ListReusableDelegationSetsOutput) { - op := &request.Operation{ - Name: opListReusableDelegationSets, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/delegationset", - } - - if input == nil { - input = &ListReusableDelegationSetsInput{} - } - - output = &ListReusableDelegationSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListReusableDelegationSets API operation for Amazon Route 53. -// -// Retrieves a list of the reusable delegation sets that are associated with -// the current AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListReusableDelegationSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListReusableDelegationSets -func (c *Route53) ListReusableDelegationSets(input *ListReusableDelegationSetsInput) (*ListReusableDelegationSetsOutput, error) { - req, out := c.ListReusableDelegationSetsRequest(input) - return out, req.Send() -} - -// ListReusableDelegationSetsWithContext is the same as ListReusableDelegationSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListReusableDelegationSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListReusableDelegationSetsWithContext(ctx aws.Context, input *ListReusableDelegationSetsInput, opts ...request.Option) (*ListReusableDelegationSetsOutput, error) { - req, out := c.ListReusableDelegationSetsRequest(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/route53-2013-04-01/ListTagsForResource -func (c *Route53) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/tags/{ResourceType}/{ResourceId}", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for Amazon Route 53. -// -// Lists tags for one health check or hosted zone. -// -// For information about using tags for cost allocation, see Using Cost Allocation -// Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) -// in the AWS Billing and Cost Management User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the specified ID. -// -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" -// If Amazon Route 53 can't process a request before the next request arrives, -// it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for -// the same request, we recommend that you wait, in intervals of increasing -// duration, before you try the request again. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The limit on the number of requests per second was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTagsForResource -func (c *Route53) 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 *Route53) 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 opListTagsForResources = "ListTagsForResources" - -// ListTagsForResourcesRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTagsForResources for more information on using the ListTagsForResources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsForResourcesRequest method. -// req, resp := client.ListTagsForResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTagsForResources -func (c *Route53) ListTagsForResourcesRequest(input *ListTagsForResourcesInput) (req *request.Request, output *ListTagsForResourcesOutput) { - op := &request.Operation{ - Name: opListTagsForResources, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/tags/{ResourceType}", - } - - if input == nil { - input = &ListTagsForResourcesInput{} - } - - output = &ListTagsForResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResources API operation for Amazon Route 53. -// -// Lists tags for up to 10 health checks or hosted zones. -// -// For information about using tags for cost allocation, see Using Cost Allocation -// Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) -// in the AWS Billing and Cost Management User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListTagsForResources for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the specified ID. -// -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" -// If Amazon Route 53 can't process a request before the next request arrives, -// it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for -// the same request, we recommend that you wait, in intervals of increasing -// duration, before you try the request again. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The limit on the number of requests per second was exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTagsForResources -func (c *Route53) ListTagsForResources(input *ListTagsForResourcesInput) (*ListTagsForResourcesOutput, error) { - req, out := c.ListTagsForResourcesRequest(input) - return out, req.Send() -} - -// ListTagsForResourcesWithContext is the same as ListTagsForResources with the addition of -// the ability to pass a context and additional request options. -// -// See ListTagsForResources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListTagsForResourcesWithContext(ctx aws.Context, input *ListTagsForResourcesInput, opts ...request.Option) (*ListTagsForResourcesOutput, error) { - req, out := c.ListTagsForResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTrafficPolicies = "ListTrafficPolicies" - -// ListTrafficPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListTrafficPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTrafficPolicies for more information on using the ListTrafficPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTrafficPoliciesRequest method. -// req, resp := client.ListTrafficPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicies -func (c *Route53) ListTrafficPoliciesRequest(input *ListTrafficPoliciesInput) (req *request.Request, output *ListTrafficPoliciesOutput) { - op := &request.Operation{ - Name: opListTrafficPolicies, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/trafficpolicies", - } - - if input == nil { - input = &ListTrafficPoliciesInput{} - } - - output = &ListTrafficPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTrafficPolicies API operation for Amazon Route 53. -// -// Gets information about the latest version for every traffic policy that is -// associated with the current AWS account. Policies are listed in the order -// that they were created in. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListTrafficPolicies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicies -func (c *Route53) ListTrafficPolicies(input *ListTrafficPoliciesInput) (*ListTrafficPoliciesOutput, error) { - req, out := c.ListTrafficPoliciesRequest(input) - return out, req.Send() -} - -// ListTrafficPoliciesWithContext is the same as ListTrafficPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListTrafficPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListTrafficPoliciesWithContext(ctx aws.Context, input *ListTrafficPoliciesInput, opts ...request.Option) (*ListTrafficPoliciesOutput, error) { - req, out := c.ListTrafficPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTrafficPolicyInstances = "ListTrafficPolicyInstances" - -// ListTrafficPolicyInstancesRequest generates a "aws/request.Request" representing the -// client's request for the ListTrafficPolicyInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTrafficPolicyInstances for more information on using the ListTrafficPolicyInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTrafficPolicyInstancesRequest method. -// req, resp := client.ListTrafficPolicyInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyInstances -func (c *Route53) ListTrafficPolicyInstancesRequest(input *ListTrafficPolicyInstancesInput) (req *request.Request, output *ListTrafficPolicyInstancesOutput) { - op := &request.Operation{ - Name: opListTrafficPolicyInstances, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/trafficpolicyinstances", - } - - if input == nil { - input = &ListTrafficPolicyInstancesInput{} - } - - output = &ListTrafficPolicyInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTrafficPolicyInstances API operation for Amazon Route 53. -// -// Gets information about the traffic policy instances that you created by using -// the current AWS account. -// -// After you submit an UpdateTrafficPolicyInstance request, there's a brief -// delay while Amazon Route 53 creates the resource record sets that are specified -// in the traffic policy definition. For more information, see the State response -// element. -// -// Route 53 returns a maximum of 100 items in each response. If you have a lot -// of traffic policy instances, you can use the MaxItems parameter to list them -// in groups of up to 100. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListTrafficPolicyInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeNoSuchTrafficPolicyInstance "NoSuchTrafficPolicyInstance" -// No traffic policy instance exists with the specified ID. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyInstances -func (c *Route53) ListTrafficPolicyInstances(input *ListTrafficPolicyInstancesInput) (*ListTrafficPolicyInstancesOutput, error) { - req, out := c.ListTrafficPolicyInstancesRequest(input) - return out, req.Send() -} - -// ListTrafficPolicyInstancesWithContext is the same as ListTrafficPolicyInstances with the addition of -// the ability to pass a context and additional request options. -// -// See ListTrafficPolicyInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListTrafficPolicyInstancesWithContext(ctx aws.Context, input *ListTrafficPolicyInstancesInput, opts ...request.Option) (*ListTrafficPolicyInstancesOutput, error) { - req, out := c.ListTrafficPolicyInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTrafficPolicyInstancesByHostedZone = "ListTrafficPolicyInstancesByHostedZone" - -// ListTrafficPolicyInstancesByHostedZoneRequest generates a "aws/request.Request" representing the -// client's request for the ListTrafficPolicyInstancesByHostedZone operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTrafficPolicyInstancesByHostedZone for more information on using the ListTrafficPolicyInstancesByHostedZone -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTrafficPolicyInstancesByHostedZoneRequest method. -// req, resp := client.ListTrafficPolicyInstancesByHostedZoneRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyInstancesByHostedZone -func (c *Route53) ListTrafficPolicyInstancesByHostedZoneRequest(input *ListTrafficPolicyInstancesByHostedZoneInput) (req *request.Request, output *ListTrafficPolicyInstancesByHostedZoneOutput) { - op := &request.Operation{ - Name: opListTrafficPolicyInstancesByHostedZone, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/trafficpolicyinstances/hostedzone", - } - - if input == nil { - input = &ListTrafficPolicyInstancesByHostedZoneInput{} - } - - output = &ListTrafficPolicyInstancesByHostedZoneOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTrafficPolicyInstancesByHostedZone API operation for Amazon Route 53. -// -// Gets information about the traffic policy instances that you created in a -// specified hosted zone. -// -// After you submit a CreateTrafficPolicyInstance or an UpdateTrafficPolicyInstance -// request, there's a brief delay while Amazon Route 53 creates the resource -// record sets that are specified in the traffic policy definition. For more -// information, see the State response element. -// -// Route 53 returns a maximum of 100 items in each response. If you have a lot -// of traffic policy instances, you can use the MaxItems parameter to list them -// in groups of up to 100. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListTrafficPolicyInstancesByHostedZone for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeNoSuchTrafficPolicyInstance "NoSuchTrafficPolicyInstance" -// No traffic policy instance exists with the specified ID. -// -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyInstancesByHostedZone -func (c *Route53) ListTrafficPolicyInstancesByHostedZone(input *ListTrafficPolicyInstancesByHostedZoneInput) (*ListTrafficPolicyInstancesByHostedZoneOutput, error) { - req, out := c.ListTrafficPolicyInstancesByHostedZoneRequest(input) - return out, req.Send() -} - -// ListTrafficPolicyInstancesByHostedZoneWithContext is the same as ListTrafficPolicyInstancesByHostedZone with the addition of -// the ability to pass a context and additional request options. -// -// See ListTrafficPolicyInstancesByHostedZone for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListTrafficPolicyInstancesByHostedZoneWithContext(ctx aws.Context, input *ListTrafficPolicyInstancesByHostedZoneInput, opts ...request.Option) (*ListTrafficPolicyInstancesByHostedZoneOutput, error) { - req, out := c.ListTrafficPolicyInstancesByHostedZoneRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTrafficPolicyInstancesByPolicy = "ListTrafficPolicyInstancesByPolicy" - -// ListTrafficPolicyInstancesByPolicyRequest generates a "aws/request.Request" representing the -// client's request for the ListTrafficPolicyInstancesByPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTrafficPolicyInstancesByPolicy for more information on using the ListTrafficPolicyInstancesByPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTrafficPolicyInstancesByPolicyRequest method. -// req, resp := client.ListTrafficPolicyInstancesByPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyInstancesByPolicy -func (c *Route53) ListTrafficPolicyInstancesByPolicyRequest(input *ListTrafficPolicyInstancesByPolicyInput) (req *request.Request, output *ListTrafficPolicyInstancesByPolicyOutput) { - op := &request.Operation{ - Name: opListTrafficPolicyInstancesByPolicy, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/trafficpolicyinstances/trafficpolicy", - } - - if input == nil { - input = &ListTrafficPolicyInstancesByPolicyInput{} - } - - output = &ListTrafficPolicyInstancesByPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTrafficPolicyInstancesByPolicy API operation for Amazon Route 53. -// -// Gets information about the traffic policy instances that you created by using -// a specify traffic policy version. -// -// After you submit a CreateTrafficPolicyInstance or an UpdateTrafficPolicyInstance -// request, there's a brief delay while Amazon Route 53 creates the resource -// record sets that are specified in the traffic policy definition. For more -// information, see the State response element. -// -// Route 53 returns a maximum of 100 items in each response. If you have a lot -// of traffic policy instances, you can use the MaxItems parameter to list them -// in groups of up to 100. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListTrafficPolicyInstancesByPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeNoSuchTrafficPolicyInstance "NoSuchTrafficPolicyInstance" -// No traffic policy instance exists with the specified ID. -// -// * ErrCodeNoSuchTrafficPolicy "NoSuchTrafficPolicy" -// No traffic policy exists with the specified ID. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyInstancesByPolicy -func (c *Route53) ListTrafficPolicyInstancesByPolicy(input *ListTrafficPolicyInstancesByPolicyInput) (*ListTrafficPolicyInstancesByPolicyOutput, error) { - req, out := c.ListTrafficPolicyInstancesByPolicyRequest(input) - return out, req.Send() -} - -// ListTrafficPolicyInstancesByPolicyWithContext is the same as ListTrafficPolicyInstancesByPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See ListTrafficPolicyInstancesByPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListTrafficPolicyInstancesByPolicyWithContext(ctx aws.Context, input *ListTrafficPolicyInstancesByPolicyInput, opts ...request.Option) (*ListTrafficPolicyInstancesByPolicyOutput, error) { - req, out := c.ListTrafficPolicyInstancesByPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTrafficPolicyVersions = "ListTrafficPolicyVersions" - -// ListTrafficPolicyVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListTrafficPolicyVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTrafficPolicyVersions for more information on using the ListTrafficPolicyVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTrafficPolicyVersionsRequest method. -// req, resp := client.ListTrafficPolicyVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyVersions -func (c *Route53) ListTrafficPolicyVersionsRequest(input *ListTrafficPolicyVersionsInput) (req *request.Request, output *ListTrafficPolicyVersionsOutput) { - op := &request.Operation{ - Name: opListTrafficPolicyVersions, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/trafficpolicies/{Id}/versions", - } - - if input == nil { - input = &ListTrafficPolicyVersionsInput{} - } - - output = &ListTrafficPolicyVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTrafficPolicyVersions API operation for Amazon Route 53. -// -// Gets information about all of the versions for a specified traffic policy. -// -// Traffic policy versions are listed in numerical order by VersionNumber. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListTrafficPolicyVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeNoSuchTrafficPolicy "NoSuchTrafficPolicy" -// No traffic policy exists with the specified ID. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyVersions -func (c *Route53) ListTrafficPolicyVersions(input *ListTrafficPolicyVersionsInput) (*ListTrafficPolicyVersionsOutput, error) { - req, out := c.ListTrafficPolicyVersionsRequest(input) - return out, req.Send() -} - -// ListTrafficPolicyVersionsWithContext is the same as ListTrafficPolicyVersions with the addition of -// the ability to pass a context and additional request options. -// -// See ListTrafficPolicyVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListTrafficPolicyVersionsWithContext(ctx aws.Context, input *ListTrafficPolicyVersionsInput, opts ...request.Option) (*ListTrafficPolicyVersionsOutput, error) { - req, out := c.ListTrafficPolicyVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListVPCAssociationAuthorizations = "ListVPCAssociationAuthorizations" - -// ListVPCAssociationAuthorizationsRequest generates a "aws/request.Request" representing the -// client's request for the ListVPCAssociationAuthorizations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListVPCAssociationAuthorizations for more information on using the ListVPCAssociationAuthorizations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListVPCAssociationAuthorizationsRequest method. -// req, resp := client.ListVPCAssociationAuthorizationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListVPCAssociationAuthorizations -func (c *Route53) ListVPCAssociationAuthorizationsRequest(input *ListVPCAssociationAuthorizationsInput) (req *request.Request, output *ListVPCAssociationAuthorizationsOutput) { - op := &request.Operation{ - Name: opListVPCAssociationAuthorizations, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/hostedzone/{Id}/authorizevpcassociation", - } - - if input == nil { - input = &ListVPCAssociationAuthorizationsInput{} - } - - output = &ListVPCAssociationAuthorizationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListVPCAssociationAuthorizations API operation for Amazon Route 53. -// -// Gets a list of the VPCs that were created by other accounts and that can -// be associated with a specified hosted zone because you've submitted one or -// more CreateVPCAssociationAuthorization requests. -// -// The response includes a VPCs element with a VPC child element for each VPC -// that can be associated with the hosted zone. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation ListVPCAssociationAuthorizations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeInvalidPaginationToken "InvalidPaginationToken" -// The value that you specified to get the second or subsequent page of results -// is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListVPCAssociationAuthorizations -func (c *Route53) ListVPCAssociationAuthorizations(input *ListVPCAssociationAuthorizationsInput) (*ListVPCAssociationAuthorizationsOutput, error) { - req, out := c.ListVPCAssociationAuthorizationsRequest(input) - return out, req.Send() -} - -// ListVPCAssociationAuthorizationsWithContext is the same as ListVPCAssociationAuthorizations with the addition of -// the ability to pass a context and additional request options. -// -// See ListVPCAssociationAuthorizations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) ListVPCAssociationAuthorizationsWithContext(ctx aws.Context, input *ListVPCAssociationAuthorizationsInput, opts ...request.Option) (*ListVPCAssociationAuthorizationsOutput, error) { - req, out := c.ListVPCAssociationAuthorizationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTestDNSAnswer = "TestDNSAnswer" - -// TestDNSAnswerRequest generates a "aws/request.Request" representing the -// client's request for the TestDNSAnswer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TestDNSAnswer for more information on using the TestDNSAnswer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TestDNSAnswerRequest method. -// req, resp := client.TestDNSAnswerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/TestDNSAnswer -func (c *Route53) TestDNSAnswerRequest(input *TestDNSAnswerInput) (req *request.Request, output *TestDNSAnswerOutput) { - op := &request.Operation{ - Name: opTestDNSAnswer, - HTTPMethod: "GET", - HTTPPath: "/2013-04-01/testdnsanswer", - } - - if input == nil { - input = &TestDNSAnswerInput{} - } - - output = &TestDNSAnswerOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestDNSAnswer API operation for Amazon Route 53. -// -// Gets the value that Amazon Route 53 returns in response to a DNS request -// for a specified record name and type. You can optionally specify the IP address -// of a DNS resolver, an EDNS0 client subnet IP address, and a subnet mask. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation TestDNSAnswer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/TestDNSAnswer -func (c *Route53) TestDNSAnswer(input *TestDNSAnswerInput) (*TestDNSAnswerOutput, error) { - req, out := c.TestDNSAnswerRequest(input) - return out, req.Send() -} - -// TestDNSAnswerWithContext is the same as TestDNSAnswer with the addition of -// the ability to pass a context and additional request options. -// -// See TestDNSAnswer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) TestDNSAnswerWithContext(ctx aws.Context, input *TestDNSAnswerInput, opts ...request.Option) (*TestDNSAnswerOutput, error) { - req, out := c.TestDNSAnswerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateHealthCheck = "UpdateHealthCheck" - -// UpdateHealthCheckRequest generates a "aws/request.Request" representing the -// client's request for the UpdateHealthCheck operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateHealthCheck for more information on using the UpdateHealthCheck -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateHealthCheckRequest method. -// req, resp := client.UpdateHealthCheckRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateHealthCheck -func (c *Route53) UpdateHealthCheckRequest(input *UpdateHealthCheckInput) (req *request.Request, output *UpdateHealthCheckOutput) { - op := &request.Operation{ - Name: opUpdateHealthCheck, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/healthcheck/{HealthCheckId}", - } - - if input == nil { - input = &UpdateHealthCheckInput{} - } - - output = &UpdateHealthCheckOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateHealthCheck API operation for Amazon Route 53. -// -// Updates an existing health check. Note that some values can't be updated. -// -// For more information about updating health checks, see Creating, Updating, -// and Deleting Health Checks (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/health-checks-creating-deleting.html) -// in the Amazon Route 53 Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation UpdateHealthCheck for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the specified ID. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeHealthCheckVersionMismatch "HealthCheckVersionMismatch" -// The value of HealthCheckVersion in the request doesn't match the value of -// HealthCheckVersion in the health check. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateHealthCheck -func (c *Route53) UpdateHealthCheck(input *UpdateHealthCheckInput) (*UpdateHealthCheckOutput, error) { - req, out := c.UpdateHealthCheckRequest(input) - return out, req.Send() -} - -// UpdateHealthCheckWithContext is the same as UpdateHealthCheck with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateHealthCheck for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) UpdateHealthCheckWithContext(ctx aws.Context, input *UpdateHealthCheckInput, opts ...request.Option) (*UpdateHealthCheckOutput, error) { - req, out := c.UpdateHealthCheckRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateHostedZoneComment = "UpdateHostedZoneComment" - -// UpdateHostedZoneCommentRequest generates a "aws/request.Request" representing the -// client's request for the UpdateHostedZoneComment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateHostedZoneComment for more information on using the UpdateHostedZoneComment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateHostedZoneCommentRequest method. -// req, resp := client.UpdateHostedZoneCommentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateHostedZoneComment -func (c *Route53) UpdateHostedZoneCommentRequest(input *UpdateHostedZoneCommentInput) (req *request.Request, output *UpdateHostedZoneCommentOutput) { - op := &request.Operation{ - Name: opUpdateHostedZoneComment, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/hostedzone/{Id}", - } - - if input == nil { - input = &UpdateHostedZoneCommentInput{} - } - - output = &UpdateHostedZoneCommentOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateHostedZoneComment API operation for Amazon Route 53. -// -// Updates the comment for a specified hosted zone. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation UpdateHostedZoneComment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" -// No hosted zone exists with the ID that you specified. -// -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateHostedZoneComment -func (c *Route53) UpdateHostedZoneComment(input *UpdateHostedZoneCommentInput) (*UpdateHostedZoneCommentOutput, error) { - req, out := c.UpdateHostedZoneCommentRequest(input) - return out, req.Send() -} - -// UpdateHostedZoneCommentWithContext is the same as UpdateHostedZoneComment with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateHostedZoneComment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) UpdateHostedZoneCommentWithContext(ctx aws.Context, input *UpdateHostedZoneCommentInput, opts ...request.Option) (*UpdateHostedZoneCommentOutput, error) { - req, out := c.UpdateHostedZoneCommentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateTrafficPolicyComment = "UpdateTrafficPolicyComment" - -// UpdateTrafficPolicyCommentRequest generates a "aws/request.Request" representing the -// client's request for the UpdateTrafficPolicyComment operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateTrafficPolicyComment for more information on using the UpdateTrafficPolicyComment -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateTrafficPolicyCommentRequest method. -// req, resp := client.UpdateTrafficPolicyCommentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateTrafficPolicyComment -func (c *Route53) UpdateTrafficPolicyCommentRequest(input *UpdateTrafficPolicyCommentInput) (req *request.Request, output *UpdateTrafficPolicyCommentOutput) { - op := &request.Operation{ - Name: opUpdateTrafficPolicyComment, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/trafficpolicy/{Id}/{Version}", - } - - if input == nil { - input = &UpdateTrafficPolicyCommentInput{} - } - - output = &UpdateTrafficPolicyCommentOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateTrafficPolicyComment API operation for Amazon Route 53. -// -// Updates the comment for a specified traffic policy 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 Route 53's -// API operation UpdateTrafficPolicyComment for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeNoSuchTrafficPolicy "NoSuchTrafficPolicy" -// No traffic policy exists with the specified ID. -// -// * ErrCodeConcurrentModification "ConcurrentModification" -// Another user submitted a request to create, update, or delete the object -// at the same time that you did. Retry the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateTrafficPolicyComment -func (c *Route53) UpdateTrafficPolicyComment(input *UpdateTrafficPolicyCommentInput) (*UpdateTrafficPolicyCommentOutput, error) { - req, out := c.UpdateTrafficPolicyCommentRequest(input) - return out, req.Send() -} - -// UpdateTrafficPolicyCommentWithContext is the same as UpdateTrafficPolicyComment with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateTrafficPolicyComment for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) UpdateTrafficPolicyCommentWithContext(ctx aws.Context, input *UpdateTrafficPolicyCommentInput, opts ...request.Option) (*UpdateTrafficPolicyCommentOutput, error) { - req, out := c.UpdateTrafficPolicyCommentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateTrafficPolicyInstance = "UpdateTrafficPolicyInstance" - -// UpdateTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the -// client's request for the UpdateTrafficPolicyInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateTrafficPolicyInstance for more information on using the UpdateTrafficPolicyInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateTrafficPolicyInstanceRequest method. -// req, resp := client.UpdateTrafficPolicyInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateTrafficPolicyInstance -func (c *Route53) UpdateTrafficPolicyInstanceRequest(input *UpdateTrafficPolicyInstanceInput) (req *request.Request, output *UpdateTrafficPolicyInstanceOutput) { - op := &request.Operation{ - Name: opUpdateTrafficPolicyInstance, - HTTPMethod: "POST", - HTTPPath: "/2013-04-01/trafficpolicyinstance/{Id}", - } - - if input == nil { - input = &UpdateTrafficPolicyInstanceInput{} - } - - output = &UpdateTrafficPolicyInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateTrafficPolicyInstance API operation for Amazon Route 53. -// -// Updates the resource record sets in a specified hosted zone that were created -// based on the settings in a specified traffic policy version. -// -// When you update a traffic policy instance, Amazon Route 53 continues to respond -// to DNS queries for the root resource record set name (such as example.com) -// while it replaces one group of resource record sets with another. Route 53 -// performs the following operations: -// -// Route 53 creates a new group of resource record sets based on the specified -// traffic policy. This is true regardless of how significant the differences -// are between the existing resource record sets and the new resource record -// sets. -// -// When all of the new resource record sets have been created, Route 53 starts -// to respond to DNS queries for the root resource record set name (such as -// example.com) by using the new resource record sets. -// -// Route 53 deletes the old group of resource record sets that are associated -// with the root resource record set name. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53's -// API operation UpdateTrafficPolicyInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// The input is not valid. -// -// * ErrCodeNoSuchTrafficPolicy "NoSuchTrafficPolicy" -// No traffic policy exists with the specified ID. -// -// * ErrCodeNoSuchTrafficPolicyInstance "NoSuchTrafficPolicyInstance" -// No traffic policy instance exists with the specified ID. -// -// * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" -// If Amazon Route 53 can't process a request before the next request arrives, -// it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for -// the same request, we recommend that you wait, in intervals of increasing -// duration, before you try the request again. -// -// * ErrCodeConflictingTypes "ConflictingTypes" -// You tried to update a traffic policy instance by using a traffic policy version -// that has a different DNS type than the current type for the instance. You -// specified the type in the JSON document in the CreateTrafficPolicy or CreateTrafficPolicyVersionrequest. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateTrafficPolicyInstance -func (c *Route53) UpdateTrafficPolicyInstance(input *UpdateTrafficPolicyInstanceInput) (*UpdateTrafficPolicyInstanceOutput, error) { - req, out := c.UpdateTrafficPolicyInstanceRequest(input) - return out, req.Send() -} - -// UpdateTrafficPolicyInstanceWithContext is the same as UpdateTrafficPolicyInstance with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateTrafficPolicyInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) UpdateTrafficPolicyInstanceWithContext(ctx aws.Context, input *UpdateTrafficPolicyInstanceInput, opts ...request.Option) (*UpdateTrafficPolicyInstanceOutput, error) { - req, out := c.UpdateTrafficPolicyInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// A complex type that contains the type of limit that you specified in the -// request and the current value for that limit. -type AccountLimit struct { - _ struct{} `type:"structure"` - - // The limit that you requested. Valid values include the following: - // - // * MAX_HEALTH_CHECKS_BY_OWNER: The maximum number of health checks that - // you can create using the current account. - // - // * MAX_HOSTED_ZONES_BY_OWNER: The maximum number of hosted zones that you - // can create using the current account. - // - // * MAX_REUSABLE_DELEGATION_SETS_BY_OWNER: The maximum number of reusable - // delegation sets that you can create using the current account. - // - // * MAX_TRAFFIC_POLICIES_BY_OWNER: The maximum number of traffic policies - // that you can create using the current account. - // - // * MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER: The maximum number of traffic - // policy instances that you can create using the current account. (Traffic - // policy instances are referred to as traffic flow policy records in the - // Amazon Route 53 console.) - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"AccountLimitType"` - - // The current value for the limit that is specified by AccountLimit$Type. - // - // Value is a required field - Value *int64 `min:"1" type:"long" required:"true"` -} - -// String returns the string representation -func (s AccountLimit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountLimit) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *AccountLimit) SetType(v string) *AccountLimit { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *AccountLimit) SetValue(v int64) *AccountLimit { - s.Value = &v - return s -} - -// A complex type that identifies the CloudWatch alarm that you want Amazon -// Route 53 health checkers to use to determine whether the specified health -// check is healthy. -type AlarmIdentifier struct { - _ struct{} `type:"structure"` - - // The name of the CloudWatch alarm that you want Amazon Route 53 health checkers - // to use to determine whether this health check is healthy. - // - // Route 53 supports CloudWatch alarms with the following features: - // - // Standard-resolution metrics. High-resolution metrics aren't supported. For - // more information, see High-Resolution Metrics (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/publishingMetrics.html#high-resolution-metrics) - // in the Amazon CloudWatch User Guide. - // - // Statistics: Average, Minimum, Maximum, Sum, and SampleCount. Extended statistics - // aren't supported. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // For the CloudWatch alarm that you want Route 53 health checkers to use to - // determine whether this health check is healthy, the region that the alarm - // was created in. - // - // For the current list of CloudWatch regions, see Amazon CloudWatch (http://docs.aws.amazon.com/general/latest/gr/rande.html#cw_region) - // in the AWS Regions and Endpoints chapter of the Amazon Web Services General - // Reference. - // - // Region is a required field - Region *string `min:"1" type:"string" required:"true" enum:"CloudWatchRegion"` -} - -// String returns the string representation -func (s AlarmIdentifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AlarmIdentifier) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AlarmIdentifier) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AlarmIdentifier"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Region == nil { - invalidParams.Add(request.NewErrParamRequired("Region")) - } - if s.Region != nil && len(*s.Region) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Region", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *AlarmIdentifier) SetName(v string) *AlarmIdentifier { - s.Name = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *AlarmIdentifier) SetRegion(v string) *AlarmIdentifier { - s.Region = &v - return s -} - -// Alias resource record sets only: Information about the CloudFront distribution, -// Elastic Beanstalk environment, ELB load balancer, Amazon S3 bucket, or Amazon -// Route 53 resource record set that you're redirecting queries to. An Elastic -// Beanstalk environment must have a regionalized subdomain. -// -// When creating resource record sets for a private hosted zone, note the following: -// -// * Resource record sets can't be created for CloudFront distributions in -// a private hosted zone. -// -// * Creating geolocation alias resource record sets or latency alias resource -// record sets in a private hosted zone is unsupported. -// -// * For information about creating failover resource record sets in a private -// hosted zone, see Configuring Failover in a Private Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html). -type AliasTarget struct { - _ struct{} `type:"structure"` - - // Alias resource record sets only: The value that you specify depends on where - // you want to route queries: - // - // CloudFront distributionSpecify the domain name that CloudFront assigned when - // you created your distribution. - // - // Your CloudFront distribution must include an alternate domain name that matches - // the name of the resource record set. For example, if the name of the resource - // record set is acme.example.com, your CloudFront distribution must include - // acme.example.com as one of the alternate domain names. For more information, - // see Using Alternate Domain Names (CNAMEs) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html) - // in the Amazon CloudFront Developer Guide. - // - // For failover alias records, you can't specify a CloudFront distribution for - // both the primary and secondary records. A distribution must include an alternate - // domain name that matches the name of the record. However, the primary and - // secondary records have the same name, and you can't include the same alternate - // domain name in more than one distribution. - // - // Elastic Beanstalk environmentIf the domain name for your Elastic Beanstalk - // environment includes the region that you deployed the environment in, you - // can create an alias record that routes traffic to the environment. For example, - // the domain name my-environment.us-west-2.elasticbeanstalk.com is a regionalized - // domain name. - // - // For environments that were created before early 2016, the domain name doesn't - // include the region. To route traffic to these environments, you must create - // a CNAME record instead of an alias record. Note that you can't create a CNAME - // record for the root domain name. For example, if your domain name is example.com, - // you can create a record that routes traffic for acme.example.com to your - // Elastic Beanstalk environment, but you can't create a record that routes - // traffic for example.com to your Elastic Beanstalk environment. - // - // For Elastic Beanstalk environments that have regionalized subdomains, specify - // the CNAME attribute for the environment. You can use the following methods - // to get the value of the CNAME attribute: - // - // AWS Management Console: For information about how to get the value by using - // the console, see Using Custom Domains with AWS Elastic Beanstalk (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customdomains.html) - // in the AWS Elastic Beanstalk Developer Guide. - // - // Elastic Beanstalk API: Use the DescribeEnvironments action to get the value - // of the CNAME attribute. For more information, see DescribeEnvironments (http://docs.aws.amazon.com/elasticbeanstalk/latest/api/API_DescribeEnvironments.html) - // in the AWS Elastic Beanstalk API Reference. - // - // AWS CLI: Use the describe-environments command to get the value of the CNAME - // attribute. For more information, see describe-environments (http://docs.aws.amazon.com/cli/latest/reference/elasticbeanstalk/describe-environments.html) - // in the AWS Command Line Interface Reference. - // - // ELB load balancerSpecify the DNS name that is associated with the load balancer. - // Get the DNS name by using the AWS Management Console, the ELB API, or the - // AWS CLI. - // - // AWS Management Console: Go to the EC2 page, choose Load Balancers in the - // navigation pane, choose the load balancer, choose the Description tab, and - // get the value of the DNS name field. - // - // If you're routing traffic to a Classic Load Balancer, get the value that - // begins with dualstack. If you're routing traffic to another type of load - // balancer, get the value that applies to the record type, A or AAAA. - // - // Elastic Load Balancing API: Use DescribeLoadBalancers to get the value of - // DNSName. For more information, see the applicable guide: - // - // Classic Load Balancers: DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html) - // - // Application and Network Load Balancers: DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) - // - // AWS CLI: Use describe-load-balancers to get the value of DNSName. For more - // information, see the applicable guide: - // - // Classic Load Balancers: describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elb/describe-load-balancers.html) - // - // Application and Network Load Balancers: describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elbv2/describe-load-balancers.html) - // - // Amazon S3 bucket that is configured as a static websiteSpecify the domain - // name of the Amazon S3 website endpoint that you created the bucket in, for - // example, s3-website.us-east-2.amazonaws.com. For more information about valid - // values, see the table Amazon Simple Storage Service (S3) Website Endpoints - // (http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the - // Amazon Web Services General Reference. For more information about using S3 - // buckets for websites, see Getting Started with Amazon Route 53 (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/getting-started.html) - // in the Amazon Route 53 Developer Guide. - // - // Another Route 53 resource record setSpecify the value of the Name element - // for a resource record set in the current hosted zone. - // - // If you're creating an alias record that has the same name as the hosted zone - // (known as the zone apex), you can't specify the domain name for a record - // for which the value of Type is CNAME. This is because the alias record must - // have the same type as the record that you're routing traffic to, and creating - // a CNAME record for the zone apex isn't supported even for an alias record. - // - // DNSName is a required field - DNSName *string `type:"string" required:"true"` - - // Applies only to alias, failover alias, geolocation alias, latency alias, - // and weighted alias resource record sets: When EvaluateTargetHealth is true, - // an alias resource record set inherits the health of the referenced AWS resource, - // such as an ELB load balancer or another resource record set in the hosted - // zone. - // - // Note the following: - // - // CloudFront distributionsYou can't set EvaluateTargetHealth to true when the - // alias target is a CloudFront distribution. - // - // Elastic Beanstalk environments that have regionalized subdomainsIf you specify - // an Elastic Beanstalk environment in DNSName and the environment contains - // an ELB load balancer, Elastic Load Balancing routes queries only to the healthy - // Amazon EC2 instances that are registered with the load balancer. (An environment - // automatically contains an ELB load balancer if it includes more than one - // Amazon EC2 instance.) If you set EvaluateTargetHealth to true and either - // no Amazon EC2 instances are healthy or the load balancer itself is unhealthy, - // Route 53 routes queries to other available resources that are healthy, if - // any. - // - // If the environment contains a single Amazon EC2 instance, there are no special - // requirements. - // - // ELB load balancersHealth checking behavior depends on the type of load balancer: - // - // Classic Load Balancers: If you specify an ELB Classic Load Balancer in DNSName, - // Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances - // that are registered with the load balancer. If you set EvaluateTargetHealth - // to true and either no EC2 instances are healthy or the load balancer itself - // is unhealthy, Route 53 routes queries to other resources. - // - // Application and Network Load Balancers: If you specify an ELB Application - // or Network Load Balancer and you set EvaluateTargetHealth to true, Route - // 53 routes queries to the load balancer based on the health of the target - // groups that are associated with the load balancer: - // - // For an Application or Network Load Balancer to be considered healthy, every - // target group that contains targets must contain at least one healthy target. - // If any target group contains only unhealthy targets, the load balancer is - // considered unhealthy, and Route 53 routes queries to other resources. - // - // A target group that has no registered targets is considered healthy. - // - // When you create a load balancer, you configure settings for Elastic Load - // Balancing health checks; they're not Route 53 health checks, but they perform - // a similar function. Do not create Route 53 health checks for the EC2 instances - // that you register with an ELB load balancer. - // - // S3 bucketsThere are no special requirements for setting EvaluateTargetHealth - // to true when the alias target is an S3 bucket. - // - // Other records in the same hosted zoneIf the AWS resource that you specify - // in DNSName is a record or a group of records (for example, a group of weighted - // records) but is not another alias record, we recommend that you associate - // a health check with all of the records in the alias target. For more information, - // see What Happens When You Omit Health Checks? (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-complex-configs.html#dns-failover-complex-configs-hc-omitting) - // in the Amazon Route 53 Developer Guide. - // - // For more information and examples, see Amazon Route 53 Health Checks and - // DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) - // in the Amazon Route 53 Developer Guide. - // - // EvaluateTargetHealth is a required field - EvaluateTargetHealth *bool `type:"boolean" required:"true"` - - // Alias resource records sets only: The value used depends on where you want - // to route traffic: - // - // CloudFront distributionSpecify Z2FDTNDATAQYW2. - // - // Alias resource record sets for CloudFront can't be created in a private zone. - // - // Elastic Beanstalk environmentSpecify the hosted zone ID for the region that - // you created the environment in. The environment must have a regionalized - // subdomain. For a list of regions and the corresponding hosted zone IDs, see - // AWS Elastic Beanstalk (http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region) - // in the "AWS Regions and Endpoints" chapter of the Amazon Web Services General - // Reference. - // - // ELB load balancerSpecify the value of the hosted zone ID for the load balancer. - // Use the following methods to get the hosted zone ID: - // - // Elastic Load Balancing (http://docs.aws.amazon.com/general/latest/gr/rande.html#elb_region) - // table in the "AWS Regions and Endpoints" chapter of the Amazon Web Services - // General Reference: Use the value that corresponds with the region that you - // created your load balancer in. Note that there are separate columns for Application - // and Classic Load Balancers and for Network Load Balancers. - // - // AWS Management Console: Go to the Amazon EC2 page, choose Load Balancers - // in the navigation pane, select the load balancer, and get the value of the - // Hosted zone field on the Description tab. - // - // Elastic Load Balancing API: Use DescribeLoadBalancers to get the applicable - // value. For more information, see the applicable guide: - // - // Classic Load Balancers: Use DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html) - // to get the value of CanonicalHostedZoneNameId. - // - // Application and Network Load Balancers: Use DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) - // to get the value of CanonicalHostedZoneId. - // - // AWS CLI: Use describe-load-balancers to get the applicable value. For more - // information, see the applicable guide: - // - // Classic Load Balancers: Use describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elb/describe-load-balancers.html) - // to get the value of CanonicalHostedZoneNameId. - // - // Application and Network Load Balancers: Use describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elbv2/describe-load-balancers.html) - // to get the value of CanonicalHostedZoneId. - // - // An Amazon S3 bucket configured as a static websiteSpecify the hosted zone - // ID for the region that you created the bucket in. For more information about - // valid values, see the Amazon Simple Storage Service Website Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) - // table in the "AWS Regions and Endpoints" chapter of the Amazon Web Services - // General Reference. - // - // Another Route 53 resource record set in your hosted zoneSpecify the hosted - // zone ID of your hosted zone. (An alias resource record set can't reference - // a resource record set in a different hosted zone.) - // - // HostedZoneId is a required field - HostedZoneId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AliasTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AliasTarget) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AliasTarget) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AliasTarget"} - if s.DNSName == nil { - invalidParams.Add(request.NewErrParamRequired("DNSName")) - } - if s.EvaluateTargetHealth == nil { - invalidParams.Add(request.NewErrParamRequired("EvaluateTargetHealth")) - } - if s.HostedZoneId == nil { - invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDNSName sets the DNSName field's value. -func (s *AliasTarget) SetDNSName(v string) *AliasTarget { - s.DNSName = &v - return s -} - -// SetEvaluateTargetHealth sets the EvaluateTargetHealth field's value. -func (s *AliasTarget) SetEvaluateTargetHealth(v bool) *AliasTarget { - s.EvaluateTargetHealth = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *AliasTarget) SetHostedZoneId(v string) *AliasTarget { - s.HostedZoneId = &v - return s -} - -// A complex type that contains information about the request to associate a -// VPC with a private hosted zone. -type AssociateVPCWithHostedZoneInput struct { - _ struct{} `locationName:"AssociateVPCWithHostedZoneRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // Optional: A comment about the association request. - Comment *string `type:"string"` - - // The ID of the private hosted zone that you want to associate an Amazon VPC - // with. - // - // Note that you can't associate a VPC with a hosted zone that doesn't have - // an existing VPC association. - // - // HostedZoneId is a required field - HostedZoneId *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // A complex type that contains information about the VPC that you want to associate - // with a private hosted zone. - // - // VPC is a required field - VPC *VPC `type:"structure" required:"true"` -} - -// String returns the string representation -func (s AssociateVPCWithHostedZoneInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateVPCWithHostedZoneInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateVPCWithHostedZoneInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateVPCWithHostedZoneInput"} - if s.HostedZoneId == nil { - invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) - } - if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) - } - if s.VPC == nil { - invalidParams.Add(request.NewErrParamRequired("VPC")) - } - if s.VPC != nil { - if err := s.VPC.Validate(); err != nil { - invalidParams.AddNested("VPC", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *AssociateVPCWithHostedZoneInput) SetComment(v string) *AssociateVPCWithHostedZoneInput { - s.Comment = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *AssociateVPCWithHostedZoneInput) SetHostedZoneId(v string) *AssociateVPCWithHostedZoneInput { - s.HostedZoneId = &v - return s -} - -// SetVPC sets the VPC field's value. -func (s *AssociateVPCWithHostedZoneInput) SetVPC(v *VPC) *AssociateVPCWithHostedZoneInput { - s.VPC = v - return s -} - -// A complex type that contains the response information for the AssociateVPCWithHostedZone -// request. -type AssociateVPCWithHostedZoneOutput struct { - _ struct{} `type:"structure"` - - // A complex type that describes the changes made to your hosted zone. - // - // ChangeInfo is a required field - ChangeInfo *ChangeInfo `type:"structure" required:"true"` -} - -// String returns the string representation -func (s AssociateVPCWithHostedZoneOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateVPCWithHostedZoneOutput) GoString() string { - return s.String() -} - -// SetChangeInfo sets the ChangeInfo field's value. -func (s *AssociateVPCWithHostedZoneOutput) SetChangeInfo(v *ChangeInfo) *AssociateVPCWithHostedZoneOutput { - s.ChangeInfo = v - return s -} - -// The information for each resource record set that you want to change. -type Change struct { - _ struct{} `type:"structure"` - - // The action to perform: - // - // * CREATE: Creates a resource record set that has the specified values. - // - // * DELETE: Deletes a existing resource record set. - // - // To delete the resource record set that is associated with a traffic policy - // instance, use DeleteTrafficPolicyInstance. Amazon Route 53 will delete - // the resource record set automatically. If you delete the resource record - // set by using ChangeResourceRecordSets, Route 53 doesn't automatically - // delete the traffic policy instance, and you'll continue to be charged - // for it even though it's no longer in use. - // - // * UPSERT: If a resource record set doesn't already exist, Route 53 creates - // it. If a resource record set does exist, Route 53 updates it with the - // values in the request. - // - // Action is a required field - Action *string `type:"string" required:"true" enum:"ChangeAction"` - - // Information about the resource record set to create, delete, or update. - // - // ResourceRecordSet is a required field - ResourceRecordSet *ResourceRecordSet `type:"structure" required:"true"` -} - -// String returns the string representation -func (s Change) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Change) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Change) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Change"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.ResourceRecordSet == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceRecordSet")) - } - if s.ResourceRecordSet != nil { - if err := s.ResourceRecordSet.Validate(); err != nil { - invalidParams.AddNested("ResourceRecordSet", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *Change) SetAction(v string) *Change { - s.Action = &v - return s -} - -// SetResourceRecordSet sets the ResourceRecordSet field's value. -func (s *Change) SetResourceRecordSet(v *ResourceRecordSet) *Change { - s.ResourceRecordSet = v - return s -} - -// The information for a change request. -type ChangeBatch struct { - _ struct{} `type:"structure"` - - // Information about the changes to make to the record sets. - // - // Changes is a required field - Changes []*Change `locationNameList:"Change" min:"1" type:"list" required:"true"` - - // Optional: Any comments you want to include about a change batch request. - Comment *string `type:"string"` -} - -// String returns the string representation -func (s ChangeBatch) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangeBatch) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ChangeBatch) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ChangeBatch"} - if s.Changes == nil { - invalidParams.Add(request.NewErrParamRequired("Changes")) - } - if s.Changes != nil && len(s.Changes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Changes", 1)) - } - if s.Changes != nil { - for i, v := range s.Changes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Changes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChanges sets the Changes field's value. -func (s *ChangeBatch) SetChanges(v []*Change) *ChangeBatch { - s.Changes = v - return s -} - -// SetComment sets the Comment field's value. -func (s *ChangeBatch) SetComment(v string) *ChangeBatch { - s.Comment = &v - return s -} - -// A complex type that describes change information about changes made to your -// hosted zone. -type ChangeInfo struct { - _ struct{} `type:"structure"` - - // A complex type that describes change information about changes made to your - // hosted zone. - // - // This element contains an ID that you use when performing a GetChange action - // to get detailed information about the change. - Comment *string `type:"string"` - - // The ID of the request. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The current state of the request. PENDING indicates that this request has - // not yet been applied to all Amazon Route 53 DNS servers. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"ChangeStatus"` - - // The date and time that the change request was submitted in ISO 8601 format - // (https://en.wikipedia.org/wiki/ISO_8601) and Coordinated Universal Time (UTC). - // For example, the value 2017-03-27T17:48:16.751Z represents March 27, 2017 - // at 17:48:16.751 UTC. - // - // SubmittedAt is a required field - SubmittedAt *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s ChangeInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangeInfo) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *ChangeInfo) SetComment(v string) *ChangeInfo { - s.Comment = &v - return s -} - -// SetId sets the Id field's value. -func (s *ChangeInfo) SetId(v string) *ChangeInfo { - s.Id = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ChangeInfo) SetStatus(v string) *ChangeInfo { - s.Status = &v - return s -} - -// SetSubmittedAt sets the SubmittedAt field's value. -func (s *ChangeInfo) SetSubmittedAt(v time.Time) *ChangeInfo { - s.SubmittedAt = &v - return s -} - -// A complex type that contains change information for the resource record set. -type ChangeResourceRecordSetsInput struct { - _ struct{} `locationName:"ChangeResourceRecordSetsRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // A complex type that contains an optional comment and the Changes element. - // - // ChangeBatch is a required field - ChangeBatch *ChangeBatch `type:"structure" required:"true"` - - // The ID of the hosted zone that contains the resource record sets that you - // want to change. - // - // HostedZoneId is a required field - HostedZoneId *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s ChangeResourceRecordSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangeResourceRecordSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ChangeResourceRecordSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ChangeResourceRecordSetsInput"} - if s.ChangeBatch == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeBatch")) - } - if s.HostedZoneId == nil { - invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) - } - if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) - } - if s.ChangeBatch != nil { - if err := s.ChangeBatch.Validate(); err != nil { - invalidParams.AddNested("ChangeBatch", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeBatch sets the ChangeBatch field's value. -func (s *ChangeResourceRecordSetsInput) SetChangeBatch(v *ChangeBatch) *ChangeResourceRecordSetsInput { - s.ChangeBatch = v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *ChangeResourceRecordSetsInput) SetHostedZoneId(v string) *ChangeResourceRecordSetsInput { - s.HostedZoneId = &v - return s -} - -// A complex type containing the response for the request. -type ChangeResourceRecordSetsOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about changes made to your hosted - // zone. - // - // This element contains an ID that you use when performing a GetChange action - // to get detailed information about the change. - // - // ChangeInfo is a required field - ChangeInfo *ChangeInfo `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ChangeResourceRecordSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangeResourceRecordSetsOutput) GoString() string { - return s.String() -} - -// SetChangeInfo sets the ChangeInfo field's value. -func (s *ChangeResourceRecordSetsOutput) SetChangeInfo(v *ChangeInfo) *ChangeResourceRecordSetsOutput { - s.ChangeInfo = v - return s -} - -// A complex type that contains information about the tags that you want to -// add, edit, or delete. -type ChangeTagsForResourceInput struct { - _ struct{} `locationName:"ChangeTagsForResourceRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // A complex type that contains a list of the tags that you want to add to the - // specified health check or hosted zone and/or the tags that you want to edit - // Value for. - // - // You can add a maximum of 10 tags to a health check or a hosted zone. - AddTags []*Tag `locationNameList:"Tag" min:"1" type:"list"` - - // A complex type that contains a list of the tags that you want to delete from - // the specified health check or hosted zone. You can specify up to 10 keys. - RemoveTagKeys []*string `locationNameList:"Key" min:"1" type:"list"` - - // The ID of the resource for which you want to add, change, or delete tags. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"ResourceId" type:"string" required:"true"` - - // The type of the resource. - // - // * The resource type for health checks is healthcheck. - // - // * The resource type for hosted zones is hostedzone. - // - // ResourceType is a required field - ResourceType *string `location:"uri" locationName:"ResourceType" type:"string" required:"true" enum:"TagResourceType"` -} - -// String returns the string representation -func (s ChangeTagsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangeTagsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ChangeTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ChangeTagsForResourceInput"} - if s.AddTags != nil && len(s.AddTags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AddTags", 1)) - } - if s.RemoveTagKeys != nil && len(s.RemoveTagKeys) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RemoveTagKeys", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - if s.ResourceType != nil && len(*s.ResourceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddTags sets the AddTags field's value. -func (s *ChangeTagsForResourceInput) SetAddTags(v []*Tag) *ChangeTagsForResourceInput { - s.AddTags = v - return s -} - -// SetRemoveTagKeys sets the RemoveTagKeys field's value. -func (s *ChangeTagsForResourceInput) SetRemoveTagKeys(v []*string) *ChangeTagsForResourceInput { - s.RemoveTagKeys = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ChangeTagsForResourceInput) SetResourceId(v string) *ChangeTagsForResourceInput { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ChangeTagsForResourceInput) SetResourceType(v string) *ChangeTagsForResourceInput { - s.ResourceType = &v - return s -} - -// Empty response for the request. -type ChangeTagsForResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ChangeTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangeTagsForResourceOutput) GoString() string { - return s.String() -} - -// A complex type that contains information about the CloudWatch alarm that -// Amazon Route 53 is monitoring for this health check. -type CloudWatchAlarmConfiguration struct { - _ struct{} `type:"structure"` - - // For the metric that the CloudWatch alarm is associated with, the arithmetic - // operation that is used for the comparison. - // - // ComparisonOperator is a required field - ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"` - - // For the metric that the CloudWatch alarm is associated with, a complex type - // that contains information about the dimensions for the metric. For information, - // see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html) - // in the Amazon CloudWatch User Guide. - Dimensions []*Dimension `locationNameList:"Dimension" type:"list"` - - // For the metric that the CloudWatch alarm is associated with, the number of - // periods that the metric is compared to the threshold. - // - // EvaluationPeriods is a required field - EvaluationPeriods *int64 `min:"1" type:"integer" required:"true"` - - // The name of the CloudWatch metric that the alarm is associated with. - // - // MetricName is a required field - MetricName *string `min:"1" type:"string" required:"true"` - - // The namespace of the metric that the alarm is associated with. For more information, - // see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html) - // in the Amazon CloudWatch User Guide. - // - // Namespace is a required field - Namespace *string `min:"1" type:"string" required:"true"` - - // For the metric that the CloudWatch alarm is associated with, the duration - // of one evaluation period in seconds. - // - // Period is a required field - Period *int64 `min:"60" type:"integer" required:"true"` - - // For the metric that the CloudWatch alarm is associated with, the statistic - // that is applied to the metric. - // - // Statistic is a required field - Statistic *string `type:"string" required:"true" enum:"Statistic"` - - // For the metric that the CloudWatch alarm is associated with, the value the - // metric is compared with. - // - // Threshold is a required field - Threshold *float64 `type:"double" required:"true"` -} - -// String returns the string representation -func (s CloudWatchAlarmConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudWatchAlarmConfiguration) GoString() string { - return s.String() -} - -// SetComparisonOperator sets the ComparisonOperator field's value. -func (s *CloudWatchAlarmConfiguration) SetComparisonOperator(v string) *CloudWatchAlarmConfiguration { - s.ComparisonOperator = &v - return s -} - -// SetDimensions sets the Dimensions field's value. -func (s *CloudWatchAlarmConfiguration) SetDimensions(v []*Dimension) *CloudWatchAlarmConfiguration { - s.Dimensions = v - return s -} - -// SetEvaluationPeriods sets the EvaluationPeriods field's value. -func (s *CloudWatchAlarmConfiguration) SetEvaluationPeriods(v int64) *CloudWatchAlarmConfiguration { - s.EvaluationPeriods = &v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *CloudWatchAlarmConfiguration) SetMetricName(v string) *CloudWatchAlarmConfiguration { - s.MetricName = &v - return s -} - -// SetNamespace sets the Namespace field's value. -func (s *CloudWatchAlarmConfiguration) SetNamespace(v string) *CloudWatchAlarmConfiguration { - s.Namespace = &v - return s -} - -// SetPeriod sets the Period field's value. -func (s *CloudWatchAlarmConfiguration) SetPeriod(v int64) *CloudWatchAlarmConfiguration { - s.Period = &v - return s -} - -// SetStatistic sets the Statistic field's value. -func (s *CloudWatchAlarmConfiguration) SetStatistic(v string) *CloudWatchAlarmConfiguration { - s.Statistic = &v - return s -} - -// SetThreshold sets the Threshold field's value. -func (s *CloudWatchAlarmConfiguration) SetThreshold(v float64) *CloudWatchAlarmConfiguration { - s.Threshold = &v - return s -} - -// A complex type that contains the health check request information. -type CreateHealthCheckInput struct { - _ struct{} `locationName:"CreateHealthCheckRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // A unique string that identifies the request and that allows you to retry - // a failed CreateHealthCheck request without the risk of creating two identical - // health checks: - // - // * If you send a CreateHealthCheck request with the same CallerReference - // and settings as a previous request, and if the health check doesn't exist, - // Amazon Route 53 creates the health check. If the health check does exist, - // Route 53 returns the settings for the existing health check. - // - // * If you send a CreateHealthCheck request with the same CallerReference - // as a deleted health check, regardless of the settings, Route 53 returns - // a HealthCheckAlreadyExists error. - // - // * If you send a CreateHealthCheck request with the same CallerReference - // as an existing health check but with different settings, Route 53 returns - // a HealthCheckAlreadyExists error. - // - // * If you send a CreateHealthCheck request with a unique CallerReference - // but settings identical to an existing health check, Route 53 creates the - // health check. - // - // CallerReference is a required field - CallerReference *string `min:"1" type:"string" required:"true"` - - // A complex type that contains settings for a new health check. - // - // HealthCheckConfig is a required field - HealthCheckConfig *HealthCheckConfig `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateHealthCheckInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateHealthCheckInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateHealthCheckInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateHealthCheckInput"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.CallerReference != nil && len(*s.CallerReference) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CallerReference", 1)) - } - if s.HealthCheckConfig == nil { - invalidParams.Add(request.NewErrParamRequired("HealthCheckConfig")) - } - if s.HealthCheckConfig != nil { - if err := s.HealthCheckConfig.Validate(); err != nil { - invalidParams.AddNested("HealthCheckConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCallerReference sets the CallerReference field's value. -func (s *CreateHealthCheckInput) SetCallerReference(v string) *CreateHealthCheckInput { - s.CallerReference = &v - return s -} - -// SetHealthCheckConfig sets the HealthCheckConfig field's value. -func (s *CreateHealthCheckInput) SetHealthCheckConfig(v *HealthCheckConfig) *CreateHealthCheckInput { - s.HealthCheckConfig = v - return s -} - -// A complex type containing the response information for the new health check. -type CreateHealthCheckOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains identifying information about the health check. - // - // HealthCheck is a required field - HealthCheck *HealthCheck `type:"structure" required:"true"` - - // The unique URL representing the new health check. - // - // Location is a required field - Location *string `location:"header" locationName:"Location" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateHealthCheckOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateHealthCheckOutput) GoString() string { - return s.String() -} - -// SetHealthCheck sets the HealthCheck field's value. -func (s *CreateHealthCheckOutput) SetHealthCheck(v *HealthCheck) *CreateHealthCheckOutput { - s.HealthCheck = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateHealthCheckOutput) SetLocation(v string) *CreateHealthCheckOutput { - s.Location = &v - return s -} - -// A complex type that contains information about the request to create a public -// or private hosted zone. -type CreateHostedZoneInput struct { - _ struct{} `locationName:"CreateHostedZoneRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // A unique string that identifies the request and that allows failed CreateHostedZone - // requests to be retried without the risk of executing the operation twice. - // You must use a unique CallerReference string every time you submit a CreateHostedZone - // request. CallerReference can be any unique string, for example, a date/time - // stamp. - // - // CallerReference is a required field - CallerReference *string `min:"1" type:"string" required:"true"` - - // If you want to associate a reusable delegation set with this hosted zone, - // the ID that Amazon Route 53 assigned to the reusable delegation set when - // you created it. For more information about reusable delegation sets, see - // CreateReusableDelegationSet. - DelegationSetId *string `type:"string"` - - // (Optional) A complex type that contains the following optional values: - // - // * For public and private hosted zones, an optional comment - // - // * For private hosted zones, an optional PrivateZone element - // - // If you don't specify a comment or the PrivateZone element, omit HostedZoneConfig - // and the other elements. - HostedZoneConfig *HostedZoneConfig `type:"structure"` - - // The name of the domain. Specify a fully qualified domain name, for example, - // www.example.com. The trailing dot is optional; Amazon Route 53 assumes that - // the domain name is fully qualified. This means that Route 53 treats www.example.com - // (without a trailing dot) and www.example.com. (with a trailing dot) as identical. - // - // If you're creating a public hosted zone, this is the name you have registered - // with your DNS registrar. If your domain name is registered with a registrar - // other than Route 53, change the name servers for your domain to the set of - // NameServers that CreateHostedZone returns in DelegationSet. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // (Private hosted zones only) A complex type that contains information about - // the Amazon VPC that you're associating with this hosted zone. - // - // You can specify only one Amazon VPC when you create a private hosted zone. - // To associate additional Amazon VPCs with the hosted zone, use AssociateVPCWithHostedZone - // after you create a hosted zone. - VPC *VPC `type:"structure"` -} - -// String returns the string representation -func (s CreateHostedZoneInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateHostedZoneInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateHostedZoneInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateHostedZoneInput"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.CallerReference != nil && len(*s.CallerReference) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CallerReference", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.VPC != nil { - if err := s.VPC.Validate(); err != nil { - invalidParams.AddNested("VPC", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCallerReference sets the CallerReference field's value. -func (s *CreateHostedZoneInput) SetCallerReference(v string) *CreateHostedZoneInput { - s.CallerReference = &v - return s -} - -// SetDelegationSetId sets the DelegationSetId field's value. -func (s *CreateHostedZoneInput) SetDelegationSetId(v string) *CreateHostedZoneInput { - s.DelegationSetId = &v - return s -} - -// SetHostedZoneConfig sets the HostedZoneConfig field's value. -func (s *CreateHostedZoneInput) SetHostedZoneConfig(v *HostedZoneConfig) *CreateHostedZoneInput { - s.HostedZoneConfig = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateHostedZoneInput) SetName(v string) *CreateHostedZoneInput { - s.Name = &v - return s -} - -// SetVPC sets the VPC field's value. -func (s *CreateHostedZoneInput) SetVPC(v *VPC) *CreateHostedZoneInput { - s.VPC = v - return s -} - -// A complex type containing the response information for the hosted zone. -type CreateHostedZoneOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about the CreateHostedZone request. - // - // ChangeInfo is a required field - ChangeInfo *ChangeInfo `type:"structure" required:"true"` - - // A complex type that describes the name servers for this hosted zone. - // - // DelegationSet is a required field - DelegationSet *DelegationSet `type:"structure" required:"true"` - - // A complex type that contains general information about the hosted zone. - // - // HostedZone is a required field - HostedZone *HostedZone `type:"structure" required:"true"` - - // The unique URL representing the new hosted zone. - // - // Location is a required field - Location *string `location:"header" locationName:"Location" type:"string" required:"true"` - - // A complex type that contains information about an Amazon VPC that you associated - // with this hosted zone. - VPC *VPC `type:"structure"` -} - -// String returns the string representation -func (s CreateHostedZoneOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateHostedZoneOutput) GoString() string { - return s.String() -} - -// SetChangeInfo sets the ChangeInfo field's value. -func (s *CreateHostedZoneOutput) SetChangeInfo(v *ChangeInfo) *CreateHostedZoneOutput { - s.ChangeInfo = v - return s -} - -// SetDelegationSet sets the DelegationSet field's value. -func (s *CreateHostedZoneOutput) SetDelegationSet(v *DelegationSet) *CreateHostedZoneOutput { - s.DelegationSet = v - return s -} - -// SetHostedZone sets the HostedZone field's value. -func (s *CreateHostedZoneOutput) SetHostedZone(v *HostedZone) *CreateHostedZoneOutput { - s.HostedZone = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateHostedZoneOutput) SetLocation(v string) *CreateHostedZoneOutput { - s.Location = &v - return s -} - -// SetVPC sets the VPC field's value. -func (s *CreateHostedZoneOutput) SetVPC(v *VPC) *CreateHostedZoneOutput { - s.VPC = v - return s -} - -type CreateQueryLoggingConfigInput struct { - _ struct{} `locationName:"CreateQueryLoggingConfigRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // The Amazon Resource Name (ARN) for the log group that you want to Amazon - // Route 53 to send query logs to. This is the format of the ARN: - // - // arn:aws:logs:region:account-id:log-group:log_group_name - // - // To get the ARN for a log group, you can use the CloudWatch console, the DescribeLogGroups - // (http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogGroups.html) - // API action, the describe-log-groups (http://docs.aws.amazon.com/cli/latest/reference/logs/describe-log-groups.html) - // command, or the applicable command in one of the AWS SDKs. - // - // CloudWatchLogsLogGroupArn is a required field - CloudWatchLogsLogGroupArn *string `type:"string" required:"true"` - - // The ID of the hosted zone that you want to log queries for. You can log queries - // only for public hosted zones. - // - // HostedZoneId is a required field - HostedZoneId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateQueryLoggingConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateQueryLoggingConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateQueryLoggingConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateQueryLoggingConfigInput"} - if s.CloudWatchLogsLogGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("CloudWatchLogsLogGroupArn")) - } - if s.HostedZoneId == nil { - invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value. -func (s *CreateQueryLoggingConfigInput) SetCloudWatchLogsLogGroupArn(v string) *CreateQueryLoggingConfigInput { - s.CloudWatchLogsLogGroupArn = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *CreateQueryLoggingConfigInput) SetHostedZoneId(v string) *CreateQueryLoggingConfigInput { - s.HostedZoneId = &v - return s -} - -type CreateQueryLoggingConfigOutput struct { - _ struct{} `type:"structure"` - - // The unique URL representing the new query logging configuration. - // - // Location is a required field - Location *string `location:"header" locationName:"Location" type:"string" required:"true"` - - // A complex type that contains the ID for a query logging configuration, the - // ID of the hosted zone that you want to log queries for, and the ARN for the - // log group that you want Amazon Route 53 to send query logs to. - // - // QueryLoggingConfig is a required field - QueryLoggingConfig *QueryLoggingConfig `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateQueryLoggingConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateQueryLoggingConfigOutput) GoString() string { - return s.String() -} - -// SetLocation sets the Location field's value. -func (s *CreateQueryLoggingConfigOutput) SetLocation(v string) *CreateQueryLoggingConfigOutput { - s.Location = &v - return s -} - -// SetQueryLoggingConfig sets the QueryLoggingConfig field's value. -func (s *CreateQueryLoggingConfigOutput) SetQueryLoggingConfig(v *QueryLoggingConfig) *CreateQueryLoggingConfigOutput { - s.QueryLoggingConfig = v - return s -} - -type CreateReusableDelegationSetInput struct { - _ struct{} `locationName:"CreateReusableDelegationSetRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // A unique string that identifies the request, and that allows you to retry - // failed CreateReusableDelegationSet requests without the risk of executing - // the operation twice. You must use a unique CallerReference string every time - // you submit a CreateReusableDelegationSet request. CallerReference can be - // any unique string, for example a date/time stamp. - // - // CallerReference is a required field - CallerReference *string `min:"1" type:"string" required:"true"` - - // If you want to mark the delegation set for an existing hosted zone as reusable, - // the ID for that hosted zone. - HostedZoneId *string `type:"string"` -} - -// String returns the string representation -func (s CreateReusableDelegationSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReusableDelegationSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateReusableDelegationSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateReusableDelegationSetInput"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.CallerReference != nil && len(*s.CallerReference) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CallerReference", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCallerReference sets the CallerReference field's value. -func (s *CreateReusableDelegationSetInput) SetCallerReference(v string) *CreateReusableDelegationSetInput { - s.CallerReference = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *CreateReusableDelegationSetInput) SetHostedZoneId(v string) *CreateReusableDelegationSetInput { - s.HostedZoneId = &v - return s -} - -type CreateReusableDelegationSetOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains name server information. - // - // DelegationSet is a required field - DelegationSet *DelegationSet `type:"structure" required:"true"` - - // The unique URL representing the new reusable delegation set. - // - // Location is a required field - Location *string `location:"header" locationName:"Location" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateReusableDelegationSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReusableDelegationSetOutput) GoString() string { - return s.String() -} - -// SetDelegationSet sets the DelegationSet field's value. -func (s *CreateReusableDelegationSetOutput) SetDelegationSet(v *DelegationSet) *CreateReusableDelegationSetOutput { - s.DelegationSet = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateReusableDelegationSetOutput) SetLocation(v string) *CreateReusableDelegationSetOutput { - s.Location = &v - return s -} - -// A complex type that contains information about the traffic policy that you -// want to create. -type CreateTrafficPolicyInput struct { - _ struct{} `locationName:"CreateTrafficPolicyRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // (Optional) Any comments that you want to include about the traffic policy. - Comment *string `type:"string"` - - // The definition of this traffic policy in JSON format. For more information, - // see Traffic Policy Document Format (http://docs.aws.amazon.com/Route53/latest/APIReference/api-policies-traffic-policy-document-format.html). - // - // Document is a required field - Document *string `type:"string" required:"true"` - - // The name of the traffic policy. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateTrafficPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTrafficPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTrafficPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTrafficPolicyInput"} - if s.Document == nil { - invalidParams.Add(request.NewErrParamRequired("Document")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *CreateTrafficPolicyInput) SetComment(v string) *CreateTrafficPolicyInput { - s.Comment = &v - return s -} - -// SetDocument sets the Document field's value. -func (s *CreateTrafficPolicyInput) SetDocument(v string) *CreateTrafficPolicyInput { - s.Document = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateTrafficPolicyInput) SetName(v string) *CreateTrafficPolicyInput { - s.Name = &v - return s -} - -// A complex type that contains information about the resource record sets that -// you want to create based on a specified traffic policy. -type CreateTrafficPolicyInstanceInput struct { - _ struct{} `locationName:"CreateTrafficPolicyInstanceRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // The ID of the hosted zone that you want Amazon Route 53 to create resource - // record sets in by using the configuration in a traffic policy. - // - // HostedZoneId is a required field - HostedZoneId *string `type:"string" required:"true"` - - // The domain name (such as example.com) or subdomain name (such as www.example.com) - // for which Amazon Route 53 responds to DNS queries by using the resource record - // sets that Route 53 creates for this traffic policy instance. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // (Optional) The TTL that you want Amazon Route 53 to assign to all of the - // resource record sets that it creates in the specified hosted zone. - // - // TTL is a required field - TTL *int64 `type:"long" required:"true"` - - // The ID of the traffic policy that you want to use to create resource record - // sets in the specified hosted zone. - // - // TrafficPolicyId is a required field - TrafficPolicyId *string `min:"1" type:"string" required:"true"` - - // The version of the traffic policy that you want to use to create resource - // record sets in the specified hosted zone. - // - // TrafficPolicyVersion is a required field - TrafficPolicyVersion *int64 `min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s CreateTrafficPolicyInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTrafficPolicyInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTrafficPolicyInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTrafficPolicyInstanceInput"} - if s.HostedZoneId == nil { - invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.TTL == nil { - invalidParams.Add(request.NewErrParamRequired("TTL")) - } - if s.TrafficPolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("TrafficPolicyId")) - } - if s.TrafficPolicyId != nil && len(*s.TrafficPolicyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TrafficPolicyId", 1)) - } - if s.TrafficPolicyVersion == nil { - invalidParams.Add(request.NewErrParamRequired("TrafficPolicyVersion")) - } - if s.TrafficPolicyVersion != nil && *s.TrafficPolicyVersion < 1 { - invalidParams.Add(request.NewErrParamMinValue("TrafficPolicyVersion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *CreateTrafficPolicyInstanceInput) SetHostedZoneId(v string) *CreateTrafficPolicyInstanceInput { - s.HostedZoneId = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateTrafficPolicyInstanceInput) SetName(v string) *CreateTrafficPolicyInstanceInput { - s.Name = &v - return s -} - -// SetTTL sets the TTL field's value. -func (s *CreateTrafficPolicyInstanceInput) SetTTL(v int64) *CreateTrafficPolicyInstanceInput { - s.TTL = &v - return s -} - -// SetTrafficPolicyId sets the TrafficPolicyId field's value. -func (s *CreateTrafficPolicyInstanceInput) SetTrafficPolicyId(v string) *CreateTrafficPolicyInstanceInput { - s.TrafficPolicyId = &v - return s -} - -// SetTrafficPolicyVersion sets the TrafficPolicyVersion field's value. -func (s *CreateTrafficPolicyInstanceInput) SetTrafficPolicyVersion(v int64) *CreateTrafficPolicyInstanceInput { - s.TrafficPolicyVersion = &v - return s -} - -// A complex type that contains the response information for the CreateTrafficPolicyInstance -// request. -type CreateTrafficPolicyInstanceOutput struct { - _ struct{} `type:"structure"` - - // A unique URL that represents a new traffic policy instance. - // - // Location is a required field - Location *string `location:"header" locationName:"Location" type:"string" required:"true"` - - // A complex type that contains settings for the new traffic policy instance. - // - // TrafficPolicyInstance is a required field - TrafficPolicyInstance *TrafficPolicyInstance `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateTrafficPolicyInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTrafficPolicyInstanceOutput) GoString() string { - return s.String() -} - -// SetLocation sets the Location field's value. -func (s *CreateTrafficPolicyInstanceOutput) SetLocation(v string) *CreateTrafficPolicyInstanceOutput { - s.Location = &v - return s -} - -// SetTrafficPolicyInstance sets the TrafficPolicyInstance field's value. -func (s *CreateTrafficPolicyInstanceOutput) SetTrafficPolicyInstance(v *TrafficPolicyInstance) *CreateTrafficPolicyInstanceOutput { - s.TrafficPolicyInstance = v - return s -} - -// A complex type that contains the response information for the CreateTrafficPolicy -// request. -type CreateTrafficPolicyOutput struct { - _ struct{} `type:"structure"` - - // A unique URL that represents a new traffic policy. - // - // Location is a required field - Location *string `location:"header" locationName:"Location" type:"string" required:"true"` - - // A complex type that contains settings for the new traffic policy. - // - // TrafficPolicy is a required field - TrafficPolicy *TrafficPolicy `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateTrafficPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTrafficPolicyOutput) GoString() string { - return s.String() -} - -// SetLocation sets the Location field's value. -func (s *CreateTrafficPolicyOutput) SetLocation(v string) *CreateTrafficPolicyOutput { - s.Location = &v - return s -} - -// SetTrafficPolicy sets the TrafficPolicy field's value. -func (s *CreateTrafficPolicyOutput) SetTrafficPolicy(v *TrafficPolicy) *CreateTrafficPolicyOutput { - s.TrafficPolicy = v - return s -} - -// A complex type that contains information about the traffic policy that you -// want to create a new version for. -type CreateTrafficPolicyVersionInput struct { - _ struct{} `locationName:"CreateTrafficPolicyVersionRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // The comment that you specified in the CreateTrafficPolicyVersion request, - // if any. - Comment *string `type:"string"` - - // The definition of this version of the traffic policy, in JSON format. You - // specified the JSON in the CreateTrafficPolicyVersion request. For more information - // about the JSON format, see CreateTrafficPolicy. - // - // Document is a required field - Document *string `type:"string" required:"true"` - - // The ID of the traffic policy for which you want to create a new version. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateTrafficPolicyVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTrafficPolicyVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTrafficPolicyVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTrafficPolicyVersionInput"} - if s.Document == nil { - invalidParams.Add(request.NewErrParamRequired("Document")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *CreateTrafficPolicyVersionInput) SetComment(v string) *CreateTrafficPolicyVersionInput { - s.Comment = &v - return s -} - -// SetDocument sets the Document field's value. -func (s *CreateTrafficPolicyVersionInput) SetDocument(v string) *CreateTrafficPolicyVersionInput { - s.Document = &v - return s -} - -// SetId sets the Id field's value. -func (s *CreateTrafficPolicyVersionInput) SetId(v string) *CreateTrafficPolicyVersionInput { - s.Id = &v - return s -} - -// A complex type that contains the response information for the CreateTrafficPolicyVersion -// request. -type CreateTrafficPolicyVersionOutput struct { - _ struct{} `type:"structure"` - - // A unique URL that represents a new traffic policy version. - // - // Location is a required field - Location *string `location:"header" locationName:"Location" type:"string" required:"true"` - - // A complex type that contains settings for the new version of the traffic - // policy. - // - // TrafficPolicy is a required field - TrafficPolicy *TrafficPolicy `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateTrafficPolicyVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTrafficPolicyVersionOutput) GoString() string { - return s.String() -} - -// SetLocation sets the Location field's value. -func (s *CreateTrafficPolicyVersionOutput) SetLocation(v string) *CreateTrafficPolicyVersionOutput { - s.Location = &v - return s -} - -// SetTrafficPolicy sets the TrafficPolicy field's value. -func (s *CreateTrafficPolicyVersionOutput) SetTrafficPolicy(v *TrafficPolicy) *CreateTrafficPolicyVersionOutput { - s.TrafficPolicy = v - return s -} - -// A complex type that contains information about the request to authorize associating -// a VPC with your private hosted zone. Authorization is only required when -// a private hosted zone and a VPC were created by using different accounts. -type CreateVPCAssociationAuthorizationInput struct { - _ struct{} `locationName:"CreateVPCAssociationAuthorizationRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // The ID of the private hosted zone that you want to authorize associating - // a VPC with. - // - // HostedZoneId is a required field - HostedZoneId *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // A complex type that contains the VPC ID and region for the VPC that you want - // to authorize associating with your hosted zone. - // - // VPC is a required field - VPC *VPC `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateVPCAssociationAuthorizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVPCAssociationAuthorizationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVPCAssociationAuthorizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVPCAssociationAuthorizationInput"} - if s.HostedZoneId == nil { - invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) - } - if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) - } - if s.VPC == nil { - invalidParams.Add(request.NewErrParamRequired("VPC")) - } - if s.VPC != nil { - if err := s.VPC.Validate(); err != nil { - invalidParams.AddNested("VPC", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *CreateVPCAssociationAuthorizationInput) SetHostedZoneId(v string) *CreateVPCAssociationAuthorizationInput { - s.HostedZoneId = &v - return s -} - -// SetVPC sets the VPC field's value. -func (s *CreateVPCAssociationAuthorizationInput) SetVPC(v *VPC) *CreateVPCAssociationAuthorizationInput { - s.VPC = v - return s -} - -// A complex type that contains the response information from a CreateVPCAssociationAuthorization -// request. -type CreateVPCAssociationAuthorizationOutput struct { - _ struct{} `type:"structure"` - - // The ID of the hosted zone that you authorized associating a VPC with. - // - // HostedZoneId is a required field - HostedZoneId *string `type:"string" required:"true"` - - // The VPC that you authorized associating with a hosted zone. - // - // VPC is a required field - VPC *VPC `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateVPCAssociationAuthorizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVPCAssociationAuthorizationOutput) GoString() string { - return s.String() -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *CreateVPCAssociationAuthorizationOutput) SetHostedZoneId(v string) *CreateVPCAssociationAuthorizationOutput { - s.HostedZoneId = &v - return s -} - -// SetVPC sets the VPC field's value. -func (s *CreateVPCAssociationAuthorizationOutput) SetVPC(v *VPC) *CreateVPCAssociationAuthorizationOutput { - s.VPC = v - return s -} - -// A complex type that lists the name servers in a delegation set, as well as -// the CallerReference and the ID for the delegation set. -type DelegationSet struct { - _ struct{} `type:"structure"` - - // The value that you specified for CallerReference when you created the reusable - // delegation set. - CallerReference *string `min:"1" type:"string"` - - // The ID that Amazon Route 53 assigns to a reusable delegation set. - Id *string `type:"string"` - - // A complex type that contains a list of the authoritative name servers for - // a hosted zone or for a reusable delegation set. - // - // NameServers is a required field - NameServers []*string `locationNameList:"NameServer" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DelegationSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DelegationSet) GoString() string { - return s.String() -} - -// SetCallerReference sets the CallerReference field's value. -func (s *DelegationSet) SetCallerReference(v string) *DelegationSet { - s.CallerReference = &v - return s -} - -// SetId sets the Id field's value. -func (s *DelegationSet) SetId(v string) *DelegationSet { - s.Id = &v - return s -} - -// SetNameServers sets the NameServers field's value. -func (s *DelegationSet) SetNameServers(v []*string) *DelegationSet { - s.NameServers = v - return s -} - -// This action deletes a health check. -type DeleteHealthCheckInput struct { - _ struct{} `type:"structure"` - - // The ID of the health check that you want to delete. - // - // HealthCheckId is a required field - HealthCheckId *string `location:"uri" locationName:"HealthCheckId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteHealthCheckInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteHealthCheckInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteHealthCheckInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteHealthCheckInput"} - if s.HealthCheckId == nil { - invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) - } - if s.HealthCheckId != nil && len(*s.HealthCheckId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HealthCheckId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthCheckId sets the HealthCheckId field's value. -func (s *DeleteHealthCheckInput) SetHealthCheckId(v string) *DeleteHealthCheckInput { - s.HealthCheckId = &v - return s -} - -// An empty element. -type DeleteHealthCheckOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteHealthCheckOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteHealthCheckOutput) GoString() string { - return s.String() -} - -// A request to delete a hosted zone. -type DeleteHostedZoneInput struct { - _ struct{} `type:"structure"` - - // The ID of the hosted zone you want to delete. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteHostedZoneInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteHostedZoneInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteHostedZoneInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteHostedZoneInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteHostedZoneInput) SetId(v string) *DeleteHostedZoneInput { - s.Id = &v - return s -} - -// A complex type that contains the response to a DeleteHostedZone request. -type DeleteHostedZoneOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains the ID, the status, and the date and time of - // a request to delete a hosted zone. - // - // ChangeInfo is a required field - ChangeInfo *ChangeInfo `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteHostedZoneOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteHostedZoneOutput) GoString() string { - return s.String() -} - -// SetChangeInfo sets the ChangeInfo field's value. -func (s *DeleteHostedZoneOutput) SetChangeInfo(v *ChangeInfo) *DeleteHostedZoneOutput { - s.ChangeInfo = v - return s -} - -type DeleteQueryLoggingConfigInput struct { - _ struct{} `type:"structure"` - - // The ID of the configuration that you want to delete. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteQueryLoggingConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteQueryLoggingConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteQueryLoggingConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteQueryLoggingConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteQueryLoggingConfigInput) SetId(v string) *DeleteQueryLoggingConfigInput { - s.Id = &v - return s -} - -type DeleteQueryLoggingConfigOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteQueryLoggingConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteQueryLoggingConfigOutput) GoString() string { - return s.String() -} - -// A request to delete a reusable delegation set. -type DeleteReusableDelegationSetInput struct { - _ struct{} `type:"structure"` - - // The ID of the reusable delegation set that you want to delete. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteReusableDelegationSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReusableDelegationSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteReusableDelegationSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteReusableDelegationSetInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteReusableDelegationSetInput) SetId(v string) *DeleteReusableDelegationSetInput { - s.Id = &v - return s -} - -// An empty element. -type DeleteReusableDelegationSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteReusableDelegationSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReusableDelegationSetOutput) GoString() string { - return s.String() -} - -// A request to delete a specified traffic policy version. -type DeleteTrafficPolicyInput struct { - _ struct{} `type:"structure"` - - // The ID of the traffic policy that you want to delete. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" min:"1" type:"string" required:"true"` - - // The version number of the traffic policy that you want to delete. - // - // Version is a required field - Version *int64 `location:"uri" locationName:"Version" min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s DeleteTrafficPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTrafficPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTrafficPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTrafficPolicyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && *s.Version < 1 { - invalidParams.Add(request.NewErrParamMinValue("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteTrafficPolicyInput) SetId(v string) *DeleteTrafficPolicyInput { - s.Id = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *DeleteTrafficPolicyInput) SetVersion(v int64) *DeleteTrafficPolicyInput { - s.Version = &v - return s -} - -// A request to delete a specified traffic policy instance. -type DeleteTrafficPolicyInstanceInput struct { - _ struct{} `type:"structure"` - - // The ID of the traffic policy instance that you want to delete. - // - // When you delete a traffic policy instance, Amazon Route 53 also deletes all - // of the resource record sets that were created when you created the traffic - // policy instance. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTrafficPolicyInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTrafficPolicyInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTrafficPolicyInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTrafficPolicyInstanceInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteTrafficPolicyInstanceInput) SetId(v string) *DeleteTrafficPolicyInstanceInput { - s.Id = &v - return s -} - -// An empty element. -type DeleteTrafficPolicyInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTrafficPolicyInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTrafficPolicyInstanceOutput) GoString() string { - return s.String() -} - -// An empty element. -type DeleteTrafficPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTrafficPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTrafficPolicyOutput) GoString() string { - return s.String() -} - -// A complex type that contains information about the request to remove authorization -// to associate a VPC that was created by one AWS account with a hosted zone -// that was created with a different AWS account. -type DeleteVPCAssociationAuthorizationInput struct { - _ struct{} `locationName:"DeleteVPCAssociationAuthorizationRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // When removing authorization to associate a VPC that was created by one AWS - // account with a hosted zone that was created with a different AWS account, - // the ID of the hosted zone. - // - // HostedZoneId is a required field - HostedZoneId *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // When removing authorization to associate a VPC that was created by one AWS - // account with a hosted zone that was created with a different AWS account, - // a complex type that includes the ID and region of the VPC. - // - // VPC is a required field - VPC *VPC `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeleteVPCAssociationAuthorizationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVPCAssociationAuthorizationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVPCAssociationAuthorizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVPCAssociationAuthorizationInput"} - if s.HostedZoneId == nil { - invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) - } - if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) - } - if s.VPC == nil { - invalidParams.Add(request.NewErrParamRequired("VPC")) - } - if s.VPC != nil { - if err := s.VPC.Validate(); err != nil { - invalidParams.AddNested("VPC", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *DeleteVPCAssociationAuthorizationInput) SetHostedZoneId(v string) *DeleteVPCAssociationAuthorizationInput { - s.HostedZoneId = &v - return s -} - -// SetVPC sets the VPC field's value. -func (s *DeleteVPCAssociationAuthorizationInput) SetVPC(v *VPC) *DeleteVPCAssociationAuthorizationInput { - s.VPC = v - return s -} - -// Empty response for the request. -type DeleteVPCAssociationAuthorizationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteVPCAssociationAuthorizationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVPCAssociationAuthorizationOutput) GoString() string { - return s.String() -} - -// For the metric that the CloudWatch alarm is associated with, a complex type -// that contains information about one dimension. -type Dimension struct { - _ struct{} `type:"structure"` - - // For the metric that the CloudWatch alarm is associated with, the name of - // one dimension. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // For the metric that the CloudWatch alarm is associated with, the value of - // one dimension. - // - // Value is a required field - Value *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Dimension) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Dimension) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *Dimension) SetName(v string) *Dimension { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Dimension) SetValue(v string) *Dimension { - s.Value = &v - return s -} - -// A complex type that contains information about the VPC that you want to disassociate -// from a specified private hosted zone. -type DisassociateVPCFromHostedZoneInput struct { - _ struct{} `locationName:"DisassociateVPCFromHostedZoneRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // Optional: A comment about the disassociation request. - Comment *string `type:"string"` - - // The ID of the private hosted zone that you want to disassociate a VPC from. - // - // HostedZoneId is a required field - HostedZoneId *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // A complex type that contains information about the VPC that you're disassociating - // from the specified hosted zone. - // - // VPC is a required field - VPC *VPC `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DisassociateVPCFromHostedZoneInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateVPCFromHostedZoneInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateVPCFromHostedZoneInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateVPCFromHostedZoneInput"} - if s.HostedZoneId == nil { - invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) - } - if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) - } - if s.VPC == nil { - invalidParams.Add(request.NewErrParamRequired("VPC")) - } - if s.VPC != nil { - if err := s.VPC.Validate(); err != nil { - invalidParams.AddNested("VPC", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *DisassociateVPCFromHostedZoneInput) SetComment(v string) *DisassociateVPCFromHostedZoneInput { - s.Comment = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *DisassociateVPCFromHostedZoneInput) SetHostedZoneId(v string) *DisassociateVPCFromHostedZoneInput { - s.HostedZoneId = &v - return s -} - -// SetVPC sets the VPC field's value. -func (s *DisassociateVPCFromHostedZoneInput) SetVPC(v *VPC) *DisassociateVPCFromHostedZoneInput { - s.VPC = v - return s -} - -// A complex type that contains the response information for the disassociate -// request. -type DisassociateVPCFromHostedZoneOutput struct { - _ struct{} `type:"structure"` - - // A complex type that describes the changes made to the specified private hosted - // zone. - // - // ChangeInfo is a required field - ChangeInfo *ChangeInfo `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DisassociateVPCFromHostedZoneOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateVPCFromHostedZoneOutput) GoString() string { - return s.String() -} - -// SetChangeInfo sets the ChangeInfo field's value. -func (s *DisassociateVPCFromHostedZoneOutput) SetChangeInfo(v *ChangeInfo) *DisassociateVPCFromHostedZoneOutput { - s.ChangeInfo = v - return s -} - -// A complex type that contains information about a geographic location. -type GeoLocation struct { - _ struct{} `type:"structure"` - - // The two-letter code for the continent. - // - // Valid values: AF | AN | AS | EU | OC | NA | SA - // - // Constraint: Specifying ContinentCode with either CountryCode or SubdivisionCode - // returns an InvalidInput error. - ContinentCode *string `min:"2" type:"string"` - - // The two-letter code for the country. - CountryCode *string `min:"1" type:"string"` - - // The code for the subdivision. Route 53 currently supports only states in - // the United States. - SubdivisionCode *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GeoLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GeoLocation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GeoLocation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GeoLocation"} - if s.ContinentCode != nil && len(*s.ContinentCode) < 2 { - invalidParams.Add(request.NewErrParamMinLen("ContinentCode", 2)) - } - if s.CountryCode != nil && len(*s.CountryCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CountryCode", 1)) - } - if s.SubdivisionCode != nil && len(*s.SubdivisionCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SubdivisionCode", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContinentCode sets the ContinentCode field's value. -func (s *GeoLocation) SetContinentCode(v string) *GeoLocation { - s.ContinentCode = &v - return s -} - -// SetCountryCode sets the CountryCode field's value. -func (s *GeoLocation) SetCountryCode(v string) *GeoLocation { - s.CountryCode = &v - return s -} - -// SetSubdivisionCode sets the SubdivisionCode field's value. -func (s *GeoLocation) SetSubdivisionCode(v string) *GeoLocation { - s.SubdivisionCode = &v - return s -} - -// A complex type that contains the codes and full continent, country, and subdivision -// names for the specified geolocation code. -type GeoLocationDetails struct { - _ struct{} `type:"structure"` - - // The two-letter code for the continent. - ContinentCode *string `min:"2" type:"string"` - - // The full name of the continent. - ContinentName *string `min:"1" type:"string"` - - // The two-letter code for the country. - CountryCode *string `min:"1" type:"string"` - - // The name of the country. - CountryName *string `min:"1" type:"string"` - - // The code for the subdivision. Route 53 currently supports only states in - // the United States. - SubdivisionCode *string `min:"1" type:"string"` - - // The full name of the subdivision. Route 53 currently supports only states - // in the United States. - SubdivisionName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GeoLocationDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GeoLocationDetails) GoString() string { - return s.String() -} - -// SetContinentCode sets the ContinentCode field's value. -func (s *GeoLocationDetails) SetContinentCode(v string) *GeoLocationDetails { - s.ContinentCode = &v - return s -} - -// SetContinentName sets the ContinentName field's value. -func (s *GeoLocationDetails) SetContinentName(v string) *GeoLocationDetails { - s.ContinentName = &v - return s -} - -// SetCountryCode sets the CountryCode field's value. -func (s *GeoLocationDetails) SetCountryCode(v string) *GeoLocationDetails { - s.CountryCode = &v - return s -} - -// SetCountryName sets the CountryName field's value. -func (s *GeoLocationDetails) SetCountryName(v string) *GeoLocationDetails { - s.CountryName = &v - return s -} - -// SetSubdivisionCode sets the SubdivisionCode field's value. -func (s *GeoLocationDetails) SetSubdivisionCode(v string) *GeoLocationDetails { - s.SubdivisionCode = &v - return s -} - -// SetSubdivisionName sets the SubdivisionName field's value. -func (s *GeoLocationDetails) SetSubdivisionName(v string) *GeoLocationDetails { - s.SubdivisionName = &v - return s -} - -// A complex type that contains information about the request to create a hosted -// zone. -type GetAccountLimitInput struct { - _ struct{} `type:"structure"` - - // The limit that you want to get. Valid values include the following: - // - // * MAX_HEALTH_CHECKS_BY_OWNER: The maximum number of health checks that - // you can create using the current account. - // - // * MAX_HOSTED_ZONES_BY_OWNER: The maximum number of hosted zones that you - // can create using the current account. - // - // * MAX_REUSABLE_DELEGATION_SETS_BY_OWNER: The maximum number of reusable - // delegation sets that you can create using the current account. - // - // * MAX_TRAFFIC_POLICIES_BY_OWNER: The maximum number of traffic policies - // that you can create using the current account. - // - // * MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER: The maximum number of traffic - // policy instances that you can create using the current account. (Traffic - // policy instances are referred to as traffic flow policy records in the - // Amazon Route 53 console.) - // - // Type is a required field - Type *string `location:"uri" locationName:"Type" type:"string" required:"true" enum:"AccountLimitType"` -} - -// String returns the string representation -func (s GetAccountLimitInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAccountLimitInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAccountLimitInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAccountLimitInput"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Type != nil && len(*s.Type) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Type", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetType sets the Type field's value. -func (s *GetAccountLimitInput) SetType(v string) *GetAccountLimitInput { - s.Type = &v - return s -} - -// A complex type that contains the requested limit. -type GetAccountLimitOutput struct { - _ struct{} `type:"structure"` - - // The current number of entities that you have created of the specified type. - // For example, if you specified MAX_HEALTH_CHECKS_BY_OWNER for the value of - // Type in the request, the value of Count is the current number of health checks - // that you have created using the current account. - // - // Count is a required field - Count *int64 `type:"long" required:"true"` - - // The current setting for the specified limit. For example, if you specified - // MAX_HEALTH_CHECKS_BY_OWNER for the value of Type in the request, the value - // of Limit is the maximum number of health checks that you can create using - // the current account. - // - // Limit is a required field - Limit *AccountLimit `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetAccountLimitOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAccountLimitOutput) GoString() string { - return s.String() -} - -// SetCount sets the Count field's value. -func (s *GetAccountLimitOutput) SetCount(v int64) *GetAccountLimitOutput { - s.Count = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *GetAccountLimitOutput) SetLimit(v *AccountLimit) *GetAccountLimitOutput { - s.Limit = v - return s -} - -// The input for a GetChange request. -type GetChangeInput struct { - _ struct{} `type:"structure"` - - // The ID of the change batch request. The value that you specify here is the - // value that ChangeResourceRecordSets returned in the Id element when you submitted - // the request. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetChangeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetChangeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetChangeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetChangeInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetChangeInput) SetId(v string) *GetChangeInput { - s.Id = &v - return s -} - -// A complex type that contains the ChangeInfo element. -type GetChangeOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about the specified change batch. - // - // ChangeInfo is a required field - ChangeInfo *ChangeInfo `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetChangeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetChangeOutput) GoString() string { - return s.String() -} - -// SetChangeInfo sets the ChangeInfo field's value. -func (s *GetChangeOutput) SetChangeInfo(v *ChangeInfo) *GetChangeOutput { - s.ChangeInfo = v - return s -} - -type GetCheckerIpRangesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetCheckerIpRangesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCheckerIpRangesInput) GoString() string { - return s.String() -} - -type GetCheckerIpRangesOutput struct { - _ struct{} `type:"structure"` - - // CheckerIpRanges is a required field - CheckerIpRanges []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s GetCheckerIpRangesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCheckerIpRangesOutput) GoString() string { - return s.String() -} - -// SetCheckerIpRanges sets the CheckerIpRanges field's value. -func (s *GetCheckerIpRangesOutput) SetCheckerIpRanges(v []*string) *GetCheckerIpRangesOutput { - s.CheckerIpRanges = v - return s -} - -// A request for information about whether a specified geographic location is -// supported for Amazon Route 53 geolocation resource record sets. -type GetGeoLocationInput struct { - _ struct{} `type:"structure"` - - // Amazon Route 53 supports the following continent codes: - // - // * AF: Africa - // - // * AN: Antarctica - // - // * AS: Asia - // - // * EU: Europe - // - // * OC: Oceania - // - // * NA: North America - // - // * SA: South America - ContinentCode *string `location:"querystring" locationName:"continentcode" min:"2" type:"string"` - - // Amazon Route 53 uses the two-letter country codes that are specified in ISO - // standard 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). - CountryCode *string `location:"querystring" locationName:"countrycode" min:"1" type:"string"` - - // Amazon Route 53 uses the one- to three-letter subdivision codes that are - // specified in ISO standard 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). - // Route 53 doesn't support subdivision codes for all countries. If you specify - // subdivisioncode, you must also specify countrycode. - SubdivisionCode *string `location:"querystring" locationName:"subdivisioncode" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetGeoLocationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGeoLocationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetGeoLocationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetGeoLocationInput"} - if s.ContinentCode != nil && len(*s.ContinentCode) < 2 { - invalidParams.Add(request.NewErrParamMinLen("ContinentCode", 2)) - } - if s.CountryCode != nil && len(*s.CountryCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CountryCode", 1)) - } - if s.SubdivisionCode != nil && len(*s.SubdivisionCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SubdivisionCode", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContinentCode sets the ContinentCode field's value. -func (s *GetGeoLocationInput) SetContinentCode(v string) *GetGeoLocationInput { - s.ContinentCode = &v - return s -} - -// SetCountryCode sets the CountryCode field's value. -func (s *GetGeoLocationInput) SetCountryCode(v string) *GetGeoLocationInput { - s.CountryCode = &v - return s -} - -// SetSubdivisionCode sets the SubdivisionCode field's value. -func (s *GetGeoLocationInput) SetSubdivisionCode(v string) *GetGeoLocationInput { - s.SubdivisionCode = &v - return s -} - -// A complex type that contains the response information for the specified geolocation -// code. -type GetGeoLocationOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains the codes and full continent, country, and subdivision - // names for the specified geolocation code. - // - // GeoLocationDetails is a required field - GeoLocationDetails *GeoLocationDetails `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetGeoLocationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGeoLocationOutput) GoString() string { - return s.String() -} - -// SetGeoLocationDetails sets the GeoLocationDetails field's value. -func (s *GetGeoLocationOutput) SetGeoLocationDetails(v *GeoLocationDetails) *GetGeoLocationOutput { - s.GeoLocationDetails = v - return s -} - -// A request for the number of health checks that are associated with the current -// AWS account. -type GetHealthCheckCountInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetHealthCheckCountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHealthCheckCountInput) GoString() string { - return s.String() -} - -// A complex type that contains the response to a GetHealthCheckCount request. -type GetHealthCheckCountOutput struct { - _ struct{} `type:"structure"` - - // The number of health checks associated with the current AWS account. - // - // HealthCheckCount is a required field - HealthCheckCount *int64 `type:"long" required:"true"` -} - -// String returns the string representation -func (s GetHealthCheckCountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHealthCheckCountOutput) GoString() string { - return s.String() -} - -// SetHealthCheckCount sets the HealthCheckCount field's value. -func (s *GetHealthCheckCountOutput) SetHealthCheckCount(v int64) *GetHealthCheckCountOutput { - s.HealthCheckCount = &v - return s -} - -// A request to get information about a specified health check. -type GetHealthCheckInput struct { - _ struct{} `type:"structure"` - - // The identifier that Amazon Route 53 assigned to the health check when you - // created it. When you add or update a resource record set, you use this value - // to specify which health check to use. The value can be up to 64 characters - // long. - // - // HealthCheckId is a required field - HealthCheckId *string `location:"uri" locationName:"HealthCheckId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetHealthCheckInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHealthCheckInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetHealthCheckInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetHealthCheckInput"} - if s.HealthCheckId == nil { - invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) - } - if s.HealthCheckId != nil && len(*s.HealthCheckId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HealthCheckId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthCheckId sets the HealthCheckId field's value. -func (s *GetHealthCheckInput) SetHealthCheckId(v string) *GetHealthCheckInput { - s.HealthCheckId = &v - return s -} - -// A request for the reason that a health check failed most recently. -type GetHealthCheckLastFailureReasonInput struct { - _ struct{} `type:"structure"` - - // The ID for the health check for which you want the last failure reason. When - // you created the health check, CreateHealthCheck returned the ID in the response, - // in the HealthCheckId element. - // - // If you want to get the last failure reason for a calculated health check, - // you must use the Amazon Route 53 console or the CloudWatch console. You can't - // use GetHealthCheckLastFailureReason for a calculated health check. - // - // HealthCheckId is a required field - HealthCheckId *string `location:"uri" locationName:"HealthCheckId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetHealthCheckLastFailureReasonInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHealthCheckLastFailureReasonInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetHealthCheckLastFailureReasonInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetHealthCheckLastFailureReasonInput"} - if s.HealthCheckId == nil { - invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) - } - if s.HealthCheckId != nil && len(*s.HealthCheckId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HealthCheckId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthCheckId sets the HealthCheckId field's value. -func (s *GetHealthCheckLastFailureReasonInput) SetHealthCheckId(v string) *GetHealthCheckLastFailureReasonInput { - s.HealthCheckId = &v - return s -} - -// A complex type that contains the response to a GetHealthCheckLastFailureReason -// request. -type GetHealthCheckLastFailureReasonOutput struct { - _ struct{} `type:"structure"` - - // A list that contains one Observation element for each Amazon Route 53 health - // checker that is reporting a last failure reason. - // - // HealthCheckObservations is a required field - HealthCheckObservations []*HealthCheckObservation `locationNameList:"HealthCheckObservation" type:"list" required:"true"` -} - -// String returns the string representation -func (s GetHealthCheckLastFailureReasonOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHealthCheckLastFailureReasonOutput) GoString() string { - return s.String() -} - -// SetHealthCheckObservations sets the HealthCheckObservations field's value. -func (s *GetHealthCheckLastFailureReasonOutput) SetHealthCheckObservations(v []*HealthCheckObservation) *GetHealthCheckLastFailureReasonOutput { - s.HealthCheckObservations = v - return s -} - -// A complex type that contains the response to a GetHealthCheck request. -type GetHealthCheckOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about one health check that is associated - // with the current AWS account. - // - // HealthCheck is a required field - HealthCheck *HealthCheck `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetHealthCheckOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHealthCheckOutput) GoString() string { - return s.String() -} - -// SetHealthCheck sets the HealthCheck field's value. -func (s *GetHealthCheckOutput) SetHealthCheck(v *HealthCheck) *GetHealthCheckOutput { - s.HealthCheck = v - return s -} - -// A request to get the status for a health check. -type GetHealthCheckStatusInput struct { - _ struct{} `type:"structure"` - - // The ID for the health check that you want the current status for. When you - // created the health check, CreateHealthCheck returned the ID in the response, - // in the HealthCheckId element. - // - // If you want to check the status of a calculated health check, you must use - // the Amazon Route 53 console or the CloudWatch console. You can't use GetHealthCheckStatus - // to get the status of a calculated health check. - // - // HealthCheckId is a required field - HealthCheckId *string `location:"uri" locationName:"HealthCheckId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetHealthCheckStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHealthCheckStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetHealthCheckStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetHealthCheckStatusInput"} - if s.HealthCheckId == nil { - invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) - } - if s.HealthCheckId != nil && len(*s.HealthCheckId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HealthCheckId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthCheckId sets the HealthCheckId field's value. -func (s *GetHealthCheckStatusInput) SetHealthCheckId(v string) *GetHealthCheckStatusInput { - s.HealthCheckId = &v - return s -} - -// A complex type that contains the response to a GetHealthCheck request. -type GetHealthCheckStatusOutput struct { - _ struct{} `type:"structure"` - - // A list that contains one HealthCheckObservation element for each Amazon Route - // 53 health checker that is reporting a status about the health check endpoint. - // - // HealthCheckObservations is a required field - HealthCheckObservations []*HealthCheckObservation `locationNameList:"HealthCheckObservation" type:"list" required:"true"` -} - -// String returns the string representation -func (s GetHealthCheckStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHealthCheckStatusOutput) GoString() string { - return s.String() -} - -// SetHealthCheckObservations sets the HealthCheckObservations field's value. -func (s *GetHealthCheckStatusOutput) SetHealthCheckObservations(v []*HealthCheckObservation) *GetHealthCheckStatusOutput { - s.HealthCheckObservations = v - return s -} - -// A request to retrieve a count of all the hosted zones that are associated -// with the current AWS account. -type GetHostedZoneCountInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetHostedZoneCountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHostedZoneCountInput) GoString() string { - return s.String() -} - -// A complex type that contains the response to a GetHostedZoneCount request. -type GetHostedZoneCountOutput struct { - _ struct{} `type:"structure"` - - // The total number of public and private hosted zones that are associated with - // the current AWS account. - // - // HostedZoneCount is a required field - HostedZoneCount *int64 `type:"long" required:"true"` -} - -// String returns the string representation -func (s GetHostedZoneCountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHostedZoneCountOutput) GoString() string { - return s.String() -} - -// SetHostedZoneCount sets the HostedZoneCount field's value. -func (s *GetHostedZoneCountOutput) SetHostedZoneCount(v int64) *GetHostedZoneCountOutput { - s.HostedZoneCount = &v - return s -} - -// A request to get information about a specified hosted zone. -type GetHostedZoneInput struct { - _ struct{} `type:"structure"` - - // The ID of the hosted zone that you want to get information about. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetHostedZoneInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHostedZoneInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetHostedZoneInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetHostedZoneInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetHostedZoneInput) SetId(v string) *GetHostedZoneInput { - s.Id = &v - return s -} - -// A complex type that contains information about the request to create a hosted -// zone. -type GetHostedZoneLimitInput struct { - _ struct{} `type:"structure"` - - // The ID of the hosted zone that you want to get a limit for. - // - // HostedZoneId is a required field - HostedZoneId *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The limit that you want to get. Valid values include the following: - // - // * MAX_RRSETS_BY_ZONE: The maximum number of records that you can create - // in the specified hosted zone. - // - // * MAX_VPCS_ASSOCIATED_BY_ZONE: The maximum number of Amazon VPCs that - // you can associate with the specified private hosted zone. - // - // Type is a required field - Type *string `location:"uri" locationName:"Type" type:"string" required:"true" enum:"HostedZoneLimitType"` -} - -// String returns the string representation -func (s GetHostedZoneLimitInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHostedZoneLimitInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetHostedZoneLimitInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetHostedZoneLimitInput"} - if s.HostedZoneId == nil { - invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) - } - if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Type != nil && len(*s.Type) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Type", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *GetHostedZoneLimitInput) SetHostedZoneId(v string) *GetHostedZoneLimitInput { - s.HostedZoneId = &v - return s -} - -// SetType sets the Type field's value. -func (s *GetHostedZoneLimitInput) SetType(v string) *GetHostedZoneLimitInput { - s.Type = &v - return s -} - -// A complex type that contains the requested limit. -type GetHostedZoneLimitOutput struct { - _ struct{} `type:"structure"` - - // The current number of entities that you have created of the specified type. - // For example, if you specified MAX_RRSETS_BY_ZONE for the value of Type in - // the request, the value of Count is the current number of records that you - // have created in the specified hosted zone. - // - // Count is a required field - Count *int64 `type:"long" required:"true"` - - // The current setting for the specified limit. For example, if you specified - // MAX_RRSETS_BY_ZONE for the value of Type in the request, the value of Limit - // is the maximum number of records that you can create in the specified hosted - // zone. - // - // Limit is a required field - Limit *HostedZoneLimit `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetHostedZoneLimitOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHostedZoneLimitOutput) GoString() string { - return s.String() -} - -// SetCount sets the Count field's value. -func (s *GetHostedZoneLimitOutput) SetCount(v int64) *GetHostedZoneLimitOutput { - s.Count = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *GetHostedZoneLimitOutput) SetLimit(v *HostedZoneLimit) *GetHostedZoneLimitOutput { - s.Limit = v - return s -} - -// A complex type that contain the response to a GetHostedZone request. -type GetHostedZoneOutput struct { - _ struct{} `type:"structure"` - - // A complex type that lists the Amazon Route 53 name servers for the specified - // hosted zone. - DelegationSet *DelegationSet `type:"structure"` - - // A complex type that contains general information about the specified hosted - // zone. - // - // HostedZone is a required field - HostedZone *HostedZone `type:"structure" required:"true"` - - // A complex type that contains information about the VPCs that are associated - // with the specified hosted zone. - VPCs []*VPC `locationNameList:"VPC" min:"1" type:"list"` -} - -// String returns the string representation -func (s GetHostedZoneOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetHostedZoneOutput) GoString() string { - return s.String() -} - -// SetDelegationSet sets the DelegationSet field's value. -func (s *GetHostedZoneOutput) SetDelegationSet(v *DelegationSet) *GetHostedZoneOutput { - s.DelegationSet = v - return s -} - -// SetHostedZone sets the HostedZone field's value. -func (s *GetHostedZoneOutput) SetHostedZone(v *HostedZone) *GetHostedZoneOutput { - s.HostedZone = v - return s -} - -// SetVPCs sets the VPCs field's value. -func (s *GetHostedZoneOutput) SetVPCs(v []*VPC) *GetHostedZoneOutput { - s.VPCs = v - return s -} - -type GetQueryLoggingConfigInput struct { - _ struct{} `type:"structure"` - - // The ID of the configuration for DNS query logging that you want to get information - // about. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetQueryLoggingConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetQueryLoggingConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetQueryLoggingConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetQueryLoggingConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetQueryLoggingConfigInput) SetId(v string) *GetQueryLoggingConfigInput { - s.Id = &v - return s -} - -type GetQueryLoggingConfigOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about the query logging configuration - // that you specified in a GetQueryLoggingConfig request. - // - // QueryLoggingConfig is a required field - QueryLoggingConfig *QueryLoggingConfig `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetQueryLoggingConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetQueryLoggingConfigOutput) GoString() string { - return s.String() -} - -// SetQueryLoggingConfig sets the QueryLoggingConfig field's value. -func (s *GetQueryLoggingConfigOutput) SetQueryLoggingConfig(v *QueryLoggingConfig) *GetQueryLoggingConfigOutput { - s.QueryLoggingConfig = v - return s -} - -// A request to get information about a specified reusable delegation set. -type GetReusableDelegationSetInput struct { - _ struct{} `type:"structure"` - - // The ID of the reusable delegation set that you want to get a list of name - // servers for. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetReusableDelegationSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetReusableDelegationSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetReusableDelegationSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetReusableDelegationSetInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetReusableDelegationSetInput) SetId(v string) *GetReusableDelegationSetInput { - s.Id = &v - return s -} - -// A complex type that contains information about the request to create a hosted -// zone. -type GetReusableDelegationSetLimitInput struct { - _ struct{} `type:"structure"` - - // The ID of the delegation set that you want to get the limit for. - // - // DelegationSetId is a required field - DelegationSetId *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // Specify MAX_ZONES_BY_REUSABLE_DELEGATION_SET to get the maximum number of - // hosted zones that you can associate with the specified reusable delegation - // set. - // - // Type is a required field - Type *string `location:"uri" locationName:"Type" type:"string" required:"true" enum:"ReusableDelegationSetLimitType"` -} - -// String returns the string representation -func (s GetReusableDelegationSetLimitInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetReusableDelegationSetLimitInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetReusableDelegationSetLimitInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetReusableDelegationSetLimitInput"} - if s.DelegationSetId == nil { - invalidParams.Add(request.NewErrParamRequired("DelegationSetId")) - } - if s.DelegationSetId != nil && len(*s.DelegationSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DelegationSetId", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Type != nil && len(*s.Type) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Type", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDelegationSetId sets the DelegationSetId field's value. -func (s *GetReusableDelegationSetLimitInput) SetDelegationSetId(v string) *GetReusableDelegationSetLimitInput { - s.DelegationSetId = &v - return s -} - -// SetType sets the Type field's value. -func (s *GetReusableDelegationSetLimitInput) SetType(v string) *GetReusableDelegationSetLimitInput { - s.Type = &v - return s -} - -// A complex type that contains the requested limit. -type GetReusableDelegationSetLimitOutput struct { - _ struct{} `type:"structure"` - - // The current number of hosted zones that you can associate with the specified - // reusable delegation set. - // - // Count is a required field - Count *int64 `type:"long" required:"true"` - - // The current setting for the limit on hosted zones that you can associate - // with the specified reusable delegation set. - // - // Limit is a required field - Limit *ReusableDelegationSetLimit `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetReusableDelegationSetLimitOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetReusableDelegationSetLimitOutput) GoString() string { - return s.String() -} - -// SetCount sets the Count field's value. -func (s *GetReusableDelegationSetLimitOutput) SetCount(v int64) *GetReusableDelegationSetLimitOutput { - s.Count = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *GetReusableDelegationSetLimitOutput) SetLimit(v *ReusableDelegationSetLimit) *GetReusableDelegationSetLimitOutput { - s.Limit = v - return s -} - -// A complex type that contains the response to the GetReusableDelegationSet -// request. -type GetReusableDelegationSetOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about the reusable delegation set. - // - // DelegationSet is a required field - DelegationSet *DelegationSet `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetReusableDelegationSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetReusableDelegationSetOutput) GoString() string { - return s.String() -} - -// SetDelegationSet sets the DelegationSet field's value. -func (s *GetReusableDelegationSetOutput) SetDelegationSet(v *DelegationSet) *GetReusableDelegationSetOutput { - s.DelegationSet = v - return s -} - -// Gets information about a specific traffic policy version. -type GetTrafficPolicyInput struct { - _ struct{} `type:"structure"` - - // The ID of the traffic policy that you want to get information about. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" min:"1" type:"string" required:"true"` - - // The version number of the traffic policy that you want to get information - // about. - // - // Version is a required field - Version *int64 `location:"uri" locationName:"Version" min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s GetTrafficPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTrafficPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTrafficPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTrafficPolicyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && *s.Version < 1 { - invalidParams.Add(request.NewErrParamMinValue("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetTrafficPolicyInput) SetId(v string) *GetTrafficPolicyInput { - s.Id = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetTrafficPolicyInput) SetVersion(v int64) *GetTrafficPolicyInput { - s.Version = &v - return s -} - -// Request to get the number of traffic policy instances that are associated -// with the current AWS account. -type GetTrafficPolicyInstanceCountInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetTrafficPolicyInstanceCountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTrafficPolicyInstanceCountInput) GoString() string { - return s.String() -} - -// A complex type that contains information about the resource record sets that -// Amazon Route 53 created based on a specified traffic policy. -type GetTrafficPolicyInstanceCountOutput struct { - _ struct{} `type:"structure"` - - // The number of traffic policy instances that are associated with the current - // AWS account. - // - // TrafficPolicyInstanceCount is a required field - TrafficPolicyInstanceCount *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s GetTrafficPolicyInstanceCountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTrafficPolicyInstanceCountOutput) GoString() string { - return s.String() -} - -// SetTrafficPolicyInstanceCount sets the TrafficPolicyInstanceCount field's value. -func (s *GetTrafficPolicyInstanceCountOutput) SetTrafficPolicyInstanceCount(v int64) *GetTrafficPolicyInstanceCountOutput { - s.TrafficPolicyInstanceCount = &v - return s -} - -// Gets information about a specified traffic policy instance. -type GetTrafficPolicyInstanceInput struct { - _ struct{} `type:"structure"` - - // The ID of the traffic policy instance that you want to get information about. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTrafficPolicyInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTrafficPolicyInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTrafficPolicyInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTrafficPolicyInstanceInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetTrafficPolicyInstanceInput) SetId(v string) *GetTrafficPolicyInstanceInput { - s.Id = &v - return s -} - -// A complex type that contains information about the resource record sets that -// Amazon Route 53 created based on a specified traffic policy. -type GetTrafficPolicyInstanceOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains settings for the traffic policy instance. - // - // TrafficPolicyInstance is a required field - TrafficPolicyInstance *TrafficPolicyInstance `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetTrafficPolicyInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTrafficPolicyInstanceOutput) GoString() string { - return s.String() -} - -// SetTrafficPolicyInstance sets the TrafficPolicyInstance field's value. -func (s *GetTrafficPolicyInstanceOutput) SetTrafficPolicyInstance(v *TrafficPolicyInstance) *GetTrafficPolicyInstanceOutput { - s.TrafficPolicyInstance = v - return s -} - -// A complex type that contains the response information for the request. -type GetTrafficPolicyOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains settings for the specified traffic policy. - // - // TrafficPolicy is a required field - TrafficPolicy *TrafficPolicy `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetTrafficPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTrafficPolicyOutput) GoString() string { - return s.String() -} - -// SetTrafficPolicy sets the TrafficPolicy field's value. -func (s *GetTrafficPolicyOutput) SetTrafficPolicy(v *TrafficPolicy) *GetTrafficPolicyOutput { - s.TrafficPolicy = v - return s -} - -// A complex type that contains information about one health check that is associated -// with the current AWS account. -type HealthCheck struct { - _ struct{} `type:"structure"` - - // A unique string that you specified when you created the health check. - // - // CallerReference is a required field - CallerReference *string `min:"1" type:"string" required:"true"` - - // A complex type that contains information about the CloudWatch alarm that - // Amazon Route 53 is monitoring for this health check. - CloudWatchAlarmConfiguration *CloudWatchAlarmConfiguration `type:"structure"` - - // A complex type that contains detailed information about one health check. - // - // HealthCheckConfig is a required field - HealthCheckConfig *HealthCheckConfig `type:"structure" required:"true"` - - // The version of the health check. You can optionally pass this value in a - // call to UpdateHealthCheck to prevent overwriting another change to the health - // check. - // - // HealthCheckVersion is a required field - HealthCheckVersion *int64 `min:"1" type:"long" required:"true"` - - // The identifier that Amazon Route 53assigned to the health check when you - // created it. When you add or update a resource record set, you use this value - // to specify which health check to use. The value can be up to 64 characters - // long. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // If the health check was created by another service, the service that created - // the health check. When a health check is created by another service, you - // can't edit or delete it using Amazon Route 53. - LinkedService *LinkedService `type:"structure"` -} - -// String returns the string representation -func (s HealthCheck) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HealthCheck) GoString() string { - return s.String() -} - -// SetCallerReference sets the CallerReference field's value. -func (s *HealthCheck) SetCallerReference(v string) *HealthCheck { - s.CallerReference = &v - return s -} - -// SetCloudWatchAlarmConfiguration sets the CloudWatchAlarmConfiguration field's value. -func (s *HealthCheck) SetCloudWatchAlarmConfiguration(v *CloudWatchAlarmConfiguration) *HealthCheck { - s.CloudWatchAlarmConfiguration = v - return s -} - -// SetHealthCheckConfig sets the HealthCheckConfig field's value. -func (s *HealthCheck) SetHealthCheckConfig(v *HealthCheckConfig) *HealthCheck { - s.HealthCheckConfig = v - return s -} - -// SetHealthCheckVersion sets the HealthCheckVersion field's value. -func (s *HealthCheck) SetHealthCheckVersion(v int64) *HealthCheck { - s.HealthCheckVersion = &v - return s -} - -// SetId sets the Id field's value. -func (s *HealthCheck) SetId(v string) *HealthCheck { - s.Id = &v - return s -} - -// SetLinkedService sets the LinkedService field's value. -func (s *HealthCheck) SetLinkedService(v *LinkedService) *HealthCheck { - s.LinkedService = v - return s -} - -// A complex type that contains information about the health check. -type HealthCheckConfig struct { - _ struct{} `type:"structure"` - - // A complex type that identifies the CloudWatch alarm that you want Amazon - // Route 53 health checkers to use to determine whether the specified health - // check is healthy. - AlarmIdentifier *AlarmIdentifier `type:"structure"` - - // (CALCULATED Health Checks Only) A complex type that contains one ChildHealthCheck - // element for each health check that you want to associate with a CALCULATED - // health check. - ChildHealthChecks []*string `locationNameList:"ChildHealthCheck" type:"list"` - - // Stops Route 53 from performing health checks. When you disable a health check, - // here's what happens: - // - // * Health checks that check the health of endpoints: Route 53 stops submitting - // requests to your application, server, or other resource. - // - // * Calculated health checks: Route 53 stops aggregating the status of the - // referenced health checks. - // - // * Health checks that monitor CloudWatch alarms: Route 53 stops monitoring - // the corresponding CloudWatch metrics. - // - // After you disable a health check, Route 53 considers the status of the health - // check to always be healthy. If you configured DNS failover, Route 53 continues - // to route traffic to the corresponding resources. If you want to stop routing - // traffic to a resource, change the value of UpdateHealthCheckRequest$Inverted. - // - // Charges for a health check still apply when the health check is disabled. - // For more information, see Amazon Route 53 Pricing (http://aws.amazon.com/route53/pricing/). - Disabled *bool `type:"boolean"` - - // Specify whether you want Amazon Route 53 to send the value of FullyQualifiedDomainName - // to the endpoint in the client_hello message during TLS negotiation. This - // allows the endpoint to respond to HTTPS health check requests with the applicable - // SSL/TLS certificate. - // - // Some endpoints require that HTTPS requests include the host name in the client_hello - // message. If you don't enable SNI, the status of the health check will be - // SSL alert handshake_failure. A health check can also have that status for - // other reasons. If SNI is enabled and you're still getting the error, check - // the SSL/TLS configuration on your endpoint and confirm that your certificate - // is valid. - // - // The SSL/TLS certificate on your endpoint includes a domain name in the Common - // Name field and possibly several more in the Subject Alternative Names field. - // One of the domain names in the certificate should match the value that you - // specify for FullyQualifiedDomainName. If the endpoint responds to the client_hello - // message with a certificate that does not include the domain name that you - // specified in FullyQualifiedDomainName, a health checker will retry the handshake. - // In the second attempt, the health checker will omit FullyQualifiedDomainName - // from the client_hello message. - EnableSNI *bool `type:"boolean"` - - // The number of consecutive health checks that an endpoint must pass or fail - // for Amazon Route 53 to change the current status of the endpoint from unhealthy - // to healthy or vice versa. For more information, see How Amazon Route 53 Determines - // Whether an Endpoint Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) - // in the Amazon Route 53 Developer Guide. - // - // If you don't specify a value for FailureThreshold, the default value is three - // health checks. - FailureThreshold *int64 `min:"1" type:"integer"` - - // Amazon Route 53 behavior depends on whether you specify a value for IPAddress. - // - // If you specify a value forIPAddress: - // - // Amazon Route 53 sends health check requests to the specified IPv4 or IPv6 - // address and passes the value of FullyQualifiedDomainName in the Host header - // for all health checks except TCP health checks. This is typically the fully - // qualified DNS name of the endpoint on which you want Route 53 to perform - // health checks. - // - // When Route 53 checks the health of an endpoint, here is how it constructs - // the Host header: - // - // * If you specify a value of 80 for Port and HTTP or HTTP_STR_MATCH for - // Type, Route 53 passes the value of FullyQualifiedDomainName to the endpoint - // in the Host header. - // - // * If you specify a value of 443 for Port and HTTPS or HTTPS_STR_MATCH - // for Type, Route 53 passes the value of FullyQualifiedDomainName to the - // endpoint in the Host header. - // - // * If you specify another value for Port and any value except TCP for Type, - // Route 53 passes FullyQualifiedDomainName:Port to the endpoint in the Host - // header. - // - // If you don't specify a value for FullyQualifiedDomainName, Route 53 substitutes - // the value of IPAddress in the Host header in each of the preceding cases. - // - // If you don't specify a value for IPAddress: - // - // Route 53 sends a DNS request to the domain that you specify for FullyQualifiedDomainName - // at the interval that you specify for RequestInterval. Using an IPv4 address - // that DNS returns, Route 53 then checks the health of the endpoint. - // - // If you don't specify a value for IPAddress, Route 53 uses only IPv4 to send - // health checks to the endpoint. If there's no resource record set with a type - // of A for the name that you specify for FullyQualifiedDomainName, the health - // check fails with a "DNS resolution failed" error. - // - // If you want to check the health of weighted, latency, or failover resource - // record sets and you choose to specify the endpoint only by FullyQualifiedDomainName, - // we recommend that you create a separate health check for each endpoint. For - // example, create a health check for each HTTP server that is serving content - // for www.example.com. For the value of FullyQualifiedDomainName, specify the - // domain name of the server (such as us-east-2-www.example.com), not the name - // of the resource record sets (www.example.com). - // - // In this configuration, if you create a health check for which the value of - // FullyQualifiedDomainName matches the name of the resource record sets and - // you then associate the health check with those resource record sets, health - // check results will be unpredictable. - // - // In addition, if the value that you specify for Type is HTTP, HTTPS, HTTP_STR_MATCH, - // or HTTPS_STR_MATCH, Route 53 passes the value of FullyQualifiedDomainName - // in the Host header, as it does when you specify a value for IPAddress. If - // the value of Type is TCP, Route 53 doesn't pass a Host header. - FullyQualifiedDomainName *string `type:"string"` - - // The number of child health checks that are associated with a CALCULATED health - // that Amazon Route 53 must consider healthy for the CALCULATED health check - // to be considered healthy. To specify the child health checks that you want - // to associate with a CALCULATED health check, use the HealthCheckConfig$ChildHealthChecks - // and HealthCheckConfig$ChildHealthChecks elements. - // - // Note the following: - // - // * If you specify a number greater than the number of child health checks, - // Route 53 always considers this health check to be unhealthy. - // - // * If you specify 0, Route 53 always considers this health check to be - // healthy. - HealthThreshold *int64 `type:"integer"` - - // The IPv4 or IPv6 IP address of the endpoint that you want Amazon Route 53 - // to perform health checks on. If you don't specify a value for IPAddress, - // Route 53 sends a DNS request to resolve the domain name that you specify - // in FullyQualifiedDomainName at the interval that you specify in RequestInterval. - // Using an IP address returned by DNS, Route 53 then checks the health of the - // endpoint. - // - // Use one of the following formats for the value of IPAddress: - // - // * IPv4 address: four values between 0 and 255, separated by periods (.), - // for example, 192.0.2.44. - // - // * IPv6 address: eight groups of four hexadecimal values, separated by - // colons (:), for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345. You - // can also shorten IPv6 addresses as described in RFC 5952, for example, - // 2001:db8:85a3::abcd:1:2345. - // - // If the endpoint is an EC2 instance, we recommend that you create an Elastic - // IP address, associate it with your EC2 instance, and specify the Elastic - // IP address for IPAddress. This ensures that the IP address of your instance - // will never change. - // - // For more information, see HealthCheckConfig$FullyQualifiedDomainName. - // - // Constraints: Route 53 can't check the health of endpoints for which the IP - // address is in local, private, non-routable, or multicast ranges. For more - // information about IP addresses for which you can't create health checks, - // see the following documents: - // - // * RFC 5735, Special Use IPv4 Addresses (https://tools.ietf.org/html/rfc5735) - // - // * RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space (https://tools.ietf.org/html/rfc6598) - // - // * RFC 5156, Special-Use IPv6 Addresses (https://tools.ietf.org/html/rfc5156) - // - // When the value of Type is CALCULATED or CLOUDWATCH_METRIC, omit IPAddress. - IPAddress *string `type:"string"` - - // When CloudWatch has insufficient data about the metric to determine the alarm - // state, the status that you want Amazon Route 53 to assign to the health check: - // - // * Healthy: Route 53 considers the health check to be healthy. - // - // * Unhealthy: Route 53 considers the health check to be unhealthy. - // - // * LastKnownStatus: Route 53 uses the status of the health check from the - // last time that CloudWatch had sufficient data to determine the alarm state. - // For new health checks that have no last known status, the default status - // for the health check is healthy. - InsufficientDataHealthStatus *string `type:"string" enum:"InsufficientDataHealthStatus"` - - // Specify whether you want Amazon Route 53 to invert the status of a health - // check, for example, to consider a health check unhealthy when it otherwise - // would be considered healthy. - Inverted *bool `type:"boolean"` - - // Specify whether you want Amazon Route 53 to measure the latency between health - // checkers in multiple AWS regions and your endpoint, and to display CloudWatch - // latency graphs on the Health Checks page in the Route 53 console. - // - // You can't change the value of MeasureLatency after you create a health check. - MeasureLatency *bool `type:"boolean"` - - // The port on the endpoint on which you want Amazon Route 53 to perform health - // checks. Specify a value for Port only when you specify a value for IPAddress. - Port *int64 `min:"1" type:"integer"` - - // A complex type that contains one Region element for each region from which - // you want Amazon Route 53 health checkers to check the specified endpoint. - // - // If you don't specify any regions, Route 53 health checkers automatically - // performs checks from all of the regions that are listed under Valid Values. - // - // If you update a health check to remove a region that has been performing - // health checks, Route 53 will briefly continue to perform checks from that - // region to ensure that some health checkers are always checking the endpoint - // (for example, if you replace three regions with four different regions). - Regions []*string `locationNameList:"Region" min:"3" type:"list"` - - // The number of seconds between the time that Amazon Route 53 gets a response - // from your endpoint and the time that it sends the next health check request. - // Each Route 53 health checker makes requests at this interval. - // - // You can't change the value of RequestInterval after you create a health check. - // - // If you don't specify a value for RequestInterval, the default value is 30 - // seconds. - RequestInterval *int64 `min:"10" type:"integer"` - - // The path, if any, that you want Amazon Route 53 to request when performing - // health checks. The path can be any value for which your endpoint will return - // an HTTP status code of 2xx or 3xx when the endpoint is healthy, for example, - // the file /docs/route53-health-check.html. You can also include query string - // parameters, for example, /welcome.html?language=jp&login=y. - ResourcePath *string `type:"string"` - - // If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that - // you want Amazon Route 53 to search for in the response body from the specified - // resource. If the string appears in the response body, Route 53 considers - // the resource healthy. - // - // Route 53 considers case when searching for SearchString in the response body. - SearchString *string `type:"string"` - - // The type of health check that you want to create, which indicates how Amazon - // Route 53 determines whether an endpoint is healthy. - // - // You can't change the value of Type after you create a health check. - // - // You can create the following types of health checks: - // - // * HTTP: Route 53 tries to establish a TCP connection. If successful, Route - // 53 submits an HTTP request and waits for an HTTP status code of 200 or - // greater and less than 400. - // - // * HTTPS: Route 53 tries to establish a TCP connection. If successful, - // Route 53 submits an HTTPS request and waits for an HTTP status code of - // 200 or greater and less than 400. - // - // If you specify HTTPS for the value of Type, the endpoint must support TLS - // v1.0 or later. - // - // * HTTP_STR_MATCH: Route 53 tries to establish a TCP connection. If successful, - // Route 53 submits an HTTP request and searches the first 5,120 bytes of - // the response body for the string that you specify in SearchString. - // - // * HTTPS_STR_MATCH: Route 53 tries to establish a TCP connection. If successful, - // Route 53 submits an HTTPS request and searches the first 5,120 bytes of - // the response body for the string that you specify in SearchString. - // - // * TCP: Route 53 tries to establish a TCP connection. - // - // * CLOUDWATCH_METRIC: The health check is associated with a CloudWatch - // alarm. If the state of the alarm is OK, the health check is considered - // healthy. If the state is ALARM, the health check is considered unhealthy. - // If CloudWatch doesn't have sufficient data to determine whether the state - // is OK or ALARM, the health check status depends on the setting for InsufficientDataHealthStatus: - // Healthy, Unhealthy, or LastKnownStatus. - // - // * CALCULATED: For health checks that monitor the status of other health - // checks, Route 53 adds up the number of health checks that Route 53 health - // checkers consider to be healthy and compares that number with the value - // of HealthThreshold. - // - // For more information, see How Route 53 Determines Whether an Endpoint Is - // Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) - // in the Amazon Route 53 Developer Guide. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"HealthCheckType"` -} - -// String returns the string representation -func (s HealthCheckConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HealthCheckConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HealthCheckConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HealthCheckConfig"} - if s.FailureThreshold != nil && *s.FailureThreshold < 1 { - invalidParams.Add(request.NewErrParamMinValue("FailureThreshold", 1)) - } - if s.Port != nil && *s.Port < 1 { - invalidParams.Add(request.NewErrParamMinValue("Port", 1)) - } - if s.Regions != nil && len(s.Regions) < 3 { - invalidParams.Add(request.NewErrParamMinLen("Regions", 3)) - } - if s.RequestInterval != nil && *s.RequestInterval < 10 { - invalidParams.Add(request.NewErrParamMinValue("RequestInterval", 10)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.AlarmIdentifier != nil { - if err := s.AlarmIdentifier.Validate(); err != nil { - invalidParams.AddNested("AlarmIdentifier", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlarmIdentifier sets the AlarmIdentifier field's value. -func (s *HealthCheckConfig) SetAlarmIdentifier(v *AlarmIdentifier) *HealthCheckConfig { - s.AlarmIdentifier = v - return s -} - -// SetChildHealthChecks sets the ChildHealthChecks field's value. -func (s *HealthCheckConfig) SetChildHealthChecks(v []*string) *HealthCheckConfig { - s.ChildHealthChecks = v - return s -} - -// SetDisabled sets the Disabled field's value. -func (s *HealthCheckConfig) SetDisabled(v bool) *HealthCheckConfig { - s.Disabled = &v - return s -} - -// SetEnableSNI sets the EnableSNI field's value. -func (s *HealthCheckConfig) SetEnableSNI(v bool) *HealthCheckConfig { - s.EnableSNI = &v - return s -} - -// SetFailureThreshold sets the FailureThreshold field's value. -func (s *HealthCheckConfig) SetFailureThreshold(v int64) *HealthCheckConfig { - s.FailureThreshold = &v - return s -} - -// SetFullyQualifiedDomainName sets the FullyQualifiedDomainName field's value. -func (s *HealthCheckConfig) SetFullyQualifiedDomainName(v string) *HealthCheckConfig { - s.FullyQualifiedDomainName = &v - return s -} - -// SetHealthThreshold sets the HealthThreshold field's value. -func (s *HealthCheckConfig) SetHealthThreshold(v int64) *HealthCheckConfig { - s.HealthThreshold = &v - return s -} - -// SetIPAddress sets the IPAddress field's value. -func (s *HealthCheckConfig) SetIPAddress(v string) *HealthCheckConfig { - s.IPAddress = &v - return s -} - -// SetInsufficientDataHealthStatus sets the InsufficientDataHealthStatus field's value. -func (s *HealthCheckConfig) SetInsufficientDataHealthStatus(v string) *HealthCheckConfig { - s.InsufficientDataHealthStatus = &v - return s -} - -// SetInverted sets the Inverted field's value. -func (s *HealthCheckConfig) SetInverted(v bool) *HealthCheckConfig { - s.Inverted = &v - return s -} - -// SetMeasureLatency sets the MeasureLatency field's value. -func (s *HealthCheckConfig) SetMeasureLatency(v bool) *HealthCheckConfig { - s.MeasureLatency = &v - return s -} - -// SetPort sets the Port field's value. -func (s *HealthCheckConfig) SetPort(v int64) *HealthCheckConfig { - s.Port = &v - return s -} - -// SetRegions sets the Regions field's value. -func (s *HealthCheckConfig) SetRegions(v []*string) *HealthCheckConfig { - s.Regions = v - return s -} - -// SetRequestInterval sets the RequestInterval field's value. -func (s *HealthCheckConfig) SetRequestInterval(v int64) *HealthCheckConfig { - s.RequestInterval = &v - return s -} - -// SetResourcePath sets the ResourcePath field's value. -func (s *HealthCheckConfig) SetResourcePath(v string) *HealthCheckConfig { - s.ResourcePath = &v - return s -} - -// SetSearchString sets the SearchString field's value. -func (s *HealthCheckConfig) SetSearchString(v string) *HealthCheckConfig { - s.SearchString = &v - return s -} - -// SetType sets the Type field's value. -func (s *HealthCheckConfig) SetType(v string) *HealthCheckConfig { - s.Type = &v - return s -} - -// A complex type that contains the last failure reason as reported by one Amazon -// Route 53 health checker. -type HealthCheckObservation struct { - _ struct{} `type:"structure"` - - // The IP address of the Amazon Route 53 health checker that provided the failure - // reason in StatusReport. - IPAddress *string `type:"string"` - - // The region of the Amazon Route 53 health checker that provided the status - // in StatusReport. - Region *string `min:"1" type:"string" enum:"HealthCheckRegion"` - - // A complex type that contains the last failure reason as reported by one Amazon - // Route 53 health checker and the time of the failed health check. - StatusReport *StatusReport `type:"structure"` -} - -// String returns the string representation -func (s HealthCheckObservation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HealthCheckObservation) GoString() string { - return s.String() -} - -// SetIPAddress sets the IPAddress field's value. -func (s *HealthCheckObservation) SetIPAddress(v string) *HealthCheckObservation { - s.IPAddress = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *HealthCheckObservation) SetRegion(v string) *HealthCheckObservation { - s.Region = &v - return s -} - -// SetStatusReport sets the StatusReport field's value. -func (s *HealthCheckObservation) SetStatusReport(v *StatusReport) *HealthCheckObservation { - s.StatusReport = v - return s -} - -// A complex type that contains general information about the hosted zone. -type HostedZone struct { - _ struct{} `type:"structure"` - - // The value that you specified for CallerReference when you created the hosted - // zone. - // - // CallerReference is a required field - CallerReference *string `min:"1" type:"string" required:"true"` - - // A complex type that includes the Comment and PrivateZone elements. If you - // omitted the HostedZoneConfig and Comment elements from the request, the Config - // and Comment elements don't appear in the response. - Config *HostedZoneConfig `type:"structure"` - - // The ID that Amazon Route 53 assigned to the hosted zone when you created - // it. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // If the hosted zone was created by another service, the service that created - // the hosted zone. When a hosted zone is created by another service, you can't - // edit or delete it using Route 53. - LinkedService *LinkedService `type:"structure"` - - // The name of the domain. For public hosted zones, this is the name that you - // have registered with your DNS registrar. - // - // For information about how to specify characters other than a-z, 0-9, and - // - (hyphen) and how to specify internationalized domain names, see CreateHostedZone. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The number of resource record sets in the hosted zone. - ResourceRecordSetCount *int64 `type:"long"` -} - -// String returns the string representation -func (s HostedZone) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HostedZone) GoString() string { - return s.String() -} - -// SetCallerReference sets the CallerReference field's value. -func (s *HostedZone) SetCallerReference(v string) *HostedZone { - s.CallerReference = &v - return s -} - -// SetConfig sets the Config field's value. -func (s *HostedZone) SetConfig(v *HostedZoneConfig) *HostedZone { - s.Config = v - return s -} - -// SetId sets the Id field's value. -func (s *HostedZone) SetId(v string) *HostedZone { - s.Id = &v - return s -} - -// SetLinkedService sets the LinkedService field's value. -func (s *HostedZone) SetLinkedService(v *LinkedService) *HostedZone { - s.LinkedService = v - return s -} - -// SetName sets the Name field's value. -func (s *HostedZone) SetName(v string) *HostedZone { - s.Name = &v - return s -} - -// SetResourceRecordSetCount sets the ResourceRecordSetCount field's value. -func (s *HostedZone) SetResourceRecordSetCount(v int64) *HostedZone { - s.ResourceRecordSetCount = &v - return s -} - -// A complex type that contains an optional comment about your hosted zone. -// If you don't want to specify a comment, omit both the HostedZoneConfig and -// Comment elements. -type HostedZoneConfig struct { - _ struct{} `type:"structure"` - - // Any comments that you want to include about the hosted zone. - Comment *string `type:"string"` - - // A value that indicates whether this is a private hosted zone. - PrivateZone *bool `type:"boolean"` -} - -// String returns the string representation -func (s HostedZoneConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HostedZoneConfig) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *HostedZoneConfig) SetComment(v string) *HostedZoneConfig { - s.Comment = &v - return s -} - -// SetPrivateZone sets the PrivateZone field's value. -func (s *HostedZoneConfig) SetPrivateZone(v bool) *HostedZoneConfig { - s.PrivateZone = &v - return s -} - -// A complex type that contains the type of limit that you specified in the -// request and the current value for that limit. -type HostedZoneLimit struct { - _ struct{} `type:"structure"` - - // The limit that you requested. Valid values include the following: - // - // * MAX_RRSETS_BY_ZONE: The maximum number of records that you can create - // in the specified hosted zone. - // - // * MAX_VPCS_ASSOCIATED_BY_ZONE: The maximum number of Amazon VPCs that - // you can associate with the specified private hosted zone. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"HostedZoneLimitType"` - - // The current value for the limit that is specified by Type. - // - // Value is a required field - Value *int64 `min:"1" type:"long" required:"true"` -} - -// String returns the string representation -func (s HostedZoneLimit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HostedZoneLimit) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *HostedZoneLimit) SetType(v string) *HostedZoneLimit { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *HostedZoneLimit) SetValue(v int64) *HostedZoneLimit { - s.Value = &v - return s -} - -// If a health check or hosted zone was created by another service, LinkedService -// is a complex type that describes the service that created the resource. When -// a resource is created by another service, you can't edit or delete it using -// Amazon Route 53. -type LinkedService struct { - _ struct{} `type:"structure"` - - // If the health check or hosted zone was created by another service, an optional - // description that can be provided by the other service. When a resource is - // created by another service, you can't edit or delete it using Amazon Route - // 53. - Description *string `type:"string"` - - // If the health check or hosted zone was created by another service, the service - // that created the resource. When a resource is created by another service, - // you can't edit or delete it using Amazon Route 53. - ServicePrincipal *string `type:"string"` -} - -// String returns the string representation -func (s LinkedService) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LinkedService) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *LinkedService) SetDescription(v string) *LinkedService { - s.Description = &v - return s -} - -// SetServicePrincipal sets the ServicePrincipal field's value. -func (s *LinkedService) SetServicePrincipal(v string) *LinkedService { - s.ServicePrincipal = &v - return s -} - -// A request to get a list of geographic locations that Amazon Route 53 supports -// for geolocation resource record sets. -type ListGeoLocationsInput struct { - _ struct{} `type:"structure"` - - // (Optional) The maximum number of geolocations to be included in the response - // body for this request. If more than maxitems geolocations remain to be listed, - // then the value of the IsTruncated element in the response is true. - MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` - - // The code for the continent with which you want to start listing locations - // that Amazon Route 53 supports for geolocation. If Route 53 has already returned - // a page or more of results, if IsTruncated is true, and if NextContinentCode - // from the previous response has a value, enter that value in startcontinentcode - // to return the next page of results. - // - // Include startcontinentcode only if you want to list continents. Don't include - // startcontinentcode when you're listing countries or countries with their - // subdivisions. - StartContinentCode *string `location:"querystring" locationName:"startcontinentcode" min:"2" type:"string"` - - // The code for the country with which you want to start listing locations that - // Amazon Route 53 supports for geolocation. If Route 53 has already returned - // a page or more of results, if IsTruncated is true, and if NextCountryCode - // from the previous response has a value, enter that value in startcountrycode - // to return the next page of results. - // - // Route 53 uses the two-letter country codes that are specified in ISO standard - // 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). - StartCountryCode *string `location:"querystring" locationName:"startcountrycode" min:"1" type:"string"` - - // The code for the subdivision (for example, state or province) with which - // you want to start listing locations that Amazon Route 53 supports for geolocation. - // If Route 53 has already returned a page or more of results, if IsTruncated - // is true, and if NextSubdivisionCode from the previous response has a value, - // enter that value in startsubdivisioncode to return the next page of results. - // - // To list subdivisions of a country, you must include both startcountrycode - // and startsubdivisioncode. - StartSubdivisionCode *string `location:"querystring" locationName:"startsubdivisioncode" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListGeoLocationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListGeoLocationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListGeoLocationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListGeoLocationsInput"} - if s.StartContinentCode != nil && len(*s.StartContinentCode) < 2 { - invalidParams.Add(request.NewErrParamMinLen("StartContinentCode", 2)) - } - if s.StartCountryCode != nil && len(*s.StartCountryCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StartCountryCode", 1)) - } - if s.StartSubdivisionCode != nil && len(*s.StartSubdivisionCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StartSubdivisionCode", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListGeoLocationsInput) SetMaxItems(v string) *ListGeoLocationsInput { - s.MaxItems = &v - return s -} - -// SetStartContinentCode sets the StartContinentCode field's value. -func (s *ListGeoLocationsInput) SetStartContinentCode(v string) *ListGeoLocationsInput { - s.StartContinentCode = &v - return s -} - -// SetStartCountryCode sets the StartCountryCode field's value. -func (s *ListGeoLocationsInput) SetStartCountryCode(v string) *ListGeoLocationsInput { - s.StartCountryCode = &v - return s -} - -// SetStartSubdivisionCode sets the StartSubdivisionCode field's value. -func (s *ListGeoLocationsInput) SetStartSubdivisionCode(v string) *ListGeoLocationsInput { - s.StartSubdivisionCode = &v - return s -} - -// A complex type containing the response information for the request. -type ListGeoLocationsOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains one GeoLocationDetails element for each location - // that Amazon Route 53 supports for geolocation. - // - // GeoLocationDetailsList is a required field - GeoLocationDetailsList []*GeoLocationDetails `locationNameList:"GeoLocationDetails" type:"list" required:"true"` - - // A value that indicates whether more locations remain to be listed after the - // last location in this response. If so, the value of IsTruncated is true. - // To get more values, submit another request and include the values of NextContinentCode, - // NextCountryCode, and NextSubdivisionCode in the startcontinentcode, startcountrycode, - // and startsubdivisioncode, as applicable. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // The value that you specified for MaxItems in the request. - // - // MaxItems is a required field - MaxItems *string `type:"string" required:"true"` - - // If IsTruncated is true, you can make a follow-up request to display more - // locations. Enter the value of NextContinentCode in the startcontinentcode - // parameter in another ListGeoLocations request. - NextContinentCode *string `min:"2" type:"string"` - - // If IsTruncated is true, you can make a follow-up request to display more - // locations. Enter the value of NextCountryCode in the startcountrycode parameter - // in another ListGeoLocations request. - NextCountryCode *string `min:"1" type:"string"` - - // If IsTruncated is true, you can make a follow-up request to display more - // locations. Enter the value of NextSubdivisionCode in the startsubdivisioncode - // parameter in another ListGeoLocations request. - NextSubdivisionCode *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListGeoLocationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListGeoLocationsOutput) GoString() string { - return s.String() -} - -// SetGeoLocationDetailsList sets the GeoLocationDetailsList field's value. -func (s *ListGeoLocationsOutput) SetGeoLocationDetailsList(v []*GeoLocationDetails) *ListGeoLocationsOutput { - s.GeoLocationDetailsList = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListGeoLocationsOutput) SetIsTruncated(v bool) *ListGeoLocationsOutput { - s.IsTruncated = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListGeoLocationsOutput) SetMaxItems(v string) *ListGeoLocationsOutput { - s.MaxItems = &v - return s -} - -// SetNextContinentCode sets the NextContinentCode field's value. -func (s *ListGeoLocationsOutput) SetNextContinentCode(v string) *ListGeoLocationsOutput { - s.NextContinentCode = &v - return s -} - -// SetNextCountryCode sets the NextCountryCode field's value. -func (s *ListGeoLocationsOutput) SetNextCountryCode(v string) *ListGeoLocationsOutput { - s.NextCountryCode = &v - return s -} - -// SetNextSubdivisionCode sets the NextSubdivisionCode field's value. -func (s *ListGeoLocationsOutput) SetNextSubdivisionCode(v string) *ListGeoLocationsOutput { - s.NextSubdivisionCode = &v - return s -} - -// A request to retrieve a list of the health checks that are associated with -// the current AWS account. -type ListHealthChecksInput struct { - _ struct{} `type:"structure"` - - // If the value of IsTruncated in the previous response was true, you have more - // health checks. To get another group, submit another ListHealthChecks request. - // - // For the value of marker, specify the value of NextMarker from the previous - // response, which is the ID of the first health check that Amazon Route 53 - // will return if you submit another request. - // - // If the value of IsTruncated in the previous response was false, there are - // no more health checks to get. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The maximum number of health checks that you want ListHealthChecks to return - // in response to the current request. Amazon Route 53 returns a maximum of - // 100 items. If you set MaxItems to a value greater than 100, Route 53 returns - // only the first 100 health checks. - MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` -} - -// String returns the string representation -func (s ListHealthChecksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListHealthChecksInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListHealthChecksInput) SetMarker(v string) *ListHealthChecksInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListHealthChecksInput) SetMaxItems(v string) *ListHealthChecksInput { - s.MaxItems = &v - return s -} - -// A complex type that contains the response to a ListHealthChecks request. -type ListHealthChecksOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains one HealthCheck element for each health check - // that is associated with the current AWS account. - // - // HealthChecks is a required field - HealthChecks []*HealthCheck `locationNameList:"HealthCheck" type:"list" required:"true"` - - // A flag that indicates whether there are more health checks to be listed. - // If the response was truncated, you can get the next group of health checks - // by submitting another ListHealthChecks request and specifying the value of - // NextMarker in the marker parameter. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // For the second and subsequent calls to ListHealthChecks, Marker is the value - // that you specified for the marker parameter in the previous request. - // - // Marker is a required field - Marker *string `type:"string" required:"true"` - - // The value that you specified for the maxitems parameter in the call to ListHealthChecks - // that produced the current response. - // - // MaxItems is a required field - MaxItems *string `type:"string" required:"true"` - - // If IsTruncated is true, the value of NextMarker identifies the first health - // check that Amazon Route 53 returns if you submit another ListHealthChecks - // request and specify the value of NextMarker in the marker parameter. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s ListHealthChecksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListHealthChecksOutput) GoString() string { - return s.String() -} - -// SetHealthChecks sets the HealthChecks field's value. -func (s *ListHealthChecksOutput) SetHealthChecks(v []*HealthCheck) *ListHealthChecksOutput { - s.HealthChecks = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListHealthChecksOutput) SetIsTruncated(v bool) *ListHealthChecksOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListHealthChecksOutput) SetMarker(v string) *ListHealthChecksOutput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListHealthChecksOutput) SetMaxItems(v string) *ListHealthChecksOutput { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListHealthChecksOutput) SetNextMarker(v string) *ListHealthChecksOutput { - s.NextMarker = &v - return s -} - -// Retrieves a list of the public and private hosted zones that are associated -// with the current AWS account in ASCII order by domain name. -type ListHostedZonesByNameInput struct { - _ struct{} `type:"structure"` - - // (Optional) For your first request to ListHostedZonesByName, include the dnsname - // parameter only if you want to specify the name of the first hosted zone in - // the response. If you don't include the dnsname parameter, Amazon Route 53 - // returns all of the hosted zones that were created by the current AWS account, - // in ASCII order. For subsequent requests, include both dnsname and hostedzoneid - // parameters. For dnsname, specify the value of NextDNSName from the previous - // response. - DNSName *string `location:"querystring" locationName:"dnsname" type:"string"` - - // (Optional) For your first request to ListHostedZonesByName, do not include - // the hostedzoneid parameter. - // - // If you have more hosted zones than the value of maxitems, ListHostedZonesByName - // returns only the first maxitems hosted zones. To get the next group of maxitems - // hosted zones, submit another request to ListHostedZonesByName and include - // both dnsname and hostedzoneid parameters. For the value of hostedzoneid, - // specify the value of the NextHostedZoneId element from the previous response. - HostedZoneId *string `location:"querystring" locationName:"hostedzoneid" type:"string"` - - // The maximum number of hosted zones to be included in the response body for - // this request. If you have more than maxitems hosted zones, then the value - // of the IsTruncated element in the response is true, and the values of NextDNSName - // and NextHostedZoneId specify the first hosted zone in the next group of maxitems - // hosted zones. - MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` -} - -// String returns the string representation -func (s ListHostedZonesByNameInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListHostedZonesByNameInput) GoString() string { - return s.String() -} - -// SetDNSName sets the DNSName field's value. -func (s *ListHostedZonesByNameInput) SetDNSName(v string) *ListHostedZonesByNameInput { - s.DNSName = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *ListHostedZonesByNameInput) SetHostedZoneId(v string) *ListHostedZonesByNameInput { - s.HostedZoneId = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListHostedZonesByNameInput) SetMaxItems(v string) *ListHostedZonesByNameInput { - s.MaxItems = &v - return s -} - -// A complex type that contains the response information for the request. -type ListHostedZonesByNameOutput struct { - _ struct{} `type:"structure"` - - // For the second and subsequent calls to ListHostedZonesByName, DNSName is - // the value that you specified for the dnsname parameter in the request that - // produced the current response. - DNSName *string `type:"string"` - - // The ID that Amazon Route 53 assigned to the hosted zone when you created - // it. - HostedZoneId *string `type:"string"` - - // A complex type that contains general information about the hosted zone. - // - // HostedZones is a required field - HostedZones []*HostedZone `locationNameList:"HostedZone" type:"list" required:"true"` - - // A flag that indicates whether there are more hosted zones to be listed. If - // the response was truncated, you can get the next group of maxitems hosted - // zones by calling ListHostedZonesByName again and specifying the values of - // NextDNSName and NextHostedZoneId elements in the dnsname and hostedzoneid - // parameters. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // The value that you specified for the maxitems parameter in the call to ListHostedZonesByName - // that produced the current response. - // - // MaxItems is a required field - MaxItems *string `type:"string" required:"true"` - - // If IsTruncated is true, the value of NextDNSName is the name of the first - // hosted zone in the next group of maxitems hosted zones. Call ListHostedZonesByName - // again and specify the value of NextDNSName and NextHostedZoneId in the dnsname - // and hostedzoneid parameters, respectively. - // - // This element is present only if IsTruncated is true. - NextDNSName *string `type:"string"` - - // If IsTruncated is true, the value of NextHostedZoneId identifies the first - // hosted zone in the next group of maxitems hosted zones. Call ListHostedZonesByName - // again and specify the value of NextDNSName and NextHostedZoneId in the dnsname - // and hostedzoneid parameters, respectively. - // - // This element is present only if IsTruncated is true. - NextHostedZoneId *string `type:"string"` -} - -// String returns the string representation -func (s ListHostedZonesByNameOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListHostedZonesByNameOutput) GoString() string { - return s.String() -} - -// SetDNSName sets the DNSName field's value. -func (s *ListHostedZonesByNameOutput) SetDNSName(v string) *ListHostedZonesByNameOutput { - s.DNSName = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *ListHostedZonesByNameOutput) SetHostedZoneId(v string) *ListHostedZonesByNameOutput { - s.HostedZoneId = &v - return s -} - -// SetHostedZones sets the HostedZones field's value. -func (s *ListHostedZonesByNameOutput) SetHostedZones(v []*HostedZone) *ListHostedZonesByNameOutput { - s.HostedZones = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListHostedZonesByNameOutput) SetIsTruncated(v bool) *ListHostedZonesByNameOutput { - s.IsTruncated = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListHostedZonesByNameOutput) SetMaxItems(v string) *ListHostedZonesByNameOutput { - s.MaxItems = &v - return s -} - -// SetNextDNSName sets the NextDNSName field's value. -func (s *ListHostedZonesByNameOutput) SetNextDNSName(v string) *ListHostedZonesByNameOutput { - s.NextDNSName = &v - return s -} - -// SetNextHostedZoneId sets the NextHostedZoneId field's value. -func (s *ListHostedZonesByNameOutput) SetNextHostedZoneId(v string) *ListHostedZonesByNameOutput { - s.NextHostedZoneId = &v - return s -} - -// A request to retrieve a list of the public and private hosted zones that -// are associated with the current AWS account. -type ListHostedZonesInput struct { - _ struct{} `type:"structure"` - - // If you're using reusable delegation sets and you want to list all of the - // hosted zones that are associated with a reusable delegation set, specify - // the ID of that reusable delegation set. - DelegationSetId *string `location:"querystring" locationName:"delegationsetid" type:"string"` - - // If the value of IsTruncated in the previous response was true, you have more - // hosted zones. To get more hosted zones, submit another ListHostedZones request. - // - // For the value of marker, specify the value of NextMarker from the previous - // response, which is the ID of the first hosted zone that Amazon Route 53 will - // return if you submit another request. - // - // If the value of IsTruncated in the previous response was false, there are - // no more hosted zones to get. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // (Optional) The maximum number of hosted zones that you want Amazon Route - // 53 to return. If you have more than maxitems hosted zones, the value of IsTruncated - // in the response is true, and the value of NextMarker is the hosted zone ID - // of the first hosted zone that Route 53 will return if you submit another - // request. - MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` -} - -// String returns the string representation -func (s ListHostedZonesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListHostedZonesInput) GoString() string { - return s.String() -} - -// SetDelegationSetId sets the DelegationSetId field's value. -func (s *ListHostedZonesInput) SetDelegationSetId(v string) *ListHostedZonesInput { - s.DelegationSetId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListHostedZonesInput) SetMarker(v string) *ListHostedZonesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListHostedZonesInput) SetMaxItems(v string) *ListHostedZonesInput { - s.MaxItems = &v - return s -} - -type ListHostedZonesOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains general information about the hosted zone. - // - // HostedZones is a required field - HostedZones []*HostedZone `locationNameList:"HostedZone" type:"list" required:"true"` - - // A flag indicating whether there are more hosted zones to be listed. If the - // response was truncated, you can get more hosted zones by submitting another - // ListHostedZones request and specifying the value of NextMarker in the marker - // parameter. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // For the second and subsequent calls to ListHostedZones, Marker is the value - // that you specified for the marker parameter in the request that produced - // the current response. - // - // Marker is a required field - Marker *string `type:"string" required:"true"` - - // The value that you specified for the maxitems parameter in the call to ListHostedZones - // that produced the current response. - // - // MaxItems is a required field - MaxItems *string `type:"string" required:"true"` - - // If IsTruncated is true, the value of NextMarker identifies the first hosted - // zone in the next group of hosted zones. Submit another ListHostedZones request, - // and specify the value of NextMarker from the response in the marker parameter. - // - // This element is present only if IsTruncated is true. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s ListHostedZonesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListHostedZonesOutput) GoString() string { - return s.String() -} - -// SetHostedZones sets the HostedZones field's value. -func (s *ListHostedZonesOutput) SetHostedZones(v []*HostedZone) *ListHostedZonesOutput { - s.HostedZones = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListHostedZonesOutput) SetIsTruncated(v bool) *ListHostedZonesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListHostedZonesOutput) SetMarker(v string) *ListHostedZonesOutput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListHostedZonesOutput) SetMaxItems(v string) *ListHostedZonesOutput { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListHostedZonesOutput) SetNextMarker(v string) *ListHostedZonesOutput { - s.NextMarker = &v - return s -} - -type ListQueryLoggingConfigsInput struct { - _ struct{} `type:"structure"` - - // (Optional) If you want to list the query logging configuration that is associated - // with a hosted zone, specify the ID in HostedZoneId. - // - // If you don't specify a hosted zone ID, ListQueryLoggingConfigs returns all - // of the configurations that are associated with the current AWS account. - HostedZoneId *string `location:"querystring" locationName:"hostedzoneid" type:"string"` - - // (Optional) The maximum number of query logging configurations that you want - // Amazon Route 53 to return in response to the current request. If the current - // AWS account has more than MaxResults configurations, use the value of ListQueryLoggingConfigsResponse$NextToken - // in the response to get the next page of results. - // - // If you don't specify a value for MaxResults, Route 53 returns up to 100 configurations. - MaxResults *string `location:"querystring" locationName:"maxresults" type:"string"` - - // (Optional) If the current AWS account has more than MaxResults query logging - // configurations, use NextToken to get the second and subsequent pages of results. - // - // For the first ListQueryLoggingConfigs request, omit this value. - // - // For the second and subsequent requests, get the value of NextToken from the - // previous response and specify that value for NextToken in the request. - NextToken *string `location:"querystring" locationName:"nexttoken" type:"string"` -} - -// String returns the string representation -func (s ListQueryLoggingConfigsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListQueryLoggingConfigsInput) GoString() string { - return s.String() -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *ListQueryLoggingConfigsInput) SetHostedZoneId(v string) *ListQueryLoggingConfigsInput { - s.HostedZoneId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListQueryLoggingConfigsInput) SetMaxResults(v string) *ListQueryLoggingConfigsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListQueryLoggingConfigsInput) SetNextToken(v string) *ListQueryLoggingConfigsInput { - s.NextToken = &v - return s -} - -type ListQueryLoggingConfigsOutput struct { - _ struct{} `type:"structure"` - - // If a response includes the last of the query logging configurations that - // are associated with the current AWS account, NextToken doesn't appear in - // the response. - // - // If a response doesn't include the last of the configurations, you can get - // more configurations by submitting another ListQueryLoggingConfigs request. - // Get the value of NextToken that Amazon Route 53 returned in the previous - // response and include it in NextToken in the next request. - NextToken *string `type:"string"` - - // An array that contains one QueryLoggingConfig element for each configuration - // for DNS query logging that is associated with the current AWS account. - // - // QueryLoggingConfigs is a required field - QueryLoggingConfigs []*QueryLoggingConfig `locationNameList:"QueryLoggingConfig" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListQueryLoggingConfigsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListQueryLoggingConfigsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListQueryLoggingConfigsOutput) SetNextToken(v string) *ListQueryLoggingConfigsOutput { - s.NextToken = &v - return s -} - -// SetQueryLoggingConfigs sets the QueryLoggingConfigs field's value. -func (s *ListQueryLoggingConfigsOutput) SetQueryLoggingConfigs(v []*QueryLoggingConfig) *ListQueryLoggingConfigsOutput { - s.QueryLoggingConfigs = v - return s -} - -// A request for the resource record sets that are associated with a specified -// hosted zone. -type ListResourceRecordSetsInput struct { - _ struct{} `type:"structure"` - - // The ID of the hosted zone that contains the resource record sets that you - // want to list. - // - // HostedZoneId is a required field - HostedZoneId *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // (Optional) The maximum number of resource records sets to include in the - // response body for this request. If the response includes more than maxitems - // resource record sets, the value of the IsTruncated element in the response - // is true, and the values of the NextRecordName and NextRecordType elements - // in the response identify the first resource record set in the next group - // of maxitems resource record sets. - MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` - - // Weighted resource record sets only: If results were truncated for a given - // DNS name and type, specify the value of NextRecordIdentifier from the previous - // response to get the next resource record set that has the current DNS name - // and type. - StartRecordIdentifier *string `location:"querystring" locationName:"identifier" min:"1" type:"string"` - - // The first name in the lexicographic ordering of resource record sets that - // you want to list. - StartRecordName *string `location:"querystring" locationName:"name" type:"string"` - - // The type of resource record set to begin the record listing from. - // - // Valid values for basic resource record sets: A | AAAA | CAA | CNAME | MX - // | NAPTR | NS | PTR | SOA | SPF | SRV | TXT - // - // Values for weighted, latency, geolocation, and failover resource record sets: - // A | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT - // - // Values for alias resource record sets: - // - // * CloudFront distribution: A or AAAA - // - // * Elastic Beanstalk environment that has a regionalized subdomain: A - // - // * ELB load balancer: A | AAAA - // - // * Amazon S3 bucket: A - // - // * Another resource record set in this hosted zone: The type of the resource - // record set that the alias references. - // - // Constraint: Specifying type without specifying name returns an InvalidInput - // error. - StartRecordType *string `location:"querystring" locationName:"type" type:"string" enum:"RRType"` -} - -// String returns the string representation -func (s ListResourceRecordSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourceRecordSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResourceRecordSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResourceRecordSetsInput"} - if s.HostedZoneId == nil { - invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) - } - if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) - } - if s.StartRecordIdentifier != nil && len(*s.StartRecordIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StartRecordIdentifier", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *ListResourceRecordSetsInput) SetHostedZoneId(v string) *ListResourceRecordSetsInput { - s.HostedZoneId = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListResourceRecordSetsInput) SetMaxItems(v string) *ListResourceRecordSetsInput { - s.MaxItems = &v - return s -} - -// SetStartRecordIdentifier sets the StartRecordIdentifier field's value. -func (s *ListResourceRecordSetsInput) SetStartRecordIdentifier(v string) *ListResourceRecordSetsInput { - s.StartRecordIdentifier = &v - return s -} - -// SetStartRecordName sets the StartRecordName field's value. -func (s *ListResourceRecordSetsInput) SetStartRecordName(v string) *ListResourceRecordSetsInput { - s.StartRecordName = &v - return s -} - -// SetStartRecordType sets the StartRecordType field's value. -func (s *ListResourceRecordSetsInput) SetStartRecordType(v string) *ListResourceRecordSetsInput { - s.StartRecordType = &v - return s -} - -// A complex type that contains list information for the resource record set. -type ListResourceRecordSetsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether more resource record sets remain to be listed. - // If your results were truncated, you can make a follow-up pagination request - // by using the NextRecordName element. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // The maximum number of records you requested. - // - // MaxItems is a required field - MaxItems *string `type:"string" required:"true"` - - // Resource record sets that have a routing policy other than simple: If results - // were truncated for a given DNS name and type, the value of SetIdentifier - // for the next resource record set that has the current DNS name and type. - // - // For information about routing policies, see Choosing a Routing Policy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html) - // in the Amazon Route 53 Developer Guide. - NextRecordIdentifier *string `min:"1" type:"string"` - - // If the results were truncated, the name of the next record in the list. - // - // This element is present only if IsTruncated is true. - NextRecordName *string `type:"string"` - - // If the results were truncated, the type of the next record in the list. - // - // This element is present only if IsTruncated is true. - NextRecordType *string `type:"string" enum:"RRType"` - - // Information about multiple resource record sets. - // - // ResourceRecordSets is a required field - ResourceRecordSets []*ResourceRecordSet `locationNameList:"ResourceRecordSet" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListResourceRecordSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourceRecordSetsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListResourceRecordSetsOutput) SetIsTruncated(v bool) *ListResourceRecordSetsOutput { - s.IsTruncated = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListResourceRecordSetsOutput) SetMaxItems(v string) *ListResourceRecordSetsOutput { - s.MaxItems = &v - return s -} - -// SetNextRecordIdentifier sets the NextRecordIdentifier field's value. -func (s *ListResourceRecordSetsOutput) SetNextRecordIdentifier(v string) *ListResourceRecordSetsOutput { - s.NextRecordIdentifier = &v - return s -} - -// SetNextRecordName sets the NextRecordName field's value. -func (s *ListResourceRecordSetsOutput) SetNextRecordName(v string) *ListResourceRecordSetsOutput { - s.NextRecordName = &v - return s -} - -// SetNextRecordType sets the NextRecordType field's value. -func (s *ListResourceRecordSetsOutput) SetNextRecordType(v string) *ListResourceRecordSetsOutput { - s.NextRecordType = &v - return s -} - -// SetResourceRecordSets sets the ResourceRecordSets field's value. -func (s *ListResourceRecordSetsOutput) SetResourceRecordSets(v []*ResourceRecordSet) *ListResourceRecordSetsOutput { - s.ResourceRecordSets = v - return s -} - -// A request to get a list of the reusable delegation sets that are associated -// with the current AWS account. -type ListReusableDelegationSetsInput struct { - _ struct{} `type:"structure"` - - // If the value of IsTruncated in the previous response was true, you have more - // reusable delegation sets. To get another group, submit another ListReusableDelegationSets - // request. - // - // For the value of marker, specify the value of NextMarker from the previous - // response, which is the ID of the first reusable delegation set that Amazon - // Route 53 will return if you submit another request. - // - // If the value of IsTruncated in the previous response was false, there are - // no more reusable delegation sets to get. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // The number of reusable delegation sets that you want Amazon Route 53 to return - // in the response to this request. If you specify a value greater than 100, - // Route 53 returns only the first 100 reusable delegation sets. - MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` -} - -// String returns the string representation -func (s ListReusableDelegationSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListReusableDelegationSetsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListReusableDelegationSetsInput) SetMarker(v string) *ListReusableDelegationSetsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListReusableDelegationSetsInput) SetMaxItems(v string) *ListReusableDelegationSetsInput { - s.MaxItems = &v - return s -} - -// A complex type that contains information about the reusable delegation sets -// that are associated with the current AWS account. -type ListReusableDelegationSetsOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains one DelegationSet element for each reusable - // delegation set that was created by the current AWS account. - // - // DelegationSets is a required field - DelegationSets []*DelegationSet `locationNameList:"DelegationSet" type:"list" required:"true"` - - // A flag that indicates whether there are more reusable delegation sets to - // be listed. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // For the second and subsequent calls to ListReusableDelegationSets, Marker - // is the value that you specified for the marker parameter in the request that - // produced the current response. - // - // Marker is a required field - Marker *string `type:"string" required:"true"` - - // The value that you specified for the maxitems parameter in the call to ListReusableDelegationSets - // that produced the current response. - // - // MaxItems is a required field - MaxItems *string `type:"string" required:"true"` - - // If IsTruncated is true, the value of NextMarker identifies the next reusable - // delegation set that Amazon Route 53 will return if you submit another ListReusableDelegationSets - // request and specify the value of NextMarker in the marker parameter. - NextMarker *string `type:"string"` -} - -// String returns the string representation -func (s ListReusableDelegationSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListReusableDelegationSetsOutput) GoString() string { - return s.String() -} - -// SetDelegationSets sets the DelegationSets field's value. -func (s *ListReusableDelegationSetsOutput) SetDelegationSets(v []*DelegationSet) *ListReusableDelegationSetsOutput { - s.DelegationSets = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListReusableDelegationSetsOutput) SetIsTruncated(v bool) *ListReusableDelegationSetsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListReusableDelegationSetsOutput) SetMarker(v string) *ListReusableDelegationSetsOutput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListReusableDelegationSetsOutput) SetMaxItems(v string) *ListReusableDelegationSetsOutput { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListReusableDelegationSetsOutput) SetNextMarker(v string) *ListReusableDelegationSetsOutput { - s.NextMarker = &v - return s -} - -// A complex type containing information about a request for a list of the tags -// that are associated with an individual resource. -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The ID of the resource for which you want to retrieve tags. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"ResourceId" type:"string" required:"true"` - - // The type of the resource. - // - // * The resource type for health checks is healthcheck. - // - // * The resource type for hosted zones is hostedzone. - // - // ResourceType is a required field - ResourceType *string `location:"uri" locationName:"ResourceType" type:"string" required:"true" enum:"TagResourceType"` -} - -// 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.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - if s.ResourceType != nil && len(*s.ResourceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *ListTagsForResourceInput) SetResourceId(v string) *ListTagsForResourceInput { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ListTagsForResourceInput) SetResourceType(v string) *ListTagsForResourceInput { - s.ResourceType = &v - return s -} - -// A complex type that contains information about the health checks or hosted -// zones for which you want to list tags. -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // A ResourceTagSet containing tags associated with the specified resource. - // - // ResourceTagSet is a required field - ResourceTagSet *ResourceTagSet `type:"structure" required:"true"` -} - -// 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() -} - -// SetResourceTagSet sets the ResourceTagSet field's value. -func (s *ListTagsForResourceOutput) SetResourceTagSet(v *ResourceTagSet) *ListTagsForResourceOutput { - s.ResourceTagSet = v - return s -} - -// A complex type that contains information about the health checks or hosted -// zones for which you want to list tags. -type ListTagsForResourcesInput struct { - _ struct{} `locationName:"ListTagsForResourcesRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // A complex type that contains the ResourceId element for each resource for - // which you want to get a list of tags. - // - // ResourceIds is a required field - ResourceIds []*string `locationNameList:"ResourceId" min:"1" type:"list" required:"true"` - - // The type of the resources. - // - // * The resource type for health checks is healthcheck. - // - // * The resource type for hosted zones is hostedzone. - // - // ResourceType is a required field - ResourceType *string `location:"uri" locationName:"ResourceType" type:"string" required:"true" enum:"TagResourceType"` -} - -// String returns the string representation -func (s ListTagsForResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourcesInput"} - if s.ResourceIds == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceIds")) - } - if s.ResourceIds != nil && len(s.ResourceIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceIds", 1)) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - if s.ResourceType != nil && len(*s.ResourceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceIds sets the ResourceIds field's value. -func (s *ListTagsForResourcesInput) SetResourceIds(v []*string) *ListTagsForResourcesInput { - s.ResourceIds = v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ListTagsForResourcesInput) SetResourceType(v string) *ListTagsForResourcesInput { - s.ResourceType = &v - return s -} - -// A complex type containing tags for the specified resources. -type ListTagsForResourcesOutput struct { - _ struct{} `type:"structure"` - - // A list of ResourceTagSets containing tags associated with the specified resources. - // - // ResourceTagSets is a required field - ResourceTagSets []*ResourceTagSet `locationNameList:"ResourceTagSet" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListTagsForResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourcesOutput) GoString() string { - return s.String() -} - -// SetResourceTagSets sets the ResourceTagSets field's value. -func (s *ListTagsForResourcesOutput) SetResourceTagSets(v []*ResourceTagSet) *ListTagsForResourcesOutput { - s.ResourceTagSets = v - return s -} - -// A complex type that contains the information about the request to list the -// traffic policies that are associated with the current AWS account. -type ListTrafficPoliciesInput struct { - _ struct{} `type:"structure"` - - // (Optional) The maximum number of traffic policies that you want Amazon Route - // 53 to return in response to this request. If you have more than MaxItems - // traffic policies, the value of IsTruncated in the response is true, and the - // value of TrafficPolicyIdMarker is the ID of the first traffic policy that - // Route 53 will return if you submit another request. - MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` - - // (Conditional) For your first request to ListTrafficPolicies, don't include - // the TrafficPolicyIdMarker parameter. - // - // If you have more traffic policies than the value of MaxItems, ListTrafficPolicies - // returns only the first MaxItems traffic policies. To get the next group of - // policies, submit another request to ListTrafficPolicies. For the value of - // TrafficPolicyIdMarker, specify the value of TrafficPolicyIdMarker that was - // returned in the previous response. - TrafficPolicyIdMarker *string `location:"querystring" locationName:"trafficpolicyid" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListTrafficPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTrafficPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTrafficPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTrafficPoliciesInput"} - if s.TrafficPolicyIdMarker != nil && len(*s.TrafficPolicyIdMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TrafficPolicyIdMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListTrafficPoliciesInput) SetMaxItems(v string) *ListTrafficPoliciesInput { - s.MaxItems = &v - return s -} - -// SetTrafficPolicyIdMarker sets the TrafficPolicyIdMarker field's value. -func (s *ListTrafficPoliciesInput) SetTrafficPolicyIdMarker(v string) *ListTrafficPoliciesInput { - s.TrafficPolicyIdMarker = &v - return s -} - -// A complex type that contains the response information for the request. -type ListTrafficPoliciesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more traffic policies to be listed. - // If the response was truncated, you can get the next group of traffic policies - // by submitting another ListTrafficPolicies request and specifying the value - // of TrafficPolicyIdMarker in the TrafficPolicyIdMarker request parameter. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // The value that you specified for the MaxItems parameter in the ListTrafficPolicies - // request that produced the current response. - // - // MaxItems is a required field - MaxItems *string `type:"string" required:"true"` - - // If the value of IsTruncated is true, TrafficPolicyIdMarker is the ID of the - // first traffic policy in the next group of MaxItems traffic policies. - // - // TrafficPolicyIdMarker is a required field - TrafficPolicyIdMarker *string `min:"1" type:"string" required:"true"` - - // A list that contains one TrafficPolicySummary element for each traffic policy - // that was created by the current AWS account. - // - // TrafficPolicySummaries is a required field - TrafficPolicySummaries []*TrafficPolicySummary `locationNameList:"TrafficPolicySummary" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListTrafficPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTrafficPoliciesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListTrafficPoliciesOutput) SetIsTruncated(v bool) *ListTrafficPoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListTrafficPoliciesOutput) SetMaxItems(v string) *ListTrafficPoliciesOutput { - s.MaxItems = &v - return s -} - -// SetTrafficPolicyIdMarker sets the TrafficPolicyIdMarker field's value. -func (s *ListTrafficPoliciesOutput) SetTrafficPolicyIdMarker(v string) *ListTrafficPoliciesOutput { - s.TrafficPolicyIdMarker = &v - return s -} - -// SetTrafficPolicySummaries sets the TrafficPolicySummaries field's value. -func (s *ListTrafficPoliciesOutput) SetTrafficPolicySummaries(v []*TrafficPolicySummary) *ListTrafficPoliciesOutput { - s.TrafficPolicySummaries = v - return s -} - -// A request for the traffic policy instances that you created in a specified -// hosted zone. -type ListTrafficPolicyInstancesByHostedZoneInput struct { - _ struct{} `type:"structure"` - - // The ID of the hosted zone that you want to list traffic policy instances - // for. - // - // HostedZoneId is a required field - HostedZoneId *string `location:"querystring" locationName:"id" type:"string" required:"true"` - - // The maximum number of traffic policy instances to be included in the response - // body for this request. If you have more than MaxItems traffic policy instances, - // the value of the IsTruncated element in the response is true, and the values - // of HostedZoneIdMarker, TrafficPolicyInstanceNameMarker, and TrafficPolicyInstanceTypeMarker - // represent the first traffic policy instance that Amazon Route 53 will return - // if you submit another request. - MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` - - // If the value of IsTruncated in the previous response is true, you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstances request. For the value of trafficpolicyinstancename, - // specify the value of TrafficPolicyInstanceNameMarker from the previous response, - // which is the name of the first traffic policy instance in the next group - // of traffic policy instances. - // - // If the value of IsTruncated in the previous response was false, there are - // no more traffic policy instances to get. - TrafficPolicyInstanceNameMarker *string `location:"querystring" locationName:"trafficpolicyinstancename" type:"string"` - - // If the value of IsTruncated in the previous response is true, you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstances request. For the value of trafficpolicyinstancetype, - // specify the value of TrafficPolicyInstanceTypeMarker from the previous response, - // which is the type of the first traffic policy instance in the next group - // of traffic policy instances. - // - // If the value of IsTruncated in the previous response was false, there are - // no more traffic policy instances to get. - TrafficPolicyInstanceTypeMarker *string `location:"querystring" locationName:"trafficpolicyinstancetype" type:"string" enum:"RRType"` -} - -// String returns the string representation -func (s ListTrafficPolicyInstancesByHostedZoneInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTrafficPolicyInstancesByHostedZoneInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTrafficPolicyInstancesByHostedZoneInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTrafficPolicyInstancesByHostedZoneInput"} - if s.HostedZoneId == nil { - invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *ListTrafficPolicyInstancesByHostedZoneInput) SetHostedZoneId(v string) *ListTrafficPolicyInstancesByHostedZoneInput { - s.HostedZoneId = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListTrafficPolicyInstancesByHostedZoneInput) SetMaxItems(v string) *ListTrafficPolicyInstancesByHostedZoneInput { - s.MaxItems = &v - return s -} - -// SetTrafficPolicyInstanceNameMarker sets the TrafficPolicyInstanceNameMarker field's value. -func (s *ListTrafficPolicyInstancesByHostedZoneInput) SetTrafficPolicyInstanceNameMarker(v string) *ListTrafficPolicyInstancesByHostedZoneInput { - s.TrafficPolicyInstanceNameMarker = &v - return s -} - -// SetTrafficPolicyInstanceTypeMarker sets the TrafficPolicyInstanceTypeMarker field's value. -func (s *ListTrafficPolicyInstancesByHostedZoneInput) SetTrafficPolicyInstanceTypeMarker(v string) *ListTrafficPolicyInstancesByHostedZoneInput { - s.TrafficPolicyInstanceTypeMarker = &v - return s -} - -// A complex type that contains the response information for the request. -type ListTrafficPolicyInstancesByHostedZoneOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more traffic policy instances to - // be listed. If the response was truncated, you can get the next group of traffic - // policy instances by submitting another ListTrafficPolicyInstancesByHostedZone - // request and specifying the values of HostedZoneIdMarker, TrafficPolicyInstanceNameMarker, - // and TrafficPolicyInstanceTypeMarker in the corresponding request parameters. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // The value that you specified for the MaxItems parameter in the ListTrafficPolicyInstancesByHostedZone - // request that produced the current response. - // - // MaxItems is a required field - MaxItems *string `type:"string" required:"true"` - - // If IsTruncated is true, TrafficPolicyInstanceNameMarker is the name of the - // first traffic policy instance in the next group of traffic policy instances. - TrafficPolicyInstanceNameMarker *string `type:"string"` - - // If IsTruncated is true, TrafficPolicyInstanceTypeMarker is the DNS type of - // the resource record sets that are associated with the first traffic policy - // instance in the next group of traffic policy instances. - TrafficPolicyInstanceTypeMarker *string `type:"string" enum:"RRType"` - - // A list that contains one TrafficPolicyInstance element for each traffic policy - // instance that matches the elements in the request. - // - // TrafficPolicyInstances is a required field - TrafficPolicyInstances []*TrafficPolicyInstance `locationNameList:"TrafficPolicyInstance" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListTrafficPolicyInstancesByHostedZoneOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTrafficPolicyInstancesByHostedZoneOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListTrafficPolicyInstancesByHostedZoneOutput) SetIsTruncated(v bool) *ListTrafficPolicyInstancesByHostedZoneOutput { - s.IsTruncated = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListTrafficPolicyInstancesByHostedZoneOutput) SetMaxItems(v string) *ListTrafficPolicyInstancesByHostedZoneOutput { - s.MaxItems = &v - return s -} - -// SetTrafficPolicyInstanceNameMarker sets the TrafficPolicyInstanceNameMarker field's value. -func (s *ListTrafficPolicyInstancesByHostedZoneOutput) SetTrafficPolicyInstanceNameMarker(v string) *ListTrafficPolicyInstancesByHostedZoneOutput { - s.TrafficPolicyInstanceNameMarker = &v - return s -} - -// SetTrafficPolicyInstanceTypeMarker sets the TrafficPolicyInstanceTypeMarker field's value. -func (s *ListTrafficPolicyInstancesByHostedZoneOutput) SetTrafficPolicyInstanceTypeMarker(v string) *ListTrafficPolicyInstancesByHostedZoneOutput { - s.TrafficPolicyInstanceTypeMarker = &v - return s -} - -// SetTrafficPolicyInstances sets the TrafficPolicyInstances field's value. -func (s *ListTrafficPolicyInstancesByHostedZoneOutput) SetTrafficPolicyInstances(v []*TrafficPolicyInstance) *ListTrafficPolicyInstancesByHostedZoneOutput { - s.TrafficPolicyInstances = v - return s -} - -// A complex type that contains the information about the request to list your -// traffic policy instances. -type ListTrafficPolicyInstancesByPolicyInput struct { - _ struct{} `type:"structure"` - - // If the value of IsTruncated in the previous response was true, you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstancesByPolicy request. - // - // For the value of hostedzoneid, specify the value of HostedZoneIdMarker from - // the previous response, which is the hosted zone ID of the first traffic policy - // instance that Amazon Route 53 will return if you submit another request. - // - // If the value of IsTruncated in the previous response was false, there are - // no more traffic policy instances to get. - HostedZoneIdMarker *string `location:"querystring" locationName:"hostedzoneid" type:"string"` - - // The maximum number of traffic policy instances to be included in the response - // body for this request. If you have more than MaxItems traffic policy instances, - // the value of the IsTruncated element in the response is true, and the values - // of HostedZoneIdMarker, TrafficPolicyInstanceNameMarker, and TrafficPolicyInstanceTypeMarker - // represent the first traffic policy instance that Amazon Route 53 will return - // if you submit another request. - MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` - - // The ID of the traffic policy for which you want to list traffic policy instances. - // - // TrafficPolicyId is a required field - TrafficPolicyId *string `location:"querystring" locationName:"id" min:"1" type:"string" required:"true"` - - // If the value of IsTruncated in the previous response was true, you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstancesByPolicy request. - // - // For the value of trafficpolicyinstancename, specify the value of TrafficPolicyInstanceNameMarker - // from the previous response, which is the name of the first traffic policy - // instance that Amazon Route 53 will return if you submit another request. - // - // If the value of IsTruncated in the previous response was false, there are - // no more traffic policy instances to get. - TrafficPolicyInstanceNameMarker *string `location:"querystring" locationName:"trafficpolicyinstancename" type:"string"` - - // If the value of IsTruncated in the previous response was true, you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstancesByPolicy request. - // - // For the value of trafficpolicyinstancetype, specify the value of TrafficPolicyInstanceTypeMarker - // from the previous response, which is the name of the first traffic policy - // instance that Amazon Route 53 will return if you submit another request. - // - // If the value of IsTruncated in the previous response was false, there are - // no more traffic policy instances to get. - TrafficPolicyInstanceTypeMarker *string `location:"querystring" locationName:"trafficpolicyinstancetype" type:"string" enum:"RRType"` - - // The version of the traffic policy for which you want to list traffic policy - // instances. The version must be associated with the traffic policy that is - // specified by TrafficPolicyId. - // - // TrafficPolicyVersion is a required field - TrafficPolicyVersion *int64 `location:"querystring" locationName:"version" min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s ListTrafficPolicyInstancesByPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTrafficPolicyInstancesByPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTrafficPolicyInstancesByPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTrafficPolicyInstancesByPolicyInput"} - if s.TrafficPolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("TrafficPolicyId")) - } - if s.TrafficPolicyId != nil && len(*s.TrafficPolicyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TrafficPolicyId", 1)) - } - if s.TrafficPolicyVersion == nil { - invalidParams.Add(request.NewErrParamRequired("TrafficPolicyVersion")) - } - if s.TrafficPolicyVersion != nil && *s.TrafficPolicyVersion < 1 { - invalidParams.Add(request.NewErrParamMinValue("TrafficPolicyVersion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostedZoneIdMarker sets the HostedZoneIdMarker field's value. -func (s *ListTrafficPolicyInstancesByPolicyInput) SetHostedZoneIdMarker(v string) *ListTrafficPolicyInstancesByPolicyInput { - s.HostedZoneIdMarker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListTrafficPolicyInstancesByPolicyInput) SetMaxItems(v string) *ListTrafficPolicyInstancesByPolicyInput { - s.MaxItems = &v - return s -} - -// SetTrafficPolicyId sets the TrafficPolicyId field's value. -func (s *ListTrafficPolicyInstancesByPolicyInput) SetTrafficPolicyId(v string) *ListTrafficPolicyInstancesByPolicyInput { - s.TrafficPolicyId = &v - return s -} - -// SetTrafficPolicyInstanceNameMarker sets the TrafficPolicyInstanceNameMarker field's value. -func (s *ListTrafficPolicyInstancesByPolicyInput) SetTrafficPolicyInstanceNameMarker(v string) *ListTrafficPolicyInstancesByPolicyInput { - s.TrafficPolicyInstanceNameMarker = &v - return s -} - -// SetTrafficPolicyInstanceTypeMarker sets the TrafficPolicyInstanceTypeMarker field's value. -func (s *ListTrafficPolicyInstancesByPolicyInput) SetTrafficPolicyInstanceTypeMarker(v string) *ListTrafficPolicyInstancesByPolicyInput { - s.TrafficPolicyInstanceTypeMarker = &v - return s -} - -// SetTrafficPolicyVersion sets the TrafficPolicyVersion field's value. -func (s *ListTrafficPolicyInstancesByPolicyInput) SetTrafficPolicyVersion(v int64) *ListTrafficPolicyInstancesByPolicyInput { - s.TrafficPolicyVersion = &v - return s -} - -// A complex type that contains the response information for the request. -type ListTrafficPolicyInstancesByPolicyOutput struct { - _ struct{} `type:"structure"` - - // If IsTruncated is true, HostedZoneIdMarker is the ID of the hosted zone of - // the first traffic policy instance in the next group of traffic policy instances. - HostedZoneIdMarker *string `type:"string"` - - // A flag that indicates whether there are more traffic policy instances to - // be listed. If the response was truncated, you can get the next group of traffic - // policy instances by calling ListTrafficPolicyInstancesByPolicy again and - // specifying the values of the HostedZoneIdMarker, TrafficPolicyInstanceNameMarker, - // and TrafficPolicyInstanceTypeMarker elements in the corresponding request - // parameters. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // The value that you specified for the MaxItems parameter in the call to ListTrafficPolicyInstancesByPolicy - // that produced the current response. - // - // MaxItems is a required field - MaxItems *string `type:"string" required:"true"` - - // If IsTruncated is true, TrafficPolicyInstanceNameMarker is the name of the - // first traffic policy instance in the next group of MaxItems traffic policy - // instances. - TrafficPolicyInstanceNameMarker *string `type:"string"` - - // If IsTruncated is true, TrafficPolicyInstanceTypeMarker is the DNS type of - // the resource record sets that are associated with the first traffic policy - // instance in the next group of MaxItems traffic policy instances. - TrafficPolicyInstanceTypeMarker *string `type:"string" enum:"RRType"` - - // A list that contains one TrafficPolicyInstance element for each traffic policy - // instance that matches the elements in the request. - // - // TrafficPolicyInstances is a required field - TrafficPolicyInstances []*TrafficPolicyInstance `locationNameList:"TrafficPolicyInstance" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListTrafficPolicyInstancesByPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTrafficPolicyInstancesByPolicyOutput) GoString() string { - return s.String() -} - -// SetHostedZoneIdMarker sets the HostedZoneIdMarker field's value. -func (s *ListTrafficPolicyInstancesByPolicyOutput) SetHostedZoneIdMarker(v string) *ListTrafficPolicyInstancesByPolicyOutput { - s.HostedZoneIdMarker = &v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListTrafficPolicyInstancesByPolicyOutput) SetIsTruncated(v bool) *ListTrafficPolicyInstancesByPolicyOutput { - s.IsTruncated = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListTrafficPolicyInstancesByPolicyOutput) SetMaxItems(v string) *ListTrafficPolicyInstancesByPolicyOutput { - s.MaxItems = &v - return s -} - -// SetTrafficPolicyInstanceNameMarker sets the TrafficPolicyInstanceNameMarker field's value. -func (s *ListTrafficPolicyInstancesByPolicyOutput) SetTrafficPolicyInstanceNameMarker(v string) *ListTrafficPolicyInstancesByPolicyOutput { - s.TrafficPolicyInstanceNameMarker = &v - return s -} - -// SetTrafficPolicyInstanceTypeMarker sets the TrafficPolicyInstanceTypeMarker field's value. -func (s *ListTrafficPolicyInstancesByPolicyOutput) SetTrafficPolicyInstanceTypeMarker(v string) *ListTrafficPolicyInstancesByPolicyOutput { - s.TrafficPolicyInstanceTypeMarker = &v - return s -} - -// SetTrafficPolicyInstances sets the TrafficPolicyInstances field's value. -func (s *ListTrafficPolicyInstancesByPolicyOutput) SetTrafficPolicyInstances(v []*TrafficPolicyInstance) *ListTrafficPolicyInstancesByPolicyOutput { - s.TrafficPolicyInstances = v - return s -} - -// A request to get information about the traffic policy instances that you -// created by using the current AWS account. -type ListTrafficPolicyInstancesInput struct { - _ struct{} `type:"structure"` - - // If the value of IsTruncated in the previous response was true, you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstances request. For the value of HostedZoneId, specify - // the value of HostedZoneIdMarker from the previous response, which is the - // hosted zone ID of the first traffic policy instance in the next group of - // traffic policy instances. - // - // If the value of IsTruncated in the previous response was false, there are - // no more traffic policy instances to get. - HostedZoneIdMarker *string `location:"querystring" locationName:"hostedzoneid" type:"string"` - - // The maximum number of traffic policy instances that you want Amazon Route - // 53 to return in response to a ListTrafficPolicyInstances request. If you - // have more than MaxItems traffic policy instances, the value of the IsTruncated - // element in the response is true, and the values of HostedZoneIdMarker, TrafficPolicyInstanceNameMarker, - // and TrafficPolicyInstanceTypeMarker represent the first traffic policy instance - // in the next group of MaxItems traffic policy instances. - MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` - - // If the value of IsTruncated in the previous response was true, you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstances request. For the value of trafficpolicyinstancename, - // specify the value of TrafficPolicyInstanceNameMarker from the previous response, - // which is the name of the first traffic policy instance in the next group - // of traffic policy instances. - // - // If the value of IsTruncated in the previous response was false, there are - // no more traffic policy instances to get. - TrafficPolicyInstanceNameMarker *string `location:"querystring" locationName:"trafficpolicyinstancename" type:"string"` - - // If the value of IsTruncated in the previous response was true, you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstances request. For the value of trafficpolicyinstancetype, - // specify the value of TrafficPolicyInstanceTypeMarker from the previous response, - // which is the type of the first traffic policy instance in the next group - // of traffic policy instances. - // - // If the value of IsTruncated in the previous response was false, there are - // no more traffic policy instances to get. - TrafficPolicyInstanceTypeMarker *string `location:"querystring" locationName:"trafficpolicyinstancetype" type:"string" enum:"RRType"` -} - -// String returns the string representation -func (s ListTrafficPolicyInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTrafficPolicyInstancesInput) GoString() string { - return s.String() -} - -// SetHostedZoneIdMarker sets the HostedZoneIdMarker field's value. -func (s *ListTrafficPolicyInstancesInput) SetHostedZoneIdMarker(v string) *ListTrafficPolicyInstancesInput { - s.HostedZoneIdMarker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListTrafficPolicyInstancesInput) SetMaxItems(v string) *ListTrafficPolicyInstancesInput { - s.MaxItems = &v - return s -} - -// SetTrafficPolicyInstanceNameMarker sets the TrafficPolicyInstanceNameMarker field's value. -func (s *ListTrafficPolicyInstancesInput) SetTrafficPolicyInstanceNameMarker(v string) *ListTrafficPolicyInstancesInput { - s.TrafficPolicyInstanceNameMarker = &v - return s -} - -// SetTrafficPolicyInstanceTypeMarker sets the TrafficPolicyInstanceTypeMarker field's value. -func (s *ListTrafficPolicyInstancesInput) SetTrafficPolicyInstanceTypeMarker(v string) *ListTrafficPolicyInstancesInput { - s.TrafficPolicyInstanceTypeMarker = &v - return s -} - -// A complex type that contains the response information for the request. -type ListTrafficPolicyInstancesOutput struct { - _ struct{} `type:"structure"` - - // If IsTruncated is true, HostedZoneIdMarker is the ID of the hosted zone of - // the first traffic policy instance that Route 53 will return if you submit - // another ListTrafficPolicyInstances request. - HostedZoneIdMarker *string `type:"string"` - - // A flag that indicates whether there are more traffic policy instances to - // be listed. If the response was truncated, you can get more traffic policy - // instances by calling ListTrafficPolicyInstances again and specifying the - // values of the HostedZoneIdMarker, TrafficPolicyInstanceNameMarker, and TrafficPolicyInstanceTypeMarker - // in the corresponding request parameters. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // The value that you specified for the MaxItems parameter in the call to ListTrafficPolicyInstances - // that produced the current response. - // - // MaxItems is a required field - MaxItems *string `type:"string" required:"true"` - - // If IsTruncated is true, TrafficPolicyInstanceNameMarker is the name of the - // first traffic policy instance that Route 53 will return if you submit another - // ListTrafficPolicyInstances request. - TrafficPolicyInstanceNameMarker *string `type:"string"` - - // If IsTruncated is true, TrafficPolicyInstanceTypeMarker is the DNS type of - // the resource record sets that are associated with the first traffic policy - // instance that Amazon Route 53 will return if you submit another ListTrafficPolicyInstances - // request. - TrafficPolicyInstanceTypeMarker *string `type:"string" enum:"RRType"` - - // A list that contains one TrafficPolicyInstance element for each traffic policy - // instance that matches the elements in the request. - // - // TrafficPolicyInstances is a required field - TrafficPolicyInstances []*TrafficPolicyInstance `locationNameList:"TrafficPolicyInstance" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListTrafficPolicyInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTrafficPolicyInstancesOutput) GoString() string { - return s.String() -} - -// SetHostedZoneIdMarker sets the HostedZoneIdMarker field's value. -func (s *ListTrafficPolicyInstancesOutput) SetHostedZoneIdMarker(v string) *ListTrafficPolicyInstancesOutput { - s.HostedZoneIdMarker = &v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListTrafficPolicyInstancesOutput) SetIsTruncated(v bool) *ListTrafficPolicyInstancesOutput { - s.IsTruncated = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListTrafficPolicyInstancesOutput) SetMaxItems(v string) *ListTrafficPolicyInstancesOutput { - s.MaxItems = &v - return s -} - -// SetTrafficPolicyInstanceNameMarker sets the TrafficPolicyInstanceNameMarker field's value. -func (s *ListTrafficPolicyInstancesOutput) SetTrafficPolicyInstanceNameMarker(v string) *ListTrafficPolicyInstancesOutput { - s.TrafficPolicyInstanceNameMarker = &v - return s -} - -// SetTrafficPolicyInstanceTypeMarker sets the TrafficPolicyInstanceTypeMarker field's value. -func (s *ListTrafficPolicyInstancesOutput) SetTrafficPolicyInstanceTypeMarker(v string) *ListTrafficPolicyInstancesOutput { - s.TrafficPolicyInstanceTypeMarker = &v - return s -} - -// SetTrafficPolicyInstances sets the TrafficPolicyInstances field's value. -func (s *ListTrafficPolicyInstancesOutput) SetTrafficPolicyInstances(v []*TrafficPolicyInstance) *ListTrafficPolicyInstancesOutput { - s.TrafficPolicyInstances = v - return s -} - -// A complex type that contains the information about the request to list your -// traffic policies. -type ListTrafficPolicyVersionsInput struct { - _ struct{} `type:"structure"` - - // Specify the value of Id of the traffic policy for which you want to list - // all versions. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" min:"1" type:"string" required:"true"` - - // The maximum number of traffic policy versions that you want Amazon Route - // 53 to include in the response body for this request. If the specified traffic - // policy has more than MaxItems versions, the value of IsTruncated in the response - // is true, and the value of the TrafficPolicyVersionMarker element is the ID - // of the first version that Route 53 will return if you submit another request. - MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` - - // For your first request to ListTrafficPolicyVersions, don't include the TrafficPolicyVersionMarker - // parameter. - // - // If you have more traffic policy versions than the value of MaxItems, ListTrafficPolicyVersions - // returns only the first group of MaxItems versions. To get more traffic policy - // versions, submit another ListTrafficPolicyVersions request. For the value - // of TrafficPolicyVersionMarker, specify the value of TrafficPolicyVersionMarker - // in the previous response. - TrafficPolicyVersionMarker *string `location:"querystring" locationName:"trafficpolicyversion" type:"string"` -} - -// String returns the string representation -func (s ListTrafficPolicyVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTrafficPolicyVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTrafficPolicyVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTrafficPolicyVersionsInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *ListTrafficPolicyVersionsInput) SetId(v string) *ListTrafficPolicyVersionsInput { - s.Id = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListTrafficPolicyVersionsInput) SetMaxItems(v string) *ListTrafficPolicyVersionsInput { - s.MaxItems = &v - return s -} - -// SetTrafficPolicyVersionMarker sets the TrafficPolicyVersionMarker field's value. -func (s *ListTrafficPolicyVersionsInput) SetTrafficPolicyVersionMarker(v string) *ListTrafficPolicyVersionsInput { - s.TrafficPolicyVersionMarker = &v - return s -} - -// A complex type that contains the response information for the request. -type ListTrafficPolicyVersionsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more traffic policies to be listed. - // If the response was truncated, you can get the next group of traffic policies - // by submitting another ListTrafficPolicyVersions request and specifying the - // value of NextMarker in the marker parameter. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // The value that you specified for the maxitems parameter in the ListTrafficPolicyVersions - // request that produced the current response. - // - // MaxItems is a required field - MaxItems *string `type:"string" required:"true"` - - // A list that contains one TrafficPolicy element for each traffic policy version - // that is associated with the specified traffic policy. - // - // TrafficPolicies is a required field - TrafficPolicies []*TrafficPolicy `locationNameList:"TrafficPolicy" type:"list" required:"true"` - - // If IsTruncated is true, the value of TrafficPolicyVersionMarker identifies - // the first traffic policy that Amazon Route 53 will return if you submit another - // request. Call ListTrafficPolicyVersions again and specify the value of TrafficPolicyVersionMarker - // in the TrafficPolicyVersionMarker request parameter. - // - // This element is present only if IsTruncated is true. - // - // TrafficPolicyVersionMarker is a required field - TrafficPolicyVersionMarker *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTrafficPolicyVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTrafficPolicyVersionsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListTrafficPolicyVersionsOutput) SetIsTruncated(v bool) *ListTrafficPolicyVersionsOutput { - s.IsTruncated = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListTrafficPolicyVersionsOutput) SetMaxItems(v string) *ListTrafficPolicyVersionsOutput { - s.MaxItems = &v - return s -} - -// SetTrafficPolicies sets the TrafficPolicies field's value. -func (s *ListTrafficPolicyVersionsOutput) SetTrafficPolicies(v []*TrafficPolicy) *ListTrafficPolicyVersionsOutput { - s.TrafficPolicies = v - return s -} - -// SetTrafficPolicyVersionMarker sets the TrafficPolicyVersionMarker field's value. -func (s *ListTrafficPolicyVersionsOutput) SetTrafficPolicyVersionMarker(v string) *ListTrafficPolicyVersionsOutput { - s.TrafficPolicyVersionMarker = &v - return s -} - -// A complex type that contains information about that can be associated with -// your hosted zone. -type ListVPCAssociationAuthorizationsInput struct { - _ struct{} `type:"structure"` - - // The ID of the hosted zone for which you want a list of VPCs that can be associated - // with the hosted zone. - // - // HostedZoneId is a required field - HostedZoneId *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // Optional: An integer that specifies the maximum number of VPCs that you want - // Amazon Route 53 to return. If you don't specify a value for MaxResults, Route - // 53 returns up to 50 VPCs per page. - MaxResults *string `location:"querystring" locationName:"maxresults" type:"string"` - - // Optional: If a response includes a NextToken element, there are more VPCs - // that can be associated with the specified hosted zone. To get the next page - // of results, submit another request, and include the value of NextToken from - // the response in the nexttoken parameter in another ListVPCAssociationAuthorizations - // request. - NextToken *string `location:"querystring" locationName:"nexttoken" type:"string"` -} - -// String returns the string representation -func (s ListVPCAssociationAuthorizationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVPCAssociationAuthorizationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListVPCAssociationAuthorizationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListVPCAssociationAuthorizationsInput"} - if s.HostedZoneId == nil { - invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) - } - if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *ListVPCAssociationAuthorizationsInput) SetHostedZoneId(v string) *ListVPCAssociationAuthorizationsInput { - s.HostedZoneId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListVPCAssociationAuthorizationsInput) SetMaxResults(v string) *ListVPCAssociationAuthorizationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListVPCAssociationAuthorizationsInput) SetNextToken(v string) *ListVPCAssociationAuthorizationsInput { - s.NextToken = &v - return s -} - -// A complex type that contains the response information for the request. -type ListVPCAssociationAuthorizationsOutput struct { - _ struct{} `type:"structure"` - - // The ID of the hosted zone that you can associate the listed VPCs with. - // - // HostedZoneId is a required field - HostedZoneId *string `type:"string" required:"true"` - - // When the response includes a NextToken element, there are more VPCs that - // can be associated with the specified hosted zone. To get the next page of - // VPCs, submit another ListVPCAssociationAuthorizations request, and include - // the value of the NextToken element from the response in the nexttoken request - // parameter. - NextToken *string `type:"string"` - - // The list of VPCs that are authorized to be associated with the specified - // hosted zone. - // - // VPCs is a required field - VPCs []*VPC `locationNameList:"VPC" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListVPCAssociationAuthorizationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVPCAssociationAuthorizationsOutput) GoString() string { - return s.String() -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *ListVPCAssociationAuthorizationsOutput) SetHostedZoneId(v string) *ListVPCAssociationAuthorizationsOutput { - s.HostedZoneId = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListVPCAssociationAuthorizationsOutput) SetNextToken(v string) *ListVPCAssociationAuthorizationsOutput { - s.NextToken = &v - return s -} - -// SetVPCs sets the VPCs field's value. -func (s *ListVPCAssociationAuthorizationsOutput) SetVPCs(v []*VPC) *ListVPCAssociationAuthorizationsOutput { - s.VPCs = v - return s -} - -// A complex type that contains information about a configuration for DNS query -// logging. -type QueryLoggingConfig struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the CloudWatch Logs log group that Amazon - // Route 53 is publishing logs to. - // - // CloudWatchLogsLogGroupArn is a required field - CloudWatchLogsLogGroupArn *string `type:"string" required:"true"` - - // The ID of the hosted zone that CloudWatch Logs is logging queries for. - // - // HostedZoneId is a required field - HostedZoneId *string `type:"string" required:"true"` - - // The ID for a configuration for DNS query logging. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s QueryLoggingConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s QueryLoggingConfig) GoString() string { - return s.String() -} - -// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value. -func (s *QueryLoggingConfig) SetCloudWatchLogsLogGroupArn(v string) *QueryLoggingConfig { - s.CloudWatchLogsLogGroupArn = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *QueryLoggingConfig) SetHostedZoneId(v string) *QueryLoggingConfig { - s.HostedZoneId = &v - return s -} - -// SetId sets the Id field's value. -func (s *QueryLoggingConfig) SetId(v string) *QueryLoggingConfig { - s.Id = &v - return s -} - -// Information specific to the resource record. -// -// If you're creating an alias resource record set, omit ResourceRecord. -type ResourceRecord struct { - _ struct{} `type:"structure"` - - // The current or new DNS record value, not to exceed 4,000 characters. In the - // case of a DELETE action, if the current value does not match the actual value, - // an error is returned. For descriptions about how to format Value for different - // record types, see Supported DNS Resource Record Types (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html) - // in the Amazon Route 53 Developer Guide. - // - // You can specify more than one value for all record types except CNAME and - // SOA. - // - // If you're creating an alias resource record set, omit Value. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ResourceRecord) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceRecord) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceRecord) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceRecord"} - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetValue sets the Value field's value. -func (s *ResourceRecord) SetValue(v string) *ResourceRecord { - s.Value = &v - return s -} - -// Information about the resource record set to create or delete. -type ResourceRecordSet struct { - _ struct{} `type:"structure"` - - // Alias resource record sets only: Information about the CloudFront distribution, - // AWS Elastic Beanstalk environment, ELB load balancer, Amazon S3 bucket, or - // Amazon Route 53 resource record set to which you're redirecting queries. - // The AWS Elastic Beanstalk environment must have a regionalized subdomain. - // - // If you're creating resource records sets for a private hosted zone, note - // the following: - // - // * You can't create alias resource record sets for CloudFront distributions - // in a private hosted zone. - // - // * Creating geolocation alias resource record sets or latency alias resource - // record sets in a private hosted zone is unsupported. - // - // * For information about creating failover resource record sets in a private - // hosted zone, see Configuring Failover in a Private Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) - // in the Amazon Route 53 Developer Guide. - AliasTarget *AliasTarget `type:"structure"` - - // Failover resource record sets only: To configure failover, you add the Failover - // element to two resource record sets. For one resource record set, you specify - // PRIMARY as the value for Failover; for the other resource record set, you - // specify SECONDARY. In addition, you include the HealthCheckId element and - // specify the health check that you want Amazon Route 53 to perform for each - // resource record set. - // - // Except where noted, the following failover behaviors assume that you have - // included the HealthCheckId element in both resource record sets: - // - // * When the primary resource record set is healthy, Route 53 responds to - // DNS queries with the applicable value from the primary resource record - // set regardless of the health of the secondary resource record set. - // - // * When the primary resource record set is unhealthy and the secondary - // resource record set is healthy, Route 53 responds to DNS queries with - // the applicable value from the secondary resource record set. - // - // * When the secondary resource record set is unhealthy, Route 53 responds - // to DNS queries with the applicable value from the primary resource record - // set regardless of the health of the primary resource record set. - // - // * If you omit the HealthCheckId element for the secondary resource record - // set, and if the primary resource record set is unhealthy, Route 53 always - // responds to DNS queries with the applicable value from the secondary resource - // record set. This is true regardless of the health of the associated endpoint. - // - // You can't create non-failover resource record sets that have the same values - // for the Name and Type elements as failover resource record sets. - // - // For failover alias resource record sets, you must also include the EvaluateTargetHealth - // element and set the value to true. - // - // For more information about configuring failover for Route 53, see the following - // topics in the Amazon Route 53 Developer Guide: - // - // * Route 53 Health Checks and DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) - // - // * Configuring Failover in a Private Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) - Failover *string `type:"string" enum:"ResourceRecordSetFailover"` - - // Geolocation resource record sets only: A complex type that lets you control - // how Amazon Route 53 responds to DNS queries based on the geographic origin - // of the query. For example, if you want all queries from Africa to be routed - // to a web server with an IP address of 192.0.2.111, create a resource record - // set with a Type of A and a ContinentCode of AF. - // - // Creating geolocation and geolocation alias resource record sets in private - // hosted zones is not supported. - // - // If you create separate resource record sets for overlapping geographic regions - // (for example, one resource record set for a continent and one for a country - // on the same continent), priority goes to the smallest geographic region. - // This allows you to route most queries for a continent to one resource and - // to route queries for a country on that continent to a different resource. - // - // You can't create two geolocation resource record sets that specify the same - // geographic location. - // - // The value * in the CountryCode element matches all geographic locations that - // aren't specified in other geolocation resource record sets that have the - // same values for the Name and Type elements. - // - // Geolocation works by mapping IP addresses to locations. However, some IP - // addresses aren't mapped to geographic locations, so even if you create geolocation - // resource record sets that cover all seven continents, Route 53 will receive - // some DNS queries from locations that it can't identify. We recommend that - // you create a resource record set for which the value of CountryCode is *, - // which handles both queries that come from locations for which you haven't - // created geolocation resource record sets and queries from IP addresses that - // aren't mapped to a location. If you don't create a * resource record set, - // Route 53 returns a "no answer" response for queries from those locations. - // - // You can't create non-geolocation resource record sets that have the same - // values for the Name and Type elements as geolocation resource record sets. - GeoLocation *GeoLocation `type:"structure"` - - // If you want Amazon Route 53 to return this resource record set in response - // to a DNS query only when the status of a health check is healthy, include - // the HealthCheckId element and specify the ID of the applicable health check. - // - // Route 53 determines whether a resource record set is healthy based on one - // of the following: - // - // * By periodically sending a request to the endpoint that is specified - // in the health check - // - // * By aggregating the status of a specified group of health checks (calculated - // health checks) - // - // * By determining the current state of a CloudWatch alarm (CloudWatch metric - // health checks) - // - // Route 53 doesn't check the health of the endpoint that is specified in the - // resource record set, for example, the endpoint specified by the IP address - // in the Value element. When you add a HealthCheckId element to a resource - // record set, Route 53 checks the health of the endpoint that you specified - // in the health check. - // - // For more information, see the following topics in the Amazon Route 53 Developer - // Guide: - // - // * How Amazon Route 53 Determines Whether an Endpoint Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) - // - // * Route 53 Health Checks and DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) - // - // * Configuring Failover in a Private Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) - // - // When to Specify HealthCheckId - // - // Specifying a value for HealthCheckId is useful only when Route 53 is choosing - // between two or more resource record sets to respond to a DNS query, and you - // want Route 53 to base the choice in part on the status of a health check. - // Configuring health checks makes sense only in the following configurations: - // - // * Non-alias resource record sets: You're checking the health of a group - // of non-alias resource record sets that have the same routing policy, name, - // and type (such as multiple weighted records named www.example.com with - // a type of A) and you specify health check IDs for all the resource record - // sets. - // - // If the health check status for a resource record set is healthy, Route 53 - // includes the record among the records that it responds to DNS queries - // with. - // - // If the health check status for a resource record set is unhealthy, Route - // 53 stops responding to DNS queries using the value for that resource record - // set. - // - // If the health check status for all resource record sets in the group is unhealthy, - // Route 53 considers all resource record sets in the group healthy and responds - // to DNS queries accordingly. - // - // * Alias resource record sets: You specify the following settings: - // - // You set EvaluateTargetHealth to true for an alias resource record set in - // a group of resource record sets that have the same routing policy, name, - // and type (such as multiple weighted records named www.example.com with - // a type of A). - // - // You configure the alias resource record set to route traffic to a non-alias - // resource record set in the same hosted zone. - // - // You specify a health check ID for the non-alias resource record set. - // - // If the health check status is healthy, Route 53 considers the alias resource - // record set to be healthy and includes the alias record among the records - // that it responds to DNS queries with. - // - // If the health check status is unhealthy, Route 53 stops responding to DNS - // queries using the alias resource record set. - // - // The alias resource record set can also route traffic to a group of non-alias - // resource record sets that have the same routing policy, name, and type. - // In that configuration, associate health checks with all of the resource - // record sets in the group of non-alias resource record sets. - // - // Geolocation Routing - // - // For geolocation resource record sets, if an endpoint is unhealthy, Route - // 53 looks for a resource record set for the larger, associated geographic - // region. For example, suppose you have resource record sets for a state in - // the United States, for the entire United States, for North America, and a - // resource record set that has * for CountryCode is *, which applies to all - // locations. If the endpoint for the state resource record set is unhealthy, - // Route 53 checks for healthy resource record sets in the following order until - // it finds a resource record set for which the endpoint is healthy: - // - // * The United States - // - // * North America - // - // * The default resource record set - // - // Specifying the Health Check Endpoint by Domain Name - // - // If your health checks specify the endpoint only by domain name, we recommend - // that you create a separate health check for each endpoint. For example, create - // a health check for each HTTP server that is serving content for www.example.com. - // For the value of FullyQualifiedDomainName, specify the domain name of the - // server (such as us-east-2-www.example.com), not the name of the resource - // record sets (www.example.com). - // - // Health check results will be unpredictable if you do the following: - // - // Create a health check that has the same value for FullyQualifiedDomainName - // as the name of a resource record set. - // - // Associate that health check with the resource record set. - HealthCheckId *string `type:"string"` - - // Multivalue answer resource record sets only: To route traffic approximately - // randomly to multiple resources, such as web servers, create one multivalue - // answer record for each resource and specify true for MultiValueAnswer. Note - // the following: - // - // * If you associate a health check with a multivalue answer resource record - // set, Amazon Route 53 responds to DNS queries with the corresponding IP - // address only when the health check is healthy. - // - // * If you don't associate a health check with a multivalue answer record, - // Route 53 always considers the record to be healthy. - // - // * Route 53 responds to DNS queries with up to eight healthy records; if - // you have eight or fewer healthy records, Route 53 responds to all DNS - // queries with all the healthy records. - // - // * If you have more than eight healthy records, Route 53 responds to different - // DNS resolvers with different combinations of healthy records. - // - // * When all records are unhealthy, Route 53 responds to DNS queries with - // up to eight unhealthy records. - // - // * If a resource becomes unavailable after a resolver caches a response, - // client software typically tries another of the IP addresses in the response. - // - // You can't create multivalue answer alias records. - MultiValueAnswer *bool `type:"boolean"` - - // For ChangeResourceRecordSets requests, the name of the record that you want - // to create, update, or delete. For ListResourceRecordSets responses, the name - // of a record in the specified hosted zone. - // - // ChangeResourceRecordSets Only - // - // Enter a fully qualified domain name, for example, www.example.com. You can - // optionally include a trailing dot. If you omit the trailing dot, Amazon Route - // 53 assumes that the domain name that you specify is fully qualified. This - // means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. - // (with a trailing dot) as identical. - // - // For information about how to specify characters other than a-z, 0-9, and - // - (hyphen) and how to specify internationalized domain names, see DNS Domain - // Name Format (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html) - // in the Amazon Route 53 Developer Guide. - // - // You can use the asterisk (*) wildcard to replace the leftmost label in a - // domain name, for example, *.example.com. Note the following: - // - // * The * must replace the entire label. For example, you can't specify - // *prod.example.com or prod*.example.com. - // - // * The * can't replace any of the middle labels, for example, marketing.*.example.com. - // - // * If you include * in any position other than the leftmost label in a - // domain name, DNS treats it as an * character (ASCII 42), not as a wildcard. - // - // You can't use the * wildcard for resource records sets that have a type of - // NS. - // - // You can use the * wildcard as the leftmost label in a domain name, for example, - // *.example.com. You can't use an * for one of the middle labels, for example, - // marketing.*.example.com. In addition, the * must replace the entire label; - // for example, you can't specify prod*.example.com. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // Latency-based resource record sets only: The Amazon EC2 Region where you - // created the resource that this resource record set refers to. The resource - // typically is an AWS resource, such as an EC2 instance or an ELB load balancer, - // and is referred to by an IP address or a DNS domain name, depending on the - // record type. - // - // Creating latency and latency alias resource record sets in private hosted - // zones is not supported. - // - // When Amazon Route 53 receives a DNS query for a domain name and type for - // which you have created latency resource record sets, Route 53 selects the - // latency resource record set that has the lowest latency between the end user - // and the associated Amazon EC2 Region. Route 53 then returns the value that - // is associated with the selected resource record set. - // - // Note the following: - // - // * You can only specify one ResourceRecord per latency resource record - // set. - // - // * You can only create one latency resource record set for each Amazon - // EC2 Region. - // - // * You aren't required to create latency resource record sets for all Amazon - // EC2 Regions. Route 53 will choose the region with the best latency from - // among the regions that you create latency resource record sets for. - // - // * You can't create non-latency resource record sets that have the same - // values for the Name and Type elements as latency resource record sets. - Region *string `min:"1" type:"string" enum:"ResourceRecordSetRegion"` - - // Information about the resource records to act upon. - // - // If you're creating an alias resource record set, omit ResourceRecords. - ResourceRecords []*ResourceRecord `locationNameList:"ResourceRecord" min:"1" type:"list"` - - // Resource record sets that have a routing policy other than simple: An identifier - // that differentiates among multiple resource record sets that have the same - // combination of name and type, such as multiple weighted resource record sets - // named acme.example.com that have a type of A. In a group of resource record - // sets that have the same name and type, the value of SetIdentifier must be - // unique for each resource record set. - // - // For information about routing policies, see Choosing a Routing Policy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html) - // in the Amazon Route 53 Developer Guide. - SetIdentifier *string `min:"1" type:"string"` - - // The resource record cache time to live (TTL), in seconds. Note the following: - // - // * If you're creating or updating an alias resource record set, omit TTL. - // Amazon Route 53 uses the value of TTL for the alias target. - // - // * If you're associating this resource record set with a health check (if - // you're adding a HealthCheckId element), we recommend that you specify - // a TTL of 60 seconds or less so clients respond quickly to changes in health - // status. - // - // * All of the resource record sets in a group of weighted resource record - // sets must have the same value for TTL. - // - // * If a group of weighted resource record sets includes one or more weighted - // alias resource record sets for which the alias target is an ELB load balancer, - // we recommend that you specify a TTL of 60 seconds for all of the non-alias - // weighted resource record sets that have the same name and type. Values - // other than 60 seconds (the TTL for load balancers) will change the effect - // of the values that you specify for Weight. - TTL *int64 `type:"long"` - - // When you create a traffic policy instance, Amazon Route 53 automatically - // creates a resource record set. TrafficPolicyInstanceId is the ID of the traffic - // policy instance that Route 53 created this resource record set for. - // - // To delete the resource record set that is associated with a traffic policy - // instance, use DeleteTrafficPolicyInstance. Route 53 will delete the resource - // record set automatically. If you delete the resource record set by using - // ChangeResourceRecordSets, Route 53 doesn't automatically delete the traffic - // policy instance, and you'll continue to be charged for it even though it's - // no longer in use. - TrafficPolicyInstanceId *string `min:"1" type:"string"` - - // The DNS record type. For information about different record types and how - // data is encoded for them, see Supported DNS Resource Record Types (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html) - // in the Amazon Route 53 Developer Guide. - // - // Valid values for basic resource record sets: A | AAAA | CAA | CNAME | MX - // | NAPTR | NS | PTR | SOA | SPF | SRV | TXT - // - // Values for weighted, latency, geolocation, and failover resource record sets: - // A | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT. When creating - // a group of weighted, latency, geolocation, or failover resource record sets, - // specify the same value for all of the resource record sets in the group. - // - // Valid values for multivalue answer resource record sets: A | AAAA | MX | - // NAPTR | PTR | SPF | SRV | TXT - // - // SPF records were formerly used to verify the identity of the sender of email - // messages. However, we no longer recommend that you create resource record - // sets for which the value of Type is SPF. RFC 7208, Sender Policy Framework - // (SPF) for Authorizing Use of Domains in Email, Version 1, has been updated - // to say, "...[I]ts existence and mechanism defined in [RFC4408] have led to - // some interoperability issues. Accordingly, its use is no longer appropriate - // for SPF version 1; implementations are not to use it." In RFC 7208, see section - // 14.1, The SPF DNS Record Type (http://tools.ietf.org/html/rfc7208#section-14.1). - // - // Values for alias resource record sets: - // - // * CloudFront distributions:A - // - // If IPv6 is enabled for the distribution, create two resource record sets - // to route traffic to your distribution, one with a value of A and one with - // a value of AAAA. - // - // * AWS Elastic Beanstalk environment that has a regionalized subdomain: - // A - // - // * ELB load balancers:A | AAAA - // - // * Amazon S3 buckets:A - // - // * Another resource record set in this hosted zone: Specify the type of - // the resource record set that you're creating the alias for. All values - // are supported except NS and SOA. - // - // If you're creating an alias record that has the same name as the hosted zone - // (known as the zone apex), you can't route traffic to a record for which - // the value of Type is CNAME. This is because the alias record must have - // the same type as the record you're routing traffic to, and creating a - // CNAME record for the zone apex isn't supported even for an alias record. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"RRType"` - - // Weighted resource record sets only: Among resource record sets that have - // the same combination of DNS name and type, a value that determines the proportion - // of DNS queries that Amazon Route 53 responds to using the current resource - // record set. Route 53 calculates the sum of the weights for the resource record - // sets that have the same combination of DNS name and type. Route 53 then responds - // to queries based on the ratio of a resource's weight to the total. Note the - // following: - // - // * You must specify a value for the Weight element for every weighted resource - // record set. - // - // * You can only specify one ResourceRecord per weighted resource record - // set. - // - // * You can't create latency, failover, or geolocation resource record sets - // that have the same values for the Name and Type elements as weighted resource - // record sets. - // - // * You can create a maximum of 100 weighted resource record sets that have - // the same values for the Name and Type elements. - // - // * For weighted (but not weighted alias) resource record sets, if you set - // Weight to 0 for a resource record set, Route 53 never responds to queries - // with the applicable value for that resource record set. However, if you - // set Weight to 0 for all resource record sets that have the same combination - // of DNS name and type, traffic is routed to all resources with equal probability. - // - // The effect of setting Weight to 0 is different when you associate health - // checks with weighted resource record sets. For more information, see Options - // for Configuring Route 53 Active-Active and Active-Passive Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-configuring-options.html) - // in the Amazon Route 53 Developer Guide. - Weight *int64 `type:"long"` -} - -// String returns the string representation -func (s ResourceRecordSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceRecordSet) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceRecordSet) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceRecordSet"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Region != nil && len(*s.Region) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Region", 1)) - } - if s.ResourceRecords != nil && len(s.ResourceRecords) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceRecords", 1)) - } - if s.SetIdentifier != nil && len(*s.SetIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SetIdentifier", 1)) - } - if s.TrafficPolicyInstanceId != nil && len(*s.TrafficPolicyInstanceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TrafficPolicyInstanceId", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.AliasTarget != nil { - if err := s.AliasTarget.Validate(); err != nil { - invalidParams.AddNested("AliasTarget", err.(request.ErrInvalidParams)) - } - } - if s.GeoLocation != nil { - if err := s.GeoLocation.Validate(); err != nil { - invalidParams.AddNested("GeoLocation", err.(request.ErrInvalidParams)) - } - } - if s.ResourceRecords != nil { - for i, v := range s.ResourceRecords { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceRecords", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliasTarget sets the AliasTarget field's value. -func (s *ResourceRecordSet) SetAliasTarget(v *AliasTarget) *ResourceRecordSet { - s.AliasTarget = v - return s -} - -// SetFailover sets the Failover field's value. -func (s *ResourceRecordSet) SetFailover(v string) *ResourceRecordSet { - s.Failover = &v - return s -} - -// SetGeoLocation sets the GeoLocation field's value. -func (s *ResourceRecordSet) SetGeoLocation(v *GeoLocation) *ResourceRecordSet { - s.GeoLocation = v - return s -} - -// SetHealthCheckId sets the HealthCheckId field's value. -func (s *ResourceRecordSet) SetHealthCheckId(v string) *ResourceRecordSet { - s.HealthCheckId = &v - return s -} - -// SetMultiValueAnswer sets the MultiValueAnswer field's value. -func (s *ResourceRecordSet) SetMultiValueAnswer(v bool) *ResourceRecordSet { - s.MultiValueAnswer = &v - return s -} - -// SetName sets the Name field's value. -func (s *ResourceRecordSet) SetName(v string) *ResourceRecordSet { - s.Name = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *ResourceRecordSet) SetRegion(v string) *ResourceRecordSet { - s.Region = &v - return s -} - -// SetResourceRecords sets the ResourceRecords field's value. -func (s *ResourceRecordSet) SetResourceRecords(v []*ResourceRecord) *ResourceRecordSet { - s.ResourceRecords = v - return s -} - -// SetSetIdentifier sets the SetIdentifier field's value. -func (s *ResourceRecordSet) SetSetIdentifier(v string) *ResourceRecordSet { - s.SetIdentifier = &v - return s -} - -// SetTTL sets the TTL field's value. -func (s *ResourceRecordSet) SetTTL(v int64) *ResourceRecordSet { - s.TTL = &v - return s -} - -// SetTrafficPolicyInstanceId sets the TrafficPolicyInstanceId field's value. -func (s *ResourceRecordSet) SetTrafficPolicyInstanceId(v string) *ResourceRecordSet { - s.TrafficPolicyInstanceId = &v - return s -} - -// SetType sets the Type field's value. -func (s *ResourceRecordSet) SetType(v string) *ResourceRecordSet { - s.Type = &v - return s -} - -// SetWeight sets the Weight field's value. -func (s *ResourceRecordSet) SetWeight(v int64) *ResourceRecordSet { - s.Weight = &v - return s -} - -// A complex type containing a resource and its associated tags. -type ResourceTagSet struct { - _ struct{} `type:"structure"` - - // The ID for the specified resource. - ResourceId *string `type:"string"` - - // The type of the resource. - // - // * The resource type for health checks is healthcheck. - // - // * The resource type for hosted zones is hostedzone. - ResourceType *string `type:"string" enum:"TagResourceType"` - - // The tags associated with the specified resource. - Tags []*Tag `locationNameList:"Tag" min:"1" type:"list"` -} - -// String returns the string representation -func (s ResourceTagSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceTagSet) GoString() string { - return s.String() -} - -// SetResourceId sets the ResourceId field's value. -func (s *ResourceTagSet) SetResourceId(v string) *ResourceTagSet { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ResourceTagSet) SetResourceType(v string) *ResourceTagSet { - s.ResourceType = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ResourceTagSet) SetTags(v []*Tag) *ResourceTagSet { - s.Tags = v - return s -} - -// A complex type that contains the type of limit that you specified in the -// request and the current value for that limit. -type ReusableDelegationSetLimit struct { - _ struct{} `type:"structure"` - - // The limit that you requested: MAX_ZONES_BY_REUSABLE_DELEGATION_SET, the maximum - // number of hosted zones that you can associate with the specified reusable - // delegation set. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"ReusableDelegationSetLimitType"` - - // The current value for the MAX_ZONES_BY_REUSABLE_DELEGATION_SET limit. - // - // Value is a required field - Value *int64 `min:"1" type:"long" required:"true"` -} - -// String returns the string representation -func (s ReusableDelegationSetLimit) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReusableDelegationSetLimit) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *ReusableDelegationSetLimit) SetType(v string) *ReusableDelegationSetLimit { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ReusableDelegationSetLimit) SetValue(v int64) *ReusableDelegationSetLimit { - s.Value = &v - return s -} - -// A complex type that contains the status that one Amazon Route 53 health checker -// reports and the time of the health check. -type StatusReport struct { - _ struct{} `type:"structure"` - - // The date and time that the health checker performed the health check in ISO - // 8601 format (https://en.wikipedia.org/wiki/ISO_8601) and Coordinated Universal - // Time (UTC). For example, the value 2017-03-27T17:48:16.751Z represents March - // 27, 2017 at 17:48:16.751 UTC. - CheckedTime *time.Time `type:"timestamp"` - - // A description of the status of the health check endpoint as reported by one - // of the Amazon Route 53 health checkers. - Status *string `type:"string"` -} - -// String returns the string representation -func (s StatusReport) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StatusReport) GoString() string { - return s.String() -} - -// SetCheckedTime sets the CheckedTime field's value. -func (s *StatusReport) SetCheckedTime(v time.Time) *StatusReport { - s.CheckedTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StatusReport) SetStatus(v string) *StatusReport { - s.Status = &v - return s -} - -// A complex type that contains information about a tag that you want to add -// or edit for the specified health check or hosted zone. -type Tag struct { - _ struct{} `type:"structure"` - - // The value of Key depends on the operation that you want to perform: - // - // * Add a tag to a health check or hosted zone: Key is the name that you - // want to give the new tag. - // - // * Edit a tag: Key is the name of the tag that you want to change the Value - // for. - // - // * Delete a key: Key is the name of the tag you want to remove. - // - // * Give a name to a health check: Edit the default Name tag. In the Amazon - // Route 53 console, the list of your health checks includes a Name column - // that lets you see the name that you've given to each health check. - Key *string `type:"string"` - - // The value of Value depends on the operation that you want to perform: - // - // * Add a tag to a health check or hosted zone: Value is the value that - // you want to give the new tag. - // - // * Edit a tag: Value is the new value that you want to assign the tag. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Gets the value that Amazon Route 53 returns in response to a DNS request -// for a specified record name and type. You can optionally specify the IP address -// of a DNS resolver, an EDNS0 client subnet IP address, and a subnet mask. -type TestDNSAnswerInput struct { - _ struct{} `type:"structure"` - - // If the resolver that you specified for resolverip supports EDNS0, specify - // the IPv4 or IPv6 address of a client in the applicable location, for example, - // 192.0.2.44 or 2001:db8:85a3::8a2e:370:7334. - EDNS0ClientSubnetIP *string `location:"querystring" locationName:"edns0clientsubnetip" type:"string"` - - // If you specify an IP address for edns0clientsubnetip, you can optionally - // specify the number of bits of the IP address that you want the checking tool - // to include in the DNS query. For example, if you specify 192.0.2.44 for edns0clientsubnetip - // and 24 for edns0clientsubnetmask, the checking tool will simulate a request - // from 192.0.2.0/24. The default value is 24 bits for IPv4 addresses and 64 - // bits for IPv6 addresses. - // - // The range of valid values depends on whether edns0clientsubnetip is an IPv4 - // or an IPv6 address: - // - // * IPv4: Specify a value between 0 and 32 - // - // * IPv6: Specify a value between 0 and 128 - EDNS0ClientSubnetMask *string `location:"querystring" locationName:"edns0clientsubnetmask" type:"string"` - - // The ID of the hosted zone that you want Amazon Route 53 to simulate a query - // for. - // - // HostedZoneId is a required field - HostedZoneId *string `location:"querystring" locationName:"hostedzoneid" type:"string" required:"true"` - - // The name of the resource record set that you want Amazon Route 53 to simulate - // a query for. - // - // RecordName is a required field - RecordName *string `location:"querystring" locationName:"recordname" type:"string" required:"true"` - - // The type of the resource record set. - // - // RecordType is a required field - RecordType *string `location:"querystring" locationName:"recordtype" type:"string" required:"true" enum:"RRType"` - - // If you want to simulate a request from a specific DNS resolver, specify the - // IP address for that resolver. If you omit this value, TestDnsAnswer uses - // the IP address of a DNS resolver in the AWS US East (N. Virginia) Region - // (us-east-1). - ResolverIP *string `location:"querystring" locationName:"resolverip" type:"string"` -} - -// String returns the string representation -func (s TestDNSAnswerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestDNSAnswerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TestDNSAnswerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TestDNSAnswerInput"} - if s.HostedZoneId == nil { - invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) - } - if s.RecordName == nil { - invalidParams.Add(request.NewErrParamRequired("RecordName")) - } - if s.RecordType == nil { - invalidParams.Add(request.NewErrParamRequired("RecordType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEDNS0ClientSubnetIP sets the EDNS0ClientSubnetIP field's value. -func (s *TestDNSAnswerInput) SetEDNS0ClientSubnetIP(v string) *TestDNSAnswerInput { - s.EDNS0ClientSubnetIP = &v - return s -} - -// SetEDNS0ClientSubnetMask sets the EDNS0ClientSubnetMask field's value. -func (s *TestDNSAnswerInput) SetEDNS0ClientSubnetMask(v string) *TestDNSAnswerInput { - s.EDNS0ClientSubnetMask = &v - return s -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *TestDNSAnswerInput) SetHostedZoneId(v string) *TestDNSAnswerInput { - s.HostedZoneId = &v - return s -} - -// SetRecordName sets the RecordName field's value. -func (s *TestDNSAnswerInput) SetRecordName(v string) *TestDNSAnswerInput { - s.RecordName = &v - return s -} - -// SetRecordType sets the RecordType field's value. -func (s *TestDNSAnswerInput) SetRecordType(v string) *TestDNSAnswerInput { - s.RecordType = &v - return s -} - -// SetResolverIP sets the ResolverIP field's value. -func (s *TestDNSAnswerInput) SetResolverIP(v string) *TestDNSAnswerInput { - s.ResolverIP = &v - return s -} - -// A complex type that contains the response to a TestDNSAnswer request. -type TestDNSAnswerOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Route 53 name server used to respond to the request. - // - // Nameserver is a required field - Nameserver *string `type:"string" required:"true"` - - // The protocol that Amazon Route 53 used to respond to the request, either - // UDP or TCP. - // - // Protocol is a required field - Protocol *string `type:"string" required:"true"` - - // A list that contains values that Amazon Route 53 returned for this resource - // record set. - // - // RecordData is a required field - RecordData []*string `locationNameList:"RecordDataEntry" type:"list" required:"true"` - - // The name of the resource record set that you submitted a request for. - // - // RecordName is a required field - RecordName *string `type:"string" required:"true"` - - // The type of the resource record set that you submitted a request for. - // - // RecordType is a required field - RecordType *string `type:"string" required:"true" enum:"RRType"` - - // A code that indicates whether the request is valid or not. The most common - // response code is NOERROR, meaning that the request is valid. If the response - // is not valid, Amazon Route 53 returns a response code that describes the - // error. For a list of possible response codes, see DNS RCODES (http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6) - // on the IANA website. - // - // ResponseCode is a required field - ResponseCode *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s TestDNSAnswerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestDNSAnswerOutput) GoString() string { - return s.String() -} - -// SetNameserver sets the Nameserver field's value. -func (s *TestDNSAnswerOutput) SetNameserver(v string) *TestDNSAnswerOutput { - s.Nameserver = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *TestDNSAnswerOutput) SetProtocol(v string) *TestDNSAnswerOutput { - s.Protocol = &v - return s -} - -// SetRecordData sets the RecordData field's value. -func (s *TestDNSAnswerOutput) SetRecordData(v []*string) *TestDNSAnswerOutput { - s.RecordData = v - return s -} - -// SetRecordName sets the RecordName field's value. -func (s *TestDNSAnswerOutput) SetRecordName(v string) *TestDNSAnswerOutput { - s.RecordName = &v - return s -} - -// SetRecordType sets the RecordType field's value. -func (s *TestDNSAnswerOutput) SetRecordType(v string) *TestDNSAnswerOutput { - s.RecordType = &v - return s -} - -// SetResponseCode sets the ResponseCode field's value. -func (s *TestDNSAnswerOutput) SetResponseCode(v string) *TestDNSAnswerOutput { - s.ResponseCode = &v - return s -} - -// A complex type that contains settings for a traffic policy. -type TrafficPolicy struct { - _ struct{} `type:"structure"` - - // The comment that you specify in the CreateTrafficPolicy request, if any. - Comment *string `type:"string"` - - // The definition of a traffic policy in JSON format. You specify the JSON document - // to use for a new traffic policy in the CreateTrafficPolicy request. For more - // information about the JSON format, see Traffic Policy Document Format (http://docs.aws.amazon.com/Route53/latest/APIReference/api-policies-traffic-policy-document-format.html). - // - // Document is a required field - Document *string `type:"string" required:"true"` - - // The ID that Amazon Route 53 assigned to a traffic policy when you created - // it. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` - - // The name that you specified when you created the traffic policy. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The DNS type of the resource record sets that Amazon Route 53 creates when - // you use a traffic policy to create a traffic policy instance. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"RRType"` - - // The version number that Amazon Route 53 assigns to a traffic policy. For - // a new traffic policy, the value of Version is always 1. - // - // Version is a required field - Version *int64 `min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s TrafficPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TrafficPolicy) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *TrafficPolicy) SetComment(v string) *TrafficPolicy { - s.Comment = &v - return s -} - -// SetDocument sets the Document field's value. -func (s *TrafficPolicy) SetDocument(v string) *TrafficPolicy { - s.Document = &v - return s -} - -// SetId sets the Id field's value. -func (s *TrafficPolicy) SetId(v string) *TrafficPolicy { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *TrafficPolicy) SetName(v string) *TrafficPolicy { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *TrafficPolicy) SetType(v string) *TrafficPolicy { - s.Type = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *TrafficPolicy) SetVersion(v int64) *TrafficPolicy { - s.Version = &v - return s -} - -// A complex type that contains settings for the new traffic policy instance. -type TrafficPolicyInstance struct { - _ struct{} `type:"structure"` - - // The ID of the hosted zone that Amazon Route 53 created resource record sets - // in. - // - // HostedZoneId is a required field - HostedZoneId *string `type:"string" required:"true"` - - // The ID that Amazon Route 53 assigned to the new traffic policy instance. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` - - // If State is Failed, an explanation of the reason for the failure. If State - // is another value, Message is empty. - // - // Message is a required field - Message *string `type:"string" required:"true"` - - // The DNS name, such as www.example.com, for which Amazon Route 53 responds - // to queries by using the resource record sets that are associated with this - // traffic policy instance. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The value of State is one of the following values: - // - // AppliedAmazon Route 53 has finished creating resource record sets, and changes - // have propagated to all Route 53 edge locations. - // - // CreatingRoute 53 is creating the resource record sets. Use GetTrafficPolicyInstance - // to confirm that the CreateTrafficPolicyInstance request completed successfully. - // - // FailedRoute 53 wasn't able to create or update the resource record sets. - // When the value of State is Failed, see Message for an explanation of what - // caused the request to fail. - // - // State is a required field - State *string `type:"string" required:"true"` - - // The TTL that Amazon Route 53 assigned to all of the resource record sets - // that it created in the specified hosted zone. - // - // TTL is a required field - TTL *int64 `type:"long" required:"true"` - - // The ID of the traffic policy that Amazon Route 53 used to create resource - // record sets in the specified hosted zone. - // - // TrafficPolicyId is a required field - TrafficPolicyId *string `min:"1" type:"string" required:"true"` - - // The DNS type that Amazon Route 53 assigned to all of the resource record - // sets that it created for this traffic policy instance. - // - // TrafficPolicyType is a required field - TrafficPolicyType *string `type:"string" required:"true" enum:"RRType"` - - // The version of the traffic policy that Amazon Route 53 used to create resource - // record sets in the specified hosted zone. - // - // TrafficPolicyVersion is a required field - TrafficPolicyVersion *int64 `min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s TrafficPolicyInstance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TrafficPolicyInstance) GoString() string { - return s.String() -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *TrafficPolicyInstance) SetHostedZoneId(v string) *TrafficPolicyInstance { - s.HostedZoneId = &v - return s -} - -// SetId sets the Id field's value. -func (s *TrafficPolicyInstance) SetId(v string) *TrafficPolicyInstance { - s.Id = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *TrafficPolicyInstance) SetMessage(v string) *TrafficPolicyInstance { - s.Message = &v - return s -} - -// SetName sets the Name field's value. -func (s *TrafficPolicyInstance) SetName(v string) *TrafficPolicyInstance { - s.Name = &v - return s -} - -// SetState sets the State field's value. -func (s *TrafficPolicyInstance) SetState(v string) *TrafficPolicyInstance { - s.State = &v - return s -} - -// SetTTL sets the TTL field's value. -func (s *TrafficPolicyInstance) SetTTL(v int64) *TrafficPolicyInstance { - s.TTL = &v - return s -} - -// SetTrafficPolicyId sets the TrafficPolicyId field's value. -func (s *TrafficPolicyInstance) SetTrafficPolicyId(v string) *TrafficPolicyInstance { - s.TrafficPolicyId = &v - return s -} - -// SetTrafficPolicyType sets the TrafficPolicyType field's value. -func (s *TrafficPolicyInstance) SetTrafficPolicyType(v string) *TrafficPolicyInstance { - s.TrafficPolicyType = &v - return s -} - -// SetTrafficPolicyVersion sets the TrafficPolicyVersion field's value. -func (s *TrafficPolicyInstance) SetTrafficPolicyVersion(v int64) *TrafficPolicyInstance { - s.TrafficPolicyVersion = &v - return s -} - -// A complex type that contains information about the latest version of one -// traffic policy that is associated with the current AWS account. -type TrafficPolicySummary struct { - _ struct{} `type:"structure"` - - // The ID that Amazon Route 53 assigned to the traffic policy when you created - // it. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` - - // The version number of the latest version of the traffic policy. - // - // LatestVersion is a required field - LatestVersion *int64 `min:"1" type:"integer" required:"true"` - - // The name that you specified for the traffic policy when you created it. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The number of traffic policies that are associated with the current AWS account. - // - // TrafficPolicyCount is a required field - TrafficPolicyCount *int64 `min:"1" type:"integer" required:"true"` - - // The DNS type of the resource record sets that Amazon Route 53 creates when - // you use a traffic policy to create a traffic policy instance. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"RRType"` -} - -// String returns the string representation -func (s TrafficPolicySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TrafficPolicySummary) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *TrafficPolicySummary) SetId(v string) *TrafficPolicySummary { - s.Id = &v - return s -} - -// SetLatestVersion sets the LatestVersion field's value. -func (s *TrafficPolicySummary) SetLatestVersion(v int64) *TrafficPolicySummary { - s.LatestVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *TrafficPolicySummary) SetName(v string) *TrafficPolicySummary { - s.Name = &v - return s -} - -// SetTrafficPolicyCount sets the TrafficPolicyCount field's value. -func (s *TrafficPolicySummary) SetTrafficPolicyCount(v int64) *TrafficPolicySummary { - s.TrafficPolicyCount = &v - return s -} - -// SetType sets the Type field's value. -func (s *TrafficPolicySummary) SetType(v string) *TrafficPolicySummary { - s.Type = &v - return s -} - -// A complex type that contains information about a request to update a health -// check. -type UpdateHealthCheckInput struct { - _ struct{} `locationName:"UpdateHealthCheckRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // A complex type that identifies the CloudWatch alarm that you want Amazon - // Route 53 health checkers to use to determine whether the specified health - // check is healthy. - AlarmIdentifier *AlarmIdentifier `type:"structure"` - - // A complex type that contains one ChildHealthCheck element for each health - // check that you want to associate with a CALCULATED health check. - ChildHealthChecks []*string `locationNameList:"ChildHealthCheck" type:"list"` - - // Stops Route 53 from performing health checks. When you disable a health check, - // here's what happens: - // - // * Health checks that check the health of endpoints: Route 53 stops submitting - // requests to your application, server, or other resource. - // - // * Calculated health checks: Route 53 stops aggregating the status of the - // referenced health checks. - // - // * Health checks that monitor CloudWatch alarms: Route 53 stops monitoring - // the corresponding CloudWatch metrics. - // - // After you disable a health check, Route 53 considers the status of the health - // check to always be healthy. If you configured DNS failover, Route 53 continues - // to route traffic to the corresponding resources. If you want to stop routing - // traffic to a resource, change the value of UpdateHealthCheckRequest$Inverted. - // - // Charges for a health check still apply when the health check is disabled. - // For more information, see Amazon Route 53 Pricing (http://aws.amazon.com/route53/pricing/). - Disabled *bool `type:"boolean"` - - // Specify whether you want Amazon Route 53 to send the value of FullyQualifiedDomainName - // to the endpoint in the client_hello message during TLS negotiation. This - // allows the endpoint to respond to HTTPS health check requests with the applicable - // SSL/TLS certificate. - // - // Some endpoints require that HTTPS requests include the host name in the client_hello - // message. If you don't enable SNI, the status of the health check will be - // SSL alert handshake_failure. A health check can also have that status for - // other reasons. If SNI is enabled and you're still getting the error, check - // the SSL/TLS configuration on your endpoint and confirm that your certificate - // is valid. - // - // The SSL/TLS certificate on your endpoint includes a domain name in the Common - // Name field and possibly several more in the Subject Alternative Names field. - // One of the domain names in the certificate should match the value that you - // specify for FullyQualifiedDomainName. If the endpoint responds to the client_hello - // message with a certificate that does not include the domain name that you - // specified in FullyQualifiedDomainName, a health checker will retry the handshake. - // In the second attempt, the health checker will omit FullyQualifiedDomainName - // from the client_hello message. - EnableSNI *bool `type:"boolean"` - - // The number of consecutive health checks that an endpoint must pass or fail - // for Amazon Route 53 to change the current status of the endpoint from unhealthy - // to healthy or vice versa. For more information, see How Amazon Route 53 Determines - // Whether an Endpoint Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) - // in the Amazon Route 53 Developer Guide. - // - // If you don't specify a value for FailureThreshold, the default value is three - // health checks. - FailureThreshold *int64 `min:"1" type:"integer"` - - // Amazon Route 53 behavior depends on whether you specify a value for IPAddress. - // - // If a health check already has a value for IPAddress, you can change the value. - // However, you can't update an existing health check to add or remove the value - // of IPAddress. - // - // If you specify a value forIPAddress: - // - // Route 53 sends health check requests to the specified IPv4 or IPv6 address - // and passes the value of FullyQualifiedDomainName in the Host header for all - // health checks except TCP health checks. This is typically the fully qualified - // DNS name of the endpoint on which you want Route 53 to perform health checks. - // - // When Route 53 checks the health of an endpoint, here is how it constructs - // the Host header: - // - // * If you specify a value of 80 for Port and HTTP or HTTP_STR_MATCH for - // Type, Route 53 passes the value of FullyQualifiedDomainName to the endpoint - // in the Host header. - // - // * If you specify a value of 443 for Port and HTTPS or HTTPS_STR_MATCH - // for Type, Route 53 passes the value of FullyQualifiedDomainName to the - // endpoint in the Host header. - // - // * If you specify another value for Port and any value except TCP for Type, - // Route 53 passes FullyQualifiedDomainName:Port to the endpoint in the Host - // header. - // - // If you don't specify a value for FullyQualifiedDomainName, Route 53 substitutes - // the value of IPAddress in the Host header in each of the above cases. - // - // If you don't specify a value forIPAddress: - // - // If you don't specify a value for IPAddress, Route 53 sends a DNS request - // to the domain that you specify in FullyQualifiedDomainName at the interval - // you specify in RequestInterval. Using an IPv4 address that is returned by - // DNS, Route 53 then checks the health of the endpoint. - // - // If you don't specify a value for IPAddress, Route 53 uses only IPv4 to send - // health checks to the endpoint. If there's no resource record set with a type - // of A for the name that you specify for FullyQualifiedDomainName, the health - // check fails with a "DNS resolution failed" error. - // - // If you want to check the health of weighted, latency, or failover resource - // record sets and you choose to specify the endpoint only by FullyQualifiedDomainName, - // we recommend that you create a separate health check for each endpoint. For - // example, create a health check for each HTTP server that is serving content - // for www.example.com. For the value of FullyQualifiedDomainName, specify the - // domain name of the server (such as us-east-2-www.example.com), not the name - // of the resource record sets (www.example.com). - // - // In this configuration, if the value of FullyQualifiedDomainName matches the - // name of the resource record sets and you then associate the health check - // with those resource record sets, health check results will be unpredictable. - // - // In addition, if the value of Type is HTTP, HTTPS, HTTP_STR_MATCH, or HTTPS_STR_MATCH, - // Route 53 passes the value of FullyQualifiedDomainName in the Host header, - // as it does when you specify a value for IPAddress. If the value of Type is - // TCP, Route 53 doesn't pass a Host header. - FullyQualifiedDomainName *string `type:"string"` - - // The ID for the health check for which you want detailed information. When - // you created the health check, CreateHealthCheck returned the ID in the response, - // in the HealthCheckId element. - // - // HealthCheckId is a required field - HealthCheckId *string `location:"uri" locationName:"HealthCheckId" type:"string" required:"true"` - - // A sequential counter that Amazon Route 53 sets to 1 when you create a health - // check and increments by 1 each time you update settings for the health check. - // - // We recommend that you use GetHealthCheck or ListHealthChecks to get the current - // value of HealthCheckVersion for the health check that you want to update, - // and that you include that value in your UpdateHealthCheck request. This prevents - // Route 53 from overwriting an intervening update: - // - // * If the value in the UpdateHealthCheck request matches the value of HealthCheckVersion - // in the health check, Route 53 updates the health check with the new settings. - // - // * If the value of HealthCheckVersion in the health check is greater, the - // health check was changed after you got the version number. Route 53 does - // not update the health check, and it returns a HealthCheckVersionMismatch - // error. - HealthCheckVersion *int64 `min:"1" type:"long"` - - // The number of child health checks that are associated with a CALCULATED health - // that Amazon Route 53 must consider healthy for the CALCULATED health check - // to be considered healthy. To specify the child health checks that you want - // to associate with a CALCULATED health check, use the ChildHealthChecks and - // ChildHealthCheck elements. - // - // Note the following: - // - // * If you specify a number greater than the number of child health checks, - // Route 53 always considers this health check to be unhealthy. - // - // * If you specify 0, Route 53 always considers this health check to be - // healthy. - HealthThreshold *int64 `type:"integer"` - - // The IPv4 or IPv6 IP address for the endpoint that you want Amazon Route 53 - // to perform health checks on. If you don't specify a value for IPAddress, - // Route 53 sends a DNS request to resolve the domain name that you specify - // in FullyQualifiedDomainName at the interval that you specify in RequestInterval. - // Using an IP address that is returned by DNS, Route 53 then checks the health - // of the endpoint. - // - // Use one of the following formats for the value of IPAddress: - // - // * IPv4 address: four values between 0 and 255, separated by periods (.), - // for example, 192.0.2.44. - // - // * IPv6 address: eight groups of four hexadecimal values, separated by - // colons (:), for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345. You - // can also shorten IPv6 addresses as described in RFC 5952, for example, - // 2001:db8:85a3::abcd:1:2345. - // - // If the endpoint is an EC2 instance, we recommend that you create an Elastic - // IP address, associate it with your EC2 instance, and specify the Elastic - // IP address for IPAddress. This ensures that the IP address of your instance - // never changes. For more information, see the applicable documentation: - // - // * Linux: Elastic IP Addresses (EIP) (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) - // in the Amazon EC2 User Guide for Linux Instances - // - // * Windows: Elastic IP Addresses (EIP) (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-ip-addresses-eip.html) - // in the Amazon EC2 User Guide for Windows Instances - // - // If a health check already has a value for IPAddress, you can change the value. - // However, you can't update an existing health check to add or remove the value - // of IPAddress. - // - // For more information, see UpdateHealthCheckRequest$FullyQualifiedDomainName. - // - // Constraints: Route 53 can't check the health of endpoints for which the IP - // address is in local, private, non-routable, or multicast ranges. For more - // information about IP addresses for which you can't create health checks, - // see the following documents: - // - // * RFC 5735, Special Use IPv4 Addresses (https://tools.ietf.org/html/rfc5735) - // - // * RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space (https://tools.ietf.org/html/rfc6598) - // - // * RFC 5156, Special-Use IPv6 Addresses (https://tools.ietf.org/html/rfc5156) - IPAddress *string `type:"string"` - - // When CloudWatch has insufficient data about the metric to determine the alarm - // state, the status that you want Amazon Route 53 to assign to the health check: - // - // * Healthy: Route 53 considers the health check to be healthy. - // - // * Unhealthy: Route 53 considers the health check to be unhealthy. - // - // * LastKnownStatus: Route 53 uses the status of the health check from the - // last time CloudWatch had sufficient data to determine the alarm state. - // For new health checks that have no last known status, the default status - // for the health check is healthy. - InsufficientDataHealthStatus *string `type:"string" enum:"InsufficientDataHealthStatus"` - - // Specify whether you want Amazon Route 53 to invert the status of a health - // check, for example, to consider a health check unhealthy when it otherwise - // would be considered healthy. - Inverted *bool `type:"boolean"` - - // The port on the endpoint on which you want Amazon Route 53 to perform health - // checks. - Port *int64 `min:"1" type:"integer"` - - // A complex type that contains one Region element for each region that you - // want Amazon Route 53 health checkers to check the specified endpoint from. - Regions []*string `locationNameList:"Region" min:"3" type:"list"` - - // A complex type that contains one ResettableElementName element for each element - // that you want to reset to the default value. Valid values for ResettableElementName - // include the following: - // - // * ChildHealthChecks: Amazon Route 53 resets HealthCheckConfig$ChildHealthChecks - // to null. - // - // * FullyQualifiedDomainName: Route 53 resets HealthCheckConfig$FullyQualifiedDomainName - // to null. - // - // * Regions: Route 53 resets the HealthCheckConfig$Regions list to the default - // set of regions. - // - // * ResourcePath: Route 53 resets HealthCheckConfig$ResourcePath to null. - ResetElements []*string `locationNameList:"ResettableElementName" type:"list"` - - // The path that you want Amazon Route 53 to request when performing health - // checks. The path can be any value for which your endpoint will return an - // HTTP status code of 2xx or 3xx when the endpoint is healthy, for example - // the file /docs/route53-health-check.html. You can also include query string - // parameters, for example, /welcome.html?language=jp&login=y. - // - // Specify this value only if you want to change it. - ResourcePath *string `type:"string"` - - // If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that - // you want Amazon Route 53 to search for in the response body from the specified - // resource. If the string appears in the response body, Route 53 considers - // the resource healthy. (You can't change the value of Type when you update - // a health check.) - SearchString *string `type:"string"` -} - -// String returns the string representation -func (s UpdateHealthCheckInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateHealthCheckInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateHealthCheckInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateHealthCheckInput"} - if s.FailureThreshold != nil && *s.FailureThreshold < 1 { - invalidParams.Add(request.NewErrParamMinValue("FailureThreshold", 1)) - } - if s.HealthCheckId == nil { - invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) - } - if s.HealthCheckId != nil && len(*s.HealthCheckId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HealthCheckId", 1)) - } - if s.HealthCheckVersion != nil && *s.HealthCheckVersion < 1 { - invalidParams.Add(request.NewErrParamMinValue("HealthCheckVersion", 1)) - } - if s.Port != nil && *s.Port < 1 { - invalidParams.Add(request.NewErrParamMinValue("Port", 1)) - } - if s.Regions != nil && len(s.Regions) < 3 { - invalidParams.Add(request.NewErrParamMinLen("Regions", 3)) - } - if s.AlarmIdentifier != nil { - if err := s.AlarmIdentifier.Validate(); err != nil { - invalidParams.AddNested("AlarmIdentifier", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlarmIdentifier sets the AlarmIdentifier field's value. -func (s *UpdateHealthCheckInput) SetAlarmIdentifier(v *AlarmIdentifier) *UpdateHealthCheckInput { - s.AlarmIdentifier = v - return s -} - -// SetChildHealthChecks sets the ChildHealthChecks field's value. -func (s *UpdateHealthCheckInput) SetChildHealthChecks(v []*string) *UpdateHealthCheckInput { - s.ChildHealthChecks = v - return s -} - -// SetDisabled sets the Disabled field's value. -func (s *UpdateHealthCheckInput) SetDisabled(v bool) *UpdateHealthCheckInput { - s.Disabled = &v - return s -} - -// SetEnableSNI sets the EnableSNI field's value. -func (s *UpdateHealthCheckInput) SetEnableSNI(v bool) *UpdateHealthCheckInput { - s.EnableSNI = &v - return s -} - -// SetFailureThreshold sets the FailureThreshold field's value. -func (s *UpdateHealthCheckInput) SetFailureThreshold(v int64) *UpdateHealthCheckInput { - s.FailureThreshold = &v - return s -} - -// SetFullyQualifiedDomainName sets the FullyQualifiedDomainName field's value. -func (s *UpdateHealthCheckInput) SetFullyQualifiedDomainName(v string) *UpdateHealthCheckInput { - s.FullyQualifiedDomainName = &v - return s -} - -// SetHealthCheckId sets the HealthCheckId field's value. -func (s *UpdateHealthCheckInput) SetHealthCheckId(v string) *UpdateHealthCheckInput { - s.HealthCheckId = &v - return s -} - -// SetHealthCheckVersion sets the HealthCheckVersion field's value. -func (s *UpdateHealthCheckInput) SetHealthCheckVersion(v int64) *UpdateHealthCheckInput { - s.HealthCheckVersion = &v - return s -} - -// SetHealthThreshold sets the HealthThreshold field's value. -func (s *UpdateHealthCheckInput) SetHealthThreshold(v int64) *UpdateHealthCheckInput { - s.HealthThreshold = &v - return s -} - -// SetIPAddress sets the IPAddress field's value. -func (s *UpdateHealthCheckInput) SetIPAddress(v string) *UpdateHealthCheckInput { - s.IPAddress = &v - return s -} - -// SetInsufficientDataHealthStatus sets the InsufficientDataHealthStatus field's value. -func (s *UpdateHealthCheckInput) SetInsufficientDataHealthStatus(v string) *UpdateHealthCheckInput { - s.InsufficientDataHealthStatus = &v - return s -} - -// SetInverted sets the Inverted field's value. -func (s *UpdateHealthCheckInput) SetInverted(v bool) *UpdateHealthCheckInput { - s.Inverted = &v - return s -} - -// SetPort sets the Port field's value. -func (s *UpdateHealthCheckInput) SetPort(v int64) *UpdateHealthCheckInput { - s.Port = &v - return s -} - -// SetRegions sets the Regions field's value. -func (s *UpdateHealthCheckInput) SetRegions(v []*string) *UpdateHealthCheckInput { - s.Regions = v - return s -} - -// SetResetElements sets the ResetElements field's value. -func (s *UpdateHealthCheckInput) SetResetElements(v []*string) *UpdateHealthCheckInput { - s.ResetElements = v - return s -} - -// SetResourcePath sets the ResourcePath field's value. -func (s *UpdateHealthCheckInput) SetResourcePath(v string) *UpdateHealthCheckInput { - s.ResourcePath = &v - return s -} - -// SetSearchString sets the SearchString field's value. -func (s *UpdateHealthCheckInput) SetSearchString(v string) *UpdateHealthCheckInput { - s.SearchString = &v - return s -} - -type UpdateHealthCheckOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains the response to an UpdateHealthCheck request. - // - // HealthCheck is a required field - HealthCheck *HealthCheck `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateHealthCheckOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateHealthCheckOutput) GoString() string { - return s.String() -} - -// SetHealthCheck sets the HealthCheck field's value. -func (s *UpdateHealthCheckOutput) SetHealthCheck(v *HealthCheck) *UpdateHealthCheckOutput { - s.HealthCheck = v - return s -} - -// A request to update the comment for a hosted zone. -type UpdateHostedZoneCommentInput struct { - _ struct{} `locationName:"UpdateHostedZoneCommentRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // The new comment for the hosted zone. If you don't specify a value for Comment, - // Amazon Route 53 deletes the existing value of the Comment element, if any. - Comment *string `type:"string"` - - // The ID for the hosted zone that you want to update the comment for. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateHostedZoneCommentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateHostedZoneCommentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateHostedZoneCommentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateHostedZoneCommentInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *UpdateHostedZoneCommentInput) SetComment(v string) *UpdateHostedZoneCommentInput { - s.Comment = &v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateHostedZoneCommentInput) SetId(v string) *UpdateHostedZoneCommentInput { - s.Id = &v - return s -} - -// A complex type that contains the response to the UpdateHostedZoneComment -// request. -type UpdateHostedZoneCommentOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains the response to the UpdateHostedZoneComment - // request. - // - // HostedZone is a required field - HostedZone *HostedZone `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateHostedZoneCommentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateHostedZoneCommentOutput) GoString() string { - return s.String() -} - -// SetHostedZone sets the HostedZone field's value. -func (s *UpdateHostedZoneCommentOutput) SetHostedZone(v *HostedZone) *UpdateHostedZoneCommentOutput { - s.HostedZone = v - return s -} - -// A complex type that contains information about the traffic policy that you -// want to update the comment for. -type UpdateTrafficPolicyCommentInput struct { - _ struct{} `locationName:"UpdateTrafficPolicyCommentRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // The new comment for the specified traffic policy and version. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` - - // The value of Id for the traffic policy that you want to update the comment - // for. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" min:"1" type:"string" required:"true"` - - // The value of Version for the traffic policy that you want to update the comment - // for. - // - // Version is a required field - Version *int64 `location:"uri" locationName:"Version" min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s UpdateTrafficPolicyCommentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTrafficPolicyCommentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateTrafficPolicyCommentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateTrafficPolicyCommentInput"} - if s.Comment == nil { - invalidParams.Add(request.NewErrParamRequired("Comment")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && *s.Version < 1 { - invalidParams.Add(request.NewErrParamMinValue("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *UpdateTrafficPolicyCommentInput) SetComment(v string) *UpdateTrafficPolicyCommentInput { - s.Comment = &v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateTrafficPolicyCommentInput) SetId(v string) *UpdateTrafficPolicyCommentInput { - s.Id = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *UpdateTrafficPolicyCommentInput) SetVersion(v int64) *UpdateTrafficPolicyCommentInput { - s.Version = &v - return s -} - -// A complex type that contains the response information for the traffic policy. -type UpdateTrafficPolicyCommentOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains settings for the specified traffic policy. - // - // TrafficPolicy is a required field - TrafficPolicy *TrafficPolicy `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateTrafficPolicyCommentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTrafficPolicyCommentOutput) GoString() string { - return s.String() -} - -// SetTrafficPolicy sets the TrafficPolicy field's value. -func (s *UpdateTrafficPolicyCommentOutput) SetTrafficPolicy(v *TrafficPolicy) *UpdateTrafficPolicyCommentOutput { - s.TrafficPolicy = v - return s -} - -// A complex type that contains information about the resource record sets that -// you want to update based on a specified traffic policy instance. -type UpdateTrafficPolicyInstanceInput struct { - _ struct{} `locationName:"UpdateTrafficPolicyInstanceRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - - // The ID of the traffic policy instance that you want to update. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" min:"1" type:"string" required:"true"` - - // The TTL that you want Amazon Route 53 to assign to all of the updated resource - // record sets. - // - // TTL is a required field - TTL *int64 `type:"long" required:"true"` - - // The ID of the traffic policy that you want Amazon Route 53 to use to update - // resource record sets for the specified traffic policy instance. - // - // TrafficPolicyId is a required field - TrafficPolicyId *string `min:"1" type:"string" required:"true"` - - // The version of the traffic policy that you want Amazon Route 53 to use to - // update resource record sets for the specified traffic policy instance. - // - // TrafficPolicyVersion is a required field - TrafficPolicyVersion *int64 `min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s UpdateTrafficPolicyInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTrafficPolicyInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateTrafficPolicyInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateTrafficPolicyInstanceInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.TTL == nil { - invalidParams.Add(request.NewErrParamRequired("TTL")) - } - if s.TrafficPolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("TrafficPolicyId")) - } - if s.TrafficPolicyId != nil && len(*s.TrafficPolicyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TrafficPolicyId", 1)) - } - if s.TrafficPolicyVersion == nil { - invalidParams.Add(request.NewErrParamRequired("TrafficPolicyVersion")) - } - if s.TrafficPolicyVersion != nil && *s.TrafficPolicyVersion < 1 { - invalidParams.Add(request.NewErrParamMinValue("TrafficPolicyVersion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *UpdateTrafficPolicyInstanceInput) SetId(v string) *UpdateTrafficPolicyInstanceInput { - s.Id = &v - return s -} - -// SetTTL sets the TTL field's value. -func (s *UpdateTrafficPolicyInstanceInput) SetTTL(v int64) *UpdateTrafficPolicyInstanceInput { - s.TTL = &v - return s -} - -// SetTrafficPolicyId sets the TrafficPolicyId field's value. -func (s *UpdateTrafficPolicyInstanceInput) SetTrafficPolicyId(v string) *UpdateTrafficPolicyInstanceInput { - s.TrafficPolicyId = &v - return s -} - -// SetTrafficPolicyVersion sets the TrafficPolicyVersion field's value. -func (s *UpdateTrafficPolicyInstanceInput) SetTrafficPolicyVersion(v int64) *UpdateTrafficPolicyInstanceInput { - s.TrafficPolicyVersion = &v - return s -} - -// A complex type that contains information about the resource record sets that -// Amazon Route 53 created based on a specified traffic policy. -type UpdateTrafficPolicyInstanceOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains settings for the updated traffic policy instance. - // - // TrafficPolicyInstance is a required field - TrafficPolicyInstance *TrafficPolicyInstance `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateTrafficPolicyInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTrafficPolicyInstanceOutput) GoString() string { - return s.String() -} - -// SetTrafficPolicyInstance sets the TrafficPolicyInstance field's value. -func (s *UpdateTrafficPolicyInstanceOutput) SetTrafficPolicyInstance(v *TrafficPolicyInstance) *UpdateTrafficPolicyInstanceOutput { - s.TrafficPolicyInstance = v - return s -} - -// (Private hosted zones only) A complex type that contains information about -// an Amazon VPC. -type VPC struct { - _ struct{} `type:"structure"` - - // (Private hosted zones only) The ID of an Amazon VPC. - VPCId *string `type:"string"` - - // (Private hosted zones only) The region that an Amazon VPC was created in. - VPCRegion *string `min:"1" type:"string" enum:"VPCRegion"` -} - -// String returns the string representation -func (s VPC) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VPC) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VPC) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VPC"} - if s.VPCRegion != nil && len(*s.VPCRegion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VPCRegion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVPCId sets the VPCId field's value. -func (s *VPC) SetVPCId(v string) *VPC { - s.VPCId = &v - return s -} - -// SetVPCRegion sets the VPCRegion field's value. -func (s *VPC) SetVPCRegion(v string) *VPC { - s.VPCRegion = &v - return s -} - -const ( - // AccountLimitTypeMaxHealthChecksByOwner is a AccountLimitType enum value - AccountLimitTypeMaxHealthChecksByOwner = "MAX_HEALTH_CHECKS_BY_OWNER" - - // AccountLimitTypeMaxHostedZonesByOwner is a AccountLimitType enum value - AccountLimitTypeMaxHostedZonesByOwner = "MAX_HOSTED_ZONES_BY_OWNER" - - // AccountLimitTypeMaxTrafficPolicyInstancesByOwner is a AccountLimitType enum value - AccountLimitTypeMaxTrafficPolicyInstancesByOwner = "MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER" - - // AccountLimitTypeMaxReusableDelegationSetsByOwner is a AccountLimitType enum value - AccountLimitTypeMaxReusableDelegationSetsByOwner = "MAX_REUSABLE_DELEGATION_SETS_BY_OWNER" - - // AccountLimitTypeMaxTrafficPoliciesByOwner is a AccountLimitType enum value - AccountLimitTypeMaxTrafficPoliciesByOwner = "MAX_TRAFFIC_POLICIES_BY_OWNER" -) - -const ( - // ChangeActionCreate is a ChangeAction enum value - ChangeActionCreate = "CREATE" - - // ChangeActionDelete is a ChangeAction enum value - ChangeActionDelete = "DELETE" - - // ChangeActionUpsert is a ChangeAction enum value - ChangeActionUpsert = "UPSERT" -) - -const ( - // ChangeStatusPending is a ChangeStatus enum value - ChangeStatusPending = "PENDING" - - // ChangeStatusInsync is a ChangeStatus enum value - ChangeStatusInsync = "INSYNC" -) - -const ( - // CloudWatchRegionUsEast1 is a CloudWatchRegion enum value - CloudWatchRegionUsEast1 = "us-east-1" - - // CloudWatchRegionUsEast2 is a CloudWatchRegion enum value - CloudWatchRegionUsEast2 = "us-east-2" - - // CloudWatchRegionUsWest1 is a CloudWatchRegion enum value - CloudWatchRegionUsWest1 = "us-west-1" - - // CloudWatchRegionUsWest2 is a CloudWatchRegion enum value - CloudWatchRegionUsWest2 = "us-west-2" - - // CloudWatchRegionCaCentral1 is a CloudWatchRegion enum value - CloudWatchRegionCaCentral1 = "ca-central-1" - - // CloudWatchRegionEuCentral1 is a CloudWatchRegion enum value - CloudWatchRegionEuCentral1 = "eu-central-1" - - // CloudWatchRegionEuWest1 is a CloudWatchRegion enum value - CloudWatchRegionEuWest1 = "eu-west-1" - - // CloudWatchRegionEuWest2 is a CloudWatchRegion enum value - CloudWatchRegionEuWest2 = "eu-west-2" - - // CloudWatchRegionEuWest3 is a CloudWatchRegion enum value - CloudWatchRegionEuWest3 = "eu-west-3" - - // CloudWatchRegionApSouth1 is a CloudWatchRegion enum value - CloudWatchRegionApSouth1 = "ap-south-1" - - // CloudWatchRegionApSoutheast1 is a CloudWatchRegion enum value - CloudWatchRegionApSoutheast1 = "ap-southeast-1" - - // CloudWatchRegionApSoutheast2 is a CloudWatchRegion enum value - CloudWatchRegionApSoutheast2 = "ap-southeast-2" - - // CloudWatchRegionApNortheast1 is a CloudWatchRegion enum value - CloudWatchRegionApNortheast1 = "ap-northeast-1" - - // CloudWatchRegionApNortheast2 is a CloudWatchRegion enum value - CloudWatchRegionApNortheast2 = "ap-northeast-2" - - // CloudWatchRegionApNortheast3 is a CloudWatchRegion enum value - CloudWatchRegionApNortheast3 = "ap-northeast-3" - - // CloudWatchRegionEuNorth1 is a CloudWatchRegion enum value - CloudWatchRegionEuNorth1 = "eu-north-1" - - // CloudWatchRegionSaEast1 is a CloudWatchRegion enum value - CloudWatchRegionSaEast1 = "sa-east-1" -) - -const ( - // ComparisonOperatorGreaterThanOrEqualToThreshold is a ComparisonOperator enum value - ComparisonOperatorGreaterThanOrEqualToThreshold = "GreaterThanOrEqualToThreshold" - - // ComparisonOperatorGreaterThanThreshold is a ComparisonOperator enum value - ComparisonOperatorGreaterThanThreshold = "GreaterThanThreshold" - - // ComparisonOperatorLessThanThreshold is a ComparisonOperator enum value - ComparisonOperatorLessThanThreshold = "LessThanThreshold" - - // ComparisonOperatorLessThanOrEqualToThreshold is a ComparisonOperator enum value - ComparisonOperatorLessThanOrEqualToThreshold = "LessThanOrEqualToThreshold" -) - -const ( - // HealthCheckRegionUsEast1 is a HealthCheckRegion enum value - HealthCheckRegionUsEast1 = "us-east-1" - - // HealthCheckRegionUsWest1 is a HealthCheckRegion enum value - HealthCheckRegionUsWest1 = "us-west-1" - - // HealthCheckRegionUsWest2 is a HealthCheckRegion enum value - HealthCheckRegionUsWest2 = "us-west-2" - - // HealthCheckRegionEuWest1 is a HealthCheckRegion enum value - HealthCheckRegionEuWest1 = "eu-west-1" - - // HealthCheckRegionApSoutheast1 is a HealthCheckRegion enum value - HealthCheckRegionApSoutheast1 = "ap-southeast-1" - - // HealthCheckRegionApSoutheast2 is a HealthCheckRegion enum value - HealthCheckRegionApSoutheast2 = "ap-southeast-2" - - // HealthCheckRegionApNortheast1 is a HealthCheckRegion enum value - HealthCheckRegionApNortheast1 = "ap-northeast-1" - - // HealthCheckRegionSaEast1 is a HealthCheckRegion enum value - HealthCheckRegionSaEast1 = "sa-east-1" -) - -const ( - // HealthCheckTypeHttp is a HealthCheckType enum value - HealthCheckTypeHttp = "HTTP" - - // HealthCheckTypeHttps is a HealthCheckType enum value - HealthCheckTypeHttps = "HTTPS" - - // HealthCheckTypeHttpStrMatch is a HealthCheckType enum value - HealthCheckTypeHttpStrMatch = "HTTP_STR_MATCH" - - // HealthCheckTypeHttpsStrMatch is a HealthCheckType enum value - HealthCheckTypeHttpsStrMatch = "HTTPS_STR_MATCH" - - // HealthCheckTypeTcp is a HealthCheckType enum value - HealthCheckTypeTcp = "TCP" - - // HealthCheckTypeCalculated is a HealthCheckType enum value - HealthCheckTypeCalculated = "CALCULATED" - - // HealthCheckTypeCloudwatchMetric is a HealthCheckType enum value - HealthCheckTypeCloudwatchMetric = "CLOUDWATCH_METRIC" -) - -const ( - // HostedZoneLimitTypeMaxRrsetsByZone is a HostedZoneLimitType enum value - HostedZoneLimitTypeMaxRrsetsByZone = "MAX_RRSETS_BY_ZONE" - - // HostedZoneLimitTypeMaxVpcsAssociatedByZone is a HostedZoneLimitType enum value - HostedZoneLimitTypeMaxVpcsAssociatedByZone = "MAX_VPCS_ASSOCIATED_BY_ZONE" -) - -const ( - // InsufficientDataHealthStatusHealthy is a InsufficientDataHealthStatus enum value - InsufficientDataHealthStatusHealthy = "Healthy" - - // InsufficientDataHealthStatusUnhealthy is a InsufficientDataHealthStatus enum value - InsufficientDataHealthStatusUnhealthy = "Unhealthy" - - // InsufficientDataHealthStatusLastKnownStatus is a InsufficientDataHealthStatus enum value - InsufficientDataHealthStatusLastKnownStatus = "LastKnownStatus" -) - -const ( - // RRTypeSoa is a RRType enum value - RRTypeSoa = "SOA" - - // RRTypeA is a RRType enum value - RRTypeA = "A" - - // RRTypeTxt is a RRType enum value - RRTypeTxt = "TXT" - - // RRTypeNs is a RRType enum value - RRTypeNs = "NS" - - // RRTypeCname is a RRType enum value - RRTypeCname = "CNAME" - - // RRTypeMx is a RRType enum value - RRTypeMx = "MX" - - // RRTypeNaptr is a RRType enum value - RRTypeNaptr = "NAPTR" - - // RRTypePtr is a RRType enum value - RRTypePtr = "PTR" - - // RRTypeSrv is a RRType enum value - RRTypeSrv = "SRV" - - // RRTypeSpf is a RRType enum value - RRTypeSpf = "SPF" - - // RRTypeAaaa is a RRType enum value - RRTypeAaaa = "AAAA" - - // RRTypeCaa is a RRType enum value - RRTypeCaa = "CAA" -) - -const ( - // ResettableElementNameFullyQualifiedDomainName is a ResettableElementName enum value - ResettableElementNameFullyQualifiedDomainName = "FullyQualifiedDomainName" - - // ResettableElementNameRegions is a ResettableElementName enum value - ResettableElementNameRegions = "Regions" - - // ResettableElementNameResourcePath is a ResettableElementName enum value - ResettableElementNameResourcePath = "ResourcePath" - - // ResettableElementNameChildHealthChecks is a ResettableElementName enum value - ResettableElementNameChildHealthChecks = "ChildHealthChecks" -) - -const ( - // ResourceRecordSetFailoverPrimary is a ResourceRecordSetFailover enum value - ResourceRecordSetFailoverPrimary = "PRIMARY" - - // ResourceRecordSetFailoverSecondary is a ResourceRecordSetFailover enum value - ResourceRecordSetFailoverSecondary = "SECONDARY" -) - -const ( - // ResourceRecordSetRegionUsEast1 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionUsEast1 = "us-east-1" - - // ResourceRecordSetRegionUsEast2 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionUsEast2 = "us-east-2" - - // ResourceRecordSetRegionUsWest1 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionUsWest1 = "us-west-1" - - // ResourceRecordSetRegionUsWest2 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionUsWest2 = "us-west-2" - - // ResourceRecordSetRegionCaCentral1 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionCaCentral1 = "ca-central-1" - - // ResourceRecordSetRegionEuWest1 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionEuWest1 = "eu-west-1" - - // ResourceRecordSetRegionEuWest2 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionEuWest2 = "eu-west-2" - - // ResourceRecordSetRegionEuWest3 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionEuWest3 = "eu-west-3" - - // ResourceRecordSetRegionEuCentral1 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionEuCentral1 = "eu-central-1" - - // ResourceRecordSetRegionApSoutheast1 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionApSoutheast1 = "ap-southeast-1" - - // ResourceRecordSetRegionApSoutheast2 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionApSoutheast2 = "ap-southeast-2" - - // ResourceRecordSetRegionApNortheast1 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionApNortheast1 = "ap-northeast-1" - - // ResourceRecordSetRegionApNortheast2 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionApNortheast2 = "ap-northeast-2" - - // ResourceRecordSetRegionApNortheast3 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionApNortheast3 = "ap-northeast-3" - - // ResourceRecordSetRegionEuNorth1 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionEuNorth1 = "eu-north-1" - - // ResourceRecordSetRegionSaEast1 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionSaEast1 = "sa-east-1" - - // ResourceRecordSetRegionCnNorth1 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionCnNorth1 = "cn-north-1" - - // ResourceRecordSetRegionCnNorthwest1 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionCnNorthwest1 = "cn-northwest-1" - - // ResourceRecordSetRegionApSouth1 is a ResourceRecordSetRegion enum value - ResourceRecordSetRegionApSouth1 = "ap-south-1" -) - -const ( - // ReusableDelegationSetLimitTypeMaxZonesByReusableDelegationSet is a ReusableDelegationSetLimitType enum value - ReusableDelegationSetLimitTypeMaxZonesByReusableDelegationSet = "MAX_ZONES_BY_REUSABLE_DELEGATION_SET" -) - -const ( - // StatisticAverage is a Statistic enum value - StatisticAverage = "Average" - - // StatisticSum is a Statistic enum value - StatisticSum = "Sum" - - // StatisticSampleCount is a Statistic enum value - StatisticSampleCount = "SampleCount" - - // StatisticMaximum is a Statistic enum value - StatisticMaximum = "Maximum" - - // StatisticMinimum is a Statistic enum value - StatisticMinimum = "Minimum" -) - -const ( - // TagResourceTypeHealthcheck is a TagResourceType enum value - TagResourceTypeHealthcheck = "healthcheck" - - // TagResourceTypeHostedzone is a TagResourceType enum value - TagResourceTypeHostedzone = "hostedzone" -) - -const ( - // VPCRegionUsEast1 is a VPCRegion enum value - VPCRegionUsEast1 = "us-east-1" - - // VPCRegionUsEast2 is a VPCRegion enum value - VPCRegionUsEast2 = "us-east-2" - - // VPCRegionUsWest1 is a VPCRegion enum value - VPCRegionUsWest1 = "us-west-1" - - // VPCRegionUsWest2 is a VPCRegion enum value - VPCRegionUsWest2 = "us-west-2" - - // VPCRegionEuWest1 is a VPCRegion enum value - VPCRegionEuWest1 = "eu-west-1" - - // VPCRegionEuWest2 is a VPCRegion enum value - VPCRegionEuWest2 = "eu-west-2" - - // VPCRegionEuWest3 is a VPCRegion enum value - VPCRegionEuWest3 = "eu-west-3" - - // VPCRegionEuCentral1 is a VPCRegion enum value - VPCRegionEuCentral1 = "eu-central-1" - - // VPCRegionApSoutheast1 is a VPCRegion enum value - VPCRegionApSoutheast1 = "ap-southeast-1" - - // VPCRegionApSoutheast2 is a VPCRegion enum value - VPCRegionApSoutheast2 = "ap-southeast-2" - - // VPCRegionApSouth1 is a VPCRegion enum value - VPCRegionApSouth1 = "ap-south-1" - - // VPCRegionApNortheast1 is a VPCRegion enum value - VPCRegionApNortheast1 = "ap-northeast-1" - - // VPCRegionApNortheast2 is a VPCRegion enum value - VPCRegionApNortheast2 = "ap-northeast-2" - - // VPCRegionApNortheast3 is a VPCRegion enum value - VPCRegionApNortheast3 = "ap-northeast-3" - - // VPCRegionEuNorth1 is a VPCRegion enum value - VPCRegionEuNorth1 = "eu-north-1" - - // VPCRegionSaEast1 is a VPCRegion enum value - VPCRegionSaEast1 = "sa-east-1" - - // VPCRegionCaCentral1 is a VPCRegion enum value - VPCRegionCaCentral1 = "ca-central-1" - - // VPCRegionCnNorth1 is a VPCRegion enum value - VPCRegionCnNorth1 = "cn-north-1" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/route53/customizations.go deleted file mode 100644 index efe2d6e7c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/customizations.go +++ /dev/null @@ -1,42 +0,0 @@ -package route53 - -import ( - "net/url" - "regexp" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol/restxml" -) - -func init() { - initClient = func(c *client.Client) { - c.Handlers.Build.PushBack(sanitizeURL) - } - - initRequest = func(r *request.Request) { - switch r.Operation.Name { - case opChangeResourceRecordSets: - r.Handlers.UnmarshalError.Remove(restxml.UnmarshalErrorHandler) - r.Handlers.UnmarshalError.PushBack(unmarshalChangeResourceRecordSetsError) - } - } -} - -var reSanitizeURL = regexp.MustCompile(`\/%2F\w+%2F`) - -func sanitizeURL(r *request.Request) { - r.HTTPRequest.URL.RawPath = - reSanitizeURL.ReplaceAllString(r.HTTPRequest.URL.RawPath, "/") - - // Update Path so that it reflects the cleaned RawPath - updated, err := url.Parse(r.HTTPRequest.URL.RawPath) - if err != nil { - r.Error = awserr.New("SerializationError", "failed to clean Route53 URL", err) - return - } - - // Take the updated path so the requests's URL Path has parity with RawPath. - r.HTTPRequest.URL.Path = updated.Path -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/doc.go b/vendor/github.com/aws/aws-sdk-go/service/route53/doc.go deleted file mode 100644 index 7965fea67..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/doc.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package route53 provides the client and types for making API -// requests to Amazon Route 53. -// -// See https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01 for more information on this service. -// -// See route53 package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/route53/ -// -// Using the Client -// -// To contact Amazon Route 53 with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Route 53 client Route53 for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/route53/#New -package route53 diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go b/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go deleted file mode 100644 index a2e70bfc6..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go +++ /dev/null @@ -1,435 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package route53 - -const ( - - // ErrCodeConcurrentModification for service response error code - // "ConcurrentModification". - // - // Another user submitted a request to create, update, or delete the object - // at the same time that you did. Retry the request. - ErrCodeConcurrentModification = "ConcurrentModification" - - // ErrCodeConflictingDomainExists for service response error code - // "ConflictingDomainExists". - // - // The cause of this error depends on whether you're trying to create a public - // or a private hosted zone: - // - // * Public hosted zone: Two hosted zones that have the same name or that - // have a parent/child relationship (example.com and test.example.com) can't - // have any common name servers. You tried to create a hosted zone that has - // the same name as an existing hosted zone or that's the parent or child - // of an existing hosted zone, and you specified a delegation set that shares - // one or more name servers with the existing hosted zone. For more information, - // see CreateReusableDelegationSet. - // - // * Private hosted zone: You specified an Amazon VPC that you're already - // using for another hosted zone, and the domain that you specified for one - // of the hosted zones is a subdomain of the domain that you specified for - // the other hosted zone. For example, you can't use the same Amazon VPC - // for the hosted zones for example.com and test.example.com. - ErrCodeConflictingDomainExists = "ConflictingDomainExists" - - // ErrCodeConflictingTypes for service response error code - // "ConflictingTypes". - // - // You tried to update a traffic policy instance by using a traffic policy version - // that has a different DNS type than the current type for the instance. You - // specified the type in the JSON document in the CreateTrafficPolicy or CreateTrafficPolicyVersionrequest. - ErrCodeConflictingTypes = "ConflictingTypes" - - // ErrCodeDelegationSetAlreadyCreated for service response error code - // "DelegationSetAlreadyCreated". - // - // A delegation set with the same owner and caller reference combination has - // already been created. - ErrCodeDelegationSetAlreadyCreated = "DelegationSetAlreadyCreated" - - // ErrCodeDelegationSetAlreadyReusable for service response error code - // "DelegationSetAlreadyReusable". - // - // The specified delegation set has already been marked as reusable. - ErrCodeDelegationSetAlreadyReusable = "DelegationSetAlreadyReusable" - - // ErrCodeDelegationSetInUse for service response error code - // "DelegationSetInUse". - // - // The specified delegation contains associated hosted zones which must be deleted - // before the reusable delegation set can be deleted. - ErrCodeDelegationSetInUse = "DelegationSetInUse" - - // ErrCodeDelegationSetNotAvailable for service response error code - // "DelegationSetNotAvailable". - // - // You can create a hosted zone that has the same name as an existing hosted - // zone (example.com is common), but there is a limit to the number of hosted - // zones that have the same name. If you get this error, Amazon Route 53 has - // reached that limit. If you own the domain name and Route 53 generates this - // error, contact Customer Support. - ErrCodeDelegationSetNotAvailable = "DelegationSetNotAvailable" - - // ErrCodeDelegationSetNotReusable for service response error code - // "DelegationSetNotReusable". - // - // A reusable delegation set with the specified ID does not exist. - ErrCodeDelegationSetNotReusable = "DelegationSetNotReusable" - - // ErrCodeHealthCheckAlreadyExists for service response error code - // "HealthCheckAlreadyExists". - // - // The health check you're attempting to create already exists. Amazon Route - // 53 returns this error when you submit a request that has the following values: - // - // * The same value for CallerReference as an existing health check, and - // one or more values that differ from the existing health check that has - // the same caller reference. - // - // * The same value for CallerReference as a health check that you created - // and later deleted, regardless of the other settings in the request. - ErrCodeHealthCheckAlreadyExists = "HealthCheckAlreadyExists" - - // ErrCodeHealthCheckInUse for service response error code - // "HealthCheckInUse". - // - // This error code is not in use. - ErrCodeHealthCheckInUse = "HealthCheckInUse" - - // ErrCodeHealthCheckVersionMismatch for service response error code - // "HealthCheckVersionMismatch". - // - // The value of HealthCheckVersion in the request doesn't match the value of - // HealthCheckVersion in the health check. - ErrCodeHealthCheckVersionMismatch = "HealthCheckVersionMismatch" - - // ErrCodeHostedZoneAlreadyExists for service response error code - // "HostedZoneAlreadyExists". - // - // The hosted zone you're trying to create already exists. Amazon Route 53 returns - // this error when a hosted zone has already been created with the specified - // CallerReference. - ErrCodeHostedZoneAlreadyExists = "HostedZoneAlreadyExists" - - // ErrCodeHostedZoneNotEmpty for service response error code - // "HostedZoneNotEmpty". - // - // The hosted zone contains resource records that are not SOA or NS records. - ErrCodeHostedZoneNotEmpty = "HostedZoneNotEmpty" - - // ErrCodeHostedZoneNotFound for service response error code - // "HostedZoneNotFound". - // - // The specified HostedZone can't be found. - ErrCodeHostedZoneNotFound = "HostedZoneNotFound" - - // ErrCodeHostedZoneNotPrivate for service response error code - // "HostedZoneNotPrivate". - // - // The specified hosted zone is a public hosted zone, not a private hosted zone. - ErrCodeHostedZoneNotPrivate = "HostedZoneNotPrivate" - - // ErrCodeIncompatibleVersion for service response error code - // "IncompatibleVersion". - // - // The resource you're trying to access is unsupported on this Amazon Route - // 53 endpoint. - ErrCodeIncompatibleVersion = "IncompatibleVersion" - - // ErrCodeInsufficientCloudWatchLogsResourcePolicy for service response error code - // "InsufficientCloudWatchLogsResourcePolicy". - // - // Amazon Route 53 doesn't have the permissions required to create log streams - // and send query logs to log streams. Possible causes include the following: - // - // * There is no resource policy that specifies the log group ARN in the - // value for Resource. - // - // * The resource policy that includes the log group ARN in the value for - // Resource doesn't have the necessary permissions. - // - // * The resource policy hasn't finished propagating yet. - ErrCodeInsufficientCloudWatchLogsResourcePolicy = "InsufficientCloudWatchLogsResourcePolicy" - - // ErrCodeInvalidArgument for service response error code - // "InvalidArgument". - // - // Parameter name is invalid. - ErrCodeInvalidArgument = "InvalidArgument" - - // ErrCodeInvalidChangeBatch for service response error code - // "InvalidChangeBatch". - // - // This exception contains a list of messages that might contain one or more - // error messages. Each error message indicates one error in the change batch. - ErrCodeInvalidChangeBatch = "InvalidChangeBatch" - - // ErrCodeInvalidDomainName for service response error code - // "InvalidDomainName". - // - // The specified domain name is not valid. - ErrCodeInvalidDomainName = "InvalidDomainName" - - // ErrCodeInvalidInput for service response error code - // "InvalidInput". - // - // The input is not valid. - ErrCodeInvalidInput = "InvalidInput" - - // ErrCodeInvalidPaginationToken for service response error code - // "InvalidPaginationToken". - // - // The value that you specified to get the second or subsequent page of results - // is invalid. - ErrCodeInvalidPaginationToken = "InvalidPaginationToken" - - // ErrCodeInvalidTrafficPolicyDocument for service response error code - // "InvalidTrafficPolicyDocument". - // - // The format of the traffic policy document that you specified in the Document - // element is invalid. - ErrCodeInvalidTrafficPolicyDocument = "InvalidTrafficPolicyDocument" - - // ErrCodeInvalidVPCId for service response error code - // "InvalidVPCId". - // - // The VPC ID that you specified either isn't a valid ID or the current account - // is not authorized to access this VPC. - ErrCodeInvalidVPCId = "InvalidVPCId" - - // ErrCodeLastVPCAssociation for service response error code - // "LastVPCAssociation". - // - // The VPC that you're trying to disassociate from the private hosted zone is - // the last VPC that is associated with the hosted zone. Amazon Route 53 doesn't - // support disassociating the last VPC from a hosted zone. - ErrCodeLastVPCAssociation = "LastVPCAssociation" - - // ErrCodeLimitsExceeded for service response error code - // "LimitsExceeded". - // - // This operation can't be completed either because the current account has - // reached the limit on reusable delegation sets that it can create or because - // you've reached the limit on the number of Amazon VPCs that you can associate - // with a private hosted zone. To get the current limit on the number of reusable - // delegation sets, see GetAccountLimit. To get the current limit on the number - // of Amazon VPCs that you can associate with a private hosted zone, see GetHostedZoneLimit. - // To request a higher limit, create a case (http://aws.amazon.com/route53-request) - // with the AWS Support Center. - ErrCodeLimitsExceeded = "LimitsExceeded" - - // ErrCodeNoSuchChange for service response error code - // "NoSuchChange". - // - // A change with the specified change ID does not exist. - ErrCodeNoSuchChange = "NoSuchChange" - - // ErrCodeNoSuchCloudWatchLogsLogGroup for service response error code - // "NoSuchCloudWatchLogsLogGroup". - // - // There is no CloudWatch Logs log group with the specified ARN. - ErrCodeNoSuchCloudWatchLogsLogGroup = "NoSuchCloudWatchLogsLogGroup" - - // ErrCodeNoSuchDelegationSet for service response error code - // "NoSuchDelegationSet". - // - // A reusable delegation set with the specified ID does not exist. - ErrCodeNoSuchDelegationSet = "NoSuchDelegationSet" - - // ErrCodeNoSuchGeoLocation for service response error code - // "NoSuchGeoLocation". - // - // Amazon Route 53 doesn't support the specified geographic location. - ErrCodeNoSuchGeoLocation = "NoSuchGeoLocation" - - // ErrCodeNoSuchHealthCheck for service response error code - // "NoSuchHealthCheck". - // - // No health check exists with the specified ID. - ErrCodeNoSuchHealthCheck = "NoSuchHealthCheck" - - // ErrCodeNoSuchHostedZone for service response error code - // "NoSuchHostedZone". - // - // No hosted zone exists with the ID that you specified. - ErrCodeNoSuchHostedZone = "NoSuchHostedZone" - - // ErrCodeNoSuchQueryLoggingConfig for service response error code - // "NoSuchQueryLoggingConfig". - // - // There is no DNS query logging configuration with the specified ID. - ErrCodeNoSuchQueryLoggingConfig = "NoSuchQueryLoggingConfig" - - // ErrCodeNoSuchTrafficPolicy for service response error code - // "NoSuchTrafficPolicy". - // - // No traffic policy exists with the specified ID. - ErrCodeNoSuchTrafficPolicy = "NoSuchTrafficPolicy" - - // ErrCodeNoSuchTrafficPolicyInstance for service response error code - // "NoSuchTrafficPolicyInstance". - // - // No traffic policy instance exists with the specified ID. - ErrCodeNoSuchTrafficPolicyInstance = "NoSuchTrafficPolicyInstance" - - // ErrCodeNotAuthorizedException for service response error code - // "NotAuthorizedException". - // - // Associating the specified VPC with the specified hosted zone has not been - // authorized. - ErrCodeNotAuthorizedException = "NotAuthorizedException" - - // ErrCodePriorRequestNotComplete for service response error code - // "PriorRequestNotComplete". - // - // If Amazon Route 53 can't process a request before the next request arrives, - // it will reject subsequent requests for the same hosted zone and return an - // HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for - // the same request, we recommend that you wait, in intervals of increasing - // duration, before you try the request again. - ErrCodePriorRequestNotComplete = "PriorRequestNotComplete" - - // ErrCodePublicZoneVPCAssociation for service response error code - // "PublicZoneVPCAssociation". - // - // You're trying to associate a VPC with a public hosted zone. Amazon Route - // 53 doesn't support associating a VPC with a public hosted zone. - ErrCodePublicZoneVPCAssociation = "PublicZoneVPCAssociation" - - // ErrCodeQueryLoggingConfigAlreadyExists for service response error code - // "QueryLoggingConfigAlreadyExists". - // - // You can create only one query logging configuration for a hosted zone, and - // a query logging configuration already exists for this hosted zone. - ErrCodeQueryLoggingConfigAlreadyExists = "QueryLoggingConfigAlreadyExists" - - // ErrCodeThrottlingException for service response error code - // "ThrottlingException". - // - // The limit on the number of requests per second was exceeded. - ErrCodeThrottlingException = "ThrottlingException" - - // ErrCodeTooManyHealthChecks for service response error code - // "TooManyHealthChecks". - // - // This health check can't be created because the current account has reached - // the limit on the number of active health checks. - // - // For information about default limits, see Limits (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) - // in the Amazon Route 53 Developer Guide. - // - // For information about how to get the current limit for an account, see GetAccountLimit. - // To request a higher limit, create a case (http://aws.amazon.com/route53-request) - // with the AWS Support Center. - // - // You have reached the maximum number of active health checks for an AWS account. - // To request a higher limit, create a case (http://aws.amazon.com/route53-request) - // with the AWS Support Center. - ErrCodeTooManyHealthChecks = "TooManyHealthChecks" - - // ErrCodeTooManyHostedZones for service response error code - // "TooManyHostedZones". - // - // This operation can't be completed either because the current account has - // reached the limit on the number of hosted zones or because you've reached - // the limit on the number of hosted zones that can be associated with a reusable - // delegation set. - // - // For information about default limits, see Limits (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) - // in the Amazon Route 53 Developer Guide. - // - // To get the current limit on hosted zones that can be created by an account, - // see GetAccountLimit. - // - // To get the current limit on hosted zones that can be associated with a reusable - // delegation set, see GetReusableDelegationSetLimit. - // - // To request a higher limit, create a case (http://aws.amazon.com/route53-request) - // with the AWS Support Center. - ErrCodeTooManyHostedZones = "TooManyHostedZones" - - // ErrCodeTooManyTrafficPolicies for service response error code - // "TooManyTrafficPolicies". - // - // This traffic policy can't be created because the current account has reached - // the limit on the number of traffic policies. - // - // For information about default limits, see Limits (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) - // in the Amazon Route 53 Developer Guide. - // - // To get the current limit for an account, see GetAccountLimit. - // - // To request a higher limit, create a case (http://aws.amazon.com/route53-request) - // with the AWS Support Center. - ErrCodeTooManyTrafficPolicies = "TooManyTrafficPolicies" - - // ErrCodeTooManyTrafficPolicyInstances for service response error code - // "TooManyTrafficPolicyInstances". - // - // This traffic policy instance can't be created because the current account - // has reached the limit on the number of traffic policy instances. - // - // For information about default limits, see Limits (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) - // in the Amazon Route 53 Developer Guide. - // - // For information about how to get the current limit for an account, see GetAccountLimit. - // - // To request a higher limit, create a case (http://aws.amazon.com/route53-request) - // with the AWS Support Center. - ErrCodeTooManyTrafficPolicyInstances = "TooManyTrafficPolicyInstances" - - // ErrCodeTooManyTrafficPolicyVersionsForCurrentPolicy for service response error code - // "TooManyTrafficPolicyVersionsForCurrentPolicy". - // - // This traffic policy version can't be created because you've reached the limit - // of 1000 on the number of versions that you can create for the current traffic - // policy. - // - // To create more traffic policy versions, you can use GetTrafficPolicy to get - // the traffic policy document for a specified traffic policy version, and then - // use CreateTrafficPolicy to create a new traffic policy using the traffic - // policy document. - ErrCodeTooManyTrafficPolicyVersionsForCurrentPolicy = "TooManyTrafficPolicyVersionsForCurrentPolicy" - - // ErrCodeTooManyVPCAssociationAuthorizations for service response error code - // "TooManyVPCAssociationAuthorizations". - // - // You've created the maximum number of authorizations that can be created for - // the specified hosted zone. To authorize another VPC to be associated with - // the hosted zone, submit a DeleteVPCAssociationAuthorization request to remove - // an existing authorization. To get a list of existing authorizations, submit - // a ListVPCAssociationAuthorizations request. - ErrCodeTooManyVPCAssociationAuthorizations = "TooManyVPCAssociationAuthorizations" - - // ErrCodeTrafficPolicyAlreadyExists for service response error code - // "TrafficPolicyAlreadyExists". - // - // A traffic policy that has the same value for Name already exists. - ErrCodeTrafficPolicyAlreadyExists = "TrafficPolicyAlreadyExists" - - // ErrCodeTrafficPolicyInUse for service response error code - // "TrafficPolicyInUse". - // - // One or more traffic policy instances were created by using the specified - // traffic policy. - ErrCodeTrafficPolicyInUse = "TrafficPolicyInUse" - - // ErrCodeTrafficPolicyInstanceAlreadyExists for service response error code - // "TrafficPolicyInstanceAlreadyExists". - // - // There is already a traffic policy instance with the specified ID. - ErrCodeTrafficPolicyInstanceAlreadyExists = "TrafficPolicyInstanceAlreadyExists" - - // ErrCodeVPCAssociationAuthorizationNotFound for service response error code - // "VPCAssociationAuthorizationNotFound". - // - // The VPC that you specified is not authorized to be associated with the hosted - // zone. - ErrCodeVPCAssociationAuthorizationNotFound = "VPCAssociationAuthorizationNotFound" - - // ErrCodeVPCAssociationNotFound for service response error code - // "VPCAssociationNotFound". - // - // The specified VPC and hosted zone are not currently associated. - ErrCodeVPCAssociationNotFound = "VPCAssociationNotFound" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/service.go b/vendor/github.com/aws/aws-sdk-go/service/route53/service.go deleted file mode 100644 index dd22cb2cd..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package route53 - -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/restxml" -) - -// Route53 provides the API operation methods for making requests to -// Amazon Route 53. See this package's package overview docs -// for details on the service. -// -// Route53 methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Route53 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 = "route53" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Route 53" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Route53 client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a Route53 client from just a session. -// svc := route53.New(mySession) -// -// // Create a Route53 client with additional configuration -// svc := route53.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Route53 { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Route53 { - svc := &Route53{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2013-04-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Route53 operation and runs any -// custom request initialization. -func (c *Route53) 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/route53/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/service/route53/unmarshal_error.go deleted file mode 100644 index 266e9a8ba..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/unmarshal_error.go +++ /dev/null @@ -1,77 +0,0 @@ -package route53 - -import ( - "bytes" - "encoding/xml" - "io/ioutil" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol/restxml" -) - -type baseXMLErrorResponse struct { - XMLName xml.Name -} - -type standardXMLErrorResponse struct { - XMLName xml.Name `xml:"ErrorResponse"` - Code string `xml:"Error>Code"` - Message string `xml:"Error>Message"` - RequestID string `xml:"RequestId"` -} - -type invalidChangeBatchXMLErrorResponse struct { - XMLName xml.Name `xml:"InvalidChangeBatch"` - Messages []string `xml:"Messages>Message"` -} - -func unmarshalChangeResourceRecordSetsError(r *request.Request) { - defer r.HTTPResponse.Body.Close() - - responseBody, err := ioutil.ReadAll(r.HTTPResponse.Body) - - if err != nil { - r.Error = awserr.New("SerializationError", "failed to read Route53 XML error response", err) - return - } - - baseError := &baseXMLErrorResponse{} - - if err := xml.Unmarshal(responseBody, baseError); err != nil { - r.Error = awserr.New("SerializationError", "failed to decode Route53 XML error response", err) - return - } - - switch baseError.XMLName.Local { - case "InvalidChangeBatch": - unmarshalInvalidChangeBatchError(r, responseBody) - default: - r.HTTPResponse.Body = ioutil.NopCloser(bytes.NewReader(responseBody)) - restxml.UnmarshalError(r) - } -} - -func unmarshalInvalidChangeBatchError(r *request.Request, requestBody []byte) { - resp := &invalidChangeBatchXMLErrorResponse{} - err := xml.Unmarshal(requestBody, resp) - - if err != nil { - r.Error = awserr.New("SerializationError", "failed to decode query XML error response", err) - return - } - - const errorCode = "InvalidChangeBatch" - errors := []error{} - - for _, msg := range resp.Messages { - errors = append(errors, awserr.New(errorCode, msg, nil)) - } - - r.Error = awserr.NewRequestFailure( - awserr.NewBatchError(errorCode, "ChangeBatch errors occurred", errors), - r.HTTPResponse.StatusCode, - r.RequestID, - ) - -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/route53/waiters.go deleted file mode 100644 index 9bd7a9a71..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/waiters.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package route53 - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilResourceRecordSetsChanged uses the Route 53 API operation -// GetChange to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *Route53) WaitUntilResourceRecordSetsChanged(input *GetChangeInput) error { - return c.WaitUntilResourceRecordSetsChangedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilResourceRecordSetsChangedWithContext is an extended version of WaitUntilResourceRecordSetsChanged. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53) WaitUntilResourceRecordSetsChangedWithContext(ctx aws.Context, input *GetChangeInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilResourceRecordSetsChanged", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "ChangeInfo.Status", - Expected: "INSYNC", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetChangeInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetChangeRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53resolver/api.go b/vendor/github.com/aws/aws-sdk-go/service/route53resolver/api.go deleted file mode 100644 index 6bdbd18bf..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/route53resolver/api.go +++ /dev/null @@ -1,5202 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package route53resolver - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAssociateResolverEndpointIpAddress = "AssociateResolverEndpointIpAddress" - -// AssociateResolverEndpointIpAddressRequest generates a "aws/request.Request" representing the -// client's request for the AssociateResolverEndpointIpAddress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateResolverEndpointIpAddress for more information on using the AssociateResolverEndpointIpAddress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateResolverEndpointIpAddressRequest method. -// req, resp := client.AssociateResolverEndpointIpAddressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/AssociateResolverEndpointIpAddress -func (c *Route53Resolver) AssociateResolverEndpointIpAddressRequest(input *AssociateResolverEndpointIpAddressInput) (req *request.Request, output *AssociateResolverEndpointIpAddressOutput) { - op := &request.Operation{ - Name: opAssociateResolverEndpointIpAddress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateResolverEndpointIpAddressInput{} - } - - output = &AssociateResolverEndpointIpAddressOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateResolverEndpointIpAddress API operation for Amazon Route 53 Resolver. -// -// Adds IP addresses to an inbound or an outbound resolver endpoint. If you -// want to adding more than one IP address, submit one AssociateResolverEndpointIpAddress -// request for each IP address. -// -// To remove an IP address from an endpoint, see DisassociateResolverEndpointIpAddress. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation AssociateResolverEndpointIpAddress for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is invalid. -// -// * ErrCodeResourceExistsException "ResourceExistsException" -// The resource that you tried to create already exists. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request caused one or more limits to be exceeded. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/AssociateResolverEndpointIpAddress -func (c *Route53Resolver) AssociateResolverEndpointIpAddress(input *AssociateResolverEndpointIpAddressInput) (*AssociateResolverEndpointIpAddressOutput, error) { - req, out := c.AssociateResolverEndpointIpAddressRequest(input) - return out, req.Send() -} - -// AssociateResolverEndpointIpAddressWithContext is the same as AssociateResolverEndpointIpAddress with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateResolverEndpointIpAddress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) AssociateResolverEndpointIpAddressWithContext(ctx aws.Context, input *AssociateResolverEndpointIpAddressInput, opts ...request.Option) (*AssociateResolverEndpointIpAddressOutput, error) { - req, out := c.AssociateResolverEndpointIpAddressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateResolverRule = "AssociateResolverRule" - -// AssociateResolverRuleRequest generates a "aws/request.Request" representing the -// client's request for the AssociateResolverRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateResolverRule for more information on using the AssociateResolverRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateResolverRuleRequest method. -// req, resp := client.AssociateResolverRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/AssociateResolverRule -func (c *Route53Resolver) AssociateResolverRuleRequest(input *AssociateResolverRuleInput) (req *request.Request, output *AssociateResolverRuleOutput) { - op := &request.Operation{ - Name: opAssociateResolverRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateResolverRuleInput{} - } - - output = &AssociateResolverRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateResolverRule API operation for Amazon Route 53 Resolver. -// -// Associates a resolver rule with a VPC. When you associate a rule with a VPC, -// Resolver forwards all DNS queries for the domain name that is specified in -// the rule and that originate in the VPC. The queries are forwarded to the -// IP addresses for the DNS resolvers that are specified in the rule. For more -// information about rules, see CreateResolverRule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation AssociateResolverRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is invalid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeResourceUnavailableException "ResourceUnavailableException" -// The specified resource isn't available. -// -// * ErrCodeResourceExistsException "ResourceExistsException" -// The resource that you tried to create already exists. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/AssociateResolverRule -func (c *Route53Resolver) AssociateResolverRule(input *AssociateResolverRuleInput) (*AssociateResolverRuleOutput, error) { - req, out := c.AssociateResolverRuleRequest(input) - return out, req.Send() -} - -// AssociateResolverRuleWithContext is the same as AssociateResolverRule with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateResolverRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) AssociateResolverRuleWithContext(ctx aws.Context, input *AssociateResolverRuleInput, opts ...request.Option) (*AssociateResolverRuleOutput, error) { - req, out := c.AssociateResolverRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateResolverEndpoint = "CreateResolverEndpoint" - -// CreateResolverEndpointRequest generates a "aws/request.Request" representing the -// client's request for the CreateResolverEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateResolverEndpoint for more information on using the CreateResolverEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateResolverEndpointRequest method. -// req, resp := client.CreateResolverEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/CreateResolverEndpoint -func (c *Route53Resolver) CreateResolverEndpointRequest(input *CreateResolverEndpointInput) (req *request.Request, output *CreateResolverEndpointOutput) { - op := &request.Operation{ - Name: opCreateResolverEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateResolverEndpointInput{} - } - - output = &CreateResolverEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateResolverEndpoint API operation for Amazon Route 53 Resolver. -// -// Creates a resolver endpoint. There are two types of resolver endpoints, inbound -// and outbound: -// -// * An inbound resolver endpoint forwards DNS queries to the DNS service -// for a VPC from your network or another VPC. -// -// * An outbound resolver endpoint forwards DNS queries from the DNS service -// for a VPC to your network or another VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation CreateResolverEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is invalid. -// -// * ErrCodeResourceExistsException "ResourceExistsException" -// The resource that you tried to create already exists. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request caused one or more limits to be exceeded. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/CreateResolverEndpoint -func (c *Route53Resolver) CreateResolverEndpoint(input *CreateResolverEndpointInput) (*CreateResolverEndpointOutput, error) { - req, out := c.CreateResolverEndpointRequest(input) - return out, req.Send() -} - -// CreateResolverEndpointWithContext is the same as CreateResolverEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See CreateResolverEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) CreateResolverEndpointWithContext(ctx aws.Context, input *CreateResolverEndpointInput, opts ...request.Option) (*CreateResolverEndpointOutput, error) { - req, out := c.CreateResolverEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateResolverRule = "CreateResolverRule" - -// CreateResolverRuleRequest generates a "aws/request.Request" representing the -// client's request for the CreateResolverRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateResolverRule for more information on using the CreateResolverRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateResolverRuleRequest method. -// req, resp := client.CreateResolverRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/CreateResolverRule -func (c *Route53Resolver) CreateResolverRuleRequest(input *CreateResolverRuleInput) (req *request.Request, output *CreateResolverRuleOutput) { - op := &request.Operation{ - Name: opCreateResolverRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateResolverRuleInput{} - } - - output = &CreateResolverRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateResolverRule API operation for Amazon Route 53 Resolver. -// -// For DNS queries that originate in your VPCs, specifies which resolver endpoint -// the queries pass through, one domain name that you want to forward to your -// network, and the IP addresses of the DNS resolvers in your network. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation CreateResolverRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is invalid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request caused one or more limits to be exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeResourceExistsException "ResourceExistsException" -// The resource that you tried to create already exists. -// -// * ErrCodeResourceUnavailableException "ResourceUnavailableException" -// The specified resource isn't available. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/CreateResolverRule -func (c *Route53Resolver) CreateResolverRule(input *CreateResolverRuleInput) (*CreateResolverRuleOutput, error) { - req, out := c.CreateResolverRuleRequest(input) - return out, req.Send() -} - -// CreateResolverRuleWithContext is the same as CreateResolverRule with the addition of -// the ability to pass a context and additional request options. -// -// See CreateResolverRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) CreateResolverRuleWithContext(ctx aws.Context, input *CreateResolverRuleInput, opts ...request.Option) (*CreateResolverRuleOutput, error) { - req, out := c.CreateResolverRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteResolverEndpoint = "DeleteResolverEndpoint" - -// DeleteResolverEndpointRequest generates a "aws/request.Request" representing the -// client's request for the DeleteResolverEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteResolverEndpoint for more information on using the DeleteResolverEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteResolverEndpointRequest method. -// req, resp := client.DeleteResolverEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DeleteResolverEndpoint -func (c *Route53Resolver) DeleteResolverEndpointRequest(input *DeleteResolverEndpointInput) (req *request.Request, output *DeleteResolverEndpointOutput) { - op := &request.Operation{ - Name: opDeleteResolverEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteResolverEndpointInput{} - } - - output = &DeleteResolverEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteResolverEndpoint API operation for Amazon Route 53 Resolver. -// -// Deletes a resolver endpoint. The effect of deleting a resolver endpoint depends -// on whether it's an inbound or an outbound resolver endpoint: -// -// * Inbound: DNS queries from your network or another VPC are no longer -// routed to the DNS service for the specified VPC. -// -// * Outbound: DNS queries from a VPC are no longer routed to your network -// or to another VPC. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation DeleteResolverEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is invalid. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DeleteResolverEndpoint -func (c *Route53Resolver) DeleteResolverEndpoint(input *DeleteResolverEndpointInput) (*DeleteResolverEndpointOutput, error) { - req, out := c.DeleteResolverEndpointRequest(input) - return out, req.Send() -} - -// DeleteResolverEndpointWithContext is the same as DeleteResolverEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteResolverEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) DeleteResolverEndpointWithContext(ctx aws.Context, input *DeleteResolverEndpointInput, opts ...request.Option) (*DeleteResolverEndpointOutput, error) { - req, out := c.DeleteResolverEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteResolverRule = "DeleteResolverRule" - -// DeleteResolverRuleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteResolverRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteResolverRule for more information on using the DeleteResolverRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteResolverRuleRequest method. -// req, resp := client.DeleteResolverRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DeleteResolverRule -func (c *Route53Resolver) DeleteResolverRuleRequest(input *DeleteResolverRuleInput) (req *request.Request, output *DeleteResolverRuleOutput) { - op := &request.Operation{ - Name: opDeleteResolverRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteResolverRuleInput{} - } - - output = &DeleteResolverRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteResolverRule API operation for Amazon Route 53 Resolver. -// -// Deletes a resolver rule. Before you can delete a resolver rule, you must -// disassociate it from all the VPCs that you associated the resolver rule with. -// For more infomation, see DisassociateResolverRule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation DeleteResolverRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The resource that you tried to update or delete is currently in use. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DeleteResolverRule -func (c *Route53Resolver) DeleteResolverRule(input *DeleteResolverRuleInput) (*DeleteResolverRuleOutput, error) { - req, out := c.DeleteResolverRuleRequest(input) - return out, req.Send() -} - -// DeleteResolverRuleWithContext is the same as DeleteResolverRule with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteResolverRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) DeleteResolverRuleWithContext(ctx aws.Context, input *DeleteResolverRuleInput, opts ...request.Option) (*DeleteResolverRuleOutput, error) { - req, out := c.DeleteResolverRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateResolverEndpointIpAddress = "DisassociateResolverEndpointIpAddress" - -// DisassociateResolverEndpointIpAddressRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateResolverEndpointIpAddress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateResolverEndpointIpAddress for more information on using the DisassociateResolverEndpointIpAddress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateResolverEndpointIpAddressRequest method. -// req, resp := client.DisassociateResolverEndpointIpAddressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DisassociateResolverEndpointIpAddress -func (c *Route53Resolver) DisassociateResolverEndpointIpAddressRequest(input *DisassociateResolverEndpointIpAddressInput) (req *request.Request, output *DisassociateResolverEndpointIpAddressOutput) { - op := &request.Operation{ - Name: opDisassociateResolverEndpointIpAddress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateResolverEndpointIpAddressInput{} - } - - output = &DisassociateResolverEndpointIpAddressOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisassociateResolverEndpointIpAddress API operation for Amazon Route 53 Resolver. -// -// Removes IP addresses from an inbound or an outbound resolver endpoint. If -// you want to remove more than one IP address, submit one DisassociateResolverEndpointIpAddress -// request for each IP address. -// -// To add an IP address to an endpoint, see AssociateResolverEndpointIpAddress. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation DisassociateResolverEndpointIpAddress for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is invalid. -// -// * ErrCodeResourceExistsException "ResourceExistsException" -// The resource that you tried to create already exists. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DisassociateResolverEndpointIpAddress -func (c *Route53Resolver) DisassociateResolverEndpointIpAddress(input *DisassociateResolverEndpointIpAddressInput) (*DisassociateResolverEndpointIpAddressOutput, error) { - req, out := c.DisassociateResolverEndpointIpAddressRequest(input) - return out, req.Send() -} - -// DisassociateResolverEndpointIpAddressWithContext is the same as DisassociateResolverEndpointIpAddress with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateResolverEndpointIpAddress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) DisassociateResolverEndpointIpAddressWithContext(ctx aws.Context, input *DisassociateResolverEndpointIpAddressInput, opts ...request.Option) (*DisassociateResolverEndpointIpAddressOutput, error) { - req, out := c.DisassociateResolverEndpointIpAddressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateResolverRule = "DisassociateResolverRule" - -// DisassociateResolverRuleRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateResolverRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateResolverRule for more information on using the DisassociateResolverRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateResolverRuleRequest method. -// req, resp := client.DisassociateResolverRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DisassociateResolverRule -func (c *Route53Resolver) DisassociateResolverRuleRequest(input *DisassociateResolverRuleInput) (req *request.Request, output *DisassociateResolverRuleOutput) { - op := &request.Operation{ - Name: opDisassociateResolverRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateResolverRuleInput{} - } - - output = &DisassociateResolverRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisassociateResolverRule API operation for Amazon Route 53 Resolver. -// -// Removes the association between a specified resolver rule and a specified -// VPC. -// -// If you disassociate a resolver rule from a VPC, Resolver stops forwarding -// DNS queries for the domain name that you specified in the resolver rule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation DisassociateResolverRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DisassociateResolverRule -func (c *Route53Resolver) DisassociateResolverRule(input *DisassociateResolverRuleInput) (*DisassociateResolverRuleOutput, error) { - req, out := c.DisassociateResolverRuleRequest(input) - return out, req.Send() -} - -// DisassociateResolverRuleWithContext is the same as DisassociateResolverRule with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateResolverRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) DisassociateResolverRuleWithContext(ctx aws.Context, input *DisassociateResolverRuleInput, opts ...request.Option) (*DisassociateResolverRuleOutput, error) { - req, out := c.DisassociateResolverRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetResolverEndpoint = "GetResolverEndpoint" - -// GetResolverEndpointRequest generates a "aws/request.Request" representing the -// client's request for the GetResolverEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResolverEndpoint for more information on using the GetResolverEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetResolverEndpointRequest method. -// req, resp := client.GetResolverEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverEndpoint -func (c *Route53Resolver) GetResolverEndpointRequest(input *GetResolverEndpointInput) (req *request.Request, output *GetResolverEndpointOutput) { - op := &request.Operation{ - Name: opGetResolverEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetResolverEndpointInput{} - } - - output = &GetResolverEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResolverEndpoint API operation for Amazon Route 53 Resolver. -// -// Gets information about a specified resolver endpoint, such as whether it's -// an inbound or an outbound resolver endpoint, and the current status of the -// endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation GetResolverEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverEndpoint -func (c *Route53Resolver) GetResolverEndpoint(input *GetResolverEndpointInput) (*GetResolverEndpointOutput, error) { - req, out := c.GetResolverEndpointRequest(input) - return out, req.Send() -} - -// GetResolverEndpointWithContext is the same as GetResolverEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See GetResolverEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) GetResolverEndpointWithContext(ctx aws.Context, input *GetResolverEndpointInput, opts ...request.Option) (*GetResolverEndpointOutput, error) { - req, out := c.GetResolverEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetResolverRule = "GetResolverRule" - -// GetResolverRuleRequest generates a "aws/request.Request" representing the -// client's request for the GetResolverRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResolverRule for more information on using the GetResolverRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetResolverRuleRequest method. -// req, resp := client.GetResolverRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverRule -func (c *Route53Resolver) GetResolverRuleRequest(input *GetResolverRuleInput) (req *request.Request, output *GetResolverRuleOutput) { - op := &request.Operation{ - Name: opGetResolverRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetResolverRuleInput{} - } - - output = &GetResolverRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResolverRule API operation for Amazon Route 53 Resolver. -// -// Gets information about a specified resolver rule, such as the domain name -// that the rule forwards DNS queries for and the ID of the outbound resolver -// endpoint that the rule is associated with. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation GetResolverRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverRule -func (c *Route53Resolver) GetResolverRule(input *GetResolverRuleInput) (*GetResolverRuleOutput, error) { - req, out := c.GetResolverRuleRequest(input) - return out, req.Send() -} - -// GetResolverRuleWithContext is the same as GetResolverRule with the addition of -// the ability to pass a context and additional request options. -// -// See GetResolverRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) GetResolverRuleWithContext(ctx aws.Context, input *GetResolverRuleInput, opts ...request.Option) (*GetResolverRuleOutput, error) { - req, out := c.GetResolverRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetResolverRuleAssociation = "GetResolverRuleAssociation" - -// GetResolverRuleAssociationRequest generates a "aws/request.Request" representing the -// client's request for the GetResolverRuleAssociation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResolverRuleAssociation for more information on using the GetResolverRuleAssociation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetResolverRuleAssociationRequest method. -// req, resp := client.GetResolverRuleAssociationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverRuleAssociation -func (c *Route53Resolver) GetResolverRuleAssociationRequest(input *GetResolverRuleAssociationInput) (req *request.Request, output *GetResolverRuleAssociationOutput) { - op := &request.Operation{ - Name: opGetResolverRuleAssociation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetResolverRuleAssociationInput{} - } - - output = &GetResolverRuleAssociationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResolverRuleAssociation API operation for Amazon Route 53 Resolver. -// -// Gets information about an association between a specified resolver rule and -// a VPC. You associate a resolver rule and a VPC using AssociateResolverRule. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation GetResolverRuleAssociation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverRuleAssociation -func (c *Route53Resolver) GetResolverRuleAssociation(input *GetResolverRuleAssociationInput) (*GetResolverRuleAssociationOutput, error) { - req, out := c.GetResolverRuleAssociationRequest(input) - return out, req.Send() -} - -// GetResolverRuleAssociationWithContext is the same as GetResolverRuleAssociation with the addition of -// the ability to pass a context and additional request options. -// -// See GetResolverRuleAssociation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) GetResolverRuleAssociationWithContext(ctx aws.Context, input *GetResolverRuleAssociationInput, opts ...request.Option) (*GetResolverRuleAssociationOutput, error) { - req, out := c.GetResolverRuleAssociationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetResolverRulePolicy = "GetResolverRulePolicy" - -// GetResolverRulePolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetResolverRulePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResolverRulePolicy for more information on using the GetResolverRulePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetResolverRulePolicyRequest method. -// req, resp := client.GetResolverRulePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverRulePolicy -func (c *Route53Resolver) GetResolverRulePolicyRequest(input *GetResolverRulePolicyInput) (req *request.Request, output *GetResolverRulePolicyOutput) { - op := &request.Operation{ - Name: opGetResolverRulePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetResolverRulePolicyInput{} - } - - output = &GetResolverRulePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResolverRulePolicy API operation for Amazon Route 53 Resolver. -// -// Gets information about a resolver rule policy. A resolver rule policy specifies -// the Resolver operations and resources that you want to allow another AWS -// account to be able to use. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation GetResolverRulePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeUnknownResourceException "UnknownResourceException" -// The specified resource doesn't exist. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverRulePolicy -func (c *Route53Resolver) GetResolverRulePolicy(input *GetResolverRulePolicyInput) (*GetResolverRulePolicyOutput, error) { - req, out := c.GetResolverRulePolicyRequest(input) - return out, req.Send() -} - -// GetResolverRulePolicyWithContext is the same as GetResolverRulePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetResolverRulePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) GetResolverRulePolicyWithContext(ctx aws.Context, input *GetResolverRulePolicyInput, opts ...request.Option) (*GetResolverRulePolicyOutput, error) { - req, out := c.GetResolverRulePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListResolverEndpointIpAddresses = "ListResolverEndpointIpAddresses" - -// ListResolverEndpointIpAddressesRequest generates a "aws/request.Request" representing the -// client's request for the ListResolverEndpointIpAddresses operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResolverEndpointIpAddresses for more information on using the ListResolverEndpointIpAddresses -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResolverEndpointIpAddressesRequest method. -// req, resp := client.ListResolverEndpointIpAddressesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverEndpointIpAddresses -func (c *Route53Resolver) ListResolverEndpointIpAddressesRequest(input *ListResolverEndpointIpAddressesInput) (req *request.Request, output *ListResolverEndpointIpAddressesOutput) { - op := &request.Operation{ - Name: opListResolverEndpointIpAddresses, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListResolverEndpointIpAddressesInput{} - } - - output = &ListResolverEndpointIpAddressesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResolverEndpointIpAddresses API operation for Amazon Route 53 Resolver. -// -// Gets the IP addresses for a specified resolver endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation ListResolverEndpointIpAddresses for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The value that you specified for NextToken in a List request isn't valid. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverEndpointIpAddresses -func (c *Route53Resolver) ListResolverEndpointIpAddresses(input *ListResolverEndpointIpAddressesInput) (*ListResolverEndpointIpAddressesOutput, error) { - req, out := c.ListResolverEndpointIpAddressesRequest(input) - return out, req.Send() -} - -// ListResolverEndpointIpAddressesWithContext is the same as ListResolverEndpointIpAddresses with the addition of -// the ability to pass a context and additional request options. -// -// See ListResolverEndpointIpAddresses for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) ListResolverEndpointIpAddressesWithContext(ctx aws.Context, input *ListResolverEndpointIpAddressesInput, opts ...request.Option) (*ListResolverEndpointIpAddressesOutput, error) { - req, out := c.ListResolverEndpointIpAddressesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListResolverEndpointIpAddressesPages iterates over the pages of a ListResolverEndpointIpAddresses operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListResolverEndpointIpAddresses 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 ListResolverEndpointIpAddresses operation. -// pageNum := 0 -// err := client.ListResolverEndpointIpAddressesPages(params, -// func(page *ListResolverEndpointIpAddressesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Route53Resolver) ListResolverEndpointIpAddressesPages(input *ListResolverEndpointIpAddressesInput, fn func(*ListResolverEndpointIpAddressesOutput, bool) bool) error { - return c.ListResolverEndpointIpAddressesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListResolverEndpointIpAddressesPagesWithContext same as ListResolverEndpointIpAddressesPages 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 *Route53Resolver) ListResolverEndpointIpAddressesPagesWithContext(ctx aws.Context, input *ListResolverEndpointIpAddressesInput, fn func(*ListResolverEndpointIpAddressesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListResolverEndpointIpAddressesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListResolverEndpointIpAddressesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResolverEndpointIpAddressesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListResolverEndpoints = "ListResolverEndpoints" - -// ListResolverEndpointsRequest generates a "aws/request.Request" representing the -// client's request for the ListResolverEndpoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResolverEndpoints for more information on using the ListResolverEndpoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResolverEndpointsRequest method. -// req, resp := client.ListResolverEndpointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverEndpoints -func (c *Route53Resolver) ListResolverEndpointsRequest(input *ListResolverEndpointsInput) (req *request.Request, output *ListResolverEndpointsOutput) { - op := &request.Operation{ - Name: opListResolverEndpoints, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListResolverEndpointsInput{} - } - - output = &ListResolverEndpointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResolverEndpoints API operation for Amazon Route 53 Resolver. -// -// Lists all the resolver endpoints that were created using the current AWS -// account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation ListResolverEndpoints for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The value that you specified for NextToken in a List request isn't valid. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is invalid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverEndpoints -func (c *Route53Resolver) ListResolverEndpoints(input *ListResolverEndpointsInput) (*ListResolverEndpointsOutput, error) { - req, out := c.ListResolverEndpointsRequest(input) - return out, req.Send() -} - -// ListResolverEndpointsWithContext is the same as ListResolverEndpoints with the addition of -// the ability to pass a context and additional request options. -// -// See ListResolverEndpoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) ListResolverEndpointsWithContext(ctx aws.Context, input *ListResolverEndpointsInput, opts ...request.Option) (*ListResolverEndpointsOutput, error) { - req, out := c.ListResolverEndpointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListResolverEndpointsPages iterates over the pages of a ListResolverEndpoints operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListResolverEndpoints 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 ListResolverEndpoints operation. -// pageNum := 0 -// err := client.ListResolverEndpointsPages(params, -// func(page *ListResolverEndpointsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Route53Resolver) ListResolverEndpointsPages(input *ListResolverEndpointsInput, fn func(*ListResolverEndpointsOutput, bool) bool) error { - return c.ListResolverEndpointsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListResolverEndpointsPagesWithContext same as ListResolverEndpointsPages 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 *Route53Resolver) ListResolverEndpointsPagesWithContext(ctx aws.Context, input *ListResolverEndpointsInput, fn func(*ListResolverEndpointsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListResolverEndpointsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListResolverEndpointsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResolverEndpointsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListResolverRuleAssociations = "ListResolverRuleAssociations" - -// ListResolverRuleAssociationsRequest generates a "aws/request.Request" representing the -// client's request for the ListResolverRuleAssociations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResolverRuleAssociations for more information on using the ListResolverRuleAssociations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResolverRuleAssociationsRequest method. -// req, resp := client.ListResolverRuleAssociationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverRuleAssociations -func (c *Route53Resolver) ListResolverRuleAssociationsRequest(input *ListResolverRuleAssociationsInput) (req *request.Request, output *ListResolverRuleAssociationsOutput) { - op := &request.Operation{ - Name: opListResolverRuleAssociations, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListResolverRuleAssociationsInput{} - } - - output = &ListResolverRuleAssociationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResolverRuleAssociations API operation for Amazon Route 53 Resolver. -// -// Lists the associations that were created between resolver rules and VPCs -// using the current AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation ListResolverRuleAssociations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The value that you specified for NextToken in a List request isn't valid. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is invalid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverRuleAssociations -func (c *Route53Resolver) ListResolverRuleAssociations(input *ListResolverRuleAssociationsInput) (*ListResolverRuleAssociationsOutput, error) { - req, out := c.ListResolverRuleAssociationsRequest(input) - return out, req.Send() -} - -// ListResolverRuleAssociationsWithContext is the same as ListResolverRuleAssociations with the addition of -// the ability to pass a context and additional request options. -// -// See ListResolverRuleAssociations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) ListResolverRuleAssociationsWithContext(ctx aws.Context, input *ListResolverRuleAssociationsInput, opts ...request.Option) (*ListResolverRuleAssociationsOutput, error) { - req, out := c.ListResolverRuleAssociationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListResolverRuleAssociationsPages iterates over the pages of a ListResolverRuleAssociations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListResolverRuleAssociations 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 ListResolverRuleAssociations operation. -// pageNum := 0 -// err := client.ListResolverRuleAssociationsPages(params, -// func(page *ListResolverRuleAssociationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Route53Resolver) ListResolverRuleAssociationsPages(input *ListResolverRuleAssociationsInput, fn func(*ListResolverRuleAssociationsOutput, bool) bool) error { - return c.ListResolverRuleAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListResolverRuleAssociationsPagesWithContext same as ListResolverRuleAssociationsPages 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 *Route53Resolver) ListResolverRuleAssociationsPagesWithContext(ctx aws.Context, input *ListResolverRuleAssociationsInput, fn func(*ListResolverRuleAssociationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListResolverRuleAssociationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListResolverRuleAssociationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResolverRuleAssociationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListResolverRules = "ListResolverRules" - -// ListResolverRulesRequest generates a "aws/request.Request" representing the -// client's request for the ListResolverRules operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResolverRules for more information on using the ListResolverRules -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResolverRulesRequest method. -// req, resp := client.ListResolverRulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverRules -func (c *Route53Resolver) ListResolverRulesRequest(input *ListResolverRulesInput) (req *request.Request, output *ListResolverRulesOutput) { - op := &request.Operation{ - Name: opListResolverRules, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListResolverRulesInput{} - } - - output = &ListResolverRulesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResolverRules API operation for Amazon Route 53 Resolver. -// -// Lists the resolver rules that were created using the current AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation ListResolverRules for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The value that you specified for NextToken in a List request isn't valid. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is invalid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverRules -func (c *Route53Resolver) ListResolverRules(input *ListResolverRulesInput) (*ListResolverRulesOutput, error) { - req, out := c.ListResolverRulesRequest(input) - return out, req.Send() -} - -// ListResolverRulesWithContext is the same as ListResolverRules with the addition of -// the ability to pass a context and additional request options. -// -// See ListResolverRules for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) ListResolverRulesWithContext(ctx aws.Context, input *ListResolverRulesInput, opts ...request.Option) (*ListResolverRulesOutput, error) { - req, out := c.ListResolverRulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListResolverRulesPages iterates over the pages of a ListResolverRules operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListResolverRules 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 ListResolverRules operation. -// pageNum := 0 -// err := client.ListResolverRulesPages(params, -// func(page *ListResolverRulesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Route53Resolver) ListResolverRulesPages(input *ListResolverRulesInput, fn func(*ListResolverRulesOutput, bool) bool) error { - return c.ListResolverRulesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListResolverRulesPagesWithContext same as ListResolverRulesPages 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 *Route53Resolver) ListResolverRulesPagesWithContext(ctx aws.Context, input *ListResolverRulesInput, fn func(*ListResolverRulesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListResolverRulesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListResolverRulesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResolverRulesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTagsForResource = "ListTagsForResource" - -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the 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/route53resolver-2018-04-01/ListTagsForResource -func (c *Route53Resolver) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for Amazon Route 53 Resolver. -// -// Lists the tags that you associated with the specified resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The value that you specified for NextToken in a List request isn't valid. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is invalid. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListTagsForResource -func (c *Route53Resolver) 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 *Route53Resolver) 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 opPutResolverRulePolicy = "PutResolverRulePolicy" - -// PutResolverRulePolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutResolverRulePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutResolverRulePolicy for more information on using the PutResolverRulePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutResolverRulePolicyRequest method. -// req, resp := client.PutResolverRulePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/PutResolverRulePolicy -func (c *Route53Resolver) PutResolverRulePolicyRequest(input *PutResolverRulePolicyInput) (req *request.Request, output *PutResolverRulePolicyOutput) { - op := &request.Operation{ - Name: opPutResolverRulePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutResolverRulePolicyInput{} - } - - output = &PutResolverRulePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutResolverRulePolicy API operation for Amazon Route 53 Resolver. -// -// Specifies the Resolver operations and resources that you want to allow another -// AWS account to be able to use. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation PutResolverRulePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidPolicyDocument "InvalidPolicyDocument" -// The specified resolver rule policy is invalid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeUnknownResourceException "UnknownResourceException" -// The specified resource doesn't exist. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/PutResolverRulePolicy -func (c *Route53Resolver) PutResolverRulePolicy(input *PutResolverRulePolicyInput) (*PutResolverRulePolicyOutput, error) { - req, out := c.PutResolverRulePolicyRequest(input) - return out, req.Send() -} - -// PutResolverRulePolicyWithContext is the same as PutResolverRulePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutResolverRulePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) PutResolverRulePolicyWithContext(ctx aws.Context, input *PutResolverRulePolicyInput, opts ...request.Option) (*PutResolverRulePolicyOutput, error) { - req, out := c.PutResolverRulePolicyRequest(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/route53resolver-2018-04-01/TagResource -func (c *Route53Resolver) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for Amazon Route 53 Resolver. -// -// Adds one or more tags to a specified resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// The request caused one or more limits to be exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInvalidTagException "InvalidTagException" -// The specified tag is invalid. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/TagResource -func (c *Route53Resolver) 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 *Route53Resolver) 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/route53resolver-2018-04-01/UntagResource -func (c *Route53Resolver) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for Amazon Route 53 Resolver. -// -// Removes one or more tags from a specified resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/UntagResource -func (c *Route53Resolver) 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 *Route53Resolver) 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 opUpdateResolverEndpoint = "UpdateResolverEndpoint" - -// UpdateResolverEndpointRequest generates a "aws/request.Request" representing the -// client's request for the UpdateResolverEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateResolverEndpoint for more information on using the UpdateResolverEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateResolverEndpointRequest method. -// req, resp := client.UpdateResolverEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/UpdateResolverEndpoint -func (c *Route53Resolver) UpdateResolverEndpointRequest(input *UpdateResolverEndpointInput) (req *request.Request, output *UpdateResolverEndpointOutput) { - op := &request.Operation{ - Name: opUpdateResolverEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateResolverEndpointInput{} - } - - output = &UpdateResolverEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateResolverEndpoint API operation for Amazon Route 53 Resolver. -// -// Updates the name of an inbound or an outbound resolver endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation UpdateResolverEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is invalid. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/UpdateResolverEndpoint -func (c *Route53Resolver) UpdateResolverEndpoint(input *UpdateResolverEndpointInput) (*UpdateResolverEndpointOutput, error) { - req, out := c.UpdateResolverEndpointRequest(input) - return out, req.Send() -} - -// UpdateResolverEndpointWithContext is the same as UpdateResolverEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateResolverEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) UpdateResolverEndpointWithContext(ctx aws.Context, input *UpdateResolverEndpointInput, opts ...request.Option) (*UpdateResolverEndpointOutput, error) { - req, out := c.UpdateResolverEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateResolverRule = "UpdateResolverRule" - -// UpdateResolverRuleRequest generates a "aws/request.Request" representing the -// client's request for the UpdateResolverRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateResolverRule for more information on using the UpdateResolverRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateResolverRuleRequest method. -// req, resp := client.UpdateResolverRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/UpdateResolverRule -func (c *Route53Resolver) UpdateResolverRuleRequest(input *UpdateResolverRuleInput) (req *request.Request, output *UpdateResolverRuleOutput) { - op := &request.Operation{ - Name: opUpdateResolverRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateResolverRuleInput{} - } - - output = &UpdateResolverRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateResolverRule API operation for Amazon Route 53 Resolver. -// -// Updates settings for a specified resolver rule. ResolverRuleId is required, -// and all other parameters are optional. If you don't specify a parameter, -// it retains its current value. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Route 53 Resolver's -// API operation UpdateResolverRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is invalid. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// One or more parameters in this request are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource doesn't exist. -// -// * ErrCodeResourceUnavailableException "ResourceUnavailableException" -// The specified resource isn't available. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request caused one or more limits to be exceeded. -// -// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" -// We encountered an unknown error. Try again in a few minutes. -// -// * ErrCodeThrottlingException "ThrottlingException" -// The request was throttled. Try again in a few minutes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/UpdateResolverRule -func (c *Route53Resolver) UpdateResolverRule(input *UpdateResolverRuleInput) (*UpdateResolverRuleOutput, error) { - req, out := c.UpdateResolverRuleRequest(input) - return out, req.Send() -} - -// UpdateResolverRuleWithContext is the same as UpdateResolverRule with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateResolverRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Route53Resolver) UpdateResolverRuleWithContext(ctx aws.Context, input *UpdateResolverRuleInput, opts ...request.Option) (*UpdateResolverRuleOutput, error) { - req, out := c.UpdateResolverRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AssociateResolverEndpointIpAddressInput struct { - _ struct{} `type:"structure"` - - // Either the IPv4 address that you want to add to a resolver endpoint or a - // subnet ID. If you specify a subnet ID, Resolver chooses an IP address for - // you from the available IPs in the specified subnet. - // - // IpAddress is a required field - IpAddress *IpAddressUpdate `type:"structure" required:"true"` - - // The ID of the resolver endpoint that you want to associate IP addresses with. - // - // ResolverEndpointId is a required field - ResolverEndpointId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateResolverEndpointIpAddressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateResolverEndpointIpAddressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateResolverEndpointIpAddressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateResolverEndpointIpAddressInput"} - if s.IpAddress == nil { - invalidParams.Add(request.NewErrParamRequired("IpAddress")) - } - if s.ResolverEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ResolverEndpointId")) - } - if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) - } - if s.IpAddress != nil { - if err := s.IpAddress.Validate(); err != nil { - invalidParams.AddNested("IpAddress", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIpAddress sets the IpAddress field's value. -func (s *AssociateResolverEndpointIpAddressInput) SetIpAddress(v *IpAddressUpdate) *AssociateResolverEndpointIpAddressInput { - s.IpAddress = v - return s -} - -// SetResolverEndpointId sets the ResolverEndpointId field's value. -func (s *AssociateResolverEndpointIpAddressInput) SetResolverEndpointId(v string) *AssociateResolverEndpointIpAddressInput { - s.ResolverEndpointId = &v - return s -} - -type AssociateResolverEndpointIpAddressOutput struct { - _ struct{} `type:"structure"` - - // The response to an AssociateResolverEndpointIpAddress request. - ResolverEndpoint *ResolverEndpoint `type:"structure"` -} - -// String returns the string representation -func (s AssociateResolverEndpointIpAddressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateResolverEndpointIpAddressOutput) GoString() string { - return s.String() -} - -// SetResolverEndpoint sets the ResolverEndpoint field's value. -func (s *AssociateResolverEndpointIpAddressOutput) SetResolverEndpoint(v *ResolverEndpoint) *AssociateResolverEndpointIpAddressOutput { - s.ResolverEndpoint = v - return s -} - -type AssociateResolverRuleInput struct { - _ struct{} `type:"structure"` - - // A name for the association that you're creating between a resolver rule and - // a VPC. - Name *string `type:"string"` - - // The ID of the resolver rule that you want to associate with the VPC. To list - // the existing resolver rules, use ListResolverRules. - // - // ResolverRuleId is a required field - ResolverRuleId *string `min:"1" type:"string" required:"true"` - - // The ID of the VPC that you want to associate the resolver rule with. - // - // VPCId is a required field - VPCId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateResolverRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateResolverRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateResolverRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateResolverRuleInput"} - if s.ResolverRuleId == nil { - invalidParams.Add(request.NewErrParamRequired("ResolverRuleId")) - } - if s.ResolverRuleId != nil && len(*s.ResolverRuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResolverRuleId", 1)) - } - if s.VPCId == nil { - invalidParams.Add(request.NewErrParamRequired("VPCId")) - } - if s.VPCId != nil && len(*s.VPCId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VPCId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *AssociateResolverRuleInput) SetName(v string) *AssociateResolverRuleInput { - s.Name = &v - return s -} - -// SetResolverRuleId sets the ResolverRuleId field's value. -func (s *AssociateResolverRuleInput) SetResolverRuleId(v string) *AssociateResolverRuleInput { - s.ResolverRuleId = &v - return s -} - -// SetVPCId sets the VPCId field's value. -func (s *AssociateResolverRuleInput) SetVPCId(v string) *AssociateResolverRuleInput { - s.VPCId = &v - return s -} - -type AssociateResolverRuleOutput struct { - _ struct{} `type:"structure"` - - // Information about the AssociateResolverRule request, including the status - // of the request. - ResolverRuleAssociation *ResolverRuleAssociation `type:"structure"` -} - -// String returns the string representation -func (s AssociateResolverRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateResolverRuleOutput) GoString() string { - return s.String() -} - -// SetResolverRuleAssociation sets the ResolverRuleAssociation field's value. -func (s *AssociateResolverRuleOutput) SetResolverRuleAssociation(v *ResolverRuleAssociation) *AssociateResolverRuleOutput { - s.ResolverRuleAssociation = v - return s -} - -type CreateResolverEndpointInput struct { - _ struct{} `type:"structure"` - - // A unique string that identifies the request and that allows failed requests - // to be retried without the risk of executing the operation twice. CreatorRequestId - // can be any unique string, for example, a date/time stamp. - // - // CreatorRequestId is a required field - CreatorRequestId *string `min:"1" type:"string" required:"true"` - - // Specify the applicable value: - // - // * INBOUND: Resolver forwards DNS queries to the DNS service for a VPC - // from your network or another VPC - // - // * OUTBOUND: Resolver forwards DNS queries from the DNS service for a VPC - // to your network or another VPC - // - // Direction is a required field - Direction *string `type:"string" required:"true" enum:"ResolverEndpointDirection"` - - // The subnets and IP addresses in your VPC that you want DNS queries to pass - // through on the way from your VPCs to your network (for outbound endpoints) - // or on the way from your network to your VPCs (for inbound resolver endpoints). - // - // IpAddresses is a required field - IpAddresses []*IpAddressRequest `min:"1" type:"list" required:"true"` - - // A friendly name that lets you easily find a configuration in the Resolver - // dashboard in the Route 53 console. - Name *string `type:"string"` - - // The ID of one or more security groups that you want to use to control access - // to this VPC. The security group that you specify must include one or more - // inbound rules (for inbound resolver endpoints) or outbound rules (for outbound - // resolver endpoints). - // - // SecurityGroupIds is a required field - SecurityGroupIds []*string `type:"list" required:"true"` - - // A list of the tag keys and values that you want to associate with the endpoint. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreateResolverEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResolverEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateResolverEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateResolverEndpointInput"} - if s.CreatorRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("CreatorRequestId")) - } - if s.CreatorRequestId != nil && len(*s.CreatorRequestId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CreatorRequestId", 1)) - } - if s.Direction == nil { - invalidParams.Add(request.NewErrParamRequired("Direction")) - } - if s.IpAddresses == nil { - invalidParams.Add(request.NewErrParamRequired("IpAddresses")) - } - if s.IpAddresses != nil && len(s.IpAddresses) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IpAddresses", 1)) - } - if s.SecurityGroupIds == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) - } - if s.IpAddresses != nil { - for i, v := range s.IpAddresses { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "IpAddresses", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *CreateResolverEndpointInput) SetCreatorRequestId(v string) *CreateResolverEndpointInput { - s.CreatorRequestId = &v - return s -} - -// SetDirection sets the Direction field's value. -func (s *CreateResolverEndpointInput) SetDirection(v string) *CreateResolverEndpointInput { - s.Direction = &v - return s -} - -// SetIpAddresses sets the IpAddresses field's value. -func (s *CreateResolverEndpointInput) SetIpAddresses(v []*IpAddressRequest) *CreateResolverEndpointInput { - s.IpAddresses = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateResolverEndpointInput) SetName(v string) *CreateResolverEndpointInput { - s.Name = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *CreateResolverEndpointInput) SetSecurityGroupIds(v []*string) *CreateResolverEndpointInput { - s.SecurityGroupIds = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateResolverEndpointInput) SetTags(v []*Tag) *CreateResolverEndpointInput { - s.Tags = v - return s -} - -type CreateResolverEndpointOutput struct { - _ struct{} `type:"structure"` - - // Information about the CreateResolverEndpoint request, including the status - // of the request. - ResolverEndpoint *ResolverEndpoint `type:"structure"` -} - -// String returns the string representation -func (s CreateResolverEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResolverEndpointOutput) GoString() string { - return s.String() -} - -// SetResolverEndpoint sets the ResolverEndpoint field's value. -func (s *CreateResolverEndpointOutput) SetResolverEndpoint(v *ResolverEndpoint) *CreateResolverEndpointOutput { - s.ResolverEndpoint = v - return s -} - -type CreateResolverRuleInput struct { - _ struct{} `type:"structure"` - - // A unique string that identifies the request and that allows failed requests - // to be retried without the risk of executing the operation twice. CreatorRequestId - // can be any unique string, for example, a date/time stamp. - // - // CreatorRequestId is a required field - CreatorRequestId *string `min:"1" type:"string" required:"true"` - - // DNS queries for this domain name are forwarded to the IP addresses that you - // specify in TargetIps. If a query matches multiple resolver rules (example.com - // and www.example.com), outbound DNS queries are routed using the resolver - // rule that contains the most specific domain name (www.example.com). - // - // DomainName is a required field - DomainName *string `min:"1" type:"string" required:"true"` - - // A friendly name that lets you easily find a rule in the Resolver dashboard - // in the Route 53 console. - Name *string `type:"string"` - - // The ID of the outbound resolver endpoint that you want to use to route DNS - // queries to the IP addresses that you specify in TargetIps. - ResolverEndpointId *string `min:"1" type:"string"` - - // Specify FORWARD. Other resolver rule types aren't supported. - // - // RuleType is a required field - RuleType *string `type:"string" required:"true" enum:"RuleTypeOption"` - - // A list of the tag keys and values that you want to associate with the endpoint. - Tags []*Tag `type:"list"` - - // The IPs that you want Resolver to forward DNS queries to. You can specify - // only IPv4 addresses. Separate IP addresses with a comma. - TargetIps []*TargetAddress `min:"1" type:"list"` -} - -// String returns the string representation -func (s CreateResolverRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResolverRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateResolverRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateResolverRuleInput"} - if s.CreatorRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("CreatorRequestId")) - } - if s.CreatorRequestId != nil && len(*s.CreatorRequestId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CreatorRequestId", 1)) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) - } - if s.RuleType == nil { - invalidParams.Add(request.NewErrParamRequired("RuleType")) - } - if s.TargetIps != nil && len(s.TargetIps) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetIps", 1)) - } - if s.TargetIps != nil { - for i, v := range s.TargetIps { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetIps", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *CreateResolverRuleInput) SetCreatorRequestId(v string) *CreateResolverRuleInput { - s.CreatorRequestId = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *CreateResolverRuleInput) SetDomainName(v string) *CreateResolverRuleInput { - s.DomainName = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateResolverRuleInput) SetName(v string) *CreateResolverRuleInput { - s.Name = &v - return s -} - -// SetResolverEndpointId sets the ResolverEndpointId field's value. -func (s *CreateResolverRuleInput) SetResolverEndpointId(v string) *CreateResolverRuleInput { - s.ResolverEndpointId = &v - return s -} - -// SetRuleType sets the RuleType field's value. -func (s *CreateResolverRuleInput) SetRuleType(v string) *CreateResolverRuleInput { - s.RuleType = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateResolverRuleInput) SetTags(v []*Tag) *CreateResolverRuleInput { - s.Tags = v - return s -} - -// SetTargetIps sets the TargetIps field's value. -func (s *CreateResolverRuleInput) SetTargetIps(v []*TargetAddress) *CreateResolverRuleInput { - s.TargetIps = v - return s -} - -type CreateResolverRuleOutput struct { - _ struct{} `type:"structure"` - - // Information about the CreateResolverRule request, including the status of - // the request. - ResolverRule *ResolverRule `type:"structure"` -} - -// String returns the string representation -func (s CreateResolverRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResolverRuleOutput) GoString() string { - return s.String() -} - -// SetResolverRule sets the ResolverRule field's value. -func (s *CreateResolverRuleOutput) SetResolverRule(v *ResolverRule) *CreateResolverRuleOutput { - s.ResolverRule = v - return s -} - -type DeleteResolverEndpointInput struct { - _ struct{} `type:"structure"` - - // The ID of the resolver endpoint that you want to delete. - // - // ResolverEndpointId is a required field - ResolverEndpointId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteResolverEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResolverEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteResolverEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteResolverEndpointInput"} - if s.ResolverEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ResolverEndpointId")) - } - if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResolverEndpointId sets the ResolverEndpointId field's value. -func (s *DeleteResolverEndpointInput) SetResolverEndpointId(v string) *DeleteResolverEndpointInput { - s.ResolverEndpointId = &v - return s -} - -type DeleteResolverEndpointOutput struct { - _ struct{} `type:"structure"` - - // Information about the DeleteResolverEndpoint request, including the status - // of the request. - ResolverEndpoint *ResolverEndpoint `type:"structure"` -} - -// String returns the string representation -func (s DeleteResolverEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResolverEndpointOutput) GoString() string { - return s.String() -} - -// SetResolverEndpoint sets the ResolverEndpoint field's value. -func (s *DeleteResolverEndpointOutput) SetResolverEndpoint(v *ResolverEndpoint) *DeleteResolverEndpointOutput { - s.ResolverEndpoint = v - return s -} - -type DeleteResolverRuleInput struct { - _ struct{} `type:"structure"` - - // The ID of the resolver rule that you want to delete. - // - // ResolverRuleId is a required field - ResolverRuleId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteResolverRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResolverRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteResolverRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteResolverRuleInput"} - if s.ResolverRuleId == nil { - invalidParams.Add(request.NewErrParamRequired("ResolverRuleId")) - } - if s.ResolverRuleId != nil && len(*s.ResolverRuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResolverRuleId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResolverRuleId sets the ResolverRuleId field's value. -func (s *DeleteResolverRuleInput) SetResolverRuleId(v string) *DeleteResolverRuleInput { - s.ResolverRuleId = &v - return s -} - -type DeleteResolverRuleOutput struct { - _ struct{} `type:"structure"` - - // Information about the DeleteResolverRule request, including the status of - // the request. - ResolverRule *ResolverRule `type:"structure"` -} - -// String returns the string representation -func (s DeleteResolverRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResolverRuleOutput) GoString() string { - return s.String() -} - -// SetResolverRule sets the ResolverRule field's value. -func (s *DeleteResolverRuleOutput) SetResolverRule(v *ResolverRule) *DeleteResolverRuleOutput { - s.ResolverRule = v - return s -} - -type DisassociateResolverEndpointIpAddressInput struct { - _ struct{} `type:"structure"` - - // The IPv4 address that you want to remove from a resolver endpoint. - // - // IpAddress is a required field - IpAddress *IpAddressUpdate `type:"structure" required:"true"` - - // The ID of the resolver endpoint that you want to disassociate an IP address - // from. - // - // ResolverEndpointId is a required field - ResolverEndpointId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateResolverEndpointIpAddressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateResolverEndpointIpAddressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateResolverEndpointIpAddressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateResolverEndpointIpAddressInput"} - if s.IpAddress == nil { - invalidParams.Add(request.NewErrParamRequired("IpAddress")) - } - if s.ResolverEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ResolverEndpointId")) - } - if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) - } - if s.IpAddress != nil { - if err := s.IpAddress.Validate(); err != nil { - invalidParams.AddNested("IpAddress", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIpAddress sets the IpAddress field's value. -func (s *DisassociateResolverEndpointIpAddressInput) SetIpAddress(v *IpAddressUpdate) *DisassociateResolverEndpointIpAddressInput { - s.IpAddress = v - return s -} - -// SetResolverEndpointId sets the ResolverEndpointId field's value. -func (s *DisassociateResolverEndpointIpAddressInput) SetResolverEndpointId(v string) *DisassociateResolverEndpointIpAddressInput { - s.ResolverEndpointId = &v - return s -} - -type DisassociateResolverEndpointIpAddressOutput struct { - _ struct{} `type:"structure"` - - // The response to an DisassociateResolverEndpointIpAddress request. - ResolverEndpoint *ResolverEndpoint `type:"structure"` -} - -// String returns the string representation -func (s DisassociateResolverEndpointIpAddressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateResolverEndpointIpAddressOutput) GoString() string { - return s.String() -} - -// SetResolverEndpoint sets the ResolverEndpoint field's value. -func (s *DisassociateResolverEndpointIpAddressOutput) SetResolverEndpoint(v *ResolverEndpoint) *DisassociateResolverEndpointIpAddressOutput { - s.ResolverEndpoint = v - return s -} - -type DisassociateResolverRuleInput struct { - _ struct{} `type:"structure"` - - // The ID of the resolver rule that you want to disassociate from the specified - // VPC. - // - // ResolverRuleId is a required field - ResolverRuleId *string `min:"1" type:"string" required:"true"` - - // The ID of the VPC that you want to disassociate the resolver rule from. - // - // VPCId is a required field - VPCId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateResolverRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateResolverRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateResolverRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateResolverRuleInput"} - if s.ResolverRuleId == nil { - invalidParams.Add(request.NewErrParamRequired("ResolverRuleId")) - } - if s.ResolverRuleId != nil && len(*s.ResolverRuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResolverRuleId", 1)) - } - if s.VPCId == nil { - invalidParams.Add(request.NewErrParamRequired("VPCId")) - } - if s.VPCId != nil && len(*s.VPCId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VPCId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResolverRuleId sets the ResolverRuleId field's value. -func (s *DisassociateResolverRuleInput) SetResolverRuleId(v string) *DisassociateResolverRuleInput { - s.ResolverRuleId = &v - return s -} - -// SetVPCId sets the VPCId field's value. -func (s *DisassociateResolverRuleInput) SetVPCId(v string) *DisassociateResolverRuleInput { - s.VPCId = &v - return s -} - -type DisassociateResolverRuleOutput struct { - _ struct{} `type:"structure"` - - // Information about the DisassociateResolverRule request, including the status - // of the request. - ResolverRuleAssociation *ResolverRuleAssociation `type:"structure"` -} - -// String returns the string representation -func (s DisassociateResolverRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateResolverRuleOutput) GoString() string { - return s.String() -} - -// SetResolverRuleAssociation sets the ResolverRuleAssociation field's value. -func (s *DisassociateResolverRuleOutput) SetResolverRuleAssociation(v *ResolverRuleAssociation) *DisassociateResolverRuleOutput { - s.ResolverRuleAssociation = v - return s -} - -// For List operations, an optional specification to return a subset of objects, -// such as resolver endpoints or resolver rules. -type Filter struct { - _ struct{} `type:"structure"` - - // When you're using a List operation and you want the operation to return a - // subset of objects, such as resolver endpoints or resolver rules, the name - // of the parameter that you want to use to filter objects. For example, to - // list only inbound resolver endpoints, specify Direction for the value of - // Name. - Name *string `min:"1" type:"string"` - - // When you're using a List operation and you want the operation to return a - // subset of objects, such as resolver endpoints or resolver rules, the value - // of the parameter that you want to use to filter objects. For example, to - // list only inbound resolver endpoints, specify INBOUND for the value of Values. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s Filter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Filter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Filter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Filter"} - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *Filter) SetName(v string) *Filter { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *Filter) SetValues(v []*string) *Filter { - s.Values = v - return s -} - -type GetResolverEndpointInput struct { - _ struct{} `type:"structure"` - - // The ID of the resolver endpoint that you want to get information about. - // - // ResolverEndpointId is a required field - ResolverEndpointId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetResolverEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResolverEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResolverEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResolverEndpointInput"} - if s.ResolverEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ResolverEndpointId")) - } - if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResolverEndpointId sets the ResolverEndpointId field's value. -func (s *GetResolverEndpointInput) SetResolverEndpointId(v string) *GetResolverEndpointInput { - s.ResolverEndpointId = &v - return s -} - -type GetResolverEndpointOutput struct { - _ struct{} `type:"structure"` - - // Information about the resolver endpoint that you specified in a GetResolverEndpoint - // request. - ResolverEndpoint *ResolverEndpoint `type:"structure"` -} - -// String returns the string representation -func (s GetResolverEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResolverEndpointOutput) GoString() string { - return s.String() -} - -// SetResolverEndpoint sets the ResolverEndpoint field's value. -func (s *GetResolverEndpointOutput) SetResolverEndpoint(v *ResolverEndpoint) *GetResolverEndpointOutput { - s.ResolverEndpoint = v - return s -} - -type GetResolverRuleAssociationInput struct { - _ struct{} `type:"structure"` - - // The ID of the resolver rule association that you want to get information - // about. - // - // ResolverRuleAssociationId is a required field - ResolverRuleAssociationId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetResolverRuleAssociationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResolverRuleAssociationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResolverRuleAssociationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResolverRuleAssociationInput"} - if s.ResolverRuleAssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("ResolverRuleAssociationId")) - } - if s.ResolverRuleAssociationId != nil && len(*s.ResolverRuleAssociationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResolverRuleAssociationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResolverRuleAssociationId sets the ResolverRuleAssociationId field's value. -func (s *GetResolverRuleAssociationInput) SetResolverRuleAssociationId(v string) *GetResolverRuleAssociationInput { - s.ResolverRuleAssociationId = &v - return s -} - -type GetResolverRuleAssociationOutput struct { - _ struct{} `type:"structure"` - - // Information about the resolver rule association that you specified in a GetResolverRuleAssociation - // request. - ResolverRuleAssociation *ResolverRuleAssociation `type:"structure"` -} - -// String returns the string representation -func (s GetResolverRuleAssociationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResolverRuleAssociationOutput) GoString() string { - return s.String() -} - -// SetResolverRuleAssociation sets the ResolverRuleAssociation field's value. -func (s *GetResolverRuleAssociationOutput) SetResolverRuleAssociation(v *ResolverRuleAssociation) *GetResolverRuleAssociationOutput { - s.ResolverRuleAssociation = v - return s -} - -type GetResolverRuleInput struct { - _ struct{} `type:"structure"` - - // The ID of the resolver rule that you want to get information about. - // - // ResolverRuleId is a required field - ResolverRuleId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetResolverRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResolverRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResolverRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResolverRuleInput"} - if s.ResolverRuleId == nil { - invalidParams.Add(request.NewErrParamRequired("ResolverRuleId")) - } - if s.ResolverRuleId != nil && len(*s.ResolverRuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResolverRuleId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResolverRuleId sets the ResolverRuleId field's value. -func (s *GetResolverRuleInput) SetResolverRuleId(v string) *GetResolverRuleInput { - s.ResolverRuleId = &v - return s -} - -type GetResolverRuleOutput struct { - _ struct{} `type:"structure"` - - // Information about the resolver rule that you specified in a GetResolverRule - // request. - ResolverRule *ResolverRule `type:"structure"` -} - -// String returns the string representation -func (s GetResolverRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResolverRuleOutput) GoString() string { - return s.String() -} - -// SetResolverRule sets the ResolverRule field's value. -func (s *GetResolverRuleOutput) SetResolverRule(v *ResolverRule) *GetResolverRuleOutput { - s.ResolverRule = v - return s -} - -type GetResolverRulePolicyInput struct { - _ struct{} `type:"structure"` - - // The ID of the resolver rule policy that you want to get information about. - // - // Arn is a required field - Arn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetResolverRulePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResolverRulePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResolverRulePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResolverRulePolicyInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GetResolverRulePolicyInput) SetArn(v string) *GetResolverRulePolicyInput { - s.Arn = &v - return s -} - -type GetResolverRulePolicyOutput struct { - _ struct{} `type:"structure"` - - // Information about the resolver rule policy that you specified in a GetResolverRulePolicy - // request. - ResolverRulePolicy *string `type:"string"` -} - -// String returns the string representation -func (s GetResolverRulePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResolverRulePolicyOutput) GoString() string { - return s.String() -} - -// SetResolverRulePolicy sets the ResolverRulePolicy field's value. -func (s *GetResolverRulePolicyOutput) SetResolverRulePolicy(v string) *GetResolverRulePolicyOutput { - s.ResolverRulePolicy = &v - return s -} - -// In an CreateResolverEndpoint request, a subnet and IP address that you want -// to use for DNS queries. -type IpAddressRequest struct { - _ struct{} `type:"structure"` - - // The IP address that you want to use for DNS queries. - Ip *string `min:"7" type:"string"` - - // The subnet that contains the IP address. - // - // SubnetId is a required field - SubnetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s IpAddressRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IpAddressRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IpAddressRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IpAddressRequest"} - if s.Ip != nil && len(*s.Ip) < 7 { - invalidParams.Add(request.NewErrParamMinLen("Ip", 7)) - } - if s.SubnetId == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetId")) - } - if s.SubnetId != nil && len(*s.SubnetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SubnetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIp sets the Ip field's value. -func (s *IpAddressRequest) SetIp(v string) *IpAddressRequest { - s.Ip = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *IpAddressRequest) SetSubnetId(v string) *IpAddressRequest { - s.SubnetId = &v - return s -} - -// In the response to a GetResolverEndpoint request, information about the IP -// addresses that the resolver endpoint uses for DNS queries. -type IpAddressResponse struct { - _ struct{} `type:"structure"` - - // The date and time that the IP address was created, in Unix time format and - // Coordinated Universal Time (UTC). - CreationTime *string `min:"20" type:"string"` - - // One IP address that the resolver endpoint uses for DNS queries. - Ip *string `min:"7" type:"string"` - - // The ID of one IP address. - IpId *string `min:"1" type:"string"` - - // The date and time that the IP address was last modified, in Unix time format - // and Coordinated Universal Time (UTC). - ModificationTime *string `min:"20" type:"string"` - - // A status code that gives the current status of the request. - Status *string `type:"string" enum:"IpAddressStatus"` - - // A message that provides additional information about the status of the request. - StatusMessage *string `type:"string"` - - // The ID of one subnet. - SubnetId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s IpAddressResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IpAddressResponse) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *IpAddressResponse) SetCreationTime(v string) *IpAddressResponse { - s.CreationTime = &v - return s -} - -// SetIp sets the Ip field's value. -func (s *IpAddressResponse) SetIp(v string) *IpAddressResponse { - s.Ip = &v - return s -} - -// SetIpId sets the IpId field's value. -func (s *IpAddressResponse) SetIpId(v string) *IpAddressResponse { - s.IpId = &v - return s -} - -// SetModificationTime sets the ModificationTime field's value. -func (s *IpAddressResponse) SetModificationTime(v string) *IpAddressResponse { - s.ModificationTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *IpAddressResponse) SetStatus(v string) *IpAddressResponse { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *IpAddressResponse) SetStatusMessage(v string) *IpAddressResponse { - s.StatusMessage = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *IpAddressResponse) SetSubnetId(v string) *IpAddressResponse { - s.SubnetId = &v - return s -} - -// In an UpdateResolverEndpoint request, information about an IP address to -// update. -type IpAddressUpdate struct { - _ struct{} `type:"structure"` - - // The new IP address. - Ip *string `min:"7" type:"string"` - - // Only when removing an IP address from a resolver endpoint: The ID of the - // IP address that you want to remove. To get this ID, use GetResolverEndpoint. - IpId *string `min:"1" type:"string"` - - // The ID of the subnet that includes the IP address that you want to update. - // To get this ID, use GetResolverEndpoint. - SubnetId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s IpAddressUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IpAddressUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IpAddressUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IpAddressUpdate"} - if s.Ip != nil && len(*s.Ip) < 7 { - invalidParams.Add(request.NewErrParamMinLen("Ip", 7)) - } - if s.IpId != nil && len(*s.IpId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IpId", 1)) - } - if s.SubnetId != nil && len(*s.SubnetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SubnetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIp sets the Ip field's value. -func (s *IpAddressUpdate) SetIp(v string) *IpAddressUpdate { - s.Ip = &v - return s -} - -// SetIpId sets the IpId field's value. -func (s *IpAddressUpdate) SetIpId(v string) *IpAddressUpdate { - s.IpId = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *IpAddressUpdate) SetSubnetId(v string) *IpAddressUpdate { - s.SubnetId = &v - return s -} - -type ListResolverEndpointIpAddressesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of IP addresses that you want to return in the response - // to a ListResolverEndpointIpAddresses request. If you don't specify a value - // for MaxResults, Resolver returns up to 100 IP addresses. - MaxResults *int64 `min:"1" type:"integer"` - - // For the first ListResolverEndpointIpAddresses request, omit this value. - // - // If the specified resolver endpoint has more than MaxResults IP addresses, - // you can submit another ListResolverEndpointIpAddresses request to get the - // next group of IP addresses. In the next request, specify the value of NextToken - // from the previous response. - NextToken *string `type:"string"` - - // The ID of the resolver endpoint that you want to get IP addresses for. - // - // ResolverEndpointId is a required field - ResolverEndpointId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListResolverEndpointIpAddressesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResolverEndpointIpAddressesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResolverEndpointIpAddressesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResolverEndpointIpAddressesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ResolverEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ResolverEndpointId")) - } - if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListResolverEndpointIpAddressesInput) SetMaxResults(v int64) *ListResolverEndpointIpAddressesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResolverEndpointIpAddressesInput) SetNextToken(v string) *ListResolverEndpointIpAddressesInput { - s.NextToken = &v - return s -} - -// SetResolverEndpointId sets the ResolverEndpointId field's value. -func (s *ListResolverEndpointIpAddressesInput) SetResolverEndpointId(v string) *ListResolverEndpointIpAddressesInput { - s.ResolverEndpointId = &v - return s -} - -type ListResolverEndpointIpAddressesOutput struct { - _ struct{} `type:"structure"` - - // The IP addresses that DNS queries pass through on their way to your network - // (outbound endpoint) or on the way to Resolver (inbound endpoint). - IpAddresses []*IpAddressResponse `type:"list"` - - // The value that you specified for MaxResults in the request. - MaxResults *int64 `min:"1" type:"integer"` - - // If the specified endpoint has more than MaxResults IP addresses, you can - // submit another ListResolverEndpointIpAddresses request to get the next group - // of IP addresses. In the next request, specify the value of NextToken from - // the previous response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListResolverEndpointIpAddressesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResolverEndpointIpAddressesOutput) GoString() string { - return s.String() -} - -// SetIpAddresses sets the IpAddresses field's value. -func (s *ListResolverEndpointIpAddressesOutput) SetIpAddresses(v []*IpAddressResponse) *ListResolverEndpointIpAddressesOutput { - s.IpAddresses = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListResolverEndpointIpAddressesOutput) SetMaxResults(v int64) *ListResolverEndpointIpAddressesOutput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResolverEndpointIpAddressesOutput) SetNextToken(v string) *ListResolverEndpointIpAddressesOutput { - s.NextToken = &v - return s -} - -type ListResolverEndpointsInput struct { - _ struct{} `type:"structure"` - - // An optional specification to return a subset of resolver endpoints, such - // as all inbound resolver endpoints. - // - // If you submit a second or subsequent ListResolverEndpoints request and specify - // the NextToken parameter, you must use the same values for Filters, if any, - // as in the previous request. - Filters []*Filter `type:"list"` - - // The maximum number of resolver endpoints that you want to return in the response - // to a ListResolverEndpoints request. If you don't specify a value for MaxResults, - // Resolver returns up to 100 resolver endpoints. - MaxResults *int64 `min:"1" type:"integer"` - - // For the first ListResolverEndpoints request, omit this value. - // - // If you have more than MaxResults resolver endpoints, you can submit another - // ListResolverEndpoints request to get the next group of resolver endpoints. - // In the next request, specify the value of NextToken from the previous response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListResolverEndpointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResolverEndpointsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResolverEndpointsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResolverEndpointsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListResolverEndpointsInput) SetFilters(v []*Filter) *ListResolverEndpointsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListResolverEndpointsInput) SetMaxResults(v int64) *ListResolverEndpointsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResolverEndpointsInput) SetNextToken(v string) *ListResolverEndpointsInput { - s.NextToken = &v - return s -} - -type ListResolverEndpointsOutput struct { - _ struct{} `type:"structure"` - - // The value that you specified for MaxResults in the request. - MaxResults *int64 `min:"1" type:"integer"` - - // If more than MaxResults IP addresses match the specified criteria, you can - // submit another ListResolverEndpoint request to get the next group of results. - // In the next request, specify the value of NextToken from the previous response. - NextToken *string `type:"string"` - - // The resolver endpoints that were created by using the current AWS account, - // and that match the specified filters, if any. - ResolverEndpoints []*ResolverEndpoint `type:"list"` -} - -// String returns the string representation -func (s ListResolverEndpointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResolverEndpointsOutput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListResolverEndpointsOutput) SetMaxResults(v int64) *ListResolverEndpointsOutput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResolverEndpointsOutput) SetNextToken(v string) *ListResolverEndpointsOutput { - s.NextToken = &v - return s -} - -// SetResolverEndpoints sets the ResolverEndpoints field's value. -func (s *ListResolverEndpointsOutput) SetResolverEndpoints(v []*ResolverEndpoint) *ListResolverEndpointsOutput { - s.ResolverEndpoints = v - return s -} - -type ListResolverRuleAssociationsInput struct { - _ struct{} `type:"structure"` - - // An optional specification to return a subset of resolver rules, such as resolver - // rules that are associated with the same VPC ID. - // - // If you submit a second or subsequent ListResolverRuleAssociations request - // and specify the NextToken parameter, you must use the same values for Filters, - // if any, as in the previous request. - Filters []*Filter `type:"list"` - - // The maximum number of rule associations that you want to return in the response - // to a ListResolverRuleAssociations request. If you don't specify a value for - // MaxResults, Resolver returns up to 100 rule associations. - MaxResults *int64 `min:"1" type:"integer"` - - // For the first ListResolverRuleAssociation request, omit this value. - // - // If you have more than MaxResults rule associations, you can submit another - // ListResolverRuleAssociation request to get the next group of rule associations. - // In the next request, specify the value of NextToken from the previous response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListResolverRuleAssociationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResolverRuleAssociationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResolverRuleAssociationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResolverRuleAssociationsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListResolverRuleAssociationsInput) SetFilters(v []*Filter) *ListResolverRuleAssociationsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListResolverRuleAssociationsInput) SetMaxResults(v int64) *ListResolverRuleAssociationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResolverRuleAssociationsInput) SetNextToken(v string) *ListResolverRuleAssociationsInput { - s.NextToken = &v - return s -} - -type ListResolverRuleAssociationsOutput struct { - _ struct{} `type:"structure"` - - // The value that you specified for MaxResults in the request. - MaxResults *int64 `min:"1" type:"integer"` - - // If more than MaxResults rule associations match the specified criteria, you - // can submit another ListResolverRuleAssociation request to get the next group - // of results. In the next request, specify the value of NextToken from the - // previous response. - NextToken *string `type:"string"` - - // The associations that were created between resolver rules and VPCs using - // the current AWS account, and that match the specified filters, if any. - ResolverRuleAssociations []*ResolverRuleAssociation `type:"list"` -} - -// String returns the string representation -func (s ListResolverRuleAssociationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResolverRuleAssociationsOutput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListResolverRuleAssociationsOutput) SetMaxResults(v int64) *ListResolverRuleAssociationsOutput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResolverRuleAssociationsOutput) SetNextToken(v string) *ListResolverRuleAssociationsOutput { - s.NextToken = &v - return s -} - -// SetResolverRuleAssociations sets the ResolverRuleAssociations field's value. -func (s *ListResolverRuleAssociationsOutput) SetResolverRuleAssociations(v []*ResolverRuleAssociation) *ListResolverRuleAssociationsOutput { - s.ResolverRuleAssociations = v - return s -} - -type ListResolverRulesInput struct { - _ struct{} `type:"structure"` - - // An optional specification to return a subset of resolver rules, such as all - // resolver rules that are associated with the same resolver endpoint. - // - // If you submit a second or subsequent ListResolverRules request and specify - // the NextToken parameter, you must use the same values for Filters, if any, - // as in the previous request. - Filters []*Filter `type:"list"` - - // The maximum number of resolver rules that you want to return in the response - // to a ListResolverRules request. If you don't specify a value for MaxResults, - // Resolver returns up to 100 resolver rules. - MaxResults *int64 `min:"1" type:"integer"` - - // For the first ListResolverRules request, omit this value. - // - // If you have more than MaxResults resolver rules, you can submit another ListResolverRules - // request to get the next group of resolver rules. In the next request, specify - // the value of NextToken from the previous response. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListResolverRulesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResolverRulesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResolverRulesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResolverRulesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListResolverRulesInput) SetFilters(v []*Filter) *ListResolverRulesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListResolverRulesInput) SetMaxResults(v int64) *ListResolverRulesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResolverRulesInput) SetNextToken(v string) *ListResolverRulesInput { - s.NextToken = &v - return s -} - -type ListResolverRulesOutput struct { - _ struct{} `type:"structure"` - - // The value that you specified for MaxResults in the request. - MaxResults *int64 `min:"1" type:"integer"` - - // If more than MaxResults resolver rules match the specified criteria, you - // can submit another ListResolverRules request to get the next group of results. - // In the next request, specify the value of NextToken from the previous response. - NextToken *string `type:"string"` - - // The resolver rules that were created using the current AWS account and that - // match the specified filters, if any. - ResolverRules []*ResolverRule `type:"list"` -} - -// String returns the string representation -func (s ListResolverRulesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResolverRulesOutput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListResolverRulesOutput) SetMaxResults(v int64) *ListResolverRulesOutput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResolverRulesOutput) SetNextToken(v string) *ListResolverRulesOutput { - s.NextToken = &v - return s -} - -// SetResolverRules sets the ResolverRules field's value. -func (s *ListResolverRulesOutput) SetResolverRules(v []*ResolverRule) *ListResolverRulesOutput { - s.ResolverRules = v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The maximum number of tags that you want to return in the response to a ListTagsForResource - // request. If you don't specify a value for MaxResults, Resolver returns up - // to 100 tags. - MaxResults *int64 `min:"1" type:"integer"` - - // For the first ListTagsForResource request, omit this value. - // - // If you have more than MaxResults tags, you can submit another ListTagsForResource - // request to get the next group of tags for the resource. In the next request, - // specify the value of NextToken from the previous response. - NextToken *string `type:"string"` - - // The Amazon Resource Name (ARN) for the resource that you want to list tags - // for. - // - // ResourceArn is a required field - ResourceArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { - s.NextToken = &v - return s -} - -// 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"` - - // If more than MaxResults tags match the specified criteria, you can submit - // another ListTagsForResource request to get the next group of results. In - // the next request, specify the value of NextToken from the previous response. - NextToken *string `type:"string"` - - // The tags that are associated with the resource that you specified in the - // ListTagsForResource request. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { - s.NextToken = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -type PutResolverRulePolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the account that you want to grant permissions - // to. - // - // Arn is a required field - Arn *string `min:"1" type:"string" required:"true"` - - // An AWS Identity and Access Management policy statement that lists the permissions - // that you want to grant to another AWS account. - // - // ResolverRulePolicy is a required field - ResolverRulePolicy *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PutResolverRulePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutResolverRulePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutResolverRulePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutResolverRulePolicyInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) - } - if s.ResolverRulePolicy == nil { - invalidParams.Add(request.NewErrParamRequired("ResolverRulePolicy")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *PutResolverRulePolicyInput) SetArn(v string) *PutResolverRulePolicyInput { - s.Arn = &v - return s -} - -// SetResolverRulePolicy sets the ResolverRulePolicy field's value. -func (s *PutResolverRulePolicyInput) SetResolverRulePolicy(v string) *PutResolverRulePolicyInput { - s.ResolverRulePolicy = &v - return s -} - -// The response to a PutResolverRulePolicy request. -type PutResolverRulePolicyOutput struct { - _ struct{} `type:"structure"` - - // Whether the PutResolverRulePolicy request was successful. - ReturnValue *bool `type:"boolean"` -} - -// String returns the string representation -func (s PutResolverRulePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutResolverRulePolicyOutput) GoString() string { - return s.String() -} - -// SetReturnValue sets the ReturnValue field's value. -func (s *PutResolverRulePolicyOutput) SetReturnValue(v bool) *PutResolverRulePolicyOutput { - s.ReturnValue = &v - return s -} - -// In the response to a CreateResolverEndpoint, DeleteResolverEndpoint, GetResolverEndpoint, -// ListResolverEndpoints, or UpdateResolverEndpoint request, a complex type -// that contains settings for an existing inbound or outbound resolver endpoint. -type ResolverEndpoint struct { - _ struct{} `type:"structure"` - - // The ARN (Amazon Resource Name) for the resolver endpoint. - Arn *string `min:"1" type:"string"` - - // The date and time that the endpoint was created, in Unix time format and - // Coordinated Universal Time (UTC). - CreationTime *string `min:"20" type:"string"` - - // A unique string that identifies the request that created the resolver endpoint. - // The CreatorRequestId allows failed requests to be retried without the risk - // of executing the operation twice. - CreatorRequestId *string `min:"1" type:"string"` - - // Indicates whether the resolver endpoint allows inbound or outbound DNS queries: - // - // * INBOUND: allows DNS queries to your VPC from your network or another - // VPC - // - // * OUTBOUND: allows DNS queries from your VPC to your network or another - // VPC - Direction *string `type:"string" enum:"ResolverEndpointDirection"` - - // The ID of the VPC that you want to create the resolver endpoint in. - HostVPCId *string `min:"1" type:"string"` - - // The ID of the resolver endpoint. - Id *string `min:"1" type:"string"` - - // The number of IP addresses that the resolver endpoint can use for DNS queries. - IpAddressCount *int64 `type:"integer"` - - // The date and time that the endpoint was last modified, in Unix time format - // and Coordinated Universal Time (UTC). - ModificationTime *string `min:"20" type:"string"` - - // The name that you assigned to the resolver endpoint when you submitted a - // CreateResolverEndpoint request. - Name *string `type:"string"` - - // The ID of one or more security groups that control access to this VPC. The - // security group must include one or more inbound resolver rules. - SecurityGroupIds []*string `type:"list"` - - // A code that specifies the current status of the resolver endpoint. - Status *string `type:"string" enum:"ResolverEndpointStatus"` - - // A detailed description of the status of the resolver endpoint. - StatusMessage *string `type:"string"` -} - -// String returns the string representation -func (s ResolverEndpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResolverEndpoint) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ResolverEndpoint) SetArn(v string) *ResolverEndpoint { - s.Arn = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ResolverEndpoint) SetCreationTime(v string) *ResolverEndpoint { - s.CreationTime = &v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *ResolverEndpoint) SetCreatorRequestId(v string) *ResolverEndpoint { - s.CreatorRequestId = &v - return s -} - -// SetDirection sets the Direction field's value. -func (s *ResolverEndpoint) SetDirection(v string) *ResolverEndpoint { - s.Direction = &v - return s -} - -// SetHostVPCId sets the HostVPCId field's value. -func (s *ResolverEndpoint) SetHostVPCId(v string) *ResolverEndpoint { - s.HostVPCId = &v - return s -} - -// SetId sets the Id field's value. -func (s *ResolverEndpoint) SetId(v string) *ResolverEndpoint { - s.Id = &v - return s -} - -// SetIpAddressCount sets the IpAddressCount field's value. -func (s *ResolverEndpoint) SetIpAddressCount(v int64) *ResolverEndpoint { - s.IpAddressCount = &v - return s -} - -// SetModificationTime sets the ModificationTime field's value. -func (s *ResolverEndpoint) SetModificationTime(v string) *ResolverEndpoint { - s.ModificationTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *ResolverEndpoint) SetName(v string) *ResolverEndpoint { - s.Name = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *ResolverEndpoint) SetSecurityGroupIds(v []*string) *ResolverEndpoint { - s.SecurityGroupIds = v - return s -} - -// SetStatus sets the Status field's value. -func (s *ResolverEndpoint) SetStatus(v string) *ResolverEndpoint { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ResolverEndpoint) SetStatusMessage(v string) *ResolverEndpoint { - s.StatusMessage = &v - return s -} - -// For queries that originate in your VPC, detailed information about a resolver -// rule, which specifies how to route DNS queries out of the VPC. The ResolverRule -// parameter appears in the response to a CreateResolverRule, DeleteResolverRule, -// GetResolverRule, ListResolverRules, or UpdateResolverRule request. -type ResolverRule struct { - _ struct{} `type:"structure"` - - // The ARN (Amazon Resource Name) for the resolver rule specified by Id. - Arn *string `min:"1" type:"string"` - - // A unique string that you specified when you created the resolver rule. CreatorRequestIdidentifies - // the request and allows failed requests to be retried without the risk of - // executing the operation twice. - CreatorRequestId *string `min:"1" type:"string"` - - // DNS queries for this domain name are forwarded to the IP addresses that are - // specified in TargetIps. If a query matches multiple resolver rules (example.com - // and www.example.com), the query is routed using the resolver rule that contains - // the most specific domain name (www.example.com). - DomainName *string `min:"1" type:"string"` - - // The ID that Resolver assigned to the resolver rule when you created it. - Id *string `min:"1" type:"string"` - - // The name for the resolver rule, which you specified when you created the - // resolver rule. - Name *string `type:"string"` - - // When a rule is shared with another AWS account, the account ID of the account - // that the rule is shared with. - OwnerId *string `min:"12" type:"string"` - - // The ID of the endpoint that the rule is associated with. - ResolverEndpointId *string `min:"1" type:"string"` - - // This value is always FORWARD. Other resolver rule types aren't supported. - RuleType *string `type:"string" enum:"RuleTypeOption"` - - // Whether the rules is shared and, if so, whether the current account is sharing - // the rule with another account, or another account is sharing the rule with - // the current account. - ShareStatus *string `type:"string" enum:"ShareStatus"` - - // A code that specifies the current status of the resolver rule. - Status *string `type:"string" enum:"ResolverRuleStatus"` - - // A detailed description of the status of a resolver rule. - StatusMessage *string `type:"string"` - - // An array that contains the IP addresses and ports that you want to forward - TargetIps []*TargetAddress `min:"1" type:"list"` -} - -// String returns the string representation -func (s ResolverRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResolverRule) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ResolverRule) SetArn(v string) *ResolverRule { - s.Arn = &v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *ResolverRule) SetCreatorRequestId(v string) *ResolverRule { - s.CreatorRequestId = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *ResolverRule) SetDomainName(v string) *ResolverRule { - s.DomainName = &v - return s -} - -// SetId sets the Id field's value. -func (s *ResolverRule) SetId(v string) *ResolverRule { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *ResolverRule) SetName(v string) *ResolverRule { - s.Name = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *ResolverRule) SetOwnerId(v string) *ResolverRule { - s.OwnerId = &v - return s -} - -// SetResolverEndpointId sets the ResolverEndpointId field's value. -func (s *ResolverRule) SetResolverEndpointId(v string) *ResolverRule { - s.ResolverEndpointId = &v - return s -} - -// SetRuleType sets the RuleType field's value. -func (s *ResolverRule) SetRuleType(v string) *ResolverRule { - s.RuleType = &v - return s -} - -// SetShareStatus sets the ShareStatus field's value. -func (s *ResolverRule) SetShareStatus(v string) *ResolverRule { - s.ShareStatus = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ResolverRule) SetStatus(v string) *ResolverRule { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ResolverRule) SetStatusMessage(v string) *ResolverRule { - s.StatusMessage = &v - return s -} - -// SetTargetIps sets the TargetIps field's value. -func (s *ResolverRule) SetTargetIps(v []*TargetAddress) *ResolverRule { - s.TargetIps = v - return s -} - -// In the response to an AssociateResolverRule, DisassociateResolverRule, or -// ListResolverRuleAssociations request, information about an association between -// a resolver rule and a VPC. -type ResolverRuleAssociation struct { - _ struct{} `type:"structure"` - - // The ID of the association between a resolver rule and a VPC. Resolver assigns - // this value when you submit an AssociateResolverRule request. - Id *string `min:"1" type:"string"` - - // The name of an association between a resolver rule and a VPC. - Name *string `type:"string"` - - // The ID of the resolver rule that you associated with the VPC that is specified - // by VPCId. - ResolverRuleId *string `min:"1" type:"string"` - - // A code that specifies the current status of the association between a resolver - // rule and a VPC. - Status *string `type:"string" enum:"ResolverRuleAssociationStatus"` - - // A detailed description of the status of the association between a resolver - // rule and a VPC. - StatusMessage *string `type:"string"` - - // The ID of the VPC that you associated the resolver rule with. - VPCId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ResolverRuleAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResolverRuleAssociation) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *ResolverRuleAssociation) SetId(v string) *ResolverRuleAssociation { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *ResolverRuleAssociation) SetName(v string) *ResolverRuleAssociation { - s.Name = &v - return s -} - -// SetResolverRuleId sets the ResolverRuleId field's value. -func (s *ResolverRuleAssociation) SetResolverRuleId(v string) *ResolverRuleAssociation { - s.ResolverRuleId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ResolverRuleAssociation) SetStatus(v string) *ResolverRuleAssociation { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ResolverRuleAssociation) SetStatusMessage(v string) *ResolverRuleAssociation { - s.StatusMessage = &v - return s -} - -// SetVPCId sets the VPCId field's value. -func (s *ResolverRuleAssociation) SetVPCId(v string) *ResolverRuleAssociation { - s.VPCId = &v - return s -} - -// In an UpdateResolverRule request, information about the changes that you -// want to make. -type ResolverRuleConfig struct { - _ struct{} `type:"structure"` - - // The new name for the resolver rule. The name that you specify appears in - // the Resolver dashboard in the Route 53 console. - Name *string `type:"string"` - - // The ID of the new outbound resolver endpoint that you want to use to route - // DNS queries to the IP addresses that you specify in TargetIps. - ResolverEndpointId *string `min:"1" type:"string"` - - // For DNS queries that originate in your VPC, the new IP addresses that you - // want to route outbound DNS queries to. - TargetIps []*TargetAddress `min:"1" type:"list"` -} - -// String returns the string representation -func (s ResolverRuleConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResolverRuleConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResolverRuleConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResolverRuleConfig"} - if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) - } - if s.TargetIps != nil && len(s.TargetIps) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetIps", 1)) - } - if s.TargetIps != nil { - for i, v := range s.TargetIps { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetIps", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *ResolverRuleConfig) SetName(v string) *ResolverRuleConfig { - s.Name = &v - return s -} - -// SetResolverEndpointId sets the ResolverEndpointId field's value. -func (s *ResolverRuleConfig) SetResolverEndpointId(v string) *ResolverRuleConfig { - s.ResolverEndpointId = &v - return s -} - -// SetTargetIps sets the TargetIps field's value. -func (s *ResolverRuleConfig) SetTargetIps(v []*TargetAddress) *ResolverRuleConfig { - s.TargetIps = v - return s -} - -// One tag that you want to add to the specified resource. A tag consists of -// a Key (a name for the tag) and a Value. -type Tag struct { - _ struct{} `type:"structure"` - - // The name for the tag. For example, if you want to associate Resolver resources - // with the account IDs of your customers for billing purposes, the value of - // Key might be account-id. - Key *string `type:"string"` - - // The value for the tag. For example, if Key is account-id, then Value might - // be the ID of the customer account that you're creating the resource for. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the resource that you want to add tags - // to. To get the ARN for a resource, use the applicable Get or List command: - // - // * GetResolverEndpoint - // - // * GetResolverRule - // - // * GetResolverRuleAssociation - // - // * ListResolverEndpoints - // - // * ListResolverRuleAssociations - // - // * ListResolverRules - // - // ResourceArn is a required field - ResourceArn *string `min:"1" type:"string" required:"true"` - - // The tags that you want to add to the specified resource. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -// In a CreateResolverRule request, an array of the IPs that you want to forward -// DNS queries to. -type TargetAddress struct { - _ struct{} `type:"structure"` - - // One IP address that you want to forward DNS queries to. You can specify only - // IPv4 addresses. - // - // Ip is a required field - Ip *string `min:"7" type:"string" required:"true"` - - // The port at Ip that you want to forward DNS queries to. - Port *int64 `type:"integer"` -} - -// String returns the string representation -func (s TargetAddress) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetAddress) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetAddress) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetAddress"} - if s.Ip == nil { - invalidParams.Add(request.NewErrParamRequired("Ip")) - } - if s.Ip != nil && len(*s.Ip) < 7 { - invalidParams.Add(request.NewErrParamMinLen("Ip", 7)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIp sets the Ip field's value. -func (s *TargetAddress) SetIp(v string) *TargetAddress { - s.Ip = &v - return s -} - -// SetPort sets the Port field's value. -func (s *TargetAddress) SetPort(v int64) *TargetAddress { - s.Port = &v - return s -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the resource that you want to remove tags - // from. To get the ARN for a resource, use the applicable Get or List command: - // - // * GetResolverEndpoint - // - // * GetResolverRule - // - // * GetResolverRuleAssociation - // - // * ListResolverEndpoints - // - // * ListResolverRuleAssociations - // - // * ListResolverRules - // - // ResourceArn is a required field - ResourceArn *string `min:"1" type:"string" required:"true"` - - // The tags that you want to remove to the specified resource. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s UntagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UpdateResolverEndpointInput struct { - _ struct{} `type:"structure"` - - // The name of the resolver endpoint that you want to update. - Name *string `type:"string"` - - // The ID of the resolver endpoint that you want to update. - // - // ResolverEndpointId is a required field - ResolverEndpointId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateResolverEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateResolverEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateResolverEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateResolverEndpointInput"} - if s.ResolverEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("ResolverEndpointId")) - } - if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *UpdateResolverEndpointInput) SetName(v string) *UpdateResolverEndpointInput { - s.Name = &v - return s -} - -// SetResolverEndpointId sets the ResolverEndpointId field's value. -func (s *UpdateResolverEndpointInput) SetResolverEndpointId(v string) *UpdateResolverEndpointInput { - s.ResolverEndpointId = &v - return s -} - -type UpdateResolverEndpointOutput struct { - _ struct{} `type:"structure"` - - // The response to an UpdateResolverEndpoint request. - ResolverEndpoint *ResolverEndpoint `type:"structure"` -} - -// String returns the string representation -func (s UpdateResolverEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateResolverEndpointOutput) GoString() string { - return s.String() -} - -// SetResolverEndpoint sets the ResolverEndpoint field's value. -func (s *UpdateResolverEndpointOutput) SetResolverEndpoint(v *ResolverEndpoint) *UpdateResolverEndpointOutput { - s.ResolverEndpoint = v - return s -} - -type UpdateResolverRuleInput struct { - _ struct{} `type:"structure"` - - // The new settings for the resolver rule. - // - // Config is a required field - Config *ResolverRuleConfig `type:"structure" required:"true"` - - // The ID of the resolver rule that you want to update. - // - // ResolverRuleId is a required field - ResolverRuleId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateResolverRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateResolverRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateResolverRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateResolverRuleInput"} - if s.Config == nil { - invalidParams.Add(request.NewErrParamRequired("Config")) - } - if s.ResolverRuleId == nil { - invalidParams.Add(request.NewErrParamRequired("ResolverRuleId")) - } - if s.ResolverRuleId != nil && len(*s.ResolverRuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResolverRuleId", 1)) - } - if s.Config != nil { - if err := s.Config.Validate(); err != nil { - invalidParams.AddNested("Config", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfig sets the Config field's value. -func (s *UpdateResolverRuleInput) SetConfig(v *ResolverRuleConfig) *UpdateResolverRuleInput { - s.Config = v - return s -} - -// SetResolverRuleId sets the ResolverRuleId field's value. -func (s *UpdateResolverRuleInput) SetResolverRuleId(v string) *UpdateResolverRuleInput { - s.ResolverRuleId = &v - return s -} - -type UpdateResolverRuleOutput struct { - _ struct{} `type:"structure"` - - // The response to an UpdateResolverRule request. - ResolverRule *ResolverRule `type:"structure"` -} - -// String returns the string representation -func (s UpdateResolverRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateResolverRuleOutput) GoString() string { - return s.String() -} - -// SetResolverRule sets the ResolverRule field's value. -func (s *UpdateResolverRuleOutput) SetResolverRule(v *ResolverRule) *UpdateResolverRuleOutput { - s.ResolverRule = v - return s -} - -const ( - // IpAddressStatusCreating is a IpAddressStatus enum value - IpAddressStatusCreating = "CREATING" - - // IpAddressStatusFailedCreation is a IpAddressStatus enum value - IpAddressStatusFailedCreation = "FAILED_CREATION" - - // IpAddressStatusAttaching is a IpAddressStatus enum value - IpAddressStatusAttaching = "ATTACHING" - - // IpAddressStatusAttached is a IpAddressStatus enum value - IpAddressStatusAttached = "ATTACHED" - - // IpAddressStatusRemapDetaching is a IpAddressStatus enum value - IpAddressStatusRemapDetaching = "REMAP_DETACHING" - - // IpAddressStatusRemapAttaching is a IpAddressStatus enum value - IpAddressStatusRemapAttaching = "REMAP_ATTACHING" - - // IpAddressStatusDetaching is a IpAddressStatus enum value - IpAddressStatusDetaching = "DETACHING" - - // IpAddressStatusFailedResourceGone is a IpAddressStatus enum value - IpAddressStatusFailedResourceGone = "FAILED_RESOURCE_GONE" - - // IpAddressStatusDeleting is a IpAddressStatus enum value - IpAddressStatusDeleting = "DELETING" - - // IpAddressStatusDeleteFailedFasExpired is a IpAddressStatus enum value - IpAddressStatusDeleteFailedFasExpired = "DELETE_FAILED_FAS_EXPIRED" -) - -const ( - // ResolverEndpointDirectionInbound is a ResolverEndpointDirection enum value - ResolverEndpointDirectionInbound = "INBOUND" - - // ResolverEndpointDirectionOutbound is a ResolverEndpointDirection enum value - ResolverEndpointDirectionOutbound = "OUTBOUND" -) - -const ( - // ResolverEndpointStatusCreating is a ResolverEndpointStatus enum value - ResolverEndpointStatusCreating = "CREATING" - - // ResolverEndpointStatusOperational is a ResolverEndpointStatus enum value - ResolverEndpointStatusOperational = "OPERATIONAL" - - // ResolverEndpointStatusUpdating is a ResolverEndpointStatus enum value - ResolverEndpointStatusUpdating = "UPDATING" - - // ResolverEndpointStatusAutoRecovering is a ResolverEndpointStatus enum value - ResolverEndpointStatusAutoRecovering = "AUTO_RECOVERING" - - // ResolverEndpointStatusActionNeeded is a ResolverEndpointStatus enum value - ResolverEndpointStatusActionNeeded = "ACTION_NEEDED" - - // ResolverEndpointStatusDeleting is a ResolverEndpointStatus enum value - ResolverEndpointStatusDeleting = "DELETING" -) - -const ( - // ResolverRuleAssociationStatusCreating is a ResolverRuleAssociationStatus enum value - ResolverRuleAssociationStatusCreating = "CREATING" - - // ResolverRuleAssociationStatusComplete is a ResolverRuleAssociationStatus enum value - ResolverRuleAssociationStatusComplete = "COMPLETE" - - // ResolverRuleAssociationStatusDeleting is a ResolverRuleAssociationStatus enum value - ResolverRuleAssociationStatusDeleting = "DELETING" - - // ResolverRuleAssociationStatusFailed is a ResolverRuleAssociationStatus enum value - ResolverRuleAssociationStatusFailed = "FAILED" - - // ResolverRuleAssociationStatusOverridden is a ResolverRuleAssociationStatus enum value - ResolverRuleAssociationStatusOverridden = "OVERRIDDEN" -) - -const ( - // ResolverRuleStatusComplete is a ResolverRuleStatus enum value - ResolverRuleStatusComplete = "COMPLETE" - - // ResolverRuleStatusDeleting is a ResolverRuleStatus enum value - ResolverRuleStatusDeleting = "DELETING" - - // ResolverRuleStatusUpdating is a ResolverRuleStatus enum value - ResolverRuleStatusUpdating = "UPDATING" - - // ResolverRuleStatusFailed is a ResolverRuleStatus enum value - ResolverRuleStatusFailed = "FAILED" -) - -const ( - // RuleTypeOptionForward is a RuleTypeOption enum value - RuleTypeOptionForward = "FORWARD" - - // RuleTypeOptionSystem is a RuleTypeOption enum value - RuleTypeOptionSystem = "SYSTEM" - - // RuleTypeOptionRecursive is a RuleTypeOption enum value - RuleTypeOptionRecursive = "RECURSIVE" -) - -const ( - // ShareStatusNotShared is a ShareStatus enum value - ShareStatusNotShared = "NOT_SHARED" - - // ShareStatusSharedWithMe is a ShareStatus enum value - ShareStatusSharedWithMe = "SHARED_WITH_ME" - - // ShareStatusSharedByMe is a ShareStatus enum value - ShareStatusSharedByMe = "SHARED_BY_ME" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53resolver/doc.go b/vendor/github.com/aws/aws-sdk-go/service/route53resolver/doc.go deleted file mode 100644 index 02d332e9d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/route53resolver/doc.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package route53resolver provides the client and types for making API -// requests to Amazon Route 53 Resolver. -// -// Here's how you set up to query an Amazon Route 53 private hosted zone from -// your network: -// -// Connect your network to a VPC using AWS Direct Connect or a VPN. -// -// Run the following AWS CLI command to create a Resolver endpoint: -// -// create-resolver-endpoint --name [endpoint_name] --direction INBOUND --creator-request-id -// [unique_string] --security-group-ids [security_group_with_inbound_rules] -// --ip-addresses SubnetId=[subnet_id] SubnetId=[subnet_id_in_different_AZ] -// -// Note the resolver endpoint ID that appears in the response. You'll use it -// in step 3. -// -// Get the IP addresses for the Resolver endpoints: -// -// get-resolver-endpoint --resolver-endpoint-id [resolver_endpoint_id] -// -// In your network configuration, define the IP addresses that you got in step -// 3 as DNS servers. -// -// You can now query instance names in your VPCs and the names of records in -// your private hosted zone. -// -// You can also perform the following operations using the AWS CLI: -// -// * list-resolver-endpoints: List all endpoints. The syntax includes options -// for pagination and filtering. -// -// * update-resolver-endpoints: Add IP addresses to an endpoint or remove -// IP addresses from an endpoint. -// -// To delete an endpoint, use the following AWS CLI command: -// -// delete-resolver-endpoint --resolver-endpoint-id [resolver_endpoint_id] -// -// See https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01 for more information on this service. -// -// See route53resolver package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/route53resolver/ -// -// Using the Client -// -// To contact Amazon Route 53 Resolver with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Route 53 Resolver client Route53Resolver for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/route53resolver/#New -package route53resolver diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53resolver/errors.go b/vendor/github.com/aws/aws-sdk-go/service/route53resolver/errors.go deleted file mode 100644 index 0d410863e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/route53resolver/errors.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package route53resolver - -const ( - - // ErrCodeInternalServiceErrorException for service response error code - // "InternalServiceErrorException". - // - // We encountered an unknown error. Try again in a few minutes. - ErrCodeInternalServiceErrorException = "InternalServiceErrorException" - - // ErrCodeInvalidNextTokenException for service response error code - // "InvalidNextTokenException". - // - // The value that you specified for NextToken in a List request isn't valid. - ErrCodeInvalidNextTokenException = "InvalidNextTokenException" - - // ErrCodeInvalidParameterException for service response error code - // "InvalidParameterException". - // - // One or more parameters in this request are not valid. - ErrCodeInvalidParameterException = "InvalidParameterException" - - // ErrCodeInvalidPolicyDocument for service response error code - // "InvalidPolicyDocument". - // - // The specified resolver rule policy is invalid. - ErrCodeInvalidPolicyDocument = "InvalidPolicyDocument" - - // ErrCodeInvalidRequestException for service response error code - // "InvalidRequestException". - // - // The request is invalid. - ErrCodeInvalidRequestException = "InvalidRequestException" - - // ErrCodeInvalidTagException for service response error code - // "InvalidTagException". - // - // The specified tag is invalid. - ErrCodeInvalidTagException = "InvalidTagException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The request caused one or more limits to be exceeded. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeResourceExistsException for service response error code - // "ResourceExistsException". - // - // The resource that you tried to create already exists. - ErrCodeResourceExistsException = "ResourceExistsException" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUseException". - // - // The resource that you tried to update or delete is currently in use. - ErrCodeResourceInUseException = "ResourceInUseException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The specified resource doesn't exist. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeResourceUnavailableException for service response error code - // "ResourceUnavailableException". - // - // The specified resource isn't available. - ErrCodeResourceUnavailableException = "ResourceUnavailableException" - - // ErrCodeThrottlingException for service response error code - // "ThrottlingException". - // - // The request was throttled. Try again in a few minutes. - ErrCodeThrottlingException = "ThrottlingException" - - // ErrCodeUnknownResourceException for service response error code - // "UnknownResourceException". - // - // The specified resource doesn't exist. - ErrCodeUnknownResourceException = "UnknownResourceException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53resolver/service.go b/vendor/github.com/aws/aws-sdk-go/service/route53resolver/service.go deleted file mode 100644 index 367e933eb..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/route53resolver/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package route53resolver - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// Route53Resolver provides the API operation methods for making requests to -// Amazon Route 53 Resolver. See this package's package overview docs -// for details on the service. -// -// Route53Resolver methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Route53Resolver 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 = "Route53Resolver" // Name of service. - EndpointsID = "route53resolver" // ID to lookup a service endpoint with. - ServiceID = "Route53Resolver" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Route53Resolver 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 Route53Resolver client from just a session. -// svc := route53resolver.New(mySession) -// -// // Create a Route53Resolver client with additional configuration -// svc := route53resolver.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Route53Resolver { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Route53Resolver { - svc := &Route53Resolver{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-04-01", - JSONVersion: "1.1", - TargetPrefix: "Route53Resolver", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Route53Resolver operation and runs any -// custom request initialization. -func (c *Route53Resolver) 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/s3control/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3control/api.go deleted file mode 100644 index 328157b9c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3control/api.go +++ /dev/null @@ -1,569 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package s3control - -import ( - "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/restxml" -) - -const opDeletePublicAccessBlock = "DeletePublicAccessBlock" - -// DeletePublicAccessBlockRequest generates a "aws/request.Request" representing the -// client's request for the DeletePublicAccessBlock operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePublicAccessBlock for more information on using the DeletePublicAccessBlock -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePublicAccessBlockRequest method. -// req, resp := client.DeletePublicAccessBlockRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeletePublicAccessBlock -func (c *S3Control) DeletePublicAccessBlockRequest(input *DeletePublicAccessBlockInput) (req *request.Request, output *DeletePublicAccessBlockOutput) { - op := &request.Operation{ - Name: opDeletePublicAccessBlock, - HTTPMethod: "DELETE", - HTTPPath: "/v20180820/configuration/publicAccessBlock", - } - - if input == nil { - input = &DeletePublicAccessBlockInput{} - } - - output = &DeletePublicAccessBlockOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels)) - req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) - return -} - -// DeletePublicAccessBlock API operation for AWS S3 Control. -// -// Removes the Public Access Block configuration for an Amazon Web Services -// 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 S3 Control's -// API operation DeletePublicAccessBlock for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeletePublicAccessBlock -func (c *S3Control) DeletePublicAccessBlock(input *DeletePublicAccessBlockInput) (*DeletePublicAccessBlockOutput, error) { - req, out := c.DeletePublicAccessBlockRequest(input) - return out, req.Send() -} - -// DeletePublicAccessBlockWithContext is the same as DeletePublicAccessBlock with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePublicAccessBlock for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *S3Control) DeletePublicAccessBlockWithContext(ctx aws.Context, input *DeletePublicAccessBlockInput, opts ...request.Option) (*DeletePublicAccessBlockOutput, error) { - req, out := c.DeletePublicAccessBlockRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPublicAccessBlock = "GetPublicAccessBlock" - -// GetPublicAccessBlockRequest generates a "aws/request.Request" representing the -// client's request for the GetPublicAccessBlock operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPublicAccessBlock for more information on using the GetPublicAccessBlock -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPublicAccessBlockRequest method. -// req, resp := client.GetPublicAccessBlockRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/GetPublicAccessBlock -func (c *S3Control) GetPublicAccessBlockRequest(input *GetPublicAccessBlockInput) (req *request.Request, output *GetPublicAccessBlockOutput) { - op := &request.Operation{ - Name: opGetPublicAccessBlock, - HTTPMethod: "GET", - HTTPPath: "/v20180820/configuration/publicAccessBlock", - } - - if input == nil { - input = &GetPublicAccessBlockInput{} - } - - output = &GetPublicAccessBlockOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels)) - req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) - return -} - -// GetPublicAccessBlock API operation for AWS S3 Control. -// -// Retrieves the Public Access Block configuration for an Amazon Web Services -// 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 S3 Control's -// API operation GetPublicAccessBlock for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchPublicAccessBlockConfiguration "NoSuchPublicAccessBlockConfiguration" -// This exception is thrown if a GetPublicAccessBlock request is made against -// an account that does not have a PublicAccessBlockConfiguration set. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/GetPublicAccessBlock -func (c *S3Control) GetPublicAccessBlock(input *GetPublicAccessBlockInput) (*GetPublicAccessBlockOutput, error) { - req, out := c.GetPublicAccessBlockRequest(input) - return out, req.Send() -} - -// GetPublicAccessBlockWithContext is the same as GetPublicAccessBlock with the addition of -// the ability to pass a context and additional request options. -// -// See GetPublicAccessBlock for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *S3Control) GetPublicAccessBlockWithContext(ctx aws.Context, input *GetPublicAccessBlockInput, opts ...request.Option) (*GetPublicAccessBlockOutput, error) { - req, out := c.GetPublicAccessBlockRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutPublicAccessBlock = "PutPublicAccessBlock" - -// PutPublicAccessBlockRequest generates a "aws/request.Request" representing the -// client's request for the PutPublicAccessBlock operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutPublicAccessBlock for more information on using the PutPublicAccessBlock -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutPublicAccessBlockRequest method. -// req, resp := client.PutPublicAccessBlockRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/PutPublicAccessBlock -func (c *S3Control) PutPublicAccessBlockRequest(input *PutPublicAccessBlockInput) (req *request.Request, output *PutPublicAccessBlockOutput) { - op := &request.Operation{ - Name: opPutPublicAccessBlock, - HTTPMethod: "PUT", - HTTPPath: "/v20180820/configuration/publicAccessBlock", - } - - if input == nil { - input = &PutPublicAccessBlockInput{} - } - - output = &PutPublicAccessBlockOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels)) - req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) - return -} - -// PutPublicAccessBlock API operation for AWS S3 Control. -// -// Creates or modifies the Public Access Block configuration for an Amazon Web -// Services 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 S3 Control's -// API operation PutPublicAccessBlock for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/PutPublicAccessBlock -func (c *S3Control) PutPublicAccessBlock(input *PutPublicAccessBlockInput) (*PutPublicAccessBlockOutput, error) { - req, out := c.PutPublicAccessBlockRequest(input) - return out, req.Send() -} - -// PutPublicAccessBlockWithContext is the same as PutPublicAccessBlock with the addition of -// the ability to pass a context and additional request options. -// -// See PutPublicAccessBlock for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *S3Control) PutPublicAccessBlockWithContext(ctx aws.Context, input *PutPublicAccessBlockInput, opts ...request.Option) (*PutPublicAccessBlockOutput, error) { - req, out := c.PutPublicAccessBlockRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type DeletePublicAccessBlockInput struct { - _ struct{} `type:"structure"` - - // The Account ID for the Amazon Web Services account whose Public Access Block - // configuration you want to remove. - // - // AccountId is a required field - AccountId *string `location:"header" locationName:"x-amz-account-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePublicAccessBlockInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePublicAccessBlockInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePublicAccessBlockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePublicAccessBlockInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *DeletePublicAccessBlockInput) SetAccountId(v string) *DeletePublicAccessBlockInput { - s.AccountId = &v - return s -} - -func (s *DeletePublicAccessBlockInput) hostLabels() map[string]string { - return map[string]string{ - "AccountId": aws.StringValue(s.AccountId), - } -} - -type DeletePublicAccessBlockOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePublicAccessBlockOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePublicAccessBlockOutput) GoString() string { - return s.String() -} - -type GetPublicAccessBlockInput struct { - _ struct{} `type:"structure"` - - // The Account ID for the Amazon Web Services account whose Public Access Block - // configuration you want to retrieve. - // - // AccountId is a required field - AccountId *string `location:"header" locationName:"x-amz-account-id" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPublicAccessBlockInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPublicAccessBlockInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPublicAccessBlockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPublicAccessBlockInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *GetPublicAccessBlockInput) SetAccountId(v string) *GetPublicAccessBlockInput { - s.AccountId = &v - return s -} - -func (s *GetPublicAccessBlockInput) hostLabels() map[string]string { - return map[string]string{ - "AccountId": aws.StringValue(s.AccountId), - } -} - -type GetPublicAccessBlockOutput struct { - _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"` - - // The Public Access Block configuration currently in effect for this Amazon - // Web Services account. - PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `type:"structure"` -} - -// String returns the string representation -func (s GetPublicAccessBlockOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPublicAccessBlockOutput) GoString() string { - return s.String() -} - -// SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value. -func (s *GetPublicAccessBlockOutput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *GetPublicAccessBlockOutput { - s.PublicAccessBlockConfiguration = v - return s -} - -// The container element for all Public Access Block configuration options. -// You can enable the configuration options in any combination. -// -// Amazon S3 considers a bucket policy public unless at least one of the following -// conditions is true: -// -// The policy limits access to a set of CIDRs using aws:SourceIp. For more information -// on CIDR, see http://www.rfc-editor.org/rfc/rfc4632.txt (http://www.rfc-editor.org/rfc/rfc4632.txt) -// -// The policy grants permissions, not including any "bad actions," to one of -// the following: -// -// A fixed AWS principal, user, role, or service principal -// -// A fixed aws:SourceArn -// -// A fixed aws:SourceVpc -// -// A fixed aws:SourceVpce -// -// A fixed aws:SourceOwner -// -// A fixed aws:SourceAccount -// -// A fixed value of s3:x-amz-server-side-encryption-aws-kms-key-id -// -// A fixed value of aws:userid outside the pattern "AROLEID:*" -// -// "Bad actions" are those that could expose the data inside a bucket to reads -// or writes by the public. These actions are s3:Get*, s3:List*, s3:AbortMultipartUpload, -// s3:Delete*, s3:Put*, and s3:RestoreObject. -// -// The star notation for bad actions indicates that all matching operations -// are considered bad actions. For example, because s3:Get* is a bad action, -// s3:GetObject, s3:GetObjectVersion, and s3:GetObjectAcl are all bad actions. -type PublicAccessBlockConfiguration struct { - _ struct{} `type:"structure"` - - // Specifies whether Amazon S3 should block public ACLs for buckets in this - // account. Setting this element to TRUE causes the following behavior: - // - // * PUT Bucket acl and PUT Object acl calls will fail if the specified ACL - // allows public access. - // - // * PUT Object calls will fail if the request includes an object ACL. - // - // Note that enabling this setting doesn't affect existing policies or ACLs. - BlockPublicAcls *bool `locationName:"BlockPublicAcls" type:"boolean"` - - // Specifies whether Amazon S3 should block public bucket policies for buckets - // in this account. Setting this element to TRUE causes Amazon S3 to reject - // calls to PUT Bucket policy if the specified bucket policy allows public access. - // - // Note that enabling this setting doesn't affect existing bucket policies. - BlockPublicPolicy *bool `locationName:"BlockPublicPolicy" type:"boolean"` - - // Specifies whether Amazon S3 should ignore public ACLs for buckets in this - // account. Setting this element to TRUE causes Amazon S3 to ignore all public - // ACLs on buckets in this account and any objects that they contain. - // - // Note that enabling this setting doesn't affect the persistence of any existing - // ACLs and doesn't prevent new public ACLs from being set. - IgnorePublicAcls *bool `locationName:"IgnorePublicAcls" type:"boolean"` - - // Specifies whether Amazon S3 should restrict public bucket policies for buckets - // in this account. If this element is set to TRUE, then only the bucket owner - // and AWS Services can access buckets with public policies. - // - // Note that enabling this setting doesn't affect previously stored bucket policies, - // except that public and cross-account access within any public bucket policy, - // including non-public delegation to specific accounts, is blocked. - RestrictPublicBuckets *bool `locationName:"RestrictPublicBuckets" type:"boolean"` -} - -// String returns the string representation -func (s PublicAccessBlockConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublicAccessBlockConfiguration) GoString() string { - return s.String() -} - -// SetBlockPublicAcls sets the BlockPublicAcls field's value. -func (s *PublicAccessBlockConfiguration) SetBlockPublicAcls(v bool) *PublicAccessBlockConfiguration { - s.BlockPublicAcls = &v - return s -} - -// SetBlockPublicPolicy sets the BlockPublicPolicy field's value. -func (s *PublicAccessBlockConfiguration) SetBlockPublicPolicy(v bool) *PublicAccessBlockConfiguration { - s.BlockPublicPolicy = &v - return s -} - -// SetIgnorePublicAcls sets the IgnorePublicAcls field's value. -func (s *PublicAccessBlockConfiguration) SetIgnorePublicAcls(v bool) *PublicAccessBlockConfiguration { - s.IgnorePublicAcls = &v - return s -} - -// SetRestrictPublicBuckets sets the RestrictPublicBuckets field's value. -func (s *PublicAccessBlockConfiguration) SetRestrictPublicBuckets(v bool) *PublicAccessBlockConfiguration { - s.RestrictPublicBuckets = &v - return s -} - -type PutPublicAccessBlockInput struct { - _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"` - - // The Account ID for the Amazon Web Services account whose Public Access Block - // configuration you want to set. - // - // AccountId is a required field - AccountId *string `location:"header" locationName:"x-amz-account-id" type:"string" required:"true"` - - // The Public Access Block configuration that you want to apply to this Amazon - // Web Services account. - // - // PublicAccessBlockConfiguration is a required field - PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `locationName:"PublicAccessBlockConfiguration" type:"structure" required:"true" xmlURI:"http://awss3control.amazonaws.com/doc/2018-08-20/"` -} - -// String returns the string representation -func (s PutPublicAccessBlockInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutPublicAccessBlockInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutPublicAccessBlockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutPublicAccessBlockInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } - if s.AccountId != nil && len(*s.AccountId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) - } - if s.PublicAccessBlockConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("PublicAccessBlockConfiguration")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *PutPublicAccessBlockInput) SetAccountId(v string) *PutPublicAccessBlockInput { - s.AccountId = &v - return s -} - -// SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value. -func (s *PutPublicAccessBlockInput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *PutPublicAccessBlockInput { - s.PublicAccessBlockConfiguration = v - return s -} - -func (s *PutPublicAccessBlockInput) hostLabels() map[string]string { - return map[string]string{ - "AccountId": aws.StringValue(s.AccountId), - } -} - -type PutPublicAccessBlockOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutPublicAccessBlockOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutPublicAccessBlockOutput) GoString() string { - return s.String() -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3control/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/s3control/customizations.go deleted file mode 100644 index 6ea102095..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3control/customizations.go +++ /dev/null @@ -1,14 +0,0 @@ -package s3control - -import ( - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/internal/s3err" -) - -func init() { - initClient = defaultInitClientFn -} - -func defaultInitClientFn(c *client.Client) { - c.Handlers.UnmarshalError.PushBackNamed(s3err.RequestFailureWrapperHandler()) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3control/doc.go b/vendor/github.com/aws/aws-sdk-go/service/s3control/doc.go deleted file mode 100644 index 88e2654ab..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3control/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package s3control provides the client and types for making API -// requests to AWS S3 Control. -// -// AWS S3 Control provides access to Amazon S3 control plane operations. -// -// See https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20 for more information on this service. -// -// See s3control package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/s3control/ -// -// Using the Client -// -// To contact AWS S3 Control 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 S3 Control client S3Control for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/s3control/#New -package s3control diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3control/errors.go b/vendor/github.com/aws/aws-sdk-go/service/s3control/errors.go deleted file mode 100644 index 573dadc63..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3control/errors.go +++ /dev/null @@ -1,13 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package s3control - -const ( - - // ErrCodeNoSuchPublicAccessBlockConfiguration for service response error code - // "NoSuchPublicAccessBlockConfiguration". - // - // This exception is thrown if a GetPublicAccessBlock request is made against - // an account that does not have a PublicAccessBlockConfiguration set. - ErrCodeNoSuchPublicAccessBlockConfiguration = "NoSuchPublicAccessBlockConfiguration" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3control/service.go b/vendor/github.com/aws/aws-sdk-go/service/s3control/service.go deleted file mode 100644 index 377c9d55d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3control/service.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package s3control - -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/restxml" -) - -// S3Control provides the API operation methods for making requests to -// AWS S3 Control. See this package's package overview docs -// for details on the service. -// -// S3Control methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type S3Control 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 = "S3 Control" // Name of service. - EndpointsID = "s3-control" // ID to lookup a service endpoint with. - ServiceID = "S3 Control" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the S3Control 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 S3Control client from just a session. -// svc := s3control.New(mySession) -// -// // Create a S3Control client with additional configuration -// svc := s3control.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *S3Control { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "s3" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *S3Control { - svc := &S3Control{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-08-20", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.BuildNamedHandler(v4.SignRequestHandler.Name, func(s *v4.Signer) { - s.DisableURIPathEscaping = true - })) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a S3Control operation and runs any -// custom request initialization. -func (c *S3Control) 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/sagemaker/api.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go deleted file mode 100644 index 8e5a503d9..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go +++ /dev/null @@ -1,26320 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package sagemaker - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAddTags = "AddTags" - -// AddTagsRequest generates a "aws/request.Request" representing the -// client's request for the AddTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTags for more information on using the AddTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsRequest method. -// req, resp := client.AddTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/AddTags -func (c *SageMaker) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) { - op := &request.Operation{ - Name: opAddTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsInput{} - } - - output = &AddTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddTags API operation for Amazon SageMaker Service. -// -// Adds or overwrites one or more tags for the specified Amazon SageMaker resource. -// You can add tags to notebook instances, training jobs, hyperparameter tuning -// jobs, models, endpoint configurations, and endpoints. -// -// Each tag consists of a key and an optional value. Tag keys must be unique -// per resource. For more information about tags, see For more information, -// see AWS Tagging Strategies (https://aws.amazon.com/answers/account-management/aws-tagging-strategies/). -// -// Tags that you add to a hyperparameter tuning job by calling this API are -// also added to any training jobs that the hyperparameter tuning job launches -// after you call this API, but not to training jobs that the hyperparameter -// tuning job launched before you called this API. To make sure that the tags -// associated with a hyperparameter tuning job are also added to all training -// jobs that the hyperparameter tuning job launches, add the tags when you first -// create the tuning job by specifying them in the Tags parameter of CreateHyperParameterTuningJob -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation AddTags for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/AddTags -func (c *SageMaker) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - return out, req.Send() -} - -// AddTagsWithContext is the same as AddTags with the addition of -// the ability to pass a context and additional request options. -// -// See AddTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAlgorithm = "CreateAlgorithm" - -// CreateAlgorithmRequest generates a "aws/request.Request" representing the -// client's request for the CreateAlgorithm operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAlgorithm for more information on using the CreateAlgorithm -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAlgorithmRequest method. -// req, resp := client.CreateAlgorithmRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateAlgorithm -func (c *SageMaker) CreateAlgorithmRequest(input *CreateAlgorithmInput) (req *request.Request, output *CreateAlgorithmOutput) { - op := &request.Operation{ - Name: opCreateAlgorithm, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAlgorithmInput{} - } - - output = &CreateAlgorithmOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAlgorithm API operation for Amazon SageMaker Service. -// -// Create a machine learning algorithm that you can use in Amazon SageMaker -// and list in the AWS Marketplace. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreateAlgorithm for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateAlgorithm -func (c *SageMaker) CreateAlgorithm(input *CreateAlgorithmInput) (*CreateAlgorithmOutput, error) { - req, out := c.CreateAlgorithmRequest(input) - return out, req.Send() -} - -// CreateAlgorithmWithContext is the same as CreateAlgorithm with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAlgorithm for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreateAlgorithmWithContext(ctx aws.Context, input *CreateAlgorithmInput, opts ...request.Option) (*CreateAlgorithmOutput, error) { - req, out := c.CreateAlgorithmRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCodeRepository = "CreateCodeRepository" - -// CreateCodeRepositoryRequest generates a "aws/request.Request" representing the -// client's request for the CreateCodeRepository operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCodeRepository for more information on using the CreateCodeRepository -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCodeRepositoryRequest method. -// req, resp := client.CreateCodeRepositoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateCodeRepository -func (c *SageMaker) CreateCodeRepositoryRequest(input *CreateCodeRepositoryInput) (req *request.Request, output *CreateCodeRepositoryOutput) { - op := &request.Operation{ - Name: opCreateCodeRepository, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCodeRepositoryInput{} - } - - output = &CreateCodeRepositoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCodeRepository API operation for Amazon SageMaker Service. -// -// Creates a Git repository as a resource in your Amazon SageMaker account. -// You can associate the repository with notebook instances so that you can -// use Git source control for the notebooks you create. The Git repository is -// a resource in your Amazon SageMaker account, so it can be associated with -// more than one notebook instance, and it persists independently from the lifecycle -// of any notebook instances it is associated with. -// -// The repository can be hosted either in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) -// or in any other Git repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreateCodeRepository for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateCodeRepository -func (c *SageMaker) CreateCodeRepository(input *CreateCodeRepositoryInput) (*CreateCodeRepositoryOutput, error) { - req, out := c.CreateCodeRepositoryRequest(input) - return out, req.Send() -} - -// CreateCodeRepositoryWithContext is the same as CreateCodeRepository with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCodeRepository for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreateCodeRepositoryWithContext(ctx aws.Context, input *CreateCodeRepositoryInput, opts ...request.Option) (*CreateCodeRepositoryOutput, error) { - req, out := c.CreateCodeRepositoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCompilationJob = "CreateCompilationJob" - -// CreateCompilationJobRequest generates a "aws/request.Request" representing the -// client's request for the CreateCompilationJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCompilationJob for more information on using the CreateCompilationJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCompilationJobRequest method. -// req, resp := client.CreateCompilationJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateCompilationJob -func (c *SageMaker) CreateCompilationJobRequest(input *CreateCompilationJobInput) (req *request.Request, output *CreateCompilationJobOutput) { - op := &request.Operation{ - Name: opCreateCompilationJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCompilationJobInput{} - } - - output = &CreateCompilationJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCompilationJob API operation for Amazon SageMaker Service. -// -// Starts a model compilation job. After the model has been compiled, Amazon -// SageMaker saves the resulting model artifacts to an Amazon Simple Storage -// Service (Amazon S3) bucket that you specify. -// -// If you choose to host your model using Amazon SageMaker hosting services, -// you can use the resulting model artifacts as part of the model. You can also -// use the artifacts with AWS IoT Greengrass. In that case, deploy them as an -// ML resource. -// -// In the request body, you provide the following: -// -// * A name for the compilation job -// -// * Information about the input model artifacts -// -// * The output location for the compiled model and the device (target) that -// the model runs on -// -// * The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker -// assumes to perform the model compilation job -// -// You can also provide a Tag to track the model compilation job's resource -// use and costs. The response body contains the CompilationJobArn for the compiled -// job. -// -// To stop a model compilation job, use StopCompilationJob. To get information -// about a particular model compilation job, use DescribeCompilationJob. To -// get information about multiple model compilation jobs, use ListCompilationJobs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreateCompilationJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUse "ResourceInUse" -// Resource being accessed is in use. -// -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateCompilationJob -func (c *SageMaker) CreateCompilationJob(input *CreateCompilationJobInput) (*CreateCompilationJobOutput, error) { - req, out := c.CreateCompilationJobRequest(input) - return out, req.Send() -} - -// CreateCompilationJobWithContext is the same as CreateCompilationJob with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCompilationJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreateCompilationJobWithContext(ctx aws.Context, input *CreateCompilationJobInput, opts ...request.Option) (*CreateCompilationJobOutput, error) { - req, out := c.CreateCompilationJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateEndpoint = "CreateEndpoint" - -// CreateEndpointRequest generates a "aws/request.Request" representing the -// client's request for the CreateEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateEndpoint for more information on using the CreateEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateEndpointRequest method. -// req, resp := client.CreateEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEndpoint -func (c *SageMaker) CreateEndpointRequest(input *CreateEndpointInput) (req *request.Request, output *CreateEndpointOutput) { - op := &request.Operation{ - Name: opCreateEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateEndpointInput{} - } - - output = &CreateEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateEndpoint API operation for Amazon SageMaker Service. -// -// Creates an endpoint using the endpoint configuration specified in the request. -// Amazon SageMaker uses the endpoint to provision resources and deploy models. -// You create the endpoint configuration with the CreateEndpointConfig (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpointConfig.html) -// API. -// -// Use this API only for hosting models using Amazon SageMaker hosting services. -// -// The endpoint name must be unique within an AWS Region in your AWS account. -// -// When it receives the request, Amazon SageMaker creates the endpoint, launches -// the resources (ML compute instances), and deploys the model(s) on them. -// -// When Amazon SageMaker receives the request, it sets the endpoint status to -// Creating. After it creates the endpoint, it sets the status to InService. -// Amazon SageMaker can then process incoming requests for inferences. To check -// the status of an endpoint, use the DescribeEndpoint (http://docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html) -// API. -// -// For an example, see Exercise 1: Using the K-Means Algorithm Provided by Amazon -// SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/ex1.html). -// -// If any of the models hosted at this endpoint get model data from an Amazon -// S3 location, Amazon SageMaker uses AWS Security Token Service to download -// model artifacts from the S3 path you provided. AWS STS is activated in your -// IAM user account by default. If you previously deactivated AWS STS for a -// region, you need to reactivate AWS STS for that region. For more information, -// see Activating and Deactivating AWS STS i an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) -// in the AWS Identity and Access Management User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreateEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEndpoint -func (c *SageMaker) CreateEndpoint(input *CreateEndpointInput) (*CreateEndpointOutput, error) { - req, out := c.CreateEndpointRequest(input) - return out, req.Send() -} - -// CreateEndpointWithContext is the same as CreateEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See CreateEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreateEndpointWithContext(ctx aws.Context, input *CreateEndpointInput, opts ...request.Option) (*CreateEndpointOutput, error) { - req, out := c.CreateEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateEndpointConfig = "CreateEndpointConfig" - -// CreateEndpointConfigRequest generates a "aws/request.Request" representing the -// client's request for the CreateEndpointConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateEndpointConfig for more information on using the CreateEndpointConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateEndpointConfigRequest method. -// req, resp := client.CreateEndpointConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEndpointConfig -func (c *SageMaker) CreateEndpointConfigRequest(input *CreateEndpointConfigInput) (req *request.Request, output *CreateEndpointConfigOutput) { - op := &request.Operation{ - Name: opCreateEndpointConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateEndpointConfigInput{} - } - - output = &CreateEndpointConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateEndpointConfig API operation for Amazon SageMaker Service. -// -// Creates an endpoint configuration that Amazon SageMaker hosting services -// uses to deploy models. In the configuration, you identify one or more models, -// created using the CreateModel API, to deploy and the resources that you want -// Amazon SageMaker to provision. Then you call the CreateEndpoint (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html) -// API. -// -// Use this API only if you want to use Amazon SageMaker hosting services to -// deploy models into production. -// -// In the request, you define one or more ProductionVariants, each of which -// identifies a model. Each ProductionVariant parameter also describes the resources -// that you want Amazon SageMaker to provision. This includes the number and -// type of ML compute instances to deploy. -// -// If you are hosting multiple models, you also assign a VariantWeight to specify -// how much traffic you want to allocate to each model. For example, suppose -// that you want to host two models, A and B, and you assign traffic weight -// 2 for model A and 1 for model B. Amazon SageMaker distributes two-thirds -// of the traffic to Model A, and one-third to model B. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreateEndpointConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEndpointConfig -func (c *SageMaker) CreateEndpointConfig(input *CreateEndpointConfigInput) (*CreateEndpointConfigOutput, error) { - req, out := c.CreateEndpointConfigRequest(input) - return out, req.Send() -} - -// CreateEndpointConfigWithContext is the same as CreateEndpointConfig with the addition of -// the ability to pass a context and additional request options. -// -// See CreateEndpointConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreateEndpointConfigWithContext(ctx aws.Context, input *CreateEndpointConfigInput, opts ...request.Option) (*CreateEndpointConfigOutput, error) { - req, out := c.CreateEndpointConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateHyperParameterTuningJob = "CreateHyperParameterTuningJob" - -// CreateHyperParameterTuningJobRequest generates a "aws/request.Request" representing the -// client's request for the CreateHyperParameterTuningJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateHyperParameterTuningJob for more information on using the CreateHyperParameterTuningJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateHyperParameterTuningJobRequest method. -// req, resp := client.CreateHyperParameterTuningJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateHyperParameterTuningJob -func (c *SageMaker) CreateHyperParameterTuningJobRequest(input *CreateHyperParameterTuningJobInput) (req *request.Request, output *CreateHyperParameterTuningJobOutput) { - op := &request.Operation{ - Name: opCreateHyperParameterTuningJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateHyperParameterTuningJobInput{} - } - - output = &CreateHyperParameterTuningJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateHyperParameterTuningJob API operation for Amazon SageMaker Service. -// -// Starts a hyperparameter tuning job. A hyperparameter tuning job finds the -// best version of a model by running many training jobs on your dataset using -// the algorithm you choose and values for hyperparameters within ranges that -// you specify. It then chooses the hyperparameter values that result in a model -// that performs the best, as measured by an objective metric that you choose. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreateHyperParameterTuningJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUse "ResourceInUse" -// Resource being accessed is in use. -// -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateHyperParameterTuningJob -func (c *SageMaker) CreateHyperParameterTuningJob(input *CreateHyperParameterTuningJobInput) (*CreateHyperParameterTuningJobOutput, error) { - req, out := c.CreateHyperParameterTuningJobRequest(input) - return out, req.Send() -} - -// CreateHyperParameterTuningJobWithContext is the same as CreateHyperParameterTuningJob with the addition of -// the ability to pass a context and additional request options. -// -// See CreateHyperParameterTuningJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreateHyperParameterTuningJobWithContext(ctx aws.Context, input *CreateHyperParameterTuningJobInput, opts ...request.Option) (*CreateHyperParameterTuningJobOutput, error) { - req, out := c.CreateHyperParameterTuningJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLabelingJob = "CreateLabelingJob" - -// CreateLabelingJobRequest generates a "aws/request.Request" representing the -// client's request for the CreateLabelingJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLabelingJob for more information on using the CreateLabelingJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateLabelingJobRequest method. -// req, resp := client.CreateLabelingJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateLabelingJob -func (c *SageMaker) CreateLabelingJobRequest(input *CreateLabelingJobInput) (req *request.Request, output *CreateLabelingJobOutput) { - op := &request.Operation{ - Name: opCreateLabelingJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLabelingJobInput{} - } - - output = &CreateLabelingJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLabelingJob API operation for Amazon SageMaker Service. -// -// Creates a job that uses workers to label the data objects in your input dataset. -// You can use the labeled data to train machine learning models. -// -// You can select your workforce from one of three providers: -// -// * A private workforce that you create. It can include employees, contractors, -// and outside experts. Use a private workforce when want the data to stay -// within your organization or when a specific set of skills is required. -// -// * One or more vendors that you select from the AWS Marketplace. Vendors -// provide expertise in specific areas. -// -// * The Amazon Mechanical Turk workforce. This is the largest workforce, -// but it should only be used for public data or data that has been stripped -// of any personally identifiable information. -// -// You can also use automated data labeling to reduce the number of data objects -// that need to be labeled by a human. Automated data labeling uses active learning -// to determine if a data object can be labeled by machine or if it needs to -// be sent to a human worker. For more information, see Using Automated Data -// Labeling (http://docs.aws.amazon.com/sagemaker/latest/dg/sms-automated-labeling.html). -// -// The data objects to be labeled are contained in an Amazon S3 bucket. You -// create a manifest file that describes the location of each object. For more -// information, see Using Input and Output Data (http://docs.aws.amazon.com/sagemaker/latest/dg/sms-data.html). -// -// The output can be used as the manifest file for another labeling job or as -// training data for your machine learning models. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreateLabelingJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUse "ResourceInUse" -// Resource being accessed is in use. -// -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateLabelingJob -func (c *SageMaker) CreateLabelingJob(input *CreateLabelingJobInput) (*CreateLabelingJobOutput, error) { - req, out := c.CreateLabelingJobRequest(input) - return out, req.Send() -} - -// CreateLabelingJobWithContext is the same as CreateLabelingJob with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLabelingJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreateLabelingJobWithContext(ctx aws.Context, input *CreateLabelingJobInput, opts ...request.Option) (*CreateLabelingJobOutput, error) { - req, out := c.CreateLabelingJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateModel = "CreateModel" - -// CreateModelRequest generates a "aws/request.Request" representing the -// client's request for the CreateModel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateModel for more information on using the CreateModel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateModelRequest method. -// req, resp := client.CreateModelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModel -func (c *SageMaker) CreateModelRequest(input *CreateModelInput) (req *request.Request, output *CreateModelOutput) { - op := &request.Operation{ - Name: opCreateModel, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateModelInput{} - } - - output = &CreateModelOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateModel API operation for Amazon SageMaker Service. -// -// Creates a model in Amazon SageMaker. In the request, you name the model and -// describe a primary container. For the primary container, you specify the -// docker image containing inference code, artifacts (from prior training), -// and custom environment map that the inference code uses when you deploy the -// model for predictions. -// -// Use this API to create a model if you want to use Amazon SageMaker hosting -// services or run a batch transform job. -// -// To host your model, you create an endpoint configuration with the CreateEndpointConfig -// API, and then create an endpoint with the CreateEndpoint API. Amazon SageMaker -// then deploys all of the containers that you defined for the model in the -// hosting environment. -// -// To run a batch transform using your model, you start a job with the CreateTransformJob -// API. Amazon SageMaker uses your model and your dataset to get inferences -// which are then saved to a specified S3 location. -// -// In the CreateModel request, you must define a container with the PrimaryContainer -// parameter. -// -// In the request, you also provide an IAM role that Amazon SageMaker can assume -// to access model artifacts and docker image for deployment on ML compute hosting -// instances or for batch transform jobs. In addition, you also use the IAM -// role to manage permissions the inference code needs. For example, if the -// inference code access any other AWS resources, you grant necessary permissions -// via this role. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreateModel for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModel -func (c *SageMaker) CreateModel(input *CreateModelInput) (*CreateModelOutput, error) { - req, out := c.CreateModelRequest(input) - return out, req.Send() -} - -// CreateModelWithContext is the same as CreateModel with the addition of -// the ability to pass a context and additional request options. -// -// See CreateModel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreateModelWithContext(ctx aws.Context, input *CreateModelInput, opts ...request.Option) (*CreateModelOutput, error) { - req, out := c.CreateModelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateModelPackage = "CreateModelPackage" - -// CreateModelPackageRequest generates a "aws/request.Request" representing the -// client's request for the CreateModelPackage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateModelPackage for more information on using the CreateModelPackage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateModelPackageRequest method. -// req, resp := client.CreateModelPackageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModelPackage -func (c *SageMaker) CreateModelPackageRequest(input *CreateModelPackageInput) (req *request.Request, output *CreateModelPackageOutput) { - op := &request.Operation{ - Name: opCreateModelPackage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateModelPackageInput{} - } - - output = &CreateModelPackageOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateModelPackage API operation for Amazon SageMaker Service. -// -// Creates a model package that you can use to create Amazon SageMaker models -// or list on AWS Marketplace. Buyers can subscribe to model packages listed -// on AWS Marketplace to create models in Amazon SageMaker. -// -// To create a model package by specifying a Docker container that contains -// your inference code and the Amazon S3 location of your model artifacts, provide -// values for InferenceSpecification. To create a model from an algorithm resource -// that you created or subscribed to in AWS Marketplace, provide a value for -// SourceAlgorithmSpecification. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreateModelPackage for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModelPackage -func (c *SageMaker) CreateModelPackage(input *CreateModelPackageInput) (*CreateModelPackageOutput, error) { - req, out := c.CreateModelPackageRequest(input) - return out, req.Send() -} - -// CreateModelPackageWithContext is the same as CreateModelPackage with the addition of -// the ability to pass a context and additional request options. -// -// See CreateModelPackage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreateModelPackageWithContext(ctx aws.Context, input *CreateModelPackageInput, opts ...request.Option) (*CreateModelPackageOutput, error) { - req, out := c.CreateModelPackageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateNotebookInstance = "CreateNotebookInstance" - -// CreateNotebookInstanceRequest generates a "aws/request.Request" representing the -// client's request for the CreateNotebookInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateNotebookInstance for more information on using the CreateNotebookInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateNotebookInstanceRequest method. -// req, resp := client.CreateNotebookInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateNotebookInstance -func (c *SageMaker) CreateNotebookInstanceRequest(input *CreateNotebookInstanceInput) (req *request.Request, output *CreateNotebookInstanceOutput) { - op := &request.Operation{ - Name: opCreateNotebookInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateNotebookInstanceInput{} - } - - output = &CreateNotebookInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateNotebookInstance API operation for Amazon SageMaker Service. -// -// Creates an Amazon SageMaker notebook instance. A notebook instance is a machine -// learning (ML) compute instance running on a Jupyter notebook. -// -// In a CreateNotebookInstance request, specify the type of ML compute instance -// that you want to run. Amazon SageMaker launches the instance, installs common -// libraries that you can use to explore datasets for model training, and attaches -// an ML storage volume to the notebook instance. -// -// Amazon SageMaker also provides a set of example notebooks. Each notebook -// demonstrates how to use Amazon SageMaker with a specific algorithm or with -// a machine learning framework. -// -// After receiving the request, Amazon SageMaker does the following: -// -// Creates a network interface in the Amazon SageMaker VPC. -// -// (Option) If you specified SubnetId, Amazon SageMaker creates a network interface -// in your own VPC, which is inferred from the subnet ID that you provide in -// the input. When creating this network interface, Amazon SageMaker attaches -// the security group that you specified in the request to the network interface -// that it creates in your VPC. -// -// Launches an EC2 instance of the type specified in the request in the Amazon -// SageMaker VPC. If you specified SubnetId of your VPC, Amazon SageMaker specifies -// both network interfaces when launching this instance. This enables inbound -// traffic from your own VPC to the notebook instance, assuming that the security -// groups allow it. -// -// After creating the notebook instance, Amazon SageMaker returns its Amazon -// Resource Name (ARN). -// -// After Amazon SageMaker creates the notebook instance, you can connect to -// the Jupyter server and work in Jupyter notebooks. For example, you can write -// code to explore a dataset that you can use for model training, train a model, -// host models by creating Amazon SageMaker endpoints, and validate hosted models. -// -// For more information, see How It Works (http://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreateNotebookInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateNotebookInstance -func (c *SageMaker) CreateNotebookInstance(input *CreateNotebookInstanceInput) (*CreateNotebookInstanceOutput, error) { - req, out := c.CreateNotebookInstanceRequest(input) - return out, req.Send() -} - -// CreateNotebookInstanceWithContext is the same as CreateNotebookInstance with the addition of -// the ability to pass a context and additional request options. -// -// See CreateNotebookInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreateNotebookInstanceWithContext(ctx aws.Context, input *CreateNotebookInstanceInput, opts ...request.Option) (*CreateNotebookInstanceOutput, error) { - req, out := c.CreateNotebookInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateNotebookInstanceLifecycleConfig = "CreateNotebookInstanceLifecycleConfig" - -// CreateNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the -// client's request for the CreateNotebookInstanceLifecycleConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateNotebookInstanceLifecycleConfig for more information on using the CreateNotebookInstanceLifecycleConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateNotebookInstanceLifecycleConfigRequest method. -// req, resp := client.CreateNotebookInstanceLifecycleConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateNotebookInstanceLifecycleConfig -func (c *SageMaker) CreateNotebookInstanceLifecycleConfigRequest(input *CreateNotebookInstanceLifecycleConfigInput) (req *request.Request, output *CreateNotebookInstanceLifecycleConfigOutput) { - op := &request.Operation{ - Name: opCreateNotebookInstanceLifecycleConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateNotebookInstanceLifecycleConfigInput{} - } - - output = &CreateNotebookInstanceLifecycleConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateNotebookInstanceLifecycleConfig API operation for Amazon SageMaker Service. -// -// Creates a lifecycle configuration that you can associate with a notebook -// instance. A lifecycle configuration is a collection of shell scripts that -// run when you create or start a notebook instance. -// -// Each lifecycle configuration script has a limit of 16384 characters. -// -// The value of the $PATH environment variable that is available to both scripts -// is /sbin:bin:/usr/sbin:/usr/bin. -// -// View CloudWatch Logs for notebook instance lifecycle configurations in log -// group /aws/sagemaker/NotebookInstances in log stream [notebook-instance-name]/[LifecycleConfigHook]. -// -// Lifecycle configuration scripts cannot run for longer than 5 minutes. If -// a script runs for longer than 5 minutes, it fails and the notebook instance -// is not created or started. -// -// For information about notebook instance lifestyle configurations, see Step -// 2.1: (Optional) Customize a Notebook Instance (http://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreateNotebookInstanceLifecycleConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateNotebookInstanceLifecycleConfig -func (c *SageMaker) CreateNotebookInstanceLifecycleConfig(input *CreateNotebookInstanceLifecycleConfigInput) (*CreateNotebookInstanceLifecycleConfigOutput, error) { - req, out := c.CreateNotebookInstanceLifecycleConfigRequest(input) - return out, req.Send() -} - -// CreateNotebookInstanceLifecycleConfigWithContext is the same as CreateNotebookInstanceLifecycleConfig with the addition of -// the ability to pass a context and additional request options. -// -// See CreateNotebookInstanceLifecycleConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreateNotebookInstanceLifecycleConfigWithContext(ctx aws.Context, input *CreateNotebookInstanceLifecycleConfigInput, opts ...request.Option) (*CreateNotebookInstanceLifecycleConfigOutput, error) { - req, out := c.CreateNotebookInstanceLifecycleConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePresignedNotebookInstanceUrl = "CreatePresignedNotebookInstanceUrl" - -// CreatePresignedNotebookInstanceUrlRequest generates a "aws/request.Request" representing the -// client's request for the CreatePresignedNotebookInstanceUrl operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePresignedNotebookInstanceUrl for more information on using the CreatePresignedNotebookInstanceUrl -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePresignedNotebookInstanceUrlRequest method. -// req, resp := client.CreatePresignedNotebookInstanceUrlRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreatePresignedNotebookInstanceUrl -func (c *SageMaker) CreatePresignedNotebookInstanceUrlRequest(input *CreatePresignedNotebookInstanceUrlInput) (req *request.Request, output *CreatePresignedNotebookInstanceUrlOutput) { - op := &request.Operation{ - Name: opCreatePresignedNotebookInstanceUrl, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePresignedNotebookInstanceUrlInput{} - } - - output = &CreatePresignedNotebookInstanceUrlOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePresignedNotebookInstanceUrl API operation for Amazon SageMaker Service. -// -// Returns a URL that you can use to connect to the Jupyter server from a notebook -// instance. In the Amazon SageMaker console, when you choose Open next to a -// notebook instance, Amazon SageMaker opens a new tab showing the Jupyter server -// home page from the notebook instance. The console uses this API to get the -// URL and show the page. -// -// You can restrict access to this API and to the URL that it returns to a list -// of IP addresses that you specify. To restrict access, attach an IAM policy -// that denies access to this API unless the call comes from an IP address in -// the specified list to every AWS Identity and Access Management user, group, -// or role used to access the notebook instance. Use the NotIpAddress condition -// operator and the aws:SourceIP condition context key to specify the list of -// IP addresses that you want to have access to the notebook instance. For more -// information, see Limit Access to a Notebook Instance by IP Address (http://docs.aws.amazon.com/sagemaker/latest/dg/howitworks-access-ws.html#nbi-ip-filter). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreatePresignedNotebookInstanceUrl for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreatePresignedNotebookInstanceUrl -func (c *SageMaker) CreatePresignedNotebookInstanceUrl(input *CreatePresignedNotebookInstanceUrlInput) (*CreatePresignedNotebookInstanceUrlOutput, error) { - req, out := c.CreatePresignedNotebookInstanceUrlRequest(input) - return out, req.Send() -} - -// CreatePresignedNotebookInstanceUrlWithContext is the same as CreatePresignedNotebookInstanceUrl with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePresignedNotebookInstanceUrl for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreatePresignedNotebookInstanceUrlWithContext(ctx aws.Context, input *CreatePresignedNotebookInstanceUrlInput, opts ...request.Option) (*CreatePresignedNotebookInstanceUrlOutput, error) { - req, out := c.CreatePresignedNotebookInstanceUrlRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTrainingJob = "CreateTrainingJob" - -// CreateTrainingJobRequest generates a "aws/request.Request" representing the -// client's request for the CreateTrainingJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTrainingJob for more information on using the CreateTrainingJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTrainingJobRequest method. -// req, resp := client.CreateTrainingJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTrainingJob -func (c *SageMaker) CreateTrainingJobRequest(input *CreateTrainingJobInput) (req *request.Request, output *CreateTrainingJobOutput) { - op := &request.Operation{ - Name: opCreateTrainingJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTrainingJobInput{} - } - - output = &CreateTrainingJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTrainingJob API operation for Amazon SageMaker Service. -// -// Starts a model training job. After training completes, Amazon SageMaker saves -// the resulting model artifacts to an Amazon S3 location that you specify. -// -// If you choose to host your model using Amazon SageMaker hosting services, -// you can use the resulting model artifacts as part of the model. You can also -// use the artifacts in a deep learning service other than Amazon SageMaker, -// provided that you know how to use them for inferences. -// -// In the request body, you provide the following: -// -// * AlgorithmSpecification - Identifies the training algorithm to use. -// -// * HyperParameters - Specify these algorithm-specific parameters to influence -// the quality of the final model. For a list of hyperparameters for each -// training algorithm provided by Amazon SageMaker, see Algorithms (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). -// -// -// * InputDataConfig - Describes the training dataset and the Amazon S3 location -// where it is stored. -// -// * OutputDataConfig - Identifies the Amazon S3 location where you want -// Amazon SageMaker to save the results of model training. -// -// * ResourceConfig - Identifies the resources, ML compute instances, and -// ML storage volumes to deploy for model training. In distributed training, -// you specify more than one instance. -// -// * RoleARN - The Amazon Resource Number (ARN) that Amazon SageMaker assumes -// to perform tasks on your behalf during model training. You must grant -// this role the necessary permissions so that Amazon SageMaker can successfully -// complete model training. -// -// * StoppingCondition - Sets a duration for training. Use this parameter -// to cap model training costs. -// -// For more information about Amazon SageMaker, see How It Works (http://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreateTrainingJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUse "ResourceInUse" -// Resource being accessed is in use. -// -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTrainingJob -func (c *SageMaker) CreateTrainingJob(input *CreateTrainingJobInput) (*CreateTrainingJobOutput, error) { - req, out := c.CreateTrainingJobRequest(input) - return out, req.Send() -} - -// CreateTrainingJobWithContext is the same as CreateTrainingJob with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTrainingJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreateTrainingJobWithContext(ctx aws.Context, input *CreateTrainingJobInput, opts ...request.Option) (*CreateTrainingJobOutput, error) { - req, out := c.CreateTrainingJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTransformJob = "CreateTransformJob" - -// CreateTransformJobRequest generates a "aws/request.Request" representing the -// client's request for the CreateTransformJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTransformJob for more information on using the CreateTransformJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTransformJobRequest method. -// req, resp := client.CreateTransformJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTransformJob -func (c *SageMaker) CreateTransformJobRequest(input *CreateTransformJobInput) (req *request.Request, output *CreateTransformJobOutput) { - op := &request.Operation{ - Name: opCreateTransformJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTransformJobInput{} - } - - output = &CreateTransformJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTransformJob API operation for Amazon SageMaker Service. -// -// Starts a transform job. A transform job uses a trained model to get inferences -// on a dataset and saves these results to an Amazon S3 location that you specify. -// -// To perform batch transformations, you create a transform job and use the -// data that you have readily available. -// -// In the request body, you provide the following: -// -// * TransformJobName - Identifies the transform job. The name must be unique -// within an AWS Region in an AWS account. -// -// * ModelName - Identifies the model to use. ModelName must be the name -// of an existing Amazon SageMaker model in the same AWS Region and AWS account. -// For information on creating a model, see CreateModel. -// -// * TransformInput - Describes the dataset to be transformed and the Amazon -// S3 location where it is stored. -// -// * TransformOutput - Identifies the Amazon S3 location where you want Amazon -// SageMaker to save the results from the transform job. -// -// * TransformResources - Identifies the ML compute instances for the transform -// job. -// -// For more information about how batch transformation works Amazon SageMaker, -// see How It Works (http://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreateTransformJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUse "ResourceInUse" -// Resource being accessed is in use. -// -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTransformJob -func (c *SageMaker) CreateTransformJob(input *CreateTransformJobInput) (*CreateTransformJobOutput, error) { - req, out := c.CreateTransformJobRequest(input) - return out, req.Send() -} - -// CreateTransformJobWithContext is the same as CreateTransformJob with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTransformJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreateTransformJobWithContext(ctx aws.Context, input *CreateTransformJobInput, opts ...request.Option) (*CreateTransformJobOutput, error) { - req, out := c.CreateTransformJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateWorkteam = "CreateWorkteam" - -// CreateWorkteamRequest generates a "aws/request.Request" representing the -// client's request for the CreateWorkteam operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateWorkteam for more information on using the CreateWorkteam -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateWorkteamRequest method. -// req, resp := client.CreateWorkteamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateWorkteam -func (c *SageMaker) CreateWorkteamRequest(input *CreateWorkteamInput) (req *request.Request, output *CreateWorkteamOutput) { - op := &request.Operation{ - Name: opCreateWorkteam, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateWorkteamInput{} - } - - output = &CreateWorkteamOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateWorkteam API operation for Amazon SageMaker Service. -// -// Creates a new work team for labeling your data. A work team is defined by -// one or more Amazon Cognito user pools. You must first create the user pools -// before you can create a work team. -// -// You cannot create more than 25 work teams in an account and region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation CreateWorkteam for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUse "ResourceInUse" -// Resource being accessed is in use. -// -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateWorkteam -func (c *SageMaker) CreateWorkteam(input *CreateWorkteamInput) (*CreateWorkteamOutput, error) { - req, out := c.CreateWorkteamRequest(input) - return out, req.Send() -} - -// CreateWorkteamWithContext is the same as CreateWorkteam with the addition of -// the ability to pass a context and additional request options. -// -// See CreateWorkteam for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) CreateWorkteamWithContext(ctx aws.Context, input *CreateWorkteamInput, opts ...request.Option) (*CreateWorkteamOutput, error) { - req, out := c.CreateWorkteamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAlgorithm = "DeleteAlgorithm" - -// DeleteAlgorithmRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAlgorithm operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAlgorithm for more information on using the DeleteAlgorithm -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAlgorithmRequest method. -// req, resp := client.DeleteAlgorithmRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteAlgorithm -func (c *SageMaker) DeleteAlgorithmRequest(input *DeleteAlgorithmInput) (req *request.Request, output *DeleteAlgorithmOutput) { - op := &request.Operation{ - Name: opDeleteAlgorithm, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAlgorithmInput{} - } - - output = &DeleteAlgorithmOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAlgorithm API operation for Amazon SageMaker Service. -// -// Removes the specified algorithm from your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DeleteAlgorithm for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteAlgorithm -func (c *SageMaker) DeleteAlgorithm(input *DeleteAlgorithmInput) (*DeleteAlgorithmOutput, error) { - req, out := c.DeleteAlgorithmRequest(input) - return out, req.Send() -} - -// DeleteAlgorithmWithContext is the same as DeleteAlgorithm with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAlgorithm for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DeleteAlgorithmWithContext(ctx aws.Context, input *DeleteAlgorithmInput, opts ...request.Option) (*DeleteAlgorithmOutput, error) { - req, out := c.DeleteAlgorithmRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCodeRepository = "DeleteCodeRepository" - -// DeleteCodeRepositoryRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCodeRepository operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCodeRepository for more information on using the DeleteCodeRepository -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCodeRepositoryRequest method. -// req, resp := client.DeleteCodeRepositoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteCodeRepository -func (c *SageMaker) DeleteCodeRepositoryRequest(input *DeleteCodeRepositoryInput) (req *request.Request, output *DeleteCodeRepositoryOutput) { - op := &request.Operation{ - Name: opDeleteCodeRepository, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCodeRepositoryInput{} - } - - output = &DeleteCodeRepositoryOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCodeRepository API operation for Amazon SageMaker Service. -// -// Deletes the specified Git repository from your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DeleteCodeRepository for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteCodeRepository -func (c *SageMaker) DeleteCodeRepository(input *DeleteCodeRepositoryInput) (*DeleteCodeRepositoryOutput, error) { - req, out := c.DeleteCodeRepositoryRequest(input) - return out, req.Send() -} - -// DeleteCodeRepositoryWithContext is the same as DeleteCodeRepository with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCodeRepository for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DeleteCodeRepositoryWithContext(ctx aws.Context, input *DeleteCodeRepositoryInput, opts ...request.Option) (*DeleteCodeRepositoryOutput, error) { - req, out := c.DeleteCodeRepositoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEndpoint = "DeleteEndpoint" - -// DeleteEndpointRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEndpoint for more information on using the DeleteEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEndpointRequest method. -// req, resp := client.DeleteEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteEndpoint -func (c *SageMaker) DeleteEndpointRequest(input *DeleteEndpointInput) (req *request.Request, output *DeleteEndpointOutput) { - op := &request.Operation{ - Name: opDeleteEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteEndpointInput{} - } - - output = &DeleteEndpointOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteEndpoint API operation for Amazon SageMaker Service. -// -// Deletes an endpoint. Amazon SageMaker frees up all of the resources that -// were deployed when the endpoint was created. -// -// Amazon SageMaker retires any custom KMS key grants associated with the endpoint, -// meaning you don't need to use the RevokeGrant (http://docs.aws.amazon.com/kms/latest/APIReference/API_RevokeGrant.html) -// API call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DeleteEndpoint for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteEndpoint -func (c *SageMaker) DeleteEndpoint(input *DeleteEndpointInput) (*DeleteEndpointOutput, error) { - req, out := c.DeleteEndpointRequest(input) - return out, req.Send() -} - -// DeleteEndpointWithContext is the same as DeleteEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DeleteEndpointWithContext(ctx aws.Context, input *DeleteEndpointInput, opts ...request.Option) (*DeleteEndpointOutput, error) { - req, out := c.DeleteEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEndpointConfig = "DeleteEndpointConfig" - -// DeleteEndpointConfigRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEndpointConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEndpointConfig for more information on using the DeleteEndpointConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEndpointConfigRequest method. -// req, resp := client.DeleteEndpointConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteEndpointConfig -func (c *SageMaker) DeleteEndpointConfigRequest(input *DeleteEndpointConfigInput) (req *request.Request, output *DeleteEndpointConfigOutput) { - op := &request.Operation{ - Name: opDeleteEndpointConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteEndpointConfigInput{} - } - - output = &DeleteEndpointConfigOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteEndpointConfig API operation for Amazon SageMaker Service. -// -// Deletes an endpoint configuration. The DeleteEndpointConfig API deletes only -// the specified configuration. It does not delete endpoints created using the -// configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DeleteEndpointConfig for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteEndpointConfig -func (c *SageMaker) DeleteEndpointConfig(input *DeleteEndpointConfigInput) (*DeleteEndpointConfigOutput, error) { - req, out := c.DeleteEndpointConfigRequest(input) - return out, req.Send() -} - -// DeleteEndpointConfigWithContext is the same as DeleteEndpointConfig with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEndpointConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DeleteEndpointConfigWithContext(ctx aws.Context, input *DeleteEndpointConfigInput, opts ...request.Option) (*DeleteEndpointConfigOutput, error) { - req, out := c.DeleteEndpointConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteModel = "DeleteModel" - -// DeleteModelRequest generates a "aws/request.Request" representing the -// client's request for the DeleteModel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteModel for more information on using the DeleteModel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteModelRequest method. -// req, resp := client.DeleteModelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModel -func (c *SageMaker) DeleteModelRequest(input *DeleteModelInput) (req *request.Request, output *DeleteModelOutput) { - op := &request.Operation{ - Name: opDeleteModel, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteModelInput{} - } - - output = &DeleteModelOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteModel API operation for Amazon SageMaker Service. -// -// Deletes a model. The DeleteModel API deletes only the model entry that was -// created in Amazon SageMaker when you called the CreateModel (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateModel.html) -// API. It does not delete model artifacts, inference code, or the IAM role -// that you specified when creating the model. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DeleteModel for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModel -func (c *SageMaker) DeleteModel(input *DeleteModelInput) (*DeleteModelOutput, error) { - req, out := c.DeleteModelRequest(input) - return out, req.Send() -} - -// DeleteModelWithContext is the same as DeleteModel with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteModel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DeleteModelWithContext(ctx aws.Context, input *DeleteModelInput, opts ...request.Option) (*DeleteModelOutput, error) { - req, out := c.DeleteModelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteModelPackage = "DeleteModelPackage" - -// DeleteModelPackageRequest generates a "aws/request.Request" representing the -// client's request for the DeleteModelPackage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteModelPackage for more information on using the DeleteModelPackage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteModelPackageRequest method. -// req, resp := client.DeleteModelPackageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelPackage -func (c *SageMaker) DeleteModelPackageRequest(input *DeleteModelPackageInput) (req *request.Request, output *DeleteModelPackageOutput) { - op := &request.Operation{ - Name: opDeleteModelPackage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteModelPackageInput{} - } - - output = &DeleteModelPackageOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteModelPackage API operation for Amazon SageMaker Service. -// -// Deletes a model package. -// -// A model package is used to create Amazon SageMaker models or list on AWS -// Marketplace. Buyers can subscribe to model packages listed on AWS Marketplace -// to create models in Amazon SageMaker. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DeleteModelPackage for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelPackage -func (c *SageMaker) DeleteModelPackage(input *DeleteModelPackageInput) (*DeleteModelPackageOutput, error) { - req, out := c.DeleteModelPackageRequest(input) - return out, req.Send() -} - -// DeleteModelPackageWithContext is the same as DeleteModelPackage with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteModelPackage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DeleteModelPackageWithContext(ctx aws.Context, input *DeleteModelPackageInput, opts ...request.Option) (*DeleteModelPackageOutput, error) { - req, out := c.DeleteModelPackageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteNotebookInstance = "DeleteNotebookInstance" - -// DeleteNotebookInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteNotebookInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteNotebookInstance for more information on using the DeleteNotebookInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteNotebookInstanceRequest method. -// req, resp := client.DeleteNotebookInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteNotebookInstance -func (c *SageMaker) DeleteNotebookInstanceRequest(input *DeleteNotebookInstanceInput) (req *request.Request, output *DeleteNotebookInstanceOutput) { - op := &request.Operation{ - Name: opDeleteNotebookInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteNotebookInstanceInput{} - } - - output = &DeleteNotebookInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteNotebookInstance API operation for Amazon SageMaker Service. -// -// Deletes an Amazon SageMaker notebook instance. Before you can delete a notebook -// instance, you must call the StopNotebookInstance API. -// -// When you delete a notebook instance, you lose all of your data. Amazon SageMaker -// removes the ML compute instance, and deletes the ML storage volume and the -// network interface associated with the notebook instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DeleteNotebookInstance for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteNotebookInstance -func (c *SageMaker) DeleteNotebookInstance(input *DeleteNotebookInstanceInput) (*DeleteNotebookInstanceOutput, error) { - req, out := c.DeleteNotebookInstanceRequest(input) - return out, req.Send() -} - -// DeleteNotebookInstanceWithContext is the same as DeleteNotebookInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteNotebookInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DeleteNotebookInstanceWithContext(ctx aws.Context, input *DeleteNotebookInstanceInput, opts ...request.Option) (*DeleteNotebookInstanceOutput, error) { - req, out := c.DeleteNotebookInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteNotebookInstanceLifecycleConfig = "DeleteNotebookInstanceLifecycleConfig" - -// DeleteNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the -// client's request for the DeleteNotebookInstanceLifecycleConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteNotebookInstanceLifecycleConfig for more information on using the DeleteNotebookInstanceLifecycleConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteNotebookInstanceLifecycleConfigRequest method. -// req, resp := client.DeleteNotebookInstanceLifecycleConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteNotebookInstanceLifecycleConfig -func (c *SageMaker) DeleteNotebookInstanceLifecycleConfigRequest(input *DeleteNotebookInstanceLifecycleConfigInput) (req *request.Request, output *DeleteNotebookInstanceLifecycleConfigOutput) { - op := &request.Operation{ - Name: opDeleteNotebookInstanceLifecycleConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteNotebookInstanceLifecycleConfigInput{} - } - - output = &DeleteNotebookInstanceLifecycleConfigOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteNotebookInstanceLifecycleConfig API operation for Amazon SageMaker Service. -// -// Deletes a notebook instance lifecycle configuration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DeleteNotebookInstanceLifecycleConfig for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteNotebookInstanceLifecycleConfig -func (c *SageMaker) DeleteNotebookInstanceLifecycleConfig(input *DeleteNotebookInstanceLifecycleConfigInput) (*DeleteNotebookInstanceLifecycleConfigOutput, error) { - req, out := c.DeleteNotebookInstanceLifecycleConfigRequest(input) - return out, req.Send() -} - -// DeleteNotebookInstanceLifecycleConfigWithContext is the same as DeleteNotebookInstanceLifecycleConfig with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteNotebookInstanceLifecycleConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DeleteNotebookInstanceLifecycleConfigWithContext(ctx aws.Context, input *DeleteNotebookInstanceLifecycleConfigInput, opts ...request.Option) (*DeleteNotebookInstanceLifecycleConfigOutput, error) { - req, out := c.DeleteNotebookInstanceLifecycleConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTags = "DeleteTags" - -// DeleteTagsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTags for more information on using the DeleteTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTagsRequest method. -// req, resp := client.DeleteTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteTags -func (c *SageMaker) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { - op := &request.Operation{ - Name: opDeleteTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTagsInput{} - } - - output = &DeleteTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTags API operation for Amazon SageMaker Service. -// -// Deletes the specified tags from an Amazon SageMaker resource. -// -// To list a resource's tags, use the ListTags API. -// -// When you call this API to delete tags from a hyperparameter tuning job, the -// deleted tags are not removed from training jobs that the hyperparameter tuning -// job launched before you called this API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DeleteTags for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteTags -func (c *SageMaker) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - return out, req.Send() -} - -// DeleteTagsWithContext is the same as DeleteTags with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteWorkteam = "DeleteWorkteam" - -// DeleteWorkteamRequest generates a "aws/request.Request" representing the -// client's request for the DeleteWorkteam operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteWorkteam for more information on using the DeleteWorkteam -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteWorkteamRequest method. -// req, resp := client.DeleteWorkteamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteWorkteam -func (c *SageMaker) DeleteWorkteamRequest(input *DeleteWorkteamInput) (req *request.Request, output *DeleteWorkteamOutput) { - op := &request.Operation{ - Name: opDeleteWorkteam, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteWorkteamInput{} - } - - output = &DeleteWorkteamOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteWorkteam API operation for Amazon SageMaker Service. -// -// Deletes an existing work team. This operation can't be undone. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DeleteWorkteam for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteWorkteam -func (c *SageMaker) DeleteWorkteam(input *DeleteWorkteamInput) (*DeleteWorkteamOutput, error) { - req, out := c.DeleteWorkteamRequest(input) - return out, req.Send() -} - -// DeleteWorkteamWithContext is the same as DeleteWorkteam with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteWorkteam for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DeleteWorkteamWithContext(ctx aws.Context, input *DeleteWorkteamInput, opts ...request.Option) (*DeleteWorkteamOutput, error) { - req, out := c.DeleteWorkteamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAlgorithm = "DescribeAlgorithm" - -// DescribeAlgorithmRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAlgorithm operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAlgorithm for more information on using the DescribeAlgorithm -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAlgorithmRequest method. -// req, resp := client.DescribeAlgorithmRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeAlgorithm -func (c *SageMaker) DescribeAlgorithmRequest(input *DescribeAlgorithmInput) (req *request.Request, output *DescribeAlgorithmOutput) { - op := &request.Operation{ - Name: opDescribeAlgorithm, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAlgorithmInput{} - } - - output = &DescribeAlgorithmOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAlgorithm API operation for Amazon SageMaker Service. -// -// Returns a description of the specified algorithm that is in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeAlgorithm for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeAlgorithm -func (c *SageMaker) DescribeAlgorithm(input *DescribeAlgorithmInput) (*DescribeAlgorithmOutput, error) { - req, out := c.DescribeAlgorithmRequest(input) - return out, req.Send() -} - -// DescribeAlgorithmWithContext is the same as DescribeAlgorithm with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAlgorithm for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeAlgorithmWithContext(ctx aws.Context, input *DescribeAlgorithmInput, opts ...request.Option) (*DescribeAlgorithmOutput, error) { - req, out := c.DescribeAlgorithmRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCodeRepository = "DescribeCodeRepository" - -// DescribeCodeRepositoryRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCodeRepository operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCodeRepository for more information on using the DescribeCodeRepository -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCodeRepositoryRequest method. -// req, resp := client.DescribeCodeRepositoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeCodeRepository -func (c *SageMaker) DescribeCodeRepositoryRequest(input *DescribeCodeRepositoryInput) (req *request.Request, output *DescribeCodeRepositoryOutput) { - op := &request.Operation{ - Name: opDescribeCodeRepository, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCodeRepositoryInput{} - } - - output = &DescribeCodeRepositoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCodeRepository API operation for Amazon SageMaker Service. -// -// Gets details about the specified Git repository. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeCodeRepository for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeCodeRepository -func (c *SageMaker) DescribeCodeRepository(input *DescribeCodeRepositoryInput) (*DescribeCodeRepositoryOutput, error) { - req, out := c.DescribeCodeRepositoryRequest(input) - return out, req.Send() -} - -// DescribeCodeRepositoryWithContext is the same as DescribeCodeRepository with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCodeRepository for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeCodeRepositoryWithContext(ctx aws.Context, input *DescribeCodeRepositoryInput, opts ...request.Option) (*DescribeCodeRepositoryOutput, error) { - req, out := c.DescribeCodeRepositoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCompilationJob = "DescribeCompilationJob" - -// DescribeCompilationJobRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCompilationJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCompilationJob for more information on using the DescribeCompilationJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCompilationJobRequest method. -// req, resp := client.DescribeCompilationJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeCompilationJob -func (c *SageMaker) DescribeCompilationJobRequest(input *DescribeCompilationJobInput) (req *request.Request, output *DescribeCompilationJobOutput) { - op := &request.Operation{ - Name: opDescribeCompilationJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCompilationJobInput{} - } - - output = &DescribeCompilationJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCompilationJob API operation for Amazon SageMaker Service. -// -// Returns information about a model compilation job. -// -// To create a model compilation job, use CreateCompilationJob. To get information -// about multiple model compilation jobs, use ListCompilationJobs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeCompilationJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFound "ResourceNotFound" -// Resource being access is not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeCompilationJob -func (c *SageMaker) DescribeCompilationJob(input *DescribeCompilationJobInput) (*DescribeCompilationJobOutput, error) { - req, out := c.DescribeCompilationJobRequest(input) - return out, req.Send() -} - -// DescribeCompilationJobWithContext is the same as DescribeCompilationJob with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCompilationJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeCompilationJobWithContext(ctx aws.Context, input *DescribeCompilationJobInput, opts ...request.Option) (*DescribeCompilationJobOutput, error) { - req, out := c.DescribeCompilationJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEndpoint = "DescribeEndpoint" - -// DescribeEndpointRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEndpoint for more information on using the DescribeEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEndpointRequest method. -// req, resp := client.DescribeEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEndpoint -func (c *SageMaker) DescribeEndpointRequest(input *DescribeEndpointInput) (req *request.Request, output *DescribeEndpointOutput) { - op := &request.Operation{ - Name: opDescribeEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEndpointInput{} - } - - output = &DescribeEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEndpoint API operation for Amazon SageMaker Service. -// -// Returns the description of an endpoint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeEndpoint for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEndpoint -func (c *SageMaker) DescribeEndpoint(input *DescribeEndpointInput) (*DescribeEndpointOutput, error) { - req, out := c.DescribeEndpointRequest(input) - return out, req.Send() -} - -// DescribeEndpointWithContext is the same as DescribeEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeEndpointWithContext(ctx aws.Context, input *DescribeEndpointInput, opts ...request.Option) (*DescribeEndpointOutput, error) { - req, out := c.DescribeEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEndpointConfig = "DescribeEndpointConfig" - -// DescribeEndpointConfigRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEndpointConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEndpointConfig for more information on using the DescribeEndpointConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEndpointConfigRequest method. -// req, resp := client.DescribeEndpointConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEndpointConfig -func (c *SageMaker) DescribeEndpointConfigRequest(input *DescribeEndpointConfigInput) (req *request.Request, output *DescribeEndpointConfigOutput) { - op := &request.Operation{ - Name: opDescribeEndpointConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEndpointConfigInput{} - } - - output = &DescribeEndpointConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEndpointConfig API operation for Amazon SageMaker Service. -// -// Returns the description of an endpoint configuration created using the CreateEndpointConfig -// API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeEndpointConfig for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEndpointConfig -func (c *SageMaker) DescribeEndpointConfig(input *DescribeEndpointConfigInput) (*DescribeEndpointConfigOutput, error) { - req, out := c.DescribeEndpointConfigRequest(input) - return out, req.Send() -} - -// DescribeEndpointConfigWithContext is the same as DescribeEndpointConfig with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEndpointConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeEndpointConfigWithContext(ctx aws.Context, input *DescribeEndpointConfigInput, opts ...request.Option) (*DescribeEndpointConfigOutput, error) { - req, out := c.DescribeEndpointConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeHyperParameterTuningJob = "DescribeHyperParameterTuningJob" - -// DescribeHyperParameterTuningJobRequest generates a "aws/request.Request" representing the -// client's request for the DescribeHyperParameterTuningJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeHyperParameterTuningJob for more information on using the DescribeHyperParameterTuningJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeHyperParameterTuningJobRequest method. -// req, resp := client.DescribeHyperParameterTuningJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeHyperParameterTuningJob -func (c *SageMaker) DescribeHyperParameterTuningJobRequest(input *DescribeHyperParameterTuningJobInput) (req *request.Request, output *DescribeHyperParameterTuningJobOutput) { - op := &request.Operation{ - Name: opDescribeHyperParameterTuningJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeHyperParameterTuningJobInput{} - } - - output = &DescribeHyperParameterTuningJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeHyperParameterTuningJob API operation for Amazon SageMaker Service. -// -// Gets a description of a hyperparameter tuning job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeHyperParameterTuningJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFound "ResourceNotFound" -// Resource being access is not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeHyperParameterTuningJob -func (c *SageMaker) DescribeHyperParameterTuningJob(input *DescribeHyperParameterTuningJobInput) (*DescribeHyperParameterTuningJobOutput, error) { - req, out := c.DescribeHyperParameterTuningJobRequest(input) - return out, req.Send() -} - -// DescribeHyperParameterTuningJobWithContext is the same as DescribeHyperParameterTuningJob with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeHyperParameterTuningJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeHyperParameterTuningJobWithContext(ctx aws.Context, input *DescribeHyperParameterTuningJobInput, opts ...request.Option) (*DescribeHyperParameterTuningJobOutput, error) { - req, out := c.DescribeHyperParameterTuningJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLabelingJob = "DescribeLabelingJob" - -// DescribeLabelingJobRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLabelingJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLabelingJob for more information on using the DescribeLabelingJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeLabelingJobRequest method. -// req, resp := client.DescribeLabelingJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeLabelingJob -func (c *SageMaker) DescribeLabelingJobRequest(input *DescribeLabelingJobInput) (req *request.Request, output *DescribeLabelingJobOutput) { - op := &request.Operation{ - Name: opDescribeLabelingJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLabelingJobInput{} - } - - output = &DescribeLabelingJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLabelingJob API operation for Amazon SageMaker Service. -// -// Gets information about a labeling job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeLabelingJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFound "ResourceNotFound" -// Resource being access is not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeLabelingJob -func (c *SageMaker) DescribeLabelingJob(input *DescribeLabelingJobInput) (*DescribeLabelingJobOutput, error) { - req, out := c.DescribeLabelingJobRequest(input) - return out, req.Send() -} - -// DescribeLabelingJobWithContext is the same as DescribeLabelingJob with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLabelingJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeLabelingJobWithContext(ctx aws.Context, input *DescribeLabelingJobInput, opts ...request.Option) (*DescribeLabelingJobOutput, error) { - req, out := c.DescribeLabelingJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeModel = "DescribeModel" - -// DescribeModelRequest generates a "aws/request.Request" representing the -// client's request for the DescribeModel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeModel for more information on using the DescribeModel -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeModelRequest method. -// req, resp := client.DescribeModelRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModel -func (c *SageMaker) DescribeModelRequest(input *DescribeModelInput) (req *request.Request, output *DescribeModelOutput) { - op := &request.Operation{ - Name: opDescribeModel, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeModelInput{} - } - - output = &DescribeModelOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeModel API operation for Amazon SageMaker Service. -// -// Describes a model that you created using the CreateModel API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeModel for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModel -func (c *SageMaker) DescribeModel(input *DescribeModelInput) (*DescribeModelOutput, error) { - req, out := c.DescribeModelRequest(input) - return out, req.Send() -} - -// DescribeModelWithContext is the same as DescribeModel with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeModel for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeModelWithContext(ctx aws.Context, input *DescribeModelInput, opts ...request.Option) (*DescribeModelOutput, error) { - req, out := c.DescribeModelRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeModelPackage = "DescribeModelPackage" - -// DescribeModelPackageRequest generates a "aws/request.Request" representing the -// client's request for the DescribeModelPackage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeModelPackage for more information on using the DescribeModelPackage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeModelPackageRequest method. -// req, resp := client.DescribeModelPackageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModelPackage -func (c *SageMaker) DescribeModelPackageRequest(input *DescribeModelPackageInput) (req *request.Request, output *DescribeModelPackageOutput) { - op := &request.Operation{ - Name: opDescribeModelPackage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeModelPackageInput{} - } - - output = &DescribeModelPackageOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeModelPackage API operation for Amazon SageMaker Service. -// -// Returns a description of the specified model package, which is used to create -// Amazon SageMaker models or list them on AWS Marketplace. -// -// To create models in Amazon SageMaker, buyers can subscribe to model packages -// listed on AWS Marketplace. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeModelPackage for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModelPackage -func (c *SageMaker) DescribeModelPackage(input *DescribeModelPackageInput) (*DescribeModelPackageOutput, error) { - req, out := c.DescribeModelPackageRequest(input) - return out, req.Send() -} - -// DescribeModelPackageWithContext is the same as DescribeModelPackage with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeModelPackage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeModelPackageWithContext(ctx aws.Context, input *DescribeModelPackageInput, opts ...request.Option) (*DescribeModelPackageOutput, error) { - req, out := c.DescribeModelPackageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeNotebookInstance = "DescribeNotebookInstance" - -// DescribeNotebookInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DescribeNotebookInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeNotebookInstance for more information on using the DescribeNotebookInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeNotebookInstanceRequest method. -// req, resp := client.DescribeNotebookInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeNotebookInstance -func (c *SageMaker) DescribeNotebookInstanceRequest(input *DescribeNotebookInstanceInput) (req *request.Request, output *DescribeNotebookInstanceOutput) { - op := &request.Operation{ - Name: opDescribeNotebookInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeNotebookInstanceInput{} - } - - output = &DescribeNotebookInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeNotebookInstance API operation for Amazon SageMaker Service. -// -// Returns information about a notebook instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeNotebookInstance for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeNotebookInstance -func (c *SageMaker) DescribeNotebookInstance(input *DescribeNotebookInstanceInput) (*DescribeNotebookInstanceOutput, error) { - req, out := c.DescribeNotebookInstanceRequest(input) - return out, req.Send() -} - -// DescribeNotebookInstanceWithContext is the same as DescribeNotebookInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeNotebookInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeNotebookInstanceWithContext(ctx aws.Context, input *DescribeNotebookInstanceInput, opts ...request.Option) (*DescribeNotebookInstanceOutput, error) { - req, out := c.DescribeNotebookInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeNotebookInstanceLifecycleConfig = "DescribeNotebookInstanceLifecycleConfig" - -// DescribeNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the -// client's request for the DescribeNotebookInstanceLifecycleConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeNotebookInstanceLifecycleConfig for more information on using the DescribeNotebookInstanceLifecycleConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeNotebookInstanceLifecycleConfigRequest method. -// req, resp := client.DescribeNotebookInstanceLifecycleConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeNotebookInstanceLifecycleConfig -func (c *SageMaker) DescribeNotebookInstanceLifecycleConfigRequest(input *DescribeNotebookInstanceLifecycleConfigInput) (req *request.Request, output *DescribeNotebookInstanceLifecycleConfigOutput) { - op := &request.Operation{ - Name: opDescribeNotebookInstanceLifecycleConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeNotebookInstanceLifecycleConfigInput{} - } - - output = &DescribeNotebookInstanceLifecycleConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeNotebookInstanceLifecycleConfig API operation for Amazon SageMaker Service. -// -// Returns a description of a notebook instance lifecycle configuration. -// -// For information about notebook instance lifestyle configurations, see Step -// 2.1: (Optional) Customize a Notebook Instance (http://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeNotebookInstanceLifecycleConfig for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeNotebookInstanceLifecycleConfig -func (c *SageMaker) DescribeNotebookInstanceLifecycleConfig(input *DescribeNotebookInstanceLifecycleConfigInput) (*DescribeNotebookInstanceLifecycleConfigOutput, error) { - req, out := c.DescribeNotebookInstanceLifecycleConfigRequest(input) - return out, req.Send() -} - -// DescribeNotebookInstanceLifecycleConfigWithContext is the same as DescribeNotebookInstanceLifecycleConfig with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeNotebookInstanceLifecycleConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeNotebookInstanceLifecycleConfigWithContext(ctx aws.Context, input *DescribeNotebookInstanceLifecycleConfigInput, opts ...request.Option) (*DescribeNotebookInstanceLifecycleConfigOutput, error) { - req, out := c.DescribeNotebookInstanceLifecycleConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSubscribedWorkteam = "DescribeSubscribedWorkteam" - -// DescribeSubscribedWorkteamRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSubscribedWorkteam operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSubscribedWorkteam for more information on using the DescribeSubscribedWorkteam -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSubscribedWorkteamRequest method. -// req, resp := client.DescribeSubscribedWorkteamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeSubscribedWorkteam -func (c *SageMaker) DescribeSubscribedWorkteamRequest(input *DescribeSubscribedWorkteamInput) (req *request.Request, output *DescribeSubscribedWorkteamOutput) { - op := &request.Operation{ - Name: opDescribeSubscribedWorkteam, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSubscribedWorkteamInput{} - } - - output = &DescribeSubscribedWorkteamOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSubscribedWorkteam API operation for Amazon SageMaker Service. -// -// Gets information about a work team provided by a vendor. It returns details -// about the subscription with a vendor in the AWS Marketplace. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeSubscribedWorkteam for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeSubscribedWorkteam -func (c *SageMaker) DescribeSubscribedWorkteam(input *DescribeSubscribedWorkteamInput) (*DescribeSubscribedWorkteamOutput, error) { - req, out := c.DescribeSubscribedWorkteamRequest(input) - return out, req.Send() -} - -// DescribeSubscribedWorkteamWithContext is the same as DescribeSubscribedWorkteam with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSubscribedWorkteam for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeSubscribedWorkteamWithContext(ctx aws.Context, input *DescribeSubscribedWorkteamInput, opts ...request.Option) (*DescribeSubscribedWorkteamOutput, error) { - req, out := c.DescribeSubscribedWorkteamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTrainingJob = "DescribeTrainingJob" - -// DescribeTrainingJobRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTrainingJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTrainingJob for more information on using the DescribeTrainingJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTrainingJobRequest method. -// req, resp := client.DescribeTrainingJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTrainingJob -func (c *SageMaker) DescribeTrainingJobRequest(input *DescribeTrainingJobInput) (req *request.Request, output *DescribeTrainingJobOutput) { - op := &request.Operation{ - Name: opDescribeTrainingJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTrainingJobInput{} - } - - output = &DescribeTrainingJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTrainingJob API operation for Amazon SageMaker Service. -// -// Returns information about a training job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeTrainingJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFound "ResourceNotFound" -// Resource being access is not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTrainingJob -func (c *SageMaker) DescribeTrainingJob(input *DescribeTrainingJobInput) (*DescribeTrainingJobOutput, error) { - req, out := c.DescribeTrainingJobRequest(input) - return out, req.Send() -} - -// DescribeTrainingJobWithContext is the same as DescribeTrainingJob with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTrainingJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeTrainingJobWithContext(ctx aws.Context, input *DescribeTrainingJobInput, opts ...request.Option) (*DescribeTrainingJobOutput, error) { - req, out := c.DescribeTrainingJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTransformJob = "DescribeTransformJob" - -// DescribeTransformJobRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTransformJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTransformJob for more information on using the DescribeTransformJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTransformJobRequest method. -// req, resp := client.DescribeTransformJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTransformJob -func (c *SageMaker) DescribeTransformJobRequest(input *DescribeTransformJobInput) (req *request.Request, output *DescribeTransformJobOutput) { - op := &request.Operation{ - Name: opDescribeTransformJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTransformJobInput{} - } - - output = &DescribeTransformJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTransformJob API operation for Amazon SageMaker Service. -// -// Returns information about a transform job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeTransformJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFound "ResourceNotFound" -// Resource being access is not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTransformJob -func (c *SageMaker) DescribeTransformJob(input *DescribeTransformJobInput) (*DescribeTransformJobOutput, error) { - req, out := c.DescribeTransformJobRequest(input) - return out, req.Send() -} - -// DescribeTransformJobWithContext is the same as DescribeTransformJob with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTransformJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeTransformJobWithContext(ctx aws.Context, input *DescribeTransformJobInput, opts ...request.Option) (*DescribeTransformJobOutput, error) { - req, out := c.DescribeTransformJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeWorkteam = "DescribeWorkteam" - -// DescribeWorkteamRequest generates a "aws/request.Request" representing the -// client's request for the DescribeWorkteam operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeWorkteam for more information on using the DescribeWorkteam -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeWorkteamRequest method. -// req, resp := client.DescribeWorkteamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeWorkteam -func (c *SageMaker) DescribeWorkteamRequest(input *DescribeWorkteamInput) (req *request.Request, output *DescribeWorkteamOutput) { - op := &request.Operation{ - Name: opDescribeWorkteam, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeWorkteamInput{} - } - - output = &DescribeWorkteamOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeWorkteam API operation for Amazon SageMaker Service. -// -// Gets information about a specific work team. You can see information such -// as the create date, the last updated date, membership information, and the -// work team's Amazon Resource Name (ARN). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation DescribeWorkteam for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeWorkteam -func (c *SageMaker) DescribeWorkteam(input *DescribeWorkteamInput) (*DescribeWorkteamOutput, error) { - req, out := c.DescribeWorkteamRequest(input) - return out, req.Send() -} - -// DescribeWorkteamWithContext is the same as DescribeWorkteam with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeWorkteam for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) DescribeWorkteamWithContext(ctx aws.Context, input *DescribeWorkteamInput, opts ...request.Option) (*DescribeWorkteamOutput, error) { - req, out := c.DescribeWorkteamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSearchSuggestions = "GetSearchSuggestions" - -// GetSearchSuggestionsRequest generates a "aws/request.Request" representing the -// client's request for the GetSearchSuggestions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSearchSuggestions for more information on using the GetSearchSuggestions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSearchSuggestionsRequest method. -// req, resp := client.GetSearchSuggestionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/GetSearchSuggestions -func (c *SageMaker) GetSearchSuggestionsRequest(input *GetSearchSuggestionsInput) (req *request.Request, output *GetSearchSuggestionsOutput) { - op := &request.Operation{ - Name: opGetSearchSuggestions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSearchSuggestionsInput{} - } - - output = &GetSearchSuggestionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSearchSuggestions API operation for Amazon SageMaker Service. -// -// An auto-complete API for the search functionality in the Amazon SageMaker -// console. It returns suggestions of possible matches for the property name -// to use in Search queries. Provides suggestions for HyperParameters, Tags, -// and Metrics. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation GetSearchSuggestions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/GetSearchSuggestions -func (c *SageMaker) GetSearchSuggestions(input *GetSearchSuggestionsInput) (*GetSearchSuggestionsOutput, error) { - req, out := c.GetSearchSuggestionsRequest(input) - return out, req.Send() -} - -// GetSearchSuggestionsWithContext is the same as GetSearchSuggestions with the addition of -// the ability to pass a context and additional request options. -// -// See GetSearchSuggestions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) GetSearchSuggestionsWithContext(ctx aws.Context, input *GetSearchSuggestionsInput, opts ...request.Option) (*GetSearchSuggestionsOutput, error) { - req, out := c.GetSearchSuggestionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAlgorithms = "ListAlgorithms" - -// ListAlgorithmsRequest generates a "aws/request.Request" representing the -// client's request for the ListAlgorithms operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAlgorithms for more information on using the ListAlgorithms -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAlgorithmsRequest method. -// req, resp := client.ListAlgorithmsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListAlgorithms -func (c *SageMaker) ListAlgorithmsRequest(input *ListAlgorithmsInput) (req *request.Request, output *ListAlgorithmsOutput) { - op := &request.Operation{ - Name: opListAlgorithms, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListAlgorithmsInput{} - } - - output = &ListAlgorithmsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAlgorithms API operation for Amazon SageMaker Service. -// -// Lists the machine learning algorithms that have been created. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListAlgorithms for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListAlgorithms -func (c *SageMaker) ListAlgorithms(input *ListAlgorithmsInput) (*ListAlgorithmsOutput, error) { - req, out := c.ListAlgorithmsRequest(input) - return out, req.Send() -} - -// ListAlgorithmsWithContext is the same as ListAlgorithms with the addition of -// the ability to pass a context and additional request options. -// -// See ListAlgorithms for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListAlgorithmsWithContext(ctx aws.Context, input *ListAlgorithmsInput, opts ...request.Option) (*ListAlgorithmsOutput, error) { - req, out := c.ListAlgorithmsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListCodeRepositories = "ListCodeRepositories" - -// ListCodeRepositoriesRequest generates a "aws/request.Request" representing the -// client's request for the ListCodeRepositories operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListCodeRepositories for more information on using the ListCodeRepositories -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListCodeRepositoriesRequest method. -// req, resp := client.ListCodeRepositoriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListCodeRepositories -func (c *SageMaker) ListCodeRepositoriesRequest(input *ListCodeRepositoriesInput) (req *request.Request, output *ListCodeRepositoriesOutput) { - op := &request.Operation{ - Name: opListCodeRepositories, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListCodeRepositoriesInput{} - } - - output = &ListCodeRepositoriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCodeRepositories API operation for Amazon SageMaker Service. -// -// Gets a list of the Git repositories in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListCodeRepositories for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListCodeRepositories -func (c *SageMaker) ListCodeRepositories(input *ListCodeRepositoriesInput) (*ListCodeRepositoriesOutput, error) { - req, out := c.ListCodeRepositoriesRequest(input) - return out, req.Send() -} - -// ListCodeRepositoriesWithContext is the same as ListCodeRepositories with the addition of -// the ability to pass a context and additional request options. -// -// See ListCodeRepositories for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListCodeRepositoriesWithContext(ctx aws.Context, input *ListCodeRepositoriesInput, opts ...request.Option) (*ListCodeRepositoriesOutput, error) { - req, out := c.ListCodeRepositoriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListCompilationJobs = "ListCompilationJobs" - -// ListCompilationJobsRequest generates a "aws/request.Request" representing the -// client's request for the ListCompilationJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListCompilationJobs for more information on using the ListCompilationJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListCompilationJobsRequest method. -// req, resp := client.ListCompilationJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListCompilationJobs -func (c *SageMaker) ListCompilationJobsRequest(input *ListCompilationJobsInput) (req *request.Request, output *ListCompilationJobsOutput) { - op := &request.Operation{ - Name: opListCompilationJobs, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListCompilationJobsInput{} - } - - output = &ListCompilationJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCompilationJobs API operation for Amazon SageMaker Service. -// -// Lists model compilation jobs that satisfy various filters. -// -// To create a model compilation job, use CreateCompilationJob. To get information -// about a particular model compilation job you have created, use DescribeCompilationJob. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListCompilationJobs for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListCompilationJobs -func (c *SageMaker) ListCompilationJobs(input *ListCompilationJobsInput) (*ListCompilationJobsOutput, error) { - req, out := c.ListCompilationJobsRequest(input) - return out, req.Send() -} - -// ListCompilationJobsWithContext is the same as ListCompilationJobs with the addition of -// the ability to pass a context and additional request options. -// -// See ListCompilationJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListCompilationJobsWithContext(ctx aws.Context, input *ListCompilationJobsInput, opts ...request.Option) (*ListCompilationJobsOutput, error) { - req, out := c.ListCompilationJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListCompilationJobsPages iterates over the pages of a ListCompilationJobs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListCompilationJobs 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 ListCompilationJobs operation. -// pageNum := 0 -// err := client.ListCompilationJobsPages(params, -// func(page *ListCompilationJobsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListCompilationJobsPages(input *ListCompilationJobsInput, fn func(*ListCompilationJobsOutput, bool) bool) error { - return c.ListCompilationJobsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListCompilationJobsPagesWithContext same as ListCompilationJobsPages 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 *SageMaker) ListCompilationJobsPagesWithContext(ctx aws.Context, input *ListCompilationJobsInput, fn func(*ListCompilationJobsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListCompilationJobsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListCompilationJobsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCompilationJobsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListEndpointConfigs = "ListEndpointConfigs" - -// ListEndpointConfigsRequest generates a "aws/request.Request" representing the -// client's request for the ListEndpointConfigs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListEndpointConfigs for more information on using the ListEndpointConfigs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListEndpointConfigsRequest method. -// req, resp := client.ListEndpointConfigsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEndpointConfigs -func (c *SageMaker) ListEndpointConfigsRequest(input *ListEndpointConfigsInput) (req *request.Request, output *ListEndpointConfigsOutput) { - op := &request.Operation{ - Name: opListEndpointConfigs, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListEndpointConfigsInput{} - } - - output = &ListEndpointConfigsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListEndpointConfigs API operation for Amazon SageMaker Service. -// -// Lists endpoint 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 Amazon SageMaker Service's -// API operation ListEndpointConfigs for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEndpointConfigs -func (c *SageMaker) ListEndpointConfigs(input *ListEndpointConfigsInput) (*ListEndpointConfigsOutput, error) { - req, out := c.ListEndpointConfigsRequest(input) - return out, req.Send() -} - -// ListEndpointConfigsWithContext is the same as ListEndpointConfigs with the addition of -// the ability to pass a context and additional request options. -// -// See ListEndpointConfigs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListEndpointConfigsWithContext(ctx aws.Context, input *ListEndpointConfigsInput, opts ...request.Option) (*ListEndpointConfigsOutput, error) { - req, out := c.ListEndpointConfigsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListEndpointConfigsPages iterates over the pages of a ListEndpointConfigs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListEndpointConfigs 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 ListEndpointConfigs operation. -// pageNum := 0 -// err := client.ListEndpointConfigsPages(params, -// func(page *ListEndpointConfigsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListEndpointConfigsPages(input *ListEndpointConfigsInput, fn func(*ListEndpointConfigsOutput, bool) bool) error { - return c.ListEndpointConfigsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListEndpointConfigsPagesWithContext same as ListEndpointConfigsPages 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 *SageMaker) ListEndpointConfigsPagesWithContext(ctx aws.Context, input *ListEndpointConfigsInput, fn func(*ListEndpointConfigsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListEndpointConfigsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListEndpointConfigsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEndpointConfigsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListEndpoints = "ListEndpoints" - -// ListEndpointsRequest generates a "aws/request.Request" representing the -// client's request for the ListEndpoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListEndpoints for more information on using the ListEndpoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListEndpointsRequest method. -// req, resp := client.ListEndpointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEndpoints -func (c *SageMaker) ListEndpointsRequest(input *ListEndpointsInput) (req *request.Request, output *ListEndpointsOutput) { - op := &request.Operation{ - Name: opListEndpoints, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListEndpointsInput{} - } - - output = &ListEndpointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListEndpoints API operation for Amazon SageMaker Service. -// -// Lists endpoints. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListEndpoints for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEndpoints -func (c *SageMaker) ListEndpoints(input *ListEndpointsInput) (*ListEndpointsOutput, error) { - req, out := c.ListEndpointsRequest(input) - return out, req.Send() -} - -// ListEndpointsWithContext is the same as ListEndpoints with the addition of -// the ability to pass a context and additional request options. -// -// See ListEndpoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListEndpointsWithContext(ctx aws.Context, input *ListEndpointsInput, opts ...request.Option) (*ListEndpointsOutput, error) { - req, out := c.ListEndpointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListEndpointsPages iterates over the pages of a ListEndpoints operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListEndpoints 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 ListEndpoints operation. -// pageNum := 0 -// err := client.ListEndpointsPages(params, -// func(page *ListEndpointsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListEndpointsPages(input *ListEndpointsInput, fn func(*ListEndpointsOutput, bool) bool) error { - return c.ListEndpointsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListEndpointsPagesWithContext same as ListEndpointsPages 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 *SageMaker) ListEndpointsPagesWithContext(ctx aws.Context, input *ListEndpointsInput, fn func(*ListEndpointsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListEndpointsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListEndpointsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEndpointsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListHyperParameterTuningJobs = "ListHyperParameterTuningJobs" - -// ListHyperParameterTuningJobsRequest generates a "aws/request.Request" representing the -// client's request for the ListHyperParameterTuningJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListHyperParameterTuningJobs for more information on using the ListHyperParameterTuningJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListHyperParameterTuningJobsRequest method. -// req, resp := client.ListHyperParameterTuningJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListHyperParameterTuningJobs -func (c *SageMaker) ListHyperParameterTuningJobsRequest(input *ListHyperParameterTuningJobsInput) (req *request.Request, output *ListHyperParameterTuningJobsOutput) { - op := &request.Operation{ - Name: opListHyperParameterTuningJobs, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListHyperParameterTuningJobsInput{} - } - - output = &ListHyperParameterTuningJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListHyperParameterTuningJobs API operation for Amazon SageMaker Service. -// -// Gets a list of HyperParameterTuningJobSummary objects that describe the hyperparameter -// tuning jobs launched in your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListHyperParameterTuningJobs for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListHyperParameterTuningJobs -func (c *SageMaker) ListHyperParameterTuningJobs(input *ListHyperParameterTuningJobsInput) (*ListHyperParameterTuningJobsOutput, error) { - req, out := c.ListHyperParameterTuningJobsRequest(input) - return out, req.Send() -} - -// ListHyperParameterTuningJobsWithContext is the same as ListHyperParameterTuningJobs with the addition of -// the ability to pass a context and additional request options. -// -// See ListHyperParameterTuningJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListHyperParameterTuningJobsWithContext(ctx aws.Context, input *ListHyperParameterTuningJobsInput, opts ...request.Option) (*ListHyperParameterTuningJobsOutput, error) { - req, out := c.ListHyperParameterTuningJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListHyperParameterTuningJobsPages iterates over the pages of a ListHyperParameterTuningJobs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListHyperParameterTuningJobs 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 ListHyperParameterTuningJobs operation. -// pageNum := 0 -// err := client.ListHyperParameterTuningJobsPages(params, -// func(page *ListHyperParameterTuningJobsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListHyperParameterTuningJobsPages(input *ListHyperParameterTuningJobsInput, fn func(*ListHyperParameterTuningJobsOutput, bool) bool) error { - return c.ListHyperParameterTuningJobsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListHyperParameterTuningJobsPagesWithContext same as ListHyperParameterTuningJobsPages 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 *SageMaker) ListHyperParameterTuningJobsPagesWithContext(ctx aws.Context, input *ListHyperParameterTuningJobsInput, fn func(*ListHyperParameterTuningJobsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListHyperParameterTuningJobsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListHyperParameterTuningJobsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListHyperParameterTuningJobsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListLabelingJobs = "ListLabelingJobs" - -// ListLabelingJobsRequest generates a "aws/request.Request" representing the -// client's request for the ListLabelingJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListLabelingJobs for more information on using the ListLabelingJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListLabelingJobsRequest method. -// req, resp := client.ListLabelingJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListLabelingJobs -func (c *SageMaker) ListLabelingJobsRequest(input *ListLabelingJobsInput) (req *request.Request, output *ListLabelingJobsOutput) { - op := &request.Operation{ - Name: opListLabelingJobs, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListLabelingJobsInput{} - } - - output = &ListLabelingJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListLabelingJobs API operation for Amazon SageMaker Service. -// -// Gets a list of labeling jobs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListLabelingJobs for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListLabelingJobs -func (c *SageMaker) ListLabelingJobs(input *ListLabelingJobsInput) (*ListLabelingJobsOutput, error) { - req, out := c.ListLabelingJobsRequest(input) - return out, req.Send() -} - -// ListLabelingJobsWithContext is the same as ListLabelingJobs with the addition of -// the ability to pass a context and additional request options. -// -// See ListLabelingJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListLabelingJobsWithContext(ctx aws.Context, input *ListLabelingJobsInput, opts ...request.Option) (*ListLabelingJobsOutput, error) { - req, out := c.ListLabelingJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListLabelingJobsPages iterates over the pages of a ListLabelingJobs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListLabelingJobs 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 ListLabelingJobs operation. -// pageNum := 0 -// err := client.ListLabelingJobsPages(params, -// func(page *ListLabelingJobsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListLabelingJobsPages(input *ListLabelingJobsInput, fn func(*ListLabelingJobsOutput, bool) bool) error { - return c.ListLabelingJobsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListLabelingJobsPagesWithContext same as ListLabelingJobsPages 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 *SageMaker) ListLabelingJobsPagesWithContext(ctx aws.Context, input *ListLabelingJobsInput, fn func(*ListLabelingJobsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListLabelingJobsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListLabelingJobsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListLabelingJobsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListLabelingJobsForWorkteam = "ListLabelingJobsForWorkteam" - -// ListLabelingJobsForWorkteamRequest generates a "aws/request.Request" representing the -// client's request for the ListLabelingJobsForWorkteam operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListLabelingJobsForWorkteam for more information on using the ListLabelingJobsForWorkteam -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListLabelingJobsForWorkteamRequest method. -// req, resp := client.ListLabelingJobsForWorkteamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListLabelingJobsForWorkteam -func (c *SageMaker) ListLabelingJobsForWorkteamRequest(input *ListLabelingJobsForWorkteamInput) (req *request.Request, output *ListLabelingJobsForWorkteamOutput) { - op := &request.Operation{ - Name: opListLabelingJobsForWorkteam, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListLabelingJobsForWorkteamInput{} - } - - output = &ListLabelingJobsForWorkteamOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListLabelingJobsForWorkteam API operation for Amazon SageMaker Service. -// -// Gets a list of labeling jobs assigned to a specified work team. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListLabelingJobsForWorkteam for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFound "ResourceNotFound" -// Resource being access is not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListLabelingJobsForWorkteam -func (c *SageMaker) ListLabelingJobsForWorkteam(input *ListLabelingJobsForWorkteamInput) (*ListLabelingJobsForWorkteamOutput, error) { - req, out := c.ListLabelingJobsForWorkteamRequest(input) - return out, req.Send() -} - -// ListLabelingJobsForWorkteamWithContext is the same as ListLabelingJobsForWorkteam with the addition of -// the ability to pass a context and additional request options. -// -// See ListLabelingJobsForWorkteam for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListLabelingJobsForWorkteamWithContext(ctx aws.Context, input *ListLabelingJobsForWorkteamInput, opts ...request.Option) (*ListLabelingJobsForWorkteamOutput, error) { - req, out := c.ListLabelingJobsForWorkteamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListLabelingJobsForWorkteamPages iterates over the pages of a ListLabelingJobsForWorkteam operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListLabelingJobsForWorkteam 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 ListLabelingJobsForWorkteam operation. -// pageNum := 0 -// err := client.ListLabelingJobsForWorkteamPages(params, -// func(page *ListLabelingJobsForWorkteamOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListLabelingJobsForWorkteamPages(input *ListLabelingJobsForWorkteamInput, fn func(*ListLabelingJobsForWorkteamOutput, bool) bool) error { - return c.ListLabelingJobsForWorkteamPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListLabelingJobsForWorkteamPagesWithContext same as ListLabelingJobsForWorkteamPages 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 *SageMaker) ListLabelingJobsForWorkteamPagesWithContext(ctx aws.Context, input *ListLabelingJobsForWorkteamInput, fn func(*ListLabelingJobsForWorkteamOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListLabelingJobsForWorkteamInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListLabelingJobsForWorkteamRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListLabelingJobsForWorkteamOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListModelPackages = "ListModelPackages" - -// ListModelPackagesRequest generates a "aws/request.Request" representing the -// client's request for the ListModelPackages operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListModelPackages for more information on using the ListModelPackages -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListModelPackagesRequest method. -// req, resp := client.ListModelPackagesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelPackages -func (c *SageMaker) ListModelPackagesRequest(input *ListModelPackagesInput) (req *request.Request, output *ListModelPackagesOutput) { - op := &request.Operation{ - Name: opListModelPackages, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListModelPackagesInput{} - } - - output = &ListModelPackagesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListModelPackages API operation for Amazon SageMaker Service. -// -// Lists the model packages that have been created. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListModelPackages for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelPackages -func (c *SageMaker) ListModelPackages(input *ListModelPackagesInput) (*ListModelPackagesOutput, error) { - req, out := c.ListModelPackagesRequest(input) - return out, req.Send() -} - -// ListModelPackagesWithContext is the same as ListModelPackages with the addition of -// the ability to pass a context and additional request options. -// -// See ListModelPackages for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListModelPackagesWithContext(ctx aws.Context, input *ListModelPackagesInput, opts ...request.Option) (*ListModelPackagesOutput, error) { - req, out := c.ListModelPackagesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListModels = "ListModels" - -// ListModelsRequest generates a "aws/request.Request" representing the -// client's request for the ListModels operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListModels for more information on using the ListModels -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListModelsRequest method. -// req, resp := client.ListModelsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModels -func (c *SageMaker) ListModelsRequest(input *ListModelsInput) (req *request.Request, output *ListModelsOutput) { - op := &request.Operation{ - Name: opListModels, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListModelsInput{} - } - - output = &ListModelsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListModels API operation for Amazon SageMaker Service. -// -// Lists models created with the CreateModel (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateModel.html) -// API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListModels for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModels -func (c *SageMaker) ListModels(input *ListModelsInput) (*ListModelsOutput, error) { - req, out := c.ListModelsRequest(input) - return out, req.Send() -} - -// ListModelsWithContext is the same as ListModels with the addition of -// the ability to pass a context and additional request options. -// -// See ListModels for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListModelsWithContext(ctx aws.Context, input *ListModelsInput, opts ...request.Option) (*ListModelsOutput, error) { - req, out := c.ListModelsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListModelsPages iterates over the pages of a ListModels operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListModels 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 ListModels operation. -// pageNum := 0 -// err := client.ListModelsPages(params, -// func(page *ListModelsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListModelsPages(input *ListModelsInput, fn func(*ListModelsOutput, bool) bool) error { - return c.ListModelsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListModelsPagesWithContext same as ListModelsPages 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 *SageMaker) ListModelsPagesWithContext(ctx aws.Context, input *ListModelsInput, fn func(*ListModelsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListModelsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListModelsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListModelsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListNotebookInstanceLifecycleConfigs = "ListNotebookInstanceLifecycleConfigs" - -// ListNotebookInstanceLifecycleConfigsRequest generates a "aws/request.Request" representing the -// client's request for the ListNotebookInstanceLifecycleConfigs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListNotebookInstanceLifecycleConfigs for more information on using the ListNotebookInstanceLifecycleConfigs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListNotebookInstanceLifecycleConfigsRequest method. -// req, resp := client.ListNotebookInstanceLifecycleConfigsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListNotebookInstanceLifecycleConfigs -func (c *SageMaker) ListNotebookInstanceLifecycleConfigsRequest(input *ListNotebookInstanceLifecycleConfigsInput) (req *request.Request, output *ListNotebookInstanceLifecycleConfigsOutput) { - op := &request.Operation{ - Name: opListNotebookInstanceLifecycleConfigs, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListNotebookInstanceLifecycleConfigsInput{} - } - - output = &ListNotebookInstanceLifecycleConfigsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListNotebookInstanceLifecycleConfigs API operation for Amazon SageMaker Service. -// -// Lists notebook instance lifestyle configurations created with the CreateNotebookInstanceLifecycleConfig -// API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListNotebookInstanceLifecycleConfigs for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListNotebookInstanceLifecycleConfigs -func (c *SageMaker) ListNotebookInstanceLifecycleConfigs(input *ListNotebookInstanceLifecycleConfigsInput) (*ListNotebookInstanceLifecycleConfigsOutput, error) { - req, out := c.ListNotebookInstanceLifecycleConfigsRequest(input) - return out, req.Send() -} - -// ListNotebookInstanceLifecycleConfigsWithContext is the same as ListNotebookInstanceLifecycleConfigs with the addition of -// the ability to pass a context and additional request options. -// -// See ListNotebookInstanceLifecycleConfigs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListNotebookInstanceLifecycleConfigsWithContext(ctx aws.Context, input *ListNotebookInstanceLifecycleConfigsInput, opts ...request.Option) (*ListNotebookInstanceLifecycleConfigsOutput, error) { - req, out := c.ListNotebookInstanceLifecycleConfigsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListNotebookInstanceLifecycleConfigsPages iterates over the pages of a ListNotebookInstanceLifecycleConfigs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListNotebookInstanceLifecycleConfigs 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 ListNotebookInstanceLifecycleConfigs operation. -// pageNum := 0 -// err := client.ListNotebookInstanceLifecycleConfigsPages(params, -// func(page *ListNotebookInstanceLifecycleConfigsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListNotebookInstanceLifecycleConfigsPages(input *ListNotebookInstanceLifecycleConfigsInput, fn func(*ListNotebookInstanceLifecycleConfigsOutput, bool) bool) error { - return c.ListNotebookInstanceLifecycleConfigsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListNotebookInstanceLifecycleConfigsPagesWithContext same as ListNotebookInstanceLifecycleConfigsPages 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 *SageMaker) ListNotebookInstanceLifecycleConfigsPagesWithContext(ctx aws.Context, input *ListNotebookInstanceLifecycleConfigsInput, fn func(*ListNotebookInstanceLifecycleConfigsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListNotebookInstanceLifecycleConfigsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListNotebookInstanceLifecycleConfigsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListNotebookInstanceLifecycleConfigsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListNotebookInstances = "ListNotebookInstances" - -// ListNotebookInstancesRequest generates a "aws/request.Request" representing the -// client's request for the ListNotebookInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListNotebookInstances for more information on using the ListNotebookInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListNotebookInstancesRequest method. -// req, resp := client.ListNotebookInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListNotebookInstances -func (c *SageMaker) ListNotebookInstancesRequest(input *ListNotebookInstancesInput) (req *request.Request, output *ListNotebookInstancesOutput) { - op := &request.Operation{ - Name: opListNotebookInstances, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListNotebookInstancesInput{} - } - - output = &ListNotebookInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListNotebookInstances API operation for Amazon SageMaker Service. -// -// Returns a list of the Amazon SageMaker notebook instances in the requester's -// account in an AWS Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListNotebookInstances for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListNotebookInstances -func (c *SageMaker) ListNotebookInstances(input *ListNotebookInstancesInput) (*ListNotebookInstancesOutput, error) { - req, out := c.ListNotebookInstancesRequest(input) - return out, req.Send() -} - -// ListNotebookInstancesWithContext is the same as ListNotebookInstances with the addition of -// the ability to pass a context and additional request options. -// -// See ListNotebookInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListNotebookInstancesWithContext(ctx aws.Context, input *ListNotebookInstancesInput, opts ...request.Option) (*ListNotebookInstancesOutput, error) { - req, out := c.ListNotebookInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListNotebookInstancesPages iterates over the pages of a ListNotebookInstances operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListNotebookInstances 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 ListNotebookInstances operation. -// pageNum := 0 -// err := client.ListNotebookInstancesPages(params, -// func(page *ListNotebookInstancesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListNotebookInstancesPages(input *ListNotebookInstancesInput, fn func(*ListNotebookInstancesOutput, bool) bool) error { - return c.ListNotebookInstancesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListNotebookInstancesPagesWithContext same as ListNotebookInstancesPages 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 *SageMaker) ListNotebookInstancesPagesWithContext(ctx aws.Context, input *ListNotebookInstancesInput, fn func(*ListNotebookInstancesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListNotebookInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListNotebookInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListNotebookInstancesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListSubscribedWorkteams = "ListSubscribedWorkteams" - -// ListSubscribedWorkteamsRequest generates a "aws/request.Request" representing the -// client's request for the ListSubscribedWorkteams operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSubscribedWorkteams for more information on using the ListSubscribedWorkteams -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSubscribedWorkteamsRequest method. -// req, resp := client.ListSubscribedWorkteamsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListSubscribedWorkteams -func (c *SageMaker) ListSubscribedWorkteamsRequest(input *ListSubscribedWorkteamsInput) (req *request.Request, output *ListSubscribedWorkteamsOutput) { - op := &request.Operation{ - Name: opListSubscribedWorkteams, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListSubscribedWorkteamsInput{} - } - - output = &ListSubscribedWorkteamsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSubscribedWorkteams API operation for Amazon SageMaker Service. -// -// Gets a list of the work teams that you are subscribed to in the AWS Marketplace. -// The list may be empty if no work team satisfies the filter specified in the -// NameContains parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListSubscribedWorkteams for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListSubscribedWorkteams -func (c *SageMaker) ListSubscribedWorkteams(input *ListSubscribedWorkteamsInput) (*ListSubscribedWorkteamsOutput, error) { - req, out := c.ListSubscribedWorkteamsRequest(input) - return out, req.Send() -} - -// ListSubscribedWorkteamsWithContext is the same as ListSubscribedWorkteams with the addition of -// the ability to pass a context and additional request options. -// -// See ListSubscribedWorkteams for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListSubscribedWorkteamsWithContext(ctx aws.Context, input *ListSubscribedWorkteamsInput, opts ...request.Option) (*ListSubscribedWorkteamsOutput, error) { - req, out := c.ListSubscribedWorkteamsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListSubscribedWorkteamsPages iterates over the pages of a ListSubscribedWorkteams operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListSubscribedWorkteams 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 ListSubscribedWorkteams operation. -// pageNum := 0 -// err := client.ListSubscribedWorkteamsPages(params, -// func(page *ListSubscribedWorkteamsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListSubscribedWorkteamsPages(input *ListSubscribedWorkteamsInput, fn func(*ListSubscribedWorkteamsOutput, bool) bool) error { - return c.ListSubscribedWorkteamsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListSubscribedWorkteamsPagesWithContext same as ListSubscribedWorkteamsPages 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 *SageMaker) ListSubscribedWorkteamsPagesWithContext(ctx aws.Context, input *ListSubscribedWorkteamsInput, fn func(*ListSubscribedWorkteamsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListSubscribedWorkteamsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListSubscribedWorkteamsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSubscribedWorkteamsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTags = "ListTags" - -// ListTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTags for more information on using the ListTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsRequest method. -// req, resp := client.ListTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTags -func (c *SageMaker) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { - op := &request.Operation{ - Name: opListTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTagsInput{} - } - - output = &ListTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTags API operation for Amazon SageMaker Service. -// -// Returns the tags for the specified Amazon SageMaker resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListTags for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTags -func (c *SageMaker) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - return out, req.Send() -} - -// ListTagsWithContext is the same as ListTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTagsPages iterates over the pages of a ListTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTags method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListTags operation. -// pageNum := 0 -// err := client.ListTagsPages(params, -// func(page *ListTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error { - return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTagsPagesWithContext same as ListTagsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTrainingJobs = "ListTrainingJobs" - -// ListTrainingJobsRequest generates a "aws/request.Request" representing the -// client's request for the ListTrainingJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTrainingJobs for more information on using the ListTrainingJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTrainingJobsRequest method. -// req, resp := client.ListTrainingJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrainingJobs -func (c *SageMaker) ListTrainingJobsRequest(input *ListTrainingJobsInput) (req *request.Request, output *ListTrainingJobsOutput) { - op := &request.Operation{ - Name: opListTrainingJobs, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTrainingJobsInput{} - } - - output = &ListTrainingJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTrainingJobs API operation for Amazon SageMaker Service. -// -// Lists training jobs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListTrainingJobs for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrainingJobs -func (c *SageMaker) ListTrainingJobs(input *ListTrainingJobsInput) (*ListTrainingJobsOutput, error) { - req, out := c.ListTrainingJobsRequest(input) - return out, req.Send() -} - -// ListTrainingJobsWithContext is the same as ListTrainingJobs with the addition of -// the ability to pass a context and additional request options. -// -// See ListTrainingJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListTrainingJobsWithContext(ctx aws.Context, input *ListTrainingJobsInput, opts ...request.Option) (*ListTrainingJobsOutput, error) { - req, out := c.ListTrainingJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTrainingJobsPages iterates over the pages of a ListTrainingJobs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTrainingJobs 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 ListTrainingJobs operation. -// pageNum := 0 -// err := client.ListTrainingJobsPages(params, -// func(page *ListTrainingJobsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListTrainingJobsPages(input *ListTrainingJobsInput, fn func(*ListTrainingJobsOutput, bool) bool) error { - return c.ListTrainingJobsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTrainingJobsPagesWithContext same as ListTrainingJobsPages 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 *SageMaker) ListTrainingJobsPagesWithContext(ctx aws.Context, input *ListTrainingJobsInput, fn func(*ListTrainingJobsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTrainingJobsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTrainingJobsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTrainingJobsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTrainingJobsForHyperParameterTuningJob = "ListTrainingJobsForHyperParameterTuningJob" - -// ListTrainingJobsForHyperParameterTuningJobRequest generates a "aws/request.Request" representing the -// client's request for the ListTrainingJobsForHyperParameterTuningJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTrainingJobsForHyperParameterTuningJob for more information on using the ListTrainingJobsForHyperParameterTuningJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTrainingJobsForHyperParameterTuningJobRequest method. -// req, resp := client.ListTrainingJobsForHyperParameterTuningJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrainingJobsForHyperParameterTuningJob -func (c *SageMaker) ListTrainingJobsForHyperParameterTuningJobRequest(input *ListTrainingJobsForHyperParameterTuningJobInput) (req *request.Request, output *ListTrainingJobsForHyperParameterTuningJobOutput) { - op := &request.Operation{ - Name: opListTrainingJobsForHyperParameterTuningJob, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTrainingJobsForHyperParameterTuningJobInput{} - } - - output = &ListTrainingJobsForHyperParameterTuningJobOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTrainingJobsForHyperParameterTuningJob API operation for Amazon SageMaker Service. -// -// Gets a list of TrainingJobSummary objects that describe the training jobs -// that a hyperparameter tuning job launched. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListTrainingJobsForHyperParameterTuningJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFound "ResourceNotFound" -// Resource being access is not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrainingJobsForHyperParameterTuningJob -func (c *SageMaker) ListTrainingJobsForHyperParameterTuningJob(input *ListTrainingJobsForHyperParameterTuningJobInput) (*ListTrainingJobsForHyperParameterTuningJobOutput, error) { - req, out := c.ListTrainingJobsForHyperParameterTuningJobRequest(input) - return out, req.Send() -} - -// ListTrainingJobsForHyperParameterTuningJobWithContext is the same as ListTrainingJobsForHyperParameterTuningJob with the addition of -// the ability to pass a context and additional request options. -// -// See ListTrainingJobsForHyperParameterTuningJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListTrainingJobsForHyperParameterTuningJobWithContext(ctx aws.Context, input *ListTrainingJobsForHyperParameterTuningJobInput, opts ...request.Option) (*ListTrainingJobsForHyperParameterTuningJobOutput, error) { - req, out := c.ListTrainingJobsForHyperParameterTuningJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTrainingJobsForHyperParameterTuningJobPages iterates over the pages of a ListTrainingJobsForHyperParameterTuningJob operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTrainingJobsForHyperParameterTuningJob 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 ListTrainingJobsForHyperParameterTuningJob operation. -// pageNum := 0 -// err := client.ListTrainingJobsForHyperParameterTuningJobPages(params, -// func(page *ListTrainingJobsForHyperParameterTuningJobOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListTrainingJobsForHyperParameterTuningJobPages(input *ListTrainingJobsForHyperParameterTuningJobInput, fn func(*ListTrainingJobsForHyperParameterTuningJobOutput, bool) bool) error { - return c.ListTrainingJobsForHyperParameterTuningJobPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTrainingJobsForHyperParameterTuningJobPagesWithContext same as ListTrainingJobsForHyperParameterTuningJobPages 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 *SageMaker) ListTrainingJobsForHyperParameterTuningJobPagesWithContext(ctx aws.Context, input *ListTrainingJobsForHyperParameterTuningJobInput, fn func(*ListTrainingJobsForHyperParameterTuningJobOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTrainingJobsForHyperParameterTuningJobInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTrainingJobsForHyperParameterTuningJobRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTrainingJobsForHyperParameterTuningJobOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTransformJobs = "ListTransformJobs" - -// ListTransformJobsRequest generates a "aws/request.Request" representing the -// client's request for the ListTransformJobs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTransformJobs for more information on using the ListTransformJobs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTransformJobsRequest method. -// req, resp := client.ListTransformJobsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTransformJobs -func (c *SageMaker) ListTransformJobsRequest(input *ListTransformJobsInput) (req *request.Request, output *ListTransformJobsOutput) { - op := &request.Operation{ - Name: opListTransformJobs, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTransformJobsInput{} - } - - output = &ListTransformJobsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTransformJobs API operation for Amazon SageMaker Service. -// -// Lists transform jobs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListTransformJobs for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTransformJobs -func (c *SageMaker) ListTransformJobs(input *ListTransformJobsInput) (*ListTransformJobsOutput, error) { - req, out := c.ListTransformJobsRequest(input) - return out, req.Send() -} - -// ListTransformJobsWithContext is the same as ListTransformJobs with the addition of -// the ability to pass a context and additional request options. -// -// See ListTransformJobs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListTransformJobsWithContext(ctx aws.Context, input *ListTransformJobsInput, opts ...request.Option) (*ListTransformJobsOutput, error) { - req, out := c.ListTransformJobsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTransformJobsPages iterates over the pages of a ListTransformJobs operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTransformJobs 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 ListTransformJobs operation. -// pageNum := 0 -// err := client.ListTransformJobsPages(params, -// func(page *ListTransformJobsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListTransformJobsPages(input *ListTransformJobsInput, fn func(*ListTransformJobsOutput, bool) bool) error { - return c.ListTransformJobsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTransformJobsPagesWithContext same as ListTransformJobsPages 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 *SageMaker) ListTransformJobsPagesWithContext(ctx aws.Context, input *ListTransformJobsInput, fn func(*ListTransformJobsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTransformJobsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTransformJobsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTransformJobsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListWorkteams = "ListWorkteams" - -// ListWorkteamsRequest generates a "aws/request.Request" representing the -// client's request for the ListWorkteams operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListWorkteams for more information on using the ListWorkteams -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListWorkteamsRequest method. -// req, resp := client.ListWorkteamsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListWorkteams -func (c *SageMaker) ListWorkteamsRequest(input *ListWorkteamsInput) (req *request.Request, output *ListWorkteamsOutput) { - op := &request.Operation{ - Name: opListWorkteams, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListWorkteamsInput{} - } - - output = &ListWorkteamsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListWorkteams API operation for Amazon SageMaker Service. -// -// Gets a list of work teams that you have defined in a region. The list may -// be empty if no work team satisfies the filter specified in the NameContains -// parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation ListWorkteams for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListWorkteams -func (c *SageMaker) ListWorkteams(input *ListWorkteamsInput) (*ListWorkteamsOutput, error) { - req, out := c.ListWorkteamsRequest(input) - return out, req.Send() -} - -// ListWorkteamsWithContext is the same as ListWorkteams with the addition of -// the ability to pass a context and additional request options. -// -// See ListWorkteams for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) ListWorkteamsWithContext(ctx aws.Context, input *ListWorkteamsInput, opts ...request.Option) (*ListWorkteamsOutput, error) { - req, out := c.ListWorkteamsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListWorkteamsPages iterates over the pages of a ListWorkteams operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListWorkteams 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 ListWorkteams operation. -// pageNum := 0 -// err := client.ListWorkteamsPages(params, -// func(page *ListWorkteamsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) ListWorkteamsPages(input *ListWorkteamsInput, fn func(*ListWorkteamsOutput, bool) bool) error { - return c.ListWorkteamsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListWorkteamsPagesWithContext same as ListWorkteamsPages 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 *SageMaker) ListWorkteamsPagesWithContext(ctx aws.Context, input *ListWorkteamsInput, fn func(*ListWorkteamsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListWorkteamsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListWorkteamsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListWorkteamsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opRenderUiTemplate = "RenderUiTemplate" - -// RenderUiTemplateRequest generates a "aws/request.Request" representing the -// client's request for the RenderUiTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RenderUiTemplate for more information on using the RenderUiTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RenderUiTemplateRequest method. -// req, resp := client.RenderUiTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/RenderUiTemplate -func (c *SageMaker) RenderUiTemplateRequest(input *RenderUiTemplateInput) (req *request.Request, output *RenderUiTemplateOutput) { - op := &request.Operation{ - Name: opRenderUiTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RenderUiTemplateInput{} - } - - output = &RenderUiTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// RenderUiTemplate API operation for Amazon SageMaker Service. -// -// Renders the UI template so that you can preview the worker's experience. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation RenderUiTemplate for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/RenderUiTemplate -func (c *SageMaker) RenderUiTemplate(input *RenderUiTemplateInput) (*RenderUiTemplateOutput, error) { - req, out := c.RenderUiTemplateRequest(input) - return out, req.Send() -} - -// RenderUiTemplateWithContext is the same as RenderUiTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See RenderUiTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) RenderUiTemplateWithContext(ctx aws.Context, input *RenderUiTemplateInput, opts ...request.Option) (*RenderUiTemplateOutput, error) { - req, out := c.RenderUiTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSearch = "Search" - -// SearchRequest generates a "aws/request.Request" representing the -// client's request for the Search operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See Search for more information on using the Search -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SearchRequest method. -// req, resp := client.SearchRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/Search -func (c *SageMaker) SearchRequest(input *SearchInput) (req *request.Request, output *SearchOutput) { - op := &request.Operation{ - Name: opSearch, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &SearchInput{} - } - - output = &SearchOutput{} - req = c.newRequest(op, input, output) - return -} - -// Search API operation for Amazon SageMaker Service. -// -// Finds Amazon SageMaker resources that match a search query. Matching resource -// objects are returned as a list of SearchResult objects in the response. You -// can sort the search results by any resource property in a ascending or descending -// order. -// -// You can query against the following value types: numerical, text, Booleans, -// and timestamps. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation Search for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/Search -func (c *SageMaker) Search(input *SearchInput) (*SearchOutput, error) { - req, out := c.SearchRequest(input) - return out, req.Send() -} - -// SearchWithContext is the same as Search with the addition of -// the ability to pass a context and additional request options. -// -// See Search for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) SearchWithContext(ctx aws.Context, input *SearchInput, opts ...request.Option) (*SearchOutput, error) { - req, out := c.SearchRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// SearchPages iterates over the pages of a Search operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See Search 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 Search operation. -// pageNum := 0 -// err := client.SearchPages(params, -// func(page *SearchOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SageMaker) SearchPages(input *SearchInput, fn func(*SearchOutput, bool) bool) error { - return c.SearchPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// SearchPagesWithContext same as SearchPages 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 *SageMaker) SearchPagesWithContext(ctx aws.Context, input *SearchInput, fn func(*SearchOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *SearchInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.SearchRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SearchOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opStartNotebookInstance = "StartNotebookInstance" - -// StartNotebookInstanceRequest generates a "aws/request.Request" representing the -// client's request for the StartNotebookInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartNotebookInstance for more information on using the StartNotebookInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartNotebookInstanceRequest method. -// req, resp := client.StartNotebookInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StartNotebookInstance -func (c *SageMaker) StartNotebookInstanceRequest(input *StartNotebookInstanceInput) (req *request.Request, output *StartNotebookInstanceOutput) { - op := &request.Operation{ - Name: opStartNotebookInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartNotebookInstanceInput{} - } - - output = &StartNotebookInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartNotebookInstance API operation for Amazon SageMaker Service. -// -// Launches an ML compute instance with the latest version of the libraries -// and attaches your ML storage volume. After configuring the notebook instance, -// Amazon SageMaker sets the notebook instance status to InService. A notebook -// instance's status must be InService before you can connect to your Jupyter -// notebook. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation StartNotebookInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StartNotebookInstance -func (c *SageMaker) StartNotebookInstance(input *StartNotebookInstanceInput) (*StartNotebookInstanceOutput, error) { - req, out := c.StartNotebookInstanceRequest(input) - return out, req.Send() -} - -// StartNotebookInstanceWithContext is the same as StartNotebookInstance with the addition of -// the ability to pass a context and additional request options. -// -// See StartNotebookInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) StartNotebookInstanceWithContext(ctx aws.Context, input *StartNotebookInstanceInput, opts ...request.Option) (*StartNotebookInstanceOutput, error) { - req, out := c.StartNotebookInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopCompilationJob = "StopCompilationJob" - -// StopCompilationJobRequest generates a "aws/request.Request" representing the -// client's request for the StopCompilationJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopCompilationJob for more information on using the StopCompilationJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopCompilationJobRequest method. -// req, resp := client.StopCompilationJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopCompilationJob -func (c *SageMaker) StopCompilationJobRequest(input *StopCompilationJobInput) (req *request.Request, output *StopCompilationJobOutput) { - op := &request.Operation{ - Name: opStopCompilationJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopCompilationJobInput{} - } - - output = &StopCompilationJobOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopCompilationJob API operation for Amazon SageMaker Service. -// -// Stops a model compilation job. -// -// To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal. This -// gracefully shuts the job down. If the job hasn't stopped, it sends the SIGKILL -// signal. -// -// When it receives a StopCompilationJob request, Amazon SageMaker changes the -// CompilationJobSummary$CompilationJobStatus of the job to Stopping. After -// Amazon SageMaker stops the job, it sets the CompilationJobSummary$CompilationJobStatus -// to Stopped. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation StopCompilationJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFound "ResourceNotFound" -// Resource being access is not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopCompilationJob -func (c *SageMaker) StopCompilationJob(input *StopCompilationJobInput) (*StopCompilationJobOutput, error) { - req, out := c.StopCompilationJobRequest(input) - return out, req.Send() -} - -// StopCompilationJobWithContext is the same as StopCompilationJob with the addition of -// the ability to pass a context and additional request options. -// -// See StopCompilationJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) StopCompilationJobWithContext(ctx aws.Context, input *StopCompilationJobInput, opts ...request.Option) (*StopCompilationJobOutput, error) { - req, out := c.StopCompilationJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopHyperParameterTuningJob = "StopHyperParameterTuningJob" - -// StopHyperParameterTuningJobRequest generates a "aws/request.Request" representing the -// client's request for the StopHyperParameterTuningJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopHyperParameterTuningJob for more information on using the StopHyperParameterTuningJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopHyperParameterTuningJobRequest method. -// req, resp := client.StopHyperParameterTuningJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopHyperParameterTuningJob -func (c *SageMaker) StopHyperParameterTuningJobRequest(input *StopHyperParameterTuningJobInput) (req *request.Request, output *StopHyperParameterTuningJobOutput) { - op := &request.Operation{ - Name: opStopHyperParameterTuningJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopHyperParameterTuningJobInput{} - } - - output = &StopHyperParameterTuningJobOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopHyperParameterTuningJob API operation for Amazon SageMaker Service. -// -// Stops a running hyperparameter tuning job and all running training jobs that -// the tuning job launched. -// -// All model artifacts output from the training jobs are stored in Amazon Simple -// Storage Service (Amazon S3). All data that the training jobs write to Amazon -// CloudWatch Logs are still available in CloudWatch. After the tuning job moves -// to the Stopped state, it releases all reserved resources for the tuning job. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation StopHyperParameterTuningJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFound "ResourceNotFound" -// Resource being access is not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopHyperParameterTuningJob -func (c *SageMaker) StopHyperParameterTuningJob(input *StopHyperParameterTuningJobInput) (*StopHyperParameterTuningJobOutput, error) { - req, out := c.StopHyperParameterTuningJobRequest(input) - return out, req.Send() -} - -// StopHyperParameterTuningJobWithContext is the same as StopHyperParameterTuningJob with the addition of -// the ability to pass a context and additional request options. -// -// See StopHyperParameterTuningJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) StopHyperParameterTuningJobWithContext(ctx aws.Context, input *StopHyperParameterTuningJobInput, opts ...request.Option) (*StopHyperParameterTuningJobOutput, error) { - req, out := c.StopHyperParameterTuningJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopLabelingJob = "StopLabelingJob" - -// StopLabelingJobRequest generates a "aws/request.Request" representing the -// client's request for the StopLabelingJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopLabelingJob for more information on using the StopLabelingJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopLabelingJobRequest method. -// req, resp := client.StopLabelingJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopLabelingJob -func (c *SageMaker) StopLabelingJobRequest(input *StopLabelingJobInput) (req *request.Request, output *StopLabelingJobOutput) { - op := &request.Operation{ - Name: opStopLabelingJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopLabelingJobInput{} - } - - output = &StopLabelingJobOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopLabelingJob API operation for Amazon SageMaker Service. -// -// Stops a running labeling job. A job that is stopped cannot be restarted. -// Any results obtained before the job is stopped are placed in the Amazon S3 -// output bucket. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation StopLabelingJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFound "ResourceNotFound" -// Resource being access is not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopLabelingJob -func (c *SageMaker) StopLabelingJob(input *StopLabelingJobInput) (*StopLabelingJobOutput, error) { - req, out := c.StopLabelingJobRequest(input) - return out, req.Send() -} - -// StopLabelingJobWithContext is the same as StopLabelingJob with the addition of -// the ability to pass a context and additional request options. -// -// See StopLabelingJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) StopLabelingJobWithContext(ctx aws.Context, input *StopLabelingJobInput, opts ...request.Option) (*StopLabelingJobOutput, error) { - req, out := c.StopLabelingJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopNotebookInstance = "StopNotebookInstance" - -// StopNotebookInstanceRequest generates a "aws/request.Request" representing the -// client's request for the StopNotebookInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopNotebookInstance for more information on using the StopNotebookInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopNotebookInstanceRequest method. -// req, resp := client.StopNotebookInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopNotebookInstance -func (c *SageMaker) StopNotebookInstanceRequest(input *StopNotebookInstanceInput) (req *request.Request, output *StopNotebookInstanceOutput) { - op := &request.Operation{ - Name: opStopNotebookInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopNotebookInstanceInput{} - } - - output = &StopNotebookInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopNotebookInstance API operation for Amazon SageMaker Service. -// -// Terminates the ML compute instance. Before terminating the instance, Amazon -// SageMaker disconnects the ML storage volume from it. Amazon SageMaker preserves -// the ML storage volume. -// -// To access data on the ML storage volume for a notebook instance that has -// been terminated, call the StartNotebookInstance API. StartNotebookInstance -// launches another ML compute instance, configures it, and attaches the preserved -// ML storage volume so you can continue your 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 Amazon SageMaker Service's -// API operation StopNotebookInstance for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopNotebookInstance -func (c *SageMaker) StopNotebookInstance(input *StopNotebookInstanceInput) (*StopNotebookInstanceOutput, error) { - req, out := c.StopNotebookInstanceRequest(input) - return out, req.Send() -} - -// StopNotebookInstanceWithContext is the same as StopNotebookInstance with the addition of -// the ability to pass a context and additional request options. -// -// See StopNotebookInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) StopNotebookInstanceWithContext(ctx aws.Context, input *StopNotebookInstanceInput, opts ...request.Option) (*StopNotebookInstanceOutput, error) { - req, out := c.StopNotebookInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopTrainingJob = "StopTrainingJob" - -// StopTrainingJobRequest generates a "aws/request.Request" representing the -// client's request for the StopTrainingJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopTrainingJob for more information on using the StopTrainingJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopTrainingJobRequest method. -// req, resp := client.StopTrainingJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopTrainingJob -func (c *SageMaker) StopTrainingJobRequest(input *StopTrainingJobInput) (req *request.Request, output *StopTrainingJobOutput) { - op := &request.Operation{ - Name: opStopTrainingJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopTrainingJobInput{} - } - - output = &StopTrainingJobOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopTrainingJob API operation for Amazon SageMaker Service. -// -// Stops a training job. To stop a job, Amazon SageMaker sends the algorithm -// the SIGTERM signal, which delays job termination for 120 seconds. Algorithms -// might use this 120-second window to save the model artifacts, so the results -// of the training is not lost. -// -// Training algorithms provided by Amazon SageMaker save the intermediate results -// of a model training job. This intermediate data is a valid model artifact. -// You can use the model artifacts that are saved when Amazon SageMaker stops -// a training job to create a model. -// -// When it receives a StopTrainingJob request, Amazon SageMaker changes the -// status of the job to Stopping. After Amazon SageMaker stops the job, it sets -// the status to Stopped. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation StopTrainingJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFound "ResourceNotFound" -// Resource being access is not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopTrainingJob -func (c *SageMaker) StopTrainingJob(input *StopTrainingJobInput) (*StopTrainingJobOutput, error) { - req, out := c.StopTrainingJobRequest(input) - return out, req.Send() -} - -// StopTrainingJobWithContext is the same as StopTrainingJob with the addition of -// the ability to pass a context and additional request options. -// -// See StopTrainingJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) StopTrainingJobWithContext(ctx aws.Context, input *StopTrainingJobInput, opts ...request.Option) (*StopTrainingJobOutput, error) { - req, out := c.StopTrainingJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopTransformJob = "StopTransformJob" - -// StopTransformJobRequest generates a "aws/request.Request" representing the -// client's request for the StopTransformJob operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopTransformJob for more information on using the StopTransformJob -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopTransformJobRequest method. -// req, resp := client.StopTransformJobRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopTransformJob -func (c *SageMaker) StopTransformJobRequest(input *StopTransformJobInput) (req *request.Request, output *StopTransformJobOutput) { - op := &request.Operation{ - Name: opStopTransformJob, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopTransformJobInput{} - } - - output = &StopTransformJobOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopTransformJob API operation for Amazon SageMaker Service. -// -// Stops a transform job. -// -// When Amazon SageMaker receives a StopTransformJob request, the status of -// the job changes to Stopping. After Amazon SageMaker stops the job, the status -// is set to Stopped. When you stop a transform job before it is completed, -// Amazon SageMaker doesn't store the job's output in Amazon S3. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation StopTransformJob for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFound "ResourceNotFound" -// Resource being access is not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopTransformJob -func (c *SageMaker) StopTransformJob(input *StopTransformJobInput) (*StopTransformJobOutput, error) { - req, out := c.StopTransformJobRequest(input) - return out, req.Send() -} - -// StopTransformJobWithContext is the same as StopTransformJob with the addition of -// the ability to pass a context and additional request options. -// -// See StopTransformJob for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) StopTransformJobWithContext(ctx aws.Context, input *StopTransformJobInput, opts ...request.Option) (*StopTransformJobOutput, error) { - req, out := c.StopTransformJobRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateCodeRepository = "UpdateCodeRepository" - -// UpdateCodeRepositoryRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCodeRepository operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateCodeRepository for more information on using the UpdateCodeRepository -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateCodeRepositoryRequest method. -// req, resp := client.UpdateCodeRepositoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateCodeRepository -func (c *SageMaker) UpdateCodeRepositoryRequest(input *UpdateCodeRepositoryInput) (req *request.Request, output *UpdateCodeRepositoryOutput) { - op := &request.Operation{ - Name: opUpdateCodeRepository, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateCodeRepositoryInput{} - } - - output = &UpdateCodeRepositoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateCodeRepository API operation for Amazon SageMaker Service. -// -// Updates the specified Git repository with the specified values. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation UpdateCodeRepository for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateCodeRepository -func (c *SageMaker) UpdateCodeRepository(input *UpdateCodeRepositoryInput) (*UpdateCodeRepositoryOutput, error) { - req, out := c.UpdateCodeRepositoryRequest(input) - return out, req.Send() -} - -// UpdateCodeRepositoryWithContext is the same as UpdateCodeRepository with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCodeRepository for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) UpdateCodeRepositoryWithContext(ctx aws.Context, input *UpdateCodeRepositoryInput, opts ...request.Option) (*UpdateCodeRepositoryOutput, error) { - req, out := c.UpdateCodeRepositoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateEndpoint = "UpdateEndpoint" - -// UpdateEndpointRequest generates a "aws/request.Request" representing the -// client's request for the UpdateEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateEndpoint for more information on using the UpdateEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateEndpointRequest method. -// req, resp := client.UpdateEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateEndpoint -func (c *SageMaker) UpdateEndpointRequest(input *UpdateEndpointInput) (req *request.Request, output *UpdateEndpointOutput) { - op := &request.Operation{ - Name: opUpdateEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateEndpointInput{} - } - - output = &UpdateEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateEndpoint API operation for Amazon SageMaker Service. -// -// Deploys the new EndpointConfig specified in the request, switches to using -// newly created endpoint, and then deletes resources provisioned for the endpoint -// using the previous EndpointConfig (there is no availability loss). -// -// When Amazon SageMaker receives the request, it sets the endpoint status to -// Updating. After updating the endpoint, it sets the status to InService. To -// check the status of an endpoint, use the DescribeEndpoint (http://docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html) -// API. -// -// You cannot update an endpoint with the current EndpointConfig. To update -// an endpoint, you must create a new EndpointConfig. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation UpdateEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateEndpoint -func (c *SageMaker) UpdateEndpoint(input *UpdateEndpointInput) (*UpdateEndpointOutput, error) { - req, out := c.UpdateEndpointRequest(input) - return out, req.Send() -} - -// UpdateEndpointWithContext is the same as UpdateEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) UpdateEndpointWithContext(ctx aws.Context, input *UpdateEndpointInput, opts ...request.Option) (*UpdateEndpointOutput, error) { - req, out := c.UpdateEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateEndpointWeightsAndCapacities = "UpdateEndpointWeightsAndCapacities" - -// UpdateEndpointWeightsAndCapacitiesRequest generates a "aws/request.Request" representing the -// client's request for the UpdateEndpointWeightsAndCapacities operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateEndpointWeightsAndCapacities for more information on using the UpdateEndpointWeightsAndCapacities -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateEndpointWeightsAndCapacitiesRequest method. -// req, resp := client.UpdateEndpointWeightsAndCapacitiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateEndpointWeightsAndCapacities -func (c *SageMaker) UpdateEndpointWeightsAndCapacitiesRequest(input *UpdateEndpointWeightsAndCapacitiesInput) (req *request.Request, output *UpdateEndpointWeightsAndCapacitiesOutput) { - op := &request.Operation{ - Name: opUpdateEndpointWeightsAndCapacities, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateEndpointWeightsAndCapacitiesInput{} - } - - output = &UpdateEndpointWeightsAndCapacitiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateEndpointWeightsAndCapacities API operation for Amazon SageMaker Service. -// -// Updates variant weight of one or more variants associated with an existing -// endpoint, or capacity of one variant associated with an existing endpoint. -// When it receives the request, Amazon SageMaker sets the endpoint status to -// Updating. After updating the endpoint, it sets the status to InService. To -// check the status of an endpoint, use the DescribeEndpoint (http://docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html) -// API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation UpdateEndpointWeightsAndCapacities for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateEndpointWeightsAndCapacities -func (c *SageMaker) UpdateEndpointWeightsAndCapacities(input *UpdateEndpointWeightsAndCapacitiesInput) (*UpdateEndpointWeightsAndCapacitiesOutput, error) { - req, out := c.UpdateEndpointWeightsAndCapacitiesRequest(input) - return out, req.Send() -} - -// UpdateEndpointWeightsAndCapacitiesWithContext is the same as UpdateEndpointWeightsAndCapacities with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateEndpointWeightsAndCapacities for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) UpdateEndpointWeightsAndCapacitiesWithContext(ctx aws.Context, input *UpdateEndpointWeightsAndCapacitiesInput, opts ...request.Option) (*UpdateEndpointWeightsAndCapacitiesOutput, error) { - req, out := c.UpdateEndpointWeightsAndCapacitiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateNotebookInstance = "UpdateNotebookInstance" - -// UpdateNotebookInstanceRequest generates a "aws/request.Request" representing the -// client's request for the UpdateNotebookInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateNotebookInstance for more information on using the UpdateNotebookInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateNotebookInstanceRequest method. -// req, resp := client.UpdateNotebookInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateNotebookInstance -func (c *SageMaker) UpdateNotebookInstanceRequest(input *UpdateNotebookInstanceInput) (req *request.Request, output *UpdateNotebookInstanceOutput) { - op := &request.Operation{ - Name: opUpdateNotebookInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateNotebookInstanceInput{} - } - - output = &UpdateNotebookInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateNotebookInstance API operation for Amazon SageMaker Service. -// -// Updates a notebook instance. NotebookInstance updates include upgrading or -// downgrading the ML compute instance used for your notebook instance to accommodate -// changes in your workload requirements. You can also update the VPC security -// groups. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation UpdateNotebookInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateNotebookInstance -func (c *SageMaker) UpdateNotebookInstance(input *UpdateNotebookInstanceInput) (*UpdateNotebookInstanceOutput, error) { - req, out := c.UpdateNotebookInstanceRequest(input) - return out, req.Send() -} - -// UpdateNotebookInstanceWithContext is the same as UpdateNotebookInstance with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateNotebookInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) UpdateNotebookInstanceWithContext(ctx aws.Context, input *UpdateNotebookInstanceInput, opts ...request.Option) (*UpdateNotebookInstanceOutput, error) { - req, out := c.UpdateNotebookInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateNotebookInstanceLifecycleConfig = "UpdateNotebookInstanceLifecycleConfig" - -// UpdateNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the -// client's request for the UpdateNotebookInstanceLifecycleConfig operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateNotebookInstanceLifecycleConfig for more information on using the UpdateNotebookInstanceLifecycleConfig -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateNotebookInstanceLifecycleConfigRequest method. -// req, resp := client.UpdateNotebookInstanceLifecycleConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateNotebookInstanceLifecycleConfig -func (c *SageMaker) UpdateNotebookInstanceLifecycleConfigRequest(input *UpdateNotebookInstanceLifecycleConfigInput) (req *request.Request, output *UpdateNotebookInstanceLifecycleConfigOutput) { - op := &request.Operation{ - Name: opUpdateNotebookInstanceLifecycleConfig, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateNotebookInstanceLifecycleConfigInput{} - } - - output = &UpdateNotebookInstanceLifecycleConfigOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateNotebookInstanceLifecycleConfig API operation for Amazon SageMaker Service. -// -// Updates a notebook instance lifecycle configuration created with the CreateNotebookInstanceLifecycleConfig -// API. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation UpdateNotebookInstanceLifecycleConfig for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateNotebookInstanceLifecycleConfig -func (c *SageMaker) UpdateNotebookInstanceLifecycleConfig(input *UpdateNotebookInstanceLifecycleConfigInput) (*UpdateNotebookInstanceLifecycleConfigOutput, error) { - req, out := c.UpdateNotebookInstanceLifecycleConfigRequest(input) - return out, req.Send() -} - -// UpdateNotebookInstanceLifecycleConfigWithContext is the same as UpdateNotebookInstanceLifecycleConfig with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateNotebookInstanceLifecycleConfig for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) UpdateNotebookInstanceLifecycleConfigWithContext(ctx aws.Context, input *UpdateNotebookInstanceLifecycleConfigInput, opts ...request.Option) (*UpdateNotebookInstanceLifecycleConfigOutput, error) { - req, out := c.UpdateNotebookInstanceLifecycleConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateWorkteam = "UpdateWorkteam" - -// UpdateWorkteamRequest generates a "aws/request.Request" representing the -// client's request for the UpdateWorkteam operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateWorkteam for more information on using the UpdateWorkteam -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateWorkteamRequest method. -// req, resp := client.UpdateWorkteamRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateWorkteam -func (c *SageMaker) UpdateWorkteamRequest(input *UpdateWorkteamInput) (req *request.Request, output *UpdateWorkteamOutput) { - op := &request.Operation{ - Name: opUpdateWorkteam, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateWorkteamInput{} - } - - output = &UpdateWorkteamOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateWorkteam API operation for Amazon SageMaker Service. -// -// Updates an existing work team with new member definitions or description. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SageMaker Service's -// API operation UpdateWorkteam for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// You have exceeded an Amazon SageMaker resource limit. For example, you might -// have too many training jobs created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateWorkteam -func (c *SageMaker) UpdateWorkteam(input *UpdateWorkteamInput) (*UpdateWorkteamOutput, error) { - req, out := c.UpdateWorkteamRequest(input) - return out, req.Send() -} - -// UpdateWorkteamWithContext is the same as UpdateWorkteam with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateWorkteam for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) UpdateWorkteamWithContext(ctx aws.Context, input *UpdateWorkteamInput, opts ...request.Option) (*UpdateWorkteamOutput, error) { - req, out := c.UpdateWorkteamRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AddTagsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource that you want to tag. - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` - - // An array of Tag objects. Each tag is a key-value pair. Only the key parameter - // is required. If you don't specify a value, Amazon SageMaker sets the value - // to an empty string. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *AddTagsInput) SetResourceArn(v string) *AddTagsInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsInput) SetTags(v []*Tag) *AddTagsInput { - s.Tags = v - return s -} - -type AddTagsOutput struct { - _ struct{} `type:"structure"` - - // A list of tags associated with the Amazon SageMaker resource. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s AddTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *AddTagsOutput) SetTags(v []*Tag) *AddTagsOutput { - s.Tags = v - return s -} - -// Specifies the training algorithm to use in a CreateTrainingJob (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTrainingJob.html) -// request. -// -// For more information about algorithms provided by Amazon SageMaker, see Algorithms -// (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). For information -// about using your own algorithms, see Using Your Own Algorithms with Amazon -// SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html). -type AlgorithmSpecification struct { - _ struct{} `type:"structure"` - - // The name of the algorithm resource to use for the training job. This must - // be an algorithm resource that you created or subscribe to on AWS Marketplace. - // If you specify a value for this parameter, you can't specify a value for - // TrainingImage. - AlgorithmName *string `min:"1" type:"string"` - - // A list of metric definition objects. Each object specifies the metric name - // and regular expressions used to parse algorithm logs. Amazon SageMaker publishes - // each metric to Amazon CloudWatch. - MetricDefinitions []*MetricDefinition `type:"list"` - - // The registry path of the Docker image that contains the training algorithm. - // For information about docker registry paths for built-in algorithms, see - // Algorithms Provided by Amazon SageMaker: Common Parameters (http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html). - TrainingImage *string `type:"string"` - - // The input mode that the algorithm supports. For the input modes that Amazon - // SageMaker algorithms support, see Algorithms (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). - // If an algorithm supports the File input mode, Amazon SageMaker downloads - // the training data from S3 to the provisioned ML storage Volume, and mounts - // the directory to docker volume for training container. If an algorithm supports - // the Pipe input mode, Amazon SageMaker streams data directly from S3 to the - // container. - // - // In File mode, make sure you provision ML storage volume with sufficient capacity - // to accommodate the data download from S3. In addition to the training data, - // the ML storage volume also stores the output model. The algorithm container - // use ML storage volume to also store intermediate information, if any. - // - // For distributed algorithms using File mode, training data is distributed - // uniformly, and your training duration is predictable if the input data objects - // size is approximately same. Amazon SageMaker does not split the files any - // further for model training. If the object sizes are skewed, training won't - // be optimal as the data distribution is also skewed where one host in a training - // cluster is overloaded, thus becoming bottleneck in training. - // - // TrainingInputMode is a required field - TrainingInputMode *string `type:"string" required:"true" enum:"TrainingInputMode"` -} - -// String returns the string representation -func (s AlgorithmSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AlgorithmSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AlgorithmSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AlgorithmSpecification"} - if s.AlgorithmName != nil && len(*s.AlgorithmName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AlgorithmName", 1)) - } - if s.TrainingInputMode == nil { - invalidParams.Add(request.NewErrParamRequired("TrainingInputMode")) - } - if s.MetricDefinitions != nil { - for i, v := range s.MetricDefinitions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricDefinitions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlgorithmName sets the AlgorithmName field's value. -func (s *AlgorithmSpecification) SetAlgorithmName(v string) *AlgorithmSpecification { - s.AlgorithmName = &v - return s -} - -// SetMetricDefinitions sets the MetricDefinitions field's value. -func (s *AlgorithmSpecification) SetMetricDefinitions(v []*MetricDefinition) *AlgorithmSpecification { - s.MetricDefinitions = v - return s -} - -// SetTrainingImage sets the TrainingImage field's value. -func (s *AlgorithmSpecification) SetTrainingImage(v string) *AlgorithmSpecification { - s.TrainingImage = &v - return s -} - -// SetTrainingInputMode sets the TrainingInputMode field's value. -func (s *AlgorithmSpecification) SetTrainingInputMode(v string) *AlgorithmSpecification { - s.TrainingInputMode = &v - return s -} - -// Specifies the validation and image scan statuses of the algorithm. -type AlgorithmStatusDetails struct { - _ struct{} `type:"structure"` - - // The status of the scan of the algorithm's Docker image container. - ImageScanStatuses []*AlgorithmStatusItem `type:"list"` - - // The status of algorithm validation. - ValidationStatuses []*AlgorithmStatusItem `type:"list"` -} - -// String returns the string representation -func (s AlgorithmStatusDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AlgorithmStatusDetails) GoString() string { - return s.String() -} - -// SetImageScanStatuses sets the ImageScanStatuses field's value. -func (s *AlgorithmStatusDetails) SetImageScanStatuses(v []*AlgorithmStatusItem) *AlgorithmStatusDetails { - s.ImageScanStatuses = v - return s -} - -// SetValidationStatuses sets the ValidationStatuses field's value. -func (s *AlgorithmStatusDetails) SetValidationStatuses(v []*AlgorithmStatusItem) *AlgorithmStatusDetails { - s.ValidationStatuses = v - return s -} - -// Represents the overall status of an algorithm. -type AlgorithmStatusItem struct { - _ struct{} `type:"structure"` - - // if the overall status is Failed, the reason for the failure. - FailureReason *string `type:"string"` - - // The name of the algorithm for which the overall status is being reported. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The current status. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"DetailedAlgorithmStatus"` -} - -// String returns the string representation -func (s AlgorithmStatusItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AlgorithmStatusItem) GoString() string { - return s.String() -} - -// SetFailureReason sets the FailureReason field's value. -func (s *AlgorithmStatusItem) SetFailureReason(v string) *AlgorithmStatusItem { - s.FailureReason = &v - return s -} - -// SetName sets the Name field's value. -func (s *AlgorithmStatusItem) SetName(v string) *AlgorithmStatusItem { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AlgorithmStatusItem) SetStatus(v string) *AlgorithmStatusItem { - s.Status = &v - return s -} - -// Provides summary information about an algorithm. -type AlgorithmSummary struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the algorithm. - // - // AlgorithmArn is a required field - AlgorithmArn *string `min:"1" type:"string" required:"true"` - - // A brief description of the algorithm. - AlgorithmDescription *string `type:"string"` - - // The name of the algorithm that is described by the summary. - // - // AlgorithmName is a required field - AlgorithmName *string `min:"1" type:"string" required:"true"` - - // The overall status of the algorithm. - // - // AlgorithmStatus is a required field - AlgorithmStatus *string `type:"string" required:"true" enum:"AlgorithmStatus"` - - // A timestamp that shows when the algorithm was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s AlgorithmSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AlgorithmSummary) GoString() string { - return s.String() -} - -// SetAlgorithmArn sets the AlgorithmArn field's value. -func (s *AlgorithmSummary) SetAlgorithmArn(v string) *AlgorithmSummary { - s.AlgorithmArn = &v - return s -} - -// SetAlgorithmDescription sets the AlgorithmDescription field's value. -func (s *AlgorithmSummary) SetAlgorithmDescription(v string) *AlgorithmSummary { - s.AlgorithmDescription = &v - return s -} - -// SetAlgorithmName sets the AlgorithmName field's value. -func (s *AlgorithmSummary) SetAlgorithmName(v string) *AlgorithmSummary { - s.AlgorithmName = &v - return s -} - -// SetAlgorithmStatus sets the AlgorithmStatus field's value. -func (s *AlgorithmSummary) SetAlgorithmStatus(v string) *AlgorithmSummary { - s.AlgorithmStatus = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *AlgorithmSummary) SetCreationTime(v time.Time) *AlgorithmSummary { - s.CreationTime = &v - return s -} - -// Defines a training job and a batch transform job that Amazon SageMaker runs -// to validate your algorithm. -// -// The data provided in the validation profile is made available to your buyers -// on AWS Marketplace. -type AlgorithmValidationProfile struct { - _ struct{} `type:"structure"` - - // The name of the profile for the algorithm. The name must have 1 to 63 characters. - // Valid characters are a-z, A-Z, 0-9, and - (hyphen). - // - // ProfileName is a required field - ProfileName *string `min:"1" type:"string" required:"true"` - - // The TrainingJobDefinition object that describes the training job that Amazon - // SageMaker runs to validate your algorithm. - // - // TrainingJobDefinition is a required field - TrainingJobDefinition *TrainingJobDefinition `type:"structure" required:"true"` - - // The TransformJobDefinition object that describes the transform job that Amazon - // SageMaker runs to validate your algorithm. - TransformJobDefinition *TransformJobDefinition `type:"structure"` -} - -// String returns the string representation -func (s AlgorithmValidationProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AlgorithmValidationProfile) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AlgorithmValidationProfile) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AlgorithmValidationProfile"} - if s.ProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("ProfileName")) - } - if s.ProfileName != nil && len(*s.ProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProfileName", 1)) - } - if s.TrainingJobDefinition == nil { - invalidParams.Add(request.NewErrParamRequired("TrainingJobDefinition")) - } - if s.TrainingJobDefinition != nil { - if err := s.TrainingJobDefinition.Validate(); err != nil { - invalidParams.AddNested("TrainingJobDefinition", err.(request.ErrInvalidParams)) - } - } - if s.TransformJobDefinition != nil { - if err := s.TransformJobDefinition.Validate(); err != nil { - invalidParams.AddNested("TransformJobDefinition", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetProfileName sets the ProfileName field's value. -func (s *AlgorithmValidationProfile) SetProfileName(v string) *AlgorithmValidationProfile { - s.ProfileName = &v - return s -} - -// SetTrainingJobDefinition sets the TrainingJobDefinition field's value. -func (s *AlgorithmValidationProfile) SetTrainingJobDefinition(v *TrainingJobDefinition) *AlgorithmValidationProfile { - s.TrainingJobDefinition = v - return s -} - -// SetTransformJobDefinition sets the TransformJobDefinition field's value. -func (s *AlgorithmValidationProfile) SetTransformJobDefinition(v *TransformJobDefinition) *AlgorithmValidationProfile { - s.TransformJobDefinition = v - return s -} - -// Specifies configurations for one or more training jobs that Amazon SageMaker -// runs to test the algorithm. -type AlgorithmValidationSpecification struct { - _ struct{} `type:"structure"` - - // An array of AlgorithmValidationProfile objects, each of which specifies a - // training job and batch transform job that Amazon SageMaker runs to validate - // your algorithm. - // - // ValidationProfiles is a required field - ValidationProfiles []*AlgorithmValidationProfile `min:"1" type:"list" required:"true"` - - // The IAM roles that Amazon SageMaker uses to run the training jobs. - // - // ValidationRole is a required field - ValidationRole *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s AlgorithmValidationSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AlgorithmValidationSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AlgorithmValidationSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AlgorithmValidationSpecification"} - if s.ValidationProfiles == nil { - invalidParams.Add(request.NewErrParamRequired("ValidationProfiles")) - } - if s.ValidationProfiles != nil && len(s.ValidationProfiles) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ValidationProfiles", 1)) - } - if s.ValidationRole == nil { - invalidParams.Add(request.NewErrParamRequired("ValidationRole")) - } - if s.ValidationRole != nil && len(*s.ValidationRole) < 20 { - invalidParams.Add(request.NewErrParamMinLen("ValidationRole", 20)) - } - if s.ValidationProfiles != nil { - for i, v := range s.ValidationProfiles { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ValidationProfiles", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetValidationProfiles sets the ValidationProfiles field's value. -func (s *AlgorithmValidationSpecification) SetValidationProfiles(v []*AlgorithmValidationProfile) *AlgorithmValidationSpecification { - s.ValidationProfiles = v - return s -} - -// SetValidationRole sets the ValidationRole field's value. -func (s *AlgorithmValidationSpecification) SetValidationRole(v string) *AlgorithmValidationSpecification { - s.ValidationRole = &v - return s -} - -// Configures how labels are consolidated across human workers. -type AnnotationConsolidationConfig struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of a Lambda function implements the logic - // for annotation consolidation. - // - // For the built-in bounding box, image classification, semantic segmentation, - // and text classification task types, Amazon SageMaker Ground Truth provides - // the following Lambda functions: - // - // * Bounding box - Finds the most similar boxes from different workers based - // on the Jaccard index of the boxes. - // - // arn:aws:lambda:us-east-1:432418664414:function:ACS-BoundingBox - // - // arn:aws:lambda:us-east-2:266458841044:function:ACS-BoundingBox - // - // arn:aws:lambda:us-west-2:081040173940:function:ACS-BoundingBox - // - // arn:aws:lambda:eu-west-1:568282634449:function:ACS-BoundingBox - // - // arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-BoundingBox - // - // * Image classification - Uses a variant of the Expectation Maximization - // approach to estimate the true class of an image based on annotations from - // individual workers. - // - // arn:aws:lambda:us-east-1:432418664414:function:ACS-ImageMultiClass - // - // arn:aws:lambda:us-east-2:266458841044:function:ACS-ImageMultiClass - // - // arn:aws:lambda:us-west-2:081040173940:function:ACS-ImageMultiClass - // - // arn:aws:lambda:eu-west-1:568282634449:function:ACS-ImageMultiClass - // - // arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-ImageMultiClass - // - // * Semantic segmentation - Treats each pixel in an image as a multi-class - // classification and treats pixel annotations from workers as "votes" for - // the correct label. - // - // arn:aws:lambda:us-east-1:432418664414:function:ACS-SemanticSegmentation - // - // arn:aws:lambda:us-east-2:266458841044:function:ACS-SemanticSegmentation - // - // arn:aws:lambda:us-west-2:081040173940:function:ACS-SemanticSegmentation - // - // arn:aws:lambda:eu-west-1:568282634449:function:ACS-SemanticSegmentation - // - // arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-SemanticSegmentation - // - // * Text classification - Uses a variant of the Expectation Maximization - // approach to estimate the true class of text based on annotations from - // individual workers. - // - // arn:aws:lambda:us-east-1:432418664414:function:ACS-TextMultiClass - // - // arn:aws:lambda:us-east-2:266458841044:function:ACS-TextMultiClass - // - // arn:aws:lambda:us-west-2:081040173940:function:ACS-TextMultiClass - // - // arn:aws:lambda:eu-west-1:568282634449:function:ACS-TextMultiClass - // - // arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-TextMultiClass - // - // For more information, see Annotation Consolidation (http://docs.aws.amazon.com/sagemaker/latest/dg/sms-annotation-consolidation.html). - // - // AnnotationConsolidationLambdaArn is a required field - AnnotationConsolidationLambdaArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AnnotationConsolidationConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AnnotationConsolidationConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AnnotationConsolidationConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AnnotationConsolidationConfig"} - if s.AnnotationConsolidationLambdaArn == nil { - invalidParams.Add(request.NewErrParamRequired("AnnotationConsolidationLambdaArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnnotationConsolidationLambdaArn sets the AnnotationConsolidationLambdaArn field's value. -func (s *AnnotationConsolidationConfig) SetAnnotationConsolidationLambdaArn(v string) *AnnotationConsolidationConfig { - s.AnnotationConsolidationLambdaArn = &v - return s -} - -// A list of categorical hyperparameters to tune. -type CategoricalParameterRange struct { - _ struct{} `type:"structure"` - - // The name of the categorical hyperparameter to tune. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // A list of the categories for the hyperparameter. - // - // Values is a required field - Values []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s CategoricalParameterRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CategoricalParameterRange) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CategoricalParameterRange) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CategoricalParameterRange"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *CategoricalParameterRange) SetName(v string) *CategoricalParameterRange { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *CategoricalParameterRange) SetValues(v []*string) *CategoricalParameterRange { - s.Values = v - return s -} - -// Defines the possible values for a categorical hyperparameter. -type CategoricalParameterRangeSpecification struct { - _ struct{} `type:"structure"` - - // The allowed categories for the hyperparameter. - // - // Values is a required field - Values []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s CategoricalParameterRangeSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CategoricalParameterRangeSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CategoricalParameterRangeSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CategoricalParameterRangeSpecification"} - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetValues sets the Values field's value. -func (s *CategoricalParameterRangeSpecification) SetValues(v []*string) *CategoricalParameterRangeSpecification { - s.Values = v - return s -} - -// A channel is a named input source that training algorithms can consume. -type Channel struct { - _ struct{} `type:"structure"` - - // The name of the channel. - // - // ChannelName is a required field - ChannelName *string `min:"1" type:"string" required:"true"` - - // If training data is compressed, the compression type. The default value is - // None. CompressionType is used only in Pipe input mode. In File mode, leave - // this field unset or set it to None. - CompressionType *string `type:"string" enum:"CompressionType"` - - // The MIME type of the data. - ContentType *string `type:"string"` - - // The location of the channel data. - // - // DataSource is a required field - DataSource *DataSource `type:"structure" required:"true"` - - // (Optional) The input mode to use for the data channel in a training job. - // If you don't set a value for InputMode, Amazon SageMaker uses the value set - // for TrainingInputMode. Use this parameter to override the TrainingInputMode - // setting in a AlgorithmSpecification request when you have a channel that - // needs a different input mode from the training job's general setting. To - // download the data from Amazon Simple Storage Service (Amazon S3) to the provisioned - // ML storage volume, and mount the directory to a Docker volume, use File input - // mode. To stream data directly from Amazon S3 to the container, choose Pipe - // input mode. - // - // To use a model for incremental training, choose File input model. - InputMode *string `type:"string" enum:"TrainingInputMode"` - - // Specify RecordIO as the value when input data is in raw format but the training - // algorithm requires the RecordIO format. In this case, Amazon SageMaker wraps - // each individual S3 object in a RecordIO record. If the input data is already - // in RecordIO format, you don't need to set this attribute. For more information, - // see Create a Dataset Using RecordIO (https://mxnet.incubator.apache.org/architecture/note_data_loading.html#data-format) - RecordWrapperType *string `type:"string" enum:"RecordWrapper"` - - // A configuration for a shuffle option for input data in a channel. If you - // use S3Prefix for S3DataType, this shuffles the results of the S3 key prefix - // matches. If you use ManifestFile, the order of the S3 object references in - // the ManifestFile is shuffled. If you use AugmentedManifestFile, the order - // of the JSON lines in the AugmentedManifestFile is shuffled. The shuffling - // order is determined using the Seed value. - // - // For Pipe input mode, shuffling is done at the start of every epoch. With - // large datasets this ensures that the order of the training data is different - // for each epoch, it helps reduce bias and possible overfitting. In a multi-node - // training job when ShuffleConfig is combined with S3DataDistributionType of - // ShardedByS3Key, the data is shuffled across nodes so that the content sent - // to a particular node on the first epoch might be sent to a different node - // on the second epoch. - ShuffleConfig *ShuffleConfig `type:"structure"` -} - -// String returns the string representation -func (s Channel) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Channel) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Channel) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Channel"} - if s.ChannelName == nil { - invalidParams.Add(request.NewErrParamRequired("ChannelName")) - } - if s.ChannelName != nil && len(*s.ChannelName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChannelName", 1)) - } - if s.DataSource == nil { - invalidParams.Add(request.NewErrParamRequired("DataSource")) - } - if s.DataSource != nil { - if err := s.DataSource.Validate(); err != nil { - invalidParams.AddNested("DataSource", err.(request.ErrInvalidParams)) - } - } - if s.ShuffleConfig != nil { - if err := s.ShuffleConfig.Validate(); err != nil { - invalidParams.AddNested("ShuffleConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChannelName sets the ChannelName field's value. -func (s *Channel) SetChannelName(v string) *Channel { - s.ChannelName = &v - return s -} - -// SetCompressionType sets the CompressionType field's value. -func (s *Channel) SetCompressionType(v string) *Channel { - s.CompressionType = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *Channel) SetContentType(v string) *Channel { - s.ContentType = &v - return s -} - -// SetDataSource sets the DataSource field's value. -func (s *Channel) SetDataSource(v *DataSource) *Channel { - s.DataSource = v - return s -} - -// SetInputMode sets the InputMode field's value. -func (s *Channel) SetInputMode(v string) *Channel { - s.InputMode = &v - return s -} - -// SetRecordWrapperType sets the RecordWrapperType field's value. -func (s *Channel) SetRecordWrapperType(v string) *Channel { - s.RecordWrapperType = &v - return s -} - -// SetShuffleConfig sets the ShuffleConfig field's value. -func (s *Channel) SetShuffleConfig(v *ShuffleConfig) *Channel { - s.ShuffleConfig = v - return s -} - -// Defines a named input source, called a channel, to be used by an algorithm. -type ChannelSpecification struct { - _ struct{} `type:"structure"` - - // A brief description of the channel. - Description *string `type:"string"` - - // Indicates whether the channel is required by the algorithm. - IsRequired *bool `type:"boolean"` - - // The name of the channel. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The allowed compression types, if data compression is used. - SupportedCompressionTypes []*string `type:"list"` - - // The supported MIME types for the data. - // - // SupportedContentTypes is a required field - SupportedContentTypes []*string `type:"list" required:"true"` - - // The allowed input mode, either FILE or PIPE. - // - // In FILE mode, Amazon SageMaker copies the data from the input source onto - // the local Amazon Elastic Block Store (Amazon EBS) volumes before starting - // your training algorithm. This is the most commonly used input mode. - // - // In PIPE mode, Amazon SageMaker streams input data from the source directly - // to your algorithm without using the EBS volume. - // - // SupportedInputModes is a required field - SupportedInputModes []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s ChannelSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChannelSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ChannelSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ChannelSpecification"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.SupportedContentTypes == nil { - invalidParams.Add(request.NewErrParamRequired("SupportedContentTypes")) - } - if s.SupportedInputModes == nil { - invalidParams.Add(request.NewErrParamRequired("SupportedInputModes")) - } - if s.SupportedInputModes != nil && len(s.SupportedInputModes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SupportedInputModes", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *ChannelSpecification) SetDescription(v string) *ChannelSpecification { - s.Description = &v - return s -} - -// SetIsRequired sets the IsRequired field's value. -func (s *ChannelSpecification) SetIsRequired(v bool) *ChannelSpecification { - s.IsRequired = &v - return s -} - -// SetName sets the Name field's value. -func (s *ChannelSpecification) SetName(v string) *ChannelSpecification { - s.Name = &v - return s -} - -// SetSupportedCompressionTypes sets the SupportedCompressionTypes field's value. -func (s *ChannelSpecification) SetSupportedCompressionTypes(v []*string) *ChannelSpecification { - s.SupportedCompressionTypes = v - return s -} - -// SetSupportedContentTypes sets the SupportedContentTypes field's value. -func (s *ChannelSpecification) SetSupportedContentTypes(v []*string) *ChannelSpecification { - s.SupportedContentTypes = v - return s -} - -// SetSupportedInputModes sets the SupportedInputModes field's value. -func (s *ChannelSpecification) SetSupportedInputModes(v []*string) *ChannelSpecification { - s.SupportedInputModes = v - return s -} - -// Specifies summary information about a Git repository. -type CodeRepositorySummary struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the Git repository. - // - // CodeRepositoryArn is a required field - CodeRepositoryArn *string `min:"1" type:"string" required:"true"` - - // The name of the Git repository. - // - // CodeRepositoryName is a required field - CodeRepositoryName *string `min:"1" type:"string" required:"true"` - - // The date and time that the Git repository was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // Configuration details for the Git repository, including the URL where it - // is located and the ARN of the AWS Secrets Manager secret that contains the - // credentials used to access the repository. - GitConfig *GitConfig `type:"structure"` - - // The date and time that the Git repository was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s CodeRepositorySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CodeRepositorySummary) GoString() string { - return s.String() -} - -// SetCodeRepositoryArn sets the CodeRepositoryArn field's value. -func (s *CodeRepositorySummary) SetCodeRepositoryArn(v string) *CodeRepositorySummary { - s.CodeRepositoryArn = &v - return s -} - -// SetCodeRepositoryName sets the CodeRepositoryName field's value. -func (s *CodeRepositorySummary) SetCodeRepositoryName(v string) *CodeRepositorySummary { - s.CodeRepositoryName = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *CodeRepositorySummary) SetCreationTime(v time.Time) *CodeRepositorySummary { - s.CreationTime = &v - return s -} - -// SetGitConfig sets the GitConfig field's value. -func (s *CodeRepositorySummary) SetGitConfig(v *GitConfig) *CodeRepositorySummary { - s.GitConfig = v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *CodeRepositorySummary) SetLastModifiedTime(v time.Time) *CodeRepositorySummary { - s.LastModifiedTime = &v - return s -} - -// Identifies a Amazon Cognito user group. A user group can be used in on or -// more work teams. -type CognitoMemberDefinition struct { - _ struct{} `type:"structure"` - - // An identifier for an application client. You must create the app client ID - // using Amazon Cognito. - // - // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true"` - - // An identifier for a user group. - // - // UserGroup is a required field - UserGroup *string `min:"1" type:"string" required:"true"` - - // An identifier for a user pool. The user pool must be in the same region as - // the service that you are calling. - // - // UserPool is a required field - UserPool *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CognitoMemberDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CognitoMemberDefinition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CognitoMemberDefinition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CognitoMemberDefinition"} - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.ClientId != nil && len(*s.ClientId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) - } - if s.UserGroup == nil { - invalidParams.Add(request.NewErrParamRequired("UserGroup")) - } - if s.UserGroup != nil && len(*s.UserGroup) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserGroup", 1)) - } - if s.UserPool == nil { - invalidParams.Add(request.NewErrParamRequired("UserPool")) - } - if s.UserPool != nil && len(*s.UserPool) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserPool", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientId sets the ClientId field's value. -func (s *CognitoMemberDefinition) SetClientId(v string) *CognitoMemberDefinition { - s.ClientId = &v - return s -} - -// SetUserGroup sets the UserGroup field's value. -func (s *CognitoMemberDefinition) SetUserGroup(v string) *CognitoMemberDefinition { - s.UserGroup = &v - return s -} - -// SetUserPool sets the UserPool field's value. -func (s *CognitoMemberDefinition) SetUserPool(v string) *CognitoMemberDefinition { - s.UserPool = &v - return s -} - -// A summary of a model compilation job. -type CompilationJobSummary struct { - _ struct{} `type:"structure"` - - // The time when the model compilation job completed. - CompilationEndTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the model compilation job. - // - // CompilationJobArn is a required field - CompilationJobArn *string `type:"string" required:"true"` - - // The name of the model compilation job that you want a summary for. - // - // CompilationJobName is a required field - CompilationJobName *string `min:"1" type:"string" required:"true"` - - // The status of the model compilation job. - // - // CompilationJobStatus is a required field - CompilationJobStatus *string `type:"string" required:"true" enum:"CompilationJobStatus"` - - // The time when the model compilation job started. - CompilationStartTime *time.Time `type:"timestamp"` - - // The type of device that the model will run on after compilation has completed. - // - // CompilationTargetDevice is a required field - CompilationTargetDevice *string `type:"string" required:"true" enum:"TargetDevice"` - - // The time when the model compilation job was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The time when the model compilation job was last modified. - LastModifiedTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s CompilationJobSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CompilationJobSummary) GoString() string { - return s.String() -} - -// SetCompilationEndTime sets the CompilationEndTime field's value. -func (s *CompilationJobSummary) SetCompilationEndTime(v time.Time) *CompilationJobSummary { - s.CompilationEndTime = &v - return s -} - -// SetCompilationJobArn sets the CompilationJobArn field's value. -func (s *CompilationJobSummary) SetCompilationJobArn(v string) *CompilationJobSummary { - s.CompilationJobArn = &v - return s -} - -// SetCompilationJobName sets the CompilationJobName field's value. -func (s *CompilationJobSummary) SetCompilationJobName(v string) *CompilationJobSummary { - s.CompilationJobName = &v - return s -} - -// SetCompilationJobStatus sets the CompilationJobStatus field's value. -func (s *CompilationJobSummary) SetCompilationJobStatus(v string) *CompilationJobSummary { - s.CompilationJobStatus = &v - return s -} - -// SetCompilationStartTime sets the CompilationStartTime field's value. -func (s *CompilationJobSummary) SetCompilationStartTime(v time.Time) *CompilationJobSummary { - s.CompilationStartTime = &v - return s -} - -// SetCompilationTargetDevice sets the CompilationTargetDevice field's value. -func (s *CompilationJobSummary) SetCompilationTargetDevice(v string) *CompilationJobSummary { - s.CompilationTargetDevice = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *CompilationJobSummary) SetCreationTime(v time.Time) *CompilationJobSummary { - s.CreationTime = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *CompilationJobSummary) SetLastModifiedTime(v time.Time) *CompilationJobSummary { - s.LastModifiedTime = &v - return s -} - -// Describes the container, as part of model definition. -type ContainerDefinition struct { - _ struct{} `type:"structure"` - - // The DNS host name for the container after Amazon SageMaker deploys it. - ContainerHostname *string `type:"string"` - - // The environment variables to set in the Docker container. Each key and value - // in the Environment string to string map can have length of up to 1024. We - // support up to 16 entries in the map. - Environment map[string]*string `type:"map"` - - // The Amazon EC2 Container Registry (Amazon ECR) path where inference code - // is stored. If you are using your own custom algorithm instead of an algorithm - // provided by Amazon SageMaker, the inference code must meet Amazon SageMaker - // requirements. Amazon SageMaker supports both registry/repository[:tag] and - // registry/repository[@digest] image path formats. For more information, see - // Using Your Own Algorithms with Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html) - Image *string `type:"string"` - - // The S3 path where the model artifacts, which result from model training, - // are stored. This path must point to a single gzip compressed tar archive - // (.tar.gz suffix). - // - // If you provide a value for this parameter, Amazon SageMaker uses AWS Security - // Token Service to download model artifacts from the S3 path you provide. AWS - // STS is activated in your IAM user account by default. If you previously deactivated - // AWS STS for a region, you need to reactivate AWS STS for that region. For - // more information, see Activating and Deactivating AWS STS in an AWS Region - // (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) - // in the AWS Identity and Access Management User Guide. - ModelDataUrl *string `type:"string"` - - // The name of the model package to use to create the model. - ModelPackageName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ContainerDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContainerDefinition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContainerDefinition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContainerDefinition"} - if s.ModelPackageName != nil && len(*s.ModelPackageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ModelPackageName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerHostname sets the ContainerHostname field's value. -func (s *ContainerDefinition) SetContainerHostname(v string) *ContainerDefinition { - s.ContainerHostname = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *ContainerDefinition) SetEnvironment(v map[string]*string) *ContainerDefinition { - s.Environment = v - return s -} - -// SetImage sets the Image field's value. -func (s *ContainerDefinition) SetImage(v string) *ContainerDefinition { - s.Image = &v - return s -} - -// SetModelDataUrl sets the ModelDataUrl field's value. -func (s *ContainerDefinition) SetModelDataUrl(v string) *ContainerDefinition { - s.ModelDataUrl = &v - return s -} - -// SetModelPackageName sets the ModelPackageName field's value. -func (s *ContainerDefinition) SetModelPackageName(v string) *ContainerDefinition { - s.ModelPackageName = &v - return s -} - -// A list of continuous hyperparameters to tune. -type ContinuousParameterRange struct { - _ struct{} `type:"structure"` - - // The maximum value for the hyperparameter. The tuning job uses floating-point - // values between MinValue value and this value for tuning. - // - // MaxValue is a required field - MaxValue *string `type:"string" required:"true"` - - // The minimum value for the hyperparameter. The tuning job uses floating-point - // values between this value and MaxValuefor tuning. - // - // MinValue is a required field - MinValue *string `type:"string" required:"true"` - - // The name of the continuous hyperparameter to tune. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ContinuousParameterRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContinuousParameterRange) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContinuousParameterRange) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContinuousParameterRange"} - if s.MaxValue == nil { - invalidParams.Add(request.NewErrParamRequired("MaxValue")) - } - if s.MinValue == nil { - invalidParams.Add(request.NewErrParamRequired("MinValue")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxValue sets the MaxValue field's value. -func (s *ContinuousParameterRange) SetMaxValue(v string) *ContinuousParameterRange { - s.MaxValue = &v - return s -} - -// SetMinValue sets the MinValue field's value. -func (s *ContinuousParameterRange) SetMinValue(v string) *ContinuousParameterRange { - s.MinValue = &v - return s -} - -// SetName sets the Name field's value. -func (s *ContinuousParameterRange) SetName(v string) *ContinuousParameterRange { - s.Name = &v - return s -} - -// Defines the possible values for a continuous hyperparameter. -type ContinuousParameterRangeSpecification struct { - _ struct{} `type:"structure"` - - // The maximum floating-point value allowed. - // - // MaxValue is a required field - MaxValue *string `type:"string" required:"true"` - - // The minimum floating-point value allowed. - // - // MinValue is a required field - MinValue *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ContinuousParameterRangeSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContinuousParameterRangeSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContinuousParameterRangeSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContinuousParameterRangeSpecification"} - if s.MaxValue == nil { - invalidParams.Add(request.NewErrParamRequired("MaxValue")) - } - if s.MinValue == nil { - invalidParams.Add(request.NewErrParamRequired("MinValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxValue sets the MaxValue field's value. -func (s *ContinuousParameterRangeSpecification) SetMaxValue(v string) *ContinuousParameterRangeSpecification { - s.MaxValue = &v - return s -} - -// SetMinValue sets the MinValue field's value. -func (s *ContinuousParameterRangeSpecification) SetMinValue(v string) *ContinuousParameterRangeSpecification { - s.MinValue = &v - return s -} - -type CreateAlgorithmInput struct { - _ struct{} `type:"structure"` - - // A description of the algorithm. - AlgorithmDescription *string `type:"string"` - - // The name of the algorithm. - // - // AlgorithmName is a required field - AlgorithmName *string `min:"1" type:"string" required:"true"` - - // Whether to certify the algorithm so that it can be listed in AWS Marketplace. - CertifyForMarketplace *bool `type:"boolean"` - - // Specifies details about inference jobs that the algorithm runs, including - // the following: - // - // * The Amazon ECR paths of containers that contain the inference code and - // model artifacts. - // - // * The instance types that the algorithm supports for transform jobs and - // real-time endpoints used for inference. - // - // * The input and output content formats that the algorithm supports for - // inference. - InferenceSpecification *InferenceSpecification `type:"structure"` - - // Specifies details about training jobs run by this algorithm, including the - // following: - // - // * The Amazon ECR path of the container and the version digest of the algorithm. - // - // * The hyperparameters that the algorithm supports. - // - // * The instance types that the algorithm supports for training. - // - // * Whether the algorithm supports distributed training. - // - // * The metrics that the algorithm emits to Amazon CloudWatch. - // - // * Which metrics that the algorithm emits can be used as the objective - // metric for hyperparameter tuning jobs. - // - // * The input channels that the algorithm supports for training data. For - // example, an algorithm might support train, validation, and test channels. - // - // TrainingSpecification is a required field - TrainingSpecification *TrainingSpecification `type:"structure" required:"true"` - - // Specifies configurations for one or more training jobs and that Amazon SageMaker - // runs to test the algorithm's training code and, optionally, one or more batch - // transform jobs that Amazon SageMaker runs to test the algorithm's inference - // code. - ValidationSpecification *AlgorithmValidationSpecification `type:"structure"` -} - -// String returns the string representation -func (s CreateAlgorithmInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAlgorithmInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAlgorithmInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAlgorithmInput"} - if s.AlgorithmName == nil { - invalidParams.Add(request.NewErrParamRequired("AlgorithmName")) - } - if s.AlgorithmName != nil && len(*s.AlgorithmName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AlgorithmName", 1)) - } - if s.TrainingSpecification == nil { - invalidParams.Add(request.NewErrParamRequired("TrainingSpecification")) - } - if s.InferenceSpecification != nil { - if err := s.InferenceSpecification.Validate(); err != nil { - invalidParams.AddNested("InferenceSpecification", err.(request.ErrInvalidParams)) - } - } - if s.TrainingSpecification != nil { - if err := s.TrainingSpecification.Validate(); err != nil { - invalidParams.AddNested("TrainingSpecification", err.(request.ErrInvalidParams)) - } - } - if s.ValidationSpecification != nil { - if err := s.ValidationSpecification.Validate(); err != nil { - invalidParams.AddNested("ValidationSpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlgorithmDescription sets the AlgorithmDescription field's value. -func (s *CreateAlgorithmInput) SetAlgorithmDescription(v string) *CreateAlgorithmInput { - s.AlgorithmDescription = &v - return s -} - -// SetAlgorithmName sets the AlgorithmName field's value. -func (s *CreateAlgorithmInput) SetAlgorithmName(v string) *CreateAlgorithmInput { - s.AlgorithmName = &v - return s -} - -// SetCertifyForMarketplace sets the CertifyForMarketplace field's value. -func (s *CreateAlgorithmInput) SetCertifyForMarketplace(v bool) *CreateAlgorithmInput { - s.CertifyForMarketplace = &v - return s -} - -// SetInferenceSpecification sets the InferenceSpecification field's value. -func (s *CreateAlgorithmInput) SetInferenceSpecification(v *InferenceSpecification) *CreateAlgorithmInput { - s.InferenceSpecification = v - return s -} - -// SetTrainingSpecification sets the TrainingSpecification field's value. -func (s *CreateAlgorithmInput) SetTrainingSpecification(v *TrainingSpecification) *CreateAlgorithmInput { - s.TrainingSpecification = v - return s -} - -// SetValidationSpecification sets the ValidationSpecification field's value. -func (s *CreateAlgorithmInput) SetValidationSpecification(v *AlgorithmValidationSpecification) *CreateAlgorithmInput { - s.ValidationSpecification = v - return s -} - -type CreateAlgorithmOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the new algorithm. - // - // AlgorithmArn is a required field - AlgorithmArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateAlgorithmOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAlgorithmOutput) GoString() string { - return s.String() -} - -// SetAlgorithmArn sets the AlgorithmArn field's value. -func (s *CreateAlgorithmOutput) SetAlgorithmArn(v string) *CreateAlgorithmOutput { - s.AlgorithmArn = &v - return s -} - -type CreateCodeRepositoryInput struct { - _ struct{} `type:"structure"` - - // The name of the Git repository. The name must have 1 to 63 characters. Valid - // characters are a-z, A-Z, 0-9, and - (hyphen). - // - // CodeRepositoryName is a required field - CodeRepositoryName *string `min:"1" type:"string" required:"true"` - - // Specifies details about the repository, including the URL where the repository - // is located, the default branch, and credentials to use to access the repository. - // - // GitConfig is a required field - GitConfig *GitConfig `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateCodeRepositoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCodeRepositoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCodeRepositoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCodeRepositoryInput"} - if s.CodeRepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("CodeRepositoryName")) - } - if s.CodeRepositoryName != nil && len(*s.CodeRepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CodeRepositoryName", 1)) - } - if s.GitConfig == nil { - invalidParams.Add(request.NewErrParamRequired("GitConfig")) - } - if s.GitConfig != nil { - if err := s.GitConfig.Validate(); err != nil { - invalidParams.AddNested("GitConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCodeRepositoryName sets the CodeRepositoryName field's value. -func (s *CreateCodeRepositoryInput) SetCodeRepositoryName(v string) *CreateCodeRepositoryInput { - s.CodeRepositoryName = &v - return s -} - -// SetGitConfig sets the GitConfig field's value. -func (s *CreateCodeRepositoryInput) SetGitConfig(v *GitConfig) *CreateCodeRepositoryInput { - s.GitConfig = v - return s -} - -type CreateCodeRepositoryOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the new repository. - // - // CodeRepositoryArn is a required field - CodeRepositoryArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateCodeRepositoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCodeRepositoryOutput) GoString() string { - return s.String() -} - -// SetCodeRepositoryArn sets the CodeRepositoryArn field's value. -func (s *CreateCodeRepositoryOutput) SetCodeRepositoryArn(v string) *CreateCodeRepositoryOutput { - s.CodeRepositoryArn = &v - return s -} - -type CreateCompilationJobInput struct { - _ struct{} `type:"structure"` - - // A name for the model compilation job. The name must be unique within the - // AWS Region and within your AWS account. - // - // CompilationJobName is a required field - CompilationJobName *string `min:"1" type:"string" required:"true"` - - // Provides information about the location of input model artifacts, the name - // and shape of the expected data inputs, and the framework in which the model - // was trained. - // - // InputConfig is a required field - InputConfig *InputConfig `type:"structure" required:"true"` - - // Provides information about the output location for the compiled model and - // the target device the model runs on. - // - // OutputConfig is a required field - OutputConfig *OutputConfig `type:"structure" required:"true"` - - // The Amazon Resource Name (ARN) of an IIAMAM role that enables Amazon SageMaker - // to perform tasks on your behalf. - // - // During model compilation, Amazon SageMaker needs your permission to: - // - // * Read input data from an S3 bucket - // - // * Write model artifacts to an S3 bucket - // - // * Write logs to Amazon CloudWatch Logs - // - // * Publish metrics to Amazon CloudWatch - // - // You grant permissions for all of these tasks to an IAM role. To pass this - // role to Amazon SageMaker, the caller of this API must have the iam:PassRole - // permission. For more information, see Amazon SageMaker Roles. (https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html) - // - // RoleArn is a required field - RoleArn *string `min:"20" type:"string" required:"true"` - - // The duration allowed for model compilation. - // - // StoppingCondition is a required field - StoppingCondition *StoppingCondition `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateCompilationJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCompilationJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCompilationJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCompilationJobInput"} - if s.CompilationJobName == nil { - invalidParams.Add(request.NewErrParamRequired("CompilationJobName")) - } - if s.CompilationJobName != nil && len(*s.CompilationJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CompilationJobName", 1)) - } - if s.InputConfig == nil { - invalidParams.Add(request.NewErrParamRequired("InputConfig")) - } - if s.OutputConfig == nil { - invalidParams.Add(request.NewErrParamRequired("OutputConfig")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.StoppingCondition == nil { - invalidParams.Add(request.NewErrParamRequired("StoppingCondition")) - } - if s.InputConfig != nil { - if err := s.InputConfig.Validate(); err != nil { - invalidParams.AddNested("InputConfig", err.(request.ErrInvalidParams)) - } - } - if s.OutputConfig != nil { - if err := s.OutputConfig.Validate(); err != nil { - invalidParams.AddNested("OutputConfig", err.(request.ErrInvalidParams)) - } - } - if s.StoppingCondition != nil { - if err := s.StoppingCondition.Validate(); err != nil { - invalidParams.AddNested("StoppingCondition", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCompilationJobName sets the CompilationJobName field's value. -func (s *CreateCompilationJobInput) SetCompilationJobName(v string) *CreateCompilationJobInput { - s.CompilationJobName = &v - return s -} - -// SetInputConfig sets the InputConfig field's value. -func (s *CreateCompilationJobInput) SetInputConfig(v *InputConfig) *CreateCompilationJobInput { - s.InputConfig = v - return s -} - -// SetOutputConfig sets the OutputConfig field's value. -func (s *CreateCompilationJobInput) SetOutputConfig(v *OutputConfig) *CreateCompilationJobInput { - s.OutputConfig = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CreateCompilationJobInput) SetRoleArn(v string) *CreateCompilationJobInput { - s.RoleArn = &v - return s -} - -// SetStoppingCondition sets the StoppingCondition field's value. -func (s *CreateCompilationJobInput) SetStoppingCondition(v *StoppingCondition) *CreateCompilationJobInput { - s.StoppingCondition = v - return s -} - -type CreateCompilationJobOutput struct { - _ struct{} `type:"structure"` - - // If the action is successful, the service sends back an HTTP 200 response. - // Amazon SageMaker returns the following data in JSON format: - // - // * CompilationJobArn: The Amazon Resource Name (ARN) of the compiled job. - // - // CompilationJobArn is a required field - CompilationJobArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateCompilationJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCompilationJobOutput) GoString() string { - return s.String() -} - -// SetCompilationJobArn sets the CompilationJobArn field's value. -func (s *CreateCompilationJobOutput) SetCompilationJobArn(v string) *CreateCompilationJobOutput { - s.CompilationJobArn = &v - return s -} - -type CreateEndpointConfigInput struct { - _ struct{} `type:"structure"` - - // The name of the endpoint configuration. You specify this name in a CreateEndpoint - // (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html) - // request. - // - // EndpointConfigName is a required field - EndpointConfigName *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon - // SageMaker uses to encrypt data on the storage volume attached to the ML compute - // instance that hosts the endpoint. - KmsKeyId *string `type:"string"` - - // An array of ProductionVariant objects, one for each model that you want to - // host at this endpoint. - // - // ProductionVariants is a required field - ProductionVariants []*ProductionVariant `min:"1" type:"list" required:"true"` - - // An array of key-value pairs. For more information, see Using Cost Allocation - // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) - // in the AWS Billing and Cost Management User Guide. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreateEndpointConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEndpointConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateEndpointConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateEndpointConfigInput"} - if s.EndpointConfigName == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointConfigName")) - } - if s.ProductionVariants == nil { - invalidParams.Add(request.NewErrParamRequired("ProductionVariants")) - } - if s.ProductionVariants != nil && len(s.ProductionVariants) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductionVariants", 1)) - } - if s.ProductionVariants != nil { - for i, v := range s.ProductionVariants { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ProductionVariants", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointConfigName sets the EndpointConfigName field's value. -func (s *CreateEndpointConfigInput) SetEndpointConfigName(v string) *CreateEndpointConfigInput { - s.EndpointConfigName = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateEndpointConfigInput) SetKmsKeyId(v string) *CreateEndpointConfigInput { - s.KmsKeyId = &v - return s -} - -// SetProductionVariants sets the ProductionVariants field's value. -func (s *CreateEndpointConfigInput) SetProductionVariants(v []*ProductionVariant) *CreateEndpointConfigInput { - s.ProductionVariants = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateEndpointConfigInput) SetTags(v []*Tag) *CreateEndpointConfigInput { - s.Tags = v - return s -} - -type CreateEndpointConfigOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the endpoint configuration. - // - // EndpointConfigArn is a required field - EndpointConfigArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateEndpointConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEndpointConfigOutput) GoString() string { - return s.String() -} - -// SetEndpointConfigArn sets the EndpointConfigArn field's value. -func (s *CreateEndpointConfigOutput) SetEndpointConfigArn(v string) *CreateEndpointConfigOutput { - s.EndpointConfigArn = &v - return s -} - -type CreateEndpointInput struct { - _ struct{} `type:"structure"` - - // The name of an endpoint configuration. For more information, see CreateEndpointConfig - // (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpointConfig.html). - // - // EndpointConfigName is a required field - EndpointConfigName *string `type:"string" required:"true"` - - // The name of the endpoint. The name must be unique within an AWS Region in - // your AWS account. - // - // EndpointName is a required field - EndpointName *string `type:"string" required:"true"` - - // An array of key-value pairs. For more information, see Using Cost Allocation - // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what)in - // the AWS Billing and Cost Management User Guide. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreateEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateEndpointInput"} - if s.EndpointConfigName == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointConfigName")) - } - if s.EndpointName == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointName")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointConfigName sets the EndpointConfigName field's value. -func (s *CreateEndpointInput) SetEndpointConfigName(v string) *CreateEndpointInput { - s.EndpointConfigName = &v - return s -} - -// SetEndpointName sets the EndpointName field's value. -func (s *CreateEndpointInput) SetEndpointName(v string) *CreateEndpointInput { - s.EndpointName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateEndpointInput) SetTags(v []*Tag) *CreateEndpointInput { - s.Tags = v - return s -} - -type CreateEndpointOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the endpoint. - // - // EndpointArn is a required field - EndpointArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateEndpointOutput) GoString() string { - return s.String() -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *CreateEndpointOutput) SetEndpointArn(v string) *CreateEndpointOutput { - s.EndpointArn = &v - return s -} - -type CreateHyperParameterTuningJobInput struct { - _ struct{} `type:"structure"` - - // The HyperParameterTuningJobConfig object that describes the tuning job, including - // the search strategy, the objective metric used to evaluate training jobs, - // ranges of parameters to search, and resource limits for the tuning job. For - // more information, see automatic-model-tuning - // - // HyperParameterTuningJobConfig is a required field - HyperParameterTuningJobConfig *HyperParameterTuningJobConfig `type:"structure" required:"true"` - - // The name of the tuning job. This name is the prefix for the names of all - // training jobs that this tuning job launches. The name must be unique within - // the same AWS account and AWS Region. The name must have { } to { } characters. - // Valid characters are a-z, A-Z, 0-9, and : + = @ _ % - (hyphen). The name - // is not case sensitive. - // - // HyperParameterTuningJobName is a required field - HyperParameterTuningJobName *string `min:"1" type:"string" required:"true"` - - // An array of key-value pairs. You can use tags to categorize your AWS resources - // in different ways, for example, by purpose, owner, or environment. For more - // information, see AWS Tagging Strategies (https://aws.amazon.com/answers/account-management/aws-tagging-strategies/). - // - // Tags that you specify for the tuning job are also added to all training jobs - // that the tuning job launches. - Tags []*Tag `type:"list"` - - // The HyperParameterTrainingJobDefinition object that describes the training - // jobs that this tuning job launches, including static hyperparameters, input - // data configuration, output data configuration, resource configuration, and - // stopping condition. - // - // TrainingJobDefinition is a required field - TrainingJobDefinition *HyperParameterTrainingJobDefinition `type:"structure" required:"true"` - - // Specifies the configuration for starting the hyperparameter tuning job using - // one or more previous tuning jobs as a starting point. The results of previous - // tuning jobs are used to inform which combinations of hyperparameters to search - // over in the new tuning job. - // - // All training jobs launched by the new hyperparameter tuning job are evaluated - // by using the objective metric. If you specify IDENTICAL_DATA_AND_ALGORITHM - // as the WarmStartType value for the warm start configuration, the training - // job that performs the best in the new tuning job is compared to the best - // training jobs from the parent tuning jobs. From these, the training job that - // performs the best as measured by the objective metric is returned as the - // overall best training job. - // - // All training jobs launched by parent hyperparameter tuning jobs and the new - // hyperparameter tuning jobs count against the limit of training jobs for the - // tuning job. - WarmStartConfig *HyperParameterTuningJobWarmStartConfig `type:"structure"` -} - -// String returns the string representation -func (s CreateHyperParameterTuningJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateHyperParameterTuningJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateHyperParameterTuningJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateHyperParameterTuningJobInput"} - if s.HyperParameterTuningJobConfig == nil { - invalidParams.Add(request.NewErrParamRequired("HyperParameterTuningJobConfig")) - } - if s.HyperParameterTuningJobName == nil { - invalidParams.Add(request.NewErrParamRequired("HyperParameterTuningJobName")) - } - if s.HyperParameterTuningJobName != nil && len(*s.HyperParameterTuningJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HyperParameterTuningJobName", 1)) - } - if s.TrainingJobDefinition == nil { - invalidParams.Add(request.NewErrParamRequired("TrainingJobDefinition")) - } - if s.HyperParameterTuningJobConfig != nil { - if err := s.HyperParameterTuningJobConfig.Validate(); err != nil { - invalidParams.AddNested("HyperParameterTuningJobConfig", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - if s.TrainingJobDefinition != nil { - if err := s.TrainingJobDefinition.Validate(); err != nil { - invalidParams.AddNested("TrainingJobDefinition", err.(request.ErrInvalidParams)) - } - } - if s.WarmStartConfig != nil { - if err := s.WarmStartConfig.Validate(); err != nil { - invalidParams.AddNested("WarmStartConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHyperParameterTuningJobConfig sets the HyperParameterTuningJobConfig field's value. -func (s *CreateHyperParameterTuningJobInput) SetHyperParameterTuningJobConfig(v *HyperParameterTuningJobConfig) *CreateHyperParameterTuningJobInput { - s.HyperParameterTuningJobConfig = v - return s -} - -// SetHyperParameterTuningJobName sets the HyperParameterTuningJobName field's value. -func (s *CreateHyperParameterTuningJobInput) SetHyperParameterTuningJobName(v string) *CreateHyperParameterTuningJobInput { - s.HyperParameterTuningJobName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateHyperParameterTuningJobInput) SetTags(v []*Tag) *CreateHyperParameterTuningJobInput { - s.Tags = v - return s -} - -// SetTrainingJobDefinition sets the TrainingJobDefinition field's value. -func (s *CreateHyperParameterTuningJobInput) SetTrainingJobDefinition(v *HyperParameterTrainingJobDefinition) *CreateHyperParameterTuningJobInput { - s.TrainingJobDefinition = v - return s -} - -// SetWarmStartConfig sets the WarmStartConfig field's value. -func (s *CreateHyperParameterTuningJobInput) SetWarmStartConfig(v *HyperParameterTuningJobWarmStartConfig) *CreateHyperParameterTuningJobInput { - s.WarmStartConfig = v - return s -} - -type CreateHyperParameterTuningJobOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the tuning job. Amazon SageMaker assigns - // an ARN to a hyperparameter tuning job when you create it. - // - // HyperParameterTuningJobArn is a required field - HyperParameterTuningJobArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateHyperParameterTuningJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateHyperParameterTuningJobOutput) GoString() string { - return s.String() -} - -// SetHyperParameterTuningJobArn sets the HyperParameterTuningJobArn field's value. -func (s *CreateHyperParameterTuningJobOutput) SetHyperParameterTuningJobArn(v string) *CreateHyperParameterTuningJobOutput { - s.HyperParameterTuningJobArn = &v - return s -} - -type CreateLabelingJobInput struct { - _ struct{} `type:"structure"` - - // Configures the information required for human workers to complete a labeling - // task. - // - // HumanTaskConfig is a required field - HumanTaskConfig *HumanTaskConfig `type:"structure" required:"true"` - - // Input data for the labeling job, such as the Amazon S3 location of the data - // objects and the location of the manifest file that describes the data objects. - // - // InputConfig is a required field - InputConfig *LabelingJobInputConfig `type:"structure" required:"true"` - - // The attribute name to use for the label in the output manifest file. This - // is the key for the key/value pair formed with the label that a worker assigns - // to the object. The name can't end with "-metadata". If you are running a - // semantic segmentation labeling job, the attribute name must end with "-ref". - // If you are running any other kind of labeling job, the attribute name must - // not end with "-ref". - // - // LabelAttributeName is a required field - LabelAttributeName *string `min:"1" type:"string" required:"true"` - - // The S3 URL of the file that defines the categories used to label the data - // objects. - // - // The file is a JSON structure in the following format: - // - // { - // - // "document-version": "2018-11-28" - // - // "labels": [ - // - // { - // - // "label": "label 1" - // - // }, - // - // { - // - // "label": "label 2" - // - // }, - // - // ... - // - // { - // - // "label": "label n" - // - // } - // - // ] - // - // } - LabelCategoryConfigS3Uri *string `type:"string"` - - // Configures the information required to perform automated data labeling. - LabelingJobAlgorithmsConfig *LabelingJobAlgorithmsConfig `type:"structure"` - - // The name of the labeling job. This name is used to identify the job in a - // list of labeling jobs. - // - // LabelingJobName is a required field - LabelingJobName *string `min:"1" type:"string" required:"true"` - - // The location of the output data and the AWS Key Management Service key ID - // for the key used to encrypt the output data, if any. - // - // OutputConfig is a required field - OutputConfig *LabelingJobOutputConfig `type:"structure" required:"true"` - - // The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform - // tasks on your behalf during data labeling. You must grant this role the necessary - // permissions so that Amazon SageMaker can successfully complete data labeling. - // - // RoleArn is a required field - RoleArn *string `min:"20" type:"string" required:"true"` - - // A set of conditions for stopping the labeling job. If any of the conditions - // are met, the job is automatically stopped. You can use these conditions to - // control the cost of data labeling. - StoppingConditions *LabelingJobStoppingConditions `type:"structure"` - - // An array of key/value pairs. For more information, see Using Cost Allocation - // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) - // in the AWS Billing and Cost Management User Guide. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreateLabelingJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLabelingJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLabelingJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLabelingJobInput"} - if s.HumanTaskConfig == nil { - invalidParams.Add(request.NewErrParamRequired("HumanTaskConfig")) - } - if s.InputConfig == nil { - invalidParams.Add(request.NewErrParamRequired("InputConfig")) - } - if s.LabelAttributeName == nil { - invalidParams.Add(request.NewErrParamRequired("LabelAttributeName")) - } - if s.LabelAttributeName != nil && len(*s.LabelAttributeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LabelAttributeName", 1)) - } - if s.LabelingJobName == nil { - invalidParams.Add(request.NewErrParamRequired("LabelingJobName")) - } - if s.LabelingJobName != nil && len(*s.LabelingJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LabelingJobName", 1)) - } - if s.OutputConfig == nil { - invalidParams.Add(request.NewErrParamRequired("OutputConfig")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.HumanTaskConfig != nil { - if err := s.HumanTaskConfig.Validate(); err != nil { - invalidParams.AddNested("HumanTaskConfig", err.(request.ErrInvalidParams)) - } - } - if s.InputConfig != nil { - if err := s.InputConfig.Validate(); err != nil { - invalidParams.AddNested("InputConfig", err.(request.ErrInvalidParams)) - } - } - if s.LabelingJobAlgorithmsConfig != nil { - if err := s.LabelingJobAlgorithmsConfig.Validate(); err != nil { - invalidParams.AddNested("LabelingJobAlgorithmsConfig", err.(request.ErrInvalidParams)) - } - } - if s.OutputConfig != nil { - if err := s.OutputConfig.Validate(); err != nil { - invalidParams.AddNested("OutputConfig", err.(request.ErrInvalidParams)) - } - } - if s.StoppingConditions != nil { - if err := s.StoppingConditions.Validate(); err != nil { - invalidParams.AddNested("StoppingConditions", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHumanTaskConfig sets the HumanTaskConfig field's value. -func (s *CreateLabelingJobInput) SetHumanTaskConfig(v *HumanTaskConfig) *CreateLabelingJobInput { - s.HumanTaskConfig = v - return s -} - -// SetInputConfig sets the InputConfig field's value. -func (s *CreateLabelingJobInput) SetInputConfig(v *LabelingJobInputConfig) *CreateLabelingJobInput { - s.InputConfig = v - return s -} - -// SetLabelAttributeName sets the LabelAttributeName field's value. -func (s *CreateLabelingJobInput) SetLabelAttributeName(v string) *CreateLabelingJobInput { - s.LabelAttributeName = &v - return s -} - -// SetLabelCategoryConfigS3Uri sets the LabelCategoryConfigS3Uri field's value. -func (s *CreateLabelingJobInput) SetLabelCategoryConfigS3Uri(v string) *CreateLabelingJobInput { - s.LabelCategoryConfigS3Uri = &v - return s -} - -// SetLabelingJobAlgorithmsConfig sets the LabelingJobAlgorithmsConfig field's value. -func (s *CreateLabelingJobInput) SetLabelingJobAlgorithmsConfig(v *LabelingJobAlgorithmsConfig) *CreateLabelingJobInput { - s.LabelingJobAlgorithmsConfig = v - return s -} - -// SetLabelingJobName sets the LabelingJobName field's value. -func (s *CreateLabelingJobInput) SetLabelingJobName(v string) *CreateLabelingJobInput { - s.LabelingJobName = &v - return s -} - -// SetOutputConfig sets the OutputConfig field's value. -func (s *CreateLabelingJobInput) SetOutputConfig(v *LabelingJobOutputConfig) *CreateLabelingJobInput { - s.OutputConfig = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CreateLabelingJobInput) SetRoleArn(v string) *CreateLabelingJobInput { - s.RoleArn = &v - return s -} - -// SetStoppingConditions sets the StoppingConditions field's value. -func (s *CreateLabelingJobInput) SetStoppingConditions(v *LabelingJobStoppingConditions) *CreateLabelingJobInput { - s.StoppingConditions = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateLabelingJobInput) SetTags(v []*Tag) *CreateLabelingJobInput { - s.Tags = v - return s -} - -type CreateLabelingJobOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the labeling job. You use this ARN to identify - // the labeling job. - // - // LabelingJobArn is a required field - LabelingJobArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateLabelingJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateLabelingJobOutput) GoString() string { - return s.String() -} - -// SetLabelingJobArn sets the LabelingJobArn field's value. -func (s *CreateLabelingJobOutput) SetLabelingJobArn(v string) *CreateLabelingJobOutput { - s.LabelingJobArn = &v - return s -} - -type CreateModelInput struct { - _ struct{} `type:"structure"` - - // Specifies the containers in the inference pipeline. - Containers []*ContainerDefinition `type:"list"` - - // Isolates the model container. No inbound or outbound network calls can be - // made to or from the model container. - // - // The Semantic Segmentation built-in algorithm does not support network isolation. - EnableNetworkIsolation *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker can - // assume to access model artifacts and docker image for deployment on ML compute - // instances or for batch transform jobs. Deploying on ML compute instances - // is part of model hosting. For more information, see Amazon SageMaker Roles - // (http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html). - // - // To be able to pass this role to Amazon SageMaker, the caller of this API - // must have the iam:PassRole permission. - // - // ExecutionRoleArn is a required field - ExecutionRoleArn *string `min:"20" type:"string" required:"true"` - - // The name of the new model. - // - // ModelName is a required field - ModelName *string `type:"string" required:"true"` - - // The location of the primary docker image containing inference code, associated - // artifacts, and custom environment map that the inference code uses when the - // model is deployed for predictions. - PrimaryContainer *ContainerDefinition `type:"structure"` - - // An array of key-value pairs. For more information, see Using Cost Allocation - // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) - // in the AWS Billing and Cost Management User Guide. - Tags []*Tag `type:"list"` - - // A VpcConfig object that specifies the VPC that you want your model to connect - // to. Control access to and from your model container by configuring the VPC. - // VpcConfig is used in hosting services and in batch transform. For more information, - // see Protect Endpoints by Using an Amazon Virtual Private Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html) - // and Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private - // Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/batch-vpc.html). - VpcConfig *VpcConfig `type:"structure"` -} - -// String returns the string representation -func (s CreateModelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateModelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateModelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateModelInput"} - if s.ExecutionRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("ExecutionRoleArn")) - } - if s.ExecutionRoleArn != nil && len(*s.ExecutionRoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleArn", 20)) - } - if s.ModelName == nil { - invalidParams.Add(request.NewErrParamRequired("ModelName")) - } - if s.Containers != nil { - for i, v := range s.Containers { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Containers", i), err.(request.ErrInvalidParams)) - } - } - } - if s.PrimaryContainer != nil { - if err := s.PrimaryContainer.Validate(); err != nil { - invalidParams.AddNested("PrimaryContainer", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - if s.VpcConfig != nil { - if err := s.VpcConfig.Validate(); err != nil { - invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainers sets the Containers field's value. -func (s *CreateModelInput) SetContainers(v []*ContainerDefinition) *CreateModelInput { - s.Containers = v - return s -} - -// SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value. -func (s *CreateModelInput) SetEnableNetworkIsolation(v bool) *CreateModelInput { - s.EnableNetworkIsolation = &v - return s -} - -// SetExecutionRoleArn sets the ExecutionRoleArn field's value. -func (s *CreateModelInput) SetExecutionRoleArn(v string) *CreateModelInput { - s.ExecutionRoleArn = &v - return s -} - -// SetModelName sets the ModelName field's value. -func (s *CreateModelInput) SetModelName(v string) *CreateModelInput { - s.ModelName = &v - return s -} - -// SetPrimaryContainer sets the PrimaryContainer field's value. -func (s *CreateModelInput) SetPrimaryContainer(v *ContainerDefinition) *CreateModelInput { - s.PrimaryContainer = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateModelInput) SetTags(v []*Tag) *CreateModelInput { - s.Tags = v - return s -} - -// SetVpcConfig sets the VpcConfig field's value. -func (s *CreateModelInput) SetVpcConfig(v *VpcConfig) *CreateModelInput { - s.VpcConfig = v - return s -} - -type CreateModelOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the model created in Amazon SageMaker. - // - // ModelArn is a required field - ModelArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateModelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateModelOutput) GoString() string { - return s.String() -} - -// SetModelArn sets the ModelArn field's value. -func (s *CreateModelOutput) SetModelArn(v string) *CreateModelOutput { - s.ModelArn = &v - return s -} - -type CreateModelPackageInput struct { - _ struct{} `type:"structure"` - - // Whether to certify the model package for listing on AWS Marketplace. - CertifyForMarketplace *bool `type:"boolean"` - - // Specifies details about inference jobs that can be run with models based - // on this model package, including the following: - // - // * The Amazon ECR paths of containers that contain the inference code and - // model artifacts. - // - // * The instance types that the model package supports for transform jobs - // and real-time endpoints used for inference. - // - // * The input and output content formats that the model package supports - // for inference. - InferenceSpecification *InferenceSpecification `type:"structure"` - - // A description of the model package. - ModelPackageDescription *string `type:"string"` - - // The name of the model package. The name must have 1 to 63 characters. Valid - // characters are a-z, A-Z, 0-9, and - (hyphen). - // - // ModelPackageName is a required field - ModelPackageName *string `min:"1" type:"string" required:"true"` - - // Details about the algorithm that was used to create the model package. - SourceAlgorithmSpecification *SourceAlgorithmSpecification `type:"structure"` - - // Specifies configurations for one or more transform jobs that Amazon SageMaker - // runs to test the model package. - ValidationSpecification *ModelPackageValidationSpecification `type:"structure"` -} - -// String returns the string representation -func (s CreateModelPackageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateModelPackageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateModelPackageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateModelPackageInput"} - if s.ModelPackageName == nil { - invalidParams.Add(request.NewErrParamRequired("ModelPackageName")) - } - if s.ModelPackageName != nil && len(*s.ModelPackageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ModelPackageName", 1)) - } - if s.InferenceSpecification != nil { - if err := s.InferenceSpecification.Validate(); err != nil { - invalidParams.AddNested("InferenceSpecification", err.(request.ErrInvalidParams)) - } - } - if s.SourceAlgorithmSpecification != nil { - if err := s.SourceAlgorithmSpecification.Validate(); err != nil { - invalidParams.AddNested("SourceAlgorithmSpecification", err.(request.ErrInvalidParams)) - } - } - if s.ValidationSpecification != nil { - if err := s.ValidationSpecification.Validate(); err != nil { - invalidParams.AddNested("ValidationSpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertifyForMarketplace sets the CertifyForMarketplace field's value. -func (s *CreateModelPackageInput) SetCertifyForMarketplace(v bool) *CreateModelPackageInput { - s.CertifyForMarketplace = &v - return s -} - -// SetInferenceSpecification sets the InferenceSpecification field's value. -func (s *CreateModelPackageInput) SetInferenceSpecification(v *InferenceSpecification) *CreateModelPackageInput { - s.InferenceSpecification = v - return s -} - -// SetModelPackageDescription sets the ModelPackageDescription field's value. -func (s *CreateModelPackageInput) SetModelPackageDescription(v string) *CreateModelPackageInput { - s.ModelPackageDescription = &v - return s -} - -// SetModelPackageName sets the ModelPackageName field's value. -func (s *CreateModelPackageInput) SetModelPackageName(v string) *CreateModelPackageInput { - s.ModelPackageName = &v - return s -} - -// SetSourceAlgorithmSpecification sets the SourceAlgorithmSpecification field's value. -func (s *CreateModelPackageInput) SetSourceAlgorithmSpecification(v *SourceAlgorithmSpecification) *CreateModelPackageInput { - s.SourceAlgorithmSpecification = v - return s -} - -// SetValidationSpecification sets the ValidationSpecification field's value. -func (s *CreateModelPackageInput) SetValidationSpecification(v *ModelPackageValidationSpecification) *CreateModelPackageInput { - s.ValidationSpecification = v - return s -} - -type CreateModelPackageOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the new model package. - // - // ModelPackageArn is a required field - ModelPackageArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateModelPackageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateModelPackageOutput) GoString() string { - return s.String() -} - -// SetModelPackageArn sets the ModelPackageArn field's value. -func (s *CreateModelPackageOutput) SetModelPackageArn(v string) *CreateModelPackageOutput { - s.ModelPackageArn = &v - return s -} - -type CreateNotebookInstanceInput struct { - _ struct{} `type:"structure"` - - // A list of Elastic Inference (EI) instance types to associate with this notebook - // instance. Currently, only one instance type can be associated with a notebook - // instance. For more information, see Using Elastic Inference in Amazon SageMaker - // (http://docs.aws.amazon.com/sagemaker/latest/dg/ei.html). - AcceleratorTypes []*string `type:"list"` - - // An array of up to three Git repositories to associate with the notebook instance. - // These can be either the names of Git repositories stored as resources in - // your account, or the URL of Git repositories in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) - // or in any other Git repository. These repositories are cloned at the same - // level as the default repository of your notebook instance. For more information, - // see Associating Git Repositories with Amazon SageMaker Notebook Instances - // (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). - AdditionalCodeRepositories []*string `type:"list"` - - // A Git repository to associate with the notebook instance as its default code - // repository. This can be either the name of a Git repository stored as a resource - // in your account, or the URL of a Git repository in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) - // or in any other Git repository. When you open a notebook instance, it opens - // in the directory that contains this repository. For more information, see - // Associating Git Repositories with Amazon SageMaker Notebook Instances (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). - DefaultCodeRepository *string `min:"1" type:"string"` - - // Sets whether Amazon SageMaker provides internet access to the notebook instance. - // If you set this to Disabled this notebook instance will be able to access - // resources only in your VPC, and will not be able to connect to Amazon SageMaker - // training and endpoint services unless your configure a NAT Gateway in your - // VPC. - // - // For more information, see Notebook Instances Are Internet-Enabled by Default - // (http://docs.aws.amazon.com/sagemaker/latest/dg/appendix-additional-considerations.html#appendix-notebook-and-internet-access). - // You can set the value of this parameter to Disabled only if you set a value - // for the SubnetId parameter. - DirectInternetAccess *string `type:"string" enum:"DirectInternetAccess"` - - // The type of ML compute instance to launch for the notebook instance. - // - // InstanceType is a required field - InstanceType *string `type:"string" required:"true" enum:"InstanceType"` - - // If you provide a AWS KMS key ID, Amazon SageMaker uses it to encrypt data - // at rest on the ML storage volume that is attached to your notebook instance. - // The KMS key you provide must be enabled. For information, see Enabling and - // Disabling Keys (http://docs.aws.amazon.com/kms/latest/developerguide/enabling-keys.html) - // in the AWS Key Management Service Developer Guide. - KmsKeyId *string `type:"string"` - - // The name of a lifecycle configuration to associate with the notebook instance. - // For information about lifestyle configurations, see Step 2.1: (Optional) - // Customize a Notebook Instance (http://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html). - LifecycleConfigName *string `type:"string"` - - // The name of the new notebook instance. - // - // NotebookInstanceName is a required field - NotebookInstanceName *string `type:"string" required:"true"` - - // When you send any requests to AWS resources from the notebook instance, Amazon - // SageMaker assumes this role to perform tasks on your behalf. You must grant - // this role necessary permissions so Amazon SageMaker can perform these tasks. - // The policy must allow the Amazon SageMaker service principal (sagemaker.amazonaws.com) - // permissions to assume this role. For more information, see Amazon SageMaker - // Roles (http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html). - // - // To be able to pass this role to Amazon SageMaker, the caller of this API - // must have the iam:PassRole permission. - // - // RoleArn is a required field - RoleArn *string `min:"20" type:"string" required:"true"` - - // The VPC security group IDs, in the form sg-xxxxxxxx. The security groups - // must be for the same VPC as specified in the subnet. - SecurityGroupIds []*string `type:"list"` - - // The ID of the subnet in a VPC to which you would like to have a connectivity - // from your ML compute instance. - SubnetId *string `type:"string"` - - // A list of tags to associate with the notebook instance. You can add tags - // later by using the CreateTags API. - Tags []*Tag `type:"list"` - - // The size, in GB, of the ML storage volume to attach to the notebook instance. - // The default value is 5 GB. - VolumeSizeInGB *int64 `min:"5" type:"integer"` -} - -// String returns the string representation -func (s CreateNotebookInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNotebookInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNotebookInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNotebookInstanceInput"} - if s.DefaultCodeRepository != nil && len(*s.DefaultCodeRepository) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DefaultCodeRepository", 1)) - } - if s.InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceType")) - } - if s.NotebookInstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("NotebookInstanceName")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.VolumeSizeInGB != nil && *s.VolumeSizeInGB < 5 { - invalidParams.Add(request.NewErrParamMinValue("VolumeSizeInGB", 5)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceleratorTypes sets the AcceleratorTypes field's value. -func (s *CreateNotebookInstanceInput) SetAcceleratorTypes(v []*string) *CreateNotebookInstanceInput { - s.AcceleratorTypes = v - return s -} - -// SetAdditionalCodeRepositories sets the AdditionalCodeRepositories field's value. -func (s *CreateNotebookInstanceInput) SetAdditionalCodeRepositories(v []*string) *CreateNotebookInstanceInput { - s.AdditionalCodeRepositories = v - return s -} - -// SetDefaultCodeRepository sets the DefaultCodeRepository field's value. -func (s *CreateNotebookInstanceInput) SetDefaultCodeRepository(v string) *CreateNotebookInstanceInput { - s.DefaultCodeRepository = &v - return s -} - -// SetDirectInternetAccess sets the DirectInternetAccess field's value. -func (s *CreateNotebookInstanceInput) SetDirectInternetAccess(v string) *CreateNotebookInstanceInput { - s.DirectInternetAccess = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *CreateNotebookInstanceInput) SetInstanceType(v string) *CreateNotebookInstanceInput { - s.InstanceType = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateNotebookInstanceInput) SetKmsKeyId(v string) *CreateNotebookInstanceInput { - s.KmsKeyId = &v - return s -} - -// SetLifecycleConfigName sets the LifecycleConfigName field's value. -func (s *CreateNotebookInstanceInput) SetLifecycleConfigName(v string) *CreateNotebookInstanceInput { - s.LifecycleConfigName = &v - return s -} - -// SetNotebookInstanceName sets the NotebookInstanceName field's value. -func (s *CreateNotebookInstanceInput) SetNotebookInstanceName(v string) *CreateNotebookInstanceInput { - s.NotebookInstanceName = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CreateNotebookInstanceInput) SetRoleArn(v string) *CreateNotebookInstanceInput { - s.RoleArn = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *CreateNotebookInstanceInput) SetSecurityGroupIds(v []*string) *CreateNotebookInstanceInput { - s.SecurityGroupIds = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *CreateNotebookInstanceInput) SetSubnetId(v string) *CreateNotebookInstanceInput { - s.SubnetId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateNotebookInstanceInput) SetTags(v []*Tag) *CreateNotebookInstanceInput { - s.Tags = v - return s -} - -// SetVolumeSizeInGB sets the VolumeSizeInGB field's value. -func (s *CreateNotebookInstanceInput) SetVolumeSizeInGB(v int64) *CreateNotebookInstanceInput { - s.VolumeSizeInGB = &v - return s -} - -type CreateNotebookInstanceLifecycleConfigInput struct { - _ struct{} `type:"structure"` - - // The name of the lifecycle configuration. - // - // NotebookInstanceLifecycleConfigName is a required field - NotebookInstanceLifecycleConfigName *string `type:"string" required:"true"` - - // A shell script that runs only once, when you create a notebook instance. - // The shell script must be a base64-encoded string. - OnCreate []*NotebookInstanceLifecycleHook `type:"list"` - - // A shell script that runs every time you start a notebook instance, including - // when you create the notebook instance. The shell script must be a base64-encoded - // string. - OnStart []*NotebookInstanceLifecycleHook `type:"list"` -} - -// String returns the string representation -func (s CreateNotebookInstanceLifecycleConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNotebookInstanceLifecycleConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNotebookInstanceLifecycleConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNotebookInstanceLifecycleConfigInput"} - if s.NotebookInstanceLifecycleConfigName == nil { - invalidParams.Add(request.NewErrParamRequired("NotebookInstanceLifecycleConfigName")) - } - if s.OnCreate != nil { - for i, v := range s.OnCreate { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OnCreate", i), err.(request.ErrInvalidParams)) - } - } - } - if s.OnStart != nil { - for i, v := range s.OnStart { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OnStart", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. -func (s *CreateNotebookInstanceLifecycleConfigInput) SetNotebookInstanceLifecycleConfigName(v string) *CreateNotebookInstanceLifecycleConfigInput { - s.NotebookInstanceLifecycleConfigName = &v - return s -} - -// SetOnCreate sets the OnCreate field's value. -func (s *CreateNotebookInstanceLifecycleConfigInput) SetOnCreate(v []*NotebookInstanceLifecycleHook) *CreateNotebookInstanceLifecycleConfigInput { - s.OnCreate = v - return s -} - -// SetOnStart sets the OnStart field's value. -func (s *CreateNotebookInstanceLifecycleConfigInput) SetOnStart(v []*NotebookInstanceLifecycleHook) *CreateNotebookInstanceLifecycleConfigInput { - s.OnStart = v - return s -} - -type CreateNotebookInstanceLifecycleConfigOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the lifecycle configuration. - NotebookInstanceLifecycleConfigArn *string `type:"string"` -} - -// String returns the string representation -func (s CreateNotebookInstanceLifecycleConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNotebookInstanceLifecycleConfigOutput) GoString() string { - return s.String() -} - -// SetNotebookInstanceLifecycleConfigArn sets the NotebookInstanceLifecycleConfigArn field's value. -func (s *CreateNotebookInstanceLifecycleConfigOutput) SetNotebookInstanceLifecycleConfigArn(v string) *CreateNotebookInstanceLifecycleConfigOutput { - s.NotebookInstanceLifecycleConfigArn = &v - return s -} - -type CreateNotebookInstanceOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the notebook instance. - NotebookInstanceArn *string `type:"string"` -} - -// String returns the string representation -func (s CreateNotebookInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNotebookInstanceOutput) GoString() string { - return s.String() -} - -// SetNotebookInstanceArn sets the NotebookInstanceArn field's value. -func (s *CreateNotebookInstanceOutput) SetNotebookInstanceArn(v string) *CreateNotebookInstanceOutput { - s.NotebookInstanceArn = &v - return s -} - -type CreatePresignedNotebookInstanceUrlInput struct { - _ struct{} `type:"structure"` - - // The name of the notebook instance. - // - // NotebookInstanceName is a required field - NotebookInstanceName *string `type:"string" required:"true"` - - // The duration of the session, in seconds. The default is 12 hours. - SessionExpirationDurationInSeconds *int64 `min:"1800" type:"integer"` -} - -// String returns the string representation -func (s CreatePresignedNotebookInstanceUrlInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePresignedNotebookInstanceUrlInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePresignedNotebookInstanceUrlInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePresignedNotebookInstanceUrlInput"} - if s.NotebookInstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("NotebookInstanceName")) - } - if s.SessionExpirationDurationInSeconds != nil && *s.SessionExpirationDurationInSeconds < 1800 { - invalidParams.Add(request.NewErrParamMinValue("SessionExpirationDurationInSeconds", 1800)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNotebookInstanceName sets the NotebookInstanceName field's value. -func (s *CreatePresignedNotebookInstanceUrlInput) SetNotebookInstanceName(v string) *CreatePresignedNotebookInstanceUrlInput { - s.NotebookInstanceName = &v - return s -} - -// SetSessionExpirationDurationInSeconds sets the SessionExpirationDurationInSeconds field's value. -func (s *CreatePresignedNotebookInstanceUrlInput) SetSessionExpirationDurationInSeconds(v int64) *CreatePresignedNotebookInstanceUrlInput { - s.SessionExpirationDurationInSeconds = &v - return s -} - -type CreatePresignedNotebookInstanceUrlOutput struct { - _ struct{} `type:"structure"` - - // A JSON object that contains the URL string. - AuthorizedUrl *string `type:"string"` -} - -// String returns the string representation -func (s CreatePresignedNotebookInstanceUrlOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePresignedNotebookInstanceUrlOutput) GoString() string { - return s.String() -} - -// SetAuthorizedUrl sets the AuthorizedUrl field's value. -func (s *CreatePresignedNotebookInstanceUrlOutput) SetAuthorizedUrl(v string) *CreatePresignedNotebookInstanceUrlOutput { - s.AuthorizedUrl = &v - return s -} - -type CreateTrainingJobInput struct { - _ struct{} `type:"structure"` - - // The registry path of the Docker image that contains the training algorithm - // and algorithm-specific metadata, including the input mode. For more information - // about algorithms provided by Amazon SageMaker, see Algorithms (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). - // For information about providing your own algorithms, see Using Your Own Algorithms - // with Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html). - // - // AlgorithmSpecification is a required field - AlgorithmSpecification *AlgorithmSpecification `type:"structure" required:"true"` - - // To encrypt all communications between ML compute instances in distributed - // training, choose True,. Encryption provides greater security for distributed - // training, but training can take longer because of additional communications - // between ML compute instances. - EnableInterContainerTrafficEncryption *bool `type:"boolean"` - - // Isolates the training container. No inbound or outbound network calls can - // be made, except for calls between peers within a training cluster for distributed - // training. If you enable network isolation for training jobs that are configured - // to use a VPC, Amazon SageMaker downloads and uploads customer data and model - // artifacts through the specified VPC, but the training container does not - // have network access. - // - // The Semantic Segmentation built-in algorithm does not support network isolation. - EnableNetworkIsolation *bool `type:"boolean"` - - // Algorithm-specific parameters that influence the quality of the model. You - // set hyperparameters before you start the learning process. For a list of - // hyperparameters for each training algorithm provided by Amazon SageMaker, - // see Algorithms (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). - // - // You can specify a maximum of 100 hyperparameters. Each hyperparameter is - // a key-value pair. Each key and value is limited to 256 characters, as specified - // by the Length Constraint. - HyperParameters map[string]*string `type:"map"` - - // An array of Channel objects. Each channel is a named input source. InputDataConfig - // describes the input data and its location. - // - // Algorithms can accept input data from one or more channels. For example, - // an algorithm might have two channels of input data, training_data and validation_data. - // The configuration for each channel provides the S3 location where the input - // data is stored. It also provides information about the stored data: the MIME - // type, compression method, and whether the data is wrapped in RecordIO format. - // - // Depending on the input mode that the algorithm supports, Amazon SageMaker - // either copies input data files from an S3 bucket to a local directory in - // the Docker container, or makes it available as input streams. - InputDataConfig []*Channel `min:"1" type:"list"` - - // Specifies the path to the S3 bucket where you want to store model artifacts. - // Amazon SageMaker creates subfolders for the artifacts. - // - // OutputDataConfig is a required field - OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` - - // The resources, including the ML compute instances and ML storage volumes, - // to use for model training. - // - // ML storage volumes store model artifacts and incremental states. Training - // algorithms might also use ML storage volumes for scratch space. If you want - // Amazon SageMaker to use the ML storage volume to store the training data, - // choose File as the TrainingInputMode in the algorithm specification. For - // distributed training algorithms, specify an instance count greater than 1. - // - // ResourceConfig is a required field - ResourceConfig *ResourceConfig `type:"structure" required:"true"` - - // The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume - // to perform tasks on your behalf. - // - // During model training, Amazon SageMaker needs your permission to read input - // data from an S3 bucket, download a Docker image that contains training code, - // write model artifacts to an S3 bucket, write logs to Amazon CloudWatch Logs, - // and publish metrics to Amazon CloudWatch. You grant permissions for all of - // these tasks to an IAM role. For more information, see Amazon SageMaker Roles - // (http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html). - // - // To be able to pass this role to Amazon SageMaker, the caller of this API - // must have the iam:PassRole permission. - // - // RoleArn is a required field - RoleArn *string `min:"20" type:"string" required:"true"` - - // Sets a duration for training. Use this parameter to cap model training costs. - // To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal, which - // delays job termination for 120 seconds. Algorithms might use this 120-second - // window to save the model artifacts. - // - // When Amazon SageMaker terminates a job because the stopping condition has - // been met, training algorithms provided by Amazon SageMaker save the intermediate - // results of the job. This intermediate data is a valid model artifact. You - // can use it to create a model using the CreateModel API. - // - // StoppingCondition is a required field - StoppingCondition *StoppingCondition `type:"structure" required:"true"` - - // An array of key-value pairs. For more information, see Using Cost Allocation - // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) - // in the AWS Billing and Cost Management User Guide. - Tags []*Tag `type:"list"` - - // The name of the training job. The name must be unique within an AWS Region - // in an AWS account. - // - // TrainingJobName is a required field - TrainingJobName *string `min:"1" type:"string" required:"true"` - - // A VpcConfig object that specifies the VPC that you want your training job - // to connect to. Control access to and from your training container by configuring - // the VPC. For more information, see Protect Training Jobs by Using an Amazon - // Virtual Private Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html). - VpcConfig *VpcConfig `type:"structure"` -} - -// String returns the string representation -func (s CreateTrainingJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTrainingJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTrainingJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTrainingJobInput"} - if s.AlgorithmSpecification == nil { - invalidParams.Add(request.NewErrParamRequired("AlgorithmSpecification")) - } - if s.InputDataConfig != nil && len(s.InputDataConfig) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputDataConfig", 1)) - } - if s.OutputDataConfig == nil { - invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) - } - if s.ResourceConfig == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceConfig")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.StoppingCondition == nil { - invalidParams.Add(request.NewErrParamRequired("StoppingCondition")) - } - if s.TrainingJobName == nil { - invalidParams.Add(request.NewErrParamRequired("TrainingJobName")) - } - if s.TrainingJobName != nil && len(*s.TrainingJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TrainingJobName", 1)) - } - if s.AlgorithmSpecification != nil { - if err := s.AlgorithmSpecification.Validate(); err != nil { - invalidParams.AddNested("AlgorithmSpecification", err.(request.ErrInvalidParams)) - } - } - if s.InputDataConfig != nil { - for i, v := range s.InputDataConfig { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputDataConfig", i), err.(request.ErrInvalidParams)) - } - } - } - if s.OutputDataConfig != nil { - if err := s.OutputDataConfig.Validate(); err != nil { - invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) - } - } - if s.ResourceConfig != nil { - if err := s.ResourceConfig.Validate(); err != nil { - invalidParams.AddNested("ResourceConfig", err.(request.ErrInvalidParams)) - } - } - if s.StoppingCondition != nil { - if err := s.StoppingCondition.Validate(); err != nil { - invalidParams.AddNested("StoppingCondition", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - if s.VpcConfig != nil { - if err := s.VpcConfig.Validate(); err != nil { - invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlgorithmSpecification sets the AlgorithmSpecification field's value. -func (s *CreateTrainingJobInput) SetAlgorithmSpecification(v *AlgorithmSpecification) *CreateTrainingJobInput { - s.AlgorithmSpecification = v - return s -} - -// SetEnableInterContainerTrafficEncryption sets the EnableInterContainerTrafficEncryption field's value. -func (s *CreateTrainingJobInput) SetEnableInterContainerTrafficEncryption(v bool) *CreateTrainingJobInput { - s.EnableInterContainerTrafficEncryption = &v - return s -} - -// SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value. -func (s *CreateTrainingJobInput) SetEnableNetworkIsolation(v bool) *CreateTrainingJobInput { - s.EnableNetworkIsolation = &v - return s -} - -// SetHyperParameters sets the HyperParameters field's value. -func (s *CreateTrainingJobInput) SetHyperParameters(v map[string]*string) *CreateTrainingJobInput { - s.HyperParameters = v - return s -} - -// SetInputDataConfig sets the InputDataConfig field's value. -func (s *CreateTrainingJobInput) SetInputDataConfig(v []*Channel) *CreateTrainingJobInput { - s.InputDataConfig = v - return s -} - -// SetOutputDataConfig sets the OutputDataConfig field's value. -func (s *CreateTrainingJobInput) SetOutputDataConfig(v *OutputDataConfig) *CreateTrainingJobInput { - s.OutputDataConfig = v - return s -} - -// SetResourceConfig sets the ResourceConfig field's value. -func (s *CreateTrainingJobInput) SetResourceConfig(v *ResourceConfig) *CreateTrainingJobInput { - s.ResourceConfig = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CreateTrainingJobInput) SetRoleArn(v string) *CreateTrainingJobInput { - s.RoleArn = &v - return s -} - -// SetStoppingCondition sets the StoppingCondition field's value. -func (s *CreateTrainingJobInput) SetStoppingCondition(v *StoppingCondition) *CreateTrainingJobInput { - s.StoppingCondition = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateTrainingJobInput) SetTags(v []*Tag) *CreateTrainingJobInput { - s.Tags = v - return s -} - -// SetTrainingJobName sets the TrainingJobName field's value. -func (s *CreateTrainingJobInput) SetTrainingJobName(v string) *CreateTrainingJobInput { - s.TrainingJobName = &v - return s -} - -// SetVpcConfig sets the VpcConfig field's value. -func (s *CreateTrainingJobInput) SetVpcConfig(v *VpcConfig) *CreateTrainingJobInput { - s.VpcConfig = v - return s -} - -type CreateTrainingJobOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the training job. - // - // TrainingJobArn is a required field - TrainingJobArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateTrainingJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTrainingJobOutput) GoString() string { - return s.String() -} - -// SetTrainingJobArn sets the TrainingJobArn field's value. -func (s *CreateTrainingJobOutput) SetTrainingJobArn(v string) *CreateTrainingJobOutput { - s.TrainingJobArn = &v - return s -} - -type CreateTransformJobInput struct { - _ struct{} `type:"structure"` - - // Determines the number of records to include in a mini-batch. If you want - // to include only one record in a mini-batch, specify SingleRecord.. If you - // want mini-batches to contain a maximum of the number of records specified - // in the MaxPayloadInMB parameter, specify MultiRecord. - // - // If you set SplitType to Line and BatchStrategy to MultiRecord, a batch transform - // automatically splits your input data into the specified payload size. There's - // no need to split the dataset into smaller files or to use larger payload - // sizes unless the records in your dataset are very large. - BatchStrategy *string `type:"string" enum:"BatchStrategy"` - - // The environment variables to set in the Docker container. We support up to - // 16 key and values entries in the map. - Environment map[string]*string `type:"map"` - - // The maximum number of parallel requests that can be sent to an algorithm - // container on an instance. This is good for algorithms that implement multiple - // workers on larger instances . The default value is 1. To allow Amazon SageMaker - // to determine the appropriate number for MaxConcurrentTransforms, do not set - // the value in the API. - MaxConcurrentTransforms *int64 `type:"integer"` - - // The maximum payload size allowed, in MB. A payload is the data portion of - // a record (without metadata). The value in MaxPayloadInMB must be greater - // or equal to the size of a single record. You can approximate the size of - // a record by dividing the size of your dataset by the number of records. Then - // multiply this value by the number of records you want in a mini-batch. We - // recommend to enter a slightly larger value than this to ensure the records - // fit within the maximum payload size. The default value is 6 MB. - // - // For cases where the payload might be arbitrarily large and is transmitted - // using HTTP chunked encoding, set the value to 0. This feature only works - // in supported algorithms. Currently, Amazon SageMaker built-in algorithms - // do not support this feature. - MaxPayloadInMB *int64 `type:"integer"` - - // The name of the model that you want to use for the transform job. ModelName - // must be the name of an existing Amazon SageMaker model within an AWS Region - // in an AWS account. - // - // ModelName is a required field - ModelName *string `type:"string" required:"true"` - - // (Optional) An array of key-value pairs. For more information, see Using Cost - // Allocation Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) - // in the AWS Billing and Cost Management User Guide. - Tags []*Tag `type:"list"` - - // Describes the input source and the way the transform job consumes it. - // - // TransformInput is a required field - TransformInput *TransformInput `type:"structure" required:"true"` - - // The name of the transform job. The name must be unique within an AWS Region - // in an AWS account. - // - // TransformJobName is a required field - TransformJobName *string `min:"1" type:"string" required:"true"` - - // Describes the results of the transform job. - // - // TransformOutput is a required field - TransformOutput *TransformOutput `type:"structure" required:"true"` - - // Describes the resources, including ML instance types and ML instance count, - // to use for the transform job. - // - // TransformResources is a required field - TransformResources *TransformResources `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateTransformJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTransformJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTransformJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTransformJobInput"} - if s.ModelName == nil { - invalidParams.Add(request.NewErrParamRequired("ModelName")) - } - if s.TransformInput == nil { - invalidParams.Add(request.NewErrParamRequired("TransformInput")) - } - if s.TransformJobName == nil { - invalidParams.Add(request.NewErrParamRequired("TransformJobName")) - } - if s.TransformJobName != nil && len(*s.TransformJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TransformJobName", 1)) - } - if s.TransformOutput == nil { - invalidParams.Add(request.NewErrParamRequired("TransformOutput")) - } - if s.TransformResources == nil { - invalidParams.Add(request.NewErrParamRequired("TransformResources")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - if s.TransformInput != nil { - if err := s.TransformInput.Validate(); err != nil { - invalidParams.AddNested("TransformInput", err.(request.ErrInvalidParams)) - } - } - if s.TransformOutput != nil { - if err := s.TransformOutput.Validate(); err != nil { - invalidParams.AddNested("TransformOutput", err.(request.ErrInvalidParams)) - } - } - if s.TransformResources != nil { - if err := s.TransformResources.Validate(); err != nil { - invalidParams.AddNested("TransformResources", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBatchStrategy sets the BatchStrategy field's value. -func (s *CreateTransformJobInput) SetBatchStrategy(v string) *CreateTransformJobInput { - s.BatchStrategy = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *CreateTransformJobInput) SetEnvironment(v map[string]*string) *CreateTransformJobInput { - s.Environment = v - return s -} - -// SetMaxConcurrentTransforms sets the MaxConcurrentTransforms field's value. -func (s *CreateTransformJobInput) SetMaxConcurrentTransforms(v int64) *CreateTransformJobInput { - s.MaxConcurrentTransforms = &v - return s -} - -// SetMaxPayloadInMB sets the MaxPayloadInMB field's value. -func (s *CreateTransformJobInput) SetMaxPayloadInMB(v int64) *CreateTransformJobInput { - s.MaxPayloadInMB = &v - return s -} - -// SetModelName sets the ModelName field's value. -func (s *CreateTransformJobInput) SetModelName(v string) *CreateTransformJobInput { - s.ModelName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateTransformJobInput) SetTags(v []*Tag) *CreateTransformJobInput { - s.Tags = v - return s -} - -// SetTransformInput sets the TransformInput field's value. -func (s *CreateTransformJobInput) SetTransformInput(v *TransformInput) *CreateTransformJobInput { - s.TransformInput = v - return s -} - -// SetTransformJobName sets the TransformJobName field's value. -func (s *CreateTransformJobInput) SetTransformJobName(v string) *CreateTransformJobInput { - s.TransformJobName = &v - return s -} - -// SetTransformOutput sets the TransformOutput field's value. -func (s *CreateTransformJobInput) SetTransformOutput(v *TransformOutput) *CreateTransformJobInput { - s.TransformOutput = v - return s -} - -// SetTransformResources sets the TransformResources field's value. -func (s *CreateTransformJobInput) SetTransformResources(v *TransformResources) *CreateTransformJobInput { - s.TransformResources = v - return s -} - -type CreateTransformJobOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the transform job. - // - // TransformJobArn is a required field - TransformJobArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateTransformJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTransformJobOutput) GoString() string { - return s.String() -} - -// SetTransformJobArn sets the TransformJobArn field's value. -func (s *CreateTransformJobOutput) SetTransformJobArn(v string) *CreateTransformJobOutput { - s.TransformJobArn = &v - return s -} - -type CreateWorkteamInput struct { - _ struct{} `type:"structure"` - - // A description of the work team. - // - // Description is a required field - Description *string `min:"1" type:"string" required:"true"` - - // A list of MemberDefinition objects that contains objects that identify the - // Amazon Cognito user pool that makes up the work team. For more information, - // see Amazon Cognito User Pools (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html). - // - // All of the CognitoMemberDefinition objects that make up the member definition - // must have the same ClientId and UserPool values. - // - // MemberDefinitions is a required field - MemberDefinitions []*MemberDefinition `min:"1" type:"list" required:"true"` - - Tags []*Tag `type:"list"` - - // The name of the work team. Use this name to identify the work team. - // - // WorkteamName is a required field - WorkteamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateWorkteamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateWorkteamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateWorkteamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateWorkteamInput"} - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.MemberDefinitions == nil { - invalidParams.Add(request.NewErrParamRequired("MemberDefinitions")) - } - if s.MemberDefinitions != nil && len(s.MemberDefinitions) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MemberDefinitions", 1)) - } - if s.WorkteamName == nil { - invalidParams.Add(request.NewErrParamRequired("WorkteamName")) - } - if s.WorkteamName != nil && len(*s.WorkteamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkteamName", 1)) - } - if s.MemberDefinitions != nil { - for i, v := range s.MemberDefinitions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MemberDefinitions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreateWorkteamInput) SetDescription(v string) *CreateWorkteamInput { - s.Description = &v - return s -} - -// SetMemberDefinitions sets the MemberDefinitions field's value. -func (s *CreateWorkteamInput) SetMemberDefinitions(v []*MemberDefinition) *CreateWorkteamInput { - s.MemberDefinitions = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateWorkteamInput) SetTags(v []*Tag) *CreateWorkteamInput { - s.Tags = v - return s -} - -// SetWorkteamName sets the WorkteamName field's value. -func (s *CreateWorkteamInput) SetWorkteamName(v string) *CreateWorkteamInput { - s.WorkteamName = &v - return s -} - -type CreateWorkteamOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the work team. You can use this ARN to - // identify the work team. - WorkteamArn *string `type:"string"` -} - -// String returns the string representation -func (s CreateWorkteamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateWorkteamOutput) GoString() string { - return s.String() -} - -// SetWorkteamArn sets the WorkteamArn field's value. -func (s *CreateWorkteamOutput) SetWorkteamArn(v string) *CreateWorkteamOutput { - s.WorkteamArn = &v - return s -} - -// Describes the location of the channel data. -type DataSource struct { - _ struct{} `type:"structure"` - - // The S3 location of the data source that is associated with a channel. - // - // S3DataSource is a required field - S3DataSource *S3DataSource `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DataSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DataSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DataSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DataSource"} - 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 *DataSource) SetS3DataSource(v *S3DataSource) *DataSource { - s.S3DataSource = v - return s -} - -type DeleteAlgorithmInput struct { - _ struct{} `type:"structure"` - - // The name of the algorithm to delete. - // - // AlgorithmName is a required field - AlgorithmName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAlgorithmInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAlgorithmInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAlgorithmInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAlgorithmInput"} - if s.AlgorithmName == nil { - invalidParams.Add(request.NewErrParamRequired("AlgorithmName")) - } - if s.AlgorithmName != nil && len(*s.AlgorithmName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AlgorithmName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlgorithmName sets the AlgorithmName field's value. -func (s *DeleteAlgorithmInput) SetAlgorithmName(v string) *DeleteAlgorithmInput { - s.AlgorithmName = &v - return s -} - -type DeleteAlgorithmOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAlgorithmOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAlgorithmOutput) GoString() string { - return s.String() -} - -type DeleteCodeRepositoryInput struct { - _ struct{} `type:"structure"` - - // The name of the Git repository to delete. - // - // CodeRepositoryName is a required field - CodeRepositoryName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteCodeRepositoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCodeRepositoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCodeRepositoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCodeRepositoryInput"} - if s.CodeRepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("CodeRepositoryName")) - } - if s.CodeRepositoryName != nil && len(*s.CodeRepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CodeRepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCodeRepositoryName sets the CodeRepositoryName field's value. -func (s *DeleteCodeRepositoryInput) SetCodeRepositoryName(v string) *DeleteCodeRepositoryInput { - s.CodeRepositoryName = &v - return s -} - -type DeleteCodeRepositoryOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCodeRepositoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCodeRepositoryOutput) GoString() string { - return s.String() -} - -type DeleteEndpointConfigInput struct { - _ struct{} `type:"structure"` - - // The name of the endpoint configuration that you want to delete. - // - // EndpointConfigName is a required field - EndpointConfigName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEndpointConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEndpointConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEndpointConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointConfigInput"} - if s.EndpointConfigName == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointConfigName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointConfigName sets the EndpointConfigName field's value. -func (s *DeleteEndpointConfigInput) SetEndpointConfigName(v string) *DeleteEndpointConfigInput { - s.EndpointConfigName = &v - return s -} - -type DeleteEndpointConfigOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteEndpointConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEndpointConfigOutput) GoString() string { - return s.String() -} - -type DeleteEndpointInput struct { - _ struct{} `type:"structure"` - - // The name of the endpoint that you want to delete. - // - // EndpointName is a required field - EndpointName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointInput"} - if s.EndpointName == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointName sets the EndpointName field's value. -func (s *DeleteEndpointInput) SetEndpointName(v string) *DeleteEndpointInput { - s.EndpointName = &v - return s -} - -type DeleteEndpointOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEndpointOutput) GoString() string { - return s.String() -} - -type DeleteModelInput struct { - _ struct{} `type:"structure"` - - // The name of the model to delete. - // - // ModelName is a required field - ModelName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteModelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteModelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteModelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteModelInput"} - if s.ModelName == nil { - invalidParams.Add(request.NewErrParamRequired("ModelName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetModelName sets the ModelName field's value. -func (s *DeleteModelInput) SetModelName(v string) *DeleteModelInput { - s.ModelName = &v - return s -} - -type DeleteModelOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteModelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteModelOutput) GoString() string { - return s.String() -} - -type DeleteModelPackageInput struct { - _ struct{} `type:"structure"` - - // The name of the model package. The name must have 1 to 63 characters. Valid - // characters are a-z, A-Z, 0-9, and - (hyphen). - // - // ModelPackageName is a required field - ModelPackageName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteModelPackageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteModelPackageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteModelPackageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteModelPackageInput"} - if s.ModelPackageName == nil { - invalidParams.Add(request.NewErrParamRequired("ModelPackageName")) - } - if s.ModelPackageName != nil && len(*s.ModelPackageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ModelPackageName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetModelPackageName sets the ModelPackageName field's value. -func (s *DeleteModelPackageInput) SetModelPackageName(v string) *DeleteModelPackageInput { - s.ModelPackageName = &v - return s -} - -type DeleteModelPackageOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteModelPackageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteModelPackageOutput) GoString() string { - return s.String() -} - -type DeleteNotebookInstanceInput struct { - _ struct{} `type:"structure"` - - // The name of the Amazon SageMaker notebook instance to delete. - // - // NotebookInstanceName is a required field - NotebookInstanceName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteNotebookInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNotebookInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNotebookInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNotebookInstanceInput"} - if s.NotebookInstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("NotebookInstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNotebookInstanceName sets the NotebookInstanceName field's value. -func (s *DeleteNotebookInstanceInput) SetNotebookInstanceName(v string) *DeleteNotebookInstanceInput { - s.NotebookInstanceName = &v - return s -} - -type DeleteNotebookInstanceLifecycleConfigInput struct { - _ struct{} `type:"structure"` - - // The name of the lifecycle configuration to delete. - // - // NotebookInstanceLifecycleConfigName is a required field - NotebookInstanceLifecycleConfigName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteNotebookInstanceLifecycleConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNotebookInstanceLifecycleConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNotebookInstanceLifecycleConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNotebookInstanceLifecycleConfigInput"} - if s.NotebookInstanceLifecycleConfigName == nil { - invalidParams.Add(request.NewErrParamRequired("NotebookInstanceLifecycleConfigName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. -func (s *DeleteNotebookInstanceLifecycleConfigInput) SetNotebookInstanceLifecycleConfigName(v string) *DeleteNotebookInstanceLifecycleConfigInput { - s.NotebookInstanceLifecycleConfigName = &v - return s -} - -type DeleteNotebookInstanceLifecycleConfigOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteNotebookInstanceLifecycleConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNotebookInstanceLifecycleConfigOutput) GoString() string { - return s.String() -} - -type DeleteNotebookInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteNotebookInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNotebookInstanceOutput) GoString() string { - return s.String() -} - -type DeleteTagsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource whose tags you want to delete. - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` - - // An array or one or more tag keys to delete. - // - // TagKeys is a required field - TagKeys []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - if s.TagKeys != nil && len(s.TagKeys) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *DeleteTagsInput) SetResourceArn(v string) *DeleteTagsInput { - s.ResourceArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput { - s.TagKeys = v - return s -} - -type DeleteTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagsOutput) GoString() string { - return s.String() -} - -type DeleteWorkteamInput struct { - _ struct{} `type:"structure"` - - // The name of the work team to delete. - // - // WorkteamName is a required field - WorkteamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteWorkteamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteWorkteamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteWorkteamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteWorkteamInput"} - if s.WorkteamName == nil { - invalidParams.Add(request.NewErrParamRequired("WorkteamName")) - } - if s.WorkteamName != nil && len(*s.WorkteamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkteamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWorkteamName sets the WorkteamName field's value. -func (s *DeleteWorkteamInput) SetWorkteamName(v string) *DeleteWorkteamInput { - s.WorkteamName = &v - return s -} - -type DeleteWorkteamOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the work team was successfully deleted; otherwise, returns - // false. - // - // Success is a required field - Success *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s DeleteWorkteamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteWorkteamOutput) GoString() string { - return s.String() -} - -// SetSuccess sets the Success field's value. -func (s *DeleteWorkteamOutput) SetSuccess(v bool) *DeleteWorkteamOutput { - s.Success = &v - return s -} - -// Gets the Amazon EC2 Container Registry path of the docker image of the model -// that is hosted in this ProductionVariant. -// -// If you used the registry/repository[:tag] form to specify the image path -// of the primary container when you created the model hosted in this ProductionVariant, -// the path resolves to a path of the form registry/repository[@digest]. A digest -// is a hash value that identifies a specific version of an image. For information -// about Amazon ECR paths, see Pulling an Image (http://docs.aws.amazon.com//AmazonECR/latest/userguide/docker-pull-ecr-image.html) -// in the Amazon ECR User Guide. -type DeployedImage struct { - _ struct{} `type:"structure"` - - // The date and time when the image path for the model resolved to the ResolvedImage - ResolutionTime *time.Time `type:"timestamp"` - - // The specific digest path of the image hosted in this ProductionVariant. - ResolvedImage *string `type:"string"` - - // The image path you specified when you created the model. - SpecifiedImage *string `type:"string"` -} - -// String returns the string representation -func (s DeployedImage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeployedImage) GoString() string { - return s.String() -} - -// SetResolutionTime sets the ResolutionTime field's value. -func (s *DeployedImage) SetResolutionTime(v time.Time) *DeployedImage { - s.ResolutionTime = &v - return s -} - -// SetResolvedImage sets the ResolvedImage field's value. -func (s *DeployedImage) SetResolvedImage(v string) *DeployedImage { - s.ResolvedImage = &v - return s -} - -// SetSpecifiedImage sets the SpecifiedImage field's value. -func (s *DeployedImage) SetSpecifiedImage(v string) *DeployedImage { - s.SpecifiedImage = &v - return s -} - -type DescribeAlgorithmInput struct { - _ struct{} `type:"structure"` - - // The name of the algorithm to describe. - // - // AlgorithmName is a required field - AlgorithmName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeAlgorithmInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAlgorithmInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAlgorithmInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAlgorithmInput"} - if s.AlgorithmName == nil { - invalidParams.Add(request.NewErrParamRequired("AlgorithmName")) - } - if s.AlgorithmName != nil && len(*s.AlgorithmName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AlgorithmName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlgorithmName sets the AlgorithmName field's value. -func (s *DescribeAlgorithmInput) SetAlgorithmName(v string) *DescribeAlgorithmInput { - s.AlgorithmName = &v - return s -} - -type DescribeAlgorithmOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the algorithm. - // - // AlgorithmArn is a required field - AlgorithmArn *string `min:"1" type:"string" required:"true"` - - // A brief summary about the algorithm. - AlgorithmDescription *string `type:"string"` - - // The name of the algorithm being described. - // - // AlgorithmName is a required field - AlgorithmName *string `min:"1" type:"string" required:"true"` - - // The current status of the algorithm. - // - // AlgorithmStatus is a required field - AlgorithmStatus *string `type:"string" required:"true" enum:"AlgorithmStatus"` - - // Details about the current status of the algorithm. - // - // AlgorithmStatusDetails is a required field - AlgorithmStatusDetails *AlgorithmStatusDetails `type:"structure" required:"true"` - - // Whether the algorithm is certified to be listed in AWS Marketplace. - CertifyForMarketplace *bool `type:"boolean"` - - // A timestamp specifying when the algorithm was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // Details about inference jobs that the algorithm runs. - InferenceSpecification *InferenceSpecification `type:"structure"` - - // The product identifier of the algorithm. - ProductId *string `type:"string"` - - // Details about training jobs run by this algorithm. - // - // TrainingSpecification is a required field - TrainingSpecification *TrainingSpecification `type:"structure" required:"true"` - - // Details about configurations for one or more training jobs that Amazon SageMaker - // runs to test the algorithm. - ValidationSpecification *AlgorithmValidationSpecification `type:"structure"` -} - -// String returns the string representation -func (s DescribeAlgorithmOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAlgorithmOutput) GoString() string { - return s.String() -} - -// SetAlgorithmArn sets the AlgorithmArn field's value. -func (s *DescribeAlgorithmOutput) SetAlgorithmArn(v string) *DescribeAlgorithmOutput { - s.AlgorithmArn = &v - return s -} - -// SetAlgorithmDescription sets the AlgorithmDescription field's value. -func (s *DescribeAlgorithmOutput) SetAlgorithmDescription(v string) *DescribeAlgorithmOutput { - s.AlgorithmDescription = &v - return s -} - -// SetAlgorithmName sets the AlgorithmName field's value. -func (s *DescribeAlgorithmOutput) SetAlgorithmName(v string) *DescribeAlgorithmOutput { - s.AlgorithmName = &v - return s -} - -// SetAlgorithmStatus sets the AlgorithmStatus field's value. -func (s *DescribeAlgorithmOutput) SetAlgorithmStatus(v string) *DescribeAlgorithmOutput { - s.AlgorithmStatus = &v - return s -} - -// SetAlgorithmStatusDetails sets the AlgorithmStatusDetails field's value. -func (s *DescribeAlgorithmOutput) SetAlgorithmStatusDetails(v *AlgorithmStatusDetails) *DescribeAlgorithmOutput { - s.AlgorithmStatusDetails = v - return s -} - -// SetCertifyForMarketplace sets the CertifyForMarketplace field's value. -func (s *DescribeAlgorithmOutput) SetCertifyForMarketplace(v bool) *DescribeAlgorithmOutput { - s.CertifyForMarketplace = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeAlgorithmOutput) SetCreationTime(v time.Time) *DescribeAlgorithmOutput { - s.CreationTime = &v - return s -} - -// SetInferenceSpecification sets the InferenceSpecification field's value. -func (s *DescribeAlgorithmOutput) SetInferenceSpecification(v *InferenceSpecification) *DescribeAlgorithmOutput { - s.InferenceSpecification = v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *DescribeAlgorithmOutput) SetProductId(v string) *DescribeAlgorithmOutput { - s.ProductId = &v - return s -} - -// SetTrainingSpecification sets the TrainingSpecification field's value. -func (s *DescribeAlgorithmOutput) SetTrainingSpecification(v *TrainingSpecification) *DescribeAlgorithmOutput { - s.TrainingSpecification = v - return s -} - -// SetValidationSpecification sets the ValidationSpecification field's value. -func (s *DescribeAlgorithmOutput) SetValidationSpecification(v *AlgorithmValidationSpecification) *DescribeAlgorithmOutput { - s.ValidationSpecification = v - return s -} - -type DescribeCodeRepositoryInput struct { - _ struct{} `type:"structure"` - - // The name of the Git repository to describe. - // - // CodeRepositoryName is a required field - CodeRepositoryName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeCodeRepositoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCodeRepositoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCodeRepositoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCodeRepositoryInput"} - if s.CodeRepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("CodeRepositoryName")) - } - if s.CodeRepositoryName != nil && len(*s.CodeRepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CodeRepositoryName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCodeRepositoryName sets the CodeRepositoryName field's value. -func (s *DescribeCodeRepositoryInput) SetCodeRepositoryName(v string) *DescribeCodeRepositoryInput { - s.CodeRepositoryName = &v - return s -} - -type DescribeCodeRepositoryOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the Git repository. - // - // CodeRepositoryArn is a required field - CodeRepositoryArn *string `min:"1" type:"string" required:"true"` - - // The name of the Git repository. - // - // CodeRepositoryName is a required field - CodeRepositoryName *string `min:"1" type:"string" required:"true"` - - // The date and time that the repository was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // Configuration details about the repository, including the URL where the repository - // is located, the default branch, and the Amazon Resource Name (ARN) of the - // AWS Secrets Manager secret that contains the credentials used to access the - // repository. - GitConfig *GitConfig `type:"structure"` - - // The date and time that the repository was last changed. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s DescribeCodeRepositoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCodeRepositoryOutput) GoString() string { - return s.String() -} - -// SetCodeRepositoryArn sets the CodeRepositoryArn field's value. -func (s *DescribeCodeRepositoryOutput) SetCodeRepositoryArn(v string) *DescribeCodeRepositoryOutput { - s.CodeRepositoryArn = &v - return s -} - -// SetCodeRepositoryName sets the CodeRepositoryName field's value. -func (s *DescribeCodeRepositoryOutput) SetCodeRepositoryName(v string) *DescribeCodeRepositoryOutput { - s.CodeRepositoryName = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeCodeRepositoryOutput) SetCreationTime(v time.Time) *DescribeCodeRepositoryOutput { - s.CreationTime = &v - return s -} - -// SetGitConfig sets the GitConfig field's value. -func (s *DescribeCodeRepositoryOutput) SetGitConfig(v *GitConfig) *DescribeCodeRepositoryOutput { - s.GitConfig = v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *DescribeCodeRepositoryOutput) SetLastModifiedTime(v time.Time) *DescribeCodeRepositoryOutput { - s.LastModifiedTime = &v - return s -} - -type DescribeCompilationJobInput struct { - _ struct{} `type:"structure"` - - // The name of the model compilation job that you want information about. - // - // CompilationJobName is a required field - CompilationJobName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeCompilationJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCompilationJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCompilationJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCompilationJobInput"} - if s.CompilationJobName == nil { - invalidParams.Add(request.NewErrParamRequired("CompilationJobName")) - } - if s.CompilationJobName != nil && len(*s.CompilationJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CompilationJobName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCompilationJobName sets the CompilationJobName field's value. -func (s *DescribeCompilationJobInput) SetCompilationJobName(v string) *DescribeCompilationJobInput { - s.CompilationJobName = &v - return s -} - -type DescribeCompilationJobOutput struct { - _ struct{} `type:"structure"` - - // The time when the model compilation job on a compilation job instance ended. - // For a successful or stopped job, this is when the job's model artifacts have - // finished uploading. For a failed job, this is when Amazon SageMaker detected - // that the job failed. - CompilationEndTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker assumes - // to perform the model compilation job. - // - // CompilationJobArn is a required field - CompilationJobArn *string `type:"string" required:"true"` - - // The name of the model compilation job. - // - // CompilationJobName is a required field - CompilationJobName *string `min:"1" type:"string" required:"true"` - - // The status of the model compilation job. - // - // CompilationJobStatus is a required field - CompilationJobStatus *string `type:"string" required:"true" enum:"CompilationJobStatus"` - - // The time when the model compilation job started the CompilationJob instances. - // - // You are billed for the time between this timestamp and the timestamp in the - // DescribeCompilationJobResponse$CompilationEndTime field. In Amazon CloudWatch - // Logs, the start time might be later than this time. That's because it takes - // time to download the compilation job, which depends on the size of the compilation - // job container. - CompilationStartTime *time.Time `type:"timestamp"` - - // The time that the model compilation job was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // If a model compilation job failed, the reason it failed. - // - // FailureReason is a required field - FailureReason *string `type:"string" required:"true"` - - // Information about the location in Amazon S3 of the input model artifacts, - // the name and shape of the expected data inputs, and the framework in which - // the model was trained. - // - // InputConfig is a required field - InputConfig *InputConfig `type:"structure" required:"true"` - - // The time that the status of the model compilation job was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // Information about the location in Amazon S3 that has been configured for - // storing the model artifacts used in the compilation job. - // - // ModelArtifacts is a required field - ModelArtifacts *ModelArtifacts `type:"structure" required:"true"` - - // Information about the output location for the compiled model and the target - // device that the model runs on. - // - // OutputConfig is a required field - OutputConfig *OutputConfig `type:"structure" required:"true"` - - // The Amazon Resource Name (ARN) of the model compilation job. - // - // RoleArn is a required field - RoleArn *string `min:"20" type:"string" required:"true"` - - // The duration allowed for model compilation. - // - // StoppingCondition is a required field - StoppingCondition *StoppingCondition `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeCompilationJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCompilationJobOutput) GoString() string { - return s.String() -} - -// SetCompilationEndTime sets the CompilationEndTime field's value. -func (s *DescribeCompilationJobOutput) SetCompilationEndTime(v time.Time) *DescribeCompilationJobOutput { - s.CompilationEndTime = &v - return s -} - -// SetCompilationJobArn sets the CompilationJobArn field's value. -func (s *DescribeCompilationJobOutput) SetCompilationJobArn(v string) *DescribeCompilationJobOutput { - s.CompilationJobArn = &v - return s -} - -// SetCompilationJobName sets the CompilationJobName field's value. -func (s *DescribeCompilationJobOutput) SetCompilationJobName(v string) *DescribeCompilationJobOutput { - s.CompilationJobName = &v - return s -} - -// SetCompilationJobStatus sets the CompilationJobStatus field's value. -func (s *DescribeCompilationJobOutput) SetCompilationJobStatus(v string) *DescribeCompilationJobOutput { - s.CompilationJobStatus = &v - return s -} - -// SetCompilationStartTime sets the CompilationStartTime field's value. -func (s *DescribeCompilationJobOutput) SetCompilationStartTime(v time.Time) *DescribeCompilationJobOutput { - s.CompilationStartTime = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeCompilationJobOutput) SetCreationTime(v time.Time) *DescribeCompilationJobOutput { - s.CreationTime = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *DescribeCompilationJobOutput) SetFailureReason(v string) *DescribeCompilationJobOutput { - s.FailureReason = &v - return s -} - -// SetInputConfig sets the InputConfig field's value. -func (s *DescribeCompilationJobOutput) SetInputConfig(v *InputConfig) *DescribeCompilationJobOutput { - s.InputConfig = v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *DescribeCompilationJobOutput) SetLastModifiedTime(v time.Time) *DescribeCompilationJobOutput { - s.LastModifiedTime = &v - return s -} - -// SetModelArtifacts sets the ModelArtifacts field's value. -func (s *DescribeCompilationJobOutput) SetModelArtifacts(v *ModelArtifacts) *DescribeCompilationJobOutput { - s.ModelArtifacts = v - return s -} - -// SetOutputConfig sets the OutputConfig field's value. -func (s *DescribeCompilationJobOutput) SetOutputConfig(v *OutputConfig) *DescribeCompilationJobOutput { - s.OutputConfig = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DescribeCompilationJobOutput) SetRoleArn(v string) *DescribeCompilationJobOutput { - s.RoleArn = &v - return s -} - -// SetStoppingCondition sets the StoppingCondition field's value. -func (s *DescribeCompilationJobOutput) SetStoppingCondition(v *StoppingCondition) *DescribeCompilationJobOutput { - s.StoppingCondition = v - return s -} - -type DescribeEndpointConfigInput struct { - _ struct{} `type:"structure"` - - // The name of the endpoint configuration. - // - // EndpointConfigName is a required field - EndpointConfigName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeEndpointConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEndpointConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEndpointConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEndpointConfigInput"} - if s.EndpointConfigName == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointConfigName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointConfigName sets the EndpointConfigName field's value. -func (s *DescribeEndpointConfigInput) SetEndpointConfigName(v string) *DescribeEndpointConfigInput { - s.EndpointConfigName = &v - return s -} - -type DescribeEndpointConfigOutput struct { - _ struct{} `type:"structure"` - - // A timestamp that shows when the endpoint configuration was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The Amazon Resource Name (ARN) of the endpoint configuration. - // - // EndpointConfigArn is a required field - EndpointConfigArn *string `min:"20" type:"string" required:"true"` - - // Name of the Amazon SageMaker endpoint configuration. - // - // EndpointConfigName is a required field - EndpointConfigName *string `type:"string" required:"true"` - - // AWS KMS key ID Amazon SageMaker uses to encrypt data when storing it on the - // ML storage volume attached to the instance. - KmsKeyId *string `type:"string"` - - // An array of ProductionVariant objects, one for each model that you want to - // host at this endpoint. - // - // ProductionVariants is a required field - ProductionVariants []*ProductionVariant `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeEndpointConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEndpointConfigOutput) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeEndpointConfigOutput) SetCreationTime(v time.Time) *DescribeEndpointConfigOutput { - s.CreationTime = &v - return s -} - -// SetEndpointConfigArn sets the EndpointConfigArn field's value. -func (s *DescribeEndpointConfigOutput) SetEndpointConfigArn(v string) *DescribeEndpointConfigOutput { - s.EndpointConfigArn = &v - return s -} - -// SetEndpointConfigName sets the EndpointConfigName field's value. -func (s *DescribeEndpointConfigOutput) SetEndpointConfigName(v string) *DescribeEndpointConfigOutput { - s.EndpointConfigName = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DescribeEndpointConfigOutput) SetKmsKeyId(v string) *DescribeEndpointConfigOutput { - s.KmsKeyId = &v - return s -} - -// SetProductionVariants sets the ProductionVariants field's value. -func (s *DescribeEndpointConfigOutput) SetProductionVariants(v []*ProductionVariant) *DescribeEndpointConfigOutput { - s.ProductionVariants = v - return s -} - -type DescribeEndpointInput struct { - _ struct{} `type:"structure"` - - // The name of the endpoint. - // - // EndpointName is a required field - EndpointName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEndpointInput"} - if s.EndpointName == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointName sets the EndpointName field's value. -func (s *DescribeEndpointInput) SetEndpointName(v string) *DescribeEndpointInput { - s.EndpointName = &v - return s -} - -type DescribeEndpointOutput struct { - _ struct{} `type:"structure"` - - // A timestamp that shows when the endpoint was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The Amazon Resource Name (ARN) of the endpoint. - // - // EndpointArn is a required field - EndpointArn *string `min:"20" type:"string" required:"true"` - - // The name of the endpoint configuration associated with this endpoint. - // - // EndpointConfigName is a required field - EndpointConfigName *string `type:"string" required:"true"` - - // Name of the endpoint. - // - // EndpointName is a required field - EndpointName *string `type:"string" required:"true"` - - // The status of the endpoint. - // - // * OutOfService: Endpoint is not available to take incoming requests. - // - // * Creating: CreateEndpoint is executing. - // - // * Updating: UpdateEndpoint or UpdateEndpointWeightsAndCapacities is executing. - // - // * SystemUpdating: Endpoint is undergoing maintenance and cannot be updated - // or deleted or re-scaled until it has completed. This maintenance operation - // does not change any customer-specified values such as VPC config, KMS - // encryption, model, instance type, or instance count. - // - // * RollingBack: Endpoint fails to scale up or down or change its variant - // weight and is in the process of rolling back to its previous configuration. - // Once the rollback completes, endpoint returns to an InService status. - // This transitional status only applies to an endpoint that has autoscaling - // enabled and is undergoing variant weight or capacity changes as part of - // an UpdateEndpointWeightsAndCapacities call or when the UpdateEndpointWeightsAndCapacities - // operation is called explicitly. - // - // * InService: Endpoint is available to process incoming requests. - // - // * Deleting: DeleteEndpoint is executing. - // - // * Failed: Endpoint could not be created, updated, or re-scaled. Use DescribeEndpointOutput$FailureReason - // for information about the failure. DeleteEndpoint is the only operation - // that can be performed on a failed endpoint. - // - // EndpointStatus is a required field - EndpointStatus *string `type:"string" required:"true" enum:"EndpointStatus"` - - // If the status of the endpoint is Failed, the reason why it failed. - FailureReason *string `type:"string"` - - // A timestamp that shows when the endpoint was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // An array of ProductionVariantSummary objects, one for each model hosted behind - // this endpoint. - ProductionVariants []*ProductionVariantSummary `min:"1" type:"list"` -} - -// String returns the string representation -func (s DescribeEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEndpointOutput) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeEndpointOutput) SetCreationTime(v time.Time) *DescribeEndpointOutput { - s.CreationTime = &v - return s -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *DescribeEndpointOutput) SetEndpointArn(v string) *DescribeEndpointOutput { - s.EndpointArn = &v - return s -} - -// SetEndpointConfigName sets the EndpointConfigName field's value. -func (s *DescribeEndpointOutput) SetEndpointConfigName(v string) *DescribeEndpointOutput { - s.EndpointConfigName = &v - return s -} - -// SetEndpointName sets the EndpointName field's value. -func (s *DescribeEndpointOutput) SetEndpointName(v string) *DescribeEndpointOutput { - s.EndpointName = &v - return s -} - -// SetEndpointStatus sets the EndpointStatus field's value. -func (s *DescribeEndpointOutput) SetEndpointStatus(v string) *DescribeEndpointOutput { - s.EndpointStatus = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *DescribeEndpointOutput) SetFailureReason(v string) *DescribeEndpointOutput { - s.FailureReason = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *DescribeEndpointOutput) SetLastModifiedTime(v time.Time) *DescribeEndpointOutput { - s.LastModifiedTime = &v - return s -} - -// SetProductionVariants sets the ProductionVariants field's value. -func (s *DescribeEndpointOutput) SetProductionVariants(v []*ProductionVariantSummary) *DescribeEndpointOutput { - s.ProductionVariants = v - return s -} - -type DescribeHyperParameterTuningJobInput struct { - _ struct{} `type:"structure"` - - // The name of the tuning job to describe. - // - // HyperParameterTuningJobName is a required field - HyperParameterTuningJobName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeHyperParameterTuningJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHyperParameterTuningJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeHyperParameterTuningJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeHyperParameterTuningJobInput"} - if s.HyperParameterTuningJobName == nil { - invalidParams.Add(request.NewErrParamRequired("HyperParameterTuningJobName")) - } - if s.HyperParameterTuningJobName != nil && len(*s.HyperParameterTuningJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HyperParameterTuningJobName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHyperParameterTuningJobName sets the HyperParameterTuningJobName field's value. -func (s *DescribeHyperParameterTuningJobInput) SetHyperParameterTuningJobName(v string) *DescribeHyperParameterTuningJobInput { - s.HyperParameterTuningJobName = &v - return s -} - -type DescribeHyperParameterTuningJobOutput struct { - _ struct{} `type:"structure"` - - // A TrainingJobSummary object that describes the training job that completed - // with the best current HyperParameterTuningJobObjective. - BestTrainingJob *HyperParameterTrainingJobSummary `type:"structure"` - - // The date and time that the tuning job started. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // If the tuning job failed, the reason it failed. - FailureReason *string `type:"string"` - - // The date and time that the tuning job ended. - HyperParameterTuningEndTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the tuning job. - // - // HyperParameterTuningJobArn is a required field - HyperParameterTuningJobArn *string `type:"string" required:"true"` - - // The HyperParameterTuningJobConfig object that specifies the configuration - // of the tuning job. - // - // HyperParameterTuningJobConfig is a required field - HyperParameterTuningJobConfig *HyperParameterTuningJobConfig `type:"structure" required:"true"` - - // The name of the tuning job. - // - // HyperParameterTuningJobName is a required field - HyperParameterTuningJobName *string `min:"1" type:"string" required:"true"` - - // The status of the tuning job: InProgress, Completed, Failed, Stopping, or - // Stopped. - // - // HyperParameterTuningJobStatus is a required field - HyperParameterTuningJobStatus *string `type:"string" required:"true" enum:"HyperParameterTuningJobStatus"` - - // The date and time that the status of the tuning job was modified. - LastModifiedTime *time.Time `type:"timestamp"` - - // The ObjectiveStatusCounters object that specifies the number of training - // jobs, categorized by the status of their final objective metric, that this - // tuning job launched. - // - // ObjectiveStatusCounters is a required field - ObjectiveStatusCounters *ObjectiveStatusCounters `type:"structure" required:"true"` - - // If the hyperparameter tuning job is an warm start tuning job with a WarmStartType - // of IDENTICAL_DATA_AND_ALGORITHM, this is the TrainingJobSummary for the training - // job with the best objective metric value of all training jobs launched by - // this tuning job and all parent jobs specified for the warm start tuning job. - OverallBestTrainingJob *HyperParameterTrainingJobSummary `type:"structure"` - - // The HyperParameterTrainingJobDefinition object that specifies the definition - // of the training jobs that this tuning job launches. - // - // TrainingJobDefinition is a required field - TrainingJobDefinition *HyperParameterTrainingJobDefinition `type:"structure" required:"true"` - - // The TrainingJobStatusCounters object that specifies the number of training - // jobs, categorized by status, that this tuning job launched. - // - // TrainingJobStatusCounters is a required field - TrainingJobStatusCounters *TrainingJobStatusCounters `type:"structure" required:"true"` - - // The configuration for starting the hyperparameter parameter tuning job using - // one or more previous tuning jobs as a starting point. The results of previous - // tuning jobs are used to inform which combinations of hyperparameters to search - // over in the new tuning job. - WarmStartConfig *HyperParameterTuningJobWarmStartConfig `type:"structure"` -} - -// String returns the string representation -func (s DescribeHyperParameterTuningJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeHyperParameterTuningJobOutput) GoString() string { - return s.String() -} - -// SetBestTrainingJob sets the BestTrainingJob field's value. -func (s *DescribeHyperParameterTuningJobOutput) SetBestTrainingJob(v *HyperParameterTrainingJobSummary) *DescribeHyperParameterTuningJobOutput { - s.BestTrainingJob = v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeHyperParameterTuningJobOutput) SetCreationTime(v time.Time) *DescribeHyperParameterTuningJobOutput { - s.CreationTime = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *DescribeHyperParameterTuningJobOutput) SetFailureReason(v string) *DescribeHyperParameterTuningJobOutput { - s.FailureReason = &v - return s -} - -// SetHyperParameterTuningEndTime sets the HyperParameterTuningEndTime field's value. -func (s *DescribeHyperParameterTuningJobOutput) SetHyperParameterTuningEndTime(v time.Time) *DescribeHyperParameterTuningJobOutput { - s.HyperParameterTuningEndTime = &v - return s -} - -// SetHyperParameterTuningJobArn sets the HyperParameterTuningJobArn field's value. -func (s *DescribeHyperParameterTuningJobOutput) SetHyperParameterTuningJobArn(v string) *DescribeHyperParameterTuningJobOutput { - s.HyperParameterTuningJobArn = &v - return s -} - -// SetHyperParameterTuningJobConfig sets the HyperParameterTuningJobConfig field's value. -func (s *DescribeHyperParameterTuningJobOutput) SetHyperParameterTuningJobConfig(v *HyperParameterTuningJobConfig) *DescribeHyperParameterTuningJobOutput { - s.HyperParameterTuningJobConfig = v - return s -} - -// SetHyperParameterTuningJobName sets the HyperParameterTuningJobName field's value. -func (s *DescribeHyperParameterTuningJobOutput) SetHyperParameterTuningJobName(v string) *DescribeHyperParameterTuningJobOutput { - s.HyperParameterTuningJobName = &v - return s -} - -// SetHyperParameterTuningJobStatus sets the HyperParameterTuningJobStatus field's value. -func (s *DescribeHyperParameterTuningJobOutput) SetHyperParameterTuningJobStatus(v string) *DescribeHyperParameterTuningJobOutput { - s.HyperParameterTuningJobStatus = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *DescribeHyperParameterTuningJobOutput) SetLastModifiedTime(v time.Time) *DescribeHyperParameterTuningJobOutput { - s.LastModifiedTime = &v - return s -} - -// SetObjectiveStatusCounters sets the ObjectiveStatusCounters field's value. -func (s *DescribeHyperParameterTuningJobOutput) SetObjectiveStatusCounters(v *ObjectiveStatusCounters) *DescribeHyperParameterTuningJobOutput { - s.ObjectiveStatusCounters = v - return s -} - -// SetOverallBestTrainingJob sets the OverallBestTrainingJob field's value. -func (s *DescribeHyperParameterTuningJobOutput) SetOverallBestTrainingJob(v *HyperParameterTrainingJobSummary) *DescribeHyperParameterTuningJobOutput { - s.OverallBestTrainingJob = v - return s -} - -// SetTrainingJobDefinition sets the TrainingJobDefinition field's value. -func (s *DescribeHyperParameterTuningJobOutput) SetTrainingJobDefinition(v *HyperParameterTrainingJobDefinition) *DescribeHyperParameterTuningJobOutput { - s.TrainingJobDefinition = v - return s -} - -// SetTrainingJobStatusCounters sets the TrainingJobStatusCounters field's value. -func (s *DescribeHyperParameterTuningJobOutput) SetTrainingJobStatusCounters(v *TrainingJobStatusCounters) *DescribeHyperParameterTuningJobOutput { - s.TrainingJobStatusCounters = v - return s -} - -// SetWarmStartConfig sets the WarmStartConfig field's value. -func (s *DescribeHyperParameterTuningJobOutput) SetWarmStartConfig(v *HyperParameterTuningJobWarmStartConfig) *DescribeHyperParameterTuningJobOutput { - s.WarmStartConfig = v - return s -} - -type DescribeLabelingJobInput struct { - _ struct{} `type:"structure"` - - // The name of the labeling job to return information for. - // - // LabelingJobName is a required field - LabelingJobName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeLabelingJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLabelingJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLabelingJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLabelingJobInput"} - if s.LabelingJobName == nil { - invalidParams.Add(request.NewErrParamRequired("LabelingJobName")) - } - if s.LabelingJobName != nil && len(*s.LabelingJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LabelingJobName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLabelingJobName sets the LabelingJobName field's value. -func (s *DescribeLabelingJobInput) SetLabelingJobName(v string) *DescribeLabelingJobInput { - s.LabelingJobName = &v - return s -} - -type DescribeLabelingJobOutput struct { - _ struct{} `type:"structure"` - - // The date and time that the labeling job was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // If the job failed, the reason that it failed. - FailureReason *string `type:"string"` - - // Configuration information required for human workers to complete a labeling - // task. - // - // HumanTaskConfig is a required field - HumanTaskConfig *HumanTaskConfig `type:"structure" required:"true"` - - // Input configuration information for the labeling job, such as the Amazon - // S3 location of the data objects and the location of the manifest file that - // describes the data objects. - // - // InputConfig is a required field - InputConfig *LabelingJobInputConfig `type:"structure" required:"true"` - - // A unique identifier for work done as part of a labeling job. - // - // JobReferenceCode is a required field - JobReferenceCode *string `min:"1" type:"string" required:"true"` - - // The attribute used as the label in the output manifest file. - LabelAttributeName *string `min:"1" type:"string"` - - // The S3 location of the JSON file that defines the categories used to label - // data objects. - // - // The file is a JSON structure in the following format: - // - // { - // - // "document-version": "2018-11-28" - // - // "labels": [ - // - // { - // - // "label": "label 1" - // - // }, - // - // { - // - // "label": "label 2" - // - // }, - // - // ... - // - // { - // - // "label": "label n" - // - // } - // - // ] - // - // } - LabelCategoryConfigS3Uri *string `type:"string"` - - // Provides a breakdown of the number of data objects labeled by humans, the - // number of objects labeled by machine, the number of objects than couldn't - // be labeled, and the total number of objects labeled. - // - // LabelCounters is a required field - LabelCounters *LabelCounters `type:"structure" required:"true"` - - // Configuration information for automated data labeling. - LabelingJobAlgorithmsConfig *LabelingJobAlgorithmsConfig `type:"structure"` - - // The Amazon Resource Name (ARN) of the labeling job. - // - // LabelingJobArn is a required field - LabelingJobArn *string `type:"string" required:"true"` - - // The name assigned to the labeling job when it was created. - // - // LabelingJobName is a required field - LabelingJobName *string `min:"1" type:"string" required:"true"` - - // The location of the output produced by the labeling job. - LabelingJobOutput *LabelingJobOutput `type:"structure"` - - // The processing status of the labeling job. - // - // LabelingJobStatus is a required field - LabelingJobStatus *string `type:"string" required:"true" enum:"LabelingJobStatus"` - - // The date and time that the labeling job was last updated. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // The location of the job's output data and the AWS Key Management Service - // key ID for the key used to encrypt the output data, if any. - // - // OutputConfig is a required field - OutputConfig *LabelingJobOutputConfig `type:"structure" required:"true"` - - // The Amazon Resource Name (ARN) that Amazon SageMaker assumes to perform tasks - // on your behalf during data labeling. - // - // RoleArn is a required field - RoleArn *string `min:"20" type:"string" required:"true"` - - // A set of conditions for stopping a labeling job. If any of the conditions - // are met, the job is automatically stopped. - StoppingConditions *LabelingJobStoppingConditions `type:"structure"` - - // An array of key/value pairs. For more information, see Using Cost Allocation - // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) - // in the AWS Billing and Cost Management User Guide. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s DescribeLabelingJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLabelingJobOutput) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeLabelingJobOutput) SetCreationTime(v time.Time) *DescribeLabelingJobOutput { - s.CreationTime = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *DescribeLabelingJobOutput) SetFailureReason(v string) *DescribeLabelingJobOutput { - s.FailureReason = &v - return s -} - -// SetHumanTaskConfig sets the HumanTaskConfig field's value. -func (s *DescribeLabelingJobOutput) SetHumanTaskConfig(v *HumanTaskConfig) *DescribeLabelingJobOutput { - s.HumanTaskConfig = v - return s -} - -// SetInputConfig sets the InputConfig field's value. -func (s *DescribeLabelingJobOutput) SetInputConfig(v *LabelingJobInputConfig) *DescribeLabelingJobOutput { - s.InputConfig = v - return s -} - -// SetJobReferenceCode sets the JobReferenceCode field's value. -func (s *DescribeLabelingJobOutput) SetJobReferenceCode(v string) *DescribeLabelingJobOutput { - s.JobReferenceCode = &v - return s -} - -// SetLabelAttributeName sets the LabelAttributeName field's value. -func (s *DescribeLabelingJobOutput) SetLabelAttributeName(v string) *DescribeLabelingJobOutput { - s.LabelAttributeName = &v - return s -} - -// SetLabelCategoryConfigS3Uri sets the LabelCategoryConfigS3Uri field's value. -func (s *DescribeLabelingJobOutput) SetLabelCategoryConfigS3Uri(v string) *DescribeLabelingJobOutput { - s.LabelCategoryConfigS3Uri = &v - return s -} - -// SetLabelCounters sets the LabelCounters field's value. -func (s *DescribeLabelingJobOutput) SetLabelCounters(v *LabelCounters) *DescribeLabelingJobOutput { - s.LabelCounters = v - return s -} - -// SetLabelingJobAlgorithmsConfig sets the LabelingJobAlgorithmsConfig field's value. -func (s *DescribeLabelingJobOutput) SetLabelingJobAlgorithmsConfig(v *LabelingJobAlgorithmsConfig) *DescribeLabelingJobOutput { - s.LabelingJobAlgorithmsConfig = v - return s -} - -// SetLabelingJobArn sets the LabelingJobArn field's value. -func (s *DescribeLabelingJobOutput) SetLabelingJobArn(v string) *DescribeLabelingJobOutput { - s.LabelingJobArn = &v - return s -} - -// SetLabelingJobName sets the LabelingJobName field's value. -func (s *DescribeLabelingJobOutput) SetLabelingJobName(v string) *DescribeLabelingJobOutput { - s.LabelingJobName = &v - return s -} - -// SetLabelingJobOutput sets the LabelingJobOutput field's value. -func (s *DescribeLabelingJobOutput) SetLabelingJobOutput(v *LabelingJobOutput) *DescribeLabelingJobOutput { - s.LabelingJobOutput = v - return s -} - -// SetLabelingJobStatus sets the LabelingJobStatus field's value. -func (s *DescribeLabelingJobOutput) SetLabelingJobStatus(v string) *DescribeLabelingJobOutput { - s.LabelingJobStatus = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *DescribeLabelingJobOutput) SetLastModifiedTime(v time.Time) *DescribeLabelingJobOutput { - s.LastModifiedTime = &v - return s -} - -// SetOutputConfig sets the OutputConfig field's value. -func (s *DescribeLabelingJobOutput) SetOutputConfig(v *LabelingJobOutputConfig) *DescribeLabelingJobOutput { - s.OutputConfig = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DescribeLabelingJobOutput) SetRoleArn(v string) *DescribeLabelingJobOutput { - s.RoleArn = &v - return s -} - -// SetStoppingConditions sets the StoppingConditions field's value. -func (s *DescribeLabelingJobOutput) SetStoppingConditions(v *LabelingJobStoppingConditions) *DescribeLabelingJobOutput { - s.StoppingConditions = v - return s -} - -// SetTags sets the Tags field's value. -func (s *DescribeLabelingJobOutput) SetTags(v []*Tag) *DescribeLabelingJobOutput { - s.Tags = v - return s -} - -type DescribeModelInput struct { - _ struct{} `type:"structure"` - - // The name of the model. - // - // ModelName is a required field - ModelName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeModelInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeModelInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeModelInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeModelInput"} - if s.ModelName == nil { - invalidParams.Add(request.NewErrParamRequired("ModelName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetModelName sets the ModelName field's value. -func (s *DescribeModelInput) SetModelName(v string) *DescribeModelInput { - s.ModelName = &v - return s -} - -type DescribeModelOutput struct { - _ struct{} `type:"structure"` - - // The containers in the inference pipeline. - Containers []*ContainerDefinition `type:"list"` - - // A timestamp that shows when the model was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // If True, no inbound or outbound network calls can be made to or from the - // model container. - // - // The Semantic Segmentation built-in algorithm does not support network isolation. - EnableNetworkIsolation *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the IAM role that you specified for the - // model. - // - // ExecutionRoleArn is a required field - ExecutionRoleArn *string `min:"20" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the model. - // - // ModelArn is a required field - ModelArn *string `min:"20" type:"string" required:"true"` - - // Name of the Amazon SageMaker model. - // - // ModelName is a required field - ModelName *string `type:"string" required:"true"` - - // The location of the primary inference code, associated artifacts, and custom - // environment map that the inference code uses when it is deployed in production. - PrimaryContainer *ContainerDefinition `type:"structure"` - - // A VpcConfig object that specifies the VPC that this model has access to. - // For more information, see Protect Endpoints by Using an Amazon Virtual Private - // Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html) - VpcConfig *VpcConfig `type:"structure"` -} - -// String returns the string representation -func (s DescribeModelOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeModelOutput) GoString() string { - return s.String() -} - -// SetContainers sets the Containers field's value. -func (s *DescribeModelOutput) SetContainers(v []*ContainerDefinition) *DescribeModelOutput { - s.Containers = v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeModelOutput) SetCreationTime(v time.Time) *DescribeModelOutput { - s.CreationTime = &v - return s -} - -// SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value. -func (s *DescribeModelOutput) SetEnableNetworkIsolation(v bool) *DescribeModelOutput { - s.EnableNetworkIsolation = &v - return s -} - -// SetExecutionRoleArn sets the ExecutionRoleArn field's value. -func (s *DescribeModelOutput) SetExecutionRoleArn(v string) *DescribeModelOutput { - s.ExecutionRoleArn = &v - return s -} - -// SetModelArn sets the ModelArn field's value. -func (s *DescribeModelOutput) SetModelArn(v string) *DescribeModelOutput { - s.ModelArn = &v - return s -} - -// SetModelName sets the ModelName field's value. -func (s *DescribeModelOutput) SetModelName(v string) *DescribeModelOutput { - s.ModelName = &v - return s -} - -// SetPrimaryContainer sets the PrimaryContainer field's value. -func (s *DescribeModelOutput) SetPrimaryContainer(v *ContainerDefinition) *DescribeModelOutput { - s.PrimaryContainer = v - return s -} - -// SetVpcConfig sets the VpcConfig field's value. -func (s *DescribeModelOutput) SetVpcConfig(v *VpcConfig) *DescribeModelOutput { - s.VpcConfig = v - return s -} - -type DescribeModelPackageInput struct { - _ struct{} `type:"structure"` - - // The name of the model package to describe. - // - // ModelPackageName is a required field - ModelPackageName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeModelPackageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeModelPackageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeModelPackageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeModelPackageInput"} - if s.ModelPackageName == nil { - invalidParams.Add(request.NewErrParamRequired("ModelPackageName")) - } - if s.ModelPackageName != nil && len(*s.ModelPackageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ModelPackageName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetModelPackageName sets the ModelPackageName field's value. -func (s *DescribeModelPackageInput) SetModelPackageName(v string) *DescribeModelPackageInput { - s.ModelPackageName = &v - return s -} - -type DescribeModelPackageOutput struct { - _ struct{} `type:"structure"` - - // Whether the model package is certified for listing on AWS Marketplace. - CertifyForMarketplace *bool `type:"boolean"` - - // A timestamp specifying when the model package was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // Details about inference jobs that can be run with models based on this model - // package. - InferenceSpecification *InferenceSpecification `type:"structure"` - - // The Amazon Resource Name (ARN) of the model package. - // - // ModelPackageArn is a required field - ModelPackageArn *string `min:"1" type:"string" required:"true"` - - // A brief summary of the model package. - ModelPackageDescription *string `type:"string"` - - // The name of the model package being described. - // - // ModelPackageName is a required field - ModelPackageName *string `min:"1" type:"string" required:"true"` - - // The current status of the model package. - // - // ModelPackageStatus is a required field - ModelPackageStatus *string `type:"string" required:"true" enum:"ModelPackageStatus"` - - // Details about the current status of the model package. - // - // ModelPackageStatusDetails is a required field - ModelPackageStatusDetails *ModelPackageStatusDetails `type:"structure" required:"true"` - - // Details about the algorithm that was used to create the model package. - SourceAlgorithmSpecification *SourceAlgorithmSpecification `type:"structure"` - - // Configurations for one or more transform jobs that Amazon SageMaker runs - // to test the model package. - ValidationSpecification *ModelPackageValidationSpecification `type:"structure"` -} - -// String returns the string representation -func (s DescribeModelPackageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeModelPackageOutput) GoString() string { - return s.String() -} - -// SetCertifyForMarketplace sets the CertifyForMarketplace field's value. -func (s *DescribeModelPackageOutput) SetCertifyForMarketplace(v bool) *DescribeModelPackageOutput { - s.CertifyForMarketplace = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeModelPackageOutput) SetCreationTime(v time.Time) *DescribeModelPackageOutput { - s.CreationTime = &v - return s -} - -// SetInferenceSpecification sets the InferenceSpecification field's value. -func (s *DescribeModelPackageOutput) SetInferenceSpecification(v *InferenceSpecification) *DescribeModelPackageOutput { - s.InferenceSpecification = v - return s -} - -// SetModelPackageArn sets the ModelPackageArn field's value. -func (s *DescribeModelPackageOutput) SetModelPackageArn(v string) *DescribeModelPackageOutput { - s.ModelPackageArn = &v - return s -} - -// SetModelPackageDescription sets the ModelPackageDescription field's value. -func (s *DescribeModelPackageOutput) SetModelPackageDescription(v string) *DescribeModelPackageOutput { - s.ModelPackageDescription = &v - return s -} - -// SetModelPackageName sets the ModelPackageName field's value. -func (s *DescribeModelPackageOutput) SetModelPackageName(v string) *DescribeModelPackageOutput { - s.ModelPackageName = &v - return s -} - -// SetModelPackageStatus sets the ModelPackageStatus field's value. -func (s *DescribeModelPackageOutput) SetModelPackageStatus(v string) *DescribeModelPackageOutput { - s.ModelPackageStatus = &v - return s -} - -// SetModelPackageStatusDetails sets the ModelPackageStatusDetails field's value. -func (s *DescribeModelPackageOutput) SetModelPackageStatusDetails(v *ModelPackageStatusDetails) *DescribeModelPackageOutput { - s.ModelPackageStatusDetails = v - return s -} - -// SetSourceAlgorithmSpecification sets the SourceAlgorithmSpecification field's value. -func (s *DescribeModelPackageOutput) SetSourceAlgorithmSpecification(v *SourceAlgorithmSpecification) *DescribeModelPackageOutput { - s.SourceAlgorithmSpecification = v - return s -} - -// SetValidationSpecification sets the ValidationSpecification field's value. -func (s *DescribeModelPackageOutput) SetValidationSpecification(v *ModelPackageValidationSpecification) *DescribeModelPackageOutput { - s.ValidationSpecification = v - return s -} - -type DescribeNotebookInstanceInput struct { - _ struct{} `type:"structure"` - - // The name of the notebook instance that you want information about. - // - // NotebookInstanceName is a required field - NotebookInstanceName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeNotebookInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNotebookInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeNotebookInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeNotebookInstanceInput"} - if s.NotebookInstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("NotebookInstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNotebookInstanceName sets the NotebookInstanceName field's value. -func (s *DescribeNotebookInstanceInput) SetNotebookInstanceName(v string) *DescribeNotebookInstanceInput { - s.NotebookInstanceName = &v - return s -} - -type DescribeNotebookInstanceLifecycleConfigInput struct { - _ struct{} `type:"structure"` - - // The name of the lifecycle configuration to describe. - // - // NotebookInstanceLifecycleConfigName is a required field - NotebookInstanceLifecycleConfigName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeNotebookInstanceLifecycleConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNotebookInstanceLifecycleConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeNotebookInstanceLifecycleConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeNotebookInstanceLifecycleConfigInput"} - if s.NotebookInstanceLifecycleConfigName == nil { - invalidParams.Add(request.NewErrParamRequired("NotebookInstanceLifecycleConfigName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. -func (s *DescribeNotebookInstanceLifecycleConfigInput) SetNotebookInstanceLifecycleConfigName(v string) *DescribeNotebookInstanceLifecycleConfigInput { - s.NotebookInstanceLifecycleConfigName = &v - return s -} - -type DescribeNotebookInstanceLifecycleConfigOutput struct { - _ struct{} `type:"structure"` - - // A timestamp that tells when the lifecycle configuration was created. - CreationTime *time.Time `type:"timestamp"` - - // A timestamp that tells when the lifecycle configuration was last modified. - LastModifiedTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the lifecycle configuration. - NotebookInstanceLifecycleConfigArn *string `type:"string"` - - // The name of the lifecycle configuration. - NotebookInstanceLifecycleConfigName *string `type:"string"` - - // The shell script that runs only once, when you create a notebook instance. - OnCreate []*NotebookInstanceLifecycleHook `type:"list"` - - // The shell script that runs every time you start a notebook instance, including - // when you create the notebook instance. - OnStart []*NotebookInstanceLifecycleHook `type:"list"` -} - -// String returns the string representation -func (s DescribeNotebookInstanceLifecycleConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNotebookInstanceLifecycleConfigOutput) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeNotebookInstanceLifecycleConfigOutput) SetCreationTime(v time.Time) *DescribeNotebookInstanceLifecycleConfigOutput { - s.CreationTime = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *DescribeNotebookInstanceLifecycleConfigOutput) SetLastModifiedTime(v time.Time) *DescribeNotebookInstanceLifecycleConfigOutput { - s.LastModifiedTime = &v - return s -} - -// SetNotebookInstanceLifecycleConfigArn sets the NotebookInstanceLifecycleConfigArn field's value. -func (s *DescribeNotebookInstanceLifecycleConfigOutput) SetNotebookInstanceLifecycleConfigArn(v string) *DescribeNotebookInstanceLifecycleConfigOutput { - s.NotebookInstanceLifecycleConfigArn = &v - return s -} - -// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. -func (s *DescribeNotebookInstanceLifecycleConfigOutput) SetNotebookInstanceLifecycleConfigName(v string) *DescribeNotebookInstanceLifecycleConfigOutput { - s.NotebookInstanceLifecycleConfigName = &v - return s -} - -// SetOnCreate sets the OnCreate field's value. -func (s *DescribeNotebookInstanceLifecycleConfigOutput) SetOnCreate(v []*NotebookInstanceLifecycleHook) *DescribeNotebookInstanceLifecycleConfigOutput { - s.OnCreate = v - return s -} - -// SetOnStart sets the OnStart field's value. -func (s *DescribeNotebookInstanceLifecycleConfigOutput) SetOnStart(v []*NotebookInstanceLifecycleHook) *DescribeNotebookInstanceLifecycleConfigOutput { - s.OnStart = v - return s -} - -type DescribeNotebookInstanceOutput struct { - _ struct{} `type:"structure"` - - // A list of the Elastic Inference (EI) instance types associated with this - // notebook instance. Currently only one EI instance type can be associated - // with a notebook instance. For more information, see Using Elastic Inference - // in Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/ei.html). - AcceleratorTypes []*string `type:"list"` - - // An array of up to three Git repositories associated with the notebook instance. - // These can be either the names of Git repositories stored as resources in - // your account, or the URL of Git repositories in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) - // or in any other Git repository. These repositories are cloned at the same - // level as the default repository of your notebook instance. For more information, - // see Associating Git Repositories with Amazon SageMaker Notebook Instances - // (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). - AdditionalCodeRepositories []*string `type:"list"` - - // A timestamp. Use this parameter to return the time when the notebook instance - // was created - CreationTime *time.Time `type:"timestamp"` - - // The Git repository associated with the notebook instance as its default code - // repository. This can be either the name of a Git repository stored as a resource - // in your account, or the URL of a Git repository in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) - // or in any other Git repository. When you open a notebook instance, it opens - // in the directory that contains this repository. For more information, see - // Associating Git Repositories with Amazon SageMaker Notebook Instances (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). - DefaultCodeRepository *string `min:"1" type:"string"` - - // Describes whether Amazon SageMaker provides internet access to the notebook - // instance. If this value is set to Disabled, he notebook instance does not - // have internet access, and cannot connect to Amazon SageMaker training and - // endpoint services. - // - // For more information, see Notebook Instances Are Internet-Enabled by Default - // (http://docs.aws.amazon.com/sagemaker/latest/dg/appendix-additional-considerations.html#appendix-notebook-and-internet-access). - DirectInternetAccess *string `type:"string" enum:"DirectInternetAccess"` - - // If status is Failed, the reason it failed. - FailureReason *string `type:"string"` - - // The type of ML compute instance running on the notebook instance. - InstanceType *string `type:"string" enum:"InstanceType"` - - // The AWS KMS key ID Amazon SageMaker uses to encrypt data when storing it - // on the ML storage volume attached to the instance. - KmsKeyId *string `type:"string"` - - // A timestamp. Use this parameter to retrieve the time when the notebook instance - // was last modified. - LastModifiedTime *time.Time `type:"timestamp"` - - // The network interface IDs that Amazon SageMaker created at the time of creating - // the instance. - NetworkInterfaceId *string `type:"string"` - - // The Amazon Resource Name (ARN) of the notebook instance. - NotebookInstanceArn *string `type:"string"` - - // Returns the name of a notebook instance lifecycle configuration. - // - // For information about notebook instance lifestyle configurations, see Step - // 2.1: (Optional) Customize a Notebook Instance (http://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html) - NotebookInstanceLifecycleConfigName *string `type:"string"` - - // The name of the Amazon SageMaker notebook instance. - NotebookInstanceName *string `type:"string"` - - // The status of the notebook instance. - NotebookInstanceStatus *string `type:"string" enum:"NotebookInstanceStatus"` - - // The Amazon Resource Name (ARN) of the IAM role associated with the instance. - RoleArn *string `min:"20" type:"string"` - - // The IDs of the VPC security groups. - SecurityGroups []*string `type:"list"` - - // The ID of the VPC subnet. - SubnetId *string `type:"string"` - - // The URL that you use to connect to the Jupyter notebook that is running in - // your notebook instance. - Url *string `type:"string"` - - // The size, in GB, of the ML storage volume attached to the notebook instance. - VolumeSizeInGB *int64 `min:"5" type:"integer"` -} - -// String returns the string representation -func (s DescribeNotebookInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNotebookInstanceOutput) GoString() string { - return s.String() -} - -// SetAcceleratorTypes sets the AcceleratorTypes field's value. -func (s *DescribeNotebookInstanceOutput) SetAcceleratorTypes(v []*string) *DescribeNotebookInstanceOutput { - s.AcceleratorTypes = v - return s -} - -// SetAdditionalCodeRepositories sets the AdditionalCodeRepositories field's value. -func (s *DescribeNotebookInstanceOutput) SetAdditionalCodeRepositories(v []*string) *DescribeNotebookInstanceOutput { - s.AdditionalCodeRepositories = v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeNotebookInstanceOutput) SetCreationTime(v time.Time) *DescribeNotebookInstanceOutput { - s.CreationTime = &v - return s -} - -// SetDefaultCodeRepository sets the DefaultCodeRepository field's value. -func (s *DescribeNotebookInstanceOutput) SetDefaultCodeRepository(v string) *DescribeNotebookInstanceOutput { - s.DefaultCodeRepository = &v - return s -} - -// SetDirectInternetAccess sets the DirectInternetAccess field's value. -func (s *DescribeNotebookInstanceOutput) SetDirectInternetAccess(v string) *DescribeNotebookInstanceOutput { - s.DirectInternetAccess = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *DescribeNotebookInstanceOutput) SetFailureReason(v string) *DescribeNotebookInstanceOutput { - s.FailureReason = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *DescribeNotebookInstanceOutput) SetInstanceType(v string) *DescribeNotebookInstanceOutput { - s.InstanceType = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DescribeNotebookInstanceOutput) SetKmsKeyId(v string) *DescribeNotebookInstanceOutput { - s.KmsKeyId = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *DescribeNotebookInstanceOutput) SetLastModifiedTime(v time.Time) *DescribeNotebookInstanceOutput { - s.LastModifiedTime = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *DescribeNotebookInstanceOutput) SetNetworkInterfaceId(v string) *DescribeNotebookInstanceOutput { - s.NetworkInterfaceId = &v - return s -} - -// SetNotebookInstanceArn sets the NotebookInstanceArn field's value. -func (s *DescribeNotebookInstanceOutput) SetNotebookInstanceArn(v string) *DescribeNotebookInstanceOutput { - s.NotebookInstanceArn = &v - return s -} - -// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. -func (s *DescribeNotebookInstanceOutput) SetNotebookInstanceLifecycleConfigName(v string) *DescribeNotebookInstanceOutput { - s.NotebookInstanceLifecycleConfigName = &v - return s -} - -// SetNotebookInstanceName sets the NotebookInstanceName field's value. -func (s *DescribeNotebookInstanceOutput) SetNotebookInstanceName(v string) *DescribeNotebookInstanceOutput { - s.NotebookInstanceName = &v - return s -} - -// SetNotebookInstanceStatus sets the NotebookInstanceStatus field's value. -func (s *DescribeNotebookInstanceOutput) SetNotebookInstanceStatus(v string) *DescribeNotebookInstanceOutput { - s.NotebookInstanceStatus = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DescribeNotebookInstanceOutput) SetRoleArn(v string) *DescribeNotebookInstanceOutput { - s.RoleArn = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *DescribeNotebookInstanceOutput) SetSecurityGroups(v []*string) *DescribeNotebookInstanceOutput { - s.SecurityGroups = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *DescribeNotebookInstanceOutput) SetSubnetId(v string) *DescribeNotebookInstanceOutput { - s.SubnetId = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *DescribeNotebookInstanceOutput) SetUrl(v string) *DescribeNotebookInstanceOutput { - s.Url = &v - return s -} - -// SetVolumeSizeInGB sets the VolumeSizeInGB field's value. -func (s *DescribeNotebookInstanceOutput) SetVolumeSizeInGB(v int64) *DescribeNotebookInstanceOutput { - s.VolumeSizeInGB = &v - return s -} - -type DescribeSubscribedWorkteamInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the subscribed work team to describe. - // - // WorkteamArn is a required field - WorkteamArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeSubscribedWorkteamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSubscribedWorkteamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSubscribedWorkteamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSubscribedWorkteamInput"} - if s.WorkteamArn == nil { - invalidParams.Add(request.NewErrParamRequired("WorkteamArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWorkteamArn sets the WorkteamArn field's value. -func (s *DescribeSubscribedWorkteamInput) SetWorkteamArn(v string) *DescribeSubscribedWorkteamInput { - s.WorkteamArn = &v - return s -} - -type DescribeSubscribedWorkteamOutput struct { - _ struct{} `type:"structure"` - - // A Workteam instance that contains information about the work team. - // - // SubscribedWorkteam is a required field - SubscribedWorkteam *SubscribedWorkteam `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeSubscribedWorkteamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSubscribedWorkteamOutput) GoString() string { - return s.String() -} - -// SetSubscribedWorkteam sets the SubscribedWorkteam field's value. -func (s *DescribeSubscribedWorkteamOutput) SetSubscribedWorkteam(v *SubscribedWorkteam) *DescribeSubscribedWorkteamOutput { - s.SubscribedWorkteam = v - return s -} - -type DescribeTrainingJobInput struct { - _ struct{} `type:"structure"` - - // The name of the training job. - // - // TrainingJobName is a required field - TrainingJobName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeTrainingJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTrainingJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTrainingJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTrainingJobInput"} - if s.TrainingJobName == nil { - invalidParams.Add(request.NewErrParamRequired("TrainingJobName")) - } - if s.TrainingJobName != nil && len(*s.TrainingJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TrainingJobName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTrainingJobName sets the TrainingJobName field's value. -func (s *DescribeTrainingJobInput) SetTrainingJobName(v string) *DescribeTrainingJobInput { - s.TrainingJobName = &v - return s -} - -type DescribeTrainingJobOutput struct { - _ struct{} `type:"structure"` - - // Information about the algorithm used for training, and algorithm metadata. - // - // AlgorithmSpecification is a required field - AlgorithmSpecification *AlgorithmSpecification `type:"structure" required:"true"` - - // A timestamp that indicates when the training job was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // To encrypt all communications between ML compute instances in distributed - // training, specify True. Encryption provides greater security for distributed - // training, but training take longer because of the additional communications - // between ML compute instances. - EnableInterContainerTrafficEncryption *bool `type:"boolean"` - - // If you want to allow inbound or outbound network calls, except for calls - // between peers within a training cluster for distributed training, choose - // True. If you enable network isolation for training jobs that are configured - // to use a VPC, Amazon SageMaker downloads and uploads customer data and model - // artifacts through the specified VPC, but the training container does not - // have network access. - // - // The Semantic Segmentation built-in algorithm does not support network isolation. - EnableNetworkIsolation *bool `type:"boolean"` - - // If the training job failed, the reason it failed. - FailureReason *string `type:"string"` - - // A collection of MetricData objects that specify the names, values, and dates - // and times that the training algorithm emitted to Amazon CloudWatch. - FinalMetricDataList []*MetricData `type:"list"` - - // Algorithm-specific parameters. - HyperParameters map[string]*string `type:"map"` - - // An array of Channel objects that describes each data input channel. - InputDataConfig []*Channel `min:"1" type:"list"` - - // The Amazon Resource Name (ARN) of the Amazon SageMaker Ground Truth labeling - // job that created the transform or training job. - LabelingJobArn *string `type:"string"` - - // A timestamp that indicates when the status of the training job was last modified. - LastModifiedTime *time.Time `type:"timestamp"` - - // Information about the Amazon S3 location that is configured for storing model - // artifacts. - // - // ModelArtifacts is a required field - ModelArtifacts *ModelArtifacts `type:"structure" required:"true"` - - // The S3 path where model artifacts that you configured when creating the job - // are stored. Amazon SageMaker creates subfolders for model artifacts. - OutputDataConfig *OutputDataConfig `type:"structure"` - - // Resources, including ML compute instances and ML storage volumes, that are - // configured for model training. - // - // ResourceConfig is a required field - ResourceConfig *ResourceConfig `type:"structure" required:"true"` - - // The AWS Identity and Access Management (IAM) role configured for the training - // job. - RoleArn *string `min:"20" type:"string"` - - // Provides detailed information about the state of the training job. For detailed - // information on the secondary status of the training job, see StatusMessage - // under SecondaryStatusTransition. - // - // Amazon SageMaker provides primary statuses and secondary statuses that apply - // to each of them: - // - // InProgressStarting - Starting the training job. - // - // Downloading - An optional stage for algorithms that support File training - // input mode. It indicates that data is being downloaded to the ML storage - // volumes. - // - // Training - Training is in progress. - // - // Uploading - Training is complete and the model artifacts are being uploaded - // to the S3 location. - // - // CompletedCompleted - The training job has completed. - // - // FailedFailed - The training job has failed. The reason for the failure is - // returned in the FailureReason field of DescribeTrainingJobResponse. - // - // StoppedMaxRuntimeExceeded - The job stopped because it exceeded the maximum - // allowed runtime. - // - // Stopped - The training job has stopped. - // - // StoppingStopping - Stopping the training job. - // - // Valid values for SecondaryStatus are subject to change. - // - // We no longer support the following secondary statuses: - // - // * LaunchingMLInstances - // - // * PreparingTrainingStack - // - // * DownloadingTrainingImage - // - // SecondaryStatus is a required field - SecondaryStatus *string `type:"string" required:"true" enum:"SecondaryStatus"` - - // A history of all of the secondary statuses that the training job has transitioned - // through. - SecondaryStatusTransitions []*SecondaryStatusTransition `type:"list"` - - // The condition under which to stop the training job. - // - // StoppingCondition is a required field - StoppingCondition *StoppingCondition `type:"structure" required:"true"` - - // Indicates the time when the training job ends on training instances. You - // are billed for the time interval between the value of TrainingStartTime and - // this time. For successful jobs and stopped jobs, this is the time after model - // artifacts are uploaded. For failed jobs, this is the time when Amazon SageMaker - // detects a job failure. - TrainingEndTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the training job. - // - // TrainingJobArn is a required field - TrainingJobArn *string `type:"string" required:"true"` - - // Name of the model training job. - // - // TrainingJobName is a required field - TrainingJobName *string `min:"1" type:"string" required:"true"` - - // The status of the training job. - // - // Amazon SageMaker provides the following training job statuses: - // - // * InProgress - The training is in progress. - // - // * Completed - The training job has completed. - // - // * Failed - The training job has failed. To see the reason for the failure, - // see the FailureReason field in the response to a DescribeTrainingJobResponse - // call. - // - // * Stopping - The training job is stopping. - // - // * Stopped - The training job has stopped. - // - // For more detailed information, see SecondaryStatus. - // - // TrainingJobStatus is a required field - TrainingJobStatus *string `type:"string" required:"true" enum:"TrainingJobStatus"` - - // Indicates the time when the training job starts on training instances. You - // are billed for the time interval between this time and the value of TrainingEndTime. - // The start time in CloudWatch Logs might be later than this time. The difference - // is due to the time it takes to download the training data and to the size - // of the training container. - TrainingStartTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the associated hyperparameter tuning job - // if the training job was launched by a hyperparameter tuning job. - TuningJobArn *string `type:"string"` - - // A VpcConfig object that specifies the VPC that this training job has access - // to. For more information, see Protect Training Jobs by Using an Amazon Virtual - // Private Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html). - VpcConfig *VpcConfig `type:"structure"` -} - -// String returns the string representation -func (s DescribeTrainingJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTrainingJobOutput) GoString() string { - return s.String() -} - -// SetAlgorithmSpecification sets the AlgorithmSpecification field's value. -func (s *DescribeTrainingJobOutput) SetAlgorithmSpecification(v *AlgorithmSpecification) *DescribeTrainingJobOutput { - s.AlgorithmSpecification = v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeTrainingJobOutput) SetCreationTime(v time.Time) *DescribeTrainingJobOutput { - s.CreationTime = &v - return s -} - -// SetEnableInterContainerTrafficEncryption sets the EnableInterContainerTrafficEncryption field's value. -func (s *DescribeTrainingJobOutput) SetEnableInterContainerTrafficEncryption(v bool) *DescribeTrainingJobOutput { - s.EnableInterContainerTrafficEncryption = &v - return s -} - -// SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value. -func (s *DescribeTrainingJobOutput) SetEnableNetworkIsolation(v bool) *DescribeTrainingJobOutput { - s.EnableNetworkIsolation = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *DescribeTrainingJobOutput) SetFailureReason(v string) *DescribeTrainingJobOutput { - s.FailureReason = &v - return s -} - -// SetFinalMetricDataList sets the FinalMetricDataList field's value. -func (s *DescribeTrainingJobOutput) SetFinalMetricDataList(v []*MetricData) *DescribeTrainingJobOutput { - s.FinalMetricDataList = v - return s -} - -// SetHyperParameters sets the HyperParameters field's value. -func (s *DescribeTrainingJobOutput) SetHyperParameters(v map[string]*string) *DescribeTrainingJobOutput { - s.HyperParameters = v - return s -} - -// SetInputDataConfig sets the InputDataConfig field's value. -func (s *DescribeTrainingJobOutput) SetInputDataConfig(v []*Channel) *DescribeTrainingJobOutput { - s.InputDataConfig = v - return s -} - -// SetLabelingJobArn sets the LabelingJobArn field's value. -func (s *DescribeTrainingJobOutput) SetLabelingJobArn(v string) *DescribeTrainingJobOutput { - s.LabelingJobArn = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *DescribeTrainingJobOutput) SetLastModifiedTime(v time.Time) *DescribeTrainingJobOutput { - s.LastModifiedTime = &v - return s -} - -// SetModelArtifacts sets the ModelArtifacts field's value. -func (s *DescribeTrainingJobOutput) SetModelArtifacts(v *ModelArtifacts) *DescribeTrainingJobOutput { - s.ModelArtifacts = v - return s -} - -// SetOutputDataConfig sets the OutputDataConfig field's value. -func (s *DescribeTrainingJobOutput) SetOutputDataConfig(v *OutputDataConfig) *DescribeTrainingJobOutput { - s.OutputDataConfig = v - return s -} - -// SetResourceConfig sets the ResourceConfig field's value. -func (s *DescribeTrainingJobOutput) SetResourceConfig(v *ResourceConfig) *DescribeTrainingJobOutput { - s.ResourceConfig = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DescribeTrainingJobOutput) SetRoleArn(v string) *DescribeTrainingJobOutput { - s.RoleArn = &v - return s -} - -// SetSecondaryStatus sets the SecondaryStatus field's value. -func (s *DescribeTrainingJobOutput) SetSecondaryStatus(v string) *DescribeTrainingJobOutput { - s.SecondaryStatus = &v - return s -} - -// SetSecondaryStatusTransitions sets the SecondaryStatusTransitions field's value. -func (s *DescribeTrainingJobOutput) SetSecondaryStatusTransitions(v []*SecondaryStatusTransition) *DescribeTrainingJobOutput { - s.SecondaryStatusTransitions = v - return s -} - -// SetStoppingCondition sets the StoppingCondition field's value. -func (s *DescribeTrainingJobOutput) SetStoppingCondition(v *StoppingCondition) *DescribeTrainingJobOutput { - s.StoppingCondition = v - return s -} - -// SetTrainingEndTime sets the TrainingEndTime field's value. -func (s *DescribeTrainingJobOutput) SetTrainingEndTime(v time.Time) *DescribeTrainingJobOutput { - s.TrainingEndTime = &v - return s -} - -// SetTrainingJobArn sets the TrainingJobArn field's value. -func (s *DescribeTrainingJobOutput) SetTrainingJobArn(v string) *DescribeTrainingJobOutput { - s.TrainingJobArn = &v - return s -} - -// SetTrainingJobName sets the TrainingJobName field's value. -func (s *DescribeTrainingJobOutput) SetTrainingJobName(v string) *DescribeTrainingJobOutput { - s.TrainingJobName = &v - return s -} - -// SetTrainingJobStatus sets the TrainingJobStatus field's value. -func (s *DescribeTrainingJobOutput) SetTrainingJobStatus(v string) *DescribeTrainingJobOutput { - s.TrainingJobStatus = &v - return s -} - -// SetTrainingStartTime sets the TrainingStartTime field's value. -func (s *DescribeTrainingJobOutput) SetTrainingStartTime(v time.Time) *DescribeTrainingJobOutput { - s.TrainingStartTime = &v - return s -} - -// SetTuningJobArn sets the TuningJobArn field's value. -func (s *DescribeTrainingJobOutput) SetTuningJobArn(v string) *DescribeTrainingJobOutput { - s.TuningJobArn = &v - return s -} - -// SetVpcConfig sets the VpcConfig field's value. -func (s *DescribeTrainingJobOutput) SetVpcConfig(v *VpcConfig) *DescribeTrainingJobOutput { - s.VpcConfig = v - return s -} - -type DescribeTransformJobInput struct { - _ struct{} `type:"structure"` - - // The name of the transform job that you want to view details of. - // - // TransformJobName is a required field - TransformJobName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeTransformJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTransformJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTransformJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTransformJobInput"} - if s.TransformJobName == nil { - invalidParams.Add(request.NewErrParamRequired("TransformJobName")) - } - if s.TransformJobName != nil && len(*s.TransformJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TransformJobName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTransformJobName sets the TransformJobName field's value. -func (s *DescribeTransformJobInput) SetTransformJobName(v string) *DescribeTransformJobInput { - s.TransformJobName = &v - return s -} - -type DescribeTransformJobOutput struct { - _ struct{} `type:"structure"` - - // If you want to include only one record in a batch, specify SingleRecord.. - // If you want batches to contain a maximum of the number of records specified - // in the MaxPayloadInMB parameter, specify MultiRecord.S - BatchStrategy *string `type:"string" enum:"BatchStrategy"` - - // A timestamp that shows when the transform Job was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - Environment map[string]*string `type:"map"` - - // If the transform job failed, the reason that it failed. - FailureReason *string `type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon SageMaker Ground Truth labeling - // job that created the transform or training job. - LabelingJobArn *string `type:"string"` - - // The maximum number of parallel requests on each instance node that can be - // launched in a transform job. The default value is 1. - MaxConcurrentTransforms *int64 `type:"integer"` - - // The maximum payload size, in MB, used in the transform job. - MaxPayloadInMB *int64 `type:"integer"` - - // The name of the model used in the transform job. - // - // ModelName is a required field - ModelName *string `type:"string" required:"true"` - - // Indicates when the transform job has been completed, or has stopped or failed. - // You are billed for the time interval between this time and the value of TransformStartTime. - TransformEndTime *time.Time `type:"timestamp"` - - // Describes the dataset to be transformed and the Amazon S3 location where - // it is stored. - // - // TransformInput is a required field - TransformInput *TransformInput `type:"structure" required:"true"` - - // The Amazon Resource Name (ARN) of the transform job. - // - // TransformJobArn is a required field - TransformJobArn *string `type:"string" required:"true"` - - // The name of the transform job. - // - // TransformJobName is a required field - TransformJobName *string `min:"1" type:"string" required:"true"` - - // The status of the transform job. If the transform job failed, the reason - // is returned in the FailureReason field. - // - // TransformJobStatus is a required field - TransformJobStatus *string `type:"string" required:"true" enum:"TransformJobStatus"` - - // Identifies the Amazon S3 location where you want Amazon SageMaker to save - // the results from the transform job. - TransformOutput *TransformOutput `type:"structure"` - - // Describes the resources, including ML instance types and ML instance count, - // to use for the transform job. - // - // TransformResources is a required field - TransformResources *TransformResources `type:"structure" required:"true"` - - // Indicates when the transform job starts on ML instances. You are billed for - // the time interval between this time and the value of TransformEndTime. - TransformStartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s DescribeTransformJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTransformJobOutput) GoString() string { - return s.String() -} - -// SetBatchStrategy sets the BatchStrategy field's value. -func (s *DescribeTransformJobOutput) SetBatchStrategy(v string) *DescribeTransformJobOutput { - s.BatchStrategy = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *DescribeTransformJobOutput) SetCreationTime(v time.Time) *DescribeTransformJobOutput { - s.CreationTime = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *DescribeTransformJobOutput) SetEnvironment(v map[string]*string) *DescribeTransformJobOutput { - s.Environment = v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *DescribeTransformJobOutput) SetFailureReason(v string) *DescribeTransformJobOutput { - s.FailureReason = &v - return s -} - -// SetLabelingJobArn sets the LabelingJobArn field's value. -func (s *DescribeTransformJobOutput) SetLabelingJobArn(v string) *DescribeTransformJobOutput { - s.LabelingJobArn = &v - return s -} - -// SetMaxConcurrentTransforms sets the MaxConcurrentTransforms field's value. -func (s *DescribeTransformJobOutput) SetMaxConcurrentTransforms(v int64) *DescribeTransformJobOutput { - s.MaxConcurrentTransforms = &v - return s -} - -// SetMaxPayloadInMB sets the MaxPayloadInMB field's value. -func (s *DescribeTransformJobOutput) SetMaxPayloadInMB(v int64) *DescribeTransformJobOutput { - s.MaxPayloadInMB = &v - return s -} - -// SetModelName sets the ModelName field's value. -func (s *DescribeTransformJobOutput) SetModelName(v string) *DescribeTransformJobOutput { - s.ModelName = &v - return s -} - -// SetTransformEndTime sets the TransformEndTime field's value. -func (s *DescribeTransformJobOutput) SetTransformEndTime(v time.Time) *DescribeTransformJobOutput { - s.TransformEndTime = &v - return s -} - -// SetTransformInput sets the TransformInput field's value. -func (s *DescribeTransformJobOutput) SetTransformInput(v *TransformInput) *DescribeTransformJobOutput { - s.TransformInput = v - return s -} - -// SetTransformJobArn sets the TransformJobArn field's value. -func (s *DescribeTransformJobOutput) SetTransformJobArn(v string) *DescribeTransformJobOutput { - s.TransformJobArn = &v - return s -} - -// SetTransformJobName sets the TransformJobName field's value. -func (s *DescribeTransformJobOutput) SetTransformJobName(v string) *DescribeTransformJobOutput { - s.TransformJobName = &v - return s -} - -// SetTransformJobStatus sets the TransformJobStatus field's value. -func (s *DescribeTransformJobOutput) SetTransformJobStatus(v string) *DescribeTransformJobOutput { - s.TransformJobStatus = &v - return s -} - -// SetTransformOutput sets the TransformOutput field's value. -func (s *DescribeTransformJobOutput) SetTransformOutput(v *TransformOutput) *DescribeTransformJobOutput { - s.TransformOutput = v - return s -} - -// SetTransformResources sets the TransformResources field's value. -func (s *DescribeTransformJobOutput) SetTransformResources(v *TransformResources) *DescribeTransformJobOutput { - s.TransformResources = v - return s -} - -// SetTransformStartTime sets the TransformStartTime field's value. -func (s *DescribeTransformJobOutput) SetTransformStartTime(v time.Time) *DescribeTransformJobOutput { - s.TransformStartTime = &v - return s -} - -type DescribeWorkteamInput struct { - _ struct{} `type:"structure"` - - // The name of the work team to return a description of. - // - // WorkteamName is a required field - WorkteamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeWorkteamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkteamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeWorkteamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeWorkteamInput"} - if s.WorkteamName == nil { - invalidParams.Add(request.NewErrParamRequired("WorkteamName")) - } - if s.WorkteamName != nil && len(*s.WorkteamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkteamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWorkteamName sets the WorkteamName field's value. -func (s *DescribeWorkteamInput) SetWorkteamName(v string) *DescribeWorkteamInput { - s.WorkteamName = &v - return s -} - -type DescribeWorkteamOutput struct { - _ struct{} `type:"structure"` - - // A Workteam instance that contains information about the work team. - // - // Workteam is a required field - Workteam *Workteam `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeWorkteamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkteamOutput) GoString() string { - return s.String() -} - -// SetWorkteam sets the Workteam field's value. -func (s *DescribeWorkteamOutput) SetWorkteam(v *Workteam) *DescribeWorkteamOutput { - s.Workteam = v - return s -} - -// Specifies weight and capacity values for a production variant. -type DesiredWeightAndCapacity struct { - _ struct{} `type:"structure"` - - // The variant's capacity. - DesiredInstanceCount *int64 `min:"1" type:"integer"` - - // The variant's weight. - DesiredWeight *float64 `type:"float"` - - // The name of the variant to update. - // - // VariantName is a required field - VariantName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DesiredWeightAndCapacity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DesiredWeightAndCapacity) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DesiredWeightAndCapacity) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DesiredWeightAndCapacity"} - if s.DesiredInstanceCount != nil && *s.DesiredInstanceCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("DesiredInstanceCount", 1)) - } - if s.VariantName == nil { - invalidParams.Add(request.NewErrParamRequired("VariantName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDesiredInstanceCount sets the DesiredInstanceCount field's value. -func (s *DesiredWeightAndCapacity) SetDesiredInstanceCount(v int64) *DesiredWeightAndCapacity { - s.DesiredInstanceCount = &v - return s -} - -// SetDesiredWeight sets the DesiredWeight field's value. -func (s *DesiredWeightAndCapacity) SetDesiredWeight(v float64) *DesiredWeightAndCapacity { - s.DesiredWeight = &v - return s -} - -// SetVariantName sets the VariantName field's value. -func (s *DesiredWeightAndCapacity) SetVariantName(v string) *DesiredWeightAndCapacity { - s.VariantName = &v - return s -} - -// Provides summary information for an endpoint configuration. -type EndpointConfigSummary struct { - _ struct{} `type:"structure"` - - // A timestamp that shows when the endpoint configuration was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The Amazon Resource Name (ARN) of the endpoint configuration. - // - // EndpointConfigArn is a required field - EndpointConfigArn *string `min:"20" type:"string" required:"true"` - - // The name of the endpoint configuration. - // - // EndpointConfigName is a required field - EndpointConfigName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s EndpointConfigSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointConfigSummary) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *EndpointConfigSummary) SetCreationTime(v time.Time) *EndpointConfigSummary { - s.CreationTime = &v - return s -} - -// SetEndpointConfigArn sets the EndpointConfigArn field's value. -func (s *EndpointConfigSummary) SetEndpointConfigArn(v string) *EndpointConfigSummary { - s.EndpointConfigArn = &v - return s -} - -// SetEndpointConfigName sets the EndpointConfigName field's value. -func (s *EndpointConfigSummary) SetEndpointConfigName(v string) *EndpointConfigSummary { - s.EndpointConfigName = &v - return s -} - -// Provides summary information for an endpoint. -type EndpointSummary struct { - _ struct{} `type:"structure"` - - // A timestamp that shows when the endpoint was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The Amazon Resource Name (ARN) of the endpoint. - // - // EndpointArn is a required field - EndpointArn *string `min:"20" type:"string" required:"true"` - - // The name of the endpoint. - // - // EndpointName is a required field - EndpointName *string `type:"string" required:"true"` - - // The status of the endpoint. - // - // * OutOfService: Endpoint is not available to take incoming requests. - // - // * Creating: CreateEndpoint is executing. - // - // * Updating: UpdateEndpoint or UpdateEndpointWeightsAndCapacities is executing. - // - // * SystemUpdating: Endpoint is undergoing maintenance and cannot be updated - // or deleted or re-scaled until it has completed. This mainenance operation - // does not change any customer-specified values such as VPC config, KMS - // encryption, model, instance type, or instance count. - // - // * RollingBack: Endpoint fails to scale up or down or change its variant - // weight and is in the process of rolling back to its previous configuration. - // Once the rollback completes, endpoint returns to an InService status. - // This transitional status only applies to an endpoint that has autoscaling - // enabled and is undergoing variant weight or capacity changes as part of - // an UpdateEndpointWeightsAndCapacities call or when the UpdateEndpointWeightsAndCapacities - // operation is called explicitly. - // - // * InService: Endpoint is available to process incoming requests. - // - // * Deleting: DeleteEndpoint is executing. - // - // * Failed: Endpoint could not be created, updated, or re-scaled. Use DescribeEndpointOutput$FailureReason - // for information about the failure. DeleteEndpoint is the only operation - // that can be performed on a failed endpoint. - // - // To get a list of endpoints with a specified status, use the ListEndpointsInput$StatusEquals - // filter. - // - // EndpointStatus is a required field - EndpointStatus *string `type:"string" required:"true" enum:"EndpointStatus"` - - // A timestamp that shows when the endpoint was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s EndpointSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EndpointSummary) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *EndpointSummary) SetCreationTime(v time.Time) *EndpointSummary { - s.CreationTime = &v - return s -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *EndpointSummary) SetEndpointArn(v string) *EndpointSummary { - s.EndpointArn = &v - return s -} - -// SetEndpointName sets the EndpointName field's value. -func (s *EndpointSummary) SetEndpointName(v string) *EndpointSummary { - s.EndpointName = &v - return s -} - -// SetEndpointStatus sets the EndpointStatus field's value. -func (s *EndpointSummary) SetEndpointStatus(v string) *EndpointSummary { - s.EndpointStatus = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *EndpointSummary) SetLastModifiedTime(v time.Time) *EndpointSummary { - s.LastModifiedTime = &v - return s -} - -// A conditional statement for a search expression that includes a Boolean operator, -// a resource property, and a value. -// -// If you don't specify an Operator and a Value, the filter searches for only -// the specified property. For example, defining a Filter for the FailureReason -// for the TrainingJobResource searches for training job objects that have a -// value in the FailureReason field. -// -// If you specify a Value, but not an Operator, Amazon SageMaker uses the equals -// operator as the default. -// -// In search, there are several property types: -// -// MetricsTo define a metric filter, enter a value using the form "Metrics.", -// where is a metric name. For example, the following filter searches -// for training jobs with an "accuracy" metric greater than "0.9": -// -// { -// -// "Name": "Metrics.accuracy", -// -// "Operator": "GREATER_THAN", -// -// "Value": "0.9" -// -// } -// -// HyperParametersTo define a hyperparameter filter, enter a value with the -// form "HyperParameters.". Decimal hyperparameter values are treated -// as a decimal in a comparison if the specified Value is also a decimal value. -// If the specified Value is an integer, the decimal hyperparameter values are -// treated as integers. For example, the following filter is satisfied by training -// jobs with a "learning_rate" hyperparameter that is less than "0.5": -// -// { -// -// "Name": "HyperParameters.learning_rate", -// -// "Operator": "LESS_THAN", -// -// "Value": "0.5" -// -// } -// -// TagsTo define a tag filter, enter a value with the form "Tags.". -type Filter struct { - _ struct{} `type:"structure"` - - // A property name. For example, TrainingJobName. For the list of valid property - // names returned in a search result for each supported resource, see TrainingJob - // properties. You must specify a valid property name for the resource. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // A Boolean binary operator that is used to evaluate the filter. The operator - // field contains one of the following values: - // - // EqualsThe specified resource in Name equals the specified Value. - // - // NotEqualsThe specified resource in Name does not equal the specified Value. - // - // GreaterThanThe specified resource in Name is greater than the specified Value. - // Not supported for text-based properties. - // - // GreaterThanOrEqualToThe specified resource in Name is greater than or equal - // to the specified Value. Not supported for text-based properties. - // - // LessThanThe specified resource in Name is less than the specified Value. - // Not supported for text-based properties. - // - // LessThanOrEqualToThe specified resource in Name is less than or equal to - // the specified Value. Not supported for text-based properties. - // - // ContainsOnly supported for text-based properties. The word-list of the property - // contains the specified Value. - // - // If you have specified a filter Value, the default is Equals. - Operator *string `type:"string" enum:"Operator"` - - // A value used with Resource and Operator to determine if objects satisfy the - // filter's condition. For numerical properties, Value must be an integer or - // floating-point decimal. For timestamp properties, Value must be an ISO 8601 - // date-time string of the following format: YYYY-mm-dd'T'HH:MM:SS. - Value *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s Filter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Filter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Filter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Filter"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *Filter) SetName(v string) *Filter { - s.Name = &v - return s -} - -// SetOperator sets the Operator field's value. -func (s *Filter) SetOperator(v string) *Filter { - s.Operator = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Filter) SetValue(v string) *Filter { - s.Value = &v - return s -} - -// Shows the final value for the objective metric for a training job that was -// launched by a hyperparameter tuning job. You define the objective metric -// in the HyperParameterTuningJobObjective parameter of HyperParameterTuningJobConfig. -type FinalHyperParameterTuningJobObjectiveMetric struct { - _ struct{} `type:"structure"` - - // The name of the objective metric. - // - // MetricName is a required field - MetricName *string `min:"1" type:"string" required:"true"` - - // Whether to minimize or maximize the objective metric. Valid values are Minimize - // and Maximize. - Type *string `type:"string" enum:"HyperParameterTuningJobObjectiveType"` - - // The value of the objective metric. - // - // Value is a required field - Value *float64 `type:"float" required:"true"` -} - -// String returns the string representation -func (s FinalHyperParameterTuningJobObjectiveMetric) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FinalHyperParameterTuningJobObjectiveMetric) GoString() string { - return s.String() -} - -// SetMetricName sets the MetricName field's value. -func (s *FinalHyperParameterTuningJobObjectiveMetric) SetMetricName(v string) *FinalHyperParameterTuningJobObjectiveMetric { - s.MetricName = &v - return s -} - -// SetType sets the Type field's value. -func (s *FinalHyperParameterTuningJobObjectiveMetric) SetType(v string) *FinalHyperParameterTuningJobObjectiveMetric { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *FinalHyperParameterTuningJobObjectiveMetric) SetValue(v float64) *FinalHyperParameterTuningJobObjectiveMetric { - s.Value = &v - return s -} - -type GetSearchSuggestionsInput struct { - _ struct{} `type:"structure"` - - // The name of the Amazon SageMaker resource to Search for. The only valid Resource - // value is TrainingJob. - // - // Resource is a required field - Resource *string `type:"string" required:"true" enum:"ResourceType"` - - // Limits the property names that are included in the response. - SuggestionQuery *SuggestionQuery `type:"structure"` -} - -// String returns the string representation -func (s GetSearchSuggestionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSearchSuggestionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSearchSuggestionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSearchSuggestionsInput"} - if s.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - if s.SuggestionQuery != nil { - if err := s.SuggestionQuery.Validate(); err != nil { - invalidParams.AddNested("SuggestionQuery", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResource sets the Resource field's value. -func (s *GetSearchSuggestionsInput) SetResource(v string) *GetSearchSuggestionsInput { - s.Resource = &v - return s -} - -// SetSuggestionQuery sets the SuggestionQuery field's value. -func (s *GetSearchSuggestionsInput) SetSuggestionQuery(v *SuggestionQuery) *GetSearchSuggestionsInput { - s.SuggestionQuery = v - return s -} - -type GetSearchSuggestionsOutput struct { - _ struct{} `type:"structure"` - - // A list of property names for a Resource that match a SuggestionQuery. - PropertyNameSuggestions []*PropertyNameSuggestion `type:"list"` -} - -// String returns the string representation -func (s GetSearchSuggestionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSearchSuggestionsOutput) GoString() string { - return s.String() -} - -// SetPropertyNameSuggestions sets the PropertyNameSuggestions field's value. -func (s *GetSearchSuggestionsOutput) SetPropertyNameSuggestions(v []*PropertyNameSuggestion) *GetSearchSuggestionsOutput { - s.PropertyNameSuggestions = v - return s -} - -// Specifies configuration details for a Git repository in your AWS account. -type GitConfig struct { - _ struct{} `type:"structure"` - - // The default branch for the Git repository. - Branch *string `min:"1" type:"string"` - - // The URL where the Git repository is located. - // - // RepositoryUrl is a required field - RepositoryUrl *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that contains - // the credentials used to access the git repository. The secret must have a - // staging label of AWSCURRENT and must be in the following format: - // - // {"username": UserName, "password": Password} - SecretArn *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GitConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GitConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GitConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GitConfig"} - if s.Branch != nil && len(*s.Branch) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Branch", 1)) - } - if s.RepositoryUrl == nil { - invalidParams.Add(request.NewErrParamRequired("RepositoryUrl")) - } - if s.SecretArn != nil && len(*s.SecretArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBranch sets the Branch field's value. -func (s *GitConfig) SetBranch(v string) *GitConfig { - s.Branch = &v - return s -} - -// SetRepositoryUrl sets the RepositoryUrl field's value. -func (s *GitConfig) SetRepositoryUrl(v string) *GitConfig { - s.RepositoryUrl = &v - return s -} - -// SetSecretArn sets the SecretArn field's value. -func (s *GitConfig) SetSecretArn(v string) *GitConfig { - s.SecretArn = &v - return s -} - -// Specifies configuration details for a Git repository when the repository -// is updated. -type GitConfigForUpdate struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that contains - // the credentials used to access the git repository. The secret must have a - // staging label of AWSCURRENT and must be in the following format: - // - // {"username": UserName, "password": Password} - SecretArn *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GitConfigForUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GitConfigForUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GitConfigForUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GitConfigForUpdate"} - if s.SecretArn != nil && len(*s.SecretArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecretArn sets the SecretArn field's value. -func (s *GitConfigForUpdate) SetSecretArn(v string) *GitConfigForUpdate { - s.SecretArn = &v - return s -} - -// Information required for human workers to complete a labeling task. -type HumanTaskConfig struct { - _ struct{} `type:"structure"` - - // Configures how labels are consolidated across human workers. - // - // AnnotationConsolidationConfig is a required field - AnnotationConsolidationConfig *AnnotationConsolidationConfig `type:"structure" required:"true"` - - // Defines the maximum number of data objects that can be labeled by human workers - // at the same time. Each object may have more than one worker at one time. - MaxConcurrentTaskCount *int64 `min:"1" type:"integer"` - - // The number of human workers that will label an object. - // - // NumberOfHumanWorkersPerDataObject is a required field - NumberOfHumanWorkersPerDataObject *int64 `min:"1" type:"integer" required:"true"` - - // The Amazon Resource Name (ARN) of a Lambda function that is run before a - // data object is sent to a human worker. Use this function to provide input - // to a custom labeling job. - // - // For the built-in bounding box, image classification, semantic segmentation, - // and text classification task types, Amazon SageMaker Ground Truth provides - // the following Lambda functions: - // - // US East (Northern Virginia) (us-east-1): - // - // * arn:aws:lambda:us-east-1:432418664414:function:PRE-BoundingBox - // - // * arn:aws:lambda:us-east-1:432418664414:function:PRE-ImageMultiClass - // - // * arn:aws:lambda:us-east-1:432418664414:function:PRE-SemanticSegmentation - // - // * arn:aws:lambda:us-east-1:432418664414:function:PRE-TextMultiClass - // - // US East (Ohio) (us-east-2): - // - // * arn:aws:lambda:us-east-2:266458841044:function:PRE-BoundingBox - // - // * arn:aws:lambda:us-east-2:266458841044:function:PRE-ImageMultiClass - // - // * arn:aws:lambda:us-east-2:266458841044:function:PRE-SemanticSegmentation - // - // * arn:aws:lambda:us-east-2:266458841044:function:PRE-TextMultiClass - // - // US West (Oregon) (us-west-2): - // - // * arn:aws:lambda:us-west-2:081040173940:function:PRE-BoundingBox - // - // * arn:aws:lambda:us-west-2:081040173940:function:PRE-ImageMultiClass - // - // * arn:aws:lambda:us-west-2:081040173940:function:PRE-SemanticSegmentation - // - // * arn:aws:lambda:us-west-2:081040173940:function:PRE-TextMultiClass - // - // EU (Ireland) (eu-west-1): - // - // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-BoundingBox - // - // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-ImageMultiClass - // - // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-SemanticSegmentation - // - // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-TextMultiClass - // - // Asia Pacific (Tokyo (ap-northeast-1): - // - // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-BoundingBox - // - // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-ImageMultiClass - // - // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-SemanticSegmentation - // - // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-TextMultiClass - // - // PreHumanTaskLambdaArn is a required field - PreHumanTaskLambdaArn *string `type:"string" required:"true"` - - // The price that you pay for each task performed by a public worker. - PublicWorkforceTaskPrice *PublicWorkforceTaskPrice `type:"structure"` - - // The length of time that a task remains available for labelling by human workers. - TaskAvailabilityLifetimeInSeconds *int64 `min:"1" type:"integer"` - - // A description of the task for your human workers. - // - // TaskDescription is a required field - TaskDescription *string `min:"1" type:"string" required:"true"` - - // Keywords used to describe the task so that workers on Amazon Mechanical Turk - // can discover the task. - TaskKeywords []*string `min:"1" type:"list"` - - // The amount of time that a worker has to complete a task. - // - // TaskTimeLimitInSeconds is a required field - TaskTimeLimitInSeconds *int64 `min:"1" type:"integer" required:"true"` - - // A title for the task for your human workers. - // - // TaskTitle is a required field - TaskTitle *string `min:"1" type:"string" required:"true"` - - // Information about the user interface that workers use to complete the labeling - // task. - // - // UiConfig is a required field - UiConfig *UiConfig `type:"structure" required:"true"` - - // The Amazon Resource Name (ARN) of the work team assigned to complete the - // tasks. - // - // WorkteamArn is a required field - WorkteamArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s HumanTaskConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HumanTaskConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HumanTaskConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HumanTaskConfig"} - if s.AnnotationConsolidationConfig == nil { - invalidParams.Add(request.NewErrParamRequired("AnnotationConsolidationConfig")) - } - if s.MaxConcurrentTaskCount != nil && *s.MaxConcurrentTaskCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxConcurrentTaskCount", 1)) - } - if s.NumberOfHumanWorkersPerDataObject == nil { - invalidParams.Add(request.NewErrParamRequired("NumberOfHumanWorkersPerDataObject")) - } - if s.NumberOfHumanWorkersPerDataObject != nil && *s.NumberOfHumanWorkersPerDataObject < 1 { - invalidParams.Add(request.NewErrParamMinValue("NumberOfHumanWorkersPerDataObject", 1)) - } - if s.PreHumanTaskLambdaArn == nil { - invalidParams.Add(request.NewErrParamRequired("PreHumanTaskLambdaArn")) - } - if s.TaskAvailabilityLifetimeInSeconds != nil && *s.TaskAvailabilityLifetimeInSeconds < 1 { - invalidParams.Add(request.NewErrParamMinValue("TaskAvailabilityLifetimeInSeconds", 1)) - } - if s.TaskDescription == nil { - invalidParams.Add(request.NewErrParamRequired("TaskDescription")) - } - if s.TaskDescription != nil && len(*s.TaskDescription) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskDescription", 1)) - } - if s.TaskKeywords != nil && len(s.TaskKeywords) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskKeywords", 1)) - } - if s.TaskTimeLimitInSeconds == nil { - invalidParams.Add(request.NewErrParamRequired("TaskTimeLimitInSeconds")) - } - if s.TaskTimeLimitInSeconds != nil && *s.TaskTimeLimitInSeconds < 1 { - invalidParams.Add(request.NewErrParamMinValue("TaskTimeLimitInSeconds", 1)) - } - if s.TaskTitle == nil { - invalidParams.Add(request.NewErrParamRequired("TaskTitle")) - } - if s.TaskTitle != nil && len(*s.TaskTitle) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskTitle", 1)) - } - if s.UiConfig == nil { - invalidParams.Add(request.NewErrParamRequired("UiConfig")) - } - if s.WorkteamArn == nil { - invalidParams.Add(request.NewErrParamRequired("WorkteamArn")) - } - if s.AnnotationConsolidationConfig != nil { - if err := s.AnnotationConsolidationConfig.Validate(); err != nil { - invalidParams.AddNested("AnnotationConsolidationConfig", err.(request.ErrInvalidParams)) - } - } - if s.UiConfig != nil { - if err := s.UiConfig.Validate(); err != nil { - invalidParams.AddNested("UiConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnnotationConsolidationConfig sets the AnnotationConsolidationConfig field's value. -func (s *HumanTaskConfig) SetAnnotationConsolidationConfig(v *AnnotationConsolidationConfig) *HumanTaskConfig { - s.AnnotationConsolidationConfig = v - return s -} - -// SetMaxConcurrentTaskCount sets the MaxConcurrentTaskCount field's value. -func (s *HumanTaskConfig) SetMaxConcurrentTaskCount(v int64) *HumanTaskConfig { - s.MaxConcurrentTaskCount = &v - return s -} - -// SetNumberOfHumanWorkersPerDataObject sets the NumberOfHumanWorkersPerDataObject field's value. -func (s *HumanTaskConfig) SetNumberOfHumanWorkersPerDataObject(v int64) *HumanTaskConfig { - s.NumberOfHumanWorkersPerDataObject = &v - return s -} - -// SetPreHumanTaskLambdaArn sets the PreHumanTaskLambdaArn field's value. -func (s *HumanTaskConfig) SetPreHumanTaskLambdaArn(v string) *HumanTaskConfig { - s.PreHumanTaskLambdaArn = &v - return s -} - -// SetPublicWorkforceTaskPrice sets the PublicWorkforceTaskPrice field's value. -func (s *HumanTaskConfig) SetPublicWorkforceTaskPrice(v *PublicWorkforceTaskPrice) *HumanTaskConfig { - s.PublicWorkforceTaskPrice = v - return s -} - -// SetTaskAvailabilityLifetimeInSeconds sets the TaskAvailabilityLifetimeInSeconds field's value. -func (s *HumanTaskConfig) SetTaskAvailabilityLifetimeInSeconds(v int64) *HumanTaskConfig { - s.TaskAvailabilityLifetimeInSeconds = &v - return s -} - -// SetTaskDescription sets the TaskDescription field's value. -func (s *HumanTaskConfig) SetTaskDescription(v string) *HumanTaskConfig { - s.TaskDescription = &v - return s -} - -// SetTaskKeywords sets the TaskKeywords field's value. -func (s *HumanTaskConfig) SetTaskKeywords(v []*string) *HumanTaskConfig { - s.TaskKeywords = v - return s -} - -// SetTaskTimeLimitInSeconds sets the TaskTimeLimitInSeconds field's value. -func (s *HumanTaskConfig) SetTaskTimeLimitInSeconds(v int64) *HumanTaskConfig { - s.TaskTimeLimitInSeconds = &v - return s -} - -// SetTaskTitle sets the TaskTitle field's value. -func (s *HumanTaskConfig) SetTaskTitle(v string) *HumanTaskConfig { - s.TaskTitle = &v - return s -} - -// SetUiConfig sets the UiConfig field's value. -func (s *HumanTaskConfig) SetUiConfig(v *UiConfig) *HumanTaskConfig { - s.UiConfig = v - return s -} - -// SetWorkteamArn sets the WorkteamArn field's value. -func (s *HumanTaskConfig) SetWorkteamArn(v string) *HumanTaskConfig { - s.WorkteamArn = &v - return s -} - -// Specifies which training algorithm to use for training jobs that a hyperparameter -// tuning job launches and the metrics to monitor. -type HyperParameterAlgorithmSpecification struct { - _ struct{} `type:"structure"` - - // The name of the resource algorithm to use for the hyperparameter tuning job. - // If you specify a value for this parameter, do not specify a value for TrainingImage. - AlgorithmName *string `min:"1" type:"string"` - - // An array of MetricDefinition objects that specify the metrics that the algorithm - // emits. - MetricDefinitions []*MetricDefinition `type:"list"` - - // The registry path of the Docker image that contains the training algorithm. - // For information about Docker registry paths for built-in algorithms, see - // Algorithms Provided by Amazon SageMaker: Common Parameters (http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html). - TrainingImage *string `type:"string"` - - // The input mode that the algorithm supports: File or Pipe. In File input mode, - // Amazon SageMaker downloads the training data from Amazon S3 to the storage - // volume that is attached to the training instance and mounts the directory - // to the Docker volume for the training container. In Pipe input mode, Amazon - // SageMaker streams data directly from Amazon S3 to the container. - // - // If you specify File mode, make sure that you provision the storage volume - // that is attached to the training instance with enough capacity to accommodate - // the training data downloaded from Amazon S3, the model artifacts, and intermediate - // information. - // - // For more information about input modes, see Algorithms (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html) - // - // TrainingInputMode is a required field - TrainingInputMode *string `type:"string" required:"true" enum:"TrainingInputMode"` -} - -// String returns the string representation -func (s HyperParameterAlgorithmSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HyperParameterAlgorithmSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HyperParameterAlgorithmSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HyperParameterAlgorithmSpecification"} - if s.AlgorithmName != nil && len(*s.AlgorithmName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AlgorithmName", 1)) - } - if s.TrainingInputMode == nil { - invalidParams.Add(request.NewErrParamRequired("TrainingInputMode")) - } - if s.MetricDefinitions != nil { - for i, v := range s.MetricDefinitions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricDefinitions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlgorithmName sets the AlgorithmName field's value. -func (s *HyperParameterAlgorithmSpecification) SetAlgorithmName(v string) *HyperParameterAlgorithmSpecification { - s.AlgorithmName = &v - return s -} - -// SetMetricDefinitions sets the MetricDefinitions field's value. -func (s *HyperParameterAlgorithmSpecification) SetMetricDefinitions(v []*MetricDefinition) *HyperParameterAlgorithmSpecification { - s.MetricDefinitions = v - return s -} - -// SetTrainingImage sets the TrainingImage field's value. -func (s *HyperParameterAlgorithmSpecification) SetTrainingImage(v string) *HyperParameterAlgorithmSpecification { - s.TrainingImage = &v - return s -} - -// SetTrainingInputMode sets the TrainingInputMode field's value. -func (s *HyperParameterAlgorithmSpecification) SetTrainingInputMode(v string) *HyperParameterAlgorithmSpecification { - s.TrainingInputMode = &v - return s -} - -// Defines a hyperparameter to be used by an algorithm. -type HyperParameterSpecification struct { - _ struct{} `type:"structure"` - - // The default value for this hyperparameter. If a default value is specified, - // a hyperparameter cannot be required. - DefaultValue *string `type:"string"` - - // A brief description of the hyperparameter. - Description *string `type:"string"` - - // Indicates whether this hyperparameter is required. - IsRequired *bool `type:"boolean"` - - // Indicates whether this hyperparameter is tunable in a hyperparameter tuning - // job. - IsTunable *bool `type:"boolean"` - - // The name of this hyperparameter. The name must be unique. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The allowed range for this hyperparameter. - Range *ParameterRange `type:"structure"` - - // The type of this hyperparameter. The valid types are Integer, Continuous, - // Categorical, and FreeText. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"ParameterType"` -} - -// String returns the string representation -func (s HyperParameterSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HyperParameterSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HyperParameterSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HyperParameterSpecification"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Range != nil { - if err := s.Range.Validate(); err != nil { - invalidParams.AddNested("Range", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *HyperParameterSpecification) SetDefaultValue(v string) *HyperParameterSpecification { - s.DefaultValue = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *HyperParameterSpecification) SetDescription(v string) *HyperParameterSpecification { - s.Description = &v - return s -} - -// SetIsRequired sets the IsRequired field's value. -func (s *HyperParameterSpecification) SetIsRequired(v bool) *HyperParameterSpecification { - s.IsRequired = &v - return s -} - -// SetIsTunable sets the IsTunable field's value. -func (s *HyperParameterSpecification) SetIsTunable(v bool) *HyperParameterSpecification { - s.IsTunable = &v - return s -} - -// SetName sets the Name field's value. -func (s *HyperParameterSpecification) SetName(v string) *HyperParameterSpecification { - s.Name = &v - return s -} - -// SetRange sets the Range field's value. -func (s *HyperParameterSpecification) SetRange(v *ParameterRange) *HyperParameterSpecification { - s.Range = v - return s -} - -// SetType sets the Type field's value. -func (s *HyperParameterSpecification) SetType(v string) *HyperParameterSpecification { - s.Type = &v - return s -} - -// Defines the training jobs launched by a hyperparameter tuning job. -type HyperParameterTrainingJobDefinition struct { - _ struct{} `type:"structure"` - - // The HyperParameterAlgorithmSpecification object that specifies the resource - // algorithm to use for the training jobs that the tuning job launches. - // - // AlgorithmSpecification is a required field - AlgorithmSpecification *HyperParameterAlgorithmSpecification `type:"structure" required:"true"` - - // To encrypt all communications between ML compute instances in distributed - // training, specify True. Encryption provides greater security for distributed - // training, but training take longer because of the additional communications - // between ML compute instances. - EnableInterContainerTrafficEncryption *bool `type:"boolean"` - - // Isolates the training container. No inbound or outbound network calls can - // be made, except for calls between peers within a training cluster for distributed - // training. If network isolation is used for training jobs that are configured - // to use a VPC, Amazon SageMaker downloads and uploads customer data and model - // artifacts through the specified VPC, but the training container does not - // have network access. - // - // The Semantic Segmentation built-in algorithm does not support network isolation. - EnableNetworkIsolation *bool `type:"boolean"` - - // An array of Channel objects that specify the input for the training jobs - // that the tuning job launches. - InputDataConfig []*Channel `min:"1" type:"list"` - - // Specifies the path to the Amazon S3 bucket where you store model artifacts - // from the training jobs that the tuning job launches. - // - // OutputDataConfig is a required field - OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` - - // The resources, including the compute instances and storage volumes, to use - // for the training jobs that the tuning job launches. - // - // Storage volumes store model artifacts and incremental states. Training algorithms - // might also use storage volumes for scratch space. If you want Amazon SageMaker - // to use the storage volume to store the training data, choose File as the - // TrainingInputMode in the algorithm specification. For distributed training - // algorithms, specify an instance count greater than 1. - // - // ResourceConfig is a required field - ResourceConfig *ResourceConfig `type:"structure" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM role associated with the training - // jobs that the tuning job launches. - // - // RoleArn is a required field - RoleArn *string `min:"20" type:"string" required:"true"` - - // Specifies the values of hyperparameters that do not change for the tuning - // job. - StaticHyperParameters map[string]*string `type:"map"` - - // Sets a maximum duration for the training jobs that the tuning job launches. - // Use this parameter to limit model training costs. - // - // To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal. This - // delays job termination for 120 seconds. Algorithms might use this 120-second - // window to save the model artifacts. - // - // When Amazon SageMaker terminates a job because the stopping condition has - // been met, training algorithms provided by Amazon SageMaker save the intermediate - // results of the job. - // - // StoppingCondition is a required field - StoppingCondition *StoppingCondition `type:"structure" required:"true"` - - // The VpcConfig object that specifies the VPC that you want the training jobs - // that this hyperparameter tuning job launches to connect to. Control access - // to and from your training container by configuring the VPC. For more information, - // see Protect Training Jobs by Using an Amazon Virtual Private Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html). - VpcConfig *VpcConfig `type:"structure"` -} - -// String returns the string representation -func (s HyperParameterTrainingJobDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HyperParameterTrainingJobDefinition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HyperParameterTrainingJobDefinition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HyperParameterTrainingJobDefinition"} - if s.AlgorithmSpecification == nil { - invalidParams.Add(request.NewErrParamRequired("AlgorithmSpecification")) - } - if s.InputDataConfig != nil && len(s.InputDataConfig) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputDataConfig", 1)) - } - if s.OutputDataConfig == nil { - invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) - } - if s.ResourceConfig == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceConfig")) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.StoppingCondition == nil { - invalidParams.Add(request.NewErrParamRequired("StoppingCondition")) - } - if s.AlgorithmSpecification != nil { - if err := s.AlgorithmSpecification.Validate(); err != nil { - invalidParams.AddNested("AlgorithmSpecification", err.(request.ErrInvalidParams)) - } - } - if s.InputDataConfig != nil { - for i, v := range s.InputDataConfig { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputDataConfig", i), err.(request.ErrInvalidParams)) - } - } - } - if s.OutputDataConfig != nil { - if err := s.OutputDataConfig.Validate(); err != nil { - invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) - } - } - if s.ResourceConfig != nil { - if err := s.ResourceConfig.Validate(); err != nil { - invalidParams.AddNested("ResourceConfig", err.(request.ErrInvalidParams)) - } - } - if s.StoppingCondition != nil { - if err := s.StoppingCondition.Validate(); err != nil { - invalidParams.AddNested("StoppingCondition", err.(request.ErrInvalidParams)) - } - } - if s.VpcConfig != nil { - if err := s.VpcConfig.Validate(); err != nil { - invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlgorithmSpecification sets the AlgorithmSpecification field's value. -func (s *HyperParameterTrainingJobDefinition) SetAlgorithmSpecification(v *HyperParameterAlgorithmSpecification) *HyperParameterTrainingJobDefinition { - s.AlgorithmSpecification = v - return s -} - -// SetEnableInterContainerTrafficEncryption sets the EnableInterContainerTrafficEncryption field's value. -func (s *HyperParameterTrainingJobDefinition) SetEnableInterContainerTrafficEncryption(v bool) *HyperParameterTrainingJobDefinition { - s.EnableInterContainerTrafficEncryption = &v - return s -} - -// SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value. -func (s *HyperParameterTrainingJobDefinition) SetEnableNetworkIsolation(v bool) *HyperParameterTrainingJobDefinition { - s.EnableNetworkIsolation = &v - return s -} - -// SetInputDataConfig sets the InputDataConfig field's value. -func (s *HyperParameterTrainingJobDefinition) SetInputDataConfig(v []*Channel) *HyperParameterTrainingJobDefinition { - s.InputDataConfig = v - return s -} - -// SetOutputDataConfig sets the OutputDataConfig field's value. -func (s *HyperParameterTrainingJobDefinition) SetOutputDataConfig(v *OutputDataConfig) *HyperParameterTrainingJobDefinition { - s.OutputDataConfig = v - return s -} - -// SetResourceConfig sets the ResourceConfig field's value. -func (s *HyperParameterTrainingJobDefinition) SetResourceConfig(v *ResourceConfig) *HyperParameterTrainingJobDefinition { - s.ResourceConfig = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *HyperParameterTrainingJobDefinition) SetRoleArn(v string) *HyperParameterTrainingJobDefinition { - s.RoleArn = &v - return s -} - -// SetStaticHyperParameters sets the StaticHyperParameters field's value. -func (s *HyperParameterTrainingJobDefinition) SetStaticHyperParameters(v map[string]*string) *HyperParameterTrainingJobDefinition { - s.StaticHyperParameters = v - return s -} - -// SetStoppingCondition sets the StoppingCondition field's value. -func (s *HyperParameterTrainingJobDefinition) SetStoppingCondition(v *StoppingCondition) *HyperParameterTrainingJobDefinition { - s.StoppingCondition = v - return s -} - -// SetVpcConfig sets the VpcConfig field's value. -func (s *HyperParameterTrainingJobDefinition) SetVpcConfig(v *VpcConfig) *HyperParameterTrainingJobDefinition { - s.VpcConfig = v - return s -} - -// Specifies summary information about a training job. -type HyperParameterTrainingJobSummary struct { - _ struct{} `type:"structure"` - - // The date and time that the training job was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The reason that the training job failed. - FailureReason *string `type:"string"` - - // The FinalHyperParameterTuningJobObjectiveMetric object that specifies the - // value of the objective metric of the tuning job that launched this training - // job. - FinalHyperParameterTuningJobObjectiveMetric *FinalHyperParameterTuningJobObjectiveMetric `type:"structure"` - - // The status of the objective metric for the training job: - // - // * Succeeded: The final objective metric for the training job was evaluated - // by the hyperparameter tuning job and used in the hyperparameter tuning - // process. - // - // * Pending: The training job is in progress and evaluation of its final - // objective metric is pending. - // - // * Failed: The final objective metric for the training job was not evaluated, - // and was not used in the hyperparameter tuning process. This typically - // occurs when the training job failed or did not emit an objective metric. - ObjectiveStatus *string `type:"string" enum:"ObjectiveStatus"` - - // Specifies the time when the training job ends on training instances. You - // are billed for the time interval between the value of TrainingStartTime and - // this time. For successful jobs and stopped jobs, this is the time after model - // artifacts are uploaded. For failed jobs, this is the time when Amazon SageMaker - // detects a job failure. - TrainingEndTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the training job. - // - // TrainingJobArn is a required field - TrainingJobArn *string `type:"string" required:"true"` - - // The name of the training job. - // - // TrainingJobName is a required field - TrainingJobName *string `min:"1" type:"string" required:"true"` - - // The status of the training job. - // - // TrainingJobStatus is a required field - TrainingJobStatus *string `type:"string" required:"true" enum:"TrainingJobStatus"` - - // The date and time that the training job started. - TrainingStartTime *time.Time `type:"timestamp"` - - // A list of the hyperparameters for which you specified ranges to search. - // - // TunedHyperParameters is a required field - TunedHyperParameters map[string]*string `type:"map" required:"true"` - - // The HyperParameter tuning job that launched the training job. - TuningJobName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s HyperParameterTrainingJobSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HyperParameterTrainingJobSummary) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *HyperParameterTrainingJobSummary) SetCreationTime(v time.Time) *HyperParameterTrainingJobSummary { - s.CreationTime = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *HyperParameterTrainingJobSummary) SetFailureReason(v string) *HyperParameterTrainingJobSummary { - s.FailureReason = &v - return s -} - -// SetFinalHyperParameterTuningJobObjectiveMetric sets the FinalHyperParameterTuningJobObjectiveMetric field's value. -func (s *HyperParameterTrainingJobSummary) SetFinalHyperParameterTuningJobObjectiveMetric(v *FinalHyperParameterTuningJobObjectiveMetric) *HyperParameterTrainingJobSummary { - s.FinalHyperParameterTuningJobObjectiveMetric = v - return s -} - -// SetObjectiveStatus sets the ObjectiveStatus field's value. -func (s *HyperParameterTrainingJobSummary) SetObjectiveStatus(v string) *HyperParameterTrainingJobSummary { - s.ObjectiveStatus = &v - return s -} - -// SetTrainingEndTime sets the TrainingEndTime field's value. -func (s *HyperParameterTrainingJobSummary) SetTrainingEndTime(v time.Time) *HyperParameterTrainingJobSummary { - s.TrainingEndTime = &v - return s -} - -// SetTrainingJobArn sets the TrainingJobArn field's value. -func (s *HyperParameterTrainingJobSummary) SetTrainingJobArn(v string) *HyperParameterTrainingJobSummary { - s.TrainingJobArn = &v - return s -} - -// SetTrainingJobName sets the TrainingJobName field's value. -func (s *HyperParameterTrainingJobSummary) SetTrainingJobName(v string) *HyperParameterTrainingJobSummary { - s.TrainingJobName = &v - return s -} - -// SetTrainingJobStatus sets the TrainingJobStatus field's value. -func (s *HyperParameterTrainingJobSummary) SetTrainingJobStatus(v string) *HyperParameterTrainingJobSummary { - s.TrainingJobStatus = &v - return s -} - -// SetTrainingStartTime sets the TrainingStartTime field's value. -func (s *HyperParameterTrainingJobSummary) SetTrainingStartTime(v time.Time) *HyperParameterTrainingJobSummary { - s.TrainingStartTime = &v - return s -} - -// SetTunedHyperParameters sets the TunedHyperParameters field's value. -func (s *HyperParameterTrainingJobSummary) SetTunedHyperParameters(v map[string]*string) *HyperParameterTrainingJobSummary { - s.TunedHyperParameters = v - return s -} - -// SetTuningJobName sets the TuningJobName field's value. -func (s *HyperParameterTrainingJobSummary) SetTuningJobName(v string) *HyperParameterTrainingJobSummary { - s.TuningJobName = &v - return s -} - -// Configures a hyperparameter tuning job. -type HyperParameterTuningJobConfig struct { - _ struct{} `type:"structure"` - - // The HyperParameterTuningJobObjective object that specifies the objective - // metric for this tuning job. - // - // HyperParameterTuningJobObjective is a required field - HyperParameterTuningJobObjective *HyperParameterTuningJobObjective `type:"structure" required:"true"` - - // The ParameterRanges object that specifies the ranges of hyperparameters that - // this tuning job searches. - // - // ParameterRanges is a required field - ParameterRanges *ParameterRanges `type:"structure" required:"true"` - - // The ResourceLimits object that specifies the maximum number of training jobs - // and parallel training jobs for this tuning job. - // - // ResourceLimits is a required field - ResourceLimits *ResourceLimits `type:"structure" required:"true"` - - // Specifies the search strategy for hyperparameters. Currently, the only valid - // value is Bayesian. - // - // Strategy is a required field - Strategy *string `type:"string" required:"true" enum:"HyperParameterTuningJobStrategyType"` - - // Specifies whether to use early stopping for training jobs launched by the - // hyperparameter tuning job. This can be one of the following values (the default - // value is OFF): - // - // OFFTraining jobs launched by the hyperparameter tuning job do not use early - // stopping. - // - // AUTOAmazon SageMaker stops training jobs launched by the hyperparameter tuning - // job when they are unlikely to perform better than previously completed training - // jobs. For more information, see Stop Training Jobs Early (http://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning-early-stopping.html). - TrainingJobEarlyStoppingType *string `type:"string" enum:"TrainingJobEarlyStoppingType"` -} - -// String returns the string representation -func (s HyperParameterTuningJobConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HyperParameterTuningJobConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HyperParameterTuningJobConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HyperParameterTuningJobConfig"} - if s.HyperParameterTuningJobObjective == nil { - invalidParams.Add(request.NewErrParamRequired("HyperParameterTuningJobObjective")) - } - if s.ParameterRanges == nil { - invalidParams.Add(request.NewErrParamRequired("ParameterRanges")) - } - if s.ResourceLimits == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceLimits")) - } - if s.Strategy == nil { - invalidParams.Add(request.NewErrParamRequired("Strategy")) - } - if s.HyperParameterTuningJobObjective != nil { - if err := s.HyperParameterTuningJobObjective.Validate(); err != nil { - invalidParams.AddNested("HyperParameterTuningJobObjective", err.(request.ErrInvalidParams)) - } - } - if s.ParameterRanges != nil { - if err := s.ParameterRanges.Validate(); err != nil { - invalidParams.AddNested("ParameterRanges", err.(request.ErrInvalidParams)) - } - } - if s.ResourceLimits != nil { - if err := s.ResourceLimits.Validate(); err != nil { - invalidParams.AddNested("ResourceLimits", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHyperParameterTuningJobObjective sets the HyperParameterTuningJobObjective field's value. -func (s *HyperParameterTuningJobConfig) SetHyperParameterTuningJobObjective(v *HyperParameterTuningJobObjective) *HyperParameterTuningJobConfig { - s.HyperParameterTuningJobObjective = v - return s -} - -// SetParameterRanges sets the ParameterRanges field's value. -func (s *HyperParameterTuningJobConfig) SetParameterRanges(v *ParameterRanges) *HyperParameterTuningJobConfig { - s.ParameterRanges = v - return s -} - -// SetResourceLimits sets the ResourceLimits field's value. -func (s *HyperParameterTuningJobConfig) SetResourceLimits(v *ResourceLimits) *HyperParameterTuningJobConfig { - s.ResourceLimits = v - return s -} - -// SetStrategy sets the Strategy field's value. -func (s *HyperParameterTuningJobConfig) SetStrategy(v string) *HyperParameterTuningJobConfig { - s.Strategy = &v - return s -} - -// SetTrainingJobEarlyStoppingType sets the TrainingJobEarlyStoppingType field's value. -func (s *HyperParameterTuningJobConfig) SetTrainingJobEarlyStoppingType(v string) *HyperParameterTuningJobConfig { - s.TrainingJobEarlyStoppingType = &v - return s -} - -// Defines the objective metric for a hyperparameter tuning job. Hyperparameter -// tuning uses the value of this metric to evaluate the training jobs it launches, -// and returns the training job that results in either the highest or lowest -// value for this metric, depending on the value you specify for the Type parameter. -type HyperParameterTuningJobObjective struct { - _ struct{} `type:"structure"` - - // The name of the metric to use for the objective metric. - // - // MetricName is a required field - MetricName *string `min:"1" type:"string" required:"true"` - - // Whether to minimize or maximize the objective metric. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"HyperParameterTuningJobObjectiveType"` -} - -// String returns the string representation -func (s HyperParameterTuningJobObjective) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HyperParameterTuningJobObjective) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HyperParameterTuningJobObjective) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HyperParameterTuningJobObjective"} - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.MetricName != nil && len(*s.MetricName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMetricName sets the MetricName field's value. -func (s *HyperParameterTuningJobObjective) SetMetricName(v string) *HyperParameterTuningJobObjective { - s.MetricName = &v - return s -} - -// SetType sets the Type field's value. -func (s *HyperParameterTuningJobObjective) SetType(v string) *HyperParameterTuningJobObjective { - s.Type = &v - return s -} - -// Provides summary information about a hyperparameter tuning job. -type HyperParameterTuningJobSummary struct { - _ struct{} `type:"structure"` - - // The date and time that the tuning job was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The date and time that the tuning job ended. - HyperParameterTuningEndTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the tuning job. - // - // HyperParameterTuningJobArn is a required field - HyperParameterTuningJobArn *string `type:"string" required:"true"` - - // The name of the tuning job. - // - // HyperParameterTuningJobName is a required field - HyperParameterTuningJobName *string `min:"1" type:"string" required:"true"` - - // The status of the tuning job. - // - // HyperParameterTuningJobStatus is a required field - HyperParameterTuningJobStatus *string `type:"string" required:"true" enum:"HyperParameterTuningJobStatus"` - - // The date and time that the tuning job was modified. - LastModifiedTime *time.Time `type:"timestamp"` - - // The ObjectiveStatusCounters object that specifies the numbers of training - // jobs, categorized by objective metric status, that this tuning job launched. - // - // ObjectiveStatusCounters is a required field - ObjectiveStatusCounters *ObjectiveStatusCounters `type:"structure" required:"true"` - - // The ResourceLimits object that specifies the maximum number of training jobs - // and parallel training jobs allowed for this tuning job. - ResourceLimits *ResourceLimits `type:"structure"` - - // Specifies the search strategy hyperparameter tuning uses to choose which - // hyperparameters to use for each iteration. Currently, the only valid value - // is Bayesian. - // - // Strategy is a required field - Strategy *string `type:"string" required:"true" enum:"HyperParameterTuningJobStrategyType"` - - // The TrainingJobStatusCounters object that specifies the numbers of training - // jobs, categorized by status, that this tuning job launched. - // - // TrainingJobStatusCounters is a required field - TrainingJobStatusCounters *TrainingJobStatusCounters `type:"structure" required:"true"` -} - -// String returns the string representation -func (s HyperParameterTuningJobSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HyperParameterTuningJobSummary) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *HyperParameterTuningJobSummary) SetCreationTime(v time.Time) *HyperParameterTuningJobSummary { - s.CreationTime = &v - return s -} - -// SetHyperParameterTuningEndTime sets the HyperParameterTuningEndTime field's value. -func (s *HyperParameterTuningJobSummary) SetHyperParameterTuningEndTime(v time.Time) *HyperParameterTuningJobSummary { - s.HyperParameterTuningEndTime = &v - return s -} - -// SetHyperParameterTuningJobArn sets the HyperParameterTuningJobArn field's value. -func (s *HyperParameterTuningJobSummary) SetHyperParameterTuningJobArn(v string) *HyperParameterTuningJobSummary { - s.HyperParameterTuningJobArn = &v - return s -} - -// SetHyperParameterTuningJobName sets the HyperParameterTuningJobName field's value. -func (s *HyperParameterTuningJobSummary) SetHyperParameterTuningJobName(v string) *HyperParameterTuningJobSummary { - s.HyperParameterTuningJobName = &v - return s -} - -// SetHyperParameterTuningJobStatus sets the HyperParameterTuningJobStatus field's value. -func (s *HyperParameterTuningJobSummary) SetHyperParameterTuningJobStatus(v string) *HyperParameterTuningJobSummary { - s.HyperParameterTuningJobStatus = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *HyperParameterTuningJobSummary) SetLastModifiedTime(v time.Time) *HyperParameterTuningJobSummary { - s.LastModifiedTime = &v - return s -} - -// SetObjectiveStatusCounters sets the ObjectiveStatusCounters field's value. -func (s *HyperParameterTuningJobSummary) SetObjectiveStatusCounters(v *ObjectiveStatusCounters) *HyperParameterTuningJobSummary { - s.ObjectiveStatusCounters = v - return s -} - -// SetResourceLimits sets the ResourceLimits field's value. -func (s *HyperParameterTuningJobSummary) SetResourceLimits(v *ResourceLimits) *HyperParameterTuningJobSummary { - s.ResourceLimits = v - return s -} - -// SetStrategy sets the Strategy field's value. -func (s *HyperParameterTuningJobSummary) SetStrategy(v string) *HyperParameterTuningJobSummary { - s.Strategy = &v - return s -} - -// SetTrainingJobStatusCounters sets the TrainingJobStatusCounters field's value. -func (s *HyperParameterTuningJobSummary) SetTrainingJobStatusCounters(v *TrainingJobStatusCounters) *HyperParameterTuningJobSummary { - s.TrainingJobStatusCounters = v - return s -} - -// Specifies the configuration for a hyperparameter tuning job that uses one -// or more previous hyperparameter tuning jobs as a starting point. The results -// of previous tuning jobs are used to inform which combinations of hyperparameters -// to search over in the new tuning job. -// -// All training jobs launched by the new hyperparameter tuning job are evaluated -// by using the objective metric, and the training job that performs the best -// is compared to the best training jobs from the parent tuning jobs. From these, -// the training job that performs the best as measured by the objective metric -// is returned as the overall best training job. -// -// All training jobs launched by parent hyperparameter tuning jobs and the new -// hyperparameter tuning jobs count against the limit of training jobs for the -// tuning job. -type HyperParameterTuningJobWarmStartConfig struct { - _ struct{} `type:"structure"` - - // An array of hyperparameter tuning jobs that are used as the starting point - // for the new hyperparameter tuning job. For more information about warm starting - // a hyperparameter tuning job, see Using a Previous Hyperparameter Tuning Job - // as a Starting Point (http://docs.aws.amazon.com/automatic-model-tuning-incremental). - // - // Hyperparameter tuning jobs created before October 1, 2018 cannot be used - // as parent jobs for warm start tuning jobs. - // - // ParentHyperParameterTuningJobs is a required field - ParentHyperParameterTuningJobs []*ParentHyperParameterTuningJob `min:"1" type:"list" required:"true"` - - // Specifies one of the following: - // - // IDENTICAL_DATA_AND_ALGORITHMThe new hyperparameter tuning job uses the same - // input data and training image as the parent tuning jobs. You can change the - // hyperparameter ranges to search and the maximum number of training jobs that - // the hyperparameter tuning job launches. You cannot use a new version of the - // training algorithm, unless the changes in the new version do not affect the - // algorithm itself. For example, changes that improve logging or adding support - // for a different data format are allowed. You can also change hyperparameters - // from tunable to static, and from static to tunable, but the total number - // of static plus tunable hyperparameters must remain the same as it is in all - // parent jobs. The objective metric for the new tuning job must be the same - // as for all parent jobs. - // - // TRANSFER_LEARNINGThe new hyperparameter tuning job can include input data, - // hyperparameter ranges, maximum number of concurrent training jobs, and maximum - // number of training jobs that are different than those of its parent hyperparameter - // tuning jobs. The training image can also be a different version from the - // version used in the parent hyperparameter tuning job. You can also change - // hyperparameters from tunable to static, and from static to tunable, but the - // total number of static plus tunable hyperparameters must remain the same - // as it is in all parent jobs. The objective metric for the new tuning job - // must be the same as for all parent jobs. - // - // WarmStartType is a required field - WarmStartType *string `type:"string" required:"true" enum:"HyperParameterTuningJobWarmStartType"` -} - -// String returns the string representation -func (s HyperParameterTuningJobWarmStartConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HyperParameterTuningJobWarmStartConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HyperParameterTuningJobWarmStartConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HyperParameterTuningJobWarmStartConfig"} - if s.ParentHyperParameterTuningJobs == nil { - invalidParams.Add(request.NewErrParamRequired("ParentHyperParameterTuningJobs")) - } - if s.ParentHyperParameterTuningJobs != nil && len(s.ParentHyperParameterTuningJobs) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ParentHyperParameterTuningJobs", 1)) - } - if s.WarmStartType == nil { - invalidParams.Add(request.NewErrParamRequired("WarmStartType")) - } - if s.ParentHyperParameterTuningJobs != nil { - for i, v := range s.ParentHyperParameterTuningJobs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParentHyperParameterTuningJobs", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetParentHyperParameterTuningJobs sets the ParentHyperParameterTuningJobs field's value. -func (s *HyperParameterTuningJobWarmStartConfig) SetParentHyperParameterTuningJobs(v []*ParentHyperParameterTuningJob) *HyperParameterTuningJobWarmStartConfig { - s.ParentHyperParameterTuningJobs = v - return s -} - -// SetWarmStartType sets the WarmStartType field's value. -func (s *HyperParameterTuningJobWarmStartConfig) SetWarmStartType(v string) *HyperParameterTuningJobWarmStartConfig { - s.WarmStartType = &v - return s -} - -// Defines how to perform inference generation after a training job is run. -type InferenceSpecification struct { - _ struct{} `type:"structure"` - - // The Amazon ECR registry path of the Docker image that contains the inference - // code. - // - // Containers is a required field - Containers []*ModelPackageContainerDefinition `min:"1" type:"list" required:"true"` - - // The supported MIME types for the input data. - // - // SupportedContentTypes is a required field - SupportedContentTypes []*string `type:"list" required:"true"` - - // A list of the instance types that are used to generate inferences in real-time. - // - // SupportedRealtimeInferenceInstanceTypes is a required field - SupportedRealtimeInferenceInstanceTypes []*string `type:"list" required:"true"` - - // The supported MIME types for the output data. - // - // SupportedResponseMIMETypes is a required field - SupportedResponseMIMETypes []*string `type:"list" required:"true"` - - // A list of the instance types on which a transformation job can be run or - // on which an endpoint can be deployed. - // - // SupportedTransformInstanceTypes is a required field - SupportedTransformInstanceTypes []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s InferenceSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InferenceSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InferenceSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InferenceSpecification"} - if s.Containers == nil { - invalidParams.Add(request.NewErrParamRequired("Containers")) - } - if s.Containers != nil && len(s.Containers) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Containers", 1)) - } - if s.SupportedContentTypes == nil { - invalidParams.Add(request.NewErrParamRequired("SupportedContentTypes")) - } - if s.SupportedRealtimeInferenceInstanceTypes == nil { - invalidParams.Add(request.NewErrParamRequired("SupportedRealtimeInferenceInstanceTypes")) - } - if s.SupportedResponseMIMETypes == nil { - invalidParams.Add(request.NewErrParamRequired("SupportedResponseMIMETypes")) - } - if s.SupportedTransformInstanceTypes == nil { - invalidParams.Add(request.NewErrParamRequired("SupportedTransformInstanceTypes")) - } - if s.SupportedTransformInstanceTypes != nil && len(s.SupportedTransformInstanceTypes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SupportedTransformInstanceTypes", 1)) - } - if s.Containers != nil { - for i, v := range s.Containers { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Containers", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainers sets the Containers field's value. -func (s *InferenceSpecification) SetContainers(v []*ModelPackageContainerDefinition) *InferenceSpecification { - s.Containers = v - return s -} - -// SetSupportedContentTypes sets the SupportedContentTypes field's value. -func (s *InferenceSpecification) SetSupportedContentTypes(v []*string) *InferenceSpecification { - s.SupportedContentTypes = v - return s -} - -// SetSupportedRealtimeInferenceInstanceTypes sets the SupportedRealtimeInferenceInstanceTypes field's value. -func (s *InferenceSpecification) SetSupportedRealtimeInferenceInstanceTypes(v []*string) *InferenceSpecification { - s.SupportedRealtimeInferenceInstanceTypes = v - return s -} - -// SetSupportedResponseMIMETypes sets the SupportedResponseMIMETypes field's value. -func (s *InferenceSpecification) SetSupportedResponseMIMETypes(v []*string) *InferenceSpecification { - s.SupportedResponseMIMETypes = v - return s -} - -// SetSupportedTransformInstanceTypes sets the SupportedTransformInstanceTypes field's value. -func (s *InferenceSpecification) SetSupportedTransformInstanceTypes(v []*string) *InferenceSpecification { - s.SupportedTransformInstanceTypes = v - return s -} - -// Contains information about the location of input model artifacts, the name -// and shape of the expected data inputs, and the framework in which the model -// was trained. -type InputConfig struct { - _ struct{} `type:"structure"` - - // Specifies the name and shape of the expected data inputs for your trained - // model with a JSON dictionary form. The data inputs are InputConfig$Framework - // specific. - // - // * TensorFlow: You must specify the name and shape (NHWC format) of the - // expected data inputs using a dictionary format for your trained model. - // The dictionary formats required for the console and CLI are different. - // - // Examples for one input: - // - // If using the console, {"input":[1,1024,1024,3]} - // - // If using the CLI, {\"input\":[1,1024,1024,3]} - // - // Examples for two inputs: - // - // If using the console, {"data1": [1,28,28,1], "data2":[1,28,28,1]} - // - // If using the CLI, {\"data1\": [1,28,28,1], \"data2\":[1,28,28,1]} - // - // * MXNET/ONNX: You must specify the name and shape (NCHW format) of the - // expected data inputs in order using a dictionary format for your trained - // model. The dictionary formats required for the console and CLI are different. - // - // Examples for one input: - // - // If using the console, {"data":[1,3,1024,1024]} - // - // If using the CLI, {\"data\":[1,3,1024,1024]} - // - // Examples for two inputs: - // - // If using the console, {"var1": [1,1,28,28], "var2":[1,1,28,28]} - // - // If using the CLI, {\"var1\": [1,1,28,28], \"var2\":[1,1,28,28]} - // - // * PyTorch: You can either specify the name and shape (NCHW format) of - // expected data inputs in order using a dictionary format for your trained - // model or you can specify the shape only using a list format. The dictionary - // formats required for the console and CLI are different. The list formats - // for the console and CLI are the same. - // - // Examples for one input in dictionary format: - // - // If using the console, {"input0":[1,3,224,224]} - // - // If using the CLI, {\"input0\":[1,3,224,224]} - // - // Example for one input in list format: [[1,3,224,224]] - // - // Examples for two inputs in dictionary format: - // - // If using the console, {"input0":[1,3,224,224], "input1":[1,3,224,224]} - // - // If using the CLI, {\"input0\":[1,3,224,224], \"input1\":[1,3,224,224]} - // - // Example for two inputs in list format: [[1,3,224,224], [1,3,224,224]] - // - // * XGBOOST: input data name and shape are not needed. - // - // DataInputConfig is a required field - DataInputConfig *string `min:"1" type:"string" required:"true"` - - // Identifies the framework in which the model was trained. For example: TENSORFLOW. - // - // Framework is a required field - Framework *string `type:"string" required:"true" enum:"Framework"` - - // The S3 path where the model artifacts, which result from model training, - // are stored. This path must point to a single gzip compressed tar archive - // (.tar.gz suffix). - // - // S3Uri is a required field - S3Uri *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s InputConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InputConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InputConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputConfig"} - if s.DataInputConfig == nil { - invalidParams.Add(request.NewErrParamRequired("DataInputConfig")) - } - if s.DataInputConfig != nil && len(*s.DataInputConfig) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DataInputConfig", 1)) - } - if s.Framework == nil { - invalidParams.Add(request.NewErrParamRequired("Framework")) - } - if s.S3Uri == nil { - invalidParams.Add(request.NewErrParamRequired("S3Uri")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDataInputConfig sets the DataInputConfig field's value. -func (s *InputConfig) SetDataInputConfig(v string) *InputConfig { - s.DataInputConfig = &v - return s -} - -// SetFramework sets the Framework field's value. -func (s *InputConfig) SetFramework(v string) *InputConfig { - s.Framework = &v - return s -} - -// SetS3Uri sets the S3Uri field's value. -func (s *InputConfig) SetS3Uri(v string) *InputConfig { - s.S3Uri = &v - return s -} - -// For a hyperparameter of the integer type, specifies the range that a hyperparameter -// tuning job searches. -type IntegerParameterRange struct { - _ struct{} `type:"structure"` - - // The maximum value of the hyperparameter to search. - // - // MaxValue is a required field - MaxValue *string `type:"string" required:"true"` - - // The minimum value of the hyperparameter to search. - // - // MinValue is a required field - MinValue *string `type:"string" required:"true"` - - // The name of the hyperparameter to search. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s IntegerParameterRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IntegerParameterRange) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IntegerParameterRange) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IntegerParameterRange"} - if s.MaxValue == nil { - invalidParams.Add(request.NewErrParamRequired("MaxValue")) - } - if s.MinValue == nil { - invalidParams.Add(request.NewErrParamRequired("MinValue")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxValue sets the MaxValue field's value. -func (s *IntegerParameterRange) SetMaxValue(v string) *IntegerParameterRange { - s.MaxValue = &v - return s -} - -// SetMinValue sets the MinValue field's value. -func (s *IntegerParameterRange) SetMinValue(v string) *IntegerParameterRange { - s.MinValue = &v - return s -} - -// SetName sets the Name field's value. -func (s *IntegerParameterRange) SetName(v string) *IntegerParameterRange { - s.Name = &v - return s -} - -// Defines the possible values for an integer hyperparameter. -type IntegerParameterRangeSpecification struct { - _ struct{} `type:"structure"` - - // The maximum integer value allowed. - // - // MaxValue is a required field - MaxValue *string `type:"string" required:"true"` - - // The minimum integer value allowed. - // - // MinValue is a required field - MinValue *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s IntegerParameterRangeSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IntegerParameterRangeSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IntegerParameterRangeSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IntegerParameterRangeSpecification"} - if s.MaxValue == nil { - invalidParams.Add(request.NewErrParamRequired("MaxValue")) - } - if s.MinValue == nil { - invalidParams.Add(request.NewErrParamRequired("MinValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxValue sets the MaxValue field's value. -func (s *IntegerParameterRangeSpecification) SetMaxValue(v string) *IntegerParameterRangeSpecification { - s.MaxValue = &v - return s -} - -// SetMinValue sets the MinValue field's value. -func (s *IntegerParameterRangeSpecification) SetMinValue(v string) *IntegerParameterRangeSpecification { - s.MinValue = &v - return s -} - -// Provides a breakdown of the number of objects labeled. -type LabelCounters struct { - _ struct{} `type:"structure"` - - // The total number of objects that could not be labeled due to an error. - FailedNonRetryableError *int64 `type:"integer"` - - // The total number of objects labeled by a human worker. - HumanLabeled *int64 `type:"integer"` - - // The total number of objects labeled by automated data labeling. - MachineLabeled *int64 `type:"integer"` - - // The total number of objects labeled. - TotalLabeled *int64 `type:"integer"` - - // The total number of objects not yet labeled. - Unlabeled *int64 `type:"integer"` -} - -// String returns the string representation -func (s LabelCounters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelCounters) GoString() string { - return s.String() -} - -// SetFailedNonRetryableError sets the FailedNonRetryableError field's value. -func (s *LabelCounters) SetFailedNonRetryableError(v int64) *LabelCounters { - s.FailedNonRetryableError = &v - return s -} - -// SetHumanLabeled sets the HumanLabeled field's value. -func (s *LabelCounters) SetHumanLabeled(v int64) *LabelCounters { - s.HumanLabeled = &v - return s -} - -// SetMachineLabeled sets the MachineLabeled field's value. -func (s *LabelCounters) SetMachineLabeled(v int64) *LabelCounters { - s.MachineLabeled = &v - return s -} - -// SetTotalLabeled sets the TotalLabeled field's value. -func (s *LabelCounters) SetTotalLabeled(v int64) *LabelCounters { - s.TotalLabeled = &v - return s -} - -// SetUnlabeled sets the Unlabeled field's value. -func (s *LabelCounters) SetUnlabeled(v int64) *LabelCounters { - s.Unlabeled = &v - return s -} - -// Provides counts for human-labeled tasks in the labeling job. -type LabelCountersForWorkteam struct { - _ struct{} `type:"structure"` - - // The total number of data objects labeled by a human worker. - HumanLabeled *int64 `type:"integer"` - - // The total number of data objects that need to be labeled by a human worker. - PendingHuman *int64 `type:"integer"` - - // The total number of tasks in the labeling job. - Total *int64 `type:"integer"` -} - -// String returns the string representation -func (s LabelCountersForWorkteam) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelCountersForWorkteam) GoString() string { - return s.String() -} - -// SetHumanLabeled sets the HumanLabeled field's value. -func (s *LabelCountersForWorkteam) SetHumanLabeled(v int64) *LabelCountersForWorkteam { - s.HumanLabeled = &v - return s -} - -// SetPendingHuman sets the PendingHuman field's value. -func (s *LabelCountersForWorkteam) SetPendingHuman(v int64) *LabelCountersForWorkteam { - s.PendingHuman = &v - return s -} - -// SetTotal sets the Total field's value. -func (s *LabelCountersForWorkteam) SetTotal(v int64) *LabelCountersForWorkteam { - s.Total = &v - return s -} - -// Provides configuration information for auto-labeling of your data objects. -// A LabelingJobAlgorithmsConfig object must be supplied in order to use auto-labeling. -type LabelingJobAlgorithmsConfig struct { - _ struct{} `type:"structure"` - - // At the end of an auto-label job Amazon SageMaker Ground Truth sends the Amazon - // Resource Nam (ARN) of the final model used for auto-labeling. You can use - // this model as the starting point for subsequent similar jobs by providing - // the ARN of the model here. - InitialActiveLearningModelArn *string `min:"20" type:"string"` - - // Specifies the Amazon Resource Name (ARN) of the algorithm used for auto-labeling. - // You must select one of the following ARNs: - // - // * Image classification - // - // arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/image-classification - // - // * Text classification - // - // arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/text-classification - // - // * Object detection - // - // arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/object-detection - // - // LabelingJobAlgorithmSpecificationArn is a required field - LabelingJobAlgorithmSpecificationArn *string `type:"string" required:"true"` - - // Provides configuration information for a labeling job. - LabelingJobResourceConfig *LabelingJobResourceConfig `type:"structure"` -} - -// String returns the string representation -func (s LabelingJobAlgorithmsConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelingJobAlgorithmsConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LabelingJobAlgorithmsConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LabelingJobAlgorithmsConfig"} - if s.InitialActiveLearningModelArn != nil && len(*s.InitialActiveLearningModelArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("InitialActiveLearningModelArn", 20)) - } - if s.LabelingJobAlgorithmSpecificationArn == nil { - invalidParams.Add(request.NewErrParamRequired("LabelingJobAlgorithmSpecificationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInitialActiveLearningModelArn sets the InitialActiveLearningModelArn field's value. -func (s *LabelingJobAlgorithmsConfig) SetInitialActiveLearningModelArn(v string) *LabelingJobAlgorithmsConfig { - s.InitialActiveLearningModelArn = &v - return s -} - -// SetLabelingJobAlgorithmSpecificationArn sets the LabelingJobAlgorithmSpecificationArn field's value. -func (s *LabelingJobAlgorithmsConfig) SetLabelingJobAlgorithmSpecificationArn(v string) *LabelingJobAlgorithmsConfig { - s.LabelingJobAlgorithmSpecificationArn = &v - return s -} - -// SetLabelingJobResourceConfig sets the LabelingJobResourceConfig field's value. -func (s *LabelingJobAlgorithmsConfig) SetLabelingJobResourceConfig(v *LabelingJobResourceConfig) *LabelingJobAlgorithmsConfig { - s.LabelingJobResourceConfig = v - return s -} - -// Attributes of the data specified by the customer. Use these to describe the -// data to be labeled. -type LabelingJobDataAttributes struct { - _ struct{} `type:"structure"` - - // Declares that your content is free of personally identifiable information - // or adult content. Amazon SageMaker may restrict the Amazon Mechanical Turk - // workers that can view your task based on this information. - ContentClassifiers []*string `type:"list"` -} - -// String returns the string representation -func (s LabelingJobDataAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelingJobDataAttributes) GoString() string { - return s.String() -} - -// SetContentClassifiers sets the ContentClassifiers field's value. -func (s *LabelingJobDataAttributes) SetContentClassifiers(v []*string) *LabelingJobDataAttributes { - s.ContentClassifiers = v - return s -} - -// Provides information about the location of input data. -type LabelingJobDataSource struct { - _ struct{} `type:"structure"` - - // The Amazon S3 location of the input data objects. - // - // S3DataSource is a required field - S3DataSource *LabelingJobS3DataSource `type:"structure" required:"true"` -} - -// String returns the string representation -func (s LabelingJobDataSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelingJobDataSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LabelingJobDataSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LabelingJobDataSource"} - 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 *LabelingJobDataSource) SetS3DataSource(v *LabelingJobS3DataSource) *LabelingJobDataSource { - s.S3DataSource = v - return s -} - -// Provides summary information for a work team. -type LabelingJobForWorkteamSummary struct { - _ struct{} `type:"structure"` - - // The date and time that the labeling job was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // A unique identifier for a labeling job. You can use this to refer to a specific - // labeling job. - // - // JobReferenceCode is a required field - JobReferenceCode *string `min:"1" type:"string" required:"true"` - - // Provides information about the progress of a labeling job. - LabelCounters *LabelCountersForWorkteam `type:"structure"` - - // The name of the labeling job that the work team is assigned to. - LabelingJobName *string `min:"1" type:"string"` - - // WorkRequesterAccountId is a required field - WorkRequesterAccountId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s LabelingJobForWorkteamSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelingJobForWorkteamSummary) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *LabelingJobForWorkteamSummary) SetCreationTime(v time.Time) *LabelingJobForWorkteamSummary { - s.CreationTime = &v - return s -} - -// SetJobReferenceCode sets the JobReferenceCode field's value. -func (s *LabelingJobForWorkteamSummary) SetJobReferenceCode(v string) *LabelingJobForWorkteamSummary { - s.JobReferenceCode = &v - return s -} - -// SetLabelCounters sets the LabelCounters field's value. -func (s *LabelingJobForWorkteamSummary) SetLabelCounters(v *LabelCountersForWorkteam) *LabelingJobForWorkteamSummary { - s.LabelCounters = v - return s -} - -// SetLabelingJobName sets the LabelingJobName field's value. -func (s *LabelingJobForWorkteamSummary) SetLabelingJobName(v string) *LabelingJobForWorkteamSummary { - s.LabelingJobName = &v - return s -} - -// SetWorkRequesterAccountId sets the WorkRequesterAccountId field's value. -func (s *LabelingJobForWorkteamSummary) SetWorkRequesterAccountId(v string) *LabelingJobForWorkteamSummary { - s.WorkRequesterAccountId = &v - return s -} - -// Input configuration information for a labeling job. -type LabelingJobInputConfig struct { - _ struct{} `type:"structure"` - - // Attributes of the data specified by the customer. - DataAttributes *LabelingJobDataAttributes `type:"structure"` - - // The location of the input data. - // - // DataSource is a required field - DataSource *LabelingJobDataSource `type:"structure" required:"true"` -} - -// String returns the string representation -func (s LabelingJobInputConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelingJobInputConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LabelingJobInputConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LabelingJobInputConfig"} - if s.DataSource == nil { - invalidParams.Add(request.NewErrParamRequired("DataSource")) - } - if s.DataSource != nil { - if err := s.DataSource.Validate(); err != nil { - invalidParams.AddNested("DataSource", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDataAttributes sets the DataAttributes field's value. -func (s *LabelingJobInputConfig) SetDataAttributes(v *LabelingJobDataAttributes) *LabelingJobInputConfig { - s.DataAttributes = v - return s -} - -// SetDataSource sets the DataSource field's value. -func (s *LabelingJobInputConfig) SetDataSource(v *LabelingJobDataSource) *LabelingJobInputConfig { - s.DataSource = v - return s -} - -// Specifies the location of the output produced by the labeling job. -type LabelingJobOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the most recent Amazon SageMaker model - // trained as part of automated data labeling. - FinalActiveLearningModelArn *string `min:"20" type:"string"` - - // The Amazon S3 bucket location of the manifest file for labeled data. - // - // OutputDatasetS3Uri is a required field - OutputDatasetS3Uri *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s LabelingJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelingJobOutput) GoString() string { - return s.String() -} - -// SetFinalActiveLearningModelArn sets the FinalActiveLearningModelArn field's value. -func (s *LabelingJobOutput) SetFinalActiveLearningModelArn(v string) *LabelingJobOutput { - s.FinalActiveLearningModelArn = &v - return s -} - -// SetOutputDatasetS3Uri sets the OutputDatasetS3Uri field's value. -func (s *LabelingJobOutput) SetOutputDatasetS3Uri(v string) *LabelingJobOutput { - s.OutputDatasetS3Uri = &v - return s -} - -// Output configuration information for a labeling job. -type LabelingJobOutputConfig struct { - _ struct{} `type:"structure"` - - // The AWS Key Management Service ID of the key used to encrypt the output data, - // if any. - KmsKeyId *string `type:"string"` - - // The Amazon S3 location to write output data. - // - // S3OutputPath is a required field - S3OutputPath *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s LabelingJobOutputConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelingJobOutputConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LabelingJobOutputConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LabelingJobOutputConfig"} - if s.S3OutputPath == nil { - invalidParams.Add(request.NewErrParamRequired("S3OutputPath")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *LabelingJobOutputConfig) SetKmsKeyId(v string) *LabelingJobOutputConfig { - s.KmsKeyId = &v - return s -} - -// SetS3OutputPath sets the S3OutputPath field's value. -func (s *LabelingJobOutputConfig) SetS3OutputPath(v string) *LabelingJobOutputConfig { - s.S3OutputPath = &v - return s -} - -// Provides configuration information for labeling jobs. -type LabelingJobResourceConfig struct { - _ struct{} `type:"structure"` - - // The AWS Key Management Service key ID for the key used to encrypt the output - // data, if any. - VolumeKmsKeyId *string `type:"string"` -} - -// String returns the string representation -func (s LabelingJobResourceConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelingJobResourceConfig) GoString() string { - return s.String() -} - -// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. -func (s *LabelingJobResourceConfig) SetVolumeKmsKeyId(v string) *LabelingJobResourceConfig { - s.VolumeKmsKeyId = &v - return s -} - -// The Amazon S3 location of the input data objects. -type LabelingJobS3DataSource struct { - _ struct{} `type:"structure"` - - // The Amazon S3 location of the manifest file that describes the input data - // objects. - // - // ManifestS3Uri is a required field - ManifestS3Uri *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s LabelingJobS3DataSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelingJobS3DataSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LabelingJobS3DataSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LabelingJobS3DataSource"} - if s.ManifestS3Uri == nil { - invalidParams.Add(request.NewErrParamRequired("ManifestS3Uri")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetManifestS3Uri sets the ManifestS3Uri field's value. -func (s *LabelingJobS3DataSource) SetManifestS3Uri(v string) *LabelingJobS3DataSource { - s.ManifestS3Uri = &v - return s -} - -// A set of conditions for stopping a labeling job. If any of the conditions -// are met, the job is automatically stopped. You can use these conditions to -// control the cost of data labeling. -type LabelingJobStoppingConditions struct { - _ struct{} `type:"structure"` - - // The maximum number of objects that can be labeled by human workers. - MaxHumanLabeledObjectCount *int64 `min:"1" type:"integer"` - - // The maximum number of input data objects that should be labeled. - MaxPercentageOfInputDatasetLabeled *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s LabelingJobStoppingConditions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelingJobStoppingConditions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LabelingJobStoppingConditions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LabelingJobStoppingConditions"} - if s.MaxHumanLabeledObjectCount != nil && *s.MaxHumanLabeledObjectCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxHumanLabeledObjectCount", 1)) - } - if s.MaxPercentageOfInputDatasetLabeled != nil && *s.MaxPercentageOfInputDatasetLabeled < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxPercentageOfInputDatasetLabeled", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxHumanLabeledObjectCount sets the MaxHumanLabeledObjectCount field's value. -func (s *LabelingJobStoppingConditions) SetMaxHumanLabeledObjectCount(v int64) *LabelingJobStoppingConditions { - s.MaxHumanLabeledObjectCount = &v - return s -} - -// SetMaxPercentageOfInputDatasetLabeled sets the MaxPercentageOfInputDatasetLabeled field's value. -func (s *LabelingJobStoppingConditions) SetMaxPercentageOfInputDatasetLabeled(v int64) *LabelingJobStoppingConditions { - s.MaxPercentageOfInputDatasetLabeled = &v - return s -} - -// Provides summary information about a labeling job. -type LabelingJobSummary struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the Lambda function used to consolidate - // the annotations from individual workers into a label for a data object. For - // more information, see Annotation Consolidation (http://docs.aws.amazon.com/sagemaker/latest/dg/sms-annotation-consolidation.html). - AnnotationConsolidationLambdaArn *string `type:"string"` - - // The date and time that the job was created (timestamp). - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // If the LabelingJobStatus field is Failed, this field contains a description - // of the error. - FailureReason *string `type:"string"` - - // Input configuration for the labeling job. - InputConfig *LabelingJobInputConfig `type:"structure"` - - // Counts showing the progress of the labeling job. - // - // LabelCounters is a required field - LabelCounters *LabelCounters `type:"structure" required:"true"` - - // The Amazon Resource Name (ARN) assigned to the labeling job when it was created. - // - // LabelingJobArn is a required field - LabelingJobArn *string `type:"string" required:"true"` - - // The name of the labeling job. - // - // LabelingJobName is a required field - LabelingJobName *string `min:"1" type:"string" required:"true"` - - // The location of the output produced by the labeling job. - LabelingJobOutput *LabelingJobOutput `type:"structure"` - - // The current status of the labeling job. - // - // LabelingJobStatus is a required field - LabelingJobStatus *string `type:"string" required:"true" enum:"LabelingJobStatus"` - - // The date and time that the job was last modified (timestamp). - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // The Amazon Resource Name (ARN) of a Lambda function. The function is run - // before each data object is sent to a worker. - // - // PreHumanTaskLambdaArn is a required field - PreHumanTaskLambdaArn *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the work team assigned to the job. - // - // WorkteamArn is a required field - WorkteamArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s LabelingJobSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelingJobSummary) GoString() string { - return s.String() -} - -// SetAnnotationConsolidationLambdaArn sets the AnnotationConsolidationLambdaArn field's value. -func (s *LabelingJobSummary) SetAnnotationConsolidationLambdaArn(v string) *LabelingJobSummary { - s.AnnotationConsolidationLambdaArn = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *LabelingJobSummary) SetCreationTime(v time.Time) *LabelingJobSummary { - s.CreationTime = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *LabelingJobSummary) SetFailureReason(v string) *LabelingJobSummary { - s.FailureReason = &v - return s -} - -// SetInputConfig sets the InputConfig field's value. -func (s *LabelingJobSummary) SetInputConfig(v *LabelingJobInputConfig) *LabelingJobSummary { - s.InputConfig = v - return s -} - -// SetLabelCounters sets the LabelCounters field's value. -func (s *LabelingJobSummary) SetLabelCounters(v *LabelCounters) *LabelingJobSummary { - s.LabelCounters = v - return s -} - -// SetLabelingJobArn sets the LabelingJobArn field's value. -func (s *LabelingJobSummary) SetLabelingJobArn(v string) *LabelingJobSummary { - s.LabelingJobArn = &v - return s -} - -// SetLabelingJobName sets the LabelingJobName field's value. -func (s *LabelingJobSummary) SetLabelingJobName(v string) *LabelingJobSummary { - s.LabelingJobName = &v - return s -} - -// SetLabelingJobOutput sets the LabelingJobOutput field's value. -func (s *LabelingJobSummary) SetLabelingJobOutput(v *LabelingJobOutput) *LabelingJobSummary { - s.LabelingJobOutput = v - return s -} - -// SetLabelingJobStatus sets the LabelingJobStatus field's value. -func (s *LabelingJobSummary) SetLabelingJobStatus(v string) *LabelingJobSummary { - s.LabelingJobStatus = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *LabelingJobSummary) SetLastModifiedTime(v time.Time) *LabelingJobSummary { - s.LastModifiedTime = &v - return s -} - -// SetPreHumanTaskLambdaArn sets the PreHumanTaskLambdaArn field's value. -func (s *LabelingJobSummary) SetPreHumanTaskLambdaArn(v string) *LabelingJobSummary { - s.PreHumanTaskLambdaArn = &v - return s -} - -// SetWorkteamArn sets the WorkteamArn field's value. -func (s *LabelingJobSummary) SetWorkteamArn(v string) *LabelingJobSummary { - s.WorkteamArn = &v - return s -} - -type ListAlgorithmsInput struct { - _ struct{} `type:"structure"` - - // A filter that returns only algorithms created after the specified time (timestamp). - CreationTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only algorithms created before the specified time (timestamp). - CreationTimeBefore *time.Time `type:"timestamp"` - - // The maximum number of algorithms to return in the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A string in the algorithm name. This filter returns only algorithms whose - // name contains the specified string. - NameContains *string `type:"string"` - - // If the response to a previous ListAlgorithms request was truncated, the response - // includes a NextToken. To retrieve the next set of algorithms, use the token - // in the next request. - NextToken *string `type:"string"` - - // The parameter by which to sort the results. The default is CreationTime. - SortBy *string `type:"string" enum:"AlgorithmSortBy"` - - // The sort order for the results. The default is Ascending. - SortOrder *string `type:"string" enum:"SortOrder"` -} - -// String returns the string representation -func (s ListAlgorithmsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAlgorithmsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAlgorithmsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAlgorithmsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationTimeAfter sets the CreationTimeAfter field's value. -func (s *ListAlgorithmsInput) SetCreationTimeAfter(v time.Time) *ListAlgorithmsInput { - s.CreationTimeAfter = &v - return s -} - -// SetCreationTimeBefore sets the CreationTimeBefore field's value. -func (s *ListAlgorithmsInput) SetCreationTimeBefore(v time.Time) *ListAlgorithmsInput { - s.CreationTimeBefore = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAlgorithmsInput) SetMaxResults(v int64) *ListAlgorithmsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListAlgorithmsInput) SetNameContains(v string) *ListAlgorithmsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAlgorithmsInput) SetNextToken(v string) *ListAlgorithmsInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListAlgorithmsInput) SetSortBy(v string) *ListAlgorithmsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListAlgorithmsInput) SetSortOrder(v string) *ListAlgorithmsInput { - s.SortOrder = &v - return s -} - -type ListAlgorithmsOutput struct { - _ struct{} `type:"structure"` - - // >An array of AlgorithmSummary objects, each of which lists an algorithm. - // - // AlgorithmSummaryList is a required field - AlgorithmSummaryList []*AlgorithmSummary `type:"list" required:"true"` - - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of algorithms, use it in the subsequent request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAlgorithmsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAlgorithmsOutput) GoString() string { - return s.String() -} - -// SetAlgorithmSummaryList sets the AlgorithmSummaryList field's value. -func (s *ListAlgorithmsOutput) SetAlgorithmSummaryList(v []*AlgorithmSummary) *ListAlgorithmsOutput { - s.AlgorithmSummaryList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAlgorithmsOutput) SetNextToken(v string) *ListAlgorithmsOutput { - s.NextToken = &v - return s -} - -type ListCodeRepositoriesInput struct { - _ struct{} `type:"structure"` - - // A filter that returns only Git repositories that were created after the specified - // time. - CreationTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only Git repositories that were created before the - // specified time. - CreationTimeBefore *time.Time `type:"timestamp"` - - // A filter that returns only Git repositories that were last modified after - // the specified time. - LastModifiedTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only Git repositories that were last modified before - // the specified time. - LastModifiedTimeBefore *time.Time `type:"timestamp"` - - // The maximum number of Git repositories to return in the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A string in the Git repositories name. This filter returns only repositories - // whose name contains the specified string. - NameContains *string `type:"string"` - - // If the result of a ListCodeRepositoriesOutput request was truncated, the - // response includes a NextToken. To get the next set of Git repositories, use - // the token in the next request. - NextToken *string `type:"string"` - - // The field to sort results by. The default is Name. - SortBy *string `type:"string" enum:"CodeRepositorySortBy"` - - // The sort order for results. The default is Ascending. - SortOrder *string `type:"string" enum:"CodeRepositorySortOrder"` -} - -// String returns the string representation -func (s ListCodeRepositoriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCodeRepositoriesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListCodeRepositoriesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListCodeRepositoriesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationTimeAfter sets the CreationTimeAfter field's value. -func (s *ListCodeRepositoriesInput) SetCreationTimeAfter(v time.Time) *ListCodeRepositoriesInput { - s.CreationTimeAfter = &v - return s -} - -// SetCreationTimeBefore sets the CreationTimeBefore field's value. -func (s *ListCodeRepositoriesInput) SetCreationTimeBefore(v time.Time) *ListCodeRepositoriesInput { - s.CreationTimeBefore = &v - return s -} - -// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. -func (s *ListCodeRepositoriesInput) SetLastModifiedTimeAfter(v time.Time) *ListCodeRepositoriesInput { - s.LastModifiedTimeAfter = &v - return s -} - -// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. -func (s *ListCodeRepositoriesInput) SetLastModifiedTimeBefore(v time.Time) *ListCodeRepositoriesInput { - s.LastModifiedTimeBefore = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListCodeRepositoriesInput) SetMaxResults(v int64) *ListCodeRepositoriesInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListCodeRepositoriesInput) SetNameContains(v string) *ListCodeRepositoriesInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCodeRepositoriesInput) SetNextToken(v string) *ListCodeRepositoriesInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListCodeRepositoriesInput) SetSortBy(v string) *ListCodeRepositoriesInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListCodeRepositoriesInput) SetSortOrder(v string) *ListCodeRepositoriesInput { - s.SortOrder = &v - return s -} - -type ListCodeRepositoriesOutput struct { - _ struct{} `type:"structure"` - - // Gets a list of summaries of the Git repositories. Each summary specifies - // the following values for the repository: - // - // * Name - // - // * Amazon Resource Name (ARN) - // - // * Creation time - // - // * Last modified time - // - // * Configuration information, including the URL location of the repository - // and the ARN of the AWS Secrets Manager secret that contains the credentials - // used to access the repository. - // - // CodeRepositorySummaryList is a required field - CodeRepositorySummaryList []*CodeRepositorySummary `type:"list" required:"true"` - - // If the result of a ListCodeRepositoriesOutput request was truncated, the - // response includes a NextToken. To get the next set of Git repositories, use - // the token in the next request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListCodeRepositoriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCodeRepositoriesOutput) GoString() string { - return s.String() -} - -// SetCodeRepositorySummaryList sets the CodeRepositorySummaryList field's value. -func (s *ListCodeRepositoriesOutput) SetCodeRepositorySummaryList(v []*CodeRepositorySummary) *ListCodeRepositoriesOutput { - s.CodeRepositorySummaryList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCodeRepositoriesOutput) SetNextToken(v string) *ListCodeRepositoriesOutput { - s.NextToken = &v - return s -} - -type ListCompilationJobsInput struct { - _ struct{} `type:"structure"` - - // A filter that returns the model compilation jobs that were created after - // a specified time. - CreationTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns the model compilation jobs that were created before - // a specified time. - CreationTimeBefore *time.Time `type:"timestamp"` - - // A filter that returns the model compilation jobs that were modified after - // a specified time. - LastModifiedTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns the model compilation jobs that were modified before - // a specified time. - LastModifiedTimeBefore *time.Time `type:"timestamp"` - - // The maximum number of model compilation jobs to return in the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A filter that returns the model compilation jobs whose name contains a specified - // string. - NameContains *string `type:"string"` - - // If the result of the previous ListCompilationJobs request was truncated, - // the response includes a NextToken. To retrieve the next set of model compilation - // jobs, use the token in the next request. - NextToken *string `type:"string"` - - // The field by which to sort results. The default is CreationTime. - SortBy *string `type:"string" enum:"ListCompilationJobsSortBy"` - - // The sort order for results. The default is Ascending. - SortOrder *string `type:"string" enum:"SortOrder"` - - // A filter that retrieves model compilation jobs with a specific DescribeCompilationJobResponse$CompilationJobStatus - // status. - StatusEquals *string `type:"string" enum:"CompilationJobStatus"` -} - -// String returns the string representation -func (s ListCompilationJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCompilationJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListCompilationJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListCompilationJobsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationTimeAfter sets the CreationTimeAfter field's value. -func (s *ListCompilationJobsInput) SetCreationTimeAfter(v time.Time) *ListCompilationJobsInput { - s.CreationTimeAfter = &v - return s -} - -// SetCreationTimeBefore sets the CreationTimeBefore field's value. -func (s *ListCompilationJobsInput) SetCreationTimeBefore(v time.Time) *ListCompilationJobsInput { - s.CreationTimeBefore = &v - return s -} - -// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. -func (s *ListCompilationJobsInput) SetLastModifiedTimeAfter(v time.Time) *ListCompilationJobsInput { - s.LastModifiedTimeAfter = &v - return s -} - -// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. -func (s *ListCompilationJobsInput) SetLastModifiedTimeBefore(v time.Time) *ListCompilationJobsInput { - s.LastModifiedTimeBefore = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListCompilationJobsInput) SetMaxResults(v int64) *ListCompilationJobsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListCompilationJobsInput) SetNameContains(v string) *ListCompilationJobsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCompilationJobsInput) SetNextToken(v string) *ListCompilationJobsInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListCompilationJobsInput) SetSortBy(v string) *ListCompilationJobsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListCompilationJobsInput) SetSortOrder(v string) *ListCompilationJobsInput { - s.SortOrder = &v - return s -} - -// SetStatusEquals sets the StatusEquals field's value. -func (s *ListCompilationJobsInput) SetStatusEquals(v string) *ListCompilationJobsInput { - s.StatusEquals = &v - return s -} - -type ListCompilationJobsOutput struct { - _ struct{} `type:"structure"` - - // An array of CompilationJobSummary objects, each describing a model compilation - // job. - // - // CompilationJobSummaries is a required field - CompilationJobSummaries []*CompilationJobSummary `type:"list" required:"true"` - - // If the response is truncated, Amazon SageMaker returns this NextToken. To - // retrieve the next set of model compilation jobs, use this token in the next - // request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListCompilationJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCompilationJobsOutput) GoString() string { - return s.String() -} - -// SetCompilationJobSummaries sets the CompilationJobSummaries field's value. -func (s *ListCompilationJobsOutput) SetCompilationJobSummaries(v []*CompilationJobSummary) *ListCompilationJobsOutput { - s.CompilationJobSummaries = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCompilationJobsOutput) SetNextToken(v string) *ListCompilationJobsOutput { - s.NextToken = &v - return s -} - -type ListEndpointConfigsInput struct { - _ struct{} `type:"structure"` - - // A filter that returns only endpoint configurations created after the specified - // time (timestamp). - CreationTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only endpoint configurations created before the specified - // time (timestamp). - CreationTimeBefore *time.Time `type:"timestamp"` - - // The maximum number of training jobs to return in the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A string in the endpoint configuration name. This filter returns only endpoint - // configurations whose name contains the specified string. - NameContains *string `type:"string"` - - // If the result of the previous ListEndpointConfig request was truncated, the - // response includes a NextToken. To retrieve the next set of endpoint configurations, - // use the token in the next request. - NextToken *string `type:"string"` - - // The field to sort results by. The default is CreationTime. - SortBy *string `type:"string" enum:"EndpointConfigSortKey"` - - // The sort order for results. The default is Ascending. - SortOrder *string `type:"string" enum:"OrderKey"` -} - -// String returns the string representation -func (s ListEndpointConfigsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEndpointConfigsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListEndpointConfigsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListEndpointConfigsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationTimeAfter sets the CreationTimeAfter field's value. -func (s *ListEndpointConfigsInput) SetCreationTimeAfter(v time.Time) *ListEndpointConfigsInput { - s.CreationTimeAfter = &v - return s -} - -// SetCreationTimeBefore sets the CreationTimeBefore field's value. -func (s *ListEndpointConfigsInput) SetCreationTimeBefore(v time.Time) *ListEndpointConfigsInput { - s.CreationTimeBefore = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListEndpointConfigsInput) SetMaxResults(v int64) *ListEndpointConfigsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListEndpointConfigsInput) SetNameContains(v string) *ListEndpointConfigsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEndpointConfigsInput) SetNextToken(v string) *ListEndpointConfigsInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListEndpointConfigsInput) SetSortBy(v string) *ListEndpointConfigsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListEndpointConfigsInput) SetSortOrder(v string) *ListEndpointConfigsInput { - s.SortOrder = &v - return s -} - -type ListEndpointConfigsOutput struct { - _ struct{} `type:"structure"` - - // An array of endpoint configurations. - // - // EndpointConfigs is a required field - EndpointConfigs []*EndpointConfigSummary `type:"list" required:"true"` - - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of endpoint configurations, use it in the subsequent request - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListEndpointConfigsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEndpointConfigsOutput) GoString() string { - return s.String() -} - -// SetEndpointConfigs sets the EndpointConfigs field's value. -func (s *ListEndpointConfigsOutput) SetEndpointConfigs(v []*EndpointConfigSummary) *ListEndpointConfigsOutput { - s.EndpointConfigs = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEndpointConfigsOutput) SetNextToken(v string) *ListEndpointConfigsOutput { - s.NextToken = &v - return s -} - -type ListEndpointsInput struct { - _ struct{} `type:"structure"` - - // A filter that returns only endpoints that were created after the specified - // time (timestamp). - CreationTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only endpoints that were created before the specified - // time (timestamp). - CreationTimeBefore *time.Time `type:"timestamp"` - - // A filter that returns only endpoints that were modified after the specified - // timestamp. - LastModifiedTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only endpoints that were modified before the specified - // timestamp. - LastModifiedTimeBefore *time.Time `type:"timestamp"` - - // The maximum number of endpoints to return in the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A string in endpoint names. This filter returns only endpoints whose name - // contains the specified string. - NameContains *string `type:"string"` - - // If the result of a ListEndpoints request was truncated, the response includes - // a NextToken. To retrieve the next set of endpoints, use the token in the - // next request. - NextToken *string `type:"string"` - - // Sorts the list of results. The default is CreationTime. - SortBy *string `type:"string" enum:"EndpointSortKey"` - - // The sort order for results. The default is Ascending. - SortOrder *string `type:"string" enum:"OrderKey"` - - // A filter that returns only endpoints with the specified status. - StatusEquals *string `type:"string" enum:"EndpointStatus"` -} - -// String returns the string representation -func (s ListEndpointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEndpointsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListEndpointsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListEndpointsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationTimeAfter sets the CreationTimeAfter field's value. -func (s *ListEndpointsInput) SetCreationTimeAfter(v time.Time) *ListEndpointsInput { - s.CreationTimeAfter = &v - return s -} - -// SetCreationTimeBefore sets the CreationTimeBefore field's value. -func (s *ListEndpointsInput) SetCreationTimeBefore(v time.Time) *ListEndpointsInput { - s.CreationTimeBefore = &v - return s -} - -// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. -func (s *ListEndpointsInput) SetLastModifiedTimeAfter(v time.Time) *ListEndpointsInput { - s.LastModifiedTimeAfter = &v - return s -} - -// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. -func (s *ListEndpointsInput) SetLastModifiedTimeBefore(v time.Time) *ListEndpointsInput { - s.LastModifiedTimeBefore = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListEndpointsInput) SetMaxResults(v int64) *ListEndpointsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListEndpointsInput) SetNameContains(v string) *ListEndpointsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEndpointsInput) SetNextToken(v string) *ListEndpointsInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListEndpointsInput) SetSortBy(v string) *ListEndpointsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListEndpointsInput) SetSortOrder(v string) *ListEndpointsInput { - s.SortOrder = &v - return s -} - -// SetStatusEquals sets the StatusEquals field's value. -func (s *ListEndpointsInput) SetStatusEquals(v string) *ListEndpointsInput { - s.StatusEquals = &v - return s -} - -type ListEndpointsOutput struct { - _ struct{} `type:"structure"` - - // An array or endpoint objects. - // - // Endpoints is a required field - Endpoints []*EndpointSummary `type:"list" required:"true"` - - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of training jobs, use it in the subsequent request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListEndpointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEndpointsOutput) GoString() string { - return s.String() -} - -// SetEndpoints sets the Endpoints field's value. -func (s *ListEndpointsOutput) SetEndpoints(v []*EndpointSummary) *ListEndpointsOutput { - s.Endpoints = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEndpointsOutput) SetNextToken(v string) *ListEndpointsOutput { - s.NextToken = &v - return s -} - -type ListHyperParameterTuningJobsInput struct { - _ struct{} `type:"structure"` - - // A filter that returns only tuning jobs that were created after the specified - // time. - CreationTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only tuning jobs that were created before the specified - // time. - CreationTimeBefore *time.Time `type:"timestamp"` - - // A filter that returns only tuning jobs that were modified after the specified - // time. - LastModifiedTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only tuning jobs that were modified before the specified - // time. - LastModifiedTimeBefore *time.Time `type:"timestamp"` - - // The maximum number of tuning jobs to return. The default value is 10. - MaxResults *int64 `min:"1" type:"integer"` - - // A string in the tuning job name. This filter returns only tuning jobs whose - // name contains the specified string. - NameContains *string `type:"string"` - - // If the result of the previous ListHyperParameterTuningJobs request was truncated, - // the response includes a NextToken. To retrieve the next set of tuning jobs, - // use the token in the next request. - NextToken *string `type:"string"` - - // The field to sort results by. The default is Name. - SortBy *string `type:"string" enum:"HyperParameterTuningJobSortByOptions"` - - // The sort order for results. The default is Ascending. - SortOrder *string `type:"string" enum:"SortOrder"` - - // A filter that returns only tuning jobs with the specified status. - StatusEquals *string `type:"string" enum:"HyperParameterTuningJobStatus"` -} - -// String returns the string representation -func (s ListHyperParameterTuningJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListHyperParameterTuningJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListHyperParameterTuningJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListHyperParameterTuningJobsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationTimeAfter sets the CreationTimeAfter field's value. -func (s *ListHyperParameterTuningJobsInput) SetCreationTimeAfter(v time.Time) *ListHyperParameterTuningJobsInput { - s.CreationTimeAfter = &v - return s -} - -// SetCreationTimeBefore sets the CreationTimeBefore field's value. -func (s *ListHyperParameterTuningJobsInput) SetCreationTimeBefore(v time.Time) *ListHyperParameterTuningJobsInput { - s.CreationTimeBefore = &v - return s -} - -// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. -func (s *ListHyperParameterTuningJobsInput) SetLastModifiedTimeAfter(v time.Time) *ListHyperParameterTuningJobsInput { - s.LastModifiedTimeAfter = &v - return s -} - -// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. -func (s *ListHyperParameterTuningJobsInput) SetLastModifiedTimeBefore(v time.Time) *ListHyperParameterTuningJobsInput { - s.LastModifiedTimeBefore = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListHyperParameterTuningJobsInput) SetMaxResults(v int64) *ListHyperParameterTuningJobsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListHyperParameterTuningJobsInput) SetNameContains(v string) *ListHyperParameterTuningJobsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListHyperParameterTuningJobsInput) SetNextToken(v string) *ListHyperParameterTuningJobsInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListHyperParameterTuningJobsInput) SetSortBy(v string) *ListHyperParameterTuningJobsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListHyperParameterTuningJobsInput) SetSortOrder(v string) *ListHyperParameterTuningJobsInput { - s.SortOrder = &v - return s -} - -// SetStatusEquals sets the StatusEquals field's value. -func (s *ListHyperParameterTuningJobsInput) SetStatusEquals(v string) *ListHyperParameterTuningJobsInput { - s.StatusEquals = &v - return s -} - -type ListHyperParameterTuningJobsOutput struct { - _ struct{} `type:"structure"` - - // A list of HyperParameterTuningJobSummary objects that describe the tuning - // jobs that the ListHyperParameterTuningJobs request returned. - // - // HyperParameterTuningJobSummaries is a required field - HyperParameterTuningJobSummaries []*HyperParameterTuningJobSummary `type:"list" required:"true"` - - // If the result of this ListHyperParameterTuningJobs request was truncated, - // the response includes a NextToken. To retrieve the next set of tuning jobs, - // use the token in the next request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListHyperParameterTuningJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListHyperParameterTuningJobsOutput) GoString() string { - return s.String() -} - -// SetHyperParameterTuningJobSummaries sets the HyperParameterTuningJobSummaries field's value. -func (s *ListHyperParameterTuningJobsOutput) SetHyperParameterTuningJobSummaries(v []*HyperParameterTuningJobSummary) *ListHyperParameterTuningJobsOutput { - s.HyperParameterTuningJobSummaries = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListHyperParameterTuningJobsOutput) SetNextToken(v string) *ListHyperParameterTuningJobsOutput { - s.NextToken = &v - return s -} - -type ListLabelingJobsForWorkteamInput struct { - _ struct{} `type:"structure"` - - // A filter that returns only labeling jobs created after the specified time - // (timestamp). - CreationTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only labeling jobs created before the specified time - // (timestamp). - CreationTimeBefore *time.Time `type:"timestamp"` - - // A filter the limits jobs to only the ones whose job reference code contains - // the specified string. - JobReferenceCodeContains *string `min:"1" type:"string"` - - // The maximum number of labeling jobs to return in each page of the response. - MaxResults *int64 `min:"1" type:"integer"` - - // If the result of the previous ListLabelingJobsForWorkteam request was truncated, - // the response includes a NextToken. To retrieve the next set of labeling jobs, - // use the token in the next request. - NextToken *string `type:"string"` - - // The field to sort results by. The default is CreationTime. - SortBy *string `type:"string" enum:"ListLabelingJobsForWorkteamSortByOptions"` - - // The sort order for results. The default is Ascending. - SortOrder *string `type:"string" enum:"SortOrder"` - - // The Amazon Resource Name (ARN) of the work team for which you want to see - // labeling jobs for. - // - // WorkteamArn is a required field - WorkteamArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListLabelingJobsForWorkteamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLabelingJobsForWorkteamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListLabelingJobsForWorkteamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListLabelingJobsForWorkteamInput"} - if s.JobReferenceCodeContains != nil && len(*s.JobReferenceCodeContains) < 1 { - invalidParams.Add(request.NewErrParamMinLen("JobReferenceCodeContains", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.WorkteamArn == nil { - invalidParams.Add(request.NewErrParamRequired("WorkteamArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationTimeAfter sets the CreationTimeAfter field's value. -func (s *ListLabelingJobsForWorkteamInput) SetCreationTimeAfter(v time.Time) *ListLabelingJobsForWorkteamInput { - s.CreationTimeAfter = &v - return s -} - -// SetCreationTimeBefore sets the CreationTimeBefore field's value. -func (s *ListLabelingJobsForWorkteamInput) SetCreationTimeBefore(v time.Time) *ListLabelingJobsForWorkteamInput { - s.CreationTimeBefore = &v - return s -} - -// SetJobReferenceCodeContains sets the JobReferenceCodeContains field's value. -func (s *ListLabelingJobsForWorkteamInput) SetJobReferenceCodeContains(v string) *ListLabelingJobsForWorkteamInput { - s.JobReferenceCodeContains = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListLabelingJobsForWorkteamInput) SetMaxResults(v int64) *ListLabelingJobsForWorkteamInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListLabelingJobsForWorkteamInput) SetNextToken(v string) *ListLabelingJobsForWorkteamInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListLabelingJobsForWorkteamInput) SetSortBy(v string) *ListLabelingJobsForWorkteamInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListLabelingJobsForWorkteamInput) SetSortOrder(v string) *ListLabelingJobsForWorkteamInput { - s.SortOrder = &v - return s -} - -// SetWorkteamArn sets the WorkteamArn field's value. -func (s *ListLabelingJobsForWorkteamInput) SetWorkteamArn(v string) *ListLabelingJobsForWorkteamInput { - s.WorkteamArn = &v - return s -} - -type ListLabelingJobsForWorkteamOutput struct { - _ struct{} `type:"structure"` - - // An array of LabelingJobSummary objects, each describing a labeling job. - // - // LabelingJobSummaryList is a required field - LabelingJobSummaryList []*LabelingJobForWorkteamSummary `type:"list" required:"true"` - - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of labeling jobs, use it in the subsequent request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListLabelingJobsForWorkteamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLabelingJobsForWorkteamOutput) GoString() string { - return s.String() -} - -// SetLabelingJobSummaryList sets the LabelingJobSummaryList field's value. -func (s *ListLabelingJobsForWorkteamOutput) SetLabelingJobSummaryList(v []*LabelingJobForWorkteamSummary) *ListLabelingJobsForWorkteamOutput { - s.LabelingJobSummaryList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListLabelingJobsForWorkteamOutput) SetNextToken(v string) *ListLabelingJobsForWorkteamOutput { - s.NextToken = &v - return s -} - -type ListLabelingJobsInput struct { - _ struct{} `type:"structure"` - - // A filter that returns only labeling jobs created after the specified time - // (timestamp). - CreationTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only labeling jobs created before the specified time - // (timestamp). - CreationTimeBefore *time.Time `type:"timestamp"` - - // A filter that returns only labeling jobs modified after the specified time - // (timestamp). - LastModifiedTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only labeling jobs modified before the specified time - // (timestamp). - LastModifiedTimeBefore *time.Time `type:"timestamp"` - - // The maximum number of labeling jobs to return in each page of the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A string in the labeling job name. This filter returns only labeling jobs - // whose name contains the specified string. - NameContains *string `type:"string"` - - // If the result of the previous ListLabelingJobs request was truncated, the - // response includes a NextToken. To retrieve the next set of labeling jobs, - // use the token in the next request. - NextToken *string `type:"string"` - - // The field to sort results by. The default is CreationTime. - SortBy *string `type:"string" enum:"SortBy"` - - // The sort order for results. The default is Ascending. - SortOrder *string `type:"string" enum:"SortOrder"` - - // A filter that retrieves only labeling jobs with a specific status. - StatusEquals *string `type:"string" enum:"LabelingJobStatus"` -} - -// String returns the string representation -func (s ListLabelingJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLabelingJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListLabelingJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListLabelingJobsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationTimeAfter sets the CreationTimeAfter field's value. -func (s *ListLabelingJobsInput) SetCreationTimeAfter(v time.Time) *ListLabelingJobsInput { - s.CreationTimeAfter = &v - return s -} - -// SetCreationTimeBefore sets the CreationTimeBefore field's value. -func (s *ListLabelingJobsInput) SetCreationTimeBefore(v time.Time) *ListLabelingJobsInput { - s.CreationTimeBefore = &v - return s -} - -// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. -func (s *ListLabelingJobsInput) SetLastModifiedTimeAfter(v time.Time) *ListLabelingJobsInput { - s.LastModifiedTimeAfter = &v - return s -} - -// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. -func (s *ListLabelingJobsInput) SetLastModifiedTimeBefore(v time.Time) *ListLabelingJobsInput { - s.LastModifiedTimeBefore = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListLabelingJobsInput) SetMaxResults(v int64) *ListLabelingJobsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListLabelingJobsInput) SetNameContains(v string) *ListLabelingJobsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListLabelingJobsInput) SetNextToken(v string) *ListLabelingJobsInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListLabelingJobsInput) SetSortBy(v string) *ListLabelingJobsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListLabelingJobsInput) SetSortOrder(v string) *ListLabelingJobsInput { - s.SortOrder = &v - return s -} - -// SetStatusEquals sets the StatusEquals field's value. -func (s *ListLabelingJobsInput) SetStatusEquals(v string) *ListLabelingJobsInput { - s.StatusEquals = &v - return s -} - -type ListLabelingJobsOutput struct { - _ struct{} `type:"structure"` - - // An array of LabelingJobSummary objects, each describing a labeling job. - LabelingJobSummaryList []*LabelingJobSummary `type:"list"` - - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of labeling jobs, use it in the subsequent request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListLabelingJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLabelingJobsOutput) GoString() string { - return s.String() -} - -// SetLabelingJobSummaryList sets the LabelingJobSummaryList field's value. -func (s *ListLabelingJobsOutput) SetLabelingJobSummaryList(v []*LabelingJobSummary) *ListLabelingJobsOutput { - s.LabelingJobSummaryList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListLabelingJobsOutput) SetNextToken(v string) *ListLabelingJobsOutput { - s.NextToken = &v - return s -} - -type ListModelPackagesInput struct { - _ struct{} `type:"structure"` - - // A filter that returns only model packages created after the specified time - // (timestamp). - CreationTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only model packages created before the specified time - // (timestamp). - CreationTimeBefore *time.Time `type:"timestamp"` - - // The maximum number of model packages to return in the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A string in the model package name. This filter returns only model packages - // whose name contains the specified string. - NameContains *string `type:"string"` - - // If the response to a previous ListModelPackages request was truncated, the - // response includes a NextToken. To retrieve the next set of model packages, - // use the token in the next request. - NextToken *string `type:"string"` - - // The parameter by which to sort the results. The default is CreationTime. - SortBy *string `type:"string" enum:"ModelPackageSortBy"` - - // The sort order for the results. The default is Ascending. - SortOrder *string `type:"string" enum:"SortOrder"` -} - -// String returns the string representation -func (s ListModelPackagesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListModelPackagesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListModelPackagesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListModelPackagesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationTimeAfter sets the CreationTimeAfter field's value. -func (s *ListModelPackagesInput) SetCreationTimeAfter(v time.Time) *ListModelPackagesInput { - s.CreationTimeAfter = &v - return s -} - -// SetCreationTimeBefore sets the CreationTimeBefore field's value. -func (s *ListModelPackagesInput) SetCreationTimeBefore(v time.Time) *ListModelPackagesInput { - s.CreationTimeBefore = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListModelPackagesInput) SetMaxResults(v int64) *ListModelPackagesInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListModelPackagesInput) SetNameContains(v string) *ListModelPackagesInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListModelPackagesInput) SetNextToken(v string) *ListModelPackagesInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListModelPackagesInput) SetSortBy(v string) *ListModelPackagesInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListModelPackagesInput) SetSortOrder(v string) *ListModelPackagesInput { - s.SortOrder = &v - return s -} - -type ListModelPackagesOutput struct { - _ struct{} `type:"structure"` - - // An array of ModelPackageSummary objects, each of which lists a model package. - // - // ModelPackageSummaryList is a required field - ModelPackageSummaryList []*ModelPackageSummary `type:"list" required:"true"` - - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of model packages, use it in the subsequent request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListModelPackagesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListModelPackagesOutput) GoString() string { - return s.String() -} - -// SetModelPackageSummaryList sets the ModelPackageSummaryList field's value. -func (s *ListModelPackagesOutput) SetModelPackageSummaryList(v []*ModelPackageSummary) *ListModelPackagesOutput { - s.ModelPackageSummaryList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListModelPackagesOutput) SetNextToken(v string) *ListModelPackagesOutput { - s.NextToken = &v - return s -} - -type ListModelsInput struct { - _ struct{} `type:"structure"` - - // A filter that returns only models created after the specified time (timestamp). - CreationTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only models created before the specified time (timestamp). - CreationTimeBefore *time.Time `type:"timestamp"` - - // The maximum number of models to return in the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A string in the training job name. This filter returns only models in the - // training job whose name contains the specified string. - NameContains *string `type:"string"` - - // If the response to a previous ListModels request was truncated, the response - // includes a NextToken. To retrieve the next set of models, use the token in - // the next request. - NextToken *string `type:"string"` - - // Sorts the list of results. The default is CreationTime. - SortBy *string `type:"string" enum:"ModelSortKey"` - - // The sort order for results. The default is Ascending. - SortOrder *string `type:"string" enum:"OrderKey"` -} - -// String returns the string representation -func (s ListModelsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListModelsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListModelsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListModelsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationTimeAfter sets the CreationTimeAfter field's value. -func (s *ListModelsInput) SetCreationTimeAfter(v time.Time) *ListModelsInput { - s.CreationTimeAfter = &v - return s -} - -// SetCreationTimeBefore sets the CreationTimeBefore field's value. -func (s *ListModelsInput) SetCreationTimeBefore(v time.Time) *ListModelsInput { - s.CreationTimeBefore = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListModelsInput) SetMaxResults(v int64) *ListModelsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListModelsInput) SetNameContains(v string) *ListModelsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListModelsInput) SetNextToken(v string) *ListModelsInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListModelsInput) SetSortBy(v string) *ListModelsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListModelsInput) SetSortOrder(v string) *ListModelsInput { - s.SortOrder = &v - return s -} - -type ListModelsOutput struct { - _ struct{} `type:"structure"` - - // An array of ModelSummary objects, each of which lists a model. - // - // Models is a required field - Models []*ModelSummary `type:"list" required:"true"` - - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of models, use it in the subsequent request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListModelsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListModelsOutput) GoString() string { - return s.String() -} - -// SetModels sets the Models field's value. -func (s *ListModelsOutput) SetModels(v []*ModelSummary) *ListModelsOutput { - s.Models = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListModelsOutput) SetNextToken(v string) *ListModelsOutput { - s.NextToken = &v - return s -} - -type ListNotebookInstanceLifecycleConfigsInput struct { - _ struct{} `type:"structure"` - - // A filter that returns only lifecycle configurations that were created after - // the specified time (timestamp). - CreationTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only lifecycle configurations that were created before - // the specified time (timestamp). - CreationTimeBefore *time.Time `type:"timestamp"` - - // A filter that returns only lifecycle configurations that were modified after - // the specified time (timestamp). - LastModifiedTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only lifecycle configurations that were modified before - // the specified time (timestamp). - LastModifiedTimeBefore *time.Time `type:"timestamp"` - - // The maximum number of lifecycle configurations to return in the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A string in the lifecycle configuration name. This filter returns only lifecycle - // configurations whose name contains the specified string. - NameContains *string `type:"string"` - - // If the result of a ListNotebookInstanceLifecycleConfigs request was truncated, - // the response includes a NextToken. To get the next set of lifecycle configurations, - // use the token in the next request. - NextToken *string `type:"string"` - - // Sorts the list of results. The default is CreationTime. - SortBy *string `type:"string" enum:"NotebookInstanceLifecycleConfigSortKey"` - - // The sort order for results. - SortOrder *string `type:"string" enum:"NotebookInstanceLifecycleConfigSortOrder"` -} - -// String returns the string representation -func (s ListNotebookInstanceLifecycleConfigsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListNotebookInstanceLifecycleConfigsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListNotebookInstanceLifecycleConfigsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListNotebookInstanceLifecycleConfigsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationTimeAfter sets the CreationTimeAfter field's value. -func (s *ListNotebookInstanceLifecycleConfigsInput) SetCreationTimeAfter(v time.Time) *ListNotebookInstanceLifecycleConfigsInput { - s.CreationTimeAfter = &v - return s -} - -// SetCreationTimeBefore sets the CreationTimeBefore field's value. -func (s *ListNotebookInstanceLifecycleConfigsInput) SetCreationTimeBefore(v time.Time) *ListNotebookInstanceLifecycleConfigsInput { - s.CreationTimeBefore = &v - return s -} - -// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. -func (s *ListNotebookInstanceLifecycleConfigsInput) SetLastModifiedTimeAfter(v time.Time) *ListNotebookInstanceLifecycleConfigsInput { - s.LastModifiedTimeAfter = &v - return s -} - -// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. -func (s *ListNotebookInstanceLifecycleConfigsInput) SetLastModifiedTimeBefore(v time.Time) *ListNotebookInstanceLifecycleConfigsInput { - s.LastModifiedTimeBefore = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListNotebookInstanceLifecycleConfigsInput) SetMaxResults(v int64) *ListNotebookInstanceLifecycleConfigsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListNotebookInstanceLifecycleConfigsInput) SetNameContains(v string) *ListNotebookInstanceLifecycleConfigsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListNotebookInstanceLifecycleConfigsInput) SetNextToken(v string) *ListNotebookInstanceLifecycleConfigsInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListNotebookInstanceLifecycleConfigsInput) SetSortBy(v string) *ListNotebookInstanceLifecycleConfigsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListNotebookInstanceLifecycleConfigsInput) SetSortOrder(v string) *ListNotebookInstanceLifecycleConfigsInput { - s.SortOrder = &v - return s -} - -type ListNotebookInstanceLifecycleConfigsOutput struct { - _ struct{} `type:"structure"` - - // If the response is truncated, Amazon SageMaker returns this token. To get - // the next set of lifecycle configurations, use it in the next request. - NextToken *string `type:"string"` - - // An array of NotebookInstanceLifecycleConfiguration objects, each listing - // a lifecycle configuration. - NotebookInstanceLifecycleConfigs []*NotebookInstanceLifecycleConfigSummary `type:"list"` -} - -// String returns the string representation -func (s ListNotebookInstanceLifecycleConfigsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListNotebookInstanceLifecycleConfigsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListNotebookInstanceLifecycleConfigsOutput) SetNextToken(v string) *ListNotebookInstanceLifecycleConfigsOutput { - s.NextToken = &v - return s -} - -// SetNotebookInstanceLifecycleConfigs sets the NotebookInstanceLifecycleConfigs field's value. -func (s *ListNotebookInstanceLifecycleConfigsOutput) SetNotebookInstanceLifecycleConfigs(v []*NotebookInstanceLifecycleConfigSummary) *ListNotebookInstanceLifecycleConfigsOutput { - s.NotebookInstanceLifecycleConfigs = v - return s -} - -type ListNotebookInstancesInput struct { - _ struct{} `type:"structure"` - - // A filter that returns only notebook instances with associated with the specified - // git repository. - AdditionalCodeRepositoryEquals *string `min:"1" type:"string"` - - // A filter that returns only notebook instances that were created after the - // specified time (timestamp). - CreationTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only notebook instances that were created before the - // specified time (timestamp). - CreationTimeBefore *time.Time `type:"timestamp"` - - // A string in the name or URL of a Git repository associated with this notebook - // instance. This filter returns only notebook instances associated with a git - // repository with a name that contains the specified string. - DefaultCodeRepositoryContains *string `type:"string"` - - // A filter that returns only notebook instances that were modified after the - // specified time (timestamp). - LastModifiedTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only notebook instances that were modified before the - // specified time (timestamp). - LastModifiedTimeBefore *time.Time `type:"timestamp"` - - // The maximum number of notebook instances to return. - MaxResults *int64 `min:"1" type:"integer"` - - // A string in the notebook instances' name. This filter returns only notebook - // instances whose name contains the specified string. - NameContains *string `type:"string"` - - // If the previous call to the ListNotebookInstances is truncated, the response - // includes a NextToken. You can use this token in your subsequent ListNotebookInstances - // request to fetch the next set of notebook instances. - // - // You might specify a filter or a sort order in your request. When response - // is truncated, you must use the same values for the filer and sort order in - // the next request. - NextToken *string `type:"string"` - - // A string in the name of a notebook instances lifecycle configuration associated - // with this notebook instance. This filter returns only notebook instances - // associated with a lifecycle configuration with a name that contains the specified - // string. - NotebookInstanceLifecycleConfigNameContains *string `type:"string"` - - // The field to sort results by. The default is Name. - SortBy *string `type:"string" enum:"NotebookInstanceSortKey"` - - // The sort order for results. - SortOrder *string `type:"string" enum:"NotebookInstanceSortOrder"` - - // A filter that returns only notebook instances with the specified status. - StatusEquals *string `type:"string" enum:"NotebookInstanceStatus"` -} - -// String returns the string representation -func (s ListNotebookInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListNotebookInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListNotebookInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListNotebookInstancesInput"} - if s.AdditionalCodeRepositoryEquals != nil && len(*s.AdditionalCodeRepositoryEquals) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AdditionalCodeRepositoryEquals", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdditionalCodeRepositoryEquals sets the AdditionalCodeRepositoryEquals field's value. -func (s *ListNotebookInstancesInput) SetAdditionalCodeRepositoryEquals(v string) *ListNotebookInstancesInput { - s.AdditionalCodeRepositoryEquals = &v - return s -} - -// SetCreationTimeAfter sets the CreationTimeAfter field's value. -func (s *ListNotebookInstancesInput) SetCreationTimeAfter(v time.Time) *ListNotebookInstancesInput { - s.CreationTimeAfter = &v - return s -} - -// SetCreationTimeBefore sets the CreationTimeBefore field's value. -func (s *ListNotebookInstancesInput) SetCreationTimeBefore(v time.Time) *ListNotebookInstancesInput { - s.CreationTimeBefore = &v - return s -} - -// SetDefaultCodeRepositoryContains sets the DefaultCodeRepositoryContains field's value. -func (s *ListNotebookInstancesInput) SetDefaultCodeRepositoryContains(v string) *ListNotebookInstancesInput { - s.DefaultCodeRepositoryContains = &v - return s -} - -// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. -func (s *ListNotebookInstancesInput) SetLastModifiedTimeAfter(v time.Time) *ListNotebookInstancesInput { - s.LastModifiedTimeAfter = &v - return s -} - -// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. -func (s *ListNotebookInstancesInput) SetLastModifiedTimeBefore(v time.Time) *ListNotebookInstancesInput { - s.LastModifiedTimeBefore = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListNotebookInstancesInput) SetMaxResults(v int64) *ListNotebookInstancesInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListNotebookInstancesInput) SetNameContains(v string) *ListNotebookInstancesInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListNotebookInstancesInput) SetNextToken(v string) *ListNotebookInstancesInput { - s.NextToken = &v - return s -} - -// SetNotebookInstanceLifecycleConfigNameContains sets the NotebookInstanceLifecycleConfigNameContains field's value. -func (s *ListNotebookInstancesInput) SetNotebookInstanceLifecycleConfigNameContains(v string) *ListNotebookInstancesInput { - s.NotebookInstanceLifecycleConfigNameContains = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListNotebookInstancesInput) SetSortBy(v string) *ListNotebookInstancesInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListNotebookInstancesInput) SetSortOrder(v string) *ListNotebookInstancesInput { - s.SortOrder = &v - return s -} - -// SetStatusEquals sets the StatusEquals field's value. -func (s *ListNotebookInstancesInput) SetStatusEquals(v string) *ListNotebookInstancesInput { - s.StatusEquals = &v - return s -} - -type ListNotebookInstancesOutput struct { - _ struct{} `type:"structure"` - - // If the response to the previous ListNotebookInstances request was truncated, - // Amazon SageMaker returns this token. To retrieve the next set of notebook - // instances, use the token in the next request. - NextToken *string `type:"string"` - - // An array of NotebookInstanceSummary objects, one for each notebook instance. - NotebookInstances []*NotebookInstanceSummary `type:"list"` -} - -// String returns the string representation -func (s ListNotebookInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListNotebookInstancesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListNotebookInstancesOutput) SetNextToken(v string) *ListNotebookInstancesOutput { - s.NextToken = &v - return s -} - -// SetNotebookInstances sets the NotebookInstances field's value. -func (s *ListNotebookInstancesOutput) SetNotebookInstances(v []*NotebookInstanceSummary) *ListNotebookInstancesOutput { - s.NotebookInstances = v - return s -} - -type ListSubscribedWorkteamsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of work teams to return in each page of the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A string in the work team name. This filter returns only work teams whose - // name contains the specified string. - NameContains *string `min:"1" type:"string"` - - // If the result of the previous ListSubscribedWorkteams request was truncated, - // the response includes a NextToken. To retrieve the next set of labeling jobs, - // use the token in the next request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListSubscribedWorkteamsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSubscribedWorkteamsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSubscribedWorkteamsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSubscribedWorkteamsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NameContains != nil && len(*s.NameContains) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListSubscribedWorkteamsInput) SetMaxResults(v int64) *ListSubscribedWorkteamsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListSubscribedWorkteamsInput) SetNameContains(v string) *ListSubscribedWorkteamsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSubscribedWorkteamsInput) SetNextToken(v string) *ListSubscribedWorkteamsInput { - s.NextToken = &v - return s -} - -type ListSubscribedWorkteamsOutput struct { - _ struct{} `type:"structure"` - - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of work teams, use it in the subsequent request. - NextToken *string `type:"string"` - - // An array of Workteam objects, each describing a work team. - // - // SubscribedWorkteams is a required field - SubscribedWorkteams []*SubscribedWorkteam `type:"list" required:"true"` -} - -// String returns the string representation -func (s ListSubscribedWorkteamsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSubscribedWorkteamsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSubscribedWorkteamsOutput) SetNextToken(v string) *ListSubscribedWorkteamsOutput { - s.NextToken = &v - return s -} - -// SetSubscribedWorkteams sets the SubscribedWorkteams field's value. -func (s *ListSubscribedWorkteamsOutput) SetSubscribedWorkteams(v []*SubscribedWorkteam) *ListSubscribedWorkteamsOutput { - s.SubscribedWorkteams = v - return s -} - -type ListTagsInput struct { - _ struct{} `type:"structure"` - - // Maximum number of tags to return. - MaxResults *int64 `min:"50" type:"integer"` - - // If the response to the previous ListTags request is truncated, Amazon SageMaker - // returns this token. To retrieve the next set of tags, use it in the subsequent - // request. - NextToken *string `type:"string"` - - // The Amazon Resource Name (ARN) of the resource whose tags you want to retrieve. - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} - if s.MaxResults != nil && *s.MaxResults < 50 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 50)) - } - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput { - s.NextToken = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ListTagsInput) SetResourceArn(v string) *ListTagsInput { - s.ResourceArn = &v - return s -} - -type ListTagsOutput struct { - _ struct{} `type:"structure"` - - // If response is truncated, Amazon SageMaker includes a token in the response. - // You can use this token in your subsequent request to fetch next set of tokens. - NextToken *string `type:"string"` - - // An array of Tag objects, each with a tag key and a value. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s ListTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput { - s.NextToken = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsOutput) SetTags(v []*Tag) *ListTagsOutput { - s.Tags = v - return s -} - -type ListTrainingJobsForHyperParameterTuningJobInput struct { - _ struct{} `type:"structure"` - - // The name of the tuning job whose training jobs you want to list. - // - // HyperParameterTuningJobName is a required field - HyperParameterTuningJobName *string `min:"1" type:"string" required:"true"` - - // The maximum number of training jobs to return. The default value is 10. - MaxResults *int64 `min:"1" type:"integer"` - - // If the result of the previous ListTrainingJobsForHyperParameterTuningJob - // request was truncated, the response includes a NextToken. To retrieve the - // next set of training jobs, use the token in the next request. - NextToken *string `type:"string"` - - // The field to sort results by. The default is Name. - // - // If the value of this field is FinalObjectiveMetricValue, any training jobs - // that did not return an objective metric are not listed. - SortBy *string `type:"string" enum:"TrainingJobSortByOptions"` - - // The sort order for results. The default is Ascending. - SortOrder *string `type:"string" enum:"SortOrder"` - - // A filter that returns only training jobs with the specified status. - StatusEquals *string `type:"string" enum:"TrainingJobStatus"` -} - -// String returns the string representation -func (s ListTrainingJobsForHyperParameterTuningJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTrainingJobsForHyperParameterTuningJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTrainingJobsForHyperParameterTuningJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTrainingJobsForHyperParameterTuningJobInput"} - if s.HyperParameterTuningJobName == nil { - invalidParams.Add(request.NewErrParamRequired("HyperParameterTuningJobName")) - } - if s.HyperParameterTuningJobName != nil && len(*s.HyperParameterTuningJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HyperParameterTuningJobName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHyperParameterTuningJobName sets the HyperParameterTuningJobName field's value. -func (s *ListTrainingJobsForHyperParameterTuningJobInput) SetHyperParameterTuningJobName(v string) *ListTrainingJobsForHyperParameterTuningJobInput { - s.HyperParameterTuningJobName = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTrainingJobsForHyperParameterTuningJobInput) SetMaxResults(v int64) *ListTrainingJobsForHyperParameterTuningJobInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTrainingJobsForHyperParameterTuningJobInput) SetNextToken(v string) *ListTrainingJobsForHyperParameterTuningJobInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListTrainingJobsForHyperParameterTuningJobInput) SetSortBy(v string) *ListTrainingJobsForHyperParameterTuningJobInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListTrainingJobsForHyperParameterTuningJobInput) SetSortOrder(v string) *ListTrainingJobsForHyperParameterTuningJobInput { - s.SortOrder = &v - return s -} - -// SetStatusEquals sets the StatusEquals field's value. -func (s *ListTrainingJobsForHyperParameterTuningJobInput) SetStatusEquals(v string) *ListTrainingJobsForHyperParameterTuningJobInput { - s.StatusEquals = &v - return s -} - -type ListTrainingJobsForHyperParameterTuningJobOutput struct { - _ struct{} `type:"structure"` - - // If the result of this ListTrainingJobsForHyperParameterTuningJob request - // was truncated, the response includes a NextToken. To retrieve the next set - // of training jobs, use the token in the next request. - NextToken *string `type:"string"` - - // A list of TrainingJobSummary objects that describe the training jobs that - // the ListTrainingJobsForHyperParameterTuningJob request returned. - // - // TrainingJobSummaries is a required field - TrainingJobSummaries []*HyperParameterTrainingJobSummary `type:"list" required:"true"` -} - -// String returns the string representation -func (s ListTrainingJobsForHyperParameterTuningJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTrainingJobsForHyperParameterTuningJobOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTrainingJobsForHyperParameterTuningJobOutput) SetNextToken(v string) *ListTrainingJobsForHyperParameterTuningJobOutput { - s.NextToken = &v - return s -} - -// SetTrainingJobSummaries sets the TrainingJobSummaries field's value. -func (s *ListTrainingJobsForHyperParameterTuningJobOutput) SetTrainingJobSummaries(v []*HyperParameterTrainingJobSummary) *ListTrainingJobsForHyperParameterTuningJobOutput { - s.TrainingJobSummaries = v - return s -} - -type ListTrainingJobsInput struct { - _ struct{} `type:"structure"` - - // A filter that returns only training jobs created after the specified time - // (timestamp). - CreationTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only training jobs created before the specified time - // (timestamp). - CreationTimeBefore *time.Time `type:"timestamp"` - - // A filter that returns only training jobs modified after the specified time - // (timestamp). - LastModifiedTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only training jobs modified before the specified time - // (timestamp). - LastModifiedTimeBefore *time.Time `type:"timestamp"` - - // The maximum number of training jobs to return in the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A string in the training job name. This filter returns only training jobs - // whose name contains the specified string. - NameContains *string `type:"string"` - - // If the result of the previous ListTrainingJobs request was truncated, the - // response includes a NextToken. To retrieve the next set of training jobs, - // use the token in the next request. - NextToken *string `type:"string"` - - // The field to sort results by. The default is CreationTime. - SortBy *string `type:"string" enum:"SortBy"` - - // The sort order for results. The default is Ascending. - SortOrder *string `type:"string" enum:"SortOrder"` - - // A filter that retrieves only training jobs with a specific status. - StatusEquals *string `type:"string" enum:"TrainingJobStatus"` -} - -// String returns the string representation -func (s ListTrainingJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTrainingJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTrainingJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTrainingJobsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationTimeAfter sets the CreationTimeAfter field's value. -func (s *ListTrainingJobsInput) SetCreationTimeAfter(v time.Time) *ListTrainingJobsInput { - s.CreationTimeAfter = &v - return s -} - -// SetCreationTimeBefore sets the CreationTimeBefore field's value. -func (s *ListTrainingJobsInput) SetCreationTimeBefore(v time.Time) *ListTrainingJobsInput { - s.CreationTimeBefore = &v - return s -} - -// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. -func (s *ListTrainingJobsInput) SetLastModifiedTimeAfter(v time.Time) *ListTrainingJobsInput { - s.LastModifiedTimeAfter = &v - return s -} - -// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. -func (s *ListTrainingJobsInput) SetLastModifiedTimeBefore(v time.Time) *ListTrainingJobsInput { - s.LastModifiedTimeBefore = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTrainingJobsInput) SetMaxResults(v int64) *ListTrainingJobsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListTrainingJobsInput) SetNameContains(v string) *ListTrainingJobsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTrainingJobsInput) SetNextToken(v string) *ListTrainingJobsInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListTrainingJobsInput) SetSortBy(v string) *ListTrainingJobsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListTrainingJobsInput) SetSortOrder(v string) *ListTrainingJobsInput { - s.SortOrder = &v - return s -} - -// SetStatusEquals sets the StatusEquals field's value. -func (s *ListTrainingJobsInput) SetStatusEquals(v string) *ListTrainingJobsInput { - s.StatusEquals = &v - return s -} - -type ListTrainingJobsOutput struct { - _ struct{} `type:"structure"` - - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of training jobs, use it in the subsequent request. - NextToken *string `type:"string"` - - // An array of TrainingJobSummary objects, each listing a training job. - // - // TrainingJobSummaries is a required field - TrainingJobSummaries []*TrainingJobSummary `type:"list" required:"true"` -} - -// String returns the string representation -func (s ListTrainingJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTrainingJobsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTrainingJobsOutput) SetNextToken(v string) *ListTrainingJobsOutput { - s.NextToken = &v - return s -} - -// SetTrainingJobSummaries sets the TrainingJobSummaries field's value. -func (s *ListTrainingJobsOutput) SetTrainingJobSummaries(v []*TrainingJobSummary) *ListTrainingJobsOutput { - s.TrainingJobSummaries = v - return s -} - -type ListTransformJobsInput struct { - _ struct{} `type:"structure"` - - // A filter that returns only transform jobs created after the specified time. - CreationTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only transform jobs created before the specified time. - CreationTimeBefore *time.Time `type:"timestamp"` - - // A filter that returns only transform jobs modified after the specified time. - LastModifiedTimeAfter *time.Time `type:"timestamp"` - - // A filter that returns only transform jobs modified before the specified time. - LastModifiedTimeBefore *time.Time `type:"timestamp"` - - // The maximum number of transform jobs to return in the response. The default - // value is 10. - MaxResults *int64 `min:"1" type:"integer"` - - // A string in the transform job name. This filter returns only transform jobs - // whose name contains the specified string. - NameContains *string `type:"string"` - - // If the result of the previous ListTransformJobs request was truncated, the - // response includes a NextToken. To retrieve the next set of transform jobs, - // use the token in the next request. - NextToken *string `type:"string"` - - // The field to sort results by. The default is CreationTime. - SortBy *string `type:"string" enum:"SortBy"` - - // The sort order for results. The default is Descending. - SortOrder *string `type:"string" enum:"SortOrder"` - - // A filter that retrieves only transform jobs with a specific status. - StatusEquals *string `type:"string" enum:"TransformJobStatus"` -} - -// String returns the string representation -func (s ListTransformJobsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTransformJobsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTransformJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTransformJobsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationTimeAfter sets the CreationTimeAfter field's value. -func (s *ListTransformJobsInput) SetCreationTimeAfter(v time.Time) *ListTransformJobsInput { - s.CreationTimeAfter = &v - return s -} - -// SetCreationTimeBefore sets the CreationTimeBefore field's value. -func (s *ListTransformJobsInput) SetCreationTimeBefore(v time.Time) *ListTransformJobsInput { - s.CreationTimeBefore = &v - return s -} - -// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. -func (s *ListTransformJobsInput) SetLastModifiedTimeAfter(v time.Time) *ListTransformJobsInput { - s.LastModifiedTimeAfter = &v - return s -} - -// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. -func (s *ListTransformJobsInput) SetLastModifiedTimeBefore(v time.Time) *ListTransformJobsInput { - s.LastModifiedTimeBefore = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTransformJobsInput) SetMaxResults(v int64) *ListTransformJobsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListTransformJobsInput) SetNameContains(v string) *ListTransformJobsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTransformJobsInput) SetNextToken(v string) *ListTransformJobsInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListTransformJobsInput) SetSortBy(v string) *ListTransformJobsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListTransformJobsInput) SetSortOrder(v string) *ListTransformJobsInput { - s.SortOrder = &v - return s -} - -// SetStatusEquals sets the StatusEquals field's value. -func (s *ListTransformJobsInput) SetStatusEquals(v string) *ListTransformJobsInput { - s.StatusEquals = &v - return s -} - -type ListTransformJobsOutput struct { - _ struct{} `type:"structure"` - - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of transform jobs, use it in the next request. - NextToken *string `type:"string"` - - // An array of TransformJobSummary objects. - // - // TransformJobSummaries is a required field - TransformJobSummaries []*TransformJobSummary `type:"list" required:"true"` -} - -// String returns the string representation -func (s ListTransformJobsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTransformJobsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTransformJobsOutput) SetNextToken(v string) *ListTransformJobsOutput { - s.NextToken = &v - return s -} - -// SetTransformJobSummaries sets the TransformJobSummaries field's value. -func (s *ListTransformJobsOutput) SetTransformJobSummaries(v []*TransformJobSummary) *ListTransformJobsOutput { - s.TransformJobSummaries = v - return s -} - -type ListWorkteamsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of work teams to return in each page of the response. - MaxResults *int64 `min:"1" type:"integer"` - - // A string in the work team's name. This filter returns only work teams whose - // name contains the specified string. - NameContains *string `min:"1" type:"string"` - - // If the result of the previous ListWorkteams request was truncated, the response - // includes a NextToken. To retrieve the next set of labeling jobs, use the - // token in the next request. - NextToken *string `type:"string"` - - // The field to sort results by. The default is CreationTime. - SortBy *string `type:"string" enum:"ListWorkteamsSortByOptions"` - - // The sort order for results. The default is Ascending. - SortOrder *string `type:"string" enum:"SortOrder"` -} - -// String returns the string representation -func (s ListWorkteamsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListWorkteamsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListWorkteamsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListWorkteamsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NameContains != nil && len(*s.NameContains) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListWorkteamsInput) SetMaxResults(v int64) *ListWorkteamsInput { - s.MaxResults = &v - return s -} - -// SetNameContains sets the NameContains field's value. -func (s *ListWorkteamsInput) SetNameContains(v string) *ListWorkteamsInput { - s.NameContains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListWorkteamsInput) SetNextToken(v string) *ListWorkteamsInput { - s.NextToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *ListWorkteamsInput) SetSortBy(v string) *ListWorkteamsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *ListWorkteamsInput) SetSortOrder(v string) *ListWorkteamsInput { - s.SortOrder = &v - return s -} - -type ListWorkteamsOutput struct { - _ struct{} `type:"structure"` - - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of work teams, use it in the subsequent request. - NextToken *string `type:"string"` - - // An array of Workteam objects, each describing a work team. - // - // Workteams is a required field - Workteams []*Workteam `type:"list" required:"true"` -} - -// String returns the string representation -func (s ListWorkteamsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListWorkteamsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListWorkteamsOutput) SetNextToken(v string) *ListWorkteamsOutput { - s.NextToken = &v - return s -} - -// SetWorkteams sets the Workteams field's value. -func (s *ListWorkteamsOutput) SetWorkteams(v []*Workteam) *ListWorkteamsOutput { - s.Workteams = v - return s -} - -// Defines the Amazon Cognito user group that is part of a work team. -type MemberDefinition struct { - _ struct{} `type:"structure"` - - // The Amazon Cognito user group that is part of the work team. - CognitoMemberDefinition *CognitoMemberDefinition `type:"structure"` -} - -// String returns the string representation -func (s MemberDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MemberDefinition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MemberDefinition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MemberDefinition"} - if s.CognitoMemberDefinition != nil { - if err := s.CognitoMemberDefinition.Validate(); err != nil { - invalidParams.AddNested("CognitoMemberDefinition", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCognitoMemberDefinition sets the CognitoMemberDefinition field's value. -func (s *MemberDefinition) SetCognitoMemberDefinition(v *CognitoMemberDefinition) *MemberDefinition { - s.CognitoMemberDefinition = v - return s -} - -// The name, value, and date and time of a metric that was emitted to Amazon -// CloudWatch. -type MetricData struct { - _ struct{} `type:"structure"` - - // The name of the metric. - MetricName *string `min:"1" type:"string"` - - // The date and time that the algorithm emitted the metric. - Timestamp *time.Time `type:"timestamp"` - - // The value of the metric. - Value *float64 `type:"float"` -} - -// String returns the string representation -func (s MetricData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricData) GoString() string { - return s.String() -} - -// SetMetricName sets the MetricName field's value. -func (s *MetricData) SetMetricName(v string) *MetricData { - s.MetricName = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *MetricData) SetTimestamp(v time.Time) *MetricData { - s.Timestamp = &v - return s -} - -// SetValue sets the Value field's value. -func (s *MetricData) SetValue(v float64) *MetricData { - s.Value = &v - return s -} - -// Specifies a metric that the training algorithm writes to stderr or stdout. -// Amazon SageMakerhyperparameter tuning captures all defined metrics. You specify -// one metric that a hyperparameter tuning job uses as its objective metric -// to choose the best training job. -type MetricDefinition struct { - _ struct{} `type:"structure"` - - // The name of the metric. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // A regular expression that searches the output of a training job and gets - // the value of the metric. For more information about using regular expressions - // to define metrics, see Defining Objective Metrics (http://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning-define-metrics.html). - // - // Regex is a required field - Regex *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s MetricDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MetricDefinition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MetricDefinition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MetricDefinition"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Regex == nil { - invalidParams.Add(request.NewErrParamRequired("Regex")) - } - if s.Regex != nil && len(*s.Regex) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Regex", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *MetricDefinition) SetName(v string) *MetricDefinition { - s.Name = &v - return s -} - -// SetRegex sets the Regex field's value. -func (s *MetricDefinition) SetRegex(v string) *MetricDefinition { - s.Regex = &v - return s -} - -// Provides information about the location that is configured for storing model -// artifacts. -type ModelArtifacts struct { - _ struct{} `type:"structure"` - - // The path of the S3 object that contains the model artifacts. For example, - // s3://bucket-name/keynameprefix/model.tar.gz. - // - // S3ModelArtifacts is a required field - S3ModelArtifacts *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModelArtifacts) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModelArtifacts) GoString() string { - return s.String() -} - -// SetS3ModelArtifacts sets the S3ModelArtifacts field's value. -func (s *ModelArtifacts) SetS3ModelArtifacts(v string) *ModelArtifacts { - s.S3ModelArtifacts = &v - return s -} - -// Describes the Docker container for the model package. -type ModelPackageContainerDefinition struct { - _ struct{} `type:"structure"` - - // The DNS host name for the Docker container. - ContainerHostname *string `type:"string"` - - // The Amazon EC2 Container Registry (Amazon ECR) path where inference code - // is stored. - // - // If you are using your own custom algorithm instead of an algorithm provided - // by Amazon SageMaker, the inference code must meet Amazon SageMaker requirements. - // Amazon SageMaker supports both registry/repository[:tag] and registry/repository[@digest] - // image path formats. For more information, see Using Your Own Algorithms with - // Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html). - // - // Image is a required field - Image *string `type:"string" required:"true"` - - // An MD5 hash of the training algorithm that identifies the Docker image used - // for training. - ImageDigest *string `type:"string"` - - // The Amazon S3 path where the model artifacts, which result from model training, - // are stored. This path must point to a single gzip compressed tar archive - // (.tar.gz suffix). - ModelDataUrl *string `type:"string"` - - // The AWS Marketplace product ID of the model package. - ProductId *string `type:"string"` -} - -// String returns the string representation -func (s ModelPackageContainerDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModelPackageContainerDefinition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModelPackageContainerDefinition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModelPackageContainerDefinition"} - if s.Image == nil { - invalidParams.Add(request.NewErrParamRequired("Image")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContainerHostname sets the ContainerHostname field's value. -func (s *ModelPackageContainerDefinition) SetContainerHostname(v string) *ModelPackageContainerDefinition { - s.ContainerHostname = &v - return s -} - -// SetImage sets the Image field's value. -func (s *ModelPackageContainerDefinition) SetImage(v string) *ModelPackageContainerDefinition { - s.Image = &v - return s -} - -// SetImageDigest sets the ImageDigest field's value. -func (s *ModelPackageContainerDefinition) SetImageDigest(v string) *ModelPackageContainerDefinition { - s.ImageDigest = &v - return s -} - -// SetModelDataUrl sets the ModelDataUrl field's value. -func (s *ModelPackageContainerDefinition) SetModelDataUrl(v string) *ModelPackageContainerDefinition { - s.ModelDataUrl = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *ModelPackageContainerDefinition) SetProductId(v string) *ModelPackageContainerDefinition { - s.ProductId = &v - return s -} - -// Specifies the validation and image scan statuses of the model package. -type ModelPackageStatusDetails struct { - _ struct{} `type:"structure"` - - // The status of the scan of the Docker image container for the model package. - ImageScanStatuses []*ModelPackageStatusItem `type:"list"` - - // The validation status of the model package. - // - // ValidationStatuses is a required field - ValidationStatuses []*ModelPackageStatusItem `type:"list" required:"true"` -} - -// String returns the string representation -func (s ModelPackageStatusDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModelPackageStatusDetails) GoString() string { - return s.String() -} - -// SetImageScanStatuses sets the ImageScanStatuses field's value. -func (s *ModelPackageStatusDetails) SetImageScanStatuses(v []*ModelPackageStatusItem) *ModelPackageStatusDetails { - s.ImageScanStatuses = v - return s -} - -// SetValidationStatuses sets the ValidationStatuses field's value. -func (s *ModelPackageStatusDetails) SetValidationStatuses(v []*ModelPackageStatusItem) *ModelPackageStatusDetails { - s.ValidationStatuses = v - return s -} - -// Represents the overall status of a model package. -type ModelPackageStatusItem struct { - _ struct{} `type:"structure"` - - // if the overall status is Failed, the reason for the failure. - FailureReason *string `type:"string"` - - // The name of the model package for which the overall status is being reported. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The current status. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"DetailedModelPackageStatus"` -} - -// String returns the string representation -func (s ModelPackageStatusItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModelPackageStatusItem) GoString() string { - return s.String() -} - -// SetFailureReason sets the FailureReason field's value. -func (s *ModelPackageStatusItem) SetFailureReason(v string) *ModelPackageStatusItem { - s.FailureReason = &v - return s -} - -// SetName sets the Name field's value. -func (s *ModelPackageStatusItem) SetName(v string) *ModelPackageStatusItem { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ModelPackageStatusItem) SetStatus(v string) *ModelPackageStatusItem { - s.Status = &v - return s -} - -// Provides summary information about a model package. -type ModelPackageSummary struct { - _ struct{} `type:"structure"` - - // A timestamp that shows when the model package was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The Amazon Resource Name (ARN) of the model package. - // - // ModelPackageArn is a required field - ModelPackageArn *string `min:"1" type:"string" required:"true"` - - // A brief description of the model package. - ModelPackageDescription *string `type:"string"` - - // The name of the model package. - // - // ModelPackageName is a required field - ModelPackageName *string `min:"1" type:"string" required:"true"` - - // The overall status of the model package. - // - // ModelPackageStatus is a required field - ModelPackageStatus *string `type:"string" required:"true" enum:"ModelPackageStatus"` -} - -// String returns the string representation -func (s ModelPackageSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModelPackageSummary) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ModelPackageSummary) SetCreationTime(v time.Time) *ModelPackageSummary { - s.CreationTime = &v - return s -} - -// SetModelPackageArn sets the ModelPackageArn field's value. -func (s *ModelPackageSummary) SetModelPackageArn(v string) *ModelPackageSummary { - s.ModelPackageArn = &v - return s -} - -// SetModelPackageDescription sets the ModelPackageDescription field's value. -func (s *ModelPackageSummary) SetModelPackageDescription(v string) *ModelPackageSummary { - s.ModelPackageDescription = &v - return s -} - -// SetModelPackageName sets the ModelPackageName field's value. -func (s *ModelPackageSummary) SetModelPackageName(v string) *ModelPackageSummary { - s.ModelPackageName = &v - return s -} - -// SetModelPackageStatus sets the ModelPackageStatus field's value. -func (s *ModelPackageSummary) SetModelPackageStatus(v string) *ModelPackageSummary { - s.ModelPackageStatus = &v - return s -} - -// Contains data, such as the inputs and targeted instance types that are used -// in the process of validating the model package. -// -// The data provided in the validation profile is made available to your buyers -// on AWS Marketplace. -type ModelPackageValidationProfile struct { - _ struct{} `type:"structure"` - - // The name of the profile for the model package. - // - // ProfileName is a required field - ProfileName *string `min:"1" type:"string" required:"true"` - - // The TransformJobDefinition object that describes the transform job used for - // the validation of the model package. - // - // TransformJobDefinition is a required field - TransformJobDefinition *TransformJobDefinition `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ModelPackageValidationProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModelPackageValidationProfile) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModelPackageValidationProfile) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModelPackageValidationProfile"} - if s.ProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("ProfileName")) - } - if s.ProfileName != nil && len(*s.ProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProfileName", 1)) - } - if s.TransformJobDefinition == nil { - invalidParams.Add(request.NewErrParamRequired("TransformJobDefinition")) - } - if s.TransformJobDefinition != nil { - if err := s.TransformJobDefinition.Validate(); err != nil { - invalidParams.AddNested("TransformJobDefinition", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetProfileName sets the ProfileName field's value. -func (s *ModelPackageValidationProfile) SetProfileName(v string) *ModelPackageValidationProfile { - s.ProfileName = &v - return s -} - -// SetTransformJobDefinition sets the TransformJobDefinition field's value. -func (s *ModelPackageValidationProfile) SetTransformJobDefinition(v *TransformJobDefinition) *ModelPackageValidationProfile { - s.TransformJobDefinition = v - return s -} - -// Specifies batch transform jobs that Amazon SageMaker runs to validate your -// model package. -type ModelPackageValidationSpecification struct { - _ struct{} `type:"structure"` - - // An array of ModelPackageValidationProfile objects, each of which specifies - // a batch transform job that Amazon SageMaker runs to validate your model package. - // - // ValidationProfiles is a required field - ValidationProfiles []*ModelPackageValidationProfile `min:"1" type:"list" required:"true"` - - // The IAM roles to be used for the validation of the model package. - // - // ValidationRole is a required field - ValidationRole *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s ModelPackageValidationSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModelPackageValidationSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModelPackageValidationSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModelPackageValidationSpecification"} - if s.ValidationProfiles == nil { - invalidParams.Add(request.NewErrParamRequired("ValidationProfiles")) - } - if s.ValidationProfiles != nil && len(s.ValidationProfiles) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ValidationProfiles", 1)) - } - if s.ValidationRole == nil { - invalidParams.Add(request.NewErrParamRequired("ValidationRole")) - } - if s.ValidationRole != nil && len(*s.ValidationRole) < 20 { - invalidParams.Add(request.NewErrParamMinLen("ValidationRole", 20)) - } - if s.ValidationProfiles != nil { - for i, v := range s.ValidationProfiles { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ValidationProfiles", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetValidationProfiles sets the ValidationProfiles field's value. -func (s *ModelPackageValidationSpecification) SetValidationProfiles(v []*ModelPackageValidationProfile) *ModelPackageValidationSpecification { - s.ValidationProfiles = v - return s -} - -// SetValidationRole sets the ValidationRole field's value. -func (s *ModelPackageValidationSpecification) SetValidationRole(v string) *ModelPackageValidationSpecification { - s.ValidationRole = &v - return s -} - -// Provides summary information about a model. -type ModelSummary struct { - _ struct{} `type:"structure"` - - // A timestamp that indicates when the model was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The Amazon Resource Name (ARN) of the model. - // - // ModelArn is a required field - ModelArn *string `min:"20" type:"string" required:"true"` - - // The name of the model that you want a summary for. - // - // ModelName is a required field - ModelName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ModelSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModelSummary) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ModelSummary) SetCreationTime(v time.Time) *ModelSummary { - s.CreationTime = &v - return s -} - -// SetModelArn sets the ModelArn field's value. -func (s *ModelSummary) SetModelArn(v string) *ModelSummary { - s.ModelArn = &v - return s -} - -// SetModelName sets the ModelName field's value. -func (s *ModelSummary) SetModelName(v string) *ModelSummary { - s.ModelName = &v - return s -} - -// Defines a list of NestedFilters objects. To satisfy the conditions specified -// in the NestedFilters call, a resource must satisfy the conditions of all -// of the filters. -// -// For example, you could define a NestedFilters using the training job's InputDataConfig -// property to filter on Channel objects. -// -// A NestedFilters object contains multiple filters. For example, to find all -// training jobs whose name contains train and that have cat/data in their S3Uri -// (specified in InputDataConfig), you need to create a NestedFilters object -// that specifies the InputDataConfig property with the following Filter objects: -// -// * '{Name:"InputDataConfig.ChannelName", "Operator":"EQUALS", "Value":"train"}', -// -// * '{Name:"InputDataConfig.DataSource.S3DataSource.S3Uri", "Operator":"CONTAINS", -// "Value":"cat/data"}' -type NestedFilters struct { - _ struct{} `type:"structure"` - - // A list of filters. Each filter acts on a property. Filters must contain at - // least one Filters value. For example, a NestedFilters call might include - // a filter on the PropertyName parameter of the InputDataConfig property: InputDataConfig.DataSource.S3DataSource.S3Uri. - // - // Filters is a required field - Filters []*Filter `min:"1" type:"list" required:"true"` - - // The name of the property to use in the nested filters. The value must match - // a listed property name, such as InputDataConfig. - // - // NestedPropertyName is a required field - NestedPropertyName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s NestedFilters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NestedFilters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NestedFilters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NestedFilters"} - if s.Filters == nil { - invalidParams.Add(request.NewErrParamRequired("Filters")) - } - if s.Filters != nil && len(s.Filters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) - } - if s.NestedPropertyName == nil { - invalidParams.Add(request.NewErrParamRequired("NestedPropertyName")) - } - if s.NestedPropertyName != nil && len(*s.NestedPropertyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NestedPropertyName", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *NestedFilters) SetFilters(v []*Filter) *NestedFilters { - s.Filters = v - return s -} - -// SetNestedPropertyName sets the NestedPropertyName field's value. -func (s *NestedFilters) SetNestedPropertyName(v string) *NestedFilters { - s.NestedPropertyName = &v - return s -} - -// Provides a summary of a notebook instance lifecycle configuration. -type NotebookInstanceLifecycleConfigSummary struct { - _ struct{} `type:"structure"` - - // A timestamp that tells when the lifecycle configuration was created. - CreationTime *time.Time `type:"timestamp"` - - // A timestamp that tells when the lifecycle configuration was last modified. - LastModifiedTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the lifecycle configuration. - // - // NotebookInstanceLifecycleConfigArn is a required field - NotebookInstanceLifecycleConfigArn *string `type:"string" required:"true"` - - // The name of the lifecycle configuration. - // - // NotebookInstanceLifecycleConfigName is a required field - NotebookInstanceLifecycleConfigName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s NotebookInstanceLifecycleConfigSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NotebookInstanceLifecycleConfigSummary) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *NotebookInstanceLifecycleConfigSummary) SetCreationTime(v time.Time) *NotebookInstanceLifecycleConfigSummary { - s.CreationTime = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *NotebookInstanceLifecycleConfigSummary) SetLastModifiedTime(v time.Time) *NotebookInstanceLifecycleConfigSummary { - s.LastModifiedTime = &v - return s -} - -// SetNotebookInstanceLifecycleConfigArn sets the NotebookInstanceLifecycleConfigArn field's value. -func (s *NotebookInstanceLifecycleConfigSummary) SetNotebookInstanceLifecycleConfigArn(v string) *NotebookInstanceLifecycleConfigSummary { - s.NotebookInstanceLifecycleConfigArn = &v - return s -} - -// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. -func (s *NotebookInstanceLifecycleConfigSummary) SetNotebookInstanceLifecycleConfigName(v string) *NotebookInstanceLifecycleConfigSummary { - s.NotebookInstanceLifecycleConfigName = &v - return s -} - -// Contains the notebook instance lifecycle configuration script. -// -// Each lifecycle configuration script has a limit of 16384 characters. -// -// The value of the $PATH environment variable that is available to both scripts -// is /sbin:bin:/usr/sbin:/usr/bin. -// -// View CloudWatch Logs for notebook instance lifecycle configurations in log -// group /aws/sagemaker/NotebookInstances in log stream [notebook-instance-name]/[LifecycleConfigHook]. -// -// Lifecycle configuration scripts cannot run for longer than 5 minutes. If -// a script runs for longer than 5 minutes, it fails and the notebook instance -// is not created or started. -// -// For information about notebook instance lifestyle configurations, see Step -// 2.1: (Optional) Customize a Notebook Instance (http://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html). -type NotebookInstanceLifecycleHook struct { - _ struct{} `type:"structure"` - - // A base64-encoded string that contains a shell script for a notebook instance - // lifecycle configuration. - Content *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s NotebookInstanceLifecycleHook) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NotebookInstanceLifecycleHook) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NotebookInstanceLifecycleHook) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NotebookInstanceLifecycleHook"} - if s.Content != nil && len(*s.Content) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Content", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContent sets the Content field's value. -func (s *NotebookInstanceLifecycleHook) SetContent(v string) *NotebookInstanceLifecycleHook { - s.Content = &v - return s -} - -// Provides summary information for an Amazon SageMaker notebook instance. -type NotebookInstanceSummary struct { - _ struct{} `type:"structure"` - - // An array of up to three Git repositories associated with the notebook instance. - // These can be either the names of Git repositories stored as resources in - // your account, or the URL of Git repositories in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) - // or in any other Git repository. These repositories are cloned at the same - // level as the default repository of your notebook instance. For more information, - // see Associating Git Repositories with Amazon SageMaker Notebook Instances - // (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). - AdditionalCodeRepositories []*string `type:"list"` - - // A timestamp that shows when the notebook instance was created. - CreationTime *time.Time `type:"timestamp"` - - // The Git repository associated with the notebook instance as its default code - // repository. This can be either the name of a Git repository stored as a resource - // in your account, or the URL of a Git repository in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) - // or in any other Git repository. When you open a notebook instance, it opens - // in the directory that contains this repository. For more information, see - // Associating Git Repositories with Amazon SageMaker Notebook Instances (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). - DefaultCodeRepository *string `min:"1" type:"string"` - - // The type of ML compute instance that the notebook instance is running on. - InstanceType *string `type:"string" enum:"InstanceType"` - - // A timestamp that shows when the notebook instance was last modified. - LastModifiedTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the notebook instance. - // - // NotebookInstanceArn is a required field - NotebookInstanceArn *string `type:"string" required:"true"` - - // The name of a notebook instance lifecycle configuration associated with this - // notebook instance. - // - // For information about notebook instance lifestyle configurations, see Step - // 2.1: (Optional) Customize a Notebook Instance (http://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html). - NotebookInstanceLifecycleConfigName *string `type:"string"` - - // The name of the notebook instance that you want a summary for. - // - // NotebookInstanceName is a required field - NotebookInstanceName *string `type:"string" required:"true"` - - // The status of the notebook instance. - NotebookInstanceStatus *string `type:"string" enum:"NotebookInstanceStatus"` - - // The URL that you use to connect to the Jupyter instance running in your notebook - // instance. - Url *string `type:"string"` -} - -// String returns the string representation -func (s NotebookInstanceSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NotebookInstanceSummary) GoString() string { - return s.String() -} - -// SetAdditionalCodeRepositories sets the AdditionalCodeRepositories field's value. -func (s *NotebookInstanceSummary) SetAdditionalCodeRepositories(v []*string) *NotebookInstanceSummary { - s.AdditionalCodeRepositories = v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *NotebookInstanceSummary) SetCreationTime(v time.Time) *NotebookInstanceSummary { - s.CreationTime = &v - return s -} - -// SetDefaultCodeRepository sets the DefaultCodeRepository field's value. -func (s *NotebookInstanceSummary) SetDefaultCodeRepository(v string) *NotebookInstanceSummary { - s.DefaultCodeRepository = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *NotebookInstanceSummary) SetInstanceType(v string) *NotebookInstanceSummary { - s.InstanceType = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *NotebookInstanceSummary) SetLastModifiedTime(v time.Time) *NotebookInstanceSummary { - s.LastModifiedTime = &v - return s -} - -// SetNotebookInstanceArn sets the NotebookInstanceArn field's value. -func (s *NotebookInstanceSummary) SetNotebookInstanceArn(v string) *NotebookInstanceSummary { - s.NotebookInstanceArn = &v - return s -} - -// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. -func (s *NotebookInstanceSummary) SetNotebookInstanceLifecycleConfigName(v string) *NotebookInstanceSummary { - s.NotebookInstanceLifecycleConfigName = &v - return s -} - -// SetNotebookInstanceName sets the NotebookInstanceName field's value. -func (s *NotebookInstanceSummary) SetNotebookInstanceName(v string) *NotebookInstanceSummary { - s.NotebookInstanceName = &v - return s -} - -// SetNotebookInstanceStatus sets the NotebookInstanceStatus field's value. -func (s *NotebookInstanceSummary) SetNotebookInstanceStatus(v string) *NotebookInstanceSummary { - s.NotebookInstanceStatus = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *NotebookInstanceSummary) SetUrl(v string) *NotebookInstanceSummary { - s.Url = &v - return s -} - -// Specifies the number of training jobs that this hyperparameter tuning job -// launched, categorized by the status of their objective metric. The objective -// metric status shows whether the final objective metric for the training job -// has been evaluated by the tuning job and used in the hyperparameter tuning -// process. -type ObjectiveStatusCounters struct { - _ struct{} `type:"structure"` - - // The number of training jobs whose final objective metric was not evaluated - // and used in the hyperparameter tuning process. This typically occurs when - // the training job failed or did not emit an objective metric. - Failed *int64 `type:"integer"` - - // The number of training jobs that are in progress and pending evaluation of - // their final objective metric. - Pending *int64 `type:"integer"` - - // The number of training jobs whose final objective metric was evaluated by - // the hyperparameter tuning job and used in the hyperparameter tuning process. - Succeeded *int64 `type:"integer"` -} - -// String returns the string representation -func (s ObjectiveStatusCounters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ObjectiveStatusCounters) GoString() string { - return s.String() -} - -// SetFailed sets the Failed field's value. -func (s *ObjectiveStatusCounters) SetFailed(v int64) *ObjectiveStatusCounters { - s.Failed = &v - return s -} - -// SetPending sets the Pending field's value. -func (s *ObjectiveStatusCounters) SetPending(v int64) *ObjectiveStatusCounters { - s.Pending = &v - return s -} - -// SetSucceeded sets the Succeeded field's value. -func (s *ObjectiveStatusCounters) SetSucceeded(v int64) *ObjectiveStatusCounters { - s.Succeeded = &v - return s -} - -// Contains information about the output location for the compiled model and -// the device (target) that the model runs on. -type OutputConfig struct { - _ struct{} `type:"structure"` - - // Identifies the S3 path where you want Amazon SageMaker to store the model - // artifacts. For example, s3://bucket-name/key-name-prefix. - // - // S3OutputLocation is a required field - S3OutputLocation *string `type:"string" required:"true"` - - // Identifies the device that you want to run your model on after it has been - // compiled. For example: ml_c5. - // - // TargetDevice is a required field - TargetDevice *string `type:"string" required:"true" enum:"TargetDevice"` -} - -// String returns the string representation -func (s OutputConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OutputConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OutputConfig"} - if s.S3OutputLocation == nil { - invalidParams.Add(request.NewErrParamRequired("S3OutputLocation")) - } - if s.TargetDevice == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDevice")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3OutputLocation sets the S3OutputLocation field's value. -func (s *OutputConfig) SetS3OutputLocation(v string) *OutputConfig { - s.S3OutputLocation = &v - return s -} - -// SetTargetDevice sets the TargetDevice field's value. -func (s *OutputConfig) SetTargetDevice(v string) *OutputConfig { - s.TargetDevice = &v - return s -} - -// Provides information about how to store model training results (model artifacts). -type OutputDataConfig struct { - _ struct{} `type:"structure"` - - // The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to - // encrypt the model artifacts at rest using Amazon S3 server-side encryption. - // The KmsKeyId can be any of the following formats: - // - // * // KMS Key ID - // - // "1234abcd-12ab-34cd-56ef-1234567890ab" - // - // * // Amazon Resource Name (ARN) of a KMS Key - // - // "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" - // - // * // KMS Key Alias - // - // "alias/ExampleAlias" - // - // * // Amazon Resource Name (ARN) of a KMS Key Alias - // - // "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" - // - // If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS - // key for Amazon S3 for your role's account. For more information, see KMS-Managed - // Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) - // in the Amazon Simple Storage Service Developer Guide. - // - // The KMS key policy must grant permission to the IAM role that you specify - // in your CreateTramsformJob request. For more information, see Using Key Policies - // in AWS KMS (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) - // in the AWS Key Management Service Developer Guide. - KmsKeyId *string `type:"string"` - - // Identifies the S3 path where you want Amazon SageMaker to store the model - // artifacts. For example, s3://bucket-name/key-name-prefix. - // - // S3OutputPath is a required field - S3OutputPath *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s OutputDataConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputDataConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OutputDataConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OutputDataConfig"} - if s.S3OutputPath == nil { - invalidParams.Add(request.NewErrParamRequired("S3OutputPath")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *OutputDataConfig) SetKmsKeyId(v string) *OutputDataConfig { - s.KmsKeyId = &v - return s -} - -// SetS3OutputPath sets the S3OutputPath field's value. -func (s *OutputDataConfig) SetS3OutputPath(v string) *OutputDataConfig { - s.S3OutputPath = &v - return s -} - -// Defines the possible values for categorical, continuous, and integer hyperparameters -// to be used by an algorithm. -type ParameterRange struct { - _ struct{} `type:"structure"` - - // A CategoricalParameterRangeSpecification object that defines the possible - // values for a categorical hyperparameter. - CategoricalParameterRangeSpecification *CategoricalParameterRangeSpecification `type:"structure"` - - // A ContinuousParameterRangeSpecification object that defines the possible - // values for a continuous hyperparameter. - ContinuousParameterRangeSpecification *ContinuousParameterRangeSpecification `type:"structure"` - - // A IntegerParameterRangeSpecification object that defines the possible values - // for an integer hyperparameter. - IntegerParameterRangeSpecification *IntegerParameterRangeSpecification `type:"structure"` -} - -// String returns the string representation -func (s ParameterRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterRange) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ParameterRange) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ParameterRange"} - if s.CategoricalParameterRangeSpecification != nil { - if err := s.CategoricalParameterRangeSpecification.Validate(); err != nil { - invalidParams.AddNested("CategoricalParameterRangeSpecification", err.(request.ErrInvalidParams)) - } - } - if s.ContinuousParameterRangeSpecification != nil { - if err := s.ContinuousParameterRangeSpecification.Validate(); err != nil { - invalidParams.AddNested("ContinuousParameterRangeSpecification", err.(request.ErrInvalidParams)) - } - } - if s.IntegerParameterRangeSpecification != nil { - if err := s.IntegerParameterRangeSpecification.Validate(); err != nil { - invalidParams.AddNested("IntegerParameterRangeSpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCategoricalParameterRangeSpecification sets the CategoricalParameterRangeSpecification field's value. -func (s *ParameterRange) SetCategoricalParameterRangeSpecification(v *CategoricalParameterRangeSpecification) *ParameterRange { - s.CategoricalParameterRangeSpecification = v - return s -} - -// SetContinuousParameterRangeSpecification sets the ContinuousParameterRangeSpecification field's value. -func (s *ParameterRange) SetContinuousParameterRangeSpecification(v *ContinuousParameterRangeSpecification) *ParameterRange { - s.ContinuousParameterRangeSpecification = v - return s -} - -// SetIntegerParameterRangeSpecification sets the IntegerParameterRangeSpecification field's value. -func (s *ParameterRange) SetIntegerParameterRangeSpecification(v *IntegerParameterRangeSpecification) *ParameterRange { - s.IntegerParameterRangeSpecification = v - return s -} - -// Specifies ranges of integer, continuous, and categorical hyperparameters -// that a hyperparameter tuning job searches. The hyperparameter tuning job -// launches training jobs with hyperparameter values within these ranges to -// find the combination of values that result in the training job with the best -// performance as measured by the objective metric of the hyperparameter tuning -// job. -// -// You can specify a maximum of 20 hyperparameters that a hyperparameter tuning -// job can search over. Every possible value of a categorical parameter range -// counts against this limit. -type ParameterRanges struct { - _ struct{} `type:"structure"` - - // The array of CategoricalParameterRange objects that specify ranges of categorical - // hyperparameters that a hyperparameter tuning job searches. - CategoricalParameterRanges []*CategoricalParameterRange `type:"list"` - - // The array of ContinuousParameterRange objects that specify ranges of continuous - // hyperparameters that a hyperparameter tuning job searches. - ContinuousParameterRanges []*ContinuousParameterRange `type:"list"` - - // The array of IntegerParameterRange objects that specify ranges of integer - // hyperparameters that a hyperparameter tuning job searches. - IntegerParameterRanges []*IntegerParameterRange `type:"list"` -} - -// String returns the string representation -func (s ParameterRanges) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterRanges) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ParameterRanges) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ParameterRanges"} - if s.CategoricalParameterRanges != nil { - for i, v := range s.CategoricalParameterRanges { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CategoricalParameterRanges", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ContinuousParameterRanges != nil { - for i, v := range s.ContinuousParameterRanges { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContinuousParameterRanges", i), err.(request.ErrInvalidParams)) - } - } - } - if s.IntegerParameterRanges != nil { - for i, v := range s.IntegerParameterRanges { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "IntegerParameterRanges", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCategoricalParameterRanges sets the CategoricalParameterRanges field's value. -func (s *ParameterRanges) SetCategoricalParameterRanges(v []*CategoricalParameterRange) *ParameterRanges { - s.CategoricalParameterRanges = v - return s -} - -// SetContinuousParameterRanges sets the ContinuousParameterRanges field's value. -func (s *ParameterRanges) SetContinuousParameterRanges(v []*ContinuousParameterRange) *ParameterRanges { - s.ContinuousParameterRanges = v - return s -} - -// SetIntegerParameterRanges sets the IntegerParameterRanges field's value. -func (s *ParameterRanges) SetIntegerParameterRanges(v []*IntegerParameterRange) *ParameterRanges { - s.IntegerParameterRanges = v - return s -} - -// A previously completed or stopped hyperparameter tuning job to be used as -// a starting point for a new hyperparameter tuning job. -type ParentHyperParameterTuningJob struct { - _ struct{} `type:"structure"` - - // The name of the hyperparameter tuning job to be used as a starting point - // for a new hyperparameter tuning job. - HyperParameterTuningJobName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ParentHyperParameterTuningJob) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParentHyperParameterTuningJob) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ParentHyperParameterTuningJob) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ParentHyperParameterTuningJob"} - if s.HyperParameterTuningJobName != nil && len(*s.HyperParameterTuningJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HyperParameterTuningJobName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHyperParameterTuningJobName sets the HyperParameterTuningJobName field's value. -func (s *ParentHyperParameterTuningJob) SetHyperParameterTuningJobName(v string) *ParentHyperParameterTuningJob { - s.HyperParameterTuningJobName = &v - return s -} - -// Identifies a model that you want to host and the resources to deploy for -// hosting it. If you are deploying multiple models, tell Amazon SageMaker how -// to distribute traffic among the models by specifying variant weights. -type ProductionVariant struct { - _ struct{} `type:"structure"` - - // The size of the Elastic Inference (EI) instance to use for the production - // variant. EI instances provide on-demand GPU computing for inference. For - // more information, see Using Elastic Inference in Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/ei.html). - // For more information, see Using Elastic Inference in Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/ei.html). - AcceleratorType *string `type:"string" enum:"ProductionVariantAcceleratorType"` - - // Number of instances to launch initially. - // - // InitialInstanceCount is a required field - InitialInstanceCount *int64 `min:"1" type:"integer" required:"true"` - - // Determines initial traffic distribution among all of the models that you - // specify in the endpoint configuration. The traffic to a production variant - // is determined by the ratio of the VariantWeight to the sum of all VariantWeight - // values across all ProductionVariants. If unspecified, it defaults to 1.0. - InitialVariantWeight *float64 `type:"float"` - - // The ML compute instance type. - // - // InstanceType is a required field - InstanceType *string `type:"string" required:"true" enum:"ProductionVariantInstanceType"` - - // The name of the model that you want to host. This is the name that you specified - // when creating the model. - // - // ModelName is a required field - ModelName *string `type:"string" required:"true"` - - // The name of the production variant. - // - // VariantName is a required field - VariantName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ProductionVariant) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProductionVariant) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProductionVariant) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProductionVariant"} - if s.InitialInstanceCount == nil { - invalidParams.Add(request.NewErrParamRequired("InitialInstanceCount")) - } - if s.InitialInstanceCount != nil && *s.InitialInstanceCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("InitialInstanceCount", 1)) - } - if s.InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceType")) - } - if s.ModelName == nil { - invalidParams.Add(request.NewErrParamRequired("ModelName")) - } - if s.VariantName == nil { - invalidParams.Add(request.NewErrParamRequired("VariantName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceleratorType sets the AcceleratorType field's value. -func (s *ProductionVariant) SetAcceleratorType(v string) *ProductionVariant { - s.AcceleratorType = &v - return s -} - -// SetInitialInstanceCount sets the InitialInstanceCount field's value. -func (s *ProductionVariant) SetInitialInstanceCount(v int64) *ProductionVariant { - s.InitialInstanceCount = &v - return s -} - -// SetInitialVariantWeight sets the InitialVariantWeight field's value. -func (s *ProductionVariant) SetInitialVariantWeight(v float64) *ProductionVariant { - s.InitialVariantWeight = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ProductionVariant) SetInstanceType(v string) *ProductionVariant { - s.InstanceType = &v - return s -} - -// SetModelName sets the ModelName field's value. -func (s *ProductionVariant) SetModelName(v string) *ProductionVariant { - s.ModelName = &v - return s -} - -// SetVariantName sets the VariantName field's value. -func (s *ProductionVariant) SetVariantName(v string) *ProductionVariant { - s.VariantName = &v - return s -} - -// Describes weight and capacities for a production variant associated with -// an endpoint. If you sent a request to the UpdateEndpointWeightsAndCapacities -// API and the endpoint status is Updating, you get different desired and current -// values. -type ProductionVariantSummary struct { - _ struct{} `type:"structure"` - - // The number of instances associated with the variant. - CurrentInstanceCount *int64 `min:"1" type:"integer"` - - // The weight associated with the variant. - CurrentWeight *float64 `type:"float"` - - // An array of DeployedImage objects that specify the Amazon EC2 Container Registry - // paths of the inference images deployed on instances of this ProductionVariant. - DeployedImages []*DeployedImage `type:"list"` - - // The number of instances requested in the UpdateEndpointWeightsAndCapacities - // request. - DesiredInstanceCount *int64 `min:"1" type:"integer"` - - // The requested weight, as specified in the UpdateEndpointWeightsAndCapacities - // request. - DesiredWeight *float64 `type:"float"` - - // The name of the variant. - // - // VariantName is a required field - VariantName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ProductionVariantSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProductionVariantSummary) GoString() string { - return s.String() -} - -// SetCurrentInstanceCount sets the CurrentInstanceCount field's value. -func (s *ProductionVariantSummary) SetCurrentInstanceCount(v int64) *ProductionVariantSummary { - s.CurrentInstanceCount = &v - return s -} - -// SetCurrentWeight sets the CurrentWeight field's value. -func (s *ProductionVariantSummary) SetCurrentWeight(v float64) *ProductionVariantSummary { - s.CurrentWeight = &v - return s -} - -// SetDeployedImages sets the DeployedImages field's value. -func (s *ProductionVariantSummary) SetDeployedImages(v []*DeployedImage) *ProductionVariantSummary { - s.DeployedImages = v - return s -} - -// SetDesiredInstanceCount sets the DesiredInstanceCount field's value. -func (s *ProductionVariantSummary) SetDesiredInstanceCount(v int64) *ProductionVariantSummary { - s.DesiredInstanceCount = &v - return s -} - -// SetDesiredWeight sets the DesiredWeight field's value. -func (s *ProductionVariantSummary) SetDesiredWeight(v float64) *ProductionVariantSummary { - s.DesiredWeight = &v - return s -} - -// SetVariantName sets the VariantName field's value. -func (s *ProductionVariantSummary) SetVariantName(v string) *ProductionVariantSummary { - s.VariantName = &v - return s -} - -// A type of SuggestionQuery. A suggestion query for retrieving property names -// that match the specified hint. -type PropertyNameQuery struct { - _ struct{} `type:"structure"` - - // Text that is part of a property's name. The property names of hyperparameter, - // metric, and tag key names that begin with the specified text in the PropertyNameHint. - // - // PropertyNameHint is a required field - PropertyNameHint *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PropertyNameQuery) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PropertyNameQuery) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PropertyNameQuery) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PropertyNameQuery"} - if s.PropertyNameHint == nil { - invalidParams.Add(request.NewErrParamRequired("PropertyNameHint")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPropertyNameHint sets the PropertyNameHint field's value. -func (s *PropertyNameQuery) SetPropertyNameHint(v string) *PropertyNameQuery { - s.PropertyNameHint = &v - return s -} - -// A property name returned from a GetSearchSuggestions call that specifies -// a value in the PropertyNameQuery field. -type PropertyNameSuggestion struct { - _ struct{} `type:"structure"` - - // A suggested property name based on what you entered in the search textbox - // in the Amazon SageMaker console. - PropertyName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PropertyNameSuggestion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PropertyNameSuggestion) GoString() string { - return s.String() -} - -// SetPropertyName sets the PropertyName field's value. -func (s *PropertyNameSuggestion) SetPropertyName(v string) *PropertyNameSuggestion { - s.PropertyName = &v - return s -} - -// Defines the amount of money paid to an Amazon Mechanical Turk worker for -// each task performed. -// -// Use one of the following prices for bounding box tasks. Prices are in US -// dollars. -// -// * 0.036 -// -// * 0.048 -// -// * 0.060 -// -// * 0.072 -// -// * 0.120 -// -// * 0.240 -// -// * 0.360 -// -// * 0.480 -// -// * 0.600 -// -// * 0.720 -// -// * 0.840 -// -// * 0.960 -// -// * 1.080 -// -// * 1.200 -// -// Use one of the following prices for image classification, text classification, -// and custom tasks. Prices are in US dollars. -// -// * 0.012 -// -// * 0.024 -// -// * 0.036 -// -// * 0.048 -// -// * 0.060 -// -// * 0.072 -// -// * 0.120 -// -// * 0.240 -// -// * 0.360 -// -// * 0.480 -// -// * 0.600 -// -// * 0.720 -// -// * 0.840 -// -// * 0.960 -// -// * 1.080 -// -// * 1.200 -// -// Use one of the following prices for semantic segmentation tasks. Prices are -// in US dollars. -// -// * 0.840 -// -// * 0.960 -// -// * 1.080 -// -// * 1.200 -type PublicWorkforceTaskPrice struct { - _ struct{} `type:"structure"` - - // Defines the amount of money paid to a worker in United States dollars. - AmountInUsd *USD `type:"structure"` -} - -// String returns the string representation -func (s PublicWorkforceTaskPrice) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublicWorkforceTaskPrice) GoString() string { - return s.String() -} - -// SetAmountInUsd sets the AmountInUsd field's value. -func (s *PublicWorkforceTaskPrice) SetAmountInUsd(v *USD) *PublicWorkforceTaskPrice { - s.AmountInUsd = v - return s -} - -type RenderUiTemplateInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that has access to the S3 objects that are - // used by the template. - // - // RoleArn is a required field - RoleArn *string `min:"20" type:"string" required:"true"` - - // A RenderableTask object containing a representative task to render. - // - // Task is a required field - Task *RenderableTask `type:"structure" required:"true"` - - // A Template object containing the worker UI template to render. - // - // UiTemplate is a required field - UiTemplate *UiTemplate `type:"structure" required:"true"` -} - -// String returns the string representation -func (s RenderUiTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RenderUiTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RenderUiTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RenderUiTemplateInput"} - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.Task == nil { - invalidParams.Add(request.NewErrParamRequired("Task")) - } - if s.UiTemplate == nil { - invalidParams.Add(request.NewErrParamRequired("UiTemplate")) - } - if s.Task != nil { - if err := s.Task.Validate(); err != nil { - invalidParams.AddNested("Task", err.(request.ErrInvalidParams)) - } - } - if s.UiTemplate != nil { - if err := s.UiTemplate.Validate(); err != nil { - invalidParams.AddNested("UiTemplate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleArn sets the RoleArn field's value. -func (s *RenderUiTemplateInput) SetRoleArn(v string) *RenderUiTemplateInput { - s.RoleArn = &v - return s -} - -// SetTask sets the Task field's value. -func (s *RenderUiTemplateInput) SetTask(v *RenderableTask) *RenderUiTemplateInput { - s.Task = v - return s -} - -// SetUiTemplate sets the UiTemplate field's value. -func (s *RenderUiTemplateInput) SetUiTemplate(v *UiTemplate) *RenderUiTemplateInput { - s.UiTemplate = v - return s -} - -type RenderUiTemplateOutput struct { - _ struct{} `type:"structure"` - - // A list of one or more RenderingError objects if any were encountered while - // rendering the template. If there were no errors, the list is empty. - // - // Errors is a required field - Errors []*RenderingError `type:"list" required:"true"` - - // A Liquid template that renders the HTML for the worker UI. - // - // RenderedContent is a required field - RenderedContent *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RenderUiTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RenderUiTemplateOutput) GoString() string { - return s.String() -} - -// SetErrors sets the Errors field's value. -func (s *RenderUiTemplateOutput) SetErrors(v []*RenderingError) *RenderUiTemplateOutput { - s.Errors = v - return s -} - -// SetRenderedContent sets the RenderedContent field's value. -func (s *RenderUiTemplateOutput) SetRenderedContent(v string) *RenderUiTemplateOutput { - s.RenderedContent = &v - return s -} - -// Contains input values for a task. -type RenderableTask struct { - _ struct{} `type:"structure"` - - // A JSON object that contains values for the variables defined in the template. - // It is made available to the template under the substitution variable task.input. - // For example, if you define a variable task.input.text in your template, you - // can supply the variable in the JSON object as "text": "sample text". - // - // Input is a required field - Input *string `min:"2" type:"string" required:"true"` -} - -// String returns the string representation -func (s RenderableTask) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RenderableTask) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RenderableTask) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RenderableTask"} - if s.Input == nil { - invalidParams.Add(request.NewErrParamRequired("Input")) - } - if s.Input != nil && len(*s.Input) < 2 { - invalidParams.Add(request.NewErrParamMinLen("Input", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInput sets the Input field's value. -func (s *RenderableTask) SetInput(v string) *RenderableTask { - s.Input = &v - return s -} - -// A description of an error that occurred while rendering the template. -type RenderingError struct { - _ struct{} `type:"structure"` - - // A unique identifier for a specific class of errors. - // - // Code is a required field - Code *string `type:"string" required:"true"` - - // A human-readable message describing the error. - // - // Message is a required field - Message *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RenderingError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RenderingError) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *RenderingError) SetCode(v string) *RenderingError { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *RenderingError) SetMessage(v string) *RenderingError { - s.Message = &v - return s -} - -// Describes the resources, including ML compute instances and ML storage volumes, -// to use for model training. -type ResourceConfig struct { - _ struct{} `type:"structure"` - - // The number of ML compute instances to use. For distributed training, provide - // a value greater than 1. - // - // InstanceCount is a required field - InstanceCount *int64 `min:"1" type:"integer" required:"true"` - - // The ML compute instance type. - // - // InstanceType is a required field - InstanceType *string `type:"string" required:"true" enum:"TrainingInstanceType"` - - // The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to - // encrypt data on the storage volume attached to the ML compute instance(s) - // that run the training job. The VolumeKmsKeyId can be any of the following - // formats: - // - // * // KMS Key ID - // - // "1234abcd-12ab-34cd-56ef-1234567890ab" - // - // * // Amazon Resource Name (ARN) of a KMS Key - // - // "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" - VolumeKmsKeyId *string `type:"string"` - - // The size of the ML storage volume that you want to provision. - // - // ML storage volumes store model artifacts and incremental states. Training - // algorithms might also use the ML storage volume for scratch space. If you - // want to store the training data in the ML storage volume, choose File as - // the TrainingInputMode in the algorithm specification. - // - // You must specify sufficient ML storage for your scenario. - // - // Amazon SageMaker supports only the General Purpose SSD (gp2) ML storage volume - // type. - // - // VolumeSizeInGB is a required field - VolumeSizeInGB *int64 `min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s ResourceConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceConfig"} - if s.InstanceCount == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceCount")) - } - if s.InstanceCount != nil && *s.InstanceCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("InstanceCount", 1)) - } - if s.InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceType")) - } - if s.VolumeSizeInGB == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeSizeInGB")) - } - if s.VolumeSizeInGB != nil && *s.VolumeSizeInGB < 1 { - invalidParams.Add(request.NewErrParamMinValue("VolumeSizeInGB", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *ResourceConfig) SetInstanceCount(v int64) *ResourceConfig { - s.InstanceCount = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ResourceConfig) SetInstanceType(v string) *ResourceConfig { - s.InstanceType = &v - return s -} - -// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. -func (s *ResourceConfig) SetVolumeKmsKeyId(v string) *ResourceConfig { - s.VolumeKmsKeyId = &v - return s -} - -// SetVolumeSizeInGB sets the VolumeSizeInGB field's value. -func (s *ResourceConfig) SetVolumeSizeInGB(v int64) *ResourceConfig { - s.VolumeSizeInGB = &v - return s -} - -// Specifies the maximum number of training jobs and parallel training jobs -// that a hyperparameter tuning job can launch. -type ResourceLimits struct { - _ struct{} `type:"structure"` - - // The maximum number of training jobs that a hyperparameter tuning job can - // launch. - // - // MaxNumberOfTrainingJobs is a required field - MaxNumberOfTrainingJobs *int64 `min:"1" type:"integer" required:"true"` - - // The maximum number of concurrent training jobs that a hyperparameter tuning - // job can launch. - // - // MaxParallelTrainingJobs is a required field - MaxParallelTrainingJobs *int64 `min:"1" type:"integer" required:"true"` -} - -// String returns the string representation -func (s ResourceLimits) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceLimits) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceLimits) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceLimits"} - if s.MaxNumberOfTrainingJobs == nil { - invalidParams.Add(request.NewErrParamRequired("MaxNumberOfTrainingJobs")) - } - if s.MaxNumberOfTrainingJobs != nil && *s.MaxNumberOfTrainingJobs < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxNumberOfTrainingJobs", 1)) - } - if s.MaxParallelTrainingJobs == nil { - invalidParams.Add(request.NewErrParamRequired("MaxParallelTrainingJobs")) - } - if s.MaxParallelTrainingJobs != nil && *s.MaxParallelTrainingJobs < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxParallelTrainingJobs", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxNumberOfTrainingJobs sets the MaxNumberOfTrainingJobs field's value. -func (s *ResourceLimits) SetMaxNumberOfTrainingJobs(v int64) *ResourceLimits { - s.MaxNumberOfTrainingJobs = &v - return s -} - -// SetMaxParallelTrainingJobs sets the MaxParallelTrainingJobs field's value. -func (s *ResourceLimits) SetMaxParallelTrainingJobs(v int64) *ResourceLimits { - s.MaxParallelTrainingJobs = &v - return s -} - -// Describes the S3 data source. -type S3DataSource struct { - _ struct{} `type:"structure"` - - // A list of one or more attribute names to use that are found in a specified - // augmented manifest file. - AttributeNames []*string `type:"list"` - - // If you want Amazon SageMaker to replicate the entire dataset on each ML compute - // instance that is launched for model training, specify FullyReplicated. - // - // If you want Amazon SageMaker to replicate a subset of data on each ML compute - // instance that is launched for model training, specify ShardedByS3Key. If - // there are n ML compute instances launched for a training job, each instance - // gets approximately 1/n of the number of S3 objects. In this case, model training - // on each machine uses only the subset of training data. - // - // Don't choose more ML compute instances for training than available S3 objects. - // If you do, some nodes won't get any data and you will pay for nodes that - // aren't getting any training data. This applies in both File and Pipe modes. - // Keep this in mind when developing algorithms. - // - // In distributed training, where you use multiple ML compute EC2 instances, - // you might choose ShardedByS3Key. If the algorithm requires copying training - // data to the ML storage volume (when TrainingInputMode is set to File), this - // copies 1/n of the number of objects. - S3DataDistributionType *string `type:"string" enum:"S3DataDistribution"` - - // If you choose S3Prefix, S3Uri identifies a key name prefix. Amazon SageMaker - // uses all objects that match the specified key name prefix for model training. - // - // If you choose ManifestFile, S3Uri identifies an object that is a manifest - // file containing a list of object keys that you want Amazon SageMaker to use - // for model training. - // - // If you choose AugmentedManifestFile, S3Uri identifies an object that is an - // augmented manifest file in JSON lines format. This file contains the data - // you want to use for model training. AugmentedManifestFile can only be used - // if the Channel's input mode is Pipe. - // - // S3DataType is a required field - S3DataType *string `type:"string" required:"true" enum:"S3DataType"` - - // Depending on the value specified for the S3DataType, identifies either a - // key name prefix or a manifest. For example: - // - // * A key name prefix might look like this: s3://bucketname/exampleprefix. - // - // - // * A manifest might look like this: s3://bucketname/example.manifest - // - // The manifest is an S3 object which is a JSON file with the following format: - // - // - // [ - // - // {"prefix": "s3://customer_bucket/some/prefix/"}, - // - // "relative/path/to/custdata-1", - // - // "relative/path/custdata-2", - // - // ... - // - // ] - // - // The preceding JSON matches the following s3Uris: - // - // s3://customer_bucket/some/prefix/relative/path/to/custdata-1 - // - // s3://customer_bucket/some/prefix/relative/path/custdata-2 - // - // ... - // - // The complete set of s3uris in this manifest is the input data for the channel - // for this datasource. The object that each s3uris points to must be readable - // by the IAM role that Amazon SageMaker uses to perform tasks on your behalf. - // - // S3Uri is a required field - S3Uri *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s S3DataSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3DataSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3DataSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3DataSource"} - if s.S3DataType == nil { - invalidParams.Add(request.NewErrParamRequired("S3DataType")) - } - if s.S3Uri == nil { - invalidParams.Add(request.NewErrParamRequired("S3Uri")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeNames sets the AttributeNames field's value. -func (s *S3DataSource) SetAttributeNames(v []*string) *S3DataSource { - s.AttributeNames = v - return s -} - -// SetS3DataDistributionType sets the S3DataDistributionType field's value. -func (s *S3DataSource) SetS3DataDistributionType(v string) *S3DataSource { - s.S3DataDistributionType = &v - return s -} - -// SetS3DataType sets the S3DataType field's value. -func (s *S3DataSource) SetS3DataType(v string) *S3DataSource { - s.S3DataType = &v - return s -} - -// SetS3Uri sets the S3Uri field's value. -func (s *S3DataSource) SetS3Uri(v string) *S3DataSource { - s.S3Uri = &v - return s -} - -// A multi-expression that searches for the specified resource or resources -// in a search. All resource objects that satisfy the expression's condition -// are included in the search results. You must specify at least one subexpression, -// filter, or nested filter. A SearchExpression can contain up to twenty elements. -// -// A SearchExpression contains the following components: -// -// * A list of Filter objects. Each filter defines a simple Boolean expression -// comprised of a resource property name, Boolean operator, and value. -// -// * A list of NestedFilter objects. Each nested filter defines a list of -// Boolean expressions using a list of resource properties. A nested filter -// is satisfied if a single object in the list satisfies all Boolean expressions. -// -// * A list of SearchExpression objects. A search expression object can be -// nested in a list of search expression objects. -// -// * A Boolean operator: And or Or. -type SearchExpression struct { - _ struct{} `type:"structure"` - - // A list of filter objects. - Filters []*Filter `min:"1" type:"list"` - - // A list of nested filter objects. - NestedFilters []*NestedFilters `min:"1" type:"list"` - - // A Boolean operator used to evaluate the search expression. If you want every - // conditional statement in all lists to be satisfied for the entire search - // expression to be true, specify And. If only a single conditional statement - // needs to be true for the entire search expression to be true, specify Or. - // The default value is And. - Operator *string `type:"string" enum:"BooleanOperator"` - - // A list of search expression objects. - SubExpressions []*SearchExpression `min:"1" type:"list"` -} - -// String returns the string representation -func (s SearchExpression) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchExpression) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SearchExpression) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SearchExpression"} - if s.Filters != nil && len(s.Filters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) - } - if s.NestedFilters != nil && len(s.NestedFilters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NestedFilters", 1)) - } - if s.SubExpressions != nil && len(s.SubExpressions) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SubExpressions", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - if s.NestedFilters != nil { - for i, v := range s.NestedFilters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NestedFilters", i), err.(request.ErrInvalidParams)) - } - } - } - if s.SubExpressions != nil { - for i, v := range s.SubExpressions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SubExpressions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *SearchExpression) SetFilters(v []*Filter) *SearchExpression { - s.Filters = v - return s -} - -// SetNestedFilters sets the NestedFilters field's value. -func (s *SearchExpression) SetNestedFilters(v []*NestedFilters) *SearchExpression { - s.NestedFilters = v - return s -} - -// SetOperator sets the Operator field's value. -func (s *SearchExpression) SetOperator(v string) *SearchExpression { - s.Operator = &v - return s -} - -// SetSubExpressions sets the SubExpressions field's value. -func (s *SearchExpression) SetSubExpressions(v []*SearchExpression) *SearchExpression { - s.SubExpressions = v - return s -} - -type SearchInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to return in a SearchResponse. - MaxResults *int64 `min:"1" type:"integer"` - - // If more than MaxResults resource objects match the specified SearchExpression, - // the SearchResponse includes a NextToken. The NextToken can be passed to the - // next SearchRequest to continue retrieving results for the specified SearchExpression - // and Sort parameters. - NextToken *string `type:"string"` - - // The name of the Amazon SageMaker resource to search for. Currently, the only - // valid Resource value is TrainingJob. - // - // Resource is a required field - Resource *string `type:"string" required:"true" enum:"ResourceType"` - - // A Boolean conditional statement. Resource objects must satisfy this condition - // to be included in search results. You must provide at least one subexpression, - // filter, or nested filter. The maximum number of recursive SubExpressions, - // NestedFilters, and Filters that can be included in a SearchExpression object - // is 50. - SearchExpression *SearchExpression `type:"structure"` - - // The name of the resource property used to sort the SearchResults. The default - // is LastModifiedTime. - SortBy *string `min:"1" type:"string"` - - // How SearchResults are ordered. Valid values are Ascending or Descending. - // The default is Descending. - SortOrder *string `type:"string" enum:"SearchSortOrder"` -} - -// String returns the string representation -func (s SearchInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SearchInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SearchInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - if s.SortBy != nil && len(*s.SortBy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SortBy", 1)) - } - if s.SearchExpression != nil { - if err := s.SearchExpression.Validate(); err != nil { - invalidParams.AddNested("SearchExpression", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *SearchInput) SetMaxResults(v int64) *SearchInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *SearchInput) SetNextToken(v string) *SearchInput { - s.NextToken = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *SearchInput) SetResource(v string) *SearchInput { - s.Resource = &v - return s -} - -// SetSearchExpression sets the SearchExpression field's value. -func (s *SearchInput) SetSearchExpression(v *SearchExpression) *SearchInput { - s.SearchExpression = v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *SearchInput) SetSortBy(v string) *SearchInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *SearchInput) SetSortOrder(v string) *SearchInput { - s.SortOrder = &v - return s -} - -type SearchOutput struct { - _ struct{} `type:"structure"` - - // If the result of the previous Search request was truncated, the response - // includes a NextToken. To retrieve the next set of results, use the token - // in the next request. - NextToken *string `type:"string"` - - // A list of SearchResult objects. - Results []*SearchRecord `type:"list"` -} - -// String returns the string representation -func (s SearchOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *SearchOutput) SetNextToken(v string) *SearchOutput { - s.NextToken = &v - return s -} - -// SetResults sets the Results field's value. -func (s *SearchOutput) SetResults(v []*SearchRecord) *SearchOutput { - s.Results = v - return s -} - -// An individual search result record that contains a single resource object. -type SearchRecord struct { - _ struct{} `type:"structure"` - - // A TrainingJob object that is returned as part of a Search request. - TrainingJob *TrainingJob `type:"structure"` -} - -// String returns the string representation -func (s SearchRecord) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchRecord) GoString() string { - return s.String() -} - -// SetTrainingJob sets the TrainingJob field's value. -func (s *SearchRecord) SetTrainingJob(v *TrainingJob) *SearchRecord { - s.TrainingJob = v - return s -} - -// An array element of DescribeTrainingJobResponse$SecondaryStatusTransitions. -// It provides additional details about a status that the training job has transitioned -// through. A training job can be in one of several states, for example, starting, -// downloading, training, or uploading. Within each state, there are a number -// of intermediate states. For example, within the starting state, Amazon SageMaker -// could be starting the training job or launching the ML instances. These transitional -// states are referred to as the job's secondary status. -type SecondaryStatusTransition struct { - _ struct{} `type:"structure"` - - // A timestamp that shows when the training job transitioned out of this secondary - // status state into another secondary status state or when the training job - // has ended. - EndTime *time.Time `type:"timestamp"` - - // A timestamp that shows when the training job transitioned to the current - // secondary status state. - // - // StartTime is a required field - StartTime *time.Time `type:"timestamp" required:"true"` - - // Contains a secondary status information from a training job. - // - // Status might be one of the following secondary statuses: - // - // InProgressStarting - Starting the training job. - // - // Downloading - An optional stage for algorithms that support File training - // input mode. It indicates that data is being downloaded to the ML storage - // volumes. - // - // Training - Training is in progress. - // - // Uploading - Training is complete and the model artifacts are being uploaded - // to the S3 location. - // - // CompletedCompleted - The training job has completed. - // - // FailedFailed - The training job has failed. The reason for the failure is - // returned in the FailureReason field of DescribeTrainingJobResponse. - // - // StoppedMaxRuntimeExceeded - The job stopped because it exceeded the maximum - // allowed runtime. - // - // Stopped - The training job has stopped. - // - // StoppingStopping - Stopping the training job. - // - // We no longer support the following secondary statuses: - // - // * LaunchingMLInstances - // - // * PreparingTrainingStack - // - // * DownloadingTrainingImage - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"SecondaryStatus"` - - // A detailed description of the progress within a secondary status. - // - // Amazon SageMaker provides secondary statuses and status messages that apply - // to each of them: - // - // StartingStarting the training job. - // - // Launching requested ML instances. - // - // Insufficient capacity error from EC2 while launching instances, retrying! - // - // Launched instance was unhealthy, replacing it! - // - // Preparing the instances for training. - // - // TrainingDownloading the training image. - // - // Training image download completed. Training in progress. - // - // Status messages are subject to change. Therefore, we recommend not including - // them in code that programmatically initiates actions. For examples, don't - // use status messages in if statements. - // - // To have an overview of your training job's progress, view TrainingJobStatus - // and SecondaryStatus in DescribeTrainingJobResponse, and StatusMessage together. - // For example, at the start of a training job, you might see the following: - // - // * TrainingJobStatus - InProgress - // - // * SecondaryStatus - Training - // - // * StatusMessage - Downloading the training image - StatusMessage *string `type:"string"` -} - -// String returns the string representation -func (s SecondaryStatusTransition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecondaryStatusTransition) GoString() string { - return s.String() -} - -// SetEndTime sets the EndTime field's value. -func (s *SecondaryStatusTransition) SetEndTime(v time.Time) *SecondaryStatusTransition { - s.EndTime = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *SecondaryStatusTransition) SetStartTime(v time.Time) *SecondaryStatusTransition { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SecondaryStatusTransition) SetStatus(v string) *SecondaryStatusTransition { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *SecondaryStatusTransition) SetStatusMessage(v string) *SecondaryStatusTransition { - s.StatusMessage = &v - return s -} - -// A configuration for a shuffle option for input data in a channel. If you -// use S3Prefix for S3DataType, the results of the S3 key prefix matches are -// shuffled. If you use ManifestFile, the order of the S3 object references -// in the ManifestFile is shuffled. If you use AugmentedManifestFile, the order -// of the JSON lines in the AugmentedManifestFile is shuffled. The shuffling -// order is determined using the Seed value. -// -// For Pipe input mode, shuffling is done at the start of every epoch. With -// large datasets, this ensures that the order of the training data is different -// for each epoch, and it helps reduce bias and possible overfitting. In a multi-node -// training job when ShuffleConfig is combined with S3DataDistributionType of -// ShardedByS3Key, the data is shuffled across nodes so that the content sent -// to a particular node on the first epoch might be sent to a different node -// on the second epoch. -type ShuffleConfig struct { - _ struct{} `type:"structure"` - - // Determines the shuffling order in ShuffleConfig value. - // - // Seed is a required field - Seed *int64 `type:"long" required:"true"` -} - -// String returns the string representation -func (s ShuffleConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ShuffleConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ShuffleConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ShuffleConfig"} - if s.Seed == nil { - invalidParams.Add(request.NewErrParamRequired("Seed")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSeed sets the Seed field's value. -func (s *ShuffleConfig) SetSeed(v int64) *ShuffleConfig { - s.Seed = &v - return s -} - -// Specifies an algorithm that was used to create the model package. The algorithm -// must be either an algorithm resource in your Amazon SageMaker account or -// an algorithm in AWS Marketplace that you are subscribed to. -type SourceAlgorithm struct { - _ struct{} `type:"structure"` - - // The name of an algorithm that was used to create the model package. The algorithm - // must be either an algorithm resource in your Amazon SageMaker account or - // an algorithm in AWS Marketplace that you are subscribed to. - // - // AlgorithmName is a required field - AlgorithmName *string `min:"1" type:"string" required:"true"` - - // The Amazon S3 path where the model artifacts, which result from model training, - // are stored. This path must point to a single gzip compressed tar archive - // (.tar.gz suffix). - ModelDataUrl *string `type:"string"` -} - -// String returns the string representation -func (s SourceAlgorithm) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SourceAlgorithm) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SourceAlgorithm) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SourceAlgorithm"} - if s.AlgorithmName == nil { - invalidParams.Add(request.NewErrParamRequired("AlgorithmName")) - } - if s.AlgorithmName != nil && len(*s.AlgorithmName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AlgorithmName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlgorithmName sets the AlgorithmName field's value. -func (s *SourceAlgorithm) SetAlgorithmName(v string) *SourceAlgorithm { - s.AlgorithmName = &v - return s -} - -// SetModelDataUrl sets the ModelDataUrl field's value. -func (s *SourceAlgorithm) SetModelDataUrl(v string) *SourceAlgorithm { - s.ModelDataUrl = &v - return s -} - -// A list of algorithms that were used to create a model package. -type SourceAlgorithmSpecification struct { - _ struct{} `type:"structure"` - - // A list of the algorithms that were used to create a model package. - // - // SourceAlgorithms is a required field - SourceAlgorithms []*SourceAlgorithm `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s SourceAlgorithmSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SourceAlgorithmSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SourceAlgorithmSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SourceAlgorithmSpecification"} - if s.SourceAlgorithms == nil { - invalidParams.Add(request.NewErrParamRequired("SourceAlgorithms")) - } - if s.SourceAlgorithms != nil && len(s.SourceAlgorithms) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceAlgorithms", 1)) - } - if s.SourceAlgorithms != nil { - for i, v := range s.SourceAlgorithms { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SourceAlgorithms", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceAlgorithms sets the SourceAlgorithms field's value. -func (s *SourceAlgorithmSpecification) SetSourceAlgorithms(v []*SourceAlgorithm) *SourceAlgorithmSpecification { - s.SourceAlgorithms = v - return s -} - -type StartNotebookInstanceInput struct { - _ struct{} `type:"structure"` - - // The name of the notebook instance to start. - // - // NotebookInstanceName is a required field - NotebookInstanceName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StartNotebookInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartNotebookInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartNotebookInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartNotebookInstanceInput"} - if s.NotebookInstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("NotebookInstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNotebookInstanceName sets the NotebookInstanceName field's value. -func (s *StartNotebookInstanceInput) SetNotebookInstanceName(v string) *StartNotebookInstanceInput { - s.NotebookInstanceName = &v - return s -} - -type StartNotebookInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StartNotebookInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartNotebookInstanceOutput) GoString() string { - return s.String() -} - -type StopCompilationJobInput struct { - _ struct{} `type:"structure"` - - // The name of the model compilation job to stop. - // - // CompilationJobName is a required field - CompilationJobName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopCompilationJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopCompilationJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopCompilationJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopCompilationJobInput"} - if s.CompilationJobName == nil { - invalidParams.Add(request.NewErrParamRequired("CompilationJobName")) - } - if s.CompilationJobName != nil && len(*s.CompilationJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CompilationJobName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCompilationJobName sets the CompilationJobName field's value. -func (s *StopCompilationJobInput) SetCompilationJobName(v string) *StopCompilationJobInput { - s.CompilationJobName = &v - return s -} - -type StopCompilationJobOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopCompilationJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopCompilationJobOutput) GoString() string { - return s.String() -} - -type StopHyperParameterTuningJobInput struct { - _ struct{} `type:"structure"` - - // The name of the tuning job to stop. - // - // HyperParameterTuningJobName is a required field - HyperParameterTuningJobName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopHyperParameterTuningJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopHyperParameterTuningJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopHyperParameterTuningJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopHyperParameterTuningJobInput"} - if s.HyperParameterTuningJobName == nil { - invalidParams.Add(request.NewErrParamRequired("HyperParameterTuningJobName")) - } - if s.HyperParameterTuningJobName != nil && len(*s.HyperParameterTuningJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HyperParameterTuningJobName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHyperParameterTuningJobName sets the HyperParameterTuningJobName field's value. -func (s *StopHyperParameterTuningJobInput) SetHyperParameterTuningJobName(v string) *StopHyperParameterTuningJobInput { - s.HyperParameterTuningJobName = &v - return s -} - -type StopHyperParameterTuningJobOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopHyperParameterTuningJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopHyperParameterTuningJobOutput) GoString() string { - return s.String() -} - -type StopLabelingJobInput struct { - _ struct{} `type:"structure"` - - // The name of the labeling job to stop. - // - // LabelingJobName is a required field - LabelingJobName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopLabelingJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopLabelingJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopLabelingJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopLabelingJobInput"} - if s.LabelingJobName == nil { - invalidParams.Add(request.NewErrParamRequired("LabelingJobName")) - } - if s.LabelingJobName != nil && len(*s.LabelingJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LabelingJobName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLabelingJobName sets the LabelingJobName field's value. -func (s *StopLabelingJobInput) SetLabelingJobName(v string) *StopLabelingJobInput { - s.LabelingJobName = &v - return s -} - -type StopLabelingJobOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopLabelingJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopLabelingJobOutput) GoString() string { - return s.String() -} - -type StopNotebookInstanceInput struct { - _ struct{} `type:"structure"` - - // The name of the notebook instance to terminate. - // - // NotebookInstanceName is a required field - NotebookInstanceName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StopNotebookInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopNotebookInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopNotebookInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopNotebookInstanceInput"} - if s.NotebookInstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("NotebookInstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNotebookInstanceName sets the NotebookInstanceName field's value. -func (s *StopNotebookInstanceInput) SetNotebookInstanceName(v string) *StopNotebookInstanceInput { - s.NotebookInstanceName = &v - return s -} - -type StopNotebookInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopNotebookInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopNotebookInstanceOutput) GoString() string { - return s.String() -} - -type StopTrainingJobInput struct { - _ struct{} `type:"structure"` - - // The name of the training job to stop. - // - // TrainingJobName is a required field - TrainingJobName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopTrainingJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopTrainingJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopTrainingJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopTrainingJobInput"} - if s.TrainingJobName == nil { - invalidParams.Add(request.NewErrParamRequired("TrainingJobName")) - } - if s.TrainingJobName != nil && len(*s.TrainingJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TrainingJobName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTrainingJobName sets the TrainingJobName field's value. -func (s *StopTrainingJobInput) SetTrainingJobName(v string) *StopTrainingJobInput { - s.TrainingJobName = &v - return s -} - -type StopTrainingJobOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopTrainingJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopTrainingJobOutput) GoString() string { - return s.String() -} - -type StopTransformJobInput struct { - _ struct{} `type:"structure"` - - // The name of the transform job to stop. - // - // TransformJobName is a required field - TransformJobName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopTransformJobInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopTransformJobInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopTransformJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopTransformJobInput"} - if s.TransformJobName == nil { - invalidParams.Add(request.NewErrParamRequired("TransformJobName")) - } - if s.TransformJobName != nil && len(*s.TransformJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TransformJobName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTransformJobName sets the TransformJobName field's value. -func (s *StopTransformJobInput) SetTransformJobName(v string) *StopTransformJobInput { - s.TransformJobName = &v - return s -} - -type StopTransformJobOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopTransformJobOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopTransformJobOutput) GoString() string { - return s.String() -} - -// Specifies how long model training can run. When model training reaches the -// limit, Amazon SageMaker ends the training job. Use this API to cap model -// training cost. -// -// To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal, which -// delays job termination for120 seconds. Algorithms might use this 120-second -// window to save the model artifacts, so the results of training is not lost. -// -// Training algorithms provided by Amazon SageMaker automatically saves the -// intermediate results of a model training job (it is best effort case, as -// model might not be ready to save as some stages, for example training just -// started). This intermediate data is a valid model artifact. You can use it -// to create a model (CreateModel). -type StoppingCondition struct { - _ struct{} `type:"structure"` - - // The maximum length of time, in seconds, that the training job can run. If - // model training does not complete during this time, Amazon SageMaker ends - // the job. If value is not specified, default value is 1 day. Maximum value - // is 28 days. - MaxRuntimeInSeconds *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s StoppingCondition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StoppingCondition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StoppingCondition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StoppingCondition"} - if s.MaxRuntimeInSeconds != nil && *s.MaxRuntimeInSeconds < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxRuntimeInSeconds", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxRuntimeInSeconds sets the MaxRuntimeInSeconds field's value. -func (s *StoppingCondition) SetMaxRuntimeInSeconds(v int64) *StoppingCondition { - s.MaxRuntimeInSeconds = &v - return s -} - -// Describes a work team of a vendor that does the a labelling job. -type SubscribedWorkteam struct { - _ struct{} `type:"structure"` - - ListingId *string `type:"string"` - - // The description of the vendor from the Amazon Marketplace. - MarketplaceDescription *string `min:"1" type:"string"` - - // The title of the service provided by the vendor in the Amazon Marketplace. - MarketplaceTitle *string `min:"1" type:"string"` - - // The name of the vendor in the Amazon Marketplace. - SellerName *string `type:"string"` - - // The Amazon Resource Name (ARN) of the vendor that you have subscribed. - // - // WorkteamArn is a required field - WorkteamArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SubscribedWorkteam) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubscribedWorkteam) GoString() string { - return s.String() -} - -// SetListingId sets the ListingId field's value. -func (s *SubscribedWorkteam) SetListingId(v string) *SubscribedWorkteam { - s.ListingId = &v - return s -} - -// SetMarketplaceDescription sets the MarketplaceDescription field's value. -func (s *SubscribedWorkteam) SetMarketplaceDescription(v string) *SubscribedWorkteam { - s.MarketplaceDescription = &v - return s -} - -// SetMarketplaceTitle sets the MarketplaceTitle field's value. -func (s *SubscribedWorkteam) SetMarketplaceTitle(v string) *SubscribedWorkteam { - s.MarketplaceTitle = &v - return s -} - -// SetSellerName sets the SellerName field's value. -func (s *SubscribedWorkteam) SetSellerName(v string) *SubscribedWorkteam { - s.SellerName = &v - return s -} - -// SetWorkteamArn sets the WorkteamArn field's value. -func (s *SubscribedWorkteam) SetWorkteamArn(v string) *SubscribedWorkteam { - s.WorkteamArn = &v - return s -} - -// Limits the property names that are included in the response. -type SuggestionQuery struct { - _ struct{} `type:"structure"` - - // A type of SuggestionQuery. Defines a property name hint. Only property names - // that match the specified hint are included in the response. - PropertyNameQuery *PropertyNameQuery `type:"structure"` -} - -// String returns the string representation -func (s SuggestionQuery) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SuggestionQuery) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SuggestionQuery) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SuggestionQuery"} - if s.PropertyNameQuery != nil { - if err := s.PropertyNameQuery.Validate(); err != nil { - invalidParams.AddNested("PropertyNameQuery", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPropertyNameQuery sets the PropertyNameQuery field's value. -func (s *SuggestionQuery) SetPropertyNameQuery(v *PropertyNameQuery) *SuggestionQuery { - s.PropertyNameQuery = v - return s -} - -// Describes a tag. -type Tag struct { - _ struct{} `type:"structure"` - - // The tag key. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The tag value. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Contains information about a training job. -type TrainingJob struct { - _ struct{} `type:"structure"` - - // Information about the algorithm used for training, and algorithm metadata. - AlgorithmSpecification *AlgorithmSpecification `type:"structure"` - - // A timestamp that indicates when the training job was created. - CreationTime *time.Time `type:"timestamp"` - - // If the TrainingJob was created with network isolation, the value is set to - // true. If network isolation is enabled, nodes can't communicate beyond the - // VPC they run in. - EnableNetworkIsolation *bool `type:"boolean"` - - // If the training job failed, the reason it failed. - FailureReason *string `type:"string"` - - // A list of final metric values that are set when the training job completes. - // Used only if the training job was configured to use metrics. - FinalMetricDataList []*MetricData `type:"list"` - - // Algorithm-specific parameters. - HyperParameters map[string]*string `type:"map"` - - // An array of Channel objects that describes each data input channel. - InputDataConfig []*Channel `min:"1" type:"list"` - - // The Amazon Resource Name (ARN) of the labeling job. - LabelingJobArn *string `type:"string"` - - // A timestamp that indicates when the status of the training job was last modified. - LastModifiedTime *time.Time `type:"timestamp"` - - // Information about the Amazon S3 location that is configured for storing model - // artifacts. - ModelArtifacts *ModelArtifacts `type:"structure"` - - // The S3 path where model artifacts that you configured when creating the job - // are stored. Amazon SageMaker creates subfolders for model artifacts. - OutputDataConfig *OutputDataConfig `type:"structure"` - - // Resources, including ML compute instances and ML storage volumes, that are - // configured for model training. - ResourceConfig *ResourceConfig `type:"structure"` - - // The AWS Identity and Access Management (IAM) role configured for the training - // job. - RoleArn *string `min:"20" type:"string"` - - // Provides detailed information about the state of the training job. For detailed - // information about the secondary status of the training job, see StatusMessage - // under SecondaryStatusTransition. - // - // Amazon SageMaker provides primary statuses and secondary statuses that apply - // to each of them: - // - // InProgressStarting - Starting the training job. - // - // Downloading - An optional stage for algorithms that support File training - // input mode. It indicates that data is being downloaded to the ML storage - // volumes. - // - // Training - Training is in progress. - // - // Uploading - Training is complete and the model artifacts are being uploaded - // to the S3 location. - // - // CompletedCompleted - The training job has completed. - // - // FailedFailed - The training job has failed. The reason for the failure is - // returned in the FailureReason field of DescribeTrainingJobResponse. - // - // StoppedMaxRuntimeExceeded - The job stopped because it exceeded the maximum - // allowed runtime. - // - // Stopped - The training job has stopped. - // - // StoppingStopping - Stopping the training job. - // - // Valid values for SecondaryStatus are subject to change. - // - // We no longer support the following secondary statuses: - // - // * LaunchingMLInstances - // - // * PreparingTrainingStack - // - // * DownloadingTrainingImage - SecondaryStatus *string `type:"string" enum:"SecondaryStatus"` - - // A history of all of the secondary statuses that the training job has transitioned - // through. - SecondaryStatusTransitions []*SecondaryStatusTransition `type:"list"` - - // The condition under which to stop the training job. - StoppingCondition *StoppingCondition `type:"structure"` - - // An array of key-value pairs. For more information, see Using Cost Allocation - // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) - // in the AWS Billing and Cost Management User Guide. - Tags []*Tag `type:"list"` - - // Indicates the time when the training job ends on training instances. You - // are billed for the time interval between the value of TrainingStartTime and - // this time. For successful jobs and stopped jobs, this is the time after model - // artifacts are uploaded. For failed jobs, this is the time when Amazon SageMaker - // detects a job failure. - TrainingEndTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the training job. - TrainingJobArn *string `type:"string"` - - // The name of the training job. - TrainingJobName *string `min:"1" type:"string"` - - // The status of the training job. - // - // Training job statuses are: - // - // * InProgress - The training is in progress. - // - // * Completed - The training job has completed. - // - // * Failed - The training job has failed. To see the reason for the failure, - // see the FailureReason field in the response to a DescribeTrainingJobResponse - // call. - // - // * Stopping - The training job is stopping. - // - // * Stopped - The training job has stopped. - // - // For more detailed information, see SecondaryStatus. - TrainingJobStatus *string `type:"string" enum:"TrainingJobStatus"` - - // Indicates the time when the training job starts on training instances. You - // are billed for the time interval between this time and the value of TrainingEndTime. - // The start time in CloudWatch Logs might be later than this time. The difference - // is due to the time it takes to download the training data and to the size - // of the training container. - TrainingStartTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the associated hyperparameter tuning job - // if the training job was launched by a hyperparameter tuning job. - TuningJobArn *string `type:"string"` - - // A VpcConfig object that specifies the VPC that this training job has access - // to. For more information, see Protect Training Jobs by Using an Amazon Virtual - // Private Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html). - VpcConfig *VpcConfig `type:"structure"` -} - -// String returns the string representation -func (s TrainingJob) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TrainingJob) GoString() string { - return s.String() -} - -// SetAlgorithmSpecification sets the AlgorithmSpecification field's value. -func (s *TrainingJob) SetAlgorithmSpecification(v *AlgorithmSpecification) *TrainingJob { - s.AlgorithmSpecification = v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *TrainingJob) SetCreationTime(v time.Time) *TrainingJob { - s.CreationTime = &v - return s -} - -// SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value. -func (s *TrainingJob) SetEnableNetworkIsolation(v bool) *TrainingJob { - s.EnableNetworkIsolation = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *TrainingJob) SetFailureReason(v string) *TrainingJob { - s.FailureReason = &v - return s -} - -// SetFinalMetricDataList sets the FinalMetricDataList field's value. -func (s *TrainingJob) SetFinalMetricDataList(v []*MetricData) *TrainingJob { - s.FinalMetricDataList = v - return s -} - -// SetHyperParameters sets the HyperParameters field's value. -func (s *TrainingJob) SetHyperParameters(v map[string]*string) *TrainingJob { - s.HyperParameters = v - return s -} - -// SetInputDataConfig sets the InputDataConfig field's value. -func (s *TrainingJob) SetInputDataConfig(v []*Channel) *TrainingJob { - s.InputDataConfig = v - return s -} - -// SetLabelingJobArn sets the LabelingJobArn field's value. -func (s *TrainingJob) SetLabelingJobArn(v string) *TrainingJob { - s.LabelingJobArn = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *TrainingJob) SetLastModifiedTime(v time.Time) *TrainingJob { - s.LastModifiedTime = &v - return s -} - -// SetModelArtifacts sets the ModelArtifacts field's value. -func (s *TrainingJob) SetModelArtifacts(v *ModelArtifacts) *TrainingJob { - s.ModelArtifacts = v - return s -} - -// SetOutputDataConfig sets the OutputDataConfig field's value. -func (s *TrainingJob) SetOutputDataConfig(v *OutputDataConfig) *TrainingJob { - s.OutputDataConfig = v - return s -} - -// SetResourceConfig sets the ResourceConfig field's value. -func (s *TrainingJob) SetResourceConfig(v *ResourceConfig) *TrainingJob { - s.ResourceConfig = v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *TrainingJob) SetRoleArn(v string) *TrainingJob { - s.RoleArn = &v - return s -} - -// SetSecondaryStatus sets the SecondaryStatus field's value. -func (s *TrainingJob) SetSecondaryStatus(v string) *TrainingJob { - s.SecondaryStatus = &v - return s -} - -// SetSecondaryStatusTransitions sets the SecondaryStatusTransitions field's value. -func (s *TrainingJob) SetSecondaryStatusTransitions(v []*SecondaryStatusTransition) *TrainingJob { - s.SecondaryStatusTransitions = v - return s -} - -// SetStoppingCondition sets the StoppingCondition field's value. -func (s *TrainingJob) SetStoppingCondition(v *StoppingCondition) *TrainingJob { - s.StoppingCondition = v - return s -} - -// SetTags sets the Tags field's value. -func (s *TrainingJob) SetTags(v []*Tag) *TrainingJob { - s.Tags = v - return s -} - -// SetTrainingEndTime sets the TrainingEndTime field's value. -func (s *TrainingJob) SetTrainingEndTime(v time.Time) *TrainingJob { - s.TrainingEndTime = &v - return s -} - -// SetTrainingJobArn sets the TrainingJobArn field's value. -func (s *TrainingJob) SetTrainingJobArn(v string) *TrainingJob { - s.TrainingJobArn = &v - return s -} - -// SetTrainingJobName sets the TrainingJobName field's value. -func (s *TrainingJob) SetTrainingJobName(v string) *TrainingJob { - s.TrainingJobName = &v - return s -} - -// SetTrainingJobStatus sets the TrainingJobStatus field's value. -func (s *TrainingJob) SetTrainingJobStatus(v string) *TrainingJob { - s.TrainingJobStatus = &v - return s -} - -// SetTrainingStartTime sets the TrainingStartTime field's value. -func (s *TrainingJob) SetTrainingStartTime(v time.Time) *TrainingJob { - s.TrainingStartTime = &v - return s -} - -// SetTuningJobArn sets the TuningJobArn field's value. -func (s *TrainingJob) SetTuningJobArn(v string) *TrainingJob { - s.TuningJobArn = &v - return s -} - -// SetVpcConfig sets the VpcConfig field's value. -func (s *TrainingJob) SetVpcConfig(v *VpcConfig) *TrainingJob { - s.VpcConfig = v - return s -} - -// Defines the input needed to run a training job using the algorithm. -type TrainingJobDefinition struct { - _ struct{} `type:"structure"` - - // The hyperparameters used for the training job. - HyperParameters map[string]*string `type:"map"` - - // An array of Channel objects, each of which specifies an input source. - // - // InputDataConfig is a required field - InputDataConfig []*Channel `min:"1" type:"list" required:"true"` - - // the path to the S3 bucket where you want to store model artifacts. Amazon - // SageMaker creates subfolders for the artifacts. - // - // OutputDataConfig is a required field - OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` - - // The resources, including the ML compute instances and ML storage volumes, - // to use for model training. - // - // ResourceConfig is a required field - ResourceConfig *ResourceConfig `type:"structure" required:"true"` - - // Sets a duration for training. Use this parameter to cap model training costs. - // - // To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal, which - // delays job termination for 120 seconds. Algorithms might use this 120-second - // window to save the model artifacts. - // - // StoppingCondition is a required field - StoppingCondition *StoppingCondition `type:"structure" required:"true"` - - // The input mode used by the algorithm for the training job. For the input - // modes that Amazon SageMaker algorithms support, see Algorithms (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). - // - // If an algorithm supports the File input mode, Amazon SageMaker downloads - // the training data from S3 to the provisioned ML storage Volume, and mounts - // the directory to docker volume for training container. If an algorithm supports - // the Pipe input mode, Amazon SageMaker streams data directly from S3 to the - // container. - // - // TrainingInputMode is a required field - TrainingInputMode *string `type:"string" required:"true" enum:"TrainingInputMode"` -} - -// String returns the string representation -func (s TrainingJobDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TrainingJobDefinition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TrainingJobDefinition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TrainingJobDefinition"} - if s.InputDataConfig == nil { - invalidParams.Add(request.NewErrParamRequired("InputDataConfig")) - } - if s.InputDataConfig != nil && len(s.InputDataConfig) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputDataConfig", 1)) - } - if s.OutputDataConfig == nil { - invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) - } - if s.ResourceConfig == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceConfig")) - } - if s.StoppingCondition == nil { - invalidParams.Add(request.NewErrParamRequired("StoppingCondition")) - } - if s.TrainingInputMode == nil { - invalidParams.Add(request.NewErrParamRequired("TrainingInputMode")) - } - if s.InputDataConfig != nil { - for i, v := range s.InputDataConfig { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputDataConfig", i), err.(request.ErrInvalidParams)) - } - } - } - if s.OutputDataConfig != nil { - if err := s.OutputDataConfig.Validate(); err != nil { - invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) - } - } - if s.ResourceConfig != nil { - if err := s.ResourceConfig.Validate(); err != nil { - invalidParams.AddNested("ResourceConfig", err.(request.ErrInvalidParams)) - } - } - if s.StoppingCondition != nil { - if err := s.StoppingCondition.Validate(); err != nil { - invalidParams.AddNested("StoppingCondition", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHyperParameters sets the HyperParameters field's value. -func (s *TrainingJobDefinition) SetHyperParameters(v map[string]*string) *TrainingJobDefinition { - s.HyperParameters = v - return s -} - -// SetInputDataConfig sets the InputDataConfig field's value. -func (s *TrainingJobDefinition) SetInputDataConfig(v []*Channel) *TrainingJobDefinition { - s.InputDataConfig = v - return s -} - -// SetOutputDataConfig sets the OutputDataConfig field's value. -func (s *TrainingJobDefinition) SetOutputDataConfig(v *OutputDataConfig) *TrainingJobDefinition { - s.OutputDataConfig = v - return s -} - -// SetResourceConfig sets the ResourceConfig field's value. -func (s *TrainingJobDefinition) SetResourceConfig(v *ResourceConfig) *TrainingJobDefinition { - s.ResourceConfig = v - return s -} - -// SetStoppingCondition sets the StoppingCondition field's value. -func (s *TrainingJobDefinition) SetStoppingCondition(v *StoppingCondition) *TrainingJobDefinition { - s.StoppingCondition = v - return s -} - -// SetTrainingInputMode sets the TrainingInputMode field's value. -func (s *TrainingJobDefinition) SetTrainingInputMode(v string) *TrainingJobDefinition { - s.TrainingInputMode = &v - return s -} - -// The numbers of training jobs launched by a hyperparameter tuning job, categorized -// by status. -type TrainingJobStatusCounters struct { - _ struct{} `type:"structure"` - - // The number of completed training jobs launched by the hyperparameter tuning - // job. - Completed *int64 `type:"integer"` - - // The number of in-progress training jobs launched by a hyperparameter tuning - // job. - InProgress *int64 `type:"integer"` - - // The number of training jobs that failed and can't be retried. A failed training - // job can't be retried if it failed because a client error occurred. - NonRetryableError *int64 `type:"integer"` - - // The number of training jobs that failed, but can be retried. A failed training - // job can be retried only if it failed because an internal service error occurred. - RetryableError *int64 `type:"integer"` - - // The number of training jobs launched by a hyperparameter tuning job that - // were manually stopped. - Stopped *int64 `type:"integer"` -} - -// String returns the string representation -func (s TrainingJobStatusCounters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TrainingJobStatusCounters) GoString() string { - return s.String() -} - -// SetCompleted sets the Completed field's value. -func (s *TrainingJobStatusCounters) SetCompleted(v int64) *TrainingJobStatusCounters { - s.Completed = &v - return s -} - -// SetInProgress sets the InProgress field's value. -func (s *TrainingJobStatusCounters) SetInProgress(v int64) *TrainingJobStatusCounters { - s.InProgress = &v - return s -} - -// SetNonRetryableError sets the NonRetryableError field's value. -func (s *TrainingJobStatusCounters) SetNonRetryableError(v int64) *TrainingJobStatusCounters { - s.NonRetryableError = &v - return s -} - -// SetRetryableError sets the RetryableError field's value. -func (s *TrainingJobStatusCounters) SetRetryableError(v int64) *TrainingJobStatusCounters { - s.RetryableError = &v - return s -} - -// SetStopped sets the Stopped field's value. -func (s *TrainingJobStatusCounters) SetStopped(v int64) *TrainingJobStatusCounters { - s.Stopped = &v - return s -} - -// Provides summary information about a training job. -type TrainingJobSummary struct { - _ struct{} `type:"structure"` - - // A timestamp that shows when the training job was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // Timestamp when the training job was last modified. - LastModifiedTime *time.Time `type:"timestamp"` - - // A timestamp that shows when the training job ended. This field is set only - // if the training job has one of the terminal statuses (Completed, Failed, - // or Stopped). - TrainingEndTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the training job. - // - // TrainingJobArn is a required field - TrainingJobArn *string `type:"string" required:"true"` - - // The name of the training job that you want a summary for. - // - // TrainingJobName is a required field - TrainingJobName *string `min:"1" type:"string" required:"true"` - - // The status of the training job. - // - // TrainingJobStatus is a required field - TrainingJobStatus *string `type:"string" required:"true" enum:"TrainingJobStatus"` -} - -// String returns the string representation -func (s TrainingJobSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TrainingJobSummary) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *TrainingJobSummary) SetCreationTime(v time.Time) *TrainingJobSummary { - s.CreationTime = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *TrainingJobSummary) SetLastModifiedTime(v time.Time) *TrainingJobSummary { - s.LastModifiedTime = &v - return s -} - -// SetTrainingEndTime sets the TrainingEndTime field's value. -func (s *TrainingJobSummary) SetTrainingEndTime(v time.Time) *TrainingJobSummary { - s.TrainingEndTime = &v - return s -} - -// SetTrainingJobArn sets the TrainingJobArn field's value. -func (s *TrainingJobSummary) SetTrainingJobArn(v string) *TrainingJobSummary { - s.TrainingJobArn = &v - return s -} - -// SetTrainingJobName sets the TrainingJobName field's value. -func (s *TrainingJobSummary) SetTrainingJobName(v string) *TrainingJobSummary { - s.TrainingJobName = &v - return s -} - -// SetTrainingJobStatus sets the TrainingJobStatus field's value. -func (s *TrainingJobSummary) SetTrainingJobStatus(v string) *TrainingJobSummary { - s.TrainingJobStatus = &v - return s -} - -// Defines how the algorithm is used for a training job. -type TrainingSpecification struct { - _ struct{} `type:"structure"` - - // A list of MetricDefinition objects, which are used for parsing metrics generated - // by the algorithm. - MetricDefinitions []*MetricDefinition `type:"list"` - - // A list of the HyperParameterSpecification objects, that define the supported - // hyperparameters. This is required if the algorithm supports automatic model - // tuning.> - SupportedHyperParameters []*HyperParameterSpecification `type:"list"` - - // A list of the instance types that this algorithm can use for training. - // - // SupportedTrainingInstanceTypes is a required field - SupportedTrainingInstanceTypes []*string `type:"list" required:"true"` - - // A list of the metrics that the algorithm emits that can be used as the objective - // metric in a hyperparameter tuning job. - SupportedTuningJobObjectiveMetrics []*HyperParameterTuningJobObjective `type:"list"` - - // Indicates whether the algorithm supports distributed training. If set to - // false, buyers can’t request more than one instance during training. - SupportsDistributedTraining *bool `type:"boolean"` - - // A list of ChannelSpecification objects, which specify the input sources to - // be used by the algorithm. - // - // TrainingChannels is a required field - TrainingChannels []*ChannelSpecification `min:"1" type:"list" required:"true"` - - // The Amazon ECR registry path of the Docker image that contains the training - // algorithm. - // - // TrainingImage is a required field - TrainingImage *string `type:"string" required:"true"` - - // An MD5 hash of the training algorithm that identifies the Docker image used - // for training. - TrainingImageDigest *string `type:"string"` -} - -// String returns the string representation -func (s TrainingSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TrainingSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TrainingSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TrainingSpecification"} - if s.SupportedTrainingInstanceTypes == nil { - invalidParams.Add(request.NewErrParamRequired("SupportedTrainingInstanceTypes")) - } - if s.TrainingChannels == nil { - invalidParams.Add(request.NewErrParamRequired("TrainingChannels")) - } - if s.TrainingChannels != nil && len(s.TrainingChannels) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TrainingChannels", 1)) - } - if s.TrainingImage == nil { - invalidParams.Add(request.NewErrParamRequired("TrainingImage")) - } - if s.MetricDefinitions != nil { - for i, v := range s.MetricDefinitions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricDefinitions", i), err.(request.ErrInvalidParams)) - } - } - } - if s.SupportedHyperParameters != nil { - for i, v := range s.SupportedHyperParameters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SupportedHyperParameters", i), err.(request.ErrInvalidParams)) - } - } - } - if s.SupportedTuningJobObjectiveMetrics != nil { - for i, v := range s.SupportedTuningJobObjectiveMetrics { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SupportedTuningJobObjectiveMetrics", i), err.(request.ErrInvalidParams)) - } - } - } - if s.TrainingChannels != nil { - for i, v := range s.TrainingChannels { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TrainingChannels", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMetricDefinitions sets the MetricDefinitions field's value. -func (s *TrainingSpecification) SetMetricDefinitions(v []*MetricDefinition) *TrainingSpecification { - s.MetricDefinitions = v - return s -} - -// SetSupportedHyperParameters sets the SupportedHyperParameters field's value. -func (s *TrainingSpecification) SetSupportedHyperParameters(v []*HyperParameterSpecification) *TrainingSpecification { - s.SupportedHyperParameters = v - return s -} - -// SetSupportedTrainingInstanceTypes sets the SupportedTrainingInstanceTypes field's value. -func (s *TrainingSpecification) SetSupportedTrainingInstanceTypes(v []*string) *TrainingSpecification { - s.SupportedTrainingInstanceTypes = v - return s -} - -// SetSupportedTuningJobObjectiveMetrics sets the SupportedTuningJobObjectiveMetrics field's value. -func (s *TrainingSpecification) SetSupportedTuningJobObjectiveMetrics(v []*HyperParameterTuningJobObjective) *TrainingSpecification { - s.SupportedTuningJobObjectiveMetrics = v - return s -} - -// SetSupportsDistributedTraining sets the SupportsDistributedTraining field's value. -func (s *TrainingSpecification) SetSupportsDistributedTraining(v bool) *TrainingSpecification { - s.SupportsDistributedTraining = &v - return s -} - -// SetTrainingChannels sets the TrainingChannels field's value. -func (s *TrainingSpecification) SetTrainingChannels(v []*ChannelSpecification) *TrainingSpecification { - s.TrainingChannels = v - return s -} - -// SetTrainingImage sets the TrainingImage field's value. -func (s *TrainingSpecification) SetTrainingImage(v string) *TrainingSpecification { - s.TrainingImage = &v - return s -} - -// SetTrainingImageDigest sets the TrainingImageDigest field's value. -func (s *TrainingSpecification) SetTrainingImageDigest(v string) *TrainingSpecification { - s.TrainingImageDigest = &v - return s -} - -// Describes the location of the channel data. -type TransformDataSource struct { - _ struct{} `type:"structure"` - - // The S3 location of the data source that is associated with a channel. - // - // S3DataSource is a required field - S3DataSource *TransformS3DataSource `type:"structure" required:"true"` -} - -// String returns the string representation -func (s TransformDataSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransformDataSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TransformDataSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TransformDataSource"} - 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 *TransformDataSource) SetS3DataSource(v *TransformS3DataSource) *TransformDataSource { - s.S3DataSource = v - return s -} - -// Describes the input source of a transform job and the way the transform job -// consumes it. -type TransformInput struct { - _ struct{} `type:"structure"` - - // If your transform data is compressed, specify the compression type. Amazon - // SageMaker automatically decompresses the data for the transform job accordingly. - // The default value is None. - CompressionType *string `type:"string" enum:"CompressionType"` - - // The multipurpose internet mail extension (MIME) type of the data. Amazon - // SageMaker uses the MIME type with each http call to transfer data to the - // transform job. - ContentType *string `type:"string"` - - // Describes the location of the channel data, which is, the S3 location of - // the input data that the model can consume. - // - // DataSource is a required field - DataSource *TransformDataSource `type:"structure" required:"true"` - - // The method to use to split the transform job's data into smaller batches. - // If you don't want to split the data, specify None. If you want to split records - // on a newline character boundary, specify Line. To split records according - // to the RecordIO format, specify RecordIO. The default value is None. - // - // Amazon SageMaker sends the maximum number of records per batch in each request - // up to the MaxPayloadInMB limit. For more information, see RecordIO data format - // (http://mxnet.io/architecture/note_data_loading.html#data-format). - // - // For information about the RecordIO format, see Data Format (http://mxnet.io/architecture/note_data_loading.html#data-format). - SplitType *string `type:"string" enum:"SplitType"` -} - -// String returns the string representation -func (s TransformInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransformInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TransformInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TransformInput"} - if s.DataSource == nil { - invalidParams.Add(request.NewErrParamRequired("DataSource")) - } - if s.DataSource != nil { - if err := s.DataSource.Validate(); err != nil { - invalidParams.AddNested("DataSource", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCompressionType sets the CompressionType field's value. -func (s *TransformInput) SetCompressionType(v string) *TransformInput { - s.CompressionType = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *TransformInput) SetContentType(v string) *TransformInput { - s.ContentType = &v - return s -} - -// SetDataSource sets the DataSource field's value. -func (s *TransformInput) SetDataSource(v *TransformDataSource) *TransformInput { - s.DataSource = v - return s -} - -// SetSplitType sets the SplitType field's value. -func (s *TransformInput) SetSplitType(v string) *TransformInput { - s.SplitType = &v - return s -} - -// Defines the input needed to run a transform job using the inference specification -// specified in the algorithm. -type TransformJobDefinition struct { - _ struct{} `type:"structure"` - - // A string that determines the number of records included in a single mini-batch. - // - // SingleRecord means only one record is used per mini-batch. MultiRecord means - // a mini-batch is set to contain as many records that can fit within the MaxPayloadInMB - // limit. - BatchStrategy *string `type:"string" enum:"BatchStrategy"` - - // The environment variables to set in the Docker container. We support up to - // 16 key and values entries in the map. - Environment map[string]*string `type:"map"` - - // The maximum number of parallel requests that can be sent to each instance - // in a transform job. The default value is 1. - MaxConcurrentTransforms *int64 `type:"integer"` - - // The maximum payload size allowed, in MB. A payload is the data portion of - // a record (without metadata). - MaxPayloadInMB *int64 `type:"integer"` - - // A description of the input source and the way the transform job consumes - // it. - // - // TransformInput is a required field - TransformInput *TransformInput `type:"structure" required:"true"` - - // Identifies the Amazon S3 location where you want Amazon SageMaker to save - // the results from the transform job. - // - // TransformOutput is a required field - TransformOutput *TransformOutput `type:"structure" required:"true"` - - // Identifies the ML compute instances for the transform job. - // - // TransformResources is a required field - TransformResources *TransformResources `type:"structure" required:"true"` -} - -// String returns the string representation -func (s TransformJobDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransformJobDefinition) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TransformJobDefinition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TransformJobDefinition"} - if s.TransformInput == nil { - invalidParams.Add(request.NewErrParamRequired("TransformInput")) - } - if s.TransformOutput == nil { - invalidParams.Add(request.NewErrParamRequired("TransformOutput")) - } - if s.TransformResources == nil { - invalidParams.Add(request.NewErrParamRequired("TransformResources")) - } - if s.TransformInput != nil { - if err := s.TransformInput.Validate(); err != nil { - invalidParams.AddNested("TransformInput", err.(request.ErrInvalidParams)) - } - } - if s.TransformOutput != nil { - if err := s.TransformOutput.Validate(); err != nil { - invalidParams.AddNested("TransformOutput", err.(request.ErrInvalidParams)) - } - } - if s.TransformResources != nil { - if err := s.TransformResources.Validate(); err != nil { - invalidParams.AddNested("TransformResources", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBatchStrategy sets the BatchStrategy field's value. -func (s *TransformJobDefinition) SetBatchStrategy(v string) *TransformJobDefinition { - s.BatchStrategy = &v - return s -} - -// SetEnvironment sets the Environment field's value. -func (s *TransformJobDefinition) SetEnvironment(v map[string]*string) *TransformJobDefinition { - s.Environment = v - return s -} - -// SetMaxConcurrentTransforms sets the MaxConcurrentTransforms field's value. -func (s *TransformJobDefinition) SetMaxConcurrentTransforms(v int64) *TransformJobDefinition { - s.MaxConcurrentTransforms = &v - return s -} - -// SetMaxPayloadInMB sets the MaxPayloadInMB field's value. -func (s *TransformJobDefinition) SetMaxPayloadInMB(v int64) *TransformJobDefinition { - s.MaxPayloadInMB = &v - return s -} - -// SetTransformInput sets the TransformInput field's value. -func (s *TransformJobDefinition) SetTransformInput(v *TransformInput) *TransformJobDefinition { - s.TransformInput = v - return s -} - -// SetTransformOutput sets the TransformOutput field's value. -func (s *TransformJobDefinition) SetTransformOutput(v *TransformOutput) *TransformJobDefinition { - s.TransformOutput = v - return s -} - -// SetTransformResources sets the TransformResources field's value. -func (s *TransformJobDefinition) SetTransformResources(v *TransformResources) *TransformJobDefinition { - s.TransformResources = v - return s -} - -// Provides a summary of a transform job. Multiple TransformJobSummary objects -// are returned as a list after in response to a ListTransformJobs call. -type TransformJobSummary struct { - _ struct{} `type:"structure"` - - // A timestamp that shows when the transform Job was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // If the transform job failed, the reason it failed. - FailureReason *string `type:"string"` - - // Indicates when the transform job was last modified. - LastModifiedTime *time.Time `type:"timestamp"` - - // Indicates when the transform job ends on compute instances. For successful - // jobs and stopped jobs, this is the exact time recorded after the results - // are uploaded. For failed jobs, this is when Amazon SageMaker detected that - // the job failed. - TransformEndTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the transform job. - // - // TransformJobArn is a required field - TransformJobArn *string `type:"string" required:"true"` - - // The name of the transform job. - // - // TransformJobName is a required field - TransformJobName *string `min:"1" type:"string" required:"true"` - - // The status of the transform job. - // - // TransformJobStatus is a required field - TransformJobStatus *string `type:"string" required:"true" enum:"TransformJobStatus"` -} - -// String returns the string representation -func (s TransformJobSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransformJobSummary) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *TransformJobSummary) SetCreationTime(v time.Time) *TransformJobSummary { - s.CreationTime = &v - return s -} - -// SetFailureReason sets the FailureReason field's value. -func (s *TransformJobSummary) SetFailureReason(v string) *TransformJobSummary { - s.FailureReason = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *TransformJobSummary) SetLastModifiedTime(v time.Time) *TransformJobSummary { - s.LastModifiedTime = &v - return s -} - -// SetTransformEndTime sets the TransformEndTime field's value. -func (s *TransformJobSummary) SetTransformEndTime(v time.Time) *TransformJobSummary { - s.TransformEndTime = &v - return s -} - -// SetTransformJobArn sets the TransformJobArn field's value. -func (s *TransformJobSummary) SetTransformJobArn(v string) *TransformJobSummary { - s.TransformJobArn = &v - return s -} - -// SetTransformJobName sets the TransformJobName field's value. -func (s *TransformJobSummary) SetTransformJobName(v string) *TransformJobSummary { - s.TransformJobName = &v - return s -} - -// SetTransformJobStatus sets the TransformJobStatus field's value. -func (s *TransformJobSummary) SetTransformJobStatus(v string) *TransformJobSummary { - s.TransformJobStatus = &v - return s -} - -// Describes the results of a transform job output. -type TransformOutput struct { - _ struct{} `type:"structure"` - - // The MIME type used to specify the output data. Amazon SageMaker uses the - // MIME type with each http call to transfer data from the transform job. - Accept *string `type:"string"` - - // Defines how to assemble the results of the transform job as a single S3 object. - // Choose a format that is most convenient to you. To concatenate the results - // in binary format, specify None. To add a newline character at the end of - // every transformed record, specify Line. - AssembleWith *string `type:"string" enum:"AssemblyType"` - - // The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to - // encrypt the model artifacts at rest using Amazon S3 server-side encryption. - // The KmsKeyId can be any of the following formats: - // - // * // KMS Key ID - // - // "1234abcd-12ab-34cd-56ef-1234567890ab" - // - // * // Amazon Resource Name (ARN) of a KMS Key - // - // "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" - // - // * // KMS Key Alias - // - // "alias/ExampleAlias" - // - // * // Amazon Resource Name (ARN) of a KMS Key Alias - // - // "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" - // - // If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS - // key for Amazon S3 for your role's account. For more information, see KMS-Managed - // Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) - // in the Amazon Simple Storage Service Developer Guide. - // - // The KMS key policy must grant permission to the IAM role that you specify - // in your CreateTramsformJob request. For more information, see Using Key Policies - // in AWS KMS (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) - // in the AWS Key Management Service Developer Guide. - KmsKeyId *string `type:"string"` - - // The Amazon S3 path where you want Amazon SageMaker to store the results of - // the transform job. For example, s3://bucket-name/key-name-prefix. - // - // For every S3 object used as input for the transform job, the transformed - // data is stored in a corresponding subfolder in the location under the output - // prefix. For example, for the input data s3://bucket-name/input-name-prefix/dataset01/data.csv - // the transformed data is stored at s3://bucket-name/key-name-prefix/dataset01/. - // This is based on the original name, as a series of .part files (.part0001, - // part0002, etc.). - // - // S3OutputPath is a required field - S3OutputPath *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s TransformOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransformOutput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TransformOutput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TransformOutput"} - if s.S3OutputPath == nil { - invalidParams.Add(request.NewErrParamRequired("S3OutputPath")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccept sets the Accept field's value. -func (s *TransformOutput) SetAccept(v string) *TransformOutput { - s.Accept = &v - return s -} - -// SetAssembleWith sets the AssembleWith field's value. -func (s *TransformOutput) SetAssembleWith(v string) *TransformOutput { - s.AssembleWith = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *TransformOutput) SetKmsKeyId(v string) *TransformOutput { - s.KmsKeyId = &v - return s -} - -// SetS3OutputPath sets the S3OutputPath field's value. -func (s *TransformOutput) SetS3OutputPath(v string) *TransformOutput { - s.S3OutputPath = &v - return s -} - -// Describes the resources, including ML instance types and ML instance count, -// to use for transform job. -type TransformResources struct { - _ struct{} `type:"structure"` - - // The number of ML compute instances to use in the transform job. For distributed - // transform, provide a value greater than 1. The default value is 1. - // - // InstanceCount is a required field - InstanceCount *int64 `min:"1" type:"integer" required:"true"` - - // The ML compute instance type for the transform job. For using built-in algorithms - // to transform moderately sized datasets, ml.m4.xlarge or ml.m5.large should - // suffice. There is no default value for InstanceType. - // - // InstanceType is a required field - InstanceType *string `type:"string" required:"true" enum:"TransformInstanceType"` - - // The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to - // encrypt data on the storage volume attached to the ML compute instance(s) - // that run the batch transform job. The VolumeKmsKeyId can be any of the following - // formats: - // - // * // KMS Key ID - // - // "1234abcd-12ab-34cd-56ef-1234567890ab" - // - // * // Amazon Resource Name (ARN) of a KMS Key - // - // "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" - VolumeKmsKeyId *string `type:"string"` -} - -// String returns the string representation -func (s TransformResources) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransformResources) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TransformResources) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TransformResources"} - if s.InstanceCount == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceCount")) - } - if s.InstanceCount != nil && *s.InstanceCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("InstanceCount", 1)) - } - if s.InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *TransformResources) SetInstanceCount(v int64) *TransformResources { - s.InstanceCount = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *TransformResources) SetInstanceType(v string) *TransformResources { - s.InstanceType = &v - return s -} - -// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. -func (s *TransformResources) SetVolumeKmsKeyId(v string) *TransformResources { - s.VolumeKmsKeyId = &v - return s -} - -// Describes the S3 data source. -type TransformS3DataSource struct { - _ struct{} `type:"structure"` - - // If you choose S3Prefix, S3Uri identifies a key name prefix. Amazon SageMaker - // uses all objects with the specified key name prefix for batch transform. - // - // If you choose ManifestFile, S3Uri identifies an object that is a manifest - // file containing a list of object keys that you want Amazon SageMaker to use - // for batch transform. - // - // S3DataType is a required field - S3DataType *string `type:"string" required:"true" enum:"S3DataType"` - - // Depending on the value specified for the S3DataType, identifies either a - // key name prefix or a manifest. For example: - // - // * A key name prefix might look like this: s3://bucketname/exampleprefix. - // - // - // * A manifest might look like this: s3://bucketname/example.manifest - // - // The manifest is an S3 object which is a JSON file with the following format: - // - // - // [ - // - // {"prefix": "s3://customer_bucket/some/prefix/"}, - // - // "relative/path/to/custdata-1", - // - // "relative/path/custdata-2", - // - // ... - // - // ] - // - // The preceding JSON matches the following S3Uris: - // - // s3://customer_bucket/some/prefix/relative/path/to/custdata-1 - // - // s3://customer_bucket/some/prefix/relative/path/custdata-1 - // - // ... - // - // The complete set of S3Uris in this manifest constitutes the input data for - // the channel for this datasource. The object that each S3Uris points to - // must be readable by the IAM role that Amazon SageMaker uses to perform - // tasks on your behalf. - // - // S3Uri is a required field - S3Uri *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s TransformS3DataSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TransformS3DataSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TransformS3DataSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TransformS3DataSource"} - if s.S3DataType == nil { - invalidParams.Add(request.NewErrParamRequired("S3DataType")) - } - if s.S3Uri == nil { - invalidParams.Add(request.NewErrParamRequired("S3Uri")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3DataType sets the S3DataType field's value. -func (s *TransformS3DataSource) SetS3DataType(v string) *TransformS3DataSource { - s.S3DataType = &v - return s -} - -// SetS3Uri sets the S3Uri field's value. -func (s *TransformS3DataSource) SetS3Uri(v string) *TransformS3DataSource { - s.S3Uri = &v - return s -} - -// Represents an amount of money in United States dollars/ -type USD struct { - _ struct{} `type:"structure"` - - // The fractional portion, in cents, of the amount. - Cents *int64 `type:"integer"` - - // The whole number of dollars in the amount. - Dollars *int64 `type:"integer"` - - // Fractions of a cent, in tenths. - TenthFractionsOfACent *int64 `type:"integer"` -} - -// String returns the string representation -func (s USD) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s USD) GoString() string { - return s.String() -} - -// SetCents sets the Cents field's value. -func (s *USD) SetCents(v int64) *USD { - s.Cents = &v - return s -} - -// SetDollars sets the Dollars field's value. -func (s *USD) SetDollars(v int64) *USD { - s.Dollars = &v - return s -} - -// SetTenthFractionsOfACent sets the TenthFractionsOfACent field's value. -func (s *USD) SetTenthFractionsOfACent(v int64) *USD { - s.TenthFractionsOfACent = &v - return s -} - -// Provided configuration information for the worker UI for a labeling job. -type UiConfig struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket location of the UI template. For more information about - // the contents of a UI template, see Creating Your Custom Labeling Task Template - // (http://docs.aws.amazon.com/sagemaker/latest/dg/sms-custom-templates-step2.html). - // - // UiTemplateS3Uri is a required field - UiTemplateS3Uri *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UiConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UiConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UiConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UiConfig"} - if s.UiTemplateS3Uri == nil { - invalidParams.Add(request.NewErrParamRequired("UiTemplateS3Uri")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUiTemplateS3Uri sets the UiTemplateS3Uri field's value. -func (s *UiConfig) SetUiTemplateS3Uri(v string) *UiConfig { - s.UiTemplateS3Uri = &v - return s -} - -// The Liquid template for the worker user interface. -type UiTemplate struct { - _ struct{} `type:"structure"` - - // The content of the Liquid template for the worker user interface. - // - // Content is a required field - Content *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UiTemplate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UiTemplate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UiTemplate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UiTemplate"} - if s.Content == nil { - invalidParams.Add(request.NewErrParamRequired("Content")) - } - if s.Content != nil && len(*s.Content) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Content", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContent sets the Content field's value. -func (s *UiTemplate) SetContent(v string) *UiTemplate { - s.Content = &v - return s -} - -type UpdateCodeRepositoryInput struct { - _ struct{} `type:"structure"` - - // The name of the Git repository to update. - // - // CodeRepositoryName is a required field - CodeRepositoryName *string `min:"1" type:"string" required:"true"` - - // The configuration of the git repository, including the URL and the Amazon - // Resource Name (ARN) of the AWS Secrets Manager secret that contains the credentials - // used to access the repository. The secret must have a staging label of AWSCURRENT - // and must be in the following format: - // - // {"username": UserName, "password": Password} - GitConfig *GitConfigForUpdate `type:"structure"` -} - -// String returns the string representation -func (s UpdateCodeRepositoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCodeRepositoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCodeRepositoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCodeRepositoryInput"} - if s.CodeRepositoryName == nil { - invalidParams.Add(request.NewErrParamRequired("CodeRepositoryName")) - } - if s.CodeRepositoryName != nil && len(*s.CodeRepositoryName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CodeRepositoryName", 1)) - } - if s.GitConfig != nil { - if err := s.GitConfig.Validate(); err != nil { - invalidParams.AddNested("GitConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCodeRepositoryName sets the CodeRepositoryName field's value. -func (s *UpdateCodeRepositoryInput) SetCodeRepositoryName(v string) *UpdateCodeRepositoryInput { - s.CodeRepositoryName = &v - return s -} - -// SetGitConfig sets the GitConfig field's value. -func (s *UpdateCodeRepositoryInput) SetGitConfig(v *GitConfigForUpdate) *UpdateCodeRepositoryInput { - s.GitConfig = v - return s -} - -type UpdateCodeRepositoryOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the Git repository. - // - // CodeRepositoryArn is a required field - CodeRepositoryArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateCodeRepositoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCodeRepositoryOutput) GoString() string { - return s.String() -} - -// SetCodeRepositoryArn sets the CodeRepositoryArn field's value. -func (s *UpdateCodeRepositoryOutput) SetCodeRepositoryArn(v string) *UpdateCodeRepositoryOutput { - s.CodeRepositoryArn = &v - return s -} - -type UpdateEndpointInput struct { - _ struct{} `type:"structure"` - - // The name of the new endpoint configuration. - // - // EndpointConfigName is a required field - EndpointConfigName *string `type:"string" required:"true"` - - // The name of the endpoint whose configuration you want to update. - // - // EndpointName is a required field - EndpointName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateEndpointInput"} - if s.EndpointConfigName == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointConfigName")) - } - if s.EndpointName == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointConfigName sets the EndpointConfigName field's value. -func (s *UpdateEndpointInput) SetEndpointConfigName(v string) *UpdateEndpointInput { - s.EndpointConfigName = &v - return s -} - -// SetEndpointName sets the EndpointName field's value. -func (s *UpdateEndpointInput) SetEndpointName(v string) *UpdateEndpointInput { - s.EndpointName = &v - return s -} - -type UpdateEndpointOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the endpoint. - // - // EndpointArn is a required field - EndpointArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEndpointOutput) GoString() string { - return s.String() -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *UpdateEndpointOutput) SetEndpointArn(v string) *UpdateEndpointOutput { - s.EndpointArn = &v - return s -} - -type UpdateEndpointWeightsAndCapacitiesInput struct { - _ struct{} `type:"structure"` - - // An object that provides new capacity and weight values for a variant. - // - // DesiredWeightsAndCapacities is a required field - DesiredWeightsAndCapacities []*DesiredWeightAndCapacity `min:"1" type:"list" required:"true"` - - // The name of an existing Amazon SageMaker endpoint. - // - // EndpointName is a required field - EndpointName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateEndpointWeightsAndCapacitiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEndpointWeightsAndCapacitiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateEndpointWeightsAndCapacitiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateEndpointWeightsAndCapacitiesInput"} - if s.DesiredWeightsAndCapacities == nil { - invalidParams.Add(request.NewErrParamRequired("DesiredWeightsAndCapacities")) - } - if s.DesiredWeightsAndCapacities != nil && len(s.DesiredWeightsAndCapacities) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DesiredWeightsAndCapacities", 1)) - } - if s.EndpointName == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointName")) - } - if s.DesiredWeightsAndCapacities != nil { - for i, v := range s.DesiredWeightsAndCapacities { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DesiredWeightsAndCapacities", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDesiredWeightsAndCapacities sets the DesiredWeightsAndCapacities field's value. -func (s *UpdateEndpointWeightsAndCapacitiesInput) SetDesiredWeightsAndCapacities(v []*DesiredWeightAndCapacity) *UpdateEndpointWeightsAndCapacitiesInput { - s.DesiredWeightsAndCapacities = v - return s -} - -// SetEndpointName sets the EndpointName field's value. -func (s *UpdateEndpointWeightsAndCapacitiesInput) SetEndpointName(v string) *UpdateEndpointWeightsAndCapacitiesInput { - s.EndpointName = &v - return s -} - -type UpdateEndpointWeightsAndCapacitiesOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the updated endpoint. - // - // EndpointArn is a required field - EndpointArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateEndpointWeightsAndCapacitiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateEndpointWeightsAndCapacitiesOutput) GoString() string { - return s.String() -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *UpdateEndpointWeightsAndCapacitiesOutput) SetEndpointArn(v string) *UpdateEndpointWeightsAndCapacitiesOutput { - s.EndpointArn = &v - return s -} - -type UpdateNotebookInstanceInput struct { - _ struct{} `type:"structure"` - - // A list of the Elastic Inference (EI) instance types to associate with this - // notebook instance. Currently only one EI instance type can be associated - // with a notebook instance. For more information, see Using Elastic Inference - // in Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/ei.html). - AcceleratorTypes []*string `type:"list"` - - // An array of up to three Git repositories to associate with the notebook instance. - // These can be either the names of Git repositories stored as resources in - // your account, or the URL of Git repositories in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) - // or in any other Git repository.. These repositories are cloned at the same - // level as the default repository of your notebook instance. For more information, - // see Associating Git Repositories with Amazon SageMaker Notebook Instances - // (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). - AdditionalCodeRepositories []*string `type:"list"` - - // The Git repository to associate with the notebook instance as its default - // code repository. This can be either the name of a Git repository stored as - // a resource in your account, or the URL of a Git repository in AWS CodeCommit - // (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) or - // in any other Git repository. When you open a notebook instance, it opens - // in the directory that contains this repository. For more information, see - // Associating Git Repositories with Amazon SageMaker Notebook Instances (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). - DefaultCodeRepository *string `min:"1" type:"string"` - - // A list of the Elastic Inference (EI) instance types to remove from this notebook - // instance. - DisassociateAcceleratorTypes *bool `type:"boolean"` - - // A list of names or URLs of the default Git repositories to remove from this - // notebook instance. - DisassociateAdditionalCodeRepositories *bool `type:"boolean"` - - // The name or URL of the default Git repository to remove from this notebook - // instance. - DisassociateDefaultCodeRepository *bool `type:"boolean"` - - // Set to true to remove the notebook instance lifecycle configuration currently - // associated with the notebook instance. - DisassociateLifecycleConfig *bool `type:"boolean"` - - // The Amazon ML compute instance type. - InstanceType *string `type:"string" enum:"InstanceType"` - - // The name of a lifecycle configuration to associate with the notebook instance. - // For information about lifestyle configurations, see Step 2.1: (Optional) - // Customize a Notebook Instance (http://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html). - LifecycleConfigName *string `type:"string"` - - // The name of the notebook instance to update. - // - // NotebookInstanceName is a required field - NotebookInstanceName *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker can - // assume to access the notebook instance. For more information, see Amazon - // SageMaker Roles (http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html). - // - // To be able to pass this role to Amazon SageMaker, the caller of this API - // must have the iam:PassRole permission. - RoleArn *string `min:"20" type:"string"` - - // The size, in GB, of the ML storage volume to attach to the notebook instance. - // The default value is 5 GB. - VolumeSizeInGB *int64 `min:"5" type:"integer"` -} - -// String returns the string representation -func (s UpdateNotebookInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateNotebookInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateNotebookInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateNotebookInstanceInput"} - if s.DefaultCodeRepository != nil && len(*s.DefaultCodeRepository) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DefaultCodeRepository", 1)) - } - if s.NotebookInstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("NotebookInstanceName")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) - } - if s.VolumeSizeInGB != nil && *s.VolumeSizeInGB < 5 { - invalidParams.Add(request.NewErrParamMinValue("VolumeSizeInGB", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceleratorTypes sets the AcceleratorTypes field's value. -func (s *UpdateNotebookInstanceInput) SetAcceleratorTypes(v []*string) *UpdateNotebookInstanceInput { - s.AcceleratorTypes = v - return s -} - -// SetAdditionalCodeRepositories sets the AdditionalCodeRepositories field's value. -func (s *UpdateNotebookInstanceInput) SetAdditionalCodeRepositories(v []*string) *UpdateNotebookInstanceInput { - s.AdditionalCodeRepositories = v - return s -} - -// SetDefaultCodeRepository sets the DefaultCodeRepository field's value. -func (s *UpdateNotebookInstanceInput) SetDefaultCodeRepository(v string) *UpdateNotebookInstanceInput { - s.DefaultCodeRepository = &v - return s -} - -// SetDisassociateAcceleratorTypes sets the DisassociateAcceleratorTypes field's value. -func (s *UpdateNotebookInstanceInput) SetDisassociateAcceleratorTypes(v bool) *UpdateNotebookInstanceInput { - s.DisassociateAcceleratorTypes = &v - return s -} - -// SetDisassociateAdditionalCodeRepositories sets the DisassociateAdditionalCodeRepositories field's value. -func (s *UpdateNotebookInstanceInput) SetDisassociateAdditionalCodeRepositories(v bool) *UpdateNotebookInstanceInput { - s.DisassociateAdditionalCodeRepositories = &v - return s -} - -// SetDisassociateDefaultCodeRepository sets the DisassociateDefaultCodeRepository field's value. -func (s *UpdateNotebookInstanceInput) SetDisassociateDefaultCodeRepository(v bool) *UpdateNotebookInstanceInput { - s.DisassociateDefaultCodeRepository = &v - return s -} - -// SetDisassociateLifecycleConfig sets the DisassociateLifecycleConfig field's value. -func (s *UpdateNotebookInstanceInput) SetDisassociateLifecycleConfig(v bool) *UpdateNotebookInstanceInput { - s.DisassociateLifecycleConfig = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *UpdateNotebookInstanceInput) SetInstanceType(v string) *UpdateNotebookInstanceInput { - s.InstanceType = &v - return s -} - -// SetLifecycleConfigName sets the LifecycleConfigName field's value. -func (s *UpdateNotebookInstanceInput) SetLifecycleConfigName(v string) *UpdateNotebookInstanceInput { - s.LifecycleConfigName = &v - return s -} - -// SetNotebookInstanceName sets the NotebookInstanceName field's value. -func (s *UpdateNotebookInstanceInput) SetNotebookInstanceName(v string) *UpdateNotebookInstanceInput { - s.NotebookInstanceName = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *UpdateNotebookInstanceInput) SetRoleArn(v string) *UpdateNotebookInstanceInput { - s.RoleArn = &v - return s -} - -// SetVolumeSizeInGB sets the VolumeSizeInGB field's value. -func (s *UpdateNotebookInstanceInput) SetVolumeSizeInGB(v int64) *UpdateNotebookInstanceInput { - s.VolumeSizeInGB = &v - return s -} - -type UpdateNotebookInstanceLifecycleConfigInput struct { - _ struct{} `type:"structure"` - - // The name of the lifecycle configuration. - // - // NotebookInstanceLifecycleConfigName is a required field - NotebookInstanceLifecycleConfigName *string `type:"string" required:"true"` - - // The shell script that runs only once, when you create a notebook instance - OnCreate []*NotebookInstanceLifecycleHook `type:"list"` - - // The shell script that runs every time you start a notebook instance, including - // when you create the notebook instance. - OnStart []*NotebookInstanceLifecycleHook `type:"list"` -} - -// String returns the string representation -func (s UpdateNotebookInstanceLifecycleConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateNotebookInstanceLifecycleConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateNotebookInstanceLifecycleConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateNotebookInstanceLifecycleConfigInput"} - if s.NotebookInstanceLifecycleConfigName == nil { - invalidParams.Add(request.NewErrParamRequired("NotebookInstanceLifecycleConfigName")) - } - if s.OnCreate != nil { - for i, v := range s.OnCreate { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OnCreate", i), err.(request.ErrInvalidParams)) - } - } - } - if s.OnStart != nil { - for i, v := range s.OnStart { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OnStart", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. -func (s *UpdateNotebookInstanceLifecycleConfigInput) SetNotebookInstanceLifecycleConfigName(v string) *UpdateNotebookInstanceLifecycleConfigInput { - s.NotebookInstanceLifecycleConfigName = &v - return s -} - -// SetOnCreate sets the OnCreate field's value. -func (s *UpdateNotebookInstanceLifecycleConfigInput) SetOnCreate(v []*NotebookInstanceLifecycleHook) *UpdateNotebookInstanceLifecycleConfigInput { - s.OnCreate = v - return s -} - -// SetOnStart sets the OnStart field's value. -func (s *UpdateNotebookInstanceLifecycleConfigInput) SetOnStart(v []*NotebookInstanceLifecycleHook) *UpdateNotebookInstanceLifecycleConfigInput { - s.OnStart = v - return s -} - -type UpdateNotebookInstanceLifecycleConfigOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateNotebookInstanceLifecycleConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateNotebookInstanceLifecycleConfigOutput) GoString() string { - return s.String() -} - -type UpdateNotebookInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateNotebookInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateNotebookInstanceOutput) GoString() string { - return s.String() -} - -type UpdateWorkteamInput struct { - _ struct{} `type:"structure"` - - // An updated description for the work team. - Description *string `min:"1" type:"string"` - - // A list of MemberDefinition objects that contain the updated work team members. - MemberDefinitions []*MemberDefinition `min:"1" type:"list"` - - // The name of the work team to update. - // - // WorkteamName is a required field - WorkteamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateWorkteamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateWorkteamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateWorkteamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateWorkteamInput"} - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.MemberDefinitions != nil && len(s.MemberDefinitions) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MemberDefinitions", 1)) - } - if s.WorkteamName == nil { - invalidParams.Add(request.NewErrParamRequired("WorkteamName")) - } - if s.WorkteamName != nil && len(*s.WorkteamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkteamName", 1)) - } - if s.MemberDefinitions != nil { - for i, v := range s.MemberDefinitions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MemberDefinitions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateWorkteamInput) SetDescription(v string) *UpdateWorkteamInput { - s.Description = &v - return s -} - -// SetMemberDefinitions sets the MemberDefinitions field's value. -func (s *UpdateWorkteamInput) SetMemberDefinitions(v []*MemberDefinition) *UpdateWorkteamInput { - s.MemberDefinitions = v - return s -} - -// SetWorkteamName sets the WorkteamName field's value. -func (s *UpdateWorkteamInput) SetWorkteamName(v string) *UpdateWorkteamInput { - s.WorkteamName = &v - return s -} - -type UpdateWorkteamOutput struct { - _ struct{} `type:"structure"` - - // A Workteam object that describes the updated work team. - // - // Workteam is a required field - Workteam *Workteam `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateWorkteamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateWorkteamOutput) GoString() string { - return s.String() -} - -// SetWorkteam sets the Workteam field's value. -func (s *UpdateWorkteamOutput) SetWorkteam(v *Workteam) *UpdateWorkteamOutput { - s.Workteam = v - return s -} - -// Specifies a VPC that your training jobs and hosted models have access to. -// Control access to and from your training and model containers by configuring -// the VPC. For more information, see Protect Endpoints by Using an Amazon Virtual -// Private Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html) -// and Protect Training Jobs by Using an Amazon Virtual Private Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html). -type VpcConfig struct { - _ struct{} `type:"structure"` - - // The VPC security group IDs, in the form sg-xxxxxxxx. Specify the security - // groups for the VPC that is specified in the Subnets field. - // - // SecurityGroupIds is a required field - SecurityGroupIds []*string `min:"1" type:"list" required:"true"` - - // The ID of the subnets in the VPC to which you want to connect your training - // job or model. - // - // Subnets is a required field - Subnets []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s VpcConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VpcConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VpcConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VpcConfig"} - if s.SecurityGroupIds == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) - } - if s.SecurityGroupIds != nil && len(s.SecurityGroupIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecurityGroupIds", 1)) - } - if s.Subnets == nil { - invalidParams.Add(request.NewErrParamRequired("Subnets")) - } - if s.Subnets != nil && len(s.Subnets) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Subnets", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *VpcConfig) SetSecurityGroupIds(v []*string) *VpcConfig { - s.SecurityGroupIds = v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *VpcConfig) SetSubnets(v []*string) *VpcConfig { - s.Subnets = v - return s -} - -// Provides details about a labeling work team. -type Workteam struct { - _ struct{} `type:"structure"` - - // The date and time that the work team was created (timestamp). - CreateDate *time.Time `type:"timestamp"` - - // A description of the work team. - // - // Description is a required field - Description *string `min:"1" type:"string" required:"true"` - - // The date and time that the work team was last updated (timestamp). - LastUpdatedDate *time.Time `type:"timestamp"` - - // The Amazon Cognito user groups that make up the work team. - // - // MemberDefinitions is a required field - MemberDefinitions []*MemberDefinition `min:"1" type:"list" required:"true"` - - // The Amazon Marketplace identifier for a vendor's work team. - ProductListingIds []*string `type:"list"` - - // The URI of the labeling job's user interface. Workers open this URI to start - // labeling your data objects. - SubDomain *string `type:"string"` - - // The Amazon Resource Name (ARN) that identifies the work team. - // - // WorkteamArn is a required field - WorkteamArn *string `type:"string" required:"true"` - - // The name of the work team. - // - // WorkteamName is a required field - WorkteamName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Workteam) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Workteam) GoString() string { - return s.String() -} - -// SetCreateDate sets the CreateDate field's value. -func (s *Workteam) SetCreateDate(v time.Time) *Workteam { - s.CreateDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Workteam) SetDescription(v string) *Workteam { - s.Description = &v - return s -} - -// SetLastUpdatedDate sets the LastUpdatedDate field's value. -func (s *Workteam) SetLastUpdatedDate(v time.Time) *Workteam { - s.LastUpdatedDate = &v - return s -} - -// SetMemberDefinitions sets the MemberDefinitions field's value. -func (s *Workteam) SetMemberDefinitions(v []*MemberDefinition) *Workteam { - s.MemberDefinitions = v - return s -} - -// SetProductListingIds sets the ProductListingIds field's value. -func (s *Workteam) SetProductListingIds(v []*string) *Workteam { - s.ProductListingIds = v - return s -} - -// SetSubDomain sets the SubDomain field's value. -func (s *Workteam) SetSubDomain(v string) *Workteam { - s.SubDomain = &v - return s -} - -// SetWorkteamArn sets the WorkteamArn field's value. -func (s *Workteam) SetWorkteamArn(v string) *Workteam { - s.WorkteamArn = &v - return s -} - -// SetWorkteamName sets the WorkteamName field's value. -func (s *Workteam) SetWorkteamName(v string) *Workteam { - s.WorkteamName = &v - return s -} - -const ( - // AlgorithmSortByName is a AlgorithmSortBy enum value - AlgorithmSortByName = "Name" - - // AlgorithmSortByCreationTime is a AlgorithmSortBy enum value - AlgorithmSortByCreationTime = "CreationTime" -) - -const ( - // AlgorithmStatusPending is a AlgorithmStatus enum value - AlgorithmStatusPending = "Pending" - - // AlgorithmStatusInProgress is a AlgorithmStatus enum value - AlgorithmStatusInProgress = "InProgress" - - // AlgorithmStatusCompleted is a AlgorithmStatus enum value - AlgorithmStatusCompleted = "Completed" - - // AlgorithmStatusFailed is a AlgorithmStatus enum value - AlgorithmStatusFailed = "Failed" - - // AlgorithmStatusDeleting is a AlgorithmStatus enum value - AlgorithmStatusDeleting = "Deleting" -) - -const ( - // AssemblyTypeNone is a AssemblyType enum value - AssemblyTypeNone = "None" - - // AssemblyTypeLine is a AssemblyType enum value - AssemblyTypeLine = "Line" -) - -const ( - // BatchStrategyMultiRecord is a BatchStrategy enum value - BatchStrategyMultiRecord = "MultiRecord" - - // BatchStrategySingleRecord is a BatchStrategy enum value - BatchStrategySingleRecord = "SingleRecord" -) - -const ( - // BooleanOperatorAnd is a BooleanOperator enum value - BooleanOperatorAnd = "And" - - // BooleanOperatorOr is a BooleanOperator enum value - BooleanOperatorOr = "Or" -) - -const ( - // CodeRepositorySortByName is a CodeRepositorySortBy enum value - CodeRepositorySortByName = "Name" - - // CodeRepositorySortByCreationTime is a CodeRepositorySortBy enum value - CodeRepositorySortByCreationTime = "CreationTime" - - // CodeRepositorySortByLastModifiedTime is a CodeRepositorySortBy enum value - CodeRepositorySortByLastModifiedTime = "LastModifiedTime" -) - -const ( - // CodeRepositorySortOrderAscending is a CodeRepositorySortOrder enum value - CodeRepositorySortOrderAscending = "Ascending" - - // CodeRepositorySortOrderDescending is a CodeRepositorySortOrder enum value - CodeRepositorySortOrderDescending = "Descending" -) - -const ( - // CompilationJobStatusInprogress is a CompilationJobStatus enum value - CompilationJobStatusInprogress = "INPROGRESS" - - // CompilationJobStatusCompleted is a CompilationJobStatus enum value - CompilationJobStatusCompleted = "COMPLETED" - - // CompilationJobStatusFailed is a CompilationJobStatus enum value - CompilationJobStatusFailed = "FAILED" - - // CompilationJobStatusStarting is a CompilationJobStatus enum value - CompilationJobStatusStarting = "STARTING" - - // CompilationJobStatusStopping is a CompilationJobStatus enum value - CompilationJobStatusStopping = "STOPPING" - - // CompilationJobStatusStopped is a CompilationJobStatus enum value - CompilationJobStatusStopped = "STOPPED" -) - -const ( - // CompressionTypeNone is a CompressionType enum value - CompressionTypeNone = "None" - - // CompressionTypeGzip is a CompressionType enum value - CompressionTypeGzip = "Gzip" -) - -const ( - // ContentClassifierFreeOfPersonallyIdentifiableInformation is a ContentClassifier enum value - ContentClassifierFreeOfPersonallyIdentifiableInformation = "FreeOfPersonallyIdentifiableInformation" - - // ContentClassifierFreeOfAdultContent is a ContentClassifier enum value - ContentClassifierFreeOfAdultContent = "FreeOfAdultContent" -) - -const ( - // DetailedAlgorithmStatusNotStarted is a DetailedAlgorithmStatus enum value - DetailedAlgorithmStatusNotStarted = "NotStarted" - - // DetailedAlgorithmStatusInProgress is a DetailedAlgorithmStatus enum value - DetailedAlgorithmStatusInProgress = "InProgress" - - // DetailedAlgorithmStatusCompleted is a DetailedAlgorithmStatus enum value - DetailedAlgorithmStatusCompleted = "Completed" - - // DetailedAlgorithmStatusFailed is a DetailedAlgorithmStatus enum value - DetailedAlgorithmStatusFailed = "Failed" -) - -const ( - // DetailedModelPackageStatusNotStarted is a DetailedModelPackageStatus enum value - DetailedModelPackageStatusNotStarted = "NotStarted" - - // DetailedModelPackageStatusInProgress is a DetailedModelPackageStatus enum value - DetailedModelPackageStatusInProgress = "InProgress" - - // DetailedModelPackageStatusCompleted is a DetailedModelPackageStatus enum value - DetailedModelPackageStatusCompleted = "Completed" - - // DetailedModelPackageStatusFailed is a DetailedModelPackageStatus enum value - DetailedModelPackageStatusFailed = "Failed" -) - -const ( - // DirectInternetAccessEnabled is a DirectInternetAccess enum value - DirectInternetAccessEnabled = "Enabled" - - // DirectInternetAccessDisabled is a DirectInternetAccess enum value - DirectInternetAccessDisabled = "Disabled" -) - -const ( - // EndpointConfigSortKeyName is a EndpointConfigSortKey enum value - EndpointConfigSortKeyName = "Name" - - // EndpointConfigSortKeyCreationTime is a EndpointConfigSortKey enum value - EndpointConfigSortKeyCreationTime = "CreationTime" -) - -const ( - // EndpointSortKeyName is a EndpointSortKey enum value - EndpointSortKeyName = "Name" - - // EndpointSortKeyCreationTime is a EndpointSortKey enum value - EndpointSortKeyCreationTime = "CreationTime" - - // EndpointSortKeyStatus is a EndpointSortKey enum value - EndpointSortKeyStatus = "Status" -) - -const ( - // EndpointStatusOutOfService is a EndpointStatus enum value - EndpointStatusOutOfService = "OutOfService" - - // EndpointStatusCreating is a EndpointStatus enum value - EndpointStatusCreating = "Creating" - - // EndpointStatusUpdating is a EndpointStatus enum value - EndpointStatusUpdating = "Updating" - - // EndpointStatusSystemUpdating is a EndpointStatus enum value - EndpointStatusSystemUpdating = "SystemUpdating" - - // EndpointStatusRollingBack is a EndpointStatus enum value - EndpointStatusRollingBack = "RollingBack" - - // EndpointStatusInService is a EndpointStatus enum value - EndpointStatusInService = "InService" - - // EndpointStatusDeleting is a EndpointStatus enum value - EndpointStatusDeleting = "Deleting" - - // EndpointStatusFailed is a EndpointStatus enum value - EndpointStatusFailed = "Failed" -) - -const ( - // FrameworkTensorflow is a Framework enum value - FrameworkTensorflow = "TENSORFLOW" - - // FrameworkMxnet is a Framework enum value - FrameworkMxnet = "MXNET" - - // FrameworkOnnx is a Framework enum value - FrameworkOnnx = "ONNX" - - // FrameworkPytorch is a Framework enum value - FrameworkPytorch = "PYTORCH" - - // FrameworkXgboost is a Framework enum value - FrameworkXgboost = "XGBOOST" -) - -const ( - // HyperParameterTuningJobObjectiveTypeMaximize is a HyperParameterTuningJobObjectiveType enum value - HyperParameterTuningJobObjectiveTypeMaximize = "Maximize" - - // HyperParameterTuningJobObjectiveTypeMinimize is a HyperParameterTuningJobObjectiveType enum value - HyperParameterTuningJobObjectiveTypeMinimize = "Minimize" -) - -const ( - // HyperParameterTuningJobSortByOptionsName is a HyperParameterTuningJobSortByOptions enum value - HyperParameterTuningJobSortByOptionsName = "Name" - - // HyperParameterTuningJobSortByOptionsStatus is a HyperParameterTuningJobSortByOptions enum value - HyperParameterTuningJobSortByOptionsStatus = "Status" - - // HyperParameterTuningJobSortByOptionsCreationTime is a HyperParameterTuningJobSortByOptions enum value - HyperParameterTuningJobSortByOptionsCreationTime = "CreationTime" -) - -const ( - // HyperParameterTuningJobStatusCompleted is a HyperParameterTuningJobStatus enum value - HyperParameterTuningJobStatusCompleted = "Completed" - - // HyperParameterTuningJobStatusInProgress is a HyperParameterTuningJobStatus enum value - HyperParameterTuningJobStatusInProgress = "InProgress" - - // HyperParameterTuningJobStatusFailed is a HyperParameterTuningJobStatus enum value - HyperParameterTuningJobStatusFailed = "Failed" - - // HyperParameterTuningJobStatusStopped is a HyperParameterTuningJobStatus enum value - HyperParameterTuningJobStatusStopped = "Stopped" - - // HyperParameterTuningJobStatusStopping is a HyperParameterTuningJobStatus enum value - HyperParameterTuningJobStatusStopping = "Stopping" -) - -// The strategy hyperparameter tuning uses to find the best combination of hyperparameters -// for your model. Currently, the only supported value is Bayesian. -const ( - // HyperParameterTuningJobStrategyTypeBayesian is a HyperParameterTuningJobStrategyType enum value - HyperParameterTuningJobStrategyTypeBayesian = "Bayesian" -) - -const ( - // HyperParameterTuningJobWarmStartTypeIdenticalDataAndAlgorithm is a HyperParameterTuningJobWarmStartType enum value - HyperParameterTuningJobWarmStartTypeIdenticalDataAndAlgorithm = "IdenticalDataAndAlgorithm" - - // HyperParameterTuningJobWarmStartTypeTransferLearning is a HyperParameterTuningJobWarmStartType enum value - HyperParameterTuningJobWarmStartTypeTransferLearning = "TransferLearning" -) - -const ( - // InstanceTypeMlT2Medium is a InstanceType enum value - InstanceTypeMlT2Medium = "ml.t2.medium" - - // InstanceTypeMlT2Large is a InstanceType enum value - InstanceTypeMlT2Large = "ml.t2.large" - - // InstanceTypeMlT2Xlarge is a InstanceType enum value - InstanceTypeMlT2Xlarge = "ml.t2.xlarge" - - // InstanceTypeMlT22xlarge is a InstanceType enum value - InstanceTypeMlT22xlarge = "ml.t2.2xlarge" - - // InstanceTypeMlT3Medium is a InstanceType enum value - InstanceTypeMlT3Medium = "ml.t3.medium" - - // InstanceTypeMlT3Large is a InstanceType enum value - InstanceTypeMlT3Large = "ml.t3.large" - - // InstanceTypeMlT3Xlarge is a InstanceType enum value - InstanceTypeMlT3Xlarge = "ml.t3.xlarge" - - // InstanceTypeMlT32xlarge is a InstanceType enum value - InstanceTypeMlT32xlarge = "ml.t3.2xlarge" - - // InstanceTypeMlM4Xlarge is a InstanceType enum value - InstanceTypeMlM4Xlarge = "ml.m4.xlarge" - - // InstanceTypeMlM42xlarge is a InstanceType enum value - InstanceTypeMlM42xlarge = "ml.m4.2xlarge" - - // InstanceTypeMlM44xlarge is a InstanceType enum value - InstanceTypeMlM44xlarge = "ml.m4.4xlarge" - - // InstanceTypeMlM410xlarge is a InstanceType enum value - InstanceTypeMlM410xlarge = "ml.m4.10xlarge" - - // InstanceTypeMlM416xlarge is a InstanceType enum value - InstanceTypeMlM416xlarge = "ml.m4.16xlarge" - - // InstanceTypeMlM5Xlarge is a InstanceType enum value - InstanceTypeMlM5Xlarge = "ml.m5.xlarge" - - // InstanceTypeMlM52xlarge is a InstanceType enum value - InstanceTypeMlM52xlarge = "ml.m5.2xlarge" - - // InstanceTypeMlM54xlarge is a InstanceType enum value - InstanceTypeMlM54xlarge = "ml.m5.4xlarge" - - // InstanceTypeMlM512xlarge is a InstanceType enum value - InstanceTypeMlM512xlarge = "ml.m5.12xlarge" - - // InstanceTypeMlM524xlarge is a InstanceType enum value - InstanceTypeMlM524xlarge = "ml.m5.24xlarge" - - // InstanceTypeMlC4Xlarge is a InstanceType enum value - InstanceTypeMlC4Xlarge = "ml.c4.xlarge" - - // InstanceTypeMlC42xlarge is a InstanceType enum value - InstanceTypeMlC42xlarge = "ml.c4.2xlarge" - - // InstanceTypeMlC44xlarge is a InstanceType enum value - InstanceTypeMlC44xlarge = "ml.c4.4xlarge" - - // InstanceTypeMlC48xlarge is a InstanceType enum value - InstanceTypeMlC48xlarge = "ml.c4.8xlarge" - - // InstanceTypeMlC5Xlarge is a InstanceType enum value - InstanceTypeMlC5Xlarge = "ml.c5.xlarge" - - // InstanceTypeMlC52xlarge is a InstanceType enum value - InstanceTypeMlC52xlarge = "ml.c5.2xlarge" - - // InstanceTypeMlC54xlarge is a InstanceType enum value - InstanceTypeMlC54xlarge = "ml.c5.4xlarge" - - // InstanceTypeMlC59xlarge is a InstanceType enum value - InstanceTypeMlC59xlarge = "ml.c5.9xlarge" - - // InstanceTypeMlC518xlarge is a InstanceType enum value - InstanceTypeMlC518xlarge = "ml.c5.18xlarge" - - // InstanceTypeMlC5dXlarge is a InstanceType enum value - InstanceTypeMlC5dXlarge = "ml.c5d.xlarge" - - // InstanceTypeMlC5d2xlarge is a InstanceType enum value - InstanceTypeMlC5d2xlarge = "ml.c5d.2xlarge" - - // InstanceTypeMlC5d4xlarge is a InstanceType enum value - InstanceTypeMlC5d4xlarge = "ml.c5d.4xlarge" - - // InstanceTypeMlC5d9xlarge is a InstanceType enum value - InstanceTypeMlC5d9xlarge = "ml.c5d.9xlarge" - - // InstanceTypeMlC5d18xlarge is a InstanceType enum value - InstanceTypeMlC5d18xlarge = "ml.c5d.18xlarge" - - // InstanceTypeMlP2Xlarge is a InstanceType enum value - InstanceTypeMlP2Xlarge = "ml.p2.xlarge" - - // InstanceTypeMlP28xlarge is a InstanceType enum value - InstanceTypeMlP28xlarge = "ml.p2.8xlarge" - - // InstanceTypeMlP216xlarge is a InstanceType enum value - InstanceTypeMlP216xlarge = "ml.p2.16xlarge" - - // InstanceTypeMlP32xlarge is a InstanceType enum value - InstanceTypeMlP32xlarge = "ml.p3.2xlarge" - - // InstanceTypeMlP38xlarge is a InstanceType enum value - InstanceTypeMlP38xlarge = "ml.p3.8xlarge" - - // InstanceTypeMlP316xlarge is a InstanceType enum value - InstanceTypeMlP316xlarge = "ml.p3.16xlarge" -) - -const ( - // LabelingJobStatusInProgress is a LabelingJobStatus enum value - LabelingJobStatusInProgress = "InProgress" - - // LabelingJobStatusCompleted is a LabelingJobStatus enum value - LabelingJobStatusCompleted = "Completed" - - // LabelingJobStatusFailed is a LabelingJobStatus enum value - LabelingJobStatusFailed = "Failed" - - // LabelingJobStatusStopping is a LabelingJobStatus enum value - LabelingJobStatusStopping = "Stopping" - - // LabelingJobStatusStopped is a LabelingJobStatus enum value - LabelingJobStatusStopped = "Stopped" -) - -const ( - // ListCompilationJobsSortByName is a ListCompilationJobsSortBy enum value - ListCompilationJobsSortByName = "Name" - - // ListCompilationJobsSortByCreationTime is a ListCompilationJobsSortBy enum value - ListCompilationJobsSortByCreationTime = "CreationTime" - - // ListCompilationJobsSortByStatus is a ListCompilationJobsSortBy enum value - ListCompilationJobsSortByStatus = "Status" -) - -const ( - // ListLabelingJobsForWorkteamSortByOptionsCreationTime is a ListLabelingJobsForWorkteamSortByOptions enum value - ListLabelingJobsForWorkteamSortByOptionsCreationTime = "CreationTime" -) - -const ( - // ListWorkteamsSortByOptionsName is a ListWorkteamsSortByOptions enum value - ListWorkteamsSortByOptionsName = "Name" - - // ListWorkteamsSortByOptionsCreateDate is a ListWorkteamsSortByOptions enum value - ListWorkteamsSortByOptionsCreateDate = "CreateDate" -) - -const ( - // ModelPackageSortByName is a ModelPackageSortBy enum value - ModelPackageSortByName = "Name" - - // ModelPackageSortByCreationTime is a ModelPackageSortBy enum value - ModelPackageSortByCreationTime = "CreationTime" -) - -const ( - // ModelPackageStatusPending is a ModelPackageStatus enum value - ModelPackageStatusPending = "Pending" - - // ModelPackageStatusInProgress is a ModelPackageStatus enum value - ModelPackageStatusInProgress = "InProgress" - - // ModelPackageStatusCompleted is a ModelPackageStatus enum value - ModelPackageStatusCompleted = "Completed" - - // ModelPackageStatusFailed is a ModelPackageStatus enum value - ModelPackageStatusFailed = "Failed" - - // ModelPackageStatusDeleting is a ModelPackageStatus enum value - ModelPackageStatusDeleting = "Deleting" -) - -const ( - // ModelSortKeyName is a ModelSortKey enum value - ModelSortKeyName = "Name" - - // ModelSortKeyCreationTime is a ModelSortKey enum value - ModelSortKeyCreationTime = "CreationTime" -) - -const ( - // NotebookInstanceAcceleratorTypeMlEia1Medium is a NotebookInstanceAcceleratorType enum value - NotebookInstanceAcceleratorTypeMlEia1Medium = "ml.eia1.medium" - - // NotebookInstanceAcceleratorTypeMlEia1Large is a NotebookInstanceAcceleratorType enum value - NotebookInstanceAcceleratorTypeMlEia1Large = "ml.eia1.large" - - // NotebookInstanceAcceleratorTypeMlEia1Xlarge is a NotebookInstanceAcceleratorType enum value - NotebookInstanceAcceleratorTypeMlEia1Xlarge = "ml.eia1.xlarge" -) - -const ( - // NotebookInstanceLifecycleConfigSortKeyName is a NotebookInstanceLifecycleConfigSortKey enum value - NotebookInstanceLifecycleConfigSortKeyName = "Name" - - // NotebookInstanceLifecycleConfigSortKeyCreationTime is a NotebookInstanceLifecycleConfigSortKey enum value - NotebookInstanceLifecycleConfigSortKeyCreationTime = "CreationTime" - - // NotebookInstanceLifecycleConfigSortKeyLastModifiedTime is a NotebookInstanceLifecycleConfigSortKey enum value - NotebookInstanceLifecycleConfigSortKeyLastModifiedTime = "LastModifiedTime" -) - -const ( - // NotebookInstanceLifecycleConfigSortOrderAscending is a NotebookInstanceLifecycleConfigSortOrder enum value - NotebookInstanceLifecycleConfigSortOrderAscending = "Ascending" - - // NotebookInstanceLifecycleConfigSortOrderDescending is a NotebookInstanceLifecycleConfigSortOrder enum value - NotebookInstanceLifecycleConfigSortOrderDescending = "Descending" -) - -const ( - // NotebookInstanceSortKeyName is a NotebookInstanceSortKey enum value - NotebookInstanceSortKeyName = "Name" - - // NotebookInstanceSortKeyCreationTime is a NotebookInstanceSortKey enum value - NotebookInstanceSortKeyCreationTime = "CreationTime" - - // NotebookInstanceSortKeyStatus is a NotebookInstanceSortKey enum value - NotebookInstanceSortKeyStatus = "Status" -) - -const ( - // NotebookInstanceSortOrderAscending is a NotebookInstanceSortOrder enum value - NotebookInstanceSortOrderAscending = "Ascending" - - // NotebookInstanceSortOrderDescending is a NotebookInstanceSortOrder enum value - NotebookInstanceSortOrderDescending = "Descending" -) - -const ( - // NotebookInstanceStatusPending is a NotebookInstanceStatus enum value - NotebookInstanceStatusPending = "Pending" - - // NotebookInstanceStatusInService is a NotebookInstanceStatus enum value - NotebookInstanceStatusInService = "InService" - - // NotebookInstanceStatusStopping is a NotebookInstanceStatus enum value - NotebookInstanceStatusStopping = "Stopping" - - // NotebookInstanceStatusStopped is a NotebookInstanceStatus enum value - NotebookInstanceStatusStopped = "Stopped" - - // NotebookInstanceStatusFailed is a NotebookInstanceStatus enum value - NotebookInstanceStatusFailed = "Failed" - - // NotebookInstanceStatusDeleting is a NotebookInstanceStatus enum value - NotebookInstanceStatusDeleting = "Deleting" - - // NotebookInstanceStatusUpdating is a NotebookInstanceStatus enum value - NotebookInstanceStatusUpdating = "Updating" -) - -const ( - // ObjectiveStatusSucceeded is a ObjectiveStatus enum value - ObjectiveStatusSucceeded = "Succeeded" - - // ObjectiveStatusPending is a ObjectiveStatus enum value - ObjectiveStatusPending = "Pending" - - // ObjectiveStatusFailed is a ObjectiveStatus enum value - ObjectiveStatusFailed = "Failed" -) - -const ( - // OperatorEquals is a Operator enum value - OperatorEquals = "Equals" - - // OperatorNotEquals is a Operator enum value - OperatorNotEquals = "NotEquals" - - // OperatorGreaterThan is a Operator enum value - OperatorGreaterThan = "GreaterThan" - - // OperatorGreaterThanOrEqualTo is a Operator enum value - OperatorGreaterThanOrEqualTo = "GreaterThanOrEqualTo" - - // OperatorLessThan is a Operator enum value - OperatorLessThan = "LessThan" - - // OperatorLessThanOrEqualTo is a Operator enum value - OperatorLessThanOrEqualTo = "LessThanOrEqualTo" - - // OperatorContains is a Operator enum value - OperatorContains = "Contains" -) - -const ( - // OrderKeyAscending is a OrderKey enum value - OrderKeyAscending = "Ascending" - - // OrderKeyDescending is a OrderKey enum value - OrderKeyDescending = "Descending" -) - -const ( - // ParameterTypeInteger is a ParameterType enum value - ParameterTypeInteger = "Integer" - - // ParameterTypeContinuous is a ParameterType enum value - ParameterTypeContinuous = "Continuous" - - // ParameterTypeCategorical is a ParameterType enum value - ParameterTypeCategorical = "Categorical" - - // ParameterTypeFreeText is a ParameterType enum value - ParameterTypeFreeText = "FreeText" -) - -const ( - // ProductionVariantAcceleratorTypeMlEia1Medium is a ProductionVariantAcceleratorType enum value - ProductionVariantAcceleratorTypeMlEia1Medium = "ml.eia1.medium" - - // ProductionVariantAcceleratorTypeMlEia1Large is a ProductionVariantAcceleratorType enum value - ProductionVariantAcceleratorTypeMlEia1Large = "ml.eia1.large" - - // ProductionVariantAcceleratorTypeMlEia1Xlarge is a ProductionVariantAcceleratorType enum value - ProductionVariantAcceleratorTypeMlEia1Xlarge = "ml.eia1.xlarge" -) - -const ( - // ProductionVariantInstanceTypeMlT2Medium is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlT2Medium = "ml.t2.medium" - - // ProductionVariantInstanceTypeMlT2Large is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlT2Large = "ml.t2.large" - - // ProductionVariantInstanceTypeMlT2Xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlT2Xlarge = "ml.t2.xlarge" - - // ProductionVariantInstanceTypeMlT22xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlT22xlarge = "ml.t2.2xlarge" - - // ProductionVariantInstanceTypeMlM4Xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlM4Xlarge = "ml.m4.xlarge" - - // ProductionVariantInstanceTypeMlM42xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlM42xlarge = "ml.m4.2xlarge" - - // ProductionVariantInstanceTypeMlM44xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlM44xlarge = "ml.m4.4xlarge" - - // ProductionVariantInstanceTypeMlM410xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlM410xlarge = "ml.m4.10xlarge" - - // ProductionVariantInstanceTypeMlM416xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlM416xlarge = "ml.m4.16xlarge" - - // ProductionVariantInstanceTypeMlM5Large is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlM5Large = "ml.m5.large" - - // ProductionVariantInstanceTypeMlM5Xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlM5Xlarge = "ml.m5.xlarge" - - // ProductionVariantInstanceTypeMlM52xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlM52xlarge = "ml.m5.2xlarge" - - // ProductionVariantInstanceTypeMlM54xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlM54xlarge = "ml.m5.4xlarge" - - // ProductionVariantInstanceTypeMlM512xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlM512xlarge = "ml.m5.12xlarge" - - // ProductionVariantInstanceTypeMlM524xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlM524xlarge = "ml.m5.24xlarge" - - // ProductionVariantInstanceTypeMlC4Large is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlC4Large = "ml.c4.large" - - // ProductionVariantInstanceTypeMlC4Xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlC4Xlarge = "ml.c4.xlarge" - - // ProductionVariantInstanceTypeMlC42xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlC42xlarge = "ml.c4.2xlarge" - - // ProductionVariantInstanceTypeMlC44xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlC44xlarge = "ml.c4.4xlarge" - - // ProductionVariantInstanceTypeMlC48xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlC48xlarge = "ml.c4.8xlarge" - - // ProductionVariantInstanceTypeMlP2Xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlP2Xlarge = "ml.p2.xlarge" - - // ProductionVariantInstanceTypeMlP28xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlP28xlarge = "ml.p2.8xlarge" - - // ProductionVariantInstanceTypeMlP216xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlP216xlarge = "ml.p2.16xlarge" - - // ProductionVariantInstanceTypeMlP32xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlP32xlarge = "ml.p3.2xlarge" - - // ProductionVariantInstanceTypeMlP38xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlP38xlarge = "ml.p3.8xlarge" - - // ProductionVariantInstanceTypeMlP316xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlP316xlarge = "ml.p3.16xlarge" - - // ProductionVariantInstanceTypeMlC5Large is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlC5Large = "ml.c5.large" - - // ProductionVariantInstanceTypeMlC5Xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlC5Xlarge = "ml.c5.xlarge" - - // ProductionVariantInstanceTypeMlC52xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlC52xlarge = "ml.c5.2xlarge" - - // ProductionVariantInstanceTypeMlC54xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlC54xlarge = "ml.c5.4xlarge" - - // ProductionVariantInstanceTypeMlC59xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlC59xlarge = "ml.c5.9xlarge" - - // ProductionVariantInstanceTypeMlC518xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlC518xlarge = "ml.c5.18xlarge" -) - -const ( - // RecordWrapperNone is a RecordWrapper enum value - RecordWrapperNone = "None" - - // RecordWrapperRecordIo is a RecordWrapper enum value - RecordWrapperRecordIo = "RecordIO" -) - -const ( - // ResourceTypeTrainingJob is a ResourceType enum value - ResourceTypeTrainingJob = "TrainingJob" -) - -const ( - // S3DataDistributionFullyReplicated is a S3DataDistribution enum value - S3DataDistributionFullyReplicated = "FullyReplicated" - - // S3DataDistributionShardedByS3key is a S3DataDistribution enum value - S3DataDistributionShardedByS3key = "ShardedByS3Key" -) - -const ( - // S3DataTypeManifestFile is a S3DataType enum value - S3DataTypeManifestFile = "ManifestFile" - - // S3DataTypeS3prefix is a S3DataType enum value - S3DataTypeS3prefix = "S3Prefix" - - // S3DataTypeAugmentedManifestFile is a S3DataType enum value - S3DataTypeAugmentedManifestFile = "AugmentedManifestFile" -) - -const ( - // SearchSortOrderAscending is a SearchSortOrder enum value - SearchSortOrderAscending = "Ascending" - - // SearchSortOrderDescending is a SearchSortOrder enum value - SearchSortOrderDescending = "Descending" -) - -const ( - // SecondaryStatusStarting is a SecondaryStatus enum value - SecondaryStatusStarting = "Starting" - - // SecondaryStatusLaunchingMlinstances is a SecondaryStatus enum value - SecondaryStatusLaunchingMlinstances = "LaunchingMLInstances" - - // SecondaryStatusPreparingTrainingStack is a SecondaryStatus enum value - SecondaryStatusPreparingTrainingStack = "PreparingTrainingStack" - - // SecondaryStatusDownloading is a SecondaryStatus enum value - SecondaryStatusDownloading = "Downloading" - - // SecondaryStatusDownloadingTrainingImage is a SecondaryStatus enum value - SecondaryStatusDownloadingTrainingImage = "DownloadingTrainingImage" - - // SecondaryStatusTraining is a SecondaryStatus enum value - SecondaryStatusTraining = "Training" - - // SecondaryStatusUploading is a SecondaryStatus enum value - SecondaryStatusUploading = "Uploading" - - // SecondaryStatusStopping is a SecondaryStatus enum value - SecondaryStatusStopping = "Stopping" - - // SecondaryStatusStopped is a SecondaryStatus enum value - SecondaryStatusStopped = "Stopped" - - // SecondaryStatusMaxRuntimeExceeded is a SecondaryStatus enum value - SecondaryStatusMaxRuntimeExceeded = "MaxRuntimeExceeded" - - // SecondaryStatusCompleted is a SecondaryStatus enum value - SecondaryStatusCompleted = "Completed" - - // SecondaryStatusFailed is a SecondaryStatus enum value - SecondaryStatusFailed = "Failed" -) - -const ( - // SortByName is a SortBy enum value - SortByName = "Name" - - // SortByCreationTime is a SortBy enum value - SortByCreationTime = "CreationTime" - - // SortByStatus is a SortBy enum value - SortByStatus = "Status" -) - -const ( - // SortOrderAscending is a SortOrder enum value - SortOrderAscending = "Ascending" - - // SortOrderDescending is a SortOrder enum value - SortOrderDescending = "Descending" -) - -const ( - // SplitTypeNone is a SplitType enum value - SplitTypeNone = "None" - - // SplitTypeLine is a SplitType enum value - SplitTypeLine = "Line" - - // SplitTypeRecordIo is a SplitType enum value - SplitTypeRecordIo = "RecordIO" - - // SplitTypeTfrecord is a SplitType enum value - SplitTypeTfrecord = "TFRecord" -) - -const ( - // TargetDeviceMlM4 is a TargetDevice enum value - TargetDeviceMlM4 = "ml_m4" - - // TargetDeviceMlM5 is a TargetDevice enum value - TargetDeviceMlM5 = "ml_m5" - - // TargetDeviceMlC4 is a TargetDevice enum value - TargetDeviceMlC4 = "ml_c4" - - // TargetDeviceMlC5 is a TargetDevice enum value - TargetDeviceMlC5 = "ml_c5" - - // TargetDeviceMlP2 is a TargetDevice enum value - TargetDeviceMlP2 = "ml_p2" - - // TargetDeviceMlP3 is a TargetDevice enum value - TargetDeviceMlP3 = "ml_p3" - - // TargetDeviceJetsonTx1 is a TargetDevice enum value - TargetDeviceJetsonTx1 = "jetson_tx1" - - // TargetDeviceJetsonTx2 is a TargetDevice enum value - TargetDeviceJetsonTx2 = "jetson_tx2" - - // TargetDeviceRasp3b is a TargetDevice enum value - TargetDeviceRasp3b = "rasp3b" - - // TargetDeviceDeeplens is a TargetDevice enum value - TargetDeviceDeeplens = "deeplens" -) - -const ( - // TrainingInputModePipe is a TrainingInputMode enum value - TrainingInputModePipe = "Pipe" - - // TrainingInputModeFile is a TrainingInputMode enum value - TrainingInputModeFile = "File" -) - -const ( - // TrainingInstanceTypeMlM4Xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlM4Xlarge = "ml.m4.xlarge" - - // TrainingInstanceTypeMlM42xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlM42xlarge = "ml.m4.2xlarge" - - // TrainingInstanceTypeMlM44xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlM44xlarge = "ml.m4.4xlarge" - - // TrainingInstanceTypeMlM410xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlM410xlarge = "ml.m4.10xlarge" - - // TrainingInstanceTypeMlM416xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlM416xlarge = "ml.m4.16xlarge" - - // TrainingInstanceTypeMlM5Large is a TrainingInstanceType enum value - TrainingInstanceTypeMlM5Large = "ml.m5.large" - - // TrainingInstanceTypeMlM5Xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlM5Xlarge = "ml.m5.xlarge" - - // TrainingInstanceTypeMlM52xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlM52xlarge = "ml.m5.2xlarge" - - // TrainingInstanceTypeMlM54xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlM54xlarge = "ml.m5.4xlarge" - - // TrainingInstanceTypeMlM512xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlM512xlarge = "ml.m5.12xlarge" - - // TrainingInstanceTypeMlM524xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlM524xlarge = "ml.m5.24xlarge" - - // TrainingInstanceTypeMlC4Xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlC4Xlarge = "ml.c4.xlarge" - - // TrainingInstanceTypeMlC42xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlC42xlarge = "ml.c4.2xlarge" - - // TrainingInstanceTypeMlC44xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlC44xlarge = "ml.c4.4xlarge" - - // TrainingInstanceTypeMlC48xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlC48xlarge = "ml.c4.8xlarge" - - // TrainingInstanceTypeMlP2Xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlP2Xlarge = "ml.p2.xlarge" - - // TrainingInstanceTypeMlP28xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlP28xlarge = "ml.p2.8xlarge" - - // TrainingInstanceTypeMlP216xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlP216xlarge = "ml.p2.16xlarge" - - // TrainingInstanceTypeMlP32xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlP32xlarge = "ml.p3.2xlarge" - - // TrainingInstanceTypeMlP38xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlP38xlarge = "ml.p3.8xlarge" - - // TrainingInstanceTypeMlP316xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlP316xlarge = "ml.p3.16xlarge" - - // TrainingInstanceTypeMlC5Xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlC5Xlarge = "ml.c5.xlarge" - - // TrainingInstanceTypeMlC52xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlC52xlarge = "ml.c5.2xlarge" - - // TrainingInstanceTypeMlC54xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlC54xlarge = "ml.c5.4xlarge" - - // TrainingInstanceTypeMlC59xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlC59xlarge = "ml.c5.9xlarge" - - // TrainingInstanceTypeMlC518xlarge is a TrainingInstanceType enum value - TrainingInstanceTypeMlC518xlarge = "ml.c5.18xlarge" -) - -const ( - // TrainingJobEarlyStoppingTypeOff is a TrainingJobEarlyStoppingType enum value - TrainingJobEarlyStoppingTypeOff = "Off" - - // TrainingJobEarlyStoppingTypeAuto is a TrainingJobEarlyStoppingType enum value - TrainingJobEarlyStoppingTypeAuto = "Auto" -) - -const ( - // TrainingJobSortByOptionsName is a TrainingJobSortByOptions enum value - TrainingJobSortByOptionsName = "Name" - - // TrainingJobSortByOptionsCreationTime is a TrainingJobSortByOptions enum value - TrainingJobSortByOptionsCreationTime = "CreationTime" - - // TrainingJobSortByOptionsStatus is a TrainingJobSortByOptions enum value - TrainingJobSortByOptionsStatus = "Status" - - // TrainingJobSortByOptionsFinalObjectiveMetricValue is a TrainingJobSortByOptions enum value - TrainingJobSortByOptionsFinalObjectiveMetricValue = "FinalObjectiveMetricValue" -) - -const ( - // TrainingJobStatusInProgress is a TrainingJobStatus enum value - TrainingJobStatusInProgress = "InProgress" - - // TrainingJobStatusCompleted is a TrainingJobStatus enum value - TrainingJobStatusCompleted = "Completed" - - // TrainingJobStatusFailed is a TrainingJobStatus enum value - TrainingJobStatusFailed = "Failed" - - // TrainingJobStatusStopping is a TrainingJobStatus enum value - TrainingJobStatusStopping = "Stopping" - - // TrainingJobStatusStopped is a TrainingJobStatus enum value - TrainingJobStatusStopped = "Stopped" -) - -const ( - // TransformInstanceTypeMlM4Xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlM4Xlarge = "ml.m4.xlarge" - - // TransformInstanceTypeMlM42xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlM42xlarge = "ml.m4.2xlarge" - - // TransformInstanceTypeMlM44xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlM44xlarge = "ml.m4.4xlarge" - - // TransformInstanceTypeMlM410xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlM410xlarge = "ml.m4.10xlarge" - - // TransformInstanceTypeMlM416xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlM416xlarge = "ml.m4.16xlarge" - - // TransformInstanceTypeMlC4Xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlC4Xlarge = "ml.c4.xlarge" - - // TransformInstanceTypeMlC42xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlC42xlarge = "ml.c4.2xlarge" - - // TransformInstanceTypeMlC44xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlC44xlarge = "ml.c4.4xlarge" - - // TransformInstanceTypeMlC48xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlC48xlarge = "ml.c4.8xlarge" - - // TransformInstanceTypeMlP2Xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlP2Xlarge = "ml.p2.xlarge" - - // TransformInstanceTypeMlP28xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlP28xlarge = "ml.p2.8xlarge" - - // TransformInstanceTypeMlP216xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlP216xlarge = "ml.p2.16xlarge" - - // TransformInstanceTypeMlP32xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlP32xlarge = "ml.p3.2xlarge" - - // TransformInstanceTypeMlP38xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlP38xlarge = "ml.p3.8xlarge" - - // TransformInstanceTypeMlP316xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlP316xlarge = "ml.p3.16xlarge" - - // TransformInstanceTypeMlC5Xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlC5Xlarge = "ml.c5.xlarge" - - // TransformInstanceTypeMlC52xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlC52xlarge = "ml.c5.2xlarge" - - // TransformInstanceTypeMlC54xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlC54xlarge = "ml.c5.4xlarge" - - // TransformInstanceTypeMlC59xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlC59xlarge = "ml.c5.9xlarge" - - // TransformInstanceTypeMlC518xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlC518xlarge = "ml.c5.18xlarge" - - // TransformInstanceTypeMlM5Large is a TransformInstanceType enum value - TransformInstanceTypeMlM5Large = "ml.m5.large" - - // TransformInstanceTypeMlM5Xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlM5Xlarge = "ml.m5.xlarge" - - // TransformInstanceTypeMlM52xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlM52xlarge = "ml.m5.2xlarge" - - // TransformInstanceTypeMlM54xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlM54xlarge = "ml.m5.4xlarge" - - // TransformInstanceTypeMlM512xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlM512xlarge = "ml.m5.12xlarge" - - // TransformInstanceTypeMlM524xlarge is a TransformInstanceType enum value - TransformInstanceTypeMlM524xlarge = "ml.m5.24xlarge" -) - -const ( - // TransformJobStatusInProgress is a TransformJobStatus enum value - TransformJobStatusInProgress = "InProgress" - - // TransformJobStatusCompleted is a TransformJobStatus enum value - TransformJobStatusCompleted = "Completed" - - // TransformJobStatusFailed is a TransformJobStatus enum value - TransformJobStatusFailed = "Failed" - - // TransformJobStatusStopping is a TransformJobStatus enum value - TransformJobStatusStopping = "Stopping" - - // TransformJobStatusStopped is a TransformJobStatus enum value - TransformJobStatusStopped = "Stopped" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/doc.go deleted file mode 100644 index d74f40297..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package sagemaker provides the client and types for making API -// requests to Amazon SageMaker Service. -// -// Definition of the public APIs exposed by SageMaker -// -// See https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24 for more information on this service. -// -// See sagemaker package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/sagemaker/ -// -// Using the Client -// -// To contact Amazon SageMaker Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon SageMaker Service client SageMaker for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/sagemaker/#New -package sagemaker diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/errors.go deleted file mode 100644 index d7fd2c457..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/errors.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package sagemaker - -const ( - - // ErrCodeResourceInUse for service response error code - // "ResourceInUse". - // - // Resource being accessed is in use. - ErrCodeResourceInUse = "ResourceInUse" - - // ErrCodeResourceLimitExceeded for service response error code - // "ResourceLimitExceeded". - // - // You have exceeded an Amazon SageMaker resource limit. For example, you might - // have too many training jobs created. - ErrCodeResourceLimitExceeded = "ResourceLimitExceeded" - - // ErrCodeResourceNotFound for service response error code - // "ResourceNotFound". - // - // Resource being access is not found. - ErrCodeResourceNotFound = "ResourceNotFound" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go deleted file mode 100644 index 7ae1df734..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package sagemaker - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// SageMaker provides the API operation methods for making requests to -// Amazon SageMaker Service. See this package's package overview docs -// for details on the service. -// -// SageMaker methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type SageMaker 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 = "sagemaker" // Name of service. - EndpointsID = "api.sagemaker" // ID to lookup a service endpoint with. - ServiceID = "SageMaker" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the SageMaker client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a SageMaker client from just a session. -// svc := sagemaker.New(mySession) -// -// // Create a SageMaker client with additional configuration -// svc := sagemaker.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *SageMaker { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "sagemaker" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *SageMaker { - svc := &SageMaker{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-07-24", - JSONVersion: "1.1", - TargetPrefix: "SageMaker", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a SageMaker operation and runs any -// custom request initialization. -func (c *SageMaker) 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/sagemaker/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/waiters.go deleted file mode 100644 index e4054f0ff..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/waiters.go +++ /dev/null @@ -1,392 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package sagemaker - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilEndpointDeleted uses the SageMaker API operation -// DescribeEndpoint to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *SageMaker) WaitUntilEndpointDeleted(input *DescribeEndpointInput) error { - return c.WaitUntilEndpointDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilEndpointDeletedWithContext is an extended version of WaitUntilEndpointDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) WaitUntilEndpointDeletedWithContext(ctx aws.Context, input *DescribeEndpointInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilEndpointDeleted", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ValidationException", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "EndpointStatus", - Expected: "Failed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeEndpointInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEndpointRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilEndpointInService uses the SageMaker API operation -// DescribeEndpoint to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *SageMaker) WaitUntilEndpointInService(input *DescribeEndpointInput) error { - return c.WaitUntilEndpointInServiceWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilEndpointInServiceWithContext is an extended version of WaitUntilEndpointInService. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) WaitUntilEndpointInServiceWithContext(ctx aws.Context, input *DescribeEndpointInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilEndpointInService", - MaxAttempts: 120, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "EndpointStatus", - Expected: "InService", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "EndpointStatus", - Expected: "Failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ValidationException", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeEndpointInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeEndpointRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilNotebookInstanceDeleted uses the SageMaker API operation -// DescribeNotebookInstance to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *SageMaker) WaitUntilNotebookInstanceDeleted(input *DescribeNotebookInstanceInput) error { - return c.WaitUntilNotebookInstanceDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilNotebookInstanceDeletedWithContext is an extended version of WaitUntilNotebookInstanceDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) WaitUntilNotebookInstanceDeletedWithContext(ctx aws.Context, input *DescribeNotebookInstanceInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilNotebookInstanceDeleted", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ValidationException", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus", - Expected: "Failed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeNotebookInstanceInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeNotebookInstanceRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilNotebookInstanceInService uses the SageMaker API operation -// DescribeNotebookInstance to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *SageMaker) WaitUntilNotebookInstanceInService(input *DescribeNotebookInstanceInput) error { - return c.WaitUntilNotebookInstanceInServiceWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilNotebookInstanceInServiceWithContext is an extended version of WaitUntilNotebookInstanceInService. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) WaitUntilNotebookInstanceInServiceWithContext(ctx aws.Context, input *DescribeNotebookInstanceInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilNotebookInstanceInService", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus", - Expected: "InService", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus", - Expected: "Failed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeNotebookInstanceInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeNotebookInstanceRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilNotebookInstanceStopped uses the SageMaker API operation -// DescribeNotebookInstance to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *SageMaker) WaitUntilNotebookInstanceStopped(input *DescribeNotebookInstanceInput) error { - return c.WaitUntilNotebookInstanceStoppedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilNotebookInstanceStoppedWithContext is an extended version of WaitUntilNotebookInstanceStopped. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) WaitUntilNotebookInstanceStoppedWithContext(ctx aws.Context, input *DescribeNotebookInstanceInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilNotebookInstanceStopped", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(30 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus", - Expected: "Stopped", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus", - Expected: "Failed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeNotebookInstanceInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeNotebookInstanceRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilTrainingJobCompletedOrStopped uses the SageMaker API operation -// DescribeTrainingJob to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *SageMaker) WaitUntilTrainingJobCompletedOrStopped(input *DescribeTrainingJobInput) error { - return c.WaitUntilTrainingJobCompletedOrStoppedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilTrainingJobCompletedOrStoppedWithContext is an extended version of WaitUntilTrainingJobCompletedOrStopped. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) WaitUntilTrainingJobCompletedOrStoppedWithContext(ctx aws.Context, input *DescribeTrainingJobInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilTrainingJobCompletedOrStopped", - MaxAttempts: 180, - Delay: request.ConstantWaiterDelay(120 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus", - Expected: "Completed", - }, - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus", - Expected: "Stopped", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus", - Expected: "Failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ValidationException", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeTrainingJobInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTrainingJobRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilTransformJobCompletedOrStopped uses the SageMaker API operation -// DescribeTransformJob to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *SageMaker) WaitUntilTransformJobCompletedOrStopped(input *DescribeTransformJobInput) error { - return c.WaitUntilTransformJobCompletedOrStoppedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilTransformJobCompletedOrStoppedWithContext is an extended version of WaitUntilTransformJobCompletedOrStopped. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SageMaker) WaitUntilTransformJobCompletedOrStoppedWithContext(ctx aws.Context, input *DescribeTransformJobInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilTransformJobCompletedOrStopped", - MaxAttempts: 60, - Delay: request.ConstantWaiterDelay(60 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "TransformJobStatus", - Expected: "Completed", - }, - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "TransformJobStatus", - Expected: "Stopped", - }, - { - State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "TransformJobStatus", - Expected: "Failed", - }, - { - State: request.FailureWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "ValidationException", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeTransformJobInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTransformJobRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go deleted file mode 100644 index 1019d6f65..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go +++ /dev/null @@ -1,5409 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package secretsmanager - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCancelRotateSecret = "CancelRotateSecret" - -// CancelRotateSecretRequest generates a "aws/request.Request" representing the -// client's request for the CancelRotateSecret operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelRotateSecret for more information on using the CancelRotateSecret -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelRotateSecretRequest method. -// req, resp := client.CancelRotateSecretRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CancelRotateSecret -func (c *SecretsManager) CancelRotateSecretRequest(input *CancelRotateSecretInput) (req *request.Request, output *CancelRotateSecretOutput) { - op := &request.Operation{ - Name: opCancelRotateSecret, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelRotateSecretInput{} - } - - output = &CancelRotateSecretOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelRotateSecret API operation for AWS Secrets Manager. -// -// Disables automatic scheduled rotation and cancels the rotation of a secret -// if one is currently in progress. -// -// To re-enable scheduled rotation, call RotateSecret with AutomaticallyRotateAfterDays -// set to a value greater than 0. This will immediately rotate your secret and -// then enable the automatic schedule. -// -// If you cancel a rotation that is in progress, it can leave the VersionStage -// labels in an unexpected state. Depending on what step of the rotation was -// in progress, you might need to remove the staging label AWSPENDING from the -// partially created version, specified by the VersionId response value. You -// should also evaluate the partially rotated new version to see if it should -// be deleted, which you can do by removing all staging labels from the new -// version's VersionStage field. -// -// To successfully start a rotation, the staging label AWSPENDING must be in -// one of the following states: -// -// * Not be attached to any version at all -// -// * Attached to the same version as the staging label AWSCURRENT -// -// If the staging label AWSPENDING is attached to a different version than the -// version with AWSCURRENT then the attempt to rotate fails. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:CancelRotateSecret -// -// Related operations -// -// * To configure rotation for a secret or to manually trigger a rotation, -// use RotateSecret. -// -// * To get the rotation configuration details for a secret, use DescribeSecret. -// -// * To list all of the currently available secrets, use ListSecrets. -// -// * To list all of the versions currently associated with a secret, use -// ListSecretVersionIds. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation CancelRotateSecret for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// You provided an invalid value for a parameter. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CancelRotateSecret -func (c *SecretsManager) CancelRotateSecret(input *CancelRotateSecretInput) (*CancelRotateSecretOutput, error) { - req, out := c.CancelRotateSecretRequest(input) - return out, req.Send() -} - -// CancelRotateSecretWithContext is the same as CancelRotateSecret with the addition of -// the ability to pass a context and additional request options. -// -// See CancelRotateSecret for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) CancelRotateSecretWithContext(ctx aws.Context, input *CancelRotateSecretInput, opts ...request.Option) (*CancelRotateSecretOutput, error) { - req, out := c.CancelRotateSecretRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSecret = "CreateSecret" - -// CreateSecretRequest generates a "aws/request.Request" representing the -// client's request for the CreateSecret operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSecret for more information on using the CreateSecret -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSecretRequest method. -// req, resp := client.CreateSecretRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CreateSecret -func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *request.Request, output *CreateSecretOutput) { - op := &request.Operation{ - Name: opCreateSecret, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSecretInput{} - } - - output = &CreateSecretOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSecret API operation for AWS Secrets Manager. -// -// Creates a new secret. A secret in Secrets Manager consists of both the protected -// secret data and the important information needed to manage the secret. -// -// Secrets Manager stores the encrypted secret data in one of a collection of -// "versions" associated with the secret. Each version contains a copy of the -// encrypted secret data. Each version is associated with one or more "staging -// labels" that identify where the version is in the rotation cycle. The SecretVersionsToStages -// field of the secret contains the mapping of staging labels to the active -// versions of the secret. Versions without a staging label are considered deprecated -// and are not included in the list. -// -// You provide the secret data to be encrypted by putting text in either the -// SecretString parameter or binary data in the SecretBinary parameter, but -// not both. If you include SecretString or SecretBinary then Secrets Manager -// also creates an initial secret version and automatically attaches the staging -// label AWSCURRENT to the new version. -// -// If you call an operation that needs to encrypt or decrypt the SecretString -// or SecretBinary for a secret in the same account as the calling user and -// that secret doesn't specify a AWS KMS encryption key, Secrets Manager uses -// the account's default AWS managed customer master key (CMK) with the alias -// aws/secretsmanager. If this key doesn't already exist in your account then -// Secrets Manager creates it for you automatically. All users and roles in -// the same AWS account automatically have access to use the default CMK. Note -// that if an Secrets Manager API call results in AWS having to create the account's -// AWS-managed CMK, it can result in a one-time significant delay in returning -// the result. -// -// If the secret is in a different AWS account from the credentials calling -// an API that requires encryption or decryption of the secret value then you -// must create and use a custom AWS KMS CMK because you can't access the default -// CMK for the account using credentials from a different AWS account. Store -// the ARN of the CMK in the secret when you create the secret or when you update -// it by including it in the KMSKeyId. If you call an API that must encrypt -// or decrypt SecretString or SecretBinary using credentials from a different -// account then the AWS KMS key policy must grant cross-account access to that -// other account's user or role for both the kms:GenerateDataKey and kms:Decrypt -// operations. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:CreateSecret -// -// * kms:GenerateDataKey - needed only if you use a customer-managed AWS -// KMS key to encrypt the secret. You do not need this permission to use -// the account's default AWS managed CMK for Secrets Manager. -// -// * kms:Decrypt - needed only if you use a customer-managed AWS KMS key -// to encrypt the secret. You do not need this permission to use the account's -// default AWS managed CMK for Secrets Manager. -// -// * secretsmanager:TagResource - needed only if you include the Tags parameter. -// -// -// Related operations -// -// * To delete a secret, use DeleteSecret. -// -// * To modify an existing secret, use UpdateSecret. -// -// * To create a new version of a secret, use PutSecretValue. -// -// * To retrieve the encrypted secure string and secure binary values, use -// GetSecretValue. -// -// * To retrieve all other details for a secret, use DescribeSecret. This -// does not include the encrypted secure string and secure binary values. -// -// * To retrieve the list of secret versions associated with the current -// secret, use DescribeSecret and examine the SecretVersionsToStages response -// value. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation CreateSecret for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// You provided an invalid value for a parameter. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request failed because it would exceed one of the Secrets Manager internal -// limits. -// -// * ErrCodeEncryptionFailure "EncryptionFailure" -// Secrets Manager can't encrypt the protected secret text using the provided -// KMS key. Check that the customer master key (CMK) is available, enabled, -// and not in an invalid state. For more information, see How Key State Affects -// Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). -// -// * ErrCodeResourceExistsException "ResourceExistsException" -// A resource with the ID you requested already exists. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" -// The policy document that you provided isn't valid. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// * ErrCodePreconditionNotMetException "PreconditionNotMetException" -// The request failed because you did not complete all the prerequisite steps. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CreateSecret -func (c *SecretsManager) CreateSecret(input *CreateSecretInput) (*CreateSecretOutput, error) { - req, out := c.CreateSecretRequest(input) - return out, req.Send() -} - -// CreateSecretWithContext is the same as CreateSecret with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSecret for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) CreateSecretWithContext(ctx aws.Context, input *CreateSecretInput, opts ...request.Option) (*CreateSecretOutput, error) { - req, out := c.CreateSecretRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteResourcePolicy = "DeleteResourcePolicy" - -// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteResourcePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteResourcePolicy for more information on using the DeleteResourcePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteResourcePolicyRequest method. -// req, resp := client.DeleteResourcePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteResourcePolicy -func (c *SecretsManager) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { - op := &request.Operation{ - Name: opDeleteResourcePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteResourcePolicyInput{} - } - - output = &DeleteResourcePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteResourcePolicy API operation for AWS Secrets Manager. -// -// Deletes the resource-based permission policy that's attached to the secret. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:DeleteResourcePolicy -// -// Related operations -// -// * To attach a resource policy to a secret, use PutResourcePolicy. -// -// * To retrieve the current resource-based policy that's attached to a secret, -// use GetResourcePolicy. -// -// * To list all of the currently available secrets, use ListSecrets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation DeleteResourcePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteResourcePolicy -func (c *SecretsManager) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { - req, out := c.DeleteResourcePolicyRequest(input) - return out, req.Send() -} - -// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteResourcePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { - req, out := c.DeleteResourcePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSecret = "DeleteSecret" - -// DeleteSecretRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSecret operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSecret for more information on using the DeleteSecret -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSecretRequest method. -// req, resp := client.DeleteSecretRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteSecret -func (c *SecretsManager) DeleteSecretRequest(input *DeleteSecretInput) (req *request.Request, output *DeleteSecretOutput) { - op := &request.Operation{ - Name: opDeleteSecret, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSecretInput{} - } - - output = &DeleteSecretOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteSecret API operation for AWS Secrets Manager. -// -// Deletes an entire secret and all of its versions. You can optionally include -// a recovery window during which you can restore the secret. If you don't specify -// a recovery window value, the operation defaults to 30 days. Secrets Manager -// attaches a DeletionDate stamp to the secret that specifies the end of the -// recovery window. At the end of the recovery window, Secrets Manager deletes -// the secret permanently. -// -// At any time before recovery window ends, you can use RestoreSecret to remove -// the DeletionDate and cancel the deletion of the secret. -// -// You cannot access the encrypted secret information in any secret that is -// scheduled for deletion. If you need to access that information, you must -// cancel the deletion with RestoreSecret and then retrieve the information. -// -// There is no explicit operation to delete a version of a secret. Instead, -// remove all staging labels from the VersionStage field of a version. That -// marks the version as deprecated and allows Secrets Manager to delete it as -// needed. Versions that do not have any staging labels do not show up in ListSecretVersionIds -// unless you specify IncludeDeprecated. -// -// The permanent secret deletion at the end of the waiting period is performed -// as a background task with low priority. There is no guarantee of a specific -// time after the recovery window for the actual delete operation to occur. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:DeleteSecret -// -// Related operations -// -// * To create a secret, use CreateSecret. -// -// * To cancel deletion of a version of a secret before the recovery window -// has expired, use RestoreSecret. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation DeleteSecret for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// You provided an invalid value for a parameter. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteSecret -func (c *SecretsManager) DeleteSecret(input *DeleteSecretInput) (*DeleteSecretOutput, error) { - req, out := c.DeleteSecretRequest(input) - return out, req.Send() -} - -// DeleteSecretWithContext is the same as DeleteSecret with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSecret for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) DeleteSecretWithContext(ctx aws.Context, input *DeleteSecretInput, opts ...request.Option) (*DeleteSecretOutput, error) { - req, out := c.DeleteSecretRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSecret = "DescribeSecret" - -// DescribeSecretRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSecret operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSecret for more information on using the DescribeSecret -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSecretRequest method. -// req, resp := client.DescribeSecretRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecret -func (c *SecretsManager) DescribeSecretRequest(input *DescribeSecretInput) (req *request.Request, output *DescribeSecretOutput) { - op := &request.Operation{ - Name: opDescribeSecret, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSecretInput{} - } - - output = &DescribeSecretOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSecret API operation for AWS Secrets Manager. -// -// Retrieves the details of a secret. It does not include the encrypted fields. -// Only those fields that are populated with a value are returned in the response. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:DescribeSecret -// -// Related operations -// -// * To create a secret, use CreateSecret. -// -// * To modify a secret, use UpdateSecret. -// -// * To retrieve the encrypted secret information in a version of the secret, -// use GetSecretValue. -// -// * To list all of the secrets in the AWS account, use ListSecrets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation DescribeSecret for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecret -func (c *SecretsManager) DescribeSecret(input *DescribeSecretInput) (*DescribeSecretOutput, error) { - req, out := c.DescribeSecretRequest(input) - return out, req.Send() -} - -// DescribeSecretWithContext is the same as DescribeSecret with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSecret for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) DescribeSecretWithContext(ctx aws.Context, input *DescribeSecretInput, opts ...request.Option) (*DescribeSecretOutput, error) { - req, out := c.DescribeSecretRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRandomPassword = "GetRandomPassword" - -// GetRandomPasswordRequest generates a "aws/request.Request" representing the -// client's request for the GetRandomPassword operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRandomPassword for more information on using the GetRandomPassword -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRandomPasswordRequest method. -// req, resp := client.GetRandomPasswordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetRandomPassword -func (c *SecretsManager) GetRandomPasswordRequest(input *GetRandomPasswordInput) (req *request.Request, output *GetRandomPasswordOutput) { - op := &request.Operation{ - Name: opGetRandomPassword, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRandomPasswordInput{} - } - - output = &GetRandomPasswordOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRandomPassword API operation for AWS Secrets Manager. -// -// Generates a random password of the specified complexity. This operation is -// intended for use in the Lambda rotation function. Per best practice, we recommend -// that you specify the maximum length and include every character type that -// the system you are generating a password for can support. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:GetRandomPassword -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation GetRandomPassword for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// You provided an invalid value for a parameter. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetRandomPassword -func (c *SecretsManager) GetRandomPassword(input *GetRandomPasswordInput) (*GetRandomPasswordOutput, error) { - req, out := c.GetRandomPasswordRequest(input) - return out, req.Send() -} - -// GetRandomPasswordWithContext is the same as GetRandomPassword with the addition of -// the ability to pass a context and additional request options. -// -// See GetRandomPassword for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) GetRandomPasswordWithContext(ctx aws.Context, input *GetRandomPasswordInput, opts ...request.Option) (*GetRandomPasswordOutput, error) { - req, out := c.GetRandomPasswordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetResourcePolicy = "GetResourcePolicy" - -// GetResourcePolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetResourcePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResourcePolicy for more information on using the GetResourcePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetResourcePolicyRequest method. -// req, resp := client.GetResourcePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetResourcePolicy -func (c *SecretsManager) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { - op := &request.Operation{ - Name: opGetResourcePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetResourcePolicyInput{} - } - - output = &GetResourcePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResourcePolicy API operation for AWS Secrets Manager. -// -// Retrieves the JSON text of the resource-based policy document that's attached -// to the specified secret. The JSON request string input and response output -// are shown formatted with white space and line breaks for better readability. -// Submit your input as a single line JSON string. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:GetResourcePolicy -// -// Related operations -// -// * To attach a resource policy to a secret, use PutResourcePolicy. -// -// * To delete the resource-based policy that's attached to a secret, use -// DeleteResourcePolicy. -// -// * To list all of the currently available secrets, use ListSecrets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation GetResourcePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetResourcePolicy -func (c *SecretsManager) GetResourcePolicy(input *GetResourcePolicyInput) (*GetResourcePolicyOutput, error) { - req, out := c.GetResourcePolicyRequest(input) - return out, req.Send() -} - -// GetResourcePolicyWithContext is the same as GetResourcePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetResourcePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) GetResourcePolicyWithContext(ctx aws.Context, input *GetResourcePolicyInput, opts ...request.Option) (*GetResourcePolicyOutput, error) { - req, out := c.GetResourcePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSecretValue = "GetSecretValue" - -// GetSecretValueRequest generates a "aws/request.Request" representing the -// client's request for the GetSecretValue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSecretValue for more information on using the GetSecretValue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSecretValueRequest method. -// req, resp := client.GetSecretValueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetSecretValue -func (c *SecretsManager) GetSecretValueRequest(input *GetSecretValueInput) (req *request.Request, output *GetSecretValueOutput) { - op := &request.Operation{ - Name: opGetSecretValue, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSecretValueInput{} - } - - output = &GetSecretValueOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSecretValue API operation for AWS Secrets Manager. -// -// Retrieves the contents of the encrypted fields SecretString or SecretBinary -// from the specified version of a secret, whichever contains content. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:GetSecretValue -// -// * kms:Decrypt - required only if you use a customer-managed AWS KMS key -// to encrypt the secret. You do not need this permission to use the account's -// default AWS managed CMK for Secrets Manager. -// -// Related operations -// -// * To create a new version of the secret with different encrypted information, -// use PutSecretValue. -// -// * To retrieve the non-encrypted details for the secret, use DescribeSecret. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation GetSecretValue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// You provided an invalid value for a parameter. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// * ErrCodeDecryptionFailure "DecryptionFailure" -// Secrets Manager can't decrypt the protected secret text using the provided -// KMS key. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetSecretValue -func (c *SecretsManager) GetSecretValue(input *GetSecretValueInput) (*GetSecretValueOutput, error) { - req, out := c.GetSecretValueRequest(input) - return out, req.Send() -} - -// GetSecretValueWithContext is the same as GetSecretValue with the addition of -// the ability to pass a context and additional request options. -// -// See GetSecretValue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) GetSecretValueWithContext(ctx aws.Context, input *GetSecretValueInput, opts ...request.Option) (*GetSecretValueOutput, error) { - req, out := c.GetSecretValueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSecretVersionIds = "ListSecretVersionIds" - -// ListSecretVersionIdsRequest generates a "aws/request.Request" representing the -// client's request for the ListSecretVersionIds operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSecretVersionIds for more information on using the ListSecretVersionIds -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSecretVersionIdsRequest method. -// req, resp := client.ListSecretVersionIdsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecretVersionIds -func (c *SecretsManager) ListSecretVersionIdsRequest(input *ListSecretVersionIdsInput) (req *request.Request, output *ListSecretVersionIdsOutput) { - op := &request.Operation{ - Name: opListSecretVersionIds, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListSecretVersionIdsInput{} - } - - output = &ListSecretVersionIdsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSecretVersionIds API operation for AWS Secrets Manager. -// -// Lists all of the versions attached to the specified secret. The output does -// not include the SecretString or SecretBinary fields. By default, the list -// includes only versions that have at least one staging label in VersionStage -// attached. -// -// Always check the NextToken response parameter when calling any of the List* -// operations. These operations can occasionally return an empty or shorter -// than expected list of results even when there are more results available. -// When this happens, the NextToken response parameter contains a value to pass -// to the next call to the same API to request the next part of the list. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:ListSecretVersionIds -// -// Related operations -// -// * To list the secrets in an account, use ListSecrets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation ListSecretVersionIds for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// You provided an invalid NextToken value. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecretVersionIds -func (c *SecretsManager) ListSecretVersionIds(input *ListSecretVersionIdsInput) (*ListSecretVersionIdsOutput, error) { - req, out := c.ListSecretVersionIdsRequest(input) - return out, req.Send() -} - -// ListSecretVersionIdsWithContext is the same as ListSecretVersionIds with the addition of -// the ability to pass a context and additional request options. -// -// See ListSecretVersionIds for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) ListSecretVersionIdsWithContext(ctx aws.Context, input *ListSecretVersionIdsInput, opts ...request.Option) (*ListSecretVersionIdsOutput, error) { - req, out := c.ListSecretVersionIdsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListSecretVersionIdsPages iterates over the pages of a ListSecretVersionIds operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListSecretVersionIds method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListSecretVersionIds operation. -// pageNum := 0 -// err := client.ListSecretVersionIdsPages(params, -// func(page *ListSecretVersionIdsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SecretsManager) ListSecretVersionIdsPages(input *ListSecretVersionIdsInput, fn func(*ListSecretVersionIdsOutput, bool) bool) error { - return c.ListSecretVersionIdsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListSecretVersionIdsPagesWithContext same as ListSecretVersionIdsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) ListSecretVersionIdsPagesWithContext(ctx aws.Context, input *ListSecretVersionIdsInput, fn func(*ListSecretVersionIdsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListSecretVersionIdsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListSecretVersionIdsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSecretVersionIdsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListSecrets = "ListSecrets" - -// ListSecretsRequest generates a "aws/request.Request" representing the -// client's request for the ListSecrets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSecrets for more information on using the ListSecrets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSecretsRequest method. -// req, resp := client.ListSecretsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecrets -func (c *SecretsManager) ListSecretsRequest(input *ListSecretsInput) (req *request.Request, output *ListSecretsOutput) { - op := &request.Operation{ - Name: opListSecrets, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListSecretsInput{} - } - - output = &ListSecretsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSecrets API operation for AWS Secrets Manager. -// -// Lists all of the secrets that are stored by Secrets Manager in the AWS account. -// To list the versions currently stored for a specific secret, use ListSecretVersionIds. -// The encrypted fields SecretString and SecretBinary are not included in the -// output. To get that information, call the GetSecretValue operation. -// -// Always check the NextToken response parameter when calling any of the List* -// operations. These operations can occasionally return an empty or shorter -// than expected list of results even when there are more results available. -// When this happens, the NextToken response parameter contains a value to pass -// to the next call to the same API to request the next part of the list. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:ListSecrets -// -// Related operations -// -// * To list the versions attached to a secret, use ListSecretVersionIds. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation ListSecrets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// You provided an invalid value for a parameter. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// You provided an invalid NextToken value. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecrets -func (c *SecretsManager) ListSecrets(input *ListSecretsInput) (*ListSecretsOutput, error) { - req, out := c.ListSecretsRequest(input) - return out, req.Send() -} - -// ListSecretsWithContext is the same as ListSecrets with the addition of -// the ability to pass a context and additional request options. -// -// See ListSecrets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) ListSecretsWithContext(ctx aws.Context, input *ListSecretsInput, opts ...request.Option) (*ListSecretsOutput, error) { - req, out := c.ListSecretsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListSecretsPages iterates over the pages of a ListSecrets operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListSecrets method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListSecrets operation. -// pageNum := 0 -// err := client.ListSecretsPages(params, -// func(page *ListSecretsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SecretsManager) ListSecretsPages(input *ListSecretsInput, fn func(*ListSecretsOutput, bool) bool) error { - return c.ListSecretsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListSecretsPagesWithContext same as ListSecretsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) ListSecretsPagesWithContext(ctx aws.Context, input *ListSecretsInput, fn func(*ListSecretsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListSecretsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListSecretsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSecretsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opPutResourcePolicy = "PutResourcePolicy" - -// PutResourcePolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutResourcePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutResourcePolicy for more information on using the PutResourcePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutResourcePolicyRequest method. -// req, resp := client.PutResourcePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicy -func (c *SecretsManager) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) { - op := &request.Operation{ - Name: opPutResourcePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutResourcePolicyInput{} - } - - output = &PutResourcePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutResourcePolicy API operation for AWS Secrets Manager. -// -// Attaches the contents of the specified resource-based permission policy to -// a secret. A resource-based policy is optional. Alternatively, you can use -// IAM identity-based policies that specify the secret's Amazon Resource Name -// (ARN) in the policy statement's Resources element. You can also use a combination -// of both identity-based and resource-based policies. The affected users and -// roles receive the permissions that are permitted by all of the relevant policies. -// For more information, see Using Resource-Based Policies for AWS Secrets Manager -// (http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html). -// For the complete description of the AWS policy syntax and grammar, see IAM -// JSON Policy Reference (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html) -// in the IAM User Guide. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:PutResourcePolicy -// -// Related operations -// -// * To retrieve the resource policy that's attached to a secret, use GetResourcePolicy. -// -// * To delete the resource-based policy that's attached to a secret, use -// DeleteResourcePolicy. -// -// * To list all of the currently available secrets, use ListSecrets. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation PutResourcePolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" -// The policy document that you provided isn't valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// You provided an invalid value for a parameter. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicy -func (c *SecretsManager) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { - req, out := c.PutResourcePolicyRequest(input) - return out, req.Send() -} - -// PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutResourcePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) { - req, out := c.PutResourcePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutSecretValue = "PutSecretValue" - -// PutSecretValueRequest generates a "aws/request.Request" representing the -// client's request for the PutSecretValue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutSecretValue for more information on using the PutSecretValue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutSecretValueRequest method. -// req, resp := client.PutSecretValueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutSecretValue -func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req *request.Request, output *PutSecretValueOutput) { - op := &request.Operation{ - Name: opPutSecretValue, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutSecretValueInput{} - } - - output = &PutSecretValueOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutSecretValue API operation for AWS Secrets Manager. -// -// Stores a new encrypted secret value in the specified secret. To do this, -// the operation creates a new version and attaches it to the secret. The version -// can contain a new SecretString value or a new SecretBinary value. You can -// also specify the staging labels that are initially attached to the new version. -// -// The Secrets Manager console uses only the SecretString field. To add binary -// data to a secret with the SecretBinary field you must use the AWS CLI or -// one of the AWS SDKs. -// -// * If this operation creates the first version for the secret then Secrets -// Manager automatically attaches the staging label AWSCURRENT to the new -// version. -// -// * If another version of this secret already exists, then this operation -// does not automatically move any staging labels other than those that you -// explicitly specify in the VersionStages parameter. -// -// * If this operation moves the staging label AWSCURRENT from another version -// to this version (because you included it in the StagingLabels parameter) -// then Secrets Manager also automatically moves the staging label AWSPREVIOUS -// to the version that AWSCURRENT was removed from. -// -// * This operation is idempotent. If a version with a VersionId with the -// same value as the ClientRequestToken parameter already exists and you -// specify the same secret data, the operation succeeds but does nothing. -// However, if the secret data is different, then the operation fails because -// you cannot modify an existing version; you can only create new ones. -// -// If you call an operation that needs to encrypt or decrypt the SecretString -// or SecretBinary for a secret in the same account as the calling user and -// that secret doesn't specify a AWS KMS encryption key, Secrets Manager uses -// the account's default AWS managed customer master key (CMK) with the alias -// aws/secretsmanager. If this key doesn't already exist in your account then -// Secrets Manager creates it for you automatically. All users and roles in -// the same AWS account automatically have access to use the default CMK. Note -// that if an Secrets Manager API call results in AWS having to create the account's -// AWS-managed CMK, it can result in a one-time significant delay in returning -// the result. -// -// If the secret is in a different AWS account from the credentials calling -// an API that requires encryption or decryption of the secret value then you -// must create and use a custom AWS KMS CMK because you can't access the default -// CMK for the account using credentials from a different AWS account. Store -// the ARN of the CMK in the secret when you create the secret or when you update -// it by including it in the KMSKeyId. If you call an API that must encrypt -// or decrypt SecretString or SecretBinary using credentials from a different -// account then the AWS KMS key policy must grant cross-account access to that -// other account's user or role for both the kms:GenerateDataKey and kms:Decrypt -// operations. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:PutSecretValue -// -// * kms:GenerateDataKey - needed only if you use a customer-managed AWS -// KMS key to encrypt the secret. You do not need this permission to use -// the account's default AWS managed CMK for Secrets Manager. -// -// Related operations -// -// * To retrieve the encrypted value you store in the version of a secret, -// use GetSecretValue. -// -// * To create a secret, use CreateSecret. -// -// * To get the details for a secret, use DescribeSecret. -// -// * To list the versions attached to a secret, use ListSecretVersionIds. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation PutSecretValue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// You provided an invalid value for a parameter. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request failed because it would exceed one of the Secrets Manager internal -// limits. -// -// * ErrCodeEncryptionFailure "EncryptionFailure" -// Secrets Manager can't encrypt the protected secret text using the provided -// KMS key. Check that the customer master key (CMK) is available, enabled, -// and not in an invalid state. For more information, see How Key State Affects -// Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). -// -// * ErrCodeResourceExistsException "ResourceExistsException" -// A resource with the ID you requested already exists. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutSecretValue -func (c *SecretsManager) PutSecretValue(input *PutSecretValueInput) (*PutSecretValueOutput, error) { - req, out := c.PutSecretValueRequest(input) - return out, req.Send() -} - -// PutSecretValueWithContext is the same as PutSecretValue with the addition of -// the ability to pass a context and additional request options. -// -// See PutSecretValue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) PutSecretValueWithContext(ctx aws.Context, input *PutSecretValueInput, opts ...request.Option) (*PutSecretValueOutput, error) { - req, out := c.PutSecretValueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreSecret = "RestoreSecret" - -// RestoreSecretRequest generates a "aws/request.Request" representing the -// client's request for the RestoreSecret operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RestoreSecret for more information on using the RestoreSecret -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RestoreSecretRequest method. -// req, resp := client.RestoreSecretRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RestoreSecret -func (c *SecretsManager) RestoreSecretRequest(input *RestoreSecretInput) (req *request.Request, output *RestoreSecretOutput) { - op := &request.Operation{ - Name: opRestoreSecret, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RestoreSecretInput{} - } - - output = &RestoreSecretOutput{} - req = c.newRequest(op, input, output) - return -} - -// RestoreSecret API operation for AWS Secrets Manager. -// -// Cancels the scheduled deletion of a secret by removing the DeletedDate time -// stamp. This makes the secret accessible to query once again. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:RestoreSecret -// -// Related operations -// -// * To delete a secret, use DeleteSecret. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation RestoreSecret for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// You provided an invalid value for a parameter. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RestoreSecret -func (c *SecretsManager) RestoreSecret(input *RestoreSecretInput) (*RestoreSecretOutput, error) { - req, out := c.RestoreSecretRequest(input) - return out, req.Send() -} - -// RestoreSecretWithContext is the same as RestoreSecret with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreSecret for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) RestoreSecretWithContext(ctx aws.Context, input *RestoreSecretInput, opts ...request.Option) (*RestoreSecretOutput, error) { - req, out := c.RestoreSecretRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRotateSecret = "RotateSecret" - -// RotateSecretRequest generates a "aws/request.Request" representing the -// client's request for the RotateSecret operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RotateSecret for more information on using the RotateSecret -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RotateSecretRequest method. -// req, resp := client.RotateSecretRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RotateSecret -func (c *SecretsManager) RotateSecretRequest(input *RotateSecretInput) (req *request.Request, output *RotateSecretOutput) { - op := &request.Operation{ - Name: opRotateSecret, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RotateSecretInput{} - } - - output = &RotateSecretOutput{} - req = c.newRequest(op, input, output) - return -} - -// RotateSecret API operation for AWS Secrets Manager. -// -// Configures and starts the asynchronous process of rotating this secret. If -// you include the configuration parameters, the operation sets those values -// for the secret and then immediately starts a rotation. If you do not include -// the configuration parameters, the operation starts a rotation with the values -// already stored in the secret. After the rotation completes, the protected -// service and its clients all use the new version of the secret. -// -// This required configuration information includes the ARN of an AWS Lambda -// function and the time between scheduled rotations. The Lambda rotation function -// creates a new version of the secret and creates or updates the credentials -// on the protected service to match. After testing the new credentials, the -// function marks the new secret with the staging label AWSCURRENT so that your -// clients all immediately begin to use the new version. For more information -// about rotating secrets and how to configure a Lambda function to rotate the -// secrets for your protected service, see Rotating Secrets in AWS Secrets Manager -// (http://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html) -// in the AWS Secrets Manager User Guide. -// -// Secrets Manager schedules the next rotation when the previous one is complete. -// Secrets Manager schedules the date by adding the rotation interval (number -// of days) to the actual date of the last rotation. The service chooses the -// hour within that 24-hour date window randomly. The minute is also chosen -// somewhat randomly, but weighted towards the top of the hour and influenced -// by a variety of factors that help distribute load. -// -// The rotation function must end with the versions of the secret in one of -// two states: -// -// * The AWSPENDING and AWSCURRENT staging labels are attached to the same -// version of the secret, or -// -// * The AWSPENDING staging label is not attached to any version of the secret. -// -// If instead the AWSPENDING staging label is present but is not attached to -// the same version as AWSCURRENT then any later invocation of RotateSecret -// assumes that a previous rotation request is still in progress and returns -// an error. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:RotateSecret -// -// * lambda:InvokeFunction (on the function specified in the secret's metadata) -// -// Related operations -// -// * To list the secrets in your account, use ListSecrets. -// -// * To get the details for a version of a secret, use DescribeSecret. -// -// * To create a new version of a secret, use CreateSecret. -// -// * To attach staging labels to or remove staging labels from a version -// of a secret, use UpdateSecretVersionStage. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation RotateSecret for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// You provided an invalid value for a parameter. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RotateSecret -func (c *SecretsManager) RotateSecret(input *RotateSecretInput) (*RotateSecretOutput, error) { - req, out := c.RotateSecretRequest(input) - return out, req.Send() -} - -// RotateSecretWithContext is the same as RotateSecret with the addition of -// the ability to pass a context and additional request options. -// -// See RotateSecret for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) RotateSecretWithContext(ctx aws.Context, input *RotateSecretInput, opts ...request.Option) (*RotateSecretOutput, error) { - req, out := c.RotateSecretRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagResource = "TagResource" - -// TagResourceRequest generates a "aws/request.Request" representing the -// client's request for the TagResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagResource for more information on using the TagResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TagResourceRequest method. -// req, resp := client.TagResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/TagResource -func (c *SecretsManager) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for AWS Secrets Manager. -// -// Attaches one or more tags, each consisting of a key name and a value, to -// the specified secret. Tags are part of the secret's overall metadata, and -// are not associated with any specific version of the secret. This operation -// only appends tags to the existing list of tags. To remove tags, you must -// use UntagResource. -// -// The following basic restrictions apply to tags: -// -// * Maximum number of tags per secret—50 -// -// * Maximum key length—127 Unicode characters in UTF-8 -// -// * Maximum value length—255 Unicode characters in UTF-8 -// -// * Tag keys and values are case sensitive. -// -// * Do not use the aws: prefix in your tag names or values because it is -// reserved for AWS use. You can't edit or delete tag names or values with -// this prefix. Tags with this prefix do not count against your tags per -// secret limit. -// -// * If your tagging schema will be used across multiple services and resources, -// remember that other services might have restrictions on allowed characters. -// Generally allowed characters are: letters, spaces, and numbers representable -// in UTF-8, plus the following special characters: + - = . _ : / @. -// -// If you use tags as part of your security strategy, then adding or removing -// a tag can change permissions. If successfully completing this operation would -// result in you losing your permissions for this secret, then the operation -// is blocked and returns an Access Denied error. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:TagResource -// -// Related operations -// -// * To remove one or more tags from the collection attached to a secret, -// use UntagResource. -// -// * To view the list of tags attached to a secret, use DescribeSecret. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// You provided an invalid value for a parameter. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/TagResource -func (c *SecretsManager) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) - return out, req.Send() -} - -// TagResourceWithContext is the same as TagResource with the addition of -// the ability to pass a context and additional request options. -// -// See TagResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagResource = "UntagResource" - -// UntagResourceRequest generates a "aws/request.Request" representing the -// client's request for the UntagResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagResource for more information on using the UntagResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UntagResourceRequest method. -// req, resp := client.UntagResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UntagResource -func (c *SecretsManager) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for AWS Secrets Manager. -// -// Removes one or more tags from the specified secret. -// -// This operation is idempotent. If a requested tag is not attached to the secret, -// no error is returned and the secret metadata is unchanged. -// -// If you use tags as part of your security strategy, then removing a tag can -// change permissions. If successfully completing this operation would result -// in you losing your permissions for this secret, then the operation is blocked -// and returns an Access Denied error. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:UntagResource -// -// Related operations -// -// * To add one or more tags to the collection attached to a secret, use -// TagResource. -// -// * To view the list of tags attached to a secret, use DescribeSecret. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// You provided an invalid value for a parameter. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UntagResource -func (c *SecretsManager) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) - return out, req.Send() -} - -// UntagResourceWithContext is the same as UntagResource with the addition of -// the ability to pass a context and additional request options. -// -// See UntagResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSecret = "UpdateSecret" - -// UpdateSecretRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSecret operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSecret for more information on using the UpdateSecret -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSecretRequest method. -// req, resp := client.UpdateSecretRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecret -func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *request.Request, output *UpdateSecretOutput) { - op := &request.Operation{ - Name: opUpdateSecret, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSecretInput{} - } - - output = &UpdateSecretOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSecret API operation for AWS Secrets Manager. -// -// Modifies many of the details of the specified secret. If you include a ClientRequestToken -// and eitherSecretString or SecretBinary then it also creates a new version -// attached to the secret. -// -// To modify the rotation configuration of a secret, use RotateSecret instead. -// -// The Secrets Manager console uses only the SecretString parameter and therefore -// limits you to encrypting and storing only a text string. To encrypt and store -// binary data as part of the version of a secret, you must use either the AWS -// CLI or one of the AWS SDKs. -// -// * If a version with a VersionId with the same value as the ClientRequestToken -// parameter already exists, the operation results in an error. You cannot -// modify an existing version, you can only create a new version. -// -// * If you include SecretString or SecretBinary to create a new secret version, -// Secrets Manager automatically attaches the staging label AWSCURRENT to -// the new version. -// -// If you call an operation that needs to encrypt or decrypt the SecretString -// or SecretBinary for a secret in the same account as the calling user and -// that secret doesn't specify a AWS KMS encryption key, Secrets Manager uses -// the account's default AWS managed customer master key (CMK) with the alias -// aws/secretsmanager. If this key doesn't already exist in your account then -// Secrets Manager creates it for you automatically. All users and roles in -// the same AWS account automatically have access to use the default CMK. Note -// that if an Secrets Manager API call results in AWS having to create the account's -// AWS-managed CMK, it can result in a one-time significant delay in returning -// the result. -// -// If the secret is in a different AWS account from the credentials calling -// an API that requires encryption or decryption of the secret value then you -// must create and use a custom AWS KMS CMK because you can't access the default -// CMK for the account using credentials from a different AWS account. Store -// the ARN of the CMK in the secret when you create the secret or when you update -// it by including it in the KMSKeyId. If you call an API that must encrypt -// or decrypt SecretString or SecretBinary using credentials from a different -// account then the AWS KMS key policy must grant cross-account access to that -// other account's user or role for both the kms:GenerateDataKey and kms:Decrypt -// operations. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:UpdateSecret -// -// * kms:GenerateDataKey - needed only if you use a custom AWS KMS key to -// encrypt the secret. You do not need this permission to use the account's -// AWS managed CMK for Secrets Manager. -// -// * kms:Decrypt - needed only if you use a custom AWS KMS key to encrypt -// the secret. You do not need this permission to use the account's AWS managed -// CMK for Secrets Manager. -// -// Related operations -// -// * To create a new secret, use CreateSecret. -// -// * To add only a new version to an existing secret, use PutSecretValue. -// -// * To get the details for a secret, use DescribeSecret. -// -// * To list the versions contained in a secret, use ListSecretVersionIds. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation UpdateSecret for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameterException" -// You provided an invalid value for a parameter. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request failed because it would exceed one of the Secrets Manager internal -// limits. -// -// * ErrCodeEncryptionFailure "EncryptionFailure" -// Secrets Manager can't encrypt the protected secret text using the provided -// KMS key. Check that the customer master key (CMK) is available, enabled, -// and not in an invalid state. For more information, see How Key State Affects -// Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). -// -// * ErrCodeResourceExistsException "ResourceExistsException" -// A resource with the ID you requested already exists. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" -// The policy document that you provided isn't valid. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// * ErrCodePreconditionNotMetException "PreconditionNotMetException" -// The request failed because you did not complete all the prerequisite steps. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecret -func (c *SecretsManager) UpdateSecret(input *UpdateSecretInput) (*UpdateSecretOutput, error) { - req, out := c.UpdateSecretRequest(input) - return out, req.Send() -} - -// UpdateSecretWithContext is the same as UpdateSecret with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSecret for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) UpdateSecretWithContext(ctx aws.Context, input *UpdateSecretInput, opts ...request.Option) (*UpdateSecretOutput, error) { - req, out := c.UpdateSecretRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSecretVersionStage = "UpdateSecretVersionStage" - -// UpdateSecretVersionStageRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSecretVersionStage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSecretVersionStage for more information on using the UpdateSecretVersionStage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSecretVersionStageRequest method. -// req, resp := client.UpdateSecretVersionStageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecretVersionStage -func (c *SecretsManager) UpdateSecretVersionStageRequest(input *UpdateSecretVersionStageInput) (req *request.Request, output *UpdateSecretVersionStageOutput) { - op := &request.Operation{ - Name: opUpdateSecretVersionStage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSecretVersionStageInput{} - } - - output = &UpdateSecretVersionStageOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSecretVersionStage API operation for AWS Secrets Manager. -// -// Modifies the staging labels attached to a version of a secret. Staging labels -// are used to track a version as it progresses through the secret rotation -// process. You can attach a staging label to only one version of a secret at -// a time. If a staging label to be added is already attached to another version, -// then it is moved--removed from the other version first and then attached -// to this one. For more information about staging labels, see Staging Labels -// (http://docs.aws.amazon.com/secretsmanager/latest/userguide/terms-concepts.html#term_staging-label) -// in the AWS Secrets Manager User Guide. -// -// The staging labels that you specify in the VersionStage parameter are added -// to the existing list of staging labels--they don't replace it. -// -// You can move the AWSCURRENT staging label to this version by including it -// in this call. -// -// Whenever you move AWSCURRENT, Secrets Manager automatically moves the label -// AWSPREVIOUS to the version that AWSCURRENT was removed from. -// -// If this action results in the last label being removed from a version, then -// the version is considered to be 'deprecated' and can be deleted by Secrets -// Manager. -// -// Minimum permissions -// -// To run this command, you must have the following permissions: -// -// * secretsmanager:UpdateSecretVersionStage -// -// Related operations -// -// * To get the list of staging labels that are currently associated with -// a version of a secret, use DescribeSecret and examine the SecretVersionsToStages -// response value. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Secrets Manager's -// API operation UpdateSecretVersionStage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// We can't find the resource that you asked for. -// -// * ErrCodeInvalidParameterException "InvalidParameterException" -// You provided an invalid value for a parameter. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// You provided a parameter value that is not valid for the current state of -// the resource. -// -// Possible causes: -// -// * You tried to perform the operation on a secret that's currently marked -// deleted. -// -// * You tried to enable rotation on a secret that doesn't already have a -// Lambda function ARN configured and you didn't include such an ARN as a -// parameter in this call. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request failed because it would exceed one of the Secrets Manager internal -// limits. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecretVersionStage -func (c *SecretsManager) UpdateSecretVersionStage(input *UpdateSecretVersionStageInput) (*UpdateSecretVersionStageOutput, error) { - req, out := c.UpdateSecretVersionStageRequest(input) - return out, req.Send() -} - -// UpdateSecretVersionStageWithContext is the same as UpdateSecretVersionStage with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSecretVersionStage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecretsManager) UpdateSecretVersionStageWithContext(ctx aws.Context, input *UpdateSecretVersionStageInput, opts ...request.Option) (*UpdateSecretVersionStageOutput, error) { - req, out := c.UpdateSecretVersionStageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type CancelRotateSecretInput struct { - _ struct{} `type:"structure"` - - // Specifies the secret for which you want to cancel a rotation request. You - // can specify either the Amazon Resource Name (ARN) or the friendly name of - // the secret. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelRotateSecretInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelRotateSecretInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelRotateSecretInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelRotateSecretInput"} - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecretId sets the SecretId field's value. -func (s *CancelRotateSecretInput) SetSecretId(v string) *CancelRotateSecretInput { - s.SecretId = &v - return s -} - -type CancelRotateSecretOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the secret for which rotation was canceled. - ARN *string `min:"20" type:"string"` - - // The friendly name of the secret for which rotation was canceled. - Name *string `min:"1" type:"string"` - - // The unique identifier of the version of the secret that was created during - // the rotation. This version might not be complete, and should be evaluated - // for possible deletion. At the very least, you should remove the VersionStage - // value AWSPENDING to enable this version to be deleted. Failing to clean up - // a cancelled rotation can block you from successfully starting future rotations. - VersionId *string `min:"32" type:"string"` -} - -// String returns the string representation -func (s CancelRotateSecretOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelRotateSecretOutput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *CancelRotateSecretOutput) SetARN(v string) *CancelRotateSecretOutput { - s.ARN = &v - return s -} - -// SetName sets the Name field's value. -func (s *CancelRotateSecretOutput) SetName(v string) *CancelRotateSecretOutput { - s.Name = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *CancelRotateSecretOutput) SetVersionId(v string) *CancelRotateSecretOutput { - s.VersionId = &v - return s -} - -type CreateSecretInput struct { - _ struct{} `type:"structure"` - - // (Optional) If you include SecretString or SecretBinary, then an initial version - // is created as part of the secret, and this parameter specifies a unique identifier - // for the new version. - // - // If you use the AWS CLI or one of the AWS SDK to call this operation, then - // you can leave this parameter empty. The CLI or SDK generates a random UUID - // for you and includes it as the value for this parameter in the request. If - // you don't use the SDK and instead generate a raw HTTP request to the Secrets - // Manager service endpoint, then you must generate a ClientRequestToken yourself - // for the new version and include that value in the request. - // - // This value helps ensure idempotency. Secrets Manager uses this value to prevent - // the accidental creation of duplicate versions if there are failures and retries - // during a rotation. We recommend that you generate a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) - // value to ensure uniqueness of your versions within the specified secret. - // - // * If the ClientRequestToken value isn't already associated with a version - // of the secret then a new version of the secret is created. - // - // * If a version with this value already exists and that version's SecretString - // and SecretBinary values are the same as those in the request, then the - // request is ignored (the operation is idempotent). - // - // * If a version with this value already exists and that version's SecretString - // and SecretBinary values are different from those in the request then the - // request fails because you cannot modify an existing version. Instead, - // use PutSecretValue to create a new version. - // - // This value becomes the VersionId of the new version. - ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` - - // (Optional) Specifies a user-provided description of the secret. - Description *string `type:"string"` - - // (Optional) Specifies the ARN, Key ID, or alias of the AWS KMS customer master - // key (CMK) to be used to encrypt the SecretString or SecretBinary values in - // the versions stored in this secret. - // - // You can specify any of the supported ways to identify a AWS KMS key ID. If - // you need to reference a CMK in a different account, you can use only the - // key ARN or the alias ARN. - // - // If you don't specify this value, then Secrets Manager defaults to using the - // AWS account's default CMK (the one named aws/secretsmanager). If a AWS KMS - // CMK with that name doesn't yet exist, then Secrets Manager creates it for - // you automatically the first time it needs to encrypt a version's SecretString - // or SecretBinary fields. - // - // You can use the account's default CMK to encrypt and decrypt only if you - // call this operation using credentials from the same account that owns the - // secret. If the secret is in a different account, then you must create a custom - // CMK and specify the ARN in this field. - KmsKeyId *string `type:"string"` - - // Specifies the friendly name of the new secret. - // - // The secret name must be ASCII letters, digits, or the following characters - // : /_+=.@- - // - // Don't end your secret name with a hyphen followed by six characters. If you - // do so, you risk confusion and unexpected results when searching for a secret - // by partial ARN. This is because Secrets Manager automatically adds a hyphen - // and six random characters at the end of the ARN. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // (Optional) Specifies binary data that you want to encrypt and store in the - // new version of the secret. To use this parameter in the command-line tools, - // we recommend that you store your binary data in a file and then use the appropriate - // technique for your tool to pass the contents of the file as a parameter. - // - // Either SecretString or SecretBinary must have a value, but not both. They - // cannot both be empty. - // - // This parameter is not available using the Secrets Manager console. It can - // be accessed only by using the AWS CLI or one of the AWS SDKs. - // - // SecretBinary is automatically base64 encoded/decoded by the SDK. - SecretBinary []byte `type:"blob" sensitive:"true"` - - // (Optional) Specifies text data that you want to encrypt and store in this - // new version of the secret. - // - // Either SecretString or SecretBinary must have a value, but not both. They - // cannot both be empty. - // - // If you create a secret by using the Secrets Manager console then Secrets - // Manager puts the protected secret text in only the SecretString parameter. - // The Secrets Manager console stores the information as a JSON structure of - // key/value pairs that the Lambda rotation function knows how to parse. - // - // For storing multiple values, we recommend that you use a JSON text string - // argument and specify key/value pairs. For information on how to format a - // JSON parameter for the various command line tool environments, see Using - // JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) - // in the AWS CLI User Guide. For example: - // - // [{"username":"bob"},{"password":"abc123xyz456"}] - // - // If your command-line tool or SDK requires quotation marks around the parameter, - // you should use single quotes to avoid confusion with the double quotes required - // in the JSON text. - SecretString *string `type:"string" sensitive:"true"` - - // (Optional) Specifies a list of user-defined tags that are attached to the - // secret. Each tag is a "Key" and "Value" pair of strings. This operation only - // appends tags to the existing list of tags. To remove tags, you must use UntagResource. - // - // Secrets Manager tag key names are case sensitive. A tag with the key "ABC" - // is a different tag from one with key "abc". - // - // If you check tags in IAM policy Condition elements as part of your security - // strategy, then adding or removing a tag can change permissions. If the successful - // completion of this operation would result in you losing your permissions - // for this secret, then this operation is blocked and returns an Access Denied - // error. - // - // This parameter requires a JSON text string argument. For information on how - // to format a JSON parameter for the various command line tool environments, - // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) - // in the AWS CLI User Guide. For example: - // - // [{"Key":"CostCenter","Value":"12345"},{"Key":"environment","Value":"production"}] - // - // If your command-line tool or SDK requires quotation marks around the parameter, - // you should use single quotes to avoid confusion with the double quotes required - // in the JSON text. - // - // The following basic restrictions apply to tags: - // - // * Maximum number of tags per secret—50 - // - // * Maximum key length—127 Unicode characters in UTF-8 - // - // * Maximum value length—255 Unicode characters in UTF-8 - // - // * Tag keys and values are case sensitive. - // - // * Do not use the aws: prefix in your tag names or values because it is - // reserved for AWS use. You can't edit or delete tag names or values with - // this prefix. Tags with this prefix do not count against your tags per - // secret limit. - // - // * If your tagging schema will be used across multiple services and resources, - // remember that other services might have restrictions on allowed characters. - // Generally allowed characters are: letters, spaces, and numbers representable - // in UTF-8, plus the following special characters: + - = . _ : / @. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreateSecretInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSecretInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSecretInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSecretInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *CreateSecretInput) SetClientRequestToken(v string) *CreateSecretInput { - s.ClientRequestToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateSecretInput) SetDescription(v string) *CreateSecretInput { - s.Description = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateSecretInput) SetKmsKeyId(v string) *CreateSecretInput { - s.KmsKeyId = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateSecretInput) SetName(v string) *CreateSecretInput { - s.Name = &v - return s -} - -// SetSecretBinary sets the SecretBinary field's value. -func (s *CreateSecretInput) SetSecretBinary(v []byte) *CreateSecretInput { - s.SecretBinary = v - return s -} - -// SetSecretString sets the SecretString field's value. -func (s *CreateSecretInput) SetSecretString(v string) *CreateSecretInput { - s.SecretString = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateSecretInput) SetTags(v []*Tag) *CreateSecretInput { - s.Tags = v - return s -} - -type CreateSecretOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the secret that you just created. - // - // Secrets Manager automatically adds several random characters to the name - // at the end of the ARN when you initially create a secret. This affects only - // the ARN and not the actual friendly name. This ensures that if you create - // a new secret with the same name as an old secret that you previously deleted, - // then users with access to the old secret don't automatically get access to - // the new secret because the ARNs are different. - ARN *string `min:"20" type:"string"` - - // The friendly name of the secret that you just created. - Name *string `min:"1" type:"string"` - - // The unique identifier that's associated with the version of the secret you - // just created. - VersionId *string `min:"32" type:"string"` -} - -// String returns the string representation -func (s CreateSecretOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSecretOutput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *CreateSecretOutput) SetARN(v string) *CreateSecretOutput { - s.ARN = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateSecretOutput) SetName(v string) *CreateSecretOutput { - s.Name = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *CreateSecretOutput) SetVersionId(v string) *CreateSecretOutput { - s.VersionId = &v - return s -} - -type DeleteResourcePolicyInput struct { - _ struct{} `type:"structure"` - - // Specifies the secret that you want to delete the attached resource-based - // policy for. You can specify either the Amazon Resource Name (ARN) or the - // friendly name of the secret. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteResourcePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResourcePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteResourcePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteResourcePolicyInput"} - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecretId sets the SecretId field's value. -func (s *DeleteResourcePolicyInput) SetSecretId(v string) *DeleteResourcePolicyInput { - s.SecretId = &v - return s -} - -type DeleteResourcePolicyOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the secret that the resource-based policy was deleted for. - ARN *string `min:"20" type:"string"` - - // The friendly name of the secret that the resource-based policy was deleted - // for. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteResourcePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResourcePolicyOutput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *DeleteResourcePolicyOutput) SetARN(v string) *DeleteResourcePolicyOutput { - s.ARN = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteResourcePolicyOutput) SetName(v string) *DeleteResourcePolicyOutput { - s.Name = &v - return s -} - -type DeleteSecretInput struct { - _ struct{} `type:"structure"` - - // (Optional) Specifies that the secret is to be deleted without any recovery - // window. You can't use both this parameter and the RecoveryWindowInDays parameter - // in the same API call. - // - // An asynchronous background process performs the actual deletion, so there - // can be a short delay before the operation completes. If you write code to - // delete and then immediately recreate a secret with the same name, ensure - // that your code includes appropriate back off and retry logic. - // - // Use this parameter with caution. This parameter causes the operation to skip - // the normal waiting period before the permanent deletion that AWS would normally - // impose with the RecoveryWindowInDays parameter. If you delete a secret with - // the ForceDeleteWithouRecovery parameter, then you have no opportunity to - // recover the secret. It is permanently lost. - ForceDeleteWithoutRecovery *bool `type:"boolean"` - - // (Optional) Specifies the number of days that Secrets Manager waits before - // it can delete the secret. You can't use both this parameter and the ForceDeleteWithoutRecovery - // parameter in the same API call. - // - // This value can range from 7 to 30 days. The default value is 30. - RecoveryWindowInDays *int64 `type:"long"` - - // Specifies the secret that you want to delete. You can specify either the - // Amazon Resource Name (ARN) or the friendly name of the secret. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSecretInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSecretInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSecretInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSecretInput"} - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForceDeleteWithoutRecovery sets the ForceDeleteWithoutRecovery field's value. -func (s *DeleteSecretInput) SetForceDeleteWithoutRecovery(v bool) *DeleteSecretInput { - s.ForceDeleteWithoutRecovery = &v - return s -} - -// SetRecoveryWindowInDays sets the RecoveryWindowInDays field's value. -func (s *DeleteSecretInput) SetRecoveryWindowInDays(v int64) *DeleteSecretInput { - s.RecoveryWindowInDays = &v - return s -} - -// SetSecretId sets the SecretId field's value. -func (s *DeleteSecretInput) SetSecretId(v string) *DeleteSecretInput { - s.SecretId = &v - return s -} - -type DeleteSecretOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the secret that is now scheduled for deletion. - ARN *string `min:"20" type:"string"` - - // The date and time after which this secret can be deleted by Secrets Manager - // and can no longer be restored. This value is the date and time of the delete - // request plus the number of days specified in RecoveryWindowInDays. - DeletionDate *time.Time `type:"timestamp"` - - // The friendly name of the secret that is now scheduled for deletion. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteSecretOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSecretOutput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *DeleteSecretOutput) SetARN(v string) *DeleteSecretOutput { - s.ARN = &v - return s -} - -// SetDeletionDate sets the DeletionDate field's value. -func (s *DeleteSecretOutput) SetDeletionDate(v time.Time) *DeleteSecretOutput { - s.DeletionDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteSecretOutput) SetName(v string) *DeleteSecretOutput { - s.Name = &v - return s -} - -type DescribeSecretInput struct { - _ struct{} `type:"structure"` - - // The identifier of the secret whose details you want to retrieve. You can - // specify either the Amazon Resource Name (ARN) or the friendly name of the - // secret. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeSecretInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSecretInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSecretInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSecretInput"} - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecretId sets the SecretId field's value. -func (s *DescribeSecretInput) SetSecretId(v string) *DescribeSecretInput { - s.SecretId = &v - return s -} - -type DescribeSecretOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the secret. - ARN *string `min:"20" type:"string"` - - // This value exists if the secret is scheduled for deletion. Some time after - // the specified date and time, Secrets Manager deletes the secret and all of - // its versions. - // - // If a secret is scheduled for deletion, then its details, including the encrypted - // secret information, is not accessible. To cancel a scheduled deletion and - // restore access, use RestoreSecret. - DeletedDate *time.Time `type:"timestamp"` - - // The user-provided description of the secret. - Description *string `type:"string"` - - // The ARN or alias of the AWS KMS customer master key (CMK) that's used to - // encrypt the SecretString or SecretBinary fields in each version of the secret. - // If you don't provide a key, then Secrets Manager defaults to encrypting the - // secret fields with the default AWS KMS CMK (the one named awssecretsmanager) - // for this account. - KmsKeyId *string `type:"string"` - - // The last date that this secret was accessed. This value is truncated to midnight - // of the date and therefore shows only the date, not the time. - LastAccessedDate *time.Time `type:"timestamp"` - - // The last date and time that this secret was modified in any way. - LastChangedDate *time.Time `type:"timestamp"` - - // The most recent date and time that the Secrets Manager rotation process was - // successfully completed. This value is null if the secret has never rotated. - LastRotatedDate *time.Time `type:"timestamp"` - - // The user-provided friendly name of the secret. - Name *string `min:"1" type:"string"` - - // Specifies whether automatic rotation is enabled for this secret. - // - // To enable rotation, use RotateSecret with AutomaticallyRotateAfterDays set - // to a value greater than 0. To disable rotation, use CancelRotateSecret. - RotationEnabled *bool `type:"boolean"` - - // The ARN of a Lambda function that's invoked by Secrets Manager to rotate - // the secret either automatically per the schedule or manually by a call to - // RotateSecret. - RotationLambdaARN *string `type:"string"` - - // A structure that contains the rotation configuration for this secret. - RotationRules *RotationRulesType `type:"structure"` - - // The list of user-defined tags that are associated with the secret. To add - // tags to a secret, use TagResource. To remove tags, use UntagResource. - Tags []*Tag `type:"list"` - - // A list of all of the currently assigned VersionStage staging labels and the - // VersionId that each is attached to. Staging labels are used to keep track - // of the different versions during the rotation process. - // - // A version that does not have any staging labels attached is considered deprecated - // and subject to deletion. Such versions are not included in this list. - VersionIdsToStages map[string][]*string `type:"map"` -} - -// String returns the string representation -func (s DescribeSecretOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSecretOutput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *DescribeSecretOutput) SetARN(v string) *DescribeSecretOutput { - s.ARN = &v - return s -} - -// SetDeletedDate sets the DeletedDate field's value. -func (s *DescribeSecretOutput) SetDeletedDate(v time.Time) *DescribeSecretOutput { - s.DeletedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DescribeSecretOutput) SetDescription(v string) *DescribeSecretOutput { - s.Description = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DescribeSecretOutput) SetKmsKeyId(v string) *DescribeSecretOutput { - s.KmsKeyId = &v - return s -} - -// SetLastAccessedDate sets the LastAccessedDate field's value. -func (s *DescribeSecretOutput) SetLastAccessedDate(v time.Time) *DescribeSecretOutput { - s.LastAccessedDate = &v - return s -} - -// SetLastChangedDate sets the LastChangedDate field's value. -func (s *DescribeSecretOutput) SetLastChangedDate(v time.Time) *DescribeSecretOutput { - s.LastChangedDate = &v - return s -} - -// SetLastRotatedDate sets the LastRotatedDate field's value. -func (s *DescribeSecretOutput) SetLastRotatedDate(v time.Time) *DescribeSecretOutput { - s.LastRotatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeSecretOutput) SetName(v string) *DescribeSecretOutput { - s.Name = &v - return s -} - -// SetRotationEnabled sets the RotationEnabled field's value. -func (s *DescribeSecretOutput) SetRotationEnabled(v bool) *DescribeSecretOutput { - s.RotationEnabled = &v - return s -} - -// SetRotationLambdaARN sets the RotationLambdaARN field's value. -func (s *DescribeSecretOutput) SetRotationLambdaARN(v string) *DescribeSecretOutput { - s.RotationLambdaARN = &v - return s -} - -// SetRotationRules sets the RotationRules field's value. -func (s *DescribeSecretOutput) SetRotationRules(v *RotationRulesType) *DescribeSecretOutput { - s.RotationRules = v - return s -} - -// SetTags sets the Tags field's value. -func (s *DescribeSecretOutput) SetTags(v []*Tag) *DescribeSecretOutput { - s.Tags = v - return s -} - -// SetVersionIdsToStages sets the VersionIdsToStages field's value. -func (s *DescribeSecretOutput) SetVersionIdsToStages(v map[string][]*string) *DescribeSecretOutput { - s.VersionIdsToStages = v - return s -} - -type GetRandomPasswordInput struct { - _ struct{} `type:"structure"` - - // A string that includes characters that should not be included in the generated - // password. The default is that all characters from the included sets can be - // used. - ExcludeCharacters *string `type:"string"` - - // Specifies that the generated password should not include lowercase letters. - // The default if you do not include this switch parameter is that lowercase - // letters can be included. - ExcludeLowercase *bool `type:"boolean"` - - // Specifies that the generated password should not include digits. The default - // if you do not include this switch parameter is that digits can be included. - ExcludeNumbers *bool `type:"boolean"` - - // Specifies that the generated password should not include punctuation characters. - // The default if you do not include this switch parameter is that punctuation - // characters can be included. - // - // The following are the punctuation characters that can be included in the - // generated password if you don't explicitly exclude them with ExcludeCharacters - // or ExcludePunctuation: - // - // ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ - ExcludePunctuation *bool `type:"boolean"` - - // Specifies that the generated password should not include uppercase letters. - // The default if you do not include this switch parameter is that uppercase - // letters can be included. - ExcludeUppercase *bool `type:"boolean"` - - // Specifies that the generated password can include the space character. The - // default if you do not include this switch parameter is that the space character - // is not included. - IncludeSpace *bool `type:"boolean"` - - // The desired length of the generated password. The default value if you do - // not include this parameter is 32 characters. - PasswordLength *int64 `min:"1" type:"long"` - - // A boolean value that specifies whether the generated password must include - // at least one of every allowed character type. The default value is True and - // the operation requires at least one of every character type. - RequireEachIncludedType *bool `type:"boolean"` -} - -// String returns the string representation -func (s GetRandomPasswordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRandomPasswordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRandomPasswordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRandomPasswordInput"} - if s.PasswordLength != nil && *s.PasswordLength < 1 { - invalidParams.Add(request.NewErrParamMinValue("PasswordLength", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExcludeCharacters sets the ExcludeCharacters field's value. -func (s *GetRandomPasswordInput) SetExcludeCharacters(v string) *GetRandomPasswordInput { - s.ExcludeCharacters = &v - return s -} - -// SetExcludeLowercase sets the ExcludeLowercase field's value. -func (s *GetRandomPasswordInput) SetExcludeLowercase(v bool) *GetRandomPasswordInput { - s.ExcludeLowercase = &v - return s -} - -// SetExcludeNumbers sets the ExcludeNumbers field's value. -func (s *GetRandomPasswordInput) SetExcludeNumbers(v bool) *GetRandomPasswordInput { - s.ExcludeNumbers = &v - return s -} - -// SetExcludePunctuation sets the ExcludePunctuation field's value. -func (s *GetRandomPasswordInput) SetExcludePunctuation(v bool) *GetRandomPasswordInput { - s.ExcludePunctuation = &v - return s -} - -// SetExcludeUppercase sets the ExcludeUppercase field's value. -func (s *GetRandomPasswordInput) SetExcludeUppercase(v bool) *GetRandomPasswordInput { - s.ExcludeUppercase = &v - return s -} - -// SetIncludeSpace sets the IncludeSpace field's value. -func (s *GetRandomPasswordInput) SetIncludeSpace(v bool) *GetRandomPasswordInput { - s.IncludeSpace = &v - return s -} - -// SetPasswordLength sets the PasswordLength field's value. -func (s *GetRandomPasswordInput) SetPasswordLength(v int64) *GetRandomPasswordInput { - s.PasswordLength = &v - return s -} - -// SetRequireEachIncludedType sets the RequireEachIncludedType field's value. -func (s *GetRandomPasswordInput) SetRequireEachIncludedType(v bool) *GetRandomPasswordInput { - s.RequireEachIncludedType = &v - return s -} - -type GetRandomPasswordOutput struct { - _ struct{} `type:"structure"` - - // A string with the generated password. - RandomPassword *string `type:"string"` -} - -// String returns the string representation -func (s GetRandomPasswordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRandomPasswordOutput) GoString() string { - return s.String() -} - -// SetRandomPassword sets the RandomPassword field's value. -func (s *GetRandomPasswordOutput) SetRandomPassword(v string) *GetRandomPasswordOutput { - s.RandomPassword = &v - return s -} - -type GetResourcePolicyInput struct { - _ struct{} `type:"structure"` - - // Specifies the secret that you want to retrieve the attached resource-based - // policy for. You can specify either the Amazon Resource Name (ARN) or the - // friendly name of the secret. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetResourcePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourcePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResourcePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResourcePolicyInput"} - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecretId sets the SecretId field's value. -func (s *GetResourcePolicyInput) SetSecretId(v string) *GetResourcePolicyInput { - s.SecretId = &v - return s -} - -type GetResourcePolicyOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the secret that the resource-based policy was retrieved for. - ARN *string `min:"20" type:"string"` - - // The friendly name of the secret that the resource-based policy was retrieved - // for. - Name *string `min:"1" type:"string"` - - // A JSON-formatted string that describes the permissions that are associated - // with the attached secret. These permissions are combined with any permissions - // that are associated with the user or role that attempts to access this secret. - // The combined permissions specify who can access the secret and what actions - // they can perform. For more information, see Authentication and Access Control - // for AWS Secrets Manager (http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html) - // in the AWS Secrets Manager User Guide. - ResourcePolicy *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetResourcePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetResourcePolicyOutput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *GetResourcePolicyOutput) SetARN(v string) *GetResourcePolicyOutput { - s.ARN = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetResourcePolicyOutput) SetName(v string) *GetResourcePolicyOutput { - s.Name = &v - return s -} - -// SetResourcePolicy sets the ResourcePolicy field's value. -func (s *GetResourcePolicyOutput) SetResourcePolicy(v string) *GetResourcePolicyOutput { - s.ResourcePolicy = &v - return s -} - -type GetSecretValueInput struct { - _ struct{} `type:"structure"` - - // Specifies the secret containing the version that you want to retrieve. You - // can specify either the Amazon Resource Name (ARN) or the friendly name of - // the secret. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` - - // Specifies the unique identifier of the version of the secret that you want - // to retrieve. If you specify this parameter then don't specify VersionStage. - // If you don't specify either a VersionStage or VersionId then the default - // is to perform the operation on the version with the VersionStage value of - // AWSCURRENT. - // - // This value is typically a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) - // value with 32 hexadecimal digits. - VersionId *string `min:"32" type:"string"` - - // Specifies the secret version that you want to retrieve by the staging label - // attached to the version. - // - // Staging labels are used to keep track of different versions during the rotation - // process. If you use this parameter then don't specify VersionId. If you don't - // specify either a VersionStage or VersionId, then the default is to perform - // the operation on the version with the VersionStage value of AWSCURRENT. - VersionStage *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetSecretValueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSecretValueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSecretValueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSecretValueInput"} - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - if s.VersionId != nil && len(*s.VersionId) < 32 { - invalidParams.Add(request.NewErrParamMinLen("VersionId", 32)) - } - if s.VersionStage != nil && len(*s.VersionStage) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VersionStage", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecretId sets the SecretId field's value. -func (s *GetSecretValueInput) SetSecretId(v string) *GetSecretValueInput { - s.SecretId = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetSecretValueInput) SetVersionId(v string) *GetSecretValueInput { - s.VersionId = &v - return s -} - -// SetVersionStage sets the VersionStage field's value. -func (s *GetSecretValueInput) SetVersionStage(v string) *GetSecretValueInput { - s.VersionStage = &v - return s -} - -type GetSecretValueOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the secret. - ARN *string `min:"20" type:"string"` - - // The date and time that this version of the secret was created. - CreatedDate *time.Time `type:"timestamp"` - - // The friendly name of the secret. - Name *string `min:"1" type:"string"` - - // The decrypted part of the protected secret information that was originally - // provided as binary data in the form of a byte array. The response parameter - // represents the binary data as a base64-encoded (https://tools.ietf.org/html/rfc4648#section-4) - // string. - // - // This parameter is not used if the secret is created by the Secrets Manager - // console. - // - // If you store custom information in this field of the secret, then you must - // code your Lambda rotation function to parse and interpret whatever you store - // in the SecretString or SecretBinary fields. - // - // SecretBinary is automatically base64 encoded/decoded by the SDK. - SecretBinary []byte `type:"blob" sensitive:"true"` - - // The decrypted part of the protected secret information that was originally - // provided as a string. - // - // If you create this secret by using the Secrets Manager console then only - // the SecretString parameter contains data. Secrets Manager stores the information - // as a JSON structure of key/value pairs that the Lambda rotation function - // knows how to parse. - // - // If you store custom information in the secret by using the CreateSecret, - // UpdateSecret, or PutSecretValue API operations instead of the Secrets Manager - // console, or by using the Other secret type in the console, then you must - // code your Lambda rotation function to parse and interpret those values. - SecretString *string `type:"string" sensitive:"true"` - - // The unique identifier of this version of the secret. - VersionId *string `min:"32" type:"string"` - - // A list of all of the staging labels currently attached to this version of - // the secret. - VersionStages []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s GetSecretValueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSecretValueOutput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *GetSecretValueOutput) SetARN(v string) *GetSecretValueOutput { - s.ARN = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *GetSecretValueOutput) SetCreatedDate(v time.Time) *GetSecretValueOutput { - s.CreatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetSecretValueOutput) SetName(v string) *GetSecretValueOutput { - s.Name = &v - return s -} - -// SetSecretBinary sets the SecretBinary field's value. -func (s *GetSecretValueOutput) SetSecretBinary(v []byte) *GetSecretValueOutput { - s.SecretBinary = v - return s -} - -// SetSecretString sets the SecretString field's value. -func (s *GetSecretValueOutput) SetSecretString(v string) *GetSecretValueOutput { - s.SecretString = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetSecretValueOutput) SetVersionId(v string) *GetSecretValueOutput { - s.VersionId = &v - return s -} - -// SetVersionStages sets the VersionStages field's value. -func (s *GetSecretValueOutput) SetVersionStages(v []*string) *GetSecretValueOutput { - s.VersionStages = v - return s -} - -type ListSecretVersionIdsInput struct { - _ struct{} `type:"structure"` - - // (Optional) Specifies that you want the results to include versions that do - // not have any staging labels attached to them. Such versions are considered - // deprecated and are subject to deletion by Secrets Manager as needed. - IncludeDeprecated *bool `type:"boolean"` - - // (Optional) Limits the number of results that you want to include in the response. - // If you don't include this parameter, it defaults to a value that's specific - // to the operation. If additional items exist beyond the maximum you specify, - // the NextToken response element is present and has a value (isn't null). Include - // that value as the NextToken request parameter in the next call to the operation - // to get the next part of the results. Note that Secrets Manager might return - // fewer results than the maximum even when there are more results available. - // You should check NextToken after every operation to ensure that you receive - // all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // (Optional) Use this parameter in a request if you receive a NextToken response - // in a previous request that indicates that there's more output available. - // In a subsequent call, set it to the value of the previous call's NextToken - // response to indicate where the output should continue from. - NextToken *string `min:"1" type:"string"` - - // The identifier for the secret containing the versions you want to list. You - // can specify either the Amazon Resource Name (ARN) or the friendly name of - // the secret. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListSecretVersionIdsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSecretVersionIdsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSecretVersionIdsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSecretVersionIdsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIncludeDeprecated sets the IncludeDeprecated field's value. -func (s *ListSecretVersionIdsInput) SetIncludeDeprecated(v bool) *ListSecretVersionIdsInput { - s.IncludeDeprecated = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListSecretVersionIdsInput) SetMaxResults(v int64) *ListSecretVersionIdsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSecretVersionIdsInput) SetNextToken(v string) *ListSecretVersionIdsInput { - s.NextToken = &v - return s -} - -// SetSecretId sets the SecretId field's value. -func (s *ListSecretVersionIdsInput) SetSecretId(v string) *ListSecretVersionIdsInput { - s.SecretId = &v - return s -} - -type ListSecretVersionIdsOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the secret. - // - // Secrets Manager automatically adds several random characters to the name - // at the end of the ARN when you initially create a secret. This affects only - // the ARN and not the actual friendly name. This ensures that if you create - // a new secret with the same name as an old secret that you previously deleted, - // then users with access to the old secret don't automatically get access to - // the new secret because the ARNs are different. - ARN *string `min:"20" type:"string"` - - // The friendly name of the secret. - Name *string `min:"1" type:"string"` - - // If present in the response, this value indicates that there's more output - // available than what's included in the current response. This can occur even - // when the response includes no values at all, such as when you ask for a filtered - // view of a very long list. Use this value in the NextToken request parameter - // in a subsequent call to the operation to continue processing and get the - // next part of the output. You should repeat this until the NextToken response - // element comes back empty (as null). - NextToken *string `min:"1" type:"string"` - - // The list of the currently available versions of the specified secret. - Versions []*SecretVersionsListEntry `type:"list"` -} - -// String returns the string representation -func (s ListSecretVersionIdsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSecretVersionIdsOutput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *ListSecretVersionIdsOutput) SetARN(v string) *ListSecretVersionIdsOutput { - s.ARN = &v - return s -} - -// SetName sets the Name field's value. -func (s *ListSecretVersionIdsOutput) SetName(v string) *ListSecretVersionIdsOutput { - s.Name = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSecretVersionIdsOutput) SetNextToken(v string) *ListSecretVersionIdsOutput { - s.NextToken = &v - return s -} - -// SetVersions sets the Versions field's value. -func (s *ListSecretVersionIdsOutput) SetVersions(v []*SecretVersionsListEntry) *ListSecretVersionIdsOutput { - s.Versions = v - return s -} - -type ListSecretsInput struct { - _ struct{} `type:"structure"` - - // (Optional) Limits the number of results that you want to include in the response. - // If you don't include this parameter, it defaults to a value that's specific - // to the operation. If additional items exist beyond the maximum you specify, - // the NextToken response element is present and has a value (isn't null). Include - // that value as the NextToken request parameter in the next call to the operation - // to get the next part of the results. Note that Secrets Manager might return - // fewer results than the maximum even when there are more results available. - // You should check NextToken after every operation to ensure that you receive - // all of the results. - MaxResults *int64 `min:"1" type:"integer"` - - // (Optional) Use this parameter in a request if you receive a NextToken response - // in a previous request that indicates that there's more output available. - // In a subsequent call, set it to the value of the previous call's NextToken - // response to indicate where the output should continue from. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListSecretsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSecretsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSecretsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSecretsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListSecretsInput) SetMaxResults(v int64) *ListSecretsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSecretsInput) SetNextToken(v string) *ListSecretsInput { - s.NextToken = &v - return s -} - -type ListSecretsOutput struct { - _ struct{} `type:"structure"` - - // If present in the response, this value indicates that there's more output - // available than what's included in the current response. This can occur even - // when the response includes no values at all, such as when you ask for a filtered - // view of a very long list. Use this value in the NextToken request parameter - // in a subsequent call to the operation to continue processing and get the - // next part of the output. You should repeat this until the NextToken response - // element comes back empty (as null). - NextToken *string `min:"1" type:"string"` - - // A list of the secrets in the account. - SecretList []*SecretListEntry `type:"list"` -} - -// String returns the string representation -func (s ListSecretsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSecretsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSecretsOutput) SetNextToken(v string) *ListSecretsOutput { - s.NextToken = &v - return s -} - -// SetSecretList sets the SecretList field's value. -func (s *ListSecretsOutput) SetSecretList(v []*SecretListEntry) *ListSecretsOutput { - s.SecretList = v - return s -} - -type PutResourcePolicyInput struct { - _ struct{} `type:"structure"` - - // A JSON-formatted string that's constructed according to the grammar and syntax - // for an AWS resource-based policy. The policy in the string identifies who - // can access or manage this secret and its versions. For information on how - // to format a JSON parameter for the various command line tool environments, - // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) - // in the AWS CLI User Guide. - // - // ResourcePolicy is a required field - ResourcePolicy *string `min:"1" type:"string" required:"true"` - - // Specifies the secret that you want to attach the resource-based policy to. - // You can specify either the ARN or the friendly name of the secret. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutResourcePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutResourcePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutResourcePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"} - if s.ResourcePolicy == nil { - invalidParams.Add(request.NewErrParamRequired("ResourcePolicy")) - } - if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1)) - } - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourcePolicy sets the ResourcePolicy field's value. -func (s *PutResourcePolicyInput) SetResourcePolicy(v string) *PutResourcePolicyInput { - s.ResourcePolicy = &v - return s -} - -// SetSecretId sets the SecretId field's value. -func (s *PutResourcePolicyInput) SetSecretId(v string) *PutResourcePolicyInput { - s.SecretId = &v - return s -} - -type PutResourcePolicyOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the secret that the resource-based policy was retrieved for. - ARN *string `min:"20" type:"string"` - - // The friendly name of the secret that the resource-based policy was retrieved - // for. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PutResourcePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutResourcePolicyOutput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *PutResourcePolicyOutput) SetARN(v string) *PutResourcePolicyOutput { - s.ARN = &v - return s -} - -// SetName sets the Name field's value. -func (s *PutResourcePolicyOutput) SetName(v string) *PutResourcePolicyOutput { - s.Name = &v - return s -} - -type PutSecretValueInput struct { - _ struct{} `type:"structure"` - - // (Optional) Specifies a unique identifier for the new version of the secret. - // - // If you use the AWS CLI or one of the AWS SDK to call this operation, then - // you can leave this parameter empty. The CLI or SDK generates a random UUID - // for you and includes that in the request. If you don't use the SDK and instead - // generate a raw HTTP request to the Secrets Manager service endpoint, then - // you must generate a ClientRequestToken yourself for new versions and include - // that value in the request. - // - // This value helps ensure idempotency. Secrets Manager uses this value to prevent - // the accidental creation of duplicate versions if there are failures and retries - // during the Lambda rotation function's processing. We recommend that you generate - // a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) value - // to ensure uniqueness within the specified secret. - // - // * If the ClientRequestToken value isn't already associated with a version - // of the secret then a new version of the secret is created. - // - // * If a version with this value already exists and that version's SecretString - // or SecretBinary values are the same as those in the request then the request - // is ignored (the operation is idempotent). - // - // * If a version with this value already exists and that version's SecretString - // and SecretBinary values are different from those in the request then the - // request fails because you cannot modify an existing secret version. You - // can only create new versions to store new secret values. - // - // This value becomes the VersionId of the new version. - ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` - - // (Optional) Specifies binary data that you want to encrypt and store in the - // new version of the secret. To use this parameter in the command-line tools, - // we recommend that you store your binary data in a file and then use the appropriate - // technique for your tool to pass the contents of the file as a parameter. - // Either SecretBinary or SecretString must have a value, but not both. They - // cannot both be empty. - // - // This parameter is not accessible if the secret using the Secrets Manager - // console. - // - // SecretBinary is automatically base64 encoded/decoded by the SDK. - SecretBinary []byte `type:"blob" sensitive:"true"` - - // Specifies the secret to which you want to add a new version. You can specify - // either the Amazon Resource Name (ARN) or the friendly name of the secret. - // The secret must already exist. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` - - // (Optional) Specifies text data that you want to encrypt and store in this - // new version of the secret. Either SecretString or SecretBinary must have - // a value, but not both. They cannot both be empty. - // - // If you create this secret by using the Secrets Manager console then Secrets - // Manager puts the protected secret text in only the SecretString parameter. - // The Secrets Manager console stores the information as a JSON structure of - // key/value pairs that the default Lambda rotation function knows how to parse. - // - // For storing multiple values, we recommend that you use a JSON text string - // argument and specify key/value pairs. For information on how to format a - // JSON parameter for the various command line tool environments, see Using - // JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) - // in the AWS CLI User Guide. - // - // For example: - // - // [{"username":"bob"},{"password":"abc123xyz456"}] - // - // If your command-line tool or SDK requires quotation marks around the parameter, - // you should use single quotes to avoid confusion with the double quotes required - // in the JSON text. - SecretString *string `type:"string" sensitive:"true"` - - // (Optional) Specifies a list of staging labels that are attached to this version - // of the secret. These staging labels are used to track the versions through - // the rotation process by the Lambda rotation function. - // - // A staging label must be unique to a single version of the secret. If you - // specify a staging label that's already associated with a different version - // of the same secret then that staging label is automatically removed from - // the other version and attached to this version. - // - // If you do not specify a value for VersionStages then Secrets Manager automatically - // moves the staging label AWSCURRENT to this new version. - VersionStages []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s PutSecretValueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutSecretValueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutSecretValueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutSecretValueInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) - } - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - if s.VersionStages != nil && len(s.VersionStages) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VersionStages", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *PutSecretValueInput) SetClientRequestToken(v string) *PutSecretValueInput { - s.ClientRequestToken = &v - return s -} - -// SetSecretBinary sets the SecretBinary field's value. -func (s *PutSecretValueInput) SetSecretBinary(v []byte) *PutSecretValueInput { - s.SecretBinary = v - return s -} - -// SetSecretId sets the SecretId field's value. -func (s *PutSecretValueInput) SetSecretId(v string) *PutSecretValueInput { - s.SecretId = &v - return s -} - -// SetSecretString sets the SecretString field's value. -func (s *PutSecretValueInput) SetSecretString(v string) *PutSecretValueInput { - s.SecretString = &v - return s -} - -// SetVersionStages sets the VersionStages field's value. -func (s *PutSecretValueInput) SetVersionStages(v []*string) *PutSecretValueInput { - s.VersionStages = v - return s -} - -type PutSecretValueOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the secret for which you just created - // a version. - ARN *string `min:"20" type:"string"` - - // The friendly name of the secret for which you just created or updated a version. - Name *string `min:"1" type:"string"` - - // The unique identifier of the version of the secret you just created or updated. - VersionId *string `min:"32" type:"string"` - - // The list of staging labels that are currently attached to this version of - // the secret. Staging labels are used to track a version as it progresses through - // the secret rotation process. - VersionStages []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s PutSecretValueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutSecretValueOutput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *PutSecretValueOutput) SetARN(v string) *PutSecretValueOutput { - s.ARN = &v - return s -} - -// SetName sets the Name field's value. -func (s *PutSecretValueOutput) SetName(v string) *PutSecretValueOutput { - s.Name = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *PutSecretValueOutput) SetVersionId(v string) *PutSecretValueOutput { - s.VersionId = &v - return s -} - -// SetVersionStages sets the VersionStages field's value. -func (s *PutSecretValueOutput) SetVersionStages(v []*string) *PutSecretValueOutput { - s.VersionStages = v - return s -} - -type RestoreSecretInput struct { - _ struct{} `type:"structure"` - - // Specifies the secret that you want to restore from a previously scheduled - // deletion. You can specify either the Amazon Resource Name (ARN) or the friendly - // name of the secret. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RestoreSecretInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreSecretInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreSecretInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreSecretInput"} - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecretId sets the SecretId field's value. -func (s *RestoreSecretInput) SetSecretId(v string) *RestoreSecretInput { - s.SecretId = &v - return s -} - -type RestoreSecretOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the secret that was restored. - ARN *string `min:"20" type:"string"` - - // The friendly name of the secret that was restored. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s RestoreSecretOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RestoreSecretOutput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *RestoreSecretOutput) SetARN(v string) *RestoreSecretOutput { - s.ARN = &v - return s -} - -// SetName sets the Name field's value. -func (s *RestoreSecretOutput) SetName(v string) *RestoreSecretOutput { - s.Name = &v - return s -} - -type RotateSecretInput struct { - _ struct{} `type:"structure"` - - // (Optional) Specifies a unique identifier for the new version of the secret - // that helps ensure idempotency. - // - // If you use the AWS CLI or one of the AWS SDK to call this operation, then - // you can leave this parameter empty. The CLI or SDK generates a random UUID - // for you and includes that in the request for this parameter. If you don't - // use the SDK and instead generate a raw HTTP request to the Secrets Manager - // service endpoint, then you must generate a ClientRequestToken yourself for - // new versions and include that value in the request. - // - // You only need to specify your own value if you are implementing your own - // retry logic and want to ensure that a given secret is not created twice. - // We recommend that you generate a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) - // value to ensure uniqueness within the specified secret. - // - // Secrets Manager uses this value to prevent the accidental creation of duplicate - // versions if there are failures and retries during the function's processing. - // This value becomes the VersionId of the new version. - ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` - - // (Optional) Specifies the ARN of the Lambda function that can rotate the secret. - RotationLambdaARN *string `type:"string"` - - // A structure that defines the rotation configuration for this secret. - RotationRules *RotationRulesType `type:"structure"` - - // Specifies the secret that you want to rotate. You can specify either the - // Amazon Resource Name (ARN) or the friendly name of the secret. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RotateSecretInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RotateSecretInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RotateSecretInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RotateSecretInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) - } - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - if s.RotationRules != nil { - if err := s.RotationRules.Validate(); err != nil { - invalidParams.AddNested("RotationRules", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *RotateSecretInput) SetClientRequestToken(v string) *RotateSecretInput { - s.ClientRequestToken = &v - return s -} - -// SetRotationLambdaARN sets the RotationLambdaARN field's value. -func (s *RotateSecretInput) SetRotationLambdaARN(v string) *RotateSecretInput { - s.RotationLambdaARN = &v - return s -} - -// SetRotationRules sets the RotationRules field's value. -func (s *RotateSecretInput) SetRotationRules(v *RotationRulesType) *RotateSecretInput { - s.RotationRules = v - return s -} - -// SetSecretId sets the SecretId field's value. -func (s *RotateSecretInput) SetSecretId(v string) *RotateSecretInput { - s.SecretId = &v - return s -} - -type RotateSecretOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the secret. - ARN *string `min:"20" type:"string"` - - // The friendly name of the secret. - Name *string `min:"1" type:"string"` - - // The ID of the new version of the secret created by the rotation started by - // this request. - VersionId *string `min:"32" type:"string"` -} - -// String returns the string representation -func (s RotateSecretOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RotateSecretOutput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *RotateSecretOutput) SetARN(v string) *RotateSecretOutput { - s.ARN = &v - return s -} - -// SetName sets the Name field's value. -func (s *RotateSecretOutput) SetName(v string) *RotateSecretOutput { - s.Name = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *RotateSecretOutput) SetVersionId(v string) *RotateSecretOutput { - s.VersionId = &v - return s -} - -// A structure that defines the rotation configuration for the secret. -type RotationRulesType struct { - _ struct{} `type:"structure"` - - // Specifies the number of days between automatic scheduled rotations of the - // secret. - // - // Secrets Manager schedules the next rotation when the previous one is complete. - // Secrets Manager schedules the date by adding the rotation interval (number - // of days) to the actual date of the last rotation. The service chooses the - // hour within that 24-hour date window randomly. The minute is also chosen - // somewhat randomly, but weighted towards the top of the hour and influenced - // by a variety of factors that help distribute load. - AutomaticallyAfterDays *int64 `min:"1" type:"long"` -} - -// String returns the string representation -func (s RotationRulesType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RotationRulesType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RotationRulesType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RotationRulesType"} - if s.AutomaticallyAfterDays != nil && *s.AutomaticallyAfterDays < 1 { - invalidParams.Add(request.NewErrParamMinValue("AutomaticallyAfterDays", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutomaticallyAfterDays sets the AutomaticallyAfterDays field's value. -func (s *RotationRulesType) SetAutomaticallyAfterDays(v int64) *RotationRulesType { - s.AutomaticallyAfterDays = &v - return s -} - -// A structure that contains the details about a secret. It does not include -// the encrypted SecretString and SecretBinary values. To get those values, -// use the GetSecretValue operation. -type SecretListEntry struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the secret. - // - // For more information about ARNs in Secrets Manager, see Policy Resources - // (http://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#iam-resources) - // in the AWS Secrets Manager User Guide. - ARN *string `min:"20" type:"string"` - - // The date and time on which this secret was deleted. Not present on active - // secrets. The secret can be recovered until the number of days in the recovery - // window has passed, as specified in the RecoveryWindowInDays parameter of - // the DeleteSecret operation. - DeletedDate *time.Time `type:"timestamp"` - - // The user-provided description of the secret. - Description *string `type:"string"` - - // The ARN or alias of the AWS KMS customer master key (CMK) that's used to - // encrypt the SecretString and SecretBinary fields in each version of the secret. - // If you don't provide a key, then Secrets Manager defaults to encrypting the - // secret fields with the default KMS CMK (the one named awssecretsmanager) - // for this account. - KmsKeyId *string `type:"string"` - - // The last date that this secret was accessed. This value is truncated to midnight - // of the date and therefore shows only the date, not the time. - LastAccessedDate *time.Time `type:"timestamp"` - - // The last date and time that this secret was modified in any way. - LastChangedDate *time.Time `type:"timestamp"` - - // The last date and time that the rotation process for this secret was invoked. - LastRotatedDate *time.Time `type:"timestamp"` - - // The friendly name of the secret. You can use forward slashes in the name - // to represent a path hierarchy. For example, /prod/databases/dbserver1 could - // represent the secret for a server named dbserver1 in the folder databases - // in the folder prod. - Name *string `min:"1" type:"string"` - - // Indicated whether automatic, scheduled rotation is enabled for this secret. - RotationEnabled *bool `type:"boolean"` - - // The ARN of an AWS Lambda function that's invoked by Secrets Manager to rotate - // and expire the secret either automatically per the schedule or manually by - // a call to RotateSecret. - RotationLambdaARN *string `type:"string"` - - // A structure that defines the rotation configuration for the secret. - RotationRules *RotationRulesType `type:"structure"` - - // A list of all of the currently assigned SecretVersionStage staging labels - // and the SecretVersionId that each is attached to. Staging labels are used - // to keep track of the different versions during the rotation process. - // - // A version that does not have any SecretVersionStage is considered deprecated - // and subject to deletion. Such versions are not included in this list. - SecretVersionsToStages map[string][]*string `type:"map"` - - // The list of user-defined tags that are associated with the secret. To add - // tags to a secret, use TagResource. To remove tags, use UntagResource. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s SecretListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecretListEntry) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *SecretListEntry) SetARN(v string) *SecretListEntry { - s.ARN = &v - return s -} - -// SetDeletedDate sets the DeletedDate field's value. -func (s *SecretListEntry) SetDeletedDate(v time.Time) *SecretListEntry { - s.DeletedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *SecretListEntry) SetDescription(v string) *SecretListEntry { - s.Description = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *SecretListEntry) SetKmsKeyId(v string) *SecretListEntry { - s.KmsKeyId = &v - return s -} - -// SetLastAccessedDate sets the LastAccessedDate field's value. -func (s *SecretListEntry) SetLastAccessedDate(v time.Time) *SecretListEntry { - s.LastAccessedDate = &v - return s -} - -// SetLastChangedDate sets the LastChangedDate field's value. -func (s *SecretListEntry) SetLastChangedDate(v time.Time) *SecretListEntry { - s.LastChangedDate = &v - return s -} - -// SetLastRotatedDate sets the LastRotatedDate field's value. -func (s *SecretListEntry) SetLastRotatedDate(v time.Time) *SecretListEntry { - s.LastRotatedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *SecretListEntry) SetName(v string) *SecretListEntry { - s.Name = &v - return s -} - -// SetRotationEnabled sets the RotationEnabled field's value. -func (s *SecretListEntry) SetRotationEnabled(v bool) *SecretListEntry { - s.RotationEnabled = &v - return s -} - -// SetRotationLambdaARN sets the RotationLambdaARN field's value. -func (s *SecretListEntry) SetRotationLambdaARN(v string) *SecretListEntry { - s.RotationLambdaARN = &v - return s -} - -// SetRotationRules sets the RotationRules field's value. -func (s *SecretListEntry) SetRotationRules(v *RotationRulesType) *SecretListEntry { - s.RotationRules = v - return s -} - -// SetSecretVersionsToStages sets the SecretVersionsToStages field's value. -func (s *SecretListEntry) SetSecretVersionsToStages(v map[string][]*string) *SecretListEntry { - s.SecretVersionsToStages = v - return s -} - -// SetTags sets the Tags field's value. -func (s *SecretListEntry) SetTags(v []*Tag) *SecretListEntry { - s.Tags = v - return s -} - -// A structure that contains information about one version of a secret. -type SecretVersionsListEntry struct { - _ struct{} `type:"structure"` - - // The date and time this version of the secret was created. - CreatedDate *time.Time `type:"timestamp"` - - // The date that this version of the secret was last accessed. Note that the - // resolution of this field is at the date level and does not include the time. - LastAccessedDate *time.Time `type:"timestamp"` - - // The unique version identifier of this version of the secret. - VersionId *string `min:"32" type:"string"` - - // An array of staging labels that are currently associated with this version - // of the secret. - VersionStages []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s SecretVersionsListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SecretVersionsListEntry) GoString() string { - return s.String() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *SecretVersionsListEntry) SetCreatedDate(v time.Time) *SecretVersionsListEntry { - s.CreatedDate = &v - return s -} - -// SetLastAccessedDate sets the LastAccessedDate field's value. -func (s *SecretVersionsListEntry) SetLastAccessedDate(v time.Time) *SecretVersionsListEntry { - s.LastAccessedDate = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *SecretVersionsListEntry) SetVersionId(v string) *SecretVersionsListEntry { - s.VersionId = &v - return s -} - -// SetVersionStages sets the VersionStages field's value. -func (s *SecretVersionsListEntry) SetVersionStages(v []*string) *SecretVersionsListEntry { - s.VersionStages = v - return s -} - -// A structure that contains information about a tag. -type Tag struct { - _ struct{} `type:"structure"` - - // The key identifier, or name, of the tag. - Key *string `min:"1" type:"string"` - - // The string value that's associated with the key of the tag. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The identifier for the secret that you want to attach tags to. You can specify - // either the Amazon Resource Name (ARN) or the friendly name of the secret. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` - - // The tags to attach to the secret. Each element in the list consists of a - // Key and a Value. - // - // This parameter to the API requires a JSON text string argument. For information - // on how to format a JSON parameter for the various command line tool environments, - // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) - // in the AWS CLI User Guide. For the AWS CLI, you can also use the syntax: - // --Tags Key="Key1",Value="Value1",Key="Key2",Value="Value2"[,…] - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecretId sets the SecretId field's value. -func (s *TagResourceInput) SetSecretId(v string) *TagResourceInput { - s.SecretId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The identifier for the secret that you want to remove tags from. You can - // specify either the Amazon Resource Name (ARN) or the friendly name of the - // secret. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` - - // A list of tag key names to remove from the secret. You don't specify the - // value. Both the key and its associated value are removed. - // - // This parameter to the API requires a JSON text string argument. For information - // on how to format a JSON parameter for the various command line tool environments, - // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) - // in the AWS CLI User Guide. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s UntagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSecretId sets the SecretId field's value. -func (s *UntagResourceInput) SetSecretId(v string) *UntagResourceInput { - s.SecretId = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UpdateSecretInput struct { - _ struct{} `type:"structure"` - - // (Optional) If you want to add a new version to the secret, this parameter - // specifies a unique identifier for the new version that helps ensure idempotency. - // - // If you use the AWS CLI or one of the AWS SDK to call this operation, then - // you can leave this parameter empty. The CLI or SDK generates a random UUID - // for you and includes that in the request. If you don't use the SDK and instead - // generate a raw HTTP request to the Secrets Manager service endpoint, then - // you must generate a ClientRequestToken yourself for new versions and include - // that value in the request. - // - // You typically only need to interact with this value if you implement your - // own retry logic and want to ensure that a given secret is not created twice. - // We recommend that you generate a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) - // value to ensure uniqueness within the specified secret. - // - // Secrets Manager uses this value to prevent the accidental creation of duplicate - // versions if there are failures and retries during the Lambda rotation function's - // processing. - // - // * If the ClientRequestToken value isn't already associated with a version - // of the secret then a new version of the secret is created. - // - // * If a version with this value already exists and that version's SecretString - // and SecretBinary values are the same as those in the request then the - // request is ignored (the operation is idempotent). - // - // * If a version with this value already exists and that version's SecretString - // and SecretBinary values are different from the request then an error occurs - // because you cannot modify an existing secret value. - // - // This value becomes the VersionId of the new version. - ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` - - // (Optional) Specifies an updated user-provided description of the secret. - Description *string `type:"string"` - - // (Optional) Specifies an updated ARN or alias of the AWS KMS customer master - // key (CMK) to be used to encrypt the protected text in new versions of this - // secret. - // - // You can only use the account's default CMK to encrypt and decrypt if you - // call this operation using credentials from the same account that owns the - // secret. If the secret is in a different account, then you must create a custom - // CMK and provide the ARN of that CMK in this field. The user making the call - // must have permissions to both the secret and the CMK in their respective - // accounts. - KmsKeyId *string `type:"string"` - - // (Optional) Specifies updated binary data that you want to encrypt and store - // in the new version of the secret. To use this parameter in the command-line - // tools, we recommend that you store your binary data in a file and then use - // the appropriate technique for your tool to pass the contents of the file - // as a parameter. Either SecretBinary or SecretString must have a value, but - // not both. They cannot both be empty. - // - // This parameter is not accessible using the Secrets Manager console. - // - // SecretBinary is automatically base64 encoded/decoded by the SDK. - SecretBinary []byte `type:"blob" sensitive:"true"` - - // Specifies the secret that you want to modify or to which you want to add - // a new version. You can specify either the Amazon Resource Name (ARN) or the - // friendly name of the secret. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` - - // (Optional) Specifies updated text data that you want to encrypt and store - // in this new version of the secret. Either SecretBinary or SecretString must - // have a value, but not both. They cannot both be empty. - // - // If you create this secret by using the Secrets Manager console then Secrets - // Manager puts the protected secret text in only the SecretString parameter. - // The Secrets Manager console stores the information as a JSON structure of - // key/value pairs that the default Lambda rotation function knows how to parse. - // - // For storing multiple values, we recommend that you use a JSON text string - // argument and specify key/value pairs. For information on how to format a - // JSON parameter for the various command line tool environments, see Using - // JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) - // in the AWS CLI User Guide. For example: - // - // [{"username":"bob"},{"password":"abc123xyz456"}] - // - // If your command-line tool or SDK requires quotation marks around the parameter, - // you should use single quotes to avoid confusion with the double quotes required - // in the JSON text. You can also 'escape' the double quote character in the - // embedded JSON text by prefacing each with a backslash. For example, the following - // string is surrounded by double-quotes. All of the embedded double quotes - // are escaped: - // - // "[{\"username\":\"bob\"},{\"password\":\"abc123xyz456\"}]" - SecretString *string `type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s UpdateSecretInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSecretInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSecretInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSecretInput"} - if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) - } - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientRequestToken sets the ClientRequestToken field's value. -func (s *UpdateSecretInput) SetClientRequestToken(v string) *UpdateSecretInput { - s.ClientRequestToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateSecretInput) SetDescription(v string) *UpdateSecretInput { - s.Description = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *UpdateSecretInput) SetKmsKeyId(v string) *UpdateSecretInput { - s.KmsKeyId = &v - return s -} - -// SetSecretBinary sets the SecretBinary field's value. -func (s *UpdateSecretInput) SetSecretBinary(v []byte) *UpdateSecretInput { - s.SecretBinary = v - return s -} - -// SetSecretId sets the SecretId field's value. -func (s *UpdateSecretInput) SetSecretId(v string) *UpdateSecretInput { - s.SecretId = &v - return s -} - -// SetSecretString sets the SecretString field's value. -func (s *UpdateSecretInput) SetSecretString(v string) *UpdateSecretInput { - s.SecretString = &v - return s -} - -type UpdateSecretOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the secret that was updated. - // - // Secrets Manager automatically adds several random characters to the name - // at the end of the ARN when you initially create a secret. This affects only - // the ARN and not the actual friendly name. This ensures that if you create - // a new secret with the same name as an old secret that you previously deleted, - // then users with access to the old secret don't automatically get access to - // the new secret because the ARNs are different. - ARN *string `min:"20" type:"string"` - - // The friendly name of the secret that was updated. - Name *string `min:"1" type:"string"` - - // If a new version of the secret was created by this operation, then VersionId - // contains the unique identifier of the new version. - VersionId *string `min:"32" type:"string"` -} - -// String returns the string representation -func (s UpdateSecretOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSecretOutput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *UpdateSecretOutput) SetARN(v string) *UpdateSecretOutput { - s.ARN = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateSecretOutput) SetName(v string) *UpdateSecretOutput { - s.Name = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *UpdateSecretOutput) SetVersionId(v string) *UpdateSecretOutput { - s.VersionId = &v - return s -} - -type UpdateSecretVersionStageInput struct { - _ struct{} `type:"structure"` - - // (Optional) The secret version ID that you want to add the staging label to. - // If you want to remove a label from a version, then do not specify this parameter. - // - // If the staging label is already attached to a different version of the secret, - // then you must also specify the RemoveFromVersionId parameter. - MoveToVersionId *string `min:"32" type:"string"` - - // Specifies the secret version ID of the version that the staging label is - // to be removed from. If the staging label you are trying to attach to one - // version is already attached to a different version, then you must include - // this parameter and specify the version that the label is to be removed from. - // If the label is attached and you either do not specify this parameter, or - // the version ID does not match, then the operation fails. - RemoveFromVersionId *string `min:"32" type:"string"` - - // Specifies the secret with the version whose list of staging labels you want - // to modify. You can specify either the Amazon Resource Name (ARN) or the friendly - // name of the secret. - // - // If you specify an ARN, we generally recommend that you specify a complete - // ARN. You can specify a partial ARN too—for example, if you don’t include - // the final hyphen and six random characters that Secrets Manager adds at the - // end of the ARN when you created the secret. A partial ARN match can work - // as long as it uniquely matches only one secret. However, if your secret has - // a name that ends in a hyphen followed by six characters (before Secrets Manager - // adds the hyphen and six characters to the ARN) and you try to use that as - // a partial ARN, then those characters cause Secrets Manager to assume that - // you’re specifying a complete ARN. This confusion can cause unexpected results. - // To avoid this situation, we recommend that you don’t create secret names - // that end with a hyphen followed by six characters. - // - // SecretId is a required field - SecretId *string `min:"1" type:"string" required:"true"` - - // The staging label to add to this version. - // - // VersionStage is a required field - VersionStage *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateSecretVersionStageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSecretVersionStageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSecretVersionStageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSecretVersionStageInput"} - if s.MoveToVersionId != nil && len(*s.MoveToVersionId) < 32 { - invalidParams.Add(request.NewErrParamMinLen("MoveToVersionId", 32)) - } - if s.RemoveFromVersionId != nil && len(*s.RemoveFromVersionId) < 32 { - invalidParams.Add(request.NewErrParamMinLen("RemoveFromVersionId", 32)) - } - if s.SecretId == nil { - invalidParams.Add(request.NewErrParamRequired("SecretId")) - } - if s.SecretId != nil && len(*s.SecretId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) - } - if s.VersionStage == nil { - invalidParams.Add(request.NewErrParamRequired("VersionStage")) - } - if s.VersionStage != nil && len(*s.VersionStage) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VersionStage", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMoveToVersionId sets the MoveToVersionId field's value. -func (s *UpdateSecretVersionStageInput) SetMoveToVersionId(v string) *UpdateSecretVersionStageInput { - s.MoveToVersionId = &v - return s -} - -// SetRemoveFromVersionId sets the RemoveFromVersionId field's value. -func (s *UpdateSecretVersionStageInput) SetRemoveFromVersionId(v string) *UpdateSecretVersionStageInput { - s.RemoveFromVersionId = &v - return s -} - -// SetSecretId sets the SecretId field's value. -func (s *UpdateSecretVersionStageInput) SetSecretId(v string) *UpdateSecretVersionStageInput { - s.SecretId = &v - return s -} - -// SetVersionStage sets the VersionStage field's value. -func (s *UpdateSecretVersionStageInput) SetVersionStage(v string) *UpdateSecretVersionStageInput { - s.VersionStage = &v - return s -} - -type UpdateSecretVersionStageOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the secret with the staging label that was modified. - ARN *string `min:"20" type:"string"` - - // The friendly name of the secret with the staging label that was modified. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateSecretVersionStageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSecretVersionStageOutput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *UpdateSecretVersionStageOutput) SetARN(v string) *UpdateSecretVersionStageOutput { - s.ARN = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateSecretVersionStageOutput) SetName(v string) *UpdateSecretVersionStageOutput { - s.Name = &v - return s -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go deleted file mode 100644 index 0379c4365..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package secretsmanager provides the client and types for making API -// requests to AWS Secrets Manager. -// -// AWS Secrets Manager is a web service that enables you to store, manage, and -// retrieve, secrets. -// -// This guide provides descriptions of the Secrets Manager API. For more information -// about using this service, see the AWS Secrets Manager User Guide (http://docs.aws.amazon.com/secretsmanager/latest/userguide/introduction.html). -// -// API Version -// -// This version of the Secrets Manager API Reference documents the Secrets Manager -// API version 2017-10-17. -// -// As an alternative to using the API directly, you can use one of the AWS SDKs, -// which consist of libraries and sample code for various programming languages -// and platforms (such as Java, Ruby, .NET, iOS, and Android). The SDKs provide -// a convenient way to create programmatic access to AWS Secrets Manager. For -// example, the SDKs take care of cryptographically signing requests, managing -// errors, and retrying requests automatically. For more information about the -// AWS SDKs, including how to download and install them, see Tools for Amazon -// Web Services (http://aws.amazon.com/tools/). -// -// We recommend that you use the AWS SDKs to make programmatic API calls to -// Secrets Manager. However, you also can use the Secrets Manager HTTP Query -// API to make direct calls to the Secrets Manager web service. To learn more -// about the Secrets Manager HTTP Query API, see Making Query Requests (http://docs.aws.amazon.com/secretsmanager/latest/userguide/query-requests.html) -// in the AWS Secrets Manager User Guide. -// -// Secrets Manager supports GET and POST requests for all actions. That is, -// the API doesn't require you to use GET for some actions and POST for others. -// However, GET requests are subject to the limitation size of a URL. Therefore, -// for operations that require larger sizes, use a POST request. -// -// Support and Feedback for AWS Secrets Manager -// -// We welcome your feedback. Send your comments to awssecretsmanager-feedback@amazon.com -// (mailto:awssecretsmanager-feedback@amazon.com), or post your feedback and -// questions in the AWS Secrets Manager Discussion Forum (http://forums.aws.amazon.com/forum.jspa?forumID=296). -// For more information about the AWS Discussion Forums, see Forums Help (http://forums.aws.amazon.com/help.jspa). -// -// How examples are presented -// -// The JSON that AWS Secrets Manager expects as your request parameters and -// that the service returns as a response to HTTP query requests are single, -// long strings without line breaks or white space formatting. The JSON shown -// in the examples is formatted with both line breaks and white space to improve -// readability. When example input parameters would also result in long strings -// that extend beyond the screen, we insert line breaks to enhance readability. -// You should always submit the input as a single JSON text string. -// -// Logging API Requests -// -// AWS Secrets Manager supports AWS CloudTrail, a service that records AWS API -// calls for your AWS account and delivers log files to an Amazon S3 bucket. -// By using information that's collected by AWS CloudTrail, you can determine -// which requests were successfully made to Secrets Manager, who made the request, -// when it was made, and so on. For more about AWS Secrets Manager and its support -// for AWS CloudTrail, see Logging AWS Secrets Manager Events with AWS CloudTrail -// (http://docs.aws.amazon.com/secretsmanager/latest/userguide/monitoring.html#monitoring_cloudtrail) -// in the AWS Secrets Manager User Guide. To learn more about CloudTrail, including -// how to turn it on and find your log files, see the AWS CloudTrail User Guide -// (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17 for more information on this service. -// -// See secretsmanager package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/secretsmanager/ -// -// Using the Client -// -// To contact AWS Secrets Manager with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS Secrets Manager client SecretsManager for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/secretsmanager/#New -package secretsmanager diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go deleted file mode 100644 index b3c0c48fd..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package secretsmanager - -const ( - - // ErrCodeDecryptionFailure for service response error code - // "DecryptionFailure". - // - // Secrets Manager can't decrypt the protected secret text using the provided - // KMS key. - ErrCodeDecryptionFailure = "DecryptionFailure" - - // ErrCodeEncryptionFailure for service response error code - // "EncryptionFailure". - // - // Secrets Manager can't encrypt the protected secret text using the provided - // KMS key. Check that the customer master key (CMK) is available, enabled, - // and not in an invalid state. For more information, see How Key State Affects - // Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). - ErrCodeEncryptionFailure = "EncryptionFailure" - - // ErrCodeInternalServiceError for service response error code - // "InternalServiceError". - // - // An error occurred on the server side. - ErrCodeInternalServiceError = "InternalServiceError" - - // ErrCodeInvalidNextTokenException for service response error code - // "InvalidNextTokenException". - // - // You provided an invalid NextToken value. - ErrCodeInvalidNextTokenException = "InvalidNextTokenException" - - // ErrCodeInvalidParameterException for service response error code - // "InvalidParameterException". - // - // You provided an invalid value for a parameter. - ErrCodeInvalidParameterException = "InvalidParameterException" - - // ErrCodeInvalidRequestException for service response error code - // "InvalidRequestException". - // - // You provided a parameter value that is not valid for the current state of - // the resource. - // - // Possible causes: - // - // * You tried to perform the operation on a secret that's currently marked - // deleted. - // - // * You tried to enable rotation on a secret that doesn't already have a - // Lambda function ARN configured and you didn't include such an ARN as a - // parameter in this call. - ErrCodeInvalidRequestException = "InvalidRequestException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The request failed because it would exceed one of the Secrets Manager internal - // limits. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeMalformedPolicyDocumentException for service response error code - // "MalformedPolicyDocumentException". - // - // The policy document that you provided isn't valid. - ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocumentException" - - // ErrCodePreconditionNotMetException for service response error code - // "PreconditionNotMetException". - // - // The request failed because you did not complete all the prerequisite steps. - ErrCodePreconditionNotMetException = "PreconditionNotMetException" - - // ErrCodeResourceExistsException for service response error code - // "ResourceExistsException". - // - // A resource with the ID you requested already exists. - ErrCodeResourceExistsException = "ResourceExistsException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // We can't find the resource that you asked for. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go deleted file mode 100644 index c4758e96d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package secretsmanager - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// SecretsManager provides the API operation methods for making requests to -// AWS Secrets Manager. See this package's package overview docs -// for details on the service. -// -// SecretsManager methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type SecretsManager struct { - *client.Client -} - -// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) - -// Service information constants -const ( - ServiceName = "secretsmanager" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Secrets Manager" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the SecretsManager client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a SecretsManager client from just a session. -// svc := secretsmanager.New(mySession) -// -// // Create a SecretsManager client with additional configuration -// svc := secretsmanager.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *SecretsManager { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "secretsmanager" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *SecretsManager { - svc := &SecretsManager{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-10-17", - JSONVersion: "1.1", - TargetPrefix: "secretsmanager", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a SecretsManager operation and runs any -// custom request initialization. -func (c *SecretsManager) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/securityhub/api.go b/vendor/github.com/aws/aws-sdk-go/service/securityhub/api.go deleted file mode 100644 index 6b8314364..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/securityhub/api.go +++ /dev/null @@ -1,7805 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package securityhub - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opAcceptInvitation = "AcceptInvitation" - -// AcceptInvitationRequest generates a "aws/request.Request" representing the -// client's request for the AcceptInvitation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcceptInvitation for more information on using the AcceptInvitation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcceptInvitationRequest method. -// req, resp := client.AcceptInvitationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/AcceptInvitation -func (c *SecurityHub) AcceptInvitationRequest(input *AcceptInvitationInput) (req *request.Request, output *AcceptInvitationOutput) { - op := &request.Operation{ - Name: opAcceptInvitation, - HTTPMethod: "POST", - HTTPPath: "/master", - } - - if input == nil { - input = &AcceptInvitationInput{} - } - - output = &AcceptInvitationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AcceptInvitation API operation for AWS SecurityHub. -// -// Accepts the invitation to be monitored by a master SecurityHub 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 SecurityHub's -// API operation AcceptInvitation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/AcceptInvitation -func (c *SecurityHub) AcceptInvitation(input *AcceptInvitationInput) (*AcceptInvitationOutput, error) { - req, out := c.AcceptInvitationRequest(input) - return out, req.Send() -} - -// AcceptInvitationWithContext is the same as AcceptInvitation with the addition of -// the ability to pass a context and additional request options. -// -// See AcceptInvitation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) AcceptInvitationWithContext(ctx aws.Context, input *AcceptInvitationInput, opts ...request.Option) (*AcceptInvitationOutput, error) { - req, out := c.AcceptInvitationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchDisableStandards = "BatchDisableStandards" - -// BatchDisableStandardsRequest generates a "aws/request.Request" representing the -// client's request for the BatchDisableStandards operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchDisableStandards for more information on using the BatchDisableStandards -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchDisableStandardsRequest method. -// req, resp := client.BatchDisableStandardsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/BatchDisableStandards -func (c *SecurityHub) BatchDisableStandardsRequest(input *BatchDisableStandardsInput) (req *request.Request, output *BatchDisableStandardsOutput) { - op := &request.Operation{ - Name: opBatchDisableStandards, - HTTPMethod: "POST", - HTTPPath: "/standards/deregister", - } - - if input == nil { - input = &BatchDisableStandardsInput{} - } - - output = &BatchDisableStandardsOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchDisableStandards API operation for AWS SecurityHub. -// -// Disables the standards specified by the standards subscription ARNs. In the -// context of Security Hub, supported standards (for example, CIS AWS Foundations) -// are automated and continuous checks that help determine your compliance status -// against security industry (including AWS) best practices. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation BatchDisableStandards for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/BatchDisableStandards -func (c *SecurityHub) BatchDisableStandards(input *BatchDisableStandardsInput) (*BatchDisableStandardsOutput, error) { - req, out := c.BatchDisableStandardsRequest(input) - return out, req.Send() -} - -// BatchDisableStandardsWithContext is the same as BatchDisableStandards with the addition of -// the ability to pass a context and additional request options. -// -// See BatchDisableStandards for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) BatchDisableStandardsWithContext(ctx aws.Context, input *BatchDisableStandardsInput, opts ...request.Option) (*BatchDisableStandardsOutput, error) { - req, out := c.BatchDisableStandardsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchEnableStandards = "BatchEnableStandards" - -// BatchEnableStandardsRequest generates a "aws/request.Request" representing the -// client's request for the BatchEnableStandards operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchEnableStandards for more information on using the BatchEnableStandards -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchEnableStandardsRequest method. -// req, resp := client.BatchEnableStandardsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/BatchEnableStandards -func (c *SecurityHub) BatchEnableStandardsRequest(input *BatchEnableStandardsInput) (req *request.Request, output *BatchEnableStandardsOutput) { - op := &request.Operation{ - Name: opBatchEnableStandards, - HTTPMethod: "POST", - HTTPPath: "/standards/register", - } - - if input == nil { - input = &BatchEnableStandardsInput{} - } - - output = &BatchEnableStandardsOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchEnableStandards API operation for AWS SecurityHub. -// -// Enables the standards specified by the standards ARNs. In the context of -// Security Hub, supported standards (for example, CIS AWS Foundations) are -// automated and continuous checks that help determine your compliance status -// against security industry (including AWS) best practices. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation BatchEnableStandards for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/BatchEnableStandards -func (c *SecurityHub) BatchEnableStandards(input *BatchEnableStandardsInput) (*BatchEnableStandardsOutput, error) { - req, out := c.BatchEnableStandardsRequest(input) - return out, req.Send() -} - -// BatchEnableStandardsWithContext is the same as BatchEnableStandards with the addition of -// the ability to pass a context and additional request options. -// -// See BatchEnableStandards for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) BatchEnableStandardsWithContext(ctx aws.Context, input *BatchEnableStandardsInput, opts ...request.Option) (*BatchEnableStandardsOutput, error) { - req, out := c.BatchEnableStandardsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchImportFindings = "BatchImportFindings" - -// BatchImportFindingsRequest generates a "aws/request.Request" representing the -// client's request for the BatchImportFindings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchImportFindings for more information on using the BatchImportFindings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchImportFindingsRequest method. -// req, resp := client.BatchImportFindingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/BatchImportFindings -func (c *SecurityHub) BatchImportFindingsRequest(input *BatchImportFindingsInput) (req *request.Request, output *BatchImportFindingsOutput) { - op := &request.Operation{ - Name: opBatchImportFindings, - HTTPMethod: "POST", - HTTPPath: "/findings/import", - } - - if input == nil { - input = &BatchImportFindingsInput{} - } - - output = &BatchImportFindingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchImportFindings API operation for AWS SecurityHub. -// -// Imports security findings that are generated by the integrated third-party -// products into Security Hub. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation BatchImportFindings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/BatchImportFindings -func (c *SecurityHub) BatchImportFindings(input *BatchImportFindingsInput) (*BatchImportFindingsOutput, error) { - req, out := c.BatchImportFindingsRequest(input) - return out, req.Send() -} - -// BatchImportFindingsWithContext is the same as BatchImportFindings with the addition of -// the ability to pass a context and additional request options. -// -// See BatchImportFindings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) BatchImportFindingsWithContext(ctx aws.Context, input *BatchImportFindingsInput, opts ...request.Option) (*BatchImportFindingsOutput, error) { - req, out := c.BatchImportFindingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateInsight = "CreateInsight" - -// CreateInsightRequest generates a "aws/request.Request" representing the -// client's request for the CreateInsight operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateInsight for more information on using the CreateInsight -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateInsightRequest method. -// req, resp := client.CreateInsightRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/CreateInsight -func (c *SecurityHub) CreateInsightRequest(input *CreateInsightInput) (req *request.Request, output *CreateInsightOutput) { - op := &request.Operation{ - Name: opCreateInsight, - HTTPMethod: "POST", - HTTPPath: "/insights", - } - - if input == nil { - input = &CreateInsightInput{} - } - - output = &CreateInsightOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateInsight API operation for AWS SecurityHub. -// -// Creates an insight, which is a consolidation of findings that identifies -// a security area that requires attention or intervention. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation CreateInsight for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/CreateInsight -func (c *SecurityHub) CreateInsight(input *CreateInsightInput) (*CreateInsightOutput, error) { - req, out := c.CreateInsightRequest(input) - return out, req.Send() -} - -// CreateInsightWithContext is the same as CreateInsight with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInsight for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) CreateInsightWithContext(ctx aws.Context, input *CreateInsightInput, opts ...request.Option) (*CreateInsightOutput, error) { - req, out := c.CreateInsightRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateMembers = "CreateMembers" - -// CreateMembersRequest generates a "aws/request.Request" representing the -// client's request for the CreateMembers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateMembers for more information on using the CreateMembers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateMembersRequest method. -// req, resp := client.CreateMembersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/CreateMembers -func (c *SecurityHub) CreateMembersRequest(input *CreateMembersInput) (req *request.Request, output *CreateMembersOutput) { - op := &request.Operation{ - Name: opCreateMembers, - HTTPMethod: "POST", - HTTPPath: "/members", - } - - if input == nil { - input = &CreateMembersInput{} - } - - output = &CreateMembersOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateMembers API operation for AWS SecurityHub. -// -// Creates member Security Hub accounts in the current AWS account (which becomes -// the master Security Hub account) that has Security Hub enabled. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation CreateMembers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/CreateMembers -func (c *SecurityHub) CreateMembers(input *CreateMembersInput) (*CreateMembersOutput, error) { - req, out := c.CreateMembersRequest(input) - return out, req.Send() -} - -// CreateMembersWithContext is the same as CreateMembers with the addition of -// the ability to pass a context and additional request options. -// -// See CreateMembers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) CreateMembersWithContext(ctx aws.Context, input *CreateMembersInput, opts ...request.Option) (*CreateMembersOutput, error) { - req, out := c.CreateMembersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeclineInvitations = "DeclineInvitations" - -// DeclineInvitationsRequest generates a "aws/request.Request" representing the -// client's request for the DeclineInvitations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeclineInvitations for more information on using the DeclineInvitations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeclineInvitationsRequest method. -// req, resp := client.DeclineInvitationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeclineInvitations -func (c *SecurityHub) DeclineInvitationsRequest(input *DeclineInvitationsInput) (req *request.Request, output *DeclineInvitationsOutput) { - op := &request.Operation{ - Name: opDeclineInvitations, - HTTPMethod: "POST", - HTTPPath: "/invitations/decline", - } - - if input == nil { - input = &DeclineInvitationsInput{} - } - - output = &DeclineInvitationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeclineInvitations API operation for AWS SecurityHub. -// -// Declines invitations that are sent to this AWS account (invitee) by the AWS -// accounts (inviters) that are specified by the account IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation DeclineInvitations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeclineInvitations -func (c *SecurityHub) DeclineInvitations(input *DeclineInvitationsInput) (*DeclineInvitationsOutput, error) { - req, out := c.DeclineInvitationsRequest(input) - return out, req.Send() -} - -// DeclineInvitationsWithContext is the same as DeclineInvitations with the addition of -// the ability to pass a context and additional request options. -// -// See DeclineInvitations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) DeclineInvitationsWithContext(ctx aws.Context, input *DeclineInvitationsInput, opts ...request.Option) (*DeclineInvitationsOutput, error) { - req, out := c.DeclineInvitationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteInsight = "DeleteInsight" - -// DeleteInsightRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInsight operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteInsight for more information on using the DeleteInsight -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteInsightRequest method. -// req, resp := client.DeleteInsightRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeleteInsight -func (c *SecurityHub) DeleteInsightRequest(input *DeleteInsightInput) (req *request.Request, output *DeleteInsightOutput) { - op := &request.Operation{ - Name: opDeleteInsight, - HTTPMethod: "DELETE", - HTTPPath: "/insights/{InsightArn+}", - } - - if input == nil { - input = &DeleteInsightInput{} - } - - output = &DeleteInsightOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteInsight API operation for AWS SecurityHub. -// -// Deletes an insight that is specified by the insight 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 SecurityHub's -// API operation DeleteInsight for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeleteInsight -func (c *SecurityHub) DeleteInsight(input *DeleteInsightInput) (*DeleteInsightOutput, error) { - req, out := c.DeleteInsightRequest(input) - return out, req.Send() -} - -// DeleteInsightWithContext is the same as DeleteInsight with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteInsight for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) DeleteInsightWithContext(ctx aws.Context, input *DeleteInsightInput, opts ...request.Option) (*DeleteInsightOutput, error) { - req, out := c.DeleteInsightRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteInvitations = "DeleteInvitations" - -// DeleteInvitationsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInvitations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteInvitations for more information on using the DeleteInvitations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteInvitationsRequest method. -// req, resp := client.DeleteInvitationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeleteInvitations -func (c *SecurityHub) DeleteInvitationsRequest(input *DeleteInvitationsInput) (req *request.Request, output *DeleteInvitationsOutput) { - op := &request.Operation{ - Name: opDeleteInvitations, - HTTPMethod: "POST", - HTTPPath: "/invitations/delete", - } - - if input == nil { - input = &DeleteInvitationsInput{} - } - - output = &DeleteInvitationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteInvitations API operation for AWS SecurityHub. -// -// Deletes invitations that are sent to this AWS account (invitee) by the AWS -// accounts (inviters) that are specified by their account IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation DeleteInvitations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeleteInvitations -func (c *SecurityHub) DeleteInvitations(input *DeleteInvitationsInput) (*DeleteInvitationsOutput, error) { - req, out := c.DeleteInvitationsRequest(input) - return out, req.Send() -} - -// DeleteInvitationsWithContext is the same as DeleteInvitations with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteInvitations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) DeleteInvitationsWithContext(ctx aws.Context, input *DeleteInvitationsInput, opts ...request.Option) (*DeleteInvitationsOutput, error) { - req, out := c.DeleteInvitationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteMembers = "DeleteMembers" - -// DeleteMembersRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMembers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteMembers for more information on using the DeleteMembers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteMembersRequest method. -// req, resp := client.DeleteMembersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeleteMembers -func (c *SecurityHub) DeleteMembersRequest(input *DeleteMembersInput) (req *request.Request, output *DeleteMembersOutput) { - op := &request.Operation{ - Name: opDeleteMembers, - HTTPMethod: "POST", - HTTPPath: "/members/delete", - } - - if input == nil { - input = &DeleteMembersInput{} - } - - output = &DeleteMembersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteMembers API operation for AWS SecurityHub. -// -// Deletes the Security Hub member accounts that are specified by the account -// IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation DeleteMembers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DeleteMembers -func (c *SecurityHub) DeleteMembers(input *DeleteMembersInput) (*DeleteMembersOutput, error) { - req, out := c.DeleteMembersRequest(input) - return out, req.Send() -} - -// DeleteMembersWithContext is the same as DeleteMembers with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteMembers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) DeleteMembersWithContext(ctx aws.Context, input *DeleteMembersInput, opts ...request.Option) (*DeleteMembersOutput, error) { - req, out := c.DeleteMembersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableImportFindingsForProduct = "DisableImportFindingsForProduct" - -// DisableImportFindingsForProductRequest generates a "aws/request.Request" representing the -// client's request for the DisableImportFindingsForProduct operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableImportFindingsForProduct for more information on using the DisableImportFindingsForProduct -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableImportFindingsForProductRequest method. -// req, resp := client.DisableImportFindingsForProductRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisableImportFindingsForProduct -func (c *SecurityHub) DisableImportFindingsForProductRequest(input *DisableImportFindingsForProductInput) (req *request.Request, output *DisableImportFindingsForProductOutput) { - op := &request.Operation{ - Name: opDisableImportFindingsForProduct, - HTTPMethod: "DELETE", - HTTPPath: "/productSubscriptions/{ProductSubscriptionArn+}", - } - - if input == nil { - input = &DisableImportFindingsForProductInput{} - } - - output = &DisableImportFindingsForProductOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisableImportFindingsForProduct API operation for AWS SecurityHub. -// -// Stops you from being able to import findings generated by integrated third-party -// providers into Security Hub. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation DisableImportFindingsForProduct for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisableImportFindingsForProduct -func (c *SecurityHub) DisableImportFindingsForProduct(input *DisableImportFindingsForProductInput) (*DisableImportFindingsForProductOutput, error) { - req, out := c.DisableImportFindingsForProductRequest(input) - return out, req.Send() -} - -// DisableImportFindingsForProductWithContext is the same as DisableImportFindingsForProduct with the addition of -// the ability to pass a context and additional request options. -// -// See DisableImportFindingsForProduct for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) DisableImportFindingsForProductWithContext(ctx aws.Context, input *DisableImportFindingsForProductInput, opts ...request.Option) (*DisableImportFindingsForProductOutput, error) { - req, out := c.DisableImportFindingsForProductRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableSecurityHub = "DisableSecurityHub" - -// DisableSecurityHubRequest generates a "aws/request.Request" representing the -// client's request for the DisableSecurityHub operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableSecurityHub for more information on using the DisableSecurityHub -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableSecurityHubRequest method. -// req, resp := client.DisableSecurityHubRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisableSecurityHub -func (c *SecurityHub) DisableSecurityHubRequest(input *DisableSecurityHubInput) (req *request.Request, output *DisableSecurityHubOutput) { - op := &request.Operation{ - Name: opDisableSecurityHub, - HTTPMethod: "DELETE", - HTTPPath: "/accounts", - } - - if input == nil { - input = &DisableSecurityHubInput{} - } - - output = &DisableSecurityHubOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisableSecurityHub API operation for AWS SecurityHub. -// -// Disables the AWS Security Hub Service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation DisableSecurityHub for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisableSecurityHub -func (c *SecurityHub) DisableSecurityHub(input *DisableSecurityHubInput) (*DisableSecurityHubOutput, error) { - req, out := c.DisableSecurityHubRequest(input) - return out, req.Send() -} - -// DisableSecurityHubWithContext is the same as DisableSecurityHub with the addition of -// the ability to pass a context and additional request options. -// -// See DisableSecurityHub for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) DisableSecurityHubWithContext(ctx aws.Context, input *DisableSecurityHubInput, opts ...request.Option) (*DisableSecurityHubOutput, error) { - req, out := c.DisableSecurityHubRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateFromMasterAccount = "DisassociateFromMasterAccount" - -// DisassociateFromMasterAccountRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateFromMasterAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateFromMasterAccount for more information on using the DisassociateFromMasterAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateFromMasterAccountRequest method. -// req, resp := client.DisassociateFromMasterAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisassociateFromMasterAccount -func (c *SecurityHub) DisassociateFromMasterAccountRequest(input *DisassociateFromMasterAccountInput) (req *request.Request, output *DisassociateFromMasterAccountOutput) { - op := &request.Operation{ - Name: opDisassociateFromMasterAccount, - HTTPMethod: "POST", - HTTPPath: "/master/disassociate", - } - - if input == nil { - input = &DisassociateFromMasterAccountInput{} - } - - output = &DisassociateFromMasterAccountOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateFromMasterAccount API operation for AWS SecurityHub. -// -// Disassociates the current Security Hub member account from its master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation DisassociateFromMasterAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisassociateFromMasterAccount -func (c *SecurityHub) DisassociateFromMasterAccount(input *DisassociateFromMasterAccountInput) (*DisassociateFromMasterAccountOutput, error) { - req, out := c.DisassociateFromMasterAccountRequest(input) - return out, req.Send() -} - -// DisassociateFromMasterAccountWithContext is the same as DisassociateFromMasterAccount with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateFromMasterAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) DisassociateFromMasterAccountWithContext(ctx aws.Context, input *DisassociateFromMasterAccountInput, opts ...request.Option) (*DisassociateFromMasterAccountOutput, error) { - req, out := c.DisassociateFromMasterAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateMembers = "DisassociateMembers" - -// DisassociateMembersRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateMembers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateMembers for more information on using the DisassociateMembers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateMembersRequest method. -// req, resp := client.DisassociateMembersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisassociateMembers -func (c *SecurityHub) DisassociateMembersRequest(input *DisassociateMembersInput) (req *request.Request, output *DisassociateMembersOutput) { - op := &request.Operation{ - Name: opDisassociateMembers, - HTTPMethod: "POST", - HTTPPath: "/members/disassociate", - } - - if input == nil { - input = &DisassociateMembersInput{} - } - - output = &DisassociateMembersOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateMembers API operation for AWS SecurityHub. -// -// Disassociates the Security Hub member accounts that are specified by the -// account IDs from their master account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation DisassociateMembers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DisassociateMembers -func (c *SecurityHub) DisassociateMembers(input *DisassociateMembersInput) (*DisassociateMembersOutput, error) { - req, out := c.DisassociateMembersRequest(input) - return out, req.Send() -} - -// DisassociateMembersWithContext is the same as DisassociateMembers with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateMembers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) DisassociateMembersWithContext(ctx aws.Context, input *DisassociateMembersInput, opts ...request.Option) (*DisassociateMembersOutput, error) { - req, out := c.DisassociateMembersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableImportFindingsForProduct = "EnableImportFindingsForProduct" - -// EnableImportFindingsForProductRequest generates a "aws/request.Request" representing the -// client's request for the EnableImportFindingsForProduct operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableImportFindingsForProduct for more information on using the EnableImportFindingsForProduct -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableImportFindingsForProductRequest method. -// req, resp := client.EnableImportFindingsForProductRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/EnableImportFindingsForProduct -func (c *SecurityHub) EnableImportFindingsForProductRequest(input *EnableImportFindingsForProductInput) (req *request.Request, output *EnableImportFindingsForProductOutput) { - op := &request.Operation{ - Name: opEnableImportFindingsForProduct, - HTTPMethod: "POST", - HTTPPath: "/productSubscriptions", - } - - if input == nil { - input = &EnableImportFindingsForProductInput{} - } - - output = &EnableImportFindingsForProductOutput{} - req = c.newRequest(op, input, output) - return -} - -// EnableImportFindingsForProduct API operation for AWS SecurityHub. -// -// Enables you to import findings generated by integrated third-party providers -// into Security Hub. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation EnableImportFindingsForProduct for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/EnableImportFindingsForProduct -func (c *SecurityHub) EnableImportFindingsForProduct(input *EnableImportFindingsForProductInput) (*EnableImportFindingsForProductOutput, error) { - req, out := c.EnableImportFindingsForProductRequest(input) - return out, req.Send() -} - -// EnableImportFindingsForProductWithContext is the same as EnableImportFindingsForProduct with the addition of -// the ability to pass a context and additional request options. -// -// See EnableImportFindingsForProduct for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) EnableImportFindingsForProductWithContext(ctx aws.Context, input *EnableImportFindingsForProductInput, opts ...request.Option) (*EnableImportFindingsForProductOutput, error) { - req, out := c.EnableImportFindingsForProductRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableSecurityHub = "EnableSecurityHub" - -// EnableSecurityHubRequest generates a "aws/request.Request" representing the -// client's request for the EnableSecurityHub operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableSecurityHub for more information on using the EnableSecurityHub -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableSecurityHubRequest method. -// req, resp := client.EnableSecurityHubRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/EnableSecurityHub -func (c *SecurityHub) EnableSecurityHubRequest(input *EnableSecurityHubInput) (req *request.Request, output *EnableSecurityHubOutput) { - op := &request.Operation{ - Name: opEnableSecurityHub, - HTTPMethod: "POST", - HTTPPath: "/accounts", - } - - if input == nil { - input = &EnableSecurityHubInput{} - } - - output = &EnableSecurityHubOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableSecurityHub API operation for AWS SecurityHub. -// -// Enables the AWS Security Hub service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation EnableSecurityHub for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/EnableSecurityHub -func (c *SecurityHub) EnableSecurityHub(input *EnableSecurityHubInput) (*EnableSecurityHubOutput, error) { - req, out := c.EnableSecurityHubRequest(input) - return out, req.Send() -} - -// EnableSecurityHubWithContext is the same as EnableSecurityHub with the addition of -// the ability to pass a context and additional request options. -// -// See EnableSecurityHub for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) EnableSecurityHubWithContext(ctx aws.Context, input *EnableSecurityHubInput, opts ...request.Option) (*EnableSecurityHubOutput, error) { - req, out := c.EnableSecurityHubRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetEnabledStandards = "GetEnabledStandards" - -// GetEnabledStandardsRequest generates a "aws/request.Request" representing the -// client's request for the GetEnabledStandards operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetEnabledStandards for more information on using the GetEnabledStandards -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetEnabledStandardsRequest method. -// req, resp := client.GetEnabledStandardsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetEnabledStandards -func (c *SecurityHub) GetEnabledStandardsRequest(input *GetEnabledStandardsInput) (req *request.Request, output *GetEnabledStandardsOutput) { - op := &request.Operation{ - Name: opGetEnabledStandards, - HTTPMethod: "POST", - HTTPPath: "/standards/get", - } - - if input == nil { - input = &GetEnabledStandardsInput{} - } - - output = &GetEnabledStandardsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetEnabledStandards API operation for AWS SecurityHub. -// -// Lists and describes enabled standards. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation GetEnabledStandards for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetEnabledStandards -func (c *SecurityHub) GetEnabledStandards(input *GetEnabledStandardsInput) (*GetEnabledStandardsOutput, error) { - req, out := c.GetEnabledStandardsRequest(input) - return out, req.Send() -} - -// GetEnabledStandardsWithContext is the same as GetEnabledStandards with the addition of -// the ability to pass a context and additional request options. -// -// See GetEnabledStandards for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) GetEnabledStandardsWithContext(ctx aws.Context, input *GetEnabledStandardsInput, opts ...request.Option) (*GetEnabledStandardsOutput, error) { - req, out := c.GetEnabledStandardsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFindings = "GetFindings" - -// GetFindingsRequest generates a "aws/request.Request" representing the -// client's request for the GetFindings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetFindings for more information on using the GetFindings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetFindingsRequest method. -// req, resp := client.GetFindingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetFindings -func (c *SecurityHub) GetFindingsRequest(input *GetFindingsInput) (req *request.Request, output *GetFindingsOutput) { - op := &request.Operation{ - Name: opGetFindings, - HTTPMethod: "POST", - HTTPPath: "/findings", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetFindingsInput{} - } - - output = &GetFindingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFindings API operation for AWS SecurityHub. -// -// Lists and describes Security Hub-aggregated findings that are specified by -// filter attributes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation GetFindings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetFindings -func (c *SecurityHub) GetFindings(input *GetFindingsInput) (*GetFindingsOutput, error) { - req, out := c.GetFindingsRequest(input) - return out, req.Send() -} - -// GetFindingsWithContext is the same as GetFindings with the addition of -// the ability to pass a context and additional request options. -// -// See GetFindings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) GetFindingsWithContext(ctx aws.Context, input *GetFindingsInput, opts ...request.Option) (*GetFindingsOutput, error) { - req, out := c.GetFindingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetFindingsPages iterates over the pages of a GetFindings operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetFindings 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 GetFindings operation. -// pageNum := 0 -// err := client.GetFindingsPages(params, -// func(page *GetFindingsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SecurityHub) GetFindingsPages(input *GetFindingsInput, fn func(*GetFindingsOutput, bool) bool) error { - return c.GetFindingsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetFindingsPagesWithContext same as GetFindingsPages 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 *SecurityHub) GetFindingsPagesWithContext(ctx aws.Context, input *GetFindingsInput, fn func(*GetFindingsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetFindingsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetFindingsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetFindingsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetInsightResults = "GetInsightResults" - -// GetInsightResultsRequest generates a "aws/request.Request" representing the -// client's request for the GetInsightResults operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInsightResults for more information on using the GetInsightResults -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInsightResultsRequest method. -// req, resp := client.GetInsightResultsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetInsightResults -func (c *SecurityHub) GetInsightResultsRequest(input *GetInsightResultsInput) (req *request.Request, output *GetInsightResultsOutput) { - op := &request.Operation{ - Name: opGetInsightResults, - HTTPMethod: "GET", - HTTPPath: "/insights/results/{InsightArn+}", - } - - if input == nil { - input = &GetInsightResultsInput{} - } - - output = &GetInsightResultsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInsightResults API operation for AWS SecurityHub. -// -// Lists the results of the Security Hub insight specified by the insight 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 SecurityHub's -// API operation GetInsightResults for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetInsightResults -func (c *SecurityHub) GetInsightResults(input *GetInsightResultsInput) (*GetInsightResultsOutput, error) { - req, out := c.GetInsightResultsRequest(input) - return out, req.Send() -} - -// GetInsightResultsWithContext is the same as GetInsightResults with the addition of -// the ability to pass a context and additional request options. -// -// See GetInsightResults for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) GetInsightResultsWithContext(ctx aws.Context, input *GetInsightResultsInput, opts ...request.Option) (*GetInsightResultsOutput, error) { - req, out := c.GetInsightResultsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInsights = "GetInsights" - -// GetInsightsRequest generates a "aws/request.Request" representing the -// client's request for the GetInsights operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInsights for more information on using the GetInsights -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInsightsRequest method. -// req, resp := client.GetInsightsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetInsights -func (c *SecurityHub) GetInsightsRequest(input *GetInsightsInput) (req *request.Request, output *GetInsightsOutput) { - op := &request.Operation{ - Name: opGetInsights, - HTTPMethod: "POST", - HTTPPath: "/insights/get", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetInsightsInput{} - } - - output = &GetInsightsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInsights API operation for AWS SecurityHub. -// -// Lists and describes insights that are specified by insight ARNs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation GetInsights for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetInsights -func (c *SecurityHub) GetInsights(input *GetInsightsInput) (*GetInsightsOutput, error) { - req, out := c.GetInsightsRequest(input) - return out, req.Send() -} - -// GetInsightsWithContext is the same as GetInsights with the addition of -// the ability to pass a context and additional request options. -// -// See GetInsights for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) GetInsightsWithContext(ctx aws.Context, input *GetInsightsInput, opts ...request.Option) (*GetInsightsOutput, error) { - req, out := c.GetInsightsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetInsightsPages iterates over the pages of a GetInsights operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetInsights 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 GetInsights operation. -// pageNum := 0 -// err := client.GetInsightsPages(params, -// func(page *GetInsightsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SecurityHub) GetInsightsPages(input *GetInsightsInput, fn func(*GetInsightsOutput, bool) bool) error { - return c.GetInsightsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetInsightsPagesWithContext same as GetInsightsPages 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 *SecurityHub) GetInsightsPagesWithContext(ctx aws.Context, input *GetInsightsInput, fn func(*GetInsightsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetInsightsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetInsightsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetInsightsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetInvitationsCount = "GetInvitationsCount" - -// GetInvitationsCountRequest generates a "aws/request.Request" representing the -// client's request for the GetInvitationsCount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInvitationsCount for more information on using the GetInvitationsCount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInvitationsCountRequest method. -// req, resp := client.GetInvitationsCountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetInvitationsCount -func (c *SecurityHub) GetInvitationsCountRequest(input *GetInvitationsCountInput) (req *request.Request, output *GetInvitationsCountOutput) { - op := &request.Operation{ - Name: opGetInvitationsCount, - HTTPMethod: "GET", - HTTPPath: "/invitations/count", - } - - if input == nil { - input = &GetInvitationsCountInput{} - } - - output = &GetInvitationsCountOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInvitationsCount API operation for AWS SecurityHub. -// -// Returns the count of all Security Hub membership invitations that were sent -// to the current member account, not including the currently accepted invitation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation GetInvitationsCount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetInvitationsCount -func (c *SecurityHub) GetInvitationsCount(input *GetInvitationsCountInput) (*GetInvitationsCountOutput, error) { - req, out := c.GetInvitationsCountRequest(input) - return out, req.Send() -} - -// GetInvitationsCountWithContext is the same as GetInvitationsCount with the addition of -// the ability to pass a context and additional request options. -// -// See GetInvitationsCount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) GetInvitationsCountWithContext(ctx aws.Context, input *GetInvitationsCountInput, opts ...request.Option) (*GetInvitationsCountOutput, error) { - req, out := c.GetInvitationsCountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMasterAccount = "GetMasterAccount" - -// GetMasterAccountRequest generates a "aws/request.Request" representing the -// client's request for the GetMasterAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMasterAccount for more information on using the GetMasterAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMasterAccountRequest method. -// req, resp := client.GetMasterAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetMasterAccount -func (c *SecurityHub) GetMasterAccountRequest(input *GetMasterAccountInput) (req *request.Request, output *GetMasterAccountOutput) { - op := &request.Operation{ - Name: opGetMasterAccount, - HTTPMethod: "GET", - HTTPPath: "/master", - } - - if input == nil { - input = &GetMasterAccountInput{} - } - - output = &GetMasterAccountOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMasterAccount API operation for AWS SecurityHub. -// -// Provides the details for the Security Hub master account to the current member -// account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation GetMasterAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetMasterAccount -func (c *SecurityHub) GetMasterAccount(input *GetMasterAccountInput) (*GetMasterAccountOutput, error) { - req, out := c.GetMasterAccountRequest(input) - return out, req.Send() -} - -// GetMasterAccountWithContext is the same as GetMasterAccount with the addition of -// the ability to pass a context and additional request options. -// -// See GetMasterAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) GetMasterAccountWithContext(ctx aws.Context, input *GetMasterAccountInput, opts ...request.Option) (*GetMasterAccountOutput, error) { - req, out := c.GetMasterAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMembers = "GetMembers" - -// GetMembersRequest generates a "aws/request.Request" representing the -// client's request for the GetMembers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMembers for more information on using the GetMembers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMembersRequest method. -// req, resp := client.GetMembersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetMembers -func (c *SecurityHub) GetMembersRequest(input *GetMembersInput) (req *request.Request, output *GetMembersOutput) { - op := &request.Operation{ - Name: opGetMembers, - HTTPMethod: "POST", - HTTPPath: "/members/get", - } - - if input == nil { - input = &GetMembersInput{} - } - - output = &GetMembersOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMembers API operation for AWS SecurityHub. -// -// Returns the details on the Security Hub member accounts that are specified -// by the account IDs. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation GetMembers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/GetMembers -func (c *SecurityHub) GetMembers(input *GetMembersInput) (*GetMembersOutput, error) { - req, out := c.GetMembersRequest(input) - return out, req.Send() -} - -// GetMembersWithContext is the same as GetMembers with the addition of -// the ability to pass a context and additional request options. -// -// See GetMembers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) GetMembersWithContext(ctx aws.Context, input *GetMembersInput, opts ...request.Option) (*GetMembersOutput, error) { - req, out := c.GetMembersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opInviteMembers = "InviteMembers" - -// InviteMembersRequest generates a "aws/request.Request" representing the -// client's request for the InviteMembers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See InviteMembers for more information on using the InviteMembers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the InviteMembersRequest method. -// req, resp := client.InviteMembersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/InviteMembers -func (c *SecurityHub) InviteMembersRequest(input *InviteMembersInput) (req *request.Request, output *InviteMembersOutput) { - op := &request.Operation{ - Name: opInviteMembers, - HTTPMethod: "POST", - HTTPPath: "/members/invite", - } - - if input == nil { - input = &InviteMembersInput{} - } - - output = &InviteMembersOutput{} - req = c.newRequest(op, input, output) - return -} - -// InviteMembers API operation for AWS SecurityHub. -// -// Invites other AWS accounts to enable Security Hub and become Security Hub -// member accounts. When an account accepts the invitation and becomes a member -// account, the master account can view Security Hub findings of the member -// account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation InviteMembers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/InviteMembers -func (c *SecurityHub) InviteMembers(input *InviteMembersInput) (*InviteMembersOutput, error) { - req, out := c.InviteMembersRequest(input) - return out, req.Send() -} - -// InviteMembersWithContext is the same as InviteMembers with the addition of -// the ability to pass a context and additional request options. -// -// See InviteMembers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) InviteMembersWithContext(ctx aws.Context, input *InviteMembersInput, opts ...request.Option) (*InviteMembersOutput, error) { - req, out := c.InviteMembersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListEnabledProductsForImport = "ListEnabledProductsForImport" - -// ListEnabledProductsForImportRequest generates a "aws/request.Request" representing the -// client's request for the ListEnabledProductsForImport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListEnabledProductsForImport for more information on using the ListEnabledProductsForImport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListEnabledProductsForImportRequest method. -// req, resp := client.ListEnabledProductsForImportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/ListEnabledProductsForImport -func (c *SecurityHub) ListEnabledProductsForImportRequest(input *ListEnabledProductsForImportInput) (req *request.Request, output *ListEnabledProductsForImportOutput) { - op := &request.Operation{ - Name: opListEnabledProductsForImport, - HTTPMethod: "GET", - HTTPPath: "/productSubscriptions", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListEnabledProductsForImportInput{} - } - - output = &ListEnabledProductsForImportOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListEnabledProductsForImport API operation for AWS SecurityHub. -// -// Lists all Security Hub-integrated third-party findings providers. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation ListEnabledProductsForImport for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/ListEnabledProductsForImport -func (c *SecurityHub) ListEnabledProductsForImport(input *ListEnabledProductsForImportInput) (*ListEnabledProductsForImportOutput, error) { - req, out := c.ListEnabledProductsForImportRequest(input) - return out, req.Send() -} - -// ListEnabledProductsForImportWithContext is the same as ListEnabledProductsForImport with the addition of -// the ability to pass a context and additional request options. -// -// See ListEnabledProductsForImport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) ListEnabledProductsForImportWithContext(ctx aws.Context, input *ListEnabledProductsForImportInput, opts ...request.Option) (*ListEnabledProductsForImportOutput, error) { - req, out := c.ListEnabledProductsForImportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListEnabledProductsForImportPages iterates over the pages of a ListEnabledProductsForImport operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListEnabledProductsForImport 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 ListEnabledProductsForImport operation. -// pageNum := 0 -// err := client.ListEnabledProductsForImportPages(params, -// func(page *ListEnabledProductsForImportOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SecurityHub) ListEnabledProductsForImportPages(input *ListEnabledProductsForImportInput, fn func(*ListEnabledProductsForImportOutput, bool) bool) error { - return c.ListEnabledProductsForImportPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListEnabledProductsForImportPagesWithContext same as ListEnabledProductsForImportPages 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 *SecurityHub) ListEnabledProductsForImportPagesWithContext(ctx aws.Context, input *ListEnabledProductsForImportInput, fn func(*ListEnabledProductsForImportOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListEnabledProductsForImportInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListEnabledProductsForImportRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEnabledProductsForImportOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListInvitations = "ListInvitations" - -// ListInvitationsRequest generates a "aws/request.Request" representing the -// client's request for the ListInvitations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListInvitations for more information on using the ListInvitations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListInvitationsRequest method. -// req, resp := client.ListInvitationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/ListInvitations -func (c *SecurityHub) ListInvitationsRequest(input *ListInvitationsInput) (req *request.Request, output *ListInvitationsOutput) { - op := &request.Operation{ - Name: opListInvitations, - HTTPMethod: "GET", - HTTPPath: "/invitations", - } - - if input == nil { - input = &ListInvitationsInput{} - } - - output = &ListInvitationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInvitations API operation for AWS SecurityHub. -// -// Lists all Security Hub membership invitations that were sent to the current -// AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation ListInvitations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/ListInvitations -func (c *SecurityHub) ListInvitations(input *ListInvitationsInput) (*ListInvitationsOutput, error) { - req, out := c.ListInvitationsRequest(input) - return out, req.Send() -} - -// ListInvitationsWithContext is the same as ListInvitations with the addition of -// the ability to pass a context and additional request options. -// -// See ListInvitations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) ListInvitationsWithContext(ctx aws.Context, input *ListInvitationsInput, opts ...request.Option) (*ListInvitationsOutput, error) { - req, out := c.ListInvitationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListMembers = "ListMembers" - -// ListMembersRequest generates a "aws/request.Request" representing the -// client's request for the ListMembers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListMembers for more information on using the ListMembers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListMembersRequest method. -// req, resp := client.ListMembersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/ListMembers -func (c *SecurityHub) ListMembersRequest(input *ListMembersInput) (req *request.Request, output *ListMembersOutput) { - op := &request.Operation{ - Name: opListMembers, - HTTPMethod: "GET", - HTTPPath: "/members", - } - - if input == nil { - input = &ListMembersInput{} - } - - output = &ListMembersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListMembers API operation for AWS SecurityHub. -// -// Lists details about all member accounts for the current Security Hub master -// account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation ListMembers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/ListMembers -func (c *SecurityHub) ListMembers(input *ListMembersInput) (*ListMembersOutput, error) { - req, out := c.ListMembersRequest(input) - return out, req.Send() -} - -// ListMembersWithContext is the same as ListMembers with the addition of -// the ability to pass a context and additional request options. -// -// See ListMembers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) ListMembersWithContext(ctx aws.Context, input *ListMembersInput, opts ...request.Option) (*ListMembersOutput, error) { - req, out := c.ListMembersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFindings = "UpdateFindings" - -// UpdateFindingsRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFindings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFindings for more information on using the UpdateFindings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFindingsRequest method. -// req, resp := client.UpdateFindingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/UpdateFindings -func (c *SecurityHub) UpdateFindingsRequest(input *UpdateFindingsInput) (req *request.Request, output *UpdateFindingsOutput) { - op := &request.Operation{ - Name: opUpdateFindings, - HTTPMethod: "PATCH", - HTTPPath: "/findings", - } - - if input == nil { - input = &UpdateFindingsInput{} - } - - output = &UpdateFindingsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateFindings API operation for AWS SecurityHub. -// -// Updates the AWS Security Hub-aggregated findings specified by the filter -// attributes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS SecurityHub's -// API operation UpdateFindings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/UpdateFindings -func (c *SecurityHub) UpdateFindings(input *UpdateFindingsInput) (*UpdateFindingsOutput, error) { - req, out := c.UpdateFindingsRequest(input) - return out, req.Send() -} - -// UpdateFindingsWithContext is the same as UpdateFindings with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFindings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) UpdateFindingsWithContext(ctx aws.Context, input *UpdateFindingsInput, opts ...request.Option) (*UpdateFindingsOutput, error) { - req, out := c.UpdateFindingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateInsight = "UpdateInsight" - -// UpdateInsightRequest generates a "aws/request.Request" representing the -// client's request for the UpdateInsight operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateInsight for more information on using the UpdateInsight -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateInsightRequest method. -// req, resp := client.UpdateInsightRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/UpdateInsight -func (c *SecurityHub) UpdateInsightRequest(input *UpdateInsightInput) (req *request.Request, output *UpdateInsightOutput) { - op := &request.Operation{ - Name: opUpdateInsight, - HTTPMethod: "PATCH", - HTTPPath: "/insights/{InsightArn+}", - } - - if input == nil { - input = &UpdateInsightInput{} - } - - output = &UpdateInsightOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateInsight API operation for AWS SecurityHub. -// -// Updates the AWS Security Hub insight specified by the insight 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 SecurityHub's -// API operation UpdateInsight for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalException "InternalException" -// Internal server error. -// -// * ErrCodeInvalidInputException "InvalidInputException" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The request was rejected because it attempted to create resources beyond -// the current AWS account limits. The error code describes the limit exceeded. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The request was rejected because the specified resource cannot be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/UpdateInsight -func (c *SecurityHub) UpdateInsight(input *UpdateInsightInput) (*UpdateInsightOutput, error) { - req, out := c.UpdateInsightRequest(input) - return out, req.Send() -} - -// UpdateInsightWithContext is the same as UpdateInsight with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateInsight for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SecurityHub) UpdateInsightWithContext(ctx aws.Context, input *UpdateInsightInput, opts ...request.Option) (*UpdateInsightOutput, error) { - req, out := c.UpdateInsightRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AcceptInvitationInput struct { - _ struct{} `type:"structure"` - - // The ID of the invitation that is sent to the AWS account by the Security - // Hub master account. - InvitationId *string `type:"string"` - - // The account ID of the master Security Hub account whose invitation you're - // accepting. - MasterId *string `type:"string"` -} - -// String returns the string representation -func (s AcceptInvitationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptInvitationInput) GoString() string { - return s.String() -} - -// SetInvitationId sets the InvitationId field's value. -func (s *AcceptInvitationInput) SetInvitationId(v string) *AcceptInvitationInput { - s.InvitationId = &v - return s -} - -// SetMasterId sets the MasterId field's value. -func (s *AcceptInvitationInput) SetMasterId(v string) *AcceptInvitationInput { - s.MasterId = &v - return s -} - -type AcceptInvitationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AcceptInvitationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptInvitationOutput) GoString() string { - return s.String() -} - -// The details of an AWS account. -type AccountDetails struct { - _ struct{} `type:"structure"` - - // The ID of an AWS account. - AccountId *string `type:"string"` - - // The email of an AWS account. - Email *string `type:"string"` -} - -// String returns the string representation -func (s AccountDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountDetails) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *AccountDetails) SetAccountId(v string) *AccountDetails { - s.AccountId = &v - return s -} - -// SetEmail sets the Email field's value. -func (s *AccountDetails) SetEmail(v string) *AccountDetails { - s.Email = &v - return s -} - -// The details of an AWS EC2 instance. -type AwsEc2InstanceDetails struct { - _ struct{} `type:"structure"` - - // The IAM profile ARN of the instance. - IamInstanceProfileArn *string `type:"string"` - - // The Amazon Machine Image (AMI) ID of the instance. - ImageId *string `type:"string"` - - // The IPv4 addresses associated with the instance. - IpV4Addresses []*string `type:"list"` - - // The IPv6 addresses associated with the instance. - IpV6Addresses []*string `type:"list"` - - // The key name associated with the instance. - KeyName *string `type:"string"` - - // The date/time the instance was launched. - LaunchedAt *string `type:"string"` - - // The identifier of the subnet in which the instance was launched. - SubnetId *string `type:"string"` - - // The instance type of the instance. - Type *string `type:"string"` - - // The identifier of the VPC in which the instance was launched. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s AwsEc2InstanceDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AwsEc2InstanceDetails) GoString() string { - return s.String() -} - -// SetIamInstanceProfileArn sets the IamInstanceProfileArn field's value. -func (s *AwsEc2InstanceDetails) SetIamInstanceProfileArn(v string) *AwsEc2InstanceDetails { - s.IamInstanceProfileArn = &v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *AwsEc2InstanceDetails) SetImageId(v string) *AwsEc2InstanceDetails { - s.ImageId = &v - return s -} - -// SetIpV4Addresses sets the IpV4Addresses field's value. -func (s *AwsEc2InstanceDetails) SetIpV4Addresses(v []*string) *AwsEc2InstanceDetails { - s.IpV4Addresses = v - return s -} - -// SetIpV6Addresses sets the IpV6Addresses field's value. -func (s *AwsEc2InstanceDetails) SetIpV6Addresses(v []*string) *AwsEc2InstanceDetails { - s.IpV6Addresses = v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *AwsEc2InstanceDetails) SetKeyName(v string) *AwsEc2InstanceDetails { - s.KeyName = &v - return s -} - -// SetLaunchedAt sets the LaunchedAt field's value. -func (s *AwsEc2InstanceDetails) SetLaunchedAt(v string) *AwsEc2InstanceDetails { - s.LaunchedAt = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *AwsEc2InstanceDetails) SetSubnetId(v string) *AwsEc2InstanceDetails { - s.SubnetId = &v - return s -} - -// SetType sets the Type field's value. -func (s *AwsEc2InstanceDetails) SetType(v string) *AwsEc2InstanceDetails { - s.Type = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *AwsEc2InstanceDetails) SetVpcId(v string) *AwsEc2InstanceDetails { - s.VpcId = &v - return s -} - -// AWS IAM access key details related to a finding. -type AwsIamAccessKeyDetails struct { - _ struct{} `type:"structure"` - - // The creation date/time of the IAM access key related to a finding. - CreatedAt *string `type:"string"` - - // The status of the IAM access key related to a finding. - Status *string `type:"string" enum:"AwsIamAccessKeyStatus"` - - // The user associated with the IAM access key related to a finding. - UserName *string `type:"string"` -} - -// String returns the string representation -func (s AwsIamAccessKeyDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AwsIamAccessKeyDetails) GoString() string { - return s.String() -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *AwsIamAccessKeyDetails) SetCreatedAt(v string) *AwsIamAccessKeyDetails { - s.CreatedAt = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AwsIamAccessKeyDetails) SetStatus(v string) *AwsIamAccessKeyDetails { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *AwsIamAccessKeyDetails) SetUserName(v string) *AwsIamAccessKeyDetails { - s.UserName = &v - return s -} - -// The details of an AWS S3 Bucket. -type AwsS3BucketDetails struct { - _ struct{} `type:"structure"` - - // The canonical user ID of the owner of the S3 bucket. - OwnerId *string `type:"string"` - - // The display name of the owner of the S3 bucket. - OwnerName *string `type:"string"` -} - -// String returns the string representation -func (s AwsS3BucketDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AwsS3BucketDetails) GoString() string { - return s.String() -} - -// SetOwnerId sets the OwnerId field's value. -func (s *AwsS3BucketDetails) SetOwnerId(v string) *AwsS3BucketDetails { - s.OwnerId = &v - return s -} - -// SetOwnerName sets the OwnerName field's value. -func (s *AwsS3BucketDetails) SetOwnerName(v string) *AwsS3BucketDetails { - s.OwnerName = &v - return s -} - -// Provides consistent format for the contents of the Security Hub-aggregated -// findings. AwsSecurityFinding format enables you to share findings between -// AWS security services and third-party solutions, and compliance checks. -// -// A finding is a potential security issue generated either by AWS services -// (GuardDuty, Inspector, Macie) or by the integrated third-party solutions -// and compliance checks. -type AwsSecurityFinding struct { - _ struct{} `type:"structure"` - - // The AWS account ID in which a finding is generated. - // - // AwsAccountId is a required field - AwsAccountId *string `type:"string" required:"true"` - - // This data type is exclusive to findings that are generated as the result - // of a check run against a specific rule in a supported standard (for example, - // AWS CIS Foundations). Contains compliance-related finding details. - Compliance *Compliance `type:"structure"` - - // A finding's confidence. Confidence is defined as the likelihood that a finding - // accurately identifies the behavior or issue that it was intended to identify. - // Confidence is scored on a 0-100 basis using a ratio scale. 0 equates zero - // percent confidence and 100 equates to 100 percent confidence. - Confidence *int64 `type:"integer"` - - // An ISO8601-formatted timestamp that indicates when the potential security - // issue captured by a finding was created by the security findings provider. - // - // CreatedAt is a required field - CreatedAt *string `type:"string" required:"true"` - - // The level of importance assigned to the resources associated with the finding. - // A score of 0 means the underlying resources have no criticality, and a score - // of 100 is reserved for the most critical resources. - Criticality *int64 `type:"integer"` - - // A finding's description. - Description *string `type:"string"` - - // An ISO8601-formatted timestamp that indicates when the potential security - // issue captured by a finding was first observed by the security findings provider. - FirstObservedAt *string `type:"string"` - - // This is the identifier for the solution-specific component (a discrete unit - // of logic) that generated a finding. In various security findings provider's - // solutions, this generator can be called a rule, a check, a detector, a plug-in, - // etc. - // - // GeneratorId is a required field - GeneratorId *string `type:"string" required:"true"` - - // The security findings provider-specific identifier for a finding. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // An ISO8601-formatted timestamp that indicates when the potential security - // issue captured by a finding was most recently observed by the security findings - // provider. - LastObservedAt *string `type:"string"` - - // A list of malware related to a finding. - Malware []*Malware `type:"list"` - - // The details of network-related information about a finding. - Network *Network `type:"structure"` - - // A user-defined note added to a finding. - Note *Note `type:"structure"` - - // The details of process-related information about a finding. - Process *ProcessDetails `type:"structure"` - - // The ARN generated by Security Hub that uniquely identifies a third-party - // company (security findings provider) once this provider's product (solution - // that generates findings) is registered with Security Hub. - // - // ProductArn is a required field - ProductArn *string `type:"string" required:"true"` - - // A data type where security findings providers can include additional solution-specific - // details that are not part of the defined AwsSecurityFinding format. - ProductFields map[string]*string `type:"map"` - - // The record state of a finding. - RecordState *string `type:"string" enum:"RecordState"` - - // A list of related findings. - RelatedFindings []*RelatedFinding `type:"list"` - - // An data type that describes the remediation options for a finding. - Remediation *Remediation `type:"structure"` - - // A set of resource data types that describe the resources to which the finding - // refers. - // - // Resources is a required field - Resources []*Resource `type:"list" required:"true"` - - // The schema version for which a finding is formatted. - // - // SchemaVersion is a required field - SchemaVersion *string `type:"string" required:"true"` - - // A finding's severity. - // - // Severity is a required field - Severity *Severity `type:"structure" required:"true"` - - // A URL that links to a page about the current finding in the security findings - // provider's solution. - SourceUrl *string `type:"string"` - - // Threat intel details related to a finding. - ThreatIntelIndicators []*ThreatIntelIndicator `type:"list"` - - // A finding's title. - Title *string `type:"string"` - - // One or more finding types in the format of 'namespace/category/classifier' - // that classify a finding. - // - // Valid namespace values are: Software and Configuration Checks | TTPs | Effects - // | Unusual Behaviors | Sensitive Data Identifications - // - // Types is a required field - Types []*string `type:"list" required:"true"` - - // An ISO8601-formatted timestamp that indicates when the finding record was - // last updated by the security findings provider. - // - // UpdatedAt is a required field - UpdatedAt *string `type:"string" required:"true"` - - // A list of name/value string pairs associated with the finding. These are - // custom, user-defined fields added to a finding. - UserDefinedFields map[string]*string `type:"map"` - - // Indicates the veracity of a finding. - VerificationState *string `type:"string" enum:"VerificationState"` - - // The workflow state of a finding. - WorkflowState *string `type:"string" enum:"WorkflowState"` -} - -// String returns the string representation -func (s AwsSecurityFinding) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AwsSecurityFinding) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AwsSecurityFinding) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AwsSecurityFinding"} - if s.AwsAccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AwsAccountId")) - } - if s.CreatedAt == nil { - invalidParams.Add(request.NewErrParamRequired("CreatedAt")) - } - if s.GeneratorId == nil { - invalidParams.Add(request.NewErrParamRequired("GeneratorId")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.ProductArn == nil { - invalidParams.Add(request.NewErrParamRequired("ProductArn")) - } - if s.Resources == nil { - invalidParams.Add(request.NewErrParamRequired("Resources")) - } - if s.SchemaVersion == nil { - invalidParams.Add(request.NewErrParamRequired("SchemaVersion")) - } - if s.Severity == nil { - invalidParams.Add(request.NewErrParamRequired("Severity")) - } - if s.Types == nil { - invalidParams.Add(request.NewErrParamRequired("Types")) - } - if s.UpdatedAt == nil { - invalidParams.Add(request.NewErrParamRequired("UpdatedAt")) - } - if s.Malware != nil { - for i, v := range s.Malware { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Malware", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Note != nil { - if err := s.Note.Validate(); err != nil { - invalidParams.AddNested("Note", err.(request.ErrInvalidParams)) - } - } - if s.RelatedFindings != nil { - for i, v := range s.RelatedFindings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RelatedFindings", i), err.(request.ErrInvalidParams)) - } - } - } - if 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 s.Severity != nil { - if err := s.Severity.Validate(); err != nil { - invalidParams.AddNested("Severity", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAwsAccountId sets the AwsAccountId field's value. -func (s *AwsSecurityFinding) SetAwsAccountId(v string) *AwsSecurityFinding { - s.AwsAccountId = &v - return s -} - -// SetCompliance sets the Compliance field's value. -func (s *AwsSecurityFinding) SetCompliance(v *Compliance) *AwsSecurityFinding { - s.Compliance = v - return s -} - -// SetConfidence sets the Confidence field's value. -func (s *AwsSecurityFinding) SetConfidence(v int64) *AwsSecurityFinding { - s.Confidence = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *AwsSecurityFinding) SetCreatedAt(v string) *AwsSecurityFinding { - s.CreatedAt = &v - return s -} - -// SetCriticality sets the Criticality field's value. -func (s *AwsSecurityFinding) SetCriticality(v int64) *AwsSecurityFinding { - s.Criticality = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *AwsSecurityFinding) SetDescription(v string) *AwsSecurityFinding { - s.Description = &v - return s -} - -// SetFirstObservedAt sets the FirstObservedAt field's value. -func (s *AwsSecurityFinding) SetFirstObservedAt(v string) *AwsSecurityFinding { - s.FirstObservedAt = &v - return s -} - -// SetGeneratorId sets the GeneratorId field's value. -func (s *AwsSecurityFinding) SetGeneratorId(v string) *AwsSecurityFinding { - s.GeneratorId = &v - return s -} - -// SetId sets the Id field's value. -func (s *AwsSecurityFinding) SetId(v string) *AwsSecurityFinding { - s.Id = &v - return s -} - -// SetLastObservedAt sets the LastObservedAt field's value. -func (s *AwsSecurityFinding) SetLastObservedAt(v string) *AwsSecurityFinding { - s.LastObservedAt = &v - return s -} - -// SetMalware sets the Malware field's value. -func (s *AwsSecurityFinding) SetMalware(v []*Malware) *AwsSecurityFinding { - s.Malware = v - return s -} - -// SetNetwork sets the Network field's value. -func (s *AwsSecurityFinding) SetNetwork(v *Network) *AwsSecurityFinding { - s.Network = v - return s -} - -// SetNote sets the Note field's value. -func (s *AwsSecurityFinding) SetNote(v *Note) *AwsSecurityFinding { - s.Note = v - return s -} - -// SetProcess sets the Process field's value. -func (s *AwsSecurityFinding) SetProcess(v *ProcessDetails) *AwsSecurityFinding { - s.Process = v - return s -} - -// SetProductArn sets the ProductArn field's value. -func (s *AwsSecurityFinding) SetProductArn(v string) *AwsSecurityFinding { - s.ProductArn = &v - return s -} - -// SetProductFields sets the ProductFields field's value. -func (s *AwsSecurityFinding) SetProductFields(v map[string]*string) *AwsSecurityFinding { - s.ProductFields = v - return s -} - -// SetRecordState sets the RecordState field's value. -func (s *AwsSecurityFinding) SetRecordState(v string) *AwsSecurityFinding { - s.RecordState = &v - return s -} - -// SetRelatedFindings sets the RelatedFindings field's value. -func (s *AwsSecurityFinding) SetRelatedFindings(v []*RelatedFinding) *AwsSecurityFinding { - s.RelatedFindings = v - return s -} - -// SetRemediation sets the Remediation field's value. -func (s *AwsSecurityFinding) SetRemediation(v *Remediation) *AwsSecurityFinding { - s.Remediation = v - return s -} - -// SetResources sets the Resources field's value. -func (s *AwsSecurityFinding) SetResources(v []*Resource) *AwsSecurityFinding { - s.Resources = v - return s -} - -// SetSchemaVersion sets the SchemaVersion field's value. -func (s *AwsSecurityFinding) SetSchemaVersion(v string) *AwsSecurityFinding { - s.SchemaVersion = &v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *AwsSecurityFinding) SetSeverity(v *Severity) *AwsSecurityFinding { - s.Severity = v - return s -} - -// SetSourceUrl sets the SourceUrl field's value. -func (s *AwsSecurityFinding) SetSourceUrl(v string) *AwsSecurityFinding { - s.SourceUrl = &v - return s -} - -// SetThreatIntelIndicators sets the ThreatIntelIndicators field's value. -func (s *AwsSecurityFinding) SetThreatIntelIndicators(v []*ThreatIntelIndicator) *AwsSecurityFinding { - s.ThreatIntelIndicators = v - return s -} - -// SetTitle sets the Title field's value. -func (s *AwsSecurityFinding) SetTitle(v string) *AwsSecurityFinding { - s.Title = &v - return s -} - -// SetTypes sets the Types field's value. -func (s *AwsSecurityFinding) SetTypes(v []*string) *AwsSecurityFinding { - s.Types = v - return s -} - -// SetUpdatedAt sets the UpdatedAt field's value. -func (s *AwsSecurityFinding) SetUpdatedAt(v string) *AwsSecurityFinding { - s.UpdatedAt = &v - return s -} - -// SetUserDefinedFields sets the UserDefinedFields field's value. -func (s *AwsSecurityFinding) SetUserDefinedFields(v map[string]*string) *AwsSecurityFinding { - s.UserDefinedFields = v - return s -} - -// SetVerificationState sets the VerificationState field's value. -func (s *AwsSecurityFinding) SetVerificationState(v string) *AwsSecurityFinding { - s.VerificationState = &v - return s -} - -// SetWorkflowState sets the WorkflowState field's value. -func (s *AwsSecurityFinding) SetWorkflowState(v string) *AwsSecurityFinding { - s.WorkflowState = &v - return s -} - -// A collection of attributes that are applied to all active Security Hub-aggregated -// findings and that result in a subset of findings that are included in this -// insight. -type AwsSecurityFindingFilters struct { - _ struct{} `type:"structure"` - - // The AWS account ID in which a finding is generated. - AwsAccountId []*StringFilter `type:"list"` - - // The name of the findings provider (company) that owns the solution (product) - // that generates findings. - CompanyName []*StringFilter `type:"list"` - - // Exclusive to findings that are generated as the result of a check run against - // a specific rule in a supported standard (for example, AWS CIS Foundations). - // Contains compliance-related finding details. - ComplianceStatus []*StringFilter `type:"list"` - - // A finding's confidence. Confidence is defined as the likelihood that a finding - // accurately identifies the behavior or issue that it was intended to identify. - // Confidence is scored on a 0-100 basis using a ratio scale. 0 equates zero - // percent confidence and 100 equates to 100 percent confidence. - Confidence []*NumberFilter `type:"list"` - - // An ISO8601-formatted timestamp that indicates when the potential security - // issue captured by a finding was created by the security findings provider. - CreatedAt []*DateFilter `type:"list"` - - // The level of importance assigned to the resources associated with the finding. - // A score of 0 means the underlying resources have no criticality, and a score - // of 100 is reserved for the most critical resources. - Criticality []*NumberFilter `type:"list"` - - // A finding's description. - Description []*StringFilter `type:"list"` - - // An ISO8601-formatted timestamp that indicates when the potential security - // issue captured by a finding was first observed by the security findings provider. - FirstObservedAt []*DateFilter `type:"list"` - - // This is the identifier for the solution-specific component (a discrete unit - // of logic) that generated a finding. In various security findings provider's - // solutions, this generator can be called a rule, a check, a detector, a plug-in, - // etc. - GeneratorId []*StringFilter `type:"list"` - - // The security findings provider-specific identifier for a finding. - Id []*StringFilter `type:"list"` - - // A keyword for a finding. - Keyword []*KeywordFilter `type:"list"` - - // An ISO8601-formatted timestamp that indicates when the potential security - // issue captured by a finding was most recently observed by the security findings - // provider. - LastObservedAt []*DateFilter `type:"list"` - - // The name of the malware that was observed. - MalwareName []*StringFilter `type:"list"` - - // The filesystem path of the malware that was observed. - MalwarePath []*StringFilter `type:"list"` - - // The state of the malware that was observed. - MalwareState []*StringFilter `type:"list"` - - // The type of the malware that was observed. - MalwareType []*StringFilter `type:"list"` - - // The destination domain of network-related information about a finding. - NetworkDestinationDomain []*StringFilter `type:"list"` - - // The destination IPv4 address of network-related information about a finding. - NetworkDestinationIpV4 []*IpFilter `type:"list"` - - // The destination IPv6 address of network-related information about a finding. - NetworkDestinationIpV6 []*IpFilter `type:"list"` - - // The destination port of network-related information about a finding. - NetworkDestinationPort []*NumberFilter `type:"list"` - - // Indicates the direction of network traffic associated with a finding. - NetworkDirection []*StringFilter `type:"list"` - - // The protocol of network-related information about a finding. - NetworkProtocol []*StringFilter `type:"list"` - - // The source domain of network-related information about a finding. - NetworkSourceDomain []*StringFilter `type:"list"` - - // The source IPv4 address of network-related information about a finding. - NetworkSourceIpV4 []*IpFilter `type:"list"` - - // The source IPv6 address of network-related information about a finding. - NetworkSourceIpV6 []*IpFilter `type:"list"` - - // The source media access control (MAC) address of network-related information - // about a finding. - NetworkSourceMac []*StringFilter `type:"list"` - - // The source port of network-related information about a finding. - NetworkSourcePort []*NumberFilter `type:"list"` - - // The text of a note. - NoteText []*StringFilter `type:"list"` - - // The timestamp of when the note was updated. - NoteUpdatedAt []*DateFilter `type:"list"` - - // The principal that created a note. - NoteUpdatedBy []*StringFilter `type:"list"` - - // The date/time that the process was launched. - ProcessLaunchedAt []*DateFilter `type:"list"` - - // The name of the process. - ProcessName []*StringFilter `type:"list"` - - // The parent process ID. - ProcessParentPid []*NumberFilter `type:"list"` - - // The path to the process executable. - ProcessPath []*StringFilter `type:"list"` - - // The process ID. - ProcessPid []*NumberFilter `type:"list"` - - // The date/time that the process was terminated. - ProcessTerminatedAt []*DateFilter `type:"list"` - - // The ARN generated by Security Hub that uniquely identifies a third-party - // company (security findings provider) once this provider's product (solution - // that generates findings) is registered with Security Hub. - ProductArn []*StringFilter `type:"list"` - - // A data type where security findings providers can include additional solution-specific - // details that are not part of the defined AwsSecurityFinding format. - ProductFields []*MapFilter `type:"list"` - - // The name of the solution (product) that generates findings. - ProductName []*StringFilter `type:"list"` - - // The recommendation of what to do about the issue described in a finding. - RecommendationText []*StringFilter `type:"list"` - - // The updated record state for the finding. - RecordState []*StringFilter `type:"list"` - - // The solution-generated identifier for a related finding. - RelatedFindingsId []*StringFilter `type:"list"` - - // The ARN of the solution that generated a related finding. - RelatedFindingsProductArn []*StringFilter `type:"list"` - - // The IAM profile ARN of the instance. - ResourceAwsEc2InstanceIamInstanceProfileArn []*StringFilter `type:"list"` - - // The Amazon Machine Image (AMI) ID of the instance. - ResourceAwsEc2InstanceImageId []*StringFilter `type:"list"` - - // The IPv4 addresses associated with the instance. - ResourceAwsEc2InstanceIpV4Addresses []*IpFilter `type:"list"` - - // The IPv6 addresses associated with the instance. - ResourceAwsEc2InstanceIpV6Addresses []*IpFilter `type:"list"` - - // The key name associated with the instance. - ResourceAwsEc2InstanceKeyName []*StringFilter `type:"list"` - - // The date/time the instance was launched. - ResourceAwsEc2InstanceLaunchedAt []*DateFilter `type:"list"` - - // The identifier of the subnet in which the instance was launched. - ResourceAwsEc2InstanceSubnetId []*StringFilter `type:"list"` - - // The instance type of the instance. - ResourceAwsEc2InstanceType []*StringFilter `type:"list"` - - // The identifier of the VPC in which the instance was launched. - ResourceAwsEc2InstanceVpcId []*StringFilter `type:"list"` - - // The creation date/time of the IAM access key related to a finding. - ResourceAwsIamAccessKeyCreatedAt []*DateFilter `type:"list"` - - // The status of the IAM access key related to a finding. - ResourceAwsIamAccessKeyStatus []*StringFilter `type:"list"` - - // The user associated with the IAM access key related to a finding. - ResourceAwsIamAccessKeyUserName []*StringFilter `type:"list"` - - // The canonical user ID of the owner of the S3 bucket. - ResourceAwsS3BucketOwnerId []*StringFilter `type:"list"` - - // The display name of the owner of the S3 bucket. - ResourceAwsS3BucketOwnerName []*StringFilter `type:"list"` - - // The identifier of the image related to a finding. - ResourceContainerImageId []*StringFilter `type:"list"` - - // The name of the image related to a finding. - ResourceContainerImageName []*StringFilter `type:"list"` - - // The date/time that the container was started. - ResourceContainerLaunchedAt []*DateFilter `type:"list"` - - // The name of the container related to a finding. - ResourceContainerName []*StringFilter `type:"list"` - - // The details of a resource that does not have a specific sub-field for the - // resource type defined. - ResourceDetailsOther []*MapFilter `type:"list"` - - // The canonical identifier for the given resource type. - ResourceId []*StringFilter `type:"list"` - - // The canonical AWS partition name to which the region is assigned. - ResourcePartition []*StringFilter `type:"list"` - - // The canonical AWS external region name where this resource is located. - ResourceRegion []*StringFilter `type:"list"` - - // A list of AWS tags associated with a resource at the time the finding was - // processed. - ResourceTags []*MapFilter `type:"list"` - - // Specifies the type of the resource for which details are provided. - ResourceType []*StringFilter `type:"list"` - - // The label of a finding's severity. - SeverityLabel []*StringFilter `type:"list"` - - // The normalized severity of a finding. - SeverityNormalized []*NumberFilter `type:"list"` - - // The native severity as defined by the security findings provider's solution - // that generated the finding. - SeverityProduct []*NumberFilter `type:"list"` - - // A URL that links to a page about the current finding in the security findings - // provider's solution. - SourceUrl []*StringFilter `type:"list"` - - // The category of a threat intel indicator. - ThreatIntelIndicatorCategory []*StringFilter `type:"list"` - - // The date/time of the last observation of a threat intel indicator. - ThreatIntelIndicatorLastObservedAt []*DateFilter `type:"list"` - - // The source of the threat intel. - ThreatIntelIndicatorSource []*StringFilter `type:"list"` - - // The URL for more details from the source of the threat intel. - ThreatIntelIndicatorSourceUrl []*StringFilter `type:"list"` - - // The type of a threat intel indicator. - ThreatIntelIndicatorType []*StringFilter `type:"list"` - - // The value of a threat intel indicator. - ThreatIntelIndicatorValue []*StringFilter `type:"list"` - - // A finding's title. - Title []*StringFilter `type:"list"` - - // A finding type in the format of 'namespace/category/classifier' that classifies - // a finding. - Type []*StringFilter `type:"list"` - - // An ISO8601-formatted timestamp that indicates when the finding record was - // last updated by the security findings provider. - UpdatedAt []*DateFilter `type:"list"` - - // A list of name/value string pairs associated with the finding. These are - // custom, user-defined fields added to a finding. - UserDefinedFields []*MapFilter `type:"list"` - - // Indicates the veracity of a finding. - VerificationState []*StringFilter `type:"list"` - - // The workflow state of a finding. - WorkflowState []*StringFilter `type:"list"` -} - -// String returns the string representation -func (s AwsSecurityFindingFilters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AwsSecurityFindingFilters) GoString() string { - return s.String() -} - -// SetAwsAccountId sets the AwsAccountId field's value. -func (s *AwsSecurityFindingFilters) SetAwsAccountId(v []*StringFilter) *AwsSecurityFindingFilters { - s.AwsAccountId = v - return s -} - -// SetCompanyName sets the CompanyName field's value. -func (s *AwsSecurityFindingFilters) SetCompanyName(v []*StringFilter) *AwsSecurityFindingFilters { - s.CompanyName = v - return s -} - -// SetComplianceStatus sets the ComplianceStatus field's value. -func (s *AwsSecurityFindingFilters) SetComplianceStatus(v []*StringFilter) *AwsSecurityFindingFilters { - s.ComplianceStatus = v - return s -} - -// SetConfidence sets the Confidence field's value. -func (s *AwsSecurityFindingFilters) SetConfidence(v []*NumberFilter) *AwsSecurityFindingFilters { - s.Confidence = v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *AwsSecurityFindingFilters) SetCreatedAt(v []*DateFilter) *AwsSecurityFindingFilters { - s.CreatedAt = v - return s -} - -// SetCriticality sets the Criticality field's value. -func (s *AwsSecurityFindingFilters) SetCriticality(v []*NumberFilter) *AwsSecurityFindingFilters { - s.Criticality = v - return s -} - -// SetDescription sets the Description field's value. -func (s *AwsSecurityFindingFilters) SetDescription(v []*StringFilter) *AwsSecurityFindingFilters { - s.Description = v - return s -} - -// SetFirstObservedAt sets the FirstObservedAt field's value. -func (s *AwsSecurityFindingFilters) SetFirstObservedAt(v []*DateFilter) *AwsSecurityFindingFilters { - s.FirstObservedAt = v - return s -} - -// SetGeneratorId sets the GeneratorId field's value. -func (s *AwsSecurityFindingFilters) SetGeneratorId(v []*StringFilter) *AwsSecurityFindingFilters { - s.GeneratorId = v - return s -} - -// SetId sets the Id field's value. -func (s *AwsSecurityFindingFilters) SetId(v []*StringFilter) *AwsSecurityFindingFilters { - s.Id = v - return s -} - -// SetKeyword sets the Keyword field's value. -func (s *AwsSecurityFindingFilters) SetKeyword(v []*KeywordFilter) *AwsSecurityFindingFilters { - s.Keyword = v - return s -} - -// SetLastObservedAt sets the LastObservedAt field's value. -func (s *AwsSecurityFindingFilters) SetLastObservedAt(v []*DateFilter) *AwsSecurityFindingFilters { - s.LastObservedAt = v - return s -} - -// SetMalwareName sets the MalwareName field's value. -func (s *AwsSecurityFindingFilters) SetMalwareName(v []*StringFilter) *AwsSecurityFindingFilters { - s.MalwareName = v - return s -} - -// SetMalwarePath sets the MalwarePath field's value. -func (s *AwsSecurityFindingFilters) SetMalwarePath(v []*StringFilter) *AwsSecurityFindingFilters { - s.MalwarePath = v - return s -} - -// SetMalwareState sets the MalwareState field's value. -func (s *AwsSecurityFindingFilters) SetMalwareState(v []*StringFilter) *AwsSecurityFindingFilters { - s.MalwareState = v - return s -} - -// SetMalwareType sets the MalwareType field's value. -func (s *AwsSecurityFindingFilters) SetMalwareType(v []*StringFilter) *AwsSecurityFindingFilters { - s.MalwareType = v - return s -} - -// SetNetworkDestinationDomain sets the NetworkDestinationDomain field's value. -func (s *AwsSecurityFindingFilters) SetNetworkDestinationDomain(v []*StringFilter) *AwsSecurityFindingFilters { - s.NetworkDestinationDomain = v - return s -} - -// SetNetworkDestinationIpV4 sets the NetworkDestinationIpV4 field's value. -func (s *AwsSecurityFindingFilters) SetNetworkDestinationIpV4(v []*IpFilter) *AwsSecurityFindingFilters { - s.NetworkDestinationIpV4 = v - return s -} - -// SetNetworkDestinationIpV6 sets the NetworkDestinationIpV6 field's value. -func (s *AwsSecurityFindingFilters) SetNetworkDestinationIpV6(v []*IpFilter) *AwsSecurityFindingFilters { - s.NetworkDestinationIpV6 = v - return s -} - -// SetNetworkDestinationPort sets the NetworkDestinationPort field's value. -func (s *AwsSecurityFindingFilters) SetNetworkDestinationPort(v []*NumberFilter) *AwsSecurityFindingFilters { - s.NetworkDestinationPort = v - return s -} - -// SetNetworkDirection sets the NetworkDirection field's value. -func (s *AwsSecurityFindingFilters) SetNetworkDirection(v []*StringFilter) *AwsSecurityFindingFilters { - s.NetworkDirection = v - return s -} - -// SetNetworkProtocol sets the NetworkProtocol field's value. -func (s *AwsSecurityFindingFilters) SetNetworkProtocol(v []*StringFilter) *AwsSecurityFindingFilters { - s.NetworkProtocol = v - return s -} - -// SetNetworkSourceDomain sets the NetworkSourceDomain field's value. -func (s *AwsSecurityFindingFilters) SetNetworkSourceDomain(v []*StringFilter) *AwsSecurityFindingFilters { - s.NetworkSourceDomain = v - return s -} - -// SetNetworkSourceIpV4 sets the NetworkSourceIpV4 field's value. -func (s *AwsSecurityFindingFilters) SetNetworkSourceIpV4(v []*IpFilter) *AwsSecurityFindingFilters { - s.NetworkSourceIpV4 = v - return s -} - -// SetNetworkSourceIpV6 sets the NetworkSourceIpV6 field's value. -func (s *AwsSecurityFindingFilters) SetNetworkSourceIpV6(v []*IpFilter) *AwsSecurityFindingFilters { - s.NetworkSourceIpV6 = v - return s -} - -// SetNetworkSourceMac sets the NetworkSourceMac field's value. -func (s *AwsSecurityFindingFilters) SetNetworkSourceMac(v []*StringFilter) *AwsSecurityFindingFilters { - s.NetworkSourceMac = v - return s -} - -// SetNetworkSourcePort sets the NetworkSourcePort field's value. -func (s *AwsSecurityFindingFilters) SetNetworkSourcePort(v []*NumberFilter) *AwsSecurityFindingFilters { - s.NetworkSourcePort = v - return s -} - -// SetNoteText sets the NoteText field's value. -func (s *AwsSecurityFindingFilters) SetNoteText(v []*StringFilter) *AwsSecurityFindingFilters { - s.NoteText = v - return s -} - -// SetNoteUpdatedAt sets the NoteUpdatedAt field's value. -func (s *AwsSecurityFindingFilters) SetNoteUpdatedAt(v []*DateFilter) *AwsSecurityFindingFilters { - s.NoteUpdatedAt = v - return s -} - -// SetNoteUpdatedBy sets the NoteUpdatedBy field's value. -func (s *AwsSecurityFindingFilters) SetNoteUpdatedBy(v []*StringFilter) *AwsSecurityFindingFilters { - s.NoteUpdatedBy = v - return s -} - -// SetProcessLaunchedAt sets the ProcessLaunchedAt field's value. -func (s *AwsSecurityFindingFilters) SetProcessLaunchedAt(v []*DateFilter) *AwsSecurityFindingFilters { - s.ProcessLaunchedAt = v - return s -} - -// SetProcessName sets the ProcessName field's value. -func (s *AwsSecurityFindingFilters) SetProcessName(v []*StringFilter) *AwsSecurityFindingFilters { - s.ProcessName = v - return s -} - -// SetProcessParentPid sets the ProcessParentPid field's value. -func (s *AwsSecurityFindingFilters) SetProcessParentPid(v []*NumberFilter) *AwsSecurityFindingFilters { - s.ProcessParentPid = v - return s -} - -// SetProcessPath sets the ProcessPath field's value. -func (s *AwsSecurityFindingFilters) SetProcessPath(v []*StringFilter) *AwsSecurityFindingFilters { - s.ProcessPath = v - return s -} - -// SetProcessPid sets the ProcessPid field's value. -func (s *AwsSecurityFindingFilters) SetProcessPid(v []*NumberFilter) *AwsSecurityFindingFilters { - s.ProcessPid = v - return s -} - -// SetProcessTerminatedAt sets the ProcessTerminatedAt field's value. -func (s *AwsSecurityFindingFilters) SetProcessTerminatedAt(v []*DateFilter) *AwsSecurityFindingFilters { - s.ProcessTerminatedAt = v - return s -} - -// SetProductArn sets the ProductArn field's value. -func (s *AwsSecurityFindingFilters) SetProductArn(v []*StringFilter) *AwsSecurityFindingFilters { - s.ProductArn = v - return s -} - -// SetProductFields sets the ProductFields field's value. -func (s *AwsSecurityFindingFilters) SetProductFields(v []*MapFilter) *AwsSecurityFindingFilters { - s.ProductFields = v - return s -} - -// SetProductName sets the ProductName field's value. -func (s *AwsSecurityFindingFilters) SetProductName(v []*StringFilter) *AwsSecurityFindingFilters { - s.ProductName = v - return s -} - -// SetRecommendationText sets the RecommendationText field's value. -func (s *AwsSecurityFindingFilters) SetRecommendationText(v []*StringFilter) *AwsSecurityFindingFilters { - s.RecommendationText = v - return s -} - -// SetRecordState sets the RecordState field's value. -func (s *AwsSecurityFindingFilters) SetRecordState(v []*StringFilter) *AwsSecurityFindingFilters { - s.RecordState = v - return s -} - -// SetRelatedFindingsId sets the RelatedFindingsId field's value. -func (s *AwsSecurityFindingFilters) SetRelatedFindingsId(v []*StringFilter) *AwsSecurityFindingFilters { - s.RelatedFindingsId = v - return s -} - -// SetRelatedFindingsProductArn sets the RelatedFindingsProductArn field's value. -func (s *AwsSecurityFindingFilters) SetRelatedFindingsProductArn(v []*StringFilter) *AwsSecurityFindingFilters { - s.RelatedFindingsProductArn = v - return s -} - -// SetResourceAwsEc2InstanceIamInstanceProfileArn sets the ResourceAwsEc2InstanceIamInstanceProfileArn field's value. -func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceIamInstanceProfileArn(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceAwsEc2InstanceIamInstanceProfileArn = v - return s -} - -// SetResourceAwsEc2InstanceImageId sets the ResourceAwsEc2InstanceImageId field's value. -func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceImageId(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceAwsEc2InstanceImageId = v - return s -} - -// SetResourceAwsEc2InstanceIpV4Addresses sets the ResourceAwsEc2InstanceIpV4Addresses field's value. -func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceIpV4Addresses(v []*IpFilter) *AwsSecurityFindingFilters { - s.ResourceAwsEc2InstanceIpV4Addresses = v - return s -} - -// SetResourceAwsEc2InstanceIpV6Addresses sets the ResourceAwsEc2InstanceIpV6Addresses field's value. -func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceIpV6Addresses(v []*IpFilter) *AwsSecurityFindingFilters { - s.ResourceAwsEc2InstanceIpV6Addresses = v - return s -} - -// SetResourceAwsEc2InstanceKeyName sets the ResourceAwsEc2InstanceKeyName field's value. -func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceKeyName(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceAwsEc2InstanceKeyName = v - return s -} - -// SetResourceAwsEc2InstanceLaunchedAt sets the ResourceAwsEc2InstanceLaunchedAt field's value. -func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceLaunchedAt(v []*DateFilter) *AwsSecurityFindingFilters { - s.ResourceAwsEc2InstanceLaunchedAt = v - return s -} - -// SetResourceAwsEc2InstanceSubnetId sets the ResourceAwsEc2InstanceSubnetId field's value. -func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceSubnetId(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceAwsEc2InstanceSubnetId = v - return s -} - -// SetResourceAwsEc2InstanceType sets the ResourceAwsEc2InstanceType field's value. -func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceType(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceAwsEc2InstanceType = v - return s -} - -// SetResourceAwsEc2InstanceVpcId sets the ResourceAwsEc2InstanceVpcId field's value. -func (s *AwsSecurityFindingFilters) SetResourceAwsEc2InstanceVpcId(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceAwsEc2InstanceVpcId = v - return s -} - -// SetResourceAwsIamAccessKeyCreatedAt sets the ResourceAwsIamAccessKeyCreatedAt field's value. -func (s *AwsSecurityFindingFilters) SetResourceAwsIamAccessKeyCreatedAt(v []*DateFilter) *AwsSecurityFindingFilters { - s.ResourceAwsIamAccessKeyCreatedAt = v - return s -} - -// SetResourceAwsIamAccessKeyStatus sets the ResourceAwsIamAccessKeyStatus field's value. -func (s *AwsSecurityFindingFilters) SetResourceAwsIamAccessKeyStatus(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceAwsIamAccessKeyStatus = v - return s -} - -// SetResourceAwsIamAccessKeyUserName sets the ResourceAwsIamAccessKeyUserName field's value. -func (s *AwsSecurityFindingFilters) SetResourceAwsIamAccessKeyUserName(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceAwsIamAccessKeyUserName = v - return s -} - -// SetResourceAwsS3BucketOwnerId sets the ResourceAwsS3BucketOwnerId field's value. -func (s *AwsSecurityFindingFilters) SetResourceAwsS3BucketOwnerId(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceAwsS3BucketOwnerId = v - return s -} - -// SetResourceAwsS3BucketOwnerName sets the ResourceAwsS3BucketOwnerName field's value. -func (s *AwsSecurityFindingFilters) SetResourceAwsS3BucketOwnerName(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceAwsS3BucketOwnerName = v - return s -} - -// SetResourceContainerImageId sets the ResourceContainerImageId field's value. -func (s *AwsSecurityFindingFilters) SetResourceContainerImageId(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceContainerImageId = v - return s -} - -// SetResourceContainerImageName sets the ResourceContainerImageName field's value. -func (s *AwsSecurityFindingFilters) SetResourceContainerImageName(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceContainerImageName = v - return s -} - -// SetResourceContainerLaunchedAt sets the ResourceContainerLaunchedAt field's value. -func (s *AwsSecurityFindingFilters) SetResourceContainerLaunchedAt(v []*DateFilter) *AwsSecurityFindingFilters { - s.ResourceContainerLaunchedAt = v - return s -} - -// SetResourceContainerName sets the ResourceContainerName field's value. -func (s *AwsSecurityFindingFilters) SetResourceContainerName(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceContainerName = v - return s -} - -// SetResourceDetailsOther sets the ResourceDetailsOther field's value. -func (s *AwsSecurityFindingFilters) SetResourceDetailsOther(v []*MapFilter) *AwsSecurityFindingFilters { - s.ResourceDetailsOther = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *AwsSecurityFindingFilters) SetResourceId(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceId = v - return s -} - -// SetResourcePartition sets the ResourcePartition field's value. -func (s *AwsSecurityFindingFilters) SetResourcePartition(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourcePartition = v - return s -} - -// SetResourceRegion sets the ResourceRegion field's value. -func (s *AwsSecurityFindingFilters) SetResourceRegion(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceRegion = v - return s -} - -// SetResourceTags sets the ResourceTags field's value. -func (s *AwsSecurityFindingFilters) SetResourceTags(v []*MapFilter) *AwsSecurityFindingFilters { - s.ResourceTags = v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *AwsSecurityFindingFilters) SetResourceType(v []*StringFilter) *AwsSecurityFindingFilters { - s.ResourceType = v - return s -} - -// SetSeverityLabel sets the SeverityLabel field's value. -func (s *AwsSecurityFindingFilters) SetSeverityLabel(v []*StringFilter) *AwsSecurityFindingFilters { - s.SeverityLabel = v - return s -} - -// SetSeverityNormalized sets the SeverityNormalized field's value. -func (s *AwsSecurityFindingFilters) SetSeverityNormalized(v []*NumberFilter) *AwsSecurityFindingFilters { - s.SeverityNormalized = v - return s -} - -// SetSeverityProduct sets the SeverityProduct field's value. -func (s *AwsSecurityFindingFilters) SetSeverityProduct(v []*NumberFilter) *AwsSecurityFindingFilters { - s.SeverityProduct = v - return s -} - -// SetSourceUrl sets the SourceUrl field's value. -func (s *AwsSecurityFindingFilters) SetSourceUrl(v []*StringFilter) *AwsSecurityFindingFilters { - s.SourceUrl = v - return s -} - -// SetThreatIntelIndicatorCategory sets the ThreatIntelIndicatorCategory field's value. -func (s *AwsSecurityFindingFilters) SetThreatIntelIndicatorCategory(v []*StringFilter) *AwsSecurityFindingFilters { - s.ThreatIntelIndicatorCategory = v - return s -} - -// SetThreatIntelIndicatorLastObservedAt sets the ThreatIntelIndicatorLastObservedAt field's value. -func (s *AwsSecurityFindingFilters) SetThreatIntelIndicatorLastObservedAt(v []*DateFilter) *AwsSecurityFindingFilters { - s.ThreatIntelIndicatorLastObservedAt = v - return s -} - -// SetThreatIntelIndicatorSource sets the ThreatIntelIndicatorSource field's value. -func (s *AwsSecurityFindingFilters) SetThreatIntelIndicatorSource(v []*StringFilter) *AwsSecurityFindingFilters { - s.ThreatIntelIndicatorSource = v - return s -} - -// SetThreatIntelIndicatorSourceUrl sets the ThreatIntelIndicatorSourceUrl field's value. -func (s *AwsSecurityFindingFilters) SetThreatIntelIndicatorSourceUrl(v []*StringFilter) *AwsSecurityFindingFilters { - s.ThreatIntelIndicatorSourceUrl = v - return s -} - -// SetThreatIntelIndicatorType sets the ThreatIntelIndicatorType field's value. -func (s *AwsSecurityFindingFilters) SetThreatIntelIndicatorType(v []*StringFilter) *AwsSecurityFindingFilters { - s.ThreatIntelIndicatorType = v - return s -} - -// SetThreatIntelIndicatorValue sets the ThreatIntelIndicatorValue field's value. -func (s *AwsSecurityFindingFilters) SetThreatIntelIndicatorValue(v []*StringFilter) *AwsSecurityFindingFilters { - s.ThreatIntelIndicatorValue = v - return s -} - -// SetTitle sets the Title field's value. -func (s *AwsSecurityFindingFilters) SetTitle(v []*StringFilter) *AwsSecurityFindingFilters { - s.Title = v - return s -} - -// SetType sets the Type field's value. -func (s *AwsSecurityFindingFilters) SetType(v []*StringFilter) *AwsSecurityFindingFilters { - s.Type = v - return s -} - -// SetUpdatedAt sets the UpdatedAt field's value. -func (s *AwsSecurityFindingFilters) SetUpdatedAt(v []*DateFilter) *AwsSecurityFindingFilters { - s.UpdatedAt = v - return s -} - -// SetUserDefinedFields sets the UserDefinedFields field's value. -func (s *AwsSecurityFindingFilters) SetUserDefinedFields(v []*MapFilter) *AwsSecurityFindingFilters { - s.UserDefinedFields = v - return s -} - -// SetVerificationState sets the VerificationState field's value. -func (s *AwsSecurityFindingFilters) SetVerificationState(v []*StringFilter) *AwsSecurityFindingFilters { - s.VerificationState = v - return s -} - -// SetWorkflowState sets the WorkflowState field's value. -func (s *AwsSecurityFindingFilters) SetWorkflowState(v []*StringFilter) *AwsSecurityFindingFilters { - s.WorkflowState = v - return s -} - -type BatchDisableStandardsInput struct { - _ struct{} `type:"structure"` - - // The ARNS of the standards subscriptions that you want to disable. - // - // StandardsSubscriptionArns is a required field - StandardsSubscriptionArns []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchDisableStandardsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDisableStandardsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchDisableStandardsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchDisableStandardsInput"} - if s.StandardsSubscriptionArns == nil { - invalidParams.Add(request.NewErrParamRequired("StandardsSubscriptionArns")) - } - if s.StandardsSubscriptionArns != nil && len(s.StandardsSubscriptionArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StandardsSubscriptionArns", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStandardsSubscriptionArns sets the StandardsSubscriptionArns field's value. -func (s *BatchDisableStandardsInput) SetStandardsSubscriptionArns(v []*string) *BatchDisableStandardsInput { - s.StandardsSubscriptionArns = v - return s -} - -type BatchDisableStandardsOutput struct { - _ struct{} `type:"structure"` - - // The details of the standards subscriptions that were disabled. - StandardsSubscriptions []*StandardsSubscription `type:"list"` -} - -// String returns the string representation -func (s BatchDisableStandardsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDisableStandardsOutput) GoString() string { - return s.String() -} - -// SetStandardsSubscriptions sets the StandardsSubscriptions field's value. -func (s *BatchDisableStandardsOutput) SetStandardsSubscriptions(v []*StandardsSubscription) *BatchDisableStandardsOutput { - s.StandardsSubscriptions = v - return s -} - -type BatchEnableStandardsInput struct { - _ struct{} `type:"structure"` - - // The list of standards that you want to enable. - // - // StandardsSubscriptionRequests is a required field - StandardsSubscriptionRequests []*StandardsSubscriptionRequest `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchEnableStandardsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchEnableStandardsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchEnableStandardsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchEnableStandardsInput"} - if s.StandardsSubscriptionRequests == nil { - invalidParams.Add(request.NewErrParamRequired("StandardsSubscriptionRequests")) - } - if s.StandardsSubscriptionRequests != nil && len(s.StandardsSubscriptionRequests) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StandardsSubscriptionRequests", 1)) - } - if s.StandardsSubscriptionRequests != nil { - for i, v := range s.StandardsSubscriptionRequests { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "StandardsSubscriptionRequests", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStandardsSubscriptionRequests sets the StandardsSubscriptionRequests field's value. -func (s *BatchEnableStandardsInput) SetStandardsSubscriptionRequests(v []*StandardsSubscriptionRequest) *BatchEnableStandardsInput { - s.StandardsSubscriptionRequests = v - return s -} - -type BatchEnableStandardsOutput struct { - _ struct{} `type:"structure"` - - // The details of the standards subscriptions that were enabled. - StandardsSubscriptions []*StandardsSubscription `type:"list"` -} - -// String returns the string representation -func (s BatchEnableStandardsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchEnableStandardsOutput) GoString() string { - return s.String() -} - -// SetStandardsSubscriptions sets the StandardsSubscriptions field's value. -func (s *BatchEnableStandardsOutput) SetStandardsSubscriptions(v []*StandardsSubscription) *BatchEnableStandardsOutput { - s.StandardsSubscriptions = v - return s -} - -type BatchImportFindingsInput struct { - _ struct{} `type:"structure"` - - // A list of findings that you want to import. Must be submitted in the AWSSecurityFinding - // format. - // - // Findings is a required field - Findings []*AwsSecurityFinding `type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchImportFindingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchImportFindingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchImportFindingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchImportFindingsInput"} - if s.Findings == nil { - invalidParams.Add(request.NewErrParamRequired("Findings")) - } - if s.Findings != nil { - for i, v := range s.Findings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Findings", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFindings sets the Findings field's value. -func (s *BatchImportFindingsInput) SetFindings(v []*AwsSecurityFinding) *BatchImportFindingsInput { - s.Findings = v - return s -} - -type BatchImportFindingsOutput struct { - _ struct{} `type:"structure"` - - // The number of findings that cannot be imported. - // - // FailedCount is a required field - FailedCount *int64 `type:"integer" required:"true"` - - // The list of the findings that cannot be imported. - FailedFindings []*ImportFindingsError `type:"list"` - - // The number of findings that were successfully imported - // - // SuccessCount is a required field - SuccessCount *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s BatchImportFindingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchImportFindingsOutput) GoString() string { - return s.String() -} - -// SetFailedCount sets the FailedCount field's value. -func (s *BatchImportFindingsOutput) SetFailedCount(v int64) *BatchImportFindingsOutput { - s.FailedCount = &v - return s -} - -// SetFailedFindings sets the FailedFindings field's value. -func (s *BatchImportFindingsOutput) SetFailedFindings(v []*ImportFindingsError) *BatchImportFindingsOutput { - s.FailedFindings = v - return s -} - -// SetSuccessCount sets the SuccessCount field's value. -func (s *BatchImportFindingsOutput) SetSuccessCount(v int64) *BatchImportFindingsOutput { - s.SuccessCount = &v - return s -} - -// Exclusive to findings that are generated as the result of a check run against -// a specific rule in a supported standard (for example, AWS CIS Foundations). -// Contains compliance-related finding details. -type Compliance struct { - _ struct{} `type:"structure"` - - // Indicates the result of a compliance check. - Status *string `type:"string" enum:"ComplianceStatus"` -} - -// String returns the string representation -func (s Compliance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Compliance) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *Compliance) SetStatus(v string) *Compliance { - s.Status = &v - return s -} - -// Container details related to a finding. -type ContainerDetails struct { - _ struct{} `type:"structure"` - - // The identifier of the image related to a finding. - ImageId *string `type:"string"` - - // The name of the image related to a finding. - ImageName *string `type:"string"` - - // The date/time that the container was started. - LaunchedAt *string `type:"string"` - - // The name of the container related to a finding. - Name *string `type:"string"` -} - -// String returns the string representation -func (s ContainerDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContainerDetails) GoString() string { - return s.String() -} - -// SetImageId sets the ImageId field's value. -func (s *ContainerDetails) SetImageId(v string) *ContainerDetails { - s.ImageId = &v - return s -} - -// SetImageName sets the ImageName field's value. -func (s *ContainerDetails) SetImageName(v string) *ContainerDetails { - s.ImageName = &v - return s -} - -// SetLaunchedAt sets the LaunchedAt field's value. -func (s *ContainerDetails) SetLaunchedAt(v string) *ContainerDetails { - s.LaunchedAt = &v - return s -} - -// SetName sets the Name field's value. -func (s *ContainerDetails) SetName(v string) *ContainerDetails { - s.Name = &v - return s -} - -type CreateInsightInput struct { - _ struct{} `type:"structure"` - - // A collection of attributes that are applied to all active Security Hub-aggregated - // findings and that result in a subset of findings that are included in this - // insight. - // - // Filters is a required field - Filters *AwsSecurityFindingFilters `type:"structure" required:"true"` - - // The attribute by which the insight's findings are grouped. This attribute - // is used as a findings aggregator for the purposes of viewing and managing - // multiple related findings under a single operand. - // - // GroupByAttribute is a required field - GroupByAttribute *string `type:"string" required:"true"` - - // The user-defined name that identifies the insight that you want to create. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateInsightInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInsightInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInsightInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInsightInput"} - if s.Filters == nil { - invalidParams.Add(request.NewErrParamRequired("Filters")) - } - if s.GroupByAttribute == nil { - invalidParams.Add(request.NewErrParamRequired("GroupByAttribute")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *CreateInsightInput) SetFilters(v *AwsSecurityFindingFilters) *CreateInsightInput { - s.Filters = v - return s -} - -// SetGroupByAttribute sets the GroupByAttribute field's value. -func (s *CreateInsightInput) SetGroupByAttribute(v string) *CreateInsightInput { - s.GroupByAttribute = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateInsightInput) SetName(v string) *CreateInsightInput { - s.Name = &v - return s -} - -type CreateInsightOutput struct { - _ struct{} `type:"structure"` - - // The ARN Of the created insight. - // - // InsightArn is a required field - InsightArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateInsightOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateInsightOutput) GoString() string { - return s.String() -} - -// SetInsightArn sets the InsightArn field's value. -func (s *CreateInsightOutput) SetInsightArn(v string) *CreateInsightOutput { - s.InsightArn = &v - return s -} - -type CreateMembersInput struct { - _ struct{} `type:"structure"` - - // A list of account ID and email address pairs of the accounts that you want - // to associate with the master Security Hub account. - AccountDetails []*AccountDetails `type:"list"` -} - -// String returns the string representation -func (s CreateMembersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMembersInput) GoString() string { - return s.String() -} - -// SetAccountDetails sets the AccountDetails field's value. -func (s *CreateMembersInput) SetAccountDetails(v []*AccountDetails) *CreateMembersInput { - s.AccountDetails = v - return s -} - -type CreateMembersOutput struct { - _ struct{} `type:"structure"` - - // A list of account ID and email address pairs of the AWS accounts that could - // not be processed. - UnprocessedAccounts []*Result `type:"list"` -} - -// String returns the string representation -func (s CreateMembersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMembersOutput) GoString() string { - return s.String() -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *CreateMembersOutput) SetUnprocessedAccounts(v []*Result) *CreateMembersOutput { - s.UnprocessedAccounts = v - return s -} - -// A date filter for querying findings. -type DateFilter struct { - _ struct{} `type:"structure"` - - // A date range for the date filter. - DateRange *DateRange `type:"structure"` - - // An end date for the date filter. - End *string `type:"string"` - - // A start date for the date filter. - Start *string `type:"string"` -} - -// String returns the string representation -func (s DateFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DateFilter) GoString() string { - return s.String() -} - -// SetDateRange sets the DateRange field's value. -func (s *DateFilter) SetDateRange(v *DateRange) *DateFilter { - s.DateRange = v - return s -} - -// SetEnd sets the End field's value. -func (s *DateFilter) SetEnd(v string) *DateFilter { - s.End = &v - return s -} - -// SetStart sets the Start field's value. -func (s *DateFilter) SetStart(v string) *DateFilter { - s.Start = &v - return s -} - -// A date range for the date filter. -type DateRange struct { - _ struct{} `type:"structure"` - - // A date range unit for the date filter. - Unit *string `type:"string" enum:"DateRangeUnit"` - - // A date range value for the date filter. - Value *int64 `type:"integer"` -} - -// String returns the string representation -func (s DateRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DateRange) GoString() string { - return s.String() -} - -// SetUnit sets the Unit field's value. -func (s *DateRange) SetUnit(v string) *DateRange { - s.Unit = &v - return s -} - -// SetValue sets the Value field's value. -func (s *DateRange) SetValue(v int64) *DateRange { - s.Value = &v - return s -} - -type DeclineInvitationsInput struct { - _ struct{} `type:"structure"` - - // A list of account IDs specifying accounts whose invitations to Security Hub - // you want to decline. - AccountIds []*string `type:"list"` -} - -// String returns the string representation -func (s DeclineInvitationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeclineInvitationsInput) GoString() string { - return s.String() -} - -// SetAccountIds sets the AccountIds field's value. -func (s *DeclineInvitationsInput) SetAccountIds(v []*string) *DeclineInvitationsInput { - s.AccountIds = v - return s -} - -type DeclineInvitationsOutput struct { - _ struct{} `type:"structure"` - - // A list of account ID and email address pairs of the AWS accounts that could - // not be processed. - UnprocessedAccounts []*Result `type:"list"` -} - -// String returns the string representation -func (s DeclineInvitationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeclineInvitationsOutput) GoString() string { - return s.String() -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *DeclineInvitationsOutput) SetUnprocessedAccounts(v []*Result) *DeclineInvitationsOutput { - s.UnprocessedAccounts = v - return s -} - -type DeleteInsightInput struct { - _ struct{} `type:"structure"` - - // The ARN of the insight that you want to delete. - // - // InsightArn is a required field - InsightArn *string `location:"uri" locationName:"InsightArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteInsightInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInsightInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInsightInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInsightInput"} - if s.InsightArn == nil { - invalidParams.Add(request.NewErrParamRequired("InsightArn")) - } - if s.InsightArn != nil && len(*s.InsightArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InsightArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInsightArn sets the InsightArn field's value. -func (s *DeleteInsightInput) SetInsightArn(v string) *DeleteInsightInput { - s.InsightArn = &v - return s -} - -type DeleteInsightOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the insight that was deleted. - // - // InsightArn is a required field - InsightArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteInsightOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInsightOutput) GoString() string { - return s.String() -} - -// SetInsightArn sets the InsightArn field's value. -func (s *DeleteInsightOutput) SetInsightArn(v string) *DeleteInsightOutput { - s.InsightArn = &v - return s -} - -type DeleteInvitationsInput struct { - _ struct{} `type:"structure"` - - // A list of account IDs specifying accounts whose invitations to Security Hub - // you want to delete. - AccountIds []*string `type:"list"` -} - -// String returns the string representation -func (s DeleteInvitationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInvitationsInput) GoString() string { - return s.String() -} - -// SetAccountIds sets the AccountIds field's value. -func (s *DeleteInvitationsInput) SetAccountIds(v []*string) *DeleteInvitationsInput { - s.AccountIds = v - return s -} - -type DeleteInvitationsOutput struct { - _ struct{} `type:"structure"` - - // A list of account ID and email address pairs of the AWS accounts that could - // not be processed. - UnprocessedAccounts []*Result `type:"list"` -} - -// String returns the string representation -func (s DeleteInvitationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInvitationsOutput) GoString() string { - return s.String() -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *DeleteInvitationsOutput) SetUnprocessedAccounts(v []*Result) *DeleteInvitationsOutput { - s.UnprocessedAccounts = v - return s -} - -type DeleteMembersInput struct { - _ struct{} `type:"structure"` - - // A list of account IDs of the Security Hub member accounts that you want to - // delete. - AccountIds []*string `type:"list"` -} - -// String returns the string representation -func (s DeleteMembersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMembersInput) GoString() string { - return s.String() -} - -// SetAccountIds sets the AccountIds field's value. -func (s *DeleteMembersInput) SetAccountIds(v []*string) *DeleteMembersInput { - s.AccountIds = v - return s -} - -type DeleteMembersOutput struct { - _ struct{} `type:"structure"` - - // A list of account ID and email address pairs of the AWS accounts that could - // not be processed. - UnprocessedAccounts []*Result `type:"list"` -} - -// String returns the string representation -func (s DeleteMembersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMembersOutput) GoString() string { - return s.String() -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *DeleteMembersOutput) SetUnprocessedAccounts(v []*Result) *DeleteMembersOutput { - s.UnprocessedAccounts = v - return s -} - -type DisableImportFindingsForProductInput struct { - _ struct{} `type:"structure"` - - // The ARN of a resource that represents your subscription to a supported product. - // - // ProductSubscriptionArn is a required field - ProductSubscriptionArn *string `location:"uri" locationName:"ProductSubscriptionArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableImportFindingsForProductInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableImportFindingsForProductInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableImportFindingsForProductInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableImportFindingsForProductInput"} - if s.ProductSubscriptionArn == nil { - invalidParams.Add(request.NewErrParamRequired("ProductSubscriptionArn")) - } - if s.ProductSubscriptionArn != nil && len(*s.ProductSubscriptionArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductSubscriptionArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetProductSubscriptionArn sets the ProductSubscriptionArn field's value. -func (s *DisableImportFindingsForProductInput) SetProductSubscriptionArn(v string) *DisableImportFindingsForProductInput { - s.ProductSubscriptionArn = &v - return s -} - -type DisableImportFindingsForProductOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableImportFindingsForProductOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableImportFindingsForProductOutput) GoString() string { - return s.String() -} - -type DisableSecurityHubInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableSecurityHubInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableSecurityHubInput) GoString() string { - return s.String() -} - -type DisableSecurityHubOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableSecurityHubOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableSecurityHubOutput) GoString() string { - return s.String() -} - -type DisassociateFromMasterAccountInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateFromMasterAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateFromMasterAccountInput) GoString() string { - return s.String() -} - -type DisassociateFromMasterAccountOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateFromMasterAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateFromMasterAccountOutput) GoString() string { - return s.String() -} - -type DisassociateMembersInput struct { - _ struct{} `type:"structure"` - - // The account IDs of the member accounts that you want to disassociate from - // the master account. - AccountIds []*string `type:"list"` -} - -// String returns the string representation -func (s DisassociateMembersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateMembersInput) GoString() string { - return s.String() -} - -// SetAccountIds sets the AccountIds field's value. -func (s *DisassociateMembersInput) SetAccountIds(v []*string) *DisassociateMembersInput { - s.AccountIds = v - return s -} - -type DisassociateMembersOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateMembersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateMembersOutput) GoString() string { - return s.String() -} - -type EnableImportFindingsForProductInput struct { - _ struct{} `type:"structure"` - - // The ARN of the product that generates findings that you want to import into - // Security Hub. - // - // ProductArn is a required field - ProductArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s EnableImportFindingsForProductInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableImportFindingsForProductInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableImportFindingsForProductInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableImportFindingsForProductInput"} - if s.ProductArn == nil { - invalidParams.Add(request.NewErrParamRequired("ProductArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetProductArn sets the ProductArn field's value. -func (s *EnableImportFindingsForProductInput) SetProductArn(v string) *EnableImportFindingsForProductInput { - s.ProductArn = &v - return s -} - -type EnableImportFindingsForProductOutput struct { - _ struct{} `type:"structure"` - - // The ARN of a resource that represents your subscription to the product that - // generates the findings that you want to import into Security Hub. - ProductSubscriptionArn *string `type:"string"` -} - -// String returns the string representation -func (s EnableImportFindingsForProductOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableImportFindingsForProductOutput) GoString() string { - return s.String() -} - -// SetProductSubscriptionArn sets the ProductSubscriptionArn field's value. -func (s *EnableImportFindingsForProductOutput) SetProductSubscriptionArn(v string) *EnableImportFindingsForProductOutput { - s.ProductSubscriptionArn = &v - return s -} - -type EnableSecurityHubInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableSecurityHubInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableSecurityHubInput) GoString() string { - return s.String() -} - -type EnableSecurityHubOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableSecurityHubOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableSecurityHubOutput) GoString() string { - return s.String() -} - -type GetEnabledStandardsInput struct { - _ struct{} `type:"structure"` - - // Indicates the maximum number of items that you want in the response. - MaxResults *int64 `min:"1" type:"integer"` - - // Paginates results. Set the value of this parameter to NULL on your first - // call to the GetEnabledStandards operation. For subsequent calls to the operation, - // fill nextToken in the request with the value of nextToken from the previous - // response to continue listing data. - NextToken *string `type:"string"` - - // The list of standards subscription ARNS that you want to list and describe. - StandardsSubscriptionArns []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s GetEnabledStandardsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEnabledStandardsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetEnabledStandardsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetEnabledStandardsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.StandardsSubscriptionArns != nil && len(s.StandardsSubscriptionArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StandardsSubscriptionArns", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetEnabledStandardsInput) SetMaxResults(v int64) *GetEnabledStandardsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetEnabledStandardsInput) SetNextToken(v string) *GetEnabledStandardsInput { - s.NextToken = &v - return s -} - -// SetStandardsSubscriptionArns sets the StandardsSubscriptionArns field's value. -func (s *GetEnabledStandardsInput) SetStandardsSubscriptionArns(v []*string) *GetEnabledStandardsInput { - s.StandardsSubscriptionArns = v - return s -} - -type GetEnabledStandardsOutput struct { - _ struct{} `type:"structure"` - - // The token that is required for pagination. - NextToken *string `type:"string"` - - // The standards subscription details returned by the operation. - StandardsSubscriptions []*StandardsSubscription `type:"list"` -} - -// String returns the string representation -func (s GetEnabledStandardsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEnabledStandardsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetEnabledStandardsOutput) SetNextToken(v string) *GetEnabledStandardsOutput { - s.NextToken = &v - return s -} - -// SetStandardsSubscriptions sets the StandardsSubscriptions field's value. -func (s *GetEnabledStandardsOutput) SetStandardsSubscriptions(v []*StandardsSubscription) *GetEnabledStandardsOutput { - s.StandardsSubscriptions = v - return s -} - -type GetFindingsInput struct { - _ struct{} `type:"structure"` - - // A collection of attributes that is use for querying findings. - Filters *AwsSecurityFindingFilters `type:"structure"` - - // Indicates the maximum number of items that you want in the response. - MaxResults *int64 `min:"1" type:"integer"` - - // Paginates results. Set the value of this parameter to NULL on your first - // call to the GetFindings operation. For subsequent calls to the operation, - // fill nextToken in the request with the value of nextToken from the previous - // response to continue listing data. - NextToken *string `type:"string"` - - // A collection of attributes used for sorting findings. - SortCriteria []*SortCriterion `type:"list"` -} - -// String returns the string representation -func (s GetFindingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFindingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFindingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFindingsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *GetFindingsInput) SetFilters(v *AwsSecurityFindingFilters) *GetFindingsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetFindingsInput) SetMaxResults(v int64) *GetFindingsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetFindingsInput) SetNextToken(v string) *GetFindingsInput { - s.NextToken = &v - return s -} - -// SetSortCriteria sets the SortCriteria field's value. -func (s *GetFindingsInput) SetSortCriteria(v []*SortCriterion) *GetFindingsInput { - s.SortCriteria = v - return s -} - -type GetFindingsOutput struct { - _ struct{} `type:"structure"` - - // Findings details returned by the operation. - // - // Findings is a required field - Findings []*AwsSecurityFinding `type:"list" required:"true"` - - // The token that is required for pagination. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetFindingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetFindingsOutput) GoString() string { - return s.String() -} - -// SetFindings sets the Findings field's value. -func (s *GetFindingsOutput) SetFindings(v []*AwsSecurityFinding) *GetFindingsOutput { - s.Findings = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetFindingsOutput) SetNextToken(v string) *GetFindingsOutput { - s.NextToken = &v - return s -} - -type GetInsightResultsInput struct { - _ struct{} `type:"structure"` - - // The ARN of the insight whose results you want to see. - // - // InsightArn is a required field - InsightArn *string `location:"uri" locationName:"InsightArn" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetInsightResultsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInsightResultsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInsightResultsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInsightResultsInput"} - if s.InsightArn == nil { - invalidParams.Add(request.NewErrParamRequired("InsightArn")) - } - if s.InsightArn != nil && len(*s.InsightArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InsightArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInsightArn sets the InsightArn field's value. -func (s *GetInsightResultsInput) SetInsightArn(v string) *GetInsightResultsInput { - s.InsightArn = &v - return s -} - -type GetInsightResultsOutput struct { - _ struct{} `type:"structure"` - - // The insight results returned by the operation. - // - // InsightResults is a required field - InsightResults *InsightResults `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GetInsightResultsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInsightResultsOutput) GoString() string { - return s.String() -} - -// SetInsightResults sets the InsightResults field's value. -func (s *GetInsightResultsOutput) SetInsightResults(v *InsightResults) *GetInsightResultsOutput { - s.InsightResults = v - return s -} - -type GetInsightsInput struct { - _ struct{} `type:"structure"` - - // The ARNS of the insights that you want to describe. - InsightArns []*string `type:"list"` - - // Indicates the maximum number of items that you want in the response. - MaxResults *int64 `min:"1" type:"integer"` - - // Paginates results. Set the value of this parameter to NULL on your first - // call to the GetInsights operation. For subsequent calls to the operation, - // fill nextToken in the request with the value of nextToken from the previous - // response to continue listing data. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetInsightsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInsightsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInsightsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInsightsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInsightArns sets the InsightArns field's value. -func (s *GetInsightsInput) SetInsightArns(v []*string) *GetInsightsInput { - s.InsightArns = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetInsightsInput) SetMaxResults(v int64) *GetInsightsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetInsightsInput) SetNextToken(v string) *GetInsightsInput { - s.NextToken = &v - return s -} - -type GetInsightsOutput struct { - _ struct{} `type:"structure"` - - // The insights returned by the operation. - // - // Insights is a required field - Insights []*Insight `type:"list" required:"true"` - - // The token that is required for pagination. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetInsightsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInsightsOutput) GoString() string { - return s.String() -} - -// SetInsights sets the Insights field's value. -func (s *GetInsightsOutput) SetInsights(v []*Insight) *GetInsightsOutput { - s.Insights = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetInsightsOutput) SetNextToken(v string) *GetInsightsOutput { - s.NextToken = &v - return s -} - -type GetInvitationsCountInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetInvitationsCountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInvitationsCountInput) GoString() string { - return s.String() -} - -type GetInvitationsCountOutput struct { - _ struct{} `type:"structure"` - - // The number of all membership invitations sent to this Security Hub member - // account, not including the currently accepted invitation. - InvitationsCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s GetInvitationsCountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInvitationsCountOutput) GoString() string { - return s.String() -} - -// SetInvitationsCount sets the InvitationsCount field's value. -func (s *GetInvitationsCountOutput) SetInvitationsCount(v int64) *GetInvitationsCountOutput { - s.InvitationsCount = &v - return s -} - -type GetMasterAccountInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetMasterAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMasterAccountInput) GoString() string { - return s.String() -} - -type GetMasterAccountOutput struct { - _ struct{} `type:"structure"` - - // A list of details about the Security Hub master account for the current member - // account. - Master *Invitation `type:"structure"` -} - -// String returns the string representation -func (s GetMasterAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMasterAccountOutput) GoString() string { - return s.String() -} - -// SetMaster sets the Master field's value. -func (s *GetMasterAccountOutput) SetMaster(v *Invitation) *GetMasterAccountOutput { - s.Master = v - return s -} - -type GetMembersInput struct { - _ struct{} `type:"structure"` - - // A list of account IDs for the Security Hub member accounts on which you want - // to return the details. - // - // AccountIds is a required field - AccountIds []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s GetMembersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMembersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMembersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMembersInput"} - if s.AccountIds == nil { - invalidParams.Add(request.NewErrParamRequired("AccountIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountIds sets the AccountIds field's value. -func (s *GetMembersInput) SetAccountIds(v []*string) *GetMembersInput { - s.AccountIds = v - return s -} - -type GetMembersOutput struct { - _ struct{} `type:"structure"` - - // A list of details about the Security Hub member accounts. - Members []*Member `type:"list"` - - // A list of account ID and email address pairs of the AWS accounts that could - // not be processed. - UnprocessedAccounts []*Result `type:"list"` -} - -// String returns the string representation -func (s GetMembersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMembersOutput) GoString() string { - return s.String() -} - -// SetMembers sets the Members field's value. -func (s *GetMembersOutput) SetMembers(v []*Member) *GetMembersOutput { - s.Members = v - return s -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *GetMembersOutput) SetUnprocessedAccounts(v []*Result) *GetMembersOutput { - s.UnprocessedAccounts = v - return s -} - -// Includes details of the list of the findings that cannot be imported. -type ImportFindingsError struct { - _ struct{} `type:"structure"` - - // The code of the error made during the BatchImportFindings operation. - // - // ErrorCode is a required field - ErrorCode *string `type:"string" required:"true"` - - // The message of the error made during the BatchImportFindings operation. - // - // ErrorMessage is a required field - ErrorMessage *string `type:"string" required:"true"` - - // The id of the error made during the BatchImportFindings operation. - // - // Id is a required field - Id *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ImportFindingsError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportFindingsError) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *ImportFindingsError) SetErrorCode(v string) *ImportFindingsError { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *ImportFindingsError) SetErrorMessage(v string) *ImportFindingsError { - s.ErrorMessage = &v - return s -} - -// SetId sets the Id field's value. -func (s *ImportFindingsError) SetId(v string) *ImportFindingsError { - s.Id = &v - return s -} - -// Contains information about a Security Hub insight. -type Insight struct { - _ struct{} `type:"structure"` - - // A collection of attributes that are applied to all active Security Hub-aggregated - // findings and that result in a subset of findings that are included in this - // insight. - // - // Filters is a required field - Filters *AwsSecurityFindingFilters `type:"structure" required:"true"` - - // The attribute by which the insight's findings are grouped. This attribute - // is used as a findings aggregator for the purposes of viewing and managing - // multiple related findings under a single operand. - // - // GroupByAttribute is a required field - GroupByAttribute *string `type:"string" required:"true"` - - // The ARN of a Security Hub insight. - // - // InsightArn is a required field - InsightArn *string `type:"string" required:"true"` - - // The name of a Security Hub insight. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Insight) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Insight) GoString() string { - return s.String() -} - -// SetFilters sets the Filters field's value. -func (s *Insight) SetFilters(v *AwsSecurityFindingFilters) *Insight { - s.Filters = v - return s -} - -// SetGroupByAttribute sets the GroupByAttribute field's value. -func (s *Insight) SetGroupByAttribute(v string) *Insight { - s.GroupByAttribute = &v - return s -} - -// SetInsightArn sets the InsightArn field's value. -func (s *Insight) SetInsightArn(v string) *Insight { - s.InsightArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *Insight) SetName(v string) *Insight { - s.Name = &v - return s -} - -// The insight result values returned by the GetInsightResults operation. -type InsightResultValue struct { - _ struct{} `type:"structure"` - - // The number of findings returned for each GroupByAttributeValue. - // - // Count is a required field - Count *int64 `type:"integer" required:"true"` - - // The value of the attribute by which the findings are grouped for the insight's - // whose results are returned by the GetInsightResults operation. - // - // GroupByAttributeValue is a required field - GroupByAttributeValue *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s InsightResultValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InsightResultValue) GoString() string { - return s.String() -} - -// SetCount sets the Count field's value. -func (s *InsightResultValue) SetCount(v int64) *InsightResultValue { - s.Count = &v - return s -} - -// SetGroupByAttributeValue sets the GroupByAttributeValue field's value. -func (s *InsightResultValue) SetGroupByAttributeValue(v string) *InsightResultValue { - s.GroupByAttributeValue = &v - return s -} - -// The insight results returned by the GetInsightResults operation. -type InsightResults struct { - _ struct{} `type:"structure"` - - // The attribute by which the findings are grouped for the insight's whose results - // are returned by the GetInsightResults operation. - // - // GroupByAttribute is a required field - GroupByAttribute *string `type:"string" required:"true"` - - // The ARN of the insight whose results are returned by the GetInsightResults - // operation. - // - // InsightArn is a required field - InsightArn *string `type:"string" required:"true"` - - // The list of insight result values returned by the GetInsightResults operation. - // - // ResultValues is a required field - ResultValues []*InsightResultValue `type:"list" required:"true"` -} - -// String returns the string representation -func (s InsightResults) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InsightResults) GoString() string { - return s.String() -} - -// SetGroupByAttribute sets the GroupByAttribute field's value. -func (s *InsightResults) SetGroupByAttribute(v string) *InsightResults { - s.GroupByAttribute = &v - return s -} - -// SetInsightArn sets the InsightArn field's value. -func (s *InsightResults) SetInsightArn(v string) *InsightResults { - s.InsightArn = &v - return s -} - -// SetResultValues sets the ResultValues field's value. -func (s *InsightResults) SetResultValues(v []*InsightResultValue) *InsightResults { - s.ResultValues = v - return s -} - -// The details of an invitation sent to an AWS account by the Security Hub master -// account. -type Invitation struct { - _ struct{} `type:"structure"` - - // The account ID of the master Security Hub account who sent the invitation. - AccountId *string `type:"string"` - - // The ID of the invitation sent by the master Security Hub account. - InvitationId *string `type:"string"` - - // The timestamp of when the invitation was sent. - InvitedAt *time.Time `type:"timestamp" timestampFormat:"iso8601"` - - // The current relationship status between the inviter and invitee accounts. - MemberStatus *string `type:"string"` -} - -// String returns the string representation -func (s Invitation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Invitation) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *Invitation) SetAccountId(v string) *Invitation { - s.AccountId = &v - return s -} - -// SetInvitationId sets the InvitationId field's value. -func (s *Invitation) SetInvitationId(v string) *Invitation { - s.InvitationId = &v - return s -} - -// SetInvitedAt sets the InvitedAt field's value. -func (s *Invitation) SetInvitedAt(v time.Time) *Invitation { - s.InvitedAt = &v - return s -} - -// SetMemberStatus sets the MemberStatus field's value. -func (s *Invitation) SetMemberStatus(v string) *Invitation { - s.MemberStatus = &v - return s -} - -type InviteMembersInput struct { - _ struct{} `type:"structure"` - - // A list of IDs of the AWS accounts that you want to invite to Security Hub - // as members. - AccountIds []*string `type:"list"` -} - -// String returns the string representation -func (s InviteMembersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InviteMembersInput) GoString() string { - return s.String() -} - -// SetAccountIds sets the AccountIds field's value. -func (s *InviteMembersInput) SetAccountIds(v []*string) *InviteMembersInput { - s.AccountIds = v - return s -} - -type InviteMembersOutput struct { - _ struct{} `type:"structure"` - - // A list of account ID and email address pairs of the AWS accounts that could - // not be processed. - UnprocessedAccounts []*Result `type:"list"` -} - -// String returns the string representation -func (s InviteMembersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InviteMembersOutput) GoString() string { - return s.String() -} - -// SetUnprocessedAccounts sets the UnprocessedAccounts field's value. -func (s *InviteMembersOutput) SetUnprocessedAccounts(v []*Result) *InviteMembersOutput { - s.UnprocessedAccounts = v - return s -} - -// The IP filter for querying findings.> -type IpFilter struct { - _ struct{} `type:"structure"` - - // Finding's CIDR value. - Cidr *string `type:"string"` -} - -// String returns the string representation -func (s IpFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IpFilter) GoString() string { - return s.String() -} - -// SetCidr sets the Cidr field's value. -func (s *IpFilter) SetCidr(v string) *IpFilter { - s.Cidr = &v - return s -} - -// A keyword filter for querying findings. -type KeywordFilter struct { - _ struct{} `type:"structure"` - - // A value for the keyword. - Value *string `type:"string"` -} - -// String returns the string representation -func (s KeywordFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KeywordFilter) GoString() string { - return s.String() -} - -// SetValue sets the Value field's value. -func (s *KeywordFilter) SetValue(v string) *KeywordFilter { - s.Value = &v - return s -} - -type ListEnabledProductsForImportInput struct { - _ struct{} `type:"structure"` - - // Indicates the maximum number of items that you want in the response. - MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` - - // Paginates results. Set the value of this parameter to NULL on your first - // call to the ListEnabledProductsForImport operation. For subsequent calls - // to the operation, fill nextToken in the request with the value of NextToken - // from the previous response to continue listing data. - NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` -} - -// String returns the string representation -func (s ListEnabledProductsForImportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEnabledProductsForImportInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListEnabledProductsForImportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListEnabledProductsForImportInput"} - 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 *ListEnabledProductsForImportInput) SetMaxResults(v int64) *ListEnabledProductsForImportInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEnabledProductsForImportInput) SetNextToken(v string) *ListEnabledProductsForImportInput { - s.NextToken = &v - return s -} - -type ListEnabledProductsForImportOutput struct { - _ struct{} `type:"structure"` - - // The token that is required for pagination. - NextToken *string `type:"string"` - - // A list of ARNs for the resources that represent your subscriptions to products. - ProductSubscriptions []*string `type:"list"` -} - -// String returns the string representation -func (s ListEnabledProductsForImportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEnabledProductsForImportOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEnabledProductsForImportOutput) SetNextToken(v string) *ListEnabledProductsForImportOutput { - s.NextToken = &v - return s -} - -// SetProductSubscriptions sets the ProductSubscriptions field's value. -func (s *ListEnabledProductsForImportOutput) SetProductSubscriptions(v []*string) *ListEnabledProductsForImportOutput { - s.ProductSubscriptions = v - return s -} - -type ListInvitationsInput struct { - _ struct{} `type:"structure"` - - // Indicates the maximum number of items that you want in the response. - MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` - - // Paginates results. Set the value of this parameter to NULL on your first - // call to the ListInvitations operation. For subsequent calls to the operation, - // fill nextToken in the request with the value of NextToken from the previous - // response to continue listing data. - NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` -} - -// String returns the string representation -func (s ListInvitationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInvitationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInvitationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInvitationsInput"} - 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 *ListInvitationsInput) SetMaxResults(v int64) *ListInvitationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListInvitationsInput) SetNextToken(v string) *ListInvitationsInput { - s.NextToken = &v - return s -} - -type ListInvitationsOutput struct { - _ struct{} `type:"structure"` - - // The details of the invitations returned by the operation. - Invitations []*Invitation `type:"list"` - - // The token that is required for pagination. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListInvitationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInvitationsOutput) GoString() string { - return s.String() -} - -// SetInvitations sets the Invitations field's value. -func (s *ListInvitationsOutput) SetInvitations(v []*Invitation) *ListInvitationsOutput { - s.Invitations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListInvitationsOutput) SetNextToken(v string) *ListInvitationsOutput { - s.NextToken = &v - return s -} - -type ListMembersInput struct { - _ struct{} `type:"structure"` - - // Indicates the maximum number of items that you want in the response. - MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` - - // Paginates results. Set the value of this parameter to NULL on your first - // call to the ListMembers operation. For subsequent calls to the operation, - // fill nextToken in the request with the value of NextToken from the previous - // response to continue listing data. - NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` - - // Specifies what member accounts the response includes based on their relationship - // status with the master account. The default value is TRUE. If onlyAssociated - // is set to TRUE, the response includes member accounts whose relationship - // status with the master is set to ENABLED or DISABLED. If onlyAssociated is - // set to FALSE, the response includes all existing member accounts. - OnlyAssociated *bool `location:"querystring" locationName:"OnlyAssociated" type:"boolean"` -} - -// String returns the string representation -func (s ListMembersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListMembersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListMembersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListMembersInput"} - 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 *ListMembersInput) SetMaxResults(v int64) *ListMembersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListMembersInput) SetNextToken(v string) *ListMembersInput { - s.NextToken = &v - return s -} - -// SetOnlyAssociated sets the OnlyAssociated field's value. -func (s *ListMembersInput) SetOnlyAssociated(v bool) *ListMembersInput { - s.OnlyAssociated = &v - return s -} - -type ListMembersOutput struct { - _ struct{} `type:"structure"` - - // Member details returned by the operation. - Members []*Member `type:"list"` - - // The token that is required for pagination. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListMembersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListMembersOutput) GoString() string { - return s.String() -} - -// SetMembers sets the Members field's value. -func (s *ListMembersOutput) SetMembers(v []*Member) *ListMembersOutput { - s.Members = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListMembersOutput) SetNextToken(v string) *ListMembersOutput { - s.NextToken = &v - return s -} - -// A list of malware related to a finding. -type Malware struct { - _ struct{} `type:"structure"` - - // The name of the malware that was observed. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The filesystem path of the malware that was observed. - Path *string `type:"string"` - - // The state of the malware that was observed. - State *string `type:"string" enum:"MalwareState"` - - // The type of the malware that was observed. - Type *string `type:"string" enum:"MalwareType"` -} - -// String returns the string representation -func (s Malware) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Malware) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Malware) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Malware"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *Malware) SetName(v string) *Malware { - s.Name = &v - return s -} - -// SetPath sets the Path field's value. -func (s *Malware) SetPath(v string) *Malware { - s.Path = &v - return s -} - -// SetState sets the State field's value. -func (s *Malware) SetState(v string) *Malware { - s.State = &v - return s -} - -// SetType sets the Type field's value. -func (s *Malware) SetType(v string) *Malware { - s.Type = &v - return s -} - -// The map filter for querying findings. -type MapFilter struct { - _ struct{} `type:"structure"` - - // Represents the condition to be applied to a key value when querying for findings - // with a map filter. - Comparison *string `type:"string" enum:"MapFilterComparison"` - - // The key of the map filter. - Key *string `type:"string"` - - // The value for the key in the map filter. - Value *string `type:"string"` -} - -// String returns the string representation -func (s MapFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MapFilter) GoString() string { - return s.String() -} - -// SetComparison sets the Comparison field's value. -func (s *MapFilter) SetComparison(v string) *MapFilter { - s.Comparison = &v - return s -} - -// SetKey sets the Key field's value. -func (s *MapFilter) SetKey(v string) *MapFilter { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *MapFilter) SetValue(v string) *MapFilter { - s.Value = &v - return s -} - -// The details for a Security Hub member account. -type Member struct { - _ struct{} `type:"structure"` - - // The AWS account ID of a Security Hub member account. - AccountId *string `type:"string"` - - // The email of a Security Hub member account. - Email *string `type:"string"` - - // Time stamp at which the member account was invited to Security Hub. - InvitedAt *time.Time `type:"timestamp" timestampFormat:"iso8601"` - - // The AWS account ID of the master Security Hub account to this member account. - MasterId *string `type:"string"` - - // The status of the relationship between the member account and its master - // account. - MemberStatus *string `type:"string"` - - // Time stamp at which this member account was updated. - UpdatedAt *time.Time `type:"timestamp" timestampFormat:"iso8601"` -} - -// String returns the string representation -func (s Member) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Member) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *Member) SetAccountId(v string) *Member { - s.AccountId = &v - return s -} - -// SetEmail sets the Email field's value. -func (s *Member) SetEmail(v string) *Member { - s.Email = &v - return s -} - -// SetInvitedAt sets the InvitedAt field's value. -func (s *Member) SetInvitedAt(v time.Time) *Member { - s.InvitedAt = &v - return s -} - -// SetMasterId sets the MasterId field's value. -func (s *Member) SetMasterId(v string) *Member { - s.MasterId = &v - return s -} - -// SetMemberStatus sets the MemberStatus field's value. -func (s *Member) SetMemberStatus(v string) *Member { - s.MemberStatus = &v - return s -} - -// SetUpdatedAt sets the UpdatedAt field's value. -func (s *Member) SetUpdatedAt(v time.Time) *Member { - s.UpdatedAt = &v - return s -} - -// The details of network-related information about a finding. -type Network struct { - _ struct{} `type:"structure"` - - // The destination domain of network-related information about a finding. - DestinationDomain *string `type:"string"` - - // The destination IPv4 address of network-related information about a finding. - DestinationIpV4 *string `type:"string"` - - // The destination IPv6 address of network-related information about a finding. - DestinationIpV6 *string `type:"string"` - - // The destination port of network-related information about a finding. - DestinationPort *int64 `type:"integer"` - - // Indicates the direction of network traffic associated with a finding. - Direction *string `type:"string" enum:"NetworkDirection"` - - // The protocol of network-related information about a finding. - Protocol *string `type:"string"` - - // The source domain of network-related information about a finding. - SourceDomain *string `type:"string"` - - // The source IPv4 address of network-related information about a finding. - SourceIpV4 *string `type:"string"` - - // The source IPv6 address of network-related information about a finding. - SourceIpV6 *string `type:"string"` - - // The source media access control (MAC) address of network-related information - // about a finding. - SourceMac *string `type:"string"` - - // The source port of network-related information about a finding. - SourcePort *int64 `type:"integer"` -} - -// String returns the string representation -func (s Network) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Network) GoString() string { - return s.String() -} - -// SetDestinationDomain sets the DestinationDomain field's value. -func (s *Network) SetDestinationDomain(v string) *Network { - s.DestinationDomain = &v - return s -} - -// SetDestinationIpV4 sets the DestinationIpV4 field's value. -func (s *Network) SetDestinationIpV4(v string) *Network { - s.DestinationIpV4 = &v - return s -} - -// SetDestinationIpV6 sets the DestinationIpV6 field's value. -func (s *Network) SetDestinationIpV6(v string) *Network { - s.DestinationIpV6 = &v - return s -} - -// SetDestinationPort sets the DestinationPort field's value. -func (s *Network) SetDestinationPort(v int64) *Network { - s.DestinationPort = &v - return s -} - -// SetDirection sets the Direction field's value. -func (s *Network) SetDirection(v string) *Network { - s.Direction = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *Network) SetProtocol(v string) *Network { - s.Protocol = &v - return s -} - -// SetSourceDomain sets the SourceDomain field's value. -func (s *Network) SetSourceDomain(v string) *Network { - s.SourceDomain = &v - return s -} - -// SetSourceIpV4 sets the SourceIpV4 field's value. -func (s *Network) SetSourceIpV4(v string) *Network { - s.SourceIpV4 = &v - return s -} - -// SetSourceIpV6 sets the SourceIpV6 field's value. -func (s *Network) SetSourceIpV6(v string) *Network { - s.SourceIpV6 = &v - return s -} - -// SetSourceMac sets the SourceMac field's value. -func (s *Network) SetSourceMac(v string) *Network { - s.SourceMac = &v - return s -} - -// SetSourcePort sets the SourcePort field's value. -func (s *Network) SetSourcePort(v int64) *Network { - s.SourcePort = &v - return s -} - -// A user-defined note added to a finding. -type Note struct { - _ struct{} `type:"structure"` - - // The text of a note. - // - // Text is a required field - Text *string `type:"string" required:"true"` - - // The timestamp of when the note was updated. - // - // UpdatedAt is a required field - UpdatedAt *string `type:"string" required:"true"` - - // The principal that created a note. - // - // UpdatedBy is a required field - UpdatedBy *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Note) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Note) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Note) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Note"} - if s.Text == nil { - invalidParams.Add(request.NewErrParamRequired("Text")) - } - if s.UpdatedAt == nil { - invalidParams.Add(request.NewErrParamRequired("UpdatedAt")) - } - if s.UpdatedBy == nil { - invalidParams.Add(request.NewErrParamRequired("UpdatedBy")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetText sets the Text field's value. -func (s *Note) SetText(v string) *Note { - s.Text = &v - return s -} - -// SetUpdatedAt sets the UpdatedAt field's value. -func (s *Note) SetUpdatedAt(v string) *Note { - s.UpdatedAt = &v - return s -} - -// SetUpdatedBy sets the UpdatedBy field's value. -func (s *Note) SetUpdatedBy(v string) *Note { - s.UpdatedBy = &v - return s -} - -// The updated note. -type NoteUpdate struct { - _ struct{} `type:"structure"` - - // The updated note text. - // - // Text is a required field - Text *string `type:"string" required:"true"` - - // The principal that updated the note. - // - // UpdatedBy is a required field - UpdatedBy *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s NoteUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NoteUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NoteUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NoteUpdate"} - if s.Text == nil { - invalidParams.Add(request.NewErrParamRequired("Text")) - } - if s.UpdatedBy == nil { - invalidParams.Add(request.NewErrParamRequired("UpdatedBy")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetText sets the Text field's value. -func (s *NoteUpdate) SetText(v string) *NoteUpdate { - s.Text = &v - return s -} - -// SetUpdatedBy sets the UpdatedBy field's value. -func (s *NoteUpdate) SetUpdatedBy(v string) *NoteUpdate { - s.UpdatedBy = &v - return s -} - -// A number filter for querying findings. -type NumberFilter struct { - _ struct{} `type:"structure"` - - // Represents the "equal to" condition to be applied to a single field when - // querying for findings. - Eq *float64 `type:"double"` - - // Represents the "greater than equal" condition to be applied to a single field - // when querying for findings. - Gte *float64 `type:"double"` - - // Represents the "less than equal" condition to be applied to a single field - // when querying for findings. - Lte *float64 `type:"double"` -} - -// String returns the string representation -func (s NumberFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NumberFilter) GoString() string { - return s.String() -} - -// SetEq sets the Eq field's value. -func (s *NumberFilter) SetEq(v float64) *NumberFilter { - s.Eq = &v - return s -} - -// SetGte sets the Gte field's value. -func (s *NumberFilter) SetGte(v float64) *NumberFilter { - s.Gte = &v - return s -} - -// SetLte sets the Lte field's value. -func (s *NumberFilter) SetLte(v float64) *NumberFilter { - s.Lte = &v - return s -} - -// The details of process-related information about a finding. -type ProcessDetails struct { - _ struct{} `type:"structure"` - - // The date/time that the process was launched. - LaunchedAt *string `type:"string"` - - // The name of the process. - Name *string `type:"string"` - - // The parent process ID. - ParentPid *int64 `type:"integer"` - - // The path to the process executable. - Path *string `type:"string"` - - // The process ID. - Pid *int64 `type:"integer"` - - // The date/time that the process was terminated. - TerminatedAt *string `type:"string"` -} - -// String returns the string representation -func (s ProcessDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProcessDetails) GoString() string { - return s.String() -} - -// SetLaunchedAt sets the LaunchedAt field's value. -func (s *ProcessDetails) SetLaunchedAt(v string) *ProcessDetails { - s.LaunchedAt = &v - return s -} - -// SetName sets the Name field's value. -func (s *ProcessDetails) SetName(v string) *ProcessDetails { - s.Name = &v - return s -} - -// SetParentPid sets the ParentPid field's value. -func (s *ProcessDetails) SetParentPid(v int64) *ProcessDetails { - s.ParentPid = &v - return s -} - -// SetPath sets the Path field's value. -func (s *ProcessDetails) SetPath(v string) *ProcessDetails { - s.Path = &v - return s -} - -// SetPid sets the Pid field's value. -func (s *ProcessDetails) SetPid(v int64) *ProcessDetails { - s.Pid = &v - return s -} - -// SetTerminatedAt sets the TerminatedAt field's value. -func (s *ProcessDetails) SetTerminatedAt(v string) *ProcessDetails { - s.TerminatedAt = &v - return s -} - -// Provides a recommendation on how to remediate the issue identified within -// a finding. -type Recommendation struct { - _ struct{} `type:"structure"` - - // The recommendation of what to do about the issue described in a finding. - Text *string `type:"string"` - - // A URL to link to general remediation information for the finding type of - // a finding. - Url *string `type:"string"` -} - -// String returns the string representation -func (s Recommendation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Recommendation) GoString() string { - return s.String() -} - -// SetText sets the Text field's value. -func (s *Recommendation) SetText(v string) *Recommendation { - s.Text = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *Recommendation) SetUrl(v string) *Recommendation { - s.Url = &v - return s -} - -// Related finding's details. -type RelatedFinding struct { - _ struct{} `type:"structure"` - - // The solution-generated identifier for a related finding. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The ARN of the solution that generated a related finding. - // - // ProductArn is a required field - ProductArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RelatedFinding) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RelatedFinding) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RelatedFinding) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RelatedFinding"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.ProductArn == nil { - invalidParams.Add(request.NewErrParamRequired("ProductArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *RelatedFinding) SetId(v string) *RelatedFinding { - s.Id = &v - return s -} - -// SetProductArn sets the ProductArn field's value. -func (s *RelatedFinding) SetProductArn(v string) *RelatedFinding { - s.ProductArn = &v - return s -} - -// The remediation options for a finding. -type Remediation struct { - _ struct{} `type:"structure"` - - // Provides a recommendation on how to remediate the issue identified within - // a finding. - Recommendation *Recommendation `type:"structure"` -} - -// String returns the string representation -func (s Remediation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Remediation) GoString() string { - return s.String() -} - -// SetRecommendation sets the Recommendation field's value. -func (s *Remediation) SetRecommendation(v *Recommendation) *Remediation { - s.Recommendation = v - return s -} - -// A resource data type that describes a resource to which the finding refers. -type Resource struct { - _ struct{} `type:"structure"` - - // Provides additional details about the resource. - Details *ResourceDetails `type:"structure"` - - // The canonical identifier for the given resource type. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The canonical AWS partition name to which the region is assigned. - Partition *string `type:"string" enum:"Partition"` - - // The canonical AWS external region name where this resource is located. - Region *string `type:"string"` - - // A list of AWS tags associated with a resource at the time the finding was - // processed. - Tags map[string]*string `type:"map"` - - // Specifies the type of the resource for which details are provided. - // - // Type is a required field - Type *string `type:"string" 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.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetails sets the Details field's value. -func (s *Resource) SetDetails(v *ResourceDetails) *Resource { - s.Details = v - return s -} - -// SetId sets the Id field's value. -func (s *Resource) SetId(v string) *Resource { - s.Id = &v - return s -} - -// SetPartition sets the Partition field's value. -func (s *Resource) SetPartition(v string) *Resource { - s.Partition = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *Resource) SetRegion(v string) *Resource { - s.Region = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Resource) SetTags(v map[string]*string) *Resource { - s.Tags = v - return s -} - -// SetType sets the Type field's value. -func (s *Resource) SetType(v string) *Resource { - s.Type = &v - return s -} - -// Provides additional details about the resource. -type ResourceDetails struct { - _ struct{} `type:"structure"` - - // The details of an AWS EC2 instance. - AwsEc2Instance *AwsEc2InstanceDetails `type:"structure"` - - // AWS IAM access key details related to a finding. - AwsIamAccessKey *AwsIamAccessKeyDetails `type:"structure"` - - // The details of an AWS S3 Bucket. - AwsS3Bucket *AwsS3BucketDetails `type:"structure"` - - // Container details related to a finding. - Container *ContainerDetails `type:"structure"` - - // The details of a resource that does not have a specific sub-field for the - // resource type defined. - Other map[string]*string `type:"map"` -} - -// String returns the string representation -func (s ResourceDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceDetails) GoString() string { - return s.String() -} - -// SetAwsEc2Instance sets the AwsEc2Instance field's value. -func (s *ResourceDetails) SetAwsEc2Instance(v *AwsEc2InstanceDetails) *ResourceDetails { - s.AwsEc2Instance = v - return s -} - -// SetAwsIamAccessKey sets the AwsIamAccessKey field's value. -func (s *ResourceDetails) SetAwsIamAccessKey(v *AwsIamAccessKeyDetails) *ResourceDetails { - s.AwsIamAccessKey = v - return s -} - -// SetAwsS3Bucket sets the AwsS3Bucket field's value. -func (s *ResourceDetails) SetAwsS3Bucket(v *AwsS3BucketDetails) *ResourceDetails { - s.AwsS3Bucket = v - return s -} - -// SetContainer sets the Container field's value. -func (s *ResourceDetails) SetContainer(v *ContainerDetails) *ResourceDetails { - s.Container = v - return s -} - -// SetOther sets the Other field's value. -func (s *ResourceDetails) SetOther(v map[string]*string) *ResourceDetails { - s.Other = v - return s -} - -// The account details that could not be processed. -type Result struct { - _ struct{} `type:"structure"` - - // An ID of the AWS account that could not be processed. - AccountId *string `type:"string"` - - // The reason for why an account could not be processed. - ProcessingResult *string `type:"string"` -} - -// String returns the string representation -func (s Result) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Result) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *Result) SetAccountId(v string) *Result { - s.AccountId = &v - return s -} - -// SetProcessingResult sets the ProcessingResult field's value. -func (s *Result) SetProcessingResult(v string) *Result { - s.ProcessingResult = &v - return s -} - -// A finding's severity. -type Severity struct { - _ struct{} `type:"structure"` - - // The normalized severity of a finding. - // - // Normalized is a required field - Normalized *int64 `type:"integer" required:"true"` - - // The native severity as defined by the security findings provider's solution - // that generated the finding. - Product *float64 `type:"double"` -} - -// String returns the string representation -func (s Severity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Severity) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Severity) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Severity"} - if s.Normalized == nil { - invalidParams.Add(request.NewErrParamRequired("Normalized")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNormalized sets the Normalized field's value. -func (s *Severity) SetNormalized(v int64) *Severity { - s.Normalized = &v - return s -} - -// SetProduct sets the Product field's value. -func (s *Severity) SetProduct(v float64) *Severity { - s.Product = &v - return s -} - -// A collection of attributes used for sorting findings. -type SortCriterion struct { - _ struct{} `type:"structure"` - - // The finding attribute used for sorting findings. - Field *string `type:"string"` - - // The order used for sorting findings. - SortOrder *string `type:"string" enum:"SortOrder"` -} - -// String returns the string representation -func (s SortCriterion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SortCriterion) GoString() string { - return s.String() -} - -// SetField sets the Field field's value. -func (s *SortCriterion) SetField(v string) *SortCriterion { - s.Field = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *SortCriterion) SetSortOrder(v string) *SortCriterion { - s.SortOrder = &v - return s -} - -// A resource that represents your subscription to a supported standard. -type StandardsSubscription struct { - _ struct{} `type:"structure"` - - // The ARN of a standard. - // - // StandardsArn is a required field - StandardsArn *string `type:"string" required:"true"` - - // StandardsInput is a required field - StandardsInput map[string]*string `type:"map" required:"true"` - - // The standard's status. - // - // StandardsStatus is a required field - StandardsStatus *string `type:"string" required:"true" enum:"StandardsStatus"` - - // The ARN of a resource that represents your subscription to a supported standard. - // - // StandardsSubscriptionArn is a required field - StandardsSubscriptionArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StandardsSubscription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StandardsSubscription) GoString() string { - return s.String() -} - -// SetStandardsArn sets the StandardsArn field's value. -func (s *StandardsSubscription) SetStandardsArn(v string) *StandardsSubscription { - s.StandardsArn = &v - return s -} - -// SetStandardsInput sets the StandardsInput field's value. -func (s *StandardsSubscription) SetStandardsInput(v map[string]*string) *StandardsSubscription { - s.StandardsInput = v - return s -} - -// SetStandardsStatus sets the StandardsStatus field's value. -func (s *StandardsSubscription) SetStandardsStatus(v string) *StandardsSubscription { - s.StandardsStatus = &v - return s -} - -// SetStandardsSubscriptionArn sets the StandardsSubscriptionArn field's value. -func (s *StandardsSubscription) SetStandardsSubscriptionArn(v string) *StandardsSubscription { - s.StandardsSubscriptionArn = &v - return s -} - -// The standard that you want to enable. -type StandardsSubscriptionRequest struct { - _ struct{} `type:"structure"` - - // The ARN of the standard that you want to enable. - // - // StandardsArn is a required field - StandardsArn *string `type:"string" required:"true"` - - StandardsInput map[string]*string `type:"map"` -} - -// String returns the string representation -func (s StandardsSubscriptionRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StandardsSubscriptionRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StandardsSubscriptionRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StandardsSubscriptionRequest"} - if s.StandardsArn == nil { - invalidParams.Add(request.NewErrParamRequired("StandardsArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStandardsArn sets the StandardsArn field's value. -func (s *StandardsSubscriptionRequest) SetStandardsArn(v string) *StandardsSubscriptionRequest { - s.StandardsArn = &v - return s -} - -// SetStandardsInput sets the StandardsInput field's value. -func (s *StandardsSubscriptionRequest) SetStandardsInput(v map[string]*string) *StandardsSubscriptionRequest { - s.StandardsInput = v - return s -} - -// A string filter for querying findings. -type StringFilter struct { - _ struct{} `type:"structure"` - - // Represents the condition to be applied to a string value when querying for - // findings. - Comparison *string `type:"string" enum:"StringFilterComparison"` - - // The string filter value. - Value *string `type:"string"` -} - -// String returns the string representation -func (s StringFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StringFilter) GoString() string { - return s.String() -} - -// SetComparison sets the Comparison field's value. -func (s *StringFilter) SetComparison(v string) *StringFilter { - s.Comparison = &v - return s -} - -// SetValue sets the Value field's value. -func (s *StringFilter) SetValue(v string) *StringFilter { - s.Value = &v - return s -} - -// Threat intel details related to a finding. -type ThreatIntelIndicator struct { - _ struct{} `type:"structure"` - - // The category of a threat intel indicator. - Category *string `type:"string" enum:"ThreatIntelIndicatorCategory"` - - // The date/time of the last observation of a threat intel indicator. - LastObservedAt *string `type:"string"` - - // The source of the threat intel. - Source *string `type:"string"` - - // The URL for more details from the source of the threat intel. - SourceUrl *string `type:"string"` - - // The type of a threat intel indicator. - Type *string `type:"string" enum:"ThreatIntelIndicatorType"` - - // The value of a threat intel indicator. - Value *string `type:"string"` -} - -// String returns the string representation -func (s ThreatIntelIndicator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ThreatIntelIndicator) GoString() string { - return s.String() -} - -// SetCategory sets the Category field's value. -func (s *ThreatIntelIndicator) SetCategory(v string) *ThreatIntelIndicator { - s.Category = &v - return s -} - -// SetLastObservedAt sets the LastObservedAt field's value. -func (s *ThreatIntelIndicator) SetLastObservedAt(v string) *ThreatIntelIndicator { - s.LastObservedAt = &v - return s -} - -// SetSource sets the Source field's value. -func (s *ThreatIntelIndicator) SetSource(v string) *ThreatIntelIndicator { - s.Source = &v - return s -} - -// SetSourceUrl sets the SourceUrl field's value. -func (s *ThreatIntelIndicator) SetSourceUrl(v string) *ThreatIntelIndicator { - s.SourceUrl = &v - return s -} - -// SetType sets the Type field's value. -func (s *ThreatIntelIndicator) SetType(v string) *ThreatIntelIndicator { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ThreatIntelIndicator) SetValue(v string) *ThreatIntelIndicator { - s.Value = &v - return s -} - -type UpdateFindingsInput struct { - _ struct{} `type:"structure"` - - // A collection of attributes that specify what findings you want to update. - // - // Filters is a required field - Filters *AwsSecurityFindingFilters `type:"structure" required:"true"` - - // The updated note for the finding. - Note *NoteUpdate `type:"structure"` - - // The updated record state for the finding. - RecordState *string `type:"string" enum:"RecordState"` -} - -// String returns the string representation -func (s UpdateFindingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFindingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFindingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFindingsInput"} - if s.Filters == nil { - invalidParams.Add(request.NewErrParamRequired("Filters")) - } - if s.Note != nil { - if err := s.Note.Validate(); err != nil { - invalidParams.AddNested("Note", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *UpdateFindingsInput) SetFilters(v *AwsSecurityFindingFilters) *UpdateFindingsInput { - s.Filters = v - return s -} - -// SetNote sets the Note field's value. -func (s *UpdateFindingsInput) SetNote(v *NoteUpdate) *UpdateFindingsInput { - s.Note = v - return s -} - -// SetRecordState sets the RecordState field's value. -func (s *UpdateFindingsInput) SetRecordState(v string) *UpdateFindingsInput { - s.RecordState = &v - return s -} - -type UpdateFindingsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateFindingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFindingsOutput) GoString() string { - return s.String() -} - -type UpdateInsightInput struct { - _ struct{} `type:"structure"` - - // The updated filters that define this insight. - Filters *AwsSecurityFindingFilters `type:"structure"` - - // The updated GroupBy attribute that defines this insight. - GroupByAttribute *string `type:"string"` - - // The ARN of the insight that you want to update. - // - // InsightArn is a required field - InsightArn *string `location:"uri" locationName:"InsightArn" type:"string" required:"true"` - - // The updated name for the insight. - Name *string `type:"string"` -} - -// String returns the string representation -func (s UpdateInsightInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateInsightInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateInsightInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateInsightInput"} - if s.InsightArn == nil { - invalidParams.Add(request.NewErrParamRequired("InsightArn")) - } - if s.InsightArn != nil && len(*s.InsightArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InsightArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *UpdateInsightInput) SetFilters(v *AwsSecurityFindingFilters) *UpdateInsightInput { - s.Filters = v - return s -} - -// SetGroupByAttribute sets the GroupByAttribute field's value. -func (s *UpdateInsightInput) SetGroupByAttribute(v string) *UpdateInsightInput { - s.GroupByAttribute = &v - return s -} - -// SetInsightArn sets the InsightArn field's value. -func (s *UpdateInsightInput) SetInsightArn(v string) *UpdateInsightInput { - s.InsightArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateInsightInput) SetName(v string) *UpdateInsightInput { - s.Name = &v - return s -} - -type UpdateInsightOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateInsightOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateInsightOutput) GoString() string { - return s.String() -} - -const ( - // AwsIamAccessKeyStatusActive is a AwsIamAccessKeyStatus enum value - AwsIamAccessKeyStatusActive = "Active" - - // AwsIamAccessKeyStatusInactive is a AwsIamAccessKeyStatus enum value - AwsIamAccessKeyStatusInactive = "Inactive" -) - -const ( - // ComplianceStatusPassed is a ComplianceStatus enum value - ComplianceStatusPassed = "PASSED" - - // ComplianceStatusWarning is a ComplianceStatus enum value - ComplianceStatusWarning = "WARNING" - - // ComplianceStatusFailed is a ComplianceStatus enum value - ComplianceStatusFailed = "FAILED" - - // ComplianceStatusNotAvailable is a ComplianceStatus enum value - ComplianceStatusNotAvailable = "NOT_AVAILABLE" -) - -const ( - // DateRangeUnitDays is a DateRangeUnit enum value - DateRangeUnitDays = "DAYS" -) - -const ( - // MalwareStateObserved is a MalwareState enum value - MalwareStateObserved = "OBSERVED" - - // MalwareStateRemovalFailed is a MalwareState enum value - MalwareStateRemovalFailed = "REMOVAL_FAILED" - - // MalwareStateRemoved is a MalwareState enum value - MalwareStateRemoved = "REMOVED" -) - -const ( - // MalwareTypeAdware is a MalwareType enum value - MalwareTypeAdware = "ADWARE" - - // MalwareTypeBlendedThreat is a MalwareType enum value - MalwareTypeBlendedThreat = "BLENDED_THREAT" - - // MalwareTypeBotnetAgent is a MalwareType enum value - MalwareTypeBotnetAgent = "BOTNET_AGENT" - - // MalwareTypeCoinMiner is a MalwareType enum value - MalwareTypeCoinMiner = "COIN_MINER" - - // MalwareTypeExploitKit is a MalwareType enum value - MalwareTypeExploitKit = "EXPLOIT_KIT" - - // MalwareTypeKeylogger is a MalwareType enum value - MalwareTypeKeylogger = "KEYLOGGER" - - // MalwareTypeMacro is a MalwareType enum value - MalwareTypeMacro = "MACRO" - - // MalwareTypePotentiallyUnwanted is a MalwareType enum value - MalwareTypePotentiallyUnwanted = "POTENTIALLY_UNWANTED" - - // MalwareTypeSpyware is a MalwareType enum value - MalwareTypeSpyware = "SPYWARE" - - // MalwareTypeRansomware is a MalwareType enum value - MalwareTypeRansomware = "RANSOMWARE" - - // MalwareTypeRemoteAccess is a MalwareType enum value - MalwareTypeRemoteAccess = "REMOTE_ACCESS" - - // MalwareTypeRootkit is a MalwareType enum value - MalwareTypeRootkit = "ROOTKIT" - - // MalwareTypeTrojan is a MalwareType enum value - MalwareTypeTrojan = "TROJAN" - - // MalwareTypeVirus is a MalwareType enum value - MalwareTypeVirus = "VIRUS" - - // MalwareTypeWorm is a MalwareType enum value - MalwareTypeWorm = "WORM" -) - -const ( - // MapFilterComparisonContains is a MapFilterComparison enum value - MapFilterComparisonContains = "CONTAINS" -) - -const ( - // NetworkDirectionIn is a NetworkDirection enum value - NetworkDirectionIn = "IN" - - // NetworkDirectionOut is a NetworkDirection enum value - NetworkDirectionOut = "OUT" -) - -const ( - // PartitionAws is a Partition enum value - PartitionAws = "aws" - - // PartitionAwsCn is a Partition enum value - PartitionAwsCn = "aws-cn" - - // PartitionAwsUsGov is a Partition enum value - PartitionAwsUsGov = "aws-us-gov" -) - -const ( - // RecordStateActive is a RecordState enum value - RecordStateActive = "ACTIVE" - - // RecordStateArchived is a RecordState enum value - RecordStateArchived = "ARCHIVED" -) - -const ( - // SortOrderAsc is a SortOrder enum value - SortOrderAsc = "asc" - - // SortOrderDesc is a SortOrder enum value - SortOrderDesc = "desc" -) - -const ( - // StandardsStatusPending is a StandardsStatus enum value - StandardsStatusPending = "PENDING" - - // StandardsStatusReady is a StandardsStatus enum value - StandardsStatusReady = "READY" - - // StandardsStatusFailed is a StandardsStatus enum value - StandardsStatusFailed = "FAILED" - - // StandardsStatusDeleting is a StandardsStatus enum value - StandardsStatusDeleting = "DELETING" -) - -const ( - // StringFilterComparisonEquals is a StringFilterComparison enum value - StringFilterComparisonEquals = "EQUALS" - - // StringFilterComparisonContains is a StringFilterComparison enum value - StringFilterComparisonContains = "CONTAINS" - - // StringFilterComparisonPrefix is a StringFilterComparison enum value - StringFilterComparisonPrefix = "PREFIX" -) - -const ( - // ThreatIntelIndicatorCategoryBackdoor is a ThreatIntelIndicatorCategory enum value - ThreatIntelIndicatorCategoryBackdoor = "BACKDOOR" - - // ThreatIntelIndicatorCategoryCardStealer is a ThreatIntelIndicatorCategory enum value - ThreatIntelIndicatorCategoryCardStealer = "CARD_STEALER" - - // ThreatIntelIndicatorCategoryCommandAndControl is a ThreatIntelIndicatorCategory enum value - ThreatIntelIndicatorCategoryCommandAndControl = "COMMAND_AND_CONTROL" - - // ThreatIntelIndicatorCategoryDropSite is a ThreatIntelIndicatorCategory enum value - ThreatIntelIndicatorCategoryDropSite = "DROP_SITE" - - // ThreatIntelIndicatorCategoryExploitSite is a ThreatIntelIndicatorCategory enum value - ThreatIntelIndicatorCategoryExploitSite = "EXPLOIT_SITE" - - // ThreatIntelIndicatorCategoryKeylogger is a ThreatIntelIndicatorCategory enum value - ThreatIntelIndicatorCategoryKeylogger = "KEYLOGGER" -) - -const ( - // ThreatIntelIndicatorTypeDomain is a ThreatIntelIndicatorType enum value - ThreatIntelIndicatorTypeDomain = "DOMAIN" - - // ThreatIntelIndicatorTypeEmailAddress is a ThreatIntelIndicatorType enum value - ThreatIntelIndicatorTypeEmailAddress = "EMAIL_ADDRESS" - - // ThreatIntelIndicatorTypeHashMd5 is a ThreatIntelIndicatorType enum value - ThreatIntelIndicatorTypeHashMd5 = "HASH_MD5" - - // ThreatIntelIndicatorTypeHashSha1 is a ThreatIntelIndicatorType enum value - ThreatIntelIndicatorTypeHashSha1 = "HASH_SHA1" - - // ThreatIntelIndicatorTypeHashSha256 is a ThreatIntelIndicatorType enum value - ThreatIntelIndicatorTypeHashSha256 = "HASH_SHA256" - - // ThreatIntelIndicatorTypeHashSha512 is a ThreatIntelIndicatorType enum value - ThreatIntelIndicatorTypeHashSha512 = "HASH_SHA512" - - // ThreatIntelIndicatorTypeIpv4Address is a ThreatIntelIndicatorType enum value - ThreatIntelIndicatorTypeIpv4Address = "IPV4_ADDRESS" - - // ThreatIntelIndicatorTypeIpv6Address is a ThreatIntelIndicatorType enum value - ThreatIntelIndicatorTypeIpv6Address = "IPV6_ADDRESS" - - // ThreatIntelIndicatorTypeMutex is a ThreatIntelIndicatorType enum value - ThreatIntelIndicatorTypeMutex = "MUTEX" - - // ThreatIntelIndicatorTypeProcess is a ThreatIntelIndicatorType enum value - ThreatIntelIndicatorTypeProcess = "PROCESS" - - // ThreatIntelIndicatorTypeUrl is a ThreatIntelIndicatorType enum value - ThreatIntelIndicatorTypeUrl = "URL" -) - -const ( - // VerificationStateUnknown is a VerificationState enum value - VerificationStateUnknown = "UNKNOWN" - - // VerificationStateTruePositive is a VerificationState enum value - VerificationStateTruePositive = "TRUE_POSITIVE" - - // VerificationStateFalsePositive is a VerificationState enum value - VerificationStateFalsePositive = "FALSE_POSITIVE" - - // VerificationStateBenignPositive is a VerificationState enum value - VerificationStateBenignPositive = "BENIGN_POSITIVE" -) - -const ( - // WorkflowStateNew is a WorkflowState enum value - WorkflowStateNew = "NEW" - - // WorkflowStateAssigned is a WorkflowState enum value - WorkflowStateAssigned = "ASSIGNED" - - // WorkflowStateInProgress is a WorkflowState enum value - WorkflowStateInProgress = "IN_PROGRESS" - - // WorkflowStateDeferred is a WorkflowState enum value - WorkflowStateDeferred = "DEFERRED" - - // WorkflowStateResolved is a WorkflowState enum value - WorkflowStateResolved = "RESOLVED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/securityhub/doc.go b/vendor/github.com/aws/aws-sdk-go/service/securityhub/doc.go deleted file mode 100644 index 1a1fc7037..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/securityhub/doc.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package securityhub provides the client and types for making API -// requests to AWS SecurityHub. -// -// AWS Security Hub provides you with a comprehensive view of your security -// state within AWS and your compliance with the security industry standards -// and best practices. Security Hub collects security data from across AWS accounts, -// services, and supported third-party partners and helps you analyze your security -// trends and identify the highest priority security issues. For more information, -// see AWS Security Hub User Guide. -// -// See https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26 for more information on this service. -// -// See securityhub package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/securityhub/ -// -// Using the Client -// -// To contact AWS SecurityHub 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 SecurityHub client SecurityHub for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/securityhub/#New -package securityhub diff --git a/vendor/github.com/aws/aws-sdk-go/service/securityhub/errors.go b/vendor/github.com/aws/aws-sdk-go/service/securityhub/errors.go deleted file mode 100644 index 431be4d26..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/securityhub/errors.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package securityhub - -const ( - - // ErrCodeInternalException for service response error code - // "InternalException". - // - // Internal server error. - ErrCodeInternalException = "InternalException" - - // ErrCodeInvalidInputException for service response error code - // "InvalidInputException". - // - // The request was rejected because an invalid or out-of-range value was supplied - // for an input parameter. - ErrCodeInvalidInputException = "InvalidInputException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The request was rejected because it attempted to create resources beyond - // the current AWS account limits. The error code describes the limit exceeded. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The request was rejected because the specified resource cannot be found. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/securityhub/service.go b/vendor/github.com/aws/aws-sdk-go/service/securityhub/service.go deleted file mode 100644 index 14e34aba3..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/securityhub/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package securityhub - -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" -) - -// SecurityHub provides the API operation methods for making requests to -// AWS SecurityHub. See this package's package overview docs -// for details on the service. -// -// SecurityHub methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type SecurityHub 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 = "SecurityHub" // Name of service. - EndpointsID = "securityhub" // ID to lookup a service endpoint with. - ServiceID = "SecurityHub" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the SecurityHub 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 SecurityHub client from just a session. -// svc := securityhub.New(mySession) -// -// // Create a SecurityHub client with additional configuration -// svc := securityhub.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *SecurityHub { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "securityhub" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *SecurityHub { - svc := &SecurityHub{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-10-26", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a SecurityHub operation and runs any -// custom request initialization. -func (c *SecurityHub) 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/serverlessapplicationrepository/api.go b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go deleted file mode 100644 index d8331c988..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go +++ /dev/null @@ -1,3900 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package serverlessapplicationrepository - -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 opCreateApplication = "CreateApplication" - -// CreateApplicationRequest generates a "aws/request.Request" representing the -// client's request for the CreateApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateApplication for more information on using the CreateApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateApplicationRequest method. -// req, resp := client.CreateApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateApplication -func (c *ServerlessApplicationRepository) CreateApplicationRequest(input *CreateApplicationRequest) (req *request.Request, output *CreateApplicationOutput) { - op := &request.Operation{ - Name: opCreateApplication, - HTTPMethod: "POST", - HTTPPath: "/applications", - } - - if input == nil { - input = &CreateApplicationRequest{} - } - - output = &CreateApplicationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateApplication API operation for AWSServerlessApplicationRepository. -// -// Creates an application, optionally including an AWS SAM file to create the -// first application version in the same call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWSServerlessApplicationRepository's -// API operation CreateApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The client is sending more than the allowed number of requests per unit of -// time. -// -// * ErrCodeBadRequestException "BadRequestException" -// One of the parameters in the request is invalid. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The AWS Serverless Application Repository service encountered an internal -// error. -// -// * ErrCodeConflictException "ConflictException" -// The resource already exists. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The client is not authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateApplication -func (c *ServerlessApplicationRepository) CreateApplication(input *CreateApplicationRequest) (*CreateApplicationOutput, error) { - req, out := c.CreateApplicationRequest(input) - return out, req.Send() -} - -// CreateApplicationWithContext is the same as CreateApplication with the addition of -// the ability to pass a context and additional request options. -// -// See CreateApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServerlessApplicationRepository) CreateApplicationWithContext(ctx aws.Context, input *CreateApplicationRequest, opts ...request.Option) (*CreateApplicationOutput, error) { - req, out := c.CreateApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateApplicationVersion = "CreateApplicationVersion" - -// CreateApplicationVersionRequest generates a "aws/request.Request" representing the -// client's request for the CreateApplicationVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateApplicationVersion for more information on using the CreateApplicationVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateApplicationVersionRequest method. -// req, resp := client.CreateApplicationVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateApplicationVersion -func (c *ServerlessApplicationRepository) CreateApplicationVersionRequest(input *CreateApplicationVersionRequest) (req *request.Request, output *CreateApplicationVersionOutput) { - op := &request.Operation{ - Name: opCreateApplicationVersion, - HTTPMethod: "PUT", - HTTPPath: "/applications/{applicationId}/versions/{semanticVersion}", - } - - if input == nil { - input = &CreateApplicationVersionRequest{} - } - - output = &CreateApplicationVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateApplicationVersion API operation for AWSServerlessApplicationRepository. -// -// Creates an application 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 AWSServerlessApplicationRepository's -// API operation CreateApplicationVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The client is sending more than the allowed number of requests per unit of -// time. -// -// * ErrCodeBadRequestException "BadRequestException" -// One of the parameters in the request is invalid. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The AWS Serverless Application Repository service encountered an internal -// error. -// -// * ErrCodeConflictException "ConflictException" -// The resource already exists. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The client is not authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateApplicationVersion -func (c *ServerlessApplicationRepository) CreateApplicationVersion(input *CreateApplicationVersionRequest) (*CreateApplicationVersionOutput, error) { - req, out := c.CreateApplicationVersionRequest(input) - return out, req.Send() -} - -// CreateApplicationVersionWithContext is the same as CreateApplicationVersion with the addition of -// the ability to pass a context and additional request options. -// -// See CreateApplicationVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServerlessApplicationRepository) CreateApplicationVersionWithContext(ctx aws.Context, input *CreateApplicationVersionRequest, opts ...request.Option) (*CreateApplicationVersionOutput, error) { - req, out := c.CreateApplicationVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCloudFormationChangeSet = "CreateCloudFormationChangeSet" - -// CreateCloudFormationChangeSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateCloudFormationChangeSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCloudFormationChangeSet for more information on using the CreateCloudFormationChangeSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCloudFormationChangeSetRequest method. -// req, resp := client.CreateCloudFormationChangeSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateCloudFormationChangeSet -func (c *ServerlessApplicationRepository) CreateCloudFormationChangeSetRequest(input *CreateCloudFormationChangeSetRequest) (req *request.Request, output *CreateCloudFormationChangeSetOutput) { - op := &request.Operation{ - Name: opCreateCloudFormationChangeSet, - HTTPMethod: "POST", - HTTPPath: "/applications/{applicationId}/changesets", - } - - if input == nil { - input = &CreateCloudFormationChangeSetRequest{} - } - - output = &CreateCloudFormationChangeSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCloudFormationChangeSet API operation for AWSServerlessApplicationRepository. -// -// Creates an AWS CloudFormation change set for the given application. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWSServerlessApplicationRepository's -// API operation CreateCloudFormationChangeSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The client is sending more than the allowed number of requests per unit of -// time. -// -// * ErrCodeBadRequestException "BadRequestException" -// One of the parameters in the request is invalid. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The AWS Serverless Application Repository service encountered an internal -// error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The client is not authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateCloudFormationChangeSet -func (c *ServerlessApplicationRepository) CreateCloudFormationChangeSet(input *CreateCloudFormationChangeSetRequest) (*CreateCloudFormationChangeSetOutput, error) { - req, out := c.CreateCloudFormationChangeSetRequest(input) - return out, req.Send() -} - -// CreateCloudFormationChangeSetWithContext is the same as CreateCloudFormationChangeSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCloudFormationChangeSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServerlessApplicationRepository) CreateCloudFormationChangeSetWithContext(ctx aws.Context, input *CreateCloudFormationChangeSetRequest, opts ...request.Option) (*CreateCloudFormationChangeSetOutput, error) { - req, out := c.CreateCloudFormationChangeSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCloudFormationTemplate = "CreateCloudFormationTemplate" - -// CreateCloudFormationTemplateRequest generates a "aws/request.Request" representing the -// client's request for the CreateCloudFormationTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCloudFormationTemplate for more information on using the CreateCloudFormationTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCloudFormationTemplateRequest method. -// req, resp := client.CreateCloudFormationTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateCloudFormationTemplate -func (c *ServerlessApplicationRepository) CreateCloudFormationTemplateRequest(input *CreateCloudFormationTemplateInput) (req *request.Request, output *CreateCloudFormationTemplateOutput) { - op := &request.Operation{ - Name: opCreateCloudFormationTemplate, - HTTPMethod: "POST", - HTTPPath: "/applications/{applicationId}/templates", - } - - if input == nil { - input = &CreateCloudFormationTemplateInput{} - } - - output = &CreateCloudFormationTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCloudFormationTemplate API operation for AWSServerlessApplicationRepository. -// -// Creates an AWS CloudFormation template. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWSServerlessApplicationRepository's -// API operation CreateCloudFormationTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource (for example, an access policy statement) specified in the request -// doesn't exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The client is sending more than the allowed number of requests per unit of -// time. -// -// * ErrCodeBadRequestException "BadRequestException" -// One of the parameters in the request is invalid. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The AWS Serverless Application Repository service encountered an internal -// error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The client is not authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateCloudFormationTemplate -func (c *ServerlessApplicationRepository) CreateCloudFormationTemplate(input *CreateCloudFormationTemplateInput) (*CreateCloudFormationTemplateOutput, error) { - req, out := c.CreateCloudFormationTemplateRequest(input) - return out, req.Send() -} - -// CreateCloudFormationTemplateWithContext is the same as CreateCloudFormationTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCloudFormationTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServerlessApplicationRepository) CreateCloudFormationTemplateWithContext(ctx aws.Context, input *CreateCloudFormationTemplateInput, opts ...request.Option) (*CreateCloudFormationTemplateOutput, error) { - req, out := c.CreateCloudFormationTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteApplication = "DeleteApplication" - -// DeleteApplicationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteApplication for more information on using the DeleteApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteApplicationRequest method. -// req, resp := client.DeleteApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/DeleteApplication -func (c *ServerlessApplicationRepository) DeleteApplicationRequest(input *DeleteApplicationInput) (req *request.Request, output *DeleteApplicationOutput) { - op := &request.Operation{ - Name: opDeleteApplication, - HTTPMethod: "DELETE", - HTTPPath: "/applications/{applicationId}", - } - - if input == nil { - input = &DeleteApplicationInput{} - } - - output = &DeleteApplicationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteApplication API operation for AWSServerlessApplicationRepository. -// -// Deletes the specified application. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWSServerlessApplicationRepository's -// API operation DeleteApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// One of the parameters in the request is invalid. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The AWS Serverless Application Repository service encountered an internal -// error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The client is not authenticated. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource (for example, an access policy statement) specified in the request -// doesn't exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The client is sending more than the allowed number of requests per unit of -// time. -// -// * ErrCodeConflictException "ConflictException" -// The resource already exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/DeleteApplication -func (c *ServerlessApplicationRepository) DeleteApplication(input *DeleteApplicationInput) (*DeleteApplicationOutput, error) { - req, out := c.DeleteApplicationRequest(input) - return out, req.Send() -} - -// DeleteApplicationWithContext is the same as DeleteApplication with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServerlessApplicationRepository) DeleteApplicationWithContext(ctx aws.Context, input *DeleteApplicationInput, opts ...request.Option) (*DeleteApplicationOutput, error) { - req, out := c.DeleteApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApplication = "GetApplication" - -// GetApplicationRequest generates a "aws/request.Request" representing the -// client's request for the GetApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApplication for more information on using the GetApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApplicationRequest method. -// req, resp := client.GetApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetApplication -func (c *ServerlessApplicationRepository) GetApplicationRequest(input *GetApplicationInput) (req *request.Request, output *GetApplicationOutput) { - op := &request.Operation{ - Name: opGetApplication, - HTTPMethod: "GET", - HTTPPath: "/applications/{applicationId}", - } - - if input == nil { - input = &GetApplicationInput{} - } - - output = &GetApplicationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApplication API operation for AWSServerlessApplicationRepository. -// -// Gets the specified application. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWSServerlessApplicationRepository's -// API operation GetApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource (for example, an access policy statement) specified in the request -// doesn't exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The client is sending more than the allowed number of requests per unit of -// time. -// -// * ErrCodeBadRequestException "BadRequestException" -// One of the parameters in the request is invalid. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The AWS Serverless Application Repository service encountered an internal -// error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The client is not authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetApplication -func (c *ServerlessApplicationRepository) GetApplication(input *GetApplicationInput) (*GetApplicationOutput, error) { - req, out := c.GetApplicationRequest(input) - return out, req.Send() -} - -// GetApplicationWithContext is the same as GetApplication with the addition of -// the ability to pass a context and additional request options. -// -// See GetApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServerlessApplicationRepository) GetApplicationWithContext(ctx aws.Context, input *GetApplicationInput, opts ...request.Option) (*GetApplicationOutput, error) { - req, out := c.GetApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetApplicationPolicy = "GetApplicationPolicy" - -// GetApplicationPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetApplicationPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetApplicationPolicy for more information on using the GetApplicationPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetApplicationPolicyRequest method. -// req, resp := client.GetApplicationPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetApplicationPolicy -func (c *ServerlessApplicationRepository) GetApplicationPolicyRequest(input *GetApplicationPolicyInput) (req *request.Request, output *GetApplicationPolicyOutput) { - op := &request.Operation{ - Name: opGetApplicationPolicy, - HTTPMethod: "GET", - HTTPPath: "/applications/{applicationId}/policy", - } - - if input == nil { - input = &GetApplicationPolicyInput{} - } - - output = &GetApplicationPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetApplicationPolicy API operation for AWSServerlessApplicationRepository. -// -// Retrieves the policy for the application. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWSServerlessApplicationRepository's -// API operation GetApplicationPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource (for example, an access policy statement) specified in the request -// doesn't exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The client is sending more than the allowed number of requests per unit of -// time. -// -// * ErrCodeBadRequestException "BadRequestException" -// One of the parameters in the request is invalid. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The AWS Serverless Application Repository service encountered an internal -// error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The client is not authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetApplicationPolicy -func (c *ServerlessApplicationRepository) GetApplicationPolicy(input *GetApplicationPolicyInput) (*GetApplicationPolicyOutput, error) { - req, out := c.GetApplicationPolicyRequest(input) - return out, req.Send() -} - -// GetApplicationPolicyWithContext is the same as GetApplicationPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetApplicationPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServerlessApplicationRepository) GetApplicationPolicyWithContext(ctx aws.Context, input *GetApplicationPolicyInput, opts ...request.Option) (*GetApplicationPolicyOutput, error) { - req, out := c.GetApplicationPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCloudFormationTemplate = "GetCloudFormationTemplate" - -// GetCloudFormationTemplateRequest generates a "aws/request.Request" representing the -// client's request for the GetCloudFormationTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCloudFormationTemplate for more information on using the GetCloudFormationTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCloudFormationTemplateRequest method. -// req, resp := client.GetCloudFormationTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetCloudFormationTemplate -func (c *ServerlessApplicationRepository) GetCloudFormationTemplateRequest(input *GetCloudFormationTemplateInput) (req *request.Request, output *GetCloudFormationTemplateOutput) { - op := &request.Operation{ - Name: opGetCloudFormationTemplate, - HTTPMethod: "GET", - HTTPPath: "/applications/{applicationId}/templates/{templateId}", - } - - if input == nil { - input = &GetCloudFormationTemplateInput{} - } - - output = &GetCloudFormationTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCloudFormationTemplate API operation for AWSServerlessApplicationRepository. -// -// Gets the specified AWS CloudFormation template. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWSServerlessApplicationRepository's -// API operation GetCloudFormationTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource (for example, an access policy statement) specified in the request -// doesn't exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The client is sending more than the allowed number of requests per unit of -// time. -// -// * ErrCodeBadRequestException "BadRequestException" -// One of the parameters in the request is invalid. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The AWS Serverless Application Repository service encountered an internal -// error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The client is not authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetCloudFormationTemplate -func (c *ServerlessApplicationRepository) GetCloudFormationTemplate(input *GetCloudFormationTemplateInput) (*GetCloudFormationTemplateOutput, error) { - req, out := c.GetCloudFormationTemplateRequest(input) - return out, req.Send() -} - -// GetCloudFormationTemplateWithContext is the same as GetCloudFormationTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See GetCloudFormationTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServerlessApplicationRepository) GetCloudFormationTemplateWithContext(ctx aws.Context, input *GetCloudFormationTemplateInput, opts ...request.Option) (*GetCloudFormationTemplateOutput, error) { - req, out := c.GetCloudFormationTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListApplicationDependencies = "ListApplicationDependencies" - -// ListApplicationDependenciesRequest generates a "aws/request.Request" representing the -// client's request for the ListApplicationDependencies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListApplicationDependencies for more information on using the ListApplicationDependencies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListApplicationDependenciesRequest method. -// req, resp := client.ListApplicationDependenciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplicationDependencies -func (c *ServerlessApplicationRepository) ListApplicationDependenciesRequest(input *ListApplicationDependenciesInput) (req *request.Request, output *ListApplicationDependenciesOutput) { - op := &request.Operation{ - Name: opListApplicationDependencies, - HTTPMethod: "GET", - HTTPPath: "/applications/{applicationId}/dependencies", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxItems", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListApplicationDependenciesInput{} - } - - output = &ListApplicationDependenciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListApplicationDependencies API operation for AWSServerlessApplicationRepository. -// -// Retrieves the list of applications nested in the containing application. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWSServerlessApplicationRepository's -// API operation ListApplicationDependencies for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource (for example, an access policy statement) specified in the request -// doesn't exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The client is sending more than the allowed number of requests per unit of -// time. -// -// * ErrCodeBadRequestException "BadRequestException" -// One of the parameters in the request is invalid. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The AWS Serverless Application Repository service encountered an internal -// error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The client is not authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplicationDependencies -func (c *ServerlessApplicationRepository) ListApplicationDependencies(input *ListApplicationDependenciesInput) (*ListApplicationDependenciesOutput, error) { - req, out := c.ListApplicationDependenciesRequest(input) - return out, req.Send() -} - -// ListApplicationDependenciesWithContext is the same as ListApplicationDependencies with the addition of -// the ability to pass a context and additional request options. -// -// See ListApplicationDependencies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServerlessApplicationRepository) ListApplicationDependenciesWithContext(ctx aws.Context, input *ListApplicationDependenciesInput, opts ...request.Option) (*ListApplicationDependenciesOutput, error) { - req, out := c.ListApplicationDependenciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListApplicationDependenciesPages iterates over the pages of a ListApplicationDependencies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListApplicationDependencies 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 ListApplicationDependencies operation. -// pageNum := 0 -// err := client.ListApplicationDependenciesPages(params, -// func(page *ListApplicationDependenciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServerlessApplicationRepository) ListApplicationDependenciesPages(input *ListApplicationDependenciesInput, fn func(*ListApplicationDependenciesOutput, bool) bool) error { - return c.ListApplicationDependenciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListApplicationDependenciesPagesWithContext same as ListApplicationDependenciesPages 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 *ServerlessApplicationRepository) ListApplicationDependenciesPagesWithContext(ctx aws.Context, input *ListApplicationDependenciesInput, fn func(*ListApplicationDependenciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListApplicationDependenciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListApplicationDependenciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListApplicationDependenciesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListApplicationVersions = "ListApplicationVersions" - -// ListApplicationVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListApplicationVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListApplicationVersions for more information on using the ListApplicationVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListApplicationVersionsRequest method. -// req, resp := client.ListApplicationVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplicationVersions -func (c *ServerlessApplicationRepository) ListApplicationVersionsRequest(input *ListApplicationVersionsInput) (req *request.Request, output *ListApplicationVersionsOutput) { - op := &request.Operation{ - Name: opListApplicationVersions, - HTTPMethod: "GET", - HTTPPath: "/applications/{applicationId}/versions", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxItems", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListApplicationVersionsInput{} - } - - output = &ListApplicationVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListApplicationVersions API operation for AWSServerlessApplicationRepository. -// -// Lists versions for the specified application. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWSServerlessApplicationRepository's -// API operation ListApplicationVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource (for example, an access policy statement) specified in the request -// doesn't exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The client is sending more than the allowed number of requests per unit of -// time. -// -// * ErrCodeBadRequestException "BadRequestException" -// One of the parameters in the request is invalid. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The AWS Serverless Application Repository service encountered an internal -// error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The client is not authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplicationVersions -func (c *ServerlessApplicationRepository) ListApplicationVersions(input *ListApplicationVersionsInput) (*ListApplicationVersionsOutput, error) { - req, out := c.ListApplicationVersionsRequest(input) - return out, req.Send() -} - -// ListApplicationVersionsWithContext is the same as ListApplicationVersions with the addition of -// the ability to pass a context and additional request options. -// -// See ListApplicationVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServerlessApplicationRepository) ListApplicationVersionsWithContext(ctx aws.Context, input *ListApplicationVersionsInput, opts ...request.Option) (*ListApplicationVersionsOutput, error) { - req, out := c.ListApplicationVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListApplicationVersionsPages iterates over the pages of a ListApplicationVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListApplicationVersions 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 ListApplicationVersions operation. -// pageNum := 0 -// err := client.ListApplicationVersionsPages(params, -// func(page *ListApplicationVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServerlessApplicationRepository) ListApplicationVersionsPages(input *ListApplicationVersionsInput, fn func(*ListApplicationVersionsOutput, bool) bool) error { - return c.ListApplicationVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListApplicationVersionsPagesWithContext same as ListApplicationVersionsPages 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 *ServerlessApplicationRepository) ListApplicationVersionsPagesWithContext(ctx aws.Context, input *ListApplicationVersionsInput, fn func(*ListApplicationVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListApplicationVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListApplicationVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListApplicationVersionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListApplications = "ListApplications" - -// ListApplicationsRequest generates a "aws/request.Request" representing the -// client's request for the ListApplications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListApplications for more information on using the ListApplications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListApplicationsRequest method. -// req, resp := client.ListApplicationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplications -func (c *ServerlessApplicationRepository) ListApplicationsRequest(input *ListApplicationsInput) (req *request.Request, output *ListApplicationsOutput) { - op := &request.Operation{ - Name: opListApplications, - HTTPMethod: "GET", - HTTPPath: "/applications", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxItems", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListApplicationsInput{} - } - - output = &ListApplicationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListApplications API operation for AWSServerlessApplicationRepository. -// -// Lists applications owned by the requester. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWSServerlessApplicationRepository's -// API operation ListApplications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource (for example, an access policy statement) specified in the request -// doesn't exist. -// -// * ErrCodeBadRequestException "BadRequestException" -// One of the parameters in the request is invalid. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The AWS Serverless Application Repository service encountered an internal -// error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The client is not authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplications -func (c *ServerlessApplicationRepository) ListApplications(input *ListApplicationsInput) (*ListApplicationsOutput, error) { - req, out := c.ListApplicationsRequest(input) - return out, req.Send() -} - -// ListApplicationsWithContext is the same as ListApplications with the addition of -// the ability to pass a context and additional request options. -// -// See ListApplications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServerlessApplicationRepository) ListApplicationsWithContext(ctx aws.Context, input *ListApplicationsInput, opts ...request.Option) (*ListApplicationsOutput, error) { - req, out := c.ListApplicationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListApplicationsPages iterates over the pages of a ListApplications operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListApplications 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 ListApplications operation. -// pageNum := 0 -// err := client.ListApplicationsPages(params, -// func(page *ListApplicationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServerlessApplicationRepository) ListApplicationsPages(input *ListApplicationsInput, fn func(*ListApplicationsOutput, bool) bool) error { - return c.ListApplicationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListApplicationsPagesWithContext same as ListApplicationsPages 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 *ServerlessApplicationRepository) ListApplicationsPagesWithContext(ctx aws.Context, input *ListApplicationsInput, fn func(*ListApplicationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListApplicationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListApplicationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListApplicationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opPutApplicationPolicy = "PutApplicationPolicy" - -// PutApplicationPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutApplicationPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutApplicationPolicy for more information on using the PutApplicationPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutApplicationPolicyRequest method. -// req, resp := client.PutApplicationPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/PutApplicationPolicy -func (c *ServerlessApplicationRepository) PutApplicationPolicyRequest(input *PutApplicationPolicyInput) (req *request.Request, output *PutApplicationPolicyOutput) { - op := &request.Operation{ - Name: opPutApplicationPolicy, - HTTPMethod: "PUT", - HTTPPath: "/applications/{applicationId}/policy", - } - - if input == nil { - input = &PutApplicationPolicyInput{} - } - - output = &PutApplicationPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutApplicationPolicy API operation for AWSServerlessApplicationRepository. -// -// Sets the permission policy for an application. For the list of actions supported -// for this operation, see Application Permissions (https://docs.aws.amazon.com/serverlessrepo/latest/devguide/access-control-resource-based.html#application-permissions) -// . -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWSServerlessApplicationRepository's -// API operation PutApplicationPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNotFoundException "NotFoundException" -// The resource (for example, an access policy statement) specified in the request -// doesn't exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The client is sending more than the allowed number of requests per unit of -// time. -// -// * ErrCodeBadRequestException "BadRequestException" -// One of the parameters in the request is invalid. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The AWS Serverless Application Repository service encountered an internal -// error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The client is not authenticated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/PutApplicationPolicy -func (c *ServerlessApplicationRepository) PutApplicationPolicy(input *PutApplicationPolicyInput) (*PutApplicationPolicyOutput, error) { - req, out := c.PutApplicationPolicyRequest(input) - return out, req.Send() -} - -// PutApplicationPolicyWithContext is the same as PutApplicationPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutApplicationPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServerlessApplicationRepository) PutApplicationPolicyWithContext(ctx aws.Context, input *PutApplicationPolicyInput, opts ...request.Option) (*PutApplicationPolicyOutput, error) { - req, out := c.PutApplicationPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateApplication = "UpdateApplication" - -// UpdateApplicationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateApplication for more information on using the UpdateApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateApplicationRequest method. -// req, resp := client.UpdateApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/UpdateApplication -func (c *ServerlessApplicationRepository) UpdateApplicationRequest(input *UpdateApplicationRequest) (req *request.Request, output *UpdateApplicationOutput) { - op := &request.Operation{ - Name: opUpdateApplication, - HTTPMethod: "PATCH", - HTTPPath: "/applications/{applicationId}", - } - - if input == nil { - input = &UpdateApplicationRequest{} - } - - output = &UpdateApplicationOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateApplication API operation for AWSServerlessApplicationRepository. -// -// Updates the specified application. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWSServerlessApplicationRepository's -// API operation UpdateApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// One of the parameters in the request is invalid. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The AWS Serverless Application Repository service encountered an internal -// error. -// -// * ErrCodeForbiddenException "ForbiddenException" -// The client is not authenticated. -// -// * ErrCodeNotFoundException "NotFoundException" -// The resource (for example, an access policy statement) specified in the request -// doesn't exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The client is sending more than the allowed number of requests per unit of -// time. -// -// * ErrCodeConflictException "ConflictException" -// The resource already exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/UpdateApplication -func (c *ServerlessApplicationRepository) UpdateApplication(input *UpdateApplicationRequest) (*UpdateApplicationOutput, error) { - req, out := c.UpdateApplicationRequest(input) - return out, req.Send() -} - -// UpdateApplicationWithContext is the same as UpdateApplication with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServerlessApplicationRepository) UpdateApplicationWithContext(ctx aws.Context, input *UpdateApplicationRequest, opts ...request.Option) (*UpdateApplicationOutput, error) { - req, out := c.UpdateApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// A nested application summary. -type ApplicationDependencySummary struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the nested application. - // - // ApplicationId is a required field - ApplicationId *string `locationName:"applicationId" type:"string" required:"true"` - - // The semantic version of the nested application. - // - // SemanticVersion is a required field - SemanticVersion *string `locationName:"semanticVersion" type:"string" required:"true"` -} - -// String returns the string representation -func (s ApplicationDependencySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationDependencySummary) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *ApplicationDependencySummary) SetApplicationId(v string) *ApplicationDependencySummary { - s.ApplicationId = &v - return s -} - -// SetSemanticVersion sets the SemanticVersion field's value. -func (s *ApplicationDependencySummary) SetSemanticVersion(v string) *ApplicationDependencySummary { - s.SemanticVersion = &v - return s -} - -// Policy statement applied to the application. -type ApplicationPolicyStatement struct { - _ struct{} `type:"structure"` - - // For the list of actions supported for this operation, see Application Permissions - // (https://docs.aws.amazon.com/serverlessrepo/latest/devguide/access-control-resource-based.html#application-permissions). - // - // Actions is a required field - Actions []*string `locationName:"actions" type:"list" required:"true"` - - // An AWS account ID, or * to make the application public. - // - // Principals is a required field - Principals []*string `locationName:"principals" type:"list" required:"true"` - - // A unique ID for the statement. - StatementId *string `locationName:"statementId" type:"string"` -} - -// String returns the string representation -func (s ApplicationPolicyStatement) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationPolicyStatement) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ApplicationPolicyStatement) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ApplicationPolicyStatement"} - if s.Actions == nil { - invalidParams.Add(request.NewErrParamRequired("Actions")) - } - if s.Principals == nil { - invalidParams.Add(request.NewErrParamRequired("Principals")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActions sets the Actions field's value. -func (s *ApplicationPolicyStatement) SetActions(v []*string) *ApplicationPolicyStatement { - s.Actions = v - return s -} - -// SetPrincipals sets the Principals field's value. -func (s *ApplicationPolicyStatement) SetPrincipals(v []*string) *ApplicationPolicyStatement { - s.Principals = v - return s -} - -// SetStatementId sets the StatementId field's value. -func (s *ApplicationPolicyStatement) SetStatementId(v string) *ApplicationPolicyStatement { - s.StatementId = &v - return s -} - -// Summary of details about the application. -type ApplicationSummary struct { - _ struct{} `type:"structure"` - - // The application Amazon Resource Name (ARN). - // - // ApplicationId is a required field - ApplicationId *string `locationName:"applicationId" type:"string" required:"true"` - - // The name of the author publishing the app. - // - // Minimum length=1. Maximum length=127. - // - // Pattern "^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$"; - // - // Author is a required field - Author *string `locationName:"author" type:"string" required:"true"` - - // The date and time this resource was created. - CreationTime *string `locationName:"creationTime" type:"string"` - - // The description of the application. - // - // Minimum length=1. Maximum length=256 - // - // Description is a required field - Description *string `locationName:"description" type:"string" required:"true"` - - // A URL with more information about the application, for example the location - // of your GitHub repository for the application. - HomePageUrl *string `locationName:"homePageUrl" type:"string"` - - // Labels to improve discovery of apps in search results. - // - // Minimum length=1. Maximum length=127. Maximum number of labels: 10 - // - // Pattern: "^[a-zA-Z0-9+\\-_:\\/@]+$"; - Labels []*string `locationName:"labels" type:"list"` - - // The name of the application. - // - // Minimum length=1. Maximum length=140 - // - // Pattern: "[a-zA-Z0-9\\-]+"; - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // A valid identifier from https://spdx.org/licenses/ (https://spdx.org/licenses/). - SpdxLicenseId *string `locationName:"spdxLicenseId" type:"string"` -} - -// String returns the string representation -func (s ApplicationSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ApplicationSummary) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *ApplicationSummary) SetApplicationId(v string) *ApplicationSummary { - s.ApplicationId = &v - return s -} - -// SetAuthor sets the Author field's value. -func (s *ApplicationSummary) SetAuthor(v string) *ApplicationSummary { - s.Author = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ApplicationSummary) SetCreationTime(v string) *ApplicationSummary { - s.CreationTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ApplicationSummary) SetDescription(v string) *ApplicationSummary { - s.Description = &v - return s -} - -// SetHomePageUrl sets the HomePageUrl field's value. -func (s *ApplicationSummary) SetHomePageUrl(v string) *ApplicationSummary { - s.HomePageUrl = &v - return s -} - -// SetLabels sets the Labels field's value. -func (s *ApplicationSummary) SetLabels(v []*string) *ApplicationSummary { - s.Labels = v - return s -} - -// SetName sets the Name field's value. -func (s *ApplicationSummary) SetName(v string) *ApplicationSummary { - s.Name = &v - return s -} - -// SetSpdxLicenseId sets the SpdxLicenseId field's value. -func (s *ApplicationSummary) SetSpdxLicenseId(v string) *ApplicationSummary { - s.SpdxLicenseId = &v - return s -} - -type CreateApplicationOutput struct { - _ struct{} `type:"structure"` - - ApplicationId *string `locationName:"applicationId" type:"string"` - - Author *string `locationName:"author" type:"string"` - - CreationTime *string `locationName:"creationTime" type:"string"` - - Description *string `locationName:"description" type:"string"` - - HomePageUrl *string `locationName:"homePageUrl" type:"string"` - - Labels []*string `locationName:"labels" type:"list"` - - LicenseUrl *string `locationName:"licenseUrl" type:"string"` - - Name *string `locationName:"name" type:"string"` - - ReadmeUrl *string `locationName:"readmeUrl" type:"string"` - - SpdxLicenseId *string `locationName:"spdxLicenseId" type:"string"` - - // Application version details. - Version *Version `locationName:"version" type:"structure"` -} - -// String returns the string representation -func (s CreateApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApplicationOutput) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *CreateApplicationOutput) SetApplicationId(v string) *CreateApplicationOutput { - s.ApplicationId = &v - return s -} - -// SetAuthor sets the Author field's value. -func (s *CreateApplicationOutput) SetAuthor(v string) *CreateApplicationOutput { - s.Author = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *CreateApplicationOutput) SetCreationTime(v string) *CreateApplicationOutput { - s.CreationTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateApplicationOutput) SetDescription(v string) *CreateApplicationOutput { - s.Description = &v - return s -} - -// SetHomePageUrl sets the HomePageUrl field's value. -func (s *CreateApplicationOutput) SetHomePageUrl(v string) *CreateApplicationOutput { - s.HomePageUrl = &v - return s -} - -// SetLabels sets the Labels field's value. -func (s *CreateApplicationOutput) SetLabels(v []*string) *CreateApplicationOutput { - s.Labels = v - return s -} - -// SetLicenseUrl sets the LicenseUrl field's value. -func (s *CreateApplicationOutput) SetLicenseUrl(v string) *CreateApplicationOutput { - s.LicenseUrl = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateApplicationOutput) SetName(v string) *CreateApplicationOutput { - s.Name = &v - return s -} - -// SetReadmeUrl sets the ReadmeUrl field's value. -func (s *CreateApplicationOutput) SetReadmeUrl(v string) *CreateApplicationOutput { - s.ReadmeUrl = &v - return s -} - -// SetSpdxLicenseId sets the SpdxLicenseId field's value. -func (s *CreateApplicationOutput) SetSpdxLicenseId(v string) *CreateApplicationOutput { - s.SpdxLicenseId = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *CreateApplicationOutput) SetVersion(v *Version) *CreateApplicationOutput { - s.Version = v - return s -} - -type CreateApplicationRequest struct { - _ struct{} `type:"structure"` - - // Author is a required field - Author *string `locationName:"author" type:"string" required:"true"` - - // Description is a required field - Description *string `locationName:"description" type:"string" required:"true"` - - HomePageUrl *string `locationName:"homePageUrl" type:"string"` - - Labels []*string `locationName:"labels" type:"list"` - - LicenseBody *string `locationName:"licenseBody" type:"string"` - - LicenseUrl *string `locationName:"licenseUrl" type:"string"` - - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - ReadmeBody *string `locationName:"readmeBody" type:"string"` - - ReadmeUrl *string `locationName:"readmeUrl" type:"string"` - - SemanticVersion *string `locationName:"semanticVersion" type:"string"` - - SourceCodeUrl *string `locationName:"sourceCodeUrl" type:"string"` - - SpdxLicenseId *string `locationName:"spdxLicenseId" type:"string"` - - TemplateBody *string `locationName:"templateBody" type:"string"` - - TemplateUrl *string `locationName:"templateUrl" type:"string"` -} - -// String returns the string representation -func (s CreateApplicationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApplicationRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateApplicationRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateApplicationRequest"} - if s.Author == nil { - invalidParams.Add(request.NewErrParamRequired("Author")) - } - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthor sets the Author field's value. -func (s *CreateApplicationRequest) SetAuthor(v string) *CreateApplicationRequest { - s.Author = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateApplicationRequest) SetDescription(v string) *CreateApplicationRequest { - s.Description = &v - return s -} - -// SetHomePageUrl sets the HomePageUrl field's value. -func (s *CreateApplicationRequest) SetHomePageUrl(v string) *CreateApplicationRequest { - s.HomePageUrl = &v - return s -} - -// SetLabels sets the Labels field's value. -func (s *CreateApplicationRequest) SetLabels(v []*string) *CreateApplicationRequest { - s.Labels = v - return s -} - -// SetLicenseBody sets the LicenseBody field's value. -func (s *CreateApplicationRequest) SetLicenseBody(v string) *CreateApplicationRequest { - s.LicenseBody = &v - return s -} - -// SetLicenseUrl sets the LicenseUrl field's value. -func (s *CreateApplicationRequest) SetLicenseUrl(v string) *CreateApplicationRequest { - s.LicenseUrl = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateApplicationRequest) SetName(v string) *CreateApplicationRequest { - s.Name = &v - return s -} - -// SetReadmeBody sets the ReadmeBody field's value. -func (s *CreateApplicationRequest) SetReadmeBody(v string) *CreateApplicationRequest { - s.ReadmeBody = &v - return s -} - -// SetReadmeUrl sets the ReadmeUrl field's value. -func (s *CreateApplicationRequest) SetReadmeUrl(v string) *CreateApplicationRequest { - s.ReadmeUrl = &v - return s -} - -// SetSemanticVersion sets the SemanticVersion field's value. -func (s *CreateApplicationRequest) SetSemanticVersion(v string) *CreateApplicationRequest { - s.SemanticVersion = &v - return s -} - -// SetSourceCodeUrl sets the SourceCodeUrl field's value. -func (s *CreateApplicationRequest) SetSourceCodeUrl(v string) *CreateApplicationRequest { - s.SourceCodeUrl = &v - return s -} - -// SetSpdxLicenseId sets the SpdxLicenseId field's value. -func (s *CreateApplicationRequest) SetSpdxLicenseId(v string) *CreateApplicationRequest { - s.SpdxLicenseId = &v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *CreateApplicationRequest) SetTemplateBody(v string) *CreateApplicationRequest { - s.TemplateBody = &v - return s -} - -// SetTemplateUrl sets the TemplateUrl field's value. -func (s *CreateApplicationRequest) SetTemplateUrl(v string) *CreateApplicationRequest { - s.TemplateUrl = &v - return s -} - -type CreateApplicationVersionOutput struct { - _ struct{} `type:"structure"` - - ApplicationId *string `locationName:"applicationId" type:"string"` - - CreationTime *string `locationName:"creationTime" type:"string"` - - ParameterDefinitions []*ParameterDefinition `locationName:"parameterDefinitions" type:"list"` - - RequiredCapabilities []*string `locationName:"requiredCapabilities" type:"list"` - - ResourcesSupported *bool `locationName:"resourcesSupported" type:"boolean"` - - SemanticVersion *string `locationName:"semanticVersion" type:"string"` - - SourceCodeUrl *string `locationName:"sourceCodeUrl" type:"string"` - - TemplateUrl *string `locationName:"templateUrl" type:"string"` -} - -// String returns the string representation -func (s CreateApplicationVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApplicationVersionOutput) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *CreateApplicationVersionOutput) SetApplicationId(v string) *CreateApplicationVersionOutput { - s.ApplicationId = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *CreateApplicationVersionOutput) SetCreationTime(v string) *CreateApplicationVersionOutput { - s.CreationTime = &v - return s -} - -// SetParameterDefinitions sets the ParameterDefinitions field's value. -func (s *CreateApplicationVersionOutput) SetParameterDefinitions(v []*ParameterDefinition) *CreateApplicationVersionOutput { - s.ParameterDefinitions = v - return s -} - -// SetRequiredCapabilities sets the RequiredCapabilities field's value. -func (s *CreateApplicationVersionOutput) SetRequiredCapabilities(v []*string) *CreateApplicationVersionOutput { - s.RequiredCapabilities = v - return s -} - -// SetResourcesSupported sets the ResourcesSupported field's value. -func (s *CreateApplicationVersionOutput) SetResourcesSupported(v bool) *CreateApplicationVersionOutput { - s.ResourcesSupported = &v - return s -} - -// SetSemanticVersion sets the SemanticVersion field's value. -func (s *CreateApplicationVersionOutput) SetSemanticVersion(v string) *CreateApplicationVersionOutput { - s.SemanticVersion = &v - return s -} - -// SetSourceCodeUrl sets the SourceCodeUrl field's value. -func (s *CreateApplicationVersionOutput) SetSourceCodeUrl(v string) *CreateApplicationVersionOutput { - s.SourceCodeUrl = &v - return s -} - -// SetTemplateUrl sets the TemplateUrl field's value. -func (s *CreateApplicationVersionOutput) SetTemplateUrl(v string) *CreateApplicationVersionOutput { - s.TemplateUrl = &v - return s -} - -type CreateApplicationVersionRequest struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` - - // SemanticVersion is a required field - SemanticVersion *string `location:"uri" locationName:"semanticVersion" type:"string" required:"true"` - - SourceCodeUrl *string `locationName:"sourceCodeUrl" type:"string"` - - TemplateBody *string `locationName:"templateBody" type:"string"` - - TemplateUrl *string `locationName:"templateUrl" type:"string"` -} - -// String returns the string representation -func (s CreateApplicationVersionRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateApplicationVersionRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateApplicationVersionRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateApplicationVersionRequest"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.SemanticVersion == nil { - invalidParams.Add(request.NewErrParamRequired("SemanticVersion")) - } - if s.SemanticVersion != nil && len(*s.SemanticVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SemanticVersion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *CreateApplicationVersionRequest) SetApplicationId(v string) *CreateApplicationVersionRequest { - s.ApplicationId = &v - return s -} - -// SetSemanticVersion sets the SemanticVersion field's value. -func (s *CreateApplicationVersionRequest) SetSemanticVersion(v string) *CreateApplicationVersionRequest { - s.SemanticVersion = &v - return s -} - -// SetSourceCodeUrl sets the SourceCodeUrl field's value. -func (s *CreateApplicationVersionRequest) SetSourceCodeUrl(v string) *CreateApplicationVersionRequest { - s.SourceCodeUrl = &v - return s -} - -// SetTemplateBody sets the TemplateBody field's value. -func (s *CreateApplicationVersionRequest) SetTemplateBody(v string) *CreateApplicationVersionRequest { - s.TemplateBody = &v - return s -} - -// SetTemplateUrl sets the TemplateUrl field's value. -func (s *CreateApplicationVersionRequest) SetTemplateUrl(v string) *CreateApplicationVersionRequest { - s.TemplateUrl = &v - return s -} - -type CreateCloudFormationChangeSetOutput struct { - _ struct{} `type:"structure"` - - ApplicationId *string `locationName:"applicationId" type:"string"` - - ChangeSetId *string `locationName:"changeSetId" type:"string"` - - SemanticVersion *string `locationName:"semanticVersion" type:"string"` - - StackId *string `locationName:"stackId" type:"string"` -} - -// String returns the string representation -func (s CreateCloudFormationChangeSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCloudFormationChangeSetOutput) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *CreateCloudFormationChangeSetOutput) SetApplicationId(v string) *CreateCloudFormationChangeSetOutput { - s.ApplicationId = &v - return s -} - -// SetChangeSetId sets the ChangeSetId field's value. -func (s *CreateCloudFormationChangeSetOutput) SetChangeSetId(v string) *CreateCloudFormationChangeSetOutput { - s.ChangeSetId = &v - return s -} - -// SetSemanticVersion sets the SemanticVersion field's value. -func (s *CreateCloudFormationChangeSetOutput) SetSemanticVersion(v string) *CreateCloudFormationChangeSetOutput { - s.SemanticVersion = &v - return s -} - -// SetStackId sets the StackId field's value. -func (s *CreateCloudFormationChangeSetOutput) SetStackId(v string) *CreateCloudFormationChangeSetOutput { - s.StackId = &v - return s -} - -type CreateCloudFormationChangeSetRequest struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` - - Capabilities []*string `locationName:"capabilities" type:"list"` - - ChangeSetName *string `locationName:"changeSetName" type:"string"` - - ClientToken *string `locationName:"clientToken" type:"string"` - - Description *string `locationName:"description" type:"string"` - - NotificationArns []*string `locationName:"notificationArns" type:"list"` - - ParameterOverrides []*ParameterValue `locationName:"parameterOverrides" type:"list"` - - ResourceTypes []*string `locationName:"resourceTypes" type:"list"` - - // This property corresponds to the AWS CloudFormation RollbackConfiguration - // (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackConfiguration) - // Data Type. - RollbackConfiguration *RollbackConfiguration `locationName:"rollbackConfiguration" type:"structure"` - - SemanticVersion *string `locationName:"semanticVersion" type:"string"` - - // StackName is a required field - StackName *string `locationName:"stackName" type:"string" required:"true"` - - Tags []*Tag `locationName:"tags" type:"list"` - - TemplateId *string `locationName:"templateId" type:"string"` -} - -// String returns the string representation -func (s CreateCloudFormationChangeSetRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCloudFormationChangeSetRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCloudFormationChangeSetRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCloudFormationChangeSetRequest"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.StackName == nil { - invalidParams.Add(request.NewErrParamRequired("StackName")) - } - if s.ParameterOverrides != nil { - for i, v := range s.ParameterOverrides { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterOverrides", i), err.(request.ErrInvalidParams)) - } - } - } - if s.RollbackConfiguration != nil { - if err := s.RollbackConfiguration.Validate(); err != nil { - invalidParams.AddNested("RollbackConfiguration", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *CreateCloudFormationChangeSetRequest) SetApplicationId(v string) *CreateCloudFormationChangeSetRequest { - s.ApplicationId = &v - return s -} - -// SetCapabilities sets the Capabilities field's value. -func (s *CreateCloudFormationChangeSetRequest) SetCapabilities(v []*string) *CreateCloudFormationChangeSetRequest { - s.Capabilities = v - return s -} - -// SetChangeSetName sets the ChangeSetName field's value. -func (s *CreateCloudFormationChangeSetRequest) SetChangeSetName(v string) *CreateCloudFormationChangeSetRequest { - s.ChangeSetName = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateCloudFormationChangeSetRequest) SetClientToken(v string) *CreateCloudFormationChangeSetRequest { - s.ClientToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateCloudFormationChangeSetRequest) SetDescription(v string) *CreateCloudFormationChangeSetRequest { - s.Description = &v - return s -} - -// SetNotificationArns sets the NotificationArns field's value. -func (s *CreateCloudFormationChangeSetRequest) SetNotificationArns(v []*string) *CreateCloudFormationChangeSetRequest { - s.NotificationArns = v - return s -} - -// SetParameterOverrides sets the ParameterOverrides field's value. -func (s *CreateCloudFormationChangeSetRequest) SetParameterOverrides(v []*ParameterValue) *CreateCloudFormationChangeSetRequest { - s.ParameterOverrides = v - return s -} - -// SetResourceTypes sets the ResourceTypes field's value. -func (s *CreateCloudFormationChangeSetRequest) SetResourceTypes(v []*string) *CreateCloudFormationChangeSetRequest { - s.ResourceTypes = v - return s -} - -// SetRollbackConfiguration sets the RollbackConfiguration field's value. -func (s *CreateCloudFormationChangeSetRequest) SetRollbackConfiguration(v *RollbackConfiguration) *CreateCloudFormationChangeSetRequest { - s.RollbackConfiguration = v - return s -} - -// SetSemanticVersion sets the SemanticVersion field's value. -func (s *CreateCloudFormationChangeSetRequest) SetSemanticVersion(v string) *CreateCloudFormationChangeSetRequest { - s.SemanticVersion = &v - return s -} - -// SetStackName sets the StackName field's value. -func (s *CreateCloudFormationChangeSetRequest) SetStackName(v string) *CreateCloudFormationChangeSetRequest { - s.StackName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateCloudFormationChangeSetRequest) SetTags(v []*Tag) *CreateCloudFormationChangeSetRequest { - s.Tags = v - return s -} - -// SetTemplateId sets the TemplateId field's value. -func (s *CreateCloudFormationChangeSetRequest) SetTemplateId(v string) *CreateCloudFormationChangeSetRequest { - s.TemplateId = &v - return s -} - -type CreateCloudFormationTemplateInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` - - SemanticVersion *string `locationName:"semanticVersion" type:"string"` -} - -// String returns the string representation -func (s CreateCloudFormationTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCloudFormationTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCloudFormationTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCloudFormationTemplateInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *CreateCloudFormationTemplateInput) SetApplicationId(v string) *CreateCloudFormationTemplateInput { - s.ApplicationId = &v - return s -} - -// SetSemanticVersion sets the SemanticVersion field's value. -func (s *CreateCloudFormationTemplateInput) SetSemanticVersion(v string) *CreateCloudFormationTemplateInput { - s.SemanticVersion = &v - return s -} - -type CreateCloudFormationTemplateOutput struct { - _ struct{} `type:"structure"` - - ApplicationId *string `locationName:"applicationId" type:"string"` - - CreationTime *string `locationName:"creationTime" type:"string"` - - ExpirationTime *string `locationName:"expirationTime" type:"string"` - - SemanticVersion *string `locationName:"semanticVersion" type:"string"` - - Status *string `locationName:"status" type:"string" enum:"Status"` - - TemplateId *string `locationName:"templateId" type:"string"` - - TemplateUrl *string `locationName:"templateUrl" type:"string"` -} - -// String returns the string representation -func (s CreateCloudFormationTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCloudFormationTemplateOutput) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *CreateCloudFormationTemplateOutput) SetApplicationId(v string) *CreateCloudFormationTemplateOutput { - s.ApplicationId = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *CreateCloudFormationTemplateOutput) SetCreationTime(v string) *CreateCloudFormationTemplateOutput { - s.CreationTime = &v - return s -} - -// SetExpirationTime sets the ExpirationTime field's value. -func (s *CreateCloudFormationTemplateOutput) SetExpirationTime(v string) *CreateCloudFormationTemplateOutput { - s.ExpirationTime = &v - return s -} - -// SetSemanticVersion sets the SemanticVersion field's value. -func (s *CreateCloudFormationTemplateOutput) SetSemanticVersion(v string) *CreateCloudFormationTemplateOutput { - s.SemanticVersion = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CreateCloudFormationTemplateOutput) SetStatus(v string) *CreateCloudFormationTemplateOutput { - s.Status = &v - return s -} - -// SetTemplateId sets the TemplateId field's value. -func (s *CreateCloudFormationTemplateOutput) SetTemplateId(v string) *CreateCloudFormationTemplateOutput { - s.TemplateId = &v - return s -} - -// SetTemplateUrl sets the TemplateUrl field's value. -func (s *CreateCloudFormationTemplateOutput) SetTemplateUrl(v string) *CreateCloudFormationTemplateOutput { - s.TemplateUrl = &v - return s -} - -type DeleteApplicationInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *DeleteApplicationInput) SetApplicationId(v string) *DeleteApplicationInput { - s.ApplicationId = &v - return s -} - -type DeleteApplicationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteApplicationOutput) GoString() string { - return s.String() -} - -type GetApplicationInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` - - SemanticVersion *string `location:"querystring" locationName:"semanticVersion" type:"string"` -} - -// String returns the string representation -func (s GetApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetApplicationInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetApplicationInput) SetApplicationId(v string) *GetApplicationInput { - s.ApplicationId = &v - return s -} - -// SetSemanticVersion sets the SemanticVersion field's value. -func (s *GetApplicationInput) SetSemanticVersion(v string) *GetApplicationInput { - s.SemanticVersion = &v - return s -} - -type GetApplicationOutput struct { - _ struct{} `type:"structure"` - - ApplicationId *string `locationName:"applicationId" type:"string"` - - Author *string `locationName:"author" type:"string"` - - CreationTime *string `locationName:"creationTime" type:"string"` - - Description *string `locationName:"description" type:"string"` - - HomePageUrl *string `locationName:"homePageUrl" type:"string"` - - Labels []*string `locationName:"labels" type:"list"` - - LicenseUrl *string `locationName:"licenseUrl" type:"string"` - - Name *string `locationName:"name" type:"string"` - - ReadmeUrl *string `locationName:"readmeUrl" type:"string"` - - SpdxLicenseId *string `locationName:"spdxLicenseId" type:"string"` - - // Application version details. - Version *Version `locationName:"version" type:"structure"` -} - -// String returns the string representation -func (s GetApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApplicationOutput) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetApplicationOutput) SetApplicationId(v string) *GetApplicationOutput { - s.ApplicationId = &v - return s -} - -// SetAuthor sets the Author field's value. -func (s *GetApplicationOutput) SetAuthor(v string) *GetApplicationOutput { - s.Author = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *GetApplicationOutput) SetCreationTime(v string) *GetApplicationOutput { - s.CreationTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetApplicationOutput) SetDescription(v string) *GetApplicationOutput { - s.Description = &v - return s -} - -// SetHomePageUrl sets the HomePageUrl field's value. -func (s *GetApplicationOutput) SetHomePageUrl(v string) *GetApplicationOutput { - s.HomePageUrl = &v - return s -} - -// SetLabels sets the Labels field's value. -func (s *GetApplicationOutput) SetLabels(v []*string) *GetApplicationOutput { - s.Labels = v - return s -} - -// SetLicenseUrl sets the LicenseUrl field's value. -func (s *GetApplicationOutput) SetLicenseUrl(v string) *GetApplicationOutput { - s.LicenseUrl = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetApplicationOutput) SetName(v string) *GetApplicationOutput { - s.Name = &v - return s -} - -// SetReadmeUrl sets the ReadmeUrl field's value. -func (s *GetApplicationOutput) SetReadmeUrl(v string) *GetApplicationOutput { - s.ReadmeUrl = &v - return s -} - -// SetSpdxLicenseId sets the SpdxLicenseId field's value. -func (s *GetApplicationOutput) SetSpdxLicenseId(v string) *GetApplicationOutput { - s.SpdxLicenseId = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *GetApplicationOutput) SetVersion(v *Version) *GetApplicationOutput { - s.Version = v - return s -} - -type GetApplicationPolicyInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetApplicationPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApplicationPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetApplicationPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetApplicationPolicyInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetApplicationPolicyInput) SetApplicationId(v string) *GetApplicationPolicyInput { - s.ApplicationId = &v - return s -} - -type GetApplicationPolicyOutput struct { - _ struct{} `type:"structure"` - - Statements []*ApplicationPolicyStatement `locationName:"statements" type:"list"` -} - -// String returns the string representation -func (s GetApplicationPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetApplicationPolicyOutput) GoString() string { - return s.String() -} - -// SetStatements sets the Statements field's value. -func (s *GetApplicationPolicyOutput) SetStatements(v []*ApplicationPolicyStatement) *GetApplicationPolicyOutput { - s.Statements = v - return s -} - -type GetCloudFormationTemplateInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` - - // TemplateId is a required field - TemplateId *string `location:"uri" locationName:"templateId" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCloudFormationTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCloudFormationTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCloudFormationTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCloudFormationTemplateInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.TemplateId == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateId")) - } - if s.TemplateId != nil && len(*s.TemplateId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TemplateId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetCloudFormationTemplateInput) SetApplicationId(v string) *GetCloudFormationTemplateInput { - s.ApplicationId = &v - return s -} - -// SetTemplateId sets the TemplateId field's value. -func (s *GetCloudFormationTemplateInput) SetTemplateId(v string) *GetCloudFormationTemplateInput { - s.TemplateId = &v - return s -} - -type GetCloudFormationTemplateOutput struct { - _ struct{} `type:"structure"` - - ApplicationId *string `locationName:"applicationId" type:"string"` - - CreationTime *string `locationName:"creationTime" type:"string"` - - ExpirationTime *string `locationName:"expirationTime" type:"string"` - - SemanticVersion *string `locationName:"semanticVersion" type:"string"` - - Status *string `locationName:"status" type:"string" enum:"Status"` - - TemplateId *string `locationName:"templateId" type:"string"` - - TemplateUrl *string `locationName:"templateUrl" type:"string"` -} - -// String returns the string representation -func (s GetCloudFormationTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCloudFormationTemplateOutput) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *GetCloudFormationTemplateOutput) SetApplicationId(v string) *GetCloudFormationTemplateOutput { - s.ApplicationId = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *GetCloudFormationTemplateOutput) SetCreationTime(v string) *GetCloudFormationTemplateOutput { - s.CreationTime = &v - return s -} - -// SetExpirationTime sets the ExpirationTime field's value. -func (s *GetCloudFormationTemplateOutput) SetExpirationTime(v string) *GetCloudFormationTemplateOutput { - s.ExpirationTime = &v - return s -} - -// SetSemanticVersion sets the SemanticVersion field's value. -func (s *GetCloudFormationTemplateOutput) SetSemanticVersion(v string) *GetCloudFormationTemplateOutput { - s.SemanticVersion = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetCloudFormationTemplateOutput) SetStatus(v string) *GetCloudFormationTemplateOutput { - s.Status = &v - return s -} - -// SetTemplateId sets the TemplateId field's value. -func (s *GetCloudFormationTemplateOutput) SetTemplateId(v string) *GetCloudFormationTemplateOutput { - s.TemplateId = &v - return s -} - -// SetTemplateUrl sets the TemplateUrl field's value. -func (s *GetCloudFormationTemplateOutput) SetTemplateUrl(v string) *GetCloudFormationTemplateOutput { - s.TemplateUrl = &v - return s -} - -type ListApplicationDependenciesInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` - - MaxItems *int64 `location:"querystring" locationName:"maxItems" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - - SemanticVersion *string `location:"querystring" locationName:"semanticVersion" type:"string"` -} - -// String returns the string representation -func (s ListApplicationDependenciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListApplicationDependenciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListApplicationDependenciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListApplicationDependenciesInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *ListApplicationDependenciesInput) SetApplicationId(v string) *ListApplicationDependenciesInput { - s.ApplicationId = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListApplicationDependenciesInput) SetMaxItems(v int64) *ListApplicationDependenciesInput { - s.MaxItems = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListApplicationDependenciesInput) SetNextToken(v string) *ListApplicationDependenciesInput { - s.NextToken = &v - return s -} - -// SetSemanticVersion sets the SemanticVersion field's value. -func (s *ListApplicationDependenciesInput) SetSemanticVersion(v string) *ListApplicationDependenciesInput { - s.SemanticVersion = &v - return s -} - -type ListApplicationDependenciesOutput struct { - _ struct{} `type:"structure"` - - Dependencies []*ApplicationDependencySummary `locationName:"dependencies" type:"list"` - - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListApplicationDependenciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListApplicationDependenciesOutput) GoString() string { - return s.String() -} - -// SetDependencies sets the Dependencies field's value. -func (s *ListApplicationDependenciesOutput) SetDependencies(v []*ApplicationDependencySummary) *ListApplicationDependenciesOutput { - s.Dependencies = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListApplicationDependenciesOutput) SetNextToken(v string) *ListApplicationDependenciesOutput { - s.NextToken = &v - return s -} - -type ListApplicationVersionsInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` - - MaxItems *int64 `location:"querystring" locationName:"maxItems" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListApplicationVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListApplicationVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListApplicationVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListApplicationVersionsInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *ListApplicationVersionsInput) SetApplicationId(v string) *ListApplicationVersionsInput { - s.ApplicationId = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListApplicationVersionsInput) SetMaxItems(v int64) *ListApplicationVersionsInput { - s.MaxItems = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListApplicationVersionsInput) SetNextToken(v string) *ListApplicationVersionsInput { - s.NextToken = &v - return s -} - -type ListApplicationVersionsOutput struct { - _ struct{} `type:"structure"` - - NextToken *string `locationName:"nextToken" type:"string"` - - Versions []*VersionSummary `locationName:"versions" type:"list"` -} - -// String returns the string representation -func (s ListApplicationVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListApplicationVersionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListApplicationVersionsOutput) SetNextToken(v string) *ListApplicationVersionsOutput { - s.NextToken = &v - return s -} - -// SetVersions sets the Versions field's value. -func (s *ListApplicationVersionsOutput) SetVersions(v []*VersionSummary) *ListApplicationVersionsOutput { - s.Versions = v - return s -} - -type ListApplicationsInput struct { - _ struct{} `type:"structure"` - - MaxItems *int64 `location:"querystring" locationName:"maxItems" min:"1" type:"integer"` - - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListApplicationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListApplicationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListApplicationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListApplicationsInput"} - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListApplicationsInput) SetMaxItems(v int64) *ListApplicationsInput { - s.MaxItems = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListApplicationsInput) SetNextToken(v string) *ListApplicationsInput { - s.NextToken = &v - return s -} - -type ListApplicationsOutput struct { - _ struct{} `type:"structure"` - - Applications []*ApplicationSummary `locationName:"applications" type:"list"` - - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListApplicationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListApplicationsOutput) GoString() string { - return s.String() -} - -// SetApplications sets the Applications field's value. -func (s *ListApplicationsOutput) SetApplications(v []*ApplicationSummary) *ListApplicationsOutput { - s.Applications = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListApplicationsOutput) SetNextToken(v string) *ListApplicationsOutput { - s.NextToken = &v - return s -} - -// Parameters supported by the application. -type ParameterDefinition struct { - _ struct{} `type:"structure"` - - // A regular expression that represents the patterns to allow for String types. - AllowedPattern *string `locationName:"allowedPattern" type:"string"` - - // An array containing the list of values allowed for the parameter. - AllowedValues []*string `locationName:"allowedValues" type:"list"` - - // A string that explains a constraint when the constraint is violated. For - // example, without a constraint description, a parameter that has an allowed - // pattern of [A-Za-z0-9]+ displays the following error message when the user - // specifies an invalid value: - // - // Malformed input-Parameter MyParameter must match pattern [A-Za-z0-9]+ - // - // By adding a constraint description, such as "must contain only uppercase - // and lowercase letters and numbers," you can display the following customized - // error message: - // - // Malformed input-Parameter MyParameter must contain only uppercase and lowercase - // letters and numbers. - ConstraintDescription *string `locationName:"constraintDescription" type:"string"` - - // A value of the appropriate type for the template to use if no value is specified - // when a stack is created. If you define constraints for the parameter, you - // must specify a value that adheres to those constraints. - DefaultValue *string `locationName:"defaultValue" type:"string"` - - // A string of up to 4,000 characters that describes the parameter. - Description *string `locationName:"description" type:"string"` - - // An integer value that determines the largest number of characters that you - // want to allow for String types. - MaxLength *int64 `locationName:"maxLength" type:"integer"` - - // A numeric value that determines the largest numeric value that you want to - // allow for Number types. - MaxValue *int64 `locationName:"maxValue" type:"integer"` - - // An integer value that determines the smallest number of characters that you - // want to allow for String types. - MinLength *int64 `locationName:"minLength" type:"integer"` - - // A numeric value that determines the smallest numeric value that you want - // to allow for Number types. - MinValue *int64 `locationName:"minValue" type:"integer"` - - // The name of the parameter. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // Whether to mask the parameter value whenever anyone makes a call that describes - // the stack. If you set the value to true, the parameter value is masked with - // asterisks (*****). - NoEcho *bool `locationName:"noEcho" type:"boolean"` - - // A list of AWS SAM resources that use this parameter. - // - // ReferencedByResources is a required field - ReferencedByResources []*string `locationName:"referencedByResources" type:"list" required:"true"` - - // The type of the parameter. - // - // Valid values: String | Number | List | CommaDelimitedList - // - // String: A literal string. - // - // For example, users can specify "MyUserName". - // - // Number: An integer or float. AWS CloudFormation validates the parameter value - // as a number. However, when you use the parameter elsewhere in your template - // (for example, by using the Ref intrinsic function), the parameter value becomes - // a string. - // - // For example, users might specify "8888". - // - // List: An array of integers or floats that are separated by commas. - // AWS CloudFormation validates the parameter value as numbers. However, when - // you use the parameter elsewhere in your template (for example, by using the - // Ref intrinsic function), the parameter value becomes a list of strings. - // - // For example, users might specify "80,20", and then Ref results in ["80","20"]. - // - // CommaDelimitedList: An array of literal strings that are separated by commas. - // The total number of strings should be one more than the total number of commas. - // Also, each member string is space-trimmed. - // - // For example, users might specify "test,dev,prod", and then Ref results in - // ["test","dev","prod"]. - Type *string `locationName:"type" type:"string"` -} - -// String returns the string representation -func (s ParameterDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterDefinition) GoString() string { - return s.String() -} - -// SetAllowedPattern sets the AllowedPattern field's value. -func (s *ParameterDefinition) SetAllowedPattern(v string) *ParameterDefinition { - s.AllowedPattern = &v - return s -} - -// SetAllowedValues sets the AllowedValues field's value. -func (s *ParameterDefinition) SetAllowedValues(v []*string) *ParameterDefinition { - s.AllowedValues = v - return s -} - -// SetConstraintDescription sets the ConstraintDescription field's value. -func (s *ParameterDefinition) SetConstraintDescription(v string) *ParameterDefinition { - s.ConstraintDescription = &v - return s -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *ParameterDefinition) SetDefaultValue(v string) *ParameterDefinition { - s.DefaultValue = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ParameterDefinition) SetDescription(v string) *ParameterDefinition { - s.Description = &v - return s -} - -// SetMaxLength sets the MaxLength field's value. -func (s *ParameterDefinition) SetMaxLength(v int64) *ParameterDefinition { - s.MaxLength = &v - return s -} - -// SetMaxValue sets the MaxValue field's value. -func (s *ParameterDefinition) SetMaxValue(v int64) *ParameterDefinition { - s.MaxValue = &v - return s -} - -// SetMinLength sets the MinLength field's value. -func (s *ParameterDefinition) SetMinLength(v int64) *ParameterDefinition { - s.MinLength = &v - return s -} - -// SetMinValue sets the MinValue field's value. -func (s *ParameterDefinition) SetMinValue(v int64) *ParameterDefinition { - s.MinValue = &v - return s -} - -// SetName sets the Name field's value. -func (s *ParameterDefinition) SetName(v string) *ParameterDefinition { - s.Name = &v - return s -} - -// SetNoEcho sets the NoEcho field's value. -func (s *ParameterDefinition) SetNoEcho(v bool) *ParameterDefinition { - s.NoEcho = &v - return s -} - -// SetReferencedByResources sets the ReferencedByResources field's value. -func (s *ParameterDefinition) SetReferencedByResources(v []*string) *ParameterDefinition { - s.ReferencedByResources = v - return s -} - -// SetType sets the Type field's value. -func (s *ParameterDefinition) SetType(v string) *ParameterDefinition { - s.Type = &v - return s -} - -// Parameter value of the application. -type ParameterValue struct { - _ struct{} `type:"structure"` - - // The key associated with the parameter. If you don't specify a key and value - // for a particular parameter, AWS CloudFormation uses the default value that - // is specified in your template. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The input value associated with the parameter. - // - // Value is a required field - Value *string `locationName:"value" type:"string" required:"true"` -} - -// String returns the string representation -func (s ParameterValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterValue) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ParameterValue) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ParameterValue"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *ParameterValue) SetName(v string) *ParameterValue { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ParameterValue) SetValue(v string) *ParameterValue { - s.Value = &v - return s -} - -type PutApplicationPolicyInput struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` - - // Statements is a required field - Statements []*ApplicationPolicyStatement `locationName:"statements" type:"list" required:"true"` -} - -// String returns the string representation -func (s PutApplicationPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutApplicationPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutApplicationPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutApplicationPolicyInput"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - if s.Statements == nil { - invalidParams.Add(request.NewErrParamRequired("Statements")) - } - if s.Statements != nil { - for i, v := range s.Statements { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Statements", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *PutApplicationPolicyInput) SetApplicationId(v string) *PutApplicationPolicyInput { - s.ApplicationId = &v - return s -} - -// SetStatements sets the Statements field's value. -func (s *PutApplicationPolicyInput) SetStatements(v []*ApplicationPolicyStatement) *PutApplicationPolicyInput { - s.Statements = v - return s -} - -type PutApplicationPolicyOutput struct { - _ struct{} `type:"structure"` - - Statements []*ApplicationPolicyStatement `locationName:"statements" type:"list"` -} - -// String returns the string representation -func (s PutApplicationPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutApplicationPolicyOutput) GoString() string { - return s.String() -} - -// SetStatements sets the Statements field's value. -func (s *PutApplicationPolicyOutput) SetStatements(v []*ApplicationPolicyStatement) *PutApplicationPolicyOutput { - s.Statements = v - return s -} - -// This property corresponds to the AWS CloudFormation RollbackConfiguration -// (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackConfiguration) -// Data Type. -type RollbackConfiguration struct { - _ struct{} `type:"structure"` - - // This property corresponds to the content of the same name for the AWS CloudFormation - // RollbackConfiguration (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackConfiguration) - // Data Type. - MonitoringTimeInMinutes *int64 `locationName:"monitoringTimeInMinutes" type:"integer"` - - // This property corresponds to the content of the same name for the AWS CloudFormation - // RollbackConfiguration (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackConfiguration) - // Data Type. - RollbackTriggers []*RollbackTrigger `locationName:"rollbackTriggers" type:"list"` -} - -// String returns the string representation -func (s RollbackConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RollbackConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RollbackConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RollbackConfiguration"} - if s.RollbackTriggers != nil { - for i, v := range s.RollbackTriggers { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RollbackTriggers", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMonitoringTimeInMinutes sets the MonitoringTimeInMinutes field's value. -func (s *RollbackConfiguration) SetMonitoringTimeInMinutes(v int64) *RollbackConfiguration { - s.MonitoringTimeInMinutes = &v - return s -} - -// SetRollbackTriggers sets the RollbackTriggers field's value. -func (s *RollbackConfiguration) SetRollbackTriggers(v []*RollbackTrigger) *RollbackConfiguration { - s.RollbackTriggers = v - return s -} - -// This property corresponds to the AWS CloudFormation RollbackTrigger (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackTrigger) -// Data Type. -type RollbackTrigger struct { - _ struct{} `type:"structure"` - - // This property corresponds to the content of the same name for the AWS CloudFormation - // RollbackTrigger (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackTrigger) - // Data Type. - // - // Arn is a required field - Arn *string `locationName:"arn" type:"string" required:"true"` - - // This property corresponds to the content of the same name for the AWS CloudFormation - // RollbackTrigger (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackTrigger) - // Data Type. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true"` -} - -// String returns the string representation -func (s RollbackTrigger) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RollbackTrigger) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RollbackTrigger) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RollbackTrigger"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *RollbackTrigger) SetArn(v string) *RollbackTrigger { - s.Arn = &v - return s -} - -// SetType sets the Type field's value. -func (s *RollbackTrigger) SetType(v string) *RollbackTrigger { - s.Type = &v - return s -} - -// This property corresponds to the AWS CloudFormation Tag (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/Tag) -// Data Type. -type Tag struct { - _ struct{} `type:"structure"` - - // This property corresponds to the content of the same name for the AWS CloudFormation - // Tag (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/Tag) - // Data Type. - // - // Key is a required field - Key *string `locationName:"key" type:"string" required:"true"` - - // This property corresponds to the content of the same name for the AWS CloudFormation - // Tag (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/Tag) - // Data Type. - // - // Value is a required field - Value *string `locationName:"value" type:"string" required:"true"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type UpdateApplicationOutput struct { - _ struct{} `type:"structure"` - - ApplicationId *string `locationName:"applicationId" type:"string"` - - Author *string `locationName:"author" type:"string"` - - CreationTime *string `locationName:"creationTime" type:"string"` - - Description *string `locationName:"description" type:"string"` - - HomePageUrl *string `locationName:"homePageUrl" type:"string"` - - Labels []*string `locationName:"labels" type:"list"` - - LicenseUrl *string `locationName:"licenseUrl" type:"string"` - - Name *string `locationName:"name" type:"string"` - - ReadmeUrl *string `locationName:"readmeUrl" type:"string"` - - SpdxLicenseId *string `locationName:"spdxLicenseId" type:"string"` - - // Application version details. - Version *Version `locationName:"version" type:"structure"` -} - -// String returns the string representation -func (s UpdateApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApplicationOutput) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateApplicationOutput) SetApplicationId(v string) *UpdateApplicationOutput { - s.ApplicationId = &v - return s -} - -// SetAuthor sets the Author field's value. -func (s *UpdateApplicationOutput) SetAuthor(v string) *UpdateApplicationOutput { - s.Author = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *UpdateApplicationOutput) SetCreationTime(v string) *UpdateApplicationOutput { - s.CreationTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateApplicationOutput) SetDescription(v string) *UpdateApplicationOutput { - s.Description = &v - return s -} - -// SetHomePageUrl sets the HomePageUrl field's value. -func (s *UpdateApplicationOutput) SetHomePageUrl(v string) *UpdateApplicationOutput { - s.HomePageUrl = &v - return s -} - -// SetLabels sets the Labels field's value. -func (s *UpdateApplicationOutput) SetLabels(v []*string) *UpdateApplicationOutput { - s.Labels = v - return s -} - -// SetLicenseUrl sets the LicenseUrl field's value. -func (s *UpdateApplicationOutput) SetLicenseUrl(v string) *UpdateApplicationOutput { - s.LicenseUrl = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateApplicationOutput) SetName(v string) *UpdateApplicationOutput { - s.Name = &v - return s -} - -// SetReadmeUrl sets the ReadmeUrl field's value. -func (s *UpdateApplicationOutput) SetReadmeUrl(v string) *UpdateApplicationOutput { - s.ReadmeUrl = &v - return s -} - -// SetSpdxLicenseId sets the SpdxLicenseId field's value. -func (s *UpdateApplicationOutput) SetSpdxLicenseId(v string) *UpdateApplicationOutput { - s.SpdxLicenseId = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *UpdateApplicationOutput) SetVersion(v *Version) *UpdateApplicationOutput { - s.Version = v - return s -} - -type UpdateApplicationRequest struct { - _ struct{} `type:"structure"` - - // ApplicationId is a required field - ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` - - Author *string `locationName:"author" type:"string"` - - Description *string `locationName:"description" type:"string"` - - HomePageUrl *string `locationName:"homePageUrl" type:"string"` - - Labels []*string `locationName:"labels" type:"list"` - - ReadmeBody *string `locationName:"readmeBody" type:"string"` - - ReadmeUrl *string `locationName:"readmeUrl" type:"string"` -} - -// String returns the string representation -func (s UpdateApplicationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateApplicationRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateApplicationRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationRequest"} - if s.ApplicationId == nil { - invalidParams.Add(request.NewErrParamRequired("ApplicationId")) - } - if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateApplicationRequest) SetApplicationId(v string) *UpdateApplicationRequest { - s.ApplicationId = &v - return s -} - -// SetAuthor sets the Author field's value. -func (s *UpdateApplicationRequest) SetAuthor(v string) *UpdateApplicationRequest { - s.Author = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateApplicationRequest) SetDescription(v string) *UpdateApplicationRequest { - s.Description = &v - return s -} - -// SetHomePageUrl sets the HomePageUrl field's value. -func (s *UpdateApplicationRequest) SetHomePageUrl(v string) *UpdateApplicationRequest { - s.HomePageUrl = &v - return s -} - -// SetLabels sets the Labels field's value. -func (s *UpdateApplicationRequest) SetLabels(v []*string) *UpdateApplicationRequest { - s.Labels = v - return s -} - -// SetReadmeBody sets the ReadmeBody field's value. -func (s *UpdateApplicationRequest) SetReadmeBody(v string) *UpdateApplicationRequest { - s.ReadmeBody = &v - return s -} - -// SetReadmeUrl sets the ReadmeUrl field's value. -func (s *UpdateApplicationRequest) SetReadmeUrl(v string) *UpdateApplicationRequest { - s.ReadmeUrl = &v - return s -} - -// Application version details. -type Version struct { - _ struct{} `type:"structure"` - - // The application Amazon Resource Name (ARN). - // - // ApplicationId is a required field - ApplicationId *string `locationName:"applicationId" type:"string" required:"true"` - - // The date and time this resource was created. - // - // CreationTime is a required field - CreationTime *string `locationName:"creationTime" type:"string" required:"true"` - - // An array of parameter types supported by the application. - // - // ParameterDefinitions is a required field - ParameterDefinitions []*ParameterDefinition `locationName:"parameterDefinitions" type:"list" required:"true"` - - // A list of values that you must specify before you can deploy certain applications. - // Some applications might include resources that can affect permissions in - // your AWS account, for example, by creating new AWS Identity and Access Management - // (IAM) users. For those applications, you must explicitly acknowledge their - // capabilities by specifying this parameter. - // - // The only valid values are CAPABILITY_IAM, CAPABILITY_NAMED_IAM, and CAPABILITY_RESOURCE_POLICY. - // - // The following resources require you to specify CAPABILITY_IAM or CAPABILITY_NAMED_IAM: - // AWS::IAM::Group (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html), - // AWS::IAM::InstanceProfile (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html), - // AWS::IAM::Policy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html), - // and AWS::IAM::Role (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html). - // If the application contains IAM resources, you can specify either CAPABILITY_IAM - // or CAPABILITY_NAMED_IAM. If the application contains IAM resources with custom - // names, you must specify CAPABILITY_NAMED_IAM. - // - // The following resources require you to specify CAPABILITY_RESOURCE_POLICY: - // AWS::Lambda::Permission (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html), - // AWS::IAM:Policy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html), - // AWS::ApplicationAutoScaling::ScalingPolicy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalingpolicy.html), - // AWS::S3::BucketPolicy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html), - // AWS::SQS::QueuePolicy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-policy.html), - // and AWS::SNS::TopicPolicy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-policy.html). - // - // If your application template contains any of the above resources, we recommend - // that you review all permissions associated with the application before deploying. - // If you don't specify this parameter for an application that requires capabilities, - // the call will fail. - // - // Valid values: CAPABILITY_IAM | CAPABILITY_NAMED_IAM | CAPABILITY_RESOURCE_POLICY - // - // RequiredCapabilities is a required field - RequiredCapabilities []*string `locationName:"requiredCapabilities" type:"list" required:"true"` - - // Whether all of the AWS resources contained in this application are supported - // in the region in which it is being retrieved. - // - // ResourcesSupported is a required field - ResourcesSupported *bool `locationName:"resourcesSupported" type:"boolean" required:"true"` - - // The semantic version of the application: - // - // https://semver.org/ (https://semver.org/) - // - // SemanticVersion is a required field - SemanticVersion *string `locationName:"semanticVersion" type:"string" required:"true"` - - // A link to a public repository for the source code of your application. - SourceCodeUrl *string `locationName:"sourceCodeUrl" type:"string"` - - // A link to the packaged AWS SAM template of your application. - // - // TemplateUrl is a required field - TemplateUrl *string `locationName:"templateUrl" type:"string" required:"true"` -} - -// String returns the string representation -func (s Version) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Version) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *Version) SetApplicationId(v string) *Version { - s.ApplicationId = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *Version) SetCreationTime(v string) *Version { - s.CreationTime = &v - return s -} - -// SetParameterDefinitions sets the ParameterDefinitions field's value. -func (s *Version) SetParameterDefinitions(v []*ParameterDefinition) *Version { - s.ParameterDefinitions = v - return s -} - -// SetRequiredCapabilities sets the RequiredCapabilities field's value. -func (s *Version) SetRequiredCapabilities(v []*string) *Version { - s.RequiredCapabilities = v - return s -} - -// SetResourcesSupported sets the ResourcesSupported field's value. -func (s *Version) SetResourcesSupported(v bool) *Version { - s.ResourcesSupported = &v - return s -} - -// SetSemanticVersion sets the SemanticVersion field's value. -func (s *Version) SetSemanticVersion(v string) *Version { - s.SemanticVersion = &v - return s -} - -// SetSourceCodeUrl sets the SourceCodeUrl field's value. -func (s *Version) SetSourceCodeUrl(v string) *Version { - s.SourceCodeUrl = &v - return s -} - -// SetTemplateUrl sets the TemplateUrl field's value. -func (s *Version) SetTemplateUrl(v string) *Version { - s.TemplateUrl = &v - return s -} - -// An application version summary. -type VersionSummary struct { - _ struct{} `type:"structure"` - - // The application Amazon Resource Name (ARN). - // - // ApplicationId is a required field - ApplicationId *string `locationName:"applicationId" type:"string" required:"true"` - - // The date and time this resource was created. - // - // CreationTime is a required field - CreationTime *string `locationName:"creationTime" type:"string" required:"true"` - - // The semantic version of the application: - // - // https://semver.org/ (https://semver.org/) - // - // SemanticVersion is a required field - SemanticVersion *string `locationName:"semanticVersion" type:"string" required:"true"` - - // A link to a public repository for the source code of your application. - SourceCodeUrl *string `locationName:"sourceCodeUrl" type:"string"` -} - -// String returns the string representation -func (s VersionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VersionSummary) GoString() string { - return s.String() -} - -// SetApplicationId sets the ApplicationId field's value. -func (s *VersionSummary) SetApplicationId(v string) *VersionSummary { - s.ApplicationId = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *VersionSummary) SetCreationTime(v string) *VersionSummary { - s.CreationTime = &v - return s -} - -// SetSemanticVersion sets the SemanticVersion field's value. -func (s *VersionSummary) SetSemanticVersion(v string) *VersionSummary { - s.SemanticVersion = &v - return s -} - -// SetSourceCodeUrl sets the SourceCodeUrl field's value. -func (s *VersionSummary) SetSourceCodeUrl(v string) *VersionSummary { - s.SourceCodeUrl = &v - return s -} - -// Values that must be specified in order to deploy some applications. -const ( - // CapabilityCapabilityIam is a Capability enum value - CapabilityCapabilityIam = "CAPABILITY_IAM" - - // CapabilityCapabilityNamedIam is a Capability enum value - CapabilityCapabilityNamedIam = "CAPABILITY_NAMED_IAM" - - // CapabilityCapabilityAutoExpand is a Capability enum value - CapabilityCapabilityAutoExpand = "CAPABILITY_AUTO_EXPAND" - - // CapabilityCapabilityResourcePolicy is a Capability enum value - CapabilityCapabilityResourcePolicy = "CAPABILITY_RESOURCE_POLICY" -) - -const ( - // StatusPreparing is a Status enum value - StatusPreparing = "PREPARING" - - // StatusActive is a Status enum value - StatusActive = "ACTIVE" - - // StatusExpired is a Status enum value - StatusExpired = "EXPIRED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/doc.go b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/doc.go deleted file mode 100644 index dde60865e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/doc.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package serverlessapplicationrepository provides the client and types for making API -// requests to AWSServerlessApplicationRepository. -// -// The AWS Serverless Application Repository makes it easy for developers and -// enterprises to quickly find and deploy serverless applications in the AWS -// Cloud. For more information about serverless applications, see Serverless -// Computing and Applications on the AWS website. -// -// The AWS Serverless Application Repository is deeply integrated with the AWS -// Lambda console, so that developers of all levels can get started with serverless -// computing without needing to learn anything new. You can use category keywords -// to browse for applications such as web and mobile backends, data processing -// applications, or chatbots. You can also search for applications by name, -// publisher, or event source. To use an application, you simply choose it, -// configure any required fields, and deploy it with a few clicks. -// -// You can also easily publish applications, sharing them publicly with the -// community at large, or privately within your team or across your organization. -// To publish a serverless application (or app), you can use the AWS Management -// Console, AWS Command Line Interface (AWS CLI), or AWS SDKs to upload the -// code. Along with the code, you upload a simple manifest file, also known -// as the AWS Serverless Application Model (AWS SAM) template. For more information -// about AWS SAM, see AWS Serverless Application Model (AWS SAM) on the AWS -// Labs GitHub repository. -// -// The AWS Serverless Application Repository Developer Guide contains more information -// about the two developer experiences available: -// -// * Consuming Applications – Browse for applications and view information -// about them, including source code and readme files. Also install, configure, -// and deploy applications of your choosing. -// -// Publishing Applications – Configure and upload applications to make them -// available to other developers, and publish new versions of applications. -// -// See https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08 for more information on this service. -// -// See serverlessapplicationrepository package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/serverlessapplicationrepository/ -// -// Using the Client -// -// To contact AWSServerlessApplicationRepository 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 AWSServerlessApplicationRepository client ServerlessApplicationRepository for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/serverlessapplicationrepository/#New -package serverlessapplicationrepository diff --git a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/errors.go b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/errors.go deleted file mode 100644 index 2855c3aec..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/errors.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package serverlessapplicationrepository - -const ( - - // ErrCodeBadRequestException for service response error code - // "BadRequestException". - // - // One of the parameters in the request is invalid. - ErrCodeBadRequestException = "BadRequestException" - - // ErrCodeConflictException for service response error code - // "ConflictException". - // - // The resource already exists. - ErrCodeConflictException = "ConflictException" - - // ErrCodeForbiddenException for service response error code - // "ForbiddenException". - // - // The client is not authenticated. - ErrCodeForbiddenException = "ForbiddenException" - - // ErrCodeInternalServerErrorException for service response error code - // "InternalServerErrorException". - // - // The AWS Serverless Application Repository service encountered an internal - // error. - ErrCodeInternalServerErrorException = "InternalServerErrorException" - - // ErrCodeNotFoundException for service response error code - // "NotFoundException". - // - // The resource (for example, an access policy statement) specified in the request - // doesn't exist. - ErrCodeNotFoundException = "NotFoundException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // The client is sending more than the allowed number of requests per unit of - // time. - ErrCodeTooManyRequestsException = "TooManyRequestsException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/service.go b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/service.go deleted file mode 100644 index 78f8f47ce..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package serverlessapplicationrepository - -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" -) - -// ServerlessApplicationRepository provides the API operation methods for making requests to -// AWSServerlessApplicationRepository. See this package's package overview docs -// for details on the service. -// -// ServerlessApplicationRepository methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ServerlessApplicationRepository 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 = "serverlessrepo" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "ServerlessApplicationRepository" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ServerlessApplicationRepository 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 ServerlessApplicationRepository client from just a session. -// svc := serverlessapplicationrepository.New(mySession) -// -// // Create a ServerlessApplicationRepository client with additional configuration -// svc := serverlessapplicationrepository.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ServerlessApplicationRepository { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "serverlessrepo" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ServerlessApplicationRepository { - svc := &ServerlessApplicationRepository{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-09-08", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ServerlessApplicationRepository operation and runs any -// custom request initialization. -func (c *ServerlessApplicationRepository) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go deleted file mode 100644 index cd3bf7179..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go +++ /dev/null @@ -1,18963 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package servicecatalog - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAcceptPortfolioShare = "AcceptPortfolioShare" - -// AcceptPortfolioShareRequest generates a "aws/request.Request" representing the -// client's request for the AcceptPortfolioShare operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AcceptPortfolioShare for more information on using the AcceptPortfolioShare -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AcceptPortfolioShareRequest method. -// req, resp := client.AcceptPortfolioShareRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AcceptPortfolioShare -func (c *ServiceCatalog) AcceptPortfolioShareRequest(input *AcceptPortfolioShareInput) (req *request.Request, output *AcceptPortfolioShareOutput) { - op := &request.Operation{ - Name: opAcceptPortfolioShare, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AcceptPortfolioShareInput{} - } - - output = &AcceptPortfolioShareOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AcceptPortfolioShare API operation for AWS Service Catalog. -// -// Accepts an offer to share the specified portfolio. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation AcceptPortfolioShare for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The current limits of the service would have been exceeded by this operation. -// Decrease your resource use or increase your service limits and retry the -// operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AcceptPortfolioShare -func (c *ServiceCatalog) AcceptPortfolioShare(input *AcceptPortfolioShareInput) (*AcceptPortfolioShareOutput, error) { - req, out := c.AcceptPortfolioShareRequest(input) - return out, req.Send() -} - -// AcceptPortfolioShareWithContext is the same as AcceptPortfolioShare with the addition of -// the ability to pass a context and additional request options. -// -// See AcceptPortfolioShare for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) AcceptPortfolioShareWithContext(ctx aws.Context, input *AcceptPortfolioShareInput, opts ...request.Option) (*AcceptPortfolioShareOutput, error) { - req, out := c.AcceptPortfolioShareRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociatePrincipalWithPortfolio = "AssociatePrincipalWithPortfolio" - -// AssociatePrincipalWithPortfolioRequest generates a "aws/request.Request" representing the -// client's request for the AssociatePrincipalWithPortfolio operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociatePrincipalWithPortfolio for more information on using the AssociatePrincipalWithPortfolio -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociatePrincipalWithPortfolioRequest method. -// req, resp := client.AssociatePrincipalWithPortfolioRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociatePrincipalWithPortfolio -func (c *ServiceCatalog) AssociatePrincipalWithPortfolioRequest(input *AssociatePrincipalWithPortfolioInput) (req *request.Request, output *AssociatePrincipalWithPortfolioOutput) { - op := &request.Operation{ - Name: opAssociatePrincipalWithPortfolio, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociatePrincipalWithPortfolioInput{} - } - - output = &AssociatePrincipalWithPortfolioOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssociatePrincipalWithPortfolio API operation for AWS Service Catalog. -// -// Associates the specified principal ARN with the specified portfolio. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation AssociatePrincipalWithPortfolio for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The current limits of the service would have been exceeded by this operation. -// Decrease your resource use or increase your service limits and retry the -// operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociatePrincipalWithPortfolio -func (c *ServiceCatalog) AssociatePrincipalWithPortfolio(input *AssociatePrincipalWithPortfolioInput) (*AssociatePrincipalWithPortfolioOutput, error) { - req, out := c.AssociatePrincipalWithPortfolioRequest(input) - return out, req.Send() -} - -// AssociatePrincipalWithPortfolioWithContext is the same as AssociatePrincipalWithPortfolio with the addition of -// the ability to pass a context and additional request options. -// -// See AssociatePrincipalWithPortfolio for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) AssociatePrincipalWithPortfolioWithContext(ctx aws.Context, input *AssociatePrincipalWithPortfolioInput, opts ...request.Option) (*AssociatePrincipalWithPortfolioOutput, error) { - req, out := c.AssociatePrincipalWithPortfolioRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateProductWithPortfolio = "AssociateProductWithPortfolio" - -// AssociateProductWithPortfolioRequest generates a "aws/request.Request" representing the -// client's request for the AssociateProductWithPortfolio operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateProductWithPortfolio for more information on using the AssociateProductWithPortfolio -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateProductWithPortfolioRequest method. -// req, resp := client.AssociateProductWithPortfolioRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateProductWithPortfolio -func (c *ServiceCatalog) AssociateProductWithPortfolioRequest(input *AssociateProductWithPortfolioInput) (req *request.Request, output *AssociateProductWithPortfolioOutput) { - op := &request.Operation{ - Name: opAssociateProductWithPortfolio, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateProductWithPortfolioInput{} - } - - output = &AssociateProductWithPortfolioOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssociateProductWithPortfolio API operation for AWS Service Catalog. -// -// Associates the specified product with the specified portfolio. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation AssociateProductWithPortfolio for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The current limits of the service would have been exceeded by this operation. -// Decrease your resource use or increase your service limits and retry the -// operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateProductWithPortfolio -func (c *ServiceCatalog) AssociateProductWithPortfolio(input *AssociateProductWithPortfolioInput) (*AssociateProductWithPortfolioOutput, error) { - req, out := c.AssociateProductWithPortfolioRequest(input) - return out, req.Send() -} - -// AssociateProductWithPortfolioWithContext is the same as AssociateProductWithPortfolio with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateProductWithPortfolio for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) AssociateProductWithPortfolioWithContext(ctx aws.Context, input *AssociateProductWithPortfolioInput, opts ...request.Option) (*AssociateProductWithPortfolioOutput, error) { - req, out := c.AssociateProductWithPortfolioRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateServiceActionWithProvisioningArtifact = "AssociateServiceActionWithProvisioningArtifact" - -// AssociateServiceActionWithProvisioningArtifactRequest generates a "aws/request.Request" representing the -// client's request for the AssociateServiceActionWithProvisioningArtifact operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateServiceActionWithProvisioningArtifact for more information on using the AssociateServiceActionWithProvisioningArtifact -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateServiceActionWithProvisioningArtifactRequest method. -// req, resp := client.AssociateServiceActionWithProvisioningArtifactRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateServiceActionWithProvisioningArtifact -func (c *ServiceCatalog) AssociateServiceActionWithProvisioningArtifactRequest(input *AssociateServiceActionWithProvisioningArtifactInput) (req *request.Request, output *AssociateServiceActionWithProvisioningArtifactOutput) { - op := &request.Operation{ - Name: opAssociateServiceActionWithProvisioningArtifact, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateServiceActionWithProvisioningArtifactInput{} - } - - output = &AssociateServiceActionWithProvisioningArtifactOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssociateServiceActionWithProvisioningArtifact API operation for AWS Service Catalog. -// -// Associates a self-service action with a provisioning artifact. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation AssociateServiceActionWithProvisioningArtifact for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeDuplicateResourceException "DuplicateResourceException" -// The specified resource is a duplicate. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The current limits of the service would have been exceeded by this operation. -// Decrease your resource use or increase your service limits and retry the -// operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateServiceActionWithProvisioningArtifact -func (c *ServiceCatalog) AssociateServiceActionWithProvisioningArtifact(input *AssociateServiceActionWithProvisioningArtifactInput) (*AssociateServiceActionWithProvisioningArtifactOutput, error) { - req, out := c.AssociateServiceActionWithProvisioningArtifactRequest(input) - return out, req.Send() -} - -// AssociateServiceActionWithProvisioningArtifactWithContext is the same as AssociateServiceActionWithProvisioningArtifact with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateServiceActionWithProvisioningArtifact for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) AssociateServiceActionWithProvisioningArtifactWithContext(ctx aws.Context, input *AssociateServiceActionWithProvisioningArtifactInput, opts ...request.Option) (*AssociateServiceActionWithProvisioningArtifactOutput, error) { - req, out := c.AssociateServiceActionWithProvisioningArtifactRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateTagOptionWithResource = "AssociateTagOptionWithResource" - -// AssociateTagOptionWithResourceRequest generates a "aws/request.Request" representing the -// client's request for the AssociateTagOptionWithResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateTagOptionWithResource for more information on using the AssociateTagOptionWithResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateTagOptionWithResourceRequest method. -// req, resp := client.AssociateTagOptionWithResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateTagOptionWithResource -func (c *ServiceCatalog) AssociateTagOptionWithResourceRequest(input *AssociateTagOptionWithResourceInput) (req *request.Request, output *AssociateTagOptionWithResourceOutput) { - op := &request.Operation{ - Name: opAssociateTagOptionWithResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateTagOptionWithResourceInput{} - } - - output = &AssociateTagOptionWithResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssociateTagOptionWithResource API operation for AWS Service Catalog. -// -// Associate the specified TagOption with the specified portfolio or product. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation AssociateTagOptionWithResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The current limits of the service would have been exceeded by this operation. -// Decrease your resource use or increase your service limits and retry the -// operation. -// -// * ErrCodeDuplicateResourceException "DuplicateResourceException" -// The specified resource is a duplicate. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// An attempt was made to modify a resource that is in a state that is not valid. -// Check your resources to ensure that they are in valid states before retrying -// the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateTagOptionWithResource -func (c *ServiceCatalog) AssociateTagOptionWithResource(input *AssociateTagOptionWithResourceInput) (*AssociateTagOptionWithResourceOutput, error) { - req, out := c.AssociateTagOptionWithResourceRequest(input) - return out, req.Send() -} - -// AssociateTagOptionWithResourceWithContext is the same as AssociateTagOptionWithResource with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateTagOptionWithResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) AssociateTagOptionWithResourceWithContext(ctx aws.Context, input *AssociateTagOptionWithResourceInput, opts ...request.Option) (*AssociateTagOptionWithResourceOutput, error) { - req, out := c.AssociateTagOptionWithResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchAssociateServiceActionWithProvisioningArtifact = "BatchAssociateServiceActionWithProvisioningArtifact" - -// BatchAssociateServiceActionWithProvisioningArtifactRequest generates a "aws/request.Request" representing the -// client's request for the BatchAssociateServiceActionWithProvisioningArtifact operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchAssociateServiceActionWithProvisioningArtifact for more information on using the BatchAssociateServiceActionWithProvisioningArtifact -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchAssociateServiceActionWithProvisioningArtifactRequest method. -// req, resp := client.BatchAssociateServiceActionWithProvisioningArtifactRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/BatchAssociateServiceActionWithProvisioningArtifact -func (c *ServiceCatalog) BatchAssociateServiceActionWithProvisioningArtifactRequest(input *BatchAssociateServiceActionWithProvisioningArtifactInput) (req *request.Request, output *BatchAssociateServiceActionWithProvisioningArtifactOutput) { - op := &request.Operation{ - Name: opBatchAssociateServiceActionWithProvisioningArtifact, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchAssociateServiceActionWithProvisioningArtifactInput{} - } - - output = &BatchAssociateServiceActionWithProvisioningArtifactOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchAssociateServiceActionWithProvisioningArtifact API operation for AWS Service Catalog. -// -// Associates multiple self-service actions with provisioning artifacts. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation BatchAssociateServiceActionWithProvisioningArtifact for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/BatchAssociateServiceActionWithProvisioningArtifact -func (c *ServiceCatalog) BatchAssociateServiceActionWithProvisioningArtifact(input *BatchAssociateServiceActionWithProvisioningArtifactInput) (*BatchAssociateServiceActionWithProvisioningArtifactOutput, error) { - req, out := c.BatchAssociateServiceActionWithProvisioningArtifactRequest(input) - return out, req.Send() -} - -// BatchAssociateServiceActionWithProvisioningArtifactWithContext is the same as BatchAssociateServiceActionWithProvisioningArtifact with the addition of -// the ability to pass a context and additional request options. -// -// See BatchAssociateServiceActionWithProvisioningArtifact for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) BatchAssociateServiceActionWithProvisioningArtifactWithContext(ctx aws.Context, input *BatchAssociateServiceActionWithProvisioningArtifactInput, opts ...request.Option) (*BatchAssociateServiceActionWithProvisioningArtifactOutput, error) { - req, out := c.BatchAssociateServiceActionWithProvisioningArtifactRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchDisassociateServiceActionFromProvisioningArtifact = "BatchDisassociateServiceActionFromProvisioningArtifact" - -// BatchDisassociateServiceActionFromProvisioningArtifactRequest generates a "aws/request.Request" representing the -// client's request for the BatchDisassociateServiceActionFromProvisioningArtifact operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchDisassociateServiceActionFromProvisioningArtifact for more information on using the BatchDisassociateServiceActionFromProvisioningArtifact -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchDisassociateServiceActionFromProvisioningArtifactRequest method. -// req, resp := client.BatchDisassociateServiceActionFromProvisioningArtifactRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/BatchDisassociateServiceActionFromProvisioningArtifact -func (c *ServiceCatalog) BatchDisassociateServiceActionFromProvisioningArtifactRequest(input *BatchDisassociateServiceActionFromProvisioningArtifactInput) (req *request.Request, output *BatchDisassociateServiceActionFromProvisioningArtifactOutput) { - op := &request.Operation{ - Name: opBatchDisassociateServiceActionFromProvisioningArtifact, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchDisassociateServiceActionFromProvisioningArtifactInput{} - } - - output = &BatchDisassociateServiceActionFromProvisioningArtifactOutput{} - req = c.newRequest(op, input, output) - return -} - -// BatchDisassociateServiceActionFromProvisioningArtifact API operation for AWS Service Catalog. -// -// Disassociates a batch of self-service actions from the specified provisioning -// artifact. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation BatchDisassociateServiceActionFromProvisioningArtifact for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/BatchDisassociateServiceActionFromProvisioningArtifact -func (c *ServiceCatalog) BatchDisassociateServiceActionFromProvisioningArtifact(input *BatchDisassociateServiceActionFromProvisioningArtifactInput) (*BatchDisassociateServiceActionFromProvisioningArtifactOutput, error) { - req, out := c.BatchDisassociateServiceActionFromProvisioningArtifactRequest(input) - return out, req.Send() -} - -// BatchDisassociateServiceActionFromProvisioningArtifactWithContext is the same as BatchDisassociateServiceActionFromProvisioningArtifact with the addition of -// the ability to pass a context and additional request options. -// -// See BatchDisassociateServiceActionFromProvisioningArtifact for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) BatchDisassociateServiceActionFromProvisioningArtifactWithContext(ctx aws.Context, input *BatchDisassociateServiceActionFromProvisioningArtifactInput, opts ...request.Option) (*BatchDisassociateServiceActionFromProvisioningArtifactOutput, error) { - req, out := c.BatchDisassociateServiceActionFromProvisioningArtifactRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyProduct = "CopyProduct" - -// CopyProductRequest generates a "aws/request.Request" representing the -// client's request for the CopyProduct operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CopyProduct for more information on using the CopyProduct -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CopyProductRequest method. -// req, resp := client.CopyProductRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CopyProduct -func (c *ServiceCatalog) CopyProductRequest(input *CopyProductInput) (req *request.Request, output *CopyProductOutput) { - op := &request.Operation{ - Name: opCopyProduct, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CopyProductInput{} - } - - output = &CopyProductOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyProduct API operation for AWS Service Catalog. -// -// Copies the specified source product to the specified target product or a -// new product. -// -// You can copy a product to the same account or another account. You can copy -// a product to the same region or another region. -// -// This operation is performed asynchronously. To track the progress of the -// operation, use DescribeCopyProductStatus. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation CopyProduct for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CopyProduct -func (c *ServiceCatalog) CopyProduct(input *CopyProductInput) (*CopyProductOutput, error) { - req, out := c.CopyProductRequest(input) - return out, req.Send() -} - -// CopyProductWithContext is the same as CopyProduct with the addition of -// the ability to pass a context and additional request options. -// -// See CopyProduct for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) CopyProductWithContext(ctx aws.Context, input *CopyProductInput, opts ...request.Option) (*CopyProductOutput, error) { - req, out := c.CopyProductRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateConstraint = "CreateConstraint" - -// CreateConstraintRequest generates a "aws/request.Request" representing the -// client's request for the CreateConstraint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateConstraint for more information on using the CreateConstraint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateConstraintRequest method. -// req, resp := client.CreateConstraintRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateConstraint -func (c *ServiceCatalog) CreateConstraintRequest(input *CreateConstraintInput) (req *request.Request, output *CreateConstraintOutput) { - op := &request.Operation{ - Name: opCreateConstraint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateConstraintInput{} - } - - output = &CreateConstraintOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateConstraint API operation for AWS Service Catalog. -// -// Creates a constraint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation CreateConstraint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The current limits of the service would have been exceeded by this operation. -// Decrease your resource use or increase your service limits and retry the -// operation. -// -// * ErrCodeDuplicateResourceException "DuplicateResourceException" -// The specified resource is a duplicate. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateConstraint -func (c *ServiceCatalog) CreateConstraint(input *CreateConstraintInput) (*CreateConstraintOutput, error) { - req, out := c.CreateConstraintRequest(input) - return out, req.Send() -} - -// CreateConstraintWithContext is the same as CreateConstraint with the addition of -// the ability to pass a context and additional request options. -// -// See CreateConstraint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) CreateConstraintWithContext(ctx aws.Context, input *CreateConstraintInput, opts ...request.Option) (*CreateConstraintOutput, error) { - req, out := c.CreateConstraintRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePortfolio = "CreatePortfolio" - -// CreatePortfolioRequest generates a "aws/request.Request" representing the -// client's request for the CreatePortfolio operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePortfolio for more information on using the CreatePortfolio -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePortfolioRequest method. -// req, resp := client.CreatePortfolioRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreatePortfolio -func (c *ServiceCatalog) CreatePortfolioRequest(input *CreatePortfolioInput) (req *request.Request, output *CreatePortfolioOutput) { - op := &request.Operation{ - Name: opCreatePortfolio, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePortfolioInput{} - } - - output = &CreatePortfolioOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePortfolio API operation for AWS Service Catalog. -// -// Creates a portfolio. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation CreatePortfolio for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The current limits of the service would have been exceeded by this operation. -// Decrease your resource use or increase your service limits and retry the -// operation. -// -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreatePortfolio -func (c *ServiceCatalog) CreatePortfolio(input *CreatePortfolioInput) (*CreatePortfolioOutput, error) { - req, out := c.CreatePortfolioRequest(input) - return out, req.Send() -} - -// CreatePortfolioWithContext is the same as CreatePortfolio with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePortfolio for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) CreatePortfolioWithContext(ctx aws.Context, input *CreatePortfolioInput, opts ...request.Option) (*CreatePortfolioOutput, error) { - req, out := c.CreatePortfolioRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePortfolioShare = "CreatePortfolioShare" - -// CreatePortfolioShareRequest generates a "aws/request.Request" representing the -// client's request for the CreatePortfolioShare operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePortfolioShare for more information on using the CreatePortfolioShare -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePortfolioShareRequest method. -// req, resp := client.CreatePortfolioShareRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreatePortfolioShare -func (c *ServiceCatalog) CreatePortfolioShareRequest(input *CreatePortfolioShareInput) (req *request.Request, output *CreatePortfolioShareOutput) { - op := &request.Operation{ - Name: opCreatePortfolioShare, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePortfolioShareInput{} - } - - output = &CreatePortfolioShareOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePortfolioShare API operation for AWS Service Catalog. -// -// Shares the specified portfolio with the specified account or organization -// node. Shares to an organization node can only be created by the master account -// of an Organization. AWSOrganizationsAccess must be enabled in order to create -// a portfolio share to an organization node. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation CreatePortfolioShare for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The current limits of the service would have been exceeded by this operation. -// Decrease your resource use or increase your service limits and retry the -// operation. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" -// The operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreatePortfolioShare -func (c *ServiceCatalog) CreatePortfolioShare(input *CreatePortfolioShareInput) (*CreatePortfolioShareOutput, error) { - req, out := c.CreatePortfolioShareRequest(input) - return out, req.Send() -} - -// CreatePortfolioShareWithContext is the same as CreatePortfolioShare with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePortfolioShare for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) CreatePortfolioShareWithContext(ctx aws.Context, input *CreatePortfolioShareInput, opts ...request.Option) (*CreatePortfolioShareOutput, error) { - req, out := c.CreatePortfolioShareRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateProduct = "CreateProduct" - -// CreateProductRequest generates a "aws/request.Request" representing the -// client's request for the CreateProduct operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateProduct for more information on using the CreateProduct -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateProductRequest method. -// req, resp := client.CreateProductRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateProduct -func (c *ServiceCatalog) CreateProductRequest(input *CreateProductInput) (req *request.Request, output *CreateProductOutput) { - op := &request.Operation{ - Name: opCreateProduct, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateProductInput{} - } - - output = &CreateProductOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateProduct API operation for AWS Service Catalog. -// -// Creates a product. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation CreateProduct for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The current limits of the service would have been exceeded by this operation. -// Decrease your resource use or increase your service limits and retry the -// operation. -// -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateProduct -func (c *ServiceCatalog) CreateProduct(input *CreateProductInput) (*CreateProductOutput, error) { - req, out := c.CreateProductRequest(input) - return out, req.Send() -} - -// CreateProductWithContext is the same as CreateProduct with the addition of -// the ability to pass a context and additional request options. -// -// See CreateProduct for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) CreateProductWithContext(ctx aws.Context, input *CreateProductInput, opts ...request.Option) (*CreateProductOutput, error) { - req, out := c.CreateProductRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateProvisionedProductPlan = "CreateProvisionedProductPlan" - -// CreateProvisionedProductPlanRequest generates a "aws/request.Request" representing the -// client's request for the CreateProvisionedProductPlan operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateProvisionedProductPlan for more information on using the CreateProvisionedProductPlan -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateProvisionedProductPlanRequest method. -// req, resp := client.CreateProvisionedProductPlanRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateProvisionedProductPlan -func (c *ServiceCatalog) CreateProvisionedProductPlanRequest(input *CreateProvisionedProductPlanInput) (req *request.Request, output *CreateProvisionedProductPlanOutput) { - op := &request.Operation{ - Name: opCreateProvisionedProductPlan, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateProvisionedProductPlanInput{} - } - - output = &CreateProvisionedProductPlanOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateProvisionedProductPlan API operation for AWS Service Catalog. -// -// Creates a plan. A plan includes the list of resources to be created (when -// provisioning a new product) or modified (when updating a provisioned product) -// when the plan is executed. -// -// You can create one plan per provisioned product. To create a plan for an -// existing provisioned product, the product status must be AVAILBLE or TAINTED. -// -// To view the resource changes in the change set, use DescribeProvisionedProductPlan. -// To create or modify the provisioned product, use ExecuteProvisionedProductPlan. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation CreateProvisionedProductPlan for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// An attempt was made to modify a resource that is in a state that is not valid. -// Check your resources to ensure that they are in valid states before retrying -// the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateProvisionedProductPlan -func (c *ServiceCatalog) CreateProvisionedProductPlan(input *CreateProvisionedProductPlanInput) (*CreateProvisionedProductPlanOutput, error) { - req, out := c.CreateProvisionedProductPlanRequest(input) - return out, req.Send() -} - -// CreateProvisionedProductPlanWithContext is the same as CreateProvisionedProductPlan with the addition of -// the ability to pass a context and additional request options. -// -// See CreateProvisionedProductPlan for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) CreateProvisionedProductPlanWithContext(ctx aws.Context, input *CreateProvisionedProductPlanInput, opts ...request.Option) (*CreateProvisionedProductPlanOutput, error) { - req, out := c.CreateProvisionedProductPlanRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateProvisioningArtifact = "CreateProvisioningArtifact" - -// CreateProvisioningArtifactRequest generates a "aws/request.Request" representing the -// client's request for the CreateProvisioningArtifact operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateProvisioningArtifact for more information on using the CreateProvisioningArtifact -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateProvisioningArtifactRequest method. -// req, resp := client.CreateProvisioningArtifactRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateProvisioningArtifact -func (c *ServiceCatalog) CreateProvisioningArtifactRequest(input *CreateProvisioningArtifactInput) (req *request.Request, output *CreateProvisioningArtifactOutput) { - op := &request.Operation{ - Name: opCreateProvisioningArtifact, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateProvisioningArtifactInput{} - } - - output = &CreateProvisioningArtifactOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateProvisioningArtifact API operation for AWS Service Catalog. -// -// Creates a provisioning artifact (also known as a version) for the specified -// product. -// -// You cannot create a provisioning artifact for a product that was shared with -// you. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation CreateProvisioningArtifact for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The current limits of the service would have been exceeded by this operation. -// Decrease your resource use or increase your service limits and retry the -// operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateProvisioningArtifact -func (c *ServiceCatalog) CreateProvisioningArtifact(input *CreateProvisioningArtifactInput) (*CreateProvisioningArtifactOutput, error) { - req, out := c.CreateProvisioningArtifactRequest(input) - return out, req.Send() -} - -// CreateProvisioningArtifactWithContext is the same as CreateProvisioningArtifact with the addition of -// the ability to pass a context and additional request options. -// -// See CreateProvisioningArtifact for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) CreateProvisioningArtifactWithContext(ctx aws.Context, input *CreateProvisioningArtifactInput, opts ...request.Option) (*CreateProvisioningArtifactOutput, error) { - req, out := c.CreateProvisioningArtifactRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateServiceAction = "CreateServiceAction" - -// CreateServiceActionRequest generates a "aws/request.Request" representing the -// client's request for the CreateServiceAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateServiceAction for more information on using the CreateServiceAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateServiceActionRequest method. -// req, resp := client.CreateServiceActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateServiceAction -func (c *ServiceCatalog) CreateServiceActionRequest(input *CreateServiceActionInput) (req *request.Request, output *CreateServiceActionOutput) { - op := &request.Operation{ - Name: opCreateServiceAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateServiceActionInput{} - } - - output = &CreateServiceActionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateServiceAction API operation for AWS Service Catalog. -// -// Creates a self-service action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation CreateServiceAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The current limits of the service would have been exceeded by this operation. -// Decrease your resource use or increase your service limits and retry the -// operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateServiceAction -func (c *ServiceCatalog) CreateServiceAction(input *CreateServiceActionInput) (*CreateServiceActionOutput, error) { - req, out := c.CreateServiceActionRequest(input) - return out, req.Send() -} - -// CreateServiceActionWithContext is the same as CreateServiceAction with the addition of -// the ability to pass a context and additional request options. -// -// See CreateServiceAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) CreateServiceActionWithContext(ctx aws.Context, input *CreateServiceActionInput, opts ...request.Option) (*CreateServiceActionOutput, error) { - req, out := c.CreateServiceActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTagOption = "CreateTagOption" - -// CreateTagOptionRequest generates a "aws/request.Request" representing the -// client's request for the CreateTagOption operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTagOption for more information on using the CreateTagOption -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTagOptionRequest method. -// req, resp := client.CreateTagOptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateTagOption -func (c *ServiceCatalog) CreateTagOptionRequest(input *CreateTagOptionInput) (req *request.Request, output *CreateTagOptionOutput) { - op := &request.Operation{ - Name: opCreateTagOption, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTagOptionInput{} - } - - output = &CreateTagOptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTagOption API operation for AWS Service Catalog. -// -// Creates a TagOption. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation CreateTagOption for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// -// * ErrCodeDuplicateResourceException "DuplicateResourceException" -// The specified resource is a duplicate. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The current limits of the service would have been exceeded by this operation. -// Decrease your resource use or increase your service limits and retry the -// operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateTagOption -func (c *ServiceCatalog) CreateTagOption(input *CreateTagOptionInput) (*CreateTagOptionOutput, error) { - req, out := c.CreateTagOptionRequest(input) - return out, req.Send() -} - -// CreateTagOptionWithContext is the same as CreateTagOption with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTagOption for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) CreateTagOptionWithContext(ctx aws.Context, input *CreateTagOptionInput, opts ...request.Option) (*CreateTagOptionOutput, error) { - req, out := c.CreateTagOptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteConstraint = "DeleteConstraint" - -// DeleteConstraintRequest generates a "aws/request.Request" representing the -// client's request for the DeleteConstraint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteConstraint for more information on using the DeleteConstraint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteConstraintRequest method. -// req, resp := client.DeleteConstraintRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteConstraint -func (c *ServiceCatalog) DeleteConstraintRequest(input *DeleteConstraintInput) (req *request.Request, output *DeleteConstraintOutput) { - op := &request.Operation{ - Name: opDeleteConstraint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteConstraintInput{} - } - - output = &DeleteConstraintOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteConstraint API operation for AWS Service Catalog. -// -// Deletes the specified constraint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DeleteConstraint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteConstraint -func (c *ServiceCatalog) DeleteConstraint(input *DeleteConstraintInput) (*DeleteConstraintOutput, error) { - req, out := c.DeleteConstraintRequest(input) - return out, req.Send() -} - -// DeleteConstraintWithContext is the same as DeleteConstraint with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteConstraint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DeleteConstraintWithContext(ctx aws.Context, input *DeleteConstraintInput, opts ...request.Option) (*DeleteConstraintOutput, error) { - req, out := c.DeleteConstraintRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePortfolio = "DeletePortfolio" - -// DeletePortfolioRequest generates a "aws/request.Request" representing the -// client's request for the DeletePortfolio operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePortfolio for more information on using the DeletePortfolio -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePortfolioRequest method. -// req, resp := client.DeletePortfolioRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeletePortfolio -func (c *ServiceCatalog) DeletePortfolioRequest(input *DeletePortfolioInput) (req *request.Request, output *DeletePortfolioOutput) { - op := &request.Operation{ - Name: opDeletePortfolio, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePortfolioInput{} - } - - output = &DeletePortfolioOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePortfolio API operation for AWS Service Catalog. -// -// Deletes the specified portfolio. -// -// You cannot delete a portfolio if it was shared with you or if it has associated -// products, users, constraints, or shared accounts. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DeletePortfolio for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// A resource that is currently in use. Ensure that the resource is not in use -// and retry the operation. -// -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeletePortfolio -func (c *ServiceCatalog) DeletePortfolio(input *DeletePortfolioInput) (*DeletePortfolioOutput, error) { - req, out := c.DeletePortfolioRequest(input) - return out, req.Send() -} - -// DeletePortfolioWithContext is the same as DeletePortfolio with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePortfolio for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DeletePortfolioWithContext(ctx aws.Context, input *DeletePortfolioInput, opts ...request.Option) (*DeletePortfolioOutput, error) { - req, out := c.DeletePortfolioRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePortfolioShare = "DeletePortfolioShare" - -// DeletePortfolioShareRequest generates a "aws/request.Request" representing the -// client's request for the DeletePortfolioShare operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePortfolioShare for more information on using the DeletePortfolioShare -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePortfolioShareRequest method. -// req, resp := client.DeletePortfolioShareRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeletePortfolioShare -func (c *ServiceCatalog) DeletePortfolioShareRequest(input *DeletePortfolioShareInput) (req *request.Request, output *DeletePortfolioShareOutput) { - op := &request.Operation{ - Name: opDeletePortfolioShare, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePortfolioShareInput{} - } - - output = &DeletePortfolioShareOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeletePortfolioShare API operation for AWS Service Catalog. -// -// Stops sharing the specified portfolio with the specified account or organization -// node. Shares to an organization node can only be deleted by the master account -// of an Organization. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DeletePortfolioShare for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" -// The operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeletePortfolioShare -func (c *ServiceCatalog) DeletePortfolioShare(input *DeletePortfolioShareInput) (*DeletePortfolioShareOutput, error) { - req, out := c.DeletePortfolioShareRequest(input) - return out, req.Send() -} - -// DeletePortfolioShareWithContext is the same as DeletePortfolioShare with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePortfolioShare for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DeletePortfolioShareWithContext(ctx aws.Context, input *DeletePortfolioShareInput, opts ...request.Option) (*DeletePortfolioShareOutput, error) { - req, out := c.DeletePortfolioShareRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteProduct = "DeleteProduct" - -// DeleteProductRequest generates a "aws/request.Request" representing the -// client's request for the DeleteProduct operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteProduct for more information on using the DeleteProduct -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteProductRequest method. -// req, resp := client.DeleteProductRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteProduct -func (c *ServiceCatalog) DeleteProductRequest(input *DeleteProductInput) (req *request.Request, output *DeleteProductOutput) { - op := &request.Operation{ - Name: opDeleteProduct, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteProductInput{} - } - - output = &DeleteProductOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteProduct API operation for AWS Service Catalog. -// -// Deletes the specified product. -// -// You cannot delete a product if it was shared with you or is associated with -// a portfolio. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DeleteProduct for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// A resource that is currently in use. Ensure that the resource is not in use -// and retry the operation. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteProduct -func (c *ServiceCatalog) DeleteProduct(input *DeleteProductInput) (*DeleteProductOutput, error) { - req, out := c.DeleteProductRequest(input) - return out, req.Send() -} - -// DeleteProductWithContext is the same as DeleteProduct with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteProduct for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DeleteProductWithContext(ctx aws.Context, input *DeleteProductInput, opts ...request.Option) (*DeleteProductOutput, error) { - req, out := c.DeleteProductRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteProvisionedProductPlan = "DeleteProvisionedProductPlan" - -// DeleteProvisionedProductPlanRequest generates a "aws/request.Request" representing the -// client's request for the DeleteProvisionedProductPlan operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteProvisionedProductPlan for more information on using the DeleteProvisionedProductPlan -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteProvisionedProductPlanRequest method. -// req, resp := client.DeleteProvisionedProductPlanRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteProvisionedProductPlan -func (c *ServiceCatalog) DeleteProvisionedProductPlanRequest(input *DeleteProvisionedProductPlanInput) (req *request.Request, output *DeleteProvisionedProductPlanOutput) { - op := &request.Operation{ - Name: opDeleteProvisionedProductPlan, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteProvisionedProductPlanInput{} - } - - output = &DeleteProvisionedProductPlanOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteProvisionedProductPlan API operation for AWS Service Catalog. -// -// Deletes the specified plan. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DeleteProvisionedProductPlan for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteProvisionedProductPlan -func (c *ServiceCatalog) DeleteProvisionedProductPlan(input *DeleteProvisionedProductPlanInput) (*DeleteProvisionedProductPlanOutput, error) { - req, out := c.DeleteProvisionedProductPlanRequest(input) - return out, req.Send() -} - -// DeleteProvisionedProductPlanWithContext is the same as DeleteProvisionedProductPlan with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteProvisionedProductPlan for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DeleteProvisionedProductPlanWithContext(ctx aws.Context, input *DeleteProvisionedProductPlanInput, opts ...request.Option) (*DeleteProvisionedProductPlanOutput, error) { - req, out := c.DeleteProvisionedProductPlanRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteProvisioningArtifact = "DeleteProvisioningArtifact" - -// DeleteProvisioningArtifactRequest generates a "aws/request.Request" representing the -// client's request for the DeleteProvisioningArtifact operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteProvisioningArtifact for more information on using the DeleteProvisioningArtifact -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteProvisioningArtifactRequest method. -// req, resp := client.DeleteProvisioningArtifactRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteProvisioningArtifact -func (c *ServiceCatalog) DeleteProvisioningArtifactRequest(input *DeleteProvisioningArtifactInput) (req *request.Request, output *DeleteProvisioningArtifactOutput) { - op := &request.Operation{ - Name: opDeleteProvisioningArtifact, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteProvisioningArtifactInput{} - } - - output = &DeleteProvisioningArtifactOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteProvisioningArtifact API operation for AWS Service Catalog. -// -// Deletes the specified provisioning artifact (also known as a version) for -// the specified product. -// -// You cannot delete a provisioning artifact associated with a product that -// was shared with you. You cannot delete the last provisioning artifact for -// a product, because a product must have at least one provisioning artifact. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DeleteProvisioningArtifact for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// A resource that is currently in use. Ensure that the resource is not in use -// and retry the operation. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteProvisioningArtifact -func (c *ServiceCatalog) DeleteProvisioningArtifact(input *DeleteProvisioningArtifactInput) (*DeleteProvisioningArtifactOutput, error) { - req, out := c.DeleteProvisioningArtifactRequest(input) - return out, req.Send() -} - -// DeleteProvisioningArtifactWithContext is the same as DeleteProvisioningArtifact with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteProvisioningArtifact for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DeleteProvisioningArtifactWithContext(ctx aws.Context, input *DeleteProvisioningArtifactInput, opts ...request.Option) (*DeleteProvisioningArtifactOutput, error) { - req, out := c.DeleteProvisioningArtifactRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteServiceAction = "DeleteServiceAction" - -// DeleteServiceActionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteServiceAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteServiceAction for more information on using the DeleteServiceAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteServiceActionRequest method. -// req, resp := client.DeleteServiceActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteServiceAction -func (c *ServiceCatalog) DeleteServiceActionRequest(input *DeleteServiceActionInput) (req *request.Request, output *DeleteServiceActionOutput) { - op := &request.Operation{ - Name: opDeleteServiceAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteServiceActionInput{} - } - - output = &DeleteServiceActionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteServiceAction API operation for AWS Service Catalog. -// -// Deletes a self-service action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DeleteServiceAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// A resource that is currently in use. Ensure that the resource is not in use -// and retry the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteServiceAction -func (c *ServiceCatalog) DeleteServiceAction(input *DeleteServiceActionInput) (*DeleteServiceActionOutput, error) { - req, out := c.DeleteServiceActionRequest(input) - return out, req.Send() -} - -// DeleteServiceActionWithContext is the same as DeleteServiceAction with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteServiceAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DeleteServiceActionWithContext(ctx aws.Context, input *DeleteServiceActionInput, opts ...request.Option) (*DeleteServiceActionOutput, error) { - req, out := c.DeleteServiceActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTagOption = "DeleteTagOption" - -// DeleteTagOptionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTagOption operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTagOption for more information on using the DeleteTagOption -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTagOptionRequest method. -// req, resp := client.DeleteTagOptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteTagOption -func (c *ServiceCatalog) DeleteTagOptionRequest(input *DeleteTagOptionInput) (req *request.Request, output *DeleteTagOptionOutput) { - op := &request.Operation{ - Name: opDeleteTagOption, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTagOptionInput{} - } - - output = &DeleteTagOptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTagOption API operation for AWS Service Catalog. -// -// Deletes the specified TagOption. -// -// You cannot delete a TagOption if it is associated with a product or portfolio. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DeleteTagOption for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// A resource that is currently in use. Ensure that the resource is not in use -// and retry the operation. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteTagOption -func (c *ServiceCatalog) DeleteTagOption(input *DeleteTagOptionInput) (*DeleteTagOptionOutput, error) { - req, out := c.DeleteTagOptionRequest(input) - return out, req.Send() -} - -// DeleteTagOptionWithContext is the same as DeleteTagOption with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTagOption for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DeleteTagOptionWithContext(ctx aws.Context, input *DeleteTagOptionInput, opts ...request.Option) (*DeleteTagOptionOutput, error) { - req, out := c.DeleteTagOptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConstraint = "DescribeConstraint" - -// DescribeConstraintRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConstraint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConstraint for more information on using the DescribeConstraint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConstraintRequest method. -// req, resp := client.DescribeConstraintRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeConstraint -func (c *ServiceCatalog) DescribeConstraintRequest(input *DescribeConstraintInput) (req *request.Request, output *DescribeConstraintOutput) { - op := &request.Operation{ - Name: opDescribeConstraint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConstraintInput{} - } - - output = &DescribeConstraintOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConstraint API operation for AWS Service Catalog. -// -// Gets information about the specified constraint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DescribeConstraint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeConstraint -func (c *ServiceCatalog) DescribeConstraint(input *DescribeConstraintInput) (*DescribeConstraintOutput, error) { - req, out := c.DescribeConstraintRequest(input) - return out, req.Send() -} - -// DescribeConstraintWithContext is the same as DescribeConstraint with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConstraint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DescribeConstraintWithContext(ctx aws.Context, input *DescribeConstraintInput, opts ...request.Option) (*DescribeConstraintOutput, error) { - req, out := c.DescribeConstraintRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCopyProductStatus = "DescribeCopyProductStatus" - -// DescribeCopyProductStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCopyProductStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCopyProductStatus for more information on using the DescribeCopyProductStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCopyProductStatusRequest method. -// req, resp := client.DescribeCopyProductStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeCopyProductStatus -func (c *ServiceCatalog) DescribeCopyProductStatusRequest(input *DescribeCopyProductStatusInput) (req *request.Request, output *DescribeCopyProductStatusOutput) { - op := &request.Operation{ - Name: opDescribeCopyProductStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCopyProductStatusInput{} - } - - output = &DescribeCopyProductStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCopyProductStatus API operation for AWS Service Catalog. -// -// Gets the status of the specified copy product operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DescribeCopyProductStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeCopyProductStatus -func (c *ServiceCatalog) DescribeCopyProductStatus(input *DescribeCopyProductStatusInput) (*DescribeCopyProductStatusOutput, error) { - req, out := c.DescribeCopyProductStatusRequest(input) - return out, req.Send() -} - -// DescribeCopyProductStatusWithContext is the same as DescribeCopyProductStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCopyProductStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DescribeCopyProductStatusWithContext(ctx aws.Context, input *DescribeCopyProductStatusInput, opts ...request.Option) (*DescribeCopyProductStatusOutput, error) { - req, out := c.DescribeCopyProductStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribePortfolio = "DescribePortfolio" - -// DescribePortfolioRequest generates a "aws/request.Request" representing the -// client's request for the DescribePortfolio operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePortfolio for more information on using the DescribePortfolio -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePortfolioRequest method. -// req, resp := client.DescribePortfolioRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribePortfolio -func (c *ServiceCatalog) DescribePortfolioRequest(input *DescribePortfolioInput) (req *request.Request, output *DescribePortfolioOutput) { - op := &request.Operation{ - Name: opDescribePortfolio, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePortfolioInput{} - } - - output = &DescribePortfolioOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePortfolio API operation for AWS Service Catalog. -// -// Gets information about the specified portfolio. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DescribePortfolio for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribePortfolio -func (c *ServiceCatalog) DescribePortfolio(input *DescribePortfolioInput) (*DescribePortfolioOutput, error) { - req, out := c.DescribePortfolioRequest(input) - return out, req.Send() -} - -// DescribePortfolioWithContext is the same as DescribePortfolio with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePortfolio for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DescribePortfolioWithContext(ctx aws.Context, input *DescribePortfolioInput, opts ...request.Option) (*DescribePortfolioOutput, error) { - req, out := c.DescribePortfolioRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribePortfolioShareStatus = "DescribePortfolioShareStatus" - -// DescribePortfolioShareStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribePortfolioShareStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePortfolioShareStatus for more information on using the DescribePortfolioShareStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePortfolioShareStatusRequest method. -// req, resp := client.DescribePortfolioShareStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribePortfolioShareStatus -func (c *ServiceCatalog) DescribePortfolioShareStatusRequest(input *DescribePortfolioShareStatusInput) (req *request.Request, output *DescribePortfolioShareStatusOutput) { - op := &request.Operation{ - Name: opDescribePortfolioShareStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePortfolioShareStatusInput{} - } - - output = &DescribePortfolioShareStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePortfolioShareStatus API operation for AWS Service Catalog. -// -// Gets the status of the specified portfolio share operation. This API can -// only be called by the master account in the organization. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DescribePortfolioShareStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" -// The operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribePortfolioShareStatus -func (c *ServiceCatalog) DescribePortfolioShareStatus(input *DescribePortfolioShareStatusInput) (*DescribePortfolioShareStatusOutput, error) { - req, out := c.DescribePortfolioShareStatusRequest(input) - return out, req.Send() -} - -// DescribePortfolioShareStatusWithContext is the same as DescribePortfolioShareStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePortfolioShareStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DescribePortfolioShareStatusWithContext(ctx aws.Context, input *DescribePortfolioShareStatusInput, opts ...request.Option) (*DescribePortfolioShareStatusOutput, error) { - req, out := c.DescribePortfolioShareStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeProduct = "DescribeProduct" - -// DescribeProductRequest generates a "aws/request.Request" representing the -// client's request for the DescribeProduct operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeProduct for more information on using the DescribeProduct -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeProductRequest method. -// req, resp := client.DescribeProductRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProduct -func (c *ServiceCatalog) DescribeProductRequest(input *DescribeProductInput) (req *request.Request, output *DescribeProductOutput) { - op := &request.Operation{ - Name: opDescribeProduct, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeProductInput{} - } - - output = &DescribeProductOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeProduct API operation for AWS Service Catalog. -// -// Gets information about the specified product. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DescribeProduct for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProduct -func (c *ServiceCatalog) DescribeProduct(input *DescribeProductInput) (*DescribeProductOutput, error) { - req, out := c.DescribeProductRequest(input) - return out, req.Send() -} - -// DescribeProductWithContext is the same as DescribeProduct with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeProduct for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DescribeProductWithContext(ctx aws.Context, input *DescribeProductInput, opts ...request.Option) (*DescribeProductOutput, error) { - req, out := c.DescribeProductRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeProductAsAdmin = "DescribeProductAsAdmin" - -// DescribeProductAsAdminRequest generates a "aws/request.Request" representing the -// client's request for the DescribeProductAsAdmin operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeProductAsAdmin for more information on using the DescribeProductAsAdmin -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeProductAsAdminRequest method. -// req, resp := client.DescribeProductAsAdminRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProductAsAdmin -func (c *ServiceCatalog) DescribeProductAsAdminRequest(input *DescribeProductAsAdminInput) (req *request.Request, output *DescribeProductAsAdminOutput) { - op := &request.Operation{ - Name: opDescribeProductAsAdmin, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeProductAsAdminInput{} - } - - output = &DescribeProductAsAdminOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeProductAsAdmin API operation for AWS Service Catalog. -// -// Gets information about the specified product. This operation is run with -// administrator access. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DescribeProductAsAdmin for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProductAsAdmin -func (c *ServiceCatalog) DescribeProductAsAdmin(input *DescribeProductAsAdminInput) (*DescribeProductAsAdminOutput, error) { - req, out := c.DescribeProductAsAdminRequest(input) - return out, req.Send() -} - -// DescribeProductAsAdminWithContext is the same as DescribeProductAsAdmin with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeProductAsAdmin for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DescribeProductAsAdminWithContext(ctx aws.Context, input *DescribeProductAsAdminInput, opts ...request.Option) (*DescribeProductAsAdminOutput, error) { - req, out := c.DescribeProductAsAdminRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeProductView = "DescribeProductView" - -// DescribeProductViewRequest generates a "aws/request.Request" representing the -// client's request for the DescribeProductView operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeProductView for more information on using the DescribeProductView -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeProductViewRequest method. -// req, resp := client.DescribeProductViewRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProductView -func (c *ServiceCatalog) DescribeProductViewRequest(input *DescribeProductViewInput) (req *request.Request, output *DescribeProductViewOutput) { - op := &request.Operation{ - Name: opDescribeProductView, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeProductViewInput{} - } - - output = &DescribeProductViewOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeProductView API operation for AWS Service Catalog. -// -// Gets information about the specified product. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DescribeProductView for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProductView -func (c *ServiceCatalog) DescribeProductView(input *DescribeProductViewInput) (*DescribeProductViewOutput, error) { - req, out := c.DescribeProductViewRequest(input) - return out, req.Send() -} - -// DescribeProductViewWithContext is the same as DescribeProductView with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeProductView for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DescribeProductViewWithContext(ctx aws.Context, input *DescribeProductViewInput, opts ...request.Option) (*DescribeProductViewOutput, error) { - req, out := c.DescribeProductViewRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeProvisionedProduct = "DescribeProvisionedProduct" - -// DescribeProvisionedProductRequest generates a "aws/request.Request" representing the -// client's request for the DescribeProvisionedProduct operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeProvisionedProduct for more information on using the DescribeProvisionedProduct -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeProvisionedProductRequest method. -// req, resp := client.DescribeProvisionedProductRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisionedProduct -func (c *ServiceCatalog) DescribeProvisionedProductRequest(input *DescribeProvisionedProductInput) (req *request.Request, output *DescribeProvisionedProductOutput) { - op := &request.Operation{ - Name: opDescribeProvisionedProduct, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeProvisionedProductInput{} - } - - output = &DescribeProvisionedProductOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeProvisionedProduct API operation for AWS Service Catalog. -// -// Gets information about the specified provisioned product. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DescribeProvisionedProduct for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisionedProduct -func (c *ServiceCatalog) DescribeProvisionedProduct(input *DescribeProvisionedProductInput) (*DescribeProvisionedProductOutput, error) { - req, out := c.DescribeProvisionedProductRequest(input) - return out, req.Send() -} - -// DescribeProvisionedProductWithContext is the same as DescribeProvisionedProduct with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeProvisionedProduct for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DescribeProvisionedProductWithContext(ctx aws.Context, input *DescribeProvisionedProductInput, opts ...request.Option) (*DescribeProvisionedProductOutput, error) { - req, out := c.DescribeProvisionedProductRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeProvisionedProductPlan = "DescribeProvisionedProductPlan" - -// DescribeProvisionedProductPlanRequest generates a "aws/request.Request" representing the -// client's request for the DescribeProvisionedProductPlan operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeProvisionedProductPlan for more information on using the DescribeProvisionedProductPlan -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeProvisionedProductPlanRequest method. -// req, resp := client.DescribeProvisionedProductPlanRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisionedProductPlan -func (c *ServiceCatalog) DescribeProvisionedProductPlanRequest(input *DescribeProvisionedProductPlanInput) (req *request.Request, output *DescribeProvisionedProductPlanOutput) { - op := &request.Operation{ - Name: opDescribeProvisionedProductPlan, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeProvisionedProductPlanInput{} - } - - output = &DescribeProvisionedProductPlanOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeProvisionedProductPlan API operation for AWS Service Catalog. -// -// Gets information about the resource changes for the specified plan. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DescribeProvisionedProductPlan for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisionedProductPlan -func (c *ServiceCatalog) DescribeProvisionedProductPlan(input *DescribeProvisionedProductPlanInput) (*DescribeProvisionedProductPlanOutput, error) { - req, out := c.DescribeProvisionedProductPlanRequest(input) - return out, req.Send() -} - -// DescribeProvisionedProductPlanWithContext is the same as DescribeProvisionedProductPlan with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeProvisionedProductPlan for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DescribeProvisionedProductPlanWithContext(ctx aws.Context, input *DescribeProvisionedProductPlanInput, opts ...request.Option) (*DescribeProvisionedProductPlanOutput, error) { - req, out := c.DescribeProvisionedProductPlanRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeProvisioningArtifact = "DescribeProvisioningArtifact" - -// DescribeProvisioningArtifactRequest generates a "aws/request.Request" representing the -// client's request for the DescribeProvisioningArtifact operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeProvisioningArtifact for more information on using the DescribeProvisioningArtifact -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeProvisioningArtifactRequest method. -// req, resp := client.DescribeProvisioningArtifactRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisioningArtifact -func (c *ServiceCatalog) DescribeProvisioningArtifactRequest(input *DescribeProvisioningArtifactInput) (req *request.Request, output *DescribeProvisioningArtifactOutput) { - op := &request.Operation{ - Name: opDescribeProvisioningArtifact, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeProvisioningArtifactInput{} - } - - output = &DescribeProvisioningArtifactOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeProvisioningArtifact API operation for AWS Service Catalog. -// -// Gets information about the specified provisioning artifact (also known as -// a version) for the specified product. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DescribeProvisioningArtifact for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisioningArtifact -func (c *ServiceCatalog) DescribeProvisioningArtifact(input *DescribeProvisioningArtifactInput) (*DescribeProvisioningArtifactOutput, error) { - req, out := c.DescribeProvisioningArtifactRequest(input) - return out, req.Send() -} - -// DescribeProvisioningArtifactWithContext is the same as DescribeProvisioningArtifact with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeProvisioningArtifact for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DescribeProvisioningArtifactWithContext(ctx aws.Context, input *DescribeProvisioningArtifactInput, opts ...request.Option) (*DescribeProvisioningArtifactOutput, error) { - req, out := c.DescribeProvisioningArtifactRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeProvisioningParameters = "DescribeProvisioningParameters" - -// DescribeProvisioningParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeProvisioningParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeProvisioningParameters for more information on using the DescribeProvisioningParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeProvisioningParametersRequest method. -// req, resp := client.DescribeProvisioningParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisioningParameters -func (c *ServiceCatalog) DescribeProvisioningParametersRequest(input *DescribeProvisioningParametersInput) (req *request.Request, output *DescribeProvisioningParametersOutput) { - op := &request.Operation{ - Name: opDescribeProvisioningParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeProvisioningParametersInput{} - } - - output = &DescribeProvisioningParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeProvisioningParameters API operation for AWS Service Catalog. -// -// Gets information about the configuration required to provision the specified -// product using the specified provisioning artifact. -// -// If the output contains a TagOption key with an empty list of values, there -// is a TagOption conflict for that key. The end user cannot take action to -// fix the conflict, and launch is not blocked. In subsequent calls to ProvisionProduct, -// do not include conflicted TagOption keys as tags, or this causes the error -// "Parameter validation failed: Missing required parameter in Tags[N]:Value". -// Tag the provisioned product with the value sc-tagoption-conflict-portfolioId-productId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DescribeProvisioningParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisioningParameters -func (c *ServiceCatalog) DescribeProvisioningParameters(input *DescribeProvisioningParametersInput) (*DescribeProvisioningParametersOutput, error) { - req, out := c.DescribeProvisioningParametersRequest(input) - return out, req.Send() -} - -// DescribeProvisioningParametersWithContext is the same as DescribeProvisioningParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeProvisioningParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DescribeProvisioningParametersWithContext(ctx aws.Context, input *DescribeProvisioningParametersInput, opts ...request.Option) (*DescribeProvisioningParametersOutput, error) { - req, out := c.DescribeProvisioningParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeRecord = "DescribeRecord" - -// DescribeRecordRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRecord operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeRecord for more information on using the DescribeRecord -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeRecordRequest method. -// req, resp := client.DescribeRecordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeRecord -func (c *ServiceCatalog) DescribeRecordRequest(input *DescribeRecordInput) (req *request.Request, output *DescribeRecordOutput) { - op := &request.Operation{ - Name: opDescribeRecord, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeRecordInput{} - } - - output = &DescribeRecordOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRecord API operation for AWS Service Catalog. -// -// Gets information about the specified request operation. -// -// Use this operation after calling a request operation (for example, ProvisionProduct, -// TerminateProvisionedProduct, or UpdateProvisionedProduct). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DescribeRecord for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeRecord -func (c *ServiceCatalog) DescribeRecord(input *DescribeRecordInput) (*DescribeRecordOutput, error) { - req, out := c.DescribeRecordRequest(input) - return out, req.Send() -} - -// DescribeRecordWithContext is the same as DescribeRecord with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRecord for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DescribeRecordWithContext(ctx aws.Context, input *DescribeRecordInput, opts ...request.Option) (*DescribeRecordOutput, error) { - req, out := c.DescribeRecordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeServiceAction = "DescribeServiceAction" - -// DescribeServiceActionRequest generates a "aws/request.Request" representing the -// client's request for the DescribeServiceAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeServiceAction for more information on using the DescribeServiceAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeServiceActionRequest method. -// req, resp := client.DescribeServiceActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeServiceAction -func (c *ServiceCatalog) DescribeServiceActionRequest(input *DescribeServiceActionInput) (req *request.Request, output *DescribeServiceActionOutput) { - op := &request.Operation{ - Name: opDescribeServiceAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeServiceActionInput{} - } - - output = &DescribeServiceActionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeServiceAction API operation for AWS Service Catalog. -// -// Describes a self-service action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DescribeServiceAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeServiceAction -func (c *ServiceCatalog) DescribeServiceAction(input *DescribeServiceActionInput) (*DescribeServiceActionOutput, error) { - req, out := c.DescribeServiceActionRequest(input) - return out, req.Send() -} - -// DescribeServiceActionWithContext is the same as DescribeServiceAction with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeServiceAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DescribeServiceActionWithContext(ctx aws.Context, input *DescribeServiceActionInput, opts ...request.Option) (*DescribeServiceActionOutput, error) { - req, out := c.DescribeServiceActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTagOption = "DescribeTagOption" - -// DescribeTagOptionRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTagOption operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTagOption for more information on using the DescribeTagOption -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTagOptionRequest method. -// req, resp := client.DescribeTagOptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeTagOption -func (c *ServiceCatalog) DescribeTagOptionRequest(input *DescribeTagOptionInput) (req *request.Request, output *DescribeTagOptionOutput) { - op := &request.Operation{ - Name: opDescribeTagOption, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTagOptionInput{} - } - - output = &DescribeTagOptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTagOption API operation for AWS Service Catalog. -// -// Gets information about the specified TagOption. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DescribeTagOption for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeTagOption -func (c *ServiceCatalog) DescribeTagOption(input *DescribeTagOptionInput) (*DescribeTagOptionOutput, error) { - req, out := c.DescribeTagOptionRequest(input) - return out, req.Send() -} - -// DescribeTagOptionWithContext is the same as DescribeTagOption with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTagOption for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DescribeTagOptionWithContext(ctx aws.Context, input *DescribeTagOptionInput, opts ...request.Option) (*DescribeTagOptionOutput, error) { - req, out := c.DescribeTagOptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableAWSOrganizationsAccess = "DisableAWSOrganizationsAccess" - -// DisableAWSOrganizationsAccessRequest generates a "aws/request.Request" representing the -// client's request for the DisableAWSOrganizationsAccess operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableAWSOrganizationsAccess for more information on using the DisableAWSOrganizationsAccess -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableAWSOrganizationsAccessRequest method. -// req, resp := client.DisableAWSOrganizationsAccessRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisableAWSOrganizationsAccess -func (c *ServiceCatalog) DisableAWSOrganizationsAccessRequest(input *DisableAWSOrganizationsAccessInput) (req *request.Request, output *DisableAWSOrganizationsAccessOutput) { - op := &request.Operation{ - Name: opDisableAWSOrganizationsAccess, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableAWSOrganizationsAccessInput{} - } - - output = &DisableAWSOrganizationsAccessOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisableAWSOrganizationsAccess API operation for AWS Service Catalog. -// -// Disable portfolio sharing through AWS Organizations feature. This feature -// will not delete your current shares but it will prevent you from creating -// new shares throughout your organization. Current shares will not be in sync -// with your organization structure if it changes after calling this API. This -// API can only be called by the master account in the organization. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DisableAWSOrganizationsAccess for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// An attempt was made to modify a resource that is in a state that is not valid. -// Check your resources to ensure that they are in valid states before retrying -// the operation. -// -// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" -// The operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisableAWSOrganizationsAccess -func (c *ServiceCatalog) DisableAWSOrganizationsAccess(input *DisableAWSOrganizationsAccessInput) (*DisableAWSOrganizationsAccessOutput, error) { - req, out := c.DisableAWSOrganizationsAccessRequest(input) - return out, req.Send() -} - -// DisableAWSOrganizationsAccessWithContext is the same as DisableAWSOrganizationsAccess with the addition of -// the ability to pass a context and additional request options. -// -// See DisableAWSOrganizationsAccess for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DisableAWSOrganizationsAccessWithContext(ctx aws.Context, input *DisableAWSOrganizationsAccessInput, opts ...request.Option) (*DisableAWSOrganizationsAccessOutput, error) { - req, out := c.DisableAWSOrganizationsAccessRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociatePrincipalFromPortfolio = "DisassociatePrincipalFromPortfolio" - -// DisassociatePrincipalFromPortfolioRequest generates a "aws/request.Request" representing the -// client's request for the DisassociatePrincipalFromPortfolio operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociatePrincipalFromPortfolio for more information on using the DisassociatePrincipalFromPortfolio -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociatePrincipalFromPortfolioRequest method. -// req, resp := client.DisassociatePrincipalFromPortfolioRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociatePrincipalFromPortfolio -func (c *ServiceCatalog) DisassociatePrincipalFromPortfolioRequest(input *DisassociatePrincipalFromPortfolioInput) (req *request.Request, output *DisassociatePrincipalFromPortfolioOutput) { - op := &request.Operation{ - Name: opDisassociatePrincipalFromPortfolio, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociatePrincipalFromPortfolioInput{} - } - - output = &DisassociatePrincipalFromPortfolioOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociatePrincipalFromPortfolio API operation for AWS Service Catalog. -// -// Disassociates a previously associated principal ARN from a specified portfolio. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DisassociatePrincipalFromPortfolio for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociatePrincipalFromPortfolio -func (c *ServiceCatalog) DisassociatePrincipalFromPortfolio(input *DisassociatePrincipalFromPortfolioInput) (*DisassociatePrincipalFromPortfolioOutput, error) { - req, out := c.DisassociatePrincipalFromPortfolioRequest(input) - return out, req.Send() -} - -// DisassociatePrincipalFromPortfolioWithContext is the same as DisassociatePrincipalFromPortfolio with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociatePrincipalFromPortfolio for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DisassociatePrincipalFromPortfolioWithContext(ctx aws.Context, input *DisassociatePrincipalFromPortfolioInput, opts ...request.Option) (*DisassociatePrincipalFromPortfolioOutput, error) { - req, out := c.DisassociatePrincipalFromPortfolioRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateProductFromPortfolio = "DisassociateProductFromPortfolio" - -// DisassociateProductFromPortfolioRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateProductFromPortfolio operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateProductFromPortfolio for more information on using the DisassociateProductFromPortfolio -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateProductFromPortfolioRequest method. -// req, resp := client.DisassociateProductFromPortfolioRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateProductFromPortfolio -func (c *ServiceCatalog) DisassociateProductFromPortfolioRequest(input *DisassociateProductFromPortfolioInput) (req *request.Request, output *DisassociateProductFromPortfolioOutput) { - op := &request.Operation{ - Name: opDisassociateProductFromPortfolio, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateProductFromPortfolioInput{} - } - - output = &DisassociateProductFromPortfolioOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateProductFromPortfolio API operation for AWS Service Catalog. -// -// Disassociates the specified product from the specified portfolio. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DisassociateProductFromPortfolio for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// A resource that is currently in use. Ensure that the resource is not in use -// and retry the operation. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateProductFromPortfolio -func (c *ServiceCatalog) DisassociateProductFromPortfolio(input *DisassociateProductFromPortfolioInput) (*DisassociateProductFromPortfolioOutput, error) { - req, out := c.DisassociateProductFromPortfolioRequest(input) - return out, req.Send() -} - -// DisassociateProductFromPortfolioWithContext is the same as DisassociateProductFromPortfolio with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateProductFromPortfolio for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DisassociateProductFromPortfolioWithContext(ctx aws.Context, input *DisassociateProductFromPortfolioInput, opts ...request.Option) (*DisassociateProductFromPortfolioOutput, error) { - req, out := c.DisassociateProductFromPortfolioRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateServiceActionFromProvisioningArtifact = "DisassociateServiceActionFromProvisioningArtifact" - -// DisassociateServiceActionFromProvisioningArtifactRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateServiceActionFromProvisioningArtifact operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateServiceActionFromProvisioningArtifact for more information on using the DisassociateServiceActionFromProvisioningArtifact -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateServiceActionFromProvisioningArtifactRequest method. -// req, resp := client.DisassociateServiceActionFromProvisioningArtifactRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateServiceActionFromProvisioningArtifact -func (c *ServiceCatalog) DisassociateServiceActionFromProvisioningArtifactRequest(input *DisassociateServiceActionFromProvisioningArtifactInput) (req *request.Request, output *DisassociateServiceActionFromProvisioningArtifactOutput) { - op := &request.Operation{ - Name: opDisassociateServiceActionFromProvisioningArtifact, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateServiceActionFromProvisioningArtifactInput{} - } - - output = &DisassociateServiceActionFromProvisioningArtifactOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateServiceActionFromProvisioningArtifact API operation for AWS Service Catalog. -// -// Disassociates the specified self-service action association from the specified -// provisioning artifact. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DisassociateServiceActionFromProvisioningArtifact for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateServiceActionFromProvisioningArtifact -func (c *ServiceCatalog) DisassociateServiceActionFromProvisioningArtifact(input *DisassociateServiceActionFromProvisioningArtifactInput) (*DisassociateServiceActionFromProvisioningArtifactOutput, error) { - req, out := c.DisassociateServiceActionFromProvisioningArtifactRequest(input) - return out, req.Send() -} - -// DisassociateServiceActionFromProvisioningArtifactWithContext is the same as DisassociateServiceActionFromProvisioningArtifact with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateServiceActionFromProvisioningArtifact for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DisassociateServiceActionFromProvisioningArtifactWithContext(ctx aws.Context, input *DisassociateServiceActionFromProvisioningArtifactInput, opts ...request.Option) (*DisassociateServiceActionFromProvisioningArtifactOutput, error) { - req, out := c.DisassociateServiceActionFromProvisioningArtifactRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateTagOptionFromResource = "DisassociateTagOptionFromResource" - -// DisassociateTagOptionFromResourceRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateTagOptionFromResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateTagOptionFromResource for more information on using the DisassociateTagOptionFromResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateTagOptionFromResourceRequest method. -// req, resp := client.DisassociateTagOptionFromResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateTagOptionFromResource -func (c *ServiceCatalog) DisassociateTagOptionFromResourceRequest(input *DisassociateTagOptionFromResourceInput) (req *request.Request, output *DisassociateTagOptionFromResourceOutput) { - op := &request.Operation{ - Name: opDisassociateTagOptionFromResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateTagOptionFromResourceInput{} - } - - output = &DisassociateTagOptionFromResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateTagOptionFromResource API operation for AWS Service Catalog. -// -// Disassociates the specified TagOption from the specified resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation DisassociateTagOptionFromResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateTagOptionFromResource -func (c *ServiceCatalog) DisassociateTagOptionFromResource(input *DisassociateTagOptionFromResourceInput) (*DisassociateTagOptionFromResourceOutput, error) { - req, out := c.DisassociateTagOptionFromResourceRequest(input) - return out, req.Send() -} - -// DisassociateTagOptionFromResourceWithContext is the same as DisassociateTagOptionFromResource with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateTagOptionFromResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) DisassociateTagOptionFromResourceWithContext(ctx aws.Context, input *DisassociateTagOptionFromResourceInput, opts ...request.Option) (*DisassociateTagOptionFromResourceOutput, error) { - req, out := c.DisassociateTagOptionFromResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableAWSOrganizationsAccess = "EnableAWSOrganizationsAccess" - -// EnableAWSOrganizationsAccessRequest generates a "aws/request.Request" representing the -// client's request for the EnableAWSOrganizationsAccess operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableAWSOrganizationsAccess for more information on using the EnableAWSOrganizationsAccess -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the EnableAWSOrganizationsAccessRequest method. -// req, resp := client.EnableAWSOrganizationsAccessRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/EnableAWSOrganizationsAccess -func (c *ServiceCatalog) EnableAWSOrganizationsAccessRequest(input *EnableAWSOrganizationsAccessInput) (req *request.Request, output *EnableAWSOrganizationsAccessOutput) { - op := &request.Operation{ - Name: opEnableAWSOrganizationsAccess, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableAWSOrganizationsAccessInput{} - } - - output = &EnableAWSOrganizationsAccessOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableAWSOrganizationsAccess API operation for AWS Service Catalog. -// -// Enable portfolio sharing feature through AWS Organizations. This API will -// allow Service Catalog to receive updates on your organization in order to -// sync your shares with the current structure. This API can only be called -// by the master account in the organization. -// -// By calling this API Service Catalog will make a call to organizations:EnableAWSServiceAccess -// on your behalf so that your shares can be in sync with any changes in your -// AWS Organizations structure. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation EnableAWSOrganizationsAccess for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// An attempt was made to modify a resource that is in a state that is not valid. -// Check your resources to ensure that they are in valid states before retrying -// the operation. -// -// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" -// The operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/EnableAWSOrganizationsAccess -func (c *ServiceCatalog) EnableAWSOrganizationsAccess(input *EnableAWSOrganizationsAccessInput) (*EnableAWSOrganizationsAccessOutput, error) { - req, out := c.EnableAWSOrganizationsAccessRequest(input) - return out, req.Send() -} - -// EnableAWSOrganizationsAccessWithContext is the same as EnableAWSOrganizationsAccess with the addition of -// the ability to pass a context and additional request options. -// -// See EnableAWSOrganizationsAccess for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) EnableAWSOrganizationsAccessWithContext(ctx aws.Context, input *EnableAWSOrganizationsAccessInput, opts ...request.Option) (*EnableAWSOrganizationsAccessOutput, error) { - req, out := c.EnableAWSOrganizationsAccessRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opExecuteProvisionedProductPlan = "ExecuteProvisionedProductPlan" - -// ExecuteProvisionedProductPlanRequest generates a "aws/request.Request" representing the -// client's request for the ExecuteProvisionedProductPlan operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ExecuteProvisionedProductPlan for more information on using the ExecuteProvisionedProductPlan -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ExecuteProvisionedProductPlanRequest method. -// req, resp := client.ExecuteProvisionedProductPlanRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ExecuteProvisionedProductPlan -func (c *ServiceCatalog) ExecuteProvisionedProductPlanRequest(input *ExecuteProvisionedProductPlanInput) (req *request.Request, output *ExecuteProvisionedProductPlanOutput) { - op := &request.Operation{ - Name: opExecuteProvisionedProductPlan, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ExecuteProvisionedProductPlanInput{} - } - - output = &ExecuteProvisionedProductPlanOutput{} - req = c.newRequest(op, input, output) - return -} - -// ExecuteProvisionedProductPlan API operation for AWS Service Catalog. -// -// Provisions or modifies a product based on the resource changes for the specified -// plan. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ExecuteProvisionedProductPlan for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// An attempt was made to modify a resource that is in a state that is not valid. -// Check your resources to ensure that they are in valid states before retrying -// the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ExecuteProvisionedProductPlan -func (c *ServiceCatalog) ExecuteProvisionedProductPlan(input *ExecuteProvisionedProductPlanInput) (*ExecuteProvisionedProductPlanOutput, error) { - req, out := c.ExecuteProvisionedProductPlanRequest(input) - return out, req.Send() -} - -// ExecuteProvisionedProductPlanWithContext is the same as ExecuteProvisionedProductPlan with the addition of -// the ability to pass a context and additional request options. -// -// See ExecuteProvisionedProductPlan for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ExecuteProvisionedProductPlanWithContext(ctx aws.Context, input *ExecuteProvisionedProductPlanInput, opts ...request.Option) (*ExecuteProvisionedProductPlanOutput, error) { - req, out := c.ExecuteProvisionedProductPlanRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opExecuteProvisionedProductServiceAction = "ExecuteProvisionedProductServiceAction" - -// ExecuteProvisionedProductServiceActionRequest generates a "aws/request.Request" representing the -// client's request for the ExecuteProvisionedProductServiceAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ExecuteProvisionedProductServiceAction for more information on using the ExecuteProvisionedProductServiceAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ExecuteProvisionedProductServiceActionRequest method. -// req, resp := client.ExecuteProvisionedProductServiceActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ExecuteProvisionedProductServiceAction -func (c *ServiceCatalog) ExecuteProvisionedProductServiceActionRequest(input *ExecuteProvisionedProductServiceActionInput) (req *request.Request, output *ExecuteProvisionedProductServiceActionOutput) { - op := &request.Operation{ - Name: opExecuteProvisionedProductServiceAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ExecuteProvisionedProductServiceActionInput{} - } - - output = &ExecuteProvisionedProductServiceActionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ExecuteProvisionedProductServiceAction API operation for AWS Service Catalog. -// -// Executes a self-service action against a provisioned product. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ExecuteProvisionedProductServiceAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidStateException "InvalidStateException" -// An attempt was made to modify a resource that is in a state that is not valid. -// Check your resources to ensure that they are in valid states before retrying -// the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ExecuteProvisionedProductServiceAction -func (c *ServiceCatalog) ExecuteProvisionedProductServiceAction(input *ExecuteProvisionedProductServiceActionInput) (*ExecuteProvisionedProductServiceActionOutput, error) { - req, out := c.ExecuteProvisionedProductServiceActionRequest(input) - return out, req.Send() -} - -// ExecuteProvisionedProductServiceActionWithContext is the same as ExecuteProvisionedProductServiceAction with the addition of -// the ability to pass a context and additional request options. -// -// See ExecuteProvisionedProductServiceAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ExecuteProvisionedProductServiceActionWithContext(ctx aws.Context, input *ExecuteProvisionedProductServiceActionInput, opts ...request.Option) (*ExecuteProvisionedProductServiceActionOutput, error) { - req, out := c.ExecuteProvisionedProductServiceActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAWSOrganizationsAccessStatus = "GetAWSOrganizationsAccessStatus" - -// GetAWSOrganizationsAccessStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetAWSOrganizationsAccessStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAWSOrganizationsAccessStatus for more information on using the GetAWSOrganizationsAccessStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAWSOrganizationsAccessStatusRequest method. -// req, resp := client.GetAWSOrganizationsAccessStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/GetAWSOrganizationsAccessStatus -func (c *ServiceCatalog) GetAWSOrganizationsAccessStatusRequest(input *GetAWSOrganizationsAccessStatusInput) (req *request.Request, output *GetAWSOrganizationsAccessStatusOutput) { - op := &request.Operation{ - Name: opGetAWSOrganizationsAccessStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAWSOrganizationsAccessStatusInput{} - } - - output = &GetAWSOrganizationsAccessStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAWSOrganizationsAccessStatus API operation for AWS Service Catalog. -// -// Get the Access Status for AWS Organization portfolio share feature. This -// API can only be called by the master account in the organization. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation GetAWSOrganizationsAccessStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" -// The operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/GetAWSOrganizationsAccessStatus -func (c *ServiceCatalog) GetAWSOrganizationsAccessStatus(input *GetAWSOrganizationsAccessStatusInput) (*GetAWSOrganizationsAccessStatusOutput, error) { - req, out := c.GetAWSOrganizationsAccessStatusRequest(input) - return out, req.Send() -} - -// GetAWSOrganizationsAccessStatusWithContext is the same as GetAWSOrganizationsAccessStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetAWSOrganizationsAccessStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) GetAWSOrganizationsAccessStatusWithContext(ctx aws.Context, input *GetAWSOrganizationsAccessStatusInput, opts ...request.Option) (*GetAWSOrganizationsAccessStatusOutput, error) { - req, out := c.GetAWSOrganizationsAccessStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAcceptedPortfolioShares = "ListAcceptedPortfolioShares" - -// ListAcceptedPortfolioSharesRequest generates a "aws/request.Request" representing the -// client's request for the ListAcceptedPortfolioShares operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAcceptedPortfolioShares for more information on using the ListAcceptedPortfolioShares -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAcceptedPortfolioSharesRequest method. -// req, resp := client.ListAcceptedPortfolioSharesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListAcceptedPortfolioShares -func (c *ServiceCatalog) ListAcceptedPortfolioSharesRequest(input *ListAcceptedPortfolioSharesInput) (req *request.Request, output *ListAcceptedPortfolioSharesOutput) { - op := &request.Operation{ - Name: opListAcceptedPortfolioShares, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListAcceptedPortfolioSharesInput{} - } - - output = &ListAcceptedPortfolioSharesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAcceptedPortfolioShares API operation for AWS Service Catalog. -// -// Lists all portfolios for which sharing was accepted by this account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListAcceptedPortfolioShares for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" -// The operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListAcceptedPortfolioShares -func (c *ServiceCatalog) ListAcceptedPortfolioShares(input *ListAcceptedPortfolioSharesInput) (*ListAcceptedPortfolioSharesOutput, error) { - req, out := c.ListAcceptedPortfolioSharesRequest(input) - return out, req.Send() -} - -// ListAcceptedPortfolioSharesWithContext is the same as ListAcceptedPortfolioShares with the addition of -// the ability to pass a context and additional request options. -// -// See ListAcceptedPortfolioShares for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListAcceptedPortfolioSharesWithContext(ctx aws.Context, input *ListAcceptedPortfolioSharesInput, opts ...request.Option) (*ListAcceptedPortfolioSharesOutput, error) { - req, out := c.ListAcceptedPortfolioSharesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAcceptedPortfolioSharesPages iterates over the pages of a ListAcceptedPortfolioShares operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAcceptedPortfolioShares 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 ListAcceptedPortfolioShares operation. -// pageNum := 0 -// err := client.ListAcceptedPortfolioSharesPages(params, -// func(page *ListAcceptedPortfolioSharesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) ListAcceptedPortfolioSharesPages(input *ListAcceptedPortfolioSharesInput, fn func(*ListAcceptedPortfolioSharesOutput, bool) bool) error { - return c.ListAcceptedPortfolioSharesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAcceptedPortfolioSharesPagesWithContext same as ListAcceptedPortfolioSharesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListAcceptedPortfolioSharesPagesWithContext(ctx aws.Context, input *ListAcceptedPortfolioSharesInput, fn func(*ListAcceptedPortfolioSharesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAcceptedPortfolioSharesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAcceptedPortfolioSharesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAcceptedPortfolioSharesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListConstraintsForPortfolio = "ListConstraintsForPortfolio" - -// ListConstraintsForPortfolioRequest generates a "aws/request.Request" representing the -// client's request for the ListConstraintsForPortfolio operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListConstraintsForPortfolio for more information on using the ListConstraintsForPortfolio -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListConstraintsForPortfolioRequest method. -// req, resp := client.ListConstraintsForPortfolioRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListConstraintsForPortfolio -func (c *ServiceCatalog) ListConstraintsForPortfolioRequest(input *ListConstraintsForPortfolioInput) (req *request.Request, output *ListConstraintsForPortfolioOutput) { - op := &request.Operation{ - Name: opListConstraintsForPortfolio, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListConstraintsForPortfolioInput{} - } - - output = &ListConstraintsForPortfolioOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListConstraintsForPortfolio API operation for AWS Service Catalog. -// -// Lists the constraints for the specified portfolio and product. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListConstraintsForPortfolio for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListConstraintsForPortfolio -func (c *ServiceCatalog) ListConstraintsForPortfolio(input *ListConstraintsForPortfolioInput) (*ListConstraintsForPortfolioOutput, error) { - req, out := c.ListConstraintsForPortfolioRequest(input) - return out, req.Send() -} - -// ListConstraintsForPortfolioWithContext is the same as ListConstraintsForPortfolio with the addition of -// the ability to pass a context and additional request options. -// -// See ListConstraintsForPortfolio for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListConstraintsForPortfolioWithContext(ctx aws.Context, input *ListConstraintsForPortfolioInput, opts ...request.Option) (*ListConstraintsForPortfolioOutput, error) { - req, out := c.ListConstraintsForPortfolioRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListConstraintsForPortfolioPages iterates over the pages of a ListConstraintsForPortfolio operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListConstraintsForPortfolio 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 ListConstraintsForPortfolio operation. -// pageNum := 0 -// err := client.ListConstraintsForPortfolioPages(params, -// func(page *ListConstraintsForPortfolioOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) ListConstraintsForPortfolioPages(input *ListConstraintsForPortfolioInput, fn func(*ListConstraintsForPortfolioOutput, bool) bool) error { - return c.ListConstraintsForPortfolioPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListConstraintsForPortfolioPagesWithContext same as ListConstraintsForPortfolioPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListConstraintsForPortfolioPagesWithContext(ctx aws.Context, input *ListConstraintsForPortfolioInput, fn func(*ListConstraintsForPortfolioOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListConstraintsForPortfolioInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListConstraintsForPortfolioRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListConstraintsForPortfolioOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListLaunchPaths = "ListLaunchPaths" - -// ListLaunchPathsRequest generates a "aws/request.Request" representing the -// client's request for the ListLaunchPaths operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListLaunchPaths for more information on using the ListLaunchPaths -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListLaunchPathsRequest method. -// req, resp := client.ListLaunchPathsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListLaunchPaths -func (c *ServiceCatalog) ListLaunchPathsRequest(input *ListLaunchPathsInput) (req *request.Request, output *ListLaunchPathsOutput) { - op := &request.Operation{ - Name: opListLaunchPaths, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListLaunchPathsInput{} - } - - output = &ListLaunchPathsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListLaunchPaths API operation for AWS Service Catalog. -// -// Lists the paths to the specified product. A path is how the user has access -// to a specified product, and is necessary when provisioning a product. A path -// also determines the constraints put on the product. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListLaunchPaths for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListLaunchPaths -func (c *ServiceCatalog) ListLaunchPaths(input *ListLaunchPathsInput) (*ListLaunchPathsOutput, error) { - req, out := c.ListLaunchPathsRequest(input) - return out, req.Send() -} - -// ListLaunchPathsWithContext is the same as ListLaunchPaths with the addition of -// the ability to pass a context and additional request options. -// -// See ListLaunchPaths for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListLaunchPathsWithContext(ctx aws.Context, input *ListLaunchPathsInput, opts ...request.Option) (*ListLaunchPathsOutput, error) { - req, out := c.ListLaunchPathsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListLaunchPathsPages iterates over the pages of a ListLaunchPaths operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListLaunchPaths 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 ListLaunchPaths operation. -// pageNum := 0 -// err := client.ListLaunchPathsPages(params, -// func(page *ListLaunchPathsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) ListLaunchPathsPages(input *ListLaunchPathsInput, fn func(*ListLaunchPathsOutput, bool) bool) error { - return c.ListLaunchPathsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListLaunchPathsPagesWithContext same as ListLaunchPathsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListLaunchPathsPagesWithContext(ctx aws.Context, input *ListLaunchPathsInput, fn func(*ListLaunchPathsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListLaunchPathsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListLaunchPathsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListLaunchPathsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListOrganizationPortfolioAccess = "ListOrganizationPortfolioAccess" - -// ListOrganizationPortfolioAccessRequest generates a "aws/request.Request" representing the -// client's request for the ListOrganizationPortfolioAccess operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListOrganizationPortfolioAccess for more information on using the ListOrganizationPortfolioAccess -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListOrganizationPortfolioAccessRequest method. -// req, resp := client.ListOrganizationPortfolioAccessRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListOrganizationPortfolioAccess -func (c *ServiceCatalog) ListOrganizationPortfolioAccessRequest(input *ListOrganizationPortfolioAccessInput) (req *request.Request, output *ListOrganizationPortfolioAccessOutput) { - op := &request.Operation{ - Name: opListOrganizationPortfolioAccess, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListOrganizationPortfolioAccessInput{} - } - - output = &ListOrganizationPortfolioAccessOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOrganizationPortfolioAccess API operation for AWS Service Catalog. -// -// Lists the organization nodes that have access to the specified portfolio. -// This API can only be called by the master account in the organization. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListOrganizationPortfolioAccess for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" -// The operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListOrganizationPortfolioAccess -func (c *ServiceCatalog) ListOrganizationPortfolioAccess(input *ListOrganizationPortfolioAccessInput) (*ListOrganizationPortfolioAccessOutput, error) { - req, out := c.ListOrganizationPortfolioAccessRequest(input) - return out, req.Send() -} - -// ListOrganizationPortfolioAccessWithContext is the same as ListOrganizationPortfolioAccess with the addition of -// the ability to pass a context and additional request options. -// -// See ListOrganizationPortfolioAccess for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListOrganizationPortfolioAccessWithContext(ctx aws.Context, input *ListOrganizationPortfolioAccessInput, opts ...request.Option) (*ListOrganizationPortfolioAccessOutput, error) { - req, out := c.ListOrganizationPortfolioAccessRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListOrganizationPortfolioAccessPages iterates over the pages of a ListOrganizationPortfolioAccess operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListOrganizationPortfolioAccess 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 ListOrganizationPortfolioAccess operation. -// pageNum := 0 -// err := client.ListOrganizationPortfolioAccessPages(params, -// func(page *ListOrganizationPortfolioAccessOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) ListOrganizationPortfolioAccessPages(input *ListOrganizationPortfolioAccessInput, fn func(*ListOrganizationPortfolioAccessOutput, bool) bool) error { - return c.ListOrganizationPortfolioAccessPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListOrganizationPortfolioAccessPagesWithContext same as ListOrganizationPortfolioAccessPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListOrganizationPortfolioAccessPagesWithContext(ctx aws.Context, input *ListOrganizationPortfolioAccessInput, fn func(*ListOrganizationPortfolioAccessOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListOrganizationPortfolioAccessInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListOrganizationPortfolioAccessRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListOrganizationPortfolioAccessOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListPortfolioAccess = "ListPortfolioAccess" - -// ListPortfolioAccessRequest generates a "aws/request.Request" representing the -// client's request for the ListPortfolioAccess operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPortfolioAccess for more information on using the ListPortfolioAccess -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPortfolioAccessRequest method. -// req, resp := client.ListPortfolioAccessRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfolioAccess -func (c *ServiceCatalog) ListPortfolioAccessRequest(input *ListPortfolioAccessInput) (req *request.Request, output *ListPortfolioAccessOutput) { - op := &request.Operation{ - Name: opListPortfolioAccess, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListPortfolioAccessInput{} - } - - output = &ListPortfolioAccessOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPortfolioAccess API operation for AWS Service Catalog. -// -// Lists the account IDs that have access to the specified portfolio. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListPortfolioAccess for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfolioAccess -func (c *ServiceCatalog) ListPortfolioAccess(input *ListPortfolioAccessInput) (*ListPortfolioAccessOutput, error) { - req, out := c.ListPortfolioAccessRequest(input) - return out, req.Send() -} - -// ListPortfolioAccessWithContext is the same as ListPortfolioAccess with the addition of -// the ability to pass a context and additional request options. -// -// See ListPortfolioAccess for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListPortfolioAccessWithContext(ctx aws.Context, input *ListPortfolioAccessInput, opts ...request.Option) (*ListPortfolioAccessOutput, error) { - req, out := c.ListPortfolioAccessRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPortfolios = "ListPortfolios" - -// ListPortfoliosRequest generates a "aws/request.Request" representing the -// client's request for the ListPortfolios operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPortfolios for more information on using the ListPortfolios -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPortfoliosRequest method. -// req, resp := client.ListPortfoliosRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfolios -func (c *ServiceCatalog) ListPortfoliosRequest(input *ListPortfoliosInput) (req *request.Request, output *ListPortfoliosOutput) { - op := &request.Operation{ - Name: opListPortfolios, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListPortfoliosInput{} - } - - output = &ListPortfoliosOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPortfolios API operation for AWS Service Catalog. -// -// Lists all portfolios in the catalog. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListPortfolios for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfolios -func (c *ServiceCatalog) ListPortfolios(input *ListPortfoliosInput) (*ListPortfoliosOutput, error) { - req, out := c.ListPortfoliosRequest(input) - return out, req.Send() -} - -// ListPortfoliosWithContext is the same as ListPortfolios with the addition of -// the ability to pass a context and additional request options. -// -// See ListPortfolios for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListPortfoliosWithContext(ctx aws.Context, input *ListPortfoliosInput, opts ...request.Option) (*ListPortfoliosOutput, error) { - req, out := c.ListPortfoliosRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPortfoliosPages iterates over the pages of a ListPortfolios operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPortfolios 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 ListPortfolios operation. -// pageNum := 0 -// err := client.ListPortfoliosPages(params, -// func(page *ListPortfoliosOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) ListPortfoliosPages(input *ListPortfoliosInput, fn func(*ListPortfoliosOutput, bool) bool) error { - return c.ListPortfoliosPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPortfoliosPagesWithContext same as ListPortfoliosPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListPortfoliosPagesWithContext(ctx aws.Context, input *ListPortfoliosInput, fn func(*ListPortfoliosOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPortfoliosInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPortfoliosRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPortfoliosOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListPortfoliosForProduct = "ListPortfoliosForProduct" - -// ListPortfoliosForProductRequest generates a "aws/request.Request" representing the -// client's request for the ListPortfoliosForProduct operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPortfoliosForProduct for more information on using the ListPortfoliosForProduct -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPortfoliosForProductRequest method. -// req, resp := client.ListPortfoliosForProductRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfoliosForProduct -func (c *ServiceCatalog) ListPortfoliosForProductRequest(input *ListPortfoliosForProductInput) (req *request.Request, output *ListPortfoliosForProductOutput) { - op := &request.Operation{ - Name: opListPortfoliosForProduct, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListPortfoliosForProductInput{} - } - - output = &ListPortfoliosForProductOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPortfoliosForProduct API operation for AWS Service Catalog. -// -// Lists all portfolios that the specified product is associated with. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListPortfoliosForProduct for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfoliosForProduct -func (c *ServiceCatalog) ListPortfoliosForProduct(input *ListPortfoliosForProductInput) (*ListPortfoliosForProductOutput, error) { - req, out := c.ListPortfoliosForProductRequest(input) - return out, req.Send() -} - -// ListPortfoliosForProductWithContext is the same as ListPortfoliosForProduct with the addition of -// the ability to pass a context and additional request options. -// -// See ListPortfoliosForProduct for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListPortfoliosForProductWithContext(ctx aws.Context, input *ListPortfoliosForProductInput, opts ...request.Option) (*ListPortfoliosForProductOutput, error) { - req, out := c.ListPortfoliosForProductRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPortfoliosForProductPages iterates over the pages of a ListPortfoliosForProduct operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPortfoliosForProduct 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 ListPortfoliosForProduct operation. -// pageNum := 0 -// err := client.ListPortfoliosForProductPages(params, -// func(page *ListPortfoliosForProductOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) ListPortfoliosForProductPages(input *ListPortfoliosForProductInput, fn func(*ListPortfoliosForProductOutput, bool) bool) error { - return c.ListPortfoliosForProductPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPortfoliosForProductPagesWithContext same as ListPortfoliosForProductPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListPortfoliosForProductPagesWithContext(ctx aws.Context, input *ListPortfoliosForProductInput, fn func(*ListPortfoliosForProductOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPortfoliosForProductInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPortfoliosForProductRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPortfoliosForProductOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListPrincipalsForPortfolio = "ListPrincipalsForPortfolio" - -// ListPrincipalsForPortfolioRequest generates a "aws/request.Request" representing the -// client's request for the ListPrincipalsForPortfolio operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPrincipalsForPortfolio for more information on using the ListPrincipalsForPortfolio -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPrincipalsForPortfolioRequest method. -// req, resp := client.ListPrincipalsForPortfolioRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPrincipalsForPortfolio -func (c *ServiceCatalog) ListPrincipalsForPortfolioRequest(input *ListPrincipalsForPortfolioInput) (req *request.Request, output *ListPrincipalsForPortfolioOutput) { - op := &request.Operation{ - Name: opListPrincipalsForPortfolio, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListPrincipalsForPortfolioInput{} - } - - output = &ListPrincipalsForPortfolioOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPrincipalsForPortfolio API operation for AWS Service Catalog. -// -// Lists all principal ARNs associated with the specified portfolio. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListPrincipalsForPortfolio for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPrincipalsForPortfolio -func (c *ServiceCatalog) ListPrincipalsForPortfolio(input *ListPrincipalsForPortfolioInput) (*ListPrincipalsForPortfolioOutput, error) { - req, out := c.ListPrincipalsForPortfolioRequest(input) - return out, req.Send() -} - -// ListPrincipalsForPortfolioWithContext is the same as ListPrincipalsForPortfolio with the addition of -// the ability to pass a context and additional request options. -// -// See ListPrincipalsForPortfolio for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListPrincipalsForPortfolioWithContext(ctx aws.Context, input *ListPrincipalsForPortfolioInput, opts ...request.Option) (*ListPrincipalsForPortfolioOutput, error) { - req, out := c.ListPrincipalsForPortfolioRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPrincipalsForPortfolioPages iterates over the pages of a ListPrincipalsForPortfolio operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPrincipalsForPortfolio 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 ListPrincipalsForPortfolio operation. -// pageNum := 0 -// err := client.ListPrincipalsForPortfolioPages(params, -// func(page *ListPrincipalsForPortfolioOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) ListPrincipalsForPortfolioPages(input *ListPrincipalsForPortfolioInput, fn func(*ListPrincipalsForPortfolioOutput, bool) bool) error { - return c.ListPrincipalsForPortfolioPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPrincipalsForPortfolioPagesWithContext same as ListPrincipalsForPortfolioPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListPrincipalsForPortfolioPagesWithContext(ctx aws.Context, input *ListPrincipalsForPortfolioInput, fn func(*ListPrincipalsForPortfolioOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPrincipalsForPortfolioInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPrincipalsForPortfolioRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPrincipalsForPortfolioOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListProvisionedProductPlans = "ListProvisionedProductPlans" - -// ListProvisionedProductPlansRequest generates a "aws/request.Request" representing the -// client's request for the ListProvisionedProductPlans operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListProvisionedProductPlans for more information on using the ListProvisionedProductPlans -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListProvisionedProductPlansRequest method. -// req, resp := client.ListProvisionedProductPlansRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListProvisionedProductPlans -func (c *ServiceCatalog) ListProvisionedProductPlansRequest(input *ListProvisionedProductPlansInput) (req *request.Request, output *ListProvisionedProductPlansOutput) { - op := &request.Operation{ - Name: opListProvisionedProductPlans, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListProvisionedProductPlansInput{} - } - - output = &ListProvisionedProductPlansOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListProvisionedProductPlans API operation for AWS Service Catalog. -// -// Lists the plans for the specified provisioned product or all plans to which -// the user has access. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListProvisionedProductPlans for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListProvisionedProductPlans -func (c *ServiceCatalog) ListProvisionedProductPlans(input *ListProvisionedProductPlansInput) (*ListProvisionedProductPlansOutput, error) { - req, out := c.ListProvisionedProductPlansRequest(input) - return out, req.Send() -} - -// ListProvisionedProductPlansWithContext is the same as ListProvisionedProductPlans with the addition of -// the ability to pass a context and additional request options. -// -// See ListProvisionedProductPlans for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListProvisionedProductPlansWithContext(ctx aws.Context, input *ListProvisionedProductPlansInput, opts ...request.Option) (*ListProvisionedProductPlansOutput, error) { - req, out := c.ListProvisionedProductPlansRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListProvisioningArtifacts = "ListProvisioningArtifacts" - -// ListProvisioningArtifactsRequest generates a "aws/request.Request" representing the -// client's request for the ListProvisioningArtifacts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListProvisioningArtifacts for more information on using the ListProvisioningArtifacts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListProvisioningArtifactsRequest method. -// req, resp := client.ListProvisioningArtifactsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListProvisioningArtifacts -func (c *ServiceCatalog) ListProvisioningArtifactsRequest(input *ListProvisioningArtifactsInput) (req *request.Request, output *ListProvisioningArtifactsOutput) { - op := &request.Operation{ - Name: opListProvisioningArtifacts, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListProvisioningArtifactsInput{} - } - - output = &ListProvisioningArtifactsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListProvisioningArtifacts API operation for AWS Service Catalog. -// -// Lists all provisioning artifacts (also known as versions) for the specified -// product. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListProvisioningArtifacts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListProvisioningArtifacts -func (c *ServiceCatalog) ListProvisioningArtifacts(input *ListProvisioningArtifactsInput) (*ListProvisioningArtifactsOutput, error) { - req, out := c.ListProvisioningArtifactsRequest(input) - return out, req.Send() -} - -// ListProvisioningArtifactsWithContext is the same as ListProvisioningArtifacts with the addition of -// the ability to pass a context and additional request options. -// -// See ListProvisioningArtifacts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListProvisioningArtifactsWithContext(ctx aws.Context, input *ListProvisioningArtifactsInput, opts ...request.Option) (*ListProvisioningArtifactsOutput, error) { - req, out := c.ListProvisioningArtifactsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListProvisioningArtifactsForServiceAction = "ListProvisioningArtifactsForServiceAction" - -// ListProvisioningArtifactsForServiceActionRequest generates a "aws/request.Request" representing the -// client's request for the ListProvisioningArtifactsForServiceAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListProvisioningArtifactsForServiceAction for more information on using the ListProvisioningArtifactsForServiceAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListProvisioningArtifactsForServiceActionRequest method. -// req, resp := client.ListProvisioningArtifactsForServiceActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListProvisioningArtifactsForServiceAction -func (c *ServiceCatalog) ListProvisioningArtifactsForServiceActionRequest(input *ListProvisioningArtifactsForServiceActionInput) (req *request.Request, output *ListProvisioningArtifactsForServiceActionOutput) { - op := &request.Operation{ - Name: opListProvisioningArtifactsForServiceAction, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListProvisioningArtifactsForServiceActionInput{} - } - - output = &ListProvisioningArtifactsForServiceActionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListProvisioningArtifactsForServiceAction API operation for AWS Service Catalog. -// -// Lists all provisioning artifacts (also known as versions) for the specified -// self-service action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListProvisioningArtifactsForServiceAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListProvisioningArtifactsForServiceAction -func (c *ServiceCatalog) ListProvisioningArtifactsForServiceAction(input *ListProvisioningArtifactsForServiceActionInput) (*ListProvisioningArtifactsForServiceActionOutput, error) { - req, out := c.ListProvisioningArtifactsForServiceActionRequest(input) - return out, req.Send() -} - -// ListProvisioningArtifactsForServiceActionWithContext is the same as ListProvisioningArtifactsForServiceAction with the addition of -// the ability to pass a context and additional request options. -// -// See ListProvisioningArtifactsForServiceAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListProvisioningArtifactsForServiceActionWithContext(ctx aws.Context, input *ListProvisioningArtifactsForServiceActionInput, opts ...request.Option) (*ListProvisioningArtifactsForServiceActionOutput, error) { - req, out := c.ListProvisioningArtifactsForServiceActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListProvisioningArtifactsForServiceActionPages iterates over the pages of a ListProvisioningArtifactsForServiceAction operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListProvisioningArtifactsForServiceAction method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListProvisioningArtifactsForServiceAction operation. -// pageNum := 0 -// err := client.ListProvisioningArtifactsForServiceActionPages(params, -// func(page *ListProvisioningArtifactsForServiceActionOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) ListProvisioningArtifactsForServiceActionPages(input *ListProvisioningArtifactsForServiceActionInput, fn func(*ListProvisioningArtifactsForServiceActionOutput, bool) bool) error { - return c.ListProvisioningArtifactsForServiceActionPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListProvisioningArtifactsForServiceActionPagesWithContext same as ListProvisioningArtifactsForServiceActionPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListProvisioningArtifactsForServiceActionPagesWithContext(ctx aws.Context, input *ListProvisioningArtifactsForServiceActionInput, fn func(*ListProvisioningArtifactsForServiceActionOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListProvisioningArtifactsForServiceActionInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListProvisioningArtifactsForServiceActionRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListProvisioningArtifactsForServiceActionOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListRecordHistory = "ListRecordHistory" - -// ListRecordHistoryRequest generates a "aws/request.Request" representing the -// client's request for the ListRecordHistory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRecordHistory for more information on using the ListRecordHistory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRecordHistoryRequest method. -// req, resp := client.ListRecordHistoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListRecordHistory -func (c *ServiceCatalog) ListRecordHistoryRequest(input *ListRecordHistoryInput) (req *request.Request, output *ListRecordHistoryOutput) { - op := &request.Operation{ - Name: opListRecordHistory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListRecordHistoryInput{} - } - - output = &ListRecordHistoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRecordHistory API operation for AWS Service Catalog. -// -// Lists the specified requests or all performed requests. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListRecordHistory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListRecordHistory -func (c *ServiceCatalog) ListRecordHistory(input *ListRecordHistoryInput) (*ListRecordHistoryOutput, error) { - req, out := c.ListRecordHistoryRequest(input) - return out, req.Send() -} - -// ListRecordHistoryWithContext is the same as ListRecordHistory with the addition of -// the ability to pass a context and additional request options. -// -// See ListRecordHistory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListRecordHistoryWithContext(ctx aws.Context, input *ListRecordHistoryInput, opts ...request.Option) (*ListRecordHistoryOutput, error) { - req, out := c.ListRecordHistoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListResourcesForTagOption = "ListResourcesForTagOption" - -// ListResourcesForTagOptionRequest generates a "aws/request.Request" representing the -// client's request for the ListResourcesForTagOption operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResourcesForTagOption for more information on using the ListResourcesForTagOption -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResourcesForTagOptionRequest method. -// req, resp := client.ListResourcesForTagOptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListResourcesForTagOption -func (c *ServiceCatalog) ListResourcesForTagOptionRequest(input *ListResourcesForTagOptionInput) (req *request.Request, output *ListResourcesForTagOptionOutput) { - op := &request.Operation{ - Name: opListResourcesForTagOption, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"PageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListResourcesForTagOptionInput{} - } - - output = &ListResourcesForTagOptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResourcesForTagOption API operation for AWS Service Catalog. -// -// Lists the resources associated with the specified TagOption. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListResourcesForTagOption for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListResourcesForTagOption -func (c *ServiceCatalog) ListResourcesForTagOption(input *ListResourcesForTagOptionInput) (*ListResourcesForTagOptionOutput, error) { - req, out := c.ListResourcesForTagOptionRequest(input) - return out, req.Send() -} - -// ListResourcesForTagOptionWithContext is the same as ListResourcesForTagOption with the addition of -// the ability to pass a context and additional request options. -// -// See ListResourcesForTagOption for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListResourcesForTagOptionWithContext(ctx aws.Context, input *ListResourcesForTagOptionInput, opts ...request.Option) (*ListResourcesForTagOptionOutput, error) { - req, out := c.ListResourcesForTagOptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListResourcesForTagOptionPages iterates over the pages of a ListResourcesForTagOption operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListResourcesForTagOption 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 ListResourcesForTagOption operation. -// pageNum := 0 -// err := client.ListResourcesForTagOptionPages(params, -// func(page *ListResourcesForTagOptionOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) ListResourcesForTagOptionPages(input *ListResourcesForTagOptionInput, fn func(*ListResourcesForTagOptionOutput, bool) bool) error { - return c.ListResourcesForTagOptionPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListResourcesForTagOptionPagesWithContext same as ListResourcesForTagOptionPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListResourcesForTagOptionPagesWithContext(ctx aws.Context, input *ListResourcesForTagOptionInput, fn func(*ListResourcesForTagOptionOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListResourcesForTagOptionInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListResourcesForTagOptionRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResourcesForTagOptionOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListServiceActions = "ListServiceActions" - -// ListServiceActionsRequest generates a "aws/request.Request" representing the -// client's request for the ListServiceActions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListServiceActions for more information on using the ListServiceActions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListServiceActionsRequest method. -// req, resp := client.ListServiceActionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListServiceActions -func (c *ServiceCatalog) ListServiceActionsRequest(input *ListServiceActionsInput) (req *request.Request, output *ListServiceActionsOutput) { - op := &request.Operation{ - Name: opListServiceActions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListServiceActionsInput{} - } - - output = &ListServiceActionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListServiceActions API operation for AWS Service Catalog. -// -// Lists all self-service actions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListServiceActions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListServiceActions -func (c *ServiceCatalog) ListServiceActions(input *ListServiceActionsInput) (*ListServiceActionsOutput, error) { - req, out := c.ListServiceActionsRequest(input) - return out, req.Send() -} - -// ListServiceActionsWithContext is the same as ListServiceActions with the addition of -// the ability to pass a context and additional request options. -// -// See ListServiceActions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListServiceActionsWithContext(ctx aws.Context, input *ListServiceActionsInput, opts ...request.Option) (*ListServiceActionsOutput, error) { - req, out := c.ListServiceActionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListServiceActionsPages iterates over the pages of a ListServiceActions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListServiceActions method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListServiceActions operation. -// pageNum := 0 -// err := client.ListServiceActionsPages(params, -// func(page *ListServiceActionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) ListServiceActionsPages(input *ListServiceActionsInput, fn func(*ListServiceActionsOutput, bool) bool) error { - return c.ListServiceActionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListServiceActionsPagesWithContext same as ListServiceActionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListServiceActionsPagesWithContext(ctx aws.Context, input *ListServiceActionsInput, fn func(*ListServiceActionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListServiceActionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListServiceActionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListServiceActionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListServiceActionsForProvisioningArtifact = "ListServiceActionsForProvisioningArtifact" - -// ListServiceActionsForProvisioningArtifactRequest generates a "aws/request.Request" representing the -// client's request for the ListServiceActionsForProvisioningArtifact operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListServiceActionsForProvisioningArtifact for more information on using the ListServiceActionsForProvisioningArtifact -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListServiceActionsForProvisioningArtifactRequest method. -// req, resp := client.ListServiceActionsForProvisioningArtifactRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListServiceActionsForProvisioningArtifact -func (c *ServiceCatalog) ListServiceActionsForProvisioningArtifactRequest(input *ListServiceActionsForProvisioningArtifactInput) (req *request.Request, output *ListServiceActionsForProvisioningArtifactOutput) { - op := &request.Operation{ - Name: opListServiceActionsForProvisioningArtifact, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListServiceActionsForProvisioningArtifactInput{} - } - - output = &ListServiceActionsForProvisioningArtifactOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListServiceActionsForProvisioningArtifact API operation for AWS Service Catalog. -// -// Returns a paginated list of self-service actions associated with the specified -// Product ID and Provisioning Artifact ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListServiceActionsForProvisioningArtifact for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListServiceActionsForProvisioningArtifact -func (c *ServiceCatalog) ListServiceActionsForProvisioningArtifact(input *ListServiceActionsForProvisioningArtifactInput) (*ListServiceActionsForProvisioningArtifactOutput, error) { - req, out := c.ListServiceActionsForProvisioningArtifactRequest(input) - return out, req.Send() -} - -// ListServiceActionsForProvisioningArtifactWithContext is the same as ListServiceActionsForProvisioningArtifact with the addition of -// the ability to pass a context and additional request options. -// -// See ListServiceActionsForProvisioningArtifact for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListServiceActionsForProvisioningArtifactWithContext(ctx aws.Context, input *ListServiceActionsForProvisioningArtifactInput, opts ...request.Option) (*ListServiceActionsForProvisioningArtifactOutput, error) { - req, out := c.ListServiceActionsForProvisioningArtifactRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListServiceActionsForProvisioningArtifactPages iterates over the pages of a ListServiceActionsForProvisioningArtifact operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListServiceActionsForProvisioningArtifact method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListServiceActionsForProvisioningArtifact operation. -// pageNum := 0 -// err := client.ListServiceActionsForProvisioningArtifactPages(params, -// func(page *ListServiceActionsForProvisioningArtifactOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) ListServiceActionsForProvisioningArtifactPages(input *ListServiceActionsForProvisioningArtifactInput, fn func(*ListServiceActionsForProvisioningArtifactOutput, bool) bool) error { - return c.ListServiceActionsForProvisioningArtifactPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListServiceActionsForProvisioningArtifactPagesWithContext same as ListServiceActionsForProvisioningArtifactPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListServiceActionsForProvisioningArtifactPagesWithContext(ctx aws.Context, input *ListServiceActionsForProvisioningArtifactInput, fn func(*ListServiceActionsForProvisioningArtifactOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListServiceActionsForProvisioningArtifactInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListServiceActionsForProvisioningArtifactRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListServiceActionsForProvisioningArtifactOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTagOptions = "ListTagOptions" - -// ListTagOptionsRequest generates a "aws/request.Request" representing the -// client's request for the ListTagOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTagOptions for more information on using the ListTagOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagOptionsRequest method. -// req, resp := client.ListTagOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptions -func (c *ServiceCatalog) ListTagOptionsRequest(input *ListTagOptionsInput) (req *request.Request, output *ListTagOptionsOutput) { - op := &request.Operation{ - Name: opListTagOptions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"PageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTagOptionsInput{} - } - - output = &ListTagOptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagOptions API operation for AWS Service Catalog. -// -// Lists the specified TagOptions or all TagOptions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ListTagOptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptions -func (c *ServiceCatalog) ListTagOptions(input *ListTagOptionsInput) (*ListTagOptionsOutput, error) { - req, out := c.ListTagOptionsRequest(input) - return out, req.Send() -} - -// ListTagOptionsWithContext is the same as ListTagOptions with the addition of -// the ability to pass a context and additional request options. -// -// See ListTagOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListTagOptionsWithContext(ctx aws.Context, input *ListTagOptionsInput, opts ...request.Option) (*ListTagOptionsOutput, error) { - req, out := c.ListTagOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTagOptionsPages iterates over the pages of a ListTagOptions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTagOptions method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListTagOptions operation. -// pageNum := 0 -// err := client.ListTagOptionsPages(params, -// func(page *ListTagOptionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) ListTagOptionsPages(input *ListTagOptionsInput, fn func(*ListTagOptionsOutput, bool) bool) error { - return c.ListTagOptionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTagOptionsPagesWithContext same as ListTagOptionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ListTagOptionsPagesWithContext(ctx aws.Context, input *ListTagOptionsInput, fn func(*ListTagOptionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTagOptionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTagOptionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagOptionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opProvisionProduct = "ProvisionProduct" - -// ProvisionProductRequest generates a "aws/request.Request" representing the -// client's request for the ProvisionProduct operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ProvisionProduct for more information on using the ProvisionProduct -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ProvisionProductRequest method. -// req, resp := client.ProvisionProductRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisionProduct -func (c *ServiceCatalog) ProvisionProductRequest(input *ProvisionProductInput) (req *request.Request, output *ProvisionProductOutput) { - op := &request.Operation{ - Name: opProvisionProduct, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ProvisionProductInput{} - } - - output = &ProvisionProductOutput{} - req = c.newRequest(op, input, output) - return -} - -// ProvisionProduct API operation for AWS Service Catalog. -// -// Provisions the specified product. -// -// A provisioned product is a resourced instance of a product. For example, -// provisioning a product based on a CloudFormation template launches a CloudFormation -// stack and its underlying resources. You can check the status of this request -// using DescribeRecord. -// -// If the request contains a tag key with an empty list of values, there is -// a tag conflict for that key. Do not include conflicted keys as tags, or this -// causes the error "Parameter validation failed: Missing required parameter -// in Tags[N]:Value". -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ProvisionProduct for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeDuplicateResourceException "DuplicateResourceException" -// The specified resource is a duplicate. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisionProduct -func (c *ServiceCatalog) ProvisionProduct(input *ProvisionProductInput) (*ProvisionProductOutput, error) { - req, out := c.ProvisionProductRequest(input) - return out, req.Send() -} - -// ProvisionProductWithContext is the same as ProvisionProduct with the addition of -// the ability to pass a context and additional request options. -// -// See ProvisionProduct for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ProvisionProductWithContext(ctx aws.Context, input *ProvisionProductInput, opts ...request.Option) (*ProvisionProductOutput, error) { - req, out := c.ProvisionProductRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRejectPortfolioShare = "RejectPortfolioShare" - -// RejectPortfolioShareRequest generates a "aws/request.Request" representing the -// client's request for the RejectPortfolioShare operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RejectPortfolioShare for more information on using the RejectPortfolioShare -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RejectPortfolioShareRequest method. -// req, resp := client.RejectPortfolioShareRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/RejectPortfolioShare -func (c *ServiceCatalog) RejectPortfolioShareRequest(input *RejectPortfolioShareInput) (req *request.Request, output *RejectPortfolioShareOutput) { - op := &request.Operation{ - Name: opRejectPortfolioShare, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RejectPortfolioShareInput{} - } - - output = &RejectPortfolioShareOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RejectPortfolioShare API operation for AWS Service Catalog. -// -// Rejects an offer to share the specified portfolio. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation RejectPortfolioShare for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/RejectPortfolioShare -func (c *ServiceCatalog) RejectPortfolioShare(input *RejectPortfolioShareInput) (*RejectPortfolioShareOutput, error) { - req, out := c.RejectPortfolioShareRequest(input) - return out, req.Send() -} - -// RejectPortfolioShareWithContext is the same as RejectPortfolioShare with the addition of -// the ability to pass a context and additional request options. -// -// See RejectPortfolioShare for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) RejectPortfolioShareWithContext(ctx aws.Context, input *RejectPortfolioShareInput, opts ...request.Option) (*RejectPortfolioShareOutput, error) { - req, out := c.RejectPortfolioShareRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opScanProvisionedProducts = "ScanProvisionedProducts" - -// ScanProvisionedProductsRequest generates a "aws/request.Request" representing the -// client's request for the ScanProvisionedProducts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ScanProvisionedProducts for more information on using the ScanProvisionedProducts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ScanProvisionedProductsRequest method. -// req, resp := client.ScanProvisionedProductsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ScanProvisionedProducts -func (c *ServiceCatalog) ScanProvisionedProductsRequest(input *ScanProvisionedProductsInput) (req *request.Request, output *ScanProvisionedProductsOutput) { - op := &request.Operation{ - Name: opScanProvisionedProducts, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ScanProvisionedProductsInput{} - } - - output = &ScanProvisionedProductsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ScanProvisionedProducts API operation for AWS Service Catalog. -// -// Lists the provisioned products that are available (not terminated). -// -// To use additional filtering, see SearchProvisionedProducts. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation ScanProvisionedProducts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ScanProvisionedProducts -func (c *ServiceCatalog) ScanProvisionedProducts(input *ScanProvisionedProductsInput) (*ScanProvisionedProductsOutput, error) { - req, out := c.ScanProvisionedProductsRequest(input) - return out, req.Send() -} - -// ScanProvisionedProductsWithContext is the same as ScanProvisionedProducts with the addition of -// the ability to pass a context and additional request options. -// -// See ScanProvisionedProducts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) ScanProvisionedProductsWithContext(ctx aws.Context, input *ScanProvisionedProductsInput, opts ...request.Option) (*ScanProvisionedProductsOutput, error) { - req, out := c.ScanProvisionedProductsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSearchProducts = "SearchProducts" - -// SearchProductsRequest generates a "aws/request.Request" representing the -// client's request for the SearchProducts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SearchProducts for more information on using the SearchProducts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SearchProductsRequest method. -// req, resp := client.SearchProductsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/SearchProducts -func (c *ServiceCatalog) SearchProductsRequest(input *SearchProductsInput) (req *request.Request, output *SearchProductsOutput) { - op := &request.Operation{ - Name: opSearchProducts, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &SearchProductsInput{} - } - - output = &SearchProductsOutput{} - req = c.newRequest(op, input, output) - return -} - -// SearchProducts API operation for AWS Service Catalog. -// -// Gets information about the products to which the caller has access. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation SearchProducts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/SearchProducts -func (c *ServiceCatalog) SearchProducts(input *SearchProductsInput) (*SearchProductsOutput, error) { - req, out := c.SearchProductsRequest(input) - return out, req.Send() -} - -// SearchProductsWithContext is the same as SearchProducts with the addition of -// the ability to pass a context and additional request options. -// -// See SearchProducts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) SearchProductsWithContext(ctx aws.Context, input *SearchProductsInput, opts ...request.Option) (*SearchProductsOutput, error) { - req, out := c.SearchProductsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// SearchProductsPages iterates over the pages of a SearchProducts operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See SearchProducts 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 SearchProducts operation. -// pageNum := 0 -// err := client.SearchProductsPages(params, -// func(page *SearchProductsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) SearchProductsPages(input *SearchProductsInput, fn func(*SearchProductsOutput, bool) bool) error { - return c.SearchProductsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// SearchProductsPagesWithContext same as SearchProductsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) SearchProductsPagesWithContext(ctx aws.Context, input *SearchProductsInput, fn func(*SearchProductsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *SearchProductsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.SearchProductsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SearchProductsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opSearchProductsAsAdmin = "SearchProductsAsAdmin" - -// SearchProductsAsAdminRequest generates a "aws/request.Request" representing the -// client's request for the SearchProductsAsAdmin operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SearchProductsAsAdmin for more information on using the SearchProductsAsAdmin -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SearchProductsAsAdminRequest method. -// req, resp := client.SearchProductsAsAdminRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/SearchProductsAsAdmin -func (c *ServiceCatalog) SearchProductsAsAdminRequest(input *SearchProductsAsAdminInput) (req *request.Request, output *SearchProductsAsAdminOutput) { - op := &request.Operation{ - Name: opSearchProductsAsAdmin, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &SearchProductsAsAdminInput{} - } - - output = &SearchProductsAsAdminOutput{} - req = c.newRequest(op, input, output) - return -} - -// SearchProductsAsAdmin API operation for AWS Service Catalog. -// -// Gets information about the products for the specified portfolio or all products. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation SearchProductsAsAdmin for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/SearchProductsAsAdmin -func (c *ServiceCatalog) SearchProductsAsAdmin(input *SearchProductsAsAdminInput) (*SearchProductsAsAdminOutput, error) { - req, out := c.SearchProductsAsAdminRequest(input) - return out, req.Send() -} - -// SearchProductsAsAdminWithContext is the same as SearchProductsAsAdmin with the addition of -// the ability to pass a context and additional request options. -// -// See SearchProductsAsAdmin for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) SearchProductsAsAdminWithContext(ctx aws.Context, input *SearchProductsAsAdminInput, opts ...request.Option) (*SearchProductsAsAdminOutput, error) { - req, out := c.SearchProductsAsAdminRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// SearchProductsAsAdminPages iterates over the pages of a SearchProductsAsAdmin operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See SearchProductsAsAdmin 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 SearchProductsAsAdmin operation. -// pageNum := 0 -// err := client.SearchProductsAsAdminPages(params, -// func(page *SearchProductsAsAdminOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) SearchProductsAsAdminPages(input *SearchProductsAsAdminInput, fn func(*SearchProductsAsAdminOutput, bool) bool) error { - return c.SearchProductsAsAdminPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// SearchProductsAsAdminPagesWithContext same as SearchProductsAsAdminPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) SearchProductsAsAdminPagesWithContext(ctx aws.Context, input *SearchProductsAsAdminInput, fn func(*SearchProductsAsAdminOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *SearchProductsAsAdminInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.SearchProductsAsAdminRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SearchProductsAsAdminOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opSearchProvisionedProducts = "SearchProvisionedProducts" - -// SearchProvisionedProductsRequest generates a "aws/request.Request" representing the -// client's request for the SearchProvisionedProducts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SearchProvisionedProducts for more information on using the SearchProvisionedProducts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SearchProvisionedProductsRequest method. -// req, resp := client.SearchProvisionedProductsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/SearchProvisionedProducts -func (c *ServiceCatalog) SearchProvisionedProductsRequest(input *SearchProvisionedProductsInput) (req *request.Request, output *SearchProvisionedProductsOutput) { - op := &request.Operation{ - Name: opSearchProvisionedProducts, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PageToken"}, - OutputTokens: []string{"NextPageToken"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &SearchProvisionedProductsInput{} - } - - output = &SearchProvisionedProductsOutput{} - req = c.newRequest(op, input, output) - return -} - -// SearchProvisionedProducts API operation for AWS Service Catalog. -// -// Gets information about the provisioned products that meet the specified criteria. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation SearchProvisionedProducts for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/SearchProvisionedProducts -func (c *ServiceCatalog) SearchProvisionedProducts(input *SearchProvisionedProductsInput) (*SearchProvisionedProductsOutput, error) { - req, out := c.SearchProvisionedProductsRequest(input) - return out, req.Send() -} - -// SearchProvisionedProductsWithContext is the same as SearchProvisionedProducts with the addition of -// the ability to pass a context and additional request options. -// -// See SearchProvisionedProducts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) SearchProvisionedProductsWithContext(ctx aws.Context, input *SearchProvisionedProductsInput, opts ...request.Option) (*SearchProvisionedProductsOutput, error) { - req, out := c.SearchProvisionedProductsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// SearchProvisionedProductsPages iterates over the pages of a SearchProvisionedProducts operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See SearchProvisionedProducts 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 SearchProvisionedProducts operation. -// pageNum := 0 -// err := client.SearchProvisionedProductsPages(params, -// func(page *SearchProvisionedProductsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceCatalog) SearchProvisionedProductsPages(input *SearchProvisionedProductsInput, fn func(*SearchProvisionedProductsOutput, bool) bool) error { - return c.SearchProvisionedProductsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// SearchProvisionedProductsPagesWithContext same as SearchProvisionedProductsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) SearchProvisionedProductsPagesWithContext(ctx aws.Context, input *SearchProvisionedProductsInput, fn func(*SearchProvisionedProductsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *SearchProvisionedProductsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.SearchProvisionedProductsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SearchProvisionedProductsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opTerminateProvisionedProduct = "TerminateProvisionedProduct" - -// TerminateProvisionedProductRequest generates a "aws/request.Request" representing the -// client's request for the TerminateProvisionedProduct operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TerminateProvisionedProduct for more information on using the TerminateProvisionedProduct -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TerminateProvisionedProductRequest method. -// req, resp := client.TerminateProvisionedProductRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/TerminateProvisionedProduct -func (c *ServiceCatalog) TerminateProvisionedProductRequest(input *TerminateProvisionedProductInput) (req *request.Request, output *TerminateProvisionedProductOutput) { - op := &request.Operation{ - Name: opTerminateProvisionedProduct, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TerminateProvisionedProductInput{} - } - - output = &TerminateProvisionedProductOutput{} - req = c.newRequest(op, input, output) - return -} - -// TerminateProvisionedProduct API operation for AWS Service Catalog. -// -// Terminates the specified provisioned product. -// -// This operation does not delete any records associated with the provisioned -// product. -// -// You can check the status of this request using DescribeRecord. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation TerminateProvisionedProduct for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/TerminateProvisionedProduct -func (c *ServiceCatalog) TerminateProvisionedProduct(input *TerminateProvisionedProductInput) (*TerminateProvisionedProductOutput, error) { - req, out := c.TerminateProvisionedProductRequest(input) - return out, req.Send() -} - -// TerminateProvisionedProductWithContext is the same as TerminateProvisionedProduct with the addition of -// the ability to pass a context and additional request options. -// -// See TerminateProvisionedProduct for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) TerminateProvisionedProductWithContext(ctx aws.Context, input *TerminateProvisionedProductInput, opts ...request.Option) (*TerminateProvisionedProductOutput, error) { - req, out := c.TerminateProvisionedProductRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateConstraint = "UpdateConstraint" - -// UpdateConstraintRequest generates a "aws/request.Request" representing the -// client's request for the UpdateConstraint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateConstraint for more information on using the UpdateConstraint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateConstraintRequest method. -// req, resp := client.UpdateConstraintRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateConstraint -func (c *ServiceCatalog) UpdateConstraintRequest(input *UpdateConstraintInput) (req *request.Request, output *UpdateConstraintOutput) { - op := &request.Operation{ - Name: opUpdateConstraint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateConstraintInput{} - } - - output = &UpdateConstraintOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateConstraint API operation for AWS Service Catalog. -// -// Updates the specified constraint. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation UpdateConstraint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateConstraint -func (c *ServiceCatalog) UpdateConstraint(input *UpdateConstraintInput) (*UpdateConstraintOutput, error) { - req, out := c.UpdateConstraintRequest(input) - return out, req.Send() -} - -// UpdateConstraintWithContext is the same as UpdateConstraint with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateConstraint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) UpdateConstraintWithContext(ctx aws.Context, input *UpdateConstraintInput, opts ...request.Option) (*UpdateConstraintOutput, error) { - req, out := c.UpdateConstraintRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdatePortfolio = "UpdatePortfolio" - -// UpdatePortfolioRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePortfolio operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdatePortfolio for more information on using the UpdatePortfolio -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdatePortfolioRequest method. -// req, resp := client.UpdatePortfolioRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdatePortfolio -func (c *ServiceCatalog) UpdatePortfolioRequest(input *UpdatePortfolioInput) (req *request.Request, output *UpdatePortfolioOutput) { - op := &request.Operation{ - Name: opUpdatePortfolio, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdatePortfolioInput{} - } - - output = &UpdatePortfolioOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdatePortfolio API operation for AWS Service Catalog. -// -// Updates the specified portfolio. -// -// You cannot update a product that was shared with you. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation UpdatePortfolio for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// The current limits of the service would have been exceeded by this operation. -// Decrease your resource use or increase your service limits and retry the -// operation. -// -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdatePortfolio -func (c *ServiceCatalog) UpdatePortfolio(input *UpdatePortfolioInput) (*UpdatePortfolioOutput, error) { - req, out := c.UpdatePortfolioRequest(input) - return out, req.Send() -} - -// UpdatePortfolioWithContext is the same as UpdatePortfolio with the addition of -// the ability to pass a context and additional request options. -// -// See UpdatePortfolio for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) UpdatePortfolioWithContext(ctx aws.Context, input *UpdatePortfolioInput, opts ...request.Option) (*UpdatePortfolioOutput, error) { - req, out := c.UpdatePortfolioRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateProduct = "UpdateProduct" - -// UpdateProductRequest generates a "aws/request.Request" representing the -// client's request for the UpdateProduct operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateProduct for more information on using the UpdateProduct -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateProductRequest method. -// req, resp := client.UpdateProductRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProduct -func (c *ServiceCatalog) UpdateProductRequest(input *UpdateProductInput) (req *request.Request, output *UpdateProductOutput) { - op := &request.Operation{ - Name: opUpdateProduct, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateProductInput{} - } - - output = &UpdateProductOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateProduct API operation for AWS Service Catalog. -// -// Updates the specified product. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation UpdateProduct for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProduct -func (c *ServiceCatalog) UpdateProduct(input *UpdateProductInput) (*UpdateProductOutput, error) { - req, out := c.UpdateProductRequest(input) - return out, req.Send() -} - -// UpdateProductWithContext is the same as UpdateProduct with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateProduct for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) UpdateProductWithContext(ctx aws.Context, input *UpdateProductInput, opts ...request.Option) (*UpdateProductOutput, error) { - req, out := c.UpdateProductRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateProvisionedProduct = "UpdateProvisionedProduct" - -// UpdateProvisionedProductRequest generates a "aws/request.Request" representing the -// client's request for the UpdateProvisionedProduct operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateProvisionedProduct for more information on using the UpdateProvisionedProduct -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateProvisionedProductRequest method. -// req, resp := client.UpdateProvisionedProductRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProvisionedProduct -func (c *ServiceCatalog) UpdateProvisionedProductRequest(input *UpdateProvisionedProductInput) (req *request.Request, output *UpdateProvisionedProductOutput) { - op := &request.Operation{ - Name: opUpdateProvisionedProduct, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateProvisionedProductInput{} - } - - output = &UpdateProvisionedProductOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateProvisionedProduct API operation for AWS Service Catalog. -// -// Requests updates to the configuration of the specified provisioned product. -// -// If there are tags associated with the object, they cannot be updated or added. -// Depending on the specific updates requested, this operation can update with -// no interruption, with some interruption, or replace the provisioned product -// entirely. -// -// You can check the status of this request using DescribeRecord. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation UpdateProvisionedProduct for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProvisionedProduct -func (c *ServiceCatalog) UpdateProvisionedProduct(input *UpdateProvisionedProductInput) (*UpdateProvisionedProductOutput, error) { - req, out := c.UpdateProvisionedProductRequest(input) - return out, req.Send() -} - -// UpdateProvisionedProductWithContext is the same as UpdateProvisionedProduct with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateProvisionedProduct for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) UpdateProvisionedProductWithContext(ctx aws.Context, input *UpdateProvisionedProductInput, opts ...request.Option) (*UpdateProvisionedProductOutput, error) { - req, out := c.UpdateProvisionedProductRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateProvisioningArtifact = "UpdateProvisioningArtifact" - -// UpdateProvisioningArtifactRequest generates a "aws/request.Request" representing the -// client's request for the UpdateProvisioningArtifact operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateProvisioningArtifact for more information on using the UpdateProvisioningArtifact -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateProvisioningArtifactRequest method. -// req, resp := client.UpdateProvisioningArtifactRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProvisioningArtifact -func (c *ServiceCatalog) UpdateProvisioningArtifactRequest(input *UpdateProvisioningArtifactInput) (req *request.Request, output *UpdateProvisioningArtifactOutput) { - op := &request.Operation{ - Name: opUpdateProvisioningArtifact, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateProvisioningArtifactInput{} - } - - output = &UpdateProvisioningArtifactOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateProvisioningArtifact API operation for AWS Service Catalog. -// -// Updates the specified provisioning artifact (also known as a version) for -// the specified product. -// -// You cannot update a provisioning artifact for a product that was shared with -// you. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation UpdateProvisioningArtifact for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProvisioningArtifact -func (c *ServiceCatalog) UpdateProvisioningArtifact(input *UpdateProvisioningArtifactInput) (*UpdateProvisioningArtifactOutput, error) { - req, out := c.UpdateProvisioningArtifactRequest(input) - return out, req.Send() -} - -// UpdateProvisioningArtifactWithContext is the same as UpdateProvisioningArtifact with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateProvisioningArtifact for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) UpdateProvisioningArtifactWithContext(ctx aws.Context, input *UpdateProvisioningArtifactInput, opts ...request.Option) (*UpdateProvisioningArtifactOutput, error) { - req, out := c.UpdateProvisioningArtifactRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateServiceAction = "UpdateServiceAction" - -// UpdateServiceActionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateServiceAction operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateServiceAction for more information on using the UpdateServiceAction -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateServiceActionRequest method. -// req, resp := client.UpdateServiceActionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateServiceAction -func (c *ServiceCatalog) UpdateServiceActionRequest(input *UpdateServiceActionInput) (req *request.Request, output *UpdateServiceActionOutput) { - op := &request.Operation{ - Name: opUpdateServiceAction, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateServiceActionInput{} - } - - output = &UpdateServiceActionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateServiceAction API operation for AWS Service Catalog. -// -// Updates a self-service action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation UpdateServiceAction for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateServiceAction -func (c *ServiceCatalog) UpdateServiceAction(input *UpdateServiceActionInput) (*UpdateServiceActionOutput, error) { - req, out := c.UpdateServiceActionRequest(input) - return out, req.Send() -} - -// UpdateServiceActionWithContext is the same as UpdateServiceAction with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateServiceAction for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) UpdateServiceActionWithContext(ctx aws.Context, input *UpdateServiceActionInput, opts ...request.Option) (*UpdateServiceActionOutput, error) { - req, out := c.UpdateServiceActionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateTagOption = "UpdateTagOption" - -// UpdateTagOptionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateTagOption operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateTagOption for more information on using the UpdateTagOption -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateTagOptionRequest method. -// req, resp := client.UpdateTagOptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateTagOption -func (c *ServiceCatalog) UpdateTagOptionRequest(input *UpdateTagOptionInput) (req *request.Request, output *UpdateTagOptionOutput) { - op := &request.Operation{ - Name: opUpdateTagOption, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateTagOptionInput{} - } - - output = &UpdateTagOptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateTagOption API operation for AWS Service Catalog. -// -// Updates the specified TagOption. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Service Catalog's -// API operation UpdateTagOption for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The specified resource was not found. -// -// * ErrCodeDuplicateResourceException "DuplicateResourceException" -// The specified resource is a duplicate. -// -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateTagOption -func (c *ServiceCatalog) UpdateTagOption(input *UpdateTagOptionInput) (*UpdateTagOptionOutput, error) { - req, out := c.UpdateTagOptionRequest(input) - return out, req.Send() -} - -// UpdateTagOptionWithContext is the same as UpdateTagOption with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateTagOption for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceCatalog) UpdateTagOptionWithContext(ctx aws.Context, input *UpdateTagOptionInput, opts ...request.Option) (*UpdateTagOptionOutput, error) { - req, out := c.UpdateTagOptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AcceptPortfolioShareInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The portfolio identifier. - // - // PortfolioId is a required field - PortfolioId *string `min:"1" type:"string" required:"true"` - - // The type of shared portfolios to accept. The default is to accept imported - // portfolios. - // - // * AWS_ORGANIZATIONS - Accept portfolios shared by the master account of - // your organization. - // - // * IMPORTED - Accept imported portfolios. - // - // * AWS_SERVICECATALOG - Not supported. (Throws ResourceNotFoundException.) - // - // For example, aws servicecatalog accept-portfolio-share --portfolio-id "port-2qwzkwxt3y5fk" - // --portfolio-share-type AWS_ORGANIZATIONS - PortfolioShareType *string `type:"string" enum:"PortfolioShareType"` -} - -// String returns the string representation -func (s AcceptPortfolioShareInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptPortfolioShareInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AcceptPortfolioShareInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AcceptPortfolioShareInput"} - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *AcceptPortfolioShareInput) SetAcceptLanguage(v string) *AcceptPortfolioShareInput { - s.AcceptLanguage = &v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *AcceptPortfolioShareInput) SetPortfolioId(v string) *AcceptPortfolioShareInput { - s.PortfolioId = &v - return s -} - -// SetPortfolioShareType sets the PortfolioShareType field's value. -func (s *AcceptPortfolioShareInput) SetPortfolioShareType(v string) *AcceptPortfolioShareInput { - s.PortfolioShareType = &v - return s -} - -type AcceptPortfolioShareOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AcceptPortfolioShareOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AcceptPortfolioShareOutput) GoString() string { - return s.String() -} - -// The access level to use to filter results. -type AccessLevelFilter struct { - _ struct{} `type:"structure"` - - // The access level. - // - // * Account - Filter results based on the account. - // - // * Role - Filter results based on the federated role of the specified user. - // - // * User - Filter results based on the specified user. - Key *string `type:"string" enum:"AccessLevelFilterKey"` - - // The user to which the access level applies. The only supported value is Self. - Value *string `type:"string"` -} - -// String returns the string representation -func (s AccessLevelFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccessLevelFilter) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *AccessLevelFilter) SetKey(v string) *AccessLevelFilter { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *AccessLevelFilter) SetValue(v string) *AccessLevelFilter { - s.Value = &v - return s -} - -type AssociatePrincipalWithPortfolioInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The portfolio identifier. - // - // PortfolioId is a required field - PortfolioId *string `min:"1" type:"string" required:"true"` - - // The ARN of the principal (IAM user, role, or group). - // - // PrincipalARN is a required field - PrincipalARN *string `min:"1" type:"string" required:"true"` - - // The principal type. The supported value is IAM. - // - // PrincipalType is a required field - PrincipalType *string `type:"string" required:"true" enum:"PrincipalType"` -} - -// String returns the string representation -func (s AssociatePrincipalWithPortfolioInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociatePrincipalWithPortfolioInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociatePrincipalWithPortfolioInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociatePrincipalWithPortfolioInput"} - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } - if s.PrincipalARN == nil { - invalidParams.Add(request.NewErrParamRequired("PrincipalARN")) - } - if s.PrincipalARN != nil && len(*s.PrincipalARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PrincipalARN", 1)) - } - if s.PrincipalType == nil { - invalidParams.Add(request.NewErrParamRequired("PrincipalType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *AssociatePrincipalWithPortfolioInput) SetAcceptLanguage(v string) *AssociatePrincipalWithPortfolioInput { - s.AcceptLanguage = &v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *AssociatePrincipalWithPortfolioInput) SetPortfolioId(v string) *AssociatePrincipalWithPortfolioInput { - s.PortfolioId = &v - return s -} - -// SetPrincipalARN sets the PrincipalARN field's value. -func (s *AssociatePrincipalWithPortfolioInput) SetPrincipalARN(v string) *AssociatePrincipalWithPortfolioInput { - s.PrincipalARN = &v - return s -} - -// SetPrincipalType sets the PrincipalType field's value. -func (s *AssociatePrincipalWithPortfolioInput) SetPrincipalType(v string) *AssociatePrincipalWithPortfolioInput { - s.PrincipalType = &v - return s -} - -type AssociatePrincipalWithPortfolioOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssociatePrincipalWithPortfolioOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociatePrincipalWithPortfolioOutput) GoString() string { - return s.String() -} - -type AssociateProductWithPortfolioInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The portfolio identifier. - // - // PortfolioId is a required field - PortfolioId *string `min:"1" type:"string" required:"true"` - - // The product identifier. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` - - // The identifier of the source portfolio. - SourcePortfolioId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s AssociateProductWithPortfolioInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateProductWithPortfolioInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateProductWithPortfolioInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateProductWithPortfolioInput"} - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - if s.SourcePortfolioId != nil && len(*s.SourcePortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourcePortfolioId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *AssociateProductWithPortfolioInput) SetAcceptLanguage(v string) *AssociateProductWithPortfolioInput { - s.AcceptLanguage = &v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *AssociateProductWithPortfolioInput) SetPortfolioId(v string) *AssociateProductWithPortfolioInput { - s.PortfolioId = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *AssociateProductWithPortfolioInput) SetProductId(v string) *AssociateProductWithPortfolioInput { - s.ProductId = &v - return s -} - -// SetSourcePortfolioId sets the SourcePortfolioId field's value. -func (s *AssociateProductWithPortfolioInput) SetSourcePortfolioId(v string) *AssociateProductWithPortfolioInput { - s.SourcePortfolioId = &v - return s -} - -type AssociateProductWithPortfolioOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssociateProductWithPortfolioOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateProductWithPortfolioOutput) GoString() string { - return s.String() -} - -type AssociateServiceActionWithProvisioningArtifactInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The product identifier. For example, prod-abcdzk7xy33qa. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` - - // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. - // - // ProvisioningArtifactId is a required field - ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` - - // The self-service action identifier. For example, act-fs7abcd89wxyz. - // - // ServiceActionId is a required field - ServiceActionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateServiceActionWithProvisioningArtifactInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateServiceActionWithProvisioningArtifactInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateServiceActionWithProvisioningArtifactInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateServiceActionWithProvisioningArtifactInput"} - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - if s.ProvisioningArtifactId == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) - } - if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) - } - if s.ServiceActionId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) - } - if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *AssociateServiceActionWithProvisioningArtifactInput) SetAcceptLanguage(v string) *AssociateServiceActionWithProvisioningArtifactInput { - s.AcceptLanguage = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *AssociateServiceActionWithProvisioningArtifactInput) SetProductId(v string) *AssociateServiceActionWithProvisioningArtifactInput { - s.ProductId = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *AssociateServiceActionWithProvisioningArtifactInput) SetProvisioningArtifactId(v string) *AssociateServiceActionWithProvisioningArtifactInput { - s.ProvisioningArtifactId = &v - return s -} - -// SetServiceActionId sets the ServiceActionId field's value. -func (s *AssociateServiceActionWithProvisioningArtifactInput) SetServiceActionId(v string) *AssociateServiceActionWithProvisioningArtifactInput { - s.ServiceActionId = &v - return s -} - -type AssociateServiceActionWithProvisioningArtifactOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssociateServiceActionWithProvisioningArtifactOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateServiceActionWithProvisioningArtifactOutput) GoString() string { - return s.String() -} - -type AssociateTagOptionWithResourceInput struct { - _ struct{} `type:"structure"` - - // The resource identifier. - // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` - - // The TagOption identifier. - // - // TagOptionId is a required field - TagOptionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateTagOptionWithResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateTagOptionWithResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateTagOptionWithResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateTagOptionWithResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.TagOptionId == nil { - invalidParams.Add(request.NewErrParamRequired("TagOptionId")) - } - if s.TagOptionId != nil && len(*s.TagOptionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagOptionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *AssociateTagOptionWithResourceInput) SetResourceId(v string) *AssociateTagOptionWithResourceInput { - s.ResourceId = &v - return s -} - -// SetTagOptionId sets the TagOptionId field's value. -func (s *AssociateTagOptionWithResourceInput) SetTagOptionId(v string) *AssociateTagOptionWithResourceInput { - s.TagOptionId = &v - return s -} - -type AssociateTagOptionWithResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssociateTagOptionWithResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateTagOptionWithResourceOutput) GoString() string { - return s.String() -} - -type BatchAssociateServiceActionWithProvisioningArtifactInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // One or more associations, each consisting of the Action ID, the Product ID, - // and the Provisioning Artifact ID. - // - // ServiceActionAssociations is a required field - ServiceActionAssociations []*ServiceActionAssociation `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchAssociateServiceActionWithProvisioningArtifactInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchAssociateServiceActionWithProvisioningArtifactInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchAssociateServiceActionWithProvisioningArtifactInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchAssociateServiceActionWithProvisioningArtifactInput"} - if s.ServiceActionAssociations == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceActionAssociations")) - } - if s.ServiceActionAssociations != nil && len(s.ServiceActionAssociations) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceActionAssociations", 1)) - } - if s.ServiceActionAssociations != nil { - for i, v := range s.ServiceActionAssociations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ServiceActionAssociations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *BatchAssociateServiceActionWithProvisioningArtifactInput) SetAcceptLanguage(v string) *BatchAssociateServiceActionWithProvisioningArtifactInput { - s.AcceptLanguage = &v - return s -} - -// SetServiceActionAssociations sets the ServiceActionAssociations field's value. -func (s *BatchAssociateServiceActionWithProvisioningArtifactInput) SetServiceActionAssociations(v []*ServiceActionAssociation) *BatchAssociateServiceActionWithProvisioningArtifactInput { - s.ServiceActionAssociations = v - return s -} - -type BatchAssociateServiceActionWithProvisioningArtifactOutput struct { - _ struct{} `type:"structure"` - - // An object that contains a list of errors, along with information to help - // you identify the self-service action. - FailedServiceActionAssociations []*FailedServiceActionAssociation `type:"list"` -} - -// String returns the string representation -func (s BatchAssociateServiceActionWithProvisioningArtifactOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchAssociateServiceActionWithProvisioningArtifactOutput) GoString() string { - return s.String() -} - -// SetFailedServiceActionAssociations sets the FailedServiceActionAssociations field's value. -func (s *BatchAssociateServiceActionWithProvisioningArtifactOutput) SetFailedServiceActionAssociations(v []*FailedServiceActionAssociation) *BatchAssociateServiceActionWithProvisioningArtifactOutput { - s.FailedServiceActionAssociations = v - return s -} - -type BatchDisassociateServiceActionFromProvisioningArtifactInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // One or more associations, each consisting of the Action ID, the Product ID, - // and the Provisioning Artifact ID. - // - // ServiceActionAssociations is a required field - ServiceActionAssociations []*ServiceActionAssociation `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s BatchDisassociateServiceActionFromProvisioningArtifactInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDisassociateServiceActionFromProvisioningArtifactInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchDisassociateServiceActionFromProvisioningArtifactInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchDisassociateServiceActionFromProvisioningArtifactInput"} - if s.ServiceActionAssociations == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceActionAssociations")) - } - if s.ServiceActionAssociations != nil && len(s.ServiceActionAssociations) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceActionAssociations", 1)) - } - if s.ServiceActionAssociations != nil { - for i, v := range s.ServiceActionAssociations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ServiceActionAssociations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *BatchDisassociateServiceActionFromProvisioningArtifactInput) SetAcceptLanguage(v string) *BatchDisassociateServiceActionFromProvisioningArtifactInput { - s.AcceptLanguage = &v - return s -} - -// SetServiceActionAssociations sets the ServiceActionAssociations field's value. -func (s *BatchDisassociateServiceActionFromProvisioningArtifactInput) SetServiceActionAssociations(v []*ServiceActionAssociation) *BatchDisassociateServiceActionFromProvisioningArtifactInput { - s.ServiceActionAssociations = v - return s -} - -type BatchDisassociateServiceActionFromProvisioningArtifactOutput struct { - _ struct{} `type:"structure"` - - // An object that contains a list of errors, along with information to help - // you identify the self-service action. - FailedServiceActionAssociations []*FailedServiceActionAssociation `type:"list"` -} - -// String returns the string representation -func (s BatchDisassociateServiceActionFromProvisioningArtifactOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDisassociateServiceActionFromProvisioningArtifactOutput) GoString() string { - return s.String() -} - -// SetFailedServiceActionAssociations sets the FailedServiceActionAssociations field's value. -func (s *BatchDisassociateServiceActionFromProvisioningArtifactOutput) SetFailedServiceActionAssociations(v []*FailedServiceActionAssociation) *BatchDisassociateServiceActionFromProvisioningArtifactOutput { - s.FailedServiceActionAssociations = v - return s -} - -// Information about a CloudWatch dashboard. -type CloudWatchDashboard struct { - _ struct{} `type:"structure"` - - // The name of the CloudWatch dashboard. - Name *string `type:"string"` -} - -// String returns the string representation -func (s CloudWatchDashboard) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudWatchDashboard) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *CloudWatchDashboard) SetName(v string) *CloudWatchDashboard { - s.Name = &v - return s -} - -// Information about a constraint. -type ConstraintDetail struct { - _ struct{} `type:"structure"` - - // The identifier of the constraint. - ConstraintId *string `min:"1" type:"string"` - - // The description of the constraint. - Description *string `type:"string"` - - // The owner of the constraint. - Owner *string `type:"string"` - - // The type of constraint. - // - // * LAUNCH - // - // * NOTIFICATION - // - // * STACKSET - // - // * TEMPLATE - Type *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ConstraintDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConstraintDetail) GoString() string { - return s.String() -} - -// SetConstraintId sets the ConstraintId field's value. -func (s *ConstraintDetail) SetConstraintId(v string) *ConstraintDetail { - s.ConstraintId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ConstraintDetail) SetDescription(v string) *ConstraintDetail { - s.Description = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *ConstraintDetail) SetOwner(v string) *ConstraintDetail { - s.Owner = &v - return s -} - -// SetType sets the Type field's value. -func (s *ConstraintDetail) SetType(v string) *ConstraintDetail { - s.Type = &v - return s -} - -// Summary information about a constraint. -type ConstraintSummary struct { - _ struct{} `type:"structure"` - - // The description of the constraint. - Description *string `type:"string"` - - // The type of constraint. - // - // * LAUNCH - // - // * NOTIFICATION - // - // * STACKSET - // - // * TEMPLATE - Type *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ConstraintSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConstraintSummary) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *ConstraintSummary) SetDescription(v string) *ConstraintSummary { - s.Description = &v - return s -} - -// SetType sets the Type field's value. -func (s *ConstraintSummary) SetType(v string) *ConstraintSummary { - s.Type = &v - return s -} - -type CopyProductInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The copy options. If the value is CopyTags, the tags from the source product - // are copied to the target product. - CopyOptions []*string `type:"list"` - - // A unique identifier that you provide to ensure idempotency. If multiple requests - // differ only by the idempotency token, the same response is returned for each - // repeated request. - IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // The Amazon Resource Name (ARN) of the source product. - // - // SourceProductArn is a required field - SourceProductArn *string `min:"1" type:"string" required:"true"` - - // The identifiers of the provisioning artifacts (also known as versions) of - // the product to copy. By default, all provisioning artifacts are copied. - SourceProvisioningArtifactIdentifiers []map[string]*string `type:"list"` - - // The identifier of the target product. By default, a new product is created. - TargetProductId *string `min:"1" type:"string"` - - // A name for the target product. The default is the name of the source product. - TargetProductName *string `type:"string"` -} - -// String returns the string representation -func (s CopyProductInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyProductInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyProductInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyProductInput"} - if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) - } - if s.SourceProductArn == nil { - invalidParams.Add(request.NewErrParamRequired("SourceProductArn")) - } - if s.SourceProductArn != nil && len(*s.SourceProductArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceProductArn", 1)) - } - if s.TargetProductId != nil && len(*s.TargetProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetProductId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *CopyProductInput) SetAcceptLanguage(v string) *CopyProductInput { - s.AcceptLanguage = &v - return s -} - -// SetCopyOptions sets the CopyOptions field's value. -func (s *CopyProductInput) SetCopyOptions(v []*string) *CopyProductInput { - s.CopyOptions = v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *CopyProductInput) SetIdempotencyToken(v string) *CopyProductInput { - s.IdempotencyToken = &v - return s -} - -// SetSourceProductArn sets the SourceProductArn field's value. -func (s *CopyProductInput) SetSourceProductArn(v string) *CopyProductInput { - s.SourceProductArn = &v - return s -} - -// SetSourceProvisioningArtifactIdentifiers sets the SourceProvisioningArtifactIdentifiers field's value. -func (s *CopyProductInput) SetSourceProvisioningArtifactIdentifiers(v []map[string]*string) *CopyProductInput { - s.SourceProvisioningArtifactIdentifiers = v - return s -} - -// SetTargetProductId sets the TargetProductId field's value. -func (s *CopyProductInput) SetTargetProductId(v string) *CopyProductInput { - s.TargetProductId = &v - return s -} - -// SetTargetProductName sets the TargetProductName field's value. -func (s *CopyProductInput) SetTargetProductName(v string) *CopyProductInput { - s.TargetProductName = &v - return s -} - -type CopyProductOutput struct { - _ struct{} `type:"structure"` - - // The token to use to track the progress of the operation. - CopyProductToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CopyProductOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CopyProductOutput) GoString() string { - return s.String() -} - -// SetCopyProductToken sets the CopyProductToken field's value. -func (s *CopyProductOutput) SetCopyProductToken(v string) *CopyProductOutput { - s.CopyProductToken = &v - return s -} - -type CreateConstraintInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The description of the constraint. - Description *string `type:"string"` - - // A unique identifier that you provide to ensure idempotency. If multiple requests - // differ only by the idempotency token, the same response is returned for each - // repeated request. - IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // The constraint parameters, in JSON format. The syntax depends on the constraint - // type as follows: - // - // LAUNCHSpecify the RoleArn property as follows: - // - // {"RoleArn" : "arn:aws:iam::123456789012:role/LaunchRole"} - // - // You cannot have both a LAUNCH and a STACKSET constraint. - // - // You also cannot have more than one LAUNCH constraint on a product and portfolio. - // - // NOTIFICATIONSpecify the NotificationArns property as follows: - // - // {"NotificationArns" : ["arn:aws:sns:us-east-1:123456789012:Topic"]} - // - // STACKSETSpecify the Parameters property as follows: - // - // {"Version": "String", "Properties": {"AccountList": [ "String" ], "RegionList": - // [ "String" ], "AdminRole": "String", "ExecutionRole": "String"}} - // - // You cannot have both a LAUNCH and a STACKSET constraint. - // - // You also cannot have more than one STACKSET constraint on a product and portfolio. - // - // Products with a STACKSET constraint will launch an AWS CloudFormation stack - // set. - // - // TEMPLATESpecify the Rules property. For more information, see Template Constraint - // Rules (http://docs.aws.amazon.com/servicecatalog/latest/adminguide/reference-template_constraint_rules.html). - // - // Parameters is a required field - Parameters *string `type:"string" required:"true"` - - // The portfolio identifier. - // - // PortfolioId is a required field - PortfolioId *string `min:"1" type:"string" required:"true"` - - // The product identifier. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` - - // The type of constraint. - // - // * LAUNCH - // - // * NOTIFICATION - // - // * STACKSET - // - // * TEMPLATE - // - // Type is a required field - Type *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateConstraintInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConstraintInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateConstraintInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateConstraintInput"} - if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) - } - if s.Parameters == nil { - invalidParams.Add(request.NewErrParamRequired("Parameters")) - } - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Type != nil && len(*s.Type) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Type", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *CreateConstraintInput) SetAcceptLanguage(v string) *CreateConstraintInput { - s.AcceptLanguage = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateConstraintInput) SetDescription(v string) *CreateConstraintInput { - s.Description = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *CreateConstraintInput) SetIdempotencyToken(v string) *CreateConstraintInput { - s.IdempotencyToken = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *CreateConstraintInput) SetParameters(v string) *CreateConstraintInput { - s.Parameters = &v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *CreateConstraintInput) SetPortfolioId(v string) *CreateConstraintInput { - s.PortfolioId = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *CreateConstraintInput) SetProductId(v string) *CreateConstraintInput { - s.ProductId = &v - return s -} - -// SetType sets the Type field's value. -func (s *CreateConstraintInput) SetType(v string) *CreateConstraintInput { - s.Type = &v - return s -} - -type CreateConstraintOutput struct { - _ struct{} `type:"structure"` - - // Information about the constraint. - ConstraintDetail *ConstraintDetail `type:"structure"` - - // The constraint parameters. - ConstraintParameters *string `type:"string"` - - // The status of the current request. - Status *string `type:"string" enum:"Status"` -} - -// String returns the string representation -func (s CreateConstraintOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConstraintOutput) GoString() string { - return s.String() -} - -// SetConstraintDetail sets the ConstraintDetail field's value. -func (s *CreateConstraintOutput) SetConstraintDetail(v *ConstraintDetail) *CreateConstraintOutput { - s.ConstraintDetail = v - return s -} - -// SetConstraintParameters sets the ConstraintParameters field's value. -func (s *CreateConstraintOutput) SetConstraintParameters(v string) *CreateConstraintOutput { - s.ConstraintParameters = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CreateConstraintOutput) SetStatus(v string) *CreateConstraintOutput { - s.Status = &v - return s -} - -type CreatePortfolioInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The description of the portfolio. - Description *string `type:"string"` - - // The name to use for display purposes. - // - // DisplayName is a required field - DisplayName *string `min:"1" type:"string" required:"true"` - - // A unique identifier that you provide to ensure idempotency. If multiple requests - // differ only by the idempotency token, the same response is returned for each - // repeated request. - IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // The name of the portfolio provider. - // - // ProviderName is a required field - ProviderName *string `min:"1" type:"string" required:"true"` - - // One or more tags. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreatePortfolioInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePortfolioInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePortfolioInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePortfolioInput"} - if s.DisplayName == nil { - invalidParams.Add(request.NewErrParamRequired("DisplayName")) - } - if s.DisplayName != nil && len(*s.DisplayName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DisplayName", 1)) - } - if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) - } - if s.ProviderName == nil { - invalidParams.Add(request.NewErrParamRequired("ProviderName")) - } - if s.ProviderName != nil && len(*s.ProviderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProviderName", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *CreatePortfolioInput) SetAcceptLanguage(v string) *CreatePortfolioInput { - s.AcceptLanguage = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreatePortfolioInput) SetDescription(v string) *CreatePortfolioInput { - s.Description = &v - return s -} - -// SetDisplayName sets the DisplayName field's value. -func (s *CreatePortfolioInput) SetDisplayName(v string) *CreatePortfolioInput { - s.DisplayName = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *CreatePortfolioInput) SetIdempotencyToken(v string) *CreatePortfolioInput { - s.IdempotencyToken = &v - return s -} - -// SetProviderName sets the ProviderName field's value. -func (s *CreatePortfolioInput) SetProviderName(v string) *CreatePortfolioInput { - s.ProviderName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreatePortfolioInput) SetTags(v []*Tag) *CreatePortfolioInput { - s.Tags = v - return s -} - -type CreatePortfolioOutput struct { - _ struct{} `type:"structure"` - - // Information about the portfolio. - PortfolioDetail *PortfolioDetail `type:"structure"` - - // Information about the tags associated with the portfolio. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreatePortfolioOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePortfolioOutput) GoString() string { - return s.String() -} - -// SetPortfolioDetail sets the PortfolioDetail field's value. -func (s *CreatePortfolioOutput) SetPortfolioDetail(v *PortfolioDetail) *CreatePortfolioOutput { - s.PortfolioDetail = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreatePortfolioOutput) SetTags(v []*Tag) *CreatePortfolioOutput { - s.Tags = v - return s -} - -type CreatePortfolioShareInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The AWS account ID. For example, 123456789012. - AccountId *string `type:"string"` - - // The organization node to whom you are going to share. If OrganizationNode - // is passed in, PortfolioShare will be created for the node and its children - // (when applies), and a PortfolioShareToken will be returned in the output - // in order for the administrator to monitor the status of the PortfolioShare - // creation process. - OrganizationNode *OrganizationNode `type:"structure"` - - // The portfolio identifier. - // - // PortfolioId is a required field - PortfolioId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreatePortfolioShareInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePortfolioShareInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePortfolioShareInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePortfolioShareInput"} - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *CreatePortfolioShareInput) SetAcceptLanguage(v string) *CreatePortfolioShareInput { - s.AcceptLanguage = &v - return s -} - -// SetAccountId sets the AccountId field's value. -func (s *CreatePortfolioShareInput) SetAccountId(v string) *CreatePortfolioShareInput { - s.AccountId = &v - return s -} - -// SetOrganizationNode sets the OrganizationNode field's value. -func (s *CreatePortfolioShareInput) SetOrganizationNode(v *OrganizationNode) *CreatePortfolioShareInput { - s.OrganizationNode = v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *CreatePortfolioShareInput) SetPortfolioId(v string) *CreatePortfolioShareInput { - s.PortfolioId = &v - return s -} - -type CreatePortfolioShareOutput struct { - _ struct{} `type:"structure"` - - // The portfolio share unique identifier. This will only be returned if portfolio - // is shared to an organization node. - PortfolioShareToken *string `type:"string"` -} - -// String returns the string representation -func (s CreatePortfolioShareOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePortfolioShareOutput) GoString() string { - return s.String() -} - -// SetPortfolioShareToken sets the PortfolioShareToken field's value. -func (s *CreatePortfolioShareOutput) SetPortfolioShareToken(v string) *CreatePortfolioShareOutput { - s.PortfolioShareToken = &v - return s -} - -type CreateProductInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The description of the product. - Description *string `type:"string"` - - // The distributor of the product. - Distributor *string `type:"string"` - - // A unique identifier that you provide to ensure idempotency. If multiple requests - // differ only by the idempotency token, the same response is returned for each - // repeated request. - IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // The name of the product. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The owner of the product. - // - // Owner is a required field - Owner *string `type:"string" required:"true"` - - // The type of product. - // - // ProductType is a required field - ProductType *string `type:"string" required:"true" enum:"ProductType"` - - // The configuration of the provisioning artifact. - // - // ProvisioningArtifactParameters is a required field - ProvisioningArtifactParameters *ProvisioningArtifactProperties `type:"structure" required:"true"` - - // The support information about the product. - SupportDescription *string `type:"string"` - - // The contact email for product support. - SupportEmail *string `type:"string"` - - // The contact URL for product support. - SupportUrl *string `type:"string"` - - // One or more tags. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreateProductInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateProductInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateProductInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateProductInput"} - if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Owner == nil { - invalidParams.Add(request.NewErrParamRequired("Owner")) - } - if s.ProductType == nil { - invalidParams.Add(request.NewErrParamRequired("ProductType")) - } - if s.ProvisioningArtifactParameters == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactParameters")) - } - if s.ProvisioningArtifactParameters != nil { - if err := s.ProvisioningArtifactParameters.Validate(); err != nil { - invalidParams.AddNested("ProvisioningArtifactParameters", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *CreateProductInput) SetAcceptLanguage(v string) *CreateProductInput { - s.AcceptLanguage = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateProductInput) SetDescription(v string) *CreateProductInput { - s.Description = &v - return s -} - -// SetDistributor sets the Distributor field's value. -func (s *CreateProductInput) SetDistributor(v string) *CreateProductInput { - s.Distributor = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *CreateProductInput) SetIdempotencyToken(v string) *CreateProductInput { - s.IdempotencyToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateProductInput) SetName(v string) *CreateProductInput { - s.Name = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *CreateProductInput) SetOwner(v string) *CreateProductInput { - s.Owner = &v - return s -} - -// SetProductType sets the ProductType field's value. -func (s *CreateProductInput) SetProductType(v string) *CreateProductInput { - s.ProductType = &v - return s -} - -// SetProvisioningArtifactParameters sets the ProvisioningArtifactParameters field's value. -func (s *CreateProductInput) SetProvisioningArtifactParameters(v *ProvisioningArtifactProperties) *CreateProductInput { - s.ProvisioningArtifactParameters = v - return s -} - -// SetSupportDescription sets the SupportDescription field's value. -func (s *CreateProductInput) SetSupportDescription(v string) *CreateProductInput { - s.SupportDescription = &v - return s -} - -// SetSupportEmail sets the SupportEmail field's value. -func (s *CreateProductInput) SetSupportEmail(v string) *CreateProductInput { - s.SupportEmail = &v - return s -} - -// SetSupportUrl sets the SupportUrl field's value. -func (s *CreateProductInput) SetSupportUrl(v string) *CreateProductInput { - s.SupportUrl = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateProductInput) SetTags(v []*Tag) *CreateProductInput { - s.Tags = v - return s -} - -type CreateProductOutput struct { - _ struct{} `type:"structure"` - - // Information about the product view. - ProductViewDetail *ProductViewDetail `type:"structure"` - - // Information about the provisioning artifact. - ProvisioningArtifactDetail *ProvisioningArtifactDetail `type:"structure"` - - // Information about the tags associated with the product. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreateProductOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateProductOutput) GoString() string { - return s.String() -} - -// SetProductViewDetail sets the ProductViewDetail field's value. -func (s *CreateProductOutput) SetProductViewDetail(v *ProductViewDetail) *CreateProductOutput { - s.ProductViewDetail = v - return s -} - -// SetProvisioningArtifactDetail sets the ProvisioningArtifactDetail field's value. -func (s *CreateProductOutput) SetProvisioningArtifactDetail(v *ProvisioningArtifactDetail) *CreateProductOutput { - s.ProvisioningArtifactDetail = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateProductOutput) SetTags(v []*Tag) *CreateProductOutput { - s.Tags = v - return s -} - -type CreateProvisionedProductPlanInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // A unique identifier that you provide to ensure idempotency. If multiple requests - // differ only by the idempotency token, the same response is returned for each - // repeated request. - IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // Passed to CloudFormation. The SNS topic ARNs to which to publish stack-related - // events. - NotificationArns []*string `type:"list"` - - // The path identifier of the product. This value is optional if the product - // has a default path, and required if the product has more than one path. To - // list the paths for a product, use ListLaunchPaths. - PathId *string `min:"1" type:"string"` - - // The name of the plan. - // - // PlanName is a required field - PlanName *string `type:"string" required:"true"` - - // The plan type. - // - // PlanType is a required field - PlanType *string `type:"string" required:"true" enum:"ProvisionedProductPlanType"` - - // The product identifier. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` - - // A user-friendly name for the provisioned product. This value must be unique - // for the AWS account and cannot be updated after the product is provisioned. - // - // ProvisionedProductName is a required field - ProvisionedProductName *string `min:"1" type:"string" required:"true"` - - // The identifier of the provisioning artifact. - // - // ProvisioningArtifactId is a required field - ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` - - // Parameters specified by the administrator that are required for provisioning - // the product. - ProvisioningParameters []*UpdateProvisioningParameter `type:"list"` - - // One or more tags. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s CreateProvisionedProductPlanInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateProvisionedProductPlanInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateProvisionedProductPlanInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateProvisionedProductPlanInput"} - if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) - } - if s.PathId != nil && len(*s.PathId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathId", 1)) - } - if s.PlanName == nil { - invalidParams.Add(request.NewErrParamRequired("PlanName")) - } - if s.PlanType == nil { - invalidParams.Add(request.NewErrParamRequired("PlanType")) - } - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - if s.ProvisionedProductName == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisionedProductName")) - } - if s.ProvisionedProductName != nil && len(*s.ProvisionedProductName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductName", 1)) - } - if s.ProvisioningArtifactId == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) - } - if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) - } - if s.ProvisioningParameters != nil { - for i, v := range s.ProvisioningParameters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ProvisioningParameters", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *CreateProvisionedProductPlanInput) SetAcceptLanguage(v string) *CreateProvisionedProductPlanInput { - s.AcceptLanguage = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *CreateProvisionedProductPlanInput) SetIdempotencyToken(v string) *CreateProvisionedProductPlanInput { - s.IdempotencyToken = &v - return s -} - -// SetNotificationArns sets the NotificationArns field's value. -func (s *CreateProvisionedProductPlanInput) SetNotificationArns(v []*string) *CreateProvisionedProductPlanInput { - s.NotificationArns = v - return s -} - -// SetPathId sets the PathId field's value. -func (s *CreateProvisionedProductPlanInput) SetPathId(v string) *CreateProvisionedProductPlanInput { - s.PathId = &v - return s -} - -// SetPlanName sets the PlanName field's value. -func (s *CreateProvisionedProductPlanInput) SetPlanName(v string) *CreateProvisionedProductPlanInput { - s.PlanName = &v - return s -} - -// SetPlanType sets the PlanType field's value. -func (s *CreateProvisionedProductPlanInput) SetPlanType(v string) *CreateProvisionedProductPlanInput { - s.PlanType = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *CreateProvisionedProductPlanInput) SetProductId(v string) *CreateProvisionedProductPlanInput { - s.ProductId = &v - return s -} - -// SetProvisionedProductName sets the ProvisionedProductName field's value. -func (s *CreateProvisionedProductPlanInput) SetProvisionedProductName(v string) *CreateProvisionedProductPlanInput { - s.ProvisionedProductName = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *CreateProvisionedProductPlanInput) SetProvisioningArtifactId(v string) *CreateProvisionedProductPlanInput { - s.ProvisioningArtifactId = &v - return s -} - -// SetProvisioningParameters sets the ProvisioningParameters field's value. -func (s *CreateProvisionedProductPlanInput) SetProvisioningParameters(v []*UpdateProvisioningParameter) *CreateProvisionedProductPlanInput { - s.ProvisioningParameters = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateProvisionedProductPlanInput) SetTags(v []*Tag) *CreateProvisionedProductPlanInput { - s.Tags = v - return s -} - -type CreateProvisionedProductPlanOutput struct { - _ struct{} `type:"structure"` - - // The plan identifier. - PlanId *string `min:"1" type:"string"` - - // The name of the plan. - PlanName *string `type:"string"` - - // The product identifier. - ProvisionProductId *string `min:"1" type:"string"` - - // The user-friendly name of the provisioned product. - ProvisionedProductName *string `min:"1" type:"string"` - - // The identifier of the provisioning artifact. - ProvisioningArtifactId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateProvisionedProductPlanOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateProvisionedProductPlanOutput) GoString() string { - return s.String() -} - -// SetPlanId sets the PlanId field's value. -func (s *CreateProvisionedProductPlanOutput) SetPlanId(v string) *CreateProvisionedProductPlanOutput { - s.PlanId = &v - return s -} - -// SetPlanName sets the PlanName field's value. -func (s *CreateProvisionedProductPlanOutput) SetPlanName(v string) *CreateProvisionedProductPlanOutput { - s.PlanName = &v - return s -} - -// SetProvisionProductId sets the ProvisionProductId field's value. -func (s *CreateProvisionedProductPlanOutput) SetProvisionProductId(v string) *CreateProvisionedProductPlanOutput { - s.ProvisionProductId = &v - return s -} - -// SetProvisionedProductName sets the ProvisionedProductName field's value. -func (s *CreateProvisionedProductPlanOutput) SetProvisionedProductName(v string) *CreateProvisionedProductPlanOutput { - s.ProvisionedProductName = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *CreateProvisionedProductPlanOutput) SetProvisioningArtifactId(v string) *CreateProvisionedProductPlanOutput { - s.ProvisioningArtifactId = &v - return s -} - -type CreateProvisioningArtifactInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // A unique identifier that you provide to ensure idempotency. If multiple requests - // differ only by the idempotency token, the same response is returned for each - // repeated request. - IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // The configuration for the provisioning artifact. - // - // Parameters is a required field - Parameters *ProvisioningArtifactProperties `type:"structure" required:"true"` - - // The product identifier. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateProvisioningArtifactInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateProvisioningArtifactInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateProvisioningArtifactInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateProvisioningArtifactInput"} - if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) - } - if s.Parameters == nil { - invalidParams.Add(request.NewErrParamRequired("Parameters")) - } - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - if s.Parameters != nil { - if err := s.Parameters.Validate(); err != nil { - invalidParams.AddNested("Parameters", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *CreateProvisioningArtifactInput) SetAcceptLanguage(v string) *CreateProvisioningArtifactInput { - s.AcceptLanguage = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *CreateProvisioningArtifactInput) SetIdempotencyToken(v string) *CreateProvisioningArtifactInput { - s.IdempotencyToken = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *CreateProvisioningArtifactInput) SetParameters(v *ProvisioningArtifactProperties) *CreateProvisioningArtifactInput { - s.Parameters = v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *CreateProvisioningArtifactInput) SetProductId(v string) *CreateProvisioningArtifactInput { - s.ProductId = &v - return s -} - -type CreateProvisioningArtifactOutput struct { - _ struct{} `type:"structure"` - - // The URL of the CloudFormation template in Amazon S3, in JSON format. - Info map[string]*string `min:"1" type:"map"` - - // Information about the provisioning artifact. - ProvisioningArtifactDetail *ProvisioningArtifactDetail `type:"structure"` - - // The status of the current request. - Status *string `type:"string" enum:"Status"` -} - -// String returns the string representation -func (s CreateProvisioningArtifactOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateProvisioningArtifactOutput) GoString() string { - return s.String() -} - -// SetInfo sets the Info field's value. -func (s *CreateProvisioningArtifactOutput) SetInfo(v map[string]*string) *CreateProvisioningArtifactOutput { - s.Info = v - return s -} - -// SetProvisioningArtifactDetail sets the ProvisioningArtifactDetail field's value. -func (s *CreateProvisioningArtifactOutput) SetProvisioningArtifactDetail(v *ProvisioningArtifactDetail) *CreateProvisioningArtifactOutput { - s.ProvisioningArtifactDetail = v - return s -} - -// SetStatus sets the Status field's value. -func (s *CreateProvisioningArtifactOutput) SetStatus(v string) *CreateProvisioningArtifactOutput { - s.Status = &v - return s -} - -type CreateServiceActionInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The self-service action definition. Can be one of the following: - // - // NameThe name of the AWS Systems Manager Document. For example, AWS-RestartEC2Instance. - // - // VersionThe AWS Systems Manager automation document version. For example, - // "Version": "1" - // - // AssumeRoleThe Amazon Resource Name (ARN) of the role that performs the self-service - // actions on your behalf. For example, "AssumeRole": "arn:aws:iam::12345678910:role/ActionRole". - // - // To reuse the provisioned product launch role, set to "AssumeRole": "LAUNCH_ROLE". - // - // ParametersThe list of parameters in JSON format. - // - // For example: [{\"Name\":\"InstanceId\",\"Type\":\"TARGET\"}]. - // - // Definition is a required field - Definition map[string]*string `min:"1" type:"map" required:"true"` - - // The service action definition type. For example, SSM_AUTOMATION. - // - // DefinitionType is a required field - DefinitionType *string `type:"string" required:"true" enum:"ServiceActionDefinitionType"` - - // The self-service action description. - Description *string `type:"string"` - - // A unique identifier that you provide to ensure idempotency. If multiple requests - // differ only by the idempotency token, the same response is returned for each - // repeated request. - IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // The self-service action name. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateServiceActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateServiceActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateServiceActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateServiceActionInput"} - if s.Definition == nil { - invalidParams.Add(request.NewErrParamRequired("Definition")) - } - if s.Definition != nil && len(s.Definition) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Definition", 1)) - } - if s.DefinitionType == nil { - invalidParams.Add(request.NewErrParamRequired("DefinitionType")) - } - if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *CreateServiceActionInput) SetAcceptLanguage(v string) *CreateServiceActionInput { - s.AcceptLanguage = &v - return s -} - -// SetDefinition sets the Definition field's value. -func (s *CreateServiceActionInput) SetDefinition(v map[string]*string) *CreateServiceActionInput { - s.Definition = v - return s -} - -// SetDefinitionType sets the DefinitionType field's value. -func (s *CreateServiceActionInput) SetDefinitionType(v string) *CreateServiceActionInput { - s.DefinitionType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateServiceActionInput) SetDescription(v string) *CreateServiceActionInput { - s.Description = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *CreateServiceActionInput) SetIdempotencyToken(v string) *CreateServiceActionInput { - s.IdempotencyToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateServiceActionInput) SetName(v string) *CreateServiceActionInput { - s.Name = &v - return s -} - -type CreateServiceActionOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about the self-service action. - ServiceActionDetail *ServiceActionDetail `type:"structure"` -} - -// String returns the string representation -func (s CreateServiceActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateServiceActionOutput) GoString() string { - return s.String() -} - -// SetServiceActionDetail sets the ServiceActionDetail field's value. -func (s *CreateServiceActionOutput) SetServiceActionDetail(v *ServiceActionDetail) *CreateServiceActionOutput { - s.ServiceActionDetail = v - return s -} - -type CreateTagOptionInput struct { - _ struct{} `type:"structure"` - - // The TagOption key. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The TagOption value. - // - // Value is a required field - Value *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateTagOptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTagOptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTagOptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTagOptionInput"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *CreateTagOptionInput) SetKey(v string) *CreateTagOptionInput { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *CreateTagOptionInput) SetValue(v string) *CreateTagOptionInput { - s.Value = &v - return s -} - -type CreateTagOptionOutput struct { - _ struct{} `type:"structure"` - - // Information about the TagOption. - TagOptionDetail *TagOptionDetail `type:"structure"` -} - -// String returns the string representation -func (s CreateTagOptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTagOptionOutput) GoString() string { - return s.String() -} - -// SetTagOptionDetail sets the TagOptionDetail field's value. -func (s *CreateTagOptionOutput) SetTagOptionDetail(v *TagOptionDetail) *CreateTagOptionOutput { - s.TagOptionDetail = v - return s -} - -type DeleteConstraintInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The identifier of the constraint. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteConstraintInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConstraintInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteConstraintInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteConstraintInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DeleteConstraintInput) SetAcceptLanguage(v string) *DeleteConstraintInput { - s.AcceptLanguage = &v - return s -} - -// SetId sets the Id field's value. -func (s *DeleteConstraintInput) SetId(v string) *DeleteConstraintInput { - s.Id = &v - return s -} - -type DeleteConstraintOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteConstraintOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConstraintOutput) GoString() string { - return s.String() -} - -type DeletePortfolioInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The portfolio identifier. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePortfolioInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePortfolioInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePortfolioInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePortfolioInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DeletePortfolioInput) SetAcceptLanguage(v string) *DeletePortfolioInput { - s.AcceptLanguage = &v - return s -} - -// SetId sets the Id field's value. -func (s *DeletePortfolioInput) SetId(v string) *DeletePortfolioInput { - s.Id = &v - return s -} - -type DeletePortfolioOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePortfolioOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePortfolioOutput) GoString() string { - return s.String() -} - -type DeletePortfolioShareInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The AWS account ID. - AccountId *string `type:"string"` - - // The organization node to whom you are going to stop sharing. - OrganizationNode *OrganizationNode `type:"structure"` - - // The portfolio identifier. - // - // PortfolioId is a required field - PortfolioId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePortfolioShareInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePortfolioShareInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePortfolioShareInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePortfolioShareInput"} - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DeletePortfolioShareInput) SetAcceptLanguage(v string) *DeletePortfolioShareInput { - s.AcceptLanguage = &v - return s -} - -// SetAccountId sets the AccountId field's value. -func (s *DeletePortfolioShareInput) SetAccountId(v string) *DeletePortfolioShareInput { - s.AccountId = &v - return s -} - -// SetOrganizationNode sets the OrganizationNode field's value. -func (s *DeletePortfolioShareInput) SetOrganizationNode(v *OrganizationNode) *DeletePortfolioShareInput { - s.OrganizationNode = v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *DeletePortfolioShareInput) SetPortfolioId(v string) *DeletePortfolioShareInput { - s.PortfolioId = &v - return s -} - -type DeletePortfolioShareOutput struct { - _ struct{} `type:"structure"` - - // The portfolio share unique identifier. This will only be returned if delete - // is made to an organization node. - PortfolioShareToken *string `type:"string"` -} - -// String returns the string representation -func (s DeletePortfolioShareOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePortfolioShareOutput) GoString() string { - return s.String() -} - -// SetPortfolioShareToken sets the PortfolioShareToken field's value. -func (s *DeletePortfolioShareOutput) SetPortfolioShareToken(v string) *DeletePortfolioShareOutput { - s.PortfolioShareToken = &v - return s -} - -type DeleteProductInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The product identifier. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteProductInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteProductInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteProductInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteProductInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DeleteProductInput) SetAcceptLanguage(v string) *DeleteProductInput { - s.AcceptLanguage = &v - return s -} - -// SetId sets the Id field's value. -func (s *DeleteProductInput) SetId(v string) *DeleteProductInput { - s.Id = &v - return s -} - -type DeleteProductOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteProductOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteProductOutput) GoString() string { - return s.String() -} - -type DeleteProvisionedProductPlanInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // If set to true, AWS Service Catalog stops managing the specified provisioned - // product even if it cannot delete the underlying resources. - IgnoreErrors *bool `type:"boolean"` - - // The plan identifier. - // - // PlanId is a required field - PlanId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteProvisionedProductPlanInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteProvisionedProductPlanInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteProvisionedProductPlanInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteProvisionedProductPlanInput"} - if s.PlanId == nil { - invalidParams.Add(request.NewErrParamRequired("PlanId")) - } - if s.PlanId != nil && len(*s.PlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DeleteProvisionedProductPlanInput) SetAcceptLanguage(v string) *DeleteProvisionedProductPlanInput { - s.AcceptLanguage = &v - return s -} - -// SetIgnoreErrors sets the IgnoreErrors field's value. -func (s *DeleteProvisionedProductPlanInput) SetIgnoreErrors(v bool) *DeleteProvisionedProductPlanInput { - s.IgnoreErrors = &v - return s -} - -// SetPlanId sets the PlanId field's value. -func (s *DeleteProvisionedProductPlanInput) SetPlanId(v string) *DeleteProvisionedProductPlanInput { - s.PlanId = &v - return s -} - -type DeleteProvisionedProductPlanOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteProvisionedProductPlanOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteProvisionedProductPlanOutput) GoString() string { - return s.String() -} - -type DeleteProvisioningArtifactInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The product identifier. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` - - // The identifier of the provisioning artifact. - // - // ProvisioningArtifactId is a required field - ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteProvisioningArtifactInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteProvisioningArtifactInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteProvisioningArtifactInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteProvisioningArtifactInput"} - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - if s.ProvisioningArtifactId == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) - } - if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DeleteProvisioningArtifactInput) SetAcceptLanguage(v string) *DeleteProvisioningArtifactInput { - s.AcceptLanguage = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *DeleteProvisioningArtifactInput) SetProductId(v string) *DeleteProvisioningArtifactInput { - s.ProductId = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *DeleteProvisioningArtifactInput) SetProvisioningArtifactId(v string) *DeleteProvisioningArtifactInput { - s.ProvisioningArtifactId = &v - return s -} - -type DeleteProvisioningArtifactOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteProvisioningArtifactOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteProvisioningArtifactOutput) GoString() string { - return s.String() -} - -type DeleteServiceActionInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The self-service action identifier. For example, act-fs7abcd89wxyz. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteServiceActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteServiceActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteServiceActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteServiceActionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DeleteServiceActionInput) SetAcceptLanguage(v string) *DeleteServiceActionInput { - s.AcceptLanguage = &v - return s -} - -// SetId sets the Id field's value. -func (s *DeleteServiceActionInput) SetId(v string) *DeleteServiceActionInput { - s.Id = &v - return s -} - -type DeleteServiceActionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteServiceActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteServiceActionOutput) GoString() string { - return s.String() -} - -type DeleteTagOptionInput struct { - _ struct{} `type:"structure"` - - // The TagOption identifier. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTagOptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagOptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTagOptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTagOptionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteTagOptionInput) SetId(v string) *DeleteTagOptionInput { - s.Id = &v - return s -} - -type DeleteTagOptionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTagOptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagOptionOutput) GoString() string { - return s.String() -} - -type DescribeConstraintInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The identifier of the constraint. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeConstraintInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConstraintInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeConstraintInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeConstraintInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DescribeConstraintInput) SetAcceptLanguage(v string) *DescribeConstraintInput { - s.AcceptLanguage = &v - return s -} - -// SetId sets the Id field's value. -func (s *DescribeConstraintInput) SetId(v string) *DescribeConstraintInput { - s.Id = &v - return s -} - -type DescribeConstraintOutput struct { - _ struct{} `type:"structure"` - - // Information about the constraint. - ConstraintDetail *ConstraintDetail `type:"structure"` - - // The constraint parameters. - ConstraintParameters *string `type:"string"` - - // The status of the current request. - Status *string `type:"string" enum:"Status"` -} - -// String returns the string representation -func (s DescribeConstraintOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConstraintOutput) GoString() string { - return s.String() -} - -// SetConstraintDetail sets the ConstraintDetail field's value. -func (s *DescribeConstraintOutput) SetConstraintDetail(v *ConstraintDetail) *DescribeConstraintOutput { - s.ConstraintDetail = v - return s -} - -// SetConstraintParameters sets the ConstraintParameters field's value. -func (s *DescribeConstraintOutput) SetConstraintParameters(v string) *DescribeConstraintOutput { - s.ConstraintParameters = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeConstraintOutput) SetStatus(v string) *DescribeConstraintOutput { - s.Status = &v - return s -} - -type DescribeCopyProductStatusInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The token for the copy product operation. This token is returned by CopyProduct. - // - // CopyProductToken is a required field - CopyProductToken *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeCopyProductStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCopyProductStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCopyProductStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCopyProductStatusInput"} - if s.CopyProductToken == nil { - invalidParams.Add(request.NewErrParamRequired("CopyProductToken")) - } - if s.CopyProductToken != nil && len(*s.CopyProductToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CopyProductToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DescribeCopyProductStatusInput) SetAcceptLanguage(v string) *DescribeCopyProductStatusInput { - s.AcceptLanguage = &v - return s -} - -// SetCopyProductToken sets the CopyProductToken field's value. -func (s *DescribeCopyProductStatusInput) SetCopyProductToken(v string) *DescribeCopyProductStatusInput { - s.CopyProductToken = &v - return s -} - -type DescribeCopyProductStatusOutput struct { - _ struct{} `type:"structure"` - - // The status of the copy product operation. - CopyProductStatus *string `type:"string" enum:"CopyProductStatus"` - - // The status message. - StatusDetail *string `type:"string"` - - // The identifier of the copied product. - TargetProductId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeCopyProductStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCopyProductStatusOutput) GoString() string { - return s.String() -} - -// SetCopyProductStatus sets the CopyProductStatus field's value. -func (s *DescribeCopyProductStatusOutput) SetCopyProductStatus(v string) *DescribeCopyProductStatusOutput { - s.CopyProductStatus = &v - return s -} - -// SetStatusDetail sets the StatusDetail field's value. -func (s *DescribeCopyProductStatusOutput) SetStatusDetail(v string) *DescribeCopyProductStatusOutput { - s.StatusDetail = &v - return s -} - -// SetTargetProductId sets the TargetProductId field's value. -func (s *DescribeCopyProductStatusOutput) SetTargetProductId(v string) *DescribeCopyProductStatusOutput { - s.TargetProductId = &v - return s -} - -type DescribePortfolioInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The portfolio identifier. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribePortfolioInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePortfolioInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribePortfolioInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribePortfolioInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DescribePortfolioInput) SetAcceptLanguage(v string) *DescribePortfolioInput { - s.AcceptLanguage = &v - return s -} - -// SetId sets the Id field's value. -func (s *DescribePortfolioInput) SetId(v string) *DescribePortfolioInput { - s.Id = &v - return s -} - -type DescribePortfolioOutput struct { - _ struct{} `type:"structure"` - - // Information about the portfolio. - PortfolioDetail *PortfolioDetail `type:"structure"` - - // Information about the TagOptions associated with the portfolio. - TagOptions []*TagOptionDetail `type:"list"` - - // Information about the tags associated with the portfolio. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s DescribePortfolioOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePortfolioOutput) GoString() string { - return s.String() -} - -// SetPortfolioDetail sets the PortfolioDetail field's value. -func (s *DescribePortfolioOutput) SetPortfolioDetail(v *PortfolioDetail) *DescribePortfolioOutput { - s.PortfolioDetail = v - return s -} - -// SetTagOptions sets the TagOptions field's value. -func (s *DescribePortfolioOutput) SetTagOptions(v []*TagOptionDetail) *DescribePortfolioOutput { - s.TagOptions = v - return s -} - -// SetTags sets the Tags field's value. -func (s *DescribePortfolioOutput) SetTags(v []*Tag) *DescribePortfolioOutput { - s.Tags = v - return s -} - -type DescribePortfolioShareStatusInput struct { - _ struct{} `type:"structure"` - - // The token for the portfolio share operation. This token is returned either - // by CreatePortfolioShare or by DeletePortfolioShare. - // - // PortfolioShareToken is a required field - PortfolioShareToken *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribePortfolioShareStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePortfolioShareStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribePortfolioShareStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribePortfolioShareStatusInput"} - if s.PortfolioShareToken == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioShareToken")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPortfolioShareToken sets the PortfolioShareToken field's value. -func (s *DescribePortfolioShareStatusInput) SetPortfolioShareToken(v string) *DescribePortfolioShareStatusInput { - s.PortfolioShareToken = &v - return s -} - -type DescribePortfolioShareStatusOutput struct { - _ struct{} `type:"structure"` - - // Organization node identifier. It can be either account id, organizational - // unit id or organization id. - OrganizationNodeValue *string `type:"string"` - - // The portfolio identifier. - PortfolioId *string `min:"1" type:"string"` - - // The token for the portfolio share operation. For example, share-6v24abcdefghi. - PortfolioShareToken *string `type:"string"` - - // Information about the portfolio share operation. - ShareDetails *ShareDetails `type:"structure"` - - // Status of the portfolio share operation. - Status *string `type:"string" enum:"ShareStatus"` -} - -// String returns the string representation -func (s DescribePortfolioShareStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePortfolioShareStatusOutput) GoString() string { - return s.String() -} - -// SetOrganizationNodeValue sets the OrganizationNodeValue field's value. -func (s *DescribePortfolioShareStatusOutput) SetOrganizationNodeValue(v string) *DescribePortfolioShareStatusOutput { - s.OrganizationNodeValue = &v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *DescribePortfolioShareStatusOutput) SetPortfolioId(v string) *DescribePortfolioShareStatusOutput { - s.PortfolioId = &v - return s -} - -// SetPortfolioShareToken sets the PortfolioShareToken field's value. -func (s *DescribePortfolioShareStatusOutput) SetPortfolioShareToken(v string) *DescribePortfolioShareStatusOutput { - s.PortfolioShareToken = &v - return s -} - -// SetShareDetails sets the ShareDetails field's value. -func (s *DescribePortfolioShareStatusOutput) SetShareDetails(v *ShareDetails) *DescribePortfolioShareStatusOutput { - s.ShareDetails = v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribePortfolioShareStatusOutput) SetStatus(v string) *DescribePortfolioShareStatusOutput { - s.Status = &v - return s -} - -type DescribeProductAsAdminInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The product identifier. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeProductAsAdminInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProductAsAdminInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeProductAsAdminInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeProductAsAdminInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DescribeProductAsAdminInput) SetAcceptLanguage(v string) *DescribeProductAsAdminInput { - s.AcceptLanguage = &v - return s -} - -// SetId sets the Id field's value. -func (s *DescribeProductAsAdminInput) SetId(v string) *DescribeProductAsAdminInput { - s.Id = &v - return s -} - -type DescribeProductAsAdminOutput struct { - _ struct{} `type:"structure"` - - // Information about the product view. - ProductViewDetail *ProductViewDetail `type:"structure"` - - // Information about the provisioning artifacts (also known as versions) for - // the specified product. - ProvisioningArtifactSummaries []*ProvisioningArtifactSummary `type:"list"` - - // Information about the TagOptions associated with the product. - TagOptions []*TagOptionDetail `type:"list"` - - // Information about the tags associated with the product. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s DescribeProductAsAdminOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProductAsAdminOutput) GoString() string { - return s.String() -} - -// SetProductViewDetail sets the ProductViewDetail field's value. -func (s *DescribeProductAsAdminOutput) SetProductViewDetail(v *ProductViewDetail) *DescribeProductAsAdminOutput { - s.ProductViewDetail = v - return s -} - -// SetProvisioningArtifactSummaries sets the ProvisioningArtifactSummaries field's value. -func (s *DescribeProductAsAdminOutput) SetProvisioningArtifactSummaries(v []*ProvisioningArtifactSummary) *DescribeProductAsAdminOutput { - s.ProvisioningArtifactSummaries = v - return s -} - -// SetTagOptions sets the TagOptions field's value. -func (s *DescribeProductAsAdminOutput) SetTagOptions(v []*TagOptionDetail) *DescribeProductAsAdminOutput { - s.TagOptions = v - return s -} - -// SetTags sets the Tags field's value. -func (s *DescribeProductAsAdminOutput) SetTags(v []*Tag) *DescribeProductAsAdminOutput { - s.Tags = v - return s -} - -type DescribeProductInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The product identifier. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeProductInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProductInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeProductInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeProductInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DescribeProductInput) SetAcceptLanguage(v string) *DescribeProductInput { - s.AcceptLanguage = &v - return s -} - -// SetId sets the Id field's value. -func (s *DescribeProductInput) SetId(v string) *DescribeProductInput { - s.Id = &v - return s -} - -type DescribeProductOutput struct { - _ struct{} `type:"structure"` - - // Summary information about the product view. - ProductViewSummary *ProductViewSummary `type:"structure"` - - // Information about the provisioning artifacts for the specified product. - ProvisioningArtifacts []*ProvisioningArtifact `type:"list"` -} - -// String returns the string representation -func (s DescribeProductOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProductOutput) GoString() string { - return s.String() -} - -// SetProductViewSummary sets the ProductViewSummary field's value. -func (s *DescribeProductOutput) SetProductViewSummary(v *ProductViewSummary) *DescribeProductOutput { - s.ProductViewSummary = v - return s -} - -// SetProvisioningArtifacts sets the ProvisioningArtifacts field's value. -func (s *DescribeProductOutput) SetProvisioningArtifacts(v []*ProvisioningArtifact) *DescribeProductOutput { - s.ProvisioningArtifacts = v - return s -} - -type DescribeProductViewInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The product view identifier. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeProductViewInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProductViewInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeProductViewInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeProductViewInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DescribeProductViewInput) SetAcceptLanguage(v string) *DescribeProductViewInput { - s.AcceptLanguage = &v - return s -} - -// SetId sets the Id field's value. -func (s *DescribeProductViewInput) SetId(v string) *DescribeProductViewInput { - s.Id = &v - return s -} - -type DescribeProductViewOutput struct { - _ struct{} `type:"structure"` - - // Summary information about the product. - ProductViewSummary *ProductViewSummary `type:"structure"` - - // Information about the provisioning artifacts for the product. - ProvisioningArtifacts []*ProvisioningArtifact `type:"list"` -} - -// String returns the string representation -func (s DescribeProductViewOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProductViewOutput) GoString() string { - return s.String() -} - -// SetProductViewSummary sets the ProductViewSummary field's value. -func (s *DescribeProductViewOutput) SetProductViewSummary(v *ProductViewSummary) *DescribeProductViewOutput { - s.ProductViewSummary = v - return s -} - -// SetProvisioningArtifacts sets the ProvisioningArtifacts field's value. -func (s *DescribeProductViewOutput) SetProvisioningArtifacts(v []*ProvisioningArtifact) *DescribeProductViewOutput { - s.ProvisioningArtifacts = v - return s -} - -type DescribeProvisionedProductInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The provisioned product identifier. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeProvisionedProductInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProvisionedProductInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeProvisionedProductInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeProvisionedProductInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DescribeProvisionedProductInput) SetAcceptLanguage(v string) *DescribeProvisionedProductInput { - s.AcceptLanguage = &v - return s -} - -// SetId sets the Id field's value. -func (s *DescribeProvisionedProductInput) SetId(v string) *DescribeProvisionedProductInput { - s.Id = &v - return s -} - -type DescribeProvisionedProductOutput struct { - _ struct{} `type:"structure"` - - // Any CloudWatch dashboards that were created when provisioning the product. - CloudWatchDashboards []*CloudWatchDashboard `type:"list"` - - // Information about the provisioned product. - ProvisionedProductDetail *ProvisionedProductDetail `type:"structure"` -} - -// String returns the string representation -func (s DescribeProvisionedProductOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProvisionedProductOutput) GoString() string { - return s.String() -} - -// SetCloudWatchDashboards sets the CloudWatchDashboards field's value. -func (s *DescribeProvisionedProductOutput) SetCloudWatchDashboards(v []*CloudWatchDashboard) *DescribeProvisionedProductOutput { - s.CloudWatchDashboards = v - return s -} - -// SetProvisionedProductDetail sets the ProvisionedProductDetail field's value. -func (s *DescribeProvisionedProductOutput) SetProvisionedProductDetail(v *ProvisionedProductDetail) *DescribeProvisionedProductOutput { - s.ProvisionedProductDetail = v - return s -} - -type DescribeProvisionedProductPlanInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The plan identifier. - // - // PlanId is a required field - PlanId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeProvisionedProductPlanInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProvisionedProductPlanInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeProvisionedProductPlanInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeProvisionedProductPlanInput"} - if s.PlanId == nil { - invalidParams.Add(request.NewErrParamRequired("PlanId")) - } - if s.PlanId != nil && len(*s.PlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DescribeProvisionedProductPlanInput) SetAcceptLanguage(v string) *DescribeProvisionedProductPlanInput { - s.AcceptLanguage = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeProvisionedProductPlanInput) SetPageSize(v int64) *DescribeProvisionedProductPlanInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *DescribeProvisionedProductPlanInput) SetPageToken(v string) *DescribeProvisionedProductPlanInput { - s.PageToken = &v - return s -} - -// SetPlanId sets the PlanId field's value. -func (s *DescribeProvisionedProductPlanInput) SetPlanId(v string) *DescribeProvisionedProductPlanInput { - s.PlanId = &v - return s -} - -type DescribeProvisionedProductPlanOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // Information about the plan. - ProvisionedProductPlanDetails *ProvisionedProductPlanDetails `type:"structure"` - - // Information about the resource changes that will occur when the plan is executed. - ResourceChanges []*ResourceChange `type:"list"` -} - -// String returns the string representation -func (s DescribeProvisionedProductPlanOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProvisionedProductPlanOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *DescribeProvisionedProductPlanOutput) SetNextPageToken(v string) *DescribeProvisionedProductPlanOutput { - s.NextPageToken = &v - return s -} - -// SetProvisionedProductPlanDetails sets the ProvisionedProductPlanDetails field's value. -func (s *DescribeProvisionedProductPlanOutput) SetProvisionedProductPlanDetails(v *ProvisionedProductPlanDetails) *DescribeProvisionedProductPlanOutput { - s.ProvisionedProductPlanDetails = v - return s -} - -// SetResourceChanges sets the ResourceChanges field's value. -func (s *DescribeProvisionedProductPlanOutput) SetResourceChanges(v []*ResourceChange) *DescribeProvisionedProductPlanOutput { - s.ResourceChanges = v - return s -} - -type DescribeProvisioningArtifactInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The product identifier. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` - - // The identifier of the provisioning artifact. - // - // ProvisioningArtifactId is a required field - ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` - - // Indicates whether a verbose level of detail is enabled. - Verbose *bool `type:"boolean"` -} - -// String returns the string representation -func (s DescribeProvisioningArtifactInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProvisioningArtifactInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeProvisioningArtifactInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeProvisioningArtifactInput"} - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - if s.ProvisioningArtifactId == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) - } - if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DescribeProvisioningArtifactInput) SetAcceptLanguage(v string) *DescribeProvisioningArtifactInput { - s.AcceptLanguage = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *DescribeProvisioningArtifactInput) SetProductId(v string) *DescribeProvisioningArtifactInput { - s.ProductId = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *DescribeProvisioningArtifactInput) SetProvisioningArtifactId(v string) *DescribeProvisioningArtifactInput { - s.ProvisioningArtifactId = &v - return s -} - -// SetVerbose sets the Verbose field's value. -func (s *DescribeProvisioningArtifactInput) SetVerbose(v bool) *DescribeProvisioningArtifactInput { - s.Verbose = &v - return s -} - -type DescribeProvisioningArtifactOutput struct { - _ struct{} `type:"structure"` - - // The URL of the CloudFormation template in Amazon S3. - Info map[string]*string `min:"1" type:"map"` - - // Information about the provisioning artifact. - ProvisioningArtifactDetail *ProvisioningArtifactDetail `type:"structure"` - - // The status of the current request. - Status *string `type:"string" enum:"Status"` -} - -// String returns the string representation -func (s DescribeProvisioningArtifactOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProvisioningArtifactOutput) GoString() string { - return s.String() -} - -// SetInfo sets the Info field's value. -func (s *DescribeProvisioningArtifactOutput) SetInfo(v map[string]*string) *DescribeProvisioningArtifactOutput { - s.Info = v - return s -} - -// SetProvisioningArtifactDetail sets the ProvisioningArtifactDetail field's value. -func (s *DescribeProvisioningArtifactOutput) SetProvisioningArtifactDetail(v *ProvisioningArtifactDetail) *DescribeProvisioningArtifactOutput { - s.ProvisioningArtifactDetail = v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeProvisioningArtifactOutput) SetStatus(v string) *DescribeProvisioningArtifactOutput { - s.Status = &v - return s -} - -type DescribeProvisioningParametersInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The path identifier of the product. This value is optional if the product - // has a default path, and required if the product has more than one path. To - // list the paths for a product, use ListLaunchPaths. - PathId *string `min:"1" type:"string"` - - // The product identifier. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` - - // The identifier of the provisioning artifact. - // - // ProvisioningArtifactId is a required field - ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeProvisioningParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProvisioningParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeProvisioningParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeProvisioningParametersInput"} - if s.PathId != nil && len(*s.PathId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathId", 1)) - } - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - if s.ProvisioningArtifactId == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) - } - if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DescribeProvisioningParametersInput) SetAcceptLanguage(v string) *DescribeProvisioningParametersInput { - s.AcceptLanguage = &v - return s -} - -// SetPathId sets the PathId field's value. -func (s *DescribeProvisioningParametersInput) SetPathId(v string) *DescribeProvisioningParametersInput { - s.PathId = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *DescribeProvisioningParametersInput) SetProductId(v string) *DescribeProvisioningParametersInput { - s.ProductId = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *DescribeProvisioningParametersInput) SetProvisioningArtifactId(v string) *DescribeProvisioningParametersInput { - s.ProvisioningArtifactId = &v - return s -} - -type DescribeProvisioningParametersOutput struct { - _ struct{} `type:"structure"` - - // Information about the constraints used to provision the product. - ConstraintSummaries []*ConstraintSummary `type:"list"` - - // Information about the parameters used to provision the product. - ProvisioningArtifactParameters []*ProvisioningArtifactParameter `type:"list"` - - // An object that contains information about preferences, such as regions and - // accounts, for the provisioning artifact. - ProvisioningArtifactPreferences *ProvisioningArtifactPreferences `type:"structure"` - - // Information about the TagOptions associated with the resource. - TagOptions []*TagOptionSummary `type:"list"` - - // Any additional metadata specifically related to the provisioning of the product. - // For example, see the Version field of the CloudFormation template. - UsageInstructions []*UsageInstruction `type:"list"` -} - -// String returns the string representation -func (s DescribeProvisioningParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeProvisioningParametersOutput) GoString() string { - return s.String() -} - -// SetConstraintSummaries sets the ConstraintSummaries field's value. -func (s *DescribeProvisioningParametersOutput) SetConstraintSummaries(v []*ConstraintSummary) *DescribeProvisioningParametersOutput { - s.ConstraintSummaries = v - return s -} - -// SetProvisioningArtifactParameters sets the ProvisioningArtifactParameters field's value. -func (s *DescribeProvisioningParametersOutput) SetProvisioningArtifactParameters(v []*ProvisioningArtifactParameter) *DescribeProvisioningParametersOutput { - s.ProvisioningArtifactParameters = v - return s -} - -// SetProvisioningArtifactPreferences sets the ProvisioningArtifactPreferences field's value. -func (s *DescribeProvisioningParametersOutput) SetProvisioningArtifactPreferences(v *ProvisioningArtifactPreferences) *DescribeProvisioningParametersOutput { - s.ProvisioningArtifactPreferences = v - return s -} - -// SetTagOptions sets the TagOptions field's value. -func (s *DescribeProvisioningParametersOutput) SetTagOptions(v []*TagOptionSummary) *DescribeProvisioningParametersOutput { - s.TagOptions = v - return s -} - -// SetUsageInstructions sets the UsageInstructions field's value. -func (s *DescribeProvisioningParametersOutput) SetUsageInstructions(v []*UsageInstruction) *DescribeProvisioningParametersOutput { - s.UsageInstructions = v - return s -} - -type DescribeRecordInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The record identifier of the provisioned product. This identifier is returned - // by the request operation. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeRecordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRecordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRecordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRecordInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DescribeRecordInput) SetAcceptLanguage(v string) *DescribeRecordInput { - s.AcceptLanguage = &v - return s -} - -// SetId sets the Id field's value. -func (s *DescribeRecordInput) SetId(v string) *DescribeRecordInput { - s.Id = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeRecordInput) SetPageSize(v int64) *DescribeRecordInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *DescribeRecordInput) SetPageToken(v string) *DescribeRecordInput { - s.PageToken = &v - return s -} - -type DescribeRecordOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // Information about the product. - RecordDetail *RecordDetail `type:"structure"` - - // Information about the product created as the result of a request. For example, - // the output for a CloudFormation-backed product that creates an S3 bucket - // would include the S3 bucket URL. - RecordOutputs []*RecordOutput `type:"list"` -} - -// String returns the string representation -func (s DescribeRecordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeRecordOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *DescribeRecordOutput) SetNextPageToken(v string) *DescribeRecordOutput { - s.NextPageToken = &v - return s -} - -// SetRecordDetail sets the RecordDetail field's value. -func (s *DescribeRecordOutput) SetRecordDetail(v *RecordDetail) *DescribeRecordOutput { - s.RecordDetail = v - return s -} - -// SetRecordOutputs sets the RecordOutputs field's value. -func (s *DescribeRecordOutput) SetRecordOutputs(v []*RecordOutput) *DescribeRecordOutput { - s.RecordOutputs = v - return s -} - -type DescribeServiceActionInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The self-service action identifier. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeServiceActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeServiceActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeServiceActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeServiceActionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DescribeServiceActionInput) SetAcceptLanguage(v string) *DescribeServiceActionInput { - s.AcceptLanguage = &v - return s -} - -// SetId sets the Id field's value. -func (s *DescribeServiceActionInput) SetId(v string) *DescribeServiceActionInput { - s.Id = &v - return s -} - -type DescribeServiceActionOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about the self-service action. - ServiceActionDetail *ServiceActionDetail `type:"structure"` -} - -// String returns the string representation -func (s DescribeServiceActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeServiceActionOutput) GoString() string { - return s.String() -} - -// SetServiceActionDetail sets the ServiceActionDetail field's value. -func (s *DescribeServiceActionOutput) SetServiceActionDetail(v *ServiceActionDetail) *DescribeServiceActionOutput { - s.ServiceActionDetail = v - return s -} - -type DescribeTagOptionInput struct { - _ struct{} `type:"structure"` - - // The TagOption identifier. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeTagOptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagOptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTagOptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTagOptionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DescribeTagOptionInput) SetId(v string) *DescribeTagOptionInput { - s.Id = &v - return s -} - -type DescribeTagOptionOutput struct { - _ struct{} `type:"structure"` - - // Information about the TagOption. - TagOptionDetail *TagOptionDetail `type:"structure"` -} - -// String returns the string representation -func (s DescribeTagOptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagOptionOutput) GoString() string { - return s.String() -} - -// SetTagOptionDetail sets the TagOptionDetail field's value. -func (s *DescribeTagOptionOutput) SetTagOptionDetail(v *TagOptionDetail) *DescribeTagOptionOutput { - s.TagOptionDetail = v - return s -} - -type DisableAWSOrganizationsAccessInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableAWSOrganizationsAccessInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableAWSOrganizationsAccessInput) GoString() string { - return s.String() -} - -type DisableAWSOrganizationsAccessOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisableAWSOrganizationsAccessOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableAWSOrganizationsAccessOutput) GoString() string { - return s.String() -} - -type DisassociatePrincipalFromPortfolioInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The portfolio identifier. - // - // PortfolioId is a required field - PortfolioId *string `min:"1" type:"string" required:"true"` - - // The ARN of the principal (IAM user, role, or group). - // - // PrincipalARN is a required field - PrincipalARN *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociatePrincipalFromPortfolioInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociatePrincipalFromPortfolioInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociatePrincipalFromPortfolioInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociatePrincipalFromPortfolioInput"} - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } - if s.PrincipalARN == nil { - invalidParams.Add(request.NewErrParamRequired("PrincipalARN")) - } - if s.PrincipalARN != nil && len(*s.PrincipalARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PrincipalARN", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DisassociatePrincipalFromPortfolioInput) SetAcceptLanguage(v string) *DisassociatePrincipalFromPortfolioInput { - s.AcceptLanguage = &v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *DisassociatePrincipalFromPortfolioInput) SetPortfolioId(v string) *DisassociatePrincipalFromPortfolioInput { - s.PortfolioId = &v - return s -} - -// SetPrincipalARN sets the PrincipalARN field's value. -func (s *DisassociatePrincipalFromPortfolioInput) SetPrincipalARN(v string) *DisassociatePrincipalFromPortfolioInput { - s.PrincipalARN = &v - return s -} - -type DisassociatePrincipalFromPortfolioOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociatePrincipalFromPortfolioOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociatePrincipalFromPortfolioOutput) GoString() string { - return s.String() -} - -type DisassociateProductFromPortfolioInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The portfolio identifier. - // - // PortfolioId is a required field - PortfolioId *string `min:"1" type:"string" required:"true"` - - // The product identifier. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateProductFromPortfolioInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateProductFromPortfolioInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateProductFromPortfolioInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateProductFromPortfolioInput"} - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DisassociateProductFromPortfolioInput) SetAcceptLanguage(v string) *DisassociateProductFromPortfolioInput { - s.AcceptLanguage = &v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *DisassociateProductFromPortfolioInput) SetPortfolioId(v string) *DisassociateProductFromPortfolioInput { - s.PortfolioId = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *DisassociateProductFromPortfolioInput) SetProductId(v string) *DisassociateProductFromPortfolioInput { - s.ProductId = &v - return s -} - -type DisassociateProductFromPortfolioOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateProductFromPortfolioOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateProductFromPortfolioOutput) GoString() string { - return s.String() -} - -type DisassociateServiceActionFromProvisioningArtifactInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The product identifier. For example, prod-abcdzk7xy33qa. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` - - // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. - // - // ProvisioningArtifactId is a required field - ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` - - // The self-service action identifier. For example, act-fs7abcd89wxyz. - // - // ServiceActionId is a required field - ServiceActionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateServiceActionFromProvisioningArtifactInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateServiceActionFromProvisioningArtifactInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateServiceActionFromProvisioningArtifactInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateServiceActionFromProvisioningArtifactInput"} - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - if s.ProvisioningArtifactId == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) - } - if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) - } - if s.ServiceActionId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) - } - if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DisassociateServiceActionFromProvisioningArtifactInput) SetAcceptLanguage(v string) *DisassociateServiceActionFromProvisioningArtifactInput { - s.AcceptLanguage = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *DisassociateServiceActionFromProvisioningArtifactInput) SetProductId(v string) *DisassociateServiceActionFromProvisioningArtifactInput { - s.ProductId = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *DisassociateServiceActionFromProvisioningArtifactInput) SetProvisioningArtifactId(v string) *DisassociateServiceActionFromProvisioningArtifactInput { - s.ProvisioningArtifactId = &v - return s -} - -// SetServiceActionId sets the ServiceActionId field's value. -func (s *DisassociateServiceActionFromProvisioningArtifactInput) SetServiceActionId(v string) *DisassociateServiceActionFromProvisioningArtifactInput { - s.ServiceActionId = &v - return s -} - -type DisassociateServiceActionFromProvisioningArtifactOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateServiceActionFromProvisioningArtifactOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateServiceActionFromProvisioningArtifactOutput) GoString() string { - return s.String() -} - -type DisassociateTagOptionFromResourceInput struct { - _ struct{} `type:"structure"` - - // The resource identifier. - // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` - - // The TagOption identifier. - // - // TagOptionId is a required field - TagOptionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateTagOptionFromResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateTagOptionFromResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateTagOptionFromResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateTagOptionFromResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.TagOptionId == nil { - invalidParams.Add(request.NewErrParamRequired("TagOptionId")) - } - if s.TagOptionId != nil && len(*s.TagOptionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagOptionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *DisassociateTagOptionFromResourceInput) SetResourceId(v string) *DisassociateTagOptionFromResourceInput { - s.ResourceId = &v - return s -} - -// SetTagOptionId sets the TagOptionId field's value. -func (s *DisassociateTagOptionFromResourceInput) SetTagOptionId(v string) *DisassociateTagOptionFromResourceInput { - s.TagOptionId = &v - return s -} - -type DisassociateTagOptionFromResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateTagOptionFromResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateTagOptionFromResourceOutput) GoString() string { - return s.String() -} - -type EnableAWSOrganizationsAccessInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableAWSOrganizationsAccessInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableAWSOrganizationsAccessInput) GoString() string { - return s.String() -} - -type EnableAWSOrganizationsAccessOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s EnableAWSOrganizationsAccessOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EnableAWSOrganizationsAccessOutput) GoString() string { - return s.String() -} - -type ExecuteProvisionedProductPlanInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // A unique identifier that you provide to ensure idempotency. If multiple requests - // differ only by the idempotency token, the same response is returned for each - // repeated request. - IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // The plan identifier. - // - // PlanId is a required field - PlanId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ExecuteProvisionedProductPlanInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecuteProvisionedProductPlanInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExecuteProvisionedProductPlanInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExecuteProvisionedProductPlanInput"} - if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) - } - if s.PlanId == nil { - invalidParams.Add(request.NewErrParamRequired("PlanId")) - } - if s.PlanId != nil && len(*s.PlanId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PlanId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ExecuteProvisionedProductPlanInput) SetAcceptLanguage(v string) *ExecuteProvisionedProductPlanInput { - s.AcceptLanguage = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *ExecuteProvisionedProductPlanInput) SetIdempotencyToken(v string) *ExecuteProvisionedProductPlanInput { - s.IdempotencyToken = &v - return s -} - -// SetPlanId sets the PlanId field's value. -func (s *ExecuteProvisionedProductPlanInput) SetPlanId(v string) *ExecuteProvisionedProductPlanInput { - s.PlanId = &v - return s -} - -type ExecuteProvisionedProductPlanOutput struct { - _ struct{} `type:"structure"` - - // Information about the result of provisioning the product. - RecordDetail *RecordDetail `type:"structure"` -} - -// String returns the string representation -func (s ExecuteProvisionedProductPlanOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecuteProvisionedProductPlanOutput) GoString() string { - return s.String() -} - -// SetRecordDetail sets the RecordDetail field's value. -func (s *ExecuteProvisionedProductPlanOutput) SetRecordDetail(v *RecordDetail) *ExecuteProvisionedProductPlanOutput { - s.RecordDetail = v - return s -} - -type ExecuteProvisionedProductServiceActionInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // An idempotency token that uniquely identifies the execute request. - ExecuteToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // The identifier of the provisioned product. - // - // ProvisionedProductId is a required field - ProvisionedProductId *string `min:"1" type:"string" required:"true"` - - // The self-service action identifier. For example, act-fs7abcd89wxyz. - // - // ServiceActionId is a required field - ServiceActionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ExecuteProvisionedProductServiceActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecuteProvisionedProductServiceActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExecuteProvisionedProductServiceActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExecuteProvisionedProductServiceActionInput"} - if s.ExecuteToken != nil && len(*s.ExecuteToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExecuteToken", 1)) - } - if s.ProvisionedProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisionedProductId")) - } - if s.ProvisionedProductId != nil && len(*s.ProvisionedProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductId", 1)) - } - if s.ServiceActionId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) - } - if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ExecuteProvisionedProductServiceActionInput) SetAcceptLanguage(v string) *ExecuteProvisionedProductServiceActionInput { - s.AcceptLanguage = &v - return s -} - -// SetExecuteToken sets the ExecuteToken field's value. -func (s *ExecuteProvisionedProductServiceActionInput) SetExecuteToken(v string) *ExecuteProvisionedProductServiceActionInput { - s.ExecuteToken = &v - return s -} - -// SetProvisionedProductId sets the ProvisionedProductId field's value. -func (s *ExecuteProvisionedProductServiceActionInput) SetProvisionedProductId(v string) *ExecuteProvisionedProductServiceActionInput { - s.ProvisionedProductId = &v - return s -} - -// SetServiceActionId sets the ServiceActionId field's value. -func (s *ExecuteProvisionedProductServiceActionInput) SetServiceActionId(v string) *ExecuteProvisionedProductServiceActionInput { - s.ServiceActionId = &v - return s -} - -type ExecuteProvisionedProductServiceActionOutput struct { - _ struct{} `type:"structure"` - - // An object containing detailed information about the result of provisioning - // the product. - RecordDetail *RecordDetail `type:"structure"` -} - -// String returns the string representation -func (s ExecuteProvisionedProductServiceActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecuteProvisionedProductServiceActionOutput) GoString() string { - return s.String() -} - -// SetRecordDetail sets the RecordDetail field's value. -func (s *ExecuteProvisionedProductServiceActionOutput) SetRecordDetail(v *RecordDetail) *ExecuteProvisionedProductServiceActionOutput { - s.RecordDetail = v - return s -} - -// An object containing information about the error, along with identifying -// information about the self-service action and its associations. -type FailedServiceActionAssociation struct { - _ struct{} `type:"structure"` - - // The error code. Valid values are listed below. - ErrorCode *string `type:"string" enum:"ServiceActionAssociationErrorCode"` - - // A text description of the error. - ErrorMessage *string `min:"1" type:"string"` - - // The product identifier. For example, prod-abcdzk7xy33qa. - ProductId *string `min:"1" type:"string"` - - // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. - ProvisioningArtifactId *string `min:"1" type:"string"` - - // The self-service action identifier. For example, act-fs7abcd89wxyz. - ServiceActionId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s FailedServiceActionAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailedServiceActionAssociation) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *FailedServiceActionAssociation) SetErrorCode(v string) *FailedServiceActionAssociation { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *FailedServiceActionAssociation) SetErrorMessage(v string) *FailedServiceActionAssociation { - s.ErrorMessage = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *FailedServiceActionAssociation) SetProductId(v string) *FailedServiceActionAssociation { - s.ProductId = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *FailedServiceActionAssociation) SetProvisioningArtifactId(v string) *FailedServiceActionAssociation { - s.ProvisioningArtifactId = &v - return s -} - -// SetServiceActionId sets the ServiceActionId field's value. -func (s *FailedServiceActionAssociation) SetServiceActionId(v string) *FailedServiceActionAssociation { - s.ServiceActionId = &v - return s -} - -type GetAWSOrganizationsAccessStatusInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetAWSOrganizationsAccessStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAWSOrganizationsAccessStatusInput) GoString() string { - return s.String() -} - -type GetAWSOrganizationsAccessStatusOutput struct { - _ struct{} `type:"structure"` - - // The status of the portfolio share feature. - AccessStatus *string `type:"string" enum:"AccessStatus"` -} - -// String returns the string representation -func (s GetAWSOrganizationsAccessStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAWSOrganizationsAccessStatusOutput) GoString() string { - return s.String() -} - -// SetAccessStatus sets the AccessStatus field's value. -func (s *GetAWSOrganizationsAccessStatusOutput) SetAccessStatus(v string) *GetAWSOrganizationsAccessStatusOutput { - s.AccessStatus = &v - return s -} - -// Summary information about a product path for a user. -type LaunchPathSummary struct { - _ struct{} `type:"structure"` - - // The constraints on the portfolio-product relationship. - ConstraintSummaries []*ConstraintSummary `type:"list"` - - // The identifier of the product path. - Id *string `min:"1" type:"string"` - - // The name of the portfolio to which the user was assigned. - Name *string `type:"string"` - - // The tags associated with this product path. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s LaunchPathSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchPathSummary) GoString() string { - return s.String() -} - -// SetConstraintSummaries sets the ConstraintSummaries field's value. -func (s *LaunchPathSummary) SetConstraintSummaries(v []*ConstraintSummary) *LaunchPathSummary { - s.ConstraintSummaries = v - return s -} - -// SetId sets the Id field's value. -func (s *LaunchPathSummary) SetId(v string) *LaunchPathSummary { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *LaunchPathSummary) SetName(v string) *LaunchPathSummary { - s.Name = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *LaunchPathSummary) SetTags(v []*Tag) *LaunchPathSummary { - s.Tags = v - return s -} - -type ListAcceptedPortfolioSharesInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The type of shared portfolios to list. The default is to list imported portfolios. - // - // * AWS_ORGANIZATIONS - List portfolios shared by the master account of - // your organization - // - // * AWS_SERVICECATALOG - List default portfolios - // - // * IMPORTED - List imported portfolios - PortfolioShareType *string `type:"string" enum:"PortfolioShareType"` -} - -// String returns the string representation -func (s ListAcceptedPortfolioSharesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAcceptedPortfolioSharesInput) GoString() string { - return s.String() -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListAcceptedPortfolioSharesInput) SetAcceptLanguage(v string) *ListAcceptedPortfolioSharesInput { - s.AcceptLanguage = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListAcceptedPortfolioSharesInput) SetPageSize(v int64) *ListAcceptedPortfolioSharesInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListAcceptedPortfolioSharesInput) SetPageToken(v string) *ListAcceptedPortfolioSharesInput { - s.PageToken = &v - return s -} - -// SetPortfolioShareType sets the PortfolioShareType field's value. -func (s *ListAcceptedPortfolioSharesInput) SetPortfolioShareType(v string) *ListAcceptedPortfolioSharesInput { - s.PortfolioShareType = &v - return s -} - -type ListAcceptedPortfolioSharesOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // Information about the portfolios. - PortfolioDetails []*PortfolioDetail `type:"list"` -} - -// String returns the string representation -func (s ListAcceptedPortfolioSharesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAcceptedPortfolioSharesOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListAcceptedPortfolioSharesOutput) SetNextPageToken(v string) *ListAcceptedPortfolioSharesOutput { - s.NextPageToken = &v - return s -} - -// SetPortfolioDetails sets the PortfolioDetails field's value. -func (s *ListAcceptedPortfolioSharesOutput) SetPortfolioDetails(v []*PortfolioDetail) *ListAcceptedPortfolioSharesOutput { - s.PortfolioDetails = v - return s -} - -type ListConstraintsForPortfolioInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The portfolio identifier. - // - // PortfolioId is a required field - PortfolioId *string `min:"1" type:"string" required:"true"` - - // The product identifier. - ProductId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListConstraintsForPortfolioInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListConstraintsForPortfolioInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListConstraintsForPortfolioInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListConstraintsForPortfolioInput"} - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListConstraintsForPortfolioInput) SetAcceptLanguage(v string) *ListConstraintsForPortfolioInput { - s.AcceptLanguage = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListConstraintsForPortfolioInput) SetPageSize(v int64) *ListConstraintsForPortfolioInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListConstraintsForPortfolioInput) SetPageToken(v string) *ListConstraintsForPortfolioInput { - s.PageToken = &v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *ListConstraintsForPortfolioInput) SetPortfolioId(v string) *ListConstraintsForPortfolioInput { - s.PortfolioId = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *ListConstraintsForPortfolioInput) SetProductId(v string) *ListConstraintsForPortfolioInput { - s.ProductId = &v - return s -} - -type ListConstraintsForPortfolioOutput struct { - _ struct{} `type:"structure"` - - // Information about the constraints. - ConstraintDetails []*ConstraintDetail `type:"list"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` -} - -// String returns the string representation -func (s ListConstraintsForPortfolioOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListConstraintsForPortfolioOutput) GoString() string { - return s.String() -} - -// SetConstraintDetails sets the ConstraintDetails field's value. -func (s *ListConstraintsForPortfolioOutput) SetConstraintDetails(v []*ConstraintDetail) *ListConstraintsForPortfolioOutput { - s.ConstraintDetails = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListConstraintsForPortfolioOutput) SetNextPageToken(v string) *ListConstraintsForPortfolioOutput { - s.NextPageToken = &v - return s -} - -type ListLaunchPathsInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The product identifier. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListLaunchPathsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLaunchPathsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListLaunchPathsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListLaunchPathsInput"} - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListLaunchPathsInput) SetAcceptLanguage(v string) *ListLaunchPathsInput { - s.AcceptLanguage = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListLaunchPathsInput) SetPageSize(v int64) *ListLaunchPathsInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListLaunchPathsInput) SetPageToken(v string) *ListLaunchPathsInput { - s.PageToken = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *ListLaunchPathsInput) SetProductId(v string) *ListLaunchPathsInput { - s.ProductId = &v - return s -} - -type ListLaunchPathsOutput struct { - _ struct{} `type:"structure"` - - // Information about the launch path. - LaunchPathSummaries []*LaunchPathSummary `type:"list"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` -} - -// String returns the string representation -func (s ListLaunchPathsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLaunchPathsOutput) GoString() string { - return s.String() -} - -// SetLaunchPathSummaries sets the LaunchPathSummaries field's value. -func (s *ListLaunchPathsOutput) SetLaunchPathSummaries(v []*LaunchPathSummary) *ListLaunchPathsOutput { - s.LaunchPathSummaries = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListLaunchPathsOutput) SetNextPageToken(v string) *ListLaunchPathsOutput { - s.NextPageToken = &v - return s -} - -type ListOrganizationPortfolioAccessInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The organization node type that will be returned in the output. - // - // * ORGANIZATION - Organization that has access to the portfolio. - // - // * ORGANIZATIONAL_UNIT - Organizational unit that has access to the portfolio - // within your organization. - // - // * ACCOUNT - Account that has access to the portfolio within your organization. - // - // OrganizationNodeType is a required field - OrganizationNodeType *string `type:"string" required:"true" enum:"OrganizationNodeType"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The portfolio identifier. For example, port-2abcdext3y5fk. - // - // PortfolioId is a required field - PortfolioId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListOrganizationPortfolioAccessInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOrganizationPortfolioAccessInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListOrganizationPortfolioAccessInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOrganizationPortfolioAccessInput"} - if s.OrganizationNodeType == nil { - invalidParams.Add(request.NewErrParamRequired("OrganizationNodeType")) - } - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListOrganizationPortfolioAccessInput) SetAcceptLanguage(v string) *ListOrganizationPortfolioAccessInput { - s.AcceptLanguage = &v - return s -} - -// SetOrganizationNodeType sets the OrganizationNodeType field's value. -func (s *ListOrganizationPortfolioAccessInput) SetOrganizationNodeType(v string) *ListOrganizationPortfolioAccessInput { - s.OrganizationNodeType = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListOrganizationPortfolioAccessInput) SetPageSize(v int64) *ListOrganizationPortfolioAccessInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListOrganizationPortfolioAccessInput) SetPageToken(v string) *ListOrganizationPortfolioAccessInput { - s.PageToken = &v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *ListOrganizationPortfolioAccessInput) SetPortfolioId(v string) *ListOrganizationPortfolioAccessInput { - s.PortfolioId = &v - return s -} - -type ListOrganizationPortfolioAccessOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // Displays information about the organization nodes. - OrganizationNodes []*OrganizationNode `type:"list"` -} - -// String returns the string representation -func (s ListOrganizationPortfolioAccessOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOrganizationPortfolioAccessOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListOrganizationPortfolioAccessOutput) SetNextPageToken(v string) *ListOrganizationPortfolioAccessOutput { - s.NextPageToken = &v - return s -} - -// SetOrganizationNodes sets the OrganizationNodes field's value. -func (s *ListOrganizationPortfolioAccessOutput) SetOrganizationNodes(v []*OrganizationNode) *ListOrganizationPortfolioAccessOutput { - s.OrganizationNodes = v - return s -} - -type ListPortfolioAccessInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The portfolio identifier. - // - // PortfolioId is a required field - PortfolioId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListPortfolioAccessInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPortfolioAccessInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPortfolioAccessInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPortfolioAccessInput"} - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListPortfolioAccessInput) SetAcceptLanguage(v string) *ListPortfolioAccessInput { - s.AcceptLanguage = &v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *ListPortfolioAccessInput) SetPortfolioId(v string) *ListPortfolioAccessInput { - s.PortfolioId = &v - return s -} - -type ListPortfolioAccessOutput struct { - _ struct{} `type:"structure"` - - // Information about the AWS accounts with access to the portfolio. - AccountIds []*string `type:"list"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` -} - -// String returns the string representation -func (s ListPortfolioAccessOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPortfolioAccessOutput) GoString() string { - return s.String() -} - -// SetAccountIds sets the AccountIds field's value. -func (s *ListPortfolioAccessOutput) SetAccountIds(v []*string) *ListPortfolioAccessOutput { - s.AccountIds = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListPortfolioAccessOutput) SetNextPageToken(v string) *ListPortfolioAccessOutput { - s.NextPageToken = &v - return s -} - -type ListPortfoliosForProductInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The product identifier. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListPortfoliosForProductInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPortfoliosForProductInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPortfoliosForProductInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPortfoliosForProductInput"} - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListPortfoliosForProductInput) SetAcceptLanguage(v string) *ListPortfoliosForProductInput { - s.AcceptLanguage = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListPortfoliosForProductInput) SetPageSize(v int64) *ListPortfoliosForProductInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListPortfoliosForProductInput) SetPageToken(v string) *ListPortfoliosForProductInput { - s.PageToken = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *ListPortfoliosForProductInput) SetProductId(v string) *ListPortfoliosForProductInput { - s.ProductId = &v - return s -} - -type ListPortfoliosForProductOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // Information about the portfolios. - PortfolioDetails []*PortfolioDetail `type:"list"` -} - -// String returns the string representation -func (s ListPortfoliosForProductOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPortfoliosForProductOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListPortfoliosForProductOutput) SetNextPageToken(v string) *ListPortfoliosForProductOutput { - s.NextPageToken = &v - return s -} - -// SetPortfolioDetails sets the PortfolioDetails field's value. -func (s *ListPortfoliosForProductOutput) SetPortfolioDetails(v []*PortfolioDetail) *ListPortfoliosForProductOutput { - s.PortfolioDetails = v - return s -} - -type ListPortfoliosInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` -} - -// String returns the string representation -func (s ListPortfoliosInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPortfoliosInput) GoString() string { - return s.String() -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListPortfoliosInput) SetAcceptLanguage(v string) *ListPortfoliosInput { - s.AcceptLanguage = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListPortfoliosInput) SetPageSize(v int64) *ListPortfoliosInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListPortfoliosInput) SetPageToken(v string) *ListPortfoliosInput { - s.PageToken = &v - return s -} - -type ListPortfoliosOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // Information about the portfolios. - PortfolioDetails []*PortfolioDetail `type:"list"` -} - -// String returns the string representation -func (s ListPortfoliosOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPortfoliosOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListPortfoliosOutput) SetNextPageToken(v string) *ListPortfoliosOutput { - s.NextPageToken = &v - return s -} - -// SetPortfolioDetails sets the PortfolioDetails field's value. -func (s *ListPortfoliosOutput) SetPortfolioDetails(v []*PortfolioDetail) *ListPortfoliosOutput { - s.PortfolioDetails = v - return s -} - -type ListPrincipalsForPortfolioInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The portfolio identifier. - // - // PortfolioId is a required field - PortfolioId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListPrincipalsForPortfolioInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPrincipalsForPortfolioInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPrincipalsForPortfolioInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPrincipalsForPortfolioInput"} - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListPrincipalsForPortfolioInput) SetAcceptLanguage(v string) *ListPrincipalsForPortfolioInput { - s.AcceptLanguage = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListPrincipalsForPortfolioInput) SetPageSize(v int64) *ListPrincipalsForPortfolioInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListPrincipalsForPortfolioInput) SetPageToken(v string) *ListPrincipalsForPortfolioInput { - s.PageToken = &v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *ListPrincipalsForPortfolioInput) SetPortfolioId(v string) *ListPrincipalsForPortfolioInput { - s.PortfolioId = &v - return s -} - -type ListPrincipalsForPortfolioOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // The IAM principals (users or roles) associated with the portfolio. - Principals []*Principal `type:"list"` -} - -// String returns the string representation -func (s ListPrincipalsForPortfolioOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPrincipalsForPortfolioOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListPrincipalsForPortfolioOutput) SetNextPageToken(v string) *ListPrincipalsForPortfolioOutput { - s.NextPageToken = &v - return s -} - -// SetPrincipals sets the Principals field's value. -func (s *ListPrincipalsForPortfolioOutput) SetPrincipals(v []*Principal) *ListPrincipalsForPortfolioOutput { - s.Principals = v - return s -} - -type ListProvisionedProductPlansInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The access level to use to obtain results. The default is User. - AccessLevelFilter *AccessLevelFilter `type:"structure"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The product identifier. - ProvisionProductId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListProvisionedProductPlansInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListProvisionedProductPlansInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListProvisionedProductPlansInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListProvisionedProductPlansInput"} - if s.ProvisionProductId != nil && len(*s.ProvisionProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisionProductId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListProvisionedProductPlansInput) SetAcceptLanguage(v string) *ListProvisionedProductPlansInput { - s.AcceptLanguage = &v - return s -} - -// SetAccessLevelFilter sets the AccessLevelFilter field's value. -func (s *ListProvisionedProductPlansInput) SetAccessLevelFilter(v *AccessLevelFilter) *ListProvisionedProductPlansInput { - s.AccessLevelFilter = v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListProvisionedProductPlansInput) SetPageSize(v int64) *ListProvisionedProductPlansInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListProvisionedProductPlansInput) SetPageToken(v string) *ListProvisionedProductPlansInput { - s.PageToken = &v - return s -} - -// SetProvisionProductId sets the ProvisionProductId field's value. -func (s *ListProvisionedProductPlansInput) SetProvisionProductId(v string) *ListProvisionedProductPlansInput { - s.ProvisionProductId = &v - return s -} - -type ListProvisionedProductPlansOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // Information about the plans. - ProvisionedProductPlans []*ProvisionedProductPlanSummary `type:"list"` -} - -// String returns the string representation -func (s ListProvisionedProductPlansOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListProvisionedProductPlansOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListProvisionedProductPlansOutput) SetNextPageToken(v string) *ListProvisionedProductPlansOutput { - s.NextPageToken = &v - return s -} - -// SetProvisionedProductPlans sets the ProvisionedProductPlans field's value. -func (s *ListProvisionedProductPlansOutput) SetProvisionedProductPlans(v []*ProvisionedProductPlanSummary) *ListProvisionedProductPlansOutput { - s.ProvisionedProductPlans = v - return s -} - -type ListProvisioningArtifactsForServiceActionInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The self-service action identifier. For example, act-fs7abcd89wxyz. - // - // ServiceActionId is a required field - ServiceActionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListProvisioningArtifactsForServiceActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListProvisioningArtifactsForServiceActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListProvisioningArtifactsForServiceActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListProvisioningArtifactsForServiceActionInput"} - if s.ServiceActionId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) - } - if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListProvisioningArtifactsForServiceActionInput) SetAcceptLanguage(v string) *ListProvisioningArtifactsForServiceActionInput { - s.AcceptLanguage = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListProvisioningArtifactsForServiceActionInput) SetPageSize(v int64) *ListProvisioningArtifactsForServiceActionInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListProvisioningArtifactsForServiceActionInput) SetPageToken(v string) *ListProvisioningArtifactsForServiceActionInput { - s.PageToken = &v - return s -} - -// SetServiceActionId sets the ServiceActionId field's value. -func (s *ListProvisioningArtifactsForServiceActionInput) SetServiceActionId(v string) *ListProvisioningArtifactsForServiceActionInput { - s.ServiceActionId = &v - return s -} - -type ListProvisioningArtifactsForServiceActionOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // An array of objects with information about product views and provisioning - // artifacts. - ProvisioningArtifactViews []*ProvisioningArtifactView `type:"list"` -} - -// String returns the string representation -func (s ListProvisioningArtifactsForServiceActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListProvisioningArtifactsForServiceActionOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListProvisioningArtifactsForServiceActionOutput) SetNextPageToken(v string) *ListProvisioningArtifactsForServiceActionOutput { - s.NextPageToken = &v - return s -} - -// SetProvisioningArtifactViews sets the ProvisioningArtifactViews field's value. -func (s *ListProvisioningArtifactsForServiceActionOutput) SetProvisioningArtifactViews(v []*ProvisioningArtifactView) *ListProvisioningArtifactsForServiceActionOutput { - s.ProvisioningArtifactViews = v - return s -} - -type ListProvisioningArtifactsInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The product identifier. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListProvisioningArtifactsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListProvisioningArtifactsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListProvisioningArtifactsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListProvisioningArtifactsInput"} - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListProvisioningArtifactsInput) SetAcceptLanguage(v string) *ListProvisioningArtifactsInput { - s.AcceptLanguage = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *ListProvisioningArtifactsInput) SetProductId(v string) *ListProvisioningArtifactsInput { - s.ProductId = &v - return s -} - -type ListProvisioningArtifactsOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // Information about the provisioning artifacts. - ProvisioningArtifactDetails []*ProvisioningArtifactDetail `type:"list"` -} - -// String returns the string representation -func (s ListProvisioningArtifactsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListProvisioningArtifactsOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListProvisioningArtifactsOutput) SetNextPageToken(v string) *ListProvisioningArtifactsOutput { - s.NextPageToken = &v - return s -} - -// SetProvisioningArtifactDetails sets the ProvisioningArtifactDetails field's value. -func (s *ListProvisioningArtifactsOutput) SetProvisioningArtifactDetails(v []*ProvisioningArtifactDetail) *ListProvisioningArtifactsOutput { - s.ProvisioningArtifactDetails = v - return s -} - -type ListRecordHistoryInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The access level to use to obtain results. The default is User. - AccessLevelFilter *AccessLevelFilter `type:"structure"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The search filter to scope the results. - SearchFilter *ListRecordHistorySearchFilter `type:"structure"` -} - -// String returns the string representation -func (s ListRecordHistoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRecordHistoryInput) GoString() string { - return s.String() -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListRecordHistoryInput) SetAcceptLanguage(v string) *ListRecordHistoryInput { - s.AcceptLanguage = &v - return s -} - -// SetAccessLevelFilter sets the AccessLevelFilter field's value. -func (s *ListRecordHistoryInput) SetAccessLevelFilter(v *AccessLevelFilter) *ListRecordHistoryInput { - s.AccessLevelFilter = v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListRecordHistoryInput) SetPageSize(v int64) *ListRecordHistoryInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListRecordHistoryInput) SetPageToken(v string) *ListRecordHistoryInput { - s.PageToken = &v - return s -} - -// SetSearchFilter sets the SearchFilter field's value. -func (s *ListRecordHistoryInput) SetSearchFilter(v *ListRecordHistorySearchFilter) *ListRecordHistoryInput { - s.SearchFilter = v - return s -} - -type ListRecordHistoryOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // The records, in reverse chronological order. - RecordDetails []*RecordDetail `type:"list"` -} - -// String returns the string representation -func (s ListRecordHistoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRecordHistoryOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListRecordHistoryOutput) SetNextPageToken(v string) *ListRecordHistoryOutput { - s.NextPageToken = &v - return s -} - -// SetRecordDetails sets the RecordDetails field's value. -func (s *ListRecordHistoryOutput) SetRecordDetails(v []*RecordDetail) *ListRecordHistoryOutput { - s.RecordDetails = v - return s -} - -// The search filter to use when listing history records. -type ListRecordHistorySearchFilter struct { - _ struct{} `type:"structure"` - - // The filter key. - // - // * product - Filter results based on the specified product identifier. - // - // * provisionedproduct - Filter results based on the provisioned product - // identifier. - Key *string `type:"string"` - - // The filter value. - Value *string `type:"string"` -} - -// String returns the string representation -func (s ListRecordHistorySearchFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRecordHistorySearchFilter) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *ListRecordHistorySearchFilter) SetKey(v string) *ListRecordHistorySearchFilter { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ListRecordHistorySearchFilter) SetValue(v string) *ListRecordHistorySearchFilter { - s.Value = &v - return s -} - -type ListResourcesForTagOptionInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The resource type. - // - // * Portfolio - // - // * Product - ResourceType *string `type:"string"` - - // The TagOption identifier. - // - // TagOptionId is a required field - TagOptionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListResourcesForTagOptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourcesForTagOptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResourcesForTagOptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResourcesForTagOptionInput"} - if s.TagOptionId == nil { - invalidParams.Add(request.NewErrParamRequired("TagOptionId")) - } - if s.TagOptionId != nil && len(*s.TagOptionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagOptionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPageSize sets the PageSize field's value. -func (s *ListResourcesForTagOptionInput) SetPageSize(v int64) *ListResourcesForTagOptionInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListResourcesForTagOptionInput) SetPageToken(v string) *ListResourcesForTagOptionInput { - s.PageToken = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ListResourcesForTagOptionInput) SetResourceType(v string) *ListResourcesForTagOptionInput { - s.ResourceType = &v - return s -} - -// SetTagOptionId sets the TagOptionId field's value. -func (s *ListResourcesForTagOptionInput) SetTagOptionId(v string) *ListResourcesForTagOptionInput { - s.TagOptionId = &v - return s -} - -type ListResourcesForTagOptionOutput struct { - _ struct{} `type:"structure"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // Information about the resources. - ResourceDetails []*ResourceDetail `type:"list"` -} - -// String returns the string representation -func (s ListResourcesForTagOptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourcesForTagOptionOutput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *ListResourcesForTagOptionOutput) SetPageToken(v string) *ListResourcesForTagOptionOutput { - s.PageToken = &v - return s -} - -// SetResourceDetails sets the ResourceDetails field's value. -func (s *ListResourcesForTagOptionOutput) SetResourceDetails(v []*ResourceDetail) *ListResourcesForTagOptionOutput { - s.ResourceDetails = v - return s -} - -type ListServiceActionsForProvisioningArtifactInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The product identifier. For example, prod-abcdzk7xy33qa. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` - - // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. - // - // ProvisioningArtifactId is a required field - ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListServiceActionsForProvisioningArtifactInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListServiceActionsForProvisioningArtifactInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListServiceActionsForProvisioningArtifactInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListServiceActionsForProvisioningArtifactInput"} - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - if s.ProvisioningArtifactId == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) - } - if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListServiceActionsForProvisioningArtifactInput) SetAcceptLanguage(v string) *ListServiceActionsForProvisioningArtifactInput { - s.AcceptLanguage = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListServiceActionsForProvisioningArtifactInput) SetPageSize(v int64) *ListServiceActionsForProvisioningArtifactInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListServiceActionsForProvisioningArtifactInput) SetPageToken(v string) *ListServiceActionsForProvisioningArtifactInput { - s.PageToken = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *ListServiceActionsForProvisioningArtifactInput) SetProductId(v string) *ListServiceActionsForProvisioningArtifactInput { - s.ProductId = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *ListServiceActionsForProvisioningArtifactInput) SetProvisioningArtifactId(v string) *ListServiceActionsForProvisioningArtifactInput { - s.ProvisioningArtifactId = &v - return s -} - -type ListServiceActionsForProvisioningArtifactOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // An object containing information about the self-service actions associated - // with the provisioning artifact. - ServiceActionSummaries []*ServiceActionSummary `type:"list"` -} - -// String returns the string representation -func (s ListServiceActionsForProvisioningArtifactOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListServiceActionsForProvisioningArtifactOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListServiceActionsForProvisioningArtifactOutput) SetNextPageToken(v string) *ListServiceActionsForProvisioningArtifactOutput { - s.NextPageToken = &v - return s -} - -// SetServiceActionSummaries sets the ServiceActionSummaries field's value. -func (s *ListServiceActionsForProvisioningArtifactOutput) SetServiceActionSummaries(v []*ServiceActionSummary) *ListServiceActionsForProvisioningArtifactOutput { - s.ServiceActionSummaries = v - return s -} - -type ListServiceActionsInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` -} - -// String returns the string representation -func (s ListServiceActionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListServiceActionsInput) GoString() string { - return s.String() -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListServiceActionsInput) SetAcceptLanguage(v string) *ListServiceActionsInput { - s.AcceptLanguage = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListServiceActionsInput) SetPageSize(v int64) *ListServiceActionsInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListServiceActionsInput) SetPageToken(v string) *ListServiceActionsInput { - s.PageToken = &v - return s -} - -type ListServiceActionsOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // An object containing information about the service actions associated with - // the provisioning artifact. - ServiceActionSummaries []*ServiceActionSummary `type:"list"` -} - -// String returns the string representation -func (s ListServiceActionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListServiceActionsOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListServiceActionsOutput) SetNextPageToken(v string) *ListServiceActionsOutput { - s.NextPageToken = &v - return s -} - -// SetServiceActionSummaries sets the ServiceActionSummaries field's value. -func (s *ListServiceActionsOutput) SetServiceActionSummaries(v []*ServiceActionSummary) *ListServiceActionsOutput { - s.ServiceActionSummaries = v - return s -} - -// Filters to use when listing TagOptions. -type ListTagOptionsFilters struct { - _ struct{} `type:"structure"` - - // The active state. - Active *bool `type:"boolean"` - - // The TagOption key. - Key *string `min:"1" type:"string"` - - // The TagOption value. - Value *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListTagOptionsFilters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagOptionsFilters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagOptionsFilters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagOptionsFilters"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActive sets the Active field's value. -func (s *ListTagOptionsFilters) SetActive(v bool) *ListTagOptionsFilters { - s.Active = &v - return s -} - -// SetKey sets the Key field's value. -func (s *ListTagOptionsFilters) SetKey(v string) *ListTagOptionsFilters { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ListTagOptionsFilters) SetValue(v string) *ListTagOptionsFilters { - s.Value = &v - return s -} - -type ListTagOptionsInput struct { - _ struct{} `type:"structure"` - - // The search filters. If no search filters are specified, the output includes - // all TagOptions. - Filters *ListTagOptionsFilters `type:"structure"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` -} - -// String returns the string representation -func (s ListTagOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagOptionsInput"} - if s.Filters != nil { - if err := s.Filters.Validate(); err != nil { - invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListTagOptionsInput) SetFilters(v *ListTagOptionsFilters) *ListTagOptionsInput { - s.Filters = v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ListTagOptionsInput) SetPageSize(v int64) *ListTagOptionsInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ListTagOptionsInput) SetPageToken(v string) *ListTagOptionsInput { - s.PageToken = &v - return s -} - -type ListTagOptionsOutput struct { - _ struct{} `type:"structure"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // Information about the TagOptions. - TagOptionDetails []*TagOptionDetail `type:"list"` -} - -// String returns the string representation -func (s ListTagOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagOptionsOutput) GoString() string { - return s.String() -} - -// SetPageToken sets the PageToken field's value. -func (s *ListTagOptionsOutput) SetPageToken(v string) *ListTagOptionsOutput { - s.PageToken = &v - return s -} - -// SetTagOptionDetails sets the TagOptionDetails field's value. -func (s *ListTagOptionsOutput) SetTagOptionDetails(v []*TagOptionDetail) *ListTagOptionsOutput { - s.TagOptionDetails = v - return s -} - -// Information about the organization node. -type OrganizationNode struct { - _ struct{} `type:"structure"` - - // The organization node type. - Type *string `type:"string" enum:"OrganizationNodeType"` - - // The identifier of the organization node. - Value *string `type:"string"` -} - -// String returns the string representation -func (s OrganizationNode) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OrganizationNode) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *OrganizationNode) SetType(v string) *OrganizationNode { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *OrganizationNode) SetValue(v string) *OrganizationNode { - s.Value = &v - return s -} - -// The constraints that the administrator has put on the parameter. -type ParameterConstraints struct { - _ struct{} `type:"structure"` - - // The values that the administrator has allowed for the parameter. - AllowedValues []*string `type:"list"` -} - -// String returns the string representation -func (s ParameterConstraints) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterConstraints) GoString() string { - return s.String() -} - -// SetAllowedValues sets the AllowedValues field's value. -func (s *ParameterConstraints) SetAllowedValues(v []*string) *ParameterConstraints { - s.AllowedValues = v - return s -} - -// Information about a portfolio. -type PortfolioDetail struct { - _ struct{} `type:"structure"` - - // The ARN assigned to the portfolio. - ARN *string `min:"1" type:"string"` - - // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp"` - - // The description of the portfolio. - Description *string `type:"string"` - - // The name to use for display purposes. - DisplayName *string `min:"1" type:"string"` - - // The portfolio identifier. - Id *string `min:"1" type:"string"` - - // The name of the portfolio provider. - ProviderName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PortfolioDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PortfolioDetail) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *PortfolioDetail) SetARN(v string) *PortfolioDetail { - s.ARN = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *PortfolioDetail) SetCreatedTime(v time.Time) *PortfolioDetail { - s.CreatedTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PortfolioDetail) SetDescription(v string) *PortfolioDetail { - s.Description = &v - return s -} - -// SetDisplayName sets the DisplayName field's value. -func (s *PortfolioDetail) SetDisplayName(v string) *PortfolioDetail { - s.DisplayName = &v - return s -} - -// SetId sets the Id field's value. -func (s *PortfolioDetail) SetId(v string) *PortfolioDetail { - s.Id = &v - return s -} - -// SetProviderName sets the ProviderName field's value. -func (s *PortfolioDetail) SetProviderName(v string) *PortfolioDetail { - s.ProviderName = &v - return s -} - -// Information about a principal. -type Principal struct { - _ struct{} `type:"structure"` - - // The ARN of the principal (IAM user, role, or group). - PrincipalARN *string `min:"1" type:"string"` - - // The principal type. The supported value is IAM. - PrincipalType *string `type:"string" enum:"PrincipalType"` -} - -// String returns the string representation -func (s Principal) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Principal) GoString() string { - return s.String() -} - -// SetPrincipalARN sets the PrincipalARN field's value. -func (s *Principal) SetPrincipalARN(v string) *Principal { - s.PrincipalARN = &v - return s -} - -// SetPrincipalType sets the PrincipalType field's value. -func (s *Principal) SetPrincipalType(v string) *Principal { - s.PrincipalType = &v - return s -} - -// A single product view aggregation value/count pair, containing metadata about -// each product to which the calling user has access. -type ProductViewAggregationValue struct { - _ struct{} `type:"structure"` - - // An approximate count of the products that match the value. - ApproximateCount *int64 `type:"integer"` - - // The value of the product view aggregation. - Value *string `type:"string"` -} - -// String returns the string representation -func (s ProductViewAggregationValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProductViewAggregationValue) GoString() string { - return s.String() -} - -// SetApproximateCount sets the ApproximateCount field's value. -func (s *ProductViewAggregationValue) SetApproximateCount(v int64) *ProductViewAggregationValue { - s.ApproximateCount = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ProductViewAggregationValue) SetValue(v string) *ProductViewAggregationValue { - s.Value = &v - return s -} - -// Information about a product view. -type ProductViewDetail struct { - _ struct{} `type:"structure"` - - // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp"` - - // The ARN of the product. - ProductARN *string `min:"1" type:"string"` - - // Summary information about the product view. - ProductViewSummary *ProductViewSummary `type:"structure"` - - // The status of the product. - // - // * AVAILABLE - The product is ready for use. - // - // * CREATING - Product creation has started; the product is not ready for - // use. - // - // * FAILED - An action failed. - Status *string `type:"string" enum:"Status"` -} - -// String returns the string representation -func (s ProductViewDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProductViewDetail) GoString() string { - return s.String() -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *ProductViewDetail) SetCreatedTime(v time.Time) *ProductViewDetail { - s.CreatedTime = &v - return s -} - -// SetProductARN sets the ProductARN field's value. -func (s *ProductViewDetail) SetProductARN(v string) *ProductViewDetail { - s.ProductARN = &v - return s -} - -// SetProductViewSummary sets the ProductViewSummary field's value. -func (s *ProductViewDetail) SetProductViewSummary(v *ProductViewSummary) *ProductViewDetail { - s.ProductViewSummary = v - return s -} - -// SetStatus sets the Status field's value. -func (s *ProductViewDetail) SetStatus(v string) *ProductViewDetail { - s.Status = &v - return s -} - -// Summary information about a product view. -type ProductViewSummary struct { - _ struct{} `type:"structure"` - - // The distributor of the product. Contact the product administrator for the - // significance of this value. - Distributor *string `type:"string"` - - // Indicates whether the product has a default path. If the product does not - // have a default path, call ListLaunchPaths to disambiguate between paths. - // Otherwise, ListLaunchPaths is not required, and the output of ProductViewSummary - // can be used directly with DescribeProvisioningParameters. - HasDefaultPath *bool `type:"boolean"` - - // The product view identifier. - Id *string `min:"1" type:"string"` - - // The name of the product. - Name *string `type:"string"` - - // The owner of the product. Contact the product administrator for the significance - // of this value. - Owner *string `type:"string"` - - // The product identifier. - ProductId *string `min:"1" type:"string"` - - // Short description of the product. - ShortDescription *string `type:"string"` - - // The description of the support for this Product. - SupportDescription *string `type:"string"` - - // The email contact information to obtain support for this Product. - SupportEmail *string `type:"string"` - - // The URL information to obtain support for this Product. - SupportUrl *string `type:"string"` - - // The product type. Contact the product administrator for the significance - // of this value. If this value is MARKETPLACE, the product was created by AWS - // Marketplace. - Type *string `type:"string" enum:"ProductType"` -} - -// String returns the string representation -func (s ProductViewSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProductViewSummary) GoString() string { - return s.String() -} - -// SetDistributor sets the Distributor field's value. -func (s *ProductViewSummary) SetDistributor(v string) *ProductViewSummary { - s.Distributor = &v - return s -} - -// SetHasDefaultPath sets the HasDefaultPath field's value. -func (s *ProductViewSummary) SetHasDefaultPath(v bool) *ProductViewSummary { - s.HasDefaultPath = &v - return s -} - -// SetId sets the Id field's value. -func (s *ProductViewSummary) SetId(v string) *ProductViewSummary { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *ProductViewSummary) SetName(v string) *ProductViewSummary { - s.Name = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *ProductViewSummary) SetOwner(v string) *ProductViewSummary { - s.Owner = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *ProductViewSummary) SetProductId(v string) *ProductViewSummary { - s.ProductId = &v - return s -} - -// SetShortDescription sets the ShortDescription field's value. -func (s *ProductViewSummary) SetShortDescription(v string) *ProductViewSummary { - s.ShortDescription = &v - return s -} - -// SetSupportDescription sets the SupportDescription field's value. -func (s *ProductViewSummary) SetSupportDescription(v string) *ProductViewSummary { - s.SupportDescription = &v - return s -} - -// SetSupportEmail sets the SupportEmail field's value. -func (s *ProductViewSummary) SetSupportEmail(v string) *ProductViewSummary { - s.SupportEmail = &v - return s -} - -// SetSupportUrl sets the SupportUrl field's value. -func (s *ProductViewSummary) SetSupportUrl(v string) *ProductViewSummary { - s.SupportUrl = &v - return s -} - -// SetType sets the Type field's value. -func (s *ProductViewSummary) SetType(v string) *ProductViewSummary { - s.Type = &v - return s -} - -type ProvisionProductInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // Passed to CloudFormation. The SNS topic ARNs to which to publish stack-related - // events. - NotificationArns []*string `type:"list"` - - // The path identifier of the product. This value is optional if the product - // has a default path, and required if the product has more than one path. To - // list the paths for a product, use ListLaunchPaths. - PathId *string `min:"1" type:"string"` - - // The product identifier. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` - - // An idempotency token that uniquely identifies the provisioning request. - ProvisionToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // A user-friendly name for the provisioned product. This value must be unique - // for the AWS account and cannot be updated after the product is provisioned. - // - // ProvisionedProductName is a required field - ProvisionedProductName *string `min:"1" type:"string" required:"true"` - - // The identifier of the provisioning artifact. - // - // ProvisioningArtifactId is a required field - ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` - - // Parameters specified by the administrator that are required for provisioning - // the product. - ProvisioningParameters []*ProvisioningParameter `type:"list"` - - // An object that contains information about the provisioning preferences for - // a stack set. - ProvisioningPreferences *ProvisioningPreferences `type:"structure"` - - // One or more tags. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s ProvisionProductInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisionProductInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProvisionProductInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProvisionProductInput"} - if s.PathId != nil && len(*s.PathId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathId", 1)) - } - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - if s.ProvisionToken != nil && len(*s.ProvisionToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisionToken", 1)) - } - if s.ProvisionedProductName == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisionedProductName")) - } - if s.ProvisionedProductName != nil && len(*s.ProvisionedProductName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductName", 1)) - } - if s.ProvisioningArtifactId == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) - } - if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) - } - if s.ProvisioningParameters != nil { - for i, v := range s.ProvisioningParameters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ProvisioningParameters", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ProvisioningPreferences != nil { - if err := s.ProvisioningPreferences.Validate(); err != nil { - invalidParams.AddNested("ProvisioningPreferences", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ProvisionProductInput) SetAcceptLanguage(v string) *ProvisionProductInput { - s.AcceptLanguage = &v - return s -} - -// SetNotificationArns sets the NotificationArns field's value. -func (s *ProvisionProductInput) SetNotificationArns(v []*string) *ProvisionProductInput { - s.NotificationArns = v - return s -} - -// SetPathId sets the PathId field's value. -func (s *ProvisionProductInput) SetPathId(v string) *ProvisionProductInput { - s.PathId = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *ProvisionProductInput) SetProductId(v string) *ProvisionProductInput { - s.ProductId = &v - return s -} - -// SetProvisionToken sets the ProvisionToken field's value. -func (s *ProvisionProductInput) SetProvisionToken(v string) *ProvisionProductInput { - s.ProvisionToken = &v - return s -} - -// SetProvisionedProductName sets the ProvisionedProductName field's value. -func (s *ProvisionProductInput) SetProvisionedProductName(v string) *ProvisionProductInput { - s.ProvisionedProductName = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *ProvisionProductInput) SetProvisioningArtifactId(v string) *ProvisionProductInput { - s.ProvisioningArtifactId = &v - return s -} - -// SetProvisioningParameters sets the ProvisioningParameters field's value. -func (s *ProvisionProductInput) SetProvisioningParameters(v []*ProvisioningParameter) *ProvisionProductInput { - s.ProvisioningParameters = v - return s -} - -// SetProvisioningPreferences sets the ProvisioningPreferences field's value. -func (s *ProvisionProductInput) SetProvisioningPreferences(v *ProvisioningPreferences) *ProvisionProductInput { - s.ProvisioningPreferences = v - return s -} - -// SetTags sets the Tags field's value. -func (s *ProvisionProductInput) SetTags(v []*Tag) *ProvisionProductInput { - s.Tags = v - return s -} - -type ProvisionProductOutput struct { - _ struct{} `type:"structure"` - - // Information about the result of provisioning the product. - RecordDetail *RecordDetail `type:"structure"` -} - -// String returns the string representation -func (s ProvisionProductOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisionProductOutput) GoString() string { - return s.String() -} - -// SetRecordDetail sets the RecordDetail field's value. -func (s *ProvisionProductOutput) SetRecordDetail(v *RecordDetail) *ProvisionProductOutput { - s.RecordDetail = v - return s -} - -// Information about a provisioned product. -type ProvisionedProductAttribute struct { - _ struct{} `type:"structure"` - - // The ARN of the provisioned product. - Arn *string `min:"1" type:"string"` - - // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp"` - - // The identifier of the provisioned product. - Id *string `min:"1" type:"string"` - - // A unique identifier that you provide to ensure idempotency. If multiple requests - // differ only by the idempotency token, the same response is returned for each - // repeated request. - IdempotencyToken *string `min:"1" type:"string"` - - // The record identifier of the last request performed on this provisioned product. - LastRecordId *string `min:"1" type:"string"` - - // The user-friendly name of the provisioned product. - Name *string `min:"1" type:"string"` - - // The assigned identifier for the resource, such as an EC2 instance ID or an - // S3 bucket name. - PhysicalId *string `type:"string"` - - // The product identifier. - ProductId *string `min:"1" type:"string"` - - // The identifier of the provisioning artifact. - ProvisioningArtifactId *string `min:"1" type:"string"` - - // The current status of the provisioned product. - // - // * AVAILABLE - Stable state, ready to perform any operation. The most recent - // operation succeeded and completed. - // - // * UNDER_CHANGE - Transitive state, operations performed might not have - // valid results. Wait for an AVAILABLE status before performing operations. - // - // * TAINTED - Stable state, ready to perform any operation. The stack has - // completed the requested operation but is not exactly what was requested. - // For example, a request to update to a new version failed and the stack - // rolled back to the current version. - // - // * ERROR - An unexpected error occurred, the provisioned product exists - // but the stack is not running. For example, CloudFormation received a parameter - // value that was not valid and could not launch the stack. - Status *string `type:"string" enum:"ProvisionedProductStatus"` - - // The current status message of the provisioned product. - StatusMessage *string `type:"string"` - - // One or more tags. - Tags []*Tag `type:"list"` - - // The type of provisioned product. The supported values are CFN_STACK and CFN_STACKSET. - Type *string `type:"string"` - - // The Amazon Resource Name (ARN) of the IAM user. - UserArn *string `type:"string"` - - // The ARN of the IAM user in the session. This ARN might contain a session - // ID. - UserArnSession *string `type:"string"` -} - -// String returns the string representation -func (s ProvisionedProductAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisionedProductAttribute) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ProvisionedProductAttribute) SetArn(v string) *ProvisionedProductAttribute { - s.Arn = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *ProvisionedProductAttribute) SetCreatedTime(v time.Time) *ProvisionedProductAttribute { - s.CreatedTime = &v - return s -} - -// SetId sets the Id field's value. -func (s *ProvisionedProductAttribute) SetId(v string) *ProvisionedProductAttribute { - s.Id = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *ProvisionedProductAttribute) SetIdempotencyToken(v string) *ProvisionedProductAttribute { - s.IdempotencyToken = &v - return s -} - -// SetLastRecordId sets the LastRecordId field's value. -func (s *ProvisionedProductAttribute) SetLastRecordId(v string) *ProvisionedProductAttribute { - s.LastRecordId = &v - return s -} - -// SetName sets the Name field's value. -func (s *ProvisionedProductAttribute) SetName(v string) *ProvisionedProductAttribute { - s.Name = &v - return s -} - -// SetPhysicalId sets the PhysicalId field's value. -func (s *ProvisionedProductAttribute) SetPhysicalId(v string) *ProvisionedProductAttribute { - s.PhysicalId = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *ProvisionedProductAttribute) SetProductId(v string) *ProvisionedProductAttribute { - s.ProductId = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *ProvisionedProductAttribute) SetProvisioningArtifactId(v string) *ProvisionedProductAttribute { - s.ProvisioningArtifactId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ProvisionedProductAttribute) SetStatus(v string) *ProvisionedProductAttribute { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ProvisionedProductAttribute) SetStatusMessage(v string) *ProvisionedProductAttribute { - s.StatusMessage = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ProvisionedProductAttribute) SetTags(v []*Tag) *ProvisionedProductAttribute { - s.Tags = v - return s -} - -// SetType sets the Type field's value. -func (s *ProvisionedProductAttribute) SetType(v string) *ProvisionedProductAttribute { - s.Type = &v - return s -} - -// SetUserArn sets the UserArn field's value. -func (s *ProvisionedProductAttribute) SetUserArn(v string) *ProvisionedProductAttribute { - s.UserArn = &v - return s -} - -// SetUserArnSession sets the UserArnSession field's value. -func (s *ProvisionedProductAttribute) SetUserArnSession(v string) *ProvisionedProductAttribute { - s.UserArnSession = &v - return s -} - -// Information about a provisioned product. -type ProvisionedProductDetail struct { - _ struct{} `type:"structure"` - - // The ARN of the provisioned product. - Arn *string `min:"1" type:"string"` - - // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp"` - - // The identifier of the provisioned product. - Id *string `type:"string"` - - // A unique identifier that you provide to ensure idempotency. If multiple requests - // differ only by the idempotency token, the same response is returned for each - // repeated request. - IdempotencyToken *string `min:"1" type:"string"` - - // The record identifier of the last request performed on this provisioned product. - LastRecordId *string `type:"string"` - - // The user-friendly name of the provisioned product. - Name *string `min:"1" type:"string"` - - // The product identifier. For example, prod-abcdzk7xy33qa. - ProductId *string `min:"1" type:"string"` - - // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. - ProvisioningArtifactId *string `min:"1" type:"string"` - - // The current status of the provisioned product. - // - // * AVAILABLE - Stable state, ready to perform any operation. The most recent - // operation succeeded and completed. - // - // * UNDER_CHANGE - Transitive state, operations performed might not have - // valid results. Wait for an AVAILABLE status before performing operations. - // - // * TAINTED - Stable state, ready to perform any operation. The stack has - // completed the requested operation but is not exactly what was requested. - // For example, a request to update to a new version failed and the stack - // rolled back to the current version. - // - // * ERROR - An unexpected error occurred, the provisioned product exists - // but the stack is not running. For example, CloudFormation received a parameter - // value that was not valid and could not launch the stack. - Status *string `type:"string" enum:"ProvisionedProductStatus"` - - // The current status message of the provisioned product. - StatusMessage *string `type:"string"` - - // The type of provisioned product. The supported values are CFN_STACK and CFN_STACKSET. - Type *string `type:"string"` -} - -// String returns the string representation -func (s ProvisionedProductDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisionedProductDetail) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ProvisionedProductDetail) SetArn(v string) *ProvisionedProductDetail { - s.Arn = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *ProvisionedProductDetail) SetCreatedTime(v time.Time) *ProvisionedProductDetail { - s.CreatedTime = &v - return s -} - -// SetId sets the Id field's value. -func (s *ProvisionedProductDetail) SetId(v string) *ProvisionedProductDetail { - s.Id = &v - return s -} - -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *ProvisionedProductDetail) SetIdempotencyToken(v string) *ProvisionedProductDetail { - s.IdempotencyToken = &v - return s -} - -// SetLastRecordId sets the LastRecordId field's value. -func (s *ProvisionedProductDetail) SetLastRecordId(v string) *ProvisionedProductDetail { - s.LastRecordId = &v - return s -} - -// SetName sets the Name field's value. -func (s *ProvisionedProductDetail) SetName(v string) *ProvisionedProductDetail { - s.Name = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *ProvisionedProductDetail) SetProductId(v string) *ProvisionedProductDetail { - s.ProductId = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *ProvisionedProductDetail) SetProvisioningArtifactId(v string) *ProvisionedProductDetail { - s.ProvisioningArtifactId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ProvisionedProductDetail) SetStatus(v string) *ProvisionedProductDetail { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ProvisionedProductDetail) SetStatusMessage(v string) *ProvisionedProductDetail { - s.StatusMessage = &v - return s -} - -// SetType sets the Type field's value. -func (s *ProvisionedProductDetail) SetType(v string) *ProvisionedProductDetail { - s.Type = &v - return s -} - -// Information about a plan. -type ProvisionedProductPlanDetails struct { - _ struct{} `type:"structure"` - - // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp"` - - // Passed to CloudFormation. The SNS topic ARNs to which to publish stack-related - // events. - NotificationArns []*string `type:"list"` - - // The path identifier of the product. This value is optional if the product - // has a default path, and required if the product has more than one path. To - // list the paths for a product, use ListLaunchPaths. - PathId *string `min:"1" type:"string"` - - // The plan identifier. - PlanId *string `min:"1" type:"string"` - - // The name of the plan. - PlanName *string `type:"string"` - - // The plan type. - PlanType *string `type:"string" enum:"ProvisionedProductPlanType"` - - // The product identifier. - ProductId *string `min:"1" type:"string"` - - // The product identifier. - ProvisionProductId *string `min:"1" type:"string"` - - // The user-friendly name of the provisioned product. - ProvisionProductName *string `min:"1" type:"string"` - - // The identifier of the provisioning artifact. - ProvisioningArtifactId *string `min:"1" type:"string"` - - // Parameters specified by the administrator that are required for provisioning - // the product. - ProvisioningParameters []*UpdateProvisioningParameter `type:"list"` - - // The status. - Status *string `type:"string" enum:"ProvisionedProductPlanStatus"` - - // The status message. - StatusMessage *string `type:"string"` - - // One or more tags. - Tags []*Tag `type:"list"` - - // The time when the plan was last updated. - UpdatedTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s ProvisionedProductPlanDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisionedProductPlanDetails) GoString() string { - return s.String() -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *ProvisionedProductPlanDetails) SetCreatedTime(v time.Time) *ProvisionedProductPlanDetails { - s.CreatedTime = &v - return s -} - -// SetNotificationArns sets the NotificationArns field's value. -func (s *ProvisionedProductPlanDetails) SetNotificationArns(v []*string) *ProvisionedProductPlanDetails { - s.NotificationArns = v - return s -} - -// SetPathId sets the PathId field's value. -func (s *ProvisionedProductPlanDetails) SetPathId(v string) *ProvisionedProductPlanDetails { - s.PathId = &v - return s -} - -// SetPlanId sets the PlanId field's value. -func (s *ProvisionedProductPlanDetails) SetPlanId(v string) *ProvisionedProductPlanDetails { - s.PlanId = &v - return s -} - -// SetPlanName sets the PlanName field's value. -func (s *ProvisionedProductPlanDetails) SetPlanName(v string) *ProvisionedProductPlanDetails { - s.PlanName = &v - return s -} - -// SetPlanType sets the PlanType field's value. -func (s *ProvisionedProductPlanDetails) SetPlanType(v string) *ProvisionedProductPlanDetails { - s.PlanType = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *ProvisionedProductPlanDetails) SetProductId(v string) *ProvisionedProductPlanDetails { - s.ProductId = &v - return s -} - -// SetProvisionProductId sets the ProvisionProductId field's value. -func (s *ProvisionedProductPlanDetails) SetProvisionProductId(v string) *ProvisionedProductPlanDetails { - s.ProvisionProductId = &v - return s -} - -// SetProvisionProductName sets the ProvisionProductName field's value. -func (s *ProvisionedProductPlanDetails) SetProvisionProductName(v string) *ProvisionedProductPlanDetails { - s.ProvisionProductName = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *ProvisionedProductPlanDetails) SetProvisioningArtifactId(v string) *ProvisionedProductPlanDetails { - s.ProvisioningArtifactId = &v - return s -} - -// SetProvisioningParameters sets the ProvisioningParameters field's value. -func (s *ProvisionedProductPlanDetails) SetProvisioningParameters(v []*UpdateProvisioningParameter) *ProvisionedProductPlanDetails { - s.ProvisioningParameters = v - return s -} - -// SetStatus sets the Status field's value. -func (s *ProvisionedProductPlanDetails) SetStatus(v string) *ProvisionedProductPlanDetails { - s.Status = &v - return s -} - -// SetStatusMessage sets the StatusMessage field's value. -func (s *ProvisionedProductPlanDetails) SetStatusMessage(v string) *ProvisionedProductPlanDetails { - s.StatusMessage = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ProvisionedProductPlanDetails) SetTags(v []*Tag) *ProvisionedProductPlanDetails { - s.Tags = v - return s -} - -// SetUpdatedTime sets the UpdatedTime field's value. -func (s *ProvisionedProductPlanDetails) SetUpdatedTime(v time.Time) *ProvisionedProductPlanDetails { - s.UpdatedTime = &v - return s -} - -// Summary information about a plan. -type ProvisionedProductPlanSummary struct { - _ struct{} `type:"structure"` - - // The plan identifier. - PlanId *string `min:"1" type:"string"` - - // The name of the plan. - PlanName *string `type:"string"` - - // The plan type. - PlanType *string `type:"string" enum:"ProvisionedProductPlanType"` - - // The product identifier. - ProvisionProductId *string `min:"1" type:"string"` - - // The user-friendly name of the provisioned product. - ProvisionProductName *string `min:"1" type:"string"` - - // The identifier of the provisioning artifact. - ProvisioningArtifactId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ProvisionedProductPlanSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisionedProductPlanSummary) GoString() string { - return s.String() -} - -// SetPlanId sets the PlanId field's value. -func (s *ProvisionedProductPlanSummary) SetPlanId(v string) *ProvisionedProductPlanSummary { - s.PlanId = &v - return s -} - -// SetPlanName sets the PlanName field's value. -func (s *ProvisionedProductPlanSummary) SetPlanName(v string) *ProvisionedProductPlanSummary { - s.PlanName = &v - return s -} - -// SetPlanType sets the PlanType field's value. -func (s *ProvisionedProductPlanSummary) SetPlanType(v string) *ProvisionedProductPlanSummary { - s.PlanType = &v - return s -} - -// SetProvisionProductId sets the ProvisionProductId field's value. -func (s *ProvisionedProductPlanSummary) SetProvisionProductId(v string) *ProvisionedProductPlanSummary { - s.ProvisionProductId = &v - return s -} - -// SetProvisionProductName sets the ProvisionProductName field's value. -func (s *ProvisionedProductPlanSummary) SetProvisionProductName(v string) *ProvisionedProductPlanSummary { - s.ProvisionProductName = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *ProvisionedProductPlanSummary) SetProvisioningArtifactId(v string) *ProvisionedProductPlanSummary { - s.ProvisioningArtifactId = &v - return s -} - -// Information about a provisioning artifact. A provisioning artifact is also -// known as a product version. -type ProvisioningArtifact struct { - _ struct{} `type:"structure"` - - // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp"` - - // The description of the provisioning artifact. - Description *string `type:"string"` - - // The identifier of the provisioning artifact. - Id *string `min:"1" type:"string"` - - // The name of the provisioning artifact. - Name *string `type:"string"` -} - -// String returns the string representation -func (s ProvisioningArtifact) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisioningArtifact) GoString() string { - return s.String() -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *ProvisioningArtifact) SetCreatedTime(v time.Time) *ProvisioningArtifact { - s.CreatedTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ProvisioningArtifact) SetDescription(v string) *ProvisioningArtifact { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *ProvisioningArtifact) SetId(v string) *ProvisioningArtifact { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *ProvisioningArtifact) SetName(v string) *ProvisioningArtifact { - s.Name = &v - return s -} - -// Information about a provisioning artifact (also known as a version) for a -// product. -type ProvisioningArtifactDetail struct { - _ struct{} `type:"structure"` - - // Indicates whether the product version is active. - Active *bool `type:"boolean"` - - // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp"` - - // The description of the provisioning artifact. - Description *string `type:"string"` - - // The identifier of the provisioning artifact. - Id *string `min:"1" type:"string"` - - // The name of the provisioning artifact. - Name *string `type:"string"` - - // The type of provisioning artifact. - // - // * CLOUD_FORMATION_TEMPLATE - AWS CloudFormation template - // - // * MARKETPLACE_AMI - AWS Marketplace AMI - // - // * MARKETPLACE_CAR - AWS Marketplace Clusters and AWS Resources - Type *string `type:"string" enum:"ProvisioningArtifactType"` -} - -// String returns the string representation -func (s ProvisioningArtifactDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisioningArtifactDetail) GoString() string { - return s.String() -} - -// SetActive sets the Active field's value. -func (s *ProvisioningArtifactDetail) SetActive(v bool) *ProvisioningArtifactDetail { - s.Active = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *ProvisioningArtifactDetail) SetCreatedTime(v time.Time) *ProvisioningArtifactDetail { - s.CreatedTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ProvisioningArtifactDetail) SetDescription(v string) *ProvisioningArtifactDetail { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *ProvisioningArtifactDetail) SetId(v string) *ProvisioningArtifactDetail { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *ProvisioningArtifactDetail) SetName(v string) *ProvisioningArtifactDetail { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *ProvisioningArtifactDetail) SetType(v string) *ProvisioningArtifactDetail { - s.Type = &v - return s -} - -// Information about a parameter used to provision a product. -type ProvisioningArtifactParameter struct { - _ struct{} `type:"structure"` - - // The default value. - DefaultValue *string `type:"string"` - - // The description of the parameter. - Description *string `type:"string"` - - // If this value is true, the value for this parameter is obfuscated from view - // when the parameter is retrieved. This parameter is used to hide sensitive - // information. - IsNoEcho *bool `type:"boolean"` - - // Constraints that the administrator has put on a parameter. - ParameterConstraints *ParameterConstraints `type:"structure"` - - // The parameter key. - ParameterKey *string `min:"1" type:"string"` - - // The parameter type. - ParameterType *string `type:"string"` -} - -// String returns the string representation -func (s ProvisioningArtifactParameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisioningArtifactParameter) GoString() string { - return s.String() -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *ProvisioningArtifactParameter) SetDefaultValue(v string) *ProvisioningArtifactParameter { - s.DefaultValue = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ProvisioningArtifactParameter) SetDescription(v string) *ProvisioningArtifactParameter { - s.Description = &v - return s -} - -// SetIsNoEcho sets the IsNoEcho field's value. -func (s *ProvisioningArtifactParameter) SetIsNoEcho(v bool) *ProvisioningArtifactParameter { - s.IsNoEcho = &v - return s -} - -// SetParameterConstraints sets the ParameterConstraints field's value. -func (s *ProvisioningArtifactParameter) SetParameterConstraints(v *ParameterConstraints) *ProvisioningArtifactParameter { - s.ParameterConstraints = v - return s -} - -// SetParameterKey sets the ParameterKey field's value. -func (s *ProvisioningArtifactParameter) SetParameterKey(v string) *ProvisioningArtifactParameter { - s.ParameterKey = &v - return s -} - -// SetParameterType sets the ParameterType field's value. -func (s *ProvisioningArtifactParameter) SetParameterType(v string) *ProvisioningArtifactParameter { - s.ParameterType = &v - return s -} - -// The user-defined preferences that will be applied during product provisioning, -// unless overridden by ProvisioningPreferences or UpdateProvisioningPreferences. -// -// For more information on maximum concurrent accounts and failure tolerance, -// see Stack set operation options (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stackset-ops-options) -// in the AWS CloudFormation User Guide. -type ProvisioningArtifactPreferences struct { - _ struct{} `type:"structure"` - - // One or more AWS accounts where stack instances are deployed from the stack - // set. These accounts can be scoped in ProvisioningPreferences$StackSetAccounts - // and UpdateProvisioningPreferences$StackSetAccounts. - // - // Applicable only to a CFN_STACKSET provisioned product type. - StackSetAccounts []*string `type:"list"` - - // One or more AWS Regions where stack instances are deployed from the stack - // set. These regions can be scoped in ProvisioningPreferences$StackSetRegions - // and UpdateProvisioningPreferences$StackSetRegions. - // - // Applicable only to a CFN_STACKSET provisioned product type. - StackSetRegions []*string `type:"list"` -} - -// String returns the string representation -func (s ProvisioningArtifactPreferences) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisioningArtifactPreferences) GoString() string { - return s.String() -} - -// SetStackSetAccounts sets the StackSetAccounts field's value. -func (s *ProvisioningArtifactPreferences) SetStackSetAccounts(v []*string) *ProvisioningArtifactPreferences { - s.StackSetAccounts = v - return s -} - -// SetStackSetRegions sets the StackSetRegions field's value. -func (s *ProvisioningArtifactPreferences) SetStackSetRegions(v []*string) *ProvisioningArtifactPreferences { - s.StackSetRegions = v - return s -} - -// Information about a provisioning artifact (also known as a version) for a -// product. -type ProvisioningArtifactProperties struct { - _ struct{} `type:"structure"` - - // The description of the provisioning artifact, including how it differs from - // the previous provisioning artifact. - Description *string `type:"string"` - - // The URL of the CloudFormation template in Amazon S3. Specify the URL in JSON - // format as follows: - // - // "LoadTemplateFromURL": "https://s3.amazonaws.com/cf-templates-ozkq9d3hgiq2-us-east-1/..." - // - // Info is a required field - Info map[string]*string `min:"1" type:"map" required:"true"` - - // The name of the provisioning artifact (for example, v1 v2beta). No spaces - // are allowed. - Name *string `type:"string"` - - // The type of provisioning artifact. - // - // * CLOUD_FORMATION_TEMPLATE - AWS CloudFormation template - // - // * MARKETPLACE_AMI - AWS Marketplace AMI - // - // * MARKETPLACE_CAR - AWS Marketplace Clusters and AWS Resources - Type *string `type:"string" enum:"ProvisioningArtifactType"` -} - -// String returns the string representation -func (s ProvisioningArtifactProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisioningArtifactProperties) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProvisioningArtifactProperties) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProvisioningArtifactProperties"} - if s.Info == nil { - invalidParams.Add(request.NewErrParamRequired("Info")) - } - if s.Info != nil && len(s.Info) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Info", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *ProvisioningArtifactProperties) SetDescription(v string) *ProvisioningArtifactProperties { - s.Description = &v - return s -} - -// SetInfo sets the Info field's value. -func (s *ProvisioningArtifactProperties) SetInfo(v map[string]*string) *ProvisioningArtifactProperties { - s.Info = v - return s -} - -// SetName sets the Name field's value. -func (s *ProvisioningArtifactProperties) SetName(v string) *ProvisioningArtifactProperties { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *ProvisioningArtifactProperties) SetType(v string) *ProvisioningArtifactProperties { - s.Type = &v - return s -} - -// Summary information about a provisioning artifact (also known as a version) -// for a product. -type ProvisioningArtifactSummary struct { - _ struct{} `type:"structure"` - - // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp"` - - // The description of the provisioning artifact. - Description *string `type:"string"` - - // The identifier of the provisioning artifact. - Id *string `min:"1" type:"string"` - - // The name of the provisioning artifact. - Name *string `type:"string"` - - // The metadata for the provisioning artifact. This is used with AWS Marketplace - // products. - ProvisioningArtifactMetadata map[string]*string `min:"1" type:"map"` -} - -// String returns the string representation -func (s ProvisioningArtifactSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisioningArtifactSummary) GoString() string { - return s.String() -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *ProvisioningArtifactSummary) SetCreatedTime(v time.Time) *ProvisioningArtifactSummary { - s.CreatedTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ProvisioningArtifactSummary) SetDescription(v string) *ProvisioningArtifactSummary { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *ProvisioningArtifactSummary) SetId(v string) *ProvisioningArtifactSummary { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *ProvisioningArtifactSummary) SetName(v string) *ProvisioningArtifactSummary { - s.Name = &v - return s -} - -// SetProvisioningArtifactMetadata sets the ProvisioningArtifactMetadata field's value. -func (s *ProvisioningArtifactSummary) SetProvisioningArtifactMetadata(v map[string]*string) *ProvisioningArtifactSummary { - s.ProvisioningArtifactMetadata = v - return s -} - -// An object that contains summary information about a product view and a provisioning -// artifact. -type ProvisioningArtifactView struct { - _ struct{} `type:"structure"` - - // Summary information about a product view. - ProductViewSummary *ProductViewSummary `type:"structure"` - - // Information about a provisioning artifact. A provisioning artifact is also - // known as a product version. - ProvisioningArtifact *ProvisioningArtifact `type:"structure"` -} - -// String returns the string representation -func (s ProvisioningArtifactView) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisioningArtifactView) GoString() string { - return s.String() -} - -// SetProductViewSummary sets the ProductViewSummary field's value. -func (s *ProvisioningArtifactView) SetProductViewSummary(v *ProductViewSummary) *ProvisioningArtifactView { - s.ProductViewSummary = v - return s -} - -// SetProvisioningArtifact sets the ProvisioningArtifact field's value. -func (s *ProvisioningArtifactView) SetProvisioningArtifact(v *ProvisioningArtifact) *ProvisioningArtifactView { - s.ProvisioningArtifact = v - return s -} - -// Information about a parameter used to provision a product. -type ProvisioningParameter struct { - _ struct{} `type:"structure"` - - // The parameter key. - Key *string `min:"1" type:"string"` - - // The parameter value. - Value *string `type:"string"` -} - -// String returns the string representation -func (s ProvisioningParameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisioningParameter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProvisioningParameter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProvisioningParameter"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *ProvisioningParameter) SetKey(v string) *ProvisioningParameter { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ProvisioningParameter) SetValue(v string) *ProvisioningParameter { - s.Value = &v - return s -} - -// The user-defined preferences that will be applied when updating a provisioned -// product. Not all preferences are applicable to all provisioned product types. -type ProvisioningPreferences struct { - _ struct{} `type:"structure"` - - // One or more AWS accounts that will have access to the provisioned product. - // - // Applicable only to a CFN_STACKSET provisioned product type. - // - // The AWS accounts specified should be within the list of accounts in the STACKSET - // constraint. To get the list of accounts in the STACKSET constraint, use the - // DescribeProvisioningParameters operation. - // - // If no values are specified, the default value is all accounts from the STACKSET - // constraint. - StackSetAccounts []*string `type:"list"` - - // The number of accounts, per region, for which this operation can fail before - // AWS Service Catalog stops the operation in that region. If the operation - // is stopped in a region, AWS Service Catalog doesn't attempt the operation - // in any subsequent regions. - // - // Applicable only to a CFN_STACKSET provisioned product type. - // - // Conditional: You must specify either StackSetFailureToleranceCount or StackSetFailureTolerancePercentage, - // but not both. - // - // The default value is 0 if no value is specified. - StackSetFailureToleranceCount *int64 `type:"integer"` - - // The percentage of accounts, per region, for which this stack operation can - // fail before AWS Service Catalog stops the operation in that region. If the - // operation is stopped in a region, AWS Service Catalog doesn't attempt the - // operation in any subsequent regions. - // - // When calculating the number of accounts based on the specified percentage, - // AWS Service Catalog rounds down to the next whole number. - // - // Applicable only to a CFN_STACKSET provisioned product type. - // - // Conditional: You must specify either StackSetFailureToleranceCount or StackSetFailureTolerancePercentage, - // but not both. - StackSetFailureTolerancePercentage *int64 `type:"integer"` - - // The maximum number of accounts in which to perform this operation at one - // time. This is dependent on the value of StackSetFailureToleranceCount. StackSetMaxConcurrentCount - // is at most one more than the StackSetFailureToleranceCount. - // - // Note that this setting lets you specify the maximum for operations. For large - // deployments, under certain circumstances the actual number of accounts acted - // upon concurrently may be lower due to service throttling. - // - // Applicable only to a CFN_STACKSET provisioned product type. - // - // Conditional: You must specify either StackSetMaxConcurrentCount or StackSetMaxConcurrentPercentage, - // but not both. - StackSetMaxConcurrencyCount *int64 `min:"1" type:"integer"` - - // The maximum percentage of accounts in which to perform this operation at - // one time. - // - // When calculating the number of accounts based on the specified percentage, - // AWS Service Catalog rounds down to the next whole number. This is true except - // in cases where rounding down would result is zero. In this case, AWS Service - // Catalog sets the number as 1 instead. - // - // Note that this setting lets you specify the maximum for operations. For large - // deployments, under certain circumstances the actual number of accounts acted - // upon concurrently may be lower due to service throttling. - // - // Applicable only to a CFN_STACKSET provisioned product type. - // - // Conditional: You must specify either StackSetMaxConcurrentCount or StackSetMaxConcurrentPercentage, - // but not both. - StackSetMaxConcurrencyPercentage *int64 `min:"1" type:"integer"` - - // One or more AWS Regions where the provisioned product will be available. - // - // Applicable only to a CFN_STACKSET provisioned product type. - // - // The specified regions should be within the list of regions from the STACKSET - // constraint. To get the list of regions in the STACKSET constraint, use the - // DescribeProvisioningParameters operation. - // - // If no values are specified, the default value is all regions from the STACKSET - // constraint. - StackSetRegions []*string `type:"list"` -} - -// String returns the string representation -func (s ProvisioningPreferences) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProvisioningPreferences) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ProvisioningPreferences) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProvisioningPreferences"} - if s.StackSetMaxConcurrencyCount != nil && *s.StackSetMaxConcurrencyCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("StackSetMaxConcurrencyCount", 1)) - } - if s.StackSetMaxConcurrencyPercentage != nil && *s.StackSetMaxConcurrencyPercentage < 1 { - invalidParams.Add(request.NewErrParamMinValue("StackSetMaxConcurrencyPercentage", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStackSetAccounts sets the StackSetAccounts field's value. -func (s *ProvisioningPreferences) SetStackSetAccounts(v []*string) *ProvisioningPreferences { - s.StackSetAccounts = v - return s -} - -// SetStackSetFailureToleranceCount sets the StackSetFailureToleranceCount field's value. -func (s *ProvisioningPreferences) SetStackSetFailureToleranceCount(v int64) *ProvisioningPreferences { - s.StackSetFailureToleranceCount = &v - return s -} - -// SetStackSetFailureTolerancePercentage sets the StackSetFailureTolerancePercentage field's value. -func (s *ProvisioningPreferences) SetStackSetFailureTolerancePercentage(v int64) *ProvisioningPreferences { - s.StackSetFailureTolerancePercentage = &v - return s -} - -// SetStackSetMaxConcurrencyCount sets the StackSetMaxConcurrencyCount field's value. -func (s *ProvisioningPreferences) SetStackSetMaxConcurrencyCount(v int64) *ProvisioningPreferences { - s.StackSetMaxConcurrencyCount = &v - return s -} - -// SetStackSetMaxConcurrencyPercentage sets the StackSetMaxConcurrencyPercentage field's value. -func (s *ProvisioningPreferences) SetStackSetMaxConcurrencyPercentage(v int64) *ProvisioningPreferences { - s.StackSetMaxConcurrencyPercentage = &v - return s -} - -// SetStackSetRegions sets the StackSetRegions field's value. -func (s *ProvisioningPreferences) SetStackSetRegions(v []*string) *ProvisioningPreferences { - s.StackSetRegions = v - return s -} - -// Information about a request operation. -type RecordDetail struct { - _ struct{} `type:"structure"` - - // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp"` - - // The path identifier. - PathId *string `min:"1" type:"string"` - - // The product identifier. - ProductId *string `min:"1" type:"string"` - - // The identifier of the provisioned product. - ProvisionedProductId *string `min:"1" type:"string"` - - // The user-friendly name of the provisioned product. - ProvisionedProductName *string `min:"1" type:"string"` - - // The type of provisioned product. The supported values are CFN_STACK and CFN_STACKSET. - ProvisionedProductType *string `type:"string"` - - // The identifier of the provisioning artifact. - ProvisioningArtifactId *string `min:"1" type:"string"` - - // The errors that occurred. - RecordErrors []*RecordError `type:"list"` - - // The identifier of the record. - RecordId *string `min:"1" type:"string"` - - // One or more tags. - RecordTags []*RecordTag `type:"list"` - - // The record type. - // - // * PROVISION_PRODUCT - // - // * UPDATE_PROVISIONED_PRODUCT - // - // * TERMINATE_PROVISIONED_PRODUCT - RecordType *string `type:"string"` - - // The status of the provisioned product. - // - // * CREATED - The request was created but the operation has not started. - // - // * IN_PROGRESS - The requested operation is in progress. - // - // * IN_PROGRESS_IN_ERROR - The provisioned product is under change but the - // requested operation failed and some remediation is occurring. For example, - // a rollback. - // - // * SUCCEEDED - The requested operation has successfully completed. - // - // * FAILED - The requested operation has unsuccessfully completed. Investigate - // using the error messages returned. - Status *string `type:"string" enum:"RecordStatus"` - - // The time when the record was last updated. - UpdatedTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s RecordDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecordDetail) GoString() string { - return s.String() -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *RecordDetail) SetCreatedTime(v time.Time) *RecordDetail { - s.CreatedTime = &v - return s -} - -// SetPathId sets the PathId field's value. -func (s *RecordDetail) SetPathId(v string) *RecordDetail { - s.PathId = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *RecordDetail) SetProductId(v string) *RecordDetail { - s.ProductId = &v - return s -} - -// SetProvisionedProductId sets the ProvisionedProductId field's value. -func (s *RecordDetail) SetProvisionedProductId(v string) *RecordDetail { - s.ProvisionedProductId = &v - return s -} - -// SetProvisionedProductName sets the ProvisionedProductName field's value. -func (s *RecordDetail) SetProvisionedProductName(v string) *RecordDetail { - s.ProvisionedProductName = &v - return s -} - -// SetProvisionedProductType sets the ProvisionedProductType field's value. -func (s *RecordDetail) SetProvisionedProductType(v string) *RecordDetail { - s.ProvisionedProductType = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *RecordDetail) SetProvisioningArtifactId(v string) *RecordDetail { - s.ProvisioningArtifactId = &v - return s -} - -// SetRecordErrors sets the RecordErrors field's value. -func (s *RecordDetail) SetRecordErrors(v []*RecordError) *RecordDetail { - s.RecordErrors = v - return s -} - -// SetRecordId sets the RecordId field's value. -func (s *RecordDetail) SetRecordId(v string) *RecordDetail { - s.RecordId = &v - return s -} - -// SetRecordTags sets the RecordTags field's value. -func (s *RecordDetail) SetRecordTags(v []*RecordTag) *RecordDetail { - s.RecordTags = v - return s -} - -// SetRecordType sets the RecordType field's value. -func (s *RecordDetail) SetRecordType(v string) *RecordDetail { - s.RecordType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *RecordDetail) SetStatus(v string) *RecordDetail { - s.Status = &v - return s -} - -// SetUpdatedTime sets the UpdatedTime field's value. -func (s *RecordDetail) SetUpdatedTime(v time.Time) *RecordDetail { - s.UpdatedTime = &v - return s -} - -// The error code and description resulting from an operation. -type RecordError struct { - _ struct{} `type:"structure"` - - // The numeric value of the error. - Code *string `type:"string"` - - // The description of the error. - Description *string `type:"string"` -} - -// String returns the string representation -func (s RecordError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecordError) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *RecordError) SetCode(v string) *RecordError { - s.Code = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *RecordError) SetDescription(v string) *RecordError { - s.Description = &v - return s -} - -// The output for the product created as the result of a request. For example, -// the output for a CloudFormation-backed product that creates an S3 bucket -// would include the S3 bucket URL. -type RecordOutput struct { - _ struct{} `type:"structure"` - - // The description of the output. - Description *string `type:"string"` - - // The output key. - OutputKey *string `type:"string"` - - // The output value. - OutputValue *string `type:"string"` -} - -// String returns the string representation -func (s RecordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecordOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *RecordOutput) SetDescription(v string) *RecordOutput { - s.Description = &v - return s -} - -// SetOutputKey sets the OutputKey field's value. -func (s *RecordOutput) SetOutputKey(v string) *RecordOutput { - s.OutputKey = &v - return s -} - -// SetOutputValue sets the OutputValue field's value. -func (s *RecordOutput) SetOutputValue(v string) *RecordOutput { - s.OutputValue = &v - return s -} - -// Information about a tag, which is a key-value pair. -type RecordTag struct { - _ struct{} `type:"structure"` - - // The key for this tag. - Key *string `min:"1" type:"string"` - - // The value for this tag. - Value *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s RecordTag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecordTag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *RecordTag) SetKey(v string) *RecordTag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *RecordTag) SetValue(v string) *RecordTag { - s.Value = &v - return s -} - -type RejectPortfolioShareInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The portfolio identifier. - // - // PortfolioId is a required field - PortfolioId *string `min:"1" type:"string" required:"true"` - - // The type of shared portfolios to reject. The default is to reject imported - // portfolios. - // - // * AWS_ORGANIZATIONS - Reject portfolios shared by the master account of - // your organization. - // - // * IMPORTED - Reject imported portfolios. - // - // * AWS_SERVICECATALOG - Not supported. (Throws ResourceNotFoundException.) - // - // For example, aws servicecatalog reject-portfolio-share --portfolio-id "port-2qwzkwxt3y5fk" - // --portfolio-share-type AWS_ORGANIZATIONS - PortfolioShareType *string `type:"string" enum:"PortfolioShareType"` -} - -// String returns the string representation -func (s RejectPortfolioShareInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectPortfolioShareInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RejectPortfolioShareInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RejectPortfolioShareInput"} - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *RejectPortfolioShareInput) SetAcceptLanguage(v string) *RejectPortfolioShareInput { - s.AcceptLanguage = &v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *RejectPortfolioShareInput) SetPortfolioId(v string) *RejectPortfolioShareInput { - s.PortfolioId = &v - return s -} - -// SetPortfolioShareType sets the PortfolioShareType field's value. -func (s *RejectPortfolioShareInput) SetPortfolioShareType(v string) *RejectPortfolioShareInput { - s.PortfolioShareType = &v - return s -} - -type RejectPortfolioShareOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RejectPortfolioShareOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RejectPortfolioShareOutput) GoString() string { - return s.String() -} - -// Information about a resource change that will occur when a plan is executed. -type ResourceChange struct { - _ struct{} `type:"structure"` - - // The change action. - Action *string `type:"string" enum:"ChangeAction"` - - // Information about the resource changes. - Details []*ResourceChangeDetail `type:"list"` - - // The ID of the resource, as defined in the CloudFormation template. - LogicalResourceId *string `type:"string"` - - // The ID of the resource, if it was already created. - PhysicalResourceId *string `type:"string"` - - // If the change type is Modify, indicates whether the existing resource is - // deleted and replaced with a new one. - Replacement *string `type:"string" enum:"Replacement"` - - // The type of resource. - ResourceType *string `min:"1" type:"string"` - - // The change scope. - Scope []*string `type:"list"` -} - -// String returns the string representation -func (s ResourceChange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceChange) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *ResourceChange) SetAction(v string) *ResourceChange { - s.Action = &v - return s -} - -// SetDetails sets the Details field's value. -func (s *ResourceChange) SetDetails(v []*ResourceChangeDetail) *ResourceChange { - s.Details = v - return s -} - -// SetLogicalResourceId sets the LogicalResourceId field's value. -func (s *ResourceChange) SetLogicalResourceId(v string) *ResourceChange { - s.LogicalResourceId = &v - return s -} - -// SetPhysicalResourceId sets the PhysicalResourceId field's value. -func (s *ResourceChange) SetPhysicalResourceId(v string) *ResourceChange { - s.PhysicalResourceId = &v - return s -} - -// SetReplacement sets the Replacement field's value. -func (s *ResourceChange) SetReplacement(v string) *ResourceChange { - s.Replacement = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ResourceChange) SetResourceType(v string) *ResourceChange { - s.ResourceType = &v - return s -} - -// SetScope sets the Scope field's value. -func (s *ResourceChange) SetScope(v []*string) *ResourceChange { - s.Scope = v - return s -} - -// Information about a change to a resource attribute. -type ResourceChangeDetail struct { - _ struct{} `type:"structure"` - - // The ID of the entity that caused the change. - CausingEntity *string `type:"string"` - - // For static evaluations, the value of the resource attribute will change and - // the new value is known. For dynamic evaluations, the value might change, - // and any new value will be determined when the plan is updated. - Evaluation *string `type:"string" enum:"EvaluationType"` - - // Information about the resource attribute to be modified. - Target *ResourceTargetDefinition `type:"structure"` -} - -// String returns the string representation -func (s ResourceChangeDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceChangeDetail) GoString() string { - return s.String() -} - -// SetCausingEntity sets the CausingEntity field's value. -func (s *ResourceChangeDetail) SetCausingEntity(v string) *ResourceChangeDetail { - s.CausingEntity = &v - return s -} - -// SetEvaluation sets the Evaluation field's value. -func (s *ResourceChangeDetail) SetEvaluation(v string) *ResourceChangeDetail { - s.Evaluation = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *ResourceChangeDetail) SetTarget(v *ResourceTargetDefinition) *ResourceChangeDetail { - s.Target = v - return s -} - -// Information about a resource. -type ResourceDetail struct { - _ struct{} `type:"structure"` - - // The ARN of the resource. - ARN *string `type:"string"` - - // The creation time of the resource. - CreatedTime *time.Time `type:"timestamp"` - - // The description of the resource. - Description *string `type:"string"` - - // The identifier of the resource. - Id *string `type:"string"` - - // The name of the resource. - Name *string `type:"string"` -} - -// String returns the string representation -func (s ResourceDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceDetail) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *ResourceDetail) SetARN(v string) *ResourceDetail { - s.ARN = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *ResourceDetail) SetCreatedTime(v time.Time) *ResourceDetail { - s.CreatedTime = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ResourceDetail) SetDescription(v string) *ResourceDetail { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *ResourceDetail) SetId(v string) *ResourceDetail { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *ResourceDetail) SetName(v string) *ResourceDetail { - s.Name = &v - return s -} - -// Information about a change to a resource attribute. -type ResourceTargetDefinition struct { - _ struct{} `type:"structure"` - - // The attribute to be changed. - Attribute *string `type:"string" enum:"ResourceAttribute"` - - // If the attribute is Properties, the value is the name of the property. Otherwise, - // the value is null. - Name *string `type:"string"` - - // If the attribute is Properties, indicates whether a change to this property - // causes the resource to be re-created. - RequiresRecreation *string `type:"string" enum:"RequiresRecreation"` -} - -// String returns the string representation -func (s ResourceTargetDefinition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceTargetDefinition) GoString() string { - return s.String() -} - -// SetAttribute sets the Attribute field's value. -func (s *ResourceTargetDefinition) SetAttribute(v string) *ResourceTargetDefinition { - s.Attribute = &v - return s -} - -// SetName sets the Name field's value. -func (s *ResourceTargetDefinition) SetName(v string) *ResourceTargetDefinition { - s.Name = &v - return s -} - -// SetRequiresRecreation sets the RequiresRecreation field's value. -func (s *ResourceTargetDefinition) SetRequiresRecreation(v string) *ResourceTargetDefinition { - s.RequiresRecreation = &v - return s -} - -type ScanProvisionedProductsInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The access level to use to obtain results. The default is User. - AccessLevelFilter *AccessLevelFilter `type:"structure"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` -} - -// String returns the string representation -func (s ScanProvisionedProductsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScanProvisionedProductsInput) GoString() string { - return s.String() -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ScanProvisionedProductsInput) SetAcceptLanguage(v string) *ScanProvisionedProductsInput { - s.AcceptLanguage = &v - return s -} - -// SetAccessLevelFilter sets the AccessLevelFilter field's value. -func (s *ScanProvisionedProductsInput) SetAccessLevelFilter(v *AccessLevelFilter) *ScanProvisionedProductsInput { - s.AccessLevelFilter = v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *ScanProvisionedProductsInput) SetPageSize(v int64) *ScanProvisionedProductsInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *ScanProvisionedProductsInput) SetPageToken(v string) *ScanProvisionedProductsInput { - s.PageToken = &v - return s -} - -type ScanProvisionedProductsOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // Information about the provisioned products. - ProvisionedProducts []*ProvisionedProductDetail `type:"list"` -} - -// String returns the string representation -func (s ScanProvisionedProductsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScanProvisionedProductsOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ScanProvisionedProductsOutput) SetNextPageToken(v string) *ScanProvisionedProductsOutput { - s.NextPageToken = &v - return s -} - -// SetProvisionedProducts sets the ProvisionedProducts field's value. -func (s *ScanProvisionedProductsOutput) SetProvisionedProducts(v []*ProvisionedProductDetail) *ScanProvisionedProductsOutput { - s.ProvisionedProducts = v - return s -} - -type SearchProductsAsAdminInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The search filters. If no search filters are specified, the output includes - // all products to which the administrator has access. - Filters map[string][]*string `type:"map"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The portfolio identifier. - PortfolioId *string `min:"1" type:"string"` - - // Access level of the source of the product. - ProductSource *string `type:"string" enum:"ProductSource"` - - // The sort field. If no value is specified, the results are not sorted. - SortBy *string `type:"string" enum:"ProductViewSortBy"` - - // The sort order. If no value is specified, the results are not sorted. - SortOrder *string `type:"string" enum:"SortOrder"` -} - -// String returns the string representation -func (s SearchProductsAsAdminInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchProductsAsAdminInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SearchProductsAsAdminInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SearchProductsAsAdminInput"} - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *SearchProductsAsAdminInput) SetAcceptLanguage(v string) *SearchProductsAsAdminInput { - s.AcceptLanguage = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *SearchProductsAsAdminInput) SetFilters(v map[string][]*string) *SearchProductsAsAdminInput { - s.Filters = v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *SearchProductsAsAdminInput) SetPageSize(v int64) *SearchProductsAsAdminInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *SearchProductsAsAdminInput) SetPageToken(v string) *SearchProductsAsAdminInput { - s.PageToken = &v - return s -} - -// SetPortfolioId sets the PortfolioId field's value. -func (s *SearchProductsAsAdminInput) SetPortfolioId(v string) *SearchProductsAsAdminInput { - s.PortfolioId = &v - return s -} - -// SetProductSource sets the ProductSource field's value. -func (s *SearchProductsAsAdminInput) SetProductSource(v string) *SearchProductsAsAdminInput { - s.ProductSource = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *SearchProductsAsAdminInput) SetSortBy(v string) *SearchProductsAsAdminInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *SearchProductsAsAdminInput) SetSortOrder(v string) *SearchProductsAsAdminInput { - s.SortOrder = &v - return s -} - -type SearchProductsAsAdminOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // Information about the product views. - ProductViewDetails []*ProductViewDetail `type:"list"` -} - -// String returns the string representation -func (s SearchProductsAsAdminOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchProductsAsAdminOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *SearchProductsAsAdminOutput) SetNextPageToken(v string) *SearchProductsAsAdminOutput { - s.NextPageToken = &v - return s -} - -// SetProductViewDetails sets the ProductViewDetails field's value. -func (s *SearchProductsAsAdminOutput) SetProductViewDetails(v []*ProductViewDetail) *SearchProductsAsAdminOutput { - s.ProductViewDetails = v - return s -} - -type SearchProductsInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The search filters. If no search filters are specified, the output includes - // all products to which the caller has access. - Filters map[string][]*string `type:"map"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The sort field. If no value is specified, the results are not sorted. - SortBy *string `type:"string" enum:"ProductViewSortBy"` - - // The sort order. If no value is specified, the results are not sorted. - SortOrder *string `type:"string" enum:"SortOrder"` -} - -// String returns the string representation -func (s SearchProductsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchProductsInput) GoString() string { - return s.String() -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *SearchProductsInput) SetAcceptLanguage(v string) *SearchProductsInput { - s.AcceptLanguage = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *SearchProductsInput) SetFilters(v map[string][]*string) *SearchProductsInput { - s.Filters = v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *SearchProductsInput) SetPageSize(v int64) *SearchProductsInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *SearchProductsInput) SetPageToken(v string) *SearchProductsInput { - s.PageToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *SearchProductsInput) SetSortBy(v string) *SearchProductsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *SearchProductsInput) SetSortOrder(v string) *SearchProductsInput { - s.SortOrder = &v - return s -} - -type SearchProductsOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // The product view aggregations. - ProductViewAggregations map[string][]*ProductViewAggregationValue `type:"map"` - - // Information about the product views. - ProductViewSummaries []*ProductViewSummary `type:"list"` -} - -// String returns the string representation -func (s SearchProductsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchProductsOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *SearchProductsOutput) SetNextPageToken(v string) *SearchProductsOutput { - s.NextPageToken = &v - return s -} - -// SetProductViewAggregations sets the ProductViewAggregations field's value. -func (s *SearchProductsOutput) SetProductViewAggregations(v map[string][]*ProductViewAggregationValue) *SearchProductsOutput { - s.ProductViewAggregations = v - return s -} - -// SetProductViewSummaries sets the ProductViewSummaries field's value. -func (s *SearchProductsOutput) SetProductViewSummaries(v []*ProductViewSummary) *SearchProductsOutput { - s.ProductViewSummaries = v - return s -} - -type SearchProvisionedProductsInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The access level to use to obtain results. The default is User. - AccessLevelFilter *AccessLevelFilter `type:"structure"` - - // The search filters. - // - // When the key is SearchQuery, the searchable fields are arn, createdTime, - // id, lastRecordId, idempotencyToken, name, physicalId, productId, provisioningArtifact, - // type, status, tags, userArn, and userArnSession. - // - // Example: "SearchQuery":["status:AVAILABLE"] - Filters map[string][]*string `type:"map"` - - // The maximum number of items to return with this call. - PageSize *int64 `type:"integer"` - - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` - - // The sort field. If no value is specified, the results are not sorted. The - // valid values are arn, id, name, and lastRecordId. - SortBy *string `type:"string"` - - // The sort order. If no value is specified, the results are not sorted. - SortOrder *string `type:"string" enum:"SortOrder"` -} - -// String returns the string representation -func (s SearchProvisionedProductsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchProvisionedProductsInput) GoString() string { - return s.String() -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *SearchProvisionedProductsInput) SetAcceptLanguage(v string) *SearchProvisionedProductsInput { - s.AcceptLanguage = &v - return s -} - -// SetAccessLevelFilter sets the AccessLevelFilter field's value. -func (s *SearchProvisionedProductsInput) SetAccessLevelFilter(v *AccessLevelFilter) *SearchProvisionedProductsInput { - s.AccessLevelFilter = v - return s -} - -// SetFilters sets the Filters field's value. -func (s *SearchProvisionedProductsInput) SetFilters(v map[string][]*string) *SearchProvisionedProductsInput { - s.Filters = v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *SearchProvisionedProductsInput) SetPageSize(v int64) *SearchProvisionedProductsInput { - s.PageSize = &v - return s -} - -// SetPageToken sets the PageToken field's value. -func (s *SearchProvisionedProductsInput) SetPageToken(v string) *SearchProvisionedProductsInput { - s.PageToken = &v - return s -} - -// SetSortBy sets the SortBy field's value. -func (s *SearchProvisionedProductsInput) SetSortBy(v string) *SearchProvisionedProductsInput { - s.SortBy = &v - return s -} - -// SetSortOrder sets the SortOrder field's value. -func (s *SearchProvisionedProductsInput) SetSortOrder(v string) *SearchProvisionedProductsInput { - s.SortOrder = &v - return s -} - -type SearchProvisionedProductsOutput struct { - _ struct{} `type:"structure"` - - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` - - // Information about the provisioned products. - ProvisionedProducts []*ProvisionedProductAttribute `type:"list"` - - // The number of provisioned products found. - TotalResultsCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s SearchProvisionedProductsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SearchProvisionedProductsOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *SearchProvisionedProductsOutput) SetNextPageToken(v string) *SearchProvisionedProductsOutput { - s.NextPageToken = &v - return s -} - -// SetProvisionedProducts sets the ProvisionedProducts field's value. -func (s *SearchProvisionedProductsOutput) SetProvisionedProducts(v []*ProvisionedProductAttribute) *SearchProvisionedProductsOutput { - s.ProvisionedProducts = v - return s -} - -// SetTotalResultsCount sets the TotalResultsCount field's value. -func (s *SearchProvisionedProductsOutput) SetTotalResultsCount(v int64) *SearchProvisionedProductsOutput { - s.TotalResultsCount = &v - return s -} - -// A self-service action association consisting of the Action ID, the Product -// ID, and the Provisioning Artifact ID. -type ServiceActionAssociation struct { - _ struct{} `type:"structure"` - - // The product identifier. For example, prod-abcdzk7xy33qa. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` - - // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. - // - // ProvisioningArtifactId is a required field - ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` - - // The self-service action identifier. For example, act-fs7abcd89wxyz. - // - // ServiceActionId is a required field - ServiceActionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ServiceActionAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceActionAssociation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ServiceActionAssociation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ServiceActionAssociation"} - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - if s.ProvisioningArtifactId == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) - } - if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) - } - if s.ServiceActionId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) - } - if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetProductId sets the ProductId field's value. -func (s *ServiceActionAssociation) SetProductId(v string) *ServiceActionAssociation { - s.ProductId = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *ServiceActionAssociation) SetProvisioningArtifactId(v string) *ServiceActionAssociation { - s.ProvisioningArtifactId = &v - return s -} - -// SetServiceActionId sets the ServiceActionId field's value. -func (s *ServiceActionAssociation) SetServiceActionId(v string) *ServiceActionAssociation { - s.ServiceActionId = &v - return s -} - -// An object containing detailed information about the self-service action. -type ServiceActionDetail struct { - _ struct{} `type:"structure"` - - // A map that defines the self-service action. - Definition map[string]*string `min:"1" type:"map"` - - // Summary information about the self-service action. - ServiceActionSummary *ServiceActionSummary `type:"structure"` -} - -// String returns the string representation -func (s ServiceActionDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceActionDetail) GoString() string { - return s.String() -} - -// SetDefinition sets the Definition field's value. -func (s *ServiceActionDetail) SetDefinition(v map[string]*string) *ServiceActionDetail { - s.Definition = v - return s -} - -// SetServiceActionSummary sets the ServiceActionSummary field's value. -func (s *ServiceActionDetail) SetServiceActionSummary(v *ServiceActionSummary) *ServiceActionDetail { - s.ServiceActionSummary = v - return s -} - -// Detailed information about the self-service action. -type ServiceActionSummary struct { - _ struct{} `type:"structure"` - - // The self-service action definition type. For example, SSM_AUTOMATION. - DefinitionType *string `type:"string" enum:"ServiceActionDefinitionType"` - - // The self-service action description. - Description *string `type:"string"` - - // The self-service action identifier. - Id *string `min:"1" type:"string"` - - // The self-service action name. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ServiceActionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceActionSummary) GoString() string { - return s.String() -} - -// SetDefinitionType sets the DefinitionType field's value. -func (s *ServiceActionSummary) SetDefinitionType(v string) *ServiceActionSummary { - s.DefinitionType = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ServiceActionSummary) SetDescription(v string) *ServiceActionSummary { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *ServiceActionSummary) SetId(v string) *ServiceActionSummary { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *ServiceActionSummary) SetName(v string) *ServiceActionSummary { - s.Name = &v - return s -} - -// Information about the portfolio share operation. -type ShareDetails struct { - _ struct{} `type:"structure"` - - // List of errors. - ShareErrors []*ShareError `type:"list"` - - // List of accounts for whom the operation succeeded. - SuccessfulShares []*string `type:"list"` -} - -// String returns the string representation -func (s ShareDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ShareDetails) GoString() string { - return s.String() -} - -// SetShareErrors sets the ShareErrors field's value. -func (s *ShareDetails) SetShareErrors(v []*ShareError) *ShareDetails { - s.ShareErrors = v - return s -} - -// SetSuccessfulShares sets the SuccessfulShares field's value. -func (s *ShareDetails) SetSuccessfulShares(v []*string) *ShareDetails { - s.SuccessfulShares = v - return s -} - -// Errors that occurred during the portfolio share operation. -type ShareError struct { - _ struct{} `type:"structure"` - - // List of accounts impacted by the error. - Accounts []*string `type:"list"` - - // Error type that happened when processing the operation. - Error *string `type:"string"` - - // Information about the error. - Message *string `type:"string"` -} - -// String returns the string representation -func (s ShareError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ShareError) GoString() string { - return s.String() -} - -// SetAccounts sets the Accounts field's value. -func (s *ShareError) SetAccounts(v []*string) *ShareError { - s.Accounts = v - return s -} - -// SetError sets the Error field's value. -func (s *ShareError) SetError(v string) *ShareError { - s.Error = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ShareError) SetMessage(v string) *ShareError { - s.Message = &v - return s -} - -// Information about a tag. A tag is a key-value pair. Tags are propagated to -// the resources created when provisioning a product. -type Tag struct { - _ struct{} `type:"structure"` - - // The tag key. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The value for this key. - // - // Value is a required field - Value *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Information about a TagOption. -type TagOptionDetail struct { - _ struct{} `type:"structure"` - - // The TagOption active state. - Active *bool `type:"boolean"` - - // The TagOption identifier. - Id *string `min:"1" type:"string"` - - // The TagOption key. - Key *string `min:"1" type:"string"` - - // The TagOption value. - Value *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s TagOptionDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagOptionDetail) GoString() string { - return s.String() -} - -// SetActive sets the Active field's value. -func (s *TagOptionDetail) SetActive(v bool) *TagOptionDetail { - s.Active = &v - return s -} - -// SetId sets the Id field's value. -func (s *TagOptionDetail) SetId(v string) *TagOptionDetail { - s.Id = &v - return s -} - -// SetKey sets the Key field's value. -func (s *TagOptionDetail) SetKey(v string) *TagOptionDetail { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *TagOptionDetail) SetValue(v string) *TagOptionDetail { - s.Value = &v - return s -} - -// Summary information about a TagOption. -type TagOptionSummary struct { - _ struct{} `type:"structure"` - - // The TagOption key. - Key *string `min:"1" type:"string"` - - // The TagOption value. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s TagOptionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagOptionSummary) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *TagOptionSummary) SetKey(v string) *TagOptionSummary { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *TagOptionSummary) SetValues(v []*string) *TagOptionSummary { - s.Values = v - return s -} - -type TerminateProvisionedProductInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // If set to true, AWS Service Catalog stops managing the specified provisioned - // product even if it cannot delete the underlying resources. - IgnoreErrors *bool `type:"boolean"` - - // The identifier of the provisioned product. You cannot specify both ProvisionedProductName - // and ProvisionedProductId. - ProvisionedProductId *string `min:"1" type:"string"` - - // The name of the provisioned product. You cannot specify both ProvisionedProductName - // and ProvisionedProductId. - ProvisionedProductName *string `min:"1" type:"string"` - - // An idempotency token that uniquely identifies the termination request. This - // token is only valid during the termination process. After the provisioned - // product is terminated, subsequent requests to terminate the same provisioned - // product always return ResourceNotFound. - TerminateToken *string `min:"1" type:"string" idempotencyToken:"true"` -} - -// String returns the string representation -func (s TerminateProvisionedProductInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateProvisionedProductInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TerminateProvisionedProductInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TerminateProvisionedProductInput"} - if s.ProvisionedProductId != nil && len(*s.ProvisionedProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductId", 1)) - } - if s.ProvisionedProductName != nil && len(*s.ProvisionedProductName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductName", 1)) - } - if s.TerminateToken != nil && len(*s.TerminateToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TerminateToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *TerminateProvisionedProductInput) SetAcceptLanguage(v string) *TerminateProvisionedProductInput { - s.AcceptLanguage = &v - return s -} - -// SetIgnoreErrors sets the IgnoreErrors field's value. -func (s *TerminateProvisionedProductInput) SetIgnoreErrors(v bool) *TerminateProvisionedProductInput { - s.IgnoreErrors = &v - return s -} - -// SetProvisionedProductId sets the ProvisionedProductId field's value. -func (s *TerminateProvisionedProductInput) SetProvisionedProductId(v string) *TerminateProvisionedProductInput { - s.ProvisionedProductId = &v - return s -} - -// SetProvisionedProductName sets the ProvisionedProductName field's value. -func (s *TerminateProvisionedProductInput) SetProvisionedProductName(v string) *TerminateProvisionedProductInput { - s.ProvisionedProductName = &v - return s -} - -// SetTerminateToken sets the TerminateToken field's value. -func (s *TerminateProvisionedProductInput) SetTerminateToken(v string) *TerminateProvisionedProductInput { - s.TerminateToken = &v - return s -} - -type TerminateProvisionedProductOutput struct { - _ struct{} `type:"structure"` - - // Information about the result of this request. - RecordDetail *RecordDetail `type:"structure"` -} - -// String returns the string representation -func (s TerminateProvisionedProductOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateProvisionedProductOutput) GoString() string { - return s.String() -} - -// SetRecordDetail sets the RecordDetail field's value. -func (s *TerminateProvisionedProductOutput) SetRecordDetail(v *RecordDetail) *TerminateProvisionedProductOutput { - s.RecordDetail = v - return s -} - -type UpdateConstraintInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The updated description of the constraint. - Description *string `type:"string"` - - // The identifier of the constraint. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateConstraintInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConstraintInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateConstraintInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateConstraintInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *UpdateConstraintInput) SetAcceptLanguage(v string) *UpdateConstraintInput { - s.AcceptLanguage = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateConstraintInput) SetDescription(v string) *UpdateConstraintInput { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateConstraintInput) SetId(v string) *UpdateConstraintInput { - s.Id = &v - return s -} - -type UpdateConstraintOutput struct { - _ struct{} `type:"structure"` - - // Information about the constraint. - ConstraintDetail *ConstraintDetail `type:"structure"` - - // The constraint parameters. - ConstraintParameters *string `type:"string"` - - // The status of the current request. - Status *string `type:"string" enum:"Status"` -} - -// String returns the string representation -func (s UpdateConstraintOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConstraintOutput) GoString() string { - return s.String() -} - -// SetConstraintDetail sets the ConstraintDetail field's value. -func (s *UpdateConstraintOutput) SetConstraintDetail(v *ConstraintDetail) *UpdateConstraintOutput { - s.ConstraintDetail = v - return s -} - -// SetConstraintParameters sets the ConstraintParameters field's value. -func (s *UpdateConstraintOutput) SetConstraintParameters(v string) *UpdateConstraintOutput { - s.ConstraintParameters = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateConstraintOutput) SetStatus(v string) *UpdateConstraintOutput { - s.Status = &v - return s -} - -type UpdatePortfolioInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The tags to add. - AddTags []*Tag `type:"list"` - - // The updated description of the portfolio. - Description *string `type:"string"` - - // The name to use for display purposes. - DisplayName *string `min:"1" type:"string"` - - // The portfolio identifier. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` - - // The updated name of the portfolio provider. - ProviderName *string `min:"1" type:"string"` - - // The tags to remove. - RemoveTags []*string `type:"list"` -} - -// String returns the string representation -func (s UpdatePortfolioInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePortfolioInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdatePortfolioInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdatePortfolioInput"} - if s.DisplayName != nil && len(*s.DisplayName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DisplayName", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.ProviderName != nil && len(*s.ProviderName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProviderName", 1)) - } - if s.AddTags != nil { - for i, v := range s.AddTags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AddTags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *UpdatePortfolioInput) SetAcceptLanguage(v string) *UpdatePortfolioInput { - s.AcceptLanguage = &v - return s -} - -// SetAddTags sets the AddTags field's value. -func (s *UpdatePortfolioInput) SetAddTags(v []*Tag) *UpdatePortfolioInput { - s.AddTags = v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdatePortfolioInput) SetDescription(v string) *UpdatePortfolioInput { - s.Description = &v - return s -} - -// SetDisplayName sets the DisplayName field's value. -func (s *UpdatePortfolioInput) SetDisplayName(v string) *UpdatePortfolioInput { - s.DisplayName = &v - return s -} - -// SetId sets the Id field's value. -func (s *UpdatePortfolioInput) SetId(v string) *UpdatePortfolioInput { - s.Id = &v - return s -} - -// SetProviderName sets the ProviderName field's value. -func (s *UpdatePortfolioInput) SetProviderName(v string) *UpdatePortfolioInput { - s.ProviderName = &v - return s -} - -// SetRemoveTags sets the RemoveTags field's value. -func (s *UpdatePortfolioInput) SetRemoveTags(v []*string) *UpdatePortfolioInput { - s.RemoveTags = v - return s -} - -type UpdatePortfolioOutput struct { - _ struct{} `type:"structure"` - - // Information about the portfolio. - PortfolioDetail *PortfolioDetail `type:"structure"` - - // Information about the tags associated with the portfolio. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s UpdatePortfolioOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePortfolioOutput) GoString() string { - return s.String() -} - -// SetPortfolioDetail sets the PortfolioDetail field's value. -func (s *UpdatePortfolioOutput) SetPortfolioDetail(v *PortfolioDetail) *UpdatePortfolioOutput { - s.PortfolioDetail = v - return s -} - -// SetTags sets the Tags field's value. -func (s *UpdatePortfolioOutput) SetTags(v []*Tag) *UpdatePortfolioOutput { - s.Tags = v - return s -} - -type UpdateProductInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The tags to add to the product. - AddTags []*Tag `type:"list"` - - // The updated description of the product. - Description *string `type:"string"` - - // The updated distributor of the product. - Distributor *string `type:"string"` - - // The product identifier. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` - - // The updated product name. - Name *string `type:"string"` - - // The updated owner of the product. - Owner *string `type:"string"` - - // The tags to remove from the product. - RemoveTags []*string `type:"list"` - - // The updated support description for the product. - SupportDescription *string `type:"string"` - - // The updated support email for the product. - SupportEmail *string `type:"string"` - - // The updated support URL for the product. - SupportUrl *string `type:"string"` -} - -// String returns the string representation -func (s UpdateProductInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateProductInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateProductInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateProductInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.AddTags != nil { - for i, v := range s.AddTags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AddTags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *UpdateProductInput) SetAcceptLanguage(v string) *UpdateProductInput { - s.AcceptLanguage = &v - return s -} - -// SetAddTags sets the AddTags field's value. -func (s *UpdateProductInput) SetAddTags(v []*Tag) *UpdateProductInput { - s.AddTags = v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateProductInput) SetDescription(v string) *UpdateProductInput { - s.Description = &v - return s -} - -// SetDistributor sets the Distributor field's value. -func (s *UpdateProductInput) SetDistributor(v string) *UpdateProductInput { - s.Distributor = &v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateProductInput) SetId(v string) *UpdateProductInput { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateProductInput) SetName(v string) *UpdateProductInput { - s.Name = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *UpdateProductInput) SetOwner(v string) *UpdateProductInput { - s.Owner = &v - return s -} - -// SetRemoveTags sets the RemoveTags field's value. -func (s *UpdateProductInput) SetRemoveTags(v []*string) *UpdateProductInput { - s.RemoveTags = v - return s -} - -// SetSupportDescription sets the SupportDescription field's value. -func (s *UpdateProductInput) SetSupportDescription(v string) *UpdateProductInput { - s.SupportDescription = &v - return s -} - -// SetSupportEmail sets the SupportEmail field's value. -func (s *UpdateProductInput) SetSupportEmail(v string) *UpdateProductInput { - s.SupportEmail = &v - return s -} - -// SetSupportUrl sets the SupportUrl field's value. -func (s *UpdateProductInput) SetSupportUrl(v string) *UpdateProductInput { - s.SupportUrl = &v - return s -} - -type UpdateProductOutput struct { - _ struct{} `type:"structure"` - - // Information about the product view. - ProductViewDetail *ProductViewDetail `type:"structure"` - - // Information about the tags associated with the product. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s UpdateProductOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateProductOutput) GoString() string { - return s.String() -} - -// SetProductViewDetail sets the ProductViewDetail field's value. -func (s *UpdateProductOutput) SetProductViewDetail(v *ProductViewDetail) *UpdateProductOutput { - s.ProductViewDetail = v - return s -} - -// SetTags sets the Tags field's value. -func (s *UpdateProductOutput) SetTags(v []*Tag) *UpdateProductOutput { - s.Tags = v - return s -} - -type UpdateProvisionedProductInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // The new path identifier. This value is optional if the product has a default - // path, and required if the product has more than one path. - PathId *string `min:"1" type:"string"` - - // The identifier of the product. - ProductId *string `min:"1" type:"string"` - - // The identifier of the provisioned product. You cannot specify both ProvisionedProductName - // and ProvisionedProductId. - ProvisionedProductId *string `min:"1" type:"string"` - - // The updated name of the provisioned product. You cannot specify both ProvisionedProductName - // and ProvisionedProductId. - ProvisionedProductName *string `min:"1" type:"string"` - - // The identifier of the provisioning artifact. - ProvisioningArtifactId *string `min:"1" type:"string"` - - // The new parameters. - ProvisioningParameters []*UpdateProvisioningParameter `type:"list"` - - // An object that contains information about the provisioning preferences for - // a stack set. - ProvisioningPreferences *UpdateProvisioningPreferences `type:"structure"` - - // The idempotency token that uniquely identifies the provisioning update request. - UpdateToken *string `min:"1" type:"string" idempotencyToken:"true"` -} - -// String returns the string representation -func (s UpdateProvisionedProductInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateProvisionedProductInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateProvisionedProductInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateProvisionedProductInput"} - if s.PathId != nil && len(*s.PathId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathId", 1)) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - if s.ProvisionedProductId != nil && len(*s.ProvisionedProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductId", 1)) - } - if s.ProvisionedProductName != nil && len(*s.ProvisionedProductName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductName", 1)) - } - if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) - } - if s.UpdateToken != nil && len(*s.UpdateToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UpdateToken", 1)) - } - if s.ProvisioningParameters != nil { - for i, v := range s.ProvisioningParameters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ProvisioningParameters", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ProvisioningPreferences != nil { - if err := s.ProvisioningPreferences.Validate(); err != nil { - invalidParams.AddNested("ProvisioningPreferences", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *UpdateProvisionedProductInput) SetAcceptLanguage(v string) *UpdateProvisionedProductInput { - s.AcceptLanguage = &v - return s -} - -// SetPathId sets the PathId field's value. -func (s *UpdateProvisionedProductInput) SetPathId(v string) *UpdateProvisionedProductInput { - s.PathId = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *UpdateProvisionedProductInput) SetProductId(v string) *UpdateProvisionedProductInput { - s.ProductId = &v - return s -} - -// SetProvisionedProductId sets the ProvisionedProductId field's value. -func (s *UpdateProvisionedProductInput) SetProvisionedProductId(v string) *UpdateProvisionedProductInput { - s.ProvisionedProductId = &v - return s -} - -// SetProvisionedProductName sets the ProvisionedProductName field's value. -func (s *UpdateProvisionedProductInput) SetProvisionedProductName(v string) *UpdateProvisionedProductInput { - s.ProvisionedProductName = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *UpdateProvisionedProductInput) SetProvisioningArtifactId(v string) *UpdateProvisionedProductInput { - s.ProvisioningArtifactId = &v - return s -} - -// SetProvisioningParameters sets the ProvisioningParameters field's value. -func (s *UpdateProvisionedProductInput) SetProvisioningParameters(v []*UpdateProvisioningParameter) *UpdateProvisionedProductInput { - s.ProvisioningParameters = v - return s -} - -// SetProvisioningPreferences sets the ProvisioningPreferences field's value. -func (s *UpdateProvisionedProductInput) SetProvisioningPreferences(v *UpdateProvisioningPreferences) *UpdateProvisionedProductInput { - s.ProvisioningPreferences = v - return s -} - -// SetUpdateToken sets the UpdateToken field's value. -func (s *UpdateProvisionedProductInput) SetUpdateToken(v string) *UpdateProvisionedProductInput { - s.UpdateToken = &v - return s -} - -type UpdateProvisionedProductOutput struct { - _ struct{} `type:"structure"` - - // Information about the result of the request. - RecordDetail *RecordDetail `type:"structure"` -} - -// String returns the string representation -func (s UpdateProvisionedProductOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateProvisionedProductOutput) GoString() string { - return s.String() -} - -// SetRecordDetail sets the RecordDetail field's value. -func (s *UpdateProvisionedProductOutput) SetRecordDetail(v *RecordDetail) *UpdateProvisionedProductOutput { - s.RecordDetail = v - return s -} - -type UpdateProvisioningArtifactInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // Indicates whether the product version is active. - Active *bool `type:"boolean"` - - // The updated description of the provisioning artifact. - Description *string `type:"string"` - - // The updated name of the provisioning artifact. - Name *string `type:"string"` - - // The product identifier. - // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` - - // The identifier of the provisioning artifact. - // - // ProvisioningArtifactId is a required field - ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateProvisioningArtifactInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateProvisioningArtifactInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateProvisioningArtifactInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateProvisioningArtifactInput"} - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) - } - if s.ProvisioningArtifactId == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) - } - if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *UpdateProvisioningArtifactInput) SetAcceptLanguage(v string) *UpdateProvisioningArtifactInput { - s.AcceptLanguage = &v - return s -} - -// SetActive sets the Active field's value. -func (s *UpdateProvisioningArtifactInput) SetActive(v bool) *UpdateProvisioningArtifactInput { - s.Active = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateProvisioningArtifactInput) SetDescription(v string) *UpdateProvisioningArtifactInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateProvisioningArtifactInput) SetName(v string) *UpdateProvisioningArtifactInput { - s.Name = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *UpdateProvisioningArtifactInput) SetProductId(v string) *UpdateProvisioningArtifactInput { - s.ProductId = &v - return s -} - -// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. -func (s *UpdateProvisioningArtifactInput) SetProvisioningArtifactId(v string) *UpdateProvisioningArtifactInput { - s.ProvisioningArtifactId = &v - return s -} - -type UpdateProvisioningArtifactOutput struct { - _ struct{} `type:"structure"` - - // The URL of the CloudFormation template in Amazon S3. - Info map[string]*string `min:"1" type:"map"` - - // Information about the provisioning artifact. - ProvisioningArtifactDetail *ProvisioningArtifactDetail `type:"structure"` - - // The status of the current request. - Status *string `type:"string" enum:"Status"` -} - -// String returns the string representation -func (s UpdateProvisioningArtifactOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateProvisioningArtifactOutput) GoString() string { - return s.String() -} - -// SetInfo sets the Info field's value. -func (s *UpdateProvisioningArtifactOutput) SetInfo(v map[string]*string) *UpdateProvisioningArtifactOutput { - s.Info = v - return s -} - -// SetProvisioningArtifactDetail sets the ProvisioningArtifactDetail field's value. -func (s *UpdateProvisioningArtifactOutput) SetProvisioningArtifactDetail(v *ProvisioningArtifactDetail) *UpdateProvisioningArtifactOutput { - s.ProvisioningArtifactDetail = v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateProvisioningArtifactOutput) SetStatus(v string) *UpdateProvisioningArtifactOutput { - s.Status = &v - return s -} - -// The parameter key-value pair used to update a provisioned product. -type UpdateProvisioningParameter struct { - _ struct{} `type:"structure"` - - // The parameter key. - Key *string `min:"1" type:"string"` - - // If set to true, Value is ignored and the previous parameter value is kept. - UsePreviousValue *bool `type:"boolean"` - - // The parameter value. - Value *string `type:"string"` -} - -// String returns the string representation -func (s UpdateProvisioningParameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateProvisioningParameter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateProvisioningParameter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateProvisioningParameter"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *UpdateProvisioningParameter) SetKey(v string) *UpdateProvisioningParameter { - s.Key = &v - return s -} - -// SetUsePreviousValue sets the UsePreviousValue field's value. -func (s *UpdateProvisioningParameter) SetUsePreviousValue(v bool) *UpdateProvisioningParameter { - s.UsePreviousValue = &v - return s -} - -// SetValue sets the Value field's value. -func (s *UpdateProvisioningParameter) SetValue(v string) *UpdateProvisioningParameter { - s.Value = &v - return s -} - -// The user-defined preferences that will be applied when updating a provisioned -// product. Not all preferences are applicable to all provisioned product types. -type UpdateProvisioningPreferences struct { - _ struct{} `type:"structure"` - - // One or more AWS accounts that will have access to the provisioned product. - // - // Applicable only to a CFN_STACKSET provisioned product type. - // - // The AWS accounts specified should be within the list of accounts in the STACKSET - // constraint. To get the list of accounts in the STACKSET constraint, use the - // DescribeProvisioningParameters operation. - // - // If no values are specified, the default value is all accounts from the STACKSET - // constraint. - StackSetAccounts []*string `type:"list"` - - // The number of accounts, per region, for which this operation can fail before - // AWS Service Catalog stops the operation in that region. If the operation - // is stopped in a region, AWS Service Catalog doesn't attempt the operation - // in any subsequent regions. - // - // Applicable only to a CFN_STACKSET provisioned product type. - // - // Conditional: You must specify either StackSetFailureToleranceCount or StackSetFailureTolerancePercentage, - // but not both. - // - // The default value is 0 if no value is specified. - StackSetFailureToleranceCount *int64 `type:"integer"` - - // The percentage of accounts, per region, for which this stack operation can - // fail before AWS Service Catalog stops the operation in that region. If the - // operation is stopped in a region, AWS Service Catalog doesn't attempt the - // operation in any subsequent regions. - // - // When calculating the number of accounts based on the specified percentage, - // AWS Service Catalog rounds down to the next whole number. - // - // Applicable only to a CFN_STACKSET provisioned product type. - // - // Conditional: You must specify either StackSetFailureToleranceCount or StackSetFailureTolerancePercentage, - // but not both. - StackSetFailureTolerancePercentage *int64 `type:"integer"` - - // The maximum number of accounts in which to perform this operation at one - // time. This is dependent on the value of StackSetFailureToleranceCount. StackSetMaxConcurrentCount - // is at most one more than the StackSetFailureToleranceCount. - // - // Note that this setting lets you specify the maximum for operations. For large - // deployments, under certain circumstances the actual number of accounts acted - // upon concurrently may be lower due to service throttling. - // - // Applicable only to a CFN_STACKSET provisioned product type. - // - // Conditional: You must specify either StackSetMaxConcurrentCount or StackSetMaxConcurrentPercentage, - // but not both. - StackSetMaxConcurrencyCount *int64 `min:"1" type:"integer"` - - // The maximum percentage of accounts in which to perform this operation at - // one time. - // - // When calculating the number of accounts based on the specified percentage, - // AWS Service Catalog rounds down to the next whole number. This is true except - // in cases where rounding down would result is zero. In this case, AWS Service - // Catalog sets the number as 1 instead. - // - // Note that this setting lets you specify the maximum for operations. For large - // deployments, under certain circumstances the actual number of accounts acted - // upon concurrently may be lower due to service throttling. - // - // Applicable only to a CFN_STACKSET provisioned product type. - // - // Conditional: You must specify either StackSetMaxConcurrentCount or StackSetMaxConcurrentPercentage, - // but not both. - StackSetMaxConcurrencyPercentage *int64 `min:"1" type:"integer"` - - // Determines what action AWS Service Catalog performs to a stack set or a stack - // instance represented by the provisioned product. The default value is UPDATE - // if nothing is specified. - // - // Applicable only to a CFN_STACKSET provisioned product type. - // - // CREATECreates a new stack instance in the stack set represented by the provisioned - // product. In this case, only new stack instances are created based on accounts - // and regions; if new ProductId or ProvisioningArtifactID are passed, they - // will be ignored. - // - // UPDATEUpdates the stack set represented by the provisioned product and also - // its stack instances. - // - // DELETEDeletes a stack instance in the stack set represented by the provisioned - // product. - StackSetOperationType *string `type:"string" enum:"StackSetOperationType"` - - // One or more AWS Regions where the provisioned product will be available. - // - // Applicable only to a CFN_STACKSET provisioned product type. - // - // The specified regions should be within the list of regions from the STACKSET - // constraint. To get the list of regions in the STACKSET constraint, use the - // DescribeProvisioningParameters operation. - // - // If no values are specified, the default value is all regions from the STACKSET - // constraint. - StackSetRegions []*string `type:"list"` -} - -// String returns the string representation -func (s UpdateProvisioningPreferences) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateProvisioningPreferences) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateProvisioningPreferences) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateProvisioningPreferences"} - if s.StackSetMaxConcurrencyCount != nil && *s.StackSetMaxConcurrencyCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("StackSetMaxConcurrencyCount", 1)) - } - if s.StackSetMaxConcurrencyPercentage != nil && *s.StackSetMaxConcurrencyPercentage < 1 { - invalidParams.Add(request.NewErrParamMinValue("StackSetMaxConcurrencyPercentage", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStackSetAccounts sets the StackSetAccounts field's value. -func (s *UpdateProvisioningPreferences) SetStackSetAccounts(v []*string) *UpdateProvisioningPreferences { - s.StackSetAccounts = v - return s -} - -// SetStackSetFailureToleranceCount sets the StackSetFailureToleranceCount field's value. -func (s *UpdateProvisioningPreferences) SetStackSetFailureToleranceCount(v int64) *UpdateProvisioningPreferences { - s.StackSetFailureToleranceCount = &v - return s -} - -// SetStackSetFailureTolerancePercentage sets the StackSetFailureTolerancePercentage field's value. -func (s *UpdateProvisioningPreferences) SetStackSetFailureTolerancePercentage(v int64) *UpdateProvisioningPreferences { - s.StackSetFailureTolerancePercentage = &v - return s -} - -// SetStackSetMaxConcurrencyCount sets the StackSetMaxConcurrencyCount field's value. -func (s *UpdateProvisioningPreferences) SetStackSetMaxConcurrencyCount(v int64) *UpdateProvisioningPreferences { - s.StackSetMaxConcurrencyCount = &v - return s -} - -// SetStackSetMaxConcurrencyPercentage sets the StackSetMaxConcurrencyPercentage field's value. -func (s *UpdateProvisioningPreferences) SetStackSetMaxConcurrencyPercentage(v int64) *UpdateProvisioningPreferences { - s.StackSetMaxConcurrencyPercentage = &v - return s -} - -// SetStackSetOperationType sets the StackSetOperationType field's value. -func (s *UpdateProvisioningPreferences) SetStackSetOperationType(v string) *UpdateProvisioningPreferences { - s.StackSetOperationType = &v - return s -} - -// SetStackSetRegions sets the StackSetRegions field's value. -func (s *UpdateProvisioningPreferences) SetStackSetRegions(v []*string) *UpdateProvisioningPreferences { - s.StackSetRegions = v - return s -} - -type UpdateServiceActionInput struct { - _ struct{} `type:"structure"` - - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese - AcceptLanguage *string `type:"string"` - - // A map that defines the self-service action. - Definition map[string]*string `min:"1" type:"map"` - - // The self-service action description. - Description *string `type:"string"` - - // The self-service action identifier. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` - - // The self-service action name. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateServiceActionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateServiceActionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateServiceActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateServiceActionInput"} - if s.Definition != nil && len(s.Definition) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Definition", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *UpdateServiceActionInput) SetAcceptLanguage(v string) *UpdateServiceActionInput { - s.AcceptLanguage = &v - return s -} - -// SetDefinition sets the Definition field's value. -func (s *UpdateServiceActionInput) SetDefinition(v map[string]*string) *UpdateServiceActionInput { - s.Definition = v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateServiceActionInput) SetDescription(v string) *UpdateServiceActionInput { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateServiceActionInput) SetId(v string) *UpdateServiceActionInput { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateServiceActionInput) SetName(v string) *UpdateServiceActionInput { - s.Name = &v - return s -} - -type UpdateServiceActionOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about the self-service action. - ServiceActionDetail *ServiceActionDetail `type:"structure"` -} - -// String returns the string representation -func (s UpdateServiceActionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateServiceActionOutput) GoString() string { - return s.String() -} - -// SetServiceActionDetail sets the ServiceActionDetail field's value. -func (s *UpdateServiceActionOutput) SetServiceActionDetail(v *ServiceActionDetail) *UpdateServiceActionOutput { - s.ServiceActionDetail = v - return s -} - -type UpdateTagOptionInput struct { - _ struct{} `type:"structure"` - - // The updated active state. - Active *bool `type:"boolean"` - - // The TagOption identifier. - // - // Id is a required field - Id *string `min:"1" type:"string" required:"true"` - - // The updated value. - Value *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateTagOptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTagOptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateTagOptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateTagOptionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActive sets the Active field's value. -func (s *UpdateTagOptionInput) SetActive(v bool) *UpdateTagOptionInput { - s.Active = &v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateTagOptionInput) SetId(v string) *UpdateTagOptionInput { - s.Id = &v - return s -} - -// SetValue sets the Value field's value. -func (s *UpdateTagOptionInput) SetValue(v string) *UpdateTagOptionInput { - s.Value = &v - return s -} - -type UpdateTagOptionOutput struct { - _ struct{} `type:"structure"` - - // Information about the TagOption. - TagOptionDetail *TagOptionDetail `type:"structure"` -} - -// String returns the string representation -func (s UpdateTagOptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTagOptionOutput) GoString() string { - return s.String() -} - -// SetTagOptionDetail sets the TagOptionDetail field's value. -func (s *UpdateTagOptionOutput) SetTagOptionDetail(v *TagOptionDetail) *UpdateTagOptionOutput { - s.TagOptionDetail = v - return s -} - -// Additional information provided by the administrator. -type UsageInstruction struct { - _ struct{} `type:"structure"` - - // The usage instruction type for the value. - Type *string `type:"string"` - - // The usage instruction value for this type. - Value *string `type:"string"` -} - -// String returns the string representation -func (s UsageInstruction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UsageInstruction) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *UsageInstruction) SetType(v string) *UsageInstruction { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *UsageInstruction) SetValue(v string) *UsageInstruction { - s.Value = &v - return s -} - -const ( - // AccessLevelFilterKeyAccount is a AccessLevelFilterKey enum value - AccessLevelFilterKeyAccount = "Account" - - // AccessLevelFilterKeyRole is a AccessLevelFilterKey enum value - AccessLevelFilterKeyRole = "Role" - - // AccessLevelFilterKeyUser is a AccessLevelFilterKey enum value - AccessLevelFilterKeyUser = "User" -) - -const ( - // AccessStatusEnabled is a AccessStatus enum value - AccessStatusEnabled = "ENABLED" - - // AccessStatusUnderChange is a AccessStatus enum value - AccessStatusUnderChange = "UNDER_CHANGE" - - // AccessStatusDisabled is a AccessStatus enum value - AccessStatusDisabled = "DISABLED" -) - -const ( - // ChangeActionAdd is a ChangeAction enum value - ChangeActionAdd = "ADD" - - // ChangeActionModify is a ChangeAction enum value - ChangeActionModify = "MODIFY" - - // ChangeActionRemove is a ChangeAction enum value - ChangeActionRemove = "REMOVE" -) - -const ( - // CopyOptionCopyTags is a CopyOption enum value - CopyOptionCopyTags = "CopyTags" -) - -const ( - // CopyProductStatusSucceeded is a CopyProductStatus enum value - CopyProductStatusSucceeded = "SUCCEEDED" - - // CopyProductStatusInProgress is a CopyProductStatus enum value - CopyProductStatusInProgress = "IN_PROGRESS" - - // CopyProductStatusFailed is a CopyProductStatus enum value - CopyProductStatusFailed = "FAILED" -) - -const ( - // EvaluationTypeStatic is a EvaluationType enum value - EvaluationTypeStatic = "STATIC" - - // EvaluationTypeDynamic is a EvaluationType enum value - EvaluationTypeDynamic = "DYNAMIC" -) - -const ( - // OrganizationNodeTypeOrganization is a OrganizationNodeType enum value - OrganizationNodeTypeOrganization = "ORGANIZATION" - - // OrganizationNodeTypeOrganizationalUnit is a OrganizationNodeType enum value - OrganizationNodeTypeOrganizationalUnit = "ORGANIZATIONAL_UNIT" - - // OrganizationNodeTypeAccount is a OrganizationNodeType enum value - OrganizationNodeTypeAccount = "ACCOUNT" -) - -const ( - // PortfolioShareTypeImported is a PortfolioShareType enum value - PortfolioShareTypeImported = "IMPORTED" - - // PortfolioShareTypeAwsServicecatalog is a PortfolioShareType enum value - PortfolioShareTypeAwsServicecatalog = "AWS_SERVICECATALOG" - - // PortfolioShareTypeAwsOrganizations is a PortfolioShareType enum value - PortfolioShareTypeAwsOrganizations = "AWS_ORGANIZATIONS" -) - -const ( - // PrincipalTypeIam is a PrincipalType enum value - PrincipalTypeIam = "IAM" -) - -const ( - // ProductSourceAccount is a ProductSource enum value - ProductSourceAccount = "ACCOUNT" -) - -const ( - // ProductTypeCloudFormationTemplate is a ProductType enum value - ProductTypeCloudFormationTemplate = "CLOUD_FORMATION_TEMPLATE" - - // ProductTypeMarketplace is a ProductType enum value - ProductTypeMarketplace = "MARKETPLACE" -) - -const ( - // ProductViewFilterByFullTextSearch is a ProductViewFilterBy enum value - ProductViewFilterByFullTextSearch = "FullTextSearch" - - // ProductViewFilterByOwner is a ProductViewFilterBy enum value - ProductViewFilterByOwner = "Owner" - - // ProductViewFilterByProductType is a ProductViewFilterBy enum value - ProductViewFilterByProductType = "ProductType" - - // ProductViewFilterBySourceProductId is a ProductViewFilterBy enum value - ProductViewFilterBySourceProductId = "SourceProductId" -) - -const ( - // ProductViewSortByTitle is a ProductViewSortBy enum value - ProductViewSortByTitle = "Title" - - // ProductViewSortByVersionCount is a ProductViewSortBy enum value - ProductViewSortByVersionCount = "VersionCount" - - // ProductViewSortByCreationDate is a ProductViewSortBy enum value - ProductViewSortByCreationDate = "CreationDate" -) - -const ( - // ProvisionedProductPlanStatusCreateInProgress is a ProvisionedProductPlanStatus enum value - ProvisionedProductPlanStatusCreateInProgress = "CREATE_IN_PROGRESS" - - // ProvisionedProductPlanStatusCreateSuccess is a ProvisionedProductPlanStatus enum value - ProvisionedProductPlanStatusCreateSuccess = "CREATE_SUCCESS" - - // ProvisionedProductPlanStatusCreateFailed is a ProvisionedProductPlanStatus enum value - ProvisionedProductPlanStatusCreateFailed = "CREATE_FAILED" - - // ProvisionedProductPlanStatusExecuteInProgress is a ProvisionedProductPlanStatus enum value - ProvisionedProductPlanStatusExecuteInProgress = "EXECUTE_IN_PROGRESS" - - // ProvisionedProductPlanStatusExecuteSuccess is a ProvisionedProductPlanStatus enum value - ProvisionedProductPlanStatusExecuteSuccess = "EXECUTE_SUCCESS" - - // ProvisionedProductPlanStatusExecuteFailed is a ProvisionedProductPlanStatus enum value - ProvisionedProductPlanStatusExecuteFailed = "EXECUTE_FAILED" -) - -const ( - // ProvisionedProductPlanTypeCloudformation is a ProvisionedProductPlanType enum value - ProvisionedProductPlanTypeCloudformation = "CLOUDFORMATION" -) - -const ( - // ProvisionedProductStatusAvailable is a ProvisionedProductStatus enum value - ProvisionedProductStatusAvailable = "AVAILABLE" - - // ProvisionedProductStatusUnderChange is a ProvisionedProductStatus enum value - ProvisionedProductStatusUnderChange = "UNDER_CHANGE" - - // ProvisionedProductStatusTainted is a ProvisionedProductStatus enum value - ProvisionedProductStatusTainted = "TAINTED" - - // ProvisionedProductStatusError is a ProvisionedProductStatus enum value - ProvisionedProductStatusError = "ERROR" - - // ProvisionedProductStatusPlanInProgress is a ProvisionedProductStatus enum value - ProvisionedProductStatusPlanInProgress = "PLAN_IN_PROGRESS" -) - -const ( - // ProvisionedProductViewFilterBySearchQuery is a ProvisionedProductViewFilterBy enum value - ProvisionedProductViewFilterBySearchQuery = "SearchQuery" -) - -const ( - // ProvisioningArtifactPropertyNameId is a ProvisioningArtifactPropertyName enum value - ProvisioningArtifactPropertyNameId = "Id" -) - -const ( - // ProvisioningArtifactTypeCloudFormationTemplate is a ProvisioningArtifactType enum value - ProvisioningArtifactTypeCloudFormationTemplate = "CLOUD_FORMATION_TEMPLATE" - - // ProvisioningArtifactTypeMarketplaceAmi is a ProvisioningArtifactType enum value - ProvisioningArtifactTypeMarketplaceAmi = "MARKETPLACE_AMI" - - // ProvisioningArtifactTypeMarketplaceCar is a ProvisioningArtifactType enum value - ProvisioningArtifactTypeMarketplaceCar = "MARKETPLACE_CAR" -) - -const ( - // RecordStatusCreated is a RecordStatus enum value - RecordStatusCreated = "CREATED" - - // RecordStatusInProgress is a RecordStatus enum value - RecordStatusInProgress = "IN_PROGRESS" - - // RecordStatusInProgressInError is a RecordStatus enum value - RecordStatusInProgressInError = "IN_PROGRESS_IN_ERROR" - - // RecordStatusSucceeded is a RecordStatus enum value - RecordStatusSucceeded = "SUCCEEDED" - - // RecordStatusFailed is a RecordStatus enum value - RecordStatusFailed = "FAILED" -) - -const ( - // ReplacementTrue is a Replacement enum value - ReplacementTrue = "TRUE" - - // ReplacementFalse is a Replacement enum value - ReplacementFalse = "FALSE" - - // ReplacementConditional is a Replacement enum value - ReplacementConditional = "CONDITIONAL" -) - -const ( - // RequiresRecreationNever is a RequiresRecreation enum value - RequiresRecreationNever = "NEVER" - - // RequiresRecreationConditionally is a RequiresRecreation enum value - RequiresRecreationConditionally = "CONDITIONALLY" - - // RequiresRecreationAlways is a RequiresRecreation enum value - RequiresRecreationAlways = "ALWAYS" -) - -const ( - // ResourceAttributeProperties is a ResourceAttribute enum value - ResourceAttributeProperties = "PROPERTIES" - - // ResourceAttributeMetadata is a ResourceAttribute enum value - ResourceAttributeMetadata = "METADATA" - - // ResourceAttributeCreationpolicy is a ResourceAttribute enum value - ResourceAttributeCreationpolicy = "CREATIONPOLICY" - - // ResourceAttributeUpdatepolicy is a ResourceAttribute enum value - ResourceAttributeUpdatepolicy = "UPDATEPOLICY" - - // ResourceAttributeDeletionpolicy is a ResourceAttribute enum value - ResourceAttributeDeletionpolicy = "DELETIONPOLICY" - - // ResourceAttributeTags is a ResourceAttribute enum value - ResourceAttributeTags = "TAGS" -) - -const ( - // ServiceActionAssociationErrorCodeDuplicateResource is a ServiceActionAssociationErrorCode enum value - ServiceActionAssociationErrorCodeDuplicateResource = "DUPLICATE_RESOURCE" - - // ServiceActionAssociationErrorCodeInternalFailure is a ServiceActionAssociationErrorCode enum value - ServiceActionAssociationErrorCodeInternalFailure = "INTERNAL_FAILURE" - - // ServiceActionAssociationErrorCodeLimitExceeded is a ServiceActionAssociationErrorCode enum value - ServiceActionAssociationErrorCodeLimitExceeded = "LIMIT_EXCEEDED" - - // ServiceActionAssociationErrorCodeResourceNotFound is a ServiceActionAssociationErrorCode enum value - ServiceActionAssociationErrorCodeResourceNotFound = "RESOURCE_NOT_FOUND" - - // ServiceActionAssociationErrorCodeThrottling is a ServiceActionAssociationErrorCode enum value - ServiceActionAssociationErrorCodeThrottling = "THROTTLING" -) - -const ( - // ServiceActionDefinitionKeyName is a ServiceActionDefinitionKey enum value - ServiceActionDefinitionKeyName = "Name" - - // ServiceActionDefinitionKeyVersion is a ServiceActionDefinitionKey enum value - ServiceActionDefinitionKeyVersion = "Version" - - // ServiceActionDefinitionKeyAssumeRole is a ServiceActionDefinitionKey enum value - ServiceActionDefinitionKeyAssumeRole = "AssumeRole" - - // ServiceActionDefinitionKeyParameters is a ServiceActionDefinitionKey enum value - ServiceActionDefinitionKeyParameters = "Parameters" -) - -const ( - // ServiceActionDefinitionTypeSsmAutomation is a ServiceActionDefinitionType enum value - ServiceActionDefinitionTypeSsmAutomation = "SSM_AUTOMATION" -) - -const ( - // ShareStatusNotStarted is a ShareStatus enum value - ShareStatusNotStarted = "NOT_STARTED" - - // ShareStatusInProgress is a ShareStatus enum value - ShareStatusInProgress = "IN_PROGRESS" - - // ShareStatusCompleted is a ShareStatus enum value - ShareStatusCompleted = "COMPLETED" - - // ShareStatusCompletedWithErrors is a ShareStatus enum value - ShareStatusCompletedWithErrors = "COMPLETED_WITH_ERRORS" - - // ShareStatusError is a ShareStatus enum value - ShareStatusError = "ERROR" -) - -const ( - // SortOrderAscending is a SortOrder enum value - SortOrderAscending = "ASCENDING" - - // SortOrderDescending is a SortOrder enum value - SortOrderDescending = "DESCENDING" -) - -const ( - // StackSetOperationTypeCreate is a StackSetOperationType enum value - StackSetOperationTypeCreate = "CREATE" - - // StackSetOperationTypeUpdate is a StackSetOperationType enum value - StackSetOperationTypeUpdate = "UPDATE" - - // StackSetOperationTypeDelete is a StackSetOperationType enum value - StackSetOperationTypeDelete = "DELETE" -) - -const ( - // StatusAvailable is a Status enum value - StatusAvailable = "AVAILABLE" - - // StatusCreating is a Status enum value - StatusCreating = "CREATING" - - // StatusFailed is a Status enum value - StatusFailed = "FAILED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/doc.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/doc.go deleted file mode 100644 index 9617d1935..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/doc.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package servicecatalog provides the client and types for making API -// requests to AWS Service Catalog. -// -// AWS Service Catalog (https://aws.amazon.com/servicecatalog/) enables organizations -// to create and manage catalogs of IT services that are approved for use on -// AWS. To get the most out of this documentation, you should be familiar with -// the terminology discussed in AWS Service Catalog Concepts (http://docs.aws.amazon.com/servicecatalog/latest/adminguide/what-is_concepts.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10 for more information on this service. -// -// See servicecatalog package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/servicecatalog/ -// -// Using the Client -// -// To contact AWS Service Catalog 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 Service Catalog client ServiceCatalog for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/servicecatalog/#New -package servicecatalog diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/errors.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/errors.go deleted file mode 100644 index 357d9e52f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/errors.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package servicecatalog - -const ( - - // ErrCodeDuplicateResourceException for service response error code - // "DuplicateResourceException". - // - // The specified resource is a duplicate. - ErrCodeDuplicateResourceException = "DuplicateResourceException" - - // ErrCodeInvalidParametersException for service response error code - // "InvalidParametersException". - // - // One or more parameters provided to the operation are not valid. - ErrCodeInvalidParametersException = "InvalidParametersException" - - // ErrCodeInvalidStateException for service response error code - // "InvalidStateException". - // - // An attempt was made to modify a resource that is in a state that is not valid. - // Check your resources to ensure that they are in valid states before retrying - // the operation. - ErrCodeInvalidStateException = "InvalidStateException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // The current limits of the service would have been exceeded by this operation. - // Decrease your resource use or increase your service limits and retry the - // operation. - ErrCodeLimitExceededException = "LimitExceededException" - - // ErrCodeOperationNotSupportedException for service response error code - // "OperationNotSupportedException". - // - // The operation is not supported. - ErrCodeOperationNotSupportedException = "OperationNotSupportedException" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUseException". - // - // A resource that is currently in use. Ensure that the resource is not in use - // and retry the operation. - ErrCodeResourceInUseException = "ResourceInUseException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The specified resource was not found. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeTagOptionNotMigratedException for service response error code - // "TagOptionNotMigratedException". - // - // An operation requiring TagOptions failed because the TagOptions migration - // process has not been performed for this account. Please use the AWS console - // to perform the migration process before retrying the operation. - ErrCodeTagOptionNotMigratedException = "TagOptionNotMigratedException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go deleted file mode 100644 index f15a5b802..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package servicecatalog - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// ServiceCatalog provides the API operation methods for making requests to -// AWS Service Catalog. See this package's package overview docs -// for details on the service. -// -// ServiceCatalog methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ServiceCatalog 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 = "servicecatalog" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Service Catalog" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ServiceCatalog client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a ServiceCatalog client from just a session. -// svc := servicecatalog.New(mySession) -// -// // Create a ServiceCatalog client with additional configuration -// svc := servicecatalog.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ServiceCatalog { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ServiceCatalog { - svc := &ServiceCatalog{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-12-10", - JSONVersion: "1.1", - TargetPrefix: "AWS242ServiceCatalogService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ServiceCatalog operation and runs any -// custom request initialization. -func (c *ServiceCatalog) 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/servicediscovery/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go deleted file mode 100644 index bca3bcb65..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go +++ /dev/null @@ -1,6166 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package servicediscovery - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateHttpNamespace = "CreateHttpNamespace" - -// CreateHttpNamespaceRequest generates a "aws/request.Request" representing the -// client's request for the CreateHttpNamespace operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateHttpNamespace for more information on using the CreateHttpNamespace -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateHttpNamespaceRequest method. -// req, resp := client.CreateHttpNamespaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateHttpNamespace -func (c *ServiceDiscovery) CreateHttpNamespaceRequest(input *CreateHttpNamespaceInput) (req *request.Request, output *CreateHttpNamespaceOutput) { - op := &request.Operation{ - Name: opCreateHttpNamespace, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateHttpNamespaceInput{} - } - - output = &CreateHttpNamespaceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateHttpNamespace API operation for AWS Cloud Map. -// -// Creates an HTTP namespace. Service instances that you register using an HTTP -// namespace can be discovered using a DiscoverInstances request but can't be -// discovered using DNS. -// -// For the current limit on the number of namespaces that you can create using -// the same AWS account, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) -// in the AWS Cloud Map Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation CreateHttpNamespace for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists" -// The namespace that you're trying to create already exists. -// -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// The resource can't be created because you've reached the limit on the number -// of resources. -// -// * ErrCodeDuplicateRequest "DuplicateRequest" -// The operation is already in progress. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateHttpNamespace -func (c *ServiceDiscovery) CreateHttpNamespace(input *CreateHttpNamespaceInput) (*CreateHttpNamespaceOutput, error) { - req, out := c.CreateHttpNamespaceRequest(input) - return out, req.Send() -} - -// CreateHttpNamespaceWithContext is the same as CreateHttpNamespace with the addition of -// the ability to pass a context and additional request options. -// -// See CreateHttpNamespace for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) CreateHttpNamespaceWithContext(ctx aws.Context, input *CreateHttpNamespaceInput, opts ...request.Option) (*CreateHttpNamespaceOutput, error) { - req, out := c.CreateHttpNamespaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePrivateDnsNamespace = "CreatePrivateDnsNamespace" - -// CreatePrivateDnsNamespaceRequest generates a "aws/request.Request" representing the -// client's request for the CreatePrivateDnsNamespace operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePrivateDnsNamespace for more information on using the CreatePrivateDnsNamespace -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePrivateDnsNamespaceRequest method. -// req, resp := client.CreatePrivateDnsNamespaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePrivateDnsNamespace -func (c *ServiceDiscovery) CreatePrivateDnsNamespaceRequest(input *CreatePrivateDnsNamespaceInput) (req *request.Request, output *CreatePrivateDnsNamespaceOutput) { - op := &request.Operation{ - Name: opCreatePrivateDnsNamespace, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePrivateDnsNamespaceInput{} - } - - output = &CreatePrivateDnsNamespaceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePrivateDnsNamespace API operation for AWS Cloud Map. -// -// Creates a private namespace based on DNS, which will be visible only inside -// a specified Amazon VPC. The namespace defines your service naming scheme. -// For example, if you name your namespace example.com and name your service -// backend, the resulting DNS name for the service will be backend.example.com. -// For the current limit on the number of namespaces that you can create using -// the same AWS account, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) -// in the AWS Cloud Map Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation CreatePrivateDnsNamespace for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists" -// The namespace that you're trying to create already exists. -// -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// The resource can't be created because you've reached the limit on the number -// of resources. -// -// * ErrCodeDuplicateRequest "DuplicateRequest" -// The operation is already in progress. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePrivateDnsNamespace -func (c *ServiceDiscovery) CreatePrivateDnsNamespace(input *CreatePrivateDnsNamespaceInput) (*CreatePrivateDnsNamespaceOutput, error) { - req, out := c.CreatePrivateDnsNamespaceRequest(input) - return out, req.Send() -} - -// CreatePrivateDnsNamespaceWithContext is the same as CreatePrivateDnsNamespace with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePrivateDnsNamespace for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) CreatePrivateDnsNamespaceWithContext(ctx aws.Context, input *CreatePrivateDnsNamespaceInput, opts ...request.Option) (*CreatePrivateDnsNamespaceOutput, error) { - req, out := c.CreatePrivateDnsNamespaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePublicDnsNamespace = "CreatePublicDnsNamespace" - -// CreatePublicDnsNamespaceRequest generates a "aws/request.Request" representing the -// client's request for the CreatePublicDnsNamespace operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePublicDnsNamespace for more information on using the CreatePublicDnsNamespace -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePublicDnsNamespaceRequest method. -// req, resp := client.CreatePublicDnsNamespaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePublicDnsNamespace -func (c *ServiceDiscovery) CreatePublicDnsNamespaceRequest(input *CreatePublicDnsNamespaceInput) (req *request.Request, output *CreatePublicDnsNamespaceOutput) { - op := &request.Operation{ - Name: opCreatePublicDnsNamespace, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePublicDnsNamespaceInput{} - } - - output = &CreatePublicDnsNamespaceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePublicDnsNamespace API operation for AWS Cloud Map. -// -// Creates a public namespace based on DNS, which will be visible on the internet. -// The namespace defines your service naming scheme. For example, if you name -// your namespace example.com and name your service backend, the resulting DNS -// name for the service will be backend.example.com. For the current limit on -// the number of namespaces that you can create using the same AWS account, -// see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) -// in the AWS Cloud Map Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation CreatePublicDnsNamespace for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists" -// The namespace that you're trying to create already exists. -// -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// The resource can't be created because you've reached the limit on the number -// of resources. -// -// * ErrCodeDuplicateRequest "DuplicateRequest" -// The operation is already in progress. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePublicDnsNamespace -func (c *ServiceDiscovery) CreatePublicDnsNamespace(input *CreatePublicDnsNamespaceInput) (*CreatePublicDnsNamespaceOutput, error) { - req, out := c.CreatePublicDnsNamespaceRequest(input) - return out, req.Send() -} - -// CreatePublicDnsNamespaceWithContext is the same as CreatePublicDnsNamespace with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePublicDnsNamespace for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) CreatePublicDnsNamespaceWithContext(ctx aws.Context, input *CreatePublicDnsNamespaceInput, opts ...request.Option) (*CreatePublicDnsNamespaceOutput, error) { - req, out := c.CreatePublicDnsNamespaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateService = "CreateService" - -// CreateServiceRequest generates a "aws/request.Request" representing the -// client's request for the CreateService operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateService for more information on using the CreateService -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateServiceRequest method. -// req, resp := client.CreateServiceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateService -func (c *ServiceDiscovery) CreateServiceRequest(input *CreateServiceInput) (req *request.Request, output *CreateServiceOutput) { - op := &request.Operation{ - Name: opCreateService, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateServiceInput{} - } - - output = &CreateServiceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateService API operation for AWS Cloud Map. -// -// Creates a service, which defines the configuration for the following entities: -// -// * For public and private DNS namespaces, one of the following combinations -// of DNS records in Amazon Route 53: -// -// A -// -// AAAA -// -// A and AAAA -// -// SRV -// -// CNAME -// -// * Optionally, a health check -// -// After you create the service, you can submit a RegisterInstance request, -// and AWS Cloud Map uses the values in the configuration to create the specified -// entities. -// -// For the current limit on the number of instances that you can register using -// the same namespace and using the same service, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) -// in the AWS Cloud Map Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation CreateService for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// The resource can't be created because you've reached the limit on the number -// of resources. -// -// * ErrCodeNamespaceNotFound "NamespaceNotFound" -// No namespace exists with the specified ID. -// -// * ErrCodeServiceAlreadyExists "ServiceAlreadyExists" -// The service can't be created because a service with the same name already -// exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateService -func (c *ServiceDiscovery) CreateService(input *CreateServiceInput) (*CreateServiceOutput, error) { - req, out := c.CreateServiceRequest(input) - return out, req.Send() -} - -// CreateServiceWithContext is the same as CreateService with the addition of -// the ability to pass a context and additional request options. -// -// See CreateService for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) CreateServiceWithContext(ctx aws.Context, input *CreateServiceInput, opts ...request.Option) (*CreateServiceOutput, error) { - req, out := c.CreateServiceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteNamespace = "DeleteNamespace" - -// DeleteNamespaceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteNamespace operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteNamespace for more information on using the DeleteNamespace -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteNamespaceRequest method. -// req, resp := client.DeleteNamespaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteNamespace -func (c *ServiceDiscovery) DeleteNamespaceRequest(input *DeleteNamespaceInput) (req *request.Request, output *DeleteNamespaceOutput) { - op := &request.Operation{ - Name: opDeleteNamespace, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteNamespaceInput{} - } - - output = &DeleteNamespaceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteNamespace API operation for AWS Cloud Map. -// -// Deletes a namespace from the current account. If the namespace still contains -// one or more services, the request fails. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation DeleteNamespace for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// * ErrCodeNamespaceNotFound "NamespaceNotFound" -// No namespace exists with the specified ID. -// -// * ErrCodeResourceInUse "ResourceInUse" -// The specified resource can't be deleted because it contains other resources. -// For example, you can't delete a service that contains any instances. -// -// * ErrCodeDuplicateRequest "DuplicateRequest" -// The operation is already in progress. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteNamespace -func (c *ServiceDiscovery) DeleteNamespace(input *DeleteNamespaceInput) (*DeleteNamespaceOutput, error) { - req, out := c.DeleteNamespaceRequest(input) - return out, req.Send() -} - -// DeleteNamespaceWithContext is the same as DeleteNamespace with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteNamespace for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) DeleteNamespaceWithContext(ctx aws.Context, input *DeleteNamespaceInput, opts ...request.Option) (*DeleteNamespaceOutput, error) { - req, out := c.DeleteNamespaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteService = "DeleteService" - -// DeleteServiceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteService operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteService for more information on using the DeleteService -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteServiceRequest method. -// req, resp := client.DeleteServiceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteService -func (c *ServiceDiscovery) DeleteServiceRequest(input *DeleteServiceInput) (req *request.Request, output *DeleteServiceOutput) { - op := &request.Operation{ - Name: opDeleteService, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteServiceInput{} - } - - output = &DeleteServiceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteService API operation for AWS Cloud Map. -// -// Deletes a specified service. If the service still contains one or more registered -// instances, the request fails. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation DeleteService for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// * ErrCodeServiceNotFound "ServiceNotFound" -// No service exists with the specified ID. -// -// * ErrCodeResourceInUse "ResourceInUse" -// The specified resource can't be deleted because it contains other resources. -// For example, you can't delete a service that contains any instances. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteService -func (c *ServiceDiscovery) DeleteService(input *DeleteServiceInput) (*DeleteServiceOutput, error) { - req, out := c.DeleteServiceRequest(input) - return out, req.Send() -} - -// DeleteServiceWithContext is the same as DeleteService with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteService for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) DeleteServiceWithContext(ctx aws.Context, input *DeleteServiceInput, opts ...request.Option) (*DeleteServiceOutput, error) { - req, out := c.DeleteServiceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterInstance = "DeregisterInstance" - -// DeregisterInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterInstance for more information on using the DeregisterInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterInstanceRequest method. -// req, resp := client.DeregisterInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeregisterInstance -func (c *ServiceDiscovery) DeregisterInstanceRequest(input *DeregisterInstanceInput) (req *request.Request, output *DeregisterInstanceOutput) { - op := &request.Operation{ - Name: opDeregisterInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterInstanceInput{} - } - - output = &DeregisterInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeregisterInstance API operation for AWS Cloud Map. -// -// Deletes the Amazon Route 53 DNS records and health check, if any, that AWS -// Cloud Map created for the specified instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation DeregisterInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDuplicateRequest "DuplicateRequest" -// The operation is already in progress. -// -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// * ErrCodeInstanceNotFound "InstanceNotFound" -// No instance exists with the specified ID, or the instance was recently registered, -// and information about the instance hasn't propagated yet. -// -// * ErrCodeResourceInUse "ResourceInUse" -// The specified resource can't be deleted because it contains other resources. -// For example, you can't delete a service that contains any instances. -// -// * ErrCodeServiceNotFound "ServiceNotFound" -// No service exists with the specified ID. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeregisterInstance -func (c *ServiceDiscovery) DeregisterInstance(input *DeregisterInstanceInput) (*DeregisterInstanceOutput, error) { - req, out := c.DeregisterInstanceRequest(input) - return out, req.Send() -} - -// DeregisterInstanceWithContext is the same as DeregisterInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) DeregisterInstanceWithContext(ctx aws.Context, input *DeregisterInstanceInput, opts ...request.Option) (*DeregisterInstanceOutput, error) { - req, out := c.DeregisterInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDiscoverInstances = "DiscoverInstances" - -// DiscoverInstancesRequest generates a "aws/request.Request" representing the -// client's request for the DiscoverInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DiscoverInstances for more information on using the DiscoverInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DiscoverInstancesRequest method. -// req, resp := client.DiscoverInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DiscoverInstances -func (c *ServiceDiscovery) DiscoverInstancesRequest(input *DiscoverInstancesInput) (req *request.Request, output *DiscoverInstancesOutput) { - op := &request.Operation{ - Name: opDiscoverInstances, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DiscoverInstancesInput{} - } - - output = &DiscoverInstancesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("data-", nil)) - req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) - return -} - -// DiscoverInstances API operation for AWS Cloud Map. -// -// Discovers registered instances for a specified namespace and service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation DiscoverInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceNotFound "ServiceNotFound" -// No service exists with the specified ID. -// -// * ErrCodeNamespaceNotFound "NamespaceNotFound" -// No namespace exists with the specified ID. -// -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DiscoverInstances -func (c *ServiceDiscovery) DiscoverInstances(input *DiscoverInstancesInput) (*DiscoverInstancesOutput, error) { - req, out := c.DiscoverInstancesRequest(input) - return out, req.Send() -} - -// DiscoverInstancesWithContext is the same as DiscoverInstances with the addition of -// the ability to pass a context and additional request options. -// -// See DiscoverInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) DiscoverInstancesWithContext(ctx aws.Context, input *DiscoverInstancesInput, opts ...request.Option) (*DiscoverInstancesOutput, error) { - req, out := c.DiscoverInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInstance = "GetInstance" - -// GetInstanceRequest generates a "aws/request.Request" representing the -// client's request for the GetInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInstance for more information on using the GetInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInstanceRequest method. -// req, resp := client.GetInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstance -func (c *ServiceDiscovery) GetInstanceRequest(input *GetInstanceInput) (req *request.Request, output *GetInstanceOutput) { - op := &request.Operation{ - Name: opGetInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInstanceInput{} - } - - output = &GetInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInstance API operation for AWS Cloud Map. -// -// Gets information about a specified instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation GetInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInstanceNotFound "InstanceNotFound" -// No instance exists with the specified ID, or the instance was recently registered, -// and information about the instance hasn't propagated yet. -// -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// * ErrCodeServiceNotFound "ServiceNotFound" -// No service exists with the specified ID. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstance -func (c *ServiceDiscovery) GetInstance(input *GetInstanceInput) (*GetInstanceOutput, error) { - req, out := c.GetInstanceRequest(input) - return out, req.Send() -} - -// GetInstanceWithContext is the same as GetInstance with the addition of -// the ability to pass a context and additional request options. -// -// See GetInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) GetInstanceWithContext(ctx aws.Context, input *GetInstanceInput, opts ...request.Option) (*GetInstanceOutput, error) { - req, out := c.GetInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInstancesHealthStatus = "GetInstancesHealthStatus" - -// GetInstancesHealthStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetInstancesHealthStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInstancesHealthStatus for more information on using the GetInstancesHealthStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInstancesHealthStatusRequest method. -// req, resp := client.GetInstancesHealthStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstancesHealthStatus -func (c *ServiceDiscovery) GetInstancesHealthStatusRequest(input *GetInstancesHealthStatusInput) (req *request.Request, output *GetInstancesHealthStatusOutput) { - op := &request.Operation{ - Name: opGetInstancesHealthStatus, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetInstancesHealthStatusInput{} - } - - output = &GetInstancesHealthStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInstancesHealthStatus API operation for AWS Cloud Map. -// -// Gets the current health status (Healthy, Unhealthy, or Unknown) of one or -// more instances that are associated with a specified service. -// -// There is a brief delay between when you register an instance and when the -// health status for the instance is available. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation GetInstancesHealthStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInstanceNotFound "InstanceNotFound" -// No instance exists with the specified ID, or the instance was recently registered, -// and information about the instance hasn't propagated yet. -// -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// * ErrCodeServiceNotFound "ServiceNotFound" -// No service exists with the specified ID. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstancesHealthStatus -func (c *ServiceDiscovery) GetInstancesHealthStatus(input *GetInstancesHealthStatusInput) (*GetInstancesHealthStatusOutput, error) { - req, out := c.GetInstancesHealthStatusRequest(input) - return out, req.Send() -} - -// GetInstancesHealthStatusWithContext is the same as GetInstancesHealthStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetInstancesHealthStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) GetInstancesHealthStatusWithContext(ctx aws.Context, input *GetInstancesHealthStatusInput, opts ...request.Option) (*GetInstancesHealthStatusOutput, error) { - req, out := c.GetInstancesHealthStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetInstancesHealthStatusPages iterates over the pages of a GetInstancesHealthStatus operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetInstancesHealthStatus 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 GetInstancesHealthStatus operation. -// pageNum := 0 -// err := client.GetInstancesHealthStatusPages(params, -// func(page *GetInstancesHealthStatusOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceDiscovery) GetInstancesHealthStatusPages(input *GetInstancesHealthStatusInput, fn func(*GetInstancesHealthStatusOutput, bool) bool) error { - return c.GetInstancesHealthStatusPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetInstancesHealthStatusPagesWithContext same as GetInstancesHealthStatusPages 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 *ServiceDiscovery) GetInstancesHealthStatusPagesWithContext(ctx aws.Context, input *GetInstancesHealthStatusInput, fn func(*GetInstancesHealthStatusOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetInstancesHealthStatusInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetInstancesHealthStatusRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetInstancesHealthStatusOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetNamespace = "GetNamespace" - -// GetNamespaceRequest generates a "aws/request.Request" representing the -// client's request for the GetNamespace operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetNamespace for more information on using the GetNamespace -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetNamespaceRequest method. -// req, resp := client.GetNamespaceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetNamespace -func (c *ServiceDiscovery) GetNamespaceRequest(input *GetNamespaceInput) (req *request.Request, output *GetNamespaceOutput) { - op := &request.Operation{ - Name: opGetNamespace, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetNamespaceInput{} - } - - output = &GetNamespaceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetNamespace API operation for AWS Cloud Map. -// -// Gets information about a namespace. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation GetNamespace for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// * ErrCodeNamespaceNotFound "NamespaceNotFound" -// No namespace exists with the specified ID. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetNamespace -func (c *ServiceDiscovery) GetNamespace(input *GetNamespaceInput) (*GetNamespaceOutput, error) { - req, out := c.GetNamespaceRequest(input) - return out, req.Send() -} - -// GetNamespaceWithContext is the same as GetNamespace with the addition of -// the ability to pass a context and additional request options. -// -// See GetNamespace for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) GetNamespaceWithContext(ctx aws.Context, input *GetNamespaceInput, opts ...request.Option) (*GetNamespaceOutput, error) { - req, out := c.GetNamespaceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOperation = "GetOperation" - -// GetOperationRequest generates a "aws/request.Request" representing the -// client's request for the GetOperation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetOperation for more information on using the GetOperation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetOperationRequest method. -// req, resp := client.GetOperationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetOperation -func (c *ServiceDiscovery) GetOperationRequest(input *GetOperationInput) (req *request.Request, output *GetOperationOutput) { - op := &request.Operation{ - Name: opGetOperation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetOperationInput{} - } - - output = &GetOperationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOperation API operation for AWS Cloud Map. -// -// Gets information about any operation that returns an operation ID in the -// response, such as a CreateService request. -// -// To get a list of operations that match specified criteria, see ListOperations. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation GetOperation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// * ErrCodeOperationNotFound "OperationNotFound" -// No operation exists with the specified ID. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetOperation -func (c *ServiceDiscovery) GetOperation(input *GetOperationInput) (*GetOperationOutput, error) { - req, out := c.GetOperationRequest(input) - return out, req.Send() -} - -// GetOperationWithContext is the same as GetOperation with the addition of -// the ability to pass a context and additional request options. -// -// See GetOperation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) GetOperationWithContext(ctx aws.Context, input *GetOperationInput, opts ...request.Option) (*GetOperationOutput, error) { - req, out := c.GetOperationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetService = "GetService" - -// GetServiceRequest generates a "aws/request.Request" representing the -// client's request for the GetService operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetService for more information on using the GetService -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetServiceRequest method. -// req, resp := client.GetServiceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetService -func (c *ServiceDiscovery) GetServiceRequest(input *GetServiceInput) (req *request.Request, output *GetServiceOutput) { - op := &request.Operation{ - Name: opGetService, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetServiceInput{} - } - - output = &GetServiceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetService API operation for AWS Cloud Map. -// -// Gets the settings for a specified service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation GetService for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// * ErrCodeServiceNotFound "ServiceNotFound" -// No service exists with the specified ID. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetService -func (c *ServiceDiscovery) GetService(input *GetServiceInput) (*GetServiceOutput, error) { - req, out := c.GetServiceRequest(input) - return out, req.Send() -} - -// GetServiceWithContext is the same as GetService with the addition of -// the ability to pass a context and additional request options. -// -// See GetService for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) GetServiceWithContext(ctx aws.Context, input *GetServiceInput, opts ...request.Option) (*GetServiceOutput, error) { - req, out := c.GetServiceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListInstances = "ListInstances" - -// ListInstancesRequest generates a "aws/request.Request" representing the -// client's request for the ListInstances operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListInstances for more information on using the ListInstances -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListInstancesRequest method. -// req, resp := client.ListInstancesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListInstances -func (c *ServiceDiscovery) ListInstancesRequest(input *ListInstancesInput) (req *request.Request, output *ListInstancesOutput) { - op := &request.Operation{ - Name: opListInstances, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListInstancesInput{} - } - - output = &ListInstancesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInstances API operation for AWS Cloud Map. -// -// Lists summary information about the instances that you registered by using -// a specified service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation ListInstances for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceNotFound "ServiceNotFound" -// No service exists with the specified ID. -// -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListInstances -func (c *ServiceDiscovery) ListInstances(input *ListInstancesInput) (*ListInstancesOutput, error) { - req, out := c.ListInstancesRequest(input) - return out, req.Send() -} - -// ListInstancesWithContext is the same as ListInstances with the addition of -// the ability to pass a context and additional request options. -// -// See ListInstances for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) ListInstancesWithContext(ctx aws.Context, input *ListInstancesInput, opts ...request.Option) (*ListInstancesOutput, error) { - req, out := c.ListInstancesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInstancesPages iterates over the pages of a ListInstances operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInstances 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 ListInstances operation. -// pageNum := 0 -// err := client.ListInstancesPages(params, -// func(page *ListInstancesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceDiscovery) ListInstancesPages(input *ListInstancesInput, fn func(*ListInstancesOutput, bool) bool) error { - return c.ListInstancesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInstancesPagesWithContext same as ListInstancesPages 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 *ServiceDiscovery) ListInstancesPagesWithContext(ctx aws.Context, input *ListInstancesInput, fn func(*ListInstancesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInstancesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInstancesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInstancesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListNamespaces = "ListNamespaces" - -// ListNamespacesRequest generates a "aws/request.Request" representing the -// client's request for the ListNamespaces operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListNamespaces for more information on using the ListNamespaces -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListNamespacesRequest method. -// req, resp := client.ListNamespacesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListNamespaces -func (c *ServiceDiscovery) ListNamespacesRequest(input *ListNamespacesInput) (req *request.Request, output *ListNamespacesOutput) { - op := &request.Operation{ - Name: opListNamespaces, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListNamespacesInput{} - } - - output = &ListNamespacesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListNamespaces API operation for AWS Cloud Map. -// -// Lists summary information about the namespaces that were created by the current -// AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation ListNamespaces for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListNamespaces -func (c *ServiceDiscovery) ListNamespaces(input *ListNamespacesInput) (*ListNamespacesOutput, error) { - req, out := c.ListNamespacesRequest(input) - return out, req.Send() -} - -// ListNamespacesWithContext is the same as ListNamespaces with the addition of -// the ability to pass a context and additional request options. -// -// See ListNamespaces for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) ListNamespacesWithContext(ctx aws.Context, input *ListNamespacesInput, opts ...request.Option) (*ListNamespacesOutput, error) { - req, out := c.ListNamespacesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListNamespacesPages iterates over the pages of a ListNamespaces operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListNamespaces 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 ListNamespaces operation. -// pageNum := 0 -// err := client.ListNamespacesPages(params, -// func(page *ListNamespacesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceDiscovery) ListNamespacesPages(input *ListNamespacesInput, fn func(*ListNamespacesOutput, bool) bool) error { - return c.ListNamespacesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListNamespacesPagesWithContext same as ListNamespacesPages 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 *ServiceDiscovery) ListNamespacesPagesWithContext(ctx aws.Context, input *ListNamespacesInput, fn func(*ListNamespacesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListNamespacesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListNamespacesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListNamespacesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListOperations = "ListOperations" - -// ListOperationsRequest generates a "aws/request.Request" representing the -// client's request for the ListOperations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListOperations for more information on using the ListOperations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListOperationsRequest method. -// req, resp := client.ListOperationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListOperations -func (c *ServiceDiscovery) ListOperationsRequest(input *ListOperationsInput) (req *request.Request, output *ListOperationsOutput) { - op := &request.Operation{ - Name: opListOperations, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListOperationsInput{} - } - - output = &ListOperationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOperations API operation for AWS Cloud Map. -// -// Lists operations that match the criteria that you specify. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation ListOperations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListOperations -func (c *ServiceDiscovery) ListOperations(input *ListOperationsInput) (*ListOperationsOutput, error) { - req, out := c.ListOperationsRequest(input) - return out, req.Send() -} - -// ListOperationsWithContext is the same as ListOperations with the addition of -// the ability to pass a context and additional request options. -// -// See ListOperations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) ListOperationsWithContext(ctx aws.Context, input *ListOperationsInput, opts ...request.Option) (*ListOperationsOutput, error) { - req, out := c.ListOperationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListOperationsPages iterates over the pages of a ListOperations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListOperations method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListOperations operation. -// pageNum := 0 -// err := client.ListOperationsPages(params, -// func(page *ListOperationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceDiscovery) ListOperationsPages(input *ListOperationsInput, fn func(*ListOperationsOutput, bool) bool) error { - return c.ListOperationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListOperationsPagesWithContext same as ListOperationsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) ListOperationsPagesWithContext(ctx aws.Context, input *ListOperationsInput, fn func(*ListOperationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListOperationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListOperationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListOperationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListServices = "ListServices" - -// ListServicesRequest generates a "aws/request.Request" representing the -// client's request for the ListServices operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListServices for more information on using the ListServices -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListServicesRequest method. -// req, resp := client.ListServicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListServices -func (c *ServiceDiscovery) ListServicesRequest(input *ListServicesInput) (req *request.Request, output *ListServicesOutput) { - op := &request.Operation{ - Name: opListServices, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListServicesInput{} - } - - output = &ListServicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListServices API operation for AWS Cloud Map. -// -// Lists summary information for all the services that are associated with one -// or more specified namespaces. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation ListServices for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListServices -func (c *ServiceDiscovery) ListServices(input *ListServicesInput) (*ListServicesOutput, error) { - req, out := c.ListServicesRequest(input) - return out, req.Send() -} - -// ListServicesWithContext is the same as ListServices with the addition of -// the ability to pass a context and additional request options. -// -// See ListServices for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) ListServicesWithContext(ctx aws.Context, input *ListServicesInput, opts ...request.Option) (*ListServicesOutput, error) { - req, out := c.ListServicesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListServicesPages iterates over the pages of a ListServices operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListServices 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 ListServices operation. -// pageNum := 0 -// err := client.ListServicesPages(params, -// func(page *ListServicesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *ServiceDiscovery) ListServicesPages(input *ListServicesInput, fn func(*ListServicesOutput, bool) bool) error { - return c.ListServicesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListServicesPagesWithContext same as ListServicesPages 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 *ServiceDiscovery) ListServicesPagesWithContext(ctx aws.Context, input *ListServicesInput, fn func(*ListServicesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListServicesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListServicesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListServicesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opRegisterInstance = "RegisterInstance" - -// RegisterInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RegisterInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterInstance for more information on using the RegisterInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterInstanceRequest method. -// req, resp := client.RegisterInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/RegisterInstance -func (c *ServiceDiscovery) RegisterInstanceRequest(input *RegisterInstanceInput) (req *request.Request, output *RegisterInstanceOutput) { - op := &request.Operation{ - Name: opRegisterInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterInstanceInput{} - } - - output = &RegisterInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterInstance API operation for AWS Cloud Map. -// -// Creates or updates one or more records and, optionally, creates a health -// check based on the settings in a specified service. When you submit a RegisterInstance -// request, the following occurs: -// -// * For each DNS record that you define in the service that is specified -// by ServiceId, a record is created or updated in the hosted zone that is -// associated with the corresponding namespace. -// -// * If the service includes HealthCheckConfig, a health check is created -// based on the settings in the health check configuration. -// -// * The health check, if any, is associated with each of the new or updated -// records. -// -// One RegisterInstance request must complete before you can submit another -// request and specify the same service ID and instance ID. -// -// For more information, see CreateService. -// -// When AWS Cloud Map receives a DNS query for the specified DNS name, it returns -// the applicable value: -// -// * If the health check is healthy: returns all the records -// -// * If the health check is unhealthy: returns the applicable value for the -// last healthy instance -// -// * If you didn't specify a health check configuration: returns all the -// records -// -// For the current limit on the number of instances that you can register using -// the same namespace and using the same service, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) -// in the AWS Cloud Map Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation RegisterInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDuplicateRequest "DuplicateRequest" -// The operation is already in progress. -// -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// * ErrCodeResourceInUse "ResourceInUse" -// The specified resource can't be deleted because it contains other resources. -// For example, you can't delete a service that contains any instances. -// -// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" -// The resource can't be created because you've reached the limit on the number -// of resources. -// -// * ErrCodeServiceNotFound "ServiceNotFound" -// No service exists with the specified ID. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/RegisterInstance -func (c *ServiceDiscovery) RegisterInstance(input *RegisterInstanceInput) (*RegisterInstanceOutput, error) { - req, out := c.RegisterInstanceRequest(input) - return out, req.Send() -} - -// RegisterInstanceWithContext is the same as RegisterInstance with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) RegisterInstanceWithContext(ctx aws.Context, input *RegisterInstanceInput, opts ...request.Option) (*RegisterInstanceOutput, error) { - req, out := c.RegisterInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateInstanceCustomHealthStatus = "UpdateInstanceCustomHealthStatus" - -// UpdateInstanceCustomHealthStatusRequest generates a "aws/request.Request" representing the -// client's request for the UpdateInstanceCustomHealthStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateInstanceCustomHealthStatus for more information on using the UpdateInstanceCustomHealthStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateInstanceCustomHealthStatusRequest method. -// req, resp := client.UpdateInstanceCustomHealthStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateInstanceCustomHealthStatus -func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatusRequest(input *UpdateInstanceCustomHealthStatusInput) (req *request.Request, output *UpdateInstanceCustomHealthStatusOutput) { - op := &request.Operation{ - Name: opUpdateInstanceCustomHealthStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateInstanceCustomHealthStatusInput{} - } - - output = &UpdateInstanceCustomHealthStatusOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateInstanceCustomHealthStatus API operation for AWS Cloud Map. -// -// Submits a request to change the health status of a custom health check to -// healthy or unhealthy. -// -// You can use UpdateInstanceCustomHealthStatus to change the status only for -// custom health checks, which you define using HealthCheckCustomConfig when -// you create a service. You can't use it to change the status for Route 53 -// health checks, which you define using HealthCheckConfig. -// -// For more information, see HealthCheckCustomConfig. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation UpdateInstanceCustomHealthStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInstanceNotFound "InstanceNotFound" -// No instance exists with the specified ID, or the instance was recently registered, -// and information about the instance hasn't propagated yet. -// -// * ErrCodeServiceNotFound "ServiceNotFound" -// No service exists with the specified ID. -// -// * ErrCodeCustomHealthNotFound "CustomHealthNotFound" -// The health check for the instance that is specified by ServiceId and InstanceId -// is not a custom health check. -// -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateInstanceCustomHealthStatus -func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatus(input *UpdateInstanceCustomHealthStatusInput) (*UpdateInstanceCustomHealthStatusOutput, error) { - req, out := c.UpdateInstanceCustomHealthStatusRequest(input) - return out, req.Send() -} - -// UpdateInstanceCustomHealthStatusWithContext is the same as UpdateInstanceCustomHealthStatus with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateInstanceCustomHealthStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatusWithContext(ctx aws.Context, input *UpdateInstanceCustomHealthStatusInput, opts ...request.Option) (*UpdateInstanceCustomHealthStatusOutput, error) { - req, out := c.UpdateInstanceCustomHealthStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateService = "UpdateService" - -// UpdateServiceRequest generates a "aws/request.Request" representing the -// client's request for the UpdateService operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateService for more information on using the UpdateService -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateServiceRequest method. -// req, resp := client.UpdateServiceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateService -func (c *ServiceDiscovery) UpdateServiceRequest(input *UpdateServiceInput) (req *request.Request, output *UpdateServiceOutput) { - op := &request.Operation{ - Name: opUpdateService, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateServiceInput{} - } - - output = &UpdateServiceOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateService API operation for AWS Cloud Map. -// -// Submits a request to perform the following operations: -// -// * Add or delete DnsRecords configurations -// -// * Update the TTL setting for existing DnsRecords configurations -// -// * Add, update, or delete HealthCheckConfig for a specified service -// -// For public and private DNS namespaces, you must specify all DnsRecords configurations -// (and, optionally, HealthCheckConfig) that you want to appear in the updated -// service. Any current configurations that don't appear in an UpdateService -// request are deleted. -// -// When you update the TTL setting for a service, AWS Cloud Map also updates -// the corresponding settings in all the records and health checks that were -// created by using the specified service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Cloud Map's -// API operation UpdateService for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDuplicateRequest "DuplicateRequest" -// The operation is already in progress. -// -// * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, a required value -// might be missing, a numeric value might be outside the allowed range, or -// a string value might exceed length constraints. -// -// * ErrCodeServiceNotFound "ServiceNotFound" -// No service exists with the specified ID. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateService -func (c *ServiceDiscovery) UpdateService(input *UpdateServiceInput) (*UpdateServiceOutput, error) { - req, out := c.UpdateServiceRequest(input) - return out, req.Send() -} - -// UpdateServiceWithContext is the same as UpdateService with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateService for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ServiceDiscovery) UpdateServiceWithContext(ctx aws.Context, input *UpdateServiceInput, opts ...request.Option) (*UpdateServiceOutput, error) { - req, out := c.UpdateServiceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type CreateHttpNamespaceInput struct { - _ struct{} `type:"structure"` - - // A unique string that identifies the request and that allows failed CreateHttpNamespace - // requests to be retried without the risk of executing the operation twice. - // CreatorRequestId can be any unique string, for example, a date/time stamp. - CreatorRequestId *string `type:"string" idempotencyToken:"true"` - - // A description for the namespace. - Description *string `type:"string"` - - // The name that you want to assign to this namespace. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateHttpNamespaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateHttpNamespaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateHttpNamespaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateHttpNamespaceInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *CreateHttpNamespaceInput) SetCreatorRequestId(v string) *CreateHttpNamespaceInput { - s.CreatorRequestId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateHttpNamespaceInput) SetDescription(v string) *CreateHttpNamespaceInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateHttpNamespaceInput) SetName(v string) *CreateHttpNamespaceInput { - s.Name = &v - return s -} - -type CreateHttpNamespaceOutput struct { - _ struct{} `type:"structure"` - - // A value that you can use to determine whether the request completed successfully. - // To get the status of the operation, see GetOperation. - OperationId *string `type:"string"` -} - -// String returns the string representation -func (s CreateHttpNamespaceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateHttpNamespaceOutput) GoString() string { - return s.String() -} - -// SetOperationId sets the OperationId field's value. -func (s *CreateHttpNamespaceOutput) SetOperationId(v string) *CreateHttpNamespaceOutput { - s.OperationId = &v - return s -} - -type CreatePrivateDnsNamespaceInput struct { - _ struct{} `type:"structure"` - - // A unique string that identifies the request and that allows failed CreatePrivateDnsNamespace - // requests to be retried without the risk of executing the operation twice. - // CreatorRequestId can be any unique string, for example, a date/time stamp. - CreatorRequestId *string `type:"string" idempotencyToken:"true"` - - // A description for the namespace. - Description *string `type:"string"` - - // The name that you want to assign to this namespace. When you create a private - // DNS namespace, AWS Cloud Map automatically creates an Amazon Route 53 private - // hosted zone that has the same name as the namespace. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The ID of the Amazon VPC that you want to associate the namespace with. - // - // Vpc is a required field - Vpc *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreatePrivateDnsNamespaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePrivateDnsNamespaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePrivateDnsNamespaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePrivateDnsNamespaceInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Vpc == nil { - invalidParams.Add(request.NewErrParamRequired("Vpc")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *CreatePrivateDnsNamespaceInput) SetCreatorRequestId(v string) *CreatePrivateDnsNamespaceInput { - s.CreatorRequestId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreatePrivateDnsNamespaceInput) SetDescription(v string) *CreatePrivateDnsNamespaceInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreatePrivateDnsNamespaceInput) SetName(v string) *CreatePrivateDnsNamespaceInput { - s.Name = &v - return s -} - -// SetVpc sets the Vpc field's value. -func (s *CreatePrivateDnsNamespaceInput) SetVpc(v string) *CreatePrivateDnsNamespaceInput { - s.Vpc = &v - return s -} - -type CreatePrivateDnsNamespaceOutput struct { - _ struct{} `type:"structure"` - - // A value that you can use to determine whether the request completed successfully. - // To get the status of the operation, see GetOperation. - OperationId *string `type:"string"` -} - -// String returns the string representation -func (s CreatePrivateDnsNamespaceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePrivateDnsNamespaceOutput) GoString() string { - return s.String() -} - -// SetOperationId sets the OperationId field's value. -func (s *CreatePrivateDnsNamespaceOutput) SetOperationId(v string) *CreatePrivateDnsNamespaceOutput { - s.OperationId = &v - return s -} - -type CreatePublicDnsNamespaceInput struct { - _ struct{} `type:"structure"` - - // A unique string that identifies the request and that allows failed CreatePublicDnsNamespace - // requests to be retried without the risk of executing the operation twice. - // CreatorRequestId can be any unique string, for example, a date/time stamp. - CreatorRequestId *string `type:"string" idempotencyToken:"true"` - - // A description for the namespace. - Description *string `type:"string"` - - // The name that you want to assign to this namespace. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreatePublicDnsNamespaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePublicDnsNamespaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePublicDnsNamespaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePublicDnsNamespaceInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *CreatePublicDnsNamespaceInput) SetCreatorRequestId(v string) *CreatePublicDnsNamespaceInput { - s.CreatorRequestId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreatePublicDnsNamespaceInput) SetDescription(v string) *CreatePublicDnsNamespaceInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreatePublicDnsNamespaceInput) SetName(v string) *CreatePublicDnsNamespaceInput { - s.Name = &v - return s -} - -type CreatePublicDnsNamespaceOutput struct { - _ struct{} `type:"structure"` - - // A value that you can use to determine whether the request completed successfully. - // To get the status of the operation, see GetOperation. - OperationId *string `type:"string"` -} - -// String returns the string representation -func (s CreatePublicDnsNamespaceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePublicDnsNamespaceOutput) GoString() string { - return s.String() -} - -// SetOperationId sets the OperationId field's value. -func (s *CreatePublicDnsNamespaceOutput) SetOperationId(v string) *CreatePublicDnsNamespaceOutput { - s.OperationId = &v - return s -} - -type CreateServiceInput struct { - _ struct{} `type:"structure"` - - // A unique string that identifies the request and that allows failed CreateService - // requests to be retried without the risk of executing the operation twice. - // CreatorRequestId can be any unique string, for example, a date/time stamp. - CreatorRequestId *string `type:"string" idempotencyToken:"true"` - - // A description for the service. - Description *string `type:"string"` - - // A complex type that contains information about the Amazon Route 53 records - // that you want AWS Cloud Map to create when you register an instance. - DnsConfig *DnsConfig `type:"structure"` - - // Public DNS namespaces only. A complex type that contains settings for an - // optional Route 53 health check. If you specify settings for a health check, - // AWS Cloud Map associates the health check with all the Route 53 DNS records - // that you specify in DnsConfig. - // - // If you specify a health check configuration, you can specify either HealthCheckCustomConfig - // or HealthCheckConfig but not both. - // - // For information about the charges for health checks, see AWS Cloud Map Pricing - // (http://aws.amazon.com/cloud-map/pricing/). - HealthCheckConfig *HealthCheckConfig `type:"structure"` - - // A complex type that contains information about an optional custom health - // check. - // - // If you specify a health check configuration, you can specify either HealthCheckCustomConfig - // or HealthCheckConfig but not both. - HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"` - - // The name that you want to assign to the service. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The ID of the namespace that you want to use to create the service. - NamespaceId *string `type:"string"` -} - -// String returns the string representation -func (s CreateServiceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateServiceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateServiceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateServiceInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.DnsConfig != nil { - if err := s.DnsConfig.Validate(); err != nil { - invalidParams.AddNested("DnsConfig", err.(request.ErrInvalidParams)) - } - } - if s.HealthCheckConfig != nil { - if err := s.HealthCheckConfig.Validate(); err != nil { - invalidParams.AddNested("HealthCheckConfig", err.(request.ErrInvalidParams)) - } - } - if s.HealthCheckCustomConfig != nil { - if err := s.HealthCheckCustomConfig.Validate(); err != nil { - invalidParams.AddNested("HealthCheckCustomConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *CreateServiceInput) SetCreatorRequestId(v string) *CreateServiceInput { - s.CreatorRequestId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateServiceInput) SetDescription(v string) *CreateServiceInput { - s.Description = &v - return s -} - -// SetDnsConfig sets the DnsConfig field's value. -func (s *CreateServiceInput) SetDnsConfig(v *DnsConfig) *CreateServiceInput { - s.DnsConfig = v - return s -} - -// SetHealthCheckConfig sets the HealthCheckConfig field's value. -func (s *CreateServiceInput) SetHealthCheckConfig(v *HealthCheckConfig) *CreateServiceInput { - s.HealthCheckConfig = v - return s -} - -// SetHealthCheckCustomConfig sets the HealthCheckCustomConfig field's value. -func (s *CreateServiceInput) SetHealthCheckCustomConfig(v *HealthCheckCustomConfig) *CreateServiceInput { - s.HealthCheckCustomConfig = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateServiceInput) SetName(v string) *CreateServiceInput { - s.Name = &v - return s -} - -// SetNamespaceId sets the NamespaceId field's value. -func (s *CreateServiceInput) SetNamespaceId(v string) *CreateServiceInput { - s.NamespaceId = &v - return s -} - -type CreateServiceOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about the new service. - Service *Service `type:"structure"` -} - -// String returns the string representation -func (s CreateServiceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateServiceOutput) GoString() string { - return s.String() -} - -// SetService sets the Service field's value. -func (s *CreateServiceOutput) SetService(v *Service) *CreateServiceOutput { - s.Service = v - return s -} - -type DeleteNamespaceInput struct { - _ struct{} `type:"structure"` - - // The ID of the namespace that you want to delete. - // - // Id is a required field - Id *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteNamespaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNamespaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNamespaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNamespaceInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteNamespaceInput) SetId(v string) *DeleteNamespaceInput { - s.Id = &v - return s -} - -type DeleteNamespaceOutput struct { - _ struct{} `type:"structure"` - - // A value that you can use to determine whether the request completed successfully. - // To get the status of the operation, see GetOperation. - OperationId *string `type:"string"` -} - -// String returns the string representation -func (s DeleteNamespaceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNamespaceOutput) GoString() string { - return s.String() -} - -// SetOperationId sets the OperationId field's value. -func (s *DeleteNamespaceOutput) SetOperationId(v string) *DeleteNamespaceOutput { - s.OperationId = &v - return s -} - -type DeleteServiceInput struct { - _ struct{} `type:"structure"` - - // The ID of the service that you want to delete. - // - // Id is a required field - Id *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteServiceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteServiceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteServiceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteServiceInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteServiceInput) SetId(v string) *DeleteServiceInput { - s.Id = &v - return s -} - -type DeleteServiceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteServiceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteServiceOutput) GoString() string { - return s.String() -} - -type DeregisterInstanceInput struct { - _ struct{} `type:"structure"` - - // The value that you specified for Id in the RegisterInstance request. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The ID of the service that the instance is associated with. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DeregisterInstanceInput) SetInstanceId(v string) *DeregisterInstanceInput { - s.InstanceId = &v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *DeregisterInstanceInput) SetServiceId(v string) *DeregisterInstanceInput { - s.ServiceId = &v - return s -} - -type DeregisterInstanceOutput struct { - _ struct{} `type:"structure"` - - // A value that you can use to determine whether the request completed successfully. - // For more information, see GetOperation. - OperationId *string `type:"string"` -} - -// String returns the string representation -func (s DeregisterInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterInstanceOutput) GoString() string { - return s.String() -} - -// SetOperationId sets the OperationId field's value. -func (s *DeregisterInstanceOutput) SetOperationId(v string) *DeregisterInstanceOutput { - s.OperationId = &v - return s -} - -type DiscoverInstancesInput struct { - _ struct{} `type:"structure"` - - // The health status of the instances that you want to discover. - HealthStatus *string `type:"string" enum:"HealthStatusFilter"` - - // The maximum number of instances that you want Cloud Map to return in the - // response to a DiscoverInstances request. If you don't specify a value for - // MaxResults, Cloud Map returns up to 100 instances. - MaxResults *int64 `min:"1" type:"integer"` - - // The name of the namespace that you specified when you registered the instance. - // - // NamespaceName is a required field - NamespaceName *string `type:"string" required:"true"` - - // A string map that contains attributes with values that you can use to filter - // instances by any custom attribute that you specified when you registered - // the instance. Only instances that match all the specified key/value pairs - // will be returned. - QueryParameters map[string]*string `type:"map"` - - // The name of the service that you specified when you registered the instance. - // - // ServiceName is a required field - ServiceName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DiscoverInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiscoverInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DiscoverInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DiscoverInstancesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NamespaceName == nil { - invalidParams.Add(request.NewErrParamRequired("NamespaceName")) - } - if s.ServiceName == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthStatus sets the HealthStatus field's value. -func (s *DiscoverInstancesInput) SetHealthStatus(v string) *DiscoverInstancesInput { - s.HealthStatus = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DiscoverInstancesInput) SetMaxResults(v int64) *DiscoverInstancesInput { - s.MaxResults = &v - return s -} - -// SetNamespaceName sets the NamespaceName field's value. -func (s *DiscoverInstancesInput) SetNamespaceName(v string) *DiscoverInstancesInput { - s.NamespaceName = &v - return s -} - -// SetQueryParameters sets the QueryParameters field's value. -func (s *DiscoverInstancesInput) SetQueryParameters(v map[string]*string) *DiscoverInstancesInput { - s.QueryParameters = v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *DiscoverInstancesInput) SetServiceName(v string) *DiscoverInstancesInput { - s.ServiceName = &v - return s -} - -type DiscoverInstancesOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains one HttpInstanceSummary for each registered - // instance. - Instances []*HttpInstanceSummary `type:"list"` -} - -// String returns the string representation -func (s DiscoverInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiscoverInstancesOutput) GoString() string { - return s.String() -} - -// SetInstances sets the Instances field's value. -func (s *DiscoverInstancesOutput) SetInstances(v []*HttpInstanceSummary) *DiscoverInstancesOutput { - s.Instances = v - return s -} - -// A complex type that contains information about the Amazon Route 53 DNS records -// that you want AWS Cloud Map to create when you register an instance. -type DnsConfig struct { - _ struct{} `type:"structure"` - - // An array that contains one DnsRecord object for each Route 53 DNS record - // that you want AWS Cloud Map to create when you register an instance. - // - // DnsRecords is a required field - DnsRecords []*DnsRecord `type:"list" required:"true"` - - // The ID of the namespace to use for DNS configuration. - // - // Deprecated: Top level attribute in request should be used to reference namespace-id - NamespaceId *string `deprecated:"true" type:"string"` - - // The routing policy that you want to apply to all Route 53 DNS records that - // AWS Cloud Map creates when you register an instance and specify this service. - // - // If you want to use this service to register instances that create alias records, - // specify WEIGHTED for the routing policy. - // - // You can specify the following values: - // - // MULTIVALUE - // - // If you define a health check for the service and the health check is healthy, - // Route 53 returns the applicable value for up to eight instances. - // - // For example, suppose the service includes configurations for one A record - // and a health check, and you use the service to register 10 instances. Route - // 53 responds to DNS queries with IP addresses for up to eight healthy instances. - // If fewer than eight instances are healthy, Route 53 responds to every DNS - // query with the IP addresses for all of the healthy instances. - // - // If you don't define a health check for the service, Route 53 assumes that - // all instances are healthy and returns the values for up to eight instances. - // - // For more information about the multivalue routing policy, see Multivalue - // Answer Routing (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-multivalue) - // in the Route 53 Developer Guide. - // - // WEIGHTED - // - // Route 53 returns the applicable value from one randomly selected instance - // from among the instances that you registered using the same service. Currently, - // all records have the same weight, so you can't route more or less traffic - // to any instances. - // - // For example, suppose the service includes configurations for one A record - // and a health check, and you use the service to register 10 instances. Route - // 53 responds to DNS queries with the IP address for one randomly selected - // instance from among the healthy instances. If no instances are healthy, Route - // 53 responds to DNS queries as if all of the instances were healthy. - // - // If you don't define a health check for the service, Route 53 assumes that - // all instances are healthy and returns the applicable value for one randomly - // selected instance. - // - // For more information about the weighted routing policy, see Weighted Routing - // (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-weighted) - // in the Route 53 Developer Guide. - RoutingPolicy *string `type:"string" enum:"RoutingPolicy"` -} - -// String returns the string representation -func (s DnsConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DnsConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DnsConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DnsConfig"} - if s.DnsRecords == nil { - invalidParams.Add(request.NewErrParamRequired("DnsRecords")) - } - if s.DnsRecords != nil { - for i, v := range s.DnsRecords { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DnsRecords", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDnsRecords sets the DnsRecords field's value. -func (s *DnsConfig) SetDnsRecords(v []*DnsRecord) *DnsConfig { - s.DnsRecords = v - return s -} - -// SetNamespaceId sets the NamespaceId field's value. -func (s *DnsConfig) SetNamespaceId(v string) *DnsConfig { - s.NamespaceId = &v - return s -} - -// SetRoutingPolicy sets the RoutingPolicy field's value. -func (s *DnsConfig) SetRoutingPolicy(v string) *DnsConfig { - s.RoutingPolicy = &v - return s -} - -// A complex type that contains information about changes to the Route 53 DNS -// records that AWS Cloud Map creates when you register an instance. -type DnsConfigChange struct { - _ struct{} `type:"structure"` - - // An array that contains one DnsRecord object for each Route 53 record that - // you want AWS Cloud Map to create when you register an instance. - // - // DnsRecords is a required field - DnsRecords []*DnsRecord `type:"list" required:"true"` -} - -// String returns the string representation -func (s DnsConfigChange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DnsConfigChange) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DnsConfigChange) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DnsConfigChange"} - if s.DnsRecords == nil { - invalidParams.Add(request.NewErrParamRequired("DnsRecords")) - } - if s.DnsRecords != nil { - for i, v := range s.DnsRecords { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DnsRecords", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDnsRecords sets the DnsRecords field's value. -func (s *DnsConfigChange) SetDnsRecords(v []*DnsRecord) *DnsConfigChange { - s.DnsRecords = v - return s -} - -// A complex type that contains the ID for the Route 53 hosted zone that AWS -// Cloud Map creates when you create a namespace. -type DnsProperties struct { - _ struct{} `type:"structure"` - - // The ID for the Route 53 hosted zone that AWS Cloud Map creates when you create - // a namespace. - HostedZoneId *string `type:"string"` -} - -// String returns the string representation -func (s DnsProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DnsProperties) GoString() string { - return s.String() -} - -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *DnsProperties) SetHostedZoneId(v string) *DnsProperties { - s.HostedZoneId = &v - return s -} - -// A complex type that contains information about the Route 53 DNS records that -// you want AWS Cloud Map to create when you register an instance. -type DnsRecord struct { - _ struct{} `type:"structure"` - - // The amount of time, in seconds, that you want DNS resolvers to cache the - // settings for this record. - // - // Alias records don't include a TTL because Route 53 uses the TTL for the AWS - // resource that an alias record routes traffic to. If you include the AWS_ALIAS_DNS_NAME - // attribute when you submit a RegisterInstance request, the TTL value is ignored. - // Always specify a TTL for the service; you can use a service to register instances - // that create either alias or non-alias records. - // - // TTL is a required field - TTL *int64 `type:"long" required:"true"` - - // The type of the resource, which indicates the type of value that Route 53 - // returns in response to DNS queries. - // - // Note the following: - // - // * A, AAAA, and SRV records: You can specify settings for a maximum of - // one A, one AAAA, and one SRV record. You can specify them in any combination. - // - // * CNAME records: If you specify CNAME for Type, you can't define any other - // records. This is a limitation of DNS: you can't create a CNAME record - // and any other type of record that has the same name as a CNAME record. - // - // * Alias records: If you want AWS Cloud Map to create a Route 53 alias - // record when you register an instance, specify A or AAAA for Type. - // - // * All records: You specify settings other than TTL and Type when you register - // an instance. - // - // The following values are supported: - // - // A - // - // Route 53 returns the IP address of the resource in IPv4 format, such as 192.0.2.44. - // - // AAAA - // - // Route 53 returns the IP address of the resource in IPv6 format, such as 2001:0db8:85a3:0000:0000:abcd:0001:2345. - // - // CNAME - // - // Route 53 returns the domain name of the resource, such as www.example.com. - // Note the following: - // - // * You specify the domain name that you want to route traffic to when you - // register an instance. For more information, see RegisterInstanceRequest$Attributes. - // - // * You must specify WEIGHTED for the value of RoutingPolicy. - // - // * You can't specify both CNAME for Type and settings for HealthCheckConfig. - // If you do, the request will fail with an InvalidInput error. - // - // SRV - // - // Route 53 returns the value for an SRV record. The value for an SRV record - // uses the following values: - // - // priority weight port service-hostname - // - // Note the following about the values: - // - // * The values of priority and weight are both set to 1 and can't be changed. - // - // - // * The value of port comes from the value that you specify for the AWS_INSTANCE_PORT - // attribute when you submit a RegisterInstance request. - // - // * The value of service-hostname is a concatenation of the following values: - // - // The value that you specify for InstanceId when you register an instance. - // - // The name of the service. - // - // The name of the namespace. - // - // For example, if the value of InstanceId is test, the name of the service - // is backend, and the name of the namespace is example.com, the value of - // service-hostname is: - // - // test.backend.example.com - // - // If you specify settings for an SRV record and if you specify values for AWS_INSTANCE_IPV4, - // AWS_INSTANCE_IPV6, or both in the RegisterInstance request, AWS Cloud Map - // automatically creates A and/or AAAA records that have the same name as the - // value of service-hostname in the SRV record. You can ignore these records. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"RecordType"` -} - -// String returns the string representation -func (s DnsRecord) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DnsRecord) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DnsRecord) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DnsRecord"} - if s.TTL == nil { - invalidParams.Add(request.NewErrParamRequired("TTL")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTTL sets the TTL field's value. -func (s *DnsRecord) SetTTL(v int64) *DnsRecord { - s.TTL = &v - return s -} - -// SetType sets the Type field's value. -func (s *DnsRecord) SetType(v string) *DnsRecord { - s.Type = &v - return s -} - -type GetInstanceInput struct { - _ struct{} `type:"structure"` - - // The ID of the instance that you want to get information about. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The ID of the service that the instance is associated with. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetInstanceInput) SetInstanceId(v string) *GetInstanceInput { - s.InstanceId = &v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *GetInstanceInput) SetServiceId(v string) *GetInstanceInput { - s.ServiceId = &v - return s -} - -type GetInstanceOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about a specified instance. - Instance *Instance `type:"structure"` -} - -// String returns the string representation -func (s GetInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceOutput) GoString() string { - return s.String() -} - -// SetInstance sets the Instance field's value. -func (s *GetInstanceOutput) SetInstance(v *Instance) *GetInstanceOutput { - s.Instance = v - return s -} - -type GetInstancesHealthStatusInput struct { - _ struct{} `type:"structure"` - - // An array that contains the IDs of all the instances that you want to get - // the health status for. - // - // If you omit Instances, AWS Cloud Map returns the health status for all the - // instances that are associated with the specified service. - // - // To get the IDs for the instances that you've registered by using a specified - // service, submit a ListInstances request. - Instances []*string `min:"1" type:"list"` - - // The maximum number of instances that you want AWS Cloud Map to return in - // the response to a GetInstancesHealthStatus request. If you don't specify - // a value for MaxResults, AWS Cloud Map returns up to 100 instances. - MaxResults *int64 `min:"1" type:"integer"` - - // For the first GetInstancesHealthStatus request, omit this value. - // - // If more than MaxResults instances match the specified criteria, you can submit - // another GetInstancesHealthStatus request to get the next group of results. - // Specify the value of NextToken from the previous response in the next request. - NextToken *string `type:"string"` - - // The ID of the service that the instance is associated with. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetInstancesHealthStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstancesHealthStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstancesHealthStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstancesHealthStatusInput"} - if s.Instances != nil && len(s.Instances) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Instances", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstances sets the Instances field's value. -func (s *GetInstancesHealthStatusInput) SetInstances(v []*string) *GetInstancesHealthStatusInput { - s.Instances = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetInstancesHealthStatusInput) SetMaxResults(v int64) *GetInstancesHealthStatusInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetInstancesHealthStatusInput) SetNextToken(v string) *GetInstancesHealthStatusInput { - s.NextToken = &v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *GetInstancesHealthStatusInput) SetServiceId(v string) *GetInstancesHealthStatusInput { - s.ServiceId = &v - return s -} - -type GetInstancesHealthStatusOutput struct { - _ struct{} `type:"structure"` - - // If more than MaxResults instances match the specified criteria, you can submit - // another GetInstancesHealthStatus request to get the next group of results. - // Specify the value of NextToken from the previous response in the next request. - NextToken *string `type:"string"` - - // A complex type that contains the IDs and the health status of the instances - // that you specified in the GetInstancesHealthStatus request. - Status map[string]*string `type:"map"` -} - -// String returns the string representation -func (s GetInstancesHealthStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstancesHealthStatusOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetInstancesHealthStatusOutput) SetNextToken(v string) *GetInstancesHealthStatusOutput { - s.NextToken = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetInstancesHealthStatusOutput) SetStatus(v map[string]*string) *GetInstancesHealthStatusOutput { - s.Status = v - return s -} - -type GetNamespaceInput struct { - _ struct{} `type:"structure"` - - // The ID of the namespace that you want to get information about. - // - // Id is a required field - Id *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetNamespaceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetNamespaceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetNamespaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetNamespaceInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetNamespaceInput) SetId(v string) *GetNamespaceInput { - s.Id = &v - return s -} - -type GetNamespaceOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about the specified namespace. - Namespace *Namespace `type:"structure"` -} - -// String returns the string representation -func (s GetNamespaceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetNamespaceOutput) GoString() string { - return s.String() -} - -// SetNamespace sets the Namespace field's value. -func (s *GetNamespaceOutput) SetNamespace(v *Namespace) *GetNamespaceOutput { - s.Namespace = v - return s -} - -type GetOperationInput struct { - _ struct{} `type:"structure"` - - // The ID of the operation that you want to get more information about. - // - // OperationId is a required field - OperationId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetOperationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOperationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOperationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOperationInput"} - if s.OperationId == nil { - invalidParams.Add(request.NewErrParamRequired("OperationId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOperationId sets the OperationId field's value. -func (s *GetOperationInput) SetOperationId(v string) *GetOperationInput { - s.OperationId = &v - return s -} - -type GetOperationOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about the operation. - Operation *Operation `type:"structure"` -} - -// String returns the string representation -func (s GetOperationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetOperationOutput) GoString() string { - return s.String() -} - -// SetOperation sets the Operation field's value. -func (s *GetOperationOutput) SetOperation(v *Operation) *GetOperationOutput { - s.Operation = v - return s -} - -type GetServiceInput struct { - _ struct{} `type:"structure"` - - // The ID of the service that you want to get settings for. - // - // Id is a required field - Id *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetServiceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetServiceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetServiceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetServiceInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetServiceInput) SetId(v string) *GetServiceInput { - s.Id = &v - return s -} - -type GetServiceOutput struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about the service. - Service *Service `type:"structure"` -} - -// String returns the string representation -func (s GetServiceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetServiceOutput) GoString() string { - return s.String() -} - -// SetService sets the Service field's value. -func (s *GetServiceOutput) SetService(v *Service) *GetServiceOutput { - s.Service = v - return s -} - -// Public DNS namespaces only. A complex type that contains settings for an -// optional health check. If you specify settings for a health check, AWS Cloud -// Map associates the health check with the records that you specify in DnsConfig. -// -// If you specify a health check configuration, you can specify either HealthCheckCustomConfig -// or HealthCheckConfig but not both. -// -// Health checks are basic Route 53 health checks that monitor an AWS endpoint. -// For information about pricing for health checks, see Amazon Route 53 Pricing -// (http://aws.amazon.com/route53/pricing/). -// -// Note the following about configuring health checks. -// -// A and AAAA records -// -// If DnsConfig includes configurations for both A and AAAA records, AWS Cloud -// Map creates a health check that uses the IPv4 address to check the health -// of the resource. If the endpoint that is specified by the IPv4 address is -// unhealthy, Route 53 considers both the A and AAAA records to be unhealthy. -// -// CNAME records -// -// You can't specify settings for HealthCheckConfig when the DNSConfig includes -// CNAME for the value of Type. If you do, the CreateService request will fail -// with an InvalidInput error. -// -// Request interval -// -// A Route 53 health checker in each health-checking region sends a health check -// request to an endpoint every 30 seconds. On average, your endpoint receives -// a health check request about every two seconds. However, health checkers -// don't coordinate with one another, so you'll sometimes see several requests -// per second followed by a few seconds with no health checks at all. -// -// Health checking regions -// -// Health checkers perform checks from all Route 53 health-checking regions. -// For a list of the current regions, see Regions (http://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). -// -// Alias records -// -// When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute, -// AWS Cloud Map creates a Route 53 alias record. Note the following: -// -// * Route 53 automatically sets EvaluateTargetHealth to true for alias records. -// When EvaluateTargetHealth is true, the alias record inherits the health -// of the referenced AWS resource. such as an ELB load balancer. For more -// information, see EvaluateTargetHealth (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). -// -// * If you include HealthCheckConfig and then use the service to register -// an instance that creates an alias record, Route 53 doesn't create the -// health check. -// -// Charges for health checks -// -// Health checks are basic Route 53 health checks that monitor an AWS endpoint. -// For information about pricing for health checks, see Amazon Route 53 Pricing -// (http://aws.amazon.com/route53/pricing/). -type HealthCheckConfig struct { - _ struct{} `type:"structure"` - - // The number of consecutive health checks that an endpoint must pass or fail - // for Route 53 to change the current status of the endpoint from unhealthy - // to healthy or vice versa. For more information, see How Route 53 Determines - // Whether an Endpoint Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) - // in the Route 53 Developer Guide. - FailureThreshold *int64 `min:"1" type:"integer"` - - // The path that you want Route 53 to request when performing health checks. - // The path can be any value for which your endpoint will return an HTTP status - // code of 2xx or 3xx when the endpoint is healthy, such as the file /docs/route53-health-check.html. - // Route 53 automatically adds the DNS name for the service. If you don't specify - // a value for ResourcePath, the default value is /. - // - // If you specify TCP for Type, you must not specify a value for ResourcePath. - ResourcePath *string `type:"string"` - - // The type of health check that you want to create, which indicates how Route - // 53 determines whether an endpoint is healthy. - // - // You can't change the value of Type after you create a health check. - // - // You can create the following types of health checks: - // - // * HTTP: Route 53 tries to establish a TCP connection. If successful, Route - // 53 submits an HTTP request and waits for an HTTP status code of 200 or - // greater and less than 400. - // - // * HTTPS: Route 53 tries to establish a TCP connection. If successful, - // Route 53 submits an HTTPS request and waits for an HTTP status code of - // 200 or greater and less than 400. - // - // If you specify HTTPS for the value of Type, the endpoint must support TLS - // v1.0 or later. - // - // * TCP: Route 53 tries to establish a TCP connection. - // - // If you specify TCP for Type, don't specify a value for ResourcePath. - // - // For more information, see How Route 53 Determines Whether an Endpoint Is - // Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) - // in the Route 53 Developer Guide. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"HealthCheckType"` -} - -// String returns the string representation -func (s HealthCheckConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HealthCheckConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HealthCheckConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HealthCheckConfig"} - if s.FailureThreshold != nil && *s.FailureThreshold < 1 { - invalidParams.Add(request.NewErrParamMinValue("FailureThreshold", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFailureThreshold sets the FailureThreshold field's value. -func (s *HealthCheckConfig) SetFailureThreshold(v int64) *HealthCheckConfig { - s.FailureThreshold = &v - return s -} - -// SetResourcePath sets the ResourcePath field's value. -func (s *HealthCheckConfig) SetResourcePath(v string) *HealthCheckConfig { - s.ResourcePath = &v - return s -} - -// SetType sets the Type field's value. -func (s *HealthCheckConfig) SetType(v string) *HealthCheckConfig { - s.Type = &v - return s -} - -// A complex type that contains information about an optional custom health -// check. A custom health check, which requires that you use a third-party health -// checker to evaluate the health of your resources, is useful in the following -// circumstances: -// -// * You can't use a health check that is defined by HealthCheckConfig because -// the resource isn't available over the internet. For example, you can use -// a custom health check when the instance is in an Amazon VPC. (To check -// the health of resources in a VPC, the health checker must also be in the -// VPC.) -// -// * You want to use a third-party health checker regardless of where your -// resources are. -// -// If you specify a health check configuration, you can specify either HealthCheckCustomConfig -// or HealthCheckConfig but not both. -// -// To change the status of a custom health check, submit an UpdateInstanceCustomHealthStatus -// request. Cloud Map doesn't monitor the status of the resource, it just keeps -// a record of the status specified in the most recent UpdateInstanceCustomHealthStatus -// request. -// -// Here's how custom health checks work: -// -// You create a service and specify a value for FailureThreshold. -// -// The failure threshold indicates the number of 30-second intervals you want -// AWS Cloud Map to wait between the time that your application sends an UpdateInstanceCustomHealthStatus -// request and the time that AWS Cloud Map stops routing internet traffic to -// the corresponding resource. -// -// You register an instance. -// -// You configure a third-party health checker to monitor the resource that is -// associated with the new instance. -// -// AWS Cloud Map doesn't check the health of the resource directly. -// -// The third-party health-checker determines that the resource is unhealthy -// and notifies your application. -// -// Your application submits an UpdateInstanceCustomHealthStatus request. -// -// AWS Cloud Map waits for (FailureThreshold x 30) seconds. -// -// If another UpdateInstanceCustomHealthStatus request doesn't arrive during -// that time to change the status back to healthy, AWS Cloud Map stops routing -// traffic to the resource. -// -// Note the following about configuring custom health checks. -type HealthCheckCustomConfig struct { - _ struct{} `type:"structure"` - - // The number of 30-second intervals that you want Cloud Map to wait after receiving - // an UpdateInstanceCustomHealthStatus request before it changes the health - // status of a service instance. For example, suppose you specify a value of - // 2 for FailureTheshold, and then your application sends an UpdateInstanceCustomHealthStatus - // request. Cloud Map waits for approximately 60 seconds (2 x 30) before changing - // the status of the service instance based on that request. - // - // Sending a second or subsequent UpdateInstanceCustomHealthStatus request with - // the same value before FailureThreshold x 30 seconds has passed doesn't accelerate - // the change. Cloud Map still waits FailureThreshold x 30 seconds after the - // first request to make the change. - FailureThreshold *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s HealthCheckCustomConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HealthCheckCustomConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HealthCheckCustomConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HealthCheckCustomConfig"} - if s.FailureThreshold != nil && *s.FailureThreshold < 1 { - invalidParams.Add(request.NewErrParamMinValue("FailureThreshold", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFailureThreshold sets the FailureThreshold field's value. -func (s *HealthCheckCustomConfig) SetFailureThreshold(v int64) *HealthCheckCustomConfig { - s.FailureThreshold = &v - return s -} - -// In a response to a DiscoverInstance request, HttpInstanceSummary contains -// information about one instance that matches the values that you specified -// in the request. -type HttpInstanceSummary struct { - _ struct{} `type:"structure"` - - // If you included any attributes when you registered the instance, the values - // of those attributes. - Attributes map[string]*string `type:"map"` - - // If you configured health checking in the service, the current health status - // of the service instance. - HealthStatus *string `type:"string" enum:"HealthStatus"` - - // The ID of an instance that matches the values that you specified in the request. - InstanceId *string `type:"string"` - - // The name of the namespace that you specified when you registered the instance. - NamespaceName *string `type:"string"` - - // The name of the service that you specified when you registered the instance. - ServiceName *string `type:"string"` -} - -// String returns the string representation -func (s HttpInstanceSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HttpInstanceSummary) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *HttpInstanceSummary) SetAttributes(v map[string]*string) *HttpInstanceSummary { - s.Attributes = v - return s -} - -// SetHealthStatus sets the HealthStatus field's value. -func (s *HttpInstanceSummary) SetHealthStatus(v string) *HttpInstanceSummary { - s.HealthStatus = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *HttpInstanceSummary) SetInstanceId(v string) *HttpInstanceSummary { - s.InstanceId = &v - return s -} - -// SetNamespaceName sets the NamespaceName field's value. -func (s *HttpInstanceSummary) SetNamespaceName(v string) *HttpInstanceSummary { - s.NamespaceName = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *HttpInstanceSummary) SetServiceName(v string) *HttpInstanceSummary { - s.ServiceName = &v - return s -} - -// A complex type that contains the name of an HTTP namespace. -type HttpProperties struct { - _ struct{} `type:"structure"` - - // The name of an HTTP namespace. - HttpName *string `type:"string"` -} - -// String returns the string representation -func (s HttpProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HttpProperties) GoString() string { - return s.String() -} - -// SetHttpName sets the HttpName field's value. -func (s *HttpProperties) SetHttpName(v string) *HttpProperties { - s.HttpName = &v - return s -} - -// A complex type that contains information about an instance that AWS Cloud -// Map creates when you submit a RegisterInstance request. -type Instance struct { - _ struct{} `type:"structure"` - - // A string map that contains the following information for the service that - // you specify in ServiceId: - // - // * The attributes that apply to the records that are defined in the service. - // - // - // * For each attribute, the applicable value. - // - // Supported attribute keys include the following: - // - // AWS_ALIAS_DNS_NAME - // - // If you want AWS Cloud Map to create a Route 53 alias record that routes traffic - // to an Elastic Load Balancing load balancer, specify the DNS name that is - // associated with the load balancer. For information about how to get the DNS - // name, see "DNSName" in the topic AliasTarget (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html). - // - // Note the following: - // - // The configuration for the service that is specified by ServiceId must include - // settings for an A record, an AAAA record, or both. - // - // * In the service that is specified by ServiceId, the value of RoutingPolicy - // must be WEIGHTED. - // - // * If the service that is specified by ServiceId includes HealthCheckConfig - // settings, AWS Cloud Map will create the health check, but it won't associate - // the health check with the alias record. - // - // * Auto naming currently doesn't support creating alias records that route - // traffic to AWS resources other than ELB load balancers. - // - // * If you specify a value for AWS_ALIAS_DNS_NAME, don't specify values - // for any of the AWS_INSTANCE attributes. - // - // AWS_INSTANCE_CNAME - // - // If the service configuration includes a CNAME record, the domain name that - // you want Route 53 to return in response to DNS queries, for example, example.com. - // - // This value is required if the service specified by ServiceIdincludes settings for an CNAME record. - // - // AWS_INSTANCE_IPV4 - // - // If the service configuration includes an A record, the IPv4 address that - // you want Route 53 to return in response to DNS queries, for example, 192.0.2.44. - // - // This value is required if the service specified by ServiceIdincludes settings for an A record. If the service includes settings for an - // SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both. - // - // AWS_INSTANCE_IPV6 - // - // If the service configuration includes an AAAA record, the IPv6 address that - // you want Route 53 to return in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345. - // - // This value is required if the service specified by ServiceIdincludes settings for an AAAA record. If the service includes settings for - // an SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both. - // - // AWS_INSTANCE_PORT - // - // If the service includes an SRV record, the value that you want Route 53 to - // return for the port. - // - // If the service includes HealthCheckConfig - Attributes map[string]*string `type:"map"` - - // A unique string that identifies the request and that allows failed RegisterInstance - // requests to be retried without the risk of executing the operation twice. - // You must use a unique CreatorRequestId string every time you submit a RegisterInstance - // request if you're registering additional instances for the same namespace - // and service. CreatorRequestId can be any unique string, for example, a date/time - // stamp. - CreatorRequestId *string `type:"string"` - - // An identifier that you want to associate with the instance. Note the following: - // - // * If the service that is specified by ServiceId includes settings for - // an SRV record, the value of InstanceId is automatically included as part - // of the value for the SRV record. For more information, see DnsRecord$Type. - // - // * You can use this value to update an existing instance. - // - // * To register a new instance, you must specify a value that is unique - // among instances that you register by using the same service. - // - // * If you specify an existing InstanceId and ServiceId, AWS Cloud Map updates - // the existing DNS records. If there's also an existing health check, AWS - // Cloud Map deletes the old health check and creates a new one. - // - // The health check isn't deleted immediately, so it will still appear for a - // while if you submit a ListHealthChecks request, for example. - // - // Id is a required field - Id *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Instance) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Instance) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *Instance) SetAttributes(v map[string]*string) *Instance { - s.Attributes = v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *Instance) SetCreatorRequestId(v string) *Instance { - s.CreatorRequestId = &v - return s -} - -// SetId sets the Id field's value. -func (s *Instance) SetId(v string) *Instance { - s.Id = &v - return s -} - -// A complex type that contains information about the instances that you registered -// by using a specified service. -type InstanceSummary struct { - _ struct{} `type:"structure"` - - // A string map that contains the following information: - // - // * The attributes that are associate with the instance. - // - // * For each attribute, the applicable value. - // - // Supported attribute keys include the following: - // - // * AWS_ALIAS_DNS_NAME: For an alias record that routes traffic to an Elastic - // Load Balancing load balancer, the DNS name that is associated with the - // load balancer. - // - // * AWS_INSTANCE_CNAME: For a CNAME record, the domain name that Route 53 - // returns in response to DNS queries, for example, example.com. - // - // * AWS_INSTANCE_IPV4: For an A record, the IPv4 address that Route 53 returns - // in response to DNS queries, for example, 192.0.2.44. - // - // * AWS_INSTANCE_IPV6: For an AAAA record, the IPv6 address that Route 53 - // returns in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345. - // - // * AWS_INSTANCE_PORT: For an SRV record, the value that Route 53 returns - // for the port. In addition, if the service includes HealthCheckConfig, - // the port on the endpoint that Route 53 sends requests to. - Attributes map[string]*string `type:"map"` - - // The ID for an instance that you created by using a specified service. - Id *string `type:"string"` -} - -// String returns the string representation -func (s InstanceSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceSummary) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *InstanceSummary) SetAttributes(v map[string]*string) *InstanceSummary { - s.Attributes = v - return s -} - -// SetId sets the Id field's value. -func (s *InstanceSummary) SetId(v string) *InstanceSummary { - s.Id = &v - return s -} - -type ListInstancesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of instances that you want AWS Cloud Map to return in - // the response to a ListInstances request. If you don't specify a value for - // MaxResults, AWS Cloud Map returns up to 100 instances. - MaxResults *int64 `min:"1" type:"integer"` - - // For the first ListInstances request, omit this value. - // - // If more than MaxResults instances match the specified criteria, you can submit - // another ListInstances request to get the next group of results. Specify the - // value of NextToken from the previous response in the next request. - NextToken *string `type:"string"` - - // The ID of the service that you want to list instances for. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListInstancesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInstancesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInstancesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListInstancesInput) SetMaxResults(v int64) *ListInstancesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListInstancesInput) SetNextToken(v string) *ListInstancesInput { - s.NextToken = &v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *ListInstancesInput) SetServiceId(v string) *ListInstancesInput { - s.ServiceId = &v - return s -} - -type ListInstancesOutput struct { - _ struct{} `type:"structure"` - - // Summary information about the instances that are associated with the specified - // service. - Instances []*InstanceSummary `type:"list"` - - // If more than MaxResults instances match the specified criteria, you can submit - // another ListInstances request to get the next group of results. Specify the - // value of NextToken from the previous response in the next request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListInstancesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInstancesOutput) GoString() string { - return s.String() -} - -// SetInstances sets the Instances field's value. -func (s *ListInstancesOutput) SetInstances(v []*InstanceSummary) *ListInstancesOutput { - s.Instances = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListInstancesOutput) SetNextToken(v string) *ListInstancesOutput { - s.NextToken = &v - return s -} - -type ListNamespacesInput struct { - _ struct{} `type:"structure"` - - // A complex type that contains specifications for the namespaces that you want - // to list. - // - // If you specify more than one filter, a namespace must match all filters to - // be returned by ListNamespaces. - Filters []*NamespaceFilter `type:"list"` - - // The maximum number of namespaces that you want AWS Cloud Map to return in - // the response to a ListNamespaces request. If you don't specify a value for - // MaxResults, AWS Cloud Map returns up to 100 namespaces. - MaxResults *int64 `min:"1" type:"integer"` - - // For the first ListNamespaces request, omit this value. - // - // If the response contains NextToken, submit another ListNamespaces request - // to get the next group of results. Specify the value of NextToken from the - // previous response in the next request. - // - // AWS Cloud Map gets MaxResults namespaces and then filters them based on the - // specified criteria. It's possible that no namespaces in the first MaxResults - // namespaces matched the specified criteria but that subsequent groups of MaxResults - // namespaces do contain namespaces that match the criteria. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListNamespacesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListNamespacesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListNamespacesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListNamespacesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListNamespacesInput) SetFilters(v []*NamespaceFilter) *ListNamespacesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListNamespacesInput) SetMaxResults(v int64) *ListNamespacesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListNamespacesInput) SetNextToken(v string) *ListNamespacesInput { - s.NextToken = &v - return s -} - -type ListNamespacesOutput struct { - _ struct{} `type:"structure"` - - // An array that contains one NamespaceSummary object for each namespace that - // matches the specified filter criteria. - Namespaces []*NamespaceSummary `type:"list"` - - // If the response contains NextToken, submit another ListNamespaces request - // to get the next group of results. Specify the value of NextToken from the - // previous response in the next request. - // - // AWS Cloud Map gets MaxResults namespaces and then filters them based on the - // specified criteria. It's possible that no namespaces in the first MaxResults - // namespaces matched the specified criteria but that subsequent groups of MaxResults - // namespaces do contain namespaces that match the criteria. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListNamespacesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListNamespacesOutput) GoString() string { - return s.String() -} - -// SetNamespaces sets the Namespaces field's value. -func (s *ListNamespacesOutput) SetNamespaces(v []*NamespaceSummary) *ListNamespacesOutput { - s.Namespaces = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListNamespacesOutput) SetNextToken(v string) *ListNamespacesOutput { - s.NextToken = &v - return s -} - -type ListOperationsInput struct { - _ struct{} `type:"structure"` - - // A complex type that contains specifications for the operations that you want - // to list, for example, operations that you started between a specified start - // date and end date. - // - // If you specify more than one filter, an operation must match all filters - // to be returned by ListOperations. - Filters []*OperationFilter `type:"list"` - - // The maximum number of items that you want AWS Cloud Map to return in the - // response to a ListOperations request. If you don't specify a value for MaxResults, - // AWS Cloud Map returns up to 100 operations. - MaxResults *int64 `min:"1" type:"integer"` - - // For the first ListOperations request, omit this value. - // - // If the response contains NextToken, submit another ListOperations request - // to get the next group of results. Specify the value of NextToken from the - // previous response in the next request. - // - // AWS Cloud Map gets MaxResults operations and then filters them based on the - // specified criteria. It's possible that no operations in the first MaxResults - // operations matched the specified criteria but that subsequent groups of MaxResults - // operations do contain operations that match the criteria. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListOperationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOperationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListOperationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOperationsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListOperationsInput) SetFilters(v []*OperationFilter) *ListOperationsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListOperationsInput) SetMaxResults(v int64) *ListOperationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOperationsInput) SetNextToken(v string) *ListOperationsInput { - s.NextToken = &v - return s -} - -type ListOperationsOutput struct { - _ struct{} `type:"structure"` - - // If the response contains NextToken, submit another ListOperations request - // to get the next group of results. Specify the value of NextToken from the - // previous response in the next request. - // - // AWS Cloud Map gets MaxResults operations and then filters them based on the - // specified criteria. It's possible that no operations in the first MaxResults - // operations matched the specified criteria but that subsequent groups of MaxResults - // operations do contain operations that match the criteria. - NextToken *string `type:"string"` - - // Summary information about the operations that match the specified criteria. - Operations []*OperationSummary `type:"list"` -} - -// String returns the string representation -func (s ListOperationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOperationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListOperationsOutput) SetNextToken(v string) *ListOperationsOutput { - s.NextToken = &v - return s -} - -// SetOperations sets the Operations field's value. -func (s *ListOperationsOutput) SetOperations(v []*OperationSummary) *ListOperationsOutput { - s.Operations = v - return s -} - -type ListServicesInput struct { - _ struct{} `type:"structure"` - - // A complex type that contains specifications for the namespaces that you want - // to list services for. - // - // If you specify more than one filter, an operation must match all filters - // to be returned by ListServices. - Filters []*ServiceFilter `type:"list"` - - // The maximum number of services that you want AWS Cloud Map to return in the - // response to a ListServices request. If you don't specify a value for MaxResults, - // AWS Cloud Map returns up to 100 services. - MaxResults *int64 `min:"1" type:"integer"` - - // For the first ListServices request, omit this value. - // - // If the response contains NextToken, submit another ListServices request to - // get the next group of results. Specify the value of NextToken from the previous - // response in the next request. - // - // AWS Cloud Map gets MaxResults services and then filters them based on the - // specified criteria. It's possible that no services in the first MaxResults - // services matched the specified criteria but that subsequent groups of MaxResults - // services do contain services that match the criteria. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListServicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListServicesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListServicesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListServicesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListServicesInput) SetFilters(v []*ServiceFilter) *ListServicesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListServicesInput) SetMaxResults(v int64) *ListServicesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListServicesInput) SetNextToken(v string) *ListServicesInput { - s.NextToken = &v - return s -} - -type ListServicesOutput struct { - _ struct{} `type:"structure"` - - // If the response contains NextToken, submit another ListServices request to - // get the next group of results. Specify the value of NextToken from the previous - // response in the next request. - // - // AWS Cloud Map gets MaxResults services and then filters them based on the - // specified criteria. It's possible that no services in the first MaxResults - // services matched the specified criteria but that subsequent groups of MaxResults - // services do contain services that match the criteria. - NextToken *string `type:"string"` - - // An array that contains one ServiceSummary object for each service that matches - // the specified filter criteria. - Services []*ServiceSummary `type:"list"` -} - -// String returns the string representation -func (s ListServicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListServicesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListServicesOutput) SetNextToken(v string) *ListServicesOutput { - s.NextToken = &v - return s -} - -// SetServices sets the Services field's value. -func (s *ListServicesOutput) SetServices(v []*ServiceSummary) *ListServicesOutput { - s.Services = v - return s -} - -// A complex type that contains information about a specified namespace. -type Namespace struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the namespace - // when you create it. - Arn *string `type:"string"` - - // The date that the namespace was created, in Unix date/time format and Coordinated - // Universal Time (UTC). The value of CreateDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreateDate *time.Time `type:"timestamp"` - - // A unique string that identifies the request and that allows failed requests - // to be retried without the risk of executing an operation twice. - CreatorRequestId *string `type:"string"` - - // The description that you specify for the namespace when you create it. - Description *string `type:"string"` - - // The ID of a namespace. - Id *string `type:"string"` - - // The name of the namespace, such as example.com. - Name *string `type:"string"` - - // A complex type that contains information that's specific to the type of the - // namespace. - Properties *NamespaceProperties `type:"structure"` - - // The number of services that are associated with the namespace. - ServiceCount *int64 `type:"integer"` - - // The type of the namespace. Valid values are DNS_PUBLIC and DNS_PRIVATE. - Type *string `type:"string" enum:"NamespaceType"` -} - -// String returns the string representation -func (s Namespace) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Namespace) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Namespace) SetArn(v string) *Namespace { - s.Arn = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *Namespace) SetCreateDate(v time.Time) *Namespace { - s.CreateDate = &v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *Namespace) SetCreatorRequestId(v string) *Namespace { - s.CreatorRequestId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Namespace) SetDescription(v string) *Namespace { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *Namespace) SetId(v string) *Namespace { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *Namespace) SetName(v string) *Namespace { - s.Name = &v - return s -} - -// SetProperties sets the Properties field's value. -func (s *Namespace) SetProperties(v *NamespaceProperties) *Namespace { - s.Properties = v - return s -} - -// SetServiceCount sets the ServiceCount field's value. -func (s *Namespace) SetServiceCount(v int64) *Namespace { - s.ServiceCount = &v - return s -} - -// SetType sets the Type field's value. -func (s *Namespace) SetType(v string) *Namespace { - s.Type = &v - return s -} - -// A complex type that identifies the namespaces that you want to list. You -// can choose to list public or private namespaces. -type NamespaceFilter struct { - _ struct{} `type:"structure"` - - // The operator that you want to use to determine whether ListNamespaces returns - // a namespace. Valid values for condition include: - // - // * EQ: When you specify EQ for the condition, you can choose to list only - // public namespaces or private namespaces, but not both. EQ is the default - // condition and can be omitted. - // - // * IN: When you specify IN for the condition, you can choose to list public - // namespaces, private namespaces, or both. - // - // * BETWEEN: Not applicable - Condition *string `type:"string" enum:"FilterCondition"` - - // Specify TYPE. - // - // Name is a required field - Name *string `type:"string" required:"true" enum:"NamespaceFilterName"` - - // If you specify EQ for Condition, specify either DNS_PUBLIC or DNS_PRIVATE. - // - // If you specify IN for Condition, you can specify DNS_PUBLIC, DNS_PRIVATE, - // or both. - // - // Values is a required field - Values []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s NamespaceFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NamespaceFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NamespaceFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NamespaceFilter"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCondition sets the Condition field's value. -func (s *NamespaceFilter) SetCondition(v string) *NamespaceFilter { - s.Condition = &v - return s -} - -// SetName sets the Name field's value. -func (s *NamespaceFilter) SetName(v string) *NamespaceFilter { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *NamespaceFilter) SetValues(v []*string) *NamespaceFilter { - s.Values = v - return s -} - -// A complex type that contains information that is specific to the namespace -// type. -type NamespaceProperties struct { - _ struct{} `type:"structure"` - - // A complex type that contains the ID for the Route 53 hosted zone that AWS - // Cloud Map creates when you create a namespace. - DnsProperties *DnsProperties `type:"structure"` - - // A complex type that contains the name of an HTTP namespace. - HttpProperties *HttpProperties `type:"structure"` -} - -// String returns the string representation -func (s NamespaceProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NamespaceProperties) GoString() string { - return s.String() -} - -// SetDnsProperties sets the DnsProperties field's value. -func (s *NamespaceProperties) SetDnsProperties(v *DnsProperties) *NamespaceProperties { - s.DnsProperties = v - return s -} - -// SetHttpProperties sets the HttpProperties field's value. -func (s *NamespaceProperties) SetHttpProperties(v *HttpProperties) *NamespaceProperties { - s.HttpProperties = v - return s -} - -// A complex type that contains information about a namespace. -type NamespaceSummary struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the namespace - // when you create it. - Arn *string `type:"string"` - - // The date and time that the namespace was created. - CreateDate *time.Time `type:"timestamp"` - - // A description for the namespace. - Description *string `type:"string"` - - // The ID of the namespace. - Id *string `type:"string"` - - // The name of the namespace. When you create a namespace, AWS Cloud Map automatically - // creates a Route 53 hosted zone that has the same name as the namespace. - Name *string `type:"string"` - - // A complex type that contains information that is specific to the namespace - // type. - Properties *NamespaceProperties `type:"structure"` - - // The number of services that were created using the namespace. - ServiceCount *int64 `type:"integer"` - - // The type of the namespace, either public or private. - Type *string `type:"string" enum:"NamespaceType"` -} - -// String returns the string representation -func (s NamespaceSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NamespaceSummary) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *NamespaceSummary) SetArn(v string) *NamespaceSummary { - s.Arn = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *NamespaceSummary) SetCreateDate(v time.Time) *NamespaceSummary { - s.CreateDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *NamespaceSummary) SetDescription(v string) *NamespaceSummary { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *NamespaceSummary) SetId(v string) *NamespaceSummary { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *NamespaceSummary) SetName(v string) *NamespaceSummary { - s.Name = &v - return s -} - -// SetProperties sets the Properties field's value. -func (s *NamespaceSummary) SetProperties(v *NamespaceProperties) *NamespaceSummary { - s.Properties = v - return s -} - -// SetServiceCount sets the ServiceCount field's value. -func (s *NamespaceSummary) SetServiceCount(v int64) *NamespaceSummary { - s.ServiceCount = &v - return s -} - -// SetType sets the Type field's value. -func (s *NamespaceSummary) SetType(v string) *NamespaceSummary { - s.Type = &v - return s -} - -// A complex type that contains information about a specified operation. -type Operation struct { - _ struct{} `type:"structure"` - - // The date and time that the request was submitted, in Unix date/time format - // and Coordinated Universal Time (UTC). The value of CreateDate is accurate - // to milliseconds. For example, the value 1516925490.087 represents Friday, - // January 26, 2018 12:11:30.087 AM. - CreateDate *time.Time `type:"timestamp"` - - // The code associated with ErrorMessage. Values for ErrorCode include the following: - // - // * ACCESS_DENIED - // - // * CANNOT_CREATE_HOSTED_ZONE - // - // * EXPIRED_TOKEN - // - // * HOSTED_ZONE_NOT_FOUND - // - // * INTERNAL_FAILURE - // - // * INVALID_CHANGE_BATCH - // - // * THROTTLED_REQUEST - ErrorCode *string `type:"string"` - - // If the value of Status is FAIL, the reason that the operation failed. - ErrorMessage *string `type:"string"` - - // The ID of the operation that you want to get information about. - Id *string `type:"string"` - - // The status of the operation. Values include the following: - // - // * SUBMITTED: This is the initial state immediately after you submit a - // request. - // - // * PENDING: AWS Cloud Map is performing the operation. - // - // * SUCCESS: The operation succeeded. - // - // * FAIL: The operation failed. For the failure reason, see ErrorMessage. - Status *string `type:"string" enum:"OperationStatus"` - - // The name of the target entity that is associated with the operation: - // - // * NAMESPACE: The namespace ID is returned in the ResourceId property. - // - // * SERVICE: The service ID is returned in the ResourceId property. - // - // * INSTANCE: The instance ID is returned in the ResourceId property. - Targets map[string]*string `type:"map"` - - // The name of the operation that is associated with the specified ID. - Type *string `type:"string" enum:"OperationType"` - - // The date and time that the value of Status changed to the current value, - // in Unix date/time format and Coordinated Universal Time (UTC). The value - // of UpdateDate is accurate to milliseconds. For example, the value 1516925490.087 - // represents Friday, January 26, 2018 12:11:30.087 AM. - UpdateDate *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s Operation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Operation) GoString() string { - return s.String() -} - -// SetCreateDate sets the CreateDate field's value. -func (s *Operation) SetCreateDate(v time.Time) *Operation { - s.CreateDate = &v - return s -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *Operation) SetErrorCode(v string) *Operation { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *Operation) SetErrorMessage(v string) *Operation { - s.ErrorMessage = &v - return s -} - -// SetId sets the Id field's value. -func (s *Operation) SetId(v string) *Operation { - s.Id = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Operation) SetStatus(v string) *Operation { - s.Status = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *Operation) SetTargets(v map[string]*string) *Operation { - s.Targets = v - return s -} - -// SetType sets the Type field's value. -func (s *Operation) SetType(v string) *Operation { - s.Type = &v - return s -} - -// SetUpdateDate sets the UpdateDate field's value. -func (s *Operation) SetUpdateDate(v time.Time) *Operation { - s.UpdateDate = &v - return s -} - -// A complex type that lets you select the operations that you want to list. -type OperationFilter struct { - _ struct{} `type:"structure"` - - // The operator that you want to use to determine whether an operation matches - // the specified value. Valid values for condition include: - // - // * EQ: When you specify EQ for the condition, you can specify only one - // value. EQ is supported for NAMESPACE_ID, SERVICE_ID, STATUS, and TYPE. - // EQ is the default condition and can be omitted. - // - // * IN: When you specify IN for the condition, you can specify a list of - // one or more values. IN is supported for STATUS and TYPE. An operation - // must match one of the specified values to be returned in the response. - // - // * BETWEEN: Specify a start date and an end date in Unix date/time format - // and Coordinated Universal Time (UTC). The start date must be the first - // value. BETWEEN is supported for UPDATE_DATE. - Condition *string `type:"string" enum:"FilterCondition"` - - // Specify the operations that you want to get: - // - // * NAMESPACE_ID: Gets operations related to specified namespaces. - // - // * SERVICE_ID: Gets operations related to specified services. - // - // * STATUS: Gets operations based on the status of the operations: SUBMITTED, - // PENDING, SUCCEED, or FAIL. - // - // * TYPE: Gets specified types of operation. - // - // * UPDATE_DATE: Gets operations that changed status during a specified - // date/time range. - // - // Name is a required field - Name *string `type:"string" required:"true" enum:"OperationFilterName"` - - // Specify values that are applicable to the value that you specify for Name: - // - // * NAMESPACE_ID: Specify one namespace ID. - // - // * SERVICE_ID: Specify one service ID. - // - // * STATUS: Specify one or more statuses: SUBMITTED, PENDING, SUCCEED, or - // FAIL. - // - // * TYPE: Specify one or more of the following types: CREATE_NAMESPACE, - // DELETE_NAMESPACE, UPDATE_SERVICE, REGISTER_INSTANCE, or DEREGISTER_INSTANCE. - // - // * UPDATE_DATE: Specify a start date and an end date in Unix date/time - // format and Coordinated Universal Time (UTC). The start date must be the - // first value. - // - // Values is a required field - Values []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s OperationFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OperationFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OperationFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OperationFilter"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCondition sets the Condition field's value. -func (s *OperationFilter) SetCondition(v string) *OperationFilter { - s.Condition = &v - return s -} - -// SetName sets the Name field's value. -func (s *OperationFilter) SetName(v string) *OperationFilter { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *OperationFilter) SetValues(v []*string) *OperationFilter { - s.Values = v - return s -} - -// A complex type that contains information about an operation that matches -// the criteria that you specified in a ListOperations request. -type OperationSummary struct { - _ struct{} `type:"structure"` - - // The ID for an operation. - Id *string `type:"string"` - - // The status of the operation. Values include the following: - // - // * SUBMITTED: This is the initial state immediately after you submit a - // request. - // - // * PENDING: AWS Cloud Map is performing the operation. - // - // * SUCCESS: The operation succeeded. - // - // * FAIL: The operation failed. For the failure reason, see ErrorMessage. - Status *string `type:"string" enum:"OperationStatus"` -} - -// String returns the string representation -func (s OperationSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OperationSummary) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *OperationSummary) SetId(v string) *OperationSummary { - s.Id = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *OperationSummary) SetStatus(v string) *OperationSummary { - s.Status = &v - return s -} - -type RegisterInstanceInput struct { - _ struct{} `type:"structure"` - - // A string map that contains the following information for the service that - // you specify in ServiceId: - // - // * The attributes that apply to the records that are defined in the service. - // - // - // * For each attribute, the applicable value. - // - // Supported attribute keys include the following: - // - // AWS_ALIAS_DNS_NAME - // - // If you want AWS Cloud Map to create an Amazon Route 53 alias record that - // routes traffic to an Elastic Load Balancing load balancer, specify the DNS - // name that is associated with the load balancer. For information about how - // to get the DNS name, see "DNSName" in the topic AliasTarget (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html)in the Route 53 API Reference. - // - // Note the following: - // - // The configuration for the service that is specified by ServiceId must include - // settings for an A record, an AAAA record, or both. - // - // * In the service that is specified by ServiceId, the value of RoutingPolicy - // must be WEIGHTED. - // - // * If the service that is specified by ServiceId includes HealthCheckConfig - // settings, AWS Cloud Map will create the Route 53 health check, but it - // won't associate the health check with the alias record. - // - // * Auto naming currently doesn't support creating alias records that route - // traffic to AWS resources other than ELB load balancers. - // - // * If you specify a value for AWS_ALIAS_DNS_NAME, don't specify values - // for any of the AWS_INSTANCE attributes. - // - // AWS_INIT_HEALTH_STATUS - // - // If the service configuration includes HealthCheckCustomConfig, you can optionally use AWS_INIT_HEALTH_STATUSto specify the initial status of the custom health check, HEALTHYor UNHEALTHY. If you don't specify a value for AWS_INIT_HEALTH_STATUS, the initial status is HEALTHY. - // - // AWS_INSTANCE_CNAME - // - // If the service configuration includes a CNAME record, the domain name that - // you want Route 53 to return in response to DNS queries, for example, example.com. - // - // This value is required if the service specified by ServiceIdincludes settings for an CNAME record. - // - // AWS_INSTANCE_IPV4 - // - // If the service configuration includes an A record, the IPv4 address that - // you want Route 53 to return in response to DNS queries, for example, 192.0.2.44. - // - // This value is required if the service specified by ServiceIdincludes settings for an A record. If the service includes settings for an - // SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both. - // - // AWS_INSTANCE_IPV6 - // - // If the service configuration includes an AAAA record, the IPv6 address that - // you want Route 53 to return in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345. - // - // This value is required if the service specified by ServiceIdincludes settings for an AAAA record. If the service includes settings for - // an SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both. - // - // AWS_INSTANCE_PORT - // - // If the service includes an SRV record, the value that you want Route 53 to - // return for the port. - // - // If the service includes HealthCheckConfig, the port on the endpoint that you want Route 53 to send requests to. - // - // This value is required if you specified settings for an SRV record when you - // created the service. - // - // Custom attributes - // - // Attributes is a required field - Attributes map[string]*string `type:"map" required:"true"` - - // A unique string that identifies the request and that allows failed RegisterInstance - // requests to be retried without the risk of executing the operation twice. - // You must use a unique CreatorRequestId string every time you submit a RegisterInstance - // request if you're registering additional instances for the same namespace - // and service. CreatorRequestId can be any unique string, for example, a date/time - // stamp. - CreatorRequestId *string `type:"string" idempotencyToken:"true"` - - // An identifier that you want to associate with the instance. Note the following: - // - // * If the service that is specified by ServiceId includes settings for - // an SRV record, the value of InstanceId is automatically included as part - // of the value for the SRV record. For more information, see DnsRecord$Type. - // - // * You can use this value to update an existing instance. - // - // * To register a new instance, you must specify a value that is unique - // among instances that you register by using the same service. - // - // * If you specify an existing InstanceId and ServiceId, AWS Cloud Map updates - // the existing DNS records, if any. If there's also an existing health check, - // AWS Cloud Map deletes the old health check and creates a new one. - // - // The health check isn't deleted immediately, so it will still appear for a - // while if you submit a ListHealthChecks request, for example. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The ID of the service that you want to use for settings for the instance. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterInstanceInput"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *RegisterInstanceInput) SetAttributes(v map[string]*string) *RegisterInstanceInput { - s.Attributes = v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *RegisterInstanceInput) SetCreatorRequestId(v string) *RegisterInstanceInput { - s.CreatorRequestId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *RegisterInstanceInput) SetInstanceId(v string) *RegisterInstanceInput { - s.InstanceId = &v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *RegisterInstanceInput) SetServiceId(v string) *RegisterInstanceInput { - s.ServiceId = &v - return s -} - -type RegisterInstanceOutput struct { - _ struct{} `type:"structure"` - - // A value that you can use to determine whether the request completed successfully. - // To get the status of the operation, see GetOperation. - OperationId *string `type:"string"` -} - -// String returns the string representation -func (s RegisterInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterInstanceOutput) GoString() string { - return s.String() -} - -// SetOperationId sets the OperationId field's value. -func (s *RegisterInstanceOutput) SetOperationId(v string) *RegisterInstanceOutput { - s.OperationId = &v - return s -} - -// A complex type that contains information about the specified service. -type Service struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the service - // when you create it. - Arn *string `type:"string"` - - // The date and time that the service was created, in Unix format and Coordinated - // Universal Time (UTC). The value of CreateDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreateDate *time.Time `type:"timestamp"` - - // A unique string that identifies the request and that allows failed requests - // to be retried without the risk of executing the operation twice. CreatorRequestId - // can be any unique string, for example, a date/time stamp. - CreatorRequestId *string `type:"string"` - - // The description of the service. - Description *string `type:"string"` - - // A complex type that contains information about the Route 53 DNS records that - // you want AWS Cloud Map to create when you register an instance. - DnsConfig *DnsConfig `type:"structure"` - - // Public DNS namespaces only. A complex type that contains settings for an - // optional health check. If you specify settings for a health check, AWS Cloud - // Map associates the health check with the records that you specify in DnsConfig. - // - // For information about the charges for health checks, see Amazon Route 53 - // Pricing (http://aws.amazon.com/route53/pricing/). - HealthCheckConfig *HealthCheckConfig `type:"structure"` - - // A complex type that contains information about an optional custom health - // check. - // - // If you specify a health check configuration, you can specify either HealthCheckCustomConfig - // or HealthCheckConfig but not both. - HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"` - - // The ID that AWS Cloud Map assigned to the service when you created it. - Id *string `type:"string"` - - // The number of instances that are currently associated with the service. Instances - // that were previously associated with the service but that have been deleted - // are not included in the count. - InstanceCount *int64 `type:"integer"` - - // The name of the service. - Name *string `type:"string"` - - // The ID of the namespace that was used to create the service. - NamespaceId *string `type:"string"` -} - -// String returns the string representation -func (s Service) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Service) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Service) SetArn(v string) *Service { - s.Arn = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *Service) SetCreateDate(v time.Time) *Service { - s.CreateDate = &v - return s -} - -// SetCreatorRequestId sets the CreatorRequestId field's value. -func (s *Service) SetCreatorRequestId(v string) *Service { - s.CreatorRequestId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Service) SetDescription(v string) *Service { - s.Description = &v - return s -} - -// SetDnsConfig sets the DnsConfig field's value. -func (s *Service) SetDnsConfig(v *DnsConfig) *Service { - s.DnsConfig = v - return s -} - -// SetHealthCheckConfig sets the HealthCheckConfig field's value. -func (s *Service) SetHealthCheckConfig(v *HealthCheckConfig) *Service { - s.HealthCheckConfig = v - return s -} - -// SetHealthCheckCustomConfig sets the HealthCheckCustomConfig field's value. -func (s *Service) SetHealthCheckCustomConfig(v *HealthCheckCustomConfig) *Service { - s.HealthCheckCustomConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *Service) SetId(v string) *Service { - s.Id = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *Service) SetInstanceCount(v int64) *Service { - s.InstanceCount = &v - return s -} - -// SetName sets the Name field's value. -func (s *Service) SetName(v string) *Service { - s.Name = &v - return s -} - -// SetNamespaceId sets the NamespaceId field's value. -func (s *Service) SetNamespaceId(v string) *Service { - s.NamespaceId = &v - return s -} - -// A complex type that contains changes to an existing service. -type ServiceChange struct { - _ struct{} `type:"structure"` - - // A description for the service. - Description *string `type:"string"` - - // A complex type that contains information about the Route 53 DNS records that - // you want AWS Cloud Map to create when you register an instance. - // - // DnsConfig is a required field - DnsConfig *DnsConfigChange `type:"structure" required:"true"` - - // Public DNS namespaces only. A complex type that contains settings for an - // optional health check. If you specify settings for a health check, AWS Cloud - // Map associates the health check with the records that you specify in DnsConfig. - // - // If you specify a health check configuration, you can specify either HealthCheckCustomConfig - // or HealthCheckConfig but not both. - // - // Health checks are basic Route 53 health checks that monitor an AWS endpoint. - // For information about pricing for health checks, see Amazon Route 53 Pricing - // (http://aws.amazon.com/route53/pricing/). - // - // Note the following about configuring health checks. - // - // A and AAAA records - // - // If DnsConfig includes configurations for both A and AAAA records, AWS Cloud - // Map creates a health check that uses the IPv4 address to check the health - // of the resource. If the endpoint that is specified by the IPv4 address is - // unhealthy, Route 53 considers both the A and AAAA records to be unhealthy. - // - // CNAME records - // - // You can't specify settings for HealthCheckConfig when the DNSConfig includes - // CNAME for the value of Type. If you do, the CreateService request will fail - // with an InvalidInput error. - // - // Request interval - // - // A Route 53 health checker in each health-checking region sends a health check - // request to an endpoint every 30 seconds. On average, your endpoint receives - // a health check request about every two seconds. However, health checkers - // don't coordinate with one another, so you'll sometimes see several requests - // per second followed by a few seconds with no health checks at all. - // - // Health checking regions - // - // Health checkers perform checks from all Route 53 health-checking regions. - // For a list of the current regions, see Regions (http://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). - // - // Alias records - // - // When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute, - // AWS Cloud Map creates a Route 53 alias record. Note the following: - // - // * Route 53 automatically sets EvaluateTargetHealth to true for alias records. - // When EvaluateTargetHealth is true, the alias record inherits the health - // of the referenced AWS resource. such as an ELB load balancer. For more - // information, see EvaluateTargetHealth (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). - // - // * If you include HealthCheckConfig and then use the service to register - // an instance that creates an alias record, Route 53 doesn't create the - // health check. - // - // Charges for health checks - // - // Health checks are basic Route 53 health checks that monitor an AWS endpoint. - // For information about pricing for health checks, see Amazon Route 53 Pricing - // (http://aws.amazon.com/route53/pricing/). - HealthCheckConfig *HealthCheckConfig `type:"structure"` -} - -// String returns the string representation -func (s ServiceChange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceChange) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ServiceChange) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ServiceChange"} - if s.DnsConfig == nil { - invalidParams.Add(request.NewErrParamRequired("DnsConfig")) - } - if s.DnsConfig != nil { - if err := s.DnsConfig.Validate(); err != nil { - invalidParams.AddNested("DnsConfig", err.(request.ErrInvalidParams)) - } - } - if s.HealthCheckConfig != nil { - if err := s.HealthCheckConfig.Validate(); err != nil { - invalidParams.AddNested("HealthCheckConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *ServiceChange) SetDescription(v string) *ServiceChange { - s.Description = &v - return s -} - -// SetDnsConfig sets the DnsConfig field's value. -func (s *ServiceChange) SetDnsConfig(v *DnsConfigChange) *ServiceChange { - s.DnsConfig = v - return s -} - -// SetHealthCheckConfig sets the HealthCheckConfig field's value. -func (s *ServiceChange) SetHealthCheckConfig(v *HealthCheckConfig) *ServiceChange { - s.HealthCheckConfig = v - return s -} - -// A complex type that lets you specify the namespaces that you want to list -// services for. -type ServiceFilter struct { - _ struct{} `type:"structure"` - - // The operator that you want to use to determine whether a service is returned - // by ListServices. Valid values for Condition include the following: - // - // * EQ: When you specify EQ, specify one namespace ID for Values. EQ is - // the default condition and can be omitted. - // - // * IN: When you specify IN, specify a list of the IDs for the namespaces - // that you want ListServices to return a list of services for. - // - // * BETWEEN: Not applicable. - Condition *string `type:"string" enum:"FilterCondition"` - - // Specify NAMESPACE_ID. - // - // Name is a required field - Name *string `type:"string" required:"true" enum:"ServiceFilterName"` - - // The values that are applicable to the value that you specify for Condition - // to filter the list of services. - // - // Values is a required field - Values []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s ServiceFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ServiceFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ServiceFilter"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCondition sets the Condition field's value. -func (s *ServiceFilter) SetCondition(v string) *ServiceFilter { - s.Condition = &v - return s -} - -// SetName sets the Name field's value. -func (s *ServiceFilter) SetName(v string) *ServiceFilter { - s.Name = &v - return s -} - -// SetValues sets the Values field's value. -func (s *ServiceFilter) SetValues(v []*string) *ServiceFilter { - s.Values = v - return s -} - -// A complex type that contains information about a specified service. -type ServiceSummary struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the service - // when you create it. - Arn *string `type:"string"` - - // The date and time that the service was created. - CreateDate *time.Time `type:"timestamp"` - - // The description that you specify when you create the service. - Description *string `type:"string"` - - // A complex type that contains information about the Amazon Route 53 DNS records - // that you want AWS Cloud Map to create when you register an instance. - DnsConfig *DnsConfig `type:"structure"` - - // Public DNS namespaces only. A complex type that contains settings for an - // optional health check. If you specify settings for a health check, AWS Cloud - // Map associates the health check with the records that you specify in DnsConfig. - // - // If you specify a health check configuration, you can specify either HealthCheckCustomConfig - // or HealthCheckConfig but not both. - // - // Health checks are basic Route 53 health checks that monitor an AWS endpoint. - // For information about pricing for health checks, see Amazon Route 53 Pricing - // (http://aws.amazon.com/route53/pricing/). - // - // Note the following about configuring health checks. - // - // A and AAAA records - // - // If DnsConfig includes configurations for both A and AAAA records, AWS Cloud - // Map creates a health check that uses the IPv4 address to check the health - // of the resource. If the endpoint that is specified by the IPv4 address is - // unhealthy, Route 53 considers both the A and AAAA records to be unhealthy. - // - // CNAME records - // - // You can't specify settings for HealthCheckConfig when the DNSConfig includes - // CNAME for the value of Type. If you do, the CreateService request will fail - // with an InvalidInput error. - // - // Request interval - // - // A Route 53 health checker in each health-checking region sends a health check - // request to an endpoint every 30 seconds. On average, your endpoint receives - // a health check request about every two seconds. However, health checkers - // don't coordinate with one another, so you'll sometimes see several requests - // per second followed by a few seconds with no health checks at all. - // - // Health checking regions - // - // Health checkers perform checks from all Route 53 health-checking regions. - // For a list of the current regions, see Regions (http://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). - // - // Alias records - // - // When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute, - // AWS Cloud Map creates a Route 53 alias record. Note the following: - // - // * Route 53 automatically sets EvaluateTargetHealth to true for alias records. - // When EvaluateTargetHealth is true, the alias record inherits the health - // of the referenced AWS resource. such as an ELB load balancer. For more - // information, see EvaluateTargetHealth (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). - // - // * If you include HealthCheckConfig and then use the service to register - // an instance that creates an alias record, Route 53 doesn't create the - // health check. - // - // Charges for health checks - // - // Health checks are basic Route 53 health checks that monitor an AWS endpoint. - // For information about pricing for health checks, see Amazon Route 53 Pricing - // (http://aws.amazon.com/route53/pricing/). - HealthCheckConfig *HealthCheckConfig `type:"structure"` - - // A complex type that contains information about an optional custom health - // check. A custom health check, which requires that you use a third-party health - // checker to evaluate the health of your resources, is useful in the following - // circumstances: - // - // * You can't use a health check that is defined by HealthCheckConfig because - // the resource isn't available over the internet. For example, you can use - // a custom health check when the instance is in an Amazon VPC. (To check - // the health of resources in a VPC, the health checker must also be in the - // VPC.) - // - // * You want to use a third-party health checker regardless of where your - // resources are. - // - // If you specify a health check configuration, you can specify either HealthCheckCustomConfig - // or HealthCheckConfig but not both. - // - // To change the status of a custom health check, submit an UpdateInstanceCustomHealthStatus - // request. Cloud Map doesn't monitor the status of the resource, it just keeps - // a record of the status specified in the most recent UpdateInstanceCustomHealthStatus - // request. - // - // Here's how custom health checks work: - // - // You create a service and specify a value for FailureThreshold. - // - // The failure threshold indicates the number of 30-second intervals you want - // AWS Cloud Map to wait between the time that your application sends an UpdateInstanceCustomHealthStatus - // request and the time that AWS Cloud Map stops routing internet traffic to - // the corresponding resource. - // - // You register an instance. - // - // You configure a third-party health checker to monitor the resource that is - // associated with the new instance. - // - // AWS Cloud Map doesn't check the health of the resource directly. - // - // The third-party health-checker determines that the resource is unhealthy - // and notifies your application. - // - // Your application submits an UpdateInstanceCustomHealthStatus request. - // - // AWS Cloud Map waits for (FailureThreshold x 30) seconds. - // - // If another UpdateInstanceCustomHealthStatus request doesn't arrive during - // that time to change the status back to healthy, AWS Cloud Map stops routing - // traffic to the resource. - // - // Note the following about configuring custom health checks. - HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"` - - // The ID that AWS Cloud Map assigned to the service when you created it. - Id *string `type:"string"` - - // The number of instances that are currently associated with the service. Instances - // that were previously associated with the service but that have been deleted - // are not included in the count. - InstanceCount *int64 `type:"integer"` - - // The name of the service. - Name *string `type:"string"` -} - -// String returns the string representation -func (s ServiceSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ServiceSummary) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ServiceSummary) SetArn(v string) *ServiceSummary { - s.Arn = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *ServiceSummary) SetCreateDate(v time.Time) *ServiceSummary { - s.CreateDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ServiceSummary) SetDescription(v string) *ServiceSummary { - s.Description = &v - return s -} - -// SetDnsConfig sets the DnsConfig field's value. -func (s *ServiceSummary) SetDnsConfig(v *DnsConfig) *ServiceSummary { - s.DnsConfig = v - return s -} - -// SetHealthCheckConfig sets the HealthCheckConfig field's value. -func (s *ServiceSummary) SetHealthCheckConfig(v *HealthCheckConfig) *ServiceSummary { - s.HealthCheckConfig = v - return s -} - -// SetHealthCheckCustomConfig sets the HealthCheckCustomConfig field's value. -func (s *ServiceSummary) SetHealthCheckCustomConfig(v *HealthCheckCustomConfig) *ServiceSummary { - s.HealthCheckCustomConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *ServiceSummary) SetId(v string) *ServiceSummary { - s.Id = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *ServiceSummary) SetInstanceCount(v int64) *ServiceSummary { - s.InstanceCount = &v - return s -} - -// SetName sets the Name field's value. -func (s *ServiceSummary) SetName(v string) *ServiceSummary { - s.Name = &v - return s -} - -type UpdateInstanceCustomHealthStatusInput struct { - _ struct{} `type:"structure"` - - // The ID of the instance that you want to change the health status for. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The ID of the service that includes the configuration for the custom health - // check that you want to change the status for. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` - - // The new status of the instance, HEALTHY or UNHEALTHY. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"CustomHealthStatus"` -} - -// String returns the string representation -func (s UpdateInstanceCustomHealthStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateInstanceCustomHealthStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateInstanceCustomHealthStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateInstanceCustomHealthStatusInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *UpdateInstanceCustomHealthStatusInput) SetInstanceId(v string) *UpdateInstanceCustomHealthStatusInput { - s.InstanceId = &v - return s -} - -// SetServiceId sets the ServiceId field's value. -func (s *UpdateInstanceCustomHealthStatusInput) SetServiceId(v string) *UpdateInstanceCustomHealthStatusInput { - s.ServiceId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateInstanceCustomHealthStatusInput) SetStatus(v string) *UpdateInstanceCustomHealthStatusInput { - s.Status = &v - return s -} - -type UpdateInstanceCustomHealthStatusOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateInstanceCustomHealthStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateInstanceCustomHealthStatusOutput) GoString() string { - return s.String() -} - -type UpdateServiceInput struct { - _ struct{} `type:"structure"` - - // The ID of the service that you want to update. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // A complex type that contains the new settings for the service. - // - // Service is a required field - Service *ServiceChange `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateServiceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateServiceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateServiceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateServiceInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Service == nil { - invalidParams.Add(request.NewErrParamRequired("Service")) - } - if s.Service != nil { - if err := s.Service.Validate(); err != nil { - invalidParams.AddNested("Service", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *UpdateServiceInput) SetId(v string) *UpdateServiceInput { - s.Id = &v - return s -} - -// SetService sets the Service field's value. -func (s *UpdateServiceInput) SetService(v *ServiceChange) *UpdateServiceInput { - s.Service = v - return s -} - -type UpdateServiceOutput struct { - _ struct{} `type:"structure"` - - // A value that you can use to determine whether the request completed successfully. - // To get the status of the operation, see GetOperation. - OperationId *string `type:"string"` -} - -// String returns the string representation -func (s UpdateServiceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateServiceOutput) GoString() string { - return s.String() -} - -// SetOperationId sets the OperationId field's value. -func (s *UpdateServiceOutput) SetOperationId(v string) *UpdateServiceOutput { - s.OperationId = &v - return s -} - -const ( - // CustomHealthStatusHealthy is a CustomHealthStatus enum value - CustomHealthStatusHealthy = "HEALTHY" - - // CustomHealthStatusUnhealthy is a CustomHealthStatus enum value - CustomHealthStatusUnhealthy = "UNHEALTHY" -) - -const ( - // FilterConditionEq is a FilterCondition enum value - FilterConditionEq = "EQ" - - // FilterConditionIn is a FilterCondition enum value - FilterConditionIn = "IN" - - // FilterConditionBetween is a FilterCondition enum value - FilterConditionBetween = "BETWEEN" -) - -const ( - // HealthCheckTypeHttp is a HealthCheckType enum value - HealthCheckTypeHttp = "HTTP" - - // HealthCheckTypeHttps is a HealthCheckType enum value - HealthCheckTypeHttps = "HTTPS" - - // HealthCheckTypeTcp is a HealthCheckType enum value - HealthCheckTypeTcp = "TCP" -) - -const ( - // HealthStatusHealthy is a HealthStatus enum value - HealthStatusHealthy = "HEALTHY" - - // HealthStatusUnhealthy is a HealthStatus enum value - HealthStatusUnhealthy = "UNHEALTHY" - - // HealthStatusUnknown is a HealthStatus enum value - HealthStatusUnknown = "UNKNOWN" -) - -const ( - // HealthStatusFilterHealthy is a HealthStatusFilter enum value - HealthStatusFilterHealthy = "HEALTHY" - - // HealthStatusFilterUnhealthy is a HealthStatusFilter enum value - HealthStatusFilterUnhealthy = "UNHEALTHY" - - // HealthStatusFilterAll is a HealthStatusFilter enum value - HealthStatusFilterAll = "ALL" -) - -const ( - // NamespaceFilterNameType is a NamespaceFilterName enum value - NamespaceFilterNameType = "TYPE" -) - -const ( - // NamespaceTypeDnsPublic is a NamespaceType enum value - NamespaceTypeDnsPublic = "DNS_PUBLIC" - - // NamespaceTypeDnsPrivate is a NamespaceType enum value - NamespaceTypeDnsPrivate = "DNS_PRIVATE" - - // NamespaceTypeHttp is a NamespaceType enum value - NamespaceTypeHttp = "HTTP" -) - -const ( - // OperationFilterNameNamespaceId is a OperationFilterName enum value - OperationFilterNameNamespaceId = "NAMESPACE_ID" - - // OperationFilterNameServiceId is a OperationFilterName enum value - OperationFilterNameServiceId = "SERVICE_ID" - - // OperationFilterNameStatus is a OperationFilterName enum value - OperationFilterNameStatus = "STATUS" - - // OperationFilterNameType is a OperationFilterName enum value - OperationFilterNameType = "TYPE" - - // OperationFilterNameUpdateDate is a OperationFilterName enum value - OperationFilterNameUpdateDate = "UPDATE_DATE" -) - -const ( - // OperationStatusSubmitted is a OperationStatus enum value - OperationStatusSubmitted = "SUBMITTED" - - // OperationStatusPending is a OperationStatus enum value - OperationStatusPending = "PENDING" - - // OperationStatusSuccess is a OperationStatus enum value - OperationStatusSuccess = "SUCCESS" - - // OperationStatusFail is a OperationStatus enum value - OperationStatusFail = "FAIL" -) - -const ( - // OperationTargetTypeNamespace is a OperationTargetType enum value - OperationTargetTypeNamespace = "NAMESPACE" - - // OperationTargetTypeService is a OperationTargetType enum value - OperationTargetTypeService = "SERVICE" - - // OperationTargetTypeInstance is a OperationTargetType enum value - OperationTargetTypeInstance = "INSTANCE" -) - -const ( - // OperationTypeCreateNamespace is a OperationType enum value - OperationTypeCreateNamespace = "CREATE_NAMESPACE" - - // OperationTypeDeleteNamespace is a OperationType enum value - OperationTypeDeleteNamespace = "DELETE_NAMESPACE" - - // OperationTypeUpdateService is a OperationType enum value - OperationTypeUpdateService = "UPDATE_SERVICE" - - // OperationTypeRegisterInstance is a OperationType enum value - OperationTypeRegisterInstance = "REGISTER_INSTANCE" - - // OperationTypeDeregisterInstance is a OperationType enum value - OperationTypeDeregisterInstance = "DEREGISTER_INSTANCE" -) - -const ( - // RecordTypeSrv is a RecordType enum value - RecordTypeSrv = "SRV" - - // RecordTypeA is a RecordType enum value - RecordTypeA = "A" - - // RecordTypeAaaa is a RecordType enum value - RecordTypeAaaa = "AAAA" - - // RecordTypeCname is a RecordType enum value - RecordTypeCname = "CNAME" -) - -const ( - // RoutingPolicyMultivalue is a RoutingPolicy enum value - RoutingPolicyMultivalue = "MULTIVALUE" - - // RoutingPolicyWeighted is a RoutingPolicy enum value - RoutingPolicyWeighted = "WEIGHTED" -) - -const ( - // ServiceFilterNameNamespaceId is a ServiceFilterName enum value - ServiceFilterNameNamespaceId = "NAMESPACE_ID" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/doc.go b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/doc.go deleted file mode 100644 index 9ada164cf..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/doc.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package servicediscovery provides the client and types for making API -// requests to AWS Cloud Map. -// -// AWS Cloud Map lets you configure public DNS, private DNS, or HTTP namespaces -// that your microservice applications run in. When an instance of the service -// becomes available, you can call the AWS Cloud Map API to register the instance -// with AWS Cloud Map. For public or private DNS namespaces, AWS Cloud Map automatically -// creates DNS records and an optional health check. Clients that submit public -// or private DNS queries, or HTTP requests, for the service receive an answer -// that contains up to eight healthy records. -// -// See https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14 for more information on this service. -// -// See servicediscovery package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/servicediscovery/ -// -// Using the Client -// -// To contact AWS Cloud Map 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 Cloud Map client ServiceDiscovery for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/servicediscovery/#New -package servicediscovery diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/errors.go b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/errors.go deleted file mode 100644 index 0238a42ba..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/errors.go +++ /dev/null @@ -1,79 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package servicediscovery - -const ( - - // ErrCodeCustomHealthNotFound for service response error code - // "CustomHealthNotFound". - // - // The health check for the instance that is specified by ServiceId and InstanceId - // is not a custom health check. - ErrCodeCustomHealthNotFound = "CustomHealthNotFound" - - // ErrCodeDuplicateRequest for service response error code - // "DuplicateRequest". - // - // The operation is already in progress. - ErrCodeDuplicateRequest = "DuplicateRequest" - - // ErrCodeInstanceNotFound for service response error code - // "InstanceNotFound". - // - // No instance exists with the specified ID, or the instance was recently registered, - // and information about the instance hasn't propagated yet. - ErrCodeInstanceNotFound = "InstanceNotFound" - - // ErrCodeInvalidInput for service response error code - // "InvalidInput". - // - // One or more specified values aren't valid. For example, a required value - // might be missing, a numeric value might be outside the allowed range, or - // a string value might exceed length constraints. - ErrCodeInvalidInput = "InvalidInput" - - // ErrCodeNamespaceAlreadyExists for service response error code - // "NamespaceAlreadyExists". - // - // The namespace that you're trying to create already exists. - ErrCodeNamespaceAlreadyExists = "NamespaceAlreadyExists" - - // ErrCodeNamespaceNotFound for service response error code - // "NamespaceNotFound". - // - // No namespace exists with the specified ID. - ErrCodeNamespaceNotFound = "NamespaceNotFound" - - // ErrCodeOperationNotFound for service response error code - // "OperationNotFound". - // - // No operation exists with the specified ID. - ErrCodeOperationNotFound = "OperationNotFound" - - // ErrCodeResourceInUse for service response error code - // "ResourceInUse". - // - // The specified resource can't be deleted because it contains other resources. - // For example, you can't delete a service that contains any instances. - ErrCodeResourceInUse = "ResourceInUse" - - // ErrCodeResourceLimitExceeded for service response error code - // "ResourceLimitExceeded". - // - // The resource can't be created because you've reached the limit on the number - // of resources. - ErrCodeResourceLimitExceeded = "ResourceLimitExceeded" - - // ErrCodeServiceAlreadyExists for service response error code - // "ServiceAlreadyExists". - // - // The service can't be created because a service with the same name already - // exists. - ErrCodeServiceAlreadyExists = "ServiceAlreadyExists" - - // ErrCodeServiceNotFound for service response error code - // "ServiceNotFound". - // - // No service exists with the specified ID. - ErrCodeServiceNotFound = "ServiceNotFound" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go deleted file mode 100644 index 3463e12c2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package servicediscovery - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// ServiceDiscovery provides the API operation methods for making requests to -// AWS Cloud Map. See this package's package overview docs -// for details on the service. -// -// ServiceDiscovery methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ServiceDiscovery 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 = "servicediscovery" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "ServiceDiscovery" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the ServiceDiscovery client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a ServiceDiscovery client from just a session. -// svc := servicediscovery.New(mySession) -// -// // Create a ServiceDiscovery client with additional configuration -// svc := servicediscovery.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ServiceDiscovery { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ServiceDiscovery { - svc := &ServiceDiscovery{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2017-03-14", - JSONVersion: "1.1", - TargetPrefix: "Route53AutoNaming_v20170314", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ServiceDiscovery operation and runs any -// custom request initialization. -func (c *ServiceDiscovery) 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/ses/api.go b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go deleted file mode 100644 index 691f57e58..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go +++ /dev/null @@ -1,15146 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ses - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/query" -) - -const opCloneReceiptRuleSet = "CloneReceiptRuleSet" - -// CloneReceiptRuleSetRequest generates a "aws/request.Request" representing the -// client's request for the CloneReceiptRuleSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CloneReceiptRuleSet for more information on using the CloneReceiptRuleSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CloneReceiptRuleSetRequest method. -// req, resp := client.CloneReceiptRuleSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CloneReceiptRuleSet -func (c *SES) CloneReceiptRuleSetRequest(input *CloneReceiptRuleSetInput) (req *request.Request, output *CloneReceiptRuleSetOutput) { - op := &request.Operation{ - Name: opCloneReceiptRuleSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CloneReceiptRuleSetInput{} - } - - output = &CloneReceiptRuleSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CloneReceiptRuleSet API operation for Amazon Simple Email Service. -// -// Creates a receipt rule set by cloning an existing one. All receipt rules -// and configurations are copied to the new receipt rule set and are completely -// independent of the source rule set. -// -// For information about setting up rule sets, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rule-set.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation CloneReceiptRuleSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRuleSetDoesNotExistException "RuleSetDoesNotExist" -// Indicates that the provided receipt rule set does not exist. -// -// * ErrCodeAlreadyExistsException "AlreadyExists" -// Indicates that a resource could not be created because of a naming conflict. -// -// * ErrCodeLimitExceededException "LimitExceeded" -// Indicates that a resource could not be created because of service limits. -// For a list of Amazon SES limits, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CloneReceiptRuleSet -func (c *SES) CloneReceiptRuleSet(input *CloneReceiptRuleSetInput) (*CloneReceiptRuleSetOutput, error) { - req, out := c.CloneReceiptRuleSetRequest(input) - return out, req.Send() -} - -// CloneReceiptRuleSetWithContext is the same as CloneReceiptRuleSet with the addition of -// the ability to pass a context and additional request options. -// -// See CloneReceiptRuleSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) CloneReceiptRuleSetWithContext(ctx aws.Context, input *CloneReceiptRuleSetInput, opts ...request.Option) (*CloneReceiptRuleSetOutput, error) { - req, out := c.CloneReceiptRuleSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateConfigurationSet = "CreateConfigurationSet" - -// CreateConfigurationSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateConfigurationSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateConfigurationSet for more information on using the CreateConfigurationSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateConfigurationSetRequest method. -// req, resp := client.CreateConfigurationSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateConfigurationSet -func (c *SES) CreateConfigurationSetRequest(input *CreateConfigurationSetInput) (req *request.Request, output *CreateConfigurationSetOutput) { - op := &request.Operation{ - Name: opCreateConfigurationSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateConfigurationSetInput{} - } - - output = &CreateConfigurationSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateConfigurationSet API operation for Amazon Simple Email Service. -// -// Creates a configuration set. -// -// Configuration sets enable you to publish email sending events. For information -// about using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation CreateConfigurationSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConfigurationSetAlreadyExistsException "ConfigurationSetAlreadyExists" -// Indicates that the configuration set could not be created because of a naming -// conflict. -// -// * ErrCodeInvalidConfigurationSetException "InvalidConfigurationSet" -// Indicates that the configuration set is invalid. See the error message for -// details. -// -// * ErrCodeLimitExceededException "LimitExceeded" -// Indicates that a resource could not be created because of service limits. -// For a list of Amazon SES limits, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateConfigurationSet -func (c *SES) CreateConfigurationSet(input *CreateConfigurationSetInput) (*CreateConfigurationSetOutput, error) { - req, out := c.CreateConfigurationSetRequest(input) - return out, req.Send() -} - -// CreateConfigurationSetWithContext is the same as CreateConfigurationSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateConfigurationSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) CreateConfigurationSetWithContext(ctx aws.Context, input *CreateConfigurationSetInput, opts ...request.Option) (*CreateConfigurationSetOutput, error) { - req, out := c.CreateConfigurationSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateConfigurationSetEventDestination = "CreateConfigurationSetEventDestination" - -// CreateConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the -// client's request for the CreateConfigurationSetEventDestination operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateConfigurationSetEventDestination for more information on using the CreateConfigurationSetEventDestination -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateConfigurationSetEventDestinationRequest method. -// req, resp := client.CreateConfigurationSetEventDestinationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateConfigurationSetEventDestination -func (c *SES) CreateConfigurationSetEventDestinationRequest(input *CreateConfigurationSetEventDestinationInput) (req *request.Request, output *CreateConfigurationSetEventDestinationOutput) { - op := &request.Operation{ - Name: opCreateConfigurationSetEventDestination, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateConfigurationSetEventDestinationInput{} - } - - output = &CreateConfigurationSetEventDestinationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateConfigurationSetEventDestination API operation for Amazon Simple Email Service. -// -// Creates a configuration set event destination. -// -// When you create or update an event destination, you must provide one, and -// only one, destination. The destination can be CloudWatch, Amazon Kinesis -// Firehose, or Amazon Simple Notification Service (Amazon SNS). -// -// An event destination is the AWS service to which Amazon SES publishes the -// email sending events associated with a configuration set. For information -// about using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation CreateConfigurationSetEventDestination for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// * ErrCodeEventDestinationAlreadyExistsException "EventDestinationAlreadyExists" -// Indicates that the event destination could not be created because of a naming -// conflict. -// -// * ErrCodeInvalidCloudWatchDestinationException "InvalidCloudWatchDestination" -// Indicates that the Amazon CloudWatch destination is invalid. See the error -// message for details. -// -// * ErrCodeInvalidFirehoseDestinationException "InvalidFirehoseDestination" -// Indicates that the Amazon Kinesis Firehose destination is invalid. See the -// error message for details. -// -// * ErrCodeInvalidSNSDestinationException "InvalidSNSDestination" -// Indicates that the Amazon Simple Notification Service (Amazon SNS) destination -// is invalid. See the error message for details. -// -// * ErrCodeLimitExceededException "LimitExceeded" -// Indicates that a resource could not be created because of service limits. -// For a list of Amazon SES limits, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateConfigurationSetEventDestination -func (c *SES) CreateConfigurationSetEventDestination(input *CreateConfigurationSetEventDestinationInput) (*CreateConfigurationSetEventDestinationOutput, error) { - req, out := c.CreateConfigurationSetEventDestinationRequest(input) - return out, req.Send() -} - -// CreateConfigurationSetEventDestinationWithContext is the same as CreateConfigurationSetEventDestination with the addition of -// the ability to pass a context and additional request options. -// -// See CreateConfigurationSetEventDestination for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) CreateConfigurationSetEventDestinationWithContext(ctx aws.Context, input *CreateConfigurationSetEventDestinationInput, opts ...request.Option) (*CreateConfigurationSetEventDestinationOutput, error) { - req, out := c.CreateConfigurationSetEventDestinationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateConfigurationSetTrackingOptions = "CreateConfigurationSetTrackingOptions" - -// CreateConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the -// client's request for the CreateConfigurationSetTrackingOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateConfigurationSetTrackingOptions for more information on using the CreateConfigurationSetTrackingOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateConfigurationSetTrackingOptionsRequest method. -// req, resp := client.CreateConfigurationSetTrackingOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateConfigurationSetTrackingOptions -func (c *SES) CreateConfigurationSetTrackingOptionsRequest(input *CreateConfigurationSetTrackingOptionsInput) (req *request.Request, output *CreateConfigurationSetTrackingOptionsOutput) { - op := &request.Operation{ - Name: opCreateConfigurationSetTrackingOptions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateConfigurationSetTrackingOptionsInput{} - } - - output = &CreateConfigurationSetTrackingOptionsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateConfigurationSetTrackingOptions API operation for Amazon Simple Email Service. -// -// Creates an association between a configuration set and a custom domain for -// open and click event tracking. -// -// By default, images and links used for tracking open and click events are -// hosted on domains operated by Amazon SES. You can configure a subdomain of -// your own to handle these events. For information about using custom domains, -// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation CreateConfigurationSetTrackingOptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// * ErrCodeTrackingOptionsAlreadyExistsException "TrackingOptionsAlreadyExistsException" -// Indicates that the configuration set you specified already contains a TrackingOptions -// object. -// -// * ErrCodeInvalidTrackingOptionsException "InvalidTrackingOptions" -// Indicates that the custom domain to be used for open and click tracking redirects -// is invalid. This error appears most often in the following situations: -// -// * When the tracking domain you specified is not verified in Amazon SES. -// -// * When the tracking domain you specified is not a valid domain or subdomain. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateConfigurationSetTrackingOptions -func (c *SES) CreateConfigurationSetTrackingOptions(input *CreateConfigurationSetTrackingOptionsInput) (*CreateConfigurationSetTrackingOptionsOutput, error) { - req, out := c.CreateConfigurationSetTrackingOptionsRequest(input) - return out, req.Send() -} - -// CreateConfigurationSetTrackingOptionsWithContext is the same as CreateConfigurationSetTrackingOptions with the addition of -// the ability to pass a context and additional request options. -// -// See CreateConfigurationSetTrackingOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) CreateConfigurationSetTrackingOptionsWithContext(ctx aws.Context, input *CreateConfigurationSetTrackingOptionsInput, opts ...request.Option) (*CreateConfigurationSetTrackingOptionsOutput, error) { - req, out := c.CreateConfigurationSetTrackingOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCustomVerificationEmailTemplate = "CreateCustomVerificationEmailTemplate" - -// CreateCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the -// client's request for the CreateCustomVerificationEmailTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCustomVerificationEmailTemplate for more information on using the CreateCustomVerificationEmailTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCustomVerificationEmailTemplateRequest method. -// req, resp := client.CreateCustomVerificationEmailTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateCustomVerificationEmailTemplate -func (c *SES) CreateCustomVerificationEmailTemplateRequest(input *CreateCustomVerificationEmailTemplateInput) (req *request.Request, output *CreateCustomVerificationEmailTemplateOutput) { - op := &request.Operation{ - Name: opCreateCustomVerificationEmailTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCustomVerificationEmailTemplateInput{} - } - - output = &CreateCustomVerificationEmailTemplateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateCustomVerificationEmailTemplate API operation for Amazon Simple Email Service. -// -// Creates a new custom verification email template. -// -// For more information about custom verification email templates, see Using -// Custom Verification Email Templates (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) -// in the Amazon SES Developer Guide. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation CreateCustomVerificationEmailTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCustomVerificationEmailTemplateAlreadyExistsException "CustomVerificationEmailTemplateAlreadyExists" -// Indicates that a custom verification email template with the name you specified -// already exists. -// -// * ErrCodeFromEmailAddressNotVerifiedException "FromEmailAddressNotVerified" -// Indicates that the sender address specified for a custom verification email -// is not verified, and is therefore not eligible to send the custom verification -// email. -// -// * ErrCodeCustomVerificationEmailInvalidContentException "CustomVerificationEmailInvalidContent" -// Indicates that custom verification email template provided content is invalid. -// -// * ErrCodeLimitExceededException "LimitExceeded" -// Indicates that a resource could not be created because of service limits. -// For a list of Amazon SES limits, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateCustomVerificationEmailTemplate -func (c *SES) CreateCustomVerificationEmailTemplate(input *CreateCustomVerificationEmailTemplateInput) (*CreateCustomVerificationEmailTemplateOutput, error) { - req, out := c.CreateCustomVerificationEmailTemplateRequest(input) - return out, req.Send() -} - -// CreateCustomVerificationEmailTemplateWithContext is the same as CreateCustomVerificationEmailTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCustomVerificationEmailTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) CreateCustomVerificationEmailTemplateWithContext(ctx aws.Context, input *CreateCustomVerificationEmailTemplateInput, opts ...request.Option) (*CreateCustomVerificationEmailTemplateOutput, error) { - req, out := c.CreateCustomVerificationEmailTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateReceiptFilter = "CreateReceiptFilter" - -// CreateReceiptFilterRequest generates a "aws/request.Request" representing the -// client's request for the CreateReceiptFilter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateReceiptFilter for more information on using the CreateReceiptFilter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateReceiptFilterRequest method. -// req, resp := client.CreateReceiptFilterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateReceiptFilter -func (c *SES) CreateReceiptFilterRequest(input *CreateReceiptFilterInput) (req *request.Request, output *CreateReceiptFilterOutput) { - op := &request.Operation{ - Name: opCreateReceiptFilter, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateReceiptFilterInput{} - } - - output = &CreateReceiptFilterOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateReceiptFilter API operation for Amazon Simple Email Service. -// -// Creates a new IP address filter. -// -// For information about setting up IP address filters, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-ip-filters.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation CreateReceiptFilter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceeded" -// Indicates that a resource could not be created because of service limits. -// For a list of Amazon SES limits, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html). -// -// * ErrCodeAlreadyExistsException "AlreadyExists" -// Indicates that a resource could not be created because of a naming conflict. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateReceiptFilter -func (c *SES) CreateReceiptFilter(input *CreateReceiptFilterInput) (*CreateReceiptFilterOutput, error) { - req, out := c.CreateReceiptFilterRequest(input) - return out, req.Send() -} - -// CreateReceiptFilterWithContext is the same as CreateReceiptFilter with the addition of -// the ability to pass a context and additional request options. -// -// See CreateReceiptFilter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) CreateReceiptFilterWithContext(ctx aws.Context, input *CreateReceiptFilterInput, opts ...request.Option) (*CreateReceiptFilterOutput, error) { - req, out := c.CreateReceiptFilterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateReceiptRule = "CreateReceiptRule" - -// CreateReceiptRuleRequest generates a "aws/request.Request" representing the -// client's request for the CreateReceiptRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateReceiptRule for more information on using the CreateReceiptRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateReceiptRuleRequest method. -// req, resp := client.CreateReceiptRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateReceiptRule -func (c *SES) CreateReceiptRuleRequest(input *CreateReceiptRuleInput) (req *request.Request, output *CreateReceiptRuleOutput) { - op := &request.Operation{ - Name: opCreateReceiptRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateReceiptRuleInput{} - } - - output = &CreateReceiptRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateReceiptRule API operation for Amazon Simple Email Service. -// -// Creates a receipt rule. -// -// For information about setting up receipt rules, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rules.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation CreateReceiptRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidSnsTopicException "InvalidSnsTopic" -// Indicates that the provided Amazon SNS topic is invalid, or that Amazon SES -// could not publish to the topic, possibly due to permissions issues. For information -// about giving permissions, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). -// -// * ErrCodeInvalidS3ConfigurationException "InvalidS3Configuration" -// Indicates that the provided Amazon S3 bucket or AWS KMS encryption key is -// invalid, or that Amazon SES could not publish to the bucket, possibly due -// to permissions issues. For information about giving permissions, see the -// Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). -// -// * ErrCodeInvalidLambdaFunctionException "InvalidLambdaFunction" -// Indicates that the provided AWS Lambda function is invalid, or that Amazon -// SES could not execute the provided function, possibly due to permissions -// issues. For information about giving permissions, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). -// -// * ErrCodeAlreadyExistsException "AlreadyExists" -// Indicates that a resource could not be created because of a naming conflict. -// -// * ErrCodeRuleDoesNotExistException "RuleDoesNotExist" -// Indicates that the provided receipt rule does not exist. -// -// * ErrCodeRuleSetDoesNotExistException "RuleSetDoesNotExist" -// Indicates that the provided receipt rule set does not exist. -// -// * ErrCodeLimitExceededException "LimitExceeded" -// Indicates that a resource could not be created because of service limits. -// For a list of Amazon SES limits, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateReceiptRule -func (c *SES) CreateReceiptRule(input *CreateReceiptRuleInput) (*CreateReceiptRuleOutput, error) { - req, out := c.CreateReceiptRuleRequest(input) - return out, req.Send() -} - -// CreateReceiptRuleWithContext is the same as CreateReceiptRule with the addition of -// the ability to pass a context and additional request options. -// -// See CreateReceiptRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) CreateReceiptRuleWithContext(ctx aws.Context, input *CreateReceiptRuleInput, opts ...request.Option) (*CreateReceiptRuleOutput, error) { - req, out := c.CreateReceiptRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateReceiptRuleSet = "CreateReceiptRuleSet" - -// CreateReceiptRuleSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateReceiptRuleSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateReceiptRuleSet for more information on using the CreateReceiptRuleSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateReceiptRuleSetRequest method. -// req, resp := client.CreateReceiptRuleSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateReceiptRuleSet -func (c *SES) CreateReceiptRuleSetRequest(input *CreateReceiptRuleSetInput) (req *request.Request, output *CreateReceiptRuleSetOutput) { - op := &request.Operation{ - Name: opCreateReceiptRuleSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateReceiptRuleSetInput{} - } - - output = &CreateReceiptRuleSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateReceiptRuleSet API operation for Amazon Simple Email Service. -// -// Creates an empty receipt rule set. -// -// For information about setting up receipt rule sets, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rule-set.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation CreateReceiptRuleSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAlreadyExistsException "AlreadyExists" -// Indicates that a resource could not be created because of a naming conflict. -// -// * ErrCodeLimitExceededException "LimitExceeded" -// Indicates that a resource could not be created because of service limits. -// For a list of Amazon SES limits, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateReceiptRuleSet -func (c *SES) CreateReceiptRuleSet(input *CreateReceiptRuleSetInput) (*CreateReceiptRuleSetOutput, error) { - req, out := c.CreateReceiptRuleSetRequest(input) - return out, req.Send() -} - -// CreateReceiptRuleSetWithContext is the same as CreateReceiptRuleSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateReceiptRuleSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) CreateReceiptRuleSetWithContext(ctx aws.Context, input *CreateReceiptRuleSetInput, opts ...request.Option) (*CreateReceiptRuleSetOutput, error) { - req, out := c.CreateReceiptRuleSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTemplate = "CreateTemplate" - -// CreateTemplateRequest generates a "aws/request.Request" representing the -// client's request for the CreateTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTemplate for more information on using the CreateTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTemplateRequest method. -// req, resp := client.CreateTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateTemplate -func (c *SES) CreateTemplateRequest(input *CreateTemplateInput) (req *request.Request, output *CreateTemplateOutput) { - op := &request.Operation{ - Name: opCreateTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTemplateInput{} - } - - output = &CreateTemplateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateTemplate API operation for Amazon Simple Email Service. -// -// Creates an email template. Email templates enable you to send personalized -// email to one or more destinations in a single API operation. For more information, -// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation CreateTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAlreadyExistsException "AlreadyExists" -// Indicates that a resource could not be created because of a naming conflict. -// -// * ErrCodeInvalidTemplateException "InvalidTemplate" -// Indicates that the template that you specified could not be rendered. This -// issue may occur when a template refers to a partial that does not exist. -// -// * ErrCodeLimitExceededException "LimitExceeded" -// Indicates that a resource could not be created because of service limits. -// For a list of Amazon SES limits, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateTemplate -func (c *SES) CreateTemplate(input *CreateTemplateInput) (*CreateTemplateOutput, error) { - req, out := c.CreateTemplateRequest(input) - return out, req.Send() -} - -// CreateTemplateWithContext is the same as CreateTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) CreateTemplateWithContext(ctx aws.Context, input *CreateTemplateInput, opts ...request.Option) (*CreateTemplateOutput, error) { - req, out := c.CreateTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteConfigurationSet = "DeleteConfigurationSet" - -// DeleteConfigurationSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteConfigurationSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteConfigurationSet for more information on using the DeleteConfigurationSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteConfigurationSetRequest method. -// req, resp := client.DeleteConfigurationSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteConfigurationSet -func (c *SES) DeleteConfigurationSetRequest(input *DeleteConfigurationSetInput) (req *request.Request, output *DeleteConfigurationSetOutput) { - op := &request.Operation{ - Name: opDeleteConfigurationSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteConfigurationSetInput{} - } - - output = &DeleteConfigurationSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteConfigurationSet API operation for Amazon Simple Email Service. -// -// Deletes a configuration set. Configuration sets enable you to publish email -// sending events. For information about using configuration sets, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DeleteConfigurationSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteConfigurationSet -func (c *SES) DeleteConfigurationSet(input *DeleteConfigurationSetInput) (*DeleteConfigurationSetOutput, error) { - req, out := c.DeleteConfigurationSetRequest(input) - return out, req.Send() -} - -// DeleteConfigurationSetWithContext is the same as DeleteConfigurationSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteConfigurationSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DeleteConfigurationSetWithContext(ctx aws.Context, input *DeleteConfigurationSetInput, opts ...request.Option) (*DeleteConfigurationSetOutput, error) { - req, out := c.DeleteConfigurationSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteConfigurationSetEventDestination = "DeleteConfigurationSetEventDestination" - -// DeleteConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteConfigurationSetEventDestination operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteConfigurationSetEventDestination for more information on using the DeleteConfigurationSetEventDestination -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteConfigurationSetEventDestinationRequest method. -// req, resp := client.DeleteConfigurationSetEventDestinationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteConfigurationSetEventDestination -func (c *SES) DeleteConfigurationSetEventDestinationRequest(input *DeleteConfigurationSetEventDestinationInput) (req *request.Request, output *DeleteConfigurationSetEventDestinationOutput) { - op := &request.Operation{ - Name: opDeleteConfigurationSetEventDestination, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteConfigurationSetEventDestinationInput{} - } - - output = &DeleteConfigurationSetEventDestinationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteConfigurationSetEventDestination API operation for Amazon Simple Email Service. -// -// Deletes a configuration set event destination. Configuration set event destinations -// are associated with configuration sets, which enable you to publish email -// sending events. For information about using configuration sets, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DeleteConfigurationSetEventDestination for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// * ErrCodeEventDestinationDoesNotExistException "EventDestinationDoesNotExist" -// Indicates that the event destination does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteConfigurationSetEventDestination -func (c *SES) DeleteConfigurationSetEventDestination(input *DeleteConfigurationSetEventDestinationInput) (*DeleteConfigurationSetEventDestinationOutput, error) { - req, out := c.DeleteConfigurationSetEventDestinationRequest(input) - return out, req.Send() -} - -// DeleteConfigurationSetEventDestinationWithContext is the same as DeleteConfigurationSetEventDestination with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteConfigurationSetEventDestination for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DeleteConfigurationSetEventDestinationWithContext(ctx aws.Context, input *DeleteConfigurationSetEventDestinationInput, opts ...request.Option) (*DeleteConfigurationSetEventDestinationOutput, error) { - req, out := c.DeleteConfigurationSetEventDestinationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteConfigurationSetTrackingOptions = "DeleteConfigurationSetTrackingOptions" - -// DeleteConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteConfigurationSetTrackingOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteConfigurationSetTrackingOptions for more information on using the DeleteConfigurationSetTrackingOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteConfigurationSetTrackingOptionsRequest method. -// req, resp := client.DeleteConfigurationSetTrackingOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteConfigurationSetTrackingOptions -func (c *SES) DeleteConfigurationSetTrackingOptionsRequest(input *DeleteConfigurationSetTrackingOptionsInput) (req *request.Request, output *DeleteConfigurationSetTrackingOptionsOutput) { - op := &request.Operation{ - Name: opDeleteConfigurationSetTrackingOptions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteConfigurationSetTrackingOptionsInput{} - } - - output = &DeleteConfigurationSetTrackingOptionsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteConfigurationSetTrackingOptions API operation for Amazon Simple Email Service. -// -// Deletes an association between a configuration set and a custom domain for -// open and click event tracking. -// -// By default, images and links used for tracking open and click events are -// hosted on domains operated by Amazon SES. You can configure a subdomain of -// your own to handle these events. For information about using custom domains, -// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html). -// -// Deleting this kind of association will result in emails sent using the specified -// configuration set to capture open and click events using the standard, Amazon -// SES-operated domains. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DeleteConfigurationSetTrackingOptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// * ErrCodeTrackingOptionsDoesNotExistException "TrackingOptionsDoesNotExistException" -// Indicates that the TrackingOptions object you specified does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteConfigurationSetTrackingOptions -func (c *SES) DeleteConfigurationSetTrackingOptions(input *DeleteConfigurationSetTrackingOptionsInput) (*DeleteConfigurationSetTrackingOptionsOutput, error) { - req, out := c.DeleteConfigurationSetTrackingOptionsRequest(input) - return out, req.Send() -} - -// DeleteConfigurationSetTrackingOptionsWithContext is the same as DeleteConfigurationSetTrackingOptions with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteConfigurationSetTrackingOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DeleteConfigurationSetTrackingOptionsWithContext(ctx aws.Context, input *DeleteConfigurationSetTrackingOptionsInput, opts ...request.Option) (*DeleteConfigurationSetTrackingOptionsOutput, error) { - req, out := c.DeleteConfigurationSetTrackingOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCustomVerificationEmailTemplate = "DeleteCustomVerificationEmailTemplate" - -// DeleteCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCustomVerificationEmailTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteCustomVerificationEmailTemplate for more information on using the DeleteCustomVerificationEmailTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteCustomVerificationEmailTemplateRequest method. -// req, resp := client.DeleteCustomVerificationEmailTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteCustomVerificationEmailTemplate -func (c *SES) DeleteCustomVerificationEmailTemplateRequest(input *DeleteCustomVerificationEmailTemplateInput) (req *request.Request, output *DeleteCustomVerificationEmailTemplateOutput) { - op := &request.Operation{ - Name: opDeleteCustomVerificationEmailTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteCustomVerificationEmailTemplateInput{} - } - - output = &DeleteCustomVerificationEmailTemplateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCustomVerificationEmailTemplate API operation for Amazon Simple Email Service. -// -// Deletes an existing custom verification email template. -// -// For more information about custom verification email templates, see Using -// Custom Verification Email Templates (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) -// in the Amazon SES Developer Guide. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DeleteCustomVerificationEmailTemplate for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteCustomVerificationEmailTemplate -func (c *SES) DeleteCustomVerificationEmailTemplate(input *DeleteCustomVerificationEmailTemplateInput) (*DeleteCustomVerificationEmailTemplateOutput, error) { - req, out := c.DeleteCustomVerificationEmailTemplateRequest(input) - return out, req.Send() -} - -// DeleteCustomVerificationEmailTemplateWithContext is the same as DeleteCustomVerificationEmailTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCustomVerificationEmailTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DeleteCustomVerificationEmailTemplateWithContext(ctx aws.Context, input *DeleteCustomVerificationEmailTemplateInput, opts ...request.Option) (*DeleteCustomVerificationEmailTemplateOutput, error) { - req, out := c.DeleteCustomVerificationEmailTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIdentity = "DeleteIdentity" - -// DeleteIdentityRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIdentity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIdentity for more information on using the DeleteIdentity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIdentityRequest method. -// req, resp := client.DeleteIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteIdentity -func (c *SES) DeleteIdentityRequest(input *DeleteIdentityInput) (req *request.Request, output *DeleteIdentityOutput) { - op := &request.Operation{ - Name: opDeleteIdentity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteIdentityInput{} - } - - output = &DeleteIdentityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteIdentity API operation for Amazon Simple Email Service. -// -// Deletes the specified identity (an email address or a domain) from the list -// of verified identities. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DeleteIdentity for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteIdentity -func (c *SES) DeleteIdentity(input *DeleteIdentityInput) (*DeleteIdentityOutput, error) { - req, out := c.DeleteIdentityRequest(input) - return out, req.Send() -} - -// DeleteIdentityWithContext is the same as DeleteIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIdentity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DeleteIdentityWithContext(ctx aws.Context, input *DeleteIdentityInput, opts ...request.Option) (*DeleteIdentityOutput, error) { - req, out := c.DeleteIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIdentityPolicy = "DeleteIdentityPolicy" - -// DeleteIdentityPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIdentityPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIdentityPolicy for more information on using the DeleteIdentityPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIdentityPolicyRequest method. -// req, resp := client.DeleteIdentityPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteIdentityPolicy -func (c *SES) DeleteIdentityPolicyRequest(input *DeleteIdentityPolicyInput) (req *request.Request, output *DeleteIdentityPolicyOutput) { - op := &request.Operation{ - Name: opDeleteIdentityPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteIdentityPolicyInput{} - } - - output = &DeleteIdentityPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteIdentityPolicy API operation for Amazon Simple Email Service. -// -// Deletes the specified sending authorization policy for the given identity -// (an email address or a domain). This API returns successfully even if a policy -// with the specified name does not exist. -// -// This API is for the identity owner only. If you have not verified the identity, -// this API will return an error. -// -// Sending authorization is a feature that enables an identity owner to authorize -// other senders to use its identities. For information about using sending -// authorization, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DeleteIdentityPolicy for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteIdentityPolicy -func (c *SES) DeleteIdentityPolicy(input *DeleteIdentityPolicyInput) (*DeleteIdentityPolicyOutput, error) { - req, out := c.DeleteIdentityPolicyRequest(input) - return out, req.Send() -} - -// DeleteIdentityPolicyWithContext is the same as DeleteIdentityPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIdentityPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DeleteIdentityPolicyWithContext(ctx aws.Context, input *DeleteIdentityPolicyInput, opts ...request.Option) (*DeleteIdentityPolicyOutput, error) { - req, out := c.DeleteIdentityPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteReceiptFilter = "DeleteReceiptFilter" - -// DeleteReceiptFilterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteReceiptFilter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteReceiptFilter for more information on using the DeleteReceiptFilter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteReceiptFilterRequest method. -// req, resp := client.DeleteReceiptFilterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteReceiptFilter -func (c *SES) DeleteReceiptFilterRequest(input *DeleteReceiptFilterInput) (req *request.Request, output *DeleteReceiptFilterOutput) { - op := &request.Operation{ - Name: opDeleteReceiptFilter, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteReceiptFilterInput{} - } - - output = &DeleteReceiptFilterOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteReceiptFilter API operation for Amazon Simple Email Service. -// -// Deletes the specified IP address filter. -// -// For information about managing IP address filters, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-ip-filters.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DeleteReceiptFilter for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteReceiptFilter -func (c *SES) DeleteReceiptFilter(input *DeleteReceiptFilterInput) (*DeleteReceiptFilterOutput, error) { - req, out := c.DeleteReceiptFilterRequest(input) - return out, req.Send() -} - -// DeleteReceiptFilterWithContext is the same as DeleteReceiptFilter with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteReceiptFilter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DeleteReceiptFilterWithContext(ctx aws.Context, input *DeleteReceiptFilterInput, opts ...request.Option) (*DeleteReceiptFilterOutput, error) { - req, out := c.DeleteReceiptFilterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteReceiptRule = "DeleteReceiptRule" - -// DeleteReceiptRuleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteReceiptRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteReceiptRule for more information on using the DeleteReceiptRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteReceiptRuleRequest method. -// req, resp := client.DeleteReceiptRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteReceiptRule -func (c *SES) DeleteReceiptRuleRequest(input *DeleteReceiptRuleInput) (req *request.Request, output *DeleteReceiptRuleOutput) { - op := &request.Operation{ - Name: opDeleteReceiptRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteReceiptRuleInput{} - } - - output = &DeleteReceiptRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteReceiptRule API operation for Amazon Simple Email Service. -// -// Deletes the specified receipt rule. -// -// For information about managing receipt rules, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rules.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DeleteReceiptRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRuleSetDoesNotExistException "RuleSetDoesNotExist" -// Indicates that the provided receipt rule set does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteReceiptRule -func (c *SES) DeleteReceiptRule(input *DeleteReceiptRuleInput) (*DeleteReceiptRuleOutput, error) { - req, out := c.DeleteReceiptRuleRequest(input) - return out, req.Send() -} - -// DeleteReceiptRuleWithContext is the same as DeleteReceiptRule with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteReceiptRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DeleteReceiptRuleWithContext(ctx aws.Context, input *DeleteReceiptRuleInput, opts ...request.Option) (*DeleteReceiptRuleOutput, error) { - req, out := c.DeleteReceiptRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteReceiptRuleSet = "DeleteReceiptRuleSet" - -// DeleteReceiptRuleSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteReceiptRuleSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteReceiptRuleSet for more information on using the DeleteReceiptRuleSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteReceiptRuleSetRequest method. -// req, resp := client.DeleteReceiptRuleSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteReceiptRuleSet -func (c *SES) DeleteReceiptRuleSetRequest(input *DeleteReceiptRuleSetInput) (req *request.Request, output *DeleteReceiptRuleSetOutput) { - op := &request.Operation{ - Name: opDeleteReceiptRuleSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteReceiptRuleSetInput{} - } - - output = &DeleteReceiptRuleSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteReceiptRuleSet API operation for Amazon Simple Email Service. -// -// Deletes the specified receipt rule set and all of the receipt rules it contains. -// -// The currently active rule set cannot be deleted. -// -// For information about managing receipt rule sets, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DeleteReceiptRuleSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCannotDeleteException "CannotDelete" -// Indicates that the delete operation could not be completed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteReceiptRuleSet -func (c *SES) DeleteReceiptRuleSet(input *DeleteReceiptRuleSetInput) (*DeleteReceiptRuleSetOutput, error) { - req, out := c.DeleteReceiptRuleSetRequest(input) - return out, req.Send() -} - -// DeleteReceiptRuleSetWithContext is the same as DeleteReceiptRuleSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteReceiptRuleSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DeleteReceiptRuleSetWithContext(ctx aws.Context, input *DeleteReceiptRuleSetInput, opts ...request.Option) (*DeleteReceiptRuleSetOutput, error) { - req, out := c.DeleteReceiptRuleSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTemplate = "DeleteTemplate" - -// DeleteTemplateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTemplate for more information on using the DeleteTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTemplateRequest method. -// req, resp := client.DeleteTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteTemplate -func (c *SES) DeleteTemplateRequest(input *DeleteTemplateInput) (req *request.Request, output *DeleteTemplateOutput) { - op := &request.Operation{ - Name: opDeleteTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTemplateInput{} - } - - output = &DeleteTemplateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTemplate API operation for Amazon Simple Email Service. -// -// Deletes an email template. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DeleteTemplate for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteTemplate -func (c *SES) DeleteTemplate(input *DeleteTemplateInput) (*DeleteTemplateOutput, error) { - req, out := c.DeleteTemplateRequest(input) - return out, req.Send() -} - -// DeleteTemplateWithContext is the same as DeleteTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DeleteTemplateWithContext(ctx aws.Context, input *DeleteTemplateInput, opts ...request.Option) (*DeleteTemplateOutput, error) { - req, out := c.DeleteTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVerifiedEmailAddress = "DeleteVerifiedEmailAddress" - -// DeleteVerifiedEmailAddressRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVerifiedEmailAddress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVerifiedEmailAddress for more information on using the DeleteVerifiedEmailAddress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVerifiedEmailAddressRequest method. -// req, resp := client.DeleteVerifiedEmailAddressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteVerifiedEmailAddress -func (c *SES) DeleteVerifiedEmailAddressRequest(input *DeleteVerifiedEmailAddressInput) (req *request.Request, output *DeleteVerifiedEmailAddressOutput) { - op := &request.Operation{ - Name: opDeleteVerifiedEmailAddress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVerifiedEmailAddressInput{} - } - - output = &DeleteVerifiedEmailAddressOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVerifiedEmailAddress API operation for Amazon Simple Email Service. -// -// Deprecated. Use the DeleteIdentity operation to delete email addresses and -// domains. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DeleteVerifiedEmailAddress for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteVerifiedEmailAddress -func (c *SES) DeleteVerifiedEmailAddress(input *DeleteVerifiedEmailAddressInput) (*DeleteVerifiedEmailAddressOutput, error) { - req, out := c.DeleteVerifiedEmailAddressRequest(input) - return out, req.Send() -} - -// DeleteVerifiedEmailAddressWithContext is the same as DeleteVerifiedEmailAddress with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVerifiedEmailAddress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DeleteVerifiedEmailAddressWithContext(ctx aws.Context, input *DeleteVerifiedEmailAddressInput, opts ...request.Option) (*DeleteVerifiedEmailAddressOutput, error) { - req, out := c.DeleteVerifiedEmailAddressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeActiveReceiptRuleSet = "DescribeActiveReceiptRuleSet" - -// DescribeActiveReceiptRuleSetRequest generates a "aws/request.Request" representing the -// client's request for the DescribeActiveReceiptRuleSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeActiveReceiptRuleSet for more information on using the DescribeActiveReceiptRuleSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeActiveReceiptRuleSetRequest method. -// req, resp := client.DescribeActiveReceiptRuleSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DescribeActiveReceiptRuleSet -func (c *SES) DescribeActiveReceiptRuleSetRequest(input *DescribeActiveReceiptRuleSetInput) (req *request.Request, output *DescribeActiveReceiptRuleSetOutput) { - op := &request.Operation{ - Name: opDescribeActiveReceiptRuleSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeActiveReceiptRuleSetInput{} - } - - output = &DescribeActiveReceiptRuleSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeActiveReceiptRuleSet API operation for Amazon Simple Email Service. -// -// Returns the metadata and receipt rules for the receipt rule set that is currently -// active. -// -// For information about setting up receipt rule sets, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rule-set.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DescribeActiveReceiptRuleSet for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DescribeActiveReceiptRuleSet -func (c *SES) DescribeActiveReceiptRuleSet(input *DescribeActiveReceiptRuleSetInput) (*DescribeActiveReceiptRuleSetOutput, error) { - req, out := c.DescribeActiveReceiptRuleSetRequest(input) - return out, req.Send() -} - -// DescribeActiveReceiptRuleSetWithContext is the same as DescribeActiveReceiptRuleSet with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeActiveReceiptRuleSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DescribeActiveReceiptRuleSetWithContext(ctx aws.Context, input *DescribeActiveReceiptRuleSetInput, opts ...request.Option) (*DescribeActiveReceiptRuleSetOutput, error) { - req, out := c.DescribeActiveReceiptRuleSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeConfigurationSet = "DescribeConfigurationSet" - -// DescribeConfigurationSetRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConfigurationSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeConfigurationSet for more information on using the DescribeConfigurationSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeConfigurationSetRequest method. -// req, resp := client.DescribeConfigurationSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DescribeConfigurationSet -func (c *SES) DescribeConfigurationSetRequest(input *DescribeConfigurationSetInput) (req *request.Request, output *DescribeConfigurationSetOutput) { - op := &request.Operation{ - Name: opDescribeConfigurationSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeConfigurationSetInput{} - } - - output = &DescribeConfigurationSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeConfigurationSet API operation for Amazon Simple Email Service. -// -// Returns the details of the specified configuration set. For information about -// using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DescribeConfigurationSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DescribeConfigurationSet -func (c *SES) DescribeConfigurationSet(input *DescribeConfigurationSetInput) (*DescribeConfigurationSetOutput, error) { - req, out := c.DescribeConfigurationSetRequest(input) - return out, req.Send() -} - -// DescribeConfigurationSetWithContext is the same as DescribeConfigurationSet with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeConfigurationSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DescribeConfigurationSetWithContext(ctx aws.Context, input *DescribeConfigurationSetInput, opts ...request.Option) (*DescribeConfigurationSetOutput, error) { - req, out := c.DescribeConfigurationSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeReceiptRule = "DescribeReceiptRule" - -// DescribeReceiptRuleRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReceiptRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReceiptRule for more information on using the DescribeReceiptRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReceiptRuleRequest method. -// req, resp := client.DescribeReceiptRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DescribeReceiptRule -func (c *SES) DescribeReceiptRuleRequest(input *DescribeReceiptRuleInput) (req *request.Request, output *DescribeReceiptRuleOutput) { - op := &request.Operation{ - Name: opDescribeReceiptRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeReceiptRuleInput{} - } - - output = &DescribeReceiptRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReceiptRule API operation for Amazon Simple Email Service. -// -// Returns the details of the specified receipt rule. -// -// For information about setting up receipt rules, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rules.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DescribeReceiptRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRuleDoesNotExistException "RuleDoesNotExist" -// Indicates that the provided receipt rule does not exist. -// -// * ErrCodeRuleSetDoesNotExistException "RuleSetDoesNotExist" -// Indicates that the provided receipt rule set does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DescribeReceiptRule -func (c *SES) DescribeReceiptRule(input *DescribeReceiptRuleInput) (*DescribeReceiptRuleOutput, error) { - req, out := c.DescribeReceiptRuleRequest(input) - return out, req.Send() -} - -// DescribeReceiptRuleWithContext is the same as DescribeReceiptRule with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReceiptRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DescribeReceiptRuleWithContext(ctx aws.Context, input *DescribeReceiptRuleInput, opts ...request.Option) (*DescribeReceiptRuleOutput, error) { - req, out := c.DescribeReceiptRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeReceiptRuleSet = "DescribeReceiptRuleSet" - -// DescribeReceiptRuleSetRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReceiptRuleSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReceiptRuleSet for more information on using the DescribeReceiptRuleSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeReceiptRuleSetRequest method. -// req, resp := client.DescribeReceiptRuleSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DescribeReceiptRuleSet -func (c *SES) DescribeReceiptRuleSetRequest(input *DescribeReceiptRuleSetInput) (req *request.Request, output *DescribeReceiptRuleSetOutput) { - op := &request.Operation{ - Name: opDescribeReceiptRuleSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeReceiptRuleSetInput{} - } - - output = &DescribeReceiptRuleSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReceiptRuleSet API operation for Amazon Simple Email Service. -// -// Returns the details of the specified receipt rule set. -// -// For information about managing receipt rule sets, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation DescribeReceiptRuleSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRuleSetDoesNotExistException "RuleSetDoesNotExist" -// Indicates that the provided receipt rule set does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DescribeReceiptRuleSet -func (c *SES) DescribeReceiptRuleSet(input *DescribeReceiptRuleSetInput) (*DescribeReceiptRuleSetOutput, error) { - req, out := c.DescribeReceiptRuleSetRequest(input) - return out, req.Send() -} - -// DescribeReceiptRuleSetWithContext is the same as DescribeReceiptRuleSet with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReceiptRuleSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) DescribeReceiptRuleSetWithContext(ctx aws.Context, input *DescribeReceiptRuleSetInput, opts ...request.Option) (*DescribeReceiptRuleSetOutput, error) { - req, out := c.DescribeReceiptRuleSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAccountSendingEnabled = "GetAccountSendingEnabled" - -// GetAccountSendingEnabledRequest generates a "aws/request.Request" representing the -// client's request for the GetAccountSendingEnabled operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAccountSendingEnabled for more information on using the GetAccountSendingEnabled -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAccountSendingEnabledRequest method. -// req, resp := client.GetAccountSendingEnabledRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetAccountSendingEnabled -func (c *SES) GetAccountSendingEnabledRequest(input *GetAccountSendingEnabledInput) (req *request.Request, output *GetAccountSendingEnabledOutput) { - op := &request.Operation{ - Name: opGetAccountSendingEnabled, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAccountSendingEnabledInput{} - } - - output = &GetAccountSendingEnabledOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAccountSendingEnabled API operation for Amazon Simple Email Service. -// -// Returns the email sending status of the Amazon SES account for the current -// region. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation GetAccountSendingEnabled for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetAccountSendingEnabled -func (c *SES) GetAccountSendingEnabled(input *GetAccountSendingEnabledInput) (*GetAccountSendingEnabledOutput, error) { - req, out := c.GetAccountSendingEnabledRequest(input) - return out, req.Send() -} - -// GetAccountSendingEnabledWithContext is the same as GetAccountSendingEnabled with the addition of -// the ability to pass a context and additional request options. -// -// See GetAccountSendingEnabled for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) GetAccountSendingEnabledWithContext(ctx aws.Context, input *GetAccountSendingEnabledInput, opts ...request.Option) (*GetAccountSendingEnabledOutput, error) { - req, out := c.GetAccountSendingEnabledRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCustomVerificationEmailTemplate = "GetCustomVerificationEmailTemplate" - -// GetCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the -// client's request for the GetCustomVerificationEmailTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCustomVerificationEmailTemplate for more information on using the GetCustomVerificationEmailTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCustomVerificationEmailTemplateRequest method. -// req, resp := client.GetCustomVerificationEmailTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetCustomVerificationEmailTemplate -func (c *SES) GetCustomVerificationEmailTemplateRequest(input *GetCustomVerificationEmailTemplateInput) (req *request.Request, output *GetCustomVerificationEmailTemplateOutput) { - op := &request.Operation{ - Name: opGetCustomVerificationEmailTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCustomVerificationEmailTemplateInput{} - } - - output = &GetCustomVerificationEmailTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCustomVerificationEmailTemplate API operation for Amazon Simple Email Service. -// -// Returns the custom email verification template for the template name you -// specify. -// -// For more information about custom verification email templates, see Using -// Custom Verification Email Templates (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) -// in the Amazon SES Developer Guide. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation GetCustomVerificationEmailTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCustomVerificationEmailTemplateDoesNotExistException "CustomVerificationEmailTemplateDoesNotExist" -// Indicates that a custom verification email template with the name you specified -// does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetCustomVerificationEmailTemplate -func (c *SES) GetCustomVerificationEmailTemplate(input *GetCustomVerificationEmailTemplateInput) (*GetCustomVerificationEmailTemplateOutput, error) { - req, out := c.GetCustomVerificationEmailTemplateRequest(input) - return out, req.Send() -} - -// GetCustomVerificationEmailTemplateWithContext is the same as GetCustomVerificationEmailTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See GetCustomVerificationEmailTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) GetCustomVerificationEmailTemplateWithContext(ctx aws.Context, input *GetCustomVerificationEmailTemplateInput, opts ...request.Option) (*GetCustomVerificationEmailTemplateOutput, error) { - req, out := c.GetCustomVerificationEmailTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIdentityDkimAttributes = "GetIdentityDkimAttributes" - -// GetIdentityDkimAttributesRequest generates a "aws/request.Request" representing the -// client's request for the GetIdentityDkimAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIdentityDkimAttributes for more information on using the GetIdentityDkimAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIdentityDkimAttributesRequest method. -// req, resp := client.GetIdentityDkimAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityDkimAttributes -func (c *SES) GetIdentityDkimAttributesRequest(input *GetIdentityDkimAttributesInput) (req *request.Request, output *GetIdentityDkimAttributesOutput) { - op := &request.Operation{ - Name: opGetIdentityDkimAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetIdentityDkimAttributesInput{} - } - - output = &GetIdentityDkimAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIdentityDkimAttributes API operation for Amazon Simple Email Service. -// -// Returns the current status of Easy DKIM signing for an entity. For domain -// name identities, this operation also returns the DKIM tokens that are required -// for Easy DKIM signing, and whether Amazon SES has successfully verified that -// these tokens have been published. -// -// This operation takes a list of identities as input and returns the following -// information for each: -// -// * Whether Easy DKIM signing is enabled or disabled. -// -// * A set of DKIM tokens that represent the identity. If the identity is -// an email address, the tokens represent the domain of that address. -// -// * Whether Amazon SES has successfully verified the DKIM tokens published -// in the domain's DNS. This information is only returned for domain name -// identities, not for email addresses. -// -// This operation is throttled at one request per second and can only get DKIM -// attributes for up to 100 identities at a time. -// -// For more information about creating DNS records using DKIM tokens, go to -// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim-dns-records.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation GetIdentityDkimAttributes for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityDkimAttributes -func (c *SES) GetIdentityDkimAttributes(input *GetIdentityDkimAttributesInput) (*GetIdentityDkimAttributesOutput, error) { - req, out := c.GetIdentityDkimAttributesRequest(input) - return out, req.Send() -} - -// GetIdentityDkimAttributesWithContext is the same as GetIdentityDkimAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See GetIdentityDkimAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) GetIdentityDkimAttributesWithContext(ctx aws.Context, input *GetIdentityDkimAttributesInput, opts ...request.Option) (*GetIdentityDkimAttributesOutput, error) { - req, out := c.GetIdentityDkimAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIdentityMailFromDomainAttributes = "GetIdentityMailFromDomainAttributes" - -// GetIdentityMailFromDomainAttributesRequest generates a "aws/request.Request" representing the -// client's request for the GetIdentityMailFromDomainAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIdentityMailFromDomainAttributes for more information on using the GetIdentityMailFromDomainAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIdentityMailFromDomainAttributesRequest method. -// req, resp := client.GetIdentityMailFromDomainAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityMailFromDomainAttributes -func (c *SES) GetIdentityMailFromDomainAttributesRequest(input *GetIdentityMailFromDomainAttributesInput) (req *request.Request, output *GetIdentityMailFromDomainAttributesOutput) { - op := &request.Operation{ - Name: opGetIdentityMailFromDomainAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetIdentityMailFromDomainAttributesInput{} - } - - output = &GetIdentityMailFromDomainAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIdentityMailFromDomainAttributes API operation for Amazon Simple Email Service. -// -// Returns the custom MAIL FROM attributes for a list of identities (email addresses -// : domains). -// -// This operation is throttled at one request per second and can only get custom -// MAIL FROM attributes for up to 100 identities at a time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation GetIdentityMailFromDomainAttributes for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityMailFromDomainAttributes -func (c *SES) GetIdentityMailFromDomainAttributes(input *GetIdentityMailFromDomainAttributesInput) (*GetIdentityMailFromDomainAttributesOutput, error) { - req, out := c.GetIdentityMailFromDomainAttributesRequest(input) - return out, req.Send() -} - -// GetIdentityMailFromDomainAttributesWithContext is the same as GetIdentityMailFromDomainAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See GetIdentityMailFromDomainAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) GetIdentityMailFromDomainAttributesWithContext(ctx aws.Context, input *GetIdentityMailFromDomainAttributesInput, opts ...request.Option) (*GetIdentityMailFromDomainAttributesOutput, error) { - req, out := c.GetIdentityMailFromDomainAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIdentityNotificationAttributes = "GetIdentityNotificationAttributes" - -// GetIdentityNotificationAttributesRequest generates a "aws/request.Request" representing the -// client's request for the GetIdentityNotificationAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIdentityNotificationAttributes for more information on using the GetIdentityNotificationAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIdentityNotificationAttributesRequest method. -// req, resp := client.GetIdentityNotificationAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityNotificationAttributes -func (c *SES) GetIdentityNotificationAttributesRequest(input *GetIdentityNotificationAttributesInput) (req *request.Request, output *GetIdentityNotificationAttributesOutput) { - op := &request.Operation{ - Name: opGetIdentityNotificationAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetIdentityNotificationAttributesInput{} - } - - output = &GetIdentityNotificationAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIdentityNotificationAttributes API operation for Amazon Simple Email Service. -// -// Given a list of verified identities (email addresses and/or domains), returns -// a structure describing identity notification attributes. -// -// This operation is throttled at one request per second and can only get notification -// attributes for up to 100 identities at a time. -// -// For more information about using notifications with Amazon SES, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation GetIdentityNotificationAttributes for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityNotificationAttributes -func (c *SES) GetIdentityNotificationAttributes(input *GetIdentityNotificationAttributesInput) (*GetIdentityNotificationAttributesOutput, error) { - req, out := c.GetIdentityNotificationAttributesRequest(input) - return out, req.Send() -} - -// GetIdentityNotificationAttributesWithContext is the same as GetIdentityNotificationAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See GetIdentityNotificationAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) GetIdentityNotificationAttributesWithContext(ctx aws.Context, input *GetIdentityNotificationAttributesInput, opts ...request.Option) (*GetIdentityNotificationAttributesOutput, error) { - req, out := c.GetIdentityNotificationAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIdentityPolicies = "GetIdentityPolicies" - -// GetIdentityPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the GetIdentityPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIdentityPolicies for more information on using the GetIdentityPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIdentityPoliciesRequest method. -// req, resp := client.GetIdentityPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityPolicies -func (c *SES) GetIdentityPoliciesRequest(input *GetIdentityPoliciesInput) (req *request.Request, output *GetIdentityPoliciesOutput) { - op := &request.Operation{ - Name: opGetIdentityPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetIdentityPoliciesInput{} - } - - output = &GetIdentityPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIdentityPolicies API operation for Amazon Simple Email Service. -// -// Returns the requested sending authorization policies for the given identity -// (an email address or a domain). The policies are returned as a map of policy -// names to policy contents. You can retrieve a maximum of 20 policies at a -// time. -// -// This API is for the identity owner only. If you have not verified the identity, -// this API will return an error. -// -// Sending authorization is a feature that enables an identity owner to authorize -// other senders to use its identities. For information about using sending -// authorization, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation GetIdentityPolicies for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityPolicies -func (c *SES) GetIdentityPolicies(input *GetIdentityPoliciesInput) (*GetIdentityPoliciesOutput, error) { - req, out := c.GetIdentityPoliciesRequest(input) - return out, req.Send() -} - -// GetIdentityPoliciesWithContext is the same as GetIdentityPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See GetIdentityPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) GetIdentityPoliciesWithContext(ctx aws.Context, input *GetIdentityPoliciesInput, opts ...request.Option) (*GetIdentityPoliciesOutput, error) { - req, out := c.GetIdentityPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIdentityVerificationAttributes = "GetIdentityVerificationAttributes" - -// GetIdentityVerificationAttributesRequest generates a "aws/request.Request" representing the -// client's request for the GetIdentityVerificationAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIdentityVerificationAttributes for more information on using the GetIdentityVerificationAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIdentityVerificationAttributesRequest method. -// req, resp := client.GetIdentityVerificationAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityVerificationAttributes -func (c *SES) GetIdentityVerificationAttributesRequest(input *GetIdentityVerificationAttributesInput) (req *request.Request, output *GetIdentityVerificationAttributesOutput) { - op := &request.Operation{ - Name: opGetIdentityVerificationAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetIdentityVerificationAttributesInput{} - } - - output = &GetIdentityVerificationAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIdentityVerificationAttributes API operation for Amazon Simple Email Service. -// -// Given a list of identities (email addresses and/or domains), returns the -// verification status and (for domain identities) the verification token for -// each identity. -// -// The verification status of an email address is "Pending" until the email -// address owner clicks the link within the verification email that Amazon SES -// sent to that address. If the email address owner clicks the link within 24 -// hours, the verification status of the email address changes to "Success". -// If the link is not clicked within 24 hours, the verification status changes -// to "Failed." In that case, if you still want to verify the email address, -// you must restart the verification process from the beginning. -// -// For domain identities, the domain's verification status is "Pending" as Amazon -// SES searches for the required TXT record in the DNS settings of the domain. -// When Amazon SES detects the record, the domain's verification status changes -// to "Success". If Amazon SES is unable to detect the record within 72 hours, -// the domain's verification status changes to "Failed." In that case, if you -// still want to verify the domain, you must restart the verification process -// from the beginning. -// -// This operation is throttled at one request per second and can only get verification -// attributes for up to 100 identities at a time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation GetIdentityVerificationAttributes for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityVerificationAttributes -func (c *SES) GetIdentityVerificationAttributes(input *GetIdentityVerificationAttributesInput) (*GetIdentityVerificationAttributesOutput, error) { - req, out := c.GetIdentityVerificationAttributesRequest(input) - return out, req.Send() -} - -// GetIdentityVerificationAttributesWithContext is the same as GetIdentityVerificationAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See GetIdentityVerificationAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) GetIdentityVerificationAttributesWithContext(ctx aws.Context, input *GetIdentityVerificationAttributesInput, opts ...request.Option) (*GetIdentityVerificationAttributesOutput, error) { - req, out := c.GetIdentityVerificationAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSendQuota = "GetSendQuota" - -// GetSendQuotaRequest generates a "aws/request.Request" representing the -// client's request for the GetSendQuota operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSendQuota for more information on using the GetSendQuota -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSendQuotaRequest method. -// req, resp := client.GetSendQuotaRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetSendQuota -func (c *SES) GetSendQuotaRequest(input *GetSendQuotaInput) (req *request.Request, output *GetSendQuotaOutput) { - op := &request.Operation{ - Name: opGetSendQuota, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSendQuotaInput{} - } - - output = &GetSendQuotaOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSendQuota API operation for Amazon Simple Email Service. -// -// Provides the sending limits for the Amazon SES account. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation GetSendQuota for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetSendQuota -func (c *SES) GetSendQuota(input *GetSendQuotaInput) (*GetSendQuotaOutput, error) { - req, out := c.GetSendQuotaRequest(input) - return out, req.Send() -} - -// GetSendQuotaWithContext is the same as GetSendQuota with the addition of -// the ability to pass a context and additional request options. -// -// See GetSendQuota for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) GetSendQuotaWithContext(ctx aws.Context, input *GetSendQuotaInput, opts ...request.Option) (*GetSendQuotaOutput, error) { - req, out := c.GetSendQuotaRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSendStatistics = "GetSendStatistics" - -// GetSendStatisticsRequest generates a "aws/request.Request" representing the -// client's request for the GetSendStatistics operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSendStatistics for more information on using the GetSendStatistics -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSendStatisticsRequest method. -// req, resp := client.GetSendStatisticsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetSendStatistics -func (c *SES) GetSendStatisticsRequest(input *GetSendStatisticsInput) (req *request.Request, output *GetSendStatisticsOutput) { - op := &request.Operation{ - Name: opGetSendStatistics, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSendStatisticsInput{} - } - - output = &GetSendStatisticsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSendStatistics API operation for Amazon Simple Email Service. -// -// Provides sending statistics for the current AWS Region. The result is a list -// of data points, representing the last two weeks of sending activity. Each -// data point in the list contains statistics for a 15-minute period of time. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation GetSendStatistics for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetSendStatistics -func (c *SES) GetSendStatistics(input *GetSendStatisticsInput) (*GetSendStatisticsOutput, error) { - req, out := c.GetSendStatisticsRequest(input) - return out, req.Send() -} - -// GetSendStatisticsWithContext is the same as GetSendStatistics with the addition of -// the ability to pass a context and additional request options. -// -// See GetSendStatistics for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) GetSendStatisticsWithContext(ctx aws.Context, input *GetSendStatisticsInput, opts ...request.Option) (*GetSendStatisticsOutput, error) { - req, out := c.GetSendStatisticsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTemplate = "GetTemplate" - -// GetTemplateRequest generates a "aws/request.Request" representing the -// client's request for the GetTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTemplate for more information on using the GetTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTemplateRequest method. -// req, resp := client.GetTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetTemplate -func (c *SES) GetTemplateRequest(input *GetTemplateInput) (req *request.Request, output *GetTemplateOutput) { - op := &request.Operation{ - Name: opGetTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTemplateInput{} - } - - output = &GetTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTemplate API operation for Amazon Simple Email Service. -// -// Displays the template object (which includes the Subject line, HTML part -// and text part) for the template you specify. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation GetTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTemplateDoesNotExistException "TemplateDoesNotExist" -// Indicates that the Template object you specified does not exist in your Amazon -// SES account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetTemplate -func (c *SES) GetTemplate(input *GetTemplateInput) (*GetTemplateOutput, error) { - req, out := c.GetTemplateRequest(input) - return out, req.Send() -} - -// GetTemplateWithContext is the same as GetTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See GetTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) GetTemplateWithContext(ctx aws.Context, input *GetTemplateInput, opts ...request.Option) (*GetTemplateOutput, error) { - req, out := c.GetTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListConfigurationSets = "ListConfigurationSets" - -// ListConfigurationSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListConfigurationSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListConfigurationSets for more information on using the ListConfigurationSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListConfigurationSetsRequest method. -// req, resp := client.ListConfigurationSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListConfigurationSets -func (c *SES) ListConfigurationSetsRequest(input *ListConfigurationSetsInput) (req *request.Request, output *ListConfigurationSetsOutput) { - op := &request.Operation{ - Name: opListConfigurationSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListConfigurationSetsInput{} - } - - output = &ListConfigurationSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListConfigurationSets API operation for Amazon Simple Email Service. -// -// Provides a list of the configuration sets associated with your Amazon SES -// account in the current AWS Region. For information about using configuration -// sets, see Monitoring Your Amazon SES Sending Activity (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html) -// in the Amazon SES Developer Guide. -// -// You can execute this operation no more than once per second. This operation -// will return up to 1,000 configuration sets each time it is run. If your Amazon -// SES account has more than 1,000 configuration sets, this operation will also -// return a NextToken element. You can then execute the ListConfigurationSets -// operation again, passing the NextToken parameter and the value of the NextToken -// element to retrieve additional results. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation ListConfigurationSets for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListConfigurationSets -func (c *SES) ListConfigurationSets(input *ListConfigurationSetsInput) (*ListConfigurationSetsOutput, error) { - req, out := c.ListConfigurationSetsRequest(input) - return out, req.Send() -} - -// ListConfigurationSetsWithContext is the same as ListConfigurationSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListConfigurationSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) ListConfigurationSetsWithContext(ctx aws.Context, input *ListConfigurationSetsInput, opts ...request.Option) (*ListConfigurationSetsOutput, error) { - req, out := c.ListConfigurationSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListCustomVerificationEmailTemplates = "ListCustomVerificationEmailTemplates" - -// ListCustomVerificationEmailTemplatesRequest generates a "aws/request.Request" representing the -// client's request for the ListCustomVerificationEmailTemplates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListCustomVerificationEmailTemplates for more information on using the ListCustomVerificationEmailTemplates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListCustomVerificationEmailTemplatesRequest method. -// req, resp := client.ListCustomVerificationEmailTemplatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListCustomVerificationEmailTemplates -func (c *SES) ListCustomVerificationEmailTemplatesRequest(input *ListCustomVerificationEmailTemplatesInput) (req *request.Request, output *ListCustomVerificationEmailTemplatesOutput) { - op := &request.Operation{ - Name: opListCustomVerificationEmailTemplates, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListCustomVerificationEmailTemplatesInput{} - } - - output = &ListCustomVerificationEmailTemplatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCustomVerificationEmailTemplates API operation for Amazon Simple Email Service. -// -// Lists the existing custom verification email templates for your account in -// the current AWS Region. -// -// For more information about custom verification email templates, see Using -// Custom Verification Email Templates (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) -// in the Amazon SES Developer Guide. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation ListCustomVerificationEmailTemplates for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListCustomVerificationEmailTemplates -func (c *SES) ListCustomVerificationEmailTemplates(input *ListCustomVerificationEmailTemplatesInput) (*ListCustomVerificationEmailTemplatesOutput, error) { - req, out := c.ListCustomVerificationEmailTemplatesRequest(input) - return out, req.Send() -} - -// ListCustomVerificationEmailTemplatesWithContext is the same as ListCustomVerificationEmailTemplates with the addition of -// the ability to pass a context and additional request options. -// -// See ListCustomVerificationEmailTemplates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) ListCustomVerificationEmailTemplatesWithContext(ctx aws.Context, input *ListCustomVerificationEmailTemplatesInput, opts ...request.Option) (*ListCustomVerificationEmailTemplatesOutput, error) { - req, out := c.ListCustomVerificationEmailTemplatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListCustomVerificationEmailTemplatesPages iterates over the pages of a ListCustomVerificationEmailTemplates operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListCustomVerificationEmailTemplates 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 ListCustomVerificationEmailTemplates operation. -// pageNum := 0 -// err := client.ListCustomVerificationEmailTemplatesPages(params, -// func(page *ListCustomVerificationEmailTemplatesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SES) ListCustomVerificationEmailTemplatesPages(input *ListCustomVerificationEmailTemplatesInput, fn func(*ListCustomVerificationEmailTemplatesOutput, bool) bool) error { - return c.ListCustomVerificationEmailTemplatesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListCustomVerificationEmailTemplatesPagesWithContext same as ListCustomVerificationEmailTemplatesPages 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 *SES) ListCustomVerificationEmailTemplatesPagesWithContext(ctx aws.Context, input *ListCustomVerificationEmailTemplatesInput, fn func(*ListCustomVerificationEmailTemplatesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListCustomVerificationEmailTemplatesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListCustomVerificationEmailTemplatesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCustomVerificationEmailTemplatesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListIdentities = "ListIdentities" - -// ListIdentitiesRequest generates a "aws/request.Request" representing the -// client's request for the ListIdentities operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListIdentities for more information on using the ListIdentities -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListIdentitiesRequest method. -// req, resp := client.ListIdentitiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListIdentities -func (c *SES) ListIdentitiesRequest(input *ListIdentitiesInput) (req *request.Request, output *ListIdentitiesOutput) { - op := &request.Operation{ - Name: opListIdentities, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxItems", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListIdentitiesInput{} - } - - output = &ListIdentitiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListIdentities API operation for Amazon Simple Email Service. -// -// Returns a list containing all of the identities (email addresses and domains) -// for your AWS account in the current AWS Region, regardless of verification -// status. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation ListIdentities for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListIdentities -func (c *SES) ListIdentities(input *ListIdentitiesInput) (*ListIdentitiesOutput, error) { - req, out := c.ListIdentitiesRequest(input) - return out, req.Send() -} - -// ListIdentitiesWithContext is the same as ListIdentities with the addition of -// the ability to pass a context and additional request options. -// -// See ListIdentities for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) ListIdentitiesWithContext(ctx aws.Context, input *ListIdentitiesInput, opts ...request.Option) (*ListIdentitiesOutput, error) { - req, out := c.ListIdentitiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListIdentitiesPages iterates over the pages of a ListIdentities operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListIdentities 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 ListIdentities operation. -// pageNum := 0 -// err := client.ListIdentitiesPages(params, -// func(page *ListIdentitiesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SES) ListIdentitiesPages(input *ListIdentitiesInput, fn func(*ListIdentitiesOutput, bool) bool) error { - return c.ListIdentitiesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListIdentitiesPagesWithContext same as ListIdentitiesPages 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 *SES) ListIdentitiesPagesWithContext(ctx aws.Context, input *ListIdentitiesInput, fn func(*ListIdentitiesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListIdentitiesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListIdentitiesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListIdentitiesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListIdentityPolicies = "ListIdentityPolicies" - -// ListIdentityPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListIdentityPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListIdentityPolicies for more information on using the ListIdentityPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListIdentityPoliciesRequest method. -// req, resp := client.ListIdentityPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListIdentityPolicies -func (c *SES) ListIdentityPoliciesRequest(input *ListIdentityPoliciesInput) (req *request.Request, output *ListIdentityPoliciesOutput) { - op := &request.Operation{ - Name: opListIdentityPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListIdentityPoliciesInput{} - } - - output = &ListIdentityPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListIdentityPolicies API operation for Amazon Simple Email Service. -// -// Returns a list of sending authorization policies that are attached to the -// given identity (an email address or a domain). This API returns only a list. -// If you want the actual policy content, you can use GetIdentityPolicies. -// -// This API is for the identity owner only. If you have not verified the identity, -// this API will return an error. -// -// Sending authorization is a feature that enables an identity owner to authorize -// other senders to use its identities. For information about using sending -// authorization, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation ListIdentityPolicies for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListIdentityPolicies -func (c *SES) ListIdentityPolicies(input *ListIdentityPoliciesInput) (*ListIdentityPoliciesOutput, error) { - req, out := c.ListIdentityPoliciesRequest(input) - return out, req.Send() -} - -// ListIdentityPoliciesWithContext is the same as ListIdentityPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListIdentityPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) ListIdentityPoliciesWithContext(ctx aws.Context, input *ListIdentityPoliciesInput, opts ...request.Option) (*ListIdentityPoliciesOutput, error) { - req, out := c.ListIdentityPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListReceiptFilters = "ListReceiptFilters" - -// ListReceiptFiltersRequest generates a "aws/request.Request" representing the -// client's request for the ListReceiptFilters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListReceiptFilters for more information on using the ListReceiptFilters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListReceiptFiltersRequest method. -// req, resp := client.ListReceiptFiltersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListReceiptFilters -func (c *SES) ListReceiptFiltersRequest(input *ListReceiptFiltersInput) (req *request.Request, output *ListReceiptFiltersOutput) { - op := &request.Operation{ - Name: opListReceiptFilters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListReceiptFiltersInput{} - } - - output = &ListReceiptFiltersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListReceiptFilters API operation for Amazon Simple Email Service. -// -// Lists the IP address filters associated with your AWS account in the current -// AWS Region. -// -// For information about managing IP address filters, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-ip-filters.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation ListReceiptFilters for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListReceiptFilters -func (c *SES) ListReceiptFilters(input *ListReceiptFiltersInput) (*ListReceiptFiltersOutput, error) { - req, out := c.ListReceiptFiltersRequest(input) - return out, req.Send() -} - -// ListReceiptFiltersWithContext is the same as ListReceiptFilters with the addition of -// the ability to pass a context and additional request options. -// -// See ListReceiptFilters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) ListReceiptFiltersWithContext(ctx aws.Context, input *ListReceiptFiltersInput, opts ...request.Option) (*ListReceiptFiltersOutput, error) { - req, out := c.ListReceiptFiltersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListReceiptRuleSets = "ListReceiptRuleSets" - -// ListReceiptRuleSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListReceiptRuleSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListReceiptRuleSets for more information on using the ListReceiptRuleSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListReceiptRuleSetsRequest method. -// req, resp := client.ListReceiptRuleSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListReceiptRuleSets -func (c *SES) ListReceiptRuleSetsRequest(input *ListReceiptRuleSetsInput) (req *request.Request, output *ListReceiptRuleSetsOutput) { - op := &request.Operation{ - Name: opListReceiptRuleSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListReceiptRuleSetsInput{} - } - - output = &ListReceiptRuleSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListReceiptRuleSets API operation for Amazon Simple Email Service. -// -// Lists the receipt rule sets that exist under your AWS account in the current -// AWS Region. If there are additional receipt rule sets to be retrieved, you -// will receive a NextToken that you can provide to the next call to ListReceiptRuleSets -// to retrieve the additional entries. -// -// For information about managing receipt rule sets, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation ListReceiptRuleSets for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListReceiptRuleSets -func (c *SES) ListReceiptRuleSets(input *ListReceiptRuleSetsInput) (*ListReceiptRuleSetsOutput, error) { - req, out := c.ListReceiptRuleSetsRequest(input) - return out, req.Send() -} - -// ListReceiptRuleSetsWithContext is the same as ListReceiptRuleSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListReceiptRuleSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) ListReceiptRuleSetsWithContext(ctx aws.Context, input *ListReceiptRuleSetsInput, opts ...request.Option) (*ListReceiptRuleSetsOutput, error) { - req, out := c.ListReceiptRuleSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTemplates = "ListTemplates" - -// ListTemplatesRequest generates a "aws/request.Request" representing the -// client's request for the ListTemplates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTemplates for more information on using the ListTemplates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTemplatesRequest method. -// req, resp := client.ListTemplatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListTemplates -func (c *SES) ListTemplatesRequest(input *ListTemplatesInput) (req *request.Request, output *ListTemplatesOutput) { - op := &request.Operation{ - Name: opListTemplates, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTemplatesInput{} - } - - output = &ListTemplatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTemplates API operation for Amazon Simple Email Service. -// -// Lists the email templates present in your Amazon SES account in the current -// AWS Region. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation ListTemplates for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListTemplates -func (c *SES) ListTemplates(input *ListTemplatesInput) (*ListTemplatesOutput, error) { - req, out := c.ListTemplatesRequest(input) - return out, req.Send() -} - -// ListTemplatesWithContext is the same as ListTemplates with the addition of -// the ability to pass a context and additional request options. -// -// See ListTemplates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) ListTemplatesWithContext(ctx aws.Context, input *ListTemplatesInput, opts ...request.Option) (*ListTemplatesOutput, error) { - req, out := c.ListTemplatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListVerifiedEmailAddresses = "ListVerifiedEmailAddresses" - -// ListVerifiedEmailAddressesRequest generates a "aws/request.Request" representing the -// client's request for the ListVerifiedEmailAddresses operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListVerifiedEmailAddresses for more information on using the ListVerifiedEmailAddresses -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListVerifiedEmailAddressesRequest method. -// req, resp := client.ListVerifiedEmailAddressesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListVerifiedEmailAddresses -func (c *SES) ListVerifiedEmailAddressesRequest(input *ListVerifiedEmailAddressesInput) (req *request.Request, output *ListVerifiedEmailAddressesOutput) { - op := &request.Operation{ - Name: opListVerifiedEmailAddresses, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListVerifiedEmailAddressesInput{} - } - - output = &ListVerifiedEmailAddressesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListVerifiedEmailAddresses API operation for Amazon Simple Email Service. -// -// Deprecated. Use the ListIdentities operation to list the email addresses -// and domains associated with your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation ListVerifiedEmailAddresses for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListVerifiedEmailAddresses -func (c *SES) ListVerifiedEmailAddresses(input *ListVerifiedEmailAddressesInput) (*ListVerifiedEmailAddressesOutput, error) { - req, out := c.ListVerifiedEmailAddressesRequest(input) - return out, req.Send() -} - -// ListVerifiedEmailAddressesWithContext is the same as ListVerifiedEmailAddresses with the addition of -// the ability to pass a context and additional request options. -// -// See ListVerifiedEmailAddresses for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) ListVerifiedEmailAddressesWithContext(ctx aws.Context, input *ListVerifiedEmailAddressesInput, opts ...request.Option) (*ListVerifiedEmailAddressesOutput, error) { - req, out := c.ListVerifiedEmailAddressesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutIdentityPolicy = "PutIdentityPolicy" - -// PutIdentityPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutIdentityPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutIdentityPolicy for more information on using the PutIdentityPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutIdentityPolicyRequest method. -// req, resp := client.PutIdentityPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/PutIdentityPolicy -func (c *SES) PutIdentityPolicyRequest(input *PutIdentityPolicyInput) (req *request.Request, output *PutIdentityPolicyOutput) { - op := &request.Operation{ - Name: opPutIdentityPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutIdentityPolicyInput{} - } - - output = &PutIdentityPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutIdentityPolicy API operation for Amazon Simple Email Service. -// -// Adds or updates a sending authorization policy for the specified identity -// (an email address or a domain). -// -// This API is for the identity owner only. If you have not verified the identity, -// this API will return an error. -// -// Sending authorization is a feature that enables an identity owner to authorize -// other senders to use its identities. For information about using sending -// authorization, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation PutIdentityPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidPolicyException "InvalidPolicy" -// Indicates that the provided policy is invalid. Check the error stack for -// more information about what caused the error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/PutIdentityPolicy -func (c *SES) PutIdentityPolicy(input *PutIdentityPolicyInput) (*PutIdentityPolicyOutput, error) { - req, out := c.PutIdentityPolicyRequest(input) - return out, req.Send() -} - -// PutIdentityPolicyWithContext is the same as PutIdentityPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutIdentityPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) PutIdentityPolicyWithContext(ctx aws.Context, input *PutIdentityPolicyInput, opts ...request.Option) (*PutIdentityPolicyOutput, error) { - req, out := c.PutIdentityPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReorderReceiptRuleSet = "ReorderReceiptRuleSet" - -// ReorderReceiptRuleSetRequest generates a "aws/request.Request" representing the -// client's request for the ReorderReceiptRuleSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReorderReceiptRuleSet for more information on using the ReorderReceiptRuleSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReorderReceiptRuleSetRequest method. -// req, resp := client.ReorderReceiptRuleSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ReorderReceiptRuleSet -func (c *SES) ReorderReceiptRuleSetRequest(input *ReorderReceiptRuleSetInput) (req *request.Request, output *ReorderReceiptRuleSetOutput) { - op := &request.Operation{ - Name: opReorderReceiptRuleSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReorderReceiptRuleSetInput{} - } - - output = &ReorderReceiptRuleSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ReorderReceiptRuleSet API operation for Amazon Simple Email Service. -// -// Reorders the receipt rules within a receipt rule set. -// -// All of the rules in the rule set must be represented in this request. That -// is, this API will return an error if the reorder request doesn't explicitly -// position all of the rules. -// -// For information about managing receipt rule sets, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation ReorderReceiptRuleSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRuleSetDoesNotExistException "RuleSetDoesNotExist" -// Indicates that the provided receipt rule set does not exist. -// -// * ErrCodeRuleDoesNotExistException "RuleDoesNotExist" -// Indicates that the provided receipt rule does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ReorderReceiptRuleSet -func (c *SES) ReorderReceiptRuleSet(input *ReorderReceiptRuleSetInput) (*ReorderReceiptRuleSetOutput, error) { - req, out := c.ReorderReceiptRuleSetRequest(input) - return out, req.Send() -} - -// ReorderReceiptRuleSetWithContext is the same as ReorderReceiptRuleSet with the addition of -// the ability to pass a context and additional request options. -// -// See ReorderReceiptRuleSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) ReorderReceiptRuleSetWithContext(ctx aws.Context, input *ReorderReceiptRuleSetInput, opts ...request.Option) (*ReorderReceiptRuleSetOutput, error) { - req, out := c.ReorderReceiptRuleSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSendBounce = "SendBounce" - -// SendBounceRequest generates a "aws/request.Request" representing the -// client's request for the SendBounce operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendBounce for more information on using the SendBounce -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendBounceRequest method. -// req, resp := client.SendBounceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendBounce -func (c *SES) SendBounceRequest(input *SendBounceInput) (req *request.Request, output *SendBounceOutput) { - op := &request.Operation{ - Name: opSendBounce, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SendBounceInput{} - } - - output = &SendBounceOutput{} - req = c.newRequest(op, input, output) - return -} - -// SendBounce API operation for Amazon Simple Email Service. -// -// Generates and sends a bounce message to the sender of an email you received -// through Amazon SES. You can only use this API on an email up to 24 hours -// after you receive it. -// -// You cannot use this API to send generic bounces for mail that was not received -// by Amazon SES. -// -// For information about receiving email through Amazon SES, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation SendBounce for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMessageRejected "MessageRejected" -// Indicates that the action failed, and the message could not be sent. Check -// the error stack for more information about what caused the error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendBounce -func (c *SES) SendBounce(input *SendBounceInput) (*SendBounceOutput, error) { - req, out := c.SendBounceRequest(input) - return out, req.Send() -} - -// SendBounceWithContext is the same as SendBounce with the addition of -// the ability to pass a context and additional request options. -// -// See SendBounce for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) SendBounceWithContext(ctx aws.Context, input *SendBounceInput, opts ...request.Option) (*SendBounceOutput, error) { - req, out := c.SendBounceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSendBulkTemplatedEmail = "SendBulkTemplatedEmail" - -// SendBulkTemplatedEmailRequest generates a "aws/request.Request" representing the -// client's request for the SendBulkTemplatedEmail operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendBulkTemplatedEmail for more information on using the SendBulkTemplatedEmail -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendBulkTemplatedEmailRequest method. -// req, resp := client.SendBulkTemplatedEmailRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendBulkTemplatedEmail -func (c *SES) SendBulkTemplatedEmailRequest(input *SendBulkTemplatedEmailInput) (req *request.Request, output *SendBulkTemplatedEmailOutput) { - op := &request.Operation{ - Name: opSendBulkTemplatedEmail, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SendBulkTemplatedEmailInput{} - } - - output = &SendBulkTemplatedEmailOutput{} - req = c.newRequest(op, input, output) - return -} - -// SendBulkTemplatedEmail API operation for Amazon Simple Email Service. -// -// Composes an email message to multiple destinations. The message body is created -// using an email template. -// -// In order to send email using the SendBulkTemplatedEmail operation, your call -// to the API must meet the following requirements: -// -// * The call must refer to an existing email template. You can create email -// templates using the CreateTemplate operation. -// -// * The message must be sent from a verified email address or domain. -// -// * If your account is still in the Amazon SES sandbox, you may only send -// to verified addresses or domains, or to email addresses associated with -// the Amazon SES Mailbox Simulator. For more information, see Verifying -// Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) -// in the Amazon SES Developer Guide. -// -// * The maximum message size is 10 MB. -// -// * Each Destination parameter must include at least one recipient email -// address. The recipient address can be a To: address, a CC: address, or -// a BCC: address. If a recipient email address is invalid (that is, it is -// not in the format UserName@[SubDomain.]Domain.TopLevelDomain), the entire -// message will be rejected, even if the message contains other recipients -// that are valid. -// -// * The message may not include more than 50 recipients, across the To:, -// CC: and BCC: fields. If you need to send an email message to a larger -// audience, you can divide your recipient list into groups of 50 or fewer, -// and then call the SendBulkTemplatedEmail operation several times to send -// the message to each group. -// -// * The number of destinations you can contact in a single call to the API -// may be limited by your account's maximum sending rate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation SendBulkTemplatedEmail for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMessageRejected "MessageRejected" -// Indicates that the action failed, and the message could not be sent. Check -// the error stack for more information about what caused the error. -// -// * ErrCodeMailFromDomainNotVerifiedException "MailFromDomainNotVerifiedException" -// Indicates that the message could not be sent because Amazon SES could not -// read the MX record required to use the specified MAIL FROM domain. For information -// about editing the custom MAIL FROM domain settings for an identity, see the -// Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html). -// -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// * ErrCodeTemplateDoesNotExistException "TemplateDoesNotExist" -// Indicates that the Template object you specified does not exist in your Amazon -// SES account. -// -// * ErrCodeConfigurationSetSendingPausedException "ConfigurationSetSendingPausedException" -// Indicates that email sending is disabled for the configuration set. -// -// You can enable or disable email sending for a configuration set using UpdateConfigurationSetSendingEnabled. -// -// * ErrCodeAccountSendingPausedException "AccountSendingPausedException" -// Indicates that email sending is disabled for your entire Amazon SES account. -// -// You can enable or disable email sending for your Amazon SES account using -// UpdateAccountSendingEnabled. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendBulkTemplatedEmail -func (c *SES) SendBulkTemplatedEmail(input *SendBulkTemplatedEmailInput) (*SendBulkTemplatedEmailOutput, error) { - req, out := c.SendBulkTemplatedEmailRequest(input) - return out, req.Send() -} - -// SendBulkTemplatedEmailWithContext is the same as SendBulkTemplatedEmail with the addition of -// the ability to pass a context and additional request options. -// -// See SendBulkTemplatedEmail for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) SendBulkTemplatedEmailWithContext(ctx aws.Context, input *SendBulkTemplatedEmailInput, opts ...request.Option) (*SendBulkTemplatedEmailOutput, error) { - req, out := c.SendBulkTemplatedEmailRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSendCustomVerificationEmail = "SendCustomVerificationEmail" - -// SendCustomVerificationEmailRequest generates a "aws/request.Request" representing the -// client's request for the SendCustomVerificationEmail operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendCustomVerificationEmail for more information on using the SendCustomVerificationEmail -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendCustomVerificationEmailRequest method. -// req, resp := client.SendCustomVerificationEmailRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendCustomVerificationEmail -func (c *SES) SendCustomVerificationEmailRequest(input *SendCustomVerificationEmailInput) (req *request.Request, output *SendCustomVerificationEmailOutput) { - op := &request.Operation{ - Name: opSendCustomVerificationEmail, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SendCustomVerificationEmailInput{} - } - - output = &SendCustomVerificationEmailOutput{} - req = c.newRequest(op, input, output) - return -} - -// SendCustomVerificationEmail API operation for Amazon Simple Email Service. -// -// Adds an email address to the list of identities for your Amazon SES account -// in the current AWS Region and attempts to verify it. As a result of executing -// this operation, a customized verification email is sent to the specified -// address. -// -// To use this operation, you must first create a custom verification email -// template. For more information about creating and using custom verification -// email templates, see Using Custom Verification Email Templates (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) -// in the Amazon SES Developer Guide. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation SendCustomVerificationEmail for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMessageRejected "MessageRejected" -// Indicates that the action failed, and the message could not be sent. Check -// the error stack for more information about what caused the error. -// -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// * ErrCodeCustomVerificationEmailTemplateDoesNotExistException "CustomVerificationEmailTemplateDoesNotExist" -// Indicates that a custom verification email template with the name you specified -// does not exist. -// -// * ErrCodeFromEmailAddressNotVerifiedException "FromEmailAddressNotVerified" -// Indicates that the sender address specified for a custom verification email -// is not verified, and is therefore not eligible to send the custom verification -// email. -// -// * ErrCodeProductionAccessNotGrantedException "ProductionAccessNotGranted" -// Indicates that the account has not been granted production access. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendCustomVerificationEmail -func (c *SES) SendCustomVerificationEmail(input *SendCustomVerificationEmailInput) (*SendCustomVerificationEmailOutput, error) { - req, out := c.SendCustomVerificationEmailRequest(input) - return out, req.Send() -} - -// SendCustomVerificationEmailWithContext is the same as SendCustomVerificationEmail with the addition of -// the ability to pass a context and additional request options. -// -// See SendCustomVerificationEmail for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) SendCustomVerificationEmailWithContext(ctx aws.Context, input *SendCustomVerificationEmailInput, opts ...request.Option) (*SendCustomVerificationEmailOutput, error) { - req, out := c.SendCustomVerificationEmailRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSendEmail = "SendEmail" - -// SendEmailRequest generates a "aws/request.Request" representing the -// client's request for the SendEmail operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendEmail for more information on using the SendEmail -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendEmailRequest method. -// req, resp := client.SendEmailRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendEmail -func (c *SES) SendEmailRequest(input *SendEmailInput) (req *request.Request, output *SendEmailOutput) { - op := &request.Operation{ - Name: opSendEmail, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SendEmailInput{} - } - - output = &SendEmailOutput{} - req = c.newRequest(op, input, output) - return -} - -// SendEmail API operation for Amazon Simple Email Service. -// -// Composes an email message and immediately queues it for sending. In order -// to send email using the SendEmail operation, your message must meet the following -// requirements: -// -// * The message must be sent from a verified email address or domain. If -// you attempt to send email using a non-verified address or domain, the -// operation will result in an "Email address not verified" error. -// -// * If your account is still in the Amazon SES sandbox, you may only send -// to verified addresses or domains, or to email addresses associated with -// the Amazon SES Mailbox Simulator. For more information, see Verifying -// Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) -// in the Amazon SES Developer Guide. -// -// * The maximum message size is 10 MB. -// -// * The message must include at least one recipient email address. The recipient -// address can be a To: address, a CC: address, or a BCC: address. If a recipient -// email address is invalid (that is, it is not in the format UserName@[SubDomain.]Domain.TopLevelDomain), -// the entire message will be rejected, even if the message contains other -// recipients that are valid. -// -// * The message may not include more than 50 recipients, across the To:, -// CC: and BCC: fields. If you need to send an email message to a larger -// audience, you can divide your recipient list into groups of 50 or fewer, -// and then call the SendEmail operation several times to send the message -// to each group. -// -// For every message that you send, the total number of recipients (including -// each recipient in the To:, CC: and BCC: fields) is counted against the maximum -// number of emails you can send in a 24-hour period (your sending quota). For -// more information about sending quotas in Amazon SES, see Managing Your Amazon -// SES Sending Limits (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html) -// in the Amazon SES Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation SendEmail for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMessageRejected "MessageRejected" -// Indicates that the action failed, and the message could not be sent. Check -// the error stack for more information about what caused the error. -// -// * ErrCodeMailFromDomainNotVerifiedException "MailFromDomainNotVerifiedException" -// Indicates that the message could not be sent because Amazon SES could not -// read the MX record required to use the specified MAIL FROM domain. For information -// about editing the custom MAIL FROM domain settings for an identity, see the -// Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html). -// -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// * ErrCodeConfigurationSetSendingPausedException "ConfigurationSetSendingPausedException" -// Indicates that email sending is disabled for the configuration set. -// -// You can enable or disable email sending for a configuration set using UpdateConfigurationSetSendingEnabled. -// -// * ErrCodeAccountSendingPausedException "AccountSendingPausedException" -// Indicates that email sending is disabled for your entire Amazon SES account. -// -// You can enable or disable email sending for your Amazon SES account using -// UpdateAccountSendingEnabled. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendEmail -func (c *SES) SendEmail(input *SendEmailInput) (*SendEmailOutput, error) { - req, out := c.SendEmailRequest(input) - return out, req.Send() -} - -// SendEmailWithContext is the same as SendEmail with the addition of -// the ability to pass a context and additional request options. -// -// See SendEmail for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) SendEmailWithContext(ctx aws.Context, input *SendEmailInput, opts ...request.Option) (*SendEmailOutput, error) { - req, out := c.SendEmailRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSendRawEmail = "SendRawEmail" - -// SendRawEmailRequest generates a "aws/request.Request" representing the -// client's request for the SendRawEmail operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendRawEmail for more information on using the SendRawEmail -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendRawEmailRequest method. -// req, resp := client.SendRawEmailRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendRawEmail -func (c *SES) SendRawEmailRequest(input *SendRawEmailInput) (req *request.Request, output *SendRawEmailOutput) { - op := &request.Operation{ - Name: opSendRawEmail, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SendRawEmailInput{} - } - - output = &SendRawEmailOutput{} - req = c.newRequest(op, input, output) - return -} - -// SendRawEmail API operation for Amazon Simple Email Service. -// -// Composes an email message and immediately queues it for sending. -// -// This operation is more flexible than the SendEmail API operation. When you -// use the SendRawEmail operation, you can specify the headers of the message -// as well as its content. This flexibility is useful, for example, when you -// want to send a multipart MIME email (such a message that contains both a -// text and an HTML version). You can also use this operation to send messages -// that include attachments. -// -// The SendRawEmail operation has the following requirements: -// -// * You can only send email from verified email addresses or domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html). -// If you try to send email from an address that isn't verified, the operation -// results in an "Email address not verified" error. -// -// * If your account is still in the Amazon SES sandbox (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html), -// you can only send email to other verified addresses in your account, or -// to addresses that are associated with the Amazon SES mailbox simulator -// (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mailbox-simulator.html). -// -// * The maximum message size, including attachments, is 10 MB. -// -// * Each message has to include at least one recipient address. A recipient -// address includes any address on the To:, CC:, or BCC: lines. -// -// * If you send a single message to more than one recipient address, and -// one of the recipient addresses isn't in a valid format (that is, it's -// not in the format UserName@[SubDomain.]Domain.TopLevelDomain), Amazon -// SES rejects the entire message, even if the other addresses are valid. -// -// * Each message can include up to 50 recipient addresses across the To:, -// CC:, or BCC: lines. If you need to send a single message to more than -// 50 recipients, you have to split the list of recipient addresses into -// groups of less than 50 recipients, and send separate messages to each -// group. -// -// * Amazon SES allows you to specify 8-bit Content-Transfer-Encoding for -// MIME message parts. However, if Amazon SES has to modify the contents -// of your message (for example, if you use open and click tracking), 8-bit -// content isn't preserved. For this reason, we highly recommend that you -// encode all content that isn't 7-bit ASCII. For more information, see MIME -// Encoding (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html#send-email-mime-encoding) -// in the Amazon SES Developer Guide. -// -// Additionally, keep the following considerations in mind when using the SendRawEmail -// operation: -// -// * Although you can customize the message headers when using the SendRawEmail -// operation, Amazon SES will automatically apply its own Message-ID and -// Date headers; if you passed these headers when creating the message, they -// will be overwritten by the values that Amazon SES provides. -// -// * If you are using sending authorization to send on behalf of another -// user, SendRawEmail enables you to specify the cross-account identity for -// the email's Source, From, and Return-Path parameters in one of two ways: -// you can pass optional parameters SourceArn, FromArn, and/or ReturnPathArn -// to the API, or you can include the following X-headers in the header of -// your raw email: -// -// X-SES-SOURCE-ARN -// -// X-SES-FROM-ARN -// -// X-SES-RETURN-PATH-ARN -// -// Do not include these X-headers in the DKIM signature; Amazon SES will remove -// them before sending the email. -// -// For most common sending authorization scenarios, we recommend that you specify -// the SourceIdentityArn parameter and not the FromIdentityArn or ReturnPathIdentityArn -// parameters. If you only specify the SourceIdentityArn parameter, Amazon -// SES will set the From and Return Path addresses to the identity specified -// in SourceIdentityArn. For more information about sending authorization, -// see the Using Sending Authorization with Amazon SES (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html) -// in the Amazon SES Developer Guide. -// -// * For every message that you send, the total number of recipients (including -// each recipient in the To:, CC: and BCC: fields) is counted against the -// maximum number of emails you can send in a 24-hour period (your sending -// quota). For more information about sending quotas in Amazon SES, see Managing -// Your Amazon SES Sending Limits (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html) -// in the Amazon SES Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation SendRawEmail for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMessageRejected "MessageRejected" -// Indicates that the action failed, and the message could not be sent. Check -// the error stack for more information about what caused the error. -// -// * ErrCodeMailFromDomainNotVerifiedException "MailFromDomainNotVerifiedException" -// Indicates that the message could not be sent because Amazon SES could not -// read the MX record required to use the specified MAIL FROM domain. For information -// about editing the custom MAIL FROM domain settings for an identity, see the -// Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html). -// -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// * ErrCodeConfigurationSetSendingPausedException "ConfigurationSetSendingPausedException" -// Indicates that email sending is disabled for the configuration set. -// -// You can enable or disable email sending for a configuration set using UpdateConfigurationSetSendingEnabled. -// -// * ErrCodeAccountSendingPausedException "AccountSendingPausedException" -// Indicates that email sending is disabled for your entire Amazon SES account. -// -// You can enable or disable email sending for your Amazon SES account using -// UpdateAccountSendingEnabled. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendRawEmail -func (c *SES) SendRawEmail(input *SendRawEmailInput) (*SendRawEmailOutput, error) { - req, out := c.SendRawEmailRequest(input) - return out, req.Send() -} - -// SendRawEmailWithContext is the same as SendRawEmail with the addition of -// the ability to pass a context and additional request options. -// -// See SendRawEmail for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) SendRawEmailWithContext(ctx aws.Context, input *SendRawEmailInput, opts ...request.Option) (*SendRawEmailOutput, error) { - req, out := c.SendRawEmailRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSendTemplatedEmail = "SendTemplatedEmail" - -// SendTemplatedEmailRequest generates a "aws/request.Request" representing the -// client's request for the SendTemplatedEmail operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendTemplatedEmail for more information on using the SendTemplatedEmail -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendTemplatedEmailRequest method. -// req, resp := client.SendTemplatedEmailRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendTemplatedEmail -func (c *SES) SendTemplatedEmailRequest(input *SendTemplatedEmailInput) (req *request.Request, output *SendTemplatedEmailOutput) { - op := &request.Operation{ - Name: opSendTemplatedEmail, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SendTemplatedEmailInput{} - } - - output = &SendTemplatedEmailOutput{} - req = c.newRequest(op, input, output) - return -} - -// SendTemplatedEmail API operation for Amazon Simple Email Service. -// -// Composes an email message using an email template and immediately queues -// it for sending. -// -// In order to send email using the SendTemplatedEmail operation, your call -// to the API must meet the following requirements: -// -// * The call must refer to an existing email template. You can create email -// templates using the CreateTemplate operation. -// -// * The message must be sent from a verified email address or domain. -// -// * If your account is still in the Amazon SES sandbox, you may only send -// to verified addresses or domains, or to email addresses associated with -// the Amazon SES Mailbox Simulator. For more information, see Verifying -// Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) -// in the Amazon SES Developer Guide. -// -// * The maximum message size is 10 MB. -// -// * Calls to the SendTemplatedEmail operation may only include one Destination -// parameter. A destination is a set of recipients who will receive the same -// version of the email. The Destination parameter can include up to 50 recipients, -// across the To:, CC: and BCC: fields. -// -// * The Destination parameter must include at least one recipient email -// address. The recipient address can be a To: address, a CC: address, or -// a BCC: address. If a recipient email address is invalid (that is, it is -// not in the format UserName@[SubDomain.]Domain.TopLevelDomain), the entire -// message will be rejected, even if the message contains other recipients -// that are valid. -// -// If your call to the SendTemplatedEmail operation includes all of the required -// parameters, Amazon SES accepts it and returns a Message ID. However, if Amazon -// SES can't render the email because the template contains errors, it doesn't -// send the email. Additionally, because it already accepted the message, Amazon -// SES doesn't return a message stating that it was unable to send the email. -// -// For these reasons, we highly recommend that you set up Amazon SES to send -// you notifications when Rendering Failure events occur. For more information, -// see Sending Personalized Email Using the Amazon SES API (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html) -// in the Amazon Simple Email Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation SendTemplatedEmail for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMessageRejected "MessageRejected" -// Indicates that the action failed, and the message could not be sent. Check -// the error stack for more information about what caused the error. -// -// * ErrCodeMailFromDomainNotVerifiedException "MailFromDomainNotVerifiedException" -// Indicates that the message could not be sent because Amazon SES could not -// read the MX record required to use the specified MAIL FROM domain. For information -// about editing the custom MAIL FROM domain settings for an identity, see the -// Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html). -// -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// * ErrCodeTemplateDoesNotExistException "TemplateDoesNotExist" -// Indicates that the Template object you specified does not exist in your Amazon -// SES account. -// -// * ErrCodeConfigurationSetSendingPausedException "ConfigurationSetSendingPausedException" -// Indicates that email sending is disabled for the configuration set. -// -// You can enable or disable email sending for a configuration set using UpdateConfigurationSetSendingEnabled. -// -// * ErrCodeAccountSendingPausedException "AccountSendingPausedException" -// Indicates that email sending is disabled for your entire Amazon SES account. -// -// You can enable or disable email sending for your Amazon SES account using -// UpdateAccountSendingEnabled. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendTemplatedEmail -func (c *SES) SendTemplatedEmail(input *SendTemplatedEmailInput) (*SendTemplatedEmailOutput, error) { - req, out := c.SendTemplatedEmailRequest(input) - return out, req.Send() -} - -// SendTemplatedEmailWithContext is the same as SendTemplatedEmail with the addition of -// the ability to pass a context and additional request options. -// -// See SendTemplatedEmail for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) SendTemplatedEmailWithContext(ctx aws.Context, input *SendTemplatedEmailInput, opts ...request.Option) (*SendTemplatedEmailOutput, error) { - req, out := c.SendTemplatedEmailRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetActiveReceiptRuleSet = "SetActiveReceiptRuleSet" - -// SetActiveReceiptRuleSetRequest generates a "aws/request.Request" representing the -// client's request for the SetActiveReceiptRuleSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetActiveReceiptRuleSet for more information on using the SetActiveReceiptRuleSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetActiveReceiptRuleSetRequest method. -// req, resp := client.SetActiveReceiptRuleSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetActiveReceiptRuleSet -func (c *SES) SetActiveReceiptRuleSetRequest(input *SetActiveReceiptRuleSetInput) (req *request.Request, output *SetActiveReceiptRuleSetOutput) { - op := &request.Operation{ - Name: opSetActiveReceiptRuleSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetActiveReceiptRuleSetInput{} - } - - output = &SetActiveReceiptRuleSetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetActiveReceiptRuleSet API operation for Amazon Simple Email Service. -// -// Sets the specified receipt rule set as the active receipt rule set. -// -// To disable your email-receiving through Amazon SES completely, you can call -// this API with RuleSetName set to null. -// -// For information about managing receipt rule sets, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation SetActiveReceiptRuleSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRuleSetDoesNotExistException "RuleSetDoesNotExist" -// Indicates that the provided receipt rule set does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetActiveReceiptRuleSet -func (c *SES) SetActiveReceiptRuleSet(input *SetActiveReceiptRuleSetInput) (*SetActiveReceiptRuleSetOutput, error) { - req, out := c.SetActiveReceiptRuleSetRequest(input) - return out, req.Send() -} - -// SetActiveReceiptRuleSetWithContext is the same as SetActiveReceiptRuleSet with the addition of -// the ability to pass a context and additional request options. -// -// See SetActiveReceiptRuleSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) SetActiveReceiptRuleSetWithContext(ctx aws.Context, input *SetActiveReceiptRuleSetInput, opts ...request.Option) (*SetActiveReceiptRuleSetOutput, error) { - req, out := c.SetActiveReceiptRuleSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetIdentityDkimEnabled = "SetIdentityDkimEnabled" - -// SetIdentityDkimEnabledRequest generates a "aws/request.Request" representing the -// client's request for the SetIdentityDkimEnabled operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetIdentityDkimEnabled for more information on using the SetIdentityDkimEnabled -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetIdentityDkimEnabledRequest method. -// req, resp := client.SetIdentityDkimEnabledRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityDkimEnabled -func (c *SES) SetIdentityDkimEnabledRequest(input *SetIdentityDkimEnabledInput) (req *request.Request, output *SetIdentityDkimEnabledOutput) { - op := &request.Operation{ - Name: opSetIdentityDkimEnabled, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetIdentityDkimEnabledInput{} - } - - output = &SetIdentityDkimEnabledOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetIdentityDkimEnabled API operation for Amazon Simple Email Service. -// -// Enables or disables Easy DKIM signing of email sent from an identity: -// -// * If Easy DKIM signing is enabled for a domain name identity (such as -// example.com), then Amazon SES will DKIM-sign all email sent by addresses -// under that domain name (for example, user@example.com). -// -// * If Easy DKIM signing is enabled for an email address, then Amazon SES -// will DKIM-sign all email sent by that email address. -// -// For email addresses (for example, user@example.com), you can only enable -// Easy DKIM signing if the corresponding domain (in this case, example.com) -// has been set up for Easy DKIM using the AWS Console or the VerifyDomainDkim -// operation. -// -// You can execute this operation no more than once per second. -// -// For more information about Easy DKIM signing, go to the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation SetIdentityDkimEnabled for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityDkimEnabled -func (c *SES) SetIdentityDkimEnabled(input *SetIdentityDkimEnabledInput) (*SetIdentityDkimEnabledOutput, error) { - req, out := c.SetIdentityDkimEnabledRequest(input) - return out, req.Send() -} - -// SetIdentityDkimEnabledWithContext is the same as SetIdentityDkimEnabled with the addition of -// the ability to pass a context and additional request options. -// -// See SetIdentityDkimEnabled for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) SetIdentityDkimEnabledWithContext(ctx aws.Context, input *SetIdentityDkimEnabledInput, opts ...request.Option) (*SetIdentityDkimEnabledOutput, error) { - req, out := c.SetIdentityDkimEnabledRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetIdentityFeedbackForwardingEnabled = "SetIdentityFeedbackForwardingEnabled" - -// SetIdentityFeedbackForwardingEnabledRequest generates a "aws/request.Request" representing the -// client's request for the SetIdentityFeedbackForwardingEnabled operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetIdentityFeedbackForwardingEnabled for more information on using the SetIdentityFeedbackForwardingEnabled -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetIdentityFeedbackForwardingEnabledRequest method. -// req, resp := client.SetIdentityFeedbackForwardingEnabledRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityFeedbackForwardingEnabled -func (c *SES) SetIdentityFeedbackForwardingEnabledRequest(input *SetIdentityFeedbackForwardingEnabledInput) (req *request.Request, output *SetIdentityFeedbackForwardingEnabledOutput) { - op := &request.Operation{ - Name: opSetIdentityFeedbackForwardingEnabled, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetIdentityFeedbackForwardingEnabledInput{} - } - - output = &SetIdentityFeedbackForwardingEnabledOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetIdentityFeedbackForwardingEnabled API operation for Amazon Simple Email Service. -// -// Given an identity (an email address or a domain), enables or disables whether -// Amazon SES forwards bounce and complaint notifications as email. Feedback -// forwarding can only be disabled when Amazon Simple Notification Service (Amazon -// SNS) topics are specified for both bounces and complaints. -// -// Feedback forwarding does not apply to delivery notifications. Delivery notifications -// are only available through Amazon SNS. -// -// You can execute this operation no more than once per second. -// -// For more information about using notifications with Amazon SES, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation SetIdentityFeedbackForwardingEnabled for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityFeedbackForwardingEnabled -func (c *SES) SetIdentityFeedbackForwardingEnabled(input *SetIdentityFeedbackForwardingEnabledInput) (*SetIdentityFeedbackForwardingEnabledOutput, error) { - req, out := c.SetIdentityFeedbackForwardingEnabledRequest(input) - return out, req.Send() -} - -// SetIdentityFeedbackForwardingEnabledWithContext is the same as SetIdentityFeedbackForwardingEnabled with the addition of -// the ability to pass a context and additional request options. -// -// See SetIdentityFeedbackForwardingEnabled for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) SetIdentityFeedbackForwardingEnabledWithContext(ctx aws.Context, input *SetIdentityFeedbackForwardingEnabledInput, opts ...request.Option) (*SetIdentityFeedbackForwardingEnabledOutput, error) { - req, out := c.SetIdentityFeedbackForwardingEnabledRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetIdentityHeadersInNotificationsEnabled = "SetIdentityHeadersInNotificationsEnabled" - -// SetIdentityHeadersInNotificationsEnabledRequest generates a "aws/request.Request" representing the -// client's request for the SetIdentityHeadersInNotificationsEnabled operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetIdentityHeadersInNotificationsEnabled for more information on using the SetIdentityHeadersInNotificationsEnabled -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetIdentityHeadersInNotificationsEnabledRequest method. -// req, resp := client.SetIdentityHeadersInNotificationsEnabledRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityHeadersInNotificationsEnabled -func (c *SES) SetIdentityHeadersInNotificationsEnabledRequest(input *SetIdentityHeadersInNotificationsEnabledInput) (req *request.Request, output *SetIdentityHeadersInNotificationsEnabledOutput) { - op := &request.Operation{ - Name: opSetIdentityHeadersInNotificationsEnabled, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetIdentityHeadersInNotificationsEnabledInput{} - } - - output = &SetIdentityHeadersInNotificationsEnabledOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetIdentityHeadersInNotificationsEnabled API operation for Amazon Simple Email Service. -// -// Given an identity (an email address or a domain), sets whether Amazon SES -// includes the original email headers in the Amazon Simple Notification Service -// (Amazon SNS) notifications of a specified type. -// -// You can execute this operation no more than once per second. -// -// For more information about using notifications with Amazon SES, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation SetIdentityHeadersInNotificationsEnabled for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityHeadersInNotificationsEnabled -func (c *SES) SetIdentityHeadersInNotificationsEnabled(input *SetIdentityHeadersInNotificationsEnabledInput) (*SetIdentityHeadersInNotificationsEnabledOutput, error) { - req, out := c.SetIdentityHeadersInNotificationsEnabledRequest(input) - return out, req.Send() -} - -// SetIdentityHeadersInNotificationsEnabledWithContext is the same as SetIdentityHeadersInNotificationsEnabled with the addition of -// the ability to pass a context and additional request options. -// -// See SetIdentityHeadersInNotificationsEnabled for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) SetIdentityHeadersInNotificationsEnabledWithContext(ctx aws.Context, input *SetIdentityHeadersInNotificationsEnabledInput, opts ...request.Option) (*SetIdentityHeadersInNotificationsEnabledOutput, error) { - req, out := c.SetIdentityHeadersInNotificationsEnabledRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetIdentityMailFromDomain = "SetIdentityMailFromDomain" - -// SetIdentityMailFromDomainRequest generates a "aws/request.Request" representing the -// client's request for the SetIdentityMailFromDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetIdentityMailFromDomain for more information on using the SetIdentityMailFromDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetIdentityMailFromDomainRequest method. -// req, resp := client.SetIdentityMailFromDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityMailFromDomain -func (c *SES) SetIdentityMailFromDomainRequest(input *SetIdentityMailFromDomainInput) (req *request.Request, output *SetIdentityMailFromDomainOutput) { - op := &request.Operation{ - Name: opSetIdentityMailFromDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetIdentityMailFromDomainInput{} - } - - output = &SetIdentityMailFromDomainOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetIdentityMailFromDomain API operation for Amazon Simple Email Service. -// -// Enables or disables the custom MAIL FROM domain setup for a verified identity -// (an email address or a domain). -// -// To send emails using the specified MAIL FROM domain, you must add an MX record -// to your MAIL FROM domain's DNS settings. If you want your emails to pass -// Sender Policy Framework (SPF) checks, you must also add or update an SPF -// record. For more information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-set.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation SetIdentityMailFromDomain for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityMailFromDomain -func (c *SES) SetIdentityMailFromDomain(input *SetIdentityMailFromDomainInput) (*SetIdentityMailFromDomainOutput, error) { - req, out := c.SetIdentityMailFromDomainRequest(input) - return out, req.Send() -} - -// SetIdentityMailFromDomainWithContext is the same as SetIdentityMailFromDomain with the addition of -// the ability to pass a context and additional request options. -// -// See SetIdentityMailFromDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) SetIdentityMailFromDomainWithContext(ctx aws.Context, input *SetIdentityMailFromDomainInput, opts ...request.Option) (*SetIdentityMailFromDomainOutput, error) { - req, out := c.SetIdentityMailFromDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetIdentityNotificationTopic = "SetIdentityNotificationTopic" - -// SetIdentityNotificationTopicRequest generates a "aws/request.Request" representing the -// client's request for the SetIdentityNotificationTopic operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetIdentityNotificationTopic for more information on using the SetIdentityNotificationTopic -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetIdentityNotificationTopicRequest method. -// req, resp := client.SetIdentityNotificationTopicRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityNotificationTopic -func (c *SES) SetIdentityNotificationTopicRequest(input *SetIdentityNotificationTopicInput) (req *request.Request, output *SetIdentityNotificationTopicOutput) { - op := &request.Operation{ - Name: opSetIdentityNotificationTopic, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetIdentityNotificationTopicInput{} - } - - output = &SetIdentityNotificationTopicOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetIdentityNotificationTopic API operation for Amazon Simple Email Service. -// -// Sets an Amazon Simple Notification Service (Amazon SNS) topic to use when -// delivering notifications. When you use this operation, you specify a verified -// identity, such as an email address or domain. When you send an email that -// uses the chosen identity in the Source field, Amazon SES sends notifications -// to the topic you specified. You can send bounce, complaint, or delivery notifications -// (or any combination of the three) to the Amazon SNS topic that you specify. -// -// You can execute this operation no more than once per second. -// -// For more information about feedback notification, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation SetIdentityNotificationTopic for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityNotificationTopic -func (c *SES) SetIdentityNotificationTopic(input *SetIdentityNotificationTopicInput) (*SetIdentityNotificationTopicOutput, error) { - req, out := c.SetIdentityNotificationTopicRequest(input) - return out, req.Send() -} - -// SetIdentityNotificationTopicWithContext is the same as SetIdentityNotificationTopic with the addition of -// the ability to pass a context and additional request options. -// -// See SetIdentityNotificationTopic for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) SetIdentityNotificationTopicWithContext(ctx aws.Context, input *SetIdentityNotificationTopicInput, opts ...request.Option) (*SetIdentityNotificationTopicOutput, error) { - req, out := c.SetIdentityNotificationTopicRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetReceiptRulePosition = "SetReceiptRulePosition" - -// SetReceiptRulePositionRequest generates a "aws/request.Request" representing the -// client's request for the SetReceiptRulePosition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetReceiptRulePosition for more information on using the SetReceiptRulePosition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetReceiptRulePositionRequest method. -// req, resp := client.SetReceiptRulePositionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetReceiptRulePosition -func (c *SES) SetReceiptRulePositionRequest(input *SetReceiptRulePositionInput) (req *request.Request, output *SetReceiptRulePositionOutput) { - op := &request.Operation{ - Name: opSetReceiptRulePosition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetReceiptRulePositionInput{} - } - - output = &SetReceiptRulePositionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetReceiptRulePosition API operation for Amazon Simple Email Service. -// -// Sets the position of the specified receipt rule in the receipt rule set. -// -// For information about managing receipt rules, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rules.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation SetReceiptRulePosition for usage and error information. -// -// Returned Error Codes: -// * ErrCodeRuleSetDoesNotExistException "RuleSetDoesNotExist" -// Indicates that the provided receipt rule set does not exist. -// -// * ErrCodeRuleDoesNotExistException "RuleDoesNotExist" -// Indicates that the provided receipt rule does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetReceiptRulePosition -func (c *SES) SetReceiptRulePosition(input *SetReceiptRulePositionInput) (*SetReceiptRulePositionOutput, error) { - req, out := c.SetReceiptRulePositionRequest(input) - return out, req.Send() -} - -// SetReceiptRulePositionWithContext is the same as SetReceiptRulePosition with the addition of -// the ability to pass a context and additional request options. -// -// See SetReceiptRulePosition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) SetReceiptRulePositionWithContext(ctx aws.Context, input *SetReceiptRulePositionInput, opts ...request.Option) (*SetReceiptRulePositionOutput, error) { - req, out := c.SetReceiptRulePositionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTestRenderTemplate = "TestRenderTemplate" - -// TestRenderTemplateRequest generates a "aws/request.Request" representing the -// client's request for the TestRenderTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TestRenderTemplate for more information on using the TestRenderTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TestRenderTemplateRequest method. -// req, resp := client.TestRenderTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/TestRenderTemplate -func (c *SES) TestRenderTemplateRequest(input *TestRenderTemplateInput) (req *request.Request, output *TestRenderTemplateOutput) { - op := &request.Operation{ - Name: opTestRenderTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TestRenderTemplateInput{} - } - - output = &TestRenderTemplateOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestRenderTemplate API operation for Amazon Simple Email Service. -// -// Creates a preview of the MIME content of an email when provided with a template -// and a set of replacement data. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation TestRenderTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTemplateDoesNotExistException "TemplateDoesNotExist" -// Indicates that the Template object you specified does not exist in your Amazon -// SES account. -// -// * ErrCodeInvalidRenderingParameterException "InvalidRenderingParameter" -// Indicates that one or more of the replacement values you provided is invalid. -// This error may occur when the TemplateData object contains invalid JSON. -// -// * ErrCodeMissingRenderingAttributeException "MissingRenderingAttribute" -// Indicates that one or more of the replacement values for the specified template -// was not specified. Ensure that the TemplateData object contains references -// to all of the replacement tags in the specified template. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/TestRenderTemplate -func (c *SES) TestRenderTemplate(input *TestRenderTemplateInput) (*TestRenderTemplateOutput, error) { - req, out := c.TestRenderTemplateRequest(input) - return out, req.Send() -} - -// TestRenderTemplateWithContext is the same as TestRenderTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See TestRenderTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) TestRenderTemplateWithContext(ctx aws.Context, input *TestRenderTemplateInput, opts ...request.Option) (*TestRenderTemplateOutput, error) { - req, out := c.TestRenderTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAccountSendingEnabled = "UpdateAccountSendingEnabled" - -// UpdateAccountSendingEnabledRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAccountSendingEnabled operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAccountSendingEnabled for more information on using the UpdateAccountSendingEnabled -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAccountSendingEnabledRequest method. -// req, resp := client.UpdateAccountSendingEnabledRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateAccountSendingEnabled -func (c *SES) UpdateAccountSendingEnabledRequest(input *UpdateAccountSendingEnabledInput) (req *request.Request, output *UpdateAccountSendingEnabledOutput) { - op := &request.Operation{ - Name: opUpdateAccountSendingEnabled, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAccountSendingEnabledInput{} - } - - output = &UpdateAccountSendingEnabledOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateAccountSendingEnabled API operation for Amazon Simple Email Service. -// -// Enables or disables email sending across your entire Amazon SES account in -// the current AWS Region. You can use this operation in conjunction with Amazon -// CloudWatch alarms to temporarily pause email sending across your Amazon SES -// account in a given AWS Region when reputation metrics (such as your bounce -// or complaint rates) reach certain thresholds. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation UpdateAccountSendingEnabled for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateAccountSendingEnabled -func (c *SES) UpdateAccountSendingEnabled(input *UpdateAccountSendingEnabledInput) (*UpdateAccountSendingEnabledOutput, error) { - req, out := c.UpdateAccountSendingEnabledRequest(input) - return out, req.Send() -} - -// UpdateAccountSendingEnabledWithContext is the same as UpdateAccountSendingEnabled with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAccountSendingEnabled for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) UpdateAccountSendingEnabledWithContext(ctx aws.Context, input *UpdateAccountSendingEnabledInput, opts ...request.Option) (*UpdateAccountSendingEnabledOutput, error) { - req, out := c.UpdateAccountSendingEnabledRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateConfigurationSetEventDestination = "UpdateConfigurationSetEventDestination" - -// UpdateConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateConfigurationSetEventDestination operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateConfigurationSetEventDestination for more information on using the UpdateConfigurationSetEventDestination -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateConfigurationSetEventDestinationRequest method. -// req, resp := client.UpdateConfigurationSetEventDestinationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetEventDestination -func (c *SES) UpdateConfigurationSetEventDestinationRequest(input *UpdateConfigurationSetEventDestinationInput) (req *request.Request, output *UpdateConfigurationSetEventDestinationOutput) { - op := &request.Operation{ - Name: opUpdateConfigurationSetEventDestination, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateConfigurationSetEventDestinationInput{} - } - - output = &UpdateConfigurationSetEventDestinationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateConfigurationSetEventDestination API operation for Amazon Simple Email Service. -// -// Updates the event destination of a configuration set. Event destinations -// are associated with configuration sets, which enable you to publish email -// sending events to Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple -// Notification Service (Amazon SNS). For information about using configuration -// sets, see Monitoring Your Amazon SES Sending Activity (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html) -// in the Amazon SES Developer Guide. -// -// When you create or update an event destination, you must provide one, and -// only one, destination. The destination can be Amazon CloudWatch, Amazon Kinesis -// Firehose, or Amazon Simple Notification Service (Amazon SNS). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation UpdateConfigurationSetEventDestination for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// * ErrCodeEventDestinationDoesNotExistException "EventDestinationDoesNotExist" -// Indicates that the event destination does not exist. -// -// * ErrCodeInvalidCloudWatchDestinationException "InvalidCloudWatchDestination" -// Indicates that the Amazon CloudWatch destination is invalid. See the error -// message for details. -// -// * ErrCodeInvalidFirehoseDestinationException "InvalidFirehoseDestination" -// Indicates that the Amazon Kinesis Firehose destination is invalid. See the -// error message for details. -// -// * ErrCodeInvalidSNSDestinationException "InvalidSNSDestination" -// Indicates that the Amazon Simple Notification Service (Amazon SNS) destination -// is invalid. See the error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetEventDestination -func (c *SES) UpdateConfigurationSetEventDestination(input *UpdateConfigurationSetEventDestinationInput) (*UpdateConfigurationSetEventDestinationOutput, error) { - req, out := c.UpdateConfigurationSetEventDestinationRequest(input) - return out, req.Send() -} - -// UpdateConfigurationSetEventDestinationWithContext is the same as UpdateConfigurationSetEventDestination with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateConfigurationSetEventDestination for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) UpdateConfigurationSetEventDestinationWithContext(ctx aws.Context, input *UpdateConfigurationSetEventDestinationInput, opts ...request.Option) (*UpdateConfigurationSetEventDestinationOutput, error) { - req, out := c.UpdateConfigurationSetEventDestinationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateConfigurationSetReputationMetricsEnabled = "UpdateConfigurationSetReputationMetricsEnabled" - -// UpdateConfigurationSetReputationMetricsEnabledRequest generates a "aws/request.Request" representing the -// client's request for the UpdateConfigurationSetReputationMetricsEnabled operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateConfigurationSetReputationMetricsEnabled for more information on using the UpdateConfigurationSetReputationMetricsEnabled -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateConfigurationSetReputationMetricsEnabledRequest method. -// req, resp := client.UpdateConfigurationSetReputationMetricsEnabledRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetReputationMetricsEnabled -func (c *SES) UpdateConfigurationSetReputationMetricsEnabledRequest(input *UpdateConfigurationSetReputationMetricsEnabledInput) (req *request.Request, output *UpdateConfigurationSetReputationMetricsEnabledOutput) { - op := &request.Operation{ - Name: opUpdateConfigurationSetReputationMetricsEnabled, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateConfigurationSetReputationMetricsEnabledInput{} - } - - output = &UpdateConfigurationSetReputationMetricsEnabledOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateConfigurationSetReputationMetricsEnabled API operation for Amazon Simple Email Service. -// -// Enables or disables the publishing of reputation metrics for emails sent -// using a specific configuration set in a given AWS Region. Reputation metrics -// include bounce and complaint rates. These metrics are published to Amazon -// CloudWatch. By using CloudWatch, you can create alarms when bounce or complaint -// rates exceed certain thresholds. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation UpdateConfigurationSetReputationMetricsEnabled for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetReputationMetricsEnabled -func (c *SES) UpdateConfigurationSetReputationMetricsEnabled(input *UpdateConfigurationSetReputationMetricsEnabledInput) (*UpdateConfigurationSetReputationMetricsEnabledOutput, error) { - req, out := c.UpdateConfigurationSetReputationMetricsEnabledRequest(input) - return out, req.Send() -} - -// UpdateConfigurationSetReputationMetricsEnabledWithContext is the same as UpdateConfigurationSetReputationMetricsEnabled with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateConfigurationSetReputationMetricsEnabled for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) UpdateConfigurationSetReputationMetricsEnabledWithContext(ctx aws.Context, input *UpdateConfigurationSetReputationMetricsEnabledInput, opts ...request.Option) (*UpdateConfigurationSetReputationMetricsEnabledOutput, error) { - req, out := c.UpdateConfigurationSetReputationMetricsEnabledRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateConfigurationSetSendingEnabled = "UpdateConfigurationSetSendingEnabled" - -// UpdateConfigurationSetSendingEnabledRequest generates a "aws/request.Request" representing the -// client's request for the UpdateConfigurationSetSendingEnabled operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateConfigurationSetSendingEnabled for more information on using the UpdateConfigurationSetSendingEnabled -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateConfigurationSetSendingEnabledRequest method. -// req, resp := client.UpdateConfigurationSetSendingEnabledRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetSendingEnabled -func (c *SES) UpdateConfigurationSetSendingEnabledRequest(input *UpdateConfigurationSetSendingEnabledInput) (req *request.Request, output *UpdateConfigurationSetSendingEnabledOutput) { - op := &request.Operation{ - Name: opUpdateConfigurationSetSendingEnabled, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateConfigurationSetSendingEnabledInput{} - } - - output = &UpdateConfigurationSetSendingEnabledOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateConfigurationSetSendingEnabled API operation for Amazon Simple Email Service. -// -// Enables or disables email sending for messages sent using a specific configuration -// set in a given AWS Region. You can use this operation in conjunction with -// Amazon CloudWatch alarms to temporarily pause email sending for a configuration -// set when the reputation metrics for that configuration set (such as your -// bounce on complaint rate) exceed certain thresholds. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation UpdateConfigurationSetSendingEnabled for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetSendingEnabled -func (c *SES) UpdateConfigurationSetSendingEnabled(input *UpdateConfigurationSetSendingEnabledInput) (*UpdateConfigurationSetSendingEnabledOutput, error) { - req, out := c.UpdateConfigurationSetSendingEnabledRequest(input) - return out, req.Send() -} - -// UpdateConfigurationSetSendingEnabledWithContext is the same as UpdateConfigurationSetSendingEnabled with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateConfigurationSetSendingEnabled for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) UpdateConfigurationSetSendingEnabledWithContext(ctx aws.Context, input *UpdateConfigurationSetSendingEnabledInput, opts ...request.Option) (*UpdateConfigurationSetSendingEnabledOutput, error) { - req, out := c.UpdateConfigurationSetSendingEnabledRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateConfigurationSetTrackingOptions = "UpdateConfigurationSetTrackingOptions" - -// UpdateConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the -// client's request for the UpdateConfigurationSetTrackingOptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateConfigurationSetTrackingOptions for more information on using the UpdateConfigurationSetTrackingOptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateConfigurationSetTrackingOptionsRequest method. -// req, resp := client.UpdateConfigurationSetTrackingOptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetTrackingOptions -func (c *SES) UpdateConfigurationSetTrackingOptionsRequest(input *UpdateConfigurationSetTrackingOptionsInput) (req *request.Request, output *UpdateConfigurationSetTrackingOptionsOutput) { - op := &request.Operation{ - Name: opUpdateConfigurationSetTrackingOptions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateConfigurationSetTrackingOptionsInput{} - } - - output = &UpdateConfigurationSetTrackingOptionsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateConfigurationSetTrackingOptions API operation for Amazon Simple Email Service. -// -// Modifies an association between a configuration set and a custom domain for -// open and click event tracking. -// -// By default, images and links used for tracking open and click events are -// hosted on domains operated by Amazon SES. You can configure a subdomain of -// your own to handle these events. For information about using custom domains, -// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation UpdateConfigurationSetTrackingOptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" -// Indicates that the configuration set does not exist. -// -// * ErrCodeTrackingOptionsDoesNotExistException "TrackingOptionsDoesNotExistException" -// Indicates that the TrackingOptions object you specified does not exist. -// -// * ErrCodeInvalidTrackingOptionsException "InvalidTrackingOptions" -// Indicates that the custom domain to be used for open and click tracking redirects -// is invalid. This error appears most often in the following situations: -// -// * When the tracking domain you specified is not verified in Amazon SES. -// -// * When the tracking domain you specified is not a valid domain or subdomain. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetTrackingOptions -func (c *SES) UpdateConfigurationSetTrackingOptions(input *UpdateConfigurationSetTrackingOptionsInput) (*UpdateConfigurationSetTrackingOptionsOutput, error) { - req, out := c.UpdateConfigurationSetTrackingOptionsRequest(input) - return out, req.Send() -} - -// UpdateConfigurationSetTrackingOptionsWithContext is the same as UpdateConfigurationSetTrackingOptions with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateConfigurationSetTrackingOptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) UpdateConfigurationSetTrackingOptionsWithContext(ctx aws.Context, input *UpdateConfigurationSetTrackingOptionsInput, opts ...request.Option) (*UpdateConfigurationSetTrackingOptionsOutput, error) { - req, out := c.UpdateConfigurationSetTrackingOptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateCustomVerificationEmailTemplate = "UpdateCustomVerificationEmailTemplate" - -// UpdateCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCustomVerificationEmailTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateCustomVerificationEmailTemplate for more information on using the UpdateCustomVerificationEmailTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateCustomVerificationEmailTemplateRequest method. -// req, resp := client.UpdateCustomVerificationEmailTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateCustomVerificationEmailTemplate -func (c *SES) UpdateCustomVerificationEmailTemplateRequest(input *UpdateCustomVerificationEmailTemplateInput) (req *request.Request, output *UpdateCustomVerificationEmailTemplateOutput) { - op := &request.Operation{ - Name: opUpdateCustomVerificationEmailTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateCustomVerificationEmailTemplateInput{} - } - - output = &UpdateCustomVerificationEmailTemplateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateCustomVerificationEmailTemplate API operation for Amazon Simple Email Service. -// -// Updates an existing custom verification email template. -// -// For more information about custom verification email templates, see Using -// Custom Verification Email Templates (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) -// in the Amazon SES Developer Guide. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation UpdateCustomVerificationEmailTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeCustomVerificationEmailTemplateDoesNotExistException "CustomVerificationEmailTemplateDoesNotExist" -// Indicates that a custom verification email template with the name you specified -// does not exist. -// -// * ErrCodeFromEmailAddressNotVerifiedException "FromEmailAddressNotVerified" -// Indicates that the sender address specified for a custom verification email -// is not verified, and is therefore not eligible to send the custom verification -// email. -// -// * ErrCodeCustomVerificationEmailInvalidContentException "CustomVerificationEmailInvalidContent" -// Indicates that custom verification email template provided content is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateCustomVerificationEmailTemplate -func (c *SES) UpdateCustomVerificationEmailTemplate(input *UpdateCustomVerificationEmailTemplateInput) (*UpdateCustomVerificationEmailTemplateOutput, error) { - req, out := c.UpdateCustomVerificationEmailTemplateRequest(input) - return out, req.Send() -} - -// UpdateCustomVerificationEmailTemplateWithContext is the same as UpdateCustomVerificationEmailTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCustomVerificationEmailTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) UpdateCustomVerificationEmailTemplateWithContext(ctx aws.Context, input *UpdateCustomVerificationEmailTemplateInput, opts ...request.Option) (*UpdateCustomVerificationEmailTemplateOutput, error) { - req, out := c.UpdateCustomVerificationEmailTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateReceiptRule = "UpdateReceiptRule" - -// UpdateReceiptRuleRequest generates a "aws/request.Request" representing the -// client's request for the UpdateReceiptRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateReceiptRule for more information on using the UpdateReceiptRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateReceiptRuleRequest method. -// req, resp := client.UpdateReceiptRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateReceiptRule -func (c *SES) UpdateReceiptRuleRequest(input *UpdateReceiptRuleInput) (req *request.Request, output *UpdateReceiptRuleOutput) { - op := &request.Operation{ - Name: opUpdateReceiptRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateReceiptRuleInput{} - } - - output = &UpdateReceiptRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateReceiptRule API operation for Amazon Simple Email Service. -// -// Updates a receipt rule. -// -// For information about managing receipt rules, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rules.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation UpdateReceiptRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidSnsTopicException "InvalidSnsTopic" -// Indicates that the provided Amazon SNS topic is invalid, or that Amazon SES -// could not publish to the topic, possibly due to permissions issues. For information -// about giving permissions, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). -// -// * ErrCodeInvalidS3ConfigurationException "InvalidS3Configuration" -// Indicates that the provided Amazon S3 bucket or AWS KMS encryption key is -// invalid, or that Amazon SES could not publish to the bucket, possibly due -// to permissions issues. For information about giving permissions, see the -// Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). -// -// * ErrCodeInvalidLambdaFunctionException "InvalidLambdaFunction" -// Indicates that the provided AWS Lambda function is invalid, or that Amazon -// SES could not execute the provided function, possibly due to permissions -// issues. For information about giving permissions, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). -// -// * ErrCodeRuleSetDoesNotExistException "RuleSetDoesNotExist" -// Indicates that the provided receipt rule set does not exist. -// -// * ErrCodeRuleDoesNotExistException "RuleDoesNotExist" -// Indicates that the provided receipt rule does not exist. -// -// * ErrCodeLimitExceededException "LimitExceeded" -// Indicates that a resource could not be created because of service limits. -// For a list of Amazon SES limits, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateReceiptRule -func (c *SES) UpdateReceiptRule(input *UpdateReceiptRuleInput) (*UpdateReceiptRuleOutput, error) { - req, out := c.UpdateReceiptRuleRequest(input) - return out, req.Send() -} - -// UpdateReceiptRuleWithContext is the same as UpdateReceiptRule with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateReceiptRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) UpdateReceiptRuleWithContext(ctx aws.Context, input *UpdateReceiptRuleInput, opts ...request.Option) (*UpdateReceiptRuleOutput, error) { - req, out := c.UpdateReceiptRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateTemplate = "UpdateTemplate" - -// UpdateTemplateRequest generates a "aws/request.Request" representing the -// client's request for the UpdateTemplate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateTemplate for more information on using the UpdateTemplate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateTemplateRequest method. -// req, resp := client.UpdateTemplateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateTemplate -func (c *SES) UpdateTemplateRequest(input *UpdateTemplateInput) (req *request.Request, output *UpdateTemplateOutput) { - op := &request.Operation{ - Name: opUpdateTemplate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateTemplateInput{} - } - - output = &UpdateTemplateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateTemplate API operation for Amazon Simple Email Service. -// -// Updates an email template. Email templates enable you to send personalized -// email to one or more destinations in a single API operation. For more information, -// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html). -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation UpdateTemplate for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTemplateDoesNotExistException "TemplateDoesNotExist" -// Indicates that the Template object you specified does not exist in your Amazon -// SES account. -// -// * ErrCodeInvalidTemplateException "InvalidTemplate" -// Indicates that the template that you specified could not be rendered. This -// issue may occur when a template refers to a partial that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateTemplate -func (c *SES) UpdateTemplate(input *UpdateTemplateInput) (*UpdateTemplateOutput, error) { - req, out := c.UpdateTemplateRequest(input) - return out, req.Send() -} - -// UpdateTemplateWithContext is the same as UpdateTemplate with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateTemplate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) UpdateTemplateWithContext(ctx aws.Context, input *UpdateTemplateInput, opts ...request.Option) (*UpdateTemplateOutput, error) { - req, out := c.UpdateTemplateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opVerifyDomainDkim = "VerifyDomainDkim" - -// VerifyDomainDkimRequest generates a "aws/request.Request" representing the -// client's request for the VerifyDomainDkim operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See VerifyDomainDkim for more information on using the VerifyDomainDkim -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the VerifyDomainDkimRequest method. -// req, resp := client.VerifyDomainDkimRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/VerifyDomainDkim -func (c *SES) VerifyDomainDkimRequest(input *VerifyDomainDkimInput) (req *request.Request, output *VerifyDomainDkimOutput) { - op := &request.Operation{ - Name: opVerifyDomainDkim, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &VerifyDomainDkimInput{} - } - - output = &VerifyDomainDkimOutput{} - req = c.newRequest(op, input, output) - return -} - -// VerifyDomainDkim API operation for Amazon Simple Email Service. -// -// Returns a set of DKIM tokens for a domain. DKIM tokens are character strings -// that represent your domain's identity. Using these tokens, you will need -// to create DNS CNAME records that point to DKIM public keys hosted by Amazon -// SES. Amazon Web Services will eventually detect that you have updated your -// DNS records; this detection process may take up to 72 hours. Upon successful -// detection, Amazon SES will be able to DKIM-sign email originating from that -// domain. -// -// You can execute this operation no more than once per second. -// -// To enable or disable Easy DKIM signing for a domain, use the SetIdentityDkimEnabled -// operation. -// -// For more information about creating DNS records using DKIM tokens, go to -// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim-dns-records.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation VerifyDomainDkim for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/VerifyDomainDkim -func (c *SES) VerifyDomainDkim(input *VerifyDomainDkimInput) (*VerifyDomainDkimOutput, error) { - req, out := c.VerifyDomainDkimRequest(input) - return out, req.Send() -} - -// VerifyDomainDkimWithContext is the same as VerifyDomainDkim with the addition of -// the ability to pass a context and additional request options. -// -// See VerifyDomainDkim for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) VerifyDomainDkimWithContext(ctx aws.Context, input *VerifyDomainDkimInput, opts ...request.Option) (*VerifyDomainDkimOutput, error) { - req, out := c.VerifyDomainDkimRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opVerifyDomainIdentity = "VerifyDomainIdentity" - -// VerifyDomainIdentityRequest generates a "aws/request.Request" representing the -// client's request for the VerifyDomainIdentity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See VerifyDomainIdentity for more information on using the VerifyDomainIdentity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the VerifyDomainIdentityRequest method. -// req, resp := client.VerifyDomainIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/VerifyDomainIdentity -func (c *SES) VerifyDomainIdentityRequest(input *VerifyDomainIdentityInput) (req *request.Request, output *VerifyDomainIdentityOutput) { - op := &request.Operation{ - Name: opVerifyDomainIdentity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &VerifyDomainIdentityInput{} - } - - output = &VerifyDomainIdentityOutput{} - req = c.newRequest(op, input, output) - return -} - -// VerifyDomainIdentity API operation for Amazon Simple Email Service. -// -// Adds a domain to the list of identities for your Amazon SES account in the -// current AWS Region and attempts to verify it. For more information about -// verifying domains, see Verifying Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) -// in the Amazon SES Developer Guide. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation VerifyDomainIdentity for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/VerifyDomainIdentity -func (c *SES) VerifyDomainIdentity(input *VerifyDomainIdentityInput) (*VerifyDomainIdentityOutput, error) { - req, out := c.VerifyDomainIdentityRequest(input) - return out, req.Send() -} - -// VerifyDomainIdentityWithContext is the same as VerifyDomainIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See VerifyDomainIdentity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) VerifyDomainIdentityWithContext(ctx aws.Context, input *VerifyDomainIdentityInput, opts ...request.Option) (*VerifyDomainIdentityOutput, error) { - req, out := c.VerifyDomainIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opVerifyEmailAddress = "VerifyEmailAddress" - -// VerifyEmailAddressRequest generates a "aws/request.Request" representing the -// client's request for the VerifyEmailAddress operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See VerifyEmailAddress for more information on using the VerifyEmailAddress -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the VerifyEmailAddressRequest method. -// req, resp := client.VerifyEmailAddressRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/VerifyEmailAddress -func (c *SES) VerifyEmailAddressRequest(input *VerifyEmailAddressInput) (req *request.Request, output *VerifyEmailAddressOutput) { - op := &request.Operation{ - Name: opVerifyEmailAddress, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &VerifyEmailAddressInput{} - } - - output = &VerifyEmailAddressOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// VerifyEmailAddress API operation for Amazon Simple Email Service. -// -// Deprecated. Use the VerifyEmailIdentity operation to verify a new email address. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation VerifyEmailAddress for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/VerifyEmailAddress -func (c *SES) VerifyEmailAddress(input *VerifyEmailAddressInput) (*VerifyEmailAddressOutput, error) { - req, out := c.VerifyEmailAddressRequest(input) - return out, req.Send() -} - -// VerifyEmailAddressWithContext is the same as VerifyEmailAddress with the addition of -// the ability to pass a context and additional request options. -// -// See VerifyEmailAddress for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) VerifyEmailAddressWithContext(ctx aws.Context, input *VerifyEmailAddressInput, opts ...request.Option) (*VerifyEmailAddressOutput, error) { - req, out := c.VerifyEmailAddressRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opVerifyEmailIdentity = "VerifyEmailIdentity" - -// VerifyEmailIdentityRequest generates a "aws/request.Request" representing the -// client's request for the VerifyEmailIdentity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See VerifyEmailIdentity for more information on using the VerifyEmailIdentity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the VerifyEmailIdentityRequest method. -// req, resp := client.VerifyEmailIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/VerifyEmailIdentity -func (c *SES) VerifyEmailIdentityRequest(input *VerifyEmailIdentityInput) (req *request.Request, output *VerifyEmailIdentityOutput) { - op := &request.Operation{ - Name: opVerifyEmailIdentity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &VerifyEmailIdentityInput{} - } - - output = &VerifyEmailIdentityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// VerifyEmailIdentity API operation for Amazon Simple Email Service. -// -// Adds an email address to the list of identities for your Amazon SES account -// in the current AWS region and attempts to verify it. As a result of executing -// this operation, a verification email is sent to the specified address. -// -// You can execute this operation no more than once per second. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Email Service's -// API operation VerifyEmailIdentity for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/VerifyEmailIdentity -func (c *SES) VerifyEmailIdentity(input *VerifyEmailIdentityInput) (*VerifyEmailIdentityOutput, error) { - req, out := c.VerifyEmailIdentityRequest(input) - return out, req.Send() -} - -// VerifyEmailIdentityWithContext is the same as VerifyEmailIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See VerifyEmailIdentity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) VerifyEmailIdentityWithContext(ctx aws.Context, input *VerifyEmailIdentityInput, opts ...request.Option) (*VerifyEmailIdentityOutput, error) { - req, out := c.VerifyEmailIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// When included in a receipt rule, this action adds a header to the received -// email. -// -// For information about adding a header using a receipt rule, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-add-header.html). -type AddHeaderAction struct { - _ struct{} `type:"structure"` - - // The name of the header to add. Must be between 1 and 50 characters, inclusive, - // and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only. - // - // HeaderName is a required field - HeaderName *string `type:"string" required:"true"` - - // Must be less than 2048 characters, and must not contain newline characters - // ("\r" or "\n"). - // - // HeaderValue is a required field - HeaderValue *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AddHeaderAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddHeaderAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddHeaderAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddHeaderAction"} - if s.HeaderName == nil { - invalidParams.Add(request.NewErrParamRequired("HeaderName")) - } - if s.HeaderValue == nil { - invalidParams.Add(request.NewErrParamRequired("HeaderValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHeaderName sets the HeaderName field's value. -func (s *AddHeaderAction) SetHeaderName(v string) *AddHeaderAction { - s.HeaderName = &v - return s -} - -// SetHeaderValue sets the HeaderValue field's value. -func (s *AddHeaderAction) SetHeaderValue(v string) *AddHeaderAction { - s.HeaderValue = &v - return s -} - -// Represents the body of the message. You can specify text, HTML, or both. -// If you use both, then the message should display correctly in the widest -// variety of email clients. -type Body struct { - _ struct{} `type:"structure"` - - // The content of the message, in HTML format. Use this for email clients that - // can process HTML. You can include clickable links, formatted text, and much - // more in an HTML message. - Html *Content `type:"structure"` - - // The content of the message, in text format. Use this for text-based email - // clients, or clients on high-latency networks (such as mobile devices). - Text *Content `type:"structure"` -} - -// String returns the string representation -func (s Body) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Body) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Body) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Body"} - if s.Html != nil { - if err := s.Html.Validate(); err != nil { - invalidParams.AddNested("Html", err.(request.ErrInvalidParams)) - } - } - if s.Text != nil { - if err := s.Text.Validate(); err != nil { - invalidParams.AddNested("Text", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHtml sets the Html field's value. -func (s *Body) SetHtml(v *Content) *Body { - s.Html = v - return s -} - -// SetText sets the Text field's value. -func (s *Body) SetText(v *Content) *Body { - s.Text = v - return s -} - -// When included in a receipt rule, this action rejects the received email by -// returning a bounce response to the sender and, optionally, publishes a notification -// to Amazon Simple Notification Service (Amazon SNS). -// -// For information about sending a bounce message in response to a received -// email, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-bounce.html). -type BounceAction struct { - _ struct{} `type:"structure"` - - // Human-readable text to include in the bounce message. - // - // Message is a required field - Message *string `type:"string" required:"true"` - - // The email address of the sender of the bounced email. This is the address - // from which the bounce message will be sent. - // - // Sender is a required field - Sender *string `type:"string" required:"true"` - - // The SMTP reply code, as defined by RFC 5321 (https://tools.ietf.org/html/rfc5321). - // - // SmtpReplyCode is a required field - SmtpReplyCode *string `type:"string" required:"true"` - - // The SMTP enhanced status code, as defined by RFC 3463 (https://tools.ietf.org/html/rfc3463). - StatusCode *string `type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the - // bounce action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. - // For more information about Amazon SNS topics, see the Amazon SNS Developer - // Guide (http://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html). - TopicArn *string `type:"string"` -} - -// String returns the string representation -func (s BounceAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BounceAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BounceAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BounceAction"} - if s.Message == nil { - invalidParams.Add(request.NewErrParamRequired("Message")) - } - if s.Sender == nil { - invalidParams.Add(request.NewErrParamRequired("Sender")) - } - if s.SmtpReplyCode == nil { - invalidParams.Add(request.NewErrParamRequired("SmtpReplyCode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMessage sets the Message field's value. -func (s *BounceAction) SetMessage(v string) *BounceAction { - s.Message = &v - return s -} - -// SetSender sets the Sender field's value. -func (s *BounceAction) SetSender(v string) *BounceAction { - s.Sender = &v - return s -} - -// SetSmtpReplyCode sets the SmtpReplyCode field's value. -func (s *BounceAction) SetSmtpReplyCode(v string) *BounceAction { - s.SmtpReplyCode = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *BounceAction) SetStatusCode(v string) *BounceAction { - s.StatusCode = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *BounceAction) SetTopicArn(v string) *BounceAction { - s.TopicArn = &v - return s -} - -// Recipient-related information to include in the Delivery Status Notification -// (DSN) when an email that Amazon SES receives on your behalf bounces. -// -// For information about receiving email through Amazon SES, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html). -type BouncedRecipientInfo struct { - _ struct{} `type:"structure"` - - // The reason for the bounce. You must provide either this parameter or RecipientDsnFields. - BounceType *string `type:"string" enum:"BounceType"` - - // The email address of the recipient of the bounced email. - // - // Recipient is a required field - Recipient *string `type:"string" required:"true"` - - // This parameter is used only for sending authorization. It is the ARN of the - // identity that is associated with the sending authorization policy that permits - // you to receive email for the recipient of the bounced email. For more information - // about sending authorization, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). - RecipientArn *string `type:"string"` - - // Recipient-related DSN fields, most of which would normally be filled in automatically - // when provided with a BounceType. You must provide either this parameter or - // BounceType. - RecipientDsnFields *RecipientDsnFields `type:"structure"` -} - -// String returns the string representation -func (s BouncedRecipientInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BouncedRecipientInfo) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BouncedRecipientInfo) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BouncedRecipientInfo"} - if s.Recipient == nil { - invalidParams.Add(request.NewErrParamRequired("Recipient")) - } - if s.RecipientDsnFields != nil { - if err := s.RecipientDsnFields.Validate(); err != nil { - invalidParams.AddNested("RecipientDsnFields", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBounceType sets the BounceType field's value. -func (s *BouncedRecipientInfo) SetBounceType(v string) *BouncedRecipientInfo { - s.BounceType = &v - return s -} - -// SetRecipient sets the Recipient field's value. -func (s *BouncedRecipientInfo) SetRecipient(v string) *BouncedRecipientInfo { - s.Recipient = &v - return s -} - -// SetRecipientArn sets the RecipientArn field's value. -func (s *BouncedRecipientInfo) SetRecipientArn(v string) *BouncedRecipientInfo { - s.RecipientArn = &v - return s -} - -// SetRecipientDsnFields sets the RecipientDsnFields field's value. -func (s *BouncedRecipientInfo) SetRecipientDsnFields(v *RecipientDsnFields) *BouncedRecipientInfo { - s.RecipientDsnFields = v - return s -} - -// An array that contains one or more Destinations, as well as the tags and -// replacement data associated with each of those Destinations. -type BulkEmailDestination struct { - _ struct{} `type:"structure"` - - // Represents the destination of the message, consisting of To:, CC:, and BCC: - // fields. - // - // Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531 - // (https://tools.ietf.org/html/rfc6531). For this reason, the local part of - // a destination email address (the part of the email address that precedes - // the @ sign) may only contain 7-bit ASCII characters (https://en.wikipedia.org/wiki/Email_address#Local-part). - // If the domain part of an address (the part after the @ sign) contains non-ASCII - // characters, they must be encoded using Punycode, as described in RFC3492 - // (https://tools.ietf.org/html/rfc3492.html). - // - // Destination is a required field - Destination *Destination `type:"structure" required:"true"` - - // A list of tags, in the form of name/value pairs, to apply to an email that - // you send using SendBulkTemplatedEmail. Tags correspond to characteristics - // of the email that you define, so that you can publish email sending events. - ReplacementTags []*MessageTag `type:"list"` - - // A list of replacement values to apply to the template. This parameter is - // a JSON object, typically consisting of key-value pairs in which the keys - // correspond to replacement tags in the email template. - ReplacementTemplateData *string `type:"string"` -} - -// String returns the string representation -func (s BulkEmailDestination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BulkEmailDestination) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BulkEmailDestination) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BulkEmailDestination"} - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - if s.ReplacementTags != nil { - for i, v := range s.ReplacementTags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplacementTags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestination sets the Destination field's value. -func (s *BulkEmailDestination) SetDestination(v *Destination) *BulkEmailDestination { - s.Destination = v - return s -} - -// SetReplacementTags sets the ReplacementTags field's value. -func (s *BulkEmailDestination) SetReplacementTags(v []*MessageTag) *BulkEmailDestination { - s.ReplacementTags = v - return s -} - -// SetReplacementTemplateData sets the ReplacementTemplateData field's value. -func (s *BulkEmailDestination) SetReplacementTemplateData(v string) *BulkEmailDestination { - s.ReplacementTemplateData = &v - return s -} - -// An object that contains the response from the SendBulkTemplatedEmail operation. -type BulkEmailDestinationStatus struct { - _ struct{} `type:"structure"` - - // A description of an error that prevented a message being sent using the SendBulkTemplatedEmail - // operation. - Error *string `type:"string"` - - // The unique message identifier returned from the SendBulkTemplatedEmail operation. - MessageId *string `type:"string"` - - // The status of a message sent using the SendBulkTemplatedEmail operation. - // - // Possible values for this parameter include: - // - // * Success: Amazon SES accepted the message, and will attempt to deliver - // it to the recipients. - // - // * MessageRejected: The message was rejected because it contained a virus. - // - // * MailFromDomainNotVerified: The sender's email address or domain was - // not verified. - // - // * ConfigurationSetDoesNotExist: The configuration set you specified does - // not exist. - // - // * TemplateDoesNotExist: The template you specified does not exist. - // - // * AccountSuspended: Your account has been shut down because of issues - // related to your email sending practices. - // - // * AccountThrottled: The number of emails you can send has been reduced - // because your account has exceeded its allocated sending limit. - // - // * AccountDailyQuotaExceeded: You have reached or exceeded the maximum - // number of emails you can send from your account in a 24-hour period. - // - // * InvalidSendingPoolName: The configuration set you specified refers to - // an IP pool that does not exist. - // - // * AccountSendingPaused: Email sending for the Amazon SES account was disabled - // using the UpdateAccountSendingEnabled operation. - // - // * ConfigurationSetSendingPaused: Email sending for this configuration - // set was disabled using the UpdateConfigurationSetSendingEnabled operation. - // - // * InvalidParameterValue: One or more of the parameters you specified when - // calling this operation was invalid. See the error message for additional - // information. - // - // * TransientFailure: Amazon SES was unable to process your request because - // of a temporary issue. - // - // * Failed: Amazon SES was unable to process your request. See the error - // message for additional information. - Status *string `type:"string" enum:"BulkEmailStatus"` -} - -// String returns the string representation -func (s BulkEmailDestinationStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BulkEmailDestinationStatus) GoString() string { - return s.String() -} - -// SetError sets the Error field's value. -func (s *BulkEmailDestinationStatus) SetError(v string) *BulkEmailDestinationStatus { - s.Error = &v - return s -} - -// SetMessageId sets the MessageId field's value. -func (s *BulkEmailDestinationStatus) SetMessageId(v string) *BulkEmailDestinationStatus { - s.MessageId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *BulkEmailDestinationStatus) SetStatus(v string) *BulkEmailDestinationStatus { - s.Status = &v - return s -} - -// Represents a request to create a receipt rule set by cloning an existing -// one. You use receipt rule sets to receive email with Amazon SES. For more -// information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type CloneReceiptRuleSetInput struct { - _ struct{} `type:"structure"` - - // The name of the rule set to clone. - // - // OriginalRuleSetName is a required field - OriginalRuleSetName *string `type:"string" required:"true"` - - // The name of the rule set to create. The name must: - // - // * This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), - // underscores (_), or dashes (-). - // - // * Start and end with a letter or number. - // - // * Contain less than 64 characters. - // - // RuleSetName is a required field - RuleSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CloneReceiptRuleSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloneReceiptRuleSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CloneReceiptRuleSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloneReceiptRuleSetInput"} - if s.OriginalRuleSetName == nil { - invalidParams.Add(request.NewErrParamRequired("OriginalRuleSetName")) - } - if s.RuleSetName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOriginalRuleSetName sets the OriginalRuleSetName field's value. -func (s *CloneReceiptRuleSetInput) SetOriginalRuleSetName(v string) *CloneReceiptRuleSetInput { - s.OriginalRuleSetName = &v - return s -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *CloneReceiptRuleSetInput) SetRuleSetName(v string) *CloneReceiptRuleSetInput { - s.RuleSetName = &v - return s -} - -// An empty element returned on a successful request. -type CloneReceiptRuleSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CloneReceiptRuleSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloneReceiptRuleSetOutput) GoString() string { - return s.String() -} - -// Contains information associated with an Amazon CloudWatch event destination -// to which email sending events are published. -// -// Event destinations, such as Amazon CloudWatch, are associated with configuration -// sets, which enable you to publish email sending events. For information about -// using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type CloudWatchDestination struct { - _ struct{} `type:"structure"` - - // A list of dimensions upon which to categorize your emails when you publish - // email sending events to Amazon CloudWatch. - // - // DimensionConfigurations is a required field - DimensionConfigurations []*CloudWatchDimensionConfiguration `type:"list" required:"true"` -} - -// String returns the string representation -func (s CloudWatchDestination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudWatchDestination) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CloudWatchDestination) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloudWatchDestination"} - if s.DimensionConfigurations == nil { - invalidParams.Add(request.NewErrParamRequired("DimensionConfigurations")) - } - if s.DimensionConfigurations != nil { - for i, v := range s.DimensionConfigurations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DimensionConfigurations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDimensionConfigurations sets the DimensionConfigurations field's value. -func (s *CloudWatchDestination) SetDimensionConfigurations(v []*CloudWatchDimensionConfiguration) *CloudWatchDestination { - s.DimensionConfigurations = v - return s -} - -// Contains the dimension configuration to use when you publish email sending -// events to Amazon CloudWatch. -// -// For information about publishing email sending events to Amazon CloudWatch, -// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type CloudWatchDimensionConfiguration struct { - _ struct{} `type:"structure"` - - // The default value of the dimension that is published to Amazon CloudWatch - // if you do not provide the value of the dimension when you send an email. - // The default value must: - // - // * This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), - // underscores (_), or dashes (-). - // - // * Contain less than 256 characters. - // - // DefaultDimensionValue is a required field - DefaultDimensionValue *string `type:"string" required:"true"` - - // The name of an Amazon CloudWatch dimension associated with an email sending - // metric. The name must: - // - // * This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), - // underscores (_), or dashes (-). - // - // * Contain less than 256 characters. - // - // DimensionName is a required field - DimensionName *string `type:"string" required:"true"` - - // The place where Amazon SES finds the value of a dimension to publish to Amazon - // CloudWatch. If you want Amazon SES to use the message tags that you specify - // using an X-SES-MESSAGE-TAGS header or a parameter to the SendEmail/SendRawEmail - // API, choose messageTag. If you want Amazon SES to use your own email headers, - // choose emailHeader. - // - // DimensionValueSource is a required field - DimensionValueSource *string `type:"string" required:"true" enum:"DimensionValueSource"` -} - -// String returns the string representation -func (s CloudWatchDimensionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudWatchDimensionConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CloudWatchDimensionConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloudWatchDimensionConfiguration"} - if s.DefaultDimensionValue == nil { - invalidParams.Add(request.NewErrParamRequired("DefaultDimensionValue")) - } - if s.DimensionName == nil { - invalidParams.Add(request.NewErrParamRequired("DimensionName")) - } - if s.DimensionValueSource == nil { - invalidParams.Add(request.NewErrParamRequired("DimensionValueSource")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultDimensionValue sets the DefaultDimensionValue field's value. -func (s *CloudWatchDimensionConfiguration) SetDefaultDimensionValue(v string) *CloudWatchDimensionConfiguration { - s.DefaultDimensionValue = &v - return s -} - -// SetDimensionName sets the DimensionName field's value. -func (s *CloudWatchDimensionConfiguration) SetDimensionName(v string) *CloudWatchDimensionConfiguration { - s.DimensionName = &v - return s -} - -// SetDimensionValueSource sets the DimensionValueSource field's value. -func (s *CloudWatchDimensionConfiguration) SetDimensionValueSource(v string) *CloudWatchDimensionConfiguration { - s.DimensionValueSource = &v - return s -} - -// The name of the configuration set. -// -// Configuration sets let you create groups of rules that you can apply to the -// emails you send using Amazon SES. For more information about using configuration -// sets, see Using Amazon SES Configuration Sets (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-configuration-sets.html) -// in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/). -type ConfigurationSet struct { - _ struct{} `type:"structure"` - - // The name of the configuration set. The name must meet the following requirements: - // - // * Contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or - // dashes (-). - // - // * Contain 64 characters or fewer. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ConfigurationSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfigurationSet) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfigurationSet) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfigurationSet"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *ConfigurationSet) SetName(v string) *ConfigurationSet { - s.Name = &v - return s -} - -// Represents textual data, plus an optional character set specification. -// -// By default, the text must be 7-bit ASCII, due to the constraints of the SMTP -// protocol. If the text must contain any other characters, then you must also -// specify a character set. Examples include UTF-8, ISO-8859-1, and Shift_JIS. -type Content struct { - _ struct{} `type:"structure"` - - // The character set of the content. - Charset *string `type:"string"` - - // The textual data of the content. - // - // Data is a required field - Data *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Content) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Content) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Content) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Content"} - if s.Data == nil { - invalidParams.Add(request.NewErrParamRequired("Data")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCharset sets the Charset field's value. -func (s *Content) SetCharset(v string) *Content { - s.Charset = &v - return s -} - -// SetData sets the Data field's value. -func (s *Content) SetData(v string) *Content { - s.Data = &v - return s -} - -// Represents a request to create a configuration set event destination. A configuration -// set event destination, which can be either Amazon CloudWatch or Amazon Kinesis -// Firehose, describes an AWS service in which Amazon SES publishes the email -// sending events associated with a configuration set. For information about -// using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type CreateConfigurationSetEventDestinationInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration set that the event destination should be associated - // with. - // - // ConfigurationSetName is a required field - ConfigurationSetName *string `type:"string" required:"true"` - - // An object that describes the AWS service that email sending event information - // will be published to. - // - // EventDestination is a required field - EventDestination *EventDestination `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateConfigurationSetEventDestinationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConfigurationSetEventDestinationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateConfigurationSetEventDestinationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateConfigurationSetEventDestinationInput"} - if s.ConfigurationSetName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) - } - if s.EventDestination == nil { - invalidParams.Add(request.NewErrParamRequired("EventDestination")) - } - if s.EventDestination != nil { - if err := s.EventDestination.Validate(); err != nil { - invalidParams.AddNested("EventDestination", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *CreateConfigurationSetEventDestinationInput) SetConfigurationSetName(v string) *CreateConfigurationSetEventDestinationInput { - s.ConfigurationSetName = &v - return s -} - -// SetEventDestination sets the EventDestination field's value. -func (s *CreateConfigurationSetEventDestinationInput) SetEventDestination(v *EventDestination) *CreateConfigurationSetEventDestinationInput { - s.EventDestination = v - return s -} - -// An empty element returned on a successful request. -type CreateConfigurationSetEventDestinationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateConfigurationSetEventDestinationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConfigurationSetEventDestinationOutput) GoString() string { - return s.String() -} - -// Represents a request to create a configuration set. Configuration sets enable -// you to publish email sending events. For information about using configuration -// sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type CreateConfigurationSetInput struct { - _ struct{} `type:"structure"` - - // A data structure that contains the name of the configuration set. - // - // ConfigurationSet is a required field - ConfigurationSet *ConfigurationSet `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateConfigurationSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConfigurationSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateConfigurationSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateConfigurationSetInput"} - if s.ConfigurationSet == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationSet")) - } - if s.ConfigurationSet != nil { - if err := s.ConfigurationSet.Validate(); err != nil { - invalidParams.AddNested("ConfigurationSet", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSet sets the ConfigurationSet field's value. -func (s *CreateConfigurationSetInput) SetConfigurationSet(v *ConfigurationSet) *CreateConfigurationSetInput { - s.ConfigurationSet = v - return s -} - -// An empty element returned on a successful request. -type CreateConfigurationSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateConfigurationSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConfigurationSetOutput) GoString() string { - return s.String() -} - -// Represents a request to create an open and click tracking option object in -// a configuration set. -type CreateConfigurationSetTrackingOptionsInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration set that the tracking options should be associated - // with. - // - // ConfigurationSetName is a required field - ConfigurationSetName *string `type:"string" required:"true"` - - // A domain that is used to redirect email recipients to an Amazon SES-operated - // domain. This domain captures open and click events generated by Amazon SES - // emails. - // - // For more information, see Configuring Custom Domains to Handle Open and Click - // Tracking (ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) - // in the Amazon SES Developer Guide. - // - // TrackingOptions is a required field - TrackingOptions *TrackingOptions `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateConfigurationSetTrackingOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConfigurationSetTrackingOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateConfigurationSetTrackingOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateConfigurationSetTrackingOptionsInput"} - if s.ConfigurationSetName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) - } - if s.TrackingOptions == nil { - invalidParams.Add(request.NewErrParamRequired("TrackingOptions")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *CreateConfigurationSetTrackingOptionsInput) SetConfigurationSetName(v string) *CreateConfigurationSetTrackingOptionsInput { - s.ConfigurationSetName = &v - return s -} - -// SetTrackingOptions sets the TrackingOptions field's value. -func (s *CreateConfigurationSetTrackingOptionsInput) SetTrackingOptions(v *TrackingOptions) *CreateConfigurationSetTrackingOptionsInput { - s.TrackingOptions = v - return s -} - -// An empty element returned on a successful request. -type CreateConfigurationSetTrackingOptionsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateConfigurationSetTrackingOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateConfigurationSetTrackingOptionsOutput) GoString() string { - return s.String() -} - -// Represents a request to create a custom verification email template. -type CreateCustomVerificationEmailTemplateInput struct { - _ struct{} `type:"structure"` - - // The URL that the recipient of the verification email is sent to if his or - // her address is not successfully verified. - // - // FailureRedirectionURL is a required field - FailureRedirectionURL *string `type:"string" required:"true"` - - // The email address that the custom verification email is sent from. - // - // FromEmailAddress is a required field - FromEmailAddress *string `type:"string" required:"true"` - - // The URL that the recipient of the verification email is sent to if his or - // her address is successfully verified. - // - // SuccessRedirectionURL is a required field - SuccessRedirectionURL *string `type:"string" required:"true"` - - // The content of the custom verification email. The total size of the email - // must be less than 10 MB. The message body may contain HTML, with some limitations. - // For more information, see Custom Verification Email Frequently Asked Questions - // (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html#custom-verification-emails-faq) - // in the Amazon SES Developer Guide. - // - // TemplateContent is a required field - TemplateContent *string `type:"string" required:"true"` - - // The name of the custom verification email template. - // - // TemplateName is a required field - TemplateName *string `type:"string" required:"true"` - - // The subject line of the custom verification email. - // - // TemplateSubject is a required field - TemplateSubject *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateCustomVerificationEmailTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCustomVerificationEmailTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCustomVerificationEmailTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCustomVerificationEmailTemplateInput"} - if s.FailureRedirectionURL == nil { - invalidParams.Add(request.NewErrParamRequired("FailureRedirectionURL")) - } - if s.FromEmailAddress == nil { - invalidParams.Add(request.NewErrParamRequired("FromEmailAddress")) - } - if s.SuccessRedirectionURL == nil { - invalidParams.Add(request.NewErrParamRequired("SuccessRedirectionURL")) - } - if s.TemplateContent == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateContent")) - } - if s.TemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateName")) - } - if s.TemplateSubject == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateSubject")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFailureRedirectionURL sets the FailureRedirectionURL field's value. -func (s *CreateCustomVerificationEmailTemplateInput) SetFailureRedirectionURL(v string) *CreateCustomVerificationEmailTemplateInput { - s.FailureRedirectionURL = &v - return s -} - -// SetFromEmailAddress sets the FromEmailAddress field's value. -func (s *CreateCustomVerificationEmailTemplateInput) SetFromEmailAddress(v string) *CreateCustomVerificationEmailTemplateInput { - s.FromEmailAddress = &v - return s -} - -// SetSuccessRedirectionURL sets the SuccessRedirectionURL field's value. -func (s *CreateCustomVerificationEmailTemplateInput) SetSuccessRedirectionURL(v string) *CreateCustomVerificationEmailTemplateInput { - s.SuccessRedirectionURL = &v - return s -} - -// SetTemplateContent sets the TemplateContent field's value. -func (s *CreateCustomVerificationEmailTemplateInput) SetTemplateContent(v string) *CreateCustomVerificationEmailTemplateInput { - s.TemplateContent = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *CreateCustomVerificationEmailTemplateInput) SetTemplateName(v string) *CreateCustomVerificationEmailTemplateInput { - s.TemplateName = &v - return s -} - -// SetTemplateSubject sets the TemplateSubject field's value. -func (s *CreateCustomVerificationEmailTemplateInput) SetTemplateSubject(v string) *CreateCustomVerificationEmailTemplateInput { - s.TemplateSubject = &v - return s -} - -type CreateCustomVerificationEmailTemplateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateCustomVerificationEmailTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCustomVerificationEmailTemplateOutput) GoString() string { - return s.String() -} - -// Represents a request to create a new IP address filter. You use IP address -// filters when you receive email with Amazon SES. For more information, see -// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type CreateReceiptFilterInput struct { - _ struct{} `type:"structure"` - - // A data structure that describes the IP address filter to create, which consists - // of a name, an IP address range, and whether to allow or block mail from it. - // - // Filter is a required field - Filter *ReceiptFilter `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateReceiptFilterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReceiptFilterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateReceiptFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateReceiptFilterInput"} - if s.Filter == nil { - invalidParams.Add(request.NewErrParamRequired("Filter")) - } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *CreateReceiptFilterInput) SetFilter(v *ReceiptFilter) *CreateReceiptFilterInput { - s.Filter = v - return s -} - -// An empty element returned on a successful request. -type CreateReceiptFilterOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateReceiptFilterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReceiptFilterOutput) GoString() string { - return s.String() -} - -// Represents a request to create a receipt rule. You use receipt rules to receive -// email with Amazon SES. For more information, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type CreateReceiptRuleInput struct { - _ struct{} `type:"structure"` - - // The name of an existing rule after which the new rule will be placed. If - // this parameter is null, the new rule will be inserted at the beginning of - // the rule list. - After *string `type:"string"` - - // A data structure that contains the specified rule's name, actions, recipients, - // domains, enabled status, scan status, and TLS policy. - // - // Rule is a required field - Rule *ReceiptRule `type:"structure" required:"true"` - - // The name of the rule set that the receipt rule will be added to. - // - // RuleSetName is a required field - RuleSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateReceiptRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReceiptRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateReceiptRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateReceiptRuleInput"} - if s.Rule == nil { - invalidParams.Add(request.NewErrParamRequired("Rule")) - } - if s.RuleSetName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleSetName")) - } - if s.Rule != nil { - if err := s.Rule.Validate(); err != nil { - invalidParams.AddNested("Rule", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAfter sets the After field's value. -func (s *CreateReceiptRuleInput) SetAfter(v string) *CreateReceiptRuleInput { - s.After = &v - return s -} - -// SetRule sets the Rule field's value. -func (s *CreateReceiptRuleInput) SetRule(v *ReceiptRule) *CreateReceiptRuleInput { - s.Rule = v - return s -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *CreateReceiptRuleInput) SetRuleSetName(v string) *CreateReceiptRuleInput { - s.RuleSetName = &v - return s -} - -// An empty element returned on a successful request. -type CreateReceiptRuleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateReceiptRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReceiptRuleOutput) GoString() string { - return s.String() -} - -// Represents a request to create an empty receipt rule set. You use receipt -// rule sets to receive email with Amazon SES. For more information, see the -// Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type CreateReceiptRuleSetInput struct { - _ struct{} `type:"structure"` - - // The name of the rule set to create. The name must: - // - // * This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), - // underscores (_), or dashes (-). - // - // * Start and end with a letter or number. - // - // * Contain less than 64 characters. - // - // RuleSetName is a required field - RuleSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateReceiptRuleSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReceiptRuleSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateReceiptRuleSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateReceiptRuleSetInput"} - if s.RuleSetName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *CreateReceiptRuleSetInput) SetRuleSetName(v string) *CreateReceiptRuleSetInput { - s.RuleSetName = &v - return s -} - -// An empty element returned on a successful request. -type CreateReceiptRuleSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateReceiptRuleSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateReceiptRuleSetOutput) GoString() string { - return s.String() -} - -// Represents a request to create an email template. For more information, see -// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html). -type CreateTemplateInput struct { - _ struct{} `type:"structure"` - - // The content of the email, composed of a subject line, an HTML part, and a - // text-only part. - // - // Template is a required field - Template *Template `type:"structure" required:"true"` -} - -// String returns the string representation -func (s CreateTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTemplateInput"} - if s.Template == nil { - invalidParams.Add(request.NewErrParamRequired("Template")) - } - if s.Template != nil { - if err := s.Template.Validate(); err != nil { - invalidParams.AddNested("Template", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTemplate sets the Template field's value. -func (s *CreateTemplateInput) SetTemplate(v *Template) *CreateTemplateInput { - s.Template = v - return s -} - -type CreateTemplateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTemplateOutput) GoString() string { - return s.String() -} - -// Contains information about a custom verification email template. -type CustomVerificationEmailTemplate struct { - _ struct{} `type:"structure"` - - // The URL that the recipient of the verification email is sent to if his or - // her address is not successfully verified. - FailureRedirectionURL *string `type:"string"` - - // The email address that the custom verification email is sent from. - FromEmailAddress *string `type:"string"` - - // The URL that the recipient of the verification email is sent to if his or - // her address is successfully verified. - SuccessRedirectionURL *string `type:"string"` - - // The name of the custom verification email template. - TemplateName *string `type:"string"` - - // The subject line of the custom verification email. - TemplateSubject *string `type:"string"` -} - -// String returns the string representation -func (s CustomVerificationEmailTemplate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CustomVerificationEmailTemplate) GoString() string { - return s.String() -} - -// SetFailureRedirectionURL sets the FailureRedirectionURL field's value. -func (s *CustomVerificationEmailTemplate) SetFailureRedirectionURL(v string) *CustomVerificationEmailTemplate { - s.FailureRedirectionURL = &v - return s -} - -// SetFromEmailAddress sets the FromEmailAddress field's value. -func (s *CustomVerificationEmailTemplate) SetFromEmailAddress(v string) *CustomVerificationEmailTemplate { - s.FromEmailAddress = &v - return s -} - -// SetSuccessRedirectionURL sets the SuccessRedirectionURL field's value. -func (s *CustomVerificationEmailTemplate) SetSuccessRedirectionURL(v string) *CustomVerificationEmailTemplate { - s.SuccessRedirectionURL = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *CustomVerificationEmailTemplate) SetTemplateName(v string) *CustomVerificationEmailTemplate { - s.TemplateName = &v - return s -} - -// SetTemplateSubject sets the TemplateSubject field's value. -func (s *CustomVerificationEmailTemplate) SetTemplateSubject(v string) *CustomVerificationEmailTemplate { - s.TemplateSubject = &v - return s -} - -// Represents a request to delete a configuration set event destination. Configuration -// set event destinations are associated with configuration sets, which enable -// you to publish email sending events. For information about using configuration -// sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type DeleteConfigurationSetEventDestinationInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration set from which to delete the event destination. - // - // ConfigurationSetName is a required field - ConfigurationSetName *string `type:"string" required:"true"` - - // The name of the event destination to delete. - // - // EventDestinationName is a required field - EventDestinationName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteConfigurationSetEventDestinationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConfigurationSetEventDestinationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteConfigurationSetEventDestinationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteConfigurationSetEventDestinationInput"} - if s.ConfigurationSetName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) - } - if s.EventDestinationName == nil { - invalidParams.Add(request.NewErrParamRequired("EventDestinationName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *DeleteConfigurationSetEventDestinationInput) SetConfigurationSetName(v string) *DeleteConfigurationSetEventDestinationInput { - s.ConfigurationSetName = &v - return s -} - -// SetEventDestinationName sets the EventDestinationName field's value. -func (s *DeleteConfigurationSetEventDestinationInput) SetEventDestinationName(v string) *DeleteConfigurationSetEventDestinationInput { - s.EventDestinationName = &v - return s -} - -// An empty element returned on a successful request. -type DeleteConfigurationSetEventDestinationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteConfigurationSetEventDestinationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConfigurationSetEventDestinationOutput) GoString() string { - return s.String() -} - -// Represents a request to delete a configuration set. Configuration sets enable -// you to publish email sending events. For information about using configuration -// sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type DeleteConfigurationSetInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration set to delete. - // - // ConfigurationSetName is a required field - ConfigurationSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteConfigurationSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConfigurationSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteConfigurationSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteConfigurationSetInput"} - if s.ConfigurationSetName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *DeleteConfigurationSetInput) SetConfigurationSetName(v string) *DeleteConfigurationSetInput { - s.ConfigurationSetName = &v - return s -} - -// An empty element returned on a successful request. -type DeleteConfigurationSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteConfigurationSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConfigurationSetOutput) GoString() string { - return s.String() -} - -// Represents a request to delete open and click tracking options in a configuration -// set. -type DeleteConfigurationSetTrackingOptionsInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration set from which you want to delete the tracking - // options. - // - // ConfigurationSetName is a required field - ConfigurationSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteConfigurationSetTrackingOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConfigurationSetTrackingOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteConfigurationSetTrackingOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteConfigurationSetTrackingOptionsInput"} - if s.ConfigurationSetName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *DeleteConfigurationSetTrackingOptionsInput) SetConfigurationSetName(v string) *DeleteConfigurationSetTrackingOptionsInput { - s.ConfigurationSetName = &v - return s -} - -// An empty element returned on a successful request. -type DeleteConfigurationSetTrackingOptionsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteConfigurationSetTrackingOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteConfigurationSetTrackingOptionsOutput) GoString() string { - return s.String() -} - -// Represents a request to delete an existing custom verification email template. -type DeleteCustomVerificationEmailTemplateInput struct { - _ struct{} `type:"structure"` - - // The name of the custom verification email template that you want to delete. - // - // TemplateName is a required field - TemplateName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteCustomVerificationEmailTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCustomVerificationEmailTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCustomVerificationEmailTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCustomVerificationEmailTemplateInput"} - if s.TemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTemplateName sets the TemplateName field's value. -func (s *DeleteCustomVerificationEmailTemplateInput) SetTemplateName(v string) *DeleteCustomVerificationEmailTemplateInput { - s.TemplateName = &v - return s -} - -type DeleteCustomVerificationEmailTemplateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCustomVerificationEmailTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCustomVerificationEmailTemplateOutput) GoString() string { - return s.String() -} - -// Represents a request to delete one of your Amazon SES identities (an email -// address or domain). -type DeleteIdentityInput struct { - _ struct{} `type:"structure"` - - // The identity to be removed from the list of identities for the AWS Account. - // - // Identity is a required field - Identity *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIdentityInput"} - if s.Identity == nil { - invalidParams.Add(request.NewErrParamRequired("Identity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentity sets the Identity field's value. -func (s *DeleteIdentityInput) SetIdentity(v string) *DeleteIdentityInput { - s.Identity = &v - return s -} - -// An empty element returned on a successful request. -type DeleteIdentityOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIdentityOutput) GoString() string { - return s.String() -} - -// Represents a request to delete a sending authorization policy for an identity. -// Sending authorization is an Amazon SES feature that enables you to authorize -// other senders to use your identities. For information, see the Amazon SES -// Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). -type DeleteIdentityPolicyInput struct { - _ struct{} `type:"structure"` - - // The identity that is associated with the policy that you want to delete. - // You can specify the identity by using its name or by using its Amazon Resource - // Name (ARN). Examples: user@example.com, example.com, arn:aws:ses:us-east-1:123456789012:identity/example.com. - // - // To successfully call this API, you must own the identity. - // - // Identity is a required field - Identity *string `type:"string" required:"true"` - - // The name of the policy to be deleted. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteIdentityPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIdentityPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIdentityPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIdentityPolicyInput"} - if s.Identity == nil { - invalidParams.Add(request.NewErrParamRequired("Identity")) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentity sets the Identity field's value. -func (s *DeleteIdentityPolicyInput) SetIdentity(v string) *DeleteIdentityPolicyInput { - s.Identity = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteIdentityPolicyInput) SetPolicyName(v string) *DeleteIdentityPolicyInput { - s.PolicyName = &v - return s -} - -// An empty element returned on a successful request. -type DeleteIdentityPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteIdentityPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIdentityPolicyOutput) GoString() string { - return s.String() -} - -// Represents a request to delete an IP address filter. You use IP address filters -// when you receive email with Amazon SES. For more information, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type DeleteReceiptFilterInput struct { - _ struct{} `type:"structure"` - - // The name of the IP address filter to delete. - // - // FilterName is a required field - FilterName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteReceiptFilterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReceiptFilterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteReceiptFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteReceiptFilterInput"} - if s.FilterName == nil { - invalidParams.Add(request.NewErrParamRequired("FilterName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilterName sets the FilterName field's value. -func (s *DeleteReceiptFilterInput) SetFilterName(v string) *DeleteReceiptFilterInput { - s.FilterName = &v - return s -} - -// An empty element returned on a successful request. -type DeleteReceiptFilterOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteReceiptFilterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReceiptFilterOutput) GoString() string { - return s.String() -} - -// Represents a request to delete a receipt rule. You use receipt rules to receive -// email with Amazon SES. For more information, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type DeleteReceiptRuleInput struct { - _ struct{} `type:"structure"` - - // The name of the receipt rule to delete. - // - // RuleName is a required field - RuleName *string `type:"string" required:"true"` - - // The name of the receipt rule set that contains the receipt rule to delete. - // - // RuleSetName is a required field - RuleSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteReceiptRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReceiptRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteReceiptRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteReceiptRuleInput"} - if s.RuleName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleName")) - } - if s.RuleSetName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleName sets the RuleName field's value. -func (s *DeleteReceiptRuleInput) SetRuleName(v string) *DeleteReceiptRuleInput { - s.RuleName = &v - return s -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *DeleteReceiptRuleInput) SetRuleSetName(v string) *DeleteReceiptRuleInput { - s.RuleSetName = &v - return s -} - -// An empty element returned on a successful request. -type DeleteReceiptRuleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteReceiptRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReceiptRuleOutput) GoString() string { - return s.String() -} - -// Represents a request to delete a receipt rule set and all of the receipt -// rules it contains. You use receipt rule sets to receive email with Amazon -// SES. For more information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type DeleteReceiptRuleSetInput struct { - _ struct{} `type:"structure"` - - // The name of the receipt rule set to delete. - // - // RuleSetName is a required field - RuleSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteReceiptRuleSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReceiptRuleSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteReceiptRuleSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteReceiptRuleSetInput"} - if s.RuleSetName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *DeleteReceiptRuleSetInput) SetRuleSetName(v string) *DeleteReceiptRuleSetInput { - s.RuleSetName = &v - return s -} - -// An empty element returned on a successful request. -type DeleteReceiptRuleSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteReceiptRuleSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteReceiptRuleSetOutput) GoString() string { - return s.String() -} - -// Represents a request to delete an email template. For more information, see -// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html). -type DeleteTemplateInput struct { - _ struct{} `type:"structure"` - - // The name of the template to be deleted. - // - // TemplateName is a required field - TemplateName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTemplateInput"} - if s.TemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTemplateName sets the TemplateName field's value. -func (s *DeleteTemplateInput) SetTemplateName(v string) *DeleteTemplateInput { - s.TemplateName = &v - return s -} - -type DeleteTemplateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTemplateOutput) GoString() string { - return s.String() -} - -// Represents a request to delete an email address from the list of email addresses -// you have attempted to verify under your AWS account. -type DeleteVerifiedEmailAddressInput struct { - _ struct{} `type:"structure"` - - // An email address to be removed from the list of verified addresses. - // - // EmailAddress is a required field - EmailAddress *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVerifiedEmailAddressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVerifiedEmailAddressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVerifiedEmailAddressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVerifiedEmailAddressInput"} - if s.EmailAddress == nil { - invalidParams.Add(request.NewErrParamRequired("EmailAddress")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEmailAddress sets the EmailAddress field's value. -func (s *DeleteVerifiedEmailAddressInput) SetEmailAddress(v string) *DeleteVerifiedEmailAddressInput { - s.EmailAddress = &v - return s -} - -type DeleteVerifiedEmailAddressOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteVerifiedEmailAddressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVerifiedEmailAddressOutput) GoString() string { - return s.String() -} - -// Represents a request to return the metadata and receipt rules for the receipt -// rule set that is currently active. You use receipt rule sets to receive email -// with Amazon SES. For more information, see the Amazon SES Developer Guide -// (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type DescribeActiveReceiptRuleSetInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeActiveReceiptRuleSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeActiveReceiptRuleSetInput) GoString() string { - return s.String() -} - -// Represents the metadata and receipt rules for the receipt rule set that is -// currently active. -type DescribeActiveReceiptRuleSetOutput struct { - _ struct{} `type:"structure"` - - // The metadata for the currently active receipt rule set. The metadata consists - // of the rule set name and a timestamp of when the rule set was created. - Metadata *ReceiptRuleSetMetadata `type:"structure"` - - // The receipt rules that belong to the active rule set. - Rules []*ReceiptRule `type:"list"` -} - -// String returns the string representation -func (s DescribeActiveReceiptRuleSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeActiveReceiptRuleSetOutput) GoString() string { - return s.String() -} - -// SetMetadata sets the Metadata field's value. -func (s *DescribeActiveReceiptRuleSetOutput) SetMetadata(v *ReceiptRuleSetMetadata) *DescribeActiveReceiptRuleSetOutput { - s.Metadata = v - return s -} - -// SetRules sets the Rules field's value. -func (s *DescribeActiveReceiptRuleSetOutput) SetRules(v []*ReceiptRule) *DescribeActiveReceiptRuleSetOutput { - s.Rules = v - return s -} - -// Represents a request to return the details of a configuration set. Configuration -// sets enable you to publish email sending events. For information about using -// configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type DescribeConfigurationSetInput struct { - _ struct{} `type:"structure"` - - // A list of configuration set attributes to return. - ConfigurationSetAttributeNames []*string `type:"list"` - - // The name of the configuration set to describe. - // - // ConfigurationSetName is a required field - ConfigurationSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeConfigurationSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeConfigurationSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeConfigurationSetInput"} - if s.ConfigurationSetName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetAttributeNames sets the ConfigurationSetAttributeNames field's value. -func (s *DescribeConfigurationSetInput) SetConfigurationSetAttributeNames(v []*string) *DescribeConfigurationSetInput { - s.ConfigurationSetAttributeNames = v - return s -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *DescribeConfigurationSetInput) SetConfigurationSetName(v string) *DescribeConfigurationSetInput { - s.ConfigurationSetName = &v - return s -} - -// Represents the details of a configuration set. Configuration sets enable -// you to publish email sending events. For information about using configuration -// sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type DescribeConfigurationSetOutput struct { - _ struct{} `type:"structure"` - - // The configuration set object associated with the specified configuration - // set. - ConfigurationSet *ConfigurationSet `type:"structure"` - - // A list of event destinations associated with the configuration set. - EventDestinations []*EventDestination `type:"list"` - - // An object that represents the reputation settings for the configuration set. - ReputationOptions *ReputationOptions `type:"structure"` - - // The name of the custom open and click tracking domain associated with the - // configuration set. - TrackingOptions *TrackingOptions `type:"structure"` -} - -// String returns the string representation -func (s DescribeConfigurationSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeConfigurationSetOutput) GoString() string { - return s.String() -} - -// SetConfigurationSet sets the ConfigurationSet field's value. -func (s *DescribeConfigurationSetOutput) SetConfigurationSet(v *ConfigurationSet) *DescribeConfigurationSetOutput { - s.ConfigurationSet = v - return s -} - -// SetEventDestinations sets the EventDestinations field's value. -func (s *DescribeConfigurationSetOutput) SetEventDestinations(v []*EventDestination) *DescribeConfigurationSetOutput { - s.EventDestinations = v - return s -} - -// SetReputationOptions sets the ReputationOptions field's value. -func (s *DescribeConfigurationSetOutput) SetReputationOptions(v *ReputationOptions) *DescribeConfigurationSetOutput { - s.ReputationOptions = v - return s -} - -// SetTrackingOptions sets the TrackingOptions field's value. -func (s *DescribeConfigurationSetOutput) SetTrackingOptions(v *TrackingOptions) *DescribeConfigurationSetOutput { - s.TrackingOptions = v - return s -} - -// Represents a request to return the details of a receipt rule. You use receipt -// rules to receive email with Amazon SES. For more information, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type DescribeReceiptRuleInput struct { - _ struct{} `type:"structure"` - - // The name of the receipt rule. - // - // RuleName is a required field - RuleName *string `type:"string" required:"true"` - - // The name of the receipt rule set that the receipt rule belongs to. - // - // RuleSetName is a required field - RuleSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeReceiptRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReceiptRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeReceiptRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeReceiptRuleInput"} - if s.RuleName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleName")) - } - if s.RuleSetName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleName sets the RuleName field's value. -func (s *DescribeReceiptRuleInput) SetRuleName(v string) *DescribeReceiptRuleInput { - s.RuleName = &v - return s -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *DescribeReceiptRuleInput) SetRuleSetName(v string) *DescribeReceiptRuleInput { - s.RuleSetName = &v - return s -} - -// Represents the details of a receipt rule. -type DescribeReceiptRuleOutput struct { - _ struct{} `type:"structure"` - - // A data structure that contains the specified receipt rule's name, actions, - // recipients, domains, enabled status, scan status, and Transport Layer Security - // (TLS) policy. - Rule *ReceiptRule `type:"structure"` -} - -// String returns the string representation -func (s DescribeReceiptRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReceiptRuleOutput) GoString() string { - return s.String() -} - -// SetRule sets the Rule field's value. -func (s *DescribeReceiptRuleOutput) SetRule(v *ReceiptRule) *DescribeReceiptRuleOutput { - s.Rule = v - return s -} - -// Represents a request to return the details of a receipt rule set. You use -// receipt rule sets to receive email with Amazon SES. For more information, -// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type DescribeReceiptRuleSetInput struct { - _ struct{} `type:"structure"` - - // The name of the receipt rule set to describe. - // - // RuleSetName is a required field - RuleSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeReceiptRuleSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReceiptRuleSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeReceiptRuleSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeReceiptRuleSetInput"} - if s.RuleSetName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *DescribeReceiptRuleSetInput) SetRuleSetName(v string) *DescribeReceiptRuleSetInput { - s.RuleSetName = &v - return s -} - -// Represents the details of the specified receipt rule set. -type DescribeReceiptRuleSetOutput struct { - _ struct{} `type:"structure"` - - // The metadata for the receipt rule set, which consists of the rule set name - // and the timestamp of when the rule set was created. - Metadata *ReceiptRuleSetMetadata `type:"structure"` - - // A list of the receipt rules that belong to the specified receipt rule set. - Rules []*ReceiptRule `type:"list"` -} - -// String returns the string representation -func (s DescribeReceiptRuleSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeReceiptRuleSetOutput) GoString() string { - return s.String() -} - -// SetMetadata sets the Metadata field's value. -func (s *DescribeReceiptRuleSetOutput) SetMetadata(v *ReceiptRuleSetMetadata) *DescribeReceiptRuleSetOutput { - s.Metadata = v - return s -} - -// SetRules sets the Rules field's value. -func (s *DescribeReceiptRuleSetOutput) SetRules(v []*ReceiptRule) *DescribeReceiptRuleSetOutput { - s.Rules = v - return s -} - -// Represents the destination of the message, consisting of To:, CC:, and BCC: -// fields. -// -// Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531 -// (https://tools.ietf.org/html/rfc6531). For this reason, the local part of -// a destination email address (the part of the email address that precedes -// the @ sign) may only contain 7-bit ASCII characters (https://en.wikipedia.org/wiki/Email_address#Local-part). -// If the domain part of an address (the part after the @ sign) contains non-ASCII -// characters, they must be encoded using Punycode, as described in RFC3492 -// (https://tools.ietf.org/html/rfc3492.html). -type Destination struct { - _ struct{} `type:"structure"` - - // The BCC: field(s) of the message. - BccAddresses []*string `type:"list"` - - // The CC: field(s) of the message. - CcAddresses []*string `type:"list"` - - // The To: field(s) of the message. - ToAddresses []*string `type:"list"` -} - -// String returns the string representation -func (s Destination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Destination) GoString() string { - return s.String() -} - -// SetBccAddresses sets the BccAddresses field's value. -func (s *Destination) SetBccAddresses(v []*string) *Destination { - s.BccAddresses = v - return s -} - -// SetCcAddresses sets the CcAddresses field's value. -func (s *Destination) SetCcAddresses(v []*string) *Destination { - s.CcAddresses = v - return s -} - -// SetToAddresses sets the ToAddresses field's value. -func (s *Destination) SetToAddresses(v []*string) *Destination { - s.ToAddresses = v - return s -} - -// Contains information about the event destination that the specified email -// sending events will be published to. -// -// When you create or update an event destination, you must provide one, and -// only one, destination. The destination can be Amazon CloudWatch, Amazon Kinesis -// Firehose or Amazon Simple Notification Service (Amazon SNS). -// -// Event destinations are associated with configuration sets, which enable you -// to publish email sending events to Amazon CloudWatch, Amazon Kinesis Firehose, -// or Amazon Simple Notification Service (Amazon SNS). For information about -// using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type EventDestination struct { - _ struct{} `type:"structure"` - - // An object that contains the names, default values, and sources of the dimensions - // associated with an Amazon CloudWatch event destination. - CloudWatchDestination *CloudWatchDestination `type:"structure"` - - // Sets whether Amazon SES publishes events to this destination when you send - // an email with the associated configuration set. Set to true to enable publishing - // to this destination; set to false to prevent publishing to this destination. - // The default value is false. - Enabled *bool `type:"boolean"` - - // An object that contains the delivery stream ARN and the IAM role ARN associated - // with an Amazon Kinesis Firehose event destination. - KinesisFirehoseDestination *KinesisFirehoseDestination `type:"structure"` - - // The type of email sending events to publish to the event destination. - // - // MatchingEventTypes is a required field - MatchingEventTypes []*string `type:"list" required:"true"` - - // The name of the event destination. The name must: - // - // * This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), - // underscores (_), or dashes (-). - // - // * Contain less than 64 characters. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // An object that contains the topic ARN associated with an Amazon Simple Notification - // Service (Amazon SNS) event destination. - SNSDestination *SNSDestination `type:"structure"` -} - -// String returns the string representation -func (s EventDestination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventDestination) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EventDestination) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EventDestination"} - if s.MatchingEventTypes == nil { - invalidParams.Add(request.NewErrParamRequired("MatchingEventTypes")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.CloudWatchDestination != nil { - if err := s.CloudWatchDestination.Validate(); err != nil { - invalidParams.AddNested("CloudWatchDestination", err.(request.ErrInvalidParams)) - } - } - if s.KinesisFirehoseDestination != nil { - if err := s.KinesisFirehoseDestination.Validate(); err != nil { - invalidParams.AddNested("KinesisFirehoseDestination", err.(request.ErrInvalidParams)) - } - } - if s.SNSDestination != nil { - if err := s.SNSDestination.Validate(); err != nil { - invalidParams.AddNested("SNSDestination", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchDestination sets the CloudWatchDestination field's value. -func (s *EventDestination) SetCloudWatchDestination(v *CloudWatchDestination) *EventDestination { - s.CloudWatchDestination = v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *EventDestination) SetEnabled(v bool) *EventDestination { - s.Enabled = &v - return s -} - -// SetKinesisFirehoseDestination sets the KinesisFirehoseDestination field's value. -func (s *EventDestination) SetKinesisFirehoseDestination(v *KinesisFirehoseDestination) *EventDestination { - s.KinesisFirehoseDestination = v - return s -} - -// SetMatchingEventTypes sets the MatchingEventTypes field's value. -func (s *EventDestination) SetMatchingEventTypes(v []*string) *EventDestination { - s.MatchingEventTypes = v - return s -} - -// SetName sets the Name field's value. -func (s *EventDestination) SetName(v string) *EventDestination { - s.Name = &v - return s -} - -// SetSNSDestination sets the SNSDestination field's value. -func (s *EventDestination) SetSNSDestination(v *SNSDestination) *EventDestination { - s.SNSDestination = v - return s -} - -// Additional X-headers to include in the Delivery Status Notification (DSN) -// when an email that Amazon SES receives on your behalf bounces. -// -// For information about receiving email through Amazon SES, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html). -type ExtensionField struct { - _ struct{} `type:"structure"` - - // The name of the header to add. Must be between 1 and 50 characters, inclusive, - // and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The value of the header to add. Must be less than 2048 characters, and must - // not contain newline characters ("\r" or "\n"). - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ExtensionField) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExtensionField) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExtensionField) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExtensionField"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *ExtensionField) SetName(v string) *ExtensionField { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ExtensionField) SetValue(v string) *ExtensionField { - s.Value = &v - return s -} - -type GetAccountSendingEnabledInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetAccountSendingEnabledInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAccountSendingEnabledInput) GoString() string { - return s.String() -} - -// Represents a request to return the email sending status for your Amazon SES -// account in the current AWS Region. -type GetAccountSendingEnabledOutput struct { - _ struct{} `type:"structure"` - - // Describes whether email sending is enabled or disabled for your Amazon SES - // account in the current AWS Region. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s GetAccountSendingEnabledOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAccountSendingEnabledOutput) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *GetAccountSendingEnabledOutput) SetEnabled(v bool) *GetAccountSendingEnabledOutput { - s.Enabled = &v - return s -} - -// Represents a request to retrieve an existing custom verification email template. -type GetCustomVerificationEmailTemplateInput struct { - _ struct{} `type:"structure"` - - // The name of the custom verification email template that you want to retrieve. - // - // TemplateName is a required field - TemplateName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetCustomVerificationEmailTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCustomVerificationEmailTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCustomVerificationEmailTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCustomVerificationEmailTemplateInput"} - if s.TemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTemplateName sets the TemplateName field's value. -func (s *GetCustomVerificationEmailTemplateInput) SetTemplateName(v string) *GetCustomVerificationEmailTemplateInput { - s.TemplateName = &v - return s -} - -// The content of the custom verification email template. -type GetCustomVerificationEmailTemplateOutput struct { - _ struct{} `type:"structure"` - - // The URL that the recipient of the verification email is sent to if his or - // her address is not successfully verified. - FailureRedirectionURL *string `type:"string"` - - // The email address that the custom verification email is sent from. - FromEmailAddress *string `type:"string"` - - // The URL that the recipient of the verification email is sent to if his or - // her address is successfully verified. - SuccessRedirectionURL *string `type:"string"` - - // The content of the custom verification email. - TemplateContent *string `type:"string"` - - // The name of the custom verification email template. - TemplateName *string `type:"string"` - - // The subject line of the custom verification email. - TemplateSubject *string `type:"string"` -} - -// String returns the string representation -func (s GetCustomVerificationEmailTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCustomVerificationEmailTemplateOutput) GoString() string { - return s.String() -} - -// SetFailureRedirectionURL sets the FailureRedirectionURL field's value. -func (s *GetCustomVerificationEmailTemplateOutput) SetFailureRedirectionURL(v string) *GetCustomVerificationEmailTemplateOutput { - s.FailureRedirectionURL = &v - return s -} - -// SetFromEmailAddress sets the FromEmailAddress field's value. -func (s *GetCustomVerificationEmailTemplateOutput) SetFromEmailAddress(v string) *GetCustomVerificationEmailTemplateOutput { - s.FromEmailAddress = &v - return s -} - -// SetSuccessRedirectionURL sets the SuccessRedirectionURL field's value. -func (s *GetCustomVerificationEmailTemplateOutput) SetSuccessRedirectionURL(v string) *GetCustomVerificationEmailTemplateOutput { - s.SuccessRedirectionURL = &v - return s -} - -// SetTemplateContent sets the TemplateContent field's value. -func (s *GetCustomVerificationEmailTemplateOutput) SetTemplateContent(v string) *GetCustomVerificationEmailTemplateOutput { - s.TemplateContent = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *GetCustomVerificationEmailTemplateOutput) SetTemplateName(v string) *GetCustomVerificationEmailTemplateOutput { - s.TemplateName = &v - return s -} - -// SetTemplateSubject sets the TemplateSubject field's value. -func (s *GetCustomVerificationEmailTemplateOutput) SetTemplateSubject(v string) *GetCustomVerificationEmailTemplateOutput { - s.TemplateSubject = &v - return s -} - -// Represents a request for the status of Amazon SES Easy DKIM signing for an -// identity. For domain identities, this request also returns the DKIM tokens -// that are required for Easy DKIM signing, and whether Amazon SES successfully -// verified that these tokens were published. For more information about Easy -// DKIM, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html). -type GetIdentityDkimAttributesInput struct { - _ struct{} `type:"structure"` - - // A list of one or more verified identities - email addresses, domains, or - // both. - // - // Identities is a required field - Identities []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s GetIdentityDkimAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdentityDkimAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIdentityDkimAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIdentityDkimAttributesInput"} - if s.Identities == nil { - invalidParams.Add(request.NewErrParamRequired("Identities")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentities sets the Identities field's value. -func (s *GetIdentityDkimAttributesInput) SetIdentities(v []*string) *GetIdentityDkimAttributesInput { - s.Identities = v - return s -} - -// Represents the status of Amazon SES Easy DKIM signing for an identity. For -// domain identities, this response also contains the DKIM tokens that are required -// for Easy DKIM signing, and whether Amazon SES successfully verified that -// these tokens were published. -type GetIdentityDkimAttributesOutput struct { - _ struct{} `type:"structure"` - - // The DKIM attributes for an email address or a domain. - // - // DkimAttributes is a required field - DkimAttributes map[string]*IdentityDkimAttributes `type:"map" required:"true"` -} - -// String returns the string representation -func (s GetIdentityDkimAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdentityDkimAttributesOutput) GoString() string { - return s.String() -} - -// SetDkimAttributes sets the DkimAttributes field's value. -func (s *GetIdentityDkimAttributesOutput) SetDkimAttributes(v map[string]*IdentityDkimAttributes) *GetIdentityDkimAttributesOutput { - s.DkimAttributes = v - return s -} - -// Represents a request to return the Amazon SES custom MAIL FROM attributes -// for a list of identities. For information about using a custom MAIL FROM -// domain, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from.html). -type GetIdentityMailFromDomainAttributesInput struct { - _ struct{} `type:"structure"` - - // A list of one or more identities. - // - // Identities is a required field - Identities []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s GetIdentityMailFromDomainAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdentityMailFromDomainAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIdentityMailFromDomainAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIdentityMailFromDomainAttributesInput"} - if s.Identities == nil { - invalidParams.Add(request.NewErrParamRequired("Identities")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentities sets the Identities field's value. -func (s *GetIdentityMailFromDomainAttributesInput) SetIdentities(v []*string) *GetIdentityMailFromDomainAttributesInput { - s.Identities = v - return s -} - -// Represents the custom MAIL FROM attributes for a list of identities. -type GetIdentityMailFromDomainAttributesOutput struct { - _ struct{} `type:"structure"` - - // A map of identities to custom MAIL FROM attributes. - // - // MailFromDomainAttributes is a required field - MailFromDomainAttributes map[string]*IdentityMailFromDomainAttributes `type:"map" required:"true"` -} - -// String returns the string representation -func (s GetIdentityMailFromDomainAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdentityMailFromDomainAttributesOutput) GoString() string { - return s.String() -} - -// SetMailFromDomainAttributes sets the MailFromDomainAttributes field's value. -func (s *GetIdentityMailFromDomainAttributesOutput) SetMailFromDomainAttributes(v map[string]*IdentityMailFromDomainAttributes) *GetIdentityMailFromDomainAttributesOutput { - s.MailFromDomainAttributes = v - return s -} - -// Represents a request to return the notification attributes for a list of -// identities you verified with Amazon SES. For information about Amazon SES -// notifications, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html). -type GetIdentityNotificationAttributesInput struct { - _ struct{} `type:"structure"` - - // A list of one or more identities. You can specify an identity by using its - // name or by using its Amazon Resource Name (ARN). Examples: user@example.com, - // example.com, arn:aws:ses:us-east-1:123456789012:identity/example.com. - // - // Identities is a required field - Identities []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s GetIdentityNotificationAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdentityNotificationAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIdentityNotificationAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIdentityNotificationAttributesInput"} - if s.Identities == nil { - invalidParams.Add(request.NewErrParamRequired("Identities")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentities sets the Identities field's value. -func (s *GetIdentityNotificationAttributesInput) SetIdentities(v []*string) *GetIdentityNotificationAttributesInput { - s.Identities = v - return s -} - -// Represents the notification attributes for a list of identities. -type GetIdentityNotificationAttributesOutput struct { - _ struct{} `type:"structure"` - - // A map of Identity to IdentityNotificationAttributes. - // - // NotificationAttributes is a required field - NotificationAttributes map[string]*IdentityNotificationAttributes `type:"map" required:"true"` -} - -// String returns the string representation -func (s GetIdentityNotificationAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdentityNotificationAttributesOutput) GoString() string { - return s.String() -} - -// SetNotificationAttributes sets the NotificationAttributes field's value. -func (s *GetIdentityNotificationAttributesOutput) SetNotificationAttributes(v map[string]*IdentityNotificationAttributes) *GetIdentityNotificationAttributesOutput { - s.NotificationAttributes = v - return s -} - -// Represents a request to return the requested sending authorization policies -// for an identity. Sending authorization is an Amazon SES feature that enables -// you to authorize other senders to use your identities. For information, see -// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). -type GetIdentityPoliciesInput struct { - _ struct{} `type:"structure"` - - // The identity for which the policies will be retrieved. You can specify an - // identity by using its name or by using its Amazon Resource Name (ARN). Examples: - // user@example.com, example.com, arn:aws:ses:us-east-1:123456789012:identity/example.com. - // - // To successfully call this API, you must own the identity. - // - // Identity is a required field - Identity *string `type:"string" required:"true"` - - // A list of the names of policies to be retrieved. You can retrieve a maximum - // of 20 policies at a time. If you do not know the names of the policies that - // are attached to the identity, you can use ListIdentityPolicies. - // - // PolicyNames is a required field - PolicyNames []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s GetIdentityPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdentityPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIdentityPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIdentityPoliciesInput"} - if s.Identity == nil { - invalidParams.Add(request.NewErrParamRequired("Identity")) - } - if s.PolicyNames == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentity sets the Identity field's value. -func (s *GetIdentityPoliciesInput) SetIdentity(v string) *GetIdentityPoliciesInput { - s.Identity = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *GetIdentityPoliciesInput) SetPolicyNames(v []*string) *GetIdentityPoliciesInput { - s.PolicyNames = v - return s -} - -// Represents the requested sending authorization policies. -type GetIdentityPoliciesOutput struct { - _ struct{} `type:"structure"` - - // A map of policy names to policies. - // - // Policies is a required field - Policies map[string]*string `type:"map" required:"true"` -} - -// String returns the string representation -func (s GetIdentityPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdentityPoliciesOutput) GoString() string { - return s.String() -} - -// SetPolicies sets the Policies field's value. -func (s *GetIdentityPoliciesOutput) SetPolicies(v map[string]*string) *GetIdentityPoliciesOutput { - s.Policies = v - return s -} - -// Represents a request to return the Amazon SES verification status of a list -// of identities. For domain identities, this request also returns the verification -// token. For information about verifying identities with Amazon SES, see the -// Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html). -type GetIdentityVerificationAttributesInput struct { - _ struct{} `type:"structure"` - - // A list of identities. - // - // Identities is a required field - Identities []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s GetIdentityVerificationAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdentityVerificationAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIdentityVerificationAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIdentityVerificationAttributesInput"} - if s.Identities == nil { - invalidParams.Add(request.NewErrParamRequired("Identities")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentities sets the Identities field's value. -func (s *GetIdentityVerificationAttributesInput) SetIdentities(v []*string) *GetIdentityVerificationAttributesInput { - s.Identities = v - return s -} - -// The Amazon SES verification status of a list of identities. For domain identities, -// this response also contains the verification token. -type GetIdentityVerificationAttributesOutput struct { - _ struct{} `type:"structure"` - - // A map of Identities to IdentityVerificationAttributes objects. - // - // VerificationAttributes is a required field - VerificationAttributes map[string]*IdentityVerificationAttributes `type:"map" required:"true"` -} - -// String returns the string representation -func (s GetIdentityVerificationAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIdentityVerificationAttributesOutput) GoString() string { - return s.String() -} - -// SetVerificationAttributes sets the VerificationAttributes field's value. -func (s *GetIdentityVerificationAttributesOutput) SetVerificationAttributes(v map[string]*IdentityVerificationAttributes) *GetIdentityVerificationAttributesOutput { - s.VerificationAttributes = v - return s -} - -type GetSendQuotaInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetSendQuotaInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSendQuotaInput) GoString() string { - return s.String() -} - -// Represents your Amazon SES daily sending quota, maximum send rate, and the -// number of emails you have sent in the last 24 hours. -type GetSendQuotaOutput struct { - _ struct{} `type:"structure"` - - // The maximum number of emails the user is allowed to send in a 24-hour interval. - // A value of -1 signifies an unlimited quota. - Max24HourSend *float64 `type:"double"` - - // The maximum number of emails that Amazon SES can accept from the user's account - // per second. - // - // The rate at which Amazon SES accepts the user's messages might be less than - // the maximum send rate. - MaxSendRate *float64 `type:"double"` - - // The number of emails sent during the previous 24 hours. - SentLast24Hours *float64 `type:"double"` -} - -// String returns the string representation -func (s GetSendQuotaOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSendQuotaOutput) GoString() string { - return s.String() -} - -// SetMax24HourSend sets the Max24HourSend field's value. -func (s *GetSendQuotaOutput) SetMax24HourSend(v float64) *GetSendQuotaOutput { - s.Max24HourSend = &v - return s -} - -// SetMaxSendRate sets the MaxSendRate field's value. -func (s *GetSendQuotaOutput) SetMaxSendRate(v float64) *GetSendQuotaOutput { - s.MaxSendRate = &v - return s -} - -// SetSentLast24Hours sets the SentLast24Hours field's value. -func (s *GetSendQuotaOutput) SetSentLast24Hours(v float64) *GetSendQuotaOutput { - s.SentLast24Hours = &v - return s -} - -type GetSendStatisticsInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetSendStatisticsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSendStatisticsInput) GoString() string { - return s.String() -} - -// Represents a list of data points. This list contains aggregated data from -// the previous two weeks of your sending activity with Amazon SES. -type GetSendStatisticsOutput struct { - _ struct{} `type:"structure"` - - // A list of data points, each of which represents 15 minutes of activity. - SendDataPoints []*SendDataPoint `type:"list"` -} - -// String returns the string representation -func (s GetSendStatisticsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSendStatisticsOutput) GoString() string { - return s.String() -} - -// SetSendDataPoints sets the SendDataPoints field's value. -func (s *GetSendStatisticsOutput) SetSendDataPoints(v []*SendDataPoint) *GetSendStatisticsOutput { - s.SendDataPoints = v - return s -} - -type GetTemplateInput struct { - _ struct{} `type:"structure"` - - // The name of the template you want to retrieve. - // - // TemplateName is a required field - TemplateName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTemplateInput"} - if s.TemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTemplateName sets the TemplateName field's value. -func (s *GetTemplateInput) SetTemplateName(v string) *GetTemplateInput { - s.TemplateName = &v - return s -} - -type GetTemplateOutput struct { - _ struct{} `type:"structure"` - - // The content of the email, composed of a subject line, an HTML part, and a - // text-only part. - Template *Template `type:"structure"` -} - -// String returns the string representation -func (s GetTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTemplateOutput) GoString() string { - return s.String() -} - -// SetTemplate sets the Template field's value. -func (s *GetTemplateOutput) SetTemplate(v *Template) *GetTemplateOutput { - s.Template = v - return s -} - -// Represents the DKIM attributes of a verified email address or a domain. -type IdentityDkimAttributes struct { - _ struct{} `type:"structure"` - - // True if DKIM signing is enabled for email sent from the identity; false otherwise. - // The default value is true. - // - // DkimEnabled is a required field - DkimEnabled *bool `type:"boolean" required:"true"` - - // A set of character strings that represent the domain's identity. Using these - // tokens, you will need to create DNS CNAME records that point to DKIM public - // keys hosted by Amazon SES. Amazon Web Services will eventually detect that - // you have updated your DNS records; this detection process may take up to - // 72 hours. Upon successful detection, Amazon SES will be able to DKIM-sign - // email originating from that domain. (This only applies to domain identities, - // not email address identities.) - // - // For more information about creating DNS records using DKIM tokens, go to - // the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim-dns-records.html). - DkimTokens []*string `type:"list"` - - // Describes whether Amazon SES has successfully verified the DKIM DNS records - // (tokens) published in the domain name's DNS. (This only applies to domain - // identities, not email address identities.) - // - // DkimVerificationStatus is a required field - DkimVerificationStatus *string `type:"string" required:"true" enum:"VerificationStatus"` -} - -// String returns the string representation -func (s IdentityDkimAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IdentityDkimAttributes) GoString() string { - return s.String() -} - -// SetDkimEnabled sets the DkimEnabled field's value. -func (s *IdentityDkimAttributes) SetDkimEnabled(v bool) *IdentityDkimAttributes { - s.DkimEnabled = &v - return s -} - -// SetDkimTokens sets the DkimTokens field's value. -func (s *IdentityDkimAttributes) SetDkimTokens(v []*string) *IdentityDkimAttributes { - s.DkimTokens = v - return s -} - -// SetDkimVerificationStatus sets the DkimVerificationStatus field's value. -func (s *IdentityDkimAttributes) SetDkimVerificationStatus(v string) *IdentityDkimAttributes { - s.DkimVerificationStatus = &v - return s -} - -// Represents the custom MAIL FROM domain attributes of a verified identity -// (email address or domain). -type IdentityMailFromDomainAttributes struct { - _ struct{} `type:"structure"` - - // The action that Amazon SES takes if it cannot successfully read the required - // MX record when you send an email. A value of UseDefaultValue indicates that - // if Amazon SES cannot read the required MX record, it uses amazonses.com (or - // a subdomain of that) as the MAIL FROM domain. A value of RejectMessage indicates - // that if Amazon SES cannot read the required MX record, Amazon SES returns - // a MailFromDomainNotVerified error and does not send the email. - // - // The custom MAIL FROM setup states that result in this behavior are Pending, - // Failed, and TemporaryFailure. - // - // BehaviorOnMXFailure is a required field - BehaviorOnMXFailure *string `type:"string" required:"true" enum:"BehaviorOnMXFailure"` - - // The custom MAIL FROM domain that the identity is configured to use. - // - // MailFromDomain is a required field - MailFromDomain *string `type:"string" required:"true"` - - // The state that indicates whether Amazon SES has successfully read the MX - // record required for custom MAIL FROM domain setup. If the state is Success, - // Amazon SES uses the specified custom MAIL FROM domain when the verified identity - // sends an email. All other states indicate that Amazon SES takes the action - // described by BehaviorOnMXFailure. - // - // MailFromDomainStatus is a required field - MailFromDomainStatus *string `type:"string" required:"true" enum:"CustomMailFromStatus"` -} - -// String returns the string representation -func (s IdentityMailFromDomainAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IdentityMailFromDomainAttributes) GoString() string { - return s.String() -} - -// SetBehaviorOnMXFailure sets the BehaviorOnMXFailure field's value. -func (s *IdentityMailFromDomainAttributes) SetBehaviorOnMXFailure(v string) *IdentityMailFromDomainAttributes { - s.BehaviorOnMXFailure = &v - return s -} - -// SetMailFromDomain sets the MailFromDomain field's value. -func (s *IdentityMailFromDomainAttributes) SetMailFromDomain(v string) *IdentityMailFromDomainAttributes { - s.MailFromDomain = &v - return s -} - -// SetMailFromDomainStatus sets the MailFromDomainStatus field's value. -func (s *IdentityMailFromDomainAttributes) SetMailFromDomainStatus(v string) *IdentityMailFromDomainAttributes { - s.MailFromDomainStatus = &v - return s -} - -// Represents the notification attributes of an identity, including whether -// an identity has Amazon Simple Notification Service (Amazon SNS) topics set -// for bounce, complaint, and/or delivery notifications, and whether feedback -// forwarding is enabled for bounce and complaint notifications. -type IdentityNotificationAttributes struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will - // publish bounce notifications. - // - // BounceTopic is a required field - BounceTopic *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will - // publish complaint notifications. - // - // ComplaintTopic is a required field - ComplaintTopic *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will - // publish delivery notifications. - // - // DeliveryTopic is a required field - DeliveryTopic *string `type:"string" required:"true"` - - // Describes whether Amazon SES will forward bounce and complaint notifications - // as email. true indicates that Amazon SES will forward bounce and complaint - // notifications as email, while false indicates that bounce and complaint notifications - // will be published only to the specified bounce and complaint Amazon SNS topics. - // - // ForwardingEnabled is a required field - ForwardingEnabled *bool `type:"boolean" required:"true"` - - // Describes whether Amazon SES includes the original email headers in Amazon - // SNS notifications of type Bounce. A value of true specifies that Amazon SES - // will include headers in bounce notifications, and a value of false specifies - // that Amazon SES will not include headers in bounce notifications. - HeadersInBounceNotificationsEnabled *bool `type:"boolean"` - - // Describes whether Amazon SES includes the original email headers in Amazon - // SNS notifications of type Complaint. A value of true specifies that Amazon - // SES will include headers in complaint notifications, and a value of false - // specifies that Amazon SES will not include headers in complaint notifications. - HeadersInComplaintNotificationsEnabled *bool `type:"boolean"` - - // Describes whether Amazon SES includes the original email headers in Amazon - // SNS notifications of type Delivery. A value of true specifies that Amazon - // SES will include headers in delivery notifications, and a value of false - // specifies that Amazon SES will not include headers in delivery notifications. - HeadersInDeliveryNotificationsEnabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s IdentityNotificationAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IdentityNotificationAttributes) GoString() string { - return s.String() -} - -// SetBounceTopic sets the BounceTopic field's value. -func (s *IdentityNotificationAttributes) SetBounceTopic(v string) *IdentityNotificationAttributes { - s.BounceTopic = &v - return s -} - -// SetComplaintTopic sets the ComplaintTopic field's value. -func (s *IdentityNotificationAttributes) SetComplaintTopic(v string) *IdentityNotificationAttributes { - s.ComplaintTopic = &v - return s -} - -// SetDeliveryTopic sets the DeliveryTopic field's value. -func (s *IdentityNotificationAttributes) SetDeliveryTopic(v string) *IdentityNotificationAttributes { - s.DeliveryTopic = &v - return s -} - -// SetForwardingEnabled sets the ForwardingEnabled field's value. -func (s *IdentityNotificationAttributes) SetForwardingEnabled(v bool) *IdentityNotificationAttributes { - s.ForwardingEnabled = &v - return s -} - -// SetHeadersInBounceNotificationsEnabled sets the HeadersInBounceNotificationsEnabled field's value. -func (s *IdentityNotificationAttributes) SetHeadersInBounceNotificationsEnabled(v bool) *IdentityNotificationAttributes { - s.HeadersInBounceNotificationsEnabled = &v - return s -} - -// SetHeadersInComplaintNotificationsEnabled sets the HeadersInComplaintNotificationsEnabled field's value. -func (s *IdentityNotificationAttributes) SetHeadersInComplaintNotificationsEnabled(v bool) *IdentityNotificationAttributes { - s.HeadersInComplaintNotificationsEnabled = &v - return s -} - -// SetHeadersInDeliveryNotificationsEnabled sets the HeadersInDeliveryNotificationsEnabled field's value. -func (s *IdentityNotificationAttributes) SetHeadersInDeliveryNotificationsEnabled(v bool) *IdentityNotificationAttributes { - s.HeadersInDeliveryNotificationsEnabled = &v - return s -} - -// Represents the verification attributes of a single identity. -type IdentityVerificationAttributes struct { - _ struct{} `type:"structure"` - - // The verification status of the identity: "Pending", "Success", "Failed", - // or "TemporaryFailure". - // - // VerificationStatus is a required field - VerificationStatus *string `type:"string" required:"true" enum:"VerificationStatus"` - - // The verification token for a domain identity. Null for email address identities. - VerificationToken *string `type:"string"` -} - -// String returns the string representation -func (s IdentityVerificationAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IdentityVerificationAttributes) GoString() string { - return s.String() -} - -// SetVerificationStatus sets the VerificationStatus field's value. -func (s *IdentityVerificationAttributes) SetVerificationStatus(v string) *IdentityVerificationAttributes { - s.VerificationStatus = &v - return s -} - -// SetVerificationToken sets the VerificationToken field's value. -func (s *IdentityVerificationAttributes) SetVerificationToken(v string) *IdentityVerificationAttributes { - s.VerificationToken = &v - return s -} - -// Contains the delivery stream ARN and the IAM role ARN associated with an -// Amazon Kinesis Firehose event destination. -// -// Event destinations, such as Amazon Kinesis Firehose, are associated with -// configuration sets, which enable you to publish email sending events. For -// information about using configuration sets, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type KinesisFirehoseDestination struct { - _ struct{} `type:"structure"` - - // The ARN of the Amazon Kinesis Firehose stream that email sending events should - // be published to. - // - // DeliveryStreamARN is a required field - DeliveryStreamARN *string `type:"string" required:"true"` - - // The ARN of the IAM role under which Amazon SES publishes email sending events - // to the Amazon Kinesis Firehose stream. - // - // IAMRoleARN is a required field - IAMRoleARN *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s KinesisFirehoseDestination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s KinesisFirehoseDestination) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KinesisFirehoseDestination) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KinesisFirehoseDestination"} - if s.DeliveryStreamARN == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryStreamARN")) - } - if s.IAMRoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("IAMRoleARN")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryStreamARN sets the DeliveryStreamARN field's value. -func (s *KinesisFirehoseDestination) SetDeliveryStreamARN(v string) *KinesisFirehoseDestination { - s.DeliveryStreamARN = &v - return s -} - -// SetIAMRoleARN sets the IAMRoleARN field's value. -func (s *KinesisFirehoseDestination) SetIAMRoleARN(v string) *KinesisFirehoseDestination { - s.IAMRoleARN = &v - return s -} - -// When included in a receipt rule, this action calls an AWS Lambda function -// and, optionally, publishes a notification to Amazon Simple Notification Service -// (Amazon SNS). -// -// To enable Amazon SES to call your AWS Lambda function or to publish to an -// Amazon SNS topic of another account, Amazon SES must have permission to access -// those resources. For information about giving permissions, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). -// -// For information about using AWS Lambda actions in receipt rules, see the -// Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-lambda.html). -type LambdaAction struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the AWS Lambda function. An example of - // an AWS Lambda function ARN is arn:aws:lambda:us-west-2:account-id:function:MyFunction. - // For more information about AWS Lambda, see the AWS Lambda Developer Guide - // (http://docs.aws.amazon.com/lambda/latest/dg/welcome.html). - // - // FunctionArn is a required field - FunctionArn *string `type:"string" required:"true"` - - // The invocation type of the AWS Lambda function. An invocation type of RequestResponse - // means that the execution of the function will immediately result in a response, - // and a value of Event means that the function will be invoked asynchronously. - // The default value is Event. For information about AWS Lambda invocation types, - // see the AWS Lambda Developer Guide (http://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html). - // - // There is a 30-second timeout on RequestResponse invocations. You should use - // Event invocation in most cases. Use RequestResponse only when you want to - // make a mail flow decision, such as whether to stop the receipt rule or the - // receipt rule set. - InvocationType *string `type:"string" enum:"InvocationType"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the - // Lambda action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. - // For more information about Amazon SNS topics, see the Amazon SNS Developer - // Guide (http://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html). - TopicArn *string `type:"string"` -} - -// String returns the string representation -func (s LambdaAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LambdaAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LambdaAction"} - if s.FunctionArn == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionArn sets the FunctionArn field's value. -func (s *LambdaAction) SetFunctionArn(v string) *LambdaAction { - s.FunctionArn = &v - return s -} - -// SetInvocationType sets the InvocationType field's value. -func (s *LambdaAction) SetInvocationType(v string) *LambdaAction { - s.InvocationType = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *LambdaAction) SetTopicArn(v string) *LambdaAction { - s.TopicArn = &v - return s -} - -// Represents a request to list the configuration sets associated with your -// AWS account. Configuration sets enable you to publish email sending events. -// For information about using configuration sets, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type ListConfigurationSetsInput struct { - _ struct{} `type:"structure"` - - // The number of configuration sets to return. - MaxItems *int64 `type:"integer"` - - // A token returned from a previous call to ListConfigurationSets to indicate - // the position of the configuration set in the configuration set list. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListConfigurationSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListConfigurationSetsInput) GoString() string { - return s.String() -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListConfigurationSetsInput) SetMaxItems(v int64) *ListConfigurationSetsInput { - s.MaxItems = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListConfigurationSetsInput) SetNextToken(v string) *ListConfigurationSetsInput { - s.NextToken = &v - return s -} - -// A list of configuration sets associated with your AWS account. Configuration -// sets enable you to publish email sending events. For information about using -// configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type ListConfigurationSetsOutput struct { - _ struct{} `type:"structure"` - - // A list of configuration sets. - ConfigurationSets []*ConfigurationSet `type:"list"` - - // A token indicating that there are additional configuration sets available - // to be listed. Pass this token to successive calls of ListConfigurationSets. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListConfigurationSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListConfigurationSetsOutput) GoString() string { - return s.String() -} - -// SetConfigurationSets sets the ConfigurationSets field's value. -func (s *ListConfigurationSetsOutput) SetConfigurationSets(v []*ConfigurationSet) *ListConfigurationSetsOutput { - s.ConfigurationSets = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListConfigurationSetsOutput) SetNextToken(v string) *ListConfigurationSetsOutput { - s.NextToken = &v - return s -} - -// Represents a request to list the existing custom verification email templates -// for your account. -// -// For more information about custom verification email templates, see Using -// Custom Verification Email Templates (ses/latest/DeveloperGuide/custom-verification-emails.html) -// in the Amazon SES Developer Guide. -type ListCustomVerificationEmailTemplatesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of custom verification email templates to return. This - // value must be at least 1 and less than or equal to 50. If you do not specify - // a value, or if you specify a value less than 1 or greater than 50, the operation - // will return up to 50 results. - MaxResults *int64 `min:"1" type:"integer"` - - // An array the contains the name and creation time stamp for each template - // in your Amazon SES account. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListCustomVerificationEmailTemplatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCustomVerificationEmailTemplatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListCustomVerificationEmailTemplatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListCustomVerificationEmailTemplatesInput"} - 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 *ListCustomVerificationEmailTemplatesInput) SetMaxResults(v int64) *ListCustomVerificationEmailTemplatesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCustomVerificationEmailTemplatesInput) SetNextToken(v string) *ListCustomVerificationEmailTemplatesInput { - s.NextToken = &v - return s -} - -// A paginated list of custom verification email templates. -type ListCustomVerificationEmailTemplatesOutput struct { - _ struct{} `type:"structure"` - - // A list of the custom verification email templates that exist in your account. - CustomVerificationEmailTemplates []*CustomVerificationEmailTemplate `type:"list"` - - // A token indicating that there are additional custom verification email templates - // available to be listed. Pass this token to a subsequent call to ListTemplates - // to retrieve the next 50 custom verification email templates. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListCustomVerificationEmailTemplatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCustomVerificationEmailTemplatesOutput) GoString() string { - return s.String() -} - -// SetCustomVerificationEmailTemplates sets the CustomVerificationEmailTemplates field's value. -func (s *ListCustomVerificationEmailTemplatesOutput) SetCustomVerificationEmailTemplates(v []*CustomVerificationEmailTemplate) *ListCustomVerificationEmailTemplatesOutput { - s.CustomVerificationEmailTemplates = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCustomVerificationEmailTemplatesOutput) SetNextToken(v string) *ListCustomVerificationEmailTemplatesOutput { - s.NextToken = &v - return s -} - -// Represents a request to return a list of all identities (email addresses -// and domains) that you have attempted to verify under your AWS account, regardless -// of verification status. -type ListIdentitiesInput struct { - _ struct{} `type:"structure"` - - // The type of the identities to list. Possible values are "EmailAddress" and - // "Domain". If this parameter is omitted, then all identities will be listed. - IdentityType *string `type:"string" enum:"IdentityType"` - - // The maximum number of identities per page. Possible values are 1-1000 inclusive. - MaxItems *int64 `type:"integer"` - - // The token to use for pagination. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListIdentitiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIdentitiesInput) GoString() string { - return s.String() -} - -// SetIdentityType sets the IdentityType field's value. -func (s *ListIdentitiesInput) SetIdentityType(v string) *ListIdentitiesInput { - s.IdentityType = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListIdentitiesInput) SetMaxItems(v int64) *ListIdentitiesInput { - s.MaxItems = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListIdentitiesInput) SetNextToken(v string) *ListIdentitiesInput { - s.NextToken = &v - return s -} - -// A list of all identities that you have attempted to verify under your AWS -// account, regardless of verification status. -type ListIdentitiesOutput struct { - _ struct{} `type:"structure"` - - // A list of identities. - // - // Identities is a required field - Identities []*string `type:"list" required:"true"` - - // The token used for pagination. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListIdentitiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIdentitiesOutput) GoString() string { - return s.String() -} - -// SetIdentities sets the Identities field's value. -func (s *ListIdentitiesOutput) SetIdentities(v []*string) *ListIdentitiesOutput { - s.Identities = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListIdentitiesOutput) SetNextToken(v string) *ListIdentitiesOutput { - s.NextToken = &v - return s -} - -// Represents a request to return a list of sending authorization policies that -// are attached to an identity. Sending authorization is an Amazon SES feature -// that enables you to authorize other senders to use your identities. For information, -// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). -type ListIdentityPoliciesInput struct { - _ struct{} `type:"structure"` - - // The identity that is associated with the policy for which the policies will - // be listed. You can specify an identity by using its name or by using its - // Amazon Resource Name (ARN). Examples: user@example.com, example.com, arn:aws:ses:us-east-1:123456789012:identity/example.com. - // - // To successfully call this API, you must own the identity. - // - // Identity is a required field - Identity *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListIdentityPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIdentityPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListIdentityPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListIdentityPoliciesInput"} - if s.Identity == nil { - invalidParams.Add(request.NewErrParamRequired("Identity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentity sets the Identity field's value. -func (s *ListIdentityPoliciesInput) SetIdentity(v string) *ListIdentityPoliciesInput { - s.Identity = &v - return s -} - -// A list of names of sending authorization policies that apply to an identity. -type ListIdentityPoliciesOutput struct { - _ struct{} `type:"structure"` - - // A list of names of policies that apply to the specified identity. - // - // PolicyNames is a required field - PolicyNames []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s ListIdentityPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIdentityPoliciesOutput) GoString() string { - return s.String() -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *ListIdentityPoliciesOutput) SetPolicyNames(v []*string) *ListIdentityPoliciesOutput { - s.PolicyNames = v - return s -} - -// Represents a request to list the IP address filters that exist under your -// AWS account. You use IP address filters when you receive email with Amazon -// SES. For more information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type ListReceiptFiltersInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ListReceiptFiltersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListReceiptFiltersInput) GoString() string { - return s.String() -} - -// A list of IP address filters that exist under your AWS account. -type ListReceiptFiltersOutput struct { - _ struct{} `type:"structure"` - - // A list of IP address filter data structures, which each consist of a name, - // an IP address range, and whether to allow or block mail from it. - Filters []*ReceiptFilter `type:"list"` -} - -// String returns the string representation -func (s ListReceiptFiltersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListReceiptFiltersOutput) GoString() string { - return s.String() -} - -// SetFilters sets the Filters field's value. -func (s *ListReceiptFiltersOutput) SetFilters(v []*ReceiptFilter) *ListReceiptFiltersOutput { - s.Filters = v - return s -} - -// Represents a request to list the receipt rule sets that exist under your -// AWS account. You use receipt rule sets to receive email with Amazon SES. -// For more information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type ListReceiptRuleSetsInput struct { - _ struct{} `type:"structure"` - - // A token returned from a previous call to ListReceiptRuleSets to indicate - // the position in the receipt rule set list. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListReceiptRuleSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListReceiptRuleSetsInput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListReceiptRuleSetsInput) SetNextToken(v string) *ListReceiptRuleSetsInput { - s.NextToken = &v - return s -} - -// A list of receipt rule sets that exist under your AWS account. -type ListReceiptRuleSetsOutput struct { - _ struct{} `type:"structure"` - - // A token indicating that there are additional receipt rule sets available - // to be listed. Pass this token to successive calls of ListReceiptRuleSets - // to retrieve up to 100 receipt rule sets at a time. - NextToken *string `type:"string"` - - // The metadata for the currently active receipt rule set. The metadata consists - // of the rule set name and the timestamp of when the rule set was created. - RuleSets []*ReceiptRuleSetMetadata `type:"list"` -} - -// String returns the string representation -func (s ListReceiptRuleSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListReceiptRuleSetsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListReceiptRuleSetsOutput) SetNextToken(v string) *ListReceiptRuleSetsOutput { - s.NextToken = &v - return s -} - -// SetRuleSets sets the RuleSets field's value. -func (s *ListReceiptRuleSetsOutput) SetRuleSets(v []*ReceiptRuleSetMetadata) *ListReceiptRuleSetsOutput { - s.RuleSets = v - return s -} - -type ListTemplatesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of templates to return. This value must be at least 1 - // and less than or equal to 10. If you do not specify a value, or if you specify - // a value less than 1 or greater than 10, the operation will return up to 10 - // results. - MaxItems *int64 `type:"integer"` - - // A token returned from a previous call to ListTemplates to indicate the position - // in the list of email templates. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListTemplatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTemplatesInput) GoString() string { - return s.String() -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListTemplatesInput) SetMaxItems(v int64) *ListTemplatesInput { - s.MaxItems = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTemplatesInput) SetNextToken(v string) *ListTemplatesInput { - s.NextToken = &v - return s -} - -type ListTemplatesOutput struct { - _ struct{} `type:"structure"` - - // A token indicating that there are additional email templates available to - // be listed. Pass this token to a subsequent call to ListTemplates to retrieve - // the next 50 email templates. - NextToken *string `type:"string"` - - // An array the contains the name and creation time stamp for each template - // in your Amazon SES account. - TemplatesMetadata []*TemplateMetadata `type:"list"` -} - -// String returns the string representation -func (s ListTemplatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTemplatesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTemplatesOutput) SetNextToken(v string) *ListTemplatesOutput { - s.NextToken = &v - return s -} - -// SetTemplatesMetadata sets the TemplatesMetadata field's value. -func (s *ListTemplatesOutput) SetTemplatesMetadata(v []*TemplateMetadata) *ListTemplatesOutput { - s.TemplatesMetadata = v - return s -} - -type ListVerifiedEmailAddressesInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ListVerifiedEmailAddressesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVerifiedEmailAddressesInput) GoString() string { - return s.String() -} - -// A list of email addresses that you have verified with Amazon SES under your -// AWS account. -type ListVerifiedEmailAddressesOutput struct { - _ struct{} `type:"structure"` - - // A list of email addresses that have been verified. - VerifiedEmailAddresses []*string `type:"list"` -} - -// String returns the string representation -func (s ListVerifiedEmailAddressesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVerifiedEmailAddressesOutput) GoString() string { - return s.String() -} - -// SetVerifiedEmailAddresses sets the VerifiedEmailAddresses field's value. -func (s *ListVerifiedEmailAddressesOutput) SetVerifiedEmailAddresses(v []*string) *ListVerifiedEmailAddressesOutput { - s.VerifiedEmailAddresses = v - return s -} - -// Represents the message to be sent, composed of a subject and a body. -type Message struct { - _ struct{} `type:"structure"` - - // The message body. - // - // Body is a required field - Body *Body `type:"structure" required:"true"` - - // The subject of the message: A short summary of the content, which will appear - // in the recipient's inbox. - // - // Subject is a required field - Subject *Content `type:"structure" required:"true"` -} - -// String returns the string representation -func (s Message) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Message) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Message) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Message"} - if s.Body == nil { - invalidParams.Add(request.NewErrParamRequired("Body")) - } - if s.Subject == nil { - invalidParams.Add(request.NewErrParamRequired("Subject")) - } - if s.Body != nil { - if err := s.Body.Validate(); err != nil { - invalidParams.AddNested("Body", err.(request.ErrInvalidParams)) - } - } - if s.Subject != nil { - if err := s.Subject.Validate(); err != nil { - invalidParams.AddNested("Subject", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBody sets the Body field's value. -func (s *Message) SetBody(v *Body) *Message { - s.Body = v - return s -} - -// SetSubject sets the Subject field's value. -func (s *Message) SetSubject(v *Content) *Message { - s.Subject = v - return s -} - -// Message-related information to include in the Delivery Status Notification -// (DSN) when an email that Amazon SES receives on your behalf bounces. -// -// For information about receiving email through Amazon SES, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html). -type MessageDsn struct { - _ struct{} `type:"structure"` - - // When the message was received by the reporting mail transfer agent (MTA), - // in RFC 822 (https://www.ietf.org/rfc/rfc0822.txt) date-time format. - ArrivalDate *time.Time `type:"timestamp"` - - // Additional X-headers to include in the DSN. - ExtensionFields []*ExtensionField `type:"list"` - - // The reporting MTA that attempted to deliver the message, formatted as specified - // in RFC 3464 (https://tools.ietf.org/html/rfc3464) (mta-name-type; mta-name). - // The default value is dns; inbound-smtp.[region].amazonaws.com. - // - // ReportingMta is a required field - ReportingMta *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s MessageDsn) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MessageDsn) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MessageDsn) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MessageDsn"} - if s.ReportingMta == nil { - invalidParams.Add(request.NewErrParamRequired("ReportingMta")) - } - if s.ExtensionFields != nil { - for i, v := range s.ExtensionFields { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ExtensionFields", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArrivalDate sets the ArrivalDate field's value. -func (s *MessageDsn) SetArrivalDate(v time.Time) *MessageDsn { - s.ArrivalDate = &v - return s -} - -// SetExtensionFields sets the ExtensionFields field's value. -func (s *MessageDsn) SetExtensionFields(v []*ExtensionField) *MessageDsn { - s.ExtensionFields = v - return s -} - -// SetReportingMta sets the ReportingMta field's value. -func (s *MessageDsn) SetReportingMta(v string) *MessageDsn { - s.ReportingMta = &v - return s -} - -// Contains the name and value of a tag that you can provide to SendEmail or -// SendRawEmail to apply to an email. -// -// Message tags, which you use with configuration sets, enable you to publish -// email sending events. For information about using configuration sets, see -// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type MessageTag struct { - _ struct{} `type:"structure"` - - // The name of the tag. The name must: - // - // * This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), - // underscores (_), or dashes (-). - // - // * Contain less than 256 characters. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The value of the tag. The value must: - // - // * This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), - // underscores (_), or dashes (-). - // - // * Contain less than 256 characters. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s MessageTag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MessageTag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MessageTag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MessageTag"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *MessageTag) SetName(v string) *MessageTag { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *MessageTag) SetValue(v string) *MessageTag { - s.Value = &v - return s -} - -// Represents a request to add or update a sending authorization policy for -// an identity. Sending authorization is an Amazon SES feature that enables -// you to authorize other senders to use your identities. For information, see -// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). -type PutIdentityPolicyInput struct { - _ struct{} `type:"structure"` - - // The identity that the policy will apply to. You can specify an identity by - // using its name or by using its Amazon Resource Name (ARN). Examples: user@example.com, - // example.com, arn:aws:ses:us-east-1:123456789012:identity/example.com. - // - // To successfully call this API, you must own the identity. - // - // Identity is a required field - Identity *string `type:"string" required:"true"` - - // The text of the policy in JSON format. The policy cannot exceed 4 KB. - // - // For information about the syntax of sending authorization policies, see the - // Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-policies.html). - // - // Policy is a required field - Policy *string `min:"1" type:"string" required:"true"` - - // The name of the policy. - // - // The policy name cannot exceed 64 characters and can only include alphanumeric - // characters, dashes, and underscores. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutIdentityPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutIdentityPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutIdentityPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutIdentityPolicyInput"} - if s.Identity == nil { - invalidParams.Add(request.NewErrParamRequired("Identity")) - } - if s.Policy == nil { - invalidParams.Add(request.NewErrParamRequired("Policy")) - } - if s.Policy != nil && len(*s.Policy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentity sets the Identity field's value. -func (s *PutIdentityPolicyInput) SetIdentity(v string) *PutIdentityPolicyInput { - s.Identity = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *PutIdentityPolicyInput) SetPolicy(v string) *PutIdentityPolicyInput { - s.Policy = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PutIdentityPolicyInput) SetPolicyName(v string) *PutIdentityPolicyInput { - s.PolicyName = &v - return s -} - -// An empty element returned on a successful request. -type PutIdentityPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutIdentityPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutIdentityPolicyOutput) GoString() string { - return s.String() -} - -// Represents the raw data of the message. -type RawMessage struct { - _ struct{} `type:"structure"` - - // The raw data of the message. This data needs to base64-encoded if you are - // accessing Amazon SES directly through the HTTPS interface. If you are accessing - // Amazon SES using an AWS SDK, the SDK takes care of the base 64-encoding for - // you. In all cases, the client must ensure that the message format complies - // with Internet email standards regarding email header fields, MIME types, - // and MIME encoding. - // - // The To:, CC:, and BCC: headers in the raw message can contain a group list. - // - // If you are using SendRawEmail with sending authorization, you can include - // X-headers in the raw message to specify the "Source," "From," and "Return-Path" - // addresses. For more information, see the documentation for SendRawEmail. - // - // Do not include these X-headers in the DKIM signature, because they are removed - // by Amazon SES before sending the email. - // - // For more information, go to the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html). - // - // Data is automatically base64 encoded/decoded by the SDK. - // - // Data is a required field - Data []byte `type:"blob" required:"true"` -} - -// String returns the string representation -func (s RawMessage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RawMessage) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RawMessage) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RawMessage"} - if s.Data == nil { - invalidParams.Add(request.NewErrParamRequired("Data")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetData sets the Data field's value. -func (s *RawMessage) SetData(v []byte) *RawMessage { - s.Data = v - return s -} - -// An action that Amazon SES can take when it receives an email on behalf of -// one or more email addresses or domains that you own. An instance of this -// data type can represent only one action. -// -// For information about setting up receipt rules, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rules.html). -type ReceiptAction struct { - _ struct{} `type:"structure"` - - // Adds a header to the received email. - AddHeaderAction *AddHeaderAction `type:"structure"` - - // Rejects the received email by returning a bounce response to the sender and, - // optionally, publishes a notification to Amazon Simple Notification Service - // (Amazon SNS). - BounceAction *BounceAction `type:"structure"` - - // Calls an AWS Lambda function, and optionally, publishes a notification to - // Amazon SNS. - LambdaAction *LambdaAction `type:"structure"` - - // Saves the received message to an Amazon Simple Storage Service (Amazon S3) - // bucket and, optionally, publishes a notification to Amazon SNS. - S3Action *S3Action `type:"structure"` - - // Publishes the email content within a notification to Amazon SNS. - SNSAction *SNSAction `type:"structure"` - - // Terminates the evaluation of the receipt rule set and optionally publishes - // a notification to Amazon SNS. - StopAction *StopAction `type:"structure"` - - // Calls Amazon WorkMail and, optionally, publishes a notification to Amazon - // Amazon SNS. - WorkmailAction *WorkmailAction `type:"structure"` -} - -// String returns the string representation -func (s ReceiptAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReceiptAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReceiptAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReceiptAction"} - if s.AddHeaderAction != nil { - if err := s.AddHeaderAction.Validate(); err != nil { - invalidParams.AddNested("AddHeaderAction", err.(request.ErrInvalidParams)) - } - } - if s.BounceAction != nil { - if err := s.BounceAction.Validate(); err != nil { - invalidParams.AddNested("BounceAction", err.(request.ErrInvalidParams)) - } - } - if s.LambdaAction != nil { - if err := s.LambdaAction.Validate(); err != nil { - invalidParams.AddNested("LambdaAction", err.(request.ErrInvalidParams)) - } - } - if s.S3Action != nil { - if err := s.S3Action.Validate(); err != nil { - invalidParams.AddNested("S3Action", err.(request.ErrInvalidParams)) - } - } - if s.SNSAction != nil { - if err := s.SNSAction.Validate(); err != nil { - invalidParams.AddNested("SNSAction", err.(request.ErrInvalidParams)) - } - } - if s.StopAction != nil { - if err := s.StopAction.Validate(); err != nil { - invalidParams.AddNested("StopAction", err.(request.ErrInvalidParams)) - } - } - if s.WorkmailAction != nil { - if err := s.WorkmailAction.Validate(); err != nil { - invalidParams.AddNested("WorkmailAction", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddHeaderAction sets the AddHeaderAction field's value. -func (s *ReceiptAction) SetAddHeaderAction(v *AddHeaderAction) *ReceiptAction { - s.AddHeaderAction = v - return s -} - -// SetBounceAction sets the BounceAction field's value. -func (s *ReceiptAction) SetBounceAction(v *BounceAction) *ReceiptAction { - s.BounceAction = v - return s -} - -// SetLambdaAction sets the LambdaAction field's value. -func (s *ReceiptAction) SetLambdaAction(v *LambdaAction) *ReceiptAction { - s.LambdaAction = v - return s -} - -// SetS3Action sets the S3Action field's value. -func (s *ReceiptAction) SetS3Action(v *S3Action) *ReceiptAction { - s.S3Action = v - return s -} - -// SetSNSAction sets the SNSAction field's value. -func (s *ReceiptAction) SetSNSAction(v *SNSAction) *ReceiptAction { - s.SNSAction = v - return s -} - -// SetStopAction sets the StopAction field's value. -func (s *ReceiptAction) SetStopAction(v *StopAction) *ReceiptAction { - s.StopAction = v - return s -} - -// SetWorkmailAction sets the WorkmailAction field's value. -func (s *ReceiptAction) SetWorkmailAction(v *WorkmailAction) *ReceiptAction { - s.WorkmailAction = v - return s -} - -// A receipt IP address filter enables you to specify whether to accept or reject -// mail originating from an IP address or range of IP addresses. -// -// For information about setting up IP address filters, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-ip-filters.html). -type ReceiptFilter struct { - _ struct{} `type:"structure"` - - // A structure that provides the IP addresses to block or allow, and whether - // to block or allow incoming mail from them. - // - // IpFilter is a required field - IpFilter *ReceiptIpFilter `type:"structure" required:"true"` - - // The name of the IP address filter. The name must: - // - // * This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), - // underscores (_), or dashes (-). - // - // * Start and end with a letter or number. - // - // * Contain less than 64 characters. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ReceiptFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReceiptFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReceiptFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReceiptFilter"} - if s.IpFilter == nil { - invalidParams.Add(request.NewErrParamRequired("IpFilter")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.IpFilter != nil { - if err := s.IpFilter.Validate(); err != nil { - invalidParams.AddNested("IpFilter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIpFilter sets the IpFilter field's value. -func (s *ReceiptFilter) SetIpFilter(v *ReceiptIpFilter) *ReceiptFilter { - s.IpFilter = v - return s -} - -// SetName sets the Name field's value. -func (s *ReceiptFilter) SetName(v string) *ReceiptFilter { - s.Name = &v - return s -} - -// A receipt IP address filter enables you to specify whether to accept or reject -// mail originating from an IP address or range of IP addresses. -// -// For information about setting up IP address filters, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-ip-filters.html). -type ReceiptIpFilter struct { - _ struct{} `type:"structure"` - - // A single IP address or a range of IP addresses that you want to block or - // allow, specified in Classless Inter-Domain Routing (CIDR) notation. An example - // of a single email address is 10.0.0.1. An example of a range of IP addresses - // is 10.0.0.1/24. For more information about CIDR notation, see RFC 2317 (https://tools.ietf.org/html/rfc2317). - // - // Cidr is a required field - Cidr *string `type:"string" required:"true"` - - // Indicates whether to block or allow incoming mail from the specified IP addresses. - // - // Policy is a required field - Policy *string `type:"string" required:"true" enum:"ReceiptFilterPolicy"` -} - -// String returns the string representation -func (s ReceiptIpFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReceiptIpFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReceiptIpFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReceiptIpFilter"} - if s.Cidr == nil { - invalidParams.Add(request.NewErrParamRequired("Cidr")) - } - if s.Policy == nil { - invalidParams.Add(request.NewErrParamRequired("Policy")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCidr sets the Cidr field's value. -func (s *ReceiptIpFilter) SetCidr(v string) *ReceiptIpFilter { - s.Cidr = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *ReceiptIpFilter) SetPolicy(v string) *ReceiptIpFilter { - s.Policy = &v - return s -} - -// Receipt rules enable you to specify which actions Amazon SES should take -// when it receives mail on behalf of one or more email addresses or domains -// that you own. -// -// Each receipt rule defines a set of email addresses or domains that it applies -// to. If the email addresses or domains match at least one recipient address -// of the message, Amazon SES executes all of the receipt rule's actions on -// the message. -// -// For information about setting up receipt rules, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rules.html). -type ReceiptRule struct { - _ struct{} `type:"structure"` - - // An ordered list of actions to perform on messages that match at least one - // of the recipient email addresses or domains specified in the receipt rule. - Actions []*ReceiptAction `type:"list"` - - // If true, the receipt rule is active. The default value is false. - Enabled *bool `type:"boolean"` - - // The name of the receipt rule. The name must: - // - // * This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), - // underscores (_), or dashes (-). - // - // * Start and end with a letter or number. - // - // * Contain less than 64 characters. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The recipient domains and email addresses that the receipt rule applies to. - // If this field is not specified, this rule will match all recipients under - // all verified domains. - Recipients []*string `type:"list"` - - // If true, then messages that this receipt rule applies to are scanned for - // spam and viruses. The default value is false. - ScanEnabled *bool `type:"boolean"` - - // Specifies whether Amazon SES should require that incoming email is delivered - // over a connection encrypted with Transport Layer Security (TLS). If this - // parameter is set to Require, Amazon SES will bounce emails that are not received - // over TLS. The default is Optional. - TlsPolicy *string `type:"string" enum:"TlsPolicy"` -} - -// String returns the string representation -func (s ReceiptRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReceiptRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReceiptRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReceiptRule"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Actions != nil { - for i, v := range s.Actions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Actions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActions sets the Actions field's value. -func (s *ReceiptRule) SetActions(v []*ReceiptAction) *ReceiptRule { - s.Actions = v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *ReceiptRule) SetEnabled(v bool) *ReceiptRule { - s.Enabled = &v - return s -} - -// SetName sets the Name field's value. -func (s *ReceiptRule) SetName(v string) *ReceiptRule { - s.Name = &v - return s -} - -// SetRecipients sets the Recipients field's value. -func (s *ReceiptRule) SetRecipients(v []*string) *ReceiptRule { - s.Recipients = v - return s -} - -// SetScanEnabled sets the ScanEnabled field's value. -func (s *ReceiptRule) SetScanEnabled(v bool) *ReceiptRule { - s.ScanEnabled = &v - return s -} - -// SetTlsPolicy sets the TlsPolicy field's value. -func (s *ReceiptRule) SetTlsPolicy(v string) *ReceiptRule { - s.TlsPolicy = &v - return s -} - -// Information about a receipt rule set. -// -// A receipt rule set is a collection of rules that specify what Amazon SES -// should do with mail it receives on behalf of your account's verified domains. -// -// For information about setting up receipt rule sets, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rule-set.html). -type ReceiptRuleSetMetadata struct { - _ struct{} `type:"structure"` - - // The date and time the receipt rule set was created. - CreatedTimestamp *time.Time `type:"timestamp"` - - // The name of the receipt rule set. The name must: - // - // * This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), - // underscores (_), or dashes (-). - // - // * Start and end with a letter or number. - // - // * Contain less than 64 characters. - Name *string `type:"string"` -} - -// String returns the string representation -func (s ReceiptRuleSetMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReceiptRuleSetMetadata) GoString() string { - return s.String() -} - -// SetCreatedTimestamp sets the CreatedTimestamp field's value. -func (s *ReceiptRuleSetMetadata) SetCreatedTimestamp(v time.Time) *ReceiptRuleSetMetadata { - s.CreatedTimestamp = &v - return s -} - -// SetName sets the Name field's value. -func (s *ReceiptRuleSetMetadata) SetName(v string) *ReceiptRuleSetMetadata { - s.Name = &v - return s -} - -// Recipient-related information to include in the Delivery Status Notification -// (DSN) when an email that Amazon SES receives on your behalf bounces. -// -// For information about receiving email through Amazon SES, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html). -type RecipientDsnFields struct { - _ struct{} `type:"structure"` - - // The action performed by the reporting mail transfer agent (MTA) as a result - // of its attempt to deliver the message to the recipient address. This is required - // by RFC 3464 (https://tools.ietf.org/html/rfc3464). - // - // Action is a required field - Action *string `type:"string" required:"true" enum:"DsnAction"` - - // An extended explanation of what went wrong; this is usually an SMTP response. - // See RFC 3463 (https://tools.ietf.org/html/rfc3463) for the correct formatting - // of this parameter. - DiagnosticCode *string `type:"string"` - - // Additional X-headers to include in the DSN. - ExtensionFields []*ExtensionField `type:"list"` - - // The email address that the message was ultimately delivered to. This corresponds - // to the Final-Recipient in the DSN. If not specified, FinalRecipient will - // be set to the Recipient specified in the BouncedRecipientInfo structure. - // Either FinalRecipient or the recipient in BouncedRecipientInfo must be a - // recipient of the original bounced message. - // - // Do not prepend the FinalRecipient email address with rfc 822;, as described - // in RFC 3798 (https://tools.ietf.org/html/rfc3798). - FinalRecipient *string `type:"string"` - - // The time the final delivery attempt was made, in RFC 822 (https://www.ietf.org/rfc/rfc0822.txt) - // date-time format. - LastAttemptDate *time.Time `type:"timestamp"` - - // The MTA to which the remote MTA attempted to deliver the message, formatted - // as specified in RFC 3464 (https://tools.ietf.org/html/rfc3464) (mta-name-type; - // mta-name). This parameter typically applies only to propagating synchronous - // bounces. - RemoteMta *string `type:"string"` - - // The status code that indicates what went wrong. This is required by RFC 3464 - // (https://tools.ietf.org/html/rfc3464). - // - // Status is a required field - Status *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RecipientDsnFields) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecipientDsnFields) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RecipientDsnFields) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RecipientDsnFields"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.ExtensionFields != nil { - for i, v := range s.ExtensionFields { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ExtensionFields", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *RecipientDsnFields) SetAction(v string) *RecipientDsnFields { - s.Action = &v - return s -} - -// SetDiagnosticCode sets the DiagnosticCode field's value. -func (s *RecipientDsnFields) SetDiagnosticCode(v string) *RecipientDsnFields { - s.DiagnosticCode = &v - return s -} - -// SetExtensionFields sets the ExtensionFields field's value. -func (s *RecipientDsnFields) SetExtensionFields(v []*ExtensionField) *RecipientDsnFields { - s.ExtensionFields = v - return s -} - -// SetFinalRecipient sets the FinalRecipient field's value. -func (s *RecipientDsnFields) SetFinalRecipient(v string) *RecipientDsnFields { - s.FinalRecipient = &v - return s -} - -// SetLastAttemptDate sets the LastAttemptDate field's value. -func (s *RecipientDsnFields) SetLastAttemptDate(v time.Time) *RecipientDsnFields { - s.LastAttemptDate = &v - return s -} - -// SetRemoteMta sets the RemoteMta field's value. -func (s *RecipientDsnFields) SetRemoteMta(v string) *RecipientDsnFields { - s.RemoteMta = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *RecipientDsnFields) SetStatus(v string) *RecipientDsnFields { - s.Status = &v - return s -} - -// Represents a request to reorder the receipt rules within a receipt rule set. -// You use receipt rule sets to receive email with Amazon SES. For more information, -// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type ReorderReceiptRuleSetInput struct { - _ struct{} `type:"structure"` - - // A list of the specified receipt rule set's receipt rules in the order that - // you want to put them. - // - // RuleNames is a required field - RuleNames []*string `type:"list" required:"true"` - - // The name of the receipt rule set to reorder. - // - // RuleSetName is a required field - RuleSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ReorderReceiptRuleSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReorderReceiptRuleSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReorderReceiptRuleSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReorderReceiptRuleSetInput"} - if s.RuleNames == nil { - invalidParams.Add(request.NewErrParamRequired("RuleNames")) - } - if s.RuleSetName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleNames sets the RuleNames field's value. -func (s *ReorderReceiptRuleSetInput) SetRuleNames(v []*string) *ReorderReceiptRuleSetInput { - s.RuleNames = v - return s -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *ReorderReceiptRuleSetInput) SetRuleSetName(v string) *ReorderReceiptRuleSetInput { - s.RuleSetName = &v - return s -} - -// An empty element returned on a successful request. -type ReorderReceiptRuleSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ReorderReceiptRuleSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReorderReceiptRuleSetOutput) GoString() string { - return s.String() -} - -// Contains information about the reputation settings for a configuration set. -type ReputationOptions struct { - _ struct{} `type:"structure"` - - // The date and time at which the reputation metrics for the configuration set - // were last reset. Resetting these metrics is known as a fresh start. - // - // When you disable email sending for a configuration set using UpdateConfigurationSetSendingEnabled - // and later re-enable it, the reputation metrics for the configuration set - // (but not for the entire Amazon SES account) are reset. - // - // If email sending for the configuration set has never been disabled and later - // re-enabled, the value of this attribute is null. - LastFreshStart *time.Time `type:"timestamp"` - - // Describes whether or not Amazon SES publishes reputation metrics for the - // configuration set, such as bounce and complaint rates, to Amazon CloudWatch. - // - // If the value is true, reputation metrics are published. If the value is false, - // reputation metrics are not published. The default value is false. - ReputationMetricsEnabled *bool `type:"boolean"` - - // Describes whether email sending is enabled or disabled for the configuration - // set. If the value is true, then Amazon SES will send emails that use the - // configuration set. If the value is false, Amazon SES will not send emails - // that use the configuration set. The default value is true. You can change - // this setting using UpdateConfigurationSetSendingEnabled. - SendingEnabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s ReputationOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReputationOptions) GoString() string { - return s.String() -} - -// SetLastFreshStart sets the LastFreshStart field's value. -func (s *ReputationOptions) SetLastFreshStart(v time.Time) *ReputationOptions { - s.LastFreshStart = &v - return s -} - -// SetReputationMetricsEnabled sets the ReputationMetricsEnabled field's value. -func (s *ReputationOptions) SetReputationMetricsEnabled(v bool) *ReputationOptions { - s.ReputationMetricsEnabled = &v - return s -} - -// SetSendingEnabled sets the SendingEnabled field's value. -func (s *ReputationOptions) SetSendingEnabled(v bool) *ReputationOptions { - s.SendingEnabled = &v - return s -} - -// When included in a receipt rule, this action saves the received message to -// an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes -// a notification to Amazon Simple Notification Service (Amazon SNS). -// -// To enable Amazon SES to write emails to your Amazon S3 bucket, use an AWS -// KMS key to encrypt your emails, or publish to an Amazon SNS topic of another -// account, Amazon SES must have permission to access those resources. For information -// about giving permissions, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). -// -// When you save your emails to an Amazon S3 bucket, the maximum email size -// (including headers) is 30 MB. Emails larger than that will bounce. -// -// For information about specifying Amazon S3 actions in receipt rules, see -// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-s3.html). -type S3Action struct { - _ struct{} `type:"structure"` - - // The name of the Amazon S3 bucket that incoming email will be saved to. - // - // BucketName is a required field - BucketName *string `type:"string" required:"true"` - - // The customer master key that Amazon SES should use to encrypt your emails - // before saving them to the Amazon S3 bucket. You can use the default master - // key or a custom master key you created in AWS KMS as follows: - // - // * To use the default master key, provide an ARN in the form of arn:aws:kms:REGION:ACCOUNT-ID-WITHOUT-HYPHENS:alias/aws/ses. - // For example, if your AWS account ID is 123456789012 and you want to use - // the default master key in the US West (Oregon) region, the ARN of the - // default master key would be arn:aws:kms:us-west-2:123456789012:alias/aws/ses. - // If you use the default master key, you don't need to perform any extra - // steps to give Amazon SES permission to use the key. - // - // * To use a custom master key you created in AWS KMS, provide the ARN of - // the master key and ensure that you add a statement to your key's policy - // to give Amazon SES permission to use it. For more information about giving - // permissions, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). - // - // For more information about key policies, see the AWS KMS Developer Guide - // (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html). If - // you do not specify a master key, Amazon SES will not encrypt your emails. - // - // Your mail is encrypted by Amazon SES using the Amazon S3 encryption client - // before the mail is submitted to Amazon S3 for storage. It is not encrypted - // using Amazon S3 server-side encryption. This means that you must use the - // Amazon S3 encryption client to decrypt the email after retrieving it from - // Amazon S3, as the service has no access to use your AWS KMS keys for decryption. - // This encryption client is currently available with the AWS SDK for Java (http://aws.amazon.com/sdk-for-java/) - // and AWS SDK for Ruby (http://aws.amazon.com/sdk-for-ruby/) only. For more - // information about client-side encryption using AWS KMS master keys, see the - // Amazon S3 Developer Guide (http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html). - KmsKeyArn *string `type:"string"` - - // The key prefix of the Amazon S3 bucket. The key prefix is similar to a directory - // name that enables you to store similar data under the same directory in a - // bucket. - ObjectKeyPrefix *string `type:"string"` - - // The ARN of the Amazon SNS topic to notify when the message is saved to the - // Amazon S3 bucket. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. - // For more information about Amazon SNS topics, see the Amazon SNS Developer - // Guide (http://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html). - TopicArn *string `type:"string"` -} - -// String returns the string representation -func (s S3Action) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3Action) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3Action) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3Action"} - if s.BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("BucketName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketName sets the BucketName field's value. -func (s *S3Action) SetBucketName(v string) *S3Action { - s.BucketName = &v - return s -} - -// SetKmsKeyArn sets the KmsKeyArn field's value. -func (s *S3Action) SetKmsKeyArn(v string) *S3Action { - s.KmsKeyArn = &v - return s -} - -// SetObjectKeyPrefix sets the ObjectKeyPrefix field's value. -func (s *S3Action) SetObjectKeyPrefix(v string) *S3Action { - s.ObjectKeyPrefix = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *S3Action) SetTopicArn(v string) *S3Action { - s.TopicArn = &v - return s -} - -// When included in a receipt rule, this action publishes a notification to -// Amazon Simple Notification Service (Amazon SNS). This action includes a complete -// copy of the email content in the Amazon SNS notifications. Amazon SNS notifications -// for all other actions simply provide information about the email. They do -// not include the email content itself. -// -// If you own the Amazon SNS topic, you don't need to do anything to give Amazon -// SES permission to publish emails to it. However, if you don't own the Amazon -// SNS topic, you need to attach a policy to the topic to give Amazon SES permissions -// to access it. For information about giving permissions, see the Amazon SES -// Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). -// -// You can only publish emails that are 150 KB or less (including the header) -// to Amazon SNS. Larger emails will bounce. If you anticipate emails larger -// than 150 KB, use the S3 action instead. -// -// For information about using a receipt rule to publish an Amazon SNS notification, -// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-sns.html). -type SNSAction struct { - _ struct{} `type:"structure"` - - // The encoding to use for the email within the Amazon SNS notification. UTF-8 - // is easier to use, but may not preserve all special characters when a message - // was encoded with a different encoding format. Base64 preserves all special - // characters. The default value is UTF-8. - Encoding *string `type:"string" enum:"SNSActionEncoding"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic to notify. An example - // of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. - // For more information about Amazon SNS topics, see the Amazon SNS Developer - // Guide (http://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html). - // - // TopicArn is a required field - TopicArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SNSAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SNSAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SNSAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SNSAction"} - if s.TopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("TopicArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncoding sets the Encoding field's value. -func (s *SNSAction) SetEncoding(v string) *SNSAction { - s.Encoding = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *SNSAction) SetTopicArn(v string) *SNSAction { - s.TopicArn = &v - return s -} - -// Contains the topic ARN associated with an Amazon Simple Notification Service -// (Amazon SNS) event destination. -// -// Event destinations, such as Amazon SNS, are associated with configuration -// sets, which enable you to publish email sending events. For information about -// using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type SNSDestination struct { - _ struct{} `type:"structure"` - - // The ARN of the Amazon SNS topic that email sending events will be published - // to. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. - // For more information about Amazon SNS topics, see the Amazon SNS Developer - // Guide (http://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html). - // - // TopicARN is a required field - TopicARN *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SNSDestination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SNSDestination) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SNSDestination) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SNSDestination"} - if s.TopicARN == nil { - invalidParams.Add(request.NewErrParamRequired("TopicARN")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTopicARN sets the TopicARN field's value. -func (s *SNSDestination) SetTopicARN(v string) *SNSDestination { - s.TopicARN = &v - return s -} - -// Represents a request to send a bounce message to the sender of an email you -// received through Amazon SES. -type SendBounceInput struct { - _ struct{} `type:"structure"` - - // The address to use in the "From" header of the bounce message. This must - // be an identity that you have verified with Amazon SES. - // - // BounceSender is a required field - BounceSender *string `type:"string" required:"true"` - - // This parameter is used only for sending authorization. It is the ARN of the - // identity that is associated with the sending authorization policy that permits - // you to use the address in the "From" header of the bounce. For more information - // about sending authorization, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). - BounceSenderArn *string `type:"string"` - - // A list of recipients of the bounced message, including the information required - // to create the Delivery Status Notifications (DSNs) for the recipients. You - // must specify at least one BouncedRecipientInfo in the list. - // - // BouncedRecipientInfoList is a required field - BouncedRecipientInfoList []*BouncedRecipientInfo `type:"list" required:"true"` - - // Human-readable text for the bounce message to explain the failure. If not - // specified, the text will be auto-generated based on the bounced recipient - // information. - Explanation *string `type:"string"` - - // Message-related DSN fields. If not specified, Amazon SES will choose the - // values. - MessageDsn *MessageDsn `type:"structure"` - - // The message ID of the message to be bounced. - // - // OriginalMessageId is a required field - OriginalMessageId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SendBounceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendBounceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendBounceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendBounceInput"} - if s.BounceSender == nil { - invalidParams.Add(request.NewErrParamRequired("BounceSender")) - } - if s.BouncedRecipientInfoList == nil { - invalidParams.Add(request.NewErrParamRequired("BouncedRecipientInfoList")) - } - if s.OriginalMessageId == nil { - invalidParams.Add(request.NewErrParamRequired("OriginalMessageId")) - } - if s.BouncedRecipientInfoList != nil { - for i, v := range s.BouncedRecipientInfoList { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "BouncedRecipientInfoList", i), err.(request.ErrInvalidParams)) - } - } - } - if s.MessageDsn != nil { - if err := s.MessageDsn.Validate(); err != nil { - invalidParams.AddNested("MessageDsn", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBounceSender sets the BounceSender field's value. -func (s *SendBounceInput) SetBounceSender(v string) *SendBounceInput { - s.BounceSender = &v - return s -} - -// SetBounceSenderArn sets the BounceSenderArn field's value. -func (s *SendBounceInput) SetBounceSenderArn(v string) *SendBounceInput { - s.BounceSenderArn = &v - return s -} - -// SetBouncedRecipientInfoList sets the BouncedRecipientInfoList field's value. -func (s *SendBounceInput) SetBouncedRecipientInfoList(v []*BouncedRecipientInfo) *SendBounceInput { - s.BouncedRecipientInfoList = v - return s -} - -// SetExplanation sets the Explanation field's value. -func (s *SendBounceInput) SetExplanation(v string) *SendBounceInput { - s.Explanation = &v - return s -} - -// SetMessageDsn sets the MessageDsn field's value. -func (s *SendBounceInput) SetMessageDsn(v *MessageDsn) *SendBounceInput { - s.MessageDsn = v - return s -} - -// SetOriginalMessageId sets the OriginalMessageId field's value. -func (s *SendBounceInput) SetOriginalMessageId(v string) *SendBounceInput { - s.OriginalMessageId = &v - return s -} - -// Represents a unique message ID. -type SendBounceOutput struct { - _ struct{} `type:"structure"` - - // The message ID of the bounce message. - MessageId *string `type:"string"` -} - -// String returns the string representation -func (s SendBounceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendBounceOutput) GoString() string { - return s.String() -} - -// SetMessageId sets the MessageId field's value. -func (s *SendBounceOutput) SetMessageId(v string) *SendBounceOutput { - s.MessageId = &v - return s -} - -// Represents a request to send a templated email to multiple destinations using -// Amazon SES. For more information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html). -type SendBulkTemplatedEmailInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration set to use when you send an email using SendBulkTemplatedEmail. - ConfigurationSetName *string `type:"string"` - - // A list of tags, in the form of name/value pairs, to apply to an email that - // you send to a destination using SendBulkTemplatedEmail. - DefaultTags []*MessageTag `type:"list"` - - // A list of replacement values to apply to the template when replacement data - // is not specified in a Destination object. These values act as a default or - // fallback option when no other data is available. - // - // The template data is a JSON object, typically consisting of key-value pairs - // in which the keys correspond to replacement tags in the email template. - DefaultTemplateData *string `type:"string"` - - // One or more Destination objects. All of the recipients in a Destination will - // receive the same version of the email. You can specify up to 50 Destination - // objects within a Destinations array. - // - // Destinations is a required field - Destinations []*BulkEmailDestination `type:"list" required:"true"` - - // The reply-to email address(es) for the message. If the recipient replies - // to the message, each reply-to address will receive the reply. - ReplyToAddresses []*string `type:"list"` - - // The email address that bounces and complaints will be forwarded to when feedback - // forwarding is enabled. If the message cannot be delivered to the recipient, - // then an error message will be returned from the recipient's ISP; this message - // will then be forwarded to the email address specified by the ReturnPath parameter. - // The ReturnPath parameter is never overwritten. This email address must be - // either individually verified with Amazon SES, or from a domain that has been - // verified with Amazon SES. - ReturnPath *string `type:"string"` - - // This parameter is used only for sending authorization. It is the ARN of the - // identity that is associated with the sending authorization policy that permits - // you to use the email address specified in the ReturnPath parameter. - // - // For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) - // attaches a policy to it that authorizes you to use feedback@example.com, - // then you would specify the ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, - // and the ReturnPath to be feedback@example.com. - // - // For more information about sending authorization, see the Amazon SES Developer - // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). - ReturnPathArn *string `type:"string"` - - // The email address that is sending the email. This email address must be either - // individually verified with Amazon SES, or from a domain that has been verified - // with Amazon SES. For information about verifying identities, see the Amazon - // SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html). - // - // If you are sending on behalf of another user and have been permitted to do - // so by a sending authorization policy, then you must also specify the SourceArn - // parameter. For more information about sending authorization, see the Amazon - // SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). - // - // Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531 - // (https://tools.ietf.org/html/rfc6531). For this reason, the local part of - // a source email address (the part of the email address that precedes the @ - // sign) may only contain 7-bit ASCII characters (https://en.wikipedia.org/wiki/Email_address#Local-part). - // If the domain part of an address (the part after the @ sign) contains non-ASCII - // characters, they must be encoded using Punycode, as described in RFC3492 - // (https://tools.ietf.org/html/rfc3492.html). The sender name (also known as - // the friendly name) may contain non-ASCII characters. These characters must - // be encoded using MIME encoded-word syntax, as described in RFC 2047 (https://tools.ietf.org/html/rfc2047). - // MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?=. - // - // Source is a required field - Source *string `type:"string" required:"true"` - - // This parameter is used only for sending authorization. It is the ARN of the - // identity that is associated with the sending authorization policy that permits - // you to send for the email address specified in the Source parameter. - // - // For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) - // attaches a policy to it that authorizes you to send from user@example.com, - // then you would specify the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, - // and the Source to be user@example.com. - // - // For more information about sending authorization, see the Amazon SES Developer - // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). - SourceArn *string `type:"string"` - - // The template to use when sending this email. - // - // Template is a required field - Template *string `type:"string" required:"true"` - - // The ARN of the template to use when sending this email. - TemplateArn *string `type:"string"` -} - -// String returns the string representation -func (s SendBulkTemplatedEmailInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendBulkTemplatedEmailInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendBulkTemplatedEmailInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendBulkTemplatedEmailInput"} - if s.Destinations == nil { - invalidParams.Add(request.NewErrParamRequired("Destinations")) - } - if s.Source == nil { - invalidParams.Add(request.NewErrParamRequired("Source")) - } - if s.Template == nil { - invalidParams.Add(request.NewErrParamRequired("Template")) - } - if s.DefaultTags != nil { - for i, v := range s.DefaultTags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DefaultTags", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Destinations != nil { - for i, v := range s.Destinations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Destinations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *SendBulkTemplatedEmailInput) SetConfigurationSetName(v string) *SendBulkTemplatedEmailInput { - s.ConfigurationSetName = &v - return s -} - -// SetDefaultTags sets the DefaultTags field's value. -func (s *SendBulkTemplatedEmailInput) SetDefaultTags(v []*MessageTag) *SendBulkTemplatedEmailInput { - s.DefaultTags = v - return s -} - -// SetDefaultTemplateData sets the DefaultTemplateData field's value. -func (s *SendBulkTemplatedEmailInput) SetDefaultTemplateData(v string) *SendBulkTemplatedEmailInput { - s.DefaultTemplateData = &v - return s -} - -// SetDestinations sets the Destinations field's value. -func (s *SendBulkTemplatedEmailInput) SetDestinations(v []*BulkEmailDestination) *SendBulkTemplatedEmailInput { - s.Destinations = v - return s -} - -// SetReplyToAddresses sets the ReplyToAddresses field's value. -func (s *SendBulkTemplatedEmailInput) SetReplyToAddresses(v []*string) *SendBulkTemplatedEmailInput { - s.ReplyToAddresses = v - return s -} - -// SetReturnPath sets the ReturnPath field's value. -func (s *SendBulkTemplatedEmailInput) SetReturnPath(v string) *SendBulkTemplatedEmailInput { - s.ReturnPath = &v - return s -} - -// SetReturnPathArn sets the ReturnPathArn field's value. -func (s *SendBulkTemplatedEmailInput) SetReturnPathArn(v string) *SendBulkTemplatedEmailInput { - s.ReturnPathArn = &v - return s -} - -// SetSource sets the Source field's value. -func (s *SendBulkTemplatedEmailInput) SetSource(v string) *SendBulkTemplatedEmailInput { - s.Source = &v - return s -} - -// SetSourceArn sets the SourceArn field's value. -func (s *SendBulkTemplatedEmailInput) SetSourceArn(v string) *SendBulkTemplatedEmailInput { - s.SourceArn = &v - return s -} - -// SetTemplate sets the Template field's value. -func (s *SendBulkTemplatedEmailInput) SetTemplate(v string) *SendBulkTemplatedEmailInput { - s.Template = &v - return s -} - -// SetTemplateArn sets the TemplateArn field's value. -func (s *SendBulkTemplatedEmailInput) SetTemplateArn(v string) *SendBulkTemplatedEmailInput { - s.TemplateArn = &v - return s -} - -type SendBulkTemplatedEmailOutput struct { - _ struct{} `type:"structure"` - - // The unique message identifier returned from the SendBulkTemplatedEmail action. - // - // Status is a required field - Status []*BulkEmailDestinationStatus `type:"list" required:"true"` -} - -// String returns the string representation -func (s SendBulkTemplatedEmailOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendBulkTemplatedEmailOutput) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *SendBulkTemplatedEmailOutput) SetStatus(v []*BulkEmailDestinationStatus) *SendBulkTemplatedEmailOutput { - s.Status = v - return s -} - -// Represents a request to send a custom verification email to a specified recipient. -type SendCustomVerificationEmailInput struct { - _ struct{} `type:"structure"` - - // Name of a configuration set to use when sending the verification email. - ConfigurationSetName *string `type:"string"` - - // The email address to verify. - // - // EmailAddress is a required field - EmailAddress *string `type:"string" required:"true"` - - // The name of the custom verification email template to use when sending the - // verification email. - // - // TemplateName is a required field - TemplateName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SendCustomVerificationEmailInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendCustomVerificationEmailInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendCustomVerificationEmailInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendCustomVerificationEmailInput"} - if s.EmailAddress == nil { - invalidParams.Add(request.NewErrParamRequired("EmailAddress")) - } - if s.TemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *SendCustomVerificationEmailInput) SetConfigurationSetName(v string) *SendCustomVerificationEmailInput { - s.ConfigurationSetName = &v - return s -} - -// SetEmailAddress sets the EmailAddress field's value. -func (s *SendCustomVerificationEmailInput) SetEmailAddress(v string) *SendCustomVerificationEmailInput { - s.EmailAddress = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *SendCustomVerificationEmailInput) SetTemplateName(v string) *SendCustomVerificationEmailInput { - s.TemplateName = &v - return s -} - -// The response received when attempting to send the custom verification email. -type SendCustomVerificationEmailOutput struct { - _ struct{} `type:"structure"` - - // The unique message identifier returned from the SendCustomVerificationEmail - // operation. - MessageId *string `type:"string"` -} - -// String returns the string representation -func (s SendCustomVerificationEmailOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendCustomVerificationEmailOutput) GoString() string { - return s.String() -} - -// SetMessageId sets the MessageId field's value. -func (s *SendCustomVerificationEmailOutput) SetMessageId(v string) *SendCustomVerificationEmailOutput { - s.MessageId = &v - return s -} - -// Represents sending statistics data. Each SendDataPoint contains statistics -// for a 15-minute period of sending activity. -type SendDataPoint struct { - _ struct{} `type:"structure"` - - // Number of emails that have bounced. - Bounces *int64 `type:"long"` - - // Number of unwanted emails that were rejected by recipients. - Complaints *int64 `type:"long"` - - // Number of emails that have been sent. - DeliveryAttempts *int64 `type:"long"` - - // Number of emails rejected by Amazon SES. - Rejects *int64 `type:"long"` - - // Time of the data point. - Timestamp *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s SendDataPoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendDataPoint) GoString() string { - return s.String() -} - -// SetBounces sets the Bounces field's value. -func (s *SendDataPoint) SetBounces(v int64) *SendDataPoint { - s.Bounces = &v - return s -} - -// SetComplaints sets the Complaints field's value. -func (s *SendDataPoint) SetComplaints(v int64) *SendDataPoint { - s.Complaints = &v - return s -} - -// SetDeliveryAttempts sets the DeliveryAttempts field's value. -func (s *SendDataPoint) SetDeliveryAttempts(v int64) *SendDataPoint { - s.DeliveryAttempts = &v - return s -} - -// SetRejects sets the Rejects field's value. -func (s *SendDataPoint) SetRejects(v int64) *SendDataPoint { - s.Rejects = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *SendDataPoint) SetTimestamp(v time.Time) *SendDataPoint { - s.Timestamp = &v - return s -} - -// Represents a request to send a single formatted email using Amazon SES. For -// more information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-formatted.html). -type SendEmailInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration set to use when you send an email using SendEmail. - ConfigurationSetName *string `type:"string"` - - // The destination for this email, composed of To:, CC:, and BCC: fields. - // - // Destination is a required field - Destination *Destination `type:"structure" required:"true"` - - // The message to be sent. - // - // Message is a required field - Message *Message `type:"structure" required:"true"` - - // The reply-to email address(es) for the message. If the recipient replies - // to the message, each reply-to address will receive the reply. - ReplyToAddresses []*string `type:"list"` - - // The email address that bounces and complaints will be forwarded to when feedback - // forwarding is enabled. If the message cannot be delivered to the recipient, - // then an error message will be returned from the recipient's ISP; this message - // will then be forwarded to the email address specified by the ReturnPath parameter. - // The ReturnPath parameter is never overwritten. This email address must be - // either individually verified with Amazon SES, or from a domain that has been - // verified with Amazon SES. - ReturnPath *string `type:"string"` - - // This parameter is used only for sending authorization. It is the ARN of the - // identity that is associated with the sending authorization policy that permits - // you to use the email address specified in the ReturnPath parameter. - // - // For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) - // attaches a policy to it that authorizes you to use feedback@example.com, - // then you would specify the ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, - // and the ReturnPath to be feedback@example.com. - // - // For more information about sending authorization, see the Amazon SES Developer - // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). - ReturnPathArn *string `type:"string"` - - // The email address that is sending the email. This email address must be either - // individually verified with Amazon SES, or from a domain that has been verified - // with Amazon SES. For information about verifying identities, see the Amazon - // SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html). - // - // If you are sending on behalf of another user and have been permitted to do - // so by a sending authorization policy, then you must also specify the SourceArn - // parameter. For more information about sending authorization, see the Amazon - // SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). - // - // Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531 - // (https://tools.ietf.org/html/rfc6531). For this reason, the local part of - // a source email address (the part of the email address that precedes the @ - // sign) may only contain 7-bit ASCII characters (https://en.wikipedia.org/wiki/Email_address#Local-part). - // If the domain part of an address (the part after the @ sign) contains non-ASCII - // characters, they must be encoded using Punycode, as described in RFC3492 - // (https://tools.ietf.org/html/rfc3492.html). The sender name (also known as - // the friendly name) may contain non-ASCII characters. These characters must - // be encoded using MIME encoded-word syntax, as described in RFC 2047 (https://tools.ietf.org/html/rfc2047). - // MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?=. - // - // Source is a required field - Source *string `type:"string" required:"true"` - - // This parameter is used only for sending authorization. It is the ARN of the - // identity that is associated with the sending authorization policy that permits - // you to send for the email address specified in the Source parameter. - // - // For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) - // attaches a policy to it that authorizes you to send from user@example.com, - // then you would specify the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, - // and the Source to be user@example.com. - // - // For more information about sending authorization, see the Amazon SES Developer - // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). - SourceArn *string `type:"string"` - - // A list of tags, in the form of name/value pairs, to apply to an email that - // you send using SendEmail. Tags correspond to characteristics of the email - // that you define, so that you can publish email sending events. - Tags []*MessageTag `type:"list"` -} - -// String returns the string representation -func (s SendEmailInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendEmailInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendEmailInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendEmailInput"} - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - if s.Message == nil { - invalidParams.Add(request.NewErrParamRequired("Message")) - } - if s.Source == nil { - invalidParams.Add(request.NewErrParamRequired("Source")) - } - if s.Message != nil { - if err := s.Message.Validate(); err != nil { - invalidParams.AddNested("Message", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *SendEmailInput) SetConfigurationSetName(v string) *SendEmailInput { - s.ConfigurationSetName = &v - return s -} - -// SetDestination sets the Destination field's value. -func (s *SendEmailInput) SetDestination(v *Destination) *SendEmailInput { - s.Destination = v - return s -} - -// SetMessage sets the Message field's value. -func (s *SendEmailInput) SetMessage(v *Message) *SendEmailInput { - s.Message = v - return s -} - -// SetReplyToAddresses sets the ReplyToAddresses field's value. -func (s *SendEmailInput) SetReplyToAddresses(v []*string) *SendEmailInput { - s.ReplyToAddresses = v - return s -} - -// SetReturnPath sets the ReturnPath field's value. -func (s *SendEmailInput) SetReturnPath(v string) *SendEmailInput { - s.ReturnPath = &v - return s -} - -// SetReturnPathArn sets the ReturnPathArn field's value. -func (s *SendEmailInput) SetReturnPathArn(v string) *SendEmailInput { - s.ReturnPathArn = &v - return s -} - -// SetSource sets the Source field's value. -func (s *SendEmailInput) SetSource(v string) *SendEmailInput { - s.Source = &v - return s -} - -// SetSourceArn sets the SourceArn field's value. -func (s *SendEmailInput) SetSourceArn(v string) *SendEmailInput { - s.SourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *SendEmailInput) SetTags(v []*MessageTag) *SendEmailInput { - s.Tags = v - return s -} - -// Represents a unique message ID. -type SendEmailOutput struct { - _ struct{} `type:"structure"` - - // The unique message identifier returned from the SendEmail action. - // - // MessageId is a required field - MessageId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SendEmailOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendEmailOutput) GoString() string { - return s.String() -} - -// SetMessageId sets the MessageId field's value. -func (s *SendEmailOutput) SetMessageId(v string) *SendEmailOutput { - s.MessageId = &v - return s -} - -// Represents a request to send a single raw email using Amazon SES. For more -// information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html). -type SendRawEmailInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration set to use when you send an email using SendRawEmail. - ConfigurationSetName *string `type:"string"` - - // A list of destinations for the message, consisting of To:, CC:, and BCC: - // addresses. - Destinations []*string `type:"list"` - - // This parameter is used only for sending authorization. It is the ARN of the - // identity that is associated with the sending authorization policy that permits - // you to specify a particular "From" address in the header of the raw email. - // - // Instead of using this parameter, you can use the X-header X-SES-FROM-ARN - // in the raw message of the email. If you use both the FromArn parameter and - // the corresponding X-header, Amazon SES uses the value of the FromArn parameter. - // - // For information about when to use this parameter, see the description of - // SendRawEmail in this guide, or see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-delegate-sender-tasks-email.html). - FromArn *string `type:"string"` - - // The raw email message itself. The message has to meet the following criteria: - // - // * The message has to contain a header and a body, separated by a blank - // line. - // - // * All of the required header fields must be present in the message. - // - // * Each part of a multipart MIME message must be formatted properly. - // - // * Attachments must be of a content type that Amazon SES supports. For - // a list on unsupported content types, see Unsupported Attachment Types - // (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mime-types.html) - // in the Amazon SES Developer Guide. - // - // * The entire message must be base64-encoded. - // - // * If any of the MIME parts in your message contain content that is outside - // of the 7-bit ASCII character range, we highly recommend that you encode - // that content. For more information, see Sending Raw Email (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html) - // in the Amazon SES Developer Guide. - // - // * Per RFC 5321 (https://tools.ietf.org/html/rfc5321#section-4.5.3.1.6), - // the maximum length of each line of text, including the , must not - // exceed 1,000 characters. - // - // RawMessage is a required field - RawMessage *RawMessage `type:"structure" required:"true"` - - // This parameter is used only for sending authorization. It is the ARN of the - // identity that is associated with the sending authorization policy that permits - // you to use the email address specified in the ReturnPath parameter. - // - // For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) - // attaches a policy to it that authorizes you to use feedback@example.com, - // then you would specify the ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, - // and the ReturnPath to be feedback@example.com. - // - // Instead of using this parameter, you can use the X-header X-SES-RETURN-PATH-ARN - // in the raw message of the email. If you use both the ReturnPathArn parameter - // and the corresponding X-header, Amazon SES uses the value of the ReturnPathArn - // parameter. - // - // For information about when to use this parameter, see the description of - // SendRawEmail in this guide, or see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-delegate-sender-tasks-email.html). - ReturnPathArn *string `type:"string"` - - // The identity's email address. If you do not provide a value for this parameter, - // you must specify a "From" address in the raw text of the message. (You can - // also specify both.) - // - // Amazon SES does not support the SMTPUTF8 extension, as described inRFC6531 - // (https://tools.ietf.org/html/rfc6531). For this reason, the local part of - // a source email address (the part of the email address that precedes the @ - // sign) may only contain 7-bit ASCII characters (https://en.wikipedia.org/wiki/Email_address#Local-part). - // If the domain part of an address (the part after the @ sign) contains non-ASCII - // characters, they must be encoded using Punycode, as described in RFC3492 - // (https://tools.ietf.org/html/rfc3492.html). The sender name (also known as - // the friendly name) may contain non-ASCII characters. These characters must - // be encoded using MIME encoded-word syntax, as described in RFC 2047 (https://tools.ietf.org/html/rfc2047). - // MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?=. - // - // If you specify the Source parameter and have feedback forwarding enabled, - // then bounces and complaints will be sent to this email address. This takes - // precedence over any Return-Path header that you might include in the raw - // text of the message. - Source *string `type:"string"` - - // This parameter is used only for sending authorization. It is the ARN of the - // identity that is associated with the sending authorization policy that permits - // you to send for the email address specified in the Source parameter. - // - // For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) - // attaches a policy to it that authorizes you to send from user@example.com, - // then you would specify the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, - // and the Source to be user@example.com. - // - // Instead of using this parameter, you can use the X-header X-SES-SOURCE-ARN - // in the raw message of the email. If you use both the SourceArn parameter - // and the corresponding X-header, Amazon SES uses the value of the SourceArn - // parameter. - // - // For information about when to use this parameter, see the description of - // SendRawEmail in this guide, or see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-delegate-sender-tasks-email.html). - SourceArn *string `type:"string"` - - // A list of tags, in the form of name/value pairs, to apply to an email that - // you send using SendRawEmail. Tags correspond to characteristics of the email - // that you define, so that you can publish email sending events. - Tags []*MessageTag `type:"list"` -} - -// String returns the string representation -func (s SendRawEmailInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendRawEmailInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendRawEmailInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendRawEmailInput"} - if s.RawMessage == nil { - invalidParams.Add(request.NewErrParamRequired("RawMessage")) - } - if s.RawMessage != nil { - if err := s.RawMessage.Validate(); err != nil { - invalidParams.AddNested("RawMessage", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *SendRawEmailInput) SetConfigurationSetName(v string) *SendRawEmailInput { - s.ConfigurationSetName = &v - return s -} - -// SetDestinations sets the Destinations field's value. -func (s *SendRawEmailInput) SetDestinations(v []*string) *SendRawEmailInput { - s.Destinations = v - return s -} - -// SetFromArn sets the FromArn field's value. -func (s *SendRawEmailInput) SetFromArn(v string) *SendRawEmailInput { - s.FromArn = &v - return s -} - -// SetRawMessage sets the RawMessage field's value. -func (s *SendRawEmailInput) SetRawMessage(v *RawMessage) *SendRawEmailInput { - s.RawMessage = v - return s -} - -// SetReturnPathArn sets the ReturnPathArn field's value. -func (s *SendRawEmailInput) SetReturnPathArn(v string) *SendRawEmailInput { - s.ReturnPathArn = &v - return s -} - -// SetSource sets the Source field's value. -func (s *SendRawEmailInput) SetSource(v string) *SendRawEmailInput { - s.Source = &v - return s -} - -// SetSourceArn sets the SourceArn field's value. -func (s *SendRawEmailInput) SetSourceArn(v string) *SendRawEmailInput { - s.SourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *SendRawEmailInput) SetTags(v []*MessageTag) *SendRawEmailInput { - s.Tags = v - return s -} - -// Represents a unique message ID. -type SendRawEmailOutput struct { - _ struct{} `type:"structure"` - - // The unique message identifier returned from the SendRawEmail action. - // - // MessageId is a required field - MessageId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SendRawEmailOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendRawEmailOutput) GoString() string { - return s.String() -} - -// SetMessageId sets the MessageId field's value. -func (s *SendRawEmailOutput) SetMessageId(v string) *SendRawEmailOutput { - s.MessageId = &v - return s -} - -// Represents a request to send a templated email using Amazon SES. For more -// information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html). -type SendTemplatedEmailInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration set to use when you send an email using SendTemplatedEmail. - ConfigurationSetName *string `type:"string"` - - // The destination for this email, composed of To:, CC:, and BCC: fields. A - // Destination can include up to 50 recipients across these three fields. - // - // Destination is a required field - Destination *Destination `type:"structure" required:"true"` - - // The reply-to email address(es) for the message. If the recipient replies - // to the message, each reply-to address will receive the reply. - ReplyToAddresses []*string `type:"list"` - - // The email address that bounces and complaints will be forwarded to when feedback - // forwarding is enabled. If the message cannot be delivered to the recipient, - // then an error message will be returned from the recipient's ISP; this message - // will then be forwarded to the email address specified by the ReturnPath parameter. - // The ReturnPath parameter is never overwritten. This email address must be - // either individually verified with Amazon SES, or from a domain that has been - // verified with Amazon SES. - ReturnPath *string `type:"string"` - - // This parameter is used only for sending authorization. It is the ARN of the - // identity that is associated with the sending authorization policy that permits - // you to use the email address specified in the ReturnPath parameter. - // - // For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) - // attaches a policy to it that authorizes you to use feedback@example.com, - // then you would specify the ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, - // and the ReturnPath to be feedback@example.com. - // - // For more information about sending authorization, see the Amazon SES Developer - // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). - ReturnPathArn *string `type:"string"` - - // The email address that is sending the email. This email address must be either - // individually verified with Amazon SES, or from a domain that has been verified - // with Amazon SES. For information about verifying identities, see the Amazon - // SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html). - // - // If you are sending on behalf of another user and have been permitted to do - // so by a sending authorization policy, then you must also specify the SourceArn - // parameter. For more information about sending authorization, see the Amazon - // SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). - // - // Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531 - // (https://tools.ietf.org/html/rfc6531). For this reason, the local part of - // a source email address (the part of the email address that precedes the @ - // sign) may only contain 7-bit ASCII characters (https://en.wikipedia.org/wiki/Email_address#Local-part). - // If the domain part of an address (the part after the @ sign) contains non-ASCII - // characters, they must be encoded using Punycode, as described in RFC3492 - // (https://tools.ietf.org/html/rfc3492.html). The sender name (also known as - // the friendly name) may contain non-ASCII characters. These characters must - // be encoded using MIME encoded-word syntax, as described inRFC 2047 (https://tools.ietf.org/html/rfc2047). - // MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?=. - // - // Source is a required field - Source *string `type:"string" required:"true"` - - // This parameter is used only for sending authorization. It is the ARN of the - // identity that is associated with the sending authorization policy that permits - // you to send for the email address specified in the Source parameter. - // - // For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) - // attaches a policy to it that authorizes you to send from user@example.com, - // then you would specify the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, - // and the Source to be user@example.com. - // - // For more information about sending authorization, see the Amazon SES Developer - // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). - SourceArn *string `type:"string"` - - // A list of tags, in the form of name/value pairs, to apply to an email that - // you send using SendTemplatedEmail. Tags correspond to characteristics of - // the email that you define, so that you can publish email sending events. - Tags []*MessageTag `type:"list"` - - // The template to use when sending this email. - // - // Template is a required field - Template *string `type:"string" required:"true"` - - // The ARN of the template to use when sending this email. - TemplateArn *string `type:"string"` - - // A list of replacement values to apply to the template. This parameter is - // a JSON object, typically consisting of key-value pairs in which the keys - // correspond to replacement tags in the email template. - // - // TemplateData is a required field - TemplateData *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SendTemplatedEmailInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendTemplatedEmailInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendTemplatedEmailInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendTemplatedEmailInput"} - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - if s.Source == nil { - invalidParams.Add(request.NewErrParamRequired("Source")) - } - if s.Template == nil { - invalidParams.Add(request.NewErrParamRequired("Template")) - } - if s.TemplateData == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateData")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *SendTemplatedEmailInput) SetConfigurationSetName(v string) *SendTemplatedEmailInput { - s.ConfigurationSetName = &v - return s -} - -// SetDestination sets the Destination field's value. -func (s *SendTemplatedEmailInput) SetDestination(v *Destination) *SendTemplatedEmailInput { - s.Destination = v - return s -} - -// SetReplyToAddresses sets the ReplyToAddresses field's value. -func (s *SendTemplatedEmailInput) SetReplyToAddresses(v []*string) *SendTemplatedEmailInput { - s.ReplyToAddresses = v - return s -} - -// SetReturnPath sets the ReturnPath field's value. -func (s *SendTemplatedEmailInput) SetReturnPath(v string) *SendTemplatedEmailInput { - s.ReturnPath = &v - return s -} - -// SetReturnPathArn sets the ReturnPathArn field's value. -func (s *SendTemplatedEmailInput) SetReturnPathArn(v string) *SendTemplatedEmailInput { - s.ReturnPathArn = &v - return s -} - -// SetSource sets the Source field's value. -func (s *SendTemplatedEmailInput) SetSource(v string) *SendTemplatedEmailInput { - s.Source = &v - return s -} - -// SetSourceArn sets the SourceArn field's value. -func (s *SendTemplatedEmailInput) SetSourceArn(v string) *SendTemplatedEmailInput { - s.SourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *SendTemplatedEmailInput) SetTags(v []*MessageTag) *SendTemplatedEmailInput { - s.Tags = v - return s -} - -// SetTemplate sets the Template field's value. -func (s *SendTemplatedEmailInput) SetTemplate(v string) *SendTemplatedEmailInput { - s.Template = &v - return s -} - -// SetTemplateArn sets the TemplateArn field's value. -func (s *SendTemplatedEmailInput) SetTemplateArn(v string) *SendTemplatedEmailInput { - s.TemplateArn = &v - return s -} - -// SetTemplateData sets the TemplateData field's value. -func (s *SendTemplatedEmailInput) SetTemplateData(v string) *SendTemplatedEmailInput { - s.TemplateData = &v - return s -} - -type SendTemplatedEmailOutput struct { - _ struct{} `type:"structure"` - - // The unique message identifier returned from the SendTemplatedEmail action. - // - // MessageId is a required field - MessageId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SendTemplatedEmailOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendTemplatedEmailOutput) GoString() string { - return s.String() -} - -// SetMessageId sets the MessageId field's value. -func (s *SendTemplatedEmailOutput) SetMessageId(v string) *SendTemplatedEmailOutput { - s.MessageId = &v - return s -} - -// Represents a request to set a receipt rule set as the active receipt rule -// set. You use receipt rule sets to receive email with Amazon SES. For more -// information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type SetActiveReceiptRuleSetInput struct { - _ struct{} `type:"structure"` - - // The name of the receipt rule set to make active. Setting this value to null - // disables all email receiving. - RuleSetName *string `type:"string"` -} - -// String returns the string representation -func (s SetActiveReceiptRuleSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetActiveReceiptRuleSetInput) GoString() string { - return s.String() -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *SetActiveReceiptRuleSetInput) SetRuleSetName(v string) *SetActiveReceiptRuleSetInput { - s.RuleSetName = &v - return s -} - -// An empty element returned on a successful request. -type SetActiveReceiptRuleSetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetActiveReceiptRuleSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetActiveReceiptRuleSetOutput) GoString() string { - return s.String() -} - -// Represents a request to enable or disable Amazon SES Easy DKIM signing for -// an identity. For more information about setting up Easy DKIM, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html). -type SetIdentityDkimEnabledInput struct { - _ struct{} `type:"structure"` - - // Sets whether DKIM signing is enabled for an identity. Set to true to enable - // DKIM signing for this identity; false to disable it. - // - // DkimEnabled is a required field - DkimEnabled *bool `type:"boolean" required:"true"` - - // The identity for which DKIM signing should be enabled or disabled. - // - // Identity is a required field - Identity *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SetIdentityDkimEnabledInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetIdentityDkimEnabledInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetIdentityDkimEnabledInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetIdentityDkimEnabledInput"} - if s.DkimEnabled == nil { - invalidParams.Add(request.NewErrParamRequired("DkimEnabled")) - } - if s.Identity == nil { - invalidParams.Add(request.NewErrParamRequired("Identity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDkimEnabled sets the DkimEnabled field's value. -func (s *SetIdentityDkimEnabledInput) SetDkimEnabled(v bool) *SetIdentityDkimEnabledInput { - s.DkimEnabled = &v - return s -} - -// SetIdentity sets the Identity field's value. -func (s *SetIdentityDkimEnabledInput) SetIdentity(v string) *SetIdentityDkimEnabledInput { - s.Identity = &v - return s -} - -// An empty element returned on a successful request. -type SetIdentityDkimEnabledOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetIdentityDkimEnabledOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetIdentityDkimEnabledOutput) GoString() string { - return s.String() -} - -// Represents a request to enable or disable whether Amazon SES forwards you -// bounce and complaint notifications through email. For information about email -// feedback forwarding, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications-via-email.html). -type SetIdentityFeedbackForwardingEnabledInput struct { - _ struct{} `type:"structure"` - - // Sets whether Amazon SES will forward bounce and complaint notifications as - // email. true specifies that Amazon SES will forward bounce and complaint notifications - // as email, in addition to any Amazon SNS topic publishing otherwise specified. - // false specifies that Amazon SES will publish bounce and complaint notifications - // only through Amazon SNS. This value can only be set to false when Amazon - // SNS topics are set for both Bounce and Complaint notification types. - // - // ForwardingEnabled is a required field - ForwardingEnabled *bool `type:"boolean" required:"true"` - - // The identity for which to set bounce and complaint notification forwarding. - // Examples: user@example.com, example.com. - // - // Identity is a required field - Identity *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SetIdentityFeedbackForwardingEnabledInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetIdentityFeedbackForwardingEnabledInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetIdentityFeedbackForwardingEnabledInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetIdentityFeedbackForwardingEnabledInput"} - if s.ForwardingEnabled == nil { - invalidParams.Add(request.NewErrParamRequired("ForwardingEnabled")) - } - if s.Identity == nil { - invalidParams.Add(request.NewErrParamRequired("Identity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForwardingEnabled sets the ForwardingEnabled field's value. -func (s *SetIdentityFeedbackForwardingEnabledInput) SetForwardingEnabled(v bool) *SetIdentityFeedbackForwardingEnabledInput { - s.ForwardingEnabled = &v - return s -} - -// SetIdentity sets the Identity field's value. -func (s *SetIdentityFeedbackForwardingEnabledInput) SetIdentity(v string) *SetIdentityFeedbackForwardingEnabledInput { - s.Identity = &v - return s -} - -// An empty element returned on a successful request. -type SetIdentityFeedbackForwardingEnabledOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetIdentityFeedbackForwardingEnabledOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetIdentityFeedbackForwardingEnabledOutput) GoString() string { - return s.String() -} - -// Represents a request to set whether Amazon SES includes the original email -// headers in the Amazon SNS notifications of a specified type. For information -// about notifications, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications-via-sns.html). -type SetIdentityHeadersInNotificationsEnabledInput struct { - _ struct{} `type:"structure"` - - // Sets whether Amazon SES includes the original email headers in Amazon SNS - // notifications of the specified notification type. A value of true specifies - // that Amazon SES will include headers in notifications, and a value of false - // specifies that Amazon SES will not include headers in notifications. - // - // This value can only be set when NotificationType is already set to use a - // particular Amazon SNS topic. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // The identity for which to enable or disable headers in notifications. Examples: - // user@example.com, example.com. - // - // Identity is a required field - Identity *string `type:"string" required:"true"` - - // The notification type for which to enable or disable headers in notifications. - // - // NotificationType is a required field - NotificationType *string `type:"string" required:"true" enum:"NotificationType"` -} - -// String returns the string representation -func (s SetIdentityHeadersInNotificationsEnabledInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetIdentityHeadersInNotificationsEnabledInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetIdentityHeadersInNotificationsEnabledInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetIdentityHeadersInNotificationsEnabledInput"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.Identity == nil { - invalidParams.Add(request.NewErrParamRequired("Identity")) - } - if s.NotificationType == nil { - invalidParams.Add(request.NewErrParamRequired("NotificationType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *SetIdentityHeadersInNotificationsEnabledInput) SetEnabled(v bool) *SetIdentityHeadersInNotificationsEnabledInput { - s.Enabled = &v - return s -} - -// SetIdentity sets the Identity field's value. -func (s *SetIdentityHeadersInNotificationsEnabledInput) SetIdentity(v string) *SetIdentityHeadersInNotificationsEnabledInput { - s.Identity = &v - return s -} - -// SetNotificationType sets the NotificationType field's value. -func (s *SetIdentityHeadersInNotificationsEnabledInput) SetNotificationType(v string) *SetIdentityHeadersInNotificationsEnabledInput { - s.NotificationType = &v - return s -} - -// An empty element returned on a successful request. -type SetIdentityHeadersInNotificationsEnabledOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetIdentityHeadersInNotificationsEnabledOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetIdentityHeadersInNotificationsEnabledOutput) GoString() string { - return s.String() -} - -// Represents a request to enable or disable the Amazon SES custom MAIL FROM -// domain setup for a verified identity. For information about using a custom -// MAIL FROM domain, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from.html). -type SetIdentityMailFromDomainInput struct { - _ struct{} `type:"structure"` - - // The action that you want Amazon SES to take if it cannot successfully read - // the required MX record when you send an email. If you choose UseDefaultValue, - // Amazon SES will use amazonses.com (or a subdomain of that) as the MAIL FROM - // domain. If you choose RejectMessage, Amazon SES will return a MailFromDomainNotVerified - // error and not send the email. - // - // The action specified in BehaviorOnMXFailure is taken when the custom MAIL - // FROM domain setup is in the Pending, Failed, and TemporaryFailure states. - BehaviorOnMXFailure *string `type:"string" enum:"BehaviorOnMXFailure"` - - // The verified identity for which you want to enable or disable the specified - // custom MAIL FROM domain. - // - // Identity is a required field - Identity *string `type:"string" required:"true"` - - // The custom MAIL FROM domain that you want the verified identity to use. The - // MAIL FROM domain must 1) be a subdomain of the verified identity, 2) not - // be used in a "From" address if the MAIL FROM domain is the destination of - // email feedback forwarding (for more information, see the Amazon SES Developer - // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from.html)), - // and 3) not be used to receive emails. A value of null disables the custom - // MAIL FROM setting for the identity. - MailFromDomain *string `type:"string"` -} - -// String returns the string representation -func (s SetIdentityMailFromDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetIdentityMailFromDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetIdentityMailFromDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetIdentityMailFromDomainInput"} - if s.Identity == nil { - invalidParams.Add(request.NewErrParamRequired("Identity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBehaviorOnMXFailure sets the BehaviorOnMXFailure field's value. -func (s *SetIdentityMailFromDomainInput) SetBehaviorOnMXFailure(v string) *SetIdentityMailFromDomainInput { - s.BehaviorOnMXFailure = &v - return s -} - -// SetIdentity sets the Identity field's value. -func (s *SetIdentityMailFromDomainInput) SetIdentity(v string) *SetIdentityMailFromDomainInput { - s.Identity = &v - return s -} - -// SetMailFromDomain sets the MailFromDomain field's value. -func (s *SetIdentityMailFromDomainInput) SetMailFromDomain(v string) *SetIdentityMailFromDomainInput { - s.MailFromDomain = &v - return s -} - -// An empty element returned on a successful request. -type SetIdentityMailFromDomainOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetIdentityMailFromDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetIdentityMailFromDomainOutput) GoString() string { - return s.String() -} - -// Represents a request to specify the Amazon SNS topic to which Amazon SES -// will publish bounce, complaint, or delivery notifications for emails sent -// with that identity as the Source. For information about Amazon SES notifications, -// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications-via-sns.html). -type SetIdentityNotificationTopicInput struct { - _ struct{} `type:"structure"` - - // The identity (email address or domain) that you want to set the Amazon SNS - // topic for. - // - // You can only specify a verified identity for this parameter. - // - // You can specify an identity by using its name or by using its Amazon Resource - // Name (ARN). The following examples are all valid identities: sender@example.com, - // example.com, arn:aws:ses:us-east-1:123456789012:identity/example.com. - // - // Identity is a required field - Identity *string `type:"string" required:"true"` - - // The type of notifications that will be published to the specified Amazon - // SNS topic. - // - // NotificationType is a required field - NotificationType *string `type:"string" required:"true" enum:"NotificationType"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter - // is omitted from the request or a null value is passed, SnsTopic is cleared - // and publishing is disabled. - SnsTopic *string `type:"string"` -} - -// String returns the string representation -func (s SetIdentityNotificationTopicInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetIdentityNotificationTopicInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetIdentityNotificationTopicInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetIdentityNotificationTopicInput"} - if s.Identity == nil { - invalidParams.Add(request.NewErrParamRequired("Identity")) - } - if s.NotificationType == nil { - invalidParams.Add(request.NewErrParamRequired("NotificationType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentity sets the Identity field's value. -func (s *SetIdentityNotificationTopicInput) SetIdentity(v string) *SetIdentityNotificationTopicInput { - s.Identity = &v - return s -} - -// SetNotificationType sets the NotificationType field's value. -func (s *SetIdentityNotificationTopicInput) SetNotificationType(v string) *SetIdentityNotificationTopicInput { - s.NotificationType = &v - return s -} - -// SetSnsTopic sets the SnsTopic field's value. -func (s *SetIdentityNotificationTopicInput) SetSnsTopic(v string) *SetIdentityNotificationTopicInput { - s.SnsTopic = &v - return s -} - -// An empty element returned on a successful request. -type SetIdentityNotificationTopicOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetIdentityNotificationTopicOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetIdentityNotificationTopicOutput) GoString() string { - return s.String() -} - -// Represents a request to set the position of a receipt rule in a receipt rule -// set. You use receipt rule sets to receive email with Amazon SES. For more -// information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type SetReceiptRulePositionInput struct { - _ struct{} `type:"structure"` - - // The name of the receipt rule after which to place the specified receipt rule. - After *string `type:"string"` - - // The name of the receipt rule to reposition. - // - // RuleName is a required field - RuleName *string `type:"string" required:"true"` - - // The name of the receipt rule set that contains the receipt rule to reposition. - // - // RuleSetName is a required field - RuleSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SetReceiptRulePositionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetReceiptRulePositionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetReceiptRulePositionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetReceiptRulePositionInput"} - if s.RuleName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleName")) - } - if s.RuleSetName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleSetName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAfter sets the After field's value. -func (s *SetReceiptRulePositionInput) SetAfter(v string) *SetReceiptRulePositionInput { - s.After = &v - return s -} - -// SetRuleName sets the RuleName field's value. -func (s *SetReceiptRulePositionInput) SetRuleName(v string) *SetReceiptRulePositionInput { - s.RuleName = &v - return s -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *SetReceiptRulePositionInput) SetRuleSetName(v string) *SetReceiptRulePositionInput { - s.RuleSetName = &v - return s -} - -// An empty element returned on a successful request. -type SetReceiptRulePositionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetReceiptRulePositionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetReceiptRulePositionOutput) GoString() string { - return s.String() -} - -// When included in a receipt rule, this action terminates the evaluation of -// the receipt rule set and, optionally, publishes a notification to Amazon -// Simple Notification Service (Amazon SNS). -// -// For information about setting a stop action in a receipt rule, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-stop.html). -type StopAction struct { - _ struct{} `type:"structure"` - - // The name of the RuleSet that is being stopped. - // - // Scope is a required field - Scope *string `type:"string" required:"true" enum:"StopScope"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the - // stop action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. - // For more information about Amazon SNS topics, see the Amazon SNS Developer - // Guide (http://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html). - TopicArn *string `type:"string"` -} - -// String returns the string representation -func (s StopAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopAction"} - if s.Scope == nil { - invalidParams.Add(request.NewErrParamRequired("Scope")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetScope sets the Scope field's value. -func (s *StopAction) SetScope(v string) *StopAction { - s.Scope = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *StopAction) SetTopicArn(v string) *StopAction { - s.TopicArn = &v - return s -} - -// The content of the email, composed of a subject line, an HTML part, and a -// text-only part. -type Template struct { - _ struct{} `type:"structure"` - - // The HTML body of the email. - HtmlPart *string `type:"string"` - - // The subject line of the email. - SubjectPart *string `type:"string"` - - // The name of the template. You will refer to this name when you send email - // using the SendTemplatedEmail or SendBulkTemplatedEmail operations. - // - // TemplateName is a required field - TemplateName *string `type:"string" required:"true"` - - // The email body that will be visible to recipients whose email clients do - // not display HTML. - TextPart *string `type:"string"` -} - -// String returns the string representation -func (s Template) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Template) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Template) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Template"} - if s.TemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHtmlPart sets the HtmlPart field's value. -func (s *Template) SetHtmlPart(v string) *Template { - s.HtmlPart = &v - return s -} - -// SetSubjectPart sets the SubjectPart field's value. -func (s *Template) SetSubjectPart(v string) *Template { - s.SubjectPart = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *Template) SetTemplateName(v string) *Template { - s.TemplateName = &v - return s -} - -// SetTextPart sets the TextPart field's value. -func (s *Template) SetTextPart(v string) *Template { - s.TextPart = &v - return s -} - -// Contains information about an email template. -type TemplateMetadata struct { - _ struct{} `type:"structure"` - - // The time and date the template was created. - CreatedTimestamp *time.Time `type:"timestamp"` - - // The name of the template. - Name *string `type:"string"` -} - -// String returns the string representation -func (s TemplateMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TemplateMetadata) GoString() string { - return s.String() -} - -// SetCreatedTimestamp sets the CreatedTimestamp field's value. -func (s *TemplateMetadata) SetCreatedTimestamp(v time.Time) *TemplateMetadata { - s.CreatedTimestamp = &v - return s -} - -// SetName sets the Name field's value. -func (s *TemplateMetadata) SetName(v string) *TemplateMetadata { - s.Name = &v - return s -} - -type TestRenderTemplateInput struct { - _ struct{} `type:"structure"` - - // A list of replacement values to apply to the template. This parameter is - // a JSON object, typically consisting of key-value pairs in which the keys - // correspond to replacement tags in the email template. - // - // TemplateData is a required field - TemplateData *string `type:"string" required:"true"` - - // The name of the template that you want to render. - // - // TemplateName is a required field - TemplateName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s TestRenderTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestRenderTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TestRenderTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TestRenderTemplateInput"} - if s.TemplateData == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateData")) - } - if s.TemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTemplateData sets the TemplateData field's value. -func (s *TestRenderTemplateInput) SetTemplateData(v string) *TestRenderTemplateInput { - s.TemplateData = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *TestRenderTemplateInput) SetTemplateName(v string) *TestRenderTemplateInput { - s.TemplateName = &v - return s -} - -type TestRenderTemplateOutput struct { - _ struct{} `type:"structure"` - - // The complete MIME message rendered by applying the data in the TemplateData - // parameter to the template specified in the TemplateName parameter. - RenderedTemplate *string `type:"string"` -} - -// String returns the string representation -func (s TestRenderTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestRenderTemplateOutput) GoString() string { - return s.String() -} - -// SetRenderedTemplate sets the RenderedTemplate field's value. -func (s *TestRenderTemplateOutput) SetRenderedTemplate(v string) *TestRenderTemplateOutput { - s.RenderedTemplate = &v - return s -} - -// A domain that is used to redirect email recipients to an Amazon SES-operated -// domain. This domain captures open and click events generated by Amazon SES -// emails. -// -// For more information, see Configuring Custom Domains to Handle Open and Click -// Tracking (ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) -// in the Amazon SES Developer Guide. -type TrackingOptions struct { - _ struct{} `type:"structure"` - - // The custom subdomain that will be used to redirect email recipients to the - // Amazon SES event tracking domain. - CustomRedirectDomain *string `type:"string"` -} - -// String returns the string representation -func (s TrackingOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TrackingOptions) GoString() string { - return s.String() -} - -// SetCustomRedirectDomain sets the CustomRedirectDomain field's value. -func (s *TrackingOptions) SetCustomRedirectDomain(v string) *TrackingOptions { - s.CustomRedirectDomain = &v - return s -} - -// Represents a request to enable or disable the email sending capabilities -// for your entire Amazon SES account. -type UpdateAccountSendingEnabledInput struct { - _ struct{} `type:"structure"` - - // Describes whether email sending is enabled or disabled for your Amazon SES - // account in the current AWS Region. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s UpdateAccountSendingEnabledInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAccountSendingEnabledInput) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *UpdateAccountSendingEnabledInput) SetEnabled(v bool) *UpdateAccountSendingEnabledInput { - s.Enabled = &v - return s -} - -type UpdateAccountSendingEnabledOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateAccountSendingEnabledOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAccountSendingEnabledOutput) GoString() string { - return s.String() -} - -// Represents a request to update the event destination of a configuration set. -// Configuration sets enable you to publish email sending events. For information -// about using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -type UpdateConfigurationSetEventDestinationInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration set that contains the event destination that - // you want to update. - // - // ConfigurationSetName is a required field - ConfigurationSetName *string `type:"string" required:"true"` - - // The event destination object that you want to apply to the specified configuration - // set. - // - // EventDestination is a required field - EventDestination *EventDestination `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateConfigurationSetEventDestinationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConfigurationSetEventDestinationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateConfigurationSetEventDestinationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateConfigurationSetEventDestinationInput"} - if s.ConfigurationSetName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) - } - if s.EventDestination == nil { - invalidParams.Add(request.NewErrParamRequired("EventDestination")) - } - if s.EventDestination != nil { - if err := s.EventDestination.Validate(); err != nil { - invalidParams.AddNested("EventDestination", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *UpdateConfigurationSetEventDestinationInput) SetConfigurationSetName(v string) *UpdateConfigurationSetEventDestinationInput { - s.ConfigurationSetName = &v - return s -} - -// SetEventDestination sets the EventDestination field's value. -func (s *UpdateConfigurationSetEventDestinationInput) SetEventDestination(v *EventDestination) *UpdateConfigurationSetEventDestinationInput { - s.EventDestination = v - return s -} - -// An empty element returned on a successful request. -type UpdateConfigurationSetEventDestinationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateConfigurationSetEventDestinationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConfigurationSetEventDestinationOutput) GoString() string { - return s.String() -} - -// Represents a request to modify the reputation metric publishing settings -// for a configuration set. -type UpdateConfigurationSetReputationMetricsEnabledInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration set that you want to update. - // - // ConfigurationSetName is a required field - ConfigurationSetName *string `type:"string" required:"true"` - - // Describes whether or not Amazon SES will publish reputation metrics for the - // configuration set, such as bounce and complaint rates, to Amazon CloudWatch. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s UpdateConfigurationSetReputationMetricsEnabledInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConfigurationSetReputationMetricsEnabledInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateConfigurationSetReputationMetricsEnabledInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateConfigurationSetReputationMetricsEnabledInput"} - if s.ConfigurationSetName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) - } - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *UpdateConfigurationSetReputationMetricsEnabledInput) SetConfigurationSetName(v string) *UpdateConfigurationSetReputationMetricsEnabledInput { - s.ConfigurationSetName = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *UpdateConfigurationSetReputationMetricsEnabledInput) SetEnabled(v bool) *UpdateConfigurationSetReputationMetricsEnabledInput { - s.Enabled = &v - return s -} - -type UpdateConfigurationSetReputationMetricsEnabledOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateConfigurationSetReputationMetricsEnabledOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConfigurationSetReputationMetricsEnabledOutput) GoString() string { - return s.String() -} - -// Represents a request to enable or disable the email sending capabilities -// for a specific configuration set. -type UpdateConfigurationSetSendingEnabledInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration set that you want to update. - // - // ConfigurationSetName is a required field - ConfigurationSetName *string `type:"string" required:"true"` - - // Describes whether email sending is enabled or disabled for the configuration - // set. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s UpdateConfigurationSetSendingEnabledInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConfigurationSetSendingEnabledInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateConfigurationSetSendingEnabledInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateConfigurationSetSendingEnabledInput"} - if s.ConfigurationSetName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) - } - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *UpdateConfigurationSetSendingEnabledInput) SetConfigurationSetName(v string) *UpdateConfigurationSetSendingEnabledInput { - s.ConfigurationSetName = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *UpdateConfigurationSetSendingEnabledInput) SetEnabled(v bool) *UpdateConfigurationSetSendingEnabledInput { - s.Enabled = &v - return s -} - -type UpdateConfigurationSetSendingEnabledOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateConfigurationSetSendingEnabledOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConfigurationSetSendingEnabledOutput) GoString() string { - return s.String() -} - -// Represents a request to update the tracking options for a configuration set. -type UpdateConfigurationSetTrackingOptionsInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration set for which you want to update the custom - // tracking domain. - // - // ConfigurationSetName is a required field - ConfigurationSetName *string `type:"string" required:"true"` - - // A domain that is used to redirect email recipients to an Amazon SES-operated - // domain. This domain captures open and click events generated by Amazon SES - // emails. - // - // For more information, see Configuring Custom Domains to Handle Open and Click - // Tracking (ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) - // in the Amazon SES Developer Guide. - // - // TrackingOptions is a required field - TrackingOptions *TrackingOptions `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateConfigurationSetTrackingOptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConfigurationSetTrackingOptionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateConfigurationSetTrackingOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateConfigurationSetTrackingOptionsInput"} - if s.ConfigurationSetName == nil { - invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) - } - if s.TrackingOptions == nil { - invalidParams.Add(request.NewErrParamRequired("TrackingOptions")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfigurationSetName sets the ConfigurationSetName field's value. -func (s *UpdateConfigurationSetTrackingOptionsInput) SetConfigurationSetName(v string) *UpdateConfigurationSetTrackingOptionsInput { - s.ConfigurationSetName = &v - return s -} - -// SetTrackingOptions sets the TrackingOptions field's value. -func (s *UpdateConfigurationSetTrackingOptionsInput) SetTrackingOptions(v *TrackingOptions) *UpdateConfigurationSetTrackingOptionsInput { - s.TrackingOptions = v - return s -} - -// An empty element returned on a successful request. -type UpdateConfigurationSetTrackingOptionsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateConfigurationSetTrackingOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateConfigurationSetTrackingOptionsOutput) GoString() string { - return s.String() -} - -// Represents a request to update an existing custom verification email template. -type UpdateCustomVerificationEmailTemplateInput struct { - _ struct{} `type:"structure"` - - // The URL that the recipient of the verification email is sent to if his or - // her address is not successfully verified. - FailureRedirectionURL *string `type:"string"` - - // The email address that the custom verification email is sent from. - FromEmailAddress *string `type:"string"` - - // The URL that the recipient of the verification email is sent to if his or - // her address is successfully verified. - SuccessRedirectionURL *string `type:"string"` - - // The content of the custom verification email. The total size of the email - // must be less than 10 MB. The message body may contain HTML, with some limitations. - // For more information, see Custom Verification Email Frequently Asked Questions - // (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html#custom-verification-emails-faq) - // in the Amazon SES Developer Guide. - TemplateContent *string `type:"string"` - - // The name of the custom verification email template that you want to update. - // - // TemplateName is a required field - TemplateName *string `type:"string" required:"true"` - - // The subject line of the custom verification email. - TemplateSubject *string `type:"string"` -} - -// String returns the string representation -func (s UpdateCustomVerificationEmailTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCustomVerificationEmailTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCustomVerificationEmailTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCustomVerificationEmailTemplateInput"} - if s.TemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("TemplateName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFailureRedirectionURL sets the FailureRedirectionURL field's value. -func (s *UpdateCustomVerificationEmailTemplateInput) SetFailureRedirectionURL(v string) *UpdateCustomVerificationEmailTemplateInput { - s.FailureRedirectionURL = &v - return s -} - -// SetFromEmailAddress sets the FromEmailAddress field's value. -func (s *UpdateCustomVerificationEmailTemplateInput) SetFromEmailAddress(v string) *UpdateCustomVerificationEmailTemplateInput { - s.FromEmailAddress = &v - return s -} - -// SetSuccessRedirectionURL sets the SuccessRedirectionURL field's value. -func (s *UpdateCustomVerificationEmailTemplateInput) SetSuccessRedirectionURL(v string) *UpdateCustomVerificationEmailTemplateInput { - s.SuccessRedirectionURL = &v - return s -} - -// SetTemplateContent sets the TemplateContent field's value. -func (s *UpdateCustomVerificationEmailTemplateInput) SetTemplateContent(v string) *UpdateCustomVerificationEmailTemplateInput { - s.TemplateContent = &v - return s -} - -// SetTemplateName sets the TemplateName field's value. -func (s *UpdateCustomVerificationEmailTemplateInput) SetTemplateName(v string) *UpdateCustomVerificationEmailTemplateInput { - s.TemplateName = &v - return s -} - -// SetTemplateSubject sets the TemplateSubject field's value. -func (s *UpdateCustomVerificationEmailTemplateInput) SetTemplateSubject(v string) *UpdateCustomVerificationEmailTemplateInput { - s.TemplateSubject = &v - return s -} - -type UpdateCustomVerificationEmailTemplateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateCustomVerificationEmailTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCustomVerificationEmailTemplateOutput) GoString() string { - return s.String() -} - -// Represents a request to update a receipt rule. You use receipt rules to receive -// email with Amazon SES. For more information, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). -type UpdateReceiptRuleInput struct { - _ struct{} `type:"structure"` - - // A data structure that contains the updated receipt rule information. - // - // Rule is a required field - Rule *ReceiptRule `type:"structure" required:"true"` - - // The name of the receipt rule set that the receipt rule belongs to. - // - // RuleSetName is a required field - RuleSetName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateReceiptRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateReceiptRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateReceiptRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateReceiptRuleInput"} - if s.Rule == nil { - invalidParams.Add(request.NewErrParamRequired("Rule")) - } - if s.RuleSetName == nil { - invalidParams.Add(request.NewErrParamRequired("RuleSetName")) - } - if s.Rule != nil { - if err := s.Rule.Validate(); err != nil { - invalidParams.AddNested("Rule", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRule sets the Rule field's value. -func (s *UpdateReceiptRuleInput) SetRule(v *ReceiptRule) *UpdateReceiptRuleInput { - s.Rule = v - return s -} - -// SetRuleSetName sets the RuleSetName field's value. -func (s *UpdateReceiptRuleInput) SetRuleSetName(v string) *UpdateReceiptRuleInput { - s.RuleSetName = &v - return s -} - -// An empty element returned on a successful request. -type UpdateReceiptRuleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateReceiptRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateReceiptRuleOutput) GoString() string { - return s.String() -} - -type UpdateTemplateInput struct { - _ struct{} `type:"structure"` - - // The content of the email, composed of a subject line, an HTML part, and a - // text-only part. - // - // Template is a required field - Template *Template `type:"structure" required:"true"` -} - -// String returns the string representation -func (s UpdateTemplateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTemplateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateTemplateInput"} - if s.Template == nil { - invalidParams.Add(request.NewErrParamRequired("Template")) - } - if s.Template != nil { - if err := s.Template.Validate(); err != nil { - invalidParams.AddNested("Template", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTemplate sets the Template field's value. -func (s *UpdateTemplateInput) SetTemplate(v *Template) *UpdateTemplateInput { - s.Template = v - return s -} - -type UpdateTemplateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateTemplateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateTemplateOutput) GoString() string { - return s.String() -} - -// Represents a request to generate the CNAME records needed to set up Easy -// DKIM with Amazon SES. For more information about setting up Easy DKIM, see -// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html). -type VerifyDomainDkimInput struct { - _ struct{} `type:"structure"` - - // The name of the domain to be verified for Easy DKIM signing. - // - // Domain is a required field - Domain *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s VerifyDomainDkimInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerifyDomainDkimInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VerifyDomainDkimInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VerifyDomainDkimInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *VerifyDomainDkimInput) SetDomain(v string) *VerifyDomainDkimInput { - s.Domain = &v - return s -} - -// Returns CNAME records that you must publish to the DNS server of your domain -// to set up Easy DKIM with Amazon SES. -type VerifyDomainDkimOutput struct { - _ struct{} `type:"structure"` - - // A set of character strings that represent the domain's identity. If the identity - // is an email address, the tokens represent the domain of that address. - // - // Using these tokens, you will need to create DNS CNAME records that point - // to DKIM public keys hosted by Amazon SES. Amazon Web Services will eventually - // detect that you have updated your DNS records; this detection process may - // take up to 72 hours. Upon successful detection, Amazon SES will be able to - // DKIM-sign emails originating from that domain. - // - // For more information about creating DNS records using DKIM tokens, go to - // the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim-dns-records.html). - // - // DkimTokens is a required field - DkimTokens []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s VerifyDomainDkimOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerifyDomainDkimOutput) GoString() string { - return s.String() -} - -// SetDkimTokens sets the DkimTokens field's value. -func (s *VerifyDomainDkimOutput) SetDkimTokens(v []*string) *VerifyDomainDkimOutput { - s.DkimTokens = v - return s -} - -// Represents a request to begin Amazon SES domain verification and to generate -// the TXT records that you must publish to the DNS server of your domain to -// complete the verification. For information about domain verification, see -// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-domains.html). -type VerifyDomainIdentityInput struct { - _ struct{} `type:"structure"` - - // The domain to be verified. - // - // Domain is a required field - Domain *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s VerifyDomainIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerifyDomainIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VerifyDomainIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VerifyDomainIdentityInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *VerifyDomainIdentityInput) SetDomain(v string) *VerifyDomainIdentityInput { - s.Domain = &v - return s -} - -// Returns a TXT record that you must publish to the DNS server of your domain -// to complete domain verification with Amazon SES. -type VerifyDomainIdentityOutput struct { - _ struct{} `type:"structure"` - - // A TXT record that you must place in the DNS settings of the domain to complete - // domain verification with Amazon SES. - // - // As Amazon SES searches for the TXT record, the domain's verification status - // is "Pending". When Amazon SES detects the record, the domain's verification - // status changes to "Success". If Amazon SES is unable to detect the record - // within 72 hours, the domain's verification status changes to "Failed." In - // that case, if you still want to verify the domain, you must restart the verification - // process from the beginning. - // - // VerificationToken is a required field - VerificationToken *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s VerifyDomainIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerifyDomainIdentityOutput) GoString() string { - return s.String() -} - -// SetVerificationToken sets the VerificationToken field's value. -func (s *VerifyDomainIdentityOutput) SetVerificationToken(v string) *VerifyDomainIdentityOutput { - s.VerificationToken = &v - return s -} - -// Represents a request to begin email address verification with Amazon SES. -// For information about email address verification, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses.html). -type VerifyEmailAddressInput struct { - _ struct{} `type:"structure"` - - // The email address to be verified. - // - // EmailAddress is a required field - EmailAddress *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s VerifyEmailAddressInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerifyEmailAddressInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VerifyEmailAddressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VerifyEmailAddressInput"} - if s.EmailAddress == nil { - invalidParams.Add(request.NewErrParamRequired("EmailAddress")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEmailAddress sets the EmailAddress field's value. -func (s *VerifyEmailAddressInput) SetEmailAddress(v string) *VerifyEmailAddressInput { - s.EmailAddress = &v - return s -} - -type VerifyEmailAddressOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s VerifyEmailAddressOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerifyEmailAddressOutput) GoString() string { - return s.String() -} - -// Represents a request to begin email address verification with Amazon SES. -// For information about email address verification, see the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses.html). -type VerifyEmailIdentityInput struct { - _ struct{} `type:"structure"` - - // The email address to be verified. - // - // EmailAddress is a required field - EmailAddress *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s VerifyEmailIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerifyEmailIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *VerifyEmailIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "VerifyEmailIdentityInput"} - if s.EmailAddress == nil { - invalidParams.Add(request.NewErrParamRequired("EmailAddress")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEmailAddress sets the EmailAddress field's value. -func (s *VerifyEmailIdentityInput) SetEmailAddress(v string) *VerifyEmailIdentityInput { - s.EmailAddress = &v - return s -} - -// An empty element returned on a successful request. -type VerifyEmailIdentityOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s VerifyEmailIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VerifyEmailIdentityOutput) GoString() string { - return s.String() -} - -// When included in a receipt rule, this action calls Amazon WorkMail and, optionally, -// publishes a notification to Amazon Simple Notification Service (Amazon SNS). -// You will typically not use this action directly because Amazon WorkMail adds -// the rule automatically during its setup procedure. -// -// For information using a receipt rule to call Amazon WorkMail, see the Amazon -// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-workmail.html). -type WorkmailAction struct { - _ struct{} `type:"structure"` - - // The ARN of the Amazon WorkMail organization. An example of an Amazon WorkMail - // organization ARN is arn:aws:workmail:us-west-2:123456789012:organization/m-68755160c4cb4e29a2b2f8fb58f359d7. - // For information about Amazon WorkMail organizations, see the Amazon WorkMail - // Administrator Guide (http://docs.aws.amazon.com/workmail/latest/adminguide/organizations_overview.html). - // - // OrganizationArn is a required field - OrganizationArn *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the - // WorkMail action is called. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. - // For more information about Amazon SNS topics, see the Amazon SNS Developer - // Guide (http://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html). - TopicArn *string `type:"string"` -} - -// String returns the string representation -func (s WorkmailAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkmailAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WorkmailAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WorkmailAction"} - if s.OrganizationArn == nil { - invalidParams.Add(request.NewErrParamRequired("OrganizationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOrganizationArn sets the OrganizationArn field's value. -func (s *WorkmailAction) SetOrganizationArn(v string) *WorkmailAction { - s.OrganizationArn = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *WorkmailAction) SetTopicArn(v string) *WorkmailAction { - s.TopicArn = &v - return s -} - -const ( - // BehaviorOnMXFailureUseDefaultValue is a BehaviorOnMXFailure enum value - BehaviorOnMXFailureUseDefaultValue = "UseDefaultValue" - - // BehaviorOnMXFailureRejectMessage is a BehaviorOnMXFailure enum value - BehaviorOnMXFailureRejectMessage = "RejectMessage" -) - -const ( - // BounceTypeDoesNotExist is a BounceType enum value - BounceTypeDoesNotExist = "DoesNotExist" - - // BounceTypeMessageTooLarge is a BounceType enum value - BounceTypeMessageTooLarge = "MessageTooLarge" - - // BounceTypeExceededQuota is a BounceType enum value - BounceTypeExceededQuota = "ExceededQuota" - - // BounceTypeContentRejected is a BounceType enum value - BounceTypeContentRejected = "ContentRejected" - - // BounceTypeUndefined is a BounceType enum value - BounceTypeUndefined = "Undefined" - - // BounceTypeTemporaryFailure is a BounceType enum value - BounceTypeTemporaryFailure = "TemporaryFailure" -) - -const ( - // BulkEmailStatusSuccess is a BulkEmailStatus enum value - BulkEmailStatusSuccess = "Success" - - // BulkEmailStatusMessageRejected is a BulkEmailStatus enum value - BulkEmailStatusMessageRejected = "MessageRejected" - - // BulkEmailStatusMailFromDomainNotVerified is a BulkEmailStatus enum value - BulkEmailStatusMailFromDomainNotVerified = "MailFromDomainNotVerified" - - // BulkEmailStatusConfigurationSetDoesNotExist is a BulkEmailStatus enum value - BulkEmailStatusConfigurationSetDoesNotExist = "ConfigurationSetDoesNotExist" - - // BulkEmailStatusTemplateDoesNotExist is a BulkEmailStatus enum value - BulkEmailStatusTemplateDoesNotExist = "TemplateDoesNotExist" - - // BulkEmailStatusAccountSuspended is a BulkEmailStatus enum value - BulkEmailStatusAccountSuspended = "AccountSuspended" - - // BulkEmailStatusAccountThrottled is a BulkEmailStatus enum value - BulkEmailStatusAccountThrottled = "AccountThrottled" - - // BulkEmailStatusAccountDailyQuotaExceeded is a BulkEmailStatus enum value - BulkEmailStatusAccountDailyQuotaExceeded = "AccountDailyQuotaExceeded" - - // BulkEmailStatusInvalidSendingPoolName is a BulkEmailStatus enum value - BulkEmailStatusInvalidSendingPoolName = "InvalidSendingPoolName" - - // BulkEmailStatusAccountSendingPaused is a BulkEmailStatus enum value - BulkEmailStatusAccountSendingPaused = "AccountSendingPaused" - - // BulkEmailStatusConfigurationSetSendingPaused is a BulkEmailStatus enum value - BulkEmailStatusConfigurationSetSendingPaused = "ConfigurationSetSendingPaused" - - // BulkEmailStatusInvalidParameterValue is a BulkEmailStatus enum value - BulkEmailStatusInvalidParameterValue = "InvalidParameterValue" - - // BulkEmailStatusTransientFailure is a BulkEmailStatus enum value - BulkEmailStatusTransientFailure = "TransientFailure" - - // BulkEmailStatusFailed is a BulkEmailStatus enum value - BulkEmailStatusFailed = "Failed" -) - -const ( - // ConfigurationSetAttributeEventDestinations is a ConfigurationSetAttribute enum value - ConfigurationSetAttributeEventDestinations = "eventDestinations" - - // ConfigurationSetAttributeTrackingOptions is a ConfigurationSetAttribute enum value - ConfigurationSetAttributeTrackingOptions = "trackingOptions" - - // ConfigurationSetAttributeReputationOptions is a ConfigurationSetAttribute enum value - ConfigurationSetAttributeReputationOptions = "reputationOptions" -) - -const ( - // CustomMailFromStatusPending is a CustomMailFromStatus enum value - CustomMailFromStatusPending = "Pending" - - // CustomMailFromStatusSuccess is a CustomMailFromStatus enum value - CustomMailFromStatusSuccess = "Success" - - // CustomMailFromStatusFailed is a CustomMailFromStatus enum value - CustomMailFromStatusFailed = "Failed" - - // CustomMailFromStatusTemporaryFailure is a CustomMailFromStatus enum value - CustomMailFromStatusTemporaryFailure = "TemporaryFailure" -) - -const ( - // DimensionValueSourceMessageTag is a DimensionValueSource enum value - DimensionValueSourceMessageTag = "messageTag" - - // DimensionValueSourceEmailHeader is a DimensionValueSource enum value - DimensionValueSourceEmailHeader = "emailHeader" - - // DimensionValueSourceLinkTag is a DimensionValueSource enum value - DimensionValueSourceLinkTag = "linkTag" -) - -const ( - // DsnActionFailed is a DsnAction enum value - DsnActionFailed = "failed" - - // DsnActionDelayed is a DsnAction enum value - DsnActionDelayed = "delayed" - - // DsnActionDelivered is a DsnAction enum value - DsnActionDelivered = "delivered" - - // DsnActionRelayed is a DsnAction enum value - DsnActionRelayed = "relayed" - - // DsnActionExpanded is a DsnAction enum value - DsnActionExpanded = "expanded" -) - -const ( - // EventTypeSend is a EventType enum value - EventTypeSend = "send" - - // EventTypeReject is a EventType enum value - EventTypeReject = "reject" - - // EventTypeBounce is a EventType enum value - EventTypeBounce = "bounce" - - // EventTypeComplaint is a EventType enum value - EventTypeComplaint = "complaint" - - // EventTypeDelivery is a EventType enum value - EventTypeDelivery = "delivery" - - // EventTypeOpen is a EventType enum value - EventTypeOpen = "open" - - // EventTypeClick is a EventType enum value - EventTypeClick = "click" - - // EventTypeRenderingFailure is a EventType enum value - EventTypeRenderingFailure = "renderingFailure" -) - -const ( - // IdentityTypeEmailAddress is a IdentityType enum value - IdentityTypeEmailAddress = "EmailAddress" - - // IdentityTypeDomain is a IdentityType enum value - IdentityTypeDomain = "Domain" -) - -const ( - // InvocationTypeEvent is a InvocationType enum value - InvocationTypeEvent = "Event" - - // InvocationTypeRequestResponse is a InvocationType enum value - InvocationTypeRequestResponse = "RequestResponse" -) - -const ( - // NotificationTypeBounce is a NotificationType enum value - NotificationTypeBounce = "Bounce" - - // NotificationTypeComplaint is a NotificationType enum value - NotificationTypeComplaint = "Complaint" - - // NotificationTypeDelivery is a NotificationType enum value - NotificationTypeDelivery = "Delivery" -) - -const ( - // ReceiptFilterPolicyBlock is a ReceiptFilterPolicy enum value - ReceiptFilterPolicyBlock = "Block" - - // ReceiptFilterPolicyAllow is a ReceiptFilterPolicy enum value - ReceiptFilterPolicyAllow = "Allow" -) - -const ( - // SNSActionEncodingUtf8 is a SNSActionEncoding enum value - SNSActionEncodingUtf8 = "UTF-8" - - // SNSActionEncodingBase64 is a SNSActionEncoding enum value - SNSActionEncodingBase64 = "Base64" -) - -const ( - // StopScopeRuleSet is a StopScope enum value - StopScopeRuleSet = "RuleSet" -) - -const ( - // TlsPolicyRequire is a TlsPolicy enum value - TlsPolicyRequire = "Require" - - // TlsPolicyOptional is a TlsPolicy enum value - TlsPolicyOptional = "Optional" -) - -const ( - // VerificationStatusPending is a VerificationStatus enum value - VerificationStatusPending = "Pending" - - // VerificationStatusSuccess is a VerificationStatus enum value - VerificationStatusSuccess = "Success" - - // VerificationStatusFailed is a VerificationStatus enum value - VerificationStatusFailed = "Failed" - - // VerificationStatusTemporaryFailure is a VerificationStatus enum value - VerificationStatusTemporaryFailure = "TemporaryFailure" - - // VerificationStatusNotStarted is a VerificationStatus enum value - VerificationStatusNotStarted = "NotStarted" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ses/doc.go deleted file mode 100644 index 6ba270a75..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/doc.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package ses provides the client and types for making API -// requests to Amazon Simple Email Service. -// -// This document contains reference information for the Amazon Simple Email -// Service (https://aws.amazon.com/ses/) (Amazon SES) API, version 2010-12-01. -// This document is best used in conjunction with the Amazon SES Developer Guide -// (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). -// -// For a list of Amazon SES endpoints to use in service requests, see Regions -// and Amazon SES (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/regions.html) -// in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01 for more information on this service. -// -// See ses package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/ses/ -// -// Using the Client -// -// To contact Amazon Simple Email Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Simple Email Service client SES for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/ses/#New -package ses diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ses/errors.go deleted file mode 100644 index dd94d6351..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/errors.go +++ /dev/null @@ -1,244 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ses - -const ( - - // ErrCodeAccountSendingPausedException for service response error code - // "AccountSendingPausedException". - // - // Indicates that email sending is disabled for your entire Amazon SES account. - // - // You can enable or disable email sending for your Amazon SES account using - // UpdateAccountSendingEnabled. - ErrCodeAccountSendingPausedException = "AccountSendingPausedException" - - // ErrCodeAlreadyExistsException for service response error code - // "AlreadyExists". - // - // Indicates that a resource could not be created because of a naming conflict. - ErrCodeAlreadyExistsException = "AlreadyExists" - - // ErrCodeCannotDeleteException for service response error code - // "CannotDelete". - // - // Indicates that the delete operation could not be completed. - ErrCodeCannotDeleteException = "CannotDelete" - - // ErrCodeConfigurationSetAlreadyExistsException for service response error code - // "ConfigurationSetAlreadyExists". - // - // Indicates that the configuration set could not be created because of a naming - // conflict. - ErrCodeConfigurationSetAlreadyExistsException = "ConfigurationSetAlreadyExists" - - // ErrCodeConfigurationSetDoesNotExistException for service response error code - // "ConfigurationSetDoesNotExist". - // - // Indicates that the configuration set does not exist. - ErrCodeConfigurationSetDoesNotExistException = "ConfigurationSetDoesNotExist" - - // ErrCodeConfigurationSetSendingPausedException for service response error code - // "ConfigurationSetSendingPausedException". - // - // Indicates that email sending is disabled for the configuration set. - // - // You can enable or disable email sending for a configuration set using UpdateConfigurationSetSendingEnabled. - ErrCodeConfigurationSetSendingPausedException = "ConfigurationSetSendingPausedException" - - // ErrCodeCustomVerificationEmailInvalidContentException for service response error code - // "CustomVerificationEmailInvalidContent". - // - // Indicates that custom verification email template provided content is invalid. - ErrCodeCustomVerificationEmailInvalidContentException = "CustomVerificationEmailInvalidContent" - - // ErrCodeCustomVerificationEmailTemplateAlreadyExistsException for service response error code - // "CustomVerificationEmailTemplateAlreadyExists". - // - // Indicates that a custom verification email template with the name you specified - // already exists. - ErrCodeCustomVerificationEmailTemplateAlreadyExistsException = "CustomVerificationEmailTemplateAlreadyExists" - - // ErrCodeCustomVerificationEmailTemplateDoesNotExistException for service response error code - // "CustomVerificationEmailTemplateDoesNotExist". - // - // Indicates that a custom verification email template with the name you specified - // does not exist. - ErrCodeCustomVerificationEmailTemplateDoesNotExistException = "CustomVerificationEmailTemplateDoesNotExist" - - // ErrCodeEventDestinationAlreadyExistsException for service response error code - // "EventDestinationAlreadyExists". - // - // Indicates that the event destination could not be created because of a naming - // conflict. - ErrCodeEventDestinationAlreadyExistsException = "EventDestinationAlreadyExists" - - // ErrCodeEventDestinationDoesNotExistException for service response error code - // "EventDestinationDoesNotExist". - // - // Indicates that the event destination does not exist. - ErrCodeEventDestinationDoesNotExistException = "EventDestinationDoesNotExist" - - // ErrCodeFromEmailAddressNotVerifiedException for service response error code - // "FromEmailAddressNotVerified". - // - // Indicates that the sender address specified for a custom verification email - // is not verified, and is therefore not eligible to send the custom verification - // email. - ErrCodeFromEmailAddressNotVerifiedException = "FromEmailAddressNotVerified" - - // ErrCodeInvalidCloudWatchDestinationException for service response error code - // "InvalidCloudWatchDestination". - // - // Indicates that the Amazon CloudWatch destination is invalid. See the error - // message for details. - ErrCodeInvalidCloudWatchDestinationException = "InvalidCloudWatchDestination" - - // ErrCodeInvalidConfigurationSetException for service response error code - // "InvalidConfigurationSet". - // - // Indicates that the configuration set is invalid. See the error message for - // details. - ErrCodeInvalidConfigurationSetException = "InvalidConfigurationSet" - - // ErrCodeInvalidFirehoseDestinationException for service response error code - // "InvalidFirehoseDestination". - // - // Indicates that the Amazon Kinesis Firehose destination is invalid. See the - // error message for details. - ErrCodeInvalidFirehoseDestinationException = "InvalidFirehoseDestination" - - // ErrCodeInvalidLambdaFunctionException for service response error code - // "InvalidLambdaFunction". - // - // Indicates that the provided AWS Lambda function is invalid, or that Amazon - // SES could not execute the provided function, possibly due to permissions - // issues. For information about giving permissions, see the Amazon SES Developer - // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). - ErrCodeInvalidLambdaFunctionException = "InvalidLambdaFunction" - - // ErrCodeInvalidPolicyException for service response error code - // "InvalidPolicy". - // - // Indicates that the provided policy is invalid. Check the error stack for - // more information about what caused the error. - ErrCodeInvalidPolicyException = "InvalidPolicy" - - // ErrCodeInvalidRenderingParameterException for service response error code - // "InvalidRenderingParameter". - // - // Indicates that one or more of the replacement values you provided is invalid. - // This error may occur when the TemplateData object contains invalid JSON. - ErrCodeInvalidRenderingParameterException = "InvalidRenderingParameter" - - // ErrCodeInvalidS3ConfigurationException for service response error code - // "InvalidS3Configuration". - // - // Indicates that the provided Amazon S3 bucket or AWS KMS encryption key is - // invalid, or that Amazon SES could not publish to the bucket, possibly due - // to permissions issues. For information about giving permissions, see the - // Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). - ErrCodeInvalidS3ConfigurationException = "InvalidS3Configuration" - - // ErrCodeInvalidSNSDestinationException for service response error code - // "InvalidSNSDestination". - // - // Indicates that the Amazon Simple Notification Service (Amazon SNS) destination - // is invalid. See the error message for details. - ErrCodeInvalidSNSDestinationException = "InvalidSNSDestination" - - // ErrCodeInvalidSnsTopicException for service response error code - // "InvalidSnsTopic". - // - // Indicates that the provided Amazon SNS topic is invalid, or that Amazon SES - // could not publish to the topic, possibly due to permissions issues. For information - // about giving permissions, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). - ErrCodeInvalidSnsTopicException = "InvalidSnsTopic" - - // ErrCodeInvalidTemplateException for service response error code - // "InvalidTemplate". - // - // Indicates that the template that you specified could not be rendered. This - // issue may occur when a template refers to a partial that does not exist. - ErrCodeInvalidTemplateException = "InvalidTemplate" - - // ErrCodeInvalidTrackingOptionsException for service response error code - // "InvalidTrackingOptions". - // - // Indicates that the custom domain to be used for open and click tracking redirects - // is invalid. This error appears most often in the following situations: - // - // * When the tracking domain you specified is not verified in Amazon SES. - // - // * When the tracking domain you specified is not a valid domain or subdomain. - ErrCodeInvalidTrackingOptionsException = "InvalidTrackingOptions" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceeded". - // - // Indicates that a resource could not be created because of service limits. - // For a list of Amazon SES limits, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html). - ErrCodeLimitExceededException = "LimitExceeded" - - // ErrCodeMailFromDomainNotVerifiedException for service response error code - // "MailFromDomainNotVerifiedException". - // - // Indicates that the message could not be sent because Amazon SES could not - // read the MX record required to use the specified MAIL FROM domain. For information - // about editing the custom MAIL FROM domain settings for an identity, see the - // Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html). - ErrCodeMailFromDomainNotVerifiedException = "MailFromDomainNotVerifiedException" - - // ErrCodeMessageRejected for service response error code - // "MessageRejected". - // - // Indicates that the action failed, and the message could not be sent. Check - // the error stack for more information about what caused the error. - ErrCodeMessageRejected = "MessageRejected" - - // ErrCodeMissingRenderingAttributeException for service response error code - // "MissingRenderingAttribute". - // - // Indicates that one or more of the replacement values for the specified template - // was not specified. Ensure that the TemplateData object contains references - // to all of the replacement tags in the specified template. - ErrCodeMissingRenderingAttributeException = "MissingRenderingAttribute" - - // ErrCodeProductionAccessNotGrantedException for service response error code - // "ProductionAccessNotGranted". - // - // Indicates that the account has not been granted production access. - ErrCodeProductionAccessNotGrantedException = "ProductionAccessNotGranted" - - // ErrCodeRuleDoesNotExistException for service response error code - // "RuleDoesNotExist". - // - // Indicates that the provided receipt rule does not exist. - ErrCodeRuleDoesNotExistException = "RuleDoesNotExist" - - // ErrCodeRuleSetDoesNotExistException for service response error code - // "RuleSetDoesNotExist". - // - // Indicates that the provided receipt rule set does not exist. - ErrCodeRuleSetDoesNotExistException = "RuleSetDoesNotExist" - - // ErrCodeTemplateDoesNotExistException for service response error code - // "TemplateDoesNotExist". - // - // Indicates that the Template object you specified does not exist in your Amazon - // SES account. - ErrCodeTemplateDoesNotExistException = "TemplateDoesNotExist" - - // ErrCodeTrackingOptionsAlreadyExistsException for service response error code - // "TrackingOptionsAlreadyExistsException". - // - // Indicates that the configuration set you specified already contains a TrackingOptions - // object. - ErrCodeTrackingOptionsAlreadyExistsException = "TrackingOptionsAlreadyExistsException" - - // ErrCodeTrackingOptionsDoesNotExistException for service response error code - // "TrackingOptionsDoesNotExistException". - // - // Indicates that the TrackingOptions object you specified does not exist. - ErrCodeTrackingOptionsDoesNotExistException = "TrackingOptionsDoesNotExistException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/service.go b/vendor/github.com/aws/aws-sdk-go/service/ses/service.go deleted file mode 100644 index 0e33b771f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/service.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ses - -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/query" -) - -// SES provides the API operation methods for making requests to -// Amazon Simple Email Service. See this package's package overview docs -// for details on the service. -// -// SES methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type SES 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 = "email" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "SES" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the SES client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a SES client from just a session. -// svc := ses.New(mySession) -// -// // Create a SES client with additional configuration -// svc := ses.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *SES { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "ses" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *SES { - svc := &SES{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2010-12-01", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a SES operation and runs any -// custom request initialization. -func (c *SES) 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/ses/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/ses/waiters.go deleted file mode 100644 index 6a78874fe..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/waiters.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ses - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilIdentityExists uses the Amazon SES API operation -// GetIdentityVerificationAttributes to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *SES) WaitUntilIdentityExists(input *GetIdentityVerificationAttributesInput) error { - return c.WaitUntilIdentityExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilIdentityExistsWithContext is an extended version of WaitUntilIdentityExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SES) WaitUntilIdentityExistsWithContext(ctx aws.Context, input *GetIdentityVerificationAttributesInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilIdentityExists", - MaxAttempts: 20, - Delay: request.ConstantWaiterDelay(3 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "VerificationAttributes.*.VerificationStatus", - Expected: "Success", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetIdentityVerificationAttributesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetIdentityVerificationAttributesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go deleted file mode 100644 index fc6ffb5d2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go +++ /dev/null @@ -1,6034 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package sfn - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateActivity = "CreateActivity" - -// CreateActivityRequest generates a "aws/request.Request" representing the -// client's request for the CreateActivity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateActivity for more information on using the CreateActivity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateActivityRequest method. -// req, resp := client.CreateActivityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/CreateActivity -func (c *SFN) CreateActivityRequest(input *CreateActivityInput) (req *request.Request, output *CreateActivityOutput) { - op := &request.Operation{ - Name: opCreateActivity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateActivityInput{} - } - - output = &CreateActivityOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateActivity API operation for AWS Step Functions. -// -// Creates an activity. An activity is a task that you write in any programming -// language and host on any machine that has access to AWS Step Functions. Activities -// must poll Step Functions using the GetActivityTask API action and respond -// using SendTask* API actions. This function lets Step Functions know the existence -// of your activity and returns an identifier for use in a state machine and -// when polling from the activity. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation CreateActivity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeActivityLimitExceeded "ActivityLimitExceeded" -// The maximum number of activities has been reached. Existing activities must -// be deleted before a new activity can be created. -// -// * ErrCodeInvalidName "InvalidName" -// The provided name is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/CreateActivity -func (c *SFN) CreateActivity(input *CreateActivityInput) (*CreateActivityOutput, error) { - req, out := c.CreateActivityRequest(input) - return out, req.Send() -} - -// CreateActivityWithContext is the same as CreateActivity with the addition of -// the ability to pass a context and additional request options. -// -// See CreateActivity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) CreateActivityWithContext(ctx aws.Context, input *CreateActivityInput, opts ...request.Option) (*CreateActivityOutput, error) { - req, out := c.CreateActivityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStateMachine = "CreateStateMachine" - -// CreateStateMachineRequest generates a "aws/request.Request" representing the -// client's request for the CreateStateMachine operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateStateMachine for more information on using the CreateStateMachine -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateStateMachineRequest method. -// req, resp := client.CreateStateMachineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/CreateStateMachine -func (c *SFN) CreateStateMachineRequest(input *CreateStateMachineInput) (req *request.Request, output *CreateStateMachineOutput) { - op := &request.Operation{ - Name: opCreateStateMachine, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateStateMachineInput{} - } - - output = &CreateStateMachineOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateStateMachine API operation for AWS Step Functions. -// -// Creates a state machine. A state machine consists of a collection of states -// that can do work (Task states), determine to which states to transition next -// (Choice states), stop an execution with an error (Fail states), and so on. -// State machines are specified using a JSON-based, structured language. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation CreateStateMachine for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// * ErrCodeInvalidDefinition "InvalidDefinition" -// The provided Amazon States Language definition is invalid. -// -// * ErrCodeInvalidName "InvalidName" -// The provided name is invalid. -// -// * ErrCodeStateMachineAlreadyExists "StateMachineAlreadyExists" -// A state machine with the same name but a different definition or role ARN -// already exists. -// -// * ErrCodeStateMachineDeleting "StateMachineDeleting" -// The specified state machine is being deleted. -// -// * ErrCodeStateMachineLimitExceeded "StateMachineLimitExceeded" -// The maximum number of state machines has been reached. Existing state machines -// must be deleted before a new state machine can be created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/CreateStateMachine -func (c *SFN) CreateStateMachine(input *CreateStateMachineInput) (*CreateStateMachineOutput, error) { - req, out := c.CreateStateMachineRequest(input) - return out, req.Send() -} - -// CreateStateMachineWithContext is the same as CreateStateMachine with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStateMachine for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) CreateStateMachineWithContext(ctx aws.Context, input *CreateStateMachineInput, opts ...request.Option) (*CreateStateMachineOutput, error) { - req, out := c.CreateStateMachineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteActivity = "DeleteActivity" - -// DeleteActivityRequest generates a "aws/request.Request" representing the -// client's request for the DeleteActivity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteActivity for more information on using the DeleteActivity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteActivityRequest method. -// req, resp := client.DeleteActivityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DeleteActivity -func (c *SFN) DeleteActivityRequest(input *DeleteActivityInput) (req *request.Request, output *DeleteActivityOutput) { - op := &request.Operation{ - Name: opDeleteActivity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteActivityInput{} - } - - output = &DeleteActivityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteActivity API operation for AWS Step Functions. -// -// Deletes an activity. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation DeleteActivity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DeleteActivity -func (c *SFN) DeleteActivity(input *DeleteActivityInput) (*DeleteActivityOutput, error) { - req, out := c.DeleteActivityRequest(input) - return out, req.Send() -} - -// DeleteActivityWithContext is the same as DeleteActivity with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteActivity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) DeleteActivityWithContext(ctx aws.Context, input *DeleteActivityInput, opts ...request.Option) (*DeleteActivityOutput, error) { - req, out := c.DeleteActivityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteStateMachine = "DeleteStateMachine" - -// DeleteStateMachineRequest generates a "aws/request.Request" representing the -// client's request for the DeleteStateMachine operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteStateMachine for more information on using the DeleteStateMachine -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteStateMachineRequest method. -// req, resp := client.DeleteStateMachineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DeleteStateMachine -func (c *SFN) DeleteStateMachineRequest(input *DeleteStateMachineInput) (req *request.Request, output *DeleteStateMachineOutput) { - op := &request.Operation{ - Name: opDeleteStateMachine, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteStateMachineInput{} - } - - output = &DeleteStateMachineOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteStateMachine API operation for AWS Step Functions. -// -// Deletes a state machine. This is an asynchronous operation: It sets the state -// machine's status to DELETING and begins the deletion process. Each state -// machine execution is deleted the next time it makes a state transition. -// -// The state machine itself is deleted after all executions are completed or -// deleted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation DeleteStateMachine for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DeleteStateMachine -func (c *SFN) DeleteStateMachine(input *DeleteStateMachineInput) (*DeleteStateMachineOutput, error) { - req, out := c.DeleteStateMachineRequest(input) - return out, req.Send() -} - -// DeleteStateMachineWithContext is the same as DeleteStateMachine with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteStateMachine for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) DeleteStateMachineWithContext(ctx aws.Context, input *DeleteStateMachineInput, opts ...request.Option) (*DeleteStateMachineOutput, error) { - req, out := c.DeleteStateMachineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeActivity = "DescribeActivity" - -// DescribeActivityRequest generates a "aws/request.Request" representing the -// client's request for the DescribeActivity operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeActivity for more information on using the DescribeActivity -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeActivityRequest method. -// req, resp := client.DescribeActivityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeActivity -func (c *SFN) DescribeActivityRequest(input *DescribeActivityInput) (req *request.Request, output *DescribeActivityOutput) { - op := &request.Operation{ - Name: opDescribeActivity, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeActivityInput{} - } - - output = &DescribeActivityOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeActivity API operation for AWS Step Functions. -// -// Describes an activity. -// -// This operation is eventually consistent. The results are best effort and -// may not reflect very recent updates and changes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation DescribeActivity for usage and error information. -// -// Returned Error Codes: -// * ErrCodeActivityDoesNotExist "ActivityDoesNotExist" -// The specified activity does not exist. -// -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeActivity -func (c *SFN) DescribeActivity(input *DescribeActivityInput) (*DescribeActivityOutput, error) { - req, out := c.DescribeActivityRequest(input) - return out, req.Send() -} - -// DescribeActivityWithContext is the same as DescribeActivity with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeActivity for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) DescribeActivityWithContext(ctx aws.Context, input *DescribeActivityInput, opts ...request.Option) (*DescribeActivityOutput, error) { - req, out := c.DescribeActivityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeExecution = "DescribeExecution" - -// DescribeExecutionRequest generates a "aws/request.Request" representing the -// client's request for the DescribeExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeExecution for more information on using the DescribeExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeExecutionRequest method. -// req, resp := client.DescribeExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeExecution -func (c *SFN) DescribeExecutionRequest(input *DescribeExecutionInput) (req *request.Request, output *DescribeExecutionOutput) { - op := &request.Operation{ - Name: opDescribeExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeExecutionInput{} - } - - output = &DescribeExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeExecution API operation for AWS Step Functions. -// -// Describes an execution. -// -// This operation is eventually consistent. The results are best effort and -// may not reflect very recent updates and changes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation DescribeExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeExecutionDoesNotExist "ExecutionDoesNotExist" -// The specified execution does not exist. -// -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeExecution -func (c *SFN) DescribeExecution(input *DescribeExecutionInput) (*DescribeExecutionOutput, error) { - req, out := c.DescribeExecutionRequest(input) - return out, req.Send() -} - -// DescribeExecutionWithContext is the same as DescribeExecution with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) DescribeExecutionWithContext(ctx aws.Context, input *DescribeExecutionInput, opts ...request.Option) (*DescribeExecutionOutput, error) { - req, out := c.DescribeExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStateMachine = "DescribeStateMachine" - -// DescribeStateMachineRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStateMachine operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStateMachine for more information on using the DescribeStateMachine -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStateMachineRequest method. -// req, resp := client.DescribeStateMachineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeStateMachine -func (c *SFN) DescribeStateMachineRequest(input *DescribeStateMachineInput) (req *request.Request, output *DescribeStateMachineOutput) { - op := &request.Operation{ - Name: opDescribeStateMachine, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStateMachineInput{} - } - - output = &DescribeStateMachineOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStateMachine API operation for AWS Step Functions. -// -// Describes a state machine. -// -// This operation is eventually consistent. The results are best effort and -// may not reflect very recent updates and changes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation DescribeStateMachine for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// * ErrCodeStateMachineDoesNotExist "StateMachineDoesNotExist" -// The specified state machine does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeStateMachine -func (c *SFN) DescribeStateMachine(input *DescribeStateMachineInput) (*DescribeStateMachineOutput, error) { - req, out := c.DescribeStateMachineRequest(input) - return out, req.Send() -} - -// DescribeStateMachineWithContext is the same as DescribeStateMachine with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStateMachine for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) DescribeStateMachineWithContext(ctx aws.Context, input *DescribeStateMachineInput, opts ...request.Option) (*DescribeStateMachineOutput, error) { - req, out := c.DescribeStateMachineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStateMachineForExecution = "DescribeStateMachineForExecution" - -// DescribeStateMachineForExecutionRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStateMachineForExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStateMachineForExecution for more information on using the DescribeStateMachineForExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStateMachineForExecutionRequest method. -// req, resp := client.DescribeStateMachineForExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeStateMachineForExecution -func (c *SFN) DescribeStateMachineForExecutionRequest(input *DescribeStateMachineForExecutionInput) (req *request.Request, output *DescribeStateMachineForExecutionOutput) { - op := &request.Operation{ - Name: opDescribeStateMachineForExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStateMachineForExecutionInput{} - } - - output = &DescribeStateMachineForExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStateMachineForExecution API operation for AWS Step Functions. -// -// Describes the state machine associated with a specific execution. -// -// This operation is eventually consistent. The results are best effort and -// may not reflect very recent updates and changes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation DescribeStateMachineForExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeExecutionDoesNotExist "ExecutionDoesNotExist" -// The specified execution does not exist. -// -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeStateMachineForExecution -func (c *SFN) DescribeStateMachineForExecution(input *DescribeStateMachineForExecutionInput) (*DescribeStateMachineForExecutionOutput, error) { - req, out := c.DescribeStateMachineForExecutionRequest(input) - return out, req.Send() -} - -// DescribeStateMachineForExecutionWithContext is the same as DescribeStateMachineForExecution with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStateMachineForExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) DescribeStateMachineForExecutionWithContext(ctx aws.Context, input *DescribeStateMachineForExecutionInput, opts ...request.Option) (*DescribeStateMachineForExecutionOutput, error) { - req, out := c.DescribeStateMachineForExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetActivityTask = "GetActivityTask" - -// GetActivityTaskRequest generates a "aws/request.Request" representing the -// client's request for the GetActivityTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetActivityTask for more information on using the GetActivityTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetActivityTaskRequest method. -// req, resp := client.GetActivityTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/GetActivityTask -func (c *SFN) GetActivityTaskRequest(input *GetActivityTaskInput) (req *request.Request, output *GetActivityTaskOutput) { - op := &request.Operation{ - Name: opGetActivityTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetActivityTaskInput{} - } - - output = &GetActivityTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetActivityTask API operation for AWS Step Functions. -// -// Used by workers to retrieve a task (with the specified activity ARN) which -// has been scheduled for execution by a running state machine. This initiates -// a long poll, where the service holds the HTTP connection open and responds -// as soon as a task becomes available (i.e. an execution of a task of this -// type is needed.) The maximum time the service holds on to the request before -// responding is 60 seconds. If no task is available within 60 seconds, the -// poll returns a taskToken with a null string. -// -// Workers should set their client side socket timeout to at least 65 seconds -// (5 seconds higher than the maximum time the service may hold the poll request). -// -// Polling with GetActivityTask can cause latency in some implementations. See -// Avoid Latency When Polling for Activity Tasks (http://docs.aws.amazon.com/step-functions/latest/dg/bp-activity-pollers.html) -// in the Step Functions Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation GetActivityTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeActivityDoesNotExist "ActivityDoesNotExist" -// The specified activity does not exist. -// -// * ErrCodeActivityWorkerLimitExceeded "ActivityWorkerLimitExceeded" -// The maximum number of workers concurrently polling for activity tasks has -// been reached. -// -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/GetActivityTask -func (c *SFN) GetActivityTask(input *GetActivityTaskInput) (*GetActivityTaskOutput, error) { - req, out := c.GetActivityTaskRequest(input) - return out, req.Send() -} - -// GetActivityTaskWithContext is the same as GetActivityTask with the addition of -// the ability to pass a context and additional request options. -// -// See GetActivityTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) GetActivityTaskWithContext(ctx aws.Context, input *GetActivityTaskInput, opts ...request.Option) (*GetActivityTaskOutput, error) { - req, out := c.GetActivityTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetExecutionHistory = "GetExecutionHistory" - -// GetExecutionHistoryRequest generates a "aws/request.Request" representing the -// client's request for the GetExecutionHistory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetExecutionHistory for more information on using the GetExecutionHistory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetExecutionHistoryRequest method. -// req, resp := client.GetExecutionHistoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/GetExecutionHistory -func (c *SFN) GetExecutionHistoryRequest(input *GetExecutionHistoryInput) (req *request.Request, output *GetExecutionHistoryOutput) { - op := &request.Operation{ - Name: opGetExecutionHistory, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetExecutionHistoryInput{} - } - - output = &GetExecutionHistoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetExecutionHistory API operation for AWS Step Functions. -// -// Returns the history of the specified execution as a list of events. By default, -// the results are returned in ascending order of the timeStamp of the events. -// Use the reverseOrder parameter to get the latest events first. -// -// If nextToken is returned, there are more results available. The value of -// nextToken is a unique pagination token for each page. Make the call again -// using the returned token to retrieve the next page. Keep all other arguments -// unchanged. Each pagination token expires after 24 hours. Using an expired -// pagination token will return an HTTP 400 InvalidToken error. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation GetExecutionHistory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeExecutionDoesNotExist "ExecutionDoesNotExist" -// The specified execution does not exist. -// -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// * ErrCodeInvalidToken "InvalidToken" -// The provided token is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/GetExecutionHistory -func (c *SFN) GetExecutionHistory(input *GetExecutionHistoryInput) (*GetExecutionHistoryOutput, error) { - req, out := c.GetExecutionHistoryRequest(input) - return out, req.Send() -} - -// GetExecutionHistoryWithContext is the same as GetExecutionHistory with the addition of -// the ability to pass a context and additional request options. -// -// See GetExecutionHistory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) GetExecutionHistoryWithContext(ctx aws.Context, input *GetExecutionHistoryInput, opts ...request.Option) (*GetExecutionHistoryOutput, error) { - req, out := c.GetExecutionHistoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetExecutionHistoryPages iterates over the pages of a GetExecutionHistory operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetExecutionHistory 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 GetExecutionHistory operation. -// pageNum := 0 -// err := client.GetExecutionHistoryPages(params, -// func(page *GetExecutionHistoryOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SFN) GetExecutionHistoryPages(input *GetExecutionHistoryInput, fn func(*GetExecutionHistoryOutput, bool) bool) error { - return c.GetExecutionHistoryPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetExecutionHistoryPagesWithContext same as GetExecutionHistoryPages 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 *SFN) GetExecutionHistoryPagesWithContext(ctx aws.Context, input *GetExecutionHistoryInput, fn func(*GetExecutionHistoryOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetExecutionHistoryInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetExecutionHistoryRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetExecutionHistoryOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListActivities = "ListActivities" - -// ListActivitiesRequest generates a "aws/request.Request" representing the -// client's request for the ListActivities operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListActivities for more information on using the ListActivities -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListActivitiesRequest method. -// req, resp := client.ListActivitiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListActivities -func (c *SFN) ListActivitiesRequest(input *ListActivitiesInput) (req *request.Request, output *ListActivitiesOutput) { - op := &request.Operation{ - Name: opListActivities, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListActivitiesInput{} - } - - output = &ListActivitiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListActivities API operation for AWS Step Functions. -// -// Lists the existing activities. -// -// If nextToken is returned, there are more results available. The value of -// nextToken is a unique pagination token for each page. Make the call again -// using the returned token to retrieve the next page. Keep all other arguments -// unchanged. Each pagination token expires after 24 hours. Using an expired -// pagination token will return an HTTP 400 InvalidToken error. -// -// This operation is eventually consistent. The results are best effort and -// may not reflect very recent updates and changes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation ListActivities for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidToken "InvalidToken" -// The provided token is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListActivities -func (c *SFN) ListActivities(input *ListActivitiesInput) (*ListActivitiesOutput, error) { - req, out := c.ListActivitiesRequest(input) - return out, req.Send() -} - -// ListActivitiesWithContext is the same as ListActivities with the addition of -// the ability to pass a context and additional request options. -// -// See ListActivities for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) ListActivitiesWithContext(ctx aws.Context, input *ListActivitiesInput, opts ...request.Option) (*ListActivitiesOutput, error) { - req, out := c.ListActivitiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListActivitiesPages iterates over the pages of a ListActivities operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListActivities 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 ListActivities operation. -// pageNum := 0 -// err := client.ListActivitiesPages(params, -// func(page *ListActivitiesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SFN) ListActivitiesPages(input *ListActivitiesInput, fn func(*ListActivitiesOutput, bool) bool) error { - return c.ListActivitiesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListActivitiesPagesWithContext same as ListActivitiesPages 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 *SFN) ListActivitiesPagesWithContext(ctx aws.Context, input *ListActivitiesInput, fn func(*ListActivitiesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListActivitiesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListActivitiesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListActivitiesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListExecutions = "ListExecutions" - -// ListExecutionsRequest generates a "aws/request.Request" representing the -// client's request for the ListExecutions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListExecutions for more information on using the ListExecutions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListExecutionsRequest method. -// req, resp := client.ListExecutionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListExecutions -func (c *SFN) ListExecutionsRequest(input *ListExecutionsInput) (req *request.Request, output *ListExecutionsOutput) { - op := &request.Operation{ - Name: opListExecutions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListExecutionsInput{} - } - - output = &ListExecutionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListExecutions API operation for AWS Step Functions. -// -// Lists the executions of a state machine that meet the filtering criteria. -// Results are sorted by time, with the most recent execution first. -// -// If nextToken is returned, there are more results available. The value of -// nextToken is a unique pagination token for each page. Make the call again -// using the returned token to retrieve the next page. Keep all other arguments -// unchanged. Each pagination token expires after 24 hours. Using an expired -// pagination token will return an HTTP 400 InvalidToken error. -// -// This operation is eventually consistent. The results are best effort and -// may not reflect very recent updates and changes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation ListExecutions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// * ErrCodeInvalidToken "InvalidToken" -// The provided token is invalid. -// -// * ErrCodeStateMachineDoesNotExist "StateMachineDoesNotExist" -// The specified state machine does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListExecutions -func (c *SFN) ListExecutions(input *ListExecutionsInput) (*ListExecutionsOutput, error) { - req, out := c.ListExecutionsRequest(input) - return out, req.Send() -} - -// ListExecutionsWithContext is the same as ListExecutions with the addition of -// the ability to pass a context and additional request options. -// -// See ListExecutions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) ListExecutionsWithContext(ctx aws.Context, input *ListExecutionsInput, opts ...request.Option) (*ListExecutionsOutput, error) { - req, out := c.ListExecutionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListExecutionsPages iterates over the pages of a ListExecutions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListExecutions 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 ListExecutions operation. -// pageNum := 0 -// err := client.ListExecutionsPages(params, -// func(page *ListExecutionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SFN) ListExecutionsPages(input *ListExecutionsInput, fn func(*ListExecutionsOutput, bool) bool) error { - return c.ListExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListExecutionsPagesWithContext same as ListExecutionsPages 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 *SFN) ListExecutionsPagesWithContext(ctx aws.Context, input *ListExecutionsInput, fn func(*ListExecutionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListExecutionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListExecutionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListExecutionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListStateMachines = "ListStateMachines" - -// ListStateMachinesRequest generates a "aws/request.Request" representing the -// client's request for the ListStateMachines operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListStateMachines for more information on using the ListStateMachines -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListStateMachinesRequest method. -// req, resp := client.ListStateMachinesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListStateMachines -func (c *SFN) ListStateMachinesRequest(input *ListStateMachinesInput) (req *request.Request, output *ListStateMachinesOutput) { - op := &request.Operation{ - Name: opListStateMachines, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListStateMachinesInput{} - } - - output = &ListStateMachinesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListStateMachines API operation for AWS Step Functions. -// -// Lists the existing state machines. -// -// If nextToken is returned, there are more results available. The value of -// nextToken is a unique pagination token for each page. Make the call again -// using the returned token to retrieve the next page. Keep all other arguments -// unchanged. Each pagination token expires after 24 hours. Using an expired -// pagination token will return an HTTP 400 InvalidToken error. -// -// This operation is eventually consistent. The results are best effort and -// may not reflect very recent updates and changes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation ListStateMachines for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidToken "InvalidToken" -// The provided token is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListStateMachines -func (c *SFN) ListStateMachines(input *ListStateMachinesInput) (*ListStateMachinesOutput, error) { - req, out := c.ListStateMachinesRequest(input) - return out, req.Send() -} - -// ListStateMachinesWithContext is the same as ListStateMachines with the addition of -// the ability to pass a context and additional request options. -// -// See ListStateMachines for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) ListStateMachinesWithContext(ctx aws.Context, input *ListStateMachinesInput, opts ...request.Option) (*ListStateMachinesOutput, error) { - req, out := c.ListStateMachinesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListStateMachinesPages iterates over the pages of a ListStateMachines operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListStateMachines 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 ListStateMachines operation. -// pageNum := 0 -// err := client.ListStateMachinesPages(params, -// func(page *ListStateMachinesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SFN) ListStateMachinesPages(input *ListStateMachinesInput, fn func(*ListStateMachinesOutput, bool) bool) error { - return c.ListStateMachinesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListStateMachinesPagesWithContext same as ListStateMachinesPages 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 *SFN) ListStateMachinesPagesWithContext(ctx aws.Context, input *ListStateMachinesInput, fn func(*ListStateMachinesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListStateMachinesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListStateMachinesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStateMachinesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTagsForResource = "ListTagsForResource" - -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the 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/states-2016-11-23/ListTagsForResource -func (c *SFN) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for AWS Step Functions. -// -// List tags for a given resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// * ErrCodeResourceNotFound "ResourceNotFound" -// Could not fine the referenced resource. Only state machine and activity ARNs -// are supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListTagsForResource -func (c *SFN) 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 *SFN) 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 opSendTaskFailure = "SendTaskFailure" - -// SendTaskFailureRequest generates a "aws/request.Request" representing the -// client's request for the SendTaskFailure operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendTaskFailure for more information on using the SendTaskFailure -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendTaskFailureRequest method. -// req, resp := client.SendTaskFailureRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/SendTaskFailure -func (c *SFN) SendTaskFailureRequest(input *SendTaskFailureInput) (req *request.Request, output *SendTaskFailureOutput) { - op := &request.Operation{ - Name: opSendTaskFailure, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SendTaskFailureInput{} - } - - output = &SendTaskFailureOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SendTaskFailure API operation for AWS Step Functions. -// -// Used by workers to report that the task identified by the taskToken failed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation SendTaskFailure for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTaskDoesNotExist "TaskDoesNotExist" -// -// * ErrCodeInvalidToken "InvalidToken" -// The provided token is invalid. -// -// * ErrCodeTaskTimedOut "TaskTimedOut" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/SendTaskFailure -func (c *SFN) SendTaskFailure(input *SendTaskFailureInput) (*SendTaskFailureOutput, error) { - req, out := c.SendTaskFailureRequest(input) - return out, req.Send() -} - -// SendTaskFailureWithContext is the same as SendTaskFailure with the addition of -// the ability to pass a context and additional request options. -// -// See SendTaskFailure for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) SendTaskFailureWithContext(ctx aws.Context, input *SendTaskFailureInput, opts ...request.Option) (*SendTaskFailureOutput, error) { - req, out := c.SendTaskFailureRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSendTaskHeartbeat = "SendTaskHeartbeat" - -// SendTaskHeartbeatRequest generates a "aws/request.Request" representing the -// client's request for the SendTaskHeartbeat operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendTaskHeartbeat for more information on using the SendTaskHeartbeat -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendTaskHeartbeatRequest method. -// req, resp := client.SendTaskHeartbeatRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/SendTaskHeartbeat -func (c *SFN) SendTaskHeartbeatRequest(input *SendTaskHeartbeatInput) (req *request.Request, output *SendTaskHeartbeatOutput) { - op := &request.Operation{ - Name: opSendTaskHeartbeat, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SendTaskHeartbeatInput{} - } - - output = &SendTaskHeartbeatOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SendTaskHeartbeat API operation for AWS Step Functions. -// -// Used by workers to report to the service that the task represented by the -// specified taskToken is still making progress. This action resets the Heartbeat -// clock. The Heartbeat threshold is specified in the state machine's Amazon -// States Language definition. This action does not in itself create an event -// in the execution history. However, if the task times out, the execution history -// contains an ActivityTimedOut event. -// -// The Timeout of a task, defined in the state machine's Amazon States Language -// definition, is its maximum allowed duration, regardless of the number of -// SendTaskHeartbeat requests received. -// -// This operation is only useful for long-lived tasks to report the liveliness -// of the task. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation SendTaskHeartbeat for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTaskDoesNotExist "TaskDoesNotExist" -// -// * ErrCodeInvalidToken "InvalidToken" -// The provided token is invalid. -// -// * ErrCodeTaskTimedOut "TaskTimedOut" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/SendTaskHeartbeat -func (c *SFN) SendTaskHeartbeat(input *SendTaskHeartbeatInput) (*SendTaskHeartbeatOutput, error) { - req, out := c.SendTaskHeartbeatRequest(input) - return out, req.Send() -} - -// SendTaskHeartbeatWithContext is the same as SendTaskHeartbeat with the addition of -// the ability to pass a context and additional request options. -// -// See SendTaskHeartbeat for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) SendTaskHeartbeatWithContext(ctx aws.Context, input *SendTaskHeartbeatInput, opts ...request.Option) (*SendTaskHeartbeatOutput, error) { - req, out := c.SendTaskHeartbeatRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSendTaskSuccess = "SendTaskSuccess" - -// SendTaskSuccessRequest generates a "aws/request.Request" representing the -// client's request for the SendTaskSuccess operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendTaskSuccess for more information on using the SendTaskSuccess -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendTaskSuccessRequest method. -// req, resp := client.SendTaskSuccessRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/SendTaskSuccess -func (c *SFN) SendTaskSuccessRequest(input *SendTaskSuccessInput) (req *request.Request, output *SendTaskSuccessOutput) { - op := &request.Operation{ - Name: opSendTaskSuccess, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SendTaskSuccessInput{} - } - - output = &SendTaskSuccessOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SendTaskSuccess API operation for AWS Step Functions. -// -// Used by workers to report that the task identified by the taskToken completed -// successfully. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation SendTaskSuccess for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTaskDoesNotExist "TaskDoesNotExist" -// -// * ErrCodeInvalidOutput "InvalidOutput" -// The provided JSON output data is invalid. -// -// * ErrCodeInvalidToken "InvalidToken" -// The provided token is invalid. -// -// * ErrCodeTaskTimedOut "TaskTimedOut" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/SendTaskSuccess -func (c *SFN) SendTaskSuccess(input *SendTaskSuccessInput) (*SendTaskSuccessOutput, error) { - req, out := c.SendTaskSuccessRequest(input) - return out, req.Send() -} - -// SendTaskSuccessWithContext is the same as SendTaskSuccess with the addition of -// the ability to pass a context and additional request options. -// -// See SendTaskSuccess for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) SendTaskSuccessWithContext(ctx aws.Context, input *SendTaskSuccessInput, opts ...request.Option) (*SendTaskSuccessOutput, error) { - req, out := c.SendTaskSuccessRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartExecution = "StartExecution" - -// StartExecutionRequest generates a "aws/request.Request" representing the -// client's request for the StartExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartExecution for more information on using the StartExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartExecutionRequest method. -// req, resp := client.StartExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/StartExecution -func (c *SFN) StartExecutionRequest(input *StartExecutionInput) (req *request.Request, output *StartExecutionOutput) { - op := &request.Operation{ - Name: opStartExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartExecutionInput{} - } - - output = &StartExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartExecution API operation for AWS Step Functions. -// -// Starts a state machine execution. -// -// StartExecution is idempotent. If StartExecution is called with the same name -// and input as a running execution, the call will succeed and return the same -// response as the original request. If the execution is closed or if the input -// is different, it will return a 400 ExecutionAlreadyExists error. Names can -// be reused after 90 days. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation StartExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeExecutionLimitExceeded "ExecutionLimitExceeded" -// The maximum number of running executions has been reached. Running executions -// must end or be stopped before a new execution can be started. -// -// * ErrCodeExecutionAlreadyExists "ExecutionAlreadyExists" -// The execution has the same name as another execution (but a different input). -// -// Executions with the same name and input are considered idempotent. -// -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// * ErrCodeInvalidExecutionInput "InvalidExecutionInput" -// The provided JSON input data is invalid. -// -// * ErrCodeInvalidName "InvalidName" -// The provided name is invalid. -// -// * ErrCodeStateMachineDoesNotExist "StateMachineDoesNotExist" -// The specified state machine does not exist. -// -// * ErrCodeStateMachineDeleting "StateMachineDeleting" -// The specified state machine is being deleted. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/StartExecution -func (c *SFN) StartExecution(input *StartExecutionInput) (*StartExecutionOutput, error) { - req, out := c.StartExecutionRequest(input) - return out, req.Send() -} - -// StartExecutionWithContext is the same as StartExecution with the addition of -// the ability to pass a context and additional request options. -// -// See StartExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) StartExecutionWithContext(ctx aws.Context, input *StartExecutionInput, opts ...request.Option) (*StartExecutionOutput, error) { - req, out := c.StartExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopExecution = "StopExecution" - -// StopExecutionRequest generates a "aws/request.Request" representing the -// client's request for the StopExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopExecution for more information on using the StopExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopExecutionRequest method. -// req, resp := client.StopExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/StopExecution -func (c *SFN) StopExecutionRequest(input *StopExecutionInput) (req *request.Request, output *StopExecutionOutput) { - op := &request.Operation{ - Name: opStopExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopExecutionInput{} - } - - output = &StopExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopExecution API operation for AWS Step Functions. -// -// Stops an execution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation StopExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeExecutionDoesNotExist "ExecutionDoesNotExist" -// The specified execution does not exist. -// -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/StopExecution -func (c *SFN) StopExecution(input *StopExecutionInput) (*StopExecutionOutput, error) { - req, out := c.StopExecutionRequest(input) - return out, req.Send() -} - -// StopExecutionWithContext is the same as StopExecution with the addition of -// the ability to pass a context and additional request options. -// -// See StopExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) StopExecutionWithContext(ctx aws.Context, input *StopExecutionInput, opts ...request.Option) (*StopExecutionOutput, error) { - req, out := c.StopExecutionRequest(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/states-2016-11-23/TagResource -func (c *SFN) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for AWS Step Functions. -// -// Add a tag to a Step Functions 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 Step Functions's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// * ErrCodeResourceNotFound "ResourceNotFound" -// Could not fine the referenced resource. Only state machine and activity ARNs -// are supported. -// -// * ErrCodeTooManyTags "TooManyTags" -// You've exceeded the number of tags allowed for a resource. See the Limits -// Topic (http://docs.aws.amazon.com/step-functions/latest/dg/limits.html) in -// the AWS Step Functions Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/TagResource -func (c *SFN) 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 *SFN) 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/states-2016-11-23/UntagResource -func (c *SFN) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for AWS Step Functions. -// -// Remove a tag from a Step Functions 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 Step Functions's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// * ErrCodeResourceNotFound "ResourceNotFound" -// Could not fine the referenced resource. Only state machine and activity ARNs -// are supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/UntagResource -func (c *SFN) 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 *SFN) 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 opUpdateStateMachine = "UpdateStateMachine" - -// UpdateStateMachineRequest generates a "aws/request.Request" representing the -// client's request for the UpdateStateMachine operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateStateMachine for more information on using the UpdateStateMachine -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateStateMachineRequest method. -// req, resp := client.UpdateStateMachineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/UpdateStateMachine -func (c *SFN) UpdateStateMachineRequest(input *UpdateStateMachineInput) (req *request.Request, output *UpdateStateMachineOutput) { - op := &request.Operation{ - Name: opUpdateStateMachine, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateStateMachineInput{} - } - - output = &UpdateStateMachineOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateStateMachine API operation for AWS Step Functions. -// -// Updates an existing state machine by modifying its definition and/or roleArn. -// Running executions will continue to use the previous definition and roleArn. -// You must include at least one of definition or roleArn or you will receive -// a MissingRequiredParameter error. -// -// All StartExecution calls within a few seconds will use the updated definition -// and roleArn. Executions started immediately after calling UpdateStateMachine -// may use the previous state machine definition and roleArn. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Step Functions's -// API operation UpdateStateMachine for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArn "InvalidArn" -// The provided Amazon Resource Name (ARN) is invalid. -// -// * ErrCodeInvalidDefinition "InvalidDefinition" -// The provided Amazon States Language definition is invalid. -// -// * ErrCodeMissingRequiredParameter "MissingRequiredParameter" -// Request is missing a required parameter. This error occurs if both definition -// and roleArn are not specified. -// -// * ErrCodeStateMachineDeleting "StateMachineDeleting" -// The specified state machine is being deleted. -// -// * ErrCodeStateMachineDoesNotExist "StateMachineDoesNotExist" -// The specified state machine does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/UpdateStateMachine -func (c *SFN) UpdateStateMachine(input *UpdateStateMachineInput) (*UpdateStateMachineOutput, error) { - req, out := c.UpdateStateMachineRequest(input) - return out, req.Send() -} - -// UpdateStateMachineWithContext is the same as UpdateStateMachine with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateStateMachine for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SFN) UpdateStateMachineWithContext(ctx aws.Context, input *UpdateStateMachineInput, opts ...request.Option) (*UpdateStateMachineOutput, error) { - req, out := c.UpdateStateMachineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Contains details about an activity that failed during an execution. -type ActivityFailedEventDetails struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s ActivityFailedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityFailedEventDetails) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *ActivityFailedEventDetails) SetCause(v string) *ActivityFailedEventDetails { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *ActivityFailedEventDetails) SetError(v string) *ActivityFailedEventDetails { - s.Error = &v - return s -} - -// Contains details about an activity. -type ActivityListItem struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that identifies the activity. - // - // ActivityArn is a required field - ActivityArn *string `locationName:"activityArn" min:"1" type:"string" required:"true"` - - // The date the activity is created. - // - // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` - - // The name of the activity. - // - // A name must not contain: - // - // * whitespace - // - // * brackets < > { } [ ] - // - // * wildcard characters ? * - // - // * special characters " # % \ ^ | ~ ` $ & , ; : / - // - // * control characters (U+0000-001F, U+007F-009F) - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ActivityListItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityListItem) GoString() string { - return s.String() -} - -// SetActivityArn sets the ActivityArn field's value. -func (s *ActivityListItem) SetActivityArn(v string) *ActivityListItem { - s.ActivityArn = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *ActivityListItem) SetCreationDate(v time.Time) *ActivityListItem { - s.CreationDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *ActivityListItem) SetName(v string) *ActivityListItem { - s.Name = &v - return s -} - -// Contains details about an activity schedule failure that occurred during -// an execution. -type ActivityScheduleFailedEventDetails struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s ActivityScheduleFailedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityScheduleFailedEventDetails) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *ActivityScheduleFailedEventDetails) SetCause(v string) *ActivityScheduleFailedEventDetails { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *ActivityScheduleFailedEventDetails) SetError(v string) *ActivityScheduleFailedEventDetails { - s.Error = &v - return s -} - -// Contains details about an activity scheduled during an execution. -type ActivityScheduledEventDetails struct { - _ struct{} `type:"structure"` - - // The maximum allowed duration between two heartbeats for the activity task. - HeartbeatInSeconds *int64 `locationName:"heartbeatInSeconds" type:"long"` - - // The JSON data input to the activity task. - Input *string `locationName:"input" type:"string" sensitive:"true"` - - // The Amazon Resource Name (ARN) of the scheduled activity. - // - // Resource is a required field - Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - - // The maximum allowed duration of the activity task. - TimeoutInSeconds *int64 `locationName:"timeoutInSeconds" type:"long"` -} - -// String returns the string representation -func (s ActivityScheduledEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityScheduledEventDetails) GoString() string { - return s.String() -} - -// SetHeartbeatInSeconds sets the HeartbeatInSeconds field's value. -func (s *ActivityScheduledEventDetails) SetHeartbeatInSeconds(v int64) *ActivityScheduledEventDetails { - s.HeartbeatInSeconds = &v - return s -} - -// SetInput sets the Input field's value. -func (s *ActivityScheduledEventDetails) SetInput(v string) *ActivityScheduledEventDetails { - s.Input = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *ActivityScheduledEventDetails) SetResource(v string) *ActivityScheduledEventDetails { - s.Resource = &v - return s -} - -// SetTimeoutInSeconds sets the TimeoutInSeconds field's value. -func (s *ActivityScheduledEventDetails) SetTimeoutInSeconds(v int64) *ActivityScheduledEventDetails { - s.TimeoutInSeconds = &v - return s -} - -// Contains details about the start of an activity during an execution. -type ActivityStartedEventDetails struct { - _ struct{} `type:"structure"` - - // The name of the worker that the task is assigned to. These names are provided - // by the workers when calling GetActivityTask. - WorkerName *string `locationName:"workerName" type:"string"` -} - -// String returns the string representation -func (s ActivityStartedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityStartedEventDetails) GoString() string { - return s.String() -} - -// SetWorkerName sets the WorkerName field's value. -func (s *ActivityStartedEventDetails) SetWorkerName(v string) *ActivityStartedEventDetails { - s.WorkerName = &v - return s -} - -// Contains details about an activity that successfully terminated during an -// execution. -type ActivitySucceededEventDetails struct { - _ struct{} `type:"structure"` - - // The JSON data output by the activity task. - Output *string `locationName:"output" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s ActivitySucceededEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivitySucceededEventDetails) GoString() string { - return s.String() -} - -// SetOutput sets the Output field's value. -func (s *ActivitySucceededEventDetails) SetOutput(v string) *ActivitySucceededEventDetails { - s.Output = &v - return s -} - -// Contains details about an activity timeout that occurred during an execution. -type ActivityTimedOutEventDetails struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the timeout. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s ActivityTimedOutEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityTimedOutEventDetails) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *ActivityTimedOutEventDetails) SetCause(v string) *ActivityTimedOutEventDetails { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *ActivityTimedOutEventDetails) SetError(v string) *ActivityTimedOutEventDetails { - s.Error = &v - return s -} - -type CreateActivityInput struct { - _ struct{} `type:"structure"` - - // The name of the activity to create. This name must be unique for your AWS - // account and region for 90 days. For more information, see Limits Related - // to State Machine Executions (http://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions) - // in the AWS Step Functions Developer Guide. - // - // A name must not contain: - // - // * whitespace - // - // * brackets < > { } [ ] - // - // * wildcard characters ? * - // - // * special characters " # % \ ^ | ~ ` $ & , ; : / - // - // * control characters (U+0000-001F, U+007F-009F) - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateActivityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateActivityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateActivityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateActivityInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *CreateActivityInput) SetName(v string) *CreateActivityInput { - s.Name = &v - return s -} - -type CreateActivityOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that identifies the created activity. - // - // ActivityArn is a required field - ActivityArn *string `locationName:"activityArn" min:"1" type:"string" required:"true"` - - // The date the activity is created. - // - // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s CreateActivityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateActivityOutput) GoString() string { - return s.String() -} - -// SetActivityArn sets the ActivityArn field's value. -func (s *CreateActivityOutput) SetActivityArn(v string) *CreateActivityOutput { - s.ActivityArn = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *CreateActivityOutput) SetCreationDate(v time.Time) *CreateActivityOutput { - s.CreationDate = &v - return s -} - -type CreateStateMachineInput struct { - _ struct{} `type:"structure"` - - // The Amazon States Language definition of the state machine. See Amazon States - // Language (http://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html). - // - // Definition is a required field - Definition *string `locationName:"definition" min:"1" type:"string" required:"true" sensitive:"true"` - - // The name of the state machine. - // - // A name must not contain: - // - // * whitespace - // - // * brackets < > { } [ ] - // - // * wildcard characters ? * - // - // * special characters " # % \ ^ | ~ ` $ & , ; : / - // - // * control characters (U+0000-001F, U+007F-009F) - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM role to use for this state machine. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateStateMachineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStateMachineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStateMachineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStateMachineInput"} - if s.Definition == nil { - invalidParams.Add(request.NewErrParamRequired("Definition")) - } - if s.Definition != nil && len(*s.Definition) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Definition", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.RoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RoleArn")) - } - if s.RoleArn != nil && len(*s.RoleArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefinition sets the Definition field's value. -func (s *CreateStateMachineInput) SetDefinition(v string) *CreateStateMachineInput { - s.Definition = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateStateMachineInput) SetName(v string) *CreateStateMachineInput { - s.Name = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *CreateStateMachineInput) SetRoleArn(v string) *CreateStateMachineInput { - s.RoleArn = &v - return s -} - -type CreateStateMachineOutput struct { - _ struct{} `type:"structure"` - - // The date the state machine is created. - // - // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` - - // The Amazon Resource Name (ARN) that identifies the created state machine. - // - // StateMachineArn is a required field - StateMachineArn *string `locationName:"stateMachineArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateStateMachineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStateMachineOutput) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *CreateStateMachineOutput) SetCreationDate(v time.Time) *CreateStateMachineOutput { - s.CreationDate = &v - return s -} - -// SetStateMachineArn sets the StateMachineArn field's value. -func (s *CreateStateMachineOutput) SetStateMachineArn(v string) *CreateStateMachineOutput { - s.StateMachineArn = &v - return s -} - -type DeleteActivityInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the activity to delete. - // - // ActivityArn is a required field - ActivityArn *string `locationName:"activityArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteActivityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteActivityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteActivityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteActivityInput"} - if s.ActivityArn == nil { - invalidParams.Add(request.NewErrParamRequired("ActivityArn")) - } - if s.ActivityArn != nil && len(*s.ActivityArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ActivityArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivityArn sets the ActivityArn field's value. -func (s *DeleteActivityInput) SetActivityArn(v string) *DeleteActivityInput { - s.ActivityArn = &v - return s -} - -type DeleteActivityOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteActivityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteActivityOutput) GoString() string { - return s.String() -} - -type DeleteStateMachineInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the state machine to delete. - // - // StateMachineArn is a required field - StateMachineArn *string `locationName:"stateMachineArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteStateMachineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStateMachineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteStateMachineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteStateMachineInput"} - if s.StateMachineArn == nil { - invalidParams.Add(request.NewErrParamRequired("StateMachineArn")) - } - if s.StateMachineArn != nil && len(*s.StateMachineArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StateMachineArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStateMachineArn sets the StateMachineArn field's value. -func (s *DeleteStateMachineInput) SetStateMachineArn(v string) *DeleteStateMachineInput { - s.StateMachineArn = &v - return s -} - -type DeleteStateMachineOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteStateMachineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStateMachineOutput) GoString() string { - return s.String() -} - -type DescribeActivityInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the activity to describe. - // - // ActivityArn is a required field - ActivityArn *string `locationName:"activityArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeActivityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeActivityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeActivityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeActivityInput"} - if s.ActivityArn == nil { - invalidParams.Add(request.NewErrParamRequired("ActivityArn")) - } - if s.ActivityArn != nil && len(*s.ActivityArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ActivityArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivityArn sets the ActivityArn field's value. -func (s *DescribeActivityInput) SetActivityArn(v string) *DescribeActivityInput { - s.ActivityArn = &v - return s -} - -type DescribeActivityOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that identifies the activity. - // - // ActivityArn is a required field - ActivityArn *string `locationName:"activityArn" min:"1" type:"string" required:"true"` - - // The date the activity is created. - // - // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` - - // The name of the activity. - // - // A name must not contain: - // - // * whitespace - // - // * brackets < > { } [ ] - // - // * wildcard characters ? * - // - // * special characters " # % \ ^ | ~ ` $ & , ; : / - // - // * control characters (U+0000-001F, U+007F-009F) - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeActivityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeActivityOutput) GoString() string { - return s.String() -} - -// SetActivityArn sets the ActivityArn field's value. -func (s *DescribeActivityOutput) SetActivityArn(v string) *DescribeActivityOutput { - s.ActivityArn = &v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *DescribeActivityOutput) SetCreationDate(v time.Time) *DescribeActivityOutput { - s.CreationDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeActivityOutput) SetName(v string) *DescribeActivityOutput { - s.Name = &v - return s -} - -type DescribeExecutionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the execution to describe. - // - // ExecutionArn is a required field - ExecutionArn *string `locationName:"executionArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeExecutionInput"} - if s.ExecutionArn == nil { - invalidParams.Add(request.NewErrParamRequired("ExecutionArn")) - } - if s.ExecutionArn != nil && len(*s.ExecutionArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExecutionArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExecutionArn sets the ExecutionArn field's value. -func (s *DescribeExecutionInput) SetExecutionArn(v string) *DescribeExecutionInput { - s.ExecutionArn = &v - return s -} - -type DescribeExecutionOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that identifies the execution. - // - // ExecutionArn is a required field - ExecutionArn *string `locationName:"executionArn" min:"1" type:"string" required:"true"` - - // The string that contains the JSON input data of the execution. - // - // Input is a required field - Input *string `locationName:"input" type:"string" required:"true" sensitive:"true"` - - // The name of the execution. - // - // A name must not contain: - // - // * whitespace - // - // * brackets < > { } [ ] - // - // * wildcard characters ? * - // - // * special characters " # % \ ^ | ~ ` $ & , ; : / - // - // * control characters (U+0000-001F, U+007F-009F) - Name *string `locationName:"name" min:"1" type:"string"` - - // The JSON output data of the execution. - // - // This field is set only if the execution succeeds. If the execution fails, - // this field is null. - Output *string `locationName:"output" type:"string" sensitive:"true"` - - // The date the execution is started. - // - // StartDate is a required field - StartDate *time.Time `locationName:"startDate" type:"timestamp" required:"true"` - - // The Amazon Resource Name (ARN) of the executed stated machine. - // - // StateMachineArn is a required field - StateMachineArn *string `locationName:"stateMachineArn" min:"1" type:"string" required:"true"` - - // The current status of the execution. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"ExecutionStatus"` - - // If the execution has already ended, the date the execution stopped. - StopDate *time.Time `locationName:"stopDate" type:"timestamp"` -} - -// String returns the string representation -func (s DescribeExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeExecutionOutput) GoString() string { - return s.String() -} - -// SetExecutionArn sets the ExecutionArn field's value. -func (s *DescribeExecutionOutput) SetExecutionArn(v string) *DescribeExecutionOutput { - s.ExecutionArn = &v - return s -} - -// SetInput sets the Input field's value. -func (s *DescribeExecutionOutput) SetInput(v string) *DescribeExecutionOutput { - s.Input = &v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeExecutionOutput) SetName(v string) *DescribeExecutionOutput { - s.Name = &v - return s -} - -// SetOutput sets the Output field's value. -func (s *DescribeExecutionOutput) SetOutput(v string) *DescribeExecutionOutput { - s.Output = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *DescribeExecutionOutput) SetStartDate(v time.Time) *DescribeExecutionOutput { - s.StartDate = &v - return s -} - -// SetStateMachineArn sets the StateMachineArn field's value. -func (s *DescribeExecutionOutput) SetStateMachineArn(v string) *DescribeExecutionOutput { - s.StateMachineArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeExecutionOutput) SetStatus(v string) *DescribeExecutionOutput { - s.Status = &v - return s -} - -// SetStopDate sets the StopDate field's value. -func (s *DescribeExecutionOutput) SetStopDate(v time.Time) *DescribeExecutionOutput { - s.StopDate = &v - return s -} - -type DescribeStateMachineForExecutionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the execution you want state machine information - // for. - // - // ExecutionArn is a required field - ExecutionArn *string `locationName:"executionArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeStateMachineForExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStateMachineForExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStateMachineForExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStateMachineForExecutionInput"} - if s.ExecutionArn == nil { - invalidParams.Add(request.NewErrParamRequired("ExecutionArn")) - } - if s.ExecutionArn != nil && len(*s.ExecutionArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExecutionArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExecutionArn sets the ExecutionArn field's value. -func (s *DescribeStateMachineForExecutionInput) SetExecutionArn(v string) *DescribeStateMachineForExecutionInput { - s.ExecutionArn = &v - return s -} - -type DescribeStateMachineForExecutionOutput struct { - _ struct{} `type:"structure"` - - // The Amazon States Language definition of the state machine. See Amazon States - // Language (http://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html). - // - // Definition is a required field - Definition *string `locationName:"definition" min:"1" type:"string" required:"true" sensitive:"true"` - - // The name of the state machine associated with the execution. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM role of the State Machine for the - // execution. - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the state machine associated with the execution. - // - // StateMachineArn is a required field - StateMachineArn *string `locationName:"stateMachineArn" min:"1" type:"string" required:"true"` - - // The date and time the state machine associated with an execution was updated. - // For a newly created state machine, this is the creation date. - // - // UpdateDate is a required field - UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s DescribeStateMachineForExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStateMachineForExecutionOutput) GoString() string { - return s.String() -} - -// SetDefinition sets the Definition field's value. -func (s *DescribeStateMachineForExecutionOutput) SetDefinition(v string) *DescribeStateMachineForExecutionOutput { - s.Definition = &v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeStateMachineForExecutionOutput) SetName(v string) *DescribeStateMachineForExecutionOutput { - s.Name = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DescribeStateMachineForExecutionOutput) SetRoleArn(v string) *DescribeStateMachineForExecutionOutput { - s.RoleArn = &v - return s -} - -// SetStateMachineArn sets the StateMachineArn field's value. -func (s *DescribeStateMachineForExecutionOutput) SetStateMachineArn(v string) *DescribeStateMachineForExecutionOutput { - s.StateMachineArn = &v - return s -} - -// SetUpdateDate sets the UpdateDate field's value. -func (s *DescribeStateMachineForExecutionOutput) SetUpdateDate(v time.Time) *DescribeStateMachineForExecutionOutput { - s.UpdateDate = &v - return s -} - -type DescribeStateMachineInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the state machine to describe. - // - // StateMachineArn is a required field - StateMachineArn *string `locationName:"stateMachineArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeStateMachineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStateMachineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStateMachineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStateMachineInput"} - if s.StateMachineArn == nil { - invalidParams.Add(request.NewErrParamRequired("StateMachineArn")) - } - if s.StateMachineArn != nil && len(*s.StateMachineArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StateMachineArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStateMachineArn sets the StateMachineArn field's value. -func (s *DescribeStateMachineInput) SetStateMachineArn(v string) *DescribeStateMachineInput { - s.StateMachineArn = &v - return s -} - -type DescribeStateMachineOutput struct { - _ struct{} `type:"structure"` - - // The date the state machine is created. - // - // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` - - // The Amazon States Language definition of the state machine. See Amazon States - // Language (http://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html). - // - // Definition is a required field - Definition *string `locationName:"definition" min:"1" type:"string" required:"true" sensitive:"true"` - - // The name of the state machine. - // - // A name must not contain: - // - // * whitespace - // - // * brackets < > { } [ ] - // - // * wildcard characters ? * - // - // * special characters " # % \ ^ | ~ ` $ & , ; : / - // - // * control characters (U+0000-001F, U+007F-009F) - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM role used when creating this state - // machine. (The IAM role maintains security by granting Step Functions access - // to AWS resources.) - // - // RoleArn is a required field - RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) that identifies the state machine. - // - // StateMachineArn is a required field - StateMachineArn *string `locationName:"stateMachineArn" min:"1" type:"string" required:"true"` - - // The current status of the state machine. - Status *string `locationName:"status" type:"string" enum:"StateMachineStatus"` -} - -// String returns the string representation -func (s DescribeStateMachineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStateMachineOutput) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *DescribeStateMachineOutput) SetCreationDate(v time.Time) *DescribeStateMachineOutput { - s.CreationDate = &v - return s -} - -// SetDefinition sets the Definition field's value. -func (s *DescribeStateMachineOutput) SetDefinition(v string) *DescribeStateMachineOutput { - s.Definition = &v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeStateMachineOutput) SetName(v string) *DescribeStateMachineOutput { - s.Name = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *DescribeStateMachineOutput) SetRoleArn(v string) *DescribeStateMachineOutput { - s.RoleArn = &v - return s -} - -// SetStateMachineArn sets the StateMachineArn field's value. -func (s *DescribeStateMachineOutput) SetStateMachineArn(v string) *DescribeStateMachineOutput { - s.StateMachineArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeStateMachineOutput) SetStatus(v string) *DescribeStateMachineOutput { - s.Status = &v - return s -} - -// Contains details about an abort of an execution. -type ExecutionAbortedEventDetails struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s ExecutionAbortedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecutionAbortedEventDetails) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *ExecutionAbortedEventDetails) SetCause(v string) *ExecutionAbortedEventDetails { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *ExecutionAbortedEventDetails) SetError(v string) *ExecutionAbortedEventDetails { - s.Error = &v - return s -} - -// Contains details about an execution failure event. -type ExecutionFailedEventDetails struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s ExecutionFailedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecutionFailedEventDetails) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *ExecutionFailedEventDetails) SetCause(v string) *ExecutionFailedEventDetails { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *ExecutionFailedEventDetails) SetError(v string) *ExecutionFailedEventDetails { - s.Error = &v - return s -} - -// Contains details about an execution. -type ExecutionListItem struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that identifies the execution. - // - // ExecutionArn is a required field - ExecutionArn *string `locationName:"executionArn" min:"1" type:"string" required:"true"` - - // The name of the execution. - // - // A name must not contain: - // - // * whitespace - // - // * brackets < > { } [ ] - // - // * wildcard characters ? * - // - // * special characters " # % \ ^ | ~ ` $ & , ; : / - // - // * control characters (U+0000-001F, U+007F-009F) - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The date the execution started. - // - // StartDate is a required field - StartDate *time.Time `locationName:"startDate" type:"timestamp" required:"true"` - - // The Amazon Resource Name (ARN) of the executed state machine. - // - // StateMachineArn is a required field - StateMachineArn *string `locationName:"stateMachineArn" min:"1" type:"string" required:"true"` - - // The current status of the execution. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"ExecutionStatus"` - - // If the execution already ended, the date the execution stopped. - StopDate *time.Time `locationName:"stopDate" type:"timestamp"` -} - -// String returns the string representation -func (s ExecutionListItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecutionListItem) GoString() string { - return s.String() -} - -// SetExecutionArn sets the ExecutionArn field's value. -func (s *ExecutionListItem) SetExecutionArn(v string) *ExecutionListItem { - s.ExecutionArn = &v - return s -} - -// SetName sets the Name field's value. -func (s *ExecutionListItem) SetName(v string) *ExecutionListItem { - s.Name = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *ExecutionListItem) SetStartDate(v time.Time) *ExecutionListItem { - s.StartDate = &v - return s -} - -// SetStateMachineArn sets the StateMachineArn field's value. -func (s *ExecutionListItem) SetStateMachineArn(v string) *ExecutionListItem { - s.StateMachineArn = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ExecutionListItem) SetStatus(v string) *ExecutionListItem { - s.Status = &v - return s -} - -// SetStopDate sets the StopDate field's value. -func (s *ExecutionListItem) SetStopDate(v time.Time) *ExecutionListItem { - s.StopDate = &v - return s -} - -// Contains details about the start of the execution. -type ExecutionStartedEventDetails struct { - _ struct{} `type:"structure"` - - // The JSON data input to the execution. - Input *string `locationName:"input" type:"string" sensitive:"true"` - - // The Amazon Resource Name (ARN) of the IAM role used for executing AWS Lambda - // tasks. - RoleArn *string `locationName:"roleArn" min:"1" type:"string"` -} - -// String returns the string representation -func (s ExecutionStartedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecutionStartedEventDetails) GoString() string { - return s.String() -} - -// SetInput sets the Input field's value. -func (s *ExecutionStartedEventDetails) SetInput(v string) *ExecutionStartedEventDetails { - s.Input = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *ExecutionStartedEventDetails) SetRoleArn(v string) *ExecutionStartedEventDetails { - s.RoleArn = &v - return s -} - -// Contains details about the successful termination of the execution. -type ExecutionSucceededEventDetails struct { - _ struct{} `type:"structure"` - - // The JSON data output by the execution. - Output *string `locationName:"output" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s ExecutionSucceededEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecutionSucceededEventDetails) GoString() string { - return s.String() -} - -// SetOutput sets the Output field's value. -func (s *ExecutionSucceededEventDetails) SetOutput(v string) *ExecutionSucceededEventDetails { - s.Output = &v - return s -} - -// Contains details about the execution timeout that occurred during the execution. -type ExecutionTimedOutEventDetails struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the timeout. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s ExecutionTimedOutEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecutionTimedOutEventDetails) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *ExecutionTimedOutEventDetails) SetCause(v string) *ExecutionTimedOutEventDetails { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *ExecutionTimedOutEventDetails) SetError(v string) *ExecutionTimedOutEventDetails { - s.Error = &v - return s -} - -type GetActivityTaskInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the activity to retrieve tasks from (assigned - // when you create the task using CreateActivity.) - // - // ActivityArn is a required field - ActivityArn *string `locationName:"activityArn" min:"1" type:"string" required:"true"` - - // You can provide an arbitrary name in order to identify the worker that the - // task is assigned to. This name is used when it is logged in the execution - // history. - WorkerName *string `locationName:"workerName" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetActivityTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetActivityTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetActivityTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetActivityTaskInput"} - if s.ActivityArn == nil { - invalidParams.Add(request.NewErrParamRequired("ActivityArn")) - } - if s.ActivityArn != nil && len(*s.ActivityArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ActivityArn", 1)) - } - if s.WorkerName != nil && len(*s.WorkerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivityArn sets the ActivityArn field's value. -func (s *GetActivityTaskInput) SetActivityArn(v string) *GetActivityTaskInput { - s.ActivityArn = &v - return s -} - -// SetWorkerName sets the WorkerName field's value. -func (s *GetActivityTaskInput) SetWorkerName(v string) *GetActivityTaskInput { - s.WorkerName = &v - return s -} - -type GetActivityTaskOutput struct { - _ struct{} `type:"structure"` - - // The string that contains the JSON input data for the task. - Input *string `locationName:"input" type:"string" sensitive:"true"` - - // A token that identifies the scheduled task. This token must be copied and - // included in subsequent calls to SendTaskHeartbeat, SendTaskSuccess or SendTaskFailure - // in order to report the progress or completion of the task. - TaskToken *string `locationName:"taskToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetActivityTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetActivityTaskOutput) GoString() string { - return s.String() -} - -// SetInput sets the Input field's value. -func (s *GetActivityTaskOutput) SetInput(v string) *GetActivityTaskOutput { - s.Input = &v - return s -} - -// SetTaskToken sets the TaskToken field's value. -func (s *GetActivityTaskOutput) SetTaskToken(v string) *GetActivityTaskOutput { - s.TaskToken = &v - return s -} - -type GetExecutionHistoryInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the execution. - // - // ExecutionArn is a required field - ExecutionArn *string `locationName:"executionArn" min:"1" type:"string" required:"true"` - - // The maximum number of results that are returned per call. You can use nextToken - // to obtain further pages of results. The default is 100 and the maximum allowed - // page size is 1000. A value of 0 uses the default. - // - // This is only an upper limit. The actual number of results returned per call - // might be fewer than the specified maximum. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // If nextToken is returned, there are more results available. The value of - // nextToken is a unique pagination token for each page. Make the call again - // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 24 hours. Using an expired - // pagination token will return an HTTP 400 InvalidToken error. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // Lists events in descending order of their timeStamp. - ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` -} - -// String returns the string representation -func (s GetExecutionHistoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetExecutionHistoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetExecutionHistoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetExecutionHistoryInput"} - if s.ExecutionArn == nil { - invalidParams.Add(request.NewErrParamRequired("ExecutionArn")) - } - if s.ExecutionArn != nil && len(*s.ExecutionArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExecutionArn", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExecutionArn sets the ExecutionArn field's value. -func (s *GetExecutionHistoryInput) SetExecutionArn(v string) *GetExecutionHistoryInput { - s.ExecutionArn = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetExecutionHistoryInput) SetMaxResults(v int64) *GetExecutionHistoryInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetExecutionHistoryInput) SetNextToken(v string) *GetExecutionHistoryInput { - s.NextToken = &v - return s -} - -// SetReverseOrder sets the ReverseOrder field's value. -func (s *GetExecutionHistoryInput) SetReverseOrder(v bool) *GetExecutionHistoryInput { - s.ReverseOrder = &v - return s -} - -type GetExecutionHistoryOutput struct { - _ struct{} `type:"structure"` - - // The list of events that occurred in the execution. - // - // Events is a required field - Events []*HistoryEvent `locationName:"events" type:"list" required:"true"` - - // If nextToken is returned, there are more results available. The value of - // nextToken is a unique pagination token for each page. Make the call again - // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 24 hours. Using an expired - // pagination token will return an HTTP 400 InvalidToken error. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s GetExecutionHistoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetExecutionHistoryOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *GetExecutionHistoryOutput) SetEvents(v []*HistoryEvent) *GetExecutionHistoryOutput { - s.Events = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetExecutionHistoryOutput) SetNextToken(v string) *GetExecutionHistoryOutput { - s.NextToken = &v - return s -} - -// Contains details about the events of an execution. -type HistoryEvent struct { - _ struct{} `type:"structure"` - - // Contains details about an activity that failed during an execution. - ActivityFailedEventDetails *ActivityFailedEventDetails `locationName:"activityFailedEventDetails" type:"structure"` - - // Contains details about an activity schedule event that failed during an execution. - ActivityScheduleFailedEventDetails *ActivityScheduleFailedEventDetails `locationName:"activityScheduleFailedEventDetails" type:"structure"` - - // Contains details about an activity scheduled during an execution. - ActivityScheduledEventDetails *ActivityScheduledEventDetails `locationName:"activityScheduledEventDetails" type:"structure"` - - // Contains details about the start of an activity during an execution. - ActivityStartedEventDetails *ActivityStartedEventDetails `locationName:"activityStartedEventDetails" type:"structure"` - - // Contains details about an activity that successfully terminated during an - // execution. - ActivitySucceededEventDetails *ActivitySucceededEventDetails `locationName:"activitySucceededEventDetails" type:"structure"` - - // Contains details about an activity timeout that occurred during an execution. - ActivityTimedOutEventDetails *ActivityTimedOutEventDetails `locationName:"activityTimedOutEventDetails" type:"structure"` - - // Contains details about an abort of an execution. - ExecutionAbortedEventDetails *ExecutionAbortedEventDetails `locationName:"executionAbortedEventDetails" type:"structure"` - - // Contains details about an execution failure event. - ExecutionFailedEventDetails *ExecutionFailedEventDetails `locationName:"executionFailedEventDetails" type:"structure"` - - // Contains details about the start of the execution. - ExecutionStartedEventDetails *ExecutionStartedEventDetails `locationName:"executionStartedEventDetails" type:"structure"` - - // Contains details about the successful termination of the execution. - ExecutionSucceededEventDetails *ExecutionSucceededEventDetails `locationName:"executionSucceededEventDetails" type:"structure"` - - // Contains details about the execution timeout that occurred during the execution. - ExecutionTimedOutEventDetails *ExecutionTimedOutEventDetails `locationName:"executionTimedOutEventDetails" type:"structure"` - - // The id of the event. Events are numbered sequentially, starting at one. - // - // Id is a required field - Id *int64 `locationName:"id" type:"long" required:"true"` - - // Contains details about a lambda function that failed during an execution. - LambdaFunctionFailedEventDetails *LambdaFunctionFailedEventDetails `locationName:"lambdaFunctionFailedEventDetails" type:"structure"` - - // Contains details about a failed lambda function schedule event that occurred - // during an execution. - LambdaFunctionScheduleFailedEventDetails *LambdaFunctionScheduleFailedEventDetails `locationName:"lambdaFunctionScheduleFailedEventDetails" type:"structure"` - - // Contains details about a lambda function scheduled during an execution. - LambdaFunctionScheduledEventDetails *LambdaFunctionScheduledEventDetails `locationName:"lambdaFunctionScheduledEventDetails" type:"structure"` - - // Contains details about a lambda function that failed to start during an execution. - LambdaFunctionStartFailedEventDetails *LambdaFunctionStartFailedEventDetails `locationName:"lambdaFunctionStartFailedEventDetails" type:"structure"` - - // Contains details about a lambda function that terminated successfully during - // an execution. - LambdaFunctionSucceededEventDetails *LambdaFunctionSucceededEventDetails `locationName:"lambdaFunctionSucceededEventDetails" type:"structure"` - - // Contains details about a lambda function timeout that occurred during an - // execution. - LambdaFunctionTimedOutEventDetails *LambdaFunctionTimedOutEventDetails `locationName:"lambdaFunctionTimedOutEventDetails" type:"structure"` - - // The id of the previous event. - PreviousEventId *int64 `locationName:"previousEventId" type:"long"` - - // Contains details about a state entered during an execution. - StateEnteredEventDetails *StateEnteredEventDetails `locationName:"stateEnteredEventDetails" type:"structure"` - - // Contains details about an exit from a state during an execution. - StateExitedEventDetails *StateExitedEventDetails `locationName:"stateExitedEventDetails" type:"structure"` - - // Contains details about a task failure event. - TaskFailedEventDetails *TaskFailedEventDetails `locationName:"taskFailedEventDetails" type:"structure"` - - // Contains details about a task scheduled during an execution. - TaskScheduledEventDetails *TaskScheduledEventDetails `locationName:"taskScheduledEventDetails" type:"structure"` - - // Contains details about a task that failed to start during an execution. - TaskStartFailedEventDetails *TaskStartFailedEventDetails `locationName:"taskStartFailedEventDetails" type:"structure"` - - // Contains details about the start of a task during an execution. - TaskStartedEventDetails *TaskStartedEventDetails `locationName:"taskStartedEventDetails" type:"structure"` - - // Contains details about a task that failed to submit during an execution. - TaskSubmitFailedEventDetails *TaskSubmitFailedEventDetails `locationName:"taskSubmitFailedEventDetails" type:"structure"` - - // Contains details about a task submitted to a resource . - TaskSubmittedEventDetails *TaskSubmittedEventDetails `locationName:"taskSubmittedEventDetails" type:"structure"` - - // Contains details about the successful completion of a task state. - TaskSucceededEventDetails *TaskSucceededEventDetails `locationName:"taskSucceededEventDetails" type:"structure"` - - // Contains details about a resource timeout that occurred during an execution. - TaskTimedOutEventDetails *TaskTimedOutEventDetails `locationName:"taskTimedOutEventDetails" type:"structure"` - - // The date and time the event occurred. - // - // Timestamp is a required field - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" required:"true"` - - // The type of the event. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"HistoryEventType"` -} - -// String returns the string representation -func (s HistoryEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HistoryEvent) GoString() string { - return s.String() -} - -// SetActivityFailedEventDetails sets the ActivityFailedEventDetails field's value. -func (s *HistoryEvent) SetActivityFailedEventDetails(v *ActivityFailedEventDetails) *HistoryEvent { - s.ActivityFailedEventDetails = v - return s -} - -// SetActivityScheduleFailedEventDetails sets the ActivityScheduleFailedEventDetails field's value. -func (s *HistoryEvent) SetActivityScheduleFailedEventDetails(v *ActivityScheduleFailedEventDetails) *HistoryEvent { - s.ActivityScheduleFailedEventDetails = v - return s -} - -// SetActivityScheduledEventDetails sets the ActivityScheduledEventDetails field's value. -func (s *HistoryEvent) SetActivityScheduledEventDetails(v *ActivityScheduledEventDetails) *HistoryEvent { - s.ActivityScheduledEventDetails = v - return s -} - -// SetActivityStartedEventDetails sets the ActivityStartedEventDetails field's value. -func (s *HistoryEvent) SetActivityStartedEventDetails(v *ActivityStartedEventDetails) *HistoryEvent { - s.ActivityStartedEventDetails = v - return s -} - -// SetActivitySucceededEventDetails sets the ActivitySucceededEventDetails field's value. -func (s *HistoryEvent) SetActivitySucceededEventDetails(v *ActivitySucceededEventDetails) *HistoryEvent { - s.ActivitySucceededEventDetails = v - return s -} - -// SetActivityTimedOutEventDetails sets the ActivityTimedOutEventDetails field's value. -func (s *HistoryEvent) SetActivityTimedOutEventDetails(v *ActivityTimedOutEventDetails) *HistoryEvent { - s.ActivityTimedOutEventDetails = v - return s -} - -// SetExecutionAbortedEventDetails sets the ExecutionAbortedEventDetails field's value. -func (s *HistoryEvent) SetExecutionAbortedEventDetails(v *ExecutionAbortedEventDetails) *HistoryEvent { - s.ExecutionAbortedEventDetails = v - return s -} - -// SetExecutionFailedEventDetails sets the ExecutionFailedEventDetails field's value. -func (s *HistoryEvent) SetExecutionFailedEventDetails(v *ExecutionFailedEventDetails) *HistoryEvent { - s.ExecutionFailedEventDetails = v - return s -} - -// SetExecutionStartedEventDetails sets the ExecutionStartedEventDetails field's value. -func (s *HistoryEvent) SetExecutionStartedEventDetails(v *ExecutionStartedEventDetails) *HistoryEvent { - s.ExecutionStartedEventDetails = v - return s -} - -// SetExecutionSucceededEventDetails sets the ExecutionSucceededEventDetails field's value. -func (s *HistoryEvent) SetExecutionSucceededEventDetails(v *ExecutionSucceededEventDetails) *HistoryEvent { - s.ExecutionSucceededEventDetails = v - return s -} - -// SetExecutionTimedOutEventDetails sets the ExecutionTimedOutEventDetails field's value. -func (s *HistoryEvent) SetExecutionTimedOutEventDetails(v *ExecutionTimedOutEventDetails) *HistoryEvent { - s.ExecutionTimedOutEventDetails = v - return s -} - -// SetId sets the Id field's value. -func (s *HistoryEvent) SetId(v int64) *HistoryEvent { - s.Id = &v - return s -} - -// SetLambdaFunctionFailedEventDetails sets the LambdaFunctionFailedEventDetails field's value. -func (s *HistoryEvent) SetLambdaFunctionFailedEventDetails(v *LambdaFunctionFailedEventDetails) *HistoryEvent { - s.LambdaFunctionFailedEventDetails = v - return s -} - -// SetLambdaFunctionScheduleFailedEventDetails sets the LambdaFunctionScheduleFailedEventDetails field's value. -func (s *HistoryEvent) SetLambdaFunctionScheduleFailedEventDetails(v *LambdaFunctionScheduleFailedEventDetails) *HistoryEvent { - s.LambdaFunctionScheduleFailedEventDetails = v - return s -} - -// SetLambdaFunctionScheduledEventDetails sets the LambdaFunctionScheduledEventDetails field's value. -func (s *HistoryEvent) SetLambdaFunctionScheduledEventDetails(v *LambdaFunctionScheduledEventDetails) *HistoryEvent { - s.LambdaFunctionScheduledEventDetails = v - return s -} - -// SetLambdaFunctionStartFailedEventDetails sets the LambdaFunctionStartFailedEventDetails field's value. -func (s *HistoryEvent) SetLambdaFunctionStartFailedEventDetails(v *LambdaFunctionStartFailedEventDetails) *HistoryEvent { - s.LambdaFunctionStartFailedEventDetails = v - return s -} - -// SetLambdaFunctionSucceededEventDetails sets the LambdaFunctionSucceededEventDetails field's value. -func (s *HistoryEvent) SetLambdaFunctionSucceededEventDetails(v *LambdaFunctionSucceededEventDetails) *HistoryEvent { - s.LambdaFunctionSucceededEventDetails = v - return s -} - -// SetLambdaFunctionTimedOutEventDetails sets the LambdaFunctionTimedOutEventDetails field's value. -func (s *HistoryEvent) SetLambdaFunctionTimedOutEventDetails(v *LambdaFunctionTimedOutEventDetails) *HistoryEvent { - s.LambdaFunctionTimedOutEventDetails = v - return s -} - -// SetPreviousEventId sets the PreviousEventId field's value. -func (s *HistoryEvent) SetPreviousEventId(v int64) *HistoryEvent { - s.PreviousEventId = &v - return s -} - -// SetStateEnteredEventDetails sets the StateEnteredEventDetails field's value. -func (s *HistoryEvent) SetStateEnteredEventDetails(v *StateEnteredEventDetails) *HistoryEvent { - s.StateEnteredEventDetails = v - return s -} - -// SetStateExitedEventDetails sets the StateExitedEventDetails field's value. -func (s *HistoryEvent) SetStateExitedEventDetails(v *StateExitedEventDetails) *HistoryEvent { - s.StateExitedEventDetails = v - return s -} - -// SetTaskFailedEventDetails sets the TaskFailedEventDetails field's value. -func (s *HistoryEvent) SetTaskFailedEventDetails(v *TaskFailedEventDetails) *HistoryEvent { - s.TaskFailedEventDetails = v - return s -} - -// SetTaskScheduledEventDetails sets the TaskScheduledEventDetails field's value. -func (s *HistoryEvent) SetTaskScheduledEventDetails(v *TaskScheduledEventDetails) *HistoryEvent { - s.TaskScheduledEventDetails = v - return s -} - -// SetTaskStartFailedEventDetails sets the TaskStartFailedEventDetails field's value. -func (s *HistoryEvent) SetTaskStartFailedEventDetails(v *TaskStartFailedEventDetails) *HistoryEvent { - s.TaskStartFailedEventDetails = v - return s -} - -// SetTaskStartedEventDetails sets the TaskStartedEventDetails field's value. -func (s *HistoryEvent) SetTaskStartedEventDetails(v *TaskStartedEventDetails) *HistoryEvent { - s.TaskStartedEventDetails = v - return s -} - -// SetTaskSubmitFailedEventDetails sets the TaskSubmitFailedEventDetails field's value. -func (s *HistoryEvent) SetTaskSubmitFailedEventDetails(v *TaskSubmitFailedEventDetails) *HistoryEvent { - s.TaskSubmitFailedEventDetails = v - return s -} - -// SetTaskSubmittedEventDetails sets the TaskSubmittedEventDetails field's value. -func (s *HistoryEvent) SetTaskSubmittedEventDetails(v *TaskSubmittedEventDetails) *HistoryEvent { - s.TaskSubmittedEventDetails = v - return s -} - -// SetTaskSucceededEventDetails sets the TaskSucceededEventDetails field's value. -func (s *HistoryEvent) SetTaskSucceededEventDetails(v *TaskSucceededEventDetails) *HistoryEvent { - s.TaskSucceededEventDetails = v - return s -} - -// SetTaskTimedOutEventDetails sets the TaskTimedOutEventDetails field's value. -func (s *HistoryEvent) SetTaskTimedOutEventDetails(v *TaskTimedOutEventDetails) *HistoryEvent { - s.TaskTimedOutEventDetails = v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *HistoryEvent) SetTimestamp(v time.Time) *HistoryEvent { - s.Timestamp = &v - return s -} - -// SetType sets the Type field's value. -func (s *HistoryEvent) SetType(v string) *HistoryEvent { - s.Type = &v - return s -} - -// Contains details about a lambda function that failed during an execution. -type LambdaFunctionFailedEventDetails struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s LambdaFunctionFailedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaFunctionFailedEventDetails) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *LambdaFunctionFailedEventDetails) SetCause(v string) *LambdaFunctionFailedEventDetails { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *LambdaFunctionFailedEventDetails) SetError(v string) *LambdaFunctionFailedEventDetails { - s.Error = &v - return s -} - -// Contains details about a failed lambda function schedule event that occurred -// during an execution. -type LambdaFunctionScheduleFailedEventDetails struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s LambdaFunctionScheduleFailedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaFunctionScheduleFailedEventDetails) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *LambdaFunctionScheduleFailedEventDetails) SetCause(v string) *LambdaFunctionScheduleFailedEventDetails { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *LambdaFunctionScheduleFailedEventDetails) SetError(v string) *LambdaFunctionScheduleFailedEventDetails { - s.Error = &v - return s -} - -// Contains details about a lambda function scheduled during an execution. -type LambdaFunctionScheduledEventDetails struct { - _ struct{} `type:"structure"` - - // The JSON data input to the lambda function. - Input *string `locationName:"input" type:"string" sensitive:"true"` - - // The Amazon Resource Name (ARN) of the scheduled lambda function. - // - // Resource is a required field - Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - - // The maximum allowed duration of the lambda function. - TimeoutInSeconds *int64 `locationName:"timeoutInSeconds" type:"long"` -} - -// String returns the string representation -func (s LambdaFunctionScheduledEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaFunctionScheduledEventDetails) GoString() string { - return s.String() -} - -// SetInput sets the Input field's value. -func (s *LambdaFunctionScheduledEventDetails) SetInput(v string) *LambdaFunctionScheduledEventDetails { - s.Input = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *LambdaFunctionScheduledEventDetails) SetResource(v string) *LambdaFunctionScheduledEventDetails { - s.Resource = &v - return s -} - -// SetTimeoutInSeconds sets the TimeoutInSeconds field's value. -func (s *LambdaFunctionScheduledEventDetails) SetTimeoutInSeconds(v int64) *LambdaFunctionScheduledEventDetails { - s.TimeoutInSeconds = &v - return s -} - -// Contains details about a lambda function that failed to start during an execution. -type LambdaFunctionStartFailedEventDetails struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s LambdaFunctionStartFailedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaFunctionStartFailedEventDetails) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *LambdaFunctionStartFailedEventDetails) SetCause(v string) *LambdaFunctionStartFailedEventDetails { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *LambdaFunctionStartFailedEventDetails) SetError(v string) *LambdaFunctionStartFailedEventDetails { - s.Error = &v - return s -} - -// Contains details about a lambda function that successfully terminated during -// an execution. -type LambdaFunctionSucceededEventDetails struct { - _ struct{} `type:"structure"` - - // The JSON data output by the lambda function. - Output *string `locationName:"output" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s LambdaFunctionSucceededEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaFunctionSucceededEventDetails) GoString() string { - return s.String() -} - -// SetOutput sets the Output field's value. -func (s *LambdaFunctionSucceededEventDetails) SetOutput(v string) *LambdaFunctionSucceededEventDetails { - s.Output = &v - return s -} - -// Contains details about a lambda function timeout that occurred during an -// execution. -type LambdaFunctionTimedOutEventDetails struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the timeout. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s LambdaFunctionTimedOutEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaFunctionTimedOutEventDetails) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *LambdaFunctionTimedOutEventDetails) SetCause(v string) *LambdaFunctionTimedOutEventDetails { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *LambdaFunctionTimedOutEventDetails) SetError(v string) *LambdaFunctionTimedOutEventDetails { - s.Error = &v - return s -} - -type ListActivitiesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results that are returned per call. You can use nextToken - // to obtain further pages of results. The default is 100 and the maximum allowed - // page size is 1000. A value of 0 uses the default. - // - // This is only an upper limit. The actual number of results returned per call - // might be fewer than the specified maximum. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // If nextToken is returned, there are more results available. The value of - // nextToken is a unique pagination token for each page. Make the call again - // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 24 hours. Using an expired - // pagination token will return an HTTP 400 InvalidToken error. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListActivitiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListActivitiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListActivitiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListActivitiesInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListActivitiesInput) SetMaxResults(v int64) *ListActivitiesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListActivitiesInput) SetNextToken(v string) *ListActivitiesInput { - s.NextToken = &v - return s -} - -type ListActivitiesOutput struct { - _ struct{} `type:"structure"` - - // The list of activities. - // - // Activities is a required field - Activities []*ActivityListItem `locationName:"activities" type:"list" required:"true"` - - // If nextToken is returned, there are more results available. The value of - // nextToken is a unique pagination token for each page. Make the call again - // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 24 hours. Using an expired - // pagination token will return an HTTP 400 InvalidToken error. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListActivitiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListActivitiesOutput) GoString() string { - return s.String() -} - -// SetActivities sets the Activities field's value. -func (s *ListActivitiesOutput) SetActivities(v []*ActivityListItem) *ListActivitiesOutput { - s.Activities = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListActivitiesOutput) SetNextToken(v string) *ListActivitiesOutput { - s.NextToken = &v - return s -} - -type ListExecutionsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results that are returned per call. You can use nextToken - // to obtain further pages of results. The default is 100 and the maximum allowed - // page size is 1000. A value of 0 uses the default. - // - // This is only an upper limit. The actual number of results returned per call - // might be fewer than the specified maximum. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // If nextToken is returned, there are more results available. The value of - // nextToken is a unique pagination token for each page. Make the call again - // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 24 hours. Using an expired - // pagination token will return an HTTP 400 InvalidToken error. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the state machine whose executions is listed. - // - // StateMachineArn is a required field - StateMachineArn *string `locationName:"stateMachineArn" min:"1" type:"string" required:"true"` - - // If specified, only list the executions whose current execution status matches - // the given filter. - StatusFilter *string `locationName:"statusFilter" type:"string" enum:"ExecutionStatus"` -} - -// String returns the string representation -func (s ListExecutionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListExecutionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListExecutionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListExecutionsInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.StateMachineArn == nil { - invalidParams.Add(request.NewErrParamRequired("StateMachineArn")) - } - if s.StateMachineArn != nil && len(*s.StateMachineArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StateMachineArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListExecutionsInput) SetMaxResults(v int64) *ListExecutionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListExecutionsInput) SetNextToken(v string) *ListExecutionsInput { - s.NextToken = &v - return s -} - -// SetStateMachineArn sets the StateMachineArn field's value. -func (s *ListExecutionsInput) SetStateMachineArn(v string) *ListExecutionsInput { - s.StateMachineArn = &v - return s -} - -// SetStatusFilter sets the StatusFilter field's value. -func (s *ListExecutionsInput) SetStatusFilter(v string) *ListExecutionsInput { - s.StatusFilter = &v - return s -} - -type ListExecutionsOutput struct { - _ struct{} `type:"structure"` - - // The list of matching executions. - // - // Executions is a required field - Executions []*ExecutionListItem `locationName:"executions" type:"list" required:"true"` - - // If nextToken is returned, there are more results available. The value of - // nextToken is a unique pagination token for each page. Make the call again - // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 24 hours. Using an expired - // pagination token will return an HTTP 400 InvalidToken error. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListExecutionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListExecutionsOutput) GoString() string { - return s.String() -} - -// SetExecutions sets the Executions field's value. -func (s *ListExecutionsOutput) SetExecutions(v []*ExecutionListItem) *ListExecutionsOutput { - s.Executions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListExecutionsOutput) SetNextToken(v string) *ListExecutionsOutput { - s.NextToken = &v - return s -} - -type ListStateMachinesInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results that are returned per call. You can use nextToken - // to obtain further pages of results. The default is 100 and the maximum allowed - // page size is 1000. A value of 0 uses the default. - // - // This is only an upper limit. The actual number of results returned per call - // might be fewer than the specified maximum. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // If nextToken is returned, there are more results available. The value of - // nextToken is a unique pagination token for each page. Make the call again - // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 24 hours. Using an expired - // pagination token will return an HTTP 400 InvalidToken error. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` -} - -// String returns the string representation -func (s ListStateMachinesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStateMachinesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListStateMachinesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListStateMachinesInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListStateMachinesInput) SetMaxResults(v int64) *ListStateMachinesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStateMachinesInput) SetNextToken(v string) *ListStateMachinesInput { - s.NextToken = &v - return s -} - -type ListStateMachinesOutput struct { - _ struct{} `type:"structure"` - - // If nextToken is returned, there are more results available. The value of - // nextToken is a unique pagination token for each page. Make the call again - // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 24 hours. Using an expired - // pagination token will return an HTTP 400 InvalidToken error. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // StateMachines is a required field - StateMachines []*StateMachineListItem `locationName:"stateMachines" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListStateMachinesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStateMachinesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListStateMachinesOutput) SetNextToken(v string) *ListStateMachinesOutput { - s.NextToken = &v - return s -} - -// SetStateMachines sets the StateMachines field's value. -func (s *ListStateMachinesOutput) SetStateMachines(v []*StateMachineListItem) *ListStateMachinesOutput { - s.StateMachines = v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the Step Functions state machine or activity. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { - s.ResourceArn = &v - return s -} - -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // An array of tags associated with the resource. - Tags []*Tag `locationName:"tags" type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -type SendTaskFailureInput struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` - - // The token that represents this task. Task tokens are generated by the service - // when the tasks are assigned to a worker (see GetActivityTask::taskToken). - // - // TaskToken is a required field - TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SendTaskFailureInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendTaskFailureInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendTaskFailureInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendTaskFailureInput"} - if s.TaskToken == nil { - invalidParams.Add(request.NewErrParamRequired("TaskToken")) - } - if s.TaskToken != nil && len(*s.TaskToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCause sets the Cause field's value. -func (s *SendTaskFailureInput) SetCause(v string) *SendTaskFailureInput { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *SendTaskFailureInput) SetError(v string) *SendTaskFailureInput { - s.Error = &v - return s -} - -// SetTaskToken sets the TaskToken field's value. -func (s *SendTaskFailureInput) SetTaskToken(v string) *SendTaskFailureInput { - s.TaskToken = &v - return s -} - -type SendTaskFailureOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SendTaskFailureOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendTaskFailureOutput) GoString() string { - return s.String() -} - -type SendTaskHeartbeatInput struct { - _ struct{} `type:"structure"` - - // The token that represents this task. Task tokens are generated by the service - // when the tasks are assigned to a worker (see GetActivityTaskOutput$taskToken). - // - // TaskToken is a required field - TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SendTaskHeartbeatInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendTaskHeartbeatInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendTaskHeartbeatInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendTaskHeartbeatInput"} - if s.TaskToken == nil { - invalidParams.Add(request.NewErrParamRequired("TaskToken")) - } - if s.TaskToken != nil && len(*s.TaskToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTaskToken sets the TaskToken field's value. -func (s *SendTaskHeartbeatInput) SetTaskToken(v string) *SendTaskHeartbeatInput { - s.TaskToken = &v - return s -} - -type SendTaskHeartbeatOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SendTaskHeartbeatOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendTaskHeartbeatOutput) GoString() string { - return s.String() -} - -type SendTaskSuccessInput struct { - _ struct{} `type:"structure"` - - // The JSON output of the task. - // - // Output is a required field - Output *string `locationName:"output" type:"string" required:"true" sensitive:"true"` - - // The token that represents this task. Task tokens are generated by the service - // when the tasks are assigned to a worker (see GetActivityTaskOutput$taskToken). - // - // TaskToken is a required field - TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SendTaskSuccessInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendTaskSuccessInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendTaskSuccessInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendTaskSuccessInput"} - if s.Output == nil { - invalidParams.Add(request.NewErrParamRequired("Output")) - } - if s.TaskToken == nil { - invalidParams.Add(request.NewErrParamRequired("TaskToken")) - } - if s.TaskToken != nil && len(*s.TaskToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOutput sets the Output field's value. -func (s *SendTaskSuccessInput) SetOutput(v string) *SendTaskSuccessInput { - s.Output = &v - return s -} - -// SetTaskToken sets the TaskToken field's value. -func (s *SendTaskSuccessInput) SetTaskToken(v string) *SendTaskSuccessInput { - s.TaskToken = &v - return s -} - -type SendTaskSuccessOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SendTaskSuccessOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendTaskSuccessOutput) GoString() string { - return s.String() -} - -type StartExecutionInput struct { - _ struct{} `type:"structure"` - - // The string that contains the JSON input data for the execution, for example: - // - // "input": "{\"first_name\" : \"test\"}" - // - // If you don't include any JSON input data, you still must include the two - // braces, for example: "input": "{}" - Input *string `locationName:"input" type:"string" sensitive:"true"` - - // The name of the execution. This name must be unique for your AWS account - // and region for 90 days. For more information, see Limits Related to State - // Machine Executions (http://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions) - // in the AWS Step Functions Developer Guide. - // - // A name must not contain: - // - // * whitespace - // - // * brackets < > { } [ ] - // - // * wildcard characters ? * - // - // * special characters " # % \ ^ | ~ ` $ & , ; : / - // - // * control characters (U+0000-001F, U+007F-009F) - Name *string `locationName:"name" min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the state machine to execute. - // - // StateMachineArn is a required field - StateMachineArn *string `locationName:"stateMachineArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartExecutionInput"} - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.StateMachineArn == nil { - invalidParams.Add(request.NewErrParamRequired("StateMachineArn")) - } - if s.StateMachineArn != nil && len(*s.StateMachineArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StateMachineArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInput sets the Input field's value. -func (s *StartExecutionInput) SetInput(v string) *StartExecutionInput { - s.Input = &v - return s -} - -// SetName sets the Name field's value. -func (s *StartExecutionInput) SetName(v string) *StartExecutionInput { - s.Name = &v - return s -} - -// SetStateMachineArn sets the StateMachineArn field's value. -func (s *StartExecutionInput) SetStateMachineArn(v string) *StartExecutionInput { - s.StateMachineArn = &v - return s -} - -type StartExecutionOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that identifies the execution. - // - // ExecutionArn is a required field - ExecutionArn *string `locationName:"executionArn" min:"1" type:"string" required:"true"` - - // The date the execution is started. - // - // StartDate is a required field - StartDate *time.Time `locationName:"startDate" type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s StartExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartExecutionOutput) GoString() string { - return s.String() -} - -// SetExecutionArn sets the ExecutionArn field's value. -func (s *StartExecutionOutput) SetExecutionArn(v string) *StartExecutionOutput { - s.ExecutionArn = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *StartExecutionOutput) SetStartDate(v time.Time) *StartExecutionOutput { - s.StartDate = &v - return s -} - -// Contains details about a state entered during an execution. -type StateEnteredEventDetails struct { - _ struct{} `type:"structure"` - - // The string that contains the JSON input data for the state. - Input *string `locationName:"input" type:"string" sensitive:"true"` - - // The name of the state. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StateEnteredEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StateEnteredEventDetails) GoString() string { - return s.String() -} - -// SetInput sets the Input field's value. -func (s *StateEnteredEventDetails) SetInput(v string) *StateEnteredEventDetails { - s.Input = &v - return s -} - -// SetName sets the Name field's value. -func (s *StateEnteredEventDetails) SetName(v string) *StateEnteredEventDetails { - s.Name = &v - return s -} - -// Contains details about an exit from a state during an execution. -type StateExitedEventDetails struct { - _ struct{} `type:"structure"` - - // The name of the state. - // - // A name must not contain: - // - // * whitespace - // - // * brackets < > { } [ ] - // - // * wildcard characters ? * - // - // * special characters " # % \ ^ | ~ ` $ & , ; : / - // - // * control characters (U+0000-001F, U+007F-009F) - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The JSON output data of the state. - Output *string `locationName:"output" type:"string" sensitive:"true"` -} - -// String returns the string representation -func (s StateExitedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StateExitedEventDetails) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *StateExitedEventDetails) SetName(v string) *StateExitedEventDetails { - s.Name = &v - return s -} - -// SetOutput sets the Output field's value. -func (s *StateExitedEventDetails) SetOutput(v string) *StateExitedEventDetails { - s.Output = &v - return s -} - -// Contains details about the state machine. -type StateMachineListItem struct { - _ struct{} `type:"structure"` - - // The date the state machine is created. - // - // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` - - // The name of the state machine. - // - // A name must not contain: - // - // * whitespace - // - // * brackets < > { } [ ] - // - // * wildcard characters ? * - // - // * special characters " # % \ ^ | ~ ` $ & , ; : / - // - // * control characters (U+0000-001F, U+007F-009F) - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) that identifies the state machine. - // - // StateMachineArn is a required field - StateMachineArn *string `locationName:"stateMachineArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StateMachineListItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StateMachineListItem) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *StateMachineListItem) SetCreationDate(v time.Time) *StateMachineListItem { - s.CreationDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *StateMachineListItem) SetName(v string) *StateMachineListItem { - s.Name = &v - return s -} - -// SetStateMachineArn sets the StateMachineArn field's value. -func (s *StateMachineListItem) SetStateMachineArn(v string) *StateMachineListItem { - s.StateMachineArn = &v - return s -} - -type StopExecutionInput struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` - - // The Amazon Resource Name (ARN) of the execution to stop. - // - // ExecutionArn is a required field - ExecutionArn *string `locationName:"executionArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StopExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopExecutionInput"} - if s.ExecutionArn == nil { - invalidParams.Add(request.NewErrParamRequired("ExecutionArn")) - } - if s.ExecutionArn != nil && len(*s.ExecutionArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExecutionArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCause sets the Cause field's value. -func (s *StopExecutionInput) SetCause(v string) *StopExecutionInput { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *StopExecutionInput) SetError(v string) *StopExecutionInput { - s.Error = &v - return s -} - -// SetExecutionArn sets the ExecutionArn field's value. -func (s *StopExecutionInput) SetExecutionArn(v string) *StopExecutionInput { - s.ExecutionArn = &v - return s -} - -type StopExecutionOutput struct { - _ struct{} `type:"structure"` - - // The date the execution is stopped. - // - // StopDate is a required field - StopDate *time.Time `locationName:"stopDate" type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s StopExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopExecutionOutput) GoString() string { - return s.String() -} - -// SetStopDate sets the StopDate field's value. -func (s *StopExecutionOutput) SetStopDate(v time.Time) *StopExecutionOutput { - s.StopDate = &v - return s -} - -// Tags are key-value pairs that can be associated with Step Functions state -// machines and activities. -type Tag struct { - _ struct{} `type:"structure"` - - // The key of a tag. - Key *string `locationName:"key" min:"1" type:"string"` - - // The value of a tag. - Value *string `locationName:"value" type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the Step Functions state machine or activity. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` - - // The list of tags to add to a resource. - // - // Tags may only contain unicode letters, digits, whitespace, or these symbols: - // _ . : / = + - @. - // - // Tags is a required field - Tags []*Tag `locationName:"tags" type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -// Contains details about a task failure event. -type TaskFailedEventDetails struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` - - // The service name of the resource in a task state. - // - // Resource is a required field - Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - - // The action of the resource called by a task state. - // - // ResourceType is a required field - ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TaskFailedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskFailedEventDetails) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *TaskFailedEventDetails) SetCause(v string) *TaskFailedEventDetails { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *TaskFailedEventDetails) SetError(v string) *TaskFailedEventDetails { - s.Error = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *TaskFailedEventDetails) SetResource(v string) *TaskFailedEventDetails { - s.Resource = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TaskFailedEventDetails) SetResourceType(v string) *TaskFailedEventDetails { - s.ResourceType = &v - return s -} - -// Contains details about a task scheduled during an execution. -type TaskScheduledEventDetails struct { - _ struct{} `type:"structure"` - - // The JSON data passed to the resource referenced in a task state. - // - // Parameters is a required field - Parameters *string `locationName:"parameters" type:"string" required:"true" sensitive:"true"` - - // The region of the scheduled task - // - // Region is a required field - Region *string `locationName:"region" min:"1" type:"string" required:"true"` - - // The service name of the resource in a task state. - // - // Resource is a required field - Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - - // The action of the resource called by a task state. - // - // ResourceType is a required field - ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` - - // The maximum allowed duration of the task. - TimeoutInSeconds *int64 `locationName:"timeoutInSeconds" type:"long"` -} - -// String returns the string representation -func (s TaskScheduledEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskScheduledEventDetails) GoString() string { - return s.String() -} - -// SetParameters sets the Parameters field's value. -func (s *TaskScheduledEventDetails) SetParameters(v string) *TaskScheduledEventDetails { - s.Parameters = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *TaskScheduledEventDetails) SetRegion(v string) *TaskScheduledEventDetails { - s.Region = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *TaskScheduledEventDetails) SetResource(v string) *TaskScheduledEventDetails { - s.Resource = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TaskScheduledEventDetails) SetResourceType(v string) *TaskScheduledEventDetails { - s.ResourceType = &v - return s -} - -// SetTimeoutInSeconds sets the TimeoutInSeconds field's value. -func (s *TaskScheduledEventDetails) SetTimeoutInSeconds(v int64) *TaskScheduledEventDetails { - s.TimeoutInSeconds = &v - return s -} - -// Contains details about a task that failed to start during an execution. -type TaskStartFailedEventDetails struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` - - // The service name of the resource in a task state. - // - // Resource is a required field - Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - - // The action of the resource called by a task state. - // - // ResourceType is a required field - ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TaskStartFailedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskStartFailedEventDetails) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *TaskStartFailedEventDetails) SetCause(v string) *TaskStartFailedEventDetails { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *TaskStartFailedEventDetails) SetError(v string) *TaskStartFailedEventDetails { - s.Error = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *TaskStartFailedEventDetails) SetResource(v string) *TaskStartFailedEventDetails { - s.Resource = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TaskStartFailedEventDetails) SetResourceType(v string) *TaskStartFailedEventDetails { - s.ResourceType = &v - return s -} - -// Contains details about the start of a task during an execution. -type TaskStartedEventDetails struct { - _ struct{} `type:"structure"` - - // The service name of the resource in a task state. - // - // Resource is a required field - Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - - // The action of the resource called by a task state. - // - // ResourceType is a required field - ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TaskStartedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskStartedEventDetails) GoString() string { - return s.String() -} - -// SetResource sets the Resource field's value. -func (s *TaskStartedEventDetails) SetResource(v string) *TaskStartedEventDetails { - s.Resource = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TaskStartedEventDetails) SetResourceType(v string) *TaskStartedEventDetails { - s.ResourceType = &v - return s -} - -// Contains details about a task that failed to submit during an execution. -type TaskSubmitFailedEventDetails struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` - - // The service name of the resource in a task state. - // - // Resource is a required field - Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - - // The action of the resource called by a task state. - // - // ResourceType is a required field - ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TaskSubmitFailedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskSubmitFailedEventDetails) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *TaskSubmitFailedEventDetails) SetCause(v string) *TaskSubmitFailedEventDetails { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *TaskSubmitFailedEventDetails) SetError(v string) *TaskSubmitFailedEventDetails { - s.Error = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *TaskSubmitFailedEventDetails) SetResource(v string) *TaskSubmitFailedEventDetails { - s.Resource = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TaskSubmitFailedEventDetails) SetResourceType(v string) *TaskSubmitFailedEventDetails { - s.ResourceType = &v - return s -} - -// Contains details about a task submitted to a resource . -type TaskSubmittedEventDetails struct { - _ struct{} `type:"structure"` - - // The response from a resource when a task has started. - Output *string `locationName:"output" type:"string" sensitive:"true"` - - // The service name of the resource in a task state. - // - // Resource is a required field - Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - - // The action of the resource called by a task state. - // - // ResourceType is a required field - ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TaskSubmittedEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskSubmittedEventDetails) GoString() string { - return s.String() -} - -// SetOutput sets the Output field's value. -func (s *TaskSubmittedEventDetails) SetOutput(v string) *TaskSubmittedEventDetails { - s.Output = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *TaskSubmittedEventDetails) SetResource(v string) *TaskSubmittedEventDetails { - s.Resource = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TaskSubmittedEventDetails) SetResourceType(v string) *TaskSubmittedEventDetails { - s.ResourceType = &v - return s -} - -// Contains details about the successful completion of a task state. -type TaskSucceededEventDetails struct { - _ struct{} `type:"structure"` - - // The full JSON response from a resource when a task has succeeded. This response - // becomes the output of the related task. - Output *string `locationName:"output" type:"string" sensitive:"true"` - - // The service name of the resource in a task state. - // - // Resource is a required field - Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - - // The action of the resource called by a task state. - // - // ResourceType is a required field - ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TaskSucceededEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskSucceededEventDetails) GoString() string { - return s.String() -} - -// SetOutput sets the Output field's value. -func (s *TaskSucceededEventDetails) SetOutput(v string) *TaskSucceededEventDetails { - s.Output = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *TaskSucceededEventDetails) SetResource(v string) *TaskSucceededEventDetails { - s.Resource = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TaskSucceededEventDetails) SetResourceType(v string) *TaskSucceededEventDetails { - s.ResourceType = &v - return s -} - -// Contains details about a resource timeout that occurred during an execution. -type TaskTimedOutEventDetails struct { - _ struct{} `type:"structure"` - - // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string" sensitive:"true"` - - // The error code of the failure. - Error *string `locationName:"error" type:"string" sensitive:"true"` - - // The service name of the resource in a task state. - // - // Resource is a required field - Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - - // The action of the resource called by a task state. - // - // ResourceType is a required field - ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TaskTimedOutEventDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskTimedOutEventDetails) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *TaskTimedOutEventDetails) SetCause(v string) *TaskTimedOutEventDetails { - s.Cause = &v - return s -} - -// SetError sets the Error field's value. -func (s *TaskTimedOutEventDetails) SetError(v string) *TaskTimedOutEventDetails { - s.Error = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *TaskTimedOutEventDetails) SetResource(v string) *TaskTimedOutEventDetails { - s.Resource = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *TaskTimedOutEventDetails) SetResourceType(v string) *TaskTimedOutEventDetails { - s.ResourceType = &v - return s -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) for the Step Functions state machine or activity. - // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` - - // The list of tags to remove from the resource. - // - // TagKeys is a required field - TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` -} - -// String returns the string representation -func (s UntagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { - s.ResourceArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UpdateStateMachineInput struct { - _ struct{} `type:"structure"` - - // The Amazon States Language definition of the state machine. See Amazon States - // Language (http://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html). - Definition *string `locationName:"definition" min:"1" type:"string" sensitive:"true"` - - // The Amazon Resource Name (ARN) of the IAM role of the state machine. - RoleArn *string `locationName:"roleArn" min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the state machine. - // - // StateMachineArn is a required field - StateMachineArn *string `locationName:"stateMachineArn" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateStateMachineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStateMachineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateStateMachineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateStateMachineInput"} - if s.Definition != nil && len(*s.Definition) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Definition", 1)) - } - if s.RoleArn != nil && len(*s.RoleArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) - } - if s.StateMachineArn == nil { - invalidParams.Add(request.NewErrParamRequired("StateMachineArn")) - } - if s.StateMachineArn != nil && len(*s.StateMachineArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StateMachineArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefinition sets the Definition field's value. -func (s *UpdateStateMachineInput) SetDefinition(v string) *UpdateStateMachineInput { - s.Definition = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *UpdateStateMachineInput) SetRoleArn(v string) *UpdateStateMachineInput { - s.RoleArn = &v - return s -} - -// SetStateMachineArn sets the StateMachineArn field's value. -func (s *UpdateStateMachineInput) SetStateMachineArn(v string) *UpdateStateMachineInput { - s.StateMachineArn = &v - return s -} - -type UpdateStateMachineOutput struct { - _ struct{} `type:"structure"` - - // The date and time the state machine was updated. - // - // UpdateDate is a required field - UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s UpdateStateMachineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateStateMachineOutput) GoString() string { - return s.String() -} - -// SetUpdateDate sets the UpdateDate field's value. -func (s *UpdateStateMachineOutput) SetUpdateDate(v time.Time) *UpdateStateMachineOutput { - s.UpdateDate = &v - return s -} - -const ( - // ExecutionStatusRunning is a ExecutionStatus enum value - ExecutionStatusRunning = "RUNNING" - - // ExecutionStatusSucceeded is a ExecutionStatus enum value - ExecutionStatusSucceeded = "SUCCEEDED" - - // ExecutionStatusFailed is a ExecutionStatus enum value - ExecutionStatusFailed = "FAILED" - - // ExecutionStatusTimedOut is a ExecutionStatus enum value - ExecutionStatusTimedOut = "TIMED_OUT" - - // ExecutionStatusAborted is a ExecutionStatus enum value - ExecutionStatusAborted = "ABORTED" -) - -const ( - // HistoryEventTypeActivityFailed is a HistoryEventType enum value - HistoryEventTypeActivityFailed = "ActivityFailed" - - // HistoryEventTypeActivityScheduleFailed is a HistoryEventType enum value - HistoryEventTypeActivityScheduleFailed = "ActivityScheduleFailed" - - // HistoryEventTypeActivityScheduled is a HistoryEventType enum value - HistoryEventTypeActivityScheduled = "ActivityScheduled" - - // HistoryEventTypeActivityStarted is a HistoryEventType enum value - HistoryEventTypeActivityStarted = "ActivityStarted" - - // HistoryEventTypeActivitySucceeded is a HistoryEventType enum value - HistoryEventTypeActivitySucceeded = "ActivitySucceeded" - - // HistoryEventTypeActivityTimedOut is a HistoryEventType enum value - HistoryEventTypeActivityTimedOut = "ActivityTimedOut" - - // HistoryEventTypeChoiceStateEntered is a HistoryEventType enum value - HistoryEventTypeChoiceStateEntered = "ChoiceStateEntered" - - // HistoryEventTypeChoiceStateExited is a HistoryEventType enum value - HistoryEventTypeChoiceStateExited = "ChoiceStateExited" - - // HistoryEventTypeTaskFailed is a HistoryEventType enum value - HistoryEventTypeTaskFailed = "TaskFailed" - - // HistoryEventTypeTaskScheduled is a HistoryEventType enum value - HistoryEventTypeTaskScheduled = "TaskScheduled" - - // HistoryEventTypeTaskStartFailed is a HistoryEventType enum value - HistoryEventTypeTaskStartFailed = "TaskStartFailed" - - // HistoryEventTypeTaskStarted is a HistoryEventType enum value - HistoryEventTypeTaskStarted = "TaskStarted" - - // HistoryEventTypeTaskSubmitFailed is a HistoryEventType enum value - HistoryEventTypeTaskSubmitFailed = "TaskSubmitFailed" - - // HistoryEventTypeTaskSubmitted is a HistoryEventType enum value - HistoryEventTypeTaskSubmitted = "TaskSubmitted" - - // HistoryEventTypeTaskSucceeded is a HistoryEventType enum value - HistoryEventTypeTaskSucceeded = "TaskSucceeded" - - // HistoryEventTypeTaskTimedOut is a HistoryEventType enum value - HistoryEventTypeTaskTimedOut = "TaskTimedOut" - - // HistoryEventTypeExecutionFailed is a HistoryEventType enum value - HistoryEventTypeExecutionFailed = "ExecutionFailed" - - // HistoryEventTypeExecutionStarted is a HistoryEventType enum value - HistoryEventTypeExecutionStarted = "ExecutionStarted" - - // HistoryEventTypeExecutionSucceeded is a HistoryEventType enum value - HistoryEventTypeExecutionSucceeded = "ExecutionSucceeded" - - // HistoryEventTypeExecutionAborted is a HistoryEventType enum value - HistoryEventTypeExecutionAborted = "ExecutionAborted" - - // HistoryEventTypeExecutionTimedOut is a HistoryEventType enum value - HistoryEventTypeExecutionTimedOut = "ExecutionTimedOut" - - // HistoryEventTypeFailStateEntered is a HistoryEventType enum value - HistoryEventTypeFailStateEntered = "FailStateEntered" - - // HistoryEventTypeLambdaFunctionFailed is a HistoryEventType enum value - HistoryEventTypeLambdaFunctionFailed = "LambdaFunctionFailed" - - // HistoryEventTypeLambdaFunctionScheduleFailed is a HistoryEventType enum value - HistoryEventTypeLambdaFunctionScheduleFailed = "LambdaFunctionScheduleFailed" - - // HistoryEventTypeLambdaFunctionScheduled is a HistoryEventType enum value - HistoryEventTypeLambdaFunctionScheduled = "LambdaFunctionScheduled" - - // HistoryEventTypeLambdaFunctionStartFailed is a HistoryEventType enum value - HistoryEventTypeLambdaFunctionStartFailed = "LambdaFunctionStartFailed" - - // HistoryEventTypeLambdaFunctionStarted is a HistoryEventType enum value - HistoryEventTypeLambdaFunctionStarted = "LambdaFunctionStarted" - - // HistoryEventTypeLambdaFunctionSucceeded is a HistoryEventType enum value - HistoryEventTypeLambdaFunctionSucceeded = "LambdaFunctionSucceeded" - - // HistoryEventTypeLambdaFunctionTimedOut is a HistoryEventType enum value - HistoryEventTypeLambdaFunctionTimedOut = "LambdaFunctionTimedOut" - - // HistoryEventTypeSucceedStateEntered is a HistoryEventType enum value - HistoryEventTypeSucceedStateEntered = "SucceedStateEntered" - - // HistoryEventTypeSucceedStateExited is a HistoryEventType enum value - HistoryEventTypeSucceedStateExited = "SucceedStateExited" - - // HistoryEventTypeTaskStateAborted is a HistoryEventType enum value - HistoryEventTypeTaskStateAborted = "TaskStateAborted" - - // HistoryEventTypeTaskStateEntered is a HistoryEventType enum value - HistoryEventTypeTaskStateEntered = "TaskStateEntered" - - // HistoryEventTypeTaskStateExited is a HistoryEventType enum value - HistoryEventTypeTaskStateExited = "TaskStateExited" - - // HistoryEventTypePassStateEntered is a HistoryEventType enum value - HistoryEventTypePassStateEntered = "PassStateEntered" - - // HistoryEventTypePassStateExited is a HistoryEventType enum value - HistoryEventTypePassStateExited = "PassStateExited" - - // HistoryEventTypeParallelStateAborted is a HistoryEventType enum value - HistoryEventTypeParallelStateAborted = "ParallelStateAborted" - - // HistoryEventTypeParallelStateEntered is a HistoryEventType enum value - HistoryEventTypeParallelStateEntered = "ParallelStateEntered" - - // HistoryEventTypeParallelStateExited is a HistoryEventType enum value - HistoryEventTypeParallelStateExited = "ParallelStateExited" - - // HistoryEventTypeParallelStateFailed is a HistoryEventType enum value - HistoryEventTypeParallelStateFailed = "ParallelStateFailed" - - // HistoryEventTypeParallelStateStarted is a HistoryEventType enum value - HistoryEventTypeParallelStateStarted = "ParallelStateStarted" - - // HistoryEventTypeParallelStateSucceeded is a HistoryEventType enum value - HistoryEventTypeParallelStateSucceeded = "ParallelStateSucceeded" - - // HistoryEventTypeWaitStateAborted is a HistoryEventType enum value - HistoryEventTypeWaitStateAborted = "WaitStateAborted" - - // HistoryEventTypeWaitStateEntered is a HistoryEventType enum value - HistoryEventTypeWaitStateEntered = "WaitStateEntered" - - // HistoryEventTypeWaitStateExited is a HistoryEventType enum value - HistoryEventTypeWaitStateExited = "WaitStateExited" -) - -const ( - // StateMachineStatusActive is a StateMachineStatus enum value - StateMachineStatusActive = "ACTIVE" - - // StateMachineStatusDeleting is a StateMachineStatus enum value - StateMachineStatusDeleting = "DELETING" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/doc.go deleted file mode 100644 index d212dce74..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/doc.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package sfn provides the client and types for making API -// requests to AWS Step Functions. -// -// AWS Step Functions is a service that lets you coordinate the components of -// distributed applications and microservices using visual workflows. -// -// You can use Step Functions to build applications from individual components, -// each of which performs a discrete function, or task, allowing you to scale -// and change applications quickly. Step Functions provides a console that helps -// visualize the components of your application as a series of steps. Step Functions -// automatically triggers and tracks each step, and retries steps when there -// are errors, so your application executes predictably and in the right order -// every time. Step Functions logs the state of each step, so you can quickly -// diagnose and debug any issues. -// -// Step Functions manages operations and underlying infrastructure to ensure -// your application is available at any scale. You can run tasks on AWS, your -// own servers, or any system that has access to AWS. You can access and use -// Step Functions using the console, the AWS SDKs, or an HTTP API. For more -// information about Step Functions, see the AWS Step Functions Developer Guide -// (http://docs.aws.amazon.com/step-functions/latest/dg/welcome.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23 for more information on this service. -// -// See sfn package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/sfn/ -// -// Using the Client -// -// To contact AWS Step Functions 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 Step Functions client SFN for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/sfn/#New -package sfn diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go deleted file mode 100644 index fcf27534f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package sfn - -const ( - - // ErrCodeActivityDoesNotExist for service response error code - // "ActivityDoesNotExist". - // - // The specified activity does not exist. - ErrCodeActivityDoesNotExist = "ActivityDoesNotExist" - - // ErrCodeActivityLimitExceeded for service response error code - // "ActivityLimitExceeded". - // - // The maximum number of activities has been reached. Existing activities must - // be deleted before a new activity can be created. - ErrCodeActivityLimitExceeded = "ActivityLimitExceeded" - - // ErrCodeActivityWorkerLimitExceeded for service response error code - // "ActivityWorkerLimitExceeded". - // - // The maximum number of workers concurrently polling for activity tasks has - // been reached. - ErrCodeActivityWorkerLimitExceeded = "ActivityWorkerLimitExceeded" - - // ErrCodeExecutionAlreadyExists for service response error code - // "ExecutionAlreadyExists". - // - // The execution has the same name as another execution (but a different input). - // - // Executions with the same name and input are considered idempotent. - ErrCodeExecutionAlreadyExists = "ExecutionAlreadyExists" - - // ErrCodeExecutionDoesNotExist for service response error code - // "ExecutionDoesNotExist". - // - // The specified execution does not exist. - ErrCodeExecutionDoesNotExist = "ExecutionDoesNotExist" - - // ErrCodeExecutionLimitExceeded for service response error code - // "ExecutionLimitExceeded". - // - // The maximum number of running executions has been reached. Running executions - // must end or be stopped before a new execution can be started. - ErrCodeExecutionLimitExceeded = "ExecutionLimitExceeded" - - // ErrCodeInvalidArn for service response error code - // "InvalidArn". - // - // The provided Amazon Resource Name (ARN) is invalid. - ErrCodeInvalidArn = "InvalidArn" - - // ErrCodeInvalidDefinition for service response error code - // "InvalidDefinition". - // - // The provided Amazon States Language definition is invalid. - ErrCodeInvalidDefinition = "InvalidDefinition" - - // ErrCodeInvalidExecutionInput for service response error code - // "InvalidExecutionInput". - // - // The provided JSON input data is invalid. - ErrCodeInvalidExecutionInput = "InvalidExecutionInput" - - // ErrCodeInvalidName for service response error code - // "InvalidName". - // - // The provided name is invalid. - ErrCodeInvalidName = "InvalidName" - - // ErrCodeInvalidOutput for service response error code - // "InvalidOutput". - // - // The provided JSON output data is invalid. - ErrCodeInvalidOutput = "InvalidOutput" - - // ErrCodeInvalidToken for service response error code - // "InvalidToken". - // - // The provided token is invalid. - ErrCodeInvalidToken = "InvalidToken" - - // ErrCodeMissingRequiredParameter for service response error code - // "MissingRequiredParameter". - // - // Request is missing a required parameter. This error occurs if both definition - // and roleArn are not specified. - ErrCodeMissingRequiredParameter = "MissingRequiredParameter" - - // ErrCodeResourceNotFound for service response error code - // "ResourceNotFound". - // - // Could not fine the referenced resource. Only state machine and activity ARNs - // are supported. - ErrCodeResourceNotFound = "ResourceNotFound" - - // ErrCodeStateMachineAlreadyExists for service response error code - // "StateMachineAlreadyExists". - // - // A state machine with the same name but a different definition or role ARN - // already exists. - ErrCodeStateMachineAlreadyExists = "StateMachineAlreadyExists" - - // ErrCodeStateMachineDeleting for service response error code - // "StateMachineDeleting". - // - // The specified state machine is being deleted. - ErrCodeStateMachineDeleting = "StateMachineDeleting" - - // ErrCodeStateMachineDoesNotExist for service response error code - // "StateMachineDoesNotExist". - // - // The specified state machine does not exist. - ErrCodeStateMachineDoesNotExist = "StateMachineDoesNotExist" - - // ErrCodeStateMachineLimitExceeded for service response error code - // "StateMachineLimitExceeded". - // - // The maximum number of state machines has been reached. Existing state machines - // must be deleted before a new state machine can be created. - ErrCodeStateMachineLimitExceeded = "StateMachineLimitExceeded" - - // ErrCodeTaskDoesNotExist for service response error code - // "TaskDoesNotExist". - ErrCodeTaskDoesNotExist = "TaskDoesNotExist" - - // ErrCodeTaskTimedOut for service response error code - // "TaskTimedOut". - ErrCodeTaskTimedOut = "TaskTimedOut" - - // ErrCodeTooManyTags for service response error code - // "TooManyTags". - // - // You've exceeded the number of tags allowed for a resource. See the Limits - // Topic (http://docs.aws.amazon.com/step-functions/latest/dg/limits.html) in - // the AWS Step Functions Developer Guide. - ErrCodeTooManyTags = "TooManyTags" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/service.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/service.go deleted file mode 100644 index 2436268f0..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package sfn - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// SFN provides the API operation methods for making requests to -// AWS Step Functions. See this package's package overview docs -// for details on the service. -// -// SFN methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type SFN 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 = "states" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "SFN" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the SFN client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a SFN client from just a session. -// svc := sfn.New(mySession) -// -// // Create a SFN client with additional configuration -// svc := sfn.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *SFN { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *SFN { - svc := &SFN{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2016-11-23", - JSONVersion: "1.0", - TargetPrefix: "AWSStepFunctions", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a SFN operation and runs any -// custom request initialization. -func (c *SFN) 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/simpledb/api.go b/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go deleted file mode 100644 index 8304b0635..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go +++ /dev/null @@ -1,2316 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package simpledb - -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/query" -) - -const opBatchDeleteAttributes = "BatchDeleteAttributes" - -// BatchDeleteAttributesRequest generates a "aws/request.Request" representing the -// client's request for the BatchDeleteAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchDeleteAttributes for more information on using the BatchDeleteAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchDeleteAttributesRequest method. -// req, resp := client.BatchDeleteAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SimpleDB) BatchDeleteAttributesRequest(input *BatchDeleteAttributesInput) (req *request.Request, output *BatchDeleteAttributesOutput) { - op := &request.Operation{ - Name: opBatchDeleteAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchDeleteAttributesInput{} - } - - output = &BatchDeleteAttributesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// BatchDeleteAttributes API operation for Amazon SimpleDB. -// -// Performs multiple DeleteAttributes operations in a single call, which reduces -// round trips and latencies. This enables Amazon SimpleDB to optimize requests, -// which generally yields better throughput. -// -// If you specify BatchDeleteAttributes without attributes or values, all the -// attributes for the item are deleted. -// -// BatchDeleteAttributes is an idempotent operation; running it multiple times -// on the same item or attribute doesn't result in an error. -// -// The BatchDeleteAttributes operation succeeds or fails in its entirety. There -// are no partial deletes. You can execute multiple BatchDeleteAttributes operations -// and other operations in parallel. However, large numbers of concurrent BatchDeleteAttributes -// calls can result in Service Unavailable (503) responses. -// -// This operation is vulnerable to exceeding the maximum URL size when making -// a REST request using the HTTP GET method. -// -// This operation does not support conditions using Expected.X.Name, Expected.X.Value, -// or Expected.X.Exists. -// -// The following limitations are enforced for this operation: 1 MB request size -// -// 25 item limit per BatchDeleteAttributes operation -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SimpleDB's -// API operation BatchDeleteAttributes for usage and error information. -func (c *SimpleDB) BatchDeleteAttributes(input *BatchDeleteAttributesInput) (*BatchDeleteAttributesOutput, error) { - req, out := c.BatchDeleteAttributesRequest(input) - return out, req.Send() -} - -// BatchDeleteAttributesWithContext is the same as BatchDeleteAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See BatchDeleteAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SimpleDB) BatchDeleteAttributesWithContext(ctx aws.Context, input *BatchDeleteAttributesInput, opts ...request.Option) (*BatchDeleteAttributesOutput, error) { - req, out := c.BatchDeleteAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opBatchPutAttributes = "BatchPutAttributes" - -// BatchPutAttributesRequest generates a "aws/request.Request" representing the -// client's request for the BatchPutAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See BatchPutAttributes for more information on using the BatchPutAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the BatchPutAttributesRequest method. -// req, resp := client.BatchPutAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SimpleDB) BatchPutAttributesRequest(input *BatchPutAttributesInput) (req *request.Request, output *BatchPutAttributesOutput) { - op := &request.Operation{ - Name: opBatchPutAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &BatchPutAttributesInput{} - } - - output = &BatchPutAttributesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// BatchPutAttributes API operation for Amazon SimpleDB. -// -// The BatchPutAttributes operation creates or replaces attributes within one -// or more items. By using this operation, the client can perform multiple PutAttribute -// operation with a single call. This helps yield savings in round trips and -// latencies, enabling Amazon SimpleDB to optimize requests and generally produce -// better throughput. -// -// The client may specify the item name with the Item.X.ItemName parameter. -// The client may specify new attributes using a combination of the Item.X.Attribute.Y.Name -// and Item.X.Attribute.Y.Value parameters. The client may specify the first -// attribute for the first item using the parameters Item.0.Attribute.0.Name -// and Item.0.Attribute.0.Value, and for the second attribute for the first -// item by the parameters Item.0.Attribute.1.Name and Item.0.Attribute.1.Value, -// and so on. -// -// Attributes are uniquely identified within an item by their name/value combination. -// For example, a single item can have the attributes { "first_name", "first_value" -// } and { "first_name", "second_value" }. However, it cannot have two attribute -// instances where both the Item.X.Attribute.Y.Name and Item.X.Attribute.Y.Value -// are the same. -// -// Optionally, the requester can supply the Replace parameter for each individual -// value. Setting this value to true will cause the new attribute values to -// replace the existing attribute values. For example, if an item I has the -// attributes { 'a', '1' }, { 'b', '2'} and { 'b', '3' } and the requester does -// a BatchPutAttributes of {'I', 'b', '4' } with the Replace parameter set to -// true, the final attributes of the item will be { 'a', '1' } and { 'b', '4' -// }, replacing the previous values of the 'b' attribute with the new value. -// -// You cannot specify an empty string as an item or as an attribute name. The -// BatchPutAttributes operation succeeds or fails in its entirety. There are -// no partial puts. This operation is vulnerable to exceeding the maximum URL size when making -// a REST request using the HTTP GET method. This operation does not support -// conditions using Expected.X.Name, Expected.X.Value, or Expected.X.Exists. -// You can execute multiple BatchPutAttributes operations and other operations -// in parallel. However, large numbers of concurrent BatchPutAttributes calls -// can result in Service Unavailable (503) responses. -// -// The following limitations are enforced for this operation: 256 attribute -// name-value pairs per item -// 1 MB request size -// 1 billion attributes per domain -// 10 GB of total user data storage per domain -// 25 item limit per BatchPutAttributes operation -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SimpleDB's -// API operation BatchPutAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDuplicateItemName "DuplicateItemName" -// The item name was specified more than once. -// -// * ErrCodeInvalidParameterValue "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeMissingParameter "MissingParameter" -// The request must contain the specified missing parameter. -// -// * ErrCodeNoSuchDomain "NoSuchDomain" -// The specified domain does not exist. -// -// * ErrCodeNumberItemAttributesExceeded "NumberItemAttributesExceeded" -// Too many attributes in this item. -// -// * ErrCodeNumberDomainAttributesExceeded "NumberDomainAttributesExceeded" -// Too many attributes in this domain. -// -// * ErrCodeNumberDomainBytesExceeded "NumberDomainBytesExceeded" -// Too many bytes in this domain. -// -// * ErrCodeNumberSubmittedItemsExceeded "NumberSubmittedItemsExceeded" -// Too many items exist in a single call. -// -// * ErrCodeNumberSubmittedAttributesExceeded "NumberSubmittedAttributesExceeded" -// Too many attributes exist in a single call. -// -func (c *SimpleDB) BatchPutAttributes(input *BatchPutAttributesInput) (*BatchPutAttributesOutput, error) { - req, out := c.BatchPutAttributesRequest(input) - return out, req.Send() -} - -// BatchPutAttributesWithContext is the same as BatchPutAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See BatchPutAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SimpleDB) BatchPutAttributesWithContext(ctx aws.Context, input *BatchPutAttributesInput, opts ...request.Option) (*BatchPutAttributesOutput, error) { - req, out := c.BatchPutAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDomain = "CreateDomain" - -// CreateDomainRequest generates a "aws/request.Request" representing the -// client's request for the CreateDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDomain for more information on using the CreateDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDomainRequest method. -// req, resp := client.CreateDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SimpleDB) CreateDomainRequest(input *CreateDomainInput) (req *request.Request, output *CreateDomainOutput) { - op := &request.Operation{ - Name: opCreateDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDomainInput{} - } - - output = &CreateDomainOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateDomain API operation for Amazon SimpleDB. -// -// The CreateDomain operation creates a new domain. The domain name should be -// unique among the domains associated with the Access Key ID provided in the -// request. The CreateDomain operation may take 10 or more seconds to complete. -// -// CreateDomain is an idempotent operation; running it multiple times using -// the same domain name will not result in an error response. The client can create up to 100 domains per account. -// -// If the client requires additional domains, go to http://aws.amazon.com/contact-us/simpledb-limit-request/ -// (http://aws.amazon.com/contact-us/simpledb-limit-request/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SimpleDB's -// API operation CreateDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValue "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeMissingParameter "MissingParameter" -// The request must contain the specified missing parameter. -// -// * ErrCodeNumberDomainsExceeded "NumberDomainsExceeded" -// Too many domains exist per this account. -// -func (c *SimpleDB) CreateDomain(input *CreateDomainInput) (*CreateDomainOutput, error) { - req, out := c.CreateDomainRequest(input) - return out, req.Send() -} - -// CreateDomainWithContext is the same as CreateDomain with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SimpleDB) CreateDomainWithContext(ctx aws.Context, input *CreateDomainInput, opts ...request.Option) (*CreateDomainOutput, error) { - req, out := c.CreateDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAttributes = "DeleteAttributes" - -// DeleteAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAttributes for more information on using the DeleteAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAttributesRequest method. -// req, resp := client.DeleteAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SimpleDB) DeleteAttributesRequest(input *DeleteAttributesInput) (req *request.Request, output *DeleteAttributesOutput) { - op := &request.Operation{ - Name: opDeleteAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAttributesInput{} - } - - output = &DeleteAttributesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAttributes API operation for Amazon SimpleDB. -// -// Deletes one or more attributes associated with an item. If all attributes -// of the item are deleted, the item is deleted. -// -// If DeleteAttributes is called without being passed any attributes or values -// specified, all the attributes for the item are deleted. DeleteAttributes is an idempotent operation; running it multiple times on -// the same item or attribute does not result in an error response. -// -// Because Amazon SimpleDB makes multiple copies of item data and uses an eventual -// consistency update model, performing a GetAttributes or Select operation -// (read) immediately after a DeleteAttributes or PutAttributes operation (write) -// might not return updated item data. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SimpleDB's -// API operation DeleteAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValue "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeMissingParameter "MissingParameter" -// The request must contain the specified missing parameter. -// -// * ErrCodeNoSuchDomain "NoSuchDomain" -// The specified domain does not exist. -// -// * ErrCodeAttributeDoesNotExist "AttributeDoesNotExist" -// The specified attribute does not exist. -// -func (c *SimpleDB) DeleteAttributes(input *DeleteAttributesInput) (*DeleteAttributesOutput, error) { - req, out := c.DeleteAttributesRequest(input) - return out, req.Send() -} - -// DeleteAttributesWithContext is the same as DeleteAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SimpleDB) DeleteAttributesWithContext(ctx aws.Context, input *DeleteAttributesInput, opts ...request.Option) (*DeleteAttributesOutput, error) { - req, out := c.DeleteAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDomain = "DeleteDomain" - -// DeleteDomainRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDomain for more information on using the DeleteDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDomainRequest method. -// req, resp := client.DeleteDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SimpleDB) DeleteDomainRequest(input *DeleteDomainInput) (req *request.Request, output *DeleteDomainOutput) { - op := &request.Operation{ - Name: opDeleteDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDomainInput{} - } - - output = &DeleteDomainOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDomain API operation for Amazon SimpleDB. -// -// The DeleteDomain operation deletes a domain. Any items (and their attributes) -// in the domain are deleted as well. The DeleteDomain operation might take -// 10 or more seconds to complete. -// -// Running DeleteDomain on a domain that does not exist or running the function -// multiple times using the same domain name will not result in an error response. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SimpleDB's -// API operation DeleteDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMissingParameter "MissingParameter" -// The request must contain the specified missing parameter. -// -func (c *SimpleDB) DeleteDomain(input *DeleteDomainInput) (*DeleteDomainOutput, error) { - req, out := c.DeleteDomainRequest(input) - return out, req.Send() -} - -// DeleteDomainWithContext is the same as DeleteDomain with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SimpleDB) DeleteDomainWithContext(ctx aws.Context, input *DeleteDomainInput, opts ...request.Option) (*DeleteDomainOutput, error) { - req, out := c.DeleteDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDomainMetadata = "DomainMetadata" - -// DomainMetadataRequest generates a "aws/request.Request" representing the -// client's request for the DomainMetadata operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DomainMetadata for more information on using the DomainMetadata -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DomainMetadataRequest method. -// req, resp := client.DomainMetadataRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SimpleDB) DomainMetadataRequest(input *DomainMetadataInput) (req *request.Request, output *DomainMetadataOutput) { - op := &request.Operation{ - Name: opDomainMetadata, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DomainMetadataInput{} - } - - output = &DomainMetadataOutput{} - req = c.newRequest(op, input, output) - return -} - -// DomainMetadata API operation for Amazon SimpleDB. -// -// Returns information about the domain, including when the domain was created, -// the number of items and attributes in the domain, and the size of the attribute -// names and values. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SimpleDB's -// API operation DomainMetadata for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMissingParameter "MissingParameter" -// The request must contain the specified missing parameter. -// -// * ErrCodeNoSuchDomain "NoSuchDomain" -// The specified domain does not exist. -// -func (c *SimpleDB) DomainMetadata(input *DomainMetadataInput) (*DomainMetadataOutput, error) { - req, out := c.DomainMetadataRequest(input) - return out, req.Send() -} - -// DomainMetadataWithContext is the same as DomainMetadata with the addition of -// the ability to pass a context and additional request options. -// -// See DomainMetadata for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SimpleDB) DomainMetadataWithContext(ctx aws.Context, input *DomainMetadataInput, opts ...request.Option) (*DomainMetadataOutput, error) { - req, out := c.DomainMetadataRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAttributes = "GetAttributes" - -// GetAttributesRequest generates a "aws/request.Request" representing the -// client's request for the GetAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAttributes for more information on using the GetAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAttributesRequest method. -// req, resp := client.GetAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SimpleDB) GetAttributesRequest(input *GetAttributesInput) (req *request.Request, output *GetAttributesOutput) { - op := &request.Operation{ - Name: opGetAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAttributesInput{} - } - - output = &GetAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAttributes API operation for Amazon SimpleDB. -// -// Returns all of the attributes associated with the specified item. Optionally, -// the attributes returned can be limited to one or more attributes by specifying -// an attribute name parameter. -// -// If the item does not exist on the replica that was accessed for this operation, -// an empty set is returned. The system does not return an error as it cannot -// guarantee the item does not exist on other replicas. -// -// If GetAttributes is called without being passed any attribute names, all -// the attributes for the item are returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SimpleDB's -// API operation GetAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValue "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeMissingParameter "MissingParameter" -// The request must contain the specified missing parameter. -// -// * ErrCodeNoSuchDomain "NoSuchDomain" -// The specified domain does not exist. -// -func (c *SimpleDB) GetAttributes(input *GetAttributesInput) (*GetAttributesOutput, error) { - req, out := c.GetAttributesRequest(input) - return out, req.Send() -} - -// GetAttributesWithContext is the same as GetAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See GetAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SimpleDB) GetAttributesWithContext(ctx aws.Context, input *GetAttributesInput, opts ...request.Option) (*GetAttributesOutput, error) { - req, out := c.GetAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDomains = "ListDomains" - -// ListDomainsRequest generates a "aws/request.Request" representing the -// client's request for the ListDomains operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDomains for more information on using the ListDomains -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDomainsRequest method. -// req, resp := client.ListDomainsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SimpleDB) ListDomainsRequest(input *ListDomainsInput) (req *request.Request, output *ListDomainsOutput) { - op := &request.Operation{ - Name: opListDomains, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxNumberOfDomains", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListDomainsInput{} - } - - output = &ListDomainsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDomains API operation for Amazon SimpleDB. -// -// The ListDomains operation lists all domains associated with the Access Key -// ID. It returns domain names up to the limit set by MaxNumberOfDomains (#MaxNumberOfDomains). -// A NextToken (#NextToken) is returned if there are more than MaxNumberOfDomains -// domains. Calling ListDomains successive times with the NextToken provided -// by the operation returns up to MaxNumberOfDomains more domain names with -// each successive operation call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SimpleDB's -// API operation ListDomains for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValue "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified NextToken is not valid. -// -func (c *SimpleDB) ListDomains(input *ListDomainsInput) (*ListDomainsOutput, error) { - req, out := c.ListDomainsRequest(input) - return out, req.Send() -} - -// ListDomainsWithContext is the same as ListDomains with the addition of -// the ability to pass a context and additional request options. -// -// See ListDomains for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SimpleDB) ListDomainsWithContext(ctx aws.Context, input *ListDomainsInput, opts ...request.Option) (*ListDomainsOutput, error) { - req, out := c.ListDomainsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListDomainsPages iterates over the pages of a ListDomains operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDomains method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListDomains operation. -// pageNum := 0 -// err := client.ListDomainsPages(params, -// func(page *ListDomainsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SimpleDB) ListDomainsPages(input *ListDomainsInput, fn func(*ListDomainsOutput, bool) bool) error { - return c.ListDomainsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDomainsPagesWithContext same as ListDomainsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SimpleDB) ListDomainsPagesWithContext(ctx aws.Context, input *ListDomainsInput, fn func(*ListDomainsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDomainsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDomainsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDomainsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opPutAttributes = "PutAttributes" - -// PutAttributesRequest generates a "aws/request.Request" representing the -// client's request for the PutAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutAttributes for more information on using the PutAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutAttributesRequest method. -// req, resp := client.PutAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SimpleDB) PutAttributesRequest(input *PutAttributesInput) (req *request.Request, output *PutAttributesOutput) { - op := &request.Operation{ - Name: opPutAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutAttributesInput{} - } - - output = &PutAttributesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutAttributes API operation for Amazon SimpleDB. -// -// The PutAttributes operation creates or replaces attributes in an item. The -// client may specify new attributes using a combination of the Attribute.X.Name -// and Attribute.X.Value parameters. The client specifies the first attribute -// by the parameters Attribute.0.Name and Attribute.0.Value, the second attribute -// by the parameters Attribute.1.Name and Attribute.1.Value, and so on. -// -// Attributes are uniquely identified in an item by their name/value combination. -// For example, a single item can have the attributes { "first_name", "first_value" -// } and { "first_name", second_value" }. However, it cannot have two attribute -// instances where both the Attribute.X.Name and Attribute.X.Value are the same. -// -// Optionally, the requestor can supply the Replace parameter for each individual -// attribute. Setting this value to true causes the new attribute value to replace -// the existing attribute value(s). For example, if an item has the attributes -// { 'a', '1' }, { 'b', '2'} and { 'b', '3' } and the requestor calls PutAttributes -// using the attributes { 'b', '4' } with the Replace parameter set to true, -// the final attributes of the item are changed to { 'a', '1' } and { 'b', '4' -// }, which replaces the previous values of the 'b' attribute with the new value. -// -// Using PutAttributes to replace attribute values that do not exist will not -// result in an error response. You cannot specify an empty string as an attribute name. -// -// Because Amazon SimpleDB makes multiple copies of client data and uses an -// eventual consistency update model, an immediate GetAttributes or Select operation -// (read) immediately after a PutAttributes or DeleteAttributes operation (write) -// might not return the updated data. -// -// The following limitations are enforced for this operation: 256 total attribute -// name-value pairs per item -// One billion attributes per domain -// 10 GB of total user data storage per domain -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SimpleDB's -// API operation PutAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValue "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeMissingParameter "MissingParameter" -// The request must contain the specified missing parameter. -// -// * ErrCodeNoSuchDomain "NoSuchDomain" -// The specified domain does not exist. -// -// * ErrCodeNumberDomainAttributesExceeded "NumberDomainAttributesExceeded" -// Too many attributes in this domain. -// -// * ErrCodeNumberDomainBytesExceeded "NumberDomainBytesExceeded" -// Too many bytes in this domain. -// -// * ErrCodeNumberItemAttributesExceeded "NumberItemAttributesExceeded" -// Too many attributes in this item. -// -// * ErrCodeAttributeDoesNotExist "AttributeDoesNotExist" -// The specified attribute does not exist. -// -func (c *SimpleDB) PutAttributes(input *PutAttributesInput) (*PutAttributesOutput, error) { - req, out := c.PutAttributesRequest(input) - return out, req.Send() -} - -// PutAttributesWithContext is the same as PutAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See PutAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SimpleDB) PutAttributesWithContext(ctx aws.Context, input *PutAttributesInput, opts ...request.Option) (*PutAttributesOutput, error) { - req, out := c.PutAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSelect = "Select" - -// SelectRequest generates a "aws/request.Request" representing the -// client's request for the Select operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See Select for more information on using the Select -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SelectRequest method. -// req, resp := client.SelectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SimpleDB) SelectRequest(input *SelectInput) (req *request.Request, output *SelectOutput) { - op := &request.Operation{ - Name: opSelect, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &SelectInput{} - } - - output = &SelectOutput{} - req = c.newRequest(op, input, output) - return -} - -// Select API operation for Amazon SimpleDB. -// -// The Select operation returns a set of attributes for ItemNames that match -// the select expression. Select is similar to the standard SQL SELECT statement. -// -// The total size of the response cannot exceed 1 MB in total size. Amazon SimpleDB -// automatically adjusts the number of items returned per page to enforce this -// limit. For example, if the client asks to retrieve 2500 items, but each individual -// item is 10 kB in size, the system returns 100 items and an appropriate NextToken -// so the client can access the next page of results. -// -// For information on how to construct select expressions, see Using Select -// to Create Amazon SimpleDB Queries in the Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon SimpleDB's -// API operation Select for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValue "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified NextToken is not valid. -// -// * ErrCodeInvalidNumberPredicates "InvalidNumberPredicates" -// Too many predicates exist in the query expression. -// -// * ErrCodeInvalidNumberValueTests "InvalidNumberValueTests" -// Too many predicates exist in the query expression. -// -// * ErrCodeInvalidQueryExpression "InvalidQueryExpression" -// The specified query expression syntax is not valid. -// -// * ErrCodeMissingParameter "MissingParameter" -// The request must contain the specified missing parameter. -// -// * ErrCodeNoSuchDomain "NoSuchDomain" -// The specified domain does not exist. -// -// * ErrCodeRequestTimeout "RequestTimeout" -// A timeout occurred when attempting to query the specified domain with specified -// query expression. -// -// * ErrCodeTooManyRequestedAttributes "TooManyRequestedAttributes" -// Too many attributes requested. -// -func (c *SimpleDB) Select(input *SelectInput) (*SelectOutput, error) { - req, out := c.SelectRequest(input) - return out, req.Send() -} - -// SelectWithContext is the same as Select with the addition of -// the ability to pass a context and additional request options. -// -// See Select for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SimpleDB) SelectWithContext(ctx aws.Context, input *SelectInput, opts ...request.Option) (*SelectOutput, error) { - req, out := c.SelectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// SelectPages iterates over the pages of a Select operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See Select 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 Select operation. -// pageNum := 0 -// err := client.SelectPages(params, -// func(page *SelectOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SimpleDB) SelectPages(input *SelectInput, fn func(*SelectOutput, bool) bool) error { - return c.SelectPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// SelectPagesWithContext same as SelectPages 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 *SimpleDB) SelectPagesWithContext(ctx aws.Context, input *SelectInput, fn func(*SelectOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *SelectInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.SelectRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SelectOutput), !p.HasNextPage()) - } - return p.Err() -} - -type Attribute struct { - _ struct{} `type:"structure"` - - AlternateNameEncoding *string `type:"string"` - - AlternateValueEncoding *string `type:"string"` - - // The name of the attribute. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The value of the attribute. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Attribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Attribute) GoString() string { - return s.String() -} - -// SetAlternateNameEncoding sets the AlternateNameEncoding field's value. -func (s *Attribute) SetAlternateNameEncoding(v string) *Attribute { - s.AlternateNameEncoding = &v - return s -} - -// SetAlternateValueEncoding sets the AlternateValueEncoding field's value. -func (s *Attribute) SetAlternateValueEncoding(v string) *Attribute { - s.AlternateValueEncoding = &v - return s -} - -// SetName sets the Name field's value. -func (s *Attribute) SetName(v string) *Attribute { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Attribute) SetValue(v string) *Attribute { - s.Value = &v - return s -} - -type BatchDeleteAttributesInput struct { - _ struct{} `type:"structure"` - - // The name of the domain in which the attributes are being deleted. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // A list of items on which to perform the operation. - // - // Items is a required field - Items []*DeletableItem `locationNameList:"Item" type:"list" flattened:"true" required:"true"` -} - -// String returns the string representation -func (s BatchDeleteAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchDeleteAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchDeleteAttributesInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *BatchDeleteAttributesInput) SetDomainName(v string) *BatchDeleteAttributesInput { - s.DomainName = &v - return s -} - -// SetItems sets the Items field's value. -func (s *BatchDeleteAttributesInput) SetItems(v []*DeletableItem) *BatchDeleteAttributesInput { - s.Items = v - return s -} - -type BatchDeleteAttributesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s BatchDeleteAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchDeleteAttributesOutput) GoString() string { - return s.String() -} - -type BatchPutAttributesInput struct { - _ struct{} `type:"structure"` - - // The name of the domain in which the attributes are being stored. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // A list of items on which to perform the operation. - // - // Items is a required field - Items []*ReplaceableItem `locationNameList:"Item" type:"list" flattened:"true" required:"true"` -} - -// String returns the string representation -func (s BatchPutAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchPutAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchPutAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchPutAttributesInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *BatchPutAttributesInput) SetDomainName(v string) *BatchPutAttributesInput { - s.DomainName = &v - return s -} - -// SetItems sets the Items field's value. -func (s *BatchPutAttributesInput) SetItems(v []*ReplaceableItem) *BatchPutAttributesInput { - s.Items = v - return s -} - -type BatchPutAttributesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s BatchPutAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchPutAttributesOutput) GoString() string { - return s.String() -} - -type CreateDomainInput struct { - _ struct{} `type:"structure"` - - // The name of the domain to create. The name can range between 3 and 255 characters - // and can contain the following characters: a-z, A-Z, 0-9, '_', '-', and '.'. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *CreateDomainInput) SetDomainName(v string) *CreateDomainInput { - s.DomainName = &v - return s -} - -type CreateDomainOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDomainOutput) GoString() string { - return s.String() -} - -type DeletableAttribute struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The value of the attribute. - Value *string `type:"string"` -} - -// String returns the string representation -func (s DeletableAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletableAttribute) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletableAttribute) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletableAttribute"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeletableAttribute) SetName(v string) *DeletableAttribute { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *DeletableAttribute) SetValue(v string) *DeletableAttribute { - s.Value = &v - return s -} - -type DeletableItem struct { - _ struct{} `type:"structure"` - - Attributes []*DeletableAttribute `locationNameList:"Attribute" type:"list" flattened:"true"` - - // Name is a required field - Name *string `locationName:"ItemName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletableItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletableItem) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletableItem) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletableItem"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Attributes != nil { - for i, v := range s.Attributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *DeletableItem) SetAttributes(v []*DeletableAttribute) *DeletableItem { - s.Attributes = v - return s -} - -// SetName sets the Name field's value. -func (s *DeletableItem) SetName(v string) *DeletableItem { - s.Name = &v - return s -} - -type DeleteAttributesInput struct { - _ struct{} `type:"structure"` - - // A list of Attributes. Similar to columns on a spreadsheet, attributes represent - // categories of data that can be assigned to items. - Attributes []*DeletableAttribute `locationNameList:"Attribute" type:"list" flattened:"true"` - - // The name of the domain in which to perform the operation. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // The update condition which, if specified, determines whether the specified - // attributes will be deleted or not. The update condition must be satisfied - // in order for this request to be processed and the attributes to be deleted. - Expected *UpdateCondition `type:"structure"` - - // The name of the item. Similar to rows on a spreadsheet, items represent individual - // objects that contain one or more value-attribute pairs. - // - // ItemName is a required field - ItemName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAttributesInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.ItemName == nil { - invalidParams.Add(request.NewErrParamRequired("ItemName")) - } - if s.Attributes != nil { - for i, v := range s.Attributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *DeleteAttributesInput) SetAttributes(v []*DeletableAttribute) *DeleteAttributesInput { - s.Attributes = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteAttributesInput) SetDomainName(v string) *DeleteAttributesInput { - s.DomainName = &v - return s -} - -// SetExpected sets the Expected field's value. -func (s *DeleteAttributesInput) SetExpected(v *UpdateCondition) *DeleteAttributesInput { - s.Expected = v - return s -} - -// SetItemName sets the ItemName field's value. -func (s *DeleteAttributesInput) SetItemName(v string) *DeleteAttributesInput { - s.ItemName = &v - return s -} - -type DeleteAttributesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAttributesOutput) GoString() string { - return s.String() -} - -type DeleteDomainInput struct { - _ struct{} `type:"structure"` - - // The name of the domain to delete. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteDomainInput) SetDomainName(v string) *DeleteDomainInput { - s.DomainName = &v - return s -} - -type DeleteDomainOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDomainOutput) GoString() string { - return s.String() -} - -type DomainMetadataInput struct { - _ struct{} `type:"structure"` - - // The name of the domain for which to display the metadata of. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DomainMetadataInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainMetadataInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DomainMetadataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DomainMetadataInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DomainMetadataInput) SetDomainName(v string) *DomainMetadataInput { - s.DomainName = &v - return s -} - -type DomainMetadataOutput struct { - _ struct{} `type:"structure"` - - // The number of unique attribute names in the domain. - AttributeNameCount *int64 `type:"integer"` - - // The total size of all unique attribute names in the domain, in bytes. - AttributeNamesSizeBytes *int64 `type:"long"` - - // The number of all attribute name/value pairs in the domain. - AttributeValueCount *int64 `type:"integer"` - - // The total size of all attribute values in the domain, in bytes. - AttributeValuesSizeBytes *int64 `type:"long"` - - // The number of all items in the domain. - ItemCount *int64 `type:"integer"` - - // The total size of all item names in the domain, in bytes. - ItemNamesSizeBytes *int64 `type:"long"` - - // The data and time when metadata was calculated, in Epoch (UNIX) seconds. - Timestamp *int64 `type:"integer"` -} - -// String returns the string representation -func (s DomainMetadataOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainMetadataOutput) GoString() string { - return s.String() -} - -// SetAttributeNameCount sets the AttributeNameCount field's value. -func (s *DomainMetadataOutput) SetAttributeNameCount(v int64) *DomainMetadataOutput { - s.AttributeNameCount = &v - return s -} - -// SetAttributeNamesSizeBytes sets the AttributeNamesSizeBytes field's value. -func (s *DomainMetadataOutput) SetAttributeNamesSizeBytes(v int64) *DomainMetadataOutput { - s.AttributeNamesSizeBytes = &v - return s -} - -// SetAttributeValueCount sets the AttributeValueCount field's value. -func (s *DomainMetadataOutput) SetAttributeValueCount(v int64) *DomainMetadataOutput { - s.AttributeValueCount = &v - return s -} - -// SetAttributeValuesSizeBytes sets the AttributeValuesSizeBytes field's value. -func (s *DomainMetadataOutput) SetAttributeValuesSizeBytes(v int64) *DomainMetadataOutput { - s.AttributeValuesSizeBytes = &v - return s -} - -// SetItemCount sets the ItemCount field's value. -func (s *DomainMetadataOutput) SetItemCount(v int64) *DomainMetadataOutput { - s.ItemCount = &v - return s -} - -// SetItemNamesSizeBytes sets the ItemNamesSizeBytes field's value. -func (s *DomainMetadataOutput) SetItemNamesSizeBytes(v int64) *DomainMetadataOutput { - s.ItemNamesSizeBytes = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *DomainMetadataOutput) SetTimestamp(v int64) *DomainMetadataOutput { - s.Timestamp = &v - return s -} - -type GetAttributesInput struct { - _ struct{} `type:"structure"` - - // The names of the attributes. - AttributeNames []*string `locationNameList:"AttributeName" type:"list" flattened:"true"` - - // Determines whether or not strong consistency should be enforced when data - // is read from SimpleDB. If true - ConsistentRead *bool `type:"boolean"` - - // The name of the domain in which to perform the operation. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // The name of the item. - // - // ItemName is a required field - ItemName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAttributesInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.ItemName == nil { - invalidParams.Add(request.NewErrParamRequired("ItemName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeNames sets the AttributeNames field's value. -func (s *GetAttributesInput) SetAttributeNames(v []*string) *GetAttributesInput { - s.AttributeNames = v - return s -} - -// SetConsistentRead sets the ConsistentRead field's value. -func (s *GetAttributesInput) SetConsistentRead(v bool) *GetAttributesInput { - s.ConsistentRead = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *GetAttributesInput) SetDomainName(v string) *GetAttributesInput { - s.DomainName = &v - return s -} - -// SetItemName sets the ItemName field's value. -func (s *GetAttributesInput) SetItemName(v string) *GetAttributesInput { - s.ItemName = &v - return s -} - -type GetAttributesOutput struct { - _ struct{} `type:"structure"` - - // The list of attributes returned by the operation. - Attributes []*Attribute `locationNameList:"Attribute" type:"list" flattened:"true"` -} - -// String returns the string representation -func (s GetAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *GetAttributesOutput) SetAttributes(v []*Attribute) *GetAttributesOutput { - s.Attributes = v - return s -} - -type Item struct { - _ struct{} `type:"structure"` - - AlternateNameEncoding *string `type:"string"` - - // A list of attributes. - // - // Attributes is a required field - Attributes []*Attribute `locationNameList:"Attribute" type:"list" flattened:"true" required:"true"` - - // The name of the item. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Item) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Item) GoString() string { - return s.String() -} - -// SetAlternateNameEncoding sets the AlternateNameEncoding field's value. -func (s *Item) SetAlternateNameEncoding(v string) *Item { - s.AlternateNameEncoding = &v - return s -} - -// SetAttributes sets the Attributes field's value. -func (s *Item) SetAttributes(v []*Attribute) *Item { - s.Attributes = v - return s -} - -// SetName sets the Name field's value. -func (s *Item) SetName(v string) *Item { - s.Name = &v - return s -} - -type ListDomainsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of domain names you want returned. The range is 1 to 100. - // The default setting is 100. - MaxNumberOfDomains *int64 `type:"integer"` - - // A string informing Amazon SimpleDB where to start the next list of domain - // names. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListDomainsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDomainsInput) GoString() string { - return s.String() -} - -// SetMaxNumberOfDomains sets the MaxNumberOfDomains field's value. -func (s *ListDomainsInput) SetMaxNumberOfDomains(v int64) *ListDomainsInput { - s.MaxNumberOfDomains = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDomainsInput) SetNextToken(v string) *ListDomainsInput { - s.NextToken = &v - return s -} - -type ListDomainsOutput struct { - _ struct{} `type:"structure"` - - // A list of domain names that match the expression. - DomainNames []*string `locationNameList:"DomainName" type:"list" flattened:"true"` - - // An opaque token indicating that there are more domains than the specified - // MaxNumberOfDomains - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListDomainsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDomainsOutput) GoString() string { - return s.String() -} - -// SetDomainNames sets the DomainNames field's value. -func (s *ListDomainsOutput) SetDomainNames(v []*string) *ListDomainsOutput { - s.DomainNames = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDomainsOutput) SetNextToken(v string) *ListDomainsOutput { - s.NextToken = &v - return s -} - -type PutAttributesInput struct { - _ struct{} `type:"structure"` - - // The list of attributes. - // - // Attributes is a required field - Attributes []*ReplaceableAttribute `locationNameList:"Attribute" type:"list" flattened:"true" required:"true"` - - // The name of the domain in which to perform the operation. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // The update condition which, if specified, determines whether the specified - // attributes will be updated or not. The update condition must be satisfied - // in order for this request to be processed and the attributes to be updated. - Expected *UpdateCondition `type:"structure"` - - // The name of the item. - // - // ItemName is a required field - ItemName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PutAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutAttributesInput"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.ItemName == nil { - invalidParams.Add(request.NewErrParamRequired("ItemName")) - } - if s.Attributes != nil { - for i, v := range s.Attributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *PutAttributesInput) SetAttributes(v []*ReplaceableAttribute) *PutAttributesInput { - s.Attributes = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *PutAttributesInput) SetDomainName(v string) *PutAttributesInput { - s.DomainName = &v - return s -} - -// SetExpected sets the Expected field's value. -func (s *PutAttributesInput) SetExpected(v *UpdateCondition) *PutAttributesInput { - s.Expected = v - return s -} - -// SetItemName sets the ItemName field's value. -func (s *PutAttributesInput) SetItemName(v string) *PutAttributesInput { - s.ItemName = &v - return s -} - -type PutAttributesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutAttributesOutput) GoString() string { - return s.String() -} - -type ReplaceableAttribute struct { - _ struct{} `type:"structure"` - - // The name of the replaceable attribute. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // A flag specifying whether or not to replace the attribute/value pair or to - // add a new attribute/value pair. The default setting is false - Replace *bool `type:"boolean"` - - // The value of the replaceable attribute. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ReplaceableAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceableAttribute) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplaceableAttribute) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplaceableAttribute"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *ReplaceableAttribute) SetName(v string) *ReplaceableAttribute { - s.Name = &v - return s -} - -// SetReplace sets the Replace field's value. -func (s *ReplaceableAttribute) SetReplace(v bool) *ReplaceableAttribute { - s.Replace = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ReplaceableAttribute) SetValue(v string) *ReplaceableAttribute { - s.Value = &v - return s -} - -type ReplaceableItem struct { - _ struct{} `type:"structure"` - - // The list of attributes for a replaceable item. - // - // Attributes is a required field - Attributes []*ReplaceableAttribute `locationNameList:"Attribute" type:"list" flattened:"true" required:"true"` - - // The name of the replaceable item. - // - // Name is a required field - Name *string `locationName:"ItemName" type:"string" required:"true"` -} - -// String returns the string representation -func (s ReplaceableItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceableItem) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplaceableItem) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplaceableItem"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Attributes != nil { - for i, v := range s.Attributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *ReplaceableItem) SetAttributes(v []*ReplaceableAttribute) *ReplaceableItem { - s.Attributes = v - return s -} - -// SetName sets the Name field's value. -func (s *ReplaceableItem) SetName(v string) *ReplaceableItem { - s.Name = &v - return s -} - -type SelectInput struct { - _ struct{} `type:"structure"` - - // Determines whether or not strong consistency should be enforced when data - // is read from SimpleDB. If true - ConsistentRead *bool `type:"boolean"` - - // A string informing Amazon SimpleDB where to start the next list of ItemNames - NextToken *string `type:"string"` - - // The expression used to query the domain. - // - // SelectExpression is a required field - SelectExpression *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SelectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SelectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SelectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SelectInput"} - if s.SelectExpression == nil { - invalidParams.Add(request.NewErrParamRequired("SelectExpression")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConsistentRead sets the ConsistentRead field's value. -func (s *SelectInput) SetConsistentRead(v bool) *SelectInput { - s.ConsistentRead = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *SelectInput) SetNextToken(v string) *SelectInput { - s.NextToken = &v - return s -} - -// SetSelectExpression sets the SelectExpression field's value. -func (s *SelectInput) SetSelectExpression(v string) *SelectInput { - s.SelectExpression = &v - return s -} - -type SelectOutput struct { - _ struct{} `type:"structure"` - - // A list of items that match the select expression. - Items []*Item `locationNameList:"Item" type:"list" flattened:"true"` - - // An opaque token indicating that more items than MaxNumberOfItems - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s SelectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SelectOutput) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *SelectOutput) SetItems(v []*Item) *SelectOutput { - s.Items = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *SelectOutput) SetNextToken(v string) *SelectOutput { - s.NextToken = &v - return s -} - -// Specifies the conditions under which data should be updated. If an update -// condition is specified for a request, the data will only be updated if the -// condition is satisfied. For example, if an attribute with a specific name -// and value exists, or if a specific attribute doesn't exist. -type UpdateCondition struct { - _ struct{} `type:"structure"` - - // A value specifying whether or not the specified attribute must exist with - // the specified value in order for the update condition to be satisfied. Specify - // true if the attribute must exist for the update condition to be satisfied. - // Specify false if the attribute should not exist in order for the update condition - // to be satisfied. - Exists *bool `type:"boolean"` - - // The name of the attribute involved in the condition. - Name *string `type:"string"` - - // The value of an attribute. This value can only be specified when the Exists - // parameter is equal to true. - Value *string `type:"string"` -} - -// String returns the string representation -func (s UpdateCondition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCondition) GoString() string { - return s.String() -} - -// SetExists sets the Exists field's value. -func (s *UpdateCondition) SetExists(v bool) *UpdateCondition { - s.Exists = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateCondition) SetName(v string) *UpdateCondition { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *UpdateCondition) SetValue(v string) *UpdateCondition { - s.Value = &v - return s -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/simpledb/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/simpledb/customizations.go deleted file mode 100644 index a0dcce54b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/simpledb/customizations.go +++ /dev/null @@ -1,11 +0,0 @@ -package simpledb - -import "github.com/aws/aws-sdk-go/aws/client" - -func init() { - initClient = func(c *client.Client) { - // SimpleDB uses custom error unmarshaling logic - c.Handlers.UnmarshalError.Clear() - c.Handlers.UnmarshalError.PushBack(unmarshalError) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/simpledb/doc.go b/vendor/github.com/aws/aws-sdk-go/service/simpledb/doc.go deleted file mode 100644 index f0d59281d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/simpledb/doc.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package simpledb provides the client and types for making API -// requests to Amazon SimpleDB. -// -// Amazon SimpleDB is a web service providing the core database functions of -// data indexing and querying in the cloud. By offloading the time and effort -// associated with building and operating a web-scale database, SimpleDB provides -// developers the freedom to focus on application development. A traditional, -// clustered relational database requires a sizable upfront capital outlay, -// is complex to design, and often requires extensive and repetitive database -// administration. Amazon SimpleDB is dramatically simpler, requiring no schema, -// automatically indexing your data and providing a simple API for storage and -// access. This approach eliminates the administrative burden of data modeling, -// index maintenance, and performance tuning. Developers gain access to this -// functionality within Amazon's proven computing environment, are able to scale -// instantly, and pay only for what they use. -// -// Visit http://aws.amazon.com/simpledb/ (http://aws.amazon.com/simpledb/) for -// more information. -// -// See simpledb package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/simpledb/ -// -// Using the Client -// -// To contact Amazon SimpleDB with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon SimpleDB client SimpleDB for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/simpledb/#New -package simpledb diff --git a/vendor/github.com/aws/aws-sdk-go/service/simpledb/errors.go b/vendor/github.com/aws/aws-sdk-go/service/simpledb/errors.go deleted file mode 100644 index 5fa4dd477..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/simpledb/errors.go +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package simpledb - -const ( - - // ErrCodeAttributeDoesNotExist for service response error code - // "AttributeDoesNotExist". - // - // The specified attribute does not exist. - ErrCodeAttributeDoesNotExist = "AttributeDoesNotExist" - - // ErrCodeDuplicateItemName for service response error code - // "DuplicateItemName". - // - // The item name was specified more than once. - ErrCodeDuplicateItemName = "DuplicateItemName" - - // ErrCodeInvalidNextToken for service response error code - // "InvalidNextToken". - // - // The specified NextToken is not valid. - ErrCodeInvalidNextToken = "InvalidNextToken" - - // ErrCodeInvalidNumberPredicates for service response error code - // "InvalidNumberPredicates". - // - // Too many predicates exist in the query expression. - ErrCodeInvalidNumberPredicates = "InvalidNumberPredicates" - - // ErrCodeInvalidNumberValueTests for service response error code - // "InvalidNumberValueTests". - // - // Too many predicates exist in the query expression. - ErrCodeInvalidNumberValueTests = "InvalidNumberValueTests" - - // ErrCodeInvalidParameterValue for service response error code - // "InvalidParameterValue". - // - // The value for a parameter is invalid. - ErrCodeInvalidParameterValue = "InvalidParameterValue" - - // ErrCodeInvalidQueryExpression for service response error code - // "InvalidQueryExpression". - // - // The specified query expression syntax is not valid. - ErrCodeInvalidQueryExpression = "InvalidQueryExpression" - - // ErrCodeMissingParameter for service response error code - // "MissingParameter". - // - // The request must contain the specified missing parameter. - ErrCodeMissingParameter = "MissingParameter" - - // ErrCodeNoSuchDomain for service response error code - // "NoSuchDomain". - // - // The specified domain does not exist. - ErrCodeNoSuchDomain = "NoSuchDomain" - - // ErrCodeNumberDomainAttributesExceeded for service response error code - // "NumberDomainAttributesExceeded". - // - // Too many attributes in this domain. - ErrCodeNumberDomainAttributesExceeded = "NumberDomainAttributesExceeded" - - // ErrCodeNumberDomainBytesExceeded for service response error code - // "NumberDomainBytesExceeded". - // - // Too many bytes in this domain. - ErrCodeNumberDomainBytesExceeded = "NumberDomainBytesExceeded" - - // ErrCodeNumberDomainsExceeded for service response error code - // "NumberDomainsExceeded". - // - // Too many domains exist per this account. - ErrCodeNumberDomainsExceeded = "NumberDomainsExceeded" - - // ErrCodeNumberItemAttributesExceeded for service response error code - // "NumberItemAttributesExceeded". - // - // Too many attributes in this item. - ErrCodeNumberItemAttributesExceeded = "NumberItemAttributesExceeded" - - // ErrCodeNumberSubmittedAttributesExceeded for service response error code - // "NumberSubmittedAttributesExceeded". - // - // Too many attributes exist in a single call. - ErrCodeNumberSubmittedAttributesExceeded = "NumberSubmittedAttributesExceeded" - - // ErrCodeNumberSubmittedItemsExceeded for service response error code - // "NumberSubmittedItemsExceeded". - // - // Too many items exist in a single call. - ErrCodeNumberSubmittedItemsExceeded = "NumberSubmittedItemsExceeded" - - // ErrCodeRequestTimeout for service response error code - // "RequestTimeout". - // - // A timeout occurred when attempting to query the specified domain with specified - // query expression. - ErrCodeRequestTimeout = "RequestTimeout" - - // ErrCodeTooManyRequestedAttributes for service response error code - // "TooManyRequestedAttributes". - // - // Too many attributes requested. - ErrCodeTooManyRequestedAttributes = "TooManyRequestedAttributes" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/simpledb/service.go b/vendor/github.com/aws/aws-sdk-go/service/simpledb/service.go deleted file mode 100644 index d4de27413..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/simpledb/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package simpledb - -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/corehandlers" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol/query" - "github.com/aws/aws-sdk-go/private/signer/v2" -) - -// SimpleDB provides the API operation methods for making requests to -// Amazon SimpleDB. See this package's package overview docs -// for details on the service. -// -// SimpleDB methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type SimpleDB 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 = "sdb" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "SimpleDB" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the SimpleDB client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a SimpleDB client from just a session. -// svc := simpledb.New(mySession) -// -// // Create a SimpleDB client with additional configuration -// svc := simpledb.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *SimpleDB { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *SimpleDB { - svc := &SimpleDB{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2009-04-15", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v2.SignRequestHandler) - svc.Handlers.Sign.PushBackNamed(corehandlers.BuildContentLengthHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a SimpleDB operation and runs any -// custom request initialization. -func (c *SimpleDB) 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/simpledb/unmarshall_error.go b/vendor/github.com/aws/aws-sdk-go/service/simpledb/unmarshall_error.go deleted file mode 100644 index acc8a86eb..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/simpledb/unmarshall_error.go +++ /dev/null @@ -1,53 +0,0 @@ -package simpledb - -import ( - "encoding/xml" - "io" - "io/ioutil" - "strings" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" -) - -type xmlErrorDetail struct { - Code string `xml:"Code"` - Message string `xml:"Message"` -} - -type xmlErrorResponse struct { - XMLName xml.Name `xml:"Response"` - Errors []xmlErrorDetail `xml:"Errors>Error"` - RequestID string `xml:"RequestID"` -} - -func unmarshalError(r *request.Request) { - defer r.HTTPResponse.Body.Close() - defer io.Copy(ioutil.Discard, r.HTTPResponse.Body) - - if r.HTTPResponse.ContentLength == int64(0) { - // No body, use status code to generate an awserr.Error - r.Error = awserr.NewRequestFailure( - awserr.New(strings.Replace(r.HTTPResponse.Status, " ", "", -1), r.HTTPResponse.Status, nil), - r.HTTPResponse.StatusCode, - "", - ) - return - } - - resp := &xmlErrorResponse{} - err := xml.NewDecoder(r.HTTPResponse.Body).Decode(resp) - if err != nil && err != io.EOF { - r.Error = awserr.New("SerializationError", "failed to decode SimpleDB XML error response", nil) - } else if len(resp.Errors) == 0 { - r.Error = awserr.New("MissingError", "missing error code in SimpleDB XML error response", nil) - } else { - // If there are multiple error codes, return only the first as the aws.Error interface only supports - // one error code. - r.Error = awserr.NewRequestFailure( - awserr.New(resp.Errors[0].Code, resp.Errors[0].Message, nil), - r.HTTPResponse.StatusCode, - resp.RequestID, - ) - } -} 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 deleted file mode 100644 index f45a4a594..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/api.go +++ /dev/null @@ -1,5897 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package sns - -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/query" -) - -const opAddPermission = "AddPermission" - -// AddPermissionRequest generates a "aws/request.Request" representing the -// client's request for the AddPermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddPermission for more information on using the AddPermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddPermissionRequest method. -// req, resp := client.AddPermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/AddPermission -func (c *SNS) AddPermissionRequest(input *AddPermissionInput) (req *request.Request, output *AddPermissionOutput) { - op := &request.Operation{ - Name: opAddPermission, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddPermissionInput{} - } - - output = &AddPermissionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddPermission API operation for Amazon Simple Notification Service. -// -// Adds a statement to a topic's access control policy, granting access for -// the specified AWS accounts to the specified actions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation AddPermission for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/AddPermission -func (c *SNS) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error) { - req, out := c.AddPermissionRequest(input) - return out, req.Send() -} - -// AddPermissionWithContext is the same as AddPermission with the addition of -// the ability to pass a context and additional request options. -// -// See AddPermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) AddPermissionWithContext(ctx aws.Context, input *AddPermissionInput, opts ...request.Option) (*AddPermissionOutput, error) { - req, out := c.AddPermissionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCheckIfPhoneNumberIsOptedOut = "CheckIfPhoneNumberIsOptedOut" - -// CheckIfPhoneNumberIsOptedOutRequest generates a "aws/request.Request" representing the -// client's request for the CheckIfPhoneNumberIsOptedOut operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CheckIfPhoneNumberIsOptedOut for more information on using the CheckIfPhoneNumberIsOptedOut -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CheckIfPhoneNumberIsOptedOutRequest method. -// req, resp := client.CheckIfPhoneNumberIsOptedOutRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CheckIfPhoneNumberIsOptedOut -func (c *SNS) CheckIfPhoneNumberIsOptedOutRequest(input *CheckIfPhoneNumberIsOptedOutInput) (req *request.Request, output *CheckIfPhoneNumberIsOptedOutOutput) { - op := &request.Operation{ - Name: opCheckIfPhoneNumberIsOptedOut, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CheckIfPhoneNumberIsOptedOutInput{} - } - - output = &CheckIfPhoneNumberIsOptedOutOutput{} - req = c.newRequest(op, input, output) - return -} - -// CheckIfPhoneNumberIsOptedOut API operation for Amazon Simple Notification Service. -// -// Accepts a phone number and indicates whether the phone holder has opted out -// of receiving SMS messages from your account. You cannot send SMS messages -// to a number that is opted out. -// -// To resume sending messages, you can opt in the number by using the OptInPhoneNumber -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation CheckIfPhoneNumberIsOptedOut for usage and error information. -// -// Returned Error Codes: -// * ErrCodeThrottledException "Throttled" -// Indicates that the rate at which requests have been submitted for this action -// exceeds the limit for your account. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CheckIfPhoneNumberIsOptedOut -func (c *SNS) CheckIfPhoneNumberIsOptedOut(input *CheckIfPhoneNumberIsOptedOutInput) (*CheckIfPhoneNumberIsOptedOutOutput, error) { - req, out := c.CheckIfPhoneNumberIsOptedOutRequest(input) - return out, req.Send() -} - -// CheckIfPhoneNumberIsOptedOutWithContext is the same as CheckIfPhoneNumberIsOptedOut with the addition of -// the ability to pass a context and additional request options. -// -// See CheckIfPhoneNumberIsOptedOut for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) CheckIfPhoneNumberIsOptedOutWithContext(ctx aws.Context, input *CheckIfPhoneNumberIsOptedOutInput, opts ...request.Option) (*CheckIfPhoneNumberIsOptedOutOutput, error) { - req, out := c.CheckIfPhoneNumberIsOptedOutRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opConfirmSubscription = "ConfirmSubscription" - -// ConfirmSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the ConfirmSubscription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ConfirmSubscription for more information on using the ConfirmSubscription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ConfirmSubscriptionRequest method. -// req, resp := client.ConfirmSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ConfirmSubscription -func (c *SNS) ConfirmSubscriptionRequest(input *ConfirmSubscriptionInput) (req *request.Request, output *ConfirmSubscriptionOutput) { - op := &request.Operation{ - Name: opConfirmSubscription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ConfirmSubscriptionInput{} - } - - output = &ConfirmSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ConfirmSubscription API operation for Amazon Simple Notification Service. -// -// Verifies an endpoint owner's intent to receive messages by validating the -// token sent to the endpoint by an earlier Subscribe action. If the token is -// valid, the action creates a new subscription and returns its Amazon Resource -// Name (ARN). This call requires an AWS signature only when the AuthenticateOnUnsubscribe -// flag is set to "true". -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation ConfirmSubscription for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubscriptionLimitExceededException "SubscriptionLimitExceeded" -// Indicates that the customer already owns the maximum allowed number of subscriptions. -// -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ConfirmSubscription -func (c *SNS) ConfirmSubscription(input *ConfirmSubscriptionInput) (*ConfirmSubscriptionOutput, error) { - req, out := c.ConfirmSubscriptionRequest(input) - return out, req.Send() -} - -// ConfirmSubscriptionWithContext is the same as ConfirmSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See ConfirmSubscription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) ConfirmSubscriptionWithContext(ctx aws.Context, input *ConfirmSubscriptionInput, opts ...request.Option) (*ConfirmSubscriptionOutput, error) { - req, out := c.ConfirmSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePlatformApplication = "CreatePlatformApplication" - -// CreatePlatformApplicationRequest generates a "aws/request.Request" representing the -// client's request for the CreatePlatformApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePlatformApplication for more information on using the CreatePlatformApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePlatformApplicationRequest method. -// req, resp := client.CreatePlatformApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreatePlatformApplication -func (c *SNS) CreatePlatformApplicationRequest(input *CreatePlatformApplicationInput) (req *request.Request, output *CreatePlatformApplicationOutput) { - op := &request.Operation{ - Name: opCreatePlatformApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePlatformApplicationInput{} - } - - output = &CreatePlatformApplicationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePlatformApplication API operation for Amazon Simple Notification Service. -// -// Creates a platform application object for one of the supported push notification -// services, such as APNS and GCM, to which devices and mobile apps may register. -// You must specify PlatformPrincipal and PlatformCredential attributes when -// using the CreatePlatformApplication action. The PlatformPrincipal is received -// from the notification service. For APNS/APNS_SANDBOX, PlatformPrincipal is -// "SSL certificate". For GCM, PlatformPrincipal is not applicable. For ADM, -// PlatformPrincipal is "client id". The PlatformCredential is also received -// from the notification service. For WNS, PlatformPrincipal is "Package Security -// Identifier". For MPNS, PlatformPrincipal is "TLS certificate". For Baidu, -// PlatformPrincipal is "API key". -// -// For APNS/APNS_SANDBOX, PlatformCredential is "private key". For GCM, PlatformCredential -// is "API key". For ADM, PlatformCredential is "client secret". For WNS, PlatformCredential -// is "secret key". For MPNS, PlatformCredential is "private key". For Baidu, -// PlatformCredential is "secret key". The PlatformApplicationArn that is returned -// when using CreatePlatformApplication is then used as an attribute for the -// CreatePlatformEndpoint action. For more information, see Using Amazon SNS -// Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). -// For more information about obtaining the PlatformPrincipal and PlatformCredential -// for each of the supported push notification services, see Getting Started -// with Apple Push Notification Service (http://docs.aws.amazon.com/sns/latest/dg/mobile-push-apns.html), -// Getting Started with Amazon Device Messaging (http://docs.aws.amazon.com/sns/latest/dg/mobile-push-adm.html), -// Getting Started with Baidu Cloud Push (http://docs.aws.amazon.com/sns/latest/dg/mobile-push-baidu.html), -// Getting Started with Google Cloud Messaging for Android (http://docs.aws.amazon.com/sns/latest/dg/mobile-push-gcm.html), -// Getting Started with MPNS (http://docs.aws.amazon.com/sns/latest/dg/mobile-push-mpns.html), -// or Getting Started with WNS (http://docs.aws.amazon.com/sns/latest/dg/mobile-push-wns.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation CreatePlatformApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreatePlatformApplication -func (c *SNS) CreatePlatformApplication(input *CreatePlatformApplicationInput) (*CreatePlatformApplicationOutput, error) { - req, out := c.CreatePlatformApplicationRequest(input) - return out, req.Send() -} - -// CreatePlatformApplicationWithContext is the same as CreatePlatformApplication with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePlatformApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) CreatePlatformApplicationWithContext(ctx aws.Context, input *CreatePlatformApplicationInput, opts ...request.Option) (*CreatePlatformApplicationOutput, error) { - req, out := c.CreatePlatformApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePlatformEndpoint = "CreatePlatformEndpoint" - -// CreatePlatformEndpointRequest generates a "aws/request.Request" representing the -// client's request for the CreatePlatformEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePlatformEndpoint for more information on using the CreatePlatformEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePlatformEndpointRequest method. -// req, resp := client.CreatePlatformEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreatePlatformEndpoint -func (c *SNS) CreatePlatformEndpointRequest(input *CreatePlatformEndpointInput) (req *request.Request, output *CreatePlatformEndpointOutput) { - op := &request.Operation{ - Name: opCreatePlatformEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePlatformEndpointInput{} - } - - output = &CreatePlatformEndpointOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePlatformEndpoint API operation for Amazon Simple Notification Service. -// -// Creates an endpoint for a device and mobile app on one of the supported push -// notification services, such as GCM and APNS. CreatePlatformEndpoint requires -// the PlatformApplicationArn that is returned from CreatePlatformApplication. -// The EndpointArn that is returned when using CreatePlatformEndpoint can then -// be used by the Publish action to send a message to a mobile app or by the -// Subscribe action for subscription to a topic. The CreatePlatformEndpoint -// action is idempotent, so if the requester already owns an endpoint with the -// same device token and attributes, that endpoint's ARN is returned without -// creating a new endpoint. For more information, see Using Amazon SNS Mobile -// Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). -// -// When using CreatePlatformEndpoint with Baidu, two attributes must be provided: -// ChannelId and UserId. The token field must also contain the ChannelId. For -// more information, see Creating an Amazon SNS Endpoint for Baidu (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation CreatePlatformEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreatePlatformEndpoint -func (c *SNS) CreatePlatformEndpoint(input *CreatePlatformEndpointInput) (*CreatePlatformEndpointOutput, error) { - req, out := c.CreatePlatformEndpointRequest(input) - return out, req.Send() -} - -// CreatePlatformEndpointWithContext is the same as CreatePlatformEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePlatformEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) CreatePlatformEndpointWithContext(ctx aws.Context, input *CreatePlatformEndpointInput, opts ...request.Option) (*CreatePlatformEndpointOutput, error) { - req, out := c.CreatePlatformEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTopic = "CreateTopic" - -// CreateTopicRequest generates a "aws/request.Request" representing the -// client's request for the CreateTopic operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTopic for more information on using the CreateTopic -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTopicRequest method. -// req, resp := client.CreateTopicRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreateTopic -func (c *SNS) CreateTopicRequest(input *CreateTopicInput) (req *request.Request, output *CreateTopicOutput) { - op := &request.Operation{ - Name: opCreateTopic, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTopicInput{} - } - - output = &CreateTopicOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTopic API operation for Amazon Simple Notification Service. -// -// Creates a topic to which notifications can be published. Users can create -// at most 100,000 topics. For more information, see http://aws.amazon.com/sns -// (http://aws.amazon.com/sns/). This action is idempotent, so if the requester -// already owns a topic with the specified name, that topic's ARN is returned -// without creating a new topic. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation CreateTopic for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeTopicLimitExceededException "TopicLimitExceeded" -// Indicates that the customer already owns the maximum allowed number of topics. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeInvalidSecurityException "InvalidSecurity" -// The credential signature isn't valid. You must use an HTTPS endpoint and -// sign your request using Signature Version 4. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreateTopic -func (c *SNS) CreateTopic(input *CreateTopicInput) (*CreateTopicOutput, error) { - req, out := c.CreateTopicRequest(input) - return out, req.Send() -} - -// CreateTopicWithContext is the same as CreateTopic with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTopic for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) CreateTopicWithContext(ctx aws.Context, input *CreateTopicInput, opts ...request.Option) (*CreateTopicOutput, error) { - req, out := c.CreateTopicRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteEndpoint = "DeleteEndpoint" - -// DeleteEndpointRequest generates a "aws/request.Request" representing the -// client's request for the DeleteEndpoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteEndpoint for more information on using the DeleteEndpoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteEndpointRequest method. -// req, resp := client.DeleteEndpointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeleteEndpoint -func (c *SNS) DeleteEndpointRequest(input *DeleteEndpointInput) (req *request.Request, output *DeleteEndpointOutput) { - op := &request.Operation{ - Name: opDeleteEndpoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteEndpointInput{} - } - - output = &DeleteEndpointOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteEndpoint API operation for Amazon Simple Notification Service. -// -// Deletes the endpoint for a device and mobile app from Amazon SNS. This action -// is idempotent. For more information, see Using Amazon SNS Mobile Push Notifications -// (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). -// -// When you delete an endpoint that is also subscribed to a topic, then you -// must also unsubscribe the endpoint from the topic. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation DeleteEndpoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeleteEndpoint -func (c *SNS) DeleteEndpoint(input *DeleteEndpointInput) (*DeleteEndpointOutput, error) { - req, out := c.DeleteEndpointRequest(input) - return out, req.Send() -} - -// DeleteEndpointWithContext is the same as DeleteEndpoint with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteEndpoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) DeleteEndpointWithContext(ctx aws.Context, input *DeleteEndpointInput, opts ...request.Option) (*DeleteEndpointOutput, error) { - req, out := c.DeleteEndpointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePlatformApplication = "DeletePlatformApplication" - -// DeletePlatformApplicationRequest generates a "aws/request.Request" representing the -// client's request for the DeletePlatformApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePlatformApplication for more information on using the DeletePlatformApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePlatformApplicationRequest method. -// req, resp := client.DeletePlatformApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeletePlatformApplication -func (c *SNS) DeletePlatformApplicationRequest(input *DeletePlatformApplicationInput) (req *request.Request, output *DeletePlatformApplicationOutput) { - op := &request.Operation{ - Name: opDeletePlatformApplication, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePlatformApplicationInput{} - } - - output = &DeletePlatformApplicationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePlatformApplication API operation for Amazon Simple Notification Service. -// -// Deletes a platform application object for one of the supported push notification -// services, such as APNS and GCM. For more information, see Using Amazon SNS -// Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation DeletePlatformApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeletePlatformApplication -func (c *SNS) DeletePlatformApplication(input *DeletePlatformApplicationInput) (*DeletePlatformApplicationOutput, error) { - req, out := c.DeletePlatformApplicationRequest(input) - return out, req.Send() -} - -// DeletePlatformApplicationWithContext is the same as DeletePlatformApplication with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePlatformApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) DeletePlatformApplicationWithContext(ctx aws.Context, input *DeletePlatformApplicationInput, opts ...request.Option) (*DeletePlatformApplicationOutput, error) { - req, out := c.DeletePlatformApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTopic = "DeleteTopic" - -// DeleteTopicRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTopic operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTopic for more information on using the DeleteTopic -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTopicRequest method. -// req, resp := client.DeleteTopicRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeleteTopic -func (c *SNS) DeleteTopicRequest(input *DeleteTopicInput) (req *request.Request, output *DeleteTopicOutput) { - op := &request.Operation{ - Name: opDeleteTopic, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTopicInput{} - } - - output = &DeleteTopicOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTopic API operation for Amazon Simple Notification Service. -// -// Deletes a topic and all its subscriptions. Deleting a topic might prevent -// some messages previously sent to the topic from being delivered to subscribers. -// This action is idempotent, so deleting a topic that does not exist does not -// result in an error. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation DeleteTopic for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/DeleteTopic -func (c *SNS) DeleteTopic(input *DeleteTopicInput) (*DeleteTopicOutput, error) { - req, out := c.DeleteTopicRequest(input) - return out, req.Send() -} - -// DeleteTopicWithContext is the same as DeleteTopic with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTopic for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) DeleteTopicWithContext(ctx aws.Context, input *DeleteTopicInput, opts ...request.Option) (*DeleteTopicOutput, error) { - req, out := c.DeleteTopicRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetEndpointAttributes = "GetEndpointAttributes" - -// GetEndpointAttributesRequest generates a "aws/request.Request" representing the -// client's request for the GetEndpointAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetEndpointAttributes for more information on using the GetEndpointAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetEndpointAttributesRequest method. -// req, resp := client.GetEndpointAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetEndpointAttributes -func (c *SNS) GetEndpointAttributesRequest(input *GetEndpointAttributesInput) (req *request.Request, output *GetEndpointAttributesOutput) { - op := &request.Operation{ - Name: opGetEndpointAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetEndpointAttributesInput{} - } - - output = &GetEndpointAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetEndpointAttributes API operation for Amazon Simple Notification Service. -// -// Retrieves the endpoint attributes for a device on one of the supported push -// notification services, such as GCM and APNS. For more information, see Using -// Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation GetEndpointAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetEndpointAttributes -func (c *SNS) GetEndpointAttributes(input *GetEndpointAttributesInput) (*GetEndpointAttributesOutput, error) { - req, out := c.GetEndpointAttributesRequest(input) - return out, req.Send() -} - -// GetEndpointAttributesWithContext is the same as GetEndpointAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See GetEndpointAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) GetEndpointAttributesWithContext(ctx aws.Context, input *GetEndpointAttributesInput, opts ...request.Option) (*GetEndpointAttributesOutput, error) { - req, out := c.GetEndpointAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPlatformApplicationAttributes = "GetPlatformApplicationAttributes" - -// GetPlatformApplicationAttributesRequest generates a "aws/request.Request" representing the -// client's request for the GetPlatformApplicationAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPlatformApplicationAttributes for more information on using the GetPlatformApplicationAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPlatformApplicationAttributesRequest method. -// req, resp := client.GetPlatformApplicationAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetPlatformApplicationAttributes -func (c *SNS) GetPlatformApplicationAttributesRequest(input *GetPlatformApplicationAttributesInput) (req *request.Request, output *GetPlatformApplicationAttributesOutput) { - op := &request.Operation{ - Name: opGetPlatformApplicationAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPlatformApplicationAttributesInput{} - } - - output = &GetPlatformApplicationAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPlatformApplicationAttributes API operation for Amazon Simple Notification Service. -// -// Retrieves the attributes of the platform application object for the supported -// push notification services, such as APNS and GCM. For more information, see -// Using Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation GetPlatformApplicationAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetPlatformApplicationAttributes -func (c *SNS) GetPlatformApplicationAttributes(input *GetPlatformApplicationAttributesInput) (*GetPlatformApplicationAttributesOutput, error) { - req, out := c.GetPlatformApplicationAttributesRequest(input) - return out, req.Send() -} - -// GetPlatformApplicationAttributesWithContext is the same as GetPlatformApplicationAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See GetPlatformApplicationAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) GetPlatformApplicationAttributesWithContext(ctx aws.Context, input *GetPlatformApplicationAttributesInput, opts ...request.Option) (*GetPlatformApplicationAttributesOutput, error) { - req, out := c.GetPlatformApplicationAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSMSAttributes = "GetSMSAttributes" - -// GetSMSAttributesRequest generates a "aws/request.Request" representing the -// client's request for the GetSMSAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSMSAttributes for more information on using the GetSMSAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSMSAttributesRequest method. -// req, resp := client.GetSMSAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetSMSAttributes -func (c *SNS) GetSMSAttributesRequest(input *GetSMSAttributesInput) (req *request.Request, output *GetSMSAttributesOutput) { - op := &request.Operation{ - Name: opGetSMSAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSMSAttributesInput{} - } - - output = &GetSMSAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSMSAttributes API operation for Amazon Simple Notification Service. -// -// Returns the settings for sending SMS messages from your account. -// -// These settings are set with the SetSMSAttributes action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation GetSMSAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeThrottledException "Throttled" -// Indicates that the rate at which requests have been submitted for this action -// exceeds the limit for your account. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetSMSAttributes -func (c *SNS) GetSMSAttributes(input *GetSMSAttributesInput) (*GetSMSAttributesOutput, error) { - req, out := c.GetSMSAttributesRequest(input) - return out, req.Send() -} - -// GetSMSAttributesWithContext is the same as GetSMSAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See GetSMSAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) GetSMSAttributesWithContext(ctx aws.Context, input *GetSMSAttributesInput, opts ...request.Option) (*GetSMSAttributesOutput, error) { - req, out := c.GetSMSAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSubscriptionAttributes = "GetSubscriptionAttributes" - -// GetSubscriptionAttributesRequest generates a "aws/request.Request" representing the -// client's request for the GetSubscriptionAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSubscriptionAttributes for more information on using the GetSubscriptionAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSubscriptionAttributesRequest method. -// req, resp := client.GetSubscriptionAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetSubscriptionAttributes -func (c *SNS) GetSubscriptionAttributesRequest(input *GetSubscriptionAttributesInput) (req *request.Request, output *GetSubscriptionAttributesOutput) { - op := &request.Operation{ - Name: opGetSubscriptionAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSubscriptionAttributesInput{} - } - - output = &GetSubscriptionAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSubscriptionAttributes API operation for Amazon Simple Notification Service. -// -// Returns all of the properties of a subscription. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation GetSubscriptionAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetSubscriptionAttributes -func (c *SNS) GetSubscriptionAttributes(input *GetSubscriptionAttributesInput) (*GetSubscriptionAttributesOutput, error) { - req, out := c.GetSubscriptionAttributesRequest(input) - return out, req.Send() -} - -// GetSubscriptionAttributesWithContext is the same as GetSubscriptionAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See GetSubscriptionAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) GetSubscriptionAttributesWithContext(ctx aws.Context, input *GetSubscriptionAttributesInput, opts ...request.Option) (*GetSubscriptionAttributesOutput, error) { - req, out := c.GetSubscriptionAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTopicAttributes = "GetTopicAttributes" - -// GetTopicAttributesRequest generates a "aws/request.Request" representing the -// client's request for the GetTopicAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTopicAttributes for more information on using the GetTopicAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetTopicAttributesRequest method. -// req, resp := client.GetTopicAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetTopicAttributes -func (c *SNS) GetTopicAttributesRequest(input *GetTopicAttributesInput) (req *request.Request, output *GetTopicAttributesOutput) { - op := &request.Operation{ - Name: opGetTopicAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTopicAttributesInput{} - } - - output = &GetTopicAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTopicAttributes API operation for Amazon Simple Notification Service. -// -// Returns all of the properties of a topic. Topic properties returned might -// differ based on the authorization of the user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation GetTopicAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeInvalidSecurityException "InvalidSecurity" -// The credential signature isn't valid. You must use an HTTPS endpoint and -// sign your request using Signature Version 4. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetTopicAttributes -func (c *SNS) GetTopicAttributes(input *GetTopicAttributesInput) (*GetTopicAttributesOutput, error) { - req, out := c.GetTopicAttributesRequest(input) - return out, req.Send() -} - -// GetTopicAttributesWithContext is the same as GetTopicAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See GetTopicAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) GetTopicAttributesWithContext(ctx aws.Context, input *GetTopicAttributesInput, opts ...request.Option) (*GetTopicAttributesOutput, error) { - req, out := c.GetTopicAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListEndpointsByPlatformApplication = "ListEndpointsByPlatformApplication" - -// ListEndpointsByPlatformApplicationRequest generates a "aws/request.Request" representing the -// client's request for the ListEndpointsByPlatformApplication operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListEndpointsByPlatformApplication for more information on using the ListEndpointsByPlatformApplication -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListEndpointsByPlatformApplicationRequest method. -// req, resp := client.ListEndpointsByPlatformApplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListEndpointsByPlatformApplication -func (c *SNS) ListEndpointsByPlatformApplicationRequest(input *ListEndpointsByPlatformApplicationInput) (req *request.Request, output *ListEndpointsByPlatformApplicationOutput) { - op := &request.Operation{ - Name: opListEndpointsByPlatformApplication, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListEndpointsByPlatformApplicationInput{} - } - - output = &ListEndpointsByPlatformApplicationOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListEndpointsByPlatformApplication API operation for Amazon Simple Notification Service. -// -// Lists the endpoints and endpoint attributes for devices in a supported push -// notification service, such as GCM and APNS. The results for ListEndpointsByPlatformApplication -// are paginated and return a limited list of endpoints, up to 100. If additional -// records are available after the first page results, then a NextToken string -// will be returned. To receive the next page, you call ListEndpointsByPlatformApplication -// again using the NextToken string received from the previous call. When there -// are no more records to return, NextToken will be null. For more information, -// see Using Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). -// -// This action is throttled at 30 transactions per second (TPS). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation ListEndpointsByPlatformApplication for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListEndpointsByPlatformApplication -func (c *SNS) ListEndpointsByPlatformApplication(input *ListEndpointsByPlatformApplicationInput) (*ListEndpointsByPlatformApplicationOutput, error) { - req, out := c.ListEndpointsByPlatformApplicationRequest(input) - return out, req.Send() -} - -// ListEndpointsByPlatformApplicationWithContext is the same as ListEndpointsByPlatformApplication with the addition of -// the ability to pass a context and additional request options. -// -// See ListEndpointsByPlatformApplication for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) ListEndpointsByPlatformApplicationWithContext(ctx aws.Context, input *ListEndpointsByPlatformApplicationInput, opts ...request.Option) (*ListEndpointsByPlatformApplicationOutput, error) { - req, out := c.ListEndpointsByPlatformApplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListEndpointsByPlatformApplicationPages iterates over the pages of a ListEndpointsByPlatformApplication operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListEndpointsByPlatformApplication 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 ListEndpointsByPlatformApplication operation. -// pageNum := 0 -// err := client.ListEndpointsByPlatformApplicationPages(params, -// func(page *ListEndpointsByPlatformApplicationOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SNS) ListEndpointsByPlatformApplicationPages(input *ListEndpointsByPlatformApplicationInput, fn func(*ListEndpointsByPlatformApplicationOutput, bool) bool) error { - return c.ListEndpointsByPlatformApplicationPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListEndpointsByPlatformApplicationPagesWithContext same as ListEndpointsByPlatformApplicationPages 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 *SNS) ListEndpointsByPlatformApplicationPagesWithContext(ctx aws.Context, input *ListEndpointsByPlatformApplicationInput, fn func(*ListEndpointsByPlatformApplicationOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListEndpointsByPlatformApplicationInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListEndpointsByPlatformApplicationRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEndpointsByPlatformApplicationOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListPhoneNumbersOptedOut = "ListPhoneNumbersOptedOut" - -// ListPhoneNumbersOptedOutRequest generates a "aws/request.Request" representing the -// client's request for the ListPhoneNumbersOptedOut operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPhoneNumbersOptedOut for more information on using the ListPhoneNumbersOptedOut -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPhoneNumbersOptedOutRequest method. -// req, resp := client.ListPhoneNumbersOptedOutRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListPhoneNumbersOptedOut -func (c *SNS) ListPhoneNumbersOptedOutRequest(input *ListPhoneNumbersOptedOutInput) (req *request.Request, output *ListPhoneNumbersOptedOutOutput) { - op := &request.Operation{ - Name: opListPhoneNumbersOptedOut, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListPhoneNumbersOptedOutInput{} - } - - output = &ListPhoneNumbersOptedOutOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPhoneNumbersOptedOut API operation for Amazon Simple Notification Service. -// -// Returns a list of phone numbers that are opted out, meaning you cannot send -// SMS messages to them. -// -// The results for ListPhoneNumbersOptedOut are paginated, and each page returns -// up to 100 phone numbers. If additional phone numbers are available after -// the first page of results, then a NextToken string will be returned. To receive -// the next page, you call ListPhoneNumbersOptedOut again using the NextToken -// string received from the previous call. When there are no more records to -// return, NextToken will be null. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation ListPhoneNumbersOptedOut for usage and error information. -// -// Returned Error Codes: -// * ErrCodeThrottledException "Throttled" -// Indicates that the rate at which requests have been submitted for this action -// exceeds the limit for your account. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListPhoneNumbersOptedOut -func (c *SNS) ListPhoneNumbersOptedOut(input *ListPhoneNumbersOptedOutInput) (*ListPhoneNumbersOptedOutOutput, error) { - req, out := c.ListPhoneNumbersOptedOutRequest(input) - return out, req.Send() -} - -// ListPhoneNumbersOptedOutWithContext is the same as ListPhoneNumbersOptedOut with the addition of -// the ability to pass a context and additional request options. -// -// See ListPhoneNumbersOptedOut for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) ListPhoneNumbersOptedOutWithContext(ctx aws.Context, input *ListPhoneNumbersOptedOutInput, opts ...request.Option) (*ListPhoneNumbersOptedOutOutput, error) { - req, out := c.ListPhoneNumbersOptedOutRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPlatformApplications = "ListPlatformApplications" - -// ListPlatformApplicationsRequest generates a "aws/request.Request" representing the -// client's request for the ListPlatformApplications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPlatformApplications for more information on using the ListPlatformApplications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListPlatformApplicationsRequest method. -// req, resp := client.ListPlatformApplicationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListPlatformApplications -func (c *SNS) ListPlatformApplicationsRequest(input *ListPlatformApplicationsInput) (req *request.Request, output *ListPlatformApplicationsOutput) { - op := &request.Operation{ - Name: opListPlatformApplications, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListPlatformApplicationsInput{} - } - - output = &ListPlatformApplicationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPlatformApplications API operation for Amazon Simple Notification Service. -// -// Lists the platform application objects for the supported push notification -// services, such as APNS and GCM. The results for ListPlatformApplications -// are paginated and return a limited list of applications, up to 100. If additional -// records are available after the first page results, then a NextToken string -// will be returned. To receive the next page, you call ListPlatformApplications -// using the NextToken string received from the previous call. When there are -// no more records to return, NextToken will be null. For more information, -// see Using Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). -// -// This action is throttled at 15 transactions per second (TPS). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation ListPlatformApplications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListPlatformApplications -func (c *SNS) ListPlatformApplications(input *ListPlatformApplicationsInput) (*ListPlatformApplicationsOutput, error) { - req, out := c.ListPlatformApplicationsRequest(input) - return out, req.Send() -} - -// ListPlatformApplicationsWithContext is the same as ListPlatformApplications with the addition of -// the ability to pass a context and additional request options. -// -// See ListPlatformApplications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) ListPlatformApplicationsWithContext(ctx aws.Context, input *ListPlatformApplicationsInput, opts ...request.Option) (*ListPlatformApplicationsOutput, error) { - req, out := c.ListPlatformApplicationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPlatformApplicationsPages iterates over the pages of a ListPlatformApplications operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPlatformApplications 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 ListPlatformApplications operation. -// pageNum := 0 -// err := client.ListPlatformApplicationsPages(params, -// func(page *ListPlatformApplicationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SNS) ListPlatformApplicationsPages(input *ListPlatformApplicationsInput, fn func(*ListPlatformApplicationsOutput, bool) bool) error { - return c.ListPlatformApplicationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPlatformApplicationsPagesWithContext same as ListPlatformApplicationsPages 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 *SNS) ListPlatformApplicationsPagesWithContext(ctx aws.Context, input *ListPlatformApplicationsInput, fn func(*ListPlatformApplicationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPlatformApplicationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPlatformApplicationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPlatformApplicationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListSubscriptions = "ListSubscriptions" - -// ListSubscriptionsRequest generates a "aws/request.Request" representing the -// client's request for the ListSubscriptions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSubscriptions for more information on using the ListSubscriptions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSubscriptionsRequest method. -// req, resp := client.ListSubscriptionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListSubscriptions -func (c *SNS) ListSubscriptionsRequest(input *ListSubscriptionsInput) (req *request.Request, output *ListSubscriptionsOutput) { - op := &request.Operation{ - Name: opListSubscriptions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListSubscriptionsInput{} - } - - output = &ListSubscriptionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSubscriptions API operation for Amazon Simple Notification Service. -// -// Returns a list of the requester's subscriptions. Each call returns a limited -// list of subscriptions, up to 100. If there are more subscriptions, a NextToken -// is also returned. Use the NextToken parameter in a new ListSubscriptions -// call to get further results. -// -// This action is throttled at 30 transactions per second (TPS). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation ListSubscriptions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListSubscriptions -func (c *SNS) ListSubscriptions(input *ListSubscriptionsInput) (*ListSubscriptionsOutput, error) { - req, out := c.ListSubscriptionsRequest(input) - return out, req.Send() -} - -// ListSubscriptionsWithContext is the same as ListSubscriptions with the addition of -// the ability to pass a context and additional request options. -// -// See ListSubscriptions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) ListSubscriptionsWithContext(ctx aws.Context, input *ListSubscriptionsInput, opts ...request.Option) (*ListSubscriptionsOutput, error) { - req, out := c.ListSubscriptionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListSubscriptionsPages iterates over the pages of a ListSubscriptions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListSubscriptions 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 ListSubscriptions operation. -// pageNum := 0 -// err := client.ListSubscriptionsPages(params, -// func(page *ListSubscriptionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SNS) ListSubscriptionsPages(input *ListSubscriptionsInput, fn func(*ListSubscriptionsOutput, bool) bool) error { - return c.ListSubscriptionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListSubscriptionsPagesWithContext same as ListSubscriptionsPages 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 *SNS) ListSubscriptionsPagesWithContext(ctx aws.Context, input *ListSubscriptionsInput, fn func(*ListSubscriptionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListSubscriptionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListSubscriptionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSubscriptionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListSubscriptionsByTopic = "ListSubscriptionsByTopic" - -// ListSubscriptionsByTopicRequest generates a "aws/request.Request" representing the -// client's request for the ListSubscriptionsByTopic operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSubscriptionsByTopic for more information on using the ListSubscriptionsByTopic -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSubscriptionsByTopicRequest method. -// req, resp := client.ListSubscriptionsByTopicRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListSubscriptionsByTopic -func (c *SNS) ListSubscriptionsByTopicRequest(input *ListSubscriptionsByTopicInput) (req *request.Request, output *ListSubscriptionsByTopicOutput) { - op := &request.Operation{ - Name: opListSubscriptionsByTopic, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListSubscriptionsByTopicInput{} - } - - output = &ListSubscriptionsByTopicOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSubscriptionsByTopic API operation for Amazon Simple Notification Service. -// -// Returns a list of the subscriptions to a specific topic. Each call returns -// a limited list of subscriptions, up to 100. If there are more subscriptions, -// a NextToken is also returned. Use the NextToken parameter in a new ListSubscriptionsByTopic -// call to get further results. -// -// This action is throttled at 30 transactions per second (TPS). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation ListSubscriptionsByTopic for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListSubscriptionsByTopic -func (c *SNS) ListSubscriptionsByTopic(input *ListSubscriptionsByTopicInput) (*ListSubscriptionsByTopicOutput, error) { - req, out := c.ListSubscriptionsByTopicRequest(input) - return out, req.Send() -} - -// ListSubscriptionsByTopicWithContext is the same as ListSubscriptionsByTopic with the addition of -// the ability to pass a context and additional request options. -// -// See ListSubscriptionsByTopic for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) ListSubscriptionsByTopicWithContext(ctx aws.Context, input *ListSubscriptionsByTopicInput, opts ...request.Option) (*ListSubscriptionsByTopicOutput, error) { - req, out := c.ListSubscriptionsByTopicRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListSubscriptionsByTopicPages iterates over the pages of a ListSubscriptionsByTopic operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListSubscriptionsByTopic 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 ListSubscriptionsByTopic operation. -// pageNum := 0 -// err := client.ListSubscriptionsByTopicPages(params, -// func(page *ListSubscriptionsByTopicOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SNS) ListSubscriptionsByTopicPages(input *ListSubscriptionsByTopicInput, fn func(*ListSubscriptionsByTopicOutput, bool) bool) error { - return c.ListSubscriptionsByTopicPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListSubscriptionsByTopicPagesWithContext same as ListSubscriptionsByTopicPages 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 *SNS) ListSubscriptionsByTopicPagesWithContext(ctx aws.Context, input *ListSubscriptionsByTopicInput, fn func(*ListSubscriptionsByTopicOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListSubscriptionsByTopicInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListSubscriptionsByTopicRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSubscriptionsByTopicOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTopics = "ListTopics" - -// ListTopicsRequest generates a "aws/request.Request" representing the -// client's request for the ListTopics operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTopics for more information on using the ListTopics -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTopicsRequest method. -// req, resp := client.ListTopicsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListTopics -func (c *SNS) ListTopicsRequest(input *ListTopicsInput) (req *request.Request, output *ListTopicsOutput) { - op := &request.Operation{ - Name: opListTopics, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTopicsInput{} - } - - output = &ListTopicsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTopics API operation for Amazon Simple Notification Service. -// -// Returns a list of the requester's topics. Each call returns a limited list -// of topics, up to 100. If there are more topics, a NextToken is also returned. -// Use the NextToken parameter in a new ListTopics call to get further results. -// -// This action is throttled at 30 transactions per second (TPS). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation ListTopics for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/ListTopics -func (c *SNS) ListTopics(input *ListTopicsInput) (*ListTopicsOutput, error) { - req, out := c.ListTopicsRequest(input) - return out, req.Send() -} - -// ListTopicsWithContext is the same as ListTopics with the addition of -// the ability to pass a context and additional request options. -// -// See ListTopics for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) ListTopicsWithContext(ctx aws.Context, input *ListTopicsInput, opts ...request.Option) (*ListTopicsOutput, error) { - req, out := c.ListTopicsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTopicsPages iterates over the pages of a ListTopics operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTopics 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 ListTopics operation. -// pageNum := 0 -// err := client.ListTopicsPages(params, -// func(page *ListTopicsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SNS) ListTopicsPages(input *ListTopicsInput, fn func(*ListTopicsOutput, bool) bool) error { - return c.ListTopicsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTopicsPagesWithContext same as ListTopicsPages 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 *SNS) ListTopicsPagesWithContext(ctx aws.Context, input *ListTopicsInput, fn func(*ListTopicsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTopicsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTopicsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTopicsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opOptInPhoneNumber = "OptInPhoneNumber" - -// OptInPhoneNumberRequest generates a "aws/request.Request" representing the -// client's request for the OptInPhoneNumber operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See OptInPhoneNumber for more information on using the OptInPhoneNumber -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the OptInPhoneNumberRequest method. -// req, resp := client.OptInPhoneNumberRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/OptInPhoneNumber -func (c *SNS) OptInPhoneNumberRequest(input *OptInPhoneNumberInput) (req *request.Request, output *OptInPhoneNumberOutput) { - op := &request.Operation{ - Name: opOptInPhoneNumber, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &OptInPhoneNumberInput{} - } - - output = &OptInPhoneNumberOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// OptInPhoneNumber API operation for Amazon Simple Notification Service. -// -// Use this request to opt in a phone number that is opted out, which enables -// you to resume sending SMS messages to the number. -// -// You can opt in a phone number only once every 30 days. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation OptInPhoneNumber for usage and error information. -// -// Returned Error Codes: -// * ErrCodeThrottledException "Throttled" -// Indicates that the rate at which requests have been submitted for this action -// exceeds the limit for your account. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/OptInPhoneNumber -func (c *SNS) OptInPhoneNumber(input *OptInPhoneNumberInput) (*OptInPhoneNumberOutput, error) { - req, out := c.OptInPhoneNumberRequest(input) - return out, req.Send() -} - -// OptInPhoneNumberWithContext is the same as OptInPhoneNumber with the addition of -// the ability to pass a context and additional request options. -// -// See OptInPhoneNumber for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) OptInPhoneNumberWithContext(ctx aws.Context, input *OptInPhoneNumberInput, opts ...request.Option) (*OptInPhoneNumberOutput, error) { - req, out := c.OptInPhoneNumberRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPublish = "Publish" - -// PublishRequest generates a "aws/request.Request" representing the -// client's request for the Publish operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See Publish for more information on using the Publish -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PublishRequest method. -// req, resp := client.PublishRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Publish -func (c *SNS) PublishRequest(input *PublishInput) (req *request.Request, output *PublishOutput) { - op := &request.Operation{ - Name: opPublish, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PublishInput{} - } - - output = &PublishOutput{} - req = c.newRequest(op, input, output) - return -} - -// Publish API operation for Amazon Simple Notification Service. -// -// Sends a message to an Amazon SNS topic or sends a text message (SMS message) -// directly to a phone number. -// -// If you send a message to a topic, Amazon SNS delivers the message to each -// endpoint that is subscribed to the topic. The format of the message depends -// on the notification protocol for each subscribed endpoint. -// -// When a messageId is returned, the message has been saved and Amazon SNS will -// attempt to deliver it shortly. -// -// To use the Publish action for sending a message to a mobile endpoint, such -// as an app on a Kindle device or mobile phone, you must specify the EndpointArn -// for the TargetArn parameter. The EndpointArn is returned when making a call -// with the CreatePlatformEndpoint action. -// -// For more information about formatting messages, see Send Custom Platform-Specific -// Payloads in Messages to Mobile Devices (http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-custommessage.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation Publish for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInvalidParameterValueException "ParameterValueInvalid" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// * ErrCodeEndpointDisabledException "EndpointDisabled" -// Exception error indicating endpoint disabled. -// -// * ErrCodePlatformApplicationDisabledException "PlatformApplicationDisabled" -// Exception error indicating platform application disabled. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeKMSDisabledException "KMSDisabled" -// The request was rejected because the specified customer master key (CMK) -// isn't enabled. -// -// * ErrCodeKMSInvalidStateException "KMSInvalidState" -// The request was rejected because the state of the specified resource isn't -// valid for this request. For more information, see How Key State Affects Use -// of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeKMSNotFoundException "KMSNotFound" -// The request was rejected because the specified entity or resource can't be -// found. -// -// * ErrCodeKMSOptInRequired "KMSOptInRequired" -// The AWS access key ID needs a subscription for the service. -// -// * ErrCodeKMSThrottlingException "KMSThrottling" -// The request was denied due to request throttling. For more information about -// throttling, see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second) -// in the AWS Key Management Service Developer Guide. -// -// * ErrCodeKMSAccessDeniedException "KMSAccessDenied" -// The ciphertext references a key that doesn't exist or that you don't have -// access to. -// -// * ErrCodeInvalidSecurityException "InvalidSecurity" -// The credential signature isn't valid. You must use an HTTPS endpoint and -// sign your request using Signature Version 4. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Publish -func (c *SNS) Publish(input *PublishInput) (*PublishOutput, error) { - req, out := c.PublishRequest(input) - return out, req.Send() -} - -// PublishWithContext is the same as Publish with the addition of -// the ability to pass a context and additional request options. -// -// See Publish for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) PublishWithContext(ctx aws.Context, input *PublishInput, opts ...request.Option) (*PublishOutput, error) { - req, out := c.PublishRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemovePermission = "RemovePermission" - -// RemovePermissionRequest generates a "aws/request.Request" representing the -// client's request for the RemovePermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemovePermission for more information on using the RemovePermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemovePermissionRequest method. -// req, resp := client.RemovePermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/RemovePermission -func (c *SNS) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) { - op := &request.Operation{ - Name: opRemovePermission, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemovePermissionInput{} - } - - output = &RemovePermissionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemovePermission API operation for Amazon Simple Notification Service. -// -// Removes a statement from a topic's access control policy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation RemovePermission for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/RemovePermission -func (c *SNS) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) { - req, out := c.RemovePermissionRequest(input) - return out, req.Send() -} - -// RemovePermissionWithContext is the same as RemovePermission with the addition of -// the ability to pass a context and additional request options. -// -// See RemovePermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error) { - req, out := c.RemovePermissionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetEndpointAttributes = "SetEndpointAttributes" - -// SetEndpointAttributesRequest generates a "aws/request.Request" representing the -// client's request for the SetEndpointAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetEndpointAttributes for more information on using the SetEndpointAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetEndpointAttributesRequest method. -// req, resp := client.SetEndpointAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetEndpointAttributes -func (c *SNS) SetEndpointAttributesRequest(input *SetEndpointAttributesInput) (req *request.Request, output *SetEndpointAttributesOutput) { - op := &request.Operation{ - Name: opSetEndpointAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetEndpointAttributesInput{} - } - - output = &SetEndpointAttributesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetEndpointAttributes API operation for Amazon Simple Notification Service. -// -// Sets the attributes for an endpoint for a device on one of the supported -// push notification services, such as GCM and APNS. For more information, see -// Using Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation SetEndpointAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetEndpointAttributes -func (c *SNS) SetEndpointAttributes(input *SetEndpointAttributesInput) (*SetEndpointAttributesOutput, error) { - req, out := c.SetEndpointAttributesRequest(input) - return out, req.Send() -} - -// SetEndpointAttributesWithContext is the same as SetEndpointAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See SetEndpointAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) SetEndpointAttributesWithContext(ctx aws.Context, input *SetEndpointAttributesInput, opts ...request.Option) (*SetEndpointAttributesOutput, error) { - req, out := c.SetEndpointAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetPlatformApplicationAttributes = "SetPlatformApplicationAttributes" - -// SetPlatformApplicationAttributesRequest generates a "aws/request.Request" representing the -// client's request for the SetPlatformApplicationAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetPlatformApplicationAttributes for more information on using the SetPlatformApplicationAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetPlatformApplicationAttributesRequest method. -// req, resp := client.SetPlatformApplicationAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetPlatformApplicationAttributes -func (c *SNS) SetPlatformApplicationAttributesRequest(input *SetPlatformApplicationAttributesInput) (req *request.Request, output *SetPlatformApplicationAttributesOutput) { - op := &request.Operation{ - Name: opSetPlatformApplicationAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetPlatformApplicationAttributesInput{} - } - - output = &SetPlatformApplicationAttributesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetPlatformApplicationAttributes API operation for Amazon Simple Notification Service. -// -// Sets the attributes of the platform application object for the supported -// push notification services, such as APNS and GCM. For more information, see -// Using Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). -// For information on configuring attributes for message delivery status, see -// Using Amazon SNS Application Attributes for Message Delivery Status (http://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation SetPlatformApplicationAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetPlatformApplicationAttributes -func (c *SNS) SetPlatformApplicationAttributes(input *SetPlatformApplicationAttributesInput) (*SetPlatformApplicationAttributesOutput, error) { - req, out := c.SetPlatformApplicationAttributesRequest(input) - return out, req.Send() -} - -// SetPlatformApplicationAttributesWithContext is the same as SetPlatformApplicationAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See SetPlatformApplicationAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) SetPlatformApplicationAttributesWithContext(ctx aws.Context, input *SetPlatformApplicationAttributesInput, opts ...request.Option) (*SetPlatformApplicationAttributesOutput, error) { - req, out := c.SetPlatformApplicationAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetSMSAttributes = "SetSMSAttributes" - -// SetSMSAttributesRequest generates a "aws/request.Request" representing the -// client's request for the SetSMSAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetSMSAttributes for more information on using the SetSMSAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetSMSAttributesRequest method. -// req, resp := client.SetSMSAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetSMSAttributes -func (c *SNS) SetSMSAttributesRequest(input *SetSMSAttributesInput) (req *request.Request, output *SetSMSAttributesOutput) { - op := &request.Operation{ - Name: opSetSMSAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetSMSAttributesInput{} - } - - output = &SetSMSAttributesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetSMSAttributes API operation for Amazon Simple Notification Service. -// -// Use this request to set the default settings for sending SMS messages and -// receiving daily SMS usage reports. -// -// You can override some of these settings for a single message when you use -// the Publish action with the MessageAttributes.entry.N parameter. For more -// information, see Sending an SMS Message (http://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html) -// in the Amazon SNS Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation SetSMSAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeThrottledException "Throttled" -// Indicates that the rate at which requests have been submitted for this action -// exceeds the limit for your account. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetSMSAttributes -func (c *SNS) SetSMSAttributes(input *SetSMSAttributesInput) (*SetSMSAttributesOutput, error) { - req, out := c.SetSMSAttributesRequest(input) - return out, req.Send() -} - -// SetSMSAttributesWithContext is the same as SetSMSAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See SetSMSAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) SetSMSAttributesWithContext(ctx aws.Context, input *SetSMSAttributesInput, opts ...request.Option) (*SetSMSAttributesOutput, error) { - req, out := c.SetSMSAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetSubscriptionAttributes = "SetSubscriptionAttributes" - -// SetSubscriptionAttributesRequest generates a "aws/request.Request" representing the -// client's request for the SetSubscriptionAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetSubscriptionAttributes for more information on using the SetSubscriptionAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetSubscriptionAttributesRequest method. -// req, resp := client.SetSubscriptionAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetSubscriptionAttributes -func (c *SNS) SetSubscriptionAttributesRequest(input *SetSubscriptionAttributesInput) (req *request.Request, output *SetSubscriptionAttributesOutput) { - op := &request.Operation{ - Name: opSetSubscriptionAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetSubscriptionAttributesInput{} - } - - output = &SetSubscriptionAttributesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetSubscriptionAttributes API operation for Amazon Simple Notification Service. -// -// Allows a subscription owner to set an attribute of the subscription to a -// new value. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation SetSubscriptionAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeFilterPolicyLimitExceededException "FilterPolicyLimitExceeded" -// Indicates that the number of filter polices in your AWS account exceeds the -// limit. To add more filter polices, submit an SNS Limit Increase case in the -// AWS Support Center. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetSubscriptionAttributes -func (c *SNS) SetSubscriptionAttributes(input *SetSubscriptionAttributesInput) (*SetSubscriptionAttributesOutput, error) { - req, out := c.SetSubscriptionAttributesRequest(input) - return out, req.Send() -} - -// SetSubscriptionAttributesWithContext is the same as SetSubscriptionAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See SetSubscriptionAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) SetSubscriptionAttributesWithContext(ctx aws.Context, input *SetSubscriptionAttributesInput, opts ...request.Option) (*SetSubscriptionAttributesOutput, error) { - req, out := c.SetSubscriptionAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetTopicAttributes = "SetTopicAttributes" - -// SetTopicAttributesRequest generates a "aws/request.Request" representing the -// client's request for the SetTopicAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetTopicAttributes for more information on using the SetTopicAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetTopicAttributesRequest method. -// req, resp := client.SetTopicAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetTopicAttributes -func (c *SNS) SetTopicAttributesRequest(input *SetTopicAttributesInput) (req *request.Request, output *SetTopicAttributesOutput) { - op := &request.Operation{ - Name: opSetTopicAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetTopicAttributesInput{} - } - - output = &SetTopicAttributesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetTopicAttributes API operation for Amazon Simple Notification Service. -// -// Allows a topic owner to set an attribute of the topic to a new value. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation SetTopicAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeInvalidSecurityException "InvalidSecurity" -// The credential signature isn't valid. You must use an HTTPS endpoint and -// sign your request using Signature Version 4. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetTopicAttributes -func (c *SNS) SetTopicAttributes(input *SetTopicAttributesInput) (*SetTopicAttributesOutput, error) { - req, out := c.SetTopicAttributesRequest(input) - return out, req.Send() -} - -// SetTopicAttributesWithContext is the same as SetTopicAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See SetTopicAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) SetTopicAttributesWithContext(ctx aws.Context, input *SetTopicAttributesInput, opts ...request.Option) (*SetTopicAttributesOutput, error) { - req, out := c.SetTopicAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSubscribe = "Subscribe" - -// SubscribeRequest generates a "aws/request.Request" representing the -// client's request for the Subscribe operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See Subscribe for more information on using the Subscribe -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SubscribeRequest method. -// req, resp := client.SubscribeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Subscribe -func (c *SNS) SubscribeRequest(input *SubscribeInput) (req *request.Request, output *SubscribeOutput) { - op := &request.Operation{ - Name: opSubscribe, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SubscribeInput{} - } - - output = &SubscribeOutput{} - req = c.newRequest(op, input, output) - return -} - -// Subscribe API operation for Amazon Simple Notification Service. -// -// Prepares to subscribe an endpoint by sending the endpoint a confirmation -// message. To actually create a subscription, the endpoint owner must call -// the ConfirmSubscription action with the token from the confirmation message. -// Confirmation tokens are valid for three days. -// -// This action is throttled at 100 transactions per second (TPS). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation Subscribe for usage and error information. -// -// Returned Error Codes: -// * ErrCodeSubscriptionLimitExceededException "SubscriptionLimitExceeded" -// Indicates that the customer already owns the maximum allowed number of subscriptions. -// -// * ErrCodeFilterPolicyLimitExceededException "FilterPolicyLimitExceeded" -// Indicates that the number of filter polices in your AWS account exceeds the -// limit. To add more filter polices, submit an SNS Limit Increase case in the -// AWS Support Center. -// -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeInvalidSecurityException "InvalidSecurity" -// The credential signature isn't valid. You must use an HTTPS endpoint and -// sign your request using Signature Version 4. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Subscribe -func (c *SNS) Subscribe(input *SubscribeInput) (*SubscribeOutput, error) { - req, out := c.SubscribeRequest(input) - return out, req.Send() -} - -// SubscribeWithContext is the same as Subscribe with the addition of -// the ability to pass a context and additional request options. -// -// See Subscribe for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) SubscribeWithContext(ctx aws.Context, input *SubscribeInput, opts ...request.Option) (*SubscribeOutput, error) { - req, out := c.SubscribeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUnsubscribe = "Unsubscribe" - -// UnsubscribeRequest generates a "aws/request.Request" representing the -// client's request for the Unsubscribe operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See Unsubscribe for more information on using the Unsubscribe -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UnsubscribeRequest method. -// req, resp := client.UnsubscribeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Unsubscribe -func (c *SNS) UnsubscribeRequest(input *UnsubscribeInput) (req *request.Request, output *UnsubscribeOutput) { - op := &request.Operation{ - Name: opUnsubscribe, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UnsubscribeInput{} - } - - output = &UnsubscribeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// Unsubscribe API operation for Amazon Simple Notification Service. -// -// Deletes a subscription. If the subscription requires authentication for deletion, -// only the owner of the subscription or the topic's owner can unsubscribe, -// and an AWS signature is required. If the Unsubscribe call does not require -// authentication and the requester is not the subscription owner, a final cancellation -// message is delivered to the endpoint, so that the endpoint owner can easily -// resubscribe to the topic if the Unsubscribe request was unintended. -// -// This action is throttled at 100 transactions per second (TPS). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Notification Service's -// API operation Unsubscribe for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterException "InvalidParameter" -// Indicates that a request parameter does not comply with the associated constraints. -// -// * ErrCodeInternalErrorException "InternalError" -// Indicates an internal service error. -// -// * ErrCodeAuthorizationErrorException "AuthorizationError" -// Indicates that the user has been denied access to the requested resource. -// -// * ErrCodeNotFoundException "NotFound" -// Indicates that the requested resource does not exist. -// -// * ErrCodeInvalidSecurityException "InvalidSecurity" -// The credential signature isn't valid. You must use an HTTPS endpoint and -// sign your request using Signature Version 4. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Unsubscribe -func (c *SNS) Unsubscribe(input *UnsubscribeInput) (*UnsubscribeOutput, error) { - req, out := c.UnsubscribeRequest(input) - return out, req.Send() -} - -// UnsubscribeWithContext is the same as Unsubscribe with the addition of -// the ability to pass a context and additional request options. -// -// See Unsubscribe for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SNS) UnsubscribeWithContext(ctx aws.Context, input *UnsubscribeInput, opts ...request.Option) (*UnsubscribeOutput, error) { - req, out := c.UnsubscribeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AddPermissionInput struct { - _ struct{} `type:"structure"` - - // The AWS account IDs of the users (principals) who will be given access to - // the specified actions. The users must have AWS accounts, but do not need - // to be signed up for this service. - // - // AWSAccountId is a required field - AWSAccountId []*string `type:"list" required:"true"` - - // The action you want to allow for the specified principal(s). - // - // Valid values: any Amazon SNS action name. - // - // ActionName is a required field - ActionName []*string `type:"list" required:"true"` - - // A unique identifier for the new policy statement. - // - // Label is a required field - Label *string `type:"string" required:"true"` - - // The ARN of the topic whose access control policy you wish to modify. - // - // TopicArn is a required field - TopicArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AddPermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddPermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddPermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddPermissionInput"} - if s.AWSAccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AWSAccountId")) - } - if s.ActionName == nil { - invalidParams.Add(request.NewErrParamRequired("ActionName")) - } - if s.Label == nil { - invalidParams.Add(request.NewErrParamRequired("Label")) - } - if s.TopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("TopicArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAWSAccountId sets the AWSAccountId field's value. -func (s *AddPermissionInput) SetAWSAccountId(v []*string) *AddPermissionInput { - s.AWSAccountId = v - return s -} - -// SetActionName sets the ActionName field's value. -func (s *AddPermissionInput) SetActionName(v []*string) *AddPermissionInput { - s.ActionName = v - return s -} - -// SetLabel sets the Label field's value. -func (s *AddPermissionInput) SetLabel(v string) *AddPermissionInput { - s.Label = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *AddPermissionInput) SetTopicArn(v string) *AddPermissionInput { - s.TopicArn = &v - return s -} - -type AddPermissionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddPermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddPermissionOutput) GoString() string { - return s.String() -} - -// The input for the CheckIfPhoneNumberIsOptedOut action. -type CheckIfPhoneNumberIsOptedOutInput struct { - _ struct{} `type:"structure"` - - // The phone number for which you want to check the opt out status. - // - // PhoneNumber is a required field - PhoneNumber *string `locationName:"phoneNumber" type:"string" required:"true"` -} - -// String returns the string representation -func (s CheckIfPhoneNumberIsOptedOutInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CheckIfPhoneNumberIsOptedOutInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CheckIfPhoneNumberIsOptedOutInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CheckIfPhoneNumberIsOptedOutInput"} - if s.PhoneNumber == nil { - invalidParams.Add(request.NewErrParamRequired("PhoneNumber")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPhoneNumber sets the PhoneNumber field's value. -func (s *CheckIfPhoneNumberIsOptedOutInput) SetPhoneNumber(v string) *CheckIfPhoneNumberIsOptedOutInput { - s.PhoneNumber = &v - return s -} - -// The response from the CheckIfPhoneNumberIsOptedOut action. -type CheckIfPhoneNumberIsOptedOutOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether the phone number is opted out: - // - // * true – The phone number is opted out, meaning you cannot publish SMS - // messages to it. - // - // * false – The phone number is opted in, meaning you can publish SMS messages - // to it. - IsOptedOut *bool `locationName:"isOptedOut" type:"boolean"` -} - -// String returns the string representation -func (s CheckIfPhoneNumberIsOptedOutOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CheckIfPhoneNumberIsOptedOutOutput) GoString() string { - return s.String() -} - -// SetIsOptedOut sets the IsOptedOut field's value. -func (s *CheckIfPhoneNumberIsOptedOutOutput) SetIsOptedOut(v bool) *CheckIfPhoneNumberIsOptedOutOutput { - s.IsOptedOut = &v - return s -} - -// Input for ConfirmSubscription action. -type ConfirmSubscriptionInput struct { - _ struct{} `type:"structure"` - - // Disallows unauthenticated unsubscribes of the subscription. If the value - // of this parameter is true and the request has an AWS signature, then only - // the topic owner and the subscription owner can unsubscribe the endpoint. - // The unsubscribe action requires AWS authentication. - AuthenticateOnUnsubscribe *string `type:"string"` - - // Short-lived token sent to an endpoint during the Subscribe action. - // - // Token is a required field - Token *string `type:"string" required:"true"` - - // The ARN of the topic for which you wish to confirm a subscription. - // - // TopicArn is a required field - TopicArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ConfirmSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfirmSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfirmSubscriptionInput"} - if s.Token == nil { - invalidParams.Add(request.NewErrParamRequired("Token")) - } - if s.TopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("TopicArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticateOnUnsubscribe sets the AuthenticateOnUnsubscribe field's value. -func (s *ConfirmSubscriptionInput) SetAuthenticateOnUnsubscribe(v string) *ConfirmSubscriptionInput { - s.AuthenticateOnUnsubscribe = &v - return s -} - -// SetToken sets the Token field's value. -func (s *ConfirmSubscriptionInput) SetToken(v string) *ConfirmSubscriptionInput { - s.Token = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *ConfirmSubscriptionInput) SetTopicArn(v string) *ConfirmSubscriptionInput { - s.TopicArn = &v - return s -} - -// Response for ConfirmSubscriptions action. -type ConfirmSubscriptionOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the created subscription. - SubscriptionArn *string `type:"string"` -} - -// String returns the string representation -func (s ConfirmSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ConfirmSubscriptionOutput) GoString() string { - return s.String() -} - -// SetSubscriptionArn sets the SubscriptionArn field's value. -func (s *ConfirmSubscriptionOutput) SetSubscriptionArn(v string) *ConfirmSubscriptionOutput { - s.SubscriptionArn = &v - return s -} - -// Input for CreatePlatformApplication action. -type CreatePlatformApplicationInput struct { - _ struct{} `type:"structure"` - - // For a list of attributes, see SetPlatformApplicationAttributes (http://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html) - // - // Attributes is a required field - Attributes map[string]*string `type:"map" required:"true"` - - // Application names must be made up of only uppercase and lowercase ASCII letters, - // numbers, underscores, hyphens, and periods, and must be between 1 and 256 - // characters long. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The following platforms are supported: ADM (Amazon Device Messaging), APNS - // (Apple Push Notification Service), APNS_SANDBOX, and GCM (Google Cloud Messaging). - // - // Platform is a required field - Platform *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreatePlatformApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePlatformApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePlatformApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePlatformApplicationInput"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Platform == nil { - invalidParams.Add(request.NewErrParamRequired("Platform")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *CreatePlatformApplicationInput) SetAttributes(v map[string]*string) *CreatePlatformApplicationInput { - s.Attributes = v - return s -} - -// SetName sets the Name field's value. -func (s *CreatePlatformApplicationInput) SetName(v string) *CreatePlatformApplicationInput { - s.Name = &v - return s -} - -// SetPlatform sets the Platform field's value. -func (s *CreatePlatformApplicationInput) SetPlatform(v string) *CreatePlatformApplicationInput { - s.Platform = &v - return s -} - -// Response from CreatePlatformApplication action. -type CreatePlatformApplicationOutput struct { - _ struct{} `type:"structure"` - - // PlatformApplicationArn is returned. - PlatformApplicationArn *string `type:"string"` -} - -// String returns the string representation -func (s CreatePlatformApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePlatformApplicationOutput) GoString() string { - return s.String() -} - -// SetPlatformApplicationArn sets the PlatformApplicationArn field's value. -func (s *CreatePlatformApplicationOutput) SetPlatformApplicationArn(v string) *CreatePlatformApplicationOutput { - s.PlatformApplicationArn = &v - return s -} - -// Input for CreatePlatformEndpoint action. -type CreatePlatformEndpointInput struct { - _ struct{} `type:"structure"` - - // For a list of attributes, see SetEndpointAttributes (http://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html). - Attributes map[string]*string `type:"map"` - - // Arbitrary user data to associate with the endpoint. Amazon SNS does not use - // this data. The data must be in UTF-8 format and less than 2KB. - CustomUserData *string `type:"string"` - - // PlatformApplicationArn returned from CreatePlatformApplication is used to - // create a an endpoint. - // - // PlatformApplicationArn is a required field - PlatformApplicationArn *string `type:"string" required:"true"` - - // Unique identifier created by the notification service for an app on a device. - // The specific name for Token will vary, depending on which notification service - // is being used. For example, when using APNS as the notification service, - // you need the device token. Alternatively, when using GCM or ADM, the device - // token equivalent is called the registration ID. - // - // Token is a required field - Token *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreatePlatformEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePlatformEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePlatformEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePlatformEndpointInput"} - if s.PlatformApplicationArn == nil { - invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) - } - if s.Token == nil { - invalidParams.Add(request.NewErrParamRequired("Token")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *CreatePlatformEndpointInput) SetAttributes(v map[string]*string) *CreatePlatformEndpointInput { - s.Attributes = v - return s -} - -// SetCustomUserData sets the CustomUserData field's value. -func (s *CreatePlatformEndpointInput) SetCustomUserData(v string) *CreatePlatformEndpointInput { - s.CustomUserData = &v - return s -} - -// SetPlatformApplicationArn sets the PlatformApplicationArn field's value. -func (s *CreatePlatformEndpointInput) SetPlatformApplicationArn(v string) *CreatePlatformEndpointInput { - s.PlatformApplicationArn = &v - return s -} - -// SetToken sets the Token field's value. -func (s *CreatePlatformEndpointInput) SetToken(v string) *CreatePlatformEndpointInput { - s.Token = &v - return s -} - -// Response from CreateEndpoint action. -type CreatePlatformEndpointOutput struct { - _ struct{} `type:"structure"` - - // EndpointArn returned from CreateEndpoint action. - EndpointArn *string `type:"string"` -} - -// String returns the string representation -func (s CreatePlatformEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePlatformEndpointOutput) GoString() string { - return s.String() -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *CreatePlatformEndpointOutput) SetEndpointArn(v string) *CreatePlatformEndpointOutput { - s.EndpointArn = &v - return s -} - -// Input for CreateTopic action. -type CreateTopicInput struct { - _ struct{} `type:"structure"` - - // A map of attributes with their corresponding values. - // - // The following lists the names, descriptions, and values of the special request - // parameters that the CreateTopic action uses: - // - // * DeliveryPolicy – The policy that defines how Amazon SNS retries failed - // deliveries to HTTP/S endpoints. - // - // * DisplayName – The display name to use for a topic with SMS subscriptions. - // - // * Policy – The policy that defines who can access your topic. By default, - // only the topic owner can publish or subscribe to the topic. - Attributes map[string]*string `type:"map"` - - // The name of the topic you want to create. - // - // Constraints: Topic names must be made up of only uppercase and lowercase - // ASCII letters, numbers, underscores, and hyphens, and must be between 1 and - // 256 characters long. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateTopicInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTopicInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTopicInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTopicInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *CreateTopicInput) SetAttributes(v map[string]*string) *CreateTopicInput { - s.Attributes = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateTopicInput) SetName(v string) *CreateTopicInput { - s.Name = &v - return s -} - -// Response from CreateTopic action. -type CreateTopicOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) assigned to the created topic. - TopicArn *string `type:"string"` -} - -// String returns the string representation -func (s CreateTopicOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTopicOutput) GoString() string { - return s.String() -} - -// SetTopicArn sets the TopicArn field's value. -func (s *CreateTopicOutput) SetTopicArn(v string) *CreateTopicOutput { - s.TopicArn = &v - return s -} - -// Input for DeleteEndpoint action. -type DeleteEndpointInput struct { - _ struct{} `type:"structure"` - - // EndpointArn of endpoint to delete. - // - // EndpointArn is a required field - EndpointArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteEndpointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEndpointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointInput"} - if s.EndpointArn == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *DeleteEndpointInput) SetEndpointArn(v string) *DeleteEndpointInput { - s.EndpointArn = &v - return s -} - -type DeleteEndpointOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteEndpointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEndpointOutput) GoString() string { - return s.String() -} - -// Input for DeletePlatformApplication action. -type DeletePlatformApplicationInput struct { - _ struct{} `type:"structure"` - - // PlatformApplicationArn of platform application object to delete. - // - // PlatformApplicationArn is a required field - PlatformApplicationArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePlatformApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePlatformApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePlatformApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePlatformApplicationInput"} - if s.PlatformApplicationArn == nil { - invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPlatformApplicationArn sets the PlatformApplicationArn field's value. -func (s *DeletePlatformApplicationInput) SetPlatformApplicationArn(v string) *DeletePlatformApplicationInput { - s.PlatformApplicationArn = &v - return s -} - -type DeletePlatformApplicationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePlatformApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePlatformApplicationOutput) GoString() string { - return s.String() -} - -type DeleteTopicInput struct { - _ struct{} `type:"structure"` - - // The ARN of the topic you want to delete. - // - // TopicArn is a required field - TopicArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTopicInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTopicInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTopicInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTopicInput"} - if s.TopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("TopicArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTopicArn sets the TopicArn field's value. -func (s *DeleteTopicInput) SetTopicArn(v string) *DeleteTopicInput { - s.TopicArn = &v - return s -} - -type DeleteTopicOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTopicOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTopicOutput) GoString() string { - return s.String() -} - -// Endpoint for mobile app and device. -type Endpoint struct { - _ struct{} `type:"structure"` - - // Attributes for endpoint. - Attributes map[string]*string `type:"map"` - - // EndpointArn for mobile app and device. - EndpointArn *string `type:"string"` -} - -// String returns the string representation -func (s Endpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Endpoint) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *Endpoint) SetAttributes(v map[string]*string) *Endpoint { - s.Attributes = v - return s -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *Endpoint) SetEndpointArn(v string) *Endpoint { - s.EndpointArn = &v - return s -} - -// Input for GetEndpointAttributes action. -type GetEndpointAttributesInput struct { - _ struct{} `type:"structure"` - - // EndpointArn for GetEndpointAttributes input. - // - // EndpointArn is a required field - EndpointArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetEndpointAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEndpointAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetEndpointAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetEndpointAttributesInput"} - if s.EndpointArn == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *GetEndpointAttributesInput) SetEndpointArn(v string) *GetEndpointAttributesInput { - s.EndpointArn = &v - return s -} - -// Response from GetEndpointAttributes of the EndpointArn. -type GetEndpointAttributesOutput struct { - _ struct{} `type:"structure"` - - // Attributes include the following: - // - // * CustomUserData – arbitrary user data to associate with the endpoint. - // Amazon SNS does not use this data. The data must be in UTF-8 format and - // less than 2KB. - // - // * Enabled – flag that enables/disables delivery to the endpoint. Amazon - // SNS will set this to false when a notification service indicates to Amazon - // SNS that the endpoint is invalid. Users can set it back to true, typically - // after updating Token. - // - // * Token – device token, also referred to as a registration id, for an - // app and mobile device. This is returned from the notification service - // when an app and mobile device are registered with the notification service. - Attributes map[string]*string `type:"map"` -} - -// String returns the string representation -func (s GetEndpointAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetEndpointAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *GetEndpointAttributesOutput) SetAttributes(v map[string]*string) *GetEndpointAttributesOutput { - s.Attributes = v - return s -} - -// Input for GetPlatformApplicationAttributes action. -type GetPlatformApplicationAttributesInput struct { - _ struct{} `type:"structure"` - - // PlatformApplicationArn for GetPlatformApplicationAttributesInput. - // - // PlatformApplicationArn is a required field - PlatformApplicationArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPlatformApplicationAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPlatformApplicationAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPlatformApplicationAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPlatformApplicationAttributesInput"} - if s.PlatformApplicationArn == nil { - invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPlatformApplicationArn sets the PlatformApplicationArn field's value. -func (s *GetPlatformApplicationAttributesInput) SetPlatformApplicationArn(v string) *GetPlatformApplicationAttributesInput { - s.PlatformApplicationArn = &v - return s -} - -// Response for GetPlatformApplicationAttributes action. -type GetPlatformApplicationAttributesOutput struct { - _ struct{} `type:"structure"` - - // Attributes include the following: - // - // * EventEndpointCreated – Topic ARN to which EndpointCreated event notifications - // should be sent. - // - // * EventEndpointDeleted – Topic ARN to which EndpointDeleted event notifications - // should be sent. - // - // * EventEndpointUpdated – Topic ARN to which EndpointUpdate event notifications - // should be sent. - // - // * EventDeliveryFailure – Topic ARN to which DeliveryFailure event notifications - // should be sent upon Direct Publish delivery failure (permanent) to one - // of the application's endpoints. - Attributes map[string]*string `type:"map"` -} - -// String returns the string representation -func (s GetPlatformApplicationAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPlatformApplicationAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *GetPlatformApplicationAttributesOutput) SetAttributes(v map[string]*string) *GetPlatformApplicationAttributesOutput { - s.Attributes = v - return s -} - -// The input for the GetSMSAttributes request. -type GetSMSAttributesInput struct { - _ struct{} `type:"structure"` - - // A list of the individual attribute names, such as MonthlySpendLimit, for - // which you want values. - // - // For all attribute names, see SetSMSAttributes (http://docs.aws.amazon.com/sns/latest/api/API_SetSMSAttributes.html). - // - // If you don't use this parameter, Amazon SNS returns all SMS attributes. - Attributes []*string `locationName:"attributes" type:"list"` -} - -// String returns the string representation -func (s GetSMSAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSMSAttributesInput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *GetSMSAttributesInput) SetAttributes(v []*string) *GetSMSAttributesInput { - s.Attributes = v - return s -} - -// The response from the GetSMSAttributes request. -type GetSMSAttributesOutput struct { - _ struct{} `type:"structure"` - - // The SMS attribute names and their values. - Attributes map[string]*string `locationName:"attributes" type:"map"` -} - -// String returns the string representation -func (s GetSMSAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSMSAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *GetSMSAttributesOutput) SetAttributes(v map[string]*string) *GetSMSAttributesOutput { - s.Attributes = v - return s -} - -// Input for GetSubscriptionAttributes. -type GetSubscriptionAttributesInput struct { - _ struct{} `type:"structure"` - - // The ARN of the subscription whose properties you want to get. - // - // SubscriptionArn is a required field - SubscriptionArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSubscriptionAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSubscriptionAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSubscriptionAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSubscriptionAttributesInput"} - if s.SubscriptionArn == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSubscriptionArn sets the SubscriptionArn field's value. -func (s *GetSubscriptionAttributesInput) SetSubscriptionArn(v string) *GetSubscriptionAttributesInput { - s.SubscriptionArn = &v - return s -} - -// Response for GetSubscriptionAttributes action. -type GetSubscriptionAttributesOutput struct { - _ struct{} `type:"structure"` - - // A map of the subscription's attributes. Attributes in this map include the - // following: - // - // * ConfirmationWasAuthenticated – true if the subscription confirmation - // request was authenticated. - // - // * DeliveryPolicy – The JSON serialization of the subscription's delivery - // policy. - // - // * EffectiveDeliveryPolicy – The JSON serialization of the effective delivery - // policy that takes into account the topic delivery policy and account system - // defaults. - // - // * FilterPolicy – The filter policy JSON that is assigned to the subscription. - // - // * Owner – The AWS account ID of the subscription's owner. - // - // * PendingConfirmation – true if the subscription hasn't been confirmed. - // To confirm a pending subscription, call the ConfirmSubscription action - // with a confirmation token. - // - // * RawMessageDelivery – true if raw message delivery is enabled for the - // subscription. Raw messages are free of JSON formatting and can be sent - // to HTTP/S and Amazon SQS endpoints. - // - // * SubscriptionArn – The subscription's ARN. - // - // * TopicArn – The topic ARN that the subscription is associated with. - Attributes map[string]*string `type:"map"` -} - -// String returns the string representation -func (s GetSubscriptionAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSubscriptionAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *GetSubscriptionAttributesOutput) SetAttributes(v map[string]*string) *GetSubscriptionAttributesOutput { - s.Attributes = v - return s -} - -// Input for GetTopicAttributes action. -type GetTopicAttributesInput struct { - _ struct{} `type:"structure"` - - // The ARN of the topic whose properties you want to get. - // - // TopicArn is a required field - TopicArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetTopicAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTopicAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTopicAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTopicAttributesInput"} - if s.TopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("TopicArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTopicArn sets the TopicArn field's value. -func (s *GetTopicAttributesInput) SetTopicArn(v string) *GetTopicAttributesInput { - s.TopicArn = &v - return s -} - -// Response for GetTopicAttributes action. -type GetTopicAttributesOutput struct { - _ struct{} `type:"structure"` - - // A map of the topic's attributes. Attributes in this map include the following: - // - // * TopicArn – the topic's ARN - // - // * Owner – the AWS account ID of the topic's owner - // - // * Policy – the JSON serialization of the topic's access control policy - // - // * DisplayName – the human-readable name used in the "From" field for notifications - // to email and email-json endpoints - // - // * SubscriptionsPending – the number of subscriptions pending confirmation - // on this topic - // - // * SubscriptionsConfirmed – the number of confirmed subscriptions on this - // topic - // - // * SubscriptionsDeleted – the number of deleted subscriptions on this topic - // - // * DeliveryPolicy – the JSON serialization of the topic's delivery policy - // - // * EffectiveDeliveryPolicy – the JSON serialization of the effective delivery - // policy that takes into account system defaults - Attributes map[string]*string `type:"map"` -} - -// String returns the string representation -func (s GetTopicAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetTopicAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *GetTopicAttributesOutput) SetAttributes(v map[string]*string) *GetTopicAttributesOutput { - s.Attributes = v - return s -} - -// Input for ListEndpointsByPlatformApplication action. -type ListEndpointsByPlatformApplicationInput struct { - _ struct{} `type:"structure"` - - // NextToken string is used when calling ListEndpointsByPlatformApplication - // action to retrieve additional records that are available after the first - // page results. - NextToken *string `type:"string"` - - // PlatformApplicationArn for ListEndpointsByPlatformApplicationInput action. - // - // PlatformApplicationArn is a required field - PlatformApplicationArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListEndpointsByPlatformApplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEndpointsByPlatformApplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListEndpointsByPlatformApplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListEndpointsByPlatformApplicationInput"} - if s.PlatformApplicationArn == nil { - invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEndpointsByPlatformApplicationInput) SetNextToken(v string) *ListEndpointsByPlatformApplicationInput { - s.NextToken = &v - return s -} - -// SetPlatformApplicationArn sets the PlatformApplicationArn field's value. -func (s *ListEndpointsByPlatformApplicationInput) SetPlatformApplicationArn(v string) *ListEndpointsByPlatformApplicationInput { - s.PlatformApplicationArn = &v - return s -} - -// Response for ListEndpointsByPlatformApplication action. -type ListEndpointsByPlatformApplicationOutput struct { - _ struct{} `type:"structure"` - - // Endpoints returned for ListEndpointsByPlatformApplication action. - Endpoints []*Endpoint `type:"list"` - - // NextToken string is returned when calling ListEndpointsByPlatformApplication - // action if additional records are available after the first page results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListEndpointsByPlatformApplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListEndpointsByPlatformApplicationOutput) GoString() string { - return s.String() -} - -// SetEndpoints sets the Endpoints field's value. -func (s *ListEndpointsByPlatformApplicationOutput) SetEndpoints(v []*Endpoint) *ListEndpointsByPlatformApplicationOutput { - s.Endpoints = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListEndpointsByPlatformApplicationOutput) SetNextToken(v string) *ListEndpointsByPlatformApplicationOutput { - s.NextToken = &v - return s -} - -// The input for the ListPhoneNumbersOptedOut action. -type ListPhoneNumbersOptedOutInput struct { - _ struct{} `type:"structure"` - - // A NextToken string is used when you call the ListPhoneNumbersOptedOut action - // to retrieve additional records that are available after the first page of - // results. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation -func (s ListPhoneNumbersOptedOutInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPhoneNumbersOptedOutInput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPhoneNumbersOptedOutInput) SetNextToken(v string) *ListPhoneNumbersOptedOutInput { - s.NextToken = &v - return s -} - -// The response from the ListPhoneNumbersOptedOut action. -type ListPhoneNumbersOptedOutOutput struct { - _ struct{} `type:"structure"` - - // A NextToken string is returned when you call the ListPhoneNumbersOptedOut - // action if additional records are available after the first page of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of phone numbers that are opted out of receiving SMS messages. The - // list is paginated, and each page can contain up to 100 phone numbers. - PhoneNumbers []*string `locationName:"phoneNumbers" type:"list"` -} - -// String returns the string representation -func (s ListPhoneNumbersOptedOutOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPhoneNumbersOptedOutOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPhoneNumbersOptedOutOutput) SetNextToken(v string) *ListPhoneNumbersOptedOutOutput { - s.NextToken = &v - return s -} - -// SetPhoneNumbers sets the PhoneNumbers field's value. -func (s *ListPhoneNumbersOptedOutOutput) SetPhoneNumbers(v []*string) *ListPhoneNumbersOptedOutOutput { - s.PhoneNumbers = v - return s -} - -// Input for ListPlatformApplications action. -type ListPlatformApplicationsInput struct { - _ struct{} `type:"structure"` - - // NextToken string is used when calling ListPlatformApplications action to - // retrieve additional records that are available after the first page results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListPlatformApplicationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPlatformApplicationsInput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPlatformApplicationsInput) SetNextToken(v string) *ListPlatformApplicationsInput { - s.NextToken = &v - return s -} - -// Response for ListPlatformApplications action. -type ListPlatformApplicationsOutput struct { - _ struct{} `type:"structure"` - - // NextToken string is returned when calling ListPlatformApplications action - // if additional records are available after the first page results. - NextToken *string `type:"string"` - - // Platform applications returned when calling ListPlatformApplications action. - PlatformApplications []*PlatformApplication `type:"list"` -} - -// String returns the string representation -func (s ListPlatformApplicationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListPlatformApplicationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListPlatformApplicationsOutput) SetNextToken(v string) *ListPlatformApplicationsOutput { - s.NextToken = &v - return s -} - -// SetPlatformApplications sets the PlatformApplications field's value. -func (s *ListPlatformApplicationsOutput) SetPlatformApplications(v []*PlatformApplication) *ListPlatformApplicationsOutput { - s.PlatformApplications = v - return s -} - -// Input for ListSubscriptionsByTopic action. -type ListSubscriptionsByTopicInput struct { - _ struct{} `type:"structure"` - - // Token returned by the previous ListSubscriptionsByTopic request. - NextToken *string `type:"string"` - - // The ARN of the topic for which you wish to find subscriptions. - // - // TopicArn is a required field - TopicArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListSubscriptionsByTopicInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSubscriptionsByTopicInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSubscriptionsByTopicInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSubscriptionsByTopicInput"} - if s.TopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("TopicArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSubscriptionsByTopicInput) SetNextToken(v string) *ListSubscriptionsByTopicInput { - s.NextToken = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *ListSubscriptionsByTopicInput) SetTopicArn(v string) *ListSubscriptionsByTopicInput { - s.TopicArn = &v - return s -} - -// Response for ListSubscriptionsByTopic action. -type ListSubscriptionsByTopicOutput struct { - _ struct{} `type:"structure"` - - // Token to pass along to the next ListSubscriptionsByTopic request. This element - // is returned if there are more subscriptions to retrieve. - NextToken *string `type:"string"` - - // A list of subscriptions. - Subscriptions []*Subscription `type:"list"` -} - -// String returns the string representation -func (s ListSubscriptionsByTopicOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSubscriptionsByTopicOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSubscriptionsByTopicOutput) SetNextToken(v string) *ListSubscriptionsByTopicOutput { - s.NextToken = &v - return s -} - -// SetSubscriptions sets the Subscriptions field's value. -func (s *ListSubscriptionsByTopicOutput) SetSubscriptions(v []*Subscription) *ListSubscriptionsByTopicOutput { - s.Subscriptions = v - return s -} - -// Input for ListSubscriptions action. -type ListSubscriptionsInput struct { - _ struct{} `type:"structure"` - - // Token returned by the previous ListSubscriptions request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListSubscriptionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSubscriptionsInput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSubscriptionsInput) SetNextToken(v string) *ListSubscriptionsInput { - s.NextToken = &v - return s -} - -// Response for ListSubscriptions action -type ListSubscriptionsOutput struct { - _ struct{} `type:"structure"` - - // Token to pass along to the next ListSubscriptions request. This element is - // returned if there are more subscriptions to retrieve. - NextToken *string `type:"string"` - - // A list of subscriptions. - Subscriptions []*Subscription `type:"list"` -} - -// String returns the string representation -func (s ListSubscriptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSubscriptionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListSubscriptionsOutput) SetNextToken(v string) *ListSubscriptionsOutput { - s.NextToken = &v - return s -} - -// SetSubscriptions sets the Subscriptions field's value. -func (s *ListSubscriptionsOutput) SetSubscriptions(v []*Subscription) *ListSubscriptionsOutput { - s.Subscriptions = v - return s -} - -type ListTopicsInput struct { - _ struct{} `type:"structure"` - - // Token returned by the previous ListTopics request. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListTopicsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTopicsInput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTopicsInput) SetNextToken(v string) *ListTopicsInput { - s.NextToken = &v - return s -} - -// Response for ListTopics action. -type ListTopicsOutput struct { - _ struct{} `type:"structure"` - - // Token to pass along to the next ListTopics request. This element is returned - // if there are additional topics to retrieve. - NextToken *string `type:"string"` - - // A list of topic ARNs. - Topics []*Topic `type:"list"` -} - -// String returns the string representation -func (s ListTopicsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTopicsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTopicsOutput) SetNextToken(v string) *ListTopicsOutput { - s.NextToken = &v - return s -} - -// SetTopics sets the Topics field's value. -func (s *ListTopicsOutput) SetTopics(v []*Topic) *ListTopicsOutput { - s.Topics = v - return s -} - -// The user-specified message attribute value. For string data types, the value -// attribute has the same restrictions on the content as the message body. For -// more information, see Publish (http://docs.aws.amazon.com/sns/latest/api/API_Publish.html). -// -// Name, type, and value must not be empty or null. In addition, the message -// body should not be empty or null. All parts of the message attribute, including -// name, type, and value, are included in the message size restriction, which -// is currently 256 KB (262,144 bytes). For more information, see Using Amazon -// SNS Message Attributes (http://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html). -type MessageAttributeValue struct { - _ struct{} `type:"structure"` - - // Binary type attributes can store any binary data, for example, compressed - // data, encrypted data, or images. - // - // BinaryValue is automatically base64 encoded/decoded by the SDK. - BinaryValue []byte `type:"blob"` - - // Amazon SNS supports the following logical data types: String, String.Array, - // Number, and Binary. For more information, see Message Attribute Data Types - // (http://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html#SNSMessageAttributes.DataTypes). - // - // DataType is a required field - DataType *string `type:"string" required:"true"` - - // Strings are Unicode with UTF8 binary encoding. For a list of code values, - // see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters). - StringValue *string `type:"string"` -} - -// String returns the string representation -func (s MessageAttributeValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MessageAttributeValue) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MessageAttributeValue) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MessageAttributeValue"} - if s.DataType == nil { - invalidParams.Add(request.NewErrParamRequired("DataType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBinaryValue sets the BinaryValue field's value. -func (s *MessageAttributeValue) SetBinaryValue(v []byte) *MessageAttributeValue { - s.BinaryValue = v - return s -} - -// SetDataType sets the DataType field's value. -func (s *MessageAttributeValue) SetDataType(v string) *MessageAttributeValue { - s.DataType = &v - return s -} - -// SetStringValue sets the StringValue field's value. -func (s *MessageAttributeValue) SetStringValue(v string) *MessageAttributeValue { - s.StringValue = &v - return s -} - -// Input for the OptInPhoneNumber action. -type OptInPhoneNumberInput struct { - _ struct{} `type:"structure"` - - // The phone number to opt in. - // - // PhoneNumber is a required field - PhoneNumber *string `locationName:"phoneNumber" type:"string" required:"true"` -} - -// String returns the string representation -func (s OptInPhoneNumberInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OptInPhoneNumberInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OptInPhoneNumberInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OptInPhoneNumberInput"} - if s.PhoneNumber == nil { - invalidParams.Add(request.NewErrParamRequired("PhoneNumber")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPhoneNumber sets the PhoneNumber field's value. -func (s *OptInPhoneNumberInput) SetPhoneNumber(v string) *OptInPhoneNumberInput { - s.PhoneNumber = &v - return s -} - -// The response for the OptInPhoneNumber action. -type OptInPhoneNumberOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s OptInPhoneNumberOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OptInPhoneNumberOutput) GoString() string { - return s.String() -} - -// Platform application object. -type PlatformApplication struct { - _ struct{} `type:"structure"` - - // Attributes for platform application object. - Attributes map[string]*string `type:"map"` - - // PlatformApplicationArn for platform application object. - PlatformApplicationArn *string `type:"string"` -} - -// String returns the string representation -func (s PlatformApplication) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PlatformApplication) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *PlatformApplication) SetAttributes(v map[string]*string) *PlatformApplication { - s.Attributes = v - return s -} - -// SetPlatformApplicationArn sets the PlatformApplicationArn field's value. -func (s *PlatformApplication) SetPlatformApplicationArn(v string) *PlatformApplication { - s.PlatformApplicationArn = &v - return s -} - -// Input for Publish action. -type PublishInput struct { - _ struct{} `type:"structure"` - - // The message you want to send. - // - // The Message parameter is always a string. If you set MessageStructure to - // json, you must string-encode the Message parameter. - // - // If you are publishing to a topic and you want to send the same message to - // all transport protocols, include the text of the message as a String value. - // If you want to send different messages for each transport protocol, set the - // value of the MessageStructure parameter to json and use a JSON object for - // the Message parameter. - // - // Constraints: - // - // With the exception of SMS, messages must be UTF-8 encoded strings and at - // most 256 KB in size (262,144 bytes, not 262,144 characters). - // - // * For SMS, each message can contain up to 140 characters. This character - // limit depends on the encoding schema. For example, an SMS message can - // contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters. - // - // * If you publish a message that exceeds this size limit, Amazon SNS sends - // the message as multiple messages, each fitting within the size limit. - // Messages aren't truncated mid-word but are cut off at whole-word boundaries. - // - // * The total size limit for a single SMS Publish action is 1,600 characters. - // - // JSON-specific constraints: - // - // * Keys in the JSON object that correspond to supported transport protocols - // must have simple JSON string values. - // - // * The values will be parsed (unescaped) before they are used in outgoing - // messages. - // - // * Outbound notifications are JSON encoded (meaning that the characters - // will be reescaped for sending). - // - // * Values have a minimum length of 0 (the empty string, "", is allowed). - // - // * Values have a maximum length bounded by the overall message size (so, - // including multiple protocols may limit message sizes). - // - // * Non-string values will cause the key to be ignored. - // - // * Keys that do not correspond to supported transport protocols are ignored. - // - // * Duplicate keys are not allowed. - // - // * Failure to parse or validate any key or value in the message will cause - // the Publish call to return an error (no partial delivery). - // - // Message is a required field - Message *string `type:"string" required:"true"` - - // Message attributes for Publish action. - MessageAttributes map[string]*MessageAttributeValue `locationNameKey:"Name" locationNameValue:"Value" type:"map"` - - // Set MessageStructure to json if you want to send a different message for - // each protocol. For example, using one publish action, you can send a short - // message to your SMS subscribers and a longer message to your email subscribers. - // If you set MessageStructure to json, the value of the Message parameter must: - // - // * be a syntactically valid JSON object; and - // - // * contain at least a top-level JSON key of "default" with a value that - // is a string. - // - // You can define other top-level keys that define the message you want to send - // to a specific transport protocol (e.g., "http"). - // - // For information about sending different messages for each protocol using - // the AWS Management Console, go to Create Different Messages for Each Protocol - // (http://docs.aws.amazon.com/sns/latest/gsg/Publish.html#sns-message-formatting-by-protocol) - // in the Amazon Simple Notification Service Getting Started Guide. - // - // Valid value: json - MessageStructure *string `type:"string"` - - // The phone number to which you want to deliver an SMS message. Use E.164 format. - // - // If you don't specify a value for the PhoneNumber parameter, you must specify - // a value for the TargetArn or TopicArn parameters. - PhoneNumber *string `type:"string"` - - // Optional parameter to be used as the "Subject" line when the message is delivered - // to email endpoints. This field will also be included, if present, in the - // standard JSON messages delivered to other endpoints. - // - // Constraints: Subjects must be ASCII text that begins with a letter, number, - // or punctuation mark; must not include line breaks or control characters; - // and must be less than 100 characters long. - Subject *string `type:"string"` - - // Either TopicArn or EndpointArn, but not both. - // - // If you don't specify a value for the TargetArn parameter, you must specify - // a value for the PhoneNumber or TopicArn parameters. - TargetArn *string `type:"string"` - - // The topic you want to publish to. - // - // If you don't specify a value for the TopicArn parameter, you must specify - // a value for the PhoneNumber or TargetArn parameters. - TopicArn *string `type:"string"` -} - -// String returns the string representation -func (s PublishInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublishInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PublishInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PublishInput"} - if s.Message == nil { - invalidParams.Add(request.NewErrParamRequired("Message")) - } - if s.MessageAttributes != nil { - for i, v := range s.MessageAttributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MessageAttributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMessage sets the Message field's value. -func (s *PublishInput) SetMessage(v string) *PublishInput { - s.Message = &v - return s -} - -// SetMessageAttributes sets the MessageAttributes field's value. -func (s *PublishInput) SetMessageAttributes(v map[string]*MessageAttributeValue) *PublishInput { - s.MessageAttributes = v - return s -} - -// SetMessageStructure sets the MessageStructure field's value. -func (s *PublishInput) SetMessageStructure(v string) *PublishInput { - s.MessageStructure = &v - return s -} - -// SetPhoneNumber sets the PhoneNumber field's value. -func (s *PublishInput) SetPhoneNumber(v string) *PublishInput { - s.PhoneNumber = &v - return s -} - -// SetSubject sets the Subject field's value. -func (s *PublishInput) SetSubject(v string) *PublishInput { - s.Subject = &v - return s -} - -// SetTargetArn sets the TargetArn field's value. -func (s *PublishInput) SetTargetArn(v string) *PublishInput { - s.TargetArn = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *PublishInput) SetTopicArn(v string) *PublishInput { - s.TopicArn = &v - return s -} - -// Response for Publish action. -type PublishOutput struct { - _ struct{} `type:"structure"` - - // Unique identifier assigned to the published message. - // - // Length Constraint: Maximum 100 characters - MessageId *string `type:"string"` -} - -// String returns the string representation -func (s PublishOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PublishOutput) GoString() string { - return s.String() -} - -// SetMessageId sets the MessageId field's value. -func (s *PublishOutput) SetMessageId(v string) *PublishOutput { - s.MessageId = &v - return s -} - -// Input for RemovePermission action. -type RemovePermissionInput struct { - _ struct{} `type:"structure"` - - // The unique label of the statement you want to remove. - // - // Label is a required field - Label *string `type:"string" required:"true"` - - // The ARN of the topic whose access control policy you wish to modify. - // - // TopicArn is a required field - TopicArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RemovePermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemovePermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemovePermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"} - if s.Label == nil { - invalidParams.Add(request.NewErrParamRequired("Label")) - } - if s.TopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("TopicArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLabel sets the Label field's value. -func (s *RemovePermissionInput) SetLabel(v string) *RemovePermissionInput { - s.Label = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *RemovePermissionInput) SetTopicArn(v string) *RemovePermissionInput { - s.TopicArn = &v - return s -} - -type RemovePermissionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemovePermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemovePermissionOutput) GoString() string { - return s.String() -} - -// Input for SetEndpointAttributes action. -type SetEndpointAttributesInput struct { - _ struct{} `type:"structure"` - - // A map of the endpoint attributes. Attributes in this map include the following: - // - // * CustomUserData – arbitrary user data to associate with the endpoint. - // Amazon SNS does not use this data. The data must be in UTF-8 format and - // less than 2KB. - // - // * Enabled – flag that enables/disables delivery to the endpoint. Amazon - // SNS will set this to false when a notification service indicates to Amazon - // SNS that the endpoint is invalid. Users can set it back to true, typically - // after updating Token. - // - // * Token – device token, also referred to as a registration id, for an - // app and mobile device. This is returned from the notification service - // when an app and mobile device are registered with the notification service. - // - // Attributes is a required field - Attributes map[string]*string `type:"map" required:"true"` - - // EndpointArn used for SetEndpointAttributes action. - // - // EndpointArn is a required field - EndpointArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SetEndpointAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetEndpointAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetEndpointAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetEndpointAttributesInput"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.EndpointArn == nil { - invalidParams.Add(request.NewErrParamRequired("EndpointArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *SetEndpointAttributesInput) SetAttributes(v map[string]*string) *SetEndpointAttributesInput { - s.Attributes = v - return s -} - -// SetEndpointArn sets the EndpointArn field's value. -func (s *SetEndpointAttributesInput) SetEndpointArn(v string) *SetEndpointAttributesInput { - s.EndpointArn = &v - return s -} - -type SetEndpointAttributesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetEndpointAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetEndpointAttributesOutput) GoString() string { - return s.String() -} - -// Input for SetPlatformApplicationAttributes action. -type SetPlatformApplicationAttributesInput struct { - _ struct{} `type:"structure"` - - // A map of the platform application attributes. Attributes in this map include - // the following: - // - // * PlatformCredential – The credential received from the notification service. - // For APNS/APNS_SANDBOX, PlatformCredential is private key. For GCM, PlatformCredential - // is "API key". For ADM, PlatformCredential is "client secret". - // - // * PlatformPrincipal – The principal received from the notification service. - // For APNS/APNS_SANDBOX, PlatformPrincipal is SSL certificate. For GCM, - // PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is "client - // id". - // - // * EventEndpointCreated – Topic ARN to which EndpointCreated event notifications - // should be sent. - // - // * EventEndpointDeleted – Topic ARN to which EndpointDeleted event notifications - // should be sent. - // - // * EventEndpointUpdated – Topic ARN to which EndpointUpdate event notifications - // should be sent. - // - // * EventDeliveryFailure – Topic ARN to which DeliveryFailure event notifications - // should be sent upon Direct Publish delivery failure (permanent) to one - // of the application's endpoints. - // - // * SuccessFeedbackRoleArn – IAM role ARN used to give Amazon SNS write - // access to use CloudWatch Logs on your behalf. - // - // * FailureFeedbackRoleArn – IAM role ARN used to give Amazon SNS write - // access to use CloudWatch Logs on your behalf. - // - // * SuccessFeedbackSampleRate – Sample rate percentage (0-100) of successfully - // delivered messages. - // - // Attributes is a required field - Attributes map[string]*string `type:"map" required:"true"` - - // PlatformApplicationArn for SetPlatformApplicationAttributes action. - // - // PlatformApplicationArn is a required field - PlatformApplicationArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SetPlatformApplicationAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetPlatformApplicationAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetPlatformApplicationAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetPlatformApplicationAttributesInput"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.PlatformApplicationArn == nil { - invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *SetPlatformApplicationAttributesInput) SetAttributes(v map[string]*string) *SetPlatformApplicationAttributesInput { - s.Attributes = v - return s -} - -// SetPlatformApplicationArn sets the PlatformApplicationArn field's value. -func (s *SetPlatformApplicationAttributesInput) SetPlatformApplicationArn(v string) *SetPlatformApplicationAttributesInput { - s.PlatformApplicationArn = &v - return s -} - -type SetPlatformApplicationAttributesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetPlatformApplicationAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetPlatformApplicationAttributesOutput) GoString() string { - return s.String() -} - -// The input for the SetSMSAttributes action. -type SetSMSAttributesInput struct { - _ struct{} `type:"structure"` - - // The default settings for sending SMS messages from your account. You can - // set values for the following attribute names: - // - // MonthlySpendLimit – The maximum amount in USD that you are willing to spend - // each month to send SMS messages. When Amazon SNS determines that sending - // an SMS message would incur a cost that exceeds this limit, it stops sending - // SMS messages within minutes. - // - // Amazon SNS stops sending SMS messages within minutes of the limit being crossed. - // During that interval, if you continue to send SMS messages, you will incur - // costs that exceed your limit. - // - // By default, the spend limit is set to the maximum allowed by Amazon SNS. - // If you want to raise the limit, submit an SNS Limit Increase case (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-sns). - // For New limit value, enter your desired monthly spend limit. In the Use Case - // Description field, explain that you are requesting an SMS monthly spend limit - // increase. - // - // DeliveryStatusIAMRole – The ARN of the IAM role that allows Amazon SNS to - // write logs about SMS deliveries in CloudWatch Logs. For each SMS message - // that you send, Amazon SNS writes a log that includes the message price, the - // success or failure status, the reason for failure (if the message failed), - // the message dwell time, and other information. - // - // DeliveryStatusSuccessSamplingRate – The percentage of successful SMS deliveries - // for which Amazon SNS will write logs in CloudWatch Logs. The value can be - // an integer from 0 - 100. For example, to write logs only for failed deliveries, - // set this value to 0. To write logs for 10% of your successful deliveries, - // set it to 10. - // - // DefaultSenderID – A string, such as your business brand, that is displayed - // as the sender on the receiving device. Support for sender IDs varies by country. - // The sender ID can be 1 - 11 alphanumeric characters, and it must contain - // at least one letter. - // - // DefaultSMSType – The type of SMS message that you will send by default. You - // can assign the following values: - // - // * Promotional – (Default) Noncritical messages, such as marketing messages. - // Amazon SNS optimizes the message delivery to incur the lowest cost. - // - // * Transactional – Critical messages that support customer transactions, - // such as one-time passcodes for multi-factor authentication. Amazon SNS - // optimizes the message delivery to achieve the highest reliability. - // - // UsageReportS3Bucket – The name of the Amazon S3 bucket to receive daily SMS - // usage reports from Amazon SNS. Each day, Amazon SNS will deliver a usage - // report as a CSV file to the bucket. The report includes the following information - // for each SMS message that was successfully delivered by your account: - // - // * Time that the message was published (in UTC) - // - // * Message ID - // - // * Destination phone number - // - // * Message type - // - // * Delivery status - // - // * Message price (in USD) - // - // * Part number (a message is split into multiple parts if it is too long - // for a single message) - // - // * Total number of parts - // - // To receive the report, the bucket must have a policy that allows the Amazon - // SNS service principle to perform the s3:PutObject and s3:GetBucketLocation - // actions. - // - // For an example bucket policy and usage report, see Monitoring SMS Activity - // (http://docs.aws.amazon.com/sns/latest/dg/sms_stats.html) in the Amazon SNS - // Developer Guide. - // - // Attributes is a required field - Attributes map[string]*string `locationName:"attributes" type:"map" required:"true"` -} - -// String returns the string representation -func (s SetSMSAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetSMSAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetSMSAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetSMSAttributesInput"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *SetSMSAttributesInput) SetAttributes(v map[string]*string) *SetSMSAttributesInput { - s.Attributes = v - return s -} - -// The response for the SetSMSAttributes action. -type SetSMSAttributesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetSMSAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetSMSAttributesOutput) GoString() string { - return s.String() -} - -// Input for SetSubscriptionAttributes action. -type SetSubscriptionAttributesInput struct { - _ struct{} `type:"structure"` - - // A map of attributes with their corresponding values. - // - // The following lists the names, descriptions, and values of the special request - // parameters that the SetTopicAttributes action uses: - // - // * DeliveryPolicy – The policy that defines how Amazon SNS retries failed - // deliveries to HTTP/S endpoints. - // - // * FilterPolicy – The simple JSON object that lets your subscriber receive - // only a subset of messages, rather than receiving every message published - // to the topic. - // - // * RawMessageDelivery – When set to true, enables raw message delivery - // to Amazon SQS or HTTP/S endpoints. This eliminates the need for the endpoints - // to process JSON formatting, which is otherwise created for Amazon SNS - // metadata. - // - // AttributeName is a required field - AttributeName *string `type:"string" required:"true"` - - // The new value for the attribute in JSON format. - AttributeValue *string `type:"string"` - - // The ARN of the subscription to modify. - // - // SubscriptionArn is a required field - SubscriptionArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SetSubscriptionAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetSubscriptionAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetSubscriptionAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetSubscriptionAttributesInput"} - if s.AttributeName == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeName")) - } - if s.SubscriptionArn == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeName sets the AttributeName field's value. -func (s *SetSubscriptionAttributesInput) SetAttributeName(v string) *SetSubscriptionAttributesInput { - s.AttributeName = &v - return s -} - -// SetAttributeValue sets the AttributeValue field's value. -func (s *SetSubscriptionAttributesInput) SetAttributeValue(v string) *SetSubscriptionAttributesInput { - s.AttributeValue = &v - return s -} - -// SetSubscriptionArn sets the SubscriptionArn field's value. -func (s *SetSubscriptionAttributesInput) SetSubscriptionArn(v string) *SetSubscriptionAttributesInput { - s.SubscriptionArn = &v - return s -} - -type SetSubscriptionAttributesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetSubscriptionAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetSubscriptionAttributesOutput) GoString() string { - return s.String() -} - -// Input for SetTopicAttributes action. -type SetTopicAttributesInput struct { - _ struct{} `type:"structure"` - - // A map of attributes with their corresponding values. - // - // The following lists the names, descriptions, and values of the special request - // parameters that the SetTopicAttributes action uses: - // - // * DeliveryPolicy – The policy that defines how Amazon SNS retries failed - // deliveries to HTTP/S endpoints. - // - // * DisplayName – The display name to use for a topic with SMS subscriptions. - // - // * Policy – The policy that defines who can access your topic. By default, - // only the topic owner can publish or subscribe to the topic. - // - // AttributeName is a required field - AttributeName *string `type:"string" required:"true"` - - // The new value for the attribute. - AttributeValue *string `type:"string"` - - // The ARN of the topic to modify. - // - // TopicArn is a required field - TopicArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SetTopicAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetTopicAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetTopicAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetTopicAttributesInput"} - if s.AttributeName == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeName")) - } - if s.TopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("TopicArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeName sets the AttributeName field's value. -func (s *SetTopicAttributesInput) SetAttributeName(v string) *SetTopicAttributesInput { - s.AttributeName = &v - return s -} - -// SetAttributeValue sets the AttributeValue field's value. -func (s *SetTopicAttributesInput) SetAttributeValue(v string) *SetTopicAttributesInput { - s.AttributeValue = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *SetTopicAttributesInput) SetTopicArn(v string) *SetTopicAttributesInput { - s.TopicArn = &v - return s -} - -type SetTopicAttributesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetTopicAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetTopicAttributesOutput) GoString() string { - return s.String() -} - -// Input for Subscribe action. -type SubscribeInput struct { - _ struct{} `type:"structure"` - - // A map of attributes with their corresponding values. - // - // The following lists the names, descriptions, and values of the special request - // parameters that the SetTopicAttributes action uses: - // - // * DeliveryPolicy – The policy that defines how Amazon SNS retries failed - // deliveries to HTTP/S endpoints. - // - // * FilterPolicy – The simple JSON object that lets your subscriber receive - // only a subset of messages, rather than receiving every message published - // to the topic. - // - // * RawMessageDelivery – When set to true, enables raw message delivery - // to Amazon SQS or HTTP/S endpoints. This eliminates the need for the endpoints - // to process JSON formatting, which is otherwise created for Amazon SNS - // metadata. - Attributes map[string]*string `type:"map"` - - // The endpoint that you want to receive notifications. Endpoints vary by protocol: - // - // * For the http protocol, the endpoint is an URL beginning with "http://" - // - // * For the https protocol, the endpoint is a URL beginning with "https://" - // - // * For the email protocol, the endpoint is an email address - // - // * For the email-json protocol, the endpoint is an email address - // - // * For the sms protocol, the endpoint is a phone number of an SMS-enabled - // device - // - // * For the sqs protocol, the endpoint is the ARN of an Amazon SQS queue - // - // * For the application protocol, the endpoint is the EndpointArn of a mobile - // app and device. - // - // * For the lambda protocol, the endpoint is the ARN of an AWS Lambda function. - Endpoint *string `type:"string"` - - // The protocol you want to use. Supported protocols include: - // - // * http – delivery of JSON-encoded message via HTTP POST - // - // * https – delivery of JSON-encoded message via HTTPS POST - // - // * email – delivery of message via SMTP - // - // * email-json – delivery of JSON-encoded message via SMTP - // - // * sms – delivery of message via SMS - // - // * sqs – delivery of JSON-encoded message to an Amazon SQS queue - // - // * application – delivery of JSON-encoded message to an EndpointArn for - // a mobile app and device. - // - // * lambda – delivery of JSON-encoded message to an AWS Lambda function. - // - // Protocol is a required field - Protocol *string `type:"string" required:"true"` - - // Sets whether the response from the Subscribe request includes the subscription - // ARN, even if the subscription is not yet confirmed. - // - // If you set this parameter to false, the response includes the ARN for confirmed - // subscriptions, but it includes an ARN value of "pending subscription" for - // subscriptions that are not yet confirmed. A subscription becomes confirmed - // when the subscriber calls the ConfirmSubscription action with a confirmation - // token. - // - // If you set this parameter to true, the response includes the ARN in all cases, - // even if the subscription is not yet confirmed. - // - // The default value is false. - ReturnSubscriptionArn *bool `type:"boolean"` - - // The ARN of the topic you want to subscribe to. - // - // TopicArn is a required field - TopicArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SubscribeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubscribeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SubscribeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SubscribeInput"} - if s.Protocol == nil { - invalidParams.Add(request.NewErrParamRequired("Protocol")) - } - if s.TopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("TopicArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *SubscribeInput) SetAttributes(v map[string]*string) *SubscribeInput { - s.Attributes = v - return s -} - -// SetEndpoint sets the Endpoint field's value. -func (s *SubscribeInput) SetEndpoint(v string) *SubscribeInput { - s.Endpoint = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *SubscribeInput) SetProtocol(v string) *SubscribeInput { - s.Protocol = &v - return s -} - -// SetReturnSubscriptionArn sets the ReturnSubscriptionArn field's value. -func (s *SubscribeInput) SetReturnSubscriptionArn(v bool) *SubscribeInput { - s.ReturnSubscriptionArn = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *SubscribeInput) SetTopicArn(v string) *SubscribeInput { - s.TopicArn = &v - return s -} - -// Response for Subscribe action. -type SubscribeOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the subscription if it is confirmed, or the string "pending confirmation" - // if the subscription requires confirmation. However, if the API request parameter - // ReturnSubscriptionArn is true, then the value is always the subscription - // ARN, even if the subscription requires confirmation. - SubscriptionArn *string `type:"string"` -} - -// String returns the string representation -func (s SubscribeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubscribeOutput) GoString() string { - return s.String() -} - -// SetSubscriptionArn sets the SubscriptionArn field's value. -func (s *SubscribeOutput) SetSubscriptionArn(v string) *SubscribeOutput { - s.SubscriptionArn = &v - return s -} - -// A wrapper type for the attributes of an Amazon SNS subscription. -type Subscription struct { - _ struct{} `type:"structure"` - - // The subscription's endpoint (format depends on the protocol). - Endpoint *string `type:"string"` - - // The subscription's owner. - Owner *string `type:"string"` - - // The subscription's protocol. - Protocol *string `type:"string"` - - // The subscription's ARN. - SubscriptionArn *string `type:"string"` - - // The ARN of the subscription's topic. - TopicArn *string `type:"string"` -} - -// 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() -} - -// SetEndpoint sets the Endpoint field's value. -func (s *Subscription) SetEndpoint(v string) *Subscription { - s.Endpoint = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *Subscription) SetOwner(v string) *Subscription { - s.Owner = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *Subscription) SetProtocol(v string) *Subscription { - s.Protocol = &v - return s -} - -// SetSubscriptionArn sets the SubscriptionArn field's value. -func (s *Subscription) SetSubscriptionArn(v string) *Subscription { - s.SubscriptionArn = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *Subscription) SetTopicArn(v string) *Subscription { - s.TopicArn = &v - return s -} - -// A wrapper type for the topic's Amazon Resource Name (ARN). To retrieve a -// topic's attributes, use GetTopicAttributes. -type Topic struct { - _ struct{} `type:"structure"` - - // The topic's ARN. - TopicArn *string `type:"string"` -} - -// String returns the string representation -func (s Topic) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Topic) GoString() string { - return s.String() -} - -// SetTopicArn sets the TopicArn field's value. -func (s *Topic) SetTopicArn(v string) *Topic { - s.TopicArn = &v - return s -} - -// Input for Unsubscribe action. -type UnsubscribeInput struct { - _ struct{} `type:"structure"` - - // The ARN of the subscription to be deleted. - // - // SubscriptionArn is a required field - SubscriptionArn *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UnsubscribeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnsubscribeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UnsubscribeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UnsubscribeInput"} - if s.SubscriptionArn == nil { - invalidParams.Add(request.NewErrParamRequired("SubscriptionArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSubscriptionArn sets the SubscriptionArn field's value. -func (s *UnsubscribeInput) SetSubscriptionArn(v string) *UnsubscribeInput { - s.SubscriptionArn = &v - return s -} - -type UnsubscribeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UnsubscribeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UnsubscribeOutput) GoString() string { - return s.String() -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sns/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sns/doc.go deleted file mode 100644 index 513ef2fb3..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/doc.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package sns provides the client and types for making API -// requests to Amazon Simple Notification Service. -// -// Amazon Simple Notification Service (Amazon SNS) is a web service that enables -// you to build distributed web-enabled applications. Applications can use Amazon -// SNS to easily push real-time notification messages to interested subscribers -// over multiple delivery protocols. For more information about this product -// see http://aws.amazon.com/sns (http://aws.amazon.com/sns/). For detailed -// information about Amazon SNS features and their associated API calls, see -// the Amazon SNS Developer Guide (http://docs.aws.amazon.com/sns/latest/dg/). -// -// We also provide SDKs that enable you to access Amazon SNS from your preferred -// programming language. The SDKs contain functionality that automatically takes -// care of tasks such as: cryptographically signing your service requests, retrying -// requests, and handling error responses. For a list of available SDKs, go -// to Tools for Amazon Web Services (http://aws.amazon.com/tools/). -// -// See https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31 for more information on this service. -// -// See sns package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/sns/ -// -// Using the Client -// -// To contact Amazon Simple Notification Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Simple Notification Service client SNS for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/sns/#New -package sns diff --git a/vendor/github.com/aws/aws-sdk-go/service/sns/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sns/errors.go deleted file mode 100644 index 9a16c083f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/errors.go +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package sns - -const ( - - // ErrCodeAuthorizationErrorException for service response error code - // "AuthorizationError". - // - // Indicates that the user has been denied access to the requested resource. - ErrCodeAuthorizationErrorException = "AuthorizationError" - - // ErrCodeEndpointDisabledException for service response error code - // "EndpointDisabled". - // - // Exception error indicating endpoint disabled. - ErrCodeEndpointDisabledException = "EndpointDisabled" - - // ErrCodeFilterPolicyLimitExceededException for service response error code - // "FilterPolicyLimitExceeded". - // - // Indicates that the number of filter polices in your AWS account exceeds the - // limit. To add more filter polices, submit an SNS Limit Increase case in the - // AWS Support Center. - ErrCodeFilterPolicyLimitExceededException = "FilterPolicyLimitExceeded" - - // ErrCodeInternalErrorException for service response error code - // "InternalError". - // - // Indicates an internal service error. - ErrCodeInternalErrorException = "InternalError" - - // ErrCodeInvalidParameterException for service response error code - // "InvalidParameter". - // - // Indicates that a request parameter does not comply with the associated constraints. - ErrCodeInvalidParameterException = "InvalidParameter" - - // ErrCodeInvalidParameterValueException for service response error code - // "ParameterValueInvalid". - // - // Indicates that a request parameter does not comply with the associated constraints. - ErrCodeInvalidParameterValueException = "ParameterValueInvalid" - - // ErrCodeInvalidSecurityException for service response error code - // "InvalidSecurity". - // - // The credential signature isn't valid. You must use an HTTPS endpoint and - // sign your request using Signature Version 4. - ErrCodeInvalidSecurityException = "InvalidSecurity" - - // ErrCodeKMSAccessDeniedException for service response error code - // "KMSAccessDenied". - // - // The ciphertext references a key that doesn't exist or that you don't have - // access to. - ErrCodeKMSAccessDeniedException = "KMSAccessDenied" - - // ErrCodeKMSDisabledException for service response error code - // "KMSDisabled". - // - // The request was rejected because the specified customer master key (CMK) - // isn't enabled. - ErrCodeKMSDisabledException = "KMSDisabled" - - // ErrCodeKMSInvalidStateException for service response error code - // "KMSInvalidState". - // - // The request was rejected because the state of the specified resource isn't - // valid for this request. For more information, see How Key State Affects Use - // of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) - // in the AWS Key Management Service Developer Guide. - ErrCodeKMSInvalidStateException = "KMSInvalidState" - - // ErrCodeKMSNotFoundException for service response error code - // "KMSNotFound". - // - // The request was rejected because the specified entity or resource can't be - // found. - ErrCodeKMSNotFoundException = "KMSNotFound" - - // ErrCodeKMSOptInRequired for service response error code - // "KMSOptInRequired". - // - // The AWS access key ID needs a subscription for the service. - ErrCodeKMSOptInRequired = "KMSOptInRequired" - - // ErrCodeKMSThrottlingException for service response error code - // "KMSThrottling". - // - // The request was denied due to request throttling. For more information about - // throttling, see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second) - // in the AWS Key Management Service Developer Guide. - ErrCodeKMSThrottlingException = "KMSThrottling" - - // ErrCodeNotFoundException for service response error code - // "NotFound". - // - // Indicates that the requested resource does not exist. - ErrCodeNotFoundException = "NotFound" - - // ErrCodePlatformApplicationDisabledException for service response error code - // "PlatformApplicationDisabled". - // - // Exception error indicating platform application disabled. - ErrCodePlatformApplicationDisabledException = "PlatformApplicationDisabled" - - // ErrCodeSubscriptionLimitExceededException for service response error code - // "SubscriptionLimitExceeded". - // - // Indicates that the customer already owns the maximum allowed number of subscriptions. - ErrCodeSubscriptionLimitExceededException = "SubscriptionLimitExceeded" - - // ErrCodeThrottledException for service response error code - // "Throttled". - // - // Indicates that the rate at which requests have been submitted for this action - // exceeds the limit for your account. - ErrCodeThrottledException = "Throttled" - - // ErrCodeTopicLimitExceededException for service response error code - // "TopicLimitExceeded". - // - // Indicates that the customer already owns the maximum allowed number of topics. - ErrCodeTopicLimitExceededException = "TopicLimitExceeded" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/sns/service.go b/vendor/github.com/aws/aws-sdk-go/service/sns/service.go deleted file mode 100644 index 96d7c8ba0..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package sns - -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/query" -) - -// SNS provides the API operation methods for making requests to -// Amazon Simple Notification Service. See this package's package overview docs -// for details on the service. -// -// SNS methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type SNS 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 = "sns" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "SNS" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the SNS client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a SNS client from just a session. -// svc := sns.New(mySession) -// -// // Create a SNS client with additional configuration -// svc := sns.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *SNS { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *SNS { - svc := &SNS{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2010-03-31", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a SNS operation and runs any -// custom request initialization. -func (c *SNS) 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/sqs/api.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go deleted file mode 100644 index 16f82a4b2..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go +++ /dev/null @@ -1,4914 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package sqs - -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/query" -) - -const opAddPermission = "AddPermission" - -// AddPermissionRequest generates a "aws/request.Request" representing the -// client's request for the AddPermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddPermission for more information on using the AddPermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddPermissionRequest method. -// req, resp := client.AddPermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/AddPermission -func (c *SQS) AddPermissionRequest(input *AddPermissionInput) (req *request.Request, output *AddPermissionOutput) { - op := &request.Operation{ - Name: opAddPermission, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddPermissionInput{} - } - - output = &AddPermissionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddPermission API operation for Amazon Simple Queue Service. -// -// Adds a permission to a queue for a specific principal (http://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P). -// This allows sharing access to the queue. -// -// When you create a queue, you have full control access rights for the queue. -// Only you, the owner of the queue, can grant or deny permissions to the queue. -// For more information about these permissions, see Allow Developers to Write -// Messages to a Shared Queue (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-writing-an-sqs-policy.html#write-messages-to-shared-queue) -// in the Amazon Simple Queue Service Developer Guide. -// -// AddPermission writes an Amazon-SQS-generated policy. If you want to write -// your own policy, use SetQueueAttributes to upload your policy. For more information -// about writing your own policy, see Using Custom Policies with the Amazon -// SQS Access Policy Language (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-creating-custom-policies.html) -// in the Amazon Simple Queue Service Developer Guide. -// -// An Amazon SQS policy can have a maximum of 7 actions. -// -// Some actions take lists of parameters. These lists are specified using the -// param.n notation. Values of n are integers starting from 1. For example, -// a parameter list with two elements looks like this: -// -// &Attribute.1=first -// -// &Attribute.2=second -// -// Cross-account permissions don't apply to this action. For more information, -// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) -// in the Amazon Simple Queue Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation AddPermission for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOverLimit "OverLimit" -// The specified action violates a limit. For example, ReceiveMessage returns -// this error if the maximum number of inflight messages is reached and AddPermission -// returns this error if the maximum number of permissions for the queue is -// reached. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/AddPermission -func (c *SQS) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error) { - req, out := c.AddPermissionRequest(input) - return out, req.Send() -} - -// AddPermissionWithContext is the same as AddPermission with the addition of -// the ability to pass a context and additional request options. -// -// See AddPermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) AddPermissionWithContext(ctx aws.Context, input *AddPermissionInput, opts ...request.Option) (*AddPermissionOutput, error) { - req, out := c.AddPermissionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opChangeMessageVisibility = "ChangeMessageVisibility" - -// ChangeMessageVisibilityRequest generates a "aws/request.Request" representing the -// client's request for the ChangeMessageVisibility operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ChangeMessageVisibility for more information on using the ChangeMessageVisibility -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ChangeMessageVisibilityRequest method. -// req, resp := client.ChangeMessageVisibilityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ChangeMessageVisibility -func (c *SQS) ChangeMessageVisibilityRequest(input *ChangeMessageVisibilityInput) (req *request.Request, output *ChangeMessageVisibilityOutput) { - op := &request.Operation{ - Name: opChangeMessageVisibility, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ChangeMessageVisibilityInput{} - } - - output = &ChangeMessageVisibilityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ChangeMessageVisibility API operation for Amazon Simple Queue Service. -// -// Changes the visibility timeout of a specified message in a queue to a new -// value. The maximum allowed timeout value is 12 hours. For more information, -// see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) -// in the Amazon Simple Queue Service Developer Guide. -// -// For example, you have a message with a visibility timeout of 5 minutes. After -// 3 minutes, you call ChangeMessageVisibility with a timeout of 10 minutes. -// You can continue to call ChangeMessageVisibility to extend the visibility -// timeout to a maximum of 12 hours. If you try to extend the visibility timeout -// beyond 12 hours, your request is rejected. -// -// A message is considered to be in flight after it's received from a queue -// by a consumer, but not yet deleted from the queue. -// -// For standard queues, there can be a maximum of 120,000 inflight messages -// per queue. If you reach this limit, Amazon SQS returns the OverLimit error -// message. To avoid reaching the limit, you should delete messages from the -// queue after they're processed. You can also increase the number of queues -// you use to process your messages. -// -// For FIFO queues, there can be a maximum of 20,000 inflight messages per queue. -// If you reach this limit, Amazon SQS returns no error messages. -// -// If you attempt to set the VisibilityTimeout to a value greater than the maximum -// time left, Amazon SQS returns an error. Amazon SQS doesn't automatically -// recalculate and increase the timeout to the maximum remaining time. -// -// Unlike with a queue, when you change the visibility timeout for a specific -// message the timeout value is applied immediately but isn't saved in memory -// for that message. If you don't delete a message after it is received, the -// visibility timeout for the message reverts to the original timeout value -// (not to the value you set using the ChangeMessageVisibility action) the next -// time the message is received. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation ChangeMessageVisibility for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMessageNotInflight "AWS.SimpleQueueService.MessageNotInflight" -// The specified message isn't in flight. -// -// * ErrCodeReceiptHandleIsInvalid "ReceiptHandleIsInvalid" -// The specified receipt handle isn't valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ChangeMessageVisibility -func (c *SQS) ChangeMessageVisibility(input *ChangeMessageVisibilityInput) (*ChangeMessageVisibilityOutput, error) { - req, out := c.ChangeMessageVisibilityRequest(input) - return out, req.Send() -} - -// ChangeMessageVisibilityWithContext is the same as ChangeMessageVisibility with the addition of -// the ability to pass a context and additional request options. -// -// See ChangeMessageVisibility for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) ChangeMessageVisibilityWithContext(ctx aws.Context, input *ChangeMessageVisibilityInput, opts ...request.Option) (*ChangeMessageVisibilityOutput, error) { - req, out := c.ChangeMessageVisibilityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opChangeMessageVisibilityBatch = "ChangeMessageVisibilityBatch" - -// ChangeMessageVisibilityBatchRequest generates a "aws/request.Request" representing the -// client's request for the ChangeMessageVisibilityBatch operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ChangeMessageVisibilityBatch for more information on using the ChangeMessageVisibilityBatch -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ChangeMessageVisibilityBatchRequest method. -// req, resp := client.ChangeMessageVisibilityBatchRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ChangeMessageVisibilityBatch -func (c *SQS) ChangeMessageVisibilityBatchRequest(input *ChangeMessageVisibilityBatchInput) (req *request.Request, output *ChangeMessageVisibilityBatchOutput) { - op := &request.Operation{ - Name: opChangeMessageVisibilityBatch, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ChangeMessageVisibilityBatchInput{} - } - - output = &ChangeMessageVisibilityBatchOutput{} - req = c.newRequest(op, input, output) - return -} - -// ChangeMessageVisibilityBatch API operation for Amazon Simple Queue Service. -// -// Changes the visibility timeout of multiple messages. This is a batch version -// of ChangeMessageVisibility. The result of the action on each message is reported -// individually in the response. You can send up to 10 ChangeMessageVisibility -// requests with each ChangeMessageVisibilityBatch action. -// -// Because the batch request can result in a combination of successful and unsuccessful -// actions, you should check for batch errors even when the call returns an -// HTTP status code of 200. -// -// Some actions take lists of parameters. These lists are specified using the -// param.n notation. Values of n are integers starting from 1. For example, -// a parameter list with two elements looks like this: -// -// &Attribute.1=first -// -// &Attribute.2=second -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation ChangeMessageVisibilityBatch for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyEntriesInBatchRequest "AWS.SimpleQueueService.TooManyEntriesInBatchRequest" -// The batch request contains more entries than permissible. -// -// * ErrCodeEmptyBatchRequest "AWS.SimpleQueueService.EmptyBatchRequest" -// The batch request doesn't contain any entries. -// -// * ErrCodeBatchEntryIdsNotDistinct "AWS.SimpleQueueService.BatchEntryIdsNotDistinct" -// Two or more batch entries in the request have the same Id. -// -// * ErrCodeInvalidBatchEntryId "AWS.SimpleQueueService.InvalidBatchEntryId" -// The Id of a batch entry in a batch request doesn't abide by the specification. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ChangeMessageVisibilityBatch -func (c *SQS) ChangeMessageVisibilityBatch(input *ChangeMessageVisibilityBatchInput) (*ChangeMessageVisibilityBatchOutput, error) { - req, out := c.ChangeMessageVisibilityBatchRequest(input) - return out, req.Send() -} - -// ChangeMessageVisibilityBatchWithContext is the same as ChangeMessageVisibilityBatch with the addition of -// the ability to pass a context and additional request options. -// -// See ChangeMessageVisibilityBatch for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) ChangeMessageVisibilityBatchWithContext(ctx aws.Context, input *ChangeMessageVisibilityBatchInput, opts ...request.Option) (*ChangeMessageVisibilityBatchOutput, error) { - req, out := c.ChangeMessageVisibilityBatchRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateQueue = "CreateQueue" - -// CreateQueueRequest generates a "aws/request.Request" representing the -// client's request for the CreateQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateQueue for more information on using the CreateQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateQueueRequest method. -// req, resp := client.CreateQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/CreateQueue -func (c *SQS) CreateQueueRequest(input *CreateQueueInput) (req *request.Request, output *CreateQueueOutput) { - op := &request.Operation{ - Name: opCreateQueue, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateQueueInput{} - } - - output = &CreateQueueOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateQueue API operation for Amazon Simple Queue Service. -// -// Creates a new standard or FIFO queue. You can pass one or more attributes -// in the request. Keep the following caveats in mind: -// -// * If you don't specify the FifoQueue attribute, Amazon SQS creates a standard -// queue. -// -// You can't change the queue type after you create it and you can't convert -// an existing standard queue into a FIFO queue. You must either create a -// new FIFO queue for your application or delete your existing standard queue -// and recreate it as a FIFO queue. For more information, see Moving From -// a Standard Queue to a FIFO Queue (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-moving) -// in the Amazon Simple Queue Service Developer Guide. -// -// * If you don't provide a value for an attribute, the queue is created -// with the default value for the attribute. -// -// * If you delete a queue, you must wait at least 60 seconds before creating -// a queue with the same name. -// -// To successfully create a new queue, you must provide a queue name that adheres -// to the limits related to queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html) -// and is unique within the scope of your queues. -// -// To get the queue URL, use the GetQueueUrl action. GetQueueUrl requires only -// the QueueName parameter. be aware of existing queue names: -// -// * If you provide the name of an existing queue along with the exact names -// and values of all the queue's attributes, CreateQueue returns the queue -// URL for the existing queue. -// -// * If the queue name, attribute names, or attribute values don't match -// an existing queue, CreateQueue returns an error. -// -// Some actions take lists of parameters. These lists are specified using the -// param.n notation. Values of n are integers starting from 1. For example, -// a parameter list with two elements looks like this: -// -// &Attribute.1=first -// -// &Attribute.2=second -// -// Cross-account permissions don't apply to this action. For more information, -// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) -// in the Amazon Simple Queue Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation CreateQueue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeQueueDeletedRecently "AWS.SimpleQueueService.QueueDeletedRecently" -// You must wait 60 seconds after deleting a queue before you can create another -// queue with the same name. -// -// * ErrCodeQueueNameExists "QueueAlreadyExists" -// A queue with this name already exists. Amazon SQS returns this error only -// if the request includes attributes whose values differ from those of the -// existing queue. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/CreateQueue -func (c *SQS) CreateQueue(input *CreateQueueInput) (*CreateQueueOutput, error) { - req, out := c.CreateQueueRequest(input) - return out, req.Send() -} - -// CreateQueueWithContext is the same as CreateQueue with the addition of -// the ability to pass a context and additional request options. -// -// See CreateQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) CreateQueueWithContext(ctx aws.Context, input *CreateQueueInput, opts ...request.Option) (*CreateQueueOutput, error) { - req, out := c.CreateQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteMessage = "DeleteMessage" - -// DeleteMessageRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMessage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteMessage for more information on using the DeleteMessage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteMessageRequest method. -// req, resp := client.DeleteMessageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/DeleteMessage -func (c *SQS) DeleteMessageRequest(input *DeleteMessageInput) (req *request.Request, output *DeleteMessageOutput) { - op := &request.Operation{ - Name: opDeleteMessage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteMessageInput{} - } - - output = &DeleteMessageOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteMessage API operation for Amazon Simple Queue Service. -// -// Deletes the specified message from the specified queue. To select the message -// to delete, use the ReceiptHandle of the message (not the MessageId which -// you receive when you send the message). Amazon SQS can delete a message from -// a queue even if a visibility timeout setting causes the message to be locked -// by another consumer. Amazon SQS automatically deletes messages left in a -// queue longer than the retention period configured for the queue. -// -// The ReceiptHandle is associated with a specific instance of receiving a message. -// If you receive a message more than once, the ReceiptHandle is different each -// time you receive a message. When you use the DeleteMessage action, you must -// provide the most recently received ReceiptHandle for the message (otherwise, -// the request succeeds, but the message might not be deleted). -// -// For standard queues, it is possible to receive a message even after you delete -// it. This might happen on rare occasions if one of the servers which stores -// a copy of the message is unavailable when you send the request to delete -// the message. The copy remains on the server and might be returned to you -// during a subsequent receive request. You should ensure that your application -// is idempotent, so that receiving a message more than once does not cause -// issues. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation DeleteMessage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidIdFormat "InvalidIdFormat" -// The specified receipt handle isn't valid for the current version. -// -// * ErrCodeReceiptHandleIsInvalid "ReceiptHandleIsInvalid" -// The specified receipt handle isn't valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/DeleteMessage -func (c *SQS) DeleteMessage(input *DeleteMessageInput) (*DeleteMessageOutput, error) { - req, out := c.DeleteMessageRequest(input) - return out, req.Send() -} - -// DeleteMessageWithContext is the same as DeleteMessage with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteMessage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) DeleteMessageWithContext(ctx aws.Context, input *DeleteMessageInput, opts ...request.Option) (*DeleteMessageOutput, error) { - req, out := c.DeleteMessageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteMessageBatch = "DeleteMessageBatch" - -// DeleteMessageBatchRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMessageBatch operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteMessageBatch for more information on using the DeleteMessageBatch -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteMessageBatchRequest method. -// req, resp := client.DeleteMessageBatchRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/DeleteMessageBatch -func (c *SQS) DeleteMessageBatchRequest(input *DeleteMessageBatchInput) (req *request.Request, output *DeleteMessageBatchOutput) { - op := &request.Operation{ - Name: opDeleteMessageBatch, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteMessageBatchInput{} - } - - output = &DeleteMessageBatchOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteMessageBatch API operation for Amazon Simple Queue Service. -// -// Deletes up to ten messages from the specified queue. This is a batch version -// of DeleteMessage. The result of the action on each message is reported individually -// in the response. -// -// Because the batch request can result in a combination of successful and unsuccessful -// actions, you should check for batch errors even when the call returns an -// HTTP status code of 200. -// -// Some actions take lists of parameters. These lists are specified using the -// param.n notation. Values of n are integers starting from 1. For example, -// a parameter list with two elements looks like this: -// -// &Attribute.1=first -// -// &Attribute.2=second -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation DeleteMessageBatch for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyEntriesInBatchRequest "AWS.SimpleQueueService.TooManyEntriesInBatchRequest" -// The batch request contains more entries than permissible. -// -// * ErrCodeEmptyBatchRequest "AWS.SimpleQueueService.EmptyBatchRequest" -// The batch request doesn't contain any entries. -// -// * ErrCodeBatchEntryIdsNotDistinct "AWS.SimpleQueueService.BatchEntryIdsNotDistinct" -// Two or more batch entries in the request have the same Id. -// -// * ErrCodeInvalidBatchEntryId "AWS.SimpleQueueService.InvalidBatchEntryId" -// The Id of a batch entry in a batch request doesn't abide by the specification. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/DeleteMessageBatch -func (c *SQS) DeleteMessageBatch(input *DeleteMessageBatchInput) (*DeleteMessageBatchOutput, error) { - req, out := c.DeleteMessageBatchRequest(input) - return out, req.Send() -} - -// DeleteMessageBatchWithContext is the same as DeleteMessageBatch with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteMessageBatch for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) DeleteMessageBatchWithContext(ctx aws.Context, input *DeleteMessageBatchInput, opts ...request.Option) (*DeleteMessageBatchOutput, error) { - req, out := c.DeleteMessageBatchRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteQueue = "DeleteQueue" - -// DeleteQueueRequest generates a "aws/request.Request" representing the -// client's request for the DeleteQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteQueue for more information on using the DeleteQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteQueueRequest method. -// req, resp := client.DeleteQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/DeleteQueue -func (c *SQS) DeleteQueueRequest(input *DeleteQueueInput) (req *request.Request, output *DeleteQueueOutput) { - op := &request.Operation{ - Name: opDeleteQueue, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteQueueInput{} - } - - output = &DeleteQueueOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteQueue API operation for Amazon Simple Queue Service. -// -// Deletes the queue specified by the QueueUrl, regardless of the queue's contents. -// If the specified queue doesn't exist, Amazon SQS returns a successful response. -// -// Be careful with the DeleteQueue action: When you delete a queue, any messages -// in the queue are no longer available. -// -// When you delete a queue, the deletion process takes up to 60 seconds. Requests -// you send involving that queue during the 60 seconds might succeed. For example, -// a SendMessage request might succeed, but after 60 seconds the queue and the -// message you sent no longer exist. -// -// When you delete a queue, you must wait at least 60 seconds before creating -// a queue with the same name. -// -// Cross-account permissions don't apply to this action. For more information, -// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) -// in the Amazon Simple Queue Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation DeleteQueue for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/DeleteQueue -func (c *SQS) DeleteQueue(input *DeleteQueueInput) (*DeleteQueueOutput, error) { - req, out := c.DeleteQueueRequest(input) - return out, req.Send() -} - -// DeleteQueueWithContext is the same as DeleteQueue with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) DeleteQueueWithContext(ctx aws.Context, input *DeleteQueueInput, opts ...request.Option) (*DeleteQueueOutput, error) { - req, out := c.DeleteQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetQueueAttributes = "GetQueueAttributes" - -// GetQueueAttributesRequest generates a "aws/request.Request" representing the -// client's request for the GetQueueAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetQueueAttributes for more information on using the GetQueueAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetQueueAttributesRequest method. -// req, resp := client.GetQueueAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/GetQueueAttributes -func (c *SQS) GetQueueAttributesRequest(input *GetQueueAttributesInput) (req *request.Request, output *GetQueueAttributesOutput) { - op := &request.Operation{ - Name: opGetQueueAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetQueueAttributesInput{} - } - - output = &GetQueueAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetQueueAttributes API operation for Amazon Simple Queue Service. -// -// Gets attributes for the specified queue. -// -// To determine whether a queue is FIFO (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html), -// you can check whether QueueName ends with the .fifo suffix. -// -// Some actions take lists of parameters. These lists are specified using the -// param.n notation. Values of n are integers starting from 1. For example, -// a parameter list with two elements looks like this: -// -// &Attribute.1=first -// -// &Attribute.2=second -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation GetQueueAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidAttributeName "InvalidAttributeName" -// The specified attribute doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/GetQueueAttributes -func (c *SQS) GetQueueAttributes(input *GetQueueAttributesInput) (*GetQueueAttributesOutput, error) { - req, out := c.GetQueueAttributesRequest(input) - return out, req.Send() -} - -// GetQueueAttributesWithContext is the same as GetQueueAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See GetQueueAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) GetQueueAttributesWithContext(ctx aws.Context, input *GetQueueAttributesInput, opts ...request.Option) (*GetQueueAttributesOutput, error) { - req, out := c.GetQueueAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetQueueUrl = "GetQueueUrl" - -// GetQueueUrlRequest generates a "aws/request.Request" representing the -// client's request for the GetQueueUrl operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetQueueUrl for more information on using the GetQueueUrl -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetQueueUrlRequest method. -// req, resp := client.GetQueueUrlRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/GetQueueUrl -func (c *SQS) GetQueueUrlRequest(input *GetQueueUrlInput) (req *request.Request, output *GetQueueUrlOutput) { - op := &request.Operation{ - Name: opGetQueueUrl, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetQueueUrlInput{} - } - - output = &GetQueueUrlOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetQueueUrl API operation for Amazon Simple Queue Service. -// -// Returns the URL of an existing Amazon SQS queue. -// -// To access a queue that belongs to another AWS account, use the QueueOwnerAWSAccountId -// parameter to specify the account ID of the queue's owner. The queue's owner -// must grant you permission to access the queue. For more information about -// shared queue access, see AddPermission or see Allow Developers to Write Messages -// to a Shared Queue (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-writing-an-sqs-policy.html#write-messages-to-shared-queue) -// in the Amazon Simple Queue Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation GetQueueUrl for usage and error information. -// -// Returned Error Codes: -// * ErrCodeQueueDoesNotExist "AWS.SimpleQueueService.NonExistentQueue" -// The specified queue doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/GetQueueUrl -func (c *SQS) GetQueueUrl(input *GetQueueUrlInput) (*GetQueueUrlOutput, error) { - req, out := c.GetQueueUrlRequest(input) - return out, req.Send() -} - -// GetQueueUrlWithContext is the same as GetQueueUrl with the addition of -// the ability to pass a context and additional request options. -// -// See GetQueueUrl for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) GetQueueUrlWithContext(ctx aws.Context, input *GetQueueUrlInput, opts ...request.Option) (*GetQueueUrlOutput, error) { - req, out := c.GetQueueUrlRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDeadLetterSourceQueues = "ListDeadLetterSourceQueues" - -// ListDeadLetterSourceQueuesRequest generates a "aws/request.Request" representing the -// client's request for the ListDeadLetterSourceQueues operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDeadLetterSourceQueues for more information on using the ListDeadLetterSourceQueues -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDeadLetterSourceQueuesRequest method. -// req, resp := client.ListDeadLetterSourceQueuesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ListDeadLetterSourceQueues -func (c *SQS) ListDeadLetterSourceQueuesRequest(input *ListDeadLetterSourceQueuesInput) (req *request.Request, output *ListDeadLetterSourceQueuesOutput) { - op := &request.Operation{ - Name: opListDeadLetterSourceQueues, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListDeadLetterSourceQueuesInput{} - } - - output = &ListDeadLetterSourceQueuesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDeadLetterSourceQueues API operation for Amazon Simple Queue Service. -// -// Returns a list of your queues that have the RedrivePolicy queue attribute -// configured with a dead-letter queue. -// -// For more information about using dead-letter queues, see Using Amazon SQS -// Dead-Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) -// in the Amazon Simple Queue Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation ListDeadLetterSourceQueues for usage and error information. -// -// Returned Error Codes: -// * ErrCodeQueueDoesNotExist "AWS.SimpleQueueService.NonExistentQueue" -// The specified queue doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ListDeadLetterSourceQueues -func (c *SQS) ListDeadLetterSourceQueues(input *ListDeadLetterSourceQueuesInput) (*ListDeadLetterSourceQueuesOutput, error) { - req, out := c.ListDeadLetterSourceQueuesRequest(input) - return out, req.Send() -} - -// ListDeadLetterSourceQueuesWithContext is the same as ListDeadLetterSourceQueues with the addition of -// the ability to pass a context and additional request options. -// -// See ListDeadLetterSourceQueues for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) ListDeadLetterSourceQueuesWithContext(ctx aws.Context, input *ListDeadLetterSourceQueuesInput, opts ...request.Option) (*ListDeadLetterSourceQueuesOutput, error) { - req, out := c.ListDeadLetterSourceQueuesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListQueueTags = "ListQueueTags" - -// ListQueueTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListQueueTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListQueueTags for more information on using the ListQueueTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListQueueTagsRequest method. -// req, resp := client.ListQueueTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ListQueueTags -func (c *SQS) ListQueueTagsRequest(input *ListQueueTagsInput) (req *request.Request, output *ListQueueTagsOutput) { - op := &request.Operation{ - Name: opListQueueTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListQueueTagsInput{} - } - - output = &ListQueueTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListQueueTags API operation for Amazon Simple Queue Service. -// -// List all cost allocation tags added to the specified Amazon SQS queue. For -// an overview, see Tagging Your Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html) -// in the Amazon Simple Queue Service Developer Guide. -// -// When you use queue tags, keep the following guidelines in mind: -// -// * Adding more than 50 tags to a queue isn't recommended. -// -// * Tags don't have any semantic meaning. Amazon SQS interprets tags as -// character strings. -// -// * Tags are case-sensitive. -// -// * A new tag with a key identical to that of an existing tag overwrites -// the existing tag. -// -// * Tagging actions are limited to 5 TPS per AWS account. If your application -// requires a higher throughput, file a technical support request (https://console.aws.amazon.com/support/home#/case/create?issueType=technical). -// -// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues) -// in the Amazon Simple Queue Service Developer Guide. -// -// Cross-account permissions don't apply to this action. For more information, -// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) -// in the Amazon Simple Queue Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation ListQueueTags for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ListQueueTags -func (c *SQS) ListQueueTags(input *ListQueueTagsInput) (*ListQueueTagsOutput, error) { - req, out := c.ListQueueTagsRequest(input) - return out, req.Send() -} - -// ListQueueTagsWithContext is the same as ListQueueTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListQueueTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) ListQueueTagsWithContext(ctx aws.Context, input *ListQueueTagsInput, opts ...request.Option) (*ListQueueTagsOutput, error) { - req, out := c.ListQueueTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListQueues = "ListQueues" - -// ListQueuesRequest generates a "aws/request.Request" representing the -// client's request for the ListQueues operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListQueues for more information on using the ListQueues -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListQueuesRequest method. -// req, resp := client.ListQueuesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ListQueues -func (c *SQS) ListQueuesRequest(input *ListQueuesInput) (req *request.Request, output *ListQueuesOutput) { - op := &request.Operation{ - Name: opListQueues, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListQueuesInput{} - } - - output = &ListQueuesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListQueues API operation for Amazon Simple Queue Service. -// -// Returns a list of your queues. The maximum number of queues that can be returned -// is 1,000. If you specify a value for the optional QueueNamePrefix parameter, -// only queues with a name that begins with the specified value are returned. -// -// Cross-account permissions don't apply to this action. For more information, -// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) -// in the Amazon Simple Queue Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation ListQueues for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ListQueues -func (c *SQS) ListQueues(input *ListQueuesInput) (*ListQueuesOutput, error) { - req, out := c.ListQueuesRequest(input) - return out, req.Send() -} - -// ListQueuesWithContext is the same as ListQueues with the addition of -// the ability to pass a context and additional request options. -// -// See ListQueues for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) ListQueuesWithContext(ctx aws.Context, input *ListQueuesInput, opts ...request.Option) (*ListQueuesOutput, error) { - req, out := c.ListQueuesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPurgeQueue = "PurgeQueue" - -// PurgeQueueRequest generates a "aws/request.Request" representing the -// client's request for the PurgeQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PurgeQueue for more information on using the PurgeQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PurgeQueueRequest method. -// req, resp := client.PurgeQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/PurgeQueue -func (c *SQS) PurgeQueueRequest(input *PurgeQueueInput) (req *request.Request, output *PurgeQueueOutput) { - op := &request.Operation{ - Name: opPurgeQueue, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PurgeQueueInput{} - } - - output = &PurgeQueueOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PurgeQueue API operation for Amazon Simple Queue Service. -// -// Deletes the messages in a queue specified by the QueueURL parameter. -// -// When you use the PurgeQueue action, you can't retrieve any messages deleted -// from a queue. -// -// The message deletion process takes up to 60 seconds. We recommend waiting -// for 60 seconds regardless of your queue's size. -// -// Messages sent to the queue before you call PurgeQueue might be received but -// are deleted within the next minute. -// -// Messages sent to the queue after you call PurgeQueue might be deleted while -// the queue is being purged. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation PurgeQueue for usage and error information. -// -// Returned Error Codes: -// * ErrCodeQueueDoesNotExist "AWS.SimpleQueueService.NonExistentQueue" -// The specified queue doesn't exist. -// -// * ErrCodePurgeQueueInProgress "AWS.SimpleQueueService.PurgeQueueInProgress" -// Indicates that the specified queue previously received a PurgeQueue request -// within the last 60 seconds (the time it can take to delete the messages in -// the queue). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/PurgeQueue -func (c *SQS) PurgeQueue(input *PurgeQueueInput) (*PurgeQueueOutput, error) { - req, out := c.PurgeQueueRequest(input) - return out, req.Send() -} - -// PurgeQueueWithContext is the same as PurgeQueue with the addition of -// the ability to pass a context and additional request options. -// -// See PurgeQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) PurgeQueueWithContext(ctx aws.Context, input *PurgeQueueInput, opts ...request.Option) (*PurgeQueueOutput, error) { - req, out := c.PurgeQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opReceiveMessage = "ReceiveMessage" - -// ReceiveMessageRequest generates a "aws/request.Request" representing the -// client's request for the ReceiveMessage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ReceiveMessage for more information on using the ReceiveMessage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ReceiveMessageRequest method. -// req, resp := client.ReceiveMessageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ReceiveMessage -func (c *SQS) ReceiveMessageRequest(input *ReceiveMessageInput) (req *request.Request, output *ReceiveMessageOutput) { - op := &request.Operation{ - Name: opReceiveMessage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ReceiveMessageInput{} - } - - output = &ReceiveMessageOutput{} - req = c.newRequest(op, input, output) - return -} - -// ReceiveMessage API operation for Amazon Simple Queue Service. -// -// Retrieves one or more messages (up to 10), from the specified queue. Using -// the WaitTimeSeconds parameter enables long-poll support. For more information, -// see Amazon SQS Long Polling (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html) -// in the Amazon Simple Queue Service Developer Guide. -// -// Short poll is the default behavior where a weighted random set of machines -// is sampled on a ReceiveMessage call. Thus, only the messages on the sampled -// machines are returned. If the number of messages in the queue is small (fewer -// than 1,000), you most likely get fewer messages than you requested per ReceiveMessage -// call. If the number of messages in the queue is extremely small, you might -// not receive any messages in a particular ReceiveMessage response. If this -// happens, repeat the request. -// -// For each message returned, the response includes the following: -// -// * The message body. -// -// * An MD5 digest of the message body. For information about MD5, see RFC1321 -// (https://www.ietf.org/rfc/rfc1321.txt). -// -// * The MessageId you received when you sent the message to the queue. -// -// * The receipt handle. -// -// * The message attributes. -// -// * An MD5 digest of the message attributes. -// -// The receipt handle is the identifier you must provide when deleting the message. -// For more information, see Queue and Message Identifiers (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html) -// in the Amazon Simple Queue Service Developer Guide. -// -// You can provide the VisibilityTimeout parameter in your request. The parameter -// is applied to the messages that Amazon SQS returns in the response. If you -// don't include the parameter, the overall visibility timeout for the queue -// is used for the returned messages. For more information, see Visibility Timeout -// (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) -// in the Amazon Simple Queue Service Developer Guide. -// -// A message that isn't deleted or a message whose visibility isn't extended -// before the visibility timeout expires counts as a failed receive. Depending -// on the configuration of the queue, the message might be sent to the dead-letter -// queue. -// -// In the future, new attributes might be added. If you write code that calls -// this action, we recommend that you structure your code so that it can handle -// new attributes gracefully. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation ReceiveMessage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOverLimit "OverLimit" -// The specified action violates a limit. For example, ReceiveMessage returns -// this error if the maximum number of inflight messages is reached and AddPermission -// returns this error if the maximum number of permissions for the queue is -// reached. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ReceiveMessage -func (c *SQS) ReceiveMessage(input *ReceiveMessageInput) (*ReceiveMessageOutput, error) { - req, out := c.ReceiveMessageRequest(input) - return out, req.Send() -} - -// ReceiveMessageWithContext is the same as ReceiveMessage with the addition of -// the ability to pass a context and additional request options. -// -// See ReceiveMessage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) ReceiveMessageWithContext(ctx aws.Context, input *ReceiveMessageInput, opts ...request.Option) (*ReceiveMessageOutput, error) { - req, out := c.ReceiveMessageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemovePermission = "RemovePermission" - -// RemovePermissionRequest generates a "aws/request.Request" representing the -// client's request for the RemovePermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemovePermission for more information on using the RemovePermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemovePermissionRequest method. -// req, resp := client.RemovePermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/RemovePermission -func (c *SQS) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) { - op := &request.Operation{ - Name: opRemovePermission, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemovePermissionInput{} - } - - output = &RemovePermissionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemovePermission API operation for Amazon Simple Queue Service. -// -// Revokes any permissions in the queue policy that matches the specified Label -// parameter. -// -// Only the owner of a queue can remove permissions from it. -// -// Cross-account permissions don't apply to this action. For more information, -// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) -// in the Amazon Simple Queue Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation RemovePermission for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/RemovePermission -func (c *SQS) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) { - req, out := c.RemovePermissionRequest(input) - return out, req.Send() -} - -// RemovePermissionWithContext is the same as RemovePermission with the addition of -// the ability to pass a context and additional request options. -// -// See RemovePermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error) { - req, out := c.RemovePermissionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSendMessage = "SendMessage" - -// SendMessageRequest generates a "aws/request.Request" representing the -// client's request for the SendMessage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendMessage for more information on using the SendMessage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendMessageRequest method. -// req, resp := client.SendMessageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/SendMessage -func (c *SQS) SendMessageRequest(input *SendMessageInput) (req *request.Request, output *SendMessageOutput) { - op := &request.Operation{ - Name: opSendMessage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SendMessageInput{} - } - - output = &SendMessageOutput{} - req = c.newRequest(op, input, output) - return -} - -// SendMessage API operation for Amazon Simple Queue Service. -// -// Delivers a message to the specified queue. -// -// A message can include only XML, JSON, and unformatted text. The following -// Unicode characters are allowed: -// -// #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF -// -// Any characters not included in this list will be rejected. For more information, -// see the W3C specification for characters (http://www.w3.org/TR/REC-xml/#charsets). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation SendMessage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidMessageContents "InvalidMessageContents" -// The message contains characters outside the allowed set. -// -// * ErrCodeUnsupportedOperation "AWS.SimpleQueueService.UnsupportedOperation" -// Error code 400. Unsupported operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/SendMessage -func (c *SQS) SendMessage(input *SendMessageInput) (*SendMessageOutput, error) { - req, out := c.SendMessageRequest(input) - return out, req.Send() -} - -// SendMessageWithContext is the same as SendMessage with the addition of -// the ability to pass a context and additional request options. -// -// See SendMessage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) SendMessageWithContext(ctx aws.Context, input *SendMessageInput, opts ...request.Option) (*SendMessageOutput, error) { - req, out := c.SendMessageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSendMessageBatch = "SendMessageBatch" - -// SendMessageBatchRequest generates a "aws/request.Request" representing the -// client's request for the SendMessageBatch operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendMessageBatch for more information on using the SendMessageBatch -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendMessageBatchRequest method. -// req, resp := client.SendMessageBatchRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/SendMessageBatch -func (c *SQS) SendMessageBatchRequest(input *SendMessageBatchInput) (req *request.Request, output *SendMessageBatchOutput) { - op := &request.Operation{ - Name: opSendMessageBatch, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SendMessageBatchInput{} - } - - output = &SendMessageBatchOutput{} - req = c.newRequest(op, input, output) - return -} - -// SendMessageBatch API operation for Amazon Simple Queue Service. -// -// Delivers up to ten messages to the specified queue. This is a batch version -// of SendMessage. For a FIFO queue, multiple messages within a single batch -// are enqueued in the order they are sent. -// -// The result of sending each message is reported individually in the response. -// Because the batch request can result in a combination of successful and unsuccessful -// actions, you should check for batch errors even when the call returns an -// HTTP status code of 200. -// -// The maximum allowed individual message size and the maximum total payload -// size (the sum of the individual lengths of all of the batched messages) are -// both 256 KB (262,144 bytes). -// -// A message can include only XML, JSON, and unformatted text. The following -// Unicode characters are allowed: -// -// #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF -// -// Any characters not included in this list will be rejected. For more information, -// see the W3C specification for characters (http://www.w3.org/TR/REC-xml/#charsets). -// -// If you don't specify the DelaySeconds parameter for an entry, Amazon SQS -// uses the default value for the queue. -// -// Some actions take lists of parameters. These lists are specified using the -// param.n notation. Values of n are integers starting from 1. For example, -// a parameter list with two elements looks like this: -// -// &Attribute.1=first -// -// &Attribute.2=second -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation SendMessageBatch for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTooManyEntriesInBatchRequest "AWS.SimpleQueueService.TooManyEntriesInBatchRequest" -// The batch request contains more entries than permissible. -// -// * ErrCodeEmptyBatchRequest "AWS.SimpleQueueService.EmptyBatchRequest" -// The batch request doesn't contain any entries. -// -// * ErrCodeBatchEntryIdsNotDistinct "AWS.SimpleQueueService.BatchEntryIdsNotDistinct" -// Two or more batch entries in the request have the same Id. -// -// * ErrCodeBatchRequestTooLong "AWS.SimpleQueueService.BatchRequestTooLong" -// The length of all the messages put together is more than the limit. -// -// * ErrCodeInvalidBatchEntryId "AWS.SimpleQueueService.InvalidBatchEntryId" -// The Id of a batch entry in a batch request doesn't abide by the specification. -// -// * ErrCodeUnsupportedOperation "AWS.SimpleQueueService.UnsupportedOperation" -// Error code 400. Unsupported operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/SendMessageBatch -func (c *SQS) SendMessageBatch(input *SendMessageBatchInput) (*SendMessageBatchOutput, error) { - req, out := c.SendMessageBatchRequest(input) - return out, req.Send() -} - -// SendMessageBatchWithContext is the same as SendMessageBatch with the addition of -// the ability to pass a context and additional request options. -// -// See SendMessageBatch for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) SendMessageBatchWithContext(ctx aws.Context, input *SendMessageBatchInput, opts ...request.Option) (*SendMessageBatchOutput, error) { - req, out := c.SendMessageBatchRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetQueueAttributes = "SetQueueAttributes" - -// SetQueueAttributesRequest generates a "aws/request.Request" representing the -// client's request for the SetQueueAttributes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetQueueAttributes for more information on using the SetQueueAttributes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetQueueAttributesRequest method. -// req, resp := client.SetQueueAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/SetQueueAttributes -func (c *SQS) SetQueueAttributesRequest(input *SetQueueAttributesInput) (req *request.Request, output *SetQueueAttributesOutput) { - op := &request.Operation{ - Name: opSetQueueAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetQueueAttributesInput{} - } - - output = &SetQueueAttributesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetQueueAttributes API operation for Amazon Simple Queue Service. -// -// Sets the value of one or more queue attributes. When you change a queue's -// attributes, the change can take up to 60 seconds for most of the attributes -// to propagate throughout the Amazon SQS system. Changes made to the MessageRetentionPeriod -// attribute can take up to 15 minutes. -// -// In the future, new attributes might be added. If you write code that calls -// this action, we recommend that you structure your code so that it can handle -// new attributes gracefully. -// -// Cross-account permissions don't apply to this action. For more information, -// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) -// in the Amazon Simple Queue Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation SetQueueAttributes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidAttributeName "InvalidAttributeName" -// The specified attribute doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/SetQueueAttributes -func (c *SQS) SetQueueAttributes(input *SetQueueAttributesInput) (*SetQueueAttributesOutput, error) { - req, out := c.SetQueueAttributesRequest(input) - return out, req.Send() -} - -// SetQueueAttributesWithContext is the same as SetQueueAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See SetQueueAttributes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) SetQueueAttributesWithContext(ctx aws.Context, input *SetQueueAttributesInput, opts ...request.Option) (*SetQueueAttributesOutput, error) { - req, out := c.SetQueueAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagQueue = "TagQueue" - -// TagQueueRequest generates a "aws/request.Request" representing the -// client's request for the TagQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagQueue for more information on using the TagQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TagQueueRequest method. -// req, resp := client.TagQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/TagQueue -func (c *SQS) TagQueueRequest(input *TagQueueInput) (req *request.Request, output *TagQueueOutput) { - op := &request.Operation{ - Name: opTagQueue, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagQueueInput{} - } - - output = &TagQueueOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagQueue API operation for Amazon Simple Queue Service. -// -// Add cost allocation tags to the specified Amazon SQS queue. For an overview, -// see Tagging Your Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html) -// in the Amazon Simple Queue Service Developer Guide. -// -// When you use queue tags, keep the following guidelines in mind: -// -// * Adding more than 50 tags to a queue isn't recommended. -// -// * Tags don't have any semantic meaning. Amazon SQS interprets tags as -// character strings. -// -// * Tags are case-sensitive. -// -// * A new tag with a key identical to that of an existing tag overwrites -// the existing tag. -// -// * Tagging actions are limited to 5 TPS per AWS account. If your application -// requires a higher throughput, file a technical support request (https://console.aws.amazon.com/support/home#/case/create?issueType=technical). -// -// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues) -// in the Amazon Simple Queue Service Developer Guide. -// -// Cross-account permissions don't apply to this action. For more information, -// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) -// in the Amazon Simple Queue Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation TagQueue for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/TagQueue -func (c *SQS) TagQueue(input *TagQueueInput) (*TagQueueOutput, error) { - req, out := c.TagQueueRequest(input) - return out, req.Send() -} - -// TagQueueWithContext is the same as TagQueue with the addition of -// the ability to pass a context and additional request options. -// -// See TagQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) TagQueueWithContext(ctx aws.Context, input *TagQueueInput, opts ...request.Option) (*TagQueueOutput, error) { - req, out := c.TagQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagQueue = "UntagQueue" - -// UntagQueueRequest generates a "aws/request.Request" representing the -// client's request for the UntagQueue operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagQueue for more information on using the UntagQueue -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UntagQueueRequest method. -// req, resp := client.UntagQueueRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/UntagQueue -func (c *SQS) UntagQueueRequest(input *UntagQueueInput) (req *request.Request, output *UntagQueueOutput) { - op := &request.Operation{ - Name: opUntagQueue, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagQueueInput{} - } - - output = &UntagQueueOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagQueue API operation for Amazon Simple Queue Service. -// -// Remove cost allocation tags from the specified Amazon SQS queue. For an overview, -// see Tagging Your Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html) -// in the Amazon Simple Queue Service Developer Guide. -// -// When you use queue tags, keep the following guidelines in mind: -// -// * Adding more than 50 tags to a queue isn't recommended. -// -// * Tags don't have any semantic meaning. Amazon SQS interprets tags as -// character strings. -// -// * Tags are case-sensitive. -// -// * A new tag with a key identical to that of an existing tag overwrites -// the existing tag. -// -// * Tagging actions are limited to 5 TPS per AWS account. If your application -// requires a higher throughput, file a technical support request (https://console.aws.amazon.com/support/home#/case/create?issueType=technical). -// -// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues) -// in the Amazon Simple Queue Service Developer Guide. -// -// Cross-account permissions don't apply to this action. For more information, -// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) -// in the Amazon Simple Queue Service Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Queue Service's -// API operation UntagQueue for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/UntagQueue -func (c *SQS) UntagQueue(input *UntagQueueInput) (*UntagQueueOutput, error) { - req, out := c.UntagQueueRequest(input) - return out, req.Send() -} - -// UntagQueueWithContext is the same as UntagQueue with the addition of -// the ability to pass a context and additional request options. -// -// See UntagQueue for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SQS) UntagQueueWithContext(ctx aws.Context, input *UntagQueueInput, opts ...request.Option) (*UntagQueueOutput, error) { - req, out := c.UntagQueueRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AddPermissionInput struct { - _ struct{} `type:"structure"` - - // The AWS account number of the principal (http://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P) - // who is given permission. The principal must have an AWS account, but does - // not need to be signed up for Amazon SQS. For information about locating the - // AWS account identification, see Your AWS Identifiers (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html#sqs-api-request-authentication) - // in the Amazon Simple Queue Service Developer Guide. - // - // AWSAccountIds is a required field - AWSAccountIds []*string `locationNameList:"AWSAccountId" type:"list" flattened:"true" required:"true"` - - // The action the client wants to allow for the specified principal. Valid values: - // the name of any action or *. - // - // For more information about these actions, see Overview of Managing Access - // Permissions to Your Amazon Simple Queue Service Resource (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-overview-of-managing-access.html) - // in the Amazon Simple Queue Service Developer Guide. - // - // Specifying SendMessage, DeleteMessage, or ChangeMessageVisibility for ActionName.n - // also grants permissions for the corresponding batch versions of those actions: - // SendMessageBatch, DeleteMessageBatch, and ChangeMessageVisibilityBatch. - // - // Actions is a required field - Actions []*string `locationNameList:"ActionName" type:"list" flattened:"true" required:"true"` - - // The unique identification of the permission you're setting (for example, - // AliceSendMessage). Maximum 80 characters. Allowed characters include alphanumeric - // characters, hyphens (-), and underscores (_). - // - // Label is a required field - Label *string `type:"string" required:"true"` - - // The URL of the Amazon SQS queue to which permissions are added. - // - // Queue URLs and names are case-sensitive. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s AddPermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddPermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddPermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddPermissionInput"} - if s.AWSAccountIds == nil { - invalidParams.Add(request.NewErrParamRequired("AWSAccountIds")) - } - if s.Actions == nil { - invalidParams.Add(request.NewErrParamRequired("Actions")) - } - if s.Label == nil { - invalidParams.Add(request.NewErrParamRequired("Label")) - } - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAWSAccountIds sets the AWSAccountIds field's value. -func (s *AddPermissionInput) SetAWSAccountIds(v []*string) *AddPermissionInput { - s.AWSAccountIds = v - return s -} - -// SetActions sets the Actions field's value. -func (s *AddPermissionInput) SetActions(v []*string) *AddPermissionInput { - s.Actions = v - return s -} - -// SetLabel sets the Label field's value. -func (s *AddPermissionInput) SetLabel(v string) *AddPermissionInput { - s.Label = &v - return s -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *AddPermissionInput) SetQueueUrl(v string) *AddPermissionInput { - s.QueueUrl = &v - return s -} - -type AddPermissionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddPermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddPermissionOutput) GoString() string { - return s.String() -} - -// Gives a detailed description of the result of an action on each entry in -// the request. -type BatchResultErrorEntry struct { - _ struct{} `type:"structure"` - - // An error code representing why the action failed on this entry. - // - // Code is a required field - Code *string `type:"string" required:"true"` - - // The Id of an entry in a batch request. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // A message explaining why the action failed on this entry. - Message *string `type:"string"` - - // Specifies whether the error happened due to the producer. - // - // SenderFault is a required field - SenderFault *bool `type:"boolean" required:"true"` -} - -// String returns the string representation -func (s BatchResultErrorEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s BatchResultErrorEntry) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *BatchResultErrorEntry) SetCode(v string) *BatchResultErrorEntry { - s.Code = &v - return s -} - -// SetId sets the Id field's value. -func (s *BatchResultErrorEntry) SetId(v string) *BatchResultErrorEntry { - s.Id = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *BatchResultErrorEntry) SetMessage(v string) *BatchResultErrorEntry { - s.Message = &v - return s -} - -// SetSenderFault sets the SenderFault field's value. -func (s *BatchResultErrorEntry) SetSenderFault(v bool) *BatchResultErrorEntry { - s.SenderFault = &v - return s -} - -type ChangeMessageVisibilityBatchInput struct { - _ struct{} `type:"structure"` - - // A list of receipt handles of the messages for which the visibility timeout - // must be changed. - // - // Entries is a required field - Entries []*ChangeMessageVisibilityBatchRequestEntry `locationNameList:"ChangeMessageVisibilityBatchRequestEntry" type:"list" flattened:"true" required:"true"` - - // The URL of the Amazon SQS queue whose messages' visibility is changed. - // - // Queue URLs and names are case-sensitive. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ChangeMessageVisibilityBatchInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangeMessageVisibilityBatchInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ChangeMessageVisibilityBatchInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ChangeMessageVisibilityBatchInput"} - if s.Entries == nil { - invalidParams.Add(request.NewErrParamRequired("Entries")) - } - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - if s.Entries != nil { - for i, v := range s.Entries { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entries", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEntries sets the Entries field's value. -func (s *ChangeMessageVisibilityBatchInput) SetEntries(v []*ChangeMessageVisibilityBatchRequestEntry) *ChangeMessageVisibilityBatchInput { - s.Entries = v - return s -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *ChangeMessageVisibilityBatchInput) SetQueueUrl(v string) *ChangeMessageVisibilityBatchInput { - s.QueueUrl = &v - return s -} - -// For each message in the batch, the response contains a ChangeMessageVisibilityBatchResultEntry -// tag if the message succeeds or a BatchResultErrorEntry tag if the message -// fails. -type ChangeMessageVisibilityBatchOutput struct { - _ struct{} `type:"structure"` - - // A list of BatchResultErrorEntry items. - // - // Failed is a required field - Failed []*BatchResultErrorEntry `locationNameList:"BatchResultErrorEntry" type:"list" flattened:"true" required:"true"` - - // A list of ChangeMessageVisibilityBatchResultEntry items. - // - // Successful is a required field - Successful []*ChangeMessageVisibilityBatchResultEntry `locationNameList:"ChangeMessageVisibilityBatchResultEntry" type:"list" flattened:"true" required:"true"` -} - -// String returns the string representation -func (s ChangeMessageVisibilityBatchOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangeMessageVisibilityBatchOutput) GoString() string { - return s.String() -} - -// SetFailed sets the Failed field's value. -func (s *ChangeMessageVisibilityBatchOutput) SetFailed(v []*BatchResultErrorEntry) *ChangeMessageVisibilityBatchOutput { - s.Failed = v - return s -} - -// SetSuccessful sets the Successful field's value. -func (s *ChangeMessageVisibilityBatchOutput) SetSuccessful(v []*ChangeMessageVisibilityBatchResultEntry) *ChangeMessageVisibilityBatchOutput { - s.Successful = v - return s -} - -// Encloses a receipt handle and an entry id for each message in ChangeMessageVisibilityBatch. -// -// All of the following list parameters must be prefixed with ChangeMessageVisibilityBatchRequestEntry.n, -// where n is an integer value starting with 1. For example, a parameter list -// for this action might look like this: -// -// &ChangeMessageVisibilityBatchRequestEntry.1.Id=change_visibility_msg_2 -// -// &ChangeMessageVisibilityBatchRequestEntry.1.ReceiptHandle=your_receipt_handle -// -// &ChangeMessageVisibilityBatchRequestEntry.1.VisibilityTimeout=45 -type ChangeMessageVisibilityBatchRequestEntry struct { - _ struct{} `type:"structure"` - - // An identifier for this particular receipt handle used to communicate the - // result. - // - // The Ids of a batch request need to be unique within a request - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // A receipt handle. - // - // ReceiptHandle is a required field - ReceiptHandle *string `type:"string" required:"true"` - - // The new value (in seconds) for the message's visibility timeout. - VisibilityTimeout *int64 `type:"integer"` -} - -// String returns the string representation -func (s ChangeMessageVisibilityBatchRequestEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangeMessageVisibilityBatchRequestEntry) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ChangeMessageVisibilityBatchRequestEntry) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ChangeMessageVisibilityBatchRequestEntry"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.ReceiptHandle == nil { - invalidParams.Add(request.NewErrParamRequired("ReceiptHandle")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *ChangeMessageVisibilityBatchRequestEntry) SetId(v string) *ChangeMessageVisibilityBatchRequestEntry { - s.Id = &v - return s -} - -// SetReceiptHandle sets the ReceiptHandle field's value. -func (s *ChangeMessageVisibilityBatchRequestEntry) SetReceiptHandle(v string) *ChangeMessageVisibilityBatchRequestEntry { - s.ReceiptHandle = &v - return s -} - -// SetVisibilityTimeout sets the VisibilityTimeout field's value. -func (s *ChangeMessageVisibilityBatchRequestEntry) SetVisibilityTimeout(v int64) *ChangeMessageVisibilityBatchRequestEntry { - s.VisibilityTimeout = &v - return s -} - -// Encloses the Id of an entry in ChangeMessageVisibilityBatch. -type ChangeMessageVisibilityBatchResultEntry struct { - _ struct{} `type:"structure"` - - // Represents a message whose visibility timeout has been changed successfully. - // - // Id is a required field - Id *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ChangeMessageVisibilityBatchResultEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangeMessageVisibilityBatchResultEntry) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *ChangeMessageVisibilityBatchResultEntry) SetId(v string) *ChangeMessageVisibilityBatchResultEntry { - s.Id = &v - return s -} - -type ChangeMessageVisibilityInput struct { - _ struct{} `type:"structure"` - - // The URL of the Amazon SQS queue whose message's visibility is changed. - // - // Queue URLs and names are case-sensitive. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` - - // The receipt handle associated with the message whose visibility timeout is - // changed. This parameter is returned by the ReceiveMessage action. - // - // ReceiptHandle is a required field - ReceiptHandle *string `type:"string" required:"true"` - - // The new value for the message's visibility timeout (in seconds). Values values: - // 0 to 43200. Maximum: 12 hours. - // - // VisibilityTimeout is a required field - VisibilityTimeout *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s ChangeMessageVisibilityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangeMessageVisibilityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ChangeMessageVisibilityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ChangeMessageVisibilityInput"} - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - if s.ReceiptHandle == nil { - invalidParams.Add(request.NewErrParamRequired("ReceiptHandle")) - } - if s.VisibilityTimeout == nil { - invalidParams.Add(request.NewErrParamRequired("VisibilityTimeout")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *ChangeMessageVisibilityInput) SetQueueUrl(v string) *ChangeMessageVisibilityInput { - s.QueueUrl = &v - return s -} - -// SetReceiptHandle sets the ReceiptHandle field's value. -func (s *ChangeMessageVisibilityInput) SetReceiptHandle(v string) *ChangeMessageVisibilityInput { - s.ReceiptHandle = &v - return s -} - -// SetVisibilityTimeout sets the VisibilityTimeout field's value. -func (s *ChangeMessageVisibilityInput) SetVisibilityTimeout(v int64) *ChangeMessageVisibilityInput { - s.VisibilityTimeout = &v - return s -} - -type ChangeMessageVisibilityOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ChangeMessageVisibilityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChangeMessageVisibilityOutput) GoString() string { - return s.String() -} - -type CreateQueueInput struct { - _ struct{} `type:"structure"` - - // A map of attributes with their corresponding values. - // - // The following lists the names, descriptions, and values of the special request - // parameters that the CreateQueue action uses: - // - // * DelaySeconds - The length of time, in seconds, for which the delivery - // of all messages in the queue is delayed. Valid values: An integer from - // 0 to 900 seconds (15 minutes). Default: 0. - // - // * MaximumMessageSize - The limit of how many bytes a message can contain - // before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes - // (1 KiB) to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB). - // - // * MessageRetentionPeriod - The length of time, in seconds, for which Amazon - // SQS retains a message. Valid values: An integer from 60 seconds (1 minute) - // to 1,209,600 seconds (14 days). Default: 345,600 (4 days). - // - // * Policy - The queue's policy. A valid AWS policy. For more information - // about policy structure, see Overview of AWS IAM Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html) - // in the Amazon IAM User Guide. - // - // * ReceiveMessageWaitTimeSeconds - The length of time, in seconds, for - // which a ReceiveMessage action waits for a message to arrive. Valid values: - // An integer from 0 to 20 (seconds). Default: 0. - // - // * RedrivePolicy - The string that includes the parameters for the dead-letter - // queue functionality of the source queue. For more information about the - // redrive policy and dead-letter queues, see Using Amazon SQS Dead-Letter - // Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) - // in the Amazon Simple Queue Service Developer Guide. - // - // deadLetterTargetArn - The Amazon Resource Name (ARN) of the dead-letter queue - // to which Amazon SQS moves messages after the value of maxReceiveCount - // is exceeded. - // - // maxReceiveCount - The number of times a message is delivered to the source - // queue before being moved to the dead-letter queue. When the ReceiveCount - // for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves - // the message to the dead-letter-queue. - // - // The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, - // the dead-letter queue of a standard queue must also be a standard queue. - // - // * VisibilityTimeout - The visibility timeout for the queue, in seconds. - // Valid values: An integer from 0 to 43,200 (12 hours). Default: 30. For - // more information about the visibility timeout, see Visibility Timeout - // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) - // in the Amazon Simple Queue Service Developer Guide. - // - // The following attributes apply only to server-side-encryption (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): - // - // * KmsMasterKeyId - The ID of an AWS-managed customer master key (CMK) - // for Amazon SQS or a custom CMK. For more information, see Key Terms (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms). - // While the alias of the AWS-managed CMK for Amazon SQS is always alias/aws/sqs, - // the alias of a custom CMK can, for example, be alias/MyAlias. For more - // examples, see KeyId (http://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters) - // in the AWS Key Management Service API Reference. - // - // * KmsDataKeyReusePeriodSeconds - The length of time, in seconds, for which - // Amazon SQS can reuse a data key (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys) - // to encrypt or decrypt messages before calling AWS KMS again. An integer - // representing seconds, between 60 seconds (1 minute) and 86,400 seconds - // (24 hours). Default: 300 (5 minutes). A shorter time period provides better - // security but results in more calls to KMS which might incur charges after - // Free Tier. For more information, see How Does the Data Key Reuse Period - // Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). - // - // - // The following attributes apply only to FIFO (first-in-first-out) queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html): - // - // * FifoQueue - Designates a queue as FIFO. Valid values: true, false. You - // can provide this attribute only during queue creation. You can't change - // it for an existing queue. When you set this attribute, you must also provide - // the MessageGroupId for your messages explicitly. - // - // For more information, see FIFO Queue Logic (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-understanding-logic) - // in the Amazon Simple Queue Service Developer Guide. - // - // * ContentBasedDeduplication - Enables content-based deduplication. Valid - // values: true, false. For more information, see Exactly-Once Processing - // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing) - // in the Amazon Simple Queue Service Developer Guide. - // - // Every message must have a unique MessageDeduplicationId, - // - // You may provide a MessageDeduplicationId explicitly. - // - // If you aren't able to provide a MessageDeduplicationId and you enable ContentBasedDeduplication - // for your queue, Amazon SQS uses a SHA-256 hash to generate the MessageDeduplicationId - // using the body of the message (but not the attributes of the message). - // - // - // If you don't provide a MessageDeduplicationId and the queue doesn't have - // ContentBasedDeduplication set, the action fails with an error. - // - // If the queue has ContentBasedDeduplication set, your MessageDeduplicationId - // overrides the generated one. - // - // When ContentBasedDeduplication is in effect, messages with identical content - // sent within the deduplication interval are treated as duplicates and only - // one copy of the message is delivered. - // - // If you send one message with ContentBasedDeduplication enabled and then another - // message with a MessageDeduplicationId that is the same as the one generated - // for the first MessageDeduplicationId, the two messages are treated as - // duplicates and only one copy of the message is delivered. - Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` - - // The name of the new queue. The following limits apply to this name: - // - // * A queue name can have up to 80 characters. - // - // * Valid values: alphanumeric characters, hyphens (-), and underscores - // (_). - // - // * A FIFO queue name must end with the .fifo suffix. - // - // Queue URLs and names are case-sensitive. - // - // QueueName is a required field - QueueName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateQueueInput"} - if s.QueueName == nil { - invalidParams.Add(request.NewErrParamRequired("QueueName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *CreateQueueInput) SetAttributes(v map[string]*string) *CreateQueueInput { - s.Attributes = v - return s -} - -// SetQueueName sets the QueueName field's value. -func (s *CreateQueueInput) SetQueueName(v string) *CreateQueueInput { - s.QueueName = &v - return s -} - -// Returns the QueueUrl attribute of the created queue. -type CreateQueueOutput struct { - _ struct{} `type:"structure"` - - // The URL of the created Amazon SQS queue. - QueueUrl *string `type:"string"` -} - -// String returns the string representation -func (s CreateQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateQueueOutput) GoString() string { - return s.String() -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *CreateQueueOutput) SetQueueUrl(v string) *CreateQueueOutput { - s.QueueUrl = &v - return s -} - -type DeleteMessageBatchInput struct { - _ struct{} `type:"structure"` - - // A list of receipt handles for the messages to be deleted. - // - // Entries is a required field - Entries []*DeleteMessageBatchRequestEntry `locationNameList:"DeleteMessageBatchRequestEntry" type:"list" flattened:"true" required:"true"` - - // The URL of the Amazon SQS queue from which messages are deleted. - // - // Queue URLs and names are case-sensitive. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteMessageBatchInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMessageBatchInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMessageBatchInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMessageBatchInput"} - if s.Entries == nil { - invalidParams.Add(request.NewErrParamRequired("Entries")) - } - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - if s.Entries != nil { - for i, v := range s.Entries { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entries", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEntries sets the Entries field's value. -func (s *DeleteMessageBatchInput) SetEntries(v []*DeleteMessageBatchRequestEntry) *DeleteMessageBatchInput { - s.Entries = v - return s -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *DeleteMessageBatchInput) SetQueueUrl(v string) *DeleteMessageBatchInput { - s.QueueUrl = &v - return s -} - -// For each message in the batch, the response contains a DeleteMessageBatchResultEntry -// tag if the message is deleted or a BatchResultErrorEntry tag if the message -// can't be deleted. -type DeleteMessageBatchOutput struct { - _ struct{} `type:"structure"` - - // A list of BatchResultErrorEntry items. - // - // Failed is a required field - Failed []*BatchResultErrorEntry `locationNameList:"BatchResultErrorEntry" type:"list" flattened:"true" required:"true"` - - // A list of DeleteMessageBatchResultEntry items. - // - // Successful is a required field - Successful []*DeleteMessageBatchResultEntry `locationNameList:"DeleteMessageBatchResultEntry" type:"list" flattened:"true" required:"true"` -} - -// String returns the string representation -func (s DeleteMessageBatchOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMessageBatchOutput) GoString() string { - return s.String() -} - -// SetFailed sets the Failed field's value. -func (s *DeleteMessageBatchOutput) SetFailed(v []*BatchResultErrorEntry) *DeleteMessageBatchOutput { - s.Failed = v - return s -} - -// SetSuccessful sets the Successful field's value. -func (s *DeleteMessageBatchOutput) SetSuccessful(v []*DeleteMessageBatchResultEntry) *DeleteMessageBatchOutput { - s.Successful = v - return s -} - -// Encloses a receipt handle and an identifier for it. -type DeleteMessageBatchRequestEntry struct { - _ struct{} `type:"structure"` - - // An identifier for this particular receipt handle. This is used to communicate - // the result. - // - // The Ids of a batch request need to be unique within a request - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // A receipt handle. - // - // ReceiptHandle is a required field - ReceiptHandle *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteMessageBatchRequestEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMessageBatchRequestEntry) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMessageBatchRequestEntry) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMessageBatchRequestEntry"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.ReceiptHandle == nil { - invalidParams.Add(request.NewErrParamRequired("ReceiptHandle")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteMessageBatchRequestEntry) SetId(v string) *DeleteMessageBatchRequestEntry { - s.Id = &v - return s -} - -// SetReceiptHandle sets the ReceiptHandle field's value. -func (s *DeleteMessageBatchRequestEntry) SetReceiptHandle(v string) *DeleteMessageBatchRequestEntry { - s.ReceiptHandle = &v - return s -} - -// Encloses the Id of an entry in DeleteMessageBatch. -type DeleteMessageBatchResultEntry struct { - _ struct{} `type:"structure"` - - // Represents a successfully deleted message. - // - // Id is a required field - Id *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteMessageBatchResultEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMessageBatchResultEntry) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *DeleteMessageBatchResultEntry) SetId(v string) *DeleteMessageBatchResultEntry { - s.Id = &v - return s -} - -type DeleteMessageInput struct { - _ struct{} `type:"structure"` - - // The URL of the Amazon SQS queue from which messages are deleted. - // - // Queue URLs and names are case-sensitive. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` - - // The receipt handle associated with the message to delete. - // - // ReceiptHandle is a required field - ReceiptHandle *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteMessageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMessageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMessageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMessageInput"} - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - if s.ReceiptHandle == nil { - invalidParams.Add(request.NewErrParamRequired("ReceiptHandle")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *DeleteMessageInput) SetQueueUrl(v string) *DeleteMessageInput { - s.QueueUrl = &v - return s -} - -// SetReceiptHandle sets the ReceiptHandle field's value. -func (s *DeleteMessageInput) SetReceiptHandle(v string) *DeleteMessageInput { - s.ReceiptHandle = &v - return s -} - -type DeleteMessageOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteMessageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMessageOutput) GoString() string { - return s.String() -} - -type DeleteQueueInput struct { - _ struct{} `type:"structure"` - - // The URL of the Amazon SQS queue to delete. - // - // Queue URLs and names are case-sensitive. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteQueueInput"} - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *DeleteQueueInput) SetQueueUrl(v string) *DeleteQueueInput { - s.QueueUrl = &v - return s -} - -type DeleteQueueOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteQueueOutput) GoString() string { - return s.String() -} - -type GetQueueAttributesInput struct { - _ struct{} `type:"structure"` - - // A list of attributes for which to retrieve information. - // - // In the future, new attributes might be added. If you write code that calls - // this action, we recommend that you structure your code so that it can handle - // new attributes gracefully. - // - // The following attributes are supported: - // - // * All - Returns all values. - // - // * ApproximateNumberOfMessages - Returns the approximate number of messages - // available for retrieval from the queue. - // - // * ApproximateNumberOfMessagesDelayed - Returns the approximate number - // of messages in the queue that are delayed and not available for reading - // immediately. This can happen when the queue is configured as a delay queue - // or when a message has been sent with a delay parameter. - // - // * ApproximateNumberOfMessagesNotVisible - Returns the approximate number - // of messages that are in flight. Messages are considered to be in flight - // if they have been sent to a client but have not yet been deleted or have - // not yet reached the end of their visibility window. - // - // * CreatedTimestamp - Returns the time when the queue was created in seconds - // (epoch time (http://en.wikipedia.org/wiki/Unix_time)). - // - // * DelaySeconds - Returns the default delay on the queue in seconds. - // - // * LastModifiedTimestamp - Returns the time when the queue was last changed - // in seconds (epoch time (http://en.wikipedia.org/wiki/Unix_time)). - // - // * MaximumMessageSize - Returns the limit of how many bytes a message can - // contain before Amazon SQS rejects it. - // - // * MessageRetentionPeriod - Returns the length of time, in seconds, for - // which Amazon SQS retains a message. - // - // * Policy - Returns the policy of the queue. - // - // * QueueArn - Returns the Amazon resource name (ARN) of the queue. - // - // * ReceiveMessageWaitTimeSeconds - Returns the length of time, in seconds, - // for which the ReceiveMessage action waits for a message to arrive. - // - // * RedrivePolicy - Returns the string that includes the parameters for - // dead-letter queue functionality of the source queue. For more information - // about the redrive policy and dead-letter queues, see Using Amazon SQS - // Dead-Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) - // in the Amazon Simple Queue Service Developer Guide. - // - // deadLetterTargetArn - The Amazon Resource Name (ARN) of the dead-letter queue - // to which Amazon SQS moves messages after the value of maxReceiveCount - // is exceeded. - // - // maxReceiveCount - The number of times a message is delivered to the source - // queue before being moved to the dead-letter queue. When the ReceiveCount - // for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves - // the message to the dead-letter-queue. - // - // * VisibilityTimeout - Returns the visibility timeout for the queue. For - // more information about the visibility timeout, see Visibility Timeout - // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) - // in the Amazon Simple Queue Service Developer Guide. - // - // The following attributes apply only to server-side-encryption (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): - // - // * KmsMasterKeyId - Returns the ID of an AWS-managed customer master key - // (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms - // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms). - // - // - // * KmsDataKeyReusePeriodSeconds - Returns the length of time, in seconds, - // for which Amazon SQS can reuse a data key to encrypt or decrypt messages - // before calling AWS KMS again. For more information, see How Does the Data - // Key Reuse Period Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). - // - // - // The following attributes apply only to FIFO (first-in-first-out) queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html): - // - // * FifoQueue - Returns whether the queue is FIFO. For more information, - // see FIFO Queue Logic (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-understanding-logic) - // in the Amazon Simple Queue Service Developer Guide. - // - // To determine whether a queue is FIFO (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html), - // you can check whether QueueName ends with the .fifo suffix. - // - // * ContentBasedDeduplication - Returns whether content-based deduplication - // is enabled for the queue. For more information, see Exactly-Once Processing - // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing) - // in the Amazon Simple Queue Service Developer Guide. - AttributeNames []*string `locationNameList:"AttributeName" type:"list" flattened:"true"` - - // The URL of the Amazon SQS queue whose attribute information is retrieved. - // - // Queue URLs and names are case-sensitive. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s GetQueueAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetQueueAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetQueueAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetQueueAttributesInput"} - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeNames sets the AttributeNames field's value. -func (s *GetQueueAttributesInput) SetAttributeNames(v []*string) *GetQueueAttributesInput { - s.AttributeNames = v - return s -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *GetQueueAttributesInput) SetQueueUrl(v string) *GetQueueAttributesInput { - s.QueueUrl = &v - return s -} - -// A list of returned queue attributes. -type GetQueueAttributesOutput struct { - _ struct{} `type:"structure"` - - // A map of attributes to their respective values. - Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` -} - -// String returns the string representation -func (s GetQueueAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetQueueAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *GetQueueAttributesOutput) SetAttributes(v map[string]*string) *GetQueueAttributesOutput { - s.Attributes = v - return s -} - -type GetQueueUrlInput struct { - _ struct{} `type:"structure"` - - // The name of the queue whose URL must be fetched. Maximum 80 characters. Valid - // values: alphanumeric characters, hyphens (-), and underscores (_). - // - // Queue URLs and names are case-sensitive. - // - // QueueName is a required field - QueueName *string `type:"string" required:"true"` - - // The AWS account ID of the account that created the queue. - QueueOwnerAWSAccountId *string `type:"string"` -} - -// String returns the string representation -func (s GetQueueUrlInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetQueueUrlInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetQueueUrlInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetQueueUrlInput"} - if s.QueueName == nil { - invalidParams.Add(request.NewErrParamRequired("QueueName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueueName sets the QueueName field's value. -func (s *GetQueueUrlInput) SetQueueName(v string) *GetQueueUrlInput { - s.QueueName = &v - return s -} - -// SetQueueOwnerAWSAccountId sets the QueueOwnerAWSAccountId field's value. -func (s *GetQueueUrlInput) SetQueueOwnerAWSAccountId(v string) *GetQueueUrlInput { - s.QueueOwnerAWSAccountId = &v - return s -} - -// For more information, see Interpreting Responses (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-api-responses.html) -// in the Amazon Simple Queue Service Developer Guide. -type GetQueueUrlOutput struct { - _ struct{} `type:"structure"` - - // The URL of the queue. - QueueUrl *string `type:"string"` -} - -// String returns the string representation -func (s GetQueueUrlOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetQueueUrlOutput) GoString() string { - return s.String() -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *GetQueueUrlOutput) SetQueueUrl(v string) *GetQueueUrlOutput { - s.QueueUrl = &v - return s -} - -type ListDeadLetterSourceQueuesInput struct { - _ struct{} `type:"structure"` - - // The URL of a dead-letter queue. - // - // Queue URLs and names are case-sensitive. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListDeadLetterSourceQueuesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDeadLetterSourceQueuesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDeadLetterSourceQueuesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDeadLetterSourceQueuesInput"} - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *ListDeadLetterSourceQueuesInput) SetQueueUrl(v string) *ListDeadLetterSourceQueuesInput { - s.QueueUrl = &v - return s -} - -// A list of your dead letter source queues. -type ListDeadLetterSourceQueuesOutput struct { - _ struct{} `type:"structure"` - - // A list of source queue URLs that have the RedrivePolicy queue attribute configured - // with a dead-letter queue. - // - // QueueUrls is a required field - QueueUrls []*string `locationName:"queueUrls" locationNameList:"QueueUrl" type:"list" flattened:"true" required:"true"` -} - -// String returns the string representation -func (s ListDeadLetterSourceQueuesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDeadLetterSourceQueuesOutput) GoString() string { - return s.String() -} - -// SetQueueUrls sets the QueueUrls field's value. -func (s *ListDeadLetterSourceQueuesOutput) SetQueueUrls(v []*string) *ListDeadLetterSourceQueuesOutput { - s.QueueUrls = v - return s -} - -type ListQueueTagsInput struct { - _ struct{} `type:"structure"` - - // The URL of the queue. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListQueueTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListQueueTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListQueueTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListQueueTagsInput"} - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *ListQueueTagsInput) SetQueueUrl(v string) *ListQueueTagsInput { - s.QueueUrl = &v - return s -} - -type ListQueueTagsOutput struct { - _ struct{} `type:"structure"` - - // The list of all tags added to the specified queue. - Tags map[string]*string `locationName:"Tag" locationNameKey:"Key" locationNameValue:"Value" type:"map" flattened:"true"` -} - -// String returns the string representation -func (s ListQueueTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListQueueTagsOutput) GoString() string { - return s.String() -} - -// SetTags sets the Tags field's value. -func (s *ListQueueTagsOutput) SetTags(v map[string]*string) *ListQueueTagsOutput { - s.Tags = v - return s -} - -type ListQueuesInput struct { - _ struct{} `type:"structure"` - - // A string to use for filtering the list results. Only those queues whose name - // begins with the specified string are returned. - // - // Queue URLs and names are case-sensitive. - QueueNamePrefix *string `type:"string"` -} - -// String returns the string representation -func (s ListQueuesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListQueuesInput) GoString() string { - return s.String() -} - -// SetQueueNamePrefix sets the QueueNamePrefix field's value. -func (s *ListQueuesInput) SetQueueNamePrefix(v string) *ListQueuesInput { - s.QueueNamePrefix = &v - return s -} - -// A list of your queues. -type ListQueuesOutput struct { - _ struct{} `type:"structure"` - - // A list of queue URLs, up to 1,000 entries. - QueueUrls []*string `locationNameList:"QueueUrl" type:"list" flattened:"true"` -} - -// String returns the string representation -func (s ListQueuesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListQueuesOutput) GoString() string { - return s.String() -} - -// SetQueueUrls sets the QueueUrls field's value. -func (s *ListQueuesOutput) SetQueueUrls(v []*string) *ListQueuesOutput { - s.QueueUrls = v - return s -} - -// An Amazon SQS message. -type Message struct { - _ struct{} `type:"structure"` - - // A map of the attributes requested in ReceiveMessage to their respective values. - // Supported attributes: - // - // * ApproximateReceiveCount - // - // * ApproximateFirstReceiveTimestamp - // - // * MessageDeduplicationId - // - // * MessageGroupId - // - // * SenderId - // - // * SentTimestamp - // - // * SequenceNumber - // - // ApproximateFirstReceiveTimestamp and SentTimestamp are each returned as an - // integer representing the epoch time (http://en.wikipedia.org/wiki/Unix_time) - // in milliseconds. - Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` - - // The message's contents (not URL-encoded). - Body *string `type:"string"` - - // An MD5 digest of the non-URL-encoded message body string. - MD5OfBody *string `type:"string"` - - // An MD5 digest of the non-URL-encoded message attribute string. You can use - // this attribute to verify that Amazon SQS received the message correctly. - // Amazon SQS URL-decodes the message before creating the MD5 digest. For information - // about MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt). - MD5OfMessageAttributes *string `type:"string"` - - // Each message attribute consists of a Name, Type, and Value. For more information, - // see Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) - // in the Amazon Simple Queue Service Developer Guide. - MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` - - // A unique identifier for the message. A MessageIdis considered unique across - // all AWS accounts for an extended period of time. - MessageId *string `type:"string"` - - // An identifier associated with the act of receiving the message. A new receipt - // handle is returned every time you receive a message. When deleting a message, - // you provide the last received receipt handle to delete the message. - ReceiptHandle *string `type:"string"` -} - -// String returns the string representation -func (s Message) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Message) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *Message) SetAttributes(v map[string]*string) *Message { - s.Attributes = v - return s -} - -// SetBody sets the Body field's value. -func (s *Message) SetBody(v string) *Message { - s.Body = &v - return s -} - -// SetMD5OfBody sets the MD5OfBody field's value. -func (s *Message) SetMD5OfBody(v string) *Message { - s.MD5OfBody = &v - return s -} - -// SetMD5OfMessageAttributes sets the MD5OfMessageAttributes field's value. -func (s *Message) SetMD5OfMessageAttributes(v string) *Message { - s.MD5OfMessageAttributes = &v - return s -} - -// SetMessageAttributes sets the MessageAttributes field's value. -func (s *Message) SetMessageAttributes(v map[string]*MessageAttributeValue) *Message { - s.MessageAttributes = v - return s -} - -// SetMessageId sets the MessageId field's value. -func (s *Message) SetMessageId(v string) *Message { - s.MessageId = &v - return s -} - -// SetReceiptHandle sets the ReceiptHandle field's value. -func (s *Message) SetReceiptHandle(v string) *Message { - s.ReceiptHandle = &v - return s -} - -// The user-specified message attribute value. For string data types, the Value -// attribute has the same restrictions on the content as the message body. For -// more information, see SendMessage. -// -// Name, type, value and the message body must not be empty or null. All parts -// of the message attribute, including Name, Type, and Value, are part of the -// message size restriction (256 KB or 262,144 bytes). -type MessageAttributeValue struct { - _ struct{} `type:"structure"` - - // Not implemented. Reserved for future use. - BinaryListValues [][]byte `locationName:"BinaryListValue" locationNameList:"BinaryListValue" type:"list" flattened:"true"` - - // Binary type attributes can store any binary data, such as compressed data, - // encrypted data, or images. - // - // BinaryValue is automatically base64 encoded/decoded by the SDK. - BinaryValue []byte `type:"blob"` - - // Amazon SQS supports the following logical data types: String, Number, and - // Binary. For the Number data type, you must use StringValue. - // - // You can also append custom labels. For more information, see Amazon SQS Message - // Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) - // in the Amazon Simple Queue Service Developer Guide. - // - // DataType is a required field - DataType *string `type:"string" required:"true"` - - // Not implemented. Reserved for future use. - StringListValues []*string `locationName:"StringListValue" locationNameList:"StringListValue" type:"list" flattened:"true"` - - // Strings are Unicode with UTF-8 binary encoding. For a list of code values, - // see ASCII Printable Characters (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters). - StringValue *string `type:"string"` -} - -// String returns the string representation -func (s MessageAttributeValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MessageAttributeValue) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MessageAttributeValue) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MessageAttributeValue"} - if s.DataType == nil { - invalidParams.Add(request.NewErrParamRequired("DataType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBinaryListValues sets the BinaryListValues field's value. -func (s *MessageAttributeValue) SetBinaryListValues(v [][]byte) *MessageAttributeValue { - s.BinaryListValues = v - return s -} - -// SetBinaryValue sets the BinaryValue field's value. -func (s *MessageAttributeValue) SetBinaryValue(v []byte) *MessageAttributeValue { - s.BinaryValue = v - return s -} - -// SetDataType sets the DataType field's value. -func (s *MessageAttributeValue) SetDataType(v string) *MessageAttributeValue { - s.DataType = &v - return s -} - -// SetStringListValues sets the StringListValues field's value. -func (s *MessageAttributeValue) SetStringListValues(v []*string) *MessageAttributeValue { - s.StringListValues = v - return s -} - -// SetStringValue sets the StringValue field's value. -func (s *MessageAttributeValue) SetStringValue(v string) *MessageAttributeValue { - s.StringValue = &v - return s -} - -type PurgeQueueInput struct { - _ struct{} `type:"structure"` - - // The URL of the queue from which the PurgeQueue action deletes messages. - // - // Queue URLs and names are case-sensitive. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PurgeQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurgeQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PurgeQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurgeQueueInput"} - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *PurgeQueueInput) SetQueueUrl(v string) *PurgeQueueInput { - s.QueueUrl = &v - return s -} - -type PurgeQueueOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PurgeQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PurgeQueueOutput) GoString() string { - return s.String() -} - -type ReceiveMessageInput struct { - _ struct{} `type:"structure"` - - // A list of s that need to be returned along with each message. These attributes - // include: - // - // * All - Returns all values. - // - // * ApproximateFirstReceiveTimestamp - Returns the time the message was - // first received from the queue (epoch time (http://en.wikipedia.org/wiki/Unix_time) - // in milliseconds). - // - // * ApproximateReceiveCount - Returns the number of times a message has - // been received from the queue but not deleted. - // - // * SenderId - // - // For an IAM user, returns the IAM user ID, for example ABCDEFGHI1JKLMNOPQ23R. - // - // For an IAM role, returns the IAM role ID, for example ABCDE1F2GH3I4JK5LMNOP:i-a123b456. - // - // * SentTimestamp - Returns the time the message was sent to the queue (epoch - // time (http://en.wikipedia.org/wiki/Unix_time) in milliseconds). - // - // * MessageDeduplicationId - Returns the value provided by the producer - // that calls the SendMessage action. - // - // * MessageGroupId - Returns the value provided by the producer that calls - // the SendMessage action. Messages with the same MessageGroupId are returned - // in sequence. - // - // * SequenceNumber - Returns the value provided by Amazon SQS. - AttributeNames []*string `locationNameList:"AttributeName" type:"list" flattened:"true"` - - // The maximum number of messages to return. Amazon SQS never returns more messages - // than this value (however, fewer messages might be returned). Valid values: - // 1 to 10. Default: 1. - MaxNumberOfMessages *int64 `type:"integer"` - - // The name of the message attribute, where N is the index. - // - // * The name can contain alphanumeric characters and the underscore (_), - // hyphen (-), and period (.). - // - // * The name is case-sensitive and must be unique among all attribute names - // for the message. - // - // * The name must not start with AWS-reserved prefixes such as AWS. or Amazon. - // (or any casing variants). - // - // * The name must not start or end with a period (.), and it should not - // have periods in succession (..). - // - // * The name can be up to 256 characters long. - // - // When using ReceiveMessage, you can send a list of attribute names to receive, - // or you can return all of the attributes by specifying All or .* in your request. - // You can also use all message attributes starting with a prefix, for example - // bar.*. - MessageAttributeNames []*string `locationNameList:"MessageAttributeName" type:"list" flattened:"true"` - - // The URL of the Amazon SQS queue from which messages are received. - // - // Queue URLs and names are case-sensitive. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` - - // This parameter applies only to FIFO (first-in-first-out) queues. - // - // The token used for deduplication of ReceiveMessage calls. If a networking - // issue occurs after a ReceiveMessage action, and instead of a response you - // receive a generic error, you can retry the same action with an identical - // ReceiveRequestAttemptId to retrieve the same set of messages, even if their - // visibility timeout has not yet expired. - // - // * You can use ReceiveRequestAttemptId only for 5 minutes after a ReceiveMessage - // action. - // - // * When you set FifoQueue, a caller of the ReceiveMessage action can provide - // a ReceiveRequestAttemptId explicitly. - // - // * If a caller of the ReceiveMessage action doesn't provide a ReceiveRequestAttemptId, - // Amazon SQS generates a ReceiveRequestAttemptId. - // - // * You can retry the ReceiveMessage action with the same ReceiveRequestAttemptId - // if none of the messages have been modified (deleted or had their visibility - // changes). - // - // * During a visibility timeout, subsequent calls with the same ReceiveRequestAttemptId - // return the same messages and receipt handles. If a retry occurs within - // the deduplication interval, it resets the visibility timeout. For more - // information, see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) - // in the Amazon Simple Queue Service Developer Guide. - // - // If a caller of the ReceiveMessage action still processes messages when the - // visibility timeout expires and messages become visible, another worker - // consuming from the same queue can receive the same messages and therefore - // process duplicates. Also, if a consumer whose message processing time - // is longer than the visibility timeout tries to delete the processed messages, - // the action fails with an error. - // - // To mitigate this effect, ensure that your application observes a safe threshold - // before the visibility timeout expires and extend the visibility timeout - // as necessary. - // - // * While messages with a particular MessageGroupId are invisible, no more - // messages belonging to the same MessageGroupId are returned until the visibility - // timeout expires. You can still receive messages with another MessageGroupId - // as long as it is also visible. - // - // * If a caller of ReceiveMessage can't track the ReceiveRequestAttemptId, - // no retries work until the original visibility timeout expires. As a result, - // delays might occur but the messages in the queue remain in a strict order. - // - // The length of ReceiveRequestAttemptId is 128 characters. ReceiveRequestAttemptId - // can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). - // - // For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId - // Request Parameter (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-receiverequestattemptid-request-parameter.html) - // in the Amazon Simple Queue Service Developer Guide. - ReceiveRequestAttemptId *string `type:"string"` - - // The duration (in seconds) that the received messages are hidden from subsequent - // retrieve requests after being retrieved by a ReceiveMessage request. - VisibilityTimeout *int64 `type:"integer"` - - // The duration (in seconds) for which the call waits for a message to arrive - // in the queue before returning. If a message is available, the call returns - // sooner than WaitTimeSeconds. If no messages are available and the wait time - // expires, the call returns successfully with an empty list of messages. - WaitTimeSeconds *int64 `type:"integer"` -} - -// String returns the string representation -func (s ReceiveMessageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReceiveMessageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReceiveMessageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReceiveMessageInput"} - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeNames sets the AttributeNames field's value. -func (s *ReceiveMessageInput) SetAttributeNames(v []*string) *ReceiveMessageInput { - s.AttributeNames = v - return s -} - -// SetMaxNumberOfMessages sets the MaxNumberOfMessages field's value. -func (s *ReceiveMessageInput) SetMaxNumberOfMessages(v int64) *ReceiveMessageInput { - s.MaxNumberOfMessages = &v - return s -} - -// SetMessageAttributeNames sets the MessageAttributeNames field's value. -func (s *ReceiveMessageInput) SetMessageAttributeNames(v []*string) *ReceiveMessageInput { - s.MessageAttributeNames = v - return s -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *ReceiveMessageInput) SetQueueUrl(v string) *ReceiveMessageInput { - s.QueueUrl = &v - return s -} - -// SetReceiveRequestAttemptId sets the ReceiveRequestAttemptId field's value. -func (s *ReceiveMessageInput) SetReceiveRequestAttemptId(v string) *ReceiveMessageInput { - s.ReceiveRequestAttemptId = &v - return s -} - -// SetVisibilityTimeout sets the VisibilityTimeout field's value. -func (s *ReceiveMessageInput) SetVisibilityTimeout(v int64) *ReceiveMessageInput { - s.VisibilityTimeout = &v - return s -} - -// SetWaitTimeSeconds sets the WaitTimeSeconds field's value. -func (s *ReceiveMessageInput) SetWaitTimeSeconds(v int64) *ReceiveMessageInput { - s.WaitTimeSeconds = &v - return s -} - -// A list of received messages. -type ReceiveMessageOutput struct { - _ struct{} `type:"structure"` - - // A list of messages. - Messages []*Message `locationNameList:"Message" type:"list" flattened:"true"` -} - -// String returns the string representation -func (s ReceiveMessageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReceiveMessageOutput) GoString() string { - return s.String() -} - -// SetMessages sets the Messages field's value. -func (s *ReceiveMessageOutput) SetMessages(v []*Message) *ReceiveMessageOutput { - s.Messages = v - return s -} - -type RemovePermissionInput struct { - _ struct{} `type:"structure"` - - // The identification of the permission to remove. This is the label added using - // the AddPermission action. - // - // Label is a required field - Label *string `type:"string" required:"true"` - - // The URL of the Amazon SQS queue from which permissions are removed. - // - // Queue URLs and names are case-sensitive. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RemovePermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemovePermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemovePermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"} - if s.Label == nil { - invalidParams.Add(request.NewErrParamRequired("Label")) - } - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLabel sets the Label field's value. -func (s *RemovePermissionInput) SetLabel(v string) *RemovePermissionInput { - s.Label = &v - return s -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *RemovePermissionInput) SetQueueUrl(v string) *RemovePermissionInput { - s.QueueUrl = &v - return s -} - -type RemovePermissionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemovePermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemovePermissionOutput) GoString() string { - return s.String() -} - -type SendMessageBatchInput struct { - _ struct{} `type:"structure"` - - // A list of SendMessageBatchRequestEntry items. - // - // Entries is a required field - Entries []*SendMessageBatchRequestEntry `locationNameList:"SendMessageBatchRequestEntry" type:"list" flattened:"true" required:"true"` - - // The URL of the Amazon SQS queue to which batched messages are sent. - // - // Queue URLs and names are case-sensitive. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SendMessageBatchInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendMessageBatchInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendMessageBatchInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendMessageBatchInput"} - if s.Entries == nil { - invalidParams.Add(request.NewErrParamRequired("Entries")) - } - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - if s.Entries != nil { - for i, v := range s.Entries { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entries", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEntries sets the Entries field's value. -func (s *SendMessageBatchInput) SetEntries(v []*SendMessageBatchRequestEntry) *SendMessageBatchInput { - s.Entries = v - return s -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *SendMessageBatchInput) SetQueueUrl(v string) *SendMessageBatchInput { - s.QueueUrl = &v - return s -} - -// For each message in the batch, the response contains a SendMessageBatchResultEntry -// tag if the message succeeds or a BatchResultErrorEntry tag if the message -// fails. -type SendMessageBatchOutput struct { - _ struct{} `type:"structure"` - - // A list of BatchResultErrorEntry items with error details about each message - // that can't be enqueued. - // - // Failed is a required field - Failed []*BatchResultErrorEntry `locationNameList:"BatchResultErrorEntry" type:"list" flattened:"true" required:"true"` - - // A list of SendMessageBatchResultEntry items. - // - // Successful is a required field - Successful []*SendMessageBatchResultEntry `locationNameList:"SendMessageBatchResultEntry" type:"list" flattened:"true" required:"true"` -} - -// String returns the string representation -func (s SendMessageBatchOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendMessageBatchOutput) GoString() string { - return s.String() -} - -// SetFailed sets the Failed field's value. -func (s *SendMessageBatchOutput) SetFailed(v []*BatchResultErrorEntry) *SendMessageBatchOutput { - s.Failed = v - return s -} - -// SetSuccessful sets the Successful field's value. -func (s *SendMessageBatchOutput) SetSuccessful(v []*SendMessageBatchResultEntry) *SendMessageBatchOutput { - s.Successful = v - return s -} - -// Contains the details of a single Amazon SQS message along with an Id. -type SendMessageBatchRequestEntry struct { - _ struct{} `type:"structure"` - - // The length of time, in seconds, for which a specific message is delayed. - // Valid values: 0 to 900. Maximum: 15 minutes. Messages with a positive DelaySeconds - // value become available for processing after the delay period is finished. - // If you don't specify a value, the default value for the queue is applied. - // - // When you set FifoQueue, you can't set DelaySeconds per message. You can set - // this parameter only on a queue level. - DelaySeconds *int64 `type:"integer"` - - // An identifier for a message in this batch used to communicate the result. - // - // The Ids of a batch request need to be unique within a request - // - // This identifier can have up to 80 characters. The following characters are - // accepted: alphanumeric characters, hyphens(-), and underscores (_). - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // Each message attribute consists of a Name, Type, and Value. For more information, - // see Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) - // in the Amazon Simple Queue Service Developer Guide. - MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` - - // The body of the message. - // - // MessageBody is a required field - MessageBody *string `type:"string" required:"true"` - - // This parameter applies only to FIFO (first-in-first-out) queues. - // - // The token used for deduplication of messages within a 5-minute minimum deduplication - // interval. If a message with a particular MessageDeduplicationId is sent successfully, - // subsequent messages with the same MessageDeduplicationId are accepted successfully - // but aren't delivered. For more information, see Exactly-Once Processing - // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing) - // in the Amazon Simple Queue Service Developer Guide. - // - // * Every message must have a unique MessageDeduplicationId, - // - // You may provide a MessageDeduplicationId explicitly. - // - // If you aren't able to provide a MessageDeduplicationId and you enable ContentBasedDeduplication - // for your queue, Amazon SQS uses a SHA-256 hash to generate the MessageDeduplicationId - // using the body of the message (but not the attributes of the message). - // - // - // If you don't provide a MessageDeduplicationId and the queue doesn't have - // ContentBasedDeduplication set, the action fails with an error. - // - // If the queue has ContentBasedDeduplication set, your MessageDeduplicationId - // overrides the generated one. - // - // * When ContentBasedDeduplication is in effect, messages with identical - // content sent within the deduplication interval are treated as duplicates - // and only one copy of the message is delivered. - // - // * If you send one message with ContentBasedDeduplication enabled and then - // another message with a MessageDeduplicationId that is the same as the - // one generated for the first MessageDeduplicationId, the two messages are - // treated as duplicates and only one copy of the message is delivered. - // - // The MessageDeduplicationId is available to the consumer of the message (this - // can be useful for troubleshooting delivery issues). - // - // If a message is sent successfully but the acknowledgement is lost and the - // message is resent with the same MessageDeduplicationId after the deduplication - // interval, Amazon SQS can't detect duplicate messages. - // - // Amazon SQS continues to keep track of the message deduplication ID even after - // the message is received and deleted. - // - // The length of MessageDeduplicationId is 128 characters. MessageDeduplicationId - // can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). - // - // For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId - // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html) - // in the Amazon Simple Queue Service Developer Guide. - MessageDeduplicationId *string `type:"string"` - - // This parameter applies only to FIFO (first-in-first-out) queues. - // - // The tag that specifies that a message belongs to a specific message group. - // Messages that belong to the same message group are processed in a FIFO manner - // (however, messages in different message groups might be processed out of - // order). To interleave multiple ordered streams within a single queue, use - // MessageGroupId values (for example, session data for multiple users). In - // this scenario, multiple consumers can process the queue, but the session - // data of each user is processed in a FIFO fashion. - // - // * You must associate a non-empty MessageGroupId with a message. If you - // don't provide a MessageGroupId, the action fails. - // - // * ReceiveMessage might return messages with multiple MessageGroupId values. - // For each MessageGroupId, the messages are sorted by time sent. The caller - // can't specify a MessageGroupId. - // - // The length of MessageGroupId is 128 characters. Valid values: alphanumeric - // characters and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). - // - // For best practices of using MessageGroupId, see Using the MessageGroupId - // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagegroupid-property.html) - // in the Amazon Simple Queue Service Developer Guide. - // - // MessageGroupId is required for FIFO queues. You can't use it for Standard - // queues. - MessageGroupId *string `type:"string"` -} - -// String returns the string representation -func (s SendMessageBatchRequestEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendMessageBatchRequestEntry) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendMessageBatchRequestEntry) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendMessageBatchRequestEntry"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.MessageBody == nil { - invalidParams.Add(request.NewErrParamRequired("MessageBody")) - } - if s.MessageAttributes != nil { - for i, v := range s.MessageAttributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MessageAttributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDelaySeconds sets the DelaySeconds field's value. -func (s *SendMessageBatchRequestEntry) SetDelaySeconds(v int64) *SendMessageBatchRequestEntry { - s.DelaySeconds = &v - return s -} - -// SetId sets the Id field's value. -func (s *SendMessageBatchRequestEntry) SetId(v string) *SendMessageBatchRequestEntry { - s.Id = &v - return s -} - -// SetMessageAttributes sets the MessageAttributes field's value. -func (s *SendMessageBatchRequestEntry) SetMessageAttributes(v map[string]*MessageAttributeValue) *SendMessageBatchRequestEntry { - s.MessageAttributes = v - return s -} - -// SetMessageBody sets the MessageBody field's value. -func (s *SendMessageBatchRequestEntry) SetMessageBody(v string) *SendMessageBatchRequestEntry { - s.MessageBody = &v - return s -} - -// SetMessageDeduplicationId sets the MessageDeduplicationId field's value. -func (s *SendMessageBatchRequestEntry) SetMessageDeduplicationId(v string) *SendMessageBatchRequestEntry { - s.MessageDeduplicationId = &v - return s -} - -// SetMessageGroupId sets the MessageGroupId field's value. -func (s *SendMessageBatchRequestEntry) SetMessageGroupId(v string) *SendMessageBatchRequestEntry { - s.MessageGroupId = &v - return s -} - -// Encloses a MessageId for a successfully-enqueued message in a SendMessageBatch. -type SendMessageBatchResultEntry struct { - _ struct{} `type:"structure"` - - // An identifier for the message in this batch. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // An MD5 digest of the non-URL-encoded message attribute string. You can use - // this attribute to verify that Amazon SQS received the message correctly. - // Amazon SQS URL-decodes the message before creating the MD5 digest. For information - // about MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt). - MD5OfMessageAttributes *string `type:"string"` - - // An MD5 digest of the non-URL-encoded message attribute string. You can use - // this attribute to verify that Amazon SQS received the message correctly. - // Amazon SQS URL-decodes the message before creating the MD5 digest. For information - // about MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt). - // - // MD5OfMessageBody is a required field - MD5OfMessageBody *string `type:"string" required:"true"` - - // An identifier for the message. - // - // MessageId is a required field - MessageId *string `type:"string" required:"true"` - - // This parameter applies only to FIFO (first-in-first-out) queues. - // - // The large, non-consecutive number that Amazon SQS assigns to each message. - // - // The length of SequenceNumber is 128 bits. As SequenceNumber continues to - // increase for a particular MessageGroupId. - SequenceNumber *string `type:"string"` -} - -// String returns the string representation -func (s SendMessageBatchResultEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendMessageBatchResultEntry) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *SendMessageBatchResultEntry) SetId(v string) *SendMessageBatchResultEntry { - s.Id = &v - return s -} - -// SetMD5OfMessageAttributes sets the MD5OfMessageAttributes field's value. -func (s *SendMessageBatchResultEntry) SetMD5OfMessageAttributes(v string) *SendMessageBatchResultEntry { - s.MD5OfMessageAttributes = &v - return s -} - -// SetMD5OfMessageBody sets the MD5OfMessageBody field's value. -func (s *SendMessageBatchResultEntry) SetMD5OfMessageBody(v string) *SendMessageBatchResultEntry { - s.MD5OfMessageBody = &v - return s -} - -// SetMessageId sets the MessageId field's value. -func (s *SendMessageBatchResultEntry) SetMessageId(v string) *SendMessageBatchResultEntry { - s.MessageId = &v - return s -} - -// SetSequenceNumber sets the SequenceNumber field's value. -func (s *SendMessageBatchResultEntry) SetSequenceNumber(v string) *SendMessageBatchResultEntry { - s.SequenceNumber = &v - return s -} - -type SendMessageInput struct { - _ struct{} `type:"structure"` - - // The length of time, in seconds, for which to delay a specific message. Valid - // values: 0 to 900. Maximum: 15 minutes. Messages with a positive DelaySeconds - // value become available for processing after the delay period is finished. - // If you don't specify a value, the default value for the queue applies. - // - // When you set FifoQueue, you can't set DelaySeconds per message. You can set - // this parameter only on a queue level. - DelaySeconds *int64 `type:"integer"` - - // Each message attribute consists of a Name, Type, and Value. For more information, - // see Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) - // in the Amazon Simple Queue Service Developer Guide. - MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` - - // The message to send. The maximum string size is 256 KB. - // - // A message can include only XML, JSON, and unformatted text. The following - // Unicode characters are allowed: - // - // #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF - // - // Any characters not included in this list will be rejected. For more information, - // see the W3C specification for characters (http://www.w3.org/TR/REC-xml/#charsets). - // - // MessageBody is a required field - MessageBody *string `type:"string" required:"true"` - - // This parameter applies only to FIFO (first-in-first-out) queues. - // - // The token used for deduplication of sent messages. If a message with a particular - // MessageDeduplicationId is sent successfully, any messages sent with the same - // MessageDeduplicationId are accepted successfully but aren't delivered during - // the 5-minute deduplication interval. For more information, see Exactly-Once - // Processing (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing) - // in the Amazon Simple Queue Service Developer Guide. - // - // * Every message must have a unique MessageDeduplicationId, - // - // You may provide a MessageDeduplicationId explicitly. - // - // If you aren't able to provide a MessageDeduplicationId and you enable ContentBasedDeduplication - // for your queue, Amazon SQS uses a SHA-256 hash to generate the MessageDeduplicationId - // using the body of the message (but not the attributes of the message). - // - // - // If you don't provide a MessageDeduplicationId and the queue doesn't have - // ContentBasedDeduplication set, the action fails with an error. - // - // If the queue has ContentBasedDeduplication set, your MessageDeduplicationId - // overrides the generated one. - // - // * When ContentBasedDeduplication is in effect, messages with identical - // content sent within the deduplication interval are treated as duplicates - // and only one copy of the message is delivered. - // - // * If you send one message with ContentBasedDeduplication enabled and then - // another message with a MessageDeduplicationId that is the same as the - // one generated for the first MessageDeduplicationId, the two messages are - // treated as duplicates and only one copy of the message is delivered. - // - // The MessageDeduplicationId is available to the consumer of the message (this - // can be useful for troubleshooting delivery issues). - // - // If a message is sent successfully but the acknowledgement is lost and the - // message is resent with the same MessageDeduplicationId after the deduplication - // interval, Amazon SQS can't detect duplicate messages. - // - // Amazon SQS continues to keep track of the message deduplication ID even after - // the message is received and deleted. - // - // The length of MessageDeduplicationId is 128 characters. MessageDeduplicationId - // can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). - // - // For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId - // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html) - // in the Amazon Simple Queue Service Developer Guide. - MessageDeduplicationId *string `type:"string"` - - // This parameter applies only to FIFO (first-in-first-out) queues. - // - // The tag that specifies that a message belongs to a specific message group. - // Messages that belong to the same message group are processed in a FIFO manner - // (however, messages in different message groups might be processed out of - // order). To interleave multiple ordered streams within a single queue, use - // MessageGroupId values (for example, session data for multiple users). In - // this scenario, multiple consumers can process the queue, but the session - // data of each user is processed in a FIFO fashion. - // - // * You must associate a non-empty MessageGroupId with a message. If you - // don't provide a MessageGroupId, the action fails. - // - // * ReceiveMessage might return messages with multiple MessageGroupId values. - // For each MessageGroupId, the messages are sorted by time sent. The caller - // can't specify a MessageGroupId. - // - // The length of MessageGroupId is 128 characters. Valid values: alphanumeric - // characters and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). - // - // For best practices of using MessageGroupId, see Using the MessageGroupId - // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagegroupid-property.html) - // in the Amazon Simple Queue Service Developer Guide. - // - // MessageGroupId is required for FIFO queues. You can't use it for Standard - // queues. - MessageGroupId *string `type:"string"` - - // The URL of the Amazon SQS queue to which a message is sent. - // - // Queue URLs and names are case-sensitive. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SendMessageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendMessageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendMessageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendMessageInput"} - if s.MessageBody == nil { - invalidParams.Add(request.NewErrParamRequired("MessageBody")) - } - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - if s.MessageAttributes != nil { - for i, v := range s.MessageAttributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MessageAttributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDelaySeconds sets the DelaySeconds field's value. -func (s *SendMessageInput) SetDelaySeconds(v int64) *SendMessageInput { - s.DelaySeconds = &v - return s -} - -// SetMessageAttributes sets the MessageAttributes field's value. -func (s *SendMessageInput) SetMessageAttributes(v map[string]*MessageAttributeValue) *SendMessageInput { - s.MessageAttributes = v - return s -} - -// SetMessageBody sets the MessageBody field's value. -func (s *SendMessageInput) SetMessageBody(v string) *SendMessageInput { - s.MessageBody = &v - return s -} - -// SetMessageDeduplicationId sets the MessageDeduplicationId field's value. -func (s *SendMessageInput) SetMessageDeduplicationId(v string) *SendMessageInput { - s.MessageDeduplicationId = &v - return s -} - -// SetMessageGroupId sets the MessageGroupId field's value. -func (s *SendMessageInput) SetMessageGroupId(v string) *SendMessageInput { - s.MessageGroupId = &v - return s -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *SendMessageInput) SetQueueUrl(v string) *SendMessageInput { - s.QueueUrl = &v - return s -} - -// The MD5OfMessageBody and MessageId elements. -type SendMessageOutput struct { - _ struct{} `type:"structure"` - - // An MD5 digest of the non-URL-encoded message attribute string. You can use - // this attribute to verify that Amazon SQS received the message correctly. - // Amazon SQS URL-decodes the message before creating the MD5 digest. For information - // about MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt). - MD5OfMessageAttributes *string `type:"string"` - - // An MD5 digest of the non-URL-encoded message attribute string. You can use - // this attribute to verify that Amazon SQS received the message correctly. - // Amazon SQS URL-decodes the message before creating the MD5 digest. For information - // about MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt). - MD5OfMessageBody *string `type:"string"` - - // An attribute containing the MessageId of the message sent to the queue. For - // more information, see Queue and Message Identifiers (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html) - // in the Amazon Simple Queue Service Developer Guide. - MessageId *string `type:"string"` - - // This parameter applies only to FIFO (first-in-first-out) queues. - // - // The large, non-consecutive number that Amazon SQS assigns to each message. - // - // The length of SequenceNumber is 128 bits. SequenceNumber continues to increase - // for a particular MessageGroupId. - SequenceNumber *string `type:"string"` -} - -// String returns the string representation -func (s SendMessageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendMessageOutput) GoString() string { - return s.String() -} - -// SetMD5OfMessageAttributes sets the MD5OfMessageAttributes field's value. -func (s *SendMessageOutput) SetMD5OfMessageAttributes(v string) *SendMessageOutput { - s.MD5OfMessageAttributes = &v - return s -} - -// SetMD5OfMessageBody sets the MD5OfMessageBody field's value. -func (s *SendMessageOutput) SetMD5OfMessageBody(v string) *SendMessageOutput { - s.MD5OfMessageBody = &v - return s -} - -// SetMessageId sets the MessageId field's value. -func (s *SendMessageOutput) SetMessageId(v string) *SendMessageOutput { - s.MessageId = &v - return s -} - -// SetSequenceNumber sets the SequenceNumber field's value. -func (s *SendMessageOutput) SetSequenceNumber(v string) *SendMessageOutput { - s.SequenceNumber = &v - return s -} - -type SetQueueAttributesInput struct { - _ struct{} `type:"structure"` - - // A map of attributes to set. - // - // The following lists the names, descriptions, and values of the special request - // parameters that the SetQueueAttributes action uses: - // - // * DelaySeconds - The length of time, in seconds, for which the delivery - // of all messages in the queue is delayed. Valid values: An integer from - // 0 to 900 (15 minutes). Default: 0. - // - // * MaximumMessageSize - The limit of how many bytes a message can contain - // before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes - // (1 KiB) up to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB). - // - // * MessageRetentionPeriod - The length of time, in seconds, for which Amazon - // SQS retains a message. Valid values: An integer representing seconds, - // from 60 (1 minute) to 1,209,600 (14 days). Default: 345,600 (4 days). - // - // - // * Policy - The queue's policy. A valid AWS policy. For more information - // about policy structure, see Overview of AWS IAM Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html) - // in the Amazon IAM User Guide. - // - // * ReceiveMessageWaitTimeSeconds - The length of time, in seconds, for - // which a ReceiveMessage action waits for a message to arrive. Valid values: - // an integer from 0 to 20 (seconds). Default: 0. - // - // * RedrivePolicy - The string that includes the parameters for the dead-letter - // queue functionality of the source queue. For more information about the - // redrive policy and dead-letter queues, see Using Amazon SQS Dead-Letter - // Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) - // in the Amazon Simple Queue Service Developer Guide. - // - // deadLetterTargetArn - The Amazon Resource Name (ARN) of the dead-letter queue - // to which Amazon SQS moves messages after the value of maxReceiveCount - // is exceeded. - // - // maxReceiveCount - The number of times a message is delivered to the source - // queue before being moved to the dead-letter queue. When the ReceiveCount - // for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves - // the message to the dead-letter-queue. - // - // The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, - // the dead-letter queue of a standard queue must also be a standard queue. - // - // * VisibilityTimeout - The visibility timeout for the queue, in seconds. - // Valid values: an integer from 0 to 43,200 (12 hours). Default: 30. For - // more information about the visibility timeout, see Visibility Timeout - // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) - // in the Amazon Simple Queue Service Developer Guide. - // - // The following attributes apply only to server-side-encryption (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): - // - // * KmsMasterKeyId - The ID of an AWS-managed customer master key (CMK) - // for Amazon SQS or a custom CMK. For more information, see Key Terms (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms). - // While the alias of the AWS-managed CMK for Amazon SQS is always alias/aws/sqs, - // the alias of a custom CMK can, for example, be alias/MyAlias. For more - // examples, see KeyId (http://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters) - // in the AWS Key Management Service API Reference. - // - // * KmsDataKeyReusePeriodSeconds - The length of time, in seconds, for which - // Amazon SQS can reuse a data key (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys) - // to encrypt or decrypt messages before calling AWS KMS again. An integer - // representing seconds, between 60 seconds (1 minute) and 86,400 seconds - // (24 hours). Default: 300 (5 minutes). A shorter time period provides better - // security but results in more calls to KMS which might incur charges after - // Free Tier. For more information, see How Does the Data Key Reuse Period - // Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). - // - // - // The following attribute applies only to FIFO (first-in-first-out) queues - // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html): - // - // * ContentBasedDeduplication - Enables content-based deduplication. For - // more information, see Exactly-Once Processing (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing) - // in the Amazon Simple Queue Service Developer Guide. - // - // Every message must have a unique MessageDeduplicationId, - // - // You may provide a MessageDeduplicationId explicitly. - // - // If you aren't able to provide a MessageDeduplicationId and you enable ContentBasedDeduplication - // for your queue, Amazon SQS uses a SHA-256 hash to generate the MessageDeduplicationId - // using the body of the message (but not the attributes of the message). - // - // - // If you don't provide a MessageDeduplicationId and the queue doesn't have - // ContentBasedDeduplication set, the action fails with an error. - // - // If the queue has ContentBasedDeduplication set, your MessageDeduplicationId - // overrides the generated one. - // - // When ContentBasedDeduplication is in effect, messages with identical content - // sent within the deduplication interval are treated as duplicates and only - // one copy of the message is delivered. - // - // If you send one message with ContentBasedDeduplication enabled and then another - // message with a MessageDeduplicationId that is the same as the one generated - // for the first MessageDeduplicationId, the two messages are treated as - // duplicates and only one copy of the message is delivered. - // - // Attributes is a required field - Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true" required:"true"` - - // The URL of the Amazon SQS queue whose attributes are set. - // - // Queue URLs and names are case-sensitive. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SetQueueAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetQueueAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetQueueAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetQueueAttributesInput"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *SetQueueAttributesInput) SetAttributes(v map[string]*string) *SetQueueAttributesInput { - s.Attributes = v - return s -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *SetQueueAttributesInput) SetQueueUrl(v string) *SetQueueAttributesInput { - s.QueueUrl = &v - return s -} - -type SetQueueAttributesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SetQueueAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetQueueAttributesOutput) GoString() string { - return s.String() -} - -type TagQueueInput struct { - _ struct{} `type:"structure"` - - // The URL of the queue. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` - - // The list of tags to be added to the specified queue. - // - // Tags is a required field - Tags map[string]*string `locationName:"Tag" locationNameKey:"Key" locationNameValue:"Value" type:"map" flattened:"true" required:"true"` -} - -// String returns the string representation -func (s TagQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagQueueInput"} - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *TagQueueInput) SetQueueUrl(v string) *TagQueueInput { - s.QueueUrl = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagQueueInput) SetTags(v map[string]*string) *TagQueueInput { - s.Tags = v - return s -} - -type TagQueueOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagQueueOutput) GoString() string { - return s.String() -} - -type UntagQueueInput struct { - _ struct{} `type:"structure"` - - // The URL of the queue. - // - // QueueUrl is a required field - QueueUrl *string `type:"string" required:"true"` - - // The list of tags to be removed from the specified queue. - // - // TagKeys is a required field - TagKeys []*string `locationNameList:"TagKey" type:"list" flattened:"true" required:"true"` -} - -// String returns the string representation -func (s UntagQueueInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagQueueInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagQueueInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagQueueInput"} - if s.QueueUrl == nil { - invalidParams.Add(request.NewErrParamRequired("QueueUrl")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueueUrl sets the QueueUrl field's value. -func (s *UntagQueueInput) SetQueueUrl(v string) *UntagQueueInput { - s.QueueUrl = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagQueueInput) SetTagKeys(v []*string) *UntagQueueInput { - s.TagKeys = v - return s -} - -type UntagQueueOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagQueueOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagQueueOutput) GoString() string { - return s.String() -} - -const ( - // MessageSystemAttributeNameSenderId is a MessageSystemAttributeName enum value - MessageSystemAttributeNameSenderId = "SenderId" - - // MessageSystemAttributeNameSentTimestamp is a MessageSystemAttributeName enum value - MessageSystemAttributeNameSentTimestamp = "SentTimestamp" - - // MessageSystemAttributeNameApproximateReceiveCount is a MessageSystemAttributeName enum value - MessageSystemAttributeNameApproximateReceiveCount = "ApproximateReceiveCount" - - // MessageSystemAttributeNameApproximateFirstReceiveTimestamp is a MessageSystemAttributeName enum value - MessageSystemAttributeNameApproximateFirstReceiveTimestamp = "ApproximateFirstReceiveTimestamp" - - // MessageSystemAttributeNameSequenceNumber is a MessageSystemAttributeName enum value - MessageSystemAttributeNameSequenceNumber = "SequenceNumber" - - // MessageSystemAttributeNameMessageDeduplicationId is a MessageSystemAttributeName enum value - MessageSystemAttributeNameMessageDeduplicationId = "MessageDeduplicationId" - - // MessageSystemAttributeNameMessageGroupId is a MessageSystemAttributeName enum value - MessageSystemAttributeNameMessageGroupId = "MessageGroupId" -) - -const ( - // QueueAttributeNameAll is a QueueAttributeName enum value - QueueAttributeNameAll = "All" - - // QueueAttributeNamePolicy is a QueueAttributeName enum value - QueueAttributeNamePolicy = "Policy" - - // QueueAttributeNameVisibilityTimeout is a QueueAttributeName enum value - QueueAttributeNameVisibilityTimeout = "VisibilityTimeout" - - // QueueAttributeNameMaximumMessageSize is a QueueAttributeName enum value - QueueAttributeNameMaximumMessageSize = "MaximumMessageSize" - - // QueueAttributeNameMessageRetentionPeriod is a QueueAttributeName enum value - QueueAttributeNameMessageRetentionPeriod = "MessageRetentionPeriod" - - // QueueAttributeNameApproximateNumberOfMessages is a QueueAttributeName enum value - QueueAttributeNameApproximateNumberOfMessages = "ApproximateNumberOfMessages" - - // QueueAttributeNameApproximateNumberOfMessagesNotVisible is a QueueAttributeName enum value - QueueAttributeNameApproximateNumberOfMessagesNotVisible = "ApproximateNumberOfMessagesNotVisible" - - // QueueAttributeNameCreatedTimestamp is a QueueAttributeName enum value - QueueAttributeNameCreatedTimestamp = "CreatedTimestamp" - - // QueueAttributeNameLastModifiedTimestamp is a QueueAttributeName enum value - QueueAttributeNameLastModifiedTimestamp = "LastModifiedTimestamp" - - // QueueAttributeNameQueueArn is a QueueAttributeName enum value - QueueAttributeNameQueueArn = "QueueArn" - - // QueueAttributeNameApproximateNumberOfMessagesDelayed is a QueueAttributeName enum value - QueueAttributeNameApproximateNumberOfMessagesDelayed = "ApproximateNumberOfMessagesDelayed" - - // QueueAttributeNameDelaySeconds is a QueueAttributeName enum value - QueueAttributeNameDelaySeconds = "DelaySeconds" - - // QueueAttributeNameReceiveMessageWaitTimeSeconds is a QueueAttributeName enum value - QueueAttributeNameReceiveMessageWaitTimeSeconds = "ReceiveMessageWaitTimeSeconds" - - // QueueAttributeNameRedrivePolicy is a QueueAttributeName enum value - QueueAttributeNameRedrivePolicy = "RedrivePolicy" - - // QueueAttributeNameFifoQueue is a QueueAttributeName enum value - QueueAttributeNameFifoQueue = "FifoQueue" - - // QueueAttributeNameContentBasedDeduplication is a QueueAttributeName enum value - QueueAttributeNameContentBasedDeduplication = "ContentBasedDeduplication" - - // QueueAttributeNameKmsMasterKeyId is a QueueAttributeName enum value - QueueAttributeNameKmsMasterKeyId = "KmsMasterKeyId" - - // QueueAttributeNameKmsDataKeyReusePeriodSeconds is a QueueAttributeName enum value - QueueAttributeNameKmsDataKeyReusePeriodSeconds = "KmsDataKeyReusePeriodSeconds" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/checksums.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/checksums.go deleted file mode 100644 index e85e89a81..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/checksums.go +++ /dev/null @@ -1,114 +0,0 @@ -package sqs - -import ( - "crypto/md5" - "encoding/hex" - "fmt" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" -) - -var ( - errChecksumMissingBody = fmt.Errorf("cannot compute checksum. missing body") - errChecksumMissingMD5 = fmt.Errorf("cannot verify checksum. missing response MD5") -) - -func setupChecksumValidation(r *request.Request) { - if aws.BoolValue(r.Config.DisableComputeChecksums) { - return - } - - switch r.Operation.Name { - case opSendMessage: - r.Handlers.Unmarshal.PushBack(verifySendMessage) - case opSendMessageBatch: - r.Handlers.Unmarshal.PushBack(verifySendMessageBatch) - case opReceiveMessage: - r.Handlers.Unmarshal.PushBack(verifyReceiveMessage) - } -} - -func verifySendMessage(r *request.Request) { - if r.DataFilled() && r.ParamsFilled() { - in := r.Params.(*SendMessageInput) - out := r.Data.(*SendMessageOutput) - err := checksumsMatch(in.MessageBody, out.MD5OfMessageBody) - if err != nil { - setChecksumError(r, err.Error()) - } - } -} - -func verifySendMessageBatch(r *request.Request) { - if r.DataFilled() && r.ParamsFilled() { - entries := map[string]*SendMessageBatchResultEntry{} - ids := []string{} - - out := r.Data.(*SendMessageBatchOutput) - for _, entry := range out.Successful { - entries[*entry.Id] = entry - } - - in := r.Params.(*SendMessageBatchInput) - for _, entry := range in.Entries { - if e, ok := entries[*entry.Id]; ok { - if err := checksumsMatch(entry.MessageBody, e.MD5OfMessageBody); err != nil { - ids = append(ids, *e.MessageId) - } - } - } - if len(ids) > 0 { - setChecksumError(r, "invalid messages: %s", strings.Join(ids, ", ")) - } - } -} - -func verifyReceiveMessage(r *request.Request) { - if r.DataFilled() && r.ParamsFilled() { - ids := []string{} - out := r.Data.(*ReceiveMessageOutput) - for i, msg := range out.Messages { - err := checksumsMatch(msg.Body, msg.MD5OfBody) - if err != nil { - if msg.MessageId == nil { - if r.Config.Logger != nil { - r.Config.Logger.Log(fmt.Sprintf( - "WARN: SQS.ReceiveMessage failed checksum request id: %s, message %d has no message ID.", - r.RequestID, i, - )) - } - continue - } - - ids = append(ids, *msg.MessageId) - } - } - if len(ids) > 0 { - setChecksumError(r, "invalid messages: %s", strings.Join(ids, ", ")) - } - } -} - -func checksumsMatch(body, expectedMD5 *string) error { - if body == nil { - return errChecksumMissingBody - } else if expectedMD5 == nil { - return errChecksumMissingMD5 - } - - msum := md5.Sum([]byte(*body)) - sum := hex.EncodeToString(msum[:]) - if sum != *expectedMD5 { - return fmt.Errorf("expected MD5 checksum '%s', got '%s'", *expectedMD5, sum) - } - - return nil -} - -func setChecksumError(r *request.Request, format string, args ...interface{}) { - r.Retryable = aws.Bool(true) - r.Error = awserr.New("InvalidChecksum", fmt.Sprintf(format, args...), nil) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/customizations.go deleted file mode 100644 index 7498363de..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/customizations.go +++ /dev/null @@ -1,9 +0,0 @@ -package sqs - -import "github.com/aws/aws-sdk-go/aws/request" - -func init() { - initRequest = func(r *request.Request) { - setupChecksumValidation(r) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go deleted file mode 100644 index 6f3380359..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go +++ /dev/null @@ -1,67 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package sqs provides the client and types for making API -// requests to Amazon Simple Queue Service. -// -// Welcome to the Amazon Simple Queue Service API Reference. -// -// Amazon Simple Queue Service (Amazon SQS) is a reliable, highly-scalable hosted -// queue for storing messages as they travel between applications or microservices. -// Amazon SQS moves data between distributed application components and helps -// you decouple these components. -// -// Standard queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/standard-queues.html) -// are available in all regions. FIFO queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html) -// are available in the US East (N. Virginia), US East (Ohio), US West (Oregon), -// and EU (Ireland) regions. -// -// You can use AWS SDKs (http://aws.amazon.com/tools/#sdk) to access Amazon -// SQS using your favorite programming language. The SDKs perform tasks such -// as the following automatically: -// -// * Cryptographically sign your service requests -// -// * Retry requests -// -// * Handle error responses -// -// Additional Information -// -// * Amazon SQS Product Page (http://aws.amazon.com/sqs/) -// -// * Amazon Simple Queue Service Developer Guide -// -// Making API Requests (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html) -// -// Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) -// -// Amazon SQS Dead-Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) -// -// * Amazon SQS in the (http://docs.aws.amazon.com/cli/latest/reference/sqs/index.html)AWS -// CLI Command Reference -// -// * Amazon Web Services General Reference -// -// Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#sqs_region) -// -// See https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05 for more information on this service. -// -// See sqs package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/sqs/ -// -// Using the Client -// -// To contact Amazon Simple Queue Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Simple Queue Service client SQS for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/sqs/#New -package sqs diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/errors.go deleted file mode 100644 index 89eb40d7f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/errors.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package sqs - -const ( - - // ErrCodeBatchEntryIdsNotDistinct for service response error code - // "AWS.SimpleQueueService.BatchEntryIdsNotDistinct". - // - // Two or more batch entries in the request have the same Id. - ErrCodeBatchEntryIdsNotDistinct = "AWS.SimpleQueueService.BatchEntryIdsNotDistinct" - - // ErrCodeBatchRequestTooLong for service response error code - // "AWS.SimpleQueueService.BatchRequestTooLong". - // - // The length of all the messages put together is more than the limit. - ErrCodeBatchRequestTooLong = "AWS.SimpleQueueService.BatchRequestTooLong" - - // ErrCodeEmptyBatchRequest for service response error code - // "AWS.SimpleQueueService.EmptyBatchRequest". - // - // The batch request doesn't contain any entries. - ErrCodeEmptyBatchRequest = "AWS.SimpleQueueService.EmptyBatchRequest" - - // ErrCodeInvalidAttributeName for service response error code - // "InvalidAttributeName". - // - // The specified attribute doesn't exist. - ErrCodeInvalidAttributeName = "InvalidAttributeName" - - // ErrCodeInvalidBatchEntryId for service response error code - // "AWS.SimpleQueueService.InvalidBatchEntryId". - // - // The Id of a batch entry in a batch request doesn't abide by the specification. - ErrCodeInvalidBatchEntryId = "AWS.SimpleQueueService.InvalidBatchEntryId" - - // ErrCodeInvalidIdFormat for service response error code - // "InvalidIdFormat". - // - // The specified receipt handle isn't valid for the current version. - ErrCodeInvalidIdFormat = "InvalidIdFormat" - - // ErrCodeInvalidMessageContents for service response error code - // "InvalidMessageContents". - // - // The message contains characters outside the allowed set. - ErrCodeInvalidMessageContents = "InvalidMessageContents" - - // ErrCodeMessageNotInflight for service response error code - // "AWS.SimpleQueueService.MessageNotInflight". - // - // The specified message isn't in flight. - ErrCodeMessageNotInflight = "AWS.SimpleQueueService.MessageNotInflight" - - // ErrCodeOverLimit for service response error code - // "OverLimit". - // - // The specified action violates a limit. For example, ReceiveMessage returns - // this error if the maximum number of inflight messages is reached and AddPermission - // returns this error if the maximum number of permissions for the queue is - // reached. - ErrCodeOverLimit = "OverLimit" - - // ErrCodePurgeQueueInProgress for service response error code - // "AWS.SimpleQueueService.PurgeQueueInProgress". - // - // Indicates that the specified queue previously received a PurgeQueue request - // within the last 60 seconds (the time it can take to delete the messages in - // the queue). - ErrCodePurgeQueueInProgress = "AWS.SimpleQueueService.PurgeQueueInProgress" - - // ErrCodeQueueDeletedRecently for service response error code - // "AWS.SimpleQueueService.QueueDeletedRecently". - // - // You must wait 60 seconds after deleting a queue before you can create another - // queue with the same name. - ErrCodeQueueDeletedRecently = "AWS.SimpleQueueService.QueueDeletedRecently" - - // ErrCodeQueueDoesNotExist for service response error code - // "AWS.SimpleQueueService.NonExistentQueue". - // - // The specified queue doesn't exist. - ErrCodeQueueDoesNotExist = "AWS.SimpleQueueService.NonExistentQueue" - - // ErrCodeQueueNameExists for service response error code - // "QueueAlreadyExists". - // - // A queue with this name already exists. Amazon SQS returns this error only - // if the request includes attributes whose values differ from those of the - // existing queue. - ErrCodeQueueNameExists = "QueueAlreadyExists" - - // ErrCodeReceiptHandleIsInvalid for service response error code - // "ReceiptHandleIsInvalid". - // - // The specified receipt handle isn't valid. - ErrCodeReceiptHandleIsInvalid = "ReceiptHandleIsInvalid" - - // ErrCodeTooManyEntriesInBatchRequest for service response error code - // "AWS.SimpleQueueService.TooManyEntriesInBatchRequest". - // - // The batch request contains more entries than permissible. - ErrCodeTooManyEntriesInBatchRequest = "AWS.SimpleQueueService.TooManyEntriesInBatchRequest" - - // ErrCodeUnsupportedOperation for service response error code - // "AWS.SimpleQueueService.UnsupportedOperation". - // - // Error code 400. Unsupported operation. - ErrCodeUnsupportedOperation = "AWS.SimpleQueueService.UnsupportedOperation" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/service.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/service.go deleted file mode 100644 index d463ecf0d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/service.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package sqs - -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/query" -) - -// SQS provides the API operation methods for making requests to -// Amazon Simple Queue Service. See this package's package overview docs -// for details on the service. -// -// SQS methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type SQS 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 = "sqs" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "SQS" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the SQS client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a SQS client from just a session. -// svc := sqs.New(mySession) -// -// // Create a SQS client with additional configuration -// svc := sqs.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *SQS { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *SQS { - svc := &SQS{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2012-11-05", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a SQS operation and runs any -// custom request initialization. -func (c *SQS) 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/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go deleted file mode 100644 index db90e6236..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ /dev/null @@ -1,35047 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ssm - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAddTagsToResource = "AddTagsToResource" - -// AddTagsToResourceRequest generates a "aws/request.Request" representing the -// client's request for the AddTagsToResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTagsToResource for more information on using the AddTagsToResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsToResourceRequest method. -// req, resp := client.AddTagsToResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/AddTagsToResource -func (c *SSM) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *request.Request, output *AddTagsToResourceOutput) { - op := &request.Operation{ - Name: opAddTagsToResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsToResourceInput{} - } - - output = &AddTagsToResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTagsToResource API operation for Amazon Simple Systems Manager (SSM). -// -// Adds or overwrites one or more tags for the specified resource. Tags are -// metadata that you can assign to your documents, managed instances, Maintenance -// Windows, Parameter Store parameters, and patch baselines. Tags enable you -// to categorize your resources in different ways, for example, by purpose, -// owner, or environment. Each tag consists of a key and an optional value, -// both of which you define. For example, you could define a set of tags for -// your account's managed instances that helps you track each instance's owner -// and stack level. For example: Key=Owner and Value=DbAdmin, SysAdmin, or Dev. -// Or Key=Stack and Value=Production, Pre-Production, or Test. -// -// Each resource can have a maximum of 50 tags. -// -// We recommend that you devise a set of tag keys that meets your needs for -// each resource type. Using a consistent set of tag keys makes it easier for -// you to manage your resources. You can search and filter the resources based -// on the tags you add. Tags don't have any semantic meaning to Amazon EC2 and -// are interpreted strictly as a string of characters. -// -// For more information about tags, see Tagging Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) -// in the Amazon EC2 User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation AddTagsToResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceType "InvalidResourceType" -// The resource type is not valid. For example, if you are attempting to tag -// an instance, the instance must be a registered, managed instance. -// -// * ErrCodeInvalidResourceId "InvalidResourceId" -// The resource ID is not valid. Verify that you entered the correct ID and -// try again. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeTooManyTagsError "TooManyTagsError" -// The Targets parameter includes too many tags. Remove one or more tags and -// try the command again. -// -// * ErrCodeTooManyUpdates "TooManyUpdates" -// There are concurrent updates for a resource that supports one update at a -// time. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/AddTagsToResource -func (c *SSM) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { - req, out := c.AddTagsToResourceRequest(input) - return out, req.Send() -} - -// AddTagsToResourceWithContext is the same as AddTagsToResource with the addition of -// the ability to pass a context and additional request options. -// -// See AddTagsToResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) AddTagsToResourceWithContext(ctx aws.Context, input *AddTagsToResourceInput, opts ...request.Option) (*AddTagsToResourceOutput, error) { - req, out := c.AddTagsToResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelCommand = "CancelCommand" - -// CancelCommandRequest generates a "aws/request.Request" representing the -// client's request for the CancelCommand operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelCommand for more information on using the CancelCommand -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelCommandRequest method. -// req, resp := client.CancelCommandRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelCommand -func (c *SSM) CancelCommandRequest(input *CancelCommandInput) (req *request.Request, output *CancelCommandOutput) { - op := &request.Operation{ - Name: opCancelCommand, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelCommandInput{} - } - - output = &CancelCommandOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CancelCommand API operation for Amazon Simple Systems Manager (SSM). -// -// Attempts to cancel the command specified by the Command ID. There is no guarantee -// that the command will be terminated and the underlying process stopped. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation CancelCommand for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidCommandId "InvalidCommandId" -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeDuplicateInstanceId "DuplicateInstanceId" -// You cannot specify an instance ID in more than one association. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelCommand -func (c *SSM) CancelCommand(input *CancelCommandInput) (*CancelCommandOutput, error) { - req, out := c.CancelCommandRequest(input) - return out, req.Send() -} - -// CancelCommandWithContext is the same as CancelCommand with the addition of -// the ability to pass a context and additional request options. -// -// See CancelCommand for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) CancelCommandWithContext(ctx aws.Context, input *CancelCommandInput, opts ...request.Option) (*CancelCommandOutput, error) { - req, out := c.CancelCommandRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelMaintenanceWindowExecution = "CancelMaintenanceWindowExecution" - -// CancelMaintenanceWindowExecutionRequest generates a "aws/request.Request" representing the -// client's request for the CancelMaintenanceWindowExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelMaintenanceWindowExecution for more information on using the CancelMaintenanceWindowExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelMaintenanceWindowExecutionRequest method. -// req, resp := client.CancelMaintenanceWindowExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelMaintenanceWindowExecution -func (c *SSM) CancelMaintenanceWindowExecutionRequest(input *CancelMaintenanceWindowExecutionInput) (req *request.Request, output *CancelMaintenanceWindowExecutionOutput) { - op := &request.Operation{ - Name: opCancelMaintenanceWindowExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelMaintenanceWindowExecutionInput{} - } - - output = &CancelMaintenanceWindowExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelMaintenanceWindowExecution API operation for Amazon Simple Systems Manager (SSM). -// -// Stops a Maintenance Window execution that is already in progress and cancels -// any tasks in the window that have not already starting running. (Tasks already -// in progress will continue to completion.) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation CancelMaintenanceWindowExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelMaintenanceWindowExecution -func (c *SSM) CancelMaintenanceWindowExecution(input *CancelMaintenanceWindowExecutionInput) (*CancelMaintenanceWindowExecutionOutput, error) { - req, out := c.CancelMaintenanceWindowExecutionRequest(input) - return out, req.Send() -} - -// CancelMaintenanceWindowExecutionWithContext is the same as CancelMaintenanceWindowExecution with the addition of -// the ability to pass a context and additional request options. -// -// See CancelMaintenanceWindowExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) CancelMaintenanceWindowExecutionWithContext(ctx aws.Context, input *CancelMaintenanceWindowExecutionInput, opts ...request.Option) (*CancelMaintenanceWindowExecutionOutput, error) { - req, out := c.CancelMaintenanceWindowExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateActivation = "CreateActivation" - -// CreateActivationRequest generates a "aws/request.Request" representing the -// client's request for the CreateActivation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateActivation for more information on using the CreateActivation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateActivationRequest method. -// req, resp := client.CreateActivationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateActivation -func (c *SSM) CreateActivationRequest(input *CreateActivationInput) (req *request.Request, output *CreateActivationOutput) { - op := &request.Operation{ - Name: opCreateActivation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateActivationInput{} - } - - output = &CreateActivationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateActivation API operation for Amazon Simple Systems Manager (SSM). -// -// Registers your on-premises server or virtual machine with Amazon EC2 so that -// you can manage these resources using Run Command. An on-premises server or -// virtual machine that has been registered with EC2 is called a managed instance. -// For more information about activations, see Setting Up Systems Manager in -// Hybrid Environments (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation CreateActivation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateActivation -func (c *SSM) CreateActivation(input *CreateActivationInput) (*CreateActivationOutput, error) { - req, out := c.CreateActivationRequest(input) - return out, req.Send() -} - -// CreateActivationWithContext is the same as CreateActivation with the addition of -// the ability to pass a context and additional request options. -// -// See CreateActivation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) CreateActivationWithContext(ctx aws.Context, input *CreateActivationInput, opts ...request.Option) (*CreateActivationOutput, error) { - req, out := c.CreateActivationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAssociation = "CreateAssociation" - -// CreateAssociationRequest generates a "aws/request.Request" representing the -// client's request for the CreateAssociation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAssociation for more information on using the CreateAssociation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAssociationRequest method. -// req, resp := client.CreateAssociationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateAssociation -func (c *SSM) CreateAssociationRequest(input *CreateAssociationInput) (req *request.Request, output *CreateAssociationOutput) { - op := &request.Operation{ - Name: opCreateAssociation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAssociationInput{} - } - - output = &CreateAssociationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAssociation API operation for Amazon Simple Systems Manager (SSM). -// -// Associates the specified Systems Manager document with the specified instances -// or targets. -// -// When you associate a document with one or more instances using instance IDs -// or tags, SSM Agent running on the instance processes the document and configures -// the instance as specified. -// -// If you associate a document with an instance that already has an associated -// document, the system returns the AssociationAlreadyExists exception. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation CreateAssociation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAssociationAlreadyExists "AssociationAlreadyExists" -// The specified association already exists. -// -// * ErrCodeAssociationLimitExceeded "AssociationLimitExceeded" -// You can have at most 2,000 active associations. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion" -// The document version is not valid or does not exist. -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeUnsupportedPlatformType "UnsupportedPlatformType" -// The document does not support the platform type of the given instance ID(s). -// For example, you sent an document for a Windows instance to a Linux instance. -// -// * ErrCodeInvalidOutputLocation "InvalidOutputLocation" -// The output location is not valid or does not exist. -// -// * ErrCodeInvalidParameters "InvalidParameters" -// You must specify values for all required parameters in the Systems Manager -// document. You can only supply values to parameters defined in the Systems -// Manager document. -// -// * ErrCodeInvalidTarget "InvalidTarget" -// The target is not valid or does not exist. It might not be configured for -// EC2 Systems Manager or you might not have permission to perform the operation. -// -// * ErrCodeInvalidSchedule "InvalidSchedule" -// The schedule is invalid. Verify your cron or rate expression and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateAssociation -func (c *SSM) CreateAssociation(input *CreateAssociationInput) (*CreateAssociationOutput, error) { - req, out := c.CreateAssociationRequest(input) - return out, req.Send() -} - -// CreateAssociationWithContext is the same as CreateAssociation with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAssociation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) CreateAssociationWithContext(ctx aws.Context, input *CreateAssociationInput, opts ...request.Option) (*CreateAssociationOutput, error) { - req, out := c.CreateAssociationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAssociationBatch = "CreateAssociationBatch" - -// CreateAssociationBatchRequest generates a "aws/request.Request" representing the -// client's request for the CreateAssociationBatch operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAssociationBatch for more information on using the CreateAssociationBatch -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateAssociationBatchRequest method. -// req, resp := client.CreateAssociationBatchRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateAssociationBatch -func (c *SSM) CreateAssociationBatchRequest(input *CreateAssociationBatchInput) (req *request.Request, output *CreateAssociationBatchOutput) { - op := &request.Operation{ - Name: opCreateAssociationBatch, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAssociationBatchInput{} - } - - output = &CreateAssociationBatchOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAssociationBatch API operation for Amazon Simple Systems Manager (SSM). -// -// Associates the specified Systems Manager document with the specified instances -// or targets. -// -// When you associate a document with one or more instances using instance IDs -// or tags, SSM Agent running on the instance processes the document and configures -// the instance as specified. -// -// If you associate a document with an instance that already has an associated -// document, the system returns the AssociationAlreadyExists exception. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation CreateAssociationBatch for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion" -// The document version is not valid or does not exist. -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeInvalidParameters "InvalidParameters" -// You must specify values for all required parameters in the Systems Manager -// document. You can only supply values to parameters defined in the Systems -// Manager document. -// -// * ErrCodeDuplicateInstanceId "DuplicateInstanceId" -// You cannot specify an instance ID in more than one association. -// -// * ErrCodeAssociationLimitExceeded "AssociationLimitExceeded" -// You can have at most 2,000 active associations. -// -// * ErrCodeUnsupportedPlatformType "UnsupportedPlatformType" -// The document does not support the platform type of the given instance ID(s). -// For example, you sent an document for a Windows instance to a Linux instance. -// -// * ErrCodeInvalidOutputLocation "InvalidOutputLocation" -// The output location is not valid or does not exist. -// -// * ErrCodeInvalidTarget "InvalidTarget" -// The target is not valid or does not exist. It might not be configured for -// EC2 Systems Manager or you might not have permission to perform the operation. -// -// * ErrCodeInvalidSchedule "InvalidSchedule" -// The schedule is invalid. Verify your cron or rate expression and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateAssociationBatch -func (c *SSM) CreateAssociationBatch(input *CreateAssociationBatchInput) (*CreateAssociationBatchOutput, error) { - req, out := c.CreateAssociationBatchRequest(input) - return out, req.Send() -} - -// CreateAssociationBatchWithContext is the same as CreateAssociationBatch with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAssociationBatch for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) CreateAssociationBatchWithContext(ctx aws.Context, input *CreateAssociationBatchInput, opts ...request.Option) (*CreateAssociationBatchOutput, error) { - req, out := c.CreateAssociationBatchRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDocument = "CreateDocument" - -// CreateDocumentRequest generates a "aws/request.Request" representing the -// client's request for the CreateDocument operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDocument for more information on using the CreateDocument -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateDocumentRequest method. -// req, resp := client.CreateDocumentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateDocument -func (c *SSM) CreateDocumentRequest(input *CreateDocumentInput) (req *request.Request, output *CreateDocumentOutput) { - op := &request.Operation{ - Name: opCreateDocument, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDocumentInput{} - } - - output = &CreateDocumentOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDocument API operation for Amazon Simple Systems Manager (SSM). -// -// Creates a Systems Manager document. -// -// After you create a document, you can use CreateAssociation to associate it -// with one or more running instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation CreateDocument for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDocumentAlreadyExists "DocumentAlreadyExists" -// The specified document already exists. -// -// * ErrCodeMaxDocumentSizeExceeded "MaxDocumentSizeExceeded" -// The size limit of a document is 64 KB. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidDocumentContent "InvalidDocumentContent" -// The content for the document is not valid. -// -// * ErrCodeDocumentLimitExceeded "DocumentLimitExceeded" -// You can have at most 200 active Systems Manager documents. -// -// * ErrCodeInvalidDocumentSchemaVersion "InvalidDocumentSchemaVersion" -// The version of the document schema is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateDocument -func (c *SSM) CreateDocument(input *CreateDocumentInput) (*CreateDocumentOutput, error) { - req, out := c.CreateDocumentRequest(input) - return out, req.Send() -} - -// CreateDocumentWithContext is the same as CreateDocument with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDocument for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) CreateDocumentWithContext(ctx aws.Context, input *CreateDocumentInput, opts ...request.Option) (*CreateDocumentOutput, error) { - req, out := c.CreateDocumentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateMaintenanceWindow = "CreateMaintenanceWindow" - -// CreateMaintenanceWindowRequest generates a "aws/request.Request" representing the -// client's request for the CreateMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateMaintenanceWindow for more information on using the CreateMaintenanceWindow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateMaintenanceWindowRequest method. -// req, resp := client.CreateMaintenanceWindowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateMaintenanceWindow -func (c *SSM) CreateMaintenanceWindowRequest(input *CreateMaintenanceWindowInput) (req *request.Request, output *CreateMaintenanceWindowOutput) { - op := &request.Operation{ - Name: opCreateMaintenanceWindow, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateMaintenanceWindowInput{} - } - - output = &CreateMaintenanceWindowOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). -// -// Creates a new Maintenance Window. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation CreateMaintenanceWindow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeIdempotentParameterMismatch "IdempotentParameterMismatch" -// Error returned when an idempotent operation is retried and the parameters -// don't match the original call to the API with the same idempotency token. -// -// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" -// Error returned when the caller has exceeded the default resource limits. -// For example, too many Maintenance Windows or Patch baselines have been created. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateMaintenanceWindow -func (c *SSM) CreateMaintenanceWindow(input *CreateMaintenanceWindowInput) (*CreateMaintenanceWindowOutput, error) { - req, out := c.CreateMaintenanceWindowRequest(input) - return out, req.Send() -} - -// CreateMaintenanceWindowWithContext is the same as CreateMaintenanceWindow with the addition of -// the ability to pass a context and additional request options. -// -// See CreateMaintenanceWindow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) CreateMaintenanceWindowWithContext(ctx aws.Context, input *CreateMaintenanceWindowInput, opts ...request.Option) (*CreateMaintenanceWindowOutput, error) { - req, out := c.CreateMaintenanceWindowRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePatchBaseline = "CreatePatchBaseline" - -// CreatePatchBaselineRequest generates a "aws/request.Request" representing the -// client's request for the CreatePatchBaseline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePatchBaseline for more information on using the CreatePatchBaseline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreatePatchBaselineRequest method. -// req, resp := client.CreatePatchBaselineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreatePatchBaseline -func (c *SSM) CreatePatchBaselineRequest(input *CreatePatchBaselineInput) (req *request.Request, output *CreatePatchBaselineOutput) { - op := &request.Operation{ - Name: opCreatePatchBaseline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePatchBaselineInput{} - } - - output = &CreatePatchBaselineOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePatchBaseline API operation for Amazon Simple Systems Manager (SSM). -// -// Creates a patch baseline. -// -// For information about valid key and value pairs in PatchFilters for each -// supported operating system type, see PatchFilter (http://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation CreatePatchBaseline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeIdempotentParameterMismatch "IdempotentParameterMismatch" -// Error returned when an idempotent operation is retried and the parameters -// don't match the original call to the API with the same idempotency token. -// -// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" -// Error returned when the caller has exceeded the default resource limits. -// For example, too many Maintenance Windows or Patch baselines have been created. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreatePatchBaseline -func (c *SSM) CreatePatchBaseline(input *CreatePatchBaselineInput) (*CreatePatchBaselineOutput, error) { - req, out := c.CreatePatchBaselineRequest(input) - return out, req.Send() -} - -// CreatePatchBaselineWithContext is the same as CreatePatchBaseline with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePatchBaseline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) CreatePatchBaselineWithContext(ctx aws.Context, input *CreatePatchBaselineInput, opts ...request.Option) (*CreatePatchBaselineOutput, error) { - req, out := c.CreatePatchBaselineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateResourceDataSync = "CreateResourceDataSync" - -// CreateResourceDataSyncRequest generates a "aws/request.Request" representing the -// client's request for the CreateResourceDataSync operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateResourceDataSync for more information on using the CreateResourceDataSync -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateResourceDataSyncRequest method. -// req, resp := client.CreateResourceDataSyncRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateResourceDataSync -func (c *SSM) CreateResourceDataSyncRequest(input *CreateResourceDataSyncInput) (req *request.Request, output *CreateResourceDataSyncOutput) { - op := &request.Operation{ - Name: opCreateResourceDataSync, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateResourceDataSyncInput{} - } - - output = &CreateResourceDataSyncOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateResourceDataSync API operation for Amazon Simple Systems Manager (SSM). -// -// Creates a resource data sync configuration to a single bucket in Amazon S3. -// This is an asynchronous operation that returns immediately. After a successful -// initial sync is completed, the system continuously syncs data to the Amazon -// S3 bucket. To check the status of the sync, use the ListResourceDataSync. -// -// By default, data is not encrypted in Amazon S3. We strongly recommend that -// you enable encryption in Amazon S3 to ensure secure data storage. We also -// recommend that you secure access to the Amazon S3 bucket by creating a restrictive -// bucket policy. To view an example of a restrictive Amazon S3 bucket policy -// for Resource Data Sync, see Create a Resource Data Sync for Inventory (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-datasync-create.html) -// in the AWS Systems Manager User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation CreateResourceDataSync for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeResourceDataSyncCountExceededException "ResourceDataSyncCountExceededException" -// You have exceeded the allowed maximum sync configurations. -// -// * ErrCodeResourceDataSyncAlreadyExistsException "ResourceDataSyncAlreadyExistsException" -// A sync configuration with the same name already exists. -// -// * ErrCodeResourceDataSyncInvalidConfigurationException "ResourceDataSyncInvalidConfigurationException" -// The specified sync configuration is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateResourceDataSync -func (c *SSM) CreateResourceDataSync(input *CreateResourceDataSyncInput) (*CreateResourceDataSyncOutput, error) { - req, out := c.CreateResourceDataSyncRequest(input) - return out, req.Send() -} - -// CreateResourceDataSyncWithContext is the same as CreateResourceDataSync with the addition of -// the ability to pass a context and additional request options. -// -// See CreateResourceDataSync for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) CreateResourceDataSyncWithContext(ctx aws.Context, input *CreateResourceDataSyncInput, opts ...request.Option) (*CreateResourceDataSyncOutput, error) { - req, out := c.CreateResourceDataSyncRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteActivation = "DeleteActivation" - -// DeleteActivationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteActivation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteActivation for more information on using the DeleteActivation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteActivationRequest method. -// req, resp := client.DeleteActivationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteActivation -func (c *SSM) DeleteActivationRequest(input *DeleteActivationInput) (req *request.Request, output *DeleteActivationOutput) { - op := &request.Operation{ - Name: opDeleteActivation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteActivationInput{} - } - - output = &DeleteActivationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteActivation API operation for Amazon Simple Systems Manager (SSM). -// -// Deletes an activation. You are not required to delete an activation. If you -// delete an activation, you can no longer use it to register additional managed -// instances. Deleting an activation does not de-register managed instances. -// You must manually de-register managed instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DeleteActivation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidActivationId "InvalidActivationId" -// The activation ID is not valid. Verify the you entered the correct ActivationId -// or ActivationCode and try again. -// -// * ErrCodeInvalidActivation "InvalidActivation" -// The activation is not valid. The activation might have been deleted, or the -// ActivationId and the ActivationCode do not match. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeTooManyUpdates "TooManyUpdates" -// There are concurrent updates for a resource that supports one update at a -// time. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteActivation -func (c *SSM) DeleteActivation(input *DeleteActivationInput) (*DeleteActivationOutput, error) { - req, out := c.DeleteActivationRequest(input) - return out, req.Send() -} - -// DeleteActivationWithContext is the same as DeleteActivation with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteActivation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DeleteActivationWithContext(ctx aws.Context, input *DeleteActivationInput, opts ...request.Option) (*DeleteActivationOutput, error) { - req, out := c.DeleteActivationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAssociation = "DeleteAssociation" - -// DeleteAssociationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAssociation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAssociation for more information on using the DeleteAssociation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteAssociationRequest method. -// req, resp := client.DeleteAssociationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteAssociation -func (c *SSM) DeleteAssociationRequest(input *DeleteAssociationInput) (req *request.Request, output *DeleteAssociationOutput) { - op := &request.Operation{ - Name: opDeleteAssociation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAssociationInput{} - } - - output = &DeleteAssociationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAssociation API operation for Amazon Simple Systems Manager (SSM). -// -// Disassociates the specified Systems Manager document from the specified instance. -// -// When you disassociate a document from an instance, it does not change the -// configuration of the instance. To change the configuration state of an instance -// after you disassociate a document, you must create a new document with the -// desired configuration and associate it with the instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DeleteAssociation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist" -// The specified association does not exist. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeTooManyUpdates "TooManyUpdates" -// There are concurrent updates for a resource that supports one update at a -// time. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteAssociation -func (c *SSM) DeleteAssociation(input *DeleteAssociationInput) (*DeleteAssociationOutput, error) { - req, out := c.DeleteAssociationRequest(input) - return out, req.Send() -} - -// DeleteAssociationWithContext is the same as DeleteAssociation with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAssociation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DeleteAssociationWithContext(ctx aws.Context, input *DeleteAssociationInput, opts ...request.Option) (*DeleteAssociationOutput, error) { - req, out := c.DeleteAssociationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDocument = "DeleteDocument" - -// DeleteDocumentRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDocument operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteDocument for more information on using the DeleteDocument -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteDocumentRequest method. -// req, resp := client.DeleteDocumentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteDocument -func (c *SSM) DeleteDocumentRequest(input *DeleteDocumentInput) (req *request.Request, output *DeleteDocumentOutput) { - op := &request.Operation{ - Name: opDeleteDocument, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteDocumentInput{} - } - - output = &DeleteDocumentOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDocument API operation for Amazon Simple Systems Manager (SSM). -// -// Deletes the Systems Manager document and all instance associations to the -// document. -// -// Before you delete the document, we recommend that you use DeleteAssociation -// to disassociate all instances that are associated with the document. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DeleteDocument for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeInvalidDocumentOperation "InvalidDocumentOperation" -// You attempted to delete a document while it is still shared. You must stop -// sharing the document before you can delete it. -// -// * ErrCodeAssociatedInstances "AssociatedInstances" -// You must disassociate a document from all instances before you can delete -// it. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteDocument -func (c *SSM) DeleteDocument(input *DeleteDocumentInput) (*DeleteDocumentOutput, error) { - req, out := c.DeleteDocumentRequest(input) - return out, req.Send() -} - -// DeleteDocumentWithContext is the same as DeleteDocument with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDocument for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DeleteDocumentWithContext(ctx aws.Context, input *DeleteDocumentInput, opts ...request.Option) (*DeleteDocumentOutput, error) { - req, out := c.DeleteDocumentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteInventory = "DeleteInventory" - -// DeleteInventoryRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInventory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteInventory for more information on using the DeleteInventory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteInventoryRequest method. -// req, resp := client.DeleteInventoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteInventory -func (c *SSM) DeleteInventoryRequest(input *DeleteInventoryInput) (req *request.Request, output *DeleteInventoryOutput) { - op := &request.Operation{ - Name: opDeleteInventory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteInventoryInput{} - } - - output = &DeleteInventoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteInventory API operation for Amazon Simple Systems Manager (SSM). -// -// Delete a custom inventory type, or the data associated with a custom Inventory -// type. Deleting a custom inventory type is also referred to as deleting a -// custom inventory schema. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DeleteInventory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidTypeNameException "InvalidTypeNameException" -// The parameter type name is not valid. -// -// * ErrCodeInvalidOptionException "InvalidOptionException" -// The delete inventory option specified is not valid. Verify the option and -// try again. -// -// * ErrCodeInvalidDeleteInventoryParametersException "InvalidDeleteInventoryParametersException" -// One or more of the parameters specified for the delete operation is not valid. -// Verify all parameters and try again. -// -// * ErrCodeInvalidInventoryRequestException "InvalidInventoryRequestException" -// The request is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteInventory -func (c *SSM) DeleteInventory(input *DeleteInventoryInput) (*DeleteInventoryOutput, error) { - req, out := c.DeleteInventoryRequest(input) - return out, req.Send() -} - -// DeleteInventoryWithContext is the same as DeleteInventory with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteInventory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DeleteInventoryWithContext(ctx aws.Context, input *DeleteInventoryInput, opts ...request.Option) (*DeleteInventoryOutput, error) { - req, out := c.DeleteInventoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteMaintenanceWindow = "DeleteMaintenanceWindow" - -// DeleteMaintenanceWindowRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteMaintenanceWindow for more information on using the DeleteMaintenanceWindow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteMaintenanceWindowRequest method. -// req, resp := client.DeleteMaintenanceWindowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteMaintenanceWindow -func (c *SSM) DeleteMaintenanceWindowRequest(input *DeleteMaintenanceWindowInput) (req *request.Request, output *DeleteMaintenanceWindowOutput) { - op := &request.Operation{ - Name: opDeleteMaintenanceWindow, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteMaintenanceWindowInput{} - } - - output = &DeleteMaintenanceWindowOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). -// -// Deletes a Maintenance Window. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DeleteMaintenanceWindow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteMaintenanceWindow -func (c *SSM) DeleteMaintenanceWindow(input *DeleteMaintenanceWindowInput) (*DeleteMaintenanceWindowOutput, error) { - req, out := c.DeleteMaintenanceWindowRequest(input) - return out, req.Send() -} - -// DeleteMaintenanceWindowWithContext is the same as DeleteMaintenanceWindow with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteMaintenanceWindow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DeleteMaintenanceWindowWithContext(ctx aws.Context, input *DeleteMaintenanceWindowInput, opts ...request.Option) (*DeleteMaintenanceWindowOutput, error) { - req, out := c.DeleteMaintenanceWindowRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteParameter = "DeleteParameter" - -// DeleteParameterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteParameter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteParameter for more information on using the DeleteParameter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteParameterRequest method. -// req, resp := client.DeleteParameterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteParameter -func (c *SSM) DeleteParameterRequest(input *DeleteParameterInput) (req *request.Request, output *DeleteParameterOutput) { - op := &request.Operation{ - Name: opDeleteParameter, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteParameterInput{} - } - - output = &DeleteParameterOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteParameter API operation for Amazon Simple Systems Manager (SSM). -// -// Delete a parameter from the system. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DeleteParameter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeParameterNotFound "ParameterNotFound" -// The parameter could not be found. Verify the name and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteParameter -func (c *SSM) DeleteParameter(input *DeleteParameterInput) (*DeleteParameterOutput, error) { - req, out := c.DeleteParameterRequest(input) - return out, req.Send() -} - -// DeleteParameterWithContext is the same as DeleteParameter with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteParameter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DeleteParameterWithContext(ctx aws.Context, input *DeleteParameterInput, opts ...request.Option) (*DeleteParameterOutput, error) { - req, out := c.DeleteParameterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteParameters = "DeleteParameters" - -// DeleteParametersRequest generates a "aws/request.Request" representing the -// client's request for the DeleteParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteParameters for more information on using the DeleteParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteParametersRequest method. -// req, resp := client.DeleteParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteParameters -func (c *SSM) DeleteParametersRequest(input *DeleteParametersInput) (req *request.Request, output *DeleteParametersOutput) { - op := &request.Operation{ - Name: opDeleteParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteParametersInput{} - } - - output = &DeleteParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteParameters API operation for Amazon Simple Systems Manager (SSM). -// -// Delete a list of parameters. This API is used to delete parameters by using -// the Amazon EC2 console. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DeleteParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteParameters -func (c *SSM) DeleteParameters(input *DeleteParametersInput) (*DeleteParametersOutput, error) { - req, out := c.DeleteParametersRequest(input) - return out, req.Send() -} - -// DeleteParametersWithContext is the same as DeleteParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DeleteParametersWithContext(ctx aws.Context, input *DeleteParametersInput, opts ...request.Option) (*DeleteParametersOutput, error) { - req, out := c.DeleteParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePatchBaseline = "DeletePatchBaseline" - -// DeletePatchBaselineRequest generates a "aws/request.Request" representing the -// client's request for the DeletePatchBaseline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePatchBaseline for more information on using the DeletePatchBaseline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePatchBaselineRequest method. -// req, resp := client.DeletePatchBaselineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeletePatchBaseline -func (c *SSM) DeletePatchBaselineRequest(input *DeletePatchBaselineInput) (req *request.Request, output *DeletePatchBaselineOutput) { - op := &request.Operation{ - Name: opDeletePatchBaseline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePatchBaselineInput{} - } - - output = &DeletePatchBaselineOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeletePatchBaseline API operation for Amazon Simple Systems Manager (SSM). -// -// Deletes a patch baseline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DeletePatchBaseline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceInUseException "ResourceInUseException" -// Error returned if an attempt is made to delete a patch baseline that is registered -// for a patch group. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeletePatchBaseline -func (c *SSM) DeletePatchBaseline(input *DeletePatchBaselineInput) (*DeletePatchBaselineOutput, error) { - req, out := c.DeletePatchBaselineRequest(input) - return out, req.Send() -} - -// DeletePatchBaselineWithContext is the same as DeletePatchBaseline with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePatchBaseline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DeletePatchBaselineWithContext(ctx aws.Context, input *DeletePatchBaselineInput, opts ...request.Option) (*DeletePatchBaselineOutput, error) { - req, out := c.DeletePatchBaselineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteResourceDataSync = "DeleteResourceDataSync" - -// DeleteResourceDataSyncRequest generates a "aws/request.Request" representing the -// client's request for the DeleteResourceDataSync operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteResourceDataSync for more information on using the DeleteResourceDataSync -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteResourceDataSyncRequest method. -// req, resp := client.DeleteResourceDataSyncRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteResourceDataSync -func (c *SSM) DeleteResourceDataSyncRequest(input *DeleteResourceDataSyncInput) (req *request.Request, output *DeleteResourceDataSyncOutput) { - op := &request.Operation{ - Name: opDeleteResourceDataSync, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteResourceDataSyncInput{} - } - - output = &DeleteResourceDataSyncOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteResourceDataSync API operation for Amazon Simple Systems Manager (SSM). -// -// Deletes a Resource Data Sync configuration. After the configuration is deleted, -// changes to inventory data on managed instances are no longer synced with -// the target Amazon S3 bucket. Deleting a sync configuration does not delete -// data in the target Amazon S3 bucket. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DeleteResourceDataSync for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeResourceDataSyncNotFoundException "ResourceDataSyncNotFoundException" -// The specified sync name was not found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteResourceDataSync -func (c *SSM) DeleteResourceDataSync(input *DeleteResourceDataSyncInput) (*DeleteResourceDataSyncOutput, error) { - req, out := c.DeleteResourceDataSyncRequest(input) - return out, req.Send() -} - -// DeleteResourceDataSyncWithContext is the same as DeleteResourceDataSync with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteResourceDataSync for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DeleteResourceDataSyncWithContext(ctx aws.Context, input *DeleteResourceDataSyncInput, opts ...request.Option) (*DeleteResourceDataSyncOutput, error) { - req, out := c.DeleteResourceDataSyncRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterManagedInstance = "DeregisterManagedInstance" - -// DeregisterManagedInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterManagedInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterManagedInstance for more information on using the DeregisterManagedInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterManagedInstanceRequest method. -// req, resp := client.DeregisterManagedInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterManagedInstance -func (c *SSM) DeregisterManagedInstanceRequest(input *DeregisterManagedInstanceInput) (req *request.Request, output *DeregisterManagedInstanceOutput) { - op := &request.Operation{ - Name: opDeregisterManagedInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterManagedInstanceInput{} - } - - output = &DeregisterManagedInstanceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterManagedInstance API operation for Amazon Simple Systems Manager (SSM). -// -// Removes the server or virtual machine from the list of registered servers. -// You can reregister the instance again at any time. If you don't plan to use -// Run Command on the server, we suggest uninstalling SSM Agent first. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DeregisterManagedInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterManagedInstance -func (c *SSM) DeregisterManagedInstance(input *DeregisterManagedInstanceInput) (*DeregisterManagedInstanceOutput, error) { - req, out := c.DeregisterManagedInstanceRequest(input) - return out, req.Send() -} - -// DeregisterManagedInstanceWithContext is the same as DeregisterManagedInstance with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterManagedInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DeregisterManagedInstanceWithContext(ctx aws.Context, input *DeregisterManagedInstanceInput, opts ...request.Option) (*DeregisterManagedInstanceOutput, error) { - req, out := c.DeregisterManagedInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterPatchBaselineForPatchGroup = "DeregisterPatchBaselineForPatchGroup" - -// DeregisterPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterPatchBaselineForPatchGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterPatchBaselineForPatchGroup for more information on using the DeregisterPatchBaselineForPatchGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterPatchBaselineForPatchGroupRequest method. -// req, resp := client.DeregisterPatchBaselineForPatchGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterPatchBaselineForPatchGroup -func (c *SSM) DeregisterPatchBaselineForPatchGroupRequest(input *DeregisterPatchBaselineForPatchGroupInput) (req *request.Request, output *DeregisterPatchBaselineForPatchGroupOutput) { - op := &request.Operation{ - Name: opDeregisterPatchBaselineForPatchGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterPatchBaselineForPatchGroupInput{} - } - - output = &DeregisterPatchBaselineForPatchGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeregisterPatchBaselineForPatchGroup API operation for Amazon Simple Systems Manager (SSM). -// -// Removes a patch group from a patch baseline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DeregisterPatchBaselineForPatchGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceId "InvalidResourceId" -// The resource ID is not valid. Verify that you entered the correct ID and -// try again. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterPatchBaselineForPatchGroup -func (c *SSM) DeregisterPatchBaselineForPatchGroup(input *DeregisterPatchBaselineForPatchGroupInput) (*DeregisterPatchBaselineForPatchGroupOutput, error) { - req, out := c.DeregisterPatchBaselineForPatchGroupRequest(input) - return out, req.Send() -} - -// DeregisterPatchBaselineForPatchGroupWithContext is the same as DeregisterPatchBaselineForPatchGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterPatchBaselineForPatchGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DeregisterPatchBaselineForPatchGroupWithContext(ctx aws.Context, input *DeregisterPatchBaselineForPatchGroupInput, opts ...request.Option) (*DeregisterPatchBaselineForPatchGroupOutput, error) { - req, out := c.DeregisterPatchBaselineForPatchGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterTargetFromMaintenanceWindow = "DeregisterTargetFromMaintenanceWindow" - -// DeregisterTargetFromMaintenanceWindowRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterTargetFromMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterTargetFromMaintenanceWindow for more information on using the DeregisterTargetFromMaintenanceWindow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterTargetFromMaintenanceWindowRequest method. -// req, resp := client.DeregisterTargetFromMaintenanceWindowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterTargetFromMaintenanceWindow -func (c *SSM) DeregisterTargetFromMaintenanceWindowRequest(input *DeregisterTargetFromMaintenanceWindowInput) (req *request.Request, output *DeregisterTargetFromMaintenanceWindowOutput) { - op := &request.Operation{ - Name: opDeregisterTargetFromMaintenanceWindow, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterTargetFromMaintenanceWindowInput{} - } - - output = &DeregisterTargetFromMaintenanceWindowOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeregisterTargetFromMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). -// -// Removes a target from a Maintenance Window. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DeregisterTargetFromMaintenanceWindow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeTargetInUseException "TargetInUseException" -// You specified the Safe option for the DeregisterTargetFromMaintenanceWindow -// operation, but the target is still referenced in a task. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterTargetFromMaintenanceWindow -func (c *SSM) DeregisterTargetFromMaintenanceWindow(input *DeregisterTargetFromMaintenanceWindowInput) (*DeregisterTargetFromMaintenanceWindowOutput, error) { - req, out := c.DeregisterTargetFromMaintenanceWindowRequest(input) - return out, req.Send() -} - -// DeregisterTargetFromMaintenanceWindowWithContext is the same as DeregisterTargetFromMaintenanceWindow with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterTargetFromMaintenanceWindow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DeregisterTargetFromMaintenanceWindowWithContext(ctx aws.Context, input *DeregisterTargetFromMaintenanceWindowInput, opts ...request.Option) (*DeregisterTargetFromMaintenanceWindowOutput, error) { - req, out := c.DeregisterTargetFromMaintenanceWindowRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterTaskFromMaintenanceWindow = "DeregisterTaskFromMaintenanceWindow" - -// DeregisterTaskFromMaintenanceWindowRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterTaskFromMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeregisterTaskFromMaintenanceWindow for more information on using the DeregisterTaskFromMaintenanceWindow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeregisterTaskFromMaintenanceWindowRequest method. -// req, resp := client.DeregisterTaskFromMaintenanceWindowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterTaskFromMaintenanceWindow -func (c *SSM) DeregisterTaskFromMaintenanceWindowRequest(input *DeregisterTaskFromMaintenanceWindowInput) (req *request.Request, output *DeregisterTaskFromMaintenanceWindowOutput) { - op := &request.Operation{ - Name: opDeregisterTaskFromMaintenanceWindow, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterTaskFromMaintenanceWindowInput{} - } - - output = &DeregisterTaskFromMaintenanceWindowOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeregisterTaskFromMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). -// -// Removes a task from a Maintenance Window. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DeregisterTaskFromMaintenanceWindow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterTaskFromMaintenanceWindow -func (c *SSM) DeregisterTaskFromMaintenanceWindow(input *DeregisterTaskFromMaintenanceWindowInput) (*DeregisterTaskFromMaintenanceWindowOutput, error) { - req, out := c.DeregisterTaskFromMaintenanceWindowRequest(input) - return out, req.Send() -} - -// DeregisterTaskFromMaintenanceWindowWithContext is the same as DeregisterTaskFromMaintenanceWindow with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterTaskFromMaintenanceWindow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DeregisterTaskFromMaintenanceWindowWithContext(ctx aws.Context, input *DeregisterTaskFromMaintenanceWindowInput, opts ...request.Option) (*DeregisterTaskFromMaintenanceWindowOutput, error) { - req, out := c.DeregisterTaskFromMaintenanceWindowRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeActivations = "DescribeActivations" - -// DescribeActivationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeActivations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeActivations for more information on using the DescribeActivations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeActivationsRequest method. -// req, resp := client.DescribeActivationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeActivations -func (c *SSM) DescribeActivationsRequest(input *DescribeActivationsInput) (req *request.Request, output *DescribeActivationsOutput) { - op := &request.Operation{ - Name: opDescribeActivations, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeActivationsInput{} - } - - output = &DescribeActivationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeActivations API operation for Amazon Simple Systems Manager (SSM). -// -// Details about the activation, including: the date and time the activation -// was created, the expiration date, the IAM role assigned to the instances -// in the activation, and the number of instances activated by this registration. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeActivations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidFilter "InvalidFilter" -// The filter name is not valid. Verify the you entered the correct name and -// try again. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeActivations -func (c *SSM) DescribeActivations(input *DescribeActivationsInput) (*DescribeActivationsOutput, error) { - req, out := c.DescribeActivationsRequest(input) - return out, req.Send() -} - -// DescribeActivationsWithContext is the same as DescribeActivations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeActivations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeActivationsWithContext(ctx aws.Context, input *DescribeActivationsInput, opts ...request.Option) (*DescribeActivationsOutput, error) { - req, out := c.DescribeActivationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeActivationsPages iterates over the pages of a DescribeActivations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeActivations 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 DescribeActivations operation. -// pageNum := 0 -// err := client.DescribeActivationsPages(params, -// func(page *DescribeActivationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SSM) DescribeActivationsPages(input *DescribeActivationsInput, fn func(*DescribeActivationsOutput, bool) bool) error { - return c.DescribeActivationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeActivationsPagesWithContext same as DescribeActivationsPages 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 *SSM) DescribeActivationsPagesWithContext(ctx aws.Context, input *DescribeActivationsInput, fn func(*DescribeActivationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeActivationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeActivationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeActivationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeAssociation = "DescribeAssociation" - -// DescribeAssociationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAssociation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAssociation for more information on using the DescribeAssociation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAssociationRequest method. -// req, resp := client.DescribeAssociationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociation -func (c *SSM) DescribeAssociationRequest(input *DescribeAssociationInput) (req *request.Request, output *DescribeAssociationOutput) { - op := &request.Operation{ - Name: opDescribeAssociation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAssociationInput{} - } - - output = &DescribeAssociationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAssociation API operation for Amazon Simple Systems Manager (SSM). -// -// Describes the association for the specified target or instance. If you created -// the association by using the Targets parameter, then you must retrieve the -// association by using the association ID. If you created the association by -// specifying an instance ID and a Systems Manager document, then you retrieve -// the association by specifying the document name and the instance ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeAssociation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist" -// The specified association does not exist. -// -// * ErrCodeInvalidAssociationVersion "InvalidAssociationVersion" -// The version you specified is not valid. Use ListAssociationVersions to view -// all versions of an association according to the association ID. Or, use the -// $LATEST parameter to view the latest version of the association. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociation -func (c *SSM) DescribeAssociation(input *DescribeAssociationInput) (*DescribeAssociationOutput, error) { - req, out := c.DescribeAssociationRequest(input) - return out, req.Send() -} - -// DescribeAssociationWithContext is the same as DescribeAssociation with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAssociation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeAssociationWithContext(ctx aws.Context, input *DescribeAssociationInput, opts ...request.Option) (*DescribeAssociationOutput, error) { - req, out := c.DescribeAssociationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAssociationExecutionTargets = "DescribeAssociationExecutionTargets" - -// DescribeAssociationExecutionTargetsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAssociationExecutionTargets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAssociationExecutionTargets for more information on using the DescribeAssociationExecutionTargets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAssociationExecutionTargetsRequest method. -// req, resp := client.DescribeAssociationExecutionTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutionTargets -func (c *SSM) DescribeAssociationExecutionTargetsRequest(input *DescribeAssociationExecutionTargetsInput) (req *request.Request, output *DescribeAssociationExecutionTargetsOutput) { - op := &request.Operation{ - Name: opDescribeAssociationExecutionTargets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAssociationExecutionTargetsInput{} - } - - output = &DescribeAssociationExecutionTargetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAssociationExecutionTargets API operation for Amazon Simple Systems Manager (SSM). -// -// Use this API action to view information about a specific execution of a specific -// association. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeAssociationExecutionTargets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist" -// The specified association does not exist. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// * ErrCodeAssociationExecutionDoesNotExist "AssociationExecutionDoesNotExist" -// The specified execution ID does not exist. Verify the ID number and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutionTargets -func (c *SSM) DescribeAssociationExecutionTargets(input *DescribeAssociationExecutionTargetsInput) (*DescribeAssociationExecutionTargetsOutput, error) { - req, out := c.DescribeAssociationExecutionTargetsRequest(input) - return out, req.Send() -} - -// DescribeAssociationExecutionTargetsWithContext is the same as DescribeAssociationExecutionTargets with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAssociationExecutionTargets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeAssociationExecutionTargetsWithContext(ctx aws.Context, input *DescribeAssociationExecutionTargetsInput, opts ...request.Option) (*DescribeAssociationExecutionTargetsOutput, error) { - req, out := c.DescribeAssociationExecutionTargetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAssociationExecutions = "DescribeAssociationExecutions" - -// DescribeAssociationExecutionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAssociationExecutions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAssociationExecutions for more information on using the DescribeAssociationExecutions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAssociationExecutionsRequest method. -// req, resp := client.DescribeAssociationExecutionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutions -func (c *SSM) DescribeAssociationExecutionsRequest(input *DescribeAssociationExecutionsInput) (req *request.Request, output *DescribeAssociationExecutionsOutput) { - op := &request.Operation{ - Name: opDescribeAssociationExecutions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAssociationExecutionsInput{} - } - - output = &DescribeAssociationExecutionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAssociationExecutions API operation for Amazon Simple Systems Manager (SSM). -// -// Use this API action to view all executions for a specific association ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeAssociationExecutions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist" -// The specified association does not exist. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutions -func (c *SSM) DescribeAssociationExecutions(input *DescribeAssociationExecutionsInput) (*DescribeAssociationExecutionsOutput, error) { - req, out := c.DescribeAssociationExecutionsRequest(input) - return out, req.Send() -} - -// DescribeAssociationExecutionsWithContext is the same as DescribeAssociationExecutions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAssociationExecutions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeAssociationExecutionsWithContext(ctx aws.Context, input *DescribeAssociationExecutionsInput, opts ...request.Option) (*DescribeAssociationExecutionsOutput, error) { - req, out := c.DescribeAssociationExecutionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAutomationExecutions = "DescribeAutomationExecutions" - -// DescribeAutomationExecutionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAutomationExecutions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAutomationExecutions for more information on using the DescribeAutomationExecutions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAutomationExecutionsRequest method. -// req, resp := client.DescribeAutomationExecutionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAutomationExecutions -func (c *SSM) DescribeAutomationExecutionsRequest(input *DescribeAutomationExecutionsInput) (req *request.Request, output *DescribeAutomationExecutionsOutput) { - op := &request.Operation{ - Name: opDescribeAutomationExecutions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAutomationExecutionsInput{} - } - - output = &DescribeAutomationExecutionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAutomationExecutions API operation for Amazon Simple Systems Manager (SSM). -// -// Provides details about all active and terminated Automation executions. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeAutomationExecutions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidFilterKey "InvalidFilterKey" -// The specified key is not valid. -// -// * ErrCodeInvalidFilterValue "InvalidFilterValue" -// The filter value is not valid. Verify the value and try again. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAutomationExecutions -func (c *SSM) DescribeAutomationExecutions(input *DescribeAutomationExecutionsInput) (*DescribeAutomationExecutionsOutput, error) { - req, out := c.DescribeAutomationExecutionsRequest(input) - return out, req.Send() -} - -// DescribeAutomationExecutionsWithContext is the same as DescribeAutomationExecutions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAutomationExecutions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeAutomationExecutionsWithContext(ctx aws.Context, input *DescribeAutomationExecutionsInput, opts ...request.Option) (*DescribeAutomationExecutionsOutput, error) { - req, out := c.DescribeAutomationExecutionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAutomationStepExecutions = "DescribeAutomationStepExecutions" - -// DescribeAutomationStepExecutionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAutomationStepExecutions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAutomationStepExecutions for more information on using the DescribeAutomationStepExecutions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAutomationStepExecutionsRequest method. -// req, resp := client.DescribeAutomationStepExecutionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAutomationStepExecutions -func (c *SSM) DescribeAutomationStepExecutionsRequest(input *DescribeAutomationStepExecutionsInput) (req *request.Request, output *DescribeAutomationStepExecutionsOutput) { - op := &request.Operation{ - Name: opDescribeAutomationStepExecutions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAutomationStepExecutionsInput{} - } - - output = &DescribeAutomationStepExecutionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAutomationStepExecutions API operation for Amazon Simple Systems Manager (SSM). -// -// Information about all active and terminated step executions in an Automation -// workflow. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeAutomationStepExecutions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAutomationExecutionNotFoundException "AutomationExecutionNotFoundException" -// There is no automation execution information for the requested automation -// execution ID. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// * ErrCodeInvalidFilterKey "InvalidFilterKey" -// The specified key is not valid. -// -// * ErrCodeInvalidFilterValue "InvalidFilterValue" -// The filter value is not valid. Verify the value and try again. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAutomationStepExecutions -func (c *SSM) DescribeAutomationStepExecutions(input *DescribeAutomationStepExecutionsInput) (*DescribeAutomationStepExecutionsOutput, error) { - req, out := c.DescribeAutomationStepExecutionsRequest(input) - return out, req.Send() -} - -// DescribeAutomationStepExecutionsWithContext is the same as DescribeAutomationStepExecutions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAutomationStepExecutions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeAutomationStepExecutionsWithContext(ctx aws.Context, input *DescribeAutomationStepExecutionsInput, opts ...request.Option) (*DescribeAutomationStepExecutionsOutput, error) { - req, out := c.DescribeAutomationStepExecutionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAvailablePatches = "DescribeAvailablePatches" - -// DescribeAvailablePatchesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAvailablePatches operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAvailablePatches for more information on using the DescribeAvailablePatches -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAvailablePatchesRequest method. -// req, resp := client.DescribeAvailablePatchesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAvailablePatches -func (c *SSM) DescribeAvailablePatchesRequest(input *DescribeAvailablePatchesInput) (req *request.Request, output *DescribeAvailablePatchesOutput) { - op := &request.Operation{ - Name: opDescribeAvailablePatches, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAvailablePatchesInput{} - } - - output = &DescribeAvailablePatchesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAvailablePatches API operation for Amazon Simple Systems Manager (SSM). -// -// Lists all patches that could possibly be included in a patch baseline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeAvailablePatches for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAvailablePatches -func (c *SSM) DescribeAvailablePatches(input *DescribeAvailablePatchesInput) (*DescribeAvailablePatchesOutput, error) { - req, out := c.DescribeAvailablePatchesRequest(input) - return out, req.Send() -} - -// DescribeAvailablePatchesWithContext is the same as DescribeAvailablePatches with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAvailablePatches for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeAvailablePatchesWithContext(ctx aws.Context, input *DescribeAvailablePatchesInput, opts ...request.Option) (*DescribeAvailablePatchesOutput, error) { - req, out := c.DescribeAvailablePatchesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDocument = "DescribeDocument" - -// DescribeDocumentRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDocument operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDocument for more information on using the DescribeDocument -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDocumentRequest method. -// req, resp := client.DescribeDocumentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeDocument -func (c *SSM) DescribeDocumentRequest(input *DescribeDocumentInput) (req *request.Request, output *DescribeDocumentOutput) { - op := &request.Operation{ - Name: opDescribeDocument, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDocumentInput{} - } - - output = &DescribeDocumentOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDocument API operation for Amazon Simple Systems Manager (SSM). -// -// Describes the specified Systems Manager document. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeDocument for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion" -// The document version is not valid or does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeDocument -func (c *SSM) DescribeDocument(input *DescribeDocumentInput) (*DescribeDocumentOutput, error) { - req, out := c.DescribeDocumentRequest(input) - return out, req.Send() -} - -// DescribeDocumentWithContext is the same as DescribeDocument with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDocument for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeDocumentWithContext(ctx aws.Context, input *DescribeDocumentInput, opts ...request.Option) (*DescribeDocumentOutput, error) { - req, out := c.DescribeDocumentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDocumentPermission = "DescribeDocumentPermission" - -// DescribeDocumentPermissionRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDocumentPermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDocumentPermission for more information on using the DescribeDocumentPermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDocumentPermissionRequest method. -// req, resp := client.DescribeDocumentPermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeDocumentPermission -func (c *SSM) DescribeDocumentPermissionRequest(input *DescribeDocumentPermissionInput) (req *request.Request, output *DescribeDocumentPermissionOutput) { - op := &request.Operation{ - Name: opDescribeDocumentPermission, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDocumentPermissionInput{} - } - - output = &DescribeDocumentPermissionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDocumentPermission API operation for Amazon Simple Systems Manager (SSM). -// -// Describes the permissions for a Systems Manager document. If you created -// the document, you are the owner. If a document is shared, it can either be -// shared privately (by specifying a user's AWS account ID) or publicly (All). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeDocumentPermission for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeInvalidPermissionType "InvalidPermissionType" -// The permission type is not supported. Share is the only supported permission -// type. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeDocumentPermission -func (c *SSM) DescribeDocumentPermission(input *DescribeDocumentPermissionInput) (*DescribeDocumentPermissionOutput, error) { - req, out := c.DescribeDocumentPermissionRequest(input) - return out, req.Send() -} - -// DescribeDocumentPermissionWithContext is the same as DescribeDocumentPermission with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDocumentPermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeDocumentPermissionWithContext(ctx aws.Context, input *DescribeDocumentPermissionInput, opts ...request.Option) (*DescribeDocumentPermissionOutput, error) { - req, out := c.DescribeDocumentPermissionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEffectiveInstanceAssociations = "DescribeEffectiveInstanceAssociations" - -// DescribeEffectiveInstanceAssociationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEffectiveInstanceAssociations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEffectiveInstanceAssociations for more information on using the DescribeEffectiveInstanceAssociations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEffectiveInstanceAssociationsRequest method. -// req, resp := client.DescribeEffectiveInstanceAssociationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeEffectiveInstanceAssociations -func (c *SSM) DescribeEffectiveInstanceAssociationsRequest(input *DescribeEffectiveInstanceAssociationsInput) (req *request.Request, output *DescribeEffectiveInstanceAssociationsOutput) { - op := &request.Operation{ - Name: opDescribeEffectiveInstanceAssociations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEffectiveInstanceAssociationsInput{} - } - - output = &DescribeEffectiveInstanceAssociationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEffectiveInstanceAssociations API operation for Amazon Simple Systems Manager (SSM). -// -// All associations for the instance(s). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeEffectiveInstanceAssociations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeEffectiveInstanceAssociations -func (c *SSM) DescribeEffectiveInstanceAssociations(input *DescribeEffectiveInstanceAssociationsInput) (*DescribeEffectiveInstanceAssociationsOutput, error) { - req, out := c.DescribeEffectiveInstanceAssociationsRequest(input) - return out, req.Send() -} - -// DescribeEffectiveInstanceAssociationsWithContext is the same as DescribeEffectiveInstanceAssociations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEffectiveInstanceAssociations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeEffectiveInstanceAssociationsWithContext(ctx aws.Context, input *DescribeEffectiveInstanceAssociationsInput, opts ...request.Option) (*DescribeEffectiveInstanceAssociationsOutput, error) { - req, out := c.DescribeEffectiveInstanceAssociationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeEffectivePatchesForPatchBaseline = "DescribeEffectivePatchesForPatchBaseline" - -// DescribeEffectivePatchesForPatchBaselineRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEffectivePatchesForPatchBaseline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeEffectivePatchesForPatchBaseline for more information on using the DescribeEffectivePatchesForPatchBaseline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeEffectivePatchesForPatchBaselineRequest method. -// req, resp := client.DescribeEffectivePatchesForPatchBaselineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeEffectivePatchesForPatchBaseline -func (c *SSM) DescribeEffectivePatchesForPatchBaselineRequest(input *DescribeEffectivePatchesForPatchBaselineInput) (req *request.Request, output *DescribeEffectivePatchesForPatchBaselineOutput) { - op := &request.Operation{ - Name: opDescribeEffectivePatchesForPatchBaseline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeEffectivePatchesForPatchBaselineInput{} - } - - output = &DescribeEffectivePatchesForPatchBaselineOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeEffectivePatchesForPatchBaseline API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves the current effective patches (the patch and the approval state) -// for the specified patch baseline. Note that this API applies only to Windows -// patch baselines. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeEffectivePatchesForPatchBaseline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceId "InvalidResourceId" -// The resource ID is not valid. Verify that you entered the correct ID and -// try again. -// -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeUnsupportedOperatingSystem "UnsupportedOperatingSystem" -// The operating systems you specified is not supported, or the operation is -// not supported for the operating system. Valid operating systems include: -// Windows, AmazonLinux, RedhatEnterpriseLinux, and Ubuntu. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeEffectivePatchesForPatchBaseline -func (c *SSM) DescribeEffectivePatchesForPatchBaseline(input *DescribeEffectivePatchesForPatchBaselineInput) (*DescribeEffectivePatchesForPatchBaselineOutput, error) { - req, out := c.DescribeEffectivePatchesForPatchBaselineRequest(input) - return out, req.Send() -} - -// DescribeEffectivePatchesForPatchBaselineWithContext is the same as DescribeEffectivePatchesForPatchBaseline with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeEffectivePatchesForPatchBaseline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeEffectivePatchesForPatchBaselineWithContext(ctx aws.Context, input *DescribeEffectivePatchesForPatchBaselineInput, opts ...request.Option) (*DescribeEffectivePatchesForPatchBaselineOutput, error) { - req, out := c.DescribeEffectivePatchesForPatchBaselineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInstanceAssociationsStatus = "DescribeInstanceAssociationsStatus" - -// DescribeInstanceAssociationsStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInstanceAssociationsStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInstanceAssociationsStatus for more information on using the DescribeInstanceAssociationsStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInstanceAssociationsStatusRequest method. -// req, resp := client.DescribeInstanceAssociationsStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstanceAssociationsStatus -func (c *SSM) DescribeInstanceAssociationsStatusRequest(input *DescribeInstanceAssociationsStatusInput) (req *request.Request, output *DescribeInstanceAssociationsStatusOutput) { - op := &request.Operation{ - Name: opDescribeInstanceAssociationsStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInstanceAssociationsStatusInput{} - } - - output = &DescribeInstanceAssociationsStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInstanceAssociationsStatus API operation for Amazon Simple Systems Manager (SSM). -// -// The status of the associations for the instance(s). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeInstanceAssociationsStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstanceAssociationsStatus -func (c *SSM) DescribeInstanceAssociationsStatus(input *DescribeInstanceAssociationsStatusInput) (*DescribeInstanceAssociationsStatusOutput, error) { - req, out := c.DescribeInstanceAssociationsStatusRequest(input) - return out, req.Send() -} - -// DescribeInstanceAssociationsStatusWithContext is the same as DescribeInstanceAssociationsStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInstanceAssociationsStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeInstanceAssociationsStatusWithContext(ctx aws.Context, input *DescribeInstanceAssociationsStatusInput, opts ...request.Option) (*DescribeInstanceAssociationsStatusOutput, error) { - req, out := c.DescribeInstanceAssociationsStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInstanceInformation = "DescribeInstanceInformation" - -// DescribeInstanceInformationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInstanceInformation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInstanceInformation for more information on using the DescribeInstanceInformation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInstanceInformationRequest method. -// req, resp := client.DescribeInstanceInformationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstanceInformation -func (c *SSM) DescribeInstanceInformationRequest(input *DescribeInstanceInformationInput) (req *request.Request, output *DescribeInstanceInformationOutput) { - op := &request.Operation{ - Name: opDescribeInstanceInformation, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeInstanceInformationInput{} - } - - output = &DescribeInstanceInformationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInstanceInformation API operation for Amazon Simple Systems Manager (SSM). -// -// Describes one or more of your instances. You can use this to get information -// about instances like the operating system platform, the SSM Agent version -// (Linux), status etc. If you specify one or more instance IDs, it returns -// information for those instances. If you do not specify instance IDs, it returns -// information for all your instances. If you specify an instance ID that is -// not valid or an instance that you do not own, you receive an error. -// -// The IamRole field for this API action is the Amazon Identity and Access Management -// (IAM) role assigned to on-premises instances. This call does not return the -// IAM role for Amazon EC2 instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeInstanceInformation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// * ErrCodeInvalidInstanceInformationFilterValue "InvalidInstanceInformationFilterValue" -// The specified filter value is not valid. -// -// * ErrCodeInvalidFilterKey "InvalidFilterKey" -// The specified key is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstanceInformation -func (c *SSM) DescribeInstanceInformation(input *DescribeInstanceInformationInput) (*DescribeInstanceInformationOutput, error) { - req, out := c.DescribeInstanceInformationRequest(input) - return out, req.Send() -} - -// DescribeInstanceInformationWithContext is the same as DescribeInstanceInformation with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInstanceInformation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeInstanceInformationWithContext(ctx aws.Context, input *DescribeInstanceInformationInput, opts ...request.Option) (*DescribeInstanceInformationOutput, error) { - req, out := c.DescribeInstanceInformationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeInstanceInformationPages iterates over the pages of a DescribeInstanceInformation operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeInstanceInformation 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 DescribeInstanceInformation operation. -// pageNum := 0 -// err := client.DescribeInstanceInformationPages(params, -// func(page *DescribeInstanceInformationOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SSM) DescribeInstanceInformationPages(input *DescribeInstanceInformationInput, fn func(*DescribeInstanceInformationOutput, bool) bool) error { - return c.DescribeInstanceInformationPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeInstanceInformationPagesWithContext same as DescribeInstanceInformationPages 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 *SSM) DescribeInstanceInformationPagesWithContext(ctx aws.Context, input *DescribeInstanceInformationInput, fn func(*DescribeInstanceInformationOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeInstanceInformationInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstanceInformationRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeInstanceInformationOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeInstancePatchStates = "DescribeInstancePatchStates" - -// DescribeInstancePatchStatesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInstancePatchStates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInstancePatchStates for more information on using the DescribeInstancePatchStates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInstancePatchStatesRequest method. -// req, resp := client.DescribeInstancePatchStatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatchStates -func (c *SSM) DescribeInstancePatchStatesRequest(input *DescribeInstancePatchStatesInput) (req *request.Request, output *DescribeInstancePatchStatesOutput) { - op := &request.Operation{ - Name: opDescribeInstancePatchStates, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInstancePatchStatesInput{} - } - - output = &DescribeInstancePatchStatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInstancePatchStates API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves the high-level patch state of one or more instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeInstancePatchStates for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatchStates -func (c *SSM) DescribeInstancePatchStates(input *DescribeInstancePatchStatesInput) (*DescribeInstancePatchStatesOutput, error) { - req, out := c.DescribeInstancePatchStatesRequest(input) - return out, req.Send() -} - -// DescribeInstancePatchStatesWithContext is the same as DescribeInstancePatchStates with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInstancePatchStates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeInstancePatchStatesWithContext(ctx aws.Context, input *DescribeInstancePatchStatesInput, opts ...request.Option) (*DescribeInstancePatchStatesOutput, error) { - req, out := c.DescribeInstancePatchStatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInstancePatchStatesForPatchGroup = "DescribeInstancePatchStatesForPatchGroup" - -// DescribeInstancePatchStatesForPatchGroupRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInstancePatchStatesForPatchGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInstancePatchStatesForPatchGroup for more information on using the DescribeInstancePatchStatesForPatchGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInstancePatchStatesForPatchGroupRequest method. -// req, resp := client.DescribeInstancePatchStatesForPatchGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatchStatesForPatchGroup -func (c *SSM) DescribeInstancePatchStatesForPatchGroupRequest(input *DescribeInstancePatchStatesForPatchGroupInput) (req *request.Request, output *DescribeInstancePatchStatesForPatchGroupOutput) { - op := &request.Operation{ - Name: opDescribeInstancePatchStatesForPatchGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInstancePatchStatesForPatchGroupInput{} - } - - output = &DescribeInstancePatchStatesForPatchGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInstancePatchStatesForPatchGroup API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves the high-level patch state for the instances in the specified patch -// group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeInstancePatchStatesForPatchGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidFilter "InvalidFilter" -// The filter name is not valid. Verify the you entered the correct name and -// try again. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatchStatesForPatchGroup -func (c *SSM) DescribeInstancePatchStatesForPatchGroup(input *DescribeInstancePatchStatesForPatchGroupInput) (*DescribeInstancePatchStatesForPatchGroupOutput, error) { - req, out := c.DescribeInstancePatchStatesForPatchGroupRequest(input) - return out, req.Send() -} - -// DescribeInstancePatchStatesForPatchGroupWithContext is the same as DescribeInstancePatchStatesForPatchGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInstancePatchStatesForPatchGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeInstancePatchStatesForPatchGroupWithContext(ctx aws.Context, input *DescribeInstancePatchStatesForPatchGroupInput, opts ...request.Option) (*DescribeInstancePatchStatesForPatchGroupOutput, error) { - req, out := c.DescribeInstancePatchStatesForPatchGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInstancePatches = "DescribeInstancePatches" - -// DescribeInstancePatchesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInstancePatches operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInstancePatches for more information on using the DescribeInstancePatches -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInstancePatchesRequest method. -// req, resp := client.DescribeInstancePatchesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatches -func (c *SSM) DescribeInstancePatchesRequest(input *DescribeInstancePatchesInput) (req *request.Request, output *DescribeInstancePatchesOutput) { - op := &request.Operation{ - Name: opDescribeInstancePatches, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInstancePatchesInput{} - } - - output = &DescribeInstancePatchesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInstancePatches API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves information about the patches on the specified instance and their -// state relative to the patch baseline being used for the instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeInstancePatches for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeInvalidFilter "InvalidFilter" -// The filter name is not valid. Verify the you entered the correct name and -// try again. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatches -func (c *SSM) DescribeInstancePatches(input *DescribeInstancePatchesInput) (*DescribeInstancePatchesOutput, error) { - req, out := c.DescribeInstancePatchesRequest(input) - return out, req.Send() -} - -// DescribeInstancePatchesWithContext is the same as DescribeInstancePatches with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInstancePatches for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeInstancePatchesWithContext(ctx aws.Context, input *DescribeInstancePatchesInput, opts ...request.Option) (*DescribeInstancePatchesOutput, error) { - req, out := c.DescribeInstancePatchesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInventoryDeletions = "DescribeInventoryDeletions" - -// DescribeInventoryDeletionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInventoryDeletions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeInventoryDeletions for more information on using the DescribeInventoryDeletions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeInventoryDeletionsRequest method. -// req, resp := client.DescribeInventoryDeletionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInventoryDeletions -func (c *SSM) DescribeInventoryDeletionsRequest(input *DescribeInventoryDeletionsInput) (req *request.Request, output *DescribeInventoryDeletionsOutput) { - op := &request.Operation{ - Name: opDescribeInventoryDeletions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInventoryDeletionsInput{} - } - - output = &DescribeInventoryDeletionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInventoryDeletions API operation for Amazon Simple Systems Manager (SSM). -// -// Describes a specific delete inventory operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeInventoryDeletions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidDeletionIdException "InvalidDeletionIdException" -// The ID specified for the delete operation does not exist or is not valide. -// Verify the ID and try again. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInventoryDeletions -func (c *SSM) DescribeInventoryDeletions(input *DescribeInventoryDeletionsInput) (*DescribeInventoryDeletionsOutput, error) { - req, out := c.DescribeInventoryDeletionsRequest(input) - return out, req.Send() -} - -// DescribeInventoryDeletionsWithContext is the same as DescribeInventoryDeletions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInventoryDeletions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeInventoryDeletionsWithContext(ctx aws.Context, input *DescribeInventoryDeletionsInput, opts ...request.Option) (*DescribeInventoryDeletionsOutput, error) { - req, out := c.DescribeInventoryDeletionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMaintenanceWindowExecutionTaskInvocations = "DescribeMaintenanceWindowExecutionTaskInvocations" - -// DescribeMaintenanceWindowExecutionTaskInvocationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMaintenanceWindowExecutionTaskInvocations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMaintenanceWindowExecutionTaskInvocations for more information on using the DescribeMaintenanceWindowExecutionTaskInvocations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMaintenanceWindowExecutionTaskInvocationsRequest method. -// req, resp := client.DescribeMaintenanceWindowExecutionTaskInvocationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutionTaskInvocations -func (c *SSM) DescribeMaintenanceWindowExecutionTaskInvocationsRequest(input *DescribeMaintenanceWindowExecutionTaskInvocationsInput) (req *request.Request, output *DescribeMaintenanceWindowExecutionTaskInvocationsOutput) { - op := &request.Operation{ - Name: opDescribeMaintenanceWindowExecutionTaskInvocations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMaintenanceWindowExecutionTaskInvocationsInput{} - } - - output = &DescribeMaintenanceWindowExecutionTaskInvocationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMaintenanceWindowExecutionTaskInvocations API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves the individual task executions (one per target) for a particular -// task executed as part of a Maintenance Window execution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeMaintenanceWindowExecutionTaskInvocations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutionTaskInvocations -func (c *SSM) DescribeMaintenanceWindowExecutionTaskInvocations(input *DescribeMaintenanceWindowExecutionTaskInvocationsInput) (*DescribeMaintenanceWindowExecutionTaskInvocationsOutput, error) { - req, out := c.DescribeMaintenanceWindowExecutionTaskInvocationsRequest(input) - return out, req.Send() -} - -// DescribeMaintenanceWindowExecutionTaskInvocationsWithContext is the same as DescribeMaintenanceWindowExecutionTaskInvocations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMaintenanceWindowExecutionTaskInvocations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeMaintenanceWindowExecutionTaskInvocationsWithContext(ctx aws.Context, input *DescribeMaintenanceWindowExecutionTaskInvocationsInput, opts ...request.Option) (*DescribeMaintenanceWindowExecutionTaskInvocationsOutput, error) { - req, out := c.DescribeMaintenanceWindowExecutionTaskInvocationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMaintenanceWindowExecutionTasks = "DescribeMaintenanceWindowExecutionTasks" - -// DescribeMaintenanceWindowExecutionTasksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMaintenanceWindowExecutionTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMaintenanceWindowExecutionTasks for more information on using the DescribeMaintenanceWindowExecutionTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMaintenanceWindowExecutionTasksRequest method. -// req, resp := client.DescribeMaintenanceWindowExecutionTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutionTasks -func (c *SSM) DescribeMaintenanceWindowExecutionTasksRequest(input *DescribeMaintenanceWindowExecutionTasksInput) (req *request.Request, output *DescribeMaintenanceWindowExecutionTasksOutput) { - op := &request.Operation{ - Name: opDescribeMaintenanceWindowExecutionTasks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMaintenanceWindowExecutionTasksInput{} - } - - output = &DescribeMaintenanceWindowExecutionTasksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMaintenanceWindowExecutionTasks API operation for Amazon Simple Systems Manager (SSM). -// -// For a given Maintenance Window execution, lists the tasks that were executed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeMaintenanceWindowExecutionTasks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutionTasks -func (c *SSM) DescribeMaintenanceWindowExecutionTasks(input *DescribeMaintenanceWindowExecutionTasksInput) (*DescribeMaintenanceWindowExecutionTasksOutput, error) { - req, out := c.DescribeMaintenanceWindowExecutionTasksRequest(input) - return out, req.Send() -} - -// DescribeMaintenanceWindowExecutionTasksWithContext is the same as DescribeMaintenanceWindowExecutionTasks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMaintenanceWindowExecutionTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeMaintenanceWindowExecutionTasksWithContext(ctx aws.Context, input *DescribeMaintenanceWindowExecutionTasksInput, opts ...request.Option) (*DescribeMaintenanceWindowExecutionTasksOutput, error) { - req, out := c.DescribeMaintenanceWindowExecutionTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMaintenanceWindowExecutions = "DescribeMaintenanceWindowExecutions" - -// DescribeMaintenanceWindowExecutionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMaintenanceWindowExecutions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMaintenanceWindowExecutions for more information on using the DescribeMaintenanceWindowExecutions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMaintenanceWindowExecutionsRequest method. -// req, resp := client.DescribeMaintenanceWindowExecutionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutions -func (c *SSM) DescribeMaintenanceWindowExecutionsRequest(input *DescribeMaintenanceWindowExecutionsInput) (req *request.Request, output *DescribeMaintenanceWindowExecutionsOutput) { - op := &request.Operation{ - Name: opDescribeMaintenanceWindowExecutions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMaintenanceWindowExecutionsInput{} - } - - output = &DescribeMaintenanceWindowExecutionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMaintenanceWindowExecutions API operation for Amazon Simple Systems Manager (SSM). -// -// Lists the executions of a Maintenance Window. This includes information about -// when the Maintenance Window was scheduled to be active, and information about -// tasks registered and run with the Maintenance Window. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeMaintenanceWindowExecutions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutions -func (c *SSM) DescribeMaintenanceWindowExecutions(input *DescribeMaintenanceWindowExecutionsInput) (*DescribeMaintenanceWindowExecutionsOutput, error) { - req, out := c.DescribeMaintenanceWindowExecutionsRequest(input) - return out, req.Send() -} - -// DescribeMaintenanceWindowExecutionsWithContext is the same as DescribeMaintenanceWindowExecutions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMaintenanceWindowExecutions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeMaintenanceWindowExecutionsWithContext(ctx aws.Context, input *DescribeMaintenanceWindowExecutionsInput, opts ...request.Option) (*DescribeMaintenanceWindowExecutionsOutput, error) { - req, out := c.DescribeMaintenanceWindowExecutionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMaintenanceWindowSchedule = "DescribeMaintenanceWindowSchedule" - -// DescribeMaintenanceWindowScheduleRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMaintenanceWindowSchedule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMaintenanceWindowSchedule for more information on using the DescribeMaintenanceWindowSchedule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMaintenanceWindowScheduleRequest method. -// req, resp := client.DescribeMaintenanceWindowScheduleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowSchedule -func (c *SSM) DescribeMaintenanceWindowScheduleRequest(input *DescribeMaintenanceWindowScheduleInput) (req *request.Request, output *DescribeMaintenanceWindowScheduleOutput) { - op := &request.Operation{ - Name: opDescribeMaintenanceWindowSchedule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMaintenanceWindowScheduleInput{} - } - - output = &DescribeMaintenanceWindowScheduleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMaintenanceWindowSchedule API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves information about upcoming executions of a Maintenance Window. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeMaintenanceWindowSchedule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowSchedule -func (c *SSM) DescribeMaintenanceWindowSchedule(input *DescribeMaintenanceWindowScheduleInput) (*DescribeMaintenanceWindowScheduleOutput, error) { - req, out := c.DescribeMaintenanceWindowScheduleRequest(input) - return out, req.Send() -} - -// DescribeMaintenanceWindowScheduleWithContext is the same as DescribeMaintenanceWindowSchedule with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMaintenanceWindowSchedule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeMaintenanceWindowScheduleWithContext(ctx aws.Context, input *DescribeMaintenanceWindowScheduleInput, opts ...request.Option) (*DescribeMaintenanceWindowScheduleOutput, error) { - req, out := c.DescribeMaintenanceWindowScheduleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMaintenanceWindowTargets = "DescribeMaintenanceWindowTargets" - -// DescribeMaintenanceWindowTargetsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMaintenanceWindowTargets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMaintenanceWindowTargets for more information on using the DescribeMaintenanceWindowTargets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMaintenanceWindowTargetsRequest method. -// req, resp := client.DescribeMaintenanceWindowTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowTargets -func (c *SSM) DescribeMaintenanceWindowTargetsRequest(input *DescribeMaintenanceWindowTargetsInput) (req *request.Request, output *DescribeMaintenanceWindowTargetsOutput) { - op := &request.Operation{ - Name: opDescribeMaintenanceWindowTargets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMaintenanceWindowTargetsInput{} - } - - output = &DescribeMaintenanceWindowTargetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMaintenanceWindowTargets API operation for Amazon Simple Systems Manager (SSM). -// -// Lists the targets registered with the Maintenance Window. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeMaintenanceWindowTargets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowTargets -func (c *SSM) DescribeMaintenanceWindowTargets(input *DescribeMaintenanceWindowTargetsInput) (*DescribeMaintenanceWindowTargetsOutput, error) { - req, out := c.DescribeMaintenanceWindowTargetsRequest(input) - return out, req.Send() -} - -// DescribeMaintenanceWindowTargetsWithContext is the same as DescribeMaintenanceWindowTargets with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMaintenanceWindowTargets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeMaintenanceWindowTargetsWithContext(ctx aws.Context, input *DescribeMaintenanceWindowTargetsInput, opts ...request.Option) (*DescribeMaintenanceWindowTargetsOutput, error) { - req, out := c.DescribeMaintenanceWindowTargetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMaintenanceWindowTasks = "DescribeMaintenanceWindowTasks" - -// DescribeMaintenanceWindowTasksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMaintenanceWindowTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMaintenanceWindowTasks for more information on using the DescribeMaintenanceWindowTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMaintenanceWindowTasksRequest method. -// req, resp := client.DescribeMaintenanceWindowTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowTasks -func (c *SSM) DescribeMaintenanceWindowTasksRequest(input *DescribeMaintenanceWindowTasksInput) (req *request.Request, output *DescribeMaintenanceWindowTasksOutput) { - op := &request.Operation{ - Name: opDescribeMaintenanceWindowTasks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMaintenanceWindowTasksInput{} - } - - output = &DescribeMaintenanceWindowTasksOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMaintenanceWindowTasks API operation for Amazon Simple Systems Manager (SSM). -// -// Lists the tasks in a Maintenance Window. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeMaintenanceWindowTasks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowTasks -func (c *SSM) DescribeMaintenanceWindowTasks(input *DescribeMaintenanceWindowTasksInput) (*DescribeMaintenanceWindowTasksOutput, error) { - req, out := c.DescribeMaintenanceWindowTasksRequest(input) - return out, req.Send() -} - -// DescribeMaintenanceWindowTasksWithContext is the same as DescribeMaintenanceWindowTasks with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMaintenanceWindowTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeMaintenanceWindowTasksWithContext(ctx aws.Context, input *DescribeMaintenanceWindowTasksInput, opts ...request.Option) (*DescribeMaintenanceWindowTasksOutput, error) { - req, out := c.DescribeMaintenanceWindowTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMaintenanceWindows = "DescribeMaintenanceWindows" - -// DescribeMaintenanceWindowsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMaintenanceWindows operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMaintenanceWindows for more information on using the DescribeMaintenanceWindows -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMaintenanceWindowsRequest method. -// req, resp := client.DescribeMaintenanceWindowsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindows -func (c *SSM) DescribeMaintenanceWindowsRequest(input *DescribeMaintenanceWindowsInput) (req *request.Request, output *DescribeMaintenanceWindowsOutput) { - op := &request.Operation{ - Name: opDescribeMaintenanceWindows, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMaintenanceWindowsInput{} - } - - output = &DescribeMaintenanceWindowsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMaintenanceWindows API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves the Maintenance Windows in an AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeMaintenanceWindows for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindows -func (c *SSM) DescribeMaintenanceWindows(input *DescribeMaintenanceWindowsInput) (*DescribeMaintenanceWindowsOutput, error) { - req, out := c.DescribeMaintenanceWindowsRequest(input) - return out, req.Send() -} - -// DescribeMaintenanceWindowsWithContext is the same as DescribeMaintenanceWindows with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMaintenanceWindows for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeMaintenanceWindowsWithContext(ctx aws.Context, input *DescribeMaintenanceWindowsInput, opts ...request.Option) (*DescribeMaintenanceWindowsOutput, error) { - req, out := c.DescribeMaintenanceWindowsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMaintenanceWindowsForTarget = "DescribeMaintenanceWindowsForTarget" - -// DescribeMaintenanceWindowsForTargetRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMaintenanceWindowsForTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMaintenanceWindowsForTarget for more information on using the DescribeMaintenanceWindowsForTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMaintenanceWindowsForTargetRequest method. -// req, resp := client.DescribeMaintenanceWindowsForTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowsForTarget -func (c *SSM) DescribeMaintenanceWindowsForTargetRequest(input *DescribeMaintenanceWindowsForTargetInput) (req *request.Request, output *DescribeMaintenanceWindowsForTargetOutput) { - op := &request.Operation{ - Name: opDescribeMaintenanceWindowsForTarget, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMaintenanceWindowsForTargetInput{} - } - - output = &DescribeMaintenanceWindowsForTargetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMaintenanceWindowsForTarget API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves information about the Maintenance Windows targets or tasks that -// an instance is associated with. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeMaintenanceWindowsForTarget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowsForTarget -func (c *SSM) DescribeMaintenanceWindowsForTarget(input *DescribeMaintenanceWindowsForTargetInput) (*DescribeMaintenanceWindowsForTargetOutput, error) { - req, out := c.DescribeMaintenanceWindowsForTargetRequest(input) - return out, req.Send() -} - -// DescribeMaintenanceWindowsForTargetWithContext is the same as DescribeMaintenanceWindowsForTarget with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMaintenanceWindowsForTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeMaintenanceWindowsForTargetWithContext(ctx aws.Context, input *DescribeMaintenanceWindowsForTargetInput, opts ...request.Option) (*DescribeMaintenanceWindowsForTargetOutput, error) { - req, out := c.DescribeMaintenanceWindowsForTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeParameters = "DescribeParameters" - -// DescribeParametersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeParameters for more information on using the DescribeParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeParametersRequest method. -// req, resp := client.DescribeParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeParameters -func (c *SSM) DescribeParametersRequest(input *DescribeParametersInput) (req *request.Request, output *DescribeParametersOutput) { - op := &request.Operation{ - Name: opDescribeParameters, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeParametersInput{} - } - - output = &DescribeParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeParameters API operation for Amazon Simple Systems Manager (SSM). -// -// Get information about a parameter. -// -// Request results are returned on a best-effort basis. If you specify MaxResults -// in the request, the response includes information up to the limit specified. -// The number of items returned, however, can be between zero and the value -// of MaxResults. If the service reaches an internal limit while processing -// the results, it stops the operation and returns the matching values up to -// that point and a NextToken. You can specify the NextToken in a subsequent -// call to get the next set of results. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidFilterKey "InvalidFilterKey" -// The specified key is not valid. -// -// * ErrCodeInvalidFilterOption "InvalidFilterOption" -// The specified filter option is not valid. Valid options are Equals and BeginsWith. -// For Path filter, valid options are Recursive and OneLevel. -// -// * ErrCodeInvalidFilterValue "InvalidFilterValue" -// The filter value is not valid. Verify the value and try again. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeParameters -func (c *SSM) DescribeParameters(input *DescribeParametersInput) (*DescribeParametersOutput, error) { - req, out := c.DescribeParametersRequest(input) - return out, req.Send() -} - -// DescribeParametersWithContext is the same as DescribeParameters with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeParametersWithContext(ctx aws.Context, input *DescribeParametersInput, opts ...request.Option) (*DescribeParametersOutput, error) { - req, out := c.DescribeParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeParametersPages iterates over the pages of a DescribeParameters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeParameters 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 DescribeParameters operation. -// pageNum := 0 -// err := client.DescribeParametersPages(params, -// func(page *DescribeParametersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SSM) DescribeParametersPages(input *DescribeParametersInput, fn func(*DescribeParametersOutput, bool) bool) error { - return c.DescribeParametersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeParametersPagesWithContext same as DescribeParametersPages 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 *SSM) DescribeParametersPagesWithContext(ctx aws.Context, input *DescribeParametersInput, fn func(*DescribeParametersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeParametersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeParametersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeParametersOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribePatchBaselines = "DescribePatchBaselines" - -// DescribePatchBaselinesRequest generates a "aws/request.Request" representing the -// client's request for the DescribePatchBaselines operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePatchBaselines for more information on using the DescribePatchBaselines -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePatchBaselinesRequest method. -// req, resp := client.DescribePatchBaselinesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchBaselines -func (c *SSM) DescribePatchBaselinesRequest(input *DescribePatchBaselinesInput) (req *request.Request, output *DescribePatchBaselinesOutput) { - op := &request.Operation{ - Name: opDescribePatchBaselines, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePatchBaselinesInput{} - } - - output = &DescribePatchBaselinesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePatchBaselines API operation for Amazon Simple Systems Manager (SSM). -// -// Lists the patch baselines in your AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribePatchBaselines for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchBaselines -func (c *SSM) DescribePatchBaselines(input *DescribePatchBaselinesInput) (*DescribePatchBaselinesOutput, error) { - req, out := c.DescribePatchBaselinesRequest(input) - return out, req.Send() -} - -// DescribePatchBaselinesWithContext is the same as DescribePatchBaselines with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePatchBaselines for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribePatchBaselinesWithContext(ctx aws.Context, input *DescribePatchBaselinesInput, opts ...request.Option) (*DescribePatchBaselinesOutput, error) { - req, out := c.DescribePatchBaselinesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribePatchGroupState = "DescribePatchGroupState" - -// DescribePatchGroupStateRequest generates a "aws/request.Request" representing the -// client's request for the DescribePatchGroupState operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePatchGroupState for more information on using the DescribePatchGroupState -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePatchGroupStateRequest method. -// req, resp := client.DescribePatchGroupStateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchGroupState -func (c *SSM) DescribePatchGroupStateRequest(input *DescribePatchGroupStateInput) (req *request.Request, output *DescribePatchGroupStateOutput) { - op := &request.Operation{ - Name: opDescribePatchGroupState, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePatchGroupStateInput{} - } - - output = &DescribePatchGroupStateOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePatchGroupState API operation for Amazon Simple Systems Manager (SSM). -// -// Returns high-level aggregated patch compliance state for a patch group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribePatchGroupState for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchGroupState -func (c *SSM) DescribePatchGroupState(input *DescribePatchGroupStateInput) (*DescribePatchGroupStateOutput, error) { - req, out := c.DescribePatchGroupStateRequest(input) - return out, req.Send() -} - -// DescribePatchGroupStateWithContext is the same as DescribePatchGroupState with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePatchGroupState for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribePatchGroupStateWithContext(ctx aws.Context, input *DescribePatchGroupStateInput, opts ...request.Option) (*DescribePatchGroupStateOutput, error) { - req, out := c.DescribePatchGroupStateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribePatchGroups = "DescribePatchGroups" - -// DescribePatchGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribePatchGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribePatchGroups for more information on using the DescribePatchGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribePatchGroupsRequest method. -// req, resp := client.DescribePatchGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchGroups -func (c *SSM) DescribePatchGroupsRequest(input *DescribePatchGroupsInput) (req *request.Request, output *DescribePatchGroupsOutput) { - op := &request.Operation{ - Name: opDescribePatchGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribePatchGroupsInput{} - } - - output = &DescribePatchGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribePatchGroups API operation for Amazon Simple Systems Manager (SSM). -// -// Lists all patch groups that have been registered with patch baselines. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribePatchGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchGroups -func (c *SSM) DescribePatchGroups(input *DescribePatchGroupsInput) (*DescribePatchGroupsOutput, error) { - req, out := c.DescribePatchGroupsRequest(input) - return out, req.Send() -} - -// DescribePatchGroupsWithContext is the same as DescribePatchGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribePatchGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribePatchGroupsWithContext(ctx aws.Context, input *DescribePatchGroupsInput, opts ...request.Option) (*DescribePatchGroupsOutput, error) { - req, out := c.DescribePatchGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSessions = "DescribeSessions" - -// DescribeSessionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSessions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSessions for more information on using the DescribeSessions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSessionsRequest method. -// req, resp := client.DescribeSessionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeSessions -func (c *SSM) DescribeSessionsRequest(input *DescribeSessionsInput) (req *request.Request, output *DescribeSessionsOutput) { - op := &request.Operation{ - Name: opDescribeSessions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSessionsInput{} - } - - output = &DescribeSessionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSessions API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves a list of all active sessions (both connected and disconnected) -// or terminated sessions from the past 30 days. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation DescribeSessions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidFilterKey "InvalidFilterKey" -// The specified key is not valid. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeSessions -func (c *SSM) DescribeSessions(input *DescribeSessionsInput) (*DescribeSessionsOutput, error) { - req, out := c.DescribeSessionsRequest(input) - return out, req.Send() -} - -// DescribeSessionsWithContext is the same as DescribeSessions with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSessions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) DescribeSessionsWithContext(ctx aws.Context, input *DescribeSessionsInput, opts ...request.Option) (*DescribeSessionsOutput, error) { - req, out := c.DescribeSessionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAutomationExecution = "GetAutomationExecution" - -// GetAutomationExecutionRequest generates a "aws/request.Request" representing the -// client's request for the GetAutomationExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAutomationExecution for more information on using the GetAutomationExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetAutomationExecutionRequest method. -// req, resp := client.GetAutomationExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetAutomationExecution -func (c *SSM) GetAutomationExecutionRequest(input *GetAutomationExecutionInput) (req *request.Request, output *GetAutomationExecutionOutput) { - op := &request.Operation{ - Name: opGetAutomationExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAutomationExecutionInput{} - } - - output = &GetAutomationExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAutomationExecution API operation for Amazon Simple Systems Manager (SSM). -// -// Get detailed information about a particular Automation execution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetAutomationExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAutomationExecutionNotFoundException "AutomationExecutionNotFoundException" -// There is no automation execution information for the requested automation -// execution ID. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetAutomationExecution -func (c *SSM) GetAutomationExecution(input *GetAutomationExecutionInput) (*GetAutomationExecutionOutput, error) { - req, out := c.GetAutomationExecutionRequest(input) - return out, req.Send() -} - -// GetAutomationExecutionWithContext is the same as GetAutomationExecution with the addition of -// the ability to pass a context and additional request options. -// -// See GetAutomationExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetAutomationExecutionWithContext(ctx aws.Context, input *GetAutomationExecutionInput, opts ...request.Option) (*GetAutomationExecutionOutput, error) { - req, out := c.GetAutomationExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCommandInvocation = "GetCommandInvocation" - -// GetCommandInvocationRequest generates a "aws/request.Request" representing the -// client's request for the GetCommandInvocation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCommandInvocation for more information on using the GetCommandInvocation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetCommandInvocationRequest method. -// req, resp := client.GetCommandInvocationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetCommandInvocation -func (c *SSM) GetCommandInvocationRequest(input *GetCommandInvocationInput) (req *request.Request, output *GetCommandInvocationOutput) { - op := &request.Operation{ - Name: opGetCommandInvocation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCommandInvocationInput{} - } - - output = &GetCommandInvocationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCommandInvocation API operation for Amazon Simple Systems Manager (SSM). -// -// Returns detailed information about command execution for an invocation or -// plugin. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetCommandInvocation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidCommandId "InvalidCommandId" -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeInvalidPluginName "InvalidPluginName" -// The plugin name is not valid. -// -// * ErrCodeInvocationDoesNotExist "InvocationDoesNotExist" -// The command ID and instance ID you specified did not match any invocations. -// Verify the command ID adn the instance ID and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetCommandInvocation -func (c *SSM) GetCommandInvocation(input *GetCommandInvocationInput) (*GetCommandInvocationOutput, error) { - req, out := c.GetCommandInvocationRequest(input) - return out, req.Send() -} - -// GetCommandInvocationWithContext is the same as GetCommandInvocation with the addition of -// the ability to pass a context and additional request options. -// -// See GetCommandInvocation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetCommandInvocationWithContext(ctx aws.Context, input *GetCommandInvocationInput, opts ...request.Option) (*GetCommandInvocationOutput, error) { - req, out := c.GetCommandInvocationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetConnectionStatus = "GetConnectionStatus" - -// GetConnectionStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetConnectionStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetConnectionStatus for more information on using the GetConnectionStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetConnectionStatusRequest method. -// req, resp := client.GetConnectionStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetConnectionStatus -func (c *SSM) GetConnectionStatusRequest(input *GetConnectionStatusInput) (req *request.Request, output *GetConnectionStatusOutput) { - op := &request.Operation{ - Name: opGetConnectionStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetConnectionStatusInput{} - } - - output = &GetConnectionStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetConnectionStatus API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves the Session Manager connection status for an instance to determine -// whether it is connected and ready to receive Session Manager connections. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetConnectionStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetConnectionStatus -func (c *SSM) GetConnectionStatus(input *GetConnectionStatusInput) (*GetConnectionStatusOutput, error) { - req, out := c.GetConnectionStatusRequest(input) - return out, req.Send() -} - -// GetConnectionStatusWithContext is the same as GetConnectionStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetConnectionStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetConnectionStatusWithContext(ctx aws.Context, input *GetConnectionStatusInput, opts ...request.Option) (*GetConnectionStatusOutput, error) { - req, out := c.GetConnectionStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDefaultPatchBaseline = "GetDefaultPatchBaseline" - -// GetDefaultPatchBaselineRequest generates a "aws/request.Request" representing the -// client's request for the GetDefaultPatchBaseline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDefaultPatchBaseline for more information on using the GetDefaultPatchBaseline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDefaultPatchBaselineRequest method. -// req, resp := client.GetDefaultPatchBaselineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDefaultPatchBaseline -func (c *SSM) GetDefaultPatchBaselineRequest(input *GetDefaultPatchBaselineInput) (req *request.Request, output *GetDefaultPatchBaselineOutput) { - op := &request.Operation{ - Name: opGetDefaultPatchBaseline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDefaultPatchBaselineInput{} - } - - output = &GetDefaultPatchBaselineOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDefaultPatchBaseline API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves the default patch baseline. Note that Systems Manager supports -// creating multiple default patch baselines. For example, you can create a -// default patch baseline for each operating system. -// -// If you do not specify an operating system value, the default patch baseline -// for Windows is returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetDefaultPatchBaseline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDefaultPatchBaseline -func (c *SSM) GetDefaultPatchBaseline(input *GetDefaultPatchBaselineInput) (*GetDefaultPatchBaselineOutput, error) { - req, out := c.GetDefaultPatchBaselineRequest(input) - return out, req.Send() -} - -// GetDefaultPatchBaselineWithContext is the same as GetDefaultPatchBaseline with the addition of -// the ability to pass a context and additional request options. -// -// See GetDefaultPatchBaseline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetDefaultPatchBaselineWithContext(ctx aws.Context, input *GetDefaultPatchBaselineInput, opts ...request.Option) (*GetDefaultPatchBaselineOutput, error) { - req, out := c.GetDefaultPatchBaselineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDeployablePatchSnapshotForInstance = "GetDeployablePatchSnapshotForInstance" - -// GetDeployablePatchSnapshotForInstanceRequest generates a "aws/request.Request" representing the -// client's request for the GetDeployablePatchSnapshotForInstance operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDeployablePatchSnapshotForInstance for more information on using the GetDeployablePatchSnapshotForInstance -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDeployablePatchSnapshotForInstanceRequest method. -// req, resp := client.GetDeployablePatchSnapshotForInstanceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDeployablePatchSnapshotForInstance -func (c *SSM) GetDeployablePatchSnapshotForInstanceRequest(input *GetDeployablePatchSnapshotForInstanceInput) (req *request.Request, output *GetDeployablePatchSnapshotForInstanceOutput) { - op := &request.Operation{ - Name: opGetDeployablePatchSnapshotForInstance, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDeployablePatchSnapshotForInstanceInput{} - } - - output = &GetDeployablePatchSnapshotForInstanceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDeployablePatchSnapshotForInstance API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves the current snapshot for the patch baseline the instance uses. -// This API is primarily used by the AWS-RunPatchBaseline Systems Manager document. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetDeployablePatchSnapshotForInstance for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeUnsupportedOperatingSystem "UnsupportedOperatingSystem" -// The operating systems you specified is not supported, or the operation is -// not supported for the operating system. Valid operating systems include: -// Windows, AmazonLinux, RedhatEnterpriseLinux, and Ubuntu. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDeployablePatchSnapshotForInstance -func (c *SSM) GetDeployablePatchSnapshotForInstance(input *GetDeployablePatchSnapshotForInstanceInput) (*GetDeployablePatchSnapshotForInstanceOutput, error) { - req, out := c.GetDeployablePatchSnapshotForInstanceRequest(input) - return out, req.Send() -} - -// GetDeployablePatchSnapshotForInstanceWithContext is the same as GetDeployablePatchSnapshotForInstance with the addition of -// the ability to pass a context and additional request options. -// -// See GetDeployablePatchSnapshotForInstance for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetDeployablePatchSnapshotForInstanceWithContext(ctx aws.Context, input *GetDeployablePatchSnapshotForInstanceInput, opts ...request.Option) (*GetDeployablePatchSnapshotForInstanceOutput, error) { - req, out := c.GetDeployablePatchSnapshotForInstanceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDocument = "GetDocument" - -// GetDocumentRequest generates a "aws/request.Request" representing the -// client's request for the GetDocument operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetDocument for more information on using the GetDocument -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetDocumentRequest method. -// req, resp := client.GetDocumentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDocument -func (c *SSM) GetDocumentRequest(input *GetDocumentInput) (req *request.Request, output *GetDocumentOutput) { - op := &request.Operation{ - Name: opGetDocument, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetDocumentInput{} - } - - output = &GetDocumentOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDocument API operation for Amazon Simple Systems Manager (SSM). -// -// Gets the contents of the specified Systems Manager document. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetDocument for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion" -// The document version is not valid or does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDocument -func (c *SSM) GetDocument(input *GetDocumentInput) (*GetDocumentOutput, error) { - req, out := c.GetDocumentRequest(input) - return out, req.Send() -} - -// GetDocumentWithContext is the same as GetDocument with the addition of -// the ability to pass a context and additional request options. -// -// See GetDocument for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetDocumentWithContext(ctx aws.Context, input *GetDocumentInput, opts ...request.Option) (*GetDocumentOutput, error) { - req, out := c.GetDocumentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInventory = "GetInventory" - -// GetInventoryRequest generates a "aws/request.Request" representing the -// client's request for the GetInventory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInventory for more information on using the GetInventory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInventoryRequest method. -// req, resp := client.GetInventoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetInventory -func (c *SSM) GetInventoryRequest(input *GetInventoryInput) (req *request.Request, output *GetInventoryOutput) { - op := &request.Operation{ - Name: opGetInventory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInventoryInput{} - } - - output = &GetInventoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInventory API operation for Amazon Simple Systems Manager (SSM). -// -// Query inventory information. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetInventory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidFilter "InvalidFilter" -// The filter name is not valid. Verify the you entered the correct name and -// try again. -// -// * ErrCodeInvalidInventoryGroupException "InvalidInventoryGroupException" -// The specified inventory group is not valid. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// * ErrCodeInvalidTypeNameException "InvalidTypeNameException" -// The parameter type name is not valid. -// -// * ErrCodeInvalidAggregatorException "InvalidAggregatorException" -// The specified aggregator is not valid for inventory groups. Verify that the -// aggregator uses a valid inventory type such as AWS:Application or AWS:InstanceInformation. -// -// * ErrCodeInvalidResultAttributeException "InvalidResultAttributeException" -// The specified inventory item result attribute is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetInventory -func (c *SSM) GetInventory(input *GetInventoryInput) (*GetInventoryOutput, error) { - req, out := c.GetInventoryRequest(input) - return out, req.Send() -} - -// GetInventoryWithContext is the same as GetInventory with the addition of -// the ability to pass a context and additional request options. -// -// See GetInventory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetInventoryWithContext(ctx aws.Context, input *GetInventoryInput, opts ...request.Option) (*GetInventoryOutput, error) { - req, out := c.GetInventoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInventorySchema = "GetInventorySchema" - -// GetInventorySchemaRequest generates a "aws/request.Request" representing the -// client's request for the GetInventorySchema operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInventorySchema for more information on using the GetInventorySchema -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetInventorySchemaRequest method. -// req, resp := client.GetInventorySchemaRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetInventorySchema -func (c *SSM) GetInventorySchemaRequest(input *GetInventorySchemaInput) (req *request.Request, output *GetInventorySchemaOutput) { - op := &request.Operation{ - Name: opGetInventorySchema, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInventorySchemaInput{} - } - - output = &GetInventorySchemaOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInventorySchema API operation for Amazon Simple Systems Manager (SSM). -// -// Return a list of inventory type names for the account, or return a list of -// attribute names for a specific Inventory item type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetInventorySchema for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidTypeNameException "InvalidTypeNameException" -// The parameter type name is not valid. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetInventorySchema -func (c *SSM) GetInventorySchema(input *GetInventorySchemaInput) (*GetInventorySchemaOutput, error) { - req, out := c.GetInventorySchemaRequest(input) - return out, req.Send() -} - -// GetInventorySchemaWithContext is the same as GetInventorySchema with the addition of -// the ability to pass a context and additional request options. -// -// See GetInventorySchema for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetInventorySchemaWithContext(ctx aws.Context, input *GetInventorySchemaInput, opts ...request.Option) (*GetInventorySchemaOutput, error) { - req, out := c.GetInventorySchemaRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMaintenanceWindow = "GetMaintenanceWindow" - -// GetMaintenanceWindowRequest generates a "aws/request.Request" representing the -// client's request for the GetMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMaintenanceWindow for more information on using the GetMaintenanceWindow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMaintenanceWindowRequest method. -// req, resp := client.GetMaintenanceWindowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindow -func (c *SSM) GetMaintenanceWindowRequest(input *GetMaintenanceWindowInput) (req *request.Request, output *GetMaintenanceWindowOutput) { - op := &request.Operation{ - Name: opGetMaintenanceWindow, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetMaintenanceWindowInput{} - } - - output = &GetMaintenanceWindowOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves a Maintenance Window. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetMaintenanceWindow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindow -func (c *SSM) GetMaintenanceWindow(input *GetMaintenanceWindowInput) (*GetMaintenanceWindowOutput, error) { - req, out := c.GetMaintenanceWindowRequest(input) - return out, req.Send() -} - -// GetMaintenanceWindowWithContext is the same as GetMaintenanceWindow with the addition of -// the ability to pass a context and additional request options. -// -// See GetMaintenanceWindow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetMaintenanceWindowWithContext(ctx aws.Context, input *GetMaintenanceWindowInput, opts ...request.Option) (*GetMaintenanceWindowOutput, error) { - req, out := c.GetMaintenanceWindowRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMaintenanceWindowExecution = "GetMaintenanceWindowExecution" - -// GetMaintenanceWindowExecutionRequest generates a "aws/request.Request" representing the -// client's request for the GetMaintenanceWindowExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMaintenanceWindowExecution for more information on using the GetMaintenanceWindowExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMaintenanceWindowExecutionRequest method. -// req, resp := client.GetMaintenanceWindowExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecution -func (c *SSM) GetMaintenanceWindowExecutionRequest(input *GetMaintenanceWindowExecutionInput) (req *request.Request, output *GetMaintenanceWindowExecutionOutput) { - op := &request.Operation{ - Name: opGetMaintenanceWindowExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetMaintenanceWindowExecutionInput{} - } - - output = &GetMaintenanceWindowExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMaintenanceWindowExecution API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves details about a specific task executed as part of a Maintenance -// Window execution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetMaintenanceWindowExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecution -func (c *SSM) GetMaintenanceWindowExecution(input *GetMaintenanceWindowExecutionInput) (*GetMaintenanceWindowExecutionOutput, error) { - req, out := c.GetMaintenanceWindowExecutionRequest(input) - return out, req.Send() -} - -// GetMaintenanceWindowExecutionWithContext is the same as GetMaintenanceWindowExecution with the addition of -// the ability to pass a context and additional request options. -// -// See GetMaintenanceWindowExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetMaintenanceWindowExecutionWithContext(ctx aws.Context, input *GetMaintenanceWindowExecutionInput, opts ...request.Option) (*GetMaintenanceWindowExecutionOutput, error) { - req, out := c.GetMaintenanceWindowExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMaintenanceWindowExecutionTask = "GetMaintenanceWindowExecutionTask" - -// GetMaintenanceWindowExecutionTaskRequest generates a "aws/request.Request" representing the -// client's request for the GetMaintenanceWindowExecutionTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMaintenanceWindowExecutionTask for more information on using the GetMaintenanceWindowExecutionTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMaintenanceWindowExecutionTaskRequest method. -// req, resp := client.GetMaintenanceWindowExecutionTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecutionTask -func (c *SSM) GetMaintenanceWindowExecutionTaskRequest(input *GetMaintenanceWindowExecutionTaskInput) (req *request.Request, output *GetMaintenanceWindowExecutionTaskOutput) { - op := &request.Operation{ - Name: opGetMaintenanceWindowExecutionTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetMaintenanceWindowExecutionTaskInput{} - } - - output = &GetMaintenanceWindowExecutionTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMaintenanceWindowExecutionTask API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves the details about a specific task executed as part of a Maintenance -// Window execution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetMaintenanceWindowExecutionTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecutionTask -func (c *SSM) GetMaintenanceWindowExecutionTask(input *GetMaintenanceWindowExecutionTaskInput) (*GetMaintenanceWindowExecutionTaskOutput, error) { - req, out := c.GetMaintenanceWindowExecutionTaskRequest(input) - return out, req.Send() -} - -// GetMaintenanceWindowExecutionTaskWithContext is the same as GetMaintenanceWindowExecutionTask with the addition of -// the ability to pass a context and additional request options. -// -// See GetMaintenanceWindowExecutionTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetMaintenanceWindowExecutionTaskWithContext(ctx aws.Context, input *GetMaintenanceWindowExecutionTaskInput, opts ...request.Option) (*GetMaintenanceWindowExecutionTaskOutput, error) { - req, out := c.GetMaintenanceWindowExecutionTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMaintenanceWindowExecutionTaskInvocation = "GetMaintenanceWindowExecutionTaskInvocation" - -// GetMaintenanceWindowExecutionTaskInvocationRequest generates a "aws/request.Request" representing the -// client's request for the GetMaintenanceWindowExecutionTaskInvocation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMaintenanceWindowExecutionTaskInvocation for more information on using the GetMaintenanceWindowExecutionTaskInvocation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMaintenanceWindowExecutionTaskInvocationRequest method. -// req, resp := client.GetMaintenanceWindowExecutionTaskInvocationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecutionTaskInvocation -func (c *SSM) GetMaintenanceWindowExecutionTaskInvocationRequest(input *GetMaintenanceWindowExecutionTaskInvocationInput) (req *request.Request, output *GetMaintenanceWindowExecutionTaskInvocationOutput) { - op := &request.Operation{ - Name: opGetMaintenanceWindowExecutionTaskInvocation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetMaintenanceWindowExecutionTaskInvocationInput{} - } - - output = &GetMaintenanceWindowExecutionTaskInvocationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMaintenanceWindowExecutionTaskInvocation API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves a task invocation. A task invocation is a specific task executing -// on a specific target. Maintenance Windows report status for all invocations. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetMaintenanceWindowExecutionTaskInvocation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecutionTaskInvocation -func (c *SSM) GetMaintenanceWindowExecutionTaskInvocation(input *GetMaintenanceWindowExecutionTaskInvocationInput) (*GetMaintenanceWindowExecutionTaskInvocationOutput, error) { - req, out := c.GetMaintenanceWindowExecutionTaskInvocationRequest(input) - return out, req.Send() -} - -// GetMaintenanceWindowExecutionTaskInvocationWithContext is the same as GetMaintenanceWindowExecutionTaskInvocation with the addition of -// the ability to pass a context and additional request options. -// -// See GetMaintenanceWindowExecutionTaskInvocation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetMaintenanceWindowExecutionTaskInvocationWithContext(ctx aws.Context, input *GetMaintenanceWindowExecutionTaskInvocationInput, opts ...request.Option) (*GetMaintenanceWindowExecutionTaskInvocationOutput, error) { - req, out := c.GetMaintenanceWindowExecutionTaskInvocationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMaintenanceWindowTask = "GetMaintenanceWindowTask" - -// GetMaintenanceWindowTaskRequest generates a "aws/request.Request" representing the -// client's request for the GetMaintenanceWindowTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMaintenanceWindowTask for more information on using the GetMaintenanceWindowTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetMaintenanceWindowTaskRequest method. -// req, resp := client.GetMaintenanceWindowTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowTask -func (c *SSM) GetMaintenanceWindowTaskRequest(input *GetMaintenanceWindowTaskInput) (req *request.Request, output *GetMaintenanceWindowTaskOutput) { - op := &request.Operation{ - Name: opGetMaintenanceWindowTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetMaintenanceWindowTaskInput{} - } - - output = &GetMaintenanceWindowTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMaintenanceWindowTask API operation for Amazon Simple Systems Manager (SSM). -// -// Lists the tasks in a Maintenance Window. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetMaintenanceWindowTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowTask -func (c *SSM) GetMaintenanceWindowTask(input *GetMaintenanceWindowTaskInput) (*GetMaintenanceWindowTaskOutput, error) { - req, out := c.GetMaintenanceWindowTaskRequest(input) - return out, req.Send() -} - -// GetMaintenanceWindowTaskWithContext is the same as GetMaintenanceWindowTask with the addition of -// the ability to pass a context and additional request options. -// -// See GetMaintenanceWindowTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetMaintenanceWindowTaskWithContext(ctx aws.Context, input *GetMaintenanceWindowTaskInput, opts ...request.Option) (*GetMaintenanceWindowTaskOutput, error) { - req, out := c.GetMaintenanceWindowTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetParameter = "GetParameter" - -// GetParameterRequest generates a "aws/request.Request" representing the -// client's request for the GetParameter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetParameter for more information on using the GetParameter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetParameterRequest method. -// req, resp := client.GetParameterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameter -func (c *SSM) GetParameterRequest(input *GetParameterInput) (req *request.Request, output *GetParameterOutput) { - op := &request.Operation{ - Name: opGetParameter, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetParameterInput{} - } - - output = &GetParameterOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetParameter API operation for Amazon Simple Systems Manager (SSM). -// -// Get information about a parameter by using the parameter name. Don't confuse -// this API action with the GetParameters API action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetParameter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidKeyId "InvalidKeyId" -// The query key ID is not valid. -// -// * ErrCodeParameterNotFound "ParameterNotFound" -// The parameter could not be found. Verify the name and try again. -// -// * ErrCodeParameterVersionNotFound "ParameterVersionNotFound" -// The specified parameter version was not found. Verify the parameter name -// and version, and try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameter -func (c *SSM) GetParameter(input *GetParameterInput) (*GetParameterOutput, error) { - req, out := c.GetParameterRequest(input) - return out, req.Send() -} - -// GetParameterWithContext is the same as GetParameter with the addition of -// the ability to pass a context and additional request options. -// -// See GetParameter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetParameterWithContext(ctx aws.Context, input *GetParameterInput, opts ...request.Option) (*GetParameterOutput, error) { - req, out := c.GetParameterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetParameterHistory = "GetParameterHistory" - -// GetParameterHistoryRequest generates a "aws/request.Request" representing the -// client's request for the GetParameterHistory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetParameterHistory for more information on using the GetParameterHistory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetParameterHistoryRequest method. -// req, resp := client.GetParameterHistoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameterHistory -func (c *SSM) GetParameterHistoryRequest(input *GetParameterHistoryInput) (req *request.Request, output *GetParameterHistoryOutput) { - op := &request.Operation{ - Name: opGetParameterHistory, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetParameterHistoryInput{} - } - - output = &GetParameterHistoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetParameterHistory API operation for Amazon Simple Systems Manager (SSM). -// -// Query a list of all parameters used by the AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetParameterHistory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeParameterNotFound "ParameterNotFound" -// The parameter could not be found. Verify the name and try again. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// * ErrCodeInvalidKeyId "InvalidKeyId" -// The query key ID is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameterHistory -func (c *SSM) GetParameterHistory(input *GetParameterHistoryInput) (*GetParameterHistoryOutput, error) { - req, out := c.GetParameterHistoryRequest(input) - return out, req.Send() -} - -// GetParameterHistoryWithContext is the same as GetParameterHistory with the addition of -// the ability to pass a context and additional request options. -// -// See GetParameterHistory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetParameterHistoryWithContext(ctx aws.Context, input *GetParameterHistoryInput, opts ...request.Option) (*GetParameterHistoryOutput, error) { - req, out := c.GetParameterHistoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetParameterHistoryPages iterates over the pages of a GetParameterHistory operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetParameterHistory 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 GetParameterHistory operation. -// pageNum := 0 -// err := client.GetParameterHistoryPages(params, -// func(page *GetParameterHistoryOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SSM) GetParameterHistoryPages(input *GetParameterHistoryInput, fn func(*GetParameterHistoryOutput, bool) bool) error { - return c.GetParameterHistoryPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetParameterHistoryPagesWithContext same as GetParameterHistoryPages 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 *SSM) GetParameterHistoryPagesWithContext(ctx aws.Context, input *GetParameterHistoryInput, fn func(*GetParameterHistoryOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetParameterHistoryInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetParameterHistoryRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetParameterHistoryOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetParameters = "GetParameters" - -// GetParametersRequest generates a "aws/request.Request" representing the -// client's request for the GetParameters operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetParameters for more information on using the GetParameters -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetParametersRequest method. -// req, resp := client.GetParametersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameters -func (c *SSM) GetParametersRequest(input *GetParametersInput) (req *request.Request, output *GetParametersOutput) { - op := &request.Operation{ - Name: opGetParameters, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetParametersInput{} - } - - output = &GetParametersOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetParameters API operation for Amazon Simple Systems Manager (SSM). -// -// Get details of a parameter. Don't confuse this API action with the GetParameter -// API action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetParameters for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidKeyId "InvalidKeyId" -// The query key ID is not valid. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameters -func (c *SSM) GetParameters(input *GetParametersInput) (*GetParametersOutput, error) { - req, out := c.GetParametersRequest(input) - return out, req.Send() -} - -// GetParametersWithContext is the same as GetParameters with the addition of -// the ability to pass a context and additional request options. -// -// See GetParameters for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetParametersWithContext(ctx aws.Context, input *GetParametersInput, opts ...request.Option) (*GetParametersOutput, error) { - req, out := c.GetParametersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetParametersByPath = "GetParametersByPath" - -// GetParametersByPathRequest generates a "aws/request.Request" representing the -// client's request for the GetParametersByPath operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetParametersByPath for more information on using the GetParametersByPath -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetParametersByPathRequest method. -// req, resp := client.GetParametersByPathRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParametersByPath -func (c *SSM) GetParametersByPathRequest(input *GetParametersByPathInput) (req *request.Request, output *GetParametersByPathOutput) { - op := &request.Operation{ - Name: opGetParametersByPath, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetParametersByPathInput{} - } - - output = &GetParametersByPathOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetParametersByPath API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieve parameters in a specific hierarchy. For more information, see Working -// with Systems Manager Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html) -// in the AWS Systems Manager User Guide. -// -// Request results are returned on a best-effort basis. If you specify MaxResults -// in the request, the response includes information up to the limit specified. -// The number of items returned, however, can be between zero and the value -// of MaxResults. If the service reaches an internal limit while processing -// the results, it stops the operation and returns the matching values up to -// that point and a NextToken. You can specify the NextToken in a subsequent -// call to get the next set of results. -// -// This API action doesn't support filtering by tags. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetParametersByPath for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidFilterKey "InvalidFilterKey" -// The specified key is not valid. -// -// * ErrCodeInvalidFilterOption "InvalidFilterOption" -// The specified filter option is not valid. Valid options are Equals and BeginsWith. -// For Path filter, valid options are Recursive and OneLevel. -// -// * ErrCodeInvalidFilterValue "InvalidFilterValue" -// The filter value is not valid. Verify the value and try again. -// -// * ErrCodeInvalidKeyId "InvalidKeyId" -// The query key ID is not valid. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParametersByPath -func (c *SSM) GetParametersByPath(input *GetParametersByPathInput) (*GetParametersByPathOutput, error) { - req, out := c.GetParametersByPathRequest(input) - return out, req.Send() -} - -// GetParametersByPathWithContext is the same as GetParametersByPath with the addition of -// the ability to pass a context and additional request options. -// -// See GetParametersByPath for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetParametersByPathWithContext(ctx aws.Context, input *GetParametersByPathInput, opts ...request.Option) (*GetParametersByPathOutput, error) { - req, out := c.GetParametersByPathRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetParametersByPathPages iterates over the pages of a GetParametersByPath operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetParametersByPath 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 GetParametersByPath operation. -// pageNum := 0 -// err := client.GetParametersByPathPages(params, -// func(page *GetParametersByPathOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SSM) GetParametersByPathPages(input *GetParametersByPathInput, fn func(*GetParametersByPathOutput, bool) bool) error { - return c.GetParametersByPathPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetParametersByPathPagesWithContext same as GetParametersByPathPages 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 *SSM) GetParametersByPathPagesWithContext(ctx aws.Context, input *GetParametersByPathInput, fn func(*GetParametersByPathOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetParametersByPathInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetParametersByPathRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetParametersByPathOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opGetPatchBaseline = "GetPatchBaseline" - -// GetPatchBaselineRequest generates a "aws/request.Request" representing the -// client's request for the GetPatchBaseline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPatchBaseline for more information on using the GetPatchBaseline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPatchBaselineRequest method. -// req, resp := client.GetPatchBaselineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetPatchBaseline -func (c *SSM) GetPatchBaselineRequest(input *GetPatchBaselineInput) (req *request.Request, output *GetPatchBaselineOutput) { - op := &request.Operation{ - Name: opGetPatchBaseline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPatchBaselineInput{} - } - - output = &GetPatchBaselineOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPatchBaseline API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves information about a patch baseline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetPatchBaseline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInvalidResourceId "InvalidResourceId" -// The resource ID is not valid. Verify that you entered the correct ID and -// try again. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetPatchBaseline -func (c *SSM) GetPatchBaseline(input *GetPatchBaselineInput) (*GetPatchBaselineOutput, error) { - req, out := c.GetPatchBaselineRequest(input) - return out, req.Send() -} - -// GetPatchBaselineWithContext is the same as GetPatchBaseline with the addition of -// the ability to pass a context and additional request options. -// -// See GetPatchBaseline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetPatchBaselineWithContext(ctx aws.Context, input *GetPatchBaselineInput, opts ...request.Option) (*GetPatchBaselineOutput, error) { - req, out := c.GetPatchBaselineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPatchBaselineForPatchGroup = "GetPatchBaselineForPatchGroup" - -// GetPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the -// client's request for the GetPatchBaselineForPatchGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPatchBaselineForPatchGroup for more information on using the GetPatchBaselineForPatchGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPatchBaselineForPatchGroupRequest method. -// req, resp := client.GetPatchBaselineForPatchGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetPatchBaselineForPatchGroup -func (c *SSM) GetPatchBaselineForPatchGroupRequest(input *GetPatchBaselineForPatchGroupInput) (req *request.Request, output *GetPatchBaselineForPatchGroupOutput) { - op := &request.Operation{ - Name: opGetPatchBaselineForPatchGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPatchBaselineForPatchGroupInput{} - } - - output = &GetPatchBaselineForPatchGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPatchBaselineForPatchGroup API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves the patch baseline that should be used for the specified patch -// group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation GetPatchBaselineForPatchGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetPatchBaselineForPatchGroup -func (c *SSM) GetPatchBaselineForPatchGroup(input *GetPatchBaselineForPatchGroupInput) (*GetPatchBaselineForPatchGroupOutput, error) { - req, out := c.GetPatchBaselineForPatchGroupRequest(input) - return out, req.Send() -} - -// GetPatchBaselineForPatchGroupWithContext is the same as GetPatchBaselineForPatchGroup with the addition of -// the ability to pass a context and additional request options. -// -// See GetPatchBaselineForPatchGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) GetPatchBaselineForPatchGroupWithContext(ctx aws.Context, input *GetPatchBaselineForPatchGroupInput, opts ...request.Option) (*GetPatchBaselineForPatchGroupOutput, error) { - req, out := c.GetPatchBaselineForPatchGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opLabelParameterVersion = "LabelParameterVersion" - -// LabelParameterVersionRequest generates a "aws/request.Request" representing the -// client's request for the LabelParameterVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See LabelParameterVersion for more information on using the LabelParameterVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the LabelParameterVersionRequest method. -// req, resp := client.LabelParameterVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/LabelParameterVersion -func (c *SSM) LabelParameterVersionRequest(input *LabelParameterVersionInput) (req *request.Request, output *LabelParameterVersionOutput) { - op := &request.Operation{ - Name: opLabelParameterVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &LabelParameterVersionInput{} - } - - output = &LabelParameterVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// LabelParameterVersion API operation for Amazon Simple Systems Manager (SSM). -// -// A parameter label is a user-defined alias to help you manage different versions -// of a parameter. When you modify a parameter, Systems Manager automatically -// saves a new version and increments the version number by one. A label can -// help you remember the purpose of a parameter when there are multiple versions. -// -// Parameter labels have the following requirements and restrictions. -// -// * A version of a parameter can have a maximum of 10 labels. -// -// * You can't attach the same label to different versions of the same parameter. -// For example, if version 1 has the label Production, then you can't attach -// Production to version 2. -// -// * You can move a label from one version of a parameter to another. -// -// * You can't create a label when you create a new parameter. You must attach -// a label to a specific version of a parameter. -// -// * You can't delete a parameter label. If you no longer want to use a parameter -// label, then you must move it to a different version of a parameter. -// -// * A label can have a maximum of 100 characters. -// -// * Labels can contain letters (case sensitive), numbers, periods (.), hyphens -// (-), or underscores (_). -// -// * Labels can't begin with a number, "aws," or "ssm" (not case sensitive). -// If a label fails to meet these requirements, then the label is not associated -// with a parameter and the system displays it in the list of InvalidLabels. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation LabelParameterVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeTooManyUpdates "TooManyUpdates" -// There are concurrent updates for a resource that supports one update at a -// time. -// -// * ErrCodeParameterNotFound "ParameterNotFound" -// The parameter could not be found. Verify the name and try again. -// -// * ErrCodeParameterVersionNotFound "ParameterVersionNotFound" -// The specified parameter version was not found. Verify the parameter name -// and version, and try again. -// -// * ErrCodeParameterVersionLabelLimitExceeded "ParameterVersionLabelLimitExceeded" -// A parameter version can have a maximum of ten labels. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/LabelParameterVersion -func (c *SSM) LabelParameterVersion(input *LabelParameterVersionInput) (*LabelParameterVersionOutput, error) { - req, out := c.LabelParameterVersionRequest(input) - return out, req.Send() -} - -// LabelParameterVersionWithContext is the same as LabelParameterVersion with the addition of -// the ability to pass a context and additional request options. -// -// See LabelParameterVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) LabelParameterVersionWithContext(ctx aws.Context, input *LabelParameterVersionInput, opts ...request.Option) (*LabelParameterVersionOutput, error) { - req, out := c.LabelParameterVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAssociationVersions = "ListAssociationVersions" - -// ListAssociationVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListAssociationVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAssociationVersions for more information on using the ListAssociationVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAssociationVersionsRequest method. -// req, resp := client.ListAssociationVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListAssociationVersions -func (c *SSM) ListAssociationVersionsRequest(input *ListAssociationVersionsInput) (req *request.Request, output *ListAssociationVersionsOutput) { - op := &request.Operation{ - Name: opListAssociationVersions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListAssociationVersionsInput{} - } - - output = &ListAssociationVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAssociationVersions API operation for Amazon Simple Systems Manager (SSM). -// -// Retrieves all versions of an association for a specific association ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation ListAssociationVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist" -// The specified association does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListAssociationVersions -func (c *SSM) ListAssociationVersions(input *ListAssociationVersionsInput) (*ListAssociationVersionsOutput, error) { - req, out := c.ListAssociationVersionsRequest(input) - return out, req.Send() -} - -// ListAssociationVersionsWithContext is the same as ListAssociationVersions with the addition of -// the ability to pass a context and additional request options. -// -// See ListAssociationVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) ListAssociationVersionsWithContext(ctx aws.Context, input *ListAssociationVersionsInput, opts ...request.Option) (*ListAssociationVersionsOutput, error) { - req, out := c.ListAssociationVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAssociations = "ListAssociations" - -// ListAssociationsRequest generates a "aws/request.Request" representing the -// client's request for the ListAssociations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAssociations for more information on using the ListAssociations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAssociationsRequest method. -// req, resp := client.ListAssociationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListAssociations -func (c *SSM) ListAssociationsRequest(input *ListAssociationsInput) (req *request.Request, output *ListAssociationsOutput) { - op := &request.Operation{ - Name: opListAssociations, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListAssociationsInput{} - } - - output = &ListAssociationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAssociations API operation for Amazon Simple Systems Manager (SSM). -// -// Lists the associations for the specified Systems Manager document or instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation ListAssociations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListAssociations -func (c *SSM) ListAssociations(input *ListAssociationsInput) (*ListAssociationsOutput, error) { - req, out := c.ListAssociationsRequest(input) - return out, req.Send() -} - -// ListAssociationsWithContext is the same as ListAssociations with the addition of -// the ability to pass a context and additional request options. -// -// See ListAssociations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) ListAssociationsWithContext(ctx aws.Context, input *ListAssociationsInput, opts ...request.Option) (*ListAssociationsOutput, error) { - req, out := c.ListAssociationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAssociationsPages iterates over the pages of a ListAssociations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAssociations 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 ListAssociations operation. -// pageNum := 0 -// err := client.ListAssociationsPages(params, -// func(page *ListAssociationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SSM) ListAssociationsPages(input *ListAssociationsInput, fn func(*ListAssociationsOutput, bool) bool) error { - return c.ListAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAssociationsPagesWithContext same as ListAssociationsPages 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 *SSM) ListAssociationsPagesWithContext(ctx aws.Context, input *ListAssociationsInput, fn func(*ListAssociationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAssociationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAssociationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAssociationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListCommandInvocations = "ListCommandInvocations" - -// ListCommandInvocationsRequest generates a "aws/request.Request" representing the -// client's request for the ListCommandInvocations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListCommandInvocations for more information on using the ListCommandInvocations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListCommandInvocationsRequest method. -// req, resp := client.ListCommandInvocationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListCommandInvocations -func (c *SSM) ListCommandInvocationsRequest(input *ListCommandInvocationsInput) (req *request.Request, output *ListCommandInvocationsOutput) { - op := &request.Operation{ - Name: opListCommandInvocations, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListCommandInvocationsInput{} - } - - output = &ListCommandInvocationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCommandInvocations API operation for Amazon Simple Systems Manager (SSM). -// -// An invocation is copy of a command sent to a specific instance. A command -// can apply to one or more instances. A command invocation applies to one instance. -// For example, if a user executes SendCommand against three instances, then -// a command invocation is created for each requested instance ID. ListCommandInvocations -// provide status about command execution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation ListCommandInvocations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidCommandId "InvalidCommandId" -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeInvalidFilterKey "InvalidFilterKey" -// The specified key is not valid. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListCommandInvocations -func (c *SSM) ListCommandInvocations(input *ListCommandInvocationsInput) (*ListCommandInvocationsOutput, error) { - req, out := c.ListCommandInvocationsRequest(input) - return out, req.Send() -} - -// ListCommandInvocationsWithContext is the same as ListCommandInvocations with the addition of -// the ability to pass a context and additional request options. -// -// See ListCommandInvocations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) ListCommandInvocationsWithContext(ctx aws.Context, input *ListCommandInvocationsInput, opts ...request.Option) (*ListCommandInvocationsOutput, error) { - req, out := c.ListCommandInvocationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListCommandInvocationsPages iterates over the pages of a ListCommandInvocations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListCommandInvocations 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 ListCommandInvocations operation. -// pageNum := 0 -// err := client.ListCommandInvocationsPages(params, -// func(page *ListCommandInvocationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SSM) ListCommandInvocationsPages(input *ListCommandInvocationsInput, fn func(*ListCommandInvocationsOutput, bool) bool) error { - return c.ListCommandInvocationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListCommandInvocationsPagesWithContext same as ListCommandInvocationsPages 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 *SSM) ListCommandInvocationsPagesWithContext(ctx aws.Context, input *ListCommandInvocationsInput, fn func(*ListCommandInvocationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListCommandInvocationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListCommandInvocationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCommandInvocationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListCommands = "ListCommands" - -// ListCommandsRequest generates a "aws/request.Request" representing the -// client's request for the ListCommands operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListCommands for more information on using the ListCommands -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListCommandsRequest method. -// req, resp := client.ListCommandsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListCommands -func (c *SSM) ListCommandsRequest(input *ListCommandsInput) (req *request.Request, output *ListCommandsOutput) { - op := &request.Operation{ - Name: opListCommands, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListCommandsInput{} - } - - output = &ListCommandsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCommands API operation for Amazon Simple Systems Manager (SSM). -// -// Lists the commands requested by users of the AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation ListCommands for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidCommandId "InvalidCommandId" -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeInvalidFilterKey "InvalidFilterKey" -// The specified key is not valid. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListCommands -func (c *SSM) ListCommands(input *ListCommandsInput) (*ListCommandsOutput, error) { - req, out := c.ListCommandsRequest(input) - return out, req.Send() -} - -// ListCommandsWithContext is the same as ListCommands with the addition of -// the ability to pass a context and additional request options. -// -// See ListCommands for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) ListCommandsWithContext(ctx aws.Context, input *ListCommandsInput, opts ...request.Option) (*ListCommandsOutput, error) { - req, out := c.ListCommandsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListCommandsPages iterates over the pages of a ListCommands operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListCommands 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 ListCommands operation. -// pageNum := 0 -// err := client.ListCommandsPages(params, -// func(page *ListCommandsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SSM) ListCommandsPages(input *ListCommandsInput, fn func(*ListCommandsOutput, bool) bool) error { - return c.ListCommandsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListCommandsPagesWithContext same as ListCommandsPages 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 *SSM) ListCommandsPagesWithContext(ctx aws.Context, input *ListCommandsInput, fn func(*ListCommandsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListCommandsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListCommandsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCommandsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListComplianceItems = "ListComplianceItems" - -// ListComplianceItemsRequest generates a "aws/request.Request" representing the -// client's request for the ListComplianceItems operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListComplianceItems for more information on using the ListComplianceItems -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListComplianceItemsRequest method. -// req, resp := client.ListComplianceItemsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListComplianceItems -func (c *SSM) ListComplianceItemsRequest(input *ListComplianceItemsInput) (req *request.Request, output *ListComplianceItemsOutput) { - op := &request.Operation{ - Name: opListComplianceItems, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListComplianceItemsInput{} - } - - output = &ListComplianceItemsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListComplianceItems API operation for Amazon Simple Systems Manager (SSM). -// -// For a specified resource ID, this API action returns a list of compliance -// statuses for different resource types. Currently, you can only specify one -// resource ID per call. List results depend on the criteria specified in the -// filter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation ListComplianceItems for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceType "InvalidResourceType" -// The resource type is not valid. For example, if you are attempting to tag -// an instance, the instance must be a registered, managed instance. -// -// * ErrCodeInvalidResourceId "InvalidResourceId" -// The resource ID is not valid. Verify that you entered the correct ID and -// try again. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidFilter "InvalidFilter" -// The filter name is not valid. Verify the you entered the correct name and -// try again. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListComplianceItems -func (c *SSM) ListComplianceItems(input *ListComplianceItemsInput) (*ListComplianceItemsOutput, error) { - req, out := c.ListComplianceItemsRequest(input) - return out, req.Send() -} - -// ListComplianceItemsWithContext is the same as ListComplianceItems with the addition of -// the ability to pass a context and additional request options. -// -// See ListComplianceItems for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) ListComplianceItemsWithContext(ctx aws.Context, input *ListComplianceItemsInput, opts ...request.Option) (*ListComplianceItemsOutput, error) { - req, out := c.ListComplianceItemsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListComplianceSummaries = "ListComplianceSummaries" - -// ListComplianceSummariesRequest generates a "aws/request.Request" representing the -// client's request for the ListComplianceSummaries operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListComplianceSummaries for more information on using the ListComplianceSummaries -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListComplianceSummariesRequest method. -// req, resp := client.ListComplianceSummariesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListComplianceSummaries -func (c *SSM) ListComplianceSummariesRequest(input *ListComplianceSummariesInput) (req *request.Request, output *ListComplianceSummariesOutput) { - op := &request.Operation{ - Name: opListComplianceSummaries, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListComplianceSummariesInput{} - } - - output = &ListComplianceSummariesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListComplianceSummaries API operation for Amazon Simple Systems Manager (SSM). -// -// Returns a summary count of compliant and non-compliant resources for a compliance -// type. For example, this call can return State Manager associations, patches, -// or custom compliance types according to the filter criteria that you specify. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation ListComplianceSummaries for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidFilter "InvalidFilter" -// The filter name is not valid. Verify the you entered the correct name and -// try again. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListComplianceSummaries -func (c *SSM) ListComplianceSummaries(input *ListComplianceSummariesInput) (*ListComplianceSummariesOutput, error) { - req, out := c.ListComplianceSummariesRequest(input) - return out, req.Send() -} - -// ListComplianceSummariesWithContext is the same as ListComplianceSummaries with the addition of -// the ability to pass a context and additional request options. -// -// See ListComplianceSummaries for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) ListComplianceSummariesWithContext(ctx aws.Context, input *ListComplianceSummariesInput, opts ...request.Option) (*ListComplianceSummariesOutput, error) { - req, out := c.ListComplianceSummariesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDocumentVersions = "ListDocumentVersions" - -// ListDocumentVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListDocumentVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDocumentVersions for more information on using the ListDocumentVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDocumentVersionsRequest method. -// req, resp := client.ListDocumentVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListDocumentVersions -func (c *SSM) ListDocumentVersionsRequest(input *ListDocumentVersionsInput) (req *request.Request, output *ListDocumentVersionsOutput) { - op := &request.Operation{ - Name: opListDocumentVersions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListDocumentVersionsInput{} - } - - output = &ListDocumentVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDocumentVersions API operation for Amazon Simple Systems Manager (SSM). -// -// List all versions for a document. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation ListDocumentVersions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListDocumentVersions -func (c *SSM) ListDocumentVersions(input *ListDocumentVersionsInput) (*ListDocumentVersionsOutput, error) { - req, out := c.ListDocumentVersionsRequest(input) - return out, req.Send() -} - -// ListDocumentVersionsWithContext is the same as ListDocumentVersions with the addition of -// the ability to pass a context and additional request options. -// -// See ListDocumentVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) ListDocumentVersionsWithContext(ctx aws.Context, input *ListDocumentVersionsInput, opts ...request.Option) (*ListDocumentVersionsOutput, error) { - req, out := c.ListDocumentVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDocuments = "ListDocuments" - -// ListDocumentsRequest generates a "aws/request.Request" representing the -// client's request for the ListDocuments operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDocuments for more information on using the ListDocuments -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDocumentsRequest method. -// req, resp := client.ListDocumentsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListDocuments -func (c *SSM) ListDocumentsRequest(input *ListDocumentsInput) (req *request.Request, output *ListDocumentsOutput) { - op := &request.Operation{ - Name: opListDocuments, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListDocumentsInput{} - } - - output = &ListDocumentsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDocuments API operation for Amazon Simple Systems Manager (SSM). -// -// Describes one or more of your Systems Manager documents. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation ListDocuments for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// * ErrCodeInvalidFilterKey "InvalidFilterKey" -// The specified key is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListDocuments -func (c *SSM) ListDocuments(input *ListDocumentsInput) (*ListDocumentsOutput, error) { - req, out := c.ListDocumentsRequest(input) - return out, req.Send() -} - -// ListDocumentsWithContext is the same as ListDocuments with the addition of -// the ability to pass a context and additional request options. -// -// See ListDocuments for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) ListDocumentsWithContext(ctx aws.Context, input *ListDocumentsInput, opts ...request.Option) (*ListDocumentsOutput, error) { - req, out := c.ListDocumentsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListDocumentsPages iterates over the pages of a ListDocuments operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDocuments 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 ListDocuments operation. -// pageNum := 0 -// err := client.ListDocumentsPages(params, -// func(page *ListDocumentsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SSM) ListDocumentsPages(input *ListDocumentsInput, fn func(*ListDocumentsOutput, bool) bool) error { - return c.ListDocumentsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDocumentsPagesWithContext same as ListDocumentsPages 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 *SSM) ListDocumentsPagesWithContext(ctx aws.Context, input *ListDocumentsInput, fn func(*ListDocumentsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDocumentsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDocumentsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDocumentsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListInventoryEntries = "ListInventoryEntries" - -// ListInventoryEntriesRequest generates a "aws/request.Request" representing the -// client's request for the ListInventoryEntries operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListInventoryEntries for more information on using the ListInventoryEntries -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListInventoryEntriesRequest method. -// req, resp := client.ListInventoryEntriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListInventoryEntries -func (c *SSM) ListInventoryEntriesRequest(input *ListInventoryEntriesInput) (req *request.Request, output *ListInventoryEntriesOutput) { - op := &request.Operation{ - Name: opListInventoryEntries, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListInventoryEntriesInput{} - } - - output = &ListInventoryEntriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInventoryEntries API operation for Amazon Simple Systems Manager (SSM). -// -// A list of inventory items returned by the request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation ListInventoryEntries for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeInvalidTypeNameException "InvalidTypeNameException" -// The parameter type name is not valid. -// -// * ErrCodeInvalidFilter "InvalidFilter" -// The filter name is not valid. Verify the you entered the correct name and -// try again. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListInventoryEntries -func (c *SSM) ListInventoryEntries(input *ListInventoryEntriesInput) (*ListInventoryEntriesOutput, error) { - req, out := c.ListInventoryEntriesRequest(input) - return out, req.Send() -} - -// ListInventoryEntriesWithContext is the same as ListInventoryEntries with the addition of -// the ability to pass a context and additional request options. -// -// See ListInventoryEntries for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) ListInventoryEntriesWithContext(ctx aws.Context, input *ListInventoryEntriesInput, opts ...request.Option) (*ListInventoryEntriesOutput, error) { - req, out := c.ListInventoryEntriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListResourceComplianceSummaries = "ListResourceComplianceSummaries" - -// ListResourceComplianceSummariesRequest generates a "aws/request.Request" representing the -// client's request for the ListResourceComplianceSummaries operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResourceComplianceSummaries for more information on using the ListResourceComplianceSummaries -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResourceComplianceSummariesRequest method. -// req, resp := client.ListResourceComplianceSummariesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListResourceComplianceSummaries -func (c *SSM) ListResourceComplianceSummariesRequest(input *ListResourceComplianceSummariesInput) (req *request.Request, output *ListResourceComplianceSummariesOutput) { - op := &request.Operation{ - Name: opListResourceComplianceSummaries, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListResourceComplianceSummariesInput{} - } - - output = &ListResourceComplianceSummariesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResourceComplianceSummaries API operation for Amazon Simple Systems Manager (SSM). -// -// Returns a resource-level summary count. The summary includes information -// about compliant and non-compliant statuses and detailed compliance-item severity -// counts, according to the filter criteria you specify. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation ListResourceComplianceSummaries for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidFilter "InvalidFilter" -// The filter name is not valid. Verify the you entered the correct name and -// try again. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListResourceComplianceSummaries -func (c *SSM) ListResourceComplianceSummaries(input *ListResourceComplianceSummariesInput) (*ListResourceComplianceSummariesOutput, error) { - req, out := c.ListResourceComplianceSummariesRequest(input) - return out, req.Send() -} - -// ListResourceComplianceSummariesWithContext is the same as ListResourceComplianceSummaries with the addition of -// the ability to pass a context and additional request options. -// -// See ListResourceComplianceSummaries for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) ListResourceComplianceSummariesWithContext(ctx aws.Context, input *ListResourceComplianceSummariesInput, opts ...request.Option) (*ListResourceComplianceSummariesOutput, error) { - req, out := c.ListResourceComplianceSummariesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListResourceDataSync = "ListResourceDataSync" - -// ListResourceDataSyncRequest generates a "aws/request.Request" representing the -// client's request for the ListResourceDataSync operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResourceDataSync for more information on using the ListResourceDataSync -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResourceDataSyncRequest method. -// req, resp := client.ListResourceDataSyncRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListResourceDataSync -func (c *SSM) ListResourceDataSyncRequest(input *ListResourceDataSyncInput) (req *request.Request, output *ListResourceDataSyncOutput) { - op := &request.Operation{ - Name: opListResourceDataSync, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListResourceDataSyncInput{} - } - - output = &ListResourceDataSyncOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResourceDataSync API operation for Amazon Simple Systems Manager (SSM). -// -// Lists your resource data sync configurations. Includes information about -// the last time a sync attempted to start, the last sync status, and the last -// time a sync successfully completed. -// -// The number of sync configurations might be too large to return using a single -// call to ListResourceDataSync. You can limit the number of sync configurations -// returned by using the MaxResults parameter. To determine whether there are -// more sync configurations to list, check the value of NextToken in the output. -// If there are more sync configurations to list, you can request them by specifying -// the NextToken returned in the call to the parameter of a subsequent call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation ListResourceDataSync for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidNextToken "InvalidNextToken" -// The specified token is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListResourceDataSync -func (c *SSM) ListResourceDataSync(input *ListResourceDataSyncInput) (*ListResourceDataSyncOutput, error) { - req, out := c.ListResourceDataSyncRequest(input) - return out, req.Send() -} - -// ListResourceDataSyncWithContext is the same as ListResourceDataSync with the addition of -// the ability to pass a context and additional request options. -// -// See ListResourceDataSync for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) ListResourceDataSyncWithContext(ctx aws.Context, input *ListResourceDataSyncInput, opts ...request.Option) (*ListResourceDataSyncOutput, error) { - req, out := c.ListResourceDataSyncRequest(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/ssm-2014-11-06/ListTagsForResource -func (c *SSM) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for Amazon Simple Systems Manager (SSM). -// -// Returns a list of the tags assigned to the specified resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceType "InvalidResourceType" -// The resource type is not valid. For example, if you are attempting to tag -// an instance, the instance must be a registered, managed instance. -// -// * ErrCodeInvalidResourceId "InvalidResourceId" -// The resource ID is not valid. Verify that you entered the correct ID and -// try again. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListTagsForResource -func (c *SSM) 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 *SSM) 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 opModifyDocumentPermission = "ModifyDocumentPermission" - -// ModifyDocumentPermissionRequest generates a "aws/request.Request" representing the -// client's request for the ModifyDocumentPermission operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyDocumentPermission for more information on using the ModifyDocumentPermission -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyDocumentPermissionRequest method. -// req, resp := client.ModifyDocumentPermissionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ModifyDocumentPermission -func (c *SSM) ModifyDocumentPermissionRequest(input *ModifyDocumentPermissionInput) (req *request.Request, output *ModifyDocumentPermissionOutput) { - op := &request.Operation{ - Name: opModifyDocumentPermission, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyDocumentPermissionInput{} - } - - output = &ModifyDocumentPermissionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyDocumentPermission API operation for Amazon Simple Systems Manager (SSM). -// -// Shares a Systems Manager document publicly or privately. If you share a document -// privately, you must specify the AWS user account IDs for those people who -// can use the document. If you share a document publicly, you must specify -// All as the account ID. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation ModifyDocumentPermission for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeInvalidPermissionType "InvalidPermissionType" -// The permission type is not supported. Share is the only supported permission -// type. -// -// * ErrCodeDocumentPermissionLimit "DocumentPermissionLimit" -// The document cannot be shared with more AWS user accounts. You can share -// a document with a maximum of 20 accounts. You can publicly share up to five -// documents. If you need to increase this limit, contact AWS Support. -// -// * ErrCodeDocumentLimitExceeded "DocumentLimitExceeded" -// You can have at most 200 active Systems Manager documents. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ModifyDocumentPermission -func (c *SSM) ModifyDocumentPermission(input *ModifyDocumentPermissionInput) (*ModifyDocumentPermissionOutput, error) { - req, out := c.ModifyDocumentPermissionRequest(input) - return out, req.Send() -} - -// ModifyDocumentPermissionWithContext is the same as ModifyDocumentPermission with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyDocumentPermission for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) ModifyDocumentPermissionWithContext(ctx aws.Context, input *ModifyDocumentPermissionInput, opts ...request.Option) (*ModifyDocumentPermissionOutput, error) { - req, out := c.ModifyDocumentPermissionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutComplianceItems = "PutComplianceItems" - -// PutComplianceItemsRequest generates a "aws/request.Request" representing the -// client's request for the PutComplianceItems operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutComplianceItems for more information on using the PutComplianceItems -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutComplianceItemsRequest method. -// req, resp := client.PutComplianceItemsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutComplianceItems -func (c *SSM) PutComplianceItemsRequest(input *PutComplianceItemsInput) (req *request.Request, output *PutComplianceItemsOutput) { - op := &request.Operation{ - Name: opPutComplianceItems, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutComplianceItemsInput{} - } - - output = &PutComplianceItemsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutComplianceItems API operation for Amazon Simple Systems Manager (SSM). -// -// Registers a compliance type and other compliance details on a designated -// resource. This action lets you register custom compliance details with a -// resource. This call overwrites existing compliance information on the resource, -// so you must provide a full list of compliance items each time that you send -// the request. -// -// ComplianceType can be one of the following: -// -// * ExecutionId: The execution ID when the patch, association, or custom -// compliance item was applied. -// -// * ExecutionType: Specify patch, association, or Custom:string. -// -// * ExecutionTime. The time the patch, association, or custom compliance -// item was applied to the instance. -// -// * Id: The patch, association, or custom compliance ID. -// -// * Title: A title. -// -// * Status: The status of the compliance item. For example, approved for -// patches, or Failed for associations. -// -// * Severity: A patch severity. For example, critical. -// -// * DocumentName: A SSM document name. For example, AWS-RunPatchBaseline. -// -// * DocumentVersion: An SSM document version number. For example, 4. -// -// * Classification: A patch classification. For example, security updates. -// -// * PatchBaselineId: A patch baseline ID. -// -// * PatchSeverity: A patch severity. For example, Critical. -// -// * PatchState: A patch state. For example, InstancesWithFailedPatches. -// -// * PatchGroup: The name of a patch group. -// -// * InstalledTime: The time the association, patch, or custom compliance -// item was applied to the resource. Specify the time by using the following -// format: yyyy-MM-dd'T'HH:mm:ss'Z' -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation PutComplianceItems for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidItemContentException "InvalidItemContentException" -// One or more content items is not valid. -// -// * ErrCodeTotalSizeLimitExceededException "TotalSizeLimitExceededException" -// The size of inventory data has exceeded the total size limit for the resource. -// -// * ErrCodeItemSizeLimitExceededException "ItemSizeLimitExceededException" -// The inventory item size has exceeded the size limit. -// -// * ErrCodeComplianceTypeCountLimitExceededException "ComplianceTypeCountLimitExceededException" -// You specified too many custom compliance types. You can specify a maximum -// of 10 different types. -// -// * ErrCodeInvalidResourceType "InvalidResourceType" -// The resource type is not valid. For example, if you are attempting to tag -// an instance, the instance must be a registered, managed instance. -// -// * ErrCodeInvalidResourceId "InvalidResourceId" -// The resource ID is not valid. Verify that you entered the correct ID and -// try again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutComplianceItems -func (c *SSM) PutComplianceItems(input *PutComplianceItemsInput) (*PutComplianceItemsOutput, error) { - req, out := c.PutComplianceItemsRequest(input) - return out, req.Send() -} - -// PutComplianceItemsWithContext is the same as PutComplianceItems with the addition of -// the ability to pass a context and additional request options. -// -// See PutComplianceItems for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) PutComplianceItemsWithContext(ctx aws.Context, input *PutComplianceItemsInput, opts ...request.Option) (*PutComplianceItemsOutput, error) { - req, out := c.PutComplianceItemsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutInventory = "PutInventory" - -// PutInventoryRequest generates a "aws/request.Request" representing the -// client's request for the PutInventory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutInventory for more information on using the PutInventory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutInventoryRequest method. -// req, resp := client.PutInventoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutInventory -func (c *SSM) PutInventoryRequest(input *PutInventoryInput) (req *request.Request, output *PutInventoryOutput) { - op := &request.Operation{ - Name: opPutInventory, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutInventoryInput{} - } - - output = &PutInventoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutInventory API operation for Amazon Simple Systems Manager (SSM). -// -// Bulk update custom inventory items on one more instance. The request adds -// an inventory item, if it doesn't already exist, or updates an inventory item, -// if it does exist. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation PutInventory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeInvalidTypeNameException "InvalidTypeNameException" -// The parameter type name is not valid. -// -// * ErrCodeInvalidItemContentException "InvalidItemContentException" -// One or more content items is not valid. -// -// * ErrCodeTotalSizeLimitExceededException "TotalSizeLimitExceededException" -// The size of inventory data has exceeded the total size limit for the resource. -// -// * ErrCodeItemSizeLimitExceededException "ItemSizeLimitExceededException" -// The inventory item size has exceeded the size limit. -// -// * ErrCodeItemContentMismatchException "ItemContentMismatchException" -// The inventory item has invalid content. -// -// * ErrCodeCustomSchemaCountLimitExceededException "CustomSchemaCountLimitExceededException" -// You have exceeded the limit for custom schemas. Delete one or more custom -// schemas and try again. -// -// * ErrCodeUnsupportedInventorySchemaVersionException "UnsupportedInventorySchemaVersionException" -// Inventory item type schema version has to match supported versions in the -// service. Check output of GetInventorySchema to see the available schema version -// for each type. -// -// * ErrCodeUnsupportedInventoryItemContextException "UnsupportedInventoryItemContextException" -// The Context attribute that you specified for the InventoryItem is not allowed -// for this inventory type. You can only use the Context attribute with inventory -// types like AWS:ComplianceItem. -// -// * ErrCodeInvalidInventoryItemContextException "InvalidInventoryItemContextException" -// You specified invalid keys or values in the Context attribute for InventoryItem. -// Verify the keys and values, and try again. -// -// * ErrCodeSubTypeCountLimitExceededException "SubTypeCountLimitExceededException" -// The sub-type count exceeded the limit for the inventory type. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutInventory -func (c *SSM) PutInventory(input *PutInventoryInput) (*PutInventoryOutput, error) { - req, out := c.PutInventoryRequest(input) - return out, req.Send() -} - -// PutInventoryWithContext is the same as PutInventory with the addition of -// the ability to pass a context and additional request options. -// -// See PutInventory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) PutInventoryWithContext(ctx aws.Context, input *PutInventoryInput, opts ...request.Option) (*PutInventoryOutput, error) { - req, out := c.PutInventoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutParameter = "PutParameter" - -// PutParameterRequest generates a "aws/request.Request" representing the -// client's request for the PutParameter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutParameter for more information on using the PutParameter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutParameterRequest method. -// req, resp := client.PutParameterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutParameter -func (c *SSM) PutParameterRequest(input *PutParameterInput) (req *request.Request, output *PutParameterOutput) { - op := &request.Operation{ - Name: opPutParameter, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutParameterInput{} - } - - output = &PutParameterOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutParameter API operation for Amazon Simple Systems Manager (SSM). -// -// Add a parameter to the system. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation PutParameter for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidKeyId "InvalidKeyId" -// The query key ID is not valid. -// -// * ErrCodeParameterLimitExceeded "ParameterLimitExceeded" -// You have exceeded the number of parameters for this AWS account. Delete one -// or more parameters and try again. -// -// * ErrCodeTooManyUpdates "TooManyUpdates" -// There are concurrent updates for a resource that supports one update at a -// time. -// -// * ErrCodeParameterAlreadyExists "ParameterAlreadyExists" -// The parameter already exists. You can't create duplicate parameters. -// -// * ErrCodeHierarchyLevelLimitExceededException "HierarchyLevelLimitExceededException" -// A hierarchy can have a maximum of 15 levels. For more information, see Requirements -// and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) -// in the AWS Systems Manager User Guide. -// -// * ErrCodeHierarchyTypeMismatchException "HierarchyTypeMismatchException" -// Parameter Store does not support changing a parameter type in a hierarchy. -// For example, you can't change a parameter from a String type to a SecureString -// type. You must create a new, unique parameter. -// -// * ErrCodeInvalidAllowedPatternException "InvalidAllowedPatternException" -// The request does not meet the regular expression requirement. -// -// * ErrCodeParameterMaxVersionLimitExceeded "ParameterMaxVersionLimitExceeded" -// The parameter exceeded the maximum number of allowed versions. -// -// * ErrCodeParameterPatternMismatchException "ParameterPatternMismatchException" -// The parameter name is not valid. -// -// * ErrCodeUnsupportedParameterType "UnsupportedParameterType" -// The parameter type is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutParameter -func (c *SSM) PutParameter(input *PutParameterInput) (*PutParameterOutput, error) { - req, out := c.PutParameterRequest(input) - return out, req.Send() -} - -// PutParameterWithContext is the same as PutParameter with the addition of -// the ability to pass a context and additional request options. -// -// See PutParameter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) PutParameterWithContext(ctx aws.Context, input *PutParameterInput, opts ...request.Option) (*PutParameterOutput, error) { - req, out := c.PutParameterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterDefaultPatchBaseline = "RegisterDefaultPatchBaseline" - -// RegisterDefaultPatchBaselineRequest generates a "aws/request.Request" representing the -// client's request for the RegisterDefaultPatchBaseline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterDefaultPatchBaseline for more information on using the RegisterDefaultPatchBaseline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterDefaultPatchBaselineRequest method. -// req, resp := client.RegisterDefaultPatchBaselineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterDefaultPatchBaseline -func (c *SSM) RegisterDefaultPatchBaselineRequest(input *RegisterDefaultPatchBaselineInput) (req *request.Request, output *RegisterDefaultPatchBaselineOutput) { - op := &request.Operation{ - Name: opRegisterDefaultPatchBaseline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterDefaultPatchBaselineInput{} - } - - output = &RegisterDefaultPatchBaselineOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterDefaultPatchBaseline API operation for Amazon Simple Systems Manager (SSM). -// -// Defines the default patch baseline. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation RegisterDefaultPatchBaseline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceId "InvalidResourceId" -// The resource ID is not valid. Verify that you entered the correct ID and -// try again. -// -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterDefaultPatchBaseline -func (c *SSM) RegisterDefaultPatchBaseline(input *RegisterDefaultPatchBaselineInput) (*RegisterDefaultPatchBaselineOutput, error) { - req, out := c.RegisterDefaultPatchBaselineRequest(input) - return out, req.Send() -} - -// RegisterDefaultPatchBaselineWithContext is the same as RegisterDefaultPatchBaseline with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterDefaultPatchBaseline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) RegisterDefaultPatchBaselineWithContext(ctx aws.Context, input *RegisterDefaultPatchBaselineInput, opts ...request.Option) (*RegisterDefaultPatchBaselineOutput, error) { - req, out := c.RegisterDefaultPatchBaselineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterPatchBaselineForPatchGroup = "RegisterPatchBaselineForPatchGroup" - -// RegisterPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the -// client's request for the RegisterPatchBaselineForPatchGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterPatchBaselineForPatchGroup for more information on using the RegisterPatchBaselineForPatchGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterPatchBaselineForPatchGroupRequest method. -// req, resp := client.RegisterPatchBaselineForPatchGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterPatchBaselineForPatchGroup -func (c *SSM) RegisterPatchBaselineForPatchGroupRequest(input *RegisterPatchBaselineForPatchGroupInput) (req *request.Request, output *RegisterPatchBaselineForPatchGroupOutput) { - op := &request.Operation{ - Name: opRegisterPatchBaselineForPatchGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterPatchBaselineForPatchGroupInput{} - } - - output = &RegisterPatchBaselineForPatchGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterPatchBaselineForPatchGroup API operation for Amazon Simple Systems Manager (SSM). -// -// Registers a patch baseline for a patch group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation RegisterPatchBaselineForPatchGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAlreadyExistsException "AlreadyExistsException" -// Error returned if an attempt is made to register a patch group with a patch -// baseline that is already registered with a different patch baseline. -// -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInvalidResourceId "InvalidResourceId" -// The resource ID is not valid. Verify that you entered the correct ID and -// try again. -// -// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" -// Error returned when the caller has exceeded the default resource limits. -// For example, too many Maintenance Windows or Patch baselines have been created. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterPatchBaselineForPatchGroup -func (c *SSM) RegisterPatchBaselineForPatchGroup(input *RegisterPatchBaselineForPatchGroupInput) (*RegisterPatchBaselineForPatchGroupOutput, error) { - req, out := c.RegisterPatchBaselineForPatchGroupRequest(input) - return out, req.Send() -} - -// RegisterPatchBaselineForPatchGroupWithContext is the same as RegisterPatchBaselineForPatchGroup with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterPatchBaselineForPatchGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) RegisterPatchBaselineForPatchGroupWithContext(ctx aws.Context, input *RegisterPatchBaselineForPatchGroupInput, opts ...request.Option) (*RegisterPatchBaselineForPatchGroupOutput, error) { - req, out := c.RegisterPatchBaselineForPatchGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterTargetWithMaintenanceWindow = "RegisterTargetWithMaintenanceWindow" - -// RegisterTargetWithMaintenanceWindowRequest generates a "aws/request.Request" representing the -// client's request for the RegisterTargetWithMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterTargetWithMaintenanceWindow for more information on using the RegisterTargetWithMaintenanceWindow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterTargetWithMaintenanceWindowRequest method. -// req, resp := client.RegisterTargetWithMaintenanceWindowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterTargetWithMaintenanceWindow -func (c *SSM) RegisterTargetWithMaintenanceWindowRequest(input *RegisterTargetWithMaintenanceWindowInput) (req *request.Request, output *RegisterTargetWithMaintenanceWindowOutput) { - op := &request.Operation{ - Name: opRegisterTargetWithMaintenanceWindow, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterTargetWithMaintenanceWindowInput{} - } - - output = &RegisterTargetWithMaintenanceWindowOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterTargetWithMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). -// -// Registers a target with a Maintenance Window. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation RegisterTargetWithMaintenanceWindow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeIdempotentParameterMismatch "IdempotentParameterMismatch" -// Error returned when an idempotent operation is retried and the parameters -// don't match the original call to the API with the same idempotency token. -// -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" -// Error returned when the caller has exceeded the default resource limits. -// For example, too many Maintenance Windows or Patch baselines have been created. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterTargetWithMaintenanceWindow -func (c *SSM) RegisterTargetWithMaintenanceWindow(input *RegisterTargetWithMaintenanceWindowInput) (*RegisterTargetWithMaintenanceWindowOutput, error) { - req, out := c.RegisterTargetWithMaintenanceWindowRequest(input) - return out, req.Send() -} - -// RegisterTargetWithMaintenanceWindowWithContext is the same as RegisterTargetWithMaintenanceWindow with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterTargetWithMaintenanceWindow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) RegisterTargetWithMaintenanceWindowWithContext(ctx aws.Context, input *RegisterTargetWithMaintenanceWindowInput, opts ...request.Option) (*RegisterTargetWithMaintenanceWindowOutput, error) { - req, out := c.RegisterTargetWithMaintenanceWindowRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterTaskWithMaintenanceWindow = "RegisterTaskWithMaintenanceWindow" - -// RegisterTaskWithMaintenanceWindowRequest generates a "aws/request.Request" representing the -// client's request for the RegisterTaskWithMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterTaskWithMaintenanceWindow for more information on using the RegisterTaskWithMaintenanceWindow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterTaskWithMaintenanceWindowRequest method. -// req, resp := client.RegisterTaskWithMaintenanceWindowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterTaskWithMaintenanceWindow -func (c *SSM) RegisterTaskWithMaintenanceWindowRequest(input *RegisterTaskWithMaintenanceWindowInput) (req *request.Request, output *RegisterTaskWithMaintenanceWindowOutput) { - op := &request.Operation{ - Name: opRegisterTaskWithMaintenanceWindow, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterTaskWithMaintenanceWindowInput{} - } - - output = &RegisterTaskWithMaintenanceWindowOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterTaskWithMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). -// -// Adds a new task to a Maintenance Window. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation RegisterTaskWithMaintenanceWindow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeIdempotentParameterMismatch "IdempotentParameterMismatch" -// Error returned when an idempotent operation is retried and the parameters -// don't match the original call to the API with the same idempotency token. -// -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" -// Error returned when the caller has exceeded the default resource limits. -// For example, too many Maintenance Windows or Patch baselines have been created. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeFeatureNotAvailableException "FeatureNotAvailableException" -// You attempted to register a LAMBDA or STEP_FUNCTION task in a region where -// the corresponding service is not available. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterTaskWithMaintenanceWindow -func (c *SSM) RegisterTaskWithMaintenanceWindow(input *RegisterTaskWithMaintenanceWindowInput) (*RegisterTaskWithMaintenanceWindowOutput, error) { - req, out := c.RegisterTaskWithMaintenanceWindowRequest(input) - return out, req.Send() -} - -// RegisterTaskWithMaintenanceWindowWithContext is the same as RegisterTaskWithMaintenanceWindow with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterTaskWithMaintenanceWindow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) RegisterTaskWithMaintenanceWindowWithContext(ctx aws.Context, input *RegisterTaskWithMaintenanceWindowInput, opts ...request.Option) (*RegisterTaskWithMaintenanceWindowOutput, error) { - req, out := c.RegisterTaskWithMaintenanceWindowRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTagsFromResource = "RemoveTagsFromResource" - -// RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTagsFromResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTagsFromResource for more information on using the RemoveTagsFromResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsFromResourceRequest method. -// req, resp := client.RemoveTagsFromResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RemoveTagsFromResource -func (c *SSM) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *RemoveTagsFromResourceOutput) { - op := &request.Operation{ - Name: opRemoveTagsFromResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsFromResourceInput{} - } - - output = &RemoveTagsFromResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTagsFromResource API operation for Amazon Simple Systems Manager (SSM). -// -// Removes all tags from the specified resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation RemoveTagsFromResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidResourceType "InvalidResourceType" -// The resource type is not valid. For example, if you are attempting to tag -// an instance, the instance must be a registered, managed instance. -// -// * ErrCodeInvalidResourceId "InvalidResourceId" -// The resource ID is not valid. Verify that you entered the correct ID and -// try again. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeTooManyUpdates "TooManyUpdates" -// There are concurrent updates for a resource that supports one update at a -// time. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RemoveTagsFromResource -func (c *SSM) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - return out, req.Send() -} - -// RemoveTagsFromResourceWithContext is the same as RemoveTagsFromResource with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTagsFromResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*RemoveTagsFromResourceOutput, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResumeSession = "ResumeSession" - -// ResumeSessionRequest generates a "aws/request.Request" representing the -// client's request for the ResumeSession operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResumeSession for more information on using the ResumeSession -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResumeSessionRequest method. -// req, resp := client.ResumeSessionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ResumeSession -func (c *SSM) ResumeSessionRequest(input *ResumeSessionInput) (req *request.Request, output *ResumeSessionOutput) { - op := &request.Operation{ - Name: opResumeSession, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResumeSessionInput{} - } - - output = &ResumeSessionOutput{} - req = c.newRequest(op, input, output) - return -} - -// ResumeSession API operation for Amazon Simple Systems Manager (SSM). -// -// Reconnects a session to an instance after it has been disconnected. Connections -// can be resumed for disconnected sessions, but not terminated sessions. -// -// This command is primarily for use by client machines to automatically reconnect -// during intermittent network issues. It is not intended for any other use. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation ResumeSession for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ResumeSession -func (c *SSM) ResumeSession(input *ResumeSessionInput) (*ResumeSessionOutput, error) { - req, out := c.ResumeSessionRequest(input) - return out, req.Send() -} - -// ResumeSessionWithContext is the same as ResumeSession with the addition of -// the ability to pass a context and additional request options. -// -// See ResumeSession for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) ResumeSessionWithContext(ctx aws.Context, input *ResumeSessionInput, opts ...request.Option) (*ResumeSessionOutput, error) { - req, out := c.ResumeSessionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSendAutomationSignal = "SendAutomationSignal" - -// SendAutomationSignalRequest generates a "aws/request.Request" representing the -// client's request for the SendAutomationSignal operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendAutomationSignal for more information on using the SendAutomationSignal -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendAutomationSignalRequest method. -// req, resp := client.SendAutomationSignalRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/SendAutomationSignal -func (c *SSM) SendAutomationSignalRequest(input *SendAutomationSignalInput) (req *request.Request, output *SendAutomationSignalOutput) { - op := &request.Operation{ - Name: opSendAutomationSignal, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SendAutomationSignalInput{} - } - - output = &SendAutomationSignalOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SendAutomationSignal API operation for Amazon Simple Systems Manager (SSM). -// -// Sends a signal to an Automation execution to change the current behavior -// or status of the execution. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation SendAutomationSignal for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAutomationExecutionNotFoundException "AutomationExecutionNotFoundException" -// There is no automation execution information for the requested automation -// execution ID. -// -// * ErrCodeAutomationStepNotFoundException "AutomationStepNotFoundException" -// The specified step name and execution ID don't exist. Verify the information -// and try again. -// -// * ErrCodeInvalidAutomationSignalException "InvalidAutomationSignalException" -// The signal is not valid for the current Automation execution. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/SendAutomationSignal -func (c *SSM) SendAutomationSignal(input *SendAutomationSignalInput) (*SendAutomationSignalOutput, error) { - req, out := c.SendAutomationSignalRequest(input) - return out, req.Send() -} - -// SendAutomationSignalWithContext is the same as SendAutomationSignal with the addition of -// the ability to pass a context and additional request options. -// -// See SendAutomationSignal for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) SendAutomationSignalWithContext(ctx aws.Context, input *SendAutomationSignalInput, opts ...request.Option) (*SendAutomationSignalOutput, error) { - req, out := c.SendAutomationSignalRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSendCommand = "SendCommand" - -// SendCommandRequest generates a "aws/request.Request" representing the -// client's request for the SendCommand operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SendCommand for more information on using the SendCommand -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SendCommandRequest method. -// req, resp := client.SendCommandRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/SendCommand -func (c *SSM) SendCommandRequest(input *SendCommandInput) (req *request.Request, output *SendCommandOutput) { - op := &request.Operation{ - Name: opSendCommand, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SendCommandInput{} - } - - output = &SendCommandOutput{} - req = c.newRequest(op, input, output) - return -} - -// SendCommand API operation for Amazon Simple Systems Manager (SSM). -// -// Executes commands on one or more managed instances. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation SendCommand for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDuplicateInstanceId "DuplicateInstanceId" -// You cannot specify an instance ID in more than one association. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion" -// The document version is not valid or does not exist. -// -// * ErrCodeInvalidOutputFolder "InvalidOutputFolder" -// The S3 bucket does not exist. -// -// * ErrCodeInvalidParameters "InvalidParameters" -// You must specify values for all required parameters in the Systems Manager -// document. You can only supply values to parameters defined in the Systems -// Manager document. -// -// * ErrCodeUnsupportedPlatformType "UnsupportedPlatformType" -// The document does not support the platform type of the given instance ID(s). -// For example, you sent an document for a Windows instance to a Linux instance. -// -// * ErrCodeMaxDocumentSizeExceeded "MaxDocumentSizeExceeded" -// The size limit of a document is 64 KB. -// -// * ErrCodeInvalidRole "InvalidRole" -// The role name can't contain invalid characters. Also verify that you specified -// an IAM role for notifications that includes the required trust policy. For -// information about configuring the IAM role for Run Command notifications, -// see Configuring Amazon SNS Notifications for Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html) -// in the AWS Systems Manager User Guide. -// -// * ErrCodeInvalidNotificationConfig "InvalidNotificationConfig" -// One or more configuration items is not valid. Verify that a valid Amazon -// Resource Name (ARN) was provided for an Amazon SNS topic. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/SendCommand -func (c *SSM) SendCommand(input *SendCommandInput) (*SendCommandOutput, error) { - req, out := c.SendCommandRequest(input) - return out, req.Send() -} - -// SendCommandWithContext is the same as SendCommand with the addition of -// the ability to pass a context and additional request options. -// -// See SendCommand for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) SendCommandWithContext(ctx aws.Context, input *SendCommandInput, opts ...request.Option) (*SendCommandOutput, error) { - req, out := c.SendCommandRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartAssociationsOnce = "StartAssociationsOnce" - -// StartAssociationsOnceRequest generates a "aws/request.Request" representing the -// client's request for the StartAssociationsOnce operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartAssociationsOnce for more information on using the StartAssociationsOnce -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartAssociationsOnceRequest method. -// req, resp := client.StartAssociationsOnceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAssociationsOnce -func (c *SSM) StartAssociationsOnceRequest(input *StartAssociationsOnceInput) (req *request.Request, output *StartAssociationsOnceOutput) { - op := &request.Operation{ - Name: opStartAssociationsOnce, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartAssociationsOnceInput{} - } - - output = &StartAssociationsOnceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartAssociationsOnce API operation for Amazon Simple Systems Manager (SSM). -// -// Use this API action to execute an association immediately and only one time. -// This action can be helpful when troubleshooting associations. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation StartAssociationsOnce for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidAssociation "InvalidAssociation" -// The association is not valid or does not exist. -// -// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist" -// The specified association does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAssociationsOnce -func (c *SSM) StartAssociationsOnce(input *StartAssociationsOnceInput) (*StartAssociationsOnceOutput, error) { - req, out := c.StartAssociationsOnceRequest(input) - return out, req.Send() -} - -// StartAssociationsOnceWithContext is the same as StartAssociationsOnce with the addition of -// the ability to pass a context and additional request options. -// -// See StartAssociationsOnce for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) StartAssociationsOnceWithContext(ctx aws.Context, input *StartAssociationsOnceInput, opts ...request.Option) (*StartAssociationsOnceOutput, error) { - req, out := c.StartAssociationsOnceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartAutomationExecution = "StartAutomationExecution" - -// StartAutomationExecutionRequest generates a "aws/request.Request" representing the -// client's request for the StartAutomationExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartAutomationExecution for more information on using the StartAutomationExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartAutomationExecutionRequest method. -// req, resp := client.StartAutomationExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAutomationExecution -func (c *SSM) StartAutomationExecutionRequest(input *StartAutomationExecutionInput) (req *request.Request, output *StartAutomationExecutionOutput) { - op := &request.Operation{ - Name: opStartAutomationExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartAutomationExecutionInput{} - } - - output = &StartAutomationExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartAutomationExecution API operation for Amazon Simple Systems Manager (SSM). -// -// Initiates execution of an Automation document. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation StartAutomationExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAutomationDefinitionNotFoundException "AutomationDefinitionNotFoundException" -// An Automation document with the specified name could not be found. -// -// * ErrCodeInvalidAutomationExecutionParametersException "InvalidAutomationExecutionParametersException" -// The supplied parameters for invoking the specified Automation document are -// incorrect. For example, they may not match the set of parameters permitted -// for the specified Automation document. -// -// * ErrCodeAutomationExecutionLimitExceededException "AutomationExecutionLimitExceededException" -// The number of simultaneously running Automation executions exceeded the allowable -// limit. -// -// * ErrCodeAutomationDefinitionVersionNotFoundException "AutomationDefinitionVersionNotFoundException" -// An Automation document with the specified name and version could not be found. -// -// * ErrCodeIdempotentParameterMismatch "IdempotentParameterMismatch" -// Error returned when an idempotent operation is retried and the parameters -// don't match the original call to the API with the same idempotency token. -// -// * ErrCodeInvalidTarget "InvalidTarget" -// The target is not valid or does not exist. It might not be configured for -// EC2 Systems Manager or you might not have permission to perform the operation. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAutomationExecution -func (c *SSM) StartAutomationExecution(input *StartAutomationExecutionInput) (*StartAutomationExecutionOutput, error) { - req, out := c.StartAutomationExecutionRequest(input) - return out, req.Send() -} - -// StartAutomationExecutionWithContext is the same as StartAutomationExecution with the addition of -// the ability to pass a context and additional request options. -// -// See StartAutomationExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) StartAutomationExecutionWithContext(ctx aws.Context, input *StartAutomationExecutionInput, opts ...request.Option) (*StartAutomationExecutionOutput, error) { - req, out := c.StartAutomationExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartSession = "StartSession" - -// StartSessionRequest generates a "aws/request.Request" representing the -// client's request for the StartSession operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartSession for more information on using the StartSession -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartSessionRequest method. -// req, resp := client.StartSessionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartSession -func (c *SSM) StartSessionRequest(input *StartSessionInput) (req *request.Request, output *StartSessionOutput) { - op := &request.Operation{ - Name: opStartSession, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartSessionInput{} - } - - output = &StartSessionOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartSession API operation for Amazon Simple Systems Manager (SSM). -// -// Initiates a connection to a target (for example, an instance) for a Session -// Manager session. Returns a URL and token that can be used to open a WebSocket -// connection for sending input and receiving outputs. -// -// AWS CLI usage: start-session is an interactive command that requires the -// Session Manager plugin to be installed on the client machine making the call. -// For information, see Install the Session Manager Plugin for the AWS CLI -// (http://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html) -// in the AWS Systems Manager User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation StartSession for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeTargetNotConnected "TargetNotConnected" -// The specified target instance for the session is not fully configured for -// use with Session Manager. For more information, see Getting Started with -// Session Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) -// in the AWS Systems Manager User Guide. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartSession -func (c *SSM) StartSession(input *StartSessionInput) (*StartSessionOutput, error) { - req, out := c.StartSessionRequest(input) - return out, req.Send() -} - -// StartSessionWithContext is the same as StartSession with the addition of -// the ability to pass a context and additional request options. -// -// See StartSession for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) StartSessionWithContext(ctx aws.Context, input *StartSessionInput, opts ...request.Option) (*StartSessionOutput, error) { - req, out := c.StartSessionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopAutomationExecution = "StopAutomationExecution" - -// StopAutomationExecutionRequest generates a "aws/request.Request" representing the -// client's request for the StopAutomationExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopAutomationExecution for more information on using the StopAutomationExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopAutomationExecutionRequest method. -// req, resp := client.StopAutomationExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StopAutomationExecution -func (c *SSM) StopAutomationExecutionRequest(input *StopAutomationExecutionInput) (req *request.Request, output *StopAutomationExecutionOutput) { - op := &request.Operation{ - Name: opStopAutomationExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopAutomationExecutionInput{} - } - - output = &StopAutomationExecutionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopAutomationExecution API operation for Amazon Simple Systems Manager (SSM). -// -// Stop an Automation that is currently executing. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation StopAutomationExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAutomationExecutionNotFoundException "AutomationExecutionNotFoundException" -// There is no automation execution information for the requested automation -// execution ID. -// -// * ErrCodeInvalidAutomationStatusUpdateException "InvalidAutomationStatusUpdateException" -// The specified update status operation is not valid. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StopAutomationExecution -func (c *SSM) StopAutomationExecution(input *StopAutomationExecutionInput) (*StopAutomationExecutionOutput, error) { - req, out := c.StopAutomationExecutionRequest(input) - return out, req.Send() -} - -// StopAutomationExecutionWithContext is the same as StopAutomationExecution with the addition of -// the ability to pass a context and additional request options. -// -// See StopAutomationExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) StopAutomationExecutionWithContext(ctx aws.Context, input *StopAutomationExecutionInput, opts ...request.Option) (*StopAutomationExecutionOutput, error) { - req, out := c.StopAutomationExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTerminateSession = "TerminateSession" - -// TerminateSessionRequest generates a "aws/request.Request" representing the -// client's request for the TerminateSession operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TerminateSession for more information on using the TerminateSession -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TerminateSessionRequest method. -// req, resp := client.TerminateSessionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/TerminateSession -func (c *SSM) TerminateSessionRequest(input *TerminateSessionInput) (req *request.Request, output *TerminateSessionOutput) { - op := &request.Operation{ - Name: opTerminateSession, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TerminateSessionInput{} - } - - output = &TerminateSessionOutput{} - req = c.newRequest(op, input, output) - return -} - -// TerminateSession API operation for Amazon Simple Systems Manager (SSM). -// -// Permanently ends a session and closes the data connection between the Session -// Manager client and SSM Agent on the instance. A terminated session cannot -// be resumed. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation TerminateSession for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/TerminateSession -func (c *SSM) TerminateSession(input *TerminateSessionInput) (*TerminateSessionOutput, error) { - req, out := c.TerminateSessionRequest(input) - return out, req.Send() -} - -// TerminateSessionWithContext is the same as TerminateSession with the addition of -// the ability to pass a context and additional request options. -// -// See TerminateSession for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) TerminateSessionWithContext(ctx aws.Context, input *TerminateSessionInput, opts ...request.Option) (*TerminateSessionOutput, error) { - req, out := c.TerminateSessionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAssociation = "UpdateAssociation" - -// UpdateAssociationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAssociation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAssociation for more information on using the UpdateAssociation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAssociationRequest method. -// req, resp := client.UpdateAssociationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateAssociation -func (c *SSM) UpdateAssociationRequest(input *UpdateAssociationInput) (req *request.Request, output *UpdateAssociationOutput) { - op := &request.Operation{ - Name: opUpdateAssociation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAssociationInput{} - } - - output = &UpdateAssociationOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateAssociation API operation for Amazon Simple Systems Manager (SSM). -// -// Updates an association. You can update the association name and version, -// the document version, schedule, parameters, and Amazon S3 output. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation UpdateAssociation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidSchedule "InvalidSchedule" -// The schedule is invalid. Verify your cron or rate expression and try again. -// -// * ErrCodeInvalidParameters "InvalidParameters" -// You must specify values for all required parameters in the Systems Manager -// document. You can only supply values to parameters defined in the Systems -// Manager document. -// -// * ErrCodeInvalidOutputLocation "InvalidOutputLocation" -// The output location is not valid or does not exist. -// -// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion" -// The document version is not valid or does not exist. -// -// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist" -// The specified association does not exist. -// -// * ErrCodeInvalidUpdate "InvalidUpdate" -// The update is not valid. -// -// * ErrCodeTooManyUpdates "TooManyUpdates" -// There are concurrent updates for a resource that supports one update at a -// time. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeInvalidTarget "InvalidTarget" -// The target is not valid or does not exist. It might not be configured for -// EC2 Systems Manager or you might not have permission to perform the operation. -// -// * ErrCodeInvalidAssociationVersion "InvalidAssociationVersion" -// The version you specified is not valid. Use ListAssociationVersions to view -// all versions of an association according to the association ID. Or, use the -// $LATEST parameter to view the latest version of the association. -// -// * ErrCodeAssociationVersionLimitExceeded "AssociationVersionLimitExceeded" -// You have reached the maximum number versions allowed for an association. -// Each association has a limit of 1,000 versions. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateAssociation -func (c *SSM) UpdateAssociation(input *UpdateAssociationInput) (*UpdateAssociationOutput, error) { - req, out := c.UpdateAssociationRequest(input) - return out, req.Send() -} - -// UpdateAssociationWithContext is the same as UpdateAssociation with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAssociation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) UpdateAssociationWithContext(ctx aws.Context, input *UpdateAssociationInput, opts ...request.Option) (*UpdateAssociationOutput, error) { - req, out := c.UpdateAssociationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAssociationStatus = "UpdateAssociationStatus" - -// UpdateAssociationStatusRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAssociationStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAssociationStatus for more information on using the UpdateAssociationStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAssociationStatusRequest method. -// req, resp := client.UpdateAssociationStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateAssociationStatus -func (c *SSM) UpdateAssociationStatusRequest(input *UpdateAssociationStatusInput) (req *request.Request, output *UpdateAssociationStatusOutput) { - op := &request.Operation{ - Name: opUpdateAssociationStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAssociationStatusInput{} - } - - output = &UpdateAssociationStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateAssociationStatus API operation for Amazon Simple Systems Manager (SSM). -// -// Updates the status of the Systems Manager document associated with the specified -// instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation UpdateAssociationStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist" -// The specified association does not exist. -// -// * ErrCodeStatusUnchanged "StatusUnchanged" -// The updated status is the same as the current status. -// -// * ErrCodeTooManyUpdates "TooManyUpdates" -// There are concurrent updates for a resource that supports one update at a -// time. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateAssociationStatus -func (c *SSM) UpdateAssociationStatus(input *UpdateAssociationStatusInput) (*UpdateAssociationStatusOutput, error) { - req, out := c.UpdateAssociationStatusRequest(input) - return out, req.Send() -} - -// UpdateAssociationStatusWithContext is the same as UpdateAssociationStatus with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAssociationStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) UpdateAssociationStatusWithContext(ctx aws.Context, input *UpdateAssociationStatusInput, opts ...request.Option) (*UpdateAssociationStatusOutput, error) { - req, out := c.UpdateAssociationStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDocument = "UpdateDocument" - -// UpdateDocumentRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDocument operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDocument for more information on using the UpdateDocument -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDocumentRequest method. -// req, resp := client.UpdateDocumentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateDocument -func (c *SSM) UpdateDocumentRequest(input *UpdateDocumentInput) (req *request.Request, output *UpdateDocumentOutput) { - op := &request.Operation{ - Name: opUpdateDocument, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateDocumentInput{} - } - - output = &UpdateDocumentOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDocument API operation for Amazon Simple Systems Manager (SSM). -// -// The document you want to update. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation UpdateDocument for usage and error information. -// -// Returned Error Codes: -// * ErrCodeMaxDocumentSizeExceeded "MaxDocumentSizeExceeded" -// The size limit of a document is 64 KB. -// -// * ErrCodeDocumentVersionLimitExceeded "DocumentVersionLimitExceeded" -// The document has too many versions. Delete one or more document versions -// and try again. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeDuplicateDocumentContent "DuplicateDocumentContent" -// The content of the association document matches another document. Change -// the content of the document and try again. -// -// * ErrCodeDuplicateDocumentVersionName "DuplicateDocumentVersionName" -// The version name has already been used in this document. Specify a different -// version name, and then try again. -// -// * ErrCodeInvalidDocumentContent "InvalidDocumentContent" -// The content for the document is not valid. -// -// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion" -// The document version is not valid or does not exist. -// -// * ErrCodeInvalidDocumentSchemaVersion "InvalidDocumentSchemaVersion" -// The version of the document schema is not supported. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeInvalidDocumentOperation "InvalidDocumentOperation" -// You attempted to delete a document while it is still shared. You must stop -// sharing the document before you can delete it. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateDocument -func (c *SSM) UpdateDocument(input *UpdateDocumentInput) (*UpdateDocumentOutput, error) { - req, out := c.UpdateDocumentRequest(input) - return out, req.Send() -} - -// UpdateDocumentWithContext is the same as UpdateDocument with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDocument for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) UpdateDocumentWithContext(ctx aws.Context, input *UpdateDocumentInput, opts ...request.Option) (*UpdateDocumentOutput, error) { - req, out := c.UpdateDocumentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDocumentDefaultVersion = "UpdateDocumentDefaultVersion" - -// UpdateDocumentDefaultVersionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDocumentDefaultVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDocumentDefaultVersion for more information on using the UpdateDocumentDefaultVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDocumentDefaultVersionRequest method. -// req, resp := client.UpdateDocumentDefaultVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateDocumentDefaultVersion -func (c *SSM) UpdateDocumentDefaultVersionRequest(input *UpdateDocumentDefaultVersionInput) (req *request.Request, output *UpdateDocumentDefaultVersionOutput) { - op := &request.Operation{ - Name: opUpdateDocumentDefaultVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateDocumentDefaultVersionInput{} - } - - output = &UpdateDocumentDefaultVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDocumentDefaultVersion API operation for Amazon Simple Systems Manager (SSM). -// -// Set the default version of a document. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation UpdateDocumentDefaultVersion for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// * ErrCodeInvalidDocument "InvalidDocument" -// The specified document does not exist. -// -// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion" -// The document version is not valid or does not exist. -// -// * ErrCodeInvalidDocumentSchemaVersion "InvalidDocumentSchemaVersion" -// The version of the document schema is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateDocumentDefaultVersion -func (c *SSM) UpdateDocumentDefaultVersion(input *UpdateDocumentDefaultVersionInput) (*UpdateDocumentDefaultVersionOutput, error) { - req, out := c.UpdateDocumentDefaultVersionRequest(input) - return out, req.Send() -} - -// UpdateDocumentDefaultVersionWithContext is the same as UpdateDocumentDefaultVersion with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDocumentDefaultVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) UpdateDocumentDefaultVersionWithContext(ctx aws.Context, input *UpdateDocumentDefaultVersionInput, opts ...request.Option) (*UpdateDocumentDefaultVersionOutput, error) { - req, out := c.UpdateDocumentDefaultVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateMaintenanceWindow = "UpdateMaintenanceWindow" - -// UpdateMaintenanceWindowRequest generates a "aws/request.Request" representing the -// client's request for the UpdateMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateMaintenanceWindow for more information on using the UpdateMaintenanceWindow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateMaintenanceWindowRequest method. -// req, resp := client.UpdateMaintenanceWindowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindow -func (c *SSM) UpdateMaintenanceWindowRequest(input *UpdateMaintenanceWindowInput) (req *request.Request, output *UpdateMaintenanceWindowOutput) { - op := &request.Operation{ - Name: opUpdateMaintenanceWindow, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateMaintenanceWindowInput{} - } - - output = &UpdateMaintenanceWindowOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). -// -// Updates an existing Maintenance Window. Only specified parameters are modified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation UpdateMaintenanceWindow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindow -func (c *SSM) UpdateMaintenanceWindow(input *UpdateMaintenanceWindowInput) (*UpdateMaintenanceWindowOutput, error) { - req, out := c.UpdateMaintenanceWindowRequest(input) - return out, req.Send() -} - -// UpdateMaintenanceWindowWithContext is the same as UpdateMaintenanceWindow with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateMaintenanceWindow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) UpdateMaintenanceWindowWithContext(ctx aws.Context, input *UpdateMaintenanceWindowInput, opts ...request.Option) (*UpdateMaintenanceWindowOutput, error) { - req, out := c.UpdateMaintenanceWindowRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateMaintenanceWindowTarget = "UpdateMaintenanceWindowTarget" - -// UpdateMaintenanceWindowTargetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateMaintenanceWindowTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateMaintenanceWindowTarget for more information on using the UpdateMaintenanceWindowTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateMaintenanceWindowTargetRequest method. -// req, resp := client.UpdateMaintenanceWindowTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindowTarget -func (c *SSM) UpdateMaintenanceWindowTargetRequest(input *UpdateMaintenanceWindowTargetInput) (req *request.Request, output *UpdateMaintenanceWindowTargetOutput) { - op := &request.Operation{ - Name: opUpdateMaintenanceWindowTarget, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateMaintenanceWindowTargetInput{} - } - - output = &UpdateMaintenanceWindowTargetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateMaintenanceWindowTarget API operation for Amazon Simple Systems Manager (SSM). -// -// Modifies the target of an existing Maintenance Window. You can't change the -// target type, but you can change the following: -// -// The target from being an ID target to a Tag target, or a Tag target to an -// ID target. -// -// IDs for an ID target. -// -// Tags for a Tag target. -// -// Owner. -// -// Name. -// -// Description. -// -// If a parameter is null, then the corresponding field is not modified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation UpdateMaintenanceWindowTarget for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindowTarget -func (c *SSM) UpdateMaintenanceWindowTarget(input *UpdateMaintenanceWindowTargetInput) (*UpdateMaintenanceWindowTargetOutput, error) { - req, out := c.UpdateMaintenanceWindowTargetRequest(input) - return out, req.Send() -} - -// UpdateMaintenanceWindowTargetWithContext is the same as UpdateMaintenanceWindowTarget with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateMaintenanceWindowTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) UpdateMaintenanceWindowTargetWithContext(ctx aws.Context, input *UpdateMaintenanceWindowTargetInput, opts ...request.Option) (*UpdateMaintenanceWindowTargetOutput, error) { - req, out := c.UpdateMaintenanceWindowTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateMaintenanceWindowTask = "UpdateMaintenanceWindowTask" - -// UpdateMaintenanceWindowTaskRequest generates a "aws/request.Request" representing the -// client's request for the UpdateMaintenanceWindowTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateMaintenanceWindowTask for more information on using the UpdateMaintenanceWindowTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateMaintenanceWindowTaskRequest method. -// req, resp := client.UpdateMaintenanceWindowTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindowTask -func (c *SSM) UpdateMaintenanceWindowTaskRequest(input *UpdateMaintenanceWindowTaskInput) (req *request.Request, output *UpdateMaintenanceWindowTaskOutput) { - op := &request.Operation{ - Name: opUpdateMaintenanceWindowTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateMaintenanceWindowTaskInput{} - } - - output = &UpdateMaintenanceWindowTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateMaintenanceWindowTask API operation for Amazon Simple Systems Manager (SSM). -// -// Modifies a task assigned to a Maintenance Window. You can't change the task -// type, but you can change the following values: -// -// * TaskARN. For example, you can change a RUN_COMMAND task from AWS-RunPowerShellScript -// to AWS-RunShellScript. -// -// * ServiceRoleArn -// -// * TaskInvocationParameters -// -// * Priority -// -// * MaxConcurrency -// -// * MaxErrors -// -// If a parameter is null, then the corresponding field is not modified. Also, -// if you set Replace to true, then all fields required by the RegisterTaskWithMaintenanceWindow -// action are required for this request. Optional fields that aren't specified -// are set to null. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation UpdateMaintenanceWindowTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindowTask -func (c *SSM) UpdateMaintenanceWindowTask(input *UpdateMaintenanceWindowTaskInput) (*UpdateMaintenanceWindowTaskOutput, error) { - req, out := c.UpdateMaintenanceWindowTaskRequest(input) - return out, req.Send() -} - -// UpdateMaintenanceWindowTaskWithContext is the same as UpdateMaintenanceWindowTask with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateMaintenanceWindowTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) UpdateMaintenanceWindowTaskWithContext(ctx aws.Context, input *UpdateMaintenanceWindowTaskInput, opts ...request.Option) (*UpdateMaintenanceWindowTaskOutput, error) { - req, out := c.UpdateMaintenanceWindowTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateManagedInstanceRole = "UpdateManagedInstanceRole" - -// UpdateManagedInstanceRoleRequest generates a "aws/request.Request" representing the -// client's request for the UpdateManagedInstanceRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateManagedInstanceRole for more information on using the UpdateManagedInstanceRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateManagedInstanceRoleRequest method. -// req, resp := client.UpdateManagedInstanceRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateManagedInstanceRole -func (c *SSM) UpdateManagedInstanceRoleRequest(input *UpdateManagedInstanceRoleInput) (req *request.Request, output *UpdateManagedInstanceRoleOutput) { - op := &request.Operation{ - Name: opUpdateManagedInstanceRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateManagedInstanceRoleInput{} - } - - output = &UpdateManagedInstanceRoleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateManagedInstanceRole API operation for Amazon Simple Systems Manager (SSM). -// -// Assigns or changes an Amazon Identity and Access Management (IAM) role to -// the managed instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation UpdateManagedInstanceRole for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidInstanceId "InvalidInstanceId" -// The following problems can cause this exception: -// -// You do not have permission to access the instance. -// -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. -// -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. -// -// The instance is not in valid state. Valid states are: Running, Pending, Stopped, -// Stopping. Invalid states are: Shutting-down and Terminated. -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateManagedInstanceRole -func (c *SSM) UpdateManagedInstanceRole(input *UpdateManagedInstanceRoleInput) (*UpdateManagedInstanceRoleOutput, error) { - req, out := c.UpdateManagedInstanceRoleRequest(input) - return out, req.Send() -} - -// UpdateManagedInstanceRoleWithContext is the same as UpdateManagedInstanceRole with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateManagedInstanceRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) UpdateManagedInstanceRoleWithContext(ctx aws.Context, input *UpdateManagedInstanceRoleInput, opts ...request.Option) (*UpdateManagedInstanceRoleOutput, error) { - req, out := c.UpdateManagedInstanceRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdatePatchBaseline = "UpdatePatchBaseline" - -// UpdatePatchBaselineRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePatchBaseline operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdatePatchBaseline for more information on using the UpdatePatchBaseline -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdatePatchBaselineRequest method. -// req, resp := client.UpdatePatchBaselineRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdatePatchBaseline -func (c *SSM) UpdatePatchBaselineRequest(input *UpdatePatchBaselineInput) (req *request.Request, output *UpdatePatchBaselineOutput) { - op := &request.Operation{ - Name: opUpdatePatchBaseline, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdatePatchBaselineInput{} - } - - output = &UpdatePatchBaselineOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdatePatchBaseline API operation for Amazon Simple Systems Manager (SSM). -// -// Modifies an existing patch baseline. Fields not specified in the request -// are left unchanged. -// -// For information about valid key and value pairs in PatchFilters for each -// supported operating system type, see PatchFilter (http://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PatchFilter.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s -// API operation UpdatePatchBaseline for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDoesNotExistException "DoesNotExistException" -// Error returned when the ID specified for a resource, such as a Maintenance -// Window or Patch baseline, doesn't exist. -// -// For information about resource limits in Systems Manager, see AWS Systems -// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). -// -// * ErrCodeInternalServerError "InternalServerError" -// An error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdatePatchBaseline -func (c *SSM) UpdatePatchBaseline(input *UpdatePatchBaselineInput) (*UpdatePatchBaselineOutput, error) { - req, out := c.UpdatePatchBaselineRequest(input) - return out, req.Send() -} - -// UpdatePatchBaselineWithContext is the same as UpdatePatchBaseline with the addition of -// the ability to pass a context and additional request options. -// -// See UpdatePatchBaseline for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SSM) UpdatePatchBaselineWithContext(ctx aws.Context, input *UpdatePatchBaselineInput, opts ...request.Option) (*UpdatePatchBaselineOutput, error) { - req, out := c.UpdatePatchBaselineRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// An activation registers one or more on-premises servers or virtual machines -// (VMs) with AWS so that you can configure those servers or VMs using Run Command. -// A server or VM that has been registered with AWS is called a managed instance. -type Activation struct { - _ struct{} `type:"structure"` - - // The ID created by Systems Manager when you submitted the activation. - ActivationId *string `type:"string"` - - // The date the activation was created. - CreatedDate *time.Time `type:"timestamp"` - - // A name for the managed instance when it is created. - DefaultInstanceName *string `type:"string"` - - // A user defined description of the activation. - Description *string `type:"string"` - - // The date when this activation can no longer be used to register managed instances. - ExpirationDate *time.Time `type:"timestamp"` - - // Whether or not the activation is expired. - Expired *bool `type:"boolean"` - - // The Amazon Identity and Access Management (IAM) role to assign to the managed - // instance. - IamRole *string `type:"string"` - - // The maximum number of managed instances that can be registered using this - // activation. - RegistrationLimit *int64 `min:"1" type:"integer"` - - // The number of managed instances already registered with this activation. - RegistrationsCount *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s Activation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Activation) GoString() string { - return s.String() -} - -// SetActivationId sets the ActivationId field's value. -func (s *Activation) SetActivationId(v string) *Activation { - s.ActivationId = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *Activation) SetCreatedDate(v time.Time) *Activation { - s.CreatedDate = &v - return s -} - -// SetDefaultInstanceName sets the DefaultInstanceName field's value. -func (s *Activation) SetDefaultInstanceName(v string) *Activation { - s.DefaultInstanceName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Activation) SetDescription(v string) *Activation { - s.Description = &v - return s -} - -// SetExpirationDate sets the ExpirationDate field's value. -func (s *Activation) SetExpirationDate(v time.Time) *Activation { - s.ExpirationDate = &v - return s -} - -// SetExpired sets the Expired field's value. -func (s *Activation) SetExpired(v bool) *Activation { - s.Expired = &v - return s -} - -// SetIamRole sets the IamRole field's value. -func (s *Activation) SetIamRole(v string) *Activation { - s.IamRole = &v - return s -} - -// SetRegistrationLimit sets the RegistrationLimit field's value. -func (s *Activation) SetRegistrationLimit(v int64) *Activation { - s.RegistrationLimit = &v - return s -} - -// SetRegistrationsCount sets the RegistrationsCount field's value. -func (s *Activation) SetRegistrationsCount(v int64) *Activation { - s.RegistrationsCount = &v - return s -} - -type AddTagsToResourceInput struct { - _ struct{} `type:"structure"` - - // The resource ID you want to tag. - // - // Use the ID of the resource. Here are some examples: - // - // ManagedInstance: mi-012345abcde - // - // MaintenanceWindow: mw-012345abcde - // - // PatchBaseline: pb-012345abcde - // - // For the Document and Parameter values, use the name of the resource. - // - // The ManagedInstance type for this API action is only for on-premises managed - // instances. You must specify the the name of the managed instance in the following - // format: mi-ID_number. For example, mi-1a2b3c4d5e6f. - // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` - - // Specifies the type of resource you are tagging. - // - // The ManagedInstance type for this API action is for on-premises managed instances. - // You must specify the the name of the managed instance in the following format: - // mi-ID_number. For example, mi-1a2b3c4d5e6f. - // - // ResourceType is a required field - ResourceType *string `type:"string" required:"true" enum:"ResourceTypeForTagging"` - - // One or more tags. The value parameter is required, but if you don't want - // the tag to have a value, specify the parameter with no value, and we set - // the value to an empty string. - // - // Do not enter personally identifiable information in this field. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsToResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsToResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *AddTagsToResourceInput) SetResourceId(v string) *AddTagsToResourceInput { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *AddTagsToResourceInput) SetResourceType(v string) *AddTagsToResourceInput { - s.ResourceType = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { - s.Tags = v - return s -} - -type AddTagsToResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AddTagsToResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceOutput) GoString() string { - return s.String() -} - -// Describes an association of a Systems Manager document and an instance. -type Association struct { - _ struct{} `type:"structure"` - - // The ID created by the system when you create an association. An association - // is a binding between a document and a set of targets with a schedule. - AssociationId *string `type:"string"` - - // The association name. - AssociationName *string `type:"string"` - - // The association version. - AssociationVersion *string `type:"string"` - - // The version of the document used in the association. - DocumentVersion *string `type:"string"` - - // The ID of the instance. - InstanceId *string `type:"string"` - - // The date on which the association was last run. - LastExecutionDate *time.Time `type:"timestamp"` - - // The name of the Systems Manager document. - Name *string `type:"string"` - - // Information about the association. - Overview *AssociationOverview `type:"structure"` - - // A cron expression that specifies a schedule when the association runs. - ScheduleExpression *string `min:"1" type:"string"` - - // The instances targeted by the request to create an association. - Targets []*Target `type:"list"` -} - -// String returns the string representation -func (s Association) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Association) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *Association) SetAssociationId(v string) *Association { - s.AssociationId = &v - return s -} - -// SetAssociationName sets the AssociationName field's value. -func (s *Association) SetAssociationName(v string) *Association { - s.AssociationName = &v - return s -} - -// SetAssociationVersion sets the AssociationVersion field's value. -func (s *Association) SetAssociationVersion(v string) *Association { - s.AssociationVersion = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *Association) SetDocumentVersion(v string) *Association { - s.DocumentVersion = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *Association) SetInstanceId(v string) *Association { - s.InstanceId = &v - return s -} - -// SetLastExecutionDate sets the LastExecutionDate field's value. -func (s *Association) SetLastExecutionDate(v time.Time) *Association { - s.LastExecutionDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *Association) SetName(v string) *Association { - s.Name = &v - return s -} - -// SetOverview sets the Overview field's value. -func (s *Association) SetOverview(v *AssociationOverview) *Association { - s.Overview = v - return s -} - -// SetScheduleExpression sets the ScheduleExpression field's value. -func (s *Association) SetScheduleExpression(v string) *Association { - s.ScheduleExpression = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *Association) SetTargets(v []*Target) *Association { - s.Targets = v - return s -} - -// Describes the parameters for a document. -type AssociationDescription struct { - _ struct{} `type:"structure"` - - // The association ID. - AssociationId *string `type:"string"` - - // The association name. - AssociationName *string `type:"string"` - - // The association version. - AssociationVersion *string `type:"string"` - - // Specify the target for the association. This target is required for associations - // that use an Automation document and target resources by using rate controls. - AutomationTargetParameterName *string `min:"1" type:"string"` - - // The severity level that is assigned to the association. - ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` - - // The date when the association was made. - Date *time.Time `type:"timestamp"` - - // The document version. - DocumentVersion *string `type:"string"` - - // The ID of the instance. - InstanceId *string `type:"string"` - - // The date on which the association was last run. - LastExecutionDate *time.Time `type:"timestamp"` - - // The last date on which the association was successfully run. - LastSuccessfulExecutionDate *time.Time `type:"timestamp"` - - // The date when the association was last updated. - LastUpdateAssociationDate *time.Time `type:"timestamp"` - - // The maximum number of targets allowed to run the association at the same - // time. You can specify a number, for example 10, or a percentage of the target - // set, for example 10%. The default value is 100%, which means all targets - // run the association at the same time. - // - // If a new instance starts and attempts to execute an association while Systems - // Manager is executing MaxConcurrency associations, the association is allowed - // to run. During the next association interval, the new instance will process - // its association within the limit specified for MaxConcurrency. - MaxConcurrency *string `min:"1" type:"string"` - - // The number of errors that are allowed before the system stops sending requests - // to run the association on additional targets. You can specify either an absolute - // number of errors, for example 10, or a percentage of the target set, for - // example 10%. If you specify 3, for example, the system stops sending requests - // when the fourth error is received. If you specify 0, then the system stops - // sending requests after the first error is returned. If you run an association - // on 50 instances and set MaxError to 10%, then the system stops sending the - // request when the sixth error is received. - // - // Executions that are already running an association when MaxErrors is reached - // are allowed to complete, but some of these executions may fail as well. If - // you need to ensure that there won't be more than max-errors failed executions, - // set MaxConcurrency to 1 so that executions proceed one at a time. - MaxErrors *string `min:"1" type:"string"` - - // The name of the Systems Manager document. - Name *string `type:"string"` - - // An Amazon S3 bucket where you want to store the output details of the request. - OutputLocation *InstanceAssociationOutputLocation `type:"structure"` - - // Information about the association. - Overview *AssociationOverview `type:"structure"` - - // A description of the parameters for a document. - Parameters map[string][]*string `type:"map"` - - // A cron expression that specifies a schedule when the association runs. - ScheduleExpression *string `min:"1" type:"string"` - - // The association status. - Status *AssociationStatus `type:"structure"` - - // The instances targeted by the request. - Targets []*Target `type:"list"` -} - -// String returns the string representation -func (s AssociationDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociationDescription) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *AssociationDescription) SetAssociationId(v string) *AssociationDescription { - s.AssociationId = &v - return s -} - -// SetAssociationName sets the AssociationName field's value. -func (s *AssociationDescription) SetAssociationName(v string) *AssociationDescription { - s.AssociationName = &v - return s -} - -// SetAssociationVersion sets the AssociationVersion field's value. -func (s *AssociationDescription) SetAssociationVersion(v string) *AssociationDescription { - s.AssociationVersion = &v - return s -} - -// SetAutomationTargetParameterName sets the AutomationTargetParameterName field's value. -func (s *AssociationDescription) SetAutomationTargetParameterName(v string) *AssociationDescription { - s.AutomationTargetParameterName = &v - return s -} - -// SetComplianceSeverity sets the ComplianceSeverity field's value. -func (s *AssociationDescription) SetComplianceSeverity(v string) *AssociationDescription { - s.ComplianceSeverity = &v - return s -} - -// SetDate sets the Date field's value. -func (s *AssociationDescription) SetDate(v time.Time) *AssociationDescription { - s.Date = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *AssociationDescription) SetDocumentVersion(v string) *AssociationDescription { - s.DocumentVersion = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *AssociationDescription) SetInstanceId(v string) *AssociationDescription { - s.InstanceId = &v - return s -} - -// SetLastExecutionDate sets the LastExecutionDate field's value. -func (s *AssociationDescription) SetLastExecutionDate(v time.Time) *AssociationDescription { - s.LastExecutionDate = &v - return s -} - -// SetLastSuccessfulExecutionDate sets the LastSuccessfulExecutionDate field's value. -func (s *AssociationDescription) SetLastSuccessfulExecutionDate(v time.Time) *AssociationDescription { - s.LastSuccessfulExecutionDate = &v - return s -} - -// SetLastUpdateAssociationDate sets the LastUpdateAssociationDate field's value. -func (s *AssociationDescription) SetLastUpdateAssociationDate(v time.Time) *AssociationDescription { - s.LastUpdateAssociationDate = &v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *AssociationDescription) SetMaxConcurrency(v string) *AssociationDescription { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *AssociationDescription) SetMaxErrors(v string) *AssociationDescription { - s.MaxErrors = &v - return s -} - -// SetName sets the Name field's value. -func (s *AssociationDescription) SetName(v string) *AssociationDescription { - s.Name = &v - return s -} - -// SetOutputLocation sets the OutputLocation field's value. -func (s *AssociationDescription) SetOutputLocation(v *InstanceAssociationOutputLocation) *AssociationDescription { - s.OutputLocation = v - return s -} - -// SetOverview sets the Overview field's value. -func (s *AssociationDescription) SetOverview(v *AssociationOverview) *AssociationDescription { - s.Overview = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *AssociationDescription) SetParameters(v map[string][]*string) *AssociationDescription { - s.Parameters = v - return s -} - -// SetScheduleExpression sets the ScheduleExpression field's value. -func (s *AssociationDescription) SetScheduleExpression(v string) *AssociationDescription { - s.ScheduleExpression = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AssociationDescription) SetStatus(v *AssociationStatus) *AssociationDescription { - s.Status = v - return s -} - -// SetTargets sets the Targets field's value. -func (s *AssociationDescription) SetTargets(v []*Target) *AssociationDescription { - s.Targets = v - return s -} - -// Includes information about the specified association. -type AssociationExecution struct { - _ struct{} `type:"structure"` - - // The association ID. - AssociationId *string `type:"string"` - - // The association version. - AssociationVersion *string `type:"string"` - - // The time the execution started. - CreatedTime *time.Time `type:"timestamp"` - - // Detailed status information about the execution. - DetailedStatus *string `type:"string"` - - // The execution ID for the association. If the association does not run at - // intervals or according to a schedule, then the ExecutionID is the same as - // the AssociationID. - ExecutionId *string `type:"string"` - - // The date of the last execution. - LastExecutionDate *time.Time `type:"timestamp"` - - // An aggregate status of the resources in the execution based on the status - // type. - ResourceCountByStatus *string `type:"string"` - - // The status of the association execution. - Status *string `type:"string"` -} - -// String returns the string representation -func (s AssociationExecution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociationExecution) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *AssociationExecution) SetAssociationId(v string) *AssociationExecution { - s.AssociationId = &v - return s -} - -// SetAssociationVersion sets the AssociationVersion field's value. -func (s *AssociationExecution) SetAssociationVersion(v string) *AssociationExecution { - s.AssociationVersion = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *AssociationExecution) SetCreatedTime(v time.Time) *AssociationExecution { - s.CreatedTime = &v - return s -} - -// SetDetailedStatus sets the DetailedStatus field's value. -func (s *AssociationExecution) SetDetailedStatus(v string) *AssociationExecution { - s.DetailedStatus = &v - return s -} - -// SetExecutionId sets the ExecutionId field's value. -func (s *AssociationExecution) SetExecutionId(v string) *AssociationExecution { - s.ExecutionId = &v - return s -} - -// SetLastExecutionDate sets the LastExecutionDate field's value. -func (s *AssociationExecution) SetLastExecutionDate(v time.Time) *AssociationExecution { - s.LastExecutionDate = &v - return s -} - -// SetResourceCountByStatus sets the ResourceCountByStatus field's value. -func (s *AssociationExecution) SetResourceCountByStatus(v string) *AssociationExecution { - s.ResourceCountByStatus = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AssociationExecution) SetStatus(v string) *AssociationExecution { - s.Status = &v - return s -} - -// Filters used in the request. -type AssociationExecutionFilter struct { - _ struct{} `type:"structure"` - - // The key value used in the request. - // - // Key is a required field - Key *string `type:"string" required:"true" enum:"AssociationExecutionFilterKey"` - - // The filter type specified in the request. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"AssociationFilterOperatorType"` - - // The value specified for the key. - // - // Value is a required field - Value *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociationExecutionFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociationExecutionFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociationExecutionFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociationExecutionFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *AssociationExecutionFilter) SetKey(v string) *AssociationExecutionFilter { - s.Key = &v - return s -} - -// SetType sets the Type field's value. -func (s *AssociationExecutionFilter) SetType(v string) *AssociationExecutionFilter { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *AssociationExecutionFilter) SetValue(v string) *AssociationExecutionFilter { - s.Value = &v - return s -} - -// Includes information about the specified association execution. -type AssociationExecutionTarget struct { - _ struct{} `type:"structure"` - - // The association ID. - AssociationId *string `type:"string"` - - // The association version. - AssociationVersion *string `type:"string"` - - // Detailed information about the execution status. - DetailedStatus *string `type:"string"` - - // The execution ID. If the association does not run at intervals or according - // to a schedule, then the ExecutionID is the same as the AssociationID. - ExecutionId *string `type:"string"` - - // The date of the last execution. - LastExecutionDate *time.Time `type:"timestamp"` - - // The location where the association details are saved. - OutputSource *OutputSource `type:"structure"` - - // The resource ID, for example, the instance ID where the association ran. - ResourceId *string `min:"1" type:"string"` - - // The resource type, for example, instance. - ResourceType *string `min:"1" type:"string"` - - // The association execution status. - Status *string `type:"string"` -} - -// String returns the string representation -func (s AssociationExecutionTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociationExecutionTarget) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *AssociationExecutionTarget) SetAssociationId(v string) *AssociationExecutionTarget { - s.AssociationId = &v - return s -} - -// SetAssociationVersion sets the AssociationVersion field's value. -func (s *AssociationExecutionTarget) SetAssociationVersion(v string) *AssociationExecutionTarget { - s.AssociationVersion = &v - return s -} - -// SetDetailedStatus sets the DetailedStatus field's value. -func (s *AssociationExecutionTarget) SetDetailedStatus(v string) *AssociationExecutionTarget { - s.DetailedStatus = &v - return s -} - -// SetExecutionId sets the ExecutionId field's value. -func (s *AssociationExecutionTarget) SetExecutionId(v string) *AssociationExecutionTarget { - s.ExecutionId = &v - return s -} - -// SetLastExecutionDate sets the LastExecutionDate field's value. -func (s *AssociationExecutionTarget) SetLastExecutionDate(v time.Time) *AssociationExecutionTarget { - s.LastExecutionDate = &v - return s -} - -// SetOutputSource sets the OutputSource field's value. -func (s *AssociationExecutionTarget) SetOutputSource(v *OutputSource) *AssociationExecutionTarget { - s.OutputSource = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *AssociationExecutionTarget) SetResourceId(v string) *AssociationExecutionTarget { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *AssociationExecutionTarget) SetResourceType(v string) *AssociationExecutionTarget { - s.ResourceType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AssociationExecutionTarget) SetStatus(v string) *AssociationExecutionTarget { - s.Status = &v - return s -} - -// Filters for the association execution. -type AssociationExecutionTargetsFilter struct { - _ struct{} `type:"structure"` - - // The key value used in the request. - // - // Key is a required field - Key *string `type:"string" required:"true" enum:"AssociationExecutionTargetsFilterKey"` - - // The value specified for the key. - // - // Value is a required field - Value *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociationExecutionTargetsFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociationExecutionTargetsFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociationExecutionTargetsFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociationExecutionTargetsFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *AssociationExecutionTargetsFilter) SetKey(v string) *AssociationExecutionTargetsFilter { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *AssociationExecutionTargetsFilter) SetValue(v string) *AssociationExecutionTargetsFilter { - s.Value = &v - return s -} - -// Describes a filter. -type AssociationFilter struct { - _ struct{} `type:"structure"` - - // The name of the filter. - // - // Key is a required field - Key *string `locationName:"key" type:"string" required:"true" enum:"AssociationFilterKey"` - - // The filter value. - // - // Value is a required field - Value *string `locationName:"value" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociationFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociationFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociationFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociationFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *AssociationFilter) SetKey(v string) *AssociationFilter { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *AssociationFilter) SetValue(v string) *AssociationFilter { - s.Value = &v - return s -} - -// Information about the association. -type AssociationOverview struct { - _ struct{} `type:"structure"` - - // Returns the number of targets for the association status. For example, if - // you created an association with two instances, and one of them was successful, - // this would return the count of instances by status. - AssociationStatusAggregatedCount map[string]*int64 `type:"map"` - - // A detailed status of the association. - DetailedStatus *string `type:"string"` - - // The status of the association. Status can be: Pending, Success, or Failed. - Status *string `type:"string"` -} - -// String returns the string representation -func (s AssociationOverview) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociationOverview) GoString() string { - return s.String() -} - -// SetAssociationStatusAggregatedCount sets the AssociationStatusAggregatedCount field's value. -func (s *AssociationOverview) SetAssociationStatusAggregatedCount(v map[string]*int64) *AssociationOverview { - s.AssociationStatusAggregatedCount = v - return s -} - -// SetDetailedStatus sets the DetailedStatus field's value. -func (s *AssociationOverview) SetDetailedStatus(v string) *AssociationOverview { - s.DetailedStatus = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AssociationOverview) SetStatus(v string) *AssociationOverview { - s.Status = &v - return s -} - -// Describes an association status. -type AssociationStatus struct { - _ struct{} `type:"structure"` - - // A user-defined string. - AdditionalInfo *string `type:"string"` - - // The date when the status changed. - // - // Date is a required field - Date *time.Time `type:"timestamp" required:"true"` - - // The reason for the status. - // - // Message is a required field - Message *string `min:"1" type:"string" required:"true"` - - // The status. - // - // Name is a required field - Name *string `type:"string" required:"true" enum:"AssociationStatusName"` -} - -// String returns the string representation -func (s AssociationStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociationStatus) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociationStatus) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociationStatus"} - if s.Date == nil { - invalidParams.Add(request.NewErrParamRequired("Date")) - } - if s.Message == nil { - invalidParams.Add(request.NewErrParamRequired("Message")) - } - if s.Message != nil && len(*s.Message) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Message", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAdditionalInfo sets the AdditionalInfo field's value. -func (s *AssociationStatus) SetAdditionalInfo(v string) *AssociationStatus { - s.AdditionalInfo = &v - return s -} - -// SetDate sets the Date field's value. -func (s *AssociationStatus) SetDate(v time.Time) *AssociationStatus { - s.Date = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *AssociationStatus) SetMessage(v string) *AssociationStatus { - s.Message = &v - return s -} - -// SetName sets the Name field's value. -func (s *AssociationStatus) SetName(v string) *AssociationStatus { - s.Name = &v - return s -} - -// Information about the association version. -type AssociationVersionInfo struct { - _ struct{} `type:"structure"` - - // The ID created by the system when the association was created. - AssociationId *string `type:"string"` - - // The name specified for the association version when the association version - // was created. - AssociationName *string `type:"string"` - - // The association version. - AssociationVersion *string `type:"string"` - - // The severity level that is assigned to the association. - ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` - - // The date the association version was created. - CreatedDate *time.Time `type:"timestamp"` - - // The version of a Systems Manager document used when the association version - // was created. - DocumentVersion *string `type:"string"` - - // The maximum number of targets allowed to run the association at the same - // time. You can specify a number, for example 10, or a percentage of the target - // set, for example 10%. The default value is 100%, which means all targets - // run the association at the same time. - // - // If a new instance starts and attempts to execute an association while Systems - // Manager is executing MaxConcurrency associations, the association is allowed - // to run. During the next association interval, the new instance will process - // its association within the limit specified for MaxConcurrency. - MaxConcurrency *string `min:"1" type:"string"` - - // The number of errors that are allowed before the system stops sending requests - // to run the association on additional targets. You can specify either an absolute - // number of errors, for example 10, or a percentage of the target set, for - // example 10%. If you specify 3, for example, the system stops sending requests - // when the fourth error is received. If you specify 0, then the system stops - // sending requests after the first error is returned. If you run an association - // on 50 instances and set MaxError to 10%, then the system stops sending the - // request when the sixth error is received. - // - // Executions that are already running an association when MaxErrors is reached - // are allowed to complete, but some of these executions may fail as well. If - // you need to ensure that there won't be more than max-errors failed executions, - // set MaxConcurrency to 1 so that executions proceed one at a time. - MaxErrors *string `min:"1" type:"string"` - - // The name specified when the association was created. - Name *string `type:"string"` - - // The location in Amazon S3 specified for the association when the association - // version was created. - OutputLocation *InstanceAssociationOutputLocation `type:"structure"` - - // Parameters specified when the association version was created. - Parameters map[string][]*string `type:"map"` - - // The cron or rate schedule specified for the association when the association - // version was created. - ScheduleExpression *string `min:"1" type:"string"` - - // The targets specified for the association when the association version was - // created. - Targets []*Target `type:"list"` -} - -// String returns the string representation -func (s AssociationVersionInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociationVersionInfo) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *AssociationVersionInfo) SetAssociationId(v string) *AssociationVersionInfo { - s.AssociationId = &v - return s -} - -// SetAssociationName sets the AssociationName field's value. -func (s *AssociationVersionInfo) SetAssociationName(v string) *AssociationVersionInfo { - s.AssociationName = &v - return s -} - -// SetAssociationVersion sets the AssociationVersion field's value. -func (s *AssociationVersionInfo) SetAssociationVersion(v string) *AssociationVersionInfo { - s.AssociationVersion = &v - return s -} - -// SetComplianceSeverity sets the ComplianceSeverity field's value. -func (s *AssociationVersionInfo) SetComplianceSeverity(v string) *AssociationVersionInfo { - s.ComplianceSeverity = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *AssociationVersionInfo) SetCreatedDate(v time.Time) *AssociationVersionInfo { - s.CreatedDate = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *AssociationVersionInfo) SetDocumentVersion(v string) *AssociationVersionInfo { - s.DocumentVersion = &v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *AssociationVersionInfo) SetMaxConcurrency(v string) *AssociationVersionInfo { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *AssociationVersionInfo) SetMaxErrors(v string) *AssociationVersionInfo { - s.MaxErrors = &v - return s -} - -// SetName sets the Name field's value. -func (s *AssociationVersionInfo) SetName(v string) *AssociationVersionInfo { - s.Name = &v - return s -} - -// SetOutputLocation sets the OutputLocation field's value. -func (s *AssociationVersionInfo) SetOutputLocation(v *InstanceAssociationOutputLocation) *AssociationVersionInfo { - s.OutputLocation = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *AssociationVersionInfo) SetParameters(v map[string][]*string) *AssociationVersionInfo { - s.Parameters = v - return s -} - -// SetScheduleExpression sets the ScheduleExpression field's value. -func (s *AssociationVersionInfo) SetScheduleExpression(v string) *AssociationVersionInfo { - s.ScheduleExpression = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *AssociationVersionInfo) SetTargets(v []*Target) *AssociationVersionInfo { - s.Targets = v - return s -} - -// A structure that includes attributes that describe a document attachment. -type AttachmentContent struct { - _ struct{} `type:"structure"` - - // The cryptographic hash value of the document content. - Hash *string `type:"string"` - - // The hash algorithm used to calculate the hash value. - HashType *string `type:"string" enum:"AttachmentHashType"` - - // The name of an attachment. - Name *string `type:"string"` - - // The size of an attachment in bytes. - Size *int64 `type:"long"` - - // The URL location of the attachment content. - Url *string `type:"string"` -} - -// String returns the string representation -func (s AttachmentContent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachmentContent) GoString() string { - return s.String() -} - -// SetHash sets the Hash field's value. -func (s *AttachmentContent) SetHash(v string) *AttachmentContent { - s.Hash = &v - return s -} - -// SetHashType sets the HashType field's value. -func (s *AttachmentContent) SetHashType(v string) *AttachmentContent { - s.HashType = &v - return s -} - -// SetName sets the Name field's value. -func (s *AttachmentContent) SetName(v string) *AttachmentContent { - s.Name = &v - return s -} - -// SetSize sets the Size field's value. -func (s *AttachmentContent) SetSize(v int64) *AttachmentContent { - s.Size = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *AttachmentContent) SetUrl(v string) *AttachmentContent { - s.Url = &v - return s -} - -// An attribute of an attachment, such as the attachment name. -type AttachmentInformation struct { - _ struct{} `type:"structure"` - - // The name of the attachment. - Name *string `type:"string"` -} - -// String returns the string representation -func (s AttachmentInformation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachmentInformation) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *AttachmentInformation) SetName(v string) *AttachmentInformation { - s.Name = &v - return s -} - -// A key and 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 - // 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. - Values []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s AttachmentsSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachmentsSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachmentsSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachmentsSource"} - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *AttachmentsSource) SetKey(v string) *AttachmentsSource { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *AttachmentsSource) SetValues(v []*string) *AttachmentsSource { - s.Values = v - return s -} - -// Detailed information about the current state of an individual Automation -// execution. -type AutomationExecution struct { - _ struct{} `type:"structure"` - - // The execution ID. - AutomationExecutionId *string `min:"36" type:"string"` - - // The execution status of the Automation. - AutomationExecutionStatus *string `type:"string" enum:"AutomationExecutionStatus"` - - // The action of the currently executing step. - CurrentAction *string `type:"string"` - - // The name of the currently executing step. - CurrentStepName *string `type:"string"` - - // The name of the Automation document used during the execution. - DocumentName *string `type:"string"` - - // The version of the document to use during execution. - DocumentVersion *string `type:"string"` - - // The Amazon Resource Name (ARN) of the user who executed the automation. - ExecutedBy *string `type:"string"` - - // The time the execution finished. - ExecutionEndTime *time.Time `type:"timestamp"` - - // The time the execution started. - ExecutionStartTime *time.Time `type:"timestamp"` - - // A message describing why an execution has failed, if the status is set to - // Failed. - FailureMessage *string `type:"string"` - - // The MaxConcurrency value specified by the user when the execution started. - MaxConcurrency *string `min:"1" type:"string"` - - // The MaxErrors value specified by the user when the execution started. - MaxErrors *string `min:"1" type:"string"` - - // The automation execution mode. - Mode *string `type:"string" enum:"ExecutionMode"` - - // The list of execution outputs as defined in the automation document. - Outputs map[string][]*string `min:"1" type:"map"` - - // The key-value map of execution parameters, which were supplied when calling - // StartAutomationExecution. - Parameters map[string][]*string `min:"1" type:"map"` - - // The AutomationExecutionId of the parent automation. - ParentAutomationExecutionId *string `min:"36" type:"string"` - - // An aggregate of step execution statuses displayed in the AWS Console for - // a multi-Region and multi-account Automation execution. - ProgressCounters *ProgressCounters `type:"structure"` - - // A list of resolved targets in the rate control execution. - ResolvedTargets *ResolvedTargets `type:"structure"` - - // A list of details about the current state of all steps that comprise an execution. - // An Automation document contains a list of steps that are executed in order. - StepExecutions []*StepExecution `type:"list"` - - // A boolean value that indicates if the response contains the full list of - // the Automation step executions. If true, use the DescribeAutomationStepExecutions - // API action to get the full list of step executions. - StepExecutionsTruncated *bool `type:"boolean"` - - // The target of the execution. - Target *string `type:"string"` - - // The combination of AWS Regions and/or AWS accounts where you want to execute - // the Automation. - TargetLocations []*TargetLocation `min:"1" type:"list"` - - // The specified key-value mapping of document parameters to target resources. - TargetMaps []map[string][]*string `type:"list"` - - // The parameter name. - TargetParameterName *string `min:"1" type:"string"` - - // The specified targets. - Targets []*Target `type:"list"` -} - -// String returns the string representation -func (s AutomationExecution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AutomationExecution) GoString() string { - return s.String() -} - -// SetAutomationExecutionId sets the AutomationExecutionId field's value. -func (s *AutomationExecution) SetAutomationExecutionId(v string) *AutomationExecution { - s.AutomationExecutionId = &v - return s -} - -// SetAutomationExecutionStatus sets the AutomationExecutionStatus field's value. -func (s *AutomationExecution) SetAutomationExecutionStatus(v string) *AutomationExecution { - s.AutomationExecutionStatus = &v - return s -} - -// SetCurrentAction sets the CurrentAction field's value. -func (s *AutomationExecution) SetCurrentAction(v string) *AutomationExecution { - s.CurrentAction = &v - return s -} - -// SetCurrentStepName sets the CurrentStepName field's value. -func (s *AutomationExecution) SetCurrentStepName(v string) *AutomationExecution { - s.CurrentStepName = &v - return s -} - -// SetDocumentName sets the DocumentName field's value. -func (s *AutomationExecution) SetDocumentName(v string) *AutomationExecution { - s.DocumentName = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *AutomationExecution) SetDocumentVersion(v string) *AutomationExecution { - s.DocumentVersion = &v - return s -} - -// SetExecutedBy sets the ExecutedBy field's value. -func (s *AutomationExecution) SetExecutedBy(v string) *AutomationExecution { - s.ExecutedBy = &v - return s -} - -// SetExecutionEndTime sets the ExecutionEndTime field's value. -func (s *AutomationExecution) SetExecutionEndTime(v time.Time) *AutomationExecution { - s.ExecutionEndTime = &v - return s -} - -// SetExecutionStartTime sets the ExecutionStartTime field's value. -func (s *AutomationExecution) SetExecutionStartTime(v time.Time) *AutomationExecution { - s.ExecutionStartTime = &v - return s -} - -// SetFailureMessage sets the FailureMessage field's value. -func (s *AutomationExecution) SetFailureMessage(v string) *AutomationExecution { - s.FailureMessage = &v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *AutomationExecution) SetMaxConcurrency(v string) *AutomationExecution { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *AutomationExecution) SetMaxErrors(v string) *AutomationExecution { - s.MaxErrors = &v - return s -} - -// SetMode sets the Mode field's value. -func (s *AutomationExecution) SetMode(v string) *AutomationExecution { - s.Mode = &v - return s -} - -// SetOutputs sets the Outputs field's value. -func (s *AutomationExecution) SetOutputs(v map[string][]*string) *AutomationExecution { - s.Outputs = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *AutomationExecution) SetParameters(v map[string][]*string) *AutomationExecution { - s.Parameters = v - return s -} - -// SetParentAutomationExecutionId sets the ParentAutomationExecutionId field's value. -func (s *AutomationExecution) SetParentAutomationExecutionId(v string) *AutomationExecution { - s.ParentAutomationExecutionId = &v - return s -} - -// SetProgressCounters sets the ProgressCounters field's value. -func (s *AutomationExecution) SetProgressCounters(v *ProgressCounters) *AutomationExecution { - s.ProgressCounters = v - return s -} - -// SetResolvedTargets sets the ResolvedTargets field's value. -func (s *AutomationExecution) SetResolvedTargets(v *ResolvedTargets) *AutomationExecution { - s.ResolvedTargets = v - return s -} - -// SetStepExecutions sets the StepExecutions field's value. -func (s *AutomationExecution) SetStepExecutions(v []*StepExecution) *AutomationExecution { - s.StepExecutions = v - return s -} - -// SetStepExecutionsTruncated sets the StepExecutionsTruncated field's value. -func (s *AutomationExecution) SetStepExecutionsTruncated(v bool) *AutomationExecution { - s.StepExecutionsTruncated = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *AutomationExecution) SetTarget(v string) *AutomationExecution { - s.Target = &v - return s -} - -// SetTargetLocations sets the TargetLocations field's value. -func (s *AutomationExecution) SetTargetLocations(v []*TargetLocation) *AutomationExecution { - s.TargetLocations = v - return s -} - -// SetTargetMaps sets the TargetMaps field's value. -func (s *AutomationExecution) SetTargetMaps(v []map[string][]*string) *AutomationExecution { - s.TargetMaps = v - return s -} - -// SetTargetParameterName sets the TargetParameterName field's value. -func (s *AutomationExecution) SetTargetParameterName(v string) *AutomationExecution { - s.TargetParameterName = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *AutomationExecution) SetTargets(v []*Target) *AutomationExecution { - s.Targets = v - return s -} - -// A filter used to match specific automation executions. This is used to limit -// the scope of Automation execution information returned. -type AutomationExecutionFilter struct { - _ struct{} `type:"structure"` - - // One or more keys to limit the results. Valid filter keys include the following: - // DocumentNamePrefix, ExecutionStatus, ExecutionId, ParentExecutionId, CurrentAction, - // StartTimeBefore, StartTimeAfter. - // - // Key is a required field - Key *string `type:"string" required:"true" enum:"AutomationExecutionFilterKey"` - - // The values used to limit the execution information associated with the filter's - // key. - // - // Values is a required field - Values []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s AutomationExecutionFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AutomationExecutionFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AutomationExecutionFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AutomationExecutionFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *AutomationExecutionFilter) SetKey(v string) *AutomationExecutionFilter { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *AutomationExecutionFilter) SetValues(v []*string) *AutomationExecutionFilter { - s.Values = v - return s -} - -// Details about a specific Automation execution. -type AutomationExecutionMetadata struct { - _ struct{} `type:"structure"` - - // The execution ID. - AutomationExecutionId *string `min:"36" type:"string"` - - // The status of the execution. Valid values include: Running, Succeeded, Failed, - // Timed out, or Cancelled. - AutomationExecutionStatus *string `type:"string" enum:"AutomationExecutionStatus"` - - // Use this filter with DescribeAutomationExecutions. Specify either Local or - // CrossAccount. CrossAccount is an Automation that executes in multiple AWS - // Regions and accounts. For more information, see Concurrently Executing Automations - // in Multiple AWS Regions and Accounts (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html) - // in the AWS Systems Manager User Guide. - AutomationType *string `type:"string" enum:"AutomationType"` - - // The action of the currently executing step. - CurrentAction *string `type:"string"` - - // The name of the currently executing step. - CurrentStepName *string `type:"string"` - - // The name of the Automation document used during execution. - DocumentName *string `type:"string"` - - // The document version used during the execution. - DocumentVersion *string `type:"string"` - - // The IAM role ARN of the user who executed the Automation. - ExecutedBy *string `type:"string"` - - // The time the execution finished. This is not populated if the execution is - // still in progress. - ExecutionEndTime *time.Time `type:"timestamp"` - - // The time the execution started.> - ExecutionStartTime *time.Time `type:"timestamp"` - - // The list of execution outputs as defined in the Automation document. - FailureMessage *string `type:"string"` - - // An Amazon S3 bucket where execution information is stored. - LogFile *string `type:"string"` - - // The MaxConcurrency value specified by the user when starting the Automation. - MaxConcurrency *string `min:"1" type:"string"` - - // The MaxErrors value specified by the user when starting the Automation. - MaxErrors *string `min:"1" type:"string"` - - // The Automation execution mode. - Mode *string `type:"string" enum:"ExecutionMode"` - - // The list of execution outputs as defined in the Automation document. - Outputs map[string][]*string `min:"1" type:"map"` - - // The ExecutionId of the parent Automation. - ParentAutomationExecutionId *string `min:"36" type:"string"` - - // A list of targets that resolved during the execution. - ResolvedTargets *ResolvedTargets `type:"structure"` - - // The list of execution outputs as defined in the Automation document. - Target *string `type:"string"` - - // The specified key-value mapping of document parameters to target resources. - TargetMaps []map[string][]*string `type:"list"` - - // The list of execution outputs as defined in the Automation document. - TargetParameterName *string `min:"1" type:"string"` - - // The targets defined by the user when starting the Automation. - Targets []*Target `type:"list"` -} - -// String returns the string representation -func (s AutomationExecutionMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AutomationExecutionMetadata) GoString() string { - return s.String() -} - -// SetAutomationExecutionId sets the AutomationExecutionId field's value. -func (s *AutomationExecutionMetadata) SetAutomationExecutionId(v string) *AutomationExecutionMetadata { - s.AutomationExecutionId = &v - return s -} - -// SetAutomationExecutionStatus sets the AutomationExecutionStatus field's value. -func (s *AutomationExecutionMetadata) SetAutomationExecutionStatus(v string) *AutomationExecutionMetadata { - s.AutomationExecutionStatus = &v - return s -} - -// SetAutomationType sets the AutomationType field's value. -func (s *AutomationExecutionMetadata) SetAutomationType(v string) *AutomationExecutionMetadata { - s.AutomationType = &v - return s -} - -// SetCurrentAction sets the CurrentAction field's value. -func (s *AutomationExecutionMetadata) SetCurrentAction(v string) *AutomationExecutionMetadata { - s.CurrentAction = &v - return s -} - -// SetCurrentStepName sets the CurrentStepName field's value. -func (s *AutomationExecutionMetadata) SetCurrentStepName(v string) *AutomationExecutionMetadata { - s.CurrentStepName = &v - return s -} - -// SetDocumentName sets the DocumentName field's value. -func (s *AutomationExecutionMetadata) SetDocumentName(v string) *AutomationExecutionMetadata { - s.DocumentName = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *AutomationExecutionMetadata) SetDocumentVersion(v string) *AutomationExecutionMetadata { - s.DocumentVersion = &v - return s -} - -// SetExecutedBy sets the ExecutedBy field's value. -func (s *AutomationExecutionMetadata) SetExecutedBy(v string) *AutomationExecutionMetadata { - s.ExecutedBy = &v - return s -} - -// SetExecutionEndTime sets the ExecutionEndTime field's value. -func (s *AutomationExecutionMetadata) SetExecutionEndTime(v time.Time) *AutomationExecutionMetadata { - s.ExecutionEndTime = &v - return s -} - -// SetExecutionStartTime sets the ExecutionStartTime field's value. -func (s *AutomationExecutionMetadata) SetExecutionStartTime(v time.Time) *AutomationExecutionMetadata { - s.ExecutionStartTime = &v - return s -} - -// SetFailureMessage sets the FailureMessage field's value. -func (s *AutomationExecutionMetadata) SetFailureMessage(v string) *AutomationExecutionMetadata { - s.FailureMessage = &v - return s -} - -// SetLogFile sets the LogFile field's value. -func (s *AutomationExecutionMetadata) SetLogFile(v string) *AutomationExecutionMetadata { - s.LogFile = &v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *AutomationExecutionMetadata) SetMaxConcurrency(v string) *AutomationExecutionMetadata { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *AutomationExecutionMetadata) SetMaxErrors(v string) *AutomationExecutionMetadata { - s.MaxErrors = &v - return s -} - -// SetMode sets the Mode field's value. -func (s *AutomationExecutionMetadata) SetMode(v string) *AutomationExecutionMetadata { - s.Mode = &v - return s -} - -// SetOutputs sets the Outputs field's value. -func (s *AutomationExecutionMetadata) SetOutputs(v map[string][]*string) *AutomationExecutionMetadata { - s.Outputs = v - return s -} - -// SetParentAutomationExecutionId sets the ParentAutomationExecutionId field's value. -func (s *AutomationExecutionMetadata) SetParentAutomationExecutionId(v string) *AutomationExecutionMetadata { - s.ParentAutomationExecutionId = &v - return s -} - -// SetResolvedTargets sets the ResolvedTargets field's value. -func (s *AutomationExecutionMetadata) SetResolvedTargets(v *ResolvedTargets) *AutomationExecutionMetadata { - s.ResolvedTargets = v - return s -} - -// SetTarget sets the Target field's value. -func (s *AutomationExecutionMetadata) SetTarget(v string) *AutomationExecutionMetadata { - s.Target = &v - return s -} - -// SetTargetMaps sets the TargetMaps field's value. -func (s *AutomationExecutionMetadata) SetTargetMaps(v []map[string][]*string) *AutomationExecutionMetadata { - s.TargetMaps = v - return s -} - -// SetTargetParameterName sets the TargetParameterName field's value. -func (s *AutomationExecutionMetadata) SetTargetParameterName(v string) *AutomationExecutionMetadata { - s.TargetParameterName = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *AutomationExecutionMetadata) SetTargets(v []*Target) *AutomationExecutionMetadata { - s.Targets = v - return s -} - -type CancelCommandInput struct { - _ struct{} `type:"structure"` - - // The ID of the command you want to cancel. - // - // CommandId is a required field - CommandId *string `min:"36" type:"string" required:"true"` - - // (Optional) A list of instance IDs on which you want to cancel the command. - // If not provided, the command is canceled on every instance on which it was - // requested. - InstanceIds []*string `type:"list"` -} - -// String returns the string representation -func (s CancelCommandInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelCommandInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelCommandInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelCommandInput"} - if s.CommandId == nil { - invalidParams.Add(request.NewErrParamRequired("CommandId")) - } - if s.CommandId != nil && len(*s.CommandId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("CommandId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCommandId sets the CommandId field's value. -func (s *CancelCommandInput) SetCommandId(v string) *CancelCommandInput { - s.CommandId = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *CancelCommandInput) SetInstanceIds(v []*string) *CancelCommandInput { - s.InstanceIds = v - return s -} - -// Whether or not the command was successfully canceled. There is no guarantee -// that a request can be canceled. -type CancelCommandOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CancelCommandOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelCommandOutput) GoString() string { - return s.String() -} - -type CancelMaintenanceWindowExecutionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Maintenance Window execution to stop. - // - // WindowExecutionId is a required field - WindowExecutionId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelMaintenanceWindowExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelMaintenanceWindowExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelMaintenanceWindowExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelMaintenanceWindowExecutionInput"} - if s.WindowExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowExecutionId")) - } - if s.WindowExecutionId != nil && len(*s.WindowExecutionId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("WindowExecutionId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWindowExecutionId sets the WindowExecutionId field's value. -func (s *CancelMaintenanceWindowExecutionInput) SetWindowExecutionId(v string) *CancelMaintenanceWindowExecutionInput { - s.WindowExecutionId = &v - return s -} - -type CancelMaintenanceWindowExecutionOutput struct { - _ struct{} `type:"structure"` - - // The ID of the Maintenance Window execution that has been stopped. - WindowExecutionId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s CancelMaintenanceWindowExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelMaintenanceWindowExecutionOutput) GoString() string { - return s.String() -} - -// SetWindowExecutionId sets the WindowExecutionId field's value. -func (s *CancelMaintenanceWindowExecutionOutput) SetWindowExecutionId(v string) *CancelMaintenanceWindowExecutionOutput { - s.WindowExecutionId = &v - return s -} - -// Configuration options for sending command output to CloudWatch Logs. -type CloudWatchOutputConfig struct { - _ struct{} `type:"structure"` - - // The name of the CloudWatch log group where you want to send command output. - // If you don't specify a group name, Systems Manager automatically creates - // a log group for you. The log group uses the following naming format: aws/ssm/SystemsManagerDocumentName. - CloudWatchLogGroupName *string `min:"1" type:"string"` - - // Enables Systems Manager to send command output to CloudWatch Logs. - CloudWatchOutputEnabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s CloudWatchOutputConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloudWatchOutputConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CloudWatchOutputConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloudWatchOutputConfig"} - if s.CloudWatchLogGroupName != nil && len(*s.CloudWatchLogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CloudWatchLogGroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchLogGroupName sets the CloudWatchLogGroupName field's value. -func (s *CloudWatchOutputConfig) SetCloudWatchLogGroupName(v string) *CloudWatchOutputConfig { - s.CloudWatchLogGroupName = &v - return s -} - -// SetCloudWatchOutputEnabled sets the CloudWatchOutputEnabled field's value. -func (s *CloudWatchOutputConfig) SetCloudWatchOutputEnabled(v bool) *CloudWatchOutputConfig { - s.CloudWatchOutputEnabled = &v - return s -} - -// Describes a command request. -type Command struct { - _ struct{} `type:"structure"` - - // CloudWatch Logs information where you want Systems Manager to send the command - // output. - CloudWatchOutputConfig *CloudWatchOutputConfig `type:"structure"` - - // A unique identifier for this command. - CommandId *string `min:"36" type:"string"` - - // User-specified information about the command, such as a brief description - // of what the command should do. - Comment *string `type:"string"` - - // The number of targets for which the command invocation reached a terminal - // state. Terminal states include the following: Success, Failed, Execution - // Timed Out, Delivery Timed Out, Canceled, Terminated, or Undeliverable. - CompletedCount *int64 `type:"integer"` - - // The number of targets for which the status is Delivery Timed Out. - DeliveryTimedOutCount *int64 `type:"integer"` - - // The name of the document requested for execution. - DocumentName *string `type:"string"` - - // The SSM document version. - DocumentVersion *string `type:"string"` - - // The number of targets for which the status is Failed or Execution Timed Out. - ErrorCount *int64 `type:"integer"` - - // If this time is reached and the command has not already started executing, - // it will not run. Calculated based on the ExpiresAfter user input provided - // as part of the SendCommand API. - ExpiresAfter *time.Time `type:"timestamp"` - - // The instance IDs against which this command was requested. - InstanceIds []*string `type:"list"` - - // The maximum number of instances that are allowed to execute the command at - // the same time. You can specify a number of instances, such as 10, or a percentage - // of instances, such as 10%. The default value is 50. For more information - // about how to use MaxConcurrency, see Executing Commands Using Systems Manager - // Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html) - // in the AWS Systems Manager User Guide. - MaxConcurrency *string `min:"1" type:"string"` - - // The maximum number of errors allowed before the system stops sending the - // command to additional targets. You can specify a number of errors, such as - // 10, or a percentage or errors, such as 10%. The default value is 0. For more - // information about how to use MaxErrors, see Executing Commands Using Systems - // Manager Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html) - // in the AWS Systems Manager User Guide. - MaxErrors *string `min:"1" type:"string"` - - // Configurations for sending notifications about command status changes. - NotificationConfig *NotificationConfig `type:"structure"` - - // The S3 bucket where the responses to the command executions should be stored. - // This was requested when issuing the command. - OutputS3BucketName *string `min:"3" type:"string"` - - // The S3 directory path inside the bucket where the responses to the command - // executions should be stored. This was requested when issuing the command. - OutputS3KeyPrefix *string `type:"string"` - - // (Deprecated) You can no longer specify this parameter. The system ignores - // it. Instead, Systems Manager automatically determines the Amazon S3 bucket - // region. - OutputS3Region *string `min:"3" type:"string"` - - // The parameter values to be inserted in the document when executing the command. - Parameters map[string][]*string `type:"map"` - - // The date and time the command was requested. - RequestedDateTime *time.Time `type:"timestamp"` - - // The IAM service role that Run Command uses to act on your behalf when sending - // notifications about command status changes. - ServiceRole *string `type:"string"` - - // The status of the command. - Status *string `type:"string" enum:"CommandStatus"` - - // A detailed status of the command execution. StatusDetails includes more information - // than Status because it includes states resulting from error and concurrency - // control parameters. StatusDetails can show different results than Status. - // For more information about these statuses, see Understanding Command Statuses - // (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) - // in the AWS Systems Manager User Guide. StatusDetails can be one of the following - // values: - // - // * Pending: The command has not been sent to any instances. - // - // * In Progress: The command has been sent to at least one instance but - // has not reached a final state on all instances. - // - // * Success: The command successfully executed on all invocations. This - // is a terminal state. - // - // * Delivery Timed Out: The value of MaxErrors or more command invocations - // shows a status of Delivery Timed Out. This is a terminal state. - // - // * Execution Timed Out: The value of MaxErrors or more command invocations - // shows a status of Execution Timed Out. This is a terminal state. - // - // * Failed: The value of MaxErrors or more command invocations shows a status - // of Failed. This is a terminal state. - // - // * Incomplete: The command was attempted on all instances and one or more - // invocations does not have a value of Success but not enough invocations - // failed for the status to be Failed. This is a terminal state. - // - // * Canceled: The command was terminated before it was completed. This is - // a terminal state. - // - // * Rate Exceeded: The number of instances targeted by the command exceeded - // the account limit for pending invocations. The system has canceled the - // command before executing it on any instance. This is a terminal state. - StatusDetails *string `type:"string"` - - // The number of targets for the command. - TargetCount *int64 `type:"integer"` - - // An array of search criteria that targets instances using a Key,Value combination - // that you specify. Targets is required if you don't provide one or more instance - // IDs in the call. - Targets []*Target `type:"list"` -} - -// String returns the string representation -func (s Command) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Command) GoString() string { - return s.String() -} - -// SetCloudWatchOutputConfig sets the CloudWatchOutputConfig field's value. -func (s *Command) SetCloudWatchOutputConfig(v *CloudWatchOutputConfig) *Command { - s.CloudWatchOutputConfig = v - return s -} - -// SetCommandId sets the CommandId field's value. -func (s *Command) SetCommandId(v string) *Command { - s.CommandId = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *Command) SetComment(v string) *Command { - s.Comment = &v - return s -} - -// SetCompletedCount sets the CompletedCount field's value. -func (s *Command) SetCompletedCount(v int64) *Command { - s.CompletedCount = &v - return s -} - -// SetDeliveryTimedOutCount sets the DeliveryTimedOutCount field's value. -func (s *Command) SetDeliveryTimedOutCount(v int64) *Command { - s.DeliveryTimedOutCount = &v - return s -} - -// SetDocumentName sets the DocumentName field's value. -func (s *Command) SetDocumentName(v string) *Command { - s.DocumentName = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *Command) SetDocumentVersion(v string) *Command { - s.DocumentVersion = &v - return s -} - -// SetErrorCount sets the ErrorCount field's value. -func (s *Command) SetErrorCount(v int64) *Command { - s.ErrorCount = &v - return s -} - -// SetExpiresAfter sets the ExpiresAfter field's value. -func (s *Command) SetExpiresAfter(v time.Time) *Command { - s.ExpiresAfter = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *Command) SetInstanceIds(v []*string) *Command { - s.InstanceIds = v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *Command) SetMaxConcurrency(v string) *Command { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *Command) SetMaxErrors(v string) *Command { - s.MaxErrors = &v - return s -} - -// SetNotificationConfig sets the NotificationConfig field's value. -func (s *Command) SetNotificationConfig(v *NotificationConfig) *Command { - s.NotificationConfig = v - return s -} - -// SetOutputS3BucketName sets the OutputS3BucketName field's value. -func (s *Command) SetOutputS3BucketName(v string) *Command { - s.OutputS3BucketName = &v - return s -} - -// SetOutputS3KeyPrefix sets the OutputS3KeyPrefix field's value. -func (s *Command) SetOutputS3KeyPrefix(v string) *Command { - s.OutputS3KeyPrefix = &v - return s -} - -// SetOutputS3Region sets the OutputS3Region field's value. -func (s *Command) SetOutputS3Region(v string) *Command { - s.OutputS3Region = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *Command) SetParameters(v map[string][]*string) *Command { - s.Parameters = v - return s -} - -// SetRequestedDateTime sets the RequestedDateTime field's value. -func (s *Command) SetRequestedDateTime(v time.Time) *Command { - s.RequestedDateTime = &v - return s -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *Command) SetServiceRole(v string) *Command { - s.ServiceRole = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Command) SetStatus(v string) *Command { - s.Status = &v - return s -} - -// SetStatusDetails sets the StatusDetails field's value. -func (s *Command) SetStatusDetails(v string) *Command { - s.StatusDetails = &v - return s -} - -// SetTargetCount sets the TargetCount field's value. -func (s *Command) SetTargetCount(v int64) *Command { - s.TargetCount = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *Command) SetTargets(v []*Target) *Command { - s.Targets = v - return s -} - -// Describes a command filter. -type CommandFilter struct { - _ struct{} `type:"structure"` - - // The name of the filter. - // - // Key is a required field - Key *string `locationName:"key" type:"string" required:"true" enum:"CommandFilterKey"` - - // The filter value. Valid values for each filter key are as follows: - // - // * InvokedAfter: Specify a timestamp to limit your results. For example, - // specify 2018-07-07T00:00:00Z to see a list of command executions occurring - // July 7, 2018, and later. - // - // * InvokedBefore: Specify a timestamp to limit your results. For example, - // specify 2018-07-07T00:00:00Z to see a list of command executions from - // before July 7, 2018. - // - // * Status: Specify a valid command status to see a list of all command - // executions with that status. Status values you can specify include: - // - // Pending - // - // InProgress - // - // Success - // - // Cancelled - // - // Failed - // - // TimedOut - // - // Cancelling - // - // * DocumentName: Specify name of the SSM document for which you want to - // see command execution results. For example, specify AWS-RunPatchBaseline - // to see command executions that used this SSM document to perform security - // patching operations on instances. - // - // * ExecutionStage: Specify one of the following values: - // - // Executing: Returns a list of command executions that are currently still - // running. - // - // Complete: Returns a list of command executions that have already completed. - // - // Value is a required field - Value *string `locationName:"value" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CommandFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CommandFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CommandFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CommandFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *CommandFilter) SetKey(v string) *CommandFilter { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *CommandFilter) SetValue(v string) *CommandFilter { - s.Value = &v - return s -} - -// An invocation is copy of a command sent to a specific instance. A command -// can apply to one or more instances. A command invocation applies to one instance. -// For example, if a user executes SendCommand against three instances, then -// a command invocation is created for each requested instance ID. A command -// invocation returns status and detail information about a command you executed. -type CommandInvocation struct { - _ struct{} `type:"structure"` - - // CloudWatch Logs information where you want Systems Manager to send the command - // output. - CloudWatchOutputConfig *CloudWatchOutputConfig `type:"structure"` - - // The command against which this invocation was requested. - CommandId *string `min:"36" type:"string"` - - CommandPlugins []*CommandPlugin `type:"list"` - - // User-specified information about the command, such as a brief description - // of what the command should do. - Comment *string `type:"string"` - - // The document name that was requested for execution. - DocumentName *string `type:"string"` - - // The SSM document version. - DocumentVersion *string `type:"string"` - - // The instance ID in which this invocation was requested. - InstanceId *string `type:"string"` - - // The name of the invocation target. For Amazon EC2 instances this is the value - // for the aws:Name tag. For on-premises instances, this is the name of the - // instance. - InstanceName *string `type:"string"` - - // Configurations for sending notifications about command status changes on - // a per instance basis. - NotificationConfig *NotificationConfig `type:"structure"` - - // The time and date the request was sent to this instance. - RequestedDateTime *time.Time `type:"timestamp"` - - // The IAM service role that Run Command uses to act on your behalf when sending - // notifications about command status changes on a per instance basis. - ServiceRole *string `type:"string"` - - // The URL to the plugin's StdErr file in Amazon S3, if the Amazon S3 bucket - // was defined for the parent command. For an invocation, StandardErrorUrl is - // populated if there is just one plugin defined for the command, and the Amazon - // S3 bucket was defined for the command. - StandardErrorUrl *string `type:"string"` - - // The URL to the plugin's StdOut file in Amazon S3, if the Amazon S3 bucket - // was defined for the parent command. For an invocation, StandardOutputUrl - // is populated if there is just one plugin defined for the command, and the - // Amazon S3 bucket was defined for the command. - StandardOutputUrl *string `type:"string"` - - // Whether or not the invocation succeeded, failed, or is pending. - Status *string `type:"string" enum:"CommandInvocationStatus"` - - // A detailed status of the command execution for each invocation (each instance - // targeted by the command). StatusDetails includes more information than Status - // because it includes states resulting from error and concurrency control parameters. - // StatusDetails can show different results than Status. For more information - // about these statuses, see Understanding Command Statuses (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) - // in the AWS Systems Manager User Guide. StatusDetails can be one of the following - // values: - // - // * Pending: The command has not been sent to the instance. - // - // * In Progress: The command has been sent to the instance but has not reached - // a terminal state. - // - // * Success: The execution of the command or plugin was successfully completed. - // This is a terminal state. - // - // * Delivery Timed Out: The command was not delivered to the instance before - // the delivery timeout expired. Delivery timeouts do not count against the - // parent command's MaxErrors limit, but they do contribute to whether the - // parent command status is Success or Incomplete. This is a terminal state. - // - // * Execution Timed Out: Command execution started on the instance, but - // the execution was not complete before the execution timeout expired. Execution - // timeouts count against the MaxErrors limit of the parent command. This - // is a terminal state. - // - // * Failed: The command was not successful on the instance. For a plugin, - // this indicates that the result code was not zero. For a command invocation, - // this indicates that the result code for one or more plugins was not zero. - // Invocation failures count against the MaxErrors limit of the parent command. - // This is a terminal state. - // - // * Canceled: The command was terminated before it was completed. This is - // a terminal state. - // - // * Undeliverable: The command can't be delivered to the instance. The instance - // might not exist or might not be responding. Undeliverable invocations - // don't count against the parent command's MaxErrors limit and don't contribute - // to whether the parent command status is Success or Incomplete. This is - // a terminal state. - // - // * Terminated: The parent command exceeded its MaxErrors limit and subsequent - // command invocations were canceled by the system. This is a terminal state. - StatusDetails *string `type:"string"` - - // Gets the trace output sent by the agent. - TraceOutput *string `type:"string"` -} - -// String returns the string representation -func (s CommandInvocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CommandInvocation) GoString() string { - return s.String() -} - -// SetCloudWatchOutputConfig sets the CloudWatchOutputConfig field's value. -func (s *CommandInvocation) SetCloudWatchOutputConfig(v *CloudWatchOutputConfig) *CommandInvocation { - s.CloudWatchOutputConfig = v - return s -} - -// SetCommandId sets the CommandId field's value. -func (s *CommandInvocation) SetCommandId(v string) *CommandInvocation { - s.CommandId = &v - return s -} - -// SetCommandPlugins sets the CommandPlugins field's value. -func (s *CommandInvocation) SetCommandPlugins(v []*CommandPlugin) *CommandInvocation { - s.CommandPlugins = v - return s -} - -// SetComment sets the Comment field's value. -func (s *CommandInvocation) SetComment(v string) *CommandInvocation { - s.Comment = &v - return s -} - -// SetDocumentName sets the DocumentName field's value. -func (s *CommandInvocation) SetDocumentName(v string) *CommandInvocation { - s.DocumentName = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *CommandInvocation) SetDocumentVersion(v string) *CommandInvocation { - s.DocumentVersion = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *CommandInvocation) SetInstanceId(v string) *CommandInvocation { - s.InstanceId = &v - return s -} - -// SetInstanceName sets the InstanceName field's value. -func (s *CommandInvocation) SetInstanceName(v string) *CommandInvocation { - s.InstanceName = &v - return s -} - -// SetNotificationConfig sets the NotificationConfig field's value. -func (s *CommandInvocation) SetNotificationConfig(v *NotificationConfig) *CommandInvocation { - s.NotificationConfig = v - return s -} - -// SetRequestedDateTime sets the RequestedDateTime field's value. -func (s *CommandInvocation) SetRequestedDateTime(v time.Time) *CommandInvocation { - s.RequestedDateTime = &v - return s -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *CommandInvocation) SetServiceRole(v string) *CommandInvocation { - s.ServiceRole = &v - return s -} - -// SetStandardErrorUrl sets the StandardErrorUrl field's value. -func (s *CommandInvocation) SetStandardErrorUrl(v string) *CommandInvocation { - s.StandardErrorUrl = &v - return s -} - -// SetStandardOutputUrl sets the StandardOutputUrl field's value. -func (s *CommandInvocation) SetStandardOutputUrl(v string) *CommandInvocation { - s.StandardOutputUrl = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CommandInvocation) SetStatus(v string) *CommandInvocation { - s.Status = &v - return s -} - -// SetStatusDetails sets the StatusDetails field's value. -func (s *CommandInvocation) SetStatusDetails(v string) *CommandInvocation { - s.StatusDetails = &v - return s -} - -// SetTraceOutput sets the TraceOutput field's value. -func (s *CommandInvocation) SetTraceOutput(v string) *CommandInvocation { - s.TraceOutput = &v - return s -} - -// Describes plugin details. -type CommandPlugin struct { - _ struct{} `type:"structure"` - - // The name of the plugin. Must be one of the following: aws:updateAgent, aws:domainjoin, - // aws:applications, aws:runPowerShellScript, aws:psmodule, aws:cloudWatch, - // aws:runShellScript, or aws:updateSSMAgent. - Name *string `min:"4" type:"string"` - - // Output of the plugin execution. - Output *string `type:"string"` - - // The S3 bucket where the responses to the command executions should be stored. - // This was requested when issuing the command. For example, in the following - // response: - // - // test_folder/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-1234567876543/awsrunShellScript - // - // test_folder is the name of the Amazon S3 bucket; - // - // ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix; - // - // i-1234567876543 is the instance ID; - // - // awsrunShellScript is the name of the plugin. - OutputS3BucketName *string `min:"3" type:"string"` - - // The S3 directory path inside the bucket where the responses to the command - // executions should be stored. This was requested when issuing the command. - // For example, in the following response: - // - // test_folder/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-1234567876543/awsrunShellScript - // - // test_folder is the name of the Amazon S3 bucket; - // - // ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix; - // - // i-1234567876543 is the instance ID; - // - // awsrunShellScript is the name of the plugin. - OutputS3KeyPrefix *string `type:"string"` - - // (Deprecated) You can no longer specify this parameter. The system ignores - // it. Instead, Systems Manager automatically determines the Amazon S3 bucket - // region. - OutputS3Region *string `min:"3" type:"string"` - - // A numeric response code generated after executing the plugin. - ResponseCode *int64 `type:"integer"` - - // The time the plugin stopped executing. Could stop prematurely if, for example, - // a cancel command was sent. - ResponseFinishDateTime *time.Time `type:"timestamp"` - - // The time the plugin started executing. - ResponseStartDateTime *time.Time `type:"timestamp"` - - // The URL for the complete text written by the plugin to stderr. If execution - // is not yet complete, then this string is empty. - StandardErrorUrl *string `type:"string"` - - // The URL for the complete text written by the plugin to stdout in Amazon S3. - // If the Amazon S3 bucket for the command was not specified, then this string - // is empty. - StandardOutputUrl *string `type:"string"` - - // The status of this plugin. You can execute a document with multiple plugins. - Status *string `type:"string" enum:"CommandPluginStatus"` - - // A detailed status of the plugin execution. StatusDetails includes more information - // than Status because it includes states resulting from error and concurrency - // control parameters. StatusDetails can show different results than Status. - // For more information about these statuses, see Understanding Command Statuses - // (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) - // in the AWS Systems Manager User Guide. StatusDetails can be one of the following - // values: - // - // * Pending: The command has not been sent to the instance. - // - // * In Progress: The command has been sent to the instance but has not reached - // a terminal state. - // - // * Success: The execution of the command or plugin was successfully completed. - // This is a terminal state. - // - // * Delivery Timed Out: The command was not delivered to the instance before - // the delivery timeout expired. Delivery timeouts do not count against the - // parent command's MaxErrors limit, but they do contribute to whether the - // parent command status is Success or Incomplete. This is a terminal state. - // - // * Execution Timed Out: Command execution started on the instance, but - // the execution was not complete before the execution timeout expired. Execution - // timeouts count against the MaxErrors limit of the parent command. This - // is a terminal state. - // - // * Failed: The command was not successful on the instance. For a plugin, - // this indicates that the result code was not zero. For a command invocation, - // this indicates that the result code for one or more plugins was not zero. - // Invocation failures count against the MaxErrors limit of the parent command. - // This is a terminal state. - // - // * Canceled: The command was terminated before it was completed. This is - // a terminal state. - // - // * Undeliverable: The command can't be delivered to the instance. The instance - // might not exist, or it might not be responding. Undeliverable invocations - // don't count against the parent command's MaxErrors limit, and they don't - // contribute to whether the parent command status is Success or Incomplete. - // This is a terminal state. - // - // * Terminated: The parent command exceeded its MaxErrors limit and subsequent - // command invocations were canceled by the system. This is a terminal state. - StatusDetails *string `type:"string"` -} - -// String returns the string representation -func (s CommandPlugin) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CommandPlugin) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *CommandPlugin) SetName(v string) *CommandPlugin { - s.Name = &v - return s -} - -// SetOutput sets the Output field's value. -func (s *CommandPlugin) SetOutput(v string) *CommandPlugin { - s.Output = &v - return s -} - -// SetOutputS3BucketName sets the OutputS3BucketName field's value. -func (s *CommandPlugin) SetOutputS3BucketName(v string) *CommandPlugin { - s.OutputS3BucketName = &v - return s -} - -// SetOutputS3KeyPrefix sets the OutputS3KeyPrefix field's value. -func (s *CommandPlugin) SetOutputS3KeyPrefix(v string) *CommandPlugin { - s.OutputS3KeyPrefix = &v - return s -} - -// SetOutputS3Region sets the OutputS3Region field's value. -func (s *CommandPlugin) SetOutputS3Region(v string) *CommandPlugin { - s.OutputS3Region = &v - return s -} - -// SetResponseCode sets the ResponseCode field's value. -func (s *CommandPlugin) SetResponseCode(v int64) *CommandPlugin { - s.ResponseCode = &v - return s -} - -// SetResponseFinishDateTime sets the ResponseFinishDateTime field's value. -func (s *CommandPlugin) SetResponseFinishDateTime(v time.Time) *CommandPlugin { - s.ResponseFinishDateTime = &v - return s -} - -// SetResponseStartDateTime sets the ResponseStartDateTime field's value. -func (s *CommandPlugin) SetResponseStartDateTime(v time.Time) *CommandPlugin { - s.ResponseStartDateTime = &v - return s -} - -// SetStandardErrorUrl sets the StandardErrorUrl field's value. -func (s *CommandPlugin) SetStandardErrorUrl(v string) *CommandPlugin { - s.StandardErrorUrl = &v - return s -} - -// SetStandardOutputUrl sets the StandardOutputUrl field's value. -func (s *CommandPlugin) SetStandardOutputUrl(v string) *CommandPlugin { - s.StandardOutputUrl = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *CommandPlugin) SetStatus(v string) *CommandPlugin { - s.Status = &v - return s -} - -// SetStatusDetails sets the StatusDetails field's value. -func (s *CommandPlugin) SetStatusDetails(v string) *CommandPlugin { - s.StatusDetails = &v - return s -} - -// A summary of the call execution that includes an execution ID, the type of -// execution (for example, Command), and the date/time of the execution using -// a datetime object that is saved in the following format: yyyy-MM-dd'T'HH:mm:ss'Z'. -type ComplianceExecutionSummary struct { - _ struct{} `type:"structure"` - - // An ID created by the system when PutComplianceItems was called. For example, - // CommandID is a valid execution ID. You can use this ID in subsequent calls. - ExecutionId *string `type:"string"` - - // The time the execution ran as a datetime object that is saved in the following - // format: yyyy-MM-dd'T'HH:mm:ss'Z'. - // - // ExecutionTime is a required field - ExecutionTime *time.Time `type:"timestamp" required:"true"` - - // The type of execution. For example, Command is a valid execution type. - ExecutionType *string `type:"string"` -} - -// String returns the string representation -func (s ComplianceExecutionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComplianceExecutionSummary) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ComplianceExecutionSummary) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ComplianceExecutionSummary"} - if s.ExecutionTime == nil { - invalidParams.Add(request.NewErrParamRequired("ExecutionTime")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExecutionId sets the ExecutionId field's value. -func (s *ComplianceExecutionSummary) SetExecutionId(v string) *ComplianceExecutionSummary { - s.ExecutionId = &v - return s -} - -// SetExecutionTime sets the ExecutionTime field's value. -func (s *ComplianceExecutionSummary) SetExecutionTime(v time.Time) *ComplianceExecutionSummary { - s.ExecutionTime = &v - return s -} - -// SetExecutionType sets the ExecutionType field's value. -func (s *ComplianceExecutionSummary) SetExecutionType(v string) *ComplianceExecutionSummary { - s.ExecutionType = &v - return s -} - -// Information about the compliance as defined by the resource type. For example, -// for a patch resource type, Items includes information about the PatchSeverity, -// Classification, etc. -type ComplianceItem struct { - _ struct{} `type:"structure"` - - // The compliance type. For example, Association (for a State Manager association), - // Patch, or Custom:string are all valid compliance types. - ComplianceType *string `min:"1" type:"string"` - - // A "Key": "Value" tag combination for the compliance item. - Details map[string]*string `type:"map"` - - // A summary for the compliance item. The summary includes an execution ID, - // the execution type (for example, command), and the execution time. - ExecutionSummary *ComplianceExecutionSummary `type:"structure"` - - // An ID for the compliance item. For example, if the compliance item is a Windows - // patch, the ID could be the number of the KB article; for example: KB4010320. - Id *string `min:"1" type:"string"` - - // An ID for the resource. For a managed instance, this is the instance ID. - ResourceId *string `min:"1" type:"string"` - - // The type of resource. ManagedInstance is currently the only supported resource - // type. - ResourceType *string `min:"1" type:"string"` - - // The severity of the compliance status. Severity can be one of the following: - // Critical, High, Medium, Low, Informational, Unspecified. - Severity *string `type:"string" enum:"ComplianceSeverity"` - - // The status of the compliance item. An item is either COMPLIANT or NON_COMPLIANT. - Status *string `type:"string" enum:"ComplianceStatus"` - - // A title for the compliance item. For example, if the compliance item is a - // Windows patch, the title could be the title of the KB article for the patch; - // for example: Security Update for Active Directory Federation Services. - Title *string `type:"string"` -} - -// String returns the string representation -func (s ComplianceItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComplianceItem) GoString() string { - return s.String() -} - -// SetComplianceType sets the ComplianceType field's value. -func (s *ComplianceItem) SetComplianceType(v string) *ComplianceItem { - s.ComplianceType = &v - return s -} - -// SetDetails sets the Details field's value. -func (s *ComplianceItem) SetDetails(v map[string]*string) *ComplianceItem { - s.Details = v - return s -} - -// SetExecutionSummary sets the ExecutionSummary field's value. -func (s *ComplianceItem) SetExecutionSummary(v *ComplianceExecutionSummary) *ComplianceItem { - s.ExecutionSummary = v - return s -} - -// SetId sets the Id field's value. -func (s *ComplianceItem) SetId(v string) *ComplianceItem { - s.Id = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ComplianceItem) SetResourceId(v string) *ComplianceItem { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ComplianceItem) SetResourceType(v string) *ComplianceItem { - s.ResourceType = &v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *ComplianceItem) SetSeverity(v string) *ComplianceItem { - s.Severity = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ComplianceItem) SetStatus(v string) *ComplianceItem { - s.Status = &v - return s -} - -// SetTitle sets the Title field's value. -func (s *ComplianceItem) SetTitle(v string) *ComplianceItem { - s.Title = &v - return s -} - -// Information about a compliance item. -type ComplianceItemEntry struct { - _ struct{} `type:"structure"` - - // A "Key": "Value" tag combination for the compliance item. - Details map[string]*string `type:"map"` - - // The compliance item ID. For example, if the compliance item is a Windows - // patch, the ID could be the number of the KB article. - Id *string `min:"1" type:"string"` - - // The severity of the compliance status. Severity can be one of the following: - // Critical, High, Medium, Low, Informational, Unspecified. - // - // Severity is a required field - Severity *string `type:"string" required:"true" enum:"ComplianceSeverity"` - - // The status of the compliance item. An item is either COMPLIANT or NON_COMPLIANT. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"ComplianceStatus"` - - // The title of the compliance item. For example, if the compliance item is - // a Windows patch, the title could be the title of the KB article for the patch; - // for example: Security Update for Active Directory Federation Services. - Title *string `type:"string"` -} - -// String returns the string representation -func (s ComplianceItemEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComplianceItemEntry) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ComplianceItemEntry) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ComplianceItemEntry"} - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Severity == nil { - invalidParams.Add(request.NewErrParamRequired("Severity")) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetails sets the Details field's value. -func (s *ComplianceItemEntry) SetDetails(v map[string]*string) *ComplianceItemEntry { - s.Details = v - return s -} - -// SetId sets the Id field's value. -func (s *ComplianceItemEntry) SetId(v string) *ComplianceItemEntry { - s.Id = &v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *ComplianceItemEntry) SetSeverity(v string) *ComplianceItemEntry { - s.Severity = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ComplianceItemEntry) SetStatus(v string) *ComplianceItemEntry { - s.Status = &v - return s -} - -// SetTitle sets the Title field's value. -func (s *ComplianceItemEntry) SetTitle(v string) *ComplianceItemEntry { - s.Title = &v - return s -} - -// One or more filters. Use a filter to return a more specific list of results. -type ComplianceStringFilter struct { - _ struct{} `type:"structure"` - - // The name of the filter. - Key *string `min:"1" type:"string"` - - // The type of comparison that should be performed for the value: Equal, NotEqual, - // BeginWith, LessThan, or GreaterThan. - Type *string `type:"string" enum:"ComplianceQueryOperatorType"` - - // The value for which to search. - Values []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s ComplianceStringFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComplianceStringFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ComplianceStringFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ComplianceStringFilter"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *ComplianceStringFilter) SetKey(v string) *ComplianceStringFilter { - s.Key = &v - return s -} - -// SetType sets the Type field's value. -func (s *ComplianceStringFilter) SetType(v string) *ComplianceStringFilter { - s.Type = &v - return s -} - -// SetValues sets the Values field's value. -func (s *ComplianceStringFilter) SetValues(v []*string) *ComplianceStringFilter { - s.Values = v - return s -} - -// A summary of compliance information by compliance type. -type ComplianceSummaryItem struct { - _ struct{} `type:"structure"` - - // The type of compliance item. For example, the compliance type can be Association, - // Patch, or Custom:string. - ComplianceType *string `min:"1" type:"string"` - - // A list of COMPLIANT items for the specified compliance type. - CompliantSummary *CompliantSummary `type:"structure"` - - // A list of NON_COMPLIANT items for the specified compliance type. - NonCompliantSummary *NonCompliantSummary `type:"structure"` -} - -// String returns the string representation -func (s ComplianceSummaryItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComplianceSummaryItem) GoString() string { - return s.String() -} - -// SetComplianceType sets the ComplianceType field's value. -func (s *ComplianceSummaryItem) SetComplianceType(v string) *ComplianceSummaryItem { - s.ComplianceType = &v - return s -} - -// SetCompliantSummary sets the CompliantSummary field's value. -func (s *ComplianceSummaryItem) SetCompliantSummary(v *CompliantSummary) *ComplianceSummaryItem { - s.CompliantSummary = v - return s -} - -// SetNonCompliantSummary sets the NonCompliantSummary field's value. -func (s *ComplianceSummaryItem) SetNonCompliantSummary(v *NonCompliantSummary) *ComplianceSummaryItem { - s.NonCompliantSummary = v - return s -} - -// A summary of resources that are compliant. The summary is organized according -// to the resource count for each compliance type. -type CompliantSummary struct { - _ struct{} `type:"structure"` - - // The total number of resources that are compliant. - CompliantCount *int64 `type:"integer"` - - // A summary of the compliance severity by compliance type. - SeveritySummary *SeveritySummary `type:"structure"` -} - -// String returns the string representation -func (s CompliantSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CompliantSummary) GoString() string { - return s.String() -} - -// SetCompliantCount sets the CompliantCount field's value. -func (s *CompliantSummary) SetCompliantCount(v int64) *CompliantSummary { - s.CompliantCount = &v - return s -} - -// SetSeveritySummary sets the SeveritySummary field's value. -func (s *CompliantSummary) SetSeveritySummary(v *SeveritySummary) *CompliantSummary { - s.SeveritySummary = v - return s -} - -type CreateActivationInput struct { - _ struct{} `type:"structure"` - - // The name of the registered, managed instance as it will appear in the Amazon - // EC2 console or when you use the AWS command line tools to list EC2 resources. - // - // Do not enter personally identifiable information in this field. - DefaultInstanceName *string `type:"string"` - - // A user-defined description of the resource that you want to register with - // Amazon EC2. - // - // Do not enter personally identifiable information in this field. - Description *string `type:"string"` - - // The date by which this activation request should expire. The default value - // is 24 hours. - ExpirationDate *time.Time `type:"timestamp"` - - // The Amazon Identity and Access Management (IAM) role that you want to assign - // to the managed instance. - // - // IamRole is a required field - IamRole *string `type:"string" required:"true"` - - // Specify the maximum number of managed instances you want to register. The - // default value is 1 instance. - RegistrationLimit *int64 `min:"1" type:"integer"` -} - -// String returns the string representation -func (s CreateActivationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateActivationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateActivationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateActivationInput"} - if s.IamRole == nil { - invalidParams.Add(request.NewErrParamRequired("IamRole")) - } - if s.RegistrationLimit != nil && *s.RegistrationLimit < 1 { - invalidParams.Add(request.NewErrParamMinValue("RegistrationLimit", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultInstanceName sets the DefaultInstanceName field's value. -func (s *CreateActivationInput) SetDefaultInstanceName(v string) *CreateActivationInput { - s.DefaultInstanceName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateActivationInput) SetDescription(v string) *CreateActivationInput { - s.Description = &v - return s -} - -// SetExpirationDate sets the ExpirationDate field's value. -func (s *CreateActivationInput) SetExpirationDate(v time.Time) *CreateActivationInput { - s.ExpirationDate = &v - return s -} - -// SetIamRole sets the IamRole field's value. -func (s *CreateActivationInput) SetIamRole(v string) *CreateActivationInput { - s.IamRole = &v - return s -} - -// SetRegistrationLimit sets the RegistrationLimit field's value. -func (s *CreateActivationInput) SetRegistrationLimit(v int64) *CreateActivationInput { - s.RegistrationLimit = &v - return s -} - -type CreateActivationOutput struct { - _ struct{} `type:"structure"` - - // The code the system generates when it processes the activation. The activation - // code functions like a password to validate the activation ID. - ActivationCode *string `min:"20" type:"string"` - - // The ID number generated by the system when it processed the activation. The - // activation ID functions like a user name. - ActivationId *string `type:"string"` -} - -// String returns the string representation -func (s CreateActivationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateActivationOutput) GoString() string { - return s.String() -} - -// SetActivationCode sets the ActivationCode field's value. -func (s *CreateActivationOutput) SetActivationCode(v string) *CreateActivationOutput { - s.ActivationCode = &v - return s -} - -// SetActivationId sets the ActivationId field's value. -func (s *CreateActivationOutput) SetActivationId(v string) *CreateActivationOutput { - s.ActivationId = &v - return s -} - -type CreateAssociationBatchInput struct { - _ struct{} `type:"structure"` - - // One or more associations. - // - // Entries is a required field - Entries []*CreateAssociationBatchRequestEntry `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateAssociationBatchInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAssociationBatchInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAssociationBatchInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAssociationBatchInput"} - if s.Entries == nil { - invalidParams.Add(request.NewErrParamRequired("Entries")) - } - if s.Entries != nil && len(s.Entries) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Entries", 1)) - } - if s.Entries != nil { - for i, v := range s.Entries { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entries", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEntries sets the Entries field's value. -func (s *CreateAssociationBatchInput) SetEntries(v []*CreateAssociationBatchRequestEntry) *CreateAssociationBatchInput { - s.Entries = v - return s -} - -type CreateAssociationBatchOutput struct { - _ struct{} `type:"structure"` - - // Information about the associations that failed. - Failed []*FailedCreateAssociation `type:"list"` - - // Information about the associations that succeeded. - Successful []*AssociationDescription `type:"list"` -} - -// String returns the string representation -func (s CreateAssociationBatchOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAssociationBatchOutput) GoString() string { - return s.String() -} - -// SetFailed sets the Failed field's value. -func (s *CreateAssociationBatchOutput) SetFailed(v []*FailedCreateAssociation) *CreateAssociationBatchOutput { - s.Failed = v - return s -} - -// SetSuccessful sets the Successful field's value. -func (s *CreateAssociationBatchOutput) SetSuccessful(v []*AssociationDescription) *CreateAssociationBatchOutput { - s.Successful = v - return s -} - -// Describes the association of a Systems Manager SSM document and an instance. -type CreateAssociationBatchRequestEntry struct { - _ struct{} `type:"structure"` - - // Specify a descriptive name for the association. - AssociationName *string `type:"string"` - - // Specify the target for the association. This target is required for associations - // that use an Automation document and target resources by using rate controls. - AutomationTargetParameterName *string `min:"1" type:"string"` - - // The severity level to assign to the association. - ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` - - // The document version. - DocumentVersion *string `type:"string"` - - // The ID of the instance. - InstanceId *string `type:"string"` - - // The maximum number of targets allowed to run the association at the same - // time. You can specify a number, for example 10, or a percentage of the target - // set, for example 10%. The default value is 100%, which means all targets - // run the association at the same time. - // - // If a new instance starts and attempts to execute an association while Systems - // Manager is executing MaxConcurrency associations, the association is allowed - // to run. During the next association interval, the new instance will process - // its association within the limit specified for MaxConcurrency. - MaxConcurrency *string `min:"1" type:"string"` - - // The number of errors that are allowed before the system stops sending requests - // to run the association on additional targets. You can specify either an absolute - // number of errors, for example 10, or a percentage of the target set, for - // example 10%. If you specify 3, for example, the system stops sending requests - // when the fourth error is received. If you specify 0, then the system stops - // sending requests after the first error is returned. If you run an association - // on 50 instances and set MaxError to 10%, then the system stops sending the - // request when the sixth error is received. - // - // Executions that are already running an association when MaxErrors is reached - // are allowed to complete, but some of these executions may fail as well. If - // you need to ensure that there won't be more than max-errors failed executions, - // set MaxConcurrency to 1 so that executions proceed one at a time. - MaxErrors *string `min:"1" type:"string"` - - // The name of the configuration document. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // An Amazon S3 bucket where you want to store the results of this request. - OutputLocation *InstanceAssociationOutputLocation `type:"structure"` - - // A description of the parameters for a document. - Parameters map[string][]*string `type:"map"` - - // A cron expression that specifies a schedule when the association runs. - ScheduleExpression *string `min:"1" type:"string"` - - // The instances targeted by the request. - Targets []*Target `type:"list"` -} - -// String returns the string representation -func (s CreateAssociationBatchRequestEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAssociationBatchRequestEntry) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAssociationBatchRequestEntry) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAssociationBatchRequestEntry"} - if s.AutomationTargetParameterName != nil && len(*s.AutomationTargetParameterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutomationTargetParameterName", 1)) - } - if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) - } - if s.MaxErrors != nil && len(*s.MaxErrors) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MaxErrors", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.ScheduleExpression != nil && len(*s.ScheduleExpression) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScheduleExpression", 1)) - } - if s.OutputLocation != nil { - if err := s.OutputLocation.Validate(); err != nil { - invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams)) - } - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationName sets the AssociationName field's value. -func (s *CreateAssociationBatchRequestEntry) SetAssociationName(v string) *CreateAssociationBatchRequestEntry { - s.AssociationName = &v - return s -} - -// SetAutomationTargetParameterName sets the AutomationTargetParameterName field's value. -func (s *CreateAssociationBatchRequestEntry) SetAutomationTargetParameterName(v string) *CreateAssociationBatchRequestEntry { - s.AutomationTargetParameterName = &v - return s -} - -// SetComplianceSeverity sets the ComplianceSeverity field's value. -func (s *CreateAssociationBatchRequestEntry) SetComplianceSeverity(v string) *CreateAssociationBatchRequestEntry { - s.ComplianceSeverity = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *CreateAssociationBatchRequestEntry) SetDocumentVersion(v string) *CreateAssociationBatchRequestEntry { - s.DocumentVersion = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *CreateAssociationBatchRequestEntry) SetInstanceId(v string) *CreateAssociationBatchRequestEntry { - s.InstanceId = &v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *CreateAssociationBatchRequestEntry) SetMaxConcurrency(v string) *CreateAssociationBatchRequestEntry { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *CreateAssociationBatchRequestEntry) SetMaxErrors(v string) *CreateAssociationBatchRequestEntry { - s.MaxErrors = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateAssociationBatchRequestEntry) SetName(v string) *CreateAssociationBatchRequestEntry { - s.Name = &v - return s -} - -// SetOutputLocation sets the OutputLocation field's value. -func (s *CreateAssociationBatchRequestEntry) SetOutputLocation(v *InstanceAssociationOutputLocation) *CreateAssociationBatchRequestEntry { - s.OutputLocation = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *CreateAssociationBatchRequestEntry) SetParameters(v map[string][]*string) *CreateAssociationBatchRequestEntry { - s.Parameters = v - return s -} - -// SetScheduleExpression sets the ScheduleExpression field's value. -func (s *CreateAssociationBatchRequestEntry) SetScheduleExpression(v string) *CreateAssociationBatchRequestEntry { - s.ScheduleExpression = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *CreateAssociationBatchRequestEntry) SetTargets(v []*Target) *CreateAssociationBatchRequestEntry { - s.Targets = v - return s -} - -type CreateAssociationInput struct { - _ struct{} `type:"structure"` - - // Specify a descriptive name for the association. - AssociationName *string `type:"string"` - - // Specify the target for the association. This target is required for associations - // that use an Automation document and target resources by using rate controls. - AutomationTargetParameterName *string `min:"1" type:"string"` - - // The severity level to assign to the association. - ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` - - // The document version you want to associate with the target(s). Can be a specific - // version or the default version. - DocumentVersion *string `type:"string"` - - // The instance ID. - InstanceId *string `type:"string"` - - // The maximum number of targets allowed to run the association at the same - // time. You can specify a number, for example 10, or a percentage of the target - // set, for example 10%. The default value is 100%, which means all targets - // run the association at the same time. - // - // If a new instance starts and attempts to execute an association while Systems - // Manager is executing MaxConcurrency associations, the association is allowed - // to run. During the next association interval, the new instance will process - // its association within the limit specified for MaxConcurrency. - MaxConcurrency *string `min:"1" type:"string"` - - // The number of errors that are allowed before the system stops sending requests - // to run the association on additional targets. You can specify either an absolute - // number of errors, for example 10, or a percentage of the target set, for - // example 10%. If you specify 3, for example, the system stops sending requests - // when the fourth error is received. If you specify 0, then the system stops - // sending requests after the first error is returned. If you run an association - // on 50 instances and set MaxError to 10%, then the system stops sending the - // request when the sixth error is received. - // - // Executions that are already running an association when MaxErrors is reached - // are allowed to complete, but some of these executions may fail as well. If - // you need to ensure that there won't be more than max-errors failed executions, - // set MaxConcurrency to 1 so that executions proceed one at a time. - MaxErrors *string `min:"1" type:"string"` - - // The name of the Systems Manager document. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // An Amazon S3 bucket where you want to store the output details of the request. - OutputLocation *InstanceAssociationOutputLocation `type:"structure"` - - // The parameters for the documents runtime configuration. - Parameters map[string][]*string `type:"map"` - - // A cron expression when the association will be applied to the target(s). - ScheduleExpression *string `min:"1" type:"string"` - - // The targets (either instances or tags) for the association. - Targets []*Target `type:"list"` -} - -// String returns the string representation -func (s CreateAssociationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAssociationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAssociationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAssociationInput"} - if s.AutomationTargetParameterName != nil && len(*s.AutomationTargetParameterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutomationTargetParameterName", 1)) - } - if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) - } - if s.MaxErrors != nil && len(*s.MaxErrors) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MaxErrors", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.ScheduleExpression != nil && len(*s.ScheduleExpression) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScheduleExpression", 1)) - } - if s.OutputLocation != nil { - if err := s.OutputLocation.Validate(); err != nil { - invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams)) - } - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationName sets the AssociationName field's value. -func (s *CreateAssociationInput) SetAssociationName(v string) *CreateAssociationInput { - s.AssociationName = &v - return s -} - -// SetAutomationTargetParameterName sets the AutomationTargetParameterName field's value. -func (s *CreateAssociationInput) SetAutomationTargetParameterName(v string) *CreateAssociationInput { - s.AutomationTargetParameterName = &v - return s -} - -// SetComplianceSeverity sets the ComplianceSeverity field's value. -func (s *CreateAssociationInput) SetComplianceSeverity(v string) *CreateAssociationInput { - s.ComplianceSeverity = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *CreateAssociationInput) SetDocumentVersion(v string) *CreateAssociationInput { - s.DocumentVersion = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *CreateAssociationInput) SetInstanceId(v string) *CreateAssociationInput { - s.InstanceId = &v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *CreateAssociationInput) SetMaxConcurrency(v string) *CreateAssociationInput { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *CreateAssociationInput) SetMaxErrors(v string) *CreateAssociationInput { - s.MaxErrors = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateAssociationInput) SetName(v string) *CreateAssociationInput { - s.Name = &v - return s -} - -// SetOutputLocation sets the OutputLocation field's value. -func (s *CreateAssociationInput) SetOutputLocation(v *InstanceAssociationOutputLocation) *CreateAssociationInput { - s.OutputLocation = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *CreateAssociationInput) SetParameters(v map[string][]*string) *CreateAssociationInput { - s.Parameters = v - return s -} - -// SetScheduleExpression sets the ScheduleExpression field's value. -func (s *CreateAssociationInput) SetScheduleExpression(v string) *CreateAssociationInput { - s.ScheduleExpression = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *CreateAssociationInput) SetTargets(v []*Target) *CreateAssociationInput { - s.Targets = v - return s -} - -type CreateAssociationOutput struct { - _ struct{} `type:"structure"` - - // Information about the association. - AssociationDescription *AssociationDescription `type:"structure"` -} - -// String returns the string representation -func (s CreateAssociationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateAssociationOutput) GoString() string { - return s.String() -} - -// SetAssociationDescription sets the AssociationDescription field's value. -func (s *CreateAssociationOutput) SetAssociationDescription(v *AssociationDescription) *CreateAssociationOutput { - s.AssociationDescription = v - return s -} - -type CreateDocumentInput struct { - _ struct{} `type:"structure"` - - // A list of key and value pairs that describe attachments to a version of a - // document. - Attachments []*AttachmentsSource `type:"list"` - - // A valid JSON or YAML string. - // - // Content is a required field - Content *string `min:"1" type:"string" required:"true"` - - // Specify the document format for the request. The document format can be either - // JSON or YAML. JSON is the default format. - DocumentFormat *string `type:"string" enum:"DocumentFormat"` - - // The type of document to create. Valid document types include: Command, Policy, - // Automation, Session, and Package. - DocumentType *string `type:"string" enum:"DocumentType"` - - // A name for the Systems Manager document. - // - // Do not use the following to begin the names of documents you create. They - // are reserved by AWS for use as document prefixes: - // - // aws - // - // amazon - // - // amzn - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // Specify a target type to define the kinds of resources the document can run - // on. For example, to run a document on EC2 instances, specify the following - // value: /AWS::EC2::Instance. If you specify a value of '/' the document can - // run on all types of resources. If you don't specify a value, the document - // can't run on any resources. For a list of valid resource types, see AWS Resource - // Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) - // in the AWS CloudFormation User Guide. - TargetType *string `type:"string"` - - // An optional field specifying the version of the artifact you are creating - // with the document. For example, "Release 12, Update 6". This value is unique - // across all versions of a document, and cannot be changed. - VersionName *string `type:"string"` -} - -// String returns the string representation -func (s CreateDocumentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDocumentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDocumentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDocumentInput"} - if s.Content == nil { - invalidParams.Add(request.NewErrParamRequired("Content")) - } - if s.Content != nil && len(*s.Content) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Content", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Attachments != nil { - for i, v := range s.Attachments { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attachments", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttachments sets the Attachments field's value. -func (s *CreateDocumentInput) SetAttachments(v []*AttachmentsSource) *CreateDocumentInput { - s.Attachments = v - return s -} - -// SetContent sets the Content field's value. -func (s *CreateDocumentInput) SetContent(v string) *CreateDocumentInput { - s.Content = &v - return s -} - -// SetDocumentFormat sets the DocumentFormat field's value. -func (s *CreateDocumentInput) SetDocumentFormat(v string) *CreateDocumentInput { - s.DocumentFormat = &v - return s -} - -// SetDocumentType sets the DocumentType field's value. -func (s *CreateDocumentInput) SetDocumentType(v string) *CreateDocumentInput { - s.DocumentType = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateDocumentInput) SetName(v string) *CreateDocumentInput { - s.Name = &v - return s -} - -// SetTargetType sets the TargetType field's value. -func (s *CreateDocumentInput) SetTargetType(v string) *CreateDocumentInput { - s.TargetType = &v - return s -} - -// SetVersionName sets the VersionName field's value. -func (s *CreateDocumentInput) SetVersionName(v string) *CreateDocumentInput { - s.VersionName = &v - return s -} - -type CreateDocumentOutput struct { - _ struct{} `type:"structure"` - - // Information about the Systems Manager document. - DocumentDescription *DocumentDescription `type:"structure"` -} - -// String returns the string representation -func (s CreateDocumentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDocumentOutput) GoString() string { - return s.String() -} - -// SetDocumentDescription sets the DocumentDescription field's value. -func (s *CreateDocumentOutput) SetDocumentDescription(v *DocumentDescription) *CreateDocumentOutput { - s.DocumentDescription = v - return s -} - -type CreateMaintenanceWindowInput struct { - _ struct{} `type:"structure"` - - // Enables a Maintenance Window task to execute on managed instances, even if - // you have not registered those instances as targets. If enabled, then you - // must specify the unregistered instances (by instance ID) when you register - // a task with the Maintenance Window - // - // If you don't enable this option, then you must specify previously-registered - // targets when you register a task with the Maintenance Window. - // - // AllowUnassociatedTargets is a required field - AllowUnassociatedTargets *bool `type:"boolean" required:"true"` - - // User-provided idempotency token. - ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // The number of hours before the end of the Maintenance Window that Systems - // Manager stops scheduling new tasks for execution. - // - // Cutoff is a required field - Cutoff *int64 `type:"integer" required:"true"` - - // An optional description for the Maintenance Window. We recommend specifying - // a description to help you organize your Maintenance Windows. - Description *string `min:"1" type:"string" sensitive:"true"` - - // The duration of the Maintenance Window in hours. - // - // Duration is a required field - Duration *int64 `min:"1" type:"integer" required:"true"` - - // The date and time, in ISO-8601 Extended format, for when you want the Maintenance - // Window to become inactive. EndDate allows you to set a date and time in the - // future when the Maintenance Window will no longer run. - EndDate *string `type:"string"` - - // The name of the Maintenance Window. - // - // Name is a required field - Name *string `min:"3" type:"string" required:"true"` - - // The schedule of the Maintenance Window in the form of a cron or rate expression. - // - // Schedule is a required field - Schedule *string `min:"1" type:"string" required:"true"` - - // The time zone that the scheduled Maintenance Window executions are based - // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", - // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database - // (https://www.iana.org/time-zones) on the IANA website. - ScheduleTimezone *string `type:"string"` - - // The date and time, in ISO-8601 Extended format, for when you want the Maintenance - // Window to become active. StartDate allows you to delay activation of the - // Maintenance Window until the specified future date. - StartDate *string `type:"string"` -} - -// String returns the string representation -func (s CreateMaintenanceWindowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMaintenanceWindowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateMaintenanceWindowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateMaintenanceWindowInput"} - if s.AllowUnassociatedTargets == nil { - invalidParams.Add(request.NewErrParamRequired("AllowUnassociatedTargets")) - } - if s.ClientToken != nil && len(*s.ClientToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) - } - if s.Cutoff == nil { - invalidParams.Add(request.NewErrParamRequired("Cutoff")) - } - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.Duration == nil { - invalidParams.Add(request.NewErrParamRequired("Duration")) - } - if s.Duration != nil && *s.Duration < 1 { - invalidParams.Add(request.NewErrParamMinValue("Duration", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 3 { - invalidParams.Add(request.NewErrParamMinLen("Name", 3)) - } - if s.Schedule == nil { - invalidParams.Add(request.NewErrParamRequired("Schedule")) - } - if s.Schedule != nil && len(*s.Schedule) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Schedule", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowUnassociatedTargets sets the AllowUnassociatedTargets field's value. -func (s *CreateMaintenanceWindowInput) SetAllowUnassociatedTargets(v bool) *CreateMaintenanceWindowInput { - s.AllowUnassociatedTargets = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateMaintenanceWindowInput) SetClientToken(v string) *CreateMaintenanceWindowInput { - s.ClientToken = &v - return s -} - -// SetCutoff sets the Cutoff field's value. -func (s *CreateMaintenanceWindowInput) SetCutoff(v int64) *CreateMaintenanceWindowInput { - s.Cutoff = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateMaintenanceWindowInput) SetDescription(v string) *CreateMaintenanceWindowInput { - s.Description = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *CreateMaintenanceWindowInput) SetDuration(v int64) *CreateMaintenanceWindowInput { - s.Duration = &v - return s -} - -// SetEndDate sets the EndDate field's value. -func (s *CreateMaintenanceWindowInput) SetEndDate(v string) *CreateMaintenanceWindowInput { - s.EndDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateMaintenanceWindowInput) SetName(v string) *CreateMaintenanceWindowInput { - s.Name = &v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *CreateMaintenanceWindowInput) SetSchedule(v string) *CreateMaintenanceWindowInput { - s.Schedule = &v - return s -} - -// SetScheduleTimezone sets the ScheduleTimezone field's value. -func (s *CreateMaintenanceWindowInput) SetScheduleTimezone(v string) *CreateMaintenanceWindowInput { - s.ScheduleTimezone = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *CreateMaintenanceWindowInput) SetStartDate(v string) *CreateMaintenanceWindowInput { - s.StartDate = &v - return s -} - -type CreateMaintenanceWindowOutput struct { - _ struct{} `type:"structure"` - - // The ID of the created Maintenance Window. - WindowId *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s CreateMaintenanceWindowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateMaintenanceWindowOutput) GoString() string { - return s.String() -} - -// SetWindowId sets the WindowId field's value. -func (s *CreateMaintenanceWindowOutput) SetWindowId(v string) *CreateMaintenanceWindowOutput { - s.WindowId = &v - return s -} - -type CreatePatchBaselineInput struct { - _ struct{} `type:"structure"` - - // A set of rules used to include patches in the baseline. - ApprovalRules *PatchRuleGroup `type:"structure"` - - // A list of explicitly approved patches for the baseline. - // - // For information about accepted formats for lists of approved patches and - // rejected patches, see Package Name Formats for Approved and Rejected Patch - // Lists (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) - // in the AWS Systems Manager User Guide. - ApprovedPatches []*string `type:"list"` - - // Defines the compliance level for approved patches. This means that if an - // approved patch is reported as missing, this is the severity of the compliance - // violation. The default value is UNSPECIFIED. - ApprovedPatchesComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` - - // Indicates whether the list of approved patches includes non-security updates - // that should be applied to the instances. The default value is 'false'. Applies - // to Linux instances only. - ApprovedPatchesEnableNonSecurity *bool `type:"boolean"` - - // User-provided idempotency token. - ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // A description of the patch baseline. - Description *string `min:"1" type:"string"` - - // A set of global filters used to exclude patches from the baseline. - GlobalFilters *PatchFilterGroup `type:"structure"` - - // The name of the patch baseline. - // - // Name is a required field - Name *string `min:"3" type:"string" required:"true"` - - // Defines the operating system the patch baseline applies to. The Default value - // is WINDOWS. - OperatingSystem *string `type:"string" enum:"OperatingSystem"` - - // A list of explicitly rejected patches for the baseline. - // - // For information about accepted formats for lists of approved patches and - // rejected patches, see Package Name Formats for Approved and Rejected Patch - // Lists (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) - // in the AWS Systems Manager User Guide. - RejectedPatches []*string `type:"list"` - - // The action for Patch Manager to take on patches included in the RejectedPackages - // list. - // - // * ALLOW_AS_DEPENDENCY: A package in the Rejected patches list is installed - // only if it is a dependency of another package. It is considered compliant - // with the patch baseline, and its status is reported as InstalledOther. - // This is the default action if no option is specified. - // - // * BLOCK: Packages in the RejectedPatches list, and packages that include - // them as dependencies, are not installed under any circumstances. If a - // package was installed before it was added to the Rejected patches list, - // it is considered non-compliant with the patch baseline, and its status - // is reported as InstalledRejected. - RejectedPatchesAction *string `type:"string" enum:"PatchAction"` - - // Information about the patches to use to update the instances, including target - // operating systems and source repositories. Applies to Linux instances only. - Sources []*PatchSource `type:"list"` -} - -// String returns the string representation -func (s CreatePatchBaselineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePatchBaselineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePatchBaselineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePatchBaselineInput"} - if s.ClientToken != nil && len(*s.ClientToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) - } - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 3 { - invalidParams.Add(request.NewErrParamMinLen("Name", 3)) - } - if s.ApprovalRules != nil { - if err := s.ApprovalRules.Validate(); err != nil { - invalidParams.AddNested("ApprovalRules", err.(request.ErrInvalidParams)) - } - } - if s.GlobalFilters != nil { - if err := s.GlobalFilters.Validate(); err != nil { - invalidParams.AddNested("GlobalFilters", err.(request.ErrInvalidParams)) - } - } - if s.Sources != nil { - for i, v := range s.Sources { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Sources", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApprovalRules sets the ApprovalRules field's value. -func (s *CreatePatchBaselineInput) SetApprovalRules(v *PatchRuleGroup) *CreatePatchBaselineInput { - s.ApprovalRules = v - return s -} - -// SetApprovedPatches sets the ApprovedPatches field's value. -func (s *CreatePatchBaselineInput) SetApprovedPatches(v []*string) *CreatePatchBaselineInput { - s.ApprovedPatches = v - return s -} - -// SetApprovedPatchesComplianceLevel sets the ApprovedPatchesComplianceLevel field's value. -func (s *CreatePatchBaselineInput) SetApprovedPatchesComplianceLevel(v string) *CreatePatchBaselineInput { - s.ApprovedPatchesComplianceLevel = &v - return s -} - -// SetApprovedPatchesEnableNonSecurity sets the ApprovedPatchesEnableNonSecurity field's value. -func (s *CreatePatchBaselineInput) SetApprovedPatchesEnableNonSecurity(v bool) *CreatePatchBaselineInput { - s.ApprovedPatchesEnableNonSecurity = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreatePatchBaselineInput) SetClientToken(v string) *CreatePatchBaselineInput { - s.ClientToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreatePatchBaselineInput) SetDescription(v string) *CreatePatchBaselineInput { - s.Description = &v - return s -} - -// SetGlobalFilters sets the GlobalFilters field's value. -func (s *CreatePatchBaselineInput) SetGlobalFilters(v *PatchFilterGroup) *CreatePatchBaselineInput { - s.GlobalFilters = v - return s -} - -// SetName sets the Name field's value. -func (s *CreatePatchBaselineInput) SetName(v string) *CreatePatchBaselineInput { - s.Name = &v - return s -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *CreatePatchBaselineInput) SetOperatingSystem(v string) *CreatePatchBaselineInput { - s.OperatingSystem = &v - return s -} - -// SetRejectedPatches sets the RejectedPatches field's value. -func (s *CreatePatchBaselineInput) SetRejectedPatches(v []*string) *CreatePatchBaselineInput { - s.RejectedPatches = v - return s -} - -// SetRejectedPatchesAction sets the RejectedPatchesAction field's value. -func (s *CreatePatchBaselineInput) SetRejectedPatchesAction(v string) *CreatePatchBaselineInput { - s.RejectedPatchesAction = &v - return s -} - -// SetSources sets the Sources field's value. -func (s *CreatePatchBaselineInput) SetSources(v []*PatchSource) *CreatePatchBaselineInput { - s.Sources = v - return s -} - -type CreatePatchBaselineOutput struct { - _ struct{} `type:"structure"` - - // The ID of the created patch baseline. - BaselineId *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s CreatePatchBaselineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreatePatchBaselineOutput) GoString() string { - return s.String() -} - -// SetBaselineId sets the BaselineId field's value. -func (s *CreatePatchBaselineOutput) SetBaselineId(v string) *CreatePatchBaselineOutput { - s.BaselineId = &v - return s -} - -type CreateResourceDataSyncInput struct { - _ struct{} `type:"structure"` - - // Amazon S3 configuration details for the sync. - // - // S3Destination is a required field - S3Destination *ResourceDataSyncS3Destination `type:"structure" required:"true"` - - // A name for the configuration. - // - // SyncName is a required field - SyncName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateResourceDataSyncInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResourceDataSyncInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateResourceDataSyncInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateResourceDataSyncInput"} - if s.S3Destination == nil { - invalidParams.Add(request.NewErrParamRequired("S3Destination")) - } - if s.SyncName == nil { - invalidParams.Add(request.NewErrParamRequired("SyncName")) - } - if s.SyncName != nil && len(*s.SyncName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SyncName", 1)) - } - if s.S3Destination != nil { - if err := s.S3Destination.Validate(); err != nil { - invalidParams.AddNested("S3Destination", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3Destination sets the S3Destination field's value. -func (s *CreateResourceDataSyncInput) SetS3Destination(v *ResourceDataSyncS3Destination) *CreateResourceDataSyncInput { - s.S3Destination = v - return s -} - -// SetSyncName sets the SyncName field's value. -func (s *CreateResourceDataSyncInput) SetSyncName(v string) *CreateResourceDataSyncInput { - s.SyncName = &v - return s -} - -type CreateResourceDataSyncOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateResourceDataSyncOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateResourceDataSyncOutput) GoString() string { - return s.String() -} - -type DeleteActivationInput struct { - _ struct{} `type:"structure"` - - // The ID of the activation that you want to delete. - // - // ActivationId is a required field - ActivationId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteActivationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteActivationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteActivationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteActivationInput"} - if s.ActivationId == nil { - invalidParams.Add(request.NewErrParamRequired("ActivationId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivationId sets the ActivationId field's value. -func (s *DeleteActivationInput) SetActivationId(v string) *DeleteActivationInput { - s.ActivationId = &v - return s -} - -type DeleteActivationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteActivationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteActivationOutput) GoString() string { - return s.String() -} - -type DeleteAssociationInput struct { - _ struct{} `type:"structure"` - - // The association ID that you want to delete. - AssociationId *string `type:"string"` - - // The ID of the instance. - InstanceId *string `type:"string"` - - // The name of the Systems Manager document. - Name *string `type:"string"` -} - -// String returns the string representation -func (s DeleteAssociationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAssociationInput) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *DeleteAssociationInput) SetAssociationId(v string) *DeleteAssociationInput { - s.AssociationId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DeleteAssociationInput) SetInstanceId(v string) *DeleteAssociationInput { - s.InstanceId = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteAssociationInput) SetName(v string) *DeleteAssociationInput { - s.Name = &v - return s -} - -type DeleteAssociationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteAssociationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteAssociationOutput) GoString() string { - return s.String() -} - -type DeleteDocumentInput struct { - _ struct{} `type:"structure"` - - // The name of the document. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteDocumentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDocumentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDocumentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDocumentInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteDocumentInput) SetName(v string) *DeleteDocumentInput { - s.Name = &v - return s -} - -type DeleteDocumentOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDocumentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteDocumentOutput) GoString() string { - return s.String() -} - -type DeleteInventoryInput struct { - _ struct{} `type:"structure"` - - // User-provided idempotency token. - ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // Use this option to view a summary of the deletion request without deleting - // any data or the data type. This option is useful when you only want to understand - // what will be deleted. Once you validate that the data to be deleted is what - // you intend to delete, you can run the same command without specifying the - // DryRun option. - DryRun *bool `type:"boolean"` - - // Use the SchemaDeleteOption to delete a custom inventory type (schema). If - // you don't choose this option, the system only deletes existing inventory - // data associated with the custom inventory type. Choose one of the following - // options: - // - // DisableSchema: If you choose this option, the system ignores all inventory - // data for the specified version, and any earlier versions. To enable this - // schema again, you must call the PutInventory action for a version greater - // than the disbled version. - // - // DeleteSchema: This option deletes the specified custom type from the Inventory - // service. You can recreate the schema later, if you want. - SchemaDeleteOption *string `type:"string" enum:"InventorySchemaDeleteOption"` - - // The name of the custom inventory type for which you want to delete either - // all previously collected data, or the inventory type itself. - // - // TypeName is a required field - TypeName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteInventoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInventoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInventoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInventoryInput"} - if s.ClientToken != nil && len(*s.ClientToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) - } - if s.TypeName == nil { - invalidParams.Add(request.NewErrParamRequired("TypeName")) - } - if s.TypeName != nil && len(*s.TypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *DeleteInventoryInput) SetClientToken(v string) *DeleteInventoryInput { - s.ClientToken = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteInventoryInput) SetDryRun(v bool) *DeleteInventoryInput { - s.DryRun = &v - return s -} - -// SetSchemaDeleteOption sets the SchemaDeleteOption field's value. -func (s *DeleteInventoryInput) SetSchemaDeleteOption(v string) *DeleteInventoryInput { - s.SchemaDeleteOption = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *DeleteInventoryInput) SetTypeName(v string) *DeleteInventoryInput { - s.TypeName = &v - return s -} - -type DeleteInventoryOutput struct { - _ struct{} `type:"structure"` - - // Every DeleteInventory action is assigned a unique ID. This option returns - // a unique ID. You can use this ID to query the status of a delete operation. - // This option is useful for ensuring that a delete operation has completed - // before you begin other actions. - DeletionId *string `type:"string"` - - // A summary of the delete operation. For more information about this summary, - // see Understanding the Delete Inventory Summary (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-delete.html#sysman-inventory-delete-summary) - // in the AWS Systems Manager User Guide. - DeletionSummary *InventoryDeletionSummary `type:"structure"` - - // The name of the inventory data type specified in the request. - TypeName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteInventoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteInventoryOutput) GoString() string { - return s.String() -} - -// SetDeletionId sets the DeletionId field's value. -func (s *DeleteInventoryOutput) SetDeletionId(v string) *DeleteInventoryOutput { - s.DeletionId = &v - return s -} - -// SetDeletionSummary sets the DeletionSummary field's value. -func (s *DeleteInventoryOutput) SetDeletionSummary(v *InventoryDeletionSummary) *DeleteInventoryOutput { - s.DeletionSummary = v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *DeleteInventoryOutput) SetTypeName(v string) *DeleteInventoryOutput { - s.TypeName = &v - return s -} - -type DeleteMaintenanceWindowInput struct { - _ struct{} `type:"structure"` - - // The ID of the Maintenance Window to delete. - // - // WindowId is a required field - WindowId *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteMaintenanceWindowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMaintenanceWindowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMaintenanceWindowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMaintenanceWindowInput"} - if s.WindowId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowId")) - } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWindowId sets the WindowId field's value. -func (s *DeleteMaintenanceWindowInput) SetWindowId(v string) *DeleteMaintenanceWindowInput { - s.WindowId = &v - return s -} - -type DeleteMaintenanceWindowOutput struct { - _ struct{} `type:"structure"` - - // The ID of the deleted Maintenance Window. - WindowId *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s DeleteMaintenanceWindowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteMaintenanceWindowOutput) GoString() string { - return s.String() -} - -// SetWindowId sets the WindowId field's value. -func (s *DeleteMaintenanceWindowOutput) SetWindowId(v string) *DeleteMaintenanceWindowOutput { - s.WindowId = &v - return s -} - -type DeleteParameterInput struct { - _ struct{} `type:"structure"` - - // The name of the parameter to delete. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteParameterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteParameterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteParameterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteParameterInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteParameterInput) SetName(v string) *DeleteParameterInput { - s.Name = &v - return s -} - -type DeleteParameterOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteParameterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteParameterOutput) GoString() string { - return s.String() -} - -type DeleteParametersInput struct { - _ struct{} `type:"structure"` - - // The names of the parameters to delete. - // - // Names is a required field - Names []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteParametersInput"} - if s.Names == nil { - invalidParams.Add(request.NewErrParamRequired("Names")) - } - if s.Names != nil && len(s.Names) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Names", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNames sets the Names field's value. -func (s *DeleteParametersInput) SetNames(v []*string) *DeleteParametersInput { - s.Names = v - return s -} - -type DeleteParametersOutput struct { - _ struct{} `type:"structure"` - - // The names of the deleted parameters. - DeletedParameters []*string `min:"1" type:"list"` - - // The names of parameters that weren't deleted because the parameters are not - // valid. - InvalidParameters []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s DeleteParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteParametersOutput) GoString() string { - return s.String() -} - -// SetDeletedParameters sets the DeletedParameters field's value. -func (s *DeleteParametersOutput) SetDeletedParameters(v []*string) *DeleteParametersOutput { - s.DeletedParameters = v - return s -} - -// SetInvalidParameters sets the InvalidParameters field's value. -func (s *DeleteParametersOutput) SetInvalidParameters(v []*string) *DeleteParametersOutput { - s.InvalidParameters = v - return s -} - -type DeletePatchBaselineInput struct { - _ struct{} `type:"structure"` - - // The ID of the patch baseline to delete. - // - // BaselineId is a required field - BaselineId *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePatchBaselineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePatchBaselineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePatchBaselineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePatchBaselineInput"} - if s.BaselineId == nil { - invalidParams.Add(request.NewErrParamRequired("BaselineId")) - } - if s.BaselineId != nil && len(*s.BaselineId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("BaselineId", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBaselineId sets the BaselineId field's value. -func (s *DeletePatchBaselineInput) SetBaselineId(v string) *DeletePatchBaselineInput { - s.BaselineId = &v - return s -} - -type DeletePatchBaselineOutput struct { - _ struct{} `type:"structure"` - - // The ID of the deleted patch baseline. - BaselineId *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s DeletePatchBaselineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePatchBaselineOutput) GoString() string { - return s.String() -} - -// SetBaselineId sets the BaselineId field's value. -func (s *DeletePatchBaselineOutput) SetBaselineId(v string) *DeletePatchBaselineOutput { - s.BaselineId = &v - return s -} - -type DeleteResourceDataSyncInput struct { - _ struct{} `type:"structure"` - - // The name of the configuration to delete. - // - // SyncName is a required field - SyncName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteResourceDataSyncInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResourceDataSyncInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteResourceDataSyncInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteResourceDataSyncInput"} - if s.SyncName == nil { - invalidParams.Add(request.NewErrParamRequired("SyncName")) - } - if s.SyncName != nil && len(*s.SyncName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SyncName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSyncName sets the SyncName field's value. -func (s *DeleteResourceDataSyncInput) SetSyncName(v string) *DeleteResourceDataSyncInput { - s.SyncName = &v - return s -} - -type DeleteResourceDataSyncOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteResourceDataSyncOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteResourceDataSyncOutput) GoString() string { - return s.String() -} - -type DeregisterManagedInstanceInput struct { - _ struct{} `type:"structure"` - - // The ID assigned to the managed instance when you registered it using the - // activation process. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterManagedInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterManagedInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterManagedInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterManagedInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DeregisterManagedInstanceInput) SetInstanceId(v string) *DeregisterManagedInstanceInput { - s.InstanceId = &v - return s -} - -type DeregisterManagedInstanceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeregisterManagedInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterManagedInstanceOutput) GoString() string { - return s.String() -} - -type DeregisterPatchBaselineForPatchGroupInput struct { - _ struct{} `type:"structure"` - - // The ID of the patch baseline to deregister the patch group from. - // - // BaselineId is a required field - BaselineId *string `min:"20" type:"string" required:"true"` - - // The name of the patch group that should be deregistered from the patch baseline. - // - // PatchGroup is a required field - PatchGroup *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterPatchBaselineForPatchGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterPatchBaselineForPatchGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterPatchBaselineForPatchGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterPatchBaselineForPatchGroupInput"} - if s.BaselineId == nil { - invalidParams.Add(request.NewErrParamRequired("BaselineId")) - } - if s.BaselineId != nil && len(*s.BaselineId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("BaselineId", 20)) - } - if s.PatchGroup == nil { - invalidParams.Add(request.NewErrParamRequired("PatchGroup")) - } - if s.PatchGroup != nil && len(*s.PatchGroup) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PatchGroup", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBaselineId sets the BaselineId field's value. -func (s *DeregisterPatchBaselineForPatchGroupInput) SetBaselineId(v string) *DeregisterPatchBaselineForPatchGroupInput { - s.BaselineId = &v - return s -} - -// SetPatchGroup sets the PatchGroup field's value. -func (s *DeregisterPatchBaselineForPatchGroupInput) SetPatchGroup(v string) *DeregisterPatchBaselineForPatchGroupInput { - s.PatchGroup = &v - return s -} - -type DeregisterPatchBaselineForPatchGroupOutput struct { - _ struct{} `type:"structure"` - - // The ID of the patch baseline the patch group was deregistered from. - BaselineId *string `min:"20" type:"string"` - - // The name of the patch group deregistered from the patch baseline. - PatchGroup *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeregisterPatchBaselineForPatchGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterPatchBaselineForPatchGroupOutput) GoString() string { - return s.String() -} - -// SetBaselineId sets the BaselineId field's value. -func (s *DeregisterPatchBaselineForPatchGroupOutput) SetBaselineId(v string) *DeregisterPatchBaselineForPatchGroupOutput { - s.BaselineId = &v - return s -} - -// SetPatchGroup sets the PatchGroup field's value. -func (s *DeregisterPatchBaselineForPatchGroupOutput) SetPatchGroup(v string) *DeregisterPatchBaselineForPatchGroupOutput { - s.PatchGroup = &v - return s -} - -type DeregisterTargetFromMaintenanceWindowInput struct { - _ struct{} `type:"structure"` - - // The system checks if the target is being referenced by a task. If the target - // is being referenced, the system returns an error and does not deregister - // the target from the Maintenance Window. - Safe *bool `type:"boolean"` - - // The ID of the Maintenance Window the target should be removed from. - // - // WindowId is a required field - WindowId *string `min:"20" type:"string" required:"true"` - - // The ID of the target definition to remove. - // - // WindowTargetId is a required field - WindowTargetId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterTargetFromMaintenanceWindowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterTargetFromMaintenanceWindowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterTargetFromMaintenanceWindowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterTargetFromMaintenanceWindowInput"} - if s.WindowId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowId")) - } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) - } - if s.WindowTargetId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowTargetId")) - } - if s.WindowTargetId != nil && len(*s.WindowTargetId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("WindowTargetId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSafe sets the Safe field's value. -func (s *DeregisterTargetFromMaintenanceWindowInput) SetSafe(v bool) *DeregisterTargetFromMaintenanceWindowInput { - s.Safe = &v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *DeregisterTargetFromMaintenanceWindowInput) SetWindowId(v string) *DeregisterTargetFromMaintenanceWindowInput { - s.WindowId = &v - return s -} - -// SetWindowTargetId sets the WindowTargetId field's value. -func (s *DeregisterTargetFromMaintenanceWindowInput) SetWindowTargetId(v string) *DeregisterTargetFromMaintenanceWindowInput { - s.WindowTargetId = &v - return s -} - -type DeregisterTargetFromMaintenanceWindowOutput struct { - _ struct{} `type:"structure"` - - // The ID of the Maintenance Window the target was removed from. - WindowId *string `min:"20" type:"string"` - - // The ID of the removed target definition. - WindowTargetId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s DeregisterTargetFromMaintenanceWindowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterTargetFromMaintenanceWindowOutput) GoString() string { - return s.String() -} - -// SetWindowId sets the WindowId field's value. -func (s *DeregisterTargetFromMaintenanceWindowOutput) SetWindowId(v string) *DeregisterTargetFromMaintenanceWindowOutput { - s.WindowId = &v - return s -} - -// SetWindowTargetId sets the WindowTargetId field's value. -func (s *DeregisterTargetFromMaintenanceWindowOutput) SetWindowTargetId(v string) *DeregisterTargetFromMaintenanceWindowOutput { - s.WindowTargetId = &v - return s -} - -type DeregisterTaskFromMaintenanceWindowInput struct { - _ struct{} `type:"structure"` - - // The ID of the Maintenance Window the task should be removed from. - // - // WindowId is a required field - WindowId *string `min:"20" type:"string" required:"true"` - - // The ID of the task to remove from the Maintenance Window. - // - // WindowTaskId is a required field - WindowTaskId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeregisterTaskFromMaintenanceWindowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterTaskFromMaintenanceWindowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterTaskFromMaintenanceWindowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterTaskFromMaintenanceWindowInput"} - if s.WindowId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowId")) - } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) - } - if s.WindowTaskId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowTaskId")) - } - if s.WindowTaskId != nil && len(*s.WindowTaskId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("WindowTaskId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWindowId sets the WindowId field's value. -func (s *DeregisterTaskFromMaintenanceWindowInput) SetWindowId(v string) *DeregisterTaskFromMaintenanceWindowInput { - s.WindowId = &v - return s -} - -// SetWindowTaskId sets the WindowTaskId field's value. -func (s *DeregisterTaskFromMaintenanceWindowInput) SetWindowTaskId(v string) *DeregisterTaskFromMaintenanceWindowInput { - s.WindowTaskId = &v - return s -} - -type DeregisterTaskFromMaintenanceWindowOutput struct { - _ struct{} `type:"structure"` - - // The ID of the Maintenance Window the task was removed from. - WindowId *string `min:"20" type:"string"` - - // The ID of the task removed from the Maintenance Window. - WindowTaskId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s DeregisterTaskFromMaintenanceWindowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterTaskFromMaintenanceWindowOutput) GoString() string { - return s.String() -} - -// SetWindowId sets the WindowId field's value. -func (s *DeregisterTaskFromMaintenanceWindowOutput) SetWindowId(v string) *DeregisterTaskFromMaintenanceWindowOutput { - s.WindowId = &v - return s -} - -// SetWindowTaskId sets the WindowTaskId field's value. -func (s *DeregisterTaskFromMaintenanceWindowOutput) SetWindowTaskId(v string) *DeregisterTaskFromMaintenanceWindowOutput { - s.WindowTaskId = &v - return s -} - -// Filter for the DescribeActivation API. -type DescribeActivationsFilter struct { - _ struct{} `type:"structure"` - - // The name of the filter. - FilterKey *string `type:"string" enum:"DescribeActivationsFilterKeys"` - - // The filter values. - FilterValues []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeActivationsFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeActivationsFilter) GoString() string { - return s.String() -} - -// SetFilterKey sets the FilterKey field's value. -func (s *DescribeActivationsFilter) SetFilterKey(v string) *DescribeActivationsFilter { - s.FilterKey = &v - return s -} - -// SetFilterValues sets the FilterValues field's value. -func (s *DescribeActivationsFilter) SetFilterValues(v []*string) *DescribeActivationsFilter { - s.FilterValues = v - return s -} - -type DescribeActivationsInput struct { - _ struct{} `type:"structure"` - - // A filter to view information about your activations. - Filters []*DescribeActivationsFilter `type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // A token to start the list. Use this token to get the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeActivationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeActivationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeActivationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeActivationsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeActivationsInput) SetFilters(v []*DescribeActivationsFilter) *DescribeActivationsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeActivationsInput) SetMaxResults(v int64) *DescribeActivationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeActivationsInput) SetNextToken(v string) *DescribeActivationsInput { - s.NextToken = &v - return s -} - -type DescribeActivationsOutput struct { - _ struct{} `type:"structure"` - - // A list of activations for your AWS account. - ActivationList []*Activation `type:"list"` - - // The token for the next set of items to return. Use this token to get the - // next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeActivationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeActivationsOutput) GoString() string { - return s.String() -} - -// SetActivationList sets the ActivationList field's value. -func (s *DescribeActivationsOutput) SetActivationList(v []*Activation) *DescribeActivationsOutput { - s.ActivationList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeActivationsOutput) SetNextToken(v string) *DescribeActivationsOutput { - s.NextToken = &v - return s -} - -type DescribeAssociationExecutionTargetsInput struct { - _ struct{} `type:"structure"` - - // The association ID that includes the execution for which you want to view - // details. - // - // AssociationId is a required field - AssociationId *string `type:"string" required:"true"` - - // The execution ID for which you want to view details. - // - // ExecutionId is a required field - ExecutionId *string `type:"string" required:"true"` - - // Filters for the request. You can specify the following filters and values. - // - // Status (EQUAL) - // - // ResourceId (EQUAL) - // - // ResourceType (EQUAL) - Filters []*AssociationExecutionTargetsFilter `min:"1" type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // A token to start the list. Use this token to get the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAssociationExecutionTargetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAssociationExecutionTargetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAssociationExecutionTargetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAssociationExecutionTargetsInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) - } - if s.ExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("ExecutionId")) - } - if s.Filters != nil && len(s.Filters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationId sets the AssociationId field's value. -func (s *DescribeAssociationExecutionTargetsInput) SetAssociationId(v string) *DescribeAssociationExecutionTargetsInput { - s.AssociationId = &v - return s -} - -// SetExecutionId sets the ExecutionId field's value. -func (s *DescribeAssociationExecutionTargetsInput) SetExecutionId(v string) *DescribeAssociationExecutionTargetsInput { - s.ExecutionId = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeAssociationExecutionTargetsInput) SetFilters(v []*AssociationExecutionTargetsFilter) *DescribeAssociationExecutionTargetsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeAssociationExecutionTargetsInput) SetMaxResults(v int64) *DescribeAssociationExecutionTargetsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAssociationExecutionTargetsInput) SetNextToken(v string) *DescribeAssociationExecutionTargetsInput { - s.NextToken = &v - return s -} - -type DescribeAssociationExecutionTargetsOutput struct { - _ struct{} `type:"structure"` - - // Information about the execution. - AssociationExecutionTargets []*AssociationExecutionTarget `type:"list"` - - // The token for the next set of items to return. Use this token to get the - // next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAssociationExecutionTargetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAssociationExecutionTargetsOutput) GoString() string { - return s.String() -} - -// SetAssociationExecutionTargets sets the AssociationExecutionTargets field's value. -func (s *DescribeAssociationExecutionTargetsOutput) SetAssociationExecutionTargets(v []*AssociationExecutionTarget) *DescribeAssociationExecutionTargetsOutput { - s.AssociationExecutionTargets = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAssociationExecutionTargetsOutput) SetNextToken(v string) *DescribeAssociationExecutionTargetsOutput { - s.NextToken = &v - return s -} - -type DescribeAssociationExecutionsInput struct { - _ struct{} `type:"structure"` - - // The association ID for which you want to view execution history details. - // - // AssociationId is a required field - AssociationId *string `type:"string" required:"true"` - - // Filters for the request. You can specify the following filters and values. - // - // ExecutionId (EQUAL) - // - // Status (EQUAL) - // - // CreatedTime (EQUAL, GREATER_THAN, LESS_THAN) - Filters []*AssociationExecutionFilter `min:"1" type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // A token to start the list. Use this token to get the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAssociationExecutionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAssociationExecutionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAssociationExecutionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAssociationExecutionsInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) - } - if s.Filters != nil && len(s.Filters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationId sets the AssociationId field's value. -func (s *DescribeAssociationExecutionsInput) SetAssociationId(v string) *DescribeAssociationExecutionsInput { - s.AssociationId = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeAssociationExecutionsInput) SetFilters(v []*AssociationExecutionFilter) *DescribeAssociationExecutionsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeAssociationExecutionsInput) SetMaxResults(v int64) *DescribeAssociationExecutionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAssociationExecutionsInput) SetNextToken(v string) *DescribeAssociationExecutionsInput { - s.NextToken = &v - return s -} - -type DescribeAssociationExecutionsOutput struct { - _ struct{} `type:"structure"` - - // A list of the executions for the specified association ID. - AssociationExecutions []*AssociationExecution `type:"list"` - - // The token for the next set of items to return. Use this token to get the - // next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAssociationExecutionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAssociationExecutionsOutput) GoString() string { - return s.String() -} - -// SetAssociationExecutions sets the AssociationExecutions field's value. -func (s *DescribeAssociationExecutionsOutput) SetAssociationExecutions(v []*AssociationExecution) *DescribeAssociationExecutionsOutput { - s.AssociationExecutions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAssociationExecutionsOutput) SetNextToken(v string) *DescribeAssociationExecutionsOutput { - s.NextToken = &v - return s -} - -type DescribeAssociationInput struct { - _ struct{} `type:"structure"` - - // The association ID for which you want information. - AssociationId *string `type:"string"` - - // Specify the association version to retrieve. To view the latest version, - // either specify $LATEST for this parameter, or omit this parameter. To view - // a list of all associations for an instance, use ListInstanceAssociations. - // To get a list of versions for a specific association, use ListAssociationVersions. - AssociationVersion *string `type:"string"` - - // The instance ID. - InstanceId *string `type:"string"` - - // The name of the Systems Manager document. - Name *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAssociationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAssociationInput) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *DescribeAssociationInput) SetAssociationId(v string) *DescribeAssociationInput { - s.AssociationId = &v - return s -} - -// SetAssociationVersion sets the AssociationVersion field's value. -func (s *DescribeAssociationInput) SetAssociationVersion(v string) *DescribeAssociationInput { - s.AssociationVersion = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DescribeAssociationInput) SetInstanceId(v string) *DescribeAssociationInput { - s.InstanceId = &v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeAssociationInput) SetName(v string) *DescribeAssociationInput { - s.Name = &v - return s -} - -type DescribeAssociationOutput struct { - _ struct{} `type:"structure"` - - // Information about the association. - AssociationDescription *AssociationDescription `type:"structure"` -} - -// String returns the string representation -func (s DescribeAssociationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAssociationOutput) GoString() string { - return s.String() -} - -// SetAssociationDescription sets the AssociationDescription field's value. -func (s *DescribeAssociationOutput) SetAssociationDescription(v *AssociationDescription) *DescribeAssociationOutput { - s.AssociationDescription = v - return s -} - -type DescribeAutomationExecutionsInput struct { - _ struct{} `type:"structure"` - - // Filters used to limit the scope of executions that are requested. - Filters []*AutomationExecutionFilter `min:"1" type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAutomationExecutionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAutomationExecutionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAutomationExecutionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAutomationExecutionsInput"} - if s.Filters != nil && len(s.Filters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeAutomationExecutionsInput) SetFilters(v []*AutomationExecutionFilter) *DescribeAutomationExecutionsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeAutomationExecutionsInput) SetMaxResults(v int64) *DescribeAutomationExecutionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAutomationExecutionsInput) SetNextToken(v string) *DescribeAutomationExecutionsInput { - s.NextToken = &v - return s -} - -type DescribeAutomationExecutionsOutput struct { - _ struct{} `type:"structure"` - - // The list of details about each automation execution which has occurred which - // matches the filter specification, if any. - AutomationExecutionMetadataList []*AutomationExecutionMetadata `type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAutomationExecutionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAutomationExecutionsOutput) GoString() string { - return s.String() -} - -// SetAutomationExecutionMetadataList sets the AutomationExecutionMetadataList field's value. -func (s *DescribeAutomationExecutionsOutput) SetAutomationExecutionMetadataList(v []*AutomationExecutionMetadata) *DescribeAutomationExecutionsOutput { - s.AutomationExecutionMetadataList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAutomationExecutionsOutput) SetNextToken(v string) *DescribeAutomationExecutionsOutput { - s.NextToken = &v - return s -} - -type DescribeAutomationStepExecutionsInput struct { - _ struct{} `type:"structure"` - - // The Automation execution ID for which you want step execution descriptions. - // - // AutomationExecutionId is a required field - AutomationExecutionId *string `min:"36" type:"string" required:"true"` - - // One or more filters to limit the number of step executions returned by the - // request. - Filters []*StepExecutionFilter `min:"1" type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // A boolean that indicates whether to list step executions in reverse order - // by start time. The default value is false. - ReverseOrder *bool `type:"boolean"` -} - -// String returns the string representation -func (s DescribeAutomationStepExecutionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAutomationStepExecutionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAutomationStepExecutionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAutomationStepExecutionsInput"} - if s.AutomationExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("AutomationExecutionId")) - } - if s.AutomationExecutionId != nil && len(*s.AutomationExecutionId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("AutomationExecutionId", 36)) - } - if s.Filters != nil && len(s.Filters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutomationExecutionId sets the AutomationExecutionId field's value. -func (s *DescribeAutomationStepExecutionsInput) SetAutomationExecutionId(v string) *DescribeAutomationStepExecutionsInput { - s.AutomationExecutionId = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeAutomationStepExecutionsInput) SetFilters(v []*StepExecutionFilter) *DescribeAutomationStepExecutionsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeAutomationStepExecutionsInput) SetMaxResults(v int64) *DescribeAutomationStepExecutionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAutomationStepExecutionsInput) SetNextToken(v string) *DescribeAutomationStepExecutionsInput { - s.NextToken = &v - return s -} - -// SetReverseOrder sets the ReverseOrder field's value. -func (s *DescribeAutomationStepExecutionsInput) SetReverseOrder(v bool) *DescribeAutomationStepExecutionsInput { - s.ReverseOrder = &v - return s -} - -type DescribeAutomationStepExecutionsOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // A list of details about the current state of all steps that make up an execution. - StepExecutions []*StepExecution `type:"list"` -} - -// String returns the string representation -func (s DescribeAutomationStepExecutionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAutomationStepExecutionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAutomationStepExecutionsOutput) SetNextToken(v string) *DescribeAutomationStepExecutionsOutput { - s.NextToken = &v - return s -} - -// SetStepExecutions sets the StepExecutions field's value. -func (s *DescribeAutomationStepExecutionsOutput) SetStepExecutions(v []*StepExecution) *DescribeAutomationStepExecutionsOutput { - s.StepExecutions = v - return s -} - -type DescribeAvailablePatchesInput struct { - _ struct{} `type:"structure"` - - // Filters used to scope down the returned patches. - Filters []*PatchOrchestratorFilter `type:"list"` - - // The maximum number of patches to return (per page). - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAvailablePatchesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAvailablePatchesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAvailablePatchesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAvailablePatchesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeAvailablePatchesInput) SetFilters(v []*PatchOrchestratorFilter) *DescribeAvailablePatchesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeAvailablePatchesInput) SetMaxResults(v int64) *DescribeAvailablePatchesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAvailablePatchesInput) SetNextToken(v string) *DescribeAvailablePatchesInput { - s.NextToken = &v - return s -} - -type DescribeAvailablePatchesOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // An array of patches. Each entry in the array is a patch structure. - Patches []*Patch `type:"list"` -} - -// String returns the string representation -func (s DescribeAvailablePatchesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAvailablePatchesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAvailablePatchesOutput) SetNextToken(v string) *DescribeAvailablePatchesOutput { - s.NextToken = &v - return s -} - -// SetPatches sets the Patches field's value. -func (s *DescribeAvailablePatchesOutput) SetPatches(v []*Patch) *DescribeAvailablePatchesOutput { - s.Patches = v - return s -} - -type DescribeDocumentInput struct { - _ struct{} `type:"structure"` - - // The document version for which you want information. Can be a specific version - // or the default version. - DocumentVersion *string `type:"string"` - - // The name of the Systems Manager document. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // An optional field specifying the version of the artifact associated with - // the document. For example, "Release 12, Update 6". This value is unique across - // all versions of a document, and cannot be changed. - VersionName *string `type:"string"` -} - -// String returns the string representation -func (s DescribeDocumentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDocumentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDocumentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDocumentInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *DescribeDocumentInput) SetDocumentVersion(v string) *DescribeDocumentInput { - s.DocumentVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *DescribeDocumentInput) SetName(v string) *DescribeDocumentInput { - s.Name = &v - return s -} - -// SetVersionName sets the VersionName field's value. -func (s *DescribeDocumentInput) SetVersionName(v string) *DescribeDocumentInput { - s.VersionName = &v - return s -} - -type DescribeDocumentOutput struct { - _ struct{} `type:"structure"` - - // Information about the Systems Manager document. - Document *DocumentDescription `type:"structure"` -} - -// String returns the string representation -func (s DescribeDocumentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDocumentOutput) GoString() string { - return s.String() -} - -// SetDocument sets the Document field's value. -func (s *DescribeDocumentOutput) SetDocument(v *DocumentDescription) *DescribeDocumentOutput { - s.Document = v - return s -} - -type DescribeDocumentPermissionInput struct { - _ struct{} `type:"structure"` - - // The name of the document for which you are the owner. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The permission type for the document. The permission type can be Share. - // - // PermissionType is a required field - PermissionType *string `type:"string" required:"true" enum:"DocumentPermissionType"` -} - -// String returns the string representation -func (s DescribeDocumentPermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDocumentPermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDocumentPermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDocumentPermissionInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.PermissionType == nil { - invalidParams.Add(request.NewErrParamRequired("PermissionType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DescribeDocumentPermissionInput) SetName(v string) *DescribeDocumentPermissionInput { - s.Name = &v - return s -} - -// SetPermissionType sets the PermissionType field's value. -func (s *DescribeDocumentPermissionInput) SetPermissionType(v string) *DescribeDocumentPermissionInput { - s.PermissionType = &v - return s -} - -type DescribeDocumentPermissionOutput struct { - _ struct{} `type:"structure"` - - // The account IDs that have permission to use this document. The ID can be - // either an AWS account or All. - AccountIds []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeDocumentPermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDocumentPermissionOutput) GoString() string { - return s.String() -} - -// SetAccountIds sets the AccountIds field's value. -func (s *DescribeDocumentPermissionOutput) SetAccountIds(v []*string) *DescribeDocumentPermissionOutput { - s.AccountIds = v - return s -} - -type DescribeEffectiveInstanceAssociationsInput struct { - _ struct{} `type:"structure"` - - // The instance ID for which you want to view all associations. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEffectiveInstanceAssociationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEffectiveInstanceAssociationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEffectiveInstanceAssociationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEffectiveInstanceAssociationsInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DescribeEffectiveInstanceAssociationsInput) SetInstanceId(v string) *DescribeEffectiveInstanceAssociationsInput { - s.InstanceId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeEffectiveInstanceAssociationsInput) SetMaxResults(v int64) *DescribeEffectiveInstanceAssociationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEffectiveInstanceAssociationsInput) SetNextToken(v string) *DescribeEffectiveInstanceAssociationsInput { - s.NextToken = &v - return s -} - -type DescribeEffectiveInstanceAssociationsOutput struct { - _ struct{} `type:"structure"` - - // The associations for the requested instance. - Associations []*InstanceAssociation `type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEffectiveInstanceAssociationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEffectiveInstanceAssociationsOutput) GoString() string { - return s.String() -} - -// SetAssociations sets the Associations field's value. -func (s *DescribeEffectiveInstanceAssociationsOutput) SetAssociations(v []*InstanceAssociation) *DescribeEffectiveInstanceAssociationsOutput { - s.Associations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEffectiveInstanceAssociationsOutput) SetNextToken(v string) *DescribeEffectiveInstanceAssociationsOutput { - s.NextToken = &v - return s -} - -type DescribeEffectivePatchesForPatchBaselineInput struct { - _ struct{} `type:"structure"` - - // The ID of the patch baseline to retrieve the effective patches for. - // - // BaselineId is a required field - BaselineId *string `min:"20" type:"string" required:"true"` - - // The maximum number of patches to return (per page). - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEffectivePatchesForPatchBaselineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEffectivePatchesForPatchBaselineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEffectivePatchesForPatchBaselineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEffectivePatchesForPatchBaselineInput"} - if s.BaselineId == nil { - invalidParams.Add(request.NewErrParamRequired("BaselineId")) - } - if s.BaselineId != nil && len(*s.BaselineId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("BaselineId", 20)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBaselineId sets the BaselineId field's value. -func (s *DescribeEffectivePatchesForPatchBaselineInput) SetBaselineId(v string) *DescribeEffectivePatchesForPatchBaselineInput { - s.BaselineId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeEffectivePatchesForPatchBaselineInput) SetMaxResults(v int64) *DescribeEffectivePatchesForPatchBaselineInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEffectivePatchesForPatchBaselineInput) SetNextToken(v string) *DescribeEffectivePatchesForPatchBaselineInput { - s.NextToken = &v - return s -} - -type DescribeEffectivePatchesForPatchBaselineOutput struct { - _ struct{} `type:"structure"` - - // An array of patches and patch status. - EffectivePatches []*EffectivePatch `type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeEffectivePatchesForPatchBaselineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeEffectivePatchesForPatchBaselineOutput) GoString() string { - return s.String() -} - -// SetEffectivePatches sets the EffectivePatches field's value. -func (s *DescribeEffectivePatchesForPatchBaselineOutput) SetEffectivePatches(v []*EffectivePatch) *DescribeEffectivePatchesForPatchBaselineOutput { - s.EffectivePatches = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEffectivePatchesForPatchBaselineOutput) SetNextToken(v string) *DescribeEffectivePatchesForPatchBaselineOutput { - s.NextToken = &v - return s -} - -type DescribeInstanceAssociationsStatusInput struct { - _ struct{} `type:"structure"` - - // The instance IDs for which you want association status information. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeInstanceAssociationsStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstanceAssociationsStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInstanceAssociationsStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInstanceAssociationsStatusInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DescribeInstanceAssociationsStatusInput) SetInstanceId(v string) *DescribeInstanceAssociationsStatusInput { - s.InstanceId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeInstanceAssociationsStatusInput) SetMaxResults(v int64) *DescribeInstanceAssociationsStatusInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstanceAssociationsStatusInput) SetNextToken(v string) *DescribeInstanceAssociationsStatusInput { - s.NextToken = &v - return s -} - -type DescribeInstanceAssociationsStatusOutput struct { - _ struct{} `type:"structure"` - - // Status information about the association. - InstanceAssociationStatusInfos []*InstanceAssociationStatusInfo `type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeInstanceAssociationsStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstanceAssociationsStatusOutput) GoString() string { - return s.String() -} - -// SetInstanceAssociationStatusInfos sets the InstanceAssociationStatusInfos field's value. -func (s *DescribeInstanceAssociationsStatusOutput) SetInstanceAssociationStatusInfos(v []*InstanceAssociationStatusInfo) *DescribeInstanceAssociationsStatusOutput { - s.InstanceAssociationStatusInfos = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstanceAssociationsStatusOutput) SetNextToken(v string) *DescribeInstanceAssociationsStatusOutput { - s.NextToken = &v - return s -} - -type DescribeInstanceInformationInput struct { - _ struct{} `type:"structure"` - - // One or more filters. Use a filter to return a more specific list of instances. - // You can filter on Amazon EC2 tag. Specify tags by using a key-value mapping. - Filters []*InstanceInformationStringFilter `type:"list"` - - // This is a legacy method. We recommend that you don't use this method. Instead, - // use the InstanceInformationFilter action. The InstanceInformationFilter action - // enables you to return instance information by using tags that are specified - // as a key-value mapping. - // - // If you do use this method, then you can't use the InstanceInformationFilter - // action. Using this method and the InstanceInformationFilter action causes - // an exception error. - InstanceInformationFilterList []*InstanceInformationFilter `type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"5" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeInstanceInformationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstanceInformationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInstanceInformationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInstanceInformationInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - if s.InstanceInformationFilterList != nil { - for i, v := range s.InstanceInformationFilterList { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InstanceInformationFilterList", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeInstanceInformationInput) SetFilters(v []*InstanceInformationStringFilter) *DescribeInstanceInformationInput { - s.Filters = v - return s -} - -// SetInstanceInformationFilterList sets the InstanceInformationFilterList field's value. -func (s *DescribeInstanceInformationInput) SetInstanceInformationFilterList(v []*InstanceInformationFilter) *DescribeInstanceInformationInput { - s.InstanceInformationFilterList = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeInstanceInformationInput) SetMaxResults(v int64) *DescribeInstanceInformationInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstanceInformationInput) SetNextToken(v string) *DescribeInstanceInformationInput { - s.NextToken = &v - return s -} - -type DescribeInstanceInformationOutput struct { - _ struct{} `type:"structure"` - - // The instance information list. - InstanceInformationList []*InstanceInformation `type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeInstanceInformationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstanceInformationOutput) GoString() string { - return s.String() -} - -// SetInstanceInformationList sets the InstanceInformationList field's value. -func (s *DescribeInstanceInformationOutput) SetInstanceInformationList(v []*InstanceInformation) *DescribeInstanceInformationOutput { - s.InstanceInformationList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstanceInformationOutput) SetNextToken(v string) *DescribeInstanceInformationOutput { - s.NextToken = &v - return s -} - -type DescribeInstancePatchStatesForPatchGroupInput struct { - _ struct{} `type:"structure"` - - // Each entry in the array is a structure containing: - // - // Key (string between 1 and 200 characters) - // - // Values (array containing a single string) - // - // Type (string "Equal", "NotEqual", "LessThan", "GreaterThan") - Filters []*InstancePatchStateFilter `type:"list"` - - // The maximum number of patches to return (per page). - MaxResults *int64 `min:"10" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // The name of the patch group for which the patch state information should - // be retrieved. - // - // PatchGroup is a required field - PatchGroup *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeInstancePatchStatesForPatchGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstancePatchStatesForPatchGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInstancePatchStatesForPatchGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInstancePatchStatesForPatchGroupInput"} - if s.MaxResults != nil && *s.MaxResults < 10 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) - } - if s.PatchGroup == nil { - invalidParams.Add(request.NewErrParamRequired("PatchGroup")) - } - if s.PatchGroup != nil && len(*s.PatchGroup) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PatchGroup", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeInstancePatchStatesForPatchGroupInput) SetFilters(v []*InstancePatchStateFilter) *DescribeInstancePatchStatesForPatchGroupInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeInstancePatchStatesForPatchGroupInput) SetMaxResults(v int64) *DescribeInstancePatchStatesForPatchGroupInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstancePatchStatesForPatchGroupInput) SetNextToken(v string) *DescribeInstancePatchStatesForPatchGroupInput { - s.NextToken = &v - return s -} - -// SetPatchGroup sets the PatchGroup field's value. -func (s *DescribeInstancePatchStatesForPatchGroupInput) SetPatchGroup(v string) *DescribeInstancePatchStatesForPatchGroupInput { - s.PatchGroup = &v - return s -} - -type DescribeInstancePatchStatesForPatchGroupOutput struct { - _ struct{} `type:"structure"` - - // The high-level patch state for the requested instances. - InstancePatchStates []*InstancePatchState `min:"1" type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeInstancePatchStatesForPatchGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstancePatchStatesForPatchGroupOutput) GoString() string { - return s.String() -} - -// SetInstancePatchStates sets the InstancePatchStates field's value. -func (s *DescribeInstancePatchStatesForPatchGroupOutput) SetInstancePatchStates(v []*InstancePatchState) *DescribeInstancePatchStatesForPatchGroupOutput { - s.InstancePatchStates = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstancePatchStatesForPatchGroupOutput) SetNextToken(v string) *DescribeInstancePatchStatesForPatchGroupOutput { - s.NextToken = &v - return s -} - -type DescribeInstancePatchStatesInput struct { - _ struct{} `type:"structure"` - - // The ID of the instance whose patch state information should be retrieved. - // - // InstanceIds is a required field - InstanceIds []*string `type:"list" required:"true"` - - // The maximum number of instances to return (per page). - MaxResults *int64 `min:"10" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeInstancePatchStatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstancePatchStatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInstancePatchStatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInstancePatchStatesInput"} - if s.InstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceIds")) - } - if s.MaxResults != nil && *s.MaxResults < 10 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *DescribeInstancePatchStatesInput) SetInstanceIds(v []*string) *DescribeInstancePatchStatesInput { - s.InstanceIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeInstancePatchStatesInput) SetMaxResults(v int64) *DescribeInstancePatchStatesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstancePatchStatesInput) SetNextToken(v string) *DescribeInstancePatchStatesInput { - s.NextToken = &v - return s -} - -type DescribeInstancePatchStatesOutput struct { - _ struct{} `type:"structure"` - - // The high-level patch state for the requested instances. - InstancePatchStates []*InstancePatchState `type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeInstancePatchStatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstancePatchStatesOutput) GoString() string { - return s.String() -} - -// SetInstancePatchStates sets the InstancePatchStates field's value. -func (s *DescribeInstancePatchStatesOutput) SetInstancePatchStates(v []*InstancePatchState) *DescribeInstancePatchStatesOutput { - s.InstancePatchStates = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstancePatchStatesOutput) SetNextToken(v string) *DescribeInstancePatchStatesOutput { - s.NextToken = &v - return s -} - -type DescribeInstancePatchesInput struct { - _ struct{} `type:"structure"` - - // Each entry in the array is a structure containing: - // - // Key (string, between 1 and 128 characters) - // - // Values (array of strings, each string between 1 and 256 characters) - Filters []*PatchOrchestratorFilter `type:"list"` - - // The ID of the instance whose patch state information should be retrieved. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The maximum number of patches to return (per page). - MaxResults *int64 `min:"10" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeInstancePatchesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstancePatchesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInstancePatchesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInstancePatchesInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.MaxResults != nil && *s.MaxResults < 10 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeInstancePatchesInput) SetFilters(v []*PatchOrchestratorFilter) *DescribeInstancePatchesInput { - s.Filters = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *DescribeInstancePatchesInput) SetInstanceId(v string) *DescribeInstancePatchesInput { - s.InstanceId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeInstancePatchesInput) SetMaxResults(v int64) *DescribeInstancePatchesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstancePatchesInput) SetNextToken(v string) *DescribeInstancePatchesInput { - s.NextToken = &v - return s -} - -type DescribeInstancePatchesOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // Each entry in the array is a structure containing: - // - // Title (string) - // - // KBId (string) - // - // Classification (string) - // - // Severity (string) - // - // State (string, such as "INSTALLED" or "FAILED") - // - // InstalledTime (DateTime) - // - // InstalledBy (string) - Patches []*PatchComplianceData `type:"list"` -} - -// String returns the string representation -func (s DescribeInstancePatchesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInstancePatchesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInstancePatchesOutput) SetNextToken(v string) *DescribeInstancePatchesOutput { - s.NextToken = &v - return s -} - -// SetPatches sets the Patches field's value. -func (s *DescribeInstancePatchesOutput) SetPatches(v []*PatchComplianceData) *DescribeInstancePatchesOutput { - s.Patches = v - return s -} - -type DescribeInventoryDeletionsInput struct { - _ struct{} `type:"structure"` - - // Specify the delete inventory ID for which you want information. This ID was - // returned by the DeleteInventory action. - DeletionId *string `type:"string"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // A token to start the list. Use this token to get the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeInventoryDeletionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInventoryDeletionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInventoryDeletionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInventoryDeletionsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeletionId sets the DeletionId field's value. -func (s *DescribeInventoryDeletionsInput) SetDeletionId(v string) *DescribeInventoryDeletionsInput { - s.DeletionId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeInventoryDeletionsInput) SetMaxResults(v int64) *DescribeInventoryDeletionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInventoryDeletionsInput) SetNextToken(v string) *DescribeInventoryDeletionsInput { - s.NextToken = &v - return s -} - -type DescribeInventoryDeletionsOutput struct { - _ struct{} `type:"structure"` - - // A list of status items for deleted inventory. - InventoryDeletions []*InventoryDeletionStatusItem `type:"list"` - - // The token for the next set of items to return. Use this token to get the - // next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeInventoryDeletionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeInventoryDeletionsOutput) GoString() string { - return s.String() -} - -// SetInventoryDeletions sets the InventoryDeletions field's value. -func (s *DescribeInventoryDeletionsOutput) SetInventoryDeletions(v []*InventoryDeletionStatusItem) *DescribeInventoryDeletionsOutput { - s.InventoryDeletions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeInventoryDeletionsOutput) SetNextToken(v string) *DescribeInventoryDeletionsOutput { - s.NextToken = &v - return s -} - -type DescribeMaintenanceWindowExecutionTaskInvocationsInput struct { - _ struct{} `type:"structure"` - - // Optional filters used to scope down the returned task invocations. The supported - // filter key is STATUS with the corresponding values PENDING, IN_PROGRESS, - // SUCCESS, FAILED, TIMED_OUT, CANCELLING, and CANCELLED. - Filters []*MaintenanceWindowFilter `type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"10" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // The ID of the specific task in the Maintenance Window task that should be - // retrieved. - // - // TaskId is a required field - TaskId *string `min:"36" type:"string" required:"true"` - - // The ID of the Maintenance Window execution the task is part of. - // - // WindowExecutionId is a required field - WindowExecutionId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowExecutionTaskInvocationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowExecutionTaskInvocationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMaintenanceWindowExecutionTaskInvocationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowExecutionTaskInvocationsInput"} - if s.MaxResults != nil && *s.MaxResults < 10 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) - } - if s.TaskId == nil { - invalidParams.Add(request.NewErrParamRequired("TaskId")) - } - if s.TaskId != nil && len(*s.TaskId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 36)) - } - if s.WindowExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowExecutionId")) - } - if s.WindowExecutionId != nil && len(*s.WindowExecutionId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("WindowExecutionId", 36)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeMaintenanceWindowExecutionTaskInvocationsInput) SetFilters(v []*MaintenanceWindowFilter) *DescribeMaintenanceWindowExecutionTaskInvocationsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeMaintenanceWindowExecutionTaskInvocationsInput) SetMaxResults(v int64) *DescribeMaintenanceWindowExecutionTaskInvocationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowExecutionTaskInvocationsInput) SetNextToken(v string) *DescribeMaintenanceWindowExecutionTaskInvocationsInput { - s.NextToken = &v - return s -} - -// SetTaskId sets the TaskId field's value. -func (s *DescribeMaintenanceWindowExecutionTaskInvocationsInput) SetTaskId(v string) *DescribeMaintenanceWindowExecutionTaskInvocationsInput { - s.TaskId = &v - return s -} - -// SetWindowExecutionId sets the WindowExecutionId field's value. -func (s *DescribeMaintenanceWindowExecutionTaskInvocationsInput) SetWindowExecutionId(v string) *DescribeMaintenanceWindowExecutionTaskInvocationsInput { - s.WindowExecutionId = &v - return s -} - -type DescribeMaintenanceWindowExecutionTaskInvocationsOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // Information about the task invocation results per invocation. - WindowExecutionTaskInvocationIdentities []*MaintenanceWindowExecutionTaskInvocationIdentity `type:"list"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowExecutionTaskInvocationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowExecutionTaskInvocationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowExecutionTaskInvocationsOutput) SetNextToken(v string) *DescribeMaintenanceWindowExecutionTaskInvocationsOutput { - s.NextToken = &v - return s -} - -// SetWindowExecutionTaskInvocationIdentities sets the WindowExecutionTaskInvocationIdentities field's value. -func (s *DescribeMaintenanceWindowExecutionTaskInvocationsOutput) SetWindowExecutionTaskInvocationIdentities(v []*MaintenanceWindowExecutionTaskInvocationIdentity) *DescribeMaintenanceWindowExecutionTaskInvocationsOutput { - s.WindowExecutionTaskInvocationIdentities = v - return s -} - -type DescribeMaintenanceWindowExecutionTasksInput struct { - _ struct{} `type:"structure"` - - // Optional filters used to scope down the returned tasks. The supported filter - // key is STATUS with the corresponding values PENDING, IN_PROGRESS, SUCCESS, - // FAILED, TIMED_OUT, CANCELLING, and CANCELLED. - Filters []*MaintenanceWindowFilter `type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"10" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // The ID of the Maintenance Window execution whose task executions should be - // retrieved. - // - // WindowExecutionId is a required field - WindowExecutionId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowExecutionTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowExecutionTasksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMaintenanceWindowExecutionTasksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowExecutionTasksInput"} - if s.MaxResults != nil && *s.MaxResults < 10 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) - } - if s.WindowExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowExecutionId")) - } - if s.WindowExecutionId != nil && len(*s.WindowExecutionId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("WindowExecutionId", 36)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeMaintenanceWindowExecutionTasksInput) SetFilters(v []*MaintenanceWindowFilter) *DescribeMaintenanceWindowExecutionTasksInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeMaintenanceWindowExecutionTasksInput) SetMaxResults(v int64) *DescribeMaintenanceWindowExecutionTasksInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowExecutionTasksInput) SetNextToken(v string) *DescribeMaintenanceWindowExecutionTasksInput { - s.NextToken = &v - return s -} - -// SetWindowExecutionId sets the WindowExecutionId field's value. -func (s *DescribeMaintenanceWindowExecutionTasksInput) SetWindowExecutionId(v string) *DescribeMaintenanceWindowExecutionTasksInput { - s.WindowExecutionId = &v - return s -} - -type DescribeMaintenanceWindowExecutionTasksOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // Information about the task executions. - WindowExecutionTaskIdentities []*MaintenanceWindowExecutionTaskIdentity `type:"list"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowExecutionTasksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowExecutionTasksOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowExecutionTasksOutput) SetNextToken(v string) *DescribeMaintenanceWindowExecutionTasksOutput { - s.NextToken = &v - return s -} - -// SetWindowExecutionTaskIdentities sets the WindowExecutionTaskIdentities field's value. -func (s *DescribeMaintenanceWindowExecutionTasksOutput) SetWindowExecutionTaskIdentities(v []*MaintenanceWindowExecutionTaskIdentity) *DescribeMaintenanceWindowExecutionTasksOutput { - s.WindowExecutionTaskIdentities = v - return s -} - -type DescribeMaintenanceWindowExecutionsInput struct { - _ struct{} `type:"structure"` - - // Each entry in the array is a structure containing: - // - // Key (string, between 1 and 128 characters) - // - // Values (array of strings, each string is between 1 and 256 characters) - // - // The supported Keys are ExecutedBefore and ExecutedAfter with the value being - // a date/time string such as 2016-11-04T05:00:00Z. - Filters []*MaintenanceWindowFilter `type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"10" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // The ID of the Maintenance Window whose executions should be retrieved. - // - // WindowId is a required field - WindowId *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowExecutionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowExecutionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMaintenanceWindowExecutionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowExecutionsInput"} - if s.MaxResults != nil && *s.MaxResults < 10 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) - } - if s.WindowId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowId")) - } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeMaintenanceWindowExecutionsInput) SetFilters(v []*MaintenanceWindowFilter) *DescribeMaintenanceWindowExecutionsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeMaintenanceWindowExecutionsInput) SetMaxResults(v int64) *DescribeMaintenanceWindowExecutionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowExecutionsInput) SetNextToken(v string) *DescribeMaintenanceWindowExecutionsInput { - s.NextToken = &v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *DescribeMaintenanceWindowExecutionsInput) SetWindowId(v string) *DescribeMaintenanceWindowExecutionsInput { - s.WindowId = &v - return s -} - -type DescribeMaintenanceWindowExecutionsOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // Information about the Maintenance Windows execution. - WindowExecutions []*MaintenanceWindowExecution `type:"list"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowExecutionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowExecutionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowExecutionsOutput) SetNextToken(v string) *DescribeMaintenanceWindowExecutionsOutput { - s.NextToken = &v - return s -} - -// SetWindowExecutions sets the WindowExecutions field's value. -func (s *DescribeMaintenanceWindowExecutionsOutput) SetWindowExecutions(v []*MaintenanceWindowExecution) *DescribeMaintenanceWindowExecutionsOutput { - s.WindowExecutions = v - return s -} - -type DescribeMaintenanceWindowScheduleInput struct { - _ struct{} `type:"structure"` - - // Filters used to limit the range of results. For example, you can limit Maintenance - // Window executions to only those scheduled before or after a certain date - // and time. - Filters []*PatchOrchestratorFilter `type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // The type of resource you want to retrieve information about. For example, - // "INSTANCE". - ResourceType *string `type:"string" enum:"MaintenanceWindowResourceType"` - - // The instance ID or key/value pair to retrieve information about. - Targets []*Target `type:"list"` - - // The ID of the Maintenance Window to retrieve information about. - WindowId *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowScheduleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowScheduleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMaintenanceWindowScheduleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowScheduleInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeMaintenanceWindowScheduleInput) SetFilters(v []*PatchOrchestratorFilter) *DescribeMaintenanceWindowScheduleInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeMaintenanceWindowScheduleInput) SetMaxResults(v int64) *DescribeMaintenanceWindowScheduleInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowScheduleInput) SetNextToken(v string) *DescribeMaintenanceWindowScheduleInput { - s.NextToken = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *DescribeMaintenanceWindowScheduleInput) SetResourceType(v string) *DescribeMaintenanceWindowScheduleInput { - s.ResourceType = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *DescribeMaintenanceWindowScheduleInput) SetTargets(v []*Target) *DescribeMaintenanceWindowScheduleInput { - s.Targets = v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *DescribeMaintenanceWindowScheduleInput) SetWindowId(v string) *DescribeMaintenanceWindowScheduleInput { - s.WindowId = &v - return s -} - -type DescribeMaintenanceWindowScheduleOutput struct { - _ struct{} `type:"structure"` - - // The token for the next set of items to return. (You use this token in the - // next call.) - NextToken *string `type:"string"` - - // Information about Maintenance Window executions scheduled for the specified - // time range. - ScheduledWindowExecutions []*ScheduledWindowExecution `type:"list"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowScheduleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowScheduleOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowScheduleOutput) SetNextToken(v string) *DescribeMaintenanceWindowScheduleOutput { - s.NextToken = &v - return s -} - -// SetScheduledWindowExecutions sets the ScheduledWindowExecutions field's value. -func (s *DescribeMaintenanceWindowScheduleOutput) SetScheduledWindowExecutions(v []*ScheduledWindowExecution) *DescribeMaintenanceWindowScheduleOutput { - s.ScheduledWindowExecutions = v - return s -} - -type DescribeMaintenanceWindowTargetsInput struct { - _ struct{} `type:"structure"` - - // Optional filters that can be used to narrow down the scope of the returned - // window targets. The supported filter keys are Type, WindowTargetId and OwnerInformation. - Filters []*MaintenanceWindowFilter `type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"10" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // The ID of the Maintenance Window whose targets should be retrieved. - // - // WindowId is a required field - WindowId *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowTargetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowTargetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMaintenanceWindowTargetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowTargetsInput"} - if s.MaxResults != nil && *s.MaxResults < 10 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) - } - if s.WindowId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowId")) - } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeMaintenanceWindowTargetsInput) SetFilters(v []*MaintenanceWindowFilter) *DescribeMaintenanceWindowTargetsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeMaintenanceWindowTargetsInput) SetMaxResults(v int64) *DescribeMaintenanceWindowTargetsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowTargetsInput) SetNextToken(v string) *DescribeMaintenanceWindowTargetsInput { - s.NextToken = &v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *DescribeMaintenanceWindowTargetsInput) SetWindowId(v string) *DescribeMaintenanceWindowTargetsInput { - s.WindowId = &v - return s -} - -type DescribeMaintenanceWindowTargetsOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // Information about the targets in the Maintenance Window. - Targets []*MaintenanceWindowTarget `type:"list"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowTargetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowTargetsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowTargetsOutput) SetNextToken(v string) *DescribeMaintenanceWindowTargetsOutput { - s.NextToken = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *DescribeMaintenanceWindowTargetsOutput) SetTargets(v []*MaintenanceWindowTarget) *DescribeMaintenanceWindowTargetsOutput { - s.Targets = v - return s -} - -type DescribeMaintenanceWindowTasksInput struct { - _ struct{} `type:"structure"` - - // Optional filters used to narrow down the scope of the returned tasks. The - // supported filter keys are WindowTaskId, TaskArn, Priority, and TaskType. - Filters []*MaintenanceWindowFilter `type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"10" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // The ID of the Maintenance Window whose tasks should be retrieved. - // - // WindowId is a required field - WindowId *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowTasksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMaintenanceWindowTasksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowTasksInput"} - if s.MaxResults != nil && *s.MaxResults < 10 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) - } - if s.WindowId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowId")) - } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeMaintenanceWindowTasksInput) SetFilters(v []*MaintenanceWindowFilter) *DescribeMaintenanceWindowTasksInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeMaintenanceWindowTasksInput) SetMaxResults(v int64) *DescribeMaintenanceWindowTasksInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowTasksInput) SetNextToken(v string) *DescribeMaintenanceWindowTasksInput { - s.NextToken = &v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *DescribeMaintenanceWindowTasksInput) SetWindowId(v string) *DescribeMaintenanceWindowTasksInput { - s.WindowId = &v - return s -} - -type DescribeMaintenanceWindowTasksOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // Information about the tasks in the Maintenance Window. - Tasks []*MaintenanceWindowTask `type:"list"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowTasksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowTasksOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowTasksOutput) SetNextToken(v string) *DescribeMaintenanceWindowTasksOutput { - s.NextToken = &v - return s -} - -// SetTasks sets the Tasks field's value. -func (s *DescribeMaintenanceWindowTasksOutput) SetTasks(v []*MaintenanceWindowTask) *DescribeMaintenanceWindowTasksOutput { - s.Tasks = v - return s -} - -type DescribeMaintenanceWindowsForTargetInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // The type of resource you want to retrieve information about. For example, - // "INSTANCE". - // - // ResourceType is a required field - ResourceType *string `type:"string" required:"true" enum:"MaintenanceWindowResourceType"` - - // The instance ID or key/value pair to retrieve information about. - // - // Targets is a required field - Targets []*Target `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowsForTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowsForTargetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMaintenanceWindowsForTargetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowsForTargetInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - if s.Targets == nil { - invalidParams.Add(request.NewErrParamRequired("Targets")) - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeMaintenanceWindowsForTargetInput) SetMaxResults(v int64) *DescribeMaintenanceWindowsForTargetInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowsForTargetInput) SetNextToken(v string) *DescribeMaintenanceWindowsForTargetInput { - s.NextToken = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *DescribeMaintenanceWindowsForTargetInput) SetResourceType(v string) *DescribeMaintenanceWindowsForTargetInput { - s.ResourceType = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *DescribeMaintenanceWindowsForTargetInput) SetTargets(v []*Target) *DescribeMaintenanceWindowsForTargetInput { - s.Targets = v - return s -} - -type DescribeMaintenanceWindowsForTargetOutput struct { - _ struct{} `type:"structure"` - - // The token for the next set of items to return. (You use this token in the - // next call.) - NextToken *string `type:"string"` - - // Information about the Maintenance Window targets and tasks an instance is - // associated with. - WindowIdentities []*MaintenanceWindowIdentityForTarget `type:"list"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowsForTargetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowsForTargetOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowsForTargetOutput) SetNextToken(v string) *DescribeMaintenanceWindowsForTargetOutput { - s.NextToken = &v - return s -} - -// SetWindowIdentities sets the WindowIdentities field's value. -func (s *DescribeMaintenanceWindowsForTargetOutput) SetWindowIdentities(v []*MaintenanceWindowIdentityForTarget) *DescribeMaintenanceWindowsForTargetOutput { - s.WindowIdentities = v - return s -} - -type DescribeMaintenanceWindowsInput struct { - _ struct{} `type:"structure"` - - // Optional filters used to narrow down the scope of the returned Maintenance - // Windows. Supported filter keys are Name and Enabled. - Filters []*MaintenanceWindowFilter `type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"10" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMaintenanceWindowsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowsInput"} - if s.MaxResults != nil && *s.MaxResults < 10 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeMaintenanceWindowsInput) SetFilters(v []*MaintenanceWindowFilter) *DescribeMaintenanceWindowsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeMaintenanceWindowsInput) SetMaxResults(v int64) *DescribeMaintenanceWindowsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowsInput) SetNextToken(v string) *DescribeMaintenanceWindowsInput { - s.NextToken = &v - return s -} - -type DescribeMaintenanceWindowsOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // Information about the Maintenance Windows. - WindowIdentities []*MaintenanceWindowIdentity `type:"list"` -} - -// String returns the string representation -func (s DescribeMaintenanceWindowsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceWindowsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeMaintenanceWindowsOutput) SetNextToken(v string) *DescribeMaintenanceWindowsOutput { - s.NextToken = &v - return s -} - -// SetWindowIdentities sets the WindowIdentities field's value. -func (s *DescribeMaintenanceWindowsOutput) SetWindowIdentities(v []*MaintenanceWindowIdentity) *DescribeMaintenanceWindowsOutput { - s.WindowIdentities = v - return s -} - -type DescribeParametersInput struct { - _ struct{} `type:"structure"` - - // One or more filters. Use a filter to return a more specific list of results. - Filters []*ParametersFilter `type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // Filters to limit the request results. - ParameterFilters []*ParameterStringFilter `type:"list"` -} - -// String returns the string representation -func (s DescribeParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeParametersInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ParameterFilters != nil { - for i, v := range s.ParameterFilters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterFilters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeParametersInput) SetFilters(v []*ParametersFilter) *DescribeParametersInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeParametersInput) SetMaxResults(v int64) *DescribeParametersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeParametersInput) SetNextToken(v string) *DescribeParametersInput { - s.NextToken = &v - return s -} - -// SetParameterFilters sets the ParameterFilters field's value. -func (s *DescribeParametersInput) SetParameterFilters(v []*ParameterStringFilter) *DescribeParametersInput { - s.ParameterFilters = v - return s -} - -type DescribeParametersOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // Parameters returned by the request. - Parameters []*ParameterMetadata `type:"list"` -} - -// String returns the string representation -func (s DescribeParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeParametersOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeParametersOutput) SetNextToken(v string) *DescribeParametersOutput { - s.NextToken = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DescribeParametersOutput) SetParameters(v []*ParameterMetadata) *DescribeParametersOutput { - s.Parameters = v - return s -} - -type DescribePatchBaselinesInput struct { - _ struct{} `type:"structure"` - - // Each element in the array is a structure containing: - // - // Key: (string, "NAME_PREFIX" or "OWNER") - // - // Value: (array of strings, exactly 1 entry, between 1 and 255 characters) - Filters []*PatchOrchestratorFilter `type:"list"` - - // The maximum number of patch baselines to return (per page). - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribePatchBaselinesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePatchBaselinesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribePatchBaselinesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribePatchBaselinesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribePatchBaselinesInput) SetFilters(v []*PatchOrchestratorFilter) *DescribePatchBaselinesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribePatchBaselinesInput) SetMaxResults(v int64) *DescribePatchBaselinesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePatchBaselinesInput) SetNextToken(v string) *DescribePatchBaselinesInput { - s.NextToken = &v - return s -} - -type DescribePatchBaselinesOutput struct { - _ struct{} `type:"structure"` - - // An array of PatchBaselineIdentity elements. - BaselineIdentities []*PatchBaselineIdentity `type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribePatchBaselinesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePatchBaselinesOutput) GoString() string { - return s.String() -} - -// SetBaselineIdentities sets the BaselineIdentities field's value. -func (s *DescribePatchBaselinesOutput) SetBaselineIdentities(v []*PatchBaselineIdentity) *DescribePatchBaselinesOutput { - s.BaselineIdentities = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePatchBaselinesOutput) SetNextToken(v string) *DescribePatchBaselinesOutput { - s.NextToken = &v - return s -} - -type DescribePatchGroupStateInput struct { - _ struct{} `type:"structure"` - - // The name of the patch group whose patch snapshot should be retrieved. - // - // PatchGroup is a required field - PatchGroup *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribePatchGroupStateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePatchGroupStateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribePatchGroupStateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribePatchGroupStateInput"} - if s.PatchGroup == nil { - invalidParams.Add(request.NewErrParamRequired("PatchGroup")) - } - if s.PatchGroup != nil && len(*s.PatchGroup) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PatchGroup", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPatchGroup sets the PatchGroup field's value. -func (s *DescribePatchGroupStateInput) SetPatchGroup(v string) *DescribePatchGroupStateInput { - s.PatchGroup = &v - return s -} - -type DescribePatchGroupStateOutput struct { - _ struct{} `type:"structure"` - - // The number of instances in the patch group. - Instances *int64 `type:"integer"` - - // The number of instances with patches from the patch baseline that failed - // to install. - InstancesWithFailedPatches *int64 `type:"integer"` - - // The number of instances with patches installed that aren't defined in the - // patch baseline. - InstancesWithInstalledOtherPatches *int64 `type:"integer"` - - // The number of instances with installed patches. - InstancesWithInstalledPatches *int64 `type:"integer"` - - // The number of instances with patches installed that are specified in a RejectedPatches - // list. Patches with a status of INSTALLED_REJECTED were typically installed - // before they were added to a RejectedPatches list. - // - // If ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction, - // the value of InstancesWithInstalledRejectedPatches will always be 0 (zero). - InstancesWithInstalledRejectedPatches *int64 `type:"integer"` - - // The number of instances with missing patches from the patch baseline. - InstancesWithMissingPatches *int64 `type:"integer"` - - // The number of instances with patches that aren't applicable. - InstancesWithNotApplicablePatches *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribePatchGroupStateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePatchGroupStateOutput) GoString() string { - return s.String() -} - -// SetInstances sets the Instances field's value. -func (s *DescribePatchGroupStateOutput) SetInstances(v int64) *DescribePatchGroupStateOutput { - s.Instances = &v - return s -} - -// SetInstancesWithFailedPatches sets the InstancesWithFailedPatches field's value. -func (s *DescribePatchGroupStateOutput) SetInstancesWithFailedPatches(v int64) *DescribePatchGroupStateOutput { - s.InstancesWithFailedPatches = &v - return s -} - -// SetInstancesWithInstalledOtherPatches sets the InstancesWithInstalledOtherPatches field's value. -func (s *DescribePatchGroupStateOutput) SetInstancesWithInstalledOtherPatches(v int64) *DescribePatchGroupStateOutput { - s.InstancesWithInstalledOtherPatches = &v - return s -} - -// SetInstancesWithInstalledPatches sets the InstancesWithInstalledPatches field's value. -func (s *DescribePatchGroupStateOutput) SetInstancesWithInstalledPatches(v int64) *DescribePatchGroupStateOutput { - s.InstancesWithInstalledPatches = &v - return s -} - -// SetInstancesWithInstalledRejectedPatches sets the InstancesWithInstalledRejectedPatches field's value. -func (s *DescribePatchGroupStateOutput) SetInstancesWithInstalledRejectedPatches(v int64) *DescribePatchGroupStateOutput { - s.InstancesWithInstalledRejectedPatches = &v - return s -} - -// SetInstancesWithMissingPatches sets the InstancesWithMissingPatches field's value. -func (s *DescribePatchGroupStateOutput) SetInstancesWithMissingPatches(v int64) *DescribePatchGroupStateOutput { - s.InstancesWithMissingPatches = &v - return s -} - -// SetInstancesWithNotApplicablePatches sets the InstancesWithNotApplicablePatches field's value. -func (s *DescribePatchGroupStateOutput) SetInstancesWithNotApplicablePatches(v int64) *DescribePatchGroupStateOutput { - s.InstancesWithNotApplicablePatches = &v - return s -} - -type DescribePatchGroupsInput struct { - _ struct{} `type:"structure"` - - // One or more filters. Use a filter to return a more specific list of results. - Filters []*PatchOrchestratorFilter `type:"list"` - - // The maximum number of patch groups to return (per page). - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribePatchGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePatchGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribePatchGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribePatchGroupsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribePatchGroupsInput) SetFilters(v []*PatchOrchestratorFilter) *DescribePatchGroupsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribePatchGroupsInput) SetMaxResults(v int64) *DescribePatchGroupsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePatchGroupsInput) SetNextToken(v string) *DescribePatchGroupsInput { - s.NextToken = &v - return s -} - -type DescribePatchGroupsOutput struct { - _ struct{} `type:"structure"` - - // Each entry in the array contains: - // - // PatchGroup: string (between 1 and 256 characters, Regex: ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$) - // - // PatchBaselineIdentity: A PatchBaselineIdentity element. - Mappings []*PatchGroupPatchBaselineMapping `type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribePatchGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePatchGroupsOutput) GoString() string { - return s.String() -} - -// SetMappings sets the Mappings field's value. -func (s *DescribePatchGroupsOutput) SetMappings(v []*PatchGroupPatchBaselineMapping) *DescribePatchGroupsOutput { - s.Mappings = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribePatchGroupsOutput) SetNextToken(v string) *DescribePatchGroupsOutput { - s.NextToken = &v - return s -} - -type DescribeSessionsInput struct { - _ struct{} `type:"structure"` - - // One or more filters to limit the type of sessions returned by the request. - Filters []*SessionFilter `min:"1" type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // The session status to retrieve a list of sessions for. For example, "Active". - // - // State is a required field - State *string `type:"string" required:"true" enum:"SessionState"` -} - -// String returns the string representation -func (s DescribeSessionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSessionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSessionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSessionsInput"} - if s.Filters != nil && len(s.Filters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.State == nil { - invalidParams.Add(request.NewErrParamRequired("State")) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *DescribeSessionsInput) SetFilters(v []*SessionFilter) *DescribeSessionsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSessionsInput) SetMaxResults(v int64) *DescribeSessionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSessionsInput) SetNextToken(v string) *DescribeSessionsInput { - s.NextToken = &v - return s -} - -// SetState sets the State field's value. -func (s *DescribeSessionsInput) SetState(v string) *DescribeSessionsInput { - s.State = &v - return s -} - -type DescribeSessionsOutput struct { - _ struct{} `type:"structure"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // A list of sessions meeting the request parameters. - Sessions []*Session `type:"list"` -} - -// String returns the string representation -func (s DescribeSessionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSessionsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeSessionsOutput) SetNextToken(v string) *DescribeSessionsOutput { - s.NextToken = &v - return s -} - -// SetSessions sets the Sessions field's value. -func (s *DescribeSessionsOutput) SetSessions(v []*Session) *DescribeSessionsOutput { - s.Sessions = v - return s -} - -// A default version of a document. -type DocumentDefaultVersionDescription struct { - _ struct{} `type:"structure"` - - // The default version of the document. - DefaultVersion *string `type:"string"` - - // The default version of the artifact associated with the document. - DefaultVersionName *string `type:"string"` - - // The name of the document. - Name *string `type:"string"` -} - -// String returns the string representation -func (s DocumentDefaultVersionDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DocumentDefaultVersionDescription) GoString() string { - return s.String() -} - -// SetDefaultVersion sets the DefaultVersion field's value. -func (s *DocumentDefaultVersionDescription) SetDefaultVersion(v string) *DocumentDefaultVersionDescription { - s.DefaultVersion = &v - return s -} - -// SetDefaultVersionName sets the DefaultVersionName field's value. -func (s *DocumentDefaultVersionDescription) SetDefaultVersionName(v string) *DocumentDefaultVersionDescription { - s.DefaultVersionName = &v - return s -} - -// SetName sets the Name field's value. -func (s *DocumentDefaultVersionDescription) SetName(v string) *DocumentDefaultVersionDescription { - s.Name = &v - return s -} - -// Describes a Systems Manager document. -type DocumentDescription struct { - _ struct{} `type:"structure"` - - // Details about the document attachments, including names, locations, sizes, - // etc. - AttachmentsInformation []*AttachmentInformation `type:"list"` - - // The date when the document was created. - CreatedDate *time.Time `type:"timestamp"` - - // The default version. - DefaultVersion *string `type:"string"` - - // A description of the document. - Description *string `type:"string"` - - // The document format, either JSON or YAML. - DocumentFormat *string `type:"string" enum:"DocumentFormat"` - - // The type of document. - DocumentType *string `type:"string" enum:"DocumentType"` - - // The document version. - DocumentVersion *string `type:"string"` - - // The Sha256 or Sha1 hash created by the system when the document was created. - // - // Sha1 hashes have been deprecated. - Hash *string `type:"string"` - - // The hash type of the document. Valid values include Sha256 or Sha1. - // - // Sha1 hashes have been deprecated. - HashType *string `type:"string" enum:"DocumentHashType"` - - // The latest version of the document. - LatestVersion *string `type:"string"` - - // The name of the Systems Manager document. - Name *string `type:"string"` - - // The AWS user account that created the document. - Owner *string `type:"string"` - - // A description of the parameters for a document. - Parameters []*DocumentParameter `type:"list"` - - // The list of OS platforms compatible with this Systems Manager document. - PlatformTypes []*string `type:"list"` - - // The schema version. - SchemaVersion *string `type:"string"` - - // The SHA1 hash of the document, which you can use for verification. - Sha1 *string `type:"string"` - - // The status of the Systems Manager document. - Status *string `type:"string" enum:"DocumentStatus"` - - // A message returned by AWS Systems Manager that explains the Status value. - // For example, a Failed status might be explained by the StatusInformation - // message, "The specified S3 bucket does not exist. Verify that the URL of - // the S3 bucket is correct." - StatusInformation *string `type:"string"` - - // The tags, or metadata, that have been applied to the document. - Tags []*Tag `type:"list"` - - // The target type which defines the kinds of resources the document can run - // on. For example, /AWS::EC2::Instance. For a list of valid resource types, - // see AWS Resource Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) - // in the AWS CloudFormation User Guide. - TargetType *string `type:"string"` - - // The version of the artifact associated with the document. - VersionName *string `type:"string"` -} - -// String returns the string representation -func (s DocumentDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DocumentDescription) GoString() string { - return s.String() -} - -// SetAttachmentsInformation sets the AttachmentsInformation field's value. -func (s *DocumentDescription) SetAttachmentsInformation(v []*AttachmentInformation) *DocumentDescription { - s.AttachmentsInformation = v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *DocumentDescription) SetCreatedDate(v time.Time) *DocumentDescription { - s.CreatedDate = &v - return s -} - -// SetDefaultVersion sets the DefaultVersion field's value. -func (s *DocumentDescription) SetDefaultVersion(v string) *DocumentDescription { - s.DefaultVersion = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DocumentDescription) SetDescription(v string) *DocumentDescription { - s.Description = &v - return s -} - -// SetDocumentFormat sets the DocumentFormat field's value. -func (s *DocumentDescription) SetDocumentFormat(v string) *DocumentDescription { - s.DocumentFormat = &v - return s -} - -// SetDocumentType sets the DocumentType field's value. -func (s *DocumentDescription) SetDocumentType(v string) *DocumentDescription { - s.DocumentType = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *DocumentDescription) SetDocumentVersion(v string) *DocumentDescription { - s.DocumentVersion = &v - return s -} - -// SetHash sets the Hash field's value. -func (s *DocumentDescription) SetHash(v string) *DocumentDescription { - s.Hash = &v - return s -} - -// SetHashType sets the HashType field's value. -func (s *DocumentDescription) SetHashType(v string) *DocumentDescription { - s.HashType = &v - return s -} - -// SetLatestVersion sets the LatestVersion field's value. -func (s *DocumentDescription) SetLatestVersion(v string) *DocumentDescription { - s.LatestVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *DocumentDescription) SetName(v string) *DocumentDescription { - s.Name = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *DocumentDescription) SetOwner(v string) *DocumentDescription { - s.Owner = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *DocumentDescription) SetParameters(v []*DocumentParameter) *DocumentDescription { - s.Parameters = v - return s -} - -// SetPlatformTypes sets the PlatformTypes field's value. -func (s *DocumentDescription) SetPlatformTypes(v []*string) *DocumentDescription { - s.PlatformTypes = v - return s -} - -// SetSchemaVersion sets the SchemaVersion field's value. -func (s *DocumentDescription) SetSchemaVersion(v string) *DocumentDescription { - s.SchemaVersion = &v - return s -} - -// SetSha1 sets the Sha1 field's value. -func (s *DocumentDescription) SetSha1(v string) *DocumentDescription { - s.Sha1 = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DocumentDescription) SetStatus(v string) *DocumentDescription { - s.Status = &v - return s -} - -// SetStatusInformation sets the StatusInformation field's value. -func (s *DocumentDescription) SetStatusInformation(v string) *DocumentDescription { - s.StatusInformation = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *DocumentDescription) SetTags(v []*Tag) *DocumentDescription { - s.Tags = v - return s -} - -// SetTargetType sets the TargetType field's value. -func (s *DocumentDescription) SetTargetType(v string) *DocumentDescription { - s.TargetType = &v - return s -} - -// SetVersionName sets the VersionName field's value. -func (s *DocumentDescription) SetVersionName(v string) *DocumentDescription { - s.VersionName = &v - return s -} - -// Describes a filter. -type DocumentFilter struct { - _ struct{} `type:"structure"` - - // The name of the filter. - // - // Key is a required field - Key *string `locationName:"key" type:"string" required:"true" enum:"DocumentFilterKey"` - - // The value of the filter. - // - // Value is a required field - Value *string `locationName:"value" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DocumentFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DocumentFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DocumentFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DocumentFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *DocumentFilter) SetKey(v string) *DocumentFilter { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *DocumentFilter) SetValue(v string) *DocumentFilter { - s.Value = &v - return s -} - -// Describes the name of a Systems Manager document. -type DocumentIdentifier struct { - _ struct{} `type:"structure"` - - // The document format, either JSON or YAML. - DocumentFormat *string `type:"string" enum:"DocumentFormat"` - - // The document type. - DocumentType *string `type:"string" enum:"DocumentType"` - - // The document version. - DocumentVersion *string `type:"string"` - - // The name of the Systems Manager document. - Name *string `type:"string"` - - // The AWS user account that created the document. - Owner *string `type:"string"` - - // The operating system platform. - PlatformTypes []*string `type:"list"` - - // The schema version. - SchemaVersion *string `type:"string"` - - // The tags, or metadata, that have been applied to the document. - Tags []*Tag `type:"list"` - - // The target type which defines the kinds of resources the document can run - // on. For example, /AWS::EC2::Instance. For a list of valid resource types, - // see AWS Resource Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) - // in the AWS CloudFormation User Guide. - TargetType *string `type:"string"` - - // An optional field specifying the version of the artifact associated with - // the document. For example, "Release 12, Update 6". This value is unique across - // all versions of a document, and cannot be changed. - VersionName *string `type:"string"` -} - -// String returns the string representation -func (s DocumentIdentifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DocumentIdentifier) GoString() string { - return s.String() -} - -// SetDocumentFormat sets the DocumentFormat field's value. -func (s *DocumentIdentifier) SetDocumentFormat(v string) *DocumentIdentifier { - s.DocumentFormat = &v - return s -} - -// SetDocumentType sets the DocumentType field's value. -func (s *DocumentIdentifier) SetDocumentType(v string) *DocumentIdentifier { - s.DocumentType = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *DocumentIdentifier) SetDocumentVersion(v string) *DocumentIdentifier { - s.DocumentVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *DocumentIdentifier) SetName(v string) *DocumentIdentifier { - s.Name = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *DocumentIdentifier) SetOwner(v string) *DocumentIdentifier { - s.Owner = &v - return s -} - -// SetPlatformTypes sets the PlatformTypes field's value. -func (s *DocumentIdentifier) SetPlatformTypes(v []*string) *DocumentIdentifier { - s.PlatformTypes = v - return s -} - -// SetSchemaVersion sets the SchemaVersion field's value. -func (s *DocumentIdentifier) SetSchemaVersion(v string) *DocumentIdentifier { - s.SchemaVersion = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *DocumentIdentifier) SetTags(v []*Tag) *DocumentIdentifier { - s.Tags = v - return s -} - -// SetTargetType sets the TargetType field's value. -func (s *DocumentIdentifier) SetTargetType(v string) *DocumentIdentifier { - s.TargetType = &v - return s -} - -// SetVersionName sets the VersionName field's value. -func (s *DocumentIdentifier) SetVersionName(v string) *DocumentIdentifier { - s.VersionName = &v - return s -} - -// One or more filters. Use a filter to return a more specific list of documents. -// -// For keys, you can specify one or more tags that have been applied to a document. -// -// Other valid values include Owner, Name, PlatformTypes, and DocumentType. -// -// Note that only one Owner can be specified in a request. For example: Key=Owner,Values=Self. -// -// If you use Name as a key, you can use a name prefix to return a list of documents. -// For example, in the AWS CLI, to return a list of all documents that begin -// with Te, run the following command: -// -// aws ssm list-documents --filters Key=Name,Values=Te -// -// If you specify more than two keys, only documents that are identified by -// all the tags are returned in the results. If you specify more than two values -// for a key, documents that are identified by any of the values are returned -// in the results. -// -// To specify a custom key and value pair, use the format Key=tag:[tagName],Values=[valueName]. -// -// For example, if you created a Key called region and are using the AWS CLI -// to call the list-documents command: -// -// aws ssm list-documents --filters Key=tag:region,Values=east,west Key=Owner,Values=Self -type DocumentKeyValuesFilter struct { - _ struct{} `type:"structure"` - - // The name of the filter key. - Key *string `min:"1" type:"string"` - - // The value for the filter key. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s DocumentKeyValuesFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DocumentKeyValuesFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DocumentKeyValuesFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DocumentKeyValuesFilter"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *DocumentKeyValuesFilter) SetKey(v string) *DocumentKeyValuesFilter { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *DocumentKeyValuesFilter) SetValues(v []*string) *DocumentKeyValuesFilter { - s.Values = v - return s -} - -// Parameters specified in a System Manager document that execute on the server -// when the command is run. -type DocumentParameter struct { - _ struct{} `type:"structure"` - - // If specified, the default values for the parameters. Parameters without a - // default value are required. Parameters with a default value are optional. - DefaultValue *string `type:"string"` - - // A description of what the parameter does, how to use it, the default value, - // and whether or not the parameter is optional. - Description *string `type:"string"` - - // The name of the parameter. - Name *string `type:"string"` - - // The type of parameter. The type can be either String or StringList. - Type *string `type:"string" enum:"DocumentParameterType"` -} - -// String returns the string representation -func (s DocumentParameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DocumentParameter) GoString() string { - return s.String() -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *DocumentParameter) SetDefaultValue(v string) *DocumentParameter { - s.DefaultValue = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DocumentParameter) SetDescription(v string) *DocumentParameter { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *DocumentParameter) SetName(v string) *DocumentParameter { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *DocumentParameter) SetType(v string) *DocumentParameter { - s.Type = &v - return s -} - -// Version information about the document. -type DocumentVersionInfo struct { - _ struct{} `type:"structure"` - - // The date the document was created. - CreatedDate *time.Time `type:"timestamp"` - - // The document format, either JSON or YAML. - DocumentFormat *string `type:"string" enum:"DocumentFormat"` - - // The document version. - DocumentVersion *string `type:"string"` - - // An identifier for the default version of the document. - IsDefaultVersion *bool `type:"boolean"` - - // The document name. - Name *string `type:"string"` - - // The status of the Systems Manager document, such as Creating, Active, Failed, - // and Deleting. - Status *string `type:"string" enum:"DocumentStatus"` - - // A message returned by AWS Systems Manager that explains the Status value. - // For example, a Failed status might be explained by the StatusInformation - // message, "The specified S3 bucket does not exist. Verify that the URL of - // the S3 bucket is correct." - StatusInformation *string `type:"string"` - - // The version of the artifact associated with the document. For example, "Release - // 12, Update 6". This value is unique across all versions of a document, and - // cannot be changed. - VersionName *string `type:"string"` -} - -// String returns the string representation -func (s DocumentVersionInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DocumentVersionInfo) GoString() string { - return s.String() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *DocumentVersionInfo) SetCreatedDate(v time.Time) *DocumentVersionInfo { - s.CreatedDate = &v - return s -} - -// SetDocumentFormat sets the DocumentFormat field's value. -func (s *DocumentVersionInfo) SetDocumentFormat(v string) *DocumentVersionInfo { - s.DocumentFormat = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *DocumentVersionInfo) SetDocumentVersion(v string) *DocumentVersionInfo { - s.DocumentVersion = &v - return s -} - -// SetIsDefaultVersion sets the IsDefaultVersion field's value. -func (s *DocumentVersionInfo) SetIsDefaultVersion(v bool) *DocumentVersionInfo { - s.IsDefaultVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *DocumentVersionInfo) SetName(v string) *DocumentVersionInfo { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DocumentVersionInfo) SetStatus(v string) *DocumentVersionInfo { - s.Status = &v - return s -} - -// SetStatusInformation sets the StatusInformation field's value. -func (s *DocumentVersionInfo) SetStatusInformation(v string) *DocumentVersionInfo { - s.StatusInformation = &v - return s -} - -// SetVersionName sets the VersionName field's value. -func (s *DocumentVersionInfo) SetVersionName(v string) *DocumentVersionInfo { - s.VersionName = &v - return s -} - -// The EffectivePatch structure defines metadata about a patch along with the -// approval state of the patch in a particular patch baseline. The approval -// state includes information about whether the patch is currently approved, -// due to be approved by a rule, explicitly approved, or explicitly rejected -// and the date the patch was or will be approved. -type EffectivePatch struct { - _ struct{} `type:"structure"` - - // Provides metadata for a patch, including information such as the KB ID, severity, - // classification and a URL for where more information can be obtained about - // the patch. - Patch *Patch `type:"structure"` - - // The status of the patch in a patch baseline. This includes information about - // whether the patch is currently approved, due to be approved by a rule, explicitly - // approved, or explicitly rejected and the date the patch was or will be approved. - PatchStatus *PatchStatus `type:"structure"` -} - -// String returns the string representation -func (s EffectivePatch) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EffectivePatch) GoString() string { - return s.String() -} - -// SetPatch sets the Patch field's value. -func (s *EffectivePatch) SetPatch(v *Patch) *EffectivePatch { - s.Patch = v - return s -} - -// SetPatchStatus sets the PatchStatus field's value. -func (s *EffectivePatch) SetPatchStatus(v *PatchStatus) *EffectivePatch { - s.PatchStatus = v - return s -} - -// Describes a failed association. -type FailedCreateAssociation struct { - _ struct{} `type:"structure"` - - // The association. - Entry *CreateAssociationBatchRequestEntry `type:"structure"` - - // The source of the failure. - Fault *string `type:"string" enum:"Fault"` - - // A description of the failure. - Message *string `type:"string"` -} - -// String returns the string representation -func (s FailedCreateAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailedCreateAssociation) GoString() string { - return s.String() -} - -// SetEntry sets the Entry field's value. -func (s *FailedCreateAssociation) SetEntry(v *CreateAssociationBatchRequestEntry) *FailedCreateAssociation { - s.Entry = v - return s -} - -// SetFault sets the Fault field's value. -func (s *FailedCreateAssociation) SetFault(v string) *FailedCreateAssociation { - s.Fault = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *FailedCreateAssociation) SetMessage(v string) *FailedCreateAssociation { - s.Message = &v - return s -} - -// Information about an Automation failure. -type FailureDetails struct { - _ struct{} `type:"structure"` - - // Detailed information about the Automation step failure. - Details map[string][]*string `min:"1" type:"map"` - - // The stage of the Automation execution when the failure occurred. The stages - // include the following: InputValidation, PreVerification, Invocation, PostVerification. - FailureStage *string `type:"string"` - - // The type of Automation failure. Failure types include the following: Action, - // Permission, Throttling, Verification, Internal. - FailureType *string `type:"string"` -} - -// String returns the string representation -func (s FailureDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailureDetails) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *FailureDetails) SetDetails(v map[string][]*string) *FailureDetails { - s.Details = v - return s -} - -// SetFailureStage sets the FailureStage field's value. -func (s *FailureDetails) SetFailureStage(v string) *FailureDetails { - s.FailureStage = &v - return s -} - -// SetFailureType sets the FailureType field's value. -func (s *FailureDetails) SetFailureType(v string) *FailureDetails { - s.FailureType = &v - return s -} - -type GetAutomationExecutionInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for an existing automation execution to examine. The - // execution ID is returned by StartAutomationExecution when the execution of - // an Automation document is initiated. - // - // AutomationExecutionId is a required field - AutomationExecutionId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetAutomationExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAutomationExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAutomationExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAutomationExecutionInput"} - if s.AutomationExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("AutomationExecutionId")) - } - if s.AutomationExecutionId != nil && len(*s.AutomationExecutionId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("AutomationExecutionId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutomationExecutionId sets the AutomationExecutionId field's value. -func (s *GetAutomationExecutionInput) SetAutomationExecutionId(v string) *GetAutomationExecutionInput { - s.AutomationExecutionId = &v - return s -} - -type GetAutomationExecutionOutput struct { - _ struct{} `type:"structure"` - - // Detailed information about the current state of an automation execution. - AutomationExecution *AutomationExecution `type:"structure"` -} - -// String returns the string representation -func (s GetAutomationExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetAutomationExecutionOutput) GoString() string { - return s.String() -} - -// SetAutomationExecution sets the AutomationExecution field's value. -func (s *GetAutomationExecutionOutput) SetAutomationExecution(v *AutomationExecution) *GetAutomationExecutionOutput { - s.AutomationExecution = v - return s -} - -type GetCommandInvocationInput struct { - _ struct{} `type:"structure"` - - // (Required) The parent command ID of the invocation plugin. - // - // CommandId is a required field - CommandId *string `min:"36" type:"string" required:"true"` - - // (Required) The ID of the managed instance targeted by the command. A managed - // instance can be an Amazon EC2 instance or an instance in your hybrid environment - // that is configured for Systems Manager. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // (Optional) The name of the plugin for which you want detailed results. If - // the document contains only one plugin, the name can be omitted and the details - // will be returned. - PluginName *string `min:"4" type:"string"` -} - -// String returns the string representation -func (s GetCommandInvocationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCommandInvocationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCommandInvocationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCommandInvocationInput"} - if s.CommandId == nil { - invalidParams.Add(request.NewErrParamRequired("CommandId")) - } - if s.CommandId != nil && len(*s.CommandId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("CommandId", 36)) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.PluginName != nil && len(*s.PluginName) < 4 { - invalidParams.Add(request.NewErrParamMinLen("PluginName", 4)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCommandId sets the CommandId field's value. -func (s *GetCommandInvocationInput) SetCommandId(v string) *GetCommandInvocationInput { - s.CommandId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetCommandInvocationInput) SetInstanceId(v string) *GetCommandInvocationInput { - s.InstanceId = &v - return s -} - -// SetPluginName sets the PluginName field's value. -func (s *GetCommandInvocationInput) SetPluginName(v string) *GetCommandInvocationInput { - s.PluginName = &v - return s -} - -type GetCommandInvocationOutput struct { - _ struct{} `type:"structure"` - - // CloudWatch Logs information where Systems Manager sent the command output. - CloudWatchOutputConfig *CloudWatchOutputConfig `type:"structure"` - - // The parent command ID of the invocation plugin. - CommandId *string `min:"36" type:"string"` - - // The comment text for the command. - Comment *string `type:"string"` - - // The name of the document that was executed. For example, AWS-RunShellScript. - DocumentName *string `type:"string"` - - // The SSM document version used in the request. - DocumentVersion *string `type:"string"` - - // Duration since ExecutionStartDateTime. - ExecutionElapsedTime *string `type:"string"` - - // The date and time the plugin was finished executing. Date and time are written - // in ISO 8601 format. For example, June 7, 2017 is represented as 2017-06-7. - // The following sample AWS CLI command uses the InvokedAfter filter. - // - // aws ssm list-commands --filters key=InvokedAfter,value=2017-06-07T00:00:00Z - // - // If the plugin has not started to execute, the string is empty. - ExecutionEndDateTime *string `type:"string"` - - // The date and time the plugin started executing. Date and time are written - // in ISO 8601 format. For example, June 7, 2017 is represented as 2017-06-7. - // The following sample AWS CLI command uses the InvokedBefore filter. - // - // aws ssm list-commands --filters key=InvokedBefore,value=2017-06-07T00:00:00Z - // - // If the plugin has not started to execute, the string is empty. - ExecutionStartDateTime *string `type:"string"` - - // The ID of the managed instance targeted by the command. A managed instance - // can be an Amazon EC2 instance or an instance in your hybrid environment that - // is configured for Systems Manager. - InstanceId *string `type:"string"` - - // The name of the plugin for which you want detailed results. For example, - // aws:RunShellScript is a plugin. - PluginName *string `min:"4" type:"string"` - - // The error level response code for the plugin script. If the response code - // is -1, then the command has not started executing on the instance, or it - // was not received by the instance. - ResponseCode *int64 `type:"integer"` - - // The first 8,000 characters written by the plugin to stderr. If the command - // has not finished executing, then this string is empty. - StandardErrorContent *string `type:"string"` - - // The URL for the complete text written by the plugin to stderr. If the command - // has not finished executing, then this string is empty. - StandardErrorUrl *string `type:"string"` - - // The first 24,000 characters written by the plugin to stdout. If the command - // has not finished executing, if ExecutionStatus is neither Succeeded nor Failed, - // then this string is empty. - StandardOutputContent *string `type:"string"` - - // The URL for the complete text written by the plugin to stdout in Amazon S3. - // If an Amazon S3 bucket was not specified, then this string is empty. - StandardOutputUrl *string `type:"string"` - - // The status of this invocation plugin. This status can be different than StatusDetails. - Status *string `type:"string" enum:"CommandInvocationStatus"` - - // A detailed status of the command execution for an invocation. StatusDetails - // includes more information than Status because it includes states resulting - // from error and concurrency control parameters. StatusDetails can show different - // results than Status. For more information about these statuses, see Understanding - // Command Statuses (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) - // in the AWS Systems Manager User Guide. StatusDetails can be one of the following - // values: - // - // * Pending: The command has not been sent to the instance. - // - // * In Progress: The command has been sent to the instance but has not reached - // a terminal state. - // - // * Delayed: The system attempted to send the command to the target, but - // the target was not available. The instance might not be available because - // of network issues, the instance was stopped, etc. The system will try - // to deliver the command again. - // - // * Success: The command or plugin was executed successfully. This is a - // terminal state. - // - // * Delivery Timed Out: The command was not delivered to the instance before - // the delivery timeout expired. Delivery timeouts do not count against the - // parent command's MaxErrors limit, but they do contribute to whether the - // parent command status is Success or Incomplete. This is a terminal state. - // - // * Execution Timed Out: The command started to execute on the instance, - // but the execution was not complete before the timeout expired. Execution - // timeouts count against the MaxErrors limit of the parent command. This - // is a terminal state. - // - // * Failed: The command wasn't executed successfully on the instance. For - // a plugin, this indicates that the result code was not zero. For a command - // invocation, this indicates that the result code for one or more plugins - // was not zero. Invocation failures count against the MaxErrors limit of - // the parent command. This is a terminal state. - // - // * Canceled: The command was terminated before it was completed. This is - // a terminal state. - // - // * Undeliverable: The command can't be delivered to the instance. The instance - // might not exist or might not be responding. Undeliverable invocations - // don't count against the parent command's MaxErrors limit and don't contribute - // to whether the parent command status is Success or Incomplete. This is - // a terminal state. - // - // * Terminated: The parent command exceeded its MaxErrors limit and subsequent - // command invocations were canceled by the system. This is a terminal state. - StatusDetails *string `type:"string"` -} - -// String returns the string representation -func (s GetCommandInvocationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetCommandInvocationOutput) GoString() string { - return s.String() -} - -// SetCloudWatchOutputConfig sets the CloudWatchOutputConfig field's value. -func (s *GetCommandInvocationOutput) SetCloudWatchOutputConfig(v *CloudWatchOutputConfig) *GetCommandInvocationOutput { - s.CloudWatchOutputConfig = v - return s -} - -// SetCommandId sets the CommandId field's value. -func (s *GetCommandInvocationOutput) SetCommandId(v string) *GetCommandInvocationOutput { - s.CommandId = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *GetCommandInvocationOutput) SetComment(v string) *GetCommandInvocationOutput { - s.Comment = &v - return s -} - -// SetDocumentName sets the DocumentName field's value. -func (s *GetCommandInvocationOutput) SetDocumentName(v string) *GetCommandInvocationOutput { - s.DocumentName = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *GetCommandInvocationOutput) SetDocumentVersion(v string) *GetCommandInvocationOutput { - s.DocumentVersion = &v - return s -} - -// SetExecutionElapsedTime sets the ExecutionElapsedTime field's value. -func (s *GetCommandInvocationOutput) SetExecutionElapsedTime(v string) *GetCommandInvocationOutput { - s.ExecutionElapsedTime = &v - return s -} - -// SetExecutionEndDateTime sets the ExecutionEndDateTime field's value. -func (s *GetCommandInvocationOutput) SetExecutionEndDateTime(v string) *GetCommandInvocationOutput { - s.ExecutionEndDateTime = &v - return s -} - -// SetExecutionStartDateTime sets the ExecutionStartDateTime field's value. -func (s *GetCommandInvocationOutput) SetExecutionStartDateTime(v string) *GetCommandInvocationOutput { - s.ExecutionStartDateTime = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetCommandInvocationOutput) SetInstanceId(v string) *GetCommandInvocationOutput { - s.InstanceId = &v - return s -} - -// SetPluginName sets the PluginName field's value. -func (s *GetCommandInvocationOutput) SetPluginName(v string) *GetCommandInvocationOutput { - s.PluginName = &v - return s -} - -// SetResponseCode sets the ResponseCode field's value. -func (s *GetCommandInvocationOutput) SetResponseCode(v int64) *GetCommandInvocationOutput { - s.ResponseCode = &v - return s -} - -// SetStandardErrorContent sets the StandardErrorContent field's value. -func (s *GetCommandInvocationOutput) SetStandardErrorContent(v string) *GetCommandInvocationOutput { - s.StandardErrorContent = &v - return s -} - -// SetStandardErrorUrl sets the StandardErrorUrl field's value. -func (s *GetCommandInvocationOutput) SetStandardErrorUrl(v string) *GetCommandInvocationOutput { - s.StandardErrorUrl = &v - return s -} - -// SetStandardOutputContent sets the StandardOutputContent field's value. -func (s *GetCommandInvocationOutput) SetStandardOutputContent(v string) *GetCommandInvocationOutput { - s.StandardOutputContent = &v - return s -} - -// SetStandardOutputUrl sets the StandardOutputUrl field's value. -func (s *GetCommandInvocationOutput) SetStandardOutputUrl(v string) *GetCommandInvocationOutput { - s.StandardOutputUrl = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetCommandInvocationOutput) SetStatus(v string) *GetCommandInvocationOutput { - s.Status = &v - return s -} - -// SetStatusDetails sets the StatusDetails field's value. -func (s *GetCommandInvocationOutput) SetStatusDetails(v string) *GetCommandInvocationOutput { - s.StatusDetails = &v - return s -} - -type GetConnectionStatusInput struct { - _ struct{} `type:"structure"` - - // The ID of the instance. - // - // Target is a required field - Target *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetConnectionStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetConnectionStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetConnectionStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetConnectionStatusInput"} - if s.Target == nil { - invalidParams.Add(request.NewErrParamRequired("Target")) - } - if s.Target != nil && len(*s.Target) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Target", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTarget sets the Target field's value. -func (s *GetConnectionStatusInput) SetTarget(v string) *GetConnectionStatusInput { - s.Target = &v - return s -} - -type GetConnectionStatusOutput struct { - _ struct{} `type:"structure"` - - // The status of the connection to the instance. For example, 'Connected' or - // 'Not Connected'. - Status *string `type:"string" enum:"ConnectionStatus"` - - // The ID of the instance to check connection status. - Target *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetConnectionStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetConnectionStatusOutput) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *GetConnectionStatusOutput) SetStatus(v string) *GetConnectionStatusOutput { - s.Status = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *GetConnectionStatusOutput) SetTarget(v string) *GetConnectionStatusOutput { - s.Target = &v - return s -} - -type GetDefaultPatchBaselineInput struct { - _ struct{} `type:"structure"` - - // Returns the default patch baseline for the specified operating system. - OperatingSystem *string `type:"string" enum:"OperatingSystem"` -} - -// String returns the string representation -func (s GetDefaultPatchBaselineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDefaultPatchBaselineInput) GoString() string { - return s.String() -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *GetDefaultPatchBaselineInput) SetOperatingSystem(v string) *GetDefaultPatchBaselineInput { - s.OperatingSystem = &v - return s -} - -type GetDefaultPatchBaselineOutput struct { - _ struct{} `type:"structure"` - - // The ID of the default patch baseline. - BaselineId *string `min:"20" type:"string"` - - // The operating system for the returned patch baseline. - OperatingSystem *string `type:"string" enum:"OperatingSystem"` -} - -// String returns the string representation -func (s GetDefaultPatchBaselineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDefaultPatchBaselineOutput) GoString() string { - return s.String() -} - -// SetBaselineId sets the BaselineId field's value. -func (s *GetDefaultPatchBaselineOutput) SetBaselineId(v string) *GetDefaultPatchBaselineOutput { - s.BaselineId = &v - return s -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *GetDefaultPatchBaselineOutput) SetOperatingSystem(v string) *GetDefaultPatchBaselineOutput { - s.OperatingSystem = &v - return s -} - -type GetDeployablePatchSnapshotForInstanceInput struct { - _ struct{} `type:"structure"` - - // The ID of the instance for which the appropriate patch snapshot should be - // retrieved. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The user-defined snapshot ID. - // - // SnapshotId is a required field - SnapshotId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetDeployablePatchSnapshotForInstanceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeployablePatchSnapshotForInstanceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeployablePatchSnapshotForInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeployablePatchSnapshotForInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.SnapshotId == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotId")) - } - if s.SnapshotId != nil && len(*s.SnapshotId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("SnapshotId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetDeployablePatchSnapshotForInstanceInput) SetInstanceId(v string) *GetDeployablePatchSnapshotForInstanceInput { - s.InstanceId = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *GetDeployablePatchSnapshotForInstanceInput) SetSnapshotId(v string) *GetDeployablePatchSnapshotForInstanceInput { - s.SnapshotId = &v - return s -} - -type GetDeployablePatchSnapshotForInstanceOutput struct { - _ struct{} `type:"structure"` - - // The ID of the instance. - InstanceId *string `type:"string"` - - // Returns the specific operating system (for example Windows Server 2012 or - // Amazon Linux 2015.09) on the instance for the specified patch snapshot. - Product *string `type:"string"` - - // A pre-signed Amazon S3 URL that can be used to download the patch snapshot. - SnapshotDownloadUrl *string `type:"string"` - - // The user-defined snapshot ID. - SnapshotId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s GetDeployablePatchSnapshotForInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeployablePatchSnapshotForInstanceOutput) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetDeployablePatchSnapshotForInstanceOutput) SetInstanceId(v string) *GetDeployablePatchSnapshotForInstanceOutput { - s.InstanceId = &v - return s -} - -// SetProduct sets the Product field's value. -func (s *GetDeployablePatchSnapshotForInstanceOutput) SetProduct(v string) *GetDeployablePatchSnapshotForInstanceOutput { - s.Product = &v - return s -} - -// SetSnapshotDownloadUrl sets the SnapshotDownloadUrl field's value. -func (s *GetDeployablePatchSnapshotForInstanceOutput) SetSnapshotDownloadUrl(v string) *GetDeployablePatchSnapshotForInstanceOutput { - s.SnapshotDownloadUrl = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *GetDeployablePatchSnapshotForInstanceOutput) SetSnapshotId(v string) *GetDeployablePatchSnapshotForInstanceOutput { - s.SnapshotId = &v - return s -} - -type GetDocumentInput struct { - _ struct{} `type:"structure"` - - // Returns the document in the specified format. The document format can be - // either JSON or YAML. JSON is the default format. - DocumentFormat *string `type:"string" enum:"DocumentFormat"` - - // The document version for which you want information. - DocumentVersion *string `type:"string"` - - // The name of the Systems Manager document. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // An optional field specifying the version of the artifact associated with - // the document. For example, "Release 12, Update 6". This value is unique across - // all versions of a document, and cannot be changed. - VersionName *string `type:"string"` -} - -// String returns the string representation -func (s GetDocumentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDocumentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDocumentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDocumentInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDocumentFormat sets the DocumentFormat field's value. -func (s *GetDocumentInput) SetDocumentFormat(v string) *GetDocumentInput { - s.DocumentFormat = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *GetDocumentInput) SetDocumentVersion(v string) *GetDocumentInput { - s.DocumentVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetDocumentInput) SetName(v string) *GetDocumentInput { - s.Name = &v - return s -} - -// SetVersionName sets the VersionName field's value. -func (s *GetDocumentInput) SetVersionName(v string) *GetDocumentInput { - s.VersionName = &v - return s -} - -type GetDocumentOutput struct { - _ struct{} `type:"structure"` - - // A description of the document attachments, including names, locations, sizes, - // etc. - AttachmentsContent []*AttachmentContent `type:"list"` - - // The contents of the Systems Manager document. - Content *string `min:"1" type:"string"` - - // The document format, either JSON or YAML. - DocumentFormat *string `type:"string" enum:"DocumentFormat"` - - // The document type. - DocumentType *string `type:"string" enum:"DocumentType"` - - // The document version. - DocumentVersion *string `type:"string"` - - // The name of the Systems Manager document. - Name *string `type:"string"` - - // The status of the Systems Manager document, such as Creating, Active, Updating, - // Failed, and Deleting. - Status *string `type:"string" enum:"DocumentStatus"` - - // A message returned by AWS Systems Manager that explains the Status value. - // For example, a Failed status might be explained by the StatusInformation - // message, "The specified S3 bucket does not exist. Verify that the URL of - // the S3 bucket is correct." - StatusInformation *string `type:"string"` - - // The version of the artifact associated with the document. For example, "Release - // 12, Update 6". This value is unique across all versions of a document, and - // cannot be changed. - VersionName *string `type:"string"` -} - -// String returns the string representation -func (s GetDocumentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDocumentOutput) GoString() string { - return s.String() -} - -// SetAttachmentsContent sets the AttachmentsContent field's value. -func (s *GetDocumentOutput) SetAttachmentsContent(v []*AttachmentContent) *GetDocumentOutput { - s.AttachmentsContent = v - return s -} - -// SetContent sets the Content field's value. -func (s *GetDocumentOutput) SetContent(v string) *GetDocumentOutput { - s.Content = &v - return s -} - -// SetDocumentFormat sets the DocumentFormat field's value. -func (s *GetDocumentOutput) SetDocumentFormat(v string) *GetDocumentOutput { - s.DocumentFormat = &v - return s -} - -// SetDocumentType sets the DocumentType field's value. -func (s *GetDocumentOutput) SetDocumentType(v string) *GetDocumentOutput { - s.DocumentType = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *GetDocumentOutput) SetDocumentVersion(v string) *GetDocumentOutput { - s.DocumentVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetDocumentOutput) SetName(v string) *GetDocumentOutput { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetDocumentOutput) SetStatus(v string) *GetDocumentOutput { - s.Status = &v - return s -} - -// SetStatusInformation sets the StatusInformation field's value. -func (s *GetDocumentOutput) SetStatusInformation(v string) *GetDocumentOutput { - s.StatusInformation = &v - return s -} - -// SetVersionName sets the VersionName field's value. -func (s *GetDocumentOutput) SetVersionName(v string) *GetDocumentOutput { - s.VersionName = &v - return s -} - -type GetInventoryInput struct { - _ struct{} `type:"structure"` - - // Returns counts of inventory types based on one or more expressions. For example, - // if you aggregate by using an expression that uses the AWS:InstanceInformation.PlatformType - // type, you can see a count of how many Windows and Linux instances exist in - // your inventoried fleet. - Aggregators []*InventoryAggregator `min:"1" type:"list"` - - // One or more filters. Use a filter to return a more specific list of results. - Filters []*InventoryFilter `min:"1" type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // The list of inventory item types to return. - ResultAttributes []*ResultAttribute `min:"1" type:"list"` -} - -// String returns the string representation -func (s GetInventoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInventoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInventoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInventoryInput"} - if s.Aggregators != nil && len(s.Aggregators) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Aggregators", 1)) - } - if s.Filters != nil && len(s.Filters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ResultAttributes != nil && len(s.ResultAttributes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResultAttributes", 1)) - } - if s.Aggregators != nil { - for i, v := range s.Aggregators { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Aggregators", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - if s.ResultAttributes != nil { - for i, v := range s.ResultAttributes { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResultAttributes", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAggregators sets the Aggregators field's value. -func (s *GetInventoryInput) SetAggregators(v []*InventoryAggregator) *GetInventoryInput { - s.Aggregators = v - return s -} - -// SetFilters sets the Filters field's value. -func (s *GetInventoryInput) SetFilters(v []*InventoryFilter) *GetInventoryInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetInventoryInput) SetMaxResults(v int64) *GetInventoryInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetInventoryInput) SetNextToken(v string) *GetInventoryInput { - s.NextToken = &v - return s -} - -// SetResultAttributes sets the ResultAttributes field's value. -func (s *GetInventoryInput) SetResultAttributes(v []*ResultAttribute) *GetInventoryInput { - s.ResultAttributes = v - return s -} - -type GetInventoryOutput struct { - _ struct{} `type:"structure"` - - // Collection of inventory entities such as a collection of instance inventory. - Entities []*InventoryResultEntity `type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s GetInventoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInventoryOutput) GoString() string { - return s.String() -} - -// SetEntities sets the Entities field's value. -func (s *GetInventoryOutput) SetEntities(v []*InventoryResultEntity) *GetInventoryOutput { - s.Entities = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetInventoryOutput) SetNextToken(v string) *GetInventoryOutput { - s.NextToken = &v - return s -} - -type GetInventorySchemaInput struct { - _ struct{} `type:"structure"` - - // Returns inventory schemas that support aggregation. For example, this call - // returns the AWS:InstanceInformation type, because it supports aggregation - // based on the PlatformName, PlatformType, and PlatformVersion attributes. - Aggregator *bool `type:"boolean"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"50" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // Returns the sub-type schema for a specified inventory type. - SubType *bool `type:"boolean"` - - // The type of inventory item to return. - TypeName *string `type:"string"` -} - -// String returns the string representation -func (s GetInventorySchemaInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInventorySchemaInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInventorySchemaInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInventorySchemaInput"} - if s.MaxResults != nil && *s.MaxResults < 50 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAggregator sets the Aggregator field's value. -func (s *GetInventorySchemaInput) SetAggregator(v bool) *GetInventorySchemaInput { - s.Aggregator = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetInventorySchemaInput) SetMaxResults(v int64) *GetInventorySchemaInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetInventorySchemaInput) SetNextToken(v string) *GetInventorySchemaInput { - s.NextToken = &v - return s -} - -// SetSubType sets the SubType field's value. -func (s *GetInventorySchemaInput) SetSubType(v bool) *GetInventorySchemaInput { - s.SubType = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *GetInventorySchemaInput) SetTypeName(v string) *GetInventorySchemaInput { - s.TypeName = &v - return s -} - -type GetInventorySchemaOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // Inventory schemas returned by the request. - Schemas []*InventoryItemSchema `type:"list"` -} - -// String returns the string representation -func (s GetInventorySchemaOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInventorySchemaOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetInventorySchemaOutput) SetNextToken(v string) *GetInventorySchemaOutput { - s.NextToken = &v - return s -} - -// SetSchemas sets the Schemas field's value. -func (s *GetInventorySchemaOutput) SetSchemas(v []*InventoryItemSchema) *GetInventorySchemaOutput { - s.Schemas = v - return s -} - -type GetMaintenanceWindowExecutionInput struct { - _ struct{} `type:"structure"` - - // The ID of the Maintenance Window execution that includes the task. - // - // WindowExecutionId is a required field - WindowExecutionId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetMaintenanceWindowExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMaintenanceWindowExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMaintenanceWindowExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMaintenanceWindowExecutionInput"} - if s.WindowExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowExecutionId")) - } - if s.WindowExecutionId != nil && len(*s.WindowExecutionId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("WindowExecutionId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWindowExecutionId sets the WindowExecutionId field's value. -func (s *GetMaintenanceWindowExecutionInput) SetWindowExecutionId(v string) *GetMaintenanceWindowExecutionInput { - s.WindowExecutionId = &v - return s -} - -type GetMaintenanceWindowExecutionOutput struct { - _ struct{} `type:"structure"` - - // The time the Maintenance Window finished executing. - EndTime *time.Time `type:"timestamp"` - - // The time the Maintenance Window started executing. - StartTime *time.Time `type:"timestamp"` - - // The status of the Maintenance Window execution. - Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` - - // The details explaining the Status. Only available for certain status values. - StatusDetails *string `type:"string"` - - // The ID of the task executions from the Maintenance Window execution. - TaskIds []*string `type:"list"` - - // The ID of the Maintenance Window execution. - WindowExecutionId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s GetMaintenanceWindowExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMaintenanceWindowExecutionOutput) GoString() string { - return s.String() -} - -// SetEndTime sets the EndTime field's value. -func (s *GetMaintenanceWindowExecutionOutput) SetEndTime(v time.Time) *GetMaintenanceWindowExecutionOutput { - s.EndTime = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *GetMaintenanceWindowExecutionOutput) SetStartTime(v time.Time) *GetMaintenanceWindowExecutionOutput { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetMaintenanceWindowExecutionOutput) SetStatus(v string) *GetMaintenanceWindowExecutionOutput { - s.Status = &v - return s -} - -// SetStatusDetails sets the StatusDetails field's value. -func (s *GetMaintenanceWindowExecutionOutput) SetStatusDetails(v string) *GetMaintenanceWindowExecutionOutput { - s.StatusDetails = &v - return s -} - -// SetTaskIds sets the TaskIds field's value. -func (s *GetMaintenanceWindowExecutionOutput) SetTaskIds(v []*string) *GetMaintenanceWindowExecutionOutput { - s.TaskIds = v - return s -} - -// SetWindowExecutionId sets the WindowExecutionId field's value. -func (s *GetMaintenanceWindowExecutionOutput) SetWindowExecutionId(v string) *GetMaintenanceWindowExecutionOutput { - s.WindowExecutionId = &v - return s -} - -type GetMaintenanceWindowExecutionTaskInput struct { - _ struct{} `type:"structure"` - - // The ID of the specific task execution in the Maintenance Window task that - // should be retrieved. - // - // TaskId is a required field - TaskId *string `min:"36" type:"string" required:"true"` - - // The ID of the Maintenance Window execution that includes the task. - // - // WindowExecutionId is a required field - WindowExecutionId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetMaintenanceWindowExecutionTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMaintenanceWindowExecutionTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMaintenanceWindowExecutionTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMaintenanceWindowExecutionTaskInput"} - if s.TaskId == nil { - invalidParams.Add(request.NewErrParamRequired("TaskId")) - } - if s.TaskId != nil && len(*s.TaskId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 36)) - } - if s.WindowExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowExecutionId")) - } - if s.WindowExecutionId != nil && len(*s.WindowExecutionId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("WindowExecutionId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTaskId sets the TaskId field's value. -func (s *GetMaintenanceWindowExecutionTaskInput) SetTaskId(v string) *GetMaintenanceWindowExecutionTaskInput { - s.TaskId = &v - return s -} - -// SetWindowExecutionId sets the WindowExecutionId field's value. -func (s *GetMaintenanceWindowExecutionTaskInput) SetWindowExecutionId(v string) *GetMaintenanceWindowExecutionTaskInput { - s.WindowExecutionId = &v - return s -} - -type GetMaintenanceWindowExecutionTaskInvocationInput struct { - _ struct{} `type:"structure"` - - // The invocation ID to retrieve. - // - // InvocationId is a required field - InvocationId *string `min:"36" type:"string" required:"true"` - - // The ID of the specific task in the Maintenance Window task that should be - // retrieved. - // - // TaskId is a required field - TaskId *string `min:"36" type:"string" required:"true"` - - // The ID of the Maintenance Window execution for which the task is a part. - // - // WindowExecutionId is a required field - WindowExecutionId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetMaintenanceWindowExecutionTaskInvocationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMaintenanceWindowExecutionTaskInvocationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMaintenanceWindowExecutionTaskInvocationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMaintenanceWindowExecutionTaskInvocationInput"} - if s.InvocationId == nil { - invalidParams.Add(request.NewErrParamRequired("InvocationId")) - } - if s.InvocationId != nil && len(*s.InvocationId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("InvocationId", 36)) - } - if s.TaskId == nil { - invalidParams.Add(request.NewErrParamRequired("TaskId")) - } - if s.TaskId != nil && len(*s.TaskId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 36)) - } - if s.WindowExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowExecutionId")) - } - if s.WindowExecutionId != nil && len(*s.WindowExecutionId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("WindowExecutionId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInvocationId sets the InvocationId field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationInput) SetInvocationId(v string) *GetMaintenanceWindowExecutionTaskInvocationInput { - s.InvocationId = &v - return s -} - -// SetTaskId sets the TaskId field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationInput) SetTaskId(v string) *GetMaintenanceWindowExecutionTaskInvocationInput { - s.TaskId = &v - return s -} - -// SetWindowExecutionId sets the WindowExecutionId field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationInput) SetWindowExecutionId(v string) *GetMaintenanceWindowExecutionTaskInvocationInput { - s.WindowExecutionId = &v - return s -} - -type GetMaintenanceWindowExecutionTaskInvocationOutput struct { - _ struct{} `type:"structure"` - - // The time that the task finished executing on the target. - EndTime *time.Time `type:"timestamp"` - - // The execution ID. - ExecutionId *string `type:"string"` - - // The invocation ID. - InvocationId *string `min:"36" type:"string"` - - // User-provided value to be included in any CloudWatch events raised while - // running tasks for these targets in this Maintenance Window. - OwnerInformation *string `min:"1" type:"string" sensitive:"true"` - - // The parameters used at the time that the task executed. - Parameters *string `type:"string" sensitive:"true"` - - // The time that the task started executing on the target. - StartTime *time.Time `type:"timestamp"` - - // The task status for an invocation. - Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` - - // The details explaining the status. Details are only available for certain - // status values. - StatusDetails *string `type:"string"` - - // The task execution ID. - TaskExecutionId *string `min:"36" type:"string"` - - // Retrieves the task type for a Maintenance Window. Task types include the - // following: LAMBDA, STEP_FUNCTION, AUTOMATION, RUN_COMMAND. - TaskType *string `type:"string" enum:"MaintenanceWindowTaskType"` - - // The Maintenance Window execution ID. - WindowExecutionId *string `min:"36" type:"string"` - - // The Maintenance Window target ID. - WindowTargetId *string `type:"string"` -} - -// String returns the string representation -func (s GetMaintenanceWindowExecutionTaskInvocationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMaintenanceWindowExecutionTaskInvocationOutput) GoString() string { - return s.String() -} - -// SetEndTime sets the EndTime field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetEndTime(v time.Time) *GetMaintenanceWindowExecutionTaskInvocationOutput { - s.EndTime = &v - return s -} - -// SetExecutionId sets the ExecutionId field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetExecutionId(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { - s.ExecutionId = &v - return s -} - -// SetInvocationId sets the InvocationId field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetInvocationId(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { - s.InvocationId = &v - return s -} - -// SetOwnerInformation sets the OwnerInformation field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetOwnerInformation(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { - s.OwnerInformation = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetParameters(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { - s.Parameters = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetStartTime(v time.Time) *GetMaintenanceWindowExecutionTaskInvocationOutput { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetStatus(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { - s.Status = &v - return s -} - -// SetStatusDetails sets the StatusDetails field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetStatusDetails(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { - s.StatusDetails = &v - return s -} - -// SetTaskExecutionId sets the TaskExecutionId field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetTaskExecutionId(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { - s.TaskExecutionId = &v - return s -} - -// SetTaskType sets the TaskType field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetTaskType(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { - s.TaskType = &v - return s -} - -// SetWindowExecutionId sets the WindowExecutionId field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetWindowExecutionId(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { - s.WindowExecutionId = &v - return s -} - -// SetWindowTargetId sets the WindowTargetId field's value. -func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetWindowTargetId(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { - s.WindowTargetId = &v - return s -} - -type GetMaintenanceWindowExecutionTaskOutput struct { - _ struct{} `type:"structure"` - - // The time the task execution completed. - EndTime *time.Time `type:"timestamp"` - - // The defined maximum number of task executions that could be run in parallel. - MaxConcurrency *string `min:"1" type:"string"` - - // The defined maximum number of task execution errors allowed before scheduling - // of the task execution would have been stopped. - MaxErrors *string `min:"1" type:"string"` - - // The priority of the task. - Priority *int64 `type:"integer"` - - // The role that was assumed when executing the task. - ServiceRole *string `type:"string"` - - // The time the task execution started. - StartTime *time.Time `type:"timestamp"` - - // The status of the task. - Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` - - // The details explaining the Status. Only available for certain status values. - StatusDetails *string `type:"string"` - - // The ARN of the executed task. - TaskArn *string `min:"1" type:"string"` - - // The ID of the specific task execution in the Maintenance Window task that - // was retrieved. - TaskExecutionId *string `min:"36" type:"string"` - - // The parameters passed to the task when it was executed. - // - // TaskParameters has been deprecated. To specify parameters to pass to a task - // when it runs, instead use the Parameters option in the TaskInvocationParameters - // structure. For information about how Systems Manager handles these options - // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - // - // The map has the following format: - // - // Key: string, between 1 and 255 characters - // - // Value: an array of strings, each string is between 1 and 255 characters - TaskParameters []map[string]*MaintenanceWindowTaskParameterValueExpression `type:"list" sensitive:"true"` - - // The type of task executed. - Type *string `type:"string" enum:"MaintenanceWindowTaskType"` - - // The ID of the Maintenance Window execution that includes the task. - WindowExecutionId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s GetMaintenanceWindowExecutionTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMaintenanceWindowExecutionTaskOutput) GoString() string { - return s.String() -} - -// SetEndTime sets the EndTime field's value. -func (s *GetMaintenanceWindowExecutionTaskOutput) SetEndTime(v time.Time) *GetMaintenanceWindowExecutionTaskOutput { - s.EndTime = &v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *GetMaintenanceWindowExecutionTaskOutput) SetMaxConcurrency(v string) *GetMaintenanceWindowExecutionTaskOutput { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *GetMaintenanceWindowExecutionTaskOutput) SetMaxErrors(v string) *GetMaintenanceWindowExecutionTaskOutput { - s.MaxErrors = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *GetMaintenanceWindowExecutionTaskOutput) SetPriority(v int64) *GetMaintenanceWindowExecutionTaskOutput { - s.Priority = &v - return s -} - -// SetServiceRole sets the ServiceRole field's value. -func (s *GetMaintenanceWindowExecutionTaskOutput) SetServiceRole(v string) *GetMaintenanceWindowExecutionTaskOutput { - s.ServiceRole = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *GetMaintenanceWindowExecutionTaskOutput) SetStartTime(v time.Time) *GetMaintenanceWindowExecutionTaskOutput { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetMaintenanceWindowExecutionTaskOutput) SetStatus(v string) *GetMaintenanceWindowExecutionTaskOutput { - s.Status = &v - return s -} - -// SetStatusDetails sets the StatusDetails field's value. -func (s *GetMaintenanceWindowExecutionTaskOutput) SetStatusDetails(v string) *GetMaintenanceWindowExecutionTaskOutput { - s.StatusDetails = &v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *GetMaintenanceWindowExecutionTaskOutput) SetTaskArn(v string) *GetMaintenanceWindowExecutionTaskOutput { - s.TaskArn = &v - return s -} - -// SetTaskExecutionId sets the TaskExecutionId field's value. -func (s *GetMaintenanceWindowExecutionTaskOutput) SetTaskExecutionId(v string) *GetMaintenanceWindowExecutionTaskOutput { - s.TaskExecutionId = &v - return s -} - -// SetTaskParameters sets the TaskParameters field's value. -func (s *GetMaintenanceWindowExecutionTaskOutput) SetTaskParameters(v []map[string]*MaintenanceWindowTaskParameterValueExpression) *GetMaintenanceWindowExecutionTaskOutput { - s.TaskParameters = v - return s -} - -// SetType sets the Type field's value. -func (s *GetMaintenanceWindowExecutionTaskOutput) SetType(v string) *GetMaintenanceWindowExecutionTaskOutput { - s.Type = &v - return s -} - -// SetWindowExecutionId sets the WindowExecutionId field's value. -func (s *GetMaintenanceWindowExecutionTaskOutput) SetWindowExecutionId(v string) *GetMaintenanceWindowExecutionTaskOutput { - s.WindowExecutionId = &v - return s -} - -type GetMaintenanceWindowInput struct { - _ struct{} `type:"structure"` - - // The ID of the desired Maintenance Window. - // - // WindowId is a required field - WindowId *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetMaintenanceWindowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMaintenanceWindowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMaintenanceWindowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMaintenanceWindowInput"} - if s.WindowId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowId")) - } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWindowId sets the WindowId field's value. -func (s *GetMaintenanceWindowInput) SetWindowId(v string) *GetMaintenanceWindowInput { - s.WindowId = &v - return s -} - -type GetMaintenanceWindowOutput struct { - _ struct{} `type:"structure"` - - // Whether targets must be registered with the Maintenance Window before tasks - // can be defined for those targets. - AllowUnassociatedTargets *bool `type:"boolean"` - - // The date the Maintenance Window was created. - CreatedDate *time.Time `type:"timestamp"` - - // The number of hours before the end of the Maintenance Window that Systems - // Manager stops scheduling new tasks for execution. - Cutoff *int64 `type:"integer"` - - // The description of the Maintenance Window. - Description *string `min:"1" type:"string" sensitive:"true"` - - // The duration of the Maintenance Window in hours. - Duration *int64 `min:"1" type:"integer"` - - // Whether the Maintenance Windows is enabled. - Enabled *bool `type:"boolean"` - - // The date and time, in ISO-8601 Extended format, for when the Maintenance - // Window is scheduled to become inactive. The Maintenance Window will not run - // after this specified time. - EndDate *string `type:"string"` - - // The date the Maintenance Window was last modified. - ModifiedDate *time.Time `type:"timestamp"` - - // The name of the Maintenance Window. - Name *string `min:"3" type:"string"` - - // The next time the Maintenance Window will actually run, taking into account - // any specified times for the Maintenance Window to become active or inactive. - NextExecutionTime *string `type:"string"` - - // The schedule of the Maintenance Window in the form of a cron or rate expression. - Schedule *string `min:"1" type:"string"` - - // The time zone that the scheduled Maintenance Window executions are based - // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", - // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database - // (https://www.iana.org/time-zones) on the IANA website. - ScheduleTimezone *string `type:"string"` - - // The date and time, in ISO-8601 Extended format, for when the Maintenance - // Window is scheduled to become active. The Maintenance Window will not run - // before this specified time. - StartDate *string `type:"string"` - - // The ID of the created Maintenance Window. - WindowId *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s GetMaintenanceWindowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMaintenanceWindowOutput) GoString() string { - return s.String() -} - -// SetAllowUnassociatedTargets sets the AllowUnassociatedTargets field's value. -func (s *GetMaintenanceWindowOutput) SetAllowUnassociatedTargets(v bool) *GetMaintenanceWindowOutput { - s.AllowUnassociatedTargets = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *GetMaintenanceWindowOutput) SetCreatedDate(v time.Time) *GetMaintenanceWindowOutput { - s.CreatedDate = &v - return s -} - -// SetCutoff sets the Cutoff field's value. -func (s *GetMaintenanceWindowOutput) SetCutoff(v int64) *GetMaintenanceWindowOutput { - s.Cutoff = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetMaintenanceWindowOutput) SetDescription(v string) *GetMaintenanceWindowOutput { - s.Description = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *GetMaintenanceWindowOutput) SetDuration(v int64) *GetMaintenanceWindowOutput { - s.Duration = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *GetMaintenanceWindowOutput) SetEnabled(v bool) *GetMaintenanceWindowOutput { - s.Enabled = &v - return s -} - -// SetEndDate sets the EndDate field's value. -func (s *GetMaintenanceWindowOutput) SetEndDate(v string) *GetMaintenanceWindowOutput { - s.EndDate = &v - return s -} - -// SetModifiedDate sets the ModifiedDate field's value. -func (s *GetMaintenanceWindowOutput) SetModifiedDate(v time.Time) *GetMaintenanceWindowOutput { - s.ModifiedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetMaintenanceWindowOutput) SetName(v string) *GetMaintenanceWindowOutput { - s.Name = &v - return s -} - -// SetNextExecutionTime sets the NextExecutionTime field's value. -func (s *GetMaintenanceWindowOutput) SetNextExecutionTime(v string) *GetMaintenanceWindowOutput { - s.NextExecutionTime = &v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *GetMaintenanceWindowOutput) SetSchedule(v string) *GetMaintenanceWindowOutput { - s.Schedule = &v - return s -} - -// SetScheduleTimezone sets the ScheduleTimezone field's value. -func (s *GetMaintenanceWindowOutput) SetScheduleTimezone(v string) *GetMaintenanceWindowOutput { - s.ScheduleTimezone = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *GetMaintenanceWindowOutput) SetStartDate(v string) *GetMaintenanceWindowOutput { - s.StartDate = &v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *GetMaintenanceWindowOutput) SetWindowId(v string) *GetMaintenanceWindowOutput { - s.WindowId = &v - return s -} - -type GetMaintenanceWindowTaskInput struct { - _ struct{} `type:"structure"` - - // The Maintenance Window ID that includes the task to retrieve. - // - // WindowId is a required field - WindowId *string `min:"20" type:"string" required:"true"` - - // The Maintenance Window task ID to retrieve. - // - // WindowTaskId is a required field - WindowTaskId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetMaintenanceWindowTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMaintenanceWindowTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMaintenanceWindowTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMaintenanceWindowTaskInput"} - if s.WindowId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowId")) - } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) - } - if s.WindowTaskId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowTaskId")) - } - if s.WindowTaskId != nil && len(*s.WindowTaskId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("WindowTaskId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWindowId sets the WindowId field's value. -func (s *GetMaintenanceWindowTaskInput) SetWindowId(v string) *GetMaintenanceWindowTaskInput { - s.WindowId = &v - return s -} - -// SetWindowTaskId sets the WindowTaskId field's value. -func (s *GetMaintenanceWindowTaskInput) SetWindowTaskId(v string) *GetMaintenanceWindowTaskInput { - s.WindowTaskId = &v - return s -} - -type GetMaintenanceWindowTaskOutput struct { - _ struct{} `type:"structure"` - - // The retrieved task description. - Description *string `min:"1" type:"string" sensitive:"true"` - - // The location in Amazon S3 where the task results are logged. - // - // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, - // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters - // structure. For information about how Systems Manager handles these options - // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - LoggingInfo *LoggingInfo `type:"structure"` - - // The maximum number of targets allowed to run this task in parallel. - MaxConcurrency *string `min:"1" type:"string"` - - // The maximum number of errors allowed before the task stops being scheduled. - MaxErrors *string `min:"1" type:"string"` - - // The retrieved task name. - Name *string `min:"3" type:"string"` - - // The priority of the task when it executes. The lower the number, the higher - // the priority. Tasks that have the same priority are scheduled in parallel. - Priority *int64 `type:"integer"` - - // The IAM service role to assume during task execution. - ServiceRoleArn *string `type:"string"` - - // The targets where the task should execute. - Targets []*Target `type:"list"` - - // The resource that the task used during execution. For RUN_COMMAND and AUTOMATION - // task types, the TaskArn is the Systems Manager Document name/ARN. For LAMBDA - // tasks, the value is the function name/ARN. For STEP_FUNCTION tasks, the value - // is the state machine ARN. - TaskArn *string `min:"1" type:"string"` - - // The parameters to pass to the task when it executes. - TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` - - // The parameters to pass to the task when it executes. - // - // TaskParameters has been deprecated. To specify parameters to pass to a task - // when it runs, instead use the Parameters option in the TaskInvocationParameters - // structure. For information about how Systems Manager handles these options - // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` - - // The type of task to execute. - TaskType *string `type:"string" enum:"MaintenanceWindowTaskType"` - - // The retrieved Maintenance Window ID. - WindowId *string `min:"20" type:"string"` - - // The retrieved Maintenance Window task ID. - WindowTaskId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s GetMaintenanceWindowTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetMaintenanceWindowTaskOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *GetMaintenanceWindowTaskOutput) SetDescription(v string) *GetMaintenanceWindowTaskOutput { - s.Description = &v - return s -} - -// SetLoggingInfo sets the LoggingInfo field's value. -func (s *GetMaintenanceWindowTaskOutput) SetLoggingInfo(v *LoggingInfo) *GetMaintenanceWindowTaskOutput { - s.LoggingInfo = v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *GetMaintenanceWindowTaskOutput) SetMaxConcurrency(v string) *GetMaintenanceWindowTaskOutput { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *GetMaintenanceWindowTaskOutput) SetMaxErrors(v string) *GetMaintenanceWindowTaskOutput { - s.MaxErrors = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetMaintenanceWindowTaskOutput) SetName(v string) *GetMaintenanceWindowTaskOutput { - s.Name = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *GetMaintenanceWindowTaskOutput) SetPriority(v int64) *GetMaintenanceWindowTaskOutput { - s.Priority = &v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *GetMaintenanceWindowTaskOutput) SetServiceRoleArn(v string) *GetMaintenanceWindowTaskOutput { - s.ServiceRoleArn = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *GetMaintenanceWindowTaskOutput) SetTargets(v []*Target) *GetMaintenanceWindowTaskOutput { - s.Targets = v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *GetMaintenanceWindowTaskOutput) SetTaskArn(v string) *GetMaintenanceWindowTaskOutput { - s.TaskArn = &v - return s -} - -// SetTaskInvocationParameters sets the TaskInvocationParameters field's value. -func (s *GetMaintenanceWindowTaskOutput) SetTaskInvocationParameters(v *MaintenanceWindowTaskInvocationParameters) *GetMaintenanceWindowTaskOutput { - s.TaskInvocationParameters = v - return s -} - -// SetTaskParameters sets the TaskParameters field's value. -func (s *GetMaintenanceWindowTaskOutput) SetTaskParameters(v map[string]*MaintenanceWindowTaskParameterValueExpression) *GetMaintenanceWindowTaskOutput { - s.TaskParameters = v - return s -} - -// SetTaskType sets the TaskType field's value. -func (s *GetMaintenanceWindowTaskOutput) SetTaskType(v string) *GetMaintenanceWindowTaskOutput { - s.TaskType = &v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *GetMaintenanceWindowTaskOutput) SetWindowId(v string) *GetMaintenanceWindowTaskOutput { - s.WindowId = &v - return s -} - -// SetWindowTaskId sets the WindowTaskId field's value. -func (s *GetMaintenanceWindowTaskOutput) SetWindowTaskId(v string) *GetMaintenanceWindowTaskOutput { - s.WindowTaskId = &v - return s -} - -type GetParameterHistoryInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // The name of a parameter you want to query. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // Return decrypted values for secure string parameters. This flag is ignored - // for String and StringList parameter types. - WithDecryption *bool `type:"boolean"` -} - -// String returns the string representation -func (s GetParameterHistoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetParameterHistoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetParameterHistoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetParameterHistoryInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetParameterHistoryInput) SetMaxResults(v int64) *GetParameterHistoryInput { - s.MaxResults = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetParameterHistoryInput) SetName(v string) *GetParameterHistoryInput { - s.Name = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetParameterHistoryInput) SetNextToken(v string) *GetParameterHistoryInput { - s.NextToken = &v - return s -} - -// SetWithDecryption sets the WithDecryption field's value. -func (s *GetParameterHistoryInput) SetWithDecryption(v bool) *GetParameterHistoryInput { - s.WithDecryption = &v - return s -} - -type GetParameterHistoryOutput struct { - _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // A list of parameters returned by the request. - Parameters []*ParameterHistory `type:"list"` -} - -// String returns the string representation -func (s GetParameterHistoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetParameterHistoryOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetParameterHistoryOutput) SetNextToken(v string) *GetParameterHistoryOutput { - s.NextToken = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *GetParameterHistoryOutput) SetParameters(v []*ParameterHistory) *GetParameterHistoryOutput { - s.Parameters = v - return s -} - -type GetParameterInput struct { - _ struct{} `type:"structure"` - - // The name of the parameter you want to query. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // Return decrypted values for secure string parameters. This flag is ignored - // for String and StringList parameter types. - WithDecryption *bool `type:"boolean"` -} - -// String returns the string representation -func (s GetParameterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetParameterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetParameterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetParameterInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetParameterInput) SetName(v string) *GetParameterInput { - s.Name = &v - return s -} - -// SetWithDecryption sets the WithDecryption field's value. -func (s *GetParameterInput) SetWithDecryption(v bool) *GetParameterInput { - s.WithDecryption = &v - return s -} - -type GetParameterOutput struct { - _ struct{} `type:"structure"` - - // Information about a parameter. - Parameter *Parameter `type:"structure"` -} - -// String returns the string representation -func (s GetParameterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetParameterOutput) GoString() string { - return s.String() -} - -// SetParameter sets the Parameter field's value. -func (s *GetParameterOutput) SetParameter(v *Parameter) *GetParameterOutput { - s.Parameter = v - return s -} - -type GetParametersByPathInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // A token to start the list. Use this token to get the next set of results. - NextToken *string `type:"string"` - - // Filters to limit the request results. - // - // You can't filter using the parameter name. - ParameterFilters []*ParameterStringFilter `type:"list"` - - // The hierarchy for the parameter. Hierarchies start with a forward slash (/) - // and end with the parameter name. A parameter name hierarchy can have a maximum - // of 15 levels. Here is an example of a hierarchy: /Finance/Prod/IAD/WinServ2016/license33 - // - // Path is a required field - Path *string `min:"1" type:"string" required:"true"` - - // Retrieve all parameters within a hierarchy. - // - // If a user has access to a path, then the user can access all levels of that - // path. For example, if a user has permission to access path /a, then the user - // can also access /a/b. Even if a user has explicitly been denied access in - // IAM for parameter /a, they can still call the GetParametersByPath API action - // recursively and view /a/b. - Recursive *bool `type:"boolean"` - - // Retrieve all parameters in a hierarchy with their value decrypted. - WithDecryption *bool `type:"boolean"` -} - -// String returns the string representation -func (s GetParametersByPathInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetParametersByPathInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetParametersByPathInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetParametersByPathInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Path == nil { - invalidParams.Add(request.NewErrParamRequired("Path")) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.ParameterFilters != nil { - for i, v := range s.ParameterFilters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterFilters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetParametersByPathInput) SetMaxResults(v int64) *GetParametersByPathInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetParametersByPathInput) SetNextToken(v string) *GetParametersByPathInput { - s.NextToken = &v - return s -} - -// SetParameterFilters sets the ParameterFilters field's value. -func (s *GetParametersByPathInput) SetParameterFilters(v []*ParameterStringFilter) *GetParametersByPathInput { - s.ParameterFilters = v - return s -} - -// SetPath sets the Path field's value. -func (s *GetParametersByPathInput) SetPath(v string) *GetParametersByPathInput { - s.Path = &v - return s -} - -// SetRecursive sets the Recursive field's value. -func (s *GetParametersByPathInput) SetRecursive(v bool) *GetParametersByPathInput { - s.Recursive = &v - return s -} - -// SetWithDecryption sets the WithDecryption field's value. -func (s *GetParametersByPathInput) SetWithDecryption(v bool) *GetParametersByPathInput { - s.WithDecryption = &v - return s -} - -type GetParametersByPathOutput struct { - _ struct{} `type:"structure"` - - // The token for the next set of items to return. Use this token to get the - // next set of results. - NextToken *string `type:"string"` - - // A list of parameters found in the specified hierarchy. - Parameters []*Parameter `type:"list"` -} - -// String returns the string representation -func (s GetParametersByPathOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetParametersByPathOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *GetParametersByPathOutput) SetNextToken(v string) *GetParametersByPathOutput { - s.NextToken = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *GetParametersByPathOutput) SetParameters(v []*Parameter) *GetParametersByPathOutput { - s.Parameters = v - return s -} - -type GetParametersInput struct { - _ struct{} `type:"structure"` - - // Names of the parameters for which you want to query information. - // - // Names is a required field - Names []*string `min:"1" type:"list" required:"true"` - - // Return decrypted secure string value. Return decrypted values for secure - // string parameters. This flag is ignored for String and StringList parameter - // types. - WithDecryption *bool `type:"boolean"` -} - -// String returns the string representation -func (s GetParametersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetParametersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetParametersInput"} - if s.Names == nil { - invalidParams.Add(request.NewErrParamRequired("Names")) - } - if s.Names != nil && len(s.Names) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Names", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNames sets the Names field's value. -func (s *GetParametersInput) SetNames(v []*string) *GetParametersInput { - s.Names = v - return s -} - -// SetWithDecryption sets the WithDecryption field's value. -func (s *GetParametersInput) SetWithDecryption(v bool) *GetParametersInput { - s.WithDecryption = &v - return s -} - -type GetParametersOutput struct { - _ struct{} `type:"structure"` - - // A list of parameters that are not formatted correctly or do not run when - // executed. - InvalidParameters []*string `min:"1" type:"list"` - - // A list of details for a parameter. - Parameters []*Parameter `type:"list"` -} - -// String returns the string representation -func (s GetParametersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetParametersOutput) GoString() string { - return s.String() -} - -// SetInvalidParameters sets the InvalidParameters field's value. -func (s *GetParametersOutput) SetInvalidParameters(v []*string) *GetParametersOutput { - s.InvalidParameters = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *GetParametersOutput) SetParameters(v []*Parameter) *GetParametersOutput { - s.Parameters = v - return s -} - -type GetPatchBaselineForPatchGroupInput struct { - _ struct{} `type:"structure"` - - // Returns he operating system rule specified for patch groups using the patch - // baseline. - OperatingSystem *string `type:"string" enum:"OperatingSystem"` - - // The name of the patch group whose patch baseline should be retrieved. - // - // PatchGroup is a required field - PatchGroup *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPatchBaselineForPatchGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPatchBaselineForPatchGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPatchBaselineForPatchGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPatchBaselineForPatchGroupInput"} - if s.PatchGroup == nil { - invalidParams.Add(request.NewErrParamRequired("PatchGroup")) - } - if s.PatchGroup != nil && len(*s.PatchGroup) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PatchGroup", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *GetPatchBaselineForPatchGroupInput) SetOperatingSystem(v string) *GetPatchBaselineForPatchGroupInput { - s.OperatingSystem = &v - return s -} - -// SetPatchGroup sets the PatchGroup field's value. -func (s *GetPatchBaselineForPatchGroupInput) SetPatchGroup(v string) *GetPatchBaselineForPatchGroupInput { - s.PatchGroup = &v - return s -} - -type GetPatchBaselineForPatchGroupOutput struct { - _ struct{} `type:"structure"` - - // The ID of the patch baseline that should be used for the patch group. - BaselineId *string `min:"20" type:"string"` - - // The operating system rule specified for patch groups using the patch baseline. - OperatingSystem *string `type:"string" enum:"OperatingSystem"` - - // The name of the patch group. - PatchGroup *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetPatchBaselineForPatchGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPatchBaselineForPatchGroupOutput) GoString() string { - return s.String() -} - -// SetBaselineId sets the BaselineId field's value. -func (s *GetPatchBaselineForPatchGroupOutput) SetBaselineId(v string) *GetPatchBaselineForPatchGroupOutput { - s.BaselineId = &v - return s -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *GetPatchBaselineForPatchGroupOutput) SetOperatingSystem(v string) *GetPatchBaselineForPatchGroupOutput { - s.OperatingSystem = &v - return s -} - -// SetPatchGroup sets the PatchGroup field's value. -func (s *GetPatchBaselineForPatchGroupOutput) SetPatchGroup(v string) *GetPatchBaselineForPatchGroupOutput { - s.PatchGroup = &v - return s -} - -type GetPatchBaselineInput struct { - _ struct{} `type:"structure"` - - // The ID of the patch baseline to retrieve. - // - // BaselineId is a required field - BaselineId *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPatchBaselineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPatchBaselineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPatchBaselineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPatchBaselineInput"} - if s.BaselineId == nil { - invalidParams.Add(request.NewErrParamRequired("BaselineId")) - } - if s.BaselineId != nil && len(*s.BaselineId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("BaselineId", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBaselineId sets the BaselineId field's value. -func (s *GetPatchBaselineInput) SetBaselineId(v string) *GetPatchBaselineInput { - s.BaselineId = &v - return s -} - -type GetPatchBaselineOutput struct { - _ struct{} `type:"structure"` - - // A set of rules used to include patches in the baseline. - ApprovalRules *PatchRuleGroup `type:"structure"` - - // A list of explicitly approved patches for the baseline. - ApprovedPatches []*string `type:"list"` - - // Returns the specified compliance severity level for approved patches in the - // patch baseline. - ApprovedPatchesComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` - - // Indicates whether the list of approved patches includes non-security updates - // that should be applied to the instances. The default value is 'false'. Applies - // to Linux instances only. - ApprovedPatchesEnableNonSecurity *bool `type:"boolean"` - - // The ID of the retrieved patch baseline. - BaselineId *string `min:"20" type:"string"` - - // The date the patch baseline was created. - CreatedDate *time.Time `type:"timestamp"` - - // A description of the patch baseline. - Description *string `min:"1" type:"string"` - - // A set of global filters used to exclude patches from the baseline. - GlobalFilters *PatchFilterGroup `type:"structure"` - - // The date the patch baseline was last modified. - ModifiedDate *time.Time `type:"timestamp"` - - // The name of the patch baseline. - Name *string `min:"3" type:"string"` - - // Returns the operating system specified for the patch baseline. - OperatingSystem *string `type:"string" enum:"OperatingSystem"` - - // Patch groups included in the patch baseline. - PatchGroups []*string `type:"list"` - - // A list of explicitly rejected patches for the baseline. - RejectedPatches []*string `type:"list"` - - // The action specified to take on patches included in the RejectedPatches list. - // A patch can be allowed only if it is a dependency of another package, or - // blocked entirely along with packages that include it as a dependency. - RejectedPatchesAction *string `type:"string" enum:"PatchAction"` - - // Information about the patches to use to update the instances, including target - // operating systems and source repositories. Applies to Linux instances only. - Sources []*PatchSource `type:"list"` -} - -// String returns the string representation -func (s GetPatchBaselineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPatchBaselineOutput) GoString() string { - return s.String() -} - -// SetApprovalRules sets the ApprovalRules field's value. -func (s *GetPatchBaselineOutput) SetApprovalRules(v *PatchRuleGroup) *GetPatchBaselineOutput { - s.ApprovalRules = v - return s -} - -// SetApprovedPatches sets the ApprovedPatches field's value. -func (s *GetPatchBaselineOutput) SetApprovedPatches(v []*string) *GetPatchBaselineOutput { - s.ApprovedPatches = v - return s -} - -// SetApprovedPatchesComplianceLevel sets the ApprovedPatchesComplianceLevel field's value. -func (s *GetPatchBaselineOutput) SetApprovedPatchesComplianceLevel(v string) *GetPatchBaselineOutput { - s.ApprovedPatchesComplianceLevel = &v - return s -} - -// SetApprovedPatchesEnableNonSecurity sets the ApprovedPatchesEnableNonSecurity field's value. -func (s *GetPatchBaselineOutput) SetApprovedPatchesEnableNonSecurity(v bool) *GetPatchBaselineOutput { - s.ApprovedPatchesEnableNonSecurity = &v - return s -} - -// SetBaselineId sets the BaselineId field's value. -func (s *GetPatchBaselineOutput) SetBaselineId(v string) *GetPatchBaselineOutput { - s.BaselineId = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *GetPatchBaselineOutput) SetCreatedDate(v time.Time) *GetPatchBaselineOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *GetPatchBaselineOutput) SetDescription(v string) *GetPatchBaselineOutput { - s.Description = &v - return s -} - -// SetGlobalFilters sets the GlobalFilters field's value. -func (s *GetPatchBaselineOutput) SetGlobalFilters(v *PatchFilterGroup) *GetPatchBaselineOutput { - s.GlobalFilters = v - return s -} - -// SetModifiedDate sets the ModifiedDate field's value. -func (s *GetPatchBaselineOutput) SetModifiedDate(v time.Time) *GetPatchBaselineOutput { - s.ModifiedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetPatchBaselineOutput) SetName(v string) *GetPatchBaselineOutput { - s.Name = &v - return s -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *GetPatchBaselineOutput) SetOperatingSystem(v string) *GetPatchBaselineOutput { - s.OperatingSystem = &v - return s -} - -// SetPatchGroups sets the PatchGroups field's value. -func (s *GetPatchBaselineOutput) SetPatchGroups(v []*string) *GetPatchBaselineOutput { - s.PatchGroups = v - return s -} - -// SetRejectedPatches sets the RejectedPatches field's value. -func (s *GetPatchBaselineOutput) SetRejectedPatches(v []*string) *GetPatchBaselineOutput { - s.RejectedPatches = v - return s -} - -// SetRejectedPatchesAction sets the RejectedPatchesAction field's value. -func (s *GetPatchBaselineOutput) SetRejectedPatchesAction(v string) *GetPatchBaselineOutput { - s.RejectedPatchesAction = &v - return s -} - -// SetSources sets the Sources field's value. -func (s *GetPatchBaselineOutput) SetSources(v []*PatchSource) *GetPatchBaselineOutput { - s.Sources = v - return s -} - -// Status information about the aggregated associations. -type InstanceAggregatedAssociationOverview struct { - _ struct{} `type:"structure"` - - // Detailed status information about the aggregated associations. - DetailedStatus *string `type:"string"` - - // The number of associations for the instance(s). - InstanceAssociationStatusAggregatedCount map[string]*int64 `type:"map"` -} - -// String returns the string representation -func (s InstanceAggregatedAssociationOverview) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceAggregatedAssociationOverview) GoString() string { - return s.String() -} - -// SetDetailedStatus sets the DetailedStatus field's value. -func (s *InstanceAggregatedAssociationOverview) SetDetailedStatus(v string) *InstanceAggregatedAssociationOverview { - s.DetailedStatus = &v - return s -} - -// SetInstanceAssociationStatusAggregatedCount sets the InstanceAssociationStatusAggregatedCount field's value. -func (s *InstanceAggregatedAssociationOverview) SetInstanceAssociationStatusAggregatedCount(v map[string]*int64) *InstanceAggregatedAssociationOverview { - s.InstanceAssociationStatusAggregatedCount = v - return s -} - -// One or more association documents on the instance. -type InstanceAssociation struct { - _ struct{} `type:"structure"` - - // The association ID. - AssociationId *string `type:"string"` - - // Version information for the association on the instance. - AssociationVersion *string `type:"string"` - - // The content of the association document for the instance(s). - Content *string `min:"1" type:"string"` - - // The instance ID. - InstanceId *string `type:"string"` -} - -// String returns the string representation -func (s InstanceAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceAssociation) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *InstanceAssociation) SetAssociationId(v string) *InstanceAssociation { - s.AssociationId = &v - return s -} - -// SetAssociationVersion sets the AssociationVersion field's value. -func (s *InstanceAssociation) SetAssociationVersion(v string) *InstanceAssociation { - s.AssociationVersion = &v - return s -} - -// SetContent sets the Content field's value. -func (s *InstanceAssociation) SetContent(v string) *InstanceAssociation { - s.Content = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceAssociation) SetInstanceId(v string) *InstanceAssociation { - s.InstanceId = &v - return s -} - -// An Amazon S3 bucket where you want to store the results of this request. -type InstanceAssociationOutputLocation struct { - _ struct{} `type:"structure"` - - // An Amazon S3 bucket where you want to store the results of this request. - S3Location *S3OutputLocation `type:"structure"` -} - -// String returns the string representation -func (s InstanceAssociationOutputLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceAssociationOutputLocation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstanceAssociationOutputLocation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstanceAssociationOutputLocation"} - if s.S3Location != nil { - if err := s.S3Location.Validate(); err != nil { - invalidParams.AddNested("S3Location", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3Location sets the S3Location field's value. -func (s *InstanceAssociationOutputLocation) SetS3Location(v *S3OutputLocation) *InstanceAssociationOutputLocation { - s.S3Location = v - return s -} - -// The URL of Amazon S3 bucket where you want to store the results of this request. -type InstanceAssociationOutputUrl struct { - _ struct{} `type:"structure"` - - // The URL of Amazon S3 bucket where you want to store the results of this request. - S3OutputUrl *S3OutputUrl `type:"structure"` -} - -// String returns the string representation -func (s InstanceAssociationOutputUrl) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceAssociationOutputUrl) GoString() string { - return s.String() -} - -// SetS3OutputUrl sets the S3OutputUrl field's value. -func (s *InstanceAssociationOutputUrl) SetS3OutputUrl(v *S3OutputUrl) *InstanceAssociationOutputUrl { - s.S3OutputUrl = v - return s -} - -// Status information about the instance association. -type InstanceAssociationStatusInfo struct { - _ struct{} `type:"structure"` - - // The association ID. - AssociationId *string `type:"string"` - - // The name of the association applied to the instance. - AssociationName *string `type:"string"` - - // The version of the association applied to the instance. - AssociationVersion *string `type:"string"` - - // Detailed status information about the instance association. - DetailedStatus *string `type:"string"` - - // The association document verions. - DocumentVersion *string `type:"string"` - - // An error code returned by the request to create the association. - ErrorCode *string `type:"string"` - - // The date the instance association executed. - ExecutionDate *time.Time `type:"timestamp"` - - // Summary information about association execution. - ExecutionSummary *string `min:"1" type:"string"` - - // The instance ID where the association was created. - InstanceId *string `type:"string"` - - // The name of the association. - Name *string `type:"string"` - - // A URL for an Amazon S3 bucket where you want to store the results of this - // request. - OutputUrl *InstanceAssociationOutputUrl `type:"structure"` - - // Status information about the instance association. - Status *string `type:"string"` -} - -// String returns the string representation -func (s InstanceAssociationStatusInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceAssociationStatusInfo) GoString() string { - return s.String() -} - -// SetAssociationId sets the AssociationId field's value. -func (s *InstanceAssociationStatusInfo) SetAssociationId(v string) *InstanceAssociationStatusInfo { - s.AssociationId = &v - return s -} - -// SetAssociationName sets the AssociationName field's value. -func (s *InstanceAssociationStatusInfo) SetAssociationName(v string) *InstanceAssociationStatusInfo { - s.AssociationName = &v - return s -} - -// SetAssociationVersion sets the AssociationVersion field's value. -func (s *InstanceAssociationStatusInfo) SetAssociationVersion(v string) *InstanceAssociationStatusInfo { - s.AssociationVersion = &v - return s -} - -// SetDetailedStatus sets the DetailedStatus field's value. -func (s *InstanceAssociationStatusInfo) SetDetailedStatus(v string) *InstanceAssociationStatusInfo { - s.DetailedStatus = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *InstanceAssociationStatusInfo) SetDocumentVersion(v string) *InstanceAssociationStatusInfo { - s.DocumentVersion = &v - return s -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *InstanceAssociationStatusInfo) SetErrorCode(v string) *InstanceAssociationStatusInfo { - s.ErrorCode = &v - return s -} - -// SetExecutionDate sets the ExecutionDate field's value. -func (s *InstanceAssociationStatusInfo) SetExecutionDate(v time.Time) *InstanceAssociationStatusInfo { - s.ExecutionDate = &v - return s -} - -// SetExecutionSummary sets the ExecutionSummary field's value. -func (s *InstanceAssociationStatusInfo) SetExecutionSummary(v string) *InstanceAssociationStatusInfo { - s.ExecutionSummary = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceAssociationStatusInfo) SetInstanceId(v string) *InstanceAssociationStatusInfo { - s.InstanceId = &v - return s -} - -// SetName sets the Name field's value. -func (s *InstanceAssociationStatusInfo) SetName(v string) *InstanceAssociationStatusInfo { - s.Name = &v - return s -} - -// SetOutputUrl sets the OutputUrl field's value. -func (s *InstanceAssociationStatusInfo) SetOutputUrl(v *InstanceAssociationOutputUrl) *InstanceAssociationStatusInfo { - s.OutputUrl = v - return s -} - -// SetStatus sets the Status field's value. -func (s *InstanceAssociationStatusInfo) SetStatus(v string) *InstanceAssociationStatusInfo { - s.Status = &v - return s -} - -// Describes a filter for a specific list of instances. -type InstanceInformation struct { - _ struct{} `type:"structure"` - - // The activation ID created by Systems Manager when the server or VM was registered. - ActivationId *string `type:"string"` - - // The version of SSM Agent running on your Linux instance. - AgentVersion *string `type:"string"` - - // Information about the association. - AssociationOverview *InstanceAggregatedAssociationOverview `type:"structure"` - - // The status of the association. - AssociationStatus *string `type:"string"` - - // The fully qualified host name of the managed instance. - ComputerName *string `min:"1" type:"string"` - - // The IP address of the managed instance. - IPAddress *string `min:"1" type:"string"` - - // The Amazon Identity and Access Management (IAM) role assigned to the on-premises - // Systems Manager managed instances. This call does not return the IAM role - // for Amazon EC2 instances. - IamRole *string `type:"string"` - - // The instance ID. - InstanceId *string `type:"string"` - - // Indicates whether latest version of SSM Agent is running on your instance. - // Some older versions of Windows Server use the EC2Config service to process - // SSM requests. For this reason, this field does not indicate whether or not - // the latest version is installed on Windows managed instances. - IsLatestVersion *bool `type:"boolean"` - - // The date the association was last executed. - LastAssociationExecutionDate *time.Time `type:"timestamp"` - - // The date and time when agent last pinged Systems Manager service. - LastPingDateTime *time.Time `type:"timestamp"` - - // The last date the association was successfully run. - LastSuccessfulAssociationExecutionDate *time.Time `type:"timestamp"` - - // The name of the managed instance. - Name *string `type:"string"` - - // Connection status of SSM Agent. - PingStatus *string `type:"string" enum:"PingStatus"` - - // The name of the operating system platform running on your instance. - PlatformName *string `type:"string"` - - // The operating system platform type. - PlatformType *string `type:"string" enum:"PlatformType"` - - // The version of the OS platform running on your instance. - PlatformVersion *string `type:"string"` - - // The date the server or VM was registered with AWS as a managed instance. - RegistrationDate *time.Time `type:"timestamp"` - - // The type of instance. Instances are either EC2 instances or managed instances. - ResourceType *string `type:"string" enum:"ResourceType"` -} - -// String returns the string representation -func (s InstanceInformation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceInformation) GoString() string { - return s.String() -} - -// SetActivationId sets the ActivationId field's value. -func (s *InstanceInformation) SetActivationId(v string) *InstanceInformation { - s.ActivationId = &v - return s -} - -// SetAgentVersion sets the AgentVersion field's value. -func (s *InstanceInformation) SetAgentVersion(v string) *InstanceInformation { - s.AgentVersion = &v - return s -} - -// SetAssociationOverview sets the AssociationOverview field's value. -func (s *InstanceInformation) SetAssociationOverview(v *InstanceAggregatedAssociationOverview) *InstanceInformation { - s.AssociationOverview = v - return s -} - -// SetAssociationStatus sets the AssociationStatus field's value. -func (s *InstanceInformation) SetAssociationStatus(v string) *InstanceInformation { - s.AssociationStatus = &v - return s -} - -// SetComputerName sets the ComputerName field's value. -func (s *InstanceInformation) SetComputerName(v string) *InstanceInformation { - s.ComputerName = &v - return s -} - -// SetIPAddress sets the IPAddress field's value. -func (s *InstanceInformation) SetIPAddress(v string) *InstanceInformation { - s.IPAddress = &v - return s -} - -// SetIamRole sets the IamRole field's value. -func (s *InstanceInformation) SetIamRole(v string) *InstanceInformation { - s.IamRole = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceInformation) SetInstanceId(v string) *InstanceInformation { - s.InstanceId = &v - return s -} - -// SetIsLatestVersion sets the IsLatestVersion field's value. -func (s *InstanceInformation) SetIsLatestVersion(v bool) *InstanceInformation { - s.IsLatestVersion = &v - return s -} - -// SetLastAssociationExecutionDate sets the LastAssociationExecutionDate field's value. -func (s *InstanceInformation) SetLastAssociationExecutionDate(v time.Time) *InstanceInformation { - s.LastAssociationExecutionDate = &v - return s -} - -// SetLastPingDateTime sets the LastPingDateTime field's value. -func (s *InstanceInformation) SetLastPingDateTime(v time.Time) *InstanceInformation { - s.LastPingDateTime = &v - return s -} - -// SetLastSuccessfulAssociationExecutionDate sets the LastSuccessfulAssociationExecutionDate field's value. -func (s *InstanceInformation) SetLastSuccessfulAssociationExecutionDate(v time.Time) *InstanceInformation { - s.LastSuccessfulAssociationExecutionDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *InstanceInformation) SetName(v string) *InstanceInformation { - s.Name = &v - return s -} - -// SetPingStatus sets the PingStatus field's value. -func (s *InstanceInformation) SetPingStatus(v string) *InstanceInformation { - s.PingStatus = &v - return s -} - -// SetPlatformName sets the PlatformName field's value. -func (s *InstanceInformation) SetPlatformName(v string) *InstanceInformation { - s.PlatformName = &v - return s -} - -// SetPlatformType sets the PlatformType field's value. -func (s *InstanceInformation) SetPlatformType(v string) *InstanceInformation { - s.PlatformType = &v - return s -} - -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *InstanceInformation) SetPlatformVersion(v string) *InstanceInformation { - s.PlatformVersion = &v - return s -} - -// SetRegistrationDate sets the RegistrationDate field's value. -func (s *InstanceInformation) SetRegistrationDate(v time.Time) *InstanceInformation { - s.RegistrationDate = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *InstanceInformation) SetResourceType(v string) *InstanceInformation { - s.ResourceType = &v - return s -} - -// Describes a filter for a specific list of instances. You can filter instances -// information by using tags. You specify tags by using a key-value mapping. -// -// Use this action instead of the DescribeInstanceInformationRequest$InstanceInformationFilterList -// method. The InstanceInformationFilterList method is a legacy method and does -// not support tags. -type InstanceInformationFilter struct { - _ struct{} `type:"structure"` - - // The name of the filter. - // - // Key is a required field - Key *string `locationName:"key" type:"string" required:"true" enum:"InstanceInformationFilterKey"` - - // The filter values. - // - // ValueSet is a required field - ValueSet []*string `locationName:"valueSet" min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s InstanceInformationFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceInformationFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstanceInformationFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstanceInformationFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.ValueSet == nil { - invalidParams.Add(request.NewErrParamRequired("ValueSet")) - } - if s.ValueSet != nil && len(s.ValueSet) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ValueSet", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *InstanceInformationFilter) SetKey(v string) *InstanceInformationFilter { - s.Key = &v - return s -} - -// SetValueSet sets the ValueSet field's value. -func (s *InstanceInformationFilter) SetValueSet(v []*string) *InstanceInformationFilter { - s.ValueSet = v - return s -} - -// The filters to describe or get information about your managed instances. -type InstanceInformationStringFilter struct { - _ struct{} `type:"structure"` - - // The filter key name to describe your instances. For example: - // - // "InstanceIds"|"AgentVersion"|"PingStatus"|"PlatformTypes"|"ActivationIds"|"IamRole"|"ResourceType"|"AssociationStatus"|"Tag - // Key" - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The filter values. - // - // Values is a required field - Values []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s InstanceInformationStringFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceInformationStringFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstanceInformationStringFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstanceInformationStringFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *InstanceInformationStringFilter) SetKey(v string) *InstanceInformationStringFilter { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *InstanceInformationStringFilter) SetValues(v []*string) *InstanceInformationStringFilter { - s.Values = v - return s -} - -// Defines the high-level patch compliance state for a managed instance, providing -// information about the number of installed, missing, not applicable, and failed -// patches along with metadata about the operation when this information was -// gathered for the instance. -type InstancePatchState struct { - _ struct{} `type:"structure"` - - // The ID of the patch baseline used to patch the instance. - // - // BaselineId is a required field - BaselineId *string `min:"20" type:"string" required:"true"` - - // The number of patches from the patch baseline that were attempted to be installed - // during the last patching operation, but failed to install. - FailedCount *int64 `type:"integer"` - - // An https URL or an Amazon S3 path-style URL to a list of patches to be installed. - // This patch installation list, which you maintain in an Amazon S3 bucket in - // YAML format and specify in the SSM document AWS-RunPatchBaseline, overrides - // the patches specified by the default patch baseline. - // - // For more information about the InstallOverrideList parameter, see About the - // SSM Document AWS-RunPatchBaseline (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html) - // in the AWS Systems Manager User Guide. - InstallOverrideList *string `min:"1" type:"string"` - - // The number of patches from the patch baseline that are installed on the instance. - InstalledCount *int64 `type:"integer"` - - // The number of patches not specified in the patch baseline that are installed - // on the instance. - InstalledOtherCount *int64 `type:"integer"` - - // The number of instances with patches installed that are specified in a RejectedPatches - // list. Patches with a status of InstalledRejected were typically installed - // before they were added to a RejectedPatches list. - // - // If ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction, - // the value of InstalledRejectedCount will always be 0 (zero). - InstalledRejectedCount *int64 `type:"integer"` - - // The ID of the managed instance the high-level patch compliance information - // was collected for. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The number of patches from the patch baseline that are applicable for the - // instance but aren't currently installed. - MissingCount *int64 `type:"integer"` - - // The number of patches from the patch baseline that aren't applicable for - // the instance and hence aren't installed on the instance. - NotApplicableCount *int64 `type:"integer"` - - // The type of patching operation that was performed: SCAN (assess patch compliance - // state) or INSTALL (install missing patches). - // - // Operation is a required field - Operation *string `type:"string" required:"true" enum:"PatchOperationType"` - - // The time the most recent patching operation completed on the instance. - // - // OperationEndTime is a required field - OperationEndTime *time.Time `type:"timestamp" required:"true"` - - // The time the most recent patching operation was started on the instance. - // - // OperationStartTime is a required field - OperationStartTime *time.Time `type:"timestamp" required:"true"` - - // Placeholder information. This field will always be empty in the current release - // of the service. - OwnerInformation *string `min:"1" type:"string" sensitive:"true"` - - // The name of the patch group the managed instance belongs to. - // - // PatchGroup is a required field - PatchGroup *string `min:"1" type:"string" required:"true"` - - // The ID of the patch baseline snapshot used during the patching operation - // when this compliance data was collected. - SnapshotId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s InstancePatchState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstancePatchState) GoString() string { - return s.String() -} - -// SetBaselineId sets the BaselineId field's value. -func (s *InstancePatchState) SetBaselineId(v string) *InstancePatchState { - s.BaselineId = &v - return s -} - -// SetFailedCount sets the FailedCount field's value. -func (s *InstancePatchState) SetFailedCount(v int64) *InstancePatchState { - s.FailedCount = &v - return s -} - -// SetInstallOverrideList sets the InstallOverrideList field's value. -func (s *InstancePatchState) SetInstallOverrideList(v string) *InstancePatchState { - s.InstallOverrideList = &v - return s -} - -// SetInstalledCount sets the InstalledCount field's value. -func (s *InstancePatchState) SetInstalledCount(v int64) *InstancePatchState { - s.InstalledCount = &v - return s -} - -// SetInstalledOtherCount sets the InstalledOtherCount field's value. -func (s *InstancePatchState) SetInstalledOtherCount(v int64) *InstancePatchState { - s.InstalledOtherCount = &v - return s -} - -// SetInstalledRejectedCount sets the InstalledRejectedCount field's value. -func (s *InstancePatchState) SetInstalledRejectedCount(v int64) *InstancePatchState { - s.InstalledRejectedCount = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstancePatchState) SetInstanceId(v string) *InstancePatchState { - s.InstanceId = &v - return s -} - -// SetMissingCount sets the MissingCount field's value. -func (s *InstancePatchState) SetMissingCount(v int64) *InstancePatchState { - s.MissingCount = &v - return s -} - -// SetNotApplicableCount sets the NotApplicableCount field's value. -func (s *InstancePatchState) SetNotApplicableCount(v int64) *InstancePatchState { - s.NotApplicableCount = &v - return s -} - -// SetOperation sets the Operation field's value. -func (s *InstancePatchState) SetOperation(v string) *InstancePatchState { - s.Operation = &v - return s -} - -// SetOperationEndTime sets the OperationEndTime field's value. -func (s *InstancePatchState) SetOperationEndTime(v time.Time) *InstancePatchState { - s.OperationEndTime = &v - return s -} - -// SetOperationStartTime sets the OperationStartTime field's value. -func (s *InstancePatchState) SetOperationStartTime(v time.Time) *InstancePatchState { - s.OperationStartTime = &v - return s -} - -// SetOwnerInformation sets the OwnerInformation field's value. -func (s *InstancePatchState) SetOwnerInformation(v string) *InstancePatchState { - s.OwnerInformation = &v - return s -} - -// SetPatchGroup sets the PatchGroup field's value. -func (s *InstancePatchState) SetPatchGroup(v string) *InstancePatchState { - s.PatchGroup = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *InstancePatchState) SetSnapshotId(v string) *InstancePatchState { - s.SnapshotId = &v - return s -} - -// Defines a filter used in DescribeInstancePatchStatesForPatchGroup used to -// scope down the information returned by the API. -type InstancePatchStateFilter struct { - _ struct{} `type:"structure"` - - // The key for the filter. Supported values are FailedCount, InstalledCount, - // InstalledOtherCount, MissingCount and NotApplicableCount. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The type of comparison that should be performed for the value: Equal, NotEqual, - // LessThan or GreaterThan. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"InstancePatchStateOperatorType"` - - // The value for the filter, must be an integer greater than or equal to 0. - // - // Values is a required field - Values []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s InstancePatchStateFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstancePatchStateFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstancePatchStateFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstancePatchStateFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *InstancePatchStateFilter) SetKey(v string) *InstancePatchStateFilter { - s.Key = &v - return s -} - -// SetType sets the Type field's value. -func (s *InstancePatchStateFilter) SetType(v string) *InstancePatchStateFilter { - s.Type = &v - return s -} - -// SetValues sets the Values field's value. -func (s *InstancePatchStateFilter) SetValues(v []*string) *InstancePatchStateFilter { - s.Values = v - return s -} - -// Specifies the inventory type and attribute for the aggregation execution. -type InventoryAggregator struct { - _ struct{} `type:"structure"` - - // Nested aggregators to further refine aggregation for an inventory type. - Aggregators []*InventoryAggregator `min:"1" type:"list"` - - // The inventory type and attribute name for aggregation. - Expression *string `min:"1" type:"string"` - - // A user-defined set of one or more filters on which to aggregate inventory - // data. Groups return a count of resources that match and don't match the specified - // criteria. - Groups []*InventoryGroup `min:"1" type:"list"` -} - -// String returns the string representation -func (s InventoryAggregator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InventoryAggregator) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InventoryAggregator) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InventoryAggregator"} - if s.Aggregators != nil && len(s.Aggregators) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Aggregators", 1)) - } - if s.Expression != nil && len(*s.Expression) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Expression", 1)) - } - if s.Groups != nil && len(s.Groups) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Groups", 1)) - } - if s.Aggregators != nil { - for i, v := range s.Aggregators { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Aggregators", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Groups != nil { - for i, v := range s.Groups { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Groups", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAggregators sets the Aggregators field's value. -func (s *InventoryAggregator) SetAggregators(v []*InventoryAggregator) *InventoryAggregator { - s.Aggregators = v - return s -} - -// SetExpression sets the Expression field's value. -func (s *InventoryAggregator) SetExpression(v string) *InventoryAggregator { - s.Expression = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *InventoryAggregator) SetGroups(v []*InventoryGroup) *InventoryAggregator { - s.Groups = v - return s -} - -// Status information returned by the DeleteInventory action. -type InventoryDeletionStatusItem struct { - _ struct{} `type:"structure"` - - // The deletion ID returned by the DeleteInventory action. - DeletionId *string `type:"string"` - - // The UTC timestamp when the delete operation started. - DeletionStartTime *time.Time `type:"timestamp"` - - // Information about the delete operation. For more information about this summary, - // see Understanding the Delete Inventory Summary (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-delete.html#sysman-inventory-delete-summary) - // in the AWS Systems Manager User Guide. - DeletionSummary *InventoryDeletionSummary `type:"structure"` - - // The status of the operation. Possible values are InProgress and Complete. - LastStatus *string `type:"string" enum:"InventoryDeletionStatus"` - - // Information about the status. - LastStatusMessage *string `type:"string"` - - // The UTC timestamp of when the last status report. - LastStatusUpdateTime *time.Time `type:"timestamp"` - - // The name of the inventory data type. - TypeName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s InventoryDeletionStatusItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InventoryDeletionStatusItem) GoString() string { - return s.String() -} - -// SetDeletionId sets the DeletionId field's value. -func (s *InventoryDeletionStatusItem) SetDeletionId(v string) *InventoryDeletionStatusItem { - s.DeletionId = &v - return s -} - -// SetDeletionStartTime sets the DeletionStartTime field's value. -func (s *InventoryDeletionStatusItem) SetDeletionStartTime(v time.Time) *InventoryDeletionStatusItem { - s.DeletionStartTime = &v - return s -} - -// SetDeletionSummary sets the DeletionSummary field's value. -func (s *InventoryDeletionStatusItem) SetDeletionSummary(v *InventoryDeletionSummary) *InventoryDeletionStatusItem { - s.DeletionSummary = v - return s -} - -// SetLastStatus sets the LastStatus field's value. -func (s *InventoryDeletionStatusItem) SetLastStatus(v string) *InventoryDeletionStatusItem { - s.LastStatus = &v - return s -} - -// SetLastStatusMessage sets the LastStatusMessage field's value. -func (s *InventoryDeletionStatusItem) SetLastStatusMessage(v string) *InventoryDeletionStatusItem { - s.LastStatusMessage = &v - return s -} - -// SetLastStatusUpdateTime sets the LastStatusUpdateTime field's value. -func (s *InventoryDeletionStatusItem) SetLastStatusUpdateTime(v time.Time) *InventoryDeletionStatusItem { - s.LastStatusUpdateTime = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *InventoryDeletionStatusItem) SetTypeName(v string) *InventoryDeletionStatusItem { - s.TypeName = &v - return s -} - -// Information about the delete operation. -type InventoryDeletionSummary struct { - _ struct{} `type:"structure"` - - // Remaining number of items to delete. - RemainingCount *int64 `type:"integer"` - - // A list of counts and versions for deleted items. - SummaryItems []*InventoryDeletionSummaryItem `type:"list"` - - // The total number of items to delete. This count does not change during the - // delete operation. - TotalCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s InventoryDeletionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InventoryDeletionSummary) GoString() string { - return s.String() -} - -// SetRemainingCount sets the RemainingCount field's value. -func (s *InventoryDeletionSummary) SetRemainingCount(v int64) *InventoryDeletionSummary { - s.RemainingCount = &v - return s -} - -// SetSummaryItems sets the SummaryItems field's value. -func (s *InventoryDeletionSummary) SetSummaryItems(v []*InventoryDeletionSummaryItem) *InventoryDeletionSummary { - s.SummaryItems = v - return s -} - -// SetTotalCount sets the TotalCount field's value. -func (s *InventoryDeletionSummary) SetTotalCount(v int64) *InventoryDeletionSummary { - s.TotalCount = &v - return s -} - -// Either a count, remaining count, or a version number in a delete inventory -// summary. -type InventoryDeletionSummaryItem struct { - _ struct{} `type:"structure"` - - // A count of the number of deleted items. - Count *int64 `type:"integer"` - - // The remaining number of items to delete. - RemainingCount *int64 `type:"integer"` - - // The inventory type version. - Version *string `type:"string"` -} - -// String returns the string representation -func (s InventoryDeletionSummaryItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InventoryDeletionSummaryItem) GoString() string { - return s.String() -} - -// SetCount sets the Count field's value. -func (s *InventoryDeletionSummaryItem) SetCount(v int64) *InventoryDeletionSummaryItem { - s.Count = &v - return s -} - -// SetRemainingCount sets the RemainingCount field's value. -func (s *InventoryDeletionSummaryItem) SetRemainingCount(v int64) *InventoryDeletionSummaryItem { - s.RemainingCount = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *InventoryDeletionSummaryItem) SetVersion(v string) *InventoryDeletionSummaryItem { - s.Version = &v - return s -} - -// One or more filters. Use a filter to return a more specific list of results. -type InventoryFilter struct { - _ struct{} `type:"structure"` - - // The name of the filter key. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The type of filter. Valid values include the following: "Equal"|"NotEqual"|"BeginWith"|"LessThan"|"GreaterThan" - Type *string `type:"string" enum:"InventoryQueryOperatorType"` - - // Inventory filter values. Example: inventory filter where instance IDs are - // specified as values Key=AWS:InstanceInformation.InstanceId,Values= i-a12b3c4d5e6g, - // i-1a2b3c4d5e6,Type=Equal - // - // Values is a required field - Values []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s InventoryFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InventoryFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InventoryFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *InventoryFilter) SetKey(v string) *InventoryFilter { - s.Key = &v - return s -} - -// SetType sets the Type field's value. -func (s *InventoryFilter) SetType(v string) *InventoryFilter { - s.Type = &v - return s -} - -// SetValues sets the Values field's value. -func (s *InventoryFilter) SetValues(v []*string) *InventoryFilter { - s.Values = v - return s -} - -// A user-defined set of one or more filters on which to aggregate inventory -// data. Groups return a count of resources that match and don't match the specified -// criteria. -type InventoryGroup struct { - _ struct{} `type:"structure"` - - // Filters define the criteria for the group. The matchingCount field displays - // the number of resources that match the criteria. The notMatchingCount field - // displays the number of resources that don't match the criteria. - // - // Filters is a required field - Filters []*InventoryFilter `min:"1" type:"list" required:"true"` - - // The name of the group. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s InventoryGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InventoryGroup) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InventoryGroup) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InventoryGroup"} - if s.Filters == nil { - invalidParams.Add(request.NewErrParamRequired("Filters")) - } - if s.Filters != nil && len(s.Filters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *InventoryGroup) SetFilters(v []*InventoryFilter) *InventoryGroup { - s.Filters = v - return s -} - -// SetName sets the Name field's value. -func (s *InventoryGroup) SetName(v string) *InventoryGroup { - s.Name = &v - return s -} - -// Information collected from managed instances based on your inventory policy -// document -type InventoryItem struct { - _ struct{} `type:"structure"` - - // The time the inventory information was collected. - // - // CaptureTime is a required field - CaptureTime *string `type:"string" required:"true"` - - // The inventory data of the inventory type. - Content []map[string]*string `type:"list"` - - // MD5 hash of the inventory item type contents. The content hash is used to - // determine whether to update inventory information. The PutInventory API does - // not update the inventory item type contents if the MD5 hash has not changed - // since last update. - ContentHash *string `type:"string"` - - // A map of associated properties for a specified inventory type. For example, - // with this attribute, you can specify the ExecutionId, ExecutionType, ComplianceType - // properties of the AWS:ComplianceItem type. - Context map[string]*string `type:"map"` - - // The schema version for the inventory item. - // - // SchemaVersion is a required field - SchemaVersion *string `type:"string" required:"true"` - - // The name of the inventory type. Default inventory item type names start with - // AWS. Custom inventory type names will start with Custom. Default inventory - // item types include the following: AWS:AWSComponent, AWS:Application, AWS:InstanceInformation, - // AWS:Network, and AWS:WindowsUpdate. - // - // TypeName is a required field - TypeName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s InventoryItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InventoryItem) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InventoryItem) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InventoryItem"} - if s.CaptureTime == nil { - invalidParams.Add(request.NewErrParamRequired("CaptureTime")) - } - if s.SchemaVersion == nil { - invalidParams.Add(request.NewErrParamRequired("SchemaVersion")) - } - if s.TypeName == nil { - invalidParams.Add(request.NewErrParamRequired("TypeName")) - } - if s.TypeName != nil && len(*s.TypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCaptureTime sets the CaptureTime field's value. -func (s *InventoryItem) SetCaptureTime(v string) *InventoryItem { - s.CaptureTime = &v - return s -} - -// SetContent sets the Content field's value. -func (s *InventoryItem) SetContent(v []map[string]*string) *InventoryItem { - s.Content = v - return s -} - -// SetContentHash sets the ContentHash field's value. -func (s *InventoryItem) SetContentHash(v string) *InventoryItem { - s.ContentHash = &v - return s -} - -// SetContext sets the Context field's value. -func (s *InventoryItem) SetContext(v map[string]*string) *InventoryItem { - s.Context = v - return s -} - -// SetSchemaVersion sets the SchemaVersion field's value. -func (s *InventoryItem) SetSchemaVersion(v string) *InventoryItem { - s.SchemaVersion = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *InventoryItem) SetTypeName(v string) *InventoryItem { - s.TypeName = &v - return s -} - -// Attributes are the entries within the inventory item content. It contains -// name and value. -type InventoryItemAttribute struct { - _ struct{} `type:"structure"` - - // The data type of the inventory item attribute. - // - // DataType is a required field - DataType *string `type:"string" required:"true" enum:"InventoryAttributeDataType"` - - // Name of the inventory item attribute. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s InventoryItemAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InventoryItemAttribute) GoString() string { - return s.String() -} - -// SetDataType sets the DataType field's value. -func (s *InventoryItemAttribute) SetDataType(v string) *InventoryItemAttribute { - s.DataType = &v - return s -} - -// SetName sets the Name field's value. -func (s *InventoryItemAttribute) SetName(v string) *InventoryItemAttribute { - s.Name = &v - return s -} - -// The inventory item schema definition. Users can use this to compose inventory -// query filters. -type InventoryItemSchema struct { - _ struct{} `type:"structure"` - - // The schema attributes for inventory. This contains data type and attribute - // name. - // - // Attributes is a required field - Attributes []*InventoryItemAttribute `min:"1" type:"list" required:"true"` - - // The alias name of the inventory type. The alias name is used for display - // purposes. - DisplayName *string `type:"string"` - - // The name of the inventory type. Default inventory item type names start with - // AWS. Custom inventory type names will start with Custom. Default inventory - // item types include the following: AWS:AWSComponent, AWS:Application, AWS:InstanceInformation, - // AWS:Network, and AWS:WindowsUpdate. - // - // TypeName is a required field - TypeName *string `min:"1" type:"string" required:"true"` - - // The schema version for the inventory item. - Version *string `type:"string"` -} - -// String returns the string representation -func (s InventoryItemSchema) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InventoryItemSchema) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *InventoryItemSchema) SetAttributes(v []*InventoryItemAttribute) *InventoryItemSchema { - s.Attributes = v - return s -} - -// SetDisplayName sets the DisplayName field's value. -func (s *InventoryItemSchema) SetDisplayName(v string) *InventoryItemSchema { - s.DisplayName = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *InventoryItemSchema) SetTypeName(v string) *InventoryItemSchema { - s.TypeName = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *InventoryItemSchema) SetVersion(v string) *InventoryItemSchema { - s.Version = &v - return s -} - -// Inventory query results. -type InventoryResultEntity struct { - _ struct{} `type:"structure"` - - // The data section in the inventory result entity JSON. - Data map[string]*InventoryResultItem `type:"map"` - - // ID of the inventory result entity. For example, for managed instance inventory - // the result will be the managed instance ID. For EC2 instance inventory, the - // result will be the instance ID. - Id *string `type:"string"` -} - -// String returns the string representation -func (s InventoryResultEntity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InventoryResultEntity) GoString() string { - return s.String() -} - -// SetData sets the Data field's value. -func (s *InventoryResultEntity) SetData(v map[string]*InventoryResultItem) *InventoryResultEntity { - s.Data = v - return s -} - -// SetId sets the Id field's value. -func (s *InventoryResultEntity) SetId(v string) *InventoryResultEntity { - s.Id = &v - return s -} - -// The inventory result item. -type InventoryResultItem struct { - _ struct{} `type:"structure"` - - // The time inventory item data was captured. - CaptureTime *string `type:"string"` - - // Contains all the inventory data of the item type. Results include attribute - // names and values. - // - // Content is a required field - Content []map[string]*string `type:"list" required:"true"` - - // MD5 hash of the inventory item type contents. The content hash is used to - // determine whether to update inventory information. The PutInventory API does - // not update the inventory item type contents if the MD5 hash has not changed - // since last update. - ContentHash *string `type:"string"` - - // The schema version for the inventory result item/ - // - // SchemaVersion is a required field - SchemaVersion *string `type:"string" required:"true"` - - // The name of the inventory result item type. - // - // TypeName is a required field - TypeName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s InventoryResultItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InventoryResultItem) GoString() string { - return s.String() -} - -// SetCaptureTime sets the CaptureTime field's value. -func (s *InventoryResultItem) SetCaptureTime(v string) *InventoryResultItem { - s.CaptureTime = &v - return s -} - -// SetContent sets the Content field's value. -func (s *InventoryResultItem) SetContent(v []map[string]*string) *InventoryResultItem { - s.Content = v - return s -} - -// SetContentHash sets the ContentHash field's value. -func (s *InventoryResultItem) SetContentHash(v string) *InventoryResultItem { - s.ContentHash = &v - return s -} - -// SetSchemaVersion sets the SchemaVersion field's value. -func (s *InventoryResultItem) SetSchemaVersion(v string) *InventoryResultItem { - s.SchemaVersion = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *InventoryResultItem) SetTypeName(v string) *InventoryResultItem { - s.TypeName = &v - return s -} - -type LabelParameterVersionInput struct { - _ struct{} `type:"structure"` - - // One or more labels to attach to the specified parameter version. - // - // Labels is a required field - Labels []*string `min:"1" type:"list" required:"true"` - - // The parameter name on which you want to attach one or more labels. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The specific version of the parameter on which you want to attach one or - // more labels. If no version is specified, the system attaches the label to - // the latest version.) - ParameterVersion *int64 `type:"long"` -} - -// String returns the string representation -func (s LabelParameterVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelParameterVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LabelParameterVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LabelParameterVersionInput"} - if s.Labels == nil { - invalidParams.Add(request.NewErrParamRequired("Labels")) - } - if s.Labels != nil && len(s.Labels) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Labels", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLabels sets the Labels field's value. -func (s *LabelParameterVersionInput) SetLabels(v []*string) *LabelParameterVersionInput { - s.Labels = v - return s -} - -// SetName sets the Name field's value. -func (s *LabelParameterVersionInput) SetName(v string) *LabelParameterVersionInput { - s.Name = &v - return s -} - -// SetParameterVersion sets the ParameterVersion field's value. -func (s *LabelParameterVersionInput) SetParameterVersion(v int64) *LabelParameterVersionInput { - s.ParameterVersion = &v - return s -} - -type LabelParameterVersionOutput struct { - _ struct{} `type:"structure"` - - // The label does not meet the requirements. For information about parameter - // label requirements, see Labeling Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html) - // in the AWS Systems Manager User Guide. - InvalidLabels []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s LabelParameterVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LabelParameterVersionOutput) GoString() string { - return s.String() -} - -// SetInvalidLabels sets the InvalidLabels field's value. -func (s *LabelParameterVersionOutput) SetInvalidLabels(v []*string) *LabelParameterVersionOutput { - s.InvalidLabels = v - return s -} - -type ListAssociationVersionsInput struct { - _ struct{} `type:"structure"` - - // The association ID for which you want to view all versions. - // - // AssociationId is a required field - AssociationId *string `type:"string" required:"true"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // A token to start the list. Use this token to get the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAssociationVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAssociationVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAssociationVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAssociationVersionsInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationId sets the AssociationId field's value. -func (s *ListAssociationVersionsInput) SetAssociationId(v string) *ListAssociationVersionsInput { - s.AssociationId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAssociationVersionsInput) SetMaxResults(v int64) *ListAssociationVersionsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAssociationVersionsInput) SetNextToken(v string) *ListAssociationVersionsInput { - s.NextToken = &v - return s -} - -type ListAssociationVersionsOutput struct { - _ struct{} `type:"structure"` - - // Information about all versions of the association for the specified association - // ID. - AssociationVersions []*AssociationVersionInfo `min:"1" type:"list"` - - // The token for the next set of items to return. Use this token to get the - // next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAssociationVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAssociationVersionsOutput) GoString() string { - return s.String() -} - -// SetAssociationVersions sets the AssociationVersions field's value. -func (s *ListAssociationVersionsOutput) SetAssociationVersions(v []*AssociationVersionInfo) *ListAssociationVersionsOutput { - s.AssociationVersions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAssociationVersionsOutput) SetNextToken(v string) *ListAssociationVersionsOutput { - s.NextToken = &v - return s -} - -type ListAssociationsInput struct { - _ struct{} `type:"structure"` - - // One or more filters. Use a filter to return a more specific list of results. - AssociationFilterList []*AssociationFilter `min:"1" type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAssociationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAssociationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAssociationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAssociationsInput"} - if s.AssociationFilterList != nil && len(s.AssociationFilterList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssociationFilterList", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.AssociationFilterList != nil { - for i, v := range s.AssociationFilterList { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AssociationFilterList", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationFilterList sets the AssociationFilterList field's value. -func (s *ListAssociationsInput) SetAssociationFilterList(v []*AssociationFilter) *ListAssociationsInput { - s.AssociationFilterList = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAssociationsInput) SetMaxResults(v int64) *ListAssociationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAssociationsInput) SetNextToken(v string) *ListAssociationsInput { - s.NextToken = &v - return s -} - -type ListAssociationsOutput struct { - _ struct{} `type:"structure"` - - // The associations. - Associations []*Association `type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListAssociationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAssociationsOutput) GoString() string { - return s.String() -} - -// SetAssociations sets the Associations field's value. -func (s *ListAssociationsOutput) SetAssociations(v []*Association) *ListAssociationsOutput { - s.Associations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAssociationsOutput) SetNextToken(v string) *ListAssociationsOutput { - s.NextToken = &v - return s -} - -type ListCommandInvocationsInput struct { - _ struct{} `type:"structure"` - - // (Optional) The invocations for a specific command ID. - CommandId *string `min:"36" type:"string"` - - // (Optional) If set this returns the response of the command executions and - // any command output. By default this is set to False. - Details *bool `type:"boolean"` - - // (Optional) One or more filters. Use a filter to return a more specific list - // of results. - Filters []*CommandFilter `min:"1" type:"list"` - - // (Optional) The command execution details for a specific instance ID. - InstanceId *string `type:"string"` - - // (Optional) The maximum number of items to return for this call. The call - // also returns a token that you can specify in a subsequent call to get the - // next set of results. - MaxResults *int64 `min:"1" type:"integer"` - - // (Optional) The token for the next set of items to return. (You received this - // token from a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListCommandInvocationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCommandInvocationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListCommandInvocationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListCommandInvocationsInput"} - if s.CommandId != nil && len(*s.CommandId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("CommandId", 36)) - } - if s.Filters != nil && len(s.Filters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCommandId sets the CommandId field's value. -func (s *ListCommandInvocationsInput) SetCommandId(v string) *ListCommandInvocationsInput { - s.CommandId = &v - return s -} - -// SetDetails sets the Details field's value. -func (s *ListCommandInvocationsInput) SetDetails(v bool) *ListCommandInvocationsInput { - s.Details = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *ListCommandInvocationsInput) SetFilters(v []*CommandFilter) *ListCommandInvocationsInput { - s.Filters = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ListCommandInvocationsInput) SetInstanceId(v string) *ListCommandInvocationsInput { - s.InstanceId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListCommandInvocationsInput) SetMaxResults(v int64) *ListCommandInvocationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCommandInvocationsInput) SetNextToken(v string) *ListCommandInvocationsInput { - s.NextToken = &v - return s -} - -type ListCommandInvocationsOutput struct { - _ struct{} `type:"structure"` - - // (Optional) A list of all invocations. - CommandInvocations []*CommandInvocation `type:"list"` - - // (Optional) The token for the next set of items to return. (You received this - // token from a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListCommandInvocationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCommandInvocationsOutput) GoString() string { - return s.String() -} - -// SetCommandInvocations sets the CommandInvocations field's value. -func (s *ListCommandInvocationsOutput) SetCommandInvocations(v []*CommandInvocation) *ListCommandInvocationsOutput { - s.CommandInvocations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCommandInvocationsOutput) SetNextToken(v string) *ListCommandInvocationsOutput { - s.NextToken = &v - return s -} - -type ListCommandsInput struct { - _ struct{} `type:"structure"` - - // (Optional) If provided, lists only the specified command. - CommandId *string `min:"36" type:"string"` - - // (Optional) One or more filters. Use a filter to return a more specific list - // of results. - Filters []*CommandFilter `min:"1" type:"list"` - - // (Optional) Lists commands issued against this instance ID. - InstanceId *string `type:"string"` - - // (Optional) The maximum number of items to return for this call. The call - // also returns a token that you can specify in a subsequent call to get the - // next set of results. - MaxResults *int64 `min:"1" type:"integer"` - - // (Optional) The token for the next set of items to return. (You received this - // token from a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListCommandsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCommandsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListCommandsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListCommandsInput"} - if s.CommandId != nil && len(*s.CommandId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("CommandId", 36)) - } - if s.Filters != nil && len(s.Filters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCommandId sets the CommandId field's value. -func (s *ListCommandsInput) SetCommandId(v string) *ListCommandsInput { - s.CommandId = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *ListCommandsInput) SetFilters(v []*CommandFilter) *ListCommandsInput { - s.Filters = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ListCommandsInput) SetInstanceId(v string) *ListCommandsInput { - s.InstanceId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListCommandsInput) SetMaxResults(v int64) *ListCommandsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCommandsInput) SetNextToken(v string) *ListCommandsInput { - s.NextToken = &v - return s -} - -type ListCommandsOutput struct { - _ struct{} `type:"structure"` - - // (Optional) The list of commands requested by the user. - Commands []*Command `type:"list"` - - // (Optional) The token for the next set of items to return. (You received this - // token from a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListCommandsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListCommandsOutput) GoString() string { - return s.String() -} - -// SetCommands sets the Commands field's value. -func (s *ListCommandsOutput) SetCommands(v []*Command) *ListCommandsOutput { - s.Commands = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListCommandsOutput) SetNextToken(v string) *ListCommandsOutput { - s.NextToken = &v - return s -} - -type ListComplianceItemsInput struct { - _ struct{} `type:"structure"` - - // One or more compliance filters. Use a filter to return a more specific list - // of results. - Filters []*ComplianceStringFilter `type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // A token to start the list. Use this token to get the next set of results. - NextToken *string `type:"string"` - - // The ID for the resources from which to get compliance information. Currently, - // you can only specify one resource ID. - ResourceIds []*string `min:"1" type:"list"` - - // The type of resource from which to get compliance information. Currently, - // the only supported resource type is ManagedInstance. - ResourceTypes []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s ListComplianceItemsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListComplianceItemsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListComplianceItemsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListComplianceItemsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.ResourceIds != nil && len(s.ResourceIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceIds", 1)) - } - if s.ResourceTypes != nil && len(s.ResourceTypes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceTypes", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListComplianceItemsInput) SetFilters(v []*ComplianceStringFilter) *ListComplianceItemsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListComplianceItemsInput) SetMaxResults(v int64) *ListComplianceItemsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListComplianceItemsInput) SetNextToken(v string) *ListComplianceItemsInput { - s.NextToken = &v - return s -} - -// SetResourceIds sets the ResourceIds field's value. -func (s *ListComplianceItemsInput) SetResourceIds(v []*string) *ListComplianceItemsInput { - s.ResourceIds = v - return s -} - -// SetResourceTypes sets the ResourceTypes field's value. -func (s *ListComplianceItemsInput) SetResourceTypes(v []*string) *ListComplianceItemsInput { - s.ResourceTypes = v - return s -} - -type ListComplianceItemsOutput struct { - _ struct{} `type:"structure"` - - // A list of compliance information for the specified resource ID. - ComplianceItems []*ComplianceItem `type:"list"` - - // The token for the next set of items to return. Use this token to get the - // next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListComplianceItemsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListComplianceItemsOutput) GoString() string { - return s.String() -} - -// SetComplianceItems sets the ComplianceItems field's value. -func (s *ListComplianceItemsOutput) SetComplianceItems(v []*ComplianceItem) *ListComplianceItemsOutput { - s.ComplianceItems = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListComplianceItemsOutput) SetNextToken(v string) *ListComplianceItemsOutput { - s.NextToken = &v - return s -} - -type ListComplianceSummariesInput struct { - _ struct{} `type:"structure"` - - // One or more compliance or inventory filters. Use a filter to return a more - // specific list of results. - Filters []*ComplianceStringFilter `type:"list"` - - // The maximum number of items to return for this call. Currently, you can specify - // null or 50. The call also returns a token that you can specify in a subsequent - // call to get the next set of results. - MaxResults *int64 `min:"1" type:"integer"` - - // A token to start the list. Use this token to get the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListComplianceSummariesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListComplianceSummariesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListComplianceSummariesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListComplianceSummariesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListComplianceSummariesInput) SetFilters(v []*ComplianceStringFilter) *ListComplianceSummariesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListComplianceSummariesInput) SetMaxResults(v int64) *ListComplianceSummariesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListComplianceSummariesInput) SetNextToken(v string) *ListComplianceSummariesInput { - s.NextToken = &v - return s -} - -type ListComplianceSummariesOutput struct { - _ struct{} `type:"structure"` - - // A list of compliant and non-compliant summary counts based on compliance - // types. For example, this call returns State Manager associations, patches, - // or custom compliance types according to the filter criteria that you specified. - ComplianceSummaryItems []*ComplianceSummaryItem `type:"list"` - - // The token for the next set of items to return. Use this token to get the - // next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListComplianceSummariesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListComplianceSummariesOutput) GoString() string { - return s.String() -} - -// SetComplianceSummaryItems sets the ComplianceSummaryItems field's value. -func (s *ListComplianceSummariesOutput) SetComplianceSummaryItems(v []*ComplianceSummaryItem) *ListComplianceSummariesOutput { - s.ComplianceSummaryItems = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListComplianceSummariesOutput) SetNextToken(v string) *ListComplianceSummariesOutput { - s.NextToken = &v - return s -} - -type ListDocumentVersionsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // The name of the document about which you want version information. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListDocumentVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDocumentVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDocumentVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDocumentVersionsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListDocumentVersionsInput) SetMaxResults(v int64) *ListDocumentVersionsInput { - s.MaxResults = &v - return s -} - -// SetName sets the Name field's value. -func (s *ListDocumentVersionsInput) SetName(v string) *ListDocumentVersionsInput { - s.Name = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDocumentVersionsInput) SetNextToken(v string) *ListDocumentVersionsInput { - s.NextToken = &v - return s -} - -type ListDocumentVersionsOutput struct { - _ struct{} `type:"structure"` - - // The document versions. - DocumentVersions []*DocumentVersionInfo `min:"1" type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListDocumentVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDocumentVersionsOutput) GoString() string { - return s.String() -} - -// SetDocumentVersions sets the DocumentVersions field's value. -func (s *ListDocumentVersionsOutput) SetDocumentVersions(v []*DocumentVersionInfo) *ListDocumentVersionsOutput { - s.DocumentVersions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDocumentVersionsOutput) SetNextToken(v string) *ListDocumentVersionsOutput { - s.NextToken = &v - return s -} - -type ListDocumentsInput struct { - _ struct{} `type:"structure"` - - // One or more filters. Use a filter to return a more specific list of results. - DocumentFilterList []*DocumentFilter `min:"1" type:"list"` - - // One or more filters. Use a filter to return a more specific list of results. - Filters []*DocumentKeyValuesFilter `type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListDocumentsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDocumentsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDocumentsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDocumentsInput"} - if s.DocumentFilterList != nil && len(s.DocumentFilterList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DocumentFilterList", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.DocumentFilterList != nil { - for i, v := range s.DocumentFilterList { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DocumentFilterList", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDocumentFilterList sets the DocumentFilterList field's value. -func (s *ListDocumentsInput) SetDocumentFilterList(v []*DocumentFilter) *ListDocumentsInput { - s.DocumentFilterList = v - return s -} - -// SetFilters sets the Filters field's value. -func (s *ListDocumentsInput) SetFilters(v []*DocumentKeyValuesFilter) *ListDocumentsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListDocumentsInput) SetMaxResults(v int64) *ListDocumentsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDocumentsInput) SetNextToken(v string) *ListDocumentsInput { - s.NextToken = &v - return s -} - -type ListDocumentsOutput struct { - _ struct{} `type:"structure"` - - // The names of the Systems Manager documents. - DocumentIdentifiers []*DocumentIdentifier `type:"list"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListDocumentsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDocumentsOutput) GoString() string { - return s.String() -} - -// SetDocumentIdentifiers sets the DocumentIdentifiers field's value. -func (s *ListDocumentsOutput) SetDocumentIdentifiers(v []*DocumentIdentifier) *ListDocumentsOutput { - s.DocumentIdentifiers = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDocumentsOutput) SetNextToken(v string) *ListDocumentsOutput { - s.NextToken = &v - return s -} - -type ListInventoryEntriesInput struct { - _ struct{} `type:"structure"` - - // One or more filters. Use a filter to return a more specific list of results. - Filters []*InventoryFilter `min:"1" type:"list"` - - // The instance ID for which you want inventory information. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `type:"string"` - - // The type of inventory item for which you want information. - // - // TypeName is a required field - TypeName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListInventoryEntriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInventoryEntriesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInventoryEntriesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInventoryEntriesInput"} - if s.Filters != nil && len(s.Filters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.TypeName == nil { - invalidParams.Add(request.NewErrParamRequired("TypeName")) - } - if s.TypeName != nil && len(*s.TypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListInventoryEntriesInput) SetFilters(v []*InventoryFilter) *ListInventoryEntriesInput { - s.Filters = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ListInventoryEntriesInput) SetInstanceId(v string) *ListInventoryEntriesInput { - s.InstanceId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListInventoryEntriesInput) SetMaxResults(v int64) *ListInventoryEntriesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListInventoryEntriesInput) SetNextToken(v string) *ListInventoryEntriesInput { - s.NextToken = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *ListInventoryEntriesInput) SetTypeName(v string) *ListInventoryEntriesInput { - s.TypeName = &v - return s -} - -type ListInventoryEntriesOutput struct { - _ struct{} `type:"structure"` - - // The time that inventory information was collected for the instance(s). - CaptureTime *string `type:"string"` - - // A list of inventory items on the instance(s). - Entries []map[string]*string `type:"list"` - - // The instance ID targeted by the request to query inventory information. - InstanceId *string `type:"string"` - - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `type:"string"` - - // The inventory schema version used by the instance(s). - SchemaVersion *string `type:"string"` - - // The type of inventory item returned by the request. - TypeName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListInventoryEntriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListInventoryEntriesOutput) GoString() string { - return s.String() -} - -// SetCaptureTime sets the CaptureTime field's value. -func (s *ListInventoryEntriesOutput) SetCaptureTime(v string) *ListInventoryEntriesOutput { - s.CaptureTime = &v - return s -} - -// SetEntries sets the Entries field's value. -func (s *ListInventoryEntriesOutput) SetEntries(v []map[string]*string) *ListInventoryEntriesOutput { - s.Entries = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *ListInventoryEntriesOutput) SetInstanceId(v string) *ListInventoryEntriesOutput { - s.InstanceId = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListInventoryEntriesOutput) SetNextToken(v string) *ListInventoryEntriesOutput { - s.NextToken = &v - return s -} - -// SetSchemaVersion sets the SchemaVersion field's value. -func (s *ListInventoryEntriesOutput) SetSchemaVersion(v string) *ListInventoryEntriesOutput { - s.SchemaVersion = &v - return s -} - -// SetTypeName sets the TypeName field's value. -func (s *ListInventoryEntriesOutput) SetTypeName(v string) *ListInventoryEntriesOutput { - s.TypeName = &v - return s -} - -type ListResourceComplianceSummariesInput struct { - _ struct{} `type:"structure"` - - // One or more filters. Use a filter to return a more specific list of results. - Filters []*ComplianceStringFilter `type:"list"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // A token to start the list. Use this token to get the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListResourceComplianceSummariesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourceComplianceSummariesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResourceComplianceSummariesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResourceComplianceSummariesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Filters != nil { - for i, v := range s.Filters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilters sets the Filters field's value. -func (s *ListResourceComplianceSummariesInput) SetFilters(v []*ComplianceStringFilter) *ListResourceComplianceSummariesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListResourceComplianceSummariesInput) SetMaxResults(v int64) *ListResourceComplianceSummariesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResourceComplianceSummariesInput) SetNextToken(v string) *ListResourceComplianceSummariesInput { - s.NextToken = &v - return s -} - -type ListResourceComplianceSummariesOutput struct { - _ struct{} `type:"structure"` - - // The token for the next set of items to return. Use this token to get the - // next set of results. - NextToken *string `type:"string"` - - // A summary count for specified or targeted managed instances. Summary count - // includes information about compliant and non-compliant State Manager associations, - // patch status, or custom items according to the filter criteria that you specify. - ResourceComplianceSummaryItems []*ResourceComplianceSummaryItem `type:"list"` -} - -// String returns the string representation -func (s ListResourceComplianceSummariesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourceComplianceSummariesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResourceComplianceSummariesOutput) SetNextToken(v string) *ListResourceComplianceSummariesOutput { - s.NextToken = &v - return s -} - -// SetResourceComplianceSummaryItems sets the ResourceComplianceSummaryItems field's value. -func (s *ListResourceComplianceSummariesOutput) SetResourceComplianceSummaryItems(v []*ResourceComplianceSummaryItem) *ListResourceComplianceSummariesOutput { - s.ResourceComplianceSummaryItems = v - return s -} - -type ListResourceDataSyncInput struct { - _ struct{} `type:"structure"` - - // The maximum number of items to return for this call. The call also returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"1" type:"integer"` - - // A token to start the list. Use this token to get the next set of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s ListResourceDataSyncInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourceDataSyncInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResourceDataSyncInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResourceDataSyncInput"} - 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 *ListResourceDataSyncInput) SetMaxResults(v int64) *ListResourceDataSyncInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResourceDataSyncInput) SetNextToken(v string) *ListResourceDataSyncInput { - s.NextToken = &v - return s -} - -type ListResourceDataSyncOutput struct { - _ struct{} `type:"structure"` - - // The token for the next set of items to return. Use this token to get the - // next set of results. - NextToken *string `type:"string"` - - // A list of your current Resource Data Sync configurations and their statuses. - ResourceDataSyncItems []*ResourceDataSyncItem `type:"list"` -} - -// String returns the string representation -func (s ListResourceDataSyncOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourceDataSyncOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListResourceDataSyncOutput) SetNextToken(v string) *ListResourceDataSyncOutput { - s.NextToken = &v - return s -} - -// SetResourceDataSyncItems sets the ResourceDataSyncItems field's value. -func (s *ListResourceDataSyncOutput) SetResourceDataSyncItems(v []*ResourceDataSyncItem) *ListResourceDataSyncOutput { - s.ResourceDataSyncItems = v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // The resource ID for which you want to see a list of tags. - // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` - - // Returns a list of tags for a specific resource type. - // - // ResourceType is a required field - ResourceType *string `type:"string" required:"true" enum:"ResourceTypeForTagging"` -} - -// 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.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *ListTagsForResourceInput) SetResourceId(v string) *ListTagsForResourceInput { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ListTagsForResourceInput) SetResourceType(v string) *ListTagsForResourceInput { - s.ResourceType = &v - return s -} - -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // A list of tags. - TagList []*Tag `type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetTagList sets the TagList field's value. -func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOutput { - s.TagList = v - return s -} - -// Information about an Amazon S3 bucket to write instance-level logs to. -// -// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, -// instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters -// structure. For information about how Systems Manager handles these options -// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. -type LoggingInfo struct { - _ struct{} `type:"structure"` - - // The name of an Amazon S3 bucket where execution logs are stored . - // - // S3BucketName is a required field - S3BucketName *string `min:"3" type:"string" required:"true"` - - // (Optional) The Amazon S3 bucket subfolder. - S3KeyPrefix *string `type:"string"` - - // The region where the Amazon S3 bucket is located. - // - // S3Region is a required field - S3Region *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation -func (s LoggingInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoggingInfo) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LoggingInfo) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LoggingInfo"} - if s.S3BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("S3BucketName")) - } - if s.S3BucketName != nil && len(*s.S3BucketName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("S3BucketName", 3)) - } - if s.S3Region == nil { - invalidParams.Add(request.NewErrParamRequired("S3Region")) - } - if s.S3Region != nil && len(*s.S3Region) < 3 { - invalidParams.Add(request.NewErrParamMinLen("S3Region", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3BucketName sets the S3BucketName field's value. -func (s *LoggingInfo) SetS3BucketName(v string) *LoggingInfo { - s.S3BucketName = &v - return s -} - -// SetS3KeyPrefix sets the S3KeyPrefix field's value. -func (s *LoggingInfo) SetS3KeyPrefix(v string) *LoggingInfo { - s.S3KeyPrefix = &v - return s -} - -// SetS3Region sets the S3Region field's value. -func (s *LoggingInfo) SetS3Region(v string) *LoggingInfo { - s.S3Region = &v - return s -} - -// The parameters for an AUTOMATION task type. -type MaintenanceWindowAutomationParameters struct { - _ struct{} `type:"structure"` - - // The version of an Automation document to use during task execution. - DocumentVersion *string `type:"string"` - - // The parameters for the AUTOMATION task. - // - // For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow - // and UpdateMaintenanceWindowTask. - // - // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, - // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters - // structure. For information about how Systems Manager handles these options - // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - // - // TaskParameters has been deprecated. To specify parameters to pass to a task - // when it runs, instead use the Parameters option in the TaskInvocationParameters - // structure. For information about how Systems Manager handles these options - // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - // - // For AUTOMATION task types, Systems Manager ignores any values specified for - // these parameters. - Parameters map[string][]*string `min:"1" type:"map"` -} - -// String returns the string representation -func (s MaintenanceWindowAutomationParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceWindowAutomationParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MaintenanceWindowAutomationParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MaintenanceWindowAutomationParameters"} - if s.Parameters != nil && len(s.Parameters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Parameters", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *MaintenanceWindowAutomationParameters) SetDocumentVersion(v string) *MaintenanceWindowAutomationParameters { - s.DocumentVersion = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *MaintenanceWindowAutomationParameters) SetParameters(v map[string][]*string) *MaintenanceWindowAutomationParameters { - s.Parameters = v - return s -} - -// Describes the information about an execution of a Maintenance Window. -type MaintenanceWindowExecution struct { - _ struct{} `type:"structure"` - - // The time the execution finished. - EndTime *time.Time `type:"timestamp"` - - // The time the execution started. - StartTime *time.Time `type:"timestamp"` - - // The status of the execution. - Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` - - // The details explaining the Status. Only available for certain status values. - StatusDetails *string `type:"string"` - - // The ID of the Maintenance Window execution. - WindowExecutionId *string `min:"36" type:"string"` - - // The ID of the Maintenance Window. - WindowId *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s MaintenanceWindowExecution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceWindowExecution) GoString() string { - return s.String() -} - -// SetEndTime sets the EndTime field's value. -func (s *MaintenanceWindowExecution) SetEndTime(v time.Time) *MaintenanceWindowExecution { - s.EndTime = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *MaintenanceWindowExecution) SetStartTime(v time.Time) *MaintenanceWindowExecution { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *MaintenanceWindowExecution) SetStatus(v string) *MaintenanceWindowExecution { - s.Status = &v - return s -} - -// SetStatusDetails sets the StatusDetails field's value. -func (s *MaintenanceWindowExecution) SetStatusDetails(v string) *MaintenanceWindowExecution { - s.StatusDetails = &v - return s -} - -// SetWindowExecutionId sets the WindowExecutionId field's value. -func (s *MaintenanceWindowExecution) SetWindowExecutionId(v string) *MaintenanceWindowExecution { - s.WindowExecutionId = &v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *MaintenanceWindowExecution) SetWindowId(v string) *MaintenanceWindowExecution { - s.WindowId = &v - return s -} - -// Information about a task execution performed as part of a Maintenance Window -// execution. -type MaintenanceWindowExecutionTaskIdentity struct { - _ struct{} `type:"structure"` - - // The time the task execution finished. - EndTime *time.Time `type:"timestamp"` - - // The time the task execution started. - StartTime *time.Time `type:"timestamp"` - - // The status of the task execution. - Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` - - // The details explaining the status of the task execution. Only available for - // certain status values. - StatusDetails *string `type:"string"` - - // The ARN of the executed task. - TaskArn *string `min:"1" type:"string"` - - // The ID of the specific task execution in the Maintenance Window execution. - TaskExecutionId *string `min:"36" type:"string"` - - // The type of executed task. - TaskType *string `type:"string" enum:"MaintenanceWindowTaskType"` - - // The ID of the Maintenance Window execution that ran the task. - WindowExecutionId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s MaintenanceWindowExecutionTaskIdentity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceWindowExecutionTaskIdentity) GoString() string { - return s.String() -} - -// SetEndTime sets the EndTime field's value. -func (s *MaintenanceWindowExecutionTaskIdentity) SetEndTime(v time.Time) *MaintenanceWindowExecutionTaskIdentity { - s.EndTime = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *MaintenanceWindowExecutionTaskIdentity) SetStartTime(v time.Time) *MaintenanceWindowExecutionTaskIdentity { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *MaintenanceWindowExecutionTaskIdentity) SetStatus(v string) *MaintenanceWindowExecutionTaskIdentity { - s.Status = &v - return s -} - -// SetStatusDetails sets the StatusDetails field's value. -func (s *MaintenanceWindowExecutionTaskIdentity) SetStatusDetails(v string) *MaintenanceWindowExecutionTaskIdentity { - s.StatusDetails = &v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *MaintenanceWindowExecutionTaskIdentity) SetTaskArn(v string) *MaintenanceWindowExecutionTaskIdentity { - s.TaskArn = &v - return s -} - -// SetTaskExecutionId sets the TaskExecutionId field's value. -func (s *MaintenanceWindowExecutionTaskIdentity) SetTaskExecutionId(v string) *MaintenanceWindowExecutionTaskIdentity { - s.TaskExecutionId = &v - return s -} - -// SetTaskType sets the TaskType field's value. -func (s *MaintenanceWindowExecutionTaskIdentity) SetTaskType(v string) *MaintenanceWindowExecutionTaskIdentity { - s.TaskType = &v - return s -} - -// SetWindowExecutionId sets the WindowExecutionId field's value. -func (s *MaintenanceWindowExecutionTaskIdentity) SetWindowExecutionId(v string) *MaintenanceWindowExecutionTaskIdentity { - s.WindowExecutionId = &v - return s -} - -// Describes the information about a task invocation for a particular target -// as part of a task execution performed as part of a Maintenance Window execution. -type MaintenanceWindowExecutionTaskInvocationIdentity struct { - _ struct{} `type:"structure"` - - // The time the invocation finished. - EndTime *time.Time `type:"timestamp"` - - // The ID of the action performed in the service that actually handled the task - // invocation. If the task type is RUN_COMMAND, this value is the command ID. - ExecutionId *string `type:"string"` - - // The ID of the task invocation. - InvocationId *string `min:"36" type:"string"` - - // User-provided value that was specified when the target was registered with - // the Maintenance Window. This was also included in any CloudWatch events raised - // during the task invocation. - OwnerInformation *string `min:"1" type:"string" sensitive:"true"` - - // The parameters that were provided for the invocation when it was executed. - Parameters *string `type:"string" sensitive:"true"` - - // The time the invocation started. - StartTime *time.Time `type:"timestamp"` - - // The status of the task invocation. - Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` - - // The details explaining the status of the task invocation. Only available - // for certain Status values. - StatusDetails *string `type:"string"` - - // The ID of the specific task execution in the Maintenance Window execution. - TaskExecutionId *string `min:"36" type:"string"` - - // The task type. - TaskType *string `type:"string" enum:"MaintenanceWindowTaskType"` - - // The ID of the Maintenance Window execution that ran the task. - WindowExecutionId *string `min:"36" type:"string"` - - // The ID of the target definition in this Maintenance Window the invocation - // was performed for. - WindowTargetId *string `type:"string"` -} - -// String returns the string representation -func (s MaintenanceWindowExecutionTaskInvocationIdentity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceWindowExecutionTaskInvocationIdentity) GoString() string { - return s.String() -} - -// SetEndTime sets the EndTime field's value. -func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetEndTime(v time.Time) *MaintenanceWindowExecutionTaskInvocationIdentity { - s.EndTime = &v - return s -} - -// SetExecutionId sets the ExecutionId field's value. -func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetExecutionId(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { - s.ExecutionId = &v - return s -} - -// SetInvocationId sets the InvocationId field's value. -func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetInvocationId(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { - s.InvocationId = &v - return s -} - -// SetOwnerInformation sets the OwnerInformation field's value. -func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetOwnerInformation(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { - s.OwnerInformation = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetParameters(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { - s.Parameters = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetStartTime(v time.Time) *MaintenanceWindowExecutionTaskInvocationIdentity { - s.StartTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetStatus(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { - s.Status = &v - return s -} - -// SetStatusDetails sets the StatusDetails field's value. -func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetStatusDetails(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { - s.StatusDetails = &v - return s -} - -// SetTaskExecutionId sets the TaskExecutionId field's value. -func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetTaskExecutionId(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { - s.TaskExecutionId = &v - return s -} - -// SetTaskType sets the TaskType field's value. -func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetTaskType(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { - s.TaskType = &v - return s -} - -// SetWindowExecutionId sets the WindowExecutionId field's value. -func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetWindowExecutionId(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { - s.WindowExecutionId = &v - return s -} - -// SetWindowTargetId sets the WindowTargetId field's value. -func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetWindowTargetId(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { - s.WindowTargetId = &v - return s -} - -// Filter used in the request. Supported filter keys are Name and Enabled. -type MaintenanceWindowFilter struct { - _ struct{} `type:"structure"` - - // The name of the filter. - Key *string `min:"1" type:"string"` - - // The filter values. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s MaintenanceWindowFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceWindowFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MaintenanceWindowFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MaintenanceWindowFilter"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *MaintenanceWindowFilter) SetKey(v string) *MaintenanceWindowFilter { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *MaintenanceWindowFilter) SetValues(v []*string) *MaintenanceWindowFilter { - s.Values = v - return s -} - -// Information about the Maintenance Window. -type MaintenanceWindowIdentity struct { - _ struct{} `type:"structure"` - - // The number of hours before the end of the Maintenance Window that Systems - // Manager stops scheduling new tasks for execution. - Cutoff *int64 `type:"integer"` - - // A description of the Maintenance Window. - Description *string `min:"1" type:"string" sensitive:"true"` - - // The duration of the Maintenance Window in hours. - Duration *int64 `min:"1" type:"integer"` - - // Whether the Maintenance Window is enabled. - Enabled *bool `type:"boolean"` - - // The date and time, in ISO-8601 Extended format, for when the Maintenance - // Window is scheduled to become inactive. - EndDate *string `type:"string"` - - // The name of the Maintenance Window. - Name *string `min:"3" type:"string"` - - // The next time the Maintenance Window will actually run, taking into account - // any specified times for the Maintenance Window to become active or inactive. - NextExecutionTime *string `type:"string"` - - // The schedule of the Maintenance Window in the form of a cron or rate expression. - Schedule *string `min:"1" type:"string"` - - // The time zone that the scheduled Maintenance Window executions are based - // on, in Internet Assigned Numbers Authority (IANA) format. - ScheduleTimezone *string `type:"string"` - - // The date and time, in ISO-8601 Extended format, for when the Maintenance - // Window is scheduled to become active. - StartDate *string `type:"string"` - - // The ID of the Maintenance Window. - WindowId *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s MaintenanceWindowIdentity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceWindowIdentity) GoString() string { - return s.String() -} - -// SetCutoff sets the Cutoff field's value. -func (s *MaintenanceWindowIdentity) SetCutoff(v int64) *MaintenanceWindowIdentity { - s.Cutoff = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *MaintenanceWindowIdentity) SetDescription(v string) *MaintenanceWindowIdentity { - s.Description = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *MaintenanceWindowIdentity) SetDuration(v int64) *MaintenanceWindowIdentity { - s.Duration = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *MaintenanceWindowIdentity) SetEnabled(v bool) *MaintenanceWindowIdentity { - s.Enabled = &v - return s -} - -// SetEndDate sets the EndDate field's value. -func (s *MaintenanceWindowIdentity) SetEndDate(v string) *MaintenanceWindowIdentity { - s.EndDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *MaintenanceWindowIdentity) SetName(v string) *MaintenanceWindowIdentity { - s.Name = &v - return s -} - -// SetNextExecutionTime sets the NextExecutionTime field's value. -func (s *MaintenanceWindowIdentity) SetNextExecutionTime(v string) *MaintenanceWindowIdentity { - s.NextExecutionTime = &v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *MaintenanceWindowIdentity) SetSchedule(v string) *MaintenanceWindowIdentity { - s.Schedule = &v - return s -} - -// SetScheduleTimezone sets the ScheduleTimezone field's value. -func (s *MaintenanceWindowIdentity) SetScheduleTimezone(v string) *MaintenanceWindowIdentity { - s.ScheduleTimezone = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *MaintenanceWindowIdentity) SetStartDate(v string) *MaintenanceWindowIdentity { - s.StartDate = &v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *MaintenanceWindowIdentity) SetWindowId(v string) *MaintenanceWindowIdentity { - s.WindowId = &v - return s -} - -// The Maintenance Window to which the specified target belongs. -type MaintenanceWindowIdentityForTarget struct { - _ struct{} `type:"structure"` - - // The name of the Maintenance Window. - Name *string `min:"3" type:"string"` - - // The ID of the Maintenance Window. - WindowId *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s MaintenanceWindowIdentityForTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceWindowIdentityForTarget) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *MaintenanceWindowIdentityForTarget) SetName(v string) *MaintenanceWindowIdentityForTarget { - s.Name = &v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *MaintenanceWindowIdentityForTarget) SetWindowId(v string) *MaintenanceWindowIdentityForTarget { - s.WindowId = &v - return s -} - -// The parameters for a LAMBDA task type. -// -// For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow -// and UpdateMaintenanceWindowTask. -// -// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, -// instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters -// structure. For information about how Systems Manager handles these options -// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. -// -// TaskParameters has been deprecated. To specify parameters to pass to a task -// when it runs, instead use the Parameters option in the TaskInvocationParameters -// structure. For information about how Systems Manager handles these options -// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. -// -// For Lambda tasks, Systems Manager ignores any values specified for TaskParameters -// and LoggingInfo. -type MaintenanceWindowLambdaParameters struct { - _ struct{} `type:"structure"` - - // Pass client-specific information to the Lambda function that you are invoking. - // You can then process the client information in your Lambda function as you - // choose through the context variable. - ClientContext *string `min:"1" type:"string"` - - // JSON to provide to your Lambda function as input. - // - // Payload is automatically base64 encoded/decoded by the SDK. - Payload []byte `type:"blob" sensitive:"true"` - - // (Optional) Specify a Lambda function version or alias name. If you specify - // a function version, the action uses the qualified function ARN to invoke - // a specific Lambda function. If you specify an alias name, the action uses - // the alias ARN to invoke the Lambda function version to which the alias points. - Qualifier *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s MaintenanceWindowLambdaParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceWindowLambdaParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MaintenanceWindowLambdaParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MaintenanceWindowLambdaParameters"} - if s.ClientContext != nil && len(*s.ClientContext) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientContext", 1)) - } - if s.Qualifier != nil && len(*s.Qualifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientContext sets the ClientContext field's value. -func (s *MaintenanceWindowLambdaParameters) SetClientContext(v string) *MaintenanceWindowLambdaParameters { - s.ClientContext = &v - return s -} - -// SetPayload sets the Payload field's value. -func (s *MaintenanceWindowLambdaParameters) SetPayload(v []byte) *MaintenanceWindowLambdaParameters { - s.Payload = v - return s -} - -// SetQualifier sets the Qualifier field's value. -func (s *MaintenanceWindowLambdaParameters) SetQualifier(v string) *MaintenanceWindowLambdaParameters { - s.Qualifier = &v - return s -} - -// The parameters for a RUN_COMMAND task type. -// -// For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow -// and UpdateMaintenanceWindowTask. -// -// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, -// instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters -// structure. For information about how Systems Manager handles these options -// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. -// -// TaskParameters has been deprecated. To specify parameters to pass to a task -// when it runs, instead use the Parameters option in the TaskInvocationParameters -// structure. For information about how Systems Manager handles these options -// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. -// -// For Run Command tasks, Systems Manager uses specified values for TaskParameters -// and LoggingInfo only if no values are specified for TaskInvocationParameters. -type MaintenanceWindowRunCommandParameters struct { - _ struct{} `type:"structure"` - - // Information about the command(s) to execute. - Comment *string `type:"string"` - - // The SHA-256 or SHA-1 hash created by the system when the document was created. - // SHA-1 hashes have been deprecated. - DocumentHash *string `type:"string"` - - // SHA-256 or SHA-1. SHA-1 hashes have been deprecated. - DocumentHashType *string `type:"string" enum:"DocumentHashType"` - - // Configurations for sending notifications about command status changes on - // a per-instance basis. - NotificationConfig *NotificationConfig `type:"structure"` - - // The name of the Amazon S3 bucket. - OutputS3BucketName *string `min:"3" type:"string"` - - // The Amazon S3 bucket subfolder. - OutputS3KeyPrefix *string `type:"string"` - - // The parameters for the RUN_COMMAND task execution. - Parameters map[string][]*string `type:"map"` - - // The IAM service role to assume during task execution. - ServiceRoleArn *string `type:"string"` - - // If this time is reached and the command has not already started executing, - // it doesn't run. - TimeoutSeconds *int64 `min:"30" type:"integer"` -} - -// String returns the string representation -func (s MaintenanceWindowRunCommandParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceWindowRunCommandParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MaintenanceWindowRunCommandParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MaintenanceWindowRunCommandParameters"} - if s.OutputS3BucketName != nil && len(*s.OutputS3BucketName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("OutputS3BucketName", 3)) - } - if s.TimeoutSeconds != nil && *s.TimeoutSeconds < 30 { - invalidParams.Add(request.NewErrParamMinValue("TimeoutSeconds", 30)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *MaintenanceWindowRunCommandParameters) SetComment(v string) *MaintenanceWindowRunCommandParameters { - s.Comment = &v - return s -} - -// SetDocumentHash sets the DocumentHash field's value. -func (s *MaintenanceWindowRunCommandParameters) SetDocumentHash(v string) *MaintenanceWindowRunCommandParameters { - s.DocumentHash = &v - return s -} - -// SetDocumentHashType sets the DocumentHashType field's value. -func (s *MaintenanceWindowRunCommandParameters) SetDocumentHashType(v string) *MaintenanceWindowRunCommandParameters { - s.DocumentHashType = &v - return s -} - -// SetNotificationConfig sets the NotificationConfig field's value. -func (s *MaintenanceWindowRunCommandParameters) SetNotificationConfig(v *NotificationConfig) *MaintenanceWindowRunCommandParameters { - s.NotificationConfig = v - return s -} - -// SetOutputS3BucketName sets the OutputS3BucketName field's value. -func (s *MaintenanceWindowRunCommandParameters) SetOutputS3BucketName(v string) *MaintenanceWindowRunCommandParameters { - s.OutputS3BucketName = &v - return s -} - -// SetOutputS3KeyPrefix sets the OutputS3KeyPrefix field's value. -func (s *MaintenanceWindowRunCommandParameters) SetOutputS3KeyPrefix(v string) *MaintenanceWindowRunCommandParameters { - s.OutputS3KeyPrefix = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *MaintenanceWindowRunCommandParameters) SetParameters(v map[string][]*string) *MaintenanceWindowRunCommandParameters { - s.Parameters = v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *MaintenanceWindowRunCommandParameters) SetServiceRoleArn(v string) *MaintenanceWindowRunCommandParameters { - s.ServiceRoleArn = &v - return s -} - -// SetTimeoutSeconds sets the TimeoutSeconds field's value. -func (s *MaintenanceWindowRunCommandParameters) SetTimeoutSeconds(v int64) *MaintenanceWindowRunCommandParameters { - s.TimeoutSeconds = &v - return s -} - -// The parameters for a STEP_FUNCTION task. -// -// For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow -// and UpdateMaintenanceWindowTask. -// -// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, -// instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters -// structure. For information about how Systems Manager handles these options -// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. -// -// TaskParameters has been deprecated. To specify parameters to pass to a task -// when it runs, instead use the Parameters option in the TaskInvocationParameters -// structure. For information about how Systems Manager handles these options -// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. -// -// For Step Functions tasks, Systems Manager ignores any values specified for -// TaskParameters and LoggingInfo. -type MaintenanceWindowStepFunctionsParameters struct { - _ struct{} `type:"structure"` - - // The inputs for the STEP_FUNCTION task. - Input *string `type:"string" sensitive:"true"` - - // The name of the STEP_FUNCTION task. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s MaintenanceWindowStepFunctionsParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceWindowStepFunctionsParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MaintenanceWindowStepFunctionsParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MaintenanceWindowStepFunctionsParameters"} - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInput sets the Input field's value. -func (s *MaintenanceWindowStepFunctionsParameters) SetInput(v string) *MaintenanceWindowStepFunctionsParameters { - s.Input = &v - return s -} - -// SetName sets the Name field's value. -func (s *MaintenanceWindowStepFunctionsParameters) SetName(v string) *MaintenanceWindowStepFunctionsParameters { - s.Name = &v - return s -} - -// The target registered with the Maintenance Window. -type MaintenanceWindowTarget struct { - _ struct{} `type:"structure"` - - // A description of the target. - Description *string `min:"1" type:"string" sensitive:"true"` - - // The target name. - Name *string `min:"3" type:"string"` - - // User-provided value that will be included in any CloudWatch events raised - // while running tasks for these targets in this Maintenance Window. - OwnerInformation *string `min:"1" type:"string" sensitive:"true"` - - // The type of target. - ResourceType *string `type:"string" enum:"MaintenanceWindowResourceType"` - - // The targets (either instances or tags). Instances are specified using Key=instanceids,Values=,. - // Tags are specified using Key=,Values=. - Targets []*Target `type:"list"` - - // The Maintenance Window ID where the target is registered. - WindowId *string `min:"20" type:"string"` - - // The ID of the target. - WindowTargetId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s MaintenanceWindowTarget) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceWindowTarget) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *MaintenanceWindowTarget) SetDescription(v string) *MaintenanceWindowTarget { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *MaintenanceWindowTarget) SetName(v string) *MaintenanceWindowTarget { - s.Name = &v - return s -} - -// SetOwnerInformation sets the OwnerInformation field's value. -func (s *MaintenanceWindowTarget) SetOwnerInformation(v string) *MaintenanceWindowTarget { - s.OwnerInformation = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *MaintenanceWindowTarget) SetResourceType(v string) *MaintenanceWindowTarget { - s.ResourceType = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *MaintenanceWindowTarget) SetTargets(v []*Target) *MaintenanceWindowTarget { - s.Targets = v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *MaintenanceWindowTarget) SetWindowId(v string) *MaintenanceWindowTarget { - s.WindowId = &v - return s -} - -// SetWindowTargetId sets the WindowTargetId field's value. -func (s *MaintenanceWindowTarget) SetWindowTargetId(v string) *MaintenanceWindowTarget { - s.WindowTargetId = &v - return s -} - -// Information about a task defined for a Maintenance Window. -type MaintenanceWindowTask struct { - _ struct{} `type:"structure"` - - // A description of the task. - Description *string `min:"1" type:"string" sensitive:"true"` - - // Information about an Amazon S3 bucket to write task-level logs to. - // - // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, - // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters - // structure. For information about how Systems Manager handles these options - // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - LoggingInfo *LoggingInfo `type:"structure"` - - // The maximum number of targets this task can be run for in parallel. - MaxConcurrency *string `min:"1" type:"string"` - - // The maximum number of errors allowed before this task stops being scheduled. - MaxErrors *string `min:"1" type:"string"` - - // The task name. - Name *string `min:"3" type:"string"` - - // The priority of the task in the Maintenance Window. The lower the number, - // the higher the priority. Tasks that have the same priority are scheduled - // in parallel. - Priority *int64 `type:"integer"` - - // The role that should be assumed when executing the task - ServiceRoleArn *string `type:"string"` - - // The targets (either instances or tags). Instances are specified using Key=instanceids,Values=,. - // Tags are specified using Key=,Values=. - Targets []*Target `type:"list"` - - // The resource that the task uses during execution. For RUN_COMMAND and AUTOMATION - // task types, TaskArn is the Systems Manager document name or ARN. For LAMBDA - // tasks, it's the function name or ARN. For STEP_FUNCTION tasks, it's the state - // machine ARN. - TaskArn *string `min:"1" type:"string"` - - // The parameters that should be passed to the task when it is executed. - // - // TaskParameters has been deprecated. To specify parameters to pass to a task - // when it runs, instead use the Parameters option in the TaskInvocationParameters - // structure. For information about how Systems Manager handles these options - // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` - - // The type of task. The type can be one of the following: RUN_COMMAND, AUTOMATION, - // LAMBDA, or STEP_FUNCTION. - Type *string `type:"string" enum:"MaintenanceWindowTaskType"` - - // The Maintenance Window ID where the task is registered. - WindowId *string `min:"20" type:"string"` - - // The task ID. - WindowTaskId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s MaintenanceWindowTask) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceWindowTask) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *MaintenanceWindowTask) SetDescription(v string) *MaintenanceWindowTask { - s.Description = &v - return s -} - -// SetLoggingInfo sets the LoggingInfo field's value. -func (s *MaintenanceWindowTask) SetLoggingInfo(v *LoggingInfo) *MaintenanceWindowTask { - s.LoggingInfo = v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *MaintenanceWindowTask) SetMaxConcurrency(v string) *MaintenanceWindowTask { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *MaintenanceWindowTask) SetMaxErrors(v string) *MaintenanceWindowTask { - s.MaxErrors = &v - return s -} - -// SetName sets the Name field's value. -func (s *MaintenanceWindowTask) SetName(v string) *MaintenanceWindowTask { - s.Name = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *MaintenanceWindowTask) SetPriority(v int64) *MaintenanceWindowTask { - s.Priority = &v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *MaintenanceWindowTask) SetServiceRoleArn(v string) *MaintenanceWindowTask { - s.ServiceRoleArn = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *MaintenanceWindowTask) SetTargets(v []*Target) *MaintenanceWindowTask { - s.Targets = v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *MaintenanceWindowTask) SetTaskArn(v string) *MaintenanceWindowTask { - s.TaskArn = &v - return s -} - -// SetTaskParameters sets the TaskParameters field's value. -func (s *MaintenanceWindowTask) SetTaskParameters(v map[string]*MaintenanceWindowTaskParameterValueExpression) *MaintenanceWindowTask { - s.TaskParameters = v - return s -} - -// SetType sets the Type field's value. -func (s *MaintenanceWindowTask) SetType(v string) *MaintenanceWindowTask { - s.Type = &v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *MaintenanceWindowTask) SetWindowId(v string) *MaintenanceWindowTask { - s.WindowId = &v - return s -} - -// SetWindowTaskId sets the WindowTaskId field's value. -func (s *MaintenanceWindowTask) SetWindowTaskId(v string) *MaintenanceWindowTask { - s.WindowTaskId = &v - return s -} - -// The parameters for task execution. -type MaintenanceWindowTaskInvocationParameters struct { - _ struct{} `type:"structure"` - - // The parameters for an AUTOMATION task type. - Automation *MaintenanceWindowAutomationParameters `type:"structure"` - - // The parameters for a LAMBDA task type. - Lambda *MaintenanceWindowLambdaParameters `type:"structure"` - - // The parameters for a RUN_COMMAND task type. - RunCommand *MaintenanceWindowRunCommandParameters `type:"structure"` - - // The parameters for a STEP_FUNCTION task type. - StepFunctions *MaintenanceWindowStepFunctionsParameters `type:"structure"` -} - -// String returns the string representation -func (s MaintenanceWindowTaskInvocationParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceWindowTaskInvocationParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MaintenanceWindowTaskInvocationParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MaintenanceWindowTaskInvocationParameters"} - if s.Automation != nil { - if err := s.Automation.Validate(); err != nil { - invalidParams.AddNested("Automation", err.(request.ErrInvalidParams)) - } - } - if s.Lambda != nil { - if err := s.Lambda.Validate(); err != nil { - invalidParams.AddNested("Lambda", err.(request.ErrInvalidParams)) - } - } - if s.RunCommand != nil { - if err := s.RunCommand.Validate(); err != nil { - invalidParams.AddNested("RunCommand", err.(request.ErrInvalidParams)) - } - } - if s.StepFunctions != nil { - if err := s.StepFunctions.Validate(); err != nil { - invalidParams.AddNested("StepFunctions", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutomation sets the Automation field's value. -func (s *MaintenanceWindowTaskInvocationParameters) SetAutomation(v *MaintenanceWindowAutomationParameters) *MaintenanceWindowTaskInvocationParameters { - s.Automation = v - return s -} - -// SetLambda sets the Lambda field's value. -func (s *MaintenanceWindowTaskInvocationParameters) SetLambda(v *MaintenanceWindowLambdaParameters) *MaintenanceWindowTaskInvocationParameters { - s.Lambda = v - return s -} - -// SetRunCommand sets the RunCommand field's value. -func (s *MaintenanceWindowTaskInvocationParameters) SetRunCommand(v *MaintenanceWindowRunCommandParameters) *MaintenanceWindowTaskInvocationParameters { - s.RunCommand = v - return s -} - -// SetStepFunctions sets the StepFunctions field's value. -func (s *MaintenanceWindowTaskInvocationParameters) SetStepFunctions(v *MaintenanceWindowStepFunctionsParameters) *MaintenanceWindowTaskInvocationParameters { - s.StepFunctions = v - return s -} - -// Defines the values for a task parameter. -type MaintenanceWindowTaskParameterValueExpression struct { - _ struct{} `type:"structure" sensitive:"true"` - - // This field contains an array of 0 or more strings, each 1 to 255 characters - // in length. - Values []*string `type:"list" sensitive:"true"` -} - -// String returns the string representation -func (s MaintenanceWindowTaskParameterValueExpression) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MaintenanceWindowTaskParameterValueExpression) GoString() string { - return s.String() -} - -// SetValues sets the Values field's value. -func (s *MaintenanceWindowTaskParameterValueExpression) SetValues(v []*string) *MaintenanceWindowTaskParameterValueExpression { - s.Values = v - return s -} - -type ModifyDocumentPermissionInput struct { - _ struct{} `type:"structure"` - - // The AWS user accounts that should have access to the document. The account - // IDs can either be a group of account IDs or All. - AccountIdsToAdd []*string `type:"list"` - - // The AWS user accounts that should no longer have access to the document. - // The AWS user account can either be a group of account IDs or All. This action - // has a higher priority than AccountIdsToAdd. If you specify an account ID - // to add and the same ID to remove, the system removes access to the document. - AccountIdsToRemove []*string `type:"list"` - - // The name of the document that you want to share. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The permission type for the document. The permission type can be Share. - // - // PermissionType is a required field - PermissionType *string `type:"string" required:"true" enum:"DocumentPermissionType"` -} - -// String returns the string representation -func (s ModifyDocumentPermissionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDocumentPermissionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyDocumentPermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyDocumentPermissionInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.PermissionType == nil { - invalidParams.Add(request.NewErrParamRequired("PermissionType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountIdsToAdd sets the AccountIdsToAdd field's value. -func (s *ModifyDocumentPermissionInput) SetAccountIdsToAdd(v []*string) *ModifyDocumentPermissionInput { - s.AccountIdsToAdd = v - return s -} - -// SetAccountIdsToRemove sets the AccountIdsToRemove field's value. -func (s *ModifyDocumentPermissionInput) SetAccountIdsToRemove(v []*string) *ModifyDocumentPermissionInput { - s.AccountIdsToRemove = v - return s -} - -// SetName sets the Name field's value. -func (s *ModifyDocumentPermissionInput) SetName(v string) *ModifyDocumentPermissionInput { - s.Name = &v - return s -} - -// SetPermissionType sets the PermissionType field's value. -func (s *ModifyDocumentPermissionInput) SetPermissionType(v string) *ModifyDocumentPermissionInput { - s.PermissionType = &v - return s -} - -type ModifyDocumentPermissionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyDocumentPermissionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyDocumentPermissionOutput) GoString() string { - return s.String() -} - -// A summary of resources that are not compliant. The summary is organized according -// to resource type. -type NonCompliantSummary struct { - _ struct{} `type:"structure"` - - // The total number of compliance items that are not compliant. - NonCompliantCount *int64 `type:"integer"` - - // A summary of the non-compliance severity by compliance type - SeveritySummary *SeveritySummary `type:"structure"` -} - -// String returns the string representation -func (s NonCompliantSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NonCompliantSummary) GoString() string { - return s.String() -} - -// SetNonCompliantCount sets the NonCompliantCount field's value. -func (s *NonCompliantSummary) SetNonCompliantCount(v int64) *NonCompliantSummary { - s.NonCompliantCount = &v - return s -} - -// SetSeveritySummary sets the SeveritySummary field's value. -func (s *NonCompliantSummary) SetSeveritySummary(v *SeveritySummary) *NonCompliantSummary { - s.SeveritySummary = v - return s -} - -// Configurations for sending notifications. -type NotificationConfig struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. - // Run Command pushes notifications about command status changes to this topic. - NotificationArn *string `type:"string"` - - // The different events for which you can receive notifications. These events - // include the following: All (events), InProgress, Success, TimedOut, Cancelled, - // Failed. To learn more about these events, see Configuring Amazon SNS Notifications - // for Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html) - // in the AWS Systems Manager User Guide. - NotificationEvents []*string `type:"list"` - - // Command: Receive notification when the status of a command changes. Invocation: - // For commands sent to multiple instances, receive notification on a per-instance - // basis when the status of a command changes. - NotificationType *string `type:"string" enum:"NotificationType"` -} - -// String returns the string representation -func (s NotificationConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NotificationConfig) GoString() string { - return s.String() -} - -// SetNotificationArn sets the NotificationArn field's value. -func (s *NotificationConfig) SetNotificationArn(v string) *NotificationConfig { - s.NotificationArn = &v - return s -} - -// SetNotificationEvents sets the NotificationEvents field's value. -func (s *NotificationConfig) SetNotificationEvents(v []*string) *NotificationConfig { - s.NotificationEvents = v - return s -} - -// SetNotificationType sets the NotificationType field's value. -func (s *NotificationConfig) SetNotificationType(v string) *NotificationConfig { - s.NotificationType = &v - return s -} - -// Information about the source where the association execution details are -// stored. -type OutputSource struct { - _ struct{} `type:"structure"` - - // The ID of the output source, for example the URL of an Amazon S3 bucket. - OutputSourceId *string `min:"36" type:"string"` - - // The type of source where the association execution details are stored, for - // example, Amazon S3. - OutputSourceType *string `type:"string"` -} - -// String returns the string representation -func (s OutputSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OutputSource) GoString() string { - return s.String() -} - -// SetOutputSourceId sets the OutputSourceId field's value. -func (s *OutputSource) SetOutputSourceId(v string) *OutputSource { - s.OutputSourceId = &v - return s -} - -// SetOutputSourceType sets the OutputSourceType field's value. -func (s *OutputSource) SetOutputSourceType(v string) *OutputSource { - s.OutputSourceType = &v - return s -} - -// An Amazon EC2 Systems Manager parameter in Parameter Store. -type Parameter struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the parameter. - ARN *string `type:"string"` - - // Date the parameter was last changed or updated and the parameter version - // was created. - LastModifiedDate *time.Time `type:"timestamp"` - - // The name of the parameter. - Name *string `min:"1" type:"string"` - - // Either the version number or the label used to retrieve the parameter value. - // Specify selectors by using one of the following formats: - // - // parameter_name:version - // - // parameter_name:label - Selector *string `type:"string"` - - // Applies to parameters that reference information in other AWS services. SourceResult - // is the raw result or response from the source. - SourceResult *string `type:"string"` - - // The type of parameter. Valid values include the following: String, String - // list, Secure string. - Type *string `type:"string" enum:"ParameterType"` - - // The parameter value. - Value *string `min:"1" type:"string"` - - // The parameter version. - Version *int64 `type:"long"` -} - -// String returns the string representation -func (s Parameter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Parameter) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *Parameter) SetARN(v string) *Parameter { - s.ARN = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *Parameter) SetLastModifiedDate(v time.Time) *Parameter { - s.LastModifiedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *Parameter) SetName(v string) *Parameter { - s.Name = &v - return s -} - -// SetSelector sets the Selector field's value. -func (s *Parameter) SetSelector(v string) *Parameter { - s.Selector = &v - return s -} - -// SetSourceResult sets the SourceResult field's value. -func (s *Parameter) SetSourceResult(v string) *Parameter { - s.SourceResult = &v - return s -} - -// SetType sets the Type field's value. -func (s *Parameter) SetType(v string) *Parameter { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Parameter) SetValue(v string) *Parameter { - s.Value = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *Parameter) SetVersion(v int64) *Parameter { - s.Version = &v - return s -} - -// Information about parameter usage. -type ParameterHistory struct { - _ struct{} `type:"structure"` - - // Parameter names can include the following letters and symbols. - // - // a-zA-Z0-9_.- - AllowedPattern *string `type:"string"` - - // Information about the parameter. - Description *string `type:"string"` - - // The ID of the query key used for this parameter. - KeyId *string `min:"1" type:"string"` - - // Labels assigned to the parameter version. - Labels []*string `min:"1" type:"list"` - - // Date the parameter was last changed or updated. - LastModifiedDate *time.Time `type:"timestamp"` - - // Amazon Resource Name (ARN) of the AWS user who last changed the parameter. - LastModifiedUser *string `type:"string"` - - // The name of the parameter. - Name *string `min:"1" type:"string"` - - // The type of parameter used. - Type *string `type:"string" enum:"ParameterType"` - - // The parameter value. - Value *string `min:"1" type:"string"` - - // The parameter version. - Version *int64 `type:"long"` -} - -// String returns the string representation -func (s ParameterHistory) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterHistory) GoString() string { - return s.String() -} - -// SetAllowedPattern sets the AllowedPattern field's value. -func (s *ParameterHistory) SetAllowedPattern(v string) *ParameterHistory { - s.AllowedPattern = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ParameterHistory) SetDescription(v string) *ParameterHistory { - s.Description = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *ParameterHistory) SetKeyId(v string) *ParameterHistory { - s.KeyId = &v - return s -} - -// SetLabels sets the Labels field's value. -func (s *ParameterHistory) SetLabels(v []*string) *ParameterHistory { - s.Labels = v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *ParameterHistory) SetLastModifiedDate(v time.Time) *ParameterHistory { - s.LastModifiedDate = &v - return s -} - -// SetLastModifiedUser sets the LastModifiedUser field's value. -func (s *ParameterHistory) SetLastModifiedUser(v string) *ParameterHistory { - s.LastModifiedUser = &v - return s -} - -// SetName sets the Name field's value. -func (s *ParameterHistory) SetName(v string) *ParameterHistory { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *ParameterHistory) SetType(v string) *ParameterHistory { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ParameterHistory) SetValue(v string) *ParameterHistory { - s.Value = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *ParameterHistory) SetVersion(v int64) *ParameterHistory { - s.Version = &v - return s -} - -// Metada includes information like the ARN of the last user and the date/time -// the parameter was last used. -type ParameterMetadata struct { - _ struct{} `type:"structure"` - - // A parameter name can include only the following letters and symbols. - // - // a-zA-Z0-9_.- - AllowedPattern *string `type:"string"` - - // Description of the parameter actions. - Description *string `type:"string"` - - // The ID of the query key used for this parameter. - KeyId *string `min:"1" type:"string"` - - // Date the parameter was last changed or updated. - LastModifiedDate *time.Time `type:"timestamp"` - - // Amazon Resource Name (ARN) of the AWS user who last changed the parameter. - LastModifiedUser *string `type:"string"` - - // The parameter name. - Name *string `min:"1" type:"string"` - - // The type of parameter. Valid parameter types include the following: String, - // String list, Secure string. - Type *string `type:"string" enum:"ParameterType"` - - // The parameter version. - Version *int64 `type:"long"` -} - -// String returns the string representation -func (s ParameterMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterMetadata) GoString() string { - return s.String() -} - -// SetAllowedPattern sets the AllowedPattern field's value. -func (s *ParameterMetadata) SetAllowedPattern(v string) *ParameterMetadata { - s.AllowedPattern = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ParameterMetadata) SetDescription(v string) *ParameterMetadata { - s.Description = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *ParameterMetadata) SetKeyId(v string) *ParameterMetadata { - s.KeyId = &v - return s -} - -// SetLastModifiedDate sets the LastModifiedDate field's value. -func (s *ParameterMetadata) SetLastModifiedDate(v time.Time) *ParameterMetadata { - s.LastModifiedDate = &v - return s -} - -// SetLastModifiedUser sets the LastModifiedUser field's value. -func (s *ParameterMetadata) SetLastModifiedUser(v string) *ParameterMetadata { - s.LastModifiedUser = &v - return s -} - -// SetName sets the Name field's value. -func (s *ParameterMetadata) SetName(v string) *ParameterMetadata { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *ParameterMetadata) SetType(v string) *ParameterMetadata { - s.Type = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *ParameterMetadata) SetVersion(v int64) *ParameterMetadata { - s.Version = &v - return s -} - -// One or more filters. Use a filter to return a more specific list of results. -// -// The Name field can't be used with the GetParametersByPath API action. -type ParameterStringFilter struct { - _ struct{} `type:"structure"` - - // The name of the filter. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // Valid options are Equals and BeginsWith. For Path filter, valid options are - // Recursive and OneLevel. - Option *string `min:"1" type:"string"` - - // The value you want to search for. - Values []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s ParameterStringFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParameterStringFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ParameterStringFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ParameterStringFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Option != nil && len(*s.Option) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Option", 1)) - } - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *ParameterStringFilter) SetKey(v string) *ParameterStringFilter { - s.Key = &v - return s -} - -// SetOption sets the Option field's value. -func (s *ParameterStringFilter) SetOption(v string) *ParameterStringFilter { - s.Option = &v - return s -} - -// SetValues sets the Values field's value. -func (s *ParameterStringFilter) SetValues(v []*string) *ParameterStringFilter { - s.Values = v - return s -} - -// This data type is deprecated. Instead, use ParameterStringFilter. -type ParametersFilter struct { - _ struct{} `type:"structure"` - - // The name of the filter. - // - // Key is a required field - Key *string `type:"string" required:"true" enum:"ParametersFilterKey"` - - // The filter values. - // - // Values is a required field - Values []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s ParametersFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ParametersFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ParametersFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ParametersFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *ParametersFilter) SetKey(v string) *ParametersFilter { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *ParametersFilter) SetValues(v []*string) *ParametersFilter { - s.Values = v - return s -} - -// Represents metadata about a patch. -type Patch struct { - _ struct{} `type:"structure"` - - // The classification of the patch (for example, SecurityUpdates, Updates, CriticalUpdates). - Classification *string `type:"string"` - - // The URL where more information can be obtained about the patch. - ContentUrl *string `type:"string"` - - // The description of the patch. - Description *string `type:"string"` - - // The ID of the patch (this is different than the Microsoft Knowledge Base - // ID). - Id *string `min:"1" type:"string"` - - // The Microsoft Knowledge Base ID of the patch. - KbNumber *string `type:"string"` - - // The language of the patch if it's language-specific. - Language *string `type:"string"` - - // The ID of the MSRC bulletin the patch is related to. - MsrcNumber *string `type:"string"` - - // The severity of the patch (for example Critical, Important, Moderate). - MsrcSeverity *string `type:"string"` - - // The specific product the patch is applicable for (for example, WindowsServer2016). - Product *string `type:"string"` - - // The product family the patch is applicable for (for example, Windows). - ProductFamily *string `type:"string"` - - // The date the patch was released. - ReleaseDate *time.Time `type:"timestamp"` - - // The title of the patch. - Title *string `type:"string"` - - // The name of the vendor providing the patch. - Vendor *string `type:"string"` -} - -// String returns the string representation -func (s Patch) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Patch) GoString() string { - return s.String() -} - -// SetClassification sets the Classification field's value. -func (s *Patch) SetClassification(v string) *Patch { - s.Classification = &v - return s -} - -// SetContentUrl sets the ContentUrl field's value. -func (s *Patch) SetContentUrl(v string) *Patch { - s.ContentUrl = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Patch) SetDescription(v string) *Patch { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *Patch) SetId(v string) *Patch { - s.Id = &v - return s -} - -// SetKbNumber sets the KbNumber field's value. -func (s *Patch) SetKbNumber(v string) *Patch { - s.KbNumber = &v - return s -} - -// SetLanguage sets the Language field's value. -func (s *Patch) SetLanguage(v string) *Patch { - s.Language = &v - return s -} - -// SetMsrcNumber sets the MsrcNumber field's value. -func (s *Patch) SetMsrcNumber(v string) *Patch { - s.MsrcNumber = &v - return s -} - -// SetMsrcSeverity sets the MsrcSeverity field's value. -func (s *Patch) SetMsrcSeverity(v string) *Patch { - s.MsrcSeverity = &v - return s -} - -// SetProduct sets the Product field's value. -func (s *Patch) SetProduct(v string) *Patch { - s.Product = &v - return s -} - -// SetProductFamily sets the ProductFamily field's value. -func (s *Patch) SetProductFamily(v string) *Patch { - s.ProductFamily = &v - return s -} - -// SetReleaseDate sets the ReleaseDate field's value. -func (s *Patch) SetReleaseDate(v time.Time) *Patch { - s.ReleaseDate = &v - return s -} - -// SetTitle sets the Title field's value. -func (s *Patch) SetTitle(v string) *Patch { - s.Title = &v - return s -} - -// SetVendor sets the Vendor field's value. -func (s *Patch) SetVendor(v string) *Patch { - s.Vendor = &v - return s -} - -// Defines the basic information about a patch baseline. -type PatchBaselineIdentity struct { - _ struct{} `type:"structure"` - - // The description of the patch baseline. - BaselineDescription *string `min:"1" type:"string"` - - // The ID of the patch baseline. - BaselineId *string `min:"20" type:"string"` - - // The name of the patch baseline. - BaselineName *string `min:"3" type:"string"` - - // Whether this is the default baseline. Note that Systems Manager supports - // creating multiple default patch baselines. For example, you can create a - // default patch baseline for each operating system. - DefaultBaseline *bool `type:"boolean"` - - // Defines the operating system the patch baseline applies to. The Default value - // is WINDOWS. - OperatingSystem *string `type:"string" enum:"OperatingSystem"` -} - -// String returns the string representation -func (s PatchBaselineIdentity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PatchBaselineIdentity) GoString() string { - return s.String() -} - -// SetBaselineDescription sets the BaselineDescription field's value. -func (s *PatchBaselineIdentity) SetBaselineDescription(v string) *PatchBaselineIdentity { - s.BaselineDescription = &v - return s -} - -// SetBaselineId sets the BaselineId field's value. -func (s *PatchBaselineIdentity) SetBaselineId(v string) *PatchBaselineIdentity { - s.BaselineId = &v - return s -} - -// SetBaselineName sets the BaselineName field's value. -func (s *PatchBaselineIdentity) SetBaselineName(v string) *PatchBaselineIdentity { - s.BaselineName = &v - return s -} - -// SetDefaultBaseline sets the DefaultBaseline field's value. -func (s *PatchBaselineIdentity) SetDefaultBaseline(v bool) *PatchBaselineIdentity { - s.DefaultBaseline = &v - return s -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *PatchBaselineIdentity) SetOperatingSystem(v string) *PatchBaselineIdentity { - s.OperatingSystem = &v - return s -} - -// Information about the state of a patch on a particular instance as it relates -// to the patch baseline used to patch the instance. -type PatchComplianceData struct { - _ struct{} `type:"structure"` - - // The classification of the patch (for example, SecurityUpdates, Updates, CriticalUpdates). - // - // Classification is a required field - Classification *string `type:"string" required:"true"` - - // The date/time the patch was installed on the instance. Note that not all - // operating systems provide this level of information. - // - // InstalledTime is a required field - InstalledTime *time.Time `type:"timestamp" required:"true"` - - // The operating system-specific ID of the patch. - // - // KBId is a required field - KBId *string `type:"string" required:"true"` - - // The severity of the patch (for example, Critical, Important, Moderate). - // - // Severity is a required field - Severity *string `type:"string" required:"true"` - - // The state of the patch on the instance, such as INSTALLED or FAILED. - // - // For descriptions of each patch state, see About Patch Compliance (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-compliance-about.html#sysman-compliance-monitor-patch) - // in the AWS Systems Manager User Guide. - // - // State is a required field - State *string `type:"string" required:"true" enum:"PatchComplianceDataState"` - - // The title of the patch. - // - // Title is a required field - Title *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s PatchComplianceData) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PatchComplianceData) GoString() string { - return s.String() -} - -// SetClassification sets the Classification field's value. -func (s *PatchComplianceData) SetClassification(v string) *PatchComplianceData { - s.Classification = &v - return s -} - -// SetInstalledTime sets the InstalledTime field's value. -func (s *PatchComplianceData) SetInstalledTime(v time.Time) *PatchComplianceData { - s.InstalledTime = &v - return s -} - -// SetKBId sets the KBId field's value. -func (s *PatchComplianceData) SetKBId(v string) *PatchComplianceData { - s.KBId = &v - return s -} - -// SetSeverity sets the Severity field's value. -func (s *PatchComplianceData) SetSeverity(v string) *PatchComplianceData { - s.Severity = &v - return s -} - -// SetState sets the State field's value. -func (s *PatchComplianceData) SetState(v string) *PatchComplianceData { - s.State = &v - return s -} - -// SetTitle sets the Title field's value. -func (s *PatchComplianceData) SetTitle(v string) *PatchComplianceData { - s.Title = &v - return s -} - -// Defines a patch filter. -// -// A patch filter consists of key/value pairs, but not all keys are valid for -// all operating system types. For example, the key PRODUCT is valid for all -// supported operating system types. The key MSRC_SEVERITY, however, is valid -// only for Windows operating systems, and the key SECTION is valid only for -// Ubuntu operating systems. -// -// Refer to the following sections for information about which keys may be used -// with each major operating system, and which values are valid for each key. -// -// Windows Operating Systems -// -// The supported keys for Windows operating systems are PRODUCT, CLASSIFICATION, -// and MSRC_SEVERITY. See the following lists for valid values for each of these -// keys. -// -// Supported key:PRODUCT -// -// Supported values: -// -// * Windows7 -// -// * Windows8 -// -// * Windows8.1 -// -// * Windows8Embedded -// -// * Windows10 -// -// * Windows10LTSB -// -// * WindowsServer2008 -// -// * WindowsServer2008R2 -// -// * WindowsServer2012 -// -// * WindowsServer2012R2 -// -// * WindowsServer2016 -// -// * * -// -// Use a wildcard character (*) to target all supported operating system versions. -// -// Supported key:CLASSIFICATION -// -// Supported values: -// -// * CriticalUpdates -// -// * DefinitionUpdates -// -// * Drivers -// -// * FeaturePacks -// -// * SecurityUpdates -// -// * ServicePacks -// -// * Tools -// -// * UpdateRollups -// -// * Updates -// -// * Upgrades -// -// Supported key:MSRC_SEVERITY -// -// Supported values: -// -// * Critical -// -// * Important -// -// * Moderate -// -// * Low -// -// * Unspecified -// -// Ubuntu Operating Systems -// -// The supported keys for Ubuntu operating systems are PRODUCT, PRIORITY, and -// SECTION. See the following lists for valid values for each of these keys. -// -// Supported key:PRODUCT -// -// Supported values: -// -// * Ubuntu14.04 -// -// * Ubuntu16.04 -// -// * * -// -// Use a wildcard character (*) to target all supported operating system versions. -// -// Supported key:PRIORITY -// -// Supported values: -// -// * Required -// -// * Important -// -// * Standard -// -// * Optional -// -// * Extra -// -// Supported key:SECTION -// -// Only the length of the key value is validated. Minimum length is 1. Maximum -// length is 64. -// -// Amazon Linux Operating Systems -// -// The supported keys for Amazon Linux operating systems are PRODUCT, CLASSIFICATION, -// and SEVERITY. See the following lists for valid values for each of these -// keys. -// -// Supported key:PRODUCT -// -// Supported values: -// -// * AmazonLinux2012.03 -// -// * AmazonLinux2012.09 -// -// * AmazonLinux2013.03 -// -// * AmazonLinux2013.09 -// -// * AmazonLinux2014.03 -// -// * AmazonLinux2014.09 -// -// * AmazonLinux2015.03 -// -// * AmazonLinux2015.09 -// -// * AmazonLinux2016.03 -// -// * AmazonLinux2016.09 -// -// * AmazonLinux2017.03 -// -// * AmazonLinux2017.09 -// -// * * -// -// Use a wildcard character (*) to target all supported operating system versions. -// -// Supported key:CLASSIFICATION -// -// Supported values: -// -// * Security -// -// * Bugfix -// -// * Enhancement -// -// * Recommended -// -// * Newpackage -// -// Supported key:SEVERITY -// -// Supported values: -// -// * Critical -// -// * Important -// -// * Medium -// -// * Low -// -// Amazon Linux 2 Operating Systems -// -// The supported keys for Amazon Linux 2 operating systems are PRODUCT, CLASSIFICATION, -// and SEVERITY. See the following lists for valid values for each of these -// keys. -// -// Supported key:PRODUCT -// -// Supported values: -// -// * AmazonLinux2 -// -// * AmazonLinux2.0 -// -// * * -// -// Use a wildcard character (*) to target all supported operating system versions. -// -// Supported key:CLASSIFICATION -// -// Supported values: -// -// * Security -// -// * Bugfix -// -// * Enhancement -// -// * Recommended -// -// * Newpackage -// -// Supported key:SEVERITY -// -// Supported values: -// -// * Critical -// -// * Important -// -// * Medium -// -// * Low -// -// RedHat Enterprise Linux (RHEL) Operating Systems -// -// The supported keys for RedHat Enterprise Linux operating systems are PRODUCT, -// CLASSIFICATION, and SEVERITY. See the following lists for valid values for -// each of these keys. -// -// Supported key:PRODUCT -// -// Supported values: -// -// * RedhatEnterpriseLinux6.5 -// -// * RedhatEnterpriseLinux6.6 -// -// * RedhatEnterpriseLinux6.7 -// -// * RedhatEnterpriseLinux6.8 -// -// * RedhatEnterpriseLinux6.9 -// -// * RedhatEnterpriseLinux7.0 -// -// * RedhatEnterpriseLinux7.1 -// -// * RedhatEnterpriseLinux7.2 -// -// * RedhatEnterpriseLinux7.3 -// -// * RedhatEnterpriseLinux7.4 -// -// * * -// -// Use a wildcard character (*) to target all supported operating system versions. -// -// Supported key:CLASSIFICATION -// -// Supported values: -// -// * Security -// -// * Bugfix -// -// * Enhancement -// -// * Recommended -// -// * Newpackage -// -// Supported key:SEVERITY -// -// Supported values: -// -// * Critical -// -// * Important -// -// * Medium -// -// * Low -// -// SUSE Linux Enterprise Server (SLES) Operating Systems -// -// The supported keys for SLES operating systems are PRODUCT, CLASSIFICATION, -// and SEVERITY. See the following lists for valid values for each of these -// keys. -// -// Supported key:PRODUCT -// -// Supported values: -// -// * Suse12.0 -// -// * Suse12.1 -// -// * Suse12.2 -// -// * Suse12.3 -// -// * Suse12.4 -// -// * Suse12.5 -// -// * Suse12.6 -// -// * Suse12.7 -// -// * Suse12.8 -// -// * Suse12.9 -// -// * * -// -// Use a wildcard character (*) to target all supported operating system versions. -// -// Supported key:CLASSIFICATION -// -// Supported values: -// -// * Security -// -// * Recommended -// -// * Optional -// -// * Feature -// -// * Document -// -// * Yast -// -// Supported key:SEVERITY -// -// Supported values: -// -// * Critical -// -// * Important -// -// * Moderate -// -// * Low -// -// CentOS Operating Systems -// -// The supported keys for CentOS operating systems are PRODUCT, CLASSIFICATION, -// and SEVERITY. See the following lists for valid values for each of these -// keys. -// -// Supported key:PRODUCT -// -// Supported values: -// -// * CentOS6.5 -// -// * CentOS6.6 -// -// * CentOS6.7 -// -// * CentOS6.8 -// -// * CentOS6.9 -// -// * CentOS7.0 -// -// * CentOS7.1 -// -// * CentOS7.2 -// -// * CentOS7.3 -// -// * CentOS7.4 -// -// * * -// -// Use a wildcard character (*) to target all supported operating system versions. -// -// Supported key:CLASSIFICATION -// -// Supported values: -// -// * Security -// -// * Bugfix -// -// * Enhancement -// -// * Recommended -// -// * Newpackage -// -// Supported key:SEVERITY -// -// Supported values: -// -// * Critical -// -// * Important -// -// * Medium -// -// * Low -type PatchFilter struct { - _ struct{} `type:"structure"` - - // The key for the filter. - // - // See PatchFilter for lists of valid keys for each operating system type. - // - // Key is a required field - Key *string `type:"string" required:"true" enum:"PatchFilterKey"` - - // The value for the filter key. - // - // See PatchFilter for lists of valid values for each key based on operating - // system type. - // - // Values is a required field - Values []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s PatchFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PatchFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PatchFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PatchFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *PatchFilter) SetKey(v string) *PatchFilter { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *PatchFilter) SetValues(v []*string) *PatchFilter { - s.Values = v - return s -} - -// A set of patch filters, typically used for approval rules. -type PatchFilterGroup struct { - _ struct{} `type:"structure"` - - // The set of patch filters that make up the group. - // - // PatchFilters is a required field - PatchFilters []*PatchFilter `type:"list" required:"true"` -} - -// String returns the string representation -func (s PatchFilterGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PatchFilterGroup) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PatchFilterGroup) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PatchFilterGroup"} - if s.PatchFilters == nil { - invalidParams.Add(request.NewErrParamRequired("PatchFilters")) - } - if s.PatchFilters != nil { - for i, v := range s.PatchFilters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PatchFilters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPatchFilters sets the PatchFilters field's value. -func (s *PatchFilterGroup) SetPatchFilters(v []*PatchFilter) *PatchFilterGroup { - s.PatchFilters = v - return s -} - -// The mapping between a patch group and the patch baseline the patch group -// is registered with. -type PatchGroupPatchBaselineMapping struct { - _ struct{} `type:"structure"` - - // The patch baseline the patch group is registered with. - BaselineIdentity *PatchBaselineIdentity `type:"structure"` - - // The name of the patch group registered with the patch baseline. - PatchGroup *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s PatchGroupPatchBaselineMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PatchGroupPatchBaselineMapping) GoString() string { - return s.String() -} - -// SetBaselineIdentity sets the BaselineIdentity field's value. -func (s *PatchGroupPatchBaselineMapping) SetBaselineIdentity(v *PatchBaselineIdentity) *PatchGroupPatchBaselineMapping { - s.BaselineIdentity = v - return s -} - -// SetPatchGroup sets the PatchGroup field's value. -func (s *PatchGroupPatchBaselineMapping) SetPatchGroup(v string) *PatchGroupPatchBaselineMapping { - s.PatchGroup = &v - return s -} - -// Defines a filter used in Patch Manager APIs. -type PatchOrchestratorFilter struct { - _ struct{} `type:"structure"` - - // The key for the filter. - Key *string `min:"1" type:"string"` - - // The value for the filter. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s PatchOrchestratorFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PatchOrchestratorFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PatchOrchestratorFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PatchOrchestratorFilter"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *PatchOrchestratorFilter) SetKey(v string) *PatchOrchestratorFilter { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *PatchOrchestratorFilter) SetValues(v []*string) *PatchOrchestratorFilter { - s.Values = v - return s -} - -// Defines an approval rule for a patch baseline. -type PatchRule struct { - _ struct{} `type:"structure"` - - // The number of days after the release date of each patch matched by the rule - // that the patch is marked as approved in the patch baseline. For example, - // a value of 7 means that patches are approved seven days after they are released. - // - // ApproveAfterDays is a required field - ApproveAfterDays *int64 `type:"integer" required:"true"` - - // A compliance severity level for all approved patches in a patch baseline. - // Valid compliance severity levels include the following: Unspecified, Critical, - // High, Medium, Low, and Informational. - ComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` - - // For instances identified by the approval rule filters, enables a patch baseline - // to apply non-security updates available in the specified repository. The - // default value is 'false'. Applies to Linux instances only. - EnableNonSecurity *bool `type:"boolean"` - - // The patch filter group that defines the criteria for the rule. - // - // PatchFilterGroup is a required field - PatchFilterGroup *PatchFilterGroup `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PatchRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PatchRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PatchRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PatchRule"} - if s.ApproveAfterDays == nil { - invalidParams.Add(request.NewErrParamRequired("ApproveAfterDays")) - } - if s.PatchFilterGroup == nil { - invalidParams.Add(request.NewErrParamRequired("PatchFilterGroup")) - } - if s.PatchFilterGroup != nil { - if err := s.PatchFilterGroup.Validate(); err != nil { - invalidParams.AddNested("PatchFilterGroup", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApproveAfterDays sets the ApproveAfterDays field's value. -func (s *PatchRule) SetApproveAfterDays(v int64) *PatchRule { - s.ApproveAfterDays = &v - return s -} - -// SetComplianceLevel sets the ComplianceLevel field's value. -func (s *PatchRule) SetComplianceLevel(v string) *PatchRule { - s.ComplianceLevel = &v - return s -} - -// SetEnableNonSecurity sets the EnableNonSecurity field's value. -func (s *PatchRule) SetEnableNonSecurity(v bool) *PatchRule { - s.EnableNonSecurity = &v - return s -} - -// SetPatchFilterGroup sets the PatchFilterGroup field's value. -func (s *PatchRule) SetPatchFilterGroup(v *PatchFilterGroup) *PatchRule { - s.PatchFilterGroup = v - return s -} - -// A set of rules defining the approval rules for a patch baseline. -type PatchRuleGroup struct { - _ struct{} `type:"structure"` - - // The rules that make up the rule group. - // - // PatchRules is a required field - PatchRules []*PatchRule `type:"list" required:"true"` -} - -// String returns the string representation -func (s PatchRuleGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PatchRuleGroup) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PatchRuleGroup) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PatchRuleGroup"} - if s.PatchRules == nil { - invalidParams.Add(request.NewErrParamRequired("PatchRules")) - } - if s.PatchRules != nil { - for i, v := range s.PatchRules { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PatchRules", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPatchRules sets the PatchRules field's value. -func (s *PatchRuleGroup) SetPatchRules(v []*PatchRule) *PatchRuleGroup { - s.PatchRules = v - return s -} - -// Information about the patches to use to update the instances, including target -// operating systems and source repository. Applies to Linux instances only. -type PatchSource struct { - _ struct{} `type:"structure"` - - // The value of the yum repo configuration. For example: - // - // [main] - // - // cachedir=/var/cache/yum/$basesearch$releasever - // - // keepcache=0 - // - // debuglevel=2 - // - // Configuration is a required field - Configuration *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The name specified to identify the patch source. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The specific operating system versions a patch repository applies to, such - // as "Ubuntu16.04", "AmazonLinux2016.09", "RedhatEnterpriseLinux7.2" or "Suse12.7". - // For lists of supported product values, see PatchFilter. - // - // Products is a required field - Products []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s PatchSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PatchSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PatchSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PatchSource"} - if s.Configuration == nil { - invalidParams.Add(request.NewErrParamRequired("Configuration")) - } - if s.Configuration != nil && len(*s.Configuration) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Configuration", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Products == nil { - invalidParams.Add(request.NewErrParamRequired("Products")) - } - if s.Products != nil && len(s.Products) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Products", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConfiguration sets the Configuration field's value. -func (s *PatchSource) SetConfiguration(v string) *PatchSource { - s.Configuration = &v - return s -} - -// SetName sets the Name field's value. -func (s *PatchSource) SetName(v string) *PatchSource { - s.Name = &v - return s -} - -// SetProducts sets the Products field's value. -func (s *PatchSource) SetProducts(v []*string) *PatchSource { - s.Products = v - return s -} - -// Information about the approval status of a patch. -type PatchStatus struct { - _ struct{} `type:"structure"` - - // The date the patch was approved (or will be approved if the status is PENDING_APPROVAL). - ApprovalDate *time.Time `type:"timestamp"` - - // The compliance severity level for a patch. - ComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` - - // The approval status of a patch (APPROVED, PENDING_APPROVAL, EXPLICIT_APPROVED, - // EXPLICIT_REJECTED). - DeploymentStatus *string `type:"string" enum:"PatchDeploymentStatus"` -} - -// String returns the string representation -func (s PatchStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PatchStatus) GoString() string { - return s.String() -} - -// SetApprovalDate sets the ApprovalDate field's value. -func (s *PatchStatus) SetApprovalDate(v time.Time) *PatchStatus { - s.ApprovalDate = &v - return s -} - -// SetComplianceLevel sets the ComplianceLevel field's value. -func (s *PatchStatus) SetComplianceLevel(v string) *PatchStatus { - s.ComplianceLevel = &v - return s -} - -// SetDeploymentStatus sets the DeploymentStatus field's value. -func (s *PatchStatus) SetDeploymentStatus(v string) *PatchStatus { - s.DeploymentStatus = &v - return s -} - -// An aggregate of step execution statuses displayed in the AWS Console for -// a multi-Region and multi-account Automation execution. -type ProgressCounters struct { - _ struct{} `type:"structure"` - - // The total number of steps that the system cancelled in all specified AWS - // Regions and accounts for the current Automation execution. - CancelledSteps *int64 `type:"integer"` - - // The total number of steps that failed to execute in all specified AWS Regions - // and accounts for the current Automation execution. - FailedSteps *int64 `type:"integer"` - - // The total number of steps that successfully completed in all specified AWS - // Regions and accounts for the current Automation execution. - SuccessSteps *int64 `type:"integer"` - - // The total number of steps that timed out in all specified AWS Regions and - // accounts for the current Automation execution. - TimedOutSteps *int64 `type:"integer"` - - // The total number of steps executed in all specified AWS Regions and accounts - // for the current Automation execution. - TotalSteps *int64 `type:"integer"` -} - -// String returns the string representation -func (s ProgressCounters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ProgressCounters) GoString() string { - return s.String() -} - -// SetCancelledSteps sets the CancelledSteps field's value. -func (s *ProgressCounters) SetCancelledSteps(v int64) *ProgressCounters { - s.CancelledSteps = &v - return s -} - -// SetFailedSteps sets the FailedSteps field's value. -func (s *ProgressCounters) SetFailedSteps(v int64) *ProgressCounters { - s.FailedSteps = &v - return s -} - -// SetSuccessSteps sets the SuccessSteps field's value. -func (s *ProgressCounters) SetSuccessSteps(v int64) *ProgressCounters { - s.SuccessSteps = &v - return s -} - -// SetTimedOutSteps sets the TimedOutSteps field's value. -func (s *ProgressCounters) SetTimedOutSteps(v int64) *ProgressCounters { - s.TimedOutSteps = &v - return s -} - -// SetTotalSteps sets the TotalSteps field's value. -func (s *ProgressCounters) SetTotalSteps(v int64) *ProgressCounters { - s.TotalSteps = &v - return s -} - -type PutComplianceItemsInput struct { - _ struct{} `type:"structure"` - - // Specify the compliance type. For example, specify Association (for a State - // Manager association), Patch, or Custom:string. - // - // ComplianceType is a required field - ComplianceType *string `min:"1" type:"string" required:"true"` - - // A summary of the call execution that includes an execution ID, the type of - // execution (for example, Command), and the date/time of the execution using - // a datetime object that is saved in the following format: yyyy-MM-dd'T'HH:mm:ss'Z'. - // - // ExecutionSummary is a required field - ExecutionSummary *ComplianceExecutionSummary `type:"structure" required:"true"` - - // MD5 or SHA-256 content hash. The content hash is used to determine if existing - // information should be overwritten or ignored. If the content hashes match, - // the request to put compliance information is ignored. - ItemContentHash *string `type:"string"` - - // Information about the compliance as defined by the resource type. For example, - // for a patch compliance type, Items includes information about the PatchSeverity, - // Classification, etc. - // - // Items is a required field - Items []*ComplianceItemEntry `type:"list" required:"true"` - - // Specify an ID for this resource. For a managed instance, this is the instance - // ID. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // Specify the type of resource. ManagedInstance is currently the only supported - // resource type. - // - // ResourceType is a required field - ResourceType *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutComplianceItemsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutComplianceItemsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutComplianceItemsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutComplianceItemsInput"} - if s.ComplianceType == nil { - invalidParams.Add(request.NewErrParamRequired("ComplianceType")) - } - if s.ComplianceType != nil && len(*s.ComplianceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ComplianceType", 1)) - } - if s.ExecutionSummary == nil { - invalidParams.Add(request.NewErrParamRequired("ExecutionSummary")) - } - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - if s.ResourceType != nil && len(*s.ResourceType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) - } - if s.ExecutionSummary != nil { - if err := s.ExecutionSummary.Validate(); err != nil { - invalidParams.AddNested("ExecutionSummary", err.(request.ErrInvalidParams)) - } - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComplianceType sets the ComplianceType field's value. -func (s *PutComplianceItemsInput) SetComplianceType(v string) *PutComplianceItemsInput { - s.ComplianceType = &v - return s -} - -// SetExecutionSummary sets the ExecutionSummary field's value. -func (s *PutComplianceItemsInput) SetExecutionSummary(v *ComplianceExecutionSummary) *PutComplianceItemsInput { - s.ExecutionSummary = v - return s -} - -// SetItemContentHash sets the ItemContentHash field's value. -func (s *PutComplianceItemsInput) SetItemContentHash(v string) *PutComplianceItemsInput { - s.ItemContentHash = &v - return s -} - -// SetItems sets the Items field's value. -func (s *PutComplianceItemsInput) SetItems(v []*ComplianceItemEntry) *PutComplianceItemsInput { - s.Items = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *PutComplianceItemsInput) SetResourceId(v string) *PutComplianceItemsInput { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *PutComplianceItemsInput) SetResourceType(v string) *PutComplianceItemsInput { - s.ResourceType = &v - return s -} - -type PutComplianceItemsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutComplianceItemsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutComplianceItemsOutput) GoString() string { - return s.String() -} - -type PutInventoryInput struct { - _ struct{} `type:"structure"` - - // One or more instance IDs where you want to add or update inventory items. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The inventory items that you want to add or update on instances. - // - // Items is a required field - Items []*InventoryItem `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s PutInventoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutInventoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutInventoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutInventoryInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Items != nil && len(s.Items) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Items", 1)) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceId sets the InstanceId field's value. -func (s *PutInventoryInput) SetInstanceId(v string) *PutInventoryInput { - s.InstanceId = &v - return s -} - -// SetItems sets the Items field's value. -func (s *PutInventoryInput) SetItems(v []*InventoryItem) *PutInventoryInput { - s.Items = v - return s -} - -type PutInventoryOutput struct { - _ struct{} `type:"structure"` - - // Information about the request. - Message *string `type:"string"` -} - -// String returns the string representation -func (s PutInventoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutInventoryOutput) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *PutInventoryOutput) SetMessage(v string) *PutInventoryOutput { - s.Message = &v - return s -} - -type PutParameterInput struct { - _ struct{} `type:"structure"` - - // A regular expression used to validate the parameter value. For example, for - // String types with values restricted to numbers, you can specify the following: - // AllowedPattern=^\d+$ - AllowedPattern *string `type:"string"` - - // Information about the parameter that you want to add to the system. Optional - // but recommended. - // - // Do not enter personally identifiable information in this field. - Description *string `type:"string"` - - // The KMS Key ID that you want to use to encrypt a parameter. Either the default - // AWS Key Management Service (AWS KMS) key automatically assigned to your AWS - // account or a custom key. Required for parameters that use the SecureString - // data type. - // - // If you don't specify a key ID, the system uses the default key associated - // with your AWS account. - // - // * To use your default AWS KMS key, choose the SecureString data type, - // and do not specify the Key ID when you create the parameter. The system - // automatically populates Key ID with your default KMS key. - // - // * To use a custom KMS key, choose the SecureString data type with the - // Key ID parameter. - KeyId *string `min:"1" type:"string"` - - // The fully qualified name of the parameter that you want to add to the system. - // The fully qualified name includes the complete hierarchy of the parameter - // path and name. For example: /Dev/DBServer/MySQL/db-string13 - // - // Naming Constraints: - // - // * Parameter names are case sensitive. - // - // * A parameter name must be unique within an AWS Region - // - // * A parameter name can't be prefixed with "aws" or "ssm" (case-insensitive). - // - // * Parameter names can include only the following symbols and letters: - // a-zA-Z0-9_.-/ - // - // * A parameter name can't include spaces. - // - // * Parameter hierarchies are limited to a maximum depth of fifteen levels. - // - // For additional information about valid values for parameter names, see Requirements - // and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) - // in the AWS Systems Manager User Guide. - // - // The maximum length constraint listed below includes capacity for additional - // system attributes that are not part of the name. The maximum length for the - // fully qualified parameter name is 1011 characters. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // Overwrite an existing parameter. If not specified, will default to "false". - Overwrite *bool `type:"boolean"` - - // The type of parameter that you want to add to the system. - // - // Items in a StringList must be separated by a comma (,). You can't use other - // punctuation or special character to escape items in the list. If you have - // a parameter value that requires a comma, then use the String data type. - // - // SecureString is not currently supported for AWS CloudFormation templates - // or in the China Regions. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"ParameterType"` - - // The parameter value that you want to add to the system. - // - // Value is a required field - Value *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutParameterInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutParameterInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutParameterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutParameterInput"} - if s.KeyId != nil && len(*s.KeyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowedPattern sets the AllowedPattern field's value. -func (s *PutParameterInput) SetAllowedPattern(v string) *PutParameterInput { - s.AllowedPattern = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PutParameterInput) SetDescription(v string) *PutParameterInput { - s.Description = &v - return s -} - -// SetKeyId sets the KeyId field's value. -func (s *PutParameterInput) SetKeyId(v string) *PutParameterInput { - s.KeyId = &v - return s -} - -// SetName sets the Name field's value. -func (s *PutParameterInput) SetName(v string) *PutParameterInput { - s.Name = &v - return s -} - -// SetOverwrite sets the Overwrite field's value. -func (s *PutParameterInput) SetOverwrite(v bool) *PutParameterInput { - s.Overwrite = &v - return s -} - -// SetType sets the Type field's value. -func (s *PutParameterInput) SetType(v string) *PutParameterInput { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *PutParameterInput) SetValue(v string) *PutParameterInput { - s.Value = &v - return s -} - -type PutParameterOutput struct { - _ struct{} `type:"structure"` - - // The new version number of a parameter. If you edit a parameter value, Parameter - // Store automatically creates a new version and assigns this new version a - // unique ID. You can reference a parameter version ID in API actions or in - // Systems Manager documents (SSM documents). By default, if you don't specify - // a specific version, the system returns the latest parameter value when a - // parameter is called. - Version *int64 `type:"long"` -} - -// String returns the string representation -func (s PutParameterOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutParameterOutput) GoString() string { - return s.String() -} - -// SetVersion sets the Version field's value. -func (s *PutParameterOutput) SetVersion(v int64) *PutParameterOutput { - s.Version = &v - return s -} - -type RegisterDefaultPatchBaselineInput struct { - _ struct{} `type:"structure"` - - // The ID of the patch baseline that should be the default patch baseline. - // - // BaselineId is a required field - BaselineId *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterDefaultPatchBaselineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterDefaultPatchBaselineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterDefaultPatchBaselineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterDefaultPatchBaselineInput"} - if s.BaselineId == nil { - invalidParams.Add(request.NewErrParamRequired("BaselineId")) - } - if s.BaselineId != nil && len(*s.BaselineId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("BaselineId", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBaselineId sets the BaselineId field's value. -func (s *RegisterDefaultPatchBaselineInput) SetBaselineId(v string) *RegisterDefaultPatchBaselineInput { - s.BaselineId = &v - return s -} - -type RegisterDefaultPatchBaselineOutput struct { - _ struct{} `type:"structure"` - - // The ID of the default patch baseline. - BaselineId *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s RegisterDefaultPatchBaselineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterDefaultPatchBaselineOutput) GoString() string { - return s.String() -} - -// SetBaselineId sets the BaselineId field's value. -func (s *RegisterDefaultPatchBaselineOutput) SetBaselineId(v string) *RegisterDefaultPatchBaselineOutput { - s.BaselineId = &v - return s -} - -type RegisterPatchBaselineForPatchGroupInput struct { - _ struct{} `type:"structure"` - - // The ID of the patch baseline to register the patch group with. - // - // BaselineId is a required field - BaselineId *string `min:"20" type:"string" required:"true"` - - // The name of the patch group that should be registered with the patch baseline. - // - // PatchGroup is a required field - PatchGroup *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterPatchBaselineForPatchGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterPatchBaselineForPatchGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterPatchBaselineForPatchGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterPatchBaselineForPatchGroupInput"} - if s.BaselineId == nil { - invalidParams.Add(request.NewErrParamRequired("BaselineId")) - } - if s.BaselineId != nil && len(*s.BaselineId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("BaselineId", 20)) - } - if s.PatchGroup == nil { - invalidParams.Add(request.NewErrParamRequired("PatchGroup")) - } - if s.PatchGroup != nil && len(*s.PatchGroup) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PatchGroup", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBaselineId sets the BaselineId field's value. -func (s *RegisterPatchBaselineForPatchGroupInput) SetBaselineId(v string) *RegisterPatchBaselineForPatchGroupInput { - s.BaselineId = &v - return s -} - -// SetPatchGroup sets the PatchGroup field's value. -func (s *RegisterPatchBaselineForPatchGroupInput) SetPatchGroup(v string) *RegisterPatchBaselineForPatchGroupInput { - s.PatchGroup = &v - return s -} - -type RegisterPatchBaselineForPatchGroupOutput struct { - _ struct{} `type:"structure"` - - // The ID of the patch baseline the patch group was registered with. - BaselineId *string `min:"20" type:"string"` - - // The name of the patch group registered with the patch baseline. - PatchGroup *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s RegisterPatchBaselineForPatchGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterPatchBaselineForPatchGroupOutput) GoString() string { - return s.String() -} - -// SetBaselineId sets the BaselineId field's value. -func (s *RegisterPatchBaselineForPatchGroupOutput) SetBaselineId(v string) *RegisterPatchBaselineForPatchGroupOutput { - s.BaselineId = &v - return s -} - -// SetPatchGroup sets the PatchGroup field's value. -func (s *RegisterPatchBaselineForPatchGroupOutput) SetPatchGroup(v string) *RegisterPatchBaselineForPatchGroupOutput { - s.PatchGroup = &v - return s -} - -type RegisterTargetWithMaintenanceWindowInput struct { - _ struct{} `type:"structure"` - - // User-provided idempotency token. - ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // An optional description for the target. - Description *string `min:"1" type:"string" sensitive:"true"` - - // An optional name for the target. - Name *string `min:"3" type:"string"` - - // User-provided value that will be included in any CloudWatch events raised - // while running tasks for these targets in this Maintenance Window. - OwnerInformation *string `min:"1" type:"string" sensitive:"true"` - - // The type of target being registered with the Maintenance Window. - // - // ResourceType is a required field - ResourceType *string `type:"string" required:"true" enum:"MaintenanceWindowResourceType"` - - // The targets (either instances or tags). - // - // Specify instances using the following format: - // - // Key=InstanceIds,Values=, - // - // Specify tags using either of the following formats: - // - // Key=tag:,Values=, - // - // Key=tag-key,Values=, - // - // Targets is a required field - Targets []*Target `type:"list" required:"true"` - - // The ID of the Maintenance Window the target should be registered with. - // - // WindowId is a required field - WindowId *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterTargetWithMaintenanceWindowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterTargetWithMaintenanceWindowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterTargetWithMaintenanceWindowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterTargetWithMaintenanceWindowInput"} - if s.ClientToken != nil && len(*s.ClientToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) - } - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.Name != nil && len(*s.Name) < 3 { - invalidParams.Add(request.NewErrParamMinLen("Name", 3)) - } - if s.OwnerInformation != nil && len(*s.OwnerInformation) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OwnerInformation", 1)) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - if s.Targets == nil { - invalidParams.Add(request.NewErrParamRequired("Targets")) - } - if s.WindowId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowId")) - } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *RegisterTargetWithMaintenanceWindowInput) SetClientToken(v string) *RegisterTargetWithMaintenanceWindowInput { - s.ClientToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *RegisterTargetWithMaintenanceWindowInput) SetDescription(v string) *RegisterTargetWithMaintenanceWindowInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *RegisterTargetWithMaintenanceWindowInput) SetName(v string) *RegisterTargetWithMaintenanceWindowInput { - s.Name = &v - return s -} - -// SetOwnerInformation sets the OwnerInformation field's value. -func (s *RegisterTargetWithMaintenanceWindowInput) SetOwnerInformation(v string) *RegisterTargetWithMaintenanceWindowInput { - s.OwnerInformation = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *RegisterTargetWithMaintenanceWindowInput) SetResourceType(v string) *RegisterTargetWithMaintenanceWindowInput { - s.ResourceType = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *RegisterTargetWithMaintenanceWindowInput) SetTargets(v []*Target) *RegisterTargetWithMaintenanceWindowInput { - s.Targets = v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *RegisterTargetWithMaintenanceWindowInput) SetWindowId(v string) *RegisterTargetWithMaintenanceWindowInput { - s.WindowId = &v - return s -} - -type RegisterTargetWithMaintenanceWindowOutput struct { - _ struct{} `type:"structure"` - - // The ID of the target definition in this Maintenance Window. - WindowTargetId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s RegisterTargetWithMaintenanceWindowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterTargetWithMaintenanceWindowOutput) GoString() string { - return s.String() -} - -// SetWindowTargetId sets the WindowTargetId field's value. -func (s *RegisterTargetWithMaintenanceWindowOutput) SetWindowTargetId(v string) *RegisterTargetWithMaintenanceWindowOutput { - s.WindowTargetId = &v - return s -} - -type RegisterTaskWithMaintenanceWindowInput struct { - _ struct{} `type:"structure"` - - // User-provided idempotency token. - ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // An optional description for the task. - Description *string `min:"1" type:"string" sensitive:"true"` - - // A structure containing information about an Amazon S3 bucket to write instance-level - // logs to. - // - // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, - // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters - // structure. For information about how Systems Manager handles these options - // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - LoggingInfo *LoggingInfo `type:"structure"` - - // The maximum number of targets this task can be run for in parallel. - // - // MaxConcurrency is a required field - MaxConcurrency *string `min:"1" type:"string" required:"true"` - - // The maximum number of errors allowed before this task stops being scheduled. - // - // MaxErrors is a required field - MaxErrors *string `min:"1" type:"string" required:"true"` - - // An optional name for the task. - Name *string `min:"3" type:"string"` - - // The priority of the task in the Maintenance Window, the lower the number - // the higher the priority. Tasks in a Maintenance Window are scheduled in priority - // order with tasks that have the same priority scheduled in parallel. - Priority *int64 `type:"integer"` - - // The role to assume when running the Maintenance Window task. - // - // If you do not specify a service role ARN, Systems Manager will use your account's - // service-linked role for Systems Manager by default. If no service-linked - // role for Systems Manager exists in your account, it will be created when - // you run RegisterTaskWithMaintenanceWindow without specifying a service role - // ARN. - // - // For more information, see Service-Linked Role Permissions for Systems Manager - // (http://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions) - // and Should I Use a Service-Linked Role or a Custom Service Role to Run Maintenance - // Window Tasks? (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role) - // in the AWS Systems Manager User Guide. - ServiceRoleArn *string `type:"string"` - - // The targets (either instances or Maintenance Window targets). - // - // Specify instances using the following format: - // - // Key=InstanceIds,Values=, - // - // Specify Maintenance Window targets using the following format: - // - // Key=,Values=, - // - // Targets is a required field - Targets []*Target `type:"list" required:"true"` - - // The ARN of the task to execute - // - // TaskArn is a required field - TaskArn *string `min:"1" type:"string" required:"true"` - - // The parameters that the task should use during execution. Populate only the - // fields that match the task type. All other fields should be empty. - TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` - - // The parameters that should be passed to the task when it is executed. - // - // TaskParameters has been deprecated. To specify parameters to pass to a task - // when it runs, instead use the Parameters option in the TaskInvocationParameters - // structure. For information about how Systems Manager handles these options - // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` - - // The type of task being registered. - // - // TaskType is a required field - TaskType *string `type:"string" required:"true" enum:"MaintenanceWindowTaskType"` - - // The ID of the Maintenance Window the task should be added to. - // - // WindowId is a required field - WindowId *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterTaskWithMaintenanceWindowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterTaskWithMaintenanceWindowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterTaskWithMaintenanceWindowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterTaskWithMaintenanceWindowInput"} - if s.ClientToken != nil && len(*s.ClientToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) - } - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.MaxConcurrency == nil { - invalidParams.Add(request.NewErrParamRequired("MaxConcurrency")) - } - if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) - } - if s.MaxErrors == nil { - invalidParams.Add(request.NewErrParamRequired("MaxErrors")) - } - if s.MaxErrors != nil && len(*s.MaxErrors) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MaxErrors", 1)) - } - if s.Name != nil && len(*s.Name) < 3 { - invalidParams.Add(request.NewErrParamMinLen("Name", 3)) - } - if s.Targets == nil { - invalidParams.Add(request.NewErrParamRequired("Targets")) - } - if s.TaskArn == nil { - invalidParams.Add(request.NewErrParamRequired("TaskArn")) - } - if s.TaskArn != nil && len(*s.TaskArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskArn", 1)) - } - if s.TaskType == nil { - invalidParams.Add(request.NewErrParamRequired("TaskType")) - } - if s.WindowId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowId")) - } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) - } - if s.LoggingInfo != nil { - if err := s.LoggingInfo.Validate(); err != nil { - invalidParams.AddNested("LoggingInfo", err.(request.ErrInvalidParams)) - } - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - if s.TaskInvocationParameters != nil { - if err := s.TaskInvocationParameters.Validate(); err != nil { - invalidParams.AddNested("TaskInvocationParameters", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *RegisterTaskWithMaintenanceWindowInput) SetClientToken(v string) *RegisterTaskWithMaintenanceWindowInput { - s.ClientToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *RegisterTaskWithMaintenanceWindowInput) SetDescription(v string) *RegisterTaskWithMaintenanceWindowInput { - s.Description = &v - return s -} - -// SetLoggingInfo sets the LoggingInfo field's value. -func (s *RegisterTaskWithMaintenanceWindowInput) SetLoggingInfo(v *LoggingInfo) *RegisterTaskWithMaintenanceWindowInput { - s.LoggingInfo = v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *RegisterTaskWithMaintenanceWindowInput) SetMaxConcurrency(v string) *RegisterTaskWithMaintenanceWindowInput { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *RegisterTaskWithMaintenanceWindowInput) SetMaxErrors(v string) *RegisterTaskWithMaintenanceWindowInput { - s.MaxErrors = &v - return s -} - -// SetName sets the Name field's value. -func (s *RegisterTaskWithMaintenanceWindowInput) SetName(v string) *RegisterTaskWithMaintenanceWindowInput { - s.Name = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *RegisterTaskWithMaintenanceWindowInput) SetPriority(v int64) *RegisterTaskWithMaintenanceWindowInput { - s.Priority = &v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *RegisterTaskWithMaintenanceWindowInput) SetServiceRoleArn(v string) *RegisterTaskWithMaintenanceWindowInput { - s.ServiceRoleArn = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *RegisterTaskWithMaintenanceWindowInput) SetTargets(v []*Target) *RegisterTaskWithMaintenanceWindowInput { - s.Targets = v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *RegisterTaskWithMaintenanceWindowInput) SetTaskArn(v string) *RegisterTaskWithMaintenanceWindowInput { - s.TaskArn = &v - return s -} - -// SetTaskInvocationParameters sets the TaskInvocationParameters field's value. -func (s *RegisterTaskWithMaintenanceWindowInput) SetTaskInvocationParameters(v *MaintenanceWindowTaskInvocationParameters) *RegisterTaskWithMaintenanceWindowInput { - s.TaskInvocationParameters = v - return s -} - -// SetTaskParameters sets the TaskParameters field's value. -func (s *RegisterTaskWithMaintenanceWindowInput) SetTaskParameters(v map[string]*MaintenanceWindowTaskParameterValueExpression) *RegisterTaskWithMaintenanceWindowInput { - s.TaskParameters = v - return s -} - -// SetTaskType sets the TaskType field's value. -func (s *RegisterTaskWithMaintenanceWindowInput) SetTaskType(v string) *RegisterTaskWithMaintenanceWindowInput { - s.TaskType = &v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *RegisterTaskWithMaintenanceWindowInput) SetWindowId(v string) *RegisterTaskWithMaintenanceWindowInput { - s.WindowId = &v - return s -} - -type RegisterTaskWithMaintenanceWindowOutput struct { - _ struct{} `type:"structure"` - - // The ID of the task in the Maintenance Window. - WindowTaskId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s RegisterTaskWithMaintenanceWindowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterTaskWithMaintenanceWindowOutput) GoString() string { - return s.String() -} - -// SetWindowTaskId sets the WindowTaskId field's value. -func (s *RegisterTaskWithMaintenanceWindowOutput) SetWindowTaskId(v string) *RegisterTaskWithMaintenanceWindowOutput { - s.WindowTaskId = &v - return s -} - -type RemoveTagsFromResourceInput struct { - _ struct{} `type:"structure"` - - // The resource ID for which you want to remove tags. Use the ID of the resource. - // Here are some examples: - // - // ManagedInstance: mi-012345abcde - // - // MaintenanceWindow: mw-012345abcde - // - // PatchBaseline: pb-012345abcde - // - // For the Document and Parameter values, use the name of the resource. - // - // The ManagedInstance type for this API action is only for on-premises managed - // instances. You must specify the the name of the managed instance in the following - // format: mi-ID_number. For example, mi-1a2b3c4d5e6f. - // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` - - // The type of resource of which you want to remove a tag. - // - // The ManagedInstance type for this API action is only for on-premises managed - // instances. You must specify the the name of the managed instance in the following - // format: mi-ID_number. For example, mi-1a2b3c4d5e6f. - // - // ResourceType is a required field - ResourceType *string `type:"string" required:"true" enum:"ResourceTypeForTagging"` - - // Tag keys that you want to remove from the specified resource. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsFromResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *RemoveTagsFromResourceInput) SetResourceId(v string) *RemoveTagsFromResourceInput { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *RemoveTagsFromResourceInput) SetResourceType(v string) *RemoveTagsFromResourceInput { - s.ResourceType = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsFromResourceInput) SetTagKeys(v []*string) *RemoveTagsFromResourceInput { - s.TagKeys = v - return s -} - -type RemoveTagsFromResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceOutput) GoString() string { - return s.String() -} - -// Information about targets that resolved during the Automation execution. -type ResolvedTargets struct { - _ struct{} `type:"structure"` - - // A list of parameter values sent to targets that resolved during the Automation - // execution. - ParameterValues []*string `type:"list"` - - // A boolean value indicating whether the resolved target list is truncated. - Truncated *bool `type:"boolean"` -} - -// String returns the string representation -func (s ResolvedTargets) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResolvedTargets) GoString() string { - return s.String() -} - -// SetParameterValues sets the ParameterValues field's value. -func (s *ResolvedTargets) SetParameterValues(v []*string) *ResolvedTargets { - s.ParameterValues = v - return s -} - -// SetTruncated sets the Truncated field's value. -func (s *ResolvedTargets) SetTruncated(v bool) *ResolvedTargets { - s.Truncated = &v - return s -} - -// Compliance summary information for a specific resource. -type ResourceComplianceSummaryItem struct { - _ struct{} `type:"structure"` - - // The compliance type. - ComplianceType *string `min:"1" type:"string"` - - // A list of items that are compliant for the resource. - CompliantSummary *CompliantSummary `type:"structure"` - - // Information about the execution. - ExecutionSummary *ComplianceExecutionSummary `type:"structure"` - - // A list of items that aren't compliant for the resource. - NonCompliantSummary *NonCompliantSummary `type:"structure"` - - // The highest severity item found for the resource. The resource is compliant - // for this item. - OverallSeverity *string `type:"string" enum:"ComplianceSeverity"` - - // The resource ID. - ResourceId *string `min:"1" type:"string"` - - // The resource type. - ResourceType *string `min:"1" type:"string"` - - // The compliance status for the resource. - Status *string `type:"string" enum:"ComplianceStatus"` -} - -// String returns the string representation -func (s ResourceComplianceSummaryItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceComplianceSummaryItem) GoString() string { - return s.String() -} - -// SetComplianceType sets the ComplianceType field's value. -func (s *ResourceComplianceSummaryItem) SetComplianceType(v string) *ResourceComplianceSummaryItem { - s.ComplianceType = &v - return s -} - -// SetCompliantSummary sets the CompliantSummary field's value. -func (s *ResourceComplianceSummaryItem) SetCompliantSummary(v *CompliantSummary) *ResourceComplianceSummaryItem { - s.CompliantSummary = v - return s -} - -// SetExecutionSummary sets the ExecutionSummary field's value. -func (s *ResourceComplianceSummaryItem) SetExecutionSummary(v *ComplianceExecutionSummary) *ResourceComplianceSummaryItem { - s.ExecutionSummary = v - return s -} - -// SetNonCompliantSummary sets the NonCompliantSummary field's value. -func (s *ResourceComplianceSummaryItem) SetNonCompliantSummary(v *NonCompliantSummary) *ResourceComplianceSummaryItem { - s.NonCompliantSummary = v - return s -} - -// SetOverallSeverity sets the OverallSeverity field's value. -func (s *ResourceComplianceSummaryItem) SetOverallSeverity(v string) *ResourceComplianceSummaryItem { - s.OverallSeverity = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ResourceComplianceSummaryItem) SetResourceId(v string) *ResourceComplianceSummaryItem { - s.ResourceId = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *ResourceComplianceSummaryItem) SetResourceType(v string) *ResourceComplianceSummaryItem { - s.ResourceType = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ResourceComplianceSummaryItem) SetStatus(v string) *ResourceComplianceSummaryItem { - s.Status = &v - return s -} - -// Information about a Resource Data Sync configuration, including its current -// status and last successful sync. -type ResourceDataSyncItem struct { - _ struct{} `type:"structure"` - - // The status reported by the last sync. - LastStatus *string `type:"string" enum:"LastResourceDataSyncStatus"` - - // The last time the sync operations returned a status of SUCCESSFUL (UTC). - LastSuccessfulSyncTime *time.Time `type:"timestamp"` - - // The status message details reported by the last sync. - LastSyncStatusMessage *string `type:"string"` - - // The last time the configuration attempted to sync (UTC). - LastSyncTime *time.Time `type:"timestamp"` - - // Configuration information for the target Amazon S3 bucket. - S3Destination *ResourceDataSyncS3Destination `type:"structure"` - - // The date and time the configuration was created (UTC). - SyncCreatedTime *time.Time `type:"timestamp"` - - // The name of the Resource Data Sync. - SyncName *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ResourceDataSyncItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceDataSyncItem) GoString() string { - return s.String() -} - -// SetLastStatus sets the LastStatus field's value. -func (s *ResourceDataSyncItem) SetLastStatus(v string) *ResourceDataSyncItem { - s.LastStatus = &v - return s -} - -// SetLastSuccessfulSyncTime sets the LastSuccessfulSyncTime field's value. -func (s *ResourceDataSyncItem) SetLastSuccessfulSyncTime(v time.Time) *ResourceDataSyncItem { - s.LastSuccessfulSyncTime = &v - return s -} - -// SetLastSyncStatusMessage sets the LastSyncStatusMessage field's value. -func (s *ResourceDataSyncItem) SetLastSyncStatusMessage(v string) *ResourceDataSyncItem { - s.LastSyncStatusMessage = &v - return s -} - -// SetLastSyncTime sets the LastSyncTime field's value. -func (s *ResourceDataSyncItem) SetLastSyncTime(v time.Time) *ResourceDataSyncItem { - s.LastSyncTime = &v - return s -} - -// SetS3Destination sets the S3Destination field's value. -func (s *ResourceDataSyncItem) SetS3Destination(v *ResourceDataSyncS3Destination) *ResourceDataSyncItem { - s.S3Destination = v - return s -} - -// SetSyncCreatedTime sets the SyncCreatedTime field's value. -func (s *ResourceDataSyncItem) SetSyncCreatedTime(v time.Time) *ResourceDataSyncItem { - s.SyncCreatedTime = &v - return s -} - -// SetSyncName sets the SyncName field's value. -func (s *ResourceDataSyncItem) SetSyncName(v string) *ResourceDataSyncItem { - s.SyncName = &v - return s -} - -// Information about the target Amazon S3 bucket for the Resource Data Sync. -type ResourceDataSyncS3Destination struct { - _ struct{} `type:"structure"` - - // The ARN of an encryption key for a destination in Amazon S3. Must belong - // to the same region as the destination Amazon S3 bucket. - AWSKMSKeyARN *string `min:"1" type:"string"` - - // The name of the Amazon S3 bucket where the aggregated data is stored. - // - // BucketName is a required field - BucketName *string `min:"1" type:"string" required:"true"` - - // An Amazon S3 prefix for the bucket. - Prefix *string `min:"1" type:"string"` - - // The AWS Region with the Amazon S3 bucket targeted by the Resource Data Sync. - // - // Region is a required field - Region *string `min:"1" type:"string" required:"true"` - - // A supported sync format. The following format is currently supported: JsonSerDe - // - // SyncFormat is a required field - SyncFormat *string `type:"string" required:"true" enum:"ResourceDataSyncS3Format"` -} - -// String returns the string representation -func (s ResourceDataSyncS3Destination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResourceDataSyncS3Destination) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResourceDataSyncS3Destination) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResourceDataSyncS3Destination"} - if s.AWSKMSKeyARN != nil && len(*s.AWSKMSKeyARN) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AWSKMSKeyARN", 1)) - } - if s.BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("BucketName")) - } - if s.BucketName != nil && len(*s.BucketName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BucketName", 1)) - } - if s.Prefix != nil && len(*s.Prefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Prefix", 1)) - } - if s.Region == nil { - invalidParams.Add(request.NewErrParamRequired("Region")) - } - if s.Region != nil && len(*s.Region) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Region", 1)) - } - if s.SyncFormat == nil { - invalidParams.Add(request.NewErrParamRequired("SyncFormat")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAWSKMSKeyARN sets the AWSKMSKeyARN field's value. -func (s *ResourceDataSyncS3Destination) SetAWSKMSKeyARN(v string) *ResourceDataSyncS3Destination { - s.AWSKMSKeyARN = &v - return s -} - -// SetBucketName sets the BucketName field's value. -func (s *ResourceDataSyncS3Destination) SetBucketName(v string) *ResourceDataSyncS3Destination { - s.BucketName = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *ResourceDataSyncS3Destination) SetPrefix(v string) *ResourceDataSyncS3Destination { - s.Prefix = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *ResourceDataSyncS3Destination) SetRegion(v string) *ResourceDataSyncS3Destination { - s.Region = &v - return s -} - -// SetSyncFormat sets the SyncFormat field's value. -func (s *ResourceDataSyncS3Destination) SetSyncFormat(v string) *ResourceDataSyncS3Destination { - s.SyncFormat = &v - return s -} - -// The inventory item result attribute. -type ResultAttribute struct { - _ struct{} `type:"structure"` - - // Name of the inventory item type. Valid value: AWS:InstanceInformation. Default - // Value: AWS:InstanceInformation. - // - // TypeName is a required field - TypeName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ResultAttribute) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResultAttribute) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResultAttribute) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResultAttribute"} - if s.TypeName == nil { - invalidParams.Add(request.NewErrParamRequired("TypeName")) - } - if s.TypeName != nil && len(*s.TypeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTypeName sets the TypeName field's value. -func (s *ResultAttribute) SetTypeName(v string) *ResultAttribute { - s.TypeName = &v - return s -} - -type ResumeSessionInput struct { - _ struct{} `type:"structure"` - - // The ID of the disconnected session to resume. - // - // SessionId is a required field - SessionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ResumeSessionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResumeSessionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResumeSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResumeSessionInput"} - if s.SessionId == nil { - invalidParams.Add(request.NewErrParamRequired("SessionId")) - } - if s.SessionId != nil && len(*s.SessionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SessionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSessionId sets the SessionId field's value. -func (s *ResumeSessionInput) SetSessionId(v string) *ResumeSessionInput { - s.SessionId = &v - return s -} - -type ResumeSessionOutput struct { - _ struct{} `type:"structure"` - - // The ID of the session. - SessionId *string `min:"1" type:"string"` - - // A URL back to SSM Agent on the instance that the Session Manager client uses - // to send commands and receive output from the instance. Format: wss://ssm-messages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output). - // - // region represents the Region identifier for an AWS Region supported by AWS - // Systems Manager, such as us-east-2 for the US East (Ohio) Region. For a list - // of supported region values, see the Region column in the AWS Systems Manager - // table of regions and endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#ssm_region) - // in the AWS General Reference. - // - // session-id represents the ID of a Session Manager session, such as 1a2b3c4dEXAMPLE. - StreamUrl *string `type:"string"` - - // An encrypted token value containing session and caller information. Used - // to authenticate the connection to the instance. - TokenValue *string `type:"string"` -} - -// String returns the string representation -func (s ResumeSessionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResumeSessionOutput) GoString() string { - return s.String() -} - -// SetSessionId sets the SessionId field's value. -func (s *ResumeSessionOutput) SetSessionId(v string) *ResumeSessionOutput { - s.SessionId = &v - return s -} - -// SetStreamUrl sets the StreamUrl field's value. -func (s *ResumeSessionOutput) SetStreamUrl(v string) *ResumeSessionOutput { - s.StreamUrl = &v - return s -} - -// SetTokenValue sets the TokenValue field's value. -func (s *ResumeSessionOutput) SetTokenValue(v string) *ResumeSessionOutput { - s.TokenValue = &v - return s -} - -// An Amazon S3 bucket where you want to store the results of this request. -type S3OutputLocation struct { - _ struct{} `type:"structure"` - - // The name of the Amazon S3 bucket. - OutputS3BucketName *string `min:"3" type:"string"` - - // The Amazon S3 bucket subfolder. - OutputS3KeyPrefix *string `type:"string"` - - // (Deprecated) You can no longer specify this parameter. The system ignores - // it. Instead, Systems Manager automatically determines the Amazon S3 bucket - // region. - OutputS3Region *string `min:"3" type:"string"` -} - -// String returns the string representation -func (s S3OutputLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3OutputLocation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3OutputLocation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3OutputLocation"} - if s.OutputS3BucketName != nil && len(*s.OutputS3BucketName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("OutputS3BucketName", 3)) - } - if s.OutputS3Region != nil && len(*s.OutputS3Region) < 3 { - invalidParams.Add(request.NewErrParamMinLen("OutputS3Region", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOutputS3BucketName sets the OutputS3BucketName field's value. -func (s *S3OutputLocation) SetOutputS3BucketName(v string) *S3OutputLocation { - s.OutputS3BucketName = &v - return s -} - -// SetOutputS3KeyPrefix sets the OutputS3KeyPrefix field's value. -func (s *S3OutputLocation) SetOutputS3KeyPrefix(v string) *S3OutputLocation { - s.OutputS3KeyPrefix = &v - return s -} - -// SetOutputS3Region sets the OutputS3Region field's value. -func (s *S3OutputLocation) SetOutputS3Region(v string) *S3OutputLocation { - s.OutputS3Region = &v - return s -} - -// A URL for the Amazon S3 bucket where you want to store the results of this -// request. -type S3OutputUrl struct { - _ struct{} `type:"structure"` - - // A URL for an Amazon S3 bucket where you want to store the results of this - // request. - OutputUrl *string `type:"string"` -} - -// String returns the string representation -func (s S3OutputUrl) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s S3OutputUrl) GoString() string { - return s.String() -} - -// SetOutputUrl sets the OutputUrl field's value. -func (s *S3OutputUrl) SetOutputUrl(v string) *S3OutputUrl { - s.OutputUrl = &v - return s -} - -// Information about a scheduled execution for a Maintenance Window. -type ScheduledWindowExecution struct { - _ struct{} `type:"structure"` - - // The time, in ISO-8601 Extended format, that the Maintenance Window is scheduled - // to be run. - ExecutionTime *string `type:"string"` - - // The name of the Maintenance Window to be run. - Name *string `min:"3" type:"string"` - - // The ID of the Maintenance Window to be run. - WindowId *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s ScheduledWindowExecution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduledWindowExecution) GoString() string { - return s.String() -} - -// SetExecutionTime sets the ExecutionTime field's value. -func (s *ScheduledWindowExecution) SetExecutionTime(v string) *ScheduledWindowExecution { - s.ExecutionTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *ScheduledWindowExecution) SetName(v string) *ScheduledWindowExecution { - s.Name = &v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *ScheduledWindowExecution) SetWindowId(v string) *ScheduledWindowExecution { - s.WindowId = &v - return s -} - -type SendAutomationSignalInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for an existing Automation execution that you want - // to send the signal to. - // - // AutomationExecutionId is a required field - AutomationExecutionId *string `min:"36" type:"string" required:"true"` - - // The data sent with the signal. The data schema depends on the type of signal - // used in the request. - Payload map[string][]*string `min:"1" type:"map"` - - // The type of signal. Valid signal types include the following: Approve and - // Reject - // - // SignalType is a required field - SignalType *string `type:"string" required:"true" enum:"SignalType"` -} - -// String returns the string representation -func (s SendAutomationSignalInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendAutomationSignalInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendAutomationSignalInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendAutomationSignalInput"} - if s.AutomationExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("AutomationExecutionId")) - } - if s.AutomationExecutionId != nil && len(*s.AutomationExecutionId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("AutomationExecutionId", 36)) - } - if s.Payload != nil && len(s.Payload) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Payload", 1)) - } - if s.SignalType == nil { - invalidParams.Add(request.NewErrParamRequired("SignalType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutomationExecutionId sets the AutomationExecutionId field's value. -func (s *SendAutomationSignalInput) SetAutomationExecutionId(v string) *SendAutomationSignalInput { - s.AutomationExecutionId = &v - return s -} - -// SetPayload sets the Payload field's value. -func (s *SendAutomationSignalInput) SetPayload(v map[string][]*string) *SendAutomationSignalInput { - s.Payload = v - return s -} - -// SetSignalType sets the SignalType field's value. -func (s *SendAutomationSignalInput) SetSignalType(v string) *SendAutomationSignalInput { - s.SignalType = &v - return s -} - -type SendAutomationSignalOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SendAutomationSignalOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendAutomationSignalOutput) GoString() string { - return s.String() -} - -type SendCommandInput struct { - _ struct{} `type:"structure"` - - // Enables Systems Manager to send Run Command output to Amazon CloudWatch Logs. - CloudWatchOutputConfig *CloudWatchOutputConfig `type:"structure"` - - // User-specified information about the command, such as a brief description - // of what the command should do. - Comment *string `type:"string"` - - // The Sha256 or Sha1 hash created by the system when the document was created. - // - // Sha1 hashes have been deprecated. - DocumentHash *string `type:"string"` - - // Sha256 or Sha1. - // - // Sha1 hashes have been deprecated. - DocumentHashType *string `type:"string" enum:"DocumentHashType"` - - // Required. The name of the Systems Manager document to execute. This can be - // a public document or a custom document. - // - // DocumentName is a required field - DocumentName *string `type:"string" required:"true"` - - // The SSM document version to use in the request. You can specify $DEFAULT, - // $LATEST, or a specific version number. If you execute commands by using the - // AWS CLI, then you must escape the first two options by using a backslash. - // If you specify a version number, then you don't need to use the backslash. - // For example: - // - // --document-version "\$DEFAULT" - // - // --document-version "\$LATEST" - // - // --document-version "3" - DocumentVersion *string `type:"string"` - - // The instance IDs where the command should execute. You can specify a maximum - // of 50 IDs. If you prefer not to list individual instance IDs, you can instead - // send commands to a fleet of instances using the Targets parameter, which - // accepts EC2 tags. For more information about how to use targets, see Sending - // Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) - // in the AWS Systems Manager User Guide. - InstanceIds []*string `type:"list"` - - // (Optional) The maximum number of instances that are allowed to execute the - // command at the same time. You can specify a number such as 10 or a percentage - // such as 10%. The default value is 50. For more information about how to use - // MaxConcurrency, see Using Concurrency Controls (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-velocity) - // in the AWS Systems Manager User Guide. - MaxConcurrency *string `min:"1" type:"string"` - - // The maximum number of errors allowed without the command failing. When the - // command fails one more time beyond the value of MaxErrors, the systems stops - // sending the command to additional targets. You can specify a number like - // 10 or a percentage like 10%. The default value is 0. For more information - // about how to use MaxErrors, see Using Error Controls (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-maxerrors) - // in the AWS Systems Manager User Guide. - MaxErrors *string `min:"1" type:"string"` - - // Configurations for sending notifications. - NotificationConfig *NotificationConfig `type:"structure"` - - // The name of the S3 bucket where command execution responses should be stored. - OutputS3BucketName *string `min:"3" type:"string"` - - // The directory structure within the S3 bucket where the responses should be - // stored. - OutputS3KeyPrefix *string `type:"string"` - - // (Deprecated) You can no longer specify this parameter. The system ignores - // it. Instead, Systems Manager automatically determines the Amazon S3 bucket - // region. - OutputS3Region *string `min:"3" type:"string"` - - // The required and optional parameters specified in the document being executed. - Parameters map[string][]*string `type:"map"` - - // The IAM role that Systems Manager uses to send notifications. - ServiceRoleArn *string `type:"string"` - - // (Optional) An array of search criteria that targets instances using a Key,Value - // combination that you specify. Targets is required if you don't provide one - // or more instance IDs in the call. For more information about how to use targets, - // see Sending Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) - // in the AWS Systems Manager User Guide. - Targets []*Target `type:"list"` - - // If this time is reached and the command has not already started executing, - // it will not run. - TimeoutSeconds *int64 `min:"30" type:"integer"` -} - -// String returns the string representation -func (s SendCommandInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendCommandInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SendCommandInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SendCommandInput"} - if s.DocumentName == nil { - invalidParams.Add(request.NewErrParamRequired("DocumentName")) - } - if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) - } - if s.MaxErrors != nil && len(*s.MaxErrors) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MaxErrors", 1)) - } - if s.OutputS3BucketName != nil && len(*s.OutputS3BucketName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("OutputS3BucketName", 3)) - } - if s.OutputS3Region != nil && len(*s.OutputS3Region) < 3 { - invalidParams.Add(request.NewErrParamMinLen("OutputS3Region", 3)) - } - if s.TimeoutSeconds != nil && *s.TimeoutSeconds < 30 { - invalidParams.Add(request.NewErrParamMinValue("TimeoutSeconds", 30)) - } - if s.CloudWatchOutputConfig != nil { - if err := s.CloudWatchOutputConfig.Validate(); err != nil { - invalidParams.AddNested("CloudWatchOutputConfig", err.(request.ErrInvalidParams)) - } - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudWatchOutputConfig sets the CloudWatchOutputConfig field's value. -func (s *SendCommandInput) SetCloudWatchOutputConfig(v *CloudWatchOutputConfig) *SendCommandInput { - s.CloudWatchOutputConfig = v - return s -} - -// SetComment sets the Comment field's value. -func (s *SendCommandInput) SetComment(v string) *SendCommandInput { - s.Comment = &v - return s -} - -// SetDocumentHash sets the DocumentHash field's value. -func (s *SendCommandInput) SetDocumentHash(v string) *SendCommandInput { - s.DocumentHash = &v - return s -} - -// SetDocumentHashType sets the DocumentHashType field's value. -func (s *SendCommandInput) SetDocumentHashType(v string) *SendCommandInput { - s.DocumentHashType = &v - return s -} - -// SetDocumentName sets the DocumentName field's value. -func (s *SendCommandInput) SetDocumentName(v string) *SendCommandInput { - s.DocumentName = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *SendCommandInput) SetDocumentVersion(v string) *SendCommandInput { - s.DocumentVersion = &v - return s -} - -// SetInstanceIds sets the InstanceIds field's value. -func (s *SendCommandInput) SetInstanceIds(v []*string) *SendCommandInput { - s.InstanceIds = v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *SendCommandInput) SetMaxConcurrency(v string) *SendCommandInput { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *SendCommandInput) SetMaxErrors(v string) *SendCommandInput { - s.MaxErrors = &v - return s -} - -// SetNotificationConfig sets the NotificationConfig field's value. -func (s *SendCommandInput) SetNotificationConfig(v *NotificationConfig) *SendCommandInput { - s.NotificationConfig = v - return s -} - -// SetOutputS3BucketName sets the OutputS3BucketName field's value. -func (s *SendCommandInput) SetOutputS3BucketName(v string) *SendCommandInput { - s.OutputS3BucketName = &v - return s -} - -// SetOutputS3KeyPrefix sets the OutputS3KeyPrefix field's value. -func (s *SendCommandInput) SetOutputS3KeyPrefix(v string) *SendCommandInput { - s.OutputS3KeyPrefix = &v - return s -} - -// SetOutputS3Region sets the OutputS3Region field's value. -func (s *SendCommandInput) SetOutputS3Region(v string) *SendCommandInput { - s.OutputS3Region = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *SendCommandInput) SetParameters(v map[string][]*string) *SendCommandInput { - s.Parameters = v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *SendCommandInput) SetServiceRoleArn(v string) *SendCommandInput { - s.ServiceRoleArn = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *SendCommandInput) SetTargets(v []*Target) *SendCommandInput { - s.Targets = v - return s -} - -// SetTimeoutSeconds sets the TimeoutSeconds field's value. -func (s *SendCommandInput) SetTimeoutSeconds(v int64) *SendCommandInput { - s.TimeoutSeconds = &v - return s -} - -type SendCommandOutput struct { - _ struct{} `type:"structure"` - - // The request as it was received by Systems Manager. Also provides the command - // ID which can be used future references to this request. - Command *Command `type:"structure"` -} - -// String returns the string representation -func (s SendCommandOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SendCommandOutput) GoString() string { - return s.String() -} - -// SetCommand sets the Command field's value. -func (s *SendCommandOutput) SetCommand(v *Command) *SendCommandOutput { - s.Command = v - return s -} - -// Information about a Session Manager connection to an instance. -type Session struct { - _ struct{} `type:"structure"` - - // Reserved for future use. - Details *string `min:"1" type:"string"` - - // The name of the Session Manager SSM document used to define the parameters - // and plugin settings for the session. For example, SSM-SessionManagerRunShell. - DocumentName *string `type:"string"` - - // The date and time, in ISO-8601 Extended format, when the session was terminated. - EndDate *time.Time `type:"timestamp"` - - // Reserved for future use. - OutputUrl *SessionManagerOutputUrl `type:"structure"` - - // The ID of the AWS user account that started the session. - Owner *string `min:"1" type:"string"` - - // The ID of the session. - SessionId *string `min:"1" type:"string"` - - // The date and time, in ISO-8601 Extended format, when the session began. - StartDate *time.Time `type:"timestamp"` - - // The status of the session. For example, "Connected" or "Terminated". - Status *string `type:"string" enum:"SessionStatus"` - - // The instance that the Session Manager session connected to. - Target *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s Session) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Session) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *Session) SetDetails(v string) *Session { - s.Details = &v - return s -} - -// SetDocumentName sets the DocumentName field's value. -func (s *Session) SetDocumentName(v string) *Session { - s.DocumentName = &v - return s -} - -// SetEndDate sets the EndDate field's value. -func (s *Session) SetEndDate(v time.Time) *Session { - s.EndDate = &v - return s -} - -// SetOutputUrl sets the OutputUrl field's value. -func (s *Session) SetOutputUrl(v *SessionManagerOutputUrl) *Session { - s.OutputUrl = v - return s -} - -// SetOwner sets the Owner field's value. -func (s *Session) SetOwner(v string) *Session { - s.Owner = &v - return s -} - -// SetSessionId sets the SessionId field's value. -func (s *Session) SetSessionId(v string) *Session { - s.SessionId = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *Session) SetStartDate(v time.Time) *Session { - s.StartDate = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Session) SetStatus(v string) *Session { - s.Status = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *Session) SetTarget(v string) *Session { - s.Target = &v - return s -} - -// Describes a filter for Session Manager information. -type SessionFilter struct { - _ struct{} `type:"structure"` - - // The name of the filter. - // - // Key is a required field - Key *string `locationName:"key" type:"string" required:"true" enum:"SessionFilterKey"` - - // The filter value. Valid values for each filter key are as follows: - // - // * InvokedAfter: Specify a timestamp to limit your results. For example, - // specify 2018-08-29T00:00:00Z to see sessions that started August 29, 2018, - // and later. - // - // * InvokedBefore: Specify a timestamp to limit your results. For example, - // specify 2018-08-29T00:00:00Z to see sessions that started before August - // 29, 2018. - // - // * Target: Specify an instance to which session connections have been made. - // - // * Owner: Specify an AWS user account to see a list of sessions started - // by that user. - // - // * Status: Specify a valid session status to see a list of all sessions - // with that status. Status values you can specify include: - // - // Connected - // - // Connecting - // - // Disconnected - // - // Terminated - // - // Terminating - // - // Failed - // - // Value is a required field - Value *string `locationName:"value" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SessionFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SessionFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SessionFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SessionFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *SessionFilter) SetKey(v string) *SessionFilter { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *SessionFilter) SetValue(v string) *SessionFilter { - s.Value = &v - return s -} - -// Reserved for future use. -type SessionManagerOutputUrl struct { - _ struct{} `type:"structure"` - - // Reserved for future use. - CloudWatchOutputUrl *string `min:"1" type:"string"` - - // Reserved for future use. - S3OutputUrl *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s SessionManagerOutputUrl) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SessionManagerOutputUrl) GoString() string { - return s.String() -} - -// SetCloudWatchOutputUrl sets the CloudWatchOutputUrl field's value. -func (s *SessionManagerOutputUrl) SetCloudWatchOutputUrl(v string) *SessionManagerOutputUrl { - s.CloudWatchOutputUrl = &v - return s -} - -// SetS3OutputUrl sets the S3OutputUrl field's value. -func (s *SessionManagerOutputUrl) SetS3OutputUrl(v string) *SessionManagerOutputUrl { - s.S3OutputUrl = &v - return s -} - -// The number of managed instances found for each patch severity level defined -// in the request filter. -type SeveritySummary struct { - _ struct{} `type:"structure"` - - // The total number of resources or compliance items that have a severity level - // of critical. Critical severity is determined by the organization that published - // the compliance items. - CriticalCount *int64 `type:"integer"` - - // The total number of resources or compliance items that have a severity level - // of high. High severity is determined by the organization that published the - // compliance items. - HighCount *int64 `type:"integer"` - - // The total number of resources or compliance items that have a severity level - // of informational. Informational severity is determined by the organization - // that published the compliance items. - InformationalCount *int64 `type:"integer"` - - // The total number of resources or compliance items that have a severity level - // of low. Low severity is determined by the organization that published the - // compliance items. - LowCount *int64 `type:"integer"` - - // The total number of resources or compliance items that have a severity level - // of medium. Medium severity is determined by the organization that published - // the compliance items. - MediumCount *int64 `type:"integer"` - - // The total number of resources or compliance items that have a severity level - // of unspecified. Unspecified severity is determined by the organization that - // published the compliance items. - UnspecifiedCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s SeveritySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SeveritySummary) GoString() string { - return s.String() -} - -// SetCriticalCount sets the CriticalCount field's value. -func (s *SeveritySummary) SetCriticalCount(v int64) *SeveritySummary { - s.CriticalCount = &v - return s -} - -// SetHighCount sets the HighCount field's value. -func (s *SeveritySummary) SetHighCount(v int64) *SeveritySummary { - s.HighCount = &v - return s -} - -// SetInformationalCount sets the InformationalCount field's value. -func (s *SeveritySummary) SetInformationalCount(v int64) *SeveritySummary { - s.InformationalCount = &v - return s -} - -// SetLowCount sets the LowCount field's value. -func (s *SeveritySummary) SetLowCount(v int64) *SeveritySummary { - s.LowCount = &v - return s -} - -// SetMediumCount sets the MediumCount field's value. -func (s *SeveritySummary) SetMediumCount(v int64) *SeveritySummary { - s.MediumCount = &v - return s -} - -// SetUnspecifiedCount sets the UnspecifiedCount field's value. -func (s *SeveritySummary) SetUnspecifiedCount(v int64) *SeveritySummary { - s.UnspecifiedCount = &v - return s -} - -type StartAssociationsOnceInput struct { - _ struct{} `type:"structure"` - - // The association IDs that you want to execute immediately and only one time. - // - // AssociationIds is a required field - AssociationIds []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s StartAssociationsOnceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartAssociationsOnceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartAssociationsOnceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartAssociationsOnceInput"} - if s.AssociationIds == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationIds")) - } - if s.AssociationIds != nil && len(s.AssociationIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssociationIds", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationIds sets the AssociationIds field's value. -func (s *StartAssociationsOnceInput) SetAssociationIds(v []*string) *StartAssociationsOnceInput { - s.AssociationIds = v - return s -} - -type StartAssociationsOnceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StartAssociationsOnceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartAssociationsOnceOutput) GoString() string { - return s.String() -} - -type StartAutomationExecutionInput struct { - _ struct{} `type:"structure"` - - // User-provided idempotency token. The token must be unique, is case insensitive, - // enforces the UUID format, and can't be reused. - ClientToken *string `min:"36" type:"string"` - - // The name of the Automation document to use for this execution. - // - // DocumentName is a required field - DocumentName *string `type:"string" required:"true"` - - // The version of the Automation document to use for this execution. - DocumentVersion *string `type:"string"` - - // The maximum number of targets allowed to run this task in parallel. You can - // specify a number, such as 10, or a percentage, such as 10%. The default value - // is 10. - MaxConcurrency *string `min:"1" type:"string"` - - // The number of errors that are allowed before the system stops running the - // automation on additional targets. You can specify either an absolute number - // of errors, for example 10, or a percentage of the target set, for example - // 10%. If you specify 3, for example, the system stops running the automation - // when the fourth error is received. If you specify 0, then the system stops - // running the automation on additional targets after the first error result - // is returned. If you run an automation on 50 resources and set max-errors - // to 10%, then the system stops running the automation on additional targets - // when the sixth error is received. - // - // Executions that are already running an automation when max-errors is reached - // are allowed to complete, but some of these executions may fail as well. If - // you need to ensure that there won't be more than max-errors failed executions, - // set max-concurrency to 1 so the executions proceed one at a time. - MaxErrors *string `min:"1" type:"string"` - - // The execution mode of the automation. Valid modes include the following: - // Auto and Interactive. The default mode is Auto. - Mode *string `type:"string" enum:"ExecutionMode"` - - // A key-value map of execution parameters, which match the declared parameters - // in the Automation document. - Parameters map[string][]*string `min:"1" type:"map"` - - // A location is a combination of AWS Regions and/or AWS accounts where you - // want to execute the Automation. Use this action to start an Automation in - // multiple Regions and multiple accounts. For more information, see Concurrently - // Executing Automations in Multiple AWS Regions and Accounts (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html) - // in the AWS Systems Manager User Guide. - TargetLocations []*TargetLocation `min:"1" type:"list"` - - // A key-value mapping of document parameters to target resources. Both Targets - // and TargetMaps cannot be specified together. - TargetMaps []map[string][]*string `type:"list"` - - // The name of the parameter used as the target resource for the rate-controlled - // execution. Required if you specify targets. - TargetParameterName *string `min:"1" type:"string"` - - // A key-value mapping to target resources. Required if you specify TargetParameterName. - Targets []*Target `type:"list"` -} - -// String returns the string representation -func (s StartAutomationExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartAutomationExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartAutomationExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartAutomationExecutionInput"} - if s.ClientToken != nil && len(*s.ClientToken) < 36 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 36)) - } - if s.DocumentName == nil { - invalidParams.Add(request.NewErrParamRequired("DocumentName")) - } - if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) - } - if s.MaxErrors != nil && len(*s.MaxErrors) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MaxErrors", 1)) - } - if s.Parameters != nil && len(s.Parameters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Parameters", 1)) - } - if s.TargetLocations != nil && len(s.TargetLocations) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetLocations", 1)) - } - if s.TargetParameterName != nil && len(*s.TargetParameterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetParameterName", 1)) - } - if s.TargetLocations != nil { - for i, v := range s.TargetLocations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetLocations", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *StartAutomationExecutionInput) SetClientToken(v string) *StartAutomationExecutionInput { - s.ClientToken = &v - return s -} - -// SetDocumentName sets the DocumentName field's value. -func (s *StartAutomationExecutionInput) SetDocumentName(v string) *StartAutomationExecutionInput { - s.DocumentName = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *StartAutomationExecutionInput) SetDocumentVersion(v string) *StartAutomationExecutionInput { - s.DocumentVersion = &v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *StartAutomationExecutionInput) SetMaxConcurrency(v string) *StartAutomationExecutionInput { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *StartAutomationExecutionInput) SetMaxErrors(v string) *StartAutomationExecutionInput { - s.MaxErrors = &v - return s -} - -// SetMode sets the Mode field's value. -func (s *StartAutomationExecutionInput) SetMode(v string) *StartAutomationExecutionInput { - s.Mode = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *StartAutomationExecutionInput) SetParameters(v map[string][]*string) *StartAutomationExecutionInput { - s.Parameters = v - return s -} - -// SetTargetLocations sets the TargetLocations field's value. -func (s *StartAutomationExecutionInput) SetTargetLocations(v []*TargetLocation) *StartAutomationExecutionInput { - s.TargetLocations = v - return s -} - -// SetTargetMaps sets the TargetMaps field's value. -func (s *StartAutomationExecutionInput) SetTargetMaps(v []map[string][]*string) *StartAutomationExecutionInput { - s.TargetMaps = v - return s -} - -// SetTargetParameterName sets the TargetParameterName field's value. -func (s *StartAutomationExecutionInput) SetTargetParameterName(v string) *StartAutomationExecutionInput { - s.TargetParameterName = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *StartAutomationExecutionInput) SetTargets(v []*Target) *StartAutomationExecutionInput { - s.Targets = v - return s -} - -type StartAutomationExecutionOutput struct { - _ struct{} `type:"structure"` - - // The unique ID of a newly scheduled automation execution. - AutomationExecutionId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s StartAutomationExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartAutomationExecutionOutput) GoString() string { - return s.String() -} - -// SetAutomationExecutionId sets the AutomationExecutionId field's value. -func (s *StartAutomationExecutionOutput) SetAutomationExecutionId(v string) *StartAutomationExecutionOutput { - s.AutomationExecutionId = &v - return s -} - -type StartSessionInput struct { - _ struct{} `type:"structure"` - - // The name of the SSM document to define the parameters and plugin settings - // for the session. For example, SSM-SessionManagerRunShell. If no document - // name is provided, a shell to the instance is launched by default. - DocumentName *string `type:"string"` - - // Reserved for future use. - Parameters map[string][]*string `type:"map"` - - // The instance to connect to for the session. - // - // Target is a required field - Target *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartSessionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartSessionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartSessionInput"} - if s.Target == nil { - invalidParams.Add(request.NewErrParamRequired("Target")) - } - if s.Target != nil && len(*s.Target) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Target", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDocumentName sets the DocumentName field's value. -func (s *StartSessionInput) SetDocumentName(v string) *StartSessionInput { - s.DocumentName = &v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *StartSessionInput) SetParameters(v map[string][]*string) *StartSessionInput { - s.Parameters = v - return s -} - -// SetTarget sets the Target field's value. -func (s *StartSessionInput) SetTarget(v string) *StartSessionInput { - s.Target = &v - return s -} - -type StartSessionOutput struct { - _ struct{} `type:"structure"` - - // The ID of the session. - SessionId *string `min:"1" type:"string"` - - // A URL back to SSM Agent on the instance that the Session Manager client uses - // to send commands and receive output from the instance. Format: wss://ssm-messages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output) - // - // region represents the Region identifier for an AWS Region supported by AWS - // Systems Manager, such as us-east-2 for the US East (Ohio) Region. For a list - // of supported region values, see the Region column in the AWS Systems Manager - // table of regions and endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#ssm_region) - // in the AWS General Reference. - // - // session-id represents the ID of a Session Manager session, such as 1a2b3c4dEXAMPLE. - StreamUrl *string `type:"string"` - - // An encrypted token value containing session and caller information. Used - // to authenticate the connection to the instance. - TokenValue *string `type:"string"` -} - -// String returns the string representation -func (s StartSessionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartSessionOutput) GoString() string { - return s.String() -} - -// SetSessionId sets the SessionId field's value. -func (s *StartSessionOutput) SetSessionId(v string) *StartSessionOutput { - s.SessionId = &v - return s -} - -// SetStreamUrl sets the StreamUrl field's value. -func (s *StartSessionOutput) SetStreamUrl(v string) *StartSessionOutput { - s.StreamUrl = &v - return s -} - -// SetTokenValue sets the TokenValue field's value. -func (s *StartSessionOutput) SetTokenValue(v string) *StartSessionOutput { - s.TokenValue = &v - return s -} - -// Detailed information about an the execution state of an Automation step. -type StepExecution struct { - _ struct{} `type:"structure"` - - // The action this step performs. The action determines the behavior of the - // step. - Action *string `type:"string"` - - // If a step has finished execution, this contains the time the execution ended. - // If the step has not yet concluded, this field is not populated. - ExecutionEndTime *time.Time `type:"timestamp"` - - // If a step has begun execution, this contains the time the step started. If - // the step is in Pending status, this field is not populated. - ExecutionStartTime *time.Time `type:"timestamp"` - - // Information about the Automation failure. - FailureDetails *FailureDetails `type:"structure"` - - // If a step failed, this message explains why the execution failed. - FailureMessage *string `type:"string"` - - // Fully-resolved values passed into the step before execution. - Inputs map[string]*string `type:"map"` - - // The flag which can be used to help decide whether the failure of current - // step leads to the Automation failure. - IsCritical *bool `type:"boolean"` - - // The flag which can be used to end automation no matter whether the step succeeds - // or fails. - IsEnd *bool `type:"boolean"` - - // The maximum number of tries to run the action of the step. The default value - // is 1. - MaxAttempts *int64 `type:"integer"` - - // The next step after the step succeeds. - NextStep *string `type:"string"` - - // The action to take if the step fails. The default value is Abort. - OnFailure *string `type:"string"` - - // Returned values from the execution of the step. - Outputs map[string][]*string `min:"1" type:"map"` - - // A user-specified list of parameters to override when executing a step. - OverriddenParameters map[string][]*string `min:"1" type:"map"` - - // A message associated with the response code for an execution. - Response *string `type:"string"` - - // The response code returned by the execution of the step. - ResponseCode *string `type:"string"` - - // The unique ID of a step execution. - StepExecutionId *string `type:"string"` - - // The name of this execution step. - StepName *string `type:"string"` - - // The execution status for this step. Valid values include: Pending, InProgress, - // Success, Cancelled, Failed, and TimedOut. - StepStatus *string `type:"string" enum:"AutomationExecutionStatus"` - - // The combination of AWS Regions and accounts targeted by the current Automation - // execution. - TargetLocation *TargetLocation `type:"structure"` - - // The targets for the step execution. - Targets []*Target `type:"list"` - - // The timeout seconds of the step. - TimeoutSeconds *int64 `type:"long"` - - // Strategies used when step fails, we support Continue and Abort. Abort will - // fail the automation when the step fails. Continue will ignore the failure - // of current step and allow automation to execute the next step. With conditional - // branching, we add step:stepName to support the automation to go to another - // specific step. - ValidNextSteps []*string `type:"list"` -} - -// String returns the string representation -func (s StepExecution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StepExecution) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *StepExecution) SetAction(v string) *StepExecution { - s.Action = &v - return s -} - -// SetExecutionEndTime sets the ExecutionEndTime field's value. -func (s *StepExecution) SetExecutionEndTime(v time.Time) *StepExecution { - s.ExecutionEndTime = &v - return s -} - -// SetExecutionStartTime sets the ExecutionStartTime field's value. -func (s *StepExecution) SetExecutionStartTime(v time.Time) *StepExecution { - s.ExecutionStartTime = &v - return s -} - -// SetFailureDetails sets the FailureDetails field's value. -func (s *StepExecution) SetFailureDetails(v *FailureDetails) *StepExecution { - s.FailureDetails = v - return s -} - -// SetFailureMessage sets the FailureMessage field's value. -func (s *StepExecution) SetFailureMessage(v string) *StepExecution { - s.FailureMessage = &v - return s -} - -// SetInputs sets the Inputs field's value. -func (s *StepExecution) SetInputs(v map[string]*string) *StepExecution { - s.Inputs = v - return s -} - -// SetIsCritical sets the IsCritical field's value. -func (s *StepExecution) SetIsCritical(v bool) *StepExecution { - s.IsCritical = &v - return s -} - -// SetIsEnd sets the IsEnd field's value. -func (s *StepExecution) SetIsEnd(v bool) *StepExecution { - s.IsEnd = &v - return s -} - -// SetMaxAttempts sets the MaxAttempts field's value. -func (s *StepExecution) SetMaxAttempts(v int64) *StepExecution { - s.MaxAttempts = &v - return s -} - -// SetNextStep sets the NextStep field's value. -func (s *StepExecution) SetNextStep(v string) *StepExecution { - s.NextStep = &v - return s -} - -// SetOnFailure sets the OnFailure field's value. -func (s *StepExecution) SetOnFailure(v string) *StepExecution { - s.OnFailure = &v - return s -} - -// SetOutputs sets the Outputs field's value. -func (s *StepExecution) SetOutputs(v map[string][]*string) *StepExecution { - s.Outputs = v - return s -} - -// SetOverriddenParameters sets the OverriddenParameters field's value. -func (s *StepExecution) SetOverriddenParameters(v map[string][]*string) *StepExecution { - s.OverriddenParameters = v - return s -} - -// SetResponse sets the Response field's value. -func (s *StepExecution) SetResponse(v string) *StepExecution { - s.Response = &v - return s -} - -// SetResponseCode sets the ResponseCode field's value. -func (s *StepExecution) SetResponseCode(v string) *StepExecution { - s.ResponseCode = &v - return s -} - -// SetStepExecutionId sets the StepExecutionId field's value. -func (s *StepExecution) SetStepExecutionId(v string) *StepExecution { - s.StepExecutionId = &v - return s -} - -// SetStepName sets the StepName field's value. -func (s *StepExecution) SetStepName(v string) *StepExecution { - s.StepName = &v - return s -} - -// SetStepStatus sets the StepStatus field's value. -func (s *StepExecution) SetStepStatus(v string) *StepExecution { - s.StepStatus = &v - return s -} - -// SetTargetLocation sets the TargetLocation field's value. -func (s *StepExecution) SetTargetLocation(v *TargetLocation) *StepExecution { - s.TargetLocation = v - return s -} - -// SetTargets sets the Targets field's value. -func (s *StepExecution) SetTargets(v []*Target) *StepExecution { - s.Targets = v - return s -} - -// SetTimeoutSeconds sets the TimeoutSeconds field's value. -func (s *StepExecution) SetTimeoutSeconds(v int64) *StepExecution { - s.TimeoutSeconds = &v - return s -} - -// SetValidNextSteps sets the ValidNextSteps field's value. -func (s *StepExecution) SetValidNextSteps(v []*string) *StepExecution { - s.ValidNextSteps = v - return s -} - -// A filter to limit the amount of step execution information returned by the -// call. -type StepExecutionFilter struct { - _ struct{} `type:"structure"` - - // One or more keys to limit the results. Valid filter keys include the following: - // StepName, Action, StepExecutionId, StepExecutionStatus, StartTimeBefore, - // StartTimeAfter. - // - // Key is a required field - Key *string `type:"string" required:"true" enum:"StepExecutionFilterKey"` - - // The values of the filter key. - // - // Values is a required field - Values []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s StepExecutionFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StepExecutionFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StepExecutionFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StepExecutionFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - if s.Values != nil && len(s.Values) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Values", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *StepExecutionFilter) SetKey(v string) *StepExecutionFilter { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *StepExecutionFilter) SetValues(v []*string) *StepExecutionFilter { - s.Values = v - return s -} - -type StopAutomationExecutionInput struct { - _ struct{} `type:"structure"` - - // The execution ID of the Automation to stop. - // - // AutomationExecutionId is a required field - AutomationExecutionId *string `min:"36" type:"string" required:"true"` - - // The stop request type. Valid types include the following: Cancel and Complete. - // The default type is Cancel. - Type *string `type:"string" enum:"StopType"` -} - -// String returns the string representation -func (s StopAutomationExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopAutomationExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopAutomationExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopAutomationExecutionInput"} - if s.AutomationExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("AutomationExecutionId")) - } - if s.AutomationExecutionId != nil && len(*s.AutomationExecutionId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("AutomationExecutionId", 36)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAutomationExecutionId sets the AutomationExecutionId field's value. -func (s *StopAutomationExecutionInput) SetAutomationExecutionId(v string) *StopAutomationExecutionInput { - s.AutomationExecutionId = &v - return s -} - -// SetType sets the Type field's value. -func (s *StopAutomationExecutionInput) SetType(v string) *StopAutomationExecutionInput { - s.Type = &v - return s -} - -type StopAutomationExecutionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopAutomationExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopAutomationExecutionOutput) GoString() string { - return s.String() -} - -// Metadata that you assign to your AWS resources. Tags enable you to categorize -// your resources in different ways, for example, by purpose, owner, or environment. -// In Systems Manager, you can apply tags to documents, managed instances, Maintenance -// Windows, Parameter Store parameters, and patch baselines. -type Tag struct { - _ struct{} `type:"structure"` - - // The name of the tag. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The value of the tag. - // - // Value is a required field - Value *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// An array of search criteria that targets instances using a Key,Value combination -// that you specify. Targets is required if you don't provide one or more instance -// IDs in the call. -type Target struct { - _ struct{} `type:"structure"` - - // User-defined criteria for sending commands that target instances that meet - // the criteria. Key can be tag: or InstanceIds. For more information - // about how to send commands that target instances using Key,Value parameters, - // see Targeting Multiple Instances (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting) - // in the AWS Systems Manager User Guide. - Key *string `min:"1" type:"string"` - - // User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, - // you could specify value:WebServer to execute a command on instances that - // include Amazon EC2 tags of ServerRole,WebServer. For more information about - // how to send commands that target instances using Key,Value parameters, see - // Sending Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) - // in the AWS Systems Manager User Guide. - Values []*string `type:"list"` -} - -// String returns the string representation -func (s Target) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Target) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Target) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Target"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Target) SetKey(v string) *Target { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *Target) SetValues(v []*string) *Target { - s.Values = v - return s -} - -// The combination of AWS Regions and accounts targeted by the current Automation -// execution. -type TargetLocation struct { - _ struct{} `type:"structure"` - - // The AWS accounts targeted by the current Automation execution. - Accounts []*string `min:"1" type:"list"` - - // The Automation execution role used by the currently executing Automation. - ExecutionRoleName *string `min:"1" type:"string"` - - // The AWS Regions targeted by the current Automation execution. - Regions []*string `min:"1" type:"list"` - - // The maxium number of AWS accounts and AWS regions allowed to run the Automation - // concurrently - TargetLocationMaxConcurrency *string `min:"1" type:"string"` - - // The maxium number of errors allowed before the system stops queueing additional - // Automation executions for the currently executing Automation. - TargetLocationMaxErrors *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s TargetLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TargetLocation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetLocation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetLocation"} - if s.Accounts != nil && len(s.Accounts) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Accounts", 1)) - } - if s.ExecutionRoleName != nil && len(*s.ExecutionRoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleName", 1)) - } - if s.Regions != nil && len(s.Regions) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Regions", 1)) - } - if s.TargetLocationMaxConcurrency != nil && len(*s.TargetLocationMaxConcurrency) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetLocationMaxConcurrency", 1)) - } - if s.TargetLocationMaxErrors != nil && len(*s.TargetLocationMaxErrors) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetLocationMaxErrors", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccounts sets the Accounts field's value. -func (s *TargetLocation) SetAccounts(v []*string) *TargetLocation { - s.Accounts = v - return s -} - -// SetExecutionRoleName sets the ExecutionRoleName field's value. -func (s *TargetLocation) SetExecutionRoleName(v string) *TargetLocation { - s.ExecutionRoleName = &v - return s -} - -// SetRegions sets the Regions field's value. -func (s *TargetLocation) SetRegions(v []*string) *TargetLocation { - s.Regions = v - return s -} - -// SetTargetLocationMaxConcurrency sets the TargetLocationMaxConcurrency field's value. -func (s *TargetLocation) SetTargetLocationMaxConcurrency(v string) *TargetLocation { - s.TargetLocationMaxConcurrency = &v - return s -} - -// SetTargetLocationMaxErrors sets the TargetLocationMaxErrors field's value. -func (s *TargetLocation) SetTargetLocationMaxErrors(v string) *TargetLocation { - s.TargetLocationMaxErrors = &v - return s -} - -type TerminateSessionInput struct { - _ struct{} `type:"structure"` - - // The ID of the session to terminate. - // - // SessionId is a required field - SessionId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TerminateSessionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateSessionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TerminateSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TerminateSessionInput"} - if s.SessionId == nil { - invalidParams.Add(request.NewErrParamRequired("SessionId")) - } - if s.SessionId != nil && len(*s.SessionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SessionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSessionId sets the SessionId field's value. -func (s *TerminateSessionInput) SetSessionId(v string) *TerminateSessionInput { - s.SessionId = &v - return s -} - -type TerminateSessionOutput struct { - _ struct{} `type:"structure"` - - // The ID of the session that has been terminated. - SessionId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s TerminateSessionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateSessionOutput) GoString() string { - return s.String() -} - -// SetSessionId sets the SessionId field's value. -func (s *TerminateSessionOutput) SetSessionId(v string) *TerminateSessionOutput { - s.SessionId = &v - return s -} - -type UpdateAssociationInput struct { - _ struct{} `type:"structure"` - - // The ID of the association you want to update. - // - // AssociationId is a required field - AssociationId *string `type:"string" required:"true"` - - // The name of the association that you want to update. - AssociationName *string `type:"string"` - - // This parameter is provided for concurrency control purposes. You must specify - // the latest association version in the service. If you want to ensure that - // this request succeeds, either specify $LATEST, or omit this parameter. - AssociationVersion *string `type:"string"` - - // Specify the target for the association. This target is required for associations - // that use an Automation document and target resources by using rate controls. - AutomationTargetParameterName *string `min:"1" type:"string"` - - // The severity level to assign to the association. - ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` - - // The document version you want update for the association. - DocumentVersion *string `type:"string"` - - // The maximum number of targets allowed to run the association at the same - // time. You can specify a number, for example 10, or a percentage of the target - // set, for example 10%. The default value is 100%, which means all targets - // run the association at the same time. - // - // If a new instance starts and attempts to execute an association while Systems - // Manager is executing MaxConcurrency associations, the association is allowed - // to run. During the next association interval, the new instance will process - // its association within the limit specified for MaxConcurrency. - MaxConcurrency *string `min:"1" type:"string"` - - // The number of errors that are allowed before the system stops sending requests - // to run the association on additional targets. You can specify either an absolute - // number of errors, for example 10, or a percentage of the target set, for - // example 10%. If you specify 3, for example, the system stops sending requests - // when the fourth error is received. If you specify 0, then the system stops - // sending requests after the first error is returned. If you run an association - // on 50 instances and set MaxError to 10%, then the system stops sending the - // request when the sixth error is received. - // - // Executions that are already running an association when MaxErrors is reached - // are allowed to complete, but some of these executions may fail as well. If - // you need to ensure that there won't be more than max-errors failed executions, - // set MaxConcurrency to 1 so that executions proceed one at a time. - MaxErrors *string `min:"1" type:"string"` - - // The name of the association document. - Name *string `type:"string"` - - // An Amazon S3 bucket where you want to store the results of this request. - OutputLocation *InstanceAssociationOutputLocation `type:"structure"` - - // The parameters you want to update for the association. If you create a parameter - // using Parameter Store, you can reference the parameter using {{ssm:parameter-name}} - Parameters map[string][]*string `type:"map"` - - // The cron expression used to schedule the association that you want to update. - ScheduleExpression *string `min:"1" type:"string"` - - // The targets of the association. - Targets []*Target `type:"list"` -} - -// String returns the string representation -func (s UpdateAssociationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAssociationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAssociationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAssociationInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) - } - if s.AutomationTargetParameterName != nil && len(*s.AutomationTargetParameterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AutomationTargetParameterName", 1)) - } - if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) - } - if s.MaxErrors != nil && len(*s.MaxErrors) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MaxErrors", 1)) - } - if s.ScheduleExpression != nil && len(*s.ScheduleExpression) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScheduleExpression", 1)) - } - if s.OutputLocation != nil { - if err := s.OutputLocation.Validate(); err != nil { - invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams)) - } - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationId sets the AssociationId field's value. -func (s *UpdateAssociationInput) SetAssociationId(v string) *UpdateAssociationInput { - s.AssociationId = &v - return s -} - -// SetAssociationName sets the AssociationName field's value. -func (s *UpdateAssociationInput) SetAssociationName(v string) *UpdateAssociationInput { - s.AssociationName = &v - return s -} - -// SetAssociationVersion sets the AssociationVersion field's value. -func (s *UpdateAssociationInput) SetAssociationVersion(v string) *UpdateAssociationInput { - s.AssociationVersion = &v - return s -} - -// SetAutomationTargetParameterName sets the AutomationTargetParameterName field's value. -func (s *UpdateAssociationInput) SetAutomationTargetParameterName(v string) *UpdateAssociationInput { - s.AutomationTargetParameterName = &v - return s -} - -// SetComplianceSeverity sets the ComplianceSeverity field's value. -func (s *UpdateAssociationInput) SetComplianceSeverity(v string) *UpdateAssociationInput { - s.ComplianceSeverity = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *UpdateAssociationInput) SetDocumentVersion(v string) *UpdateAssociationInput { - s.DocumentVersion = &v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *UpdateAssociationInput) SetMaxConcurrency(v string) *UpdateAssociationInput { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *UpdateAssociationInput) SetMaxErrors(v string) *UpdateAssociationInput { - s.MaxErrors = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateAssociationInput) SetName(v string) *UpdateAssociationInput { - s.Name = &v - return s -} - -// SetOutputLocation sets the OutputLocation field's value. -func (s *UpdateAssociationInput) SetOutputLocation(v *InstanceAssociationOutputLocation) *UpdateAssociationInput { - s.OutputLocation = v - return s -} - -// SetParameters sets the Parameters field's value. -func (s *UpdateAssociationInput) SetParameters(v map[string][]*string) *UpdateAssociationInput { - s.Parameters = v - return s -} - -// SetScheduleExpression sets the ScheduleExpression field's value. -func (s *UpdateAssociationInput) SetScheduleExpression(v string) *UpdateAssociationInput { - s.ScheduleExpression = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *UpdateAssociationInput) SetTargets(v []*Target) *UpdateAssociationInput { - s.Targets = v - return s -} - -type UpdateAssociationOutput struct { - _ struct{} `type:"structure"` - - // The description of the association that was updated. - AssociationDescription *AssociationDescription `type:"structure"` -} - -// String returns the string representation -func (s UpdateAssociationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAssociationOutput) GoString() string { - return s.String() -} - -// SetAssociationDescription sets the AssociationDescription field's value. -func (s *UpdateAssociationOutput) SetAssociationDescription(v *AssociationDescription) *UpdateAssociationOutput { - s.AssociationDescription = v - return s -} - -type UpdateAssociationStatusInput struct { - _ struct{} `type:"structure"` - - // The association status. - // - // AssociationStatus is a required field - AssociationStatus *AssociationStatus `type:"structure" required:"true"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // The name of the Systems Manager document. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateAssociationStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAssociationStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAssociationStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAssociationStatusInput"} - if s.AssociationStatus == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationStatus")) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.AssociationStatus != nil { - if err := s.AssociationStatus.Validate(); err != nil { - invalidParams.AddNested("AssociationStatus", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationStatus sets the AssociationStatus field's value. -func (s *UpdateAssociationStatusInput) SetAssociationStatus(v *AssociationStatus) *UpdateAssociationStatusInput { - s.AssociationStatus = v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *UpdateAssociationStatusInput) SetInstanceId(v string) *UpdateAssociationStatusInput { - s.InstanceId = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateAssociationStatusInput) SetName(v string) *UpdateAssociationStatusInput { - s.Name = &v - return s -} - -type UpdateAssociationStatusOutput struct { - _ struct{} `type:"structure"` - - // Information about the association. - AssociationDescription *AssociationDescription `type:"structure"` -} - -// String returns the string representation -func (s UpdateAssociationStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAssociationStatusOutput) GoString() string { - return s.String() -} - -// SetAssociationDescription sets the AssociationDescription field's value. -func (s *UpdateAssociationStatusOutput) SetAssociationDescription(v *AssociationDescription) *UpdateAssociationStatusOutput { - s.AssociationDescription = v - return s -} - -type UpdateDocumentDefaultVersionInput struct { - _ struct{} `type:"structure"` - - // The version of a custom document that you want to set as the default version. - // - // DocumentVersion is a required field - DocumentVersion *string `type:"string" required:"true"` - - // The name of a custom document that you want to set as the default version. - // - // Name is a required field - Name *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateDocumentDefaultVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDocumentDefaultVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDocumentDefaultVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDocumentDefaultVersionInput"} - if s.DocumentVersion == nil { - invalidParams.Add(request.NewErrParamRequired("DocumentVersion")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *UpdateDocumentDefaultVersionInput) SetDocumentVersion(v string) *UpdateDocumentDefaultVersionInput { - s.DocumentVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateDocumentDefaultVersionInput) SetName(v string) *UpdateDocumentDefaultVersionInput { - s.Name = &v - return s -} - -type UpdateDocumentDefaultVersionOutput struct { - _ struct{} `type:"structure"` - - // The description of a custom document that you want to set as the default - // version. - Description *DocumentDefaultVersionDescription `type:"structure"` -} - -// String returns the string representation -func (s UpdateDocumentDefaultVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDocumentDefaultVersionOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *UpdateDocumentDefaultVersionOutput) SetDescription(v *DocumentDefaultVersionDescription) *UpdateDocumentDefaultVersionOutput { - s.Description = v - return s -} - -type UpdateDocumentInput struct { - _ struct{} `type:"structure"` - - // A list of key and value pairs that describe attachments to a version of a - // document. - Attachments []*AttachmentsSource `type:"list"` - - // A valid JSON or YAML string. - // - // Content is a required field - Content *string `min:"1" type:"string" required:"true"` - - // Specify the document format for the new document version. Systems Manager - // supports JSON and YAML documents. JSON is the default format. - DocumentFormat *string `type:"string" enum:"DocumentFormat"` - - // The version of the document that you want to update. - DocumentVersion *string `type:"string"` - - // The name of the document that you want to update. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // Specify a new target type for the document. - TargetType *string `type:"string"` - - // An optional field specifying the version of the artifact you are updating - // with the document. For example, "Release 12, Update 6". This value is unique - // across all versions of a document, and cannot be changed. - VersionName *string `type:"string"` -} - -// String returns the string representation -func (s UpdateDocumentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDocumentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDocumentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDocumentInput"} - if s.Content == nil { - invalidParams.Add(request.NewErrParamRequired("Content")) - } - if s.Content != nil && len(*s.Content) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Content", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Attachments != nil { - for i, v := range s.Attachments { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attachments", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttachments sets the Attachments field's value. -func (s *UpdateDocumentInput) SetAttachments(v []*AttachmentsSource) *UpdateDocumentInput { - s.Attachments = v - return s -} - -// SetContent sets the Content field's value. -func (s *UpdateDocumentInput) SetContent(v string) *UpdateDocumentInput { - s.Content = &v - return s -} - -// SetDocumentFormat sets the DocumentFormat field's value. -func (s *UpdateDocumentInput) SetDocumentFormat(v string) *UpdateDocumentInput { - s.DocumentFormat = &v - return s -} - -// SetDocumentVersion sets the DocumentVersion field's value. -func (s *UpdateDocumentInput) SetDocumentVersion(v string) *UpdateDocumentInput { - s.DocumentVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateDocumentInput) SetName(v string) *UpdateDocumentInput { - s.Name = &v - return s -} - -// SetTargetType sets the TargetType field's value. -func (s *UpdateDocumentInput) SetTargetType(v string) *UpdateDocumentInput { - s.TargetType = &v - return s -} - -// SetVersionName sets the VersionName field's value. -func (s *UpdateDocumentInput) SetVersionName(v string) *UpdateDocumentInput { - s.VersionName = &v - return s -} - -type UpdateDocumentOutput struct { - _ struct{} `type:"structure"` - - // A description of the document that was updated. - DocumentDescription *DocumentDescription `type:"structure"` -} - -// String returns the string representation -func (s UpdateDocumentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDocumentOutput) GoString() string { - return s.String() -} - -// SetDocumentDescription sets the DocumentDescription field's value. -func (s *UpdateDocumentOutput) SetDocumentDescription(v *DocumentDescription) *UpdateDocumentOutput { - s.DocumentDescription = v - return s -} - -type UpdateMaintenanceWindowInput struct { - _ struct{} `type:"structure"` - - // Whether targets must be registered with the Maintenance Window before tasks - // can be defined for those targets. - AllowUnassociatedTargets *bool `type:"boolean"` - - // The number of hours before the end of the Maintenance Window that Systems - // Manager stops scheduling new tasks for execution. - Cutoff *int64 `type:"integer"` - - // An optional description for the update request. - Description *string `min:"1" type:"string" sensitive:"true"` - - // The duration of the Maintenance Window in hours. - Duration *int64 `min:"1" type:"integer"` - - // Whether the Maintenance Window is enabled. - Enabled *bool `type:"boolean"` - - // The date and time, in ISO-8601 Extended format, for when you want the Maintenance - // Window to become inactive. EndDate allows you to set a date and time in the - // future when the Maintenance Window will no longer run. - EndDate *string `type:"string"` - - // The name of the Maintenance Window. - Name *string `min:"3" type:"string"` - - // If True, then all fields that are required by the CreateMaintenanceWindow - // action are also required for this API request. Optional fields that are not - // specified are set to null. - Replace *bool `type:"boolean"` - - // The schedule of the Maintenance Window in the form of a cron or rate expression. - Schedule *string `min:"1" type:"string"` - - // The time zone that the scheduled Maintenance Window executions are based - // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", - // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database - // (https://www.iana.org/time-zones) on the IANA website. - ScheduleTimezone *string `type:"string"` - - // The time zone that the scheduled Maintenance Window executions are based - // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", - // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database - // (https://www.iana.org/time-zones) on the IANA website. - StartDate *string `type:"string"` - - // The ID of the Maintenance Window to update. - // - // WindowId is a required field - WindowId *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateMaintenanceWindowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateMaintenanceWindowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateMaintenanceWindowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateMaintenanceWindowInput"} - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.Duration != nil && *s.Duration < 1 { - invalidParams.Add(request.NewErrParamMinValue("Duration", 1)) - } - if s.Name != nil && len(*s.Name) < 3 { - invalidParams.Add(request.NewErrParamMinLen("Name", 3)) - } - if s.Schedule != nil && len(*s.Schedule) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Schedule", 1)) - } - if s.WindowId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowId")) - } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowUnassociatedTargets sets the AllowUnassociatedTargets field's value. -func (s *UpdateMaintenanceWindowInput) SetAllowUnassociatedTargets(v bool) *UpdateMaintenanceWindowInput { - s.AllowUnassociatedTargets = &v - return s -} - -// SetCutoff sets the Cutoff field's value. -func (s *UpdateMaintenanceWindowInput) SetCutoff(v int64) *UpdateMaintenanceWindowInput { - s.Cutoff = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateMaintenanceWindowInput) SetDescription(v string) *UpdateMaintenanceWindowInput { - s.Description = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *UpdateMaintenanceWindowInput) SetDuration(v int64) *UpdateMaintenanceWindowInput { - s.Duration = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *UpdateMaintenanceWindowInput) SetEnabled(v bool) *UpdateMaintenanceWindowInput { - s.Enabled = &v - return s -} - -// SetEndDate sets the EndDate field's value. -func (s *UpdateMaintenanceWindowInput) SetEndDate(v string) *UpdateMaintenanceWindowInput { - s.EndDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateMaintenanceWindowInput) SetName(v string) *UpdateMaintenanceWindowInput { - s.Name = &v - return s -} - -// SetReplace sets the Replace field's value. -func (s *UpdateMaintenanceWindowInput) SetReplace(v bool) *UpdateMaintenanceWindowInput { - s.Replace = &v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *UpdateMaintenanceWindowInput) SetSchedule(v string) *UpdateMaintenanceWindowInput { - s.Schedule = &v - return s -} - -// SetScheduleTimezone sets the ScheduleTimezone field's value. -func (s *UpdateMaintenanceWindowInput) SetScheduleTimezone(v string) *UpdateMaintenanceWindowInput { - s.ScheduleTimezone = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *UpdateMaintenanceWindowInput) SetStartDate(v string) *UpdateMaintenanceWindowInput { - s.StartDate = &v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *UpdateMaintenanceWindowInput) SetWindowId(v string) *UpdateMaintenanceWindowInput { - s.WindowId = &v - return s -} - -type UpdateMaintenanceWindowOutput struct { - _ struct{} `type:"structure"` - - // Whether targets must be registered with the Maintenance Window before tasks - // can be defined for those targets. - AllowUnassociatedTargets *bool `type:"boolean"` - - // The number of hours before the end of the Maintenance Window that Systems - // Manager stops scheduling new tasks for execution. - Cutoff *int64 `type:"integer"` - - // An optional description of the update. - Description *string `min:"1" type:"string" sensitive:"true"` - - // The duration of the Maintenance Window in hours. - Duration *int64 `min:"1" type:"integer"` - - // Whether the Maintenance Window is enabled. - Enabled *bool `type:"boolean"` - - // The date and time, in ISO-8601 Extended format, for when the Maintenance - // Window is scheduled to become inactive. The Maintenance Window will not run - // after this specified time. - EndDate *string `type:"string"` - - // The name of the Maintenance Window. - Name *string `min:"3" type:"string"` - - // The schedule of the Maintenance Window in the form of a cron or rate expression. - Schedule *string `min:"1" type:"string"` - - // The time zone that the scheduled Maintenance Window executions are based - // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", - // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database - // (https://www.iana.org/time-zones) on the IANA website. - ScheduleTimezone *string `type:"string"` - - // The date and time, in ISO-8601 Extended format, for when the Maintenance - // Window is scheduled to become active. The Maintenance Window will not run - // before this specified time. - StartDate *string `type:"string"` - - // The ID of the created Maintenance Window. - WindowId *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s UpdateMaintenanceWindowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateMaintenanceWindowOutput) GoString() string { - return s.String() -} - -// SetAllowUnassociatedTargets sets the AllowUnassociatedTargets field's value. -func (s *UpdateMaintenanceWindowOutput) SetAllowUnassociatedTargets(v bool) *UpdateMaintenanceWindowOutput { - s.AllowUnassociatedTargets = &v - return s -} - -// SetCutoff sets the Cutoff field's value. -func (s *UpdateMaintenanceWindowOutput) SetCutoff(v int64) *UpdateMaintenanceWindowOutput { - s.Cutoff = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdateMaintenanceWindowOutput) SetDescription(v string) *UpdateMaintenanceWindowOutput { - s.Description = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *UpdateMaintenanceWindowOutput) SetDuration(v int64) *UpdateMaintenanceWindowOutput { - s.Duration = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *UpdateMaintenanceWindowOutput) SetEnabled(v bool) *UpdateMaintenanceWindowOutput { - s.Enabled = &v - return s -} - -// SetEndDate sets the EndDate field's value. -func (s *UpdateMaintenanceWindowOutput) SetEndDate(v string) *UpdateMaintenanceWindowOutput { - s.EndDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateMaintenanceWindowOutput) SetName(v string) *UpdateMaintenanceWindowOutput { - s.Name = &v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *UpdateMaintenanceWindowOutput) SetSchedule(v string) *UpdateMaintenanceWindowOutput { - s.Schedule = &v - return s -} - -// SetScheduleTimezone sets the ScheduleTimezone field's value. -func (s *UpdateMaintenanceWindowOutput) SetScheduleTimezone(v string) *UpdateMaintenanceWindowOutput { - s.ScheduleTimezone = &v - return s -} - -// SetStartDate sets the StartDate field's value. -func (s *UpdateMaintenanceWindowOutput) SetStartDate(v string) *UpdateMaintenanceWindowOutput { - s.StartDate = &v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *UpdateMaintenanceWindowOutput) SetWindowId(v string) *UpdateMaintenanceWindowOutput { - s.WindowId = &v - return s -} - -type UpdateMaintenanceWindowTargetInput struct { - _ struct{} `type:"structure"` - - // An optional description for the update. - Description *string `min:"1" type:"string" sensitive:"true"` - - // A name for the update. - Name *string `min:"3" type:"string"` - - // User-provided value that will be included in any CloudWatch events raised - // while running tasks for these targets in this Maintenance Window. - OwnerInformation *string `min:"1" type:"string" sensitive:"true"` - - // If True, then all fields that are required by the RegisterTargetWithMaintenanceWindow - // action are also required for this API request. Optional fields that are not - // specified are set to null. - Replace *bool `type:"boolean"` - - // The targets to add or replace. - Targets []*Target `type:"list"` - - // The Maintenance Window ID with which to modify the target. - // - // WindowId is a required field - WindowId *string `min:"20" type:"string" required:"true"` - - // The target ID to modify. - // - // WindowTargetId is a required field - WindowTargetId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateMaintenanceWindowTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateMaintenanceWindowTargetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateMaintenanceWindowTargetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateMaintenanceWindowTargetInput"} - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.Name != nil && len(*s.Name) < 3 { - invalidParams.Add(request.NewErrParamMinLen("Name", 3)) - } - if s.OwnerInformation != nil && len(*s.OwnerInformation) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OwnerInformation", 1)) - } - if s.WindowId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowId")) - } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) - } - if s.WindowTargetId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowTargetId")) - } - if s.WindowTargetId != nil && len(*s.WindowTargetId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("WindowTargetId", 36)) - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateMaintenanceWindowTargetInput) SetDescription(v string) *UpdateMaintenanceWindowTargetInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateMaintenanceWindowTargetInput) SetName(v string) *UpdateMaintenanceWindowTargetInput { - s.Name = &v - return s -} - -// SetOwnerInformation sets the OwnerInformation field's value. -func (s *UpdateMaintenanceWindowTargetInput) SetOwnerInformation(v string) *UpdateMaintenanceWindowTargetInput { - s.OwnerInformation = &v - return s -} - -// SetReplace sets the Replace field's value. -func (s *UpdateMaintenanceWindowTargetInput) SetReplace(v bool) *UpdateMaintenanceWindowTargetInput { - s.Replace = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *UpdateMaintenanceWindowTargetInput) SetTargets(v []*Target) *UpdateMaintenanceWindowTargetInput { - s.Targets = v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *UpdateMaintenanceWindowTargetInput) SetWindowId(v string) *UpdateMaintenanceWindowTargetInput { - s.WindowId = &v - return s -} - -// SetWindowTargetId sets the WindowTargetId field's value. -func (s *UpdateMaintenanceWindowTargetInput) SetWindowTargetId(v string) *UpdateMaintenanceWindowTargetInput { - s.WindowTargetId = &v - return s -} - -type UpdateMaintenanceWindowTargetOutput struct { - _ struct{} `type:"structure"` - - // The updated description. - Description *string `min:"1" type:"string" sensitive:"true"` - - // The updated name. - Name *string `min:"3" type:"string"` - - // The updated owner. - OwnerInformation *string `min:"1" type:"string" sensitive:"true"` - - // The updated targets. - Targets []*Target `type:"list"` - - // The Maintenance Window ID specified in the update request. - WindowId *string `min:"20" type:"string"` - - // The target ID specified in the update request. - WindowTargetId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s UpdateMaintenanceWindowTargetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateMaintenanceWindowTargetOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *UpdateMaintenanceWindowTargetOutput) SetDescription(v string) *UpdateMaintenanceWindowTargetOutput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateMaintenanceWindowTargetOutput) SetName(v string) *UpdateMaintenanceWindowTargetOutput { - s.Name = &v - return s -} - -// SetOwnerInformation sets the OwnerInformation field's value. -func (s *UpdateMaintenanceWindowTargetOutput) SetOwnerInformation(v string) *UpdateMaintenanceWindowTargetOutput { - s.OwnerInformation = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *UpdateMaintenanceWindowTargetOutput) SetTargets(v []*Target) *UpdateMaintenanceWindowTargetOutput { - s.Targets = v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *UpdateMaintenanceWindowTargetOutput) SetWindowId(v string) *UpdateMaintenanceWindowTargetOutput { - s.WindowId = &v - return s -} - -// SetWindowTargetId sets the WindowTargetId field's value. -func (s *UpdateMaintenanceWindowTargetOutput) SetWindowTargetId(v string) *UpdateMaintenanceWindowTargetOutput { - s.WindowTargetId = &v - return s -} - -type UpdateMaintenanceWindowTaskInput struct { - _ struct{} `type:"structure"` - - // The new task description to specify. - Description *string `min:"1" type:"string" sensitive:"true"` - - // The new logging location in Amazon S3 to specify. - // - // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, - // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters - // structure. For information about how Systems Manager handles these options - // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - LoggingInfo *LoggingInfo `type:"structure"` - - // The new MaxConcurrency value you want to specify. MaxConcurrency is the number - // of targets that are allowed to run this task in parallel. - MaxConcurrency *string `min:"1" type:"string"` - - // The new MaxErrors value to specify. MaxErrors is the maximum number of errors - // that are allowed before the task stops being scheduled. - MaxErrors *string `min:"1" type:"string"` - - // The new task name to specify. - Name *string `min:"3" type:"string"` - - // The new task priority to specify. The lower the number, the higher the priority. - // Tasks that have the same priority are scheduled in parallel. - Priority *int64 `type:"integer"` - - // If True, then all fields that are required by the RegisterTaskWithMaintenanceWndow - // action are also required for this API request. Optional fields that are not - // specified are set to null. - Replace *bool `type:"boolean"` - - // The IAM service role ARN to modify. The system assumes this role during task - // execution. - // - // If you do not specify a service role ARN, Systems Manager will use your account's - // service-linked role for Systems Manager by default. If no service-linked - // role for Systems Manager exists in your account, it will be created when - // you run RegisterTaskWithMaintenanceWindow without specifying a service role - // ARN. - // - // For more information, see Service-Linked Role Permissions for Systems Manager - // (http://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions) - // and Should I Use a Service-Linked Role or a Custom Service Role to Run Maintenance - // Window Tasks? (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role) - // in the AWS Systems Manager User Guide. - ServiceRoleArn *string `type:"string"` - - // The targets (either instances or tags) to modify. Instances are specified - // using Key=instanceids,Values=instanceID_1,instanceID_2. Tags are specified - // using Key=tag_name,Values=tag_value. - Targets []*Target `type:"list"` - - // The task ARN to modify. - TaskArn *string `min:"1" type:"string"` - - // The parameters that the task should use during execution. Populate only the - // fields that match the task type. All other fields should be empty. - TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` - - // The parameters to modify. - // - // TaskParameters has been deprecated. To specify parameters to pass to a task - // when it runs, instead use the Parameters option in the TaskInvocationParameters - // structure. For information about how Systems Manager handles these options - // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - // - // The map has the following format: - // - // Key: string, between 1 and 255 characters - // - // Value: an array of strings, each string is between 1 and 255 characters - TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` - - // The Maintenance Window ID that contains the task to modify. - // - // WindowId is a required field - WindowId *string `min:"20" type:"string" required:"true"` - - // The task ID to modify. - // - // WindowTaskId is a required field - WindowTaskId *string `min:"36" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateMaintenanceWindowTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateMaintenanceWindowTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateMaintenanceWindowTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateMaintenanceWindowTaskInput"} - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) - } - if s.MaxErrors != nil && len(*s.MaxErrors) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MaxErrors", 1)) - } - if s.Name != nil && len(*s.Name) < 3 { - invalidParams.Add(request.NewErrParamMinLen("Name", 3)) - } - if s.TaskArn != nil && len(*s.TaskArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskArn", 1)) - } - if s.WindowId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowId")) - } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) - } - if s.WindowTaskId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowTaskId")) - } - if s.WindowTaskId != nil && len(*s.WindowTaskId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("WindowTaskId", 36)) - } - if s.LoggingInfo != nil { - if err := s.LoggingInfo.Validate(); err != nil { - invalidParams.AddNested("LoggingInfo", err.(request.ErrInvalidParams)) - } - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - if s.TaskInvocationParameters != nil { - if err := s.TaskInvocationParameters.Validate(); err != nil { - invalidParams.AddNested("TaskInvocationParameters", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateMaintenanceWindowTaskInput) SetDescription(v string) *UpdateMaintenanceWindowTaskInput { - s.Description = &v - return s -} - -// SetLoggingInfo sets the LoggingInfo field's value. -func (s *UpdateMaintenanceWindowTaskInput) SetLoggingInfo(v *LoggingInfo) *UpdateMaintenanceWindowTaskInput { - s.LoggingInfo = v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *UpdateMaintenanceWindowTaskInput) SetMaxConcurrency(v string) *UpdateMaintenanceWindowTaskInput { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *UpdateMaintenanceWindowTaskInput) SetMaxErrors(v string) *UpdateMaintenanceWindowTaskInput { - s.MaxErrors = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateMaintenanceWindowTaskInput) SetName(v string) *UpdateMaintenanceWindowTaskInput { - s.Name = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *UpdateMaintenanceWindowTaskInput) SetPriority(v int64) *UpdateMaintenanceWindowTaskInput { - s.Priority = &v - return s -} - -// SetReplace sets the Replace field's value. -func (s *UpdateMaintenanceWindowTaskInput) SetReplace(v bool) *UpdateMaintenanceWindowTaskInput { - s.Replace = &v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *UpdateMaintenanceWindowTaskInput) SetServiceRoleArn(v string) *UpdateMaintenanceWindowTaskInput { - s.ServiceRoleArn = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *UpdateMaintenanceWindowTaskInput) SetTargets(v []*Target) *UpdateMaintenanceWindowTaskInput { - s.Targets = v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *UpdateMaintenanceWindowTaskInput) SetTaskArn(v string) *UpdateMaintenanceWindowTaskInput { - s.TaskArn = &v - return s -} - -// SetTaskInvocationParameters sets the TaskInvocationParameters field's value. -func (s *UpdateMaintenanceWindowTaskInput) SetTaskInvocationParameters(v *MaintenanceWindowTaskInvocationParameters) *UpdateMaintenanceWindowTaskInput { - s.TaskInvocationParameters = v - return s -} - -// SetTaskParameters sets the TaskParameters field's value. -func (s *UpdateMaintenanceWindowTaskInput) SetTaskParameters(v map[string]*MaintenanceWindowTaskParameterValueExpression) *UpdateMaintenanceWindowTaskInput { - s.TaskParameters = v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *UpdateMaintenanceWindowTaskInput) SetWindowId(v string) *UpdateMaintenanceWindowTaskInput { - s.WindowId = &v - return s -} - -// SetWindowTaskId sets the WindowTaskId field's value. -func (s *UpdateMaintenanceWindowTaskInput) SetWindowTaskId(v string) *UpdateMaintenanceWindowTaskInput { - s.WindowTaskId = &v - return s -} - -type UpdateMaintenanceWindowTaskOutput struct { - _ struct{} `type:"structure"` - - // The updated task description. - Description *string `min:"1" type:"string" sensitive:"true"` - - // The updated logging information in Amazon S3. - // - // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, - // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters - // structure. For information about how Systems Manager handles these options - // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - LoggingInfo *LoggingInfo `type:"structure"` - - // The updated MaxConcurrency value. - MaxConcurrency *string `min:"1" type:"string"` - - // The updated MaxErrors value. - MaxErrors *string `min:"1" type:"string"` - - // The updated task name. - Name *string `min:"3" type:"string"` - - // The updated priority value. - Priority *int64 `type:"integer"` - - // The updated service role ARN value. - ServiceRoleArn *string `type:"string"` - - // The updated target values. - Targets []*Target `type:"list"` - - // The updated task ARN value. - TaskArn *string `min:"1" type:"string"` - - // The updated parameter values. - TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` - - // The updated parameter values. - // - // TaskParameters has been deprecated. To specify parameters to pass to a task - // when it runs, instead use the Parameters option in the TaskInvocationParameters - // structure. For information about how Systems Manager handles these options - // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` - - // The ID of the Maintenance Window that was updated. - WindowId *string `min:"20" type:"string"` - - // The task ID of the Maintenance Window that was updated. - WindowTaskId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s UpdateMaintenanceWindowTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateMaintenanceWindowTaskOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *UpdateMaintenanceWindowTaskOutput) SetDescription(v string) *UpdateMaintenanceWindowTaskOutput { - s.Description = &v - return s -} - -// SetLoggingInfo sets the LoggingInfo field's value. -func (s *UpdateMaintenanceWindowTaskOutput) SetLoggingInfo(v *LoggingInfo) *UpdateMaintenanceWindowTaskOutput { - s.LoggingInfo = v - return s -} - -// SetMaxConcurrency sets the MaxConcurrency field's value. -func (s *UpdateMaintenanceWindowTaskOutput) SetMaxConcurrency(v string) *UpdateMaintenanceWindowTaskOutput { - s.MaxConcurrency = &v - return s -} - -// SetMaxErrors sets the MaxErrors field's value. -func (s *UpdateMaintenanceWindowTaskOutput) SetMaxErrors(v string) *UpdateMaintenanceWindowTaskOutput { - s.MaxErrors = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateMaintenanceWindowTaskOutput) SetName(v string) *UpdateMaintenanceWindowTaskOutput { - s.Name = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *UpdateMaintenanceWindowTaskOutput) SetPriority(v int64) *UpdateMaintenanceWindowTaskOutput { - s.Priority = &v - return s -} - -// SetServiceRoleArn sets the ServiceRoleArn field's value. -func (s *UpdateMaintenanceWindowTaskOutput) SetServiceRoleArn(v string) *UpdateMaintenanceWindowTaskOutput { - s.ServiceRoleArn = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *UpdateMaintenanceWindowTaskOutput) SetTargets(v []*Target) *UpdateMaintenanceWindowTaskOutput { - s.Targets = v - return s -} - -// SetTaskArn sets the TaskArn field's value. -func (s *UpdateMaintenanceWindowTaskOutput) SetTaskArn(v string) *UpdateMaintenanceWindowTaskOutput { - s.TaskArn = &v - return s -} - -// SetTaskInvocationParameters sets the TaskInvocationParameters field's value. -func (s *UpdateMaintenanceWindowTaskOutput) SetTaskInvocationParameters(v *MaintenanceWindowTaskInvocationParameters) *UpdateMaintenanceWindowTaskOutput { - s.TaskInvocationParameters = v - return s -} - -// SetTaskParameters sets the TaskParameters field's value. -func (s *UpdateMaintenanceWindowTaskOutput) SetTaskParameters(v map[string]*MaintenanceWindowTaskParameterValueExpression) *UpdateMaintenanceWindowTaskOutput { - s.TaskParameters = v - return s -} - -// SetWindowId sets the WindowId field's value. -func (s *UpdateMaintenanceWindowTaskOutput) SetWindowId(v string) *UpdateMaintenanceWindowTaskOutput { - s.WindowId = &v - return s -} - -// SetWindowTaskId sets the WindowTaskId field's value. -func (s *UpdateMaintenanceWindowTaskOutput) SetWindowTaskId(v string) *UpdateMaintenanceWindowTaskOutput { - s.WindowTaskId = &v - return s -} - -type UpdateManagedInstanceRoleInput struct { - _ struct{} `type:"structure"` - - // The IAM role you want to assign or change. - // - // IamRole is a required field - IamRole *string `type:"string" required:"true"` - - // The ID of the managed instance where you want to update the role. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateManagedInstanceRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateManagedInstanceRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateManagedInstanceRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateManagedInstanceRoleInput"} - if s.IamRole == nil { - invalidParams.Add(request.NewErrParamRequired("IamRole")) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIamRole sets the IamRole field's value. -func (s *UpdateManagedInstanceRoleInput) SetIamRole(v string) *UpdateManagedInstanceRoleInput { - s.IamRole = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *UpdateManagedInstanceRoleInput) SetInstanceId(v string) *UpdateManagedInstanceRoleInput { - s.InstanceId = &v - return s -} - -type UpdateManagedInstanceRoleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateManagedInstanceRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateManagedInstanceRoleOutput) GoString() string { - return s.String() -} - -type UpdatePatchBaselineInput struct { - _ struct{} `type:"structure"` - - // A set of rules used to include patches in the baseline. - ApprovalRules *PatchRuleGroup `type:"structure"` - - // A list of explicitly approved patches for the baseline. - // - // For information about accepted formats for lists of approved patches and - // rejected patches, see Package Name Formats for Approved and Rejected Patch - // Lists (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) - // in the AWS Systems Manager User Guide. - ApprovedPatches []*string `type:"list"` - - // Assigns a new compliance severity level to an existing patch baseline. - ApprovedPatchesComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` - - // Indicates whether the list of approved patches includes non-security updates - // that should be applied to the instances. The default value is 'false'. Applies - // to Linux instances only. - ApprovedPatchesEnableNonSecurity *bool `type:"boolean"` - - // The ID of the patch baseline to update. - // - // BaselineId is a required field - BaselineId *string `min:"20" type:"string" required:"true"` - - // A description of the patch baseline. - Description *string `min:"1" type:"string"` - - // A set of global filters used to exclude patches from the baseline. - GlobalFilters *PatchFilterGroup `type:"structure"` - - // The name of the patch baseline. - Name *string `min:"3" type:"string"` - - // A list of explicitly rejected patches for the baseline. - // - // For information about accepted formats for lists of approved patches and - // rejected patches, see Package Name Formats for Approved and Rejected Patch - // Lists (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) - // in the AWS Systems Manager User Guide. - RejectedPatches []*string `type:"list"` - - // The action for Patch Manager to take on patches included in the RejectedPackages - // list. - // - // * ALLOW_AS_DEPENDENCY: A package in the Rejected patches list is installed - // only if it is a dependency of another package. It is considered compliant - // with the patch baseline, and its status is reported as InstalledOther. - // This is the default action if no option is specified. - // - // * BLOCK: Packages in the RejectedPatches list, and packages that include - // them as dependencies, are not installed under any circumstances. If a - // package was installed before it was added to the Rejected patches list, - // it is considered non-compliant with the patch baseline, and its status - // is reported as InstalledRejected. - RejectedPatchesAction *string `type:"string" enum:"PatchAction"` - - // If True, then all fields that are required by the CreatePatchBaseline action - // are also required for this API request. Optional fields that are not specified - // are set to null. - Replace *bool `type:"boolean"` - - // Information about the patches to use to update the instances, including target - // operating systems and source repositories. Applies to Linux instances only. - Sources []*PatchSource `type:"list"` -} - -// String returns the string representation -func (s UpdatePatchBaselineInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePatchBaselineInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdatePatchBaselineInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdatePatchBaselineInput"} - if s.BaselineId == nil { - invalidParams.Add(request.NewErrParamRequired("BaselineId")) - } - if s.BaselineId != nil && len(*s.BaselineId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("BaselineId", 20)) - } - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.Name != nil && len(*s.Name) < 3 { - invalidParams.Add(request.NewErrParamMinLen("Name", 3)) - } - if s.ApprovalRules != nil { - if err := s.ApprovalRules.Validate(); err != nil { - invalidParams.AddNested("ApprovalRules", err.(request.ErrInvalidParams)) - } - } - if s.GlobalFilters != nil { - if err := s.GlobalFilters.Validate(); err != nil { - invalidParams.AddNested("GlobalFilters", err.(request.ErrInvalidParams)) - } - } - if s.Sources != nil { - for i, v := range s.Sources { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Sources", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApprovalRules sets the ApprovalRules field's value. -func (s *UpdatePatchBaselineInput) SetApprovalRules(v *PatchRuleGroup) *UpdatePatchBaselineInput { - s.ApprovalRules = v - return s -} - -// SetApprovedPatches sets the ApprovedPatches field's value. -func (s *UpdatePatchBaselineInput) SetApprovedPatches(v []*string) *UpdatePatchBaselineInput { - s.ApprovedPatches = v - return s -} - -// SetApprovedPatchesComplianceLevel sets the ApprovedPatchesComplianceLevel field's value. -func (s *UpdatePatchBaselineInput) SetApprovedPatchesComplianceLevel(v string) *UpdatePatchBaselineInput { - s.ApprovedPatchesComplianceLevel = &v - return s -} - -// SetApprovedPatchesEnableNonSecurity sets the ApprovedPatchesEnableNonSecurity field's value. -func (s *UpdatePatchBaselineInput) SetApprovedPatchesEnableNonSecurity(v bool) *UpdatePatchBaselineInput { - s.ApprovedPatchesEnableNonSecurity = &v - return s -} - -// SetBaselineId sets the BaselineId field's value. -func (s *UpdatePatchBaselineInput) SetBaselineId(v string) *UpdatePatchBaselineInput { - s.BaselineId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdatePatchBaselineInput) SetDescription(v string) *UpdatePatchBaselineInput { - s.Description = &v - return s -} - -// SetGlobalFilters sets the GlobalFilters field's value. -func (s *UpdatePatchBaselineInput) SetGlobalFilters(v *PatchFilterGroup) *UpdatePatchBaselineInput { - s.GlobalFilters = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdatePatchBaselineInput) SetName(v string) *UpdatePatchBaselineInput { - s.Name = &v - return s -} - -// SetRejectedPatches sets the RejectedPatches field's value. -func (s *UpdatePatchBaselineInput) SetRejectedPatches(v []*string) *UpdatePatchBaselineInput { - s.RejectedPatches = v - return s -} - -// SetRejectedPatchesAction sets the RejectedPatchesAction field's value. -func (s *UpdatePatchBaselineInput) SetRejectedPatchesAction(v string) *UpdatePatchBaselineInput { - s.RejectedPatchesAction = &v - return s -} - -// SetReplace sets the Replace field's value. -func (s *UpdatePatchBaselineInput) SetReplace(v bool) *UpdatePatchBaselineInput { - s.Replace = &v - return s -} - -// SetSources sets the Sources field's value. -func (s *UpdatePatchBaselineInput) SetSources(v []*PatchSource) *UpdatePatchBaselineInput { - s.Sources = v - return s -} - -type UpdatePatchBaselineOutput struct { - _ struct{} `type:"structure"` - - // A set of rules used to include patches in the baseline. - ApprovalRules *PatchRuleGroup `type:"structure"` - - // A list of explicitly approved patches for the baseline. - ApprovedPatches []*string `type:"list"` - - // The compliance severity level assigned to the patch baseline after the update - // completed. - ApprovedPatchesComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` - - // Indicates whether the list of approved patches includes non-security updates - // that should be applied to the instances. The default value is 'false'. Applies - // to Linux instances only. - ApprovedPatchesEnableNonSecurity *bool `type:"boolean"` - - // The ID of the deleted patch baseline. - BaselineId *string `min:"20" type:"string"` - - // The date when the patch baseline was created. - CreatedDate *time.Time `type:"timestamp"` - - // A description of the Patch Baseline. - Description *string `min:"1" type:"string"` - - // A set of global filters used to exclude patches from the baseline. - GlobalFilters *PatchFilterGroup `type:"structure"` - - // The date when the patch baseline was last modified. - ModifiedDate *time.Time `type:"timestamp"` - - // The name of the patch baseline. - Name *string `min:"3" type:"string"` - - // The operating system rule used by the updated patch baseline. - OperatingSystem *string `type:"string" enum:"OperatingSystem"` - - // A list of explicitly rejected patches for the baseline. - RejectedPatches []*string `type:"list"` - - // The action specified to take on patches included in the RejectedPatches list. - // A patch can be allowed only if it is a dependency of another package, or - // blocked entirely along with packages that include it as a dependency. - RejectedPatchesAction *string `type:"string" enum:"PatchAction"` - - // Information about the patches to use to update the instances, including target - // operating systems and source repositories. Applies to Linux instances only. - Sources []*PatchSource `type:"list"` -} - -// String returns the string representation -func (s UpdatePatchBaselineOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdatePatchBaselineOutput) GoString() string { - return s.String() -} - -// SetApprovalRules sets the ApprovalRules field's value. -func (s *UpdatePatchBaselineOutput) SetApprovalRules(v *PatchRuleGroup) *UpdatePatchBaselineOutput { - s.ApprovalRules = v - return s -} - -// SetApprovedPatches sets the ApprovedPatches field's value. -func (s *UpdatePatchBaselineOutput) SetApprovedPatches(v []*string) *UpdatePatchBaselineOutput { - s.ApprovedPatches = v - return s -} - -// SetApprovedPatchesComplianceLevel sets the ApprovedPatchesComplianceLevel field's value. -func (s *UpdatePatchBaselineOutput) SetApprovedPatchesComplianceLevel(v string) *UpdatePatchBaselineOutput { - s.ApprovedPatchesComplianceLevel = &v - return s -} - -// SetApprovedPatchesEnableNonSecurity sets the ApprovedPatchesEnableNonSecurity field's value. -func (s *UpdatePatchBaselineOutput) SetApprovedPatchesEnableNonSecurity(v bool) *UpdatePatchBaselineOutput { - s.ApprovedPatchesEnableNonSecurity = &v - return s -} - -// SetBaselineId sets the BaselineId field's value. -func (s *UpdatePatchBaselineOutput) SetBaselineId(v string) *UpdatePatchBaselineOutput { - s.BaselineId = &v - return s -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *UpdatePatchBaselineOutput) SetCreatedDate(v time.Time) *UpdatePatchBaselineOutput { - s.CreatedDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *UpdatePatchBaselineOutput) SetDescription(v string) *UpdatePatchBaselineOutput { - s.Description = &v - return s -} - -// SetGlobalFilters sets the GlobalFilters field's value. -func (s *UpdatePatchBaselineOutput) SetGlobalFilters(v *PatchFilterGroup) *UpdatePatchBaselineOutput { - s.GlobalFilters = v - return s -} - -// SetModifiedDate sets the ModifiedDate field's value. -func (s *UpdatePatchBaselineOutput) SetModifiedDate(v time.Time) *UpdatePatchBaselineOutput { - s.ModifiedDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdatePatchBaselineOutput) SetName(v string) *UpdatePatchBaselineOutput { - s.Name = &v - return s -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *UpdatePatchBaselineOutput) SetOperatingSystem(v string) *UpdatePatchBaselineOutput { - s.OperatingSystem = &v - return s -} - -// SetRejectedPatches sets the RejectedPatches field's value. -func (s *UpdatePatchBaselineOutput) SetRejectedPatches(v []*string) *UpdatePatchBaselineOutput { - s.RejectedPatches = v - return s -} - -// SetRejectedPatchesAction sets the RejectedPatchesAction field's value. -func (s *UpdatePatchBaselineOutput) SetRejectedPatchesAction(v string) *UpdatePatchBaselineOutput { - s.RejectedPatchesAction = &v - return s -} - -// SetSources sets the Sources field's value. -func (s *UpdatePatchBaselineOutput) SetSources(v []*PatchSource) *UpdatePatchBaselineOutput { - s.Sources = v - return s -} - -const ( - // AssociationComplianceSeverityCritical is a AssociationComplianceSeverity enum value - AssociationComplianceSeverityCritical = "CRITICAL" - - // AssociationComplianceSeverityHigh is a AssociationComplianceSeverity enum value - AssociationComplianceSeverityHigh = "HIGH" - - // AssociationComplianceSeverityMedium is a AssociationComplianceSeverity enum value - AssociationComplianceSeverityMedium = "MEDIUM" - - // AssociationComplianceSeverityLow is a AssociationComplianceSeverity enum value - AssociationComplianceSeverityLow = "LOW" - - // AssociationComplianceSeverityUnspecified is a AssociationComplianceSeverity enum value - AssociationComplianceSeverityUnspecified = "UNSPECIFIED" -) - -const ( - // AssociationExecutionFilterKeyExecutionId is a AssociationExecutionFilterKey enum value - AssociationExecutionFilterKeyExecutionId = "ExecutionId" - - // AssociationExecutionFilterKeyStatus is a AssociationExecutionFilterKey enum value - AssociationExecutionFilterKeyStatus = "Status" - - // AssociationExecutionFilterKeyCreatedTime is a AssociationExecutionFilterKey enum value - AssociationExecutionFilterKeyCreatedTime = "CreatedTime" -) - -const ( - // AssociationExecutionTargetsFilterKeyStatus is a AssociationExecutionTargetsFilterKey enum value - AssociationExecutionTargetsFilterKeyStatus = "Status" - - // AssociationExecutionTargetsFilterKeyResourceId is a AssociationExecutionTargetsFilterKey enum value - AssociationExecutionTargetsFilterKeyResourceId = "ResourceId" - - // AssociationExecutionTargetsFilterKeyResourceType is a AssociationExecutionTargetsFilterKey enum value - AssociationExecutionTargetsFilterKeyResourceType = "ResourceType" -) - -const ( - // AssociationFilterKeyInstanceId is a AssociationFilterKey enum value - AssociationFilterKeyInstanceId = "InstanceId" - - // AssociationFilterKeyName is a AssociationFilterKey enum value - AssociationFilterKeyName = "Name" - - // AssociationFilterKeyAssociationId is a AssociationFilterKey enum value - AssociationFilterKeyAssociationId = "AssociationId" - - // AssociationFilterKeyAssociationStatusName is a AssociationFilterKey enum value - AssociationFilterKeyAssociationStatusName = "AssociationStatusName" - - // AssociationFilterKeyLastExecutedBefore is a AssociationFilterKey enum value - AssociationFilterKeyLastExecutedBefore = "LastExecutedBefore" - - // AssociationFilterKeyLastExecutedAfter is a AssociationFilterKey enum value - AssociationFilterKeyLastExecutedAfter = "LastExecutedAfter" - - // AssociationFilterKeyAssociationName is a AssociationFilterKey enum value - AssociationFilterKeyAssociationName = "AssociationName" -) - -const ( - // AssociationFilterOperatorTypeEqual is a AssociationFilterOperatorType enum value - AssociationFilterOperatorTypeEqual = "EQUAL" - - // AssociationFilterOperatorTypeLessThan is a AssociationFilterOperatorType enum value - AssociationFilterOperatorTypeLessThan = "LESS_THAN" - - // AssociationFilterOperatorTypeGreaterThan is a AssociationFilterOperatorType enum value - AssociationFilterOperatorTypeGreaterThan = "GREATER_THAN" -) - -const ( - // AssociationStatusNamePending is a AssociationStatusName enum value - AssociationStatusNamePending = "Pending" - - // AssociationStatusNameSuccess is a AssociationStatusName enum value - AssociationStatusNameSuccess = "Success" - - // AssociationStatusNameFailed is a AssociationStatusName enum value - AssociationStatusNameFailed = "Failed" -) - -const ( - // AttachmentHashTypeSha256 is a AttachmentHashType enum value - AttachmentHashTypeSha256 = "Sha256" -) - -const ( - // AttachmentsSourceKeySourceUrl is a AttachmentsSourceKey enum value - AttachmentsSourceKeySourceUrl = "SourceUrl" -) - -const ( - // AutomationExecutionFilterKeyDocumentNamePrefix is a AutomationExecutionFilterKey enum value - AutomationExecutionFilterKeyDocumentNamePrefix = "DocumentNamePrefix" - - // AutomationExecutionFilterKeyExecutionStatus is a AutomationExecutionFilterKey enum value - AutomationExecutionFilterKeyExecutionStatus = "ExecutionStatus" - - // AutomationExecutionFilterKeyExecutionId is a AutomationExecutionFilterKey enum value - AutomationExecutionFilterKeyExecutionId = "ExecutionId" - - // AutomationExecutionFilterKeyParentExecutionId is a AutomationExecutionFilterKey enum value - AutomationExecutionFilterKeyParentExecutionId = "ParentExecutionId" - - // AutomationExecutionFilterKeyCurrentAction is a AutomationExecutionFilterKey enum value - AutomationExecutionFilterKeyCurrentAction = "CurrentAction" - - // AutomationExecutionFilterKeyStartTimeBefore is a AutomationExecutionFilterKey enum value - AutomationExecutionFilterKeyStartTimeBefore = "StartTimeBefore" - - // AutomationExecutionFilterKeyStartTimeAfter is a AutomationExecutionFilterKey enum value - AutomationExecutionFilterKeyStartTimeAfter = "StartTimeAfter" - - // AutomationExecutionFilterKeyAutomationType is a AutomationExecutionFilterKey enum value - AutomationExecutionFilterKeyAutomationType = "AutomationType" -) - -const ( - // AutomationExecutionStatusPending is a AutomationExecutionStatus enum value - AutomationExecutionStatusPending = "Pending" - - // AutomationExecutionStatusInProgress is a AutomationExecutionStatus enum value - AutomationExecutionStatusInProgress = "InProgress" - - // AutomationExecutionStatusWaiting is a AutomationExecutionStatus enum value - AutomationExecutionStatusWaiting = "Waiting" - - // AutomationExecutionStatusSuccess is a AutomationExecutionStatus enum value - AutomationExecutionStatusSuccess = "Success" - - // AutomationExecutionStatusTimedOut is a AutomationExecutionStatus enum value - AutomationExecutionStatusTimedOut = "TimedOut" - - // AutomationExecutionStatusCancelling is a AutomationExecutionStatus enum value - AutomationExecutionStatusCancelling = "Cancelling" - - // AutomationExecutionStatusCancelled is a AutomationExecutionStatus enum value - AutomationExecutionStatusCancelled = "Cancelled" - - // AutomationExecutionStatusFailed is a AutomationExecutionStatus enum value - AutomationExecutionStatusFailed = "Failed" -) - -const ( - // AutomationTypeCrossAccount is a AutomationType enum value - AutomationTypeCrossAccount = "CrossAccount" - - // AutomationTypeLocal is a AutomationType enum value - AutomationTypeLocal = "Local" -) - -const ( - // CommandFilterKeyInvokedAfter is a CommandFilterKey enum value - CommandFilterKeyInvokedAfter = "InvokedAfter" - - // CommandFilterKeyInvokedBefore is a CommandFilterKey enum value - CommandFilterKeyInvokedBefore = "InvokedBefore" - - // CommandFilterKeyStatus is a CommandFilterKey enum value - CommandFilterKeyStatus = "Status" - - // CommandFilterKeyExecutionStage is a CommandFilterKey enum value - CommandFilterKeyExecutionStage = "ExecutionStage" - - // CommandFilterKeyDocumentName is a CommandFilterKey enum value - CommandFilterKeyDocumentName = "DocumentName" -) - -const ( - // CommandInvocationStatusPending is a CommandInvocationStatus enum value - CommandInvocationStatusPending = "Pending" - - // CommandInvocationStatusInProgress is a CommandInvocationStatus enum value - CommandInvocationStatusInProgress = "InProgress" - - // CommandInvocationStatusDelayed is a CommandInvocationStatus enum value - CommandInvocationStatusDelayed = "Delayed" - - // CommandInvocationStatusSuccess is a CommandInvocationStatus enum value - CommandInvocationStatusSuccess = "Success" - - // CommandInvocationStatusCancelled is a CommandInvocationStatus enum value - CommandInvocationStatusCancelled = "Cancelled" - - // CommandInvocationStatusTimedOut is a CommandInvocationStatus enum value - CommandInvocationStatusTimedOut = "TimedOut" - - // CommandInvocationStatusFailed is a CommandInvocationStatus enum value - CommandInvocationStatusFailed = "Failed" - - // CommandInvocationStatusCancelling is a CommandInvocationStatus enum value - CommandInvocationStatusCancelling = "Cancelling" -) - -const ( - // CommandPluginStatusPending is a CommandPluginStatus enum value - CommandPluginStatusPending = "Pending" - - // CommandPluginStatusInProgress is a CommandPluginStatus enum value - CommandPluginStatusInProgress = "InProgress" - - // CommandPluginStatusSuccess is a CommandPluginStatus enum value - CommandPluginStatusSuccess = "Success" - - // CommandPluginStatusTimedOut is a CommandPluginStatus enum value - CommandPluginStatusTimedOut = "TimedOut" - - // CommandPluginStatusCancelled is a CommandPluginStatus enum value - CommandPluginStatusCancelled = "Cancelled" - - // CommandPluginStatusFailed is a CommandPluginStatus enum value - CommandPluginStatusFailed = "Failed" -) - -const ( - // CommandStatusPending is a CommandStatus enum value - CommandStatusPending = "Pending" - - // CommandStatusInProgress is a CommandStatus enum value - CommandStatusInProgress = "InProgress" - - // CommandStatusSuccess is a CommandStatus enum value - CommandStatusSuccess = "Success" - - // CommandStatusCancelled is a CommandStatus enum value - CommandStatusCancelled = "Cancelled" - - // CommandStatusFailed is a CommandStatus enum value - CommandStatusFailed = "Failed" - - // CommandStatusTimedOut is a CommandStatus enum value - CommandStatusTimedOut = "TimedOut" - - // CommandStatusCancelling is a CommandStatus enum value - CommandStatusCancelling = "Cancelling" -) - -const ( - // ComplianceQueryOperatorTypeEqual is a ComplianceQueryOperatorType enum value - ComplianceQueryOperatorTypeEqual = "EQUAL" - - // ComplianceQueryOperatorTypeNotEqual is a ComplianceQueryOperatorType enum value - ComplianceQueryOperatorTypeNotEqual = "NOT_EQUAL" - - // ComplianceQueryOperatorTypeBeginWith is a ComplianceQueryOperatorType enum value - ComplianceQueryOperatorTypeBeginWith = "BEGIN_WITH" - - // ComplianceQueryOperatorTypeLessThan is a ComplianceQueryOperatorType enum value - ComplianceQueryOperatorTypeLessThan = "LESS_THAN" - - // ComplianceQueryOperatorTypeGreaterThan is a ComplianceQueryOperatorType enum value - ComplianceQueryOperatorTypeGreaterThan = "GREATER_THAN" -) - -const ( - // ComplianceSeverityCritical is a ComplianceSeverity enum value - ComplianceSeverityCritical = "CRITICAL" - - // ComplianceSeverityHigh is a ComplianceSeverity enum value - ComplianceSeverityHigh = "HIGH" - - // ComplianceSeverityMedium is a ComplianceSeverity enum value - ComplianceSeverityMedium = "MEDIUM" - - // ComplianceSeverityLow is a ComplianceSeverity enum value - ComplianceSeverityLow = "LOW" - - // ComplianceSeverityInformational is a ComplianceSeverity enum value - ComplianceSeverityInformational = "INFORMATIONAL" - - // ComplianceSeverityUnspecified is a ComplianceSeverity enum value - ComplianceSeverityUnspecified = "UNSPECIFIED" -) - -const ( - // ComplianceStatusCompliant is a ComplianceStatus enum value - ComplianceStatusCompliant = "COMPLIANT" - - // ComplianceStatusNonCompliant is a ComplianceStatus enum value - ComplianceStatusNonCompliant = "NON_COMPLIANT" -) - -const ( - // ConnectionStatusConnected is a ConnectionStatus enum value - ConnectionStatusConnected = "Connected" - - // ConnectionStatusNotConnected is a ConnectionStatus enum value - ConnectionStatusNotConnected = "NotConnected" -) - -const ( - // DescribeActivationsFilterKeysActivationIds is a DescribeActivationsFilterKeys enum value - DescribeActivationsFilterKeysActivationIds = "ActivationIds" - - // DescribeActivationsFilterKeysDefaultInstanceName is a DescribeActivationsFilterKeys enum value - DescribeActivationsFilterKeysDefaultInstanceName = "DefaultInstanceName" - - // DescribeActivationsFilterKeysIamRole is a DescribeActivationsFilterKeys enum value - DescribeActivationsFilterKeysIamRole = "IamRole" -) - -const ( - // DocumentFilterKeyName is a DocumentFilterKey enum value - DocumentFilterKeyName = "Name" - - // DocumentFilterKeyOwner is a DocumentFilterKey enum value - DocumentFilterKeyOwner = "Owner" - - // DocumentFilterKeyPlatformTypes is a DocumentFilterKey enum value - DocumentFilterKeyPlatformTypes = "PlatformTypes" - - // DocumentFilterKeyDocumentType is a DocumentFilterKey enum value - DocumentFilterKeyDocumentType = "DocumentType" -) - -const ( - // DocumentFormatYaml is a DocumentFormat enum value - DocumentFormatYaml = "YAML" - - // DocumentFormatJson is a DocumentFormat enum value - DocumentFormatJson = "JSON" -) - -const ( - // DocumentHashTypeSha256 is a DocumentHashType enum value - DocumentHashTypeSha256 = "Sha256" - - // DocumentHashTypeSha1 is a DocumentHashType enum value - DocumentHashTypeSha1 = "Sha1" -) - -const ( - // DocumentParameterTypeString is a DocumentParameterType enum value - DocumentParameterTypeString = "String" - - // DocumentParameterTypeStringList is a DocumentParameterType enum value - DocumentParameterTypeStringList = "StringList" -) - -const ( - // DocumentPermissionTypeShare is a DocumentPermissionType enum value - DocumentPermissionTypeShare = "Share" -) - -// The status of a document. -const ( - // DocumentStatusCreating is a DocumentStatus enum value - DocumentStatusCreating = "Creating" - - // DocumentStatusActive is a DocumentStatus enum value - DocumentStatusActive = "Active" - - // DocumentStatusUpdating is a DocumentStatus enum value - DocumentStatusUpdating = "Updating" - - // DocumentStatusDeleting is a DocumentStatus enum value - DocumentStatusDeleting = "Deleting" - - // DocumentStatusFailed is a DocumentStatus enum value - DocumentStatusFailed = "Failed" -) - -const ( - // DocumentTypeCommand is a DocumentType enum value - DocumentTypeCommand = "Command" - - // DocumentTypePolicy is a DocumentType enum value - DocumentTypePolicy = "Policy" - - // DocumentTypeAutomation is a DocumentType enum value - DocumentTypeAutomation = "Automation" - - // DocumentTypeSession is a DocumentType enum value - DocumentTypeSession = "Session" - - // DocumentTypePackage is a DocumentType enum value - DocumentTypePackage = "Package" -) - -const ( - // ExecutionModeAuto is a ExecutionMode enum value - ExecutionModeAuto = "Auto" - - // ExecutionModeInteractive is a ExecutionMode enum value - ExecutionModeInteractive = "Interactive" -) - -const ( - // FaultClient is a Fault enum value - FaultClient = "Client" - - // FaultServer is a Fault enum value - FaultServer = "Server" - - // FaultUnknown is a Fault enum value - FaultUnknown = "Unknown" -) - -const ( - // InstanceInformationFilterKeyInstanceIds is a InstanceInformationFilterKey enum value - InstanceInformationFilterKeyInstanceIds = "InstanceIds" - - // InstanceInformationFilterKeyAgentVersion is a InstanceInformationFilterKey enum value - InstanceInformationFilterKeyAgentVersion = "AgentVersion" - - // InstanceInformationFilterKeyPingStatus is a InstanceInformationFilterKey enum value - InstanceInformationFilterKeyPingStatus = "PingStatus" - - // InstanceInformationFilterKeyPlatformTypes is a InstanceInformationFilterKey enum value - InstanceInformationFilterKeyPlatformTypes = "PlatformTypes" - - // InstanceInformationFilterKeyActivationIds is a InstanceInformationFilterKey enum value - InstanceInformationFilterKeyActivationIds = "ActivationIds" - - // InstanceInformationFilterKeyIamRole is a InstanceInformationFilterKey enum value - InstanceInformationFilterKeyIamRole = "IamRole" - - // InstanceInformationFilterKeyResourceType is a InstanceInformationFilterKey enum value - InstanceInformationFilterKeyResourceType = "ResourceType" - - // InstanceInformationFilterKeyAssociationStatus is a InstanceInformationFilterKey enum value - InstanceInformationFilterKeyAssociationStatus = "AssociationStatus" -) - -const ( - // InstancePatchStateOperatorTypeEqual is a InstancePatchStateOperatorType enum value - InstancePatchStateOperatorTypeEqual = "Equal" - - // InstancePatchStateOperatorTypeNotEqual is a InstancePatchStateOperatorType enum value - InstancePatchStateOperatorTypeNotEqual = "NotEqual" - - // InstancePatchStateOperatorTypeLessThan is a InstancePatchStateOperatorType enum value - InstancePatchStateOperatorTypeLessThan = "LessThan" - - // InstancePatchStateOperatorTypeGreaterThan is a InstancePatchStateOperatorType enum value - InstancePatchStateOperatorTypeGreaterThan = "GreaterThan" -) - -const ( - // InventoryAttributeDataTypeString is a InventoryAttributeDataType enum value - InventoryAttributeDataTypeString = "string" - - // InventoryAttributeDataTypeNumber is a InventoryAttributeDataType enum value - InventoryAttributeDataTypeNumber = "number" -) - -const ( - // InventoryDeletionStatusInProgress is a InventoryDeletionStatus enum value - InventoryDeletionStatusInProgress = "InProgress" - - // InventoryDeletionStatusComplete is a InventoryDeletionStatus enum value - InventoryDeletionStatusComplete = "Complete" -) - -const ( - // InventoryQueryOperatorTypeEqual is a InventoryQueryOperatorType enum value - InventoryQueryOperatorTypeEqual = "Equal" - - // InventoryQueryOperatorTypeNotEqual is a InventoryQueryOperatorType enum value - InventoryQueryOperatorTypeNotEqual = "NotEqual" - - // InventoryQueryOperatorTypeBeginWith is a InventoryQueryOperatorType enum value - InventoryQueryOperatorTypeBeginWith = "BeginWith" - - // InventoryQueryOperatorTypeLessThan is a InventoryQueryOperatorType enum value - InventoryQueryOperatorTypeLessThan = "LessThan" - - // InventoryQueryOperatorTypeGreaterThan is a InventoryQueryOperatorType enum value - InventoryQueryOperatorTypeGreaterThan = "GreaterThan" - - // InventoryQueryOperatorTypeExists is a InventoryQueryOperatorType enum value - InventoryQueryOperatorTypeExists = "Exists" -) - -const ( - // InventorySchemaDeleteOptionDisableSchema is a InventorySchemaDeleteOption enum value - InventorySchemaDeleteOptionDisableSchema = "DisableSchema" - - // InventorySchemaDeleteOptionDeleteSchema is a InventorySchemaDeleteOption enum value - InventorySchemaDeleteOptionDeleteSchema = "DeleteSchema" -) - -const ( - // LastResourceDataSyncStatusSuccessful is a LastResourceDataSyncStatus enum value - LastResourceDataSyncStatusSuccessful = "Successful" - - // LastResourceDataSyncStatusFailed is a LastResourceDataSyncStatus enum value - LastResourceDataSyncStatusFailed = "Failed" - - // LastResourceDataSyncStatusInProgress is a LastResourceDataSyncStatus enum value - LastResourceDataSyncStatusInProgress = "InProgress" -) - -const ( - // MaintenanceWindowExecutionStatusPending is a MaintenanceWindowExecutionStatus enum value - MaintenanceWindowExecutionStatusPending = "PENDING" - - // MaintenanceWindowExecutionStatusInProgress is a MaintenanceWindowExecutionStatus enum value - MaintenanceWindowExecutionStatusInProgress = "IN_PROGRESS" - - // MaintenanceWindowExecutionStatusSuccess is a MaintenanceWindowExecutionStatus enum value - MaintenanceWindowExecutionStatusSuccess = "SUCCESS" - - // MaintenanceWindowExecutionStatusFailed is a MaintenanceWindowExecutionStatus enum value - MaintenanceWindowExecutionStatusFailed = "FAILED" - - // MaintenanceWindowExecutionStatusTimedOut is a MaintenanceWindowExecutionStatus enum value - MaintenanceWindowExecutionStatusTimedOut = "TIMED_OUT" - - // MaintenanceWindowExecutionStatusCancelling is a MaintenanceWindowExecutionStatus enum value - MaintenanceWindowExecutionStatusCancelling = "CANCELLING" - - // MaintenanceWindowExecutionStatusCancelled is a MaintenanceWindowExecutionStatus enum value - MaintenanceWindowExecutionStatusCancelled = "CANCELLED" - - // MaintenanceWindowExecutionStatusSkippedOverlapping is a MaintenanceWindowExecutionStatus enum value - MaintenanceWindowExecutionStatusSkippedOverlapping = "SKIPPED_OVERLAPPING" -) - -const ( - // MaintenanceWindowResourceTypeInstance is a MaintenanceWindowResourceType enum value - MaintenanceWindowResourceTypeInstance = "INSTANCE" -) - -const ( - // MaintenanceWindowTaskTypeRunCommand is a MaintenanceWindowTaskType enum value - MaintenanceWindowTaskTypeRunCommand = "RUN_COMMAND" - - // MaintenanceWindowTaskTypeAutomation is a MaintenanceWindowTaskType enum value - MaintenanceWindowTaskTypeAutomation = "AUTOMATION" - - // MaintenanceWindowTaskTypeStepFunctions is a MaintenanceWindowTaskType enum value - MaintenanceWindowTaskTypeStepFunctions = "STEP_FUNCTIONS" - - // MaintenanceWindowTaskTypeLambda is a MaintenanceWindowTaskType enum value - MaintenanceWindowTaskTypeLambda = "LAMBDA" -) - -const ( - // NotificationEventAll is a NotificationEvent enum value - NotificationEventAll = "All" - - // NotificationEventInProgress is a NotificationEvent enum value - NotificationEventInProgress = "InProgress" - - // NotificationEventSuccess is a NotificationEvent enum value - NotificationEventSuccess = "Success" - - // NotificationEventTimedOut is a NotificationEvent enum value - NotificationEventTimedOut = "TimedOut" - - // NotificationEventCancelled is a NotificationEvent enum value - NotificationEventCancelled = "Cancelled" - - // NotificationEventFailed is a NotificationEvent enum value - NotificationEventFailed = "Failed" -) - -const ( - // NotificationTypeCommand is a NotificationType enum value - NotificationTypeCommand = "Command" - - // NotificationTypeInvocation is a NotificationType enum value - NotificationTypeInvocation = "Invocation" -) - -const ( - // OperatingSystemWindows is a OperatingSystem enum value - OperatingSystemWindows = "WINDOWS" - - // OperatingSystemAmazonLinux is a OperatingSystem enum value - OperatingSystemAmazonLinux = "AMAZON_LINUX" - - // OperatingSystemAmazonLinux2 is a OperatingSystem enum value - OperatingSystemAmazonLinux2 = "AMAZON_LINUX_2" - - // OperatingSystemUbuntu is a OperatingSystem enum value - OperatingSystemUbuntu = "UBUNTU" - - // OperatingSystemRedhatEnterpriseLinux is a OperatingSystem enum value - OperatingSystemRedhatEnterpriseLinux = "REDHAT_ENTERPRISE_LINUX" - - // OperatingSystemSuse is a OperatingSystem enum value - OperatingSystemSuse = "SUSE" - - // OperatingSystemCentos is a OperatingSystem enum value - OperatingSystemCentos = "CENTOS" -) - -const ( - // ParameterTypeString is a ParameterType enum value - ParameterTypeString = "String" - - // ParameterTypeStringList is a ParameterType enum value - ParameterTypeStringList = "StringList" - - // ParameterTypeSecureString is a ParameterType enum value - ParameterTypeSecureString = "SecureString" -) - -const ( - // ParametersFilterKeyName is a ParametersFilterKey enum value - ParametersFilterKeyName = "Name" - - // ParametersFilterKeyType is a ParametersFilterKey enum value - ParametersFilterKeyType = "Type" - - // ParametersFilterKeyKeyId is a ParametersFilterKey enum value - ParametersFilterKeyKeyId = "KeyId" -) - -const ( - // PatchActionAllowAsDependency is a PatchAction enum value - PatchActionAllowAsDependency = "ALLOW_AS_DEPENDENCY" - - // PatchActionBlock is a PatchAction enum value - PatchActionBlock = "BLOCK" -) - -const ( - // PatchComplianceDataStateInstalled is a PatchComplianceDataState enum value - PatchComplianceDataStateInstalled = "INSTALLED" - - // PatchComplianceDataStateInstalledOther is a PatchComplianceDataState enum value - PatchComplianceDataStateInstalledOther = "INSTALLED_OTHER" - - // PatchComplianceDataStateInstalledRejected is a PatchComplianceDataState enum value - PatchComplianceDataStateInstalledRejected = "INSTALLED_REJECTED" - - // PatchComplianceDataStateMissing is a PatchComplianceDataState enum value - PatchComplianceDataStateMissing = "MISSING" - - // PatchComplianceDataStateNotApplicable is a PatchComplianceDataState enum value - PatchComplianceDataStateNotApplicable = "NOT_APPLICABLE" - - // PatchComplianceDataStateFailed is a PatchComplianceDataState enum value - PatchComplianceDataStateFailed = "FAILED" -) - -const ( - // PatchComplianceLevelCritical is a PatchComplianceLevel enum value - PatchComplianceLevelCritical = "CRITICAL" - - // PatchComplianceLevelHigh is a PatchComplianceLevel enum value - PatchComplianceLevelHigh = "HIGH" - - // PatchComplianceLevelMedium is a PatchComplianceLevel enum value - PatchComplianceLevelMedium = "MEDIUM" - - // PatchComplianceLevelLow is a PatchComplianceLevel enum value - PatchComplianceLevelLow = "LOW" - - // PatchComplianceLevelInformational is a PatchComplianceLevel enum value - PatchComplianceLevelInformational = "INFORMATIONAL" - - // PatchComplianceLevelUnspecified is a PatchComplianceLevel enum value - PatchComplianceLevelUnspecified = "UNSPECIFIED" -) - -const ( - // PatchDeploymentStatusApproved is a PatchDeploymentStatus enum value - PatchDeploymentStatusApproved = "APPROVED" - - // PatchDeploymentStatusPendingApproval is a PatchDeploymentStatus enum value - PatchDeploymentStatusPendingApproval = "PENDING_APPROVAL" - - // PatchDeploymentStatusExplicitApproved is a PatchDeploymentStatus enum value - PatchDeploymentStatusExplicitApproved = "EXPLICIT_APPROVED" - - // PatchDeploymentStatusExplicitRejected is a PatchDeploymentStatus enum value - PatchDeploymentStatusExplicitRejected = "EXPLICIT_REJECTED" -) - -const ( - // PatchFilterKeyProduct is a PatchFilterKey enum value - PatchFilterKeyProduct = "PRODUCT" - - // PatchFilterKeyClassification is a PatchFilterKey enum value - PatchFilterKeyClassification = "CLASSIFICATION" - - // PatchFilterKeyMsrcSeverity is a PatchFilterKey enum value - PatchFilterKeyMsrcSeverity = "MSRC_SEVERITY" - - // PatchFilterKeyPatchId is a PatchFilterKey enum value - PatchFilterKeyPatchId = "PATCH_ID" - - // PatchFilterKeySection is a PatchFilterKey enum value - PatchFilterKeySection = "SECTION" - - // PatchFilterKeyPriority is a PatchFilterKey enum value - PatchFilterKeyPriority = "PRIORITY" - - // PatchFilterKeySeverity is a PatchFilterKey enum value - PatchFilterKeySeverity = "SEVERITY" -) - -const ( - // PatchOperationTypeScan is a PatchOperationType enum value - PatchOperationTypeScan = "Scan" - - // PatchOperationTypeInstall is a PatchOperationType enum value - PatchOperationTypeInstall = "Install" -) - -const ( - // PingStatusOnline is a PingStatus enum value - PingStatusOnline = "Online" - - // PingStatusConnectionLost is a PingStatus enum value - PingStatusConnectionLost = "ConnectionLost" - - // PingStatusInactive is a PingStatus enum value - PingStatusInactive = "Inactive" -) - -const ( - // PlatformTypeWindows is a PlatformType enum value - PlatformTypeWindows = "Windows" - - // PlatformTypeLinux is a PlatformType enum value - PlatformTypeLinux = "Linux" -) - -const ( - // ResourceDataSyncS3FormatJsonSerDe is a ResourceDataSyncS3Format enum value - ResourceDataSyncS3FormatJsonSerDe = "JsonSerDe" -) - -const ( - // ResourceTypeManagedInstance is a ResourceType enum value - ResourceTypeManagedInstance = "ManagedInstance" - - // ResourceTypeDocument is a ResourceType enum value - ResourceTypeDocument = "Document" - - // ResourceTypeEc2instance is a ResourceType enum value - ResourceTypeEc2instance = "EC2Instance" -) - -const ( - // ResourceTypeForTaggingDocument is a ResourceTypeForTagging enum value - ResourceTypeForTaggingDocument = "Document" - - // ResourceTypeForTaggingManagedInstance is a ResourceTypeForTagging enum value - ResourceTypeForTaggingManagedInstance = "ManagedInstance" - - // ResourceTypeForTaggingMaintenanceWindow is a ResourceTypeForTagging enum value - ResourceTypeForTaggingMaintenanceWindow = "MaintenanceWindow" - - // ResourceTypeForTaggingParameter is a ResourceTypeForTagging enum value - ResourceTypeForTaggingParameter = "Parameter" - - // ResourceTypeForTaggingPatchBaseline is a ResourceTypeForTagging enum value - ResourceTypeForTaggingPatchBaseline = "PatchBaseline" -) - -const ( - // SessionFilterKeyInvokedAfter is a SessionFilterKey enum value - SessionFilterKeyInvokedAfter = "InvokedAfter" - - // SessionFilterKeyInvokedBefore is a SessionFilterKey enum value - SessionFilterKeyInvokedBefore = "InvokedBefore" - - // SessionFilterKeyTarget is a SessionFilterKey enum value - SessionFilterKeyTarget = "Target" - - // SessionFilterKeyOwner is a SessionFilterKey enum value - SessionFilterKeyOwner = "Owner" - - // SessionFilterKeyStatus is a SessionFilterKey enum value - SessionFilterKeyStatus = "Status" -) - -const ( - // SessionStateActive is a SessionState enum value - SessionStateActive = "Active" - - // SessionStateHistory is a SessionState enum value - SessionStateHistory = "History" -) - -const ( - // SessionStatusConnected is a SessionStatus enum value - SessionStatusConnected = "Connected" - - // SessionStatusConnecting is a SessionStatus enum value - SessionStatusConnecting = "Connecting" - - // SessionStatusDisconnected is a SessionStatus enum value - SessionStatusDisconnected = "Disconnected" - - // SessionStatusTerminated is a SessionStatus enum value - SessionStatusTerminated = "Terminated" - - // SessionStatusTerminating is a SessionStatus enum value - SessionStatusTerminating = "Terminating" - - // SessionStatusFailed is a SessionStatus enum value - SessionStatusFailed = "Failed" -) - -const ( - // SignalTypeApprove is a SignalType enum value - SignalTypeApprove = "Approve" - - // SignalTypeReject is a SignalType enum value - SignalTypeReject = "Reject" - - // SignalTypeStartStep is a SignalType enum value - SignalTypeStartStep = "StartStep" - - // SignalTypeStopStep is a SignalType enum value - SignalTypeStopStep = "StopStep" - - // SignalTypeResume is a SignalType enum value - SignalTypeResume = "Resume" -) - -const ( - // StepExecutionFilterKeyStartTimeBefore is a StepExecutionFilterKey enum value - StepExecutionFilterKeyStartTimeBefore = "StartTimeBefore" - - // StepExecutionFilterKeyStartTimeAfter is a StepExecutionFilterKey enum value - StepExecutionFilterKeyStartTimeAfter = "StartTimeAfter" - - // StepExecutionFilterKeyStepExecutionStatus is a StepExecutionFilterKey enum value - StepExecutionFilterKeyStepExecutionStatus = "StepExecutionStatus" - - // StepExecutionFilterKeyStepExecutionId is a StepExecutionFilterKey enum value - StepExecutionFilterKeyStepExecutionId = "StepExecutionId" - - // StepExecutionFilterKeyStepName is a StepExecutionFilterKey enum value - StepExecutionFilterKeyStepName = "StepName" - - // StepExecutionFilterKeyAction is a StepExecutionFilterKey enum value - StepExecutionFilterKeyAction = "Action" -) - -const ( - // StopTypeComplete is a StopType enum value - StopTypeComplete = "Complete" - - // StopTypeCancel is a StopType enum value - StopTypeCancel = "Cancel" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go deleted file mode 100644 index 6964adba0..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package ssm provides the client and types for making API -// requests to Amazon Simple Systems Manager (SSM). -// -// AWS Systems Manager is a collection of capabilities that helps you automate -// management tasks such as collecting system inventory, applying operating -// system (OS) patches, automating the creation of Amazon Machine Images (AMIs), -// and configuring operating systems (OSs) and applications at scale. Systems -// Manager lets you remotely and securely manage the configuration of your managed -// instances. A managed instance is any Amazon EC2 instance or on-premises machine -// in your hybrid environment that has been configured for Systems Manager. -// -// This reference is intended to be used with the AWS Systems Manager User Guide -// (http://docs.aws.amazon.com/systems-manager/latest/userguide/). -// -// To get started, verify prerequisites and configure managed instances. For -// more information, see Systems Manager Prerequisites (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up.html) -// in the AWS Systems Manager User Guide. -// -// For information about other API actions you can perform on Amazon EC2 instances, -// see the Amazon EC2 API Reference (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/). -// For information about how to use a Query API, see Making API Requests (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/making-api-requests.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06 for more information on this service. -// -// See ssm package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/ssm/ -// -// Using the Client -// -// To contact Amazon Simple Systems Manager (SSM) with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Simple Systems Manager (SSM) client SSM for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/ssm/#New -package ssm diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go deleted file mode 100644 index 44d3bac89..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go +++ /dev/null @@ -1,685 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ssm - -const ( - - // ErrCodeAlreadyExistsException for service response error code - // "AlreadyExistsException". - // - // Error returned if an attempt is made to register a patch group with a patch - // baseline that is already registered with a different patch baseline. - ErrCodeAlreadyExistsException = "AlreadyExistsException" - - // ErrCodeAssociatedInstances for service response error code - // "AssociatedInstances". - // - // You must disassociate a document from all instances before you can delete - // it. - ErrCodeAssociatedInstances = "AssociatedInstances" - - // ErrCodeAssociationAlreadyExists for service response error code - // "AssociationAlreadyExists". - // - // The specified association already exists. - ErrCodeAssociationAlreadyExists = "AssociationAlreadyExists" - - // ErrCodeAssociationDoesNotExist for service response error code - // "AssociationDoesNotExist". - // - // The specified association does not exist. - ErrCodeAssociationDoesNotExist = "AssociationDoesNotExist" - - // ErrCodeAssociationExecutionDoesNotExist for service response error code - // "AssociationExecutionDoesNotExist". - // - // The specified execution ID does not exist. Verify the ID number and try again. - ErrCodeAssociationExecutionDoesNotExist = "AssociationExecutionDoesNotExist" - - // ErrCodeAssociationLimitExceeded for service response error code - // "AssociationLimitExceeded". - // - // You can have at most 2,000 active associations. - ErrCodeAssociationLimitExceeded = "AssociationLimitExceeded" - - // ErrCodeAssociationVersionLimitExceeded for service response error code - // "AssociationVersionLimitExceeded". - // - // You have reached the maximum number versions allowed for an association. - // Each association has a limit of 1,000 versions. - ErrCodeAssociationVersionLimitExceeded = "AssociationVersionLimitExceeded" - - // ErrCodeAutomationDefinitionNotFoundException for service response error code - // "AutomationDefinitionNotFoundException". - // - // An Automation document with the specified name could not be found. - ErrCodeAutomationDefinitionNotFoundException = "AutomationDefinitionNotFoundException" - - // ErrCodeAutomationDefinitionVersionNotFoundException for service response error code - // "AutomationDefinitionVersionNotFoundException". - // - // An Automation document with the specified name and version could not be found. - ErrCodeAutomationDefinitionVersionNotFoundException = "AutomationDefinitionVersionNotFoundException" - - // ErrCodeAutomationExecutionLimitExceededException for service response error code - // "AutomationExecutionLimitExceededException". - // - // The number of simultaneously running Automation executions exceeded the allowable - // limit. - ErrCodeAutomationExecutionLimitExceededException = "AutomationExecutionLimitExceededException" - - // ErrCodeAutomationExecutionNotFoundException for service response error code - // "AutomationExecutionNotFoundException". - // - // There is no automation execution information for the requested automation - // execution ID. - ErrCodeAutomationExecutionNotFoundException = "AutomationExecutionNotFoundException" - - // ErrCodeAutomationStepNotFoundException for service response error code - // "AutomationStepNotFoundException". - // - // The specified step name and execution ID don't exist. Verify the information - // and try again. - ErrCodeAutomationStepNotFoundException = "AutomationStepNotFoundException" - - // ErrCodeComplianceTypeCountLimitExceededException for service response error code - // "ComplianceTypeCountLimitExceededException". - // - // You specified too many custom compliance types. You can specify a maximum - // of 10 different types. - ErrCodeComplianceTypeCountLimitExceededException = "ComplianceTypeCountLimitExceededException" - - // ErrCodeCustomSchemaCountLimitExceededException for service response error code - // "CustomSchemaCountLimitExceededException". - // - // You have exceeded the limit for custom schemas. Delete one or more custom - // schemas and try again. - ErrCodeCustomSchemaCountLimitExceededException = "CustomSchemaCountLimitExceededException" - - // ErrCodeDocumentAlreadyExists for service response error code - // "DocumentAlreadyExists". - // - // The specified document already exists. - ErrCodeDocumentAlreadyExists = "DocumentAlreadyExists" - - // ErrCodeDocumentLimitExceeded for service response error code - // "DocumentLimitExceeded". - // - // You can have at most 200 active Systems Manager documents. - ErrCodeDocumentLimitExceeded = "DocumentLimitExceeded" - - // ErrCodeDocumentPermissionLimit for service response error code - // "DocumentPermissionLimit". - // - // The document cannot be shared with more AWS user accounts. You can share - // a document with a maximum of 20 accounts. You can publicly share up to five - // documents. If you need to increase this limit, contact AWS Support. - ErrCodeDocumentPermissionLimit = "DocumentPermissionLimit" - - // ErrCodeDocumentVersionLimitExceeded for service response error code - // "DocumentVersionLimitExceeded". - // - // The document has too many versions. Delete one or more document versions - // and try again. - ErrCodeDocumentVersionLimitExceeded = "DocumentVersionLimitExceeded" - - // ErrCodeDoesNotExistException for service response error code - // "DoesNotExistException". - // - // Error returned when the ID specified for a resource, such as a Maintenance - // Window or Patch baseline, doesn't exist. - // - // For information about resource limits in Systems Manager, see AWS Systems - // Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). - ErrCodeDoesNotExistException = "DoesNotExistException" - - // ErrCodeDuplicateDocumentContent for service response error code - // "DuplicateDocumentContent". - // - // The content of the association document matches another document. Change - // the content of the document and try again. - ErrCodeDuplicateDocumentContent = "DuplicateDocumentContent" - - // ErrCodeDuplicateDocumentVersionName for service response error code - // "DuplicateDocumentVersionName". - // - // The version name has already been used in this document. Specify a different - // version name, and then try again. - ErrCodeDuplicateDocumentVersionName = "DuplicateDocumentVersionName" - - // ErrCodeDuplicateInstanceId for service response error code - // "DuplicateInstanceId". - // - // You cannot specify an instance ID in more than one association. - ErrCodeDuplicateInstanceId = "DuplicateInstanceId" - - // ErrCodeFeatureNotAvailableException for service response error code - // "FeatureNotAvailableException". - // - // You attempted to register a LAMBDA or STEP_FUNCTION task in a region where - // the corresponding service is not available. - ErrCodeFeatureNotAvailableException = "FeatureNotAvailableException" - - // ErrCodeHierarchyLevelLimitExceededException for service response error code - // "HierarchyLevelLimitExceededException". - // - // A hierarchy can have a maximum of 15 levels. For more information, see Requirements - // and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) - // in the AWS Systems Manager User Guide. - ErrCodeHierarchyLevelLimitExceededException = "HierarchyLevelLimitExceededException" - - // ErrCodeHierarchyTypeMismatchException for service response error code - // "HierarchyTypeMismatchException". - // - // Parameter Store does not support changing a parameter type in a hierarchy. - // For example, you can't change a parameter from a String type to a SecureString - // type. You must create a new, unique parameter. - ErrCodeHierarchyTypeMismatchException = "HierarchyTypeMismatchException" - - // ErrCodeIdempotentParameterMismatch for service response error code - // "IdempotentParameterMismatch". - // - // Error returned when an idempotent operation is retried and the parameters - // don't match the original call to the API with the same idempotency token. - ErrCodeIdempotentParameterMismatch = "IdempotentParameterMismatch" - - // ErrCodeInternalServerError for service response error code - // "InternalServerError". - // - // An error occurred on the server side. - ErrCodeInternalServerError = "InternalServerError" - - // ErrCodeInvalidActivation for service response error code - // "InvalidActivation". - // - // The activation is not valid. The activation might have been deleted, or the - // ActivationId and the ActivationCode do not match. - ErrCodeInvalidActivation = "InvalidActivation" - - // ErrCodeInvalidActivationId for service response error code - // "InvalidActivationId". - // - // The activation ID is not valid. Verify the you entered the correct ActivationId - // or ActivationCode and try again. - ErrCodeInvalidActivationId = "InvalidActivationId" - - // ErrCodeInvalidAggregatorException for service response error code - // "InvalidAggregatorException". - // - // The specified aggregator is not valid for inventory groups. Verify that the - // aggregator uses a valid inventory type such as AWS:Application or AWS:InstanceInformation. - ErrCodeInvalidAggregatorException = "InvalidAggregatorException" - - // ErrCodeInvalidAllowedPatternException for service response error code - // "InvalidAllowedPatternException". - // - // The request does not meet the regular expression requirement. - ErrCodeInvalidAllowedPatternException = "InvalidAllowedPatternException" - - // ErrCodeInvalidAssociation for service response error code - // "InvalidAssociation". - // - // The association is not valid or does not exist. - ErrCodeInvalidAssociation = "InvalidAssociation" - - // ErrCodeInvalidAssociationVersion for service response error code - // "InvalidAssociationVersion". - // - // The version you specified is not valid. Use ListAssociationVersions to view - // all versions of an association according to the association ID. Or, use the - // $LATEST parameter to view the latest version of the association. - ErrCodeInvalidAssociationVersion = "InvalidAssociationVersion" - - // ErrCodeInvalidAutomationExecutionParametersException for service response error code - // "InvalidAutomationExecutionParametersException". - // - // The supplied parameters for invoking the specified Automation document are - // incorrect. For example, they may not match the set of parameters permitted - // for the specified Automation document. - ErrCodeInvalidAutomationExecutionParametersException = "InvalidAutomationExecutionParametersException" - - // ErrCodeInvalidAutomationSignalException for service response error code - // "InvalidAutomationSignalException". - // - // The signal is not valid for the current Automation execution. - ErrCodeInvalidAutomationSignalException = "InvalidAutomationSignalException" - - // ErrCodeInvalidAutomationStatusUpdateException for service response error code - // "InvalidAutomationStatusUpdateException". - // - // The specified update status operation is not valid. - ErrCodeInvalidAutomationStatusUpdateException = "InvalidAutomationStatusUpdateException" - - // ErrCodeInvalidCommandId for service response error code - // "InvalidCommandId". - ErrCodeInvalidCommandId = "InvalidCommandId" - - // ErrCodeInvalidDeleteInventoryParametersException for service response error code - // "InvalidDeleteInventoryParametersException". - // - // One or more of the parameters specified for the delete operation is not valid. - // Verify all parameters and try again. - ErrCodeInvalidDeleteInventoryParametersException = "InvalidDeleteInventoryParametersException" - - // ErrCodeInvalidDeletionIdException for service response error code - // "InvalidDeletionIdException". - // - // The ID specified for the delete operation does not exist or is not valide. - // Verify the ID and try again. - ErrCodeInvalidDeletionIdException = "InvalidDeletionIdException" - - // ErrCodeInvalidDocument for service response error code - // "InvalidDocument". - // - // The specified document does not exist. - ErrCodeInvalidDocument = "InvalidDocument" - - // ErrCodeInvalidDocumentContent for service response error code - // "InvalidDocumentContent". - // - // The content for the document is not valid. - ErrCodeInvalidDocumentContent = "InvalidDocumentContent" - - // ErrCodeInvalidDocumentOperation for service response error code - // "InvalidDocumentOperation". - // - // You attempted to delete a document while it is still shared. You must stop - // sharing the document before you can delete it. - ErrCodeInvalidDocumentOperation = "InvalidDocumentOperation" - - // ErrCodeInvalidDocumentSchemaVersion for service response error code - // "InvalidDocumentSchemaVersion". - // - // The version of the document schema is not supported. - ErrCodeInvalidDocumentSchemaVersion = "InvalidDocumentSchemaVersion" - - // ErrCodeInvalidDocumentVersion for service response error code - // "InvalidDocumentVersion". - // - // The document version is not valid or does not exist. - ErrCodeInvalidDocumentVersion = "InvalidDocumentVersion" - - // ErrCodeInvalidFilter for service response error code - // "InvalidFilter". - // - // The filter name is not valid. Verify the you entered the correct name and - // try again. - ErrCodeInvalidFilter = "InvalidFilter" - - // ErrCodeInvalidFilterKey for service response error code - // "InvalidFilterKey". - // - // The specified key is not valid. - ErrCodeInvalidFilterKey = "InvalidFilterKey" - - // ErrCodeInvalidFilterOption for service response error code - // "InvalidFilterOption". - // - // The specified filter option is not valid. Valid options are Equals and BeginsWith. - // For Path filter, valid options are Recursive and OneLevel. - ErrCodeInvalidFilterOption = "InvalidFilterOption" - - // ErrCodeInvalidFilterValue for service response error code - // "InvalidFilterValue". - // - // The filter value is not valid. Verify the value and try again. - ErrCodeInvalidFilterValue = "InvalidFilterValue" - - // ErrCodeInvalidInstanceId for service response error code - // "InvalidInstanceId". - // - // The following problems can cause this exception: - // - // You do not have permission to access the instance. - // - // SSM Agent is not running. On managed instances and Linux instances, verify - // that the SSM Agent is running. On EC2 Windows instances, verify that the - // EC2Config service is running. - // - // SSM Agent or EC2Config service is not registered to the SSM endpoint. Try - // reinstalling SSM Agent or EC2Config service. - // - // The instance is not in valid state. Valid states are: Running, Pending, Stopped, - // Stopping. Invalid states are: Shutting-down and Terminated. - ErrCodeInvalidInstanceId = "InvalidInstanceId" - - // ErrCodeInvalidInstanceInformationFilterValue for service response error code - // "InvalidInstanceInformationFilterValue". - // - // The specified filter value is not valid. - ErrCodeInvalidInstanceInformationFilterValue = "InvalidInstanceInformationFilterValue" - - // ErrCodeInvalidInventoryGroupException for service response error code - // "InvalidInventoryGroupException". - // - // The specified inventory group is not valid. - ErrCodeInvalidInventoryGroupException = "InvalidInventoryGroupException" - - // ErrCodeInvalidInventoryItemContextException for service response error code - // "InvalidInventoryItemContextException". - // - // You specified invalid keys or values in the Context attribute for InventoryItem. - // Verify the keys and values, and try again. - ErrCodeInvalidInventoryItemContextException = "InvalidInventoryItemContextException" - - // ErrCodeInvalidInventoryRequestException for service response error code - // "InvalidInventoryRequestException". - // - // The request is not valid. - ErrCodeInvalidInventoryRequestException = "InvalidInventoryRequestException" - - // ErrCodeInvalidItemContentException for service response error code - // "InvalidItemContentException". - // - // One or more content items is not valid. - ErrCodeInvalidItemContentException = "InvalidItemContentException" - - // ErrCodeInvalidKeyId for service response error code - // "InvalidKeyId". - // - // The query key ID is not valid. - ErrCodeInvalidKeyId = "InvalidKeyId" - - // ErrCodeInvalidNextToken for service response error code - // "InvalidNextToken". - // - // The specified token is not valid. - ErrCodeInvalidNextToken = "InvalidNextToken" - - // ErrCodeInvalidNotificationConfig for service response error code - // "InvalidNotificationConfig". - // - // One or more configuration items is not valid. Verify that a valid Amazon - // Resource Name (ARN) was provided for an Amazon SNS topic. - ErrCodeInvalidNotificationConfig = "InvalidNotificationConfig" - - // ErrCodeInvalidOptionException for service response error code - // "InvalidOptionException". - // - // The delete inventory option specified is not valid. Verify the option and - // try again. - ErrCodeInvalidOptionException = "InvalidOptionException" - - // ErrCodeInvalidOutputFolder for service response error code - // "InvalidOutputFolder". - // - // The S3 bucket does not exist. - ErrCodeInvalidOutputFolder = "InvalidOutputFolder" - - // ErrCodeInvalidOutputLocation for service response error code - // "InvalidOutputLocation". - // - // The output location is not valid or does not exist. - ErrCodeInvalidOutputLocation = "InvalidOutputLocation" - - // ErrCodeInvalidParameters for service response error code - // "InvalidParameters". - // - // You must specify values for all required parameters in the Systems Manager - // document. You can only supply values to parameters defined in the Systems - // Manager document. - ErrCodeInvalidParameters = "InvalidParameters" - - // ErrCodeInvalidPermissionType for service response error code - // "InvalidPermissionType". - // - // The permission type is not supported. Share is the only supported permission - // type. - ErrCodeInvalidPermissionType = "InvalidPermissionType" - - // ErrCodeInvalidPluginName for service response error code - // "InvalidPluginName". - // - // The plugin name is not valid. - ErrCodeInvalidPluginName = "InvalidPluginName" - - // ErrCodeInvalidResourceId for service response error code - // "InvalidResourceId". - // - // The resource ID is not valid. Verify that you entered the correct ID and - // try again. - ErrCodeInvalidResourceId = "InvalidResourceId" - - // ErrCodeInvalidResourceType for service response error code - // "InvalidResourceType". - // - // The resource type is not valid. For example, if you are attempting to tag - // an instance, the instance must be a registered, managed instance. - ErrCodeInvalidResourceType = "InvalidResourceType" - - // ErrCodeInvalidResultAttributeException for service response error code - // "InvalidResultAttributeException". - // - // The specified inventory item result attribute is not valid. - ErrCodeInvalidResultAttributeException = "InvalidResultAttributeException" - - // ErrCodeInvalidRole for service response error code - // "InvalidRole". - // - // The role name can't contain invalid characters. Also verify that you specified - // an IAM role for notifications that includes the required trust policy. For - // information about configuring the IAM role for Run Command notifications, - // see Configuring Amazon SNS Notifications for Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html) - // in the AWS Systems Manager User Guide. - ErrCodeInvalidRole = "InvalidRole" - - // ErrCodeInvalidSchedule for service response error code - // "InvalidSchedule". - // - // The schedule is invalid. Verify your cron or rate expression and try again. - ErrCodeInvalidSchedule = "InvalidSchedule" - - // ErrCodeInvalidTarget for service response error code - // "InvalidTarget". - // - // The target is not valid or does not exist. It might not be configured for - // EC2 Systems Manager or you might not have permission to perform the operation. - ErrCodeInvalidTarget = "InvalidTarget" - - // ErrCodeInvalidTypeNameException for service response error code - // "InvalidTypeNameException". - // - // The parameter type name is not valid. - ErrCodeInvalidTypeNameException = "InvalidTypeNameException" - - // ErrCodeInvalidUpdate for service response error code - // "InvalidUpdate". - // - // The update is not valid. - ErrCodeInvalidUpdate = "InvalidUpdate" - - // ErrCodeInvocationDoesNotExist for service response error code - // "InvocationDoesNotExist". - // - // The command ID and instance ID you specified did not match any invocations. - // Verify the command ID adn the instance ID and try again. - ErrCodeInvocationDoesNotExist = "InvocationDoesNotExist" - - // ErrCodeItemContentMismatchException for service response error code - // "ItemContentMismatchException". - // - // The inventory item has invalid content. - ErrCodeItemContentMismatchException = "ItemContentMismatchException" - - // ErrCodeItemSizeLimitExceededException for service response error code - // "ItemSizeLimitExceededException". - // - // The inventory item size has exceeded the size limit. - ErrCodeItemSizeLimitExceededException = "ItemSizeLimitExceededException" - - // ErrCodeMaxDocumentSizeExceeded for service response error code - // "MaxDocumentSizeExceeded". - // - // The size limit of a document is 64 KB. - ErrCodeMaxDocumentSizeExceeded = "MaxDocumentSizeExceeded" - - // ErrCodeParameterAlreadyExists for service response error code - // "ParameterAlreadyExists". - // - // The parameter already exists. You can't create duplicate parameters. - ErrCodeParameterAlreadyExists = "ParameterAlreadyExists" - - // ErrCodeParameterLimitExceeded for service response error code - // "ParameterLimitExceeded". - // - // You have exceeded the number of parameters for this AWS account. Delete one - // or more parameters and try again. - ErrCodeParameterLimitExceeded = "ParameterLimitExceeded" - - // ErrCodeParameterMaxVersionLimitExceeded for service response error code - // "ParameterMaxVersionLimitExceeded". - // - // The parameter exceeded the maximum number of allowed versions. - ErrCodeParameterMaxVersionLimitExceeded = "ParameterMaxVersionLimitExceeded" - - // ErrCodeParameterNotFound for service response error code - // "ParameterNotFound". - // - // The parameter could not be found. Verify the name and try again. - ErrCodeParameterNotFound = "ParameterNotFound" - - // ErrCodeParameterPatternMismatchException for service response error code - // "ParameterPatternMismatchException". - // - // The parameter name is not valid. - ErrCodeParameterPatternMismatchException = "ParameterPatternMismatchException" - - // ErrCodeParameterVersionLabelLimitExceeded for service response error code - // "ParameterVersionLabelLimitExceeded". - // - // A parameter version can have a maximum of ten labels. - ErrCodeParameterVersionLabelLimitExceeded = "ParameterVersionLabelLimitExceeded" - - // ErrCodeParameterVersionNotFound for service response error code - // "ParameterVersionNotFound". - // - // The specified parameter version was not found. Verify the parameter name - // and version, and try again. - ErrCodeParameterVersionNotFound = "ParameterVersionNotFound" - - // ErrCodeResourceDataSyncAlreadyExistsException for service response error code - // "ResourceDataSyncAlreadyExistsException". - // - // A sync configuration with the same name already exists. - ErrCodeResourceDataSyncAlreadyExistsException = "ResourceDataSyncAlreadyExistsException" - - // ErrCodeResourceDataSyncCountExceededException for service response error code - // "ResourceDataSyncCountExceededException". - // - // You have exceeded the allowed maximum sync configurations. - ErrCodeResourceDataSyncCountExceededException = "ResourceDataSyncCountExceededException" - - // ErrCodeResourceDataSyncInvalidConfigurationException for service response error code - // "ResourceDataSyncInvalidConfigurationException". - // - // The specified sync configuration is invalid. - ErrCodeResourceDataSyncInvalidConfigurationException = "ResourceDataSyncInvalidConfigurationException" - - // ErrCodeResourceDataSyncNotFoundException for service response error code - // "ResourceDataSyncNotFoundException". - // - // The specified sync name was not found. - ErrCodeResourceDataSyncNotFoundException = "ResourceDataSyncNotFoundException" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUseException". - // - // Error returned if an attempt is made to delete a patch baseline that is registered - // for a patch group. - ErrCodeResourceInUseException = "ResourceInUseException" - - // ErrCodeResourceLimitExceededException for service response error code - // "ResourceLimitExceededException". - // - // Error returned when the caller has exceeded the default resource limits. - // For example, too many Maintenance Windows or Patch baselines have been created. - // - // For information about resource limits in Systems Manager, see AWS Systems - // Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). - ErrCodeResourceLimitExceededException = "ResourceLimitExceededException" - - // ErrCodeStatusUnchanged for service response error code - // "StatusUnchanged". - // - // The updated status is the same as the current status. - ErrCodeStatusUnchanged = "StatusUnchanged" - - // ErrCodeSubTypeCountLimitExceededException for service response error code - // "SubTypeCountLimitExceededException". - // - // The sub-type count exceeded the limit for the inventory type. - ErrCodeSubTypeCountLimitExceededException = "SubTypeCountLimitExceededException" - - // ErrCodeTargetInUseException for service response error code - // "TargetInUseException". - // - // You specified the Safe option for the DeregisterTargetFromMaintenanceWindow - // operation, but the target is still referenced in a task. - ErrCodeTargetInUseException = "TargetInUseException" - - // ErrCodeTargetNotConnected for service response error code - // "TargetNotConnected". - // - // The specified target instance for the session is not fully configured for - // use with Session Manager. For more information, see Getting Started with - // Session Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) - // in the AWS Systems Manager User Guide. - ErrCodeTargetNotConnected = "TargetNotConnected" - - // ErrCodeTooManyTagsError for service response error code - // "TooManyTagsError". - // - // The Targets parameter includes too many tags. Remove one or more tags and - // try the command again. - ErrCodeTooManyTagsError = "TooManyTagsError" - - // ErrCodeTooManyUpdates for service response error code - // "TooManyUpdates". - // - // There are concurrent updates for a resource that supports one update at a - // time. - ErrCodeTooManyUpdates = "TooManyUpdates" - - // ErrCodeTotalSizeLimitExceededException for service response error code - // "TotalSizeLimitExceededException". - // - // The size of inventory data has exceeded the total size limit for the resource. - ErrCodeTotalSizeLimitExceededException = "TotalSizeLimitExceededException" - - // ErrCodeUnsupportedInventoryItemContextException for service response error code - // "UnsupportedInventoryItemContextException". - // - // The Context attribute that you specified for the InventoryItem is not allowed - // for this inventory type. You can only use the Context attribute with inventory - // types like AWS:ComplianceItem. - ErrCodeUnsupportedInventoryItemContextException = "UnsupportedInventoryItemContextException" - - // ErrCodeUnsupportedInventorySchemaVersionException for service response error code - // "UnsupportedInventorySchemaVersionException". - // - // Inventory item type schema version has to match supported versions in the - // service. Check output of GetInventorySchema to see the available schema version - // for each type. - ErrCodeUnsupportedInventorySchemaVersionException = "UnsupportedInventorySchemaVersionException" - - // ErrCodeUnsupportedOperatingSystem for service response error code - // "UnsupportedOperatingSystem". - // - // The operating systems you specified is not supported, or the operation is - // not supported for the operating system. Valid operating systems include: - // Windows, AmazonLinux, RedhatEnterpriseLinux, and Ubuntu. - ErrCodeUnsupportedOperatingSystem = "UnsupportedOperatingSystem" - - // ErrCodeUnsupportedParameterType for service response error code - // "UnsupportedParameterType". - // - // The parameter type is not supported. - ErrCodeUnsupportedParameterType = "UnsupportedParameterType" - - // ErrCodeUnsupportedPlatformType for service response error code - // "UnsupportedPlatformType". - // - // The document does not support the platform type of the given instance ID(s). - // For example, you sent an document for a Windows instance to a Linux instance. - ErrCodeUnsupportedPlatformType = "UnsupportedPlatformType" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go deleted file mode 100644 index 9a6b8f71c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package ssm - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// SSM provides the API operation methods for making requests to -// Amazon Simple Systems Manager (SSM). See this package's package overview docs -// for details on the service. -// -// SSM methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type SSM 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 = "ssm" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "SSM" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the SSM client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a SSM client from just a session. -// svc := ssm.New(mySession) -// -// // Create a SSM client with additional configuration -// svc := ssm.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSM { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *SSM { - svc := &SSM{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2014-11-06", - JSONVersion: "1.1", - TargetPrefix: "AmazonSSM", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a SSM operation and runs any -// custom request initialization. -func (c *SSM) 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/storagegateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go deleted file mode 100644 index f1ba98b9b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go +++ /dev/null @@ -1,16244 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package storagegateway - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" -) - -const opActivateGateway = "ActivateGateway" - -// ActivateGatewayRequest generates a "aws/request.Request" representing the -// client's request for the ActivateGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ActivateGateway for more information on using the ActivateGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ActivateGatewayRequest method. -// req, resp := client.ActivateGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ActivateGateway -func (c *StorageGateway) ActivateGatewayRequest(input *ActivateGatewayInput) (req *request.Request, output *ActivateGatewayOutput) { - op := &request.Operation{ - Name: opActivateGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ActivateGatewayInput{} - } - - output = &ActivateGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// ActivateGateway API operation for AWS Storage Gateway. -// -// Activates the gateway you previously deployed on your host. In the activation -// process, you specify information such as the region you want to use for storing -// snapshots or tapes, the time zone for scheduled snapshots the gateway snapshot -// schedule window, an activation key, and a name for your gateway. The activation -// process also associates your gateway with your account; for more information, -// see UpdateGatewayInformation. -// -// You must turn on the gateway VM before you can activate your gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation ActivateGateway for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ActivateGateway -func (c *StorageGateway) ActivateGateway(input *ActivateGatewayInput) (*ActivateGatewayOutput, error) { - req, out := c.ActivateGatewayRequest(input) - return out, req.Send() -} - -// ActivateGatewayWithContext is the same as ActivateGateway with the addition of -// the ability to pass a context and additional request options. -// -// See ActivateGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) ActivateGatewayWithContext(ctx aws.Context, input *ActivateGatewayInput, opts ...request.Option) (*ActivateGatewayOutput, error) { - req, out := c.ActivateGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddCache = "AddCache" - -// AddCacheRequest generates a "aws/request.Request" representing the -// client's request for the AddCache operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddCache for more information on using the AddCache -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddCacheRequest method. -// req, resp := client.AddCacheRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddCache -func (c *StorageGateway) AddCacheRequest(input *AddCacheInput) (req *request.Request, output *AddCacheOutput) { - op := &request.Operation{ - Name: opAddCache, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddCacheInput{} - } - - output = &AddCacheOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddCache API operation for AWS Storage Gateway. -// -// Configures one or more gateway local disks as cache for a gateway. This operation -// is only supported in the cached volume, tape and file gateway type (see Storage -// Gateway Concepts (http://docs.aws.amazon.com/storagegateway/latest/userguide/StorageGatewayConcepts.html)). -// -// In the request, you specify the gateway Amazon Resource Name (ARN) to which -// you want to add cache, and one or more disk IDs that you want to configure -// as cache. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation AddCache for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddCache -func (c *StorageGateway) AddCache(input *AddCacheInput) (*AddCacheOutput, error) { - req, out := c.AddCacheRequest(input) - return out, req.Send() -} - -// AddCacheWithContext is the same as AddCache with the addition of -// the ability to pass a context and additional request options. -// -// See AddCache for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) AddCacheWithContext(ctx aws.Context, input *AddCacheInput, opts ...request.Option) (*AddCacheOutput, error) { - req, out := c.AddCacheRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddTagsToResource = "AddTagsToResource" - -// AddTagsToResourceRequest generates a "aws/request.Request" representing the -// client's request for the AddTagsToResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddTagsToResource for more information on using the AddTagsToResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddTagsToResourceRequest method. -// req, resp := client.AddTagsToResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddTagsToResource -func (c *StorageGateway) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *request.Request, output *AddTagsToResourceOutput) { - op := &request.Operation{ - Name: opAddTagsToResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsToResourceInput{} - } - - output = &AddTagsToResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddTagsToResource API operation for AWS Storage Gateway. -// -// Adds one or more tags to the specified resource. You use tags to add metadata -// to resources, which you can use to categorize these resources. For example, -// you can categorize resources by purpose, owner, environment, or team. Each -// tag consists of a key and a value, which you define. You can add tags to -// the following AWS Storage Gateway resources: -// -// * Storage gateways of all types -// -// * Storage Volumes -// -// * Virtual Tapes -// -// You can create a maximum of 10 tags for each resource. Virtual tapes and -// storage volumes that are recovered to a new gateway maintain their tags. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation AddTagsToResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddTagsToResource -func (c *StorageGateway) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { - req, out := c.AddTagsToResourceRequest(input) - return out, req.Send() -} - -// AddTagsToResourceWithContext is the same as AddTagsToResource with the addition of -// the ability to pass a context and additional request options. -// -// See AddTagsToResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) AddTagsToResourceWithContext(ctx aws.Context, input *AddTagsToResourceInput, opts ...request.Option) (*AddTagsToResourceOutput, error) { - req, out := c.AddTagsToResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddUploadBuffer = "AddUploadBuffer" - -// AddUploadBufferRequest generates a "aws/request.Request" representing the -// client's request for the AddUploadBuffer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddUploadBuffer for more information on using the AddUploadBuffer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddUploadBufferRequest method. -// req, resp := client.AddUploadBufferRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddUploadBuffer -func (c *StorageGateway) AddUploadBufferRequest(input *AddUploadBufferInput) (req *request.Request, output *AddUploadBufferOutput) { - op := &request.Operation{ - Name: opAddUploadBuffer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddUploadBufferInput{} - } - - output = &AddUploadBufferOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddUploadBuffer API operation for AWS Storage Gateway. -// -// Configures one or more gateway local disks as upload buffer for a specified -// gateway. This operation is supported for the stored volume, cached volume -// and tape gateway types. -// -// In the request, you specify the gateway Amazon Resource Name (ARN) to which -// you want to add upload buffer, and one or more disk IDs that you want to -// configure as upload buffer. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation AddUploadBuffer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddUploadBuffer -func (c *StorageGateway) AddUploadBuffer(input *AddUploadBufferInput) (*AddUploadBufferOutput, error) { - req, out := c.AddUploadBufferRequest(input) - return out, req.Send() -} - -// AddUploadBufferWithContext is the same as AddUploadBuffer with the addition of -// the ability to pass a context and additional request options. -// -// See AddUploadBuffer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) AddUploadBufferWithContext(ctx aws.Context, input *AddUploadBufferInput, opts ...request.Option) (*AddUploadBufferOutput, error) { - req, out := c.AddUploadBufferRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddWorkingStorage = "AddWorkingStorage" - -// AddWorkingStorageRequest generates a "aws/request.Request" representing the -// client's request for the AddWorkingStorage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddWorkingStorage for more information on using the AddWorkingStorage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AddWorkingStorageRequest method. -// req, resp := client.AddWorkingStorageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddWorkingStorage -func (c *StorageGateway) AddWorkingStorageRequest(input *AddWorkingStorageInput) (req *request.Request, output *AddWorkingStorageOutput) { - op := &request.Operation{ - Name: opAddWorkingStorage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddWorkingStorageInput{} - } - - output = &AddWorkingStorageOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddWorkingStorage API operation for AWS Storage Gateway. -// -// Configures one or more gateway local disks as working storage for a gateway. -// This operation is only supported in the stored volume gateway type. This -// operation is deprecated in cached volume API version 20120630. Use AddUploadBuffer -// instead. -// -// Working storage is also referred to as upload buffer. You can also use the -// AddUploadBuffer operation to add upload buffer to a stored volume gateway. -// -// In the request, you specify the gateway Amazon Resource Name (ARN) to which -// you want to add working storage, and one or more disk IDs that you want to -// configure as working storage. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation AddWorkingStorage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddWorkingStorage -func (c *StorageGateway) AddWorkingStorage(input *AddWorkingStorageInput) (*AddWorkingStorageOutput, error) { - req, out := c.AddWorkingStorageRequest(input) - return out, req.Send() -} - -// AddWorkingStorageWithContext is the same as AddWorkingStorage with the addition of -// the ability to pass a context and additional request options. -// -// See AddWorkingStorage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) AddWorkingStorageWithContext(ctx aws.Context, input *AddWorkingStorageInput, opts ...request.Option) (*AddWorkingStorageOutput, error) { - req, out := c.AddWorkingStorageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachVolume = "AttachVolume" - -// AttachVolumeRequest generates a "aws/request.Request" representing the -// client's request for the AttachVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachVolume for more information on using the AttachVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AttachVolumeRequest method. -// req, resp := client.AttachVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AttachVolume -func (c *StorageGateway) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Request, output *AttachVolumeOutput) { - op := &request.Operation{ - Name: opAttachVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachVolumeInput{} - } - - output = &AttachVolumeOutput{} - req = c.newRequest(op, input, output) - return -} - -// AttachVolume API operation for AWS Storage Gateway. -// -// Connects a volume to an iSCSI connection and then attaches the volume to -// the specified gateway. Detaching and attaching a volume enables you to recover -// your data from one gateway to a different gateway without creating a snapshot. -// It also makes it easier to move your volumes from an on-premises gateway -// to a gateway hosted on an Amazon EC2 instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation AttachVolume for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AttachVolume -func (c *StorageGateway) AttachVolume(input *AttachVolumeInput) (*AttachVolumeOutput, error) { - req, out := c.AttachVolumeRequest(input) - return out, req.Send() -} - -// AttachVolumeWithContext is the same as AttachVolume with the addition of -// the ability to pass a context and additional request options. -// -// See AttachVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) AttachVolumeWithContext(ctx aws.Context, input *AttachVolumeInput, opts ...request.Option) (*AttachVolumeOutput, error) { - req, out := c.AttachVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelArchival = "CancelArchival" - -// CancelArchivalRequest generates a "aws/request.Request" representing the -// client's request for the CancelArchival operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelArchival for more information on using the CancelArchival -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelArchivalRequest method. -// req, resp := client.CancelArchivalRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelArchival -func (c *StorageGateway) CancelArchivalRequest(input *CancelArchivalInput) (req *request.Request, output *CancelArchivalOutput) { - op := &request.Operation{ - Name: opCancelArchival, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelArchivalInput{} - } - - output = &CancelArchivalOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelArchival API operation for AWS Storage Gateway. -// -// Cancels archiving of a virtual tape to the virtual tape shelf (VTS) after -// the archiving process is initiated. This operation is only supported in the -// tape gateway type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation CancelArchival for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelArchival -func (c *StorageGateway) CancelArchival(input *CancelArchivalInput) (*CancelArchivalOutput, error) { - req, out := c.CancelArchivalRequest(input) - return out, req.Send() -} - -// CancelArchivalWithContext is the same as CancelArchival with the addition of -// the ability to pass a context and additional request options. -// -// See CancelArchival for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) CancelArchivalWithContext(ctx aws.Context, input *CancelArchivalInput, opts ...request.Option) (*CancelArchivalOutput, error) { - req, out := c.CancelArchivalRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCancelRetrieval = "CancelRetrieval" - -// CancelRetrievalRequest generates a "aws/request.Request" representing the -// client's request for the CancelRetrieval operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CancelRetrieval for more information on using the CancelRetrieval -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CancelRetrievalRequest method. -// req, resp := client.CancelRetrievalRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelRetrieval -func (c *StorageGateway) CancelRetrievalRequest(input *CancelRetrievalInput) (req *request.Request, output *CancelRetrievalOutput) { - op := &request.Operation{ - Name: opCancelRetrieval, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CancelRetrievalInput{} - } - - output = &CancelRetrievalOutput{} - req = c.newRequest(op, input, output) - return -} - -// CancelRetrieval API operation for AWS Storage Gateway. -// -// Cancels retrieval of a virtual tape from the virtual tape shelf (VTS) to -// a gateway after the retrieval process is initiated. The virtual tape is returned -// to the VTS. This operation is only supported in the tape gateway type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation CancelRetrieval for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelRetrieval -func (c *StorageGateway) CancelRetrieval(input *CancelRetrievalInput) (*CancelRetrievalOutput, error) { - req, out := c.CancelRetrievalRequest(input) - return out, req.Send() -} - -// CancelRetrievalWithContext is the same as CancelRetrieval with the addition of -// the ability to pass a context and additional request options. -// -// See CancelRetrieval for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) CancelRetrievalWithContext(ctx aws.Context, input *CancelRetrievalInput, opts ...request.Option) (*CancelRetrievalOutput, error) { - req, out := c.CancelRetrievalRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCachediSCSIVolume = "CreateCachediSCSIVolume" - -// CreateCachediSCSIVolumeRequest generates a "aws/request.Request" representing the -// client's request for the CreateCachediSCSIVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateCachediSCSIVolume for more information on using the CreateCachediSCSIVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateCachediSCSIVolumeRequest method. -// req, resp := client.CreateCachediSCSIVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateCachediSCSIVolume -func (c *StorageGateway) CreateCachediSCSIVolumeRequest(input *CreateCachediSCSIVolumeInput) (req *request.Request, output *CreateCachediSCSIVolumeOutput) { - op := &request.Operation{ - Name: opCreateCachediSCSIVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateCachediSCSIVolumeInput{} - } - - output = &CreateCachediSCSIVolumeOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCachediSCSIVolume API operation for AWS Storage Gateway. -// -// Creates a cached volume on a specified cached volume gateway. This operation -// is only supported in the cached volume gateway type. -// -// Cache storage must be allocated to the gateway before you can create a cached -// volume. Use the AddCache operation to add cache storage to a gateway. -// -// In the request, you must specify the gateway, size of the volume in bytes, -// the iSCSI target name, an IP address on which to expose the target, and a -// unique client token. In response, the gateway creates the volume and returns -// information about it. This information includes the volume Amazon Resource -// Name (ARN), its size, and the iSCSI target ARN that initiators can use to -// connect to the volume target. -// -// Optionally, you can provide the ARN for an existing volume as the SourceVolumeARN -// for this cached volume, which creates an exact copy of the existing volume’s -// latest recovery point. The VolumeSizeInBytes value must be equal to or larger -// than the size of the copied volume, in bytes. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation CreateCachediSCSIVolume for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateCachediSCSIVolume -func (c *StorageGateway) CreateCachediSCSIVolume(input *CreateCachediSCSIVolumeInput) (*CreateCachediSCSIVolumeOutput, error) { - req, out := c.CreateCachediSCSIVolumeRequest(input) - return out, req.Send() -} - -// CreateCachediSCSIVolumeWithContext is the same as CreateCachediSCSIVolume with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCachediSCSIVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) CreateCachediSCSIVolumeWithContext(ctx aws.Context, input *CreateCachediSCSIVolumeInput, opts ...request.Option) (*CreateCachediSCSIVolumeOutput, error) { - req, out := c.CreateCachediSCSIVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateNFSFileShare = "CreateNFSFileShare" - -// CreateNFSFileShareRequest generates a "aws/request.Request" representing the -// client's request for the CreateNFSFileShare operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateNFSFileShare for more information on using the CreateNFSFileShare -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateNFSFileShareRequest method. -// req, resp := client.CreateNFSFileShareRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateNFSFileShare -func (c *StorageGateway) CreateNFSFileShareRequest(input *CreateNFSFileShareInput) (req *request.Request, output *CreateNFSFileShareOutput) { - op := &request.Operation{ - Name: opCreateNFSFileShare, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateNFSFileShareInput{} - } - - output = &CreateNFSFileShareOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateNFSFileShare API operation for AWS Storage Gateway. -// -// Creates a Network File System (NFS) file share on an existing file gateway. -// In Storage Gateway, a file share is a file system mount point backed by Amazon -// S3 cloud storage. Storage Gateway exposes file shares using a NFS interface. -// This operation is only supported for file gateways. -// -// File gateway requires AWS Security Token Service (AWS STS) to be activated -// to enable you create a file share. Make sure AWS STS is activated in the -// region you are creating your file gateway in. If AWS STS is not activated -// in the region, activate it. For information about how to activate AWS STS, -// see Activating and Deactivating AWS STS in an AWS Region in the AWS Identity -// and Access Management User Guide. -// -// File gateway does not support creating hard or symbolic links on a file share. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation CreateNFSFileShare for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateNFSFileShare -func (c *StorageGateway) CreateNFSFileShare(input *CreateNFSFileShareInput) (*CreateNFSFileShareOutput, error) { - req, out := c.CreateNFSFileShareRequest(input) - return out, req.Send() -} - -// CreateNFSFileShareWithContext is the same as CreateNFSFileShare with the addition of -// the ability to pass a context and additional request options. -// -// See CreateNFSFileShare for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) CreateNFSFileShareWithContext(ctx aws.Context, input *CreateNFSFileShareInput, opts ...request.Option) (*CreateNFSFileShareOutput, error) { - req, out := c.CreateNFSFileShareRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSMBFileShare = "CreateSMBFileShare" - -// CreateSMBFileShareRequest generates a "aws/request.Request" representing the -// client's request for the CreateSMBFileShare operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSMBFileShare for more information on using the CreateSMBFileShare -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSMBFileShareRequest method. -// req, resp := client.CreateSMBFileShareRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSMBFileShare -func (c *StorageGateway) CreateSMBFileShareRequest(input *CreateSMBFileShareInput) (req *request.Request, output *CreateSMBFileShareOutput) { - op := &request.Operation{ - Name: opCreateSMBFileShare, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSMBFileShareInput{} - } - - output = &CreateSMBFileShareOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSMBFileShare API operation for AWS Storage Gateway. -// -// Creates a Server Message Block (SMB) file share on an existing file gateway. -// In Storage Gateway, a file share is a file system mount point backed by Amazon -// S3 cloud storage. Storage Gateway expose file shares using a SMB interface. -// This operation is only supported for file gateways. -// -// File gateways require AWS Security Token Service (AWS STS) to be activated -// to enable you to create a file share. Make sure that AWS STS is activated -// in the AWS Region you are creating your file gateway in. If AWS STS is not -// activated in this AWS Region, activate it. For information about how to activate -// AWS STS, see Activating and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) -// in the AWS Identity and Access Management User Guide. -// -// File gateways don't support creating hard or symbolic links on a file share. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation CreateSMBFileShare for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSMBFileShare -func (c *StorageGateway) CreateSMBFileShare(input *CreateSMBFileShareInput) (*CreateSMBFileShareOutput, error) { - req, out := c.CreateSMBFileShareRequest(input) - return out, req.Send() -} - -// CreateSMBFileShareWithContext is the same as CreateSMBFileShare with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSMBFileShare for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) CreateSMBFileShareWithContext(ctx aws.Context, input *CreateSMBFileShareInput, opts ...request.Option) (*CreateSMBFileShareOutput, error) { - req, out := c.CreateSMBFileShareRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSnapshot = "CreateSnapshot" - -// CreateSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the CreateSnapshot operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSnapshot for more information on using the CreateSnapshot -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSnapshotRequest method. -// req, resp := client.CreateSnapshotRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshot -func (c *StorageGateway) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Request, output *CreateSnapshotOutput) { - op := &request.Operation{ - Name: opCreateSnapshot, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSnapshotInput{} - } - - output = &CreateSnapshotOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSnapshot API operation for AWS Storage Gateway. -// -// Initiates a snapshot of a volume. -// -// AWS Storage Gateway provides the ability to back up point-in-time snapshots -// of your data to Amazon Simple Storage (S3) for durable off-site recovery, -// as well as import the data to an Amazon Elastic Block Store (EBS) volume -// in Amazon Elastic Compute Cloud (EC2). You can take snapshots of your gateway -// volume on a scheduled or ad-hoc basis. This API enables you to take ad-hoc -// snapshot. For more information, see Editing a Snapshot Schedule (http://docs.aws.amazon.com/storagegateway/latest/userguide/managing-volumes.html#SchedulingSnapshot). -// -// In the CreateSnapshot request you identify the volume by providing its Amazon -// Resource Name (ARN). You must also provide description for the snapshot. -// When AWS Storage Gateway takes the snapshot of specified volume, the snapshot -// and description appears in the AWS Storage Gateway Console. In response, -// AWS Storage Gateway returns you a snapshot ID. You can use this snapshot -// ID to check the snapshot progress or later use it when you want to create -// a volume from a snapshot. This operation is only supported in stored and -// cached volume gateway type. -// -// To list or delete a snapshot, you must use the Amazon EC2 API. For more information, -// see DescribeSnapshots or DeleteSnapshot in the EC2 API reference (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Operations.html). -// -// Volume and snapshot IDs are changing to a longer length ID format. For more -// information, see the important note on the Welcome (http://docs.aws.amazon.com/storagegateway/latest/APIReference/Welcome.html) -// page. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation CreateSnapshot for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// * ErrCodeServiceUnavailableError "ServiceUnavailableError" -// An internal server error has occurred because the service is unavailable. -// For more information, see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshot -func (c *StorageGateway) CreateSnapshot(input *CreateSnapshotInput) (*CreateSnapshotOutput, error) { - req, out := c.CreateSnapshotRequest(input) - return out, req.Send() -} - -// CreateSnapshotWithContext is the same as CreateSnapshot with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSnapshot for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) CreateSnapshotWithContext(ctx aws.Context, input *CreateSnapshotInput, opts ...request.Option) (*CreateSnapshotOutput, error) { - req, out := c.CreateSnapshotRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSnapshotFromVolumeRecoveryPoint = "CreateSnapshotFromVolumeRecoveryPoint" - -// CreateSnapshotFromVolumeRecoveryPointRequest generates a "aws/request.Request" representing the -// client's request for the CreateSnapshotFromVolumeRecoveryPoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSnapshotFromVolumeRecoveryPoint for more information on using the CreateSnapshotFromVolumeRecoveryPoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSnapshotFromVolumeRecoveryPointRequest method. -// req, resp := client.CreateSnapshotFromVolumeRecoveryPointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshotFromVolumeRecoveryPoint -func (c *StorageGateway) CreateSnapshotFromVolumeRecoveryPointRequest(input *CreateSnapshotFromVolumeRecoveryPointInput) (req *request.Request, output *CreateSnapshotFromVolumeRecoveryPointOutput) { - op := &request.Operation{ - Name: opCreateSnapshotFromVolumeRecoveryPoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSnapshotFromVolumeRecoveryPointInput{} - } - - output = &CreateSnapshotFromVolumeRecoveryPointOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSnapshotFromVolumeRecoveryPoint API operation for AWS Storage Gateway. -// -// Initiates a snapshot of a gateway from a volume recovery point. This operation -// is only supported in the cached volume gateway type. -// -// A volume recovery point is a point in time at which all data of the volume -// is consistent and from which you can create a snapshot. To get a list of -// volume recovery point for cached volume gateway, use ListVolumeRecoveryPoints. -// -// In the CreateSnapshotFromVolumeRecoveryPoint request, you identify the volume -// by providing its Amazon Resource Name (ARN). You must also provide a description -// for the snapshot. When the gateway takes a snapshot of the specified volume, -// the snapshot and its description appear in the AWS Storage Gateway console. -// In response, the gateway returns you a snapshot ID. You can use this snapshot -// ID to check the snapshot progress or later use it when you want to create -// a volume from a snapshot. -// -// To list or delete a snapshot, you must use the Amazon EC2 API. For more information, -// in Amazon Elastic Compute Cloud API Reference. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation CreateSnapshotFromVolumeRecoveryPoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// * ErrCodeServiceUnavailableError "ServiceUnavailableError" -// An internal server error has occurred because the service is unavailable. -// For more information, see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshotFromVolumeRecoveryPoint -func (c *StorageGateway) CreateSnapshotFromVolumeRecoveryPoint(input *CreateSnapshotFromVolumeRecoveryPointInput) (*CreateSnapshotFromVolumeRecoveryPointOutput, error) { - req, out := c.CreateSnapshotFromVolumeRecoveryPointRequest(input) - return out, req.Send() -} - -// CreateSnapshotFromVolumeRecoveryPointWithContext is the same as CreateSnapshotFromVolumeRecoveryPoint with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSnapshotFromVolumeRecoveryPoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) CreateSnapshotFromVolumeRecoveryPointWithContext(ctx aws.Context, input *CreateSnapshotFromVolumeRecoveryPointInput, opts ...request.Option) (*CreateSnapshotFromVolumeRecoveryPointOutput, error) { - req, out := c.CreateSnapshotFromVolumeRecoveryPointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStorediSCSIVolume = "CreateStorediSCSIVolume" - -// CreateStorediSCSIVolumeRequest generates a "aws/request.Request" representing the -// client's request for the CreateStorediSCSIVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateStorediSCSIVolume for more information on using the CreateStorediSCSIVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateStorediSCSIVolumeRequest method. -// req, resp := client.CreateStorediSCSIVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateStorediSCSIVolume -func (c *StorageGateway) CreateStorediSCSIVolumeRequest(input *CreateStorediSCSIVolumeInput) (req *request.Request, output *CreateStorediSCSIVolumeOutput) { - op := &request.Operation{ - Name: opCreateStorediSCSIVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateStorediSCSIVolumeInput{} - } - - output = &CreateStorediSCSIVolumeOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateStorediSCSIVolume API operation for AWS Storage Gateway. -// -// Creates a volume on a specified gateway. This operation is only supported -// in the stored volume gateway type. -// -// The size of the volume to create is inferred from the disk size. You can -// choose to preserve existing data on the disk, create volume from an existing -// snapshot, or create an empty volume. If you choose to create an empty gateway -// volume, then any existing data on the disk is erased. -// -// In the request you must specify the gateway and the disk information on which -// you are creating the volume. In response, the gateway creates the volume -// and returns volume information such as the volume Amazon Resource Name (ARN), -// its size, and the iSCSI target ARN that initiators can use to connect to -// the volume target. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation CreateStorediSCSIVolume for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateStorediSCSIVolume -func (c *StorageGateway) CreateStorediSCSIVolume(input *CreateStorediSCSIVolumeInput) (*CreateStorediSCSIVolumeOutput, error) { - req, out := c.CreateStorediSCSIVolumeRequest(input) - return out, req.Send() -} - -// CreateStorediSCSIVolumeWithContext is the same as CreateStorediSCSIVolume with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStorediSCSIVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) CreateStorediSCSIVolumeWithContext(ctx aws.Context, input *CreateStorediSCSIVolumeInput, opts ...request.Option) (*CreateStorediSCSIVolumeOutput, error) { - req, out := c.CreateStorediSCSIVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTapeWithBarcode = "CreateTapeWithBarcode" - -// CreateTapeWithBarcodeRequest generates a "aws/request.Request" representing the -// client's request for the CreateTapeWithBarcode operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTapeWithBarcode for more information on using the CreateTapeWithBarcode -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTapeWithBarcodeRequest method. -// req, resp := client.CreateTapeWithBarcodeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapeWithBarcode -func (c *StorageGateway) CreateTapeWithBarcodeRequest(input *CreateTapeWithBarcodeInput) (req *request.Request, output *CreateTapeWithBarcodeOutput) { - op := &request.Operation{ - Name: opCreateTapeWithBarcode, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTapeWithBarcodeInput{} - } - - output = &CreateTapeWithBarcodeOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTapeWithBarcode API operation for AWS Storage Gateway. -// -// Creates a virtual tape by using your own barcode. You write data to the virtual -// tape and then archive the tape. A barcode is unique and can not be reused -// if it has already been used on a tape . This applies to barcodes used on -// deleted tapes. This operation is only supported in the tape gateway type. -// -// Cache storage must be allocated to the gateway before you can create a virtual -// tape. Use the AddCache operation to add cache storage to a gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation CreateTapeWithBarcode for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapeWithBarcode -func (c *StorageGateway) CreateTapeWithBarcode(input *CreateTapeWithBarcodeInput) (*CreateTapeWithBarcodeOutput, error) { - req, out := c.CreateTapeWithBarcodeRequest(input) - return out, req.Send() -} - -// CreateTapeWithBarcodeWithContext is the same as CreateTapeWithBarcode with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTapeWithBarcode for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) CreateTapeWithBarcodeWithContext(ctx aws.Context, input *CreateTapeWithBarcodeInput, opts ...request.Option) (*CreateTapeWithBarcodeOutput, error) { - req, out := c.CreateTapeWithBarcodeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTapes = "CreateTapes" - -// CreateTapesRequest generates a "aws/request.Request" representing the -// client's request for the CreateTapes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTapes for more information on using the CreateTapes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTapesRequest method. -// req, resp := client.CreateTapesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapes -func (c *StorageGateway) CreateTapesRequest(input *CreateTapesInput) (req *request.Request, output *CreateTapesOutput) { - op := &request.Operation{ - Name: opCreateTapes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTapesInput{} - } - - output = &CreateTapesOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTapes API operation for AWS Storage Gateway. -// -// Creates one or more virtual tapes. You write data to the virtual tapes and -// then archive the tapes. This operation is only supported in the tape gateway -// type. -// -// Cache storage must be allocated to the gateway before you can create virtual -// tapes. Use the AddCache operation to add cache storage to a gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation CreateTapes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapes -func (c *StorageGateway) CreateTapes(input *CreateTapesInput) (*CreateTapesOutput, error) { - req, out := c.CreateTapesRequest(input) - return out, req.Send() -} - -// CreateTapesWithContext is the same as CreateTapes with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTapes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) CreateTapesWithContext(ctx aws.Context, input *CreateTapesInput, opts ...request.Option) (*CreateTapesOutput, error) { - req, out := c.CreateTapesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBandwidthRateLimit = "DeleteBandwidthRateLimit" - -// DeleteBandwidthRateLimitRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBandwidthRateLimit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteBandwidthRateLimit for more information on using the DeleteBandwidthRateLimit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteBandwidthRateLimitRequest method. -// req, resp := client.DeleteBandwidthRateLimitRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteBandwidthRateLimit -func (c *StorageGateway) DeleteBandwidthRateLimitRequest(input *DeleteBandwidthRateLimitInput) (req *request.Request, output *DeleteBandwidthRateLimitOutput) { - op := &request.Operation{ - Name: opDeleteBandwidthRateLimit, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteBandwidthRateLimitInput{} - } - - output = &DeleteBandwidthRateLimitOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteBandwidthRateLimit API operation for AWS Storage Gateway. -// -// Deletes the bandwidth rate limits of a gateway. You can delete either the -// upload and download bandwidth rate limit, or you can delete both. If you -// delete only one of the limits, the other limit remains unchanged. To specify -// which gateway to work with, use the Amazon Resource Name (ARN) of the gateway -// in your request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DeleteBandwidthRateLimit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteBandwidthRateLimit -func (c *StorageGateway) DeleteBandwidthRateLimit(input *DeleteBandwidthRateLimitInput) (*DeleteBandwidthRateLimitOutput, error) { - req, out := c.DeleteBandwidthRateLimitRequest(input) - return out, req.Send() -} - -// DeleteBandwidthRateLimitWithContext is the same as DeleteBandwidthRateLimit with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBandwidthRateLimit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DeleteBandwidthRateLimitWithContext(ctx aws.Context, input *DeleteBandwidthRateLimitInput, opts ...request.Option) (*DeleteBandwidthRateLimitOutput, error) { - req, out := c.DeleteBandwidthRateLimitRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteChapCredentials = "DeleteChapCredentials" - -// DeleteChapCredentialsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteChapCredentials operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteChapCredentials for more information on using the DeleteChapCredentials -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteChapCredentialsRequest method. -// req, resp := client.DeleteChapCredentialsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteChapCredentials -func (c *StorageGateway) DeleteChapCredentialsRequest(input *DeleteChapCredentialsInput) (req *request.Request, output *DeleteChapCredentialsOutput) { - op := &request.Operation{ - Name: opDeleteChapCredentials, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteChapCredentialsInput{} - } - - output = &DeleteChapCredentialsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteChapCredentials API operation for AWS Storage Gateway. -// -// Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for -// a specified iSCSI target and initiator pair. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DeleteChapCredentials for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteChapCredentials -func (c *StorageGateway) DeleteChapCredentials(input *DeleteChapCredentialsInput) (*DeleteChapCredentialsOutput, error) { - req, out := c.DeleteChapCredentialsRequest(input) - return out, req.Send() -} - -// DeleteChapCredentialsWithContext is the same as DeleteChapCredentials with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteChapCredentials for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DeleteChapCredentialsWithContext(ctx aws.Context, input *DeleteChapCredentialsInput, opts ...request.Option) (*DeleteChapCredentialsOutput, error) { - req, out := c.DeleteChapCredentialsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFileShare = "DeleteFileShare" - -// DeleteFileShareRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFileShare operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFileShare for more information on using the DeleteFileShare -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFileShareRequest method. -// req, resp := client.DeleteFileShareRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteFileShare -func (c *StorageGateway) DeleteFileShareRequest(input *DeleteFileShareInput) (req *request.Request, output *DeleteFileShareOutput) { - op := &request.Operation{ - Name: opDeleteFileShare, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteFileShareInput{} - } - - output = &DeleteFileShareOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteFileShare API operation for AWS Storage Gateway. -// -// Deletes a file share from a file gateway. This operation is only supported -// for file gateways. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DeleteFileShare for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteFileShare -func (c *StorageGateway) DeleteFileShare(input *DeleteFileShareInput) (*DeleteFileShareOutput, error) { - req, out := c.DeleteFileShareRequest(input) - return out, req.Send() -} - -// DeleteFileShareWithContext is the same as DeleteFileShare with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFileShare for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DeleteFileShareWithContext(ctx aws.Context, input *DeleteFileShareInput, opts ...request.Option) (*DeleteFileShareOutput, error) { - req, out := c.DeleteFileShareRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteGateway = "DeleteGateway" - -// DeleteGatewayRequest generates a "aws/request.Request" representing the -// client's request for the DeleteGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteGateway for more information on using the DeleteGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteGatewayRequest method. -// req, resp := client.DeleteGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteGateway -func (c *StorageGateway) DeleteGatewayRequest(input *DeleteGatewayInput) (req *request.Request, output *DeleteGatewayOutput) { - op := &request.Operation{ - Name: opDeleteGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteGatewayInput{} - } - - output = &DeleteGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteGateway API operation for AWS Storage Gateway. -// -// Deletes a gateway. To specify which gateway to delete, use the Amazon Resource -// Name (ARN) of the gateway in your request. The operation deletes the gateway; -// however, it does not delete the gateway virtual machine (VM) from your host -// computer. -// -// After you delete a gateway, you cannot reactivate it. Completed snapshots -// of the gateway volumes are not deleted upon deleting the gateway, however, -// pending snapshots will not complete. After you delete a gateway, your next -// step is to remove it from your environment. -// -// You no longer pay software charges after the gateway is deleted; however, -// your existing Amazon EBS snapshots persist and you will continue to be billed -// for these snapshots. You can choose to remove all remaining Amazon EBS snapshots -// by canceling your Amazon EC2 subscription.  If you prefer not to cancel your -// Amazon EC2 subscription, you can delete your snapshots using the Amazon EC2 -// console. For more information, see the AWS Storage Gateway Detail Page (http://aws.amazon.com/storagegateway). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DeleteGateway for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteGateway -func (c *StorageGateway) DeleteGateway(input *DeleteGatewayInput) (*DeleteGatewayOutput, error) { - req, out := c.DeleteGatewayRequest(input) - return out, req.Send() -} - -// DeleteGatewayWithContext is the same as DeleteGateway with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DeleteGatewayWithContext(ctx aws.Context, input *DeleteGatewayInput, opts ...request.Option) (*DeleteGatewayOutput, error) { - req, out := c.DeleteGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSnapshotSchedule = "DeleteSnapshotSchedule" - -// DeleteSnapshotScheduleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSnapshotSchedule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSnapshotSchedule for more information on using the DeleteSnapshotSchedule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSnapshotScheduleRequest method. -// req, resp := client.DeleteSnapshotScheduleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteSnapshotSchedule -func (c *StorageGateway) DeleteSnapshotScheduleRequest(input *DeleteSnapshotScheduleInput) (req *request.Request, output *DeleteSnapshotScheduleOutput) { - op := &request.Operation{ - Name: opDeleteSnapshotSchedule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSnapshotScheduleInput{} - } - - output = &DeleteSnapshotScheduleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteSnapshotSchedule API operation for AWS Storage Gateway. -// -// Deletes a snapshot of a volume. -// -// You can take snapshots of your gateway volumes on a scheduled or ad hoc basis. -// This API action enables you to delete a snapshot schedule for a volume. For -// more information, see Working with Snapshots (http://docs.aws.amazon.com/storagegateway/latest/userguide/WorkingWithSnapshots.html). -// In the DeleteSnapshotSchedule request, you identify the volume by providing -// its Amazon Resource Name (ARN). This operation is only supported in stored -// and cached volume gateway types. -// -// To list or delete a snapshot, you must use the Amazon EC2 API. in Amazon -// Elastic Compute Cloud API Reference. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DeleteSnapshotSchedule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteSnapshotSchedule -func (c *StorageGateway) DeleteSnapshotSchedule(input *DeleteSnapshotScheduleInput) (*DeleteSnapshotScheduleOutput, error) { - req, out := c.DeleteSnapshotScheduleRequest(input) - return out, req.Send() -} - -// DeleteSnapshotScheduleWithContext is the same as DeleteSnapshotSchedule with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSnapshotSchedule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DeleteSnapshotScheduleWithContext(ctx aws.Context, input *DeleteSnapshotScheduleInput, opts ...request.Option) (*DeleteSnapshotScheduleOutput, error) { - req, out := c.DeleteSnapshotScheduleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTape = "DeleteTape" - -// DeleteTapeRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTape operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTape for more information on using the DeleteTape -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTapeRequest method. -// req, resp := client.DeleteTapeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTape -func (c *StorageGateway) DeleteTapeRequest(input *DeleteTapeInput) (req *request.Request, output *DeleteTapeOutput) { - op := &request.Operation{ - Name: opDeleteTape, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTapeInput{} - } - - output = &DeleteTapeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteTape API operation for AWS Storage Gateway. -// -// Deletes the specified virtual tape. This operation is only supported in the -// tape gateway type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DeleteTape for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTape -func (c *StorageGateway) DeleteTape(input *DeleteTapeInput) (*DeleteTapeOutput, error) { - req, out := c.DeleteTapeRequest(input) - return out, req.Send() -} - -// DeleteTapeWithContext is the same as DeleteTape with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTape for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DeleteTapeWithContext(ctx aws.Context, input *DeleteTapeInput, opts ...request.Option) (*DeleteTapeOutput, error) { - req, out := c.DeleteTapeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTapeArchive = "DeleteTapeArchive" - -// DeleteTapeArchiveRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTapeArchive operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTapeArchive for more information on using the DeleteTapeArchive -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTapeArchiveRequest method. -// req, resp := client.DeleteTapeArchiveRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTapeArchive -func (c *StorageGateway) DeleteTapeArchiveRequest(input *DeleteTapeArchiveInput) (req *request.Request, output *DeleteTapeArchiveOutput) { - op := &request.Operation{ - Name: opDeleteTapeArchive, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTapeArchiveInput{} - } - - output = &DeleteTapeArchiveOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteTapeArchive API operation for AWS Storage Gateway. -// -// Deletes the specified virtual tape from the virtual tape shelf (VTS). This -// operation is only supported in the tape gateway type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DeleteTapeArchive for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTapeArchive -func (c *StorageGateway) DeleteTapeArchive(input *DeleteTapeArchiveInput) (*DeleteTapeArchiveOutput, error) { - req, out := c.DeleteTapeArchiveRequest(input) - return out, req.Send() -} - -// DeleteTapeArchiveWithContext is the same as DeleteTapeArchive with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTapeArchive for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DeleteTapeArchiveWithContext(ctx aws.Context, input *DeleteTapeArchiveInput, opts ...request.Option) (*DeleteTapeArchiveOutput, error) { - req, out := c.DeleteTapeArchiveRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVolume = "DeleteVolume" - -// DeleteVolumeRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVolume for more information on using the DeleteVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteVolumeRequest method. -// req, resp := client.DeleteVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteVolume -func (c *StorageGateway) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Request, output *DeleteVolumeOutput) { - op := &request.Operation{ - Name: opDeleteVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVolumeInput{} - } - - output = &DeleteVolumeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteVolume API operation for AWS Storage Gateway. -// -// Deletes the specified storage volume that you previously created using the -// CreateCachediSCSIVolume or CreateStorediSCSIVolume API. This operation is -// only supported in the cached volume and stored volume types. For stored volume -// gateways, the local disk that was configured as the storage volume is not -// deleted. You can reuse the local disk to create another storage volume. -// -// Before you delete a volume, make sure there are no iSCSI connections to the -// volume you are deleting. You should also make sure there is no snapshot in -// progress. You can use the Amazon Elastic Compute Cloud (Amazon EC2) API to -// query snapshots on the volume you are deleting and check the snapshot status. -// For more information, go to DescribeSnapshots (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html) -// in the Amazon Elastic Compute Cloud API Reference. -// -// In the request, you must provide the Amazon Resource Name (ARN) of the storage -// volume you want to delete. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DeleteVolume for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteVolume -func (c *StorageGateway) DeleteVolume(input *DeleteVolumeInput) (*DeleteVolumeOutput, error) { - req, out := c.DeleteVolumeRequest(input) - return out, req.Send() -} - -// DeleteVolumeWithContext is the same as DeleteVolume with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DeleteVolumeWithContext(ctx aws.Context, input *DeleteVolumeInput, opts ...request.Option) (*DeleteVolumeOutput, error) { - req, out := c.DeleteVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeBandwidthRateLimit = "DescribeBandwidthRateLimit" - -// DescribeBandwidthRateLimitRequest generates a "aws/request.Request" representing the -// client's request for the DescribeBandwidthRateLimit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeBandwidthRateLimit for more information on using the DescribeBandwidthRateLimit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeBandwidthRateLimitRequest method. -// req, resp := client.DescribeBandwidthRateLimitRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeBandwidthRateLimit -func (c *StorageGateway) DescribeBandwidthRateLimitRequest(input *DescribeBandwidthRateLimitInput) (req *request.Request, output *DescribeBandwidthRateLimitOutput) { - op := &request.Operation{ - Name: opDescribeBandwidthRateLimit, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeBandwidthRateLimitInput{} - } - - output = &DescribeBandwidthRateLimitOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeBandwidthRateLimit API operation for AWS Storage Gateway. -// -// Returns the bandwidth rate limits of a gateway. By default, these limits -// are not set, which means no bandwidth rate limiting is in effect. -// -// This operation only returns a value for a bandwidth rate limit only if the -// limit is set. If no limits are set for the gateway, then this operation returns -// only the gateway ARN in the response body. To specify which gateway to describe, -// use the Amazon Resource Name (ARN) of the gateway in your request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeBandwidthRateLimit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeBandwidthRateLimit -func (c *StorageGateway) DescribeBandwidthRateLimit(input *DescribeBandwidthRateLimitInput) (*DescribeBandwidthRateLimitOutput, error) { - req, out := c.DescribeBandwidthRateLimitRequest(input) - return out, req.Send() -} - -// DescribeBandwidthRateLimitWithContext is the same as DescribeBandwidthRateLimit with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeBandwidthRateLimit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeBandwidthRateLimitWithContext(ctx aws.Context, input *DescribeBandwidthRateLimitInput, opts ...request.Option) (*DescribeBandwidthRateLimitOutput, error) { - req, out := c.DescribeBandwidthRateLimitRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCache = "DescribeCache" - -// DescribeCacheRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCache operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCache for more information on using the DescribeCache -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCacheRequest method. -// req, resp := client.DescribeCacheRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCache -func (c *StorageGateway) DescribeCacheRequest(input *DescribeCacheInput) (req *request.Request, output *DescribeCacheOutput) { - op := &request.Operation{ - Name: opDescribeCache, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCacheInput{} - } - - output = &DescribeCacheOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCache API operation for AWS Storage Gateway. -// -// Returns information about the cache of a gateway. This operation is only -// supported in the cached volume, tape and file gateway types. -// -// The response includes disk IDs that are configured as cache, and it includes -// the amount of cache allocated and used. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeCache for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCache -func (c *StorageGateway) DescribeCache(input *DescribeCacheInput) (*DescribeCacheOutput, error) { - req, out := c.DescribeCacheRequest(input) - return out, req.Send() -} - -// DescribeCacheWithContext is the same as DescribeCache with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCache for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeCacheWithContext(ctx aws.Context, input *DescribeCacheInput, opts ...request.Option) (*DescribeCacheOutput, error) { - req, out := c.DescribeCacheRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCachediSCSIVolumes = "DescribeCachediSCSIVolumes" - -// DescribeCachediSCSIVolumesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCachediSCSIVolumes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCachediSCSIVolumes for more information on using the DescribeCachediSCSIVolumes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCachediSCSIVolumesRequest method. -// req, resp := client.DescribeCachediSCSIVolumesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCachediSCSIVolumes -func (c *StorageGateway) DescribeCachediSCSIVolumesRequest(input *DescribeCachediSCSIVolumesInput) (req *request.Request, output *DescribeCachediSCSIVolumesOutput) { - op := &request.Operation{ - Name: opDescribeCachediSCSIVolumes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeCachediSCSIVolumesInput{} - } - - output = &DescribeCachediSCSIVolumesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCachediSCSIVolumes API operation for AWS Storage Gateway. -// -// Returns a description of the gateway volumes specified in the request. This -// operation is only supported in the cached volume gateway types. -// -// The list of gateway volumes in the request must be from one gateway. In the -// response Amazon Storage Gateway returns volume information sorted by volume -// Amazon Resource Name (ARN). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeCachediSCSIVolumes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCachediSCSIVolumes -func (c *StorageGateway) DescribeCachediSCSIVolumes(input *DescribeCachediSCSIVolumesInput) (*DescribeCachediSCSIVolumesOutput, error) { - req, out := c.DescribeCachediSCSIVolumesRequest(input) - return out, req.Send() -} - -// DescribeCachediSCSIVolumesWithContext is the same as DescribeCachediSCSIVolumes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCachediSCSIVolumes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeCachediSCSIVolumesWithContext(ctx aws.Context, input *DescribeCachediSCSIVolumesInput, opts ...request.Option) (*DescribeCachediSCSIVolumesOutput, error) { - req, out := c.DescribeCachediSCSIVolumesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeChapCredentials = "DescribeChapCredentials" - -// DescribeChapCredentialsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeChapCredentials operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeChapCredentials for more information on using the DescribeChapCredentials -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeChapCredentialsRequest method. -// req, resp := client.DescribeChapCredentialsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeChapCredentials -func (c *StorageGateway) DescribeChapCredentialsRequest(input *DescribeChapCredentialsInput) (req *request.Request, output *DescribeChapCredentialsOutput) { - op := &request.Operation{ - Name: opDescribeChapCredentials, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeChapCredentialsInput{} - } - - output = &DescribeChapCredentialsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeChapCredentials API operation for AWS Storage Gateway. -// -// Returns an array of Challenge-Handshake Authentication Protocol (CHAP) credentials -// information for a specified iSCSI target, one for each target-initiator pair. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeChapCredentials for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeChapCredentials -func (c *StorageGateway) DescribeChapCredentials(input *DescribeChapCredentialsInput) (*DescribeChapCredentialsOutput, error) { - req, out := c.DescribeChapCredentialsRequest(input) - return out, req.Send() -} - -// DescribeChapCredentialsWithContext is the same as DescribeChapCredentials with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeChapCredentials for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeChapCredentialsWithContext(ctx aws.Context, input *DescribeChapCredentialsInput, opts ...request.Option) (*DescribeChapCredentialsOutput, error) { - req, out := c.DescribeChapCredentialsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeGatewayInformation = "DescribeGatewayInformation" - -// DescribeGatewayInformationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeGatewayInformation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeGatewayInformation for more information on using the DescribeGatewayInformation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeGatewayInformationRequest method. -// req, resp := client.DescribeGatewayInformationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeGatewayInformation -func (c *StorageGateway) DescribeGatewayInformationRequest(input *DescribeGatewayInformationInput) (req *request.Request, output *DescribeGatewayInformationOutput) { - op := &request.Operation{ - Name: opDescribeGatewayInformation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeGatewayInformationInput{} - } - - output = &DescribeGatewayInformationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeGatewayInformation API operation for AWS Storage Gateway. -// -// Returns metadata about a gateway such as its name, network interfaces, configured -// time zone, and the state (whether the gateway is running or not). To specify -// which gateway to describe, use the Amazon Resource Name (ARN) of the gateway -// in your request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeGatewayInformation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeGatewayInformation -func (c *StorageGateway) DescribeGatewayInformation(input *DescribeGatewayInformationInput) (*DescribeGatewayInformationOutput, error) { - req, out := c.DescribeGatewayInformationRequest(input) - return out, req.Send() -} - -// DescribeGatewayInformationWithContext is the same as DescribeGatewayInformation with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeGatewayInformation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeGatewayInformationWithContext(ctx aws.Context, input *DescribeGatewayInformationInput, opts ...request.Option) (*DescribeGatewayInformationOutput, error) { - req, out := c.DescribeGatewayInformationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMaintenanceStartTime = "DescribeMaintenanceStartTime" - -// DescribeMaintenanceStartTimeRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMaintenanceStartTime operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMaintenanceStartTime for more information on using the DescribeMaintenanceStartTime -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeMaintenanceStartTimeRequest method. -// req, resp := client.DescribeMaintenanceStartTimeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeMaintenanceStartTime -func (c *StorageGateway) DescribeMaintenanceStartTimeRequest(input *DescribeMaintenanceStartTimeInput) (req *request.Request, output *DescribeMaintenanceStartTimeOutput) { - op := &request.Operation{ - Name: opDescribeMaintenanceStartTime, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeMaintenanceStartTimeInput{} - } - - output = &DescribeMaintenanceStartTimeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMaintenanceStartTime API operation for AWS Storage Gateway. -// -// Returns your gateway's weekly maintenance start time including the day and -// time of the week. Note that values are in terms of the gateway's time zone. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeMaintenanceStartTime for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeMaintenanceStartTime -func (c *StorageGateway) DescribeMaintenanceStartTime(input *DescribeMaintenanceStartTimeInput) (*DescribeMaintenanceStartTimeOutput, error) { - req, out := c.DescribeMaintenanceStartTimeRequest(input) - return out, req.Send() -} - -// DescribeMaintenanceStartTimeWithContext is the same as DescribeMaintenanceStartTime with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMaintenanceStartTime for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeMaintenanceStartTimeWithContext(ctx aws.Context, input *DescribeMaintenanceStartTimeInput, opts ...request.Option) (*DescribeMaintenanceStartTimeOutput, error) { - req, out := c.DescribeMaintenanceStartTimeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeNFSFileShares = "DescribeNFSFileShares" - -// DescribeNFSFileSharesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeNFSFileShares operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeNFSFileShares for more information on using the DescribeNFSFileShares -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeNFSFileSharesRequest method. -// req, resp := client.DescribeNFSFileSharesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeNFSFileShares -func (c *StorageGateway) DescribeNFSFileSharesRequest(input *DescribeNFSFileSharesInput) (req *request.Request, output *DescribeNFSFileSharesOutput) { - op := &request.Operation{ - Name: opDescribeNFSFileShares, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeNFSFileSharesInput{} - } - - output = &DescribeNFSFileSharesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeNFSFileShares API operation for AWS Storage Gateway. -// -// Gets a description for one or more Network File System (NFS) file shares -// from a file gateway. This operation is only supported for file gateways. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeNFSFileShares for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeNFSFileShares -func (c *StorageGateway) DescribeNFSFileShares(input *DescribeNFSFileSharesInput) (*DescribeNFSFileSharesOutput, error) { - req, out := c.DescribeNFSFileSharesRequest(input) - return out, req.Send() -} - -// DescribeNFSFileSharesWithContext is the same as DescribeNFSFileShares with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeNFSFileShares for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeNFSFileSharesWithContext(ctx aws.Context, input *DescribeNFSFileSharesInput, opts ...request.Option) (*DescribeNFSFileSharesOutput, error) { - req, out := c.DescribeNFSFileSharesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSMBFileShares = "DescribeSMBFileShares" - -// DescribeSMBFileSharesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSMBFileShares operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSMBFileShares for more information on using the DescribeSMBFileShares -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSMBFileSharesRequest method. -// req, resp := client.DescribeSMBFileSharesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBFileShares -func (c *StorageGateway) DescribeSMBFileSharesRequest(input *DescribeSMBFileSharesInput) (req *request.Request, output *DescribeSMBFileSharesOutput) { - op := &request.Operation{ - Name: opDescribeSMBFileShares, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSMBFileSharesInput{} - } - - output = &DescribeSMBFileSharesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSMBFileShares API operation for AWS Storage Gateway. -// -// Gets a description for one or more Server Message Block (SMB) file shares -// from a file gateway. This operation is only supported for file gateways. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeSMBFileShares for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBFileShares -func (c *StorageGateway) DescribeSMBFileShares(input *DescribeSMBFileSharesInput) (*DescribeSMBFileSharesOutput, error) { - req, out := c.DescribeSMBFileSharesRequest(input) - return out, req.Send() -} - -// DescribeSMBFileSharesWithContext is the same as DescribeSMBFileShares with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSMBFileShares for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeSMBFileSharesWithContext(ctx aws.Context, input *DescribeSMBFileSharesInput, opts ...request.Option) (*DescribeSMBFileSharesOutput, error) { - req, out := c.DescribeSMBFileSharesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSMBSettings = "DescribeSMBSettings" - -// DescribeSMBSettingsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSMBSettings operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSMBSettings for more information on using the DescribeSMBSettings -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSMBSettingsRequest method. -// req, resp := client.DescribeSMBSettingsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBSettings -func (c *StorageGateway) DescribeSMBSettingsRequest(input *DescribeSMBSettingsInput) (req *request.Request, output *DescribeSMBSettingsOutput) { - op := &request.Operation{ - Name: opDescribeSMBSettings, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSMBSettingsInput{} - } - - output = &DescribeSMBSettingsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSMBSettings API operation for AWS Storage Gateway. -// -// Gets a description of a Server Message Block (SMB) file share settings from -// a file gateway. This operation is only supported for file gateways. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeSMBSettings for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBSettings -func (c *StorageGateway) DescribeSMBSettings(input *DescribeSMBSettingsInput) (*DescribeSMBSettingsOutput, error) { - req, out := c.DescribeSMBSettingsRequest(input) - return out, req.Send() -} - -// DescribeSMBSettingsWithContext is the same as DescribeSMBSettings with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSMBSettings for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeSMBSettingsWithContext(ctx aws.Context, input *DescribeSMBSettingsInput, opts ...request.Option) (*DescribeSMBSettingsOutput, error) { - req, out := c.DescribeSMBSettingsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSnapshotSchedule = "DescribeSnapshotSchedule" - -// DescribeSnapshotScheduleRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSnapshotSchedule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeSnapshotSchedule for more information on using the DescribeSnapshotSchedule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeSnapshotScheduleRequest method. -// req, resp := client.DescribeSnapshotScheduleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSnapshotSchedule -func (c *StorageGateway) DescribeSnapshotScheduleRequest(input *DescribeSnapshotScheduleInput) (req *request.Request, output *DescribeSnapshotScheduleOutput) { - op := &request.Operation{ - Name: opDescribeSnapshotSchedule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSnapshotScheduleInput{} - } - - output = &DescribeSnapshotScheduleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSnapshotSchedule API operation for AWS Storage Gateway. -// -// Describes the snapshot schedule for the specified gateway volume. The snapshot -// schedule information includes intervals at which snapshots are automatically -// initiated on the volume. This operation is only supported in the cached volume -// and stored volume types. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeSnapshotSchedule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSnapshotSchedule -func (c *StorageGateway) DescribeSnapshotSchedule(input *DescribeSnapshotScheduleInput) (*DescribeSnapshotScheduleOutput, error) { - req, out := c.DescribeSnapshotScheduleRequest(input) - return out, req.Send() -} - -// DescribeSnapshotScheduleWithContext is the same as DescribeSnapshotSchedule with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSnapshotSchedule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeSnapshotScheduleWithContext(ctx aws.Context, input *DescribeSnapshotScheduleInput, opts ...request.Option) (*DescribeSnapshotScheduleOutput, error) { - req, out := c.DescribeSnapshotScheduleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeStorediSCSIVolumes = "DescribeStorediSCSIVolumes" - -// DescribeStorediSCSIVolumesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeStorediSCSIVolumes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeStorediSCSIVolumes for more information on using the DescribeStorediSCSIVolumes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeStorediSCSIVolumesRequest method. -// req, resp := client.DescribeStorediSCSIVolumesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeStorediSCSIVolumes -func (c *StorageGateway) DescribeStorediSCSIVolumesRequest(input *DescribeStorediSCSIVolumesInput) (req *request.Request, output *DescribeStorediSCSIVolumesOutput) { - op := &request.Operation{ - Name: opDescribeStorediSCSIVolumes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeStorediSCSIVolumesInput{} - } - - output = &DescribeStorediSCSIVolumesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeStorediSCSIVolumes API operation for AWS Storage Gateway. -// -// Returns the description of the gateway volumes specified in the request. -// The list of gateway volumes in the request must be from one gateway. In the -// response Amazon Storage Gateway returns volume information sorted by volume -// ARNs. This operation is only supported in stored volume gateway type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeStorediSCSIVolumes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeStorediSCSIVolumes -func (c *StorageGateway) DescribeStorediSCSIVolumes(input *DescribeStorediSCSIVolumesInput) (*DescribeStorediSCSIVolumesOutput, error) { - req, out := c.DescribeStorediSCSIVolumesRequest(input) - return out, req.Send() -} - -// DescribeStorediSCSIVolumesWithContext is the same as DescribeStorediSCSIVolumes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeStorediSCSIVolumes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeStorediSCSIVolumesWithContext(ctx aws.Context, input *DescribeStorediSCSIVolumesInput, opts ...request.Option) (*DescribeStorediSCSIVolumesOutput, error) { - req, out := c.DescribeStorediSCSIVolumesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTapeArchives = "DescribeTapeArchives" - -// DescribeTapeArchivesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTapeArchives operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTapeArchives for more information on using the DescribeTapeArchives -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTapeArchivesRequest method. -// req, resp := client.DescribeTapeArchivesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeArchives -func (c *StorageGateway) DescribeTapeArchivesRequest(input *DescribeTapeArchivesInput) (req *request.Request, output *DescribeTapeArchivesOutput) { - op := &request.Operation{ - Name: opDescribeTapeArchives, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "Limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeTapeArchivesInput{} - } - - output = &DescribeTapeArchivesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTapeArchives API operation for AWS Storage Gateway. -// -// Returns a description of specified virtual tapes in the virtual tape shelf -// (VTS). This operation is only supported in the tape gateway type. -// -// If a specific TapeARN is not specified, AWS Storage Gateway returns a description -// of all virtual tapes found in the VTS associated with your account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeTapeArchives for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeArchives -func (c *StorageGateway) DescribeTapeArchives(input *DescribeTapeArchivesInput) (*DescribeTapeArchivesOutput, error) { - req, out := c.DescribeTapeArchivesRequest(input) - return out, req.Send() -} - -// DescribeTapeArchivesWithContext is the same as DescribeTapeArchives with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTapeArchives for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeTapeArchivesWithContext(ctx aws.Context, input *DescribeTapeArchivesInput, opts ...request.Option) (*DescribeTapeArchivesOutput, error) { - req, out := c.DescribeTapeArchivesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeTapeArchivesPages iterates over the pages of a DescribeTapeArchives operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeTapeArchives method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeTapeArchives operation. -// pageNum := 0 -// err := client.DescribeTapeArchivesPages(params, -// func(page *DescribeTapeArchivesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *StorageGateway) DescribeTapeArchivesPages(input *DescribeTapeArchivesInput, fn func(*DescribeTapeArchivesOutput, bool) bool) error { - return c.DescribeTapeArchivesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeTapeArchivesPagesWithContext same as DescribeTapeArchivesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeTapeArchivesPagesWithContext(ctx aws.Context, input *DescribeTapeArchivesInput, fn func(*DescribeTapeArchivesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeTapeArchivesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTapeArchivesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTapeArchivesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeTapeRecoveryPoints = "DescribeTapeRecoveryPoints" - -// DescribeTapeRecoveryPointsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTapeRecoveryPoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTapeRecoveryPoints for more information on using the DescribeTapeRecoveryPoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTapeRecoveryPointsRequest method. -// req, resp := client.DescribeTapeRecoveryPointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeRecoveryPoints -func (c *StorageGateway) DescribeTapeRecoveryPointsRequest(input *DescribeTapeRecoveryPointsInput) (req *request.Request, output *DescribeTapeRecoveryPointsOutput) { - op := &request.Operation{ - Name: opDescribeTapeRecoveryPoints, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "Limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeTapeRecoveryPointsInput{} - } - - output = &DescribeTapeRecoveryPointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTapeRecoveryPoints API operation for AWS Storage Gateway. -// -// Returns a list of virtual tape recovery points that are available for the -// specified tape gateway. -// -// A recovery point is a point-in-time view of a virtual tape at which all the -// data on the virtual tape is consistent. If your gateway crashes, virtual -// tapes that have recovery points can be recovered to a new gateway. This operation -// is only supported in the tape gateway type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeTapeRecoveryPoints for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeRecoveryPoints -func (c *StorageGateway) DescribeTapeRecoveryPoints(input *DescribeTapeRecoveryPointsInput) (*DescribeTapeRecoveryPointsOutput, error) { - req, out := c.DescribeTapeRecoveryPointsRequest(input) - return out, req.Send() -} - -// DescribeTapeRecoveryPointsWithContext is the same as DescribeTapeRecoveryPoints with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTapeRecoveryPoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeTapeRecoveryPointsWithContext(ctx aws.Context, input *DescribeTapeRecoveryPointsInput, opts ...request.Option) (*DescribeTapeRecoveryPointsOutput, error) { - req, out := c.DescribeTapeRecoveryPointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeTapeRecoveryPointsPages iterates over the pages of a DescribeTapeRecoveryPoints operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeTapeRecoveryPoints method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeTapeRecoveryPoints operation. -// pageNum := 0 -// err := client.DescribeTapeRecoveryPointsPages(params, -// func(page *DescribeTapeRecoveryPointsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *StorageGateway) DescribeTapeRecoveryPointsPages(input *DescribeTapeRecoveryPointsInput, fn func(*DescribeTapeRecoveryPointsOutput, bool) bool) error { - return c.DescribeTapeRecoveryPointsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeTapeRecoveryPointsPagesWithContext same as DescribeTapeRecoveryPointsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeTapeRecoveryPointsPagesWithContext(ctx aws.Context, input *DescribeTapeRecoveryPointsInput, fn func(*DescribeTapeRecoveryPointsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeTapeRecoveryPointsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTapeRecoveryPointsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTapeRecoveryPointsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeTapes = "DescribeTapes" - -// DescribeTapesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTapes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTapes for more information on using the DescribeTapes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTapesRequest method. -// req, resp := client.DescribeTapesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapes -func (c *StorageGateway) DescribeTapesRequest(input *DescribeTapesInput) (req *request.Request, output *DescribeTapesOutput) { - op := &request.Operation{ - Name: opDescribeTapes, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "Limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeTapesInput{} - } - - output = &DescribeTapesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTapes API operation for AWS Storage Gateway. -// -// Returns a description of the specified Amazon Resource Name (ARN) of virtual -// tapes. If a TapeARN is not specified, returns a description of all virtual -// tapes associated with the specified gateway. This operation is only supported -// in the tape gateway type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeTapes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapes -func (c *StorageGateway) DescribeTapes(input *DescribeTapesInput) (*DescribeTapesOutput, error) { - req, out := c.DescribeTapesRequest(input) - return out, req.Send() -} - -// DescribeTapesWithContext is the same as DescribeTapes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTapes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeTapesWithContext(ctx aws.Context, input *DescribeTapesInput, opts ...request.Option) (*DescribeTapesOutput, error) { - req, out := c.DescribeTapesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeTapesPages iterates over the pages of a DescribeTapes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeTapes method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeTapes operation. -// pageNum := 0 -// err := client.DescribeTapesPages(params, -// func(page *DescribeTapesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *StorageGateway) DescribeTapesPages(input *DescribeTapesInput, fn func(*DescribeTapesOutput, bool) bool) error { - return c.DescribeTapesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeTapesPagesWithContext same as DescribeTapesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeTapesPagesWithContext(ctx aws.Context, input *DescribeTapesInput, fn func(*DescribeTapesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeTapesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTapesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTapesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeUploadBuffer = "DescribeUploadBuffer" - -// DescribeUploadBufferRequest generates a "aws/request.Request" representing the -// client's request for the DescribeUploadBuffer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeUploadBuffer for more information on using the DescribeUploadBuffer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeUploadBufferRequest method. -// req, resp := client.DescribeUploadBufferRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeUploadBuffer -func (c *StorageGateway) DescribeUploadBufferRequest(input *DescribeUploadBufferInput) (req *request.Request, output *DescribeUploadBufferOutput) { - op := &request.Operation{ - Name: opDescribeUploadBuffer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeUploadBufferInput{} - } - - output = &DescribeUploadBufferOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeUploadBuffer API operation for AWS Storage Gateway. -// -// Returns information about the upload buffer of a gateway. This operation -// is supported for the stored volume, cached volume and tape gateway types. -// -// The response includes disk IDs that are configured as upload buffer space, -// and it includes the amount of upload buffer space allocated and used. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeUploadBuffer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeUploadBuffer -func (c *StorageGateway) DescribeUploadBuffer(input *DescribeUploadBufferInput) (*DescribeUploadBufferOutput, error) { - req, out := c.DescribeUploadBufferRequest(input) - return out, req.Send() -} - -// DescribeUploadBufferWithContext is the same as DescribeUploadBuffer with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeUploadBuffer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeUploadBufferWithContext(ctx aws.Context, input *DescribeUploadBufferInput, opts ...request.Option) (*DescribeUploadBufferOutput, error) { - req, out := c.DescribeUploadBufferRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeVTLDevices = "DescribeVTLDevices" - -// DescribeVTLDevicesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeVTLDevices operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeVTLDevices for more information on using the DescribeVTLDevices -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeVTLDevicesRequest method. -// req, resp := client.DescribeVTLDevicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeVTLDevices -func (c *StorageGateway) DescribeVTLDevicesRequest(input *DescribeVTLDevicesInput) (req *request.Request, output *DescribeVTLDevicesOutput) { - op := &request.Operation{ - Name: opDescribeVTLDevices, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "Limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeVTLDevicesInput{} - } - - output = &DescribeVTLDevicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeVTLDevices API operation for AWS Storage Gateway. -// -// Returns a description of virtual tape library (VTL) devices for the specified -// tape gateway. In the response, AWS Storage Gateway returns VTL device information. -// -// This operation is only supported in the tape gateway type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeVTLDevices for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeVTLDevices -func (c *StorageGateway) DescribeVTLDevices(input *DescribeVTLDevicesInput) (*DescribeVTLDevicesOutput, error) { - req, out := c.DescribeVTLDevicesRequest(input) - return out, req.Send() -} - -// DescribeVTLDevicesWithContext is the same as DescribeVTLDevices with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeVTLDevices for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeVTLDevicesWithContext(ctx aws.Context, input *DescribeVTLDevicesInput, opts ...request.Option) (*DescribeVTLDevicesOutput, error) { - req, out := c.DescribeVTLDevicesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeVTLDevicesPages iterates over the pages of a DescribeVTLDevices operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeVTLDevices method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeVTLDevices operation. -// pageNum := 0 -// err := client.DescribeVTLDevicesPages(params, -// func(page *DescribeVTLDevicesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *StorageGateway) DescribeVTLDevicesPages(input *DescribeVTLDevicesInput, fn func(*DescribeVTLDevicesOutput, bool) bool) error { - return c.DescribeVTLDevicesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeVTLDevicesPagesWithContext same as DescribeVTLDevicesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeVTLDevicesPagesWithContext(ctx aws.Context, input *DescribeVTLDevicesInput, fn func(*DescribeVTLDevicesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeVTLDevicesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeVTLDevicesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVTLDevicesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeWorkingStorage = "DescribeWorkingStorage" - -// DescribeWorkingStorageRequest generates a "aws/request.Request" representing the -// client's request for the DescribeWorkingStorage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeWorkingStorage for more information on using the DescribeWorkingStorage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeWorkingStorageRequest method. -// req, resp := client.DescribeWorkingStorageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeWorkingStorage -func (c *StorageGateway) DescribeWorkingStorageRequest(input *DescribeWorkingStorageInput) (req *request.Request, output *DescribeWorkingStorageOutput) { - op := &request.Operation{ - Name: opDescribeWorkingStorage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeWorkingStorageInput{} - } - - output = &DescribeWorkingStorageOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeWorkingStorage API operation for AWS Storage Gateway. -// -// Returns information about the working storage of a gateway. This operation -// is only supported in the stored volumes gateway type. This operation is deprecated -// in cached volumes API version (20120630). Use DescribeUploadBuffer instead. -// -// Working storage is also referred to as upload buffer. You can also use the -// DescribeUploadBuffer operation to add upload buffer to a stored volume gateway. -// -// The response includes disk IDs that are configured as working storage, and -// it includes the amount of working storage allocated and used. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DescribeWorkingStorage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeWorkingStorage -func (c *StorageGateway) DescribeWorkingStorage(input *DescribeWorkingStorageInput) (*DescribeWorkingStorageOutput, error) { - req, out := c.DescribeWorkingStorageRequest(input) - return out, req.Send() -} - -// DescribeWorkingStorageWithContext is the same as DescribeWorkingStorage with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeWorkingStorage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DescribeWorkingStorageWithContext(ctx aws.Context, input *DescribeWorkingStorageInput, opts ...request.Option) (*DescribeWorkingStorageOutput, error) { - req, out := c.DescribeWorkingStorageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachVolume = "DetachVolume" - -// DetachVolumeRequest generates a "aws/request.Request" representing the -// client's request for the DetachVolume operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachVolume for more information on using the DetachVolume -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DetachVolumeRequest method. -// req, resp := client.DetachVolumeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DetachVolume -func (c *StorageGateway) DetachVolumeRequest(input *DetachVolumeInput) (req *request.Request, output *DetachVolumeOutput) { - op := &request.Operation{ - Name: opDetachVolume, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachVolumeInput{} - } - - output = &DetachVolumeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DetachVolume API operation for AWS Storage Gateway. -// -// Disconnects a volume from an iSCSI connection and then detaches the volume -// from the specified gateway. Detaching and attaching a volume enables you -// to recover your data from one gateway to a different gateway without creating -// a snapshot. It also makes it easier to move your volumes from an on-premises -// gateway to a gateway hosted on an Amazon EC2 instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DetachVolume for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DetachVolume -func (c *StorageGateway) DetachVolume(input *DetachVolumeInput) (*DetachVolumeOutput, error) { - req, out := c.DetachVolumeRequest(input) - return out, req.Send() -} - -// DetachVolumeWithContext is the same as DetachVolume with the addition of -// the ability to pass a context and additional request options. -// -// See DetachVolume for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DetachVolumeWithContext(ctx aws.Context, input *DetachVolumeInput, opts ...request.Option) (*DetachVolumeOutput, error) { - req, out := c.DetachVolumeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableGateway = "DisableGateway" - -// DisableGatewayRequest generates a "aws/request.Request" representing the -// client's request for the DisableGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisableGateway for more information on using the DisableGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisableGatewayRequest method. -// req, resp := client.DisableGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DisableGateway -func (c *StorageGateway) DisableGatewayRequest(input *DisableGatewayInput) (req *request.Request, output *DisableGatewayOutput) { - op := &request.Operation{ - Name: opDisableGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableGatewayInput{} - } - - output = &DisableGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisableGateway API operation for AWS Storage Gateway. -// -// Disables a tape gateway when the gateway is no longer functioning. For example, -// if your gateway VM is damaged, you can disable the gateway so you can recover -// virtual tapes. -// -// Use this operation for a tape gateway that is not reachable or not functioning. -// This operation is only supported in the tape gateway type. -// -// Once a gateway is disabled it cannot be enabled. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation DisableGateway for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DisableGateway -func (c *StorageGateway) DisableGateway(input *DisableGatewayInput) (*DisableGatewayOutput, error) { - req, out := c.DisableGatewayRequest(input) - return out, req.Send() -} - -// DisableGatewayWithContext is the same as DisableGateway with the addition of -// the ability to pass a context and additional request options. -// -// See DisableGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) DisableGatewayWithContext(ctx aws.Context, input *DisableGatewayInput, opts ...request.Option) (*DisableGatewayOutput, error) { - req, out := c.DisableGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opJoinDomain = "JoinDomain" - -// JoinDomainRequest generates a "aws/request.Request" representing the -// client's request for the JoinDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See JoinDomain for more information on using the JoinDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the JoinDomainRequest method. -// req, resp := client.JoinDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/JoinDomain -func (c *StorageGateway) JoinDomainRequest(input *JoinDomainInput) (req *request.Request, output *JoinDomainOutput) { - op := &request.Operation{ - Name: opJoinDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &JoinDomainInput{} - } - - output = &JoinDomainOutput{} - req = c.newRequest(op, input, output) - return -} - -// JoinDomain API operation for AWS Storage Gateway. -// -// Adds a file gateway to an Active Directory domain. This operation is only -// supported for file gateways that support the SMB file protocol. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation JoinDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/JoinDomain -func (c *StorageGateway) JoinDomain(input *JoinDomainInput) (*JoinDomainOutput, error) { - req, out := c.JoinDomainRequest(input) - return out, req.Send() -} - -// JoinDomainWithContext is the same as JoinDomain with the addition of -// the ability to pass a context and additional request options. -// -// See JoinDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) JoinDomainWithContext(ctx aws.Context, input *JoinDomainInput, opts ...request.Option) (*JoinDomainOutput, error) { - req, out := c.JoinDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListFileShares = "ListFileShares" - -// ListFileSharesRequest generates a "aws/request.Request" representing the -// client's request for the ListFileShares operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListFileShares for more information on using the ListFileShares -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListFileSharesRequest method. -// req, resp := client.ListFileSharesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListFileShares -func (c *StorageGateway) ListFileSharesRequest(input *ListFileSharesInput) (req *request.Request, output *ListFileSharesOutput) { - op := &request.Operation{ - Name: opListFileShares, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListFileSharesInput{} - } - - output = &ListFileSharesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListFileShares API operation for AWS Storage Gateway. -// -// Gets a list of the file shares for a specific file gateway, or the list of -// file shares that belong to the calling user account. This operation is only -// supported for file gateways. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation ListFileShares for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListFileShares -func (c *StorageGateway) ListFileShares(input *ListFileSharesInput) (*ListFileSharesOutput, error) { - req, out := c.ListFileSharesRequest(input) - return out, req.Send() -} - -// ListFileSharesWithContext is the same as ListFileShares with the addition of -// the ability to pass a context and additional request options. -// -// See ListFileShares for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) ListFileSharesWithContext(ctx aws.Context, input *ListFileSharesInput, opts ...request.Option) (*ListFileSharesOutput, error) { - req, out := c.ListFileSharesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListGateways = "ListGateways" - -// ListGatewaysRequest generates a "aws/request.Request" representing the -// client's request for the ListGateways operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListGateways for more information on using the ListGateways -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListGatewaysRequest method. -// req, resp := client.ListGatewaysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListGateways -func (c *StorageGateway) ListGatewaysRequest(input *ListGatewaysInput) (req *request.Request, output *ListGatewaysOutput) { - op := &request.Operation{ - Name: opListGateways, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "Limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListGatewaysInput{} - } - - output = &ListGatewaysOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGateways API operation for AWS Storage Gateway. -// -// Lists gateways owned by an AWS account in a region specified in the request. -// The returned list is ordered by gateway Amazon Resource Name (ARN). -// -// By default, the operation returns a maximum of 100 gateways. This operation -// supports pagination that allows you to optionally reduce the number of gateways -// returned in a response. -// -// If you have more gateways than are returned in a response (that is, the response -// returns only a truncated list of your gateways), the response contains a -// marker that you can specify in your next request to fetch the next page of -// gateways. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation ListGateways for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListGateways -func (c *StorageGateway) ListGateways(input *ListGatewaysInput) (*ListGatewaysOutput, error) { - req, out := c.ListGatewaysRequest(input) - return out, req.Send() -} - -// ListGatewaysWithContext is the same as ListGateways with the addition of -// the ability to pass a context and additional request options. -// -// See ListGateways for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) ListGatewaysWithContext(ctx aws.Context, input *ListGatewaysInput, opts ...request.Option) (*ListGatewaysOutput, error) { - req, out := c.ListGatewaysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListGatewaysPages iterates over the pages of a ListGateways operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListGateways method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListGateways operation. -// pageNum := 0 -// err := client.ListGatewaysPages(params, -// func(page *ListGatewaysOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *StorageGateway) ListGatewaysPages(input *ListGatewaysInput, fn func(*ListGatewaysOutput, bool) bool) error { - return c.ListGatewaysPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListGatewaysPagesWithContext same as ListGatewaysPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) ListGatewaysPagesWithContext(ctx aws.Context, input *ListGatewaysInput, fn func(*ListGatewaysOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListGatewaysInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListGatewaysRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListGatewaysOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListLocalDisks = "ListLocalDisks" - -// ListLocalDisksRequest generates a "aws/request.Request" representing the -// client's request for the ListLocalDisks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListLocalDisks for more information on using the ListLocalDisks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListLocalDisksRequest method. -// req, resp := client.ListLocalDisksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListLocalDisks -func (c *StorageGateway) ListLocalDisksRequest(input *ListLocalDisksInput) (req *request.Request, output *ListLocalDisksOutput) { - op := &request.Operation{ - Name: opListLocalDisks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListLocalDisksInput{} - } - - output = &ListLocalDisksOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListLocalDisks API operation for AWS Storage Gateway. -// -// Returns a list of the gateway's local disks. To specify which gateway to -// describe, you use the Amazon Resource Name (ARN) of the gateway in the body -// of the request. -// -// The request returns a list of all disks, specifying which are configured -// as working storage, cache storage, or stored volume or not configured at -// all. The response includes a DiskStatus field. This field can have a value -// of present (the disk is available to use), missing (the disk is no longer -// connected to the gateway), or mismatch (the disk node is occupied by a disk -// that has incorrect metadata or the disk content is corrupted). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation ListLocalDisks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListLocalDisks -func (c *StorageGateway) ListLocalDisks(input *ListLocalDisksInput) (*ListLocalDisksOutput, error) { - req, out := c.ListLocalDisksRequest(input) - return out, req.Send() -} - -// ListLocalDisksWithContext is the same as ListLocalDisks with the addition of -// the ability to pass a context and additional request options. -// -// See ListLocalDisks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) ListLocalDisksWithContext(ctx aws.Context, input *ListLocalDisksInput, opts ...request.Option) (*ListLocalDisksOutput, error) { - req, out := c.ListLocalDisksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTagsForResource = "ListTagsForResource" - -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTagsForResource for more information on using the ListTagsForResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTagsForResourceRequest method. -// req, resp := client.ListTagsForResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTagsForResource -func (c *StorageGateway) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for AWS Storage Gateway. -// -// Lists the tags that have been added to the specified resource. This operation -// is only supported in the cached volume, stored volume and tape gateway type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTagsForResource -func (c *StorageGateway) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) - return out, req.Send() -} - -// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of -// the ability to pass a context and additional request options. -// -// See ListTagsForResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListTapes = "ListTapes" - -// ListTapesRequest generates a "aws/request.Request" representing the -// client's request for the ListTapes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTapes for more information on using the ListTapes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListTapesRequest method. -// req, resp := client.ListTapesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTapes -func (c *StorageGateway) ListTapesRequest(input *ListTapesInput) (req *request.Request, output *ListTapesOutput) { - op := &request.Operation{ - Name: opListTapes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTapesInput{} - } - - output = &ListTapesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTapes API operation for AWS Storage Gateway. -// -// Lists virtual tapes in your virtual tape library (VTL) and your virtual tape -// shelf (VTS). You specify the tapes to list by specifying one or more tape -// Amazon Resource Names (ARNs). If you don't specify a tape ARN, the operation -// lists all virtual tapes in both your VTL and VTS. -// -// This operation supports pagination. By default, the operation returns a maximum -// of up to 100 tapes. You can optionally specify the Limit parameter in the -// body to limit the number of tapes in the response. If the number of tapes -// returned in the response is truncated, the response includes a Marker element -// that you can use in your subsequent request to retrieve the next set of tapes. -// This operation is only supported in the tape gateway type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation ListTapes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTapes -func (c *StorageGateway) ListTapes(input *ListTapesInput) (*ListTapesOutput, error) { - req, out := c.ListTapesRequest(input) - return out, req.Send() -} - -// ListTapesWithContext is the same as ListTapes with the addition of -// the ability to pass a context and additional request options. -// -// See ListTapes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) ListTapesWithContext(ctx aws.Context, input *ListTapesInput, opts ...request.Option) (*ListTapesOutput, error) { - req, out := c.ListTapesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListVolumeInitiators = "ListVolumeInitiators" - -// ListVolumeInitiatorsRequest generates a "aws/request.Request" representing the -// client's request for the ListVolumeInitiators operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListVolumeInitiators for more information on using the ListVolumeInitiators -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListVolumeInitiatorsRequest method. -// req, resp := client.ListVolumeInitiatorsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeInitiators -func (c *StorageGateway) ListVolumeInitiatorsRequest(input *ListVolumeInitiatorsInput) (req *request.Request, output *ListVolumeInitiatorsOutput) { - op := &request.Operation{ - Name: opListVolumeInitiators, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListVolumeInitiatorsInput{} - } - - output = &ListVolumeInitiatorsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListVolumeInitiators API operation for AWS Storage Gateway. -// -// Lists iSCSI initiators that are connected to a volume. You can use this operation -// to determine whether a volume is being used or not. This operation is only -// supported in the cached volume and stored volume gateway types. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation ListVolumeInitiators for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeInitiators -func (c *StorageGateway) ListVolumeInitiators(input *ListVolumeInitiatorsInput) (*ListVolumeInitiatorsOutput, error) { - req, out := c.ListVolumeInitiatorsRequest(input) - return out, req.Send() -} - -// ListVolumeInitiatorsWithContext is the same as ListVolumeInitiators with the addition of -// the ability to pass a context and additional request options. -// -// See ListVolumeInitiators for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) ListVolumeInitiatorsWithContext(ctx aws.Context, input *ListVolumeInitiatorsInput, opts ...request.Option) (*ListVolumeInitiatorsOutput, error) { - req, out := c.ListVolumeInitiatorsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListVolumeRecoveryPoints = "ListVolumeRecoveryPoints" - -// ListVolumeRecoveryPointsRequest generates a "aws/request.Request" representing the -// client's request for the ListVolumeRecoveryPoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListVolumeRecoveryPoints for more information on using the ListVolumeRecoveryPoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListVolumeRecoveryPointsRequest method. -// req, resp := client.ListVolumeRecoveryPointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeRecoveryPoints -func (c *StorageGateway) ListVolumeRecoveryPointsRequest(input *ListVolumeRecoveryPointsInput) (req *request.Request, output *ListVolumeRecoveryPointsOutput) { - op := &request.Operation{ - Name: opListVolumeRecoveryPoints, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListVolumeRecoveryPointsInput{} - } - - output = &ListVolumeRecoveryPointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListVolumeRecoveryPoints API operation for AWS Storage Gateway. -// -// Lists the recovery points for a specified gateway. This operation is only -// supported in the cached volume gateway type. -// -// Each cache volume has one recovery point. A volume recovery point is a point -// in time at which all data of the volume is consistent and from which you -// can create a snapshot or clone a new cached volume from a source volume. -// To create a snapshot from a volume recovery point use the CreateSnapshotFromVolumeRecoveryPoint -// operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation ListVolumeRecoveryPoints for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeRecoveryPoints -func (c *StorageGateway) ListVolumeRecoveryPoints(input *ListVolumeRecoveryPointsInput) (*ListVolumeRecoveryPointsOutput, error) { - req, out := c.ListVolumeRecoveryPointsRequest(input) - return out, req.Send() -} - -// ListVolumeRecoveryPointsWithContext is the same as ListVolumeRecoveryPoints with the addition of -// the ability to pass a context and additional request options. -// -// See ListVolumeRecoveryPoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) ListVolumeRecoveryPointsWithContext(ctx aws.Context, input *ListVolumeRecoveryPointsInput, opts ...request.Option) (*ListVolumeRecoveryPointsOutput, error) { - req, out := c.ListVolumeRecoveryPointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListVolumes = "ListVolumes" - -// ListVolumesRequest generates a "aws/request.Request" representing the -// client's request for the ListVolumes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListVolumes for more information on using the ListVolumes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListVolumesRequest method. -// req, resp := client.ListVolumesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumes -func (c *StorageGateway) ListVolumesRequest(input *ListVolumesInput) (req *request.Request, output *ListVolumesOutput) { - op := &request.Operation{ - Name: opListVolumes, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "Limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListVolumesInput{} - } - - output = &ListVolumesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListVolumes API operation for AWS Storage Gateway. -// -// Lists the iSCSI stored volumes of a gateway. Results are sorted by volume -// ARN. The response includes only the volume ARNs. If you want additional volume -// information, use the DescribeStorediSCSIVolumes or the DescribeCachediSCSIVolumes -// API. -// -// The operation supports pagination. By default, the operation returns a maximum -// of up to 100 volumes. You can optionally specify the Limit field in the body -// to limit the number of volumes in the response. If the number of volumes -// returned in the response is truncated, the response includes a Marker field. -// You can use this Marker value in your subsequent request to retrieve the -// next set of volumes. This operation is only supported in the cached volume -// and stored volume gateway types. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation ListVolumes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumes -func (c *StorageGateway) ListVolumes(input *ListVolumesInput) (*ListVolumesOutput, error) { - req, out := c.ListVolumesRequest(input) - return out, req.Send() -} - -// ListVolumesWithContext is the same as ListVolumes with the addition of -// the ability to pass a context and additional request options. -// -// See ListVolumes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) ListVolumesWithContext(ctx aws.Context, input *ListVolumesInput, opts ...request.Option) (*ListVolumesOutput, error) { - req, out := c.ListVolumesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListVolumesPages iterates over the pages of a ListVolumes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListVolumes method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListVolumes operation. -// pageNum := 0 -// err := client.ListVolumesPages(params, -// func(page *ListVolumesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *StorageGateway) ListVolumesPages(input *ListVolumesInput, fn func(*ListVolumesOutput, bool) bool) error { - return c.ListVolumesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListVolumesPagesWithContext same as ListVolumesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) ListVolumesPagesWithContext(ctx aws.Context, input *ListVolumesInput, fn func(*ListVolumesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListVolumesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListVolumesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListVolumesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opNotifyWhenUploaded = "NotifyWhenUploaded" - -// NotifyWhenUploadedRequest generates a "aws/request.Request" representing the -// client's request for the NotifyWhenUploaded operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See NotifyWhenUploaded for more information on using the NotifyWhenUploaded -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the NotifyWhenUploadedRequest method. -// req, resp := client.NotifyWhenUploadedRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/NotifyWhenUploaded -func (c *StorageGateway) NotifyWhenUploadedRequest(input *NotifyWhenUploadedInput) (req *request.Request, output *NotifyWhenUploadedOutput) { - op := &request.Operation{ - Name: opNotifyWhenUploaded, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &NotifyWhenUploadedInput{} - } - - output = &NotifyWhenUploadedOutput{} - req = c.newRequest(op, input, output) - return -} - -// NotifyWhenUploaded API operation for AWS Storage Gateway. -// -// Sends you notification through CloudWatch Events when all files written to -// your NFS file share have been uploaded to Amazon S3. -// -// AWS Storage Gateway can send a notification through Amazon CloudWatch Events -// when all files written to your file share up to that point in time have been -// uploaded to Amazon S3. These files include files written to the NFS file -// share up to the time that you make a request for notification. When the upload -// is done, Storage Gateway sends you notification through an Amazon CloudWatch -// Event. You can configure CloudWatch Events to send the notification through -// event targets such as Amazon SNS or AWS Lambda function. This operation is -// only supported for file gateways. -// -// For more information, see Getting File Upload Notification in the Storage -// Gateway User Guide (https://docs.aws.amazon.com/storagegateway/latest/userguide/monitoring-file-gateway.html#get-upload-notification). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation NotifyWhenUploaded for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/NotifyWhenUploaded -func (c *StorageGateway) NotifyWhenUploaded(input *NotifyWhenUploadedInput) (*NotifyWhenUploadedOutput, error) { - req, out := c.NotifyWhenUploadedRequest(input) - return out, req.Send() -} - -// NotifyWhenUploadedWithContext is the same as NotifyWhenUploaded with the addition of -// the ability to pass a context and additional request options. -// -// See NotifyWhenUploaded for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) NotifyWhenUploadedWithContext(ctx aws.Context, input *NotifyWhenUploadedInput, opts ...request.Option) (*NotifyWhenUploadedOutput, error) { - req, out := c.NotifyWhenUploadedRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRefreshCache = "RefreshCache" - -// RefreshCacheRequest generates a "aws/request.Request" representing the -// client's request for the RefreshCache operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RefreshCache for more information on using the RefreshCache -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RefreshCacheRequest method. -// req, resp := client.RefreshCacheRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RefreshCache -func (c *StorageGateway) RefreshCacheRequest(input *RefreshCacheInput) (req *request.Request, output *RefreshCacheOutput) { - op := &request.Operation{ - Name: opRefreshCache, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RefreshCacheInput{} - } - - output = &RefreshCacheOutput{} - req = c.newRequest(op, input, output) - return -} - -// RefreshCache API operation for AWS Storage Gateway. -// -// Refreshes the cache for the specified file share. This operation finds objects -// in the Amazon S3 bucket that were added, removed or replaced since the gateway -// last listed the bucket's contents and cached the results. This operation -// is only supported in the file gateway type. You can subscribe to be notified -// through an Amazon CloudWatch event when your RefreshCache operation completes. -// For more information, see Getting Notified About File Operations (https://docs.aws.amazon.com/storagegateway/latest/userguide/monitoring-file-gateway.html#get-notification). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation RefreshCache for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RefreshCache -func (c *StorageGateway) RefreshCache(input *RefreshCacheInput) (*RefreshCacheOutput, error) { - req, out := c.RefreshCacheRequest(input) - return out, req.Send() -} - -// RefreshCacheWithContext is the same as RefreshCache with the addition of -// the ability to pass a context and additional request options. -// -// See RefreshCache for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) RefreshCacheWithContext(ctx aws.Context, input *RefreshCacheInput, opts ...request.Option) (*RefreshCacheOutput, error) { - req, out := c.RefreshCacheRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTagsFromResource = "RemoveTagsFromResource" - -// RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTagsFromResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveTagsFromResource for more information on using the RemoveTagsFromResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RemoveTagsFromResourceRequest method. -// req, resp := client.RemoveTagsFromResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RemoveTagsFromResource -func (c *StorageGateway) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *RemoveTagsFromResourceOutput) { - op := &request.Operation{ - Name: opRemoveTagsFromResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsFromResourceInput{} - } - - output = &RemoveTagsFromResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// RemoveTagsFromResource API operation for AWS Storage Gateway. -// -// Removes one or more tags from the specified resource. This operation is only -// supported in the cached volume, stored volume and tape gateway types. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation RemoveTagsFromResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RemoveTagsFromResource -func (c *StorageGateway) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - return out, req.Send() -} - -// RemoveTagsFromResourceWithContext is the same as RemoveTagsFromResource with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTagsFromResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*RemoveTagsFromResourceOutput, error) { - req, out := c.RemoveTagsFromResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetCache = "ResetCache" - -// ResetCacheRequest generates a "aws/request.Request" representing the -// client's request for the ResetCache operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetCache for more information on using the ResetCache -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ResetCacheRequest method. -// req, resp := client.ResetCacheRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ResetCache -func (c *StorageGateway) ResetCacheRequest(input *ResetCacheInput) (req *request.Request, output *ResetCacheOutput) { - op := &request.Operation{ - Name: opResetCache, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetCacheInput{} - } - - output = &ResetCacheOutput{} - req = c.newRequest(op, input, output) - return -} - -// ResetCache API operation for AWS Storage Gateway. -// -// Resets all cache disks that have encountered a error and makes the disks -// available for reconfiguration as cache storage. If your cache disk encounters -// a error, the gateway prevents read and write operations on virtual tapes -// in the gateway. For example, an error can occur when a disk is corrupted -// or removed from the gateway. When a cache is reset, the gateway loses its -// cache storage. At this point you can reconfigure the disks as cache disks. -// This operation is only supported in the cached volume and tape types. -// -// If the cache disk you are resetting contains data that has not been uploaded -// to Amazon S3 yet, that data can be lost. After you reset cache disks, there -// will be no configured cache disks left in the gateway, so you must configure -// at least one new cache disk for your gateway to function properly. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation ResetCache for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ResetCache -func (c *StorageGateway) ResetCache(input *ResetCacheInput) (*ResetCacheOutput, error) { - req, out := c.ResetCacheRequest(input) - return out, req.Send() -} - -// ResetCacheWithContext is the same as ResetCache with the addition of -// the ability to pass a context and additional request options. -// -// See ResetCache for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) ResetCacheWithContext(ctx aws.Context, input *ResetCacheInput, opts ...request.Option) (*ResetCacheOutput, error) { - req, out := c.ResetCacheRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRetrieveTapeArchive = "RetrieveTapeArchive" - -// RetrieveTapeArchiveRequest generates a "aws/request.Request" representing the -// client's request for the RetrieveTapeArchive operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RetrieveTapeArchive for more information on using the RetrieveTapeArchive -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RetrieveTapeArchiveRequest method. -// req, resp := client.RetrieveTapeArchiveRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeArchive -func (c *StorageGateway) RetrieveTapeArchiveRequest(input *RetrieveTapeArchiveInput) (req *request.Request, output *RetrieveTapeArchiveOutput) { - op := &request.Operation{ - Name: opRetrieveTapeArchive, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RetrieveTapeArchiveInput{} - } - - output = &RetrieveTapeArchiveOutput{} - req = c.newRequest(op, input, output) - return -} - -// RetrieveTapeArchive API operation for AWS Storage Gateway. -// -// Retrieves an archived virtual tape from the virtual tape shelf (VTS) to a -// tape gateway. Virtual tapes archived in the VTS are not associated with any -// gateway. However after a tape is retrieved, it is associated with a gateway, -// even though it is also listed in the VTS, that is, archive. This operation -// is only supported in the tape gateway type. -// -// Once a tape is successfully retrieved to a gateway, it cannot be retrieved -// again to another gateway. You must archive the tape again before you can -// retrieve it to another gateway. This operation is only supported in the tape -// gateway type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation RetrieveTapeArchive for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeArchive -func (c *StorageGateway) RetrieveTapeArchive(input *RetrieveTapeArchiveInput) (*RetrieveTapeArchiveOutput, error) { - req, out := c.RetrieveTapeArchiveRequest(input) - return out, req.Send() -} - -// RetrieveTapeArchiveWithContext is the same as RetrieveTapeArchive with the addition of -// the ability to pass a context and additional request options. -// -// See RetrieveTapeArchive for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) RetrieveTapeArchiveWithContext(ctx aws.Context, input *RetrieveTapeArchiveInput, opts ...request.Option) (*RetrieveTapeArchiveOutput, error) { - req, out := c.RetrieveTapeArchiveRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRetrieveTapeRecoveryPoint = "RetrieveTapeRecoveryPoint" - -// RetrieveTapeRecoveryPointRequest generates a "aws/request.Request" representing the -// client's request for the RetrieveTapeRecoveryPoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RetrieveTapeRecoveryPoint for more information on using the RetrieveTapeRecoveryPoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RetrieveTapeRecoveryPointRequest method. -// req, resp := client.RetrieveTapeRecoveryPointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeRecoveryPoint -func (c *StorageGateway) RetrieveTapeRecoveryPointRequest(input *RetrieveTapeRecoveryPointInput) (req *request.Request, output *RetrieveTapeRecoveryPointOutput) { - op := &request.Operation{ - Name: opRetrieveTapeRecoveryPoint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RetrieveTapeRecoveryPointInput{} - } - - output = &RetrieveTapeRecoveryPointOutput{} - req = c.newRequest(op, input, output) - return -} - -// RetrieveTapeRecoveryPoint API operation for AWS Storage Gateway. -// -// Retrieves the recovery point for the specified virtual tape. This operation -// is only supported in the tape gateway type. -// -// A recovery point is a point in time view of a virtual tape at which all the -// data on the tape is consistent. If your gateway crashes, virtual tapes that -// have recovery points can be recovered to a new gateway. -// -// The virtual tape can be retrieved to only one gateway. The retrieved tape -// is read-only. The virtual tape can be retrieved to only a tape gateway. There -// is no charge for retrieving recovery points. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation RetrieveTapeRecoveryPoint for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeRecoveryPoint -func (c *StorageGateway) RetrieveTapeRecoveryPoint(input *RetrieveTapeRecoveryPointInput) (*RetrieveTapeRecoveryPointOutput, error) { - req, out := c.RetrieveTapeRecoveryPointRequest(input) - return out, req.Send() -} - -// RetrieveTapeRecoveryPointWithContext is the same as RetrieveTapeRecoveryPoint with the addition of -// the ability to pass a context and additional request options. -// -// See RetrieveTapeRecoveryPoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) RetrieveTapeRecoveryPointWithContext(ctx aws.Context, input *RetrieveTapeRecoveryPointInput, opts ...request.Option) (*RetrieveTapeRecoveryPointOutput, error) { - req, out := c.RetrieveTapeRecoveryPointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetLocalConsolePassword = "SetLocalConsolePassword" - -// SetLocalConsolePasswordRequest generates a "aws/request.Request" representing the -// client's request for the SetLocalConsolePassword operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetLocalConsolePassword for more information on using the SetLocalConsolePassword -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetLocalConsolePasswordRequest method. -// req, resp := client.SetLocalConsolePasswordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetLocalConsolePassword -func (c *StorageGateway) SetLocalConsolePasswordRequest(input *SetLocalConsolePasswordInput) (req *request.Request, output *SetLocalConsolePasswordOutput) { - op := &request.Operation{ - Name: opSetLocalConsolePassword, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetLocalConsolePasswordInput{} - } - - output = &SetLocalConsolePasswordOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetLocalConsolePassword API operation for AWS Storage Gateway. -// -// Sets the password for your VM local console. When you log in to the local -// console for the first time, you log in to the VM with the default credentials. -// We recommend that you set a new password. You don't need to know the default -// password to set a new password. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation SetLocalConsolePassword for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetLocalConsolePassword -func (c *StorageGateway) SetLocalConsolePassword(input *SetLocalConsolePasswordInput) (*SetLocalConsolePasswordOutput, error) { - req, out := c.SetLocalConsolePasswordRequest(input) - return out, req.Send() -} - -// SetLocalConsolePasswordWithContext is the same as SetLocalConsolePassword with the addition of -// the ability to pass a context and additional request options. -// -// See SetLocalConsolePassword for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) SetLocalConsolePasswordWithContext(ctx aws.Context, input *SetLocalConsolePasswordInput, opts ...request.Option) (*SetLocalConsolePasswordOutput, error) { - req, out := c.SetLocalConsolePasswordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetSMBGuestPassword = "SetSMBGuestPassword" - -// SetSMBGuestPasswordRequest generates a "aws/request.Request" representing the -// client's request for the SetSMBGuestPassword operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetSMBGuestPassword for more information on using the SetSMBGuestPassword -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SetSMBGuestPasswordRequest method. -// req, resp := client.SetSMBGuestPasswordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetSMBGuestPassword -func (c *StorageGateway) SetSMBGuestPasswordRequest(input *SetSMBGuestPasswordInput) (req *request.Request, output *SetSMBGuestPasswordOutput) { - op := &request.Operation{ - Name: opSetSMBGuestPassword, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetSMBGuestPasswordInput{} - } - - output = &SetSMBGuestPasswordOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetSMBGuestPassword API operation for AWS Storage Gateway. -// -// Sets the password for the guest user smbguest. The smbguest user is the user -// when the authentication method for the file share is set to GuestAccess. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation SetSMBGuestPassword for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetSMBGuestPassword -func (c *StorageGateway) SetSMBGuestPassword(input *SetSMBGuestPasswordInput) (*SetSMBGuestPasswordOutput, error) { - req, out := c.SetSMBGuestPasswordRequest(input) - return out, req.Send() -} - -// SetSMBGuestPasswordWithContext is the same as SetSMBGuestPassword with the addition of -// the ability to pass a context and additional request options. -// -// See SetSMBGuestPassword for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) SetSMBGuestPasswordWithContext(ctx aws.Context, input *SetSMBGuestPasswordInput, opts ...request.Option) (*SetSMBGuestPasswordOutput, error) { - req, out := c.SetSMBGuestPasswordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opShutdownGateway = "ShutdownGateway" - -// ShutdownGatewayRequest generates a "aws/request.Request" representing the -// client's request for the ShutdownGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ShutdownGateway for more information on using the ShutdownGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ShutdownGatewayRequest method. -// req, resp := client.ShutdownGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ShutdownGateway -func (c *StorageGateway) ShutdownGatewayRequest(input *ShutdownGatewayInput) (req *request.Request, output *ShutdownGatewayOutput) { - op := &request.Operation{ - Name: opShutdownGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ShutdownGatewayInput{} - } - - output = &ShutdownGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// ShutdownGateway API operation for AWS Storage Gateway. -// -// Shuts down a gateway. To specify which gateway to shut down, use the Amazon -// Resource Name (ARN) of the gateway in the body of your request. -// -// The operation shuts down the gateway service component running in the gateway's -// virtual machine (VM) and not the host VM. -// -// If you want to shut down the VM, it is recommended that you first shut down -// the gateway component in the VM to avoid unpredictable conditions. -// -// After the gateway is shutdown, you cannot call any other API except StartGateway, -// DescribeGatewayInformation, and ListGateways. For more information, see ActivateGateway. -// Your applications cannot read from or write to the gateway's storage volumes, -// and there are no snapshots taken. -// -// When you make a shutdown request, you will get a 200 OK success response -// immediately. However, it might take some time for the gateway to shut down. -// You can call the DescribeGatewayInformation API to check the status. For -// more information, see ActivateGateway. -// -// If do not intend to use the gateway again, you must delete the gateway (using -// DeleteGateway) to no longer pay software charges associated with the gateway. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation ShutdownGateway for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ShutdownGateway -func (c *StorageGateway) ShutdownGateway(input *ShutdownGatewayInput) (*ShutdownGatewayOutput, error) { - req, out := c.ShutdownGatewayRequest(input) - return out, req.Send() -} - -// ShutdownGatewayWithContext is the same as ShutdownGateway with the addition of -// the ability to pass a context and additional request options. -// -// See ShutdownGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) ShutdownGatewayWithContext(ctx aws.Context, input *ShutdownGatewayInput, opts ...request.Option) (*ShutdownGatewayOutput, error) { - req, out := c.ShutdownGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartGateway = "StartGateway" - -// StartGatewayRequest generates a "aws/request.Request" representing the -// client's request for the StartGateway operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartGateway for more information on using the StartGateway -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartGatewayRequest method. -// req, resp := client.StartGatewayRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/StartGateway -func (c *StorageGateway) StartGatewayRequest(input *StartGatewayInput) (req *request.Request, output *StartGatewayOutput) { - op := &request.Operation{ - Name: opStartGateway, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartGatewayInput{} - } - - output = &StartGatewayOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartGateway API operation for AWS Storage Gateway. -// -// Starts a gateway that you previously shut down (see ShutdownGateway). After -// the gateway starts, you can then make other API calls, your applications -// can read from or write to the gateway's storage volumes and you will be able -// to take snapshot backups. -// -// When you make a request, you will get a 200 OK success response immediately. -// However, it might take some time for the gateway to be ready. You should -// call DescribeGatewayInformation and check the status before making any additional -// API calls. For more information, see ActivateGateway. -// -// To specify which gateway to start, use the Amazon Resource Name (ARN) of -// the gateway in your request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation StartGateway for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/StartGateway -func (c *StorageGateway) StartGateway(input *StartGatewayInput) (*StartGatewayOutput, error) { - req, out := c.StartGatewayRequest(input) - return out, req.Send() -} - -// StartGatewayWithContext is the same as StartGateway with the addition of -// the ability to pass a context and additional request options. -// -// See StartGateway for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) StartGatewayWithContext(ctx aws.Context, input *StartGatewayInput, opts ...request.Option) (*StartGatewayOutput, error) { - req, out := c.StartGatewayRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateBandwidthRateLimit = "UpdateBandwidthRateLimit" - -// UpdateBandwidthRateLimitRequest generates a "aws/request.Request" representing the -// client's request for the UpdateBandwidthRateLimit operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateBandwidthRateLimit for more information on using the UpdateBandwidthRateLimit -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateBandwidthRateLimitRequest method. -// req, resp := client.UpdateBandwidthRateLimitRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateBandwidthRateLimit -func (c *StorageGateway) UpdateBandwidthRateLimitRequest(input *UpdateBandwidthRateLimitInput) (req *request.Request, output *UpdateBandwidthRateLimitOutput) { - op := &request.Operation{ - Name: opUpdateBandwidthRateLimit, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateBandwidthRateLimitInput{} - } - - output = &UpdateBandwidthRateLimitOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateBandwidthRateLimit API operation for AWS Storage Gateway. -// -// Updates the bandwidth rate limits of a gateway. You can update both the upload -// and download bandwidth rate limit or specify only one of the two. If you -// don't set a bandwidth rate limit, the existing rate limit remains. -// -// By default, a gateway's bandwidth rate limits are not set. If you don't set -// any limit, the gateway does not have any limitations on its bandwidth usage -// and could potentially use the maximum available bandwidth. -// -// To specify which gateway to update, use the Amazon Resource Name (ARN) of -// the gateway in your request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation UpdateBandwidthRateLimit for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateBandwidthRateLimit -func (c *StorageGateway) UpdateBandwidthRateLimit(input *UpdateBandwidthRateLimitInput) (*UpdateBandwidthRateLimitOutput, error) { - req, out := c.UpdateBandwidthRateLimitRequest(input) - return out, req.Send() -} - -// UpdateBandwidthRateLimitWithContext is the same as UpdateBandwidthRateLimit with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateBandwidthRateLimit for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) UpdateBandwidthRateLimitWithContext(ctx aws.Context, input *UpdateBandwidthRateLimitInput, opts ...request.Option) (*UpdateBandwidthRateLimitOutput, error) { - req, out := c.UpdateBandwidthRateLimitRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateChapCredentials = "UpdateChapCredentials" - -// UpdateChapCredentialsRequest generates a "aws/request.Request" representing the -// client's request for the UpdateChapCredentials operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateChapCredentials for more information on using the UpdateChapCredentials -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateChapCredentialsRequest method. -// req, resp := client.UpdateChapCredentialsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateChapCredentials -func (c *StorageGateway) UpdateChapCredentialsRequest(input *UpdateChapCredentialsInput) (req *request.Request, output *UpdateChapCredentialsOutput) { - op := &request.Operation{ - Name: opUpdateChapCredentials, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateChapCredentialsInput{} - } - - output = &UpdateChapCredentialsOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateChapCredentials API operation for AWS Storage Gateway. -// -// Updates the Challenge-Handshake Authentication Protocol (CHAP) credentials -// for a specified iSCSI target. By default, a gateway does not have CHAP enabled; -// however, for added security, you might use it. -// -// When you update CHAP credentials, all existing connections on the target -// are closed and initiators must reconnect with the new credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation UpdateChapCredentials for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateChapCredentials -func (c *StorageGateway) UpdateChapCredentials(input *UpdateChapCredentialsInput) (*UpdateChapCredentialsOutput, error) { - req, out := c.UpdateChapCredentialsRequest(input) - return out, req.Send() -} - -// UpdateChapCredentialsWithContext is the same as UpdateChapCredentials with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateChapCredentials for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) UpdateChapCredentialsWithContext(ctx aws.Context, input *UpdateChapCredentialsInput, opts ...request.Option) (*UpdateChapCredentialsOutput, error) { - req, out := c.UpdateChapCredentialsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateGatewayInformation = "UpdateGatewayInformation" - -// UpdateGatewayInformationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateGatewayInformation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateGatewayInformation for more information on using the UpdateGatewayInformation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateGatewayInformationRequest method. -// req, resp := client.UpdateGatewayInformationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewayInformation -func (c *StorageGateway) UpdateGatewayInformationRequest(input *UpdateGatewayInformationInput) (req *request.Request, output *UpdateGatewayInformationOutput) { - op := &request.Operation{ - Name: opUpdateGatewayInformation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateGatewayInformationInput{} - } - - output = &UpdateGatewayInformationOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateGatewayInformation API operation for AWS Storage Gateway. -// -// Updates a gateway's metadata, which includes the gateway's name and time -// zone. To specify which gateway to update, use the Amazon Resource Name (ARN) -// of the gateway in your request. -// -// For Gateways activated after September 2, 2015, the gateway's ARN contains -// the gateway ID rather than the gateway name. However, changing the name of -// the gateway has no effect on the gateway's ARN. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation UpdateGatewayInformation for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewayInformation -func (c *StorageGateway) UpdateGatewayInformation(input *UpdateGatewayInformationInput) (*UpdateGatewayInformationOutput, error) { - req, out := c.UpdateGatewayInformationRequest(input) - return out, req.Send() -} - -// UpdateGatewayInformationWithContext is the same as UpdateGatewayInformation with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateGatewayInformation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) UpdateGatewayInformationWithContext(ctx aws.Context, input *UpdateGatewayInformationInput, opts ...request.Option) (*UpdateGatewayInformationOutput, error) { - req, out := c.UpdateGatewayInformationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateGatewaySoftwareNow = "UpdateGatewaySoftwareNow" - -// UpdateGatewaySoftwareNowRequest generates a "aws/request.Request" representing the -// client's request for the UpdateGatewaySoftwareNow operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateGatewaySoftwareNow for more information on using the UpdateGatewaySoftwareNow -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateGatewaySoftwareNowRequest method. -// req, resp := client.UpdateGatewaySoftwareNowRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewaySoftwareNow -func (c *StorageGateway) UpdateGatewaySoftwareNowRequest(input *UpdateGatewaySoftwareNowInput) (req *request.Request, output *UpdateGatewaySoftwareNowOutput) { - op := &request.Operation{ - Name: opUpdateGatewaySoftwareNow, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateGatewaySoftwareNowInput{} - } - - output = &UpdateGatewaySoftwareNowOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateGatewaySoftwareNow API operation for AWS Storage Gateway. -// -// Updates the gateway virtual machine (VM) software. The request immediately -// triggers the software update. -// -// When you make this request, you get a 200 OK success response immediately. -// However, it might take some time for the update to complete. You can call -// DescribeGatewayInformation to verify the gateway is in the STATE_RUNNING -// state. -// -// A software update forces a system restart of your gateway. You can minimize -// the chance of any disruption to your applications by increasing your iSCSI -// Initiators' timeouts. For more information about increasing iSCSI Initiator -// timeouts for Windows and Linux, see Customizing Your Windows iSCSI Settings -// (http://docs.aws.amazon.com/storagegateway/latest/userguide/ConfiguringiSCSIClientInitiatorWindowsClient.html#CustomizeWindowsiSCSISettings) -// and Customizing Your Linux iSCSI Settings (http://docs.aws.amazon.com/storagegateway/latest/userguide/ConfiguringiSCSIClientInitiatorRedHatClient.html#CustomizeLinuxiSCSISettings), -// respectively. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation UpdateGatewaySoftwareNow for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewaySoftwareNow -func (c *StorageGateway) UpdateGatewaySoftwareNow(input *UpdateGatewaySoftwareNowInput) (*UpdateGatewaySoftwareNowOutput, error) { - req, out := c.UpdateGatewaySoftwareNowRequest(input) - return out, req.Send() -} - -// UpdateGatewaySoftwareNowWithContext is the same as UpdateGatewaySoftwareNow with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateGatewaySoftwareNow for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) UpdateGatewaySoftwareNowWithContext(ctx aws.Context, input *UpdateGatewaySoftwareNowInput, opts ...request.Option) (*UpdateGatewaySoftwareNowOutput, error) { - req, out := c.UpdateGatewaySoftwareNowRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateMaintenanceStartTime = "UpdateMaintenanceStartTime" - -// UpdateMaintenanceStartTimeRequest generates a "aws/request.Request" representing the -// client's request for the UpdateMaintenanceStartTime operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateMaintenanceStartTime for more information on using the UpdateMaintenanceStartTime -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateMaintenanceStartTimeRequest method. -// req, resp := client.UpdateMaintenanceStartTimeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateMaintenanceStartTime -func (c *StorageGateway) UpdateMaintenanceStartTimeRequest(input *UpdateMaintenanceStartTimeInput) (req *request.Request, output *UpdateMaintenanceStartTimeOutput) { - op := &request.Operation{ - Name: opUpdateMaintenanceStartTime, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateMaintenanceStartTimeInput{} - } - - output = &UpdateMaintenanceStartTimeOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateMaintenanceStartTime API operation for AWS Storage Gateway. -// -// Updates a gateway's weekly maintenance start time information, including -// day and time of the week. The maintenance time is the time in your gateway's -// time zone. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation UpdateMaintenanceStartTime for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateMaintenanceStartTime -func (c *StorageGateway) UpdateMaintenanceStartTime(input *UpdateMaintenanceStartTimeInput) (*UpdateMaintenanceStartTimeOutput, error) { - req, out := c.UpdateMaintenanceStartTimeRequest(input) - return out, req.Send() -} - -// UpdateMaintenanceStartTimeWithContext is the same as UpdateMaintenanceStartTime with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateMaintenanceStartTime for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) UpdateMaintenanceStartTimeWithContext(ctx aws.Context, input *UpdateMaintenanceStartTimeInput, opts ...request.Option) (*UpdateMaintenanceStartTimeOutput, error) { - req, out := c.UpdateMaintenanceStartTimeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateNFSFileShare = "UpdateNFSFileShare" - -// UpdateNFSFileShareRequest generates a "aws/request.Request" representing the -// client's request for the UpdateNFSFileShare operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateNFSFileShare for more information on using the UpdateNFSFileShare -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateNFSFileShareRequest method. -// req, resp := client.UpdateNFSFileShareRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateNFSFileShare -func (c *StorageGateway) UpdateNFSFileShareRequest(input *UpdateNFSFileShareInput) (req *request.Request, output *UpdateNFSFileShareOutput) { - op := &request.Operation{ - Name: opUpdateNFSFileShare, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateNFSFileShareInput{} - } - - output = &UpdateNFSFileShareOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateNFSFileShare API operation for AWS Storage Gateway. -// -// Updates a Network File System (NFS) file share. This operation is only supported -// in the file gateway type. -// -// To leave a file share field unchanged, set the corresponding input field -// to null. -// -// Updates the following file share setting: -// -// * Default storage class for your S3 bucket -// -// * Metadata defaults for your S3 bucket -// -// * Allowed NFS clients for your file share -// -// * Squash settings -// -// * Write status of your file share -// -// To leave a file share field unchanged, set the corresponding input field -// to null. This operation is only supported in file gateways. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation UpdateNFSFileShare for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateNFSFileShare -func (c *StorageGateway) UpdateNFSFileShare(input *UpdateNFSFileShareInput) (*UpdateNFSFileShareOutput, error) { - req, out := c.UpdateNFSFileShareRequest(input) - return out, req.Send() -} - -// UpdateNFSFileShareWithContext is the same as UpdateNFSFileShare with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateNFSFileShare for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) UpdateNFSFileShareWithContext(ctx aws.Context, input *UpdateNFSFileShareInput, opts ...request.Option) (*UpdateNFSFileShareOutput, error) { - req, out := c.UpdateNFSFileShareRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSMBFileShare = "UpdateSMBFileShare" - -// UpdateSMBFileShareRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSMBFileShare operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSMBFileShare for more information on using the UpdateSMBFileShare -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSMBFileShareRequest method. -// req, resp := client.UpdateSMBFileShareRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSMBFileShare -func (c *StorageGateway) UpdateSMBFileShareRequest(input *UpdateSMBFileShareInput) (req *request.Request, output *UpdateSMBFileShareOutput) { - op := &request.Operation{ - Name: opUpdateSMBFileShare, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSMBFileShareInput{} - } - - output = &UpdateSMBFileShareOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSMBFileShare API operation for AWS Storage Gateway. -// -// Updates a Server Message Block (SMB) file share. -// -// To leave a file share field unchanged, set the corresponding input field -// to null. This operation is only supported for file gateways. -// -// File gateways require AWS Security Token Service (AWS STS) to be activated -// to enable you to create a file share. Make sure that AWS STS is activated -// in the AWS Region you are creating your file gateway in. If AWS STS is not -// activated in this AWS Region, activate it. For information about how to activate -// AWS STS, see Activating and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) -// in the AWS Identity and Access Management User Guide. -// -// File gateways don't support creating hard or symbolic links on a file share. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation UpdateSMBFileShare for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSMBFileShare -func (c *StorageGateway) UpdateSMBFileShare(input *UpdateSMBFileShareInput) (*UpdateSMBFileShareOutput, error) { - req, out := c.UpdateSMBFileShareRequest(input) - return out, req.Send() -} - -// UpdateSMBFileShareWithContext is the same as UpdateSMBFileShare with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSMBFileShare for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) UpdateSMBFileShareWithContext(ctx aws.Context, input *UpdateSMBFileShareInput, opts ...request.Option) (*UpdateSMBFileShareOutput, error) { - req, out := c.UpdateSMBFileShareRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSnapshotSchedule = "UpdateSnapshotSchedule" - -// UpdateSnapshotScheduleRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSnapshotSchedule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSnapshotSchedule for more information on using the UpdateSnapshotSchedule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSnapshotScheduleRequest method. -// req, resp := client.UpdateSnapshotScheduleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSnapshotSchedule -func (c *StorageGateway) UpdateSnapshotScheduleRequest(input *UpdateSnapshotScheduleInput) (req *request.Request, output *UpdateSnapshotScheduleOutput) { - op := &request.Operation{ - Name: opUpdateSnapshotSchedule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSnapshotScheduleInput{} - } - - output = &UpdateSnapshotScheduleOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSnapshotSchedule API operation for AWS Storage Gateway. -// -// Updates a snapshot schedule configured for a gateway volume. This operation -// is only supported in the cached volume and stored volume gateway types. -// -// The default snapshot schedule for volume is once every 24 hours, starting -// at the creation time of the volume. You can use this API to change the snapshot -// schedule configured for the volume. -// -// In the request you must identify the gateway volume whose snapshot schedule -// you want to update, and the schedule information, including when you want -// the snapshot to begin on a day and the frequency (in hours) of snapshots. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation UpdateSnapshotSchedule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSnapshotSchedule -func (c *StorageGateway) UpdateSnapshotSchedule(input *UpdateSnapshotScheduleInput) (*UpdateSnapshotScheduleOutput, error) { - req, out := c.UpdateSnapshotScheduleRequest(input) - return out, req.Send() -} - -// UpdateSnapshotScheduleWithContext is the same as UpdateSnapshotSchedule with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSnapshotSchedule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) UpdateSnapshotScheduleWithContext(ctx aws.Context, input *UpdateSnapshotScheduleInput, opts ...request.Option) (*UpdateSnapshotScheduleOutput, error) { - req, out := c.UpdateSnapshotScheduleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateVTLDeviceType = "UpdateVTLDeviceType" - -// UpdateVTLDeviceTypeRequest generates a "aws/request.Request" representing the -// client's request for the UpdateVTLDeviceType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateVTLDeviceType for more information on using the UpdateVTLDeviceType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateVTLDeviceTypeRequest method. -// req, resp := client.UpdateVTLDeviceTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateVTLDeviceType -func (c *StorageGateway) UpdateVTLDeviceTypeRequest(input *UpdateVTLDeviceTypeInput) (req *request.Request, output *UpdateVTLDeviceTypeOutput) { - op := &request.Operation{ - Name: opUpdateVTLDeviceType, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateVTLDeviceTypeInput{} - } - - output = &UpdateVTLDeviceTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateVTLDeviceType API operation for AWS Storage Gateway. -// -// Updates the type of medium changer in a tape gateway. When you activate a -// tape gateway, you select a medium changer type for the tape gateway. This -// operation enables you to select a different type of medium changer after -// a tape gateway is activated. This operation is only supported in the tape -// gateway type. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Storage Gateway's -// API operation UpdateVTLDeviceType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" -// An exception occurred because an invalid gateway request was issued to the -// service. For more information, see the error and message fields. -// -// * ErrCodeInternalServerError "InternalServerError" -// An internal server error has occurred during the request. For more information, -// see the error and message fields. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateVTLDeviceType -func (c *StorageGateway) UpdateVTLDeviceType(input *UpdateVTLDeviceTypeInput) (*UpdateVTLDeviceTypeOutput, error) { - req, out := c.UpdateVTLDeviceTypeRequest(input) - return out, req.Send() -} - -// UpdateVTLDeviceTypeWithContext is the same as UpdateVTLDeviceType with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateVTLDeviceType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *StorageGateway) UpdateVTLDeviceTypeWithContext(ctx aws.Context, input *UpdateVTLDeviceTypeInput, opts ...request.Option) (*UpdateVTLDeviceTypeOutput, error) { - req, out := c.UpdateVTLDeviceTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// A JSON object containing one or more of the following fields: -// -// * ActivateGatewayInput$ActivationKey -// -// * ActivateGatewayInput$GatewayName -// -// * ActivateGatewayInput$GatewayRegion -// -// * ActivateGatewayInput$GatewayTimezone -// -// * ActivateGatewayInput$GatewayType -// -// * ActivateGatewayInput$TapeDriveType -// -// * ActivateGatewayInput$MediumChangerType -type ActivateGatewayInput struct { - _ struct{} `type:"structure"` - - // Your gateway activation key. You can obtain the activation key by sending - // an HTTP GET request with redirects enabled to the gateway IP address (port - // 80). The redirect URL returned in the response provides you the activation - // key for your gateway in the query string parameter activationKey. It may - // also include other activation-related parameters, however, these are merely - // defaults -- the arguments you pass to the ActivateGateway API call determine - // the actual configuration of your gateway. - // - // For more information, see https://docs.aws.amazon.com/storagegateway/latest/userguide/get-activation-key.html - // in the Storage Gateway User Guide. - // - // ActivationKey is a required field - ActivationKey *string `min:"1" type:"string" required:"true"` - - // The name you configured for your gateway. - // - // GatewayName is a required field - GatewayName *string `min:"2" type:"string" required:"true"` - - // A value that indicates the region where you want to store your data. The - // gateway region specified must be the same region as the region in your Host - // header in the request. For more information about available regions and endpoints - // for AWS Storage Gateway, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#sg_region) - // in the Amazon Web Services Glossary. - // - // Valid Values: "us-east-1", "us-east-2", "us-west-1", "us-west-2", "ca-central-1", - // "eu-west-1", "eu-central-1", "eu-west-2", "eu-west-3", "ap-northeast-1", - // "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-south-1", "sa-east-1" - // - // GatewayRegion is a required field - GatewayRegion *string `min:"1" type:"string" required:"true"` - - // A value that indicates the time zone you want to set for the gateway. The - // time zone is of the format "GMT-hr:mm" or "GMT+hr:mm". For example, GMT-4:00 - // indicates the time is 4 hours behind GMT. GMT+2:00 indicates the time is - // 2 hours ahead of GMT. The time zone is used, for example, for scheduling - // snapshots and your gateway's maintenance schedule. - // - // GatewayTimezone is a required field - GatewayTimezone *string `min:"3" type:"string" required:"true"` - - // A value that defines the type of gateway to activate. The type specified - // is critical to all later functions of the gateway and cannot be changed after - // activation. The default value is CACHED. - // - // Valid Values: "STORED", "CACHED", "VTL", "FILE_S3" - GatewayType *string `min:"2" type:"string"` - - // The value that indicates the type of medium changer to use for tape gateway. - // This field is optional. - // - // Valid Values: "STK-L700", "AWS-Gateway-VTL" - MediumChangerType *string `min:"2" type:"string"` - - // The value that indicates the type of tape drive to use for tape gateway. - // This field is optional. - // - // Valid Values: "IBM-ULT3580-TD5" - TapeDriveType *string `min:"2" type:"string"` -} - -// String returns the string representation -func (s ActivateGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivateGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ActivateGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ActivateGatewayInput"} - if s.ActivationKey == nil { - invalidParams.Add(request.NewErrParamRequired("ActivationKey")) - } - if s.ActivationKey != nil && len(*s.ActivationKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ActivationKey", 1)) - } - if s.GatewayName == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayName")) - } - if s.GatewayName != nil && len(*s.GatewayName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("GatewayName", 2)) - } - if s.GatewayRegion == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayRegion")) - } - if s.GatewayRegion != nil && len(*s.GatewayRegion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GatewayRegion", 1)) - } - if s.GatewayTimezone == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayTimezone")) - } - if s.GatewayTimezone != nil && len(*s.GatewayTimezone) < 3 { - invalidParams.Add(request.NewErrParamMinLen("GatewayTimezone", 3)) - } - if s.GatewayType != nil && len(*s.GatewayType) < 2 { - invalidParams.Add(request.NewErrParamMinLen("GatewayType", 2)) - } - if s.MediumChangerType != nil && len(*s.MediumChangerType) < 2 { - invalidParams.Add(request.NewErrParamMinLen("MediumChangerType", 2)) - } - if s.TapeDriveType != nil && len(*s.TapeDriveType) < 2 { - invalidParams.Add(request.NewErrParamMinLen("TapeDriveType", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivationKey sets the ActivationKey field's value. -func (s *ActivateGatewayInput) SetActivationKey(v string) *ActivateGatewayInput { - s.ActivationKey = &v - return s -} - -// SetGatewayName sets the GatewayName field's value. -func (s *ActivateGatewayInput) SetGatewayName(v string) *ActivateGatewayInput { - s.GatewayName = &v - return s -} - -// SetGatewayRegion sets the GatewayRegion field's value. -func (s *ActivateGatewayInput) SetGatewayRegion(v string) *ActivateGatewayInput { - s.GatewayRegion = &v - return s -} - -// SetGatewayTimezone sets the GatewayTimezone field's value. -func (s *ActivateGatewayInput) SetGatewayTimezone(v string) *ActivateGatewayInput { - s.GatewayTimezone = &v - return s -} - -// SetGatewayType sets the GatewayType field's value. -func (s *ActivateGatewayInput) SetGatewayType(v string) *ActivateGatewayInput { - s.GatewayType = &v - return s -} - -// SetMediumChangerType sets the MediumChangerType field's value. -func (s *ActivateGatewayInput) SetMediumChangerType(v string) *ActivateGatewayInput { - s.MediumChangerType = &v - return s -} - -// SetTapeDriveType sets the TapeDriveType field's value. -func (s *ActivateGatewayInput) SetTapeDriveType(v string) *ActivateGatewayInput { - s.TapeDriveType = &v - return s -} - -// AWS Storage Gateway returns the Amazon Resource Name (ARN) of the activated -// gateway. It is a string made of information such as your account, gateway -// name, and region. This ARN is used to reference the gateway in other API -// operations as well as resource-based authorization. -// -// For gateways activated prior to September 02, 2015, the gateway ARN contains -// the gateway name rather than the gateway ID. Changing the name of the gateway -// has no effect on the gateway ARN. -type ActivateGatewayOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s ActivateGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivateGatewayOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *ActivateGatewayOutput) SetGatewayARN(v string) *ActivateGatewayOutput { - s.GatewayARN = &v - return s -} - -type AddCacheInput struct { - _ struct{} `type:"structure"` - - // DiskIds is a required field - DiskIds []*string `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s AddCacheInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddCacheInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddCacheInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddCacheInput"} - if s.DiskIds == nil { - invalidParams.Add(request.NewErrParamRequired("DiskIds")) - } - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskIds sets the DiskIds field's value. -func (s *AddCacheInput) SetDiskIds(v []*string) *AddCacheInput { - s.DiskIds = v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *AddCacheInput) SetGatewayARN(v string) *AddCacheInput { - s.GatewayARN = &v - return s -} - -type AddCacheOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s AddCacheOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddCacheOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *AddCacheOutput) SetGatewayARN(v string) *AddCacheOutput { - s.GatewayARN = &v - return s -} - -// AddTagsToResourceInput -type AddTagsToResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource you want to add tags to. - // - // ResourceARN is a required field - ResourceARN *string `min:"50" type:"string" required:"true"` - - // The key-value pair that represents the tag you want to add to the resource. - // The value can be an empty string. - // - // Valid characters for key and value are letters, spaces, and numbers representable - // in UTF-8 format, and the following special characters: + - = . _ : / @. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s AddTagsToResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsToResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} - if s.ResourceARN == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceARN")) - } - if s.ResourceARN != nil && len(*s.ResourceARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 50)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *AddTagsToResourceInput) SetResourceARN(v string) *AddTagsToResourceInput { - s.ResourceARN = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { - s.Tags = v - return s -} - -// AddTagsToResourceOutput -type AddTagsToResourceOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource you want to add tags to. - ResourceARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s AddTagsToResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddTagsToResourceOutput) GoString() string { - return s.String() -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *AddTagsToResourceOutput) SetResourceARN(v string) *AddTagsToResourceOutput { - s.ResourceARN = &v - return s -} - -type AddUploadBufferInput struct { - _ struct{} `type:"structure"` - - // DiskIds is a required field - DiskIds []*string `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s AddUploadBufferInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddUploadBufferInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddUploadBufferInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddUploadBufferInput"} - if s.DiskIds == nil { - invalidParams.Add(request.NewErrParamRequired("DiskIds")) - } - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskIds sets the DiskIds field's value. -func (s *AddUploadBufferInput) SetDiskIds(v []*string) *AddUploadBufferInput { - s.DiskIds = v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *AddUploadBufferInput) SetGatewayARN(v string) *AddUploadBufferInput { - s.GatewayARN = &v - return s -} - -type AddUploadBufferOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s AddUploadBufferOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddUploadBufferOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *AddUploadBufferOutput) SetGatewayARN(v string) *AddUploadBufferOutput { - s.GatewayARN = &v - return s -} - -// A JSON object containing one or more of the following fields: -// -// * AddWorkingStorageInput$DiskIds -type AddWorkingStorageInput struct { - _ struct{} `type:"structure"` - - // An array of strings that identify disks that are to be configured as working - // storage. Each string have a minimum length of 1 and maximum length of 300. - // You can get the disk IDs from the ListLocalDisks API. - // - // DiskIds is a required field - DiskIds []*string `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s AddWorkingStorageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddWorkingStorageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddWorkingStorageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddWorkingStorageInput"} - if s.DiskIds == nil { - invalidParams.Add(request.NewErrParamRequired("DiskIds")) - } - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskIds sets the DiskIds field's value. -func (s *AddWorkingStorageInput) SetDiskIds(v []*string) *AddWorkingStorageInput { - s.DiskIds = v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *AddWorkingStorageInput) SetGatewayARN(v string) *AddWorkingStorageInput { - s.GatewayARN = &v - return s -} - -// A JSON object containing the of the gateway for which working storage was -// configured. -type AddWorkingStorageOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s AddWorkingStorageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AddWorkingStorageOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *AddWorkingStorageOutput) SetGatewayARN(v string) *AddWorkingStorageOutput { - s.GatewayARN = &v - return s -} - -// AttachVolumeInput -type AttachVolumeInput struct { - _ struct{} `type:"structure"` - - // The unique device ID or other distinguishing data that identifies the local - // disk used to create the volume. This value is only required when you are - // attaching a stored volume. - DiskId *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the gateway that you want to attach the - // volume to. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // The network interface of the gateway on which to expose the iSCSI target. - // Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a - // list of the network interfaces available on a gateway. - // - // Valid Values: A valid IP address. - // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `type:"string" required:"true"` - - // The name of the iSCSI target used by an initiator to connect to a volume - // and used as a suffix for the target ARN. For example, specifying TargetName - // as myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. - // The target name must be unique across all volumes on a gateway. - // - // If you don't specify a value, Storage Gateway uses the value that was previously - // used for this volume as the new target name. - TargetName *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the volume to attach to the specified gateway. - // - // VolumeARN is a required field - VolumeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s AttachVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachVolumeInput"} - if s.DiskId != nil && len(*s.DiskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DiskId", 1)) - } - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - if s.TargetName != nil && len(*s.TargetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetName", 1)) - } - if s.VolumeARN == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeARN")) - } - if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskId sets the DiskId field's value. -func (s *AttachVolumeInput) SetDiskId(v string) *AttachVolumeInput { - s.DiskId = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *AttachVolumeInput) SetGatewayARN(v string) *AttachVolumeInput { - s.GatewayARN = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *AttachVolumeInput) SetNetworkInterfaceId(v string) *AttachVolumeInput { - s.NetworkInterfaceId = &v - return s -} - -// SetTargetName sets the TargetName field's value. -func (s *AttachVolumeInput) SetTargetName(v string) *AttachVolumeInput { - s.TargetName = &v - return s -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *AttachVolumeInput) SetVolumeARN(v string) *AttachVolumeInput { - s.VolumeARN = &v - return s -} - -// AttachVolumeOutput -type AttachVolumeOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the volume target, which includes the iSCSI - // name for the initiator that was used to connect to the target. - TargetARN *string `min:"50" type:"string"` - - // The Amazon Resource Name (ARN) of the volume that was attached to the gateway. - VolumeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s AttachVolumeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AttachVolumeOutput) GoString() string { - return s.String() -} - -// SetTargetARN sets the TargetARN field's value. -func (s *AttachVolumeOutput) SetTargetARN(v string) *AttachVolumeOutput { - s.TargetARN = &v - return s -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *AttachVolumeOutput) SetVolumeARN(v string) *AttachVolumeOutput { - s.VolumeARN = &v - return s -} - -// Describes an iSCSI cached volume. -type CachediSCSIVolume struct { - _ struct{} `type:"structure"` - - // The date the volume was created. Volumes created prior to March 28, 2017 - // don’t have this time stamp. - CreatedDate *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. - KMSKey *string `min:"20" type:"string"` - - // If the cached volume was created from a snapshot, this field contains the - // snapshot ID used, e.g. snap-78e22663. Otherwise, this field is not included. - SourceSnapshotId *string `type:"string"` - - // The name of the iSCSI target that is used by an initiator to connect to a - // volume and used as a suffix for the target ARN. For example, specifying TargetName - // as myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. - TargetName *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the storage volume. - VolumeARN *string `min:"50" type:"string"` - - // A value that indicates whether a storage volume is attached to or detached - // from a gateway. - VolumeAttachmentStatus *string `min:"3" type:"string"` - - // The unique identifier of the volume, e.g. vol-AE4B946D. - VolumeId *string `min:"12" type:"string"` - - // Represents the percentage complete if the volume is restoring or bootstrapping - // that represents the percent of data transferred. This field does not appear - // in the response if the cached volume is not restoring or bootstrapping. - VolumeProgress *float64 `type:"double"` - - // The size, in bytes, of the volume capacity. - VolumeSizeInBytes *int64 `type:"long"` - - // One of the VolumeStatus values that indicates the state of the storage volume. - VolumeStatus *string `min:"3" type:"string"` - - // One of the VolumeType enumeration values that describes the type of the volume. - VolumeType *string `min:"3" type:"string"` - - // The size of the data stored on the volume in bytes. - // - // This value is not available for volumes created prior to May 13, 2015, until - // you store data on the volume. - VolumeUsedInBytes *int64 `type:"long"` - - // An VolumeiSCSIAttributes object that represents a collection of iSCSI attributes - // for one stored volume. - VolumeiSCSIAttributes *VolumeiSCSIAttributes `type:"structure"` -} - -// String returns the string representation -func (s CachediSCSIVolume) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CachediSCSIVolume) GoString() string { - return s.String() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *CachediSCSIVolume) SetCreatedDate(v time.Time) *CachediSCSIVolume { - s.CreatedDate = &v - return s -} - -// SetKMSKey sets the KMSKey field's value. -func (s *CachediSCSIVolume) SetKMSKey(v string) *CachediSCSIVolume { - s.KMSKey = &v - return s -} - -// SetSourceSnapshotId sets the SourceSnapshotId field's value. -func (s *CachediSCSIVolume) SetSourceSnapshotId(v string) *CachediSCSIVolume { - s.SourceSnapshotId = &v - return s -} - -// SetTargetName sets the TargetName field's value. -func (s *CachediSCSIVolume) SetTargetName(v string) *CachediSCSIVolume { - s.TargetName = &v - return s -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *CachediSCSIVolume) SetVolumeARN(v string) *CachediSCSIVolume { - s.VolumeARN = &v - return s -} - -// SetVolumeAttachmentStatus sets the VolumeAttachmentStatus field's value. -func (s *CachediSCSIVolume) SetVolumeAttachmentStatus(v string) *CachediSCSIVolume { - s.VolumeAttachmentStatus = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *CachediSCSIVolume) SetVolumeId(v string) *CachediSCSIVolume { - s.VolumeId = &v - return s -} - -// SetVolumeProgress sets the VolumeProgress field's value. -func (s *CachediSCSIVolume) SetVolumeProgress(v float64) *CachediSCSIVolume { - s.VolumeProgress = &v - return s -} - -// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. -func (s *CachediSCSIVolume) SetVolumeSizeInBytes(v int64) *CachediSCSIVolume { - s.VolumeSizeInBytes = &v - return s -} - -// SetVolumeStatus sets the VolumeStatus field's value. -func (s *CachediSCSIVolume) SetVolumeStatus(v string) *CachediSCSIVolume { - s.VolumeStatus = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *CachediSCSIVolume) SetVolumeType(v string) *CachediSCSIVolume { - s.VolumeType = &v - return s -} - -// SetVolumeUsedInBytes sets the VolumeUsedInBytes field's value. -func (s *CachediSCSIVolume) SetVolumeUsedInBytes(v int64) *CachediSCSIVolume { - s.VolumeUsedInBytes = &v - return s -} - -// SetVolumeiSCSIAttributes sets the VolumeiSCSIAttributes field's value. -func (s *CachediSCSIVolume) SetVolumeiSCSIAttributes(v *VolumeiSCSIAttributes) *CachediSCSIVolume { - s.VolumeiSCSIAttributes = v - return s -} - -// CancelArchivalInput -type CancelArchivalInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the virtual tape you want to cancel archiving - // for. - // - // TapeARN is a required field - TapeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelArchivalInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelArchivalInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelArchivalInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelArchivalInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.TapeARN == nil { - invalidParams.Add(request.NewErrParamRequired("TapeARN")) - } - if s.TapeARN != nil && len(*s.TapeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *CancelArchivalInput) SetGatewayARN(v string) *CancelArchivalInput { - s.GatewayARN = &v - return s -} - -// SetTapeARN sets the TapeARN field's value. -func (s *CancelArchivalInput) SetTapeARN(v string) *CancelArchivalInput { - s.TapeARN = &v - return s -} - -// CancelArchivalOutput -type CancelArchivalOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the virtual tape for which archiving was - // canceled. - TapeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s CancelArchivalOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelArchivalOutput) GoString() string { - return s.String() -} - -// SetTapeARN sets the TapeARN field's value. -func (s *CancelArchivalOutput) SetTapeARN(v string) *CancelArchivalOutput { - s.TapeARN = &v - return s -} - -// CancelRetrievalInput -type CancelRetrievalInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the virtual tape you want to cancel retrieval - // for. - // - // TapeARN is a required field - TapeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelRetrievalInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelRetrievalInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelRetrievalInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelRetrievalInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.TapeARN == nil { - invalidParams.Add(request.NewErrParamRequired("TapeARN")) - } - if s.TapeARN != nil && len(*s.TapeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *CancelRetrievalInput) SetGatewayARN(v string) *CancelRetrievalInput { - s.GatewayARN = &v - return s -} - -// SetTapeARN sets the TapeARN field's value. -func (s *CancelRetrievalInput) SetTapeARN(v string) *CancelRetrievalInput { - s.TapeARN = &v - return s -} - -// CancelRetrievalOutput -type CancelRetrievalOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the virtual tape for which retrieval was - // canceled. - TapeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s CancelRetrievalOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelRetrievalOutput) GoString() string { - return s.String() -} - -// SetTapeARN sets the TapeARN field's value. -func (s *CancelRetrievalOutput) SetTapeARN(v string) *CancelRetrievalOutput { - s.TapeARN = &v - return s -} - -// Describes Challenge-Handshake Authentication Protocol (CHAP) information -// that supports authentication between your gateway and iSCSI initiators. -type ChapInfo struct { - _ struct{} `type:"structure"` - - // The iSCSI initiator that connects to the target. - InitiatorName *string `min:"1" type:"string"` - - // The secret key that the initiator (for example, the Windows client) must - // provide to participate in mutual CHAP with the target. - SecretToAuthenticateInitiator *string `min:"1" type:"string"` - - // The secret key that the target must provide to participate in mutual CHAP - // with the initiator (e.g. Windows client). - SecretToAuthenticateTarget *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the volume. - // - // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens - // (-). - TargetARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s ChapInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChapInfo) GoString() string { - return s.String() -} - -// SetInitiatorName sets the InitiatorName field's value. -func (s *ChapInfo) SetInitiatorName(v string) *ChapInfo { - s.InitiatorName = &v - return s -} - -// SetSecretToAuthenticateInitiator sets the SecretToAuthenticateInitiator field's value. -func (s *ChapInfo) SetSecretToAuthenticateInitiator(v string) *ChapInfo { - s.SecretToAuthenticateInitiator = &v - return s -} - -// SetSecretToAuthenticateTarget sets the SecretToAuthenticateTarget field's value. -func (s *ChapInfo) SetSecretToAuthenticateTarget(v string) *ChapInfo { - s.SecretToAuthenticateTarget = &v - return s -} - -// SetTargetARN sets the TargetARN field's value. -func (s *ChapInfo) SetTargetARN(v string) *ChapInfo { - s.TargetARN = &v - return s -} - -type CreateCachediSCSIVolumeInput struct { - _ struct{} `type:"structure"` - - // A unique identifier that you use to retry a request. If you retry a request, - // use the same ClientToken you specified in the initial request. - // - // ClientToken is a required field - ClientToken *string `min:"5" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // True to use Amazon S3 server side encryption with your own AWS KMS key, or - // false to use a key managed by Amazon S3. Optional. - KMSEncrypted *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. - KMSKey *string `min:"20" type:"string"` - - // The network interface of the gateway on which to expose the iSCSI target. - // Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a - // list of the network interfaces available on a gateway. - // - // Valid Values: A valid IP address. - // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `type:"string" required:"true"` - - // The snapshot ID (e.g. "snap-1122aabb") of the snapshot to restore as the - // new cached volume. Specify this field if you want to create the iSCSI storage - // volume from a snapshot otherwise do not include this field. To list snapshots - // for your account use DescribeSnapshots (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html) - // in the Amazon Elastic Compute Cloud API Reference. - SnapshotId *string `type:"string"` - - // The ARN for an existing volume. Specifying this ARN makes the new volume - // into an exact copy of the specified existing volume's latest recovery point. - // The VolumeSizeInBytes value for this new volume must be equal to or larger - // than the size of the existing volume, in bytes. - SourceVolumeARN *string `min:"50" type:"string"` - - // The name of the iSCSI target used by initiators to connect to the target - // and as a suffix for the target ARN. For example, specifying TargetName as - // myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. - // The target name must be unique across all volumes of a gateway. - // - // TargetName is a required field - TargetName *string `min:"1" type:"string" required:"true"` - - // The size of the volume in bytes. - // - // VolumeSizeInBytes is a required field - VolumeSizeInBytes *int64 `type:"long" required:"true"` -} - -// String returns the string representation -func (s CreateCachediSCSIVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCachediSCSIVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCachediSCSIVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCachediSCSIVolumeInput"} - if s.ClientToken == nil { - invalidParams.Add(request.NewErrParamRequired("ClientToken")) - } - if s.ClientToken != nil && len(*s.ClientToken) < 5 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 5)) - } - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.KMSKey != nil && len(*s.KMSKey) < 20 { - invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) - } - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - if s.SourceVolumeARN != nil && len(*s.SourceVolumeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("SourceVolumeARN", 50)) - } - if s.TargetName == nil { - invalidParams.Add(request.NewErrParamRequired("TargetName")) - } - if s.TargetName != nil && len(*s.TargetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetName", 1)) - } - if s.VolumeSizeInBytes == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeSizeInBytes")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateCachediSCSIVolumeInput) SetClientToken(v string) *CreateCachediSCSIVolumeInput { - s.ClientToken = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *CreateCachediSCSIVolumeInput) SetGatewayARN(v string) *CreateCachediSCSIVolumeInput { - s.GatewayARN = &v - return s -} - -// SetKMSEncrypted sets the KMSEncrypted field's value. -func (s *CreateCachediSCSIVolumeInput) SetKMSEncrypted(v bool) *CreateCachediSCSIVolumeInput { - s.KMSEncrypted = &v - return s -} - -// SetKMSKey sets the KMSKey field's value. -func (s *CreateCachediSCSIVolumeInput) SetKMSKey(v string) *CreateCachediSCSIVolumeInput { - s.KMSKey = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *CreateCachediSCSIVolumeInput) SetNetworkInterfaceId(v string) *CreateCachediSCSIVolumeInput { - s.NetworkInterfaceId = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *CreateCachediSCSIVolumeInput) SetSnapshotId(v string) *CreateCachediSCSIVolumeInput { - s.SnapshotId = &v - return s -} - -// SetSourceVolumeARN sets the SourceVolumeARN field's value. -func (s *CreateCachediSCSIVolumeInput) SetSourceVolumeARN(v string) *CreateCachediSCSIVolumeInput { - s.SourceVolumeARN = &v - return s -} - -// SetTargetName sets the TargetName field's value. -func (s *CreateCachediSCSIVolumeInput) SetTargetName(v string) *CreateCachediSCSIVolumeInput { - s.TargetName = &v - return s -} - -// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. -func (s *CreateCachediSCSIVolumeInput) SetVolumeSizeInBytes(v int64) *CreateCachediSCSIVolumeInput { - s.VolumeSizeInBytes = &v - return s -} - -type CreateCachediSCSIVolumeOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the volume target, which includes the iSCSI - // name that initiators can use to connect to the target. - TargetARN *string `min:"50" type:"string"` - - // The Amazon Resource Name (ARN) of the configured volume. - VolumeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s CreateCachediSCSIVolumeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCachediSCSIVolumeOutput) GoString() string { - return s.String() -} - -// SetTargetARN sets the TargetARN field's value. -func (s *CreateCachediSCSIVolumeOutput) SetTargetARN(v string) *CreateCachediSCSIVolumeOutput { - s.TargetARN = &v - return s -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *CreateCachediSCSIVolumeOutput) SetVolumeARN(v string) *CreateCachediSCSIVolumeOutput { - s.VolumeARN = &v - return s -} - -// CreateNFSFileShareInput -type CreateNFSFileShareInput struct { - _ struct{} `type:"structure"` - - // The list of clients that are allowed to access the file gateway. The list - // must contain either valid IP addresses or valid CIDR blocks. - ClientList []*string `min:"1" type:"list"` - - // A unique string value that you supply that is used by file gateway to ensure - // idempotent file share creation. - // - // ClientToken is a required field - ClientToken *string `min:"5" type:"string" required:"true"` - - // The default storage class for objects put into an Amazon S3 bucket by the - // file gateway. Possible values are S3_STANDARD, S3_STANDARD_IA, or S3_ONEZONE_IA. - // If this field is not populated, the default value S3_STANDARD is used. Optional. - DefaultStorageClass *string `min:"5" type:"string"` - - // The Amazon Resource Name (ARN) of the file gateway on which you want to create - // a file share. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // A value that enables guessing of the MIME type for uploaded objects based - // on file extensions. Set this value to true to enable MIME type guessing, - // and otherwise to false. The default value is true. - GuessMIMETypeEnabled *bool `type:"boolean"` - - // True to use Amazon S3 server side encryption with your own AWS KMS key, or - // false to use a key managed by Amazon S3. Optional. - KMSEncrypted *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) AWS KMS key used for Amazon S3 server side - // encryption. This value can only be set when KMSEncrypted is true. Optional. - KMSKey *string `min:"20" type:"string"` - - // The ARN of the backed storage used for storing file data. - // - // LocationARN is a required field - LocationARN *string `min:"16" type:"string" required:"true"` - - // File share default values. Optional. - NFSFileShareDefaults *NFSFileShareDefaults `type:"structure"` - - // A value that sets the access control list permission for objects in the S3 - // bucket that a file gateway puts objects into. The default value is "private". - ObjectACL *string `type:"string" enum:"ObjectACL"` - - // A value that sets the write status of a file share. This value is true if - // the write status is read-only, and otherwise false. - ReadOnly *bool `type:"boolean"` - - // A value that sets the access control list permission for objects in the Amazon - // S3 bucket that a file gateway puts objects into. The default value is private. - RequesterPays *bool `type:"boolean"` - - // The ARN of the AWS Identity and Access Management (IAM) role that a file - // gateway assumes when it accesses the underlying storage. - // - // Role is a required field - Role *string `min:"20" type:"string" required:"true"` - - // Maps a user to anonymous user. Valid options are the following: - // - // * RootSquash - Only root is mapped to anonymous user. - // - // * NoSquash - No one is mapped to anonymous user - // - // * AllSquash - Everyone is mapped to anonymous user. - Squash *string `min:"5" type:"string"` -} - -// String returns the string representation -func (s CreateNFSFileShareInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNFSFileShareInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNFSFileShareInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNFSFileShareInput"} - if s.ClientList != nil && len(s.ClientList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientList", 1)) - } - if s.ClientToken == nil { - invalidParams.Add(request.NewErrParamRequired("ClientToken")) - } - if s.ClientToken != nil && len(*s.ClientToken) < 5 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 5)) - } - if s.DefaultStorageClass != nil && len(*s.DefaultStorageClass) < 5 { - invalidParams.Add(request.NewErrParamMinLen("DefaultStorageClass", 5)) - } - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.KMSKey != nil && len(*s.KMSKey) < 20 { - invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) - } - if s.LocationARN == nil { - invalidParams.Add(request.NewErrParamRequired("LocationARN")) - } - if s.LocationARN != nil && len(*s.LocationARN) < 16 { - invalidParams.Add(request.NewErrParamMinLen("LocationARN", 16)) - } - if s.Role == nil { - invalidParams.Add(request.NewErrParamRequired("Role")) - } - if s.Role != nil && len(*s.Role) < 20 { - invalidParams.Add(request.NewErrParamMinLen("Role", 20)) - } - if s.Squash != nil && len(*s.Squash) < 5 { - invalidParams.Add(request.NewErrParamMinLen("Squash", 5)) - } - if s.NFSFileShareDefaults != nil { - if err := s.NFSFileShareDefaults.Validate(); err != nil { - invalidParams.AddNested("NFSFileShareDefaults", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientList sets the ClientList field's value. -func (s *CreateNFSFileShareInput) SetClientList(v []*string) *CreateNFSFileShareInput { - s.ClientList = v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateNFSFileShareInput) SetClientToken(v string) *CreateNFSFileShareInput { - s.ClientToken = &v - return s -} - -// SetDefaultStorageClass sets the DefaultStorageClass field's value. -func (s *CreateNFSFileShareInput) SetDefaultStorageClass(v string) *CreateNFSFileShareInput { - s.DefaultStorageClass = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *CreateNFSFileShareInput) SetGatewayARN(v string) *CreateNFSFileShareInput { - s.GatewayARN = &v - return s -} - -// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. -func (s *CreateNFSFileShareInput) SetGuessMIMETypeEnabled(v bool) *CreateNFSFileShareInput { - s.GuessMIMETypeEnabled = &v - return s -} - -// SetKMSEncrypted sets the KMSEncrypted field's value. -func (s *CreateNFSFileShareInput) SetKMSEncrypted(v bool) *CreateNFSFileShareInput { - s.KMSEncrypted = &v - return s -} - -// SetKMSKey sets the KMSKey field's value. -func (s *CreateNFSFileShareInput) SetKMSKey(v string) *CreateNFSFileShareInput { - s.KMSKey = &v - return s -} - -// SetLocationARN sets the LocationARN field's value. -func (s *CreateNFSFileShareInput) SetLocationARN(v string) *CreateNFSFileShareInput { - s.LocationARN = &v - return s -} - -// SetNFSFileShareDefaults sets the NFSFileShareDefaults field's value. -func (s *CreateNFSFileShareInput) SetNFSFileShareDefaults(v *NFSFileShareDefaults) *CreateNFSFileShareInput { - s.NFSFileShareDefaults = v - return s -} - -// SetObjectACL sets the ObjectACL field's value. -func (s *CreateNFSFileShareInput) SetObjectACL(v string) *CreateNFSFileShareInput { - s.ObjectACL = &v - return s -} - -// SetReadOnly sets the ReadOnly field's value. -func (s *CreateNFSFileShareInput) SetReadOnly(v bool) *CreateNFSFileShareInput { - s.ReadOnly = &v - return s -} - -// SetRequesterPays sets the RequesterPays field's value. -func (s *CreateNFSFileShareInput) SetRequesterPays(v bool) *CreateNFSFileShareInput { - s.RequesterPays = &v - return s -} - -// SetRole sets the Role field's value. -func (s *CreateNFSFileShareInput) SetRole(v string) *CreateNFSFileShareInput { - s.Role = &v - return s -} - -// SetSquash sets the Squash field's value. -func (s *CreateNFSFileShareInput) SetSquash(v string) *CreateNFSFileShareInput { - s.Squash = &v - return s -} - -// CreateNFSFileShareOutput -type CreateNFSFileShareOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the newly created file share. - FileShareARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s CreateNFSFileShareOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateNFSFileShareOutput) GoString() string { - return s.String() -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *CreateNFSFileShareOutput) SetFileShareARN(v string) *CreateNFSFileShareOutput { - s.FileShareARN = &v - return s -} - -// CreateSMBFileShareInput -type CreateSMBFileShareInput struct { - _ struct{} `type:"structure"` - - // The authentication method that users use to access the file share. - // - // Valid values are ActiveDirectory or GuestAccess. The default is ActiveDirectory. - Authentication *string `min:"5" type:"string"` - - // A unique string value that you supply that is used by file gateway to ensure - // idempotent file share creation. - // - // ClientToken is a required field - ClientToken *string `min:"5" type:"string" required:"true"` - - // The default storage class for objects put into an Amazon S3 bucket by the - // file gateway. Possible values are S3_STANDARD, S3_STANDARD_IA, or S3_ONEZONE_IA. - // If this field is not populated, the default value S3_STANDARD is used. Optional. - DefaultStorageClass *string `min:"5" type:"string"` - - // The Amazon Resource Name (ARN) of the file gateway on which you want to create - // a file share. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // A value that enables guessing of the MIME type for uploaded objects based - // on file extensions. Set this value to true to enable MIME type guessing, - // and otherwise to false. The default value is true. - GuessMIMETypeEnabled *bool `type:"boolean"` - - // A list of users or groups in the Active Directory that are not allowed to - // access the file share. A group must be prefixed with the @ character. For - // example @group1. Can only be set if Authentication is set to ActiveDirectory. - InvalidUserList []*string `type:"list"` - - // True to use Amazon S3 server side encryption with your own AWS KMS key, or - // false to use a key managed by Amazon S3. Optional. - KMSEncrypted *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. - KMSKey *string `min:"20" type:"string"` - - // The ARN of the backed storage used for storing file data. - // - // LocationARN is a required field - LocationARN *string `min:"16" type:"string" required:"true"` - - // A value that sets the access control list permission for objects in the S3 - // bucket that a file gateway puts objects into. The default value is "private". - ObjectACL *string `type:"string" enum:"ObjectACL"` - - // A value that sets the write status of a file share. This value is true if - // the write status is read-only, and otherwise false. - ReadOnly *bool `type:"boolean"` - - // A value that sets the access control list permission for objects in the Amazon - // S3 bucket that a file gateway puts objects into. The default value is private. - RequesterPays *bool `type:"boolean"` - - // The ARN of the AWS Identity and Access Management (IAM) role that a file - // gateway assumes when it accesses the underlying storage. - // - // Role is a required field - Role *string `min:"20" type:"string" required:"true"` - - // A list of users or groups in the Active Directory that are allowed to access - // the file share. A group must be prefixed with the @ character. For example - // @group1. Can only be set if Authentication is set to ActiveDirectory. - ValidUserList []*string `type:"list"` -} - -// String returns the string representation -func (s CreateSMBFileShareInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSMBFileShareInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSMBFileShareInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSMBFileShareInput"} - if s.Authentication != nil && len(*s.Authentication) < 5 { - invalidParams.Add(request.NewErrParamMinLen("Authentication", 5)) - } - if s.ClientToken == nil { - invalidParams.Add(request.NewErrParamRequired("ClientToken")) - } - if s.ClientToken != nil && len(*s.ClientToken) < 5 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 5)) - } - if s.DefaultStorageClass != nil && len(*s.DefaultStorageClass) < 5 { - invalidParams.Add(request.NewErrParamMinLen("DefaultStorageClass", 5)) - } - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.KMSKey != nil && len(*s.KMSKey) < 20 { - invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) - } - if s.LocationARN == nil { - invalidParams.Add(request.NewErrParamRequired("LocationARN")) - } - if s.LocationARN != nil && len(*s.LocationARN) < 16 { - invalidParams.Add(request.NewErrParamMinLen("LocationARN", 16)) - } - if s.Role == nil { - invalidParams.Add(request.NewErrParamRequired("Role")) - } - if s.Role != nil && len(*s.Role) < 20 { - invalidParams.Add(request.NewErrParamMinLen("Role", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthentication sets the Authentication field's value. -func (s *CreateSMBFileShareInput) SetAuthentication(v string) *CreateSMBFileShareInput { - s.Authentication = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateSMBFileShareInput) SetClientToken(v string) *CreateSMBFileShareInput { - s.ClientToken = &v - return s -} - -// SetDefaultStorageClass sets the DefaultStorageClass field's value. -func (s *CreateSMBFileShareInput) SetDefaultStorageClass(v string) *CreateSMBFileShareInput { - s.DefaultStorageClass = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *CreateSMBFileShareInput) SetGatewayARN(v string) *CreateSMBFileShareInput { - s.GatewayARN = &v - return s -} - -// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. -func (s *CreateSMBFileShareInput) SetGuessMIMETypeEnabled(v bool) *CreateSMBFileShareInput { - s.GuessMIMETypeEnabled = &v - return s -} - -// SetInvalidUserList sets the InvalidUserList field's value. -func (s *CreateSMBFileShareInput) SetInvalidUserList(v []*string) *CreateSMBFileShareInput { - s.InvalidUserList = v - return s -} - -// SetKMSEncrypted sets the KMSEncrypted field's value. -func (s *CreateSMBFileShareInput) SetKMSEncrypted(v bool) *CreateSMBFileShareInput { - s.KMSEncrypted = &v - return s -} - -// SetKMSKey sets the KMSKey field's value. -func (s *CreateSMBFileShareInput) SetKMSKey(v string) *CreateSMBFileShareInput { - s.KMSKey = &v - return s -} - -// SetLocationARN sets the LocationARN field's value. -func (s *CreateSMBFileShareInput) SetLocationARN(v string) *CreateSMBFileShareInput { - s.LocationARN = &v - return s -} - -// SetObjectACL sets the ObjectACL field's value. -func (s *CreateSMBFileShareInput) SetObjectACL(v string) *CreateSMBFileShareInput { - s.ObjectACL = &v - return s -} - -// SetReadOnly sets the ReadOnly field's value. -func (s *CreateSMBFileShareInput) SetReadOnly(v bool) *CreateSMBFileShareInput { - s.ReadOnly = &v - return s -} - -// SetRequesterPays sets the RequesterPays field's value. -func (s *CreateSMBFileShareInput) SetRequesterPays(v bool) *CreateSMBFileShareInput { - s.RequesterPays = &v - return s -} - -// SetRole sets the Role field's value. -func (s *CreateSMBFileShareInput) SetRole(v string) *CreateSMBFileShareInput { - s.Role = &v - return s -} - -// SetValidUserList sets the ValidUserList field's value. -func (s *CreateSMBFileShareInput) SetValidUserList(v []*string) *CreateSMBFileShareInput { - s.ValidUserList = v - return s -} - -// CreateSMBFileShareOutput -type CreateSMBFileShareOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the newly created file share. - FileShareARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s CreateSMBFileShareOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSMBFileShareOutput) GoString() string { - return s.String() -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *CreateSMBFileShareOutput) SetFileShareARN(v string) *CreateSMBFileShareOutput { - s.FileShareARN = &v - return s -} - -type CreateSnapshotFromVolumeRecoveryPointInput struct { - _ struct{} `type:"structure"` - - // SnapshotDescription is a required field - SnapshotDescription *string `min:"1" type:"string" required:"true"` - - // VolumeARN is a required field - VolumeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateSnapshotFromVolumeRecoveryPointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSnapshotFromVolumeRecoveryPointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSnapshotFromVolumeRecoveryPointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotFromVolumeRecoveryPointInput"} - if s.SnapshotDescription == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotDescription")) - } - if s.SnapshotDescription != nil && len(*s.SnapshotDescription) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SnapshotDescription", 1)) - } - if s.VolumeARN == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeARN")) - } - if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSnapshotDescription sets the SnapshotDescription field's value. -func (s *CreateSnapshotFromVolumeRecoveryPointInput) SetSnapshotDescription(v string) *CreateSnapshotFromVolumeRecoveryPointInput { - s.SnapshotDescription = &v - return s -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *CreateSnapshotFromVolumeRecoveryPointInput) SetVolumeARN(v string) *CreateSnapshotFromVolumeRecoveryPointInput { - s.VolumeARN = &v - return s -} - -type CreateSnapshotFromVolumeRecoveryPointOutput struct { - _ struct{} `type:"structure"` - - SnapshotId *string `type:"string"` - - VolumeARN *string `min:"50" type:"string"` - - VolumeRecoveryPointTime *string `type:"string"` -} - -// String returns the string representation -func (s CreateSnapshotFromVolumeRecoveryPointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSnapshotFromVolumeRecoveryPointOutput) GoString() string { - return s.String() -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *CreateSnapshotFromVolumeRecoveryPointOutput) SetSnapshotId(v string) *CreateSnapshotFromVolumeRecoveryPointOutput { - s.SnapshotId = &v - return s -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *CreateSnapshotFromVolumeRecoveryPointOutput) SetVolumeARN(v string) *CreateSnapshotFromVolumeRecoveryPointOutput { - s.VolumeARN = &v - return s -} - -// SetVolumeRecoveryPointTime sets the VolumeRecoveryPointTime field's value. -func (s *CreateSnapshotFromVolumeRecoveryPointOutput) SetVolumeRecoveryPointTime(v string) *CreateSnapshotFromVolumeRecoveryPointOutput { - s.VolumeRecoveryPointTime = &v - return s -} - -// A JSON object containing one or more of the following fields: -// -// * CreateSnapshotInput$SnapshotDescription -// -// * CreateSnapshotInput$VolumeARN -type CreateSnapshotInput struct { - _ struct{} `type:"structure"` - - // Textual description of the snapshot that appears in the Amazon EC2 console, - // Elastic Block Store snapshots panel in the Description field, and in the - // AWS Storage Gateway snapshot Details pane, Description field - // - // SnapshotDescription is a required field - SnapshotDescription *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation - // to return a list of gateway volumes. - // - // VolumeARN is a required field - VolumeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotInput"} - if s.SnapshotDescription == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotDescription")) - } - if s.SnapshotDescription != nil && len(*s.SnapshotDescription) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SnapshotDescription", 1)) - } - if s.VolumeARN == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeARN")) - } - if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSnapshotDescription sets the SnapshotDescription field's value. -func (s *CreateSnapshotInput) SetSnapshotDescription(v string) *CreateSnapshotInput { - s.SnapshotDescription = &v - return s -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *CreateSnapshotInput) SetVolumeARN(v string) *CreateSnapshotInput { - s.VolumeARN = &v - return s -} - -// A JSON object containing the following fields: -type CreateSnapshotOutput struct { - _ struct{} `type:"structure"` - - // The snapshot ID that is used to refer to the snapshot in future operations - // such as describing snapshots (Amazon Elastic Compute Cloud API DescribeSnapshots) - // or creating a volume from a snapshot (CreateStorediSCSIVolume). - SnapshotId *string `type:"string"` - - // The Amazon Resource Name (ARN) of the volume of which the snapshot was taken. - VolumeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s CreateSnapshotOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSnapshotOutput) GoString() string { - return s.String() -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *CreateSnapshotOutput) SetSnapshotId(v string) *CreateSnapshotOutput { - s.SnapshotId = &v - return s -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *CreateSnapshotOutput) SetVolumeARN(v string) *CreateSnapshotOutput { - s.VolumeARN = &v - return s -} - -// A JSON object containing one or more of the following fields: -// -// * CreateStorediSCSIVolumeInput$DiskId -// -// * CreateStorediSCSIVolumeInput$NetworkInterfaceId -// -// * CreateStorediSCSIVolumeInput$PreserveExistingData -// -// * CreateStorediSCSIVolumeInput$SnapshotId -// -// * CreateStorediSCSIVolumeInput$TargetName -type CreateStorediSCSIVolumeInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for the gateway local disk that is configured as a - // stored volume. Use ListLocalDisks (http://docs.aws.amazon.com/storagegateway/latest/userguide/API_ListLocalDisks.html) - // to list disk IDs for a gateway. - // - // DiskId is a required field - DiskId *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // True to use Amazon S3 server side encryption with your own AWS KMS key, or - // false to use a key managed by Amazon S3. Optional. - KMSEncrypted *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side - // encryption. This value can only be set when KMSEncrypted is true. Optional. - KMSKey *string `min:"20" type:"string"` - - // The network interface of the gateway on which to expose the iSCSI target. - // Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a - // list of the network interfaces available on a gateway. - // - // Valid Values: A valid IP address. - // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `type:"string" required:"true"` - - // Specify this field as true if you want to preserve the data on the local - // disk. Otherwise, specifying this field as false creates an empty volume. - // - // Valid Values: true, false - // - // PreserveExistingData is a required field - PreserveExistingData *bool `type:"boolean" required:"true"` - - // The snapshot ID (e.g. "snap-1122aabb") of the snapshot to restore as the - // new stored volume. Specify this field if you want to create the iSCSI storage - // volume from a snapshot otherwise do not include this field. To list snapshots - // for your account use DescribeSnapshots (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html) - // in the Amazon Elastic Compute Cloud API Reference. - SnapshotId *string `type:"string"` - - // The name of the iSCSI target used by initiators to connect to the target - // and as a suffix for the target ARN. For example, specifying TargetName as - // myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. - // The target name must be unique across all volumes of a gateway. - // - // TargetName is a required field - TargetName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateStorediSCSIVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStorediSCSIVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStorediSCSIVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStorediSCSIVolumeInput"} - if s.DiskId == nil { - invalidParams.Add(request.NewErrParamRequired("DiskId")) - } - if s.DiskId != nil && len(*s.DiskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DiskId", 1)) - } - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.KMSKey != nil && len(*s.KMSKey) < 20 { - invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) - } - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - if s.PreserveExistingData == nil { - invalidParams.Add(request.NewErrParamRequired("PreserveExistingData")) - } - if s.TargetName == nil { - invalidParams.Add(request.NewErrParamRequired("TargetName")) - } - if s.TargetName != nil && len(*s.TargetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskId sets the DiskId field's value. -func (s *CreateStorediSCSIVolumeInput) SetDiskId(v string) *CreateStorediSCSIVolumeInput { - s.DiskId = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *CreateStorediSCSIVolumeInput) SetGatewayARN(v string) *CreateStorediSCSIVolumeInput { - s.GatewayARN = &v - return s -} - -// SetKMSEncrypted sets the KMSEncrypted field's value. -func (s *CreateStorediSCSIVolumeInput) SetKMSEncrypted(v bool) *CreateStorediSCSIVolumeInput { - s.KMSEncrypted = &v - return s -} - -// SetKMSKey sets the KMSKey field's value. -func (s *CreateStorediSCSIVolumeInput) SetKMSKey(v string) *CreateStorediSCSIVolumeInput { - s.KMSKey = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *CreateStorediSCSIVolumeInput) SetNetworkInterfaceId(v string) *CreateStorediSCSIVolumeInput { - s.NetworkInterfaceId = &v - return s -} - -// SetPreserveExistingData sets the PreserveExistingData field's value. -func (s *CreateStorediSCSIVolumeInput) SetPreserveExistingData(v bool) *CreateStorediSCSIVolumeInput { - s.PreserveExistingData = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *CreateStorediSCSIVolumeInput) SetSnapshotId(v string) *CreateStorediSCSIVolumeInput { - s.SnapshotId = &v - return s -} - -// SetTargetName sets the TargetName field's value. -func (s *CreateStorediSCSIVolumeInput) SetTargetName(v string) *CreateStorediSCSIVolumeInput { - s.TargetName = &v - return s -} - -// A JSON object containing the following fields: -type CreateStorediSCSIVolumeOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the volume target, which includes the iSCSI - // name that initiators can use to connect to the target. - TargetARN *string `min:"50" type:"string"` - - // The Amazon Resource Name (ARN) of the configured volume. - VolumeARN *string `min:"50" type:"string"` - - // The size of the volume in bytes. - VolumeSizeInBytes *int64 `type:"long"` -} - -// String returns the string representation -func (s CreateStorediSCSIVolumeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStorediSCSIVolumeOutput) GoString() string { - return s.String() -} - -// SetTargetARN sets the TargetARN field's value. -func (s *CreateStorediSCSIVolumeOutput) SetTargetARN(v string) *CreateStorediSCSIVolumeOutput { - s.TargetARN = &v - return s -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *CreateStorediSCSIVolumeOutput) SetVolumeARN(v string) *CreateStorediSCSIVolumeOutput { - s.VolumeARN = &v - return s -} - -// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. -func (s *CreateStorediSCSIVolumeOutput) SetVolumeSizeInBytes(v int64) *CreateStorediSCSIVolumeOutput { - s.VolumeSizeInBytes = &v - return s -} - -// CreateTapeWithBarcodeInput -type CreateTapeWithBarcodeInput struct { - _ struct{} `type:"structure"` - - // The unique Amazon Resource Name (ARN) that represents the gateway to associate - // the virtual tape with. Use the ListGateways operation to return a list of - // gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // True to use Amazon S3 server side encryption with your own AWS KMS key, or - // false to use a key managed by Amazon S3. Optional. - KMSEncrypted *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the AWS KMS Key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. - KMSKey *string `min:"20" type:"string"` - - // The barcode that you want to assign to the tape. - // - // Barcodes cannot be reused. This includes barcodes used for tapes that have - // been deleted. - // - // TapeBarcode is a required field - TapeBarcode *string `min:"7" type:"string" required:"true"` - - // The size, in bytes, of the virtual tape that you want to create. - // - // The size must be aligned by gigabyte (1024*1024*1024 byte). - // - // TapeSizeInBytes is a required field - TapeSizeInBytes *int64 `type:"long" required:"true"` -} - -// String returns the string representation -func (s CreateTapeWithBarcodeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTapeWithBarcodeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTapeWithBarcodeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTapeWithBarcodeInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.KMSKey != nil && len(*s.KMSKey) < 20 { - invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) - } - if s.TapeBarcode == nil { - invalidParams.Add(request.NewErrParamRequired("TapeBarcode")) - } - if s.TapeBarcode != nil && len(*s.TapeBarcode) < 7 { - invalidParams.Add(request.NewErrParamMinLen("TapeBarcode", 7)) - } - if s.TapeSizeInBytes == nil { - invalidParams.Add(request.NewErrParamRequired("TapeSizeInBytes")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *CreateTapeWithBarcodeInput) SetGatewayARN(v string) *CreateTapeWithBarcodeInput { - s.GatewayARN = &v - return s -} - -// SetKMSEncrypted sets the KMSEncrypted field's value. -func (s *CreateTapeWithBarcodeInput) SetKMSEncrypted(v bool) *CreateTapeWithBarcodeInput { - s.KMSEncrypted = &v - return s -} - -// SetKMSKey sets the KMSKey field's value. -func (s *CreateTapeWithBarcodeInput) SetKMSKey(v string) *CreateTapeWithBarcodeInput { - s.KMSKey = &v - return s -} - -// SetTapeBarcode sets the TapeBarcode field's value. -func (s *CreateTapeWithBarcodeInput) SetTapeBarcode(v string) *CreateTapeWithBarcodeInput { - s.TapeBarcode = &v - return s -} - -// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. -func (s *CreateTapeWithBarcodeInput) SetTapeSizeInBytes(v int64) *CreateTapeWithBarcodeInput { - s.TapeSizeInBytes = &v - return s -} - -// CreateTapeOutput -type CreateTapeWithBarcodeOutput struct { - _ struct{} `type:"structure"` - - // A unique Amazon Resource Name (ARN) that represents the virtual tape that - // was created. - TapeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s CreateTapeWithBarcodeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTapeWithBarcodeOutput) GoString() string { - return s.String() -} - -// SetTapeARN sets the TapeARN field's value. -func (s *CreateTapeWithBarcodeOutput) SetTapeARN(v string) *CreateTapeWithBarcodeOutput { - s.TapeARN = &v - return s -} - -// CreateTapesInput -type CreateTapesInput struct { - _ struct{} `type:"structure"` - - // A unique identifier that you use to retry a request. If you retry a request, - // use the same ClientToken you specified in the initial request. - // - // Using the same ClientToken prevents creating the tape multiple times. - // - // ClientToken is a required field - ClientToken *string `min:"5" type:"string" required:"true"` - - // The unique Amazon Resource Name (ARN) that represents the gateway to associate - // the virtual tapes with. Use the ListGateways operation to return a list of - // gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // True to use Amazon S3 server side encryption with your own AWS KMS key, or - // false to use a key managed by Amazon S3. Optional. - KMSEncrypted *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. - KMSKey *string `min:"20" type:"string"` - - // The number of virtual tapes that you want to create. - // - // NumTapesToCreate is a required field - NumTapesToCreate *int64 `min:"1" type:"integer" required:"true"` - - // A prefix that you append to the barcode of the virtual tape you are creating. - // This prefix makes the barcode unique. - // - // The prefix must be 1 to 4 characters in length and must be one of the uppercase - // letters from A to Z. - // - // TapeBarcodePrefix is a required field - TapeBarcodePrefix *string `min:"1" type:"string" required:"true"` - - // The size, in bytes, of the virtual tapes that you want to create. - // - // The size must be aligned by gigabyte (1024*1024*1024 byte). - // - // TapeSizeInBytes is a required field - TapeSizeInBytes *int64 `type:"long" required:"true"` -} - -// String returns the string representation -func (s CreateTapesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTapesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTapesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTapesInput"} - if s.ClientToken == nil { - invalidParams.Add(request.NewErrParamRequired("ClientToken")) - } - if s.ClientToken != nil && len(*s.ClientToken) < 5 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 5)) - } - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.KMSKey != nil && len(*s.KMSKey) < 20 { - invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) - } - if s.NumTapesToCreate == nil { - invalidParams.Add(request.NewErrParamRequired("NumTapesToCreate")) - } - if s.NumTapesToCreate != nil && *s.NumTapesToCreate < 1 { - invalidParams.Add(request.NewErrParamMinValue("NumTapesToCreate", 1)) - } - if s.TapeBarcodePrefix == nil { - invalidParams.Add(request.NewErrParamRequired("TapeBarcodePrefix")) - } - if s.TapeBarcodePrefix != nil && len(*s.TapeBarcodePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TapeBarcodePrefix", 1)) - } - if s.TapeSizeInBytes == nil { - invalidParams.Add(request.NewErrParamRequired("TapeSizeInBytes")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateTapesInput) SetClientToken(v string) *CreateTapesInput { - s.ClientToken = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *CreateTapesInput) SetGatewayARN(v string) *CreateTapesInput { - s.GatewayARN = &v - return s -} - -// SetKMSEncrypted sets the KMSEncrypted field's value. -func (s *CreateTapesInput) SetKMSEncrypted(v bool) *CreateTapesInput { - s.KMSEncrypted = &v - return s -} - -// SetKMSKey sets the KMSKey field's value. -func (s *CreateTapesInput) SetKMSKey(v string) *CreateTapesInput { - s.KMSKey = &v - return s -} - -// SetNumTapesToCreate sets the NumTapesToCreate field's value. -func (s *CreateTapesInput) SetNumTapesToCreate(v int64) *CreateTapesInput { - s.NumTapesToCreate = &v - return s -} - -// SetTapeBarcodePrefix sets the TapeBarcodePrefix field's value. -func (s *CreateTapesInput) SetTapeBarcodePrefix(v string) *CreateTapesInput { - s.TapeBarcodePrefix = &v - return s -} - -// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. -func (s *CreateTapesInput) SetTapeSizeInBytes(v int64) *CreateTapesInput { - s.TapeSizeInBytes = &v - return s -} - -// CreateTapeOutput -type CreateTapesOutput struct { - _ struct{} `type:"structure"` - - // A list of unique Amazon Resource Names (ARNs) that represents the virtual - // tapes that were created. - TapeARNs []*string `type:"list"` -} - -// String returns the string representation -func (s CreateTapesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTapesOutput) GoString() string { - return s.String() -} - -// SetTapeARNs sets the TapeARNs field's value. -func (s *CreateTapesOutput) SetTapeARNs(v []*string) *CreateTapesOutput { - s.TapeARNs = v - return s -} - -// A JSON object containing the following fields: -// -// * DeleteBandwidthRateLimitInput$BandwidthType -type DeleteBandwidthRateLimitInput struct { - _ struct{} `type:"structure"` - - // One of the BandwidthType values that indicates the gateway bandwidth rate - // limit to delete. - // - // Valid Values: Upload, Download, All. - // - // BandwidthType is a required field - BandwidthType *string `min:"3" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteBandwidthRateLimitInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBandwidthRateLimitInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBandwidthRateLimitInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBandwidthRateLimitInput"} - if s.BandwidthType == nil { - invalidParams.Add(request.NewErrParamRequired("BandwidthType")) - } - if s.BandwidthType != nil && len(*s.BandwidthType) < 3 { - invalidParams.Add(request.NewErrParamMinLen("BandwidthType", 3)) - } - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBandwidthType sets the BandwidthType field's value. -func (s *DeleteBandwidthRateLimitInput) SetBandwidthType(v string) *DeleteBandwidthRateLimitInput { - s.BandwidthType = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DeleteBandwidthRateLimitInput) SetGatewayARN(v string) *DeleteBandwidthRateLimitInput { - s.GatewayARN = &v - return s -} - -// A JSON object containing the of the gateway whose bandwidth rate information -// was deleted. -type DeleteBandwidthRateLimitOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s DeleteBandwidthRateLimitOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteBandwidthRateLimitOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DeleteBandwidthRateLimitOutput) SetGatewayARN(v string) *DeleteBandwidthRateLimitOutput { - s.GatewayARN = &v - return s -} - -// A JSON object containing one or more of the following fields: -// -// * DeleteChapCredentialsInput$InitiatorName -// -// * DeleteChapCredentialsInput$TargetARN -type DeleteChapCredentialsInput struct { - _ struct{} `type:"structure"` - - // The iSCSI initiator that connects to the target. - // - // InitiatorName is a required field - InitiatorName *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the iSCSI volume target. Use the DescribeStorediSCSIVolumes - // operation to return to retrieve the TargetARN for specified VolumeARN. - // - // TargetARN is a required field - TargetARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteChapCredentialsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteChapCredentialsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteChapCredentialsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteChapCredentialsInput"} - if s.InitiatorName == nil { - invalidParams.Add(request.NewErrParamRequired("InitiatorName")) - } - if s.InitiatorName != nil && len(*s.InitiatorName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InitiatorName", 1)) - } - if s.TargetARN == nil { - invalidParams.Add(request.NewErrParamRequired("TargetARN")) - } - if s.TargetARN != nil && len(*s.TargetARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("TargetARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInitiatorName sets the InitiatorName field's value. -func (s *DeleteChapCredentialsInput) SetInitiatorName(v string) *DeleteChapCredentialsInput { - s.InitiatorName = &v - return s -} - -// SetTargetARN sets the TargetARN field's value. -func (s *DeleteChapCredentialsInput) SetTargetARN(v string) *DeleteChapCredentialsInput { - s.TargetARN = &v - return s -} - -// A JSON object containing the following fields: -type DeleteChapCredentialsOutput struct { - _ struct{} `type:"structure"` - - // The iSCSI initiator that connects to the target. - InitiatorName *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the target. - TargetARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s DeleteChapCredentialsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteChapCredentialsOutput) GoString() string { - return s.String() -} - -// SetInitiatorName sets the InitiatorName field's value. -func (s *DeleteChapCredentialsOutput) SetInitiatorName(v string) *DeleteChapCredentialsOutput { - s.InitiatorName = &v - return s -} - -// SetTargetARN sets the TargetARN field's value. -func (s *DeleteChapCredentialsOutput) SetTargetARN(v string) *DeleteChapCredentialsOutput { - s.TargetARN = &v - return s -} - -// DeleteFileShareInput -type DeleteFileShareInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the file share to be deleted. - // - // FileShareARN is a required field - FileShareARN *string `min:"50" type:"string" required:"true"` - - // If this value is set to true, the operation deletes a file share immediately - // and aborts all data uploads to AWS. Otherwise, the file share is not deleted - // until all data is uploaded to AWS. This process aborts the data upload process, - // and the file share enters the FORCE_DELETING status. - ForceDelete *bool `type:"boolean"` -} - -// String returns the string representation -func (s DeleteFileShareInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFileShareInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFileShareInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFileShareInput"} - if s.FileShareARN == nil { - invalidParams.Add(request.NewErrParamRequired("FileShareARN")) - } - if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *DeleteFileShareInput) SetFileShareARN(v string) *DeleteFileShareInput { - s.FileShareARN = &v - return s -} - -// SetForceDelete sets the ForceDelete field's value. -func (s *DeleteFileShareInput) SetForceDelete(v bool) *DeleteFileShareInput { - s.ForceDelete = &v - return s -} - -// DeleteFileShareOutput -type DeleteFileShareOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the deleted file share. - FileShareARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s DeleteFileShareOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFileShareOutput) GoString() string { - return s.String() -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *DeleteFileShareOutput) SetFileShareARN(v string) *DeleteFileShareOutput { - s.FileShareARN = &v - return s -} - -// A JSON object containing the ID of the gateway to delete. -type DeleteGatewayInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteGatewayInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DeleteGatewayInput) SetGatewayARN(v string) *DeleteGatewayInput { - s.GatewayARN = &v - return s -} - -// A JSON object containing the ID of the deleted gateway. -type DeleteGatewayOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s DeleteGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGatewayOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DeleteGatewayOutput) SetGatewayARN(v string) *DeleteGatewayOutput { - s.GatewayARN = &v - return s -} - -type DeleteSnapshotScheduleInput struct { - _ struct{} `type:"structure"` - - // VolumeARN is a required field - VolumeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSnapshotScheduleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSnapshotScheduleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSnapshotScheduleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotScheduleInput"} - if s.VolumeARN == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeARN")) - } - if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *DeleteSnapshotScheduleInput) SetVolumeARN(v string) *DeleteSnapshotScheduleInput { - s.VolumeARN = &v - return s -} - -type DeleteSnapshotScheduleOutput struct { - _ struct{} `type:"structure"` - - VolumeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s DeleteSnapshotScheduleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSnapshotScheduleOutput) GoString() string { - return s.String() -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *DeleteSnapshotScheduleOutput) SetVolumeARN(v string) *DeleteSnapshotScheduleOutput { - s.VolumeARN = &v - return s -} - -// DeleteTapeArchiveInput -type DeleteTapeArchiveInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the virtual tape to delete from the virtual - // tape shelf (VTS). - // - // TapeARN is a required field - TapeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTapeArchiveInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTapeArchiveInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTapeArchiveInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTapeArchiveInput"} - if s.TapeARN == nil { - invalidParams.Add(request.NewErrParamRequired("TapeARN")) - } - if s.TapeARN != nil && len(*s.TapeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTapeARN sets the TapeARN field's value. -func (s *DeleteTapeArchiveInput) SetTapeARN(v string) *DeleteTapeArchiveInput { - s.TapeARN = &v - return s -} - -// DeleteTapeArchiveOutput -type DeleteTapeArchiveOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the virtual tape that was deleted from - // the virtual tape shelf (VTS). - TapeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s DeleteTapeArchiveOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTapeArchiveOutput) GoString() string { - return s.String() -} - -// SetTapeARN sets the TapeARN field's value. -func (s *DeleteTapeArchiveOutput) SetTapeARN(v string) *DeleteTapeArchiveOutput { - s.TapeARN = &v - return s -} - -// DeleteTapeInput -type DeleteTapeInput struct { - _ struct{} `type:"structure"` - - // The unique Amazon Resource Name (ARN) of the gateway that the virtual tape - // to delete is associated with. Use the ListGateways operation to return a - // list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the virtual tape to delete. - // - // TapeARN is a required field - TapeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteTapeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTapeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTapeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTapeInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.TapeARN == nil { - invalidParams.Add(request.NewErrParamRequired("TapeARN")) - } - if s.TapeARN != nil && len(*s.TapeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DeleteTapeInput) SetGatewayARN(v string) *DeleteTapeInput { - s.GatewayARN = &v - return s -} - -// SetTapeARN sets the TapeARN field's value. -func (s *DeleteTapeInput) SetTapeARN(v string) *DeleteTapeInput { - s.TapeARN = &v - return s -} - -// DeleteTapeOutput -type DeleteTapeOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the deleted virtual tape. - TapeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s DeleteTapeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTapeOutput) GoString() string { - return s.String() -} - -// SetTapeARN sets the TapeARN field's value. -func (s *DeleteTapeOutput) SetTapeARN(v string) *DeleteTapeOutput { - s.TapeARN = &v - return s -} - -// A JSON object containing the DeleteVolumeInput$VolumeARN to delete. -type DeleteVolumeInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation - // to return a list of gateway volumes. - // - // VolumeARN is a required field - VolumeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVolumeInput"} - if s.VolumeARN == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeARN")) - } - if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *DeleteVolumeInput) SetVolumeARN(v string) *DeleteVolumeInput { - s.VolumeARN = &v - return s -} - -// A JSON object containing the of the storage volume that was deleted -type DeleteVolumeOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the storage volume that was deleted. It - // is the same ARN you provided in the request. - VolumeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s DeleteVolumeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteVolumeOutput) GoString() string { - return s.String() -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *DeleteVolumeOutput) SetVolumeARN(v string) *DeleteVolumeOutput { - s.VolumeARN = &v - return s -} - -// A JSON object containing the of the gateway. -type DescribeBandwidthRateLimitInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeBandwidthRateLimitInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBandwidthRateLimitInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeBandwidthRateLimitInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeBandwidthRateLimitInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeBandwidthRateLimitInput) SetGatewayARN(v string) *DescribeBandwidthRateLimitInput { - s.GatewayARN = &v - return s -} - -// A JSON object containing the following fields: -type DescribeBandwidthRateLimitOutput struct { - _ struct{} `type:"structure"` - - // The average download bandwidth rate limit in bits per second. This field - // does not appear in the response if the download rate limit is not set. - AverageDownloadRateLimitInBitsPerSec *int64 `min:"102400" type:"long"` - - // The average upload bandwidth rate limit in bits per second. This field does - // not appear in the response if the upload rate limit is not set. - AverageUploadRateLimitInBitsPerSec *int64 `min:"51200" type:"long"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s DescribeBandwidthRateLimitOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeBandwidthRateLimitOutput) GoString() string { - return s.String() -} - -// SetAverageDownloadRateLimitInBitsPerSec sets the AverageDownloadRateLimitInBitsPerSec field's value. -func (s *DescribeBandwidthRateLimitOutput) SetAverageDownloadRateLimitInBitsPerSec(v int64) *DescribeBandwidthRateLimitOutput { - s.AverageDownloadRateLimitInBitsPerSec = &v - return s -} - -// SetAverageUploadRateLimitInBitsPerSec sets the AverageUploadRateLimitInBitsPerSec field's value. -func (s *DescribeBandwidthRateLimitOutput) SetAverageUploadRateLimitInBitsPerSec(v int64) *DescribeBandwidthRateLimitOutput { - s.AverageUploadRateLimitInBitsPerSec = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeBandwidthRateLimitOutput) SetGatewayARN(v string) *DescribeBandwidthRateLimitOutput { - s.GatewayARN = &v - return s -} - -type DescribeCacheInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeCacheInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCacheInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCacheInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeCacheInput) SetGatewayARN(v string) *DescribeCacheInput { - s.GatewayARN = &v - return s -} - -type DescribeCacheOutput struct { - _ struct{} `type:"structure"` - - CacheAllocatedInBytes *int64 `type:"long"` - - CacheDirtyPercentage *float64 `type:"double"` - - CacheHitPercentage *float64 `type:"double"` - - CacheMissPercentage *float64 `type:"double"` - - CacheUsedPercentage *float64 `type:"double"` - - DiskIds []*string `type:"list"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s DescribeCacheOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheOutput) GoString() string { - return s.String() -} - -// SetCacheAllocatedInBytes sets the CacheAllocatedInBytes field's value. -func (s *DescribeCacheOutput) SetCacheAllocatedInBytes(v int64) *DescribeCacheOutput { - s.CacheAllocatedInBytes = &v - return s -} - -// SetCacheDirtyPercentage sets the CacheDirtyPercentage field's value. -func (s *DescribeCacheOutput) SetCacheDirtyPercentage(v float64) *DescribeCacheOutput { - s.CacheDirtyPercentage = &v - return s -} - -// SetCacheHitPercentage sets the CacheHitPercentage field's value. -func (s *DescribeCacheOutput) SetCacheHitPercentage(v float64) *DescribeCacheOutput { - s.CacheHitPercentage = &v - return s -} - -// SetCacheMissPercentage sets the CacheMissPercentage field's value. -func (s *DescribeCacheOutput) SetCacheMissPercentage(v float64) *DescribeCacheOutput { - s.CacheMissPercentage = &v - return s -} - -// SetCacheUsedPercentage sets the CacheUsedPercentage field's value. -func (s *DescribeCacheOutput) SetCacheUsedPercentage(v float64) *DescribeCacheOutput { - s.CacheUsedPercentage = &v - return s -} - -// SetDiskIds sets the DiskIds field's value. -func (s *DescribeCacheOutput) SetDiskIds(v []*string) *DescribeCacheOutput { - s.DiskIds = v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeCacheOutput) SetGatewayARN(v string) *DescribeCacheOutput { - s.GatewayARN = &v - return s -} - -type DescribeCachediSCSIVolumesInput struct { - _ struct{} `type:"structure"` - - // VolumeARNs is a required field - VolumeARNs []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeCachediSCSIVolumesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCachediSCSIVolumesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCachediSCSIVolumesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCachediSCSIVolumesInput"} - if s.VolumeARNs == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeARNs")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVolumeARNs sets the VolumeARNs field's value. -func (s *DescribeCachediSCSIVolumesInput) SetVolumeARNs(v []*string) *DescribeCachediSCSIVolumesInput { - s.VolumeARNs = v - return s -} - -// A JSON object containing the following fields: -type DescribeCachediSCSIVolumesOutput struct { - _ struct{} `type:"structure"` - - // An array of objects where each object contains metadata about one cached - // volume. - CachediSCSIVolumes []*CachediSCSIVolume `type:"list"` -} - -// String returns the string representation -func (s DescribeCachediSCSIVolumesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCachediSCSIVolumesOutput) GoString() string { - return s.String() -} - -// SetCachediSCSIVolumes sets the CachediSCSIVolumes field's value. -func (s *DescribeCachediSCSIVolumesOutput) SetCachediSCSIVolumes(v []*CachediSCSIVolume) *DescribeCachediSCSIVolumesOutput { - s.CachediSCSIVolumes = v - return s -} - -// A JSON object containing the Amazon Resource Name (ARN) of the iSCSI volume -// target. -type DescribeChapCredentialsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the iSCSI volume target. Use the DescribeStorediSCSIVolumes - // operation to return to retrieve the TargetARN for specified VolumeARN. - // - // TargetARN is a required field - TargetARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeChapCredentialsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeChapCredentialsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeChapCredentialsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeChapCredentialsInput"} - if s.TargetARN == nil { - invalidParams.Add(request.NewErrParamRequired("TargetARN")) - } - if s.TargetARN != nil && len(*s.TargetARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("TargetARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetARN sets the TargetARN field's value. -func (s *DescribeChapCredentialsInput) SetTargetARN(v string) *DescribeChapCredentialsInput { - s.TargetARN = &v - return s -} - -// A JSON object containing a . -type DescribeChapCredentialsOutput struct { - _ struct{} `type:"structure"` - - // An array of ChapInfo objects that represent CHAP credentials. Each object - // in the array contains CHAP credential information for one target-initiator - // pair. If no CHAP credentials are set, an empty array is returned. CHAP credential - // information is provided in a JSON object with the following fields: - // - // * InitiatorName: The iSCSI initiator that connects to the target. - // - // * SecretToAuthenticateInitiator: The secret key that the initiator (for - // example, the Windows client) must provide to participate in mutual CHAP - // with the target. - // - // * SecretToAuthenticateTarget: The secret key that the target must provide - // to participate in mutual CHAP with the initiator (e.g. Windows client). - // - // * TargetARN: The Amazon Resource Name (ARN) of the storage volume. - ChapCredentials []*ChapInfo `type:"list"` -} - -// String returns the string representation -func (s DescribeChapCredentialsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeChapCredentialsOutput) GoString() string { - return s.String() -} - -// SetChapCredentials sets the ChapCredentials field's value. -func (s *DescribeChapCredentialsOutput) SetChapCredentials(v []*ChapInfo) *DescribeChapCredentialsOutput { - s.ChapCredentials = v - return s -} - -// A JSON object containing the ID of the gateway. -type DescribeGatewayInformationInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeGatewayInformationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeGatewayInformationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeGatewayInformationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeGatewayInformationInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeGatewayInformationInput) SetGatewayARN(v string) *DescribeGatewayInformationInput { - s.GatewayARN = &v - return s -} - -// A JSON object containing the following fields: -type DescribeGatewayInformationOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - // The unique identifier assigned to your gateway during activation. This ID - // becomes part of the gateway Amazon Resource Name (ARN), which you use as - // input for other operations. - GatewayId *string `min:"12" type:"string"` - - // The name you configured for your gateway. - GatewayName *string `type:"string"` - - // A NetworkInterface array that contains descriptions of the gateway network - // interfaces. - GatewayNetworkInterfaces []*NetworkInterface `type:"list"` - - // A value that indicates the operating state of the gateway. - GatewayState *string `min:"2" type:"string"` - - // A value that indicates the time zone configured for the gateway. - GatewayTimezone *string `min:"3" type:"string"` - - // The type of the gateway. - GatewayType *string `min:"2" type:"string"` - - // The date on which the last software update was applied to the gateway. If - // the gateway has never been updated, this field does not return a value in - // the response. - LastSoftwareUpdate *string `min:"1" type:"string"` - - // The date on which an update to the gateway is available. This date is in - // the time zone of the gateway. If the gateway is not available for an update - // this field is not returned in the response. - NextUpdateAvailabilityDate *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeGatewayInformationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeGatewayInformationOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeGatewayInformationOutput) SetGatewayARN(v string) *DescribeGatewayInformationOutput { - s.GatewayARN = &v - return s -} - -// SetGatewayId sets the GatewayId field's value. -func (s *DescribeGatewayInformationOutput) SetGatewayId(v string) *DescribeGatewayInformationOutput { - s.GatewayId = &v - return s -} - -// SetGatewayName sets the GatewayName field's value. -func (s *DescribeGatewayInformationOutput) SetGatewayName(v string) *DescribeGatewayInformationOutput { - s.GatewayName = &v - return s -} - -// SetGatewayNetworkInterfaces sets the GatewayNetworkInterfaces field's value. -func (s *DescribeGatewayInformationOutput) SetGatewayNetworkInterfaces(v []*NetworkInterface) *DescribeGatewayInformationOutput { - s.GatewayNetworkInterfaces = v - return s -} - -// SetGatewayState sets the GatewayState field's value. -func (s *DescribeGatewayInformationOutput) SetGatewayState(v string) *DescribeGatewayInformationOutput { - s.GatewayState = &v - return s -} - -// SetGatewayTimezone sets the GatewayTimezone field's value. -func (s *DescribeGatewayInformationOutput) SetGatewayTimezone(v string) *DescribeGatewayInformationOutput { - s.GatewayTimezone = &v - return s -} - -// SetGatewayType sets the GatewayType field's value. -func (s *DescribeGatewayInformationOutput) SetGatewayType(v string) *DescribeGatewayInformationOutput { - s.GatewayType = &v - return s -} - -// SetLastSoftwareUpdate sets the LastSoftwareUpdate field's value. -func (s *DescribeGatewayInformationOutput) SetLastSoftwareUpdate(v string) *DescribeGatewayInformationOutput { - s.LastSoftwareUpdate = &v - return s -} - -// SetNextUpdateAvailabilityDate sets the NextUpdateAvailabilityDate field's value. -func (s *DescribeGatewayInformationOutput) SetNextUpdateAvailabilityDate(v string) *DescribeGatewayInformationOutput { - s.NextUpdateAvailabilityDate = &v - return s -} - -// A JSON object containing the of the gateway. -type DescribeMaintenanceStartTimeInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeMaintenanceStartTimeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceStartTimeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMaintenanceStartTimeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceStartTimeInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeMaintenanceStartTimeInput) SetGatewayARN(v string) *DescribeMaintenanceStartTimeInput { - s.GatewayARN = &v - return s -} - -// A JSON object containing the following fields: -// -// * DescribeMaintenanceStartTimeOutput$DayOfWeek -// -// * DescribeMaintenanceStartTimeOutput$HourOfDay -// -// * DescribeMaintenanceStartTimeOutput$MinuteOfHour -// -// * DescribeMaintenanceStartTimeOutput$Timezone -type DescribeMaintenanceStartTimeOutput struct { - _ struct{} `type:"structure"` - - // An ordinal number between 0 and 6 that represents the day of the week, where - // 0 represents Sunday and 6 represents Saturday. The day of week is in the - // time zone of the gateway. - DayOfWeek *int64 `type:"integer"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - // The hour component of the maintenance start time represented as hh, where - // hh is the hour (0 to 23). The hour of the day is in the time zone of the - // gateway. - HourOfDay *int64 `type:"integer"` - - // The minute component of the maintenance start time represented as mm, where - // mm is the minute (0 to 59). The minute of the hour is in the time zone of - // the gateway. - MinuteOfHour *int64 `type:"integer"` - - Timezone *string `min:"3" type:"string"` -} - -// String returns the string representation -func (s DescribeMaintenanceStartTimeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeMaintenanceStartTimeOutput) GoString() string { - return s.String() -} - -// SetDayOfWeek sets the DayOfWeek field's value. -func (s *DescribeMaintenanceStartTimeOutput) SetDayOfWeek(v int64) *DescribeMaintenanceStartTimeOutput { - s.DayOfWeek = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeMaintenanceStartTimeOutput) SetGatewayARN(v string) *DescribeMaintenanceStartTimeOutput { - s.GatewayARN = &v - return s -} - -// SetHourOfDay sets the HourOfDay field's value. -func (s *DescribeMaintenanceStartTimeOutput) SetHourOfDay(v int64) *DescribeMaintenanceStartTimeOutput { - s.HourOfDay = &v - return s -} - -// SetMinuteOfHour sets the MinuteOfHour field's value. -func (s *DescribeMaintenanceStartTimeOutput) SetMinuteOfHour(v int64) *DescribeMaintenanceStartTimeOutput { - s.MinuteOfHour = &v - return s -} - -// SetTimezone sets the Timezone field's value. -func (s *DescribeMaintenanceStartTimeOutput) SetTimezone(v string) *DescribeMaintenanceStartTimeOutput { - s.Timezone = &v - return s -} - -// DescribeNFSFileSharesInput -type DescribeNFSFileSharesInput struct { - _ struct{} `type:"structure"` - - // An array containing the Amazon Resource Name (ARN) of each file share to - // be described. - // - // FileShareARNList is a required field - FileShareARNList []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeNFSFileSharesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNFSFileSharesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeNFSFileSharesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeNFSFileSharesInput"} - if s.FileShareARNList == nil { - invalidParams.Add(request.NewErrParamRequired("FileShareARNList")) - } - if s.FileShareARNList != nil && len(s.FileShareARNList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileShareARNList", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileShareARNList sets the FileShareARNList field's value. -func (s *DescribeNFSFileSharesInput) SetFileShareARNList(v []*string) *DescribeNFSFileSharesInput { - s.FileShareARNList = v - return s -} - -// DescribeNFSFileSharesOutput -type DescribeNFSFileSharesOutput struct { - _ struct{} `type:"structure"` - - // An array containing a description for each requested file share. - NFSFileShareInfoList []*NFSFileShareInfo `type:"list"` -} - -// String returns the string representation -func (s DescribeNFSFileSharesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNFSFileSharesOutput) GoString() string { - return s.String() -} - -// SetNFSFileShareInfoList sets the NFSFileShareInfoList field's value. -func (s *DescribeNFSFileSharesOutput) SetNFSFileShareInfoList(v []*NFSFileShareInfo) *DescribeNFSFileSharesOutput { - s.NFSFileShareInfoList = v - return s -} - -// DescribeSMBFileSharesInput -type DescribeSMBFileSharesInput struct { - _ struct{} `type:"structure"` - - // An array containing the Amazon Resource Name (ARN) of each file share to - // be described. - // - // FileShareARNList is a required field - FileShareARNList []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeSMBFileSharesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSMBFileSharesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSMBFileSharesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSMBFileSharesInput"} - if s.FileShareARNList == nil { - invalidParams.Add(request.NewErrParamRequired("FileShareARNList")) - } - if s.FileShareARNList != nil && len(s.FileShareARNList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileShareARNList", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileShareARNList sets the FileShareARNList field's value. -func (s *DescribeSMBFileSharesInput) SetFileShareARNList(v []*string) *DescribeSMBFileSharesInput { - s.FileShareARNList = v - return s -} - -// DescribeSMBFileSharesOutput -type DescribeSMBFileSharesOutput struct { - _ struct{} `type:"structure"` - - // An array containing a description for each requested file share. - SMBFileShareInfoList []*SMBFileShareInfo `type:"list"` -} - -// String returns the string representation -func (s DescribeSMBFileSharesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSMBFileSharesOutput) GoString() string { - return s.String() -} - -// SetSMBFileShareInfoList sets the SMBFileShareInfoList field's value. -func (s *DescribeSMBFileSharesOutput) SetSMBFileShareInfoList(v []*SMBFileShareInfo) *DescribeSMBFileSharesOutput { - s.SMBFileShareInfoList = v - return s -} - -type DescribeSMBSettingsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeSMBSettingsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSMBSettingsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSMBSettingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSMBSettingsInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeSMBSettingsInput) SetGatewayARN(v string) *DescribeSMBSettingsInput { - s.GatewayARN = &v - return s -} - -type DescribeSMBSettingsOutput struct { - _ struct{} `type:"structure"` - - // The name of the domain that the gateway is joined to. - DomainName *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - // This value is true if a password for the guest user “smbguest” is set, and - // otherwise false. - SMBGuestPasswordSet *bool `type:"boolean"` -} - -// String returns the string representation -func (s DescribeSMBSettingsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSMBSettingsOutput) GoString() string { - return s.String() -} - -// SetDomainName sets the DomainName field's value. -func (s *DescribeSMBSettingsOutput) SetDomainName(v string) *DescribeSMBSettingsOutput { - s.DomainName = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeSMBSettingsOutput) SetGatewayARN(v string) *DescribeSMBSettingsOutput { - s.GatewayARN = &v - return s -} - -// SetSMBGuestPasswordSet sets the SMBGuestPasswordSet field's value. -func (s *DescribeSMBSettingsOutput) SetSMBGuestPasswordSet(v bool) *DescribeSMBSettingsOutput { - s.SMBGuestPasswordSet = &v - return s -} - -// A JSON object containing the DescribeSnapshotScheduleInput$VolumeARN of the -// volume. -type DescribeSnapshotScheduleInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation - // to return a list of gateway volumes. - // - // VolumeARN is a required field - VolumeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeSnapshotScheduleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSnapshotScheduleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSnapshotScheduleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSnapshotScheduleInput"} - if s.VolumeARN == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeARN")) - } - if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *DescribeSnapshotScheduleInput) SetVolumeARN(v string) *DescribeSnapshotScheduleInput { - s.VolumeARN = &v - return s -} - -type DescribeSnapshotScheduleOutput struct { - _ struct{} `type:"structure"` - - Description *string `min:"1" type:"string"` - - RecurrenceInHours *int64 `min:"1" type:"integer"` - - StartAt *int64 `type:"integer"` - - Timezone *string `min:"3" type:"string"` - - VolumeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s DescribeSnapshotScheduleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeSnapshotScheduleOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *DescribeSnapshotScheduleOutput) SetDescription(v string) *DescribeSnapshotScheduleOutput { - s.Description = &v - return s -} - -// SetRecurrenceInHours sets the RecurrenceInHours field's value. -func (s *DescribeSnapshotScheduleOutput) SetRecurrenceInHours(v int64) *DescribeSnapshotScheduleOutput { - s.RecurrenceInHours = &v - return s -} - -// SetStartAt sets the StartAt field's value. -func (s *DescribeSnapshotScheduleOutput) SetStartAt(v int64) *DescribeSnapshotScheduleOutput { - s.StartAt = &v - return s -} - -// SetTimezone sets the Timezone field's value. -func (s *DescribeSnapshotScheduleOutput) SetTimezone(v string) *DescribeSnapshotScheduleOutput { - s.Timezone = &v - return s -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *DescribeSnapshotScheduleOutput) SetVolumeARN(v string) *DescribeSnapshotScheduleOutput { - s.VolumeARN = &v - return s -} - -// A JSON object containing a list of DescribeStorediSCSIVolumesInput$VolumeARNs. -type DescribeStorediSCSIVolumesInput struct { - _ struct{} `type:"structure"` - - // An array of strings where each string represents the Amazon Resource Name - // (ARN) of a stored volume. All of the specified stored volumes must from the - // same gateway. Use ListVolumes to get volume ARNs for a gateway. - // - // VolumeARNs is a required field - VolumeARNs []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeStorediSCSIVolumesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStorediSCSIVolumesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStorediSCSIVolumesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStorediSCSIVolumesInput"} - if s.VolumeARNs == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeARNs")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVolumeARNs sets the VolumeARNs field's value. -func (s *DescribeStorediSCSIVolumesInput) SetVolumeARNs(v []*string) *DescribeStorediSCSIVolumesInput { - s.VolumeARNs = v - return s -} - -type DescribeStorediSCSIVolumesOutput struct { - _ struct{} `type:"structure"` - - StorediSCSIVolumes []*StorediSCSIVolume `type:"list"` -} - -// String returns the string representation -func (s DescribeStorediSCSIVolumesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeStorediSCSIVolumesOutput) GoString() string { - return s.String() -} - -// SetStorediSCSIVolumes sets the StorediSCSIVolumes field's value. -func (s *DescribeStorediSCSIVolumesOutput) SetStorediSCSIVolumes(v []*StorediSCSIVolume) *DescribeStorediSCSIVolumesOutput { - s.StorediSCSIVolumes = v - return s -} - -// DescribeTapeArchivesInput -type DescribeTapeArchivesInput struct { - _ struct{} `type:"structure"` - - // Specifies that the number of virtual tapes descried be limited to the specified - // number. - Limit *int64 `min:"1" type:"integer"` - - // An opaque string that indicates the position at which to begin describing - // virtual tapes. - Marker *string `min:"1" type:"string"` - - // Specifies one or more unique Amazon Resource Names (ARNs) that represent - // the virtual tapes you want to describe. - TapeARNs []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeTapeArchivesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTapeArchivesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTapeArchivesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTapeArchivesInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *DescribeTapeArchivesInput) SetLimit(v int64) *DescribeTapeArchivesInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTapeArchivesInput) SetMarker(v string) *DescribeTapeArchivesInput { - s.Marker = &v - return s -} - -// SetTapeARNs sets the TapeARNs field's value. -func (s *DescribeTapeArchivesInput) SetTapeARNs(v []*string) *DescribeTapeArchivesInput { - s.TapeARNs = v - return s -} - -// DescribeTapeArchivesOutput -type DescribeTapeArchivesOutput struct { - _ struct{} `type:"structure"` - - // An opaque string that indicates the position at which the virtual tapes that - // were fetched for description ended. Use this marker in your next request - // to fetch the next set of virtual tapes in the virtual tape shelf (VTS). If - // there are no more virtual tapes to describe, this field does not appear in - // the response. - Marker *string `min:"1" type:"string"` - - // An array of virtual tape objects in the virtual tape shelf (VTS). The description - // includes of the Amazon Resource Name (ARN) of the virtual tapes. The information - // returned includes the Amazon Resource Names (ARNs) of the tapes, size of - // the tapes, status of the tapes, progress of the description and tape barcode. - TapeArchives []*TapeArchive `type:"list"` -} - -// String returns the string representation -func (s DescribeTapeArchivesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTapeArchivesOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTapeArchivesOutput) SetMarker(v string) *DescribeTapeArchivesOutput { - s.Marker = &v - return s -} - -// SetTapeArchives sets the TapeArchives field's value. -func (s *DescribeTapeArchivesOutput) SetTapeArchives(v []*TapeArchive) *DescribeTapeArchivesOutput { - s.TapeArchives = v - return s -} - -// DescribeTapeRecoveryPointsInput -type DescribeTapeRecoveryPointsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // Specifies that the number of virtual tape recovery points that are described - // be limited to the specified number. - Limit *int64 `min:"1" type:"integer"` - - // An opaque string that indicates the position at which to begin describing - // the virtual tape recovery points. - Marker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeTapeRecoveryPointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTapeRecoveryPointsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTapeRecoveryPointsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTapeRecoveryPointsInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeTapeRecoveryPointsInput) SetGatewayARN(v string) *DescribeTapeRecoveryPointsInput { - s.GatewayARN = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeTapeRecoveryPointsInput) SetLimit(v int64) *DescribeTapeRecoveryPointsInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTapeRecoveryPointsInput) SetMarker(v string) *DescribeTapeRecoveryPointsInput { - s.Marker = &v - return s -} - -// DescribeTapeRecoveryPointsOutput -type DescribeTapeRecoveryPointsOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - // An opaque string that indicates the position at which the virtual tape recovery - // points that were listed for description ended. - // - // Use this marker in your next request to list the next set of virtual tape - // recovery points in the list. If there are no more recovery points to describe, - // this field does not appear in the response. - Marker *string `min:"1" type:"string"` - - // An array of TapeRecoveryPointInfos that are available for the specified gateway. - TapeRecoveryPointInfos []*TapeRecoveryPointInfo `type:"list"` -} - -// String returns the string representation -func (s DescribeTapeRecoveryPointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTapeRecoveryPointsOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeTapeRecoveryPointsOutput) SetGatewayARN(v string) *DescribeTapeRecoveryPointsOutput { - s.GatewayARN = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTapeRecoveryPointsOutput) SetMarker(v string) *DescribeTapeRecoveryPointsOutput { - s.Marker = &v - return s -} - -// SetTapeRecoveryPointInfos sets the TapeRecoveryPointInfos field's value. -func (s *DescribeTapeRecoveryPointsOutput) SetTapeRecoveryPointInfos(v []*TapeRecoveryPointInfo) *DescribeTapeRecoveryPointsOutput { - s.TapeRecoveryPointInfos = v - return s -} - -// DescribeTapesInput -type DescribeTapesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // Specifies that the number of virtual tapes described be limited to the specified - // number. - // - // Amazon Web Services may impose its own limit, if this field is not set. - Limit *int64 `min:"1" type:"integer"` - - // A marker value, obtained in a previous call to DescribeTapes. This marker - // indicates which page of results to retrieve. - // - // If not specified, the first page of results is retrieved. - Marker *string `min:"1" type:"string"` - - // Specifies one or more unique Amazon Resource Names (ARNs) that represent - // the virtual tapes you want to describe. If this parameter is not specified, - // Tape gateway returns a description of all virtual tapes associated with the - // specified gateway. - TapeARNs []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeTapesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTapesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTapesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTapesInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeTapesInput) SetGatewayARN(v string) *DescribeTapesInput { - s.GatewayARN = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeTapesInput) SetLimit(v int64) *DescribeTapesInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTapesInput) SetMarker(v string) *DescribeTapesInput { - s.Marker = &v - return s -} - -// SetTapeARNs sets the TapeARNs field's value. -func (s *DescribeTapesInput) SetTapeARNs(v []*string) *DescribeTapesInput { - s.TapeARNs = v - return s -} - -// DescribeTapesOutput -type DescribeTapesOutput struct { - _ struct{} `type:"structure"` - - // An opaque string which can be used as part of a subsequent DescribeTapes - // call to retrieve the next page of results. - // - // If a response does not contain a marker, then there are no more results to - // be retrieved. - Marker *string `min:"1" type:"string"` - - // An array of virtual tape descriptions. - Tapes []*Tape `type:"list"` -} - -// String returns the string representation -func (s DescribeTapesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTapesOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTapesOutput) SetMarker(v string) *DescribeTapesOutput { - s.Marker = &v - return s -} - -// SetTapes sets the Tapes field's value. -func (s *DescribeTapesOutput) SetTapes(v []*Tape) *DescribeTapesOutput { - s.Tapes = v - return s -} - -type DescribeUploadBufferInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeUploadBufferInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUploadBufferInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeUploadBufferInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeUploadBufferInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeUploadBufferInput) SetGatewayARN(v string) *DescribeUploadBufferInput { - s.GatewayARN = &v - return s -} - -type DescribeUploadBufferOutput struct { - _ struct{} `type:"structure"` - - DiskIds []*string `type:"list"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - UploadBufferAllocatedInBytes *int64 `type:"long"` - - UploadBufferUsedInBytes *int64 `type:"long"` -} - -// String returns the string representation -func (s DescribeUploadBufferOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUploadBufferOutput) GoString() string { - return s.String() -} - -// SetDiskIds sets the DiskIds field's value. -func (s *DescribeUploadBufferOutput) SetDiskIds(v []*string) *DescribeUploadBufferOutput { - s.DiskIds = v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeUploadBufferOutput) SetGatewayARN(v string) *DescribeUploadBufferOutput { - s.GatewayARN = &v - return s -} - -// SetUploadBufferAllocatedInBytes sets the UploadBufferAllocatedInBytes field's value. -func (s *DescribeUploadBufferOutput) SetUploadBufferAllocatedInBytes(v int64) *DescribeUploadBufferOutput { - s.UploadBufferAllocatedInBytes = &v - return s -} - -// SetUploadBufferUsedInBytes sets the UploadBufferUsedInBytes field's value. -func (s *DescribeUploadBufferOutput) SetUploadBufferUsedInBytes(v int64) *DescribeUploadBufferOutput { - s.UploadBufferUsedInBytes = &v - return s -} - -// DescribeVTLDevicesInput -type DescribeVTLDevicesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // Specifies that the number of VTL devices described be limited to the specified - // number. - Limit *int64 `min:"1" type:"integer"` - - // An opaque string that indicates the position at which to begin describing - // the VTL devices. - Marker *string `min:"1" type:"string"` - - // An array of strings, where each string represents the Amazon Resource Name - // (ARN) of a VTL device. - // - // All of the specified VTL devices must be from the same gateway. If no VTL - // devices are specified, the result will contain all devices on the specified - // gateway. - VTLDeviceARNs []*string `type:"list"` -} - -// String returns the string representation -func (s DescribeVTLDevicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVTLDevicesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeVTLDevicesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeVTLDevicesInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeVTLDevicesInput) SetGatewayARN(v string) *DescribeVTLDevicesInput { - s.GatewayARN = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeVTLDevicesInput) SetLimit(v int64) *DescribeVTLDevicesInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeVTLDevicesInput) SetMarker(v string) *DescribeVTLDevicesInput { - s.Marker = &v - return s -} - -// SetVTLDeviceARNs sets the VTLDeviceARNs field's value. -func (s *DescribeVTLDevicesInput) SetVTLDeviceARNs(v []*string) *DescribeVTLDevicesInput { - s.VTLDeviceARNs = v - return s -} - -// DescribeVTLDevicesOutput -type DescribeVTLDevicesOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - // An opaque string that indicates the position at which the VTL devices that - // were fetched for description ended. Use the marker in your next request to - // fetch the next set of VTL devices in the list. If there are no more VTL devices - // to describe, this field does not appear in the response. - Marker *string `min:"1" type:"string"` - - // An array of VTL device objects composed of the Amazon Resource Name(ARN) - // of the VTL devices. - VTLDevices []*VTLDevice `type:"list"` -} - -// String returns the string representation -func (s DescribeVTLDevicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVTLDevicesOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeVTLDevicesOutput) SetGatewayARN(v string) *DescribeVTLDevicesOutput { - s.GatewayARN = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeVTLDevicesOutput) SetMarker(v string) *DescribeVTLDevicesOutput { - s.Marker = &v - return s -} - -// SetVTLDevices sets the VTLDevices field's value. -func (s *DescribeVTLDevicesOutput) SetVTLDevices(v []*VTLDevice) *DescribeVTLDevicesOutput { - s.VTLDevices = v - return s -} - -// A JSON object containing the of the gateway. -type DescribeWorkingStorageInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeWorkingStorageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkingStorageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeWorkingStorageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeWorkingStorageInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeWorkingStorageInput) SetGatewayARN(v string) *DescribeWorkingStorageInput { - s.GatewayARN = &v - return s -} - -// A JSON object containing the following fields: -type DescribeWorkingStorageOutput struct { - _ struct{} `type:"structure"` - - // An array of the gateway's local disk IDs that are configured as working storage. - // Each local disk ID is specified as a string (minimum length of 1 and maximum - // length of 300). If no local disks are configured as working storage, then - // the DiskIds array is empty. - DiskIds []*string `type:"list"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - // The total working storage in bytes allocated for the gateway. If no working - // storage is configured for the gateway, this field returns 0. - WorkingStorageAllocatedInBytes *int64 `type:"long"` - - // The total working storage in bytes in use by the gateway. If no working storage - // is configured for the gateway, this field returns 0. - WorkingStorageUsedInBytes *int64 `type:"long"` -} - -// String returns the string representation -func (s DescribeWorkingStorageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkingStorageOutput) GoString() string { - return s.String() -} - -// SetDiskIds sets the DiskIds field's value. -func (s *DescribeWorkingStorageOutput) SetDiskIds(v []*string) *DescribeWorkingStorageOutput { - s.DiskIds = v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DescribeWorkingStorageOutput) SetGatewayARN(v string) *DescribeWorkingStorageOutput { - s.GatewayARN = &v - return s -} - -// SetWorkingStorageAllocatedInBytes sets the WorkingStorageAllocatedInBytes field's value. -func (s *DescribeWorkingStorageOutput) SetWorkingStorageAllocatedInBytes(v int64) *DescribeWorkingStorageOutput { - s.WorkingStorageAllocatedInBytes = &v - return s -} - -// SetWorkingStorageUsedInBytes sets the WorkingStorageUsedInBytes field's value. -func (s *DescribeWorkingStorageOutput) SetWorkingStorageUsedInBytes(v int64) *DescribeWorkingStorageOutput { - s.WorkingStorageUsedInBytes = &v - return s -} - -// AttachVolumeInput -type DetachVolumeInput struct { - _ struct{} `type:"structure"` - - // Set to true to forcibly remove the iSCSI connection of the target volume - // and detach the volume. The default is false. If this value is set to false, - // you must manually disconnect the iSCSI connection from the target volume. - ForceDetach *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the volume to detach from the gateway. - // - // VolumeARN is a required field - VolumeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachVolumeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachVolumeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachVolumeInput"} - if s.VolumeARN == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeARN")) - } - if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForceDetach sets the ForceDetach field's value. -func (s *DetachVolumeInput) SetForceDetach(v bool) *DetachVolumeInput { - s.ForceDetach = &v - return s -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *DetachVolumeInput) SetVolumeARN(v string) *DetachVolumeInput { - s.VolumeARN = &v - return s -} - -// AttachVolumeOutput -type DetachVolumeOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the volume that was detached. - VolumeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s DetachVolumeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachVolumeOutput) GoString() string { - return s.String() -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *DetachVolumeOutput) SetVolumeARN(v string) *DetachVolumeOutput { - s.VolumeARN = &v - return s -} - -// Lists iSCSI information about a VTL device. -type DeviceiSCSIAttributes struct { - _ struct{} `type:"structure"` - - // Indicates whether mutual CHAP is enabled for the iSCSI target. - ChapEnabled *bool `type:"boolean"` - - // The network interface identifier of the VTL device. - NetworkInterfaceId *string `type:"string"` - - // The port used to communicate with iSCSI VTL device targets. - NetworkInterfacePort *int64 `type:"integer"` - - // Specifies the unique Amazon Resource Name (ARN) that encodes the iSCSI qualified - // name(iqn) of a tape drive or media changer target. - TargetARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s DeviceiSCSIAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeviceiSCSIAttributes) GoString() string { - return s.String() -} - -// SetChapEnabled sets the ChapEnabled field's value. -func (s *DeviceiSCSIAttributes) SetChapEnabled(v bool) *DeviceiSCSIAttributes { - s.ChapEnabled = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *DeviceiSCSIAttributes) SetNetworkInterfaceId(v string) *DeviceiSCSIAttributes { - s.NetworkInterfaceId = &v - return s -} - -// SetNetworkInterfacePort sets the NetworkInterfacePort field's value. -func (s *DeviceiSCSIAttributes) SetNetworkInterfacePort(v int64) *DeviceiSCSIAttributes { - s.NetworkInterfacePort = &v - return s -} - -// SetTargetARN sets the TargetARN field's value. -func (s *DeviceiSCSIAttributes) SetTargetARN(v string) *DeviceiSCSIAttributes { - s.TargetARN = &v - return s -} - -// DisableGatewayInput -type DisableGatewayInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisableGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableGatewayInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DisableGatewayInput) SetGatewayARN(v string) *DisableGatewayInput { - s.GatewayARN = &v - return s -} - -// DisableGatewayOutput -type DisableGatewayOutput struct { - _ struct{} `type:"structure"` - - // The unique Amazon Resource Name (ARN) of the disabled gateway. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s DisableGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableGatewayOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *DisableGatewayOutput) SetGatewayARN(v string) *DisableGatewayOutput { - s.GatewayARN = &v - return s -} - -// Represents a gateway's local disk. -type Disk struct { - _ struct{} `type:"structure"` - - // The iSCSI qualified name (IQN) that is defined for a disk. This field is - // not included in the response if the local disk is not defined as an iSCSI - // target. The format of this field is targetIqn::LUNNumber::region-volumeId. - DiskAllocationResource *string `type:"string"` - - // One of the DiskAllocationType enumeration values that identifies how a local - // disk is used. Valid values: UPLOAD_BUFFER, CACHE_STORAGE - DiskAllocationType *string `min:"3" type:"string"` - - // A list of values that represents attributes of a local disk. - DiskAttributeList []*string `type:"list"` - - // The unique device ID or other distinguishing data that identifies a local - // disk. - DiskId *string `min:"1" type:"string"` - - // The device node of a local disk as assigned by the virtualization environment. - DiskNode *string `type:"string"` - - // The path of a local disk in the gateway virtual machine (VM). - DiskPath *string `type:"string"` - - // The local disk size in bytes. - DiskSizeInBytes *int64 `type:"long"` - - // A value that represents the status of a local disk. - DiskStatus *string `type:"string"` -} - -// String returns the string representation -func (s Disk) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Disk) GoString() string { - return s.String() -} - -// SetDiskAllocationResource sets the DiskAllocationResource field's value. -func (s *Disk) SetDiskAllocationResource(v string) *Disk { - s.DiskAllocationResource = &v - return s -} - -// SetDiskAllocationType sets the DiskAllocationType field's value. -func (s *Disk) SetDiskAllocationType(v string) *Disk { - s.DiskAllocationType = &v - return s -} - -// SetDiskAttributeList sets the DiskAttributeList field's value. -func (s *Disk) SetDiskAttributeList(v []*string) *Disk { - s.DiskAttributeList = v - return s -} - -// SetDiskId sets the DiskId field's value. -func (s *Disk) SetDiskId(v string) *Disk { - s.DiskId = &v - return s -} - -// SetDiskNode sets the DiskNode field's value. -func (s *Disk) SetDiskNode(v string) *Disk { - s.DiskNode = &v - return s -} - -// SetDiskPath sets the DiskPath field's value. -func (s *Disk) SetDiskPath(v string) *Disk { - s.DiskPath = &v - return s -} - -// SetDiskSizeInBytes sets the DiskSizeInBytes field's value. -func (s *Disk) SetDiskSizeInBytes(v int64) *Disk { - s.DiskSizeInBytes = &v - return s -} - -// SetDiskStatus sets the DiskStatus field's value. -func (s *Disk) SetDiskStatus(v string) *Disk { - s.DiskStatus = &v - return s -} - -// Provides additional information about an error that was returned by the service -// as an or. See the errorCode and errorDetails members for more information -// about the error. -type Error struct { - _ struct{} `type:"structure"` - - // Additional information about the error. - ErrorCode *string `locationName:"errorCode" type:"string" enum:"ErrorCode"` - - // Human-readable text that provides detail about the error that occurred. - ErrorDetails map[string]*string `locationName:"errorDetails" type:"map"` -} - -// String returns the string representation -func (s Error) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Error) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *Error) SetErrorCode(v string) *Error { - s.ErrorCode = &v - return s -} - -// SetErrorDetails sets the ErrorDetails field's value. -func (s *Error) SetErrorDetails(v map[string]*string) *Error { - s.ErrorDetails = v - return s -} - -// Describes a file share. -type FileShareInfo struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the file share. - FileShareARN *string `min:"50" type:"string"` - - // The ID of the file share. - FileShareId *string `min:"12" type:"string"` - - // The status of the file share. Possible values are CREATING, UPDATING, AVAILABLE - // and DELETING. - FileShareStatus *string `min:"3" type:"string"` - - // The type of the file share. - FileShareType *string `type:"string" enum:"FileShareType"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s FileShareInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FileShareInfo) GoString() string { - return s.String() -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *FileShareInfo) SetFileShareARN(v string) *FileShareInfo { - s.FileShareARN = &v - return s -} - -// SetFileShareId sets the FileShareId field's value. -func (s *FileShareInfo) SetFileShareId(v string) *FileShareInfo { - s.FileShareId = &v - return s -} - -// SetFileShareStatus sets the FileShareStatus field's value. -func (s *FileShareInfo) SetFileShareStatus(v string) *FileShareInfo { - s.FileShareStatus = &v - return s -} - -// SetFileShareType sets the FileShareType field's value. -func (s *FileShareInfo) SetFileShareType(v string) *FileShareInfo { - s.FileShareType = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *FileShareInfo) SetGatewayARN(v string) *FileShareInfo { - s.GatewayARN = &v - return s -} - -// Describes a gateway object. -type GatewayInfo struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - // The unique identifier assigned to your gateway during activation. This ID - // becomes part of the gateway Amazon Resource Name (ARN), which you use as - // input for other operations. - GatewayId *string `min:"12" type:"string"` - - // The name of the gateway. - GatewayName *string `type:"string"` - - // The state of the gateway. - // - // Valid Values: DISABLED or ACTIVE - GatewayOperationalState *string `min:"2" type:"string"` - - // The type of the gateway. - GatewayType *string `min:"2" type:"string"` -} - -// String returns the string representation -func (s GatewayInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GatewayInfo) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *GatewayInfo) SetGatewayARN(v string) *GatewayInfo { - s.GatewayARN = &v - return s -} - -// SetGatewayId sets the GatewayId field's value. -func (s *GatewayInfo) SetGatewayId(v string) *GatewayInfo { - s.GatewayId = &v - return s -} - -// SetGatewayName sets the GatewayName field's value. -func (s *GatewayInfo) SetGatewayName(v string) *GatewayInfo { - s.GatewayName = &v - return s -} - -// SetGatewayOperationalState sets the GatewayOperationalState field's value. -func (s *GatewayInfo) SetGatewayOperationalState(v string) *GatewayInfo { - s.GatewayOperationalState = &v - return s -} - -// SetGatewayType sets the GatewayType field's value. -func (s *GatewayInfo) SetGatewayType(v string) *GatewayInfo { - s.GatewayType = &v - return s -} - -// JoinDomainInput -type JoinDomainInput struct { - _ struct{} `type:"structure"` - - // List of IPv4 addresses, NetBIOS names, or host names of your domain server. - // If you need to specify the port number include it after the colon (“:”). - // For example, mydc.mydomain.com:389. - DomainControllers []*string `type:"list"` - - // The name of the domain that you want the gateway to join. - // - // DomainName is a required field - DomainName *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // The organizational unit (OU) is a container with an Active Directory that - // can hold users, groups, computers, and other OUs and this parameter specifies - // the OU that the gateway will join within the AD domain. - OrganizationalUnit *string `min:"1" type:"string"` - - // Sets the password of the user who has permission to add the gateway to the - // Active Directory domain. - // - // Password is a required field - Password *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // Sets the user name of user who has permission to add the gateway to the Active - // Directory domain. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s JoinDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JoinDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *JoinDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "JoinDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.DomainName != nil && len(*s.DomainName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) - } - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.OrganizationalUnit != nil && len(*s.OrganizationalUnit) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OrganizationalUnit", 1)) - } - if s.Password == nil { - invalidParams.Add(request.NewErrParamRequired("Password")) - } - if s.Password != nil && len(*s.Password) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Password", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainControllers sets the DomainControllers field's value. -func (s *JoinDomainInput) SetDomainControllers(v []*string) *JoinDomainInput { - s.DomainControllers = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *JoinDomainInput) SetDomainName(v string) *JoinDomainInput { - s.DomainName = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *JoinDomainInput) SetGatewayARN(v string) *JoinDomainInput { - s.GatewayARN = &v - return s -} - -// SetOrganizationalUnit sets the OrganizationalUnit field's value. -func (s *JoinDomainInput) SetOrganizationalUnit(v string) *JoinDomainInput { - s.OrganizationalUnit = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *JoinDomainInput) SetPassword(v string) *JoinDomainInput { - s.Password = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *JoinDomainInput) SetUserName(v string) *JoinDomainInput { - s.UserName = &v - return s -} - -// JoinDomainOutput -type JoinDomainOutput struct { - _ struct{} `type:"structure"` - - // The unique Amazon Resource Name (ARN) of the gateway that joined the domain. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s JoinDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s JoinDomainOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *JoinDomainOutput) SetGatewayARN(v string) *JoinDomainOutput { - s.GatewayARN = &v - return s -} - -// ListFileShareInput -type ListFileSharesInput struct { - _ struct{} `type:"structure"` - - // The Amazon resource Name (ARN) of the gateway whose file shares you want - // to list. If this field is not present, all file shares under your account - // are listed. - GatewayARN *string `min:"50" type:"string"` - - // The maximum number of file shares to return in the response. The value must - // be an integer with a value greater than zero. Optional. - Limit *int64 `min:"1" type:"integer"` - - // Opaque pagination token returned from a previous ListFileShares operation. - // If present, Marker specifies where to continue the list from after a previous - // call to ListFileShares. Optional. - Marker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListFileSharesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFileSharesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListFileSharesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListFileSharesInput"} - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *ListFileSharesInput) SetGatewayARN(v string) *ListFileSharesInput { - s.GatewayARN = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListFileSharesInput) SetLimit(v int64) *ListFileSharesInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListFileSharesInput) SetMarker(v string) *ListFileSharesInput { - s.Marker = &v - return s -} - -// ListFileShareOutput -type ListFileSharesOutput struct { - _ struct{} `type:"structure"` - - // An array of information about the file gateway's file shares. - FileShareInfoList []*FileShareInfo `type:"list"` - - // If the request includes Marker, the response returns that value in this field. - Marker *string `min:"1" type:"string"` - - // If a value is present, there are more file shares to return. In a subsequent - // request, use NextMarker as the value for Marker to retrieve the next set - // of file shares. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListFileSharesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFileSharesOutput) GoString() string { - return s.String() -} - -// SetFileShareInfoList sets the FileShareInfoList field's value. -func (s *ListFileSharesOutput) SetFileShareInfoList(v []*FileShareInfo) *ListFileSharesOutput { - s.FileShareInfoList = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListFileSharesOutput) SetMarker(v string) *ListFileSharesOutput { - s.Marker = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListFileSharesOutput) SetNextMarker(v string) *ListFileSharesOutput { - s.NextMarker = &v - return s -} - -// A JSON object containing zero or more of the following fields: -// -// * ListGatewaysInput$Limit -// -// * ListGatewaysInput$Marker -type ListGatewaysInput struct { - _ struct{} `type:"structure"` - - // Specifies that the list of gateways returned be limited to the specified - // number of items. - Limit *int64 `min:"1" type:"integer"` - - // An opaque string that indicates the position at which to begin the returned - // list of gateways. - Marker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListGatewaysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListGatewaysInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListGatewaysInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListGatewaysInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListGatewaysInput) SetLimit(v int64) *ListGatewaysInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListGatewaysInput) SetMarker(v string) *ListGatewaysInput { - s.Marker = &v - return s -} - -type ListGatewaysOutput struct { - _ struct{} `type:"structure"` - - Gateways []*GatewayInfo `type:"list"` - - Marker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListGatewaysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListGatewaysOutput) GoString() string { - return s.String() -} - -// SetGateways sets the Gateways field's value. -func (s *ListGatewaysOutput) SetGateways(v []*GatewayInfo) *ListGatewaysOutput { - s.Gateways = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListGatewaysOutput) SetMarker(v string) *ListGatewaysOutput { - s.Marker = &v - return s -} - -// A JSON object containing the of the gateway. -type ListLocalDisksInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListLocalDisksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLocalDisksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListLocalDisksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListLocalDisksInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *ListLocalDisksInput) SetGatewayARN(v string) *ListLocalDisksInput { - s.GatewayARN = &v - return s -} - -type ListLocalDisksOutput struct { - _ struct{} `type:"structure"` - - Disks []*Disk `type:"list"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s ListLocalDisksOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLocalDisksOutput) GoString() string { - return s.String() -} - -// SetDisks sets the Disks field's value. -func (s *ListLocalDisksOutput) SetDisks(v []*Disk) *ListLocalDisksOutput { - s.Disks = v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *ListLocalDisksOutput) SetGatewayARN(v string) *ListLocalDisksOutput { - s.GatewayARN = &v - return s -} - -// ListTagsForResourceInput -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // Specifies that the list of tags returned be limited to the specified number - // of items. - Limit *int64 `min:"1" type:"integer"` - - // An opaque string that indicates the position at which to begin returning - // the list of tags. - Marker *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the resource for which you want to list - // tags. - // - // ResourceARN is a required field - ResourceARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListTagsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.ResourceARN == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceARN")) - } - if s.ResourceARN != nil && len(*s.ResourceARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListTagsForResourceInput) SetLimit(v int64) *ListTagsForResourceInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListTagsForResourceInput) SetMarker(v string) *ListTagsForResourceInput { - s.Marker = &v - return s -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { - s.ResourceARN = &v - return s -} - -// ListTagsForResourceOutput -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // An opaque string that indicates the position at which to stop returning the - // list of tags. - Marker *string `min:"1" type:"string"` - - // he Amazon Resource Name (ARN) of the resource for which you want to list - // tags. - ResourceARN *string `min:"50" type:"string"` - - // An array that contains the tags for the specified resource. - Tags []*Tag `type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListTagsForResourceOutput) SetMarker(v string) *ListTagsForResourceOutput { - s.Marker = &v - return s -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *ListTagsForResourceOutput) SetResourceARN(v string) *ListTagsForResourceOutput { - s.ResourceARN = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -// A JSON object that contains one or more of the following fields: -// -// * ListTapesInput$Limit -// -// * ListTapesInput$Marker -// -// * ListTapesInput$TapeARNs -type ListTapesInput struct { - _ struct{} `type:"structure"` - - // An optional number limit for the tapes in the list returned by this call. - Limit *int64 `min:"1" type:"integer"` - - // A string that indicates the position at which to begin the returned list - // of tapes. - Marker *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of each of the tapes you want to list. If - // you don't specify a tape ARN, the response lists all tapes in both your VTL - // and VTS. - TapeARNs []*string `type:"list"` -} - -// String returns the string representation -func (s ListTapesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTapesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTapesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTapesInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListTapesInput) SetLimit(v int64) *ListTapesInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListTapesInput) SetMarker(v string) *ListTapesInput { - s.Marker = &v - return s -} - -// SetTapeARNs sets the TapeARNs field's value. -func (s *ListTapesInput) SetTapeARNs(v []*string) *ListTapesInput { - s.TapeARNs = v - return s -} - -// A JSON object containing the following fields: -// -// * ListTapesOutput$Marker -// -// * ListTapesOutput$VolumeInfos -type ListTapesOutput struct { - _ struct{} `type:"structure"` - - // A string that indicates the position at which to begin returning the next - // list of tapes. Use the marker in your next request to continue pagination - // of tapes. If there are no more tapes to list, this element does not appear - // in the response body. - Marker *string `min:"1" type:"string"` - - // An array of TapeInfo objects, where each object describes an a single tape. - // If there not tapes in the tape library or VTS, then the TapeInfos is an empty - // array. - TapeInfos []*TapeInfo `type:"list"` -} - -// String returns the string representation -func (s ListTapesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTapesOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListTapesOutput) SetMarker(v string) *ListTapesOutput { - s.Marker = &v - return s -} - -// SetTapeInfos sets the TapeInfos field's value. -func (s *ListTapesOutput) SetTapeInfos(v []*TapeInfo) *ListTapesOutput { - s.TapeInfos = v - return s -} - -// ListVolumeInitiatorsInput -type ListVolumeInitiatorsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation - // to return a list of gateway volumes for the gateway. - // - // VolumeARN is a required field - VolumeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListVolumeInitiatorsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVolumeInitiatorsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListVolumeInitiatorsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListVolumeInitiatorsInput"} - if s.VolumeARN == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeARN")) - } - if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *ListVolumeInitiatorsInput) SetVolumeARN(v string) *ListVolumeInitiatorsInput { - s.VolumeARN = &v - return s -} - -// ListVolumeInitiatorsOutput -type ListVolumeInitiatorsOutput struct { - _ struct{} `type:"structure"` - - // The host names and port numbers of all iSCSI initiators that are connected - // to the gateway. - Initiators []*string `type:"list"` -} - -// String returns the string representation -func (s ListVolumeInitiatorsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVolumeInitiatorsOutput) GoString() string { - return s.String() -} - -// SetInitiators sets the Initiators field's value. -func (s *ListVolumeInitiatorsOutput) SetInitiators(v []*string) *ListVolumeInitiatorsOutput { - s.Initiators = v - return s -} - -type ListVolumeRecoveryPointsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListVolumeRecoveryPointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVolumeRecoveryPointsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListVolumeRecoveryPointsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListVolumeRecoveryPointsInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *ListVolumeRecoveryPointsInput) SetGatewayARN(v string) *ListVolumeRecoveryPointsInput { - s.GatewayARN = &v - return s -} - -type ListVolumeRecoveryPointsOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - VolumeRecoveryPointInfos []*VolumeRecoveryPointInfo `type:"list"` -} - -// String returns the string representation -func (s ListVolumeRecoveryPointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVolumeRecoveryPointsOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *ListVolumeRecoveryPointsOutput) SetGatewayARN(v string) *ListVolumeRecoveryPointsOutput { - s.GatewayARN = &v - return s -} - -// SetVolumeRecoveryPointInfos sets the VolumeRecoveryPointInfos field's value. -func (s *ListVolumeRecoveryPointsOutput) SetVolumeRecoveryPointInfos(v []*VolumeRecoveryPointInfo) *ListVolumeRecoveryPointsOutput { - s.VolumeRecoveryPointInfos = v - return s -} - -// A JSON object that contains one or more of the following fields: -// -// * ListVolumesInput$Limit -// -// * ListVolumesInput$Marker -type ListVolumesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - // Specifies that the list of volumes returned be limited to the specified number - // of items. - Limit *int64 `min:"1" type:"integer"` - - // A string that indicates the position at which to begin the returned list - // of volumes. Obtain the marker from the response of a previous List iSCSI - // Volumes request. - Marker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListVolumesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVolumesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListVolumesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListVolumesInput"} - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *ListVolumesInput) SetGatewayARN(v string) *ListVolumesInput { - s.GatewayARN = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *ListVolumesInput) SetLimit(v int64) *ListVolumesInput { - s.Limit = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListVolumesInput) SetMarker(v string) *ListVolumesInput { - s.Marker = &v - return s -} - -type ListVolumesOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - Marker *string `min:"1" type:"string"` - - VolumeInfos []*VolumeInfo `type:"list"` -} - -// String returns the string representation -func (s ListVolumesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListVolumesOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *ListVolumesOutput) SetGatewayARN(v string) *ListVolumesOutput { - s.GatewayARN = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListVolumesOutput) SetMarker(v string) *ListVolumesOutput { - s.Marker = &v - return s -} - -// SetVolumeInfos sets the VolumeInfos field's value. -func (s *ListVolumesOutput) SetVolumeInfos(v []*VolumeInfo) *ListVolumesOutput { - s.VolumeInfos = v - return s -} - -// Describes Network File System (NFS) file share default values. Files and -// folders stored as Amazon S3 objects in S3 buckets don't, by default, have -// Unix file permissions assigned to them. Upon discovery in an S3 bucket by -// Storage Gateway, the S3 objects that represent files and folders are assigned -// these default Unix permissions. This operation is only supported for file -// gateways. -type NFSFileShareDefaults struct { - _ struct{} `type:"structure"` - - // The Unix directory mode in the form "nnnn". For example, "0666" represents - // the default access mode for all directories inside the file share. The default - // value is 0777. - DirectoryMode *string `min:"1" type:"string"` - - // The Unix file mode in the form "nnnn". For example, "0666" represents the - // default file mode inside the file share. The default value is 0666. - FileMode *string `min:"1" type:"string"` - - // The default group ID for the file share (unless the files have another group - // ID specified). The default value is nfsnobody. - GroupId *int64 `type:"long"` - - // The default owner ID for files in the file share (unless the files have another - // owner ID specified). The default value is nfsnobody. - OwnerId *int64 `type:"long"` -} - -// String returns the string representation -func (s NFSFileShareDefaults) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NFSFileShareDefaults) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NFSFileShareDefaults) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NFSFileShareDefaults"} - if s.DirectoryMode != nil && len(*s.DirectoryMode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DirectoryMode", 1)) - } - if s.FileMode != nil && len(*s.FileMode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileMode", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryMode sets the DirectoryMode field's value. -func (s *NFSFileShareDefaults) SetDirectoryMode(v string) *NFSFileShareDefaults { - s.DirectoryMode = &v - return s -} - -// SetFileMode sets the FileMode field's value. -func (s *NFSFileShareDefaults) SetFileMode(v string) *NFSFileShareDefaults { - s.FileMode = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *NFSFileShareDefaults) SetGroupId(v int64) *NFSFileShareDefaults { - s.GroupId = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *NFSFileShareDefaults) SetOwnerId(v int64) *NFSFileShareDefaults { - s.OwnerId = &v - return s -} - -// The Unix file permissions and ownership information assigned, by default, -// to native S3 objects when file gateway discovers them in S3 buckets. This -// operation is only supported in file gateways. -type NFSFileShareInfo struct { - _ struct{} `type:"structure"` - - // The list of clients that are allowed to access the file gateway. The list - // must contain either valid IP addresses or valid CIDR blocks. - ClientList []*string `min:"1" type:"list"` - - // The default storage class for objects put into an Amazon S3 bucket by the - // file gateway. Possible values are S3_STANDARD, S3_STANDARD_IA, or S3_ONEZONE_IA. - // If this field is not populated, the default value S3_STANDARD is used. Optional. - DefaultStorageClass *string `min:"5" type:"string"` - - // The Amazon Resource Name (ARN) of the file share. - FileShareARN *string `min:"50" type:"string"` - - // The ID of the file share. - FileShareId *string `min:"12" type:"string"` - - // The status of the file share. Possible values are CREATING, UPDATING, AVAILABLE - // and DELETING. - FileShareStatus *string `min:"3" type:"string"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - // A value that enables guessing of the MIME type for uploaded objects based - // on file extensions. Set this value to true to enable MIME type guessing, - // and otherwise to false. The default value is true. - GuessMIMETypeEnabled *bool `type:"boolean"` - - // True to use Amazon S3 server side encryption with your own AWS KMS key, or - // false to use a key managed by Amazon S3. Optional. - KMSEncrypted *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. - KMSKey *string `min:"20" type:"string"` - - // The ARN of the backend storage used for storing file data. - LocationARN *string `min:"16" type:"string"` - - // Describes Network File System (NFS) file share default values. Files and - // folders stored as Amazon S3 objects in S3 buckets don't, by default, have - // Unix file permissions assigned to them. Upon discovery in an S3 bucket by - // Storage Gateway, the S3 objects that represent files and folders are assigned - // these default Unix permissions. This operation is only supported for file - // gateways. - NFSFileShareDefaults *NFSFileShareDefaults `type:"structure"` - - // A value that sets the access control list permission for objects in the S3 - // bucket that a file gateway puts objects into. The default value is "private". - ObjectACL *string `type:"string" enum:"ObjectACL"` - - // The file share path used by the NFS client to identify the mount point. - Path *string `type:"string"` - - // A value that sets the write status of a file share. This value is true if - // the write status is read-only, and otherwise false. - ReadOnly *bool `type:"boolean"` - - // A value that sets the access control list permission for objects in the Amazon - // S3 bucket that a file gateway puts objects into. The default value is private. - RequesterPays *bool `type:"boolean"` - - // The ARN of the IAM role that file gateway assumes when it accesses the underlying - // storage. - Role *string `min:"20" type:"string"` - - // The user mapped to anonymous user. Valid options are the following: - // - // * RootSquash - Only root is mapped to anonymous user. - // - // * NoSquash - No one is mapped to anonymous user - // - // * AllSquash - Everyone is mapped to anonymous user. - Squash *string `min:"5" type:"string"` -} - -// String returns the string representation -func (s NFSFileShareInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NFSFileShareInfo) GoString() string { - return s.String() -} - -// SetClientList sets the ClientList field's value. -func (s *NFSFileShareInfo) SetClientList(v []*string) *NFSFileShareInfo { - s.ClientList = v - return s -} - -// SetDefaultStorageClass sets the DefaultStorageClass field's value. -func (s *NFSFileShareInfo) SetDefaultStorageClass(v string) *NFSFileShareInfo { - s.DefaultStorageClass = &v - return s -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *NFSFileShareInfo) SetFileShareARN(v string) *NFSFileShareInfo { - s.FileShareARN = &v - return s -} - -// SetFileShareId sets the FileShareId field's value. -func (s *NFSFileShareInfo) SetFileShareId(v string) *NFSFileShareInfo { - s.FileShareId = &v - return s -} - -// SetFileShareStatus sets the FileShareStatus field's value. -func (s *NFSFileShareInfo) SetFileShareStatus(v string) *NFSFileShareInfo { - s.FileShareStatus = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *NFSFileShareInfo) SetGatewayARN(v string) *NFSFileShareInfo { - s.GatewayARN = &v - return s -} - -// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. -func (s *NFSFileShareInfo) SetGuessMIMETypeEnabled(v bool) *NFSFileShareInfo { - s.GuessMIMETypeEnabled = &v - return s -} - -// SetKMSEncrypted sets the KMSEncrypted field's value. -func (s *NFSFileShareInfo) SetKMSEncrypted(v bool) *NFSFileShareInfo { - s.KMSEncrypted = &v - return s -} - -// SetKMSKey sets the KMSKey field's value. -func (s *NFSFileShareInfo) SetKMSKey(v string) *NFSFileShareInfo { - s.KMSKey = &v - return s -} - -// SetLocationARN sets the LocationARN field's value. -func (s *NFSFileShareInfo) SetLocationARN(v string) *NFSFileShareInfo { - s.LocationARN = &v - return s -} - -// SetNFSFileShareDefaults sets the NFSFileShareDefaults field's value. -func (s *NFSFileShareInfo) SetNFSFileShareDefaults(v *NFSFileShareDefaults) *NFSFileShareInfo { - s.NFSFileShareDefaults = v - return s -} - -// SetObjectACL sets the ObjectACL field's value. -func (s *NFSFileShareInfo) SetObjectACL(v string) *NFSFileShareInfo { - s.ObjectACL = &v - return s -} - -// SetPath sets the Path field's value. -func (s *NFSFileShareInfo) SetPath(v string) *NFSFileShareInfo { - s.Path = &v - return s -} - -// SetReadOnly sets the ReadOnly field's value. -func (s *NFSFileShareInfo) SetReadOnly(v bool) *NFSFileShareInfo { - s.ReadOnly = &v - return s -} - -// SetRequesterPays sets the RequesterPays field's value. -func (s *NFSFileShareInfo) SetRequesterPays(v bool) *NFSFileShareInfo { - s.RequesterPays = &v - return s -} - -// SetRole sets the Role field's value. -func (s *NFSFileShareInfo) SetRole(v string) *NFSFileShareInfo { - s.Role = &v - return s -} - -// SetSquash sets the Squash field's value. -func (s *NFSFileShareInfo) SetSquash(v string) *NFSFileShareInfo { - s.Squash = &v - return s -} - -// Describes a gateway's network interface. -type NetworkInterface struct { - _ struct{} `type:"structure"` - - // The Internet Protocol version 4 (IPv4) address of the interface. - Ipv4Address *string `type:"string"` - - // The Internet Protocol version 6 (IPv6) address of the interface. Currently - // not supported. - Ipv6Address *string `type:"string"` - - // The Media Access Control (MAC) address of the interface. - // - // This is currently unsupported and will not be returned in output. - MacAddress *string `type:"string"` -} - -// String returns the string representation -func (s NetworkInterface) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NetworkInterface) GoString() string { - return s.String() -} - -// SetIpv4Address sets the Ipv4Address field's value. -func (s *NetworkInterface) SetIpv4Address(v string) *NetworkInterface { - s.Ipv4Address = &v - return s -} - -// SetIpv6Address sets the Ipv6Address field's value. -func (s *NetworkInterface) SetIpv6Address(v string) *NetworkInterface { - s.Ipv6Address = &v - return s -} - -// SetMacAddress sets the MacAddress field's value. -func (s *NetworkInterface) SetMacAddress(v string) *NetworkInterface { - s.MacAddress = &v - return s -} - -type NotifyWhenUploadedInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the file share. - // - // FileShareARN is a required field - FileShareARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s NotifyWhenUploadedInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NotifyWhenUploadedInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NotifyWhenUploadedInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NotifyWhenUploadedInput"} - if s.FileShareARN == nil { - invalidParams.Add(request.NewErrParamRequired("FileShareARN")) - } - if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *NotifyWhenUploadedInput) SetFileShareARN(v string) *NotifyWhenUploadedInput { - s.FileShareARN = &v - return s -} - -type NotifyWhenUploadedOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the file share. - FileShareARN *string `min:"50" type:"string"` - - // The randomly generated ID of the notification that was sent. This ID is in - // UUID format. - NotificationId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s NotifyWhenUploadedOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s NotifyWhenUploadedOutput) GoString() string { - return s.String() -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *NotifyWhenUploadedOutput) SetFileShareARN(v string) *NotifyWhenUploadedOutput { - s.FileShareARN = &v - return s -} - -// SetNotificationId sets the NotificationId field's value. -func (s *NotifyWhenUploadedOutput) SetNotificationId(v string) *NotifyWhenUploadedOutput { - s.NotificationId = &v - return s -} - -// RefreshCacheInput -type RefreshCacheInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the file share you want to refresh. - // - // FileShareARN is a required field - FileShareARN *string `min:"50" type:"string" required:"true"` - - // A comma-separated list of the paths of folders to refresh in the cache. The - // default is ["/"]. The default refreshes objects and folders at the root of - // the Amazon S3 bucket. If Recursive is set to "true", the entire S3 bucket - // that the file share has access to is refreshed. - FolderList []*string `min:"1" type:"list"` - - // A value that specifies whether to recursively refresh folders in the cache. - // The refresh includes folders that were in the cache the last time the gateway - // listed the folder's contents. If this value set to "true", each folder that - // is listed in FolderList is recursively updated. Otherwise, subfolders listed - // in FolderList are not refreshed. Only objects that are in folders listed - // directly under FolderList are found and used for the update. The default - // is "true". - Recursive *bool `type:"boolean"` -} - -// String returns the string representation -func (s RefreshCacheInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RefreshCacheInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RefreshCacheInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RefreshCacheInput"} - if s.FileShareARN == nil { - invalidParams.Add(request.NewErrParamRequired("FileShareARN")) - } - if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) - } - if s.FolderList != nil && len(s.FolderList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FolderList", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *RefreshCacheInput) SetFileShareARN(v string) *RefreshCacheInput { - s.FileShareARN = &v - return s -} - -// SetFolderList sets the FolderList field's value. -func (s *RefreshCacheInput) SetFolderList(v []*string) *RefreshCacheInput { - s.FolderList = v - return s -} - -// SetRecursive sets the Recursive field's value. -func (s *RefreshCacheInput) SetRecursive(v bool) *RefreshCacheInput { - s.Recursive = &v - return s -} - -// RefreshCacheOutput -type RefreshCacheOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the file share. - FileShareARN *string `min:"50" type:"string"` - - // The randomly generated ID of the notification that was sent. This ID is in - // UUID format. - NotificationId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s RefreshCacheOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RefreshCacheOutput) GoString() string { - return s.String() -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *RefreshCacheOutput) SetFileShareARN(v string) *RefreshCacheOutput { - s.FileShareARN = &v - return s -} - -// SetNotificationId sets the NotificationId field's value. -func (s *RefreshCacheOutput) SetNotificationId(v string) *RefreshCacheOutput { - s.NotificationId = &v - return s -} - -// RemoveTagsFromResourceInput -type RemoveTagsFromResourceInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource you want to remove the tags - // from. - // - // ResourceARN is a required field - ResourceARN *string `min:"50" type:"string" required:"true"` - - // The keys of the tags you want to remove from the specified resource. A tag - // is composed of a key/value pair. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsFromResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"} - if s.ResourceARN == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceARN")) - } - if s.ResourceARN != nil && len(*s.ResourceARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 50)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *RemoveTagsFromResourceInput) SetResourceARN(v string) *RemoveTagsFromResourceInput { - s.ResourceARN = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsFromResourceInput) SetTagKeys(v []*string) *RemoveTagsFromResourceInput { - s.TagKeys = v - return s -} - -// RemoveTagsFromResourceOutput -type RemoveTagsFromResourceOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource that the tags were removed - // from. - ResourceARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s RemoveTagsFromResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RemoveTagsFromResourceOutput) GoString() string { - return s.String() -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *RemoveTagsFromResourceOutput) SetResourceARN(v string) *RemoveTagsFromResourceOutput { - s.ResourceARN = &v - return s -} - -type ResetCacheInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s ResetCacheInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetCacheInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetCacheInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetCacheInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *ResetCacheInput) SetGatewayARN(v string) *ResetCacheInput { - s.GatewayARN = &v - return s -} - -type ResetCacheOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s ResetCacheOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ResetCacheOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *ResetCacheOutput) SetGatewayARN(v string) *ResetCacheOutput { - s.GatewayARN = &v - return s -} - -// RetrieveTapeArchiveInput -type RetrieveTapeArchiveInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway you want to retrieve the virtual - // tape to. Use the ListGateways operation to return a list of gateways for - // your account and region. - // - // You retrieve archived virtual tapes to only one gateway and the gateway must - // be a tape gateway. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the virtual tape you want to retrieve from - // the virtual tape shelf (VTS). - // - // TapeARN is a required field - TapeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s RetrieveTapeArchiveInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RetrieveTapeArchiveInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RetrieveTapeArchiveInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RetrieveTapeArchiveInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.TapeARN == nil { - invalidParams.Add(request.NewErrParamRequired("TapeARN")) - } - if s.TapeARN != nil && len(*s.TapeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *RetrieveTapeArchiveInput) SetGatewayARN(v string) *RetrieveTapeArchiveInput { - s.GatewayARN = &v - return s -} - -// SetTapeARN sets the TapeARN field's value. -func (s *RetrieveTapeArchiveInput) SetTapeARN(v string) *RetrieveTapeArchiveInput { - s.TapeARN = &v - return s -} - -// RetrieveTapeArchiveOutput -type RetrieveTapeArchiveOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the retrieved virtual tape. - TapeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s RetrieveTapeArchiveOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RetrieveTapeArchiveOutput) GoString() string { - return s.String() -} - -// SetTapeARN sets the TapeARN field's value. -func (s *RetrieveTapeArchiveOutput) SetTapeARN(v string) *RetrieveTapeArchiveOutput { - s.TapeARN = &v - return s -} - -// RetrieveTapeRecoveryPointInput -type RetrieveTapeRecoveryPointInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the virtual tape for which you want to - // retrieve the recovery point. - // - // TapeARN is a required field - TapeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s RetrieveTapeRecoveryPointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RetrieveTapeRecoveryPointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RetrieveTapeRecoveryPointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RetrieveTapeRecoveryPointInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.TapeARN == nil { - invalidParams.Add(request.NewErrParamRequired("TapeARN")) - } - if s.TapeARN != nil && len(*s.TapeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *RetrieveTapeRecoveryPointInput) SetGatewayARN(v string) *RetrieveTapeRecoveryPointInput { - s.GatewayARN = &v - return s -} - -// SetTapeARN sets the TapeARN field's value. -func (s *RetrieveTapeRecoveryPointInput) SetTapeARN(v string) *RetrieveTapeRecoveryPointInput { - s.TapeARN = &v - return s -} - -// RetrieveTapeRecoveryPointOutput -type RetrieveTapeRecoveryPointOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the virtual tape for which the recovery - // point was retrieved. - TapeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s RetrieveTapeRecoveryPointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RetrieveTapeRecoveryPointOutput) GoString() string { - return s.String() -} - -// SetTapeARN sets the TapeARN field's value. -func (s *RetrieveTapeRecoveryPointOutput) SetTapeARN(v string) *RetrieveTapeRecoveryPointOutput { - s.TapeARN = &v - return s -} - -// The Windows file permissions and ownership information assigned, by default, -// to native S3 objects when file gateway discovers them in S3 buckets. This -// operation is only supported for file gateways. -type SMBFileShareInfo struct { - _ struct{} `type:"structure"` - - // The authentication method of the file share. - // - // Valid values are ActiveDirectory or GuestAccess. The default is ActiveDirectory. - Authentication *string `min:"5" type:"string"` - - // The default storage class for objects put into an Amazon S3 bucket by the - // file gateway. Possible values are S3_STANDARD, S3_STANDARD_IA, or S3_ONEZONE_IA. - // If this field is not populated, the default value S3_STANDARD is used. Optional. - DefaultStorageClass *string `min:"5" type:"string"` - - // The Amazon Resource Name (ARN) of the file share. - FileShareARN *string `min:"50" type:"string"` - - // The ID of the file share. - FileShareId *string `min:"12" type:"string"` - - // The status of the file share. Possible values are CREATING, UPDATING, AVAILABLE - // and DELETING. - FileShareStatus *string `min:"3" type:"string"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - // A value that enables guessing of the MIME type for uploaded objects based - // on file extensions. Set this value to true to enable MIME type guessing, - // and otherwise to false. The default value is true. - GuessMIMETypeEnabled *bool `type:"boolean"` - - // A list of users or groups in the Active Directory that are not allowed to - // access the file share. A group must be prefixed with the @ character. For - // example @group1. Can only be set if Authentication is set to ActiveDirectory. - InvalidUserList []*string `type:"list"` - - // True to use Amazon S3 server-side encryption with your own AWS KMS key, or - // false to use a key managed by Amazon S3. Optional. - KMSEncrypted *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. - KMSKey *string `min:"20" type:"string"` - - // The ARN of the backend storage used for storing file data. - LocationARN *string `min:"16" type:"string"` - - // A value that sets the access control list permission for objects in the S3 - // bucket that a file gateway puts objects into. The default value is "private". - ObjectACL *string `type:"string" enum:"ObjectACL"` - - // The file share path used by the SMB client to identify the mount point. - Path *string `type:"string"` - - // A value that sets the write status of a file share. This value is true if - // the write status is read-only, and otherwise false. - ReadOnly *bool `type:"boolean"` - - // A value that sets the access control list permission for objects in the Amazon - // S3 bucket that a file gateway puts objects into. The default value is private. - RequesterPays *bool `type:"boolean"` - - // The ARN of the IAM role that file gateway assumes when it accesses the underlying - // storage. - Role *string `min:"20" type:"string"` - - // A list of users or groups in the Active Directory that are allowed to access - // the file share. A group must be prefixed with the @ character. For example - // @group1. Can only be set if Authentication is set to ActiveDirectory. - ValidUserList []*string `type:"list"` -} - -// String returns the string representation -func (s SMBFileShareInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SMBFileShareInfo) GoString() string { - return s.String() -} - -// SetAuthentication sets the Authentication field's value. -func (s *SMBFileShareInfo) SetAuthentication(v string) *SMBFileShareInfo { - s.Authentication = &v - return s -} - -// SetDefaultStorageClass sets the DefaultStorageClass field's value. -func (s *SMBFileShareInfo) SetDefaultStorageClass(v string) *SMBFileShareInfo { - s.DefaultStorageClass = &v - return s -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *SMBFileShareInfo) SetFileShareARN(v string) *SMBFileShareInfo { - s.FileShareARN = &v - return s -} - -// SetFileShareId sets the FileShareId field's value. -func (s *SMBFileShareInfo) SetFileShareId(v string) *SMBFileShareInfo { - s.FileShareId = &v - return s -} - -// SetFileShareStatus sets the FileShareStatus field's value. -func (s *SMBFileShareInfo) SetFileShareStatus(v string) *SMBFileShareInfo { - s.FileShareStatus = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *SMBFileShareInfo) SetGatewayARN(v string) *SMBFileShareInfo { - s.GatewayARN = &v - return s -} - -// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. -func (s *SMBFileShareInfo) SetGuessMIMETypeEnabled(v bool) *SMBFileShareInfo { - s.GuessMIMETypeEnabled = &v - return s -} - -// SetInvalidUserList sets the InvalidUserList field's value. -func (s *SMBFileShareInfo) SetInvalidUserList(v []*string) *SMBFileShareInfo { - s.InvalidUserList = v - return s -} - -// SetKMSEncrypted sets the KMSEncrypted field's value. -func (s *SMBFileShareInfo) SetKMSEncrypted(v bool) *SMBFileShareInfo { - s.KMSEncrypted = &v - return s -} - -// SetKMSKey sets the KMSKey field's value. -func (s *SMBFileShareInfo) SetKMSKey(v string) *SMBFileShareInfo { - s.KMSKey = &v - return s -} - -// SetLocationARN sets the LocationARN field's value. -func (s *SMBFileShareInfo) SetLocationARN(v string) *SMBFileShareInfo { - s.LocationARN = &v - return s -} - -// SetObjectACL sets the ObjectACL field's value. -func (s *SMBFileShareInfo) SetObjectACL(v string) *SMBFileShareInfo { - s.ObjectACL = &v - return s -} - -// SetPath sets the Path field's value. -func (s *SMBFileShareInfo) SetPath(v string) *SMBFileShareInfo { - s.Path = &v - return s -} - -// SetReadOnly sets the ReadOnly field's value. -func (s *SMBFileShareInfo) SetReadOnly(v bool) *SMBFileShareInfo { - s.ReadOnly = &v - return s -} - -// SetRequesterPays sets the RequesterPays field's value. -func (s *SMBFileShareInfo) SetRequesterPays(v bool) *SMBFileShareInfo { - s.RequesterPays = &v - return s -} - -// SetRole sets the Role field's value. -func (s *SMBFileShareInfo) SetRole(v string) *SMBFileShareInfo { - s.Role = &v - return s -} - -// SetValidUserList sets the ValidUserList field's value. -func (s *SMBFileShareInfo) SetValidUserList(v []*string) *SMBFileShareInfo { - s.ValidUserList = v - return s -} - -// SetLocalConsolePasswordInput -type SetLocalConsolePasswordInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // The password you want to set for your VM local console. - // - // LocalConsolePassword is a required field - LocalConsolePassword *string `min:"6" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s SetLocalConsolePasswordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetLocalConsolePasswordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetLocalConsolePasswordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetLocalConsolePasswordInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.LocalConsolePassword == nil { - invalidParams.Add(request.NewErrParamRequired("LocalConsolePassword")) - } - if s.LocalConsolePassword != nil && len(*s.LocalConsolePassword) < 6 { - invalidParams.Add(request.NewErrParamMinLen("LocalConsolePassword", 6)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *SetLocalConsolePasswordInput) SetGatewayARN(v string) *SetLocalConsolePasswordInput { - s.GatewayARN = &v - return s -} - -// SetLocalConsolePassword sets the LocalConsolePassword field's value. -func (s *SetLocalConsolePasswordInput) SetLocalConsolePassword(v string) *SetLocalConsolePasswordInput { - s.LocalConsolePassword = &v - return s -} - -type SetLocalConsolePasswordOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s SetLocalConsolePasswordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetLocalConsolePasswordOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *SetLocalConsolePasswordOutput) SetGatewayARN(v string) *SetLocalConsolePasswordOutput { - s.GatewayARN = &v - return s -} - -// SetSMBGuestPasswordInput -type SetSMBGuestPasswordInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the file gateway the SMB file share is - // associated with. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // The password that you want to set for your SMB Server. - // - // Password is a required field - Password *string `min:"6" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation -func (s SetSMBGuestPasswordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetSMBGuestPasswordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetSMBGuestPasswordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetSMBGuestPasswordInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.Password == nil { - invalidParams.Add(request.NewErrParamRequired("Password")) - } - if s.Password != nil && len(*s.Password) < 6 { - invalidParams.Add(request.NewErrParamMinLen("Password", 6)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *SetSMBGuestPasswordInput) SetGatewayARN(v string) *SetSMBGuestPasswordInput { - s.GatewayARN = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *SetSMBGuestPasswordInput) SetPassword(v string) *SetSMBGuestPasswordInput { - s.Password = &v - return s -} - -type SetSMBGuestPasswordOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s SetSMBGuestPasswordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SetSMBGuestPasswordOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *SetSMBGuestPasswordOutput) SetGatewayARN(v string) *SetSMBGuestPasswordOutput { - s.GatewayARN = &v - return s -} - -// A JSON object containing the of the gateway to shut down. -type ShutdownGatewayInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s ShutdownGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ShutdownGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ShutdownGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ShutdownGatewayInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *ShutdownGatewayInput) SetGatewayARN(v string) *ShutdownGatewayInput { - s.GatewayARN = &v - return s -} - -// A JSON object containing the of the gateway that was shut down. -type ShutdownGatewayOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s ShutdownGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ShutdownGatewayOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *ShutdownGatewayOutput) SetGatewayARN(v string) *ShutdownGatewayOutput { - s.GatewayARN = &v - return s -} - -// A JSON object containing the of the gateway to start. -type StartGatewayInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartGatewayInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartGatewayInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartGatewayInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *StartGatewayInput) SetGatewayARN(v string) *StartGatewayInput { - s.GatewayARN = &v - return s -} - -// A JSON object containing the of the gateway that was restarted. -type StartGatewayOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s StartGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartGatewayOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *StartGatewayOutput) SetGatewayARN(v string) *StartGatewayOutput { - s.GatewayARN = &v - return s -} - -// Describes an iSCSI stored volume. -type StorediSCSIVolume struct { - _ struct{} `type:"structure"` - - // The date the volume was created. Volumes created prior to March 28, 2017 - // don’t have this time stamp. - CreatedDate *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. - KMSKey *string `min:"20" type:"string"` - - // Indicates if when the stored volume was created, existing data on the underlying - // local disk was preserved. - // - // Valid Values: true, false - PreservedExistingData *bool `type:"boolean"` - - // If the stored volume was created from a snapshot, this field contains the - // snapshot ID used, e.g. snap-78e22663. Otherwise, this field is not included. - SourceSnapshotId *string `type:"string"` - - // The name of the iSCSI target that is used by an initiator to connect to a - // volume and used as a suffix for the target ARN. For example, specifying TargetName - // as myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. - TargetName *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the storage volume. - VolumeARN *string `min:"50" type:"string"` - - // A value that indicates whether a storage volume is attached to, detached - // from, or is in the process of detaching from a gateway. - VolumeAttachmentStatus *string `min:"3" type:"string"` - - // The ID of the local disk that was specified in the CreateStorediSCSIVolume - // operation. - VolumeDiskId *string `min:"1" type:"string"` - - // The unique identifier of the volume, e.g. vol-AE4B946D. - VolumeId *string `min:"12" type:"string"` - - // Represents the percentage complete if the volume is restoring or bootstrapping - // that represents the percent of data transferred. This field does not appear - // in the response if the stored volume is not restoring or bootstrapping. - VolumeProgress *float64 `type:"double"` - - // The size of the volume in bytes. - VolumeSizeInBytes *int64 `type:"long"` - - // One of the VolumeStatus values that indicates the state of the storage volume. - VolumeStatus *string `min:"3" type:"string"` - - // One of the VolumeType enumeration values describing the type of the volume. - VolumeType *string `min:"3" type:"string"` - - // The size of the data stored on the volume in bytes. - // - // This value is not available for volumes created prior to May 13, 2015, until - // you store data on the volume. - VolumeUsedInBytes *int64 `type:"long"` - - // An VolumeiSCSIAttributes object that represents a collection of iSCSI attributes - // for one stored volume. - VolumeiSCSIAttributes *VolumeiSCSIAttributes `type:"structure"` -} - -// String returns the string representation -func (s StorediSCSIVolume) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StorediSCSIVolume) GoString() string { - return s.String() -} - -// SetCreatedDate sets the CreatedDate field's value. -func (s *StorediSCSIVolume) SetCreatedDate(v time.Time) *StorediSCSIVolume { - s.CreatedDate = &v - return s -} - -// SetKMSKey sets the KMSKey field's value. -func (s *StorediSCSIVolume) SetKMSKey(v string) *StorediSCSIVolume { - s.KMSKey = &v - return s -} - -// SetPreservedExistingData sets the PreservedExistingData field's value. -func (s *StorediSCSIVolume) SetPreservedExistingData(v bool) *StorediSCSIVolume { - s.PreservedExistingData = &v - return s -} - -// SetSourceSnapshotId sets the SourceSnapshotId field's value. -func (s *StorediSCSIVolume) SetSourceSnapshotId(v string) *StorediSCSIVolume { - s.SourceSnapshotId = &v - return s -} - -// SetTargetName sets the TargetName field's value. -func (s *StorediSCSIVolume) SetTargetName(v string) *StorediSCSIVolume { - s.TargetName = &v - return s -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *StorediSCSIVolume) SetVolumeARN(v string) *StorediSCSIVolume { - s.VolumeARN = &v - return s -} - -// SetVolumeAttachmentStatus sets the VolumeAttachmentStatus field's value. -func (s *StorediSCSIVolume) SetVolumeAttachmentStatus(v string) *StorediSCSIVolume { - s.VolumeAttachmentStatus = &v - return s -} - -// SetVolumeDiskId sets the VolumeDiskId field's value. -func (s *StorediSCSIVolume) SetVolumeDiskId(v string) *StorediSCSIVolume { - s.VolumeDiskId = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *StorediSCSIVolume) SetVolumeId(v string) *StorediSCSIVolume { - s.VolumeId = &v - return s -} - -// SetVolumeProgress sets the VolumeProgress field's value. -func (s *StorediSCSIVolume) SetVolumeProgress(v float64) *StorediSCSIVolume { - s.VolumeProgress = &v - return s -} - -// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. -func (s *StorediSCSIVolume) SetVolumeSizeInBytes(v int64) *StorediSCSIVolume { - s.VolumeSizeInBytes = &v - return s -} - -// SetVolumeStatus sets the VolumeStatus field's value. -func (s *StorediSCSIVolume) SetVolumeStatus(v string) *StorediSCSIVolume { - s.VolumeStatus = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *StorediSCSIVolume) SetVolumeType(v string) *StorediSCSIVolume { - s.VolumeType = &v - return s -} - -// SetVolumeUsedInBytes sets the VolumeUsedInBytes field's value. -func (s *StorediSCSIVolume) SetVolumeUsedInBytes(v int64) *StorediSCSIVolume { - s.VolumeUsedInBytes = &v - return s -} - -// SetVolumeiSCSIAttributes sets the VolumeiSCSIAttributes field's value. -func (s *StorediSCSIVolume) SetVolumeiSCSIAttributes(v *VolumeiSCSIAttributes) *StorediSCSIVolume { - s.VolumeiSCSIAttributes = v - return s -} - -type Tag struct { - _ struct{} `type:"structure"` - - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Describes a virtual tape object. -type Tape struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. - KMSKey *string `min:"20" type:"string"` - - // For archiving virtual tapes, indicates how much data remains to be uploaded - // before archiving is complete. - // - // Range: 0 (not started) to 100 (complete). - Progress *float64 `type:"double"` - - // The Amazon Resource Name (ARN) of the virtual tape. - TapeARN *string `min:"50" type:"string"` - - // The barcode that identifies a specific virtual tape. - TapeBarcode *string `min:"7" type:"string"` - - // The date the virtual tape was created. - TapeCreatedDate *time.Time `type:"timestamp"` - - // The size, in bytes, of the virtual tape capacity. - TapeSizeInBytes *int64 `type:"long"` - - // The current state of the virtual tape. - TapeStatus *string `type:"string"` - - // The size, in bytes, of data stored on the virtual tape. - // - // This value is not available for tapes created prior to May 13, 2015. - TapeUsedInBytes *int64 `type:"long"` - - // The virtual tape library (VTL) device that the virtual tape is associated - // with. - VTLDevice *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s Tape) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tape) GoString() string { - return s.String() -} - -// SetKMSKey sets the KMSKey field's value. -func (s *Tape) SetKMSKey(v string) *Tape { - s.KMSKey = &v - return s -} - -// SetProgress sets the Progress field's value. -func (s *Tape) SetProgress(v float64) *Tape { - s.Progress = &v - return s -} - -// SetTapeARN sets the TapeARN field's value. -func (s *Tape) SetTapeARN(v string) *Tape { - s.TapeARN = &v - return s -} - -// SetTapeBarcode sets the TapeBarcode field's value. -func (s *Tape) SetTapeBarcode(v string) *Tape { - s.TapeBarcode = &v - return s -} - -// SetTapeCreatedDate sets the TapeCreatedDate field's value. -func (s *Tape) SetTapeCreatedDate(v time.Time) *Tape { - s.TapeCreatedDate = &v - return s -} - -// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. -func (s *Tape) SetTapeSizeInBytes(v int64) *Tape { - s.TapeSizeInBytes = &v - return s -} - -// SetTapeStatus sets the TapeStatus field's value. -func (s *Tape) SetTapeStatus(v string) *Tape { - s.TapeStatus = &v - return s -} - -// SetTapeUsedInBytes sets the TapeUsedInBytes field's value. -func (s *Tape) SetTapeUsedInBytes(v int64) *Tape { - s.TapeUsedInBytes = &v - return s -} - -// SetVTLDevice sets the VTLDevice field's value. -func (s *Tape) SetVTLDevice(v string) *Tape { - s.VTLDevice = &v - return s -} - -// Represents a virtual tape that is archived in the virtual tape shelf (VTS). -type TapeArchive struct { - _ struct{} `type:"structure"` - - // The time that the archiving of the virtual tape was completed. - // - // The default time stamp format is in the ISO8601 extended YYYY-MM-DD'T'HH:MM:SS'Z' - // format. - CompletionTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. - KMSKey *string `min:"20" type:"string"` - - // The Amazon Resource Name (ARN) of the tape gateway that the virtual tape - // is being retrieved to. - // - // The virtual tape is retrieved from the virtual tape shelf (VTS). - RetrievedTo *string `min:"50" type:"string"` - - // The Amazon Resource Name (ARN) of an archived virtual tape. - TapeARN *string `min:"50" type:"string"` - - // The barcode that identifies the archived virtual tape. - TapeBarcode *string `min:"7" type:"string"` - - // The date the virtual tape was created. - TapeCreatedDate *time.Time `type:"timestamp"` - - // The size, in bytes, of the archived virtual tape. - TapeSizeInBytes *int64 `type:"long"` - - // The current state of the archived virtual tape. - TapeStatus *string `type:"string"` - - // The size, in bytes, of data stored on the virtual tape. - // - // This value is not available for tapes created prior to May 13, 2015. - TapeUsedInBytes *int64 `type:"long"` -} - -// String returns the string representation -func (s TapeArchive) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TapeArchive) GoString() string { - return s.String() -} - -// SetCompletionTime sets the CompletionTime field's value. -func (s *TapeArchive) SetCompletionTime(v time.Time) *TapeArchive { - s.CompletionTime = &v - return s -} - -// SetKMSKey sets the KMSKey field's value. -func (s *TapeArchive) SetKMSKey(v string) *TapeArchive { - s.KMSKey = &v - return s -} - -// SetRetrievedTo sets the RetrievedTo field's value. -func (s *TapeArchive) SetRetrievedTo(v string) *TapeArchive { - s.RetrievedTo = &v - return s -} - -// SetTapeARN sets the TapeARN field's value. -func (s *TapeArchive) SetTapeARN(v string) *TapeArchive { - s.TapeARN = &v - return s -} - -// SetTapeBarcode sets the TapeBarcode field's value. -func (s *TapeArchive) SetTapeBarcode(v string) *TapeArchive { - s.TapeBarcode = &v - return s -} - -// SetTapeCreatedDate sets the TapeCreatedDate field's value. -func (s *TapeArchive) SetTapeCreatedDate(v time.Time) *TapeArchive { - s.TapeCreatedDate = &v - return s -} - -// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. -func (s *TapeArchive) SetTapeSizeInBytes(v int64) *TapeArchive { - s.TapeSizeInBytes = &v - return s -} - -// SetTapeStatus sets the TapeStatus field's value. -func (s *TapeArchive) SetTapeStatus(v string) *TapeArchive { - s.TapeStatus = &v - return s -} - -// SetTapeUsedInBytes sets the TapeUsedInBytes field's value. -func (s *TapeArchive) SetTapeUsedInBytes(v int64) *TapeArchive { - s.TapeUsedInBytes = &v - return s -} - -// Describes a virtual tape. -type TapeInfo struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - // The Amazon Resource Name (ARN) of a virtual tape. - TapeARN *string `min:"50" type:"string"` - - // The barcode that identifies a specific virtual tape. - TapeBarcode *string `min:"7" type:"string"` - - // The size, in bytes, of a virtual tape. - TapeSizeInBytes *int64 `type:"long"` - - // The status of the tape. - TapeStatus *string `type:"string"` -} - -// String returns the string representation -func (s TapeInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TapeInfo) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *TapeInfo) SetGatewayARN(v string) *TapeInfo { - s.GatewayARN = &v - return s -} - -// SetTapeARN sets the TapeARN field's value. -func (s *TapeInfo) SetTapeARN(v string) *TapeInfo { - s.TapeARN = &v - return s -} - -// SetTapeBarcode sets the TapeBarcode field's value. -func (s *TapeInfo) SetTapeBarcode(v string) *TapeInfo { - s.TapeBarcode = &v - return s -} - -// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. -func (s *TapeInfo) SetTapeSizeInBytes(v int64) *TapeInfo { - s.TapeSizeInBytes = &v - return s -} - -// SetTapeStatus sets the TapeStatus field's value. -func (s *TapeInfo) SetTapeStatus(v string) *TapeInfo { - s.TapeStatus = &v - return s -} - -// Describes a recovery point. -type TapeRecoveryPointInfo struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the virtual tape. - TapeARN *string `min:"50" type:"string"` - - // The time when the point-in-time view of the virtual tape was replicated for - // later recovery. - // - // The default time stamp format of the tape recovery point time is in the ISO8601 - // extended YYYY-MM-DD'T'HH:MM:SS'Z' format. - TapeRecoveryPointTime *time.Time `type:"timestamp"` - - // The size, in bytes, of the virtual tapes to recover. - TapeSizeInBytes *int64 `type:"long"` - - TapeStatus *string `type:"string"` -} - -// String returns the string representation -func (s TapeRecoveryPointInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TapeRecoveryPointInfo) GoString() string { - return s.String() -} - -// SetTapeARN sets the TapeARN field's value. -func (s *TapeRecoveryPointInfo) SetTapeARN(v string) *TapeRecoveryPointInfo { - s.TapeARN = &v - return s -} - -// SetTapeRecoveryPointTime sets the TapeRecoveryPointTime field's value. -func (s *TapeRecoveryPointInfo) SetTapeRecoveryPointTime(v time.Time) *TapeRecoveryPointInfo { - s.TapeRecoveryPointTime = &v - return s -} - -// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. -func (s *TapeRecoveryPointInfo) SetTapeSizeInBytes(v int64) *TapeRecoveryPointInfo { - s.TapeSizeInBytes = &v - return s -} - -// SetTapeStatus sets the TapeStatus field's value. -func (s *TapeRecoveryPointInfo) SetTapeStatus(v string) *TapeRecoveryPointInfo { - s.TapeStatus = &v - return s -} - -// A JSON object containing one or more of the following fields: -// -// * UpdateBandwidthRateLimitInput$AverageDownloadRateLimitInBitsPerSec -// -// * UpdateBandwidthRateLimitInput$AverageUploadRateLimitInBitsPerSec -type UpdateBandwidthRateLimitInput struct { - _ struct{} `type:"structure"` - - // The average download bandwidth rate limit in bits per second. - AverageDownloadRateLimitInBitsPerSec *int64 `min:"102400" type:"long"` - - // The average upload bandwidth rate limit in bits per second. - AverageUploadRateLimitInBitsPerSec *int64 `min:"51200" type:"long"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateBandwidthRateLimitInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBandwidthRateLimitInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateBandwidthRateLimitInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateBandwidthRateLimitInput"} - if s.AverageDownloadRateLimitInBitsPerSec != nil && *s.AverageDownloadRateLimitInBitsPerSec < 102400 { - invalidParams.Add(request.NewErrParamMinValue("AverageDownloadRateLimitInBitsPerSec", 102400)) - } - if s.AverageUploadRateLimitInBitsPerSec != nil && *s.AverageUploadRateLimitInBitsPerSec < 51200 { - invalidParams.Add(request.NewErrParamMinValue("AverageUploadRateLimitInBitsPerSec", 51200)) - } - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAverageDownloadRateLimitInBitsPerSec sets the AverageDownloadRateLimitInBitsPerSec field's value. -func (s *UpdateBandwidthRateLimitInput) SetAverageDownloadRateLimitInBitsPerSec(v int64) *UpdateBandwidthRateLimitInput { - s.AverageDownloadRateLimitInBitsPerSec = &v - return s -} - -// SetAverageUploadRateLimitInBitsPerSec sets the AverageUploadRateLimitInBitsPerSec field's value. -func (s *UpdateBandwidthRateLimitInput) SetAverageUploadRateLimitInBitsPerSec(v int64) *UpdateBandwidthRateLimitInput { - s.AverageUploadRateLimitInBitsPerSec = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *UpdateBandwidthRateLimitInput) SetGatewayARN(v string) *UpdateBandwidthRateLimitInput { - s.GatewayARN = &v - return s -} - -// A JSON object containing the of the gateway whose throttle information was -// updated. -type UpdateBandwidthRateLimitOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s UpdateBandwidthRateLimitOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateBandwidthRateLimitOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *UpdateBandwidthRateLimitOutput) SetGatewayARN(v string) *UpdateBandwidthRateLimitOutput { - s.GatewayARN = &v - return s -} - -// A JSON object containing one or more of the following fields: -// -// * UpdateChapCredentialsInput$InitiatorName -// -// * UpdateChapCredentialsInput$SecretToAuthenticateInitiator -// -// * UpdateChapCredentialsInput$SecretToAuthenticateTarget -// -// * UpdateChapCredentialsInput$TargetARN -type UpdateChapCredentialsInput struct { - _ struct{} `type:"structure"` - - // The iSCSI initiator that connects to the target. - // - // InitiatorName is a required field - InitiatorName *string `min:"1" type:"string" required:"true"` - - // The secret key that the initiator (for example, the Windows client) must - // provide to participate in mutual CHAP with the target. - // - // The secret key must be between 12 and 16 bytes when encoded in UTF-8. - // - // SecretToAuthenticateInitiator is a required field - SecretToAuthenticateInitiator *string `min:"1" type:"string" required:"true"` - - // The secret key that the target must provide to participate in mutual CHAP - // with the initiator (e.g. Windows client). - // - // Byte constraints: Minimum bytes of 12. Maximum bytes of 16. - // - // The secret key must be between 12 and 16 bytes when encoded in UTF-8. - SecretToAuthenticateTarget *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the iSCSI volume target. Use the DescribeStorediSCSIVolumes - // operation to return the TargetARN for specified VolumeARN. - // - // TargetARN is a required field - TargetARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateChapCredentialsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateChapCredentialsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateChapCredentialsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateChapCredentialsInput"} - if s.InitiatorName == nil { - invalidParams.Add(request.NewErrParamRequired("InitiatorName")) - } - if s.InitiatorName != nil && len(*s.InitiatorName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InitiatorName", 1)) - } - if s.SecretToAuthenticateInitiator == nil { - invalidParams.Add(request.NewErrParamRequired("SecretToAuthenticateInitiator")) - } - if s.SecretToAuthenticateInitiator != nil && len(*s.SecretToAuthenticateInitiator) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretToAuthenticateInitiator", 1)) - } - if s.SecretToAuthenticateTarget != nil && len(*s.SecretToAuthenticateTarget) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SecretToAuthenticateTarget", 1)) - } - if s.TargetARN == nil { - invalidParams.Add(request.NewErrParamRequired("TargetARN")) - } - if s.TargetARN != nil && len(*s.TargetARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("TargetARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInitiatorName sets the InitiatorName field's value. -func (s *UpdateChapCredentialsInput) SetInitiatorName(v string) *UpdateChapCredentialsInput { - s.InitiatorName = &v - return s -} - -// SetSecretToAuthenticateInitiator sets the SecretToAuthenticateInitiator field's value. -func (s *UpdateChapCredentialsInput) SetSecretToAuthenticateInitiator(v string) *UpdateChapCredentialsInput { - s.SecretToAuthenticateInitiator = &v - return s -} - -// SetSecretToAuthenticateTarget sets the SecretToAuthenticateTarget field's value. -func (s *UpdateChapCredentialsInput) SetSecretToAuthenticateTarget(v string) *UpdateChapCredentialsInput { - s.SecretToAuthenticateTarget = &v - return s -} - -// SetTargetARN sets the TargetARN field's value. -func (s *UpdateChapCredentialsInput) SetTargetARN(v string) *UpdateChapCredentialsInput { - s.TargetARN = &v - return s -} - -// A JSON object containing the following fields: -type UpdateChapCredentialsOutput struct { - _ struct{} `type:"structure"` - - // The iSCSI initiator that connects to the target. This is the same initiator - // name specified in the request. - InitiatorName *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the target. This is the same target specified - // in the request. - TargetARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s UpdateChapCredentialsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateChapCredentialsOutput) GoString() string { - return s.String() -} - -// SetInitiatorName sets the InitiatorName field's value. -func (s *UpdateChapCredentialsOutput) SetInitiatorName(v string) *UpdateChapCredentialsOutput { - s.InitiatorName = &v - return s -} - -// SetTargetARN sets the TargetARN field's value. -func (s *UpdateChapCredentialsOutput) SetTargetARN(v string) *UpdateChapCredentialsOutput { - s.TargetARN = &v - return s -} - -type UpdateGatewayInformationInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // The name you configured for your gateway. - GatewayName *string `min:"2" type:"string"` - - GatewayTimezone *string `min:"3" type:"string"` -} - -// String returns the string representation -func (s UpdateGatewayInformationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGatewayInformationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateGatewayInformationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateGatewayInformationInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.GatewayName != nil && len(*s.GatewayName) < 2 { - invalidParams.Add(request.NewErrParamMinLen("GatewayName", 2)) - } - if s.GatewayTimezone != nil && len(*s.GatewayTimezone) < 3 { - invalidParams.Add(request.NewErrParamMinLen("GatewayTimezone", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *UpdateGatewayInformationInput) SetGatewayARN(v string) *UpdateGatewayInformationInput { - s.GatewayARN = &v - return s -} - -// SetGatewayName sets the GatewayName field's value. -func (s *UpdateGatewayInformationInput) SetGatewayName(v string) *UpdateGatewayInformationInput { - s.GatewayName = &v - return s -} - -// SetGatewayTimezone sets the GatewayTimezone field's value. -func (s *UpdateGatewayInformationInput) SetGatewayTimezone(v string) *UpdateGatewayInformationInput { - s.GatewayTimezone = &v - return s -} - -// A JSON object containing the ARN of the gateway that was updated. -type UpdateGatewayInformationOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - GatewayName *string `type:"string"` -} - -// String returns the string representation -func (s UpdateGatewayInformationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGatewayInformationOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *UpdateGatewayInformationOutput) SetGatewayARN(v string) *UpdateGatewayInformationOutput { - s.GatewayARN = &v - return s -} - -// SetGatewayName sets the GatewayName field's value. -func (s *UpdateGatewayInformationOutput) SetGatewayName(v string) *UpdateGatewayInformationOutput { - s.GatewayName = &v - return s -} - -// A JSON object containing the of the gateway to update. -type UpdateGatewaySoftwareNowInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateGatewaySoftwareNowInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGatewaySoftwareNowInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateGatewaySoftwareNowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateGatewaySoftwareNowInput"} - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *UpdateGatewaySoftwareNowInput) SetGatewayARN(v string) *UpdateGatewaySoftwareNowInput { - s.GatewayARN = &v - return s -} - -// A JSON object containing the of the gateway that was updated. -type UpdateGatewaySoftwareNowOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s UpdateGatewaySoftwareNowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGatewaySoftwareNowOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *UpdateGatewaySoftwareNowOutput) SetGatewayARN(v string) *UpdateGatewaySoftwareNowOutput { - s.GatewayARN = &v - return s -} - -// A JSON object containing the following fields: -// -// * UpdateMaintenanceStartTimeInput$DayOfWeek -// -// * UpdateMaintenanceStartTimeInput$HourOfDay -// -// * UpdateMaintenanceStartTimeInput$MinuteOfHour -type UpdateMaintenanceStartTimeInput struct { - _ struct{} `type:"structure"` - - // The maintenance start time day of the week represented as an ordinal number - // from 0 to 6, where 0 represents Sunday and 6 Saturday. - // - // DayOfWeek is a required field - DayOfWeek *int64 `type:"integer" required:"true"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - // - // GatewayARN is a required field - GatewayARN *string `min:"50" type:"string" required:"true"` - - // The hour component of the maintenance start time represented as hh, where - // hh is the hour (00 to 23). The hour of the day is in the time zone of the - // gateway. - // - // HourOfDay is a required field - HourOfDay *int64 `type:"integer" required:"true"` - - // The minute component of the maintenance start time represented as mm, where - // mm is the minute (00 to 59). The minute of the hour is in the time zone of - // the gateway. - // - // MinuteOfHour is a required field - MinuteOfHour *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s UpdateMaintenanceStartTimeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateMaintenanceStartTimeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateMaintenanceStartTimeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateMaintenanceStartTimeInput"} - if s.DayOfWeek == nil { - invalidParams.Add(request.NewErrParamRequired("DayOfWeek")) - } - if s.GatewayARN == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayARN")) - } - if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) - } - if s.HourOfDay == nil { - invalidParams.Add(request.NewErrParamRequired("HourOfDay")) - } - if s.MinuteOfHour == nil { - invalidParams.Add(request.NewErrParamRequired("MinuteOfHour")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDayOfWeek sets the DayOfWeek field's value. -func (s *UpdateMaintenanceStartTimeInput) SetDayOfWeek(v int64) *UpdateMaintenanceStartTimeInput { - s.DayOfWeek = &v - return s -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *UpdateMaintenanceStartTimeInput) SetGatewayARN(v string) *UpdateMaintenanceStartTimeInput { - s.GatewayARN = &v - return s -} - -// SetHourOfDay sets the HourOfDay field's value. -func (s *UpdateMaintenanceStartTimeInput) SetHourOfDay(v int64) *UpdateMaintenanceStartTimeInput { - s.HourOfDay = &v - return s -} - -// SetMinuteOfHour sets the MinuteOfHour field's value. -func (s *UpdateMaintenanceStartTimeInput) SetMinuteOfHour(v int64) *UpdateMaintenanceStartTimeInput { - s.MinuteOfHour = &v - return s -} - -// A JSON object containing the of the gateway whose maintenance start time -// is updated. -type UpdateMaintenanceStartTimeOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s UpdateMaintenanceStartTimeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateMaintenanceStartTimeOutput) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *UpdateMaintenanceStartTimeOutput) SetGatewayARN(v string) *UpdateMaintenanceStartTimeOutput { - s.GatewayARN = &v - return s -} - -// UpdateNFSFileShareInput -type UpdateNFSFileShareInput struct { - _ struct{} `type:"structure"` - - // The list of clients that are allowed to access the file gateway. The list - // must contain either valid IP addresses or valid CIDR blocks. - ClientList []*string `min:"1" type:"list"` - - // The default storage class for objects put into an Amazon S3 bucket by the - // file gateway. Possible values are S3_STANDARD, S3_STANDARD_IA, or S3_ONEZONE_IA. - // If this field is not populated, the default value S3_STANDARD is used. Optional. - DefaultStorageClass *string `min:"5" type:"string"` - - // The Amazon Resource Name (ARN) of the file share to be updated. - // - // FileShareARN is a required field - FileShareARN *string `min:"50" type:"string" required:"true"` - - // A value that enables guessing of the MIME type for uploaded objects based - // on file extensions. Set this value to true to enable MIME type guessing, - // and otherwise to false. The default value is true. - GuessMIMETypeEnabled *bool `type:"boolean"` - - // True to use Amazon S3 server side encryption with your own AWS KMS key, or - // false to use a key managed by Amazon S3. Optional. - KMSEncrypted *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. - KMSKey *string `min:"20" type:"string"` - - // The default values for the file share. Optional. - NFSFileShareDefaults *NFSFileShareDefaults `type:"structure"` - - // A value that sets the access control list permission for objects in the S3 - // bucket that a file gateway puts objects into. The default value is "private". - ObjectACL *string `type:"string" enum:"ObjectACL"` - - // A value that sets the write status of a file share. This value is true if - // the write status is read-only, and otherwise false. - ReadOnly *bool `type:"boolean"` - - // A value that sets the access control list permission for objects in the Amazon - // S3 bucket that a file gateway puts objects into. The default value is private. - RequesterPays *bool `type:"boolean"` - - // The user mapped to anonymous user. Valid options are the following: - // - // * RootSquash - Only root is mapped to anonymous user. - // - // * NoSquash - No one is mapped to anonymous user - // - // * AllSquash - Everyone is mapped to anonymous user. - Squash *string `min:"5" type:"string"` -} - -// String returns the string representation -func (s UpdateNFSFileShareInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateNFSFileShareInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateNFSFileShareInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateNFSFileShareInput"} - if s.ClientList != nil && len(s.ClientList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientList", 1)) - } - if s.DefaultStorageClass != nil && len(*s.DefaultStorageClass) < 5 { - invalidParams.Add(request.NewErrParamMinLen("DefaultStorageClass", 5)) - } - if s.FileShareARN == nil { - invalidParams.Add(request.NewErrParamRequired("FileShareARN")) - } - if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) - } - if s.KMSKey != nil && len(*s.KMSKey) < 20 { - invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) - } - if s.Squash != nil && len(*s.Squash) < 5 { - invalidParams.Add(request.NewErrParamMinLen("Squash", 5)) - } - if s.NFSFileShareDefaults != nil { - if err := s.NFSFileShareDefaults.Validate(); err != nil { - invalidParams.AddNested("NFSFileShareDefaults", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientList sets the ClientList field's value. -func (s *UpdateNFSFileShareInput) SetClientList(v []*string) *UpdateNFSFileShareInput { - s.ClientList = v - return s -} - -// SetDefaultStorageClass sets the DefaultStorageClass field's value. -func (s *UpdateNFSFileShareInput) SetDefaultStorageClass(v string) *UpdateNFSFileShareInput { - s.DefaultStorageClass = &v - return s -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *UpdateNFSFileShareInput) SetFileShareARN(v string) *UpdateNFSFileShareInput { - s.FileShareARN = &v - return s -} - -// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. -func (s *UpdateNFSFileShareInput) SetGuessMIMETypeEnabled(v bool) *UpdateNFSFileShareInput { - s.GuessMIMETypeEnabled = &v - return s -} - -// SetKMSEncrypted sets the KMSEncrypted field's value. -func (s *UpdateNFSFileShareInput) SetKMSEncrypted(v bool) *UpdateNFSFileShareInput { - s.KMSEncrypted = &v - return s -} - -// SetKMSKey sets the KMSKey field's value. -func (s *UpdateNFSFileShareInput) SetKMSKey(v string) *UpdateNFSFileShareInput { - s.KMSKey = &v - return s -} - -// SetNFSFileShareDefaults sets the NFSFileShareDefaults field's value. -func (s *UpdateNFSFileShareInput) SetNFSFileShareDefaults(v *NFSFileShareDefaults) *UpdateNFSFileShareInput { - s.NFSFileShareDefaults = v - return s -} - -// SetObjectACL sets the ObjectACL field's value. -func (s *UpdateNFSFileShareInput) SetObjectACL(v string) *UpdateNFSFileShareInput { - s.ObjectACL = &v - return s -} - -// SetReadOnly sets the ReadOnly field's value. -func (s *UpdateNFSFileShareInput) SetReadOnly(v bool) *UpdateNFSFileShareInput { - s.ReadOnly = &v - return s -} - -// SetRequesterPays sets the RequesterPays field's value. -func (s *UpdateNFSFileShareInput) SetRequesterPays(v bool) *UpdateNFSFileShareInput { - s.RequesterPays = &v - return s -} - -// SetSquash sets the Squash field's value. -func (s *UpdateNFSFileShareInput) SetSquash(v string) *UpdateNFSFileShareInput { - s.Squash = &v - return s -} - -// UpdateNFSFileShareOutput -type UpdateNFSFileShareOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the updated file share. - FileShareARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s UpdateNFSFileShareOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateNFSFileShareOutput) GoString() string { - return s.String() -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *UpdateNFSFileShareOutput) SetFileShareARN(v string) *UpdateNFSFileShareOutput { - s.FileShareARN = &v - return s -} - -// UpdateSMBFileShareInput -type UpdateSMBFileShareInput struct { - _ struct{} `type:"structure"` - - // The default storage class for objects put into an Amazon S3 bucket by the - // file gateway. Possible values are S3_STANDARD, S3_STANDARD_IA, or S3_ONEZONE_IA. - // If this field is not populated, the default value S3_STANDARD is used. Optional. - DefaultStorageClass *string `min:"5" type:"string"` - - // The Amazon Resource Name (ARN) of the SMB file share that you want to update. - // - // FileShareARN is a required field - FileShareARN *string `min:"50" type:"string" required:"true"` - - // A value that enables guessing of the MIME type for uploaded objects based - // on file extensions. Set this value to true to enable MIME type guessing, - // and otherwise to false. The default value is true. - GuessMIMETypeEnabled *bool `type:"boolean"` - - // A list of users or groups in the Active Directory that are not allowed to - // access the file share. A group must be prefixed with the @ character. For - // example @group1. Can only be set if Authentication is set to ActiveDirectory. - InvalidUserList []*string `type:"list"` - - // True to use Amazon S3 server side encryption with your own AWS KMS key, or - // false to use a key managed by Amazon S3. Optional. - KMSEncrypted *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. - KMSKey *string `min:"20" type:"string"` - - // A value that sets the access control list permission for objects in the S3 - // bucket that a file gateway puts objects into. The default value is "private". - ObjectACL *string `type:"string" enum:"ObjectACL"` - - // A value that sets the write status of a file share. This value is true if - // the write status is read-only, and otherwise false. - ReadOnly *bool `type:"boolean"` - - // A value that sets the access control list permission for objects in the Amazon - // S3 bucket that a file gateway puts objects into. The default value is private. - RequesterPays *bool `type:"boolean"` - - // A list of users or groups in the Active Directory that are allowed to access - // the file share. A group must be prefixed with the @ character. For example - // @group1. Can only be set if Authentication is set to ActiveDirectory. - ValidUserList []*string `type:"list"` -} - -// String returns the string representation -func (s UpdateSMBFileShareInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSMBFileShareInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSMBFileShareInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSMBFileShareInput"} - if s.DefaultStorageClass != nil && len(*s.DefaultStorageClass) < 5 { - invalidParams.Add(request.NewErrParamMinLen("DefaultStorageClass", 5)) - } - if s.FileShareARN == nil { - invalidParams.Add(request.NewErrParamRequired("FileShareARN")) - } - if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) - } - if s.KMSKey != nil && len(*s.KMSKey) < 20 { - invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultStorageClass sets the DefaultStorageClass field's value. -func (s *UpdateSMBFileShareInput) SetDefaultStorageClass(v string) *UpdateSMBFileShareInput { - s.DefaultStorageClass = &v - return s -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *UpdateSMBFileShareInput) SetFileShareARN(v string) *UpdateSMBFileShareInput { - s.FileShareARN = &v - return s -} - -// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. -func (s *UpdateSMBFileShareInput) SetGuessMIMETypeEnabled(v bool) *UpdateSMBFileShareInput { - s.GuessMIMETypeEnabled = &v - return s -} - -// SetInvalidUserList sets the InvalidUserList field's value. -func (s *UpdateSMBFileShareInput) SetInvalidUserList(v []*string) *UpdateSMBFileShareInput { - s.InvalidUserList = v - return s -} - -// SetKMSEncrypted sets the KMSEncrypted field's value. -func (s *UpdateSMBFileShareInput) SetKMSEncrypted(v bool) *UpdateSMBFileShareInput { - s.KMSEncrypted = &v - return s -} - -// SetKMSKey sets the KMSKey field's value. -func (s *UpdateSMBFileShareInput) SetKMSKey(v string) *UpdateSMBFileShareInput { - s.KMSKey = &v - return s -} - -// SetObjectACL sets the ObjectACL field's value. -func (s *UpdateSMBFileShareInput) SetObjectACL(v string) *UpdateSMBFileShareInput { - s.ObjectACL = &v - return s -} - -// SetReadOnly sets the ReadOnly field's value. -func (s *UpdateSMBFileShareInput) SetReadOnly(v bool) *UpdateSMBFileShareInput { - s.ReadOnly = &v - return s -} - -// SetRequesterPays sets the RequesterPays field's value. -func (s *UpdateSMBFileShareInput) SetRequesterPays(v bool) *UpdateSMBFileShareInput { - s.RequesterPays = &v - return s -} - -// SetValidUserList sets the ValidUserList field's value. -func (s *UpdateSMBFileShareInput) SetValidUserList(v []*string) *UpdateSMBFileShareInput { - s.ValidUserList = v - return s -} - -// UpdateSMBFileShareOutput -type UpdateSMBFileShareOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the updated SMB file share. - FileShareARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s UpdateSMBFileShareOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSMBFileShareOutput) GoString() string { - return s.String() -} - -// SetFileShareARN sets the FileShareARN field's value. -func (s *UpdateSMBFileShareOutput) SetFileShareARN(v string) *UpdateSMBFileShareOutput { - s.FileShareARN = &v - return s -} - -// A JSON object containing one or more of the following fields: -// -// * UpdateSnapshotScheduleInput$Description -// -// * UpdateSnapshotScheduleInput$RecurrenceInHours -// -// * UpdateSnapshotScheduleInput$StartAt -// -// * UpdateSnapshotScheduleInput$VolumeARN -type UpdateSnapshotScheduleInput struct { - _ struct{} `type:"structure"` - - // Optional description of the snapshot that overwrites the existing description. - Description *string `min:"1" type:"string"` - - // Frequency of snapshots. Specify the number of hours between snapshots. - // - // RecurrenceInHours is a required field - RecurrenceInHours *int64 `min:"1" type:"integer" required:"true"` - - // The hour of the day at which the snapshot schedule begins represented as - // hh, where hh is the hour (0 to 23). The hour of the day is in the time zone - // of the gateway. - // - // StartAt is a required field - StartAt *int64 `type:"integer" required:"true"` - - // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation - // to return a list of gateway volumes. - // - // VolumeARN is a required field - VolumeARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateSnapshotScheduleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSnapshotScheduleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSnapshotScheduleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSnapshotScheduleInput"} - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } - if s.RecurrenceInHours == nil { - invalidParams.Add(request.NewErrParamRequired("RecurrenceInHours")) - } - if s.RecurrenceInHours != nil && *s.RecurrenceInHours < 1 { - invalidParams.Add(request.NewErrParamMinValue("RecurrenceInHours", 1)) - } - if s.StartAt == nil { - invalidParams.Add(request.NewErrParamRequired("StartAt")) - } - if s.VolumeARN == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeARN")) - } - if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateSnapshotScheduleInput) SetDescription(v string) *UpdateSnapshotScheduleInput { - s.Description = &v - return s -} - -// SetRecurrenceInHours sets the RecurrenceInHours field's value. -func (s *UpdateSnapshotScheduleInput) SetRecurrenceInHours(v int64) *UpdateSnapshotScheduleInput { - s.RecurrenceInHours = &v - return s -} - -// SetStartAt sets the StartAt field's value. -func (s *UpdateSnapshotScheduleInput) SetStartAt(v int64) *UpdateSnapshotScheduleInput { - s.StartAt = &v - return s -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *UpdateSnapshotScheduleInput) SetVolumeARN(v string) *UpdateSnapshotScheduleInput { - s.VolumeARN = &v - return s -} - -// A JSON object containing the of the updated storage volume. -type UpdateSnapshotScheduleOutput struct { - _ struct{} `type:"structure"` - - VolumeARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s UpdateSnapshotScheduleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSnapshotScheduleOutput) GoString() string { - return s.String() -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *UpdateSnapshotScheduleOutput) SetVolumeARN(v string) *UpdateSnapshotScheduleOutput { - s.VolumeARN = &v - return s -} - -type UpdateVTLDeviceTypeInput struct { - _ struct{} `type:"structure"` - - // The type of medium changer you want to select. - // - // Valid Values: "STK-L700", "AWS-Gateway-VTL" - // - // DeviceType is a required field - DeviceType *string `min:"2" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the medium changer you want to select. - // - // VTLDeviceARN is a required field - VTLDeviceARN *string `min:"50" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateVTLDeviceTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVTLDeviceTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateVTLDeviceTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateVTLDeviceTypeInput"} - if s.DeviceType == nil { - invalidParams.Add(request.NewErrParamRequired("DeviceType")) - } - if s.DeviceType != nil && len(*s.DeviceType) < 2 { - invalidParams.Add(request.NewErrParamMinLen("DeviceType", 2)) - } - if s.VTLDeviceARN == nil { - invalidParams.Add(request.NewErrParamRequired("VTLDeviceARN")) - } - if s.VTLDeviceARN != nil && len(*s.VTLDeviceARN) < 50 { - invalidParams.Add(request.NewErrParamMinLen("VTLDeviceARN", 50)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeviceType sets the DeviceType field's value. -func (s *UpdateVTLDeviceTypeInput) SetDeviceType(v string) *UpdateVTLDeviceTypeInput { - s.DeviceType = &v - return s -} - -// SetVTLDeviceARN sets the VTLDeviceARN field's value. -func (s *UpdateVTLDeviceTypeInput) SetVTLDeviceARN(v string) *UpdateVTLDeviceTypeInput { - s.VTLDeviceARN = &v - return s -} - -// UpdateVTLDeviceTypeOutput -type UpdateVTLDeviceTypeOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the medium changer you have selected. - VTLDeviceARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s UpdateVTLDeviceTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateVTLDeviceTypeOutput) GoString() string { - return s.String() -} - -// SetVTLDeviceARN sets the VTLDeviceARN field's value. -func (s *UpdateVTLDeviceTypeOutput) SetVTLDeviceARN(v string) *UpdateVTLDeviceTypeOutput { - s.VTLDeviceARN = &v - return s -} - -// Represents a device object associated with a tape gateway. -type VTLDevice struct { - _ struct{} `type:"structure"` - - // A list of iSCSI information about a VTL device. - DeviceiSCSIAttributes *DeviceiSCSIAttributes `type:"structure"` - - // Specifies the unique Amazon Resource Name (ARN) of the device (tape drive - // or media changer). - VTLDeviceARN *string `min:"50" type:"string"` - - VTLDeviceProductIdentifier *string `type:"string"` - - VTLDeviceType *string `type:"string"` - - VTLDeviceVendor *string `type:"string"` -} - -// String returns the string representation -func (s VTLDevice) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VTLDevice) GoString() string { - return s.String() -} - -// SetDeviceiSCSIAttributes sets the DeviceiSCSIAttributes field's value. -func (s *VTLDevice) SetDeviceiSCSIAttributes(v *DeviceiSCSIAttributes) *VTLDevice { - s.DeviceiSCSIAttributes = v - return s -} - -// SetVTLDeviceARN sets the VTLDeviceARN field's value. -func (s *VTLDevice) SetVTLDeviceARN(v string) *VTLDevice { - s.VTLDeviceARN = &v - return s -} - -// SetVTLDeviceProductIdentifier sets the VTLDeviceProductIdentifier field's value. -func (s *VTLDevice) SetVTLDeviceProductIdentifier(v string) *VTLDevice { - s.VTLDeviceProductIdentifier = &v - return s -} - -// SetVTLDeviceType sets the VTLDeviceType field's value. -func (s *VTLDevice) SetVTLDeviceType(v string) *VTLDevice { - s.VTLDeviceType = &v - return s -} - -// SetVTLDeviceVendor sets the VTLDeviceVendor field's value. -func (s *VTLDevice) SetVTLDeviceVendor(v string) *VTLDevice { - s.VTLDeviceVendor = &v - return s -} - -// Describes a storage volume object. -type VolumeInfo struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation - // to return a list of gateways for your account and region. - GatewayARN *string `min:"50" type:"string"` - - // The unique identifier assigned to your gateway during activation. This ID - // becomes part of the gateway Amazon Resource Name (ARN), which you use as - // input for other operations. - // - // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens - // (-). - GatewayId *string `min:"12" type:"string"` - - // The Amazon Resource Name (ARN) for the storage volume. For example, the following - // is a valid ARN: - // - // arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB - // - // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens - // (-). - VolumeARN *string `min:"50" type:"string"` - - VolumeAttachmentStatus *string `min:"3" type:"string"` - - // The unique identifier assigned to the volume. This ID becomes part of the - // volume Amazon Resource Name (ARN), which you use as input for other operations. - // - // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens - // (-). - VolumeId *string `min:"12" type:"string"` - - // The size of the volume in bytes. - // - // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens - // (-). - VolumeSizeInBytes *int64 `type:"long"` - - VolumeType *string `min:"3" type:"string"` -} - -// String returns the string representation -func (s VolumeInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VolumeInfo) GoString() string { - return s.String() -} - -// SetGatewayARN sets the GatewayARN field's value. -func (s *VolumeInfo) SetGatewayARN(v string) *VolumeInfo { - s.GatewayARN = &v - return s -} - -// SetGatewayId sets the GatewayId field's value. -func (s *VolumeInfo) SetGatewayId(v string) *VolumeInfo { - s.GatewayId = &v - return s -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *VolumeInfo) SetVolumeARN(v string) *VolumeInfo { - s.VolumeARN = &v - return s -} - -// SetVolumeAttachmentStatus sets the VolumeAttachmentStatus field's value. -func (s *VolumeInfo) SetVolumeAttachmentStatus(v string) *VolumeInfo { - s.VolumeAttachmentStatus = &v - return s -} - -// SetVolumeId sets the VolumeId field's value. -func (s *VolumeInfo) SetVolumeId(v string) *VolumeInfo { - s.VolumeId = &v - return s -} - -// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. -func (s *VolumeInfo) SetVolumeSizeInBytes(v int64) *VolumeInfo { - s.VolumeSizeInBytes = &v - return s -} - -// SetVolumeType sets the VolumeType field's value. -func (s *VolumeInfo) SetVolumeType(v string) *VolumeInfo { - s.VolumeType = &v - return s -} - -type VolumeRecoveryPointInfo struct { - _ struct{} `type:"structure"` - - VolumeARN *string `min:"50" type:"string"` - - VolumeRecoveryPointTime *string `type:"string"` - - VolumeSizeInBytes *int64 `type:"long"` - - VolumeUsageInBytes *int64 `type:"long"` -} - -// String returns the string representation -func (s VolumeRecoveryPointInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VolumeRecoveryPointInfo) GoString() string { - return s.String() -} - -// SetVolumeARN sets the VolumeARN field's value. -func (s *VolumeRecoveryPointInfo) SetVolumeARN(v string) *VolumeRecoveryPointInfo { - s.VolumeARN = &v - return s -} - -// SetVolumeRecoveryPointTime sets the VolumeRecoveryPointTime field's value. -func (s *VolumeRecoveryPointInfo) SetVolumeRecoveryPointTime(v string) *VolumeRecoveryPointInfo { - s.VolumeRecoveryPointTime = &v - return s -} - -// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. -func (s *VolumeRecoveryPointInfo) SetVolumeSizeInBytes(v int64) *VolumeRecoveryPointInfo { - s.VolumeSizeInBytes = &v - return s -} - -// SetVolumeUsageInBytes sets the VolumeUsageInBytes field's value. -func (s *VolumeRecoveryPointInfo) SetVolumeUsageInBytes(v int64) *VolumeRecoveryPointInfo { - s.VolumeUsageInBytes = &v - return s -} - -// Lists iSCSI information about a volume. -type VolumeiSCSIAttributes struct { - _ struct{} `type:"structure"` - - // Indicates whether mutual CHAP is enabled for the iSCSI target. - ChapEnabled *bool `type:"boolean"` - - // The logical disk number. - LunNumber *int64 `min:"1" type:"integer"` - - // The network interface identifier. - NetworkInterfaceId *string `type:"string"` - - // The port used to communicate with iSCSI targets. - NetworkInterfacePort *int64 `type:"integer"` - - // The Amazon Resource Name (ARN) of the volume target. - TargetARN *string `min:"50" type:"string"` -} - -// String returns the string representation -func (s VolumeiSCSIAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s VolumeiSCSIAttributes) GoString() string { - return s.String() -} - -// SetChapEnabled sets the ChapEnabled field's value. -func (s *VolumeiSCSIAttributes) SetChapEnabled(v bool) *VolumeiSCSIAttributes { - s.ChapEnabled = &v - return s -} - -// SetLunNumber sets the LunNumber field's value. -func (s *VolumeiSCSIAttributes) SetLunNumber(v int64) *VolumeiSCSIAttributes { - s.LunNumber = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *VolumeiSCSIAttributes) SetNetworkInterfaceId(v string) *VolumeiSCSIAttributes { - s.NetworkInterfaceId = &v - return s -} - -// SetNetworkInterfacePort sets the NetworkInterfacePort field's value. -func (s *VolumeiSCSIAttributes) SetNetworkInterfacePort(v int64) *VolumeiSCSIAttributes { - s.NetworkInterfacePort = &v - return s -} - -// SetTargetARN sets the TargetARN field's value. -func (s *VolumeiSCSIAttributes) SetTargetARN(v string) *VolumeiSCSIAttributes { - s.TargetARN = &v - return s -} - -const ( - // ErrorCodeActivationKeyExpired is a ErrorCode enum value - ErrorCodeActivationKeyExpired = "ActivationKeyExpired" - - // ErrorCodeActivationKeyInvalid is a ErrorCode enum value - ErrorCodeActivationKeyInvalid = "ActivationKeyInvalid" - - // ErrorCodeActivationKeyNotFound is a ErrorCode enum value - ErrorCodeActivationKeyNotFound = "ActivationKeyNotFound" - - // ErrorCodeGatewayInternalError is a ErrorCode enum value - ErrorCodeGatewayInternalError = "GatewayInternalError" - - // ErrorCodeGatewayNotConnected is a ErrorCode enum value - ErrorCodeGatewayNotConnected = "GatewayNotConnected" - - // ErrorCodeGatewayNotFound is a ErrorCode enum value - ErrorCodeGatewayNotFound = "GatewayNotFound" - - // ErrorCodeGatewayProxyNetworkConnectionBusy is a ErrorCode enum value - ErrorCodeGatewayProxyNetworkConnectionBusy = "GatewayProxyNetworkConnectionBusy" - - // ErrorCodeAuthenticationFailure is a ErrorCode enum value - ErrorCodeAuthenticationFailure = "AuthenticationFailure" - - // ErrorCodeBandwidthThrottleScheduleNotFound is a ErrorCode enum value - ErrorCodeBandwidthThrottleScheduleNotFound = "BandwidthThrottleScheduleNotFound" - - // ErrorCodeBlocked is a ErrorCode enum value - ErrorCodeBlocked = "Blocked" - - // ErrorCodeCannotExportSnapshot is a ErrorCode enum value - ErrorCodeCannotExportSnapshot = "CannotExportSnapshot" - - // ErrorCodeChapCredentialNotFound is a ErrorCode enum value - ErrorCodeChapCredentialNotFound = "ChapCredentialNotFound" - - // ErrorCodeDiskAlreadyAllocated is a ErrorCode enum value - ErrorCodeDiskAlreadyAllocated = "DiskAlreadyAllocated" - - // ErrorCodeDiskDoesNotExist is a ErrorCode enum value - ErrorCodeDiskDoesNotExist = "DiskDoesNotExist" - - // ErrorCodeDiskSizeGreaterThanVolumeMaxSize is a ErrorCode enum value - ErrorCodeDiskSizeGreaterThanVolumeMaxSize = "DiskSizeGreaterThanVolumeMaxSize" - - // ErrorCodeDiskSizeLessThanVolumeSize is a ErrorCode enum value - ErrorCodeDiskSizeLessThanVolumeSize = "DiskSizeLessThanVolumeSize" - - // ErrorCodeDiskSizeNotGigAligned is a ErrorCode enum value - ErrorCodeDiskSizeNotGigAligned = "DiskSizeNotGigAligned" - - // ErrorCodeDuplicateCertificateInfo is a ErrorCode enum value - ErrorCodeDuplicateCertificateInfo = "DuplicateCertificateInfo" - - // ErrorCodeDuplicateSchedule is a ErrorCode enum value - ErrorCodeDuplicateSchedule = "DuplicateSchedule" - - // ErrorCodeEndpointNotFound is a ErrorCode enum value - ErrorCodeEndpointNotFound = "EndpointNotFound" - - // ErrorCodeIamnotSupported is a ErrorCode enum value - ErrorCodeIamnotSupported = "IAMNotSupported" - - // ErrorCodeInitiatorInvalid is a ErrorCode enum value - ErrorCodeInitiatorInvalid = "InitiatorInvalid" - - // ErrorCodeInitiatorNotFound is a ErrorCode enum value - ErrorCodeInitiatorNotFound = "InitiatorNotFound" - - // ErrorCodeInternalError is a ErrorCode enum value - ErrorCodeInternalError = "InternalError" - - // ErrorCodeInvalidGateway is a ErrorCode enum value - ErrorCodeInvalidGateway = "InvalidGateway" - - // ErrorCodeInvalidEndpoint is a ErrorCode enum value - ErrorCodeInvalidEndpoint = "InvalidEndpoint" - - // ErrorCodeInvalidParameters is a ErrorCode enum value - ErrorCodeInvalidParameters = "InvalidParameters" - - // ErrorCodeInvalidSchedule is a ErrorCode enum value - ErrorCodeInvalidSchedule = "InvalidSchedule" - - // ErrorCodeLocalStorageLimitExceeded is a ErrorCode enum value - ErrorCodeLocalStorageLimitExceeded = "LocalStorageLimitExceeded" - - // ErrorCodeLunAlreadyAllocated is a ErrorCode enum value - ErrorCodeLunAlreadyAllocated = "LunAlreadyAllocated " - - // ErrorCodeLunInvalid is a ErrorCode enum value - ErrorCodeLunInvalid = "LunInvalid" - - // ErrorCodeMaximumContentLengthExceeded is a ErrorCode enum value - ErrorCodeMaximumContentLengthExceeded = "MaximumContentLengthExceeded" - - // ErrorCodeMaximumTapeCartridgeCountExceeded is a ErrorCode enum value - ErrorCodeMaximumTapeCartridgeCountExceeded = "MaximumTapeCartridgeCountExceeded" - - // ErrorCodeMaximumVolumeCountExceeded is a ErrorCode enum value - ErrorCodeMaximumVolumeCountExceeded = "MaximumVolumeCountExceeded" - - // ErrorCodeNetworkConfigurationChanged is a ErrorCode enum value - ErrorCodeNetworkConfigurationChanged = "NetworkConfigurationChanged" - - // ErrorCodeNoDisksAvailable is a ErrorCode enum value - ErrorCodeNoDisksAvailable = "NoDisksAvailable" - - // ErrorCodeNotImplemented is a ErrorCode enum value - ErrorCodeNotImplemented = "NotImplemented" - - // ErrorCodeNotSupported is a ErrorCode enum value - ErrorCodeNotSupported = "NotSupported" - - // ErrorCodeOperationAborted is a ErrorCode enum value - ErrorCodeOperationAborted = "OperationAborted" - - // ErrorCodeOutdatedGateway is a ErrorCode enum value - ErrorCodeOutdatedGateway = "OutdatedGateway" - - // ErrorCodeParametersNotImplemented is a ErrorCode enum value - ErrorCodeParametersNotImplemented = "ParametersNotImplemented" - - // ErrorCodeRegionInvalid is a ErrorCode enum value - ErrorCodeRegionInvalid = "RegionInvalid" - - // ErrorCodeRequestTimeout is a ErrorCode enum value - ErrorCodeRequestTimeout = "RequestTimeout" - - // ErrorCodeServiceUnavailable is a ErrorCode enum value - ErrorCodeServiceUnavailable = "ServiceUnavailable" - - // ErrorCodeSnapshotDeleted is a ErrorCode enum value - ErrorCodeSnapshotDeleted = "SnapshotDeleted" - - // ErrorCodeSnapshotIdInvalid is a ErrorCode enum value - ErrorCodeSnapshotIdInvalid = "SnapshotIdInvalid" - - // ErrorCodeSnapshotInProgress is a ErrorCode enum value - ErrorCodeSnapshotInProgress = "SnapshotInProgress" - - // ErrorCodeSnapshotNotFound is a ErrorCode enum value - ErrorCodeSnapshotNotFound = "SnapshotNotFound" - - // ErrorCodeSnapshotScheduleNotFound is a ErrorCode enum value - ErrorCodeSnapshotScheduleNotFound = "SnapshotScheduleNotFound" - - // ErrorCodeStagingAreaFull is a ErrorCode enum value - ErrorCodeStagingAreaFull = "StagingAreaFull" - - // ErrorCodeStorageFailure is a ErrorCode enum value - ErrorCodeStorageFailure = "StorageFailure" - - // ErrorCodeTapeCartridgeNotFound is a ErrorCode enum value - ErrorCodeTapeCartridgeNotFound = "TapeCartridgeNotFound" - - // ErrorCodeTargetAlreadyExists is a ErrorCode enum value - ErrorCodeTargetAlreadyExists = "TargetAlreadyExists" - - // ErrorCodeTargetInvalid is a ErrorCode enum value - ErrorCodeTargetInvalid = "TargetInvalid" - - // ErrorCodeTargetNotFound is a ErrorCode enum value - ErrorCodeTargetNotFound = "TargetNotFound" - - // ErrorCodeUnauthorizedOperation is a ErrorCode enum value - ErrorCodeUnauthorizedOperation = "UnauthorizedOperation" - - // ErrorCodeVolumeAlreadyExists is a ErrorCode enum value - ErrorCodeVolumeAlreadyExists = "VolumeAlreadyExists" - - // ErrorCodeVolumeIdInvalid is a ErrorCode enum value - ErrorCodeVolumeIdInvalid = "VolumeIdInvalid" - - // ErrorCodeVolumeInUse is a ErrorCode enum value - ErrorCodeVolumeInUse = "VolumeInUse" - - // ErrorCodeVolumeNotFound is a ErrorCode enum value - ErrorCodeVolumeNotFound = "VolumeNotFound" - - // ErrorCodeVolumeNotReady is a ErrorCode enum value - ErrorCodeVolumeNotReady = "VolumeNotReady" -) - -// The type of the file share. -const ( - // FileShareTypeNfs is a FileShareType enum value - FileShareTypeNfs = "NFS" - - // FileShareTypeSmb is a FileShareType enum value - FileShareTypeSmb = "SMB" -) - -// A value that sets the access control list permission for objects in the S3 -// bucket that a file gateway puts objects into. The default value is "private". -const ( - // ObjectACLPrivate is a ObjectACL enum value - ObjectACLPrivate = "private" - - // ObjectACLPublicRead is a ObjectACL enum value - ObjectACLPublicRead = "public-read" - - // ObjectACLPublicReadWrite is a ObjectACL enum value - ObjectACLPublicReadWrite = "public-read-write" - - // ObjectACLAuthenticatedRead is a ObjectACL enum value - ObjectACLAuthenticatedRead = "authenticated-read" - - // ObjectACLBucketOwnerRead is a ObjectACL enum value - ObjectACLBucketOwnerRead = "bucket-owner-read" - - // ObjectACLBucketOwnerFullControl is a ObjectACL enum value - ObjectACLBucketOwnerFullControl = "bucket-owner-full-control" - - // ObjectACLAwsExecRead is a ObjectACL enum value - ObjectACLAwsExecRead = "aws-exec-read" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go deleted file mode 100644 index b53d44223..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go +++ /dev/null @@ -1,79 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package storagegateway provides the client and types for making API -// requests to AWS Storage Gateway. -// -// AWS Storage Gateway is the service that connects an on-premises software -// appliance with cloud-based storage to provide seamless and secure integration -// between an organization's on-premises IT environment and AWS's storage infrastructure. -// The service enables you to securely upload data to the AWS cloud for cost -// effective backup and rapid disaster recovery. -// -// Use the following links to get started using the AWS Storage Gateway Service -// API Reference: -// -// * AWS Storage Gateway Required Request Headers (http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html#AWSStorageGatewayHTTPRequestsHeaders): -// Describes the required headers that you must send with every POST request -// to AWS Storage Gateway. -// -// * Signing Requests (http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html#AWSStorageGatewaySigningRequests): -// AWS Storage Gateway requires that you authenticate every request you send; -// this topic describes how sign such a request. -// -// * Error Responses (http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html#APIErrorResponses): -// Provides reference information about AWS Storage Gateway errors. -// -// * Operations in AWS Storage Gateway (http://docs.aws.amazon.com/storagegateway/latest/APIReference/API_Operations.html): -// Contains detailed descriptions of all AWS Storage Gateway operations, -// their request parameters, response elements, possible errors, and examples -// of requests and responses. -// -// * AWS Storage Gateway Regions and Endpoints: (http://docs.aws.amazon.com/general/latest/gr/rande.html#sg_region) -// Provides a list of each AWS region and endpoints available for use with -// AWS Storage Gateway. -// -// AWS Storage Gateway resource IDs are in uppercase. When you use these resource -// IDs with the Amazon EC2 API, EC2 expects resource IDs in lowercase. You must -// change your resource ID to lowercase to use it with the EC2 API. For example, -// in Storage Gateway the ID for a volume might be vol-AA22BB012345DAF670. When -// you use this ID with the EC2 API, you must change it to vol-aa22bb012345daf670. -// Otherwise, the EC2 API might not behave as expected. -// -// IDs for Storage Gateway volumes and Amazon EBS snapshots created from gateway -// volumes are changing to a longer format. Starting in December 2016, all new -// volumes and snapshots will be created with a 17-character string. Starting -// in April 2016, you will be able to use these longer IDs so you can test your -// systems with the new format. For more information, see Longer EC2 and EBS -// Resource IDs (https://aws.amazon.com/ec2/faqs/#longer-ids). -// -// For example, a volume Amazon Resource Name (ARN) with the longer volume -// ID format looks like the following: -// -// arn:aws:storagegateway:us-west-2:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABBCCDDEEFFG. -// -// A snapshot ID with the longer ID format looks like the following: snap-78e226633445566ee. -// -// For more information, see Announcement: Heads-up – Longer AWS Storage Gateway -// volume and snapshot IDs coming in 2016 (https://forums.aws.amazon.com/ann.jspa?annID=3557). -// -// See https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30 for more information on this service. -// -// See storagegateway package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/storagegateway/ -// -// Using the Client -// -// To contact AWS Storage Gateway with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS Storage Gateway client StorageGateway for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/storagegateway/#New -package storagegateway diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/errors.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/errors.go deleted file mode 100644 index 01b9816e3..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/errors.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package storagegateway - -const ( - - // ErrCodeInternalServerError for service response error code - // "InternalServerError". - // - // An internal server error has occurred during the request. For more information, - // see the error and message fields. - ErrCodeInternalServerError = "InternalServerError" - - // ErrCodeInvalidGatewayRequestException for service response error code - // "InvalidGatewayRequestException". - // - // An exception occurred because an invalid gateway request was issued to the - // service. For more information, see the error and message fields. - ErrCodeInvalidGatewayRequestException = "InvalidGatewayRequestException" - - // ErrCodeServiceUnavailableError for service response error code - // "ServiceUnavailableError". - // - // An internal server error has occurred because the service is unavailable. - // For more information, see the error and message fields. - ErrCodeServiceUnavailableError = "ServiceUnavailableError" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/service.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/service.go deleted file mode 100644 index 9a0c08f69..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package storagegateway - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// StorageGateway provides the API operation methods for making requests to -// AWS Storage Gateway. See this package's package overview docs -// for details on the service. -// -// StorageGateway methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type StorageGateway struct { - *client.Client -} - -// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) - -// Service information constants -const ( - ServiceName = "storagegateway" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Storage Gateway" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the StorageGateway client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a StorageGateway client from just a session. -// svc := storagegateway.New(mySession) -// -// // Create a StorageGateway client with additional configuration -// svc := storagegateway.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *StorageGateway { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *StorageGateway { - svc := &StorageGateway{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2013-06-30", - JSONVersion: "1.1", - TargetPrefix: "StorageGateway_20130630", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a StorageGateway operation and runs any -// custom request initialization. -func (c *StorageGateway) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/swf/api.go b/vendor/github.com/aws/aws-sdk-go/service/swf/api.go deleted file mode 100644 index 97f9b8228..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/swf/api.go +++ /dev/null @@ -1,15433 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package swf - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCountClosedWorkflowExecutions = "CountClosedWorkflowExecutions" - -// CountClosedWorkflowExecutionsRequest generates a "aws/request.Request" representing the -// client's request for the CountClosedWorkflowExecutions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CountClosedWorkflowExecutions for more information on using the CountClosedWorkflowExecutions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CountClosedWorkflowExecutionsRequest method. -// req, resp := client.CountClosedWorkflowExecutionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) CountClosedWorkflowExecutionsRequest(input *CountClosedWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionCount) { - op := &request.Operation{ - Name: opCountClosedWorkflowExecutions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CountClosedWorkflowExecutionsInput{} - } - - output = &WorkflowExecutionCount{} - req = c.newRequest(op, input, output) - return -} - -// CountClosedWorkflowExecutions API operation for Amazon Simple Workflow Service. -// -// Returns the number of closed workflow executions within the given domain -// that meet the specified filtering criteria. -// -// This operation is eventually consistent. The results are best effort and -// may not exactly reflect recent updates and changes. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the following parameters by using a Condition element with -// the appropriate keys. -// -// tagFilter.tag: String constraint. The key is swf:tagFilter.tag. -// -// typeFilter.name: String constraint. The key is swf:typeFilter.name. -// -// typeFilter.version: String constraint. The key is swf:typeFilter.version. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation CountClosedWorkflowExecutions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) CountClosedWorkflowExecutions(input *CountClosedWorkflowExecutionsInput) (*WorkflowExecutionCount, error) { - req, out := c.CountClosedWorkflowExecutionsRequest(input) - return out, req.Send() -} - -// CountClosedWorkflowExecutionsWithContext is the same as CountClosedWorkflowExecutions with the addition of -// the ability to pass a context and additional request options. -// -// See CountClosedWorkflowExecutions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) CountClosedWorkflowExecutionsWithContext(ctx aws.Context, input *CountClosedWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionCount, error) { - req, out := c.CountClosedWorkflowExecutionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCountOpenWorkflowExecutions = "CountOpenWorkflowExecutions" - -// CountOpenWorkflowExecutionsRequest generates a "aws/request.Request" representing the -// client's request for the CountOpenWorkflowExecutions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CountOpenWorkflowExecutions for more information on using the CountOpenWorkflowExecutions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CountOpenWorkflowExecutionsRequest method. -// req, resp := client.CountOpenWorkflowExecutionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) CountOpenWorkflowExecutionsRequest(input *CountOpenWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionCount) { - op := &request.Operation{ - Name: opCountOpenWorkflowExecutions, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CountOpenWorkflowExecutionsInput{} - } - - output = &WorkflowExecutionCount{} - req = c.newRequest(op, input, output) - return -} - -// CountOpenWorkflowExecutions API operation for Amazon Simple Workflow Service. -// -// Returns the number of open workflow executions within the given domain that -// meet the specified filtering criteria. -// -// This operation is eventually consistent. The results are best effort and -// may not exactly reflect recent updates and changes. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the following parameters by using a Condition element with -// the appropriate keys. -// -// tagFilter.tag: String constraint. The key is swf:tagFilter.tag. -// -// typeFilter.name: String constraint. The key is swf:typeFilter.name. -// -// typeFilter.version: String constraint. The key is swf:typeFilter.version. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation CountOpenWorkflowExecutions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) CountOpenWorkflowExecutions(input *CountOpenWorkflowExecutionsInput) (*WorkflowExecutionCount, error) { - req, out := c.CountOpenWorkflowExecutionsRequest(input) - return out, req.Send() -} - -// CountOpenWorkflowExecutionsWithContext is the same as CountOpenWorkflowExecutions with the addition of -// the ability to pass a context and additional request options. -// -// See CountOpenWorkflowExecutions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) CountOpenWorkflowExecutionsWithContext(ctx aws.Context, input *CountOpenWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionCount, error) { - req, out := c.CountOpenWorkflowExecutionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCountPendingActivityTasks = "CountPendingActivityTasks" - -// CountPendingActivityTasksRequest generates a "aws/request.Request" representing the -// client's request for the CountPendingActivityTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CountPendingActivityTasks for more information on using the CountPendingActivityTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CountPendingActivityTasksRequest method. -// req, resp := client.CountPendingActivityTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) CountPendingActivityTasksRequest(input *CountPendingActivityTasksInput) (req *request.Request, output *PendingTaskCount) { - op := &request.Operation{ - Name: opCountPendingActivityTasks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CountPendingActivityTasksInput{} - } - - output = &PendingTaskCount{} - req = c.newRequest(op, input, output) - return -} - -// CountPendingActivityTasks API operation for Amazon Simple Workflow Service. -// -// Returns the estimated number of activity tasks in the specified task list. -// The count returned is an approximation and isn't guaranteed to be exact. -// If you specify a task list that no activity task was ever scheduled in then -// 0 is returned. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the taskList.name parameter by using a Condition element with -// the swf:taskList.name key to allow the action to access only certain task -// lists. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation CountPendingActivityTasks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) CountPendingActivityTasks(input *CountPendingActivityTasksInput) (*PendingTaskCount, error) { - req, out := c.CountPendingActivityTasksRequest(input) - return out, req.Send() -} - -// CountPendingActivityTasksWithContext is the same as CountPendingActivityTasks with the addition of -// the ability to pass a context and additional request options. -// -// See CountPendingActivityTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) CountPendingActivityTasksWithContext(ctx aws.Context, input *CountPendingActivityTasksInput, opts ...request.Option) (*PendingTaskCount, error) { - req, out := c.CountPendingActivityTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCountPendingDecisionTasks = "CountPendingDecisionTasks" - -// CountPendingDecisionTasksRequest generates a "aws/request.Request" representing the -// client's request for the CountPendingDecisionTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CountPendingDecisionTasks for more information on using the CountPendingDecisionTasks -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CountPendingDecisionTasksRequest method. -// req, resp := client.CountPendingDecisionTasksRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) CountPendingDecisionTasksRequest(input *CountPendingDecisionTasksInput) (req *request.Request, output *PendingTaskCount) { - op := &request.Operation{ - Name: opCountPendingDecisionTasks, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CountPendingDecisionTasksInput{} - } - - output = &PendingTaskCount{} - req = c.newRequest(op, input, output) - return -} - -// CountPendingDecisionTasks API operation for Amazon Simple Workflow Service. -// -// Returns the estimated number of decision tasks in the specified task list. -// The count returned is an approximation and isn't guaranteed to be exact. -// If you specify a task list that no decision task was ever scheduled in then -// 0 is returned. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the taskList.name parameter by using a Condition element with -// the swf:taskList.name key to allow the action to access only certain task -// lists. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation CountPendingDecisionTasks for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) CountPendingDecisionTasks(input *CountPendingDecisionTasksInput) (*PendingTaskCount, error) { - req, out := c.CountPendingDecisionTasksRequest(input) - return out, req.Send() -} - -// CountPendingDecisionTasksWithContext is the same as CountPendingDecisionTasks with the addition of -// the ability to pass a context and additional request options. -// -// See CountPendingDecisionTasks for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) CountPendingDecisionTasksWithContext(ctx aws.Context, input *CountPendingDecisionTasksInput, opts ...request.Option) (*PendingTaskCount, error) { - req, out := c.CountPendingDecisionTasksRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeprecateActivityType = "DeprecateActivityType" - -// DeprecateActivityTypeRequest generates a "aws/request.Request" representing the -// client's request for the DeprecateActivityType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeprecateActivityType for more information on using the DeprecateActivityType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeprecateActivityTypeRequest method. -// req, resp := client.DeprecateActivityTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) DeprecateActivityTypeRequest(input *DeprecateActivityTypeInput) (req *request.Request, output *DeprecateActivityTypeOutput) { - op := &request.Operation{ - Name: opDeprecateActivityType, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeprecateActivityTypeInput{} - } - - output = &DeprecateActivityTypeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeprecateActivityType API operation for Amazon Simple Workflow Service. -// -// Deprecates the specified activity type. After an activity type has been deprecated, -// you cannot create new tasks of that activity type. Tasks of this type that -// were scheduled before the type was deprecated continue to run. -// -// This operation is eventually consistent. The results are best effort and -// may not exactly reflect recent updates and changes. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the following parameters by using a Condition element with -// the appropriate keys. -// -// activityType.name: String constraint. The key is swf:activityType.name. -// -// activityType.version: String constraint. The key is swf:activityType.version. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation DeprecateActivityType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeTypeDeprecatedFault "TypeDeprecatedFault" -// Returned when the specified activity or workflow type was already deprecated. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) DeprecateActivityType(input *DeprecateActivityTypeInput) (*DeprecateActivityTypeOutput, error) { - req, out := c.DeprecateActivityTypeRequest(input) - return out, req.Send() -} - -// DeprecateActivityTypeWithContext is the same as DeprecateActivityType with the addition of -// the ability to pass a context and additional request options. -// -// See DeprecateActivityType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) DeprecateActivityTypeWithContext(ctx aws.Context, input *DeprecateActivityTypeInput, opts ...request.Option) (*DeprecateActivityTypeOutput, error) { - req, out := c.DeprecateActivityTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeprecateDomain = "DeprecateDomain" - -// DeprecateDomainRequest generates a "aws/request.Request" representing the -// client's request for the DeprecateDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeprecateDomain for more information on using the DeprecateDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeprecateDomainRequest method. -// req, resp := client.DeprecateDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) DeprecateDomainRequest(input *DeprecateDomainInput) (req *request.Request, output *DeprecateDomainOutput) { - op := &request.Operation{ - Name: opDeprecateDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeprecateDomainInput{} - } - - output = &DeprecateDomainOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeprecateDomain API operation for Amazon Simple Workflow Service. -// -// Deprecates the specified domain. After a domain has been deprecated it cannot -// be used to create new workflow executions or register new types. However, -// you can still use visibility actions on this domain. Deprecating a domain -// also deprecates all activity and workflow types registered in the domain. -// Executions that were started before the domain was deprecated continues to -// run. -// -// This operation is eventually consistent. The results are best effort and -// may not exactly reflect recent updates and changes. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation DeprecateDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeDomainDeprecatedFault "DomainDeprecatedFault" -// Returned when the specified domain has been deprecated. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) DeprecateDomain(input *DeprecateDomainInput) (*DeprecateDomainOutput, error) { - req, out := c.DeprecateDomainRequest(input) - return out, req.Send() -} - -// DeprecateDomainWithContext is the same as DeprecateDomain with the addition of -// the ability to pass a context and additional request options. -// -// See DeprecateDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) DeprecateDomainWithContext(ctx aws.Context, input *DeprecateDomainInput, opts ...request.Option) (*DeprecateDomainOutput, error) { - req, out := c.DeprecateDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeprecateWorkflowType = "DeprecateWorkflowType" - -// DeprecateWorkflowTypeRequest generates a "aws/request.Request" representing the -// client's request for the DeprecateWorkflowType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeprecateWorkflowType for more information on using the DeprecateWorkflowType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeprecateWorkflowTypeRequest method. -// req, resp := client.DeprecateWorkflowTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) DeprecateWorkflowTypeRequest(input *DeprecateWorkflowTypeInput) (req *request.Request, output *DeprecateWorkflowTypeOutput) { - op := &request.Operation{ - Name: opDeprecateWorkflowType, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeprecateWorkflowTypeInput{} - } - - output = &DeprecateWorkflowTypeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeprecateWorkflowType API operation for Amazon Simple Workflow Service. -// -// Deprecates the specified workflow type. After a workflow type has been deprecated, -// you cannot create new executions of that type. Executions that were started -// before the type was deprecated continues to run. A deprecated workflow type -// may still be used when calling visibility actions. -// -// This operation is eventually consistent. The results are best effort and -// may not exactly reflect recent updates and changes. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the following parameters by using a Condition element with -// the appropriate keys. -// -// workflowType.name: String constraint. The key is swf:workflowType.name. -// -// workflowType.version: String constraint. The key is swf:workflowType.version. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation DeprecateWorkflowType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeTypeDeprecatedFault "TypeDeprecatedFault" -// Returned when the specified activity or workflow type was already deprecated. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) DeprecateWorkflowType(input *DeprecateWorkflowTypeInput) (*DeprecateWorkflowTypeOutput, error) { - req, out := c.DeprecateWorkflowTypeRequest(input) - return out, req.Send() -} - -// DeprecateWorkflowTypeWithContext is the same as DeprecateWorkflowType with the addition of -// the ability to pass a context and additional request options. -// -// See DeprecateWorkflowType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) DeprecateWorkflowTypeWithContext(ctx aws.Context, input *DeprecateWorkflowTypeInput, opts ...request.Option) (*DeprecateWorkflowTypeOutput, error) { - req, out := c.DeprecateWorkflowTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeActivityType = "DescribeActivityType" - -// DescribeActivityTypeRequest generates a "aws/request.Request" representing the -// client's request for the DescribeActivityType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeActivityType for more information on using the DescribeActivityType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeActivityTypeRequest method. -// req, resp := client.DescribeActivityTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) DescribeActivityTypeRequest(input *DescribeActivityTypeInput) (req *request.Request, output *DescribeActivityTypeOutput) { - op := &request.Operation{ - Name: opDescribeActivityType, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeActivityTypeInput{} - } - - output = &DescribeActivityTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeActivityType API operation for Amazon Simple Workflow Service. -// -// Returns information about the specified activity type. This includes configuration -// settings provided when the type was registered and other general information -// about the type. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the following parameters by using a Condition element with -// the appropriate keys. -// -// activityType.name: String constraint. The key is swf:activityType.name. -// -// activityType.version: String constraint. The key is swf:activityType.version. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation DescribeActivityType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) DescribeActivityType(input *DescribeActivityTypeInput) (*DescribeActivityTypeOutput, error) { - req, out := c.DescribeActivityTypeRequest(input) - return out, req.Send() -} - -// DescribeActivityTypeWithContext is the same as DescribeActivityType with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeActivityType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) DescribeActivityTypeWithContext(ctx aws.Context, input *DescribeActivityTypeInput, opts ...request.Option) (*DescribeActivityTypeOutput, error) { - req, out := c.DescribeActivityTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDomain = "DescribeDomain" - -// DescribeDomainRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDomain for more information on using the DescribeDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDomainRequest method. -// req, resp := client.DescribeDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) DescribeDomainRequest(input *DescribeDomainInput) (req *request.Request, output *DescribeDomainOutput) { - op := &request.Operation{ - Name: opDescribeDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeDomainInput{} - } - - output = &DescribeDomainOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDomain API operation for Amazon Simple Workflow Service. -// -// Returns information about the specified domain, including description and -// status. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation DescribeDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) DescribeDomain(input *DescribeDomainInput) (*DescribeDomainOutput, error) { - req, out := c.DescribeDomainRequest(input) - return out, req.Send() -} - -// DescribeDomainWithContext is the same as DescribeDomain with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) DescribeDomainWithContext(ctx aws.Context, input *DescribeDomainInput, opts ...request.Option) (*DescribeDomainOutput, error) { - req, out := c.DescribeDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeWorkflowExecution = "DescribeWorkflowExecution" - -// DescribeWorkflowExecutionRequest generates a "aws/request.Request" representing the -// client's request for the DescribeWorkflowExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeWorkflowExecution for more information on using the DescribeWorkflowExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeWorkflowExecutionRequest method. -// req, resp := client.DescribeWorkflowExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) DescribeWorkflowExecutionRequest(input *DescribeWorkflowExecutionInput) (req *request.Request, output *DescribeWorkflowExecutionOutput) { - op := &request.Operation{ - Name: opDescribeWorkflowExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeWorkflowExecutionInput{} - } - - output = &DescribeWorkflowExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeWorkflowExecution API operation for Amazon Simple Workflow Service. -// -// Returns information about the specified workflow execution including its -// type and some statistics. -// -// This operation is eventually consistent. The results are best effort and -// may not exactly reflect recent updates and changes. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation DescribeWorkflowExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) DescribeWorkflowExecution(input *DescribeWorkflowExecutionInput) (*DescribeWorkflowExecutionOutput, error) { - req, out := c.DescribeWorkflowExecutionRequest(input) - return out, req.Send() -} - -// DescribeWorkflowExecutionWithContext is the same as DescribeWorkflowExecution with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeWorkflowExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) DescribeWorkflowExecutionWithContext(ctx aws.Context, input *DescribeWorkflowExecutionInput, opts ...request.Option) (*DescribeWorkflowExecutionOutput, error) { - req, out := c.DescribeWorkflowExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeWorkflowType = "DescribeWorkflowType" - -// DescribeWorkflowTypeRequest generates a "aws/request.Request" representing the -// client's request for the DescribeWorkflowType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeWorkflowType for more information on using the DescribeWorkflowType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeWorkflowTypeRequest method. -// req, resp := client.DescribeWorkflowTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) DescribeWorkflowTypeRequest(input *DescribeWorkflowTypeInput) (req *request.Request, output *DescribeWorkflowTypeOutput) { - op := &request.Operation{ - Name: opDescribeWorkflowType, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeWorkflowTypeInput{} - } - - output = &DescribeWorkflowTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeWorkflowType API operation for Amazon Simple Workflow Service. -// -// Returns information about the specified workflow type. This includes configuration -// settings specified when the type was registered and other information such -// as creation date, current status, etc. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the following parameters by using a Condition element with -// the appropriate keys. -// -// workflowType.name: String constraint. The key is swf:workflowType.name. -// -// workflowType.version: String constraint. The key is swf:workflowType.version. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation DescribeWorkflowType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) DescribeWorkflowType(input *DescribeWorkflowTypeInput) (*DescribeWorkflowTypeOutput, error) { - req, out := c.DescribeWorkflowTypeRequest(input) - return out, req.Send() -} - -// DescribeWorkflowTypeWithContext is the same as DescribeWorkflowType with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeWorkflowType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) DescribeWorkflowTypeWithContext(ctx aws.Context, input *DescribeWorkflowTypeInput, opts ...request.Option) (*DescribeWorkflowTypeOutput, error) { - req, out := c.DescribeWorkflowTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetWorkflowExecutionHistory = "GetWorkflowExecutionHistory" - -// GetWorkflowExecutionHistoryRequest generates a "aws/request.Request" representing the -// client's request for the GetWorkflowExecutionHistory operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetWorkflowExecutionHistory for more information on using the GetWorkflowExecutionHistory -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetWorkflowExecutionHistoryRequest method. -// req, resp := client.GetWorkflowExecutionHistoryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) GetWorkflowExecutionHistoryRequest(input *GetWorkflowExecutionHistoryInput) (req *request.Request, output *GetWorkflowExecutionHistoryOutput) { - op := &request.Operation{ - Name: opGetWorkflowExecutionHistory, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextPageToken"}, - OutputTokens: []string{"nextPageToken"}, - LimitToken: "maximumPageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetWorkflowExecutionHistoryInput{} - } - - output = &GetWorkflowExecutionHistoryOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetWorkflowExecutionHistory API operation for Amazon Simple Workflow Service. -// -// Returns the history of the specified workflow execution. The results may -// be split into multiple pages. To retrieve subsequent pages, make the call -// again using the nextPageToken returned by the initial call. -// -// This operation is eventually consistent. The results are best effort and -// may not exactly reflect recent updates and changes. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation GetWorkflowExecutionHistory for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) GetWorkflowExecutionHistory(input *GetWorkflowExecutionHistoryInput) (*GetWorkflowExecutionHistoryOutput, error) { - req, out := c.GetWorkflowExecutionHistoryRequest(input) - return out, req.Send() -} - -// GetWorkflowExecutionHistoryWithContext is the same as GetWorkflowExecutionHistory with the addition of -// the ability to pass a context and additional request options. -// -// See GetWorkflowExecutionHistory for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) GetWorkflowExecutionHistoryWithContext(ctx aws.Context, input *GetWorkflowExecutionHistoryInput, opts ...request.Option) (*GetWorkflowExecutionHistoryOutput, error) { - req, out := c.GetWorkflowExecutionHistoryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetWorkflowExecutionHistoryPages iterates over the pages of a GetWorkflowExecutionHistory operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetWorkflowExecutionHistory 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 GetWorkflowExecutionHistory operation. -// pageNum := 0 -// err := client.GetWorkflowExecutionHistoryPages(params, -// func(page *GetWorkflowExecutionHistoryOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SWF) GetWorkflowExecutionHistoryPages(input *GetWorkflowExecutionHistoryInput, fn func(*GetWorkflowExecutionHistoryOutput, bool) bool) error { - return c.GetWorkflowExecutionHistoryPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetWorkflowExecutionHistoryPagesWithContext same as GetWorkflowExecutionHistoryPages 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 *SWF) GetWorkflowExecutionHistoryPagesWithContext(ctx aws.Context, input *GetWorkflowExecutionHistoryInput, fn func(*GetWorkflowExecutionHistoryOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetWorkflowExecutionHistoryInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetWorkflowExecutionHistoryRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetWorkflowExecutionHistoryOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListActivityTypes = "ListActivityTypes" - -// ListActivityTypesRequest generates a "aws/request.Request" representing the -// client's request for the ListActivityTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListActivityTypes for more information on using the ListActivityTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListActivityTypesRequest method. -// req, resp := client.ListActivityTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) ListActivityTypesRequest(input *ListActivityTypesInput) (req *request.Request, output *ListActivityTypesOutput) { - op := &request.Operation{ - Name: opListActivityTypes, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextPageToken"}, - OutputTokens: []string{"nextPageToken"}, - LimitToken: "maximumPageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListActivityTypesInput{} - } - - output = &ListActivityTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListActivityTypes API operation for Amazon Simple Workflow Service. -// -// Returns information about all activities registered in the specified domain -// that match the specified name and registration status. The result includes -// information like creation date, current status of the activity, etc. The -// results may be split into multiple pages. To retrieve subsequent pages, make -// the call again using the nextPageToken returned by the initial call. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation ListActivityTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -func (c *SWF) ListActivityTypes(input *ListActivityTypesInput) (*ListActivityTypesOutput, error) { - req, out := c.ListActivityTypesRequest(input) - return out, req.Send() -} - -// ListActivityTypesWithContext is the same as ListActivityTypes with the addition of -// the ability to pass a context and additional request options. -// -// See ListActivityTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) ListActivityTypesWithContext(ctx aws.Context, input *ListActivityTypesInput, opts ...request.Option) (*ListActivityTypesOutput, error) { - req, out := c.ListActivityTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListActivityTypesPages iterates over the pages of a ListActivityTypes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListActivityTypes 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 ListActivityTypes operation. -// pageNum := 0 -// err := client.ListActivityTypesPages(params, -// func(page *ListActivityTypesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SWF) ListActivityTypesPages(input *ListActivityTypesInput, fn func(*ListActivityTypesOutput, bool) bool) error { - return c.ListActivityTypesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListActivityTypesPagesWithContext same as ListActivityTypesPages 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 *SWF) ListActivityTypesPagesWithContext(ctx aws.Context, input *ListActivityTypesInput, fn func(*ListActivityTypesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListActivityTypesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListActivityTypesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListActivityTypesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListClosedWorkflowExecutions = "ListClosedWorkflowExecutions" - -// ListClosedWorkflowExecutionsRequest generates a "aws/request.Request" representing the -// client's request for the ListClosedWorkflowExecutions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListClosedWorkflowExecutions for more information on using the ListClosedWorkflowExecutions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListClosedWorkflowExecutionsRequest method. -// req, resp := client.ListClosedWorkflowExecutionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) ListClosedWorkflowExecutionsRequest(input *ListClosedWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionInfos) { - op := &request.Operation{ - Name: opListClosedWorkflowExecutions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextPageToken"}, - OutputTokens: []string{"nextPageToken"}, - LimitToken: "maximumPageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListClosedWorkflowExecutionsInput{} - } - - output = &WorkflowExecutionInfos{} - req = c.newRequest(op, input, output) - return -} - -// ListClosedWorkflowExecutions API operation for Amazon Simple Workflow Service. -// -// Returns a list of closed workflow executions in the specified domain that -// meet the filtering criteria. The results may be split into multiple pages. -// To retrieve subsequent pages, make the call again using the nextPageToken -// returned by the initial call. -// -// This operation is eventually consistent. The results are best effort and -// may not exactly reflect recent updates and changes. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the following parameters by using a Condition element with -// the appropriate keys. -// -// tagFilter.tag: String constraint. The key is swf:tagFilter.tag. -// -// typeFilter.name: String constraint. The key is swf:typeFilter.name. -// -// typeFilter.version: String constraint. The key is swf:typeFilter.version. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation ListClosedWorkflowExecutions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) ListClosedWorkflowExecutions(input *ListClosedWorkflowExecutionsInput) (*WorkflowExecutionInfos, error) { - req, out := c.ListClosedWorkflowExecutionsRequest(input) - return out, req.Send() -} - -// ListClosedWorkflowExecutionsWithContext is the same as ListClosedWorkflowExecutions with the addition of -// the ability to pass a context and additional request options. -// -// See ListClosedWorkflowExecutions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) ListClosedWorkflowExecutionsWithContext(ctx aws.Context, input *ListClosedWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionInfos, error) { - req, out := c.ListClosedWorkflowExecutionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListClosedWorkflowExecutionsPages iterates over the pages of a ListClosedWorkflowExecutions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListClosedWorkflowExecutions 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 ListClosedWorkflowExecutions operation. -// pageNum := 0 -// err := client.ListClosedWorkflowExecutionsPages(params, -// func(page *WorkflowExecutionInfos, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SWF) ListClosedWorkflowExecutionsPages(input *ListClosedWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool) error { - return c.ListClosedWorkflowExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListClosedWorkflowExecutionsPagesWithContext same as ListClosedWorkflowExecutionsPages 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 *SWF) ListClosedWorkflowExecutionsPagesWithContext(ctx aws.Context, input *ListClosedWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListClosedWorkflowExecutionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListClosedWorkflowExecutionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*WorkflowExecutionInfos), !p.HasNextPage()) - } - return p.Err() -} - -const opListDomains = "ListDomains" - -// ListDomainsRequest generates a "aws/request.Request" representing the -// client's request for the ListDomains operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDomains for more information on using the ListDomains -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDomainsRequest method. -// req, resp := client.ListDomainsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) ListDomainsRequest(input *ListDomainsInput) (req *request.Request, output *ListDomainsOutput) { - op := &request.Operation{ - Name: opListDomains, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextPageToken"}, - OutputTokens: []string{"nextPageToken"}, - LimitToken: "maximumPageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListDomainsInput{} - } - - output = &ListDomainsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDomains API operation for Amazon Simple Workflow Service. -// -// Returns the list of domains registered in the account. The results may be -// split into multiple pages. To retrieve subsequent pages, make the call again -// using the nextPageToken returned by the initial call. -// -// This operation is eventually consistent. The results are best effort and -// may not exactly reflect recent updates and changes. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. The element must be set to arn:aws:swf::AccountID:domain/*, -// where AccountID is the account ID, with no dashes. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation ListDomains for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) ListDomains(input *ListDomainsInput) (*ListDomainsOutput, error) { - req, out := c.ListDomainsRequest(input) - return out, req.Send() -} - -// ListDomainsWithContext is the same as ListDomains with the addition of -// the ability to pass a context and additional request options. -// -// See ListDomains for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) ListDomainsWithContext(ctx aws.Context, input *ListDomainsInput, opts ...request.Option) (*ListDomainsOutput, error) { - req, out := c.ListDomainsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListDomainsPages iterates over the pages of a ListDomains operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDomains method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListDomains operation. -// pageNum := 0 -// err := client.ListDomainsPages(params, -// func(page *ListDomainsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SWF) ListDomainsPages(input *ListDomainsInput, fn func(*ListDomainsOutput, bool) bool) error { - return c.ListDomainsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDomainsPagesWithContext same as ListDomainsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) ListDomainsPagesWithContext(ctx aws.Context, input *ListDomainsInput, fn func(*ListDomainsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDomainsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDomainsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDomainsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListOpenWorkflowExecutions = "ListOpenWorkflowExecutions" - -// ListOpenWorkflowExecutionsRequest generates a "aws/request.Request" representing the -// client's request for the ListOpenWorkflowExecutions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListOpenWorkflowExecutions for more information on using the ListOpenWorkflowExecutions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListOpenWorkflowExecutionsRequest method. -// req, resp := client.ListOpenWorkflowExecutionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) ListOpenWorkflowExecutionsRequest(input *ListOpenWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionInfos) { - op := &request.Operation{ - Name: opListOpenWorkflowExecutions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextPageToken"}, - OutputTokens: []string{"nextPageToken"}, - LimitToken: "maximumPageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListOpenWorkflowExecutionsInput{} - } - - output = &WorkflowExecutionInfos{} - req = c.newRequest(op, input, output) - return -} - -// ListOpenWorkflowExecutions API operation for Amazon Simple Workflow Service. -// -// Returns a list of open workflow executions in the specified domain that meet -// the filtering criteria. The results may be split into multiple pages. To -// retrieve subsequent pages, make the call again using the nextPageToken returned -// by the initial call. -// -// This operation is eventually consistent. The results are best effort and -// may not exactly reflect recent updates and changes. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the following parameters by using a Condition element with -// the appropriate keys. -// -// tagFilter.tag: String constraint. The key is swf:tagFilter.tag. -// -// typeFilter.name: String constraint. The key is swf:typeFilter.name. -// -// typeFilter.version: String constraint. The key is swf:typeFilter.version. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation ListOpenWorkflowExecutions for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) ListOpenWorkflowExecutions(input *ListOpenWorkflowExecutionsInput) (*WorkflowExecutionInfos, error) { - req, out := c.ListOpenWorkflowExecutionsRequest(input) - return out, req.Send() -} - -// ListOpenWorkflowExecutionsWithContext is the same as ListOpenWorkflowExecutions with the addition of -// the ability to pass a context and additional request options. -// -// See ListOpenWorkflowExecutions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) ListOpenWorkflowExecutionsWithContext(ctx aws.Context, input *ListOpenWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionInfos, error) { - req, out := c.ListOpenWorkflowExecutionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListOpenWorkflowExecutionsPages iterates over the pages of a ListOpenWorkflowExecutions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListOpenWorkflowExecutions 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 ListOpenWorkflowExecutions operation. -// pageNum := 0 -// err := client.ListOpenWorkflowExecutionsPages(params, -// func(page *WorkflowExecutionInfos, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SWF) ListOpenWorkflowExecutionsPages(input *ListOpenWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool) error { - return c.ListOpenWorkflowExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListOpenWorkflowExecutionsPagesWithContext same as ListOpenWorkflowExecutionsPages 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 *SWF) ListOpenWorkflowExecutionsPagesWithContext(ctx aws.Context, input *ListOpenWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListOpenWorkflowExecutionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListOpenWorkflowExecutionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*WorkflowExecutionInfos), !p.HasNextPage()) - } - return p.Err() -} - -const opListWorkflowTypes = "ListWorkflowTypes" - -// ListWorkflowTypesRequest generates a "aws/request.Request" representing the -// client's request for the ListWorkflowTypes operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListWorkflowTypes for more information on using the ListWorkflowTypes -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListWorkflowTypesRequest method. -// req, resp := client.ListWorkflowTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) ListWorkflowTypesRequest(input *ListWorkflowTypesInput) (req *request.Request, output *ListWorkflowTypesOutput) { - op := &request.Operation{ - Name: opListWorkflowTypes, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextPageToken"}, - OutputTokens: []string{"nextPageToken"}, - LimitToken: "maximumPageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListWorkflowTypesInput{} - } - - output = &ListWorkflowTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListWorkflowTypes API operation for Amazon Simple Workflow Service. -// -// Returns information about workflow types in the specified domain. The results -// may be split into multiple pages that can be retrieved by making the call -// repeatedly. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation ListWorkflowTypes for usage and error information. -// -// Returned Error Codes: -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -func (c *SWF) ListWorkflowTypes(input *ListWorkflowTypesInput) (*ListWorkflowTypesOutput, error) { - req, out := c.ListWorkflowTypesRequest(input) - return out, req.Send() -} - -// ListWorkflowTypesWithContext is the same as ListWorkflowTypes with the addition of -// the ability to pass a context and additional request options. -// -// See ListWorkflowTypes for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) ListWorkflowTypesWithContext(ctx aws.Context, input *ListWorkflowTypesInput, opts ...request.Option) (*ListWorkflowTypesOutput, error) { - req, out := c.ListWorkflowTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListWorkflowTypesPages iterates over the pages of a ListWorkflowTypes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListWorkflowTypes 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 ListWorkflowTypes operation. -// pageNum := 0 -// err := client.ListWorkflowTypesPages(params, -// func(page *ListWorkflowTypesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SWF) ListWorkflowTypesPages(input *ListWorkflowTypesInput, fn func(*ListWorkflowTypesOutput, bool) bool) error { - return c.ListWorkflowTypesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListWorkflowTypesPagesWithContext same as ListWorkflowTypesPages 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 *SWF) ListWorkflowTypesPagesWithContext(ctx aws.Context, input *ListWorkflowTypesInput, fn func(*ListWorkflowTypesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListWorkflowTypesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListWorkflowTypesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListWorkflowTypesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opPollForActivityTask = "PollForActivityTask" - -// PollForActivityTaskRequest generates a "aws/request.Request" representing the -// client's request for the PollForActivityTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PollForActivityTask for more information on using the PollForActivityTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PollForActivityTaskRequest method. -// req, resp := client.PollForActivityTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) PollForActivityTaskRequest(input *PollForActivityTaskInput) (req *request.Request, output *PollForActivityTaskOutput) { - op := &request.Operation{ - Name: opPollForActivityTask, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PollForActivityTaskInput{} - } - - output = &PollForActivityTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// PollForActivityTask API operation for Amazon Simple Workflow Service. -// -// Used by workers to get an ActivityTask from the specified activity taskList. -// This initiates a long poll, where the service holds the HTTP connection open -// and responds as soon as a task becomes available. The maximum time the service -// holds on to the request before responding is 60 seconds. If no task is available -// within 60 seconds, the poll returns an empty result. An empty result, in -// this context, means that an ActivityTask is returned, but that the value -// of taskToken is an empty string. If a task is returned, the worker should -// use its type to identify and process it correctly. -// -// Workers should set their client side socket timeout to at least 70 seconds -// (10 seconds higher than the maximum time service may hold the poll request). -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the taskList.name parameter by using a Condition element with -// the swf:taskList.name key to allow the action to access only certain task -// lists. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation PollForActivityTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -// * ErrCodeLimitExceededFault "LimitExceededFault" -// Returned by any operation if a system imposed limitation has been reached. -// To address this fault you should either clean up unused resources or increase -// the limit by contacting AWS. -// -func (c *SWF) PollForActivityTask(input *PollForActivityTaskInput) (*PollForActivityTaskOutput, error) { - req, out := c.PollForActivityTaskRequest(input) - return out, req.Send() -} - -// PollForActivityTaskWithContext is the same as PollForActivityTask with the addition of -// the ability to pass a context and additional request options. -// -// See PollForActivityTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) PollForActivityTaskWithContext(ctx aws.Context, input *PollForActivityTaskInput, opts ...request.Option) (*PollForActivityTaskOutput, error) { - req, out := c.PollForActivityTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPollForDecisionTask = "PollForDecisionTask" - -// PollForDecisionTaskRequest generates a "aws/request.Request" representing the -// client's request for the PollForDecisionTask operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PollForDecisionTask for more information on using the PollForDecisionTask -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PollForDecisionTaskRequest method. -// req, resp := client.PollForDecisionTaskRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) PollForDecisionTaskRequest(input *PollForDecisionTaskInput) (req *request.Request, output *PollForDecisionTaskOutput) { - op := &request.Operation{ - Name: opPollForDecisionTask, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextPageToken"}, - OutputTokens: []string{"nextPageToken"}, - LimitToken: "maximumPageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &PollForDecisionTaskInput{} - } - - output = &PollForDecisionTaskOutput{} - req = c.newRequest(op, input, output) - return -} - -// PollForDecisionTask API operation for Amazon Simple Workflow Service. -// -// Used by deciders to get a DecisionTask from the specified decision taskList. -// A decision task may be returned for any open workflow execution that is using -// the specified task list. The task includes a paginated view of the history -// of the workflow execution. The decider should use the workflow type and the -// history to determine how to properly handle the task. -// -// This action initiates a long poll, where the service holds the HTTP connection -// open and responds as soon a task becomes available. If no decision task is -// available in the specified task list before the timeout of 60 seconds expires, -// an empty result is returned. An empty result, in this context, means that -// a DecisionTask is returned, but that the value of taskToken is an empty string. -// -// Deciders should set their client side socket timeout to at least 70 seconds -// (10 seconds higher than the timeout). -// -// Because the number of workflow history events for a single workflow execution -// might be very large, the result returned might be split up across a number -// of pages. To retrieve subsequent pages, make additional calls to PollForDecisionTask -// using the nextPageToken returned by the initial call. Note that you do not -// call GetWorkflowExecutionHistory with this nextPageToken. Instead, call PollForDecisionTask -// again. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the taskList.name parameter by using a Condition element with -// the swf:taskList.name key to allow the action to access only certain task -// lists. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation PollForDecisionTask for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -// * ErrCodeLimitExceededFault "LimitExceededFault" -// Returned by any operation if a system imposed limitation has been reached. -// To address this fault you should either clean up unused resources or increase -// the limit by contacting AWS. -// -func (c *SWF) PollForDecisionTask(input *PollForDecisionTaskInput) (*PollForDecisionTaskOutput, error) { - req, out := c.PollForDecisionTaskRequest(input) - return out, req.Send() -} - -// PollForDecisionTaskWithContext is the same as PollForDecisionTask with the addition of -// the ability to pass a context and additional request options. -// -// See PollForDecisionTask for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) PollForDecisionTaskWithContext(ctx aws.Context, input *PollForDecisionTaskInput, opts ...request.Option) (*PollForDecisionTaskOutput, error) { - req, out := c.PollForDecisionTaskRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// PollForDecisionTaskPages iterates over the pages of a PollForDecisionTask operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See PollForDecisionTask 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 PollForDecisionTask operation. -// pageNum := 0 -// err := client.PollForDecisionTaskPages(params, -// func(page *PollForDecisionTaskOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *SWF) PollForDecisionTaskPages(input *PollForDecisionTaskInput, fn func(*PollForDecisionTaskOutput, bool) bool) error { - return c.PollForDecisionTaskPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// PollForDecisionTaskPagesWithContext same as PollForDecisionTaskPages 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 *SWF) PollForDecisionTaskPagesWithContext(ctx aws.Context, input *PollForDecisionTaskInput, fn func(*PollForDecisionTaskOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *PollForDecisionTaskInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.PollForDecisionTaskRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*PollForDecisionTaskOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opRecordActivityTaskHeartbeat = "RecordActivityTaskHeartbeat" - -// RecordActivityTaskHeartbeatRequest generates a "aws/request.Request" representing the -// client's request for the RecordActivityTaskHeartbeat operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RecordActivityTaskHeartbeat for more information on using the RecordActivityTaskHeartbeat -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RecordActivityTaskHeartbeatRequest method. -// req, resp := client.RecordActivityTaskHeartbeatRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) RecordActivityTaskHeartbeatRequest(input *RecordActivityTaskHeartbeatInput) (req *request.Request, output *RecordActivityTaskHeartbeatOutput) { - op := &request.Operation{ - Name: opRecordActivityTaskHeartbeat, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RecordActivityTaskHeartbeatInput{} - } - - output = &RecordActivityTaskHeartbeatOutput{} - req = c.newRequest(op, input, output) - return -} - -// RecordActivityTaskHeartbeat API operation for Amazon Simple Workflow Service. -// -// Used by activity workers to report to the service that the ActivityTask represented -// by the specified taskToken is still making progress. The worker can also -// specify details of the progress, for example percent complete, using the -// details parameter. This action can also be used by the worker as a mechanism -// to check if cancellation is being requested for the activity task. If a cancellation -// is being attempted for the specified task, then the boolean cancelRequested -// flag returned by the service is set to true. -// -// This action resets the taskHeartbeatTimeout clock. The taskHeartbeatTimeout -// is specified in RegisterActivityType. -// -// This action doesn't in itself create an event in the workflow execution history. -// However, if the task times out, the workflow execution history contains a -// ActivityTaskTimedOut event that contains the information from the last heartbeat -// generated by the activity worker. -// -// The taskStartToCloseTimeout of an activity type is the maximum duration of -// an activity task, regardless of the number of RecordActivityTaskHeartbeat -// requests received. The taskStartToCloseTimeout is also specified in RegisterActivityType. -// -// This operation is only useful for long-lived activities to report liveliness -// of the task and to determine if a cancellation is being attempted. -// -// If the cancelRequested flag returns true, a cancellation is being attempted. -// If the worker can cancel the activity, it should respond with RespondActivityTaskCanceled. -// Otherwise, it should ignore the cancellation request. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation RecordActivityTaskHeartbeat for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) RecordActivityTaskHeartbeat(input *RecordActivityTaskHeartbeatInput) (*RecordActivityTaskHeartbeatOutput, error) { - req, out := c.RecordActivityTaskHeartbeatRequest(input) - return out, req.Send() -} - -// RecordActivityTaskHeartbeatWithContext is the same as RecordActivityTaskHeartbeat with the addition of -// the ability to pass a context and additional request options. -// -// See RecordActivityTaskHeartbeat for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) RecordActivityTaskHeartbeatWithContext(ctx aws.Context, input *RecordActivityTaskHeartbeatInput, opts ...request.Option) (*RecordActivityTaskHeartbeatOutput, error) { - req, out := c.RecordActivityTaskHeartbeatRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterActivityType = "RegisterActivityType" - -// RegisterActivityTypeRequest generates a "aws/request.Request" representing the -// client's request for the RegisterActivityType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterActivityType for more information on using the RegisterActivityType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterActivityTypeRequest method. -// req, resp := client.RegisterActivityTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) RegisterActivityTypeRequest(input *RegisterActivityTypeInput) (req *request.Request, output *RegisterActivityTypeOutput) { - op := &request.Operation{ - Name: opRegisterActivityType, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterActivityTypeInput{} - } - - output = &RegisterActivityTypeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RegisterActivityType API operation for Amazon Simple Workflow Service. -// -// Registers a new activity type along with its configuration settings in the -// specified domain. -// -// A TypeAlreadyExists fault is returned if the type already exists in the domain. -// You cannot change any configuration settings of the type after its registration, -// and it must be registered as a new version. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the following parameters by using a Condition element with -// the appropriate keys. -// -// defaultTaskList.name: String constraint. The key is swf:defaultTaskList.name. -// -// name: String constraint. The key is swf:name. -// -// version: String constraint. The key is swf:version. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation RegisterActivityType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTypeAlreadyExistsFault "TypeAlreadyExistsFault" -// Returned if the type already exists in the specified domain. You get this -// fault even if the existing type is in deprecated status. You can specify -// another version if the intent is to create a new distinct version of the -// type. -// -// * ErrCodeLimitExceededFault "LimitExceededFault" -// Returned by any operation if a system imposed limitation has been reached. -// To address this fault you should either clean up unused resources or increase -// the limit by contacting AWS. -// -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) RegisterActivityType(input *RegisterActivityTypeInput) (*RegisterActivityTypeOutput, error) { - req, out := c.RegisterActivityTypeRequest(input) - return out, req.Send() -} - -// RegisterActivityTypeWithContext is the same as RegisterActivityType with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterActivityType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) RegisterActivityTypeWithContext(ctx aws.Context, input *RegisterActivityTypeInput, opts ...request.Option) (*RegisterActivityTypeOutput, error) { - req, out := c.RegisterActivityTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterDomain = "RegisterDomain" - -// RegisterDomainRequest generates a "aws/request.Request" representing the -// client's request for the RegisterDomain operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterDomain for more information on using the RegisterDomain -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterDomainRequest method. -// req, resp := client.RegisterDomainRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) RegisterDomainRequest(input *RegisterDomainInput) (req *request.Request, output *RegisterDomainOutput) { - op := &request.Operation{ - Name: opRegisterDomain, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterDomainInput{} - } - - output = &RegisterDomainOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RegisterDomain API operation for Amazon Simple Workflow Service. -// -// Registers a new domain. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * You cannot use an IAM policy to control domain access for this action. -// The name of the domain being registered is available as the resource of -// this action. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation RegisterDomain for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDomainAlreadyExistsFault "DomainAlreadyExistsFault" -// Returned if the specified domain already exists. You get this fault even -// if the existing domain is in deprecated status. -// -// * ErrCodeLimitExceededFault "LimitExceededFault" -// Returned by any operation if a system imposed limitation has been reached. -// To address this fault you should either clean up unused resources or increase -// the limit by contacting AWS. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) RegisterDomain(input *RegisterDomainInput) (*RegisterDomainOutput, error) { - req, out := c.RegisterDomainRequest(input) - return out, req.Send() -} - -// RegisterDomainWithContext is the same as RegisterDomain with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterDomain for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) RegisterDomainWithContext(ctx aws.Context, input *RegisterDomainInput, opts ...request.Option) (*RegisterDomainOutput, error) { - req, out := c.RegisterDomainRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterWorkflowType = "RegisterWorkflowType" - -// RegisterWorkflowTypeRequest generates a "aws/request.Request" representing the -// client's request for the RegisterWorkflowType operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RegisterWorkflowType for more information on using the RegisterWorkflowType -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RegisterWorkflowTypeRequest method. -// req, resp := client.RegisterWorkflowTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) RegisterWorkflowTypeRequest(input *RegisterWorkflowTypeInput) (req *request.Request, output *RegisterWorkflowTypeOutput) { - op := &request.Operation{ - Name: opRegisterWorkflowType, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterWorkflowTypeInput{} - } - - output = &RegisterWorkflowTypeOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RegisterWorkflowType API operation for Amazon Simple Workflow Service. -// -// Registers a new workflow type and its configuration settings in the specified -// domain. -// -// The retention period for the workflow history is set by the RegisterDomain -// action. -// -// If the type already exists, then a TypeAlreadyExists fault is returned. You -// cannot change the configuration settings of a workflow type once it is registered -// and it must be registered as a new version. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the following parameters by using a Condition element with -// the appropriate keys. -// -// defaultTaskList.name: String constraint. The key is swf:defaultTaskList.name. -// -// name: String constraint. The key is swf:name. -// -// version: String constraint. The key is swf:version. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation RegisterWorkflowType for usage and error information. -// -// Returned Error Codes: -// * ErrCodeTypeAlreadyExistsFault "TypeAlreadyExistsFault" -// Returned if the type already exists in the specified domain. You get this -// fault even if the existing type is in deprecated status. You can specify -// another version if the intent is to create a new distinct version of the -// type. -// -// * ErrCodeLimitExceededFault "LimitExceededFault" -// Returned by any operation if a system imposed limitation has been reached. -// To address this fault you should either clean up unused resources or increase -// the limit by contacting AWS. -// -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) RegisterWorkflowType(input *RegisterWorkflowTypeInput) (*RegisterWorkflowTypeOutput, error) { - req, out := c.RegisterWorkflowTypeRequest(input) - return out, req.Send() -} - -// RegisterWorkflowTypeWithContext is the same as RegisterWorkflowType with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterWorkflowType for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) RegisterWorkflowTypeWithContext(ctx aws.Context, input *RegisterWorkflowTypeInput, opts ...request.Option) (*RegisterWorkflowTypeOutput, error) { - req, out := c.RegisterWorkflowTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRequestCancelWorkflowExecution = "RequestCancelWorkflowExecution" - -// RequestCancelWorkflowExecutionRequest generates a "aws/request.Request" representing the -// client's request for the RequestCancelWorkflowExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RequestCancelWorkflowExecution for more information on using the RequestCancelWorkflowExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RequestCancelWorkflowExecutionRequest method. -// req, resp := client.RequestCancelWorkflowExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) RequestCancelWorkflowExecutionRequest(input *RequestCancelWorkflowExecutionInput) (req *request.Request, output *RequestCancelWorkflowExecutionOutput) { - op := &request.Operation{ - Name: opRequestCancelWorkflowExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RequestCancelWorkflowExecutionInput{} - } - - output = &RequestCancelWorkflowExecutionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RequestCancelWorkflowExecution API operation for Amazon Simple Workflow Service. -// -// Records a WorkflowExecutionCancelRequested event in the currently running -// workflow execution identified by the given domain, workflowId, and runId. -// This logically requests the cancellation of the workflow execution as a whole. -// It is up to the decider to take appropriate actions when it receives an execution -// history with this event. -// -// If the runId isn't specified, the WorkflowExecutionCancelRequested event -// is recorded in the history of the current open workflow execution with the -// specified workflowId in the domain. -// -// Because this action allows the workflow to properly clean up and gracefully -// close, it should be used instead of TerminateWorkflowExecution when possible. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation RequestCancelWorkflowExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) RequestCancelWorkflowExecution(input *RequestCancelWorkflowExecutionInput) (*RequestCancelWorkflowExecutionOutput, error) { - req, out := c.RequestCancelWorkflowExecutionRequest(input) - return out, req.Send() -} - -// RequestCancelWorkflowExecutionWithContext is the same as RequestCancelWorkflowExecution with the addition of -// the ability to pass a context and additional request options. -// -// See RequestCancelWorkflowExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) RequestCancelWorkflowExecutionWithContext(ctx aws.Context, input *RequestCancelWorkflowExecutionInput, opts ...request.Option) (*RequestCancelWorkflowExecutionOutput, error) { - req, out := c.RequestCancelWorkflowExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRespondActivityTaskCanceled = "RespondActivityTaskCanceled" - -// RespondActivityTaskCanceledRequest generates a "aws/request.Request" representing the -// client's request for the RespondActivityTaskCanceled operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RespondActivityTaskCanceled for more information on using the RespondActivityTaskCanceled -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RespondActivityTaskCanceledRequest method. -// req, resp := client.RespondActivityTaskCanceledRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) RespondActivityTaskCanceledRequest(input *RespondActivityTaskCanceledInput) (req *request.Request, output *RespondActivityTaskCanceledOutput) { - op := &request.Operation{ - Name: opRespondActivityTaskCanceled, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RespondActivityTaskCanceledInput{} - } - - output = &RespondActivityTaskCanceledOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RespondActivityTaskCanceled API operation for Amazon Simple Workflow Service. -// -// Used by workers to tell the service that the ActivityTask identified by the -// taskToken was successfully canceled. Additional details can be provided using -// the details argument. -// -// These details (if provided) appear in the ActivityTaskCanceled event added -// to the workflow history. -// -// Only use this operation if the canceled flag of a RecordActivityTaskHeartbeat -// request returns true and if the activity can be safely undone or abandoned. -// -// A task is considered open from the time that it is scheduled until it is -// closed. Therefore a task is reported as open while a worker is processing -// it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted, -// RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed -// out (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-basic.html#swf-dev-timeout-types). -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation RespondActivityTaskCanceled for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) RespondActivityTaskCanceled(input *RespondActivityTaskCanceledInput) (*RespondActivityTaskCanceledOutput, error) { - req, out := c.RespondActivityTaskCanceledRequest(input) - return out, req.Send() -} - -// RespondActivityTaskCanceledWithContext is the same as RespondActivityTaskCanceled with the addition of -// the ability to pass a context and additional request options. -// -// See RespondActivityTaskCanceled for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) RespondActivityTaskCanceledWithContext(ctx aws.Context, input *RespondActivityTaskCanceledInput, opts ...request.Option) (*RespondActivityTaskCanceledOutput, error) { - req, out := c.RespondActivityTaskCanceledRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRespondActivityTaskCompleted = "RespondActivityTaskCompleted" - -// RespondActivityTaskCompletedRequest generates a "aws/request.Request" representing the -// client's request for the RespondActivityTaskCompleted operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RespondActivityTaskCompleted for more information on using the RespondActivityTaskCompleted -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RespondActivityTaskCompletedRequest method. -// req, resp := client.RespondActivityTaskCompletedRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) RespondActivityTaskCompletedRequest(input *RespondActivityTaskCompletedInput) (req *request.Request, output *RespondActivityTaskCompletedOutput) { - op := &request.Operation{ - Name: opRespondActivityTaskCompleted, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RespondActivityTaskCompletedInput{} - } - - output = &RespondActivityTaskCompletedOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RespondActivityTaskCompleted API operation for Amazon Simple Workflow Service. -// -// Used by workers to tell the service that the ActivityTask identified by the -// taskToken completed successfully with a result (if provided). The result -// appears in the ActivityTaskCompleted event in the workflow history. -// -// If the requested task doesn't complete successfully, use RespondActivityTaskFailed -// instead. If the worker finds that the task is canceled through the canceled -// flag returned by RecordActivityTaskHeartbeat, it should cancel the task, -// clean up and then call RespondActivityTaskCanceled. -// -// A task is considered open from the time that it is scheduled until it is -// closed. Therefore a task is reported as open while a worker is processing -// it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted, -// RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed -// out (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-basic.html#swf-dev-timeout-types). -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation RespondActivityTaskCompleted for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) RespondActivityTaskCompleted(input *RespondActivityTaskCompletedInput) (*RespondActivityTaskCompletedOutput, error) { - req, out := c.RespondActivityTaskCompletedRequest(input) - return out, req.Send() -} - -// RespondActivityTaskCompletedWithContext is the same as RespondActivityTaskCompleted with the addition of -// the ability to pass a context and additional request options. -// -// See RespondActivityTaskCompleted for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) RespondActivityTaskCompletedWithContext(ctx aws.Context, input *RespondActivityTaskCompletedInput, opts ...request.Option) (*RespondActivityTaskCompletedOutput, error) { - req, out := c.RespondActivityTaskCompletedRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRespondActivityTaskFailed = "RespondActivityTaskFailed" - -// RespondActivityTaskFailedRequest generates a "aws/request.Request" representing the -// client's request for the RespondActivityTaskFailed operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RespondActivityTaskFailed for more information on using the RespondActivityTaskFailed -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RespondActivityTaskFailedRequest method. -// req, resp := client.RespondActivityTaskFailedRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) RespondActivityTaskFailedRequest(input *RespondActivityTaskFailedInput) (req *request.Request, output *RespondActivityTaskFailedOutput) { - op := &request.Operation{ - Name: opRespondActivityTaskFailed, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RespondActivityTaskFailedInput{} - } - - output = &RespondActivityTaskFailedOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RespondActivityTaskFailed API operation for Amazon Simple Workflow Service. -// -// Used by workers to tell the service that the ActivityTask identified by the -// taskToken has failed with reason (if specified). The reason and details appear -// in the ActivityTaskFailed event added to the workflow history. -// -// A task is considered open from the time that it is scheduled until it is -// closed. Therefore a task is reported as open while a worker is processing -// it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted, -// RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed -// out (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-basic.html#swf-dev-timeout-types). -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation RespondActivityTaskFailed for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) RespondActivityTaskFailed(input *RespondActivityTaskFailedInput) (*RespondActivityTaskFailedOutput, error) { - req, out := c.RespondActivityTaskFailedRequest(input) - return out, req.Send() -} - -// RespondActivityTaskFailedWithContext is the same as RespondActivityTaskFailed with the addition of -// the ability to pass a context and additional request options. -// -// See RespondActivityTaskFailed for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) RespondActivityTaskFailedWithContext(ctx aws.Context, input *RespondActivityTaskFailedInput, opts ...request.Option) (*RespondActivityTaskFailedOutput, error) { - req, out := c.RespondActivityTaskFailedRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRespondDecisionTaskCompleted = "RespondDecisionTaskCompleted" - -// RespondDecisionTaskCompletedRequest generates a "aws/request.Request" representing the -// client's request for the RespondDecisionTaskCompleted operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RespondDecisionTaskCompleted for more information on using the RespondDecisionTaskCompleted -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RespondDecisionTaskCompletedRequest method. -// req, resp := client.RespondDecisionTaskCompletedRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) RespondDecisionTaskCompletedRequest(input *RespondDecisionTaskCompletedInput) (req *request.Request, output *RespondDecisionTaskCompletedOutput) { - op := &request.Operation{ - Name: opRespondDecisionTaskCompleted, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RespondDecisionTaskCompletedInput{} - } - - output = &RespondDecisionTaskCompletedOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RespondDecisionTaskCompleted API operation for Amazon Simple Workflow Service. -// -// Used by deciders to tell the service that the DecisionTask identified by -// the taskToken has successfully completed. The decisions argument specifies -// the list of decisions made while processing the task. -// -// A DecisionTaskCompleted event is added to the workflow history. The executionContext -// specified is attached to the event in the workflow execution history. -// -// Access Control -// -// If an IAM policy grants permission to use RespondDecisionTaskCompleted, it -// can express permissions for the list of decisions in the decisions parameter. -// Each of the decisions has one or more parameters, much like a regular API -// call. To allow for policies to be as readable as possible, you can express -// permissions on decisions as if they were actual API calls, including applying -// conditions to some parameters. For more information, see Using IAM to Manage -// Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation RespondDecisionTaskCompleted for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) RespondDecisionTaskCompleted(input *RespondDecisionTaskCompletedInput) (*RespondDecisionTaskCompletedOutput, error) { - req, out := c.RespondDecisionTaskCompletedRequest(input) - return out, req.Send() -} - -// RespondDecisionTaskCompletedWithContext is the same as RespondDecisionTaskCompleted with the addition of -// the ability to pass a context and additional request options. -// -// See RespondDecisionTaskCompleted for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) RespondDecisionTaskCompletedWithContext(ctx aws.Context, input *RespondDecisionTaskCompletedInput, opts ...request.Option) (*RespondDecisionTaskCompletedOutput, error) { - req, out := c.RespondDecisionTaskCompletedRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSignalWorkflowExecution = "SignalWorkflowExecution" - -// SignalWorkflowExecutionRequest generates a "aws/request.Request" representing the -// client's request for the SignalWorkflowExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SignalWorkflowExecution for more information on using the SignalWorkflowExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SignalWorkflowExecutionRequest method. -// req, resp := client.SignalWorkflowExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) SignalWorkflowExecutionRequest(input *SignalWorkflowExecutionInput) (req *request.Request, output *SignalWorkflowExecutionOutput) { - op := &request.Operation{ - Name: opSignalWorkflowExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SignalWorkflowExecutionInput{} - } - - output = &SignalWorkflowExecutionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SignalWorkflowExecution API operation for Amazon Simple Workflow Service. -// -// Records a WorkflowExecutionSignaled event in the workflow execution history -// and creates a decision task for the workflow execution identified by the -// given domain, workflowId and runId. The event is recorded with the specified -// user defined signalName and input (if provided). -// -// If a runId isn't specified, then the WorkflowExecutionSignaled event is recorded -// in the history of the current open workflow with the matching workflowId -// in the domain. -// -// If the specified workflow execution isn't open, this method fails with UnknownResource. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation SignalWorkflowExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) SignalWorkflowExecution(input *SignalWorkflowExecutionInput) (*SignalWorkflowExecutionOutput, error) { - req, out := c.SignalWorkflowExecutionRequest(input) - return out, req.Send() -} - -// SignalWorkflowExecutionWithContext is the same as SignalWorkflowExecution with the addition of -// the ability to pass a context and additional request options. -// -// See SignalWorkflowExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) SignalWorkflowExecutionWithContext(ctx aws.Context, input *SignalWorkflowExecutionInput, opts ...request.Option) (*SignalWorkflowExecutionOutput, error) { - req, out := c.SignalWorkflowExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartWorkflowExecution = "StartWorkflowExecution" - -// StartWorkflowExecutionRequest generates a "aws/request.Request" representing the -// client's request for the StartWorkflowExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartWorkflowExecution for more information on using the StartWorkflowExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartWorkflowExecutionRequest method. -// req, resp := client.StartWorkflowExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) StartWorkflowExecutionRequest(input *StartWorkflowExecutionInput) (req *request.Request, output *StartWorkflowExecutionOutput) { - op := &request.Operation{ - Name: opStartWorkflowExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartWorkflowExecutionInput{} - } - - output = &StartWorkflowExecutionOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartWorkflowExecution API operation for Amazon Simple Workflow Service. -// -// Starts an execution of the workflow type in the specified domain using the -// provided workflowId and input data. -// -// This action returns the newly started workflow execution. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the following parameters by using a Condition element with -// the appropriate keys. -// -// tagList.member.0: The key is swf:tagList.member.0. -// -// tagList.member.1: The key is swf:tagList.member.1. -// -// tagList.member.2: The key is swf:tagList.member.2. -// -// tagList.member.3: The key is swf:tagList.member.3. -// -// tagList.member.4: The key is swf:tagList.member.4. -// -// taskList: String constraint. The key is swf:taskList.name. -// -// workflowType.name: String constraint. The key is swf:workflowType.name. -// -// workflowType.version: String constraint. The key is swf:workflowType.version. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation StartWorkflowExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeTypeDeprecatedFault "TypeDeprecatedFault" -// Returned when the specified activity or workflow type was already deprecated. -// -// * ErrCodeWorkflowExecutionAlreadyStartedFault "WorkflowExecutionAlreadyStartedFault" -// Returned by StartWorkflowExecution when an open execution with the same workflowId -// is already running in the specified domain. -// -// * ErrCodeLimitExceededFault "LimitExceededFault" -// Returned by any operation if a system imposed limitation has been reached. -// To address this fault you should either clean up unused resources or increase -// the limit by contacting AWS. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -// * ErrCodeDefaultUndefinedFault "DefaultUndefinedFault" -// The StartWorkflowExecution API action was called without the required parameters -// set. -// -// Some workflow execution parameters, such as the decision taskList, must be -// set to start the execution. However, these parameters might have been set -// as defaults when the workflow type was registered. In this case, you can -// omit these parameters from the StartWorkflowExecution call and Amazon SWF -// uses the values defined in the workflow type. -// -// If these parameters aren't set and no default parameters were defined in -// the workflow type, this error is displayed. -// -func (c *SWF) StartWorkflowExecution(input *StartWorkflowExecutionInput) (*StartWorkflowExecutionOutput, error) { - req, out := c.StartWorkflowExecutionRequest(input) - return out, req.Send() -} - -// StartWorkflowExecutionWithContext is the same as StartWorkflowExecution with the addition of -// the ability to pass a context and additional request options. -// -// See StartWorkflowExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) StartWorkflowExecutionWithContext(ctx aws.Context, input *StartWorkflowExecutionInput, opts ...request.Option) (*StartWorkflowExecutionOutput, error) { - req, out := c.StartWorkflowExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTerminateWorkflowExecution = "TerminateWorkflowExecution" - -// TerminateWorkflowExecutionRequest generates a "aws/request.Request" representing the -// client's request for the TerminateWorkflowExecution operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TerminateWorkflowExecution for more information on using the TerminateWorkflowExecution -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TerminateWorkflowExecutionRequest method. -// req, resp := client.TerminateWorkflowExecutionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -func (c *SWF) TerminateWorkflowExecutionRequest(input *TerminateWorkflowExecutionInput) (req *request.Request, output *TerminateWorkflowExecutionOutput) { - op := &request.Operation{ - Name: opTerminateWorkflowExecution, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TerminateWorkflowExecutionInput{} - } - - output = &TerminateWorkflowExecutionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TerminateWorkflowExecution API operation for Amazon Simple Workflow Service. -// -// Records a WorkflowExecutionTerminated event and forces closure of the workflow -// execution identified by the given domain, runId, and workflowId. The child -// policy, registered with the workflow type or specified when starting this -// execution, is applied to any open child workflow executions of this workflow -// execution. -// -// If the identified workflow execution was in progress, it is terminated immediately. -// -// If a runId isn't specified, then the WorkflowExecutionTerminated event is -// recorded in the history of the current open workflow with the matching workflowId -// in the domain. -// -// You should consider using RequestCancelWorkflowExecution action instead because -// it allows the workflow to gracefully close while TerminateWorkflowExecution -// doesn't. -// -// Access Control -// -// You can use IAM policies to control this action's access to Amazon SWF resources -// as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Simple Workflow Service's -// API operation TerminateWorkflowExecution for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnknownResourceFault "UnknownResourceFault" -// Returned when the named resource cannot be found with in the scope of this -// operation (region or domain). This could happen if the named resource was -// never created or is no longer available for this operation. -// -// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" -// Returned when the caller doesn't have sufficient permissions to invoke the -// action. -// -func (c *SWF) TerminateWorkflowExecution(input *TerminateWorkflowExecutionInput) (*TerminateWorkflowExecutionOutput, error) { - req, out := c.TerminateWorkflowExecutionRequest(input) - return out, req.Send() -} - -// TerminateWorkflowExecutionWithContext is the same as TerminateWorkflowExecution with the addition of -// the ability to pass a context and additional request options. -// -// See TerminateWorkflowExecution for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *SWF) TerminateWorkflowExecutionWithContext(ctx aws.Context, input *TerminateWorkflowExecutionInput, opts ...request.Option) (*TerminateWorkflowExecutionOutput, error) { - req, out := c.TerminateWorkflowExecutionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Provides the details of the ActivityTaskCancelRequested event. -type ActivityTaskCancelRequestedEventAttributes struct { - _ struct{} `type:"structure"` - - // The unique ID of the task. - // - // ActivityId is a required field - ActivityId *string `locationName:"activityId" min:"1" type:"string" required:"true"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the RequestCancelActivityTask decision for this cancellation - // request. This information can be useful for diagnosing problems by tracing - // back the chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s ActivityTaskCancelRequestedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityTaskCancelRequestedEventAttributes) GoString() string { - return s.String() -} - -// SetActivityId sets the ActivityId field's value. -func (s *ActivityTaskCancelRequestedEventAttributes) SetActivityId(v string) *ActivityTaskCancelRequestedEventAttributes { - s.ActivityId = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *ActivityTaskCancelRequestedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *ActivityTaskCancelRequestedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// Provides the details of the ActivityTaskCanceled event. -type ActivityTaskCanceledEventAttributes struct { - _ struct{} `type:"structure"` - - // Details of the cancellation. - Details *string `locationName:"details" type:"string"` - - // If set, contains the ID of the last ActivityTaskCancelRequested event recorded - // for this activity task. This information can be useful for diagnosing problems - // by tracing back the chain of events leading up to this event. - LatestCancelRequestedEventId *int64 `locationName:"latestCancelRequestedEventId" type:"long"` - - // The ID of the ActivityTaskScheduled event that was recorded when this activity - // task was scheduled. This information can be useful for diagnosing problems - // by tracing back the chain of events leading up to this event. - // - // ScheduledEventId is a required field - ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` - - // The ID of the ActivityTaskStarted event recorded when this activity task - // was started. This information can be useful for diagnosing problems by tracing - // back the chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s ActivityTaskCanceledEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityTaskCanceledEventAttributes) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *ActivityTaskCanceledEventAttributes) SetDetails(v string) *ActivityTaskCanceledEventAttributes { - s.Details = &v - return s -} - -// SetLatestCancelRequestedEventId sets the LatestCancelRequestedEventId field's value. -func (s *ActivityTaskCanceledEventAttributes) SetLatestCancelRequestedEventId(v int64) *ActivityTaskCanceledEventAttributes { - s.LatestCancelRequestedEventId = &v - return s -} - -// SetScheduledEventId sets the ScheduledEventId field's value. -func (s *ActivityTaskCanceledEventAttributes) SetScheduledEventId(v int64) *ActivityTaskCanceledEventAttributes { - s.ScheduledEventId = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *ActivityTaskCanceledEventAttributes) SetStartedEventId(v int64) *ActivityTaskCanceledEventAttributes { - s.StartedEventId = &v - return s -} - -// Provides the details of the ActivityTaskCompleted event. -type ActivityTaskCompletedEventAttributes struct { - _ struct{} `type:"structure"` - - // The results of the activity task. - Result *string `locationName:"result" type:"string"` - - // The ID of the ActivityTaskScheduled event that was recorded when this activity - // task was scheduled. This information can be useful for diagnosing problems - // by tracing back the chain of events leading up to this event. - // - // ScheduledEventId is a required field - ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` - - // The ID of the ActivityTaskStarted event recorded when this activity task - // was started. This information can be useful for diagnosing problems by tracing - // back the chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s ActivityTaskCompletedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityTaskCompletedEventAttributes) GoString() string { - return s.String() -} - -// SetResult sets the Result field's value. -func (s *ActivityTaskCompletedEventAttributes) SetResult(v string) *ActivityTaskCompletedEventAttributes { - s.Result = &v - return s -} - -// SetScheduledEventId sets the ScheduledEventId field's value. -func (s *ActivityTaskCompletedEventAttributes) SetScheduledEventId(v int64) *ActivityTaskCompletedEventAttributes { - s.ScheduledEventId = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *ActivityTaskCompletedEventAttributes) SetStartedEventId(v int64) *ActivityTaskCompletedEventAttributes { - s.StartedEventId = &v - return s -} - -// Provides the details of the ActivityTaskFailed event. -type ActivityTaskFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The details of the failure. - Details *string `locationName:"details" type:"string"` - - // The reason provided for the failure. - Reason *string `locationName:"reason" type:"string"` - - // The ID of the ActivityTaskScheduled event that was recorded when this activity - // task was scheduled. This information can be useful for diagnosing problems - // by tracing back the chain of events leading up to this event. - // - // ScheduledEventId is a required field - ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` - - // The ID of the ActivityTaskStarted event recorded when this activity task - // was started. This information can be useful for diagnosing problems by tracing - // back the chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s ActivityTaskFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityTaskFailedEventAttributes) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *ActivityTaskFailedEventAttributes) SetDetails(v string) *ActivityTaskFailedEventAttributes { - s.Details = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *ActivityTaskFailedEventAttributes) SetReason(v string) *ActivityTaskFailedEventAttributes { - s.Reason = &v - return s -} - -// SetScheduledEventId sets the ScheduledEventId field's value. -func (s *ActivityTaskFailedEventAttributes) SetScheduledEventId(v int64) *ActivityTaskFailedEventAttributes { - s.ScheduledEventId = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *ActivityTaskFailedEventAttributes) SetStartedEventId(v int64) *ActivityTaskFailedEventAttributes { - s.StartedEventId = &v - return s -} - -// Provides the details of the ActivityTaskScheduled event. -type ActivityTaskScheduledEventAttributes struct { - _ struct{} `type:"structure"` - - // The unique ID of the activity task. - // - // ActivityId is a required field - ActivityId *string `locationName:"activityId" min:"1" type:"string" required:"true"` - - // The type of the activity task. - // - // ActivityType is a required field - ActivityType *ActivityType `locationName:"activityType" type:"structure" required:"true"` - - // Data attached to the event that can be used by the decider in subsequent - // workflow tasks. This data isn't sent to the activity. - Control *string `locationName:"control" type:"string"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision that - // resulted in the scheduling of this activity task. This information can be - // useful for diagnosing problems by tracing back the chain of events leading - // up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The maximum time before which the worker processing this task must report - // progress by calling RecordActivityTaskHeartbeat. If the timeout is exceeded, - // the activity task is automatically timed out. If the worker subsequently - // attempts to record a heartbeat or return a result, it is ignored. - HeartbeatTimeout *string `locationName:"heartbeatTimeout" type:"string"` - - // The input provided to the activity task. - Input *string `locationName:"input" type:"string"` - - // The maximum amount of time for this activity task. - ScheduleToCloseTimeout *string `locationName:"scheduleToCloseTimeout" type:"string"` - - // The maximum amount of time the activity task can wait to be assigned to a - // worker. - ScheduleToStartTimeout *string `locationName:"scheduleToStartTimeout" type:"string"` - - // The maximum amount of time a worker may take to process the activity task. - StartToCloseTimeout *string `locationName:"startToCloseTimeout" type:"string"` - - // The task list in which the activity task has been scheduled. - // - // TaskList is a required field - TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` - - // The priority to assign to the scheduled activity task. If set, this overrides - // any default priority value that was assigned when the activity type was registered. - // - // Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) - // to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. - // - // For more information about setting task priority, see Setting Task Priority - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) - // in the Amazon SWF Developer Guide. - TaskPriority *string `locationName:"taskPriority" type:"string"` -} - -// String returns the string representation -func (s ActivityTaskScheduledEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityTaskScheduledEventAttributes) GoString() string { - return s.String() -} - -// SetActivityId sets the ActivityId field's value. -func (s *ActivityTaskScheduledEventAttributes) SetActivityId(v string) *ActivityTaskScheduledEventAttributes { - s.ActivityId = &v - return s -} - -// SetActivityType sets the ActivityType field's value. -func (s *ActivityTaskScheduledEventAttributes) SetActivityType(v *ActivityType) *ActivityTaskScheduledEventAttributes { - s.ActivityType = v - return s -} - -// SetControl sets the Control field's value. -func (s *ActivityTaskScheduledEventAttributes) SetControl(v string) *ActivityTaskScheduledEventAttributes { - s.Control = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *ActivityTaskScheduledEventAttributes) SetDecisionTaskCompletedEventId(v int64) *ActivityTaskScheduledEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetHeartbeatTimeout sets the HeartbeatTimeout field's value. -func (s *ActivityTaskScheduledEventAttributes) SetHeartbeatTimeout(v string) *ActivityTaskScheduledEventAttributes { - s.HeartbeatTimeout = &v - return s -} - -// SetInput sets the Input field's value. -func (s *ActivityTaskScheduledEventAttributes) SetInput(v string) *ActivityTaskScheduledEventAttributes { - s.Input = &v - return s -} - -// SetScheduleToCloseTimeout sets the ScheduleToCloseTimeout field's value. -func (s *ActivityTaskScheduledEventAttributes) SetScheduleToCloseTimeout(v string) *ActivityTaskScheduledEventAttributes { - s.ScheduleToCloseTimeout = &v - return s -} - -// SetScheduleToStartTimeout sets the ScheduleToStartTimeout field's value. -func (s *ActivityTaskScheduledEventAttributes) SetScheduleToStartTimeout(v string) *ActivityTaskScheduledEventAttributes { - s.ScheduleToStartTimeout = &v - return s -} - -// SetStartToCloseTimeout sets the StartToCloseTimeout field's value. -func (s *ActivityTaskScheduledEventAttributes) SetStartToCloseTimeout(v string) *ActivityTaskScheduledEventAttributes { - s.StartToCloseTimeout = &v - return s -} - -// SetTaskList sets the TaskList field's value. -func (s *ActivityTaskScheduledEventAttributes) SetTaskList(v *TaskList) *ActivityTaskScheduledEventAttributes { - s.TaskList = v - return s -} - -// SetTaskPriority sets the TaskPriority field's value. -func (s *ActivityTaskScheduledEventAttributes) SetTaskPriority(v string) *ActivityTaskScheduledEventAttributes { - s.TaskPriority = &v - return s -} - -// Provides the details of the ActivityTaskStarted event. -type ActivityTaskStartedEventAttributes struct { - _ struct{} `type:"structure"` - - // Identity of the worker that was assigned this task. This aids diagnostics - // when problems arise. The form of this identity is user defined. - Identity *string `locationName:"identity" type:"string"` - - // The ID of the ActivityTaskScheduled event that was recorded when this activity - // task was scheduled. This information can be useful for diagnosing problems - // by tracing back the chain of events leading up to this event. - // - // ScheduledEventId is a required field - ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s ActivityTaskStartedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityTaskStartedEventAttributes) GoString() string { - return s.String() -} - -// SetIdentity sets the Identity field's value. -func (s *ActivityTaskStartedEventAttributes) SetIdentity(v string) *ActivityTaskStartedEventAttributes { - s.Identity = &v - return s -} - -// SetScheduledEventId sets the ScheduledEventId field's value. -func (s *ActivityTaskStartedEventAttributes) SetScheduledEventId(v int64) *ActivityTaskStartedEventAttributes { - s.ScheduledEventId = &v - return s -} - -// Provides the details of the ActivityTaskTimedOut event. -type ActivityTaskTimedOutEventAttributes struct { - _ struct{} `type:"structure"` - - // Contains the content of the details parameter for the last call made by the - // activity to RecordActivityTaskHeartbeat. - Details *string `locationName:"details" type:"string"` - - // The ID of the ActivityTaskScheduled event that was recorded when this activity - // task was scheduled. This information can be useful for diagnosing problems - // by tracing back the chain of events leading up to this event. - // - // ScheduledEventId is a required field - ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` - - // The ID of the ActivityTaskStarted event recorded when this activity task - // was started. This information can be useful for diagnosing problems by tracing - // back the chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` - - // The type of the timeout that caused this event. - // - // TimeoutType is a required field - TimeoutType *string `locationName:"timeoutType" type:"string" required:"true" enum:"ActivityTaskTimeoutType"` -} - -// String returns the string representation -func (s ActivityTaskTimedOutEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityTaskTimedOutEventAttributes) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *ActivityTaskTimedOutEventAttributes) SetDetails(v string) *ActivityTaskTimedOutEventAttributes { - s.Details = &v - return s -} - -// SetScheduledEventId sets the ScheduledEventId field's value. -func (s *ActivityTaskTimedOutEventAttributes) SetScheduledEventId(v int64) *ActivityTaskTimedOutEventAttributes { - s.ScheduledEventId = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *ActivityTaskTimedOutEventAttributes) SetStartedEventId(v int64) *ActivityTaskTimedOutEventAttributes { - s.StartedEventId = &v - return s -} - -// SetTimeoutType sets the TimeoutType field's value. -func (s *ActivityTaskTimedOutEventAttributes) SetTimeoutType(v string) *ActivityTaskTimedOutEventAttributes { - s.TimeoutType = &v - return s -} - -// Represents an activity type. -type ActivityType struct { - _ struct{} `type:"structure"` - - // The name of this activity. - // - // The combination of activity type name and version must be unique within a - // domain. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The version of this activity. - // - // The combination of activity type name and version must be unique with in - // a domain. - // - // Version is a required field - Version *string `locationName:"version" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ActivityType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ActivityType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ActivityType"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *ActivityType) SetName(v string) *ActivityType { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *ActivityType) SetVersion(v string) *ActivityType { - s.Version = &v - return s -} - -// Configuration settings registered with the activity type. -type ActivityTypeConfiguration struct { - _ struct{} `type:"structure"` - - // The default maximum time, in seconds, before which a worker processing a - // task must report progress by calling RecordActivityTaskHeartbeat. - // - // You can specify this value only when registering an activity type. The registered - // default value can be overridden when you schedule a task through the ScheduleActivityTaskDecision. - // If the activity worker subsequently attempts to record a heartbeat or returns - // a result, the activity worker receives an UnknownResource fault. In this - // case, Amazon SWF no longer considers the activity task to be valid; the activity - // worker should clean up the activity task. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - DefaultTaskHeartbeatTimeout *string `locationName:"defaultTaskHeartbeatTimeout" type:"string"` - - // The default task list specified for this activity type at registration. This - // default is used if a task list isn't provided when a task is scheduled through - // the ScheduleActivityTaskDecision. You can override the default registered - // task list when scheduling a task through the ScheduleActivityTaskDecision. - DefaultTaskList *TaskList `locationName:"defaultTaskList" type:"structure"` - - // The default task priority for tasks of this activity type, specified at registration. - // If not set, then 0 is used as the default priority. This default can be overridden - // when scheduling an activity task. - // - // Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) - // to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. - // - // For more information about setting task priority, see Setting Task Priority - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) - // in the Amazon SWF Developer Guide. - DefaultTaskPriority *string `locationName:"defaultTaskPriority" type:"string"` - - // The default maximum duration, specified when registering the activity type, - // for tasks of this activity type. You can override this default when scheduling - // a task through the ScheduleActivityTaskDecision. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - DefaultTaskScheduleToCloseTimeout *string `locationName:"defaultTaskScheduleToCloseTimeout" type:"string"` - - // The default maximum duration, specified when registering the activity type, - // that a task of an activity type can wait before being assigned to a worker. - // You can override this default when scheduling a task through the ScheduleActivityTaskDecision. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - DefaultTaskScheduleToStartTimeout *string `locationName:"defaultTaskScheduleToStartTimeout" type:"string"` - - // The default maximum duration for tasks of an activity type specified when - // registering the activity type. You can override this default when scheduling - // a task through the ScheduleActivityTaskDecision. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - DefaultTaskStartToCloseTimeout *string `locationName:"defaultTaskStartToCloseTimeout" type:"string"` -} - -// String returns the string representation -func (s ActivityTypeConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityTypeConfiguration) GoString() string { - return s.String() -} - -// SetDefaultTaskHeartbeatTimeout sets the DefaultTaskHeartbeatTimeout field's value. -func (s *ActivityTypeConfiguration) SetDefaultTaskHeartbeatTimeout(v string) *ActivityTypeConfiguration { - s.DefaultTaskHeartbeatTimeout = &v - return s -} - -// SetDefaultTaskList sets the DefaultTaskList field's value. -func (s *ActivityTypeConfiguration) SetDefaultTaskList(v *TaskList) *ActivityTypeConfiguration { - s.DefaultTaskList = v - return s -} - -// SetDefaultTaskPriority sets the DefaultTaskPriority field's value. -func (s *ActivityTypeConfiguration) SetDefaultTaskPriority(v string) *ActivityTypeConfiguration { - s.DefaultTaskPriority = &v - return s -} - -// SetDefaultTaskScheduleToCloseTimeout sets the DefaultTaskScheduleToCloseTimeout field's value. -func (s *ActivityTypeConfiguration) SetDefaultTaskScheduleToCloseTimeout(v string) *ActivityTypeConfiguration { - s.DefaultTaskScheduleToCloseTimeout = &v - return s -} - -// SetDefaultTaskScheduleToStartTimeout sets the DefaultTaskScheduleToStartTimeout field's value. -func (s *ActivityTypeConfiguration) SetDefaultTaskScheduleToStartTimeout(v string) *ActivityTypeConfiguration { - s.DefaultTaskScheduleToStartTimeout = &v - return s -} - -// SetDefaultTaskStartToCloseTimeout sets the DefaultTaskStartToCloseTimeout field's value. -func (s *ActivityTypeConfiguration) SetDefaultTaskStartToCloseTimeout(v string) *ActivityTypeConfiguration { - s.DefaultTaskStartToCloseTimeout = &v - return s -} - -// Detailed information about an activity type. -type ActivityTypeInfo struct { - _ struct{} `type:"structure"` - - // The ActivityType type structure representing the activity type. - // - // ActivityType is a required field - ActivityType *ActivityType `locationName:"activityType" type:"structure" required:"true"` - - // The date and time this activity type was created through RegisterActivityType. - // - // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` - - // If DEPRECATED, the date and time DeprecateActivityType was called. - DeprecationDate *time.Time `locationName:"deprecationDate" type:"timestamp"` - - // The description of the activity type provided in RegisterActivityType. - Description *string `locationName:"description" type:"string"` - - // The current status of the activity type. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"RegistrationStatus"` -} - -// String returns the string representation -func (s ActivityTypeInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivityTypeInfo) GoString() string { - return s.String() -} - -// SetActivityType sets the ActivityType field's value. -func (s *ActivityTypeInfo) SetActivityType(v *ActivityType) *ActivityTypeInfo { - s.ActivityType = v - return s -} - -// SetCreationDate sets the CreationDate field's value. -func (s *ActivityTypeInfo) SetCreationDate(v time.Time) *ActivityTypeInfo { - s.CreationDate = &v - return s -} - -// SetDeprecationDate sets the DeprecationDate field's value. -func (s *ActivityTypeInfo) SetDeprecationDate(v time.Time) *ActivityTypeInfo { - s.DeprecationDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ActivityTypeInfo) SetDescription(v string) *ActivityTypeInfo { - s.Description = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ActivityTypeInfo) SetStatus(v string) *ActivityTypeInfo { - s.Status = &v - return s -} - -// Provides the details of the CancelTimer decision. -// -// Access Control -// -// You can use IAM policies to control this decision's access to Amazon SWF -// resources as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -type CancelTimerDecisionAttributes struct { - _ struct{} `type:"structure"` - - // The unique ID of the timer to cancel. - // - // TimerId is a required field - TimerId *string `locationName:"timerId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelTimerDecisionAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelTimerDecisionAttributes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelTimerDecisionAttributes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelTimerDecisionAttributes"} - if s.TimerId == nil { - invalidParams.Add(request.NewErrParamRequired("TimerId")) - } - if s.TimerId != nil && len(*s.TimerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TimerId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTimerId sets the TimerId field's value. -func (s *CancelTimerDecisionAttributes) SetTimerId(v string) *CancelTimerDecisionAttributes { - s.TimerId = &v - return s -} - -// Provides the details of the CancelTimerFailed event. -type CancelTimerFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The cause of the failure. This information is generated by the system and - // can be useful for diagnostic purposes. - // - // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it - // lacked sufficient permissions. For details and example IAM policies, see - // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) - // in the Amazon SWF Developer Guide. - // - // Cause is a required field - Cause *string `locationName:"cause" type:"string" required:"true" enum:"CancelTimerFailedCause"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the CancelTimer decision to cancel this timer. This information - // can be useful for diagnosing problems by tracing back the chain of events - // leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The timerId provided in the CancelTimer decision that failed. - // - // TimerId is a required field - TimerId *string `locationName:"timerId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CancelTimerFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelTimerFailedEventAttributes) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *CancelTimerFailedEventAttributes) SetCause(v string) *CancelTimerFailedEventAttributes { - s.Cause = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *CancelTimerFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *CancelTimerFailedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetTimerId sets the TimerId field's value. -func (s *CancelTimerFailedEventAttributes) SetTimerId(v string) *CancelTimerFailedEventAttributes { - s.TimerId = &v - return s -} - -// Provides the details of the CancelWorkflowExecution decision. -// -// Access Control -// -// You can use IAM policies to control this decision's access to Amazon SWF -// resources as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -type CancelWorkflowExecutionDecisionAttributes struct { - _ struct{} `type:"structure"` - - // Details of the cancellation. - Details *string `locationName:"details" type:"string"` -} - -// String returns the string representation -func (s CancelWorkflowExecutionDecisionAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelWorkflowExecutionDecisionAttributes) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *CancelWorkflowExecutionDecisionAttributes) SetDetails(v string) *CancelWorkflowExecutionDecisionAttributes { - s.Details = &v - return s -} - -// Provides the details of the CancelWorkflowExecutionFailed event. -type CancelWorkflowExecutionFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The cause of the failure. This information is generated by the system and - // can be useful for diagnostic purposes. - // - // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it - // lacked sufficient permissions. For details and example IAM policies, see - // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) - // in the Amazon SWF Developer Guide. - // - // Cause is a required field - Cause *string `locationName:"cause" type:"string" required:"true" enum:"CancelWorkflowExecutionFailedCause"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the CancelWorkflowExecution decision for this cancellation - // request. This information can be useful for diagnosing problems by tracing - // back the chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s CancelWorkflowExecutionFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CancelWorkflowExecutionFailedEventAttributes) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *CancelWorkflowExecutionFailedEventAttributes) SetCause(v string) *CancelWorkflowExecutionFailedEventAttributes { - s.Cause = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *CancelWorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *CancelWorkflowExecutionFailedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// Provide details of the ChildWorkflowExecutionCanceled event. -type ChildWorkflowExecutionCanceledEventAttributes struct { - _ struct{} `type:"structure"` - - // Details of the cancellation (if provided). - Details *string `locationName:"details" type:"string"` - - // The ID of the StartChildWorkflowExecutionInitiated event corresponding to - // the StartChildWorkflowExecutionDecision to start this child workflow execution. - // This information can be useful for diagnosing problems by tracing back the - // chain of events leading up to this event. - // - // InitiatedEventId is a required field - InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` - - // The ID of the ChildWorkflowExecutionStarted event recorded when this child - // workflow execution was started. This information can be useful for diagnosing - // problems by tracing back the chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` - - // The child workflow execution that was canceled. - // - // WorkflowExecution is a required field - WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` - - // The type of the child workflow execution. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s ChildWorkflowExecutionCanceledEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChildWorkflowExecutionCanceledEventAttributes) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *ChildWorkflowExecutionCanceledEventAttributes) SetDetails(v string) *ChildWorkflowExecutionCanceledEventAttributes { - s.Details = &v - return s -} - -// SetInitiatedEventId sets the InitiatedEventId field's value. -func (s *ChildWorkflowExecutionCanceledEventAttributes) SetInitiatedEventId(v int64) *ChildWorkflowExecutionCanceledEventAttributes { - s.InitiatedEventId = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *ChildWorkflowExecutionCanceledEventAttributes) SetStartedEventId(v int64) *ChildWorkflowExecutionCanceledEventAttributes { - s.StartedEventId = &v - return s -} - -// SetWorkflowExecution sets the WorkflowExecution field's value. -func (s *ChildWorkflowExecutionCanceledEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ChildWorkflowExecutionCanceledEventAttributes { - s.WorkflowExecution = v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *ChildWorkflowExecutionCanceledEventAttributes) SetWorkflowType(v *WorkflowType) *ChildWorkflowExecutionCanceledEventAttributes { - s.WorkflowType = v - return s -} - -// Provides the details of the ChildWorkflowExecutionCompleted event. -type ChildWorkflowExecutionCompletedEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the StartChildWorkflowExecutionInitiated event corresponding to - // the StartChildWorkflowExecutionDecision to start this child workflow execution. - // This information can be useful for diagnosing problems by tracing back the - // chain of events leading up to this event. - // - // InitiatedEventId is a required field - InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` - - // The result of the child workflow execution. - Result *string `locationName:"result" type:"string"` - - // The ID of the ChildWorkflowExecutionStarted event recorded when this child - // workflow execution was started. This information can be useful for diagnosing - // problems by tracing back the chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` - - // The child workflow execution that was completed. - // - // WorkflowExecution is a required field - WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` - - // The type of the child workflow execution. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s ChildWorkflowExecutionCompletedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChildWorkflowExecutionCompletedEventAttributes) GoString() string { - return s.String() -} - -// SetInitiatedEventId sets the InitiatedEventId field's value. -func (s *ChildWorkflowExecutionCompletedEventAttributes) SetInitiatedEventId(v int64) *ChildWorkflowExecutionCompletedEventAttributes { - s.InitiatedEventId = &v - return s -} - -// SetResult sets the Result field's value. -func (s *ChildWorkflowExecutionCompletedEventAttributes) SetResult(v string) *ChildWorkflowExecutionCompletedEventAttributes { - s.Result = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *ChildWorkflowExecutionCompletedEventAttributes) SetStartedEventId(v int64) *ChildWorkflowExecutionCompletedEventAttributes { - s.StartedEventId = &v - return s -} - -// SetWorkflowExecution sets the WorkflowExecution field's value. -func (s *ChildWorkflowExecutionCompletedEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ChildWorkflowExecutionCompletedEventAttributes { - s.WorkflowExecution = v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *ChildWorkflowExecutionCompletedEventAttributes) SetWorkflowType(v *WorkflowType) *ChildWorkflowExecutionCompletedEventAttributes { - s.WorkflowType = v - return s -} - -// Provides the details of the ChildWorkflowExecutionFailed event. -type ChildWorkflowExecutionFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The details of the failure (if provided). - Details *string `locationName:"details" type:"string"` - - // The ID of the StartChildWorkflowExecutionInitiated event corresponding to - // the StartChildWorkflowExecutionDecision to start this child workflow execution. - // This information can be useful for diagnosing problems by tracing back the - // chain of events leading up to this event. - // - // InitiatedEventId is a required field - InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` - - // The reason for the failure (if provided). - Reason *string `locationName:"reason" type:"string"` - - // The ID of the ChildWorkflowExecutionStarted event recorded when this child - // workflow execution was started. This information can be useful for diagnosing - // problems by tracing back the chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` - - // The child workflow execution that failed. - // - // WorkflowExecution is a required field - WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` - - // The type of the child workflow execution. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s ChildWorkflowExecutionFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChildWorkflowExecutionFailedEventAttributes) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *ChildWorkflowExecutionFailedEventAttributes) SetDetails(v string) *ChildWorkflowExecutionFailedEventAttributes { - s.Details = &v - return s -} - -// SetInitiatedEventId sets the InitiatedEventId field's value. -func (s *ChildWorkflowExecutionFailedEventAttributes) SetInitiatedEventId(v int64) *ChildWorkflowExecutionFailedEventAttributes { - s.InitiatedEventId = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *ChildWorkflowExecutionFailedEventAttributes) SetReason(v string) *ChildWorkflowExecutionFailedEventAttributes { - s.Reason = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *ChildWorkflowExecutionFailedEventAttributes) SetStartedEventId(v int64) *ChildWorkflowExecutionFailedEventAttributes { - s.StartedEventId = &v - return s -} - -// SetWorkflowExecution sets the WorkflowExecution field's value. -func (s *ChildWorkflowExecutionFailedEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ChildWorkflowExecutionFailedEventAttributes { - s.WorkflowExecution = v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *ChildWorkflowExecutionFailedEventAttributes) SetWorkflowType(v *WorkflowType) *ChildWorkflowExecutionFailedEventAttributes { - s.WorkflowType = v - return s -} - -// Provides the details of the ChildWorkflowExecutionStarted event. -type ChildWorkflowExecutionStartedEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the StartChildWorkflowExecutionInitiated event corresponding to - // the StartChildWorkflowExecutionDecision to start this child workflow execution. - // This information can be useful for diagnosing problems by tracing back the - // chain of events leading up to this event. - // - // InitiatedEventId is a required field - InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` - - // The child workflow execution that was started. - // - // WorkflowExecution is a required field - WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` - - // The type of the child workflow execution. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s ChildWorkflowExecutionStartedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChildWorkflowExecutionStartedEventAttributes) GoString() string { - return s.String() -} - -// SetInitiatedEventId sets the InitiatedEventId field's value. -func (s *ChildWorkflowExecutionStartedEventAttributes) SetInitiatedEventId(v int64) *ChildWorkflowExecutionStartedEventAttributes { - s.InitiatedEventId = &v - return s -} - -// SetWorkflowExecution sets the WorkflowExecution field's value. -func (s *ChildWorkflowExecutionStartedEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ChildWorkflowExecutionStartedEventAttributes { - s.WorkflowExecution = v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *ChildWorkflowExecutionStartedEventAttributes) SetWorkflowType(v *WorkflowType) *ChildWorkflowExecutionStartedEventAttributes { - s.WorkflowType = v - return s -} - -// Provides the details of the ChildWorkflowExecutionTerminated event. -type ChildWorkflowExecutionTerminatedEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the StartChildWorkflowExecutionInitiated event corresponding to - // the StartChildWorkflowExecutionDecision to start this child workflow execution. - // This information can be useful for diagnosing problems by tracing back the - // chain of events leading up to this event. - // - // InitiatedEventId is a required field - InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` - - // The ID of the ChildWorkflowExecutionStarted event recorded when this child - // workflow execution was started. This information can be useful for diagnosing - // problems by tracing back the chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` - - // The child workflow execution that was terminated. - // - // WorkflowExecution is a required field - WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` - - // The type of the child workflow execution. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s ChildWorkflowExecutionTerminatedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChildWorkflowExecutionTerminatedEventAttributes) GoString() string { - return s.String() -} - -// SetInitiatedEventId sets the InitiatedEventId field's value. -func (s *ChildWorkflowExecutionTerminatedEventAttributes) SetInitiatedEventId(v int64) *ChildWorkflowExecutionTerminatedEventAttributes { - s.InitiatedEventId = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *ChildWorkflowExecutionTerminatedEventAttributes) SetStartedEventId(v int64) *ChildWorkflowExecutionTerminatedEventAttributes { - s.StartedEventId = &v - return s -} - -// SetWorkflowExecution sets the WorkflowExecution field's value. -func (s *ChildWorkflowExecutionTerminatedEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ChildWorkflowExecutionTerminatedEventAttributes { - s.WorkflowExecution = v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *ChildWorkflowExecutionTerminatedEventAttributes) SetWorkflowType(v *WorkflowType) *ChildWorkflowExecutionTerminatedEventAttributes { - s.WorkflowType = v - return s -} - -// Provides the details of the ChildWorkflowExecutionTimedOut event. -type ChildWorkflowExecutionTimedOutEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the StartChildWorkflowExecutionInitiated event corresponding to - // the StartChildWorkflowExecutionDecision to start this child workflow execution. - // This information can be useful for diagnosing problems by tracing back the - // chain of events leading up to this event. - // - // InitiatedEventId is a required field - InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` - - // The ID of the ChildWorkflowExecutionStarted event recorded when this child - // workflow execution was started. This information can be useful for diagnosing - // problems by tracing back the chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` - - // The type of the timeout that caused the child workflow execution to time - // out. - // - // TimeoutType is a required field - TimeoutType *string `locationName:"timeoutType" type:"string" required:"true" enum:"WorkflowExecutionTimeoutType"` - - // The child workflow execution that timed out. - // - // WorkflowExecution is a required field - WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` - - // The type of the child workflow execution. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s ChildWorkflowExecutionTimedOutEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ChildWorkflowExecutionTimedOutEventAttributes) GoString() string { - return s.String() -} - -// SetInitiatedEventId sets the InitiatedEventId field's value. -func (s *ChildWorkflowExecutionTimedOutEventAttributes) SetInitiatedEventId(v int64) *ChildWorkflowExecutionTimedOutEventAttributes { - s.InitiatedEventId = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *ChildWorkflowExecutionTimedOutEventAttributes) SetStartedEventId(v int64) *ChildWorkflowExecutionTimedOutEventAttributes { - s.StartedEventId = &v - return s -} - -// SetTimeoutType sets the TimeoutType field's value. -func (s *ChildWorkflowExecutionTimedOutEventAttributes) SetTimeoutType(v string) *ChildWorkflowExecutionTimedOutEventAttributes { - s.TimeoutType = &v - return s -} - -// SetWorkflowExecution sets the WorkflowExecution field's value. -func (s *ChildWorkflowExecutionTimedOutEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ChildWorkflowExecutionTimedOutEventAttributes { - s.WorkflowExecution = v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *ChildWorkflowExecutionTimedOutEventAttributes) SetWorkflowType(v *WorkflowType) *ChildWorkflowExecutionTimedOutEventAttributes { - s.WorkflowType = v - return s -} - -// Used to filter the closed workflow executions in visibility APIs by their -// close status. -type CloseStatusFilter struct { - _ struct{} `type:"structure"` - - // The close status that must match the close status of an execution for it - // to meet the criteria of this filter. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"CloseStatus"` -} - -// String returns the string representation -func (s CloseStatusFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CloseStatusFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CloseStatusFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloseStatusFilter"} - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStatus sets the Status field's value. -func (s *CloseStatusFilter) SetStatus(v string) *CloseStatusFilter { - s.Status = &v - return s -} - -// Provides the details of the CompleteWorkflowExecution decision. -// -// Access Control -// -// You can use IAM policies to control this decision's access to Amazon SWF -// resources as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -type CompleteWorkflowExecutionDecisionAttributes struct { - _ struct{} `type:"structure"` - - // The result of the workflow execution. The form of the result is implementation - // defined. - Result *string `locationName:"result" type:"string"` -} - -// String returns the string representation -func (s CompleteWorkflowExecutionDecisionAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CompleteWorkflowExecutionDecisionAttributes) GoString() string { - return s.String() -} - -// SetResult sets the Result field's value. -func (s *CompleteWorkflowExecutionDecisionAttributes) SetResult(v string) *CompleteWorkflowExecutionDecisionAttributes { - s.Result = &v - return s -} - -// Provides the details of the CompleteWorkflowExecutionFailed event. -type CompleteWorkflowExecutionFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The cause of the failure. This information is generated by the system and - // can be useful for diagnostic purposes. - // - // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it - // lacked sufficient permissions. For details and example IAM policies, see - // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) - // in the Amazon SWF Developer Guide. - // - // Cause is a required field - Cause *string `locationName:"cause" type:"string" required:"true" enum:"CompleteWorkflowExecutionFailedCause"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the CompleteWorkflowExecution decision to complete this - // execution. This information can be useful for diagnosing problems by tracing - // back the chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s CompleteWorkflowExecutionFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CompleteWorkflowExecutionFailedEventAttributes) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *CompleteWorkflowExecutionFailedEventAttributes) SetCause(v string) *CompleteWorkflowExecutionFailedEventAttributes { - s.Cause = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *CompleteWorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *CompleteWorkflowExecutionFailedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// Provides the details of the ContinueAsNewWorkflowExecution decision. -// -// Access Control -// -// You can use IAM policies to control this decision's access to Amazon SWF -// resources as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the following parameters by using a Condition element with -// the appropriate keys. -// -// tag – A tag used to identify the workflow execution -// -// taskList – String constraint. The key is swf:taskList.name. -// -// workflowType.version – String constraint. The key is swf:workflowType.version. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -type ContinueAsNewWorkflowExecutionDecisionAttributes struct { - _ struct{} `type:"structure"` - - // If set, specifies the policy to use for the child workflow executions of - // the new execution if it is terminated by calling the TerminateWorkflowExecution - // action explicitly or due to an expired timeout. This policy overrides the - // default child policy specified when registering the workflow type using RegisterWorkflowType. - // - // The supported child policies are: - // - // * TERMINATE – The child executions are terminated. - // - // * REQUEST_CANCEL – A request to cancel is attempted for each child execution - // by recording a WorkflowExecutionCancelRequested event in its history. - // It is up to the decider to take appropriate actions when it receives an - // execution history with this event. - // - // * ABANDON – No action is taken. The child executions continue to run. - // - // A child policy for this workflow execution must be specified either as a - // default for the workflow type or through this parameter. If neither this - // parameter is set nor a default child policy was specified at registration - // time then a fault is returned. - ChildPolicy *string `locationName:"childPolicy" type:"string" enum:"ChildPolicy"` - - // If set, specifies the total duration for this workflow execution. This overrides - // the defaultExecutionStartToCloseTimeout specified when registering the workflow - // type. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - // - // An execution start-to-close timeout for this workflow execution must be specified - // either as a default for the workflow type or through this field. If neither - // this field is set nor a default execution start-to-close timeout was specified - // at registration time then a fault is returned. - ExecutionStartToCloseTimeout *string `locationName:"executionStartToCloseTimeout" type:"string"` - - // The input provided to the new workflow execution. - Input *string `locationName:"input" type:"string"` - - // The IAM role to attach to the new (continued) execution. - LambdaRole *string `locationName:"lambdaRole" min:"1" type:"string"` - - // The list of tags to associate with the new workflow execution. A maximum - // of 5 tags can be specified. You can list workflow executions with a specific - // tag by calling ListOpenWorkflowExecutions or ListClosedWorkflowExecutions - // and specifying a TagFilter. - TagList []*string `locationName:"tagList" type:"list"` - - // The task list to use for the decisions of the new (continued) workflow execution. - TaskList *TaskList `locationName:"taskList" type:"structure"` - - // The task priority that, if set, specifies the priority for the decision tasks - // for this workflow execution. This overrides the defaultTaskPriority specified - // when registering the workflow type. Valid values are integers that range - // from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). - // Higher numbers indicate higher priority. - // - // For more information about setting task priority, see Setting Task Priority - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) - // in the Amazon SWF Developer Guide. - TaskPriority *string `locationName:"taskPriority" type:"string"` - - // Specifies the maximum duration of decision tasks for the new workflow execution. - // This parameter overrides the defaultTaskStartToCloseTimout specified when - // registering the workflow type using RegisterWorkflowType. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - // - // A task start-to-close timeout for the new workflow execution must be specified - // either as a default for the workflow type or through this parameter. If neither - // this parameter is set nor a default task start-to-close timeout was specified - // at registration time then a fault is returned. - TaskStartToCloseTimeout *string `locationName:"taskStartToCloseTimeout" type:"string"` - - // The version of the workflow to start. - WorkflowTypeVersion *string `locationName:"workflowTypeVersion" min:"1" type:"string"` -} - -// String returns the string representation -func (s ContinueAsNewWorkflowExecutionDecisionAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContinueAsNewWorkflowExecutionDecisionAttributes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContinueAsNewWorkflowExecutionDecisionAttributes"} - if s.LambdaRole != nil && len(*s.LambdaRole) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LambdaRole", 1)) - } - if s.WorkflowTypeVersion != nil && len(*s.WorkflowTypeVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkflowTypeVersion", 1)) - } - if s.TaskList != nil { - if err := s.TaskList.Validate(); err != nil { - invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChildPolicy sets the ChildPolicy field's value. -func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetChildPolicy(v string) *ContinueAsNewWorkflowExecutionDecisionAttributes { - s.ChildPolicy = &v - return s -} - -// SetExecutionStartToCloseTimeout sets the ExecutionStartToCloseTimeout field's value. -func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetExecutionStartToCloseTimeout(v string) *ContinueAsNewWorkflowExecutionDecisionAttributes { - s.ExecutionStartToCloseTimeout = &v - return s -} - -// SetInput sets the Input field's value. -func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetInput(v string) *ContinueAsNewWorkflowExecutionDecisionAttributes { - s.Input = &v - return s -} - -// SetLambdaRole sets the LambdaRole field's value. -func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetLambdaRole(v string) *ContinueAsNewWorkflowExecutionDecisionAttributes { - s.LambdaRole = &v - return s -} - -// SetTagList sets the TagList field's value. -func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetTagList(v []*string) *ContinueAsNewWorkflowExecutionDecisionAttributes { - s.TagList = v - return s -} - -// SetTaskList sets the TaskList field's value. -func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetTaskList(v *TaskList) *ContinueAsNewWorkflowExecutionDecisionAttributes { - s.TaskList = v - return s -} - -// SetTaskPriority sets the TaskPriority field's value. -func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetTaskPriority(v string) *ContinueAsNewWorkflowExecutionDecisionAttributes { - s.TaskPriority = &v - return s -} - -// SetTaskStartToCloseTimeout sets the TaskStartToCloseTimeout field's value. -func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetTaskStartToCloseTimeout(v string) *ContinueAsNewWorkflowExecutionDecisionAttributes { - s.TaskStartToCloseTimeout = &v - return s -} - -// SetWorkflowTypeVersion sets the WorkflowTypeVersion field's value. -func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetWorkflowTypeVersion(v string) *ContinueAsNewWorkflowExecutionDecisionAttributes { - s.WorkflowTypeVersion = &v - return s -} - -// Provides the details of the ContinueAsNewWorkflowExecutionFailed event. -type ContinueAsNewWorkflowExecutionFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The cause of the failure. This information is generated by the system and - // can be useful for diagnostic purposes. - // - // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it - // lacked sufficient permissions. For details and example IAM policies, see - // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) - // in the Amazon SWF Developer Guide. - // - // Cause is a required field - Cause *string `locationName:"cause" type:"string" required:"true" enum:"ContinueAsNewWorkflowExecutionFailedCause"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the ContinueAsNewWorkflowExecution decision that started - // this execution. This information can be useful for diagnosing problems by - // tracing back the chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s ContinueAsNewWorkflowExecutionFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ContinueAsNewWorkflowExecutionFailedEventAttributes) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *ContinueAsNewWorkflowExecutionFailedEventAttributes) SetCause(v string) *ContinueAsNewWorkflowExecutionFailedEventAttributes { - s.Cause = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *ContinueAsNewWorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *ContinueAsNewWorkflowExecutionFailedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -type CountClosedWorkflowExecutionsInput struct { - _ struct{} `type:"structure"` - - // If specified, only workflow executions that match this close status are counted. - // This filter has an affect only if executionStatus is specified as CLOSED. - // - // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually - // exclusive. You can specify at most one of these in a request. - CloseStatusFilter *CloseStatusFilter `locationName:"closeStatusFilter" type:"structure"` - - // If specified, only workflow executions that meet the close time criteria - // of the filter are counted. - // - // startTimeFilter and closeTimeFilter are mutually exclusive. You must specify - // one of these in a request but not both. - CloseTimeFilter *ExecutionTimeFilter `locationName:"closeTimeFilter" type:"structure"` - - // The name of the domain containing the workflow executions to count. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // If specified, only workflow executions matching the WorkflowId in the filter - // are counted. - // - // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually - // exclusive. You can specify at most one of these in a request. - ExecutionFilter *WorkflowExecutionFilter `locationName:"executionFilter" type:"structure"` - - // If specified, only workflow executions that meet the start time criteria - // of the filter are counted. - // - // startTimeFilter and closeTimeFilter are mutually exclusive. You must specify - // one of these in a request but not both. - StartTimeFilter *ExecutionTimeFilter `locationName:"startTimeFilter" type:"structure"` - - // If specified, only executions that have a tag that matches the filter are - // counted. - // - // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually - // exclusive. You can specify at most one of these in a request. - TagFilter *TagFilter `locationName:"tagFilter" type:"structure"` - - // If specified, indicates the type of the workflow executions to be counted. - // - // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually - // exclusive. You can specify at most one of these in a request. - TypeFilter *WorkflowTypeFilter `locationName:"typeFilter" type:"structure"` -} - -// String returns the string representation -func (s CountClosedWorkflowExecutionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CountClosedWorkflowExecutionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CountClosedWorkflowExecutionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CountClosedWorkflowExecutionsInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.CloseStatusFilter != nil { - if err := s.CloseStatusFilter.Validate(); err != nil { - invalidParams.AddNested("CloseStatusFilter", err.(request.ErrInvalidParams)) - } - } - if s.CloseTimeFilter != nil { - if err := s.CloseTimeFilter.Validate(); err != nil { - invalidParams.AddNested("CloseTimeFilter", err.(request.ErrInvalidParams)) - } - } - if s.ExecutionFilter != nil { - if err := s.ExecutionFilter.Validate(); err != nil { - invalidParams.AddNested("ExecutionFilter", err.(request.ErrInvalidParams)) - } - } - if s.StartTimeFilter != nil { - if err := s.StartTimeFilter.Validate(); err != nil { - invalidParams.AddNested("StartTimeFilter", err.(request.ErrInvalidParams)) - } - } - if s.TagFilter != nil { - if err := s.TagFilter.Validate(); err != nil { - invalidParams.AddNested("TagFilter", err.(request.ErrInvalidParams)) - } - } - if s.TypeFilter != nil { - if err := s.TypeFilter.Validate(); err != nil { - invalidParams.AddNested("TypeFilter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloseStatusFilter sets the CloseStatusFilter field's value. -func (s *CountClosedWorkflowExecutionsInput) SetCloseStatusFilter(v *CloseStatusFilter) *CountClosedWorkflowExecutionsInput { - s.CloseStatusFilter = v - return s -} - -// SetCloseTimeFilter sets the CloseTimeFilter field's value. -func (s *CountClosedWorkflowExecutionsInput) SetCloseTimeFilter(v *ExecutionTimeFilter) *CountClosedWorkflowExecutionsInput { - s.CloseTimeFilter = v - return s -} - -// SetDomain sets the Domain field's value. -func (s *CountClosedWorkflowExecutionsInput) SetDomain(v string) *CountClosedWorkflowExecutionsInput { - s.Domain = &v - return s -} - -// SetExecutionFilter sets the ExecutionFilter field's value. -func (s *CountClosedWorkflowExecutionsInput) SetExecutionFilter(v *WorkflowExecutionFilter) *CountClosedWorkflowExecutionsInput { - s.ExecutionFilter = v - return s -} - -// SetStartTimeFilter sets the StartTimeFilter field's value. -func (s *CountClosedWorkflowExecutionsInput) SetStartTimeFilter(v *ExecutionTimeFilter) *CountClosedWorkflowExecutionsInput { - s.StartTimeFilter = v - return s -} - -// SetTagFilter sets the TagFilter field's value. -func (s *CountClosedWorkflowExecutionsInput) SetTagFilter(v *TagFilter) *CountClosedWorkflowExecutionsInput { - s.TagFilter = v - return s -} - -// SetTypeFilter sets the TypeFilter field's value. -func (s *CountClosedWorkflowExecutionsInput) SetTypeFilter(v *WorkflowTypeFilter) *CountClosedWorkflowExecutionsInput { - s.TypeFilter = v - return s -} - -type CountOpenWorkflowExecutionsInput struct { - _ struct{} `type:"structure"` - - // The name of the domain containing the workflow executions to count. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // If specified, only workflow executions matching the WorkflowId in the filter - // are counted. - // - // executionFilter, typeFilter and tagFilter are mutually exclusive. You can - // specify at most one of these in a request. - ExecutionFilter *WorkflowExecutionFilter `locationName:"executionFilter" type:"structure"` - - // Specifies the start time criteria that workflow executions must meet in order - // to be counted. - // - // StartTimeFilter is a required field - StartTimeFilter *ExecutionTimeFilter `locationName:"startTimeFilter" type:"structure" required:"true"` - - // If specified, only executions that have a tag that matches the filter are - // counted. - // - // executionFilter, typeFilter and tagFilter are mutually exclusive. You can - // specify at most one of these in a request. - TagFilter *TagFilter `locationName:"tagFilter" type:"structure"` - - // Specifies the type of the workflow executions to be counted. - // - // executionFilter, typeFilter and tagFilter are mutually exclusive. You can - // specify at most one of these in a request. - TypeFilter *WorkflowTypeFilter `locationName:"typeFilter" type:"structure"` -} - -// String returns the string representation -func (s CountOpenWorkflowExecutionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CountOpenWorkflowExecutionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CountOpenWorkflowExecutionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CountOpenWorkflowExecutionsInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.StartTimeFilter == nil { - invalidParams.Add(request.NewErrParamRequired("StartTimeFilter")) - } - if s.ExecutionFilter != nil { - if err := s.ExecutionFilter.Validate(); err != nil { - invalidParams.AddNested("ExecutionFilter", err.(request.ErrInvalidParams)) - } - } - if s.StartTimeFilter != nil { - if err := s.StartTimeFilter.Validate(); err != nil { - invalidParams.AddNested("StartTimeFilter", err.(request.ErrInvalidParams)) - } - } - if s.TagFilter != nil { - if err := s.TagFilter.Validate(); err != nil { - invalidParams.AddNested("TagFilter", err.(request.ErrInvalidParams)) - } - } - if s.TypeFilter != nil { - if err := s.TypeFilter.Validate(); err != nil { - invalidParams.AddNested("TypeFilter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *CountOpenWorkflowExecutionsInput) SetDomain(v string) *CountOpenWorkflowExecutionsInput { - s.Domain = &v - return s -} - -// SetExecutionFilter sets the ExecutionFilter field's value. -func (s *CountOpenWorkflowExecutionsInput) SetExecutionFilter(v *WorkflowExecutionFilter) *CountOpenWorkflowExecutionsInput { - s.ExecutionFilter = v - return s -} - -// SetStartTimeFilter sets the StartTimeFilter field's value. -func (s *CountOpenWorkflowExecutionsInput) SetStartTimeFilter(v *ExecutionTimeFilter) *CountOpenWorkflowExecutionsInput { - s.StartTimeFilter = v - return s -} - -// SetTagFilter sets the TagFilter field's value. -func (s *CountOpenWorkflowExecutionsInput) SetTagFilter(v *TagFilter) *CountOpenWorkflowExecutionsInput { - s.TagFilter = v - return s -} - -// SetTypeFilter sets the TypeFilter field's value. -func (s *CountOpenWorkflowExecutionsInput) SetTypeFilter(v *WorkflowTypeFilter) *CountOpenWorkflowExecutionsInput { - s.TypeFilter = v - return s -} - -type CountPendingActivityTasksInput struct { - _ struct{} `type:"structure"` - - // The name of the domain that contains the task list. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // The name of the task list. - // - // TaskList is a required field - TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` -} - -// String returns the string representation -func (s CountPendingActivityTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CountPendingActivityTasksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CountPendingActivityTasksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CountPendingActivityTasksInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.TaskList == nil { - invalidParams.Add(request.NewErrParamRequired("TaskList")) - } - if s.TaskList != nil { - if err := s.TaskList.Validate(); err != nil { - invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *CountPendingActivityTasksInput) SetDomain(v string) *CountPendingActivityTasksInput { - s.Domain = &v - return s -} - -// SetTaskList sets the TaskList field's value. -func (s *CountPendingActivityTasksInput) SetTaskList(v *TaskList) *CountPendingActivityTasksInput { - s.TaskList = v - return s -} - -type CountPendingDecisionTasksInput struct { - _ struct{} `type:"structure"` - - // The name of the domain that contains the task list. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // The name of the task list. - // - // TaskList is a required field - TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` -} - -// String returns the string representation -func (s CountPendingDecisionTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CountPendingDecisionTasksInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CountPendingDecisionTasksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CountPendingDecisionTasksInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.TaskList == nil { - invalidParams.Add(request.NewErrParamRequired("TaskList")) - } - if s.TaskList != nil { - if err := s.TaskList.Validate(); err != nil { - invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *CountPendingDecisionTasksInput) SetDomain(v string) *CountPendingDecisionTasksInput { - s.Domain = &v - return s -} - -// SetTaskList sets the TaskList field's value. -func (s *CountPendingDecisionTasksInput) SetTaskList(v *TaskList) *CountPendingDecisionTasksInput { - s.TaskList = v - return s -} - -// Specifies a decision made by the decider. A decision can be one of these -// types: -// -// * CancelTimer – Cancels a previously started timer and records a TimerCanceled -// event in the history. -// -// * CancelWorkflowExecution – Closes the workflow execution and records -// a WorkflowExecutionCanceled event in the history. -// -// * CompleteWorkflowExecution – Closes the workflow execution and records -// a WorkflowExecutionCompleted event in the history . -// -// * ContinueAsNewWorkflowExecution – Closes the workflow execution and starts -// a new workflow execution of the same type using the same workflow ID and -// a unique run Id. A WorkflowExecutionContinuedAsNew event is recorded in -// the history. -// -// * FailWorkflowExecution – Closes the workflow execution and records a -// WorkflowExecutionFailed event in the history. -// -// * RecordMarker – Records a MarkerRecorded event in the history. Markers -// can be used for adding custom information in the history for instance -// to let deciders know that they don't need to look at the history beyond -// the marker event. -// -// * RequestCancelActivityTask – Attempts to cancel a previously scheduled -// activity task. If the activity task was scheduled but has not been assigned -// to a worker, then it is canceled. If the activity task was already assigned -// to a worker, then the worker is informed that cancellation has been requested -// in the response to RecordActivityTaskHeartbeat. -// -// * RequestCancelExternalWorkflowExecution – Requests that a request be -// made to cancel the specified external workflow execution and records a -// RequestCancelExternalWorkflowExecutionInitiated event in the history. -// -// * ScheduleActivityTask – Schedules an activity task. -// -// * SignalExternalWorkflowExecution – Requests a signal to be delivered -// to the specified external workflow execution and records a SignalExternalWorkflowExecutionInitiated -// event in the history. -// -// * StartChildWorkflowExecution – Requests that a child workflow execution -// be started and records a StartChildWorkflowExecutionInitiated event in -// the history. The child workflow execution is a separate workflow execution -// with its own history. -// -// * StartTimer – Starts a timer for this workflow execution and records -// a TimerStarted event in the history. This timer fires after the specified -// delay and record a TimerFired event. -// -// Access Control -// -// If you grant permission to use RespondDecisionTaskCompleted, you can use -// IAM policies to express permissions for the list of decisions returned by -// this action as if they were members of the API. Treating decisions as a pseudo -// API maintains a uniform conceptual model and helps keep policies readable. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// Decision Failure -// -// Decisions can fail for several reasons -// -// * The ordering of decisions should follow a logical flow. Some decisions -// might not make sense in the current context of the workflow execution -// and therefore fails. -// -// * A limit on your account was reached. -// -// * The decision lacks sufficient permissions. -// -// One of the following events might be added to the history to indicate an -// error. The event attribute's cause parameter indicates the cause. If cause -// is set to OPERATION_NOT_PERMITTED, the decision failed because it lacked -// sufficient permissions. For details and example IAM policies, see Using IAM -// to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -// -// * ScheduleActivityTaskFailed – A ScheduleActivityTask decision failed. -// This could happen if the activity type specified in the decision isn't -// registered, is in a deprecated state, or the decision isn't properly configured. -// -// * RequestCancelActivityTaskFailed – A RequestCancelActivityTask decision -// failed. This could happen if there is no open activity task with the specified -// activityId. -// -// * StartTimerFailed – A StartTimer decision failed. This could happen if -// there is another open timer with the same timerId. -// -// * CancelTimerFailed – A CancelTimer decision failed. This could happen -// if there is no open timer with the specified timerId. -// -// * StartChildWorkflowExecutionFailed – A StartChildWorkflowExecution decision -// failed. This could happen if the workflow type specified isn't registered, -// is deprecated, or the decision isn't properly configured. -// -// * SignalExternalWorkflowExecutionFailed – A SignalExternalWorkflowExecution -// decision failed. This could happen if the workflowID specified in the -// decision was incorrect. -// -// * RequestCancelExternalWorkflowExecutionFailed – A RequestCancelExternalWorkflowExecution -// decision failed. This could happen if the workflowID specified in the -// decision was incorrect. -// -// * CancelWorkflowExecutionFailed – A CancelWorkflowExecution decision failed. -// This could happen if there is an unhandled decision task pending in the -// workflow execution. -// -// * CompleteWorkflowExecutionFailed – A CompleteWorkflowExecution decision -// failed. This could happen if there is an unhandled decision task pending -// in the workflow execution. -// -// * ContinueAsNewWorkflowExecutionFailed – A ContinueAsNewWorkflowExecution -// decision failed. This could happen if there is an unhandled decision task -// pending in the workflow execution or the ContinueAsNewWorkflowExecution -// decision was not configured correctly. -// -// * FailWorkflowExecutionFailed – A FailWorkflowExecution decision failed. -// This could happen if there is an unhandled decision task pending in the -// workflow execution. -// -// The preceding error events might occur due to an error in the decider logic, -// which might put the workflow execution in an unstable state The cause field -// in the event structure for the error event indicates the cause of the error. -// -// A workflow execution may be closed by the decider by returning one of the -// following decisions when completing a decision task: CompleteWorkflowExecution, -// FailWorkflowExecution, CancelWorkflowExecution and ContinueAsNewWorkflowExecution. -// An UnhandledDecision fault is returned if a workflow closing decision is -// specified and a signal or activity event had been added to the history while -// the decision task was being performed by the decider. Unlike the above situations -// which are logic issues, this fault is always possible because of race conditions -// in a distributed system. The right action here is to call RespondDecisionTaskCompleted -// without any decisions. This would result in another decision task with these -// new events included in the history. The decider should handle the new events -// and may decide to close the workflow execution. -// -// How to Code a Decision -// -// You code a decision by first setting the decision type field to one of the -// above decision values, and then set the corresponding attributes field shown -// below: -// -// * ScheduleActivityTaskDecisionAttributes -// -// * RequestCancelActivityTaskDecisionAttributes -// -// * CompleteWorkflowExecutionDecisionAttributes -// -// * FailWorkflowExecutionDecisionAttributes -// -// * CancelWorkflowExecutionDecisionAttributes -// -// * ContinueAsNewWorkflowExecutionDecisionAttributes -// -// * RecordMarkerDecisionAttributes -// -// * StartTimerDecisionAttributes -// -// * CancelTimerDecisionAttributes -// -// * SignalExternalWorkflowExecutionDecisionAttributes -// -// * RequestCancelExternalWorkflowExecutionDecisionAttributes -// -// * StartChildWorkflowExecutionDecisionAttributes -type Decision struct { - _ struct{} `type:"structure"` - - // Provides the details of the CancelTimer decision. It isn't set for other - // decision types. - CancelTimerDecisionAttributes *CancelTimerDecisionAttributes `locationName:"cancelTimerDecisionAttributes" type:"structure"` - - // Provides the details of the CancelWorkflowExecution decision. It isn't set - // for other decision types. - CancelWorkflowExecutionDecisionAttributes *CancelWorkflowExecutionDecisionAttributes `locationName:"cancelWorkflowExecutionDecisionAttributes" type:"structure"` - - // Provides the details of the CompleteWorkflowExecution decision. It isn't - // set for other decision types. - CompleteWorkflowExecutionDecisionAttributes *CompleteWorkflowExecutionDecisionAttributes `locationName:"completeWorkflowExecutionDecisionAttributes" type:"structure"` - - // Provides the details of the ContinueAsNewWorkflowExecution decision. It isn't - // set for other decision types. - ContinueAsNewWorkflowExecutionDecisionAttributes *ContinueAsNewWorkflowExecutionDecisionAttributes `locationName:"continueAsNewWorkflowExecutionDecisionAttributes" type:"structure"` - - // Specifies the type of the decision. - // - // DecisionType is a required field - DecisionType *string `locationName:"decisionType" type:"string" required:"true" enum:"DecisionType"` - - // Provides the details of the FailWorkflowExecution decision. It isn't set - // for other decision types. - FailWorkflowExecutionDecisionAttributes *FailWorkflowExecutionDecisionAttributes `locationName:"failWorkflowExecutionDecisionAttributes" type:"structure"` - - // Provides the details of the RecordMarker decision. It isn't set for other - // decision types. - RecordMarkerDecisionAttributes *RecordMarkerDecisionAttributes `locationName:"recordMarkerDecisionAttributes" type:"structure"` - - // Provides the details of the RequestCancelActivityTask decision. It isn't - // set for other decision types. - RequestCancelActivityTaskDecisionAttributes *RequestCancelActivityTaskDecisionAttributes `locationName:"requestCancelActivityTaskDecisionAttributes" type:"structure"` - - // Provides the details of the RequestCancelExternalWorkflowExecution decision. - // It isn't set for other decision types. - RequestCancelExternalWorkflowExecutionDecisionAttributes *RequestCancelExternalWorkflowExecutionDecisionAttributes `locationName:"requestCancelExternalWorkflowExecutionDecisionAttributes" type:"structure"` - - // Provides the details of the ScheduleActivityTask decision. It isn't set for - // other decision types. - ScheduleActivityTaskDecisionAttributes *ScheduleActivityTaskDecisionAttributes `locationName:"scheduleActivityTaskDecisionAttributes" type:"structure"` - - // Provides the details of the ScheduleLambdaFunction decision. It isn't set - // for other decision types. - ScheduleLambdaFunctionDecisionAttributes *ScheduleLambdaFunctionDecisionAttributes `locationName:"scheduleLambdaFunctionDecisionAttributes" type:"structure"` - - // Provides the details of the SignalExternalWorkflowExecution decision. It - // isn't set for other decision types. - SignalExternalWorkflowExecutionDecisionAttributes *SignalExternalWorkflowExecutionDecisionAttributes `locationName:"signalExternalWorkflowExecutionDecisionAttributes" type:"structure"` - - // Provides the details of the StartChildWorkflowExecution decision. It isn't - // set for other decision types. - StartChildWorkflowExecutionDecisionAttributes *StartChildWorkflowExecutionDecisionAttributes `locationName:"startChildWorkflowExecutionDecisionAttributes" type:"structure"` - - // Provides the details of the StartTimer decision. It isn't set for other decision - // types. - StartTimerDecisionAttributes *StartTimerDecisionAttributes `locationName:"startTimerDecisionAttributes" type:"structure"` -} - -// String returns the string representation -func (s Decision) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Decision) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Decision) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Decision"} - if s.DecisionType == nil { - invalidParams.Add(request.NewErrParamRequired("DecisionType")) - } - if s.CancelTimerDecisionAttributes != nil { - if err := s.CancelTimerDecisionAttributes.Validate(); err != nil { - invalidParams.AddNested("CancelTimerDecisionAttributes", err.(request.ErrInvalidParams)) - } - } - if s.ContinueAsNewWorkflowExecutionDecisionAttributes != nil { - if err := s.ContinueAsNewWorkflowExecutionDecisionAttributes.Validate(); err != nil { - invalidParams.AddNested("ContinueAsNewWorkflowExecutionDecisionAttributes", err.(request.ErrInvalidParams)) - } - } - if s.RecordMarkerDecisionAttributes != nil { - if err := s.RecordMarkerDecisionAttributes.Validate(); err != nil { - invalidParams.AddNested("RecordMarkerDecisionAttributes", err.(request.ErrInvalidParams)) - } - } - if s.RequestCancelActivityTaskDecisionAttributes != nil { - if err := s.RequestCancelActivityTaskDecisionAttributes.Validate(); err != nil { - invalidParams.AddNested("RequestCancelActivityTaskDecisionAttributes", err.(request.ErrInvalidParams)) - } - } - if s.RequestCancelExternalWorkflowExecutionDecisionAttributes != nil { - if err := s.RequestCancelExternalWorkflowExecutionDecisionAttributes.Validate(); err != nil { - invalidParams.AddNested("RequestCancelExternalWorkflowExecutionDecisionAttributes", err.(request.ErrInvalidParams)) - } - } - if s.ScheduleActivityTaskDecisionAttributes != nil { - if err := s.ScheduleActivityTaskDecisionAttributes.Validate(); err != nil { - invalidParams.AddNested("ScheduleActivityTaskDecisionAttributes", err.(request.ErrInvalidParams)) - } - } - if s.ScheduleLambdaFunctionDecisionAttributes != nil { - if err := s.ScheduleLambdaFunctionDecisionAttributes.Validate(); err != nil { - invalidParams.AddNested("ScheduleLambdaFunctionDecisionAttributes", err.(request.ErrInvalidParams)) - } - } - if s.SignalExternalWorkflowExecutionDecisionAttributes != nil { - if err := s.SignalExternalWorkflowExecutionDecisionAttributes.Validate(); err != nil { - invalidParams.AddNested("SignalExternalWorkflowExecutionDecisionAttributes", err.(request.ErrInvalidParams)) - } - } - if s.StartChildWorkflowExecutionDecisionAttributes != nil { - if err := s.StartChildWorkflowExecutionDecisionAttributes.Validate(); err != nil { - invalidParams.AddNested("StartChildWorkflowExecutionDecisionAttributes", err.(request.ErrInvalidParams)) - } - } - if s.StartTimerDecisionAttributes != nil { - if err := s.StartTimerDecisionAttributes.Validate(); err != nil { - invalidParams.AddNested("StartTimerDecisionAttributes", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCancelTimerDecisionAttributes sets the CancelTimerDecisionAttributes field's value. -func (s *Decision) SetCancelTimerDecisionAttributes(v *CancelTimerDecisionAttributes) *Decision { - s.CancelTimerDecisionAttributes = v - return s -} - -// SetCancelWorkflowExecutionDecisionAttributes sets the CancelWorkflowExecutionDecisionAttributes field's value. -func (s *Decision) SetCancelWorkflowExecutionDecisionAttributes(v *CancelWorkflowExecutionDecisionAttributes) *Decision { - s.CancelWorkflowExecutionDecisionAttributes = v - return s -} - -// SetCompleteWorkflowExecutionDecisionAttributes sets the CompleteWorkflowExecutionDecisionAttributes field's value. -func (s *Decision) SetCompleteWorkflowExecutionDecisionAttributes(v *CompleteWorkflowExecutionDecisionAttributes) *Decision { - s.CompleteWorkflowExecutionDecisionAttributes = v - return s -} - -// SetContinueAsNewWorkflowExecutionDecisionAttributes sets the ContinueAsNewWorkflowExecutionDecisionAttributes field's value. -func (s *Decision) SetContinueAsNewWorkflowExecutionDecisionAttributes(v *ContinueAsNewWorkflowExecutionDecisionAttributes) *Decision { - s.ContinueAsNewWorkflowExecutionDecisionAttributes = v - return s -} - -// SetDecisionType sets the DecisionType field's value. -func (s *Decision) SetDecisionType(v string) *Decision { - s.DecisionType = &v - return s -} - -// SetFailWorkflowExecutionDecisionAttributes sets the FailWorkflowExecutionDecisionAttributes field's value. -func (s *Decision) SetFailWorkflowExecutionDecisionAttributes(v *FailWorkflowExecutionDecisionAttributes) *Decision { - s.FailWorkflowExecutionDecisionAttributes = v - return s -} - -// SetRecordMarkerDecisionAttributes sets the RecordMarkerDecisionAttributes field's value. -func (s *Decision) SetRecordMarkerDecisionAttributes(v *RecordMarkerDecisionAttributes) *Decision { - s.RecordMarkerDecisionAttributes = v - return s -} - -// SetRequestCancelActivityTaskDecisionAttributes sets the RequestCancelActivityTaskDecisionAttributes field's value. -func (s *Decision) SetRequestCancelActivityTaskDecisionAttributes(v *RequestCancelActivityTaskDecisionAttributes) *Decision { - s.RequestCancelActivityTaskDecisionAttributes = v - return s -} - -// SetRequestCancelExternalWorkflowExecutionDecisionAttributes sets the RequestCancelExternalWorkflowExecutionDecisionAttributes field's value. -func (s *Decision) SetRequestCancelExternalWorkflowExecutionDecisionAttributes(v *RequestCancelExternalWorkflowExecutionDecisionAttributes) *Decision { - s.RequestCancelExternalWorkflowExecutionDecisionAttributes = v - return s -} - -// SetScheduleActivityTaskDecisionAttributes sets the ScheduleActivityTaskDecisionAttributes field's value. -func (s *Decision) SetScheduleActivityTaskDecisionAttributes(v *ScheduleActivityTaskDecisionAttributes) *Decision { - s.ScheduleActivityTaskDecisionAttributes = v - return s -} - -// SetScheduleLambdaFunctionDecisionAttributes sets the ScheduleLambdaFunctionDecisionAttributes field's value. -func (s *Decision) SetScheduleLambdaFunctionDecisionAttributes(v *ScheduleLambdaFunctionDecisionAttributes) *Decision { - s.ScheduleLambdaFunctionDecisionAttributes = v - return s -} - -// SetSignalExternalWorkflowExecutionDecisionAttributes sets the SignalExternalWorkflowExecutionDecisionAttributes field's value. -func (s *Decision) SetSignalExternalWorkflowExecutionDecisionAttributes(v *SignalExternalWorkflowExecutionDecisionAttributes) *Decision { - s.SignalExternalWorkflowExecutionDecisionAttributes = v - return s -} - -// SetStartChildWorkflowExecutionDecisionAttributes sets the StartChildWorkflowExecutionDecisionAttributes field's value. -func (s *Decision) SetStartChildWorkflowExecutionDecisionAttributes(v *StartChildWorkflowExecutionDecisionAttributes) *Decision { - s.StartChildWorkflowExecutionDecisionAttributes = v - return s -} - -// SetStartTimerDecisionAttributes sets the StartTimerDecisionAttributes field's value. -func (s *Decision) SetStartTimerDecisionAttributes(v *StartTimerDecisionAttributes) *Decision { - s.StartTimerDecisionAttributes = v - return s -} - -// Provides the details of the DecisionTaskCompleted event. -type DecisionTaskCompletedEventAttributes struct { - _ struct{} `type:"structure"` - - // User defined context for the workflow execution. - ExecutionContext *string `locationName:"executionContext" type:"string"` - - // The ID of the DecisionTaskScheduled event that was recorded when this decision - // task was scheduled. This information can be useful for diagnosing problems - // by tracing back the chain of events leading up to this event. - // - // ScheduledEventId is a required field - ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` - - // The ID of the DecisionTaskStarted event recorded when this decision task - // was started. This information can be useful for diagnosing problems by tracing - // back the chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s DecisionTaskCompletedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DecisionTaskCompletedEventAttributes) GoString() string { - return s.String() -} - -// SetExecutionContext sets the ExecutionContext field's value. -func (s *DecisionTaskCompletedEventAttributes) SetExecutionContext(v string) *DecisionTaskCompletedEventAttributes { - s.ExecutionContext = &v - return s -} - -// SetScheduledEventId sets the ScheduledEventId field's value. -func (s *DecisionTaskCompletedEventAttributes) SetScheduledEventId(v int64) *DecisionTaskCompletedEventAttributes { - s.ScheduledEventId = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *DecisionTaskCompletedEventAttributes) SetStartedEventId(v int64) *DecisionTaskCompletedEventAttributes { - s.StartedEventId = &v - return s -} - -// Provides details about the DecisionTaskScheduled event. -type DecisionTaskScheduledEventAttributes struct { - _ struct{} `type:"structure"` - - // The maximum duration for this decision task. The task is considered timed - // out if it doesn't completed within this duration. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - StartToCloseTimeout *string `locationName:"startToCloseTimeout" type:"string"` - - // The name of the task list in which the decision task was scheduled. - // - // TaskList is a required field - TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` - - // A task priority that, if set, specifies the priority for this decision task. - // Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) - // to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. - // - // For more information about setting task priority, see Setting Task Priority - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) - // in the Amazon SWF Developer Guide. - TaskPriority *string `locationName:"taskPriority" type:"string"` -} - -// String returns the string representation -func (s DecisionTaskScheduledEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DecisionTaskScheduledEventAttributes) GoString() string { - return s.String() -} - -// SetStartToCloseTimeout sets the StartToCloseTimeout field's value. -func (s *DecisionTaskScheduledEventAttributes) SetStartToCloseTimeout(v string) *DecisionTaskScheduledEventAttributes { - s.StartToCloseTimeout = &v - return s -} - -// SetTaskList sets the TaskList field's value. -func (s *DecisionTaskScheduledEventAttributes) SetTaskList(v *TaskList) *DecisionTaskScheduledEventAttributes { - s.TaskList = v - return s -} - -// SetTaskPriority sets the TaskPriority field's value. -func (s *DecisionTaskScheduledEventAttributes) SetTaskPriority(v string) *DecisionTaskScheduledEventAttributes { - s.TaskPriority = &v - return s -} - -// Provides the details of the DecisionTaskStarted event. -type DecisionTaskStartedEventAttributes struct { - _ struct{} `type:"structure"` - - // Identity of the decider making the request. This enables diagnostic tracing - // when problems arise. The form of this identity is user defined. - Identity *string `locationName:"identity" type:"string"` - - // The ID of the DecisionTaskScheduled event that was recorded when this decision - // task was scheduled. This information can be useful for diagnosing problems - // by tracing back the chain of events leading up to this event. - // - // ScheduledEventId is a required field - ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s DecisionTaskStartedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DecisionTaskStartedEventAttributes) GoString() string { - return s.String() -} - -// SetIdentity sets the Identity field's value. -func (s *DecisionTaskStartedEventAttributes) SetIdentity(v string) *DecisionTaskStartedEventAttributes { - s.Identity = &v - return s -} - -// SetScheduledEventId sets the ScheduledEventId field's value. -func (s *DecisionTaskStartedEventAttributes) SetScheduledEventId(v int64) *DecisionTaskStartedEventAttributes { - s.ScheduledEventId = &v - return s -} - -// Provides the details of the DecisionTaskTimedOut event. -type DecisionTaskTimedOutEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the DecisionTaskScheduled event that was recorded when this decision - // task was scheduled. This information can be useful for diagnosing problems - // by tracing back the chain of events leading up to this event. - // - // ScheduledEventId is a required field - ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` - - // The ID of the DecisionTaskStarted event recorded when this decision task - // was started. This information can be useful for diagnosing problems by tracing - // back the chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` - - // The type of timeout that expired before the decision task could be completed. - // - // TimeoutType is a required field - TimeoutType *string `locationName:"timeoutType" type:"string" required:"true" enum:"DecisionTaskTimeoutType"` -} - -// String returns the string representation -func (s DecisionTaskTimedOutEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DecisionTaskTimedOutEventAttributes) GoString() string { - return s.String() -} - -// SetScheduledEventId sets the ScheduledEventId field's value. -func (s *DecisionTaskTimedOutEventAttributes) SetScheduledEventId(v int64) *DecisionTaskTimedOutEventAttributes { - s.ScheduledEventId = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *DecisionTaskTimedOutEventAttributes) SetStartedEventId(v int64) *DecisionTaskTimedOutEventAttributes { - s.StartedEventId = &v - return s -} - -// SetTimeoutType sets the TimeoutType field's value. -func (s *DecisionTaskTimedOutEventAttributes) SetTimeoutType(v string) *DecisionTaskTimedOutEventAttributes { - s.TimeoutType = &v - return s -} - -type DeprecateActivityTypeInput struct { - _ struct{} `type:"structure"` - - // The activity type to deprecate. - // - // ActivityType is a required field - ActivityType *ActivityType `locationName:"activityType" type:"structure" required:"true"` - - // The name of the domain in which the activity type is registered. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeprecateActivityTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeprecateActivityTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeprecateActivityTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeprecateActivityTypeInput"} - if s.ActivityType == nil { - invalidParams.Add(request.NewErrParamRequired("ActivityType")) - } - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.ActivityType != nil { - if err := s.ActivityType.Validate(); err != nil { - invalidParams.AddNested("ActivityType", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivityType sets the ActivityType field's value. -func (s *DeprecateActivityTypeInput) SetActivityType(v *ActivityType) *DeprecateActivityTypeInput { - s.ActivityType = v - return s -} - -// SetDomain sets the Domain field's value. -func (s *DeprecateActivityTypeInput) SetDomain(v string) *DeprecateActivityTypeInput { - s.Domain = &v - return s -} - -type DeprecateActivityTypeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeprecateActivityTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeprecateActivityTypeOutput) GoString() string { - return s.String() -} - -type DeprecateDomainInput struct { - _ struct{} `type:"structure"` - - // The name of the domain to deprecate. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeprecateDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeprecateDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeprecateDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeprecateDomainInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeprecateDomainInput) SetName(v string) *DeprecateDomainInput { - s.Name = &v - return s -} - -type DeprecateDomainOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeprecateDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeprecateDomainOutput) GoString() string { - return s.String() -} - -type DeprecateWorkflowTypeInput struct { - _ struct{} `type:"structure"` - - // The name of the domain in which the workflow type is registered. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // The workflow type to deprecate. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s DeprecateWorkflowTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeprecateWorkflowTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeprecateWorkflowTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeprecateWorkflowTypeInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.WorkflowType == nil { - invalidParams.Add(request.NewErrParamRequired("WorkflowType")) - } - if s.WorkflowType != nil { - if err := s.WorkflowType.Validate(); err != nil { - invalidParams.AddNested("WorkflowType", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *DeprecateWorkflowTypeInput) SetDomain(v string) *DeprecateWorkflowTypeInput { - s.Domain = &v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *DeprecateWorkflowTypeInput) SetWorkflowType(v *WorkflowType) *DeprecateWorkflowTypeInput { - s.WorkflowType = v - return s -} - -type DeprecateWorkflowTypeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeprecateWorkflowTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeprecateWorkflowTypeOutput) GoString() string { - return s.String() -} - -type DescribeActivityTypeInput struct { - _ struct{} `type:"structure"` - - // The activity type to get information about. Activity types are identified - // by the name and version that were supplied when the activity was registered. - // - // ActivityType is a required field - ActivityType *ActivityType `locationName:"activityType" type:"structure" required:"true"` - - // The name of the domain in which the activity type is registered. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeActivityTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeActivityTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeActivityTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeActivityTypeInput"} - if s.ActivityType == nil { - invalidParams.Add(request.NewErrParamRequired("ActivityType")) - } - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.ActivityType != nil { - if err := s.ActivityType.Validate(); err != nil { - invalidParams.AddNested("ActivityType", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivityType sets the ActivityType field's value. -func (s *DescribeActivityTypeInput) SetActivityType(v *ActivityType) *DescribeActivityTypeInput { - s.ActivityType = v - return s -} - -// SetDomain sets the Domain field's value. -func (s *DescribeActivityTypeInput) SetDomain(v string) *DescribeActivityTypeInput { - s.Domain = &v - return s -} - -// Detailed information about an activity type. -type DescribeActivityTypeOutput struct { - _ struct{} `type:"structure"` - - // The configuration settings registered with the activity type. - // - // Configuration is a required field - Configuration *ActivityTypeConfiguration `locationName:"configuration" type:"structure" required:"true"` - - // General information about the activity type. - // - // The status of activity type (returned in the ActivityTypeInfo structure) - // can be one of the following. - // - // * REGISTERED – The type is registered and available. Workers supporting - // this type should be running. - // - // * DEPRECATED – The type was deprecated using DeprecateActivityType, but - // is still in use. You should keep workers supporting this type running. - // You cannot create new tasks of this type. - // - // TypeInfo is a required field - TypeInfo *ActivityTypeInfo `locationName:"typeInfo" type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeActivityTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeActivityTypeOutput) GoString() string { - return s.String() -} - -// SetConfiguration sets the Configuration field's value. -func (s *DescribeActivityTypeOutput) SetConfiguration(v *ActivityTypeConfiguration) *DescribeActivityTypeOutput { - s.Configuration = v - return s -} - -// SetTypeInfo sets the TypeInfo field's value. -func (s *DescribeActivityTypeOutput) SetTypeInfo(v *ActivityTypeInfo) *DescribeActivityTypeOutput { - s.TypeInfo = v - return s -} - -type DescribeDomainInput struct { - _ struct{} `type:"structure"` - - // The name of the domain to describe. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDomainInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DescribeDomainInput) SetName(v string) *DescribeDomainInput { - s.Name = &v - return s -} - -// Contains details of a domain. -type DescribeDomainOutput struct { - _ struct{} `type:"structure"` - - // The domain configuration. Currently, this includes only the domain's retention - // period. - // - // Configuration is a required field - Configuration *DomainConfiguration `locationName:"configuration" type:"structure" required:"true"` - - // The basic information about a domain, such as its name, status, and description. - // - // DomainInfo is a required field - DomainInfo *DomainInfo `locationName:"domainInfo" type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDomainOutput) GoString() string { - return s.String() -} - -// SetConfiguration sets the Configuration field's value. -func (s *DescribeDomainOutput) SetConfiguration(v *DomainConfiguration) *DescribeDomainOutput { - s.Configuration = v - return s -} - -// SetDomainInfo sets the DomainInfo field's value. -func (s *DescribeDomainOutput) SetDomainInfo(v *DomainInfo) *DescribeDomainOutput { - s.DomainInfo = v - return s -} - -type DescribeWorkflowExecutionInput struct { - _ struct{} `type:"structure"` - - // The name of the domain containing the workflow execution. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // The workflow execution to describe. - // - // Execution is a required field - Execution *WorkflowExecution `locationName:"execution" type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeWorkflowExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkflowExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeWorkflowExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeWorkflowExecutionInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.Execution == nil { - invalidParams.Add(request.NewErrParamRequired("Execution")) - } - if s.Execution != nil { - if err := s.Execution.Validate(); err != nil { - invalidParams.AddNested("Execution", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *DescribeWorkflowExecutionInput) SetDomain(v string) *DescribeWorkflowExecutionInput { - s.Domain = &v - return s -} - -// SetExecution sets the Execution field's value. -func (s *DescribeWorkflowExecutionInput) SetExecution(v *WorkflowExecution) *DescribeWorkflowExecutionInput { - s.Execution = v - return s -} - -// Contains details about a workflow execution. -type DescribeWorkflowExecutionOutput struct { - _ struct{} `type:"structure"` - - // The configuration settings for this workflow execution including timeout - // values, tasklist etc. - // - // ExecutionConfiguration is a required field - ExecutionConfiguration *WorkflowExecutionConfiguration `locationName:"executionConfiguration" type:"structure" required:"true"` - - // Information about the workflow execution. - // - // ExecutionInfo is a required field - ExecutionInfo *WorkflowExecutionInfo `locationName:"executionInfo" type:"structure" required:"true"` - - // The time when the last activity task was scheduled for this workflow execution. - // You can use this information to determine if the workflow has not made progress - // for an unusually long period of time and might require a corrective action. - LatestActivityTaskTimestamp *time.Time `locationName:"latestActivityTaskTimestamp" type:"timestamp"` - - // The latest executionContext provided by the decider for this workflow execution. - // A decider can provide an executionContext (a free-form string) when closing - // a decision task using RespondDecisionTaskCompleted. - LatestExecutionContext *string `locationName:"latestExecutionContext" type:"string"` - - // The number of tasks for this workflow execution. This includes open and closed - // tasks of all types. - // - // OpenCounts is a required field - OpenCounts *WorkflowExecutionOpenCounts `locationName:"openCounts" type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeWorkflowExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkflowExecutionOutput) GoString() string { - return s.String() -} - -// SetExecutionConfiguration sets the ExecutionConfiguration field's value. -func (s *DescribeWorkflowExecutionOutput) SetExecutionConfiguration(v *WorkflowExecutionConfiguration) *DescribeWorkflowExecutionOutput { - s.ExecutionConfiguration = v - return s -} - -// SetExecutionInfo sets the ExecutionInfo field's value. -func (s *DescribeWorkflowExecutionOutput) SetExecutionInfo(v *WorkflowExecutionInfo) *DescribeWorkflowExecutionOutput { - s.ExecutionInfo = v - return s -} - -// SetLatestActivityTaskTimestamp sets the LatestActivityTaskTimestamp field's value. -func (s *DescribeWorkflowExecutionOutput) SetLatestActivityTaskTimestamp(v time.Time) *DescribeWorkflowExecutionOutput { - s.LatestActivityTaskTimestamp = &v - return s -} - -// SetLatestExecutionContext sets the LatestExecutionContext field's value. -func (s *DescribeWorkflowExecutionOutput) SetLatestExecutionContext(v string) *DescribeWorkflowExecutionOutput { - s.LatestExecutionContext = &v - return s -} - -// SetOpenCounts sets the OpenCounts field's value. -func (s *DescribeWorkflowExecutionOutput) SetOpenCounts(v *WorkflowExecutionOpenCounts) *DescribeWorkflowExecutionOutput { - s.OpenCounts = v - return s -} - -type DescribeWorkflowTypeInput struct { - _ struct{} `type:"structure"` - - // The name of the domain in which this workflow type is registered. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // The workflow type to describe. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeWorkflowTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkflowTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeWorkflowTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeWorkflowTypeInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.WorkflowType == nil { - invalidParams.Add(request.NewErrParamRequired("WorkflowType")) - } - if s.WorkflowType != nil { - if err := s.WorkflowType.Validate(); err != nil { - invalidParams.AddNested("WorkflowType", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *DescribeWorkflowTypeInput) SetDomain(v string) *DescribeWorkflowTypeInput { - s.Domain = &v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *DescribeWorkflowTypeInput) SetWorkflowType(v *WorkflowType) *DescribeWorkflowTypeInput { - s.WorkflowType = v - return s -} - -// Contains details about a workflow type. -type DescribeWorkflowTypeOutput struct { - _ struct{} `type:"structure"` - - // Configuration settings of the workflow type registered through RegisterWorkflowType - // - // Configuration is a required field - Configuration *WorkflowTypeConfiguration `locationName:"configuration" type:"structure" required:"true"` - - // General information about the workflow type. - // - // The status of the workflow type (returned in the WorkflowTypeInfo structure) - // can be one of the following. - // - // * REGISTERED – The type is registered and available. Workers supporting - // this type should be running. - // - // * DEPRECATED – The type was deprecated using DeprecateWorkflowType, but - // is still in use. You should keep workers supporting this type running. - // You cannot create new workflow executions of this type. - // - // TypeInfo is a required field - TypeInfo *WorkflowTypeInfo `locationName:"typeInfo" type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeWorkflowTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkflowTypeOutput) GoString() string { - return s.String() -} - -// SetConfiguration sets the Configuration field's value. -func (s *DescribeWorkflowTypeOutput) SetConfiguration(v *WorkflowTypeConfiguration) *DescribeWorkflowTypeOutput { - s.Configuration = v - return s -} - -// SetTypeInfo sets the TypeInfo field's value. -func (s *DescribeWorkflowTypeOutput) SetTypeInfo(v *WorkflowTypeInfo) *DescribeWorkflowTypeOutput { - s.TypeInfo = v - return s -} - -// Contains the configuration settings of a domain. -type DomainConfiguration struct { - _ struct{} `type:"structure"` - - // The retention period for workflow executions in this domain. - // - // WorkflowExecutionRetentionPeriodInDays is a required field - WorkflowExecutionRetentionPeriodInDays *string `locationName:"workflowExecutionRetentionPeriodInDays" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DomainConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainConfiguration) GoString() string { - return s.String() -} - -// SetWorkflowExecutionRetentionPeriodInDays sets the WorkflowExecutionRetentionPeriodInDays field's value. -func (s *DomainConfiguration) SetWorkflowExecutionRetentionPeriodInDays(v string) *DomainConfiguration { - s.WorkflowExecutionRetentionPeriodInDays = &v - return s -} - -// Contains general information about a domain. -type DomainInfo struct { - _ struct{} `type:"structure"` - - // The description of the domain provided through RegisterDomain. - Description *string `locationName:"description" type:"string"` - - // The name of the domain. This name is unique within the account. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The status of the domain: - // - // * REGISTERED – The domain is properly registered and available. You can - // use this domain for registering types and creating new workflow executions. - // - // - // * DEPRECATED – The domain was deprecated using DeprecateDomain, but is - // still in use. You should not create new workflow executions in this domain. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"RegistrationStatus"` -} - -// String returns the string representation -func (s DomainInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DomainInfo) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *DomainInfo) SetDescription(v string) *DomainInfo { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *DomainInfo) SetName(v string) *DomainInfo { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DomainInfo) SetStatus(v string) *DomainInfo { - s.Status = &v - return s -} - -// Used to filter the workflow executions in visibility APIs by various time-based -// rules. Each parameter, if specified, defines a rule that must be satisfied -// by each returned query result. The parameter values are in the Unix Time -// format (https://en.wikipedia.org/wiki/Unix_time). For example: "oldestDate": -// 1325376070. -type ExecutionTimeFilter struct { - _ struct{} `type:"structure"` - - // Specifies the latest start or close date and time to return. - LatestDate *time.Time `locationName:"latestDate" type:"timestamp"` - - // Specifies the oldest start or close date and time to return. - // - // OldestDate is a required field - OldestDate *time.Time `locationName:"oldestDate" type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s ExecutionTimeFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExecutionTimeFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExecutionTimeFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExecutionTimeFilter"} - if s.OldestDate == nil { - invalidParams.Add(request.NewErrParamRequired("OldestDate")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLatestDate sets the LatestDate field's value. -func (s *ExecutionTimeFilter) SetLatestDate(v time.Time) *ExecutionTimeFilter { - s.LatestDate = &v - return s -} - -// SetOldestDate sets the OldestDate field's value. -func (s *ExecutionTimeFilter) SetOldestDate(v time.Time) *ExecutionTimeFilter { - s.OldestDate = &v - return s -} - -// Provides the details of the ExternalWorkflowExecutionCancelRequested event. -type ExternalWorkflowExecutionCancelRequestedEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the RequestCancelExternalWorkflowExecutionInitiated event corresponding - // to the RequestCancelExternalWorkflowExecution decision to cancel this external - // workflow execution. This information can be useful for diagnosing problems - // by tracing back the chain of events leading up to this event. - // - // InitiatedEventId is a required field - InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` - - // The external workflow execution to which the cancellation request was delivered. - // - // WorkflowExecution is a required field - WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` -} - -// String returns the string representation -func (s ExternalWorkflowExecutionCancelRequestedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExternalWorkflowExecutionCancelRequestedEventAttributes) GoString() string { - return s.String() -} - -// SetInitiatedEventId sets the InitiatedEventId field's value. -func (s *ExternalWorkflowExecutionCancelRequestedEventAttributes) SetInitiatedEventId(v int64) *ExternalWorkflowExecutionCancelRequestedEventAttributes { - s.InitiatedEventId = &v - return s -} - -// SetWorkflowExecution sets the WorkflowExecution field's value. -func (s *ExternalWorkflowExecutionCancelRequestedEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ExternalWorkflowExecutionCancelRequestedEventAttributes { - s.WorkflowExecution = v - return s -} - -// Provides the details of the ExternalWorkflowExecutionSignaled event. -type ExternalWorkflowExecutionSignaledEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the SignalExternalWorkflowExecutionInitiated event corresponding - // to the SignalExternalWorkflowExecution decision to request this signal. This - // information can be useful for diagnosing problems by tracing back the chain - // of events leading up to this event. - // - // InitiatedEventId is a required field - InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` - - // The external workflow execution that the signal was delivered to. - // - // WorkflowExecution is a required field - WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` -} - -// String returns the string representation -func (s ExternalWorkflowExecutionSignaledEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExternalWorkflowExecutionSignaledEventAttributes) GoString() string { - return s.String() -} - -// SetInitiatedEventId sets the InitiatedEventId field's value. -func (s *ExternalWorkflowExecutionSignaledEventAttributes) SetInitiatedEventId(v int64) *ExternalWorkflowExecutionSignaledEventAttributes { - s.InitiatedEventId = &v - return s -} - -// SetWorkflowExecution sets the WorkflowExecution field's value. -func (s *ExternalWorkflowExecutionSignaledEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ExternalWorkflowExecutionSignaledEventAttributes { - s.WorkflowExecution = v - return s -} - -// Provides the details of the FailWorkflowExecution decision. -// -// Access Control -// -// You can use IAM policies to control this decision's access to Amazon SWF -// resources as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -type FailWorkflowExecutionDecisionAttributes struct { - _ struct{} `type:"structure"` - - // Details of the failure. - Details *string `locationName:"details" type:"string"` - - // A descriptive reason for the failure that may help in diagnostics. - Reason *string `locationName:"reason" type:"string"` -} - -// String returns the string representation -func (s FailWorkflowExecutionDecisionAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailWorkflowExecutionDecisionAttributes) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *FailWorkflowExecutionDecisionAttributes) SetDetails(v string) *FailWorkflowExecutionDecisionAttributes { - s.Details = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *FailWorkflowExecutionDecisionAttributes) SetReason(v string) *FailWorkflowExecutionDecisionAttributes { - s.Reason = &v - return s -} - -// Provides the details of the FailWorkflowExecutionFailed event. -type FailWorkflowExecutionFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The cause of the failure. This information is generated by the system and - // can be useful for diagnostic purposes. - // - // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it - // lacked sufficient permissions. For details and example IAM policies, see - // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) - // in the Amazon SWF Developer Guide. - // - // Cause is a required field - Cause *string `locationName:"cause" type:"string" required:"true" enum:"FailWorkflowExecutionFailedCause"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the FailWorkflowExecution decision to fail this execution. - // This information can be useful for diagnosing problems by tracing back the - // chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s FailWorkflowExecutionFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailWorkflowExecutionFailedEventAttributes) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *FailWorkflowExecutionFailedEventAttributes) SetCause(v string) *FailWorkflowExecutionFailedEventAttributes { - s.Cause = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *FailWorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *FailWorkflowExecutionFailedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -type GetWorkflowExecutionHistoryInput struct { - _ struct{} `type:"structure"` - - // The name of the domain containing the workflow execution. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // Specifies the workflow execution for which to return the history. - // - // Execution is a required field - Execution *WorkflowExecution `locationName:"execution" type:"structure" required:"true"` - - // The maximum number of results that are returned per call. nextPageToken can - // be used to obtain futher pages of results. The default is 1000, which is - // the maximum allowed page size. You can, however, specify a page size smaller - // than the maximum. - // - // This is an upper limit only; the actual number of results returned per call - // may be fewer than the specified maximum. - MaximumPageSize *int64 `locationName:"maximumPageSize" type:"integer"` - - // If a NextPageToken was returned by a previous call, there are more results - // available. To retrieve the next page of results, make the call again using - // the returned token in nextPageToken. Keep all other arguments unchanged. - // - // The configured maximumPageSize determines how many results can be returned - // in a single call. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // When set to true, returns the events in reverse order. By default the results - // are returned in ascending order of the eventTimeStamp of the events. - ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` -} - -// String returns the string representation -func (s GetWorkflowExecutionHistoryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetWorkflowExecutionHistoryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetWorkflowExecutionHistoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetWorkflowExecutionHistoryInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.Execution == nil { - invalidParams.Add(request.NewErrParamRequired("Execution")) - } - if s.Execution != nil { - if err := s.Execution.Validate(); err != nil { - invalidParams.AddNested("Execution", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *GetWorkflowExecutionHistoryInput) SetDomain(v string) *GetWorkflowExecutionHistoryInput { - s.Domain = &v - return s -} - -// SetExecution sets the Execution field's value. -func (s *GetWorkflowExecutionHistoryInput) SetExecution(v *WorkflowExecution) *GetWorkflowExecutionHistoryInput { - s.Execution = v - return s -} - -// SetMaximumPageSize sets the MaximumPageSize field's value. -func (s *GetWorkflowExecutionHistoryInput) SetMaximumPageSize(v int64) *GetWorkflowExecutionHistoryInput { - s.MaximumPageSize = &v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetWorkflowExecutionHistoryInput) SetNextPageToken(v string) *GetWorkflowExecutionHistoryInput { - s.NextPageToken = &v - return s -} - -// SetReverseOrder sets the ReverseOrder field's value. -func (s *GetWorkflowExecutionHistoryInput) SetReverseOrder(v bool) *GetWorkflowExecutionHistoryInput { - s.ReverseOrder = &v - return s -} - -// Paginated representation of a workflow history for a workflow execution. -// This is the up to date, complete and authoritative record of the events related -// to all tasks and events in the life of the workflow execution. -type GetWorkflowExecutionHistoryOutput struct { - _ struct{} `type:"structure"` - - // The list of history events. - // - // Events is a required field - Events []*HistoryEvent `locationName:"events" type:"list" required:"true"` - - // If a NextPageToken was returned by a previous call, there are more results - // available. To retrieve the next page of results, make the call again using - // the returned token in nextPageToken. Keep all other arguments unchanged. - // - // The configured maximumPageSize determines how many results can be returned - // in a single call. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s GetWorkflowExecutionHistoryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetWorkflowExecutionHistoryOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *GetWorkflowExecutionHistoryOutput) SetEvents(v []*HistoryEvent) *GetWorkflowExecutionHistoryOutput { - s.Events = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetWorkflowExecutionHistoryOutput) SetNextPageToken(v string) *GetWorkflowExecutionHistoryOutput { - s.NextPageToken = &v - return s -} - -// Event within a workflow execution. A history event can be one of these types: -// -// * ActivityTaskCancelRequested – A RequestCancelActivityTask decision was -// received by the system. -// -// * ActivityTaskCanceled – The activity task was successfully canceled. -// -// * ActivityTaskCompleted – An activity worker successfully completed an -// activity task by calling RespondActivityTaskCompleted. -// -// * ActivityTaskFailed – An activity worker failed an activity task by calling -// RespondActivityTaskFailed. -// -// * ActivityTaskScheduled – An activity task was scheduled for execution. -// -// * ActivityTaskStarted – The scheduled activity task was dispatched to -// a worker. -// -// * ActivityTaskTimedOut – The activity task timed out. -// -// * CancelTimerFailed – Failed to process CancelTimer decision. This happens -// when the decision isn't configured properly, for example no timer exists -// with the specified timer Id. -// -// * CancelWorkflowExecutionFailed – A request to cancel a workflow execution -// failed. -// -// * ChildWorkflowExecutionCanceled – A child workflow execution, started -// by this workflow execution, was canceled and closed. -// -// * ChildWorkflowExecutionCompleted – A child workflow execution, started -// by this workflow execution, completed successfully and was closed. -// -// * ChildWorkflowExecutionFailed – A child workflow execution, started by -// this workflow execution, failed to complete successfully and was closed. -// -// * ChildWorkflowExecutionStarted – A child workflow execution was successfully -// started. -// -// * ChildWorkflowExecutionTerminated – A child workflow execution, started -// by this workflow execution, was terminated. -// -// * ChildWorkflowExecutionTimedOut – A child workflow execution, started -// by this workflow execution, timed out and was closed. -// -// * CompleteWorkflowExecutionFailed – The workflow execution failed to complete. -// -// * ContinueAsNewWorkflowExecutionFailed – The workflow execution failed -// to complete after being continued as a new workflow execution. -// -// * DecisionTaskCompleted – The decider successfully completed a decision -// task by calling RespondDecisionTaskCompleted. -// -// * DecisionTaskScheduled – A decision task was scheduled for the workflow -// execution. -// -// * DecisionTaskStarted – The decision task was dispatched to a decider. -// -// * DecisionTaskTimedOut – The decision task timed out. -// -// * ExternalWorkflowExecutionCancelRequested – Request to cancel an external -// workflow execution was successfully delivered to the target execution. -// -// * ExternalWorkflowExecutionSignaled – A signal, requested by this workflow -// execution, was successfully delivered to the target external workflow -// execution. -// -// * FailWorkflowExecutionFailed – A request to mark a workflow execution -// as failed, itself failed. -// -// * MarkerRecorded – A marker was recorded in the workflow history as the -// result of a RecordMarker decision. -// -// * RecordMarkerFailed – A RecordMarker decision was returned as failed. -// -// * RequestCancelActivityTaskFailed – Failed to process RequestCancelActivityTask -// decision. This happens when the decision isn't configured properly. -// -// * RequestCancelExternalWorkflowExecutionFailed – Request to cancel an -// external workflow execution failed. -// -// * RequestCancelExternalWorkflowExecutionInitiated – A request was made -// to request the cancellation of an external workflow execution. -// -// * ScheduleActivityTaskFailed – Failed to process ScheduleActivityTask -// decision. This happens when the decision isn't configured properly, for -// example the activity type specified isn't registered. -// -// * SignalExternalWorkflowExecutionFailed – The request to signal an external -// workflow execution failed. -// -// * SignalExternalWorkflowExecutionInitiated – A request to signal an external -// workflow was made. -// -// * StartActivityTaskFailed – A scheduled activity task failed to start. -// -// * StartChildWorkflowExecutionFailed – Failed to process StartChildWorkflowExecution -// decision. This happens when the decision isn't configured properly, for -// example the workflow type specified isn't registered. -// -// * StartChildWorkflowExecutionInitiated – A request was made to start a -// child workflow execution. -// -// * StartTimerFailed – Failed to process StartTimer decision. This happens -// when the decision isn't configured properly, for example a timer already -// exists with the specified timer Id. -// -// * TimerCanceled – A timer, previously started for this workflow execution, -// was successfully canceled. -// -// * TimerFired – A timer, previously started for this workflow execution, -// fired. -// -// * TimerStarted – A timer was started for the workflow execution due to -// a StartTimer decision. -// -// * WorkflowExecutionCancelRequested – A request to cancel this workflow -// execution was made. -// -// * WorkflowExecutionCanceled – The workflow execution was successfully -// canceled and closed. -// -// * WorkflowExecutionCompleted – The workflow execution was closed due to -// successful completion. -// -// * WorkflowExecutionContinuedAsNew – The workflow execution was closed -// and a new execution of the same type was created with the same workflowId. -// -// * WorkflowExecutionFailed – The workflow execution closed due to a failure. -// -// * WorkflowExecutionSignaled – An external signal was received for the -// workflow execution. -// -// * WorkflowExecutionStarted – The workflow execution was started. -// -// * WorkflowExecutionTerminated – The workflow execution was terminated. -// -// * WorkflowExecutionTimedOut – The workflow execution was closed because -// a time out was exceeded. -type HistoryEvent struct { - _ struct{} `type:"structure"` - - // If the event is of type ActivityTaskcancelRequested then this member is set - // and provides detailed information about the event. It isn't set for other - // event types. - ActivityTaskCancelRequestedEventAttributes *ActivityTaskCancelRequestedEventAttributes `locationName:"activityTaskCancelRequestedEventAttributes" type:"structure"` - - // If the event is of type ActivityTaskCanceled then this member is set and - // provides detailed information about the event. It isn't set for other event - // types. - ActivityTaskCanceledEventAttributes *ActivityTaskCanceledEventAttributes `locationName:"activityTaskCanceledEventAttributes" type:"structure"` - - // If the event is of type ActivityTaskCompleted then this member is set and - // provides detailed information about the event. It isn't set for other event - // types. - ActivityTaskCompletedEventAttributes *ActivityTaskCompletedEventAttributes `locationName:"activityTaskCompletedEventAttributes" type:"structure"` - - // If the event is of type ActivityTaskFailed then this member is set and provides - // detailed information about the event. It isn't set for other event types. - ActivityTaskFailedEventAttributes *ActivityTaskFailedEventAttributes `locationName:"activityTaskFailedEventAttributes" type:"structure"` - - // If the event is of type ActivityTaskScheduled then this member is set and - // provides detailed information about the event. It isn't set for other event - // types. - ActivityTaskScheduledEventAttributes *ActivityTaskScheduledEventAttributes `locationName:"activityTaskScheduledEventAttributes" type:"structure"` - - // If the event is of type ActivityTaskStarted then this member is set and provides - // detailed information about the event. It isn't set for other event types. - ActivityTaskStartedEventAttributes *ActivityTaskStartedEventAttributes `locationName:"activityTaskStartedEventAttributes" type:"structure"` - - // If the event is of type ActivityTaskTimedOut then this member is set and - // provides detailed information about the event. It isn't set for other event - // types. - ActivityTaskTimedOutEventAttributes *ActivityTaskTimedOutEventAttributes `locationName:"activityTaskTimedOutEventAttributes" type:"structure"` - - // If the event is of type CancelTimerFailed then this member is set and provides - // detailed information about the event. It isn't set for other event types. - CancelTimerFailedEventAttributes *CancelTimerFailedEventAttributes `locationName:"cancelTimerFailedEventAttributes" type:"structure"` - - // If the event is of type CancelWorkflowExecutionFailed then this member is - // set and provides detailed information about the event. It isn't set for other - // event types. - CancelWorkflowExecutionFailedEventAttributes *CancelWorkflowExecutionFailedEventAttributes `locationName:"cancelWorkflowExecutionFailedEventAttributes" type:"structure"` - - // If the event is of type ChildWorkflowExecutionCanceled then this member is - // set and provides detailed information about the event. It isn't set for other - // event types. - ChildWorkflowExecutionCanceledEventAttributes *ChildWorkflowExecutionCanceledEventAttributes `locationName:"childWorkflowExecutionCanceledEventAttributes" type:"structure"` - - // If the event is of type ChildWorkflowExecutionCompleted then this member - // is set and provides detailed information about the event. It isn't set for - // other event types. - ChildWorkflowExecutionCompletedEventAttributes *ChildWorkflowExecutionCompletedEventAttributes `locationName:"childWorkflowExecutionCompletedEventAttributes" type:"structure"` - - // If the event is of type ChildWorkflowExecutionFailed then this member is - // set and provides detailed information about the event. It isn't set for other - // event types. - ChildWorkflowExecutionFailedEventAttributes *ChildWorkflowExecutionFailedEventAttributes `locationName:"childWorkflowExecutionFailedEventAttributes" type:"structure"` - - // If the event is of type ChildWorkflowExecutionStarted then this member is - // set and provides detailed information about the event. It isn't set for other - // event types. - ChildWorkflowExecutionStartedEventAttributes *ChildWorkflowExecutionStartedEventAttributes `locationName:"childWorkflowExecutionStartedEventAttributes" type:"structure"` - - // If the event is of type ChildWorkflowExecutionTerminated then this member - // is set and provides detailed information about the event. It isn't set for - // other event types. - ChildWorkflowExecutionTerminatedEventAttributes *ChildWorkflowExecutionTerminatedEventAttributes `locationName:"childWorkflowExecutionTerminatedEventAttributes" type:"structure"` - - // If the event is of type ChildWorkflowExecutionTimedOut then this member is - // set and provides detailed information about the event. It isn't set for other - // event types. - ChildWorkflowExecutionTimedOutEventAttributes *ChildWorkflowExecutionTimedOutEventAttributes `locationName:"childWorkflowExecutionTimedOutEventAttributes" type:"structure"` - - // If the event is of type CompleteWorkflowExecutionFailed then this member - // is set and provides detailed information about the event. It isn't set for - // other event types. - CompleteWorkflowExecutionFailedEventAttributes *CompleteWorkflowExecutionFailedEventAttributes `locationName:"completeWorkflowExecutionFailedEventAttributes" type:"structure"` - - // If the event is of type ContinueAsNewWorkflowExecutionFailed then this member - // is set and provides detailed information about the event. It isn't set for - // other event types. - ContinueAsNewWorkflowExecutionFailedEventAttributes *ContinueAsNewWorkflowExecutionFailedEventAttributes `locationName:"continueAsNewWorkflowExecutionFailedEventAttributes" type:"structure"` - - // If the event is of type DecisionTaskCompleted then this member is set and - // provides detailed information about the event. It isn't set for other event - // types. - DecisionTaskCompletedEventAttributes *DecisionTaskCompletedEventAttributes `locationName:"decisionTaskCompletedEventAttributes" type:"structure"` - - // If the event is of type DecisionTaskScheduled then this member is set and - // provides detailed information about the event. It isn't set for other event - // types. - DecisionTaskScheduledEventAttributes *DecisionTaskScheduledEventAttributes `locationName:"decisionTaskScheduledEventAttributes" type:"structure"` - - // If the event is of type DecisionTaskStarted then this member is set and provides - // detailed information about the event. It isn't set for other event types. - DecisionTaskStartedEventAttributes *DecisionTaskStartedEventAttributes `locationName:"decisionTaskStartedEventAttributes" type:"structure"` - - // If the event is of type DecisionTaskTimedOut then this member is set and - // provides detailed information about the event. It isn't set for other event - // types. - DecisionTaskTimedOutEventAttributes *DecisionTaskTimedOutEventAttributes `locationName:"decisionTaskTimedOutEventAttributes" type:"structure"` - - // The system generated ID of the event. This ID uniquely identifies the event - // with in the workflow execution history. - // - // EventId is a required field - EventId *int64 `locationName:"eventId" type:"long" required:"true"` - - // The date and time when the event occurred. - // - // EventTimestamp is a required field - EventTimestamp *time.Time `locationName:"eventTimestamp" type:"timestamp" required:"true"` - - // The type of the history event. - // - // EventType is a required field - EventType *string `locationName:"eventType" type:"string" required:"true" enum:"EventType"` - - // If the event is of type ExternalWorkflowExecutionCancelRequested then this - // member is set and provides detailed information about the event. It isn't - // set for other event types. - ExternalWorkflowExecutionCancelRequestedEventAttributes *ExternalWorkflowExecutionCancelRequestedEventAttributes `locationName:"externalWorkflowExecutionCancelRequestedEventAttributes" type:"structure"` - - // If the event is of type ExternalWorkflowExecutionSignaled then this member - // is set and provides detailed information about the event. It isn't set for - // other event types. - ExternalWorkflowExecutionSignaledEventAttributes *ExternalWorkflowExecutionSignaledEventAttributes `locationName:"externalWorkflowExecutionSignaledEventAttributes" type:"structure"` - - // If the event is of type FailWorkflowExecutionFailed then this member is set - // and provides detailed information about the event. It isn't set for other - // event types. - FailWorkflowExecutionFailedEventAttributes *FailWorkflowExecutionFailedEventAttributes `locationName:"failWorkflowExecutionFailedEventAttributes" type:"structure"` - - // Provides the details of the LambdaFunctionCompleted event. It isn't set for - // other event types. - LambdaFunctionCompletedEventAttributes *LambdaFunctionCompletedEventAttributes `locationName:"lambdaFunctionCompletedEventAttributes" type:"structure"` - - // Provides the details of the LambdaFunctionFailed event. It isn't set for - // other event types. - LambdaFunctionFailedEventAttributes *LambdaFunctionFailedEventAttributes `locationName:"lambdaFunctionFailedEventAttributes" type:"structure"` - - // Provides the details of the LambdaFunctionScheduled event. It isn't set for - // other event types. - LambdaFunctionScheduledEventAttributes *LambdaFunctionScheduledEventAttributes `locationName:"lambdaFunctionScheduledEventAttributes" type:"structure"` - - // Provides the details of the LambdaFunctionStarted event. It isn't set for - // other event types. - LambdaFunctionStartedEventAttributes *LambdaFunctionStartedEventAttributes `locationName:"lambdaFunctionStartedEventAttributes" type:"structure"` - - // Provides the details of the LambdaFunctionTimedOut event. It isn't set for - // other event types. - LambdaFunctionTimedOutEventAttributes *LambdaFunctionTimedOutEventAttributes `locationName:"lambdaFunctionTimedOutEventAttributes" type:"structure"` - - // If the event is of type MarkerRecorded then this member is set and provides - // detailed information about the event. It isn't set for other event types. - MarkerRecordedEventAttributes *MarkerRecordedEventAttributes `locationName:"markerRecordedEventAttributes" type:"structure"` - - // If the event is of type DecisionTaskFailed then this member is set and provides - // detailed information about the event. It isn't set for other event types. - RecordMarkerFailedEventAttributes *RecordMarkerFailedEventAttributes `locationName:"recordMarkerFailedEventAttributes" type:"structure"` - - // If the event is of type RequestCancelActivityTaskFailed then this member - // is set and provides detailed information about the event. It isn't set for - // other event types. - RequestCancelActivityTaskFailedEventAttributes *RequestCancelActivityTaskFailedEventAttributes `locationName:"requestCancelActivityTaskFailedEventAttributes" type:"structure"` - - // If the event is of type RequestCancelExternalWorkflowExecutionFailed then - // this member is set and provides detailed information about the event. It - // isn't set for other event types. - RequestCancelExternalWorkflowExecutionFailedEventAttributes *RequestCancelExternalWorkflowExecutionFailedEventAttributes `locationName:"requestCancelExternalWorkflowExecutionFailedEventAttributes" type:"structure"` - - // If the event is of type RequestCancelExternalWorkflowExecutionInitiated then - // this member is set and provides detailed information about the event. It - // isn't set for other event types. - RequestCancelExternalWorkflowExecutionInitiatedEventAttributes *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes `locationName:"requestCancelExternalWorkflowExecutionInitiatedEventAttributes" type:"structure"` - - // If the event is of type ScheduleActivityTaskFailed then this member is set - // and provides detailed information about the event. It isn't set for other - // event types. - ScheduleActivityTaskFailedEventAttributes *ScheduleActivityTaskFailedEventAttributes `locationName:"scheduleActivityTaskFailedEventAttributes" type:"structure"` - - // Provides the details of the ScheduleLambdaFunctionFailed event. It isn't - // set for other event types. - ScheduleLambdaFunctionFailedEventAttributes *ScheduleLambdaFunctionFailedEventAttributes `locationName:"scheduleLambdaFunctionFailedEventAttributes" type:"structure"` - - // If the event is of type SignalExternalWorkflowExecutionFailed then this member - // is set and provides detailed information about the event. It isn't set for - // other event types. - SignalExternalWorkflowExecutionFailedEventAttributes *SignalExternalWorkflowExecutionFailedEventAttributes `locationName:"signalExternalWorkflowExecutionFailedEventAttributes" type:"structure"` - - // If the event is of type SignalExternalWorkflowExecutionInitiated then this - // member is set and provides detailed information about the event. It isn't - // set for other event types. - SignalExternalWorkflowExecutionInitiatedEventAttributes *SignalExternalWorkflowExecutionInitiatedEventAttributes `locationName:"signalExternalWorkflowExecutionInitiatedEventAttributes" type:"structure"` - - // If the event is of type StartChildWorkflowExecutionFailed then this member - // is set and provides detailed information about the event. It isn't set for - // other event types. - StartChildWorkflowExecutionFailedEventAttributes *StartChildWorkflowExecutionFailedEventAttributes `locationName:"startChildWorkflowExecutionFailedEventAttributes" type:"structure"` - - // If the event is of type StartChildWorkflowExecutionInitiated then this member - // is set and provides detailed information about the event. It isn't set for - // other event types. - StartChildWorkflowExecutionInitiatedEventAttributes *StartChildWorkflowExecutionInitiatedEventAttributes `locationName:"startChildWorkflowExecutionInitiatedEventAttributes" type:"structure"` - - // Provides the details of the StartLambdaFunctionFailed event. It isn't set - // for other event types. - StartLambdaFunctionFailedEventAttributes *StartLambdaFunctionFailedEventAttributes `locationName:"startLambdaFunctionFailedEventAttributes" type:"structure"` - - // If the event is of type StartTimerFailed then this member is set and provides - // detailed information about the event. It isn't set for other event types. - StartTimerFailedEventAttributes *StartTimerFailedEventAttributes `locationName:"startTimerFailedEventAttributes" type:"structure"` - - // If the event is of type TimerCanceled then this member is set and provides - // detailed information about the event. It isn't set for other event types. - TimerCanceledEventAttributes *TimerCanceledEventAttributes `locationName:"timerCanceledEventAttributes" type:"structure"` - - // If the event is of type TimerFired then this member is set and provides detailed - // information about the event. It isn't set for other event types. - TimerFiredEventAttributes *TimerFiredEventAttributes `locationName:"timerFiredEventAttributes" type:"structure"` - - // If the event is of type TimerStarted then this member is set and provides - // detailed information about the event. It isn't set for other event types. - TimerStartedEventAttributes *TimerStartedEventAttributes `locationName:"timerStartedEventAttributes" type:"structure"` - - // If the event is of type WorkflowExecutionCancelRequested then this member - // is set and provides detailed information about the event. It isn't set for - // other event types. - WorkflowExecutionCancelRequestedEventAttributes *WorkflowExecutionCancelRequestedEventAttributes `locationName:"workflowExecutionCancelRequestedEventAttributes" type:"structure"` - - // If the event is of type WorkflowExecutionCanceled then this member is set - // and provides detailed information about the event. It isn't set for other - // event types. - WorkflowExecutionCanceledEventAttributes *WorkflowExecutionCanceledEventAttributes `locationName:"workflowExecutionCanceledEventAttributes" type:"structure"` - - // If the event is of type WorkflowExecutionCompleted then this member is set - // and provides detailed information about the event. It isn't set for other - // event types. - WorkflowExecutionCompletedEventAttributes *WorkflowExecutionCompletedEventAttributes `locationName:"workflowExecutionCompletedEventAttributes" type:"structure"` - - // If the event is of type WorkflowExecutionContinuedAsNew then this member - // is set and provides detailed information about the event. It isn't set for - // other event types. - WorkflowExecutionContinuedAsNewEventAttributes *WorkflowExecutionContinuedAsNewEventAttributes `locationName:"workflowExecutionContinuedAsNewEventAttributes" type:"structure"` - - // If the event is of type WorkflowExecutionFailed then this member is set and - // provides detailed information about the event. It isn't set for other event - // types. - WorkflowExecutionFailedEventAttributes *WorkflowExecutionFailedEventAttributes `locationName:"workflowExecutionFailedEventAttributes" type:"structure"` - - // If the event is of type WorkflowExecutionSignaled then this member is set - // and provides detailed information about the event. It isn't set for other - // event types. - WorkflowExecutionSignaledEventAttributes *WorkflowExecutionSignaledEventAttributes `locationName:"workflowExecutionSignaledEventAttributes" type:"structure"` - - // If the event is of type WorkflowExecutionStarted then this member is set - // and provides detailed information about the event. It isn't set for other - // event types. - WorkflowExecutionStartedEventAttributes *WorkflowExecutionStartedEventAttributes `locationName:"workflowExecutionStartedEventAttributes" type:"structure"` - - // If the event is of type WorkflowExecutionTerminated then this member is set - // and provides detailed information about the event. It isn't set for other - // event types. - WorkflowExecutionTerminatedEventAttributes *WorkflowExecutionTerminatedEventAttributes `locationName:"workflowExecutionTerminatedEventAttributes" type:"structure"` - - // If the event is of type WorkflowExecutionTimedOut then this member is set - // and provides detailed information about the event. It isn't set for other - // event types. - WorkflowExecutionTimedOutEventAttributes *WorkflowExecutionTimedOutEventAttributes `locationName:"workflowExecutionTimedOutEventAttributes" type:"structure"` -} - -// String returns the string representation -func (s HistoryEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HistoryEvent) GoString() string { - return s.String() -} - -// SetActivityTaskCancelRequestedEventAttributes sets the ActivityTaskCancelRequestedEventAttributes field's value. -func (s *HistoryEvent) SetActivityTaskCancelRequestedEventAttributes(v *ActivityTaskCancelRequestedEventAttributes) *HistoryEvent { - s.ActivityTaskCancelRequestedEventAttributes = v - return s -} - -// SetActivityTaskCanceledEventAttributes sets the ActivityTaskCanceledEventAttributes field's value. -func (s *HistoryEvent) SetActivityTaskCanceledEventAttributes(v *ActivityTaskCanceledEventAttributes) *HistoryEvent { - s.ActivityTaskCanceledEventAttributes = v - return s -} - -// SetActivityTaskCompletedEventAttributes sets the ActivityTaskCompletedEventAttributes field's value. -func (s *HistoryEvent) SetActivityTaskCompletedEventAttributes(v *ActivityTaskCompletedEventAttributes) *HistoryEvent { - s.ActivityTaskCompletedEventAttributes = v - return s -} - -// SetActivityTaskFailedEventAttributes sets the ActivityTaskFailedEventAttributes field's value. -func (s *HistoryEvent) SetActivityTaskFailedEventAttributes(v *ActivityTaskFailedEventAttributes) *HistoryEvent { - s.ActivityTaskFailedEventAttributes = v - return s -} - -// SetActivityTaskScheduledEventAttributes sets the ActivityTaskScheduledEventAttributes field's value. -func (s *HistoryEvent) SetActivityTaskScheduledEventAttributes(v *ActivityTaskScheduledEventAttributes) *HistoryEvent { - s.ActivityTaskScheduledEventAttributes = v - return s -} - -// SetActivityTaskStartedEventAttributes sets the ActivityTaskStartedEventAttributes field's value. -func (s *HistoryEvent) SetActivityTaskStartedEventAttributes(v *ActivityTaskStartedEventAttributes) *HistoryEvent { - s.ActivityTaskStartedEventAttributes = v - return s -} - -// SetActivityTaskTimedOutEventAttributes sets the ActivityTaskTimedOutEventAttributes field's value. -func (s *HistoryEvent) SetActivityTaskTimedOutEventAttributes(v *ActivityTaskTimedOutEventAttributes) *HistoryEvent { - s.ActivityTaskTimedOutEventAttributes = v - return s -} - -// SetCancelTimerFailedEventAttributes sets the CancelTimerFailedEventAttributes field's value. -func (s *HistoryEvent) SetCancelTimerFailedEventAttributes(v *CancelTimerFailedEventAttributes) *HistoryEvent { - s.CancelTimerFailedEventAttributes = v - return s -} - -// SetCancelWorkflowExecutionFailedEventAttributes sets the CancelWorkflowExecutionFailedEventAttributes field's value. -func (s *HistoryEvent) SetCancelWorkflowExecutionFailedEventAttributes(v *CancelWorkflowExecutionFailedEventAttributes) *HistoryEvent { - s.CancelWorkflowExecutionFailedEventAttributes = v - return s -} - -// SetChildWorkflowExecutionCanceledEventAttributes sets the ChildWorkflowExecutionCanceledEventAttributes field's value. -func (s *HistoryEvent) SetChildWorkflowExecutionCanceledEventAttributes(v *ChildWorkflowExecutionCanceledEventAttributes) *HistoryEvent { - s.ChildWorkflowExecutionCanceledEventAttributes = v - return s -} - -// SetChildWorkflowExecutionCompletedEventAttributes sets the ChildWorkflowExecutionCompletedEventAttributes field's value. -func (s *HistoryEvent) SetChildWorkflowExecutionCompletedEventAttributes(v *ChildWorkflowExecutionCompletedEventAttributes) *HistoryEvent { - s.ChildWorkflowExecutionCompletedEventAttributes = v - return s -} - -// SetChildWorkflowExecutionFailedEventAttributes sets the ChildWorkflowExecutionFailedEventAttributes field's value. -func (s *HistoryEvent) SetChildWorkflowExecutionFailedEventAttributes(v *ChildWorkflowExecutionFailedEventAttributes) *HistoryEvent { - s.ChildWorkflowExecutionFailedEventAttributes = v - return s -} - -// SetChildWorkflowExecutionStartedEventAttributes sets the ChildWorkflowExecutionStartedEventAttributes field's value. -func (s *HistoryEvent) SetChildWorkflowExecutionStartedEventAttributes(v *ChildWorkflowExecutionStartedEventAttributes) *HistoryEvent { - s.ChildWorkflowExecutionStartedEventAttributes = v - return s -} - -// SetChildWorkflowExecutionTerminatedEventAttributes sets the ChildWorkflowExecutionTerminatedEventAttributes field's value. -func (s *HistoryEvent) SetChildWorkflowExecutionTerminatedEventAttributes(v *ChildWorkflowExecutionTerminatedEventAttributes) *HistoryEvent { - s.ChildWorkflowExecutionTerminatedEventAttributes = v - return s -} - -// SetChildWorkflowExecutionTimedOutEventAttributes sets the ChildWorkflowExecutionTimedOutEventAttributes field's value. -func (s *HistoryEvent) SetChildWorkflowExecutionTimedOutEventAttributes(v *ChildWorkflowExecutionTimedOutEventAttributes) *HistoryEvent { - s.ChildWorkflowExecutionTimedOutEventAttributes = v - return s -} - -// SetCompleteWorkflowExecutionFailedEventAttributes sets the CompleteWorkflowExecutionFailedEventAttributes field's value. -func (s *HistoryEvent) SetCompleteWorkflowExecutionFailedEventAttributes(v *CompleteWorkflowExecutionFailedEventAttributes) *HistoryEvent { - s.CompleteWorkflowExecutionFailedEventAttributes = v - return s -} - -// SetContinueAsNewWorkflowExecutionFailedEventAttributes sets the ContinueAsNewWorkflowExecutionFailedEventAttributes field's value. -func (s *HistoryEvent) SetContinueAsNewWorkflowExecutionFailedEventAttributes(v *ContinueAsNewWorkflowExecutionFailedEventAttributes) *HistoryEvent { - s.ContinueAsNewWorkflowExecutionFailedEventAttributes = v - return s -} - -// SetDecisionTaskCompletedEventAttributes sets the DecisionTaskCompletedEventAttributes field's value. -func (s *HistoryEvent) SetDecisionTaskCompletedEventAttributes(v *DecisionTaskCompletedEventAttributes) *HistoryEvent { - s.DecisionTaskCompletedEventAttributes = v - return s -} - -// SetDecisionTaskScheduledEventAttributes sets the DecisionTaskScheduledEventAttributes field's value. -func (s *HistoryEvent) SetDecisionTaskScheduledEventAttributes(v *DecisionTaskScheduledEventAttributes) *HistoryEvent { - s.DecisionTaskScheduledEventAttributes = v - return s -} - -// SetDecisionTaskStartedEventAttributes sets the DecisionTaskStartedEventAttributes field's value. -func (s *HistoryEvent) SetDecisionTaskStartedEventAttributes(v *DecisionTaskStartedEventAttributes) *HistoryEvent { - s.DecisionTaskStartedEventAttributes = v - return s -} - -// SetDecisionTaskTimedOutEventAttributes sets the DecisionTaskTimedOutEventAttributes field's value. -func (s *HistoryEvent) SetDecisionTaskTimedOutEventAttributes(v *DecisionTaskTimedOutEventAttributes) *HistoryEvent { - s.DecisionTaskTimedOutEventAttributes = v - return s -} - -// SetEventId sets the EventId field's value. -func (s *HistoryEvent) SetEventId(v int64) *HistoryEvent { - s.EventId = &v - return s -} - -// SetEventTimestamp sets the EventTimestamp field's value. -func (s *HistoryEvent) SetEventTimestamp(v time.Time) *HistoryEvent { - s.EventTimestamp = &v - return s -} - -// SetEventType sets the EventType field's value. -func (s *HistoryEvent) SetEventType(v string) *HistoryEvent { - s.EventType = &v - return s -} - -// SetExternalWorkflowExecutionCancelRequestedEventAttributes sets the ExternalWorkflowExecutionCancelRequestedEventAttributes field's value. -func (s *HistoryEvent) SetExternalWorkflowExecutionCancelRequestedEventAttributes(v *ExternalWorkflowExecutionCancelRequestedEventAttributes) *HistoryEvent { - s.ExternalWorkflowExecutionCancelRequestedEventAttributes = v - return s -} - -// SetExternalWorkflowExecutionSignaledEventAttributes sets the ExternalWorkflowExecutionSignaledEventAttributes field's value. -func (s *HistoryEvent) SetExternalWorkflowExecutionSignaledEventAttributes(v *ExternalWorkflowExecutionSignaledEventAttributes) *HistoryEvent { - s.ExternalWorkflowExecutionSignaledEventAttributes = v - return s -} - -// SetFailWorkflowExecutionFailedEventAttributes sets the FailWorkflowExecutionFailedEventAttributes field's value. -func (s *HistoryEvent) SetFailWorkflowExecutionFailedEventAttributes(v *FailWorkflowExecutionFailedEventAttributes) *HistoryEvent { - s.FailWorkflowExecutionFailedEventAttributes = v - return s -} - -// SetLambdaFunctionCompletedEventAttributes sets the LambdaFunctionCompletedEventAttributes field's value. -func (s *HistoryEvent) SetLambdaFunctionCompletedEventAttributes(v *LambdaFunctionCompletedEventAttributes) *HistoryEvent { - s.LambdaFunctionCompletedEventAttributes = v - return s -} - -// SetLambdaFunctionFailedEventAttributes sets the LambdaFunctionFailedEventAttributes field's value. -func (s *HistoryEvent) SetLambdaFunctionFailedEventAttributes(v *LambdaFunctionFailedEventAttributes) *HistoryEvent { - s.LambdaFunctionFailedEventAttributes = v - return s -} - -// SetLambdaFunctionScheduledEventAttributes sets the LambdaFunctionScheduledEventAttributes field's value. -func (s *HistoryEvent) SetLambdaFunctionScheduledEventAttributes(v *LambdaFunctionScheduledEventAttributes) *HistoryEvent { - s.LambdaFunctionScheduledEventAttributes = v - return s -} - -// SetLambdaFunctionStartedEventAttributes sets the LambdaFunctionStartedEventAttributes field's value. -func (s *HistoryEvent) SetLambdaFunctionStartedEventAttributes(v *LambdaFunctionStartedEventAttributes) *HistoryEvent { - s.LambdaFunctionStartedEventAttributes = v - return s -} - -// SetLambdaFunctionTimedOutEventAttributes sets the LambdaFunctionTimedOutEventAttributes field's value. -func (s *HistoryEvent) SetLambdaFunctionTimedOutEventAttributes(v *LambdaFunctionTimedOutEventAttributes) *HistoryEvent { - s.LambdaFunctionTimedOutEventAttributes = v - return s -} - -// SetMarkerRecordedEventAttributes sets the MarkerRecordedEventAttributes field's value. -func (s *HistoryEvent) SetMarkerRecordedEventAttributes(v *MarkerRecordedEventAttributes) *HistoryEvent { - s.MarkerRecordedEventAttributes = v - return s -} - -// SetRecordMarkerFailedEventAttributes sets the RecordMarkerFailedEventAttributes field's value. -func (s *HistoryEvent) SetRecordMarkerFailedEventAttributes(v *RecordMarkerFailedEventAttributes) *HistoryEvent { - s.RecordMarkerFailedEventAttributes = v - return s -} - -// SetRequestCancelActivityTaskFailedEventAttributes sets the RequestCancelActivityTaskFailedEventAttributes field's value. -func (s *HistoryEvent) SetRequestCancelActivityTaskFailedEventAttributes(v *RequestCancelActivityTaskFailedEventAttributes) *HistoryEvent { - s.RequestCancelActivityTaskFailedEventAttributes = v - return s -} - -// SetRequestCancelExternalWorkflowExecutionFailedEventAttributes sets the RequestCancelExternalWorkflowExecutionFailedEventAttributes field's value. -func (s *HistoryEvent) SetRequestCancelExternalWorkflowExecutionFailedEventAttributes(v *RequestCancelExternalWorkflowExecutionFailedEventAttributes) *HistoryEvent { - s.RequestCancelExternalWorkflowExecutionFailedEventAttributes = v - return s -} - -// SetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes sets the RequestCancelExternalWorkflowExecutionInitiatedEventAttributes field's value. -func (s *HistoryEvent) SetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes(v *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) *HistoryEvent { - s.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes = v - return s -} - -// SetScheduleActivityTaskFailedEventAttributes sets the ScheduleActivityTaskFailedEventAttributes field's value. -func (s *HistoryEvent) SetScheduleActivityTaskFailedEventAttributes(v *ScheduleActivityTaskFailedEventAttributes) *HistoryEvent { - s.ScheduleActivityTaskFailedEventAttributes = v - return s -} - -// SetScheduleLambdaFunctionFailedEventAttributes sets the ScheduleLambdaFunctionFailedEventAttributes field's value. -func (s *HistoryEvent) SetScheduleLambdaFunctionFailedEventAttributes(v *ScheduleLambdaFunctionFailedEventAttributes) *HistoryEvent { - s.ScheduleLambdaFunctionFailedEventAttributes = v - return s -} - -// SetSignalExternalWorkflowExecutionFailedEventAttributes sets the SignalExternalWorkflowExecutionFailedEventAttributes field's value. -func (s *HistoryEvent) SetSignalExternalWorkflowExecutionFailedEventAttributes(v *SignalExternalWorkflowExecutionFailedEventAttributes) *HistoryEvent { - s.SignalExternalWorkflowExecutionFailedEventAttributes = v - return s -} - -// SetSignalExternalWorkflowExecutionInitiatedEventAttributes sets the SignalExternalWorkflowExecutionInitiatedEventAttributes field's value. -func (s *HistoryEvent) SetSignalExternalWorkflowExecutionInitiatedEventAttributes(v *SignalExternalWorkflowExecutionInitiatedEventAttributes) *HistoryEvent { - s.SignalExternalWorkflowExecutionInitiatedEventAttributes = v - return s -} - -// SetStartChildWorkflowExecutionFailedEventAttributes sets the StartChildWorkflowExecutionFailedEventAttributes field's value. -func (s *HistoryEvent) SetStartChildWorkflowExecutionFailedEventAttributes(v *StartChildWorkflowExecutionFailedEventAttributes) *HistoryEvent { - s.StartChildWorkflowExecutionFailedEventAttributes = v - return s -} - -// SetStartChildWorkflowExecutionInitiatedEventAttributes sets the StartChildWorkflowExecutionInitiatedEventAttributes field's value. -func (s *HistoryEvent) SetStartChildWorkflowExecutionInitiatedEventAttributes(v *StartChildWorkflowExecutionInitiatedEventAttributes) *HistoryEvent { - s.StartChildWorkflowExecutionInitiatedEventAttributes = v - return s -} - -// SetStartLambdaFunctionFailedEventAttributes sets the StartLambdaFunctionFailedEventAttributes field's value. -func (s *HistoryEvent) SetStartLambdaFunctionFailedEventAttributes(v *StartLambdaFunctionFailedEventAttributes) *HistoryEvent { - s.StartLambdaFunctionFailedEventAttributes = v - return s -} - -// SetStartTimerFailedEventAttributes sets the StartTimerFailedEventAttributes field's value. -func (s *HistoryEvent) SetStartTimerFailedEventAttributes(v *StartTimerFailedEventAttributes) *HistoryEvent { - s.StartTimerFailedEventAttributes = v - return s -} - -// SetTimerCanceledEventAttributes sets the TimerCanceledEventAttributes field's value. -func (s *HistoryEvent) SetTimerCanceledEventAttributes(v *TimerCanceledEventAttributes) *HistoryEvent { - s.TimerCanceledEventAttributes = v - return s -} - -// SetTimerFiredEventAttributes sets the TimerFiredEventAttributes field's value. -func (s *HistoryEvent) SetTimerFiredEventAttributes(v *TimerFiredEventAttributes) *HistoryEvent { - s.TimerFiredEventAttributes = v - return s -} - -// SetTimerStartedEventAttributes sets the TimerStartedEventAttributes field's value. -func (s *HistoryEvent) SetTimerStartedEventAttributes(v *TimerStartedEventAttributes) *HistoryEvent { - s.TimerStartedEventAttributes = v - return s -} - -// SetWorkflowExecutionCancelRequestedEventAttributes sets the WorkflowExecutionCancelRequestedEventAttributes field's value. -func (s *HistoryEvent) SetWorkflowExecutionCancelRequestedEventAttributes(v *WorkflowExecutionCancelRequestedEventAttributes) *HistoryEvent { - s.WorkflowExecutionCancelRequestedEventAttributes = v - return s -} - -// SetWorkflowExecutionCanceledEventAttributes sets the WorkflowExecutionCanceledEventAttributes field's value. -func (s *HistoryEvent) SetWorkflowExecutionCanceledEventAttributes(v *WorkflowExecutionCanceledEventAttributes) *HistoryEvent { - s.WorkflowExecutionCanceledEventAttributes = v - return s -} - -// SetWorkflowExecutionCompletedEventAttributes sets the WorkflowExecutionCompletedEventAttributes field's value. -func (s *HistoryEvent) SetWorkflowExecutionCompletedEventAttributes(v *WorkflowExecutionCompletedEventAttributes) *HistoryEvent { - s.WorkflowExecutionCompletedEventAttributes = v - return s -} - -// SetWorkflowExecutionContinuedAsNewEventAttributes sets the WorkflowExecutionContinuedAsNewEventAttributes field's value. -func (s *HistoryEvent) SetWorkflowExecutionContinuedAsNewEventAttributes(v *WorkflowExecutionContinuedAsNewEventAttributes) *HistoryEvent { - s.WorkflowExecutionContinuedAsNewEventAttributes = v - return s -} - -// SetWorkflowExecutionFailedEventAttributes sets the WorkflowExecutionFailedEventAttributes field's value. -func (s *HistoryEvent) SetWorkflowExecutionFailedEventAttributes(v *WorkflowExecutionFailedEventAttributes) *HistoryEvent { - s.WorkflowExecutionFailedEventAttributes = v - return s -} - -// SetWorkflowExecutionSignaledEventAttributes sets the WorkflowExecutionSignaledEventAttributes field's value. -func (s *HistoryEvent) SetWorkflowExecutionSignaledEventAttributes(v *WorkflowExecutionSignaledEventAttributes) *HistoryEvent { - s.WorkflowExecutionSignaledEventAttributes = v - return s -} - -// SetWorkflowExecutionStartedEventAttributes sets the WorkflowExecutionStartedEventAttributes field's value. -func (s *HistoryEvent) SetWorkflowExecutionStartedEventAttributes(v *WorkflowExecutionStartedEventAttributes) *HistoryEvent { - s.WorkflowExecutionStartedEventAttributes = v - return s -} - -// SetWorkflowExecutionTerminatedEventAttributes sets the WorkflowExecutionTerminatedEventAttributes field's value. -func (s *HistoryEvent) SetWorkflowExecutionTerminatedEventAttributes(v *WorkflowExecutionTerminatedEventAttributes) *HistoryEvent { - s.WorkflowExecutionTerminatedEventAttributes = v - return s -} - -// SetWorkflowExecutionTimedOutEventAttributes sets the WorkflowExecutionTimedOutEventAttributes field's value. -func (s *HistoryEvent) SetWorkflowExecutionTimedOutEventAttributes(v *WorkflowExecutionTimedOutEventAttributes) *HistoryEvent { - s.WorkflowExecutionTimedOutEventAttributes = v - return s -} - -// Provides the details of the LambdaFunctionCompleted event. It isn't set for -// other event types. -type LambdaFunctionCompletedEventAttributes struct { - _ struct{} `type:"structure"` - - // The results of the Lambda task. - Result *string `locationName:"result" type:"string"` - - // The ID of the LambdaFunctionScheduled event that was recorded when this Lambda - // task was scheduled. To help diagnose issues, use this information to trace - // back the chain of events leading up to this event. - // - // ScheduledEventId is a required field - ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` - - // The ID of the LambdaFunctionStarted event recorded when this activity task - // started. To help diagnose issues, use this information to trace back the - // chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s LambdaFunctionCompletedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaFunctionCompletedEventAttributes) GoString() string { - return s.String() -} - -// SetResult sets the Result field's value. -func (s *LambdaFunctionCompletedEventAttributes) SetResult(v string) *LambdaFunctionCompletedEventAttributes { - s.Result = &v - return s -} - -// SetScheduledEventId sets the ScheduledEventId field's value. -func (s *LambdaFunctionCompletedEventAttributes) SetScheduledEventId(v int64) *LambdaFunctionCompletedEventAttributes { - s.ScheduledEventId = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *LambdaFunctionCompletedEventAttributes) SetStartedEventId(v int64) *LambdaFunctionCompletedEventAttributes { - s.StartedEventId = &v - return s -} - -// Provides the details of the LambdaFunctionFailed event. It isn't set for -// other event types. -type LambdaFunctionFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The details of the failure. - Details *string `locationName:"details" type:"string"` - - // The reason provided for the failure. - Reason *string `locationName:"reason" type:"string"` - - // The ID of the LambdaFunctionScheduled event that was recorded when this activity - // task was scheduled. To help diagnose issues, use this information to trace - // back the chain of events leading up to this event. - // - // ScheduledEventId is a required field - ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` - - // The ID of the LambdaFunctionStarted event recorded when this activity task - // started. To help diagnose issues, use this information to trace back the - // chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s LambdaFunctionFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaFunctionFailedEventAttributes) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *LambdaFunctionFailedEventAttributes) SetDetails(v string) *LambdaFunctionFailedEventAttributes { - s.Details = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *LambdaFunctionFailedEventAttributes) SetReason(v string) *LambdaFunctionFailedEventAttributes { - s.Reason = &v - return s -} - -// SetScheduledEventId sets the ScheduledEventId field's value. -func (s *LambdaFunctionFailedEventAttributes) SetScheduledEventId(v int64) *LambdaFunctionFailedEventAttributes { - s.ScheduledEventId = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *LambdaFunctionFailedEventAttributes) SetStartedEventId(v int64) *LambdaFunctionFailedEventAttributes { - s.StartedEventId = &v - return s -} - -// Provides the details of the LambdaFunctionScheduled event. It isn't set for -// other event types. -type LambdaFunctionScheduledEventAttributes struct { - _ struct{} `type:"structure"` - - // Data attached to the event that the decider can use in subsequent workflow - // tasks. This data isn't sent to the Lambda task. - Control *string `locationName:"control" type:"string"` - - // The ID of the LambdaFunctionCompleted event corresponding to the decision - // that resulted in scheduling this activity task. To help diagnose issues, - // use this information to trace back the chain of events leading up to this - // event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The unique ID of the Lambda task. - // - // Id is a required field - Id *string `locationName:"id" min:"1" type:"string" required:"true"` - - // The input provided to the Lambda task. - Input *string `locationName:"input" type:"string"` - - // The name of the Lambda function. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The maximum amount of time a worker can take to process the Lambda task. - StartToCloseTimeout *string `locationName:"startToCloseTimeout" type:"string"` -} - -// String returns the string representation -func (s LambdaFunctionScheduledEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaFunctionScheduledEventAttributes) GoString() string { - return s.String() -} - -// SetControl sets the Control field's value. -func (s *LambdaFunctionScheduledEventAttributes) SetControl(v string) *LambdaFunctionScheduledEventAttributes { - s.Control = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *LambdaFunctionScheduledEventAttributes) SetDecisionTaskCompletedEventId(v int64) *LambdaFunctionScheduledEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetId sets the Id field's value. -func (s *LambdaFunctionScheduledEventAttributes) SetId(v string) *LambdaFunctionScheduledEventAttributes { - s.Id = &v - return s -} - -// SetInput sets the Input field's value. -func (s *LambdaFunctionScheduledEventAttributes) SetInput(v string) *LambdaFunctionScheduledEventAttributes { - s.Input = &v - return s -} - -// SetName sets the Name field's value. -func (s *LambdaFunctionScheduledEventAttributes) SetName(v string) *LambdaFunctionScheduledEventAttributes { - s.Name = &v - return s -} - -// SetStartToCloseTimeout sets the StartToCloseTimeout field's value. -func (s *LambdaFunctionScheduledEventAttributes) SetStartToCloseTimeout(v string) *LambdaFunctionScheduledEventAttributes { - s.StartToCloseTimeout = &v - return s -} - -// Provides the details of the LambdaFunctionStarted event. It isn't set for -// other event types. -type LambdaFunctionStartedEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the LambdaFunctionScheduled event that was recorded when this activity - // task was scheduled. To help diagnose issues, use this information to trace - // back the chain of events leading up to this event. - // - // ScheduledEventId is a required field - ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s LambdaFunctionStartedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaFunctionStartedEventAttributes) GoString() string { - return s.String() -} - -// SetScheduledEventId sets the ScheduledEventId field's value. -func (s *LambdaFunctionStartedEventAttributes) SetScheduledEventId(v int64) *LambdaFunctionStartedEventAttributes { - s.ScheduledEventId = &v - return s -} - -// Provides details of the LambdaFunctionTimedOut event. -type LambdaFunctionTimedOutEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the LambdaFunctionScheduled event that was recorded when this activity - // task was scheduled. To help diagnose issues, use this information to trace - // back the chain of events leading up to this event. - // - // ScheduledEventId is a required field - ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` - - // The ID of the ActivityTaskStarted event that was recorded when this activity - // task started. To help diagnose issues, use this information to trace back - // the chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` - - // The type of the timeout that caused this event. - TimeoutType *string `locationName:"timeoutType" type:"string" enum:"LambdaFunctionTimeoutType"` -} - -// String returns the string representation -func (s LambdaFunctionTimedOutEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LambdaFunctionTimedOutEventAttributes) GoString() string { - return s.String() -} - -// SetScheduledEventId sets the ScheduledEventId field's value. -func (s *LambdaFunctionTimedOutEventAttributes) SetScheduledEventId(v int64) *LambdaFunctionTimedOutEventAttributes { - s.ScheduledEventId = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *LambdaFunctionTimedOutEventAttributes) SetStartedEventId(v int64) *LambdaFunctionTimedOutEventAttributes { - s.StartedEventId = &v - return s -} - -// SetTimeoutType sets the TimeoutType field's value. -func (s *LambdaFunctionTimedOutEventAttributes) SetTimeoutType(v string) *LambdaFunctionTimedOutEventAttributes { - s.TimeoutType = &v - return s -} - -type ListActivityTypesInput struct { - _ struct{} `type:"structure"` - - // The name of the domain in which the activity types have been registered. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // The maximum number of results that are returned per call. nextPageToken can - // be used to obtain futher pages of results. The default is 1000, which is - // the maximum allowed page size. You can, however, specify a page size smaller - // than the maximum. - // - // This is an upper limit only; the actual number of results returned per call - // may be fewer than the specified maximum. - MaximumPageSize *int64 `locationName:"maximumPageSize" type:"integer"` - - // If specified, only lists the activity types that have this name. - Name *string `locationName:"name" min:"1" type:"string"` - - // If a NextPageToken was returned by a previous call, there are more results - // available. To retrieve the next page of results, make the call again using - // the returned token in nextPageToken. Keep all other arguments unchanged. - // - // The configured maximumPageSize determines how many results can be returned - // in a single call. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // Specifies the registration status of the activity types to list. - // - // RegistrationStatus is a required field - RegistrationStatus *string `locationName:"registrationStatus" type:"string" required:"true" enum:"RegistrationStatus"` - - // When set to true, returns the results in reverse order. By default, the results - // are returned in ascending alphabetical order by name of the activity types. - ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` -} - -// String returns the string representation -func (s ListActivityTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListActivityTypesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListActivityTypesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListActivityTypesInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.RegistrationStatus == nil { - invalidParams.Add(request.NewErrParamRequired("RegistrationStatus")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *ListActivityTypesInput) SetDomain(v string) *ListActivityTypesInput { - s.Domain = &v - return s -} - -// SetMaximumPageSize sets the MaximumPageSize field's value. -func (s *ListActivityTypesInput) SetMaximumPageSize(v int64) *ListActivityTypesInput { - s.MaximumPageSize = &v - return s -} - -// SetName sets the Name field's value. -func (s *ListActivityTypesInput) SetName(v string) *ListActivityTypesInput { - s.Name = &v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListActivityTypesInput) SetNextPageToken(v string) *ListActivityTypesInput { - s.NextPageToken = &v - return s -} - -// SetRegistrationStatus sets the RegistrationStatus field's value. -func (s *ListActivityTypesInput) SetRegistrationStatus(v string) *ListActivityTypesInput { - s.RegistrationStatus = &v - return s -} - -// SetReverseOrder sets the ReverseOrder field's value. -func (s *ListActivityTypesInput) SetReverseOrder(v bool) *ListActivityTypesInput { - s.ReverseOrder = &v - return s -} - -// Contains a paginated list of activity type information structures. -type ListActivityTypesOutput struct { - _ struct{} `type:"structure"` - - // If a NextPageToken was returned by a previous call, there are more results - // available. To retrieve the next page of results, make the call again using - // the returned token in nextPageToken. Keep all other arguments unchanged. - // - // The configured maximumPageSize determines how many results can be returned - // in a single call. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // List of activity type information. - // - // TypeInfos is a required field - TypeInfos []*ActivityTypeInfo `locationName:"typeInfos" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListActivityTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListActivityTypesOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListActivityTypesOutput) SetNextPageToken(v string) *ListActivityTypesOutput { - s.NextPageToken = &v - return s -} - -// SetTypeInfos sets the TypeInfos field's value. -func (s *ListActivityTypesOutput) SetTypeInfos(v []*ActivityTypeInfo) *ListActivityTypesOutput { - s.TypeInfos = v - return s -} - -type ListClosedWorkflowExecutionsInput struct { - _ struct{} `type:"structure"` - - // If specified, only workflow executions that match this close status are listed. - // For example, if TERMINATED is specified, then only TERMINATED workflow executions - // are listed. - // - // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually - // exclusive. You can specify at most one of these in a request. - CloseStatusFilter *CloseStatusFilter `locationName:"closeStatusFilter" type:"structure"` - - // If specified, the workflow executions are included in the returned results - // based on whether their close times are within the range specified by this - // filter. Also, if this parameter is specified, the returned results are ordered - // by their close times. - // - // startTimeFilter and closeTimeFilter are mutually exclusive. You must specify - // one of these in a request but not both. - CloseTimeFilter *ExecutionTimeFilter `locationName:"closeTimeFilter" type:"structure"` - - // The name of the domain that contains the workflow executions to list. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // If specified, only workflow executions matching the workflow ID specified - // in the filter are returned. - // - // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually - // exclusive. You can specify at most one of these in a request. - ExecutionFilter *WorkflowExecutionFilter `locationName:"executionFilter" type:"structure"` - - // The maximum number of results that are returned per call. nextPageToken can - // be used to obtain futher pages of results. The default is 1000, which is - // the maximum allowed page size. You can, however, specify a page size smaller - // than the maximum. - // - // This is an upper limit only; the actual number of results returned per call - // may be fewer than the specified maximum. - MaximumPageSize *int64 `locationName:"maximumPageSize" type:"integer"` - - // If a NextPageToken was returned by a previous call, there are more results - // available. To retrieve the next page of results, make the call again using - // the returned token in nextPageToken. Keep all other arguments unchanged. - // - // The configured maximumPageSize determines how many results can be returned - // in a single call. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // When set to true, returns the results in reverse order. By default the results - // are returned in descending order of the start or the close time of the executions. - ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` - - // If specified, the workflow executions are included in the returned results - // based on whether their start times are within the range specified by this - // filter. Also, if this parameter is specified, the returned results are ordered - // by their start times. - // - // startTimeFilter and closeTimeFilter are mutually exclusive. You must specify - // one of these in a request but not both. - StartTimeFilter *ExecutionTimeFilter `locationName:"startTimeFilter" type:"structure"` - - // If specified, only executions that have the matching tag are listed. - // - // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually - // exclusive. You can specify at most one of these in a request. - TagFilter *TagFilter `locationName:"tagFilter" type:"structure"` - - // If specified, only executions of the type specified in the filter are returned. - // - // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually - // exclusive. You can specify at most one of these in a request. - TypeFilter *WorkflowTypeFilter `locationName:"typeFilter" type:"structure"` -} - -// String returns the string representation -func (s ListClosedWorkflowExecutionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListClosedWorkflowExecutionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListClosedWorkflowExecutionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListClosedWorkflowExecutionsInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.CloseStatusFilter != nil { - if err := s.CloseStatusFilter.Validate(); err != nil { - invalidParams.AddNested("CloseStatusFilter", err.(request.ErrInvalidParams)) - } - } - if s.CloseTimeFilter != nil { - if err := s.CloseTimeFilter.Validate(); err != nil { - invalidParams.AddNested("CloseTimeFilter", err.(request.ErrInvalidParams)) - } - } - if s.ExecutionFilter != nil { - if err := s.ExecutionFilter.Validate(); err != nil { - invalidParams.AddNested("ExecutionFilter", err.(request.ErrInvalidParams)) - } - } - if s.StartTimeFilter != nil { - if err := s.StartTimeFilter.Validate(); err != nil { - invalidParams.AddNested("StartTimeFilter", err.(request.ErrInvalidParams)) - } - } - if s.TagFilter != nil { - if err := s.TagFilter.Validate(); err != nil { - invalidParams.AddNested("TagFilter", err.(request.ErrInvalidParams)) - } - } - if s.TypeFilter != nil { - if err := s.TypeFilter.Validate(); err != nil { - invalidParams.AddNested("TypeFilter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloseStatusFilter sets the CloseStatusFilter field's value. -func (s *ListClosedWorkflowExecutionsInput) SetCloseStatusFilter(v *CloseStatusFilter) *ListClosedWorkflowExecutionsInput { - s.CloseStatusFilter = v - return s -} - -// SetCloseTimeFilter sets the CloseTimeFilter field's value. -func (s *ListClosedWorkflowExecutionsInput) SetCloseTimeFilter(v *ExecutionTimeFilter) *ListClosedWorkflowExecutionsInput { - s.CloseTimeFilter = v - return s -} - -// SetDomain sets the Domain field's value. -func (s *ListClosedWorkflowExecutionsInput) SetDomain(v string) *ListClosedWorkflowExecutionsInput { - s.Domain = &v - return s -} - -// SetExecutionFilter sets the ExecutionFilter field's value. -func (s *ListClosedWorkflowExecutionsInput) SetExecutionFilter(v *WorkflowExecutionFilter) *ListClosedWorkflowExecutionsInput { - s.ExecutionFilter = v - return s -} - -// SetMaximumPageSize sets the MaximumPageSize field's value. -func (s *ListClosedWorkflowExecutionsInput) SetMaximumPageSize(v int64) *ListClosedWorkflowExecutionsInput { - s.MaximumPageSize = &v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListClosedWorkflowExecutionsInput) SetNextPageToken(v string) *ListClosedWorkflowExecutionsInput { - s.NextPageToken = &v - return s -} - -// SetReverseOrder sets the ReverseOrder field's value. -func (s *ListClosedWorkflowExecutionsInput) SetReverseOrder(v bool) *ListClosedWorkflowExecutionsInput { - s.ReverseOrder = &v - return s -} - -// SetStartTimeFilter sets the StartTimeFilter field's value. -func (s *ListClosedWorkflowExecutionsInput) SetStartTimeFilter(v *ExecutionTimeFilter) *ListClosedWorkflowExecutionsInput { - s.StartTimeFilter = v - return s -} - -// SetTagFilter sets the TagFilter field's value. -func (s *ListClosedWorkflowExecutionsInput) SetTagFilter(v *TagFilter) *ListClosedWorkflowExecutionsInput { - s.TagFilter = v - return s -} - -// SetTypeFilter sets the TypeFilter field's value. -func (s *ListClosedWorkflowExecutionsInput) SetTypeFilter(v *WorkflowTypeFilter) *ListClosedWorkflowExecutionsInput { - s.TypeFilter = v - return s -} - -type ListDomainsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results that are returned per call. nextPageToken can - // be used to obtain futher pages of results. The default is 1000, which is - // the maximum allowed page size. You can, however, specify a page size smaller - // than the maximum. - // - // This is an upper limit only; the actual number of results returned per call - // may be fewer than the specified maximum. - MaximumPageSize *int64 `locationName:"maximumPageSize" type:"integer"` - - // If a NextPageToken was returned by a previous call, there are more results - // available. To retrieve the next page of results, make the call again using - // the returned token in nextPageToken. Keep all other arguments unchanged. - // - // The configured maximumPageSize determines how many results can be returned - // in a single call. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // Specifies the registration status of the domains to list. - // - // RegistrationStatus is a required field - RegistrationStatus *string `locationName:"registrationStatus" type:"string" required:"true" enum:"RegistrationStatus"` - - // When set to true, returns the results in reverse order. By default, the results - // are returned in ascending alphabetical order by name of the domains. - ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` -} - -// String returns the string representation -func (s ListDomainsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDomainsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDomainsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDomainsInput"} - if s.RegistrationStatus == nil { - invalidParams.Add(request.NewErrParamRequired("RegistrationStatus")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaximumPageSize sets the MaximumPageSize field's value. -func (s *ListDomainsInput) SetMaximumPageSize(v int64) *ListDomainsInput { - s.MaximumPageSize = &v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListDomainsInput) SetNextPageToken(v string) *ListDomainsInput { - s.NextPageToken = &v - return s -} - -// SetRegistrationStatus sets the RegistrationStatus field's value. -func (s *ListDomainsInput) SetRegistrationStatus(v string) *ListDomainsInput { - s.RegistrationStatus = &v - return s -} - -// SetReverseOrder sets the ReverseOrder field's value. -func (s *ListDomainsInput) SetReverseOrder(v bool) *ListDomainsInput { - s.ReverseOrder = &v - return s -} - -// Contains a paginated collection of DomainInfo structures. -type ListDomainsOutput struct { - _ struct{} `type:"structure"` - - // A list of DomainInfo structures. - // - // DomainInfos is a required field - DomainInfos []*DomainInfo `locationName:"domainInfos" type:"list" required:"true"` - - // If a NextPageToken was returned by a previous call, there are more results - // available. To retrieve the next page of results, make the call again using - // the returned token in nextPageToken. Keep all other arguments unchanged. - // - // The configured maximumPageSize determines how many results can be returned - // in a single call. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s ListDomainsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDomainsOutput) GoString() string { - return s.String() -} - -// SetDomainInfos sets the DomainInfos field's value. -func (s *ListDomainsOutput) SetDomainInfos(v []*DomainInfo) *ListDomainsOutput { - s.DomainInfos = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListDomainsOutput) SetNextPageToken(v string) *ListDomainsOutput { - s.NextPageToken = &v - return s -} - -type ListOpenWorkflowExecutionsInput struct { - _ struct{} `type:"structure"` - - // The name of the domain that contains the workflow executions to list. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // If specified, only workflow executions matching the workflow ID specified - // in the filter are returned. - // - // executionFilter, typeFilter and tagFilter are mutually exclusive. You can - // specify at most one of these in a request. - ExecutionFilter *WorkflowExecutionFilter `locationName:"executionFilter" type:"structure"` - - // The maximum number of results that are returned per call. nextPageToken can - // be used to obtain futher pages of results. The default is 1000, which is - // the maximum allowed page size. You can, however, specify a page size smaller - // than the maximum. - // - // This is an upper limit only; the actual number of results returned per call - // may be fewer than the specified maximum. - MaximumPageSize *int64 `locationName:"maximumPageSize" type:"integer"` - - // If a NextPageToken was returned by a previous call, there are more results - // available. To retrieve the next page of results, make the call again using - // the returned token in nextPageToken. Keep all other arguments unchanged. - // - // The configured maximumPageSize determines how many results can be returned - // in a single call. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // When set to true, returns the results in reverse order. By default the results - // are returned in descending order of the start time of the executions. - ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` - - // Workflow executions are included in the returned results based on whether - // their start times are within the range specified by this filter. - // - // StartTimeFilter is a required field - StartTimeFilter *ExecutionTimeFilter `locationName:"startTimeFilter" type:"structure" required:"true"` - - // If specified, only executions that have the matching tag are listed. - // - // executionFilter, typeFilter and tagFilter are mutually exclusive. You can - // specify at most one of these in a request. - TagFilter *TagFilter `locationName:"tagFilter" type:"structure"` - - // If specified, only executions of the type specified in the filter are returned. - // - // executionFilter, typeFilter and tagFilter are mutually exclusive. You can - // specify at most one of these in a request. - TypeFilter *WorkflowTypeFilter `locationName:"typeFilter" type:"structure"` -} - -// String returns the string representation -func (s ListOpenWorkflowExecutionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListOpenWorkflowExecutionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListOpenWorkflowExecutionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOpenWorkflowExecutionsInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.StartTimeFilter == nil { - invalidParams.Add(request.NewErrParamRequired("StartTimeFilter")) - } - if s.ExecutionFilter != nil { - if err := s.ExecutionFilter.Validate(); err != nil { - invalidParams.AddNested("ExecutionFilter", err.(request.ErrInvalidParams)) - } - } - if s.StartTimeFilter != nil { - if err := s.StartTimeFilter.Validate(); err != nil { - invalidParams.AddNested("StartTimeFilter", err.(request.ErrInvalidParams)) - } - } - if s.TagFilter != nil { - if err := s.TagFilter.Validate(); err != nil { - invalidParams.AddNested("TagFilter", err.(request.ErrInvalidParams)) - } - } - if s.TypeFilter != nil { - if err := s.TypeFilter.Validate(); err != nil { - invalidParams.AddNested("TypeFilter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *ListOpenWorkflowExecutionsInput) SetDomain(v string) *ListOpenWorkflowExecutionsInput { - s.Domain = &v - return s -} - -// SetExecutionFilter sets the ExecutionFilter field's value. -func (s *ListOpenWorkflowExecutionsInput) SetExecutionFilter(v *WorkflowExecutionFilter) *ListOpenWorkflowExecutionsInput { - s.ExecutionFilter = v - return s -} - -// SetMaximumPageSize sets the MaximumPageSize field's value. -func (s *ListOpenWorkflowExecutionsInput) SetMaximumPageSize(v int64) *ListOpenWorkflowExecutionsInput { - s.MaximumPageSize = &v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListOpenWorkflowExecutionsInput) SetNextPageToken(v string) *ListOpenWorkflowExecutionsInput { - s.NextPageToken = &v - return s -} - -// SetReverseOrder sets the ReverseOrder field's value. -func (s *ListOpenWorkflowExecutionsInput) SetReverseOrder(v bool) *ListOpenWorkflowExecutionsInput { - s.ReverseOrder = &v - return s -} - -// SetStartTimeFilter sets the StartTimeFilter field's value. -func (s *ListOpenWorkflowExecutionsInput) SetStartTimeFilter(v *ExecutionTimeFilter) *ListOpenWorkflowExecutionsInput { - s.StartTimeFilter = v - return s -} - -// SetTagFilter sets the TagFilter field's value. -func (s *ListOpenWorkflowExecutionsInput) SetTagFilter(v *TagFilter) *ListOpenWorkflowExecutionsInput { - s.TagFilter = v - return s -} - -// SetTypeFilter sets the TypeFilter field's value. -func (s *ListOpenWorkflowExecutionsInput) SetTypeFilter(v *WorkflowTypeFilter) *ListOpenWorkflowExecutionsInput { - s.TypeFilter = v - return s -} - -type ListWorkflowTypesInput struct { - _ struct{} `type:"structure"` - - // The name of the domain in which the workflow types have been registered. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // The maximum number of results that are returned per call. nextPageToken can - // be used to obtain futher pages of results. The default is 1000, which is - // the maximum allowed page size. You can, however, specify a page size smaller - // than the maximum. - // - // This is an upper limit only; the actual number of results returned per call - // may be fewer than the specified maximum. - MaximumPageSize *int64 `locationName:"maximumPageSize" type:"integer"` - - // If specified, lists the workflow type with this name. - Name *string `locationName:"name" min:"1" type:"string"` - - // If a NextPageToken was returned by a previous call, there are more results - // available. To retrieve the next page of results, make the call again using - // the returned token in nextPageToken. Keep all other arguments unchanged. - // - // The configured maximumPageSize determines how many results can be returned - // in a single call. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // Specifies the registration status of the workflow types to list. - // - // RegistrationStatus is a required field - RegistrationStatus *string `locationName:"registrationStatus" type:"string" required:"true" enum:"RegistrationStatus"` - - // When set to true, returns the results in reverse order. By default the results - // are returned in ascending alphabetical order of the name of the workflow - // types. - ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` -} - -// String returns the string representation -func (s ListWorkflowTypesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListWorkflowTypesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListWorkflowTypesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListWorkflowTypesInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.RegistrationStatus == nil { - invalidParams.Add(request.NewErrParamRequired("RegistrationStatus")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *ListWorkflowTypesInput) SetDomain(v string) *ListWorkflowTypesInput { - s.Domain = &v - return s -} - -// SetMaximumPageSize sets the MaximumPageSize field's value. -func (s *ListWorkflowTypesInput) SetMaximumPageSize(v int64) *ListWorkflowTypesInput { - s.MaximumPageSize = &v - return s -} - -// SetName sets the Name field's value. -func (s *ListWorkflowTypesInput) SetName(v string) *ListWorkflowTypesInput { - s.Name = &v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListWorkflowTypesInput) SetNextPageToken(v string) *ListWorkflowTypesInput { - s.NextPageToken = &v - return s -} - -// SetRegistrationStatus sets the RegistrationStatus field's value. -func (s *ListWorkflowTypesInput) SetRegistrationStatus(v string) *ListWorkflowTypesInput { - s.RegistrationStatus = &v - return s -} - -// SetReverseOrder sets the ReverseOrder field's value. -func (s *ListWorkflowTypesInput) SetReverseOrder(v bool) *ListWorkflowTypesInput { - s.ReverseOrder = &v - return s -} - -// Contains a paginated list of information structures about workflow types. -type ListWorkflowTypesOutput struct { - _ struct{} `type:"structure"` - - // If a NextPageToken was returned by a previous call, there are more results - // available. To retrieve the next page of results, make the call again using - // the returned token in nextPageToken. Keep all other arguments unchanged. - // - // The configured maximumPageSize determines how many results can be returned - // in a single call. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // The list of workflow type information. - // - // TypeInfos is a required field - TypeInfos []*WorkflowTypeInfo `locationName:"typeInfos" type:"list" required:"true"` -} - -// String returns the string representation -func (s ListWorkflowTypesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListWorkflowTypesOutput) GoString() string { - return s.String() -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *ListWorkflowTypesOutput) SetNextPageToken(v string) *ListWorkflowTypesOutput { - s.NextPageToken = &v - return s -} - -// SetTypeInfos sets the TypeInfos field's value. -func (s *ListWorkflowTypesOutput) SetTypeInfos(v []*WorkflowTypeInfo) *ListWorkflowTypesOutput { - s.TypeInfos = v - return s -} - -// Provides the details of the MarkerRecorded event. -type MarkerRecordedEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the RecordMarker decision that requested this marker. This - // information can be useful for diagnosing problems by tracing back the chain - // of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The details of the marker. - Details *string `locationName:"details" type:"string"` - - // The name of the marker. - // - // MarkerName is a required field - MarkerName *string `locationName:"markerName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s MarkerRecordedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s MarkerRecordedEventAttributes) GoString() string { - return s.String() -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *MarkerRecordedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *MarkerRecordedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetDetails sets the Details field's value. -func (s *MarkerRecordedEventAttributes) SetDetails(v string) *MarkerRecordedEventAttributes { - s.Details = &v - return s -} - -// SetMarkerName sets the MarkerName field's value. -func (s *MarkerRecordedEventAttributes) SetMarkerName(v string) *MarkerRecordedEventAttributes { - s.MarkerName = &v - return s -} - -// Contains the count of tasks in a task list. -type PendingTaskCount struct { - _ struct{} `type:"structure"` - - // The number of tasks in the task list. - // - // Count is a required field - Count *int64 `locationName:"count" type:"integer" required:"true"` - - // If set to true, indicates that the actual count was more than the maximum - // supported by this API and the count returned is the truncated value. - Truncated *bool `locationName:"truncated" type:"boolean"` -} - -// String returns the string representation -func (s PendingTaskCount) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PendingTaskCount) GoString() string { - return s.String() -} - -// SetCount sets the Count field's value. -func (s *PendingTaskCount) SetCount(v int64) *PendingTaskCount { - s.Count = &v - return s -} - -// SetTruncated sets the Truncated field's value. -func (s *PendingTaskCount) SetTruncated(v bool) *PendingTaskCount { - s.Truncated = &v - return s -} - -type PollForActivityTaskInput struct { - _ struct{} `type:"structure"` - - // The name of the domain that contains the task lists being polled. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // Identity of the worker making the request, recorded in the ActivityTaskStarted - // event in the workflow history. This enables diagnostic tracing when problems - // arise. The form of this identity is user defined. - Identity *string `locationName:"identity" type:"string"` - - // Specifies the task list to poll for activity tasks. - // - // The specified string must not start or end with whitespace. It must not contain - // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f - // | \u007f-\u009f). Also, it must not contain the literal string arn. - // - // TaskList is a required field - TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` -} - -// String returns the string representation -func (s PollForActivityTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PollForActivityTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PollForActivityTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PollForActivityTaskInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.TaskList == nil { - invalidParams.Add(request.NewErrParamRequired("TaskList")) - } - if s.TaskList != nil { - if err := s.TaskList.Validate(); err != nil { - invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *PollForActivityTaskInput) SetDomain(v string) *PollForActivityTaskInput { - s.Domain = &v - return s -} - -// SetIdentity sets the Identity field's value. -func (s *PollForActivityTaskInput) SetIdentity(v string) *PollForActivityTaskInput { - s.Identity = &v - return s -} - -// SetTaskList sets the TaskList field's value. -func (s *PollForActivityTaskInput) SetTaskList(v *TaskList) *PollForActivityTaskInput { - s.TaskList = v - return s -} - -// Unit of work sent to an activity worker. -type PollForActivityTaskOutput struct { - _ struct{} `type:"structure"` - - // The unique ID of the task. - // - // ActivityId is a required field - ActivityId *string `locationName:"activityId" min:"1" type:"string" required:"true"` - - // The type of this activity task. - // - // ActivityType is a required field - ActivityType *ActivityType `locationName:"activityType" type:"structure" required:"true"` - - // The inputs provided when the activity task was scheduled. The form of the - // input is user defined and should be meaningful to the activity implementation. - Input *string `locationName:"input" type:"string"` - - // The ID of the ActivityTaskStarted event recorded in the history. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` - - // The opaque string used as a handle on the task. This token is used by workers - // to communicate progress and response information back to the system about - // the task. - // - // TaskToken is a required field - TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` - - // The workflow execution that started this activity task. - // - // WorkflowExecution is a required field - WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` -} - -// String returns the string representation -func (s PollForActivityTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PollForActivityTaskOutput) GoString() string { - return s.String() -} - -// SetActivityId sets the ActivityId field's value. -func (s *PollForActivityTaskOutput) SetActivityId(v string) *PollForActivityTaskOutput { - s.ActivityId = &v - return s -} - -// SetActivityType sets the ActivityType field's value. -func (s *PollForActivityTaskOutput) SetActivityType(v *ActivityType) *PollForActivityTaskOutput { - s.ActivityType = v - return s -} - -// SetInput sets the Input field's value. -func (s *PollForActivityTaskOutput) SetInput(v string) *PollForActivityTaskOutput { - s.Input = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *PollForActivityTaskOutput) SetStartedEventId(v int64) *PollForActivityTaskOutput { - s.StartedEventId = &v - return s -} - -// SetTaskToken sets the TaskToken field's value. -func (s *PollForActivityTaskOutput) SetTaskToken(v string) *PollForActivityTaskOutput { - s.TaskToken = &v - return s -} - -// SetWorkflowExecution sets the WorkflowExecution field's value. -func (s *PollForActivityTaskOutput) SetWorkflowExecution(v *WorkflowExecution) *PollForActivityTaskOutput { - s.WorkflowExecution = v - return s -} - -type PollForDecisionTaskInput struct { - _ struct{} `type:"structure"` - - // The name of the domain containing the task lists to poll. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // Identity of the decider making the request, which is recorded in the DecisionTaskStarted - // event in the workflow history. This enables diagnostic tracing when problems - // arise. The form of this identity is user defined. - Identity *string `locationName:"identity" type:"string"` - - // The maximum number of results that are returned per call. nextPageToken can - // be used to obtain futher pages of results. The default is 1000, which is - // the maximum allowed page size. You can, however, specify a page size smaller - // than the maximum. - // - // This is an upper limit only; the actual number of results returned per call - // may be fewer than the specified maximum. - MaximumPageSize *int64 `locationName:"maximumPageSize" type:"integer"` - - // If a NextPageToken was returned by a previous call, there are more results - // available. To retrieve the next page of results, make the call again using - // the returned token in nextPageToken. Keep all other arguments unchanged. - // - // The configured maximumPageSize determines how many results can be returned - // in a single call. - // - // The nextPageToken returned by this action cannot be used with GetWorkflowExecutionHistory - // to get the next page. You must call PollForDecisionTask again (with the nextPageToken) - // to retrieve the next page of history records. Calling PollForDecisionTask - // with a nextPageToken doesn't return a new decision task. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // When set to true, returns the events in reverse order. By default the results - // are returned in ascending order of the eventTimestamp of the events. - ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` - - // Specifies the task list to poll for decision tasks. - // - // The specified string must not start or end with whitespace. It must not contain - // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f - // | \u007f-\u009f). Also, it must not contain the literal string arn. - // - // TaskList is a required field - TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` -} - -// String returns the string representation -func (s PollForDecisionTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PollForDecisionTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PollForDecisionTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PollForDecisionTaskInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.TaskList == nil { - invalidParams.Add(request.NewErrParamRequired("TaskList")) - } - if s.TaskList != nil { - if err := s.TaskList.Validate(); err != nil { - invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *PollForDecisionTaskInput) SetDomain(v string) *PollForDecisionTaskInput { - s.Domain = &v - return s -} - -// SetIdentity sets the Identity field's value. -func (s *PollForDecisionTaskInput) SetIdentity(v string) *PollForDecisionTaskInput { - s.Identity = &v - return s -} - -// SetMaximumPageSize sets the MaximumPageSize field's value. -func (s *PollForDecisionTaskInput) SetMaximumPageSize(v int64) *PollForDecisionTaskInput { - s.MaximumPageSize = &v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *PollForDecisionTaskInput) SetNextPageToken(v string) *PollForDecisionTaskInput { - s.NextPageToken = &v - return s -} - -// SetReverseOrder sets the ReverseOrder field's value. -func (s *PollForDecisionTaskInput) SetReverseOrder(v bool) *PollForDecisionTaskInput { - s.ReverseOrder = &v - return s -} - -// SetTaskList sets the TaskList field's value. -func (s *PollForDecisionTaskInput) SetTaskList(v *TaskList) *PollForDecisionTaskInput { - s.TaskList = v - return s -} - -// A structure that represents a decision task. Decision tasks are sent to deciders -// in order for them to make decisions. -type PollForDecisionTaskOutput struct { - _ struct{} `type:"structure"` - - // A paginated list of history events of the workflow execution. The decider - // uses this during the processing of the decision task. - // - // Events is a required field - Events []*HistoryEvent `locationName:"events" type:"list" required:"true"` - - // If a NextPageToken was returned by a previous call, there are more results - // available. To retrieve the next page of results, make the call again using - // the returned token in nextPageToken. Keep all other arguments unchanged. - // - // The configured maximumPageSize determines how many results can be returned - // in a single call. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // The ID of the DecisionTaskStarted event of the previous decision task of - // this workflow execution that was processed by the decider. This can be used - // to determine the events in the history new since the last decision task received - // by the decider. - PreviousStartedEventId *int64 `locationName:"previousStartedEventId" type:"long"` - - // The ID of the DecisionTaskStarted event recorded in the history. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` - - // The opaque string used as a handle on the task. This token is used by workers - // to communicate progress and response information back to the system about - // the task. - // - // TaskToken is a required field - TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` - - // The workflow execution for which this decision task was created. - // - // WorkflowExecution is a required field - WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` - - // The type of the workflow execution for which this decision task was created. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s PollForDecisionTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PollForDecisionTaskOutput) GoString() string { - return s.String() -} - -// SetEvents sets the Events field's value. -func (s *PollForDecisionTaskOutput) SetEvents(v []*HistoryEvent) *PollForDecisionTaskOutput { - s.Events = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *PollForDecisionTaskOutput) SetNextPageToken(v string) *PollForDecisionTaskOutput { - s.NextPageToken = &v - return s -} - -// SetPreviousStartedEventId sets the PreviousStartedEventId field's value. -func (s *PollForDecisionTaskOutput) SetPreviousStartedEventId(v int64) *PollForDecisionTaskOutput { - s.PreviousStartedEventId = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *PollForDecisionTaskOutput) SetStartedEventId(v int64) *PollForDecisionTaskOutput { - s.StartedEventId = &v - return s -} - -// SetTaskToken sets the TaskToken field's value. -func (s *PollForDecisionTaskOutput) SetTaskToken(v string) *PollForDecisionTaskOutput { - s.TaskToken = &v - return s -} - -// SetWorkflowExecution sets the WorkflowExecution field's value. -func (s *PollForDecisionTaskOutput) SetWorkflowExecution(v *WorkflowExecution) *PollForDecisionTaskOutput { - s.WorkflowExecution = v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *PollForDecisionTaskOutput) SetWorkflowType(v *WorkflowType) *PollForDecisionTaskOutput { - s.WorkflowType = v - return s -} - -type RecordActivityTaskHeartbeatInput struct { - _ struct{} `type:"structure"` - - // If specified, contains details about the progress of the task. - Details *string `locationName:"details" type:"string"` - - // The taskToken of the ActivityTask. - // - // taskToken is generated by the service and should be treated as an opaque - // value. If the task is passed to another process, its taskToken must also - // be passed. This enables it to provide its progress and respond with results. - // - // TaskToken is a required field - TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RecordActivityTaskHeartbeatInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecordActivityTaskHeartbeatInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RecordActivityTaskHeartbeatInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RecordActivityTaskHeartbeatInput"} - if s.TaskToken == nil { - invalidParams.Add(request.NewErrParamRequired("TaskToken")) - } - if s.TaskToken != nil && len(*s.TaskToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetails sets the Details field's value. -func (s *RecordActivityTaskHeartbeatInput) SetDetails(v string) *RecordActivityTaskHeartbeatInput { - s.Details = &v - return s -} - -// SetTaskToken sets the TaskToken field's value. -func (s *RecordActivityTaskHeartbeatInput) SetTaskToken(v string) *RecordActivityTaskHeartbeatInput { - s.TaskToken = &v - return s -} - -// Status information about an activity task. -type RecordActivityTaskHeartbeatOutput struct { - _ struct{} `type:"structure"` - - // Set to true if cancellation of the task is requested. - // - // CancelRequested is a required field - CancelRequested *bool `locationName:"cancelRequested" type:"boolean" required:"true"` -} - -// String returns the string representation -func (s RecordActivityTaskHeartbeatOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecordActivityTaskHeartbeatOutput) GoString() string { - return s.String() -} - -// SetCancelRequested sets the CancelRequested field's value. -func (s *RecordActivityTaskHeartbeatOutput) SetCancelRequested(v bool) *RecordActivityTaskHeartbeatOutput { - s.CancelRequested = &v - return s -} - -// Provides the details of the RecordMarker decision. -// -// Access Control -// -// You can use IAM policies to control this decision's access to Amazon SWF -// resources as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -type RecordMarkerDecisionAttributes struct { - _ struct{} `type:"structure"` - - // The details of the marker. - Details *string `locationName:"details" type:"string"` - - // The name of the marker. - // - // MarkerName is a required field - MarkerName *string `locationName:"markerName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RecordMarkerDecisionAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecordMarkerDecisionAttributes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RecordMarkerDecisionAttributes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RecordMarkerDecisionAttributes"} - if s.MarkerName == nil { - invalidParams.Add(request.NewErrParamRequired("MarkerName")) - } - if s.MarkerName != nil && len(*s.MarkerName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("MarkerName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetails sets the Details field's value. -func (s *RecordMarkerDecisionAttributes) SetDetails(v string) *RecordMarkerDecisionAttributes { - s.Details = &v - return s -} - -// SetMarkerName sets the MarkerName field's value. -func (s *RecordMarkerDecisionAttributes) SetMarkerName(v string) *RecordMarkerDecisionAttributes { - s.MarkerName = &v - return s -} - -// Provides the details of the RecordMarkerFailed event. -type RecordMarkerFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The cause of the failure. This information is generated by the system and - // can be useful for diagnostic purposes. - // - // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it - // lacked sufficient permissions. For details and example IAM policies, see - // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) - // in the Amazon SWF Developer Guide. - // - // Cause is a required field - Cause *string `locationName:"cause" type:"string" required:"true" enum:"RecordMarkerFailedCause"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the RecordMarkerFailed decision for this cancellation request. - // This information can be useful for diagnosing problems by tracing back the - // chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The marker's name. - // - // MarkerName is a required field - MarkerName *string `locationName:"markerName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RecordMarkerFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RecordMarkerFailedEventAttributes) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *RecordMarkerFailedEventAttributes) SetCause(v string) *RecordMarkerFailedEventAttributes { - s.Cause = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *RecordMarkerFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *RecordMarkerFailedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetMarkerName sets the MarkerName field's value. -func (s *RecordMarkerFailedEventAttributes) SetMarkerName(v string) *RecordMarkerFailedEventAttributes { - s.MarkerName = &v - return s -} - -type RegisterActivityTypeInput struct { - _ struct{} `type:"structure"` - - // If set, specifies the default maximum time before which a worker processing - // a task of this type must report progress by calling RecordActivityTaskHeartbeat. - // If the timeout is exceeded, the activity task is automatically timed out. - // This default can be overridden when scheduling an activity task using the - // ScheduleActivityTaskDecision. If the activity worker subsequently attempts - // to record a heartbeat or returns a result, the activity worker receives an - // UnknownResource fault. In this case, Amazon SWF no longer considers the activity - // task to be valid; the activity worker should clean up the activity task. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - DefaultTaskHeartbeatTimeout *string `locationName:"defaultTaskHeartbeatTimeout" type:"string"` - - // If set, specifies the default task list to use for scheduling tasks of this - // activity type. This default task list is used if a task list isn't provided - // when a task is scheduled through the ScheduleActivityTaskDecision. - DefaultTaskList *TaskList `locationName:"defaultTaskList" type:"structure"` - - // The default task priority to assign to the activity type. If not assigned, - // then 0 is used. Valid values are integers that range from Java's Integer.MIN_VALUE - // (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate - // higher priority. - // - // For more information about setting task priority, see Setting Task Priority - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) - // in the in the Amazon SWF Developer Guide.. - DefaultTaskPriority *string `locationName:"defaultTaskPriority" type:"string"` - - // If set, specifies the default maximum duration for a task of this activity - // type. This default can be overridden when scheduling an activity task using - // the ScheduleActivityTaskDecision. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - DefaultTaskScheduleToCloseTimeout *string `locationName:"defaultTaskScheduleToCloseTimeout" type:"string"` - - // If set, specifies the default maximum duration that a task of this activity - // type can wait before being assigned to a worker. This default can be overridden - // when scheduling an activity task using the ScheduleActivityTaskDecision. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - DefaultTaskScheduleToStartTimeout *string `locationName:"defaultTaskScheduleToStartTimeout" type:"string"` - - // If set, specifies the default maximum duration that a worker can take to - // process tasks of this activity type. This default can be overridden when - // scheduling an activity task using the ScheduleActivityTaskDecision. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - DefaultTaskStartToCloseTimeout *string `locationName:"defaultTaskStartToCloseTimeout" type:"string"` - - // A textual description of the activity type. - Description *string `locationName:"description" type:"string"` - - // The name of the domain in which this activity is to be registered. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // The name of the activity type within the domain. - // - // The specified string must not start or end with whitespace. It must not contain - // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f - // | \u007f-\u009f). Also, it must not contain the literal string arn. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The version of the activity type. - // - // The activity type consists of the name and version, the combination of which - // must be unique within the domain. - // - // The specified string must not start or end with whitespace. It must not contain - // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f - // | \u007f-\u009f). Also, it must not contain the literal string arn. - // - // Version is a required field - Version *string `locationName:"version" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterActivityTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterActivityTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterActivityTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterActivityTypeInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - if s.DefaultTaskList != nil { - if err := s.DefaultTaskList.Validate(); err != nil { - invalidParams.AddNested("DefaultTaskList", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultTaskHeartbeatTimeout sets the DefaultTaskHeartbeatTimeout field's value. -func (s *RegisterActivityTypeInput) SetDefaultTaskHeartbeatTimeout(v string) *RegisterActivityTypeInput { - s.DefaultTaskHeartbeatTimeout = &v - return s -} - -// SetDefaultTaskList sets the DefaultTaskList field's value. -func (s *RegisterActivityTypeInput) SetDefaultTaskList(v *TaskList) *RegisterActivityTypeInput { - s.DefaultTaskList = v - return s -} - -// SetDefaultTaskPriority sets the DefaultTaskPriority field's value. -func (s *RegisterActivityTypeInput) SetDefaultTaskPriority(v string) *RegisterActivityTypeInput { - s.DefaultTaskPriority = &v - return s -} - -// SetDefaultTaskScheduleToCloseTimeout sets the DefaultTaskScheduleToCloseTimeout field's value. -func (s *RegisterActivityTypeInput) SetDefaultTaskScheduleToCloseTimeout(v string) *RegisterActivityTypeInput { - s.DefaultTaskScheduleToCloseTimeout = &v - return s -} - -// SetDefaultTaskScheduleToStartTimeout sets the DefaultTaskScheduleToStartTimeout field's value. -func (s *RegisterActivityTypeInput) SetDefaultTaskScheduleToStartTimeout(v string) *RegisterActivityTypeInput { - s.DefaultTaskScheduleToStartTimeout = &v - return s -} - -// SetDefaultTaskStartToCloseTimeout sets the DefaultTaskStartToCloseTimeout field's value. -func (s *RegisterActivityTypeInput) SetDefaultTaskStartToCloseTimeout(v string) *RegisterActivityTypeInput { - s.DefaultTaskStartToCloseTimeout = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *RegisterActivityTypeInput) SetDescription(v string) *RegisterActivityTypeInput { - s.Description = &v - return s -} - -// SetDomain sets the Domain field's value. -func (s *RegisterActivityTypeInput) SetDomain(v string) *RegisterActivityTypeInput { - s.Domain = &v - return s -} - -// SetName sets the Name field's value. -func (s *RegisterActivityTypeInput) SetName(v string) *RegisterActivityTypeInput { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *RegisterActivityTypeInput) SetVersion(v string) *RegisterActivityTypeInput { - s.Version = &v - return s -} - -type RegisterActivityTypeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RegisterActivityTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterActivityTypeOutput) GoString() string { - return s.String() -} - -type RegisterDomainInput struct { - _ struct{} `type:"structure"` - - // A text description of the domain. - Description *string `locationName:"description" type:"string"` - - // Name of the domain to register. The name must be unique in the region that - // the domain is registered in. - // - // The specified string must not start or end with whitespace. It must not contain - // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f - // | \u007f-\u009f). Also, it must not contain the literal string arn. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The duration (in days) that records and histories of workflow executions - // on the domain should be kept by the service. After the retention period, - // the workflow execution isn't available in the results of visibility calls. - // - // If you pass the value NONE or 0 (zero), then the workflow execution history - // isn't retained. As soon as the workflow execution completes, the execution - // record and its history are deleted. - // - // The maximum workflow execution retention period is 90 days. For more information - // about Amazon SWF service limits, see: Amazon SWF Service Limits (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-limits.html) - // in the Amazon SWF Developer Guide. - // - // WorkflowExecutionRetentionPeriodInDays is a required field - WorkflowExecutionRetentionPeriodInDays *string `locationName:"workflowExecutionRetentionPeriodInDays" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterDomainInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterDomainInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.WorkflowExecutionRetentionPeriodInDays == nil { - invalidParams.Add(request.NewErrParamRequired("WorkflowExecutionRetentionPeriodInDays")) - } - if s.WorkflowExecutionRetentionPeriodInDays != nil && len(*s.WorkflowExecutionRetentionPeriodInDays) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkflowExecutionRetentionPeriodInDays", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *RegisterDomainInput) SetDescription(v string) *RegisterDomainInput { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *RegisterDomainInput) SetName(v string) *RegisterDomainInput { - s.Name = &v - return s -} - -// SetWorkflowExecutionRetentionPeriodInDays sets the WorkflowExecutionRetentionPeriodInDays field's value. -func (s *RegisterDomainInput) SetWorkflowExecutionRetentionPeriodInDays(v string) *RegisterDomainInput { - s.WorkflowExecutionRetentionPeriodInDays = &v - return s -} - -type RegisterDomainOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RegisterDomainOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterDomainOutput) GoString() string { - return s.String() -} - -type RegisterWorkflowTypeInput struct { - _ struct{} `type:"structure"` - - // If set, specifies the default policy to use for the child workflow executions - // when a workflow execution of this type is terminated, by calling the TerminateWorkflowExecution - // action explicitly or due to an expired timeout. This default can be overridden - // when starting a workflow execution using the StartWorkflowExecution action - // or the StartChildWorkflowExecutionDecision. - // - // The supported child policies are: - // - // * TERMINATE – The child executions are terminated. - // - // * REQUEST_CANCEL – A request to cancel is attempted for each child execution - // by recording a WorkflowExecutionCancelRequested event in its history. - // It is up to the decider to take appropriate actions when it receives an - // execution history with this event. - // - // * ABANDON – No action is taken. The child executions continue to run. - DefaultChildPolicy *string `locationName:"defaultChildPolicy" type:"string" enum:"ChildPolicy"` - - // If set, specifies the default maximum duration for executions of this workflow - // type. You can override this default when starting an execution through the - // StartWorkflowExecution Action or StartChildWorkflowExecutionDecision. - // - // The duration is specified in seconds; an integer greater than or equal to - // 0. Unlike some of the other timeout parameters in Amazon SWF, you cannot - // specify a value of "NONE" for defaultExecutionStartToCloseTimeout; there - // is a one-year max limit on the time that a workflow execution can run. Exceeding - // this limit always causes the workflow execution to time out. - DefaultExecutionStartToCloseTimeout *string `locationName:"defaultExecutionStartToCloseTimeout" type:"string"` - - // The default IAM role attached to this workflow type. - // - // Executions of this workflow type need IAM roles to invoke Lambda functions. - // If you don't specify an IAM role when you start this workflow type, the default - // Lambda role is attached to the execution. For more information, see http://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html) - // in the Amazon SWF Developer Guide. - DefaultLambdaRole *string `locationName:"defaultLambdaRole" min:"1" type:"string"` - - // If set, specifies the default task list to use for scheduling decision tasks - // for executions of this workflow type. This default is used only if a task - // list isn't provided when starting the execution through the StartWorkflowExecution - // Action or StartChildWorkflowExecutionDecision. - DefaultTaskList *TaskList `locationName:"defaultTaskList" type:"structure"` - - // The default task priority to assign to the workflow type. If not assigned, - // then 0 is used. Valid values are integers that range from Java's Integer.MIN_VALUE - // (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate - // higher priority. - // - // For more information about setting task priority, see Setting Task Priority - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) - // in the Amazon SWF Developer Guide. - DefaultTaskPriority *string `locationName:"defaultTaskPriority" type:"string"` - - // If set, specifies the default maximum duration of decision tasks for this - // workflow type. This default can be overridden when starting a workflow execution - // using the StartWorkflowExecution action or the StartChildWorkflowExecutionDecision. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - DefaultTaskStartToCloseTimeout *string `locationName:"defaultTaskStartToCloseTimeout" type:"string"` - - // Textual description of the workflow type. - Description *string `locationName:"description" type:"string"` - - // The name of the domain in which to register the workflow type. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // The name of the workflow type. - // - // The specified string must not start or end with whitespace. It must not contain - // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f - // | \u007f-\u009f). Also, it must not contain the literal string arn. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The version of the workflow type. - // - // The workflow type consists of the name and version, the combination of which - // must be unique within the domain. To get a list of all currently registered - // workflow types, use the ListWorkflowTypes action. - // - // The specified string must not start or end with whitespace. It must not contain - // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f - // | \u007f-\u009f). Also, it must not contain the literal string arn. - // - // Version is a required field - Version *string `locationName:"version" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegisterWorkflowTypeInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterWorkflowTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterWorkflowTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterWorkflowTypeInput"} - if s.DefaultLambdaRole != nil && len(*s.DefaultLambdaRole) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DefaultLambdaRole", 1)) - } - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - if s.DefaultTaskList != nil { - if err := s.DefaultTaskList.Validate(); err != nil { - invalidParams.AddNested("DefaultTaskList", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultChildPolicy sets the DefaultChildPolicy field's value. -func (s *RegisterWorkflowTypeInput) SetDefaultChildPolicy(v string) *RegisterWorkflowTypeInput { - s.DefaultChildPolicy = &v - return s -} - -// SetDefaultExecutionStartToCloseTimeout sets the DefaultExecutionStartToCloseTimeout field's value. -func (s *RegisterWorkflowTypeInput) SetDefaultExecutionStartToCloseTimeout(v string) *RegisterWorkflowTypeInput { - s.DefaultExecutionStartToCloseTimeout = &v - return s -} - -// SetDefaultLambdaRole sets the DefaultLambdaRole field's value. -func (s *RegisterWorkflowTypeInput) SetDefaultLambdaRole(v string) *RegisterWorkflowTypeInput { - s.DefaultLambdaRole = &v - return s -} - -// SetDefaultTaskList sets the DefaultTaskList field's value. -func (s *RegisterWorkflowTypeInput) SetDefaultTaskList(v *TaskList) *RegisterWorkflowTypeInput { - s.DefaultTaskList = v - return s -} - -// SetDefaultTaskPriority sets the DefaultTaskPriority field's value. -func (s *RegisterWorkflowTypeInput) SetDefaultTaskPriority(v string) *RegisterWorkflowTypeInput { - s.DefaultTaskPriority = &v - return s -} - -// SetDefaultTaskStartToCloseTimeout sets the DefaultTaskStartToCloseTimeout field's value. -func (s *RegisterWorkflowTypeInput) SetDefaultTaskStartToCloseTimeout(v string) *RegisterWorkflowTypeInput { - s.DefaultTaskStartToCloseTimeout = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *RegisterWorkflowTypeInput) SetDescription(v string) *RegisterWorkflowTypeInput { - s.Description = &v - return s -} - -// SetDomain sets the Domain field's value. -func (s *RegisterWorkflowTypeInput) SetDomain(v string) *RegisterWorkflowTypeInput { - s.Domain = &v - return s -} - -// SetName sets the Name field's value. -func (s *RegisterWorkflowTypeInput) SetName(v string) *RegisterWorkflowTypeInput { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *RegisterWorkflowTypeInput) SetVersion(v string) *RegisterWorkflowTypeInput { - s.Version = &v - return s -} - -type RegisterWorkflowTypeOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RegisterWorkflowTypeOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegisterWorkflowTypeOutput) GoString() string { - return s.String() -} - -// Provides the details of the RequestCancelActivityTask decision. -// -// Access Control -// -// You can use IAM policies to control this decision's access to Amazon SWF -// resources as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -type RequestCancelActivityTaskDecisionAttributes struct { - _ struct{} `type:"structure"` - - // The activityId of the activity task to be canceled. - // - // ActivityId is a required field - ActivityId *string `locationName:"activityId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RequestCancelActivityTaskDecisionAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestCancelActivityTaskDecisionAttributes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestCancelActivityTaskDecisionAttributes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestCancelActivityTaskDecisionAttributes"} - if s.ActivityId == nil { - invalidParams.Add(request.NewErrParamRequired("ActivityId")) - } - if s.ActivityId != nil && len(*s.ActivityId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ActivityId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivityId sets the ActivityId field's value. -func (s *RequestCancelActivityTaskDecisionAttributes) SetActivityId(v string) *RequestCancelActivityTaskDecisionAttributes { - s.ActivityId = &v - return s -} - -// Provides the details of the RequestCancelActivityTaskFailed event. -type RequestCancelActivityTaskFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The activityId provided in the RequestCancelActivityTask decision that failed. - // - // ActivityId is a required field - ActivityId *string `locationName:"activityId" min:"1" type:"string" required:"true"` - - // The cause of the failure. This information is generated by the system and - // can be useful for diagnostic purposes. - // - // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it - // lacked sufficient permissions. For details and example IAM policies, see - // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) - // in the Amazon SWF Developer Guide. - // - // Cause is a required field - Cause *string `locationName:"cause" type:"string" required:"true" enum:"RequestCancelActivityTaskFailedCause"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the RequestCancelActivityTask decision for this cancellation - // request. This information can be useful for diagnosing problems by tracing - // back the chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s RequestCancelActivityTaskFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestCancelActivityTaskFailedEventAttributes) GoString() string { - return s.String() -} - -// SetActivityId sets the ActivityId field's value. -func (s *RequestCancelActivityTaskFailedEventAttributes) SetActivityId(v string) *RequestCancelActivityTaskFailedEventAttributes { - s.ActivityId = &v - return s -} - -// SetCause sets the Cause field's value. -func (s *RequestCancelActivityTaskFailedEventAttributes) SetCause(v string) *RequestCancelActivityTaskFailedEventAttributes { - s.Cause = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *RequestCancelActivityTaskFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *RequestCancelActivityTaskFailedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// Provides the details of the RequestCancelExternalWorkflowExecution decision. -// -// Access Control -// -// You can use IAM policies to control this decision's access to Amazon SWF -// resources as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -type RequestCancelExternalWorkflowExecutionDecisionAttributes struct { - _ struct{} `type:"structure"` - - // The data attached to the event that can be used by the decider in subsequent - // workflow tasks. - Control *string `locationName:"control" type:"string"` - - // The runId of the external workflow execution to cancel. - RunId *string `locationName:"runId" type:"string"` - - // The workflowId of the external workflow execution to cancel. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RequestCancelExternalWorkflowExecutionDecisionAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestCancelExternalWorkflowExecutionDecisionAttributes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestCancelExternalWorkflowExecutionDecisionAttributes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestCancelExternalWorkflowExecutionDecisionAttributes"} - if s.WorkflowId == nil { - invalidParams.Add(request.NewErrParamRequired("WorkflowId")) - } - if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetControl sets the Control field's value. -func (s *RequestCancelExternalWorkflowExecutionDecisionAttributes) SetControl(v string) *RequestCancelExternalWorkflowExecutionDecisionAttributes { - s.Control = &v - return s -} - -// SetRunId sets the RunId field's value. -func (s *RequestCancelExternalWorkflowExecutionDecisionAttributes) SetRunId(v string) *RequestCancelExternalWorkflowExecutionDecisionAttributes { - s.RunId = &v - return s -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *RequestCancelExternalWorkflowExecutionDecisionAttributes) SetWorkflowId(v string) *RequestCancelExternalWorkflowExecutionDecisionAttributes { - s.WorkflowId = &v - return s -} - -// Provides the details of the RequestCancelExternalWorkflowExecutionFailed -// event. -type RequestCancelExternalWorkflowExecutionFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The cause of the failure. This information is generated by the system and - // can be useful for diagnostic purposes. - // - // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it - // lacked sufficient permissions. For details and example IAM policies, see - // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) - // in the Amazon SWF Developer Guide. - // - // Cause is a required field - Cause *string `locationName:"cause" type:"string" required:"true" enum:"RequestCancelExternalWorkflowExecutionFailedCause"` - - // The data attached to the event that the decider can use in subsequent workflow - // tasks. This data isn't sent to the workflow execution. - Control *string `locationName:"control" type:"string"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the RequestCancelExternalWorkflowExecution decision for - // this cancellation request. This information can be useful for diagnosing - // problems by tracing back the chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The ID of the RequestCancelExternalWorkflowExecutionInitiated event corresponding - // to the RequestCancelExternalWorkflowExecution decision to cancel this external - // workflow execution. This information can be useful for diagnosing problems - // by tracing back the chain of events leading up to this event. - // - // InitiatedEventId is a required field - InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` - - // The runId of the external workflow execution. - RunId *string `locationName:"runId" type:"string"` - - // The workflowId of the external workflow to which the cancel request was to - // be delivered. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RequestCancelExternalWorkflowExecutionFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestCancelExternalWorkflowExecutionFailedEventAttributes) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *RequestCancelExternalWorkflowExecutionFailedEventAttributes) SetCause(v string) *RequestCancelExternalWorkflowExecutionFailedEventAttributes { - s.Cause = &v - return s -} - -// SetControl sets the Control field's value. -func (s *RequestCancelExternalWorkflowExecutionFailedEventAttributes) SetControl(v string) *RequestCancelExternalWorkflowExecutionFailedEventAttributes { - s.Control = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *RequestCancelExternalWorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *RequestCancelExternalWorkflowExecutionFailedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetInitiatedEventId sets the InitiatedEventId field's value. -func (s *RequestCancelExternalWorkflowExecutionFailedEventAttributes) SetInitiatedEventId(v int64) *RequestCancelExternalWorkflowExecutionFailedEventAttributes { - s.InitiatedEventId = &v - return s -} - -// SetRunId sets the RunId field's value. -func (s *RequestCancelExternalWorkflowExecutionFailedEventAttributes) SetRunId(v string) *RequestCancelExternalWorkflowExecutionFailedEventAttributes { - s.RunId = &v - return s -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *RequestCancelExternalWorkflowExecutionFailedEventAttributes) SetWorkflowId(v string) *RequestCancelExternalWorkflowExecutionFailedEventAttributes { - s.WorkflowId = &v - return s -} - -// Provides the details of the RequestCancelExternalWorkflowExecutionInitiated -// event. -type RequestCancelExternalWorkflowExecutionInitiatedEventAttributes struct { - _ struct{} `type:"structure"` - - // Data attached to the event that can be used by the decider in subsequent - // workflow tasks. - Control *string `locationName:"control" type:"string"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the RequestCancelExternalWorkflowExecution decision for - // this cancellation request. This information can be useful for diagnosing - // problems by tracing back the chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The runId of the external workflow execution to be canceled. - RunId *string `locationName:"runId" type:"string"` - - // The workflowId of the external workflow execution to be canceled. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) GoString() string { - return s.String() -} - -// SetControl sets the Control field's value. -func (s *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) SetControl(v string) *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes { - s.Control = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetRunId sets the RunId field's value. -func (s *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) SetRunId(v string) *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes { - s.RunId = &v - return s -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) SetWorkflowId(v string) *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes { - s.WorkflowId = &v - return s -} - -type RequestCancelWorkflowExecutionInput struct { - _ struct{} `type:"structure"` - - // The name of the domain containing the workflow execution to cancel. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // The runId of the workflow execution to cancel. - RunId *string `locationName:"runId" type:"string"` - - // The workflowId of the workflow execution to cancel. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RequestCancelWorkflowExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestCancelWorkflowExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestCancelWorkflowExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestCancelWorkflowExecutionInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.WorkflowId == nil { - invalidParams.Add(request.NewErrParamRequired("WorkflowId")) - } - if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *RequestCancelWorkflowExecutionInput) SetDomain(v string) *RequestCancelWorkflowExecutionInput { - s.Domain = &v - return s -} - -// SetRunId sets the RunId field's value. -func (s *RequestCancelWorkflowExecutionInput) SetRunId(v string) *RequestCancelWorkflowExecutionInput { - s.RunId = &v - return s -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *RequestCancelWorkflowExecutionInput) SetWorkflowId(v string) *RequestCancelWorkflowExecutionInput { - s.WorkflowId = &v - return s -} - -type RequestCancelWorkflowExecutionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RequestCancelWorkflowExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RequestCancelWorkflowExecutionOutput) GoString() string { - return s.String() -} - -type RespondActivityTaskCanceledInput struct { - _ struct{} `type:"structure"` - - // Information about the cancellation. - Details *string `locationName:"details" type:"string"` - - // The taskToken of the ActivityTask. - // - // taskToken is generated by the service and should be treated as an opaque - // value. If the task is passed to another process, its taskToken must also - // be passed. This enables it to provide its progress and respond with results. - // - // TaskToken is a required field - TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RespondActivityTaskCanceledInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RespondActivityTaskCanceledInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RespondActivityTaskCanceledInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RespondActivityTaskCanceledInput"} - if s.TaskToken == nil { - invalidParams.Add(request.NewErrParamRequired("TaskToken")) - } - if s.TaskToken != nil && len(*s.TaskToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetails sets the Details field's value. -func (s *RespondActivityTaskCanceledInput) SetDetails(v string) *RespondActivityTaskCanceledInput { - s.Details = &v - return s -} - -// SetTaskToken sets the TaskToken field's value. -func (s *RespondActivityTaskCanceledInput) SetTaskToken(v string) *RespondActivityTaskCanceledInput { - s.TaskToken = &v - return s -} - -type RespondActivityTaskCanceledOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RespondActivityTaskCanceledOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RespondActivityTaskCanceledOutput) GoString() string { - return s.String() -} - -type RespondActivityTaskCompletedInput struct { - _ struct{} `type:"structure"` - - // The result of the activity task. It is a free form string that is implementation - // specific. - Result *string `locationName:"result" type:"string"` - - // The taskToken of the ActivityTask. - // - // taskToken is generated by the service and should be treated as an opaque - // value. If the task is passed to another process, its taskToken must also - // be passed. This enables it to provide its progress and respond with results. - // - // TaskToken is a required field - TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RespondActivityTaskCompletedInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RespondActivityTaskCompletedInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RespondActivityTaskCompletedInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RespondActivityTaskCompletedInput"} - if s.TaskToken == nil { - invalidParams.Add(request.NewErrParamRequired("TaskToken")) - } - if s.TaskToken != nil && len(*s.TaskToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResult sets the Result field's value. -func (s *RespondActivityTaskCompletedInput) SetResult(v string) *RespondActivityTaskCompletedInput { - s.Result = &v - return s -} - -// SetTaskToken sets the TaskToken field's value. -func (s *RespondActivityTaskCompletedInput) SetTaskToken(v string) *RespondActivityTaskCompletedInput { - s.TaskToken = &v - return s -} - -type RespondActivityTaskCompletedOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RespondActivityTaskCompletedOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RespondActivityTaskCompletedOutput) GoString() string { - return s.String() -} - -type RespondActivityTaskFailedInput struct { - _ struct{} `type:"structure"` - - // Detailed information about the failure. - Details *string `locationName:"details" type:"string"` - - // Description of the error that may assist in diagnostics. - Reason *string `locationName:"reason" type:"string"` - - // The taskToken of the ActivityTask. - // - // taskToken is generated by the service and should be treated as an opaque - // value. If the task is passed to another process, its taskToken must also - // be passed. This enables it to provide its progress and respond with results. - // - // TaskToken is a required field - TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RespondActivityTaskFailedInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RespondActivityTaskFailedInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RespondActivityTaskFailedInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RespondActivityTaskFailedInput"} - if s.TaskToken == nil { - invalidParams.Add(request.NewErrParamRequired("TaskToken")) - } - if s.TaskToken != nil && len(*s.TaskToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDetails sets the Details field's value. -func (s *RespondActivityTaskFailedInput) SetDetails(v string) *RespondActivityTaskFailedInput { - s.Details = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *RespondActivityTaskFailedInput) SetReason(v string) *RespondActivityTaskFailedInput { - s.Reason = &v - return s -} - -// SetTaskToken sets the TaskToken field's value. -func (s *RespondActivityTaskFailedInput) SetTaskToken(v string) *RespondActivityTaskFailedInput { - s.TaskToken = &v - return s -} - -type RespondActivityTaskFailedOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RespondActivityTaskFailedOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RespondActivityTaskFailedOutput) GoString() string { - return s.String() -} - -// Input data for a TaskCompleted response to a decision task. -type RespondDecisionTaskCompletedInput struct { - _ struct{} `type:"structure"` - - // The list of decisions (possibly empty) made by the decider while processing - // this decision task. See the docs for the Decision structure for details. - Decisions []*Decision `locationName:"decisions" type:"list"` - - // User defined context to add to workflow execution. - ExecutionContext *string `locationName:"executionContext" type:"string"` - - // The taskToken from the DecisionTask. - // - // taskToken is generated by the service and should be treated as an opaque - // value. If the task is passed to another process, its taskToken must also - // be passed. This enables it to provide its progress and respond with results. - // - // TaskToken is a required field - TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RespondDecisionTaskCompletedInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RespondDecisionTaskCompletedInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RespondDecisionTaskCompletedInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RespondDecisionTaskCompletedInput"} - if s.TaskToken == nil { - invalidParams.Add(request.NewErrParamRequired("TaskToken")) - } - if s.TaskToken != nil && len(*s.TaskToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskToken", 1)) - } - if s.Decisions != nil { - for i, v := range s.Decisions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Decisions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDecisions sets the Decisions field's value. -func (s *RespondDecisionTaskCompletedInput) SetDecisions(v []*Decision) *RespondDecisionTaskCompletedInput { - s.Decisions = v - return s -} - -// SetExecutionContext sets the ExecutionContext field's value. -func (s *RespondDecisionTaskCompletedInput) SetExecutionContext(v string) *RespondDecisionTaskCompletedInput { - s.ExecutionContext = &v - return s -} - -// SetTaskToken sets the TaskToken field's value. -func (s *RespondDecisionTaskCompletedInput) SetTaskToken(v string) *RespondDecisionTaskCompletedInput { - s.TaskToken = &v - return s -} - -type RespondDecisionTaskCompletedOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RespondDecisionTaskCompletedOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RespondDecisionTaskCompletedOutput) GoString() string { - return s.String() -} - -// Provides the details of the ScheduleActivityTask decision. -// -// Access Control -// -// You can use IAM policies to control this decision's access to Amazon SWF -// resources as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the following parameters by using a Condition element with -// the appropriate keys. -// -// activityType.name – String constraint. The key is swf:activityType.name. -// -// activityType.version – String constraint. The key is swf:activityType.version. -// -// taskList – String constraint. The key is swf:taskList.name. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -type ScheduleActivityTaskDecisionAttributes struct { - _ struct{} `type:"structure"` - - // The activityId of the activity task. - // - // The specified string must not start or end with whitespace. It must not contain - // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f - // | \u007f-\u009f). Also, it must not contain the literal string arn. - // - // ActivityId is a required field - ActivityId *string `locationName:"activityId" min:"1" type:"string" required:"true"` - - // The type of the activity task to schedule. - // - // ActivityType is a required field - ActivityType *ActivityType `locationName:"activityType" type:"structure" required:"true"` - - // Data attached to the event that can be used by the decider in subsequent - // workflow tasks. This data isn't sent to the activity. - Control *string `locationName:"control" type:"string"` - - // If set, specifies the maximum time before which a worker processing a task - // of this type must report progress by calling RecordActivityTaskHeartbeat. - // If the timeout is exceeded, the activity task is automatically timed out. - // If the worker subsequently attempts to record a heartbeat or returns a result, - // it is ignored. This overrides the default heartbeat timeout specified when - // registering the activity type using RegisterActivityType. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - HeartbeatTimeout *string `locationName:"heartbeatTimeout" type:"string"` - - // The input provided to the activity task. - Input *string `locationName:"input" type:"string"` - - // The maximum duration for this activity task. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - // - // A schedule-to-close timeout for this activity task must be specified either - // as a default for the activity type or through this field. If neither this - // field is set nor a default schedule-to-close timeout was specified at registration - // time then a fault is returned. - ScheduleToCloseTimeout *string `locationName:"scheduleToCloseTimeout" type:"string"` - - // If set, specifies the maximum duration the activity task can wait to be assigned - // to a worker. This overrides the default schedule-to-start timeout specified - // when registering the activity type using RegisterActivityType. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - // - // A schedule-to-start timeout for this activity task must be specified either - // as a default for the activity type or through this field. If neither this - // field is set nor a default schedule-to-start timeout was specified at registration - // time then a fault is returned. - ScheduleToStartTimeout *string `locationName:"scheduleToStartTimeout" type:"string"` - - // If set, specifies the maximum duration a worker may take to process this - // activity task. This overrides the default start-to-close timeout specified - // when registering the activity type using RegisterActivityType. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - // - // A start-to-close timeout for this activity task must be specified either - // as a default for the activity type or through this field. If neither this - // field is set nor a default start-to-close timeout was specified at registration - // time then a fault is returned. - StartToCloseTimeout *string `locationName:"startToCloseTimeout" type:"string"` - - // If set, specifies the name of the task list in which to schedule the activity - // task. If not specified, the defaultTaskList registered with the activity - // type is used. - // - // A task list for this activity task must be specified either as a default - // for the activity type or through this field. If neither this field is set - // nor a default task list was specified at registration time then a fault is - // returned. - // - // The specified string must not start or end with whitespace. It must not contain - // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f - // | \u007f-\u009f). Also, it must not contain the literal string arn. - TaskList *TaskList `locationName:"taskList" type:"structure"` - - // If set, specifies the priority with which the activity task is to be assigned - // to a worker. This overrides the defaultTaskPriority specified when registering - // the activity type using RegisterActivityType. Valid values are integers that - // range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). - // Higher numbers indicate higher priority. - // - // For more information about setting task priority, see Setting Task Priority - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) - // in the Amazon SWF Developer Guide. - TaskPriority *string `locationName:"taskPriority" type:"string"` -} - -// String returns the string representation -func (s ScheduleActivityTaskDecisionAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduleActivityTaskDecisionAttributes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScheduleActivityTaskDecisionAttributes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScheduleActivityTaskDecisionAttributes"} - if s.ActivityId == nil { - invalidParams.Add(request.NewErrParamRequired("ActivityId")) - } - if s.ActivityId != nil && len(*s.ActivityId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ActivityId", 1)) - } - if s.ActivityType == nil { - invalidParams.Add(request.NewErrParamRequired("ActivityType")) - } - if s.ActivityType != nil { - if err := s.ActivityType.Validate(); err != nil { - invalidParams.AddNested("ActivityType", err.(request.ErrInvalidParams)) - } - } - if s.TaskList != nil { - if err := s.TaskList.Validate(); err != nil { - invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActivityId sets the ActivityId field's value. -func (s *ScheduleActivityTaskDecisionAttributes) SetActivityId(v string) *ScheduleActivityTaskDecisionAttributes { - s.ActivityId = &v - return s -} - -// SetActivityType sets the ActivityType field's value. -func (s *ScheduleActivityTaskDecisionAttributes) SetActivityType(v *ActivityType) *ScheduleActivityTaskDecisionAttributes { - s.ActivityType = v - return s -} - -// SetControl sets the Control field's value. -func (s *ScheduleActivityTaskDecisionAttributes) SetControl(v string) *ScheduleActivityTaskDecisionAttributes { - s.Control = &v - return s -} - -// SetHeartbeatTimeout sets the HeartbeatTimeout field's value. -func (s *ScheduleActivityTaskDecisionAttributes) SetHeartbeatTimeout(v string) *ScheduleActivityTaskDecisionAttributes { - s.HeartbeatTimeout = &v - return s -} - -// SetInput sets the Input field's value. -func (s *ScheduleActivityTaskDecisionAttributes) SetInput(v string) *ScheduleActivityTaskDecisionAttributes { - s.Input = &v - return s -} - -// SetScheduleToCloseTimeout sets the ScheduleToCloseTimeout field's value. -func (s *ScheduleActivityTaskDecisionAttributes) SetScheduleToCloseTimeout(v string) *ScheduleActivityTaskDecisionAttributes { - s.ScheduleToCloseTimeout = &v - return s -} - -// SetScheduleToStartTimeout sets the ScheduleToStartTimeout field's value. -func (s *ScheduleActivityTaskDecisionAttributes) SetScheduleToStartTimeout(v string) *ScheduleActivityTaskDecisionAttributes { - s.ScheduleToStartTimeout = &v - return s -} - -// SetStartToCloseTimeout sets the StartToCloseTimeout field's value. -func (s *ScheduleActivityTaskDecisionAttributes) SetStartToCloseTimeout(v string) *ScheduleActivityTaskDecisionAttributes { - s.StartToCloseTimeout = &v - return s -} - -// SetTaskList sets the TaskList field's value. -func (s *ScheduleActivityTaskDecisionAttributes) SetTaskList(v *TaskList) *ScheduleActivityTaskDecisionAttributes { - s.TaskList = v - return s -} - -// SetTaskPriority sets the TaskPriority field's value. -func (s *ScheduleActivityTaskDecisionAttributes) SetTaskPriority(v string) *ScheduleActivityTaskDecisionAttributes { - s.TaskPriority = &v - return s -} - -// Provides the details of the ScheduleActivityTaskFailed event. -type ScheduleActivityTaskFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The activityId provided in the ScheduleActivityTask decision that failed. - // - // ActivityId is a required field - ActivityId *string `locationName:"activityId" min:"1" type:"string" required:"true"` - - // The activity type provided in the ScheduleActivityTask decision that failed. - // - // ActivityType is a required field - ActivityType *ActivityType `locationName:"activityType" type:"structure" required:"true"` - - // The cause of the failure. This information is generated by the system and - // can be useful for diagnostic purposes. - // - // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it - // lacked sufficient permissions. For details and example IAM policies, see - // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) - // in the Amazon SWF Developer Guide. - // - // Cause is a required field - Cause *string `locationName:"cause" type:"string" required:"true" enum:"ScheduleActivityTaskFailedCause"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision that - // resulted in the scheduling of this activity task. This information can be - // useful for diagnosing problems by tracing back the chain of events leading - // up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` -} - -// String returns the string representation -func (s ScheduleActivityTaskFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduleActivityTaskFailedEventAttributes) GoString() string { - return s.String() -} - -// SetActivityId sets the ActivityId field's value. -func (s *ScheduleActivityTaskFailedEventAttributes) SetActivityId(v string) *ScheduleActivityTaskFailedEventAttributes { - s.ActivityId = &v - return s -} - -// SetActivityType sets the ActivityType field's value. -func (s *ScheduleActivityTaskFailedEventAttributes) SetActivityType(v *ActivityType) *ScheduleActivityTaskFailedEventAttributes { - s.ActivityType = v - return s -} - -// SetCause sets the Cause field's value. -func (s *ScheduleActivityTaskFailedEventAttributes) SetCause(v string) *ScheduleActivityTaskFailedEventAttributes { - s.Cause = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *ScheduleActivityTaskFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *ScheduleActivityTaskFailedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// Decision attributes specified in scheduleLambdaFunctionDecisionAttributes -// within the list of decisions decisions passed to RespondDecisionTaskCompleted. -type ScheduleLambdaFunctionDecisionAttributes struct { - _ struct{} `type:"structure"` - - // The data attached to the event that the decider can use in subsequent workflow - // tasks. This data isn't sent to the Lambda task. - Control *string `locationName:"control" type:"string"` - - // A string that identifies the Lambda function execution in the event history. - // - // Id is a required field - Id *string `locationName:"id" min:"1" type:"string" required:"true"` - - // The optional input data to be supplied to the Lambda function. - Input *string `locationName:"input" type:"string"` - - // The name, or ARN, of the Lambda function to schedule. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The timeout value, in seconds, after which the Lambda function is considered - // to be failed once it has started. This can be any integer from 1-300 (1s-5m). - // If no value is supplied, than a default value of 300s is assumed. - StartToCloseTimeout *string `locationName:"startToCloseTimeout" type:"string"` -} - -// String returns the string representation -func (s ScheduleLambdaFunctionDecisionAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduleLambdaFunctionDecisionAttributes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScheduleLambdaFunctionDecisionAttributes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScheduleLambdaFunctionDecisionAttributes"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetControl sets the Control field's value. -func (s *ScheduleLambdaFunctionDecisionAttributes) SetControl(v string) *ScheduleLambdaFunctionDecisionAttributes { - s.Control = &v - return s -} - -// SetId sets the Id field's value. -func (s *ScheduleLambdaFunctionDecisionAttributes) SetId(v string) *ScheduleLambdaFunctionDecisionAttributes { - s.Id = &v - return s -} - -// SetInput sets the Input field's value. -func (s *ScheduleLambdaFunctionDecisionAttributes) SetInput(v string) *ScheduleLambdaFunctionDecisionAttributes { - s.Input = &v - return s -} - -// SetName sets the Name field's value. -func (s *ScheduleLambdaFunctionDecisionAttributes) SetName(v string) *ScheduleLambdaFunctionDecisionAttributes { - s.Name = &v - return s -} - -// SetStartToCloseTimeout sets the StartToCloseTimeout field's value. -func (s *ScheduleLambdaFunctionDecisionAttributes) SetStartToCloseTimeout(v string) *ScheduleLambdaFunctionDecisionAttributes { - s.StartToCloseTimeout = &v - return s -} - -// Provides the details of the ScheduleLambdaFunctionFailed event. It isn't -// set for other event types. -type ScheduleLambdaFunctionFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The cause of the failure. To help diagnose issues, use this information to - // trace back the chain of events leading up to this event. - // - // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it - // lacked sufficient permissions. For details and example IAM policies, see - // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) - // in the Amazon SWF Developer Guide. - // - // Cause is a required field - Cause *string `locationName:"cause" type:"string" required:"true" enum:"ScheduleLambdaFunctionFailedCause"` - - // The ID of the LambdaFunctionCompleted event corresponding to the decision - // that resulted in scheduling this Lambda task. To help diagnose issues, use - // this information to trace back the chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The ID provided in the ScheduleLambdaFunction decision that failed. - // - // Id is a required field - Id *string `locationName:"id" min:"1" type:"string" required:"true"` - - // The name of the Lambda function. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ScheduleLambdaFunctionFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ScheduleLambdaFunctionFailedEventAttributes) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *ScheduleLambdaFunctionFailedEventAttributes) SetCause(v string) *ScheduleLambdaFunctionFailedEventAttributes { - s.Cause = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *ScheduleLambdaFunctionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *ScheduleLambdaFunctionFailedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetId sets the Id field's value. -func (s *ScheduleLambdaFunctionFailedEventAttributes) SetId(v string) *ScheduleLambdaFunctionFailedEventAttributes { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *ScheduleLambdaFunctionFailedEventAttributes) SetName(v string) *ScheduleLambdaFunctionFailedEventAttributes { - s.Name = &v - return s -} - -// Provides the details of the SignalExternalWorkflowExecution decision. -// -// Access Control -// -// You can use IAM policies to control this decision's access to Amazon SWF -// resources as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -type SignalExternalWorkflowExecutionDecisionAttributes struct { - _ struct{} `type:"structure"` - - // The data attached to the event that can be used by the decider in subsequent - // decision tasks. - Control *string `locationName:"control" type:"string"` - - // The input data to be provided with the signal. The target workflow execution - // uses the signal name and input data to process the signal. - Input *string `locationName:"input" type:"string"` - - // The runId of the workflow execution to be signaled. - RunId *string `locationName:"runId" type:"string"` - - // The name of the signal.The target workflow execution uses the signal name - // and input to process the signal. - // - // SignalName is a required field - SignalName *string `locationName:"signalName" min:"1" type:"string" required:"true"` - - // The workflowId of the workflow execution to be signaled. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SignalExternalWorkflowExecutionDecisionAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SignalExternalWorkflowExecutionDecisionAttributes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SignalExternalWorkflowExecutionDecisionAttributes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SignalExternalWorkflowExecutionDecisionAttributes"} - if s.SignalName == nil { - invalidParams.Add(request.NewErrParamRequired("SignalName")) - } - if s.SignalName != nil && len(*s.SignalName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SignalName", 1)) - } - if s.WorkflowId == nil { - invalidParams.Add(request.NewErrParamRequired("WorkflowId")) - } - if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetControl sets the Control field's value. -func (s *SignalExternalWorkflowExecutionDecisionAttributes) SetControl(v string) *SignalExternalWorkflowExecutionDecisionAttributes { - s.Control = &v - return s -} - -// SetInput sets the Input field's value. -func (s *SignalExternalWorkflowExecutionDecisionAttributes) SetInput(v string) *SignalExternalWorkflowExecutionDecisionAttributes { - s.Input = &v - return s -} - -// SetRunId sets the RunId field's value. -func (s *SignalExternalWorkflowExecutionDecisionAttributes) SetRunId(v string) *SignalExternalWorkflowExecutionDecisionAttributes { - s.RunId = &v - return s -} - -// SetSignalName sets the SignalName field's value. -func (s *SignalExternalWorkflowExecutionDecisionAttributes) SetSignalName(v string) *SignalExternalWorkflowExecutionDecisionAttributes { - s.SignalName = &v - return s -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *SignalExternalWorkflowExecutionDecisionAttributes) SetWorkflowId(v string) *SignalExternalWorkflowExecutionDecisionAttributes { - s.WorkflowId = &v - return s -} - -// Provides the details of the SignalExternalWorkflowExecutionFailed event. -type SignalExternalWorkflowExecutionFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The cause of the failure. This information is generated by the system and - // can be useful for diagnostic purposes. - // - // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it - // lacked sufficient permissions. For details and example IAM policies, see - // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) - // in the Amazon SWF Developer Guide. - // - // Cause is a required field - Cause *string `locationName:"cause" type:"string" required:"true" enum:"SignalExternalWorkflowExecutionFailedCause"` - - // The data attached to the event that the decider can use in subsequent workflow - // tasks. This data isn't sent to the workflow execution. - Control *string `locationName:"control" type:"string"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the SignalExternalWorkflowExecution decision for this signal. - // This information can be useful for diagnosing problems by tracing back the - // chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The ID of the SignalExternalWorkflowExecutionInitiated event corresponding - // to the SignalExternalWorkflowExecution decision to request this signal. This - // information can be useful for diagnosing problems by tracing back the chain - // of events leading up to this event. - // - // InitiatedEventId is a required field - InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` - - // The runId of the external workflow execution that the signal was being delivered - // to. - RunId *string `locationName:"runId" type:"string"` - - // The workflowId of the external workflow execution that the signal was being - // delivered to. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SignalExternalWorkflowExecutionFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SignalExternalWorkflowExecutionFailedEventAttributes) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *SignalExternalWorkflowExecutionFailedEventAttributes) SetCause(v string) *SignalExternalWorkflowExecutionFailedEventAttributes { - s.Cause = &v - return s -} - -// SetControl sets the Control field's value. -func (s *SignalExternalWorkflowExecutionFailedEventAttributes) SetControl(v string) *SignalExternalWorkflowExecutionFailedEventAttributes { - s.Control = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *SignalExternalWorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *SignalExternalWorkflowExecutionFailedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetInitiatedEventId sets the InitiatedEventId field's value. -func (s *SignalExternalWorkflowExecutionFailedEventAttributes) SetInitiatedEventId(v int64) *SignalExternalWorkflowExecutionFailedEventAttributes { - s.InitiatedEventId = &v - return s -} - -// SetRunId sets the RunId field's value. -func (s *SignalExternalWorkflowExecutionFailedEventAttributes) SetRunId(v string) *SignalExternalWorkflowExecutionFailedEventAttributes { - s.RunId = &v - return s -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *SignalExternalWorkflowExecutionFailedEventAttributes) SetWorkflowId(v string) *SignalExternalWorkflowExecutionFailedEventAttributes { - s.WorkflowId = &v - return s -} - -// Provides the details of the SignalExternalWorkflowExecutionInitiated event. -type SignalExternalWorkflowExecutionInitiatedEventAttributes struct { - _ struct{} `type:"structure"` - - // Data attached to the event that can be used by the decider in subsequent - // decision tasks. - Control *string `locationName:"control" type:"string"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the SignalExternalWorkflowExecution decision for this signal. - // This information can be useful for diagnosing problems by tracing back the - // chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The input provided to the signal. - Input *string `locationName:"input" type:"string"` - - // The runId of the external workflow execution to send the signal to. - RunId *string `locationName:"runId" type:"string"` - - // The name of the signal. - // - // SignalName is a required field - SignalName *string `locationName:"signalName" min:"1" type:"string" required:"true"` - - // The workflowId of the external workflow execution. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SignalExternalWorkflowExecutionInitiatedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SignalExternalWorkflowExecutionInitiatedEventAttributes) GoString() string { - return s.String() -} - -// SetControl sets the Control field's value. -func (s *SignalExternalWorkflowExecutionInitiatedEventAttributes) SetControl(v string) *SignalExternalWorkflowExecutionInitiatedEventAttributes { - s.Control = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *SignalExternalWorkflowExecutionInitiatedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *SignalExternalWorkflowExecutionInitiatedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetInput sets the Input field's value. -func (s *SignalExternalWorkflowExecutionInitiatedEventAttributes) SetInput(v string) *SignalExternalWorkflowExecutionInitiatedEventAttributes { - s.Input = &v - return s -} - -// SetRunId sets the RunId field's value. -func (s *SignalExternalWorkflowExecutionInitiatedEventAttributes) SetRunId(v string) *SignalExternalWorkflowExecutionInitiatedEventAttributes { - s.RunId = &v - return s -} - -// SetSignalName sets the SignalName field's value. -func (s *SignalExternalWorkflowExecutionInitiatedEventAttributes) SetSignalName(v string) *SignalExternalWorkflowExecutionInitiatedEventAttributes { - s.SignalName = &v - return s -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *SignalExternalWorkflowExecutionInitiatedEventAttributes) SetWorkflowId(v string) *SignalExternalWorkflowExecutionInitiatedEventAttributes { - s.WorkflowId = &v - return s -} - -type SignalWorkflowExecutionInput struct { - _ struct{} `type:"structure"` - - // The name of the domain containing the workflow execution to signal. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // Data to attach to the WorkflowExecutionSignaled event in the target workflow - // execution's history. - Input *string `locationName:"input" type:"string"` - - // The runId of the workflow execution to signal. - RunId *string `locationName:"runId" type:"string"` - - // The name of the signal. This name must be meaningful to the target workflow. - // - // SignalName is a required field - SignalName *string `locationName:"signalName" min:"1" type:"string" required:"true"` - - // The workflowId of the workflow execution to signal. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SignalWorkflowExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SignalWorkflowExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SignalWorkflowExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SignalWorkflowExecutionInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.SignalName == nil { - invalidParams.Add(request.NewErrParamRequired("SignalName")) - } - if s.SignalName != nil && len(*s.SignalName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SignalName", 1)) - } - if s.WorkflowId == nil { - invalidParams.Add(request.NewErrParamRequired("WorkflowId")) - } - if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomain sets the Domain field's value. -func (s *SignalWorkflowExecutionInput) SetDomain(v string) *SignalWorkflowExecutionInput { - s.Domain = &v - return s -} - -// SetInput sets the Input field's value. -func (s *SignalWorkflowExecutionInput) SetInput(v string) *SignalWorkflowExecutionInput { - s.Input = &v - return s -} - -// SetRunId sets the RunId field's value. -func (s *SignalWorkflowExecutionInput) SetRunId(v string) *SignalWorkflowExecutionInput { - s.RunId = &v - return s -} - -// SetSignalName sets the SignalName field's value. -func (s *SignalWorkflowExecutionInput) SetSignalName(v string) *SignalWorkflowExecutionInput { - s.SignalName = &v - return s -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *SignalWorkflowExecutionInput) SetWorkflowId(v string) *SignalWorkflowExecutionInput { - s.WorkflowId = &v - return s -} - -type SignalWorkflowExecutionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SignalWorkflowExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SignalWorkflowExecutionOutput) GoString() string { - return s.String() -} - -// Provides the details of the StartChildWorkflowExecution decision. -// -// Access Control -// -// You can use IAM policies to control this decision's access to Amazon SWF -// resources as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * Constrain the following parameters by using a Condition element with -// the appropriate keys. -// -// tagList.member.N – The key is "swf:tagList.N" where N is the tag number from -// 0 to 4, inclusive. -// -// taskList – String constraint. The key is swf:taskList.name. -// -// workflowType.name – String constraint. The key is swf:workflowType.name. -// -// workflowType.version – String constraint. The key is swf:workflowType.version. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -type StartChildWorkflowExecutionDecisionAttributes struct { - _ struct{} `type:"structure"` - - // If set, specifies the policy to use for the child workflow executions if - // the workflow execution being started is terminated by calling the TerminateWorkflowExecution - // action explicitly or due to an expired timeout. This policy overrides the - // default child policy specified when registering the workflow type using RegisterWorkflowType. - // - // The supported child policies are: - // - // * TERMINATE – The child executions are terminated. - // - // * REQUEST_CANCEL – A request to cancel is attempted for each child execution - // by recording a WorkflowExecutionCancelRequested event in its history. - // It is up to the decider to take appropriate actions when it receives an - // execution history with this event. - // - // * ABANDON – No action is taken. The child executions continue to run. - // - // A child policy for this workflow execution must be specified either as a - // default for the workflow type or through this parameter. If neither this - // parameter is set nor a default child policy was specified at registration - // time then a fault is returned. - ChildPolicy *string `locationName:"childPolicy" type:"string" enum:"ChildPolicy"` - - // The data attached to the event that can be used by the decider in subsequent - // workflow tasks. This data isn't sent to the child workflow execution. - Control *string `locationName:"control" type:"string"` - - // The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout - // specified when registering the workflow type. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - // - // An execution start-to-close timeout for this workflow execution must be specified - // either as a default for the workflow type or through this parameter. If neither - // this parameter is set nor a default execution start-to-close timeout was - // specified at registration time then a fault is returned. - ExecutionStartToCloseTimeout *string `locationName:"executionStartToCloseTimeout" type:"string"` - - // The input to be provided to the workflow execution. - Input *string `locationName:"input" type:"string"` - - // The IAM role attached to the child workflow execution. - LambdaRole *string `locationName:"lambdaRole" min:"1" type:"string"` - - // The list of tags to associate with the child workflow execution. A maximum - // of 5 tags can be specified. You can list workflow executions with a specific - // tag by calling ListOpenWorkflowExecutions or ListClosedWorkflowExecutions - // and specifying a TagFilter. - TagList []*string `locationName:"tagList" type:"list"` - - // The name of the task list to be used for decision tasks of the child workflow - // execution. - // - // A task list for this workflow execution must be specified either as a default - // for the workflow type or through this parameter. If neither this parameter - // is set nor a default task list was specified at registration time then a - // fault is returned. - // - // The specified string must not start or end with whitespace. It must not contain - // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f - // | \u007f-\u009f). Also, it must not contain the literal string arn. - TaskList *TaskList `locationName:"taskList" type:"structure"` - - // A task priority that, if set, specifies the priority for a decision task - // of this workflow execution. This overrides the defaultTaskPriority specified - // when registering the workflow type. Valid values are integers that range - // from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). - // Higher numbers indicate higher priority. - // - // For more information about setting task priority, see Setting Task Priority - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) - // in the Amazon SWF Developer Guide. - TaskPriority *string `locationName:"taskPriority" type:"string"` - - // Specifies the maximum duration of decision tasks for this workflow execution. - // This parameter overrides the defaultTaskStartToCloseTimout specified when - // registering the workflow type using RegisterWorkflowType. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - // - // A task start-to-close timeout for this workflow execution must be specified - // either as a default for the workflow type or through this parameter. If neither - // this parameter is set nor a default task start-to-close timeout was specified - // at registration time then a fault is returned. - TaskStartToCloseTimeout *string `locationName:"taskStartToCloseTimeout" type:"string"` - - // The workflowId of the workflow execution. - // - // The specified string must not start or end with whitespace. It must not contain - // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f - // | \u007f-\u009f). Also, it must not contain the literal string arn. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` - - // The type of the workflow execution to be started. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s StartChildWorkflowExecutionDecisionAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartChildWorkflowExecutionDecisionAttributes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartChildWorkflowExecutionDecisionAttributes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartChildWorkflowExecutionDecisionAttributes"} - if s.LambdaRole != nil && len(*s.LambdaRole) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LambdaRole", 1)) - } - if s.WorkflowId == nil { - invalidParams.Add(request.NewErrParamRequired("WorkflowId")) - } - if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) - } - if s.WorkflowType == nil { - invalidParams.Add(request.NewErrParamRequired("WorkflowType")) - } - if s.TaskList != nil { - if err := s.TaskList.Validate(); err != nil { - invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) - } - } - if s.WorkflowType != nil { - if err := s.WorkflowType.Validate(); err != nil { - invalidParams.AddNested("WorkflowType", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChildPolicy sets the ChildPolicy field's value. -func (s *StartChildWorkflowExecutionDecisionAttributes) SetChildPolicy(v string) *StartChildWorkflowExecutionDecisionAttributes { - s.ChildPolicy = &v - return s -} - -// SetControl sets the Control field's value. -func (s *StartChildWorkflowExecutionDecisionAttributes) SetControl(v string) *StartChildWorkflowExecutionDecisionAttributes { - s.Control = &v - return s -} - -// SetExecutionStartToCloseTimeout sets the ExecutionStartToCloseTimeout field's value. -func (s *StartChildWorkflowExecutionDecisionAttributes) SetExecutionStartToCloseTimeout(v string) *StartChildWorkflowExecutionDecisionAttributes { - s.ExecutionStartToCloseTimeout = &v - return s -} - -// SetInput sets the Input field's value. -func (s *StartChildWorkflowExecutionDecisionAttributes) SetInput(v string) *StartChildWorkflowExecutionDecisionAttributes { - s.Input = &v - return s -} - -// SetLambdaRole sets the LambdaRole field's value. -func (s *StartChildWorkflowExecutionDecisionAttributes) SetLambdaRole(v string) *StartChildWorkflowExecutionDecisionAttributes { - s.LambdaRole = &v - return s -} - -// SetTagList sets the TagList field's value. -func (s *StartChildWorkflowExecutionDecisionAttributes) SetTagList(v []*string) *StartChildWorkflowExecutionDecisionAttributes { - s.TagList = v - return s -} - -// SetTaskList sets the TaskList field's value. -func (s *StartChildWorkflowExecutionDecisionAttributes) SetTaskList(v *TaskList) *StartChildWorkflowExecutionDecisionAttributes { - s.TaskList = v - return s -} - -// SetTaskPriority sets the TaskPriority field's value. -func (s *StartChildWorkflowExecutionDecisionAttributes) SetTaskPriority(v string) *StartChildWorkflowExecutionDecisionAttributes { - s.TaskPriority = &v - return s -} - -// SetTaskStartToCloseTimeout sets the TaskStartToCloseTimeout field's value. -func (s *StartChildWorkflowExecutionDecisionAttributes) SetTaskStartToCloseTimeout(v string) *StartChildWorkflowExecutionDecisionAttributes { - s.TaskStartToCloseTimeout = &v - return s -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *StartChildWorkflowExecutionDecisionAttributes) SetWorkflowId(v string) *StartChildWorkflowExecutionDecisionAttributes { - s.WorkflowId = &v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *StartChildWorkflowExecutionDecisionAttributes) SetWorkflowType(v *WorkflowType) *StartChildWorkflowExecutionDecisionAttributes { - s.WorkflowType = v - return s -} - -// Provides the details of the StartChildWorkflowExecutionFailed event. -type StartChildWorkflowExecutionFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The cause of the failure. This information is generated by the system and - // can be useful for diagnostic purposes. - // - // When cause is set to OPERATION_NOT_PERMITTED, the decision fails because - // it lacks sufficient permissions. For details and example IAM policies, see - // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) - // in the Amazon SWF Developer Guide. - // - // Cause is a required field - Cause *string `locationName:"cause" type:"string" required:"true" enum:"StartChildWorkflowExecutionFailedCause"` - - // The data attached to the event that the decider can use in subsequent workflow - // tasks. This data isn't sent to the child workflow execution. - Control *string `locationName:"control" type:"string"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the StartChildWorkflowExecutionDecision to request this - // child workflow execution. This information can be useful for diagnosing problems - // by tracing back the chain of events. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // When the cause is WORKFLOW_ALREADY_RUNNING, initiatedEventId is the ID of - // the StartChildWorkflowExecutionInitiated event that corresponds to the StartChildWorkflowExecutionDecision - // to start the workflow execution. You can use this information to diagnose - // problems by tracing back the chain of events leading up to this event. - // - // When the cause isn't WORKFLOW_ALREADY_RUNNING, initiatedEventId is set to - // 0 because the StartChildWorkflowExecutionInitiated event doesn't exist. - // - // InitiatedEventId is a required field - InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` - - // The workflowId of the child workflow execution. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` - - // The workflow type provided in the StartChildWorkflowExecutionDecision that - // failed. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s StartChildWorkflowExecutionFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartChildWorkflowExecutionFailedEventAttributes) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *StartChildWorkflowExecutionFailedEventAttributes) SetCause(v string) *StartChildWorkflowExecutionFailedEventAttributes { - s.Cause = &v - return s -} - -// SetControl sets the Control field's value. -func (s *StartChildWorkflowExecutionFailedEventAttributes) SetControl(v string) *StartChildWorkflowExecutionFailedEventAttributes { - s.Control = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *StartChildWorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *StartChildWorkflowExecutionFailedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetInitiatedEventId sets the InitiatedEventId field's value. -func (s *StartChildWorkflowExecutionFailedEventAttributes) SetInitiatedEventId(v int64) *StartChildWorkflowExecutionFailedEventAttributes { - s.InitiatedEventId = &v - return s -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *StartChildWorkflowExecutionFailedEventAttributes) SetWorkflowId(v string) *StartChildWorkflowExecutionFailedEventAttributes { - s.WorkflowId = &v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *StartChildWorkflowExecutionFailedEventAttributes) SetWorkflowType(v *WorkflowType) *StartChildWorkflowExecutionFailedEventAttributes { - s.WorkflowType = v - return s -} - -// Provides the details of the StartChildWorkflowExecutionInitiated event. -type StartChildWorkflowExecutionInitiatedEventAttributes struct { - _ struct{} `type:"structure"` - - // The policy to use for the child workflow executions if this execution gets - // terminated by explicitly calling the TerminateWorkflowExecution action or - // due to an expired timeout. - // - // The supported child policies are: - // - // * TERMINATE – The child executions are terminated. - // - // * REQUEST_CANCEL – A request to cancel is attempted for each child execution - // by recording a WorkflowExecutionCancelRequested event in its history. - // It is up to the decider to take appropriate actions when it receives an - // execution history with this event. - // - // * ABANDON – No action is taken. The child executions continue to run. - // - // ChildPolicy is a required field - ChildPolicy *string `locationName:"childPolicy" type:"string" required:"true" enum:"ChildPolicy"` - - // Data attached to the event that can be used by the decider in subsequent - // decision tasks. This data isn't sent to the activity. - Control *string `locationName:"control" type:"string"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the StartChildWorkflowExecutionDecision to request this - // child workflow execution. This information can be useful for diagnosing problems - // by tracing back the cause of events. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The maximum duration for the child workflow execution. If the workflow execution - // isn't closed within this duration, it is timed out and force-terminated. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - ExecutionStartToCloseTimeout *string `locationName:"executionStartToCloseTimeout" type:"string"` - - // The inputs provided to the child workflow execution. - Input *string `locationName:"input" type:"string"` - - // The IAM role to attach to the child workflow execution. - LambdaRole *string `locationName:"lambdaRole" min:"1" type:"string"` - - // The list of tags to associated with the child workflow execution. - TagList []*string `locationName:"tagList" type:"list"` - - // The name of the task list used for the decision tasks of the child workflow - // execution. - // - // TaskList is a required field - TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` - - // The priority assigned for the decision tasks for this workflow execution. - // Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) - // to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. - // - // For more information about setting task priority, see Setting Task Priority - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) - // in the Amazon SWF Developer Guide. - TaskPriority *string `locationName:"taskPriority" type:"string"` - - // The maximum duration allowed for the decision tasks for this workflow execution. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - TaskStartToCloseTimeout *string `locationName:"taskStartToCloseTimeout" type:"string"` - - // The workflowId of the child workflow execution. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` - - // The type of the child workflow execution. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s StartChildWorkflowExecutionInitiatedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartChildWorkflowExecutionInitiatedEventAttributes) GoString() string { - return s.String() -} - -// SetChildPolicy sets the ChildPolicy field's value. -func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetChildPolicy(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { - s.ChildPolicy = &v - return s -} - -// SetControl sets the Control field's value. -func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetControl(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { - s.Control = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *StartChildWorkflowExecutionInitiatedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetExecutionStartToCloseTimeout sets the ExecutionStartToCloseTimeout field's value. -func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetExecutionStartToCloseTimeout(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { - s.ExecutionStartToCloseTimeout = &v - return s -} - -// SetInput sets the Input field's value. -func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetInput(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { - s.Input = &v - return s -} - -// SetLambdaRole sets the LambdaRole field's value. -func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetLambdaRole(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { - s.LambdaRole = &v - return s -} - -// SetTagList sets the TagList field's value. -func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetTagList(v []*string) *StartChildWorkflowExecutionInitiatedEventAttributes { - s.TagList = v - return s -} - -// SetTaskList sets the TaskList field's value. -func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetTaskList(v *TaskList) *StartChildWorkflowExecutionInitiatedEventAttributes { - s.TaskList = v - return s -} - -// SetTaskPriority sets the TaskPriority field's value. -func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetTaskPriority(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { - s.TaskPriority = &v - return s -} - -// SetTaskStartToCloseTimeout sets the TaskStartToCloseTimeout field's value. -func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetTaskStartToCloseTimeout(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { - s.TaskStartToCloseTimeout = &v - return s -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetWorkflowId(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { - s.WorkflowId = &v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetWorkflowType(v *WorkflowType) *StartChildWorkflowExecutionInitiatedEventAttributes { - s.WorkflowType = v - return s -} - -// Provides the details of the StartLambdaFunctionFailed event. It isn't set -// for other event types. -type StartLambdaFunctionFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The cause of the failure. To help diagnose issues, use this information to - // trace back the chain of events leading up to this event. - // - // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because the - // IAM role attached to the execution lacked sufficient permissions. For details - // and example IAM policies, see Lambda Tasks (http://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html) - // in the Amazon SWF Developer Guide. - Cause *string `locationName:"cause" type:"string" enum:"StartLambdaFunctionFailedCause"` - - // A description that can help diagnose the cause of the fault. - Message *string `locationName:"message" type:"string"` - - // The ID of the ActivityTaskScheduled event that was recorded when this activity - // task was scheduled. To help diagnose issues, use this information to trace - // back the chain of events leading up to this event. - ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long"` -} - -// String returns the string representation -func (s StartLambdaFunctionFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartLambdaFunctionFailedEventAttributes) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *StartLambdaFunctionFailedEventAttributes) SetCause(v string) *StartLambdaFunctionFailedEventAttributes { - s.Cause = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *StartLambdaFunctionFailedEventAttributes) SetMessage(v string) *StartLambdaFunctionFailedEventAttributes { - s.Message = &v - return s -} - -// SetScheduledEventId sets the ScheduledEventId field's value. -func (s *StartLambdaFunctionFailedEventAttributes) SetScheduledEventId(v int64) *StartLambdaFunctionFailedEventAttributes { - s.ScheduledEventId = &v - return s -} - -// Provides the details of the StartTimer decision. -// -// Access Control -// -// You can use IAM policies to control this decision's access to Amazon SWF -// resources as follows: -// -// * Use a Resource element with the domain name to limit the action to only -// specified domains. -// -// * Use an Action element to allow or deny permission to call this action. -// -// * You cannot use an IAM policy to constrain this action's parameters. -// -// If the caller doesn't have sufficient permissions to invoke the action, or -// the parameter values fall outside the specified constraints, the action fails. -// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. -// For details and example IAM policies, see Using IAM to Manage Access to Amazon -// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) -// in the Amazon SWF Developer Guide. -type StartTimerDecisionAttributes struct { - _ struct{} `type:"structure"` - - // The data attached to the event that can be used by the decider in subsequent - // workflow tasks. - Control *string `locationName:"control" type:"string"` - - // The duration to wait before firing the timer. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. - // - // StartToFireTimeout is a required field - StartToFireTimeout *string `locationName:"startToFireTimeout" min:"1" type:"string" required:"true"` - - // The unique ID of the timer. - // - // The specified string must not start or end with whitespace. It must not contain - // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f - // | \u007f-\u009f). Also, it must not contain the literal string arn. - // - // TimerId is a required field - TimerId *string `locationName:"timerId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartTimerDecisionAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartTimerDecisionAttributes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartTimerDecisionAttributes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartTimerDecisionAttributes"} - if s.StartToFireTimeout == nil { - invalidParams.Add(request.NewErrParamRequired("StartToFireTimeout")) - } - if s.StartToFireTimeout != nil && len(*s.StartToFireTimeout) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StartToFireTimeout", 1)) - } - if s.TimerId == nil { - invalidParams.Add(request.NewErrParamRequired("TimerId")) - } - if s.TimerId != nil && len(*s.TimerId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TimerId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetControl sets the Control field's value. -func (s *StartTimerDecisionAttributes) SetControl(v string) *StartTimerDecisionAttributes { - s.Control = &v - return s -} - -// SetStartToFireTimeout sets the StartToFireTimeout field's value. -func (s *StartTimerDecisionAttributes) SetStartToFireTimeout(v string) *StartTimerDecisionAttributes { - s.StartToFireTimeout = &v - return s -} - -// SetTimerId sets the TimerId field's value. -func (s *StartTimerDecisionAttributes) SetTimerId(v string) *StartTimerDecisionAttributes { - s.TimerId = &v - return s -} - -// Provides the details of the StartTimerFailed event. -type StartTimerFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The cause of the failure. This information is generated by the system and - // can be useful for diagnostic purposes. - // - // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it - // lacked sufficient permissions. For details and example IAM policies, see - // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) - // in the Amazon SWF Developer Guide. - // - // Cause is a required field - Cause *string `locationName:"cause" type:"string" required:"true" enum:"StartTimerFailedCause"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the StartTimer decision for this activity task. This information - // can be useful for diagnosing problems by tracing back the chain of events - // leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The timerId provided in the StartTimer decision that failed. - // - // TimerId is a required field - TimerId *string `locationName:"timerId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s StartTimerFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartTimerFailedEventAttributes) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *StartTimerFailedEventAttributes) SetCause(v string) *StartTimerFailedEventAttributes { - s.Cause = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *StartTimerFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *StartTimerFailedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetTimerId sets the TimerId field's value. -func (s *StartTimerFailedEventAttributes) SetTimerId(v string) *StartTimerFailedEventAttributes { - s.TimerId = &v - return s -} - -type StartWorkflowExecutionInput struct { - _ struct{} `type:"structure"` - - // If set, specifies the policy to use for the child workflow executions of - // this workflow execution if it is terminated, by calling the TerminateWorkflowExecution - // action explicitly or due to an expired timeout. This policy overrides the - // default child policy specified when registering the workflow type using RegisterWorkflowType. - // - // The supported child policies are: - // - // * TERMINATE – The child executions are terminated. - // - // * REQUEST_CANCEL – A request to cancel is attempted for each child execution - // by recording a WorkflowExecutionCancelRequested event in its history. - // It is up to the decider to take appropriate actions when it receives an - // execution history with this event. - // - // * ABANDON – No action is taken. The child executions continue to run. - // - // A child policy for this workflow execution must be specified either as a - // default for the workflow type or through this parameter. If neither this - // parameter is set nor a default child policy was specified at registration - // time then a fault is returned. - ChildPolicy *string `locationName:"childPolicy" type:"string" enum:"ChildPolicy"` - - // The name of the domain in which the workflow execution is created. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout - // specified when registering the workflow type. - // - // The duration is specified in seconds; an integer greater than or equal to - // 0. Exceeding this limit causes the workflow execution to time out. Unlike - // some of the other timeout parameters in Amazon SWF, you cannot specify a - // value of "NONE" for this timeout; there is a one-year max limit on the time - // that a workflow execution can run. - // - // An execution start-to-close timeout must be specified either through this - // parameter or as a default when the workflow type is registered. If neither - // this parameter nor a default execution start-to-close timeout is specified, - // a fault is returned. - ExecutionStartToCloseTimeout *string `locationName:"executionStartToCloseTimeout" type:"string"` - - // The input for the workflow execution. This is a free form string which should - // be meaningful to the workflow you are starting. This input is made available - // to the new workflow execution in the WorkflowExecutionStarted history event. - Input *string `locationName:"input" type:"string"` - - // The IAM role to attach to this workflow execution. - // - // Executions of this workflow type need IAM roles to invoke Lambda functions. - // If you don't attach an IAM role, any attempt to schedule a Lambda task fails. - // This results in a ScheduleLambdaFunctionFailed history event. For more information, - // see http://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html) - // in the Amazon SWF Developer Guide. - LambdaRole *string `locationName:"lambdaRole" min:"1" type:"string"` - - // The list of tags to associate with the workflow execution. You can specify - // a maximum of 5 tags. You can list workflow executions with a specific tag - // by calling ListOpenWorkflowExecutions or ListClosedWorkflowExecutions and - // specifying a TagFilter. - TagList []*string `locationName:"tagList" type:"list"` - - // The task list to use for the decision tasks generated for this workflow execution. - // This overrides the defaultTaskList specified when registering the workflow - // type. - // - // A task list for this workflow execution must be specified either as a default - // for the workflow type or through this parameter. If neither this parameter - // is set nor a default task list was specified at registration time then a - // fault is returned. - // - // The specified string must not start or end with whitespace. It must not contain - // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f - // | \u007f-\u009f). Also, it must not contain the literal string arn. - TaskList *TaskList `locationName:"taskList" type:"structure"` - - // The task priority to use for this workflow execution. This overrides any - // default priority that was assigned when the workflow type was registered. - // If not set, then the default task priority for the workflow type is used. - // Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) - // to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. - // - // For more information about setting task priority, see Setting Task Priority - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) - // in the Amazon SWF Developer Guide. - TaskPriority *string `locationName:"taskPriority" type:"string"` - - // Specifies the maximum duration of decision tasks for this workflow execution. - // This parameter overrides the defaultTaskStartToCloseTimout specified when - // registering the workflow type using RegisterWorkflowType. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - // - // A task start-to-close timeout for this workflow execution must be specified - // either as a default for the workflow type or through this parameter. If neither - // this parameter is set nor a default task start-to-close timeout was specified - // at registration time then a fault is returned. - TaskStartToCloseTimeout *string `locationName:"taskStartToCloseTimeout" type:"string"` - - // The user defined identifier associated with the workflow execution. You can - // use this to associate a custom identifier with the workflow execution. You - // may specify the same identifier if a workflow execution is logically a restart - // of a previous execution. You cannot have two open workflow executions with - // the same workflowId at the same time. - // - // The specified string must not start or end with whitespace. It must not contain - // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f - // | \u007f-\u009f). Also, it must not contain the literal string arn. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` - - // The type of the workflow to start. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s StartWorkflowExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartWorkflowExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartWorkflowExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartWorkflowExecutionInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.LambdaRole != nil && len(*s.LambdaRole) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LambdaRole", 1)) - } - if s.WorkflowId == nil { - invalidParams.Add(request.NewErrParamRequired("WorkflowId")) - } - if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) - } - if s.WorkflowType == nil { - invalidParams.Add(request.NewErrParamRequired("WorkflowType")) - } - if s.TaskList != nil { - if err := s.TaskList.Validate(); err != nil { - invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) - } - } - if s.WorkflowType != nil { - if err := s.WorkflowType.Validate(); err != nil { - invalidParams.AddNested("WorkflowType", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChildPolicy sets the ChildPolicy field's value. -func (s *StartWorkflowExecutionInput) SetChildPolicy(v string) *StartWorkflowExecutionInput { - s.ChildPolicy = &v - return s -} - -// SetDomain sets the Domain field's value. -func (s *StartWorkflowExecutionInput) SetDomain(v string) *StartWorkflowExecutionInput { - s.Domain = &v - return s -} - -// SetExecutionStartToCloseTimeout sets the ExecutionStartToCloseTimeout field's value. -func (s *StartWorkflowExecutionInput) SetExecutionStartToCloseTimeout(v string) *StartWorkflowExecutionInput { - s.ExecutionStartToCloseTimeout = &v - return s -} - -// SetInput sets the Input field's value. -func (s *StartWorkflowExecutionInput) SetInput(v string) *StartWorkflowExecutionInput { - s.Input = &v - return s -} - -// SetLambdaRole sets the LambdaRole field's value. -func (s *StartWorkflowExecutionInput) SetLambdaRole(v string) *StartWorkflowExecutionInput { - s.LambdaRole = &v - return s -} - -// SetTagList sets the TagList field's value. -func (s *StartWorkflowExecutionInput) SetTagList(v []*string) *StartWorkflowExecutionInput { - s.TagList = v - return s -} - -// SetTaskList sets the TaskList field's value. -func (s *StartWorkflowExecutionInput) SetTaskList(v *TaskList) *StartWorkflowExecutionInput { - s.TaskList = v - return s -} - -// SetTaskPriority sets the TaskPriority field's value. -func (s *StartWorkflowExecutionInput) SetTaskPriority(v string) *StartWorkflowExecutionInput { - s.TaskPriority = &v - return s -} - -// SetTaskStartToCloseTimeout sets the TaskStartToCloseTimeout field's value. -func (s *StartWorkflowExecutionInput) SetTaskStartToCloseTimeout(v string) *StartWorkflowExecutionInput { - s.TaskStartToCloseTimeout = &v - return s -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *StartWorkflowExecutionInput) SetWorkflowId(v string) *StartWorkflowExecutionInput { - s.WorkflowId = &v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *StartWorkflowExecutionInput) SetWorkflowType(v *WorkflowType) *StartWorkflowExecutionInput { - s.WorkflowType = v - return s -} - -// Specifies the runId of a workflow execution. -type StartWorkflowExecutionOutput struct { - _ struct{} `type:"structure"` - - // The runId of a workflow execution. This ID is generated by the service and - // can be used to uniquely identify the workflow execution within a domain. - RunId *string `locationName:"runId" min:"1" type:"string"` -} - -// String returns the string representation -func (s StartWorkflowExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartWorkflowExecutionOutput) GoString() string { - return s.String() -} - -// SetRunId sets the RunId field's value. -func (s *StartWorkflowExecutionOutput) SetRunId(v string) *StartWorkflowExecutionOutput { - s.RunId = &v - return s -} - -// Used to filter the workflow executions in visibility APIs based on a tag. -type TagFilter struct { - _ struct{} `type:"structure"` - - // Specifies the tag that must be associated with the execution for it to meet - // the filter criteria. - // - // Tag is a required field - Tag *string `locationName:"tag" type:"string" required:"true"` -} - -// String returns the string representation -func (s TagFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagFilter"} - if s.Tag == nil { - invalidParams.Add(request.NewErrParamRequired("Tag")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTag sets the Tag field's value. -func (s *TagFilter) SetTag(v string) *TagFilter { - s.Tag = &v - return s -} - -// Represents a task list. -type TaskList struct { - _ struct{} `type:"structure"` - - // The name of the task list. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TaskList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TaskList) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TaskList) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TaskList"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *TaskList) SetName(v string) *TaskList { - s.Name = &v - return s -} - -type TerminateWorkflowExecutionInput struct { - _ struct{} `type:"structure"` - - // If set, specifies the policy to use for the child workflow executions of - // the workflow execution being terminated. This policy overrides the child - // policy specified for the workflow execution at registration time or when - // starting the execution. - // - // The supported child policies are: - // - // * TERMINATE – The child executions are terminated. - // - // * REQUEST_CANCEL – A request to cancel is attempted for each child execution - // by recording a WorkflowExecutionCancelRequested event in its history. - // It is up to the decider to take appropriate actions when it receives an - // execution history with this event. - // - // * ABANDON – No action is taken. The child executions continue to run. - // - // A child policy for this workflow execution must be specified either as a - // default for the workflow type or through this parameter. If neither this - // parameter is set nor a default child policy was specified at registration - // time then a fault is returned. - ChildPolicy *string `locationName:"childPolicy" type:"string" enum:"ChildPolicy"` - - // Details for terminating the workflow execution. - Details *string `locationName:"details" type:"string"` - - // The domain of the workflow execution to terminate. - // - // Domain is a required field - Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` - - // A descriptive reason for terminating the workflow execution. - Reason *string `locationName:"reason" type:"string"` - - // The runId of the workflow execution to terminate. - RunId *string `locationName:"runId" type:"string"` - - // The workflowId of the workflow execution to terminate. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TerminateWorkflowExecutionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateWorkflowExecutionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TerminateWorkflowExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TerminateWorkflowExecutionInput"} - if s.Domain == nil { - invalidParams.Add(request.NewErrParamRequired("Domain")) - } - if s.Domain != nil && len(*s.Domain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) - } - if s.WorkflowId == nil { - invalidParams.Add(request.NewErrParamRequired("WorkflowId")) - } - if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChildPolicy sets the ChildPolicy field's value. -func (s *TerminateWorkflowExecutionInput) SetChildPolicy(v string) *TerminateWorkflowExecutionInput { - s.ChildPolicy = &v - return s -} - -// SetDetails sets the Details field's value. -func (s *TerminateWorkflowExecutionInput) SetDetails(v string) *TerminateWorkflowExecutionInput { - s.Details = &v - return s -} - -// SetDomain sets the Domain field's value. -func (s *TerminateWorkflowExecutionInput) SetDomain(v string) *TerminateWorkflowExecutionInput { - s.Domain = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *TerminateWorkflowExecutionInput) SetReason(v string) *TerminateWorkflowExecutionInput { - s.Reason = &v - return s -} - -// SetRunId sets the RunId field's value. -func (s *TerminateWorkflowExecutionInput) SetRunId(v string) *TerminateWorkflowExecutionInput { - s.RunId = &v - return s -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *TerminateWorkflowExecutionInput) SetWorkflowId(v string) *TerminateWorkflowExecutionInput { - s.WorkflowId = &v - return s -} - -type TerminateWorkflowExecutionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TerminateWorkflowExecutionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateWorkflowExecutionOutput) GoString() string { - return s.String() -} - -// Provides the details of the TimerCanceled event. -type TimerCanceledEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the CancelTimer decision to cancel this timer. This information - // can be useful for diagnosing problems by tracing back the chain of events - // leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The ID of the TimerStarted event that was recorded when this timer was started. - // This information can be useful for diagnosing problems by tracing back the - // chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` - - // The unique ID of the timer that was canceled. - // - // TimerId is a required field - TimerId *string `locationName:"timerId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TimerCanceledEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimerCanceledEventAttributes) GoString() string { - return s.String() -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *TimerCanceledEventAttributes) SetDecisionTaskCompletedEventId(v int64) *TimerCanceledEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *TimerCanceledEventAttributes) SetStartedEventId(v int64) *TimerCanceledEventAttributes { - s.StartedEventId = &v - return s -} - -// SetTimerId sets the TimerId field's value. -func (s *TimerCanceledEventAttributes) SetTimerId(v string) *TimerCanceledEventAttributes { - s.TimerId = &v - return s -} - -// Provides the details of the TimerFired event. -type TimerFiredEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the TimerStarted event that was recorded when this timer was started. - // This information can be useful for diagnosing problems by tracing back the - // chain of events leading up to this event. - // - // StartedEventId is a required field - StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` - - // The unique ID of the timer that fired. - // - // TimerId is a required field - TimerId *string `locationName:"timerId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TimerFiredEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimerFiredEventAttributes) GoString() string { - return s.String() -} - -// SetStartedEventId sets the StartedEventId field's value. -func (s *TimerFiredEventAttributes) SetStartedEventId(v int64) *TimerFiredEventAttributes { - s.StartedEventId = &v - return s -} - -// SetTimerId sets the TimerId field's value. -func (s *TimerFiredEventAttributes) SetTimerId(v string) *TimerFiredEventAttributes { - s.TimerId = &v - return s -} - -// Provides the details of the TimerStarted event. -type TimerStartedEventAttributes struct { - _ struct{} `type:"structure"` - - // Data attached to the event that can be used by the decider in subsequent - // workflow tasks. - Control *string `locationName:"control" type:"string"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the StartTimer decision for this activity task. This information - // can be useful for diagnosing problems by tracing back the chain of events - // leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The duration of time after which the timer fires. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. - // - // StartToFireTimeout is a required field - StartToFireTimeout *string `locationName:"startToFireTimeout" min:"1" type:"string" required:"true"` - - // The unique ID of the timer that was started. - // - // TimerId is a required field - TimerId *string `locationName:"timerId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s TimerStartedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimerStartedEventAttributes) GoString() string { - return s.String() -} - -// SetControl sets the Control field's value. -func (s *TimerStartedEventAttributes) SetControl(v string) *TimerStartedEventAttributes { - s.Control = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *TimerStartedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *TimerStartedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetStartToFireTimeout sets the StartToFireTimeout field's value. -func (s *TimerStartedEventAttributes) SetStartToFireTimeout(v string) *TimerStartedEventAttributes { - s.StartToFireTimeout = &v - return s -} - -// SetTimerId sets the TimerId field's value. -func (s *TimerStartedEventAttributes) SetTimerId(v string) *TimerStartedEventAttributes { - s.TimerId = &v - return s -} - -// Represents a workflow execution. -type WorkflowExecution struct { - _ struct{} `type:"structure"` - - // A system-generated unique identifier for the workflow execution. - // - // RunId is a required field - RunId *string `locationName:"runId" min:"1" type:"string" required:"true"` - - // The user defined identifier associated with the workflow execution. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s WorkflowExecution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecution) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WorkflowExecution) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WorkflowExecution"} - if s.RunId == nil { - invalidParams.Add(request.NewErrParamRequired("RunId")) - } - if s.RunId != nil && len(*s.RunId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RunId", 1)) - } - if s.WorkflowId == nil { - invalidParams.Add(request.NewErrParamRequired("WorkflowId")) - } - if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRunId sets the RunId field's value. -func (s *WorkflowExecution) SetRunId(v string) *WorkflowExecution { - s.RunId = &v - return s -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *WorkflowExecution) SetWorkflowId(v string) *WorkflowExecution { - s.WorkflowId = &v - return s -} - -// Provides the details of the WorkflowExecutionCancelRequested event. -type WorkflowExecutionCancelRequestedEventAttributes struct { - _ struct{} `type:"structure"` - - // If set, indicates that the request to cancel the workflow execution was automatically - // generated, and specifies the cause. This happens if the parent workflow execution - // times out or is terminated, and the child policy is set to cancel child executions. - Cause *string `locationName:"cause" type:"string" enum:"WorkflowExecutionCancelRequestedCause"` - - // The ID of the RequestCancelExternalWorkflowExecutionInitiated event corresponding - // to the RequestCancelExternalWorkflowExecution decision to cancel this workflow - // execution.The source event with this ID can be found in the history of the - // source workflow execution. This information can be useful for diagnosing - // problems by tracing back the chain of events leading up to this event. - ExternalInitiatedEventId *int64 `locationName:"externalInitiatedEventId" type:"long"` - - // The external workflow execution for which the cancellation was requested. - ExternalWorkflowExecution *WorkflowExecution `locationName:"externalWorkflowExecution" type:"structure"` -} - -// String returns the string representation -func (s WorkflowExecutionCancelRequestedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionCancelRequestedEventAttributes) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *WorkflowExecutionCancelRequestedEventAttributes) SetCause(v string) *WorkflowExecutionCancelRequestedEventAttributes { - s.Cause = &v - return s -} - -// SetExternalInitiatedEventId sets the ExternalInitiatedEventId field's value. -func (s *WorkflowExecutionCancelRequestedEventAttributes) SetExternalInitiatedEventId(v int64) *WorkflowExecutionCancelRequestedEventAttributes { - s.ExternalInitiatedEventId = &v - return s -} - -// SetExternalWorkflowExecution sets the ExternalWorkflowExecution field's value. -func (s *WorkflowExecutionCancelRequestedEventAttributes) SetExternalWorkflowExecution(v *WorkflowExecution) *WorkflowExecutionCancelRequestedEventAttributes { - s.ExternalWorkflowExecution = v - return s -} - -// Provides the details of the WorkflowExecutionCanceled event. -type WorkflowExecutionCanceledEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the CancelWorkflowExecution decision for this cancellation - // request. This information can be useful for diagnosing problems by tracing - // back the chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The details of the cancellation. - Details *string `locationName:"details" type:"string"` -} - -// String returns the string representation -func (s WorkflowExecutionCanceledEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionCanceledEventAttributes) GoString() string { - return s.String() -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *WorkflowExecutionCanceledEventAttributes) SetDecisionTaskCompletedEventId(v int64) *WorkflowExecutionCanceledEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetDetails sets the Details field's value. -func (s *WorkflowExecutionCanceledEventAttributes) SetDetails(v string) *WorkflowExecutionCanceledEventAttributes { - s.Details = &v - return s -} - -// Provides the details of the WorkflowExecutionCompleted event. -type WorkflowExecutionCompletedEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the CompleteWorkflowExecution decision to complete this - // execution. This information can be useful for diagnosing problems by tracing - // back the chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The result produced by the workflow execution upon successful completion. - Result *string `locationName:"result" type:"string"` -} - -// String returns the string representation -func (s WorkflowExecutionCompletedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionCompletedEventAttributes) GoString() string { - return s.String() -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *WorkflowExecutionCompletedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *WorkflowExecutionCompletedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetResult sets the Result field's value. -func (s *WorkflowExecutionCompletedEventAttributes) SetResult(v string) *WorkflowExecutionCompletedEventAttributes { - s.Result = &v - return s -} - -// The configuration settings for a workflow execution including timeout values, -// tasklist etc. These configuration settings are determined from the defaults -// specified when registering the workflow type and those specified when starting -// the workflow execution. -type WorkflowExecutionConfiguration struct { - _ struct{} `type:"structure"` - - // The policy to use for the child workflow executions if this workflow execution - // is terminated, by calling the TerminateWorkflowExecution action explicitly - // or due to an expired timeout. - // - // The supported child policies are: - // - // * TERMINATE – The child executions are terminated. - // - // * REQUEST_CANCEL – A request to cancel is attempted for each child execution - // by recording a WorkflowExecutionCancelRequested event in its history. - // It is up to the decider to take appropriate actions when it receives an - // execution history with this event. - // - // * ABANDON – No action is taken. The child executions continue to run. - // - // ChildPolicy is a required field - ChildPolicy *string `locationName:"childPolicy" type:"string" required:"true" enum:"ChildPolicy"` - - // The total duration for this workflow execution. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - // - // ExecutionStartToCloseTimeout is a required field - ExecutionStartToCloseTimeout *string `locationName:"executionStartToCloseTimeout" min:"1" type:"string" required:"true"` - - // The IAM role attached to the child workflow execution. - LambdaRole *string `locationName:"lambdaRole" min:"1" type:"string"` - - // The task list used for the decision tasks generated for this workflow execution. - // - // TaskList is a required field - TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` - - // The priority assigned to decision tasks for this workflow execution. Valid - // values are integers that range from Java's Integer.MIN_VALUE (-2147483648) - // to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. - // - // For more information about setting task priority, see Setting Task Priority - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) - // in the Amazon SWF Developer Guide. - TaskPriority *string `locationName:"taskPriority" type:"string"` - - // The maximum duration allowed for decision tasks for this workflow execution. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - // - // TaskStartToCloseTimeout is a required field - TaskStartToCloseTimeout *string `locationName:"taskStartToCloseTimeout" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s WorkflowExecutionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionConfiguration) GoString() string { - return s.String() -} - -// SetChildPolicy sets the ChildPolicy field's value. -func (s *WorkflowExecutionConfiguration) SetChildPolicy(v string) *WorkflowExecutionConfiguration { - s.ChildPolicy = &v - return s -} - -// SetExecutionStartToCloseTimeout sets the ExecutionStartToCloseTimeout field's value. -func (s *WorkflowExecutionConfiguration) SetExecutionStartToCloseTimeout(v string) *WorkflowExecutionConfiguration { - s.ExecutionStartToCloseTimeout = &v - return s -} - -// SetLambdaRole sets the LambdaRole field's value. -func (s *WorkflowExecutionConfiguration) SetLambdaRole(v string) *WorkflowExecutionConfiguration { - s.LambdaRole = &v - return s -} - -// SetTaskList sets the TaskList field's value. -func (s *WorkflowExecutionConfiguration) SetTaskList(v *TaskList) *WorkflowExecutionConfiguration { - s.TaskList = v - return s -} - -// SetTaskPriority sets the TaskPriority field's value. -func (s *WorkflowExecutionConfiguration) SetTaskPriority(v string) *WorkflowExecutionConfiguration { - s.TaskPriority = &v - return s -} - -// SetTaskStartToCloseTimeout sets the TaskStartToCloseTimeout field's value. -func (s *WorkflowExecutionConfiguration) SetTaskStartToCloseTimeout(v string) *WorkflowExecutionConfiguration { - s.TaskStartToCloseTimeout = &v - return s -} - -// Provides the details of the WorkflowExecutionContinuedAsNew event. -type WorkflowExecutionContinuedAsNewEventAttributes struct { - _ struct{} `type:"structure"` - - // The policy to use for the child workflow executions of the new execution - // if it is terminated by calling the TerminateWorkflowExecution action explicitly - // or due to an expired timeout. - // - // The supported child policies are: - // - // * TERMINATE – The child executions are terminated. - // - // * REQUEST_CANCEL – A request to cancel is attempted for each child execution - // by recording a WorkflowExecutionCancelRequested event in its history. - // It is up to the decider to take appropriate actions when it receives an - // execution history with this event. - // - // * ABANDON – No action is taken. The child executions continue to run. - // - // ChildPolicy is a required field - ChildPolicy *string `locationName:"childPolicy" type:"string" required:"true" enum:"ChildPolicy"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the ContinueAsNewWorkflowExecution decision that started - // this execution. This information can be useful for diagnosing problems by - // tracing back the chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The total duration allowed for the new workflow execution. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - ExecutionStartToCloseTimeout *string `locationName:"executionStartToCloseTimeout" type:"string"` - - // The input provided to the new workflow execution. - Input *string `locationName:"input" type:"string"` - - // The IAM role to attach to the new (continued) workflow execution. - LambdaRole *string `locationName:"lambdaRole" min:"1" type:"string"` - - // The runId of the new workflow execution. - // - // NewExecutionRunId is a required field - NewExecutionRunId *string `locationName:"newExecutionRunId" min:"1" type:"string" required:"true"` - - // The list of tags associated with the new workflow execution. - TagList []*string `locationName:"tagList" type:"list"` - - // The task list to use for the decisions of the new (continued) workflow execution. - // - // TaskList is a required field - TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` - - // The priority of the task to use for the decisions of the new (continued) - // workflow execution. - TaskPriority *string `locationName:"taskPriority" type:"string"` - - // The maximum duration of decision tasks for the new workflow execution. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - TaskStartToCloseTimeout *string `locationName:"taskStartToCloseTimeout" type:"string"` - - // The workflow type of this execution. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s WorkflowExecutionContinuedAsNewEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionContinuedAsNewEventAttributes) GoString() string { - return s.String() -} - -// SetChildPolicy sets the ChildPolicy field's value. -func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetChildPolicy(v string) *WorkflowExecutionContinuedAsNewEventAttributes { - s.ChildPolicy = &v - return s -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetDecisionTaskCompletedEventId(v int64) *WorkflowExecutionContinuedAsNewEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetExecutionStartToCloseTimeout sets the ExecutionStartToCloseTimeout field's value. -func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetExecutionStartToCloseTimeout(v string) *WorkflowExecutionContinuedAsNewEventAttributes { - s.ExecutionStartToCloseTimeout = &v - return s -} - -// SetInput sets the Input field's value. -func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetInput(v string) *WorkflowExecutionContinuedAsNewEventAttributes { - s.Input = &v - return s -} - -// SetLambdaRole sets the LambdaRole field's value. -func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetLambdaRole(v string) *WorkflowExecutionContinuedAsNewEventAttributes { - s.LambdaRole = &v - return s -} - -// SetNewExecutionRunId sets the NewExecutionRunId field's value. -func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetNewExecutionRunId(v string) *WorkflowExecutionContinuedAsNewEventAttributes { - s.NewExecutionRunId = &v - return s -} - -// SetTagList sets the TagList field's value. -func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetTagList(v []*string) *WorkflowExecutionContinuedAsNewEventAttributes { - s.TagList = v - return s -} - -// SetTaskList sets the TaskList field's value. -func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetTaskList(v *TaskList) *WorkflowExecutionContinuedAsNewEventAttributes { - s.TaskList = v - return s -} - -// SetTaskPriority sets the TaskPriority field's value. -func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetTaskPriority(v string) *WorkflowExecutionContinuedAsNewEventAttributes { - s.TaskPriority = &v - return s -} - -// SetTaskStartToCloseTimeout sets the TaskStartToCloseTimeout field's value. -func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetTaskStartToCloseTimeout(v string) *WorkflowExecutionContinuedAsNewEventAttributes { - s.TaskStartToCloseTimeout = &v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetWorkflowType(v *WorkflowType) *WorkflowExecutionContinuedAsNewEventAttributes { - s.WorkflowType = v - return s -} - -// Contains the count of workflow executions returned from CountOpenWorkflowExecutions -// or CountClosedWorkflowExecutions -type WorkflowExecutionCount struct { - _ struct{} `type:"structure"` - - // The number of workflow executions. - // - // Count is a required field - Count *int64 `locationName:"count" type:"integer" required:"true"` - - // If set to true, indicates that the actual count was more than the maximum - // supported by this API and the count returned is the truncated value. - Truncated *bool `locationName:"truncated" type:"boolean"` -} - -// String returns the string representation -func (s WorkflowExecutionCount) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionCount) GoString() string { - return s.String() -} - -// SetCount sets the Count field's value. -func (s *WorkflowExecutionCount) SetCount(v int64) *WorkflowExecutionCount { - s.Count = &v - return s -} - -// SetTruncated sets the Truncated field's value. -func (s *WorkflowExecutionCount) SetTruncated(v bool) *WorkflowExecutionCount { - s.Truncated = &v - return s -} - -// Provides the details of the WorkflowExecutionFailed event. -type WorkflowExecutionFailedEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the DecisionTaskCompleted event corresponding to the decision task - // that resulted in the FailWorkflowExecution decision to fail this execution. - // This information can be useful for diagnosing problems by tracing back the - // chain of events leading up to this event. - // - // DecisionTaskCompletedEventId is a required field - DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` - - // The details of the failure. - Details *string `locationName:"details" type:"string"` - - // The descriptive reason provided for the failure. - Reason *string `locationName:"reason" type:"string"` -} - -// String returns the string representation -func (s WorkflowExecutionFailedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionFailedEventAttributes) GoString() string { - return s.String() -} - -// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. -func (s *WorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *WorkflowExecutionFailedEventAttributes { - s.DecisionTaskCompletedEventId = &v - return s -} - -// SetDetails sets the Details field's value. -func (s *WorkflowExecutionFailedEventAttributes) SetDetails(v string) *WorkflowExecutionFailedEventAttributes { - s.Details = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *WorkflowExecutionFailedEventAttributes) SetReason(v string) *WorkflowExecutionFailedEventAttributes { - s.Reason = &v - return s -} - -// Used to filter the workflow executions in visibility APIs by their workflowId. -type WorkflowExecutionFilter struct { - _ struct{} `type:"structure"` - - // The workflowId to pass of match the criteria of this filter. - // - // WorkflowId is a required field - WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s WorkflowExecutionFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WorkflowExecutionFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WorkflowExecutionFilter"} - if s.WorkflowId == nil { - invalidParams.Add(request.NewErrParamRequired("WorkflowId")) - } - if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWorkflowId sets the WorkflowId field's value. -func (s *WorkflowExecutionFilter) SetWorkflowId(v string) *WorkflowExecutionFilter { - s.WorkflowId = &v - return s -} - -// Contains information about a workflow execution. -type WorkflowExecutionInfo struct { - _ struct{} `type:"structure"` - - // Set to true if a cancellation is requested for this workflow execution. - CancelRequested *bool `locationName:"cancelRequested" type:"boolean"` - - // If the execution status is closed then this specifies how the execution was - // closed: - // - // * COMPLETED – the execution was successfully completed. - // - // * CANCELED – the execution was canceled.Cancellation allows the implementation - // to gracefully clean up before the execution is closed. - // - // * TERMINATED – the execution was force terminated. - // - // * FAILED – the execution failed to complete. - // - // * TIMED_OUT – the execution did not complete in the alloted time and was - // automatically timed out. - // - // * CONTINUED_AS_NEW – the execution is logically continued. This means - // the current execution was completed and a new execution was started to - // carry on the workflow. - CloseStatus *string `locationName:"closeStatus" type:"string" enum:"CloseStatus"` - - // The time when the workflow execution was closed. Set only if the execution - // status is CLOSED. - CloseTimestamp *time.Time `locationName:"closeTimestamp" type:"timestamp"` - - // The workflow execution this information is about. - // - // Execution is a required field - Execution *WorkflowExecution `locationName:"execution" type:"structure" required:"true"` - - // The current status of the execution. - // - // ExecutionStatus is a required field - ExecutionStatus *string `locationName:"executionStatus" type:"string" required:"true" enum:"ExecutionStatus"` - - // If this workflow execution is a child of another execution then contains - // the workflow execution that started this execution. - Parent *WorkflowExecution `locationName:"parent" type:"structure"` - - // The time when the execution was started. - // - // StartTimestamp is a required field - StartTimestamp *time.Time `locationName:"startTimestamp" type:"timestamp" required:"true"` - - // The list of tags associated with the workflow execution. Tags can be used - // to identify and list workflow executions of interest through the visibility - // APIs. A workflow execution can have a maximum of 5 tags. - TagList []*string `locationName:"tagList" type:"list"` - - // The type of the workflow execution. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s WorkflowExecutionInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionInfo) GoString() string { - return s.String() -} - -// SetCancelRequested sets the CancelRequested field's value. -func (s *WorkflowExecutionInfo) SetCancelRequested(v bool) *WorkflowExecutionInfo { - s.CancelRequested = &v - return s -} - -// SetCloseStatus sets the CloseStatus field's value. -func (s *WorkflowExecutionInfo) SetCloseStatus(v string) *WorkflowExecutionInfo { - s.CloseStatus = &v - return s -} - -// SetCloseTimestamp sets the CloseTimestamp field's value. -func (s *WorkflowExecutionInfo) SetCloseTimestamp(v time.Time) *WorkflowExecutionInfo { - s.CloseTimestamp = &v - return s -} - -// SetExecution sets the Execution field's value. -func (s *WorkflowExecutionInfo) SetExecution(v *WorkflowExecution) *WorkflowExecutionInfo { - s.Execution = v - return s -} - -// SetExecutionStatus sets the ExecutionStatus field's value. -func (s *WorkflowExecutionInfo) SetExecutionStatus(v string) *WorkflowExecutionInfo { - s.ExecutionStatus = &v - return s -} - -// SetParent sets the Parent field's value. -func (s *WorkflowExecutionInfo) SetParent(v *WorkflowExecution) *WorkflowExecutionInfo { - s.Parent = v - return s -} - -// SetStartTimestamp sets the StartTimestamp field's value. -func (s *WorkflowExecutionInfo) SetStartTimestamp(v time.Time) *WorkflowExecutionInfo { - s.StartTimestamp = &v - return s -} - -// SetTagList sets the TagList field's value. -func (s *WorkflowExecutionInfo) SetTagList(v []*string) *WorkflowExecutionInfo { - s.TagList = v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *WorkflowExecutionInfo) SetWorkflowType(v *WorkflowType) *WorkflowExecutionInfo { - s.WorkflowType = v - return s -} - -// Contains a paginated list of information about workflow executions. -type WorkflowExecutionInfos struct { - _ struct{} `type:"structure"` - - // The list of workflow information structures. - // - // ExecutionInfos is a required field - ExecutionInfos []*WorkflowExecutionInfo `locationName:"executionInfos" type:"list" required:"true"` - - // If a NextPageToken was returned by a previous call, there are more results - // available. To retrieve the next page of results, make the call again using - // the returned token in nextPageToken. Keep all other arguments unchanged. - // - // The configured maximumPageSize determines how many results can be returned - // in a single call. - NextPageToken *string `locationName:"nextPageToken" type:"string"` -} - -// String returns the string representation -func (s WorkflowExecutionInfos) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionInfos) GoString() string { - return s.String() -} - -// SetExecutionInfos sets the ExecutionInfos field's value. -func (s *WorkflowExecutionInfos) SetExecutionInfos(v []*WorkflowExecutionInfo) *WorkflowExecutionInfos { - s.ExecutionInfos = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *WorkflowExecutionInfos) SetNextPageToken(v string) *WorkflowExecutionInfos { - s.NextPageToken = &v - return s -} - -// Contains the counts of open tasks, child workflow executions and timers for -// a workflow execution. -type WorkflowExecutionOpenCounts struct { - _ struct{} `type:"structure"` - - // The count of activity tasks whose status is OPEN. - // - // OpenActivityTasks is a required field - OpenActivityTasks *int64 `locationName:"openActivityTasks" type:"integer" required:"true"` - - // The count of child workflow executions whose status is OPEN. - // - // OpenChildWorkflowExecutions is a required field - OpenChildWorkflowExecutions *int64 `locationName:"openChildWorkflowExecutions" type:"integer" required:"true"` - - // The count of decision tasks whose status is OPEN. A workflow execution can - // have at most one open decision task. - // - // OpenDecisionTasks is a required field - OpenDecisionTasks *int64 `locationName:"openDecisionTasks" type:"integer" required:"true"` - - // The count of Lambda tasks whose status is OPEN. - OpenLambdaFunctions *int64 `locationName:"openLambdaFunctions" type:"integer"` - - // The count of timers started by this workflow execution that have not fired - // yet. - // - // OpenTimers is a required field - OpenTimers *int64 `locationName:"openTimers" type:"integer" required:"true"` -} - -// String returns the string representation -func (s WorkflowExecutionOpenCounts) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionOpenCounts) GoString() string { - return s.String() -} - -// SetOpenActivityTasks sets the OpenActivityTasks field's value. -func (s *WorkflowExecutionOpenCounts) SetOpenActivityTasks(v int64) *WorkflowExecutionOpenCounts { - s.OpenActivityTasks = &v - return s -} - -// SetOpenChildWorkflowExecutions sets the OpenChildWorkflowExecutions field's value. -func (s *WorkflowExecutionOpenCounts) SetOpenChildWorkflowExecutions(v int64) *WorkflowExecutionOpenCounts { - s.OpenChildWorkflowExecutions = &v - return s -} - -// SetOpenDecisionTasks sets the OpenDecisionTasks field's value. -func (s *WorkflowExecutionOpenCounts) SetOpenDecisionTasks(v int64) *WorkflowExecutionOpenCounts { - s.OpenDecisionTasks = &v - return s -} - -// SetOpenLambdaFunctions sets the OpenLambdaFunctions field's value. -func (s *WorkflowExecutionOpenCounts) SetOpenLambdaFunctions(v int64) *WorkflowExecutionOpenCounts { - s.OpenLambdaFunctions = &v - return s -} - -// SetOpenTimers sets the OpenTimers field's value. -func (s *WorkflowExecutionOpenCounts) SetOpenTimers(v int64) *WorkflowExecutionOpenCounts { - s.OpenTimers = &v - return s -} - -// Provides the details of the WorkflowExecutionSignaled event. -type WorkflowExecutionSignaledEventAttributes struct { - _ struct{} `type:"structure"` - - // The ID of the SignalExternalWorkflowExecutionInitiated event corresponding - // to the SignalExternalWorkflow decision to signal this workflow execution.The - // source event with this ID can be found in the history of the source workflow - // execution. This information can be useful for diagnosing problems by tracing - // back the chain of events leading up to this event. This field is set only - // if the signal was initiated by another workflow execution. - ExternalInitiatedEventId *int64 `locationName:"externalInitiatedEventId" type:"long"` - - // The workflow execution that sent the signal. This is set only of the signal - // was sent by another workflow execution. - ExternalWorkflowExecution *WorkflowExecution `locationName:"externalWorkflowExecution" type:"structure"` - - // The inputs provided with the signal. The decider can use the signal name - // and inputs to determine how to process the signal. - Input *string `locationName:"input" type:"string"` - - // The name of the signal received. The decider can use the signal name and - // inputs to determine how to the process the signal. - // - // SignalName is a required field - SignalName *string `locationName:"signalName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s WorkflowExecutionSignaledEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionSignaledEventAttributes) GoString() string { - return s.String() -} - -// SetExternalInitiatedEventId sets the ExternalInitiatedEventId field's value. -func (s *WorkflowExecutionSignaledEventAttributes) SetExternalInitiatedEventId(v int64) *WorkflowExecutionSignaledEventAttributes { - s.ExternalInitiatedEventId = &v - return s -} - -// SetExternalWorkflowExecution sets the ExternalWorkflowExecution field's value. -func (s *WorkflowExecutionSignaledEventAttributes) SetExternalWorkflowExecution(v *WorkflowExecution) *WorkflowExecutionSignaledEventAttributes { - s.ExternalWorkflowExecution = v - return s -} - -// SetInput sets the Input field's value. -func (s *WorkflowExecutionSignaledEventAttributes) SetInput(v string) *WorkflowExecutionSignaledEventAttributes { - s.Input = &v - return s -} - -// SetSignalName sets the SignalName field's value. -func (s *WorkflowExecutionSignaledEventAttributes) SetSignalName(v string) *WorkflowExecutionSignaledEventAttributes { - s.SignalName = &v - return s -} - -// Provides details of WorkflowExecutionStarted event. -type WorkflowExecutionStartedEventAttributes struct { - _ struct{} `type:"structure"` - - // The policy to use for the child workflow executions if this workflow execution - // is terminated, by calling the TerminateWorkflowExecution action explicitly - // or due to an expired timeout. - // - // The supported child policies are: - // - // * TERMINATE – The child executions are terminated. - // - // * REQUEST_CANCEL – A request to cancel is attempted for each child execution - // by recording a WorkflowExecutionCancelRequested event in its history. - // It is up to the decider to take appropriate actions when it receives an - // execution history with this event. - // - // * ABANDON – No action is taken. The child executions continue to run. - // - // ChildPolicy is a required field - ChildPolicy *string `locationName:"childPolicy" type:"string" required:"true" enum:"ChildPolicy"` - - // If this workflow execution was started due to a ContinueAsNewWorkflowExecution - // decision, then it contains the runId of the previous workflow execution that - // was closed and continued as this execution. - ContinuedExecutionRunId *string `locationName:"continuedExecutionRunId" type:"string"` - - // The maximum duration for this workflow execution. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - ExecutionStartToCloseTimeout *string `locationName:"executionStartToCloseTimeout" type:"string"` - - // The input provided to the workflow execution. - Input *string `locationName:"input" type:"string"` - - // The IAM role attached to the workflow execution. - LambdaRole *string `locationName:"lambdaRole" min:"1" type:"string"` - - // The ID of the StartChildWorkflowExecutionInitiated event corresponding to - // the StartChildWorkflowExecutionDecision to start this workflow execution. - // The source event with this ID can be found in the history of the source workflow - // execution. This information can be useful for diagnosing problems by tracing - // back the chain of events leading up to this event. - ParentInitiatedEventId *int64 `locationName:"parentInitiatedEventId" type:"long"` - - // The source workflow execution that started this workflow execution. The member - // isn't set if the workflow execution was not started by a workflow. - ParentWorkflowExecution *WorkflowExecution `locationName:"parentWorkflowExecution" type:"structure"` - - // The list of tags associated with this workflow execution. An execution can - // have up to 5 tags. - TagList []*string `locationName:"tagList" type:"list"` - - // The name of the task list for scheduling the decision tasks for this workflow - // execution. - // - // TaskList is a required field - TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` - - // The priority of the decision tasks in the workflow execution. - TaskPriority *string `locationName:"taskPriority" type:"string"` - - // The maximum duration of decision tasks for this workflow type. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - TaskStartToCloseTimeout *string `locationName:"taskStartToCloseTimeout" type:"string"` - - // The workflow type of this execution. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s WorkflowExecutionStartedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionStartedEventAttributes) GoString() string { - return s.String() -} - -// SetChildPolicy sets the ChildPolicy field's value. -func (s *WorkflowExecutionStartedEventAttributes) SetChildPolicy(v string) *WorkflowExecutionStartedEventAttributes { - s.ChildPolicy = &v - return s -} - -// SetContinuedExecutionRunId sets the ContinuedExecutionRunId field's value. -func (s *WorkflowExecutionStartedEventAttributes) SetContinuedExecutionRunId(v string) *WorkflowExecutionStartedEventAttributes { - s.ContinuedExecutionRunId = &v - return s -} - -// SetExecutionStartToCloseTimeout sets the ExecutionStartToCloseTimeout field's value. -func (s *WorkflowExecutionStartedEventAttributes) SetExecutionStartToCloseTimeout(v string) *WorkflowExecutionStartedEventAttributes { - s.ExecutionStartToCloseTimeout = &v - return s -} - -// SetInput sets the Input field's value. -func (s *WorkflowExecutionStartedEventAttributes) SetInput(v string) *WorkflowExecutionStartedEventAttributes { - s.Input = &v - return s -} - -// SetLambdaRole sets the LambdaRole field's value. -func (s *WorkflowExecutionStartedEventAttributes) SetLambdaRole(v string) *WorkflowExecutionStartedEventAttributes { - s.LambdaRole = &v - return s -} - -// SetParentInitiatedEventId sets the ParentInitiatedEventId field's value. -func (s *WorkflowExecutionStartedEventAttributes) SetParentInitiatedEventId(v int64) *WorkflowExecutionStartedEventAttributes { - s.ParentInitiatedEventId = &v - return s -} - -// SetParentWorkflowExecution sets the ParentWorkflowExecution field's value. -func (s *WorkflowExecutionStartedEventAttributes) SetParentWorkflowExecution(v *WorkflowExecution) *WorkflowExecutionStartedEventAttributes { - s.ParentWorkflowExecution = v - return s -} - -// SetTagList sets the TagList field's value. -func (s *WorkflowExecutionStartedEventAttributes) SetTagList(v []*string) *WorkflowExecutionStartedEventAttributes { - s.TagList = v - return s -} - -// SetTaskList sets the TaskList field's value. -func (s *WorkflowExecutionStartedEventAttributes) SetTaskList(v *TaskList) *WorkflowExecutionStartedEventAttributes { - s.TaskList = v - return s -} - -// SetTaskPriority sets the TaskPriority field's value. -func (s *WorkflowExecutionStartedEventAttributes) SetTaskPriority(v string) *WorkflowExecutionStartedEventAttributes { - s.TaskPriority = &v - return s -} - -// SetTaskStartToCloseTimeout sets the TaskStartToCloseTimeout field's value. -func (s *WorkflowExecutionStartedEventAttributes) SetTaskStartToCloseTimeout(v string) *WorkflowExecutionStartedEventAttributes { - s.TaskStartToCloseTimeout = &v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *WorkflowExecutionStartedEventAttributes) SetWorkflowType(v *WorkflowType) *WorkflowExecutionStartedEventAttributes { - s.WorkflowType = v - return s -} - -// Provides the details of the WorkflowExecutionTerminated event. -type WorkflowExecutionTerminatedEventAttributes struct { - _ struct{} `type:"structure"` - - // If set, indicates that the workflow execution was automatically terminated, - // and specifies the cause. This happens if the parent workflow execution times - // out or is terminated and the child policy is set to terminate child executions. - Cause *string `locationName:"cause" type:"string" enum:"WorkflowExecutionTerminatedCause"` - - // The policy used for the child workflow executions of this workflow execution. - // - // The supported child policies are: - // - // * TERMINATE – The child executions are terminated. - // - // * REQUEST_CANCEL – A request to cancel is attempted for each child execution - // by recording a WorkflowExecutionCancelRequested event in its history. - // It is up to the decider to take appropriate actions when it receives an - // execution history with this event. - // - // * ABANDON – No action is taken. The child executions continue to run. - // - // ChildPolicy is a required field - ChildPolicy *string `locationName:"childPolicy" type:"string" required:"true" enum:"ChildPolicy"` - - // The details provided for the termination. - Details *string `locationName:"details" type:"string"` - - // The reason provided for the termination. - Reason *string `locationName:"reason" type:"string"` -} - -// String returns the string representation -func (s WorkflowExecutionTerminatedEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionTerminatedEventAttributes) GoString() string { - return s.String() -} - -// SetCause sets the Cause field's value. -func (s *WorkflowExecutionTerminatedEventAttributes) SetCause(v string) *WorkflowExecutionTerminatedEventAttributes { - s.Cause = &v - return s -} - -// SetChildPolicy sets the ChildPolicy field's value. -func (s *WorkflowExecutionTerminatedEventAttributes) SetChildPolicy(v string) *WorkflowExecutionTerminatedEventAttributes { - s.ChildPolicy = &v - return s -} - -// SetDetails sets the Details field's value. -func (s *WorkflowExecutionTerminatedEventAttributes) SetDetails(v string) *WorkflowExecutionTerminatedEventAttributes { - s.Details = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *WorkflowExecutionTerminatedEventAttributes) SetReason(v string) *WorkflowExecutionTerminatedEventAttributes { - s.Reason = &v - return s -} - -// Provides the details of the WorkflowExecutionTimedOut event. -type WorkflowExecutionTimedOutEventAttributes struct { - _ struct{} `type:"structure"` - - // The policy used for the child workflow executions of this workflow execution. - // - // The supported child policies are: - // - // * TERMINATE – The child executions are terminated. - // - // * REQUEST_CANCEL – A request to cancel is attempted for each child execution - // by recording a WorkflowExecutionCancelRequested event in its history. - // It is up to the decider to take appropriate actions when it receives an - // execution history with this event. - // - // * ABANDON – No action is taken. The child executions continue to run. - // - // ChildPolicy is a required field - ChildPolicy *string `locationName:"childPolicy" type:"string" required:"true" enum:"ChildPolicy"` - - // The type of timeout that caused this event. - // - // TimeoutType is a required field - TimeoutType *string `locationName:"timeoutType" type:"string" required:"true" enum:"WorkflowExecutionTimeoutType"` -} - -// String returns the string representation -func (s WorkflowExecutionTimedOutEventAttributes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowExecutionTimedOutEventAttributes) GoString() string { - return s.String() -} - -// SetChildPolicy sets the ChildPolicy field's value. -func (s *WorkflowExecutionTimedOutEventAttributes) SetChildPolicy(v string) *WorkflowExecutionTimedOutEventAttributes { - s.ChildPolicy = &v - return s -} - -// SetTimeoutType sets the TimeoutType field's value. -func (s *WorkflowExecutionTimedOutEventAttributes) SetTimeoutType(v string) *WorkflowExecutionTimedOutEventAttributes { - s.TimeoutType = &v - return s -} - -// Represents a workflow type. -type WorkflowType struct { - _ struct{} `type:"structure"` - - // The name of the workflow type. - // - // The combination of workflow type name and version must be unique with in - // a domain. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The version of the workflow type. - // - // The combination of workflow type name and version must be unique with in - // a domain. - // - // Version is a required field - Version *string `locationName:"version" min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s WorkflowType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WorkflowType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WorkflowType"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Version == nil { - invalidParams.Add(request.NewErrParamRequired("Version")) - } - if s.Version != nil && len(*s.Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Version", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *WorkflowType) SetName(v string) *WorkflowType { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *WorkflowType) SetVersion(v string) *WorkflowType { - s.Version = &v - return s -} - -// The configuration settings of a workflow type. -type WorkflowTypeConfiguration struct { - _ struct{} `type:"structure"` - - // The default policy to use for the child workflow executions when a workflow - // execution of this type is terminated, by calling the TerminateWorkflowExecution - // action explicitly or due to an expired timeout. This default can be overridden - // when starting a workflow execution using the StartWorkflowExecution action - // or the StartChildWorkflowExecutionDecision. - // - // The supported child policies are: - // - // * TERMINATE – The child executions are terminated. - // - // * REQUEST_CANCEL – A request to cancel is attempted for each child execution - // by recording a WorkflowExecutionCancelRequested event in its history. - // It is up to the decider to take appropriate actions when it receives an - // execution history with this event. - // - // * ABANDON – No action is taken. The child executions continue to run. - DefaultChildPolicy *string `locationName:"defaultChildPolicy" type:"string" enum:"ChildPolicy"` - - // The default maximum duration, specified when registering the workflow type, - // for executions of this workflow type. This default can be overridden when - // starting a workflow execution using the StartWorkflowExecution action or - // the StartChildWorkflowExecutionDecision. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - DefaultExecutionStartToCloseTimeout *string `locationName:"defaultExecutionStartToCloseTimeout" type:"string"` - - // The default IAM role attached to this workflow type. - // - // Executions of this workflow type need IAM roles to invoke Lambda functions. - // If you don't specify an IAM role when starting this workflow type, the default - // Lambda role is attached to the execution. For more information, see http://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html) - // in the Amazon SWF Developer Guide. - DefaultLambdaRole *string `locationName:"defaultLambdaRole" min:"1" type:"string"` - - // The default task list, specified when registering the workflow type, for - // decisions tasks scheduled for workflow executions of this type. This default - // can be overridden when starting a workflow execution using the StartWorkflowExecution - // action or the StartChildWorkflowExecutionDecision. - DefaultTaskList *TaskList `locationName:"defaultTaskList" type:"structure"` - - // The default task priority, specified when registering the workflow type, - // for all decision tasks of this workflow type. This default can be overridden - // when starting a workflow execution using the StartWorkflowExecution action - // or the StartChildWorkflowExecution decision. - // - // Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) - // to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. - // - // For more information about setting task priority, see Setting Task Priority - // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) - // in the Amazon SWF Developer Guide. - DefaultTaskPriority *string `locationName:"defaultTaskPriority" type:"string"` - - // The default maximum duration, specified when registering the workflow type, - // that a decision task for executions of this workflow type might take before - // returning completion or failure. If the task doesn'tdo close in the specified - // time then the task is automatically timed out and rescheduled. If the decider - // eventually reports a completion or failure, it is ignored. This default can - // be overridden when starting a workflow execution using the StartWorkflowExecution - // action or the StartChildWorkflowExecutionDecision. - // - // The duration is specified in seconds, an integer greater than or equal to - // 0. You can use NONE to specify unlimited duration. - DefaultTaskStartToCloseTimeout *string `locationName:"defaultTaskStartToCloseTimeout" type:"string"` -} - -// String returns the string representation -func (s WorkflowTypeConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowTypeConfiguration) GoString() string { - return s.String() -} - -// SetDefaultChildPolicy sets the DefaultChildPolicy field's value. -func (s *WorkflowTypeConfiguration) SetDefaultChildPolicy(v string) *WorkflowTypeConfiguration { - s.DefaultChildPolicy = &v - return s -} - -// SetDefaultExecutionStartToCloseTimeout sets the DefaultExecutionStartToCloseTimeout field's value. -func (s *WorkflowTypeConfiguration) SetDefaultExecutionStartToCloseTimeout(v string) *WorkflowTypeConfiguration { - s.DefaultExecutionStartToCloseTimeout = &v - return s -} - -// SetDefaultLambdaRole sets the DefaultLambdaRole field's value. -func (s *WorkflowTypeConfiguration) SetDefaultLambdaRole(v string) *WorkflowTypeConfiguration { - s.DefaultLambdaRole = &v - return s -} - -// SetDefaultTaskList sets the DefaultTaskList field's value. -func (s *WorkflowTypeConfiguration) SetDefaultTaskList(v *TaskList) *WorkflowTypeConfiguration { - s.DefaultTaskList = v - return s -} - -// SetDefaultTaskPriority sets the DefaultTaskPriority field's value. -func (s *WorkflowTypeConfiguration) SetDefaultTaskPriority(v string) *WorkflowTypeConfiguration { - s.DefaultTaskPriority = &v - return s -} - -// SetDefaultTaskStartToCloseTimeout sets the DefaultTaskStartToCloseTimeout field's value. -func (s *WorkflowTypeConfiguration) SetDefaultTaskStartToCloseTimeout(v string) *WorkflowTypeConfiguration { - s.DefaultTaskStartToCloseTimeout = &v - return s -} - -// Used to filter workflow execution query results by type. Each parameter, -// if specified, defines a rule that must be satisfied by each returned result. -type WorkflowTypeFilter struct { - _ struct{} `type:"structure"` - - // Name of the workflow type. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // Version of the workflow type. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s WorkflowTypeFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowTypeFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WorkflowTypeFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WorkflowTypeFilter"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *WorkflowTypeFilter) SetName(v string) *WorkflowTypeFilter { - s.Name = &v - return s -} - -// SetVersion sets the Version field's value. -func (s *WorkflowTypeFilter) SetVersion(v string) *WorkflowTypeFilter { - s.Version = &v - return s -} - -// Contains information about a workflow type. -type WorkflowTypeInfo struct { - _ struct{} `type:"structure"` - - // The date when this type was registered. - // - // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` - - // If the type is in deprecated state, then it is set to the date when the type - // was deprecated. - DeprecationDate *time.Time `locationName:"deprecationDate" type:"timestamp"` - - // The description of the type registered through RegisterWorkflowType. - Description *string `locationName:"description" type:"string"` - - // The current status of the workflow type. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"RegistrationStatus"` - - // The workflow type this information is about. - // - // WorkflowType is a required field - WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` -} - -// String returns the string representation -func (s WorkflowTypeInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkflowTypeInfo) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *WorkflowTypeInfo) SetCreationDate(v time.Time) *WorkflowTypeInfo { - s.CreationDate = &v - return s -} - -// SetDeprecationDate sets the DeprecationDate field's value. -func (s *WorkflowTypeInfo) SetDeprecationDate(v time.Time) *WorkflowTypeInfo { - s.DeprecationDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *WorkflowTypeInfo) SetDescription(v string) *WorkflowTypeInfo { - s.Description = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *WorkflowTypeInfo) SetStatus(v string) *WorkflowTypeInfo { - s.Status = &v - return s -} - -// SetWorkflowType sets the WorkflowType field's value. -func (s *WorkflowTypeInfo) SetWorkflowType(v *WorkflowType) *WorkflowTypeInfo { - s.WorkflowType = v - return s -} - -const ( - // ActivityTaskTimeoutTypeStartToClose is a ActivityTaskTimeoutType enum value - ActivityTaskTimeoutTypeStartToClose = "START_TO_CLOSE" - - // ActivityTaskTimeoutTypeScheduleToStart is a ActivityTaskTimeoutType enum value - ActivityTaskTimeoutTypeScheduleToStart = "SCHEDULE_TO_START" - - // ActivityTaskTimeoutTypeScheduleToClose is a ActivityTaskTimeoutType enum value - ActivityTaskTimeoutTypeScheduleToClose = "SCHEDULE_TO_CLOSE" - - // ActivityTaskTimeoutTypeHeartbeat is a ActivityTaskTimeoutType enum value - ActivityTaskTimeoutTypeHeartbeat = "HEARTBEAT" -) - -const ( - // CancelTimerFailedCauseTimerIdUnknown is a CancelTimerFailedCause enum value - CancelTimerFailedCauseTimerIdUnknown = "TIMER_ID_UNKNOWN" - - // CancelTimerFailedCauseOperationNotPermitted is a CancelTimerFailedCause enum value - CancelTimerFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" -) - -const ( - // CancelWorkflowExecutionFailedCauseUnhandledDecision is a CancelWorkflowExecutionFailedCause enum value - CancelWorkflowExecutionFailedCauseUnhandledDecision = "UNHANDLED_DECISION" - - // CancelWorkflowExecutionFailedCauseOperationNotPermitted is a CancelWorkflowExecutionFailedCause enum value - CancelWorkflowExecutionFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" -) - -const ( - // ChildPolicyTerminate is a ChildPolicy enum value - ChildPolicyTerminate = "TERMINATE" - - // ChildPolicyRequestCancel is a ChildPolicy enum value - ChildPolicyRequestCancel = "REQUEST_CANCEL" - - // ChildPolicyAbandon is a ChildPolicy enum value - ChildPolicyAbandon = "ABANDON" -) - -const ( - // CloseStatusCompleted is a CloseStatus enum value - CloseStatusCompleted = "COMPLETED" - - // CloseStatusFailed is a CloseStatus enum value - CloseStatusFailed = "FAILED" - - // CloseStatusCanceled is a CloseStatus enum value - CloseStatusCanceled = "CANCELED" - - // CloseStatusTerminated is a CloseStatus enum value - CloseStatusTerminated = "TERMINATED" - - // CloseStatusContinuedAsNew is a CloseStatus enum value - CloseStatusContinuedAsNew = "CONTINUED_AS_NEW" - - // CloseStatusTimedOut is a CloseStatus enum value - CloseStatusTimedOut = "TIMED_OUT" -) - -const ( - // CompleteWorkflowExecutionFailedCauseUnhandledDecision is a CompleteWorkflowExecutionFailedCause enum value - CompleteWorkflowExecutionFailedCauseUnhandledDecision = "UNHANDLED_DECISION" - - // CompleteWorkflowExecutionFailedCauseOperationNotPermitted is a CompleteWorkflowExecutionFailedCause enum value - CompleteWorkflowExecutionFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" -) - -const ( - // ContinueAsNewWorkflowExecutionFailedCauseUnhandledDecision is a ContinueAsNewWorkflowExecutionFailedCause enum value - ContinueAsNewWorkflowExecutionFailedCauseUnhandledDecision = "UNHANDLED_DECISION" - - // ContinueAsNewWorkflowExecutionFailedCauseWorkflowTypeDeprecated is a ContinueAsNewWorkflowExecutionFailedCause enum value - ContinueAsNewWorkflowExecutionFailedCauseWorkflowTypeDeprecated = "WORKFLOW_TYPE_DEPRECATED" - - // ContinueAsNewWorkflowExecutionFailedCauseWorkflowTypeDoesNotExist is a ContinueAsNewWorkflowExecutionFailedCause enum value - ContinueAsNewWorkflowExecutionFailedCauseWorkflowTypeDoesNotExist = "WORKFLOW_TYPE_DOES_NOT_EXIST" - - // ContinueAsNewWorkflowExecutionFailedCauseDefaultExecutionStartToCloseTimeoutUndefined is a ContinueAsNewWorkflowExecutionFailedCause enum value - ContinueAsNewWorkflowExecutionFailedCauseDefaultExecutionStartToCloseTimeoutUndefined = "DEFAULT_EXECUTION_START_TO_CLOSE_TIMEOUT_UNDEFINED" - - // ContinueAsNewWorkflowExecutionFailedCauseDefaultTaskStartToCloseTimeoutUndefined is a ContinueAsNewWorkflowExecutionFailedCause enum value - ContinueAsNewWorkflowExecutionFailedCauseDefaultTaskStartToCloseTimeoutUndefined = "DEFAULT_TASK_START_TO_CLOSE_TIMEOUT_UNDEFINED" - - // ContinueAsNewWorkflowExecutionFailedCauseDefaultTaskListUndefined is a ContinueAsNewWorkflowExecutionFailedCause enum value - ContinueAsNewWorkflowExecutionFailedCauseDefaultTaskListUndefined = "DEFAULT_TASK_LIST_UNDEFINED" - - // ContinueAsNewWorkflowExecutionFailedCauseDefaultChildPolicyUndefined is a ContinueAsNewWorkflowExecutionFailedCause enum value - ContinueAsNewWorkflowExecutionFailedCauseDefaultChildPolicyUndefined = "DEFAULT_CHILD_POLICY_UNDEFINED" - - // ContinueAsNewWorkflowExecutionFailedCauseContinueAsNewWorkflowExecutionRateExceeded is a ContinueAsNewWorkflowExecutionFailedCause enum value - ContinueAsNewWorkflowExecutionFailedCauseContinueAsNewWorkflowExecutionRateExceeded = "CONTINUE_AS_NEW_WORKFLOW_EXECUTION_RATE_EXCEEDED" - - // ContinueAsNewWorkflowExecutionFailedCauseOperationNotPermitted is a ContinueAsNewWorkflowExecutionFailedCause enum value - ContinueAsNewWorkflowExecutionFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" -) - -const ( - // DecisionTaskTimeoutTypeStartToClose is a DecisionTaskTimeoutType enum value - DecisionTaskTimeoutTypeStartToClose = "START_TO_CLOSE" -) - -const ( - // DecisionTypeScheduleActivityTask is a DecisionType enum value - DecisionTypeScheduleActivityTask = "ScheduleActivityTask" - - // DecisionTypeRequestCancelActivityTask is a DecisionType enum value - DecisionTypeRequestCancelActivityTask = "RequestCancelActivityTask" - - // DecisionTypeCompleteWorkflowExecution is a DecisionType enum value - DecisionTypeCompleteWorkflowExecution = "CompleteWorkflowExecution" - - // DecisionTypeFailWorkflowExecution is a DecisionType enum value - DecisionTypeFailWorkflowExecution = "FailWorkflowExecution" - - // DecisionTypeCancelWorkflowExecution is a DecisionType enum value - DecisionTypeCancelWorkflowExecution = "CancelWorkflowExecution" - - // DecisionTypeContinueAsNewWorkflowExecution is a DecisionType enum value - DecisionTypeContinueAsNewWorkflowExecution = "ContinueAsNewWorkflowExecution" - - // DecisionTypeRecordMarker is a DecisionType enum value - DecisionTypeRecordMarker = "RecordMarker" - - // DecisionTypeStartTimer is a DecisionType enum value - DecisionTypeStartTimer = "StartTimer" - - // DecisionTypeCancelTimer is a DecisionType enum value - DecisionTypeCancelTimer = "CancelTimer" - - // DecisionTypeSignalExternalWorkflowExecution is a DecisionType enum value - DecisionTypeSignalExternalWorkflowExecution = "SignalExternalWorkflowExecution" - - // DecisionTypeRequestCancelExternalWorkflowExecution is a DecisionType enum value - DecisionTypeRequestCancelExternalWorkflowExecution = "RequestCancelExternalWorkflowExecution" - - // DecisionTypeStartChildWorkflowExecution is a DecisionType enum value - DecisionTypeStartChildWorkflowExecution = "StartChildWorkflowExecution" - - // DecisionTypeScheduleLambdaFunction is a DecisionType enum value - DecisionTypeScheduleLambdaFunction = "ScheduleLambdaFunction" -) - -const ( - // EventTypeWorkflowExecutionStarted is a EventType enum value - EventTypeWorkflowExecutionStarted = "WorkflowExecutionStarted" - - // EventTypeWorkflowExecutionCancelRequested is a EventType enum value - EventTypeWorkflowExecutionCancelRequested = "WorkflowExecutionCancelRequested" - - // EventTypeWorkflowExecutionCompleted is a EventType enum value - EventTypeWorkflowExecutionCompleted = "WorkflowExecutionCompleted" - - // EventTypeCompleteWorkflowExecutionFailed is a EventType enum value - EventTypeCompleteWorkflowExecutionFailed = "CompleteWorkflowExecutionFailed" - - // EventTypeWorkflowExecutionFailed is a EventType enum value - EventTypeWorkflowExecutionFailed = "WorkflowExecutionFailed" - - // EventTypeFailWorkflowExecutionFailed is a EventType enum value - EventTypeFailWorkflowExecutionFailed = "FailWorkflowExecutionFailed" - - // EventTypeWorkflowExecutionTimedOut is a EventType enum value - EventTypeWorkflowExecutionTimedOut = "WorkflowExecutionTimedOut" - - // EventTypeWorkflowExecutionCanceled is a EventType enum value - EventTypeWorkflowExecutionCanceled = "WorkflowExecutionCanceled" - - // EventTypeCancelWorkflowExecutionFailed is a EventType enum value - EventTypeCancelWorkflowExecutionFailed = "CancelWorkflowExecutionFailed" - - // EventTypeWorkflowExecutionContinuedAsNew is a EventType enum value - EventTypeWorkflowExecutionContinuedAsNew = "WorkflowExecutionContinuedAsNew" - - // EventTypeContinueAsNewWorkflowExecutionFailed is a EventType enum value - EventTypeContinueAsNewWorkflowExecutionFailed = "ContinueAsNewWorkflowExecutionFailed" - - // EventTypeWorkflowExecutionTerminated is a EventType enum value - EventTypeWorkflowExecutionTerminated = "WorkflowExecutionTerminated" - - // EventTypeDecisionTaskScheduled is a EventType enum value - EventTypeDecisionTaskScheduled = "DecisionTaskScheduled" - - // EventTypeDecisionTaskStarted is a EventType enum value - EventTypeDecisionTaskStarted = "DecisionTaskStarted" - - // EventTypeDecisionTaskCompleted is a EventType enum value - EventTypeDecisionTaskCompleted = "DecisionTaskCompleted" - - // EventTypeDecisionTaskTimedOut is a EventType enum value - EventTypeDecisionTaskTimedOut = "DecisionTaskTimedOut" - - // EventTypeActivityTaskScheduled is a EventType enum value - EventTypeActivityTaskScheduled = "ActivityTaskScheduled" - - // EventTypeScheduleActivityTaskFailed is a EventType enum value - EventTypeScheduleActivityTaskFailed = "ScheduleActivityTaskFailed" - - // EventTypeActivityTaskStarted is a EventType enum value - EventTypeActivityTaskStarted = "ActivityTaskStarted" - - // EventTypeActivityTaskCompleted is a EventType enum value - EventTypeActivityTaskCompleted = "ActivityTaskCompleted" - - // EventTypeActivityTaskFailed is a EventType enum value - EventTypeActivityTaskFailed = "ActivityTaskFailed" - - // EventTypeActivityTaskTimedOut is a EventType enum value - EventTypeActivityTaskTimedOut = "ActivityTaskTimedOut" - - // EventTypeActivityTaskCanceled is a EventType enum value - EventTypeActivityTaskCanceled = "ActivityTaskCanceled" - - // EventTypeActivityTaskCancelRequested is a EventType enum value - EventTypeActivityTaskCancelRequested = "ActivityTaskCancelRequested" - - // EventTypeRequestCancelActivityTaskFailed is a EventType enum value - EventTypeRequestCancelActivityTaskFailed = "RequestCancelActivityTaskFailed" - - // EventTypeWorkflowExecutionSignaled is a EventType enum value - EventTypeWorkflowExecutionSignaled = "WorkflowExecutionSignaled" - - // EventTypeMarkerRecorded is a EventType enum value - EventTypeMarkerRecorded = "MarkerRecorded" - - // EventTypeRecordMarkerFailed is a EventType enum value - EventTypeRecordMarkerFailed = "RecordMarkerFailed" - - // EventTypeTimerStarted is a EventType enum value - EventTypeTimerStarted = "TimerStarted" - - // EventTypeStartTimerFailed is a EventType enum value - EventTypeStartTimerFailed = "StartTimerFailed" - - // EventTypeTimerFired is a EventType enum value - EventTypeTimerFired = "TimerFired" - - // EventTypeTimerCanceled is a EventType enum value - EventTypeTimerCanceled = "TimerCanceled" - - // EventTypeCancelTimerFailed is a EventType enum value - EventTypeCancelTimerFailed = "CancelTimerFailed" - - // EventTypeStartChildWorkflowExecutionInitiated is a EventType enum value - EventTypeStartChildWorkflowExecutionInitiated = "StartChildWorkflowExecutionInitiated" - - // EventTypeStartChildWorkflowExecutionFailed is a EventType enum value - EventTypeStartChildWorkflowExecutionFailed = "StartChildWorkflowExecutionFailed" - - // EventTypeChildWorkflowExecutionStarted is a EventType enum value - EventTypeChildWorkflowExecutionStarted = "ChildWorkflowExecutionStarted" - - // EventTypeChildWorkflowExecutionCompleted is a EventType enum value - EventTypeChildWorkflowExecutionCompleted = "ChildWorkflowExecutionCompleted" - - // EventTypeChildWorkflowExecutionFailed is a EventType enum value - EventTypeChildWorkflowExecutionFailed = "ChildWorkflowExecutionFailed" - - // EventTypeChildWorkflowExecutionTimedOut is a EventType enum value - EventTypeChildWorkflowExecutionTimedOut = "ChildWorkflowExecutionTimedOut" - - // EventTypeChildWorkflowExecutionCanceled is a EventType enum value - EventTypeChildWorkflowExecutionCanceled = "ChildWorkflowExecutionCanceled" - - // EventTypeChildWorkflowExecutionTerminated is a EventType enum value - EventTypeChildWorkflowExecutionTerminated = "ChildWorkflowExecutionTerminated" - - // EventTypeSignalExternalWorkflowExecutionInitiated is a EventType enum value - EventTypeSignalExternalWorkflowExecutionInitiated = "SignalExternalWorkflowExecutionInitiated" - - // EventTypeSignalExternalWorkflowExecutionFailed is a EventType enum value - EventTypeSignalExternalWorkflowExecutionFailed = "SignalExternalWorkflowExecutionFailed" - - // EventTypeExternalWorkflowExecutionSignaled is a EventType enum value - EventTypeExternalWorkflowExecutionSignaled = "ExternalWorkflowExecutionSignaled" - - // EventTypeRequestCancelExternalWorkflowExecutionInitiated is a EventType enum value - EventTypeRequestCancelExternalWorkflowExecutionInitiated = "RequestCancelExternalWorkflowExecutionInitiated" - - // EventTypeRequestCancelExternalWorkflowExecutionFailed is a EventType enum value - EventTypeRequestCancelExternalWorkflowExecutionFailed = "RequestCancelExternalWorkflowExecutionFailed" - - // EventTypeExternalWorkflowExecutionCancelRequested is a EventType enum value - EventTypeExternalWorkflowExecutionCancelRequested = "ExternalWorkflowExecutionCancelRequested" - - // EventTypeLambdaFunctionScheduled is a EventType enum value - EventTypeLambdaFunctionScheduled = "LambdaFunctionScheduled" - - // EventTypeLambdaFunctionStarted is a EventType enum value - EventTypeLambdaFunctionStarted = "LambdaFunctionStarted" - - // EventTypeLambdaFunctionCompleted is a EventType enum value - EventTypeLambdaFunctionCompleted = "LambdaFunctionCompleted" - - // EventTypeLambdaFunctionFailed is a EventType enum value - EventTypeLambdaFunctionFailed = "LambdaFunctionFailed" - - // EventTypeLambdaFunctionTimedOut is a EventType enum value - EventTypeLambdaFunctionTimedOut = "LambdaFunctionTimedOut" - - // EventTypeScheduleLambdaFunctionFailed is a EventType enum value - EventTypeScheduleLambdaFunctionFailed = "ScheduleLambdaFunctionFailed" - - // EventTypeStartLambdaFunctionFailed is a EventType enum value - EventTypeStartLambdaFunctionFailed = "StartLambdaFunctionFailed" -) - -const ( - // ExecutionStatusOpen is a ExecutionStatus enum value - ExecutionStatusOpen = "OPEN" - - // ExecutionStatusClosed is a ExecutionStatus enum value - ExecutionStatusClosed = "CLOSED" -) - -const ( - // FailWorkflowExecutionFailedCauseUnhandledDecision is a FailWorkflowExecutionFailedCause enum value - FailWorkflowExecutionFailedCauseUnhandledDecision = "UNHANDLED_DECISION" - - // FailWorkflowExecutionFailedCauseOperationNotPermitted is a FailWorkflowExecutionFailedCause enum value - FailWorkflowExecutionFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" -) - -const ( - // LambdaFunctionTimeoutTypeStartToClose is a LambdaFunctionTimeoutType enum value - LambdaFunctionTimeoutTypeStartToClose = "START_TO_CLOSE" -) - -const ( - // RecordMarkerFailedCauseOperationNotPermitted is a RecordMarkerFailedCause enum value - RecordMarkerFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" -) - -const ( - // RegistrationStatusRegistered is a RegistrationStatus enum value - RegistrationStatusRegistered = "REGISTERED" - - // RegistrationStatusDeprecated is a RegistrationStatus enum value - RegistrationStatusDeprecated = "DEPRECATED" -) - -const ( - // RequestCancelActivityTaskFailedCauseActivityIdUnknown is a RequestCancelActivityTaskFailedCause enum value - RequestCancelActivityTaskFailedCauseActivityIdUnknown = "ACTIVITY_ID_UNKNOWN" - - // RequestCancelActivityTaskFailedCauseOperationNotPermitted is a RequestCancelActivityTaskFailedCause enum value - RequestCancelActivityTaskFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" -) - -const ( - // RequestCancelExternalWorkflowExecutionFailedCauseUnknownExternalWorkflowExecution is a RequestCancelExternalWorkflowExecutionFailedCause enum value - RequestCancelExternalWorkflowExecutionFailedCauseUnknownExternalWorkflowExecution = "UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION" - - // RequestCancelExternalWorkflowExecutionFailedCauseRequestCancelExternalWorkflowExecutionRateExceeded is a RequestCancelExternalWorkflowExecutionFailedCause enum value - RequestCancelExternalWorkflowExecutionFailedCauseRequestCancelExternalWorkflowExecutionRateExceeded = "REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_RATE_EXCEEDED" - - // RequestCancelExternalWorkflowExecutionFailedCauseOperationNotPermitted is a RequestCancelExternalWorkflowExecutionFailedCause enum value - RequestCancelExternalWorkflowExecutionFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" -) - -const ( - // ScheduleActivityTaskFailedCauseActivityTypeDeprecated is a ScheduleActivityTaskFailedCause enum value - ScheduleActivityTaskFailedCauseActivityTypeDeprecated = "ACTIVITY_TYPE_DEPRECATED" - - // ScheduleActivityTaskFailedCauseActivityTypeDoesNotExist is a ScheduleActivityTaskFailedCause enum value - ScheduleActivityTaskFailedCauseActivityTypeDoesNotExist = "ACTIVITY_TYPE_DOES_NOT_EXIST" - - // ScheduleActivityTaskFailedCauseActivityIdAlreadyInUse is a ScheduleActivityTaskFailedCause enum value - ScheduleActivityTaskFailedCauseActivityIdAlreadyInUse = "ACTIVITY_ID_ALREADY_IN_USE" - - // ScheduleActivityTaskFailedCauseOpenActivitiesLimitExceeded is a ScheduleActivityTaskFailedCause enum value - ScheduleActivityTaskFailedCauseOpenActivitiesLimitExceeded = "OPEN_ACTIVITIES_LIMIT_EXCEEDED" - - // ScheduleActivityTaskFailedCauseActivityCreationRateExceeded is a ScheduleActivityTaskFailedCause enum value - ScheduleActivityTaskFailedCauseActivityCreationRateExceeded = "ACTIVITY_CREATION_RATE_EXCEEDED" - - // ScheduleActivityTaskFailedCauseDefaultScheduleToCloseTimeoutUndefined is a ScheduleActivityTaskFailedCause enum value - ScheduleActivityTaskFailedCauseDefaultScheduleToCloseTimeoutUndefined = "DEFAULT_SCHEDULE_TO_CLOSE_TIMEOUT_UNDEFINED" - - // ScheduleActivityTaskFailedCauseDefaultTaskListUndefined is a ScheduleActivityTaskFailedCause enum value - ScheduleActivityTaskFailedCauseDefaultTaskListUndefined = "DEFAULT_TASK_LIST_UNDEFINED" - - // ScheduleActivityTaskFailedCauseDefaultScheduleToStartTimeoutUndefined is a ScheduleActivityTaskFailedCause enum value - ScheduleActivityTaskFailedCauseDefaultScheduleToStartTimeoutUndefined = "DEFAULT_SCHEDULE_TO_START_TIMEOUT_UNDEFINED" - - // ScheduleActivityTaskFailedCauseDefaultStartToCloseTimeoutUndefined is a ScheduleActivityTaskFailedCause enum value - ScheduleActivityTaskFailedCauseDefaultStartToCloseTimeoutUndefined = "DEFAULT_START_TO_CLOSE_TIMEOUT_UNDEFINED" - - // ScheduleActivityTaskFailedCauseDefaultHeartbeatTimeoutUndefined is a ScheduleActivityTaskFailedCause enum value - ScheduleActivityTaskFailedCauseDefaultHeartbeatTimeoutUndefined = "DEFAULT_HEARTBEAT_TIMEOUT_UNDEFINED" - - // ScheduleActivityTaskFailedCauseOperationNotPermitted is a ScheduleActivityTaskFailedCause enum value - ScheduleActivityTaskFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" -) - -const ( - // ScheduleLambdaFunctionFailedCauseIdAlreadyInUse is a ScheduleLambdaFunctionFailedCause enum value - ScheduleLambdaFunctionFailedCauseIdAlreadyInUse = "ID_ALREADY_IN_USE" - - // ScheduleLambdaFunctionFailedCauseOpenLambdaFunctionsLimitExceeded is a ScheduleLambdaFunctionFailedCause enum value - ScheduleLambdaFunctionFailedCauseOpenLambdaFunctionsLimitExceeded = "OPEN_LAMBDA_FUNCTIONS_LIMIT_EXCEEDED" - - // ScheduleLambdaFunctionFailedCauseLambdaFunctionCreationRateExceeded is a ScheduleLambdaFunctionFailedCause enum value - ScheduleLambdaFunctionFailedCauseLambdaFunctionCreationRateExceeded = "LAMBDA_FUNCTION_CREATION_RATE_EXCEEDED" - - // ScheduleLambdaFunctionFailedCauseLambdaServiceNotAvailableInRegion is a ScheduleLambdaFunctionFailedCause enum value - ScheduleLambdaFunctionFailedCauseLambdaServiceNotAvailableInRegion = "LAMBDA_SERVICE_NOT_AVAILABLE_IN_REGION" -) - -const ( - // SignalExternalWorkflowExecutionFailedCauseUnknownExternalWorkflowExecution is a SignalExternalWorkflowExecutionFailedCause enum value - SignalExternalWorkflowExecutionFailedCauseUnknownExternalWorkflowExecution = "UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION" - - // SignalExternalWorkflowExecutionFailedCauseSignalExternalWorkflowExecutionRateExceeded is a SignalExternalWorkflowExecutionFailedCause enum value - SignalExternalWorkflowExecutionFailedCauseSignalExternalWorkflowExecutionRateExceeded = "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_RATE_EXCEEDED" - - // SignalExternalWorkflowExecutionFailedCauseOperationNotPermitted is a SignalExternalWorkflowExecutionFailedCause enum value - SignalExternalWorkflowExecutionFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" -) - -const ( - // StartChildWorkflowExecutionFailedCauseWorkflowTypeDoesNotExist is a StartChildWorkflowExecutionFailedCause enum value - StartChildWorkflowExecutionFailedCauseWorkflowTypeDoesNotExist = "WORKFLOW_TYPE_DOES_NOT_EXIST" - - // StartChildWorkflowExecutionFailedCauseWorkflowTypeDeprecated is a StartChildWorkflowExecutionFailedCause enum value - StartChildWorkflowExecutionFailedCauseWorkflowTypeDeprecated = "WORKFLOW_TYPE_DEPRECATED" - - // StartChildWorkflowExecutionFailedCauseOpenChildrenLimitExceeded is a StartChildWorkflowExecutionFailedCause enum value - StartChildWorkflowExecutionFailedCauseOpenChildrenLimitExceeded = "OPEN_CHILDREN_LIMIT_EXCEEDED" - - // StartChildWorkflowExecutionFailedCauseOpenWorkflowsLimitExceeded is a StartChildWorkflowExecutionFailedCause enum value - StartChildWorkflowExecutionFailedCauseOpenWorkflowsLimitExceeded = "OPEN_WORKFLOWS_LIMIT_EXCEEDED" - - // StartChildWorkflowExecutionFailedCauseChildCreationRateExceeded is a StartChildWorkflowExecutionFailedCause enum value - StartChildWorkflowExecutionFailedCauseChildCreationRateExceeded = "CHILD_CREATION_RATE_EXCEEDED" - - // StartChildWorkflowExecutionFailedCauseWorkflowAlreadyRunning is a StartChildWorkflowExecutionFailedCause enum value - StartChildWorkflowExecutionFailedCauseWorkflowAlreadyRunning = "WORKFLOW_ALREADY_RUNNING" - - // StartChildWorkflowExecutionFailedCauseDefaultExecutionStartToCloseTimeoutUndefined is a StartChildWorkflowExecutionFailedCause enum value - StartChildWorkflowExecutionFailedCauseDefaultExecutionStartToCloseTimeoutUndefined = "DEFAULT_EXECUTION_START_TO_CLOSE_TIMEOUT_UNDEFINED" - - // StartChildWorkflowExecutionFailedCauseDefaultTaskListUndefined is a StartChildWorkflowExecutionFailedCause enum value - StartChildWorkflowExecutionFailedCauseDefaultTaskListUndefined = "DEFAULT_TASK_LIST_UNDEFINED" - - // StartChildWorkflowExecutionFailedCauseDefaultTaskStartToCloseTimeoutUndefined is a StartChildWorkflowExecutionFailedCause enum value - StartChildWorkflowExecutionFailedCauseDefaultTaskStartToCloseTimeoutUndefined = "DEFAULT_TASK_START_TO_CLOSE_TIMEOUT_UNDEFINED" - - // StartChildWorkflowExecutionFailedCauseDefaultChildPolicyUndefined is a StartChildWorkflowExecutionFailedCause enum value - StartChildWorkflowExecutionFailedCauseDefaultChildPolicyUndefined = "DEFAULT_CHILD_POLICY_UNDEFINED" - - // StartChildWorkflowExecutionFailedCauseOperationNotPermitted is a StartChildWorkflowExecutionFailedCause enum value - StartChildWorkflowExecutionFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" -) - -const ( - // StartLambdaFunctionFailedCauseAssumeRoleFailed is a StartLambdaFunctionFailedCause enum value - StartLambdaFunctionFailedCauseAssumeRoleFailed = "ASSUME_ROLE_FAILED" -) - -const ( - // StartTimerFailedCauseTimerIdAlreadyInUse is a StartTimerFailedCause enum value - StartTimerFailedCauseTimerIdAlreadyInUse = "TIMER_ID_ALREADY_IN_USE" - - // StartTimerFailedCauseOpenTimersLimitExceeded is a StartTimerFailedCause enum value - StartTimerFailedCauseOpenTimersLimitExceeded = "OPEN_TIMERS_LIMIT_EXCEEDED" - - // StartTimerFailedCauseTimerCreationRateExceeded is a StartTimerFailedCause enum value - StartTimerFailedCauseTimerCreationRateExceeded = "TIMER_CREATION_RATE_EXCEEDED" - - // StartTimerFailedCauseOperationNotPermitted is a StartTimerFailedCause enum value - StartTimerFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" -) - -const ( - // WorkflowExecutionCancelRequestedCauseChildPolicyApplied is a WorkflowExecutionCancelRequestedCause enum value - WorkflowExecutionCancelRequestedCauseChildPolicyApplied = "CHILD_POLICY_APPLIED" -) - -const ( - // WorkflowExecutionTerminatedCauseChildPolicyApplied is a WorkflowExecutionTerminatedCause enum value - WorkflowExecutionTerminatedCauseChildPolicyApplied = "CHILD_POLICY_APPLIED" - - // WorkflowExecutionTerminatedCauseEventLimitExceeded is a WorkflowExecutionTerminatedCause enum value - WorkflowExecutionTerminatedCauseEventLimitExceeded = "EVENT_LIMIT_EXCEEDED" - - // WorkflowExecutionTerminatedCauseOperatorInitiated is a WorkflowExecutionTerminatedCause enum value - WorkflowExecutionTerminatedCauseOperatorInitiated = "OPERATOR_INITIATED" -) - -const ( - // WorkflowExecutionTimeoutTypeStartToClose is a WorkflowExecutionTimeoutType enum value - WorkflowExecutionTimeoutTypeStartToClose = "START_TO_CLOSE" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/swf/doc.go b/vendor/github.com/aws/aws-sdk-go/service/swf/doc.go deleted file mode 100644 index bbb8f45ab..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/swf/doc.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package swf provides the client and types for making API -// requests to Amazon Simple Workflow Service. -// -// The Amazon Simple Workflow Service (Amazon SWF) makes it easy to build applications -// that use Amazon's cloud to coordinate work across distributed components. -// In Amazon SWF, a task represents a logical unit of work that is performed -// by a component of your workflow. Coordinating tasks in a workflow involves -// managing intertask dependencies, scheduling, and concurrency in accordance -// with the logical flow of the application. -// -// Amazon SWF gives you full control over implementing tasks and coordinating -// them without worrying about underlying complexities such as tracking their -// progress and maintaining their state. -// -// This documentation serves as reference only. For a broader overview of the -// Amazon SWF programming model, see the Amazon SWF Developer Guide (http://docs.aws.amazon.com/amazonswf/latest/developerguide/). -// -// See swf package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/swf/ -// -// Using the Client -// -// To contact Amazon Simple Workflow Service with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Simple Workflow Service client SWF for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/swf/#New -package swf diff --git a/vendor/github.com/aws/aws-sdk-go/service/swf/errors.go b/vendor/github.com/aws/aws-sdk-go/service/swf/errors.go deleted file mode 100644 index 7baff0daf..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/swf/errors.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package swf - -const ( - - // ErrCodeDefaultUndefinedFault for service response error code - // "DefaultUndefinedFault". - // - // The StartWorkflowExecution API action was called without the required parameters - // set. - // - // Some workflow execution parameters, such as the decision taskList, must be - // set to start the execution. However, these parameters might have been set - // as defaults when the workflow type was registered. In this case, you can - // omit these parameters from the StartWorkflowExecution call and Amazon SWF - // uses the values defined in the workflow type. - // - // If these parameters aren't set and no default parameters were defined in - // the workflow type, this error is displayed. - ErrCodeDefaultUndefinedFault = "DefaultUndefinedFault" - - // ErrCodeDomainAlreadyExistsFault for service response error code - // "DomainAlreadyExistsFault". - // - // Returned if the specified domain already exists. You get this fault even - // if the existing domain is in deprecated status. - ErrCodeDomainAlreadyExistsFault = "DomainAlreadyExistsFault" - - // ErrCodeDomainDeprecatedFault for service response error code - // "DomainDeprecatedFault". - // - // Returned when the specified domain has been deprecated. - ErrCodeDomainDeprecatedFault = "DomainDeprecatedFault" - - // ErrCodeLimitExceededFault for service response error code - // "LimitExceededFault". - // - // Returned by any operation if a system imposed limitation has been reached. - // To address this fault you should either clean up unused resources or increase - // the limit by contacting AWS. - ErrCodeLimitExceededFault = "LimitExceededFault" - - // ErrCodeOperationNotPermittedFault for service response error code - // "OperationNotPermittedFault". - // - // Returned when the caller doesn't have sufficient permissions to invoke the - // action. - ErrCodeOperationNotPermittedFault = "OperationNotPermittedFault" - - // ErrCodeTypeAlreadyExistsFault for service response error code - // "TypeAlreadyExistsFault". - // - // Returned if the type already exists in the specified domain. You get this - // fault even if the existing type is in deprecated status. You can specify - // another version if the intent is to create a new distinct version of the - // type. - ErrCodeTypeAlreadyExistsFault = "TypeAlreadyExistsFault" - - // ErrCodeTypeDeprecatedFault for service response error code - // "TypeDeprecatedFault". - // - // Returned when the specified activity or workflow type was already deprecated. - ErrCodeTypeDeprecatedFault = "TypeDeprecatedFault" - - // ErrCodeUnknownResourceFault for service response error code - // "UnknownResourceFault". - // - // Returned when the named resource cannot be found with in the scope of this - // operation (region or domain). This could happen if the named resource was - // never created or is no longer available for this operation. - ErrCodeUnknownResourceFault = "UnknownResourceFault" - - // ErrCodeWorkflowExecutionAlreadyStartedFault for service response error code - // "WorkflowExecutionAlreadyStartedFault". - // - // Returned by StartWorkflowExecution when an open execution with the same workflowId - // is already running in the specified domain. - ErrCodeWorkflowExecutionAlreadyStartedFault = "WorkflowExecutionAlreadyStartedFault" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/swf/service.go b/vendor/github.com/aws/aws-sdk-go/service/swf/service.go deleted file mode 100644 index 014d89a52..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/swf/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package swf - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// SWF provides the API operation methods for making requests to -// Amazon Simple Workflow Service. See this package's package overview docs -// for details on the service. -// -// SWF methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type SWF 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 = "swf" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "SWF" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the SWF client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a SWF client from just a session. -// svc := swf.New(mySession) -// -// // Create a SWF client with additional configuration -// svc := swf.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *SWF { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *SWF { - svc := &SWF{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2012-01-25", - JSONVersion: "1.0", - TargetPrefix: "SimpleWorkflowService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a SWF operation and runs any -// custom request initialization. -func (c *SWF) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/transfer/api.go b/vendor/github.com/aws/aws-sdk-go/service/transfer/api.go deleted file mode 100644 index de472a8a0..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/transfer/api.go +++ /dev/null @@ -1,3888 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package transfer - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateServer = "CreateServer" - -// CreateServerRequest generates a "aws/request.Request" representing the -// client's request for the CreateServer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateServer for more information on using the CreateServer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateServerRequest method. -// req, resp := client.CreateServerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateServer -func (c *Transfer) CreateServerRequest(input *CreateServerInput) (req *request.Request, output *CreateServerOutput) { - op := &request.Operation{ - Name: opCreateServer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateServerInput{} - } - - output = &CreateServerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateServer API operation for AWS Transfer for SFTP. -// -// Instantiates an autoscaling virtual server based on Secure File Transfer -// Protocol (SFTP) in AWS. The call returns the ServerId property assigned by -// the service to the newly created server. Reference this ServerId property -// when you make updates to your server, or work with users. -// -// The response returns the ServerId value for the newly created server. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation CreateServer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateServer -func (c *Transfer) CreateServer(input *CreateServerInput) (*CreateServerOutput, error) { - req, out := c.CreateServerRequest(input) - return out, req.Send() -} - -// CreateServerWithContext is the same as CreateServer with the addition of -// the ability to pass a context and additional request options. -// -// See CreateServer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) CreateServerWithContext(ctx aws.Context, input *CreateServerInput, opts ...request.Option) (*CreateServerOutput, error) { - req, out := c.CreateServerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateUser = "CreateUser" - -// CreateUserRequest generates a "aws/request.Request" representing the -// client's request for the CreateUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateUser for more information on using the CreateUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateUserRequest method. -// req, resp := client.CreateUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateUser -func (c *Transfer) CreateUserRequest(input *CreateUserInput) (req *request.Request, output *CreateUserOutput) { - op := &request.Operation{ - Name: opCreateUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateUserInput{} - } - - output = &CreateUserOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateUser API operation for AWS Transfer for SFTP. -// -// Adds a user and associate them with an existing Secure File Transfer Protocol -// (SFTP) server. Using parameters for CreateUser, you can specify the user -// name, set the home directory, store the user's public key, and assign the -// user's AWS Identity and Access Management (IAM) role. You can also optionally -// add a scope-down policy, and assign metadata with tags that can be used to -// group and search for users. -// -// The response returns the UserName and ServerId values of the new user for -// that server. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation CreateUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// * ErrCodeResourceExistsException "ResourceExistsException" -// The requested resource does not exist. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateUser -func (c *Transfer) CreateUser(input *CreateUserInput) (*CreateUserOutput, error) { - req, out := c.CreateUserRequest(input) - return out, req.Send() -} - -// CreateUserWithContext is the same as CreateUser with the addition of -// the ability to pass a context and additional request options. -// -// See CreateUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) CreateUserWithContext(ctx aws.Context, input *CreateUserInput, opts ...request.Option) (*CreateUserOutput, error) { - req, out := c.CreateUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteServer = "DeleteServer" - -// DeleteServerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteServer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteServer for more information on using the DeleteServer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteServerRequest method. -// req, resp := client.DeleteServerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteServer -func (c *Transfer) DeleteServerRequest(input *DeleteServerInput) (req *request.Request, output *DeleteServerOutput) { - op := &request.Operation{ - Name: opDeleteServer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteServerInput{} - } - - output = &DeleteServerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteServer API operation for AWS Transfer for SFTP. -// -// Deletes the Secure File Transfer Protocol (SFTP) server that you specify. -// If you used SERVICE_MANAGED as your IdentityProviderType, you need to delete -// all users associated with this server before deleting the server itself -// -// No response returns from this call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation DeleteServer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteServer -func (c *Transfer) DeleteServer(input *DeleteServerInput) (*DeleteServerOutput, error) { - req, out := c.DeleteServerRequest(input) - return out, req.Send() -} - -// DeleteServerWithContext is the same as DeleteServer with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteServer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) DeleteServerWithContext(ctx aws.Context, input *DeleteServerInput, opts ...request.Option) (*DeleteServerOutput, error) { - req, out := c.DeleteServerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSshPublicKey = "DeleteSshPublicKey" - -// DeleteSshPublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSshPublicKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSshPublicKey for more information on using the DeleteSshPublicKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSshPublicKeyRequest method. -// req, resp := client.DeleteSshPublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteSshPublicKey -func (c *Transfer) DeleteSshPublicKeyRequest(input *DeleteSshPublicKeyInput) (req *request.Request, output *DeleteSshPublicKeyOutput) { - op := &request.Operation{ - Name: opDeleteSshPublicKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSshPublicKeyInput{} - } - - output = &DeleteSshPublicKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSshPublicKey API operation for AWS Transfer for SFTP. -// -// Deletes a user's Secure Shell (SSH) public key. -// -// No response is returned from this call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation DeleteSshPublicKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteSshPublicKey -func (c *Transfer) DeleteSshPublicKey(input *DeleteSshPublicKeyInput) (*DeleteSshPublicKeyOutput, error) { - req, out := c.DeleteSshPublicKeyRequest(input) - return out, req.Send() -} - -// DeleteSshPublicKeyWithContext is the same as DeleteSshPublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSshPublicKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) DeleteSshPublicKeyWithContext(ctx aws.Context, input *DeleteSshPublicKeyInput, opts ...request.Option) (*DeleteSshPublicKeyOutput, error) { - req, out := c.DeleteSshPublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUser = "DeleteUser" - -// DeleteUserRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUser for more information on using the DeleteUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteUserRequest method. -// req, resp := client.DeleteUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteUser -func (c *Transfer) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, output *DeleteUserOutput) { - op := &request.Operation{ - Name: opDeleteUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUserInput{} - } - - output = &DeleteUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUser API operation for AWS Transfer for SFTP. -// -// Deletes the user belonging to the server you specify. -// -// No response returns from this call. -// -// When you delete a user from a server, the user's information is lost. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation DeleteUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteUser -func (c *Transfer) DeleteUser(input *DeleteUserInput) (*DeleteUserOutput, error) { - req, out := c.DeleteUserRequest(input) - return out, req.Send() -} - -// DeleteUserWithContext is the same as DeleteUser with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opts ...request.Option) (*DeleteUserOutput, error) { - req, out := c.DeleteUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeServer = "DescribeServer" - -// DescribeServerRequest generates a "aws/request.Request" representing the -// client's request for the DescribeServer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeServer for more information on using the DescribeServer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeServerRequest method. -// req, resp := client.DescribeServerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeServer -func (c *Transfer) DescribeServerRequest(input *DescribeServerInput) (req *request.Request, output *DescribeServerOutput) { - op := &request.Operation{ - Name: opDescribeServer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeServerInput{} - } - - output = &DescribeServerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeServer API operation for AWS Transfer for SFTP. -// -// Describes the server that you specify by passing the ServerId parameter. -// -// The response contains a description of the server's properties. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation DescribeServer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeServer -func (c *Transfer) DescribeServer(input *DescribeServerInput) (*DescribeServerOutput, error) { - req, out := c.DescribeServerRequest(input) - return out, req.Send() -} - -// DescribeServerWithContext is the same as DescribeServer with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeServer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) DescribeServerWithContext(ctx aws.Context, input *DescribeServerInput, opts ...request.Option) (*DescribeServerOutput, error) { - req, out := c.DescribeServerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeUser = "DescribeUser" - -// DescribeUserRequest generates a "aws/request.Request" representing the -// client's request for the DescribeUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeUser for more information on using the DescribeUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeUserRequest method. -// req, resp := client.DescribeUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeUser -func (c *Transfer) DescribeUserRequest(input *DescribeUserInput) (req *request.Request, output *DescribeUserOutput) { - op := &request.Operation{ - Name: opDescribeUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeUserInput{} - } - - output = &DescribeUserOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeUser API operation for AWS Transfer for SFTP. -// -// Describes the user assigned to a specific server, as identified by its ServerId -// property. -// -// The response from this call returns the properties of the user associated -// with the ServerId value that was specified. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation DescribeUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeUser -func (c *Transfer) DescribeUser(input *DescribeUserInput) (*DescribeUserOutput, error) { - req, out := c.DescribeUserRequest(input) - return out, req.Send() -} - -// DescribeUserWithContext is the same as DescribeUser with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) DescribeUserWithContext(ctx aws.Context, input *DescribeUserInput, opts ...request.Option) (*DescribeUserOutput, error) { - req, out := c.DescribeUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportSshPublicKey = "ImportSshPublicKey" - -// ImportSshPublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the ImportSshPublicKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportSshPublicKey for more information on using the ImportSshPublicKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportSshPublicKeyRequest method. -// req, resp := client.ImportSshPublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ImportSshPublicKey -func (c *Transfer) ImportSshPublicKeyRequest(input *ImportSshPublicKeyInput) (req *request.Request, output *ImportSshPublicKeyOutput) { - op := &request.Operation{ - Name: opImportSshPublicKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportSshPublicKeyInput{} - } - - output = &ImportSshPublicKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// ImportSshPublicKey API operation for AWS Transfer for SFTP. -// -// Adds a Secure Shell (SSH) public key to a user account identified by a UserName -// value assigned to a specific server, identified by ServerId. -// -// The response returns the UserName value, the ServerId value, and the name -// of the SshPublicKeyId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation ImportSshPublicKey for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// * ErrCodeResourceExistsException "ResourceExistsException" -// The requested resource does not exist. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ImportSshPublicKey -func (c *Transfer) ImportSshPublicKey(input *ImportSshPublicKeyInput) (*ImportSshPublicKeyOutput, error) { - req, out := c.ImportSshPublicKeyRequest(input) - return out, req.Send() -} - -// ImportSshPublicKeyWithContext is the same as ImportSshPublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See ImportSshPublicKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) ImportSshPublicKeyWithContext(ctx aws.Context, input *ImportSshPublicKeyInput, opts ...request.Option) (*ImportSshPublicKeyOutput, error) { - req, out := c.ImportSshPublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListServers = "ListServers" - -// ListServersRequest generates a "aws/request.Request" representing the -// client's request for the ListServers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListServers for more information on using the ListServers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListServersRequest method. -// req, resp := client.ListServersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListServers -func (c *Transfer) ListServersRequest(input *ListServersInput) (req *request.Request, output *ListServersOutput) { - op := &request.Operation{ - Name: opListServers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListServersInput{} - } - - output = &ListServersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListServers API operation for AWS Transfer for SFTP. -// -// Lists the Secure File Transfer Protocol (SFTP) servers that are associated -// with your AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation ListServers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The NextToken parameter that was passed is invalid. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListServers -func (c *Transfer) ListServers(input *ListServersInput) (*ListServersOutput, error) { - req, out := c.ListServersRequest(input) - return out, req.Send() -} - -// ListServersWithContext is the same as ListServers with the addition of -// the ability to pass a context and additional request options. -// -// See ListServers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) ListServersWithContext(ctx aws.Context, input *ListServersInput, opts ...request.Option) (*ListServersOutput, error) { - req, out := c.ListServersRequest(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/transfer-2018-11-05/ListTagsForResource -func (c *Transfer) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for AWS Transfer for SFTP. -// -// Lists all of the tags associated with the Amazon Resource Number (ARN) you -// specify. The resource can be a user, server, or role. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The NextToken parameter that was passed is invalid. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListTagsForResource -func (c *Transfer) 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 *Transfer) 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 opListUsers = "ListUsers" - -// ListUsersRequest generates a "aws/request.Request" representing the -// client's request for the ListUsers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListUsers for more information on using the ListUsers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListUsersRequest method. -// req, resp := client.ListUsersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListUsers -func (c *Transfer) ListUsersRequest(input *ListUsersInput) (req *request.Request, output *ListUsersOutput) { - op := &request.Operation{ - Name: opListUsers, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListUsersInput{} - } - - output = &ListUsersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUsers API operation for AWS Transfer for SFTP. -// -// Lists the users for the server that you specify by passing the ServerId parameter. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation ListUsers for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The NextToken parameter that was passed is invalid. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListUsers -func (c *Transfer) ListUsers(input *ListUsersInput) (*ListUsersOutput, error) { - req, out := c.ListUsersRequest(input) - return out, req.Send() -} - -// ListUsersWithContext is the same as ListUsers with the addition of -// the ability to pass a context and additional request options. -// -// See ListUsers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) ListUsersWithContext(ctx aws.Context, input *ListUsersInput, opts ...request.Option) (*ListUsersOutput, error) { - req, out := c.ListUsersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartServer = "StartServer" - -// StartServerRequest generates a "aws/request.Request" representing the -// client's request for the StartServer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartServer for more information on using the StartServer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartServerRequest method. -// req, resp := client.StartServerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StartServer -func (c *Transfer) StartServerRequest(input *StartServerInput) (req *request.Request, output *StartServerOutput) { - op := &request.Operation{ - Name: opStartServer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartServerInput{} - } - - output = &StartServerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartServer API operation for AWS Transfer for SFTP. -// -// Changes the state of a Secure File Transfer Protocol (SFTP) server from OFFLINE -// to ONLINE. It has no impact on an SFTP server that is already ONLINE. An -// ONLINE server can accept and process file transfer jobs. -// -// The state of STARTING indicates that the server is in an intermediate state, -// either not fully able to respond, or not fully online. The values of START_FAILED -// can indicate an error condition. -// -// No response is returned from this call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation StartServer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StartServer -func (c *Transfer) StartServer(input *StartServerInput) (*StartServerOutput, error) { - req, out := c.StartServerRequest(input) - return out, req.Send() -} - -// StartServerWithContext is the same as StartServer with the addition of -// the ability to pass a context and additional request options. -// -// See StartServer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) StartServerWithContext(ctx aws.Context, input *StartServerInput, opts ...request.Option) (*StartServerOutput, error) { - req, out := c.StartServerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopServer = "StopServer" - -// StopServerRequest generates a "aws/request.Request" representing the -// client's request for the StopServer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopServer for more information on using the StopServer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopServerRequest method. -// req, resp := client.StopServerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StopServer -func (c *Transfer) StopServerRequest(input *StopServerInput) (req *request.Request, output *StopServerOutput) { - op := &request.Operation{ - Name: opStopServer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopServerInput{} - } - - output = &StopServerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StopServer API operation for AWS Transfer for SFTP. -// -// Changes the state of an SFTP server from ONLINE to OFFLINE. An OFFLINE server -// cannot accept and process file transfer jobs. Information tied to your server -// such as server and user properties are not affected by stopping your server. -// Stopping a server will not reduce or impact your Secure File Transfer Protocol -// (SFTP) endpoint billing. -// -// The states of STOPPING indicates that the server is in an intermediate state, -// either not fully able to respond, or not fully offline. The values of STOP_FAILED -// can indicate an error condition. -// -// No response is returned from this call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation StopServer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StopServer -func (c *Transfer) StopServer(input *StopServerInput) (*StopServerOutput, error) { - req, out := c.StopServerRequest(input) - return out, req.Send() -} - -// StopServerWithContext is the same as StopServer with the addition of -// the ability to pass a context and additional request options. -// -// See StopServer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) StopServerWithContext(ctx aws.Context, input *StopServerInput, opts ...request.Option) (*StopServerOutput, error) { - req, out := c.StopServerRequest(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/transfer-2018-11-05/TagResource -func (c *Transfer) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for AWS Transfer for SFTP. -// -// Attaches a key-value pair to a resource, as identified by its Amazon Resource -// Name (ARN). Resources are users, servers, roles, and other entities. -// -// There is no response returned from this call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TagResource -func (c *Transfer) 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 *Transfer) 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 opTestIdentityProvider = "TestIdentityProvider" - -// TestIdentityProviderRequest generates a "aws/request.Request" representing the -// client's request for the TestIdentityProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TestIdentityProvider for more information on using the TestIdentityProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TestIdentityProviderRequest method. -// req, resp := client.TestIdentityProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TestIdentityProvider -func (c *Transfer) TestIdentityProviderRequest(input *TestIdentityProviderInput) (req *request.Request, output *TestIdentityProviderOutput) { - op := &request.Operation{ - Name: opTestIdentityProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TestIdentityProviderInput{} - } - - output = &TestIdentityProviderOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestIdentityProvider API operation for AWS Transfer for SFTP. -// -// If the IdentityProviderType of the server is API_Gateway, tests whether your -// API Gateway is set up successfully. We highly recommend that you call this -// method to test your authentication method as soon as you create your server. -// By doing so, you can troubleshoot issues with the API Gateway integration -// to ensure that your users can successfully use the service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation TestIdentityProvider for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TestIdentityProvider -func (c *Transfer) TestIdentityProvider(input *TestIdentityProviderInput) (*TestIdentityProviderOutput, error) { - req, out := c.TestIdentityProviderRequest(input) - return out, req.Send() -} - -// TestIdentityProviderWithContext is the same as TestIdentityProvider with the addition of -// the ability to pass a context and additional request options. -// -// See TestIdentityProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) TestIdentityProviderWithContext(ctx aws.Context, input *TestIdentityProviderInput, opts ...request.Option) (*TestIdentityProviderOutput, error) { - req, out := c.TestIdentityProviderRequest(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/transfer-2018-11-05/UntagResource -func (c *Transfer) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for AWS Transfer for SFTP. -// -// Detaches a key-value pair from a resource, as identified by its Amazon Resource -// Name (ARN). Resources are users, servers, roles, and other entities. -// -// No response is returned from this call. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UntagResource -func (c *Transfer) 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 *Transfer) 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 opUpdateServer = "UpdateServer" - -// UpdateServerRequest generates a "aws/request.Request" representing the -// client's request for the UpdateServer operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateServer for more information on using the UpdateServer -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateServerRequest method. -// req, resp := client.UpdateServerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateServer -func (c *Transfer) UpdateServerRequest(input *UpdateServerInput) (req *request.Request, output *UpdateServerOutput) { - op := &request.Operation{ - Name: opUpdateServer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateServerInput{} - } - - output = &UpdateServerOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateServer API operation for AWS Transfer for SFTP. -// -// Updates the server properties after that server has been created. -// -// The UpdateServer call returns the ServerId of the Secure File Transfer Protocol -// (SFTP) server you updated. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation UpdateServer for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateServer -func (c *Transfer) UpdateServer(input *UpdateServerInput) (*UpdateServerOutput, error) { - req, out := c.UpdateServerRequest(input) - return out, req.Send() -} - -// UpdateServerWithContext is the same as UpdateServer with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateServer for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) UpdateServerWithContext(ctx aws.Context, input *UpdateServerInput, opts ...request.Option) (*UpdateServerOutput, error) { - req, out := c.UpdateServerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateUser = "UpdateUser" - -// UpdateUserRequest generates a "aws/request.Request" representing the -// client's request for the UpdateUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateUser for more information on using the UpdateUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateUserRequest method. -// req, resp := client.UpdateUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateUser -func (c *Transfer) UpdateUserRequest(input *UpdateUserInput) (req *request.Request, output *UpdateUserOutput) { - op := &request.Operation{ - Name: opUpdateUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateUserInput{} - } - - output = &UpdateUserOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateUser API operation for AWS Transfer for SFTP. -// -// Assigns new properties to a user. Parameters you pass modify any or all of -// the following: the home directory, role, and policy for the UserName and -// ServerId you specify. -// -// The response returns the ServerId and the UserName for the updated user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Transfer for SFTP's -// API operation UpdateUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The request has failed because the AWS Transfer for SFTP service is not available. -// -// * ErrCodeInternalServiceError "InternalServiceError" -// This exception is thrown when an error occurs in the AWS Transfer for SFTP -// service. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// This exception is thrown when the client submits a malformed request. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateUser -func (c *Transfer) UpdateUser(input *UpdateUserInput) (*UpdateUserOutput, error) { - req, out := c.UpdateUserRequest(input) - return out, req.Send() -} - -// UpdateUserWithContext is the same as UpdateUser with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Transfer) UpdateUserWithContext(ctx aws.Context, input *UpdateUserInput, opts ...request.Option) (*UpdateUserOutput, error) { - req, out := c.UpdateUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type CreateServerInput struct { - _ struct{} `type:"structure"` - - // An array containing all of the information required to call a customer-supplied - // authentication API. This parameter is not required when the IdentityProviderType - // value of server that is created uses the SERVICE_MANAGED authentication method. - IdentityProviderDetails *IdentityProviderDetails `type:"structure"` - - // The mode of authentication enabled for this service. The default value is - // SERVICE_MANAGED, which allows you to store and access SFTP user credentials - // within the service. An IdentityProviderType value of API_GATEWAY indicates - // that user authentication requires a call to an API Gateway endpoint URL provided - // by you to integrate an identity provider of your choice. - IdentityProviderType *string `type:"string" enum:"IdentityProviderType"` - - // A value that allows the service to write your SFTP users’ activity to your - // Amazon CloudWatch logs for monitoring and auditing purposes. - LoggingRole *string `type:"string"` - - // Key-value pairs that can be used to group and search for servers. - Tags []*Tag `min:"1" type:"list"` -} - -// String returns the string representation -func (s CreateServerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateServerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateServerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateServerInput"} - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentityProviderDetails sets the IdentityProviderDetails field's value. -func (s *CreateServerInput) SetIdentityProviderDetails(v *IdentityProviderDetails) *CreateServerInput { - s.IdentityProviderDetails = v - return s -} - -// SetIdentityProviderType sets the IdentityProviderType field's value. -func (s *CreateServerInput) SetIdentityProviderType(v string) *CreateServerInput { - s.IdentityProviderType = &v - return s -} - -// SetLoggingRole sets the LoggingRole field's value. -func (s *CreateServerInput) SetLoggingRole(v string) *CreateServerInput { - s.LoggingRole = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateServerInput) SetTags(v []*Tag) *CreateServerInput { - s.Tags = v - return s -} - -type CreateServerOutput struct { - _ struct{} `type:"structure"` - - // The service-assigned ID of the SFTP server that is created. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateServerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateServerOutput) GoString() string { - return s.String() -} - -// SetServerId sets the ServerId field's value. -func (s *CreateServerOutput) SetServerId(v string) *CreateServerOutput { - s.ServerId = &v - return s -} - -type CreateUserInput struct { - _ struct{} `type:"structure"` - - // The landing directory (folder) for a user when they log in to the server - // using their SFTP client. An example is /home/username. - HomeDirectory *string `type:"string"` - - // A scope-down policy for your user so you can use the same IAM role across - // multiple users. This policy scopes down user access to portions of their - // Amazon S3 bucket. Variables you can use inside this policy include ${Transfer:UserName}, - // ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}. - Policy *string `type:"string"` - - // The IAM role that controls your user’s access to your Amazon S3 bucket. The - // policies attached to this role will determine the level of access you want - // to provide your users when transferring files into and out of your Amazon - // S3 bucket or buckets. The IAM role should also contain a trust relationship - // that allows the SFTP server to access your resources when servicing your - // SFTP user’s transfer requests. - // - // Role is a required field - Role *string `type:"string" required:"true"` - - // A system-assigned unique identifier for an SFTP server instance. This is - // the specific SFTP server that you added your user to. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` - - // The public portion of the Secure Shall (SSH) key used to authenticate the - // user to the SFTP server. - SshPublicKeyBody *string `type:"string"` - - // Key-value pairs that can be used to group and search for users. Tags are - // metadata attached to users for any purpose. - Tags []*Tag `min:"1" type:"list"` - - // A unique string that identifies a user and is associated with a server as - // specified by the ServerId. - // - // UserName is a required field - UserName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateUserInput"} - if s.Role == nil { - invalidParams.Add(request.NewErrParamRequired("Role")) - } - if s.ServerId == nil { - invalidParams.Add(request.NewErrParamRequired("ServerId")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHomeDirectory sets the HomeDirectory field's value. -func (s *CreateUserInput) SetHomeDirectory(v string) *CreateUserInput { - s.HomeDirectory = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *CreateUserInput) SetPolicy(v string) *CreateUserInput { - s.Policy = &v - return s -} - -// SetRole sets the Role field's value. -func (s *CreateUserInput) SetRole(v string) *CreateUserInput { - s.Role = &v - return s -} - -// SetServerId sets the ServerId field's value. -func (s *CreateUserInput) SetServerId(v string) *CreateUserInput { - s.ServerId = &v - return s -} - -// SetSshPublicKeyBody sets the SshPublicKeyBody field's value. -func (s *CreateUserInput) SetSshPublicKeyBody(v string) *CreateUserInput { - s.SshPublicKeyBody = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateUserInput) SetTags(v []*Tag) *CreateUserInput { - s.Tags = v - return s -} - -// SetUserName sets the UserName field's value. -func (s *CreateUserInput) SetUserName(v string) *CreateUserInput { - s.UserName = &v - return s -} - -type CreateUserOutput struct { - _ struct{} `type:"structure"` - - // The ID of the SFTP server that the user is attached to. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` - - // A unique string that identifies a user account associated with an SFTP server. - // - // UserName is a required field - UserName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateUserOutput) GoString() string { - return s.String() -} - -// SetServerId sets the ServerId field's value. -func (s *CreateUserOutput) SetServerId(v string) *CreateUserOutput { - s.ServerId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *CreateUserOutput) SetUserName(v string) *CreateUserOutput { - s.UserName = &v - return s -} - -type DeleteServerInput struct { - _ struct{} `type:"structure"` - - // A unique system-assigned identifier for an SFTP server instance. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteServerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteServerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteServerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteServerInput"} - if s.ServerId == nil { - invalidParams.Add(request.NewErrParamRequired("ServerId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerId sets the ServerId field's value. -func (s *DeleteServerInput) SetServerId(v string) *DeleteServerInput { - s.ServerId = &v - return s -} - -type DeleteServerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteServerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteServerOutput) GoString() string { - return s.String() -} - -type DeleteSshPublicKeyInput struct { - _ struct{} `type:"structure"` - - // A system-assigned unique identifier for a Secure File Transfer Protocol (SFTP) - // server instance that has the user assigned to it. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` - - // A unique identifier used to reference your user’s specific SSH key. - // - // SshPublicKeyId is a required field - SshPublicKeyId *string `type:"string" required:"true"` - - // A unique string that identifies a user whose public key is being deleted. - // - // UserName is a required field - UserName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSshPublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSshPublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSshPublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSshPublicKeyInput"} - if s.ServerId == nil { - invalidParams.Add(request.NewErrParamRequired("ServerId")) - } - if s.SshPublicKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("SshPublicKeyId")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerId sets the ServerId field's value. -func (s *DeleteSshPublicKeyInput) SetServerId(v string) *DeleteSshPublicKeyInput { - s.ServerId = &v - return s -} - -// SetSshPublicKeyId sets the SshPublicKeyId field's value. -func (s *DeleteSshPublicKeyInput) SetSshPublicKeyId(v string) *DeleteSshPublicKeyInput { - s.SshPublicKeyId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DeleteSshPublicKeyInput) SetUserName(v string) *DeleteSshPublicKeyInput { - s.UserName = &v - return s -} - -type DeleteSshPublicKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteSshPublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSshPublicKeyOutput) GoString() string { - return s.String() -} - -type DeleteUserInput struct { - _ struct{} `type:"structure"` - - // A system-assigned unique identifier for an SFTP server instance that has - // the user assigned to it. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` - - // A unique string that identifies a user that is being deleted from the server. - // - // UserName is a required field - UserName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserInput"} - if s.ServerId == nil { - invalidParams.Add(request.NewErrParamRequired("ServerId")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerId sets the ServerId field's value. -func (s *DeleteUserInput) SetServerId(v string) *DeleteUserInput { - s.ServerId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DeleteUserInput) SetUserName(v string) *DeleteUserInput { - s.UserName = &v - return s -} - -type DeleteUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteUserOutput) GoString() string { - return s.String() -} - -type DescribeServerInput struct { - _ struct{} `type:"structure"` - - // A system-assigned unique identifier for an SFTP server. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeServerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeServerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeServerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeServerInput"} - if s.ServerId == nil { - invalidParams.Add(request.NewErrParamRequired("ServerId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerId sets the ServerId field's value. -func (s *DescribeServerInput) SetServerId(v string) *DescribeServerInput { - s.ServerId = &v - return s -} - -type DescribeServerOutput struct { - _ struct{} `type:"structure"` - - // An array containing the properties of the server with the ServerID you specified. - // - // Server is a required field - Server *DescribedServer `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeServerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeServerOutput) GoString() string { - return s.String() -} - -// SetServer sets the Server field's value. -func (s *DescribeServerOutput) SetServer(v *DescribedServer) *DescribeServerOutput { - s.Server = v - return s -} - -type DescribeUserInput struct { - _ struct{} `type:"structure"` - - // A system-assigned unique identifier for an SFTP server that has this user - // assigned. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` - - // The name of the user assigned to one or more servers. User names are part - // of the sign-in credentials to use the AWS Transfer service and perform file - // transfer tasks. - // - // UserName is a required field - UserName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeUserInput"} - if s.ServerId == nil { - invalidParams.Add(request.NewErrParamRequired("ServerId")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerId sets the ServerId field's value. -func (s *DescribeUserInput) SetServerId(v string) *DescribeUserInput { - s.ServerId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DescribeUserInput) SetUserName(v string) *DescribeUserInput { - s.UserName = &v - return s -} - -type DescribeUserOutput struct { - _ struct{} `type:"structure"` - - // A system-assigned unique identifier for an SFTP server that has this user - // assigned. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` - - // An array containing the properties of the user account for the ServerID value - // that you specified. - // - // User is a required field - User *DescribedUser `type:"structure" required:"true"` -} - -// String returns the string representation -func (s DescribeUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeUserOutput) GoString() string { - return s.String() -} - -// SetServerId sets the ServerId field's value. -func (s *DescribeUserOutput) SetServerId(v string) *DescribeUserOutput { - s.ServerId = &v - return s -} - -// SetUser sets the User field's value. -func (s *DescribeUserOutput) SetUser(v *DescribedUser) *DescribeUserOutput { - s.User = v - return s -} - -// Describe the properties of the server that was specified. Information returned -// includes: the server Amazon Resource Name (ARN), the authentication configuration -// and type, the logging role, server Id and state, and assigned tags or metadata. -type DescribedServer struct { - _ struct{} `type:"structure"` - - // Specifies the unique Amazon Resource Name (ARN) for the server to be described. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // Specifies information to call a customer-supplied authentication API. This - // field is not populated when the IdentityProviderType of the server is SERVICE_MANAGED>. - IdentityProviderDetails *IdentityProviderDetails `type:"structure"` - - // This property defines the mode of authentication method enabled for this - // service. A value of SERVICE_MANAGED, means that you are using this Server - // to store and access SFTP user credentials within the service. A value of - // API_GATEWAY indicates that you have integrated an API Gateway endpoint that - // will be invoked for authenticating your user into the service. - IdentityProviderType *string `type:"string" enum:"IdentityProviderType"` - - // This property is an AWS Identity and Access Management (IAM) entity that - // allows the server to turn on Amazon CloudWatch logging for Amazon S3 events. - // When set, user activity can be view in your CloudWatch logs. - LoggingRole *string `type:"string"` - - // This property is a unique system assigned identifier for the SFTP server - // that you instantiate. - ServerId *string `type:"string"` - - // The condition of the SFTP server for the server that was described. A value - // of ONLINE indicates that the server can accept jobs and transfer files. A - // State value of OFFLINE means that the server cannot perform file transfer - // operations. - // - // The states of STARTING and STOPPING indicated that the server is in an intermediate - // state, either not fully able to respond, or not fully offline. The values - // of START_FAILED or STOP_FAILED can indicate an error condition. - State *string `type:"string" enum:"State"` - - // This property contains the key-value pairs that you can use to search for - // and group servers that were assigned to the server that was described. - Tags []*Tag `min:"1" type:"list"` - - // The number of users that are assigned to the SFTP server you specified with - // the ServerId. - UserCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s DescribedServer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribedServer) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DescribedServer) SetArn(v string) *DescribedServer { - s.Arn = &v - return s -} - -// SetIdentityProviderDetails sets the IdentityProviderDetails field's value. -func (s *DescribedServer) SetIdentityProviderDetails(v *IdentityProviderDetails) *DescribedServer { - s.IdentityProviderDetails = v - return s -} - -// SetIdentityProviderType sets the IdentityProviderType field's value. -func (s *DescribedServer) SetIdentityProviderType(v string) *DescribedServer { - s.IdentityProviderType = &v - return s -} - -// SetLoggingRole sets the LoggingRole field's value. -func (s *DescribedServer) SetLoggingRole(v string) *DescribedServer { - s.LoggingRole = &v - return s -} - -// SetServerId sets the ServerId field's value. -func (s *DescribedServer) SetServerId(v string) *DescribedServer { - s.ServerId = &v - return s -} - -// SetState sets the State field's value. -func (s *DescribedServer) SetState(v string) *DescribedServer { - s.State = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *DescribedServer) SetTags(v []*Tag) *DescribedServer { - s.Tags = v - return s -} - -// SetUserCount sets the UserCount field's value. -func (s *DescribedServer) SetUserCount(v int64) *DescribedServer { - s.UserCount = &v - return s -} - -// Returns properties of the user that you wish to describe. -type DescribedUser struct { - _ struct{} `type:"structure"` - - // This property contains the unique Amazon Resource Name (ARN) for the user - // that was requested to be described. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // This property specifies the landing directory (or folder) which is the location - // that files are written to or read from in an Amazon S3 bucket for the described - // user. An example would be: /bucket_name/home/username. - HomeDirectory *string `type:"string"` - - // Specifies the name of the policy in use for the described user. - Policy *string `type:"string"` - - // This property specifies the IAM role that controls your user’s access to - // your Amazon S3 bucket. The policies attached to this role will determine - // the level of access you want to provide your users when transferring files - // into and out of your Amazon S3 bucket or buckets. The IAM role should also - // contain a trust relationship that allows the SFTP server to access your resources - // when servicing your SFTP user’s transfer requests. - Role *string `type:"string"` - - // This property contains the public key portion of the Secure Shell (SSH) keys - // stored for the described user. - SshPublicKeys []*SshPublicKey `type:"list"` - - // This property contains the key-value pairs for the user requested. Tag can - // be used to search for and group users for a variety of purposes. - Tags []*Tag `min:"1" type:"list"` - - // This property is the name of the user that was requested to be described. - // User names are used for authentication purposes. This is the string that - // will be used by your user when they log in to your SFTP server. - UserName *string `type:"string"` -} - -// String returns the string representation -func (s DescribedUser) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribedUser) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *DescribedUser) SetArn(v string) *DescribedUser { - s.Arn = &v - return s -} - -// SetHomeDirectory sets the HomeDirectory field's value. -func (s *DescribedUser) SetHomeDirectory(v string) *DescribedUser { - s.HomeDirectory = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *DescribedUser) SetPolicy(v string) *DescribedUser { - s.Policy = &v - return s -} - -// SetRole sets the Role field's value. -func (s *DescribedUser) SetRole(v string) *DescribedUser { - s.Role = &v - return s -} - -// SetSshPublicKeys sets the SshPublicKeys field's value. -func (s *DescribedUser) SetSshPublicKeys(v []*SshPublicKey) *DescribedUser { - s.SshPublicKeys = v - return s -} - -// SetTags sets the Tags field's value. -func (s *DescribedUser) SetTags(v []*Tag) *DescribedUser { - s.Tags = v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DescribedUser) SetUserName(v string) *DescribedUser { - s.UserName = &v - return s -} - -// Returns information related to the type of user authentication that is in -// use for a server's users. A server can only have one method of authentication. -type IdentityProviderDetails struct { - _ struct{} `type:"structure"` - - // The Role parameter provides the type of InvocationRole used to authenticate - // the user account. - InvocationRole *string `type:"string"` - - // The IdentityProviderDetail parameter contains the location of the service - // endpoint used to authenticate users. - Url *string `type:"string"` -} - -// String returns the string representation -func (s IdentityProviderDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IdentityProviderDetails) GoString() string { - return s.String() -} - -// SetInvocationRole sets the InvocationRole field's value. -func (s *IdentityProviderDetails) SetInvocationRole(v string) *IdentityProviderDetails { - s.InvocationRole = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *IdentityProviderDetails) SetUrl(v string) *IdentityProviderDetails { - s.Url = &v - return s -} - -type ImportSshPublicKeyInput struct { - _ struct{} `type:"structure"` - - // A system-assigned unique identifier for an SFTP server. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` - - // The public key portion of an SSH key pair. - // - // SshPublicKeyBody is a required field - SshPublicKeyBody *string `type:"string" required:"true"` - - // The name of the user account that is assigned to one or more servers. - // - // UserName is a required field - UserName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ImportSshPublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportSshPublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportSshPublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportSshPublicKeyInput"} - if s.ServerId == nil { - invalidParams.Add(request.NewErrParamRequired("ServerId")) - } - if s.SshPublicKeyBody == nil { - invalidParams.Add(request.NewErrParamRequired("SshPublicKeyBody")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerId sets the ServerId field's value. -func (s *ImportSshPublicKeyInput) SetServerId(v string) *ImportSshPublicKeyInput { - s.ServerId = &v - return s -} - -// SetSshPublicKeyBody sets the SshPublicKeyBody field's value. -func (s *ImportSshPublicKeyInput) SetSshPublicKeyBody(v string) *ImportSshPublicKeyInput { - s.SshPublicKeyBody = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ImportSshPublicKeyInput) SetUserName(v string) *ImportSshPublicKeyInput { - s.UserName = &v - return s -} - -// This response identifies the user, server they belong to, and the identifier -// of the SSH public key associated with that user. A user can have more than -// one key on each server that they are associate with. -type ImportSshPublicKeyOutput struct { - _ struct{} `type:"structure"` - - // A system-assigned unique identifier for an SFTP server. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` - - // This identifier is the name given to a public key by the system that was - // imported. - // - // SshPublicKeyId is a required field - SshPublicKeyId *string `type:"string" required:"true"` - - // A user name assigned to the ServerID value that you specified. - // - // UserName is a required field - UserName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ImportSshPublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportSshPublicKeyOutput) GoString() string { - return s.String() -} - -// SetServerId sets the ServerId field's value. -func (s *ImportSshPublicKeyOutput) SetServerId(v string) *ImportSshPublicKeyOutput { - s.ServerId = &v - return s -} - -// SetSshPublicKeyId sets the SshPublicKeyId field's value. -func (s *ImportSshPublicKeyOutput) SetSshPublicKeyId(v string) *ImportSshPublicKeyOutput { - s.SshPublicKeyId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ImportSshPublicKeyOutput) SetUserName(v string) *ImportSshPublicKeyOutput { - s.UserName = &v - return s -} - -type ListServersInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of servers to return as a response to the ListServers - // query. - MaxResults *int64 `min:"1" type:"integer"` - - // When additional results are obtained from the ListServers command, a NextToken - // parameter is returned in the output. You can then pass the NextToken parameter - // in a subsequent command to continue listing additional servers. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListServersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListServersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListServersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListServersInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListServersInput) SetMaxResults(v int64) *ListServersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListServersInput) SetNextToken(v string) *ListServersInput { - s.NextToken = &v - return s -} - -type ListServersOutput struct { - _ struct{} `type:"structure"` - - // When you can get additional results from the ListServers operation, a NextToken - // parameter is returned in the output. In a following command, you can pass - // in the NextToken parameter to continue listing additional servers. - NextToken *string `min:"1" type:"string"` - - // An array of servers that were listed. - // - // Servers is a required field - Servers []*ListedServer `type:"list" required:"true"` -} - -// String returns the string representation -func (s ListServersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListServersOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListServersOutput) SetNextToken(v string) *ListServersOutput { - s.NextToken = &v - return s -} - -// SetServers sets the Servers field's value. -func (s *ListServersOutput) SetServers(v []*ListedServer) *ListServersOutput { - s.Servers = v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure"` - - // Requests the tags associated with a particular Amazon Resource Name (ARN). - // An ARN is an identifier for a specific AWS resource, such as a server, user, - // or role. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - MaxResults *int64 `min:"1" type:"integer"` - - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListTagsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListTagsForResourceInput) SetArn(v string) *ListTagsForResourceInput { - s.Arn = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { - s.NextToken = &v - return s -} - -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // This value is the ARN you specified to list the tags of. - Arn *string `min:"20" type:"string"` - - NextToken *string `min:"1" type:"string"` - - // Key-value pairs that are assigned to a resource, usually for the purpose - // of grouping and searching for items. Tags are metadata that you define that - // you can use for any purpose. - Tags []*Tag `min:"1" type:"list"` -} - -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ListTagsForResourceOutput) SetArn(v string) *ListTagsForResourceOutput { - s.Arn = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { - s.NextToken = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -type ListUsersInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of users to return as a response to the ListUsers request. - MaxResults *int64 `min:"1" type:"integer"` - - // When you can get additional results from the ListUsersListUsers call, a NextToken - // parameter is returned in the output. You can then pass in a subsequent command - // the NextToken parameter to continue listing additional users. - NextToken *string `min:"1" type:"string"` - - // A system-assigned unique identifier for a Secure File Transfer Protocol (SFTP) - // server that has users are assigned to it. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s ListUsersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUsersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUsersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUsersInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.ServerId == nil { - invalidParams.Add(request.NewErrParamRequired("ServerId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListUsersInput) SetMaxResults(v int64) *ListUsersInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUsersInput) SetNextToken(v string) *ListUsersInput { - s.NextToken = &v - return s -} - -// SetServerId sets the ServerId field's value. -func (s *ListUsersInput) SetServerId(v string) *ListUsersInput { - s.ServerId = &v - return s -} - -type ListUsersOutput struct { - _ struct{} `type:"structure"` - - // When you can get additional results from the ListUsers call, a NextToken - // parameter is returned in the output. You can then pass in a subsequent command - // the NextToken parameter to continue listing additional users. - NextToken *string `min:"1" type:"string"` - - // A system-assigned unique identifier for an SFTP server that the users are - // assigned to. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` - - // Returns the user accounts and their properties for the ServerId value that - // you specify. - // - // Users is a required field - Users []*ListedUser `type:"list" required:"true"` -} - -// String returns the string representation -func (s ListUsersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListUsersOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListUsersOutput) SetNextToken(v string) *ListUsersOutput { - s.NextToken = &v - return s -} - -// SetServerId sets the ServerId field's value. -func (s *ListUsersOutput) SetServerId(v string) *ListUsersOutput { - s.ServerId = &v - return s -} - -// SetUsers sets the Users field's value. -func (s *ListUsersOutput) SetUsers(v []*ListedUser) *ListUsersOutput { - s.Users = v - return s -} - -// Returns properties of the server that was specified. -type ListedServer struct { - _ struct{} `type:"structure"` - - // The unique Amazon Resource Name (ARN) for the server to be listed. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The authentication method used to validate a user for the server that was - // specified. listed. This can include Secure Shell (SSH), user name and password - // combinations, or your own custom authentication method. Valid values include - // SERVICE_MANAGED or API_GATEWAY. - IdentityProviderType *string `type:"string" enum:"IdentityProviderType"` - - // The AWS Identity and Access Management entity that allows the server to turn - // on Amazon CloudWatch logging. - LoggingRole *string `type:"string"` - - // This value is the unique system assigned identifier for the SFTP servers - // that were listed. - ServerId *string `type:"string"` - - // This property describes the condition of the SFTP server for the server that - // was described. A value of ONLINE> indicates that the server can accept jobs - // and transfer files. A State value of OFFLINE means that the server cannot - // perform file transfer operations. - // - // The states of STARTING and STOPPING indicated that the server is in an intermediate - // state, either not fully able to respond, or not fully offline. The values - // of START_FAILED or STOP_FAILED can indicate an error condition. - State *string `type:"string" enum:"State"` - - // This property is a numeric value that indicates the number of users that - // are assigned to the SFTP server you specified with the ServerId. - UserCount *int64 `type:"integer"` -} - -// String returns the string representation -func (s ListedServer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListedServer) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ListedServer) SetArn(v string) *ListedServer { - s.Arn = &v - return s -} - -// SetIdentityProviderType sets the IdentityProviderType field's value. -func (s *ListedServer) SetIdentityProviderType(v string) *ListedServer { - s.IdentityProviderType = &v - return s -} - -// SetLoggingRole sets the LoggingRole field's value. -func (s *ListedServer) SetLoggingRole(v string) *ListedServer { - s.LoggingRole = &v - return s -} - -// SetServerId sets the ServerId field's value. -func (s *ListedServer) SetServerId(v string) *ListedServer { - s.ServerId = &v - return s -} - -// SetState sets the State field's value. -func (s *ListedServer) SetState(v string) *ListedServer { - s.State = &v - return s -} - -// SetUserCount sets the UserCount field's value. -func (s *ListedServer) SetUserCount(v int64) *ListedServer { - s.UserCount = &v - return s -} - -// Returns properties of the user that you specify. -type ListedUser struct { - _ struct{} `type:"structure"` - - // This property is the unique Amazon Resource Name (ARN) for the user that - // you wish to learn about. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // This value specifies the location that files are written to or read from - // an Amazon S3 bucket for the user you specify by their ARN. - HomeDirectory *string `type:"string"` - - // The role in use by this user. A role is an AWS Identity and Access Management - // (IAM) entity that in this case allows the SFTP server to act on a user's - // behalf. It allows the server to inherit the trust relationship that enables - // that user to perform file operations to their Amazon S3 bucket. - Role *string `type:"string"` - - // This value is the number of SSH public keys stored for the user you specified. - SshPublicKeyCount *int64 `type:"integer"` - - // The name of the user whose ARN was specified. User names are used for authentication - // purposes. - UserName *string `type:"string"` -} - -// String returns the string representation -func (s ListedUser) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListedUser) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ListedUser) SetArn(v string) *ListedUser { - s.Arn = &v - return s -} - -// SetHomeDirectory sets the HomeDirectory field's value. -func (s *ListedUser) SetHomeDirectory(v string) *ListedUser { - s.HomeDirectory = &v - return s -} - -// SetRole sets the Role field's value. -func (s *ListedUser) SetRole(v string) *ListedUser { - s.Role = &v - return s -} - -// SetSshPublicKeyCount sets the SshPublicKeyCount field's value. -func (s *ListedUser) SetSshPublicKeyCount(v int64) *ListedUser { - s.SshPublicKeyCount = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListedUser) SetUserName(v string) *ListedUser { - s.UserName = &v - return s -} - -// Provides information about the public Secure Shell (SSH) key that is associated -// with a user account for a specific server (as identified by ServerId). The -// information returned includes the date the key was imported, the public key -// contents, and the public key ID. A user can store more than one SSH public -// key associated with their user name on a specific SFTP server. -type SshPublicKey struct { - _ struct{} `type:"structure"` - - // The date that the public key was added to the user account. - // - // DateImported is a required field - DateImported *time.Time `type:"timestamp" required:"true"` - - // The content of the SSH public key as specified by the PublicKeyId. - // - // SshPublicKeyBody is a required field - SshPublicKeyBody *string `type:"string" required:"true"` - - // The SshPublicKeyId parameter contains the identifier of the public key. - // - // SshPublicKeyId is a required field - SshPublicKeyId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s SshPublicKey) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SshPublicKey) GoString() string { - return s.String() -} - -// SetDateImported sets the DateImported field's value. -func (s *SshPublicKey) SetDateImported(v time.Time) *SshPublicKey { - s.DateImported = &v - return s -} - -// SetSshPublicKeyBody sets the SshPublicKeyBody field's value. -func (s *SshPublicKey) SetSshPublicKeyBody(v string) *SshPublicKey { - s.SshPublicKeyBody = &v - return s -} - -// SetSshPublicKeyId sets the SshPublicKeyId field's value. -func (s *SshPublicKey) SetSshPublicKeyId(v string) *SshPublicKey { - s.SshPublicKeyId = &v - return s -} - -type StartServerInput struct { - _ struct{} `type:"structure"` - - // A system-assigned unique identifier for an SFTP server that you start. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StartServerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartServerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartServerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartServerInput"} - if s.ServerId == nil { - invalidParams.Add(request.NewErrParamRequired("ServerId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerId sets the ServerId field's value. -func (s *StartServerInput) SetServerId(v string) *StartServerInput { - s.ServerId = &v - return s -} - -type StartServerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StartServerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartServerOutput) GoString() string { - return s.String() -} - -type StopServerInput struct { - _ struct{} `type:"structure"` - - // A system-assigned unique identifier for an SFTP server that you stopped. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s StopServerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopServerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopServerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopServerInput"} - if s.ServerId == nil { - invalidParams.Add(request.NewErrParamRequired("ServerId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerId sets the ServerId field's value. -func (s *StopServerInput) SetServerId(v string) *StopServerInput { - s.ServerId = &v - return s -} - -type StopServerOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s StopServerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopServerOutput) GoString() string { - return s.String() -} - -// Creates a key-value pair for a specific resource. Tags are metadata that -// you can use to search for and group a resource for various purposes. You -// can apply tags to servers, users, and roles. A tag key can take more than -// one value. For example, to group servers for accounting purposes, you might -// create a tag called Group and assign the values Research and Accounting to -// that group. -type Tag struct { - _ struct{} `type:"structure"` - - // The name assigned to the tag that you create. - // - // Key is a required field - Key *string `type:"string" required:"true"` - - // This property contains one or more values that you assigned to the key name - // you create. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // An Amazon Resource Name (ARN) for a specific AWS resource, such as a server, - // user, or role. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // Key-value pairs assigned to ARNs that you can use to group and search for - // resources by type. You can attach this metadata to user accounts for any - // purpose. - // - // Tags is a required field - Tags []*Tag `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *TagResourceInput) SetArn(v string) *TagResourceInput { - s.Arn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -type TestIdentityProviderInput struct { - _ struct{} `type:"structure"` - - // A system assigned identifier for a specific server. That server's user authentication - // method is tested with a user name and password. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` - - // This request parameter is name of the user account to be tested. - // - // UserName is a required field - UserName *string `type:"string" required:"true"` - - // The password of the user account to be tested. - UserPassword *string `type:"string"` -} - -// String returns the string representation -func (s TestIdentityProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestIdentityProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TestIdentityProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TestIdentityProviderInput"} - if s.ServerId == nil { - invalidParams.Add(request.NewErrParamRequired("ServerId")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerId sets the ServerId field's value. -func (s *TestIdentityProviderInput) SetServerId(v string) *TestIdentityProviderInput { - s.ServerId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *TestIdentityProviderInput) SetUserName(v string) *TestIdentityProviderInput { - s.UserName = &v - return s -} - -// SetUserPassword sets the UserPassword field's value. -func (s *TestIdentityProviderInput) SetUserPassword(v string) *TestIdentityProviderInput { - s.UserPassword = &v - return s -} - -type TestIdentityProviderOutput struct { - _ struct{} `type:"structure"` - - // The result of the authorization test as a message. - Message *string `type:"string"` - - // The HTTP status code that is the response from your API Gateway. - // - // StatusCode is a required field - StatusCode *int64 `type:"integer" required:"true"` - - // The endpoint of the service used to authenticate a user. - // - // Url is a required field - Url *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s TestIdentityProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TestIdentityProviderOutput) GoString() string { - return s.String() -} - -// SetMessage sets the Message field's value. -func (s *TestIdentityProviderOutput) SetMessage(v string) *TestIdentityProviderOutput { - s.Message = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *TestIdentityProviderOutput) SetStatusCode(v int64) *TestIdentityProviderOutput { - s.StatusCode = &v - return s -} - -// SetUrl sets the Url field's value. -func (s *TestIdentityProviderOutput) SetUrl(v string) *TestIdentityProviderOutput { - s.Url = &v - return s -} - -type UntagResourceInput struct { - _ struct{} `type:"structure"` - - // This is the value of the resource that will have the tag removed. An Amazon - // Resource Name (ARN) is an identifier for a specific AWS resource, such as - // a server, user, or role. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // TagKeys are key-value pairs assigned to ARNs that can be used to group and - // search for resources by type. This metadata can be attached to resources - // for any purpose. - // - // TagKeys is a required field - TagKeys []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s UntagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - if s.TagKeys != nil && len(s.TagKeys) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *UntagResourceInput) SetArn(v string) *UntagResourceInput { - s.Arn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UpdateServerInput struct { - _ struct{} `type:"structure"` - - // This response parameter is an array containing all of the information required - // to call a customer's authentication API method. - IdentityProviderDetails *IdentityProviderDetails `type:"structure"` - - // Changes the AWS Identity and Access Management (IAM) role that allows Amazon - // S3 events to be logged in Amazon CloudWatch, turning logging on or off. - LoggingRole *string `type:"string"` - - // A system-assigned unique identifier for an SFTP server instance that the - // user account is assigned to. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateServerInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateServerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateServerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateServerInput"} - if s.ServerId == nil { - invalidParams.Add(request.NewErrParamRequired("ServerId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdentityProviderDetails sets the IdentityProviderDetails field's value. -func (s *UpdateServerInput) SetIdentityProviderDetails(v *IdentityProviderDetails) *UpdateServerInput { - s.IdentityProviderDetails = v - return s -} - -// SetLoggingRole sets the LoggingRole field's value. -func (s *UpdateServerInput) SetLoggingRole(v string) *UpdateServerInput { - s.LoggingRole = &v - return s -} - -// SetServerId sets the ServerId field's value. -func (s *UpdateServerInput) SetServerId(v string) *UpdateServerInput { - s.ServerId = &v - return s -} - -type UpdateServerOutput struct { - _ struct{} `type:"structure"` - - // A system-assigned unique identifier for an SFTP server that the user account - // is assigned to. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateServerOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateServerOutput) GoString() string { - return s.String() -} - -// SetServerId sets the ServerId field's value. -func (s *UpdateServerOutput) SetServerId(v string) *UpdateServerOutput { - s.ServerId = &v - return s -} - -type UpdateUserInput struct { - _ struct{} `type:"structure"` - - // The HomeDirectory parameter specifies the landing directory (folder) for - // a user when they log in to the server using their client. An example would - // be: /home/username. - HomeDirectory *string `type:"string"` - - // Allows you to supply a scope-down policy for your user so you can use the - // same AWS Identity and Access Management (IAM) role across multiple users. - // The policy scopes down users access to portions of your Amazon S3 bucket. - // Variables you can use inside this policy include ${Transfer:UserName}, ${Transfer:HomeDirectory}, - // and ${Transfer:HomeBucket}. - Policy *string `type:"string"` - - // The IAM role that controls your user’s access to your Amazon S3 bucket. The - // policies attached to this role will determine the level of access you want - // to provide your users when transferring files into and out of your Amazon - // S3 bucket or buckets. The IAM role should also contain a trust relationship - // that allows the Secure File Transfer Protocol (SFTP) server to access your - // resources when servicing your SFTP user’s transfer requests. - Role *string `type:"string"` - - // A system-assigned unique identifier for an SFTP server instance that the - // user account is assigned to. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` - - // A unique string that identifies a user and is associated with a server as - // specified by the ServerId. This is the string that will be used by your user - // when they log in to your SFTP server. - // - // UserName is a required field - UserName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateUserInput"} - if s.ServerId == nil { - invalidParams.Add(request.NewErrParamRequired("ServerId")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHomeDirectory sets the HomeDirectory field's value. -func (s *UpdateUserInput) SetHomeDirectory(v string) *UpdateUserInput { - s.HomeDirectory = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *UpdateUserInput) SetPolicy(v string) *UpdateUserInput { - s.Policy = &v - return s -} - -// SetRole sets the Role field's value. -func (s *UpdateUserInput) SetRole(v string) *UpdateUserInput { - s.Role = &v - return s -} - -// SetServerId sets the ServerId field's value. -func (s *UpdateUserInput) SetServerId(v string) *UpdateUserInput { - s.ServerId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UpdateUserInput) SetUserName(v string) *UpdateUserInput { - s.UserName = &v - return s -} - -// UpdateUserResponse returns the user name and server identifier for the request -// to update a user's properties. -type UpdateUserOutput struct { - _ struct{} `type:"structure"` - - // A system-assigned unique identifier for an SFTP server instance that the - // user account is assigned to. - // - // ServerId is a required field - ServerId *string `type:"string" required:"true"` - - // The unique identifier for a user that is assigned to the SFTP server instance - // that was specified in the request. - // - // UserName is a required field - UserName *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateUserOutput) GoString() string { - return s.String() -} - -// SetServerId sets the ServerId field's value. -func (s *UpdateUserOutput) SetServerId(v string) *UpdateUserOutput { - s.ServerId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UpdateUserOutput) SetUserName(v string) *UpdateUserOutput { - s.UserName = &v - return s -} - -// Returns information related to the type of user authentication that is in -// use for a server's users. For SERVICE_MANAGED authentication, the Secure -// Shell (SSH) public keys are stored with a user on an SFTP server instance. -// For API_GATEWAY authentication, your custom authentication method is implemented -// by using an API call. A server can only have one method of authentication. -const ( - // IdentityProviderTypeServiceManaged is a IdentityProviderType enum value - IdentityProviderTypeServiceManaged = "SERVICE_MANAGED" - - // IdentityProviderTypeApiGateway is a IdentityProviderType enum value - IdentityProviderTypeApiGateway = "API_GATEWAY" -) - -// Describes the condition of the SFTP server with respect to its ability to -// perform file operations. There are six possible states: OFFLINE, ONLINE, -// STARTING, STOPPING, START_FAILED, and STOP_FAILED. -// -// OFFLINE indicates that the SFTP server exists, but that it is not available -// for file operations. ONLINE indicates that the SFTP server is available to -// perform file operations. STARTING indicates that the SFTP server's was instantiated, -// but the server is not yet available to perform file operations. Under normal -// conditions, it can take a couple of minutes for an SFTP server to be completely -// operational. Both START_FAILED and STOP_FAILED are error conditions. -const ( - // StateOffline is a State enum value - StateOffline = "OFFLINE" - - // StateOnline is a State enum value - StateOnline = "ONLINE" - - // StateStarting is a State enum value - StateStarting = "STARTING" - - // StateStopping is a State enum value - StateStopping = "STOPPING" - - // StateStartFailed is a State enum value - StateStartFailed = "START_FAILED" - - // StateStopFailed is a State enum value - StateStopFailed = "STOP_FAILED" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/transfer/doc.go b/vendor/github.com/aws/aws-sdk-go/service/transfer/doc.go deleted file mode 100644 index 8bdc2fd1c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/transfer/doc.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package transfer provides the client and types for making API -// requests to AWS Transfer for SFTP. -// -// See https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05 for more information on this service. -// -// See transfer package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/transfer/ -// -// Using the Client -// -// To contact AWS Transfer for SFTP 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 Transfer for SFTP client Transfer for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/transfer/#New -package transfer diff --git a/vendor/github.com/aws/aws-sdk-go/service/transfer/errors.go b/vendor/github.com/aws/aws-sdk-go/service/transfer/errors.go deleted file mode 100644 index 0734c873b..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/transfer/errors.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package transfer - -const ( - - // ErrCodeInternalServiceError for service response error code - // "InternalServiceError". - // - // This exception is thrown when an error occurs in the AWS Transfer for SFTP - // service. - ErrCodeInternalServiceError = "InternalServiceError" - - // ErrCodeInvalidNextTokenException for service response error code - // "InvalidNextTokenException". - // - // The NextToken parameter that was passed is invalid. - ErrCodeInvalidNextTokenException = "InvalidNextTokenException" - - // ErrCodeInvalidRequestException for service response error code - // "InvalidRequestException". - // - // This exception is thrown when the client submits a malformed request. - ErrCodeInvalidRequestException = "InvalidRequestException" - - // ErrCodeResourceExistsException for service response error code - // "ResourceExistsException". - // - // The requested resource does not exist. - ErrCodeResourceExistsException = "ResourceExistsException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // This exception is thrown when a resource is not found by the AWS Transfer - // for SFTP service. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeServiceUnavailableException for service response error code - // "ServiceUnavailableException". - // - // The request has failed because the AWS Transfer for SFTP service is not available. - ErrCodeServiceUnavailableException = "ServiceUnavailableException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/transfer/service.go b/vendor/github.com/aws/aws-sdk-go/service/transfer/service.go deleted file mode 100644 index 0fcea8665..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/transfer/service.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package transfer - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// Transfer provides the API operation methods for making requests to -// AWS Transfer for SFTP. See this package's package overview docs -// for details on the service. -// -// Transfer methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Transfer 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 = "Transfer" // Name of service. - EndpointsID = "transfer" // ID to lookup a service endpoint with. - ServiceID = "Transfer" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the Transfer 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 Transfer client from just a session. -// svc := transfer.New(mySession) -// -// // Create a Transfer client with additional configuration -// svc := transfer.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Transfer { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "transfer" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Transfer { - svc := &Transfer{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-11-05", - JSONVersion: "1.1", - TargetPrefix: "TransferService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Transfer operation and runs any -// custom request initialization. -func (c *Transfer) 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/waf/api.go b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go deleted file mode 100644 index 1c62375bb..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go +++ /dev/null @@ -1,20353 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package waf - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opCreateByteMatchSet = "CreateByteMatchSet" - -// CreateByteMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateByteMatchSet for more information on using the CreateByteMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateByteMatchSetRequest method. -// req, resp := client.CreateByteMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateByteMatchSet -func (c *WAF) CreateByteMatchSetRequest(input *CreateByteMatchSetInput) (req *request.Request, output *CreateByteMatchSetOutput) { - op := &request.Operation{ - Name: opCreateByteMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateByteMatchSetInput{} - } - - output = &CreateByteMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateByteMatchSet API operation for AWS WAF. -// -// Creates a ByteMatchSet. You then use UpdateByteMatchSet to identify the part -// of a web request that you want AWS WAF to inspect, such as the values of -// the User-Agent header or the query string. For example, you can create a -// ByteMatchSet that matches any requests with User-Agent headers that contain -// the string BadBot. You can then configure AWS WAF to reject those requests. -// -// To create and configure a ByteMatchSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateByteMatchSet request. -// -// Submit a CreateByteMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateByteMatchSet request. -// -// Submit an UpdateByteMatchSet request to specify the part of the request that -// you want AWS WAF to inspect (for example, the header or the URI) and the -// value that you want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation CreateByteMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateByteMatchSet -func (c *WAF) CreateByteMatchSet(input *CreateByteMatchSetInput) (*CreateByteMatchSetOutput, error) { - req, out := c.CreateByteMatchSetRequest(input) - return out, req.Send() -} - -// CreateByteMatchSetWithContext is the same as CreateByteMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateByteMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) CreateByteMatchSetWithContext(ctx aws.Context, input *CreateByteMatchSetInput, opts ...request.Option) (*CreateByteMatchSetOutput, error) { - req, out := c.CreateByteMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateGeoMatchSet = "CreateGeoMatchSet" - -// CreateGeoMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateGeoMatchSet for more information on using the CreateGeoMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateGeoMatchSetRequest method. -// req, resp := client.CreateGeoMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateGeoMatchSet -func (c *WAF) CreateGeoMatchSetRequest(input *CreateGeoMatchSetInput) (req *request.Request, output *CreateGeoMatchSetOutput) { - op := &request.Operation{ - Name: opCreateGeoMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateGeoMatchSetInput{} - } - - output = &CreateGeoMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateGeoMatchSet API operation for AWS WAF. -// -// Creates an GeoMatchSet, which you use to specify which web requests you want -// to allow or block based on the country that the requests originate from. -// For example, if you're receiving a lot of requests from one or more countries -// and you want to block the requests, you can create an GeoMatchSet that contains -// those countries and then configure AWS WAF to block the requests. -// -// To create and configure a GeoMatchSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateGeoMatchSet request. -// -// Submit a CreateGeoMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateGeoMatchSet request. -// -// Submit an UpdateGeoMatchSetSet request to specify the countries that you -// want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation CreateGeoMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateGeoMatchSet -func (c *WAF) CreateGeoMatchSet(input *CreateGeoMatchSetInput) (*CreateGeoMatchSetOutput, error) { - req, out := c.CreateGeoMatchSetRequest(input) - return out, req.Send() -} - -// CreateGeoMatchSetWithContext is the same as CreateGeoMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateGeoMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) CreateGeoMatchSetWithContext(ctx aws.Context, input *CreateGeoMatchSetInput, opts ...request.Option) (*CreateGeoMatchSetOutput, error) { - req, out := c.CreateGeoMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateIPSet = "CreateIPSet" - -// CreateIPSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateIPSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateIPSet for more information on using the CreateIPSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateIPSetRequest method. -// req, resp := client.CreateIPSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateIPSet -func (c *WAF) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, output *CreateIPSetOutput) { - op := &request.Operation{ - Name: opCreateIPSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateIPSetInput{} - } - - output = &CreateIPSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateIPSet API operation for AWS WAF. -// -// Creates an IPSet, which you use to specify which web requests that you want -// to allow or block based on the IP addresses that the requests originate from. -// For example, if you're receiving a lot of requests from one or more individual -// IP addresses or one or more ranges of IP addresses and you want to block -// the requests, you can create an IPSet that contains those IP addresses and -// then configure AWS WAF to block the requests. -// -// To create and configure an IPSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateIPSet request. -// -// Submit a CreateIPSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateIPSet request. -// -// Submit an UpdateIPSet request to specify the IP addresses that you want AWS -// WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation CreateIPSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateIPSet -func (c *WAF) CreateIPSet(input *CreateIPSetInput) (*CreateIPSetOutput, error) { - req, out := c.CreateIPSetRequest(input) - return out, req.Send() -} - -// CreateIPSetWithContext is the same as CreateIPSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateIPSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) CreateIPSetWithContext(ctx aws.Context, input *CreateIPSetInput, opts ...request.Option) (*CreateIPSetOutput, error) { - req, out := c.CreateIPSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRateBasedRule = "CreateRateBasedRule" - -// CreateRateBasedRuleRequest generates a "aws/request.Request" representing the -// client's request for the CreateRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRateBasedRule for more information on using the CreateRateBasedRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRateBasedRuleRequest method. -// req, resp := client.CreateRateBasedRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRateBasedRule -func (c *WAF) CreateRateBasedRuleRequest(input *CreateRateBasedRuleInput) (req *request.Request, output *CreateRateBasedRuleOutput) { - op := &request.Operation{ - Name: opCreateRateBasedRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRateBasedRuleInput{} - } - - output = &CreateRateBasedRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRateBasedRule API operation for AWS WAF. -// -// Creates a RateBasedRule. The RateBasedRule contains a RateLimit, which specifies -// the maximum number of requests that AWS WAF allows from a specified IP address -// in a five-minute period. The RateBasedRule also contains the IPSet objects, -// ByteMatchSet objects, and other predicates that identify the requests that -// you want to count or block if these requests exceed the RateLimit. -// -// If you add more than one predicate to a RateBasedRule, a request not only -// must exceed the RateLimit, but it also must match all the specifications -// to be counted or blocked. For example, suppose you add the following to a -// RateBasedRule: -// -// * An IPSet that matches the IP address 192.0.2.44/32 -// -// * A ByteMatchSet that matches BadBot in the User-Agent header -// -// Further, you specify a RateLimit of 15,000. -// -// You then add the RateBasedRule to a WebACL and specify that you want to block -// requests that meet the conditions in the rule. For a request to be blocked, -// it must come from the IP address 192.0.2.44 and the User-Agent header in -// the request must contain the value BadBot. Further, requests that match these -// two conditions must be received at a rate of more than 15,000 requests every -// five minutes. If both conditions are met and the rate is exceeded, AWS WAF -// blocks the requests. If the rate drops below 15,000 for a five-minute period, -// AWS WAF no longer blocks the requests. -// -// As a second example, suppose you want to limit requests to a particular page -// on your site. To do this, you could add the following to a RateBasedRule: -// -// * A ByteMatchSet with FieldToMatch of URI -// -// * A PositionalConstraint of STARTS_WITH -// -// * A TargetString of login -// -// Further, you specify a RateLimit of 15,000. -// -// By adding this RateBasedRule to a WebACL, you could limit requests to your -// login page without affecting the rest of your site. -// -// To create and configure a RateBasedRule, perform the following steps: -// -// Create and update the predicates that you want to include in the rule. For -// more information, see CreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateRule request. -// -// Submit a CreateRateBasedRule request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRule request. -// -// Submit an UpdateRateBasedRule request to specify the predicates that you -// want to include in the rule. -// -// Create and update a WebACL that contains the RateBasedRule. For more information, -// see CreateWebACL. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation CreateRateBasedRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRateBasedRule -func (c *WAF) CreateRateBasedRule(input *CreateRateBasedRuleInput) (*CreateRateBasedRuleOutput, error) { - req, out := c.CreateRateBasedRuleRequest(input) - return out, req.Send() -} - -// CreateRateBasedRuleWithContext is the same as CreateRateBasedRule with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRateBasedRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) CreateRateBasedRuleWithContext(ctx aws.Context, input *CreateRateBasedRuleInput, opts ...request.Option) (*CreateRateBasedRuleOutput, error) { - req, out := c.CreateRateBasedRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRegexMatchSet = "CreateRegexMatchSet" - -// CreateRegexMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRegexMatchSet for more information on using the CreateRegexMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRegexMatchSetRequest method. -// req, resp := client.CreateRegexMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRegexMatchSet -func (c *WAF) CreateRegexMatchSetRequest(input *CreateRegexMatchSetInput) (req *request.Request, output *CreateRegexMatchSetOutput) { - op := &request.Operation{ - Name: opCreateRegexMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRegexMatchSetInput{} - } - - output = &CreateRegexMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRegexMatchSet API operation for AWS WAF. -// -// Creates a RegexMatchSet. You then use UpdateRegexMatchSet to identify the -// part of a web request that you want AWS WAF to inspect, such as the values -// of the User-Agent header or the query string. For example, you can create -// a RegexMatchSet that contains a RegexMatchTuple that looks for any requests -// with User-Agent headers that match a RegexPatternSet with pattern B[a@]dB[o0]t. -// You can then configure AWS WAF to reject those requests. -// -// To create and configure a RegexMatchSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateRegexMatchSet request. -// -// Submit a CreateRegexMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRegexMatchSet request. -// -// Submit an UpdateRegexMatchSet request to specify the part of the request -// that you want AWS WAF to inspect (for example, the header or the URI) and -// the value, using a RegexPatternSet, that you want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation CreateRegexMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRegexMatchSet -func (c *WAF) CreateRegexMatchSet(input *CreateRegexMatchSetInput) (*CreateRegexMatchSetOutput, error) { - req, out := c.CreateRegexMatchSetRequest(input) - return out, req.Send() -} - -// CreateRegexMatchSetWithContext is the same as CreateRegexMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRegexMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) CreateRegexMatchSetWithContext(ctx aws.Context, input *CreateRegexMatchSetInput, opts ...request.Option) (*CreateRegexMatchSetOutput, error) { - req, out := c.CreateRegexMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRegexPatternSet = "CreateRegexPatternSet" - -// CreateRegexPatternSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRegexPatternSet for more information on using the CreateRegexPatternSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRegexPatternSetRequest method. -// req, resp := client.CreateRegexPatternSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRegexPatternSet -func (c *WAF) CreateRegexPatternSetRequest(input *CreateRegexPatternSetInput) (req *request.Request, output *CreateRegexPatternSetOutput) { - op := &request.Operation{ - Name: opCreateRegexPatternSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRegexPatternSetInput{} - } - - output = &CreateRegexPatternSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRegexPatternSet API operation for AWS WAF. -// -// Creates a RegexPatternSet. You then use UpdateRegexPatternSet to specify -// the regular expression (regex) pattern that you want AWS WAF to search for, -// such as B[a@]dB[o0]t. You can then configure AWS WAF to reject those requests. -// -// To create and configure a RegexPatternSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateRegexPatternSet request. -// -// Submit a CreateRegexPatternSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRegexPatternSet request. -// -// Submit an UpdateRegexPatternSet request to specify the string that you want -// AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation CreateRegexPatternSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRegexPatternSet -func (c *WAF) CreateRegexPatternSet(input *CreateRegexPatternSetInput) (*CreateRegexPatternSetOutput, error) { - req, out := c.CreateRegexPatternSetRequest(input) - return out, req.Send() -} - -// CreateRegexPatternSetWithContext is the same as CreateRegexPatternSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRegexPatternSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) CreateRegexPatternSetWithContext(ctx aws.Context, input *CreateRegexPatternSetInput, opts ...request.Option) (*CreateRegexPatternSetOutput, error) { - req, out := c.CreateRegexPatternSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRule = "CreateRule" - -// CreateRuleRequest generates a "aws/request.Request" representing the -// client's request for the CreateRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRule for more information on using the CreateRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRuleRequest method. -// req, resp := client.CreateRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRule -func (c *WAF) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, output *CreateRuleOutput) { - op := &request.Operation{ - Name: opCreateRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRuleInput{} - } - - output = &CreateRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRule API operation for AWS WAF. -// -// Creates a Rule, which contains the IPSet objects, ByteMatchSet objects, and -// other predicates that identify the requests that you want to block. If you -// add more than one predicate to a Rule, a request must match all of the specifications -// to be allowed or blocked. For example, suppose that you add the following -// to a Rule: -// -// * An IPSet that matches the IP address 192.0.2.44/32 -// -// * A ByteMatchSet that matches BadBot in the User-Agent header -// -// You then add the Rule to a WebACL and specify that you want to blocks requests -// that satisfy the Rule. For a request to be blocked, it must come from the -// IP address 192.0.2.44 and the User-Agent header in the request must contain -// the value BadBot. -// -// To create and configure a Rule, perform the following steps: -// -// Create and update the predicates that you want to include in the Rule. For -// more information, see CreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateRule request. -// -// Submit a CreateRule request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRule request. -// -// Submit an UpdateRule request to specify the predicates that you want to include -// in the Rule. -// -// Create and update a WebACL that contains the Rule. For more information, -// see CreateWebACL. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation CreateRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRule -func (c *WAF) CreateRule(input *CreateRuleInput) (*CreateRuleOutput, error) { - req, out := c.CreateRuleRequest(input) - return out, req.Send() -} - -// CreateRuleWithContext is the same as CreateRule with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) CreateRuleWithContext(ctx aws.Context, input *CreateRuleInput, opts ...request.Option) (*CreateRuleOutput, error) { - req, out := c.CreateRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRuleGroup = "CreateRuleGroup" - -// CreateRuleGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateRuleGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRuleGroup for more information on using the CreateRuleGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRuleGroupRequest method. -// req, resp := client.CreateRuleGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRuleGroup -func (c *WAF) CreateRuleGroupRequest(input *CreateRuleGroupInput) (req *request.Request, output *CreateRuleGroupOutput) { - op := &request.Operation{ - Name: opCreateRuleGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRuleGroupInput{} - } - - output = &CreateRuleGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRuleGroup API operation for AWS WAF. -// -// Creates a RuleGroup. A rule group is a collection of predefined rules that -// you add to a web ACL. You use UpdateRuleGroup to add rules to the rule group. -// -// Rule groups are subject to the following limits: -// -// * Three rule groups per account. You can request an increase to this limit -// by contacting customer support. -// -// * One rule group per web ACL. -// -// * Ten rules per rule group. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation CreateRuleGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRuleGroup -func (c *WAF) CreateRuleGroup(input *CreateRuleGroupInput) (*CreateRuleGroupOutput, error) { - req, out := c.CreateRuleGroupRequest(input) - return out, req.Send() -} - -// CreateRuleGroupWithContext is the same as CreateRuleGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRuleGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) CreateRuleGroupWithContext(ctx aws.Context, input *CreateRuleGroupInput, opts ...request.Option) (*CreateRuleGroupOutput, error) { - req, out := c.CreateRuleGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSizeConstraintSet = "CreateSizeConstraintSet" - -// CreateSizeConstraintSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSizeConstraintSet for more information on using the CreateSizeConstraintSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSizeConstraintSetRequest method. -// req, resp := client.CreateSizeConstraintSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateSizeConstraintSet -func (c *WAF) CreateSizeConstraintSetRequest(input *CreateSizeConstraintSetInput) (req *request.Request, output *CreateSizeConstraintSetOutput) { - op := &request.Operation{ - Name: opCreateSizeConstraintSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSizeConstraintSetInput{} - } - - output = &CreateSizeConstraintSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSizeConstraintSet API operation for AWS WAF. -// -// Creates a SizeConstraintSet. You then use UpdateSizeConstraintSet to identify -// the part of a web request that you want AWS WAF to check for length, such -// as the length of the User-Agent header or the length of the query string. -// For example, you can create a SizeConstraintSet that matches any requests -// that have a query string that is longer than 100 bytes. You can then configure -// AWS WAF to reject those requests. -// -// To create and configure a SizeConstraintSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateSizeConstraintSet request. -// -// Submit a CreateSizeConstraintSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateSizeConstraintSet request. -// -// Submit an UpdateSizeConstraintSet request to specify the part of the request -// that you want AWS WAF to inspect (for example, the header or the URI) and -// the value that you want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation CreateSizeConstraintSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateSizeConstraintSet -func (c *WAF) CreateSizeConstraintSet(input *CreateSizeConstraintSetInput) (*CreateSizeConstraintSetOutput, error) { - req, out := c.CreateSizeConstraintSetRequest(input) - return out, req.Send() -} - -// CreateSizeConstraintSetWithContext is the same as CreateSizeConstraintSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSizeConstraintSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) CreateSizeConstraintSetWithContext(ctx aws.Context, input *CreateSizeConstraintSetInput, opts ...request.Option) (*CreateSizeConstraintSetOutput, error) { - req, out := c.CreateSizeConstraintSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSqlInjectionMatchSet = "CreateSqlInjectionMatchSet" - -// CreateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSqlInjectionMatchSet for more information on using the CreateSqlInjectionMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSqlInjectionMatchSetRequest method. -// req, resp := client.CreateSqlInjectionMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateSqlInjectionMatchSet -func (c *WAF) CreateSqlInjectionMatchSetRequest(input *CreateSqlInjectionMatchSetInput) (req *request.Request, output *CreateSqlInjectionMatchSetOutput) { - op := &request.Operation{ - Name: opCreateSqlInjectionMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSqlInjectionMatchSetInput{} - } - - output = &CreateSqlInjectionMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSqlInjectionMatchSet API operation for AWS WAF. -// -// Creates a SqlInjectionMatchSet, which you use to allow, block, or count requests -// that contain snippets of SQL code in a specified part of web requests. AWS -// WAF searches for character sequences that are likely to be malicious strings. -// -// To create and configure a SqlInjectionMatchSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateSqlInjectionMatchSet request. -// -// Submit a CreateSqlInjectionMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateSqlInjectionMatchSet request. -// -// Submit an UpdateSqlInjectionMatchSet request to specify the parts of web -// requests in which you want to allow, block, or count malicious SQL code. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation CreateSqlInjectionMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateSqlInjectionMatchSet -func (c *WAF) CreateSqlInjectionMatchSet(input *CreateSqlInjectionMatchSetInput) (*CreateSqlInjectionMatchSetOutput, error) { - req, out := c.CreateSqlInjectionMatchSetRequest(input) - return out, req.Send() -} - -// CreateSqlInjectionMatchSetWithContext is the same as CreateSqlInjectionMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSqlInjectionMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) CreateSqlInjectionMatchSetWithContext(ctx aws.Context, input *CreateSqlInjectionMatchSetInput, opts ...request.Option) (*CreateSqlInjectionMatchSetOutput, error) { - req, out := c.CreateSqlInjectionMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateWebACL = "CreateWebACL" - -// CreateWebACLRequest generates a "aws/request.Request" representing the -// client's request for the CreateWebACL operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateWebACL for more information on using the CreateWebACL -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateWebACLRequest method. -// req, resp := client.CreateWebACLRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateWebACL -func (c *WAF) CreateWebACLRequest(input *CreateWebACLInput) (req *request.Request, output *CreateWebACLOutput) { - op := &request.Operation{ - Name: opCreateWebACL, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateWebACLInput{} - } - - output = &CreateWebACLOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateWebACL API operation for AWS WAF. -// -// Creates a WebACL, which contains the Rules that identify the CloudFront web -// requests that you want to allow, block, or count. AWS WAF evaluates Rules -// in order based on the value of Priority for each Rule. -// -// You also specify a default action, either ALLOW or BLOCK. If a web request -// doesn't match any of the Rules in a WebACL, AWS WAF responds to the request -// with the default action. -// -// To create and configure a WebACL, perform the following steps: -// -// Create and update the ByteMatchSet objects and other predicates that you -// want to include in Rules. For more information, see CreateByteMatchSet, UpdateByteMatchSet, -// CreateIPSet, UpdateIPSet, CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet. -// -// Create and update the Rules that you want to include in the WebACL. For more -// information, see CreateRule and UpdateRule. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateWebACL request. -// -// Submit a CreateWebACL request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateWebACL request. -// -// Submit an UpdateWebACL request to specify the Rules that you want to include -// in the WebACL, to specify the default action, and to associate the WebACL -// with a CloudFront distribution. -// -// For more information about how to use the AWS WAF API, see the AWS WAF Developer -// Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation CreateWebACL for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateWebACL -func (c *WAF) CreateWebACL(input *CreateWebACLInput) (*CreateWebACLOutput, error) { - req, out := c.CreateWebACLRequest(input) - return out, req.Send() -} - -// CreateWebACLWithContext is the same as CreateWebACL with the addition of -// the ability to pass a context and additional request options. -// -// See CreateWebACL for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) CreateWebACLWithContext(ctx aws.Context, input *CreateWebACLInput, opts ...request.Option) (*CreateWebACLOutput, error) { - req, out := c.CreateWebACLRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateXssMatchSet = "CreateXssMatchSet" - -// CreateXssMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateXssMatchSet for more information on using the CreateXssMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateXssMatchSetRequest method. -// req, resp := client.CreateXssMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateXssMatchSet -func (c *WAF) CreateXssMatchSetRequest(input *CreateXssMatchSetInput) (req *request.Request, output *CreateXssMatchSetOutput) { - op := &request.Operation{ - Name: opCreateXssMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateXssMatchSetInput{} - } - - output = &CreateXssMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateXssMatchSet API operation for AWS WAF. -// -// Creates an XssMatchSet, which you use to allow, block, or count requests -// that contain cross-site scripting attacks in the specified part of web requests. -// AWS WAF searches for character sequences that are likely to be malicious -// strings. -// -// To create and configure an XssMatchSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateXssMatchSet request. -// -// Submit a CreateXssMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateXssMatchSet request. -// -// Submit an UpdateXssMatchSet request to specify the parts of web requests -// in which you want to allow, block, or count cross-site scripting attacks. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation CreateXssMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateXssMatchSet -func (c *WAF) CreateXssMatchSet(input *CreateXssMatchSetInput) (*CreateXssMatchSetOutput, error) { - req, out := c.CreateXssMatchSetRequest(input) - return out, req.Send() -} - -// CreateXssMatchSetWithContext is the same as CreateXssMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateXssMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) CreateXssMatchSetWithContext(ctx aws.Context, input *CreateXssMatchSetInput, opts ...request.Option) (*CreateXssMatchSetOutput, error) { - req, out := c.CreateXssMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteByteMatchSet = "DeleteByteMatchSet" - -// DeleteByteMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteByteMatchSet for more information on using the DeleteByteMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteByteMatchSetRequest method. -// req, resp := client.DeleteByteMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteByteMatchSet -func (c *WAF) DeleteByteMatchSetRequest(input *DeleteByteMatchSetInput) (req *request.Request, output *DeleteByteMatchSetOutput) { - op := &request.Operation{ - Name: opDeleteByteMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteByteMatchSetInput{} - } - - output = &DeleteByteMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteByteMatchSet API operation for AWS WAF. -// -// Permanently deletes a ByteMatchSet. You can't delete a ByteMatchSet if it's -// still used in any Rules or if it still includes any ByteMatchTuple objects -// (any filters). -// -// If you just want to remove a ByteMatchSet from a Rule, use UpdateRule. -// -// To permanently delete a ByteMatchSet, perform the following steps: -// -// Update the ByteMatchSet to remove filters, if any. For more information, -// see UpdateByteMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteByteMatchSet request. -// -// Submit a DeleteByteMatchSet request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation DeleteByteMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteByteMatchSet -func (c *WAF) DeleteByteMatchSet(input *DeleteByteMatchSetInput) (*DeleteByteMatchSetOutput, error) { - req, out := c.DeleteByteMatchSetRequest(input) - return out, req.Send() -} - -// DeleteByteMatchSetWithContext is the same as DeleteByteMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteByteMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) DeleteByteMatchSetWithContext(ctx aws.Context, input *DeleteByteMatchSetInput, opts ...request.Option) (*DeleteByteMatchSetOutput, error) { - req, out := c.DeleteByteMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteGeoMatchSet = "DeleteGeoMatchSet" - -// DeleteGeoMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteGeoMatchSet for more information on using the DeleteGeoMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteGeoMatchSetRequest method. -// req, resp := client.DeleteGeoMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteGeoMatchSet -func (c *WAF) DeleteGeoMatchSetRequest(input *DeleteGeoMatchSetInput) (req *request.Request, output *DeleteGeoMatchSetOutput) { - op := &request.Operation{ - Name: opDeleteGeoMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteGeoMatchSetInput{} - } - - output = &DeleteGeoMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteGeoMatchSet API operation for AWS WAF. -// -// Permanently deletes a GeoMatchSet. You can't delete a GeoMatchSet if it's -// still used in any Rules or if it still includes any countries. -// -// If you just want to remove a GeoMatchSet from a Rule, use UpdateRule. -// -// To permanently delete a GeoMatchSet from AWS WAF, perform the following steps: -// -// Update the GeoMatchSet to remove any countries. For more information, see -// UpdateGeoMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteGeoMatchSet request. -// -// Submit a DeleteGeoMatchSet request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation DeleteGeoMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteGeoMatchSet -func (c *WAF) DeleteGeoMatchSet(input *DeleteGeoMatchSetInput) (*DeleteGeoMatchSetOutput, error) { - req, out := c.DeleteGeoMatchSetRequest(input) - return out, req.Send() -} - -// DeleteGeoMatchSetWithContext is the same as DeleteGeoMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteGeoMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) DeleteGeoMatchSetWithContext(ctx aws.Context, input *DeleteGeoMatchSetInput, opts ...request.Option) (*DeleteGeoMatchSetOutput, error) { - req, out := c.DeleteGeoMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIPSet = "DeleteIPSet" - -// DeleteIPSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIPSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIPSet for more information on using the DeleteIPSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIPSetRequest method. -// req, resp := client.DeleteIPSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteIPSet -func (c *WAF) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Request, output *DeleteIPSetOutput) { - op := &request.Operation{ - Name: opDeleteIPSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteIPSetInput{} - } - - output = &DeleteIPSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteIPSet API operation for AWS WAF. -// -// Permanently deletes an IPSet. You can't delete an IPSet if it's still used -// in any Rules or if it still includes any IP addresses. -// -// If you just want to remove an IPSet from a Rule, use UpdateRule. -// -// To permanently delete an IPSet from AWS WAF, perform the following steps: -// -// Update the IPSet to remove IP address ranges, if any. For more information, -// see UpdateIPSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteIPSet request. -// -// Submit a DeleteIPSet request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation DeleteIPSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteIPSet -func (c *WAF) DeleteIPSet(input *DeleteIPSetInput) (*DeleteIPSetOutput, error) { - req, out := c.DeleteIPSetRequest(input) - return out, req.Send() -} - -// DeleteIPSetWithContext is the same as DeleteIPSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIPSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) DeleteIPSetWithContext(ctx aws.Context, input *DeleteIPSetInput, opts ...request.Option) (*DeleteIPSetOutput, error) { - req, out := c.DeleteIPSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLoggingConfiguration = "DeleteLoggingConfiguration" - -// DeleteLoggingConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoggingConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLoggingConfiguration for more information on using the DeleteLoggingConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLoggingConfigurationRequest method. -// req, resp := client.DeleteLoggingConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteLoggingConfiguration -func (c *WAF) DeleteLoggingConfigurationRequest(input *DeleteLoggingConfigurationInput) (req *request.Request, output *DeleteLoggingConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteLoggingConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLoggingConfigurationInput{} - } - - output = &DeleteLoggingConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLoggingConfiguration API operation for AWS WAF. -// -// Permanently deletes the LoggingConfiguration from the specified web ACL. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation DeleteLoggingConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteLoggingConfiguration -func (c *WAF) DeleteLoggingConfiguration(input *DeleteLoggingConfigurationInput) (*DeleteLoggingConfigurationOutput, error) { - req, out := c.DeleteLoggingConfigurationRequest(input) - return out, req.Send() -} - -// DeleteLoggingConfigurationWithContext is the same as DeleteLoggingConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLoggingConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) DeleteLoggingConfigurationWithContext(ctx aws.Context, input *DeleteLoggingConfigurationInput, opts ...request.Option) (*DeleteLoggingConfigurationOutput, error) { - req, out := c.DeleteLoggingConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePermissionPolicy = "DeletePermissionPolicy" - -// DeletePermissionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeletePermissionPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePermissionPolicy for more information on using the DeletePermissionPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePermissionPolicyRequest method. -// req, resp := client.DeletePermissionPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeletePermissionPolicy -func (c *WAF) DeletePermissionPolicyRequest(input *DeletePermissionPolicyInput) (req *request.Request, output *DeletePermissionPolicyOutput) { - op := &request.Operation{ - Name: opDeletePermissionPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePermissionPolicyInput{} - } - - output = &DeletePermissionPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePermissionPolicy API operation for AWS WAF. -// -// Permanently deletes an IAM policy from the specified RuleGroup. -// -// The user making the request must be the owner of the RuleGroup. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation DeletePermissionPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeletePermissionPolicy -func (c *WAF) DeletePermissionPolicy(input *DeletePermissionPolicyInput) (*DeletePermissionPolicyOutput, error) { - req, out := c.DeletePermissionPolicyRequest(input) - return out, req.Send() -} - -// DeletePermissionPolicyWithContext is the same as DeletePermissionPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePermissionPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) DeletePermissionPolicyWithContext(ctx aws.Context, input *DeletePermissionPolicyInput, opts ...request.Option) (*DeletePermissionPolicyOutput, error) { - req, out := c.DeletePermissionPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRateBasedRule = "DeleteRateBasedRule" - -// DeleteRateBasedRuleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRateBasedRule for more information on using the DeleteRateBasedRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRateBasedRuleRequest method. -// req, resp := client.DeleteRateBasedRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRateBasedRule -func (c *WAF) DeleteRateBasedRuleRequest(input *DeleteRateBasedRuleInput) (req *request.Request, output *DeleteRateBasedRuleOutput) { - op := &request.Operation{ - Name: opDeleteRateBasedRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRateBasedRuleInput{} - } - - output = &DeleteRateBasedRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRateBasedRule API operation for AWS WAF. -// -// Permanently deletes a RateBasedRule. You can't delete a rule if it's still -// used in any WebACL objects or if it still includes any predicates, such as -// ByteMatchSet objects. -// -// If you just want to remove a rule from a WebACL, use UpdateWebACL. -// -// To permanently delete a RateBasedRule from AWS WAF, perform the following -// steps: -// -// Update the RateBasedRule to remove predicates, if any. For more information, -// see UpdateRateBasedRule. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteRateBasedRule request. -// -// Submit a DeleteRateBasedRule request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation DeleteRateBasedRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRateBasedRule -func (c *WAF) DeleteRateBasedRule(input *DeleteRateBasedRuleInput) (*DeleteRateBasedRuleOutput, error) { - req, out := c.DeleteRateBasedRuleRequest(input) - return out, req.Send() -} - -// DeleteRateBasedRuleWithContext is the same as DeleteRateBasedRule with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRateBasedRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) DeleteRateBasedRuleWithContext(ctx aws.Context, input *DeleteRateBasedRuleInput, opts ...request.Option) (*DeleteRateBasedRuleOutput, error) { - req, out := c.DeleteRateBasedRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRegexMatchSet = "DeleteRegexMatchSet" - -// DeleteRegexMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRegexMatchSet for more information on using the DeleteRegexMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRegexMatchSetRequest method. -// req, resp := client.DeleteRegexMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRegexMatchSet -func (c *WAF) DeleteRegexMatchSetRequest(input *DeleteRegexMatchSetInput) (req *request.Request, output *DeleteRegexMatchSetOutput) { - op := &request.Operation{ - Name: opDeleteRegexMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRegexMatchSetInput{} - } - - output = &DeleteRegexMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRegexMatchSet API operation for AWS WAF. -// -// Permanently deletes a RegexMatchSet. You can't delete a RegexMatchSet if -// it's still used in any Rules or if it still includes any RegexMatchTuples -// objects (any filters). -// -// If you just want to remove a RegexMatchSet from a Rule, use UpdateRule. -// -// To permanently delete a RegexMatchSet, perform the following steps: -// -// Update the RegexMatchSet to remove filters, if any. For more information, -// see UpdateRegexMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteRegexMatchSet request. -// -// Submit a DeleteRegexMatchSet request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation DeleteRegexMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRegexMatchSet -func (c *WAF) DeleteRegexMatchSet(input *DeleteRegexMatchSetInput) (*DeleteRegexMatchSetOutput, error) { - req, out := c.DeleteRegexMatchSetRequest(input) - return out, req.Send() -} - -// DeleteRegexMatchSetWithContext is the same as DeleteRegexMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRegexMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) DeleteRegexMatchSetWithContext(ctx aws.Context, input *DeleteRegexMatchSetInput, opts ...request.Option) (*DeleteRegexMatchSetOutput, error) { - req, out := c.DeleteRegexMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRegexPatternSet = "DeleteRegexPatternSet" - -// DeleteRegexPatternSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRegexPatternSet for more information on using the DeleteRegexPatternSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRegexPatternSetRequest method. -// req, resp := client.DeleteRegexPatternSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRegexPatternSet -func (c *WAF) DeleteRegexPatternSetRequest(input *DeleteRegexPatternSetInput) (req *request.Request, output *DeleteRegexPatternSetOutput) { - op := &request.Operation{ - Name: opDeleteRegexPatternSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRegexPatternSetInput{} - } - - output = &DeleteRegexPatternSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRegexPatternSet API operation for AWS WAF. -// -// Permanently deletes a RegexPatternSet. You can't delete a RegexPatternSet -// if it's still used in any RegexMatchSet or if the RegexPatternSet is not -// empty. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation DeleteRegexPatternSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRegexPatternSet -func (c *WAF) DeleteRegexPatternSet(input *DeleteRegexPatternSetInput) (*DeleteRegexPatternSetOutput, error) { - req, out := c.DeleteRegexPatternSetRequest(input) - return out, req.Send() -} - -// DeleteRegexPatternSetWithContext is the same as DeleteRegexPatternSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRegexPatternSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) DeleteRegexPatternSetWithContext(ctx aws.Context, input *DeleteRegexPatternSetInput, opts ...request.Option) (*DeleteRegexPatternSetOutput, error) { - req, out := c.DeleteRegexPatternSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRule = "DeleteRule" - -// DeleteRuleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRule for more information on using the DeleteRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRuleRequest method. -// req, resp := client.DeleteRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRule -func (c *WAF) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, output *DeleteRuleOutput) { - op := &request.Operation{ - Name: opDeleteRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRuleInput{} - } - - output = &DeleteRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRule API operation for AWS WAF. -// -// Permanently deletes a Rule. You can't delete a Rule if it's still used in -// any WebACL objects or if it still includes any predicates, such as ByteMatchSet -// objects. -// -// If you just want to remove a Rule from a WebACL, use UpdateWebACL. -// -// To permanently delete a Rule from AWS WAF, perform the following steps: -// -// Update the Rule to remove predicates, if any. For more information, see UpdateRule. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteRule request. -// -// Submit a DeleteRule request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation DeleteRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRule -func (c *WAF) DeleteRule(input *DeleteRuleInput) (*DeleteRuleOutput, error) { - req, out := c.DeleteRuleRequest(input) - return out, req.Send() -} - -// DeleteRuleWithContext is the same as DeleteRule with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) DeleteRuleWithContext(ctx aws.Context, input *DeleteRuleInput, opts ...request.Option) (*DeleteRuleOutput, error) { - req, out := c.DeleteRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRuleGroup = "DeleteRuleGroup" - -// DeleteRuleGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRuleGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRuleGroup for more information on using the DeleteRuleGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRuleGroupRequest method. -// req, resp := client.DeleteRuleGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRuleGroup -func (c *WAF) DeleteRuleGroupRequest(input *DeleteRuleGroupInput) (req *request.Request, output *DeleteRuleGroupOutput) { - op := &request.Operation{ - Name: opDeleteRuleGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRuleGroupInput{} - } - - output = &DeleteRuleGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRuleGroup API operation for AWS WAF. -// -// Permanently deletes a RuleGroup. You can't delete a RuleGroup if it's still -// used in any WebACL objects or if it still includes any rules. -// -// If you just want to remove a RuleGroup from a WebACL, use UpdateWebACL. -// -// To permanently delete a RuleGroup from AWS WAF, perform the following steps: -// -// Update the RuleGroup to remove rules, if any. For more information, see UpdateRuleGroup. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteRuleGroup request. -// -// Submit a DeleteRuleGroup request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation DeleteRuleGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// * ErrCodeInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRuleGroup -func (c *WAF) DeleteRuleGroup(input *DeleteRuleGroupInput) (*DeleteRuleGroupOutput, error) { - req, out := c.DeleteRuleGroupRequest(input) - return out, req.Send() -} - -// DeleteRuleGroupWithContext is the same as DeleteRuleGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRuleGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) DeleteRuleGroupWithContext(ctx aws.Context, input *DeleteRuleGroupInput, opts ...request.Option) (*DeleteRuleGroupOutput, error) { - req, out := c.DeleteRuleGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSizeConstraintSet = "DeleteSizeConstraintSet" - -// DeleteSizeConstraintSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSizeConstraintSet for more information on using the DeleteSizeConstraintSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSizeConstraintSetRequest method. -// req, resp := client.DeleteSizeConstraintSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteSizeConstraintSet -func (c *WAF) DeleteSizeConstraintSetRequest(input *DeleteSizeConstraintSetInput) (req *request.Request, output *DeleteSizeConstraintSetOutput) { - op := &request.Operation{ - Name: opDeleteSizeConstraintSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSizeConstraintSetInput{} - } - - output = &DeleteSizeConstraintSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteSizeConstraintSet API operation for AWS WAF. -// -// Permanently deletes a SizeConstraintSet. You can't delete a SizeConstraintSet -// if it's still used in any Rules or if it still includes any SizeConstraint -// objects (any filters). -// -// If you just want to remove a SizeConstraintSet from a Rule, use UpdateRule. -// -// To permanently delete a SizeConstraintSet, perform the following steps: -// -// Update the SizeConstraintSet to remove filters, if any. For more information, -// see UpdateSizeConstraintSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteSizeConstraintSet request. -// -// Submit a DeleteSizeConstraintSet request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation DeleteSizeConstraintSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteSizeConstraintSet -func (c *WAF) DeleteSizeConstraintSet(input *DeleteSizeConstraintSetInput) (*DeleteSizeConstraintSetOutput, error) { - req, out := c.DeleteSizeConstraintSetRequest(input) - return out, req.Send() -} - -// DeleteSizeConstraintSetWithContext is the same as DeleteSizeConstraintSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSizeConstraintSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) DeleteSizeConstraintSetWithContext(ctx aws.Context, input *DeleteSizeConstraintSetInput, opts ...request.Option) (*DeleteSizeConstraintSetOutput, error) { - req, out := c.DeleteSizeConstraintSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSqlInjectionMatchSet = "DeleteSqlInjectionMatchSet" - -// DeleteSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSqlInjectionMatchSet for more information on using the DeleteSqlInjectionMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSqlInjectionMatchSetRequest method. -// req, resp := client.DeleteSqlInjectionMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteSqlInjectionMatchSet -func (c *WAF) DeleteSqlInjectionMatchSetRequest(input *DeleteSqlInjectionMatchSetInput) (req *request.Request, output *DeleteSqlInjectionMatchSetOutput) { - op := &request.Operation{ - Name: opDeleteSqlInjectionMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSqlInjectionMatchSetInput{} - } - - output = &DeleteSqlInjectionMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteSqlInjectionMatchSet API operation for AWS WAF. -// -// Permanently deletes a SqlInjectionMatchSet. You can't delete a SqlInjectionMatchSet -// if it's still used in any Rules or if it still contains any SqlInjectionMatchTuple -// objects. -// -// If you just want to remove a SqlInjectionMatchSet from a Rule, use UpdateRule. -// -// To permanently delete a SqlInjectionMatchSet from AWS WAF, perform the following -// steps: -// -// Update the SqlInjectionMatchSet to remove filters, if any. For more information, -// see UpdateSqlInjectionMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteSqlInjectionMatchSet request. -// -// Submit a DeleteSqlInjectionMatchSet request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation DeleteSqlInjectionMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteSqlInjectionMatchSet -func (c *WAF) DeleteSqlInjectionMatchSet(input *DeleteSqlInjectionMatchSetInput) (*DeleteSqlInjectionMatchSetOutput, error) { - req, out := c.DeleteSqlInjectionMatchSetRequest(input) - return out, req.Send() -} - -// DeleteSqlInjectionMatchSetWithContext is the same as DeleteSqlInjectionMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSqlInjectionMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) DeleteSqlInjectionMatchSetWithContext(ctx aws.Context, input *DeleteSqlInjectionMatchSetInput, opts ...request.Option) (*DeleteSqlInjectionMatchSetOutput, error) { - req, out := c.DeleteSqlInjectionMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteWebACL = "DeleteWebACL" - -// DeleteWebACLRequest generates a "aws/request.Request" representing the -// client's request for the DeleteWebACL operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteWebACL for more information on using the DeleteWebACL -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteWebACLRequest method. -// req, resp := client.DeleteWebACLRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteWebACL -func (c *WAF) DeleteWebACLRequest(input *DeleteWebACLInput) (req *request.Request, output *DeleteWebACLOutput) { - op := &request.Operation{ - Name: opDeleteWebACL, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteWebACLInput{} - } - - output = &DeleteWebACLOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteWebACL API operation for AWS WAF. -// -// Permanently deletes a WebACL. You can't delete a WebACL if it still contains -// any Rules. -// -// To delete a WebACL, perform the following steps: -// -// Update the WebACL to remove Rules, if any. For more information, see UpdateWebACL. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteWebACL request. -// -// Submit a DeleteWebACL request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation DeleteWebACL for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteWebACL -func (c *WAF) DeleteWebACL(input *DeleteWebACLInput) (*DeleteWebACLOutput, error) { - req, out := c.DeleteWebACLRequest(input) - return out, req.Send() -} - -// DeleteWebACLWithContext is the same as DeleteWebACL with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteWebACL for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) DeleteWebACLWithContext(ctx aws.Context, input *DeleteWebACLInput, opts ...request.Option) (*DeleteWebACLOutput, error) { - req, out := c.DeleteWebACLRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteXssMatchSet = "DeleteXssMatchSet" - -// DeleteXssMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteXssMatchSet for more information on using the DeleteXssMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteXssMatchSetRequest method. -// req, resp := client.DeleteXssMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteXssMatchSet -func (c *WAF) DeleteXssMatchSetRequest(input *DeleteXssMatchSetInput) (req *request.Request, output *DeleteXssMatchSetOutput) { - op := &request.Operation{ - Name: opDeleteXssMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteXssMatchSetInput{} - } - - output = &DeleteXssMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteXssMatchSet API operation for AWS WAF. -// -// Permanently deletes an XssMatchSet. You can't delete an XssMatchSet if it's -// still used in any Rules or if it still contains any XssMatchTuple objects. -// -// If you just want to remove an XssMatchSet from a Rule, use UpdateRule. -// -// To permanently delete an XssMatchSet from AWS WAF, perform the following -// steps: -// -// Update the XssMatchSet to remove filters, if any. For more information, see -// UpdateXssMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteXssMatchSet request. -// -// Submit a DeleteXssMatchSet request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation DeleteXssMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteXssMatchSet -func (c *WAF) DeleteXssMatchSet(input *DeleteXssMatchSetInput) (*DeleteXssMatchSetOutput, error) { - req, out := c.DeleteXssMatchSetRequest(input) - return out, req.Send() -} - -// DeleteXssMatchSetWithContext is the same as DeleteXssMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteXssMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) DeleteXssMatchSetWithContext(ctx aws.Context, input *DeleteXssMatchSetInput, opts ...request.Option) (*DeleteXssMatchSetOutput, error) { - req, out := c.DeleteXssMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetByteMatchSet = "GetByteMatchSet" - -// GetByteMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the GetByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetByteMatchSet for more information on using the GetByteMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetByteMatchSetRequest method. -// req, resp := client.GetByteMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetByteMatchSet -func (c *WAF) GetByteMatchSetRequest(input *GetByteMatchSetInput) (req *request.Request, output *GetByteMatchSetOutput) { - op := &request.Operation{ - Name: opGetByteMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetByteMatchSetInput{} - } - - output = &GetByteMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetByteMatchSet API operation for AWS WAF. -// -// Returns the ByteMatchSet specified by ByteMatchSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetByteMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetByteMatchSet -func (c *WAF) GetByteMatchSet(input *GetByteMatchSetInput) (*GetByteMatchSetOutput, error) { - req, out := c.GetByteMatchSetRequest(input) - return out, req.Send() -} - -// GetByteMatchSetWithContext is the same as GetByteMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetByteMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetByteMatchSetWithContext(ctx aws.Context, input *GetByteMatchSetInput, opts ...request.Option) (*GetByteMatchSetOutput, error) { - req, out := c.GetByteMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetChangeToken = "GetChangeToken" - -// GetChangeTokenRequest generates a "aws/request.Request" representing the -// client's request for the GetChangeToken operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetChangeToken for more information on using the GetChangeToken -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetChangeTokenRequest method. -// req, resp := client.GetChangeTokenRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetChangeToken -func (c *WAF) GetChangeTokenRequest(input *GetChangeTokenInput) (req *request.Request, output *GetChangeTokenOutput) { - op := &request.Operation{ - Name: opGetChangeToken, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetChangeTokenInput{} - } - - output = &GetChangeTokenOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetChangeToken API operation for AWS WAF. -// -// When you want to create, update, or delete AWS WAF objects, get a change -// token and include the change token in the create, update, or delete request. -// Change tokens ensure that your application doesn't submit conflicting requests -// to AWS WAF. -// -// Each create, update, or delete request must use a unique change token. If -// your application submits a GetChangeToken request and then submits a second -// GetChangeToken request before submitting a create, update, or delete request, -// the second GetChangeToken request returns the same value as the first GetChangeToken -// request. -// -// When you use a change token in a create, update, or delete request, the status -// of the change token changes to PENDING, which indicates that AWS WAF is propagating -// the change to all AWS WAF servers. Use GetChangeTokenStatus to determine -// the status of your change token. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetChangeToken for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetChangeToken -func (c *WAF) GetChangeToken(input *GetChangeTokenInput) (*GetChangeTokenOutput, error) { - req, out := c.GetChangeTokenRequest(input) - return out, req.Send() -} - -// GetChangeTokenWithContext is the same as GetChangeToken with the addition of -// the ability to pass a context and additional request options. -// -// See GetChangeToken for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetChangeTokenWithContext(ctx aws.Context, input *GetChangeTokenInput, opts ...request.Option) (*GetChangeTokenOutput, error) { - req, out := c.GetChangeTokenRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetChangeTokenStatus = "GetChangeTokenStatus" - -// GetChangeTokenStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetChangeTokenStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetChangeTokenStatus for more information on using the GetChangeTokenStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetChangeTokenStatusRequest method. -// req, resp := client.GetChangeTokenStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetChangeTokenStatus -func (c *WAF) GetChangeTokenStatusRequest(input *GetChangeTokenStatusInput) (req *request.Request, output *GetChangeTokenStatusOutput) { - op := &request.Operation{ - Name: opGetChangeTokenStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetChangeTokenStatusInput{} - } - - output = &GetChangeTokenStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetChangeTokenStatus API operation for AWS WAF. -// -// Returns the status of a ChangeToken that you got by calling GetChangeToken. -// ChangeTokenStatus is one of the following values: -// -// * PROVISIONED: You requested the change token by calling GetChangeToken, -// but you haven't used it yet in a call to create, update, or delete an -// AWS WAF object. -// -// * PENDING: AWS WAF is propagating the create, update, or delete request -// to all AWS WAF servers. -// -// * IN_SYNC: Propagation is complete. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetChangeTokenStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetChangeTokenStatus -func (c *WAF) GetChangeTokenStatus(input *GetChangeTokenStatusInput) (*GetChangeTokenStatusOutput, error) { - req, out := c.GetChangeTokenStatusRequest(input) - return out, req.Send() -} - -// GetChangeTokenStatusWithContext is the same as GetChangeTokenStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetChangeTokenStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetChangeTokenStatusWithContext(ctx aws.Context, input *GetChangeTokenStatusInput, opts ...request.Option) (*GetChangeTokenStatusOutput, error) { - req, out := c.GetChangeTokenStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetGeoMatchSet = "GetGeoMatchSet" - -// GetGeoMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the GetGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetGeoMatchSet for more information on using the GetGeoMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetGeoMatchSetRequest method. -// req, resp := client.GetGeoMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetGeoMatchSet -func (c *WAF) GetGeoMatchSetRequest(input *GetGeoMatchSetInput) (req *request.Request, output *GetGeoMatchSetOutput) { - op := &request.Operation{ - Name: opGetGeoMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetGeoMatchSetInput{} - } - - output = &GetGeoMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGeoMatchSet API operation for AWS WAF. -// -// Returns the GeoMatchSet that is specified by GeoMatchSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetGeoMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetGeoMatchSet -func (c *WAF) GetGeoMatchSet(input *GetGeoMatchSetInput) (*GetGeoMatchSetOutput, error) { - req, out := c.GetGeoMatchSetRequest(input) - return out, req.Send() -} - -// GetGeoMatchSetWithContext is the same as GetGeoMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetGeoMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetGeoMatchSetWithContext(ctx aws.Context, input *GetGeoMatchSetInput, opts ...request.Option) (*GetGeoMatchSetOutput, error) { - req, out := c.GetGeoMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIPSet = "GetIPSet" - -// GetIPSetRequest generates a "aws/request.Request" representing the -// client's request for the GetIPSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIPSet for more information on using the GetIPSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIPSetRequest method. -// req, resp := client.GetIPSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetIPSet -func (c *WAF) GetIPSetRequest(input *GetIPSetInput) (req *request.Request, output *GetIPSetOutput) { - op := &request.Operation{ - Name: opGetIPSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetIPSetInput{} - } - - output = &GetIPSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIPSet API operation for AWS WAF. -// -// Returns the IPSet that is specified by IPSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetIPSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetIPSet -func (c *WAF) GetIPSet(input *GetIPSetInput) (*GetIPSetOutput, error) { - req, out := c.GetIPSetRequest(input) - return out, req.Send() -} - -// GetIPSetWithContext is the same as GetIPSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetIPSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetIPSetWithContext(ctx aws.Context, input *GetIPSetInput, opts ...request.Option) (*GetIPSetOutput, error) { - req, out := c.GetIPSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLoggingConfiguration = "GetLoggingConfiguration" - -// GetLoggingConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetLoggingConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLoggingConfiguration for more information on using the GetLoggingConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLoggingConfigurationRequest method. -// req, resp := client.GetLoggingConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetLoggingConfiguration -func (c *WAF) GetLoggingConfigurationRequest(input *GetLoggingConfigurationInput) (req *request.Request, output *GetLoggingConfigurationOutput) { - op := &request.Operation{ - Name: opGetLoggingConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetLoggingConfigurationInput{} - } - - output = &GetLoggingConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLoggingConfiguration API operation for AWS WAF. -// -// Returns the LoggingConfiguration for the specified web ACL. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetLoggingConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetLoggingConfiguration -func (c *WAF) GetLoggingConfiguration(input *GetLoggingConfigurationInput) (*GetLoggingConfigurationOutput, error) { - req, out := c.GetLoggingConfigurationRequest(input) - return out, req.Send() -} - -// GetLoggingConfigurationWithContext is the same as GetLoggingConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetLoggingConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetLoggingConfigurationWithContext(ctx aws.Context, input *GetLoggingConfigurationInput, opts ...request.Option) (*GetLoggingConfigurationOutput, error) { - req, out := c.GetLoggingConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPermissionPolicy = "GetPermissionPolicy" - -// GetPermissionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetPermissionPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPermissionPolicy for more information on using the GetPermissionPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPermissionPolicyRequest method. -// req, resp := client.GetPermissionPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetPermissionPolicy -func (c *WAF) GetPermissionPolicyRequest(input *GetPermissionPolicyInput) (req *request.Request, output *GetPermissionPolicyOutput) { - op := &request.Operation{ - Name: opGetPermissionPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPermissionPolicyInput{} - } - - output = &GetPermissionPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPermissionPolicy API operation for AWS WAF. -// -// Returns the IAM policy attached to the RuleGroup. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetPermissionPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetPermissionPolicy -func (c *WAF) GetPermissionPolicy(input *GetPermissionPolicyInput) (*GetPermissionPolicyOutput, error) { - req, out := c.GetPermissionPolicyRequest(input) - return out, req.Send() -} - -// GetPermissionPolicyWithContext is the same as GetPermissionPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetPermissionPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetPermissionPolicyWithContext(ctx aws.Context, input *GetPermissionPolicyInput, opts ...request.Option) (*GetPermissionPolicyOutput, error) { - req, out := c.GetPermissionPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRateBasedRule = "GetRateBasedRule" - -// GetRateBasedRuleRequest generates a "aws/request.Request" representing the -// client's request for the GetRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRateBasedRule for more information on using the GetRateBasedRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRateBasedRuleRequest method. -// req, resp := client.GetRateBasedRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRateBasedRule -func (c *WAF) GetRateBasedRuleRequest(input *GetRateBasedRuleInput) (req *request.Request, output *GetRateBasedRuleOutput) { - op := &request.Operation{ - Name: opGetRateBasedRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRateBasedRuleInput{} - } - - output = &GetRateBasedRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRateBasedRule API operation for AWS WAF. -// -// Returns the RateBasedRule that is specified by the RuleId that you included -// in the GetRateBasedRule request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetRateBasedRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRateBasedRule -func (c *WAF) GetRateBasedRule(input *GetRateBasedRuleInput) (*GetRateBasedRuleOutput, error) { - req, out := c.GetRateBasedRuleRequest(input) - return out, req.Send() -} - -// GetRateBasedRuleWithContext is the same as GetRateBasedRule with the addition of -// the ability to pass a context and additional request options. -// -// See GetRateBasedRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetRateBasedRuleWithContext(ctx aws.Context, input *GetRateBasedRuleInput, opts ...request.Option) (*GetRateBasedRuleOutput, error) { - req, out := c.GetRateBasedRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRateBasedRuleManagedKeys = "GetRateBasedRuleManagedKeys" - -// GetRateBasedRuleManagedKeysRequest generates a "aws/request.Request" representing the -// client's request for the GetRateBasedRuleManagedKeys operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRateBasedRuleManagedKeys for more information on using the GetRateBasedRuleManagedKeys -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRateBasedRuleManagedKeysRequest method. -// req, resp := client.GetRateBasedRuleManagedKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRateBasedRuleManagedKeys -func (c *WAF) GetRateBasedRuleManagedKeysRequest(input *GetRateBasedRuleManagedKeysInput) (req *request.Request, output *GetRateBasedRuleManagedKeysOutput) { - op := &request.Operation{ - Name: opGetRateBasedRuleManagedKeys, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRateBasedRuleManagedKeysInput{} - } - - output = &GetRateBasedRuleManagedKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRateBasedRuleManagedKeys API operation for AWS WAF. -// -// Returns an array of IP addresses currently being blocked by the RateBasedRule -// that is specified by the RuleId. The maximum number of managed keys that -// will be blocked is 10,000. If more than 10,000 addresses exceed the rate -// limit, the 10,000 addresses with the highest rates will be blocked. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetRateBasedRuleManagedKeys for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRateBasedRuleManagedKeys -func (c *WAF) GetRateBasedRuleManagedKeys(input *GetRateBasedRuleManagedKeysInput) (*GetRateBasedRuleManagedKeysOutput, error) { - req, out := c.GetRateBasedRuleManagedKeysRequest(input) - return out, req.Send() -} - -// GetRateBasedRuleManagedKeysWithContext is the same as GetRateBasedRuleManagedKeys with the addition of -// the ability to pass a context and additional request options. -// -// See GetRateBasedRuleManagedKeys for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetRateBasedRuleManagedKeysWithContext(ctx aws.Context, input *GetRateBasedRuleManagedKeysInput, opts ...request.Option) (*GetRateBasedRuleManagedKeysOutput, error) { - req, out := c.GetRateBasedRuleManagedKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRegexMatchSet = "GetRegexMatchSet" - -// GetRegexMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the GetRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRegexMatchSet for more information on using the GetRegexMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRegexMatchSetRequest method. -// req, resp := client.GetRegexMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRegexMatchSet -func (c *WAF) GetRegexMatchSetRequest(input *GetRegexMatchSetInput) (req *request.Request, output *GetRegexMatchSetOutput) { - op := &request.Operation{ - Name: opGetRegexMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRegexMatchSetInput{} - } - - output = &GetRegexMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRegexMatchSet API operation for AWS WAF. -// -// Returns the RegexMatchSet specified by RegexMatchSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetRegexMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRegexMatchSet -func (c *WAF) GetRegexMatchSet(input *GetRegexMatchSetInput) (*GetRegexMatchSetOutput, error) { - req, out := c.GetRegexMatchSetRequest(input) - return out, req.Send() -} - -// GetRegexMatchSetWithContext is the same as GetRegexMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetRegexMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetRegexMatchSetWithContext(ctx aws.Context, input *GetRegexMatchSetInput, opts ...request.Option) (*GetRegexMatchSetOutput, error) { - req, out := c.GetRegexMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRegexPatternSet = "GetRegexPatternSet" - -// GetRegexPatternSetRequest generates a "aws/request.Request" representing the -// client's request for the GetRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRegexPatternSet for more information on using the GetRegexPatternSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRegexPatternSetRequest method. -// req, resp := client.GetRegexPatternSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRegexPatternSet -func (c *WAF) GetRegexPatternSetRequest(input *GetRegexPatternSetInput) (req *request.Request, output *GetRegexPatternSetOutput) { - op := &request.Operation{ - Name: opGetRegexPatternSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRegexPatternSetInput{} - } - - output = &GetRegexPatternSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRegexPatternSet API operation for AWS WAF. -// -// Returns the RegexPatternSet specified by RegexPatternSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetRegexPatternSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRegexPatternSet -func (c *WAF) GetRegexPatternSet(input *GetRegexPatternSetInput) (*GetRegexPatternSetOutput, error) { - req, out := c.GetRegexPatternSetRequest(input) - return out, req.Send() -} - -// GetRegexPatternSetWithContext is the same as GetRegexPatternSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetRegexPatternSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetRegexPatternSetWithContext(ctx aws.Context, input *GetRegexPatternSetInput, opts ...request.Option) (*GetRegexPatternSetOutput, error) { - req, out := c.GetRegexPatternSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRule = "GetRule" - -// GetRuleRequest generates a "aws/request.Request" representing the -// client's request for the GetRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRule for more information on using the GetRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRuleRequest method. -// req, resp := client.GetRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRule -func (c *WAF) GetRuleRequest(input *GetRuleInput) (req *request.Request, output *GetRuleOutput) { - op := &request.Operation{ - Name: opGetRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRuleInput{} - } - - output = &GetRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRule API operation for AWS WAF. -// -// Returns the Rule that is specified by the RuleId that you included in the -// GetRule request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRule -func (c *WAF) GetRule(input *GetRuleInput) (*GetRuleOutput, error) { - req, out := c.GetRuleRequest(input) - return out, req.Send() -} - -// GetRuleWithContext is the same as GetRule with the addition of -// the ability to pass a context and additional request options. -// -// See GetRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetRuleWithContext(ctx aws.Context, input *GetRuleInput, opts ...request.Option) (*GetRuleOutput, error) { - req, out := c.GetRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRuleGroup = "GetRuleGroup" - -// GetRuleGroupRequest generates a "aws/request.Request" representing the -// client's request for the GetRuleGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRuleGroup for more information on using the GetRuleGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRuleGroupRequest method. -// req, resp := client.GetRuleGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRuleGroup -func (c *WAF) GetRuleGroupRequest(input *GetRuleGroupInput) (req *request.Request, output *GetRuleGroupOutput) { - op := &request.Operation{ - Name: opGetRuleGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRuleGroupInput{} - } - - output = &GetRuleGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRuleGroup API operation for AWS WAF. -// -// Returns the RuleGroup that is specified by the RuleGroupId that you included -// in the GetRuleGroup request. -// -// To view the rules in a rule group, use ListActivatedRulesInRuleGroup. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetRuleGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRuleGroup -func (c *WAF) GetRuleGroup(input *GetRuleGroupInput) (*GetRuleGroupOutput, error) { - req, out := c.GetRuleGroupRequest(input) - return out, req.Send() -} - -// GetRuleGroupWithContext is the same as GetRuleGroup with the addition of -// the ability to pass a context and additional request options. -// -// See GetRuleGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetRuleGroupWithContext(ctx aws.Context, input *GetRuleGroupInput, opts ...request.Option) (*GetRuleGroupOutput, error) { - req, out := c.GetRuleGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSampledRequests = "GetSampledRequests" - -// GetSampledRequestsRequest generates a "aws/request.Request" representing the -// client's request for the GetSampledRequests operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSampledRequests for more information on using the GetSampledRequests -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSampledRequestsRequest method. -// req, resp := client.GetSampledRequestsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetSampledRequests -func (c *WAF) GetSampledRequestsRequest(input *GetSampledRequestsInput) (req *request.Request, output *GetSampledRequestsOutput) { - op := &request.Operation{ - Name: opGetSampledRequests, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSampledRequestsInput{} - } - - output = &GetSampledRequestsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSampledRequests API operation for AWS WAF. -// -// Gets detailed information about a specified number of requests--a sample--that -// AWS WAF randomly selects from among the first 5,000 requests that your AWS -// resource received during a time range that you choose. You can specify a -// sample size of up to 500 requests, and you can specify any time range in -// the previous three hours. -// -// GetSampledRequests returns a time range, which is usually the time range -// that you specified. However, if your resource (such as a CloudFront distribution) -// received 5,000 requests before the specified time range elapsed, GetSampledRequests -// returns an updated time range. This new time range indicates the actual period -// during which AWS WAF selected the requests in the sample. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetSampledRequests for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetSampledRequests -func (c *WAF) GetSampledRequests(input *GetSampledRequestsInput) (*GetSampledRequestsOutput, error) { - req, out := c.GetSampledRequestsRequest(input) - return out, req.Send() -} - -// GetSampledRequestsWithContext is the same as GetSampledRequests with the addition of -// the ability to pass a context and additional request options. -// -// See GetSampledRequests for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetSampledRequestsWithContext(ctx aws.Context, input *GetSampledRequestsInput, opts ...request.Option) (*GetSampledRequestsOutput, error) { - req, out := c.GetSampledRequestsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSizeConstraintSet = "GetSizeConstraintSet" - -// GetSizeConstraintSetRequest generates a "aws/request.Request" representing the -// client's request for the GetSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSizeConstraintSet for more information on using the GetSizeConstraintSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSizeConstraintSetRequest method. -// req, resp := client.GetSizeConstraintSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetSizeConstraintSet -func (c *WAF) GetSizeConstraintSetRequest(input *GetSizeConstraintSetInput) (req *request.Request, output *GetSizeConstraintSetOutput) { - op := &request.Operation{ - Name: opGetSizeConstraintSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSizeConstraintSetInput{} - } - - output = &GetSizeConstraintSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSizeConstraintSet API operation for AWS WAF. -// -// Returns the SizeConstraintSet specified by SizeConstraintSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetSizeConstraintSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetSizeConstraintSet -func (c *WAF) GetSizeConstraintSet(input *GetSizeConstraintSetInput) (*GetSizeConstraintSetOutput, error) { - req, out := c.GetSizeConstraintSetRequest(input) - return out, req.Send() -} - -// GetSizeConstraintSetWithContext is the same as GetSizeConstraintSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetSizeConstraintSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetSizeConstraintSetWithContext(ctx aws.Context, input *GetSizeConstraintSetInput, opts ...request.Option) (*GetSizeConstraintSetOutput, error) { - req, out := c.GetSizeConstraintSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSqlInjectionMatchSet = "GetSqlInjectionMatchSet" - -// GetSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the GetSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSqlInjectionMatchSet for more information on using the GetSqlInjectionMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSqlInjectionMatchSetRequest method. -// req, resp := client.GetSqlInjectionMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetSqlInjectionMatchSet -func (c *WAF) GetSqlInjectionMatchSetRequest(input *GetSqlInjectionMatchSetInput) (req *request.Request, output *GetSqlInjectionMatchSetOutput) { - op := &request.Operation{ - Name: opGetSqlInjectionMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSqlInjectionMatchSetInput{} - } - - output = &GetSqlInjectionMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSqlInjectionMatchSet API operation for AWS WAF. -// -// Returns the SqlInjectionMatchSet that is specified by SqlInjectionMatchSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetSqlInjectionMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetSqlInjectionMatchSet -func (c *WAF) GetSqlInjectionMatchSet(input *GetSqlInjectionMatchSetInput) (*GetSqlInjectionMatchSetOutput, error) { - req, out := c.GetSqlInjectionMatchSetRequest(input) - return out, req.Send() -} - -// GetSqlInjectionMatchSetWithContext is the same as GetSqlInjectionMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetSqlInjectionMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetSqlInjectionMatchSetWithContext(ctx aws.Context, input *GetSqlInjectionMatchSetInput, opts ...request.Option) (*GetSqlInjectionMatchSetOutput, error) { - req, out := c.GetSqlInjectionMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetWebACL = "GetWebACL" - -// GetWebACLRequest generates a "aws/request.Request" representing the -// client's request for the GetWebACL operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetWebACL for more information on using the GetWebACL -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetWebACLRequest method. -// req, resp := client.GetWebACLRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetWebACL -func (c *WAF) GetWebACLRequest(input *GetWebACLInput) (req *request.Request, output *GetWebACLOutput) { - op := &request.Operation{ - Name: opGetWebACL, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetWebACLInput{} - } - - output = &GetWebACLOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetWebACL API operation for AWS WAF. -// -// Returns the WebACL that is specified by WebACLId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetWebACL for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetWebACL -func (c *WAF) GetWebACL(input *GetWebACLInput) (*GetWebACLOutput, error) { - req, out := c.GetWebACLRequest(input) - return out, req.Send() -} - -// GetWebACLWithContext is the same as GetWebACL with the addition of -// the ability to pass a context and additional request options. -// -// See GetWebACL for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetWebACLWithContext(ctx aws.Context, input *GetWebACLInput, opts ...request.Option) (*GetWebACLOutput, error) { - req, out := c.GetWebACLRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetXssMatchSet = "GetXssMatchSet" - -// GetXssMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the GetXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetXssMatchSet for more information on using the GetXssMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetXssMatchSetRequest method. -// req, resp := client.GetXssMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetXssMatchSet -func (c *WAF) GetXssMatchSetRequest(input *GetXssMatchSetInput) (req *request.Request, output *GetXssMatchSetOutput) { - op := &request.Operation{ - Name: opGetXssMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetXssMatchSetInput{} - } - - output = &GetXssMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetXssMatchSet API operation for AWS WAF. -// -// Returns the XssMatchSet that is specified by XssMatchSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation GetXssMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetXssMatchSet -func (c *WAF) GetXssMatchSet(input *GetXssMatchSetInput) (*GetXssMatchSetOutput, error) { - req, out := c.GetXssMatchSetRequest(input) - return out, req.Send() -} - -// GetXssMatchSetWithContext is the same as GetXssMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetXssMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) GetXssMatchSetWithContext(ctx aws.Context, input *GetXssMatchSetInput, opts ...request.Option) (*GetXssMatchSetOutput, error) { - req, out := c.GetXssMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListActivatedRulesInRuleGroup = "ListActivatedRulesInRuleGroup" - -// ListActivatedRulesInRuleGroupRequest generates a "aws/request.Request" representing the -// client's request for the ListActivatedRulesInRuleGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListActivatedRulesInRuleGroup for more information on using the ListActivatedRulesInRuleGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListActivatedRulesInRuleGroupRequest method. -// req, resp := client.ListActivatedRulesInRuleGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListActivatedRulesInRuleGroup -func (c *WAF) ListActivatedRulesInRuleGroupRequest(input *ListActivatedRulesInRuleGroupInput) (req *request.Request, output *ListActivatedRulesInRuleGroupOutput) { - op := &request.Operation{ - Name: opListActivatedRulesInRuleGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListActivatedRulesInRuleGroupInput{} - } - - output = &ListActivatedRulesInRuleGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListActivatedRulesInRuleGroup API operation for AWS WAF. -// -// Returns an array of ActivatedRule objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListActivatedRulesInRuleGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListActivatedRulesInRuleGroup -func (c *WAF) ListActivatedRulesInRuleGroup(input *ListActivatedRulesInRuleGroupInput) (*ListActivatedRulesInRuleGroupOutput, error) { - req, out := c.ListActivatedRulesInRuleGroupRequest(input) - return out, req.Send() -} - -// ListActivatedRulesInRuleGroupWithContext is the same as ListActivatedRulesInRuleGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ListActivatedRulesInRuleGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListActivatedRulesInRuleGroupWithContext(ctx aws.Context, input *ListActivatedRulesInRuleGroupInput, opts ...request.Option) (*ListActivatedRulesInRuleGroupOutput, error) { - req, out := c.ListActivatedRulesInRuleGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListByteMatchSets = "ListByteMatchSets" - -// ListByteMatchSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListByteMatchSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListByteMatchSets for more information on using the ListByteMatchSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListByteMatchSetsRequest method. -// req, resp := client.ListByteMatchSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListByteMatchSets -func (c *WAF) ListByteMatchSetsRequest(input *ListByteMatchSetsInput) (req *request.Request, output *ListByteMatchSetsOutput) { - op := &request.Operation{ - Name: opListByteMatchSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListByteMatchSetsInput{} - } - - output = &ListByteMatchSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListByteMatchSets API operation for AWS WAF. -// -// Returns an array of ByteMatchSetSummary objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListByteMatchSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListByteMatchSets -func (c *WAF) ListByteMatchSets(input *ListByteMatchSetsInput) (*ListByteMatchSetsOutput, error) { - req, out := c.ListByteMatchSetsRequest(input) - return out, req.Send() -} - -// ListByteMatchSetsWithContext is the same as ListByteMatchSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListByteMatchSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListByteMatchSetsWithContext(ctx aws.Context, input *ListByteMatchSetsInput, opts ...request.Option) (*ListByteMatchSetsOutput, error) { - req, out := c.ListByteMatchSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListGeoMatchSets = "ListGeoMatchSets" - -// ListGeoMatchSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListGeoMatchSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListGeoMatchSets for more information on using the ListGeoMatchSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListGeoMatchSetsRequest method. -// req, resp := client.ListGeoMatchSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListGeoMatchSets -func (c *WAF) ListGeoMatchSetsRequest(input *ListGeoMatchSetsInput) (req *request.Request, output *ListGeoMatchSetsOutput) { - op := &request.Operation{ - Name: opListGeoMatchSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListGeoMatchSetsInput{} - } - - output = &ListGeoMatchSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGeoMatchSets API operation for AWS WAF. -// -// Returns an array of GeoMatchSetSummary objects in the response. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListGeoMatchSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListGeoMatchSets -func (c *WAF) ListGeoMatchSets(input *ListGeoMatchSetsInput) (*ListGeoMatchSetsOutput, error) { - req, out := c.ListGeoMatchSetsRequest(input) - return out, req.Send() -} - -// ListGeoMatchSetsWithContext is the same as ListGeoMatchSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListGeoMatchSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListGeoMatchSetsWithContext(ctx aws.Context, input *ListGeoMatchSetsInput, opts ...request.Option) (*ListGeoMatchSetsOutput, error) { - req, out := c.ListGeoMatchSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListIPSets = "ListIPSets" - -// ListIPSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListIPSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListIPSets for more information on using the ListIPSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListIPSetsRequest method. -// req, resp := client.ListIPSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListIPSets -func (c *WAF) ListIPSetsRequest(input *ListIPSetsInput) (req *request.Request, output *ListIPSetsOutput) { - op := &request.Operation{ - Name: opListIPSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListIPSetsInput{} - } - - output = &ListIPSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListIPSets API operation for AWS WAF. -// -// Returns an array of IPSetSummary objects in the response. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListIPSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListIPSets -func (c *WAF) ListIPSets(input *ListIPSetsInput) (*ListIPSetsOutput, error) { - req, out := c.ListIPSetsRequest(input) - return out, req.Send() -} - -// ListIPSetsWithContext is the same as ListIPSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListIPSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListIPSetsWithContext(ctx aws.Context, input *ListIPSetsInput, opts ...request.Option) (*ListIPSetsOutput, error) { - req, out := c.ListIPSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListLoggingConfigurations = "ListLoggingConfigurations" - -// ListLoggingConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the ListLoggingConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListLoggingConfigurations for more information on using the ListLoggingConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListLoggingConfigurationsRequest method. -// req, resp := client.ListLoggingConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListLoggingConfigurations -func (c *WAF) ListLoggingConfigurationsRequest(input *ListLoggingConfigurationsInput) (req *request.Request, output *ListLoggingConfigurationsOutput) { - op := &request.Operation{ - Name: opListLoggingConfigurations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListLoggingConfigurationsInput{} - } - - output = &ListLoggingConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListLoggingConfigurations API operation for AWS WAF. -// -// Returns an array of LoggingConfiguration objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListLoggingConfigurations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListLoggingConfigurations -func (c *WAF) ListLoggingConfigurations(input *ListLoggingConfigurationsInput) (*ListLoggingConfigurationsOutput, error) { - req, out := c.ListLoggingConfigurationsRequest(input) - return out, req.Send() -} - -// ListLoggingConfigurationsWithContext is the same as ListLoggingConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See ListLoggingConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListLoggingConfigurationsWithContext(ctx aws.Context, input *ListLoggingConfigurationsInput, opts ...request.Option) (*ListLoggingConfigurationsOutput, error) { - req, out := c.ListLoggingConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRateBasedRules = "ListRateBasedRules" - -// ListRateBasedRulesRequest generates a "aws/request.Request" representing the -// client's request for the ListRateBasedRules operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRateBasedRules for more information on using the ListRateBasedRules -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRateBasedRulesRequest method. -// req, resp := client.ListRateBasedRulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRateBasedRules -func (c *WAF) ListRateBasedRulesRequest(input *ListRateBasedRulesInput) (req *request.Request, output *ListRateBasedRulesOutput) { - op := &request.Operation{ - Name: opListRateBasedRules, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListRateBasedRulesInput{} - } - - output = &ListRateBasedRulesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRateBasedRules API operation for AWS WAF. -// -// Returns an array of RuleSummary objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListRateBasedRules for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRateBasedRules -func (c *WAF) ListRateBasedRules(input *ListRateBasedRulesInput) (*ListRateBasedRulesOutput, error) { - req, out := c.ListRateBasedRulesRequest(input) - return out, req.Send() -} - -// ListRateBasedRulesWithContext is the same as ListRateBasedRules with the addition of -// the ability to pass a context and additional request options. -// -// See ListRateBasedRules for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListRateBasedRulesWithContext(ctx aws.Context, input *ListRateBasedRulesInput, opts ...request.Option) (*ListRateBasedRulesOutput, error) { - req, out := c.ListRateBasedRulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRegexMatchSets = "ListRegexMatchSets" - -// ListRegexMatchSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListRegexMatchSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRegexMatchSets for more information on using the ListRegexMatchSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRegexMatchSetsRequest method. -// req, resp := client.ListRegexMatchSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRegexMatchSets -func (c *WAF) ListRegexMatchSetsRequest(input *ListRegexMatchSetsInput) (req *request.Request, output *ListRegexMatchSetsOutput) { - op := &request.Operation{ - Name: opListRegexMatchSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListRegexMatchSetsInput{} - } - - output = &ListRegexMatchSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRegexMatchSets API operation for AWS WAF. -// -// Returns an array of RegexMatchSetSummary objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListRegexMatchSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRegexMatchSets -func (c *WAF) ListRegexMatchSets(input *ListRegexMatchSetsInput) (*ListRegexMatchSetsOutput, error) { - req, out := c.ListRegexMatchSetsRequest(input) - return out, req.Send() -} - -// ListRegexMatchSetsWithContext is the same as ListRegexMatchSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListRegexMatchSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListRegexMatchSetsWithContext(ctx aws.Context, input *ListRegexMatchSetsInput, opts ...request.Option) (*ListRegexMatchSetsOutput, error) { - req, out := c.ListRegexMatchSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRegexPatternSets = "ListRegexPatternSets" - -// ListRegexPatternSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListRegexPatternSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRegexPatternSets for more information on using the ListRegexPatternSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRegexPatternSetsRequest method. -// req, resp := client.ListRegexPatternSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRegexPatternSets -func (c *WAF) ListRegexPatternSetsRequest(input *ListRegexPatternSetsInput) (req *request.Request, output *ListRegexPatternSetsOutput) { - op := &request.Operation{ - Name: opListRegexPatternSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListRegexPatternSetsInput{} - } - - output = &ListRegexPatternSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRegexPatternSets API operation for AWS WAF. -// -// Returns an array of RegexPatternSetSummary objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListRegexPatternSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRegexPatternSets -func (c *WAF) ListRegexPatternSets(input *ListRegexPatternSetsInput) (*ListRegexPatternSetsOutput, error) { - req, out := c.ListRegexPatternSetsRequest(input) - return out, req.Send() -} - -// ListRegexPatternSetsWithContext is the same as ListRegexPatternSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListRegexPatternSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListRegexPatternSetsWithContext(ctx aws.Context, input *ListRegexPatternSetsInput, opts ...request.Option) (*ListRegexPatternSetsOutput, error) { - req, out := c.ListRegexPatternSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRuleGroups = "ListRuleGroups" - -// ListRuleGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ListRuleGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRuleGroups for more information on using the ListRuleGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRuleGroupsRequest method. -// req, resp := client.ListRuleGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRuleGroups -func (c *WAF) ListRuleGroupsRequest(input *ListRuleGroupsInput) (req *request.Request, output *ListRuleGroupsOutput) { - op := &request.Operation{ - Name: opListRuleGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListRuleGroupsInput{} - } - - output = &ListRuleGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRuleGroups API operation for AWS WAF. -// -// Returns an array of RuleGroup objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListRuleGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRuleGroups -func (c *WAF) ListRuleGroups(input *ListRuleGroupsInput) (*ListRuleGroupsOutput, error) { - req, out := c.ListRuleGroupsRequest(input) - return out, req.Send() -} - -// ListRuleGroupsWithContext is the same as ListRuleGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ListRuleGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListRuleGroupsWithContext(ctx aws.Context, input *ListRuleGroupsInput, opts ...request.Option) (*ListRuleGroupsOutput, error) { - req, out := c.ListRuleGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRules = "ListRules" - -// ListRulesRequest generates a "aws/request.Request" representing the -// client's request for the ListRules operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRules for more information on using the ListRules -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRulesRequest method. -// req, resp := client.ListRulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRules -func (c *WAF) ListRulesRequest(input *ListRulesInput) (req *request.Request, output *ListRulesOutput) { - op := &request.Operation{ - Name: opListRules, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListRulesInput{} - } - - output = &ListRulesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRules API operation for AWS WAF. -// -// Returns an array of RuleSummary objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListRules for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRules -func (c *WAF) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { - req, out := c.ListRulesRequest(input) - return out, req.Send() -} - -// ListRulesWithContext is the same as ListRules with the addition of -// the ability to pass a context and additional request options. -// -// See ListRules for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListRulesWithContext(ctx aws.Context, input *ListRulesInput, opts ...request.Option) (*ListRulesOutput, error) { - req, out := c.ListRulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSizeConstraintSets = "ListSizeConstraintSets" - -// ListSizeConstraintSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListSizeConstraintSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSizeConstraintSets for more information on using the ListSizeConstraintSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSizeConstraintSetsRequest method. -// req, resp := client.ListSizeConstraintSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListSizeConstraintSets -func (c *WAF) ListSizeConstraintSetsRequest(input *ListSizeConstraintSetsInput) (req *request.Request, output *ListSizeConstraintSetsOutput) { - op := &request.Operation{ - Name: opListSizeConstraintSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListSizeConstraintSetsInput{} - } - - output = &ListSizeConstraintSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSizeConstraintSets API operation for AWS WAF. -// -// Returns an array of SizeConstraintSetSummary objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListSizeConstraintSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListSizeConstraintSets -func (c *WAF) ListSizeConstraintSets(input *ListSizeConstraintSetsInput) (*ListSizeConstraintSetsOutput, error) { - req, out := c.ListSizeConstraintSetsRequest(input) - return out, req.Send() -} - -// ListSizeConstraintSetsWithContext is the same as ListSizeConstraintSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListSizeConstraintSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListSizeConstraintSetsWithContext(ctx aws.Context, input *ListSizeConstraintSetsInput, opts ...request.Option) (*ListSizeConstraintSetsOutput, error) { - req, out := c.ListSizeConstraintSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSqlInjectionMatchSets = "ListSqlInjectionMatchSets" - -// ListSqlInjectionMatchSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListSqlInjectionMatchSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSqlInjectionMatchSets for more information on using the ListSqlInjectionMatchSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSqlInjectionMatchSetsRequest method. -// req, resp := client.ListSqlInjectionMatchSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListSqlInjectionMatchSets -func (c *WAF) ListSqlInjectionMatchSetsRequest(input *ListSqlInjectionMatchSetsInput) (req *request.Request, output *ListSqlInjectionMatchSetsOutput) { - op := &request.Operation{ - Name: opListSqlInjectionMatchSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListSqlInjectionMatchSetsInput{} - } - - output = &ListSqlInjectionMatchSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSqlInjectionMatchSets API operation for AWS WAF. -// -// Returns an array of SqlInjectionMatchSet objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListSqlInjectionMatchSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListSqlInjectionMatchSets -func (c *WAF) ListSqlInjectionMatchSets(input *ListSqlInjectionMatchSetsInput) (*ListSqlInjectionMatchSetsOutput, error) { - req, out := c.ListSqlInjectionMatchSetsRequest(input) - return out, req.Send() -} - -// ListSqlInjectionMatchSetsWithContext is the same as ListSqlInjectionMatchSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListSqlInjectionMatchSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListSqlInjectionMatchSetsWithContext(ctx aws.Context, input *ListSqlInjectionMatchSetsInput, opts ...request.Option) (*ListSqlInjectionMatchSetsOutput, error) { - req, out := c.ListSqlInjectionMatchSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSubscribedRuleGroups = "ListSubscribedRuleGroups" - -// ListSubscribedRuleGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ListSubscribedRuleGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSubscribedRuleGroups for more information on using the ListSubscribedRuleGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSubscribedRuleGroupsRequest method. -// req, resp := client.ListSubscribedRuleGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListSubscribedRuleGroups -func (c *WAF) ListSubscribedRuleGroupsRequest(input *ListSubscribedRuleGroupsInput) (req *request.Request, output *ListSubscribedRuleGroupsOutput) { - op := &request.Operation{ - Name: opListSubscribedRuleGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListSubscribedRuleGroupsInput{} - } - - output = &ListSubscribedRuleGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSubscribedRuleGroups API operation for AWS WAF. -// -// Returns an array of RuleGroup objects that you are subscribed to. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListSubscribedRuleGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListSubscribedRuleGroups -func (c *WAF) ListSubscribedRuleGroups(input *ListSubscribedRuleGroupsInput) (*ListSubscribedRuleGroupsOutput, error) { - req, out := c.ListSubscribedRuleGroupsRequest(input) - return out, req.Send() -} - -// ListSubscribedRuleGroupsWithContext is the same as ListSubscribedRuleGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ListSubscribedRuleGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListSubscribedRuleGroupsWithContext(ctx aws.Context, input *ListSubscribedRuleGroupsInput, opts ...request.Option) (*ListSubscribedRuleGroupsOutput, error) { - req, out := c.ListSubscribedRuleGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListWebACLs = "ListWebACLs" - -// ListWebACLsRequest generates a "aws/request.Request" representing the -// client's request for the ListWebACLs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListWebACLs for more information on using the ListWebACLs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListWebACLsRequest method. -// req, resp := client.ListWebACLsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListWebACLs -func (c *WAF) ListWebACLsRequest(input *ListWebACLsInput) (req *request.Request, output *ListWebACLsOutput) { - op := &request.Operation{ - Name: opListWebACLs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListWebACLsInput{} - } - - output = &ListWebACLsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListWebACLs API operation for AWS WAF. -// -// Returns an array of WebACLSummary objects in the response. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListWebACLs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListWebACLs -func (c *WAF) ListWebACLs(input *ListWebACLsInput) (*ListWebACLsOutput, error) { - req, out := c.ListWebACLsRequest(input) - return out, req.Send() -} - -// ListWebACLsWithContext is the same as ListWebACLs with the addition of -// the ability to pass a context and additional request options. -// -// See ListWebACLs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListWebACLsWithContext(ctx aws.Context, input *ListWebACLsInput, opts ...request.Option) (*ListWebACLsOutput, error) { - req, out := c.ListWebACLsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListXssMatchSets = "ListXssMatchSets" - -// ListXssMatchSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListXssMatchSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListXssMatchSets for more information on using the ListXssMatchSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListXssMatchSetsRequest method. -// req, resp := client.ListXssMatchSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListXssMatchSets -func (c *WAF) ListXssMatchSetsRequest(input *ListXssMatchSetsInput) (req *request.Request, output *ListXssMatchSetsOutput) { - op := &request.Operation{ - Name: opListXssMatchSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListXssMatchSetsInput{} - } - - output = &ListXssMatchSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListXssMatchSets API operation for AWS WAF. -// -// Returns an array of XssMatchSet objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation ListXssMatchSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListXssMatchSets -func (c *WAF) ListXssMatchSets(input *ListXssMatchSetsInput) (*ListXssMatchSetsOutput, error) { - req, out := c.ListXssMatchSetsRequest(input) - return out, req.Send() -} - -// ListXssMatchSetsWithContext is the same as ListXssMatchSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListXssMatchSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) ListXssMatchSetsWithContext(ctx aws.Context, input *ListXssMatchSetsInput, opts ...request.Option) (*ListXssMatchSetsOutput, error) { - req, out := c.ListXssMatchSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutLoggingConfiguration = "PutLoggingConfiguration" - -// PutLoggingConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the PutLoggingConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutLoggingConfiguration for more information on using the PutLoggingConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutLoggingConfigurationRequest method. -// req, resp := client.PutLoggingConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/PutLoggingConfiguration -func (c *WAF) PutLoggingConfigurationRequest(input *PutLoggingConfigurationInput) (req *request.Request, output *PutLoggingConfigurationOutput) { - op := &request.Operation{ - Name: opPutLoggingConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutLoggingConfigurationInput{} - } - - output = &PutLoggingConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutLoggingConfiguration API operation for AWS WAF. -// -// Associates a LoggingConfiguration with a specified web ACL. -// -// You can access information about all traffic that AWS WAF inspects using -// the following steps: -// -// Create an Amazon Kinesis Data Firehose . -// -// Associate that firehose to your web ACL using a PutLoggingConfiguration request. -// -// When you successfully enable logging using a PutLoggingConfiguration request, -// AWS WAF will create a service linked role with the necessary permissions -// to write logs to the Amazon Kinesis Data Firehose. For more information, -// see Logging Web ACL Traffic Information (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html) -// in the AWS WAF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation PutLoggingConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeServiceLinkedRoleErrorException "WAFServiceLinkedRoleErrorException" -// AWS WAF is not able to access the service linked role. This can be caused -// by a previous PutLoggingConfiguration request, which can lock the service -// linked role for about 20 seconds. Please try your request again. The service -// linked role can also be locked by a previous DeleteServiceLinkedRole request, -// which can lock the role for 15 minutes or more. If you recently made a DeleteServiceLinkedRole, -// wait at least 15 minutes and try the request again. If you receive this same -// exception again, you will have to wait additional time until the role is -// unlocked. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/PutLoggingConfiguration -func (c *WAF) PutLoggingConfiguration(input *PutLoggingConfigurationInput) (*PutLoggingConfigurationOutput, error) { - req, out := c.PutLoggingConfigurationRequest(input) - return out, req.Send() -} - -// PutLoggingConfigurationWithContext is the same as PutLoggingConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See PutLoggingConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) PutLoggingConfigurationWithContext(ctx aws.Context, input *PutLoggingConfigurationInput, opts ...request.Option) (*PutLoggingConfigurationOutput, error) { - req, out := c.PutLoggingConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutPermissionPolicy = "PutPermissionPolicy" - -// PutPermissionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutPermissionPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutPermissionPolicy for more information on using the PutPermissionPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutPermissionPolicyRequest method. -// req, resp := client.PutPermissionPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/PutPermissionPolicy -func (c *WAF) PutPermissionPolicyRequest(input *PutPermissionPolicyInput) (req *request.Request, output *PutPermissionPolicyOutput) { - op := &request.Operation{ - Name: opPutPermissionPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutPermissionPolicyInput{} - } - - output = &PutPermissionPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutPermissionPolicy API operation for AWS WAF. -// -// Attaches a IAM policy to the specified resource. The only supported use for -// this action is to share a RuleGroup across accounts. -// -// The PutPermissionPolicy is subject to the following restrictions: -// -// * You can attach only one policy with each PutPermissionPolicy request. -// -// * The policy must include an Effect, Action and Principal. -// -// * Effect must specify Allow. -// -// * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, -// waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard -// actions in the policy will be rejected. -// -// * The policy cannot include a Resource parameter. -// -// * The ARN in the request must be a valid WAF RuleGroup ARN and the RuleGroup -// must exist in the same region. -// -// * The user making the request must be the owner of the RuleGroup. -// -// * Your policy must be composed using IAM Policy version 2012-10-17. -// -// For more information, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html). -// -// An example of a valid policy parameter is shown in the Examples section below. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation PutPermissionPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeInvalidPermissionPolicyException "WAFInvalidPermissionPolicyException" -// The operation failed because the specified policy is not in the proper format. -// -// The policy is subject to the following restrictions: -// -// * You can attach only one policy with each PutPermissionPolicy request. -// -// * The policy must include an Effect, Action and Principal. -// -// * Effect must specify Allow. -// -// * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, -// waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard -// actions in the policy will be rejected. -// -// * The policy cannot include a Resource parameter. -// -// * The ARN in the request must be a valid WAF RuleGroup ARN and the RuleGroup -// must exist in the same region. -// -// * The user making the request must be the owner of the RuleGroup. -// -// * Your policy must be composed using IAM Policy version 2012-10-17. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/PutPermissionPolicy -func (c *WAF) PutPermissionPolicy(input *PutPermissionPolicyInput) (*PutPermissionPolicyOutput, error) { - req, out := c.PutPermissionPolicyRequest(input) - return out, req.Send() -} - -// PutPermissionPolicyWithContext is the same as PutPermissionPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutPermissionPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) PutPermissionPolicyWithContext(ctx aws.Context, input *PutPermissionPolicyInput, opts ...request.Option) (*PutPermissionPolicyOutput, error) { - req, out := c.PutPermissionPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateByteMatchSet = "UpdateByteMatchSet" - -// UpdateByteMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateByteMatchSet for more information on using the UpdateByteMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateByteMatchSetRequest method. -// req, resp := client.UpdateByteMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateByteMatchSet -func (c *WAF) UpdateByteMatchSetRequest(input *UpdateByteMatchSetInput) (req *request.Request, output *UpdateByteMatchSetOutput) { - op := &request.Operation{ - Name: opUpdateByteMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateByteMatchSetInput{} - } - - output = &UpdateByteMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateByteMatchSet API operation for AWS WAF. -// -// Inserts or deletes ByteMatchTuple objects (filters) in a ByteMatchSet. For -// each ByteMatchTuple object, you specify the following values: -// -// * Whether to insert or delete the object from the array. If you want to -// change a ByteMatchSetUpdate object, you delete the existing object and -// add a new one. -// -// * The part of a web request that you want AWS WAF to inspect, such as -// a query string or the value of the User-Agent header. -// -// * The bytes (typically a string that corresponds with ASCII characters) -// that you want AWS WAF to look for. For more information, including how -// you specify the values for the AWS WAF API and the AWS CLI or SDKs, see -// TargetString in the ByteMatchTuple data type. -// -// * Where to look, such as at the beginning or the end of a query string. -// -// * Whether to perform any conversions on the request, such as converting -// it to lowercase, before inspecting it for the specified string. -// -// For example, you can add a ByteMatchSetUpdate object that matches web requests -// in which User-Agent headers contain the string BadBot. You can then configure -// AWS WAF to block those requests. -// -// To create and configure a ByteMatchSet, perform the following steps: -// -// Create a ByteMatchSet. For more information, see CreateByteMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateByteMatchSet request. -// -// Submit an UpdateByteMatchSet request to specify the part of the request that -// you want AWS WAF to inspect (for example, the header or the URI) and the -// value that you want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation UpdateByteMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateByteMatchSet -func (c *WAF) UpdateByteMatchSet(input *UpdateByteMatchSetInput) (*UpdateByteMatchSetOutput, error) { - req, out := c.UpdateByteMatchSetRequest(input) - return out, req.Send() -} - -// UpdateByteMatchSetWithContext is the same as UpdateByteMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateByteMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) UpdateByteMatchSetWithContext(ctx aws.Context, input *UpdateByteMatchSetInput, opts ...request.Option) (*UpdateByteMatchSetOutput, error) { - req, out := c.UpdateByteMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateGeoMatchSet = "UpdateGeoMatchSet" - -// UpdateGeoMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateGeoMatchSet for more information on using the UpdateGeoMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateGeoMatchSetRequest method. -// req, resp := client.UpdateGeoMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateGeoMatchSet -func (c *WAF) UpdateGeoMatchSetRequest(input *UpdateGeoMatchSetInput) (req *request.Request, output *UpdateGeoMatchSetOutput) { - op := &request.Operation{ - Name: opUpdateGeoMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateGeoMatchSetInput{} - } - - output = &UpdateGeoMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateGeoMatchSet API operation for AWS WAF. -// -// Inserts or deletes GeoMatchConstraint objects in an GeoMatchSet. For each -// GeoMatchConstraint object, you specify the following values: -// -// * Whether to insert or delete the object from the array. If you want to -// change an GeoMatchConstraint object, you delete the existing object and -// add a new one. -// -// * The Type. The only valid value for Type is Country. -// -// * The Value, which is a two character code for the country to add to the -// GeoMatchConstraint object. Valid codes are listed in GeoMatchConstraint$Value. -// -// To create and configure an GeoMatchSet, perform the following steps: -// -// Submit a CreateGeoMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateGeoMatchSet request. -// -// Submit an UpdateGeoMatchSet request to specify the country that you want -// AWS WAF to watch for. -// -// When you update an GeoMatchSet, you specify the country that you want to -// add and/or the country that you want to delete. If you want to change a country, -// you delete the existing country and add the new one. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation UpdateGeoMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateGeoMatchSet -func (c *WAF) UpdateGeoMatchSet(input *UpdateGeoMatchSetInput) (*UpdateGeoMatchSetOutput, error) { - req, out := c.UpdateGeoMatchSetRequest(input) - return out, req.Send() -} - -// UpdateGeoMatchSetWithContext is the same as UpdateGeoMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateGeoMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) UpdateGeoMatchSetWithContext(ctx aws.Context, input *UpdateGeoMatchSetInput, opts ...request.Option) (*UpdateGeoMatchSetOutput, error) { - req, out := c.UpdateGeoMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateIPSet = "UpdateIPSet" - -// UpdateIPSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateIPSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateIPSet for more information on using the UpdateIPSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateIPSetRequest method. -// req, resp := client.UpdateIPSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateIPSet -func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, output *UpdateIPSetOutput) { - op := &request.Operation{ - Name: opUpdateIPSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateIPSetInput{} - } - - output = &UpdateIPSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateIPSet API operation for AWS WAF. -// -// Inserts or deletes IPSetDescriptor objects in an IPSet. For each IPSetDescriptor -// object, you specify the following values: -// -// * Whether to insert or delete the object from the array. If you want to -// change an IPSetDescriptor object, you delete the existing object and add -// a new one. -// -// * The IP address version, IPv4 or IPv6. -// -// * The IP address in CIDR notation, for example, 192.0.2.0/24 (for the -// range of IP addresses from 192.0.2.0 to 192.0.2.255) or 192.0.2.44/32 -// (for the individual IP address 192.0.2.44). -// -// AWS WAF supports IPv4 address ranges: /8 and any range between /16 through -// /32. AWS WAF supports IPv6 address ranges: /16, /24, /32, /48, /56, /64, -// and /128. For more information about CIDR notation, see the Wikipedia entry -// Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). -// -// IPv6 addresses can be represented using any of the following formats: -// -// * 1111:0000:0000:0000:0000:0000:0000:0111/128 -// -// * 1111:0:0:0:0:0:0:0111/128 -// -// * 1111::0111/128 -// -// * 1111::111/128 -// -// You use an IPSet to specify which web requests you want to allow or block -// based on the IP addresses that the requests originated from. For example, -// if you're receiving a lot of requests from one or a small number of IP addresses -// and you want to block the requests, you can create an IPSet that specifies -// those IP addresses, and then configure AWS WAF to block the requests. -// -// To create and configure an IPSet, perform the following steps: -// -// Submit a CreateIPSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateIPSet request. -// -// Submit an UpdateIPSet request to specify the IP addresses that you want AWS -// WAF to watch for. -// -// When you update an IPSet, you specify the IP addresses that you want to add -// and/or the IP addresses that you want to delete. If you want to change an -// IP address, you delete the existing IP address and add the new one. -// -// You can insert a maximum of 1000 addresses in a single request. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation UpdateIPSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateIPSet -func (c *WAF) UpdateIPSet(input *UpdateIPSetInput) (*UpdateIPSetOutput, error) { - req, out := c.UpdateIPSetRequest(input) - return out, req.Send() -} - -// UpdateIPSetWithContext is the same as UpdateIPSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateIPSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) UpdateIPSetWithContext(ctx aws.Context, input *UpdateIPSetInput, opts ...request.Option) (*UpdateIPSetOutput, error) { - req, out := c.UpdateIPSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRateBasedRule = "UpdateRateBasedRule" - -// UpdateRateBasedRuleRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRateBasedRule for more information on using the UpdateRateBasedRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRateBasedRuleRequest method. -// req, resp := client.UpdateRateBasedRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRateBasedRule -func (c *WAF) UpdateRateBasedRuleRequest(input *UpdateRateBasedRuleInput) (req *request.Request, output *UpdateRateBasedRuleOutput) { - op := &request.Operation{ - Name: opUpdateRateBasedRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRateBasedRuleInput{} - } - - output = &UpdateRateBasedRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRateBasedRule API operation for AWS WAF. -// -// Inserts or deletes Predicate objects in a rule and updates the RateLimit -// in the rule. -// -// Each Predicate object identifies a predicate, such as a ByteMatchSet or an -// IPSet, that specifies the web requests that you want to block or count. The -// RateLimit specifies the number of requests every five minutes that triggers -// the rule. -// -// If you add more than one predicate to a RateBasedRule, a request must match -// all the predicates and exceed the RateLimit to be counted or blocked. For -// example, suppose you add the following to a RateBasedRule: -// -// * An IPSet that matches the IP address 192.0.2.44/32 -// -// * A ByteMatchSet that matches BadBot in the User-Agent header -// -// Further, you specify a RateLimit of 15,000. -// -// You then add the RateBasedRule to a WebACL and specify that you want to block -// requests that satisfy the rule. For a request to be blocked, it must come -// from the IP address 192.0.2.44 and the User-Agent header in the request must -// contain the value BadBot. Further, requests that match these two conditions -// much be received at a rate of more than 15,000 every five minutes. If the -// rate drops below this limit, AWS WAF no longer blocks the requests. -// -// As a second example, suppose you want to limit requests to a particular page -// on your site. To do this, you could add the following to a RateBasedRule: -// -// * A ByteMatchSet with FieldToMatch of URI -// -// * A PositionalConstraint of STARTS_WITH -// -// * A TargetString of login -// -// Further, you specify a RateLimit of 15,000. -// -// By adding this RateBasedRule to a WebACL, you could limit requests to your -// login page without affecting the rest of your site. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation UpdateRateBasedRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRateBasedRule -func (c *WAF) UpdateRateBasedRule(input *UpdateRateBasedRuleInput) (*UpdateRateBasedRuleOutput, error) { - req, out := c.UpdateRateBasedRuleRequest(input) - return out, req.Send() -} - -// UpdateRateBasedRuleWithContext is the same as UpdateRateBasedRule with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRateBasedRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) UpdateRateBasedRuleWithContext(ctx aws.Context, input *UpdateRateBasedRuleInput, opts ...request.Option) (*UpdateRateBasedRuleOutput, error) { - req, out := c.UpdateRateBasedRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRegexMatchSet = "UpdateRegexMatchSet" - -// UpdateRegexMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRegexMatchSet for more information on using the UpdateRegexMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRegexMatchSetRequest method. -// req, resp := client.UpdateRegexMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRegexMatchSet -func (c *WAF) UpdateRegexMatchSetRequest(input *UpdateRegexMatchSetInput) (req *request.Request, output *UpdateRegexMatchSetOutput) { - op := &request.Operation{ - Name: opUpdateRegexMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRegexMatchSetInput{} - } - - output = &UpdateRegexMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRegexMatchSet API operation for AWS WAF. -// -// Inserts or deletes RegexMatchTuple objects (filters) in a RegexMatchSet. -// For each RegexMatchSetUpdate object, you specify the following values: -// -// * Whether to insert or delete the object from the array. If you want to -// change a RegexMatchSetUpdate object, you delete the existing object and -// add a new one. -// -// * The part of a web request that you want AWS WAF to inspectupdate, such -// as a query string or the value of the User-Agent header. -// -// * The identifier of the pattern (a regular expression) that you want AWS -// WAF to look for. For more information, see RegexPatternSet. -// -// * Whether to perform any conversions on the request, such as converting -// it to lowercase, before inspecting it for the specified string. -// -// For example, you can create a RegexPatternSet that matches any requests with -// User-Agent headers that contain the string B[a@]dB[o0]t. You can then configure -// AWS WAF to reject those requests. -// -// To create and configure a RegexMatchSet, perform the following steps: -// -// Create a RegexMatchSet. For more information, see CreateRegexMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRegexMatchSet request. -// -// Submit an UpdateRegexMatchSet request to specify the part of the request -// that you want AWS WAF to inspect (for example, the header or the URI) and -// the identifier of the RegexPatternSet that contain the regular expression -// patters you want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation UpdateRegexMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRegexMatchSet -func (c *WAF) UpdateRegexMatchSet(input *UpdateRegexMatchSetInput) (*UpdateRegexMatchSetOutput, error) { - req, out := c.UpdateRegexMatchSetRequest(input) - return out, req.Send() -} - -// UpdateRegexMatchSetWithContext is the same as UpdateRegexMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRegexMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) UpdateRegexMatchSetWithContext(ctx aws.Context, input *UpdateRegexMatchSetInput, opts ...request.Option) (*UpdateRegexMatchSetOutput, error) { - req, out := c.UpdateRegexMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRegexPatternSet = "UpdateRegexPatternSet" - -// UpdateRegexPatternSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRegexPatternSet for more information on using the UpdateRegexPatternSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRegexPatternSetRequest method. -// req, resp := client.UpdateRegexPatternSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRegexPatternSet -func (c *WAF) UpdateRegexPatternSetRequest(input *UpdateRegexPatternSetInput) (req *request.Request, output *UpdateRegexPatternSetOutput) { - op := &request.Operation{ - Name: opUpdateRegexPatternSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRegexPatternSetInput{} - } - - output = &UpdateRegexPatternSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRegexPatternSet API operation for AWS WAF. -// -// Inserts or deletes RegexPatternString objects in a RegexPatternSet. For each -// RegexPatternString object, you specify the following values: -// -// * Whether to insert or delete the RegexPatternString. -// -// * The regular expression pattern that you want to insert or delete. For -// more information, see RegexPatternSet. -// -// For example, you can create a RegexPatternString such as B[a@]dB[o0]t. AWS -// WAF will match this RegexPatternString to: -// -// * BadBot -// -// * BadB0t -// -// * B@dBot -// -// * B@dB0t -// -// To create and configure a RegexPatternSet, perform the following steps: -// -// Create a RegexPatternSet. For more information, see CreateRegexPatternSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRegexPatternSet request. -// -// Submit an UpdateRegexPatternSet request to specify the regular expression -// pattern that you want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation UpdateRegexPatternSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeInvalidRegexPatternException "WAFInvalidRegexPatternException" -// The regular expression (regex) you specified in RegexPatternString is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRegexPatternSet -func (c *WAF) UpdateRegexPatternSet(input *UpdateRegexPatternSetInput) (*UpdateRegexPatternSetOutput, error) { - req, out := c.UpdateRegexPatternSetRequest(input) - return out, req.Send() -} - -// UpdateRegexPatternSetWithContext is the same as UpdateRegexPatternSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRegexPatternSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) UpdateRegexPatternSetWithContext(ctx aws.Context, input *UpdateRegexPatternSetInput, opts ...request.Option) (*UpdateRegexPatternSetOutput, error) { - req, out := c.UpdateRegexPatternSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRule = "UpdateRule" - -// UpdateRuleRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRule for more information on using the UpdateRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRuleRequest method. -// req, resp := client.UpdateRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRule -func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, output *UpdateRuleOutput) { - op := &request.Operation{ - Name: opUpdateRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRuleInput{} - } - - output = &UpdateRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRule API operation for AWS WAF. -// -// Inserts or deletes Predicate objects in a Rule. Each Predicate object identifies -// a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests -// that you want to allow, block, or count. If you add more than one predicate -// to a Rule, a request must match all of the specifications to be allowed, -// blocked, or counted. For example, suppose that you add the following to a -// Rule: -// -// * A ByteMatchSet that matches the value BadBot in the User-Agent header -// -// * An IPSet that matches the IP address 192.0.2.44 -// -// You then add the Rule to a WebACL and specify that you want to block requests -// that satisfy the Rule. For a request to be blocked, the User-Agent header -// in the request must contain the value BadBotand the request must originate -// from the IP address 192.0.2.44. -// -// To create and configure a Rule, perform the following steps: -// -// Create and update the predicates that you want to include in the Rule. -// -// Create the Rule. See CreateRule. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRule request. -// -// Submit an UpdateRule request to add predicates to the Rule. -// -// Create and update a WebACL that contains the Rule. See CreateWebACL. -// -// If you want to replace one ByteMatchSet or IPSet with another, you delete -// the existing one and add the new one. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation UpdateRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRule -func (c *WAF) UpdateRule(input *UpdateRuleInput) (*UpdateRuleOutput, error) { - req, out := c.UpdateRuleRequest(input) - return out, req.Send() -} - -// UpdateRuleWithContext is the same as UpdateRule with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) UpdateRuleWithContext(ctx aws.Context, input *UpdateRuleInput, opts ...request.Option) (*UpdateRuleOutput, error) { - req, out := c.UpdateRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRuleGroup = "UpdateRuleGroup" - -// UpdateRuleGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRuleGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRuleGroup for more information on using the UpdateRuleGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRuleGroupRequest method. -// req, resp := client.UpdateRuleGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRuleGroup -func (c *WAF) UpdateRuleGroupRequest(input *UpdateRuleGroupInput) (req *request.Request, output *UpdateRuleGroupOutput) { - op := &request.Operation{ - Name: opUpdateRuleGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRuleGroupInput{} - } - - output = &UpdateRuleGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRuleGroup API operation for AWS WAF. -// -// Inserts or deletes ActivatedRule objects in a RuleGroup. -// -// You can only insert REGULAR rules into a rule group. -// -// You can have a maximum of ten rules per rule group. -// -// To create and configure a RuleGroup, perform the following steps: -// -// Create and update the Rules that you want to include in the RuleGroup. See -// CreateRule. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRuleGroup request. -// -// Submit an UpdateRuleGroup request to add Rules to the RuleGroup. -// -// Create and update a WebACL that contains the RuleGroup. See CreateWebACL. -// -// If you want to replace one Rule with another, you delete the existing one -// and add the new one. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation UpdateRuleGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRuleGroup -func (c *WAF) UpdateRuleGroup(input *UpdateRuleGroupInput) (*UpdateRuleGroupOutput, error) { - req, out := c.UpdateRuleGroupRequest(input) - return out, req.Send() -} - -// UpdateRuleGroupWithContext is the same as UpdateRuleGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRuleGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) UpdateRuleGroupWithContext(ctx aws.Context, input *UpdateRuleGroupInput, opts ...request.Option) (*UpdateRuleGroupOutput, error) { - req, out := c.UpdateRuleGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSizeConstraintSet = "UpdateSizeConstraintSet" - -// UpdateSizeConstraintSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSizeConstraintSet for more information on using the UpdateSizeConstraintSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSizeConstraintSetRequest method. -// req, resp := client.UpdateSizeConstraintSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateSizeConstraintSet -func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput) (req *request.Request, output *UpdateSizeConstraintSetOutput) { - op := &request.Operation{ - Name: opUpdateSizeConstraintSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSizeConstraintSetInput{} - } - - output = &UpdateSizeConstraintSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSizeConstraintSet API operation for AWS WAF. -// -// Inserts or deletes SizeConstraint objects (filters) in a SizeConstraintSet. -// For each SizeConstraint object, you specify the following values: -// -// * Whether to insert or delete the object from the array. If you want to -// change a SizeConstraintSetUpdate object, you delete the existing object -// and add a new one. -// -// * The part of a web request that you want AWS WAF to evaluate, such as -// the length of a query string or the length of the User-Agent header. -// -// * Whether to perform any transformations on the request, such as converting -// it to lowercase, before checking its length. Note that transformations -// of the request body are not supported because the AWS resource forwards -// only the first 8192 bytes of your request to AWS WAF. -// -// You can only specify a single type of TextTransformation. -// -// * A ComparisonOperator used for evaluating the selected part of the request -// against the specified Size, such as equals, greater than, less than, and -// so on. -// -// * The length, in bytes, that you want AWS WAF to watch for in selected -// part of the request. The length is computed after applying the transformation. -// -// For example, you can add a SizeConstraintSetUpdate object that matches web -// requests in which the length of the User-Agent header is greater than 100 -// bytes. You can then configure AWS WAF to block those requests. -// -// To create and configure a SizeConstraintSet, perform the following steps: -// -// Create a SizeConstraintSet. For more information, see CreateSizeConstraintSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateSizeConstraintSet request. -// -// Submit an UpdateSizeConstraintSet request to specify the part of the request -// that you want AWS WAF to inspect (for example, the header or the URI) and -// the value that you want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation UpdateSizeConstraintSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateSizeConstraintSet -func (c *WAF) UpdateSizeConstraintSet(input *UpdateSizeConstraintSetInput) (*UpdateSizeConstraintSetOutput, error) { - req, out := c.UpdateSizeConstraintSetRequest(input) - return out, req.Send() -} - -// UpdateSizeConstraintSetWithContext is the same as UpdateSizeConstraintSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSizeConstraintSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) UpdateSizeConstraintSetWithContext(ctx aws.Context, input *UpdateSizeConstraintSetInput, opts ...request.Option) (*UpdateSizeConstraintSetOutput, error) { - req, out := c.UpdateSizeConstraintSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSqlInjectionMatchSet = "UpdateSqlInjectionMatchSet" - -// UpdateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSqlInjectionMatchSet for more information on using the UpdateSqlInjectionMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSqlInjectionMatchSetRequest method. -// req, resp := client.UpdateSqlInjectionMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateSqlInjectionMatchSet -func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSetInput) (req *request.Request, output *UpdateSqlInjectionMatchSetOutput) { - op := &request.Operation{ - Name: opUpdateSqlInjectionMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSqlInjectionMatchSetInput{} - } - - output = &UpdateSqlInjectionMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSqlInjectionMatchSet API operation for AWS WAF. -// -// Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet. -// For each SqlInjectionMatchTuple object, you specify the following values: -// -// * Action: Whether to insert the object into or delete the object from -// the array. To change a SqlInjectionMatchTuple, you delete the existing -// object and add a new one. -// -// * FieldToMatch: The part of web requests that you want AWS WAF to inspect -// and, if you want AWS WAF to inspect a header or custom query parameter, -// the name of the header or parameter. -// -// * TextTransformation: Which text transformation, if any, to perform on -// the web request before inspecting the request for snippets of malicious -// SQL code. -// -// You can only specify a single type of TextTransformation. -// -// You use SqlInjectionMatchSet objects to specify which CloudFront requests -// that you want to allow, block, or count. For example, if you're receiving -// requests that contain snippets of SQL code in the query string and you want -// to block the requests, you can create a SqlInjectionMatchSet with the applicable -// settings, and then configure AWS WAF to block the requests. -// -// To create and configure a SqlInjectionMatchSet, perform the following steps: -// -// Submit a CreateSqlInjectionMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateIPSet request. -// -// Submit an UpdateSqlInjectionMatchSet request to specify the parts of web -// requests that you want AWS WAF to inspect for snippets of SQL code. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation UpdateSqlInjectionMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateSqlInjectionMatchSet -func (c *WAF) UpdateSqlInjectionMatchSet(input *UpdateSqlInjectionMatchSetInput) (*UpdateSqlInjectionMatchSetOutput, error) { - req, out := c.UpdateSqlInjectionMatchSetRequest(input) - return out, req.Send() -} - -// UpdateSqlInjectionMatchSetWithContext is the same as UpdateSqlInjectionMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSqlInjectionMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) UpdateSqlInjectionMatchSetWithContext(ctx aws.Context, input *UpdateSqlInjectionMatchSetInput, opts ...request.Option) (*UpdateSqlInjectionMatchSetOutput, error) { - req, out := c.UpdateSqlInjectionMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateWebACL = "UpdateWebACL" - -// UpdateWebACLRequest generates a "aws/request.Request" representing the -// client's request for the UpdateWebACL operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateWebACL for more information on using the UpdateWebACL -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateWebACLRequest method. -// req, resp := client.UpdateWebACLRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateWebACL -func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Request, output *UpdateWebACLOutput) { - op := &request.Operation{ - Name: opUpdateWebACL, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateWebACLInput{} - } - - output = &UpdateWebACLOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateWebACL API operation for AWS WAF. -// -// Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies -// web requests that you want to allow, block, or count. When you update a WebACL, -// you specify the following values: -// -// * A default action for the WebACL, either ALLOW or BLOCK. AWS WAF performs -// the default action if a request doesn't match the criteria in any of the -// Rules in a WebACL. -// -// * The Rules that you want to add or delete. If you want to replace one -// Rule with another, you delete the existing Rule and add the new one. -// -// * For each Rule, whether you want AWS WAF to allow requests, block requests, -// or count requests that match the conditions in the Rule. -// -// * The order in which you want AWS WAF to evaluate the Rules in a WebACL. -// If you add more than one Rule to a WebACL, AWS WAF evaluates each request -// against the Rules in order based on the value of Priority. (The Rule that -// has the lowest value for Priority is evaluated first.) When a web request -// matches all the predicates (such as ByteMatchSets and IPSets) in a Rule, -// AWS WAF immediately takes the corresponding action, allow or block, and -// doesn't evaluate the request against the remaining Rules in the WebACL, -// if any. -// -// To create and configure a WebACL, perform the following steps: -// -// Create and update the predicates that you want to include in Rules. For more -// information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, -// CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet. -// -// Create and update the Rules that you want to include in the WebACL. For more -// information, see CreateRule and UpdateRule. -// -// Create a WebACL. See CreateWebACL. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateWebACL request. -// -// Submit an UpdateWebACL request to specify the Rules that you want to include -// in the WebACL, to specify the default action, and to associate the WebACL -// with a CloudFront distribution. -// -// The ActivatedRule can be a rule group. If you specify a rule group as your -// ActivatedRule, you can exclude specific rules from that rule group. -// -// If you already have a rule group associated with a web ACL and want to submit -// an UpdateWebACL request to exclude certain rules from that rule group, you -// must first remove the rule group from the web ACL, the re-insert it again, -// specifying the excluded rules. For details, see ActivatedRule$ExcludedRules. -// -// Be aware that if you try to add a RATE_BASED rule to a web ACL without setting -// the rule type when first creating the rule, the UpdateWebACL request will -// fail because the request tries to add a REGULAR rule (the default rule type) -// with the specified ID, which does not exist. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation UpdateWebACL for usage and error information. -// -// Returned Error Codes: -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// * ErrCodeSubscriptionNotFoundException "WAFSubscriptionNotFoundException" -// The specified subscription does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateWebACL -func (c *WAF) UpdateWebACL(input *UpdateWebACLInput) (*UpdateWebACLOutput, error) { - req, out := c.UpdateWebACLRequest(input) - return out, req.Send() -} - -// UpdateWebACLWithContext is the same as UpdateWebACL with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateWebACL for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) UpdateWebACLWithContext(ctx aws.Context, input *UpdateWebACLInput, opts ...request.Option) (*UpdateWebACLOutput, error) { - req, out := c.UpdateWebACLRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateXssMatchSet = "UpdateXssMatchSet" - -// UpdateXssMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateXssMatchSet for more information on using the UpdateXssMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateXssMatchSetRequest method. -// req, resp := client.UpdateXssMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateXssMatchSet -func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *request.Request, output *UpdateXssMatchSetOutput) { - op := &request.Operation{ - Name: opUpdateXssMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateXssMatchSetInput{} - } - - output = &UpdateXssMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateXssMatchSet API operation for AWS WAF. -// -// Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. For -// each XssMatchTuple object, you specify the following values: -// -// * Action: Whether to insert the object into or delete the object from -// the array. To change an XssMatchTuple, you delete the existing object -// and add a new one. -// -// * FieldToMatch: The part of web requests that you want AWS WAF to inspect -// and, if you want AWS WAF to inspect a header or custom query parameter, -// the name of the header or parameter. -// -// * TextTransformation: Which text transformation, if any, to perform on -// the web request before inspecting the request for cross-site scripting -// attacks. -// -// You can only specify a single type of TextTransformation. -// -// You use XssMatchSet objects to specify which CloudFront requests that you -// want to allow, block, or count. For example, if you're receiving requests -// that contain cross-site scripting attacks in the request body and you want -// to block the requests, you can create an XssMatchSet with the applicable -// settings, and then configure AWS WAF to block the requests. -// -// To create and configure an XssMatchSet, perform the following steps: -// -// Submit a CreateXssMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateIPSet request. -// -// Submit an UpdateXssMatchSet request to specify the parts of web requests -// that you want AWS WAF to inspect for cross-site scripting attacks. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF's -// API operation UpdateXssMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateXssMatchSet -func (c *WAF) UpdateXssMatchSet(input *UpdateXssMatchSetInput) (*UpdateXssMatchSetOutput, error) { - req, out := c.UpdateXssMatchSetRequest(input) - return out, req.Send() -} - -// UpdateXssMatchSetWithContext is the same as UpdateXssMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateXssMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAF) UpdateXssMatchSetWithContext(ctx aws.Context, input *UpdateXssMatchSetInput, opts ...request.Option) (*UpdateXssMatchSetOutput, error) { - req, out := c.UpdateXssMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// The ActivatedRule object in an UpdateWebACL request specifies a Rule that -// you want to insert or delete, the priority of the Rule in the WebACL, and -// the action that you want AWS WAF to take when a web request matches the Rule -// (ALLOW, BLOCK, or COUNT). -// -// To specify whether to insert or delete a Rule, use the Action parameter in -// the WebACLUpdate data type. -type ActivatedRule struct { - _ struct{} `type:"structure"` - - // Specifies the action that CloudFront or AWS WAF takes when a web request - // matches the conditions in the Rule. Valid values for Action include the following: - // - // * ALLOW: CloudFront responds with the requested object. - // - // * BLOCK: CloudFront responds with an HTTP 403 (Forbidden) status code. - // - // * COUNT: AWS WAF increments a counter of requests that match the conditions - // in the rule and then continues to inspect the web request based on the - // remaining rules in the web ACL. - // - // ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup - // to a WebACL. In this case, you do not use ActivatedRule|Action. For all other - // update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction. - Action *WafAction `type:"structure"` - - // An array of rules to exclude from a rule group. This is applicable only when - // the ActivatedRule refers to a RuleGroup. - // - // Sometimes it is necessary to troubleshoot rule groups that are blocking traffic - // unexpectedly (false positives). One troubleshooting technique is to identify - // the specific rule within the rule group that is blocking the legitimate traffic - // and then disable (exclude) that particular rule. You can exclude rules from - // both your own rule groups and AWS Marketplace rule groups that have been - // associated with a web ACL. - // - // Specifying ExcludedRules does not remove those rules from the rule group. - // Rather, it changes the action for the rules to COUNT. Therefore, requests - // that match an ExcludedRule are counted but not blocked. The RuleGroup owner - // will receive COUNT metrics for each ExcludedRule. - // - // If you want to exclude rules from a rule group that is already associated - // with a web ACL, perform the following steps: - // - // Use the AWS WAF logs to identify the IDs of the rules that you want to exclude. - // For more information about the logs, see Logging Web ACL Traffic Information - // (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html). - // - // Submit an UpdateWebACL request that has two actions: - // - // The first action deletes the existing rule group from the web ACL. That is, - // in the UpdateWebACL request, the first Updates:Action should be DELETE and - // Updates:ActivatedRule:RuleId should be the rule group that contains the rules - // that you want to exclude. - // - // The second action inserts the same rule group back in, but specifying the - // rules to exclude. That is, the second Updates:Action should be INSERT, Updates:ActivatedRule:RuleId - // should be the rule group that you just removed, and ExcludedRules should - // contain the rules that you want to exclude. - ExcludedRules []*ExcludedRule `type:"list"` - - // Use the OverrideAction to test your RuleGroup. - // - // Any rule in a RuleGroup can potentially block a request. If you set the OverrideAction - // to None, the RuleGroup will block a request if any individual rule in the - // RuleGroup matches the request and is configured to block that request. However - // if you first want to test the RuleGroup, set the OverrideAction to Count. - // The RuleGroup will then override any block action specified by individual - // rules contained within the group. Instead of blocking matching requests, - // those requests will be counted. You can view a record of counted requests - // using GetSampledRequests. - // - // ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup - // to a WebACL. In this case you do not use ActivatedRule|Action. For all other - // update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction. - OverrideAction *WafOverrideAction `type:"structure"` - - // Specifies the order in which the Rules in a WebACL are evaluated. Rules with - // a lower value for Priority are evaluated before Rules with a higher value. - // The value must be a unique integer. If you add multiple Rules to a WebACL, - // the values don't need to be consecutive. - // - // Priority is a required field - Priority *int64 `type:"integer" required:"true"` - - // The RuleId for a Rule. You use RuleId to get more information about a Rule - // (see GetRule), update a Rule (see UpdateRule), insert a Rule into a WebACL - // or delete a one from a WebACL (see UpdateWebACL), or delete a Rule from AWS - // WAF (see DeleteRule). - // - // RuleId is returned by CreateRule and by ListRules. - // - // RuleId is a required field - RuleId *string `min:"1" type:"string" required:"true"` - - // The rule type, either REGULAR, as defined by Rule, RATE_BASED, as defined - // by RateBasedRule, or GROUP, as defined by RuleGroup. The default is REGULAR. - // Although this field is optional, be aware that if you try to add a RATE_BASED - // rule to a web ACL without setting the type, the UpdateWebACL request will - // fail because the request tries to add a REGULAR rule with the specified ID, - // which does not exist. - Type *string `type:"string" enum:"WafRuleType"` -} - -// String returns the string representation -func (s ActivatedRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ActivatedRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ActivatedRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ActivatedRule"} - if s.Priority == nil { - invalidParams.Add(request.NewErrParamRequired("Priority")) - } - if s.RuleId == nil { - invalidParams.Add(request.NewErrParamRequired("RuleId")) - } - if s.RuleId != nil && len(*s.RuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleId", 1)) - } - if s.Action != nil { - if err := s.Action.Validate(); err != nil { - invalidParams.AddNested("Action", err.(request.ErrInvalidParams)) - } - } - if s.ExcludedRules != nil { - for i, v := range s.ExcludedRules { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ExcludedRules", i), err.(request.ErrInvalidParams)) - } - } - } - if s.OverrideAction != nil { - if err := s.OverrideAction.Validate(); err != nil { - invalidParams.AddNested("OverrideAction", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *ActivatedRule) SetAction(v *WafAction) *ActivatedRule { - s.Action = v - return s -} - -// SetExcludedRules sets the ExcludedRules field's value. -func (s *ActivatedRule) SetExcludedRules(v []*ExcludedRule) *ActivatedRule { - s.ExcludedRules = v - return s -} - -// SetOverrideAction sets the OverrideAction field's value. -func (s *ActivatedRule) SetOverrideAction(v *WafOverrideAction) *ActivatedRule { - s.OverrideAction = v - return s -} - -// SetPriority sets the Priority field's value. -func (s *ActivatedRule) SetPriority(v int64) *ActivatedRule { - s.Priority = &v - return s -} - -// SetRuleId sets the RuleId field's value. -func (s *ActivatedRule) SetRuleId(v string) *ActivatedRule { - s.RuleId = &v - return s -} - -// SetType sets the Type field's value. -func (s *ActivatedRule) SetType(v string) *ActivatedRule { - s.Type = &v - return s -} - -// In a GetByteMatchSet request, ByteMatchSet is a complex type that contains -// the ByteMatchSetId and Name of a ByteMatchSet, and the values that you specified -// when you updated the ByteMatchSet. -// -// A complex type that contains ByteMatchTuple objects, which specify the parts -// of web requests that you want AWS WAF to inspect and the values that you -// want AWS WAF to search for. If a ByteMatchSet contains more than one ByteMatchTuple -// object, a request needs to match the settings in only one ByteMatchTuple -// to be considered a match. -type ByteMatchSet struct { - _ struct{} `type:"structure"` - - // The ByteMatchSetId for a ByteMatchSet. You use ByteMatchSetId to get information - // about a ByteMatchSet (see GetByteMatchSet), update a ByteMatchSet (see UpdateByteMatchSet), - // insert a ByteMatchSet into a Rule or delete one from a Rule (see UpdateRule), - // and delete a ByteMatchSet from AWS WAF (see DeleteByteMatchSet). - // - // ByteMatchSetId is returned by CreateByteMatchSet and by ListByteMatchSets. - // - // ByteMatchSetId is a required field - ByteMatchSetId *string `min:"1" type:"string" required:"true"` - - // Specifies the bytes (typically a string that corresponds with ASCII characters) - // that you want AWS WAF to search for in web requests, the location in requests - // that you want AWS WAF to search, and other settings. - // - // ByteMatchTuples is a required field - ByteMatchTuples []*ByteMatchTuple `type:"list" required:"true"` - - // A friendly name or description of the ByteMatchSet. You can't change Name - // after you create a ByteMatchSet. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ByteMatchSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ByteMatchSet) GoString() string { - return s.String() -} - -// SetByteMatchSetId sets the ByteMatchSetId field's value. -func (s *ByteMatchSet) SetByteMatchSetId(v string) *ByteMatchSet { - s.ByteMatchSetId = &v - return s -} - -// SetByteMatchTuples sets the ByteMatchTuples field's value. -func (s *ByteMatchSet) SetByteMatchTuples(v []*ByteMatchTuple) *ByteMatchSet { - s.ByteMatchTuples = v - return s -} - -// SetName sets the Name field's value. -func (s *ByteMatchSet) SetName(v string) *ByteMatchSet { - s.Name = &v - return s -} - -// Returned by ListByteMatchSets. Each ByteMatchSetSummary object includes the -// Name and ByteMatchSetId for one ByteMatchSet. -type ByteMatchSetSummary struct { - _ struct{} `type:"structure"` - - // The ByteMatchSetId for a ByteMatchSet. You use ByteMatchSetId to get information - // about a ByteMatchSet, update a ByteMatchSet, remove a ByteMatchSet from a - // Rule, and delete a ByteMatchSet from AWS WAF. - // - // ByteMatchSetId is returned by CreateByteMatchSet and by ListByteMatchSets. - // - // ByteMatchSetId is a required field - ByteMatchSetId *string `min:"1" type:"string" required:"true"` - - // A friendly name or description of the ByteMatchSet. You can't change Name - // after you create a ByteMatchSet. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ByteMatchSetSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ByteMatchSetSummary) GoString() string { - return s.String() -} - -// SetByteMatchSetId sets the ByteMatchSetId field's value. -func (s *ByteMatchSetSummary) SetByteMatchSetId(v string) *ByteMatchSetSummary { - s.ByteMatchSetId = &v - return s -} - -// SetName sets the Name field's value. -func (s *ByteMatchSetSummary) SetName(v string) *ByteMatchSetSummary { - s.Name = &v - return s -} - -// In an UpdateByteMatchSet request, ByteMatchSetUpdate specifies whether to -// insert or delete a ByteMatchTuple and includes the settings for the ByteMatchTuple. -type ByteMatchSetUpdate struct { - _ struct{} `type:"structure"` - - // Specifies whether to insert or delete a ByteMatchTuple. - // - // Action is a required field - Action *string `type:"string" required:"true" enum:"ChangeAction"` - - // Information about the part of a web request that you want AWS WAF to inspect - // and the value that you want AWS WAF to search for. If you specify DELETE - // for the value of Action, the ByteMatchTuple values must exactly match the - // values in the ByteMatchTuple that you want to delete from the ByteMatchSet. - // - // ByteMatchTuple is a required field - ByteMatchTuple *ByteMatchTuple `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ByteMatchSetUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ByteMatchSetUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ByteMatchSetUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ByteMatchSetUpdate"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.ByteMatchTuple == nil { - invalidParams.Add(request.NewErrParamRequired("ByteMatchTuple")) - } - if s.ByteMatchTuple != nil { - if err := s.ByteMatchTuple.Validate(); err != nil { - invalidParams.AddNested("ByteMatchTuple", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *ByteMatchSetUpdate) SetAction(v string) *ByteMatchSetUpdate { - s.Action = &v - return s -} - -// SetByteMatchTuple sets the ByteMatchTuple field's value. -func (s *ByteMatchSetUpdate) SetByteMatchTuple(v *ByteMatchTuple) *ByteMatchSetUpdate { - s.ByteMatchTuple = v - return s -} - -// The bytes (typically a string that corresponds with ASCII characters) that -// you want AWS WAF to search for in web requests, the location in requests -// that you want AWS WAF to search, and other settings. -type ByteMatchTuple struct { - _ struct{} `type:"structure"` - - // The part of a web request that you want AWS WAF to search, such as a specified - // header or a query string. For more information, see FieldToMatch. - // - // FieldToMatch is a required field - FieldToMatch *FieldToMatch `type:"structure" required:"true"` - - // Within the portion of a web request that you want to search (for example, - // in the query string, if any), specify where you want AWS WAF to search. Valid - // values include the following: - // - // CONTAINS - // - // The specified part of the web request must include the value of TargetString, - // but the location doesn't matter. - // - // CONTAINS_WORD - // - // The specified part of the web request must include the value of TargetString, - // and TargetString must contain only alphanumeric characters or underscore - // (A-Z, a-z, 0-9, or _). In addition, TargetString must be a word, which means - // one of the following: - // - // * TargetString exactly matches the value of the specified part of the - // web request, such as the value of a header. - // - // * TargetString is at the beginning of the specified part of the web request - // and is followed by a character other than an alphanumeric character or - // underscore (_), for example, BadBot;. - // - // * TargetString is at the end of the specified part of the web request - // and is preceded by a character other than an alphanumeric character or - // underscore (_), for example, ;BadBot. - // - // * TargetString is in the middle of the specified part of the web request - // and is preceded and followed by characters other than alphanumeric characters - // or underscore (_), for example, -BadBot;. - // - // EXACTLY - // - // The value of the specified part of the web request must exactly match the - // value of TargetString. - // - // STARTS_WITH - // - // The value of TargetString must appear at the beginning of the specified part - // of the web request. - // - // ENDS_WITH - // - // The value of TargetString must appear at the end of the specified part of - // the web request. - // - // PositionalConstraint is a required field - PositionalConstraint *string `type:"string" required:"true" enum:"PositionalConstraint"` - - // The value that you want AWS WAF to search for. AWS WAF searches for the specified - // string in the part of web requests that you specified in FieldToMatch. The - // maximum length of the value is 50 bytes. - // - // Valid values depend on the values that you specified for FieldToMatch: - // - // * HEADER: The value that you want AWS WAF to search for in the request - // header that you specified in FieldToMatch, for example, the value of the - // User-Agent or Referer header. - // - // * METHOD: The HTTP method, which indicates the type of operation specified - // in the request. CloudFront supports the following methods: DELETE, GET, - // HEAD, OPTIONS, PATCH, POST, and PUT. - // - // * QUERY_STRING: The value that you want AWS WAF to search for in the query - // string, which is the part of a URL that appears after a ? character. - // - // * URI: The value that you want AWS WAF to search for in the part of a - // URL that identifies a resource, for example, /images/daily-ad.jpg. - // - // * BODY: The part of a request that contains any additional data that you - // want to send to your web server as the HTTP request body, such as data - // from a form. The request body immediately follows the request headers. - // Note that only the first 8192 bytes of the request body are forwarded - // to AWS WAF for inspection. To allow or block requests based on the length - // of the body, you can create a size constraint set. For more information, - // see CreateSizeConstraintSet. - // - // * SINGLE_QUERY_ARG: The parameter in the query string that you will inspect, - // such as UserName or SalesRegion. The maximum length for SINGLE_QUERY_ARG - // is 30 characters. - // - // * ALL_QUERY_ARGS: Similar to SINGLE_QUERY_ARG, but instead of inspecting - // a single parameter, AWS WAF inspects all parameters within the query string - // for the value or regex pattern that you specify in TargetString. - // - // If TargetString includes alphabetic characters A-Z and a-z, note that the - // value is case sensitive. - // - // If you're using the AWS WAF API - // - // Specify a base64-encoded version of the value. The maximum length of the - // value before you base64-encode it is 50 bytes. - // - // For example, suppose the value of Type is HEADER and the value of Data is - // User-Agent. If you want to search the User-Agent header for the value BadBot, - // you base64-encode BadBot using MIME base64-encoding and include the resulting - // value, QmFkQm90, in the value of TargetString. - // - // If you're using the AWS CLI or one of the AWS SDKs - // - // The value that you want AWS WAF to search for. The SDK automatically base64 - // encodes the value. - // - // TargetString is automatically base64 encoded/decoded by the SDK. - // - // TargetString is a required field - TargetString []byte `type:"blob" required:"true"` - - // Text transformations eliminate some of the unusual formatting that attackers - // use in web requests in an effort to bypass AWS WAF. If you specify a transformation, - // AWS WAF performs the transformation on TargetString before inspecting a request - // for a match. - // - // You can only specify a single type of TextTransformation. - // - // CMD_LINE - // - // When you're concerned that attackers are injecting an operating system command - // line command and using unusual formatting to disguise some or all of the - // command, use this option to perform the following transformations: - // - // * Delete the following characters: \ " ' ^ - // - // * Delete spaces before the following characters: / ( - // - // * Replace the following characters with a space: , ; - // - // * Replace multiple spaces with one space - // - // * Convert uppercase letters (A-Z) to lowercase (a-z) - // - // COMPRESS_WHITE_SPACE - // - // Use this option to replace the following characters with a space character - // (decimal 32): - // - // * \f, formfeed, decimal 12 - // - // * \t, tab, decimal 9 - // - // * \n, newline, decimal 10 - // - // * \r, carriage return, decimal 13 - // - // * \v, vertical tab, decimal 11 - // - // * non-breaking space, decimal 160 - // - // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space. - // - // HTML_ENTITY_DECODE - // - // Use this option to replace HTML-encoded characters with unencoded characters. - // HTML_ENTITY_DECODE performs the following operations: - // - // * Replaces (ampersand)quot; with " - // - // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160 - // - // * Replaces (ampersand)lt; with a "less than" symbol - // - // * Replaces (ampersand)gt; with > - // - // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;, - // with the corresponding characters - // - // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;, - // with the corresponding characters - // - // LOWERCASE - // - // Use this option to convert uppercase letters (A-Z) to lowercase (a-z). - // - // URL_DECODE - // - // Use this option to decode a URL-encoded value. - // - // NONE - // - // Specify NONE if you don't want to perform any text transformations. - // - // TextTransformation is a required field - TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"` -} - -// String returns the string representation -func (s ByteMatchTuple) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ByteMatchTuple) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ByteMatchTuple) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ByteMatchTuple"} - if s.FieldToMatch == nil { - invalidParams.Add(request.NewErrParamRequired("FieldToMatch")) - } - if s.PositionalConstraint == nil { - invalidParams.Add(request.NewErrParamRequired("PositionalConstraint")) - } - if s.TargetString == nil { - invalidParams.Add(request.NewErrParamRequired("TargetString")) - } - if s.TextTransformation == nil { - invalidParams.Add(request.NewErrParamRequired("TextTransformation")) - } - if s.FieldToMatch != nil { - if err := s.FieldToMatch.Validate(); err != nil { - invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFieldToMatch sets the FieldToMatch field's value. -func (s *ByteMatchTuple) SetFieldToMatch(v *FieldToMatch) *ByteMatchTuple { - s.FieldToMatch = v - return s -} - -// SetPositionalConstraint sets the PositionalConstraint field's value. -func (s *ByteMatchTuple) SetPositionalConstraint(v string) *ByteMatchTuple { - s.PositionalConstraint = &v - return s -} - -// SetTargetString sets the TargetString field's value. -func (s *ByteMatchTuple) SetTargetString(v []byte) *ByteMatchTuple { - s.TargetString = v - return s -} - -// SetTextTransformation sets the TextTransformation field's value. -func (s *ByteMatchTuple) SetTextTransformation(v string) *ByteMatchTuple { - s.TextTransformation = &v - return s -} - -type CreateByteMatchSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // A friendly name or description of the ByteMatchSet. You can't change Name - // after you create a ByteMatchSet. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateByteMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateByteMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateByteMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateByteMatchSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateByteMatchSetInput) SetChangeToken(v string) *CreateByteMatchSetInput { - s.ChangeToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateByteMatchSetInput) SetName(v string) *CreateByteMatchSetInput { - s.Name = &v - return s -} - -type CreateByteMatchSetOutput struct { - _ struct{} `type:"structure"` - - // A ByteMatchSet that contains no ByteMatchTuple objects. - ByteMatchSet *ByteMatchSet `type:"structure"` - - // The ChangeToken that you used to submit the CreateByteMatchSet request. You - // can also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s CreateByteMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateByteMatchSetOutput) GoString() string { - return s.String() -} - -// SetByteMatchSet sets the ByteMatchSet field's value. -func (s *CreateByteMatchSetOutput) SetByteMatchSet(v *ByteMatchSet) *CreateByteMatchSetOutput { - s.ByteMatchSet = v - return s -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateByteMatchSetOutput) SetChangeToken(v string) *CreateByteMatchSetOutput { - s.ChangeToken = &v - return s -} - -type CreateGeoMatchSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // A friendly name or description of the GeoMatchSet. You can't change Name - // after you create the GeoMatchSet. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateGeoMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateGeoMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateGeoMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateGeoMatchSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateGeoMatchSetInput) SetChangeToken(v string) *CreateGeoMatchSetInput { - s.ChangeToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateGeoMatchSetInput) SetName(v string) *CreateGeoMatchSetInput { - s.Name = &v - return s -} - -type CreateGeoMatchSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the CreateGeoMatchSet request. You - // can also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` - - // The GeoMatchSet returned in the CreateGeoMatchSet response. The GeoMatchSet - // contains no GeoMatchConstraints. - GeoMatchSet *GeoMatchSet `type:"structure"` -} - -// String returns the string representation -func (s CreateGeoMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateGeoMatchSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateGeoMatchSetOutput) SetChangeToken(v string) *CreateGeoMatchSetOutput { - s.ChangeToken = &v - return s -} - -// SetGeoMatchSet sets the GeoMatchSet field's value. -func (s *CreateGeoMatchSetOutput) SetGeoMatchSet(v *GeoMatchSet) *CreateGeoMatchSetOutput { - s.GeoMatchSet = v - return s -} - -type CreateIPSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // A friendly name or description of the IPSet. You can't change Name after - // you create the IPSet. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateIPSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIPSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateIPSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateIPSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateIPSetInput) SetChangeToken(v string) *CreateIPSetInput { - s.ChangeToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateIPSetInput) SetName(v string) *CreateIPSetInput { - s.Name = &v - return s -} - -type CreateIPSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the CreateIPSet request. You can - // also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` - - // The IPSet returned in the CreateIPSet response. - IPSet *IPSet `type:"structure"` -} - -// String returns the string representation -func (s CreateIPSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIPSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateIPSetOutput) SetChangeToken(v string) *CreateIPSetOutput { - s.ChangeToken = &v - return s -} - -// SetIPSet sets the IPSet field's value. -func (s *CreateIPSetOutput) SetIPSet(v *IPSet) *CreateIPSetOutput { - s.IPSet = v - return s -} - -type CreateRateBasedRuleInput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the CreateRateBasedRule request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // A friendly name or description for the metrics for this RateBasedRule. The - // name can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't - // contain whitespace. You can't change the name of the metric after you create - // the RateBasedRule. - // - // MetricName is a required field - MetricName *string `type:"string" required:"true"` - - // A friendly name or description of the RateBasedRule. You can't change the - // name of a RateBasedRule after you create it. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The field that AWS WAF uses to determine if requests are likely arriving - // from a single source and thus subject to rate monitoring. The only valid - // value for RateKey is IP. IP indicates that requests that arrive from the - // same IP address are subject to the RateLimit that is specified in the RateBasedRule. - // - // RateKey is a required field - RateKey *string `type:"string" required:"true" enum:"RateKey"` - - // The maximum number of requests, which have an identical value in the field - // that is specified by RateKey, allowed in a five-minute period. If the number - // of requests exceeds the RateLimit and the other predicates specified in the - // rule are also met, AWS WAF triggers the action that is specified for this - // rule. - // - // RateLimit is a required field - RateLimit *int64 `min:"2000" type:"long" required:"true"` -} - -// String returns the string representation -func (s CreateRateBasedRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRateBasedRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRateBasedRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRateBasedRuleInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.RateKey == nil { - invalidParams.Add(request.NewErrParamRequired("RateKey")) - } - if s.RateLimit == nil { - invalidParams.Add(request.NewErrParamRequired("RateLimit")) - } - if s.RateLimit != nil && *s.RateLimit < 2000 { - invalidParams.Add(request.NewErrParamMinValue("RateLimit", 2000)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateRateBasedRuleInput) SetChangeToken(v string) *CreateRateBasedRuleInput { - s.ChangeToken = &v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *CreateRateBasedRuleInput) SetMetricName(v string) *CreateRateBasedRuleInput { - s.MetricName = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateRateBasedRuleInput) SetName(v string) *CreateRateBasedRuleInput { - s.Name = &v - return s -} - -// SetRateKey sets the RateKey field's value. -func (s *CreateRateBasedRuleInput) SetRateKey(v string) *CreateRateBasedRuleInput { - s.RateKey = &v - return s -} - -// SetRateLimit sets the RateLimit field's value. -func (s *CreateRateBasedRuleInput) SetRateLimit(v int64) *CreateRateBasedRuleInput { - s.RateLimit = &v - return s -} - -type CreateRateBasedRuleOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the CreateRateBasedRule request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` - - // The RateBasedRule that is returned in the CreateRateBasedRule response. - Rule *RateBasedRule `type:"structure"` -} - -// String returns the string representation -func (s CreateRateBasedRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRateBasedRuleOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateRateBasedRuleOutput) SetChangeToken(v string) *CreateRateBasedRuleOutput { - s.ChangeToken = &v - return s -} - -// SetRule sets the Rule field's value. -func (s *CreateRateBasedRuleOutput) SetRule(v *RateBasedRule) *CreateRateBasedRuleOutput { - s.Rule = v - return s -} - -type CreateRegexMatchSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // A friendly name or description of the RegexMatchSet. You can't change Name - // after you create a RegexMatchSet. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateRegexMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRegexMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRegexMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRegexMatchSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateRegexMatchSetInput) SetChangeToken(v string) *CreateRegexMatchSetInput { - s.ChangeToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateRegexMatchSetInput) SetName(v string) *CreateRegexMatchSetInput { - s.Name = &v - return s -} - -type CreateRegexMatchSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the CreateRegexMatchSet request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` - - // A RegexMatchSet that contains no RegexMatchTuple objects. - RegexMatchSet *RegexMatchSet `type:"structure"` -} - -// String returns the string representation -func (s CreateRegexMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRegexMatchSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateRegexMatchSetOutput) SetChangeToken(v string) *CreateRegexMatchSetOutput { - s.ChangeToken = &v - return s -} - -// SetRegexMatchSet sets the RegexMatchSet field's value. -func (s *CreateRegexMatchSetOutput) SetRegexMatchSet(v *RegexMatchSet) *CreateRegexMatchSetOutput { - s.RegexMatchSet = v - return s -} - -type CreateRegexPatternSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // A friendly name or description of the RegexPatternSet. You can't change Name - // after you create a RegexPatternSet. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateRegexPatternSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRegexPatternSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRegexPatternSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRegexPatternSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateRegexPatternSetInput) SetChangeToken(v string) *CreateRegexPatternSetInput { - s.ChangeToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateRegexPatternSetInput) SetName(v string) *CreateRegexPatternSetInput { - s.Name = &v - return s -} - -type CreateRegexPatternSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the CreateRegexPatternSet request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` - - // A RegexPatternSet that contains no objects. - RegexPatternSet *RegexPatternSet `type:"structure"` -} - -// String returns the string representation -func (s CreateRegexPatternSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRegexPatternSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateRegexPatternSetOutput) SetChangeToken(v string) *CreateRegexPatternSetOutput { - s.ChangeToken = &v - return s -} - -// SetRegexPatternSet sets the RegexPatternSet field's value. -func (s *CreateRegexPatternSetOutput) SetRegexPatternSet(v *RegexPatternSet) *CreateRegexPatternSetOutput { - s.RegexPatternSet = v - return s -} - -type CreateRuleGroupInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // A friendly name or description for the metrics for this RuleGroup. The name - // can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't - // contain whitespace. You can't change the name of the metric after you create - // the RuleGroup. - // - // MetricName is a required field - MetricName *string `type:"string" required:"true"` - - // A friendly name or description of the RuleGroup. You can't change Name after - // you create a RuleGroup. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateRuleGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRuleGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRuleGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRuleGroupInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateRuleGroupInput) SetChangeToken(v string) *CreateRuleGroupInput { - s.ChangeToken = &v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *CreateRuleGroupInput) SetMetricName(v string) *CreateRuleGroupInput { - s.MetricName = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateRuleGroupInput) SetName(v string) *CreateRuleGroupInput { - s.Name = &v - return s -} - -type CreateRuleGroupOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the CreateRuleGroup request. You - // can also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` - - // An empty RuleGroup. - RuleGroup *RuleGroup `type:"structure"` -} - -// String returns the string representation -func (s CreateRuleGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRuleGroupOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateRuleGroupOutput) SetChangeToken(v string) *CreateRuleGroupOutput { - s.ChangeToken = &v - return s -} - -// SetRuleGroup sets the RuleGroup field's value. -func (s *CreateRuleGroupOutput) SetRuleGroup(v *RuleGroup) *CreateRuleGroupOutput { - s.RuleGroup = v - return s -} - -type CreateRuleInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // A friendly name or description for the metrics for this Rule. The name can - // contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't contain - // white space. You can't change the name of the metric after you create the - // Rule. - // - // MetricName is a required field - MetricName *string `type:"string" required:"true"` - - // A friendly name or description of the Rule. You can't change the name of - // a Rule after you create it. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRuleInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateRuleInput) SetChangeToken(v string) *CreateRuleInput { - s.ChangeToken = &v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *CreateRuleInput) SetMetricName(v string) *CreateRuleInput { - s.MetricName = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateRuleInput) SetName(v string) *CreateRuleInput { - s.Name = &v - return s -} - -type CreateRuleOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the CreateRule request. You can also - // use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` - - // The Rule returned in the CreateRule response. - Rule *Rule `type:"structure"` -} - -// String returns the string representation -func (s CreateRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateRuleOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateRuleOutput) SetChangeToken(v string) *CreateRuleOutput { - s.ChangeToken = &v - return s -} - -// SetRule sets the Rule field's value. -func (s *CreateRuleOutput) SetRule(v *Rule) *CreateRuleOutput { - s.Rule = v - return s -} - -type CreateSizeConstraintSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // A friendly name or description of the SizeConstraintSet. You can't change - // Name after you create a SizeConstraintSet. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateSizeConstraintSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSizeConstraintSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSizeConstraintSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSizeConstraintSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateSizeConstraintSetInput) SetChangeToken(v string) *CreateSizeConstraintSetInput { - s.ChangeToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateSizeConstraintSetInput) SetName(v string) *CreateSizeConstraintSetInput { - s.Name = &v - return s -} - -type CreateSizeConstraintSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the CreateSizeConstraintSet request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` - - // A SizeConstraintSet that contains no SizeConstraint objects. - SizeConstraintSet *SizeConstraintSet `type:"structure"` -} - -// String returns the string representation -func (s CreateSizeConstraintSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSizeConstraintSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateSizeConstraintSetOutput) SetChangeToken(v string) *CreateSizeConstraintSetOutput { - s.ChangeToken = &v - return s -} - -// SetSizeConstraintSet sets the SizeConstraintSet field's value. -func (s *CreateSizeConstraintSetOutput) SetSizeConstraintSet(v *SizeConstraintSet) *CreateSizeConstraintSetOutput { - s.SizeConstraintSet = v - return s -} - -// A request to create a SqlInjectionMatchSet. -type CreateSqlInjectionMatchSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // A friendly name or description for the SqlInjectionMatchSet that you're creating. - // You can't change Name after you create the SqlInjectionMatchSet. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateSqlInjectionMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSqlInjectionMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSqlInjectionMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSqlInjectionMatchSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateSqlInjectionMatchSetInput) SetChangeToken(v string) *CreateSqlInjectionMatchSetInput { - s.ChangeToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateSqlInjectionMatchSetInput) SetName(v string) *CreateSqlInjectionMatchSetInput { - s.Name = &v - return s -} - -// The response to a CreateSqlInjectionMatchSet request. -type CreateSqlInjectionMatchSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the CreateSqlInjectionMatchSet request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` - - // A SqlInjectionMatchSet. - SqlInjectionMatchSet *SqlInjectionMatchSet `type:"structure"` -} - -// String returns the string representation -func (s CreateSqlInjectionMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateSqlInjectionMatchSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateSqlInjectionMatchSetOutput) SetChangeToken(v string) *CreateSqlInjectionMatchSetOutput { - s.ChangeToken = &v - return s -} - -// SetSqlInjectionMatchSet sets the SqlInjectionMatchSet field's value. -func (s *CreateSqlInjectionMatchSetOutput) SetSqlInjectionMatchSet(v *SqlInjectionMatchSet) *CreateSqlInjectionMatchSetOutput { - s.SqlInjectionMatchSet = v - return s -} - -type CreateWebACLInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The action that you want AWS WAF to take when a request doesn't match the - // criteria specified in any of the Rule objects that are associated with the - // WebACL. - // - // DefaultAction is a required field - DefaultAction *WafAction `type:"structure" required:"true"` - - // A friendly name or description for the metrics for this WebACL. The name - // can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't - // contain white space. You can't change MetricName after you create the WebACL. - // - // MetricName is a required field - MetricName *string `type:"string" required:"true"` - - // A friendly name or description of the WebACL. You can't change Name after - // you create the WebACL. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateWebACLInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateWebACLInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateWebACLInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateWebACLInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.DefaultAction == nil { - invalidParams.Add(request.NewErrParamRequired("DefaultAction")) - } - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.DefaultAction != nil { - if err := s.DefaultAction.Validate(); err != nil { - invalidParams.AddNested("DefaultAction", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateWebACLInput) SetChangeToken(v string) *CreateWebACLInput { - s.ChangeToken = &v - return s -} - -// SetDefaultAction sets the DefaultAction field's value. -func (s *CreateWebACLInput) SetDefaultAction(v *WafAction) *CreateWebACLInput { - s.DefaultAction = v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *CreateWebACLInput) SetMetricName(v string) *CreateWebACLInput { - s.MetricName = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateWebACLInput) SetName(v string) *CreateWebACLInput { - s.Name = &v - return s -} - -type CreateWebACLOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the CreateWebACL request. You can - // also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` - - // The WebACL returned in the CreateWebACL response. - WebACL *WebACL `type:"structure"` -} - -// String returns the string representation -func (s CreateWebACLOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateWebACLOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateWebACLOutput) SetChangeToken(v string) *CreateWebACLOutput { - s.ChangeToken = &v - return s -} - -// SetWebACL sets the WebACL field's value. -func (s *CreateWebACLOutput) SetWebACL(v *WebACL) *CreateWebACLOutput { - s.WebACL = v - return s -} - -// A request to create an XssMatchSet. -type CreateXssMatchSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // A friendly name or description for the XssMatchSet that you're creating. - // You can't change Name after you create the XssMatchSet. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s CreateXssMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateXssMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateXssMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateXssMatchSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateXssMatchSetInput) SetChangeToken(v string) *CreateXssMatchSetInput { - s.ChangeToken = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateXssMatchSetInput) SetName(v string) *CreateXssMatchSetInput { - s.Name = &v - return s -} - -// The response to a CreateXssMatchSet request. -type CreateXssMatchSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the CreateXssMatchSet request. You - // can also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` - - // An XssMatchSet. - XssMatchSet *XssMatchSet `type:"structure"` -} - -// String returns the string representation -func (s CreateXssMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateXssMatchSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateXssMatchSetOutput) SetChangeToken(v string) *CreateXssMatchSetOutput { - s.ChangeToken = &v - return s -} - -// SetXssMatchSet sets the XssMatchSet field's value. -func (s *CreateXssMatchSetOutput) SetXssMatchSet(v *XssMatchSet) *CreateXssMatchSetOutput { - s.XssMatchSet = v - return s -} - -type DeleteByteMatchSetInput struct { - _ struct{} `type:"structure"` - - // The ByteMatchSetId of the ByteMatchSet that you want to delete. ByteMatchSetId - // is returned by CreateByteMatchSet and by ListByteMatchSets. - // - // ByteMatchSetId is a required field - ByteMatchSetId *string `min:"1" type:"string" required:"true"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteByteMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteByteMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteByteMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteByteMatchSetInput"} - if s.ByteMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("ByteMatchSetId")) - } - if s.ByteMatchSetId != nil && len(*s.ByteMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ByteMatchSetId", 1)) - } - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetByteMatchSetId sets the ByteMatchSetId field's value. -func (s *DeleteByteMatchSetInput) SetByteMatchSetId(v string) *DeleteByteMatchSetInput { - s.ByteMatchSetId = &v - return s -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteByteMatchSetInput) SetChangeToken(v string) *DeleteByteMatchSetInput { - s.ChangeToken = &v - return s -} - -type DeleteByteMatchSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the DeleteByteMatchSet request. You - // can also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteByteMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteByteMatchSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteByteMatchSetOutput) SetChangeToken(v string) *DeleteByteMatchSetOutput { - s.ChangeToken = &v - return s -} - -type DeleteGeoMatchSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The GeoMatchSetID of the GeoMatchSet that you want to delete. GeoMatchSetId - // is returned by CreateGeoMatchSet and by ListGeoMatchSets. - // - // GeoMatchSetId is a required field - GeoMatchSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteGeoMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGeoMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteGeoMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteGeoMatchSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.GeoMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("GeoMatchSetId")) - } - if s.GeoMatchSetId != nil && len(*s.GeoMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GeoMatchSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteGeoMatchSetInput) SetChangeToken(v string) *DeleteGeoMatchSetInput { - s.ChangeToken = &v - return s -} - -// SetGeoMatchSetId sets the GeoMatchSetId field's value. -func (s *DeleteGeoMatchSetInput) SetGeoMatchSetId(v string) *DeleteGeoMatchSetInput { - s.GeoMatchSetId = &v - return s -} - -type DeleteGeoMatchSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the DeleteGeoMatchSet request. You - // can also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteGeoMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteGeoMatchSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteGeoMatchSetOutput) SetChangeToken(v string) *DeleteGeoMatchSetOutput { - s.ChangeToken = &v - return s -} - -type DeleteIPSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The IPSetId of the IPSet that you want to delete. IPSetId is returned by - // CreateIPSet and by ListIPSets. - // - // IPSetId is a required field - IPSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteIPSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIPSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIPSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIPSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.IPSetId == nil { - invalidParams.Add(request.NewErrParamRequired("IPSetId")) - } - if s.IPSetId != nil && len(*s.IPSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IPSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteIPSetInput) SetChangeToken(v string) *DeleteIPSetInput { - s.ChangeToken = &v - return s -} - -// SetIPSetId sets the IPSetId field's value. -func (s *DeleteIPSetInput) SetIPSetId(v string) *DeleteIPSetInput { - s.IPSetId = &v - return s -} - -type DeleteIPSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the DeleteIPSet request. You can - // also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteIPSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIPSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteIPSetOutput) SetChangeToken(v string) *DeleteIPSetOutput { - s.ChangeToken = &v - return s -} - -type DeleteLoggingConfigurationInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the web ACL from which you want to delete - // the LoggingConfiguration. - // - // ResourceArn is a required field - ResourceArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteLoggingConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLoggingConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoggingConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoggingConfigurationInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *DeleteLoggingConfigurationInput) SetResourceArn(v string) *DeleteLoggingConfigurationInput { - s.ResourceArn = &v - return s -} - -type DeleteLoggingConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteLoggingConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteLoggingConfigurationOutput) GoString() string { - return s.String() -} - -type DeletePermissionPolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the RuleGroup from which you want to delete - // the policy. - // - // The user making the request must be the owner of the RuleGroup. - // - // ResourceArn is a required field - ResourceArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeletePermissionPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePermissionPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePermissionPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePermissionPolicyInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *DeletePermissionPolicyInput) SetResourceArn(v string) *DeletePermissionPolicyInput { - s.ResourceArn = &v - return s -} - -type DeletePermissionPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeletePermissionPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeletePermissionPolicyOutput) GoString() string { - return s.String() -} - -type DeleteRateBasedRuleInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The RuleId of the RateBasedRule that you want to delete. RuleId is returned - // by CreateRateBasedRule and by ListRateBasedRules. - // - // RuleId is a required field - RuleId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRateBasedRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRateBasedRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRateBasedRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRateBasedRuleInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.RuleId == nil { - invalidParams.Add(request.NewErrParamRequired("RuleId")) - } - if s.RuleId != nil && len(*s.RuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteRateBasedRuleInput) SetChangeToken(v string) *DeleteRateBasedRuleInput { - s.ChangeToken = &v - return s -} - -// SetRuleId sets the RuleId field's value. -func (s *DeleteRateBasedRuleInput) SetRuleId(v string) *DeleteRateBasedRuleInput { - s.RuleId = &v - return s -} - -type DeleteRateBasedRuleOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the DeleteRateBasedRule request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteRateBasedRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRateBasedRuleOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteRateBasedRuleOutput) SetChangeToken(v string) *DeleteRateBasedRuleOutput { - s.ChangeToken = &v - return s -} - -type DeleteRegexMatchSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The RegexMatchSetId of the RegexMatchSet that you want to delete. RegexMatchSetId - // is returned by CreateRegexMatchSet and by ListRegexMatchSets. - // - // RegexMatchSetId is a required field - RegexMatchSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRegexMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRegexMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRegexMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRegexMatchSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.RegexMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("RegexMatchSetId")) - } - if s.RegexMatchSetId != nil && len(*s.RegexMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RegexMatchSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteRegexMatchSetInput) SetChangeToken(v string) *DeleteRegexMatchSetInput { - s.ChangeToken = &v - return s -} - -// SetRegexMatchSetId sets the RegexMatchSetId field's value. -func (s *DeleteRegexMatchSetInput) SetRegexMatchSetId(v string) *DeleteRegexMatchSetInput { - s.RegexMatchSetId = &v - return s -} - -type DeleteRegexMatchSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the DeleteRegexMatchSet request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteRegexMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRegexMatchSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteRegexMatchSetOutput) SetChangeToken(v string) *DeleteRegexMatchSetOutput { - s.ChangeToken = &v - return s -} - -type DeleteRegexPatternSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The RegexPatternSetId of the RegexPatternSet that you want to delete. RegexPatternSetId - // is returned by CreateRegexPatternSet and by ListRegexPatternSets. - // - // RegexPatternSetId is a required field - RegexPatternSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRegexPatternSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRegexPatternSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRegexPatternSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRegexPatternSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.RegexPatternSetId == nil { - invalidParams.Add(request.NewErrParamRequired("RegexPatternSetId")) - } - if s.RegexPatternSetId != nil && len(*s.RegexPatternSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RegexPatternSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteRegexPatternSetInput) SetChangeToken(v string) *DeleteRegexPatternSetInput { - s.ChangeToken = &v - return s -} - -// SetRegexPatternSetId sets the RegexPatternSetId field's value. -func (s *DeleteRegexPatternSetInput) SetRegexPatternSetId(v string) *DeleteRegexPatternSetInput { - s.RegexPatternSetId = &v - return s -} - -type DeleteRegexPatternSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the DeleteRegexPatternSet request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteRegexPatternSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRegexPatternSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteRegexPatternSetOutput) SetChangeToken(v string) *DeleteRegexPatternSetOutput { - s.ChangeToken = &v - return s -} - -type DeleteRuleGroupInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The RuleGroupId of the RuleGroup that you want to delete. RuleGroupId is - // returned by CreateRuleGroup and by ListRuleGroups. - // - // RuleGroupId is a required field - RuleGroupId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRuleGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRuleGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRuleGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRuleGroupInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.RuleGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("RuleGroupId")) - } - if s.RuleGroupId != nil && len(*s.RuleGroupId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleGroupId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteRuleGroupInput) SetChangeToken(v string) *DeleteRuleGroupInput { - s.ChangeToken = &v - return s -} - -// SetRuleGroupId sets the RuleGroupId field's value. -func (s *DeleteRuleGroupInput) SetRuleGroupId(v string) *DeleteRuleGroupInput { - s.RuleGroupId = &v - return s -} - -type DeleteRuleGroupOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the DeleteRuleGroup request. You - // can also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteRuleGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRuleGroupOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteRuleGroupOutput) SetChangeToken(v string) *DeleteRuleGroupOutput { - s.ChangeToken = &v - return s -} - -type DeleteRuleInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The RuleId of the Rule that you want to delete. RuleId is returned by CreateRule - // and by ListRules. - // - // RuleId is a required field - RuleId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRuleInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.RuleId == nil { - invalidParams.Add(request.NewErrParamRequired("RuleId")) - } - if s.RuleId != nil && len(*s.RuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteRuleInput) SetChangeToken(v string) *DeleteRuleInput { - s.ChangeToken = &v - return s -} - -// SetRuleId sets the RuleId field's value. -func (s *DeleteRuleInput) SetRuleId(v string) *DeleteRuleInput { - s.RuleId = &v - return s -} - -type DeleteRuleOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the DeleteRule request. You can also - // use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteRuleOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteRuleOutput) SetChangeToken(v string) *DeleteRuleOutput { - s.ChangeToken = &v - return s -} - -type DeleteSizeConstraintSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The SizeConstraintSetId of the SizeConstraintSet that you want to delete. - // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets. - // - // SizeConstraintSetId is a required field - SizeConstraintSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSizeConstraintSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSizeConstraintSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSizeConstraintSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSizeConstraintSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.SizeConstraintSetId == nil { - invalidParams.Add(request.NewErrParamRequired("SizeConstraintSetId")) - } - if s.SizeConstraintSetId != nil && len(*s.SizeConstraintSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SizeConstraintSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteSizeConstraintSetInput) SetChangeToken(v string) *DeleteSizeConstraintSetInput { - s.ChangeToken = &v - return s -} - -// SetSizeConstraintSetId sets the SizeConstraintSetId field's value. -func (s *DeleteSizeConstraintSetInput) SetSizeConstraintSetId(v string) *DeleteSizeConstraintSetInput { - s.SizeConstraintSetId = &v - return s -} - -type DeleteSizeConstraintSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the DeleteSizeConstraintSet request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteSizeConstraintSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSizeConstraintSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteSizeConstraintSetOutput) SetChangeToken(v string) *DeleteSizeConstraintSetOutput { - s.ChangeToken = &v - return s -} - -// A request to delete a SqlInjectionMatchSet from AWS WAF. -type DeleteSqlInjectionMatchSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to delete. - // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets. - // - // SqlInjectionMatchSetId is a required field - SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteSqlInjectionMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSqlInjectionMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSqlInjectionMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSqlInjectionMatchSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.SqlInjectionMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchSetId")) - } - if s.SqlInjectionMatchSetId != nil && len(*s.SqlInjectionMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SqlInjectionMatchSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteSqlInjectionMatchSetInput) SetChangeToken(v string) *DeleteSqlInjectionMatchSetInput { - s.ChangeToken = &v - return s -} - -// SetSqlInjectionMatchSetId sets the SqlInjectionMatchSetId field's value. -func (s *DeleteSqlInjectionMatchSetInput) SetSqlInjectionMatchSetId(v string) *DeleteSqlInjectionMatchSetInput { - s.SqlInjectionMatchSetId = &v - return s -} - -// The response to a request to delete a SqlInjectionMatchSet from AWS WAF. -type DeleteSqlInjectionMatchSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the DeleteSqlInjectionMatchSet request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteSqlInjectionMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteSqlInjectionMatchSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteSqlInjectionMatchSetOutput) SetChangeToken(v string) *DeleteSqlInjectionMatchSetOutput { - s.ChangeToken = &v - return s -} - -type DeleteWebACLInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The WebACLId of the WebACL that you want to delete. WebACLId is returned - // by CreateWebACL and by ListWebACLs. - // - // WebACLId is a required field - WebACLId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteWebACLInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteWebACLInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteWebACLInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteWebACLInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.WebACLId == nil { - invalidParams.Add(request.NewErrParamRequired("WebACLId")) - } - if s.WebACLId != nil && len(*s.WebACLId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteWebACLInput) SetChangeToken(v string) *DeleteWebACLInput { - s.ChangeToken = &v - return s -} - -// SetWebACLId sets the WebACLId field's value. -func (s *DeleteWebACLInput) SetWebACLId(v string) *DeleteWebACLInput { - s.WebACLId = &v - return s -} - -type DeleteWebACLOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the DeleteWebACL request. You can - // also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteWebACLOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteWebACLOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteWebACLOutput) SetChangeToken(v string) *DeleteWebACLOutput { - s.ChangeToken = &v - return s -} - -// A request to delete an XssMatchSet from AWS WAF. -type DeleteXssMatchSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The XssMatchSetId of the XssMatchSet that you want to delete. XssMatchSetId - // is returned by CreateXssMatchSet and by ListXssMatchSets. - // - // XssMatchSetId is a required field - XssMatchSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteXssMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteXssMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteXssMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteXssMatchSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.XssMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("XssMatchSetId")) - } - if s.XssMatchSetId != nil && len(*s.XssMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("XssMatchSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteXssMatchSetInput) SetChangeToken(v string) *DeleteXssMatchSetInput { - s.ChangeToken = &v - return s -} - -// SetXssMatchSetId sets the XssMatchSetId field's value. -func (s *DeleteXssMatchSetInput) SetXssMatchSetId(v string) *DeleteXssMatchSetInput { - s.XssMatchSetId = &v - return s -} - -// The response to a request to delete an XssMatchSet from AWS WAF. -type DeleteXssMatchSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the DeleteXssMatchSet request. You - // can also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DeleteXssMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteXssMatchSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteXssMatchSetOutput) SetChangeToken(v string) *DeleteXssMatchSetOutput { - s.ChangeToken = &v - return s -} - -// The rule to exclude from a rule group. This is applicable only when the ActivatedRule -// refers to a RuleGroup. The rule must belong to the RuleGroup that is specified -// by the ActivatedRule. -type ExcludedRule struct { - _ struct{} `type:"structure"` - - // The unique identifier for the rule to exclude from the rule group. - // - // RuleId is a required field - RuleId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ExcludedRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ExcludedRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExcludedRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExcludedRule"} - if s.RuleId == nil { - invalidParams.Add(request.NewErrParamRequired("RuleId")) - } - if s.RuleId != nil && len(*s.RuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleId sets the RuleId field's value. -func (s *ExcludedRule) SetRuleId(v string) *ExcludedRule { - s.RuleId = &v - return s -} - -// Specifies where in a web request to look for TargetString. -type FieldToMatch struct { - _ struct{} `type:"structure"` - - // When the value of Type is HEADER, enter the name of the header that you want - // AWS WAF to search, for example, User-Agent or Referer. The name of the header - // is not case sensitive. - // - // When the value of Type is SINGLE_QUERY_ARG, enter the name of the parameter - // that you want AWS WAF to search, for example, UserName or SalesRegion. The - // parameter name is not case sensitive. - // - // If the value of Type is any other value, omit Data. - Data *string `type:"string"` - - // The part of the web request that you want AWS WAF to search for a specified - // string. Parts of a request that you can search include the following: - // - // * HEADER: A specified request header, for example, the value of the User-Agent - // or Referer header. If you choose HEADER for the type, specify the name - // of the header in Data. - // - // * METHOD: The HTTP method, which indicated the type of operation that - // the request is asking the origin to perform. Amazon CloudFront supports - // the following methods: DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT. - // - // * QUERY_STRING: A query string, which is the part of a URL that appears - // after a ? character, if any. - // - // * URI: The part of a web request that identifies a resource, for example, - // /images/daily-ad.jpg. - // - // * BODY: The part of a request that contains any additional data that you - // want to send to your web server as the HTTP request body, such as data - // from a form. The request body immediately follows the request headers. - // Note that only the first 8192 bytes of the request body are forwarded - // to AWS WAF for inspection. To allow or block requests based on the length - // of the body, you can create a size constraint set. For more information, - // see CreateSizeConstraintSet. - // - // * SINGLE_QUERY_ARG: The parameter in the query string that you will inspect, - // such as UserName or SalesRegion. The maximum length for SINGLE_QUERY_ARG - // is 30 characters. - // - // * ALL_QUERY_ARGS: Similar to SINGLE_QUERY_ARG, but rather than inspecting - // a single parameter, AWS WAF will inspect all parameters within the query - // for the value or regex pattern that you specify in TargetString. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"MatchFieldType"` -} - -// String returns the string representation -func (s FieldToMatch) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FieldToMatch) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FieldToMatch) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FieldToMatch"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetData sets the Data field's value. -func (s *FieldToMatch) SetData(v string) *FieldToMatch { - s.Data = &v - return s -} - -// SetType sets the Type field's value. -func (s *FieldToMatch) SetType(v string) *FieldToMatch { - s.Type = &v - return s -} - -// The country from which web requests originate that you want AWS WAF to search -// for. -type GeoMatchConstraint struct { - _ struct{} `type:"structure"` - - // The type of geographical area you want AWS WAF to search for. Currently Country - // is the only valid value. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"GeoMatchConstraintType"` - - // The country that you want AWS WAF to search for. - // - // Value is a required field - Value *string `type:"string" required:"true" enum:"GeoMatchConstraintValue"` -} - -// String returns the string representation -func (s GeoMatchConstraint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GeoMatchConstraint) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GeoMatchConstraint) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GeoMatchConstraint"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetType sets the Type field's value. -func (s *GeoMatchConstraint) SetType(v string) *GeoMatchConstraint { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *GeoMatchConstraint) SetValue(v string) *GeoMatchConstraint { - s.Value = &v - return s -} - -// Contains one or more countries that AWS WAF will search for. -type GeoMatchSet struct { - _ struct{} `type:"structure"` - - // An array of GeoMatchConstraint objects, which contain the country that you - // want AWS WAF to search for. - // - // GeoMatchConstraints is a required field - GeoMatchConstraints []*GeoMatchConstraint `type:"list" required:"true"` - - // The GeoMatchSetId for an GeoMatchSet. You use GeoMatchSetId to get information - // about a GeoMatchSet (see GeoMatchSet), update a GeoMatchSet (see UpdateGeoMatchSet), - // insert a GeoMatchSet into a Rule or delete one from a Rule (see UpdateRule), - // and delete a GeoMatchSet from AWS WAF (see DeleteGeoMatchSet). - // - // GeoMatchSetId is returned by CreateGeoMatchSet and by ListGeoMatchSets. - // - // GeoMatchSetId is a required field - GeoMatchSetId *string `min:"1" type:"string" required:"true"` - - // A friendly name or description of the GeoMatchSet. You can't change the name - // of an GeoMatchSet after you create it. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GeoMatchSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GeoMatchSet) GoString() string { - return s.String() -} - -// SetGeoMatchConstraints sets the GeoMatchConstraints field's value. -func (s *GeoMatchSet) SetGeoMatchConstraints(v []*GeoMatchConstraint) *GeoMatchSet { - s.GeoMatchConstraints = v - return s -} - -// SetGeoMatchSetId sets the GeoMatchSetId field's value. -func (s *GeoMatchSet) SetGeoMatchSetId(v string) *GeoMatchSet { - s.GeoMatchSetId = &v - return s -} - -// SetName sets the Name field's value. -func (s *GeoMatchSet) SetName(v string) *GeoMatchSet { - s.Name = &v - return s -} - -// Contains the identifier and the name of the GeoMatchSet. -type GeoMatchSetSummary struct { - _ struct{} `type:"structure"` - - // The GeoMatchSetId for an GeoMatchSet. You can use GeoMatchSetId in a GetGeoMatchSet - // request to get detailed information about an GeoMatchSet. - // - // GeoMatchSetId is a required field - GeoMatchSetId *string `min:"1" type:"string" required:"true"` - - // A friendly name or description of the GeoMatchSet. You can't change the name - // of an GeoMatchSet after you create it. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GeoMatchSetSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GeoMatchSetSummary) GoString() string { - return s.String() -} - -// SetGeoMatchSetId sets the GeoMatchSetId field's value. -func (s *GeoMatchSetSummary) SetGeoMatchSetId(v string) *GeoMatchSetSummary { - s.GeoMatchSetId = &v - return s -} - -// SetName sets the Name field's value. -func (s *GeoMatchSetSummary) SetName(v string) *GeoMatchSetSummary { - s.Name = &v - return s -} - -// Specifies the type of update to perform to an GeoMatchSet with UpdateGeoMatchSet. -type GeoMatchSetUpdate struct { - _ struct{} `type:"structure"` - - // Specifies whether to insert or delete a country with UpdateGeoMatchSet. - // - // Action is a required field - Action *string `type:"string" required:"true" enum:"ChangeAction"` - - // The country from which web requests originate that you want AWS WAF to search - // for. - // - // GeoMatchConstraint is a required field - GeoMatchConstraint *GeoMatchConstraint `type:"structure" required:"true"` -} - -// String returns the string representation -func (s GeoMatchSetUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GeoMatchSetUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GeoMatchSetUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GeoMatchSetUpdate"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.GeoMatchConstraint == nil { - invalidParams.Add(request.NewErrParamRequired("GeoMatchConstraint")) - } - if s.GeoMatchConstraint != nil { - if err := s.GeoMatchConstraint.Validate(); err != nil { - invalidParams.AddNested("GeoMatchConstraint", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *GeoMatchSetUpdate) SetAction(v string) *GeoMatchSetUpdate { - s.Action = &v - return s -} - -// SetGeoMatchConstraint sets the GeoMatchConstraint field's value. -func (s *GeoMatchSetUpdate) SetGeoMatchConstraint(v *GeoMatchConstraint) *GeoMatchSetUpdate { - s.GeoMatchConstraint = v - return s -} - -type GetByteMatchSetInput struct { - _ struct{} `type:"structure"` - - // The ByteMatchSetId of the ByteMatchSet that you want to get. ByteMatchSetId - // is returned by CreateByteMatchSet and by ListByteMatchSets. - // - // ByteMatchSetId is a required field - ByteMatchSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetByteMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetByteMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetByteMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetByteMatchSetInput"} - if s.ByteMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("ByteMatchSetId")) - } - if s.ByteMatchSetId != nil && len(*s.ByteMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ByteMatchSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetByteMatchSetId sets the ByteMatchSetId field's value. -func (s *GetByteMatchSetInput) SetByteMatchSetId(v string) *GetByteMatchSetInput { - s.ByteMatchSetId = &v - return s -} - -type GetByteMatchSetOutput struct { - _ struct{} `type:"structure"` - - // Information about the ByteMatchSet that you specified in the GetByteMatchSet - // request. For more information, see the following topics: - // - // * ByteMatchSet: Contains ByteMatchSetId, ByteMatchTuples, and Name - // - // * ByteMatchTuples: Contains an array of ByteMatchTuple objects. Each ByteMatchTuple - // object contains FieldToMatch, PositionalConstraint, TargetString, and - // TextTransformation - // - // * FieldToMatch: Contains Data and Type - ByteMatchSet *ByteMatchSet `type:"structure"` -} - -// String returns the string representation -func (s GetByteMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetByteMatchSetOutput) GoString() string { - return s.String() -} - -// SetByteMatchSet sets the ByteMatchSet field's value. -func (s *GetByteMatchSetOutput) SetByteMatchSet(v *ByteMatchSet) *GetByteMatchSetOutput { - s.ByteMatchSet = v - return s -} - -type GetChangeTokenInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s GetChangeTokenInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetChangeTokenInput) GoString() string { - return s.String() -} - -type GetChangeTokenOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used in the request. Use this value in a GetChangeTokenStatus - // request to get the current status of the request. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetChangeTokenOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetChangeTokenOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *GetChangeTokenOutput) SetChangeToken(v string) *GetChangeTokenOutput { - s.ChangeToken = &v - return s -} - -type GetChangeTokenStatusInput struct { - _ struct{} `type:"structure"` - - // The change token for which you want to get the status. This change token - // was previously returned in the GetChangeToken response. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetChangeTokenStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetChangeTokenStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetChangeTokenStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetChangeTokenStatusInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *GetChangeTokenStatusInput) SetChangeToken(v string) *GetChangeTokenStatusInput { - s.ChangeToken = &v - return s -} - -type GetChangeTokenStatusOutput struct { - _ struct{} `type:"structure"` - - // The status of the change token. - ChangeTokenStatus *string `type:"string" enum:"ChangeTokenStatus"` -} - -// String returns the string representation -func (s GetChangeTokenStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetChangeTokenStatusOutput) GoString() string { - return s.String() -} - -// SetChangeTokenStatus sets the ChangeTokenStatus field's value. -func (s *GetChangeTokenStatusOutput) SetChangeTokenStatus(v string) *GetChangeTokenStatusOutput { - s.ChangeTokenStatus = &v - return s -} - -type GetGeoMatchSetInput struct { - _ struct{} `type:"structure"` - - // The GeoMatchSetId of the GeoMatchSet that you want to get. GeoMatchSetId - // is returned by CreateGeoMatchSet and by ListGeoMatchSets. - // - // GeoMatchSetId is a required field - GeoMatchSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetGeoMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGeoMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetGeoMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetGeoMatchSetInput"} - if s.GeoMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("GeoMatchSetId")) - } - if s.GeoMatchSetId != nil && len(*s.GeoMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GeoMatchSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGeoMatchSetId sets the GeoMatchSetId field's value. -func (s *GetGeoMatchSetInput) SetGeoMatchSetId(v string) *GetGeoMatchSetInput { - s.GeoMatchSetId = &v - return s -} - -type GetGeoMatchSetOutput struct { - _ struct{} `type:"structure"` - - // Information about the GeoMatchSet that you specified in the GetGeoMatchSet - // request. This includes the Type, which for a GeoMatchContraint is always - // Country, as well as the Value, which is the identifier for a specific country. - GeoMatchSet *GeoMatchSet `type:"structure"` -} - -// String returns the string representation -func (s GetGeoMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetGeoMatchSetOutput) GoString() string { - return s.String() -} - -// SetGeoMatchSet sets the GeoMatchSet field's value. -func (s *GetGeoMatchSetOutput) SetGeoMatchSet(v *GeoMatchSet) *GetGeoMatchSetOutput { - s.GeoMatchSet = v - return s -} - -type GetIPSetInput struct { - _ struct{} `type:"structure"` - - // The IPSetId of the IPSet that you want to get. IPSetId is returned by CreateIPSet - // and by ListIPSets. - // - // IPSetId is a required field - IPSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetIPSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIPSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetIPSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetIPSetInput"} - if s.IPSetId == nil { - invalidParams.Add(request.NewErrParamRequired("IPSetId")) - } - if s.IPSetId != nil && len(*s.IPSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IPSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIPSetId sets the IPSetId field's value. -func (s *GetIPSetInput) SetIPSetId(v string) *GetIPSetInput { - s.IPSetId = &v - return s -} - -type GetIPSetOutput struct { - _ struct{} `type:"structure"` - - // Information about the IPSet that you specified in the GetIPSet request. For - // more information, see the following topics: - // - // * IPSet: Contains IPSetDescriptors, IPSetId, and Name - // - // * IPSetDescriptors: Contains an array of IPSetDescriptor objects. Each - // IPSetDescriptor object contains Type and Value - IPSet *IPSet `type:"structure"` -} - -// String returns the string representation -func (s GetIPSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetIPSetOutput) GoString() string { - return s.String() -} - -// SetIPSet sets the IPSet field's value. -func (s *GetIPSetOutput) SetIPSet(v *IPSet) *GetIPSetOutput { - s.IPSet = v - return s -} - -type GetLoggingConfigurationInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the web ACL for which you want to get the - // LoggingConfiguration. - // - // ResourceArn is a required field - ResourceArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetLoggingConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLoggingConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLoggingConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLoggingConfigurationInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *GetLoggingConfigurationInput) SetResourceArn(v string) *GetLoggingConfigurationInput { - s.ResourceArn = &v - return s -} - -type GetLoggingConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The LoggingConfiguration for the specified web ACL. - LoggingConfiguration *LoggingConfiguration `type:"structure"` -} - -// String returns the string representation -func (s GetLoggingConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetLoggingConfigurationOutput) GoString() string { - return s.String() -} - -// SetLoggingConfiguration sets the LoggingConfiguration field's value. -func (s *GetLoggingConfigurationOutput) SetLoggingConfiguration(v *LoggingConfiguration) *GetLoggingConfigurationOutput { - s.LoggingConfiguration = v - return s -} - -type GetPermissionPolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the RuleGroup for which you want to get - // the policy. - // - // ResourceArn is a required field - ResourceArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetPermissionPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPermissionPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPermissionPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPermissionPolicyInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *GetPermissionPolicyInput) SetResourceArn(v string) *GetPermissionPolicyInput { - s.ResourceArn = &v - return s -} - -type GetPermissionPolicyOutput struct { - _ struct{} `type:"structure"` - - // The IAM policy attached to the specified RuleGroup. - Policy *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetPermissionPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetPermissionPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *GetPermissionPolicyOutput) SetPolicy(v string) *GetPermissionPolicyOutput { - s.Policy = &v - return s -} - -type GetRateBasedRuleInput struct { - _ struct{} `type:"structure"` - - // The RuleId of the RateBasedRule that you want to get. RuleId is returned - // by CreateRateBasedRule and by ListRateBasedRules. - // - // RuleId is a required field - RuleId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRateBasedRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRateBasedRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRateBasedRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRateBasedRuleInput"} - if s.RuleId == nil { - invalidParams.Add(request.NewErrParamRequired("RuleId")) - } - if s.RuleId != nil && len(*s.RuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleId sets the RuleId field's value. -func (s *GetRateBasedRuleInput) SetRuleId(v string) *GetRateBasedRuleInput { - s.RuleId = &v - return s -} - -type GetRateBasedRuleManagedKeysInput struct { - _ struct{} `type:"structure"` - - // A null value and not currently used. Do not include this in your request. - NextMarker *string `min:"1" type:"string"` - - // The RuleId of the RateBasedRule for which you want to get a list of ManagedKeys. - // RuleId is returned by CreateRateBasedRule and by ListRateBasedRules. - // - // RuleId is a required field - RuleId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRateBasedRuleManagedKeysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRateBasedRuleManagedKeysInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRateBasedRuleManagedKeysInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRateBasedRuleManagedKeysInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - if s.RuleId == nil { - invalidParams.Add(request.NewErrParamRequired("RuleId")) - } - if s.RuleId != nil && len(*s.RuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextMarker sets the NextMarker field's value. -func (s *GetRateBasedRuleManagedKeysInput) SetNextMarker(v string) *GetRateBasedRuleManagedKeysInput { - s.NextMarker = &v - return s -} - -// SetRuleId sets the RuleId field's value. -func (s *GetRateBasedRuleManagedKeysInput) SetRuleId(v string) *GetRateBasedRuleManagedKeysInput { - s.RuleId = &v - return s -} - -type GetRateBasedRuleManagedKeysOutput struct { - _ struct{} `type:"structure"` - - // An array of IP addresses that currently are blocked by the specified RateBasedRule. - ManagedKeys []*string `type:"list"` - - // A null value and not currently used. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s GetRateBasedRuleManagedKeysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRateBasedRuleManagedKeysOutput) GoString() string { - return s.String() -} - -// SetManagedKeys sets the ManagedKeys field's value. -func (s *GetRateBasedRuleManagedKeysOutput) SetManagedKeys(v []*string) *GetRateBasedRuleManagedKeysOutput { - s.ManagedKeys = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *GetRateBasedRuleManagedKeysOutput) SetNextMarker(v string) *GetRateBasedRuleManagedKeysOutput { - s.NextMarker = &v - return s -} - -type GetRateBasedRuleOutput struct { - _ struct{} `type:"structure"` - - // Information about the RateBasedRule that you specified in the GetRateBasedRule - // request. - Rule *RateBasedRule `type:"structure"` -} - -// String returns the string representation -func (s GetRateBasedRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRateBasedRuleOutput) GoString() string { - return s.String() -} - -// SetRule sets the Rule field's value. -func (s *GetRateBasedRuleOutput) SetRule(v *RateBasedRule) *GetRateBasedRuleOutput { - s.Rule = v - return s -} - -type GetRegexMatchSetInput struct { - _ struct{} `type:"structure"` - - // The RegexMatchSetId of the RegexMatchSet that you want to get. RegexMatchSetId - // is returned by CreateRegexMatchSet and by ListRegexMatchSets. - // - // RegexMatchSetId is a required field - RegexMatchSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRegexMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRegexMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRegexMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRegexMatchSetInput"} - if s.RegexMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("RegexMatchSetId")) - } - if s.RegexMatchSetId != nil && len(*s.RegexMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RegexMatchSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRegexMatchSetId sets the RegexMatchSetId field's value. -func (s *GetRegexMatchSetInput) SetRegexMatchSetId(v string) *GetRegexMatchSetInput { - s.RegexMatchSetId = &v - return s -} - -type GetRegexMatchSetOutput struct { - _ struct{} `type:"structure"` - - // Information about the RegexMatchSet that you specified in the GetRegexMatchSet - // request. For more information, see RegexMatchTuple. - RegexMatchSet *RegexMatchSet `type:"structure"` -} - -// String returns the string representation -func (s GetRegexMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRegexMatchSetOutput) GoString() string { - return s.String() -} - -// SetRegexMatchSet sets the RegexMatchSet field's value. -func (s *GetRegexMatchSetOutput) SetRegexMatchSet(v *RegexMatchSet) *GetRegexMatchSetOutput { - s.RegexMatchSet = v - return s -} - -type GetRegexPatternSetInput struct { - _ struct{} `type:"structure"` - - // The RegexPatternSetId of the RegexPatternSet that you want to get. RegexPatternSetId - // is returned by CreateRegexPatternSet and by ListRegexPatternSets. - // - // RegexPatternSetId is a required field - RegexPatternSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRegexPatternSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRegexPatternSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRegexPatternSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRegexPatternSetInput"} - if s.RegexPatternSetId == nil { - invalidParams.Add(request.NewErrParamRequired("RegexPatternSetId")) - } - if s.RegexPatternSetId != nil && len(*s.RegexPatternSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RegexPatternSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRegexPatternSetId sets the RegexPatternSetId field's value. -func (s *GetRegexPatternSetInput) SetRegexPatternSetId(v string) *GetRegexPatternSetInput { - s.RegexPatternSetId = &v - return s -} - -type GetRegexPatternSetOutput struct { - _ struct{} `type:"structure"` - - // Information about the RegexPatternSet that you specified in the GetRegexPatternSet - // request, including the identifier of the pattern set and the regular expression - // patterns you want AWS WAF to search for. - RegexPatternSet *RegexPatternSet `type:"structure"` -} - -// String returns the string representation -func (s GetRegexPatternSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRegexPatternSetOutput) GoString() string { - return s.String() -} - -// SetRegexPatternSet sets the RegexPatternSet field's value. -func (s *GetRegexPatternSetOutput) SetRegexPatternSet(v *RegexPatternSet) *GetRegexPatternSetOutput { - s.RegexPatternSet = v - return s -} - -type GetRuleGroupInput struct { - _ struct{} `type:"structure"` - - // The RuleGroupId of the RuleGroup that you want to get. RuleGroupId is returned - // by CreateRuleGroup and by ListRuleGroups. - // - // RuleGroupId is a required field - RuleGroupId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRuleGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRuleGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRuleGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRuleGroupInput"} - if s.RuleGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("RuleGroupId")) - } - if s.RuleGroupId != nil && len(*s.RuleGroupId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleGroupId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleGroupId sets the RuleGroupId field's value. -func (s *GetRuleGroupInput) SetRuleGroupId(v string) *GetRuleGroupInput { - s.RuleGroupId = &v - return s -} - -type GetRuleGroupOutput struct { - _ struct{} `type:"structure"` - - // Information about the RuleGroup that you specified in the GetRuleGroup request. - RuleGroup *RuleGroup `type:"structure"` -} - -// String returns the string representation -func (s GetRuleGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRuleGroupOutput) GoString() string { - return s.String() -} - -// SetRuleGroup sets the RuleGroup field's value. -func (s *GetRuleGroupOutput) SetRuleGroup(v *RuleGroup) *GetRuleGroupOutput { - s.RuleGroup = v - return s -} - -type GetRuleInput struct { - _ struct{} `type:"structure"` - - // The RuleId of the Rule that you want to get. RuleId is returned by CreateRule - // and by ListRules. - // - // RuleId is a required field - RuleId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRuleInput"} - if s.RuleId == nil { - invalidParams.Add(request.NewErrParamRequired("RuleId")) - } - if s.RuleId != nil && len(*s.RuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleId sets the RuleId field's value. -func (s *GetRuleInput) SetRuleId(v string) *GetRuleInput { - s.RuleId = &v - return s -} - -type GetRuleOutput struct { - _ struct{} `type:"structure"` - - // Information about the Rule that you specified in the GetRule request. For - // more information, see the following topics: - // - // * Rule: Contains MetricName, Name, an array of Predicate objects, and - // RuleId - // - // * Predicate: Each Predicate object contains DataId, Negated, and Type - Rule *Rule `type:"structure"` -} - -// String returns the string representation -func (s GetRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetRuleOutput) GoString() string { - return s.String() -} - -// SetRule sets the Rule field's value. -func (s *GetRuleOutput) SetRule(v *Rule) *GetRuleOutput { - s.Rule = v - return s -} - -type GetSampledRequestsInput struct { - _ struct{} `type:"structure"` - - // The number of requests that you want AWS WAF to return from among the first - // 5,000 requests that your AWS resource received during the time range. If - // your resource received fewer requests than the value of MaxItems, GetSampledRequests - // returns information about all of them. - // - // MaxItems is a required field - MaxItems *int64 `min:"1" type:"long" required:"true"` - - // RuleId is one of three values: - // - // * The RuleId of the Rule or the RuleGroupId of the RuleGroup for which - // you want GetSampledRequests to return a sample of requests. - // - // * Default_Action, which causes GetSampledRequests to return a sample of - // the requests that didn't match any of the rules in the specified WebACL. - // - // RuleId is a required field - RuleId *string `min:"1" type:"string" required:"true"` - - // The start date and time and the end date and time of the range for which - // you want GetSampledRequests to return a sample of requests. Specify the date - // and time in the following format: "2016-09-27T14:50Z". You can specify any - // time range in the previous three hours. - // - // TimeWindow is a required field - TimeWindow *TimeWindow `type:"structure" required:"true"` - - // The WebACLId of the WebACL for which you want GetSampledRequests to return - // a sample of requests. - // - // WebAclId is a required field - WebAclId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSampledRequestsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSampledRequestsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSampledRequestsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSampledRequestsInput"} - if s.MaxItems == nil { - invalidParams.Add(request.NewErrParamRequired("MaxItems")) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.RuleId == nil { - invalidParams.Add(request.NewErrParamRequired("RuleId")) - } - if s.RuleId != nil && len(*s.RuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleId", 1)) - } - if s.TimeWindow == nil { - invalidParams.Add(request.NewErrParamRequired("TimeWindow")) - } - if s.WebAclId == nil { - invalidParams.Add(request.NewErrParamRequired("WebAclId")) - } - if s.WebAclId != nil && len(*s.WebAclId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WebAclId", 1)) - } - if s.TimeWindow != nil { - if err := s.TimeWindow.Validate(); err != nil { - invalidParams.AddNested("TimeWindow", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxItems sets the MaxItems field's value. -func (s *GetSampledRequestsInput) SetMaxItems(v int64) *GetSampledRequestsInput { - s.MaxItems = &v - return s -} - -// SetRuleId sets the RuleId field's value. -func (s *GetSampledRequestsInput) SetRuleId(v string) *GetSampledRequestsInput { - s.RuleId = &v - return s -} - -// SetTimeWindow sets the TimeWindow field's value. -func (s *GetSampledRequestsInput) SetTimeWindow(v *TimeWindow) *GetSampledRequestsInput { - s.TimeWindow = v - return s -} - -// SetWebAclId sets the WebAclId field's value. -func (s *GetSampledRequestsInput) SetWebAclId(v string) *GetSampledRequestsInput { - s.WebAclId = &v - return s -} - -type GetSampledRequestsOutput struct { - _ struct{} `type:"structure"` - - // The total number of requests from which GetSampledRequests got a sample of - // MaxItems requests. If PopulationSize is less than MaxItems, the sample includes - // every request that your AWS resource received during the specified time range. - PopulationSize *int64 `type:"long"` - - // A complex type that contains detailed information about each of the requests - // in the sample. - SampledRequests []*SampledHTTPRequest `type:"list"` - - // Usually, TimeWindow is the time range that you specified in the GetSampledRequests - // request. However, if your AWS resource received more than 5,000 requests - // during the time range that you specified in the request, GetSampledRequests - // returns the time range for the first 5,000 requests. - TimeWindow *TimeWindow `type:"structure"` -} - -// String returns the string representation -func (s GetSampledRequestsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSampledRequestsOutput) GoString() string { - return s.String() -} - -// SetPopulationSize sets the PopulationSize field's value. -func (s *GetSampledRequestsOutput) SetPopulationSize(v int64) *GetSampledRequestsOutput { - s.PopulationSize = &v - return s -} - -// SetSampledRequests sets the SampledRequests field's value. -func (s *GetSampledRequestsOutput) SetSampledRequests(v []*SampledHTTPRequest) *GetSampledRequestsOutput { - s.SampledRequests = v - return s -} - -// SetTimeWindow sets the TimeWindow field's value. -func (s *GetSampledRequestsOutput) SetTimeWindow(v *TimeWindow) *GetSampledRequestsOutput { - s.TimeWindow = v - return s -} - -type GetSizeConstraintSetInput struct { - _ struct{} `type:"structure"` - - // The SizeConstraintSetId of the SizeConstraintSet that you want to get. SizeConstraintSetId - // is returned by CreateSizeConstraintSet and by ListSizeConstraintSets. - // - // SizeConstraintSetId is a required field - SizeConstraintSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSizeConstraintSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSizeConstraintSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSizeConstraintSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSizeConstraintSetInput"} - if s.SizeConstraintSetId == nil { - invalidParams.Add(request.NewErrParamRequired("SizeConstraintSetId")) - } - if s.SizeConstraintSetId != nil && len(*s.SizeConstraintSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SizeConstraintSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSizeConstraintSetId sets the SizeConstraintSetId field's value. -func (s *GetSizeConstraintSetInput) SetSizeConstraintSetId(v string) *GetSizeConstraintSetInput { - s.SizeConstraintSetId = &v - return s -} - -type GetSizeConstraintSetOutput struct { - _ struct{} `type:"structure"` - - // Information about the SizeConstraintSet that you specified in the GetSizeConstraintSet - // request. For more information, see the following topics: - // - // * SizeConstraintSet: Contains SizeConstraintSetId, SizeConstraints, and - // Name - // - // * SizeConstraints: Contains an array of SizeConstraint objects. Each SizeConstraint - // object contains FieldToMatch, TextTransformation, ComparisonOperator, - // and Size - // - // * FieldToMatch: Contains Data and Type - SizeConstraintSet *SizeConstraintSet `type:"structure"` -} - -// String returns the string representation -func (s GetSizeConstraintSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSizeConstraintSetOutput) GoString() string { - return s.String() -} - -// SetSizeConstraintSet sets the SizeConstraintSet field's value. -func (s *GetSizeConstraintSetOutput) SetSizeConstraintSet(v *SizeConstraintSet) *GetSizeConstraintSetOutput { - s.SizeConstraintSet = v - return s -} - -// A request to get a SqlInjectionMatchSet. -type GetSqlInjectionMatchSetInput struct { - _ struct{} `type:"structure"` - - // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to get. - // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets. - // - // SqlInjectionMatchSetId is a required field - SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetSqlInjectionMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSqlInjectionMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSqlInjectionMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSqlInjectionMatchSetInput"} - if s.SqlInjectionMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchSetId")) - } - if s.SqlInjectionMatchSetId != nil && len(*s.SqlInjectionMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SqlInjectionMatchSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSqlInjectionMatchSetId sets the SqlInjectionMatchSetId field's value. -func (s *GetSqlInjectionMatchSetInput) SetSqlInjectionMatchSetId(v string) *GetSqlInjectionMatchSetInput { - s.SqlInjectionMatchSetId = &v - return s -} - -// The response to a GetSqlInjectionMatchSet request. -type GetSqlInjectionMatchSetOutput struct { - _ struct{} `type:"structure"` - - // Information about the SqlInjectionMatchSet that you specified in the GetSqlInjectionMatchSet - // request. For more information, see the following topics: - // - // * SqlInjectionMatchSet: Contains Name, SqlInjectionMatchSetId, and an - // array of SqlInjectionMatchTuple objects - // - // * SqlInjectionMatchTuple: Each SqlInjectionMatchTuple object contains - // FieldToMatch and TextTransformation - // - // * FieldToMatch: Contains Data and Type - SqlInjectionMatchSet *SqlInjectionMatchSet `type:"structure"` -} - -// String returns the string representation -func (s GetSqlInjectionMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetSqlInjectionMatchSetOutput) GoString() string { - return s.String() -} - -// SetSqlInjectionMatchSet sets the SqlInjectionMatchSet field's value. -func (s *GetSqlInjectionMatchSetOutput) SetSqlInjectionMatchSet(v *SqlInjectionMatchSet) *GetSqlInjectionMatchSetOutput { - s.SqlInjectionMatchSet = v - return s -} - -type GetWebACLInput struct { - _ struct{} `type:"structure"` - - // The WebACLId of the WebACL that you want to get. WebACLId is returned by - // CreateWebACL and by ListWebACLs. - // - // WebACLId is a required field - WebACLId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetWebACLInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetWebACLInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetWebACLInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetWebACLInput"} - if s.WebACLId == nil { - invalidParams.Add(request.NewErrParamRequired("WebACLId")) - } - if s.WebACLId != nil && len(*s.WebACLId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWebACLId sets the WebACLId field's value. -func (s *GetWebACLInput) SetWebACLId(v string) *GetWebACLInput { - s.WebACLId = &v - return s -} - -type GetWebACLOutput struct { - _ struct{} `type:"structure"` - - // Information about the WebACL that you specified in the GetWebACL request. - // For more information, see the following topics: - // - // * WebACL: Contains DefaultAction, MetricName, Name, an array of Rule objects, - // and WebACLId - // - // * DefaultAction (Data type is WafAction): Contains Type - // - // * Rules: Contains an array of ActivatedRule objects, which contain Action, - // Priority, and RuleId - // - // * Action: Contains Type - WebACL *WebACL `type:"structure"` -} - -// String returns the string representation -func (s GetWebACLOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetWebACLOutput) GoString() string { - return s.String() -} - -// SetWebACL sets the WebACL field's value. -func (s *GetWebACLOutput) SetWebACL(v *WebACL) *GetWebACLOutput { - s.WebACL = v - return s -} - -// A request to get an XssMatchSet. -type GetXssMatchSetInput struct { - _ struct{} `type:"structure"` - - // The XssMatchSetId of the XssMatchSet that you want to get. XssMatchSetId - // is returned by CreateXssMatchSet and by ListXssMatchSets. - // - // XssMatchSetId is a required field - XssMatchSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetXssMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetXssMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetXssMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetXssMatchSetInput"} - if s.XssMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("XssMatchSetId")) - } - if s.XssMatchSetId != nil && len(*s.XssMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("XssMatchSetId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetXssMatchSetId sets the XssMatchSetId field's value. -func (s *GetXssMatchSetInput) SetXssMatchSetId(v string) *GetXssMatchSetInput { - s.XssMatchSetId = &v - return s -} - -// The response to a GetXssMatchSet request. -type GetXssMatchSetOutput struct { - _ struct{} `type:"structure"` - - // Information about the XssMatchSet that you specified in the GetXssMatchSet - // request. For more information, see the following topics: - // - // * XssMatchSet: Contains Name, XssMatchSetId, and an array of XssMatchTuple - // objects - // - // * XssMatchTuple: Each XssMatchTuple object contains FieldToMatch and TextTransformation - // - // * FieldToMatch: Contains Data and Type - XssMatchSet *XssMatchSet `type:"structure"` -} - -// String returns the string representation -func (s GetXssMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetXssMatchSetOutput) GoString() string { - return s.String() -} - -// SetXssMatchSet sets the XssMatchSet field's value. -func (s *GetXssMatchSetOutput) SetXssMatchSet(v *XssMatchSet) *GetXssMatchSetOutput { - s.XssMatchSet = v - return s -} - -// The response from a GetSampledRequests request includes an HTTPHeader complex -// type that appears as Headers in the response syntax. HTTPHeader contains -// the names and values of all of the headers that appear in one of the web -// requests that were returned by GetSampledRequests. -type HTTPHeader struct { - _ struct{} `type:"structure"` - - // The name of one of the headers in the sampled web request. - Name *string `type:"string"` - - // The value of one of the headers in the sampled web request. - Value *string `type:"string"` -} - -// String returns the string representation -func (s HTTPHeader) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HTTPHeader) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *HTTPHeader) SetName(v string) *HTTPHeader { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *HTTPHeader) SetValue(v string) *HTTPHeader { - s.Value = &v - return s -} - -// The response from a GetSampledRequests request includes an HTTPRequest complex -// type that appears as Request in the response syntax. HTTPRequest contains -// information about one of the web requests that were returned by GetSampledRequests. -type HTTPRequest struct { - _ struct{} `type:"structure"` - - // The IP address that the request originated from. If the WebACL is associated - // with a CloudFront distribution, this is the value of one of the following - // fields in CloudFront access logs: - // - // * c-ip, if the viewer did not use an HTTP proxy or a load balancer to - // send the request - // - // * x-forwarded-for, if the viewer did use an HTTP proxy or a load balancer - // to send the request - ClientIP *string `type:"string"` - - // The two-letter country code for the country that the request originated from. - // For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2 - // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). - Country *string `type:"string"` - - // The HTTP version specified in the sampled web request, for example, HTTP/1.1. - HTTPVersion *string `type:"string"` - - // A complex type that contains two values for each header in the sampled web - // request: the name of the header and the value of the header. - Headers []*HTTPHeader `type:"list"` - - // The HTTP method specified in the sampled web request. CloudFront supports - // the following methods: DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT. - Method *string `type:"string"` - - // The part of a web request that identifies the resource, for example, /images/daily-ad.jpg. - URI *string `type:"string"` -} - -// String returns the string representation -func (s HTTPRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HTTPRequest) GoString() string { - return s.String() -} - -// SetClientIP sets the ClientIP field's value. -func (s *HTTPRequest) SetClientIP(v string) *HTTPRequest { - s.ClientIP = &v - return s -} - -// SetCountry sets the Country field's value. -func (s *HTTPRequest) SetCountry(v string) *HTTPRequest { - s.Country = &v - return s -} - -// SetHTTPVersion sets the HTTPVersion field's value. -func (s *HTTPRequest) SetHTTPVersion(v string) *HTTPRequest { - s.HTTPVersion = &v - return s -} - -// SetHeaders sets the Headers field's value. -func (s *HTTPRequest) SetHeaders(v []*HTTPHeader) *HTTPRequest { - s.Headers = v - return s -} - -// SetMethod sets the Method field's value. -func (s *HTTPRequest) SetMethod(v string) *HTTPRequest { - s.Method = &v - return s -} - -// SetURI sets the URI field's value. -func (s *HTTPRequest) SetURI(v string) *HTTPRequest { - s.URI = &v - return s -} - -// Contains one or more IP addresses or blocks of IP addresses specified in -// Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports IPv4 address -// ranges: /8 and any range between /16 through /32. AWS WAF supports IPv6 address -// ranges: /16, /24, /32, /48, /56, /64, and /128. -// -// To specify an individual IP address, you specify the four-part IP address -// followed by a /32, for example, 192.0.2.0/31. To block a range of IP addresses, -// you can specify /8 or any range between /16 through /32 (for IPv4) or /16, -// /24, /32, /48, /56, /64, or /128 (for IPv6). For more information about CIDR -// notation, see the Wikipedia entry Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). -type IPSet struct { - _ struct{} `type:"structure"` - - // The IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) - // that web requests originate from. If the WebACL is associated with a CloudFront - // distribution and the viewer did not use an HTTP proxy or a load balancer - // to send the request, this is the value of the c-ip field in the CloudFront - // access logs. - // - // IPSetDescriptors is a required field - IPSetDescriptors []*IPSetDescriptor `type:"list" required:"true"` - - // The IPSetId for an IPSet. You use IPSetId to get information about an IPSet - // (see GetIPSet), update an IPSet (see UpdateIPSet), insert an IPSet into a - // Rule or delete one from a Rule (see UpdateRule), and delete an IPSet from - // AWS WAF (see DeleteIPSet). - // - // IPSetId is returned by CreateIPSet and by ListIPSets. - // - // IPSetId is a required field - IPSetId *string `min:"1" type:"string" required:"true"` - - // A friendly name or description of the IPSet. You can't change the name of - // an IPSet after you create it. - Name *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s IPSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IPSet) GoString() string { - return s.String() -} - -// SetIPSetDescriptors sets the IPSetDescriptors field's value. -func (s *IPSet) SetIPSetDescriptors(v []*IPSetDescriptor) *IPSet { - s.IPSetDescriptors = v - return s -} - -// SetIPSetId sets the IPSetId field's value. -func (s *IPSet) SetIPSetId(v string) *IPSet { - s.IPSetId = &v - return s -} - -// SetName sets the Name field's value. -func (s *IPSet) SetName(v string) *IPSet { - s.Name = &v - return s -} - -// Specifies the IP address type (IPV4 or IPV6) and the IP address range (in -// CIDR format) that web requests originate from. -type IPSetDescriptor struct { - _ struct{} `type:"structure"` - - // Specify IPV4 or IPV6. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"IPSetDescriptorType"` - - // Specify an IPv4 address by using CIDR notation. For example: - // - // * To configure AWS WAF to allow, block, or count requests that originated - // from the IP address 192.0.2.44, specify 192.0.2.44/32. - // - // * To configure AWS WAF to allow, block, or count requests that originated - // from IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24. - // - // For more information about CIDR notation, see the Wikipedia entry Classless - // Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). - // - // Specify an IPv6 address by using CIDR notation. For example: - // - // * To configure AWS WAF to allow, block, or count requests that originated - // from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify 1111:0000:0000:0000:0000:0000:0000:0111/128. - // - // * To configure AWS WAF to allow, block, or count requests that originated - // from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, - // specify 1111:0000:0000:0000:0000:0000:0000:0000/64. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s IPSetDescriptor) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IPSetDescriptor) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IPSetDescriptor) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IPSetDescriptor"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetType sets the Type field's value. -func (s *IPSetDescriptor) SetType(v string) *IPSetDescriptor { - s.Type = &v - return s -} - -// SetValue sets the Value field's value. -func (s *IPSetDescriptor) SetValue(v string) *IPSetDescriptor { - s.Value = &v - return s -} - -// Contains the identifier and the name of the IPSet. -type IPSetSummary struct { - _ struct{} `type:"structure"` - - // The IPSetId for an IPSet. You can use IPSetId in a GetIPSet request to get - // detailed information about an IPSet. - // - // IPSetId is a required field - IPSetId *string `min:"1" type:"string" required:"true"` - - // A friendly name or description of the IPSet. You can't change the name of - // an IPSet after you create it. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s IPSetSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IPSetSummary) GoString() string { - return s.String() -} - -// SetIPSetId sets the IPSetId field's value. -func (s *IPSetSummary) SetIPSetId(v string) *IPSetSummary { - s.IPSetId = &v - return s -} - -// SetName sets the Name field's value. -func (s *IPSetSummary) SetName(v string) *IPSetSummary { - s.Name = &v - return s -} - -// Specifies the type of update to perform to an IPSet with UpdateIPSet. -type IPSetUpdate struct { - _ struct{} `type:"structure"` - - // Specifies whether to insert or delete an IP address with UpdateIPSet. - // - // Action is a required field - Action *string `type:"string" required:"true" enum:"ChangeAction"` - - // The IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) - // that web requests originate from. - // - // IPSetDescriptor is a required field - IPSetDescriptor *IPSetDescriptor `type:"structure" required:"true"` -} - -// String returns the string representation -func (s IPSetUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IPSetUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IPSetUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IPSetUpdate"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.IPSetDescriptor == nil { - invalidParams.Add(request.NewErrParamRequired("IPSetDescriptor")) - } - if s.IPSetDescriptor != nil { - if err := s.IPSetDescriptor.Validate(); err != nil { - invalidParams.AddNested("IPSetDescriptor", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *IPSetUpdate) SetAction(v string) *IPSetUpdate { - s.Action = &v - return s -} - -// SetIPSetDescriptor sets the IPSetDescriptor field's value. -func (s *IPSetUpdate) SetIPSetDescriptor(v *IPSetDescriptor) *IPSetUpdate { - s.IPSetDescriptor = v - return s -} - -type ListActivatedRulesInRuleGroupInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of ActivatedRules that you want AWS WAF to return for - // this request. If you have more ActivatedRules than the number that you specify - // for Limit, the response includes a NextMarker value that you can use to get - // another batch of ActivatedRules. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more ActivatedRules than the - // value of Limit, AWS WAF returns a NextMarker value in the response that allows - // you to list another group of ActivatedRules. For the second and subsequent - // ListActivatedRulesInRuleGroup requests, specify the value of NextMarker from - // the previous response to get information about another batch of ActivatedRules. - NextMarker *string `min:"1" type:"string"` - - // The RuleGroupId of the RuleGroup for which you want to get a list of ActivatedRule - // objects. - RuleGroupId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListActivatedRulesInRuleGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListActivatedRulesInRuleGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListActivatedRulesInRuleGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListActivatedRulesInRuleGroupInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - if s.RuleGroupId != nil && len(*s.RuleGroupId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleGroupId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListActivatedRulesInRuleGroupInput) SetLimit(v int64) *ListActivatedRulesInRuleGroupInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListActivatedRulesInRuleGroupInput) SetNextMarker(v string) *ListActivatedRulesInRuleGroupInput { - s.NextMarker = &v - return s -} - -// SetRuleGroupId sets the RuleGroupId field's value. -func (s *ListActivatedRulesInRuleGroupInput) SetRuleGroupId(v string) *ListActivatedRulesInRuleGroupInput { - s.RuleGroupId = &v - return s -} - -type ListActivatedRulesInRuleGroupOutput struct { - _ struct{} `type:"structure"` - - // An array of ActivatedRules objects. - ActivatedRules []*ActivatedRule `type:"list"` - - // If you have more ActivatedRules than the number that you specified for Limit - // in the request, the response includes a NextMarker value. To list more ActivatedRules, - // submit another ListActivatedRulesInRuleGroup request, and specify the NextMarker - // value from the response in the NextMarker value in the next request. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListActivatedRulesInRuleGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListActivatedRulesInRuleGroupOutput) GoString() string { - return s.String() -} - -// SetActivatedRules sets the ActivatedRules field's value. -func (s *ListActivatedRulesInRuleGroupOutput) SetActivatedRules(v []*ActivatedRule) *ListActivatedRulesInRuleGroupOutput { - s.ActivatedRules = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListActivatedRulesInRuleGroupOutput) SetNextMarker(v string) *ListActivatedRulesInRuleGroupOutput { - s.NextMarker = &v - return s -} - -type ListByteMatchSetsInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of ByteMatchSet objects that you want AWS WAF to return - // for this request. If you have more ByteMatchSets objects than the number - // you specify for Limit, the response includes a NextMarker value that you - // can use to get another batch of ByteMatchSet objects. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more ByteMatchSets than the - // value of Limit, AWS WAF returns a NextMarker value in the response that allows - // you to list another group of ByteMatchSets. For the second and subsequent - // ListByteMatchSets requests, specify the value of NextMarker from the previous - // response to get information about another batch of ByteMatchSets. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListByteMatchSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListByteMatchSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListByteMatchSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListByteMatchSetsInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListByteMatchSetsInput) SetLimit(v int64) *ListByteMatchSetsInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListByteMatchSetsInput) SetNextMarker(v string) *ListByteMatchSetsInput { - s.NextMarker = &v - return s -} - -type ListByteMatchSetsOutput struct { - _ struct{} `type:"structure"` - - // An array of ByteMatchSetSummary objects. - ByteMatchSets []*ByteMatchSetSummary `type:"list"` - - // If you have more ByteMatchSet objects than the number that you specified - // for Limit in the request, the response includes a NextMarker value. To list - // more ByteMatchSet objects, submit another ListByteMatchSets request, and - // specify the NextMarker value from the response in the NextMarker value in - // the next request. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListByteMatchSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListByteMatchSetsOutput) GoString() string { - return s.String() -} - -// SetByteMatchSets sets the ByteMatchSets field's value. -func (s *ListByteMatchSetsOutput) SetByteMatchSets(v []*ByteMatchSetSummary) *ListByteMatchSetsOutput { - s.ByteMatchSets = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListByteMatchSetsOutput) SetNextMarker(v string) *ListByteMatchSetsOutput { - s.NextMarker = &v - return s -} - -type ListGeoMatchSetsInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of GeoMatchSet objects that you want AWS WAF to return - // for this request. If you have more GeoMatchSet objects than the number you - // specify for Limit, the response includes a NextMarker value that you can - // use to get another batch of GeoMatchSet objects. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more GeoMatchSets than the - // value of Limit, AWS WAF returns a NextMarker value in the response that allows - // you to list another group of GeoMatchSet objects. For the second and subsequent - // ListGeoMatchSets requests, specify the value of NextMarker from the previous - // response to get information about another batch of GeoMatchSet objects. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListGeoMatchSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListGeoMatchSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListGeoMatchSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListGeoMatchSetsInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListGeoMatchSetsInput) SetLimit(v int64) *ListGeoMatchSetsInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListGeoMatchSetsInput) SetNextMarker(v string) *ListGeoMatchSetsInput { - s.NextMarker = &v - return s -} - -type ListGeoMatchSetsOutput struct { - _ struct{} `type:"structure"` - - // An array of GeoMatchSetSummary objects. - GeoMatchSets []*GeoMatchSetSummary `type:"list"` - - // If you have more GeoMatchSet objects than the number that you specified for - // Limit in the request, the response includes a NextMarker value. To list more - // GeoMatchSet objects, submit another ListGeoMatchSets request, and specify - // the NextMarker value from the response in the NextMarker value in the next - // request. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListGeoMatchSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListGeoMatchSetsOutput) GoString() string { - return s.String() -} - -// SetGeoMatchSets sets the GeoMatchSets field's value. -func (s *ListGeoMatchSetsOutput) SetGeoMatchSets(v []*GeoMatchSetSummary) *ListGeoMatchSetsOutput { - s.GeoMatchSets = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListGeoMatchSetsOutput) SetNextMarker(v string) *ListGeoMatchSetsOutput { - s.NextMarker = &v - return s -} - -type ListIPSetsInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of IPSet objects that you want AWS WAF to return for - // this request. If you have more IPSet objects than the number you specify - // for Limit, the response includes a NextMarker value that you can use to get - // another batch of IPSet objects. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more IPSets than the value - // of Limit, AWS WAF returns a NextMarker value in the response that allows - // you to list another group of IPSets. For the second and subsequent ListIPSets - // requests, specify the value of NextMarker from the previous response to get - // information about another batch of IPSets. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListIPSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIPSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListIPSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListIPSetsInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListIPSetsInput) SetLimit(v int64) *ListIPSetsInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListIPSetsInput) SetNextMarker(v string) *ListIPSetsInput { - s.NextMarker = &v - return s -} - -type ListIPSetsOutput struct { - _ struct{} `type:"structure"` - - // An array of IPSetSummary objects. - IPSets []*IPSetSummary `type:"list"` - - // If you have more IPSet objects than the number that you specified for Limit - // in the request, the response includes a NextMarker value. To list more IPSet - // objects, submit another ListIPSets request, and specify the NextMarker value - // from the response in the NextMarker value in the next request. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListIPSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListIPSetsOutput) GoString() string { - return s.String() -} - -// SetIPSets sets the IPSets field's value. -func (s *ListIPSetsOutput) SetIPSets(v []*IPSetSummary) *ListIPSetsOutput { - s.IPSets = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListIPSetsOutput) SetNextMarker(v string) *ListIPSetsOutput { - s.NextMarker = &v - return s -} - -type ListLoggingConfigurationsInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of LoggingConfigurations that you want AWS WAF to return - // for this request. If you have more LoggingConfigurations than the number - // that you specify for Limit, the response includes a NextMarker value that - // you can use to get another batch of LoggingConfigurations. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more LoggingConfigurations - // than the value of Limit, AWS WAF returns a NextMarker value in the response - // that allows you to list another group of LoggingConfigurations. For the second - // and subsequent ListLoggingConfigurations requests, specify the value of NextMarker - // from the previous response to get information about another batch of ListLoggingConfigurations. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListLoggingConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLoggingConfigurationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListLoggingConfigurationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListLoggingConfigurationsInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListLoggingConfigurationsInput) SetLimit(v int64) *ListLoggingConfigurationsInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListLoggingConfigurationsInput) SetNextMarker(v string) *ListLoggingConfigurationsInput { - s.NextMarker = &v - return s -} - -type ListLoggingConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // An array of LoggingConfiguration objects. - LoggingConfigurations []*LoggingConfiguration `type:"list"` - - // If you have more LoggingConfigurations than the number that you specified - // for Limit in the request, the response includes a NextMarker value. To list - // more LoggingConfigurations, submit another ListLoggingConfigurations request, - // and specify the NextMarker value from the response in the NextMarker value - // in the next request. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListLoggingConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListLoggingConfigurationsOutput) GoString() string { - return s.String() -} - -// SetLoggingConfigurations sets the LoggingConfigurations field's value. -func (s *ListLoggingConfigurationsOutput) SetLoggingConfigurations(v []*LoggingConfiguration) *ListLoggingConfigurationsOutput { - s.LoggingConfigurations = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListLoggingConfigurationsOutput) SetNextMarker(v string) *ListLoggingConfigurationsOutput { - s.NextMarker = &v - return s -} - -type ListRateBasedRulesInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of Rules that you want AWS WAF to return for this request. - // If you have more Rules than the number that you specify for Limit, the response - // includes a NextMarker value that you can use to get another batch of Rules. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more Rules than the value of - // Limit, AWS WAF returns a NextMarker value in the response that allows you - // to list another group of Rules. For the second and subsequent ListRateBasedRules - // requests, specify the value of NextMarker from the previous response to get - // information about another batch of Rules. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListRateBasedRulesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRateBasedRulesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRateBasedRulesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRateBasedRulesInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListRateBasedRulesInput) SetLimit(v int64) *ListRateBasedRulesInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListRateBasedRulesInput) SetNextMarker(v string) *ListRateBasedRulesInput { - s.NextMarker = &v - return s -} - -type ListRateBasedRulesOutput struct { - _ struct{} `type:"structure"` - - // If you have more Rules than the number that you specified for Limit in the - // request, the response includes a NextMarker value. To list more Rules, submit - // another ListRateBasedRules request, and specify the NextMarker value from - // the response in the NextMarker value in the next request. - NextMarker *string `min:"1" type:"string"` - - // An array of RuleSummary objects. - Rules []*RuleSummary `type:"list"` -} - -// String returns the string representation -func (s ListRateBasedRulesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRateBasedRulesOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListRateBasedRulesOutput) SetNextMarker(v string) *ListRateBasedRulesOutput { - s.NextMarker = &v - return s -} - -// SetRules sets the Rules field's value. -func (s *ListRateBasedRulesOutput) SetRules(v []*RuleSummary) *ListRateBasedRulesOutput { - s.Rules = v - return s -} - -type ListRegexMatchSetsInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of RegexMatchSet objects that you want AWS WAF to return - // for this request. If you have more RegexMatchSet objects than the number - // you specify for Limit, the response includes a NextMarker value that you - // can use to get another batch of RegexMatchSet objects. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more RegexMatchSet objects - // than the value of Limit, AWS WAF returns a NextMarker value in the response - // that allows you to list another group of ByteMatchSets. For the second and - // subsequent ListRegexMatchSets requests, specify the value of NextMarker from - // the previous response to get information about another batch of RegexMatchSet - // objects. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListRegexMatchSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRegexMatchSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRegexMatchSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRegexMatchSetsInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListRegexMatchSetsInput) SetLimit(v int64) *ListRegexMatchSetsInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListRegexMatchSetsInput) SetNextMarker(v string) *ListRegexMatchSetsInput { - s.NextMarker = &v - return s -} - -type ListRegexMatchSetsOutput struct { - _ struct{} `type:"structure"` - - // If you have more RegexMatchSet objects than the number that you specified - // for Limit in the request, the response includes a NextMarker value. To list - // more RegexMatchSet objects, submit another ListRegexMatchSets request, and - // specify the NextMarker value from the response in the NextMarker value in - // the next request. - NextMarker *string `min:"1" type:"string"` - - // An array of RegexMatchSetSummary objects. - RegexMatchSets []*RegexMatchSetSummary `type:"list"` -} - -// String returns the string representation -func (s ListRegexMatchSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRegexMatchSetsOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListRegexMatchSetsOutput) SetNextMarker(v string) *ListRegexMatchSetsOutput { - s.NextMarker = &v - return s -} - -// SetRegexMatchSets sets the RegexMatchSets field's value. -func (s *ListRegexMatchSetsOutput) SetRegexMatchSets(v []*RegexMatchSetSummary) *ListRegexMatchSetsOutput { - s.RegexMatchSets = v - return s -} - -type ListRegexPatternSetsInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of RegexPatternSet objects that you want AWS WAF to - // return for this request. If you have more RegexPatternSet objects than the - // number you specify for Limit, the response includes a NextMarker value that - // you can use to get another batch of RegexPatternSet objects. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more RegexPatternSet objects - // than the value of Limit, AWS WAF returns a NextMarker value in the response - // that allows you to list another group of RegexPatternSet objects. For the - // second and subsequent ListRegexPatternSets requests, specify the value of - // NextMarker from the previous response to get information about another batch - // of RegexPatternSet objects. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListRegexPatternSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRegexPatternSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRegexPatternSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRegexPatternSetsInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListRegexPatternSetsInput) SetLimit(v int64) *ListRegexPatternSetsInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListRegexPatternSetsInput) SetNextMarker(v string) *ListRegexPatternSetsInput { - s.NextMarker = &v - return s -} - -type ListRegexPatternSetsOutput struct { - _ struct{} `type:"structure"` - - // If you have more RegexPatternSet objects than the number that you specified - // for Limit in the request, the response includes a NextMarker value. To list - // more RegexPatternSet objects, submit another ListRegexPatternSets request, - // and specify the NextMarker value from the response in the NextMarker value - // in the next request. - NextMarker *string `min:"1" type:"string"` - - // An array of RegexPatternSetSummary objects. - RegexPatternSets []*RegexPatternSetSummary `type:"list"` -} - -// String returns the string representation -func (s ListRegexPatternSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRegexPatternSetsOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListRegexPatternSetsOutput) SetNextMarker(v string) *ListRegexPatternSetsOutput { - s.NextMarker = &v - return s -} - -// SetRegexPatternSets sets the RegexPatternSets field's value. -func (s *ListRegexPatternSetsOutput) SetRegexPatternSets(v []*RegexPatternSetSummary) *ListRegexPatternSetsOutput { - s.RegexPatternSets = v - return s -} - -type ListRuleGroupsInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of RuleGroups that you want AWS WAF to return for this - // request. If you have more RuleGroups than the number that you specify for - // Limit, the response includes a NextMarker value that you can use to get another - // batch of RuleGroups. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more RuleGroups than the value - // of Limit, AWS WAF returns a NextMarker value in the response that allows - // you to list another group of RuleGroups. For the second and subsequent ListRuleGroups - // requests, specify the value of NextMarker from the previous response to get - // information about another batch of RuleGroups. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListRuleGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRuleGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRuleGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRuleGroupsInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListRuleGroupsInput) SetLimit(v int64) *ListRuleGroupsInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListRuleGroupsInput) SetNextMarker(v string) *ListRuleGroupsInput { - s.NextMarker = &v - return s -} - -type ListRuleGroupsOutput struct { - _ struct{} `type:"structure"` - - // If you have more RuleGroups than the number that you specified for Limit - // in the request, the response includes a NextMarker value. To list more RuleGroups, - // submit another ListRuleGroups request, and specify the NextMarker value from - // the response in the NextMarker value in the next request. - NextMarker *string `min:"1" type:"string"` - - // An array of RuleGroup objects. - RuleGroups []*RuleGroupSummary `type:"list"` -} - -// String returns the string representation -func (s ListRuleGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRuleGroupsOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListRuleGroupsOutput) SetNextMarker(v string) *ListRuleGroupsOutput { - s.NextMarker = &v - return s -} - -// SetRuleGroups sets the RuleGroups field's value. -func (s *ListRuleGroupsOutput) SetRuleGroups(v []*RuleGroupSummary) *ListRuleGroupsOutput { - s.RuleGroups = v - return s -} - -type ListRulesInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of Rules that you want AWS WAF to return for this request. - // If you have more Rules than the number that you specify for Limit, the response - // includes a NextMarker value that you can use to get another batch of Rules. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more Rules than the value of - // Limit, AWS WAF returns a NextMarker value in the response that allows you - // to list another group of Rules. For the second and subsequent ListRules requests, - // specify the value of NextMarker from the previous response to get information - // about another batch of Rules. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListRulesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRulesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRulesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRulesInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListRulesInput) SetLimit(v int64) *ListRulesInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListRulesInput) SetNextMarker(v string) *ListRulesInput { - s.NextMarker = &v - return s -} - -type ListRulesOutput struct { - _ struct{} `type:"structure"` - - // If you have more Rules than the number that you specified for Limit in the - // request, the response includes a NextMarker value. To list more Rules, submit - // another ListRules request, and specify the NextMarker value from the response - // in the NextMarker value in the next request. - NextMarker *string `min:"1" type:"string"` - - // An array of RuleSummary objects. - Rules []*RuleSummary `type:"list"` -} - -// String returns the string representation -func (s ListRulesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRulesOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListRulesOutput) SetNextMarker(v string) *ListRulesOutput { - s.NextMarker = &v - return s -} - -// SetRules sets the Rules field's value. -func (s *ListRulesOutput) SetRules(v []*RuleSummary) *ListRulesOutput { - s.Rules = v - return s -} - -type ListSizeConstraintSetsInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of SizeConstraintSet objects that you want AWS WAF to - // return for this request. If you have more SizeConstraintSets objects than - // the number you specify for Limit, the response includes a NextMarker value - // that you can use to get another batch of SizeConstraintSet objects. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more SizeConstraintSets than - // the value of Limit, AWS WAF returns a NextMarker value in the response that - // allows you to list another group of SizeConstraintSets. For the second and - // subsequent ListSizeConstraintSets requests, specify the value of NextMarker - // from the previous response to get information about another batch of SizeConstraintSets. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListSizeConstraintSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSizeConstraintSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSizeConstraintSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSizeConstraintSetsInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListSizeConstraintSetsInput) SetLimit(v int64) *ListSizeConstraintSetsInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListSizeConstraintSetsInput) SetNextMarker(v string) *ListSizeConstraintSetsInput { - s.NextMarker = &v - return s -} - -type ListSizeConstraintSetsOutput struct { - _ struct{} `type:"structure"` - - // If you have more SizeConstraintSet objects than the number that you specified - // for Limit in the request, the response includes a NextMarker value. To list - // more SizeConstraintSet objects, submit another ListSizeConstraintSets request, - // and specify the NextMarker value from the response in the NextMarker value - // in the next request. - NextMarker *string `min:"1" type:"string"` - - // An array of SizeConstraintSetSummary objects. - SizeConstraintSets []*SizeConstraintSetSummary `type:"list"` -} - -// String returns the string representation -func (s ListSizeConstraintSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSizeConstraintSetsOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListSizeConstraintSetsOutput) SetNextMarker(v string) *ListSizeConstraintSetsOutput { - s.NextMarker = &v - return s -} - -// SetSizeConstraintSets sets the SizeConstraintSets field's value. -func (s *ListSizeConstraintSetsOutput) SetSizeConstraintSets(v []*SizeConstraintSetSummary) *ListSizeConstraintSetsOutput { - s.SizeConstraintSets = v - return s -} - -// A request to list the SqlInjectionMatchSet objects created by the current -// AWS account. -type ListSqlInjectionMatchSetsInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of SqlInjectionMatchSet objects that you want AWS WAF - // to return for this request. If you have more SqlInjectionMatchSet objects - // than the number you specify for Limit, the response includes a NextMarker - // value that you can use to get another batch of Rules. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more SqlInjectionMatchSet objects - // than the value of Limit, AWS WAF returns a NextMarker value in the response - // that allows you to list another group of SqlInjectionMatchSets. For the second - // and subsequent ListSqlInjectionMatchSets requests, specify the value of NextMarker - // from the previous response to get information about another batch of SqlInjectionMatchSets. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListSqlInjectionMatchSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSqlInjectionMatchSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSqlInjectionMatchSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSqlInjectionMatchSetsInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListSqlInjectionMatchSetsInput) SetLimit(v int64) *ListSqlInjectionMatchSetsInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListSqlInjectionMatchSetsInput) SetNextMarker(v string) *ListSqlInjectionMatchSetsInput { - s.NextMarker = &v - return s -} - -// The response to a ListSqlInjectionMatchSets request. -type ListSqlInjectionMatchSetsOutput struct { - _ struct{} `type:"structure"` - - // If you have more SqlInjectionMatchSet objects than the number that you specified - // for Limit in the request, the response includes a NextMarker value. To list - // more SqlInjectionMatchSet objects, submit another ListSqlInjectionMatchSets - // request, and specify the NextMarker value from the response in the NextMarker - // value in the next request. - NextMarker *string `min:"1" type:"string"` - - // An array of SqlInjectionMatchSetSummary objects. - SqlInjectionMatchSets []*SqlInjectionMatchSetSummary `type:"list"` -} - -// String returns the string representation -func (s ListSqlInjectionMatchSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSqlInjectionMatchSetsOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListSqlInjectionMatchSetsOutput) SetNextMarker(v string) *ListSqlInjectionMatchSetsOutput { - s.NextMarker = &v - return s -} - -// SetSqlInjectionMatchSets sets the SqlInjectionMatchSets field's value. -func (s *ListSqlInjectionMatchSetsOutput) SetSqlInjectionMatchSets(v []*SqlInjectionMatchSetSummary) *ListSqlInjectionMatchSetsOutput { - s.SqlInjectionMatchSets = v - return s -} - -type ListSubscribedRuleGroupsInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of subscribed rule groups that you want AWS WAF to return - // for this request. If you have more objects than the number you specify for - // Limit, the response includes a NextMarker value that you can use to get another - // batch of objects. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more ByteMatchSetssubscribed - // rule groups than the value of Limit, AWS WAF returns a NextMarker value in - // the response that allows you to list another group of subscribed rule groups. - // For the second and subsequent ListSubscribedRuleGroupsRequest requests, specify - // the value of NextMarker from the previous response to get information about - // another batch of subscribed rule groups. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListSubscribedRuleGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSubscribedRuleGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSubscribedRuleGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSubscribedRuleGroupsInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListSubscribedRuleGroupsInput) SetLimit(v int64) *ListSubscribedRuleGroupsInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListSubscribedRuleGroupsInput) SetNextMarker(v string) *ListSubscribedRuleGroupsInput { - s.NextMarker = &v - return s -} - -type ListSubscribedRuleGroupsOutput struct { - _ struct{} `type:"structure"` - - // If you have more objects than the number that you specified for Limit in - // the request, the response includes a NextMarker value. To list more objects, - // submit another ListSubscribedRuleGroups request, and specify the NextMarker - // value from the response in the NextMarker value in the next request. - NextMarker *string `min:"1" type:"string"` - - // An array of RuleGroup objects. - RuleGroups []*SubscribedRuleGroupSummary `type:"list"` -} - -// String returns the string representation -func (s ListSubscribedRuleGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListSubscribedRuleGroupsOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListSubscribedRuleGroupsOutput) SetNextMarker(v string) *ListSubscribedRuleGroupsOutput { - s.NextMarker = &v - return s -} - -// SetRuleGroups sets the RuleGroups field's value. -func (s *ListSubscribedRuleGroupsOutput) SetRuleGroups(v []*SubscribedRuleGroupSummary) *ListSubscribedRuleGroupsOutput { - s.RuleGroups = v - return s -} - -type ListWebACLsInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of WebACL objects that you want AWS WAF to return for - // this request. If you have more WebACL objects than the number that you specify - // for Limit, the response includes a NextMarker value that you can use to get - // another batch of WebACL objects. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more WebACL objects than the - // number that you specify for Limit, AWS WAF returns a NextMarker value in - // the response that allows you to list another group of WebACL objects. For - // the second and subsequent ListWebACLs requests, specify the value of NextMarker - // from the previous response to get information about another batch of WebACL - // objects. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListWebACLsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListWebACLsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListWebACLsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListWebACLsInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListWebACLsInput) SetLimit(v int64) *ListWebACLsInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListWebACLsInput) SetNextMarker(v string) *ListWebACLsInput { - s.NextMarker = &v - return s -} - -type ListWebACLsOutput struct { - _ struct{} `type:"structure"` - - // If you have more WebACL objects than the number that you specified for Limit - // in the request, the response includes a NextMarker value. To list more WebACL - // objects, submit another ListWebACLs request, and specify the NextMarker value - // from the response in the NextMarker value in the next request. - NextMarker *string `min:"1" type:"string"` - - // An array of WebACLSummary objects. - WebACLs []*WebACLSummary `type:"list"` -} - -// String returns the string representation -func (s ListWebACLsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListWebACLsOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListWebACLsOutput) SetNextMarker(v string) *ListWebACLsOutput { - s.NextMarker = &v - return s -} - -// SetWebACLs sets the WebACLs field's value. -func (s *ListWebACLsOutput) SetWebACLs(v []*WebACLSummary) *ListWebACLsOutput { - s.WebACLs = v - return s -} - -// A request to list the XssMatchSet objects created by the current AWS account. -type ListXssMatchSetsInput struct { - _ struct{} `type:"structure"` - - // Specifies the number of XssMatchSet objects that you want AWS WAF to return - // for this request. If you have more XssMatchSet objects than the number you - // specify for Limit, the response includes a NextMarker value that you can - // use to get another batch of Rules. - Limit *int64 `type:"integer"` - - // If you specify a value for Limit and you have more XssMatchSet objects than - // the value of Limit, AWS WAF returns a NextMarker value in the response that - // allows you to list another group of XssMatchSets. For the second and subsequent - // ListXssMatchSets requests, specify the value of NextMarker from the previous - // response to get information about another batch of XssMatchSets. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListXssMatchSetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListXssMatchSetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListXssMatchSetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListXssMatchSetsInput"} - if s.NextMarker != nil && len(*s.NextMarker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *ListXssMatchSetsInput) SetLimit(v int64) *ListXssMatchSetsInput { - s.Limit = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListXssMatchSetsInput) SetNextMarker(v string) *ListXssMatchSetsInput { - s.NextMarker = &v - return s -} - -// The response to a ListXssMatchSets request. -type ListXssMatchSetsOutput struct { - _ struct{} `type:"structure"` - - // If you have more XssMatchSet objects than the number that you specified for - // Limit in the request, the response includes a NextMarker value. To list more - // XssMatchSet objects, submit another ListXssMatchSets request, and specify - // the NextMarker value from the response in the NextMarker value in the next - // request. - NextMarker *string `min:"1" type:"string"` - - // An array of XssMatchSetSummary objects. - XssMatchSets []*XssMatchSetSummary `type:"list"` -} - -// String returns the string representation -func (s ListXssMatchSetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListXssMatchSetsOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListXssMatchSetsOutput) SetNextMarker(v string) *ListXssMatchSetsOutput { - s.NextMarker = &v - return s -} - -// SetXssMatchSets sets the XssMatchSets field's value. -func (s *ListXssMatchSetsOutput) SetXssMatchSets(v []*XssMatchSetSummary) *ListXssMatchSetsOutput { - s.XssMatchSets = v - return s -} - -// The Amazon Kinesis Data Firehose, RedactedFields information, and the web -// ACL Amazon Resource Name (ARN). -type LoggingConfiguration struct { - _ struct{} `type:"structure"` - - // An array of Amazon Kinesis Data Firehose ARNs. - // - // LogDestinationConfigs is a required field - LogDestinationConfigs []*string `min:"1" type:"list" required:"true"` - - // The parts of the request that you want redacted from the logs. For example, - // if you redact the cookie field, the cookie field in the firehose will be - // xxx. - RedactedFields []*FieldToMatch `type:"list"` - - // The Amazon Resource Name (ARN) of the web ACL that you want to associate - // with LogDestinationConfigs. - // - // ResourceArn is a required field - ResourceArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s LoggingConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LoggingConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LoggingConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LoggingConfiguration"} - if s.LogDestinationConfigs == nil { - invalidParams.Add(request.NewErrParamRequired("LogDestinationConfigs")) - } - if s.LogDestinationConfigs != nil && len(s.LogDestinationConfigs) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogDestinationConfigs", 1)) - } - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - if s.RedactedFields != nil { - for i, v := range s.RedactedFields { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RedactedFields", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogDestinationConfigs sets the LogDestinationConfigs field's value. -func (s *LoggingConfiguration) SetLogDestinationConfigs(v []*string) *LoggingConfiguration { - s.LogDestinationConfigs = v - return s -} - -// SetRedactedFields sets the RedactedFields field's value. -func (s *LoggingConfiguration) SetRedactedFields(v []*FieldToMatch) *LoggingConfiguration { - s.RedactedFields = v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *LoggingConfiguration) SetResourceArn(v string) *LoggingConfiguration { - s.ResourceArn = &v - return s -} - -// Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, RegexMatchSet, -// GeoMatchSet, and SizeConstraintSet objects that you want to add to a Rule -// and, for each object, indicates whether you want to negate the settings, -// for example, requests that do NOT originate from the IP address 192.0.2.44. -type Predicate struct { - _ struct{} `type:"structure"` - - // A unique identifier for a predicate in a Rule, such as ByteMatchSetId or - // IPSetId. The ID is returned by the corresponding Create or List command. - // - // DataId is a required field - DataId *string `min:"1" type:"string" required:"true"` - - // Set Negated to False if you want AWS WAF to allow, block, or count requests - // based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, - // XssMatchSet, RegexMatchSet, GeoMatchSet, or SizeConstraintSet. For example, - // if an IPSet includes the IP address 192.0.2.44, AWS WAF will allow or block - // requests based on that IP address. - // - // Set Negated to True if you want AWS WAF to allow or block a request based - // on the negation of the settings in the ByteMatchSet, IPSet, SqlInjectionMatchSet, - // XssMatchSet, RegexMatchSet, GeoMatchSet, or SizeConstraintSet. For example, - // if an IPSet includes the IP address 192.0.2.44, AWS WAF will allow, block, - // or count requests based on all IP addresses except192.0.2.44. - // - // Negated is a required field - Negated *bool `type:"boolean" required:"true"` - - // The type of predicate in a Rule, such as ByteMatch or IPSet. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"PredicateType"` -} - -// String returns the string representation -func (s Predicate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Predicate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Predicate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Predicate"} - if s.DataId == nil { - invalidParams.Add(request.NewErrParamRequired("DataId")) - } - if s.DataId != nil && len(*s.DataId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DataId", 1)) - } - if s.Negated == nil { - invalidParams.Add(request.NewErrParamRequired("Negated")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDataId sets the DataId field's value. -func (s *Predicate) SetDataId(v string) *Predicate { - s.DataId = &v - return s -} - -// SetNegated sets the Negated field's value. -func (s *Predicate) SetNegated(v bool) *Predicate { - s.Negated = &v - return s -} - -// SetType sets the Type field's value. -func (s *Predicate) SetType(v string) *Predicate { - s.Type = &v - return s -} - -type PutLoggingConfigurationInput struct { - _ struct{} `type:"structure"` - - // The Amazon Kinesis Data Firehose that contains the inspected traffic information, - // the redacted fields details, and the Amazon Resource Name (ARN) of the web - // ACL to monitor. - // - // LoggingConfiguration is a required field - LoggingConfiguration *LoggingConfiguration `type:"structure" required:"true"` -} - -// String returns the string representation -func (s PutLoggingConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutLoggingConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutLoggingConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutLoggingConfigurationInput"} - if s.LoggingConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("LoggingConfiguration")) - } - if s.LoggingConfiguration != nil { - if err := s.LoggingConfiguration.Validate(); err != nil { - invalidParams.AddNested("LoggingConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoggingConfiguration sets the LoggingConfiguration field's value. -func (s *PutLoggingConfigurationInput) SetLoggingConfiguration(v *LoggingConfiguration) *PutLoggingConfigurationInput { - s.LoggingConfiguration = v - return s -} - -type PutLoggingConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The LoggingConfiguration that you submitted in the request. - LoggingConfiguration *LoggingConfiguration `type:"structure"` -} - -// String returns the string representation -func (s PutLoggingConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutLoggingConfigurationOutput) GoString() string { - return s.String() -} - -// SetLoggingConfiguration sets the LoggingConfiguration field's value. -func (s *PutLoggingConfigurationOutput) SetLoggingConfiguration(v *LoggingConfiguration) *PutLoggingConfigurationOutput { - s.LoggingConfiguration = v - return s -} - -type PutPermissionPolicyInput struct { - _ struct{} `type:"structure"` - - // The policy to attach to the specified RuleGroup. - // - // Policy is a required field - Policy *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the RuleGroup to which you want to attach - // the policy. - // - // ResourceArn is a required field - ResourceArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s PutPermissionPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutPermissionPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutPermissionPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutPermissionPolicyInput"} - if s.Policy == nil { - invalidParams.Add(request.NewErrParamRequired("Policy")) - } - if s.Policy != nil && len(*s.Policy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) - } - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicy sets the Policy field's value. -func (s *PutPermissionPolicyInput) SetPolicy(v string) *PutPermissionPolicyInput { - s.Policy = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *PutPermissionPolicyInput) SetResourceArn(v string) *PutPermissionPolicyInput { - s.ResourceArn = &v - return s -} - -type PutPermissionPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s PutPermissionPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s PutPermissionPolicyOutput) GoString() string { - return s.String() -} - -// A RateBasedRule is identical to a regular Rule, with one addition: a RateBasedRule -// counts the number of requests that arrive from a specified IP address every -// five minutes. For example, based on recent requests that you've seen from -// an attacker, you might create a RateBasedRule that includes the following -// conditions: -// -// * The requests come from 192.0.2.44. -// -// * They contain the value BadBot in the User-Agent header. -// -// In the rule, you also define the rate limit as 15,000. -// -// Requests that meet both of these conditions and exceed 15,000 requests every -// five minutes trigger the rule's action (block or count), which is defined -// in the web ACL. -type RateBasedRule struct { - _ struct{} `type:"structure"` - - // The Predicates object contains one Predicate element for each ByteMatchSet, - // IPSet, or SqlInjectionMatchSet object that you want to include in a RateBasedRule. - // - // MatchPredicates is a required field - MatchPredicates []*Predicate `type:"list" required:"true"` - - // A friendly name or description for the metrics for a RateBasedRule. The name - // can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't - // contain whitespace. You can't change the name of the metric after you create - // the RateBasedRule. - MetricName *string `type:"string"` - - // A friendly name or description for a RateBasedRule. You can't change the - // name of a RateBasedRule after you create it. - Name *string `min:"1" type:"string"` - - // The field that AWS WAF uses to determine if requests are likely arriving - // from single source and thus subject to rate monitoring. The only valid value - // for RateKey is IP. IP indicates that requests arriving from the same IP address - // are subject to the RateLimit that is specified in the RateBasedRule. - // - // RateKey is a required field - RateKey *string `type:"string" required:"true" enum:"RateKey"` - - // The maximum number of requests, which have an identical value in the field - // specified by the RateKey, allowed in a five-minute period. If the number - // of requests exceeds the RateLimit and the other predicates specified in the - // rule are also met, AWS WAF triggers the action that is specified for this - // rule. - // - // RateLimit is a required field - RateLimit *int64 `min:"2000" type:"long" required:"true"` - - // A unique identifier for a RateBasedRule. You use RuleId to get more information - // about a RateBasedRule (see GetRateBasedRule), update a RateBasedRule (see - // UpdateRateBasedRule), insert a RateBasedRule into a WebACL or delete one - // from a WebACL (see UpdateWebACL), or delete a RateBasedRule from AWS WAF - // (see DeleteRateBasedRule). - // - // RuleId is a required field - RuleId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RateBasedRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RateBasedRule) GoString() string { - return s.String() -} - -// SetMatchPredicates sets the MatchPredicates field's value. -func (s *RateBasedRule) SetMatchPredicates(v []*Predicate) *RateBasedRule { - s.MatchPredicates = v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *RateBasedRule) SetMetricName(v string) *RateBasedRule { - s.MetricName = &v - return s -} - -// SetName sets the Name field's value. -func (s *RateBasedRule) SetName(v string) *RateBasedRule { - s.Name = &v - return s -} - -// SetRateKey sets the RateKey field's value. -func (s *RateBasedRule) SetRateKey(v string) *RateBasedRule { - s.RateKey = &v - return s -} - -// SetRateLimit sets the RateLimit field's value. -func (s *RateBasedRule) SetRateLimit(v int64) *RateBasedRule { - s.RateLimit = &v - return s -} - -// SetRuleId sets the RuleId field's value. -func (s *RateBasedRule) SetRuleId(v string) *RateBasedRule { - s.RuleId = &v - return s -} - -// In a GetRegexMatchSet request, RegexMatchSet is a complex type that contains -// the RegexMatchSetId and Name of a RegexMatchSet, and the values that you -// specified when you updated the RegexMatchSet. -// -// The values are contained in a RegexMatchTuple object, which specify the parts -// of web requests that you want AWS WAF to inspect and the values that you -// want AWS WAF to search for. If a RegexMatchSet contains more than one RegexMatchTuple -// object, a request needs to match the settings in only one ByteMatchTuple -// to be considered a match. -type RegexMatchSet struct { - _ struct{} `type:"structure"` - - // A friendly name or description of the RegexMatchSet. You can't change Name - // after you create a RegexMatchSet. - Name *string `min:"1" type:"string"` - - // The RegexMatchSetId for a RegexMatchSet. You use RegexMatchSetId to get information - // about a RegexMatchSet (see GetRegexMatchSet), update a RegexMatchSet (see - // UpdateRegexMatchSet), insert a RegexMatchSet into a Rule or delete one from - // a Rule (see UpdateRule), and delete a RegexMatchSet from AWS WAF (see DeleteRegexMatchSet). - // - // RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets. - RegexMatchSetId *string `min:"1" type:"string"` - - // Contains an array of RegexMatchTuple objects. Each RegexMatchTuple object - // contains: - // - // * The part of a web request that you want AWS WAF to inspect, such as - // a query string or the value of the User-Agent header. - // - // * The identifier of the pattern (a regular expression) that you want AWS - // WAF to look for. For more information, see RegexPatternSet. - // - // * Whether to perform any conversions on the request, such as converting - // it to lowercase, before inspecting it for the specified string. - RegexMatchTuples []*RegexMatchTuple `type:"list"` -} - -// String returns the string representation -func (s RegexMatchSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegexMatchSet) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *RegexMatchSet) SetName(v string) *RegexMatchSet { - s.Name = &v - return s -} - -// SetRegexMatchSetId sets the RegexMatchSetId field's value. -func (s *RegexMatchSet) SetRegexMatchSetId(v string) *RegexMatchSet { - s.RegexMatchSetId = &v - return s -} - -// SetRegexMatchTuples sets the RegexMatchTuples field's value. -func (s *RegexMatchSet) SetRegexMatchTuples(v []*RegexMatchTuple) *RegexMatchSet { - s.RegexMatchTuples = v - return s -} - -// Returned by ListRegexMatchSets. Each RegexMatchSetSummary object includes -// the Name and RegexMatchSetId for one RegexMatchSet. -type RegexMatchSetSummary struct { - _ struct{} `type:"structure"` - - // A friendly name or description of the RegexMatchSet. You can't change Name - // after you create a RegexMatchSet. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The RegexMatchSetId for a RegexMatchSet. You use RegexMatchSetId to get information - // about a RegexMatchSet, update a RegexMatchSet, remove a RegexMatchSet from - // a Rule, and delete a RegexMatchSet from AWS WAF. - // - // RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets. - // - // RegexMatchSetId is a required field - RegexMatchSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegexMatchSetSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegexMatchSetSummary) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *RegexMatchSetSummary) SetName(v string) *RegexMatchSetSummary { - s.Name = &v - return s -} - -// SetRegexMatchSetId sets the RegexMatchSetId field's value. -func (s *RegexMatchSetSummary) SetRegexMatchSetId(v string) *RegexMatchSetSummary { - s.RegexMatchSetId = &v - return s -} - -// In an UpdateRegexMatchSet request, RegexMatchSetUpdate specifies whether -// to insert or delete a RegexMatchTuple and includes the settings for the RegexMatchTuple. -type RegexMatchSetUpdate struct { - _ struct{} `type:"structure"` - - // Specifies whether to insert or delete a RegexMatchTuple. - // - // Action is a required field - Action *string `type:"string" required:"true" enum:"ChangeAction"` - - // Information about the part of a web request that you want AWS WAF to inspect - // and the identifier of the regular expression (regex) pattern that you want - // AWS WAF to search for. If you specify DELETE for the value of Action, the - // RegexMatchTuple values must exactly match the values in the RegexMatchTuple - // that you want to delete from the RegexMatchSet. - // - // RegexMatchTuple is a required field - RegexMatchTuple *RegexMatchTuple `type:"structure" required:"true"` -} - -// String returns the string representation -func (s RegexMatchSetUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegexMatchSetUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegexMatchSetUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegexMatchSetUpdate"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.RegexMatchTuple == nil { - invalidParams.Add(request.NewErrParamRequired("RegexMatchTuple")) - } - if s.RegexMatchTuple != nil { - if err := s.RegexMatchTuple.Validate(); err != nil { - invalidParams.AddNested("RegexMatchTuple", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *RegexMatchSetUpdate) SetAction(v string) *RegexMatchSetUpdate { - s.Action = &v - return s -} - -// SetRegexMatchTuple sets the RegexMatchTuple field's value. -func (s *RegexMatchSetUpdate) SetRegexMatchTuple(v *RegexMatchTuple) *RegexMatchSetUpdate { - s.RegexMatchTuple = v - return s -} - -// The regular expression pattern that you want AWS WAF to search for in web -// requests, the location in requests that you want AWS WAF to search, and other -// settings. Each RegexMatchTuple object contains: -// -// * The part of a web request that you want AWS WAF to inspect, such as -// a query string or the value of the User-Agent header. -// -// * The identifier of the pattern (a regular expression) that you want AWS -// WAF to look for. For more information, see RegexPatternSet. -// -// * Whether to perform any conversions on the request, such as converting -// it to lowercase, before inspecting it for the specified string. -type RegexMatchTuple struct { - _ struct{} `type:"structure"` - - // Specifies where in a web request to look for the RegexPatternSet. - // - // FieldToMatch is a required field - FieldToMatch *FieldToMatch `type:"structure" required:"true"` - - // The RegexPatternSetId for a RegexPatternSet. You use RegexPatternSetId to - // get information about a RegexPatternSet (see GetRegexPatternSet), update - // a RegexPatternSet (see UpdateRegexPatternSet), insert a RegexPatternSet into - // a RegexMatchSet or delete one from a RegexMatchSet (see UpdateRegexMatchSet), - // and delete an RegexPatternSet from AWS WAF (see DeleteRegexPatternSet). - // - // RegexPatternSetId is returned by CreateRegexPatternSet and by ListRegexPatternSets. - // - // RegexPatternSetId is a required field - RegexPatternSetId *string `min:"1" type:"string" required:"true"` - - // Text transformations eliminate some of the unusual formatting that attackers - // use in web requests in an effort to bypass AWS WAF. If you specify a transformation, - // AWS WAF performs the transformation on RegexPatternSet before inspecting - // a request for a match. - // - // You can only specify a single type of TextTransformation. - // - // CMD_LINE - // - // When you're concerned that attackers are injecting an operating system commandline - // command and using unusual formatting to disguise some or all of the command, - // use this option to perform the following transformations: - // - // * Delete the following characters: \ " ' ^ - // - // * Delete spaces before the following characters: / ( - // - // * Replace the following characters with a space: , ; - // - // * Replace multiple spaces with one space - // - // * Convert uppercase letters (A-Z) to lowercase (a-z) - // - // COMPRESS_WHITE_SPACE - // - // Use this option to replace the following characters with a space character - // (decimal 32): - // - // * \f, formfeed, decimal 12 - // - // * \t, tab, decimal 9 - // - // * \n, newline, decimal 10 - // - // * \r, carriage return, decimal 13 - // - // * \v, vertical tab, decimal 11 - // - // * non-breaking space, decimal 160 - // - // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space. - // - // HTML_ENTITY_DECODE - // - // Use this option to replace HTML-encoded characters with unencoded characters. - // HTML_ENTITY_DECODE performs the following operations: - // - // * Replaces (ampersand)quot; with " - // - // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160 - // - // * Replaces (ampersand)lt; with a "less than" symbol - // - // * Replaces (ampersand)gt; with > - // - // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;, - // with the corresponding characters - // - // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;, - // with the corresponding characters - // - // LOWERCASE - // - // Use this option to convert uppercase letters (A-Z) to lowercase (a-z). - // - // URL_DECODE - // - // Use this option to decode a URL-encoded value. - // - // NONE - // - // Specify NONE if you don't want to perform any text transformations. - // - // TextTransformation is a required field - TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"` -} - -// String returns the string representation -func (s RegexMatchTuple) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegexMatchTuple) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegexMatchTuple) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegexMatchTuple"} - if s.FieldToMatch == nil { - invalidParams.Add(request.NewErrParamRequired("FieldToMatch")) - } - if s.RegexPatternSetId == nil { - invalidParams.Add(request.NewErrParamRequired("RegexPatternSetId")) - } - if s.RegexPatternSetId != nil && len(*s.RegexPatternSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RegexPatternSetId", 1)) - } - if s.TextTransformation == nil { - invalidParams.Add(request.NewErrParamRequired("TextTransformation")) - } - if s.FieldToMatch != nil { - if err := s.FieldToMatch.Validate(); err != nil { - invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFieldToMatch sets the FieldToMatch field's value. -func (s *RegexMatchTuple) SetFieldToMatch(v *FieldToMatch) *RegexMatchTuple { - s.FieldToMatch = v - return s -} - -// SetRegexPatternSetId sets the RegexPatternSetId field's value. -func (s *RegexMatchTuple) SetRegexPatternSetId(v string) *RegexMatchTuple { - s.RegexPatternSetId = &v - return s -} - -// SetTextTransformation sets the TextTransformation field's value. -func (s *RegexMatchTuple) SetTextTransformation(v string) *RegexMatchTuple { - s.TextTransformation = &v - return s -} - -// The RegexPatternSet specifies the regular expression (regex) pattern that -// you want AWS WAF to search for, such as B[a@]dB[o0]t. You can then configure -// AWS WAF to reject those requests. -type RegexPatternSet struct { - _ struct{} `type:"structure"` - - // A friendly name or description of the RegexPatternSet. You can't change Name - // after you create a RegexPatternSet. - Name *string `min:"1" type:"string"` - - // The identifier for the RegexPatternSet. You use RegexPatternSetId to get - // information about a RegexPatternSet, update a RegexPatternSet, remove a RegexPatternSet - // from a RegexMatchSet, and delete a RegexPatternSet from AWS WAF. - // - // RegexMatchSetId is returned by CreateRegexPatternSet and by ListRegexPatternSets. - // - // RegexPatternSetId is a required field - RegexPatternSetId *string `min:"1" type:"string" required:"true"` - - // Specifies the regular expression (regex) patterns that you want AWS WAF to - // search for, such as B[a@]dB[o0]t. - // - // RegexPatternStrings is a required field - RegexPatternStrings []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s RegexPatternSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegexPatternSet) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *RegexPatternSet) SetName(v string) *RegexPatternSet { - s.Name = &v - return s -} - -// SetRegexPatternSetId sets the RegexPatternSetId field's value. -func (s *RegexPatternSet) SetRegexPatternSetId(v string) *RegexPatternSet { - s.RegexPatternSetId = &v - return s -} - -// SetRegexPatternStrings sets the RegexPatternStrings field's value. -func (s *RegexPatternSet) SetRegexPatternStrings(v []*string) *RegexPatternSet { - s.RegexPatternStrings = v - return s -} - -// Returned by ListRegexPatternSets. Each RegexPatternSetSummary object includes -// the Name and RegexPatternSetId for one RegexPatternSet. -type RegexPatternSetSummary struct { - _ struct{} `type:"structure"` - - // A friendly name or description of the RegexPatternSet. You can't change Name - // after you create a RegexPatternSet. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The RegexPatternSetId for a RegexPatternSet. You use RegexPatternSetId to - // get information about a RegexPatternSet, update a RegexPatternSet, remove - // a RegexPatternSet from a RegexMatchSet, and delete a RegexPatternSet from - // AWS WAF. - // - // RegexPatternSetId is returned by CreateRegexPatternSet and by ListRegexPatternSets. - // - // RegexPatternSetId is a required field - RegexPatternSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegexPatternSetSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegexPatternSetSummary) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *RegexPatternSetSummary) SetName(v string) *RegexPatternSetSummary { - s.Name = &v - return s -} - -// SetRegexPatternSetId sets the RegexPatternSetId field's value. -func (s *RegexPatternSetSummary) SetRegexPatternSetId(v string) *RegexPatternSetSummary { - s.RegexPatternSetId = &v - return s -} - -// In an UpdateRegexPatternSet request, RegexPatternSetUpdate specifies whether -// to insert or delete a RegexPatternString and includes the settings for the -// RegexPatternString. -type RegexPatternSetUpdate struct { - _ struct{} `type:"structure"` - - // Specifies whether to insert or delete a RegexPatternString. - // - // Action is a required field - Action *string `type:"string" required:"true" enum:"ChangeAction"` - - // Specifies the regular expression (regex) pattern that you want AWS WAF to - // search for, such as B[a@]dB[o0]t. - // - // RegexPatternString is a required field - RegexPatternString *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RegexPatternSetUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RegexPatternSetUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegexPatternSetUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegexPatternSetUpdate"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.RegexPatternString == nil { - invalidParams.Add(request.NewErrParamRequired("RegexPatternString")) - } - if s.RegexPatternString != nil && len(*s.RegexPatternString) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RegexPatternString", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *RegexPatternSetUpdate) SetAction(v string) *RegexPatternSetUpdate { - s.Action = &v - return s -} - -// SetRegexPatternString sets the RegexPatternString field's value. -func (s *RegexPatternSetUpdate) SetRegexPatternString(v string) *RegexPatternSetUpdate { - s.RegexPatternString = &v - return s -} - -// A combination of ByteMatchSet, IPSet, and/or SqlInjectionMatchSet objects -// that identify the web requests that you want to allow, block, or count. For -// example, you might create a Rule that includes the following predicates: -// -// * An IPSet that causes AWS WAF to search for web requests that originate -// from the IP address 192.0.2.44 -// -// * A ByteMatchSet that causes AWS WAF to search for web requests for which -// the value of the User-Agent header is BadBot. -// -// To match the settings in this Rule, a request must originate from 192.0.2.44 -// AND include a User-Agent header for which the value is BadBot. -type Rule struct { - _ struct{} `type:"structure"` - - // A friendly name or description for the metrics for this Rule. The name can - // contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't contain - // whitespace. You can't change MetricName after you create the Rule. - MetricName *string `type:"string"` - - // The friendly name or description for the Rule. You can't change the name - // of a Rule after you create it. - Name *string `min:"1" type:"string"` - - // The Predicates object contains one Predicate element for each ByteMatchSet, - // IPSet, or SqlInjectionMatchSet object that you want to include in a Rule. - // - // Predicates is a required field - Predicates []*Predicate `type:"list" required:"true"` - - // A unique identifier for a Rule. You use RuleId to get more information about - // a Rule (see GetRule), update a Rule (see UpdateRule), insert a Rule into - // a WebACL or delete a one from a WebACL (see UpdateWebACL), or delete a Rule - // from AWS WAF (see DeleteRule). - // - // RuleId is returned by CreateRule and by ListRules. - // - // RuleId is a required field - RuleId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s Rule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Rule) GoString() string { - return s.String() -} - -// SetMetricName sets the MetricName field's value. -func (s *Rule) SetMetricName(v string) *Rule { - s.MetricName = &v - return s -} - -// SetName sets the Name field's value. -func (s *Rule) SetName(v string) *Rule { - s.Name = &v - return s -} - -// SetPredicates sets the Predicates field's value. -func (s *Rule) SetPredicates(v []*Predicate) *Rule { - s.Predicates = v - return s -} - -// SetRuleId sets the RuleId field's value. -func (s *Rule) SetRuleId(v string) *Rule { - s.RuleId = &v - return s -} - -// A collection of predefined rules that you can add to a web ACL. -// -// Rule groups are subject to the following limits: -// -// * Three rule groups per account. You can request an increase to this limit -// by contacting customer support. -// -// * One rule group per web ACL. -// -// * Ten rules per rule group. -type RuleGroup struct { - _ struct{} `type:"structure"` - - // A friendly name or description for the metrics for this RuleGroup. The name - // can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't - // contain whitespace. You can't change the name of the metric after you create - // the RuleGroup. - MetricName *string `type:"string"` - - // The friendly name or description for the RuleGroup. You can't change the - // name of a RuleGroup after you create it. - Name *string `min:"1" type:"string"` - - // A unique identifier for a RuleGroup. You use RuleGroupId to get more information - // about a RuleGroup (see GetRuleGroup), update a RuleGroup (see UpdateRuleGroup), - // insert a RuleGroup into a WebACL or delete a one from a WebACL (see UpdateWebACL), - // or delete a RuleGroup from AWS WAF (see DeleteRuleGroup). - // - // RuleGroupId is returned by CreateRuleGroup and by ListRuleGroups. - // - // RuleGroupId is a required field - RuleGroupId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RuleGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RuleGroup) GoString() string { - return s.String() -} - -// SetMetricName sets the MetricName field's value. -func (s *RuleGroup) SetMetricName(v string) *RuleGroup { - s.MetricName = &v - return s -} - -// SetName sets the Name field's value. -func (s *RuleGroup) SetName(v string) *RuleGroup { - s.Name = &v - return s -} - -// SetRuleGroupId sets the RuleGroupId field's value. -func (s *RuleGroup) SetRuleGroupId(v string) *RuleGroup { - s.RuleGroupId = &v - return s -} - -// Contains the identifier and the friendly name or description of the RuleGroup. -type RuleGroupSummary struct { - _ struct{} `type:"structure"` - - // A friendly name or description of the RuleGroup. You can't change the name - // of a RuleGroup after you create it. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // A unique identifier for a RuleGroup. You use RuleGroupId to get more information - // about a RuleGroup (see GetRuleGroup), update a RuleGroup (see UpdateRuleGroup), - // insert a RuleGroup into a WebACL or delete one from a WebACL (see UpdateWebACL), - // or delete a RuleGroup from AWS WAF (see DeleteRuleGroup). - // - // RuleGroupId is returned by CreateRuleGroup and by ListRuleGroups. - // - // RuleGroupId is a required field - RuleGroupId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RuleGroupSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RuleGroupSummary) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *RuleGroupSummary) SetName(v string) *RuleGroupSummary { - s.Name = &v - return s -} - -// SetRuleGroupId sets the RuleGroupId field's value. -func (s *RuleGroupSummary) SetRuleGroupId(v string) *RuleGroupSummary { - s.RuleGroupId = &v - return s -} - -// Specifies an ActivatedRule and indicates whether you want to add it to a -// RuleGroup or delete it from a RuleGroup. -type RuleGroupUpdate struct { - _ struct{} `type:"structure"` - - // Specify INSERT to add an ActivatedRule to a RuleGroup. Use DELETE to remove - // an ActivatedRule from a RuleGroup. - // - // Action is a required field - Action *string `type:"string" required:"true" enum:"ChangeAction"` - - // The ActivatedRule object specifies a Rule that you want to insert or delete, - // the priority of the Rule in the WebACL, and the action that you want AWS - // WAF to take when a web request matches the Rule (ALLOW, BLOCK, or COUNT). - // - // ActivatedRule is a required field - ActivatedRule *ActivatedRule `type:"structure" required:"true"` -} - -// String returns the string representation -func (s RuleGroupUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RuleGroupUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RuleGroupUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RuleGroupUpdate"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.ActivatedRule == nil { - invalidParams.Add(request.NewErrParamRequired("ActivatedRule")) - } - if s.ActivatedRule != nil { - if err := s.ActivatedRule.Validate(); err != nil { - invalidParams.AddNested("ActivatedRule", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *RuleGroupUpdate) SetAction(v string) *RuleGroupUpdate { - s.Action = &v - return s -} - -// SetActivatedRule sets the ActivatedRule field's value. -func (s *RuleGroupUpdate) SetActivatedRule(v *ActivatedRule) *RuleGroupUpdate { - s.ActivatedRule = v - return s -} - -// Contains the identifier and the friendly name or description of the Rule. -type RuleSummary struct { - _ struct{} `type:"structure"` - - // A friendly name or description of the Rule. You can't change the name of - // a Rule after you create it. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // A unique identifier for a Rule. You use RuleId to get more information about - // a Rule (see GetRule), update a Rule (see UpdateRule), insert a Rule into - // a WebACL or delete one from a WebACL (see UpdateWebACL), or delete a Rule - // from AWS WAF (see DeleteRule). - // - // RuleId is returned by CreateRule and by ListRules. - // - // RuleId is a required field - RuleId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s RuleSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RuleSummary) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *RuleSummary) SetName(v string) *RuleSummary { - s.Name = &v - return s -} - -// SetRuleId sets the RuleId field's value. -func (s *RuleSummary) SetRuleId(v string) *RuleSummary { - s.RuleId = &v - return s -} - -// Specifies a Predicate (such as an IPSet) and indicates whether you want to -// add it to a Rule or delete it from a Rule. -type RuleUpdate struct { - _ struct{} `type:"structure"` - - // Specify INSERT to add a Predicate to a Rule. Use DELETE to remove a Predicate - // from a Rule. - // - // Action is a required field - Action *string `type:"string" required:"true" enum:"ChangeAction"` - - // The ID of the Predicate (such as an IPSet) that you want to add to a Rule. - // - // Predicate is a required field - Predicate *Predicate `type:"structure" required:"true"` -} - -// String returns the string representation -func (s RuleUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RuleUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RuleUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RuleUpdate"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.Predicate == nil { - invalidParams.Add(request.NewErrParamRequired("Predicate")) - } - if s.Predicate != nil { - if err := s.Predicate.Validate(); err != nil { - invalidParams.AddNested("Predicate", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *RuleUpdate) SetAction(v string) *RuleUpdate { - s.Action = &v - return s -} - -// SetPredicate sets the Predicate field's value. -func (s *RuleUpdate) SetPredicate(v *Predicate) *RuleUpdate { - s.Predicate = v - return s -} - -// The response from a GetSampledRequests request includes a SampledHTTPRequests -// complex type that appears as SampledRequests in the response syntax. SampledHTTPRequests -// contains one SampledHTTPRequest object for each web request that is returned -// by GetSampledRequests. -type SampledHTTPRequest struct { - _ struct{} `type:"structure"` - - // The action for the Rule that the request matched: ALLOW, BLOCK, or COUNT. - Action *string `type:"string"` - - // A complex type that contains detailed information about the request. - // - // Request is a required field - Request *HTTPRequest `type:"structure" required:"true"` - - // This value is returned if the GetSampledRequests request specifies the ID - // of a RuleGroup rather than the ID of an individual rule. RuleWithinRuleGroup - // is the rule within the specified RuleGroup that matched the request listed - // in the response. - RuleWithinRuleGroup *string `min:"1" type:"string"` - - // The time at which AWS WAF received the request from your AWS resource, in - // Unix time format (in seconds). - Timestamp *time.Time `type:"timestamp"` - - // A value that indicates how one result in the response relates proportionally - // to other results in the response. A result that has a weight of 2 represents - // roughly twice as many CloudFront web requests as a result that has a weight - // of 1. - // - // Weight is a required field - Weight *int64 `type:"long" required:"true"` -} - -// String returns the string representation -func (s SampledHTTPRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SampledHTTPRequest) GoString() string { - return s.String() -} - -// SetAction sets the Action field's value. -func (s *SampledHTTPRequest) SetAction(v string) *SampledHTTPRequest { - s.Action = &v - return s -} - -// SetRequest sets the Request field's value. -func (s *SampledHTTPRequest) SetRequest(v *HTTPRequest) *SampledHTTPRequest { - s.Request = v - return s -} - -// SetRuleWithinRuleGroup sets the RuleWithinRuleGroup field's value. -func (s *SampledHTTPRequest) SetRuleWithinRuleGroup(v string) *SampledHTTPRequest { - s.RuleWithinRuleGroup = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *SampledHTTPRequest) SetTimestamp(v time.Time) *SampledHTTPRequest { - s.Timestamp = &v - return s -} - -// SetWeight sets the Weight field's value. -func (s *SampledHTTPRequest) SetWeight(v int64) *SampledHTTPRequest { - s.Weight = &v - return s -} - -// Specifies a constraint on the size of a part of the web request. AWS WAF -// uses the Size, ComparisonOperator, and FieldToMatch to build an expression -// in the form of "SizeComparisonOperator size in bytes of FieldToMatch". If -// that expression is true, the SizeConstraint is considered to match. -type SizeConstraint struct { - _ struct{} `type:"structure"` - - // The type of comparison you want AWS WAF to perform. AWS WAF uses this in - // combination with the provided Size and FieldToMatch to build an expression - // in the form of "SizeComparisonOperator size in bytes of FieldToMatch". If - // that expression is true, the SizeConstraint is considered to match. - // - // EQ: Used to test if the Size is equal to the size of the FieldToMatch - // - // NE: Used to test if the Size is not equal to the size of the FieldToMatch - // - // LE: Used to test if the Size is less than or equal to the size of the FieldToMatch - // - // LT: Used to test if the Size is strictly less than the size of the FieldToMatch - // - // GE: Used to test if the Size is greater than or equal to the size of the - // FieldToMatch - // - // GT: Used to test if the Size is strictly greater than the size of the FieldToMatch - // - // ComparisonOperator is a required field - ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"` - - // Specifies where in a web request to look for the size constraint. - // - // FieldToMatch is a required field - FieldToMatch *FieldToMatch `type:"structure" required:"true"` - - // The size in bytes that you want AWS WAF to compare against the size of the - // specified FieldToMatch. AWS WAF uses this in combination with ComparisonOperator - // and FieldToMatch to build an expression in the form of "SizeComparisonOperator - // size in bytes of FieldToMatch". If that expression is true, the SizeConstraint - // is considered to match. - // - // Valid values for size are 0 - 21474836480 bytes (0 - 20 GB). - // - // If you specify URI for the value of Type, the / in the URI counts as one - // character. For example, the URI /logo.jpg is nine characters long. - // - // Size is a required field - Size *int64 `type:"long" required:"true"` - - // Text transformations eliminate some of the unusual formatting that attackers - // use in web requests in an effort to bypass AWS WAF. If you specify a transformation, - // AWS WAF performs the transformation on FieldToMatch before inspecting a request - // for a match. - // - // You can only specify a single type of TextTransformation. - // - // Note that if you choose BODY for the value of Type, you must choose NONE - // for TextTransformation because CloudFront forwards only the first 8192 bytes - // for inspection. - // - // NONE - // - // Specify NONE if you don't want to perform any text transformations. - // - // CMD_LINE - // - // When you're concerned that attackers are injecting an operating system command - // line command and using unusual formatting to disguise some or all of the - // command, use this option to perform the following transformations: - // - // * Delete the following characters: \ " ' ^ - // - // * Delete spaces before the following characters: / ( - // - // * Replace the following characters with a space: , ; - // - // * Replace multiple spaces with one space - // - // * Convert uppercase letters (A-Z) to lowercase (a-z) - // - // COMPRESS_WHITE_SPACE - // - // Use this option to replace the following characters with a space character - // (decimal 32): - // - // * \f, formfeed, decimal 12 - // - // * \t, tab, decimal 9 - // - // * \n, newline, decimal 10 - // - // * \r, carriage return, decimal 13 - // - // * \v, vertical tab, decimal 11 - // - // * non-breaking space, decimal 160 - // - // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space. - // - // HTML_ENTITY_DECODE - // - // Use this option to replace HTML-encoded characters with unencoded characters. - // HTML_ENTITY_DECODE performs the following operations: - // - // * Replaces (ampersand)quot; with " - // - // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160 - // - // * Replaces (ampersand)lt; with a "less than" symbol - // - // * Replaces (ampersand)gt; with > - // - // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;, - // with the corresponding characters - // - // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;, - // with the corresponding characters - // - // LOWERCASE - // - // Use this option to convert uppercase letters (A-Z) to lowercase (a-z). - // - // URL_DECODE - // - // Use this option to decode a URL-encoded value. - // - // TextTransformation is a required field - TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"` -} - -// String returns the string representation -func (s SizeConstraint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SizeConstraint) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SizeConstraint) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SizeConstraint"} - if s.ComparisonOperator == nil { - invalidParams.Add(request.NewErrParamRequired("ComparisonOperator")) - } - if s.FieldToMatch == nil { - invalidParams.Add(request.NewErrParamRequired("FieldToMatch")) - } - if s.Size == nil { - invalidParams.Add(request.NewErrParamRequired("Size")) - } - if s.TextTransformation == nil { - invalidParams.Add(request.NewErrParamRequired("TextTransformation")) - } - if s.FieldToMatch != nil { - if err := s.FieldToMatch.Validate(); err != nil { - invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComparisonOperator sets the ComparisonOperator field's value. -func (s *SizeConstraint) SetComparisonOperator(v string) *SizeConstraint { - s.ComparisonOperator = &v - return s -} - -// SetFieldToMatch sets the FieldToMatch field's value. -func (s *SizeConstraint) SetFieldToMatch(v *FieldToMatch) *SizeConstraint { - s.FieldToMatch = v - return s -} - -// SetSize sets the Size field's value. -func (s *SizeConstraint) SetSize(v int64) *SizeConstraint { - s.Size = &v - return s -} - -// SetTextTransformation sets the TextTransformation field's value. -func (s *SizeConstraint) SetTextTransformation(v string) *SizeConstraint { - s.TextTransformation = &v - return s -} - -// A complex type that contains SizeConstraint objects, which specify the parts -// of web requests that you want AWS WAF to inspect the size of. If a SizeConstraintSet -// contains more than one SizeConstraint object, a request only needs to match -// one constraint to be considered a match. -type SizeConstraintSet struct { - _ struct{} `type:"structure"` - - // The name, if any, of the SizeConstraintSet. - Name *string `min:"1" type:"string"` - - // A unique identifier for a SizeConstraintSet. You use SizeConstraintSetId - // to get information about a SizeConstraintSet (see GetSizeConstraintSet), - // update a SizeConstraintSet (see UpdateSizeConstraintSet), insert a SizeConstraintSet - // into a Rule or delete one from a Rule (see UpdateRule), and delete a SizeConstraintSet - // from AWS WAF (see DeleteSizeConstraintSet). - // - // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets. - // - // SizeConstraintSetId is a required field - SizeConstraintSetId *string `min:"1" type:"string" required:"true"` - - // Specifies the parts of web requests that you want to inspect the size of. - // - // SizeConstraints is a required field - SizeConstraints []*SizeConstraint `type:"list" required:"true"` -} - -// String returns the string representation -func (s SizeConstraintSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SizeConstraintSet) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *SizeConstraintSet) SetName(v string) *SizeConstraintSet { - s.Name = &v - return s -} - -// SetSizeConstraintSetId sets the SizeConstraintSetId field's value. -func (s *SizeConstraintSet) SetSizeConstraintSetId(v string) *SizeConstraintSet { - s.SizeConstraintSetId = &v - return s -} - -// SetSizeConstraints sets the SizeConstraints field's value. -func (s *SizeConstraintSet) SetSizeConstraints(v []*SizeConstraint) *SizeConstraintSet { - s.SizeConstraints = v - return s -} - -// The Id and Name of a SizeConstraintSet. -type SizeConstraintSetSummary struct { - _ struct{} `type:"structure"` - - // The name of the SizeConstraintSet, if any. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // A unique identifier for a SizeConstraintSet. You use SizeConstraintSetId - // to get information about a SizeConstraintSet (see GetSizeConstraintSet), - // update a SizeConstraintSet (see UpdateSizeConstraintSet), insert a SizeConstraintSet - // into a Rule or delete one from a Rule (see UpdateRule), and delete a SizeConstraintSet - // from AWS WAF (see DeleteSizeConstraintSet). - // - // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets. - // - // SizeConstraintSetId is a required field - SizeConstraintSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SizeConstraintSetSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SizeConstraintSetSummary) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *SizeConstraintSetSummary) SetName(v string) *SizeConstraintSetSummary { - s.Name = &v - return s -} - -// SetSizeConstraintSetId sets the SizeConstraintSetId field's value. -func (s *SizeConstraintSetSummary) SetSizeConstraintSetId(v string) *SizeConstraintSetSummary { - s.SizeConstraintSetId = &v - return s -} - -// Specifies the part of a web request that you want to inspect the size of -// and indicates whether you want to add the specification to a SizeConstraintSet -// or delete it from a SizeConstraintSet. -type SizeConstraintSetUpdate struct { - _ struct{} `type:"structure"` - - // Specify INSERT to add a SizeConstraintSetUpdate to a SizeConstraintSet. Use - // DELETE to remove a SizeConstraintSetUpdate from a SizeConstraintSet. - // - // Action is a required field - Action *string `type:"string" required:"true" enum:"ChangeAction"` - - // Specifies a constraint on the size of a part of the web request. AWS WAF - // uses the Size, ComparisonOperator, and FieldToMatch to build an expression - // in the form of "SizeComparisonOperator size in bytes of FieldToMatch". If - // that expression is true, the SizeConstraint is considered to match. - // - // SizeConstraint is a required field - SizeConstraint *SizeConstraint `type:"structure" required:"true"` -} - -// String returns the string representation -func (s SizeConstraintSetUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SizeConstraintSetUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SizeConstraintSetUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SizeConstraintSetUpdate"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.SizeConstraint == nil { - invalidParams.Add(request.NewErrParamRequired("SizeConstraint")) - } - if s.SizeConstraint != nil { - if err := s.SizeConstraint.Validate(); err != nil { - invalidParams.AddNested("SizeConstraint", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *SizeConstraintSetUpdate) SetAction(v string) *SizeConstraintSetUpdate { - s.Action = &v - return s -} - -// SetSizeConstraint sets the SizeConstraint field's value. -func (s *SizeConstraintSetUpdate) SetSizeConstraint(v *SizeConstraint) *SizeConstraintSetUpdate { - s.SizeConstraint = v - return s -} - -// A complex type that contains SqlInjectionMatchTuple objects, which specify -// the parts of web requests that you want AWS WAF to inspect for snippets of -// malicious SQL code and, if you want AWS WAF to inspect a header, the name -// of the header. If a SqlInjectionMatchSet contains more than one SqlInjectionMatchTuple -// object, a request needs to include snippets of SQL code in only one of the -// specified parts of the request to be considered a match. -type SqlInjectionMatchSet struct { - _ struct{} `type:"structure"` - - // The name, if any, of the SqlInjectionMatchSet. - Name *string `min:"1" type:"string"` - - // A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId - // to get information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet), - // update a SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a - // SqlInjectionMatchSet into a Rule or delete one from a Rule (see UpdateRule), - // and delete a SqlInjectionMatchSet from AWS WAF (see DeleteSqlInjectionMatchSet). - // - // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets. - // - // SqlInjectionMatchSetId is a required field - SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"` - - // Specifies the parts of web requests that you want to inspect for snippets - // of malicious SQL code. - // - // SqlInjectionMatchTuples is a required field - SqlInjectionMatchTuples []*SqlInjectionMatchTuple `type:"list" required:"true"` -} - -// String returns the string representation -func (s SqlInjectionMatchSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SqlInjectionMatchSet) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *SqlInjectionMatchSet) SetName(v string) *SqlInjectionMatchSet { - s.Name = &v - return s -} - -// SetSqlInjectionMatchSetId sets the SqlInjectionMatchSetId field's value. -func (s *SqlInjectionMatchSet) SetSqlInjectionMatchSetId(v string) *SqlInjectionMatchSet { - s.SqlInjectionMatchSetId = &v - return s -} - -// SetSqlInjectionMatchTuples sets the SqlInjectionMatchTuples field's value. -func (s *SqlInjectionMatchSet) SetSqlInjectionMatchTuples(v []*SqlInjectionMatchTuple) *SqlInjectionMatchSet { - s.SqlInjectionMatchTuples = v - return s -} - -// The Id and Name of a SqlInjectionMatchSet. -type SqlInjectionMatchSetSummary struct { - _ struct{} `type:"structure"` - - // The name of the SqlInjectionMatchSet, if any, specified by Id. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId - // to get information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet), - // update a SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a - // SqlInjectionMatchSet into a Rule or delete one from a Rule (see UpdateRule), - // and delete a SqlInjectionMatchSet from AWS WAF (see DeleteSqlInjectionMatchSet). - // - // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets. - // - // SqlInjectionMatchSetId is a required field - SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SqlInjectionMatchSetSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SqlInjectionMatchSetSummary) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *SqlInjectionMatchSetSummary) SetName(v string) *SqlInjectionMatchSetSummary { - s.Name = &v - return s -} - -// SetSqlInjectionMatchSetId sets the SqlInjectionMatchSetId field's value. -func (s *SqlInjectionMatchSetSummary) SetSqlInjectionMatchSetId(v string) *SqlInjectionMatchSetSummary { - s.SqlInjectionMatchSetId = &v - return s -} - -// Specifies the part of a web request that you want to inspect for snippets -// of malicious SQL code and indicates whether you want to add the specification -// to a SqlInjectionMatchSet or delete it from a SqlInjectionMatchSet. -type SqlInjectionMatchSetUpdate struct { - _ struct{} `type:"structure"` - - // Specify INSERT to add a SqlInjectionMatchSetUpdate to a SqlInjectionMatchSet. - // Use DELETE to remove a SqlInjectionMatchSetUpdate from a SqlInjectionMatchSet. - // - // Action is a required field - Action *string `type:"string" required:"true" enum:"ChangeAction"` - - // Specifies the part of a web request that you want AWS WAF to inspect for - // snippets of malicious SQL code and, if you want AWS WAF to inspect a header, - // the name of the header. - // - // SqlInjectionMatchTuple is a required field - SqlInjectionMatchTuple *SqlInjectionMatchTuple `type:"structure" required:"true"` -} - -// String returns the string representation -func (s SqlInjectionMatchSetUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SqlInjectionMatchSetUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SqlInjectionMatchSetUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SqlInjectionMatchSetUpdate"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.SqlInjectionMatchTuple == nil { - invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchTuple")) - } - if s.SqlInjectionMatchTuple != nil { - if err := s.SqlInjectionMatchTuple.Validate(); err != nil { - invalidParams.AddNested("SqlInjectionMatchTuple", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *SqlInjectionMatchSetUpdate) SetAction(v string) *SqlInjectionMatchSetUpdate { - s.Action = &v - return s -} - -// SetSqlInjectionMatchTuple sets the SqlInjectionMatchTuple field's value. -func (s *SqlInjectionMatchSetUpdate) SetSqlInjectionMatchTuple(v *SqlInjectionMatchTuple) *SqlInjectionMatchSetUpdate { - s.SqlInjectionMatchTuple = v - return s -} - -// Specifies the part of a web request that you want AWS WAF to inspect for -// snippets of malicious SQL code and, if you want AWS WAF to inspect a header, -// the name of the header. -type SqlInjectionMatchTuple struct { - _ struct{} `type:"structure"` - - // Specifies where in a web request to look for snippets of malicious SQL code. - // - // FieldToMatch is a required field - FieldToMatch *FieldToMatch `type:"structure" required:"true"` - - // Text transformations eliminate some of the unusual formatting that attackers - // use in web requests in an effort to bypass AWS WAF. If you specify a transformation, - // AWS WAF performs the transformation on FieldToMatch before inspecting a request - // for a match. - // - // You can only specify a single type of TextTransformation. - // - // CMD_LINE - // - // When you're concerned that attackers are injecting an operating system command - // line command and using unusual formatting to disguise some or all of the - // command, use this option to perform the following transformations: - // - // * Delete the following characters: \ " ' ^ - // - // * Delete spaces before the following characters: / ( - // - // * Replace the following characters with a space: , ; - // - // * Replace multiple spaces with one space - // - // * Convert uppercase letters (A-Z) to lowercase (a-z) - // - // COMPRESS_WHITE_SPACE - // - // Use this option to replace the following characters with a space character - // (decimal 32): - // - // * \f, formfeed, decimal 12 - // - // * \t, tab, decimal 9 - // - // * \n, newline, decimal 10 - // - // * \r, carriage return, decimal 13 - // - // * \v, vertical tab, decimal 11 - // - // * non-breaking space, decimal 160 - // - // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space. - // - // HTML_ENTITY_DECODE - // - // Use this option to replace HTML-encoded characters with unencoded characters. - // HTML_ENTITY_DECODE performs the following operations: - // - // * Replaces (ampersand)quot; with " - // - // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160 - // - // * Replaces (ampersand)lt; with a "less than" symbol - // - // * Replaces (ampersand)gt; with > - // - // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;, - // with the corresponding characters - // - // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;, - // with the corresponding characters - // - // LOWERCASE - // - // Use this option to convert uppercase letters (A-Z) to lowercase (a-z). - // - // URL_DECODE - // - // Use this option to decode a URL-encoded value. - // - // NONE - // - // Specify NONE if you don't want to perform any text transformations. - // - // TextTransformation is a required field - TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"` -} - -// String returns the string representation -func (s SqlInjectionMatchTuple) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SqlInjectionMatchTuple) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SqlInjectionMatchTuple) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SqlInjectionMatchTuple"} - if s.FieldToMatch == nil { - invalidParams.Add(request.NewErrParamRequired("FieldToMatch")) - } - if s.TextTransformation == nil { - invalidParams.Add(request.NewErrParamRequired("TextTransformation")) - } - if s.FieldToMatch != nil { - if err := s.FieldToMatch.Validate(); err != nil { - invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFieldToMatch sets the FieldToMatch field's value. -func (s *SqlInjectionMatchTuple) SetFieldToMatch(v *FieldToMatch) *SqlInjectionMatchTuple { - s.FieldToMatch = v - return s -} - -// SetTextTransformation sets the TextTransformation field's value. -func (s *SqlInjectionMatchTuple) SetTextTransformation(v string) *SqlInjectionMatchTuple { - s.TextTransformation = &v - return s -} - -// A summary of the rule groups you are subscribed to. -type SubscribedRuleGroupSummary struct { - _ struct{} `type:"structure"` - - // A friendly name or description for the metrics for this RuleGroup. The name - // can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't - // contain whitespace. You can't change the name of the metric after you create - // the RuleGroup. - // - // MetricName is a required field - MetricName *string `type:"string" required:"true"` - - // A friendly name or description of the RuleGroup. You can't change the name - // of a RuleGroup after you create it. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // A unique identifier for a RuleGroup. - // - // RuleGroupId is a required field - RuleGroupId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SubscribedRuleGroupSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SubscribedRuleGroupSummary) GoString() string { - return s.String() -} - -// SetMetricName sets the MetricName field's value. -func (s *SubscribedRuleGroupSummary) SetMetricName(v string) *SubscribedRuleGroupSummary { - s.MetricName = &v - return s -} - -// SetName sets the Name field's value. -func (s *SubscribedRuleGroupSummary) SetName(v string) *SubscribedRuleGroupSummary { - s.Name = &v - return s -} - -// SetRuleGroupId sets the RuleGroupId field's value. -func (s *SubscribedRuleGroupSummary) SetRuleGroupId(v string) *SubscribedRuleGroupSummary { - s.RuleGroupId = &v - return s -} - -// In a GetSampledRequests request, the StartTime and EndTime objects specify -// the time range for which you want AWS WAF to return a sample of web requests. -// -// In a GetSampledRequests response, the StartTime and EndTime objects specify -// the time range for which AWS WAF actually returned a sample of web requests. -// AWS WAF gets the specified number of requests from among the first 5,000 -// requests that your AWS resource receives during the specified time period. -// If your resource receives more than 5,000 requests during that period, AWS -// WAF stops sampling after the 5,000th request. In that case, EndTime is the -// time that AWS WAF received the 5,000th request. -type TimeWindow struct { - _ struct{} `type:"structure"` - - // The end of the time range from which you want GetSampledRequests to return - // a sample of the requests that your AWS resource received. Specify the date - // and time in the following format: "2016-09-27T14:50Z". You can specify any - // time range in the previous three hours. - // - // EndTime is a required field - EndTime *time.Time `type:"timestamp" required:"true"` - - // The beginning of the time range from which you want GetSampledRequests to - // return a sample of the requests that your AWS resource received. Specify - // the date and time in the following format: "2016-09-27T14:50Z". You can specify - // any time range in the previous three hours. - // - // StartTime is a required field - StartTime *time.Time `type:"timestamp" required:"true"` -} - -// String returns the string representation -func (s TimeWindow) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimeWindow) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TimeWindow) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TimeWindow"} - if s.EndTime == nil { - invalidParams.Add(request.NewErrParamRequired("EndTime")) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndTime sets the EndTime field's value. -func (s *TimeWindow) SetEndTime(v time.Time) *TimeWindow { - s.EndTime = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *TimeWindow) SetStartTime(v time.Time) *TimeWindow { - s.StartTime = &v - return s -} - -type UpdateByteMatchSetInput struct { - _ struct{} `type:"structure"` - - // The ByteMatchSetId of the ByteMatchSet that you want to update. ByteMatchSetId - // is returned by CreateByteMatchSet and by ListByteMatchSets. - // - // ByteMatchSetId is a required field - ByteMatchSetId *string `min:"1" type:"string" required:"true"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // An array of ByteMatchSetUpdate objects that you want to insert into or delete - // from a ByteMatchSet. For more information, see the applicable data types: - // - // * ByteMatchSetUpdate: Contains Action and ByteMatchTuple - // - // * ByteMatchTuple: Contains FieldToMatch, PositionalConstraint, TargetString, - // and TextTransformation - // - // * FieldToMatch: Contains Data and Type - // - // Updates is a required field - Updates []*ByteMatchSetUpdate `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateByteMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateByteMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateByteMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateByteMatchSetInput"} - if s.ByteMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("ByteMatchSetId")) - } - if s.ByteMatchSetId != nil && len(*s.ByteMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ByteMatchSetId", 1)) - } - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.Updates == nil { - invalidParams.Add(request.NewErrParamRequired("Updates")) - } - if s.Updates != nil && len(s.Updates) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) - } - if s.Updates != nil { - for i, v := range s.Updates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetByteMatchSetId sets the ByteMatchSetId field's value. -func (s *UpdateByteMatchSetInput) SetByteMatchSetId(v string) *UpdateByteMatchSetInput { - s.ByteMatchSetId = &v - return s -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateByteMatchSetInput) SetChangeToken(v string) *UpdateByteMatchSetInput { - s.ChangeToken = &v - return s -} - -// SetUpdates sets the Updates field's value. -func (s *UpdateByteMatchSetInput) SetUpdates(v []*ByteMatchSetUpdate) *UpdateByteMatchSetInput { - s.Updates = v - return s -} - -type UpdateByteMatchSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the UpdateByteMatchSet request. You - // can also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateByteMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateByteMatchSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateByteMatchSetOutput) SetChangeToken(v string) *UpdateByteMatchSetOutput { - s.ChangeToken = &v - return s -} - -type UpdateGeoMatchSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The GeoMatchSetId of the GeoMatchSet that you want to update. GeoMatchSetId - // is returned by CreateGeoMatchSet and by ListGeoMatchSets. - // - // GeoMatchSetId is a required field - GeoMatchSetId *string `min:"1" type:"string" required:"true"` - - // An array of GeoMatchSetUpdate objects that you want to insert into or delete - // from an GeoMatchSet. For more information, see the applicable data types: - // - // * GeoMatchSetUpdate: Contains Action and GeoMatchConstraint - // - // * GeoMatchConstraint: Contains Type and Value - // - // You can have only one Type and Value per GeoMatchConstraint. To add multiple - // countries, include multiple GeoMatchSetUpdate objects in your request. - // - // Updates is a required field - Updates []*GeoMatchSetUpdate `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateGeoMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGeoMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateGeoMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateGeoMatchSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.GeoMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("GeoMatchSetId")) - } - if s.GeoMatchSetId != nil && len(*s.GeoMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GeoMatchSetId", 1)) - } - if s.Updates == nil { - invalidParams.Add(request.NewErrParamRequired("Updates")) - } - if s.Updates != nil && len(s.Updates) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) - } - if s.Updates != nil { - for i, v := range s.Updates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateGeoMatchSetInput) SetChangeToken(v string) *UpdateGeoMatchSetInput { - s.ChangeToken = &v - return s -} - -// SetGeoMatchSetId sets the GeoMatchSetId field's value. -func (s *UpdateGeoMatchSetInput) SetGeoMatchSetId(v string) *UpdateGeoMatchSetInput { - s.GeoMatchSetId = &v - return s -} - -// SetUpdates sets the Updates field's value. -func (s *UpdateGeoMatchSetInput) SetUpdates(v []*GeoMatchSetUpdate) *UpdateGeoMatchSetInput { - s.Updates = v - return s -} - -type UpdateGeoMatchSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the UpdateGeoMatchSet request. You - // can also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateGeoMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateGeoMatchSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateGeoMatchSetOutput) SetChangeToken(v string) *UpdateGeoMatchSetOutput { - s.ChangeToken = &v - return s -} - -type UpdateIPSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The IPSetId of the IPSet that you want to update. IPSetId is returned by - // CreateIPSet and by ListIPSets. - // - // IPSetId is a required field - IPSetId *string `min:"1" type:"string" required:"true"` - - // An array of IPSetUpdate objects that you want to insert into or delete from - // an IPSet. For more information, see the applicable data types: - // - // * IPSetUpdate: Contains Action and IPSetDescriptor - // - // * IPSetDescriptor: Contains Type and Value - // - // You can insert a maximum of 1000 addresses in a single request. - // - // Updates is a required field - Updates []*IPSetUpdate `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateIPSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIPSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateIPSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateIPSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.IPSetId == nil { - invalidParams.Add(request.NewErrParamRequired("IPSetId")) - } - if s.IPSetId != nil && len(*s.IPSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IPSetId", 1)) - } - if s.Updates == nil { - invalidParams.Add(request.NewErrParamRequired("Updates")) - } - if s.Updates != nil && len(s.Updates) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) - } - if s.Updates != nil { - for i, v := range s.Updates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateIPSetInput) SetChangeToken(v string) *UpdateIPSetInput { - s.ChangeToken = &v - return s -} - -// SetIPSetId sets the IPSetId field's value. -func (s *UpdateIPSetInput) SetIPSetId(v string) *UpdateIPSetInput { - s.IPSetId = &v - return s -} - -// SetUpdates sets the Updates field's value. -func (s *UpdateIPSetInput) SetUpdates(v []*IPSetUpdate) *UpdateIPSetInput { - s.Updates = v - return s -} - -type UpdateIPSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the UpdateIPSet request. You can - // also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateIPSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIPSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateIPSetOutput) SetChangeToken(v string) *UpdateIPSetOutput { - s.ChangeToken = &v - return s -} - -type UpdateRateBasedRuleInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The maximum number of requests, which have an identical value in the field - // specified by the RateKey, allowed in a five-minute period. If the number - // of requests exceeds the RateLimit and the other predicates specified in the - // rule are also met, AWS WAF triggers the action that is specified for this - // rule. - // - // RateLimit is a required field - RateLimit *int64 `min:"2000" type:"long" required:"true"` - - // The RuleId of the RateBasedRule that you want to update. RuleId is returned - // by CreateRateBasedRule and by ListRateBasedRules. - // - // RuleId is a required field - RuleId *string `min:"1" type:"string" required:"true"` - - // An array of RuleUpdate objects that you want to insert into or delete from - // a RateBasedRule. - // - // Updates is a required field - Updates []*RuleUpdate `type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateRateBasedRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRateBasedRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRateBasedRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRateBasedRuleInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.RateLimit == nil { - invalidParams.Add(request.NewErrParamRequired("RateLimit")) - } - if s.RateLimit != nil && *s.RateLimit < 2000 { - invalidParams.Add(request.NewErrParamMinValue("RateLimit", 2000)) - } - if s.RuleId == nil { - invalidParams.Add(request.NewErrParamRequired("RuleId")) - } - if s.RuleId != nil && len(*s.RuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleId", 1)) - } - if s.Updates == nil { - invalidParams.Add(request.NewErrParamRequired("Updates")) - } - if s.Updates != nil { - for i, v := range s.Updates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateRateBasedRuleInput) SetChangeToken(v string) *UpdateRateBasedRuleInput { - s.ChangeToken = &v - return s -} - -// SetRateLimit sets the RateLimit field's value. -func (s *UpdateRateBasedRuleInput) SetRateLimit(v int64) *UpdateRateBasedRuleInput { - s.RateLimit = &v - return s -} - -// SetRuleId sets the RuleId field's value. -func (s *UpdateRateBasedRuleInput) SetRuleId(v string) *UpdateRateBasedRuleInput { - s.RuleId = &v - return s -} - -// SetUpdates sets the Updates field's value. -func (s *UpdateRateBasedRuleInput) SetUpdates(v []*RuleUpdate) *UpdateRateBasedRuleInput { - s.Updates = v - return s -} - -type UpdateRateBasedRuleOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the UpdateRateBasedRule request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateRateBasedRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRateBasedRuleOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateRateBasedRuleOutput) SetChangeToken(v string) *UpdateRateBasedRuleOutput { - s.ChangeToken = &v - return s -} - -type UpdateRegexMatchSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The RegexMatchSetId of the RegexMatchSet that you want to update. RegexMatchSetId - // is returned by CreateRegexMatchSet and by ListRegexMatchSets. - // - // RegexMatchSetId is a required field - RegexMatchSetId *string `min:"1" type:"string" required:"true"` - - // An array of RegexMatchSetUpdate objects that you want to insert into or delete - // from a RegexMatchSet. For more information, see RegexMatchTuple. - // - // Updates is a required field - Updates []*RegexMatchSetUpdate `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateRegexMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRegexMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRegexMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRegexMatchSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.RegexMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("RegexMatchSetId")) - } - if s.RegexMatchSetId != nil && len(*s.RegexMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RegexMatchSetId", 1)) - } - if s.Updates == nil { - invalidParams.Add(request.NewErrParamRequired("Updates")) - } - if s.Updates != nil && len(s.Updates) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) - } - if s.Updates != nil { - for i, v := range s.Updates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateRegexMatchSetInput) SetChangeToken(v string) *UpdateRegexMatchSetInput { - s.ChangeToken = &v - return s -} - -// SetRegexMatchSetId sets the RegexMatchSetId field's value. -func (s *UpdateRegexMatchSetInput) SetRegexMatchSetId(v string) *UpdateRegexMatchSetInput { - s.RegexMatchSetId = &v - return s -} - -// SetUpdates sets the Updates field's value. -func (s *UpdateRegexMatchSetInput) SetUpdates(v []*RegexMatchSetUpdate) *UpdateRegexMatchSetInput { - s.Updates = v - return s -} - -type UpdateRegexMatchSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the UpdateRegexMatchSet request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateRegexMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRegexMatchSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateRegexMatchSetOutput) SetChangeToken(v string) *UpdateRegexMatchSetOutput { - s.ChangeToken = &v - return s -} - -type UpdateRegexPatternSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The RegexPatternSetId of the RegexPatternSet that you want to update. RegexPatternSetId - // is returned by CreateRegexPatternSet and by ListRegexPatternSets. - // - // RegexPatternSetId is a required field - RegexPatternSetId *string `min:"1" type:"string" required:"true"` - - // An array of RegexPatternSetUpdate objects that you want to insert into or - // delete from a RegexPatternSet. - // - // Updates is a required field - Updates []*RegexPatternSetUpdate `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateRegexPatternSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRegexPatternSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRegexPatternSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRegexPatternSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.RegexPatternSetId == nil { - invalidParams.Add(request.NewErrParamRequired("RegexPatternSetId")) - } - if s.RegexPatternSetId != nil && len(*s.RegexPatternSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RegexPatternSetId", 1)) - } - if s.Updates == nil { - invalidParams.Add(request.NewErrParamRequired("Updates")) - } - if s.Updates != nil && len(s.Updates) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) - } - if s.Updates != nil { - for i, v := range s.Updates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateRegexPatternSetInput) SetChangeToken(v string) *UpdateRegexPatternSetInput { - s.ChangeToken = &v - return s -} - -// SetRegexPatternSetId sets the RegexPatternSetId field's value. -func (s *UpdateRegexPatternSetInput) SetRegexPatternSetId(v string) *UpdateRegexPatternSetInput { - s.RegexPatternSetId = &v - return s -} - -// SetUpdates sets the Updates field's value. -func (s *UpdateRegexPatternSetInput) SetUpdates(v []*RegexPatternSetUpdate) *UpdateRegexPatternSetInput { - s.Updates = v - return s -} - -type UpdateRegexPatternSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the UpdateRegexPatternSet request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateRegexPatternSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRegexPatternSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateRegexPatternSetOutput) SetChangeToken(v string) *UpdateRegexPatternSetOutput { - s.ChangeToken = &v - return s -} - -type UpdateRuleGroupInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The RuleGroupId of the RuleGroup that you want to update. RuleGroupId is - // returned by CreateRuleGroup and by ListRuleGroups. - // - // RuleGroupId is a required field - RuleGroupId *string `min:"1" type:"string" required:"true"` - - // An array of RuleGroupUpdate objects that you want to insert into or delete - // from a RuleGroup. - // - // You can only insert REGULAR rules into a rule group. - // - // ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup - // to a WebACL. In this case you do not use ActivatedRule|Action. For all other - // update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction. - // - // Updates is a required field - Updates []*RuleGroupUpdate `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateRuleGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRuleGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRuleGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRuleGroupInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.RuleGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("RuleGroupId")) - } - if s.RuleGroupId != nil && len(*s.RuleGroupId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleGroupId", 1)) - } - if s.Updates == nil { - invalidParams.Add(request.NewErrParamRequired("Updates")) - } - if s.Updates != nil && len(s.Updates) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) - } - if s.Updates != nil { - for i, v := range s.Updates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateRuleGroupInput) SetChangeToken(v string) *UpdateRuleGroupInput { - s.ChangeToken = &v - return s -} - -// SetRuleGroupId sets the RuleGroupId field's value. -func (s *UpdateRuleGroupInput) SetRuleGroupId(v string) *UpdateRuleGroupInput { - s.RuleGroupId = &v - return s -} - -// SetUpdates sets the Updates field's value. -func (s *UpdateRuleGroupInput) SetUpdates(v []*RuleGroupUpdate) *UpdateRuleGroupInput { - s.Updates = v - return s -} - -type UpdateRuleGroupOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the UpdateRuleGroup request. You - // can also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateRuleGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRuleGroupOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateRuleGroupOutput) SetChangeToken(v string) *UpdateRuleGroupOutput { - s.ChangeToken = &v - return s -} - -type UpdateRuleInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The RuleId of the Rule that you want to update. RuleId is returned by CreateRule - // and by ListRules. - // - // RuleId is a required field - RuleId *string `min:"1" type:"string" required:"true"` - - // An array of RuleUpdate objects that you want to insert into or delete from - // a Rule. For more information, see the applicable data types: - // - // * RuleUpdate: Contains Action and Predicate - // - // * Predicate: Contains DataId, Negated, and Type - // - // * FieldToMatch: Contains Data and Type - // - // Updates is a required field - Updates []*RuleUpdate `type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateRuleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRuleInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.RuleId == nil { - invalidParams.Add(request.NewErrParamRequired("RuleId")) - } - if s.RuleId != nil && len(*s.RuleId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuleId", 1)) - } - if s.Updates == nil { - invalidParams.Add(request.NewErrParamRequired("Updates")) - } - if s.Updates != nil { - for i, v := range s.Updates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateRuleInput) SetChangeToken(v string) *UpdateRuleInput { - s.ChangeToken = &v - return s -} - -// SetRuleId sets the RuleId field's value. -func (s *UpdateRuleInput) SetRuleId(v string) *UpdateRuleInput { - s.RuleId = &v - return s -} - -// SetUpdates sets the Updates field's value. -func (s *UpdateRuleInput) SetUpdates(v []*RuleUpdate) *UpdateRuleInput { - s.Updates = v - return s -} - -type UpdateRuleOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the UpdateRule request. You can also - // use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateRuleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRuleOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateRuleOutput) SetChangeToken(v string) *UpdateRuleOutput { - s.ChangeToken = &v - return s -} - -type UpdateSizeConstraintSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The SizeConstraintSetId of the SizeConstraintSet that you want to update. - // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets. - // - // SizeConstraintSetId is a required field - SizeConstraintSetId *string `min:"1" type:"string" required:"true"` - - // An array of SizeConstraintSetUpdate objects that you want to insert into - // or delete from a SizeConstraintSet. For more information, see the applicable - // data types: - // - // * SizeConstraintSetUpdate: Contains Action and SizeConstraint - // - // * SizeConstraint: Contains FieldToMatch, TextTransformation, ComparisonOperator, - // and Size - // - // * FieldToMatch: Contains Data and Type - // - // Updates is a required field - Updates []*SizeConstraintSetUpdate `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateSizeConstraintSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSizeConstraintSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSizeConstraintSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSizeConstraintSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.SizeConstraintSetId == nil { - invalidParams.Add(request.NewErrParamRequired("SizeConstraintSetId")) - } - if s.SizeConstraintSetId != nil && len(*s.SizeConstraintSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SizeConstraintSetId", 1)) - } - if s.Updates == nil { - invalidParams.Add(request.NewErrParamRequired("Updates")) - } - if s.Updates != nil && len(s.Updates) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) - } - if s.Updates != nil { - for i, v := range s.Updates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateSizeConstraintSetInput) SetChangeToken(v string) *UpdateSizeConstraintSetInput { - s.ChangeToken = &v - return s -} - -// SetSizeConstraintSetId sets the SizeConstraintSetId field's value. -func (s *UpdateSizeConstraintSetInput) SetSizeConstraintSetId(v string) *UpdateSizeConstraintSetInput { - s.SizeConstraintSetId = &v - return s -} - -// SetUpdates sets the Updates field's value. -func (s *UpdateSizeConstraintSetInput) SetUpdates(v []*SizeConstraintSetUpdate) *UpdateSizeConstraintSetInput { - s.Updates = v - return s -} - -type UpdateSizeConstraintSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the UpdateSizeConstraintSet request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateSizeConstraintSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSizeConstraintSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateSizeConstraintSetOutput) SetChangeToken(v string) *UpdateSizeConstraintSetOutput { - s.ChangeToken = &v - return s -} - -// A request to update a SqlInjectionMatchSet. -type UpdateSqlInjectionMatchSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to update. - // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets. - // - // SqlInjectionMatchSetId is a required field - SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"` - - // An array of SqlInjectionMatchSetUpdate objects that you want to insert into - // or delete from a SqlInjectionMatchSet. For more information, see the applicable - // data types: - // - // * SqlInjectionMatchSetUpdate: Contains Action and SqlInjectionMatchTuple - // - // * SqlInjectionMatchTuple: Contains FieldToMatch and TextTransformation - // - // * FieldToMatch: Contains Data and Type - // - // Updates is a required field - Updates []*SqlInjectionMatchSetUpdate `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateSqlInjectionMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSqlInjectionMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSqlInjectionMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSqlInjectionMatchSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.SqlInjectionMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchSetId")) - } - if s.SqlInjectionMatchSetId != nil && len(*s.SqlInjectionMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SqlInjectionMatchSetId", 1)) - } - if s.Updates == nil { - invalidParams.Add(request.NewErrParamRequired("Updates")) - } - if s.Updates != nil && len(s.Updates) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) - } - if s.Updates != nil { - for i, v := range s.Updates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateSqlInjectionMatchSetInput) SetChangeToken(v string) *UpdateSqlInjectionMatchSetInput { - s.ChangeToken = &v - return s -} - -// SetSqlInjectionMatchSetId sets the SqlInjectionMatchSetId field's value. -func (s *UpdateSqlInjectionMatchSetInput) SetSqlInjectionMatchSetId(v string) *UpdateSqlInjectionMatchSetInput { - s.SqlInjectionMatchSetId = &v - return s -} - -// SetUpdates sets the Updates field's value. -func (s *UpdateSqlInjectionMatchSetInput) SetUpdates(v []*SqlInjectionMatchSetUpdate) *UpdateSqlInjectionMatchSetInput { - s.Updates = v - return s -} - -// The response to an UpdateSqlInjectionMatchSets request. -type UpdateSqlInjectionMatchSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the UpdateSqlInjectionMatchSet request. - // You can also use this value to query the status of the request. For more - // information, see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateSqlInjectionMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateSqlInjectionMatchSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateSqlInjectionMatchSetOutput) SetChangeToken(v string) *UpdateSqlInjectionMatchSetOutput { - s.ChangeToken = &v - return s -} - -type UpdateWebACLInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // A default action for the web ACL, either ALLOW or BLOCK. AWS WAF performs - // the default action if a request doesn't match the criteria in any of the - // rules in a web ACL. - DefaultAction *WafAction `type:"structure"` - - // An array of updates to make to the WebACL. - // - // An array of WebACLUpdate objects that you want to insert into or delete from - // a WebACL. For more information, see the applicable data types: - // - // * WebACLUpdate: Contains Action and ActivatedRule - // - // * ActivatedRule: Contains Action, OverrideAction, Priority, RuleId, and - // Type. ActivatedRule|OverrideAction applies only when updating or adding - // a RuleGroup to a WebACL. In this case, you do not use ActivatedRule|Action. - // For all other update requests, ActivatedRule|Action is used instead of - // ActivatedRule|OverrideAction. - // - // * WafAction: Contains Type - Updates []*WebACLUpdate `type:"list"` - - // The WebACLId of the WebACL that you want to update. WebACLId is returned - // by CreateWebACL and by ListWebACLs. - // - // WebACLId is a required field - WebACLId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateWebACLInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateWebACLInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateWebACLInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateWebACLInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.WebACLId == nil { - invalidParams.Add(request.NewErrParamRequired("WebACLId")) - } - if s.WebACLId != nil && len(*s.WebACLId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1)) - } - if s.DefaultAction != nil { - if err := s.DefaultAction.Validate(); err != nil { - invalidParams.AddNested("DefaultAction", err.(request.ErrInvalidParams)) - } - } - if s.Updates != nil { - for i, v := range s.Updates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateWebACLInput) SetChangeToken(v string) *UpdateWebACLInput { - s.ChangeToken = &v - return s -} - -// SetDefaultAction sets the DefaultAction field's value. -func (s *UpdateWebACLInput) SetDefaultAction(v *WafAction) *UpdateWebACLInput { - s.DefaultAction = v - return s -} - -// SetUpdates sets the Updates field's value. -func (s *UpdateWebACLInput) SetUpdates(v []*WebACLUpdate) *UpdateWebACLInput { - s.Updates = v - return s -} - -// SetWebACLId sets the WebACLId field's value. -func (s *UpdateWebACLInput) SetWebACLId(v string) *UpdateWebACLInput { - s.WebACLId = &v - return s -} - -type UpdateWebACLOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the UpdateWebACL request. You can - // also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateWebACLOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateWebACLOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateWebACLOutput) SetChangeToken(v string) *UpdateWebACLOutput { - s.ChangeToken = &v - return s -} - -// A request to update an XssMatchSet. -type UpdateXssMatchSetInput struct { - _ struct{} `type:"structure"` - - // The value returned by the most recent call to GetChangeToken. - // - // ChangeToken is a required field - ChangeToken *string `min:"1" type:"string" required:"true"` - - // An array of XssMatchSetUpdate objects that you want to insert into or delete - // from an XssMatchSet. For more information, see the applicable data types: - // - // * XssMatchSetUpdate: Contains Action and XssMatchTuple - // - // * XssMatchTuple: Contains FieldToMatch and TextTransformation - // - // * FieldToMatch: Contains Data and Type - // - // Updates is a required field - Updates []*XssMatchSetUpdate `min:"1" type:"list" required:"true"` - - // The XssMatchSetId of the XssMatchSet that you want to update. XssMatchSetId - // is returned by CreateXssMatchSet and by ListXssMatchSets. - // - // XssMatchSetId is a required field - XssMatchSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateXssMatchSetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateXssMatchSetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateXssMatchSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateXssMatchSetInput"} - if s.ChangeToken == nil { - invalidParams.Add(request.NewErrParamRequired("ChangeToken")) - } - if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) - } - if s.Updates == nil { - invalidParams.Add(request.NewErrParamRequired("Updates")) - } - if s.Updates != nil && len(s.Updates) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) - } - if s.XssMatchSetId == nil { - invalidParams.Add(request.NewErrParamRequired("XssMatchSetId")) - } - if s.XssMatchSetId != nil && len(*s.XssMatchSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("XssMatchSetId", 1)) - } - if s.Updates != nil { - for i, v := range s.Updates { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateXssMatchSetInput) SetChangeToken(v string) *UpdateXssMatchSetInput { - s.ChangeToken = &v - return s -} - -// SetUpdates sets the Updates field's value. -func (s *UpdateXssMatchSetInput) SetUpdates(v []*XssMatchSetUpdate) *UpdateXssMatchSetInput { - s.Updates = v - return s -} - -// SetXssMatchSetId sets the XssMatchSetId field's value. -func (s *UpdateXssMatchSetInput) SetXssMatchSetId(v string) *UpdateXssMatchSetInput { - s.XssMatchSetId = &v - return s -} - -// The response to an UpdateXssMatchSets request. -type UpdateXssMatchSetOutput struct { - _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the UpdateXssMatchSet request. You - // can also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UpdateXssMatchSetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateXssMatchSetOutput) GoString() string { - return s.String() -} - -// SetChangeToken sets the ChangeToken field's value. -func (s *UpdateXssMatchSetOutput) SetChangeToken(v string) *UpdateXssMatchSetOutput { - s.ChangeToken = &v - return s -} - -// For the action that is associated with a rule in a WebACL, specifies the -// action that you want AWS WAF to perform when a web request matches all of -// the conditions in a rule. For the default action in a WebACL, specifies the -// action that you want AWS WAF to take when a web request doesn't match all -// of the conditions in any of the rules in a WebACL. -type WafAction struct { - _ struct{} `type:"structure"` - - // Specifies how you want AWS WAF to respond to requests that match the settings - // in a Rule. Valid settings include the following: - // - // * ALLOW: AWS WAF allows requests - // - // * BLOCK: AWS WAF blocks requests - // - // * COUNT: AWS WAF increments a counter of the requests that match all of - // the conditions in the rule. AWS WAF then continues to inspect the web - // request based on the remaining rules in the web ACL. You can't specify - // COUNT for the default action for a WebACL. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"WafActionType"` -} - -// String returns the string representation -func (s WafAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WafAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WafAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WafAction"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetType sets the Type field's value. -func (s *WafAction) SetType(v string) *WafAction { - s.Type = &v - return s -} - -// The action to take if any rule within the RuleGroup matches a request. -type WafOverrideAction struct { - _ struct{} `type:"structure"` - - // COUNT overrides the action specified by the individual rule within a RuleGroup - // . If set to NONE, the rule's action will take place. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"WafOverrideActionType"` -} - -// String returns the string representation -func (s WafOverrideAction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WafOverrideAction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WafOverrideAction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WafOverrideAction"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetType sets the Type field's value. -func (s *WafOverrideAction) SetType(v string) *WafOverrideAction { - s.Type = &v - return s -} - -// Contains the Rules that identify the requests that you want to allow, block, -// or count. In a WebACL, you also specify a default action (ALLOW or BLOCK), -// and the action for each Rule that you add to a WebACL, for example, block -// requests from specified IP addresses or block requests from specified referrers. -// You also associate the WebACL with a CloudFront distribution to identify -// the requests that you want AWS WAF to filter. If you add more than one Rule -// to a WebACL, a request needs to match only one of the specifications to be -// allowed, blocked, or counted. For more information, see UpdateWebACL. -type WebACL struct { - _ struct{} `type:"structure"` - - // The action to perform if none of the Rules contained in the WebACL match. - // The action is specified by the WafAction object. - // - // DefaultAction is a required field - DefaultAction *WafAction `type:"structure" required:"true"` - - // A friendly name or description for the metrics for this WebACL. The name - // can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't - // contain whitespace. You can't change MetricName after you create the WebACL. - MetricName *string `type:"string"` - - // A friendly name or description of the WebACL. You can't change the name of - // a WebACL after you create it. - Name *string `min:"1" type:"string"` - - // An array that contains the action for each Rule in a WebACL, the priority - // of the Rule, and the ID of the Rule. - // - // Rules is a required field - Rules []*ActivatedRule `type:"list" required:"true"` - - // Tha Amazon Resource Name (ARN) of the web ACL. - WebACLArn *string `min:"1" type:"string"` - - // A unique identifier for a WebACL. You use WebACLId to get information about - // a WebACL (see GetWebACL), update a WebACL (see UpdateWebACL), and delete - // a WebACL from AWS WAF (see DeleteWebACL). - // - // WebACLId is returned by CreateWebACL and by ListWebACLs. - // - // WebACLId is a required field - WebACLId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s WebACL) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WebACL) GoString() string { - return s.String() -} - -// SetDefaultAction sets the DefaultAction field's value. -func (s *WebACL) SetDefaultAction(v *WafAction) *WebACL { - s.DefaultAction = v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *WebACL) SetMetricName(v string) *WebACL { - s.MetricName = &v - return s -} - -// SetName sets the Name field's value. -func (s *WebACL) SetName(v string) *WebACL { - s.Name = &v - return s -} - -// SetRules sets the Rules field's value. -func (s *WebACL) SetRules(v []*ActivatedRule) *WebACL { - s.Rules = v - return s -} - -// SetWebACLArn sets the WebACLArn field's value. -func (s *WebACL) SetWebACLArn(v string) *WebACL { - s.WebACLArn = &v - return s -} - -// SetWebACLId sets the WebACLId field's value. -func (s *WebACL) SetWebACLId(v string) *WebACL { - s.WebACLId = &v - return s -} - -// Contains the identifier and the name or description of the WebACL. -type WebACLSummary struct { - _ struct{} `type:"structure"` - - // A friendly name or description of the WebACL. You can't change the name of - // a WebACL after you create it. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // A unique identifier for a WebACL. You use WebACLId to get information about - // a WebACL (see GetWebACL), update a WebACL (see UpdateWebACL), and delete - // a WebACL from AWS WAF (see DeleteWebACL). - // - // WebACLId is returned by CreateWebACL and by ListWebACLs. - // - // WebACLId is a required field - WebACLId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s WebACLSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WebACLSummary) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *WebACLSummary) SetName(v string) *WebACLSummary { - s.Name = &v - return s -} - -// SetWebACLId sets the WebACLId field's value. -func (s *WebACLSummary) SetWebACLId(v string) *WebACLSummary { - s.WebACLId = &v - return s -} - -// Specifies whether to insert a Rule into or delete a Rule from a WebACL. -type WebACLUpdate struct { - _ struct{} `type:"structure"` - - // Specifies whether to insert a Rule into or delete a Rule from a WebACL. - // - // Action is a required field - Action *string `type:"string" required:"true" enum:"ChangeAction"` - - // The ActivatedRule object in an UpdateWebACL request specifies a Rule that - // you want to insert or delete, the priority of the Rule in the WebACL, and - // the action that you want AWS WAF to take when a web request matches the Rule - // (ALLOW, BLOCK, or COUNT). - // - // ActivatedRule is a required field - ActivatedRule *ActivatedRule `type:"structure" required:"true"` -} - -// String returns the string representation -func (s WebACLUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WebACLUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WebACLUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WebACLUpdate"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.ActivatedRule == nil { - invalidParams.Add(request.NewErrParamRequired("ActivatedRule")) - } - if s.ActivatedRule != nil { - if err := s.ActivatedRule.Validate(); err != nil { - invalidParams.AddNested("ActivatedRule", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *WebACLUpdate) SetAction(v string) *WebACLUpdate { - s.Action = &v - return s -} - -// SetActivatedRule sets the ActivatedRule field's value. -func (s *WebACLUpdate) SetActivatedRule(v *ActivatedRule) *WebACLUpdate { - s.ActivatedRule = v - return s -} - -// A complex type that contains XssMatchTuple objects, which specify the parts -// of web requests that you want AWS WAF to inspect for cross-site scripting -// attacks and, if you want AWS WAF to inspect a header, the name of the header. -// If a XssMatchSet contains more than one XssMatchTuple object, a request needs -// to include cross-site scripting attacks in only one of the specified parts -// of the request to be considered a match. -type XssMatchSet struct { - _ struct{} `type:"structure"` - - // The name, if any, of the XssMatchSet. - Name *string `min:"1" type:"string"` - - // A unique identifier for an XssMatchSet. You use XssMatchSetId to get information - // about an XssMatchSet (see GetXssMatchSet), update an XssMatchSet (see UpdateXssMatchSet), - // insert an XssMatchSet into a Rule or delete one from a Rule (see UpdateRule), - // and delete an XssMatchSet from AWS WAF (see DeleteXssMatchSet). - // - // XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets. - // - // XssMatchSetId is a required field - XssMatchSetId *string `min:"1" type:"string" required:"true"` - - // Specifies the parts of web requests that you want to inspect for cross-site - // scripting attacks. - // - // XssMatchTuples is a required field - XssMatchTuples []*XssMatchTuple `type:"list" required:"true"` -} - -// String returns the string representation -func (s XssMatchSet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s XssMatchSet) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *XssMatchSet) SetName(v string) *XssMatchSet { - s.Name = &v - return s -} - -// SetXssMatchSetId sets the XssMatchSetId field's value. -func (s *XssMatchSet) SetXssMatchSetId(v string) *XssMatchSet { - s.XssMatchSetId = &v - return s -} - -// SetXssMatchTuples sets the XssMatchTuples field's value. -func (s *XssMatchSet) SetXssMatchTuples(v []*XssMatchTuple) *XssMatchSet { - s.XssMatchTuples = v - return s -} - -// The Id and Name of an XssMatchSet. -type XssMatchSetSummary struct { - _ struct{} `type:"structure"` - - // The name of the XssMatchSet, if any, specified by Id. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // A unique identifier for an XssMatchSet. You use XssMatchSetId to get information - // about a XssMatchSet (see GetXssMatchSet), update an XssMatchSet (see UpdateXssMatchSet), - // insert an XssMatchSet into a Rule or delete one from a Rule (see UpdateRule), - // and delete an XssMatchSet from AWS WAF (see DeleteXssMatchSet). - // - // XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets. - // - // XssMatchSetId is a required field - XssMatchSetId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s XssMatchSetSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s XssMatchSetSummary) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *XssMatchSetSummary) SetName(v string) *XssMatchSetSummary { - s.Name = &v - return s -} - -// SetXssMatchSetId sets the XssMatchSetId field's value. -func (s *XssMatchSetSummary) SetXssMatchSetId(v string) *XssMatchSetSummary { - s.XssMatchSetId = &v - return s -} - -// Specifies the part of a web request that you want to inspect for cross-site -// scripting attacks and indicates whether you want to add the specification -// to an XssMatchSet or delete it from an XssMatchSet. -type XssMatchSetUpdate struct { - _ struct{} `type:"structure"` - - // Specify INSERT to add an XssMatchSetUpdate to an XssMatchSet. Use DELETE - // to remove an XssMatchSetUpdate from an XssMatchSet. - // - // Action is a required field - Action *string `type:"string" required:"true" enum:"ChangeAction"` - - // Specifies the part of a web request that you want AWS WAF to inspect for - // cross-site scripting attacks and, if you want AWS WAF to inspect a header, - // the name of the header. - // - // XssMatchTuple is a required field - XssMatchTuple *XssMatchTuple `type:"structure" required:"true"` -} - -// String returns the string representation -func (s XssMatchSetUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s XssMatchSetUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *XssMatchSetUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "XssMatchSetUpdate"} - if s.Action == nil { - invalidParams.Add(request.NewErrParamRequired("Action")) - } - if s.XssMatchTuple == nil { - invalidParams.Add(request.NewErrParamRequired("XssMatchTuple")) - } - if s.XssMatchTuple != nil { - if err := s.XssMatchTuple.Validate(); err != nil { - invalidParams.AddNested("XssMatchTuple", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAction sets the Action field's value. -func (s *XssMatchSetUpdate) SetAction(v string) *XssMatchSetUpdate { - s.Action = &v - return s -} - -// SetXssMatchTuple sets the XssMatchTuple field's value. -func (s *XssMatchSetUpdate) SetXssMatchTuple(v *XssMatchTuple) *XssMatchSetUpdate { - s.XssMatchTuple = v - return s -} - -// Specifies the part of a web request that you want AWS WAF to inspect for -// cross-site scripting attacks and, if you want AWS WAF to inspect a header, -// the name of the header. -type XssMatchTuple struct { - _ struct{} `type:"structure"` - - // Specifies where in a web request to look for cross-site scripting attacks. - // - // FieldToMatch is a required field - FieldToMatch *FieldToMatch `type:"structure" required:"true"` - - // Text transformations eliminate some of the unusual formatting that attackers - // use in web requests in an effort to bypass AWS WAF. If you specify a transformation, - // AWS WAF performs the transformation on FieldToMatch before inspecting a request - // for a match. - // - // You can only specify a single type of TextTransformation. - // - // CMD_LINE - // - // When you're concerned that attackers are injecting an operating system command - // line command and using unusual formatting to disguise some or all of the - // command, use this option to perform the following transformations: - // - // * Delete the following characters: \ " ' ^ - // - // * Delete spaces before the following characters: / ( - // - // * Replace the following characters with a space: , ; - // - // * Replace multiple spaces with one space - // - // * Convert uppercase letters (A-Z) to lowercase (a-z) - // - // COMPRESS_WHITE_SPACE - // - // Use this option to replace the following characters with a space character - // (decimal 32): - // - // * \f, formfeed, decimal 12 - // - // * \t, tab, decimal 9 - // - // * \n, newline, decimal 10 - // - // * \r, carriage return, decimal 13 - // - // * \v, vertical tab, decimal 11 - // - // * non-breaking space, decimal 160 - // - // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space. - // - // HTML_ENTITY_DECODE - // - // Use this option to replace HTML-encoded characters with unencoded characters. - // HTML_ENTITY_DECODE performs the following operations: - // - // * Replaces (ampersand)quot; with " - // - // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160 - // - // * Replaces (ampersand)lt; with a "less than" symbol - // - // * Replaces (ampersand)gt; with > - // - // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;, - // with the corresponding characters - // - // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;, - // with the corresponding characters - // - // LOWERCASE - // - // Use this option to convert uppercase letters (A-Z) to lowercase (a-z). - // - // URL_DECODE - // - // Use this option to decode a URL-encoded value. - // - // NONE - // - // Specify NONE if you don't want to perform any text transformations. - // - // TextTransformation is a required field - TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"` -} - -// String returns the string representation -func (s XssMatchTuple) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s XssMatchTuple) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *XssMatchTuple) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "XssMatchTuple"} - if s.FieldToMatch == nil { - invalidParams.Add(request.NewErrParamRequired("FieldToMatch")) - } - if s.TextTransformation == nil { - invalidParams.Add(request.NewErrParamRequired("TextTransformation")) - } - if s.FieldToMatch != nil { - if err := s.FieldToMatch.Validate(); err != nil { - invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFieldToMatch sets the FieldToMatch field's value. -func (s *XssMatchTuple) SetFieldToMatch(v *FieldToMatch) *XssMatchTuple { - s.FieldToMatch = v - return s -} - -// SetTextTransformation sets the TextTransformation field's value. -func (s *XssMatchTuple) SetTextTransformation(v string) *XssMatchTuple { - s.TextTransformation = &v - return s -} - -const ( - // ChangeActionInsert is a ChangeAction enum value - ChangeActionInsert = "INSERT" - - // ChangeActionDelete is a ChangeAction enum value - ChangeActionDelete = "DELETE" -) - -const ( - // ChangeTokenStatusProvisioned is a ChangeTokenStatus enum value - ChangeTokenStatusProvisioned = "PROVISIONED" - - // ChangeTokenStatusPending is a ChangeTokenStatus enum value - ChangeTokenStatusPending = "PENDING" - - // ChangeTokenStatusInsync is a ChangeTokenStatus enum value - ChangeTokenStatusInsync = "INSYNC" -) - -const ( - // ComparisonOperatorEq is a ComparisonOperator enum value - ComparisonOperatorEq = "EQ" - - // ComparisonOperatorNe is a ComparisonOperator enum value - ComparisonOperatorNe = "NE" - - // ComparisonOperatorLe is a ComparisonOperator enum value - ComparisonOperatorLe = "LE" - - // ComparisonOperatorLt is a ComparisonOperator enum value - ComparisonOperatorLt = "LT" - - // ComparisonOperatorGe is a ComparisonOperator enum value - ComparisonOperatorGe = "GE" - - // ComparisonOperatorGt is a ComparisonOperator enum value - ComparisonOperatorGt = "GT" -) - -const ( - // GeoMatchConstraintTypeCountry is a GeoMatchConstraintType enum value - GeoMatchConstraintTypeCountry = "Country" -) - -const ( - // GeoMatchConstraintValueAf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAf = "AF" - - // GeoMatchConstraintValueAx is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAx = "AX" - - // GeoMatchConstraintValueAl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAl = "AL" - - // GeoMatchConstraintValueDz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueDz = "DZ" - - // GeoMatchConstraintValueAs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAs = "AS" - - // GeoMatchConstraintValueAd is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAd = "AD" - - // GeoMatchConstraintValueAo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAo = "AO" - - // GeoMatchConstraintValueAi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAi = "AI" - - // GeoMatchConstraintValueAq is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAq = "AQ" - - // GeoMatchConstraintValueAg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAg = "AG" - - // GeoMatchConstraintValueAr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAr = "AR" - - // GeoMatchConstraintValueAm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAm = "AM" - - // GeoMatchConstraintValueAw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAw = "AW" - - // GeoMatchConstraintValueAu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAu = "AU" - - // GeoMatchConstraintValueAt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAt = "AT" - - // GeoMatchConstraintValueAz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAz = "AZ" - - // GeoMatchConstraintValueBs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBs = "BS" - - // GeoMatchConstraintValueBh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBh = "BH" - - // GeoMatchConstraintValueBd is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBd = "BD" - - // GeoMatchConstraintValueBb is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBb = "BB" - - // GeoMatchConstraintValueBy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBy = "BY" - - // GeoMatchConstraintValueBe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBe = "BE" - - // GeoMatchConstraintValueBz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBz = "BZ" - - // GeoMatchConstraintValueBj is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBj = "BJ" - - // GeoMatchConstraintValueBm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBm = "BM" - - // GeoMatchConstraintValueBt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBt = "BT" - - // GeoMatchConstraintValueBo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBo = "BO" - - // GeoMatchConstraintValueBq is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBq = "BQ" - - // GeoMatchConstraintValueBa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBa = "BA" - - // GeoMatchConstraintValueBw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBw = "BW" - - // GeoMatchConstraintValueBv is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBv = "BV" - - // GeoMatchConstraintValueBr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBr = "BR" - - // GeoMatchConstraintValueIo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIo = "IO" - - // GeoMatchConstraintValueBn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBn = "BN" - - // GeoMatchConstraintValueBg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBg = "BG" - - // GeoMatchConstraintValueBf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBf = "BF" - - // GeoMatchConstraintValueBi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBi = "BI" - - // GeoMatchConstraintValueKh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKh = "KH" - - // GeoMatchConstraintValueCm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCm = "CM" - - // GeoMatchConstraintValueCa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCa = "CA" - - // GeoMatchConstraintValueCv is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCv = "CV" - - // GeoMatchConstraintValueKy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKy = "KY" - - // GeoMatchConstraintValueCf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCf = "CF" - - // GeoMatchConstraintValueTd is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTd = "TD" - - // GeoMatchConstraintValueCl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCl = "CL" - - // GeoMatchConstraintValueCn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCn = "CN" - - // GeoMatchConstraintValueCx is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCx = "CX" - - // GeoMatchConstraintValueCc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCc = "CC" - - // GeoMatchConstraintValueCo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCo = "CO" - - // GeoMatchConstraintValueKm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKm = "KM" - - // GeoMatchConstraintValueCg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCg = "CG" - - // GeoMatchConstraintValueCd is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCd = "CD" - - // GeoMatchConstraintValueCk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCk = "CK" - - // GeoMatchConstraintValueCr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCr = "CR" - - // GeoMatchConstraintValueCi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCi = "CI" - - // GeoMatchConstraintValueHr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueHr = "HR" - - // GeoMatchConstraintValueCu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCu = "CU" - - // GeoMatchConstraintValueCw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCw = "CW" - - // GeoMatchConstraintValueCy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCy = "CY" - - // GeoMatchConstraintValueCz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCz = "CZ" - - // GeoMatchConstraintValueDk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueDk = "DK" - - // GeoMatchConstraintValueDj is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueDj = "DJ" - - // GeoMatchConstraintValueDm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueDm = "DM" - - // GeoMatchConstraintValueDo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueDo = "DO" - - // GeoMatchConstraintValueEc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueEc = "EC" - - // GeoMatchConstraintValueEg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueEg = "EG" - - // GeoMatchConstraintValueSv is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSv = "SV" - - // GeoMatchConstraintValueGq is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGq = "GQ" - - // GeoMatchConstraintValueEr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueEr = "ER" - - // GeoMatchConstraintValueEe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueEe = "EE" - - // GeoMatchConstraintValueEt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueEt = "ET" - - // GeoMatchConstraintValueFk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueFk = "FK" - - // GeoMatchConstraintValueFo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueFo = "FO" - - // GeoMatchConstraintValueFj is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueFj = "FJ" - - // GeoMatchConstraintValueFi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueFi = "FI" - - // GeoMatchConstraintValueFr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueFr = "FR" - - // GeoMatchConstraintValueGf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGf = "GF" - - // GeoMatchConstraintValuePf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePf = "PF" - - // GeoMatchConstraintValueTf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTf = "TF" - - // GeoMatchConstraintValueGa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGa = "GA" - - // GeoMatchConstraintValueGm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGm = "GM" - - // GeoMatchConstraintValueGe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGe = "GE" - - // GeoMatchConstraintValueDe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueDe = "DE" - - // GeoMatchConstraintValueGh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGh = "GH" - - // GeoMatchConstraintValueGi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGi = "GI" - - // GeoMatchConstraintValueGr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGr = "GR" - - // GeoMatchConstraintValueGl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGl = "GL" - - // GeoMatchConstraintValueGd is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGd = "GD" - - // GeoMatchConstraintValueGp is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGp = "GP" - - // GeoMatchConstraintValueGu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGu = "GU" - - // GeoMatchConstraintValueGt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGt = "GT" - - // GeoMatchConstraintValueGg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGg = "GG" - - // GeoMatchConstraintValueGn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGn = "GN" - - // GeoMatchConstraintValueGw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGw = "GW" - - // GeoMatchConstraintValueGy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGy = "GY" - - // GeoMatchConstraintValueHt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueHt = "HT" - - // GeoMatchConstraintValueHm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueHm = "HM" - - // GeoMatchConstraintValueVa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueVa = "VA" - - // GeoMatchConstraintValueHn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueHn = "HN" - - // GeoMatchConstraintValueHk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueHk = "HK" - - // GeoMatchConstraintValueHu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueHu = "HU" - - // GeoMatchConstraintValueIs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIs = "IS" - - // GeoMatchConstraintValueIn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIn = "IN" - - // GeoMatchConstraintValueId is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueId = "ID" - - // GeoMatchConstraintValueIr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIr = "IR" - - // GeoMatchConstraintValueIq is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIq = "IQ" - - // GeoMatchConstraintValueIe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIe = "IE" - - // GeoMatchConstraintValueIm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIm = "IM" - - // GeoMatchConstraintValueIl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIl = "IL" - - // GeoMatchConstraintValueIt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIt = "IT" - - // GeoMatchConstraintValueJm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueJm = "JM" - - // GeoMatchConstraintValueJp is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueJp = "JP" - - // GeoMatchConstraintValueJe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueJe = "JE" - - // GeoMatchConstraintValueJo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueJo = "JO" - - // GeoMatchConstraintValueKz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKz = "KZ" - - // GeoMatchConstraintValueKe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKe = "KE" - - // GeoMatchConstraintValueKi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKi = "KI" - - // GeoMatchConstraintValueKp is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKp = "KP" - - // GeoMatchConstraintValueKr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKr = "KR" - - // GeoMatchConstraintValueKw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKw = "KW" - - // GeoMatchConstraintValueKg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKg = "KG" - - // GeoMatchConstraintValueLa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLa = "LA" - - // GeoMatchConstraintValueLv is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLv = "LV" - - // GeoMatchConstraintValueLb is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLb = "LB" - - // GeoMatchConstraintValueLs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLs = "LS" - - // GeoMatchConstraintValueLr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLr = "LR" - - // GeoMatchConstraintValueLy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLy = "LY" - - // GeoMatchConstraintValueLi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLi = "LI" - - // GeoMatchConstraintValueLt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLt = "LT" - - // GeoMatchConstraintValueLu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLu = "LU" - - // GeoMatchConstraintValueMo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMo = "MO" - - // GeoMatchConstraintValueMk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMk = "MK" - - // GeoMatchConstraintValueMg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMg = "MG" - - // GeoMatchConstraintValueMw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMw = "MW" - - // GeoMatchConstraintValueMy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMy = "MY" - - // GeoMatchConstraintValueMv is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMv = "MV" - - // GeoMatchConstraintValueMl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMl = "ML" - - // GeoMatchConstraintValueMt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMt = "MT" - - // GeoMatchConstraintValueMh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMh = "MH" - - // GeoMatchConstraintValueMq is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMq = "MQ" - - // GeoMatchConstraintValueMr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMr = "MR" - - // GeoMatchConstraintValueMu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMu = "MU" - - // GeoMatchConstraintValueYt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueYt = "YT" - - // GeoMatchConstraintValueMx is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMx = "MX" - - // GeoMatchConstraintValueFm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueFm = "FM" - - // GeoMatchConstraintValueMd is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMd = "MD" - - // GeoMatchConstraintValueMc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMc = "MC" - - // GeoMatchConstraintValueMn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMn = "MN" - - // GeoMatchConstraintValueMe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMe = "ME" - - // GeoMatchConstraintValueMs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMs = "MS" - - // GeoMatchConstraintValueMa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMa = "MA" - - // GeoMatchConstraintValueMz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMz = "MZ" - - // GeoMatchConstraintValueMm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMm = "MM" - - // GeoMatchConstraintValueNa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNa = "NA" - - // GeoMatchConstraintValueNr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNr = "NR" - - // GeoMatchConstraintValueNp is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNp = "NP" - - // GeoMatchConstraintValueNl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNl = "NL" - - // GeoMatchConstraintValueNc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNc = "NC" - - // GeoMatchConstraintValueNz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNz = "NZ" - - // GeoMatchConstraintValueNi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNi = "NI" - - // GeoMatchConstraintValueNe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNe = "NE" - - // GeoMatchConstraintValueNg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNg = "NG" - - // GeoMatchConstraintValueNu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNu = "NU" - - // GeoMatchConstraintValueNf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNf = "NF" - - // GeoMatchConstraintValueMp is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMp = "MP" - - // GeoMatchConstraintValueNo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNo = "NO" - - // GeoMatchConstraintValueOm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueOm = "OM" - - // GeoMatchConstraintValuePk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePk = "PK" - - // GeoMatchConstraintValuePw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePw = "PW" - - // GeoMatchConstraintValuePs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePs = "PS" - - // GeoMatchConstraintValuePa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePa = "PA" - - // GeoMatchConstraintValuePg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePg = "PG" - - // GeoMatchConstraintValuePy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePy = "PY" - - // GeoMatchConstraintValuePe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePe = "PE" - - // GeoMatchConstraintValuePh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePh = "PH" - - // GeoMatchConstraintValuePn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePn = "PN" - - // GeoMatchConstraintValuePl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePl = "PL" - - // GeoMatchConstraintValuePt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePt = "PT" - - // GeoMatchConstraintValuePr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePr = "PR" - - // GeoMatchConstraintValueQa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueQa = "QA" - - // GeoMatchConstraintValueRe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueRe = "RE" - - // GeoMatchConstraintValueRo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueRo = "RO" - - // GeoMatchConstraintValueRu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueRu = "RU" - - // GeoMatchConstraintValueRw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueRw = "RW" - - // GeoMatchConstraintValueBl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBl = "BL" - - // GeoMatchConstraintValueSh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSh = "SH" - - // GeoMatchConstraintValueKn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKn = "KN" - - // GeoMatchConstraintValueLc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLc = "LC" - - // GeoMatchConstraintValueMf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMf = "MF" - - // GeoMatchConstraintValuePm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePm = "PM" - - // GeoMatchConstraintValueVc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueVc = "VC" - - // GeoMatchConstraintValueWs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueWs = "WS" - - // GeoMatchConstraintValueSm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSm = "SM" - - // GeoMatchConstraintValueSt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSt = "ST" - - // GeoMatchConstraintValueSa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSa = "SA" - - // GeoMatchConstraintValueSn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSn = "SN" - - // GeoMatchConstraintValueRs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueRs = "RS" - - // GeoMatchConstraintValueSc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSc = "SC" - - // GeoMatchConstraintValueSl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSl = "SL" - - // GeoMatchConstraintValueSg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSg = "SG" - - // GeoMatchConstraintValueSx is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSx = "SX" - - // GeoMatchConstraintValueSk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSk = "SK" - - // GeoMatchConstraintValueSi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSi = "SI" - - // GeoMatchConstraintValueSb is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSb = "SB" - - // GeoMatchConstraintValueSo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSo = "SO" - - // GeoMatchConstraintValueZa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueZa = "ZA" - - // GeoMatchConstraintValueGs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGs = "GS" - - // GeoMatchConstraintValueSs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSs = "SS" - - // GeoMatchConstraintValueEs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueEs = "ES" - - // GeoMatchConstraintValueLk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLk = "LK" - - // GeoMatchConstraintValueSd is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSd = "SD" - - // GeoMatchConstraintValueSr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSr = "SR" - - // GeoMatchConstraintValueSj is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSj = "SJ" - - // GeoMatchConstraintValueSz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSz = "SZ" - - // GeoMatchConstraintValueSe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSe = "SE" - - // GeoMatchConstraintValueCh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCh = "CH" - - // GeoMatchConstraintValueSy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSy = "SY" - - // GeoMatchConstraintValueTw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTw = "TW" - - // GeoMatchConstraintValueTj is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTj = "TJ" - - // GeoMatchConstraintValueTz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTz = "TZ" - - // GeoMatchConstraintValueTh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTh = "TH" - - // GeoMatchConstraintValueTl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTl = "TL" - - // GeoMatchConstraintValueTg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTg = "TG" - - // GeoMatchConstraintValueTk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTk = "TK" - - // GeoMatchConstraintValueTo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTo = "TO" - - // GeoMatchConstraintValueTt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTt = "TT" - - // GeoMatchConstraintValueTn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTn = "TN" - - // GeoMatchConstraintValueTr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTr = "TR" - - // GeoMatchConstraintValueTm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTm = "TM" - - // GeoMatchConstraintValueTc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTc = "TC" - - // GeoMatchConstraintValueTv is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTv = "TV" - - // GeoMatchConstraintValueUg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueUg = "UG" - - // GeoMatchConstraintValueUa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueUa = "UA" - - // GeoMatchConstraintValueAe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAe = "AE" - - // GeoMatchConstraintValueGb is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGb = "GB" - - // GeoMatchConstraintValueUs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueUs = "US" - - // GeoMatchConstraintValueUm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueUm = "UM" - - // GeoMatchConstraintValueUy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueUy = "UY" - - // GeoMatchConstraintValueUz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueUz = "UZ" - - // GeoMatchConstraintValueVu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueVu = "VU" - - // GeoMatchConstraintValueVe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueVe = "VE" - - // GeoMatchConstraintValueVn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueVn = "VN" - - // GeoMatchConstraintValueVg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueVg = "VG" - - // GeoMatchConstraintValueVi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueVi = "VI" - - // GeoMatchConstraintValueWf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueWf = "WF" - - // GeoMatchConstraintValueEh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueEh = "EH" - - // GeoMatchConstraintValueYe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueYe = "YE" - - // GeoMatchConstraintValueZm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueZm = "ZM" - - // GeoMatchConstraintValueZw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueZw = "ZW" -) - -const ( - // IPSetDescriptorTypeIpv4 is a IPSetDescriptorType enum value - IPSetDescriptorTypeIpv4 = "IPV4" - - // IPSetDescriptorTypeIpv6 is a IPSetDescriptorType enum value - IPSetDescriptorTypeIpv6 = "IPV6" -) - -const ( - // MatchFieldTypeUri is a MatchFieldType enum value - MatchFieldTypeUri = "URI" - - // MatchFieldTypeQueryString is a MatchFieldType enum value - MatchFieldTypeQueryString = "QUERY_STRING" - - // MatchFieldTypeHeader is a MatchFieldType enum value - MatchFieldTypeHeader = "HEADER" - - // MatchFieldTypeMethod is a MatchFieldType enum value - MatchFieldTypeMethod = "METHOD" - - // MatchFieldTypeBody is a MatchFieldType enum value - MatchFieldTypeBody = "BODY" - - // MatchFieldTypeSingleQueryArg is a MatchFieldType enum value - MatchFieldTypeSingleQueryArg = "SINGLE_QUERY_ARG" - - // MatchFieldTypeAllQueryArgs is a MatchFieldType enum value - MatchFieldTypeAllQueryArgs = "ALL_QUERY_ARGS" -) - -const ( - // ParameterExceptionFieldChangeAction is a ParameterExceptionField enum value - ParameterExceptionFieldChangeAction = "CHANGE_ACTION" - - // ParameterExceptionFieldWafAction is a ParameterExceptionField enum value - ParameterExceptionFieldWafAction = "WAF_ACTION" - - // ParameterExceptionFieldWafOverrideAction is a ParameterExceptionField enum value - ParameterExceptionFieldWafOverrideAction = "WAF_OVERRIDE_ACTION" - - // ParameterExceptionFieldPredicateType is a ParameterExceptionField enum value - ParameterExceptionFieldPredicateType = "PREDICATE_TYPE" - - // ParameterExceptionFieldIpsetType is a ParameterExceptionField enum value - ParameterExceptionFieldIpsetType = "IPSET_TYPE" - - // ParameterExceptionFieldByteMatchFieldType is a ParameterExceptionField enum value - ParameterExceptionFieldByteMatchFieldType = "BYTE_MATCH_FIELD_TYPE" - - // ParameterExceptionFieldSqlInjectionMatchFieldType is a ParameterExceptionField enum value - ParameterExceptionFieldSqlInjectionMatchFieldType = "SQL_INJECTION_MATCH_FIELD_TYPE" - - // ParameterExceptionFieldByteMatchTextTransformation is a ParameterExceptionField enum value - ParameterExceptionFieldByteMatchTextTransformation = "BYTE_MATCH_TEXT_TRANSFORMATION" - - // ParameterExceptionFieldByteMatchPositionalConstraint is a ParameterExceptionField enum value - ParameterExceptionFieldByteMatchPositionalConstraint = "BYTE_MATCH_POSITIONAL_CONSTRAINT" - - // ParameterExceptionFieldSizeConstraintComparisonOperator is a ParameterExceptionField enum value - ParameterExceptionFieldSizeConstraintComparisonOperator = "SIZE_CONSTRAINT_COMPARISON_OPERATOR" - - // ParameterExceptionFieldGeoMatchLocationType is a ParameterExceptionField enum value - ParameterExceptionFieldGeoMatchLocationType = "GEO_MATCH_LOCATION_TYPE" - - // ParameterExceptionFieldGeoMatchLocationValue is a ParameterExceptionField enum value - ParameterExceptionFieldGeoMatchLocationValue = "GEO_MATCH_LOCATION_VALUE" - - // ParameterExceptionFieldRateKey is a ParameterExceptionField enum value - ParameterExceptionFieldRateKey = "RATE_KEY" - - // ParameterExceptionFieldRuleType is a ParameterExceptionField enum value - ParameterExceptionFieldRuleType = "RULE_TYPE" - - // ParameterExceptionFieldNextMarker is a ParameterExceptionField enum value - ParameterExceptionFieldNextMarker = "NEXT_MARKER" - - // ParameterExceptionFieldResourceArn is a ParameterExceptionField enum value - ParameterExceptionFieldResourceArn = "RESOURCE_ARN" -) - -const ( - // ParameterExceptionReasonInvalidOption is a ParameterExceptionReason enum value - ParameterExceptionReasonInvalidOption = "INVALID_OPTION" - - // ParameterExceptionReasonIllegalCombination is a ParameterExceptionReason enum value - ParameterExceptionReasonIllegalCombination = "ILLEGAL_COMBINATION" - - // ParameterExceptionReasonIllegalArgument is a ParameterExceptionReason enum value - ParameterExceptionReasonIllegalArgument = "ILLEGAL_ARGUMENT" -) - -const ( - // PositionalConstraintExactly is a PositionalConstraint enum value - PositionalConstraintExactly = "EXACTLY" - - // PositionalConstraintStartsWith is a PositionalConstraint enum value - PositionalConstraintStartsWith = "STARTS_WITH" - - // PositionalConstraintEndsWith is a PositionalConstraint enum value - PositionalConstraintEndsWith = "ENDS_WITH" - - // PositionalConstraintContains is a PositionalConstraint enum value - PositionalConstraintContains = "CONTAINS" - - // PositionalConstraintContainsWord is a PositionalConstraint enum value - PositionalConstraintContainsWord = "CONTAINS_WORD" -) - -const ( - // PredicateTypeIpmatch is a PredicateType enum value - PredicateTypeIpmatch = "IPMatch" - - // PredicateTypeByteMatch is a PredicateType enum value - PredicateTypeByteMatch = "ByteMatch" - - // PredicateTypeSqlInjectionMatch is a PredicateType enum value - PredicateTypeSqlInjectionMatch = "SqlInjectionMatch" - - // PredicateTypeGeoMatch is a PredicateType enum value - PredicateTypeGeoMatch = "GeoMatch" - - // PredicateTypeSizeConstraint is a PredicateType enum value - PredicateTypeSizeConstraint = "SizeConstraint" - - // PredicateTypeXssMatch is a PredicateType enum value - PredicateTypeXssMatch = "XssMatch" - - // PredicateTypeRegexMatch is a PredicateType enum value - PredicateTypeRegexMatch = "RegexMatch" -) - -const ( - // RateKeyIp is a RateKey enum value - RateKeyIp = "IP" -) - -const ( - // TextTransformationNone is a TextTransformation enum value - TextTransformationNone = "NONE" - - // TextTransformationCompressWhiteSpace is a TextTransformation enum value - TextTransformationCompressWhiteSpace = "COMPRESS_WHITE_SPACE" - - // TextTransformationHtmlEntityDecode is a TextTransformation enum value - TextTransformationHtmlEntityDecode = "HTML_ENTITY_DECODE" - - // TextTransformationLowercase is a TextTransformation enum value - TextTransformationLowercase = "LOWERCASE" - - // TextTransformationCmdLine is a TextTransformation enum value - TextTransformationCmdLine = "CMD_LINE" - - // TextTransformationUrlDecode is a TextTransformation enum value - TextTransformationUrlDecode = "URL_DECODE" -) - -const ( - // WafActionTypeBlock is a WafActionType enum value - WafActionTypeBlock = "BLOCK" - - // WafActionTypeAllow is a WafActionType enum value - WafActionTypeAllow = "ALLOW" - - // WafActionTypeCount is a WafActionType enum value - WafActionTypeCount = "COUNT" -) - -const ( - // WafOverrideActionTypeNone is a WafOverrideActionType enum value - WafOverrideActionTypeNone = "NONE" - - // WafOverrideActionTypeCount is a WafOverrideActionType enum value - WafOverrideActionTypeCount = "COUNT" -) - -const ( - // WafRuleTypeRegular is a WafRuleType enum value - WafRuleTypeRegular = "REGULAR" - - // WafRuleTypeRateBased is a WafRuleType enum value - WafRuleTypeRateBased = "RATE_BASED" - - // WafRuleTypeGroup is a WafRuleType enum value - WafRuleTypeGroup = "GROUP" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/doc.go b/vendor/github.com/aws/aws-sdk-go/service/waf/doc.go deleted file mode 100644 index 403183379..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/doc.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package waf provides the client and types for making API -// requests to AWS WAF. -// -// This is the AWS WAF API Reference for using AWS WAF with Amazon CloudFront. -// The AWS WAF actions and data types listed in the reference are available -// for protecting Amazon CloudFront distributions. You can use these actions -// and data types via the endpoint waf.amazonaws.com. This guide is for developers -// who need detailed information about the AWS WAF API actions, data types, -// and errors. For detailed information about AWS WAF features and an overview -// of how to use the AWS WAF API, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// See https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24 for more information on this service. -// -// See waf package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/waf/ -// -// Using the Client -// -// To contact AWS WAF 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 WAF client WAF for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/waf/#New -package waf diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go deleted file mode 100644 index 3e9995d8d..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package waf - -const ( - - // ErrCodeDisallowedNameException for service response error code - // "WAFDisallowedNameException". - // - // The name specified is invalid. - ErrCodeDisallowedNameException = "WAFDisallowedNameException" - - // ErrCodeInternalErrorException for service response error code - // "WAFInternalErrorException". - // - // The operation failed because of a system problem, even though the request - // was valid. Retry your request. - ErrCodeInternalErrorException = "WAFInternalErrorException" - - // ErrCodeInvalidAccountException for service response error code - // "WAFInvalidAccountException". - // - // The operation failed because you tried to create, update, or delete an object - // by using an invalid account identifier. - ErrCodeInvalidAccountException = "WAFInvalidAccountException" - - // ErrCodeInvalidOperationException for service response error code - // "WAFInvalidOperationException". - // - // The operation failed because there was nothing to do. For example: - // - // * You tried to remove a Rule from a WebACL, but the Rule isn't in the - // specified WebACL. - // - // * You tried to remove an IP address from an IPSet, but the IP address - // isn't in the specified IPSet. - // - // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple - // isn't in the specified WebACL. - // - // * You tried to add a Rule to a WebACL, but the Rule already exists in - // the specified WebACL. - // - // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple - // already exists in the specified WebACL. - ErrCodeInvalidOperationException = "WAFInvalidOperationException" - - // ErrCodeInvalidParameterException for service response error code - // "WAFInvalidParameterException". - // - // The operation failed because AWS WAF didn't recognize a parameter in the - // request. For example: - // - // * You specified an invalid parameter name. - // - // * You specified an invalid value. - // - // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) - // using an action other than INSERT or DELETE. - // - // * You tried to create a WebACL with a DefaultActionType other than ALLOW, - // BLOCK, or COUNT. - // - // * You tried to create a RateBasedRule with a RateKey value other than - // IP. - // - // * You tried to update a WebACL with a WafActionType other than ALLOW, - // BLOCK, or COUNT. - // - // * You tried to update a ByteMatchSet with a FieldToMatchType other than - // HEADER, METHOD, QUERY_STRING, URI, or BODY. - // - // * You tried to update a ByteMatchSet with a Field of HEADER but no value - // for Data. - // - // * Your request references an ARN that is malformed, or corresponds to - // a resource with which a web ACL cannot be associated. - ErrCodeInvalidParameterException = "WAFInvalidParameterException" - - // ErrCodeInvalidPermissionPolicyException for service response error code - // "WAFInvalidPermissionPolicyException". - // - // The operation failed because the specified policy is not in the proper format. - // - // The policy is subject to the following restrictions: - // - // * You can attach only one policy with each PutPermissionPolicy request. - // - // * The policy must include an Effect, Action and Principal. - // - // * Effect must specify Allow. - // - // * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, - // waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard - // actions in the policy will be rejected. - // - // * The policy cannot include a Resource parameter. - // - // * The ARN in the request must be a valid WAF RuleGroup ARN and the RuleGroup - // must exist in the same region. - // - // * The user making the request must be the owner of the RuleGroup. - // - // * Your policy must be composed using IAM Policy version 2012-10-17. - ErrCodeInvalidPermissionPolicyException = "WAFInvalidPermissionPolicyException" - - // ErrCodeInvalidRegexPatternException for service response error code - // "WAFInvalidRegexPatternException". - // - // The regular expression (regex) you specified in RegexPatternString is invalid. - ErrCodeInvalidRegexPatternException = "WAFInvalidRegexPatternException" - - // ErrCodeLimitsExceededException for service response error code - // "WAFLimitsExceededException". - // - // The operation exceeds a resource limit, for example, the maximum number of - // WebACL objects that you can create for an AWS account. For more information, - // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) - // in the AWS WAF Developer Guide. - ErrCodeLimitsExceededException = "WAFLimitsExceededException" - - // ErrCodeNonEmptyEntityException for service response error code - // "WAFNonEmptyEntityException". - // - // The operation failed because you tried to delete an object that isn't empty. - // For example: - // - // * You tried to delete a WebACL that still contains one or more Rule objects. - // - // * You tried to delete a Rule that still contains one or more ByteMatchSet - // objects or other predicates. - // - // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple - // objects. - // - // * You tried to delete an IPSet that references one or more IP addresses. - ErrCodeNonEmptyEntityException = "WAFNonEmptyEntityException" - - // ErrCodeNonexistentContainerException for service response error code - // "WAFNonexistentContainerException". - // - // The operation failed because you tried to add an object to or delete an object - // from another object that doesn't exist. For example: - // - // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't - // exist. - // - // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule - // that doesn't exist. - // - // * You tried to add an IP address to or delete an IP address from an IPSet - // that doesn't exist. - // - // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from - // a ByteMatchSet that doesn't exist. - ErrCodeNonexistentContainerException = "WAFNonexistentContainerException" - - // ErrCodeNonexistentItemException for service response error code - // "WAFNonexistentItemException". - // - // The operation failed because the referenced object doesn't exist. - ErrCodeNonexistentItemException = "WAFNonexistentItemException" - - // ErrCodeReferencedItemException for service response error code - // "WAFReferencedItemException". - // - // The operation failed because you tried to delete an object that is still - // in use. For example: - // - // * You tried to delete a ByteMatchSet that is still referenced by a Rule. - // - // * You tried to delete a Rule that is still referenced by a WebACL. - ErrCodeReferencedItemException = "WAFReferencedItemException" - - // ErrCodeServiceLinkedRoleErrorException for service response error code - // "WAFServiceLinkedRoleErrorException". - // - // AWS WAF is not able to access the service linked role. This can be caused - // by a previous PutLoggingConfiguration request, which can lock the service - // linked role for about 20 seconds. Please try your request again. The service - // linked role can also be locked by a previous DeleteServiceLinkedRole request, - // which can lock the role for 15 minutes or more. If you recently made a DeleteServiceLinkedRole, - // wait at least 15 minutes and try the request again. If you receive this same - // exception again, you will have to wait additional time until the role is - // unlocked. - ErrCodeServiceLinkedRoleErrorException = "WAFServiceLinkedRoleErrorException" - - // ErrCodeStaleDataException for service response error code - // "WAFStaleDataException". - // - // The operation failed because you tried to create, update, or delete an object - // by using a change token that has already been used. - ErrCodeStaleDataException = "WAFStaleDataException" - - // ErrCodeSubscriptionNotFoundException for service response error code - // "WAFSubscriptionNotFoundException". - // - // The specified subscription does not exist. - ErrCodeSubscriptionNotFoundException = "WAFSubscriptionNotFoundException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/service.go b/vendor/github.com/aws/aws-sdk-go/service/waf/service.go deleted file mode 100644 index 09bf43d9e..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package waf - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// WAF provides the API operation methods for making requests to -// AWS WAF. See this package's package overview docs -// for details on the service. -// -// WAF methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type WAF 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 = "waf" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "WAF" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the WAF client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a WAF client from just a session. -// svc := waf.New(mySession) -// -// // Create a WAF client with additional configuration -// svc := waf.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *WAF { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *WAF { - svc := &WAF{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-08-24", - JSONVersion: "1.1", - TargetPrefix: "AWSWAF_20150824", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a WAF operation and runs any -// custom request initialization. -func (c *WAF) 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/wafregional/api.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go deleted file mode 100644 index 2e5fb159c..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go +++ /dev/null @@ -1,10685 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package wafregional - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" - "github.com/aws/aws-sdk-go/service/waf" -) - -const opAssociateWebACL = "AssociateWebACL" - -// AssociateWebACLRequest generates a "aws/request.Request" representing the -// client's request for the AssociateWebACL operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateWebACL for more information on using the AssociateWebACL -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateWebACLRequest method. -// req, resp := client.AssociateWebACLRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/AssociateWebACL -func (c *WAFRegional) AssociateWebACLRequest(input *AssociateWebACLInput) (req *request.Request, output *AssociateWebACLOutput) { - op := &request.Operation{ - Name: opAssociateWebACL, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateWebACLInput{} - } - - output = &AssociateWebACLOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssociateWebACL API operation for AWS WAF Regional. -// -// Associates a web ACL with a resource, either an application load balancer -// or Amazon API Gateway stage. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation AssociateWebACL for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFUnavailableEntityException "WAFUnavailableEntityException" -// The operation failed because the entity referenced is temporarily unavailable. -// Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/AssociateWebACL -func (c *WAFRegional) AssociateWebACL(input *AssociateWebACLInput) (*AssociateWebACLOutput, error) { - req, out := c.AssociateWebACLRequest(input) - return out, req.Send() -} - -// AssociateWebACLWithContext is the same as AssociateWebACL with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateWebACL for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) AssociateWebACLWithContext(ctx aws.Context, input *AssociateWebACLInput, opts ...request.Option) (*AssociateWebACLOutput, error) { - req, out := c.AssociateWebACLRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateByteMatchSet = "CreateByteMatchSet" - -// CreateByteMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateByteMatchSet for more information on using the CreateByteMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateByteMatchSetRequest method. -// req, resp := client.CreateByteMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateByteMatchSet -func (c *WAFRegional) CreateByteMatchSetRequest(input *waf.CreateByteMatchSetInput) (req *request.Request, output *waf.CreateByteMatchSetOutput) { - op := &request.Operation{ - Name: opCreateByteMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.CreateByteMatchSetInput{} - } - - output = &waf.CreateByteMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateByteMatchSet API operation for AWS WAF Regional. -// -// Creates a ByteMatchSet. You then use UpdateByteMatchSet to identify the part -// of a web request that you want AWS WAF to inspect, such as the values of -// the User-Agent header or the query string. For example, you can create a -// ByteMatchSet that matches any requests with User-Agent headers that contain -// the string BadBot. You can then configure AWS WAF to reject those requests. -// -// To create and configure a ByteMatchSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateByteMatchSet request. -// -// Submit a CreateByteMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateByteMatchSet request. -// -// Submit an UpdateByteMatchSet request to specify the part of the request that -// you want AWS WAF to inspect (for example, the header or the URI) and the -// value that you want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation CreateByteMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateByteMatchSet -func (c *WAFRegional) CreateByteMatchSet(input *waf.CreateByteMatchSetInput) (*waf.CreateByteMatchSetOutput, error) { - req, out := c.CreateByteMatchSetRequest(input) - return out, req.Send() -} - -// CreateByteMatchSetWithContext is the same as CreateByteMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateByteMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) CreateByteMatchSetWithContext(ctx aws.Context, input *waf.CreateByteMatchSetInput, opts ...request.Option) (*waf.CreateByteMatchSetOutput, error) { - req, out := c.CreateByteMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateGeoMatchSet = "CreateGeoMatchSet" - -// CreateGeoMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateGeoMatchSet for more information on using the CreateGeoMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateGeoMatchSetRequest method. -// req, resp := client.CreateGeoMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateGeoMatchSet -func (c *WAFRegional) CreateGeoMatchSetRequest(input *waf.CreateGeoMatchSetInput) (req *request.Request, output *waf.CreateGeoMatchSetOutput) { - op := &request.Operation{ - Name: opCreateGeoMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.CreateGeoMatchSetInput{} - } - - output = &waf.CreateGeoMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateGeoMatchSet API operation for AWS WAF Regional. -// -// Creates an GeoMatchSet, which you use to specify which web requests you want -// to allow or block based on the country that the requests originate from. -// For example, if you're receiving a lot of requests from one or more countries -// and you want to block the requests, you can create an GeoMatchSet that contains -// those countries and then configure AWS WAF to block the requests. -// -// To create and configure a GeoMatchSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateGeoMatchSet request. -// -// Submit a CreateGeoMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateGeoMatchSet request. -// -// Submit an UpdateGeoMatchSetSet request to specify the countries that you -// want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation CreateGeoMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateGeoMatchSet -func (c *WAFRegional) CreateGeoMatchSet(input *waf.CreateGeoMatchSetInput) (*waf.CreateGeoMatchSetOutput, error) { - req, out := c.CreateGeoMatchSetRequest(input) - return out, req.Send() -} - -// CreateGeoMatchSetWithContext is the same as CreateGeoMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateGeoMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) CreateGeoMatchSetWithContext(ctx aws.Context, input *waf.CreateGeoMatchSetInput, opts ...request.Option) (*waf.CreateGeoMatchSetOutput, error) { - req, out := c.CreateGeoMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateIPSet = "CreateIPSet" - -// CreateIPSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateIPSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateIPSet for more information on using the CreateIPSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateIPSetRequest method. -// req, resp := client.CreateIPSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateIPSet -func (c *WAFRegional) CreateIPSetRequest(input *waf.CreateIPSetInput) (req *request.Request, output *waf.CreateIPSetOutput) { - op := &request.Operation{ - Name: opCreateIPSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.CreateIPSetInput{} - } - - output = &waf.CreateIPSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateIPSet API operation for AWS WAF Regional. -// -// Creates an IPSet, which you use to specify which web requests that you want -// to allow or block based on the IP addresses that the requests originate from. -// For example, if you're receiving a lot of requests from one or more individual -// IP addresses or one or more ranges of IP addresses and you want to block -// the requests, you can create an IPSet that contains those IP addresses and -// then configure AWS WAF to block the requests. -// -// To create and configure an IPSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateIPSet request. -// -// Submit a CreateIPSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateIPSet request. -// -// Submit an UpdateIPSet request to specify the IP addresses that you want AWS -// WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation CreateIPSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateIPSet -func (c *WAFRegional) CreateIPSet(input *waf.CreateIPSetInput) (*waf.CreateIPSetOutput, error) { - req, out := c.CreateIPSetRequest(input) - return out, req.Send() -} - -// CreateIPSetWithContext is the same as CreateIPSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateIPSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) CreateIPSetWithContext(ctx aws.Context, input *waf.CreateIPSetInput, opts ...request.Option) (*waf.CreateIPSetOutput, error) { - req, out := c.CreateIPSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRateBasedRule = "CreateRateBasedRule" - -// CreateRateBasedRuleRequest generates a "aws/request.Request" representing the -// client's request for the CreateRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRateBasedRule for more information on using the CreateRateBasedRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRateBasedRuleRequest method. -// req, resp := client.CreateRateBasedRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRateBasedRule -func (c *WAFRegional) CreateRateBasedRuleRequest(input *waf.CreateRateBasedRuleInput) (req *request.Request, output *waf.CreateRateBasedRuleOutput) { - op := &request.Operation{ - Name: opCreateRateBasedRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.CreateRateBasedRuleInput{} - } - - output = &waf.CreateRateBasedRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRateBasedRule API operation for AWS WAF Regional. -// -// Creates a RateBasedRule. The RateBasedRule contains a RateLimit, which specifies -// the maximum number of requests that AWS WAF allows from a specified IP address -// in a five-minute period. The RateBasedRule also contains the IPSet objects, -// ByteMatchSet objects, and other predicates that identify the requests that -// you want to count or block if these requests exceed the RateLimit. -// -// If you add more than one predicate to a RateBasedRule, a request not only -// must exceed the RateLimit, but it also must match all the specifications -// to be counted or blocked. For example, suppose you add the following to a -// RateBasedRule: -// -// * An IPSet that matches the IP address 192.0.2.44/32 -// -// * A ByteMatchSet that matches BadBot in the User-Agent header -// -// Further, you specify a RateLimit of 15,000. -// -// You then add the RateBasedRule to a WebACL and specify that you want to block -// requests that meet the conditions in the rule. For a request to be blocked, -// it must come from the IP address 192.0.2.44 and the User-Agent header in -// the request must contain the value BadBot. Further, requests that match these -// two conditions must be received at a rate of more than 15,000 requests every -// five minutes. If both conditions are met and the rate is exceeded, AWS WAF -// blocks the requests. If the rate drops below 15,000 for a five-minute period, -// AWS WAF no longer blocks the requests. -// -// As a second example, suppose you want to limit requests to a particular page -// on your site. To do this, you could add the following to a RateBasedRule: -// -// * A ByteMatchSet with FieldToMatch of URI -// -// * A PositionalConstraint of STARTS_WITH -// -// * A TargetString of login -// -// Further, you specify a RateLimit of 15,000. -// -// By adding this RateBasedRule to a WebACL, you could limit requests to your -// login page without affecting the rest of your site. -// -// To create and configure a RateBasedRule, perform the following steps: -// -// Create and update the predicates that you want to include in the rule. For -// more information, see CreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateRule request. -// -// Submit a CreateRateBasedRule request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRule request. -// -// Submit an UpdateRateBasedRule request to specify the predicates that you -// want to include in the rule. -// -// Create and update a WebACL that contains the RateBasedRule. For more information, -// see CreateWebACL. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation CreateRateBasedRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRateBasedRule -func (c *WAFRegional) CreateRateBasedRule(input *waf.CreateRateBasedRuleInput) (*waf.CreateRateBasedRuleOutput, error) { - req, out := c.CreateRateBasedRuleRequest(input) - return out, req.Send() -} - -// CreateRateBasedRuleWithContext is the same as CreateRateBasedRule with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRateBasedRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) CreateRateBasedRuleWithContext(ctx aws.Context, input *waf.CreateRateBasedRuleInput, opts ...request.Option) (*waf.CreateRateBasedRuleOutput, error) { - req, out := c.CreateRateBasedRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRegexMatchSet = "CreateRegexMatchSet" - -// CreateRegexMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRegexMatchSet for more information on using the CreateRegexMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRegexMatchSetRequest method. -// req, resp := client.CreateRegexMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRegexMatchSet -func (c *WAFRegional) CreateRegexMatchSetRequest(input *waf.CreateRegexMatchSetInput) (req *request.Request, output *waf.CreateRegexMatchSetOutput) { - op := &request.Operation{ - Name: opCreateRegexMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.CreateRegexMatchSetInput{} - } - - output = &waf.CreateRegexMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRegexMatchSet API operation for AWS WAF Regional. -// -// Creates a RegexMatchSet. You then use UpdateRegexMatchSet to identify the -// part of a web request that you want AWS WAF to inspect, such as the values -// of the User-Agent header or the query string. For example, you can create -// a RegexMatchSet that contains a RegexMatchTuple that looks for any requests -// with User-Agent headers that match a RegexPatternSet with pattern B[a@]dB[o0]t. -// You can then configure AWS WAF to reject those requests. -// -// To create and configure a RegexMatchSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateRegexMatchSet request. -// -// Submit a CreateRegexMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRegexMatchSet request. -// -// Submit an UpdateRegexMatchSet request to specify the part of the request -// that you want AWS WAF to inspect (for example, the header or the URI) and -// the value, using a RegexPatternSet, that you want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation CreateRegexMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRegexMatchSet -func (c *WAFRegional) CreateRegexMatchSet(input *waf.CreateRegexMatchSetInput) (*waf.CreateRegexMatchSetOutput, error) { - req, out := c.CreateRegexMatchSetRequest(input) - return out, req.Send() -} - -// CreateRegexMatchSetWithContext is the same as CreateRegexMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRegexMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) CreateRegexMatchSetWithContext(ctx aws.Context, input *waf.CreateRegexMatchSetInput, opts ...request.Option) (*waf.CreateRegexMatchSetOutput, error) { - req, out := c.CreateRegexMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRegexPatternSet = "CreateRegexPatternSet" - -// CreateRegexPatternSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRegexPatternSet for more information on using the CreateRegexPatternSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRegexPatternSetRequest method. -// req, resp := client.CreateRegexPatternSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRegexPatternSet -func (c *WAFRegional) CreateRegexPatternSetRequest(input *waf.CreateRegexPatternSetInput) (req *request.Request, output *waf.CreateRegexPatternSetOutput) { - op := &request.Operation{ - Name: opCreateRegexPatternSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.CreateRegexPatternSetInput{} - } - - output = &waf.CreateRegexPatternSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRegexPatternSet API operation for AWS WAF Regional. -// -// Creates a RegexPatternSet. You then use UpdateRegexPatternSet to specify -// the regular expression (regex) pattern that you want AWS WAF to search for, -// such as B[a@]dB[o0]t. You can then configure AWS WAF to reject those requests. -// -// To create and configure a RegexPatternSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateRegexPatternSet request. -// -// Submit a CreateRegexPatternSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRegexPatternSet request. -// -// Submit an UpdateRegexPatternSet request to specify the string that you want -// AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation CreateRegexPatternSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRegexPatternSet -func (c *WAFRegional) CreateRegexPatternSet(input *waf.CreateRegexPatternSetInput) (*waf.CreateRegexPatternSetOutput, error) { - req, out := c.CreateRegexPatternSetRequest(input) - return out, req.Send() -} - -// CreateRegexPatternSetWithContext is the same as CreateRegexPatternSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRegexPatternSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) CreateRegexPatternSetWithContext(ctx aws.Context, input *waf.CreateRegexPatternSetInput, opts ...request.Option) (*waf.CreateRegexPatternSetOutput, error) { - req, out := c.CreateRegexPatternSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRule = "CreateRule" - -// CreateRuleRequest generates a "aws/request.Request" representing the -// client's request for the CreateRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRule for more information on using the CreateRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRuleRequest method. -// req, resp := client.CreateRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRule -func (c *WAFRegional) CreateRuleRequest(input *waf.CreateRuleInput) (req *request.Request, output *waf.CreateRuleOutput) { - op := &request.Operation{ - Name: opCreateRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.CreateRuleInput{} - } - - output = &waf.CreateRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRule API operation for AWS WAF Regional. -// -// Creates a Rule, which contains the IPSet objects, ByteMatchSet objects, and -// other predicates that identify the requests that you want to block. If you -// add more than one predicate to a Rule, a request must match all of the specifications -// to be allowed or blocked. For example, suppose that you add the following -// to a Rule: -// -// * An IPSet that matches the IP address 192.0.2.44/32 -// -// * A ByteMatchSet that matches BadBot in the User-Agent header -// -// You then add the Rule to a WebACL and specify that you want to blocks requests -// that satisfy the Rule. For a request to be blocked, it must come from the -// IP address 192.0.2.44 and the User-Agent header in the request must contain -// the value BadBot. -// -// To create and configure a Rule, perform the following steps: -// -// Create and update the predicates that you want to include in the Rule. For -// more information, see CreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateRule request. -// -// Submit a CreateRule request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRule request. -// -// Submit an UpdateRule request to specify the predicates that you want to include -// in the Rule. -// -// Create and update a WebACL that contains the Rule. For more information, -// see CreateWebACL. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation CreateRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRule -func (c *WAFRegional) CreateRule(input *waf.CreateRuleInput) (*waf.CreateRuleOutput, error) { - req, out := c.CreateRuleRequest(input) - return out, req.Send() -} - -// CreateRuleWithContext is the same as CreateRule with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) CreateRuleWithContext(ctx aws.Context, input *waf.CreateRuleInput, opts ...request.Option) (*waf.CreateRuleOutput, error) { - req, out := c.CreateRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRuleGroup = "CreateRuleGroup" - -// CreateRuleGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateRuleGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRuleGroup for more information on using the CreateRuleGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateRuleGroupRequest method. -// req, resp := client.CreateRuleGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRuleGroup -func (c *WAFRegional) CreateRuleGroupRequest(input *waf.CreateRuleGroupInput) (req *request.Request, output *waf.CreateRuleGroupOutput) { - op := &request.Operation{ - Name: opCreateRuleGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.CreateRuleGroupInput{} - } - - output = &waf.CreateRuleGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRuleGroup API operation for AWS WAF Regional. -// -// Creates a RuleGroup. A rule group is a collection of predefined rules that -// you add to a web ACL. You use UpdateRuleGroup to add rules to the rule group. -// -// Rule groups are subject to the following limits: -// -// * Three rule groups per account. You can request an increase to this limit -// by contacting customer support. -// -// * One rule group per web ACL. -// -// * Ten rules per rule group. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation CreateRuleGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRuleGroup -func (c *WAFRegional) CreateRuleGroup(input *waf.CreateRuleGroupInput) (*waf.CreateRuleGroupOutput, error) { - req, out := c.CreateRuleGroupRequest(input) - return out, req.Send() -} - -// CreateRuleGroupWithContext is the same as CreateRuleGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRuleGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) CreateRuleGroupWithContext(ctx aws.Context, input *waf.CreateRuleGroupInput, opts ...request.Option) (*waf.CreateRuleGroupOutput, error) { - req, out := c.CreateRuleGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSizeConstraintSet = "CreateSizeConstraintSet" - -// CreateSizeConstraintSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSizeConstraintSet for more information on using the CreateSizeConstraintSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSizeConstraintSetRequest method. -// req, resp := client.CreateSizeConstraintSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateSizeConstraintSet -func (c *WAFRegional) CreateSizeConstraintSetRequest(input *waf.CreateSizeConstraintSetInput) (req *request.Request, output *waf.CreateSizeConstraintSetOutput) { - op := &request.Operation{ - Name: opCreateSizeConstraintSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.CreateSizeConstraintSetInput{} - } - - output = &waf.CreateSizeConstraintSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSizeConstraintSet API operation for AWS WAF Regional. -// -// Creates a SizeConstraintSet. You then use UpdateSizeConstraintSet to identify -// the part of a web request that you want AWS WAF to check for length, such -// as the length of the User-Agent header or the length of the query string. -// For example, you can create a SizeConstraintSet that matches any requests -// that have a query string that is longer than 100 bytes. You can then configure -// AWS WAF to reject those requests. -// -// To create and configure a SizeConstraintSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateSizeConstraintSet request. -// -// Submit a CreateSizeConstraintSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateSizeConstraintSet request. -// -// Submit an UpdateSizeConstraintSet request to specify the part of the request -// that you want AWS WAF to inspect (for example, the header or the URI) and -// the value that you want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation CreateSizeConstraintSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateSizeConstraintSet -func (c *WAFRegional) CreateSizeConstraintSet(input *waf.CreateSizeConstraintSetInput) (*waf.CreateSizeConstraintSetOutput, error) { - req, out := c.CreateSizeConstraintSetRequest(input) - return out, req.Send() -} - -// CreateSizeConstraintSetWithContext is the same as CreateSizeConstraintSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSizeConstraintSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) CreateSizeConstraintSetWithContext(ctx aws.Context, input *waf.CreateSizeConstraintSetInput, opts ...request.Option) (*waf.CreateSizeConstraintSetOutput, error) { - req, out := c.CreateSizeConstraintSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSqlInjectionMatchSet = "CreateSqlInjectionMatchSet" - -// CreateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSqlInjectionMatchSet for more information on using the CreateSqlInjectionMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateSqlInjectionMatchSetRequest method. -// req, resp := client.CreateSqlInjectionMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateSqlInjectionMatchSet -func (c *WAFRegional) CreateSqlInjectionMatchSetRequest(input *waf.CreateSqlInjectionMatchSetInput) (req *request.Request, output *waf.CreateSqlInjectionMatchSetOutput) { - op := &request.Operation{ - Name: opCreateSqlInjectionMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.CreateSqlInjectionMatchSetInput{} - } - - output = &waf.CreateSqlInjectionMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSqlInjectionMatchSet API operation for AWS WAF Regional. -// -// Creates a SqlInjectionMatchSet, which you use to allow, block, or count requests -// that contain snippets of SQL code in a specified part of web requests. AWS -// WAF searches for character sequences that are likely to be malicious strings. -// -// To create and configure a SqlInjectionMatchSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateSqlInjectionMatchSet request. -// -// Submit a CreateSqlInjectionMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateSqlInjectionMatchSet request. -// -// Submit an UpdateSqlInjectionMatchSet request to specify the parts of web -// requests in which you want to allow, block, or count malicious SQL code. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation CreateSqlInjectionMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateSqlInjectionMatchSet -func (c *WAFRegional) CreateSqlInjectionMatchSet(input *waf.CreateSqlInjectionMatchSetInput) (*waf.CreateSqlInjectionMatchSetOutput, error) { - req, out := c.CreateSqlInjectionMatchSetRequest(input) - return out, req.Send() -} - -// CreateSqlInjectionMatchSetWithContext is the same as CreateSqlInjectionMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSqlInjectionMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) CreateSqlInjectionMatchSetWithContext(ctx aws.Context, input *waf.CreateSqlInjectionMatchSetInput, opts ...request.Option) (*waf.CreateSqlInjectionMatchSetOutput, error) { - req, out := c.CreateSqlInjectionMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateWebACL = "CreateWebACL" - -// CreateWebACLRequest generates a "aws/request.Request" representing the -// client's request for the CreateWebACL operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateWebACL for more information on using the CreateWebACL -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateWebACLRequest method. -// req, resp := client.CreateWebACLRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateWebACL -func (c *WAFRegional) CreateWebACLRequest(input *waf.CreateWebACLInput) (req *request.Request, output *waf.CreateWebACLOutput) { - op := &request.Operation{ - Name: opCreateWebACL, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.CreateWebACLInput{} - } - - output = &waf.CreateWebACLOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateWebACL API operation for AWS WAF Regional. -// -// Creates a WebACL, which contains the Rules that identify the CloudFront web -// requests that you want to allow, block, or count. AWS WAF evaluates Rules -// in order based on the value of Priority for each Rule. -// -// You also specify a default action, either ALLOW or BLOCK. If a web request -// doesn't match any of the Rules in a WebACL, AWS WAF responds to the request -// with the default action. -// -// To create and configure a WebACL, perform the following steps: -// -// Create and update the ByteMatchSet objects and other predicates that you -// want to include in Rules. For more information, see CreateByteMatchSet, UpdateByteMatchSet, -// CreateIPSet, UpdateIPSet, CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet. -// -// Create and update the Rules that you want to include in the WebACL. For more -// information, see CreateRule and UpdateRule. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateWebACL request. -// -// Submit a CreateWebACL request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateWebACL request. -// -// Submit an UpdateWebACL request to specify the Rules that you want to include -// in the WebACL, to specify the default action, and to associate the WebACL -// with a CloudFront distribution. -// -// For more information about how to use the AWS WAF API, see the AWS WAF Developer -// Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation CreateWebACL for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateWebACL -func (c *WAFRegional) CreateWebACL(input *waf.CreateWebACLInput) (*waf.CreateWebACLOutput, error) { - req, out := c.CreateWebACLRequest(input) - return out, req.Send() -} - -// CreateWebACLWithContext is the same as CreateWebACL with the addition of -// the ability to pass a context and additional request options. -// -// See CreateWebACL for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) CreateWebACLWithContext(ctx aws.Context, input *waf.CreateWebACLInput, opts ...request.Option) (*waf.CreateWebACLOutput, error) { - req, out := c.CreateWebACLRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateXssMatchSet = "CreateXssMatchSet" - -// CreateXssMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the CreateXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateXssMatchSet for more information on using the CreateXssMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateXssMatchSetRequest method. -// req, resp := client.CreateXssMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateXssMatchSet -func (c *WAFRegional) CreateXssMatchSetRequest(input *waf.CreateXssMatchSetInput) (req *request.Request, output *waf.CreateXssMatchSetOutput) { - op := &request.Operation{ - Name: opCreateXssMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.CreateXssMatchSetInput{} - } - - output = &waf.CreateXssMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateXssMatchSet API operation for AWS WAF Regional. -// -// Creates an XssMatchSet, which you use to allow, block, or count requests -// that contain cross-site scripting attacks in the specified part of web requests. -// AWS WAF searches for character sequences that are likely to be malicious -// strings. -// -// To create and configure an XssMatchSet, perform the following steps: -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a CreateXssMatchSet request. -// -// Submit a CreateXssMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateXssMatchSet request. -// -// Submit an UpdateXssMatchSet request to specify the parts of web requests -// in which you want to allow, block, or count cross-site scripting attacks. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation CreateXssMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateXssMatchSet -func (c *WAFRegional) CreateXssMatchSet(input *waf.CreateXssMatchSetInput) (*waf.CreateXssMatchSetOutput, error) { - req, out := c.CreateXssMatchSetRequest(input) - return out, req.Send() -} - -// CreateXssMatchSetWithContext is the same as CreateXssMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateXssMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) CreateXssMatchSetWithContext(ctx aws.Context, input *waf.CreateXssMatchSetInput, opts ...request.Option) (*waf.CreateXssMatchSetOutput, error) { - req, out := c.CreateXssMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteByteMatchSet = "DeleteByteMatchSet" - -// DeleteByteMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteByteMatchSet for more information on using the DeleteByteMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteByteMatchSetRequest method. -// req, resp := client.DeleteByteMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteByteMatchSet -func (c *WAFRegional) DeleteByteMatchSetRequest(input *waf.DeleteByteMatchSetInput) (req *request.Request, output *waf.DeleteByteMatchSetOutput) { - op := &request.Operation{ - Name: opDeleteByteMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.DeleteByteMatchSetInput{} - } - - output = &waf.DeleteByteMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteByteMatchSet API operation for AWS WAF Regional. -// -// Permanently deletes a ByteMatchSet. You can't delete a ByteMatchSet if it's -// still used in any Rules or if it still includes any ByteMatchTuple objects -// (any filters). -// -// If you just want to remove a ByteMatchSet from a Rule, use UpdateRule. -// -// To permanently delete a ByteMatchSet, perform the following steps: -// -// Update the ByteMatchSet to remove filters, if any. For more information, -// see UpdateByteMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteByteMatchSet request. -// -// Submit a DeleteByteMatchSet request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DeleteByteMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteByteMatchSet -func (c *WAFRegional) DeleteByteMatchSet(input *waf.DeleteByteMatchSetInput) (*waf.DeleteByteMatchSetOutput, error) { - req, out := c.DeleteByteMatchSetRequest(input) - return out, req.Send() -} - -// DeleteByteMatchSetWithContext is the same as DeleteByteMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteByteMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DeleteByteMatchSetWithContext(ctx aws.Context, input *waf.DeleteByteMatchSetInput, opts ...request.Option) (*waf.DeleteByteMatchSetOutput, error) { - req, out := c.DeleteByteMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteGeoMatchSet = "DeleteGeoMatchSet" - -// DeleteGeoMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteGeoMatchSet for more information on using the DeleteGeoMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteGeoMatchSetRequest method. -// req, resp := client.DeleteGeoMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteGeoMatchSet -func (c *WAFRegional) DeleteGeoMatchSetRequest(input *waf.DeleteGeoMatchSetInput) (req *request.Request, output *waf.DeleteGeoMatchSetOutput) { - op := &request.Operation{ - Name: opDeleteGeoMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.DeleteGeoMatchSetInput{} - } - - output = &waf.DeleteGeoMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteGeoMatchSet API operation for AWS WAF Regional. -// -// Permanently deletes a GeoMatchSet. You can't delete a GeoMatchSet if it's -// still used in any Rules or if it still includes any countries. -// -// If you just want to remove a GeoMatchSet from a Rule, use UpdateRule. -// -// To permanently delete a GeoMatchSet from AWS WAF, perform the following steps: -// -// Update the GeoMatchSet to remove any countries. For more information, see -// UpdateGeoMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteGeoMatchSet request. -// -// Submit a DeleteGeoMatchSet request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DeleteGeoMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteGeoMatchSet -func (c *WAFRegional) DeleteGeoMatchSet(input *waf.DeleteGeoMatchSetInput) (*waf.DeleteGeoMatchSetOutput, error) { - req, out := c.DeleteGeoMatchSetRequest(input) - return out, req.Send() -} - -// DeleteGeoMatchSetWithContext is the same as DeleteGeoMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteGeoMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DeleteGeoMatchSetWithContext(ctx aws.Context, input *waf.DeleteGeoMatchSetInput, opts ...request.Option) (*waf.DeleteGeoMatchSetOutput, error) { - req, out := c.DeleteGeoMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIPSet = "DeleteIPSet" - -// DeleteIPSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIPSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIPSet for more information on using the DeleteIPSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIPSetRequest method. -// req, resp := client.DeleteIPSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteIPSet -func (c *WAFRegional) DeleteIPSetRequest(input *waf.DeleteIPSetInput) (req *request.Request, output *waf.DeleteIPSetOutput) { - op := &request.Operation{ - Name: opDeleteIPSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.DeleteIPSetInput{} - } - - output = &waf.DeleteIPSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteIPSet API operation for AWS WAF Regional. -// -// Permanently deletes an IPSet. You can't delete an IPSet if it's still used -// in any Rules or if it still includes any IP addresses. -// -// If you just want to remove an IPSet from a Rule, use UpdateRule. -// -// To permanently delete an IPSet from AWS WAF, perform the following steps: -// -// Update the IPSet to remove IP address ranges, if any. For more information, -// see UpdateIPSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteIPSet request. -// -// Submit a DeleteIPSet request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DeleteIPSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteIPSet -func (c *WAFRegional) DeleteIPSet(input *waf.DeleteIPSetInput) (*waf.DeleteIPSetOutput, error) { - req, out := c.DeleteIPSetRequest(input) - return out, req.Send() -} - -// DeleteIPSetWithContext is the same as DeleteIPSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIPSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DeleteIPSetWithContext(ctx aws.Context, input *waf.DeleteIPSetInput, opts ...request.Option) (*waf.DeleteIPSetOutput, error) { - req, out := c.DeleteIPSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLoggingConfiguration = "DeleteLoggingConfiguration" - -// DeleteLoggingConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoggingConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLoggingConfiguration for more information on using the DeleteLoggingConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteLoggingConfigurationRequest method. -// req, resp := client.DeleteLoggingConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteLoggingConfiguration -func (c *WAFRegional) DeleteLoggingConfigurationRequest(input *waf.DeleteLoggingConfigurationInput) (req *request.Request, output *waf.DeleteLoggingConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteLoggingConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.DeleteLoggingConfigurationInput{} - } - - output = &waf.DeleteLoggingConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLoggingConfiguration API operation for AWS WAF Regional. -// -// Permanently deletes the LoggingConfiguration from the specified web ACL. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DeleteLoggingConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteLoggingConfiguration -func (c *WAFRegional) DeleteLoggingConfiguration(input *waf.DeleteLoggingConfigurationInput) (*waf.DeleteLoggingConfigurationOutput, error) { - req, out := c.DeleteLoggingConfigurationRequest(input) - return out, req.Send() -} - -// DeleteLoggingConfigurationWithContext is the same as DeleteLoggingConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLoggingConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DeleteLoggingConfigurationWithContext(ctx aws.Context, input *waf.DeleteLoggingConfigurationInput, opts ...request.Option) (*waf.DeleteLoggingConfigurationOutput, error) { - req, out := c.DeleteLoggingConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePermissionPolicy = "DeletePermissionPolicy" - -// DeletePermissionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeletePermissionPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePermissionPolicy for more information on using the DeletePermissionPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeletePermissionPolicyRequest method. -// req, resp := client.DeletePermissionPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeletePermissionPolicy -func (c *WAFRegional) DeletePermissionPolicyRequest(input *waf.DeletePermissionPolicyInput) (req *request.Request, output *waf.DeletePermissionPolicyOutput) { - op := &request.Operation{ - Name: opDeletePermissionPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.DeletePermissionPolicyInput{} - } - - output = &waf.DeletePermissionPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePermissionPolicy API operation for AWS WAF Regional. -// -// Permanently deletes an IAM policy from the specified RuleGroup. -// -// The user making the request must be the owner of the RuleGroup. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DeletePermissionPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeletePermissionPolicy -func (c *WAFRegional) DeletePermissionPolicy(input *waf.DeletePermissionPolicyInput) (*waf.DeletePermissionPolicyOutput, error) { - req, out := c.DeletePermissionPolicyRequest(input) - return out, req.Send() -} - -// DeletePermissionPolicyWithContext is the same as DeletePermissionPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePermissionPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DeletePermissionPolicyWithContext(ctx aws.Context, input *waf.DeletePermissionPolicyInput, opts ...request.Option) (*waf.DeletePermissionPolicyOutput, error) { - req, out := c.DeletePermissionPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRateBasedRule = "DeleteRateBasedRule" - -// DeleteRateBasedRuleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRateBasedRule for more information on using the DeleteRateBasedRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRateBasedRuleRequest method. -// req, resp := client.DeleteRateBasedRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRateBasedRule -func (c *WAFRegional) DeleteRateBasedRuleRequest(input *waf.DeleteRateBasedRuleInput) (req *request.Request, output *waf.DeleteRateBasedRuleOutput) { - op := &request.Operation{ - Name: opDeleteRateBasedRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.DeleteRateBasedRuleInput{} - } - - output = &waf.DeleteRateBasedRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRateBasedRule API operation for AWS WAF Regional. -// -// Permanently deletes a RateBasedRule. You can't delete a rule if it's still -// used in any WebACL objects or if it still includes any predicates, such as -// ByteMatchSet objects. -// -// If you just want to remove a rule from a WebACL, use UpdateWebACL. -// -// To permanently delete a RateBasedRule from AWS WAF, perform the following -// steps: -// -// Update the RateBasedRule to remove predicates, if any. For more information, -// see UpdateRateBasedRule. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteRateBasedRule request. -// -// Submit a DeleteRateBasedRule request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DeleteRateBasedRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRateBasedRule -func (c *WAFRegional) DeleteRateBasedRule(input *waf.DeleteRateBasedRuleInput) (*waf.DeleteRateBasedRuleOutput, error) { - req, out := c.DeleteRateBasedRuleRequest(input) - return out, req.Send() -} - -// DeleteRateBasedRuleWithContext is the same as DeleteRateBasedRule with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRateBasedRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DeleteRateBasedRuleWithContext(ctx aws.Context, input *waf.DeleteRateBasedRuleInput, opts ...request.Option) (*waf.DeleteRateBasedRuleOutput, error) { - req, out := c.DeleteRateBasedRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRegexMatchSet = "DeleteRegexMatchSet" - -// DeleteRegexMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRegexMatchSet for more information on using the DeleteRegexMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRegexMatchSetRequest method. -// req, resp := client.DeleteRegexMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRegexMatchSet -func (c *WAFRegional) DeleteRegexMatchSetRequest(input *waf.DeleteRegexMatchSetInput) (req *request.Request, output *waf.DeleteRegexMatchSetOutput) { - op := &request.Operation{ - Name: opDeleteRegexMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.DeleteRegexMatchSetInput{} - } - - output = &waf.DeleteRegexMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRegexMatchSet API operation for AWS WAF Regional. -// -// Permanently deletes a RegexMatchSet. You can't delete a RegexMatchSet if -// it's still used in any Rules or if it still includes any RegexMatchTuples -// objects (any filters). -// -// If you just want to remove a RegexMatchSet from a Rule, use UpdateRule. -// -// To permanently delete a RegexMatchSet, perform the following steps: -// -// Update the RegexMatchSet to remove filters, if any. For more information, -// see UpdateRegexMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteRegexMatchSet request. -// -// Submit a DeleteRegexMatchSet request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DeleteRegexMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRegexMatchSet -func (c *WAFRegional) DeleteRegexMatchSet(input *waf.DeleteRegexMatchSetInput) (*waf.DeleteRegexMatchSetOutput, error) { - req, out := c.DeleteRegexMatchSetRequest(input) - return out, req.Send() -} - -// DeleteRegexMatchSetWithContext is the same as DeleteRegexMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRegexMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DeleteRegexMatchSetWithContext(ctx aws.Context, input *waf.DeleteRegexMatchSetInput, opts ...request.Option) (*waf.DeleteRegexMatchSetOutput, error) { - req, out := c.DeleteRegexMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRegexPatternSet = "DeleteRegexPatternSet" - -// DeleteRegexPatternSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRegexPatternSet for more information on using the DeleteRegexPatternSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRegexPatternSetRequest method. -// req, resp := client.DeleteRegexPatternSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRegexPatternSet -func (c *WAFRegional) DeleteRegexPatternSetRequest(input *waf.DeleteRegexPatternSetInput) (req *request.Request, output *waf.DeleteRegexPatternSetOutput) { - op := &request.Operation{ - Name: opDeleteRegexPatternSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.DeleteRegexPatternSetInput{} - } - - output = &waf.DeleteRegexPatternSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRegexPatternSet API operation for AWS WAF Regional. -// -// Permanently deletes a RegexPatternSet. You can't delete a RegexPatternSet -// if it's still used in any RegexMatchSet or if the RegexPatternSet is not -// empty. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DeleteRegexPatternSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRegexPatternSet -func (c *WAFRegional) DeleteRegexPatternSet(input *waf.DeleteRegexPatternSetInput) (*waf.DeleteRegexPatternSetOutput, error) { - req, out := c.DeleteRegexPatternSetRequest(input) - return out, req.Send() -} - -// DeleteRegexPatternSetWithContext is the same as DeleteRegexPatternSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRegexPatternSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DeleteRegexPatternSetWithContext(ctx aws.Context, input *waf.DeleteRegexPatternSetInput, opts ...request.Option) (*waf.DeleteRegexPatternSetOutput, error) { - req, out := c.DeleteRegexPatternSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRule = "DeleteRule" - -// DeleteRuleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRule for more information on using the DeleteRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRuleRequest method. -// req, resp := client.DeleteRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRule -func (c *WAFRegional) DeleteRuleRequest(input *waf.DeleteRuleInput) (req *request.Request, output *waf.DeleteRuleOutput) { - op := &request.Operation{ - Name: opDeleteRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.DeleteRuleInput{} - } - - output = &waf.DeleteRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRule API operation for AWS WAF Regional. -// -// Permanently deletes a Rule. You can't delete a Rule if it's still used in -// any WebACL objects or if it still includes any predicates, such as ByteMatchSet -// objects. -// -// If you just want to remove a Rule from a WebACL, use UpdateWebACL. -// -// To permanently delete a Rule from AWS WAF, perform the following steps: -// -// Update the Rule to remove predicates, if any. For more information, see UpdateRule. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteRule request. -// -// Submit a DeleteRule request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DeleteRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRule -func (c *WAFRegional) DeleteRule(input *waf.DeleteRuleInput) (*waf.DeleteRuleOutput, error) { - req, out := c.DeleteRuleRequest(input) - return out, req.Send() -} - -// DeleteRuleWithContext is the same as DeleteRule with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DeleteRuleWithContext(ctx aws.Context, input *waf.DeleteRuleInput, opts ...request.Option) (*waf.DeleteRuleOutput, error) { - req, out := c.DeleteRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRuleGroup = "DeleteRuleGroup" - -// DeleteRuleGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRuleGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRuleGroup for more information on using the DeleteRuleGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteRuleGroupRequest method. -// req, resp := client.DeleteRuleGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRuleGroup -func (c *WAFRegional) DeleteRuleGroupRequest(input *waf.DeleteRuleGroupInput) (req *request.Request, output *waf.DeleteRuleGroupOutput) { - op := &request.Operation{ - Name: opDeleteRuleGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.DeleteRuleGroupInput{} - } - - output = &waf.DeleteRuleGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteRuleGroup API operation for AWS WAF Regional. -// -// Permanently deletes a RuleGroup. You can't delete a RuleGroup if it's still -// used in any WebACL objects or if it still includes any rules. -// -// If you just want to remove a RuleGroup from a WebACL, use UpdateWebACL. -// -// To permanently delete a RuleGroup from AWS WAF, perform the following steps: -// -// Update the RuleGroup to remove rules, if any. For more information, see UpdateRuleGroup. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteRuleGroup request. -// -// Submit a DeleteRuleGroup request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DeleteRuleGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRuleGroup -func (c *WAFRegional) DeleteRuleGroup(input *waf.DeleteRuleGroupInput) (*waf.DeleteRuleGroupOutput, error) { - req, out := c.DeleteRuleGroupRequest(input) - return out, req.Send() -} - -// DeleteRuleGroupWithContext is the same as DeleteRuleGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRuleGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DeleteRuleGroupWithContext(ctx aws.Context, input *waf.DeleteRuleGroupInput, opts ...request.Option) (*waf.DeleteRuleGroupOutput, error) { - req, out := c.DeleteRuleGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSizeConstraintSet = "DeleteSizeConstraintSet" - -// DeleteSizeConstraintSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSizeConstraintSet for more information on using the DeleteSizeConstraintSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSizeConstraintSetRequest method. -// req, resp := client.DeleteSizeConstraintSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteSizeConstraintSet -func (c *WAFRegional) DeleteSizeConstraintSetRequest(input *waf.DeleteSizeConstraintSetInput) (req *request.Request, output *waf.DeleteSizeConstraintSetOutput) { - op := &request.Operation{ - Name: opDeleteSizeConstraintSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.DeleteSizeConstraintSetInput{} - } - - output = &waf.DeleteSizeConstraintSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteSizeConstraintSet API operation for AWS WAF Regional. -// -// Permanently deletes a SizeConstraintSet. You can't delete a SizeConstraintSet -// if it's still used in any Rules or if it still includes any SizeConstraint -// objects (any filters). -// -// If you just want to remove a SizeConstraintSet from a Rule, use UpdateRule. -// -// To permanently delete a SizeConstraintSet, perform the following steps: -// -// Update the SizeConstraintSet to remove filters, if any. For more information, -// see UpdateSizeConstraintSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteSizeConstraintSet request. -// -// Submit a DeleteSizeConstraintSet request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DeleteSizeConstraintSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteSizeConstraintSet -func (c *WAFRegional) DeleteSizeConstraintSet(input *waf.DeleteSizeConstraintSetInput) (*waf.DeleteSizeConstraintSetOutput, error) { - req, out := c.DeleteSizeConstraintSetRequest(input) - return out, req.Send() -} - -// DeleteSizeConstraintSetWithContext is the same as DeleteSizeConstraintSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSizeConstraintSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DeleteSizeConstraintSetWithContext(ctx aws.Context, input *waf.DeleteSizeConstraintSetInput, opts ...request.Option) (*waf.DeleteSizeConstraintSetOutput, error) { - req, out := c.DeleteSizeConstraintSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSqlInjectionMatchSet = "DeleteSqlInjectionMatchSet" - -// DeleteSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSqlInjectionMatchSet for more information on using the DeleteSqlInjectionMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteSqlInjectionMatchSetRequest method. -// req, resp := client.DeleteSqlInjectionMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteSqlInjectionMatchSet -func (c *WAFRegional) DeleteSqlInjectionMatchSetRequest(input *waf.DeleteSqlInjectionMatchSetInput) (req *request.Request, output *waf.DeleteSqlInjectionMatchSetOutput) { - op := &request.Operation{ - Name: opDeleteSqlInjectionMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.DeleteSqlInjectionMatchSetInput{} - } - - output = &waf.DeleteSqlInjectionMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteSqlInjectionMatchSet API operation for AWS WAF Regional. -// -// Permanently deletes a SqlInjectionMatchSet. You can't delete a SqlInjectionMatchSet -// if it's still used in any Rules or if it still contains any SqlInjectionMatchTuple -// objects. -// -// If you just want to remove a SqlInjectionMatchSet from a Rule, use UpdateRule. -// -// To permanently delete a SqlInjectionMatchSet from AWS WAF, perform the following -// steps: -// -// Update the SqlInjectionMatchSet to remove filters, if any. For more information, -// see UpdateSqlInjectionMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteSqlInjectionMatchSet request. -// -// Submit a DeleteSqlInjectionMatchSet request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DeleteSqlInjectionMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteSqlInjectionMatchSet -func (c *WAFRegional) DeleteSqlInjectionMatchSet(input *waf.DeleteSqlInjectionMatchSetInput) (*waf.DeleteSqlInjectionMatchSetOutput, error) { - req, out := c.DeleteSqlInjectionMatchSetRequest(input) - return out, req.Send() -} - -// DeleteSqlInjectionMatchSetWithContext is the same as DeleteSqlInjectionMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSqlInjectionMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DeleteSqlInjectionMatchSetWithContext(ctx aws.Context, input *waf.DeleteSqlInjectionMatchSetInput, opts ...request.Option) (*waf.DeleteSqlInjectionMatchSetOutput, error) { - req, out := c.DeleteSqlInjectionMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteWebACL = "DeleteWebACL" - -// DeleteWebACLRequest generates a "aws/request.Request" representing the -// client's request for the DeleteWebACL operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteWebACL for more information on using the DeleteWebACL -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteWebACLRequest method. -// req, resp := client.DeleteWebACLRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteWebACL -func (c *WAFRegional) DeleteWebACLRequest(input *waf.DeleteWebACLInput) (req *request.Request, output *waf.DeleteWebACLOutput) { - op := &request.Operation{ - Name: opDeleteWebACL, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.DeleteWebACLInput{} - } - - output = &waf.DeleteWebACLOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteWebACL API operation for AWS WAF Regional. -// -// Permanently deletes a WebACL. You can't delete a WebACL if it still contains -// any Rules. -// -// To delete a WebACL, perform the following steps: -// -// Update the WebACL to remove Rules, if any. For more information, see UpdateWebACL. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteWebACL request. -// -// Submit a DeleteWebACL request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DeleteWebACL for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteWebACL -func (c *WAFRegional) DeleteWebACL(input *waf.DeleteWebACLInput) (*waf.DeleteWebACLOutput, error) { - req, out := c.DeleteWebACLRequest(input) - return out, req.Send() -} - -// DeleteWebACLWithContext is the same as DeleteWebACL with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteWebACL for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DeleteWebACLWithContext(ctx aws.Context, input *waf.DeleteWebACLInput, opts ...request.Option) (*waf.DeleteWebACLOutput, error) { - req, out := c.DeleteWebACLRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteXssMatchSet = "DeleteXssMatchSet" - -// DeleteXssMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteXssMatchSet for more information on using the DeleteXssMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteXssMatchSetRequest method. -// req, resp := client.DeleteXssMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteXssMatchSet -func (c *WAFRegional) DeleteXssMatchSetRequest(input *waf.DeleteXssMatchSetInput) (req *request.Request, output *waf.DeleteXssMatchSetOutput) { - op := &request.Operation{ - Name: opDeleteXssMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.DeleteXssMatchSetInput{} - } - - output = &waf.DeleteXssMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteXssMatchSet API operation for AWS WAF Regional. -// -// Permanently deletes an XssMatchSet. You can't delete an XssMatchSet if it's -// still used in any Rules or if it still contains any XssMatchTuple objects. -// -// If you just want to remove an XssMatchSet from a Rule, use UpdateRule. -// -// To permanently delete an XssMatchSet from AWS WAF, perform the following -// steps: -// -// Update the XssMatchSet to remove filters, if any. For more information, see -// UpdateXssMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of a DeleteXssMatchSet request. -// -// Submit a DeleteXssMatchSet request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DeleteXssMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" -// The operation failed because you tried to delete an object that isn't empty. -// For example: -// -// * You tried to delete a WebACL that still contains one or more Rule objects. -// -// * You tried to delete a Rule that still contains one or more ByteMatchSet -// objects or other predicates. -// -// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple -// objects. -// -// * You tried to delete an IPSet that references one or more IP addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteXssMatchSet -func (c *WAFRegional) DeleteXssMatchSet(input *waf.DeleteXssMatchSetInput) (*waf.DeleteXssMatchSetOutput, error) { - req, out := c.DeleteXssMatchSetRequest(input) - return out, req.Send() -} - -// DeleteXssMatchSetWithContext is the same as DeleteXssMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteXssMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DeleteXssMatchSetWithContext(ctx aws.Context, input *waf.DeleteXssMatchSetInput, opts ...request.Option) (*waf.DeleteXssMatchSetOutput, error) { - req, out := c.DeleteXssMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateWebACL = "DisassociateWebACL" - -// DisassociateWebACLRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateWebACL operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateWebACL for more information on using the DisassociateWebACL -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateWebACLRequest method. -// req, resp := client.DisassociateWebACLRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DisassociateWebACL -func (c *WAFRegional) DisassociateWebACLRequest(input *DisassociateWebACLInput) (req *request.Request, output *DisassociateWebACLOutput) { - op := &request.Operation{ - Name: opDisassociateWebACL, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateWebACLInput{} - } - - output = &DisassociateWebACLOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateWebACL API operation for AWS WAF Regional. -// -// Removes a web ACL from the specified resource, either an application load -// balancer or Amazon API Gateway stage. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation DisassociateWebACL for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DisassociateWebACL -func (c *WAFRegional) DisassociateWebACL(input *DisassociateWebACLInput) (*DisassociateWebACLOutput, error) { - req, out := c.DisassociateWebACLRequest(input) - return out, req.Send() -} - -// DisassociateWebACLWithContext is the same as DisassociateWebACL with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateWebACL for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) DisassociateWebACLWithContext(ctx aws.Context, input *DisassociateWebACLInput, opts ...request.Option) (*DisassociateWebACLOutput, error) { - req, out := c.DisassociateWebACLRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetByteMatchSet = "GetByteMatchSet" - -// GetByteMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the GetByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetByteMatchSet for more information on using the GetByteMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetByteMatchSetRequest method. -// req, resp := client.GetByteMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetByteMatchSet -func (c *WAFRegional) GetByteMatchSetRequest(input *waf.GetByteMatchSetInput) (req *request.Request, output *waf.GetByteMatchSetOutput) { - op := &request.Operation{ - Name: opGetByteMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetByteMatchSetInput{} - } - - output = &waf.GetByteMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetByteMatchSet API operation for AWS WAF Regional. -// -// Returns the ByteMatchSet specified by ByteMatchSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetByteMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetByteMatchSet -func (c *WAFRegional) GetByteMatchSet(input *waf.GetByteMatchSetInput) (*waf.GetByteMatchSetOutput, error) { - req, out := c.GetByteMatchSetRequest(input) - return out, req.Send() -} - -// GetByteMatchSetWithContext is the same as GetByteMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetByteMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetByteMatchSetWithContext(ctx aws.Context, input *waf.GetByteMatchSetInput, opts ...request.Option) (*waf.GetByteMatchSetOutput, error) { - req, out := c.GetByteMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetChangeToken = "GetChangeToken" - -// GetChangeTokenRequest generates a "aws/request.Request" representing the -// client's request for the GetChangeToken operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetChangeToken for more information on using the GetChangeToken -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetChangeTokenRequest method. -// req, resp := client.GetChangeTokenRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetChangeToken -func (c *WAFRegional) GetChangeTokenRequest(input *waf.GetChangeTokenInput) (req *request.Request, output *waf.GetChangeTokenOutput) { - op := &request.Operation{ - Name: opGetChangeToken, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetChangeTokenInput{} - } - - output = &waf.GetChangeTokenOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetChangeToken API operation for AWS WAF Regional. -// -// When you want to create, update, or delete AWS WAF objects, get a change -// token and include the change token in the create, update, or delete request. -// Change tokens ensure that your application doesn't submit conflicting requests -// to AWS WAF. -// -// Each create, update, or delete request must use a unique change token. If -// your application submits a GetChangeToken request and then submits a second -// GetChangeToken request before submitting a create, update, or delete request, -// the second GetChangeToken request returns the same value as the first GetChangeToken -// request. -// -// When you use a change token in a create, update, or delete request, the status -// of the change token changes to PENDING, which indicates that AWS WAF is propagating -// the change to all AWS WAF servers. Use GetChangeTokenStatus to determine -// the status of your change token. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetChangeToken for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetChangeToken -func (c *WAFRegional) GetChangeToken(input *waf.GetChangeTokenInput) (*waf.GetChangeTokenOutput, error) { - req, out := c.GetChangeTokenRequest(input) - return out, req.Send() -} - -// GetChangeTokenWithContext is the same as GetChangeToken with the addition of -// the ability to pass a context and additional request options. -// -// See GetChangeToken for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetChangeTokenWithContext(ctx aws.Context, input *waf.GetChangeTokenInput, opts ...request.Option) (*waf.GetChangeTokenOutput, error) { - req, out := c.GetChangeTokenRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetChangeTokenStatus = "GetChangeTokenStatus" - -// GetChangeTokenStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetChangeTokenStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetChangeTokenStatus for more information on using the GetChangeTokenStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetChangeTokenStatusRequest method. -// req, resp := client.GetChangeTokenStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetChangeTokenStatus -func (c *WAFRegional) GetChangeTokenStatusRequest(input *waf.GetChangeTokenStatusInput) (req *request.Request, output *waf.GetChangeTokenStatusOutput) { - op := &request.Operation{ - Name: opGetChangeTokenStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetChangeTokenStatusInput{} - } - - output = &waf.GetChangeTokenStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetChangeTokenStatus API operation for AWS WAF Regional. -// -// Returns the status of a ChangeToken that you got by calling GetChangeToken. -// ChangeTokenStatus is one of the following values: -// -// * PROVISIONED: You requested the change token by calling GetChangeToken, -// but you haven't used it yet in a call to create, update, or delete an -// AWS WAF object. -// -// * PENDING: AWS WAF is propagating the create, update, or delete request -// to all AWS WAF servers. -// -// * IN_SYNC: Propagation is complete. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetChangeTokenStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetChangeTokenStatus -func (c *WAFRegional) GetChangeTokenStatus(input *waf.GetChangeTokenStatusInput) (*waf.GetChangeTokenStatusOutput, error) { - req, out := c.GetChangeTokenStatusRequest(input) - return out, req.Send() -} - -// GetChangeTokenStatusWithContext is the same as GetChangeTokenStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetChangeTokenStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetChangeTokenStatusWithContext(ctx aws.Context, input *waf.GetChangeTokenStatusInput, opts ...request.Option) (*waf.GetChangeTokenStatusOutput, error) { - req, out := c.GetChangeTokenStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetGeoMatchSet = "GetGeoMatchSet" - -// GetGeoMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the GetGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetGeoMatchSet for more information on using the GetGeoMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetGeoMatchSetRequest method. -// req, resp := client.GetGeoMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetGeoMatchSet -func (c *WAFRegional) GetGeoMatchSetRequest(input *waf.GetGeoMatchSetInput) (req *request.Request, output *waf.GetGeoMatchSetOutput) { - op := &request.Operation{ - Name: opGetGeoMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetGeoMatchSetInput{} - } - - output = &waf.GetGeoMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGeoMatchSet API operation for AWS WAF Regional. -// -// Returns the GeoMatchSet that is specified by GeoMatchSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetGeoMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetGeoMatchSet -func (c *WAFRegional) GetGeoMatchSet(input *waf.GetGeoMatchSetInput) (*waf.GetGeoMatchSetOutput, error) { - req, out := c.GetGeoMatchSetRequest(input) - return out, req.Send() -} - -// GetGeoMatchSetWithContext is the same as GetGeoMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetGeoMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetGeoMatchSetWithContext(ctx aws.Context, input *waf.GetGeoMatchSetInput, opts ...request.Option) (*waf.GetGeoMatchSetOutput, error) { - req, out := c.GetGeoMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetIPSet = "GetIPSet" - -// GetIPSetRequest generates a "aws/request.Request" representing the -// client's request for the GetIPSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetIPSet for more information on using the GetIPSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetIPSetRequest method. -// req, resp := client.GetIPSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetIPSet -func (c *WAFRegional) GetIPSetRequest(input *waf.GetIPSetInput) (req *request.Request, output *waf.GetIPSetOutput) { - op := &request.Operation{ - Name: opGetIPSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetIPSetInput{} - } - - output = &waf.GetIPSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetIPSet API operation for AWS WAF Regional. -// -// Returns the IPSet that is specified by IPSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetIPSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetIPSet -func (c *WAFRegional) GetIPSet(input *waf.GetIPSetInput) (*waf.GetIPSetOutput, error) { - req, out := c.GetIPSetRequest(input) - return out, req.Send() -} - -// GetIPSetWithContext is the same as GetIPSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetIPSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetIPSetWithContext(ctx aws.Context, input *waf.GetIPSetInput, opts ...request.Option) (*waf.GetIPSetOutput, error) { - req, out := c.GetIPSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLoggingConfiguration = "GetLoggingConfiguration" - -// GetLoggingConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetLoggingConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLoggingConfiguration for more information on using the GetLoggingConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetLoggingConfigurationRequest method. -// req, resp := client.GetLoggingConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetLoggingConfiguration -func (c *WAFRegional) GetLoggingConfigurationRequest(input *waf.GetLoggingConfigurationInput) (req *request.Request, output *waf.GetLoggingConfigurationOutput) { - op := &request.Operation{ - Name: opGetLoggingConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetLoggingConfigurationInput{} - } - - output = &waf.GetLoggingConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLoggingConfiguration API operation for AWS WAF Regional. -// -// Returns the LoggingConfiguration for the specified web ACL. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetLoggingConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetLoggingConfiguration -func (c *WAFRegional) GetLoggingConfiguration(input *waf.GetLoggingConfigurationInput) (*waf.GetLoggingConfigurationOutput, error) { - req, out := c.GetLoggingConfigurationRequest(input) - return out, req.Send() -} - -// GetLoggingConfigurationWithContext is the same as GetLoggingConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetLoggingConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetLoggingConfigurationWithContext(ctx aws.Context, input *waf.GetLoggingConfigurationInput, opts ...request.Option) (*waf.GetLoggingConfigurationOutput, error) { - req, out := c.GetLoggingConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPermissionPolicy = "GetPermissionPolicy" - -// GetPermissionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetPermissionPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPermissionPolicy for more information on using the GetPermissionPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetPermissionPolicyRequest method. -// req, resp := client.GetPermissionPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetPermissionPolicy -func (c *WAFRegional) GetPermissionPolicyRequest(input *waf.GetPermissionPolicyInput) (req *request.Request, output *waf.GetPermissionPolicyOutput) { - op := &request.Operation{ - Name: opGetPermissionPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetPermissionPolicyInput{} - } - - output = &waf.GetPermissionPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPermissionPolicy API operation for AWS WAF Regional. -// -// Returns the IAM policy attached to the RuleGroup. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetPermissionPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetPermissionPolicy -func (c *WAFRegional) GetPermissionPolicy(input *waf.GetPermissionPolicyInput) (*waf.GetPermissionPolicyOutput, error) { - req, out := c.GetPermissionPolicyRequest(input) - return out, req.Send() -} - -// GetPermissionPolicyWithContext is the same as GetPermissionPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetPermissionPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetPermissionPolicyWithContext(ctx aws.Context, input *waf.GetPermissionPolicyInput, opts ...request.Option) (*waf.GetPermissionPolicyOutput, error) { - req, out := c.GetPermissionPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRateBasedRule = "GetRateBasedRule" - -// GetRateBasedRuleRequest generates a "aws/request.Request" representing the -// client's request for the GetRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRateBasedRule for more information on using the GetRateBasedRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRateBasedRuleRequest method. -// req, resp := client.GetRateBasedRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRateBasedRule -func (c *WAFRegional) GetRateBasedRuleRequest(input *waf.GetRateBasedRuleInput) (req *request.Request, output *waf.GetRateBasedRuleOutput) { - op := &request.Operation{ - Name: opGetRateBasedRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetRateBasedRuleInput{} - } - - output = &waf.GetRateBasedRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRateBasedRule API operation for AWS WAF Regional. -// -// Returns the RateBasedRule that is specified by the RuleId that you included -// in the GetRateBasedRule request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetRateBasedRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRateBasedRule -func (c *WAFRegional) GetRateBasedRule(input *waf.GetRateBasedRuleInput) (*waf.GetRateBasedRuleOutput, error) { - req, out := c.GetRateBasedRuleRequest(input) - return out, req.Send() -} - -// GetRateBasedRuleWithContext is the same as GetRateBasedRule with the addition of -// the ability to pass a context and additional request options. -// -// See GetRateBasedRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetRateBasedRuleWithContext(ctx aws.Context, input *waf.GetRateBasedRuleInput, opts ...request.Option) (*waf.GetRateBasedRuleOutput, error) { - req, out := c.GetRateBasedRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRateBasedRuleManagedKeys = "GetRateBasedRuleManagedKeys" - -// GetRateBasedRuleManagedKeysRequest generates a "aws/request.Request" representing the -// client's request for the GetRateBasedRuleManagedKeys operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRateBasedRuleManagedKeys for more information on using the GetRateBasedRuleManagedKeys -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRateBasedRuleManagedKeysRequest method. -// req, resp := client.GetRateBasedRuleManagedKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRateBasedRuleManagedKeys -func (c *WAFRegional) GetRateBasedRuleManagedKeysRequest(input *waf.GetRateBasedRuleManagedKeysInput) (req *request.Request, output *waf.GetRateBasedRuleManagedKeysOutput) { - op := &request.Operation{ - Name: opGetRateBasedRuleManagedKeys, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetRateBasedRuleManagedKeysInput{} - } - - output = &waf.GetRateBasedRuleManagedKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRateBasedRuleManagedKeys API operation for AWS WAF Regional. -// -// Returns an array of IP addresses currently being blocked by the RateBasedRule -// that is specified by the RuleId. The maximum number of managed keys that -// will be blocked is 10,000. If more than 10,000 addresses exceed the rate -// limit, the 10,000 addresses with the highest rates will be blocked. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetRateBasedRuleManagedKeys for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRateBasedRuleManagedKeys -func (c *WAFRegional) GetRateBasedRuleManagedKeys(input *waf.GetRateBasedRuleManagedKeysInput) (*waf.GetRateBasedRuleManagedKeysOutput, error) { - req, out := c.GetRateBasedRuleManagedKeysRequest(input) - return out, req.Send() -} - -// GetRateBasedRuleManagedKeysWithContext is the same as GetRateBasedRuleManagedKeys with the addition of -// the ability to pass a context and additional request options. -// -// See GetRateBasedRuleManagedKeys for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetRateBasedRuleManagedKeysWithContext(ctx aws.Context, input *waf.GetRateBasedRuleManagedKeysInput, opts ...request.Option) (*waf.GetRateBasedRuleManagedKeysOutput, error) { - req, out := c.GetRateBasedRuleManagedKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRegexMatchSet = "GetRegexMatchSet" - -// GetRegexMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the GetRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRegexMatchSet for more information on using the GetRegexMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRegexMatchSetRequest method. -// req, resp := client.GetRegexMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRegexMatchSet -func (c *WAFRegional) GetRegexMatchSetRequest(input *waf.GetRegexMatchSetInput) (req *request.Request, output *waf.GetRegexMatchSetOutput) { - op := &request.Operation{ - Name: opGetRegexMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetRegexMatchSetInput{} - } - - output = &waf.GetRegexMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRegexMatchSet API operation for AWS WAF Regional. -// -// Returns the RegexMatchSet specified by RegexMatchSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetRegexMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRegexMatchSet -func (c *WAFRegional) GetRegexMatchSet(input *waf.GetRegexMatchSetInput) (*waf.GetRegexMatchSetOutput, error) { - req, out := c.GetRegexMatchSetRequest(input) - return out, req.Send() -} - -// GetRegexMatchSetWithContext is the same as GetRegexMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetRegexMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetRegexMatchSetWithContext(ctx aws.Context, input *waf.GetRegexMatchSetInput, opts ...request.Option) (*waf.GetRegexMatchSetOutput, error) { - req, out := c.GetRegexMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRegexPatternSet = "GetRegexPatternSet" - -// GetRegexPatternSetRequest generates a "aws/request.Request" representing the -// client's request for the GetRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRegexPatternSet for more information on using the GetRegexPatternSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRegexPatternSetRequest method. -// req, resp := client.GetRegexPatternSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRegexPatternSet -func (c *WAFRegional) GetRegexPatternSetRequest(input *waf.GetRegexPatternSetInput) (req *request.Request, output *waf.GetRegexPatternSetOutput) { - op := &request.Operation{ - Name: opGetRegexPatternSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetRegexPatternSetInput{} - } - - output = &waf.GetRegexPatternSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRegexPatternSet API operation for AWS WAF Regional. -// -// Returns the RegexPatternSet specified by RegexPatternSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetRegexPatternSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRegexPatternSet -func (c *WAFRegional) GetRegexPatternSet(input *waf.GetRegexPatternSetInput) (*waf.GetRegexPatternSetOutput, error) { - req, out := c.GetRegexPatternSetRequest(input) - return out, req.Send() -} - -// GetRegexPatternSetWithContext is the same as GetRegexPatternSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetRegexPatternSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetRegexPatternSetWithContext(ctx aws.Context, input *waf.GetRegexPatternSetInput, opts ...request.Option) (*waf.GetRegexPatternSetOutput, error) { - req, out := c.GetRegexPatternSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRule = "GetRule" - -// GetRuleRequest generates a "aws/request.Request" representing the -// client's request for the GetRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRule for more information on using the GetRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRuleRequest method. -// req, resp := client.GetRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRule -func (c *WAFRegional) GetRuleRequest(input *waf.GetRuleInput) (req *request.Request, output *waf.GetRuleOutput) { - op := &request.Operation{ - Name: opGetRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetRuleInput{} - } - - output = &waf.GetRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRule API operation for AWS WAF Regional. -// -// Returns the Rule that is specified by the RuleId that you included in the -// GetRule request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRule -func (c *WAFRegional) GetRule(input *waf.GetRuleInput) (*waf.GetRuleOutput, error) { - req, out := c.GetRuleRequest(input) - return out, req.Send() -} - -// GetRuleWithContext is the same as GetRule with the addition of -// the ability to pass a context and additional request options. -// -// See GetRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetRuleWithContext(ctx aws.Context, input *waf.GetRuleInput, opts ...request.Option) (*waf.GetRuleOutput, error) { - req, out := c.GetRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRuleGroup = "GetRuleGroup" - -// GetRuleGroupRequest generates a "aws/request.Request" representing the -// client's request for the GetRuleGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRuleGroup for more information on using the GetRuleGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetRuleGroupRequest method. -// req, resp := client.GetRuleGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRuleGroup -func (c *WAFRegional) GetRuleGroupRequest(input *waf.GetRuleGroupInput) (req *request.Request, output *waf.GetRuleGroupOutput) { - op := &request.Operation{ - Name: opGetRuleGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetRuleGroupInput{} - } - - output = &waf.GetRuleGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRuleGroup API operation for AWS WAF Regional. -// -// Returns the RuleGroup that is specified by the RuleGroupId that you included -// in the GetRuleGroup request. -// -// To view the rules in a rule group, use ListActivatedRulesInRuleGroup. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetRuleGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRuleGroup -func (c *WAFRegional) GetRuleGroup(input *waf.GetRuleGroupInput) (*waf.GetRuleGroupOutput, error) { - req, out := c.GetRuleGroupRequest(input) - return out, req.Send() -} - -// GetRuleGroupWithContext is the same as GetRuleGroup with the addition of -// the ability to pass a context and additional request options. -// -// See GetRuleGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetRuleGroupWithContext(ctx aws.Context, input *waf.GetRuleGroupInput, opts ...request.Option) (*waf.GetRuleGroupOutput, error) { - req, out := c.GetRuleGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSampledRequests = "GetSampledRequests" - -// GetSampledRequestsRequest generates a "aws/request.Request" representing the -// client's request for the GetSampledRequests operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSampledRequests for more information on using the GetSampledRequests -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSampledRequestsRequest method. -// req, resp := client.GetSampledRequestsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetSampledRequests -func (c *WAFRegional) GetSampledRequestsRequest(input *waf.GetSampledRequestsInput) (req *request.Request, output *waf.GetSampledRequestsOutput) { - op := &request.Operation{ - Name: opGetSampledRequests, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetSampledRequestsInput{} - } - - output = &waf.GetSampledRequestsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSampledRequests API operation for AWS WAF Regional. -// -// Gets detailed information about a specified number of requests--a sample--that -// AWS WAF randomly selects from among the first 5,000 requests that your AWS -// resource received during a time range that you choose. You can specify a -// sample size of up to 500 requests, and you can specify any time range in -// the previous three hours. -// -// GetSampledRequests returns a time range, which is usually the time range -// that you specified. However, if your resource (such as a CloudFront distribution) -// received 5,000 requests before the specified time range elapsed, GetSampledRequests -// returns an updated time range. This new time range indicates the actual period -// during which AWS WAF selected the requests in the sample. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetSampledRequests for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetSampledRequests -func (c *WAFRegional) GetSampledRequests(input *waf.GetSampledRequestsInput) (*waf.GetSampledRequestsOutput, error) { - req, out := c.GetSampledRequestsRequest(input) - return out, req.Send() -} - -// GetSampledRequestsWithContext is the same as GetSampledRequests with the addition of -// the ability to pass a context and additional request options. -// -// See GetSampledRequests for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetSampledRequestsWithContext(ctx aws.Context, input *waf.GetSampledRequestsInput, opts ...request.Option) (*waf.GetSampledRequestsOutput, error) { - req, out := c.GetSampledRequestsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSizeConstraintSet = "GetSizeConstraintSet" - -// GetSizeConstraintSetRequest generates a "aws/request.Request" representing the -// client's request for the GetSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSizeConstraintSet for more information on using the GetSizeConstraintSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSizeConstraintSetRequest method. -// req, resp := client.GetSizeConstraintSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetSizeConstraintSet -func (c *WAFRegional) GetSizeConstraintSetRequest(input *waf.GetSizeConstraintSetInput) (req *request.Request, output *waf.GetSizeConstraintSetOutput) { - op := &request.Operation{ - Name: opGetSizeConstraintSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetSizeConstraintSetInput{} - } - - output = &waf.GetSizeConstraintSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSizeConstraintSet API operation for AWS WAF Regional. -// -// Returns the SizeConstraintSet specified by SizeConstraintSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetSizeConstraintSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetSizeConstraintSet -func (c *WAFRegional) GetSizeConstraintSet(input *waf.GetSizeConstraintSetInput) (*waf.GetSizeConstraintSetOutput, error) { - req, out := c.GetSizeConstraintSetRequest(input) - return out, req.Send() -} - -// GetSizeConstraintSetWithContext is the same as GetSizeConstraintSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetSizeConstraintSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetSizeConstraintSetWithContext(ctx aws.Context, input *waf.GetSizeConstraintSetInput, opts ...request.Option) (*waf.GetSizeConstraintSetOutput, error) { - req, out := c.GetSizeConstraintSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSqlInjectionMatchSet = "GetSqlInjectionMatchSet" - -// GetSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the GetSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSqlInjectionMatchSet for more information on using the GetSqlInjectionMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetSqlInjectionMatchSetRequest method. -// req, resp := client.GetSqlInjectionMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetSqlInjectionMatchSet -func (c *WAFRegional) GetSqlInjectionMatchSetRequest(input *waf.GetSqlInjectionMatchSetInput) (req *request.Request, output *waf.GetSqlInjectionMatchSetOutput) { - op := &request.Operation{ - Name: opGetSqlInjectionMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetSqlInjectionMatchSetInput{} - } - - output = &waf.GetSqlInjectionMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSqlInjectionMatchSet API operation for AWS WAF Regional. -// -// Returns the SqlInjectionMatchSet that is specified by SqlInjectionMatchSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetSqlInjectionMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetSqlInjectionMatchSet -func (c *WAFRegional) GetSqlInjectionMatchSet(input *waf.GetSqlInjectionMatchSetInput) (*waf.GetSqlInjectionMatchSetOutput, error) { - req, out := c.GetSqlInjectionMatchSetRequest(input) - return out, req.Send() -} - -// GetSqlInjectionMatchSetWithContext is the same as GetSqlInjectionMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetSqlInjectionMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetSqlInjectionMatchSetWithContext(ctx aws.Context, input *waf.GetSqlInjectionMatchSetInput, opts ...request.Option) (*waf.GetSqlInjectionMatchSetOutput, error) { - req, out := c.GetSqlInjectionMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetWebACL = "GetWebACL" - -// GetWebACLRequest generates a "aws/request.Request" representing the -// client's request for the GetWebACL operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetWebACL for more information on using the GetWebACL -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetWebACLRequest method. -// req, resp := client.GetWebACLRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetWebACL -func (c *WAFRegional) GetWebACLRequest(input *waf.GetWebACLInput) (req *request.Request, output *waf.GetWebACLOutput) { - op := &request.Operation{ - Name: opGetWebACL, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetWebACLInput{} - } - - output = &waf.GetWebACLOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetWebACL API operation for AWS WAF Regional. -// -// Returns the WebACL that is specified by WebACLId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetWebACL for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetWebACL -func (c *WAFRegional) GetWebACL(input *waf.GetWebACLInput) (*waf.GetWebACLOutput, error) { - req, out := c.GetWebACLRequest(input) - return out, req.Send() -} - -// GetWebACLWithContext is the same as GetWebACL with the addition of -// the ability to pass a context and additional request options. -// -// See GetWebACL for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetWebACLWithContext(ctx aws.Context, input *waf.GetWebACLInput, opts ...request.Option) (*waf.GetWebACLOutput, error) { - req, out := c.GetWebACLRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetWebACLForResource = "GetWebACLForResource" - -// GetWebACLForResourceRequest generates a "aws/request.Request" representing the -// client's request for the GetWebACLForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetWebACLForResource for more information on using the GetWebACLForResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetWebACLForResourceRequest method. -// req, resp := client.GetWebACLForResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetWebACLForResource -func (c *WAFRegional) GetWebACLForResourceRequest(input *GetWebACLForResourceInput) (req *request.Request, output *GetWebACLForResourceOutput) { - op := &request.Operation{ - Name: opGetWebACLForResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetWebACLForResourceInput{} - } - - output = &GetWebACLForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetWebACLForResource API operation for AWS WAF Regional. -// -// Returns the web ACL for the specified resource, either an application load -// balancer or Amazon API Gateway stage. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetWebACLForResource for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFUnavailableEntityException "WAFUnavailableEntityException" -// The operation failed because the entity referenced is temporarily unavailable. -// Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetWebACLForResource -func (c *WAFRegional) GetWebACLForResource(input *GetWebACLForResourceInput) (*GetWebACLForResourceOutput, error) { - req, out := c.GetWebACLForResourceRequest(input) - return out, req.Send() -} - -// GetWebACLForResourceWithContext is the same as GetWebACLForResource with the addition of -// the ability to pass a context and additional request options. -// -// See GetWebACLForResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetWebACLForResourceWithContext(ctx aws.Context, input *GetWebACLForResourceInput, opts ...request.Option) (*GetWebACLForResourceOutput, error) { - req, out := c.GetWebACLForResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetXssMatchSet = "GetXssMatchSet" - -// GetXssMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the GetXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetXssMatchSet for more information on using the GetXssMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the GetXssMatchSetRequest method. -// req, resp := client.GetXssMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetXssMatchSet -func (c *WAFRegional) GetXssMatchSetRequest(input *waf.GetXssMatchSetInput) (req *request.Request, output *waf.GetXssMatchSetOutput) { - op := &request.Operation{ - Name: opGetXssMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.GetXssMatchSetInput{} - } - - output = &waf.GetXssMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetXssMatchSet API operation for AWS WAF Regional. -// -// Returns the XssMatchSet that is specified by XssMatchSetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation GetXssMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetXssMatchSet -func (c *WAFRegional) GetXssMatchSet(input *waf.GetXssMatchSetInput) (*waf.GetXssMatchSetOutput, error) { - req, out := c.GetXssMatchSetRequest(input) - return out, req.Send() -} - -// GetXssMatchSetWithContext is the same as GetXssMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See GetXssMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) GetXssMatchSetWithContext(ctx aws.Context, input *waf.GetXssMatchSetInput, opts ...request.Option) (*waf.GetXssMatchSetOutput, error) { - req, out := c.GetXssMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListActivatedRulesInRuleGroup = "ListActivatedRulesInRuleGroup" - -// ListActivatedRulesInRuleGroupRequest generates a "aws/request.Request" representing the -// client's request for the ListActivatedRulesInRuleGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListActivatedRulesInRuleGroup for more information on using the ListActivatedRulesInRuleGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListActivatedRulesInRuleGroupRequest method. -// req, resp := client.ListActivatedRulesInRuleGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListActivatedRulesInRuleGroup -func (c *WAFRegional) ListActivatedRulesInRuleGroupRequest(input *waf.ListActivatedRulesInRuleGroupInput) (req *request.Request, output *waf.ListActivatedRulesInRuleGroupOutput) { - op := &request.Operation{ - Name: opListActivatedRulesInRuleGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListActivatedRulesInRuleGroupInput{} - } - - output = &waf.ListActivatedRulesInRuleGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListActivatedRulesInRuleGroup API operation for AWS WAF Regional. -// -// Returns an array of ActivatedRule objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListActivatedRulesInRuleGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListActivatedRulesInRuleGroup -func (c *WAFRegional) ListActivatedRulesInRuleGroup(input *waf.ListActivatedRulesInRuleGroupInput) (*waf.ListActivatedRulesInRuleGroupOutput, error) { - req, out := c.ListActivatedRulesInRuleGroupRequest(input) - return out, req.Send() -} - -// ListActivatedRulesInRuleGroupWithContext is the same as ListActivatedRulesInRuleGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ListActivatedRulesInRuleGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListActivatedRulesInRuleGroupWithContext(ctx aws.Context, input *waf.ListActivatedRulesInRuleGroupInput, opts ...request.Option) (*waf.ListActivatedRulesInRuleGroupOutput, error) { - req, out := c.ListActivatedRulesInRuleGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListByteMatchSets = "ListByteMatchSets" - -// ListByteMatchSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListByteMatchSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListByteMatchSets for more information on using the ListByteMatchSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListByteMatchSetsRequest method. -// req, resp := client.ListByteMatchSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListByteMatchSets -func (c *WAFRegional) ListByteMatchSetsRequest(input *waf.ListByteMatchSetsInput) (req *request.Request, output *waf.ListByteMatchSetsOutput) { - op := &request.Operation{ - Name: opListByteMatchSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListByteMatchSetsInput{} - } - - output = &waf.ListByteMatchSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListByteMatchSets API operation for AWS WAF Regional. -// -// Returns an array of ByteMatchSetSummary objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListByteMatchSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListByteMatchSets -func (c *WAFRegional) ListByteMatchSets(input *waf.ListByteMatchSetsInput) (*waf.ListByteMatchSetsOutput, error) { - req, out := c.ListByteMatchSetsRequest(input) - return out, req.Send() -} - -// ListByteMatchSetsWithContext is the same as ListByteMatchSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListByteMatchSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListByteMatchSetsWithContext(ctx aws.Context, input *waf.ListByteMatchSetsInput, opts ...request.Option) (*waf.ListByteMatchSetsOutput, error) { - req, out := c.ListByteMatchSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListGeoMatchSets = "ListGeoMatchSets" - -// ListGeoMatchSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListGeoMatchSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListGeoMatchSets for more information on using the ListGeoMatchSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListGeoMatchSetsRequest method. -// req, resp := client.ListGeoMatchSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListGeoMatchSets -func (c *WAFRegional) ListGeoMatchSetsRequest(input *waf.ListGeoMatchSetsInput) (req *request.Request, output *waf.ListGeoMatchSetsOutput) { - op := &request.Operation{ - Name: opListGeoMatchSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListGeoMatchSetsInput{} - } - - output = &waf.ListGeoMatchSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGeoMatchSets API operation for AWS WAF Regional. -// -// Returns an array of GeoMatchSetSummary objects in the response. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListGeoMatchSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListGeoMatchSets -func (c *WAFRegional) ListGeoMatchSets(input *waf.ListGeoMatchSetsInput) (*waf.ListGeoMatchSetsOutput, error) { - req, out := c.ListGeoMatchSetsRequest(input) - return out, req.Send() -} - -// ListGeoMatchSetsWithContext is the same as ListGeoMatchSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListGeoMatchSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListGeoMatchSetsWithContext(ctx aws.Context, input *waf.ListGeoMatchSetsInput, opts ...request.Option) (*waf.ListGeoMatchSetsOutput, error) { - req, out := c.ListGeoMatchSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListIPSets = "ListIPSets" - -// ListIPSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListIPSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListIPSets for more information on using the ListIPSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListIPSetsRequest method. -// req, resp := client.ListIPSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListIPSets -func (c *WAFRegional) ListIPSetsRequest(input *waf.ListIPSetsInput) (req *request.Request, output *waf.ListIPSetsOutput) { - op := &request.Operation{ - Name: opListIPSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListIPSetsInput{} - } - - output = &waf.ListIPSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListIPSets API operation for AWS WAF Regional. -// -// Returns an array of IPSetSummary objects in the response. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListIPSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListIPSets -func (c *WAFRegional) ListIPSets(input *waf.ListIPSetsInput) (*waf.ListIPSetsOutput, error) { - req, out := c.ListIPSetsRequest(input) - return out, req.Send() -} - -// ListIPSetsWithContext is the same as ListIPSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListIPSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListIPSetsWithContext(ctx aws.Context, input *waf.ListIPSetsInput, opts ...request.Option) (*waf.ListIPSetsOutput, error) { - req, out := c.ListIPSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListLoggingConfigurations = "ListLoggingConfigurations" - -// ListLoggingConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the ListLoggingConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListLoggingConfigurations for more information on using the ListLoggingConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListLoggingConfigurationsRequest method. -// req, resp := client.ListLoggingConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListLoggingConfigurations -func (c *WAFRegional) ListLoggingConfigurationsRequest(input *waf.ListLoggingConfigurationsInput) (req *request.Request, output *waf.ListLoggingConfigurationsOutput) { - op := &request.Operation{ - Name: opListLoggingConfigurations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListLoggingConfigurationsInput{} - } - - output = &waf.ListLoggingConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListLoggingConfigurations API operation for AWS WAF Regional. -// -// Returns an array of LoggingConfiguration objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListLoggingConfigurations for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListLoggingConfigurations -func (c *WAFRegional) ListLoggingConfigurations(input *waf.ListLoggingConfigurationsInput) (*waf.ListLoggingConfigurationsOutput, error) { - req, out := c.ListLoggingConfigurationsRequest(input) - return out, req.Send() -} - -// ListLoggingConfigurationsWithContext is the same as ListLoggingConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See ListLoggingConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListLoggingConfigurationsWithContext(ctx aws.Context, input *waf.ListLoggingConfigurationsInput, opts ...request.Option) (*waf.ListLoggingConfigurationsOutput, error) { - req, out := c.ListLoggingConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRateBasedRules = "ListRateBasedRules" - -// ListRateBasedRulesRequest generates a "aws/request.Request" representing the -// client's request for the ListRateBasedRules operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRateBasedRules for more information on using the ListRateBasedRules -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRateBasedRulesRequest method. -// req, resp := client.ListRateBasedRulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRateBasedRules -func (c *WAFRegional) ListRateBasedRulesRequest(input *waf.ListRateBasedRulesInput) (req *request.Request, output *waf.ListRateBasedRulesOutput) { - op := &request.Operation{ - Name: opListRateBasedRules, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListRateBasedRulesInput{} - } - - output = &waf.ListRateBasedRulesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRateBasedRules API operation for AWS WAF Regional. -// -// Returns an array of RuleSummary objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListRateBasedRules for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRateBasedRules -func (c *WAFRegional) ListRateBasedRules(input *waf.ListRateBasedRulesInput) (*waf.ListRateBasedRulesOutput, error) { - req, out := c.ListRateBasedRulesRequest(input) - return out, req.Send() -} - -// ListRateBasedRulesWithContext is the same as ListRateBasedRules with the addition of -// the ability to pass a context and additional request options. -// -// See ListRateBasedRules for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListRateBasedRulesWithContext(ctx aws.Context, input *waf.ListRateBasedRulesInput, opts ...request.Option) (*waf.ListRateBasedRulesOutput, error) { - req, out := c.ListRateBasedRulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRegexMatchSets = "ListRegexMatchSets" - -// ListRegexMatchSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListRegexMatchSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRegexMatchSets for more information on using the ListRegexMatchSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRegexMatchSetsRequest method. -// req, resp := client.ListRegexMatchSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRegexMatchSets -func (c *WAFRegional) ListRegexMatchSetsRequest(input *waf.ListRegexMatchSetsInput) (req *request.Request, output *waf.ListRegexMatchSetsOutput) { - op := &request.Operation{ - Name: opListRegexMatchSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListRegexMatchSetsInput{} - } - - output = &waf.ListRegexMatchSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRegexMatchSets API operation for AWS WAF Regional. -// -// Returns an array of RegexMatchSetSummary objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListRegexMatchSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRegexMatchSets -func (c *WAFRegional) ListRegexMatchSets(input *waf.ListRegexMatchSetsInput) (*waf.ListRegexMatchSetsOutput, error) { - req, out := c.ListRegexMatchSetsRequest(input) - return out, req.Send() -} - -// ListRegexMatchSetsWithContext is the same as ListRegexMatchSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListRegexMatchSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListRegexMatchSetsWithContext(ctx aws.Context, input *waf.ListRegexMatchSetsInput, opts ...request.Option) (*waf.ListRegexMatchSetsOutput, error) { - req, out := c.ListRegexMatchSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRegexPatternSets = "ListRegexPatternSets" - -// ListRegexPatternSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListRegexPatternSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRegexPatternSets for more information on using the ListRegexPatternSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRegexPatternSetsRequest method. -// req, resp := client.ListRegexPatternSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRegexPatternSets -func (c *WAFRegional) ListRegexPatternSetsRequest(input *waf.ListRegexPatternSetsInput) (req *request.Request, output *waf.ListRegexPatternSetsOutput) { - op := &request.Operation{ - Name: opListRegexPatternSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListRegexPatternSetsInput{} - } - - output = &waf.ListRegexPatternSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRegexPatternSets API operation for AWS WAF Regional. -// -// Returns an array of RegexPatternSetSummary objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListRegexPatternSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRegexPatternSets -func (c *WAFRegional) ListRegexPatternSets(input *waf.ListRegexPatternSetsInput) (*waf.ListRegexPatternSetsOutput, error) { - req, out := c.ListRegexPatternSetsRequest(input) - return out, req.Send() -} - -// ListRegexPatternSetsWithContext is the same as ListRegexPatternSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListRegexPatternSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListRegexPatternSetsWithContext(ctx aws.Context, input *waf.ListRegexPatternSetsInput, opts ...request.Option) (*waf.ListRegexPatternSetsOutput, error) { - req, out := c.ListRegexPatternSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListResourcesForWebACL = "ListResourcesForWebACL" - -// ListResourcesForWebACLRequest generates a "aws/request.Request" representing the -// client's request for the ListResourcesForWebACL operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListResourcesForWebACL for more information on using the ListResourcesForWebACL -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListResourcesForWebACLRequest method. -// req, resp := client.ListResourcesForWebACLRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListResourcesForWebACL -func (c *WAFRegional) ListResourcesForWebACLRequest(input *ListResourcesForWebACLInput) (req *request.Request, output *ListResourcesForWebACLOutput) { - op := &request.Operation{ - Name: opListResourcesForWebACL, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListResourcesForWebACLInput{} - } - - output = &ListResourcesForWebACLOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResourcesForWebACL API operation for AWS WAF Regional. -// -// Returns an array of resources associated with the specified web ACL. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListResourcesForWebACL for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListResourcesForWebACL -func (c *WAFRegional) ListResourcesForWebACL(input *ListResourcesForWebACLInput) (*ListResourcesForWebACLOutput, error) { - req, out := c.ListResourcesForWebACLRequest(input) - return out, req.Send() -} - -// ListResourcesForWebACLWithContext is the same as ListResourcesForWebACL with the addition of -// the ability to pass a context and additional request options. -// -// See ListResourcesForWebACL for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListResourcesForWebACLWithContext(ctx aws.Context, input *ListResourcesForWebACLInput, opts ...request.Option) (*ListResourcesForWebACLOutput, error) { - req, out := c.ListResourcesForWebACLRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRuleGroups = "ListRuleGroups" - -// ListRuleGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ListRuleGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRuleGroups for more information on using the ListRuleGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRuleGroupsRequest method. -// req, resp := client.ListRuleGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRuleGroups -func (c *WAFRegional) ListRuleGroupsRequest(input *waf.ListRuleGroupsInput) (req *request.Request, output *waf.ListRuleGroupsOutput) { - op := &request.Operation{ - Name: opListRuleGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListRuleGroupsInput{} - } - - output = &waf.ListRuleGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRuleGroups API operation for AWS WAF Regional. -// -// Returns an array of RuleGroup objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListRuleGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRuleGroups -func (c *WAFRegional) ListRuleGroups(input *waf.ListRuleGroupsInput) (*waf.ListRuleGroupsOutput, error) { - req, out := c.ListRuleGroupsRequest(input) - return out, req.Send() -} - -// ListRuleGroupsWithContext is the same as ListRuleGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ListRuleGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListRuleGroupsWithContext(ctx aws.Context, input *waf.ListRuleGroupsInput, opts ...request.Option) (*waf.ListRuleGroupsOutput, error) { - req, out := c.ListRuleGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRules = "ListRules" - -// ListRulesRequest generates a "aws/request.Request" representing the -// client's request for the ListRules operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRules for more information on using the ListRules -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListRulesRequest method. -// req, resp := client.ListRulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRules -func (c *WAFRegional) ListRulesRequest(input *waf.ListRulesInput) (req *request.Request, output *waf.ListRulesOutput) { - op := &request.Operation{ - Name: opListRules, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListRulesInput{} - } - - output = &waf.ListRulesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRules API operation for AWS WAF Regional. -// -// Returns an array of RuleSummary objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListRules for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRules -func (c *WAFRegional) ListRules(input *waf.ListRulesInput) (*waf.ListRulesOutput, error) { - req, out := c.ListRulesRequest(input) - return out, req.Send() -} - -// ListRulesWithContext is the same as ListRules with the addition of -// the ability to pass a context and additional request options. -// -// See ListRules for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListRulesWithContext(ctx aws.Context, input *waf.ListRulesInput, opts ...request.Option) (*waf.ListRulesOutput, error) { - req, out := c.ListRulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSizeConstraintSets = "ListSizeConstraintSets" - -// ListSizeConstraintSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListSizeConstraintSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSizeConstraintSets for more information on using the ListSizeConstraintSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSizeConstraintSetsRequest method. -// req, resp := client.ListSizeConstraintSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListSizeConstraintSets -func (c *WAFRegional) ListSizeConstraintSetsRequest(input *waf.ListSizeConstraintSetsInput) (req *request.Request, output *waf.ListSizeConstraintSetsOutput) { - op := &request.Operation{ - Name: opListSizeConstraintSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListSizeConstraintSetsInput{} - } - - output = &waf.ListSizeConstraintSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSizeConstraintSets API operation for AWS WAF Regional. -// -// Returns an array of SizeConstraintSetSummary objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListSizeConstraintSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListSizeConstraintSets -func (c *WAFRegional) ListSizeConstraintSets(input *waf.ListSizeConstraintSetsInput) (*waf.ListSizeConstraintSetsOutput, error) { - req, out := c.ListSizeConstraintSetsRequest(input) - return out, req.Send() -} - -// ListSizeConstraintSetsWithContext is the same as ListSizeConstraintSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListSizeConstraintSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListSizeConstraintSetsWithContext(ctx aws.Context, input *waf.ListSizeConstraintSetsInput, opts ...request.Option) (*waf.ListSizeConstraintSetsOutput, error) { - req, out := c.ListSizeConstraintSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSqlInjectionMatchSets = "ListSqlInjectionMatchSets" - -// ListSqlInjectionMatchSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListSqlInjectionMatchSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSqlInjectionMatchSets for more information on using the ListSqlInjectionMatchSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSqlInjectionMatchSetsRequest method. -// req, resp := client.ListSqlInjectionMatchSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListSqlInjectionMatchSets -func (c *WAFRegional) ListSqlInjectionMatchSetsRequest(input *waf.ListSqlInjectionMatchSetsInput) (req *request.Request, output *waf.ListSqlInjectionMatchSetsOutput) { - op := &request.Operation{ - Name: opListSqlInjectionMatchSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListSqlInjectionMatchSetsInput{} - } - - output = &waf.ListSqlInjectionMatchSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSqlInjectionMatchSets API operation for AWS WAF Regional. -// -// Returns an array of SqlInjectionMatchSet objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListSqlInjectionMatchSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListSqlInjectionMatchSets -func (c *WAFRegional) ListSqlInjectionMatchSets(input *waf.ListSqlInjectionMatchSetsInput) (*waf.ListSqlInjectionMatchSetsOutput, error) { - req, out := c.ListSqlInjectionMatchSetsRequest(input) - return out, req.Send() -} - -// ListSqlInjectionMatchSetsWithContext is the same as ListSqlInjectionMatchSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListSqlInjectionMatchSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListSqlInjectionMatchSetsWithContext(ctx aws.Context, input *waf.ListSqlInjectionMatchSetsInput, opts ...request.Option) (*waf.ListSqlInjectionMatchSetsOutput, error) { - req, out := c.ListSqlInjectionMatchSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSubscribedRuleGroups = "ListSubscribedRuleGroups" - -// ListSubscribedRuleGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ListSubscribedRuleGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSubscribedRuleGroups for more information on using the ListSubscribedRuleGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListSubscribedRuleGroupsRequest method. -// req, resp := client.ListSubscribedRuleGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListSubscribedRuleGroups -func (c *WAFRegional) ListSubscribedRuleGroupsRequest(input *waf.ListSubscribedRuleGroupsInput) (req *request.Request, output *waf.ListSubscribedRuleGroupsOutput) { - op := &request.Operation{ - Name: opListSubscribedRuleGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListSubscribedRuleGroupsInput{} - } - - output = &waf.ListSubscribedRuleGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSubscribedRuleGroups API operation for AWS WAF Regional. -// -// Returns an array of RuleGroup objects that you are subscribed to. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListSubscribedRuleGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListSubscribedRuleGroups -func (c *WAFRegional) ListSubscribedRuleGroups(input *waf.ListSubscribedRuleGroupsInput) (*waf.ListSubscribedRuleGroupsOutput, error) { - req, out := c.ListSubscribedRuleGroupsRequest(input) - return out, req.Send() -} - -// ListSubscribedRuleGroupsWithContext is the same as ListSubscribedRuleGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ListSubscribedRuleGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListSubscribedRuleGroupsWithContext(ctx aws.Context, input *waf.ListSubscribedRuleGroupsInput, opts ...request.Option) (*waf.ListSubscribedRuleGroupsOutput, error) { - req, out := c.ListSubscribedRuleGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListWebACLs = "ListWebACLs" - -// ListWebACLsRequest generates a "aws/request.Request" representing the -// client's request for the ListWebACLs operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListWebACLs for more information on using the ListWebACLs -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListWebACLsRequest method. -// req, resp := client.ListWebACLsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListWebACLs -func (c *WAFRegional) ListWebACLsRequest(input *waf.ListWebACLsInput) (req *request.Request, output *waf.ListWebACLsOutput) { - op := &request.Operation{ - Name: opListWebACLs, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListWebACLsInput{} - } - - output = &waf.ListWebACLsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListWebACLs API operation for AWS WAF Regional. -// -// Returns an array of WebACLSummary objects in the response. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListWebACLs for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListWebACLs -func (c *WAFRegional) ListWebACLs(input *waf.ListWebACLsInput) (*waf.ListWebACLsOutput, error) { - req, out := c.ListWebACLsRequest(input) - return out, req.Send() -} - -// ListWebACLsWithContext is the same as ListWebACLs with the addition of -// the ability to pass a context and additional request options. -// -// See ListWebACLs for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListWebACLsWithContext(ctx aws.Context, input *waf.ListWebACLsInput, opts ...request.Option) (*waf.ListWebACLsOutput, error) { - req, out := c.ListWebACLsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListXssMatchSets = "ListXssMatchSets" - -// ListXssMatchSetsRequest generates a "aws/request.Request" representing the -// client's request for the ListXssMatchSets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListXssMatchSets for more information on using the ListXssMatchSets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListXssMatchSetsRequest method. -// req, resp := client.ListXssMatchSetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListXssMatchSets -func (c *WAFRegional) ListXssMatchSetsRequest(input *waf.ListXssMatchSetsInput) (req *request.Request, output *waf.ListXssMatchSetsOutput) { - op := &request.Operation{ - Name: opListXssMatchSets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.ListXssMatchSetsInput{} - } - - output = &waf.ListXssMatchSetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListXssMatchSets API operation for AWS WAF Regional. -// -// Returns an array of XssMatchSet objects. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation ListXssMatchSets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListXssMatchSets -func (c *WAFRegional) ListXssMatchSets(input *waf.ListXssMatchSetsInput) (*waf.ListXssMatchSetsOutput, error) { - req, out := c.ListXssMatchSetsRequest(input) - return out, req.Send() -} - -// ListXssMatchSetsWithContext is the same as ListXssMatchSets with the addition of -// the ability to pass a context and additional request options. -// -// See ListXssMatchSets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) ListXssMatchSetsWithContext(ctx aws.Context, input *waf.ListXssMatchSetsInput, opts ...request.Option) (*waf.ListXssMatchSetsOutput, error) { - req, out := c.ListXssMatchSetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutLoggingConfiguration = "PutLoggingConfiguration" - -// PutLoggingConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the PutLoggingConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutLoggingConfiguration for more information on using the PutLoggingConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutLoggingConfigurationRequest method. -// req, resp := client.PutLoggingConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/PutLoggingConfiguration -func (c *WAFRegional) PutLoggingConfigurationRequest(input *waf.PutLoggingConfigurationInput) (req *request.Request, output *waf.PutLoggingConfigurationOutput) { - op := &request.Operation{ - Name: opPutLoggingConfiguration, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.PutLoggingConfigurationInput{} - } - - output = &waf.PutLoggingConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutLoggingConfiguration API operation for AWS WAF Regional. -// -// Associates a LoggingConfiguration with a specified web ACL. -// -// You can access information about all traffic that AWS WAF inspects using -// the following steps: -// -// Create an Amazon Kinesis Data Firehose . -// -// Associate that firehose to your web ACL using a PutLoggingConfiguration request. -// -// When you successfully enable logging using a PutLoggingConfiguration request, -// AWS WAF will create a service linked role with the necessary permissions -// to write logs to the Amazon Kinesis Data Firehose. For more information, -// see Logging Web ACL Traffic Information (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html) -// in the AWS WAF Developer Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation PutLoggingConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFServiceLinkedRoleErrorException "WAFServiceLinkedRoleErrorException" -// AWS WAF is not able to access the service linked role. This can be caused -// by a previous PutLoggingConfiguration request, which can lock the service -// linked role for about 20 seconds. Please try your request again. The service -// linked role can also be locked by a previous DeleteServiceLinkedRole request, -// which can lock the role for 15 minutes or more. If you recently made a DeleteServiceLinkedRole, -// wait at least 15 minutes and try the request again. If you receive this same -// exception again, you will have to wait additional time until the role is -// unlocked. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/PutLoggingConfiguration -func (c *WAFRegional) PutLoggingConfiguration(input *waf.PutLoggingConfigurationInput) (*waf.PutLoggingConfigurationOutput, error) { - req, out := c.PutLoggingConfigurationRequest(input) - return out, req.Send() -} - -// PutLoggingConfigurationWithContext is the same as PutLoggingConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See PutLoggingConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) PutLoggingConfigurationWithContext(ctx aws.Context, input *waf.PutLoggingConfigurationInput, opts ...request.Option) (*waf.PutLoggingConfigurationOutput, error) { - req, out := c.PutLoggingConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutPermissionPolicy = "PutPermissionPolicy" - -// PutPermissionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutPermissionPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutPermissionPolicy for more information on using the PutPermissionPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the PutPermissionPolicyRequest method. -// req, resp := client.PutPermissionPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/PutPermissionPolicy -func (c *WAFRegional) PutPermissionPolicyRequest(input *waf.PutPermissionPolicyInput) (req *request.Request, output *waf.PutPermissionPolicyOutput) { - op := &request.Operation{ - Name: opPutPermissionPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.PutPermissionPolicyInput{} - } - - output = &waf.PutPermissionPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutPermissionPolicy API operation for AWS WAF Regional. -// -// Attaches a IAM policy to the specified resource. The only supported use for -// this action is to share a RuleGroup across accounts. -// -// The PutPermissionPolicy is subject to the following restrictions: -// -// * You can attach only one policy with each PutPermissionPolicy request. -// -// * The policy must include an Effect, Action and Principal. -// -// * Effect must specify Allow. -// -// * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, -// waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard -// actions in the policy will be rejected. -// -// * The policy cannot include a Resource parameter. -// -// * The ARN in the request must be a valid WAF RuleGroup ARN and the RuleGroup -// must exist in the same region. -// -// * The user making the request must be the owner of the RuleGroup. -// -// * Your policy must be composed using IAM Policy version 2012-10-17. -// -// For more information, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html). -// -// An example of a valid policy parameter is shown in the Examples section below. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation PutPermissionPolicy for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFInvalidPermissionPolicyException "WAFInvalidPermissionPolicyException" -// The operation failed because the specified policy is not in the proper format. -// -// The policy is subject to the following restrictions: -// -// * You can attach only one policy with each PutPermissionPolicy request. -// -// * The policy must include an Effect, Action and Principal. -// -// * Effect must specify Allow. -// -// * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, -// waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard -// actions in the policy will be rejected. -// -// * The policy cannot include a Resource parameter. -// -// * The ARN in the request must be a valid WAF RuleGroup ARN and the RuleGroup -// must exist in the same region. -// -// * The user making the request must be the owner of the RuleGroup. -// -// * Your policy must be composed using IAM Policy version 2012-10-17. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/PutPermissionPolicy -func (c *WAFRegional) PutPermissionPolicy(input *waf.PutPermissionPolicyInput) (*waf.PutPermissionPolicyOutput, error) { - req, out := c.PutPermissionPolicyRequest(input) - return out, req.Send() -} - -// PutPermissionPolicyWithContext is the same as PutPermissionPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutPermissionPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) PutPermissionPolicyWithContext(ctx aws.Context, input *waf.PutPermissionPolicyInput, opts ...request.Option) (*waf.PutPermissionPolicyOutput, error) { - req, out := c.PutPermissionPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateByteMatchSet = "UpdateByteMatchSet" - -// UpdateByteMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateByteMatchSet for more information on using the UpdateByteMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateByteMatchSetRequest method. -// req, resp := client.UpdateByteMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateByteMatchSet -func (c *WAFRegional) UpdateByteMatchSetRequest(input *waf.UpdateByteMatchSetInput) (req *request.Request, output *waf.UpdateByteMatchSetOutput) { - op := &request.Operation{ - Name: opUpdateByteMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.UpdateByteMatchSetInput{} - } - - output = &waf.UpdateByteMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateByteMatchSet API operation for AWS WAF Regional. -// -// Inserts or deletes ByteMatchTuple objects (filters) in a ByteMatchSet. For -// each ByteMatchTuple object, you specify the following values: -// -// * Whether to insert or delete the object from the array. If you want to -// change a ByteMatchSetUpdate object, you delete the existing object and -// add a new one. -// -// * The part of a web request that you want AWS WAF to inspect, such as -// a query string or the value of the User-Agent header. -// -// * The bytes (typically a string that corresponds with ASCII characters) -// that you want AWS WAF to look for. For more information, including how -// you specify the values for the AWS WAF API and the AWS CLI or SDKs, see -// TargetString in the ByteMatchTuple data type. -// -// * Where to look, such as at the beginning or the end of a query string. -// -// * Whether to perform any conversions on the request, such as converting -// it to lowercase, before inspecting it for the specified string. -// -// For example, you can add a ByteMatchSetUpdate object that matches web requests -// in which User-Agent headers contain the string BadBot. You can then configure -// AWS WAF to block those requests. -// -// To create and configure a ByteMatchSet, perform the following steps: -// -// Create a ByteMatchSet. For more information, see CreateByteMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateByteMatchSet request. -// -// Submit an UpdateByteMatchSet request to specify the part of the request that -// you want AWS WAF to inspect (for example, the header or the URI) and the -// value that you want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation UpdateByteMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateByteMatchSet -func (c *WAFRegional) UpdateByteMatchSet(input *waf.UpdateByteMatchSetInput) (*waf.UpdateByteMatchSetOutput, error) { - req, out := c.UpdateByteMatchSetRequest(input) - return out, req.Send() -} - -// UpdateByteMatchSetWithContext is the same as UpdateByteMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateByteMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) UpdateByteMatchSetWithContext(ctx aws.Context, input *waf.UpdateByteMatchSetInput, opts ...request.Option) (*waf.UpdateByteMatchSetOutput, error) { - req, out := c.UpdateByteMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateGeoMatchSet = "UpdateGeoMatchSet" - -// UpdateGeoMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateGeoMatchSet for more information on using the UpdateGeoMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateGeoMatchSetRequest method. -// req, resp := client.UpdateGeoMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateGeoMatchSet -func (c *WAFRegional) UpdateGeoMatchSetRequest(input *waf.UpdateGeoMatchSetInput) (req *request.Request, output *waf.UpdateGeoMatchSetOutput) { - op := &request.Operation{ - Name: opUpdateGeoMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.UpdateGeoMatchSetInput{} - } - - output = &waf.UpdateGeoMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateGeoMatchSet API operation for AWS WAF Regional. -// -// Inserts or deletes GeoMatchConstraint objects in an GeoMatchSet. For each -// GeoMatchConstraint object, you specify the following values: -// -// * Whether to insert or delete the object from the array. If you want to -// change an GeoMatchConstraint object, you delete the existing object and -// add a new one. -// -// * The Type. The only valid value for Type is Country. -// -// * The Value, which is a two character code for the country to add to the -// GeoMatchConstraint object. Valid codes are listed in GeoMatchConstraint$Value. -// -// To create and configure an GeoMatchSet, perform the following steps: -// -// Submit a CreateGeoMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateGeoMatchSet request. -// -// Submit an UpdateGeoMatchSet request to specify the country that you want -// AWS WAF to watch for. -// -// When you update an GeoMatchSet, you specify the country that you want to -// add and/or the country that you want to delete. If you want to change a country, -// you delete the existing country and add the new one. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation UpdateGeoMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateGeoMatchSet -func (c *WAFRegional) UpdateGeoMatchSet(input *waf.UpdateGeoMatchSetInput) (*waf.UpdateGeoMatchSetOutput, error) { - req, out := c.UpdateGeoMatchSetRequest(input) - return out, req.Send() -} - -// UpdateGeoMatchSetWithContext is the same as UpdateGeoMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateGeoMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) UpdateGeoMatchSetWithContext(ctx aws.Context, input *waf.UpdateGeoMatchSetInput, opts ...request.Option) (*waf.UpdateGeoMatchSetOutput, error) { - req, out := c.UpdateGeoMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateIPSet = "UpdateIPSet" - -// UpdateIPSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateIPSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateIPSet for more information on using the UpdateIPSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateIPSetRequest method. -// req, resp := client.UpdateIPSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateIPSet -func (c *WAFRegional) UpdateIPSetRequest(input *waf.UpdateIPSetInput) (req *request.Request, output *waf.UpdateIPSetOutput) { - op := &request.Operation{ - Name: opUpdateIPSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.UpdateIPSetInput{} - } - - output = &waf.UpdateIPSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateIPSet API operation for AWS WAF Regional. -// -// Inserts or deletes IPSetDescriptor objects in an IPSet. For each IPSetDescriptor -// object, you specify the following values: -// -// * Whether to insert or delete the object from the array. If you want to -// change an IPSetDescriptor object, you delete the existing object and add -// a new one. -// -// * The IP address version, IPv4 or IPv6. -// -// * The IP address in CIDR notation, for example, 192.0.2.0/24 (for the -// range of IP addresses from 192.0.2.0 to 192.0.2.255) or 192.0.2.44/32 -// (for the individual IP address 192.0.2.44). -// -// AWS WAF supports IPv4 address ranges: /8 and any range between /16 through -// /32. AWS WAF supports IPv6 address ranges: /16, /24, /32, /48, /56, /64, -// and /128. For more information about CIDR notation, see the Wikipedia entry -// Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). -// -// IPv6 addresses can be represented using any of the following formats: -// -// * 1111:0000:0000:0000:0000:0000:0000:0111/128 -// -// * 1111:0:0:0:0:0:0:0111/128 -// -// * 1111::0111/128 -// -// * 1111::111/128 -// -// You use an IPSet to specify which web requests you want to allow or block -// based on the IP addresses that the requests originated from. For example, -// if you're receiving a lot of requests from one or a small number of IP addresses -// and you want to block the requests, you can create an IPSet that specifies -// those IP addresses, and then configure AWS WAF to block the requests. -// -// To create and configure an IPSet, perform the following steps: -// -// Submit a CreateIPSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateIPSet request. -// -// Submit an UpdateIPSet request to specify the IP addresses that you want AWS -// WAF to watch for. -// -// When you update an IPSet, you specify the IP addresses that you want to add -// and/or the IP addresses that you want to delete. If you want to change an -// IP address, you delete the existing IP address and add the new one. -// -// You can insert a maximum of 1000 addresses in a single request. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation UpdateIPSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateIPSet -func (c *WAFRegional) UpdateIPSet(input *waf.UpdateIPSetInput) (*waf.UpdateIPSetOutput, error) { - req, out := c.UpdateIPSetRequest(input) - return out, req.Send() -} - -// UpdateIPSetWithContext is the same as UpdateIPSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateIPSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) UpdateIPSetWithContext(ctx aws.Context, input *waf.UpdateIPSetInput, opts ...request.Option) (*waf.UpdateIPSetOutput, error) { - req, out := c.UpdateIPSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRateBasedRule = "UpdateRateBasedRule" - -// UpdateRateBasedRuleRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRateBasedRule for more information on using the UpdateRateBasedRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRateBasedRuleRequest method. -// req, resp := client.UpdateRateBasedRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRateBasedRule -func (c *WAFRegional) UpdateRateBasedRuleRequest(input *waf.UpdateRateBasedRuleInput) (req *request.Request, output *waf.UpdateRateBasedRuleOutput) { - op := &request.Operation{ - Name: opUpdateRateBasedRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.UpdateRateBasedRuleInput{} - } - - output = &waf.UpdateRateBasedRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRateBasedRule API operation for AWS WAF Regional. -// -// Inserts or deletes Predicate objects in a rule and updates the RateLimit -// in the rule. -// -// Each Predicate object identifies a predicate, such as a ByteMatchSet or an -// IPSet, that specifies the web requests that you want to block or count. The -// RateLimit specifies the number of requests every five minutes that triggers -// the rule. -// -// If you add more than one predicate to a RateBasedRule, a request must match -// all the predicates and exceed the RateLimit to be counted or blocked. For -// example, suppose you add the following to a RateBasedRule: -// -// * An IPSet that matches the IP address 192.0.2.44/32 -// -// * A ByteMatchSet that matches BadBot in the User-Agent header -// -// Further, you specify a RateLimit of 15,000. -// -// You then add the RateBasedRule to a WebACL and specify that you want to block -// requests that satisfy the rule. For a request to be blocked, it must come -// from the IP address 192.0.2.44 and the User-Agent header in the request must -// contain the value BadBot. Further, requests that match these two conditions -// much be received at a rate of more than 15,000 every five minutes. If the -// rate drops below this limit, AWS WAF no longer blocks the requests. -// -// As a second example, suppose you want to limit requests to a particular page -// on your site. To do this, you could add the following to a RateBasedRule: -// -// * A ByteMatchSet with FieldToMatch of URI -// -// * A PositionalConstraint of STARTS_WITH -// -// * A TargetString of login -// -// Further, you specify a RateLimit of 15,000. -// -// By adding this RateBasedRule to a WebACL, you could limit requests to your -// login page without affecting the rest of your site. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation UpdateRateBasedRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRateBasedRule -func (c *WAFRegional) UpdateRateBasedRule(input *waf.UpdateRateBasedRuleInput) (*waf.UpdateRateBasedRuleOutput, error) { - req, out := c.UpdateRateBasedRuleRequest(input) - return out, req.Send() -} - -// UpdateRateBasedRuleWithContext is the same as UpdateRateBasedRule with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRateBasedRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) UpdateRateBasedRuleWithContext(ctx aws.Context, input *waf.UpdateRateBasedRuleInput, opts ...request.Option) (*waf.UpdateRateBasedRuleOutput, error) { - req, out := c.UpdateRateBasedRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRegexMatchSet = "UpdateRegexMatchSet" - -// UpdateRegexMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRegexMatchSet for more information on using the UpdateRegexMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRegexMatchSetRequest method. -// req, resp := client.UpdateRegexMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRegexMatchSet -func (c *WAFRegional) UpdateRegexMatchSetRequest(input *waf.UpdateRegexMatchSetInput) (req *request.Request, output *waf.UpdateRegexMatchSetOutput) { - op := &request.Operation{ - Name: opUpdateRegexMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.UpdateRegexMatchSetInput{} - } - - output = &waf.UpdateRegexMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRegexMatchSet API operation for AWS WAF Regional. -// -// Inserts or deletes RegexMatchTuple objects (filters) in a RegexMatchSet. -// For each RegexMatchSetUpdate object, you specify the following values: -// -// * Whether to insert or delete the object from the array. If you want to -// change a RegexMatchSetUpdate object, you delete the existing object and -// add a new one. -// -// * The part of a web request that you want AWS WAF to inspectupdate, such -// as a query string or the value of the User-Agent header. -// -// * The identifier of the pattern (a regular expression) that you want AWS -// WAF to look for. For more information, see RegexPatternSet. -// -// * Whether to perform any conversions on the request, such as converting -// it to lowercase, before inspecting it for the specified string. -// -// For example, you can create a RegexPatternSet that matches any requests with -// User-Agent headers that contain the string B[a@]dB[o0]t. You can then configure -// AWS WAF to reject those requests. -// -// To create and configure a RegexMatchSet, perform the following steps: -// -// Create a RegexMatchSet. For more information, see CreateRegexMatchSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRegexMatchSet request. -// -// Submit an UpdateRegexMatchSet request to specify the part of the request -// that you want AWS WAF to inspect (for example, the header or the URI) and -// the identifier of the RegexPatternSet that contain the regular expression -// patters you want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation UpdateRegexMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" -// The name specified is invalid. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRegexMatchSet -func (c *WAFRegional) UpdateRegexMatchSet(input *waf.UpdateRegexMatchSetInput) (*waf.UpdateRegexMatchSetOutput, error) { - req, out := c.UpdateRegexMatchSetRequest(input) - return out, req.Send() -} - -// UpdateRegexMatchSetWithContext is the same as UpdateRegexMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRegexMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) UpdateRegexMatchSetWithContext(ctx aws.Context, input *waf.UpdateRegexMatchSetInput, opts ...request.Option) (*waf.UpdateRegexMatchSetOutput, error) { - req, out := c.UpdateRegexMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRegexPatternSet = "UpdateRegexPatternSet" - -// UpdateRegexPatternSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRegexPatternSet for more information on using the UpdateRegexPatternSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRegexPatternSetRequest method. -// req, resp := client.UpdateRegexPatternSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRegexPatternSet -func (c *WAFRegional) UpdateRegexPatternSetRequest(input *waf.UpdateRegexPatternSetInput) (req *request.Request, output *waf.UpdateRegexPatternSetOutput) { - op := &request.Operation{ - Name: opUpdateRegexPatternSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.UpdateRegexPatternSetInput{} - } - - output = &waf.UpdateRegexPatternSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRegexPatternSet API operation for AWS WAF Regional. -// -// Inserts or deletes RegexPatternString objects in a RegexPatternSet. For each -// RegexPatternString object, you specify the following values: -// -// * Whether to insert or delete the RegexPatternString. -// -// * The regular expression pattern that you want to insert or delete. For -// more information, see RegexPatternSet. -// -// For example, you can create a RegexPatternString such as B[a@]dB[o0]t. AWS -// WAF will match this RegexPatternString to: -// -// * BadBot -// -// * BadB0t -// -// * B@dBot -// -// * B@dB0t -// -// To create and configure a RegexPatternSet, perform the following steps: -// -// Create a RegexPatternSet. For more information, see CreateRegexPatternSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRegexPatternSet request. -// -// Submit an UpdateRegexPatternSet request to specify the regular expression -// pattern that you want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation UpdateRegexPatternSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidRegexPatternException "WAFInvalidRegexPatternException" -// The regular expression (regex) you specified in RegexPatternString is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRegexPatternSet -func (c *WAFRegional) UpdateRegexPatternSet(input *waf.UpdateRegexPatternSetInput) (*waf.UpdateRegexPatternSetOutput, error) { - req, out := c.UpdateRegexPatternSetRequest(input) - return out, req.Send() -} - -// UpdateRegexPatternSetWithContext is the same as UpdateRegexPatternSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRegexPatternSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) UpdateRegexPatternSetWithContext(ctx aws.Context, input *waf.UpdateRegexPatternSetInput, opts ...request.Option) (*waf.UpdateRegexPatternSetOutput, error) { - req, out := c.UpdateRegexPatternSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRule = "UpdateRule" - -// UpdateRuleRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRule operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRule for more information on using the UpdateRule -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRuleRequest method. -// req, resp := client.UpdateRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRule -func (c *WAFRegional) UpdateRuleRequest(input *waf.UpdateRuleInput) (req *request.Request, output *waf.UpdateRuleOutput) { - op := &request.Operation{ - Name: opUpdateRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.UpdateRuleInput{} - } - - output = &waf.UpdateRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRule API operation for AWS WAF Regional. -// -// Inserts or deletes Predicate objects in a Rule. Each Predicate object identifies -// a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests -// that you want to allow, block, or count. If you add more than one predicate -// to a Rule, a request must match all of the specifications to be allowed, -// blocked, or counted. For example, suppose that you add the following to a -// Rule: -// -// * A ByteMatchSet that matches the value BadBot in the User-Agent header -// -// * An IPSet that matches the IP address 192.0.2.44 -// -// You then add the Rule to a WebACL and specify that you want to block requests -// that satisfy the Rule. For a request to be blocked, the User-Agent header -// in the request must contain the value BadBotand the request must originate -// from the IP address 192.0.2.44. -// -// To create and configure a Rule, perform the following steps: -// -// Create and update the predicates that you want to include in the Rule. -// -// Create the Rule. See CreateRule. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRule request. -// -// Submit an UpdateRule request to add predicates to the Rule. -// -// Create and update a WebACL that contains the Rule. See CreateWebACL. -// -// If you want to replace one ByteMatchSet or IPSet with another, you delete -// the existing one and add the new one. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation UpdateRule for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRule -func (c *WAFRegional) UpdateRule(input *waf.UpdateRuleInput) (*waf.UpdateRuleOutput, error) { - req, out := c.UpdateRuleRequest(input) - return out, req.Send() -} - -// UpdateRuleWithContext is the same as UpdateRule with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRule for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) UpdateRuleWithContext(ctx aws.Context, input *waf.UpdateRuleInput, opts ...request.Option) (*waf.UpdateRuleOutput, error) { - req, out := c.UpdateRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRuleGroup = "UpdateRuleGroup" - -// UpdateRuleGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRuleGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRuleGroup for more information on using the UpdateRuleGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRuleGroupRequest method. -// req, resp := client.UpdateRuleGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRuleGroup -func (c *WAFRegional) UpdateRuleGroupRequest(input *waf.UpdateRuleGroupInput) (req *request.Request, output *waf.UpdateRuleGroupOutput) { - op := &request.Operation{ - Name: opUpdateRuleGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.UpdateRuleGroupInput{} - } - - output = &waf.UpdateRuleGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRuleGroup API operation for AWS WAF Regional. -// -// Inserts or deletes ActivatedRule objects in a RuleGroup. -// -// You can only insert REGULAR rules into a rule group. -// -// You can have a maximum of ten rules per rule group. -// -// To create and configure a RuleGroup, perform the following steps: -// -// Create and update the Rules that you want to include in the RuleGroup. See -// CreateRule. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateRuleGroup request. -// -// Submit an UpdateRuleGroup request to add Rules to the RuleGroup. -// -// Create and update a WebACL that contains the RuleGroup. See CreateWebACL. -// -// If you want to replace one Rule with another, you delete the existing one -// and add the new one. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation UpdateRuleGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRuleGroup -func (c *WAFRegional) UpdateRuleGroup(input *waf.UpdateRuleGroupInput) (*waf.UpdateRuleGroupOutput, error) { - req, out := c.UpdateRuleGroupRequest(input) - return out, req.Send() -} - -// UpdateRuleGroupWithContext is the same as UpdateRuleGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRuleGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) UpdateRuleGroupWithContext(ctx aws.Context, input *waf.UpdateRuleGroupInput, opts ...request.Option) (*waf.UpdateRuleGroupOutput, error) { - req, out := c.UpdateRuleGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSizeConstraintSet = "UpdateSizeConstraintSet" - -// UpdateSizeConstraintSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSizeConstraintSet for more information on using the UpdateSizeConstraintSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSizeConstraintSetRequest method. -// req, resp := client.UpdateSizeConstraintSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateSizeConstraintSet -func (c *WAFRegional) UpdateSizeConstraintSetRequest(input *waf.UpdateSizeConstraintSetInput) (req *request.Request, output *waf.UpdateSizeConstraintSetOutput) { - op := &request.Operation{ - Name: opUpdateSizeConstraintSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.UpdateSizeConstraintSetInput{} - } - - output = &waf.UpdateSizeConstraintSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSizeConstraintSet API operation for AWS WAF Regional. -// -// Inserts or deletes SizeConstraint objects (filters) in a SizeConstraintSet. -// For each SizeConstraint object, you specify the following values: -// -// * Whether to insert or delete the object from the array. If you want to -// change a SizeConstraintSetUpdate object, you delete the existing object -// and add a new one. -// -// * The part of a web request that you want AWS WAF to evaluate, such as -// the length of a query string or the length of the User-Agent header. -// -// * Whether to perform any transformations on the request, such as converting -// it to lowercase, before checking its length. Note that transformations -// of the request body are not supported because the AWS resource forwards -// only the first 8192 bytes of your request to AWS WAF. -// -// You can only specify a single type of TextTransformation. -// -// * A ComparisonOperator used for evaluating the selected part of the request -// against the specified Size, such as equals, greater than, less than, and -// so on. -// -// * The length, in bytes, that you want AWS WAF to watch for in selected -// part of the request. The length is computed after applying the transformation. -// -// For example, you can add a SizeConstraintSetUpdate object that matches web -// requests in which the length of the User-Agent header is greater than 100 -// bytes. You can then configure AWS WAF to block those requests. -// -// To create and configure a SizeConstraintSet, perform the following steps: -// -// Create a SizeConstraintSet. For more information, see CreateSizeConstraintSet. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateSizeConstraintSet request. -// -// Submit an UpdateSizeConstraintSet request to specify the part of the request -// that you want AWS WAF to inspect (for example, the header or the URI) and -// the value that you want AWS WAF to watch for. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation UpdateSizeConstraintSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateSizeConstraintSet -func (c *WAFRegional) UpdateSizeConstraintSet(input *waf.UpdateSizeConstraintSetInput) (*waf.UpdateSizeConstraintSetOutput, error) { - req, out := c.UpdateSizeConstraintSetRequest(input) - return out, req.Send() -} - -// UpdateSizeConstraintSetWithContext is the same as UpdateSizeConstraintSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSizeConstraintSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) UpdateSizeConstraintSetWithContext(ctx aws.Context, input *waf.UpdateSizeConstraintSetInput, opts ...request.Option) (*waf.UpdateSizeConstraintSetOutput, error) { - req, out := c.UpdateSizeConstraintSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSqlInjectionMatchSet = "UpdateSqlInjectionMatchSet" - -// UpdateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSqlInjectionMatchSet for more information on using the UpdateSqlInjectionMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateSqlInjectionMatchSetRequest method. -// req, resp := client.UpdateSqlInjectionMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateSqlInjectionMatchSet -func (c *WAFRegional) UpdateSqlInjectionMatchSetRequest(input *waf.UpdateSqlInjectionMatchSetInput) (req *request.Request, output *waf.UpdateSqlInjectionMatchSetOutput) { - op := &request.Operation{ - Name: opUpdateSqlInjectionMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.UpdateSqlInjectionMatchSetInput{} - } - - output = &waf.UpdateSqlInjectionMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSqlInjectionMatchSet API operation for AWS WAF Regional. -// -// Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet. -// For each SqlInjectionMatchTuple object, you specify the following values: -// -// * Action: Whether to insert the object into or delete the object from -// the array. To change a SqlInjectionMatchTuple, you delete the existing -// object and add a new one. -// -// * FieldToMatch: The part of web requests that you want AWS WAF to inspect -// and, if you want AWS WAF to inspect a header or custom query parameter, -// the name of the header or parameter. -// -// * TextTransformation: Which text transformation, if any, to perform on -// the web request before inspecting the request for snippets of malicious -// SQL code. -// -// You can only specify a single type of TextTransformation. -// -// You use SqlInjectionMatchSet objects to specify which CloudFront requests -// that you want to allow, block, or count. For example, if you're receiving -// requests that contain snippets of SQL code in the query string and you want -// to block the requests, you can create a SqlInjectionMatchSet with the applicable -// settings, and then configure AWS WAF to block the requests. -// -// To create and configure a SqlInjectionMatchSet, perform the following steps: -// -// Submit a CreateSqlInjectionMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateIPSet request. -// -// Submit an UpdateSqlInjectionMatchSet request to specify the parts of web -// requests that you want AWS WAF to inspect for snippets of SQL code. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation UpdateSqlInjectionMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateSqlInjectionMatchSet -func (c *WAFRegional) UpdateSqlInjectionMatchSet(input *waf.UpdateSqlInjectionMatchSetInput) (*waf.UpdateSqlInjectionMatchSetOutput, error) { - req, out := c.UpdateSqlInjectionMatchSetRequest(input) - return out, req.Send() -} - -// UpdateSqlInjectionMatchSetWithContext is the same as UpdateSqlInjectionMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSqlInjectionMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) UpdateSqlInjectionMatchSetWithContext(ctx aws.Context, input *waf.UpdateSqlInjectionMatchSetInput, opts ...request.Option) (*waf.UpdateSqlInjectionMatchSetOutput, error) { - req, out := c.UpdateSqlInjectionMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateWebACL = "UpdateWebACL" - -// UpdateWebACLRequest generates a "aws/request.Request" representing the -// client's request for the UpdateWebACL operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateWebACL for more information on using the UpdateWebACL -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateWebACLRequest method. -// req, resp := client.UpdateWebACLRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateWebACL -func (c *WAFRegional) UpdateWebACLRequest(input *waf.UpdateWebACLInput) (req *request.Request, output *waf.UpdateWebACLOutput) { - op := &request.Operation{ - Name: opUpdateWebACL, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.UpdateWebACLInput{} - } - - output = &waf.UpdateWebACLOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateWebACL API operation for AWS WAF Regional. -// -// Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies -// web requests that you want to allow, block, or count. When you update a WebACL, -// you specify the following values: -// -// * A default action for the WebACL, either ALLOW or BLOCK. AWS WAF performs -// the default action if a request doesn't match the criteria in any of the -// Rules in a WebACL. -// -// * The Rules that you want to add or delete. If you want to replace one -// Rule with another, you delete the existing Rule and add the new one. -// -// * For each Rule, whether you want AWS WAF to allow requests, block requests, -// or count requests that match the conditions in the Rule. -// -// * The order in which you want AWS WAF to evaluate the Rules in a WebACL. -// If you add more than one Rule to a WebACL, AWS WAF evaluates each request -// against the Rules in order based on the value of Priority. (The Rule that -// has the lowest value for Priority is evaluated first.) When a web request -// matches all the predicates (such as ByteMatchSets and IPSets) in a Rule, -// AWS WAF immediately takes the corresponding action, allow or block, and -// doesn't evaluate the request against the remaining Rules in the WebACL, -// if any. -// -// To create and configure a WebACL, perform the following steps: -// -// Create and update the predicates that you want to include in Rules. For more -// information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, -// CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet. -// -// Create and update the Rules that you want to include in the WebACL. For more -// information, see CreateRule and UpdateRule. -// -// Create a WebACL. See CreateWebACL. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateWebACL request. -// -// Submit an UpdateWebACL request to specify the Rules that you want to include -// in the WebACL, to specify the default action, and to associate the WebACL -// with a CloudFront distribution. -// -// The ActivatedRule can be a rule group. If you specify a rule group as your -// ActivatedRule, you can exclude specific rules from that rule group. -// -// If you already have a rule group associated with a web ACL and want to submit -// an UpdateWebACL request to exclude certain rules from that rule group, you -// must first remove the rule group from the web ACL, the re-insert it again, -// specifying the excluded rules. For details, see ActivatedRule$ExcludedRules. -// -// Be aware that if you try to add a RATE_BASED rule to a web ACL without setting -// the rule type when first creating the rule, the UpdateWebACL request will -// fail because the request tries to add a REGULAR rule (the default rule type) -// with the specified ID, which does not exist. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation UpdateWebACL for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" -// The operation failed because you tried to delete an object that is still -// in use. For example: -// -// * You tried to delete a ByteMatchSet that is still referenced by a Rule. -// -// * You tried to delete a Rule that is still referenced by a WebACL. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// * ErrCodeWAFSubscriptionNotFoundException "WAFSubscriptionNotFoundException" -// The specified subscription does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateWebACL -func (c *WAFRegional) UpdateWebACL(input *waf.UpdateWebACLInput) (*waf.UpdateWebACLOutput, error) { - req, out := c.UpdateWebACLRequest(input) - return out, req.Send() -} - -// UpdateWebACLWithContext is the same as UpdateWebACL with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateWebACL for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) UpdateWebACLWithContext(ctx aws.Context, input *waf.UpdateWebACLInput, opts ...request.Option) (*waf.UpdateWebACLOutput, error) { - req, out := c.UpdateWebACLRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateXssMatchSet = "UpdateXssMatchSet" - -// UpdateXssMatchSetRequest generates a "aws/request.Request" representing the -// client's request for the UpdateXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateXssMatchSet for more information on using the UpdateXssMatchSet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateXssMatchSetRequest method. -// req, resp := client.UpdateXssMatchSetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateXssMatchSet -func (c *WAFRegional) UpdateXssMatchSetRequest(input *waf.UpdateXssMatchSetInput) (req *request.Request, output *waf.UpdateXssMatchSetOutput) { - op := &request.Operation{ - Name: opUpdateXssMatchSet, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &waf.UpdateXssMatchSetInput{} - } - - output = &waf.UpdateXssMatchSetOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateXssMatchSet API operation for AWS WAF Regional. -// -// Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. For -// each XssMatchTuple object, you specify the following values: -// -// * Action: Whether to insert the object into or delete the object from -// the array. To change an XssMatchTuple, you delete the existing object -// and add a new one. -// -// * FieldToMatch: The part of web requests that you want AWS WAF to inspect -// and, if you want AWS WAF to inspect a header or custom query parameter, -// the name of the header or parameter. -// -// * TextTransformation: Which text transformation, if any, to perform on -// the web request before inspecting the request for cross-site scripting -// attacks. -// -// You can only specify a single type of TextTransformation. -// -// You use XssMatchSet objects to specify which CloudFront requests that you -// want to allow, block, or count. For example, if you're receiving requests -// that contain cross-site scripting attacks in the request body and you want -// to block the requests, you can create an XssMatchSet with the applicable -// settings, and then configure AWS WAF to block the requests. -// -// To create and configure an XssMatchSet, perform the following steps: -// -// Submit a CreateXssMatchSet request. -// -// Use GetChangeToken to get the change token that you provide in the ChangeToken -// parameter of an UpdateIPSet request. -// -// Submit an UpdateXssMatchSet request to specify the parts of web requests -// that you want AWS WAF to inspect for cross-site scripting attacks. -// -// For more information about how to use the AWS WAF API to allow or block HTTP -// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS WAF Regional's -// API operation UpdateXssMatchSet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" -// The operation failed because of a system problem, even though the request -// was valid. Retry your request. -// -// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" -// The operation failed because you tried to create, update, or delete an object -// by using an invalid account identifier. -// -// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" -// The operation failed because there was nothing to do. For example: -// -// * You tried to remove a Rule from a WebACL, but the Rule isn't in the -// specified WebACL. -// -// * You tried to remove an IP address from an IPSet, but the IP address -// isn't in the specified IPSet. -// -// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple -// isn't in the specified WebACL. -// -// * You tried to add a Rule to a WebACL, but the Rule already exists in -// the specified WebACL. -// -// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple -// already exists in the specified WebACL. -// -// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" -// The operation failed because AWS WAF didn't recognize a parameter in the -// request. For example: -// -// * You specified an invalid parameter name. -// -// * You specified an invalid value. -// -// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) -// using an action other than INSERT or DELETE. -// -// * You tried to create a WebACL with a DefaultActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to create a RateBasedRule with a RateKey value other than -// IP. -// -// * You tried to update a WebACL with a WafActionType other than ALLOW, -// BLOCK, or COUNT. -// -// * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, METHOD, QUERY_STRING, URI, or BODY. -// -// * You tried to update a ByteMatchSet with a Field of HEADER but no value -// for Data. -// -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a web ACL cannot be associated. -// -// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" -// The operation failed because you tried to add an object to or delete an object -// from another object that doesn't exist. For example: -// -// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't -// exist. -// -// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule -// that doesn't exist. -// -// * You tried to add an IP address to or delete an IP address from an IPSet -// that doesn't exist. -// -// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from -// a ByteMatchSet that doesn't exist. -// -// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" -// The operation failed because the referenced object doesn't exist. -// -// * ErrCodeWAFStaleDataException "WAFStaleDataException" -// The operation failed because you tried to create, update, or delete an object -// by using a change token that has already been used. -// -// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" -// The operation exceeds a resource limit, for example, the maximum number of -// WebACL objects that you can create for an AWS account. For more information, -// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) -// in the AWS WAF Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateXssMatchSet -func (c *WAFRegional) UpdateXssMatchSet(input *waf.UpdateXssMatchSetInput) (*waf.UpdateXssMatchSetOutput, error) { - req, out := c.UpdateXssMatchSetRequest(input) - return out, req.Send() -} - -// UpdateXssMatchSetWithContext is the same as UpdateXssMatchSet with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateXssMatchSet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WAFRegional) UpdateXssMatchSetWithContext(ctx aws.Context, input *waf.UpdateXssMatchSetInput, opts ...request.Option) (*waf.UpdateXssMatchSetOutput, error) { - req, out := c.UpdateXssMatchSetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AssociateWebACLInput struct { - _ struct{} `type:"structure"` - - // The ARN (Amazon Resource Name) of the resource to be protected, either an - // application load balancer or Amazon API Gateway stage. - // - // The ARN should be in one of the following formats: - // - // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id - // - // * For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name - // - // ResourceArn is a required field - ResourceArn *string `min:"1" type:"string" required:"true"` - - // A unique identifier (ID) for the web ACL. - // - // WebACLId is a required field - WebACLId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateWebACLInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateWebACLInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateWebACLInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateWebACLInput"} - 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.WebACLId == nil { - invalidParams.Add(request.NewErrParamRequired("WebACLId")) - } - if s.WebACLId != nil && len(*s.WebACLId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *AssociateWebACLInput) SetResourceArn(v string) *AssociateWebACLInput { - s.ResourceArn = &v - return s -} - -// SetWebACLId sets the WebACLId field's value. -func (s *AssociateWebACLInput) SetWebACLId(v string) *AssociateWebACLInput { - s.WebACLId = &v - return s -} - -type AssociateWebACLOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssociateWebACLOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateWebACLOutput) GoString() string { - return s.String() -} - -type DisassociateWebACLInput struct { - _ struct{} `type:"structure"` - - // The ARN (Amazon Resource Name) of the resource from which the web ACL is - // being removed, either an application load balancer or Amazon API Gateway - // stage. - // - // The ARN should be in one of the following formats: - // - // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id - // - // * For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name - // - // ResourceArn is a required field - ResourceArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateWebACLInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateWebACLInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateWebACLInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateWebACLInput"} - 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 *DisassociateWebACLInput) SetResourceArn(v string) *DisassociateWebACLInput { - s.ResourceArn = &v - return s -} - -type DisassociateWebACLOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateWebACLOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateWebACLOutput) GoString() string { - return s.String() -} - -type GetWebACLForResourceInput struct { - _ struct{} `type:"structure"` - - // The ARN (Amazon Resource Name) of the resource for which to get the web ACL, - // either an application load balancer or Amazon API Gateway stage. - // - // The ARN should be in one of the following formats: - // - // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id - // - // * For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name - // - // ResourceArn is a required field - ResourceArn *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetWebACLForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetWebACLForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetWebACLForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetWebACLForResourceInput"} - 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 *GetWebACLForResourceInput) SetResourceArn(v string) *GetWebACLForResourceInput { - s.ResourceArn = &v - return s -} - -type GetWebACLForResourceOutput struct { - _ struct{} `type:"structure"` - - // Information about the web ACL that you specified in the GetWebACLForResource - // request. If there is no associated resource, a null WebACLSummary is returned. - WebACLSummary *waf.WebACLSummary `type:"structure"` -} - -// String returns the string representation -func (s GetWebACLForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetWebACLForResourceOutput) GoString() string { - return s.String() -} - -// SetWebACLSummary sets the WebACLSummary field's value. -func (s *GetWebACLForResourceOutput) SetWebACLSummary(v *waf.WebACLSummary) *GetWebACLForResourceOutput { - s.WebACLSummary = v - return s -} - -type ListResourcesForWebACLInput struct { - _ struct{} `type:"structure"` - - // The type of resource to list, either an application load balancer or Amazon - // API Gateway. - ResourceType *string `type:"string" enum:"ResourceType"` - - // The unique identifier (ID) of the web ACL for which to list the associated - // resources. - // - // WebACLId is a required field - WebACLId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ListResourcesForWebACLInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourcesForWebACLInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResourcesForWebACLInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResourcesForWebACLInput"} - if s.WebACLId == nil { - invalidParams.Add(request.NewErrParamRequired("WebACLId")) - } - if s.WebACLId != nil && len(*s.WebACLId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceType sets the ResourceType field's value. -func (s *ListResourcesForWebACLInput) SetResourceType(v string) *ListResourcesForWebACLInput { - s.ResourceType = &v - return s -} - -// SetWebACLId sets the WebACLId field's value. -func (s *ListResourcesForWebACLInput) SetWebACLId(v string) *ListResourcesForWebACLInput { - s.WebACLId = &v - return s -} - -type ListResourcesForWebACLOutput struct { - _ struct{} `type:"structure"` - - // An array of ARNs (Amazon Resource Names) of the resources associated with - // the specified web ACL. An array with zero elements is returned if there are - // no resources associated with the web ACL. - ResourceArns []*string `type:"list"` -} - -// String returns the string representation -func (s ListResourcesForWebACLOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListResourcesForWebACLOutput) GoString() string { - return s.String() -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *ListResourcesForWebACLOutput) SetResourceArns(v []*string) *ListResourcesForWebACLOutput { - s.ResourceArns = v - return s -} - -const ( - // ChangeActionInsert is a ChangeAction enum value - ChangeActionInsert = "INSERT" - - // ChangeActionDelete is a ChangeAction enum value - ChangeActionDelete = "DELETE" -) - -const ( - // ChangeTokenStatusProvisioned is a ChangeTokenStatus enum value - ChangeTokenStatusProvisioned = "PROVISIONED" - - // ChangeTokenStatusPending is a ChangeTokenStatus enum value - ChangeTokenStatusPending = "PENDING" - - // ChangeTokenStatusInsync is a ChangeTokenStatus enum value - ChangeTokenStatusInsync = "INSYNC" -) - -const ( - // ComparisonOperatorEq is a ComparisonOperator enum value - ComparisonOperatorEq = "EQ" - - // ComparisonOperatorNe is a ComparisonOperator enum value - ComparisonOperatorNe = "NE" - - // ComparisonOperatorLe is a ComparisonOperator enum value - ComparisonOperatorLe = "LE" - - // ComparisonOperatorLt is a ComparisonOperator enum value - ComparisonOperatorLt = "LT" - - // ComparisonOperatorGe is a ComparisonOperator enum value - ComparisonOperatorGe = "GE" - - // ComparisonOperatorGt is a ComparisonOperator enum value - ComparisonOperatorGt = "GT" -) - -const ( - // GeoMatchConstraintTypeCountry is a GeoMatchConstraintType enum value - GeoMatchConstraintTypeCountry = "Country" -) - -const ( - // GeoMatchConstraintValueAf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAf = "AF" - - // GeoMatchConstraintValueAx is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAx = "AX" - - // GeoMatchConstraintValueAl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAl = "AL" - - // GeoMatchConstraintValueDz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueDz = "DZ" - - // GeoMatchConstraintValueAs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAs = "AS" - - // GeoMatchConstraintValueAd is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAd = "AD" - - // GeoMatchConstraintValueAo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAo = "AO" - - // GeoMatchConstraintValueAi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAi = "AI" - - // GeoMatchConstraintValueAq is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAq = "AQ" - - // GeoMatchConstraintValueAg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAg = "AG" - - // GeoMatchConstraintValueAr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAr = "AR" - - // GeoMatchConstraintValueAm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAm = "AM" - - // GeoMatchConstraintValueAw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAw = "AW" - - // GeoMatchConstraintValueAu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAu = "AU" - - // GeoMatchConstraintValueAt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAt = "AT" - - // GeoMatchConstraintValueAz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAz = "AZ" - - // GeoMatchConstraintValueBs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBs = "BS" - - // GeoMatchConstraintValueBh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBh = "BH" - - // GeoMatchConstraintValueBd is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBd = "BD" - - // GeoMatchConstraintValueBb is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBb = "BB" - - // GeoMatchConstraintValueBy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBy = "BY" - - // GeoMatchConstraintValueBe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBe = "BE" - - // GeoMatchConstraintValueBz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBz = "BZ" - - // GeoMatchConstraintValueBj is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBj = "BJ" - - // GeoMatchConstraintValueBm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBm = "BM" - - // GeoMatchConstraintValueBt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBt = "BT" - - // GeoMatchConstraintValueBo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBo = "BO" - - // GeoMatchConstraintValueBq is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBq = "BQ" - - // GeoMatchConstraintValueBa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBa = "BA" - - // GeoMatchConstraintValueBw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBw = "BW" - - // GeoMatchConstraintValueBv is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBv = "BV" - - // GeoMatchConstraintValueBr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBr = "BR" - - // GeoMatchConstraintValueIo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIo = "IO" - - // GeoMatchConstraintValueBn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBn = "BN" - - // GeoMatchConstraintValueBg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBg = "BG" - - // GeoMatchConstraintValueBf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBf = "BF" - - // GeoMatchConstraintValueBi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBi = "BI" - - // GeoMatchConstraintValueKh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKh = "KH" - - // GeoMatchConstraintValueCm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCm = "CM" - - // GeoMatchConstraintValueCa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCa = "CA" - - // GeoMatchConstraintValueCv is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCv = "CV" - - // GeoMatchConstraintValueKy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKy = "KY" - - // GeoMatchConstraintValueCf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCf = "CF" - - // GeoMatchConstraintValueTd is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTd = "TD" - - // GeoMatchConstraintValueCl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCl = "CL" - - // GeoMatchConstraintValueCn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCn = "CN" - - // GeoMatchConstraintValueCx is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCx = "CX" - - // GeoMatchConstraintValueCc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCc = "CC" - - // GeoMatchConstraintValueCo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCo = "CO" - - // GeoMatchConstraintValueKm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKm = "KM" - - // GeoMatchConstraintValueCg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCg = "CG" - - // GeoMatchConstraintValueCd is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCd = "CD" - - // GeoMatchConstraintValueCk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCk = "CK" - - // GeoMatchConstraintValueCr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCr = "CR" - - // GeoMatchConstraintValueCi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCi = "CI" - - // GeoMatchConstraintValueHr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueHr = "HR" - - // GeoMatchConstraintValueCu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCu = "CU" - - // GeoMatchConstraintValueCw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCw = "CW" - - // GeoMatchConstraintValueCy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCy = "CY" - - // GeoMatchConstraintValueCz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCz = "CZ" - - // GeoMatchConstraintValueDk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueDk = "DK" - - // GeoMatchConstraintValueDj is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueDj = "DJ" - - // GeoMatchConstraintValueDm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueDm = "DM" - - // GeoMatchConstraintValueDo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueDo = "DO" - - // GeoMatchConstraintValueEc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueEc = "EC" - - // GeoMatchConstraintValueEg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueEg = "EG" - - // GeoMatchConstraintValueSv is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSv = "SV" - - // GeoMatchConstraintValueGq is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGq = "GQ" - - // GeoMatchConstraintValueEr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueEr = "ER" - - // GeoMatchConstraintValueEe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueEe = "EE" - - // GeoMatchConstraintValueEt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueEt = "ET" - - // GeoMatchConstraintValueFk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueFk = "FK" - - // GeoMatchConstraintValueFo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueFo = "FO" - - // GeoMatchConstraintValueFj is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueFj = "FJ" - - // GeoMatchConstraintValueFi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueFi = "FI" - - // GeoMatchConstraintValueFr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueFr = "FR" - - // GeoMatchConstraintValueGf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGf = "GF" - - // GeoMatchConstraintValuePf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePf = "PF" - - // GeoMatchConstraintValueTf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTf = "TF" - - // GeoMatchConstraintValueGa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGa = "GA" - - // GeoMatchConstraintValueGm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGm = "GM" - - // GeoMatchConstraintValueGe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGe = "GE" - - // GeoMatchConstraintValueDe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueDe = "DE" - - // GeoMatchConstraintValueGh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGh = "GH" - - // GeoMatchConstraintValueGi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGi = "GI" - - // GeoMatchConstraintValueGr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGr = "GR" - - // GeoMatchConstraintValueGl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGl = "GL" - - // GeoMatchConstraintValueGd is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGd = "GD" - - // GeoMatchConstraintValueGp is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGp = "GP" - - // GeoMatchConstraintValueGu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGu = "GU" - - // GeoMatchConstraintValueGt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGt = "GT" - - // GeoMatchConstraintValueGg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGg = "GG" - - // GeoMatchConstraintValueGn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGn = "GN" - - // GeoMatchConstraintValueGw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGw = "GW" - - // GeoMatchConstraintValueGy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGy = "GY" - - // GeoMatchConstraintValueHt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueHt = "HT" - - // GeoMatchConstraintValueHm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueHm = "HM" - - // GeoMatchConstraintValueVa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueVa = "VA" - - // GeoMatchConstraintValueHn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueHn = "HN" - - // GeoMatchConstraintValueHk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueHk = "HK" - - // GeoMatchConstraintValueHu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueHu = "HU" - - // GeoMatchConstraintValueIs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIs = "IS" - - // GeoMatchConstraintValueIn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIn = "IN" - - // GeoMatchConstraintValueId is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueId = "ID" - - // GeoMatchConstraintValueIr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIr = "IR" - - // GeoMatchConstraintValueIq is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIq = "IQ" - - // GeoMatchConstraintValueIe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIe = "IE" - - // GeoMatchConstraintValueIm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIm = "IM" - - // GeoMatchConstraintValueIl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIl = "IL" - - // GeoMatchConstraintValueIt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueIt = "IT" - - // GeoMatchConstraintValueJm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueJm = "JM" - - // GeoMatchConstraintValueJp is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueJp = "JP" - - // GeoMatchConstraintValueJe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueJe = "JE" - - // GeoMatchConstraintValueJo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueJo = "JO" - - // GeoMatchConstraintValueKz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKz = "KZ" - - // GeoMatchConstraintValueKe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKe = "KE" - - // GeoMatchConstraintValueKi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKi = "KI" - - // GeoMatchConstraintValueKp is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKp = "KP" - - // GeoMatchConstraintValueKr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKr = "KR" - - // GeoMatchConstraintValueKw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKw = "KW" - - // GeoMatchConstraintValueKg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKg = "KG" - - // GeoMatchConstraintValueLa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLa = "LA" - - // GeoMatchConstraintValueLv is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLv = "LV" - - // GeoMatchConstraintValueLb is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLb = "LB" - - // GeoMatchConstraintValueLs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLs = "LS" - - // GeoMatchConstraintValueLr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLr = "LR" - - // GeoMatchConstraintValueLy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLy = "LY" - - // GeoMatchConstraintValueLi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLi = "LI" - - // GeoMatchConstraintValueLt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLt = "LT" - - // GeoMatchConstraintValueLu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLu = "LU" - - // GeoMatchConstraintValueMo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMo = "MO" - - // GeoMatchConstraintValueMk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMk = "MK" - - // GeoMatchConstraintValueMg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMg = "MG" - - // GeoMatchConstraintValueMw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMw = "MW" - - // GeoMatchConstraintValueMy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMy = "MY" - - // GeoMatchConstraintValueMv is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMv = "MV" - - // GeoMatchConstraintValueMl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMl = "ML" - - // GeoMatchConstraintValueMt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMt = "MT" - - // GeoMatchConstraintValueMh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMh = "MH" - - // GeoMatchConstraintValueMq is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMq = "MQ" - - // GeoMatchConstraintValueMr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMr = "MR" - - // GeoMatchConstraintValueMu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMu = "MU" - - // GeoMatchConstraintValueYt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueYt = "YT" - - // GeoMatchConstraintValueMx is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMx = "MX" - - // GeoMatchConstraintValueFm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueFm = "FM" - - // GeoMatchConstraintValueMd is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMd = "MD" - - // GeoMatchConstraintValueMc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMc = "MC" - - // GeoMatchConstraintValueMn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMn = "MN" - - // GeoMatchConstraintValueMe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMe = "ME" - - // GeoMatchConstraintValueMs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMs = "MS" - - // GeoMatchConstraintValueMa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMa = "MA" - - // GeoMatchConstraintValueMz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMz = "MZ" - - // GeoMatchConstraintValueMm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMm = "MM" - - // GeoMatchConstraintValueNa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNa = "NA" - - // GeoMatchConstraintValueNr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNr = "NR" - - // GeoMatchConstraintValueNp is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNp = "NP" - - // GeoMatchConstraintValueNl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNl = "NL" - - // GeoMatchConstraintValueNc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNc = "NC" - - // GeoMatchConstraintValueNz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNz = "NZ" - - // GeoMatchConstraintValueNi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNi = "NI" - - // GeoMatchConstraintValueNe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNe = "NE" - - // GeoMatchConstraintValueNg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNg = "NG" - - // GeoMatchConstraintValueNu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNu = "NU" - - // GeoMatchConstraintValueNf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNf = "NF" - - // GeoMatchConstraintValueMp is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMp = "MP" - - // GeoMatchConstraintValueNo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueNo = "NO" - - // GeoMatchConstraintValueOm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueOm = "OM" - - // GeoMatchConstraintValuePk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePk = "PK" - - // GeoMatchConstraintValuePw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePw = "PW" - - // GeoMatchConstraintValuePs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePs = "PS" - - // GeoMatchConstraintValuePa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePa = "PA" - - // GeoMatchConstraintValuePg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePg = "PG" - - // GeoMatchConstraintValuePy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePy = "PY" - - // GeoMatchConstraintValuePe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePe = "PE" - - // GeoMatchConstraintValuePh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePh = "PH" - - // GeoMatchConstraintValuePn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePn = "PN" - - // GeoMatchConstraintValuePl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePl = "PL" - - // GeoMatchConstraintValuePt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePt = "PT" - - // GeoMatchConstraintValuePr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePr = "PR" - - // GeoMatchConstraintValueQa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueQa = "QA" - - // GeoMatchConstraintValueRe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueRe = "RE" - - // GeoMatchConstraintValueRo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueRo = "RO" - - // GeoMatchConstraintValueRu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueRu = "RU" - - // GeoMatchConstraintValueRw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueRw = "RW" - - // GeoMatchConstraintValueBl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueBl = "BL" - - // GeoMatchConstraintValueSh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSh = "SH" - - // GeoMatchConstraintValueKn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueKn = "KN" - - // GeoMatchConstraintValueLc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLc = "LC" - - // GeoMatchConstraintValueMf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueMf = "MF" - - // GeoMatchConstraintValuePm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValuePm = "PM" - - // GeoMatchConstraintValueVc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueVc = "VC" - - // GeoMatchConstraintValueWs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueWs = "WS" - - // GeoMatchConstraintValueSm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSm = "SM" - - // GeoMatchConstraintValueSt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSt = "ST" - - // GeoMatchConstraintValueSa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSa = "SA" - - // GeoMatchConstraintValueSn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSn = "SN" - - // GeoMatchConstraintValueRs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueRs = "RS" - - // GeoMatchConstraintValueSc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSc = "SC" - - // GeoMatchConstraintValueSl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSl = "SL" - - // GeoMatchConstraintValueSg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSg = "SG" - - // GeoMatchConstraintValueSx is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSx = "SX" - - // GeoMatchConstraintValueSk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSk = "SK" - - // GeoMatchConstraintValueSi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSi = "SI" - - // GeoMatchConstraintValueSb is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSb = "SB" - - // GeoMatchConstraintValueSo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSo = "SO" - - // GeoMatchConstraintValueZa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueZa = "ZA" - - // GeoMatchConstraintValueGs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGs = "GS" - - // GeoMatchConstraintValueSs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSs = "SS" - - // GeoMatchConstraintValueEs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueEs = "ES" - - // GeoMatchConstraintValueLk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueLk = "LK" - - // GeoMatchConstraintValueSd is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSd = "SD" - - // GeoMatchConstraintValueSr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSr = "SR" - - // GeoMatchConstraintValueSj is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSj = "SJ" - - // GeoMatchConstraintValueSz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSz = "SZ" - - // GeoMatchConstraintValueSe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSe = "SE" - - // GeoMatchConstraintValueCh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueCh = "CH" - - // GeoMatchConstraintValueSy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueSy = "SY" - - // GeoMatchConstraintValueTw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTw = "TW" - - // GeoMatchConstraintValueTj is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTj = "TJ" - - // GeoMatchConstraintValueTz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTz = "TZ" - - // GeoMatchConstraintValueTh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTh = "TH" - - // GeoMatchConstraintValueTl is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTl = "TL" - - // GeoMatchConstraintValueTg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTg = "TG" - - // GeoMatchConstraintValueTk is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTk = "TK" - - // GeoMatchConstraintValueTo is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTo = "TO" - - // GeoMatchConstraintValueTt is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTt = "TT" - - // GeoMatchConstraintValueTn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTn = "TN" - - // GeoMatchConstraintValueTr is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTr = "TR" - - // GeoMatchConstraintValueTm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTm = "TM" - - // GeoMatchConstraintValueTc is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTc = "TC" - - // GeoMatchConstraintValueTv is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueTv = "TV" - - // GeoMatchConstraintValueUg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueUg = "UG" - - // GeoMatchConstraintValueUa is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueUa = "UA" - - // GeoMatchConstraintValueAe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueAe = "AE" - - // GeoMatchConstraintValueGb is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueGb = "GB" - - // GeoMatchConstraintValueUs is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueUs = "US" - - // GeoMatchConstraintValueUm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueUm = "UM" - - // GeoMatchConstraintValueUy is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueUy = "UY" - - // GeoMatchConstraintValueUz is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueUz = "UZ" - - // GeoMatchConstraintValueVu is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueVu = "VU" - - // GeoMatchConstraintValueVe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueVe = "VE" - - // GeoMatchConstraintValueVn is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueVn = "VN" - - // GeoMatchConstraintValueVg is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueVg = "VG" - - // GeoMatchConstraintValueVi is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueVi = "VI" - - // GeoMatchConstraintValueWf is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueWf = "WF" - - // GeoMatchConstraintValueEh is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueEh = "EH" - - // GeoMatchConstraintValueYe is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueYe = "YE" - - // GeoMatchConstraintValueZm is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueZm = "ZM" - - // GeoMatchConstraintValueZw is a GeoMatchConstraintValue enum value - GeoMatchConstraintValueZw = "ZW" -) - -const ( - // IPSetDescriptorTypeIpv4 is a IPSetDescriptorType enum value - IPSetDescriptorTypeIpv4 = "IPV4" - - // IPSetDescriptorTypeIpv6 is a IPSetDescriptorType enum value - IPSetDescriptorTypeIpv6 = "IPV6" -) - -const ( - // MatchFieldTypeUri is a MatchFieldType enum value - MatchFieldTypeUri = "URI" - - // MatchFieldTypeQueryString is a MatchFieldType enum value - MatchFieldTypeQueryString = "QUERY_STRING" - - // MatchFieldTypeHeader is a MatchFieldType enum value - MatchFieldTypeHeader = "HEADER" - - // MatchFieldTypeMethod is a MatchFieldType enum value - MatchFieldTypeMethod = "METHOD" - - // MatchFieldTypeBody is a MatchFieldType enum value - MatchFieldTypeBody = "BODY" - - // MatchFieldTypeSingleQueryArg is a MatchFieldType enum value - MatchFieldTypeSingleQueryArg = "SINGLE_QUERY_ARG" - - // MatchFieldTypeAllQueryArgs is a MatchFieldType enum value - MatchFieldTypeAllQueryArgs = "ALL_QUERY_ARGS" -) - -const ( - // ParameterExceptionFieldChangeAction is a ParameterExceptionField enum value - ParameterExceptionFieldChangeAction = "CHANGE_ACTION" - - // ParameterExceptionFieldWafAction is a ParameterExceptionField enum value - ParameterExceptionFieldWafAction = "WAF_ACTION" - - // ParameterExceptionFieldWafOverrideAction is a ParameterExceptionField enum value - ParameterExceptionFieldWafOverrideAction = "WAF_OVERRIDE_ACTION" - - // ParameterExceptionFieldPredicateType is a ParameterExceptionField enum value - ParameterExceptionFieldPredicateType = "PREDICATE_TYPE" - - // ParameterExceptionFieldIpsetType is a ParameterExceptionField enum value - ParameterExceptionFieldIpsetType = "IPSET_TYPE" - - // ParameterExceptionFieldByteMatchFieldType is a ParameterExceptionField enum value - ParameterExceptionFieldByteMatchFieldType = "BYTE_MATCH_FIELD_TYPE" - - // ParameterExceptionFieldSqlInjectionMatchFieldType is a ParameterExceptionField enum value - ParameterExceptionFieldSqlInjectionMatchFieldType = "SQL_INJECTION_MATCH_FIELD_TYPE" - - // ParameterExceptionFieldByteMatchTextTransformation is a ParameterExceptionField enum value - ParameterExceptionFieldByteMatchTextTransformation = "BYTE_MATCH_TEXT_TRANSFORMATION" - - // ParameterExceptionFieldByteMatchPositionalConstraint is a ParameterExceptionField enum value - ParameterExceptionFieldByteMatchPositionalConstraint = "BYTE_MATCH_POSITIONAL_CONSTRAINT" - - // ParameterExceptionFieldSizeConstraintComparisonOperator is a ParameterExceptionField enum value - ParameterExceptionFieldSizeConstraintComparisonOperator = "SIZE_CONSTRAINT_COMPARISON_OPERATOR" - - // ParameterExceptionFieldGeoMatchLocationType is a ParameterExceptionField enum value - ParameterExceptionFieldGeoMatchLocationType = "GEO_MATCH_LOCATION_TYPE" - - // ParameterExceptionFieldGeoMatchLocationValue is a ParameterExceptionField enum value - ParameterExceptionFieldGeoMatchLocationValue = "GEO_MATCH_LOCATION_VALUE" - - // ParameterExceptionFieldRateKey is a ParameterExceptionField enum value - ParameterExceptionFieldRateKey = "RATE_KEY" - - // ParameterExceptionFieldRuleType is a ParameterExceptionField enum value - ParameterExceptionFieldRuleType = "RULE_TYPE" - - // ParameterExceptionFieldNextMarker is a ParameterExceptionField enum value - ParameterExceptionFieldNextMarker = "NEXT_MARKER" - - // ParameterExceptionFieldResourceArn is a ParameterExceptionField enum value - ParameterExceptionFieldResourceArn = "RESOURCE_ARN" -) - -const ( - // ParameterExceptionReasonInvalidOption is a ParameterExceptionReason enum value - ParameterExceptionReasonInvalidOption = "INVALID_OPTION" - - // ParameterExceptionReasonIllegalCombination is a ParameterExceptionReason enum value - ParameterExceptionReasonIllegalCombination = "ILLEGAL_COMBINATION" - - // ParameterExceptionReasonIllegalArgument is a ParameterExceptionReason enum value - ParameterExceptionReasonIllegalArgument = "ILLEGAL_ARGUMENT" -) - -const ( - // PositionalConstraintExactly is a PositionalConstraint enum value - PositionalConstraintExactly = "EXACTLY" - - // PositionalConstraintStartsWith is a PositionalConstraint enum value - PositionalConstraintStartsWith = "STARTS_WITH" - - // PositionalConstraintEndsWith is a PositionalConstraint enum value - PositionalConstraintEndsWith = "ENDS_WITH" - - // PositionalConstraintContains is a PositionalConstraint enum value - PositionalConstraintContains = "CONTAINS" - - // PositionalConstraintContainsWord is a PositionalConstraint enum value - PositionalConstraintContainsWord = "CONTAINS_WORD" -) - -const ( - // PredicateTypeIpmatch is a PredicateType enum value - PredicateTypeIpmatch = "IPMatch" - - // PredicateTypeByteMatch is a PredicateType enum value - PredicateTypeByteMatch = "ByteMatch" - - // PredicateTypeSqlInjectionMatch is a PredicateType enum value - PredicateTypeSqlInjectionMatch = "SqlInjectionMatch" - - // PredicateTypeGeoMatch is a PredicateType enum value - PredicateTypeGeoMatch = "GeoMatch" - - // PredicateTypeSizeConstraint is a PredicateType enum value - PredicateTypeSizeConstraint = "SizeConstraint" - - // PredicateTypeXssMatch is a PredicateType enum value - PredicateTypeXssMatch = "XssMatch" - - // PredicateTypeRegexMatch is a PredicateType enum value - PredicateTypeRegexMatch = "RegexMatch" -) - -const ( - // RateKeyIp is a RateKey enum value - RateKeyIp = "IP" -) - -const ( - // ResourceTypeApplicationLoadBalancer is a ResourceType enum value - ResourceTypeApplicationLoadBalancer = "APPLICATION_LOAD_BALANCER" - - // ResourceTypeApiGateway is a ResourceType enum value - ResourceTypeApiGateway = "API_GATEWAY" -) - -const ( - // TextTransformationNone is a TextTransformation enum value - TextTransformationNone = "NONE" - - // TextTransformationCompressWhiteSpace is a TextTransformation enum value - TextTransformationCompressWhiteSpace = "COMPRESS_WHITE_SPACE" - - // TextTransformationHtmlEntityDecode is a TextTransformation enum value - TextTransformationHtmlEntityDecode = "HTML_ENTITY_DECODE" - - // TextTransformationLowercase is a TextTransformation enum value - TextTransformationLowercase = "LOWERCASE" - - // TextTransformationCmdLine is a TextTransformation enum value - TextTransformationCmdLine = "CMD_LINE" - - // TextTransformationUrlDecode is a TextTransformation enum value - TextTransformationUrlDecode = "URL_DECODE" -) - -const ( - // WafActionTypeBlock is a WafActionType enum value - WafActionTypeBlock = "BLOCK" - - // WafActionTypeAllow is a WafActionType enum value - WafActionTypeAllow = "ALLOW" - - // WafActionTypeCount is a WafActionType enum value - WafActionTypeCount = "COUNT" -) - -const ( - // WafOverrideActionTypeNone is a WafOverrideActionType enum value - WafOverrideActionTypeNone = "NONE" - - // WafOverrideActionTypeCount is a WafOverrideActionType enum value - WafOverrideActionTypeCount = "COUNT" -) - -const ( - // WafRuleTypeRegular is a WafRuleType enum value - WafRuleTypeRegular = "REGULAR" - - // WafRuleTypeRateBased is a WafRuleType enum value - WafRuleTypeRateBased = "RATE_BASED" - - // WafRuleTypeGroup is a WafRuleType enum value - WafRuleTypeGroup = "GROUP" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/doc.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/doc.go deleted file mode 100644 index 8431ff1d5..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/doc.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package wafregional provides the client and types for making API -// requests to AWS WAF Regional. -// -// This is the AWS WAF Regional API Reference for using AWS WAF with Elastic -// Load Balancing (ELB) Application Load Balancers. The AWS WAF actions and -// data types listed in the reference are available for protecting Application -// Load Balancers. You can use these actions and data types by means of the -// endpoints listed in AWS Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#waf_region). -// This guide is for developers who need detailed information about the AWS -// WAF API actions, data types, and errors. For detailed information about AWS -// WAF features and an overview of how to use the AWS WAF API, see the AWS WAF -// Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). -// -// See https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28 for more information on this service. -// -// See wafregional package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/wafregional/ -// -// Using the Client -// -// To contact AWS WAF Regional 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 WAF Regional client WAFRegional for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/wafregional/#New -package wafregional diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go deleted file mode 100644 index b82c80fc6..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package wafregional - -const ( - - // ErrCodeWAFDisallowedNameException for service response error code - // "WAFDisallowedNameException". - // - // The name specified is invalid. - ErrCodeWAFDisallowedNameException = "WAFDisallowedNameException" - - // ErrCodeWAFInternalErrorException for service response error code - // "WAFInternalErrorException". - // - // The operation failed because of a system problem, even though the request - // was valid. Retry your request. - ErrCodeWAFInternalErrorException = "WAFInternalErrorException" - - // ErrCodeWAFInvalidAccountException for service response error code - // "WAFInvalidAccountException". - // - // The operation failed because you tried to create, update, or delete an object - // by using an invalid account identifier. - ErrCodeWAFInvalidAccountException = "WAFInvalidAccountException" - - // ErrCodeWAFInvalidOperationException for service response error code - // "WAFInvalidOperationException". - // - // The operation failed because there was nothing to do. For example: - // - // * You tried to remove a Rule from a WebACL, but the Rule isn't in the - // specified WebACL. - // - // * You tried to remove an IP address from an IPSet, but the IP address - // isn't in the specified IPSet. - // - // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple - // isn't in the specified WebACL. - // - // * You tried to add a Rule to a WebACL, but the Rule already exists in - // the specified WebACL. - // - // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple - // already exists in the specified WebACL. - ErrCodeWAFInvalidOperationException = "WAFInvalidOperationException" - - // ErrCodeWAFInvalidParameterException for service response error code - // "WAFInvalidParameterException". - // - // The operation failed because AWS WAF didn't recognize a parameter in the - // request. For example: - // - // * You specified an invalid parameter name. - // - // * You specified an invalid value. - // - // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) - // using an action other than INSERT or DELETE. - // - // * You tried to create a WebACL with a DefaultActionType other than ALLOW, - // BLOCK, or COUNT. - // - // * You tried to create a RateBasedRule with a RateKey value other than - // IP. - // - // * You tried to update a WebACL with a WafActionType other than ALLOW, - // BLOCK, or COUNT. - // - // * You tried to update a ByteMatchSet with a FieldToMatchType other than - // HEADER, METHOD, QUERY_STRING, URI, or BODY. - // - // * You tried to update a ByteMatchSet with a Field of HEADER but no value - // for Data. - // - // * Your request references an ARN that is malformed, or corresponds to - // a resource with which a web ACL cannot be associated. - ErrCodeWAFInvalidParameterException = "WAFInvalidParameterException" - - // ErrCodeWAFInvalidPermissionPolicyException for service response error code - // "WAFInvalidPermissionPolicyException". - // - // The operation failed because the specified policy is not in the proper format. - // - // The policy is subject to the following restrictions: - // - // * You can attach only one policy with each PutPermissionPolicy request. - // - // * The policy must include an Effect, Action and Principal. - // - // * Effect must specify Allow. - // - // * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, - // waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard - // actions in the policy will be rejected. - // - // * The policy cannot include a Resource parameter. - // - // * The ARN in the request must be a valid WAF RuleGroup ARN and the RuleGroup - // must exist in the same region. - // - // * The user making the request must be the owner of the RuleGroup. - // - // * Your policy must be composed using IAM Policy version 2012-10-17. - ErrCodeWAFInvalidPermissionPolicyException = "WAFInvalidPermissionPolicyException" - - // ErrCodeWAFInvalidRegexPatternException for service response error code - // "WAFInvalidRegexPatternException". - // - // The regular expression (regex) you specified in RegexPatternString is invalid. - ErrCodeWAFInvalidRegexPatternException = "WAFInvalidRegexPatternException" - - // ErrCodeWAFLimitsExceededException for service response error code - // "WAFLimitsExceededException". - // - // The operation exceeds a resource limit, for example, the maximum number of - // WebACL objects that you can create for an AWS account. For more information, - // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) - // in the AWS WAF Developer Guide. - ErrCodeWAFLimitsExceededException = "WAFLimitsExceededException" - - // ErrCodeWAFNonEmptyEntityException for service response error code - // "WAFNonEmptyEntityException". - // - // The operation failed because you tried to delete an object that isn't empty. - // For example: - // - // * You tried to delete a WebACL that still contains one or more Rule objects. - // - // * You tried to delete a Rule that still contains one or more ByteMatchSet - // objects or other predicates. - // - // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple - // objects. - // - // * You tried to delete an IPSet that references one or more IP addresses. - ErrCodeWAFNonEmptyEntityException = "WAFNonEmptyEntityException" - - // ErrCodeWAFNonexistentContainerException for service response error code - // "WAFNonexistentContainerException". - // - // The operation failed because you tried to add an object to or delete an object - // from another object that doesn't exist. For example: - // - // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't - // exist. - // - // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule - // that doesn't exist. - // - // * You tried to add an IP address to or delete an IP address from an IPSet - // that doesn't exist. - // - // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from - // a ByteMatchSet that doesn't exist. - ErrCodeWAFNonexistentContainerException = "WAFNonexistentContainerException" - - // ErrCodeWAFNonexistentItemException for service response error code - // "WAFNonexistentItemException". - // - // The operation failed because the referenced object doesn't exist. - ErrCodeWAFNonexistentItemException = "WAFNonexistentItemException" - - // ErrCodeWAFReferencedItemException for service response error code - // "WAFReferencedItemException". - // - // The operation failed because you tried to delete an object that is still - // in use. For example: - // - // * You tried to delete a ByteMatchSet that is still referenced by a Rule. - // - // * You tried to delete a Rule that is still referenced by a WebACL. - ErrCodeWAFReferencedItemException = "WAFReferencedItemException" - - // ErrCodeWAFServiceLinkedRoleErrorException for service response error code - // "WAFServiceLinkedRoleErrorException". - // - // AWS WAF is not able to access the service linked role. This can be caused - // by a previous PutLoggingConfiguration request, which can lock the service - // linked role for about 20 seconds. Please try your request again. The service - // linked role can also be locked by a previous DeleteServiceLinkedRole request, - // which can lock the role for 15 minutes or more. If you recently made a DeleteServiceLinkedRole, - // wait at least 15 minutes and try the request again. If you receive this same - // exception again, you will have to wait additional time until the role is - // unlocked. - ErrCodeWAFServiceLinkedRoleErrorException = "WAFServiceLinkedRoleErrorException" - - // ErrCodeWAFStaleDataException for service response error code - // "WAFStaleDataException". - // - // The operation failed because you tried to create, update, or delete an object - // by using a change token that has already been used. - ErrCodeWAFStaleDataException = "WAFStaleDataException" - - // ErrCodeWAFSubscriptionNotFoundException for service response error code - // "WAFSubscriptionNotFoundException". - // - // The specified subscription does not exist. - ErrCodeWAFSubscriptionNotFoundException = "WAFSubscriptionNotFoundException" - - // ErrCodeWAFUnavailableEntityException for service response error code - // "WAFUnavailableEntityException". - // - // The operation failed because the entity referenced is temporarily unavailable. - // Retry your request. - ErrCodeWAFUnavailableEntityException = "WAFUnavailableEntityException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/service.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/service.go deleted file mode 100644 index 3a267ae63..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package wafregional - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// WAFRegional provides the API operation methods for making requests to -// AWS WAF Regional. See this package's package overview docs -// for details on the service. -// -// WAFRegional methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type WAFRegional 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 = "waf-regional" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "WAF Regional" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the WAFRegional client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a WAFRegional client from just a session. -// svc := wafregional.New(mySession) -// -// // Create a WAFRegional client with additional configuration -// svc := wafregional.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *WAFRegional { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *WAFRegional { - svc := &WAFRegional{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2016-11-28", - JSONVersion: "1.1", - TargetPrefix: "AWSWAF_Regional_20161128", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a WAFRegional operation and runs any -// custom request initialization. -func (c *WAFRegional) 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/worklink/api.go b/vendor/github.com/aws/aws-sdk-go/service/worklink/api.go deleted file mode 100644 index f2d632f24..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/worklink/api.go +++ /dev/null @@ -1,3904 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package worklink - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opAssociateWebsiteCertificateAuthority = "AssociateWebsiteCertificateAuthority" - -// AssociateWebsiteCertificateAuthorityRequest generates a "aws/request.Request" representing the -// client's request for the AssociateWebsiteCertificateAuthority operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateWebsiteCertificateAuthority for more information on using the AssociateWebsiteCertificateAuthority -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateWebsiteCertificateAuthorityRequest method. -// req, resp := client.AssociateWebsiteCertificateAuthorityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/AssociateWebsiteCertificateAuthority -func (c *WorkLink) AssociateWebsiteCertificateAuthorityRequest(input *AssociateWebsiteCertificateAuthorityInput) (req *request.Request, output *AssociateWebsiteCertificateAuthorityOutput) { - op := &request.Operation{ - Name: opAssociateWebsiteCertificateAuthority, - HTTPMethod: "POST", - HTTPPath: "/associateWebsiteCertificateAuthority", - } - - if input == nil { - input = &AssociateWebsiteCertificateAuthorityInput{} - } - - output = &AssociateWebsiteCertificateAuthorityOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateWebsiteCertificateAuthority API operation for Amazon WorkLink. -// -// Imports the root certificate of a certificate authority (CA) used to obtain -// TLS certificates used by associated websites within the company network. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation AssociateWebsiteCertificateAuthority for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/AssociateWebsiteCertificateAuthority -func (c *WorkLink) AssociateWebsiteCertificateAuthority(input *AssociateWebsiteCertificateAuthorityInput) (*AssociateWebsiteCertificateAuthorityOutput, error) { - req, out := c.AssociateWebsiteCertificateAuthorityRequest(input) - return out, req.Send() -} - -// AssociateWebsiteCertificateAuthorityWithContext is the same as AssociateWebsiteCertificateAuthority with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateWebsiteCertificateAuthority for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) AssociateWebsiteCertificateAuthorityWithContext(ctx aws.Context, input *AssociateWebsiteCertificateAuthorityInput, opts ...request.Option) (*AssociateWebsiteCertificateAuthorityOutput, error) { - req, out := c.AssociateWebsiteCertificateAuthorityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFleet = "CreateFleet" - -// CreateFleetRequest generates a "aws/request.Request" representing the -// client's request for the CreateFleet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFleet for more information on using the CreateFleet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateFleetRequest method. -// req, resp := client.CreateFleetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/CreateFleet -func (c *WorkLink) CreateFleetRequest(input *CreateFleetInput) (req *request.Request, output *CreateFleetOutput) { - op := &request.Operation{ - Name: opCreateFleet, - HTTPMethod: "POST", - HTTPPath: "/createFleet", - } - - if input == nil { - input = &CreateFleetInput{} - } - - output = &CreateFleetOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFleet API operation for Amazon WorkLink. -// -// Creates a fleet. A fleet consists of resources and the configuration that -// delivers associated websites to authorized users who download and set up -// the Amazon WorkLink app. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation CreateFleet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The resource already exists. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/CreateFleet -func (c *WorkLink) CreateFleet(input *CreateFleetInput) (*CreateFleetOutput, error) { - req, out := c.CreateFleetRequest(input) - return out, req.Send() -} - -// CreateFleetWithContext is the same as CreateFleet with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFleet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) CreateFleetWithContext(ctx aws.Context, input *CreateFleetInput, opts ...request.Option) (*CreateFleetOutput, error) { - req, out := c.CreateFleetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFleet = "DeleteFleet" - -// DeleteFleetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFleet operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFleet for more information on using the DeleteFleet -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteFleetRequest method. -// req, resp := client.DeleteFleetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DeleteFleet -func (c *WorkLink) DeleteFleetRequest(input *DeleteFleetInput) (req *request.Request, output *DeleteFleetOutput) { - op := &request.Operation{ - Name: opDeleteFleet, - HTTPMethod: "POST", - HTTPPath: "/deleteFleet", - } - - if input == nil { - input = &DeleteFleetInput{} - } - - output = &DeleteFleetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteFleet API operation for Amazon WorkLink. -// -// Deletes a fleet. Prevents users from accessing previously associated websites. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation DeleteFleet for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DeleteFleet -func (c *WorkLink) DeleteFleet(input *DeleteFleetInput) (*DeleteFleetOutput, error) { - req, out := c.DeleteFleetRequest(input) - return out, req.Send() -} - -// DeleteFleetWithContext is the same as DeleteFleet with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFleet for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) DeleteFleetWithContext(ctx aws.Context, input *DeleteFleetInput, opts ...request.Option) (*DeleteFleetOutput, error) { - req, out := c.DeleteFleetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAuditStreamConfiguration = "DescribeAuditStreamConfiguration" - -// DescribeAuditStreamConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAuditStreamConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAuditStreamConfiguration for more information on using the DescribeAuditStreamConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAuditStreamConfigurationRequest method. -// req, resp := client.DescribeAuditStreamConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeAuditStreamConfiguration -func (c *WorkLink) DescribeAuditStreamConfigurationRequest(input *DescribeAuditStreamConfigurationInput) (req *request.Request, output *DescribeAuditStreamConfigurationOutput) { - op := &request.Operation{ - Name: opDescribeAuditStreamConfiguration, - HTTPMethod: "POST", - HTTPPath: "/describeAuditStreamConfiguration", - } - - if input == nil { - input = &DescribeAuditStreamConfigurationInput{} - } - - output = &DescribeAuditStreamConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAuditStreamConfiguration API operation for Amazon WorkLink. -// -// Describes the configuration for delivering audit streams to the customer -// account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation DescribeAuditStreamConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeAuditStreamConfiguration -func (c *WorkLink) DescribeAuditStreamConfiguration(input *DescribeAuditStreamConfigurationInput) (*DescribeAuditStreamConfigurationOutput, error) { - req, out := c.DescribeAuditStreamConfigurationRequest(input) - return out, req.Send() -} - -// DescribeAuditStreamConfigurationWithContext is the same as DescribeAuditStreamConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAuditStreamConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) DescribeAuditStreamConfigurationWithContext(ctx aws.Context, input *DescribeAuditStreamConfigurationInput, opts ...request.Option) (*DescribeAuditStreamConfigurationOutput, error) { - req, out := c.DescribeAuditStreamConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeCompanyNetworkConfiguration = "DescribeCompanyNetworkConfiguration" - -// DescribeCompanyNetworkConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCompanyNetworkConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeCompanyNetworkConfiguration for more information on using the DescribeCompanyNetworkConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeCompanyNetworkConfigurationRequest method. -// req, resp := client.DescribeCompanyNetworkConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeCompanyNetworkConfiguration -func (c *WorkLink) DescribeCompanyNetworkConfigurationRequest(input *DescribeCompanyNetworkConfigurationInput) (req *request.Request, output *DescribeCompanyNetworkConfigurationOutput) { - op := &request.Operation{ - Name: opDescribeCompanyNetworkConfiguration, - HTTPMethod: "POST", - HTTPPath: "/describeCompanyNetworkConfiguration", - } - - if input == nil { - input = &DescribeCompanyNetworkConfigurationInput{} - } - - output = &DescribeCompanyNetworkConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeCompanyNetworkConfiguration API operation for Amazon WorkLink. -// -// Describes the networking configuration to access the internal websites associated -// with the specified fleet. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation DescribeCompanyNetworkConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeCompanyNetworkConfiguration -func (c *WorkLink) DescribeCompanyNetworkConfiguration(input *DescribeCompanyNetworkConfigurationInput) (*DescribeCompanyNetworkConfigurationOutput, error) { - req, out := c.DescribeCompanyNetworkConfigurationRequest(input) - return out, req.Send() -} - -// DescribeCompanyNetworkConfigurationWithContext is the same as DescribeCompanyNetworkConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeCompanyNetworkConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) DescribeCompanyNetworkConfigurationWithContext(ctx aws.Context, input *DescribeCompanyNetworkConfigurationInput, opts ...request.Option) (*DescribeCompanyNetworkConfigurationOutput, error) { - req, out := c.DescribeCompanyNetworkConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDevice = "DescribeDevice" - -// DescribeDeviceRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDevice for more information on using the DescribeDevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDeviceRequest method. -// req, resp := client.DescribeDeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeDevice -func (c *WorkLink) DescribeDeviceRequest(input *DescribeDeviceInput) (req *request.Request, output *DescribeDeviceOutput) { - op := &request.Operation{ - Name: opDescribeDevice, - HTTPMethod: "POST", - HTTPPath: "/describeDevice", - } - - if input == nil { - input = &DescribeDeviceInput{} - } - - output = &DescribeDeviceOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDevice API operation for Amazon WorkLink. -// -// Provides information about a user's device. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation DescribeDevice for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeDevice -func (c *WorkLink) DescribeDevice(input *DescribeDeviceInput) (*DescribeDeviceOutput, error) { - req, out := c.DescribeDeviceRequest(input) - return out, req.Send() -} - -// DescribeDeviceWithContext is the same as DescribeDevice with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) DescribeDeviceWithContext(ctx aws.Context, input *DescribeDeviceInput, opts ...request.Option) (*DescribeDeviceOutput, error) { - req, out := c.DescribeDeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDevicePolicyConfiguration = "DescribeDevicePolicyConfiguration" - -// DescribeDevicePolicyConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDevicePolicyConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDevicePolicyConfiguration for more information on using the DescribeDevicePolicyConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeDevicePolicyConfigurationRequest method. -// req, resp := client.DescribeDevicePolicyConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeDevicePolicyConfiguration -func (c *WorkLink) DescribeDevicePolicyConfigurationRequest(input *DescribeDevicePolicyConfigurationInput) (req *request.Request, output *DescribeDevicePolicyConfigurationOutput) { - op := &request.Operation{ - Name: opDescribeDevicePolicyConfiguration, - HTTPMethod: "POST", - HTTPPath: "/describeDevicePolicyConfiguration", - } - - if input == nil { - input = &DescribeDevicePolicyConfigurationInput{} - } - - output = &DescribeDevicePolicyConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDevicePolicyConfiguration API operation for Amazon WorkLink. -// -// Describes the device policy configuration for the specified fleet. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation DescribeDevicePolicyConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeDevicePolicyConfiguration -func (c *WorkLink) DescribeDevicePolicyConfiguration(input *DescribeDevicePolicyConfigurationInput) (*DescribeDevicePolicyConfigurationOutput, error) { - req, out := c.DescribeDevicePolicyConfigurationRequest(input) - return out, req.Send() -} - -// DescribeDevicePolicyConfigurationWithContext is the same as DescribeDevicePolicyConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeDevicePolicyConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) DescribeDevicePolicyConfigurationWithContext(ctx aws.Context, input *DescribeDevicePolicyConfigurationInput, opts ...request.Option) (*DescribeDevicePolicyConfigurationOutput, error) { - req, out := c.DescribeDevicePolicyConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFleetMetadata = "DescribeFleetMetadata" - -// DescribeFleetMetadataRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFleetMetadata operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFleetMetadata for more information on using the DescribeFleetMetadata -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeFleetMetadataRequest method. -// req, resp := client.DescribeFleetMetadataRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeFleetMetadata -func (c *WorkLink) DescribeFleetMetadataRequest(input *DescribeFleetMetadataInput) (req *request.Request, output *DescribeFleetMetadataOutput) { - op := &request.Operation{ - Name: opDescribeFleetMetadata, - HTTPMethod: "POST", - HTTPPath: "/describeFleetMetadata", - } - - if input == nil { - input = &DescribeFleetMetadataInput{} - } - - output = &DescribeFleetMetadataOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFleetMetadata API operation for Amazon WorkLink. -// -// Provides basic information for the specified fleet, excluding identity provider, -// networking, and device configuration details. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation DescribeFleetMetadata for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeFleetMetadata -func (c *WorkLink) DescribeFleetMetadata(input *DescribeFleetMetadataInput) (*DescribeFleetMetadataOutput, error) { - req, out := c.DescribeFleetMetadataRequest(input) - return out, req.Send() -} - -// DescribeFleetMetadataWithContext is the same as DescribeFleetMetadata with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFleetMetadata for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) DescribeFleetMetadataWithContext(ctx aws.Context, input *DescribeFleetMetadataInput, opts ...request.Option) (*DescribeFleetMetadataOutput, error) { - req, out := c.DescribeFleetMetadataRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeIdentityProviderConfiguration = "DescribeIdentityProviderConfiguration" - -// DescribeIdentityProviderConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeIdentityProviderConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeIdentityProviderConfiguration for more information on using the DescribeIdentityProviderConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeIdentityProviderConfigurationRequest method. -// req, resp := client.DescribeIdentityProviderConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeIdentityProviderConfiguration -func (c *WorkLink) DescribeIdentityProviderConfigurationRequest(input *DescribeIdentityProviderConfigurationInput) (req *request.Request, output *DescribeIdentityProviderConfigurationOutput) { - op := &request.Operation{ - Name: opDescribeIdentityProviderConfiguration, - HTTPMethod: "POST", - HTTPPath: "/describeIdentityProviderConfiguration", - } - - if input == nil { - input = &DescribeIdentityProviderConfigurationInput{} - } - - output = &DescribeIdentityProviderConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeIdentityProviderConfiguration API operation for Amazon WorkLink. -// -// Describes the identity provider configuration of the specified fleet. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation DescribeIdentityProviderConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeIdentityProviderConfiguration -func (c *WorkLink) DescribeIdentityProviderConfiguration(input *DescribeIdentityProviderConfigurationInput) (*DescribeIdentityProviderConfigurationOutput, error) { - req, out := c.DescribeIdentityProviderConfigurationRequest(input) - return out, req.Send() -} - -// DescribeIdentityProviderConfigurationWithContext is the same as DescribeIdentityProviderConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeIdentityProviderConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) DescribeIdentityProviderConfigurationWithContext(ctx aws.Context, input *DescribeIdentityProviderConfigurationInput, opts ...request.Option) (*DescribeIdentityProviderConfigurationOutput, error) { - req, out := c.DescribeIdentityProviderConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeWebsiteCertificateAuthority = "DescribeWebsiteCertificateAuthority" - -// DescribeWebsiteCertificateAuthorityRequest generates a "aws/request.Request" representing the -// client's request for the DescribeWebsiteCertificateAuthority operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeWebsiteCertificateAuthority for more information on using the DescribeWebsiteCertificateAuthority -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeWebsiteCertificateAuthorityRequest method. -// req, resp := client.DescribeWebsiteCertificateAuthorityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeWebsiteCertificateAuthority -func (c *WorkLink) DescribeWebsiteCertificateAuthorityRequest(input *DescribeWebsiteCertificateAuthorityInput) (req *request.Request, output *DescribeWebsiteCertificateAuthorityOutput) { - op := &request.Operation{ - Name: opDescribeWebsiteCertificateAuthority, - HTTPMethod: "POST", - HTTPPath: "/describeWebsiteCertificateAuthority", - } - - if input == nil { - input = &DescribeWebsiteCertificateAuthorityInput{} - } - - output = &DescribeWebsiteCertificateAuthorityOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeWebsiteCertificateAuthority API operation for Amazon WorkLink. -// -// Provides information about the certificate authority. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation DescribeWebsiteCertificateAuthority for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeWebsiteCertificateAuthority -func (c *WorkLink) DescribeWebsiteCertificateAuthority(input *DescribeWebsiteCertificateAuthorityInput) (*DescribeWebsiteCertificateAuthorityOutput, error) { - req, out := c.DescribeWebsiteCertificateAuthorityRequest(input) - return out, req.Send() -} - -// DescribeWebsiteCertificateAuthorityWithContext is the same as DescribeWebsiteCertificateAuthority with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeWebsiteCertificateAuthority for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) DescribeWebsiteCertificateAuthorityWithContext(ctx aws.Context, input *DescribeWebsiteCertificateAuthorityInput, opts ...request.Option) (*DescribeWebsiteCertificateAuthorityOutput, error) { - req, out := c.DescribeWebsiteCertificateAuthorityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateWebsiteCertificateAuthority = "DisassociateWebsiteCertificateAuthority" - -// DisassociateWebsiteCertificateAuthorityRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateWebsiteCertificateAuthority operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateWebsiteCertificateAuthority for more information on using the DisassociateWebsiteCertificateAuthority -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateWebsiteCertificateAuthorityRequest method. -// req, resp := client.DisassociateWebsiteCertificateAuthorityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DisassociateWebsiteCertificateAuthority -func (c *WorkLink) DisassociateWebsiteCertificateAuthorityRequest(input *DisassociateWebsiteCertificateAuthorityInput) (req *request.Request, output *DisassociateWebsiteCertificateAuthorityOutput) { - op := &request.Operation{ - Name: opDisassociateWebsiteCertificateAuthority, - HTTPMethod: "POST", - HTTPPath: "/disassociateWebsiteCertificateAuthority", - } - - if input == nil { - input = &DisassociateWebsiteCertificateAuthorityInput{} - } - - output = &DisassociateWebsiteCertificateAuthorityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateWebsiteCertificateAuthority API operation for Amazon WorkLink. -// -// Removes a certificate authority (CA). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation DisassociateWebsiteCertificateAuthority for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DisassociateWebsiteCertificateAuthority -func (c *WorkLink) DisassociateWebsiteCertificateAuthority(input *DisassociateWebsiteCertificateAuthorityInput) (*DisassociateWebsiteCertificateAuthorityOutput, error) { - req, out := c.DisassociateWebsiteCertificateAuthorityRequest(input) - return out, req.Send() -} - -// DisassociateWebsiteCertificateAuthorityWithContext is the same as DisassociateWebsiteCertificateAuthority with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateWebsiteCertificateAuthority for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) DisassociateWebsiteCertificateAuthorityWithContext(ctx aws.Context, input *DisassociateWebsiteCertificateAuthorityInput, opts ...request.Option) (*DisassociateWebsiteCertificateAuthorityOutput, error) { - req, out := c.DisassociateWebsiteCertificateAuthorityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDevices = "ListDevices" - -// ListDevicesRequest generates a "aws/request.Request" representing the -// client's request for the ListDevices operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListDevices for more information on using the ListDevices -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListDevicesRequest method. -// req, resp := client.ListDevicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/ListDevices -func (c *WorkLink) ListDevicesRequest(input *ListDevicesInput) (req *request.Request, output *ListDevicesOutput) { - op := &request.Operation{ - Name: opListDevices, - HTTPMethod: "POST", - HTTPPath: "/listDevices", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListDevicesInput{} - } - - output = &ListDevicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDevices API operation for Amazon WorkLink. -// -// Retrieves a list of devices registered with the specified fleet. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation ListDevices for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/ListDevices -func (c *WorkLink) ListDevices(input *ListDevicesInput) (*ListDevicesOutput, error) { - req, out := c.ListDevicesRequest(input) - return out, req.Send() -} - -// ListDevicesWithContext is the same as ListDevices with the addition of -// the ability to pass a context and additional request options. -// -// See ListDevices for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) ListDevicesWithContext(ctx aws.Context, input *ListDevicesInput, opts ...request.Option) (*ListDevicesOutput, error) { - req, out := c.ListDevicesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListDevicesPages iterates over the pages of a ListDevices operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDevices 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 ListDevices operation. -// pageNum := 0 -// err := client.ListDevicesPages(params, -// func(page *ListDevicesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *WorkLink) ListDevicesPages(input *ListDevicesInput, fn func(*ListDevicesOutput, bool) bool) error { - return c.ListDevicesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDevicesPagesWithContext same as ListDevicesPages 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 *WorkLink) ListDevicesPagesWithContext(ctx aws.Context, input *ListDevicesInput, fn func(*ListDevicesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDevicesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDevicesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDevicesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListFleets = "ListFleets" - -// ListFleetsRequest generates a "aws/request.Request" representing the -// client's request for the ListFleets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListFleets for more information on using the ListFleets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListFleetsRequest method. -// req, resp := client.ListFleetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/ListFleets -func (c *WorkLink) ListFleetsRequest(input *ListFleetsInput) (req *request.Request, output *ListFleetsOutput) { - op := &request.Operation{ - Name: opListFleets, - HTTPMethod: "POST", - HTTPPath: "/listFleets", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListFleetsInput{} - } - - output = &ListFleetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListFleets API operation for Amazon WorkLink. -// -// Retrieves a list of fleets for the current account and Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation ListFleets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/ListFleets -func (c *WorkLink) ListFleets(input *ListFleetsInput) (*ListFleetsOutput, error) { - req, out := c.ListFleetsRequest(input) - return out, req.Send() -} - -// ListFleetsWithContext is the same as ListFleets with the addition of -// the ability to pass a context and additional request options. -// -// See ListFleets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) ListFleetsWithContext(ctx aws.Context, input *ListFleetsInput, opts ...request.Option) (*ListFleetsOutput, error) { - req, out := c.ListFleetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListFleetsPages iterates over the pages of a ListFleets operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListFleets 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 ListFleets operation. -// pageNum := 0 -// err := client.ListFleetsPages(params, -// func(page *ListFleetsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *WorkLink) ListFleetsPages(input *ListFleetsInput, fn func(*ListFleetsOutput, bool) bool) error { - return c.ListFleetsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListFleetsPagesWithContext same as ListFleetsPages 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 *WorkLink) ListFleetsPagesWithContext(ctx aws.Context, input *ListFleetsInput, fn func(*ListFleetsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListFleetsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListFleetsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListFleetsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListWebsiteCertificateAuthorities = "ListWebsiteCertificateAuthorities" - -// ListWebsiteCertificateAuthoritiesRequest generates a "aws/request.Request" representing the -// client's request for the ListWebsiteCertificateAuthorities operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListWebsiteCertificateAuthorities for more information on using the ListWebsiteCertificateAuthorities -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListWebsiteCertificateAuthoritiesRequest method. -// req, resp := client.ListWebsiteCertificateAuthoritiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/ListWebsiteCertificateAuthorities -func (c *WorkLink) ListWebsiteCertificateAuthoritiesRequest(input *ListWebsiteCertificateAuthoritiesInput) (req *request.Request, output *ListWebsiteCertificateAuthoritiesOutput) { - op := &request.Operation{ - Name: opListWebsiteCertificateAuthorities, - HTTPMethod: "POST", - HTTPPath: "/listWebsiteCertificateAuthorities", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListWebsiteCertificateAuthoritiesInput{} - } - - output = &ListWebsiteCertificateAuthoritiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListWebsiteCertificateAuthorities API operation for Amazon WorkLink. -// -// Retrieves a list of certificate authorities added for the current account -// and Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation ListWebsiteCertificateAuthorities for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/ListWebsiteCertificateAuthorities -func (c *WorkLink) ListWebsiteCertificateAuthorities(input *ListWebsiteCertificateAuthoritiesInput) (*ListWebsiteCertificateAuthoritiesOutput, error) { - req, out := c.ListWebsiteCertificateAuthoritiesRequest(input) - return out, req.Send() -} - -// ListWebsiteCertificateAuthoritiesWithContext is the same as ListWebsiteCertificateAuthorities with the addition of -// the ability to pass a context and additional request options. -// -// See ListWebsiteCertificateAuthorities for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) ListWebsiteCertificateAuthoritiesWithContext(ctx aws.Context, input *ListWebsiteCertificateAuthoritiesInput, opts ...request.Option) (*ListWebsiteCertificateAuthoritiesOutput, error) { - req, out := c.ListWebsiteCertificateAuthoritiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListWebsiteCertificateAuthoritiesPages iterates over the pages of a ListWebsiteCertificateAuthorities operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListWebsiteCertificateAuthorities 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 ListWebsiteCertificateAuthorities operation. -// pageNum := 0 -// err := client.ListWebsiteCertificateAuthoritiesPages(params, -// func(page *ListWebsiteCertificateAuthoritiesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *WorkLink) ListWebsiteCertificateAuthoritiesPages(input *ListWebsiteCertificateAuthoritiesInput, fn func(*ListWebsiteCertificateAuthoritiesOutput, bool) bool) error { - return c.ListWebsiteCertificateAuthoritiesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListWebsiteCertificateAuthoritiesPagesWithContext same as ListWebsiteCertificateAuthoritiesPages 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 *WorkLink) ListWebsiteCertificateAuthoritiesPagesWithContext(ctx aws.Context, input *ListWebsiteCertificateAuthoritiesInput, fn func(*ListWebsiteCertificateAuthoritiesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListWebsiteCertificateAuthoritiesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListWebsiteCertificateAuthoritiesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListWebsiteCertificateAuthoritiesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opSignOutUser = "SignOutUser" - -// SignOutUserRequest generates a "aws/request.Request" representing the -// client's request for the SignOutUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SignOutUser for more information on using the SignOutUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the SignOutUserRequest method. -// req, resp := client.SignOutUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/SignOutUser -func (c *WorkLink) SignOutUserRequest(input *SignOutUserInput) (req *request.Request, output *SignOutUserOutput) { - op := &request.Operation{ - Name: opSignOutUser, - HTTPMethod: "POST", - HTTPPath: "/signOutUser", - } - - if input == nil { - input = &SignOutUserInput{} - } - - output = &SignOutUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SignOutUser API operation for Amazon WorkLink. -// -// Signs the user out from all of their devices. The user can sign in again -// if they have valid credentials. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation SignOutUser for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/SignOutUser -func (c *WorkLink) SignOutUser(input *SignOutUserInput) (*SignOutUserOutput, error) { - req, out := c.SignOutUserRequest(input) - return out, req.Send() -} - -// SignOutUserWithContext is the same as SignOutUser with the addition of -// the ability to pass a context and additional request options. -// -// See SignOutUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) SignOutUserWithContext(ctx aws.Context, input *SignOutUserInput, opts ...request.Option) (*SignOutUserOutput, error) { - req, out := c.SignOutUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAuditStreamConfiguration = "UpdateAuditStreamConfiguration" - -// UpdateAuditStreamConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAuditStreamConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAuditStreamConfiguration for more information on using the UpdateAuditStreamConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateAuditStreamConfigurationRequest method. -// req, resp := client.UpdateAuditStreamConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateAuditStreamConfiguration -func (c *WorkLink) UpdateAuditStreamConfigurationRequest(input *UpdateAuditStreamConfigurationInput) (req *request.Request, output *UpdateAuditStreamConfigurationOutput) { - op := &request.Operation{ - Name: opUpdateAuditStreamConfiguration, - HTTPMethod: "POST", - HTTPPath: "/updateAuditStreamConfiguration", - } - - if input == nil { - input = &UpdateAuditStreamConfigurationInput{} - } - - output = &UpdateAuditStreamConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateAuditStreamConfiguration API operation for Amazon WorkLink. -// -// Updates the audit stream configuration for the fleet. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation UpdateAuditStreamConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateAuditStreamConfiguration -func (c *WorkLink) UpdateAuditStreamConfiguration(input *UpdateAuditStreamConfigurationInput) (*UpdateAuditStreamConfigurationOutput, error) { - req, out := c.UpdateAuditStreamConfigurationRequest(input) - return out, req.Send() -} - -// UpdateAuditStreamConfigurationWithContext is the same as UpdateAuditStreamConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAuditStreamConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) UpdateAuditStreamConfigurationWithContext(ctx aws.Context, input *UpdateAuditStreamConfigurationInput, opts ...request.Option) (*UpdateAuditStreamConfigurationOutput, error) { - req, out := c.UpdateAuditStreamConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateCompanyNetworkConfiguration = "UpdateCompanyNetworkConfiguration" - -// UpdateCompanyNetworkConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCompanyNetworkConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateCompanyNetworkConfiguration for more information on using the UpdateCompanyNetworkConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateCompanyNetworkConfigurationRequest method. -// req, resp := client.UpdateCompanyNetworkConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateCompanyNetworkConfiguration -func (c *WorkLink) UpdateCompanyNetworkConfigurationRequest(input *UpdateCompanyNetworkConfigurationInput) (req *request.Request, output *UpdateCompanyNetworkConfigurationOutput) { - op := &request.Operation{ - Name: opUpdateCompanyNetworkConfiguration, - HTTPMethod: "POST", - HTTPPath: "/updateCompanyNetworkConfiguration", - } - - if input == nil { - input = &UpdateCompanyNetworkConfigurationInput{} - } - - output = &UpdateCompanyNetworkConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateCompanyNetworkConfiguration API operation for Amazon WorkLink. -// -// Updates the company network configuration for the fleet. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation UpdateCompanyNetworkConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateCompanyNetworkConfiguration -func (c *WorkLink) UpdateCompanyNetworkConfiguration(input *UpdateCompanyNetworkConfigurationInput) (*UpdateCompanyNetworkConfigurationOutput, error) { - req, out := c.UpdateCompanyNetworkConfigurationRequest(input) - return out, req.Send() -} - -// UpdateCompanyNetworkConfigurationWithContext is the same as UpdateCompanyNetworkConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCompanyNetworkConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) UpdateCompanyNetworkConfigurationWithContext(ctx aws.Context, input *UpdateCompanyNetworkConfigurationInput, opts ...request.Option) (*UpdateCompanyNetworkConfigurationOutput, error) { - req, out := c.UpdateCompanyNetworkConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDevicePolicyConfiguration = "UpdateDevicePolicyConfiguration" - -// UpdateDevicePolicyConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDevicePolicyConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateDevicePolicyConfiguration for more information on using the UpdateDevicePolicyConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateDevicePolicyConfigurationRequest method. -// req, resp := client.UpdateDevicePolicyConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateDevicePolicyConfiguration -func (c *WorkLink) UpdateDevicePolicyConfigurationRequest(input *UpdateDevicePolicyConfigurationInput) (req *request.Request, output *UpdateDevicePolicyConfigurationOutput) { - op := &request.Operation{ - Name: opUpdateDevicePolicyConfiguration, - HTTPMethod: "POST", - HTTPPath: "/updateDevicePolicyConfiguration", - } - - if input == nil { - input = &UpdateDevicePolicyConfigurationInput{} - } - - output = &UpdateDevicePolicyConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateDevicePolicyConfiguration API operation for Amazon WorkLink. -// -// Updates the device policy configuration for the fleet. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation UpdateDevicePolicyConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateDevicePolicyConfiguration -func (c *WorkLink) UpdateDevicePolicyConfiguration(input *UpdateDevicePolicyConfigurationInput) (*UpdateDevicePolicyConfigurationOutput, error) { - req, out := c.UpdateDevicePolicyConfigurationRequest(input) - return out, req.Send() -} - -// UpdateDevicePolicyConfigurationWithContext is the same as UpdateDevicePolicyConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDevicePolicyConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) UpdateDevicePolicyConfigurationWithContext(ctx aws.Context, input *UpdateDevicePolicyConfigurationInput, opts ...request.Option) (*UpdateDevicePolicyConfigurationOutput, error) { - req, out := c.UpdateDevicePolicyConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFleetMetadata = "UpdateFleetMetadata" - -// UpdateFleetMetadataRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFleetMetadata operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFleetMetadata for more information on using the UpdateFleetMetadata -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateFleetMetadataRequest method. -// req, resp := client.UpdateFleetMetadataRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateFleetMetadata -func (c *WorkLink) UpdateFleetMetadataRequest(input *UpdateFleetMetadataInput) (req *request.Request, output *UpdateFleetMetadataOutput) { - op := &request.Operation{ - Name: opUpdateFleetMetadata, - HTTPMethod: "POST", - HTTPPath: "/UpdateFleetMetadata", - } - - if input == nil { - input = &UpdateFleetMetadataInput{} - } - - output = &UpdateFleetMetadataOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateFleetMetadata API operation for Amazon WorkLink. -// -// Updates fleet metadata, such as DisplayName. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation UpdateFleetMetadata for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateFleetMetadata -func (c *WorkLink) UpdateFleetMetadata(input *UpdateFleetMetadataInput) (*UpdateFleetMetadataOutput, error) { - req, out := c.UpdateFleetMetadataRequest(input) - return out, req.Send() -} - -// UpdateFleetMetadataWithContext is the same as UpdateFleetMetadata with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFleetMetadata for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) UpdateFleetMetadataWithContext(ctx aws.Context, input *UpdateFleetMetadataInput, opts ...request.Option) (*UpdateFleetMetadataOutput, error) { - req, out := c.UpdateFleetMetadataRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateIdentityProviderConfiguration = "UpdateIdentityProviderConfiguration" - -// UpdateIdentityProviderConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateIdentityProviderConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateIdentityProviderConfiguration for more information on using the UpdateIdentityProviderConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateIdentityProviderConfigurationRequest method. -// req, resp := client.UpdateIdentityProviderConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateIdentityProviderConfiguration -func (c *WorkLink) UpdateIdentityProviderConfigurationRequest(input *UpdateIdentityProviderConfigurationInput) (req *request.Request, output *UpdateIdentityProviderConfigurationOutput) { - op := &request.Operation{ - Name: opUpdateIdentityProviderConfiguration, - HTTPMethod: "POST", - HTTPPath: "/updateIdentityProviderConfiguration", - } - - if input == nil { - input = &UpdateIdentityProviderConfigurationInput{} - } - - output = &UpdateIdentityProviderConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateIdentityProviderConfiguration API operation for Amazon WorkLink. -// -// Updates the identity provider configuration for the fleet. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkLink's -// API operation UpdateIdentityProviderConfiguration for usage and error information. -// -// Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// You are not authorized to perform this action. -// -// * ErrCodeInternalServerErrorException "InternalServerErrorException" -// The service is temporarily unavailable. -// -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request is not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The requested resource was not found. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// The number of requests exceeds the limit. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateIdentityProviderConfiguration -func (c *WorkLink) UpdateIdentityProviderConfiguration(input *UpdateIdentityProviderConfigurationInput) (*UpdateIdentityProviderConfigurationOutput, error) { - req, out := c.UpdateIdentityProviderConfigurationRequest(input) - return out, req.Send() -} - -// UpdateIdentityProviderConfigurationWithContext is the same as UpdateIdentityProviderConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateIdentityProviderConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkLink) UpdateIdentityProviderConfigurationWithContext(ctx aws.Context, input *UpdateIdentityProviderConfigurationInput, opts ...request.Option) (*UpdateIdentityProviderConfigurationOutput, error) { - req, out := c.UpdateIdentityProviderConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -type AssociateWebsiteCertificateAuthorityInput struct { - _ struct{} `type:"structure"` - - // The root certificate of the CA. - // - // Certificate is a required field - Certificate *string `min:"1" type:"string" required:"true"` - - // The certificate name to display. - DisplayName *string `type:"string"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s AssociateWebsiteCertificateAuthorityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateWebsiteCertificateAuthorityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateWebsiteCertificateAuthorityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateWebsiteCertificateAuthorityInput"} - if s.Certificate == nil { - invalidParams.Add(request.NewErrParamRequired("Certificate")) - } - if s.Certificate != nil && len(*s.Certificate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Certificate", 1)) - } - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificate sets the Certificate field's value. -func (s *AssociateWebsiteCertificateAuthorityInput) SetCertificate(v string) *AssociateWebsiteCertificateAuthorityInput { - s.Certificate = &v - return s -} - -// SetDisplayName sets the DisplayName field's value. -func (s *AssociateWebsiteCertificateAuthorityInput) SetDisplayName(v string) *AssociateWebsiteCertificateAuthorityInput { - s.DisplayName = &v - return s -} - -// SetFleetArn sets the FleetArn field's value. -func (s *AssociateWebsiteCertificateAuthorityInput) SetFleetArn(v string) *AssociateWebsiteCertificateAuthorityInput { - s.FleetArn = &v - return s -} - -type AssociateWebsiteCertificateAuthorityOutput struct { - _ struct{} `type:"structure"` - - // A unique identifier for the CA. - WebsiteCaId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s AssociateWebsiteCertificateAuthorityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateWebsiteCertificateAuthorityOutput) GoString() string { - return s.String() -} - -// SetWebsiteCaId sets the WebsiteCaId field's value. -func (s *AssociateWebsiteCertificateAuthorityOutput) SetWebsiteCaId(v string) *AssociateWebsiteCertificateAuthorityOutput { - s.WebsiteCaId = &v - return s -} - -type CreateFleetInput struct { - _ struct{} `type:"structure"` - - // The fleet name to display. - DisplayName *string `type:"string"` - - // A unique name for the fleet. - // - // FleetName is a required field - FleetName *string `min:"1" type:"string" required:"true"` - - // The option to optimize for better performance by routing traffic through - // the closest AWS Region to users, which may be outside of your home Region. - OptimizeForEndUserLocation *bool `type:"boolean"` -} - -// String returns the string representation -func (s CreateFleetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFleetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFleetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFleetInput"} - if s.FleetName == nil { - invalidParams.Add(request.NewErrParamRequired("FleetName")) - } - if s.FleetName != nil && len(*s.FleetName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FleetName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDisplayName sets the DisplayName field's value. -func (s *CreateFleetInput) SetDisplayName(v string) *CreateFleetInput { - s.DisplayName = &v - return s -} - -// SetFleetName sets the FleetName field's value. -func (s *CreateFleetInput) SetFleetName(v string) *CreateFleetInput { - s.FleetName = &v - return s -} - -// SetOptimizeForEndUserLocation sets the OptimizeForEndUserLocation field's value. -func (s *CreateFleetInput) SetOptimizeForEndUserLocation(v bool) *CreateFleetInput { - s.OptimizeForEndUserLocation = &v - return s -} - -type CreateFleetOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the fleet. - FleetArn *string `min:"20" type:"string"` -} - -// String returns the string representation -func (s CreateFleetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateFleetOutput) GoString() string { - return s.String() -} - -// SetFleetArn sets the FleetArn field's value. -func (s *CreateFleetOutput) SetFleetArn(v string) *CreateFleetOutput { - s.FleetArn = &v - return s -} - -type DeleteFleetInput struct { - _ struct{} `type:"structure"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteFleetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFleetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFleetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFleetInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetArn sets the FleetArn field's value. -func (s *DeleteFleetInput) SetFleetArn(v string) *DeleteFleetInput { - s.FleetArn = &v - return s -} - -type DeleteFleetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteFleetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFleetOutput) GoString() string { - return s.String() -} - -type DescribeAuditStreamConfigurationInput struct { - _ struct{} `type:"structure"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeAuditStreamConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAuditStreamConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAuditStreamConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAuditStreamConfigurationInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetArn sets the FleetArn field's value. -func (s *DescribeAuditStreamConfigurationInput) SetFleetArn(v string) *DescribeAuditStreamConfigurationInput { - s.FleetArn = &v - return s -} - -type DescribeAuditStreamConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The ARN of the Amazon Kinesis data stream that will receive the audit events. - AuditStreamArn *string `type:"string"` -} - -// String returns the string representation -func (s DescribeAuditStreamConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAuditStreamConfigurationOutput) GoString() string { - return s.String() -} - -// SetAuditStreamArn sets the AuditStreamArn field's value. -func (s *DescribeAuditStreamConfigurationOutput) SetAuditStreamArn(v string) *DescribeAuditStreamConfigurationOutput { - s.AuditStreamArn = &v - return s -} - -type DescribeCompanyNetworkConfigurationInput struct { - _ struct{} `type:"structure"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeCompanyNetworkConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCompanyNetworkConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCompanyNetworkConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCompanyNetworkConfigurationInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetArn sets the FleetArn field's value. -func (s *DescribeCompanyNetworkConfigurationInput) SetFleetArn(v string) *DescribeCompanyNetworkConfigurationInput { - s.FleetArn = &v - return s -} - -type DescribeCompanyNetworkConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The security groups associated with access to the provided subnets. - SecurityGroupIds []*string `type:"list"` - - // The subnets used for X-ENI connections from Amazon WorkLink rendering containers. - SubnetIds []*string `type:"list"` - - // The VPC with connectivity to associated websites. - VpcId *string `type:"string"` -} - -// String returns the string representation -func (s DescribeCompanyNetworkConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCompanyNetworkConfigurationOutput) GoString() string { - return s.String() -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *DescribeCompanyNetworkConfigurationOutput) SetSecurityGroupIds(v []*string) *DescribeCompanyNetworkConfigurationOutput { - s.SecurityGroupIds = v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *DescribeCompanyNetworkConfigurationOutput) SetSubnetIds(v []*string) *DescribeCompanyNetworkConfigurationOutput { - s.SubnetIds = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DescribeCompanyNetworkConfigurationOutput) SetVpcId(v string) *DescribeCompanyNetworkConfigurationOutput { - s.VpcId = &v - return s -} - -type DescribeDeviceInput struct { - _ struct{} `type:"structure"` - - // A unique identifier for a registered user's device. - // - // DeviceId is a required field - DeviceId *string `min:"1" type:"string" required:"true"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeDeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDeviceInput"} - if s.DeviceId == nil { - invalidParams.Add(request.NewErrParamRequired("DeviceId")) - } - if s.DeviceId != nil && len(*s.DeviceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1)) - } - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeviceId sets the DeviceId field's value. -func (s *DescribeDeviceInput) SetDeviceId(v string) *DescribeDeviceInput { - s.DeviceId = &v - return s -} - -// SetFleetArn sets the FleetArn field's value. -func (s *DescribeDeviceInput) SetFleetArn(v string) *DescribeDeviceInput { - s.FleetArn = &v - return s -} - -type DescribeDeviceOutput struct { - _ struct{} `type:"structure"` - - // The date that the device first signed in to Amazon WorkLink. - FirstAccessedTime *time.Time `type:"timestamp"` - - // The date that the device last accessed Amazon WorkLink. - LastAccessedTime *time.Time `type:"timestamp"` - - // The manufacturer of the device. - Manufacturer *string `min:"1" type:"string"` - - // The model of the device. - Model *string `min:"1" type:"string"` - - // The operating system of the device. - OperatingSystem *string `min:"1" type:"string"` - - // The operating system version of the device. - OperatingSystemVersion *string `min:"1" type:"string"` - - // The operating system patch level of the device. - PatchLevel *string `min:"1" type:"string"` - - // The current state of the device. - Status *string `type:"string" enum:"DeviceStatus"` - - // The user name associated with the device. - Username *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeDeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDeviceOutput) GoString() string { - return s.String() -} - -// SetFirstAccessedTime sets the FirstAccessedTime field's value. -func (s *DescribeDeviceOutput) SetFirstAccessedTime(v time.Time) *DescribeDeviceOutput { - s.FirstAccessedTime = &v - return s -} - -// SetLastAccessedTime sets the LastAccessedTime field's value. -func (s *DescribeDeviceOutput) SetLastAccessedTime(v time.Time) *DescribeDeviceOutput { - s.LastAccessedTime = &v - return s -} - -// SetManufacturer sets the Manufacturer field's value. -func (s *DescribeDeviceOutput) SetManufacturer(v string) *DescribeDeviceOutput { - s.Manufacturer = &v - return s -} - -// SetModel sets the Model field's value. -func (s *DescribeDeviceOutput) SetModel(v string) *DescribeDeviceOutput { - s.Model = &v - return s -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *DescribeDeviceOutput) SetOperatingSystem(v string) *DescribeDeviceOutput { - s.OperatingSystem = &v - return s -} - -// SetOperatingSystemVersion sets the OperatingSystemVersion field's value. -func (s *DescribeDeviceOutput) SetOperatingSystemVersion(v string) *DescribeDeviceOutput { - s.OperatingSystemVersion = &v - return s -} - -// SetPatchLevel sets the PatchLevel field's value. -func (s *DescribeDeviceOutput) SetPatchLevel(v string) *DescribeDeviceOutput { - s.PatchLevel = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeDeviceOutput) SetStatus(v string) *DescribeDeviceOutput { - s.Status = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *DescribeDeviceOutput) SetUsername(v string) *DescribeDeviceOutput { - s.Username = &v - return s -} - -type DescribeDevicePolicyConfigurationInput struct { - _ struct{} `type:"structure"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeDevicePolicyConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDevicePolicyConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDevicePolicyConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDevicePolicyConfigurationInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetArn sets the FleetArn field's value. -func (s *DescribeDevicePolicyConfigurationInput) SetFleetArn(v string) *DescribeDevicePolicyConfigurationInput { - s.FleetArn = &v - return s -} - -type DescribeDevicePolicyConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The certificate chain, including intermediate certificates and the root certificate - // authority certificate used to issue device certificates. - DeviceCaCertificate *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeDevicePolicyConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeDevicePolicyConfigurationOutput) GoString() string { - return s.String() -} - -// SetDeviceCaCertificate sets the DeviceCaCertificate field's value. -func (s *DescribeDevicePolicyConfigurationOutput) SetDeviceCaCertificate(v string) *DescribeDevicePolicyConfigurationOutput { - s.DeviceCaCertificate = &v - return s -} - -type DescribeFleetMetadataInput struct { - _ struct{} `type:"structure"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeFleetMetadataInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetMetadataInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFleetMetadataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFleetMetadataInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetArn sets the FleetArn field's value. -func (s *DescribeFleetMetadataInput) SetFleetArn(v string) *DescribeFleetMetadataInput { - s.FleetArn = &v - return s -} - -type DescribeFleetMetadataOutput struct { - _ struct{} `type:"structure"` - - // The identifier used by users to sign in to the Amazon WorkLink app. - CompanyCode *string `min:"1" type:"string"` - - // The time that the fleet was created. - CreatedTime *time.Time `type:"timestamp"` - - // The name to display. - DisplayName *string `type:"string"` - - // The name of the fleet. - FleetName *string `min:"1" type:"string"` - - // The current state of the fleet. - FleetStatus *string `type:"string" enum:"FleetStatus"` - - // The time that the fleet was last updated. - LastUpdatedTime *time.Time `type:"timestamp"` - - // The option to optimize for better performance by routing traffic through - // the closest AWS Region to users, which may be outside of your home Region. - OptimizeForEndUserLocation *bool `type:"boolean"` -} - -// String returns the string representation -func (s DescribeFleetMetadataOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeFleetMetadataOutput) GoString() string { - return s.String() -} - -// SetCompanyCode sets the CompanyCode field's value. -func (s *DescribeFleetMetadataOutput) SetCompanyCode(v string) *DescribeFleetMetadataOutput { - s.CompanyCode = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *DescribeFleetMetadataOutput) SetCreatedTime(v time.Time) *DescribeFleetMetadataOutput { - s.CreatedTime = &v - return s -} - -// SetDisplayName sets the DisplayName field's value. -func (s *DescribeFleetMetadataOutput) SetDisplayName(v string) *DescribeFleetMetadataOutput { - s.DisplayName = &v - return s -} - -// SetFleetName sets the FleetName field's value. -func (s *DescribeFleetMetadataOutput) SetFleetName(v string) *DescribeFleetMetadataOutput { - s.FleetName = &v - return s -} - -// SetFleetStatus sets the FleetStatus field's value. -func (s *DescribeFleetMetadataOutput) SetFleetStatus(v string) *DescribeFleetMetadataOutput { - s.FleetStatus = &v - return s -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *DescribeFleetMetadataOutput) SetLastUpdatedTime(v time.Time) *DescribeFleetMetadataOutput { - s.LastUpdatedTime = &v - return s -} - -// SetOptimizeForEndUserLocation sets the OptimizeForEndUserLocation field's value. -func (s *DescribeFleetMetadataOutput) SetOptimizeForEndUserLocation(v bool) *DescribeFleetMetadataOutput { - s.OptimizeForEndUserLocation = &v - return s -} - -type DescribeIdentityProviderConfigurationInput struct { - _ struct{} `type:"structure"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeIdentityProviderConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIdentityProviderConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeIdentityProviderConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityProviderConfigurationInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetArn sets the FleetArn field's value. -func (s *DescribeIdentityProviderConfigurationInput) SetFleetArn(v string) *DescribeIdentityProviderConfigurationInput { - s.FleetArn = &v - return s -} - -type DescribeIdentityProviderConfigurationOutput struct { - _ struct{} `type:"structure"` - - // The SAML metadata document provided by the user’s identity provider. - IdentityProviderSamlMetadata *string `min:"1" type:"string"` - - // The type of identity provider. - IdentityProviderType *string `type:"string" enum:"IdentityProviderType"` - - // The SAML metadata document uploaded to the user’s identity provider. - ServiceProviderSamlMetadata *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeIdentityProviderConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIdentityProviderConfigurationOutput) GoString() string { - return s.String() -} - -// SetIdentityProviderSamlMetadata sets the IdentityProviderSamlMetadata field's value. -func (s *DescribeIdentityProviderConfigurationOutput) SetIdentityProviderSamlMetadata(v string) *DescribeIdentityProviderConfigurationOutput { - s.IdentityProviderSamlMetadata = &v - return s -} - -// SetIdentityProviderType sets the IdentityProviderType field's value. -func (s *DescribeIdentityProviderConfigurationOutput) SetIdentityProviderType(v string) *DescribeIdentityProviderConfigurationOutput { - s.IdentityProviderType = &v - return s -} - -// SetServiceProviderSamlMetadata sets the ServiceProviderSamlMetadata field's value. -func (s *DescribeIdentityProviderConfigurationOutput) SetServiceProviderSamlMetadata(v string) *DescribeIdentityProviderConfigurationOutput { - s.ServiceProviderSamlMetadata = &v - return s -} - -type DescribeWebsiteCertificateAuthorityInput struct { - _ struct{} `type:"structure"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` - - // A unique identifier for the certificate authority. - // - // WebsiteCaId is a required field - WebsiteCaId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeWebsiteCertificateAuthorityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWebsiteCertificateAuthorityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeWebsiteCertificateAuthorityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeWebsiteCertificateAuthorityInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - if s.WebsiteCaId == nil { - invalidParams.Add(request.NewErrParamRequired("WebsiteCaId")) - } - if s.WebsiteCaId != nil && len(*s.WebsiteCaId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WebsiteCaId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetArn sets the FleetArn field's value. -func (s *DescribeWebsiteCertificateAuthorityInput) SetFleetArn(v string) *DescribeWebsiteCertificateAuthorityInput { - s.FleetArn = &v - return s -} - -// SetWebsiteCaId sets the WebsiteCaId field's value. -func (s *DescribeWebsiteCertificateAuthorityInput) SetWebsiteCaId(v string) *DescribeWebsiteCertificateAuthorityInput { - s.WebsiteCaId = &v - return s -} - -type DescribeWebsiteCertificateAuthorityOutput struct { - _ struct{} `type:"structure"` - - // The root certificate of the certificate authority. - Certificate *string `min:"1" type:"string"` - - // The time that the certificate authority was added. - CreatedTime *time.Time `type:"timestamp"` - - // The certificate name to display. - DisplayName *string `type:"string"` -} - -// String returns the string representation -func (s DescribeWebsiteCertificateAuthorityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWebsiteCertificateAuthorityOutput) GoString() string { - return s.String() -} - -// SetCertificate sets the Certificate field's value. -func (s *DescribeWebsiteCertificateAuthorityOutput) SetCertificate(v string) *DescribeWebsiteCertificateAuthorityOutput { - s.Certificate = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *DescribeWebsiteCertificateAuthorityOutput) SetCreatedTime(v time.Time) *DescribeWebsiteCertificateAuthorityOutput { - s.CreatedTime = &v - return s -} - -// SetDisplayName sets the DisplayName field's value. -func (s *DescribeWebsiteCertificateAuthorityOutput) SetDisplayName(v string) *DescribeWebsiteCertificateAuthorityOutput { - s.DisplayName = &v - return s -} - -// The summary of devices. -type DeviceSummary struct { - _ struct{} `type:"structure"` - - // The ID of the device. - DeviceId *string `min:"1" type:"string"` - - // The status of the device. - DeviceStatus *string `type:"string" enum:"DeviceStatus"` -} - -// String returns the string representation -func (s DeviceSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeviceSummary) GoString() string { - return s.String() -} - -// SetDeviceId sets the DeviceId field's value. -func (s *DeviceSummary) SetDeviceId(v string) *DeviceSummary { - s.DeviceId = &v - return s -} - -// SetDeviceStatus sets the DeviceStatus field's value. -func (s *DeviceSummary) SetDeviceStatus(v string) *DeviceSummary { - s.DeviceStatus = &v - return s -} - -type DisassociateWebsiteCertificateAuthorityInput struct { - _ struct{} `type:"structure"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` - - // A unique identifier for the CA. - // - // WebsiteCaId is a required field - WebsiteCaId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DisassociateWebsiteCertificateAuthorityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateWebsiteCertificateAuthorityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateWebsiteCertificateAuthorityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateWebsiteCertificateAuthorityInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - if s.WebsiteCaId == nil { - invalidParams.Add(request.NewErrParamRequired("WebsiteCaId")) - } - if s.WebsiteCaId != nil && len(*s.WebsiteCaId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WebsiteCaId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetArn sets the FleetArn field's value. -func (s *DisassociateWebsiteCertificateAuthorityInput) SetFleetArn(v string) *DisassociateWebsiteCertificateAuthorityInput { - s.FleetArn = &v - return s -} - -// SetWebsiteCaId sets the WebsiteCaId field's value. -func (s *DisassociateWebsiteCertificateAuthorityInput) SetWebsiteCaId(v string) *DisassociateWebsiteCertificateAuthorityInput { - s.WebsiteCaId = &v - return s -} - -type DisassociateWebsiteCertificateAuthorityOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateWebsiteCertificateAuthorityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateWebsiteCertificateAuthorityOutput) GoString() string { - return s.String() -} - -// The summary of the fleet. -type FleetSummary struct { - _ struct{} `type:"structure"` - - // The identifier used by users to sign into the Amazon WorkLink app. - CompanyCode *string `min:"1" type:"string"` - - // The time when the fleet was created. - CreatedTime *time.Time `type:"timestamp"` - - // The name to display. - DisplayName *string `type:"string"` - - // The ARN of the fleet. - FleetArn *string `min:"20" type:"string"` - - // The name of the fleet. - FleetName *string `min:"1" type:"string"` - - // The status of the fleet. - FleetStatus *string `type:"string" enum:"FleetStatus"` - - // The time when the fleet was last updated. - LastUpdatedTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s FleetSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FleetSummary) GoString() string { - return s.String() -} - -// SetCompanyCode sets the CompanyCode field's value. -func (s *FleetSummary) SetCompanyCode(v string) *FleetSummary { - s.CompanyCode = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *FleetSummary) SetCreatedTime(v time.Time) *FleetSummary { - s.CreatedTime = &v - return s -} - -// SetDisplayName sets the DisplayName field's value. -func (s *FleetSummary) SetDisplayName(v string) *FleetSummary { - s.DisplayName = &v - return s -} - -// SetFleetArn sets the FleetArn field's value. -func (s *FleetSummary) SetFleetArn(v string) *FleetSummary { - s.FleetArn = &v - return s -} - -// SetFleetName sets the FleetName field's value. -func (s *FleetSummary) SetFleetName(v string) *FleetSummary { - s.FleetName = &v - return s -} - -// SetFleetStatus sets the FleetStatus field's value. -func (s *FleetSummary) SetFleetStatus(v string) *FleetSummary { - s.FleetStatus = &v - return s -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *FleetSummary) SetLastUpdatedTime(v time.Time) *FleetSummary { - s.LastUpdatedTime = &v - return s -} - -type ListDevicesInput struct { - _ struct{} `type:"structure"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` - - // The maximum number of results to be included in the next page. - MaxResults *int64 `min:"1" type:"integer"` - - // The pagination token used to retrieve the next page of results for this operation. - // If this value is null, it retrieves the first page. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListDevicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDevicesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDevicesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDevicesInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetArn sets the FleetArn field's value. -func (s *ListDevicesInput) SetFleetArn(v string) *ListDevicesInput { - s.FleetArn = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListDevicesInput) SetMaxResults(v int64) *ListDevicesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDevicesInput) SetNextToken(v string) *ListDevicesInput { - s.NextToken = &v - return s -} - -type ListDevicesOutput struct { - _ struct{} `type:"structure"` - - // Information about the devices. - Devices []*DeviceSummary `type:"list"` - - // The pagination token used to retrieve the next page of results for this operation. - // If there are no more pages, this value is null. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListDevicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDevicesOutput) GoString() string { - return s.String() -} - -// SetDevices sets the Devices field's value. -func (s *ListDevicesOutput) SetDevices(v []*DeviceSummary) *ListDevicesOutput { - s.Devices = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListDevicesOutput) SetNextToken(v string) *ListDevicesOutput { - s.NextToken = &v - return s -} - -type ListFleetsInput struct { - _ struct{} `type:"structure"` - - // The maximum number of results to be included in the next page. - MaxResults *int64 `min:"1" type:"integer"` - - // The pagination token used to retrieve the next page of results for this operation. - // If this value is null, it retrieves the first page. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListFleetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFleetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListFleetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListFleetsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListFleetsInput) SetMaxResults(v int64) *ListFleetsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListFleetsInput) SetNextToken(v string) *ListFleetsInput { - s.NextToken = &v - return s -} - -type ListFleetsOutput struct { - _ struct{} `type:"structure"` - - // The summary list of the fleets. - FleetSummaryList []*FleetSummary `type:"list"` - - // The pagination token used to retrieve the next page of results for this operation. - // If there are no more pages, this value is null. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListFleetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListFleetsOutput) GoString() string { - return s.String() -} - -// SetFleetSummaryList sets the FleetSummaryList field's value. -func (s *ListFleetsOutput) SetFleetSummaryList(v []*FleetSummary) *ListFleetsOutput { - s.FleetSummaryList = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListFleetsOutput) SetNextToken(v string) *ListFleetsOutput { - s.NextToken = &v - return s -} - -type ListWebsiteCertificateAuthoritiesInput struct { - _ struct{} `type:"structure"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` - - // The maximum number of results to be included in the next page. - MaxResults *int64 `min:"1" type:"integer"` - - // The pagination token used to retrieve the next page of results for this operation. - // If this value is null, it retrieves the first page. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListWebsiteCertificateAuthoritiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListWebsiteCertificateAuthoritiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListWebsiteCertificateAuthoritiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListWebsiteCertificateAuthoritiesInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetArn sets the FleetArn field's value. -func (s *ListWebsiteCertificateAuthoritiesInput) SetFleetArn(v string) *ListWebsiteCertificateAuthoritiesInput { - s.FleetArn = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListWebsiteCertificateAuthoritiesInput) SetMaxResults(v int64) *ListWebsiteCertificateAuthoritiesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListWebsiteCertificateAuthoritiesInput) SetNextToken(v string) *ListWebsiteCertificateAuthoritiesInput { - s.NextToken = &v - return s -} - -type ListWebsiteCertificateAuthoritiesOutput struct { - _ struct{} `type:"structure"` - - // The pagination token used to retrieve the next page of results for this operation. - // If there are no more pages, this value is null. - NextToken *string `min:"1" type:"string"` - - // Information about the certificates. - WebsiteCertificateAuthorities []*WebsiteCaSummary `type:"list"` -} - -// String returns the string representation -func (s ListWebsiteCertificateAuthoritiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListWebsiteCertificateAuthoritiesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListWebsiteCertificateAuthoritiesOutput) SetNextToken(v string) *ListWebsiteCertificateAuthoritiesOutput { - s.NextToken = &v - return s -} - -// SetWebsiteCertificateAuthorities sets the WebsiteCertificateAuthorities field's value. -func (s *ListWebsiteCertificateAuthoritiesOutput) SetWebsiteCertificateAuthorities(v []*WebsiteCaSummary) *ListWebsiteCertificateAuthoritiesOutput { - s.WebsiteCertificateAuthorities = v - return s -} - -type SignOutUserInput struct { - _ struct{} `type:"structure"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` - - // The name of the user. - // - // Username is a required field - Username *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s SignOutUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SignOutUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SignOutUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SignOutUserInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - if s.Username == nil { - invalidParams.Add(request.NewErrParamRequired("Username")) - } - if s.Username != nil && len(*s.Username) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Username", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetArn sets the FleetArn field's value. -func (s *SignOutUserInput) SetFleetArn(v string) *SignOutUserInput { - s.FleetArn = &v - return s -} - -// SetUsername sets the Username field's value. -func (s *SignOutUserInput) SetUsername(v string) *SignOutUserInput { - s.Username = &v - return s -} - -type SignOutUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s SignOutUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s SignOutUserOutput) GoString() string { - return s.String() -} - -type UpdateAuditStreamConfigurationInput struct { - _ struct{} `type:"structure"` - - // The ARN of the Amazon Kinesis data stream that receives the audit events. - AuditStreamArn *string `type:"string"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateAuditStreamConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAuditStreamConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAuditStreamConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAuditStreamConfigurationInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuditStreamArn sets the AuditStreamArn field's value. -func (s *UpdateAuditStreamConfigurationInput) SetAuditStreamArn(v string) *UpdateAuditStreamConfigurationInput { - s.AuditStreamArn = &v - return s -} - -// SetFleetArn sets the FleetArn field's value. -func (s *UpdateAuditStreamConfigurationInput) SetFleetArn(v string) *UpdateAuditStreamConfigurationInput { - s.FleetArn = &v - return s -} - -type UpdateAuditStreamConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateAuditStreamConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateAuditStreamConfigurationOutput) GoString() string { - return s.String() -} - -type UpdateCompanyNetworkConfigurationInput struct { - _ struct{} `type:"structure"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` - - // The security groups associated with access to the provided subnets. - // - // SecurityGroupIds is a required field - SecurityGroupIds []*string `type:"list" required:"true"` - - // The subnets used for X-ENI connections from Amazon WorkLink rendering containers. - // - // SubnetIds is a required field - SubnetIds []*string `type:"list" required:"true"` - - // The VPC with connectivity to associated websites. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateCompanyNetworkConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCompanyNetworkConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCompanyNetworkConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCompanyNetworkConfigurationInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - if s.SecurityGroupIds == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) - } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetArn sets the FleetArn field's value. -func (s *UpdateCompanyNetworkConfigurationInput) SetFleetArn(v string) *UpdateCompanyNetworkConfigurationInput { - s.FleetArn = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *UpdateCompanyNetworkConfigurationInput) SetSecurityGroupIds(v []*string) *UpdateCompanyNetworkConfigurationInput { - s.SecurityGroupIds = v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *UpdateCompanyNetworkConfigurationInput) SetSubnetIds(v []*string) *UpdateCompanyNetworkConfigurationInput { - s.SubnetIds = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *UpdateCompanyNetworkConfigurationInput) SetVpcId(v string) *UpdateCompanyNetworkConfigurationInput { - s.VpcId = &v - return s -} - -type UpdateCompanyNetworkConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateCompanyNetworkConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateCompanyNetworkConfigurationOutput) GoString() string { - return s.String() -} - -type UpdateDevicePolicyConfigurationInput struct { - _ struct{} `type:"structure"` - - // The certificate chain, including intermediate certificates and the root certificate - // authority certificate used to issue device certificates. - DeviceCaCertificate *string `min:"1" type:"string"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation -func (s UpdateDevicePolicyConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDevicePolicyConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDevicePolicyConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDevicePolicyConfigurationInput"} - if s.DeviceCaCertificate != nil && len(*s.DeviceCaCertificate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeviceCaCertificate", 1)) - } - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeviceCaCertificate sets the DeviceCaCertificate field's value. -func (s *UpdateDevicePolicyConfigurationInput) SetDeviceCaCertificate(v string) *UpdateDevicePolicyConfigurationInput { - s.DeviceCaCertificate = &v - return s -} - -// SetFleetArn sets the FleetArn field's value. -func (s *UpdateDevicePolicyConfigurationInput) SetFleetArn(v string) *UpdateDevicePolicyConfigurationInput { - s.FleetArn = &v - return s -} - -type UpdateDevicePolicyConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateDevicePolicyConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateDevicePolicyConfigurationOutput) GoString() string { - return s.String() -} - -type UpdateFleetMetadataInput struct { - _ struct{} `type:"structure"` - - // The fleet name to display. The existing DisplayName is unset if null is passed. - DisplayName *string `type:"string"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` - - // The option to optimize for better performance by routing traffic through - // the closest AWS Region to users, which may be outside of your home Region. - OptimizeForEndUserLocation *bool `type:"boolean"` -} - -// String returns the string representation -func (s UpdateFleetMetadataInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFleetMetadataInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFleetMetadataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFleetMetadataInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDisplayName sets the DisplayName field's value. -func (s *UpdateFleetMetadataInput) SetDisplayName(v string) *UpdateFleetMetadataInput { - s.DisplayName = &v - return s -} - -// SetFleetArn sets the FleetArn field's value. -func (s *UpdateFleetMetadataInput) SetFleetArn(v string) *UpdateFleetMetadataInput { - s.FleetArn = &v - return s -} - -// SetOptimizeForEndUserLocation sets the OptimizeForEndUserLocation field's value. -func (s *UpdateFleetMetadataInput) SetOptimizeForEndUserLocation(v bool) *UpdateFleetMetadataInput { - s.OptimizeForEndUserLocation = &v - return s -} - -type UpdateFleetMetadataOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateFleetMetadataOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateFleetMetadataOutput) GoString() string { - return s.String() -} - -type UpdateIdentityProviderConfigurationInput struct { - _ struct{} `type:"structure"` - - // The ARN of the fleet. - // - // FleetArn is a required field - FleetArn *string `min:"20" type:"string" required:"true"` - - // The SAML metadata document provided by the customer’s identity provider. - // The existing IdentityProviderSamlMetadata is unset if null is passed. - IdentityProviderSamlMetadata *string `min:"1" type:"string"` - - // The type of identity provider. - // - // IdentityProviderType is a required field - IdentityProviderType *string `type:"string" required:"true" enum:"IdentityProviderType"` -} - -// String returns the string representation -func (s UpdateIdentityProviderConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIdentityProviderConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateIdentityProviderConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateIdentityProviderConfigurationInput"} - if s.FleetArn == nil { - invalidParams.Add(request.NewErrParamRequired("FleetArn")) - } - if s.FleetArn != nil && len(*s.FleetArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) - } - if s.IdentityProviderSamlMetadata != nil && len(*s.IdentityProviderSamlMetadata) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IdentityProviderSamlMetadata", 1)) - } - if s.IdentityProviderType == nil { - invalidParams.Add(request.NewErrParamRequired("IdentityProviderType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFleetArn sets the FleetArn field's value. -func (s *UpdateIdentityProviderConfigurationInput) SetFleetArn(v string) *UpdateIdentityProviderConfigurationInput { - s.FleetArn = &v - return s -} - -// SetIdentityProviderSamlMetadata sets the IdentityProviderSamlMetadata field's value. -func (s *UpdateIdentityProviderConfigurationInput) SetIdentityProviderSamlMetadata(v string) *UpdateIdentityProviderConfigurationInput { - s.IdentityProviderSamlMetadata = &v - return s -} - -// SetIdentityProviderType sets the IdentityProviderType field's value. -func (s *UpdateIdentityProviderConfigurationInput) SetIdentityProviderType(v string) *UpdateIdentityProviderConfigurationInput { - s.IdentityProviderType = &v - return s -} - -type UpdateIdentityProviderConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateIdentityProviderConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateIdentityProviderConfigurationOutput) GoString() string { - return s.String() -} - -// The summary of the certificate authority (CA). -type WebsiteCaSummary struct { - _ struct{} `type:"structure"` - - // The time when the CA was added. - CreatedTime *time.Time `type:"timestamp"` - - // The name to display. - DisplayName *string `type:"string"` - - // A unique identifier for the CA. - WebsiteCaId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s WebsiteCaSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WebsiteCaSummary) GoString() string { - return s.String() -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *WebsiteCaSummary) SetCreatedTime(v time.Time) *WebsiteCaSummary { - s.CreatedTime = &v - return s -} - -// SetDisplayName sets the DisplayName field's value. -func (s *WebsiteCaSummary) SetDisplayName(v string) *WebsiteCaSummary { - s.DisplayName = &v - return s -} - -// SetWebsiteCaId sets the WebsiteCaId field's value. -func (s *WebsiteCaSummary) SetWebsiteCaId(v string) *WebsiteCaSummary { - s.WebsiteCaId = &v - return s -} - -const ( - // DeviceStatusActive is a DeviceStatus enum value - DeviceStatusActive = "ACTIVE" - - // DeviceStatusSignedOut is a DeviceStatus enum value - DeviceStatusSignedOut = "SIGNED_OUT" -) - -const ( - // FleetStatusCreating is a FleetStatus enum value - FleetStatusCreating = "CREATING" - - // FleetStatusActive is a FleetStatus enum value - FleetStatusActive = "ACTIVE" - - // FleetStatusDeleting is a FleetStatus enum value - FleetStatusDeleting = "DELETING" - - // FleetStatusDeleted is a FleetStatus enum value - FleetStatusDeleted = "DELETED" - - // FleetStatusFailedToCreate is a FleetStatus enum value - FleetStatusFailedToCreate = "FAILED_TO_CREATE" - - // FleetStatusFailedToDelete is a FleetStatus enum value - FleetStatusFailedToDelete = "FAILED_TO_DELETE" -) - -const ( - // IdentityProviderTypeSaml is a IdentityProviderType enum value - IdentityProviderTypeSaml = "SAML" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/worklink/doc.go b/vendor/github.com/aws/aws-sdk-go/service/worklink/doc.go deleted file mode 100644 index 691b27039..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/worklink/doc.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package worklink provides the client and types for making API -// requests to Amazon WorkLink. -// -// Amazon WorkLink is a cloud-based service that provides secure access to internal -// websites and web apps from iOS phones. In a single step, your users, such -// as employees, can access internal websites as efficiently as they access -// any other public website. They enter a URL in their web browser, or choose -// a link to an internal website in an email. Amazon WorkLink authenticates -// the user's access and securely renders authorized internal web content in -// a secure rendering service in the AWS cloud. Amazon WorkLink doesn't download -// or store any internal web content on mobile devices. -// -// See https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25 for more information on this service. -// -// See worklink package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/worklink/ -// -// Using the Client -// -// To contact Amazon WorkLink with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon WorkLink client WorkLink for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/worklink/#New -package worklink diff --git a/vendor/github.com/aws/aws-sdk-go/service/worklink/errors.go b/vendor/github.com/aws/aws-sdk-go/service/worklink/errors.go deleted file mode 100644 index 2d13a2eba..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/worklink/errors.go +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package worklink - -const ( - - // ErrCodeInternalServerErrorException for service response error code - // "InternalServerErrorException". - // - // The service is temporarily unavailable. - ErrCodeInternalServerErrorException = "InternalServerErrorException" - - // ErrCodeInvalidRequestException for service response error code - // "InvalidRequestException". - // - // The request is not valid. - ErrCodeInvalidRequestException = "InvalidRequestException" - - // ErrCodeResourceAlreadyExistsException for service response error code - // "ResourceAlreadyExistsException". - // - // The resource already exists. - ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The requested resource was not found. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeTooManyRequestsException for service response error code - // "TooManyRequestsException". - // - // The number of requests exceeds the limit. - ErrCodeTooManyRequestsException = "TooManyRequestsException" - - // ErrCodeUnauthorizedException for service response error code - // "UnauthorizedException". - // - // You are not authorized to perform this action. - ErrCodeUnauthorizedException = "UnauthorizedException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/worklink/service.go b/vendor/github.com/aws/aws-sdk-go/service/worklink/service.go deleted file mode 100644 index dd9b8be26..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/worklink/service.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package worklink - -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" -) - -// WorkLink provides the API operation methods for making requests to -// Amazon WorkLink. See this package's package overview docs -// for details on the service. -// -// WorkLink methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type WorkLink 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 = "WorkLink" // Name of service. - EndpointsID = "worklink" // ID to lookup a service endpoint with. - ServiceID = "WorkLink" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the WorkLink 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 WorkLink client from just a session. -// svc := worklink.New(mySession) -// -// // Create a WorkLink client with additional configuration -// svc := worklink.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *WorkLink { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "worklink" - } - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *WorkLink { - svc := &WorkLink{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2018-09-25", - JSONVersion: "1.1", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a WorkLink operation and runs any -// custom request initialization. -func (c *WorkLink) 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/workspaces/api.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go deleted file mode 100644 index 0892e7c78..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go +++ /dev/null @@ -1,6938 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package workspaces - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAssociateIpGroups = "AssociateIpGroups" - -// AssociateIpGroupsRequest generates a "aws/request.Request" representing the -// client's request for the AssociateIpGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateIpGroups for more information on using the AssociateIpGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AssociateIpGroupsRequest method. -// req, resp := client.AssociateIpGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AssociateIpGroups -func (c *WorkSpaces) AssociateIpGroupsRequest(input *AssociateIpGroupsInput) (req *request.Request, output *AssociateIpGroupsOutput) { - op := &request.Operation{ - Name: opAssociateIpGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateIpGroupsInput{} - } - - output = &AssociateIpGroupsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssociateIpGroups API operation for Amazon WorkSpaces. -// -// Associates the specified IP access control group with the specified directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation AssociateIpGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" -// Your resource limits have been exceeded. -// -// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" -// The state of the resource is not valid for this operation. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" -// This operation is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AssociateIpGroups -func (c *WorkSpaces) AssociateIpGroups(input *AssociateIpGroupsInput) (*AssociateIpGroupsOutput, error) { - req, out := c.AssociateIpGroupsRequest(input) - return out, req.Send() -} - -// AssociateIpGroupsWithContext is the same as AssociateIpGroups with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateIpGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) AssociateIpGroupsWithContext(ctx aws.Context, input *AssociateIpGroupsInput, opts ...request.Option) (*AssociateIpGroupsOutput, error) { - req, out := c.AssociateIpGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAuthorizeIpRules = "AuthorizeIpRules" - -// AuthorizeIpRulesRequest generates a "aws/request.Request" representing the -// client's request for the AuthorizeIpRules operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AuthorizeIpRules for more information on using the AuthorizeIpRules -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the AuthorizeIpRulesRequest method. -// req, resp := client.AuthorizeIpRulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AuthorizeIpRules -func (c *WorkSpaces) AuthorizeIpRulesRequest(input *AuthorizeIpRulesInput) (req *request.Request, output *AuthorizeIpRulesOutput) { - op := &request.Operation{ - Name: opAuthorizeIpRules, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AuthorizeIpRulesInput{} - } - - output = &AuthorizeIpRulesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AuthorizeIpRules API operation for Amazon WorkSpaces. -// -// Adds one or more rules to the specified IP access control group. -// -// This action gives users permission to access their WorkSpaces from the CIDR -// address ranges specified in the rules. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation AuthorizeIpRules for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" -// Your resource limits have been exceeded. -// -// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" -// The state of the resource is not valid for this operation. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AuthorizeIpRules -func (c *WorkSpaces) AuthorizeIpRules(input *AuthorizeIpRulesInput) (*AuthorizeIpRulesOutput, error) { - req, out := c.AuthorizeIpRulesRequest(input) - return out, req.Send() -} - -// AuthorizeIpRulesWithContext is the same as AuthorizeIpRules with the addition of -// the ability to pass a context and additional request options. -// -// See AuthorizeIpRules for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) AuthorizeIpRulesWithContext(ctx aws.Context, input *AuthorizeIpRulesInput, opts ...request.Option) (*AuthorizeIpRulesOutput, error) { - req, out := c.AuthorizeIpRulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateIpGroup = "CreateIpGroup" - -// CreateIpGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateIpGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateIpGroup for more information on using the CreateIpGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateIpGroupRequest method. -// req, resp := client.CreateIpGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateIpGroup -func (c *WorkSpaces) CreateIpGroupRequest(input *CreateIpGroupInput) (req *request.Request, output *CreateIpGroupOutput) { - op := &request.Operation{ - Name: opCreateIpGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateIpGroupInput{} - } - - output = &CreateIpGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateIpGroup API operation for Amazon WorkSpaces. -// -// Creates an IP access control group. -// -// An IP access control group provides you with the ability to control the IP -// addresses from which users are allowed to access their WorkSpaces. To specify -// the CIDR address ranges, add rules to your IP access control group and then -// associate the group with your directory. You can add rules when you create -// the group or at any time using AuthorizeIpRules. -// -// There is a default IP access control group associated with your directory. -// If you don't associate an IP access control group with your directory, the -// default group is used. The default group includes a default rule that allows -// users to access their WorkSpaces from anywhere. You cannot modify the default -// IP access control group for your directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation CreateIpGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" -// Your resource limits have been exceeded. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The specified resource already exists. -// -// * ErrCodeResourceCreationFailedException "ResourceCreationFailedException" -// The resource could not be created. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateIpGroup -func (c *WorkSpaces) CreateIpGroup(input *CreateIpGroupInput) (*CreateIpGroupOutput, error) { - req, out := c.CreateIpGroupRequest(input) - return out, req.Send() -} - -// CreateIpGroupWithContext is the same as CreateIpGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateIpGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) CreateIpGroupWithContext(ctx aws.Context, input *CreateIpGroupInput, opts ...request.Option) (*CreateIpGroupOutput, error) { - req, out := c.CreateIpGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTags = "CreateTags" - -// CreateTagsRequest generates a "aws/request.Request" representing the -// client's request for the CreateTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTags for more information on using the CreateTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateTagsRequest method. -// req, resp := client.CreateTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateTags -func (c *WorkSpaces) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) { - op := &request.Operation{ - Name: opCreateTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTagsInput{} - } - - output = &CreateTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateTags API operation for Amazon WorkSpaces. -// -// Creates the specified tags for the specified WorkSpace. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation CreateTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" -// Your resource limits have been exceeded. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateTags -func (c *WorkSpaces) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) { - req, out := c.CreateTagsRequest(input) - return out, req.Send() -} - -// CreateTagsWithContext is the same as CreateTags with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opts ...request.Option) (*CreateTagsOutput, error) { - req, out := c.CreateTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateWorkspaces = "CreateWorkspaces" - -// CreateWorkspacesRequest generates a "aws/request.Request" representing the -// client's request for the CreateWorkspaces operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateWorkspaces for more information on using the CreateWorkspaces -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the CreateWorkspacesRequest method. -// req, resp := client.CreateWorkspacesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateWorkspaces -func (c *WorkSpaces) CreateWorkspacesRequest(input *CreateWorkspacesInput) (req *request.Request, output *CreateWorkspacesOutput) { - op := &request.Operation{ - Name: opCreateWorkspaces, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateWorkspacesInput{} - } - - output = &CreateWorkspacesOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateWorkspaces API operation for Amazon WorkSpaces. -// -// Creates one or more WorkSpaces. -// -// This operation is asynchronous and returns before the WorkSpaces are created. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation CreateWorkspaces for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" -// Your resource limits have been exceeded. -// -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateWorkspaces -func (c *WorkSpaces) CreateWorkspaces(input *CreateWorkspacesInput) (*CreateWorkspacesOutput, error) { - req, out := c.CreateWorkspacesRequest(input) - return out, req.Send() -} - -// CreateWorkspacesWithContext is the same as CreateWorkspaces with the addition of -// the ability to pass a context and additional request options. -// -// See CreateWorkspaces for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) CreateWorkspacesWithContext(ctx aws.Context, input *CreateWorkspacesInput, opts ...request.Option) (*CreateWorkspacesOutput, error) { - req, out := c.CreateWorkspacesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteIpGroup = "DeleteIpGroup" - -// DeleteIpGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteIpGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteIpGroup for more information on using the DeleteIpGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteIpGroupRequest method. -// req, resp := client.DeleteIpGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteIpGroup -func (c *WorkSpaces) DeleteIpGroupRequest(input *DeleteIpGroupInput) (req *request.Request, output *DeleteIpGroupOutput) { - op := &request.Operation{ - Name: opDeleteIpGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteIpGroupInput{} - } - - output = &DeleteIpGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteIpGroup API operation for Amazon WorkSpaces. -// -// Deletes the specified IP access control group. -// -// You cannot delete an IP access control group that is associated with a directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation DeleteIpGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// * ErrCodeResourceAssociatedException "ResourceAssociatedException" -// The resource is associated with a directory. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteIpGroup -func (c *WorkSpaces) DeleteIpGroup(input *DeleteIpGroupInput) (*DeleteIpGroupOutput, error) { - req, out := c.DeleteIpGroupRequest(input) - return out, req.Send() -} - -// DeleteIpGroupWithContext is the same as DeleteIpGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteIpGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) DeleteIpGroupWithContext(ctx aws.Context, input *DeleteIpGroupInput, opts ...request.Option) (*DeleteIpGroupOutput, error) { - req, out := c.DeleteIpGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTags = "DeleteTags" - -// DeleteTagsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTags for more information on using the DeleteTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteTagsRequest method. -// req, resp := client.DeleteTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteTags -func (c *WorkSpaces) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { - op := &request.Operation{ - Name: opDeleteTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTagsInput{} - } - - output = &DeleteTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTags API operation for Amazon WorkSpaces. -// -// Deletes the specified tags from the specified WorkSpace. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation DeleteTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteTags -func (c *WorkSpaces) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - return out, req.Send() -} - -// DeleteTagsWithContext is the same as DeleteTags with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteWorkspaceImage = "DeleteWorkspaceImage" - -// DeleteWorkspaceImageRequest generates a "aws/request.Request" representing the -// client's request for the DeleteWorkspaceImage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteWorkspaceImage for more information on using the DeleteWorkspaceImage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteWorkspaceImageRequest method. -// req, resp := client.DeleteWorkspaceImageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteWorkspaceImage -func (c *WorkSpaces) DeleteWorkspaceImageRequest(input *DeleteWorkspaceImageInput) (req *request.Request, output *DeleteWorkspaceImageOutput) { - op := &request.Operation{ - Name: opDeleteWorkspaceImage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteWorkspaceImageInput{} - } - - output = &DeleteWorkspaceImageOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteWorkspaceImage API operation for Amazon WorkSpaces. -// -// Deletes the specified image from your account. To delete an image, you must -// first delete any bundles that are associated with the image. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation DeleteWorkspaceImage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceAssociatedException "ResourceAssociatedException" -// The resource is associated with a directory. -// -// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" -// The state of the resource is not valid for this operation. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteWorkspaceImage -func (c *WorkSpaces) DeleteWorkspaceImage(input *DeleteWorkspaceImageInput) (*DeleteWorkspaceImageOutput, error) { - req, out := c.DeleteWorkspaceImageRequest(input) - return out, req.Send() -} - -// DeleteWorkspaceImageWithContext is the same as DeleteWorkspaceImage with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteWorkspaceImage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) DeleteWorkspaceImageWithContext(ctx aws.Context, input *DeleteWorkspaceImageInput, opts ...request.Option) (*DeleteWorkspaceImageOutput, error) { - req, out := c.DeleteWorkspaceImageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccount = "DescribeAccount" - -// DescribeAccountRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccount for more information on using the DescribeAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAccountRequest method. -// req, resp := client.DescribeAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeAccount -func (c *WorkSpaces) DescribeAccountRequest(input *DescribeAccountInput) (req *request.Request, output *DescribeAccountOutput) { - op := &request.Operation{ - Name: opDescribeAccount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAccountInput{} - } - - output = &DescribeAccountOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccount API operation for Amazon WorkSpaces. -// -// Retrieves a list that describes the configuration of bring your own license -// (BYOL) for the specified account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation DescribeAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeAccount -func (c *WorkSpaces) DescribeAccount(input *DescribeAccountInput) (*DescribeAccountOutput, error) { - req, out := c.DescribeAccountRequest(input) - return out, req.Send() -} - -// DescribeAccountWithContext is the same as DescribeAccount with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) DescribeAccountWithContext(ctx aws.Context, input *DescribeAccountInput, opts ...request.Option) (*DescribeAccountOutput, error) { - req, out := c.DescribeAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccountModifications = "DescribeAccountModifications" - -// DescribeAccountModificationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountModifications operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccountModifications for more information on using the DescribeAccountModifications -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeAccountModificationsRequest method. -// req, resp := client.DescribeAccountModificationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeAccountModifications -func (c *WorkSpaces) DescribeAccountModificationsRequest(input *DescribeAccountModificationsInput) (req *request.Request, output *DescribeAccountModificationsOutput) { - op := &request.Operation{ - Name: opDescribeAccountModifications, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAccountModificationsInput{} - } - - output = &DescribeAccountModificationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccountModifications API operation for Amazon WorkSpaces. -// -// Retrieves a list that describes modifications to the configuration of bring -// your own license (BYOL) for the specified account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation DescribeAccountModifications for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeAccountModifications -func (c *WorkSpaces) DescribeAccountModifications(input *DescribeAccountModificationsInput) (*DescribeAccountModificationsOutput, error) { - req, out := c.DescribeAccountModificationsRequest(input) - return out, req.Send() -} - -// DescribeAccountModificationsWithContext is the same as DescribeAccountModifications with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountModifications for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) DescribeAccountModificationsWithContext(ctx aws.Context, input *DescribeAccountModificationsInput, opts ...request.Option) (*DescribeAccountModificationsOutput, error) { - req, out := c.DescribeAccountModificationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeClientProperties = "DescribeClientProperties" - -// DescribeClientPropertiesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeClientProperties operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeClientProperties for more information on using the DescribeClientProperties -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeClientPropertiesRequest method. -// req, resp := client.DescribeClientPropertiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeClientProperties -func (c *WorkSpaces) DescribeClientPropertiesRequest(input *DescribeClientPropertiesInput) (req *request.Request, output *DescribeClientPropertiesOutput) { - op := &request.Operation{ - Name: opDescribeClientProperties, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeClientPropertiesInput{} - } - - output = &DescribeClientPropertiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeClientProperties API operation for Amazon WorkSpaces. -// -// Retrieves a list that describes one or more specified Amazon WorkSpaces clients. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation DescribeClientProperties for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeClientProperties -func (c *WorkSpaces) DescribeClientProperties(input *DescribeClientPropertiesInput) (*DescribeClientPropertiesOutput, error) { - req, out := c.DescribeClientPropertiesRequest(input) - return out, req.Send() -} - -// DescribeClientPropertiesWithContext is the same as DescribeClientProperties with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeClientProperties for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) DescribeClientPropertiesWithContext(ctx aws.Context, input *DescribeClientPropertiesInput, opts ...request.Option) (*DescribeClientPropertiesOutput, error) { - req, out := c.DescribeClientPropertiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeIpGroups = "DescribeIpGroups" - -// DescribeIpGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeIpGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeIpGroups for more information on using the DescribeIpGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeIpGroupsRequest method. -// req, resp := client.DescribeIpGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeIpGroups -func (c *WorkSpaces) DescribeIpGroupsRequest(input *DescribeIpGroupsInput) (req *request.Request, output *DescribeIpGroupsOutput) { - op := &request.Operation{ - Name: opDescribeIpGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeIpGroupsInput{} - } - - output = &DescribeIpGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeIpGroups API operation for Amazon WorkSpaces. -// -// Describes one or more of your IP access control groups. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation DescribeIpGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeIpGroups -func (c *WorkSpaces) DescribeIpGroups(input *DescribeIpGroupsInput) (*DescribeIpGroupsOutput, error) { - req, out := c.DescribeIpGroupsRequest(input) - return out, req.Send() -} - -// DescribeIpGroupsWithContext is the same as DescribeIpGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeIpGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) DescribeIpGroupsWithContext(ctx aws.Context, input *DescribeIpGroupsInput, opts ...request.Option) (*DescribeIpGroupsOutput, error) { - req, out := c.DescribeIpGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTags = "DescribeTags" - -// DescribeTagsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTags for more information on using the DescribeTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeTagsRequest method. -// req, resp := client.DescribeTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeTags -func (c *WorkSpaces) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { - op := &request.Operation{ - Name: opDescribeTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTagsInput{} - } - - output = &DescribeTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTags API operation for Amazon WorkSpaces. -// -// Describes the specified tags for the specified WorkSpace. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation DescribeTags for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeTags -func (c *WorkSpaces) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - return out, req.Send() -} - -// DescribeTagsWithContext is the same as DescribeTags with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeWorkspaceBundles = "DescribeWorkspaceBundles" - -// DescribeWorkspaceBundlesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeWorkspaceBundles operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeWorkspaceBundles for more information on using the DescribeWorkspaceBundles -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeWorkspaceBundlesRequest method. -// req, resp := client.DescribeWorkspaceBundlesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceBundles -func (c *WorkSpaces) DescribeWorkspaceBundlesRequest(input *DescribeWorkspaceBundlesInput) (req *request.Request, output *DescribeWorkspaceBundlesOutput) { - op := &request.Operation{ - Name: opDescribeWorkspaceBundles, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeWorkspaceBundlesInput{} - } - - output = &DescribeWorkspaceBundlesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeWorkspaceBundles API operation for Amazon WorkSpaces. -// -// Retrieves a list that describes the available WorkSpace bundles. -// -// You can filter the results using either bundle ID or owner, but not both. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation DescribeWorkspaceBundles for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceBundles -func (c *WorkSpaces) DescribeWorkspaceBundles(input *DescribeWorkspaceBundlesInput) (*DescribeWorkspaceBundlesOutput, error) { - req, out := c.DescribeWorkspaceBundlesRequest(input) - return out, req.Send() -} - -// DescribeWorkspaceBundlesWithContext is the same as DescribeWorkspaceBundles with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeWorkspaceBundles for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) DescribeWorkspaceBundlesWithContext(ctx aws.Context, input *DescribeWorkspaceBundlesInput, opts ...request.Option) (*DescribeWorkspaceBundlesOutput, error) { - req, out := c.DescribeWorkspaceBundlesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeWorkspaceBundlesPages iterates over the pages of a DescribeWorkspaceBundles operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeWorkspaceBundles 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 DescribeWorkspaceBundles operation. -// pageNum := 0 -// err := client.DescribeWorkspaceBundlesPages(params, -// func(page *DescribeWorkspaceBundlesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *WorkSpaces) DescribeWorkspaceBundlesPages(input *DescribeWorkspaceBundlesInput, fn func(*DescribeWorkspaceBundlesOutput, bool) bool) error { - return c.DescribeWorkspaceBundlesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeWorkspaceBundlesPagesWithContext same as DescribeWorkspaceBundlesPages 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 *WorkSpaces) DescribeWorkspaceBundlesPagesWithContext(ctx aws.Context, input *DescribeWorkspaceBundlesInput, fn func(*DescribeWorkspaceBundlesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeWorkspaceBundlesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeWorkspaceBundlesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeWorkspaceBundlesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeWorkspaceDirectories = "DescribeWorkspaceDirectories" - -// DescribeWorkspaceDirectoriesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeWorkspaceDirectories operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeWorkspaceDirectories for more information on using the DescribeWorkspaceDirectories -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeWorkspaceDirectoriesRequest method. -// req, resp := client.DescribeWorkspaceDirectoriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceDirectories -func (c *WorkSpaces) DescribeWorkspaceDirectoriesRequest(input *DescribeWorkspaceDirectoriesInput) (req *request.Request, output *DescribeWorkspaceDirectoriesOutput) { - op := &request.Operation{ - Name: opDescribeWorkspaceDirectories, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeWorkspaceDirectoriesInput{} - } - - output = &DescribeWorkspaceDirectoriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeWorkspaceDirectories API operation for Amazon WorkSpaces. -// -// Describes the available AWS Directory Service directories that are registered -// with Amazon WorkSpaces. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation DescribeWorkspaceDirectories for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceDirectories -func (c *WorkSpaces) DescribeWorkspaceDirectories(input *DescribeWorkspaceDirectoriesInput) (*DescribeWorkspaceDirectoriesOutput, error) { - req, out := c.DescribeWorkspaceDirectoriesRequest(input) - return out, req.Send() -} - -// DescribeWorkspaceDirectoriesWithContext is the same as DescribeWorkspaceDirectories with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeWorkspaceDirectories for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) DescribeWorkspaceDirectoriesWithContext(ctx aws.Context, input *DescribeWorkspaceDirectoriesInput, opts ...request.Option) (*DescribeWorkspaceDirectoriesOutput, error) { - req, out := c.DescribeWorkspaceDirectoriesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeWorkspaceDirectoriesPages iterates over the pages of a DescribeWorkspaceDirectories operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeWorkspaceDirectories 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 DescribeWorkspaceDirectories operation. -// pageNum := 0 -// err := client.DescribeWorkspaceDirectoriesPages(params, -// func(page *DescribeWorkspaceDirectoriesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *WorkSpaces) DescribeWorkspaceDirectoriesPages(input *DescribeWorkspaceDirectoriesInput, fn func(*DescribeWorkspaceDirectoriesOutput, bool) bool) error { - return c.DescribeWorkspaceDirectoriesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeWorkspaceDirectoriesPagesWithContext same as DescribeWorkspaceDirectoriesPages 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 *WorkSpaces) DescribeWorkspaceDirectoriesPagesWithContext(ctx aws.Context, input *DescribeWorkspaceDirectoriesInput, fn func(*DescribeWorkspaceDirectoriesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeWorkspaceDirectoriesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeWorkspaceDirectoriesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeWorkspaceDirectoriesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeWorkspaceImages = "DescribeWorkspaceImages" - -// DescribeWorkspaceImagesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeWorkspaceImages operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeWorkspaceImages for more information on using the DescribeWorkspaceImages -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeWorkspaceImagesRequest method. -// req, resp := client.DescribeWorkspaceImagesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceImages -func (c *WorkSpaces) DescribeWorkspaceImagesRequest(input *DescribeWorkspaceImagesInput) (req *request.Request, output *DescribeWorkspaceImagesOutput) { - op := &request.Operation{ - Name: opDescribeWorkspaceImages, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeWorkspaceImagesInput{} - } - - output = &DescribeWorkspaceImagesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeWorkspaceImages API operation for Amazon WorkSpaces. -// -// Retrieves a list that describes one or more specified images, if the image -// identifiers are provided. Otherwise, all images in the account are described. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation DescribeWorkspaceImages for usage and error information. -// -// Returned Error Codes: -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceImages -func (c *WorkSpaces) DescribeWorkspaceImages(input *DescribeWorkspaceImagesInput) (*DescribeWorkspaceImagesOutput, error) { - req, out := c.DescribeWorkspaceImagesRequest(input) - return out, req.Send() -} - -// DescribeWorkspaceImagesWithContext is the same as DescribeWorkspaceImages with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeWorkspaceImages for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) DescribeWorkspaceImagesWithContext(ctx aws.Context, input *DescribeWorkspaceImagesInput, opts ...request.Option) (*DescribeWorkspaceImagesOutput, error) { - req, out := c.DescribeWorkspaceImagesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeWorkspaces = "DescribeWorkspaces" - -// DescribeWorkspacesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeWorkspaces operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeWorkspaces for more information on using the DescribeWorkspaces -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeWorkspacesRequest method. -// req, resp := client.DescribeWorkspacesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaces -func (c *WorkSpaces) DescribeWorkspacesRequest(input *DescribeWorkspacesInput) (req *request.Request, output *DescribeWorkspacesOutput) { - op := &request.Operation{ - Name: opDescribeWorkspaces, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "Limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeWorkspacesInput{} - } - - output = &DescribeWorkspacesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeWorkspaces API operation for Amazon WorkSpaces. -// -// Describes the specified WorkSpaces. -// -// You can filter the results by using the bundle identifier, directory identifier, -// or owner, but you can specify only one filter at a time. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation DescribeWorkspaces for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeResourceUnavailableException "ResourceUnavailableException" -// The specified resource is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaces -func (c *WorkSpaces) DescribeWorkspaces(input *DescribeWorkspacesInput) (*DescribeWorkspacesOutput, error) { - req, out := c.DescribeWorkspacesRequest(input) - return out, req.Send() -} - -// DescribeWorkspacesWithContext is the same as DescribeWorkspaces with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeWorkspaces for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) DescribeWorkspacesWithContext(ctx aws.Context, input *DescribeWorkspacesInput, opts ...request.Option) (*DescribeWorkspacesOutput, error) { - req, out := c.DescribeWorkspacesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeWorkspacesPages iterates over the pages of a DescribeWorkspaces operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeWorkspaces 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 DescribeWorkspaces operation. -// pageNum := 0 -// err := client.DescribeWorkspacesPages(params, -// func(page *DescribeWorkspacesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *WorkSpaces) DescribeWorkspacesPages(input *DescribeWorkspacesInput, fn func(*DescribeWorkspacesOutput, bool) bool) error { - return c.DescribeWorkspacesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeWorkspacesPagesWithContext same as DescribeWorkspacesPages 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 *WorkSpaces) DescribeWorkspacesPagesWithContext(ctx aws.Context, input *DescribeWorkspacesInput, fn func(*DescribeWorkspacesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeWorkspacesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeWorkspacesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeWorkspacesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opDescribeWorkspacesConnectionStatus = "DescribeWorkspacesConnectionStatus" - -// DescribeWorkspacesConnectionStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeWorkspacesConnectionStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeWorkspacesConnectionStatus for more information on using the DescribeWorkspacesConnectionStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DescribeWorkspacesConnectionStatusRequest method. -// req, resp := client.DescribeWorkspacesConnectionStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspacesConnectionStatus -func (c *WorkSpaces) DescribeWorkspacesConnectionStatusRequest(input *DescribeWorkspacesConnectionStatusInput) (req *request.Request, output *DescribeWorkspacesConnectionStatusOutput) { - op := &request.Operation{ - Name: opDescribeWorkspacesConnectionStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeWorkspacesConnectionStatusInput{} - } - - output = &DescribeWorkspacesConnectionStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeWorkspacesConnectionStatus API operation for Amazon WorkSpaces. -// -// Describes the connection status of the specified WorkSpaces. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation DescribeWorkspacesConnectionStatus for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspacesConnectionStatus -func (c *WorkSpaces) DescribeWorkspacesConnectionStatus(input *DescribeWorkspacesConnectionStatusInput) (*DescribeWorkspacesConnectionStatusOutput, error) { - req, out := c.DescribeWorkspacesConnectionStatusRequest(input) - return out, req.Send() -} - -// DescribeWorkspacesConnectionStatusWithContext is the same as DescribeWorkspacesConnectionStatus with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeWorkspacesConnectionStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) DescribeWorkspacesConnectionStatusWithContext(ctx aws.Context, input *DescribeWorkspacesConnectionStatusInput, opts ...request.Option) (*DescribeWorkspacesConnectionStatusOutput, error) { - req, out := c.DescribeWorkspacesConnectionStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateIpGroups = "DisassociateIpGroups" - -// DisassociateIpGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateIpGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateIpGroups for more information on using the DisassociateIpGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DisassociateIpGroupsRequest method. -// req, resp := client.DisassociateIpGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DisassociateIpGroups -func (c *WorkSpaces) DisassociateIpGroupsRequest(input *DisassociateIpGroupsInput) (req *request.Request, output *DisassociateIpGroupsOutput) { - op := &request.Operation{ - Name: opDisassociateIpGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateIpGroupsInput{} - } - - output = &DisassociateIpGroupsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateIpGroups API operation for Amazon WorkSpaces. -// -// Disassociates the specified IP access control group from the specified directory. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation DisassociateIpGroups for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" -// The state of the resource is not valid for this operation. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DisassociateIpGroups -func (c *WorkSpaces) DisassociateIpGroups(input *DisassociateIpGroupsInput) (*DisassociateIpGroupsOutput, error) { - req, out := c.DisassociateIpGroupsRequest(input) - return out, req.Send() -} - -// DisassociateIpGroupsWithContext is the same as DisassociateIpGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateIpGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) DisassociateIpGroupsWithContext(ctx aws.Context, input *DisassociateIpGroupsInput, opts ...request.Option) (*DisassociateIpGroupsOutput, error) { - req, out := c.DisassociateIpGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opImportWorkspaceImage = "ImportWorkspaceImage" - -// ImportWorkspaceImageRequest generates a "aws/request.Request" representing the -// client's request for the ImportWorkspaceImage operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ImportWorkspaceImage for more information on using the ImportWorkspaceImage -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ImportWorkspaceImageRequest method. -// req, resp := client.ImportWorkspaceImageRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ImportWorkspaceImage -func (c *WorkSpaces) ImportWorkspaceImageRequest(input *ImportWorkspaceImageInput) (req *request.Request, output *ImportWorkspaceImageOutput) { - op := &request.Operation{ - Name: opImportWorkspaceImage, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ImportWorkspaceImageInput{} - } - - output = &ImportWorkspaceImageOutput{} - req = c.newRequest(op, input, output) - return -} - -// ImportWorkspaceImage API operation for Amazon WorkSpaces. -// -// Imports the specified Windows 7 or Windows 10 bring your own license (BYOL) -// image into Amazon WorkSpaces. The image must be an already licensed EC2 image -// that is in your AWS account, and you must own the image. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation ImportWorkspaceImage for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" -// Your resource limits have been exceeded. -// -// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" -// The specified resource already exists. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" -// This operation is not supported. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ImportWorkspaceImage -func (c *WorkSpaces) ImportWorkspaceImage(input *ImportWorkspaceImageInput) (*ImportWorkspaceImageOutput, error) { - req, out := c.ImportWorkspaceImageRequest(input) - return out, req.Send() -} - -// ImportWorkspaceImageWithContext is the same as ImportWorkspaceImage with the addition of -// the ability to pass a context and additional request options. -// -// See ImportWorkspaceImage for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) ImportWorkspaceImageWithContext(ctx aws.Context, input *ImportWorkspaceImageInput, opts ...request.Option) (*ImportWorkspaceImageOutput, error) { - req, out := c.ImportWorkspaceImageRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAvailableManagementCidrRanges = "ListAvailableManagementCidrRanges" - -// ListAvailableManagementCidrRangesRequest generates a "aws/request.Request" representing the -// client's request for the ListAvailableManagementCidrRanges operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAvailableManagementCidrRanges for more information on using the ListAvailableManagementCidrRanges -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ListAvailableManagementCidrRangesRequest method. -// req, resp := client.ListAvailableManagementCidrRangesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ListAvailableManagementCidrRanges -func (c *WorkSpaces) ListAvailableManagementCidrRangesRequest(input *ListAvailableManagementCidrRangesInput) (req *request.Request, output *ListAvailableManagementCidrRangesOutput) { - op := &request.Operation{ - Name: opListAvailableManagementCidrRanges, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListAvailableManagementCidrRangesInput{} - } - - output = &ListAvailableManagementCidrRangesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAvailableManagementCidrRanges API operation for Amazon WorkSpaces. -// -// Retrieves a list of IP address ranges, specified as IPv4 CIDR blocks, that -// you can use for the network management interface when you enable bring your -// own license (BYOL). -// -// The management network interface is connected to a secure Amazon WorkSpaces -// management network. It is used for interactive streaming of the WorkSpace -// desktop to Amazon WorkSpaces clients, and to allow Amazon WorkSpaces to manage -// the WorkSpace. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation ListAvailableManagementCidrRanges for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ListAvailableManagementCidrRanges -func (c *WorkSpaces) ListAvailableManagementCidrRanges(input *ListAvailableManagementCidrRangesInput) (*ListAvailableManagementCidrRangesOutput, error) { - req, out := c.ListAvailableManagementCidrRangesRequest(input) - return out, req.Send() -} - -// ListAvailableManagementCidrRangesWithContext is the same as ListAvailableManagementCidrRanges with the addition of -// the ability to pass a context and additional request options. -// -// See ListAvailableManagementCidrRanges for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) ListAvailableManagementCidrRangesWithContext(ctx aws.Context, input *ListAvailableManagementCidrRangesInput, opts ...request.Option) (*ListAvailableManagementCidrRangesOutput, error) { - req, out := c.ListAvailableManagementCidrRangesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyAccount = "ModifyAccount" - -// ModifyAccountRequest generates a "aws/request.Request" representing the -// client's request for the ModifyAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyAccount for more information on using the ModifyAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyAccountRequest method. -// req, resp := client.ModifyAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyAccount -func (c *WorkSpaces) ModifyAccountRequest(input *ModifyAccountInput) (req *request.Request, output *ModifyAccountOutput) { - op := &request.Operation{ - Name: opModifyAccount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyAccountInput{} - } - - output = &ModifyAccountOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyAccount API operation for Amazon WorkSpaces. -// -// Modifies the configuration of bring your own license (BYOL) for the specified -// account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation ModifyAccount for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" -// The state of the resource is not valid for this operation. -// -// * ErrCodeResourceUnavailableException "ResourceUnavailableException" -// The specified resource is not available. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyAccount -func (c *WorkSpaces) ModifyAccount(input *ModifyAccountInput) (*ModifyAccountOutput, error) { - req, out := c.ModifyAccountRequest(input) - return out, req.Send() -} - -// ModifyAccountWithContext is the same as ModifyAccount with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) ModifyAccountWithContext(ctx aws.Context, input *ModifyAccountInput, opts ...request.Option) (*ModifyAccountOutput, error) { - req, out := c.ModifyAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyClientProperties = "ModifyClientProperties" - -// ModifyClientPropertiesRequest generates a "aws/request.Request" representing the -// client's request for the ModifyClientProperties operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyClientProperties for more information on using the ModifyClientProperties -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyClientPropertiesRequest method. -// req, resp := client.ModifyClientPropertiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyClientProperties -func (c *WorkSpaces) ModifyClientPropertiesRequest(input *ModifyClientPropertiesInput) (req *request.Request, output *ModifyClientPropertiesOutput) { - op := &request.Operation{ - Name: opModifyClientProperties, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyClientPropertiesInput{} - } - - output = &ModifyClientPropertiesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyClientProperties API operation for Amazon WorkSpaces. -// -// Modifies the properties of the specified Amazon WorkSpaces client. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation ModifyClientProperties for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyClientProperties -func (c *WorkSpaces) ModifyClientProperties(input *ModifyClientPropertiesInput) (*ModifyClientPropertiesOutput, error) { - req, out := c.ModifyClientPropertiesRequest(input) - return out, req.Send() -} - -// ModifyClientPropertiesWithContext is the same as ModifyClientProperties with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyClientProperties for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) ModifyClientPropertiesWithContext(ctx aws.Context, input *ModifyClientPropertiesInput, opts ...request.Option) (*ModifyClientPropertiesOutput, error) { - req, out := c.ModifyClientPropertiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyWorkspaceProperties = "ModifyWorkspaceProperties" - -// ModifyWorkspacePropertiesRequest generates a "aws/request.Request" representing the -// client's request for the ModifyWorkspaceProperties operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyWorkspaceProperties for more information on using the ModifyWorkspaceProperties -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyWorkspacePropertiesRequest method. -// req, resp := client.ModifyWorkspacePropertiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceProperties -func (c *WorkSpaces) ModifyWorkspacePropertiesRequest(input *ModifyWorkspacePropertiesInput) (req *request.Request, output *ModifyWorkspacePropertiesOutput) { - op := &request.Operation{ - Name: opModifyWorkspaceProperties, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyWorkspacePropertiesInput{} - } - - output = &ModifyWorkspacePropertiesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyWorkspaceProperties API operation for Amazon WorkSpaces. -// -// Modifies the specified WorkSpace properties. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation ModifyWorkspaceProperties for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" -// The state of the resource is not valid for this operation. -// -// * ErrCodeOperationInProgressException "OperationInProgressException" -// The properties of this WorkSpace are currently being modified. Try again -// in a moment. -// -// * ErrCodeUnsupportedWorkspaceConfigurationException "UnsupportedWorkspaceConfigurationException" -// The configuration of this WorkSpace is not supported for this operation. -// For more information, see the Amazon WorkSpaces Administration Guide (http://docs.aws.amazon.com/workspaces/latest/adminguide/). -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// * ErrCodeResourceUnavailableException "ResourceUnavailableException" -// The specified resource is not available. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceProperties -func (c *WorkSpaces) ModifyWorkspaceProperties(input *ModifyWorkspacePropertiesInput) (*ModifyWorkspacePropertiesOutput, error) { - req, out := c.ModifyWorkspacePropertiesRequest(input) - return out, req.Send() -} - -// ModifyWorkspacePropertiesWithContext is the same as ModifyWorkspaceProperties with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyWorkspaceProperties for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) ModifyWorkspacePropertiesWithContext(ctx aws.Context, input *ModifyWorkspacePropertiesInput, opts ...request.Option) (*ModifyWorkspacePropertiesOutput, error) { - req, out := c.ModifyWorkspacePropertiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyWorkspaceState = "ModifyWorkspaceState" - -// ModifyWorkspaceStateRequest generates a "aws/request.Request" representing the -// client's request for the ModifyWorkspaceState operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyWorkspaceState for more information on using the ModifyWorkspaceState -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the ModifyWorkspaceStateRequest method. -// req, resp := client.ModifyWorkspaceStateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceState -func (c *WorkSpaces) ModifyWorkspaceStateRequest(input *ModifyWorkspaceStateInput) (req *request.Request, output *ModifyWorkspaceStateOutput) { - op := &request.Operation{ - Name: opModifyWorkspaceState, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyWorkspaceStateInput{} - } - - output = &ModifyWorkspaceStateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyWorkspaceState API operation for Amazon WorkSpaces. -// -// Sets the state of the specified WorkSpace. -// -// To maintain a WorkSpace without being interrupted, set the WorkSpace state -// to ADMIN_MAINTENANCE. WorkSpaces in this state do not respond to requests -// to reboot, stop, start, or rebuild. An AutoStop WorkSpace in this state is -// not stopped. Users can log into a WorkSpace in the ADMIN_MAINTENANCE state. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation ModifyWorkspaceState for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" -// The state of the resource is not valid for this operation. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceState -func (c *WorkSpaces) ModifyWorkspaceState(input *ModifyWorkspaceStateInput) (*ModifyWorkspaceStateOutput, error) { - req, out := c.ModifyWorkspaceStateRequest(input) - return out, req.Send() -} - -// ModifyWorkspaceStateWithContext is the same as ModifyWorkspaceState with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyWorkspaceState for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) ModifyWorkspaceStateWithContext(ctx aws.Context, input *ModifyWorkspaceStateInput, opts ...request.Option) (*ModifyWorkspaceStateOutput, error) { - req, out := c.ModifyWorkspaceStateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRebootWorkspaces = "RebootWorkspaces" - -// RebootWorkspacesRequest generates a "aws/request.Request" representing the -// client's request for the RebootWorkspaces operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebootWorkspaces for more information on using the RebootWorkspaces -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebootWorkspacesRequest method. -// req, resp := client.RebootWorkspacesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RebootWorkspaces -func (c *WorkSpaces) RebootWorkspacesRequest(input *RebootWorkspacesInput) (req *request.Request, output *RebootWorkspacesOutput) { - op := &request.Operation{ - Name: opRebootWorkspaces, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RebootWorkspacesInput{} - } - - output = &RebootWorkspacesOutput{} - req = c.newRequest(op, input, output) - return -} - -// RebootWorkspaces API operation for Amazon WorkSpaces. -// -// Reboots the specified WorkSpaces. -// -// You cannot reboot a WorkSpace unless its state is AVAILABLE or UNHEALTHY. -// -// This operation is asynchronous and returns before the WorkSpaces have rebooted. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation RebootWorkspaces for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RebootWorkspaces -func (c *WorkSpaces) RebootWorkspaces(input *RebootWorkspacesInput) (*RebootWorkspacesOutput, error) { - req, out := c.RebootWorkspacesRequest(input) - return out, req.Send() -} - -// RebootWorkspacesWithContext is the same as RebootWorkspaces with the addition of -// the ability to pass a context and additional request options. -// -// See RebootWorkspaces for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) RebootWorkspacesWithContext(ctx aws.Context, input *RebootWorkspacesInput, opts ...request.Option) (*RebootWorkspacesOutput, error) { - req, out := c.RebootWorkspacesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRebuildWorkspaces = "RebuildWorkspaces" - -// RebuildWorkspacesRequest generates a "aws/request.Request" representing the -// client's request for the RebuildWorkspaces operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RebuildWorkspaces for more information on using the RebuildWorkspaces -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RebuildWorkspacesRequest method. -// req, resp := client.RebuildWorkspacesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RebuildWorkspaces -func (c *WorkSpaces) RebuildWorkspacesRequest(input *RebuildWorkspacesInput) (req *request.Request, output *RebuildWorkspacesOutput) { - op := &request.Operation{ - Name: opRebuildWorkspaces, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RebuildWorkspacesInput{} - } - - output = &RebuildWorkspacesOutput{} - req = c.newRequest(op, input, output) - return -} - -// RebuildWorkspaces API operation for Amazon WorkSpaces. -// -// Rebuilds the specified WorkSpace. -// -// You cannot rebuild a WorkSpace unless its state is AVAILABLE, ERROR, or UNHEALTHY. -// -// Rebuilding a WorkSpace is a potentially destructive action that can result -// in the loss of data. For more information, see Rebuild a WorkSpace (http://docs.aws.amazon.com/workspaces/latest/adminguide/reset-workspace.html). -// -// This operation is asynchronous and returns before the WorkSpaces have been -// completely rebuilt. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation RebuildWorkspaces for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RebuildWorkspaces -func (c *WorkSpaces) RebuildWorkspaces(input *RebuildWorkspacesInput) (*RebuildWorkspacesOutput, error) { - req, out := c.RebuildWorkspacesRequest(input) - return out, req.Send() -} - -// RebuildWorkspacesWithContext is the same as RebuildWorkspaces with the addition of -// the ability to pass a context and additional request options. -// -// See RebuildWorkspaces for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) RebuildWorkspacesWithContext(ctx aws.Context, input *RebuildWorkspacesInput, opts ...request.Option) (*RebuildWorkspacesOutput, error) { - req, out := c.RebuildWorkspacesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRevokeIpRules = "RevokeIpRules" - -// RevokeIpRulesRequest generates a "aws/request.Request" representing the -// client's request for the RevokeIpRules operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RevokeIpRules for more information on using the RevokeIpRules -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the RevokeIpRulesRequest method. -// req, resp := client.RevokeIpRulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RevokeIpRules -func (c *WorkSpaces) RevokeIpRulesRequest(input *RevokeIpRulesInput) (req *request.Request, output *RevokeIpRulesOutput) { - op := &request.Operation{ - Name: opRevokeIpRules, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RevokeIpRulesInput{} - } - - output = &RevokeIpRulesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RevokeIpRules API operation for Amazon WorkSpaces. -// -// Removes one or more rules from the specified IP access control group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation RevokeIpRules for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" -// The state of the resource is not valid for this operation. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RevokeIpRules -func (c *WorkSpaces) RevokeIpRules(input *RevokeIpRulesInput) (*RevokeIpRulesOutput, error) { - req, out := c.RevokeIpRulesRequest(input) - return out, req.Send() -} - -// RevokeIpRulesWithContext is the same as RevokeIpRules with the addition of -// the ability to pass a context and additional request options. -// -// See RevokeIpRules for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) RevokeIpRulesWithContext(ctx aws.Context, input *RevokeIpRulesInput, opts ...request.Option) (*RevokeIpRulesOutput, error) { - req, out := c.RevokeIpRulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartWorkspaces = "StartWorkspaces" - -// StartWorkspacesRequest generates a "aws/request.Request" representing the -// client's request for the StartWorkspaces operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartWorkspaces for more information on using the StartWorkspaces -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StartWorkspacesRequest method. -// req, resp := client.StartWorkspacesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/StartWorkspaces -func (c *WorkSpaces) StartWorkspacesRequest(input *StartWorkspacesInput) (req *request.Request, output *StartWorkspacesOutput) { - op := &request.Operation{ - Name: opStartWorkspaces, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartWorkspacesInput{} - } - - output = &StartWorkspacesOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartWorkspaces API operation for Amazon WorkSpaces. -// -// Starts the specified WorkSpaces. -// -// You cannot start a WorkSpace unless it has a running mode of AutoStop and -// a state of STOPPED. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation StartWorkspaces for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/StartWorkspaces -func (c *WorkSpaces) StartWorkspaces(input *StartWorkspacesInput) (*StartWorkspacesOutput, error) { - req, out := c.StartWorkspacesRequest(input) - return out, req.Send() -} - -// StartWorkspacesWithContext is the same as StartWorkspaces with the addition of -// the ability to pass a context and additional request options. -// -// See StartWorkspaces for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) StartWorkspacesWithContext(ctx aws.Context, input *StartWorkspacesInput, opts ...request.Option) (*StartWorkspacesOutput, error) { - req, out := c.StartWorkspacesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopWorkspaces = "StopWorkspaces" - -// StopWorkspacesRequest generates a "aws/request.Request" representing the -// client's request for the StopWorkspaces operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopWorkspaces for more information on using the StopWorkspaces -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopWorkspacesRequest method. -// req, resp := client.StopWorkspacesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/StopWorkspaces -func (c *WorkSpaces) StopWorkspacesRequest(input *StopWorkspacesInput) (req *request.Request, output *StopWorkspacesOutput) { - op := &request.Operation{ - Name: opStopWorkspaces, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopWorkspacesInput{} - } - - output = &StopWorkspacesOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopWorkspaces API operation for Amazon WorkSpaces. -// -// Stops the specified WorkSpaces. -// -// You cannot stop a WorkSpace unless it has a running mode of AutoStop and -// a state of AVAILABLE, IMPAIRED, UNHEALTHY, or ERROR. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation StopWorkspaces for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/StopWorkspaces -func (c *WorkSpaces) StopWorkspaces(input *StopWorkspacesInput) (*StopWorkspacesOutput, error) { - req, out := c.StopWorkspacesRequest(input) - return out, req.Send() -} - -// StopWorkspacesWithContext is the same as StopWorkspaces with the addition of -// the ability to pass a context and additional request options. -// -// See StopWorkspaces for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) StopWorkspacesWithContext(ctx aws.Context, input *StopWorkspacesInput, opts ...request.Option) (*StopWorkspacesOutput, error) { - req, out := c.StopWorkspacesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTerminateWorkspaces = "TerminateWorkspaces" - -// TerminateWorkspacesRequest generates a "aws/request.Request" representing the -// client's request for the TerminateWorkspaces operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TerminateWorkspaces for more information on using the TerminateWorkspaces -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the TerminateWorkspacesRequest method. -// req, resp := client.TerminateWorkspacesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/TerminateWorkspaces -func (c *WorkSpaces) TerminateWorkspacesRequest(input *TerminateWorkspacesInput) (req *request.Request, output *TerminateWorkspacesOutput) { - op := &request.Operation{ - Name: opTerminateWorkspaces, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TerminateWorkspacesInput{} - } - - output = &TerminateWorkspacesOutput{} - req = c.newRequest(op, input, output) - return -} - -// TerminateWorkspaces API operation for Amazon WorkSpaces. -// -// Terminates the specified WorkSpaces. -// -// Terminating a WorkSpace is a permanent action and cannot be undone. The user's -// data is destroyed. If you need to archive any user data, contact Amazon Web -// Services before terminating the WorkSpace. -// -// You can terminate a WorkSpace that is in any state except SUSPENDED. -// -// This operation is asynchronous and returns before the WorkSpaces have been -// completely terminated. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation TerminateWorkspaces for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/TerminateWorkspaces -func (c *WorkSpaces) TerminateWorkspaces(input *TerminateWorkspacesInput) (*TerminateWorkspacesOutput, error) { - req, out := c.TerminateWorkspacesRequest(input) - return out, req.Send() -} - -// TerminateWorkspacesWithContext is the same as TerminateWorkspaces with the addition of -// the ability to pass a context and additional request options. -// -// See TerminateWorkspaces for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) TerminateWorkspacesWithContext(ctx aws.Context, input *TerminateWorkspacesInput, opts ...request.Option) (*TerminateWorkspacesOutput, error) { - req, out := c.TerminateWorkspacesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRulesOfIpGroup = "UpdateRulesOfIpGroup" - -// UpdateRulesOfIpGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRulesOfIpGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRulesOfIpGroup for more information on using the UpdateRulesOfIpGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the UpdateRulesOfIpGroupRequest method. -// req, resp := client.UpdateRulesOfIpGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/UpdateRulesOfIpGroup -func (c *WorkSpaces) UpdateRulesOfIpGroupRequest(input *UpdateRulesOfIpGroupInput) (req *request.Request, output *UpdateRulesOfIpGroupOutput) { - op := &request.Operation{ - Name: opUpdateRulesOfIpGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRulesOfIpGroupInput{} - } - - output = &UpdateRulesOfIpGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateRulesOfIpGroup API operation for Amazon WorkSpaces. -// -// Replaces the current rules of the specified IP access control group with -// the specified rules. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation UpdateRulesOfIpGroup for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" -// One or more parameter values are not valid. -// -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource could not be found. -// -// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" -// Your resource limits have been exceeded. -// -// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" -// The state of the resource is not valid for this operation. -// -// * ErrCodeAccessDeniedException "AccessDeniedException" -// The user is not authorized to access a resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/UpdateRulesOfIpGroup -func (c *WorkSpaces) UpdateRulesOfIpGroup(input *UpdateRulesOfIpGroupInput) (*UpdateRulesOfIpGroupOutput, error) { - req, out := c.UpdateRulesOfIpGroupRequest(input) - return out, req.Send() -} - -// UpdateRulesOfIpGroupWithContext is the same as UpdateRulesOfIpGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRulesOfIpGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *WorkSpaces) UpdateRulesOfIpGroupWithContext(ctx aws.Context, input *UpdateRulesOfIpGroupInput, opts ...request.Option) (*UpdateRulesOfIpGroupOutput, error) { - req, out := c.UpdateRulesOfIpGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Describes a modification to the configuration of bring your own license (BYOL) -// for the specified account. -type AccountModification struct { - _ struct{} `type:"structure"` - - // The IP address range, specified as an IPv4 CIDR block, for the management - // network interface used for the account. - DedicatedTenancyManagementCidrRange *string `type:"string"` - - // The status of BYOL (whether BYOL is being enabled or disabled). - DedicatedTenancySupport *string `type:"string" enum:"DedicatedTenancySupportResultEnum"` - - // The error code that is returned if the configuration of BYOL cannot be modified. - ErrorCode *string `type:"string"` - - // The text of the error message that is returned if the configuration of BYOL - // cannot be modified. - ErrorMessage *string `type:"string"` - - // The state of the modification to the configuration of BYOL. - ModificationState *string `type:"string" enum:"DedicatedTenancyModificationStateEnum"` - - // The timestamp when the modification of the BYOL configuration was started. - StartTime *time.Time `type:"timestamp"` -} - -// String returns the string representation -func (s AccountModification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AccountModification) GoString() string { - return s.String() -} - -// SetDedicatedTenancyManagementCidrRange sets the DedicatedTenancyManagementCidrRange field's value. -func (s *AccountModification) SetDedicatedTenancyManagementCidrRange(v string) *AccountModification { - s.DedicatedTenancyManagementCidrRange = &v - return s -} - -// SetDedicatedTenancySupport sets the DedicatedTenancySupport field's value. -func (s *AccountModification) SetDedicatedTenancySupport(v string) *AccountModification { - s.DedicatedTenancySupport = &v - return s -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *AccountModification) SetErrorCode(v string) *AccountModification { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *AccountModification) SetErrorMessage(v string) *AccountModification { - s.ErrorMessage = &v - return s -} - -// SetModificationState sets the ModificationState field's value. -func (s *AccountModification) SetModificationState(v string) *AccountModification { - s.ModificationState = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *AccountModification) SetStartTime(v time.Time) *AccountModification { - s.StartTime = &v - return s -} - -type AssociateIpGroupsInput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The identifiers of one or more IP access control groups. - // - // GroupIds is a required field - GroupIds []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s AssociateIpGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateIpGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateIpGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateIpGroupsInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.GroupIds == nil { - invalidParams.Add(request.NewErrParamRequired("GroupIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *AssociateIpGroupsInput) SetDirectoryId(v string) *AssociateIpGroupsInput { - s.DirectoryId = &v - return s -} - -// SetGroupIds sets the GroupIds field's value. -func (s *AssociateIpGroupsInput) SetGroupIds(v []*string) *AssociateIpGroupsInput { - s.GroupIds = v - return s -} - -type AssociateIpGroupsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AssociateIpGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AssociateIpGroupsOutput) GoString() string { - return s.String() -} - -type AuthorizeIpRulesInput struct { - _ struct{} `type:"structure"` - - // The identifier of the group. - // - // GroupId is a required field - GroupId *string `type:"string" required:"true"` - - // The rules to add to the group. - // - // UserRules is a required field - UserRules []*IpRuleItem `type:"list" required:"true"` -} - -// String returns the string representation -func (s AuthorizeIpRulesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeIpRulesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AuthorizeIpRulesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuthorizeIpRulesInput"} - if s.GroupId == nil { - invalidParams.Add(request.NewErrParamRequired("GroupId")) - } - if s.UserRules == nil { - invalidParams.Add(request.NewErrParamRequired("UserRules")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupId sets the GroupId field's value. -func (s *AuthorizeIpRulesInput) SetGroupId(v string) *AuthorizeIpRulesInput { - s.GroupId = &v - return s -} - -// SetUserRules sets the UserRules field's value. -func (s *AuthorizeIpRulesInput) SetUserRules(v []*IpRuleItem) *AuthorizeIpRulesInput { - s.UserRules = v - return s -} - -type AuthorizeIpRulesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s AuthorizeIpRulesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AuthorizeIpRulesOutput) GoString() string { - return s.String() -} - -// Describes an Amazon WorkSpaces client. -type ClientProperties struct { - _ struct{} `type:"structure"` - - // Specifies whether users can cache their credentials on the Amazon WorkSpaces - // client. When enabled, users can choose to reconnect to their WorkSpaces without - // re-entering their credentials. - ReconnectEnabled *string `type:"string" enum:"ReconnectEnum"` -} - -// String returns the string representation -func (s ClientProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClientProperties) GoString() string { - return s.String() -} - -// SetReconnectEnabled sets the ReconnectEnabled field's value. -func (s *ClientProperties) SetReconnectEnabled(v string) *ClientProperties { - s.ReconnectEnabled = &v - return s -} - -// Information about the Amazon WorkSpaces client. -type ClientPropertiesResult struct { - _ struct{} `type:"structure"` - - // Information about the Amazon WorkSpaces client. - ClientProperties *ClientProperties `type:"structure"` - - // The resource identifier, in the form of a directory ID. - ResourceId *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ClientPropertiesResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ClientPropertiesResult) GoString() string { - return s.String() -} - -// SetClientProperties sets the ClientProperties field's value. -func (s *ClientPropertiesResult) SetClientProperties(v *ClientProperties) *ClientPropertiesResult { - s.ClientProperties = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ClientPropertiesResult) SetResourceId(v string) *ClientPropertiesResult { - s.ResourceId = &v - return s -} - -// Describes the compute type. -type ComputeType struct { - _ struct{} `type:"structure"` - - // The compute type. - Name *string `type:"string" enum:"Compute"` -} - -// String returns the string representation -func (s ComputeType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ComputeType) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *ComputeType) SetName(v string) *ComputeType { - s.Name = &v - return s -} - -type CreateIpGroupInput struct { - _ struct{} `type:"structure"` - - // The description of the group. - GroupDesc *string `type:"string"` - - // The name of the group. - // - // GroupName is a required field - GroupName *string `type:"string" required:"true"` - - // The rules to add to the group. - UserRules []*IpRuleItem `type:"list"` -} - -// String returns the string representation -func (s CreateIpGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIpGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateIpGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateIpGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupDesc sets the GroupDesc field's value. -func (s *CreateIpGroupInput) SetGroupDesc(v string) *CreateIpGroupInput { - s.GroupDesc = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *CreateIpGroupInput) SetGroupName(v string) *CreateIpGroupInput { - s.GroupName = &v - return s -} - -// SetUserRules sets the UserRules field's value. -func (s *CreateIpGroupInput) SetUserRules(v []*IpRuleItem) *CreateIpGroupInput { - s.UserRules = v - return s -} - -type CreateIpGroupOutput struct { - _ struct{} `type:"structure"` - - // The identifier of the group. - GroupId *string `type:"string"` -} - -// String returns the string representation -func (s CreateIpGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateIpGroupOutput) GoString() string { - return s.String() -} - -// SetGroupId sets the GroupId field's value. -func (s *CreateIpGroupOutput) SetGroupId(v string) *CreateIpGroupOutput { - s.GroupId = &v - return s -} - -type CreateTagsInput struct { - _ struct{} `type:"structure"` - - // The identifier of the WorkSpace. To find this ID, use DescribeWorkspaces. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // The tags. Each WorkSpace can have a maximum of 50 tags. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *CreateTagsInput) SetResourceId(v string) *CreateTagsInput { - s.ResourceId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateTagsInput) SetTags(v []*Tag) *CreateTagsInput { - s.Tags = v - return s -} - -type CreateTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateTagsOutput) GoString() string { - return s.String() -} - -type CreateWorkspacesInput struct { - _ struct{} `type:"structure"` - - // The WorkSpaces to create. You can specify up to 25 WorkSpaces. - // - // Workspaces is a required field - Workspaces []*WorkspaceRequest `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s CreateWorkspacesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateWorkspacesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateWorkspacesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateWorkspacesInput"} - if s.Workspaces == nil { - invalidParams.Add(request.NewErrParamRequired("Workspaces")) - } - if s.Workspaces != nil && len(s.Workspaces) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Workspaces", 1)) - } - if s.Workspaces != nil { - for i, v := range s.Workspaces { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Workspaces", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWorkspaces sets the Workspaces field's value. -func (s *CreateWorkspacesInput) SetWorkspaces(v []*WorkspaceRequest) *CreateWorkspacesInput { - s.Workspaces = v - return s -} - -type CreateWorkspacesOutput struct { - _ struct{} `type:"structure"` - - // Information about the WorkSpaces that could not be created. - FailedRequests []*FailedCreateWorkspaceRequest `type:"list"` - - // Information about the WorkSpaces that were created. - // - // Because this operation is asynchronous, the identifier returned is not immediately - // available for use with other operations. For example, if you call DescribeWorkspaces - // before the WorkSpace is created, the information returned can be incomplete. - PendingRequests []*Workspace `type:"list"` -} - -// String returns the string representation -func (s CreateWorkspacesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateWorkspacesOutput) GoString() string { - return s.String() -} - -// SetFailedRequests sets the FailedRequests field's value. -func (s *CreateWorkspacesOutput) SetFailedRequests(v []*FailedCreateWorkspaceRequest) *CreateWorkspacesOutput { - s.FailedRequests = v - return s -} - -// SetPendingRequests sets the PendingRequests field's value. -func (s *CreateWorkspacesOutput) SetPendingRequests(v []*Workspace) *CreateWorkspacesOutput { - s.PendingRequests = v - return s -} - -// Describes the default values used to create a WorkSpace. -type DefaultWorkspaceCreationProperties struct { - _ struct{} `type:"structure"` - - // The identifier of any security groups to apply to WorkSpaces when they are - // created. - CustomSecurityGroupId *string `type:"string"` - - // The organizational unit (OU) in the directory for the WorkSpace machine accounts. - DefaultOu *string `type:"string"` - - // The public IP address to attach to all WorkSpaces that are created or rebuilt. - EnableInternetAccess *bool `type:"boolean"` - - // Specifies whether the directory is enabled for Amazon WorkDocs. - EnableWorkDocs *bool `type:"boolean"` - - // Specifies whether the WorkSpace user is an administrator on the WorkSpace. - UserEnabledAsLocalAdministrator *bool `type:"boolean"` -} - -// String returns the string representation -func (s DefaultWorkspaceCreationProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DefaultWorkspaceCreationProperties) GoString() string { - return s.String() -} - -// SetCustomSecurityGroupId sets the CustomSecurityGroupId field's value. -func (s *DefaultWorkspaceCreationProperties) SetCustomSecurityGroupId(v string) *DefaultWorkspaceCreationProperties { - s.CustomSecurityGroupId = &v - return s -} - -// SetDefaultOu sets the DefaultOu field's value. -func (s *DefaultWorkspaceCreationProperties) SetDefaultOu(v string) *DefaultWorkspaceCreationProperties { - s.DefaultOu = &v - return s -} - -// SetEnableInternetAccess sets the EnableInternetAccess field's value. -func (s *DefaultWorkspaceCreationProperties) SetEnableInternetAccess(v bool) *DefaultWorkspaceCreationProperties { - s.EnableInternetAccess = &v - return s -} - -// SetEnableWorkDocs sets the EnableWorkDocs field's value. -func (s *DefaultWorkspaceCreationProperties) SetEnableWorkDocs(v bool) *DefaultWorkspaceCreationProperties { - s.EnableWorkDocs = &v - return s -} - -// SetUserEnabledAsLocalAdministrator sets the UserEnabledAsLocalAdministrator field's value. -func (s *DefaultWorkspaceCreationProperties) SetUserEnabledAsLocalAdministrator(v bool) *DefaultWorkspaceCreationProperties { - s.UserEnabledAsLocalAdministrator = &v - return s -} - -type DeleteIpGroupInput struct { - _ struct{} `type:"structure"` - - // The identifier of the IP access control group. - // - // GroupId is a required field - GroupId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteIpGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIpGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteIpGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteIpGroupInput"} - if s.GroupId == nil { - invalidParams.Add(request.NewErrParamRequired("GroupId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupId sets the GroupId field's value. -func (s *DeleteIpGroupInput) SetGroupId(v string) *DeleteIpGroupInput { - s.GroupId = &v - return s -} - -type DeleteIpGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteIpGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteIpGroupOutput) GoString() string { - return s.String() -} - -type DeleteTagsInput struct { - _ struct{} `type:"structure"` - - // The identifier of the WorkSpace. To find this ID, use DescribeWorkspaces. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` - - // The tag keys. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DeleteTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *DeleteTagsInput) SetResourceId(v string) *DeleteTagsInput { - s.ResourceId = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput { - s.TagKeys = v - return s -} - -type DeleteTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteTagsOutput) GoString() string { - return s.String() -} - -type DeleteWorkspaceImageInput struct { - _ struct{} `type:"structure"` - - // The identifier of the image. - // - // ImageId is a required field - ImageId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteWorkspaceImageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteWorkspaceImageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteWorkspaceImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteWorkspaceImageInput"} - if s.ImageId == nil { - invalidParams.Add(request.NewErrParamRequired("ImageId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetImageId sets the ImageId field's value. -func (s *DeleteWorkspaceImageInput) SetImageId(v string) *DeleteWorkspaceImageInput { - s.ImageId = &v - return s -} - -type DeleteWorkspaceImageOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteWorkspaceImageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteWorkspaceImageOutput) GoString() string { - return s.String() -} - -type DescribeAccountInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DescribeAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountInput) GoString() string { - return s.String() -} - -type DescribeAccountModificationsInput struct { - _ struct{} `type:"structure"` - - // If you received a NextToken from a previous call that was paginated, provide - // this token to receive the next set of results. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeAccountModificationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountModificationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAccountModificationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAccountModificationsInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAccountModificationsInput) SetNextToken(v string) *DescribeAccountModificationsInput { - s.NextToken = &v - return s -} - -type DescribeAccountModificationsOutput struct { - _ struct{} `type:"structure"` - - // The list of modifications to the configuration of BYOL. - AccountModifications []*AccountModification `type:"list"` - - // The token to use to retrieve the next set of results, or null if no more - // results are available. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeAccountModificationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountModificationsOutput) GoString() string { - return s.String() -} - -// SetAccountModifications sets the AccountModifications field's value. -func (s *DescribeAccountModificationsOutput) SetAccountModifications(v []*AccountModification) *DescribeAccountModificationsOutput { - s.AccountModifications = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAccountModificationsOutput) SetNextToken(v string) *DescribeAccountModificationsOutput { - s.NextToken = &v - return s -} - -type DescribeAccountOutput struct { - _ struct{} `type:"structure"` - - // The IP address range, specified as an IPv4 CIDR block, used for the management - // network interface. - // - // The management network interface is connected to a secure Amazon WorkSpaces - // management network. It is used for interactive streaming of the WorkSpace - // desktop to Amazon WorkSpaces clients, and to allow Amazon WorkSpaces to manage - // the WorkSpace. - DedicatedTenancyManagementCidrRange *string `type:"string"` - - // The status of BYOL (whether BYOL is enabled or disabled). - DedicatedTenancySupport *string `type:"string" enum:"DedicatedTenancySupportResultEnum"` -} - -// String returns the string representation -func (s DescribeAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeAccountOutput) GoString() string { - return s.String() -} - -// SetDedicatedTenancyManagementCidrRange sets the DedicatedTenancyManagementCidrRange field's value. -func (s *DescribeAccountOutput) SetDedicatedTenancyManagementCidrRange(v string) *DescribeAccountOutput { - s.DedicatedTenancyManagementCidrRange = &v - return s -} - -// SetDedicatedTenancySupport sets the DedicatedTenancySupport field's value. -func (s *DescribeAccountOutput) SetDedicatedTenancySupport(v string) *DescribeAccountOutput { - s.DedicatedTenancySupport = &v - return s -} - -type DescribeClientPropertiesInput struct { - _ struct{} `type:"structure"` - - // The resource identifiers, in the form of directory IDs. - // - // ResourceIds is a required field - ResourceIds []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s DescribeClientPropertiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClientPropertiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeClientPropertiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeClientPropertiesInput"} - if s.ResourceIds == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceIds")) - } - if s.ResourceIds != nil && len(s.ResourceIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceIds", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceIds sets the ResourceIds field's value. -func (s *DescribeClientPropertiesInput) SetResourceIds(v []*string) *DescribeClientPropertiesInput { - s.ResourceIds = v - return s -} - -type DescribeClientPropertiesOutput struct { - _ struct{} `type:"structure"` - - // Information about the specified Amazon WorkSpaces clients. - ClientPropertiesList []*ClientPropertiesResult `type:"list"` -} - -// String returns the string representation -func (s DescribeClientPropertiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeClientPropertiesOutput) GoString() string { - return s.String() -} - -// SetClientPropertiesList sets the ClientPropertiesList field's value. -func (s *DescribeClientPropertiesOutput) SetClientPropertiesList(v []*ClientPropertiesResult) *DescribeClientPropertiesOutput { - s.ClientPropertiesList = v - return s -} - -type DescribeIpGroupsInput struct { - _ struct{} `type:"structure"` - - // The identifiers of one or more IP access control groups. - GroupIds []*string `type:"list"` - - // The maximum number of items to return. - MaxResults *int64 `min:"1" type:"integer"` - - // If you received a NextToken from a previous call that was paginated, provide - // this token to receive the next set of results. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeIpGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIpGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeIpGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeIpGroupsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupIds sets the GroupIds field's value. -func (s *DescribeIpGroupsInput) SetGroupIds(v []*string) *DescribeIpGroupsInput { - s.GroupIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeIpGroupsInput) SetMaxResults(v int64) *DescribeIpGroupsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeIpGroupsInput) SetNextToken(v string) *DescribeIpGroupsInput { - s.NextToken = &v - return s -} - -type DescribeIpGroupsOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next set of results, or null if no more - // results are available. - NextToken *string `min:"1" type:"string"` - - // Information about the IP access control groups. - Result []*IpGroup `type:"list"` -} - -// String returns the string representation -func (s DescribeIpGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeIpGroupsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeIpGroupsOutput) SetNextToken(v string) *DescribeIpGroupsOutput { - s.NextToken = &v - return s -} - -// SetResult sets the Result field's value. -func (s *DescribeIpGroupsOutput) SetResult(v []*IpGroup) *DescribeIpGroupsOutput { - s.Result = v - return s -} - -type DescribeTagsInput struct { - _ struct{} `type:"structure"` - - // The identifier of the WorkSpace. To find this ID, use DescribeWorkspaces. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s DescribeTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *DescribeTagsInput) SetResourceId(v string) *DescribeTagsInput { - s.ResourceId = &v - return s -} - -type DescribeTagsOutput struct { - _ struct{} `type:"structure"` - - // The tags. - TagList []*Tag `type:"list"` -} - -// String returns the string representation -func (s DescribeTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeTagsOutput) GoString() string { - return s.String() -} - -// SetTagList sets the TagList field's value. -func (s *DescribeTagsOutput) SetTagList(v []*Tag) *DescribeTagsOutput { - s.TagList = v - return s -} - -type DescribeWorkspaceBundlesInput struct { - _ struct{} `type:"structure"` - - // The identifiers of the bundles. You cannot combine this parameter with any - // other filter. - BundleIds []*string `min:"1" type:"list"` - - // The token for the next set of results. (You received this token from a previous - // call.) - NextToken *string `min:"1" type:"string"` - - // The owner of the bundles. You cannot combine this parameter with any other - // filter. - // - // Specify AMAZON to describe the bundles provided by AWS or null to describe - // the bundles that belong to your account. - Owner *string `type:"string"` -} - -// String returns the string representation -func (s DescribeWorkspaceBundlesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkspaceBundlesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeWorkspaceBundlesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspaceBundlesInput"} - if s.BundleIds != nil && len(s.BundleIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("BundleIds", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBundleIds sets the BundleIds field's value. -func (s *DescribeWorkspaceBundlesInput) SetBundleIds(v []*string) *DescribeWorkspaceBundlesInput { - s.BundleIds = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeWorkspaceBundlesInput) SetNextToken(v string) *DescribeWorkspaceBundlesInput { - s.NextToken = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *DescribeWorkspaceBundlesInput) SetOwner(v string) *DescribeWorkspaceBundlesInput { - s.Owner = &v - return s -} - -type DescribeWorkspaceBundlesOutput struct { - _ struct{} `type:"structure"` - - // Information about the bundles. - Bundles []*WorkspaceBundle `type:"list"` - - // The token to use to retrieve the next set of results, or null if there are - // no more results available. This token is valid for one day and must be used - // within that time frame. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeWorkspaceBundlesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkspaceBundlesOutput) GoString() string { - return s.String() -} - -// SetBundles sets the Bundles field's value. -func (s *DescribeWorkspaceBundlesOutput) SetBundles(v []*WorkspaceBundle) *DescribeWorkspaceBundlesOutput { - s.Bundles = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeWorkspaceBundlesOutput) SetNextToken(v string) *DescribeWorkspaceBundlesOutput { - s.NextToken = &v - return s -} - -type DescribeWorkspaceDirectoriesInput struct { - _ struct{} `type:"structure"` - - // The identifiers of the directories. If the value is null, all directories - // are retrieved. - DirectoryIds []*string `min:"1" type:"list"` - - // If you received a NextToken from a previous call that was paginated, provide - // this token to receive the next set of results. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeWorkspaceDirectoriesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkspaceDirectoriesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeWorkspaceDirectoriesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspaceDirectoriesInput"} - if s.DirectoryIds != nil && len(s.DirectoryIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DirectoryIds", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryIds sets the DirectoryIds field's value. -func (s *DescribeWorkspaceDirectoriesInput) SetDirectoryIds(v []*string) *DescribeWorkspaceDirectoriesInput { - s.DirectoryIds = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeWorkspaceDirectoriesInput) SetNextToken(v string) *DescribeWorkspaceDirectoriesInput { - s.NextToken = &v - return s -} - -type DescribeWorkspaceDirectoriesOutput struct { - _ struct{} `type:"structure"` - - // Information about the directories. - Directories []*WorkspaceDirectory `type:"list"` - - // The token to use to retrieve the next set of results, or null if no more - // results are available. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeWorkspaceDirectoriesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkspaceDirectoriesOutput) GoString() string { - return s.String() -} - -// SetDirectories sets the Directories field's value. -func (s *DescribeWorkspaceDirectoriesOutput) SetDirectories(v []*WorkspaceDirectory) *DescribeWorkspaceDirectoriesOutput { - s.Directories = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeWorkspaceDirectoriesOutput) SetNextToken(v string) *DescribeWorkspaceDirectoriesOutput { - s.NextToken = &v - return s -} - -type DescribeWorkspaceImagesInput struct { - _ struct{} `type:"structure"` - - // The identifier of the image. - ImageIds []*string `min:"1" type:"list"` - - // The maximum number of items to return. - MaxResults *int64 `min:"1" type:"integer"` - - // If you received a NextToken from a previous call that was paginated, provide - // this token to receive the next set of results. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeWorkspaceImagesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkspaceImagesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeWorkspaceImagesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspaceImagesInput"} - if s.ImageIds != nil && len(s.ImageIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetImageIds sets the ImageIds field's value. -func (s *DescribeWorkspaceImagesInput) SetImageIds(v []*string) *DescribeWorkspaceImagesInput { - s.ImageIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeWorkspaceImagesInput) SetMaxResults(v int64) *DescribeWorkspaceImagesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeWorkspaceImagesInput) SetNextToken(v string) *DescribeWorkspaceImagesInput { - s.NextToken = &v - return s -} - -type DescribeWorkspaceImagesOutput struct { - _ struct{} `type:"structure"` - - // Information about the images. - Images []*WorkspaceImage `type:"list"` - - // The token to use to retrieve the next set of results, or null if no more - // results are available. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s DescribeWorkspaceImagesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkspaceImagesOutput) GoString() string { - return s.String() -} - -// SetImages sets the Images field's value. -func (s *DescribeWorkspaceImagesOutput) SetImages(v []*WorkspaceImage) *DescribeWorkspaceImagesOutput { - s.Images = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeWorkspaceImagesOutput) SetNextToken(v string) *DescribeWorkspaceImagesOutput { - s.NextToken = &v - return s -} - -type DescribeWorkspacesConnectionStatusInput struct { - _ struct{} `type:"structure"` - - // If you received a NextToken from a previous call that was paginated, provide - // this token to receive the next set of results. - NextToken *string `min:"1" type:"string"` - - // The identifiers of the WorkSpaces. You can specify up to 25 WorkSpaces. - WorkspaceIds []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s DescribeWorkspacesConnectionStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkspacesConnectionStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeWorkspacesConnectionStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspacesConnectionStatusInput"} - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.WorkspaceIds != nil && len(s.WorkspaceIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkspaceIds", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeWorkspacesConnectionStatusInput) SetNextToken(v string) *DescribeWorkspacesConnectionStatusInput { - s.NextToken = &v - return s -} - -// SetWorkspaceIds sets the WorkspaceIds field's value. -func (s *DescribeWorkspacesConnectionStatusInput) SetWorkspaceIds(v []*string) *DescribeWorkspacesConnectionStatusInput { - s.WorkspaceIds = v - return s -} - -type DescribeWorkspacesConnectionStatusOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next set of results, or null if no more - // results are available. - NextToken *string `min:"1" type:"string"` - - // Information about the connection status of the WorkSpace. - WorkspacesConnectionStatus []*WorkspaceConnectionStatus `type:"list"` -} - -// String returns the string representation -func (s DescribeWorkspacesConnectionStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkspacesConnectionStatusOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeWorkspacesConnectionStatusOutput) SetNextToken(v string) *DescribeWorkspacesConnectionStatusOutput { - s.NextToken = &v - return s -} - -// SetWorkspacesConnectionStatus sets the WorkspacesConnectionStatus field's value. -func (s *DescribeWorkspacesConnectionStatusOutput) SetWorkspacesConnectionStatus(v []*WorkspaceConnectionStatus) *DescribeWorkspacesConnectionStatusOutput { - s.WorkspacesConnectionStatus = v - return s -} - -type DescribeWorkspacesInput struct { - _ struct{} `type:"structure"` - - // The identifier of the bundle. All WorkSpaces that are created from this bundle - // are retrieved. You cannot combine this parameter with any other filter. - BundleId *string `type:"string"` - - // The identifier of the directory. In addition, you can optionally specify - // a specific directory user (see UserName). You cannot combine this parameter - // with any other filter. - DirectoryId *string `type:"string"` - - // The maximum number of items to return. - Limit *int64 `min:"1" type:"integer"` - - // If you received a NextToken from a previous call that was paginated, provide - // this token to receive the next set of results. - NextToken *string `min:"1" type:"string"` - - // The name of the directory user. You must specify this parameter with DirectoryId. - UserName *string `min:"1" type:"string"` - - // The identifiers of the WorkSpaces. You cannot combine this parameter with - // any other filter. - // - // Because the CreateWorkspaces operation is asynchronous, the identifier it - // returns is not immediately available. If you immediately call DescribeWorkspaces - // with this identifier, no information is returned. - WorkspaceIds []*string `min:"1" type:"list"` -} - -// String returns the string representation -func (s DescribeWorkspacesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkspacesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeWorkspacesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspacesInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - if s.WorkspaceIds != nil && len(s.WorkspaceIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WorkspaceIds", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBundleId sets the BundleId field's value. -func (s *DescribeWorkspacesInput) SetBundleId(v string) *DescribeWorkspacesInput { - s.BundleId = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DescribeWorkspacesInput) SetDirectoryId(v string) *DescribeWorkspacesInput { - s.DirectoryId = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeWorkspacesInput) SetLimit(v int64) *DescribeWorkspacesInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeWorkspacesInput) SetNextToken(v string) *DescribeWorkspacesInput { - s.NextToken = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DescribeWorkspacesInput) SetUserName(v string) *DescribeWorkspacesInput { - s.UserName = &v - return s -} - -// SetWorkspaceIds sets the WorkspaceIds field's value. -func (s *DescribeWorkspacesInput) SetWorkspaceIds(v []*string) *DescribeWorkspacesInput { - s.WorkspaceIds = v - return s -} - -type DescribeWorkspacesOutput struct { - _ struct{} `type:"structure"` - - // The token to use to retrieve the next set of results, or null if no more - // results are available. - NextToken *string `min:"1" type:"string"` - - // Information about the WorkSpaces. - // - // Because CreateWorkspaces is an asynchronous operation, some of the returned - // information could be incomplete. - Workspaces []*Workspace `type:"list"` -} - -// String returns the string representation -func (s DescribeWorkspacesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeWorkspacesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeWorkspacesOutput) SetNextToken(v string) *DescribeWorkspacesOutput { - s.NextToken = &v - return s -} - -// SetWorkspaces sets the Workspaces field's value. -func (s *DescribeWorkspacesOutput) SetWorkspaces(v []*Workspace) *DescribeWorkspacesOutput { - s.Workspaces = v - return s -} - -type DisassociateIpGroupsInput struct { - _ struct{} `type:"structure"` - - // The identifier of the directory. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // The identifiers of one or more IP access control groups. - // - // GroupIds is a required field - GroupIds []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s DisassociateIpGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateIpGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateIpGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateIpGroupsInput"} - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.GroupIds == nil { - invalidParams.Add(request.NewErrParamRequired("GroupIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *DisassociateIpGroupsInput) SetDirectoryId(v string) *DisassociateIpGroupsInput { - s.DirectoryId = &v - return s -} - -// SetGroupIds sets the GroupIds field's value. -func (s *DisassociateIpGroupsInput) SetGroupIds(v []*string) *DisassociateIpGroupsInput { - s.GroupIds = v - return s -} - -type DisassociateIpGroupsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateIpGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisassociateIpGroupsOutput) GoString() string { - return s.String() -} - -// Describes a WorkSpace that cannot be created. -type FailedCreateWorkspaceRequest struct { - _ struct{} `type:"structure"` - - // The error code that is returned if the WorkSpace cannot be created. - ErrorCode *string `type:"string"` - - // The text of the error message that is returned if the WorkSpace cannot be - // created. - ErrorMessage *string `type:"string"` - - // Information about the WorkSpace. - WorkspaceRequest *WorkspaceRequest `type:"structure"` -} - -// String returns the string representation -func (s FailedCreateWorkspaceRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailedCreateWorkspaceRequest) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *FailedCreateWorkspaceRequest) SetErrorCode(v string) *FailedCreateWorkspaceRequest { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *FailedCreateWorkspaceRequest) SetErrorMessage(v string) *FailedCreateWorkspaceRequest { - s.ErrorMessage = &v - return s -} - -// SetWorkspaceRequest sets the WorkspaceRequest field's value. -func (s *FailedCreateWorkspaceRequest) SetWorkspaceRequest(v *WorkspaceRequest) *FailedCreateWorkspaceRequest { - s.WorkspaceRequest = v - return s -} - -// Describes a WorkSpace that could not be rebooted. (RebootWorkspaces), rebuilt -// (RebuildWorkspaces), terminated (TerminateWorkspaces), started (StartWorkspaces), -// or stopped (StopWorkspaces). -type FailedWorkspaceChangeRequest struct { - _ struct{} `type:"structure"` - - // The error code that is returned if the WorkSpace cannot be rebooted. - ErrorCode *string `type:"string"` - - // The text of the error message that is returned if the WorkSpace cannot be - // rebooted. - ErrorMessage *string `type:"string"` - - // The identifier of the WorkSpace. - WorkspaceId *string `type:"string"` -} - -// String returns the string representation -func (s FailedWorkspaceChangeRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FailedWorkspaceChangeRequest) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *FailedWorkspaceChangeRequest) SetErrorCode(v string) *FailedWorkspaceChangeRequest { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *FailedWorkspaceChangeRequest) SetErrorMessage(v string) *FailedWorkspaceChangeRequest { - s.ErrorMessage = &v - return s -} - -// SetWorkspaceId sets the WorkspaceId field's value. -func (s *FailedWorkspaceChangeRequest) SetWorkspaceId(v string) *FailedWorkspaceChangeRequest { - s.WorkspaceId = &v - return s -} - -type ImportWorkspaceImageInput struct { - _ struct{} `type:"structure"` - - // The identifier of the EC2 image. - // - // Ec2ImageId is a required field - Ec2ImageId *string `type:"string" required:"true"` - - // The description of the WorkSpace image. - // - // ImageDescription is a required field - ImageDescription *string `min:"1" type:"string" required:"true"` - - // The name of the WorkSpace image. - // - // ImageName is a required field - ImageName *string `min:"1" type:"string" required:"true"` - - // The ingestion process to be used when importing the image. - // - // IngestionProcess is a required field - IngestionProcess *string `type:"string" required:"true" enum:"WorkspaceImageIngestionProcess"` -} - -// String returns the string representation -func (s ImportWorkspaceImageInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportWorkspaceImageInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportWorkspaceImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportWorkspaceImageInput"} - if s.Ec2ImageId == nil { - invalidParams.Add(request.NewErrParamRequired("Ec2ImageId")) - } - if s.ImageDescription == nil { - invalidParams.Add(request.NewErrParamRequired("ImageDescription")) - } - if s.ImageDescription != nil && len(*s.ImageDescription) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ImageDescription", 1)) - } - if s.ImageName == nil { - invalidParams.Add(request.NewErrParamRequired("ImageName")) - } - if s.ImageName != nil && len(*s.ImageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ImageName", 1)) - } - if s.IngestionProcess == nil { - invalidParams.Add(request.NewErrParamRequired("IngestionProcess")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEc2ImageId sets the Ec2ImageId field's value. -func (s *ImportWorkspaceImageInput) SetEc2ImageId(v string) *ImportWorkspaceImageInput { - s.Ec2ImageId = &v - return s -} - -// SetImageDescription sets the ImageDescription field's value. -func (s *ImportWorkspaceImageInput) SetImageDescription(v string) *ImportWorkspaceImageInput { - s.ImageDescription = &v - return s -} - -// SetImageName sets the ImageName field's value. -func (s *ImportWorkspaceImageInput) SetImageName(v string) *ImportWorkspaceImageInput { - s.ImageName = &v - return s -} - -// SetIngestionProcess sets the IngestionProcess field's value. -func (s *ImportWorkspaceImageInput) SetIngestionProcess(v string) *ImportWorkspaceImageInput { - s.IngestionProcess = &v - return s -} - -type ImportWorkspaceImageOutput struct { - _ struct{} `type:"structure"` - - // The identifier of the WorkSpace image. - ImageId *string `type:"string"` -} - -// String returns the string representation -func (s ImportWorkspaceImageOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ImportWorkspaceImageOutput) GoString() string { - return s.String() -} - -// SetImageId sets the ImageId field's value. -func (s *ImportWorkspaceImageOutput) SetImageId(v string) *ImportWorkspaceImageOutput { - s.ImageId = &v - return s -} - -// Describes an IP access control group. -type IpGroup struct { - _ struct{} `type:"structure"` - - // The description of the group. - GroupDesc *string `locationName:"groupDesc" type:"string"` - - // The identifier of the group. - GroupId *string `locationName:"groupId" type:"string"` - - // The name of the group. - GroupName *string `locationName:"groupName" type:"string"` - - // The rules. - UserRules []*IpRuleItem `locationName:"userRules" type:"list"` -} - -// String returns the string representation -func (s IpGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IpGroup) GoString() string { - return s.String() -} - -// SetGroupDesc sets the GroupDesc field's value. -func (s *IpGroup) SetGroupDesc(v string) *IpGroup { - s.GroupDesc = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *IpGroup) SetGroupId(v string) *IpGroup { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *IpGroup) SetGroupName(v string) *IpGroup { - s.GroupName = &v - return s -} - -// SetUserRules sets the UserRules field's value. -func (s *IpGroup) SetUserRules(v []*IpRuleItem) *IpGroup { - s.UserRules = v - return s -} - -// Describes a rule for an IP access control group. -type IpRuleItem struct { - _ struct{} `type:"structure"` - - // The IP address range, in CIDR notation. - IpRule *string `locationName:"ipRule" type:"string"` - - // The description. - RuleDesc *string `locationName:"ruleDesc" type:"string"` -} - -// String returns the string representation -func (s IpRuleItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s IpRuleItem) GoString() string { - return s.String() -} - -// SetIpRule sets the IpRule field's value. -func (s *IpRuleItem) SetIpRule(v string) *IpRuleItem { - s.IpRule = &v - return s -} - -// SetRuleDesc sets the RuleDesc field's value. -func (s *IpRuleItem) SetRuleDesc(v string) *IpRuleItem { - s.RuleDesc = &v - return s -} - -type ListAvailableManagementCidrRangesInput struct { - _ struct{} `type:"structure"` - - // The IP address range to search. Specify an IP address range that is compatible - // with your network and in CIDR notation (that is, specify the range as an - // IPv4 CIDR block). - // - // ManagementCidrRangeConstraint is a required field - ManagementCidrRangeConstraint *string `type:"string" required:"true"` - - // The maximum number of items to return. - MaxResults *int64 `min:"1" type:"integer"` - - // If you received a NextToken from a previous call that was paginated, provide - // this token to receive the next set of results. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListAvailableManagementCidrRangesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAvailableManagementCidrRangesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAvailableManagementCidrRangesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAvailableManagementCidrRangesInput"} - if s.ManagementCidrRangeConstraint == nil { - invalidParams.Add(request.NewErrParamRequired("ManagementCidrRangeConstraint")) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetManagementCidrRangeConstraint sets the ManagementCidrRangeConstraint field's value. -func (s *ListAvailableManagementCidrRangesInput) SetManagementCidrRangeConstraint(v string) *ListAvailableManagementCidrRangesInput { - s.ManagementCidrRangeConstraint = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListAvailableManagementCidrRangesInput) SetMaxResults(v int64) *ListAvailableManagementCidrRangesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAvailableManagementCidrRangesInput) SetNextToken(v string) *ListAvailableManagementCidrRangesInput { - s.NextToken = &v - return s -} - -type ListAvailableManagementCidrRangesOutput struct { - _ struct{} `type:"structure"` - - // The list of available IP address ranges, specified as IPv4 CIDR blocks. - ManagementCidrRanges []*string `type:"list"` - - // The token to use to retrieve the next set of results, or null if no more - // results are available. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s ListAvailableManagementCidrRangesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListAvailableManagementCidrRangesOutput) GoString() string { - return s.String() -} - -// SetManagementCidrRanges sets the ManagementCidrRanges field's value. -func (s *ListAvailableManagementCidrRangesOutput) SetManagementCidrRanges(v []*string) *ListAvailableManagementCidrRangesOutput { - s.ManagementCidrRanges = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListAvailableManagementCidrRangesOutput) SetNextToken(v string) *ListAvailableManagementCidrRangesOutput { - s.NextToken = &v - return s -} - -// Describes a WorkSpace modification. -type ModificationState struct { - _ struct{} `type:"structure"` - - // The resource. - Resource *string `type:"string" enum:"ModificationResourceEnum"` - - // The modification state. - State *string `type:"string" enum:"ModificationStateEnum"` -} - -// String returns the string representation -func (s ModificationState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModificationState) GoString() string { - return s.String() -} - -// SetResource sets the Resource field's value. -func (s *ModificationState) SetResource(v string) *ModificationState { - s.Resource = &v - return s -} - -// SetState sets the State field's value. -func (s *ModificationState) SetState(v string) *ModificationState { - s.State = &v - return s -} - -type ModifyAccountInput struct { - _ struct{} `type:"structure"` - - // The IP address range, specified as an IPv4 CIDR block, for the management - // network interface. Specify an IP address range that is compatible with your - // network and in CIDR notation (that is, specify the range as an IPv4 CIDR - // block). The CIDR block size must be /16 (for example, 203.0.113.25/16). It - // must also be specified as available by the ListAvailableManagementCidrRanges - // operation. - DedicatedTenancyManagementCidrRange *string `type:"string"` - - // The status of BYOL. - DedicatedTenancySupport *string `type:"string" enum:"DedicatedTenancySupportEnum"` -} - -// String returns the string representation -func (s ModifyAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyAccountInput) GoString() string { - return s.String() -} - -// SetDedicatedTenancyManagementCidrRange sets the DedicatedTenancyManagementCidrRange field's value. -func (s *ModifyAccountInput) SetDedicatedTenancyManagementCidrRange(v string) *ModifyAccountInput { - s.DedicatedTenancyManagementCidrRange = &v - return s -} - -// SetDedicatedTenancySupport sets the DedicatedTenancySupport field's value. -func (s *ModifyAccountInput) SetDedicatedTenancySupport(v string) *ModifyAccountInput { - s.DedicatedTenancySupport = &v - return s -} - -type ModifyAccountOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyAccountOutput) GoString() string { - return s.String() -} - -type ModifyClientPropertiesInput struct { - _ struct{} `type:"structure"` - - // Information about the Amazon WorkSpaces client. - ClientProperties *ClientProperties `type:"structure"` - - // The resource identifiers, in the form of directory IDs. - // - // ResourceId is a required field - ResourceId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation -func (s ModifyClientPropertiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClientPropertiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyClientPropertiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyClientPropertiesInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientProperties sets the ClientProperties field's value. -func (s *ModifyClientPropertiesInput) SetClientProperties(v *ClientProperties) *ModifyClientPropertiesInput { - s.ClientProperties = v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ModifyClientPropertiesInput) SetResourceId(v string) *ModifyClientPropertiesInput { - s.ResourceId = &v - return s -} - -type ModifyClientPropertiesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyClientPropertiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyClientPropertiesOutput) GoString() string { - return s.String() -} - -type ModifyWorkspacePropertiesInput struct { - _ struct{} `type:"structure"` - - // The identifier of the WorkSpace. - // - // WorkspaceId is a required field - WorkspaceId *string `type:"string" required:"true"` - - // The properties of the WorkSpace. - // - // WorkspaceProperties is a required field - WorkspaceProperties *WorkspaceProperties `type:"structure" required:"true"` -} - -// String returns the string representation -func (s ModifyWorkspacePropertiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyWorkspacePropertiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyWorkspacePropertiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyWorkspacePropertiesInput"} - if s.WorkspaceId == nil { - invalidParams.Add(request.NewErrParamRequired("WorkspaceId")) - } - if s.WorkspaceProperties == nil { - invalidParams.Add(request.NewErrParamRequired("WorkspaceProperties")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWorkspaceId sets the WorkspaceId field's value. -func (s *ModifyWorkspacePropertiesInput) SetWorkspaceId(v string) *ModifyWorkspacePropertiesInput { - s.WorkspaceId = &v - return s -} - -// SetWorkspaceProperties sets the WorkspaceProperties field's value. -func (s *ModifyWorkspacePropertiesInput) SetWorkspaceProperties(v *WorkspaceProperties) *ModifyWorkspacePropertiesInput { - s.WorkspaceProperties = v - return s -} - -type ModifyWorkspacePropertiesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyWorkspacePropertiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyWorkspacePropertiesOutput) GoString() string { - return s.String() -} - -type ModifyWorkspaceStateInput struct { - _ struct{} `type:"structure"` - - // The identifier of the WorkSpace. - // - // WorkspaceId is a required field - WorkspaceId *string `type:"string" required:"true"` - - // The WorkSpace state. - // - // WorkspaceState is a required field - WorkspaceState *string `type:"string" required:"true" enum:"TargetWorkspaceState"` -} - -// String returns the string representation -func (s ModifyWorkspaceStateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyWorkspaceStateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyWorkspaceStateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyWorkspaceStateInput"} - if s.WorkspaceId == nil { - invalidParams.Add(request.NewErrParamRequired("WorkspaceId")) - } - if s.WorkspaceState == nil { - invalidParams.Add(request.NewErrParamRequired("WorkspaceState")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWorkspaceId sets the WorkspaceId field's value. -func (s *ModifyWorkspaceStateInput) SetWorkspaceId(v string) *ModifyWorkspaceStateInput { - s.WorkspaceId = &v - return s -} - -// SetWorkspaceState sets the WorkspaceState field's value. -func (s *ModifyWorkspaceStateInput) SetWorkspaceState(v string) *ModifyWorkspaceStateInput { - s.WorkspaceState = &v - return s -} - -type ModifyWorkspaceStateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s ModifyWorkspaceStateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyWorkspaceStateOutput) GoString() string { - return s.String() -} - -// The operating system that the image is running. -type OperatingSystem struct { - _ struct{} `type:"structure"` - - // The operating system. - Type *string `type:"string" enum:"OperatingSystemType"` -} - -// String returns the string representation -func (s OperatingSystem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OperatingSystem) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *OperatingSystem) SetType(v string) *OperatingSystem { - s.Type = &v - return s -} - -// Describes the information used to reboot a WorkSpace. -type RebootRequest struct { - _ struct{} `type:"structure"` - - // The identifier of the WorkSpace. - // - // WorkspaceId is a required field - WorkspaceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RebootRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootRequest"} - if s.WorkspaceId == nil { - invalidParams.Add(request.NewErrParamRequired("WorkspaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWorkspaceId sets the WorkspaceId field's value. -func (s *RebootRequest) SetWorkspaceId(v string) *RebootRequest { - s.WorkspaceId = &v - return s -} - -type RebootWorkspacesInput struct { - _ struct{} `type:"structure"` - - // The WorkSpaces to reboot. You can specify up to 25 WorkSpaces. - // - // RebootWorkspaceRequests is a required field - RebootWorkspaceRequests []*RebootRequest `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s RebootWorkspacesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootWorkspacesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootWorkspacesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootWorkspacesInput"} - if s.RebootWorkspaceRequests == nil { - invalidParams.Add(request.NewErrParamRequired("RebootWorkspaceRequests")) - } - if s.RebootWorkspaceRequests != nil && len(s.RebootWorkspaceRequests) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RebootWorkspaceRequests", 1)) - } - if s.RebootWorkspaceRequests != nil { - for i, v := range s.RebootWorkspaceRequests { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RebootWorkspaceRequests", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRebootWorkspaceRequests sets the RebootWorkspaceRequests field's value. -func (s *RebootWorkspacesInput) SetRebootWorkspaceRequests(v []*RebootRequest) *RebootWorkspacesInput { - s.RebootWorkspaceRequests = v - return s -} - -type RebootWorkspacesOutput struct { - _ struct{} `type:"structure"` - - // Information about the WorkSpaces that could not be rebooted. - FailedRequests []*FailedWorkspaceChangeRequest `type:"list"` -} - -// String returns the string representation -func (s RebootWorkspacesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebootWorkspacesOutput) GoString() string { - return s.String() -} - -// SetFailedRequests sets the FailedRequests field's value. -func (s *RebootWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *RebootWorkspacesOutput { - s.FailedRequests = v - return s -} - -// Describes the information used to rebuild a WorkSpace. -type RebuildRequest struct { - _ struct{} `type:"structure"` - - // The identifier of the WorkSpace. - // - // WorkspaceId is a required field - WorkspaceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s RebuildRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebuildRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebuildRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebuildRequest"} - if s.WorkspaceId == nil { - invalidParams.Add(request.NewErrParamRequired("WorkspaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWorkspaceId sets the WorkspaceId field's value. -func (s *RebuildRequest) SetWorkspaceId(v string) *RebuildRequest { - s.WorkspaceId = &v - return s -} - -type RebuildWorkspacesInput struct { - _ struct{} `type:"structure"` - - // The WorkSpace to rebuild. You can specify a single WorkSpace. - // - // RebuildWorkspaceRequests is a required field - RebuildWorkspaceRequests []*RebuildRequest `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s RebuildWorkspacesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebuildWorkspacesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebuildWorkspacesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebuildWorkspacesInput"} - if s.RebuildWorkspaceRequests == nil { - invalidParams.Add(request.NewErrParamRequired("RebuildWorkspaceRequests")) - } - if s.RebuildWorkspaceRequests != nil && len(s.RebuildWorkspaceRequests) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RebuildWorkspaceRequests", 1)) - } - if s.RebuildWorkspaceRequests != nil { - for i, v := range s.RebuildWorkspaceRequests { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RebuildWorkspaceRequests", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRebuildWorkspaceRequests sets the RebuildWorkspaceRequests field's value. -func (s *RebuildWorkspacesInput) SetRebuildWorkspaceRequests(v []*RebuildRequest) *RebuildWorkspacesInput { - s.RebuildWorkspaceRequests = v - return s -} - -type RebuildWorkspacesOutput struct { - _ struct{} `type:"structure"` - - // Information about the WorkSpace that could not be rebuilt. - FailedRequests []*FailedWorkspaceChangeRequest `type:"list"` -} - -// String returns the string representation -func (s RebuildWorkspacesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RebuildWorkspacesOutput) GoString() string { - return s.String() -} - -// SetFailedRequests sets the FailedRequests field's value. -func (s *RebuildWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *RebuildWorkspacesOutput { - s.FailedRequests = v - return s -} - -type RevokeIpRulesInput struct { - _ struct{} `type:"structure"` - - // The identifier of the group. - // - // GroupId is a required field - GroupId *string `type:"string" required:"true"` - - // The rules to remove from the group. - // - // UserRules is a required field - UserRules []*string `type:"list" required:"true"` -} - -// String returns the string representation -func (s RevokeIpRulesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeIpRulesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RevokeIpRulesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RevokeIpRulesInput"} - if s.GroupId == nil { - invalidParams.Add(request.NewErrParamRequired("GroupId")) - } - if s.UserRules == nil { - invalidParams.Add(request.NewErrParamRequired("UserRules")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupId sets the GroupId field's value. -func (s *RevokeIpRulesInput) SetGroupId(v string) *RevokeIpRulesInput { - s.GroupId = &v - return s -} - -// SetUserRules sets the UserRules field's value. -func (s *RevokeIpRulesInput) SetUserRules(v []*string) *RevokeIpRulesInput { - s.UserRules = v - return s -} - -type RevokeIpRulesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s RevokeIpRulesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RevokeIpRulesOutput) GoString() string { - return s.String() -} - -// Describes the root volume for a WorkSpace bundle. -type RootStorage struct { - _ struct{} `type:"structure"` - - // The size of the root volume. - Capacity *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s RootStorage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s RootStorage) GoString() string { - return s.String() -} - -// SetCapacity sets the Capacity field's value. -func (s *RootStorage) SetCapacity(v string) *RootStorage { - s.Capacity = &v - return s -} - -// Information used to start a WorkSpace. -type StartRequest struct { - _ struct{} `type:"structure"` - - // The identifier of the WorkSpace. - WorkspaceId *string `type:"string"` -} - -// String returns the string representation -func (s StartRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartRequest) GoString() string { - return s.String() -} - -// SetWorkspaceId sets the WorkspaceId field's value. -func (s *StartRequest) SetWorkspaceId(v string) *StartRequest { - s.WorkspaceId = &v - return s -} - -type StartWorkspacesInput struct { - _ struct{} `type:"structure"` - - // The WorkSpaces to start. You can specify up to 25 WorkSpaces. - // - // StartWorkspaceRequests is a required field - StartWorkspaceRequests []*StartRequest `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s StartWorkspacesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartWorkspacesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartWorkspacesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartWorkspacesInput"} - if s.StartWorkspaceRequests == nil { - invalidParams.Add(request.NewErrParamRequired("StartWorkspaceRequests")) - } - if s.StartWorkspaceRequests != nil && len(s.StartWorkspaceRequests) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StartWorkspaceRequests", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStartWorkspaceRequests sets the StartWorkspaceRequests field's value. -func (s *StartWorkspacesInput) SetStartWorkspaceRequests(v []*StartRequest) *StartWorkspacesInput { - s.StartWorkspaceRequests = v - return s -} - -type StartWorkspacesOutput struct { - _ struct{} `type:"structure"` - - // Information about the WorkSpaces that could not be started. - FailedRequests []*FailedWorkspaceChangeRequest `type:"list"` -} - -// String returns the string representation -func (s StartWorkspacesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StartWorkspacesOutput) GoString() string { - return s.String() -} - -// SetFailedRequests sets the FailedRequests field's value. -func (s *StartWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *StartWorkspacesOutput { - s.FailedRequests = v - return s -} - -// Describes the information used to stop a WorkSpace. -type StopRequest struct { - _ struct{} `type:"structure"` - - // The identifier of the WorkSpace. - WorkspaceId *string `type:"string"` -} - -// String returns the string representation -func (s StopRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopRequest) GoString() string { - return s.String() -} - -// SetWorkspaceId sets the WorkspaceId field's value. -func (s *StopRequest) SetWorkspaceId(v string) *StopRequest { - s.WorkspaceId = &v - return s -} - -type StopWorkspacesInput struct { - _ struct{} `type:"structure"` - - // The WorkSpaces to stop. You can specify up to 25 WorkSpaces. - // - // StopWorkspaceRequests is a required field - StopWorkspaceRequests []*StopRequest `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s StopWorkspacesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopWorkspacesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopWorkspacesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopWorkspacesInput"} - if s.StopWorkspaceRequests == nil { - invalidParams.Add(request.NewErrParamRequired("StopWorkspaceRequests")) - } - if s.StopWorkspaceRequests != nil && len(s.StopWorkspaceRequests) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StopWorkspaceRequests", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStopWorkspaceRequests sets the StopWorkspaceRequests field's value. -func (s *StopWorkspacesInput) SetStopWorkspaceRequests(v []*StopRequest) *StopWorkspacesInput { - s.StopWorkspaceRequests = v - return s -} - -type StopWorkspacesOutput struct { - _ struct{} `type:"structure"` - - // Information about the WorkSpaces that could not be stopped. - FailedRequests []*FailedWorkspaceChangeRequest `type:"list"` -} - -// String returns the string representation -func (s StopWorkspacesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s StopWorkspacesOutput) GoString() string { - return s.String() -} - -// SetFailedRequests sets the FailedRequests field's value. -func (s *StopWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *StopWorkspacesOutput { - s.FailedRequests = v - return s -} - -// Describes a tag. -type Tag struct { - _ struct{} `type:"structure"` - - // The key of the tag. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The value of the tag. - Value *string `type:"string"` -} - -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// Describes the information used to terminate a WorkSpace. -type TerminateRequest struct { - _ struct{} `type:"structure"` - - // The identifier of the WorkSpace. - // - // WorkspaceId is a required field - WorkspaceId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s TerminateRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TerminateRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TerminateRequest"} - if s.WorkspaceId == nil { - invalidParams.Add(request.NewErrParamRequired("WorkspaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetWorkspaceId sets the WorkspaceId field's value. -func (s *TerminateRequest) SetWorkspaceId(v string) *TerminateRequest { - s.WorkspaceId = &v - return s -} - -type TerminateWorkspacesInput struct { - _ struct{} `type:"structure"` - - // The WorkSpaces to terminate. You can specify up to 25 WorkSpaces. - // - // TerminateWorkspaceRequests is a required field - TerminateWorkspaceRequests []*TerminateRequest `min:"1" type:"list" required:"true"` -} - -// String returns the string representation -func (s TerminateWorkspacesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateWorkspacesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TerminateWorkspacesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TerminateWorkspacesInput"} - if s.TerminateWorkspaceRequests == nil { - invalidParams.Add(request.NewErrParamRequired("TerminateWorkspaceRequests")) - } - if s.TerminateWorkspaceRequests != nil && len(s.TerminateWorkspaceRequests) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TerminateWorkspaceRequests", 1)) - } - if s.TerminateWorkspaceRequests != nil { - for i, v := range s.TerminateWorkspaceRequests { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TerminateWorkspaceRequests", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTerminateWorkspaceRequests sets the TerminateWorkspaceRequests field's value. -func (s *TerminateWorkspacesInput) SetTerminateWorkspaceRequests(v []*TerminateRequest) *TerminateWorkspacesInput { - s.TerminateWorkspaceRequests = v - return s -} - -type TerminateWorkspacesOutput struct { - _ struct{} `type:"structure"` - - // Information about the WorkSpaces that could not be terminated. - FailedRequests []*FailedWorkspaceChangeRequest `type:"list"` -} - -// String returns the string representation -func (s TerminateWorkspacesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TerminateWorkspacesOutput) GoString() string { - return s.String() -} - -// SetFailedRequests sets the FailedRequests field's value. -func (s *TerminateWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *TerminateWorkspacesOutput { - s.FailedRequests = v - return s -} - -type UpdateRulesOfIpGroupInput struct { - _ struct{} `type:"structure"` - - // The identifier of the group. - // - // GroupId is a required field - GroupId *string `type:"string" required:"true"` - - // One or more rules. - // - // UserRules is a required field - UserRules []*IpRuleItem `type:"list" required:"true"` -} - -// String returns the string representation -func (s UpdateRulesOfIpGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRulesOfIpGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRulesOfIpGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRulesOfIpGroupInput"} - if s.GroupId == nil { - invalidParams.Add(request.NewErrParamRequired("GroupId")) - } - if s.UserRules == nil { - invalidParams.Add(request.NewErrParamRequired("UserRules")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupId sets the GroupId field's value. -func (s *UpdateRulesOfIpGroupInput) SetGroupId(v string) *UpdateRulesOfIpGroupInput { - s.GroupId = &v - return s -} - -// SetUserRules sets the UserRules field's value. -func (s *UpdateRulesOfIpGroupInput) SetUserRules(v []*IpRuleItem) *UpdateRulesOfIpGroupInput { - s.UserRules = v - return s -} - -type UpdateRulesOfIpGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s UpdateRulesOfIpGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UpdateRulesOfIpGroupOutput) GoString() string { - return s.String() -} - -// Describes the user storage for a WorkSpace bundle. -type UserStorage struct { - _ struct{} `type:"structure"` - - // The size of the user storage. - Capacity *string `min:"1" type:"string"` -} - -// String returns the string representation -func (s UserStorage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s UserStorage) GoString() string { - return s.String() -} - -// SetCapacity sets the Capacity field's value. -func (s *UserStorage) SetCapacity(v string) *UserStorage { - s.Capacity = &v - return s -} - -// Describes a WorkSpace. -type Workspace struct { - _ struct{} `type:"structure"` - - // The identifier of the bundle used to create the WorkSpace. - BundleId *string `type:"string"` - - // The name of the WorkSpace, as seen by the operating system. - ComputerName *string `type:"string"` - - // The identifier of the AWS Directory Service directory for the WorkSpace. - DirectoryId *string `type:"string"` - - // The error code that is returned if the WorkSpace cannot be created. - ErrorCode *string `type:"string"` - - // The text of the error message that is returned if the WorkSpace cannot be - // created. - ErrorMessage *string `type:"string"` - - // The IP address of the WorkSpace. - IpAddress *string `type:"string"` - - // The modification states of the WorkSpace. - ModificationStates []*ModificationState `type:"list"` - - // Indicates whether the data stored on the root volume is encrypted. - RootVolumeEncryptionEnabled *bool `type:"boolean"` - - // The operational state of the WorkSpace. - State *string `type:"string" enum:"WorkspaceState"` - - // The identifier of the subnet for the WorkSpace. - SubnetId *string `type:"string"` - - // The user for the WorkSpace. - UserName *string `min:"1" type:"string"` - - // Indicates whether the data stored on the user volume is encrypted. - UserVolumeEncryptionEnabled *bool `type:"boolean"` - - // The KMS key used to encrypt data stored on your WorkSpace. - VolumeEncryptionKey *string `type:"string"` - - // The identifier of the WorkSpace. - WorkspaceId *string `type:"string"` - - // The properties of the WorkSpace. - WorkspaceProperties *WorkspaceProperties `type:"structure"` -} - -// String returns the string representation -func (s Workspace) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Workspace) GoString() string { - return s.String() -} - -// SetBundleId sets the BundleId field's value. -func (s *Workspace) SetBundleId(v string) *Workspace { - s.BundleId = &v - return s -} - -// SetComputerName sets the ComputerName field's value. -func (s *Workspace) SetComputerName(v string) *Workspace { - s.ComputerName = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *Workspace) SetDirectoryId(v string) *Workspace { - s.DirectoryId = &v - return s -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *Workspace) SetErrorCode(v string) *Workspace { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *Workspace) SetErrorMessage(v string) *Workspace { - s.ErrorMessage = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *Workspace) SetIpAddress(v string) *Workspace { - s.IpAddress = &v - return s -} - -// SetModificationStates sets the ModificationStates field's value. -func (s *Workspace) SetModificationStates(v []*ModificationState) *Workspace { - s.ModificationStates = v - return s -} - -// SetRootVolumeEncryptionEnabled sets the RootVolumeEncryptionEnabled field's value. -func (s *Workspace) SetRootVolumeEncryptionEnabled(v bool) *Workspace { - s.RootVolumeEncryptionEnabled = &v - return s -} - -// SetState sets the State field's value. -func (s *Workspace) SetState(v string) *Workspace { - s.State = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *Workspace) SetSubnetId(v string) *Workspace { - s.SubnetId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *Workspace) SetUserName(v string) *Workspace { - s.UserName = &v - return s -} - -// SetUserVolumeEncryptionEnabled sets the UserVolumeEncryptionEnabled field's value. -func (s *Workspace) SetUserVolumeEncryptionEnabled(v bool) *Workspace { - s.UserVolumeEncryptionEnabled = &v - return s -} - -// SetVolumeEncryptionKey sets the VolumeEncryptionKey field's value. -func (s *Workspace) SetVolumeEncryptionKey(v string) *Workspace { - s.VolumeEncryptionKey = &v - return s -} - -// SetWorkspaceId sets the WorkspaceId field's value. -func (s *Workspace) SetWorkspaceId(v string) *Workspace { - s.WorkspaceId = &v - return s -} - -// SetWorkspaceProperties sets the WorkspaceProperties field's value. -func (s *Workspace) SetWorkspaceProperties(v *WorkspaceProperties) *Workspace { - s.WorkspaceProperties = v - return s -} - -// Describes a WorkSpace bundle. -type WorkspaceBundle struct { - _ struct{} `type:"structure"` - - // The bundle identifier. - BundleId *string `type:"string"` - - // The compute type. For more information, see Amazon WorkSpaces Bundles (http://aws.amazon.com/workspaces/details/#Amazon_WorkSpaces_Bundles). - ComputeType *ComputeType `type:"structure"` - - // A description. - Description *string `type:"string"` - - // The name of the bundle. - Name *string `min:"1" type:"string"` - - // The owner of the bundle. This is the account identifier of the owner, or - // AMAZON if the bundle is provided by AWS. - Owner *string `type:"string"` - - // The size of the root volume. - RootStorage *RootStorage `type:"structure"` - - // The size of the user storage. - UserStorage *UserStorage `type:"structure"` -} - -// String returns the string representation -func (s WorkspaceBundle) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkspaceBundle) GoString() string { - return s.String() -} - -// SetBundleId sets the BundleId field's value. -func (s *WorkspaceBundle) SetBundleId(v string) *WorkspaceBundle { - s.BundleId = &v - return s -} - -// SetComputeType sets the ComputeType field's value. -func (s *WorkspaceBundle) SetComputeType(v *ComputeType) *WorkspaceBundle { - s.ComputeType = v - return s -} - -// SetDescription sets the Description field's value. -func (s *WorkspaceBundle) SetDescription(v string) *WorkspaceBundle { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *WorkspaceBundle) SetName(v string) *WorkspaceBundle { - s.Name = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *WorkspaceBundle) SetOwner(v string) *WorkspaceBundle { - s.Owner = &v - return s -} - -// SetRootStorage sets the RootStorage field's value. -func (s *WorkspaceBundle) SetRootStorage(v *RootStorage) *WorkspaceBundle { - s.RootStorage = v - return s -} - -// SetUserStorage sets the UserStorage field's value. -func (s *WorkspaceBundle) SetUserStorage(v *UserStorage) *WorkspaceBundle { - s.UserStorage = v - return s -} - -// Describes the connection status of a WorkSpace. -type WorkspaceConnectionStatus struct { - _ struct{} `type:"structure"` - - // The connection state of the WorkSpace. The connection state is unknown if - // the WorkSpace is stopped. - ConnectionState *string `type:"string" enum:"ConnectionState"` - - // The timestamp of the connection status check. - ConnectionStateCheckTimestamp *time.Time `type:"timestamp"` - - // The timestamp of the last known user connection. - LastKnownUserConnectionTimestamp *time.Time `type:"timestamp"` - - // The identifier of the WorkSpace. - WorkspaceId *string `type:"string"` -} - -// String returns the string representation -func (s WorkspaceConnectionStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkspaceConnectionStatus) GoString() string { - return s.String() -} - -// SetConnectionState sets the ConnectionState field's value. -func (s *WorkspaceConnectionStatus) SetConnectionState(v string) *WorkspaceConnectionStatus { - s.ConnectionState = &v - return s -} - -// SetConnectionStateCheckTimestamp sets the ConnectionStateCheckTimestamp field's value. -func (s *WorkspaceConnectionStatus) SetConnectionStateCheckTimestamp(v time.Time) *WorkspaceConnectionStatus { - s.ConnectionStateCheckTimestamp = &v - return s -} - -// SetLastKnownUserConnectionTimestamp sets the LastKnownUserConnectionTimestamp field's value. -func (s *WorkspaceConnectionStatus) SetLastKnownUserConnectionTimestamp(v time.Time) *WorkspaceConnectionStatus { - s.LastKnownUserConnectionTimestamp = &v - return s -} - -// SetWorkspaceId sets the WorkspaceId field's value. -func (s *WorkspaceConnectionStatus) SetWorkspaceId(v string) *WorkspaceConnectionStatus { - s.WorkspaceId = &v - return s -} - -// Describes an AWS Directory Service directory that is used with Amazon WorkSpaces. -type WorkspaceDirectory struct { - _ struct{} `type:"structure"` - - // The directory alias. - Alias *string `type:"string"` - - // The user name for the service account. - CustomerUserName *string `min:"1" type:"string"` - - // The directory identifier. - DirectoryId *string `type:"string"` - - // The name of the directory. - DirectoryName *string `type:"string"` - - // The directory type. - DirectoryType *string `type:"string" enum:"WorkspaceDirectoryType"` - - // The IP addresses of the DNS servers for the directory. - DnsIpAddresses []*string `type:"list"` - - // The identifier of the IAM role. This is the role that allows Amazon WorkSpaces - // to make calls to other services, such as Amazon EC2, on your behalf. - IamRoleId *string `type:"string"` - - // The identifiers of the IP access control groups associated with the directory. - IpGroupIds []*string `locationName:"ipGroupIds" type:"list"` - - // The registration code for the directory. This is the code that users enter - // in their Amazon WorkSpaces client application to connect to the directory. - RegistrationCode *string `min:"1" type:"string"` - - // The state of the directory's registration with Amazon WorkSpaces - State *string `type:"string" enum:"WorkspaceDirectoryState"` - - // The identifiers of the subnets used with the directory. - SubnetIds []*string `type:"list"` - - // The default creation properties for all WorkSpaces in the directory. - WorkspaceCreationProperties *DefaultWorkspaceCreationProperties `type:"structure"` - - // The identifier of the security group that is assigned to new WorkSpaces. - WorkspaceSecurityGroupId *string `type:"string"` -} - -// String returns the string representation -func (s WorkspaceDirectory) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkspaceDirectory) GoString() string { - return s.String() -} - -// SetAlias sets the Alias field's value. -func (s *WorkspaceDirectory) SetAlias(v string) *WorkspaceDirectory { - s.Alias = &v - return s -} - -// SetCustomerUserName sets the CustomerUserName field's value. -func (s *WorkspaceDirectory) SetCustomerUserName(v string) *WorkspaceDirectory { - s.CustomerUserName = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *WorkspaceDirectory) SetDirectoryId(v string) *WorkspaceDirectory { - s.DirectoryId = &v - return s -} - -// SetDirectoryName sets the DirectoryName field's value. -func (s *WorkspaceDirectory) SetDirectoryName(v string) *WorkspaceDirectory { - s.DirectoryName = &v - return s -} - -// SetDirectoryType sets the DirectoryType field's value. -func (s *WorkspaceDirectory) SetDirectoryType(v string) *WorkspaceDirectory { - s.DirectoryType = &v - return s -} - -// SetDnsIpAddresses sets the DnsIpAddresses field's value. -func (s *WorkspaceDirectory) SetDnsIpAddresses(v []*string) *WorkspaceDirectory { - s.DnsIpAddresses = v - return s -} - -// SetIamRoleId sets the IamRoleId field's value. -func (s *WorkspaceDirectory) SetIamRoleId(v string) *WorkspaceDirectory { - s.IamRoleId = &v - return s -} - -// SetIpGroupIds sets the IpGroupIds field's value. -func (s *WorkspaceDirectory) SetIpGroupIds(v []*string) *WorkspaceDirectory { - s.IpGroupIds = v - return s -} - -// SetRegistrationCode sets the RegistrationCode field's value. -func (s *WorkspaceDirectory) SetRegistrationCode(v string) *WorkspaceDirectory { - s.RegistrationCode = &v - return s -} - -// SetState sets the State field's value. -func (s *WorkspaceDirectory) SetState(v string) *WorkspaceDirectory { - s.State = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *WorkspaceDirectory) SetSubnetIds(v []*string) *WorkspaceDirectory { - s.SubnetIds = v - return s -} - -// SetWorkspaceCreationProperties sets the WorkspaceCreationProperties field's value. -func (s *WorkspaceDirectory) SetWorkspaceCreationProperties(v *DefaultWorkspaceCreationProperties) *WorkspaceDirectory { - s.WorkspaceCreationProperties = v - return s -} - -// SetWorkspaceSecurityGroupId sets the WorkspaceSecurityGroupId field's value. -func (s *WorkspaceDirectory) SetWorkspaceSecurityGroupId(v string) *WorkspaceDirectory { - s.WorkspaceSecurityGroupId = &v - return s -} - -// Describes a WorkSpace image. -type WorkspaceImage struct { - _ struct{} `type:"structure"` - - // The description of the image. - Description *string `min:"1" type:"string"` - - // The error code that is returned for the image. - ErrorCode *string `type:"string"` - - // The text of the error message that is returned for the image. - ErrorMessage *string `type:"string"` - - // The identifier of the image. - ImageId *string `type:"string"` - - // The name of the image. - Name *string `min:"1" type:"string"` - - // The operating system that the image is running. - OperatingSystem *OperatingSystem `type:"structure"` - - // Specifies whether the image is running on dedicated hardware. When bring - // your own license (BYOL) is enabled, this value is set to DEDICATED. - RequiredTenancy *string `type:"string" enum:"WorkspaceImageRequiredTenancy"` - - // The status of the image. - State *string `type:"string" enum:"WorkspaceImageState"` -} - -// String returns the string representation -func (s WorkspaceImage) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkspaceImage) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *WorkspaceImage) SetDescription(v string) *WorkspaceImage { - s.Description = &v - return s -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *WorkspaceImage) SetErrorCode(v string) *WorkspaceImage { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *WorkspaceImage) SetErrorMessage(v string) *WorkspaceImage { - s.ErrorMessage = &v - return s -} - -// SetImageId sets the ImageId field's value. -func (s *WorkspaceImage) SetImageId(v string) *WorkspaceImage { - s.ImageId = &v - return s -} - -// SetName sets the Name field's value. -func (s *WorkspaceImage) SetName(v string) *WorkspaceImage { - s.Name = &v - return s -} - -// SetOperatingSystem sets the OperatingSystem field's value. -func (s *WorkspaceImage) SetOperatingSystem(v *OperatingSystem) *WorkspaceImage { - s.OperatingSystem = v - return s -} - -// SetRequiredTenancy sets the RequiredTenancy field's value. -func (s *WorkspaceImage) SetRequiredTenancy(v string) *WorkspaceImage { - s.RequiredTenancy = &v - return s -} - -// SetState sets the State field's value. -func (s *WorkspaceImage) SetState(v string) *WorkspaceImage { - s.State = &v - return s -} - -// Describes a WorkSpace. -type WorkspaceProperties struct { - _ struct{} `type:"structure"` - - // The compute type. For more information, see Amazon WorkSpaces Bundles (http://aws.amazon.com/workspaces/details/#Amazon_WorkSpaces_Bundles). - ComputeTypeName *string `type:"string" enum:"Compute"` - - // The size of the root volume. - RootVolumeSizeGib *int64 `type:"integer"` - - // The running mode. For more information, see Manage the WorkSpace Running - // Mode (http://docs.aws.amazon.com/workspaces/latest/adminguide/running-mode.html). - RunningMode *string `type:"string" enum:"RunningMode"` - - // The time after a user logs off when WorkSpaces are automatically stopped. - // Configured in 60 minute intervals. - RunningModeAutoStopTimeoutInMinutes *int64 `type:"integer"` - - // The size of the user storage. - UserVolumeSizeGib *int64 `type:"integer"` -} - -// String returns the string representation -func (s WorkspaceProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkspaceProperties) GoString() string { - return s.String() -} - -// SetComputeTypeName sets the ComputeTypeName field's value. -func (s *WorkspaceProperties) SetComputeTypeName(v string) *WorkspaceProperties { - s.ComputeTypeName = &v - return s -} - -// SetRootVolumeSizeGib sets the RootVolumeSizeGib field's value. -func (s *WorkspaceProperties) SetRootVolumeSizeGib(v int64) *WorkspaceProperties { - s.RootVolumeSizeGib = &v - return s -} - -// SetRunningMode sets the RunningMode field's value. -func (s *WorkspaceProperties) SetRunningMode(v string) *WorkspaceProperties { - s.RunningMode = &v - return s -} - -// SetRunningModeAutoStopTimeoutInMinutes sets the RunningModeAutoStopTimeoutInMinutes field's value. -func (s *WorkspaceProperties) SetRunningModeAutoStopTimeoutInMinutes(v int64) *WorkspaceProperties { - s.RunningModeAutoStopTimeoutInMinutes = &v - return s -} - -// SetUserVolumeSizeGib sets the UserVolumeSizeGib field's value. -func (s *WorkspaceProperties) SetUserVolumeSizeGib(v int64) *WorkspaceProperties { - s.UserVolumeSizeGib = &v - return s -} - -// Describes the information used to create a WorkSpace. -type WorkspaceRequest struct { - _ struct{} `type:"structure"` - - // The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles - // to list the available bundles. - // - // BundleId is a required field - BundleId *string `type:"string" required:"true"` - - // The identifier of the AWS Directory Service directory for the WorkSpace. - // You can use DescribeWorkspaceDirectories to list the available directories. - // - // DirectoryId is a required field - DirectoryId *string `type:"string" required:"true"` - - // Indicates whether the data stored on the root volume is encrypted. - RootVolumeEncryptionEnabled *bool `type:"boolean"` - - // The tags for the WorkSpace. - Tags []*Tag `type:"list"` - - // The username of the user for the WorkSpace. This username must exist in the - // AWS Directory Service directory for the WorkSpace. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` - - // Indicates whether the data stored on the user volume is encrypted. - UserVolumeEncryptionEnabled *bool `type:"boolean"` - - // The KMS key used to encrypt data stored on your WorkSpace. - VolumeEncryptionKey *string `type:"string"` - - // The WorkSpace properties. - WorkspaceProperties *WorkspaceProperties `type:"structure"` -} - -// String returns the string representation -func (s WorkspaceRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s WorkspaceRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WorkspaceRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WorkspaceRequest"} - if s.BundleId == nil { - invalidParams.Add(request.NewErrParamRequired("BundleId")) - } - if s.DirectoryId == nil { - invalidParams.Add(request.NewErrParamRequired("DirectoryId")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBundleId sets the BundleId field's value. -func (s *WorkspaceRequest) SetBundleId(v string) *WorkspaceRequest { - s.BundleId = &v - return s -} - -// SetDirectoryId sets the DirectoryId field's value. -func (s *WorkspaceRequest) SetDirectoryId(v string) *WorkspaceRequest { - s.DirectoryId = &v - return s -} - -// SetRootVolumeEncryptionEnabled sets the RootVolumeEncryptionEnabled field's value. -func (s *WorkspaceRequest) SetRootVolumeEncryptionEnabled(v bool) *WorkspaceRequest { - s.RootVolumeEncryptionEnabled = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *WorkspaceRequest) SetTags(v []*Tag) *WorkspaceRequest { - s.Tags = v - return s -} - -// SetUserName sets the UserName field's value. -func (s *WorkspaceRequest) SetUserName(v string) *WorkspaceRequest { - s.UserName = &v - return s -} - -// SetUserVolumeEncryptionEnabled sets the UserVolumeEncryptionEnabled field's value. -func (s *WorkspaceRequest) SetUserVolumeEncryptionEnabled(v bool) *WorkspaceRequest { - s.UserVolumeEncryptionEnabled = &v - return s -} - -// SetVolumeEncryptionKey sets the VolumeEncryptionKey field's value. -func (s *WorkspaceRequest) SetVolumeEncryptionKey(v string) *WorkspaceRequest { - s.VolumeEncryptionKey = &v - return s -} - -// SetWorkspaceProperties sets the WorkspaceProperties field's value. -func (s *WorkspaceRequest) SetWorkspaceProperties(v *WorkspaceProperties) *WorkspaceRequest { - s.WorkspaceProperties = v - return s -} - -const ( - // ComputeValue is a Compute enum value - ComputeValue = "VALUE" - - // ComputeStandard is a Compute enum value - ComputeStandard = "STANDARD" - - // ComputePerformance is a Compute enum value - ComputePerformance = "PERFORMANCE" - - // ComputePower is a Compute enum value - ComputePower = "POWER" - - // ComputeGraphics is a Compute enum value - ComputeGraphics = "GRAPHICS" - - // ComputePowerpro is a Compute enum value - ComputePowerpro = "POWERPRO" - - // ComputeGraphicspro is a Compute enum value - ComputeGraphicspro = "GRAPHICSPRO" -) - -const ( - // ConnectionStateConnected is a ConnectionState enum value - ConnectionStateConnected = "CONNECTED" - - // ConnectionStateDisconnected is a ConnectionState enum value - ConnectionStateDisconnected = "DISCONNECTED" - - // ConnectionStateUnknown is a ConnectionState enum value - ConnectionStateUnknown = "UNKNOWN" -) - -const ( - // DedicatedTenancyModificationStateEnumPending is a DedicatedTenancyModificationStateEnum enum value - DedicatedTenancyModificationStateEnumPending = "PENDING" - - // DedicatedTenancyModificationStateEnumCompleted is a DedicatedTenancyModificationStateEnum enum value - DedicatedTenancyModificationStateEnumCompleted = "COMPLETED" - - // DedicatedTenancyModificationStateEnumFailed is a DedicatedTenancyModificationStateEnum enum value - DedicatedTenancyModificationStateEnumFailed = "FAILED" -) - -const ( - // DedicatedTenancySupportEnumEnabled is a DedicatedTenancySupportEnum enum value - DedicatedTenancySupportEnumEnabled = "ENABLED" -) - -const ( - // DedicatedTenancySupportResultEnumEnabled is a DedicatedTenancySupportResultEnum enum value - DedicatedTenancySupportResultEnumEnabled = "ENABLED" - - // DedicatedTenancySupportResultEnumDisabled is a DedicatedTenancySupportResultEnum enum value - DedicatedTenancySupportResultEnumDisabled = "DISABLED" -) - -const ( - // ModificationResourceEnumRootVolume is a ModificationResourceEnum enum value - ModificationResourceEnumRootVolume = "ROOT_VOLUME" - - // ModificationResourceEnumUserVolume is a ModificationResourceEnum enum value - ModificationResourceEnumUserVolume = "USER_VOLUME" - - // ModificationResourceEnumComputeType is a ModificationResourceEnum enum value - ModificationResourceEnumComputeType = "COMPUTE_TYPE" -) - -const ( - // ModificationStateEnumUpdateInitiated is a ModificationStateEnum enum value - ModificationStateEnumUpdateInitiated = "UPDATE_INITIATED" - - // ModificationStateEnumUpdateInProgress is a ModificationStateEnum enum value - ModificationStateEnumUpdateInProgress = "UPDATE_IN_PROGRESS" -) - -const ( - // OperatingSystemTypeWindows is a OperatingSystemType enum value - OperatingSystemTypeWindows = "WINDOWS" - - // OperatingSystemTypeLinux is a OperatingSystemType enum value - OperatingSystemTypeLinux = "LINUX" -) - -const ( - // ReconnectEnumEnabled is a ReconnectEnum enum value - ReconnectEnumEnabled = "ENABLED" - - // ReconnectEnumDisabled is a ReconnectEnum enum value - ReconnectEnumDisabled = "DISABLED" -) - -const ( - // RunningModeAutoStop is a RunningMode enum value - RunningModeAutoStop = "AUTO_STOP" - - // RunningModeAlwaysOn is a RunningMode enum value - RunningModeAlwaysOn = "ALWAYS_ON" -) - -const ( - // TargetWorkspaceStateAvailable is a TargetWorkspaceState enum value - TargetWorkspaceStateAvailable = "AVAILABLE" - - // TargetWorkspaceStateAdminMaintenance is a TargetWorkspaceState enum value - TargetWorkspaceStateAdminMaintenance = "ADMIN_MAINTENANCE" -) - -const ( - // WorkspaceDirectoryStateRegistering is a WorkspaceDirectoryState enum value - WorkspaceDirectoryStateRegistering = "REGISTERING" - - // WorkspaceDirectoryStateRegistered is a WorkspaceDirectoryState enum value - WorkspaceDirectoryStateRegistered = "REGISTERED" - - // WorkspaceDirectoryStateDeregistering is a WorkspaceDirectoryState enum value - WorkspaceDirectoryStateDeregistering = "DEREGISTERING" - - // WorkspaceDirectoryStateDeregistered is a WorkspaceDirectoryState enum value - WorkspaceDirectoryStateDeregistered = "DEREGISTERED" - - // WorkspaceDirectoryStateError is a WorkspaceDirectoryState enum value - WorkspaceDirectoryStateError = "ERROR" -) - -const ( - // WorkspaceDirectoryTypeSimpleAd is a WorkspaceDirectoryType enum value - WorkspaceDirectoryTypeSimpleAd = "SIMPLE_AD" - - // WorkspaceDirectoryTypeAdConnector is a WorkspaceDirectoryType enum value - WorkspaceDirectoryTypeAdConnector = "AD_CONNECTOR" -) - -const ( - // WorkspaceImageIngestionProcessByolRegular is a WorkspaceImageIngestionProcess enum value - WorkspaceImageIngestionProcessByolRegular = "BYOL_REGULAR" - - // WorkspaceImageIngestionProcessByolGraphics is a WorkspaceImageIngestionProcess enum value - WorkspaceImageIngestionProcessByolGraphics = "BYOL_GRAPHICS" - - // WorkspaceImageIngestionProcessByolGraphicspro is a WorkspaceImageIngestionProcess enum value - WorkspaceImageIngestionProcessByolGraphicspro = "BYOL_GRAPHICSPRO" -) - -const ( - // WorkspaceImageRequiredTenancyDefault is a WorkspaceImageRequiredTenancy enum value - WorkspaceImageRequiredTenancyDefault = "DEFAULT" - - // WorkspaceImageRequiredTenancyDedicated is a WorkspaceImageRequiredTenancy enum value - WorkspaceImageRequiredTenancyDedicated = "DEDICATED" -) - -const ( - // WorkspaceImageStateAvailable is a WorkspaceImageState enum value - WorkspaceImageStateAvailable = "AVAILABLE" - - // WorkspaceImageStatePending is a WorkspaceImageState enum value - WorkspaceImageStatePending = "PENDING" - - // WorkspaceImageStateError is a WorkspaceImageState enum value - WorkspaceImageStateError = "ERROR" -) - -const ( - // WorkspaceStatePending is a WorkspaceState enum value - WorkspaceStatePending = "PENDING" - - // WorkspaceStateAvailable is a WorkspaceState enum value - WorkspaceStateAvailable = "AVAILABLE" - - // WorkspaceStateImpaired is a WorkspaceState enum value - WorkspaceStateImpaired = "IMPAIRED" - - // WorkspaceStateUnhealthy is a WorkspaceState enum value - WorkspaceStateUnhealthy = "UNHEALTHY" - - // WorkspaceStateRebooting is a WorkspaceState enum value - WorkspaceStateRebooting = "REBOOTING" - - // WorkspaceStateStarting is a WorkspaceState enum value - WorkspaceStateStarting = "STARTING" - - // WorkspaceStateRebuilding is a WorkspaceState enum value - WorkspaceStateRebuilding = "REBUILDING" - - // WorkspaceStateMaintenance is a WorkspaceState enum value - WorkspaceStateMaintenance = "MAINTENANCE" - - // WorkspaceStateAdminMaintenance is a WorkspaceState enum value - WorkspaceStateAdminMaintenance = "ADMIN_MAINTENANCE" - - // WorkspaceStateTerminating is a WorkspaceState enum value - WorkspaceStateTerminating = "TERMINATING" - - // WorkspaceStateTerminated is a WorkspaceState enum value - WorkspaceStateTerminated = "TERMINATED" - - // WorkspaceStateSuspended is a WorkspaceState enum value - WorkspaceStateSuspended = "SUSPENDED" - - // WorkspaceStateUpdating is a WorkspaceState enum value - WorkspaceStateUpdating = "UPDATING" - - // WorkspaceStateStopping is a WorkspaceState enum value - WorkspaceStateStopping = "STOPPING" - - // WorkspaceStateStopped is a WorkspaceState enum value - WorkspaceStateStopped = "STOPPED" - - // WorkspaceStateError is a WorkspaceState enum value - WorkspaceStateError = "ERROR" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/workspaces/doc.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/doc.go deleted file mode 100644 index 882a1973f..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/workspaces/doc.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package workspaces provides the client and types for making API -// requests to Amazon WorkSpaces. -// -// Amazon WorkSpaces enables you to provision virtual, cloud-based Microsoft -// Windows and Amazon Linux desktops for your users. -// -// See https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08 for more information on this service. -// -// See workspaces package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/workspaces/ -// -// Using the Client -// -// To contact Amazon WorkSpaces with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon WorkSpaces client WorkSpaces for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/workspaces/#New -package workspaces diff --git a/vendor/github.com/aws/aws-sdk-go/service/workspaces/errors.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/errors.go deleted file mode 100644 index 2083335b7..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/workspaces/errors.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package workspaces - -const ( - - // ErrCodeAccessDeniedException for service response error code - // "AccessDeniedException". - // - // The user is not authorized to access a resource. - ErrCodeAccessDeniedException = "AccessDeniedException" - - // ErrCodeInvalidParameterValuesException for service response error code - // "InvalidParameterValuesException". - // - // One or more parameter values are not valid. - ErrCodeInvalidParameterValuesException = "InvalidParameterValuesException" - - // ErrCodeInvalidResourceStateException for service response error code - // "InvalidResourceStateException". - // - // The state of the resource is not valid for this operation. - ErrCodeInvalidResourceStateException = "InvalidResourceStateException" - - // ErrCodeOperationInProgressException for service response error code - // "OperationInProgressException". - // - // The properties of this WorkSpace are currently being modified. Try again - // in a moment. - ErrCodeOperationInProgressException = "OperationInProgressException" - - // ErrCodeOperationNotSupportedException for service response error code - // "OperationNotSupportedException". - // - // This operation is not supported. - ErrCodeOperationNotSupportedException = "OperationNotSupportedException" - - // ErrCodeResourceAlreadyExistsException for service response error code - // "ResourceAlreadyExistsException". - // - // The specified resource already exists. - ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException" - - // ErrCodeResourceAssociatedException for service response error code - // "ResourceAssociatedException". - // - // The resource is associated with a directory. - ErrCodeResourceAssociatedException = "ResourceAssociatedException" - - // ErrCodeResourceCreationFailedException for service response error code - // "ResourceCreationFailedException". - // - // The resource could not be created. - ErrCodeResourceCreationFailedException = "ResourceCreationFailedException" - - // ErrCodeResourceLimitExceededException for service response error code - // "ResourceLimitExceededException". - // - // Your resource limits have been exceeded. - ErrCodeResourceLimitExceededException = "ResourceLimitExceededException" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFoundException". - // - // The resource could not be found. - ErrCodeResourceNotFoundException = "ResourceNotFoundException" - - // ErrCodeResourceUnavailableException for service response error code - // "ResourceUnavailableException". - // - // The specified resource is not available. - ErrCodeResourceUnavailableException = "ResourceUnavailableException" - - // ErrCodeUnsupportedWorkspaceConfigurationException for service response error code - // "UnsupportedWorkspaceConfigurationException". - // - // The configuration of this WorkSpace is not supported for this operation. - // For more information, see the Amazon WorkSpaces Administration Guide (http://docs.aws.amazon.com/workspaces/latest/adminguide/). - ErrCodeUnsupportedWorkspaceConfigurationException = "UnsupportedWorkspaceConfigurationException" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/workspaces/service.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/service.go deleted file mode 100644 index 38e1cc2ee..000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/workspaces/service.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package workspaces - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// WorkSpaces provides the API operation methods for making requests to -// Amazon WorkSpaces. See this package's package overview docs -// for details on the service. -// -// WorkSpaces methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type WorkSpaces 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 = "workspaces" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "WorkSpaces" // ServiceID is a unique identifer of a specific service. -) - -// New creates a new instance of the WorkSpaces client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// // Create a WorkSpaces client from just a session. -// svc := workspaces.New(mySession) -// -// // Create a WorkSpaces client with additional configuration -// svc := workspaces.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *WorkSpaces { - c := p.ClientConfig(EndpointsID, cfgs...) - return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *WorkSpaces { - svc := &WorkSpaces{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - Endpoint: endpoint, - APIVersion: "2015-04-08", - JSONVersion: "1.1", - TargetPrefix: "WorkspacesService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a WorkSpaces operation and runs any -// custom request initialization. -func (c *WorkSpaces) 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/beevik/etree/.travis.yml b/vendor/github.com/beevik/etree/.travis.yml deleted file mode 100644 index c47175eb4..000000000 --- a/vendor/github.com/beevik/etree/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: go -sudo: false - -go: - - 1.5.x - - 1.6.x - - 1.7.x - - 1.8.x - - 1.9.x - - 1.10.x - - tip - -matrix: - allow_failures: - - go: tip - -script: - - go vet ./... - - go test -v ./... diff --git a/vendor/github.com/beevik/etree/CONTRIBUTORS b/vendor/github.com/beevik/etree/CONTRIBUTORS deleted file mode 100644 index 45a539541..000000000 --- a/vendor/github.com/beevik/etree/CONTRIBUTORS +++ /dev/null @@ -1,9 +0,0 @@ -Brett Vickers (beevik) -Felix Geisendörfer (felixge) -Kamil Kisiel (kisielk) -Graham King (grahamking) -Matt Smith (ma314smith) -Michal Jemala (michaljemala) -Nicolas Piganeau (npiganeau) -Chris Brown (ccbrown) -Earncef Sequeira (earncef) \ No newline at end of file diff --git a/vendor/github.com/beevik/etree/LICENSE b/vendor/github.com/beevik/etree/LICENSE deleted file mode 100644 index e14ad682a..000000000 --- a/vendor/github.com/beevik/etree/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright 2015 Brett Vickers. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER ``AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/beevik/etree/README.md b/vendor/github.com/beevik/etree/README.md deleted file mode 100644 index 28558433c..000000000 --- a/vendor/github.com/beevik/etree/README.md +++ /dev/null @@ -1,203 +0,0 @@ -[![Build Status](https://travis-ci.org/beevik/etree.svg?branch=master)](https://travis-ci.org/beevik/etree) -[![GoDoc](https://godoc.org/github.com/beevik/etree?status.svg)](https://godoc.org/github.com/beevik/etree) - -etree -===== - -The etree package is a lightweight, pure go package that expresses XML in -the form of an element tree. Its design was inspired by the Python -[ElementTree](http://docs.python.org/2/library/xml.etree.elementtree.html) -module. Some of the package's features include: - -* Represents XML documents as trees of elements for easy traversal. -* Imports, serializes, modifies or creates XML documents from scratch. -* Writes and reads XML to/from files, byte slices, strings and io interfaces. -* Performs simple or complex searches with lightweight XPath-like query APIs. -* Auto-indents XML using spaces or tabs for better readability. -* Implemented in pure go; depends only on standard go libraries. -* Built on top of the go [encoding/xml](http://golang.org/pkg/encoding/xml) - package. - -### Creating an XML document - -The following example creates an XML document from scratch using the etree -package and outputs its indented contents to stdout. -```go -doc := etree.NewDocument() -doc.CreateProcInst("xml", `version="1.0" encoding="UTF-8"`) -doc.CreateProcInst("xml-stylesheet", `type="text/xsl" href="style.xsl"`) - -people := doc.CreateElement("People") -people.CreateComment("These are all known people") - -jon := people.CreateElement("Person") -jon.CreateAttr("name", "Jon") - -sally := people.CreateElement("Person") -sally.CreateAttr("name", "Sally") - -doc.Indent(2) -doc.WriteTo(os.Stdout) -``` - -Output: -```xml - - - - - - - -``` - -### Reading an XML file - -Suppose you have a file on disk called `bookstore.xml` containing the -following data: - -```xml - - - - Everyday Italian - Giada De Laurentiis - 2005 - 30.00 - - - - Harry Potter - J K. Rowling - 2005 - 29.99 - - - - XQuery Kick Start - James McGovern - Per Bothner - Kurt Cagle - James Linn - Vaidyanathan Nagarajan - 2003 - 49.99 - - - - Learning XML - Erik T. Ray - 2003 - 39.95 - - - -``` - -This code reads the file's contents into an etree document. -```go -doc := etree.NewDocument() -if err := doc.ReadFromFile("bookstore.xml"); err != nil { - panic(err) -} -``` - -You can also read XML from a string, a byte slice, or an `io.Reader`. - -### Processing elements and attributes - -This example illustrates several ways to access elements and attributes using -etree selection queries. -```go -root := doc.SelectElement("bookstore") -fmt.Println("ROOT element:", root.Tag) - -for _, book := range root.SelectElements("book") { - fmt.Println("CHILD element:", book.Tag) - if title := book.SelectElement("title"); title != nil { - lang := title.SelectAttrValue("lang", "unknown") - fmt.Printf(" TITLE: %s (%s)\n", title.Text(), lang) - } - for _, attr := range book.Attr { - fmt.Printf(" ATTR: %s=%s\n", attr.Key, attr.Value) - } -} -``` -Output: -``` -ROOT element: bookstore -CHILD element: book - TITLE: Everyday Italian (en) - ATTR: category=COOKING -CHILD element: book - TITLE: Harry Potter (en) - ATTR: category=CHILDREN -CHILD element: book - TITLE: XQuery Kick Start (en) - ATTR: category=WEB -CHILD element: book - TITLE: Learning XML (en) - ATTR: category=WEB -``` - -### Path queries - -This example uses etree's path functions to select all book titles that fall -into the category of 'WEB'. The double-slash prefix in the path causes the -search for book elements to occur recursively; book elements may appear at any -level of the XML hierarchy. -```go -for _, t := range doc.FindElements("//book[@category='WEB']/title") { - fmt.Println("Title:", t.Text()) -} -``` - -Output: -``` -Title: XQuery Kick Start -Title: Learning XML -``` - -This example finds the first book element under the root bookstore element and -outputs the tag and text of each of its child elements. -```go -for _, e := range doc.FindElements("./bookstore/book[1]/*") { - fmt.Printf("%s: %s\n", e.Tag, e.Text()) -} -``` - -Output: -``` -title: Everyday Italian -author: Giada De Laurentiis -year: 2005 -price: 30.00 -``` - -This example finds all books with a price of 49.99 and outputs their titles. -```go -path := etree.MustCompilePath("./bookstore/book[p:price='49.99']/title") -for _, e := range doc.FindElementsPath(path) { - fmt.Println(e.Text()) -} -``` - -Output: -``` -XQuery Kick Start -``` - -Note that this example uses the FindElementsPath function, which takes as an -argument a pre-compiled path object. Use precompiled paths when you plan to -search with the same path more than once. - -### Other features - -These are just a few examples of the things the etree package can do. See the -[documentation](http://godoc.org/github.com/beevik/etree) for a complete -description of its capabilities. - -### Contributing - -This project accepts contributions. Just fork the repo and submit a pull -request! diff --git a/vendor/github.com/beevik/etree/RELEASE_NOTES.md b/vendor/github.com/beevik/etree/RELEASE_NOTES.md deleted file mode 100644 index b3a39bd92..000000000 --- a/vendor/github.com/beevik/etree/RELEASE_NOTES.md +++ /dev/null @@ -1,27 +0,0 @@ -Release v1.0.1 -============== - -**Changes** - -* Added support for absolute etree Path queries. An absolute path begins with - `/` or `//` and begins its search from the element's document root. -* Added [`GetPath`](https://godoc.org/github.com/beevik/etree#Element.GetPath) - and [`GetRelativePath`](https://godoc.org/github.com/beevik/etree#Element.GetRelativePath) - functions to the [`Element`](https://godoc.org/github.com/beevik/etree#Element) - type. - -**Breaking changes** - -* A path starting with `//` is now interpreted as an absolute path. - Previously, it was interpreted as a relative path starting from the element - whose - [`FindElement`](https://godoc.org/github.com/beevik/etree#Element.FindElement) - method was called. To remain compatible with this release, all paths - prefixed with `//` should be prefixed with `.//` when called from any - element other than the document's root. - - -Release v1.0.0 -============== - -Initial release. diff --git a/vendor/github.com/beevik/etree/etree.go b/vendor/github.com/beevik/etree/etree.go deleted file mode 100644 index 461a7aa8a..000000000 --- a/vendor/github.com/beevik/etree/etree.go +++ /dev/null @@ -1,1034 +0,0 @@ -// Copyright 2015 Brett Vickers. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package etree provides XML services through an Element Tree -// abstraction. -package etree - -import ( - "bufio" - "bytes" - "encoding/xml" - "errors" - "io" - "os" - "strings" -) - -const ( - // NoIndent is used with Indent to disable all indenting. - NoIndent = -1 -) - -// ErrXML is returned when XML parsing fails due to incorrect formatting. -var ErrXML = errors.New("etree: invalid XML format") - -// ReadSettings allow for changing the default behavior of the ReadFrom* -// methods. -type ReadSettings struct { - // CharsetReader to be passed to standard xml.Decoder. Default: nil. - CharsetReader func(charset string, input io.Reader) (io.Reader, error) - - // Permissive allows input containing common mistakes such as missing tags - // or attribute values. Default: false. - Permissive bool -} - -// newReadSettings creates a default ReadSettings record. -func newReadSettings() ReadSettings { - return ReadSettings{} -} - -// WriteSettings allow for changing the serialization behavior of the WriteTo* -// methods. -type WriteSettings struct { - // CanonicalEndTags forces the production of XML end tags, even for - // elements that have no child elements. Default: false. - CanonicalEndTags bool - - // CanonicalText forces the production of XML character references for - // text data characters &, <, and >. If false, XML character references - // are also produced for " and '. Default: false. - CanonicalText bool - - // CanonicalAttrVal forces the production of XML character references for - // attribute value characters &, < and ". If false, XML character - // references are also produced for > and '. Default: false. - CanonicalAttrVal bool -} - -// newWriteSettings creates a default WriteSettings record. -func newWriteSettings() WriteSettings { - return WriteSettings{ - CanonicalEndTags: false, - CanonicalText: false, - CanonicalAttrVal: false, - } -} - -// A Token is an empty interface that represents an Element, CharData, -// Comment, Directive, or ProcInst. -type Token interface { - Parent() *Element - dup(parent *Element) Token - setParent(parent *Element) - writeTo(w *bufio.Writer, s *WriteSettings) -} - -// A Document is a container holding a complete XML hierarchy. Its embedded -// element contains zero or more children, one of which is usually the root -// element. The embedded element may include other children such as -// processing instructions or BOM CharData tokens. -type Document struct { - Element - ReadSettings ReadSettings - WriteSettings WriteSettings -} - -// An Element represents an XML element, its attributes, and its child tokens. -type Element struct { - Space, Tag string // namespace and tag - Attr []Attr // key-value attribute pairs - Child []Token // child tokens (elements, comments, etc.) - parent *Element // parent element -} - -// An Attr represents a key-value attribute of an XML element. -type Attr struct { - Space, Key string // The attribute's namespace and key - Value string // The attribute value string -} - -// CharData represents character data within XML. -type CharData struct { - Data string - parent *Element - whitespace bool -} - -// A Comment represents an XML comment. -type Comment struct { - Data string - parent *Element -} - -// A Directive represents an XML directive. -type Directive struct { - Data string - parent *Element -} - -// A ProcInst represents an XML processing instruction. -type ProcInst struct { - Target string - Inst string - parent *Element -} - -// NewDocument creates an XML document without a root element. -func NewDocument() *Document { - return &Document{ - Element{Child: make([]Token, 0)}, - newReadSettings(), - newWriteSettings(), - } -} - -// Copy returns a recursive, deep copy of the document. -func (d *Document) Copy() *Document { - return &Document{*(d.dup(nil).(*Element)), d.ReadSettings, d.WriteSettings} -} - -// Root returns the root element of the document, or nil if there is no root -// element. -func (d *Document) Root() *Element { - for _, t := range d.Child { - if c, ok := t.(*Element); ok { - return c - } - } - return nil -} - -// SetRoot replaces the document's root element with e. If the document -// already has a root when this function is called, then the document's -// original root is unbound first. If the element e is bound to another -// document (or to another element within a document), then it is unbound -// first. -func (d *Document) SetRoot(e *Element) { - if e.parent != nil { - e.parent.RemoveChild(e) - } - e.setParent(&d.Element) - - for i, t := range d.Child { - if _, ok := t.(*Element); ok { - t.setParent(nil) - d.Child[i] = e - return - } - } - d.Child = append(d.Child, e) -} - -// ReadFrom reads XML from the reader r into the document d. It returns the -// number of bytes read and any error encountered. -func (d *Document) ReadFrom(r io.Reader) (n int64, err error) { - return d.Element.readFrom(r, d.ReadSettings) -} - -// ReadFromFile reads XML from the string s into the document d. -func (d *Document) ReadFromFile(filename string) error { - f, err := os.Open(filename) - if err != nil { - return err - } - defer f.Close() - _, err = d.ReadFrom(f) - return err -} - -// ReadFromBytes reads XML from the byte slice b into the document d. -func (d *Document) ReadFromBytes(b []byte) error { - _, err := d.ReadFrom(bytes.NewReader(b)) - return err -} - -// ReadFromString reads XML from the string s into the document d. -func (d *Document) ReadFromString(s string) error { - _, err := d.ReadFrom(strings.NewReader(s)) - return err -} - -// WriteTo serializes an XML document into the writer w. It -// returns the number of bytes written and any error encountered. -func (d *Document) WriteTo(w io.Writer) (n int64, err error) { - cw := newCountWriter(w) - b := bufio.NewWriter(cw) - for _, c := range d.Child { - c.writeTo(b, &d.WriteSettings) - } - err, n = b.Flush(), cw.bytes - return -} - -// WriteToFile serializes an XML document into the file named -// filename. -func (d *Document) WriteToFile(filename string) error { - f, err := os.Create(filename) - if err != nil { - return err - } - defer f.Close() - _, err = d.WriteTo(f) - return err -} - -// WriteToBytes serializes the XML document into a slice of -// bytes. -func (d *Document) WriteToBytes() (b []byte, err error) { - var buf bytes.Buffer - if _, err = d.WriteTo(&buf); err != nil { - return - } - return buf.Bytes(), nil -} - -// WriteToString serializes the XML document into a string. -func (d *Document) WriteToString() (s string, err error) { - var b []byte - if b, err = d.WriteToBytes(); err != nil { - return - } - return string(b), nil -} - -type indentFunc func(depth int) string - -// Indent modifies the document's element tree by inserting CharData entities -// containing carriage returns and indentation. The amount of indentation per -// depth level is given as spaces. Pass etree.NoIndent for spaces if you want -// no indentation at all. -func (d *Document) Indent(spaces int) { - var indent indentFunc - switch { - case spaces < 0: - indent = func(depth int) string { return "" } - default: - indent = func(depth int) string { return crIndent(depth*spaces, crsp) } - } - d.Element.indent(0, indent) -} - -// IndentTabs modifies the document's element tree by inserting CharData -// entities containing carriage returns and tabs for indentation. One tab is -// used per indentation level. -func (d *Document) IndentTabs() { - indent := func(depth int) string { return crIndent(depth, crtab) } - d.Element.indent(0, indent) -} - -// NewElement creates an unparented element with the specified tag. The tag -// may be prefixed by a namespace and a colon. -func NewElement(tag string) *Element { - space, stag := spaceDecompose(tag) - return newElement(space, stag, nil) -} - -// newElement is a helper function that creates an element and binds it to -// a parent element if possible. -func newElement(space, tag string, parent *Element) *Element { - e := &Element{ - Space: space, - Tag: tag, - Attr: make([]Attr, 0), - Child: make([]Token, 0), - parent: parent, - } - if parent != nil { - parent.addChild(e) - } - return e -} - -// Copy creates a recursive, deep copy of the element and all its attributes -// and children. The returned element has no parent but can be parented to a -// another element using AddElement, or to a document using SetRoot. -func (e *Element) Copy() *Element { - var parent *Element - return e.dup(parent).(*Element) -} - -// Text returns the characters immediately following the element's -// opening tag. -func (e *Element) Text() string { - if len(e.Child) == 0 { - return "" - } - if cd, ok := e.Child[0].(*CharData); ok { - return cd.Data - } - return "" -} - -// SetText replaces an element's subsidiary CharData text with a new string. -func (e *Element) SetText(text string) { - if len(e.Child) > 0 { - if cd, ok := e.Child[0].(*CharData); ok { - cd.Data = text - return - } - } - cd := newCharData(text, false, e) - copy(e.Child[1:], e.Child[0:]) - e.Child[0] = cd -} - -// CreateElement creates an element with the specified tag and adds it as the -// last child element of the element e. The tag may be prefixed by a namespace -// and a colon. -func (e *Element) CreateElement(tag string) *Element { - space, stag := spaceDecompose(tag) - return newElement(space, stag, e) -} - -// AddChild adds the token t as the last child of element e. If token t was -// already the child of another element, it is first removed from its current -// parent element. -func (e *Element) AddChild(t Token) { - if t.Parent() != nil { - t.Parent().RemoveChild(t) - } - t.setParent(e) - e.addChild(t) -} - -// InsertChild inserts the token t before e's existing child token ex. If ex -// is nil (or if ex is not a child of e), then t is added to the end of e's -// child token list. If token t was already the child of another element, it -// is first removed from its current parent element. -func (e *Element) InsertChild(ex Token, t Token) { - if t.Parent() != nil { - t.Parent().RemoveChild(t) - } - t.setParent(e) - - for i, c := range e.Child { - if c == ex { - e.Child = append(e.Child, nil) - copy(e.Child[i+1:], e.Child[i:]) - e.Child[i] = t - return - } - } - e.addChild(t) -} - -// RemoveChild attempts to remove the token t from element e's list of -// children. If the token t is a child of e, then it is returned. Otherwise, -// nil is returned. -func (e *Element) RemoveChild(t Token) Token { - for i, c := range e.Child { - if c == t { - e.Child = append(e.Child[:i], e.Child[i+1:]...) - c.setParent(nil) - return t - } - } - return nil -} - -// ReadFrom reads XML from the reader r and stores the result as a new child -// of element e. -func (e *Element) readFrom(ri io.Reader, settings ReadSettings) (n int64, err error) { - r := newCountReader(ri) - dec := xml.NewDecoder(r) - dec.CharsetReader = settings.CharsetReader - dec.Strict = !settings.Permissive - var stack stack - stack.push(e) - for { - t, err := dec.RawToken() - switch { - case err == io.EOF: - return r.bytes, nil - case err != nil: - return r.bytes, err - case stack.empty(): - return r.bytes, ErrXML - } - - top := stack.peek().(*Element) - - switch t := t.(type) { - case xml.StartElement: - e := newElement(t.Name.Space, t.Name.Local, top) - for _, a := range t.Attr { - e.createAttr(a.Name.Space, a.Name.Local, a.Value) - } - stack.push(e) - case xml.EndElement: - stack.pop() - case xml.CharData: - data := string(t) - newCharData(data, isWhitespace(data), top) - case xml.Comment: - newComment(string(t), top) - case xml.Directive: - newDirective(string(t), top) - case xml.ProcInst: - newProcInst(t.Target, string(t.Inst), top) - } - } -} - -// SelectAttr finds an element attribute matching the requested key and -// returns it if found. Returns nil if no matching attribute is found. The key -// may be prefixed by a namespace and a colon. -func (e *Element) SelectAttr(key string) *Attr { - space, skey := spaceDecompose(key) - for i, a := range e.Attr { - if spaceMatch(space, a.Space) && skey == a.Key { - return &e.Attr[i] - } - } - return nil -} - -// SelectAttrValue finds an element attribute matching the requested key and -// returns its value if found. The key may be prefixed by a namespace and a -// colon. If the key is not found, the dflt value is returned instead. -func (e *Element) SelectAttrValue(key, dflt string) string { - space, skey := spaceDecompose(key) - for _, a := range e.Attr { - if spaceMatch(space, a.Space) && skey == a.Key { - return a.Value - } - } - return dflt -} - -// ChildElements returns all elements that are children of element e. -func (e *Element) ChildElements() []*Element { - var elements []*Element - for _, t := range e.Child { - if c, ok := t.(*Element); ok { - elements = append(elements, c) - } - } - return elements -} - -// SelectElement returns the first child element with the given tag. The tag -// may be prefixed by a namespace and a colon. Returns nil if no element with -// a matching tag was found. -func (e *Element) SelectElement(tag string) *Element { - space, stag := spaceDecompose(tag) - for _, t := range e.Child { - if c, ok := t.(*Element); ok && spaceMatch(space, c.Space) && stag == c.Tag { - return c - } - } - return nil -} - -// SelectElements returns a slice of all child elements with the given tag. -// The tag may be prefixed by a namespace and a colon. -func (e *Element) SelectElements(tag string) []*Element { - space, stag := spaceDecompose(tag) - var elements []*Element - for _, t := range e.Child { - if c, ok := t.(*Element); ok && spaceMatch(space, c.Space) && stag == c.Tag { - elements = append(elements, c) - } - } - return elements -} - -// FindElement returns the first element matched by the XPath-like path -// string. Returns nil if no element is found using the path. Panics if an -// invalid path string is supplied. -func (e *Element) FindElement(path string) *Element { - return e.FindElementPath(MustCompilePath(path)) -} - -// FindElementPath returns the first element matched by the XPath-like path -// string. Returns nil if no element is found using the path. -func (e *Element) FindElementPath(path Path) *Element { - p := newPather() - elements := p.traverse(e, path) - switch { - case len(elements) > 0: - return elements[0] - default: - return nil - } -} - -// FindElements returns a slice of elements matched by the XPath-like path -// string. Panics if an invalid path string is supplied. -func (e *Element) FindElements(path string) []*Element { - return e.FindElementsPath(MustCompilePath(path)) -} - -// FindElementsPath returns a slice of elements matched by the Path object. -func (e *Element) FindElementsPath(path Path) []*Element { - p := newPather() - return p.traverse(e, path) -} - -// GetPath returns the absolute path of the element. -func (e *Element) GetPath() string { - path := []string{} - for seg := e; seg != nil; seg = seg.Parent() { - if seg.Tag != "" { - path = append(path, seg.Tag) - } - } - - // Reverse the path. - for i, j := 0, len(path)-1; i < j; i, j = i+1, j-1 { - path[i], path[j] = path[j], path[i] - } - - return "/" + strings.Join(path, "/") -} - -// GetRelativePath returns the path of the element relative to the source -// element. If the two elements are not part of the same element tree, then -// GetRelativePath returns the empty string. -func (e *Element) GetRelativePath(source *Element) string { - var path []*Element - - if source == nil { - return "" - } - - // Build a reverse path from the element toward the root. Stop if the - // source element is encountered. - var seg *Element - for seg = e; seg != nil && seg != source; seg = seg.Parent() { - path = append(path, seg) - } - - // If we found the source element, reverse the path and compose the - // string. - if seg == source { - if len(path) == 0 { - return "." - } - parts := []string{} - for i := len(path) - 1; i >= 0; i-- { - parts = append(parts, path[i].Tag) - } - return "./" + strings.Join(parts, "/") - } - - // The source wasn't encountered, so climb from the source element toward - // the root of the tree until an element in the reversed path is - // encountered. - - findPathIndex := func(e *Element, path []*Element) int { - for i, ee := range path { - if e == ee { - return i - } - } - return -1 - } - - climb := 0 - for seg = source; seg != nil; seg = seg.Parent() { - i := findPathIndex(seg, path) - if i >= 0 { - path = path[:i] // truncate at found segment - break - } - climb++ - } - - // No element in the reversed path was encountered, so the two elements - // must not be part of the same tree. - if seg == nil { - return "" - } - - // Reverse the (possibly truncated) path and prepend ".." segments to - // climb. - parts := []string{} - for i := 0; i < climb; i++ { - parts = append(parts, "..") - } - for i := len(path) - 1; i >= 0; i-- { - parts = append(parts, path[i].Tag) - } - return strings.Join(parts, "/") -} - -// indent recursively inserts proper indentation between an -// XML element's child tokens. -func (e *Element) indent(depth int, indent indentFunc) { - e.stripIndent() - n := len(e.Child) - if n == 0 { - return - } - - oldChild := e.Child - e.Child = make([]Token, 0, n*2+1) - isCharData, firstNonCharData := false, true - for _, c := range oldChild { - - // Insert CR+indent before child if it's not character data. - // Exceptions: when it's the first non-character-data child, or when - // the child is at root depth. - _, isCharData = c.(*CharData) - if !isCharData { - if !firstNonCharData || depth > 0 { - newCharData(indent(depth), true, e) - } - firstNonCharData = false - } - - e.addChild(c) - - // Recursively process child elements. - if ce, ok := c.(*Element); ok { - ce.indent(depth+1, indent) - } - } - - // Insert CR+indent before the last child. - if !isCharData { - if !firstNonCharData || depth > 0 { - newCharData(indent(depth-1), true, e) - } - } -} - -// stripIndent removes any previously inserted indentation. -func (e *Element) stripIndent() { - // Count the number of non-indent child tokens - n := len(e.Child) - for _, c := range e.Child { - if cd, ok := c.(*CharData); ok && cd.whitespace { - n-- - } - } - if n == len(e.Child) { - return - } - - // Strip out indent CharData - newChild := make([]Token, n) - j := 0 - for _, c := range e.Child { - if cd, ok := c.(*CharData); ok && cd.whitespace { - continue - } - newChild[j] = c - j++ - } - e.Child = newChild -} - -// dup duplicates the element. -func (e *Element) dup(parent *Element) Token { - ne := &Element{ - Space: e.Space, - Tag: e.Tag, - Attr: make([]Attr, len(e.Attr)), - Child: make([]Token, len(e.Child)), - parent: parent, - } - for i, t := range e.Child { - ne.Child[i] = t.dup(ne) - } - for i, a := range e.Attr { - ne.Attr[i] = a - } - return ne -} - -// Parent returns the element token's parent element, or nil if it has no -// parent. -func (e *Element) Parent() *Element { - return e.parent -} - -// setParent replaces the element token's parent. -func (e *Element) setParent(parent *Element) { - e.parent = parent -} - -// writeTo serializes the element to the writer w. -func (e *Element) writeTo(w *bufio.Writer, s *WriteSettings) { - w.WriteByte('<') - if e.Space != "" { - w.WriteString(e.Space) - w.WriteByte(':') - } - w.WriteString(e.Tag) - for _, a := range e.Attr { - w.WriteByte(' ') - a.writeTo(w, s) - } - if len(e.Child) > 0 { - w.WriteString(">") - for _, c := range e.Child { - c.writeTo(w, s) - } - w.Write([]byte{'<', '/'}) - if e.Space != "" { - w.WriteString(e.Space) - w.WriteByte(':') - } - w.WriteString(e.Tag) - w.WriteByte('>') - } else { - if s.CanonicalEndTags { - w.Write([]byte{'>', '<', '/'}) - if e.Space != "" { - w.WriteString(e.Space) - w.WriteByte(':') - } - w.WriteString(e.Tag) - w.WriteByte('>') - } else { - w.Write([]byte{'/', '>'}) - } - } -} - -// addChild adds a child token to the element e. -func (e *Element) addChild(t Token) { - e.Child = append(e.Child, t) -} - -// CreateAttr creates an attribute and adds it to element e. The key may be -// prefixed by a namespace and a colon. If an attribute with the key already -// exists, its value is replaced. -func (e *Element) CreateAttr(key, value string) *Attr { - space, skey := spaceDecompose(key) - return e.createAttr(space, skey, value) -} - -// createAttr is a helper function that creates attributes. -func (e *Element) createAttr(space, key, value string) *Attr { - for i, a := range e.Attr { - if space == a.Space && key == a.Key { - e.Attr[i].Value = value - return &e.Attr[i] - } - } - a := Attr{space, key, value} - e.Attr = append(e.Attr, a) - return &e.Attr[len(e.Attr)-1] -} - -// RemoveAttr removes and returns the first attribute of the element whose key -// matches the given key. The key may be prefixed by a namespace and a colon. -// If an equal attribute does not exist, nil is returned. -func (e *Element) RemoveAttr(key string) *Attr { - space, skey := spaceDecompose(key) - for i, a := range e.Attr { - if space == a.Space && skey == a.Key { - e.Attr = append(e.Attr[0:i], e.Attr[i+1:]...) - return &a - } - } - return nil -} - -var xmlReplacerNormal = strings.NewReplacer( - "&", "&", - "<", "<", - ">", ">", - "'", "'", - `"`, """, -) - -var xmlReplacerCanonicalText = strings.NewReplacer( - "&", "&", - "<", "<", - ">", ">", - "\r", " ", -) - -var xmlReplacerCanonicalAttrVal = strings.NewReplacer( - "&", "&", - "<", "<", - `"`, """, - "\t", " ", - "\n", " ", - "\r", " ", -) - -// writeTo serializes the attribute to the writer. -func (a *Attr) writeTo(w *bufio.Writer, s *WriteSettings) { - if a.Space != "" { - w.WriteString(a.Space) - w.WriteByte(':') - } - w.WriteString(a.Key) - w.WriteString(`="`) - var r *strings.Replacer - if s.CanonicalAttrVal { - r = xmlReplacerCanonicalAttrVal - } else { - r = xmlReplacerNormal - } - w.WriteString(r.Replace(a.Value)) - w.WriteByte('"') -} - -// NewCharData creates a parentless XML character data entity. -func NewCharData(data string) *CharData { - return newCharData(data, false, nil) -} - -// newCharData creates an XML character data entity and binds it to a parent -// element. If parent is nil, the CharData token remains unbound. -func newCharData(data string, whitespace bool, parent *Element) *CharData { - c := &CharData{ - Data: data, - whitespace: whitespace, - parent: parent, - } - if parent != nil { - parent.addChild(c) - } - return c -} - -// CreateCharData creates an XML character data entity and adds it as a child -// of element e. -func (e *Element) CreateCharData(data string) *CharData { - return newCharData(data, false, e) -} - -// dup duplicates the character data. -func (c *CharData) dup(parent *Element) Token { - return &CharData{ - Data: c.Data, - whitespace: c.whitespace, - parent: parent, - } -} - -// Parent returns the character data token's parent element, or nil if it has -// no parent. -func (c *CharData) Parent() *Element { - return c.parent -} - -// setParent replaces the character data token's parent. -func (c *CharData) setParent(parent *Element) { - c.parent = parent -} - -// writeTo serializes the character data entity to the writer. -func (c *CharData) writeTo(w *bufio.Writer, s *WriteSettings) { - var r *strings.Replacer - if s.CanonicalText { - r = xmlReplacerCanonicalText - } else { - r = xmlReplacerNormal - } - w.WriteString(r.Replace(c.Data)) -} - -// NewComment creates a parentless XML comment. -func NewComment(comment string) *Comment { - return newComment(comment, nil) -} - -// NewComment creates an XML comment and binds it to a parent element. If -// parent is nil, the Comment remains unbound. -func newComment(comment string, parent *Element) *Comment { - c := &Comment{ - Data: comment, - parent: parent, - } - if parent != nil { - parent.addChild(c) - } - return c -} - -// CreateComment creates an XML comment and adds it as a child of element e. -func (e *Element) CreateComment(comment string) *Comment { - return newComment(comment, e) -} - -// dup duplicates the comment. -func (c *Comment) dup(parent *Element) Token { - return &Comment{ - Data: c.Data, - parent: parent, - } -} - -// Parent returns comment token's parent element, or nil if it has no parent. -func (c *Comment) Parent() *Element { - return c.parent -} - -// setParent replaces the comment token's parent. -func (c *Comment) setParent(parent *Element) { - c.parent = parent -} - -// writeTo serialies the comment to the writer. -func (c *Comment) writeTo(w *bufio.Writer, s *WriteSettings) { - w.WriteString("") -} - -// NewDirective creates a parentless XML directive. -func NewDirective(data string) *Directive { - return newDirective(data, nil) -} - -// newDirective creates an XML directive and binds it to a parent element. If -// parent is nil, the Directive remains unbound. -func newDirective(data string, parent *Element) *Directive { - d := &Directive{ - Data: data, - parent: parent, - } - if parent != nil { - parent.addChild(d) - } - return d -} - -// CreateDirective creates an XML directive and adds it as the last child of -// element e. -func (e *Element) CreateDirective(data string) *Directive { - return newDirective(data, e) -} - -// dup duplicates the directive. -func (d *Directive) dup(parent *Element) Token { - return &Directive{ - Data: d.Data, - parent: parent, - } -} - -// Parent returns directive token's parent element, or nil if it has no -// parent. -func (d *Directive) Parent() *Element { - return d.parent -} - -// setParent replaces the directive token's parent. -func (d *Directive) setParent(parent *Element) { - d.parent = parent -} - -// writeTo serializes the XML directive to the writer. -func (d *Directive) writeTo(w *bufio.Writer, s *WriteSettings) { - w.WriteString("") -} - -// NewProcInst creates a parentless XML processing instruction. -func NewProcInst(target, inst string) *ProcInst { - return newProcInst(target, inst, nil) -} - -// newProcInst creates an XML processing instruction and binds it to a parent -// element. If parent is nil, the ProcInst remains unbound. -func newProcInst(target, inst string, parent *Element) *ProcInst { - p := &ProcInst{ - Target: target, - Inst: inst, - parent: parent, - } - if parent != nil { - parent.addChild(p) - } - return p -} - -// CreateProcInst creates a processing instruction and adds it as a child of -// element e. -func (e *Element) CreateProcInst(target, inst string) *ProcInst { - return newProcInst(target, inst, e) -} - -// dup duplicates the procinst. -func (p *ProcInst) dup(parent *Element) Token { - return &ProcInst{ - Target: p.Target, - Inst: p.Inst, - parent: parent, - } -} - -// Parent returns processing instruction token's parent element, or nil if it -// has no parent. -func (p *ProcInst) Parent() *Element { - return p.parent -} - -// setParent replaces the processing instruction token's parent. -func (p *ProcInst) setParent(parent *Element) { - p.parent = parent -} - -// writeTo serializes the processing instruction to the writer. -func (p *ProcInst) writeTo(w *bufio.Writer, s *WriteSettings) { - w.WriteString("") -} diff --git a/vendor/github.com/beevik/etree/helpers.go b/vendor/github.com/beevik/etree/helpers.go deleted file mode 100644 index 4f8350e70..000000000 --- a/vendor/github.com/beevik/etree/helpers.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright 2015 Brett Vickers. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package etree - -import ( - "io" - "strings" -) - -// A simple stack -type stack struct { - data []interface{} -} - -func (s *stack) empty() bool { - return len(s.data) == 0 -} - -func (s *stack) push(value interface{}) { - s.data = append(s.data, value) -} - -func (s *stack) pop() interface{} { - value := s.data[len(s.data)-1] - s.data[len(s.data)-1] = nil - s.data = s.data[:len(s.data)-1] - return value -} - -func (s *stack) peek() interface{} { - return s.data[len(s.data)-1] -} - -// A fifo is a simple first-in-first-out queue. -type fifo struct { - data []interface{} - head, tail int -} - -func (f *fifo) add(value interface{}) { - if f.len()+1 >= len(f.data) { - f.grow() - } - f.data[f.tail] = value - if f.tail++; f.tail == len(f.data) { - f.tail = 0 - } -} - -func (f *fifo) remove() interface{} { - value := f.data[f.head] - f.data[f.head] = nil - if f.head++; f.head == len(f.data) { - f.head = 0 - } - return value -} - -func (f *fifo) len() int { - if f.tail >= f.head { - return f.tail - f.head - } - return len(f.data) - f.head + f.tail -} - -func (f *fifo) grow() { - c := len(f.data) * 2 - if c == 0 { - c = 4 - } - buf, count := make([]interface{}, c), f.len() - if f.tail >= f.head { - copy(buf[0:count], f.data[f.head:f.tail]) - } else { - hindex := len(f.data) - f.head - copy(buf[0:hindex], f.data[f.head:]) - copy(buf[hindex:count], f.data[:f.tail]) - } - f.data, f.head, f.tail = buf, 0, count -} - -// countReader implements a proxy reader that counts the number of -// bytes read from its encapsulated reader. -type countReader struct { - r io.Reader - bytes int64 -} - -func newCountReader(r io.Reader) *countReader { - return &countReader{r: r} -} - -func (cr *countReader) Read(p []byte) (n int, err error) { - b, err := cr.r.Read(p) - cr.bytes += int64(b) - return b, err -} - -// countWriter implements a proxy writer that counts the number of -// bytes written by its encapsulated writer. -type countWriter struct { - w io.Writer - bytes int64 -} - -func newCountWriter(w io.Writer) *countWriter { - return &countWriter{w: w} -} - -func (cw *countWriter) Write(p []byte) (n int, err error) { - b, err := cw.w.Write(p) - cw.bytes += int64(b) - return b, err -} - -// isWhitespace returns true if the byte slice contains only -// whitespace characters. -func isWhitespace(s string) bool { - for i := 0; i < len(s); i++ { - if c := s[i]; c != ' ' && c != '\t' && c != '\n' && c != '\r' { - return false - } - } - return true -} - -// spaceMatch returns true if namespace a is the empty string -// or if namespace a equals namespace b. -func spaceMatch(a, b string) bool { - switch { - case a == "": - return true - default: - return a == b - } -} - -// spaceDecompose breaks a namespace:tag identifier at the ':' -// and returns the two parts. -func spaceDecompose(str string) (space, key string) { - colon := strings.IndexByte(str, ':') - if colon == -1 { - return "", str - } - return str[:colon], str[colon+1:] -} - -// Strings used by crIndent -const ( - crsp = "\n " - crtab = "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" -) - -// crIndent returns a carriage return followed by n copies of the -// first non-CR character in the source string. -func crIndent(n int, source string) string { - switch { - case n < 0: - return source[:1] - case n < len(source): - return source[:n+1] - default: - return source + strings.Repeat(source[1:2], n-len(source)+1) - } -} - -// nextIndex returns the index of the next occurrence of sep in s, -// starting from offset. It returns -1 if the sep string is not found. -func nextIndex(s, sep string, offset int) int { - switch i := strings.Index(s[offset:], sep); i { - case -1: - return -1 - default: - return offset + i - } -} - -// isInteger returns true if the string s contains an integer. -func isInteger(s string) bool { - for i := 0; i < len(s); i++ { - if (s[i] < '0' || s[i] > '9') && !(i == 0 && s[i] == '-') { - return false - } - } - return true -} diff --git a/vendor/github.com/beevik/etree/path.go b/vendor/github.com/beevik/etree/path.go deleted file mode 100644 index a1a59bdc4..000000000 --- a/vendor/github.com/beevik/etree/path.go +++ /dev/null @@ -1,533 +0,0 @@ -// Copyright 2015 Brett Vickers. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package etree - -import ( - "strconv" - "strings" -) - -/* -A Path is an object that represents an optimized version of an XPath-like -search string. A path search string is a slash-separated series of "selectors" -allowing traversal through an XML hierarchy. Although etree path strings are -similar to XPath strings, they have a more limited set of selectors and -filtering options. The following selectors and filters are supported by etree -paths: - - . Select the current element. - .. Select the parent of the current element. - * Select all child elements of the current element. - / Select the root element when used at the start of a path. - // Select all descendants of the current element. If used at - the start of a path, select all descendants of the root. - tag Select all child elements with the given tag. - [#] Select the element of the given index (1-based, - negative starts from the end). - [@attrib] Select all elements with the given attribute. - [@attrib='val'] Select all elements with the given attribute set to val. - [tag] Select all elements with a child element named tag. - [tag='val'] Select all elements with a child element named tag - and text matching val. - [text()] Select all elements with non-empty text. - [text()='val'] Select all elements whose text matches val. - -Examples: - -Select the bookstore child element of the root element: - /bookstore - -Beginning a search from the root element, select the title elements of all -descendant book elements having a 'category' attribute of 'WEB': - //book[@category='WEB']/title - -Beginning a search from the current element, select the first descendant book -element with a title child containing the text 'Great Expectations': - .//book[title='Great Expectations'][1] - -Beginning a search from the current element, select all children of book -elements with an attribute 'language' set to 'english': - ./book/*[@language='english'] - -Beginning a search from the current element, select all children of book -elements containing the text 'special': - ./book/*[text()='special'] - -Beginning a search from the current element, select all descendant book -elements whose title element has an attribute 'language' equal to 'french': - .//book/title[@language='french']/.. - -*/ -type Path struct { - segments []segment -} - -// ErrPath is returned by path functions when an invalid etree path is provided. -type ErrPath string - -// Error returns the string describing a path error. -func (err ErrPath) Error() string { - return "etree: " + string(err) -} - -// CompilePath creates an optimized version of an XPath-like string that -// can be used to query elements in an element tree. -func CompilePath(path string) (Path, error) { - var comp compiler - segments := comp.parsePath(path) - if comp.err != ErrPath("") { - return Path{nil}, comp.err - } - return Path{segments}, nil -} - -// MustCompilePath creates an optimized version of an XPath-like string that -// can be used to query elements in an element tree. Panics if an error -// occurs. Use this function to create Paths when you know the path is -// valid (i.e., if it's hard-coded). -func MustCompilePath(path string) Path { - p, err := CompilePath(path) - if err != nil { - panic(err) - } - return p -} - -// A segment is a portion of a path between "/" characters. -// It contains one selector and zero or more [filters]. -type segment struct { - sel selector - filters []filter -} - -func (seg *segment) apply(e *Element, p *pather) { - seg.sel.apply(e, p) - for _, f := range seg.filters { - f.apply(p) - } -} - -// A selector selects XML elements for consideration by the -// path traversal. -type selector interface { - apply(e *Element, p *pather) -} - -// A filter pares down a list of candidate XML elements based -// on a path filter in [brackets]. -type filter interface { - apply(p *pather) -} - -// A pather is helper object that traverses an element tree using -// a Path object. It collects and deduplicates all elements matching -// the path query. -type pather struct { - queue fifo - results []*Element - inResults map[*Element]bool - candidates []*Element - scratch []*Element // used by filters -} - -// A node represents an element and the remaining path segments that -// should be applied against it by the pather. -type node struct { - e *Element - segments []segment -} - -func newPather() *pather { - return &pather{ - results: make([]*Element, 0), - inResults: make(map[*Element]bool), - candidates: make([]*Element, 0), - scratch: make([]*Element, 0), - } -} - -// traverse follows the path from the element e, collecting -// and then returning all elements that match the path's selectors -// and filters. -func (p *pather) traverse(e *Element, path Path) []*Element { - for p.queue.add(node{e, path.segments}); p.queue.len() > 0; { - p.eval(p.queue.remove().(node)) - } - return p.results -} - -// eval evalutes the current path node by applying the remaining -// path's selector rules against the node's element. -func (p *pather) eval(n node) { - p.candidates = p.candidates[0:0] - seg, remain := n.segments[0], n.segments[1:] - seg.apply(n.e, p) - - if len(remain) == 0 { - for _, c := range p.candidates { - if in := p.inResults[c]; !in { - p.inResults[c] = true - p.results = append(p.results, c) - } - } - } else { - for _, c := range p.candidates { - p.queue.add(node{c, remain}) - } - } -} - -// A compiler generates a compiled path from a path string. -type compiler struct { - err ErrPath -} - -// parsePath parses an XPath-like string describing a path -// through an element tree and returns a slice of segment -// descriptors. -func (c *compiler) parsePath(path string) []segment { - // If path ends with //, fix it - if strings.HasSuffix(path, "//") { - path = path + "*" - } - - var segments []segment - - // Check for an absolute path - if strings.HasPrefix(path, "/") { - segments = append(segments, segment{new(selectRoot), []filter{}}) - path = path[1:] - } - - // Split path into segments - for _, s := range splitPath(path) { - segments = append(segments, c.parseSegment(s)) - if c.err != ErrPath("") { - break - } - } - return segments -} - -func splitPath(path string) []string { - pieces := make([]string, 0) - start := 0 - inquote := false - for i := 0; i+1 <= len(path); i++ { - if path[i] == '\'' { - inquote = !inquote - } else if path[i] == '/' && !inquote { - pieces = append(pieces, path[start:i]) - start = i + 1 - } - } - return append(pieces, path[start:]) -} - -// parseSegment parses a path segment between / characters. -func (c *compiler) parseSegment(path string) segment { - pieces := strings.Split(path, "[") - seg := segment{ - sel: c.parseSelector(pieces[0]), - filters: []filter{}, - } - for i := 1; i < len(pieces); i++ { - fpath := pieces[i] - if fpath[len(fpath)-1] != ']' { - c.err = ErrPath("path has invalid filter [brackets].") - break - } - seg.filters = append(seg.filters, c.parseFilter(fpath[:len(fpath)-1])) - } - return seg -} - -// parseSelector parses a selector at the start of a path segment. -func (c *compiler) parseSelector(path string) selector { - switch path { - case ".": - return new(selectSelf) - case "..": - return new(selectParent) - case "*": - return new(selectChildren) - case "": - return new(selectDescendants) - default: - return newSelectChildrenByTag(path) - } -} - -// parseFilter parses a path filter contained within [brackets]. -func (c *compiler) parseFilter(path string) filter { - if len(path) == 0 { - c.err = ErrPath("path contains an empty filter expression.") - return nil - } - - // Filter contains [@attr='val'], [text()='val'], or [tag='val']? - eqindex := strings.Index(path, "='") - if eqindex >= 0 { - rindex := nextIndex(path, "'", eqindex+2) - if rindex != len(path)-1 { - c.err = ErrPath("path has mismatched filter quotes.") - return nil - } - switch { - case path[0] == '@': - return newFilterAttrVal(path[1:eqindex], path[eqindex+2:rindex]) - case strings.HasPrefix(path, "text()"): - return newFilterTextVal(path[eqindex+2 : rindex]) - default: - return newFilterChildText(path[:eqindex], path[eqindex+2:rindex]) - } - } - - // Filter contains [@attr], [N], [tag] or [text()] - switch { - case path[0] == '@': - return newFilterAttr(path[1:]) - case path == "text()": - return newFilterText() - case isInteger(path): - pos, _ := strconv.Atoi(path) - switch { - case pos > 0: - return newFilterPos(pos - 1) - default: - return newFilterPos(pos) - } - default: - return newFilterChild(path) - } -} - -// selectSelf selects the current element into the candidate list. -type selectSelf struct{} - -func (s *selectSelf) apply(e *Element, p *pather) { - p.candidates = append(p.candidates, e) -} - -// selectRoot selects the element's root node. -type selectRoot struct{} - -func (s *selectRoot) apply(e *Element, p *pather) { - root := e - for root.parent != nil { - root = root.parent - } - p.candidates = append(p.candidates, root) -} - -// selectParent selects the element's parent into the candidate list. -type selectParent struct{} - -func (s *selectParent) apply(e *Element, p *pather) { - if e.parent != nil { - p.candidates = append(p.candidates, e.parent) - } -} - -// selectChildren selects the element's child elements into the -// candidate list. -type selectChildren struct{} - -func (s *selectChildren) apply(e *Element, p *pather) { - for _, c := range e.Child { - if c, ok := c.(*Element); ok { - p.candidates = append(p.candidates, c) - } - } -} - -// selectDescendants selects all descendant child elements -// of the element into the candidate list. -type selectDescendants struct{} - -func (s *selectDescendants) apply(e *Element, p *pather) { - var queue fifo - for queue.add(e); queue.len() > 0; { - e := queue.remove().(*Element) - p.candidates = append(p.candidates, e) - for _, c := range e.Child { - if c, ok := c.(*Element); ok { - queue.add(c) - } - } - } -} - -// selectChildrenByTag selects into the candidate list all child -// elements of the element having the specified tag. -type selectChildrenByTag struct { - space, tag string -} - -func newSelectChildrenByTag(path string) *selectChildrenByTag { - s, l := spaceDecompose(path) - return &selectChildrenByTag{s, l} -} - -func (s *selectChildrenByTag) apply(e *Element, p *pather) { - for _, c := range e.Child { - if c, ok := c.(*Element); ok && spaceMatch(s.space, c.Space) && s.tag == c.Tag { - p.candidates = append(p.candidates, c) - } - } -} - -// filterPos filters the candidate list, keeping only the -// candidate at the specified index. -type filterPos struct { - index int -} - -func newFilterPos(pos int) *filterPos { - return &filterPos{pos} -} - -func (f *filterPos) apply(p *pather) { - if f.index >= 0 { - if f.index < len(p.candidates) { - p.scratch = append(p.scratch, p.candidates[f.index]) - } - } else { - if -f.index <= len(p.candidates) { - p.scratch = append(p.scratch, p.candidates[len(p.candidates)+f.index]) - } - } - p.candidates, p.scratch = p.scratch, p.candidates[0:0] -} - -// filterAttr filters the candidate list for elements having -// the specified attribute. -type filterAttr struct { - space, key string -} - -func newFilterAttr(str string) *filterAttr { - s, l := spaceDecompose(str) - return &filterAttr{s, l} -} - -func (f *filterAttr) apply(p *pather) { - for _, c := range p.candidates { - for _, a := range c.Attr { - if spaceMatch(f.space, a.Space) && f.key == a.Key { - p.scratch = append(p.scratch, c) - break - } - } - } - p.candidates, p.scratch = p.scratch, p.candidates[0:0] -} - -// filterAttrVal filters the candidate list for elements having -// the specified attribute with the specified value. -type filterAttrVal struct { - space, key, val string -} - -func newFilterAttrVal(str, value string) *filterAttrVal { - s, l := spaceDecompose(str) - return &filterAttrVal{s, l, value} -} - -func (f *filterAttrVal) apply(p *pather) { - for _, c := range p.candidates { - for _, a := range c.Attr { - if spaceMatch(f.space, a.Space) && f.key == a.Key && f.val == a.Value { - p.scratch = append(p.scratch, c) - break - } - } - } - p.candidates, p.scratch = p.scratch, p.candidates[0:0] -} - -// filterText filters the candidate list for elements having text. -type filterText struct{} - -func newFilterText() *filterText { - return &filterText{} -} - -func (f *filterText) apply(p *pather) { - for _, c := range p.candidates { - if c.Text() != "" { - p.scratch = append(p.scratch, c) - } - } - p.candidates, p.scratch = p.scratch, p.candidates[0:0] -} - -// filterTextVal filters the candidate list for elements having -// text equal to the specified value. -type filterTextVal struct { - val string -} - -func newFilterTextVal(value string) *filterTextVal { - return &filterTextVal{value} -} - -func (f *filterTextVal) apply(p *pather) { - for _, c := range p.candidates { - if c.Text() == f.val { - p.scratch = append(p.scratch, c) - } - } - p.candidates, p.scratch = p.scratch, p.candidates[0:0] -} - -// filterChild filters the candidate list for elements having -// a child element with the specified tag. -type filterChild struct { - space, tag string -} - -func newFilterChild(str string) *filterChild { - s, l := spaceDecompose(str) - return &filterChild{s, l} -} - -func (f *filterChild) apply(p *pather) { - for _, c := range p.candidates { - for _, cc := range c.Child { - if cc, ok := cc.(*Element); ok && - spaceMatch(f.space, cc.Space) && - f.tag == cc.Tag { - p.scratch = append(p.scratch, c) - } - } - } - p.candidates, p.scratch = p.scratch, p.candidates[0:0] -} - -// filterChildText filters the candidate list for elements having -// a child element with the specified tag and text. -type filterChildText struct { - space, tag, text string -} - -func newFilterChildText(str, text string) *filterChildText { - s, l := spaceDecompose(str) - return &filterChildText{s, l, text} -} - -func (f *filterChildText) apply(p *pather) { - for _, c := range p.candidates { - for _, cc := range c.Child { - if cc, ok := cc.(*Element); ok && - spaceMatch(f.space, cc.Space) && - f.tag == cc.Tag && - f.text == cc.Text() { - p.scratch = append(p.scratch, c) - } - } - } - p.candidates, p.scratch = p.scratch, p.candidates[0:0] -} diff --git a/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go b/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go deleted file mode 100644 index ceadde6a5..000000000 --- a/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go +++ /dev/null @@ -1,101 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package sortkeys - -import ( - "sort" -) - -func Strings(l []string) { - sort.Strings(l) -} - -func Float64s(l []float64) { - sort.Float64s(l) -} - -func Float32s(l []float32) { - sort.Sort(Float32Slice(l)) -} - -func Int64s(l []int64) { - sort.Sort(Int64Slice(l)) -} - -func Int32s(l []int32) { - sort.Sort(Int32Slice(l)) -} - -func Uint64s(l []uint64) { - sort.Sort(Uint64Slice(l)) -} - -func Uint32s(l []uint32) { - sort.Sort(Uint32Slice(l)) -} - -func Bools(l []bool) { - sort.Sort(BoolSlice(l)) -} - -type BoolSlice []bool - -func (p BoolSlice) Len() int { return len(p) } -func (p BoolSlice) Less(i, j int) bool { return p[j] } -func (p BoolSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Int64Slice []int64 - -func (p Int64Slice) Len() int { return len(p) } -func (p Int64Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Int64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Int32Slice []int32 - -func (p Int32Slice) Len() int { return len(p) } -func (p Int32Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Int32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Uint64Slice []uint64 - -func (p Uint64Slice) Len() int { return len(p) } -func (p Uint64Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Uint64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Uint32Slice []uint32 - -func (p Uint32Slice) Len() int { return len(p) } -func (p Uint32Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Uint32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -type Float32Slice []float32 - -func (p Float32Slice) Len() int { return len(p) } -func (p Float32Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Float32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/vendor/github.com/google/gofuzz/.travis.yml b/vendor/github.com/google/gofuzz/.travis.yml deleted file mode 100644 index f8684d99f..000000000 --- a/vendor/github.com/google/gofuzz/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: go - -go: - - 1.4 - - 1.3 - - 1.2 - - tip - -install: - - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi - -script: - - go test -cover diff --git a/vendor/github.com/google/gofuzz/CONTRIBUTING.md b/vendor/github.com/google/gofuzz/CONTRIBUTING.md deleted file mode 100644 index 51cf5cd1a..000000000 --- a/vendor/github.com/google/gofuzz/CONTRIBUTING.md +++ /dev/null @@ -1,67 +0,0 @@ -# How to contribute # - -We'd love to accept your patches and contributions to this project. There are -a just a few small guidelines you need to follow. - - -## Contributor License Agreement ## - -Contributions to any Google project must be accompanied by a Contributor -License Agreement. This is not a copyright **assignment**, it simply gives -Google permission to use and redistribute your contributions as part of the -project. - - * If you are an individual writing original source code and you're sure you - own the intellectual property, then you'll need to sign an [individual - CLA][]. - - * If you work for a company that wants to allow you to contribute your work, - then you'll need to sign a [corporate CLA][]. - -You generally only need to submit a CLA once, so if you've already submitted -one (even if it was for a different project), you probably don't need to do it -again. - -[individual CLA]: https://developers.google.com/open-source/cla/individual -[corporate CLA]: https://developers.google.com/open-source/cla/corporate - - -## Submitting a patch ## - - 1. It's generally best to start by opening a new issue describing the bug or - feature you're intending to fix. Even if you think it's relatively minor, - it's helpful to know what people are working on. Mention in the initial - issue that you are planning to work on that bug or feature so that it can - be assigned to you. - - 1. Follow the normal process of [forking][] the project, and setup a new - branch to work in. It's important that each group of changes be done in - separate branches in order to ensure that a pull request only includes the - commits related to that bug or feature. - - 1. Go makes it very simple to ensure properly formatted code, so always run - `go fmt` on your code before committing it. You should also run - [golint][] over your code. As noted in the [golint readme][], it's not - strictly necessary that your code be completely "lint-free", but this will - help you find common style issues. - - 1. Any significant changes should almost always be accompanied by tests. The - project already has good test coverage, so look at some of the existing - tests if you're unsure how to go about it. [gocov][] and [gocov-html][] - are invaluable tools for seeing which parts of your code aren't being - exercised by your tests. - - 1. Do your best to have [well-formed commit messages][] for each change. - This provides consistency throughout the project, and ensures that commit - messages are able to be formatted properly by various git tools. - - 1. Finally, push the commits to your fork and submit a [pull request][]. - -[forking]: https://help.github.com/articles/fork-a-repo -[golint]: https://github.com/golang/lint -[golint readme]: https://github.com/golang/lint/blob/master/README -[gocov]: https://github.com/axw/gocov -[gocov-html]: https://github.com/matm/gocov-html -[well-formed commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html -[squash]: http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits -[pull request]: https://help.github.com/articles/creating-a-pull-request diff --git a/vendor/github.com/google/gofuzz/LICENSE b/vendor/github.com/google/gofuzz/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/vendor/github.com/google/gofuzz/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/google/gofuzz/README.md b/vendor/github.com/google/gofuzz/README.md deleted file mode 100644 index 64869af34..000000000 --- a/vendor/github.com/google/gofuzz/README.md +++ /dev/null @@ -1,71 +0,0 @@ -gofuzz -====== - -gofuzz is a library for populating go objects with random values. - -[![GoDoc](https://godoc.org/github.com/google/gofuzz?status.png)](https://godoc.org/github.com/google/gofuzz) -[![Travis](https://travis-ci.org/google/gofuzz.svg?branch=master)](https://travis-ci.org/google/gofuzz) - -This is useful for testing: - -* Do your project's objects really serialize/unserialize correctly in all cases? -* Is there an incorrectly formatted object that will cause your project to panic? - -Import with ```import "github.com/google/gofuzz"``` - -You can use it on single variables: -```go -f := fuzz.New() -var myInt int -f.Fuzz(&myInt) // myInt gets a random value. -``` - -You can use it on maps: -```go -f := fuzz.New().NilChance(0).NumElements(1, 1) -var myMap map[ComplexKeyType]string -f.Fuzz(&myMap) // myMap will have exactly one element. -``` - -Customize the chance of getting a nil pointer: -```go -f := fuzz.New().NilChance(.5) -var fancyStruct struct { - A, B, C, D *string -} -f.Fuzz(&fancyStruct) // About half the pointers should be set. -``` - -You can even customize the randomization completely if needed: -```go -type MyEnum string -const ( - A MyEnum = "A" - B MyEnum = "B" -) -type MyInfo struct { - Type MyEnum - AInfo *string - BInfo *string -} - -f := fuzz.New().NilChance(0).Funcs( - func(e *MyInfo, c fuzz.Continue) { - switch c.Intn(2) { - case 0: - e.Type = A - c.Fuzz(&e.AInfo) - case 1: - e.Type = B - c.Fuzz(&e.BInfo) - } - }, -) - -var myObject MyInfo -f.Fuzz(&myObject) // Type will correspond to whether A or B info is set. -``` - -See more examples in ```example_test.go```. - -Happy testing! diff --git a/vendor/github.com/google/gofuzz/doc.go b/vendor/github.com/google/gofuzz/doc.go deleted file mode 100644 index 9f9956d4a..000000000 --- a/vendor/github.com/google/gofuzz/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2014 Google Inc. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package fuzz is a library for populating go objects with random values. -package fuzz diff --git a/vendor/github.com/google/gofuzz/fuzz.go b/vendor/github.com/google/gofuzz/fuzz.go deleted file mode 100644 index 1dfa80a6f..000000000 --- a/vendor/github.com/google/gofuzz/fuzz.go +++ /dev/null @@ -1,487 +0,0 @@ -/* -Copyright 2014 Google Inc. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fuzz - -import ( - "fmt" - "math/rand" - "reflect" - "time" -) - -// fuzzFuncMap is a map from a type to a fuzzFunc that handles that type. -type fuzzFuncMap map[reflect.Type]reflect.Value - -// Fuzzer knows how to fill any object with random fields. -type Fuzzer struct { - fuzzFuncs fuzzFuncMap - defaultFuzzFuncs fuzzFuncMap - r *rand.Rand - nilChance float64 - minElements int - maxElements int - maxDepth int -} - -// New returns a new Fuzzer. Customize your Fuzzer further by calling Funcs, -// RandSource, NilChance, or NumElements in any order. -func New() *Fuzzer { - return NewWithSeed(time.Now().UnixNano()) -} - -func NewWithSeed(seed int64) *Fuzzer { - f := &Fuzzer{ - defaultFuzzFuncs: fuzzFuncMap{ - reflect.TypeOf(&time.Time{}): reflect.ValueOf(fuzzTime), - }, - - fuzzFuncs: fuzzFuncMap{}, - r: rand.New(rand.NewSource(seed)), - nilChance: .2, - minElements: 1, - maxElements: 10, - maxDepth: 100, - } - return f -} - -// Funcs adds each entry in fuzzFuncs as a custom fuzzing function. -// -// Each entry in fuzzFuncs must be a function taking two parameters. -// The first parameter must be a pointer or map. It is the variable that -// function will fill with random data. The second parameter must be a -// fuzz.Continue, which will provide a source of randomness and a way -// to automatically continue fuzzing smaller pieces of the first parameter. -// -// These functions are called sensibly, e.g., if you wanted custom string -// fuzzing, the function `func(s *string, c fuzz.Continue)` would get -// called and passed the address of strings. Maps and pointers will always -// be made/new'd for you, ignoring the NilChange option. For slices, it -// doesn't make much sense to pre-create them--Fuzzer doesn't know how -// long you want your slice--so take a pointer to a slice, and make it -// yourself. (If you don't want your map/pointer type pre-made, take a -// pointer to it, and make it yourself.) See the examples for a range of -// custom functions. -func (f *Fuzzer) Funcs(fuzzFuncs ...interface{}) *Fuzzer { - for i := range fuzzFuncs { - v := reflect.ValueOf(fuzzFuncs[i]) - if v.Kind() != reflect.Func { - panic("Need only funcs!") - } - t := v.Type() - if t.NumIn() != 2 || t.NumOut() != 0 { - panic("Need 2 in and 0 out params!") - } - argT := t.In(0) - switch argT.Kind() { - case reflect.Ptr, reflect.Map: - default: - panic("fuzzFunc must take pointer or map type") - } - if t.In(1) != reflect.TypeOf(Continue{}) { - panic("fuzzFunc's second parameter must be type fuzz.Continue") - } - f.fuzzFuncs[argT] = v - } - return f -} - -// RandSource causes f to get values from the given source of randomness. -// Use if you want deterministic fuzzing. -func (f *Fuzzer) RandSource(s rand.Source) *Fuzzer { - f.r = rand.New(s) - return f -} - -// NilChance sets the probability of creating a nil pointer, map, or slice to -// 'p'. 'p' should be between 0 (no nils) and 1 (all nils), inclusive. -func (f *Fuzzer) NilChance(p float64) *Fuzzer { - if p < 0 || p > 1 { - panic("p should be between 0 and 1, inclusive.") - } - f.nilChance = p - return f -} - -// NumElements sets the minimum and maximum number of elements that will be -// added to a non-nil map or slice. -func (f *Fuzzer) NumElements(atLeast, atMost int) *Fuzzer { - if atLeast > atMost { - panic("atLeast must be <= atMost") - } - if atLeast < 0 { - panic("atLeast must be >= 0") - } - f.minElements = atLeast - f.maxElements = atMost - return f -} - -func (f *Fuzzer) genElementCount() int { - if f.minElements == f.maxElements { - return f.minElements - } - return f.minElements + f.r.Intn(f.maxElements-f.minElements+1) -} - -func (f *Fuzzer) genShouldFill() bool { - return f.r.Float64() > f.nilChance -} - -// MaxDepth sets the maximum number of recursive fuzz calls that will be made -// before stopping. This includes struct members, pointers, and map and slice -// elements. -func (f *Fuzzer) MaxDepth(d int) *Fuzzer { - f.maxDepth = d - return f -} - -// Fuzz recursively fills all of obj's fields with something random. First -// this tries to find a custom fuzz function (see Funcs). If there is no -// custom function this tests whether the object implements fuzz.Interface and, -// if so, calls Fuzz on it to fuzz itself. If that fails, this will see if -// there is a default fuzz function provided by this package. If all of that -// fails, this will generate random values for all primitive fields and then -// recurse for all non-primitives. -// -// This is safe for cyclic or tree-like structs, up to a limit. Use the -// MaxDepth method to adjust how deep you need it to recurse. -// -// obj must be a pointer. Only exported (public) fields can be set (thanks, -// golang :/ ) Intended for tests, so will panic on bad input or unimplemented -// fields. -func (f *Fuzzer) Fuzz(obj interface{}) { - v := reflect.ValueOf(obj) - if v.Kind() != reflect.Ptr { - panic("needed ptr!") - } - v = v.Elem() - f.fuzzWithContext(v, 0) -} - -// FuzzNoCustom is just like Fuzz, except that any custom fuzz function for -// obj's type will not be called and obj will not be tested for fuzz.Interface -// conformance. This applies only to obj and not other instances of obj's -// type. -// Not safe for cyclic or tree-like structs! -// obj must be a pointer. Only exported (public) fields can be set (thanks, golang :/ ) -// Intended for tests, so will panic on bad input or unimplemented fields. -func (f *Fuzzer) FuzzNoCustom(obj interface{}) { - v := reflect.ValueOf(obj) - if v.Kind() != reflect.Ptr { - panic("needed ptr!") - } - v = v.Elem() - f.fuzzWithContext(v, flagNoCustomFuzz) -} - -const ( - // Do not try to find a custom fuzz function. Does not apply recursively. - flagNoCustomFuzz uint64 = 1 << iota -) - -func (f *Fuzzer) fuzzWithContext(v reflect.Value, flags uint64) { - fc := &fuzzerContext{fuzzer: f} - fc.doFuzz(v, flags) -} - -// fuzzerContext carries context about a single fuzzing run, which lets Fuzzer -// be thread-safe. -type fuzzerContext struct { - fuzzer *Fuzzer - curDepth int -} - -func (fc *fuzzerContext) doFuzz(v reflect.Value, flags uint64) { - if fc.curDepth >= fc.fuzzer.maxDepth { - return - } - fc.curDepth++ - defer func() { fc.curDepth-- }() - - if !v.CanSet() { - return - } - - if flags&flagNoCustomFuzz == 0 { - // Check for both pointer and non-pointer custom functions. - if v.CanAddr() && fc.tryCustom(v.Addr()) { - return - } - if fc.tryCustom(v) { - return - } - } - - if fn, ok := fillFuncMap[v.Kind()]; ok { - fn(v, fc.fuzzer.r) - return - } - switch v.Kind() { - case reflect.Map: - if fc.fuzzer.genShouldFill() { - v.Set(reflect.MakeMap(v.Type())) - n := fc.fuzzer.genElementCount() - for i := 0; i < n; i++ { - key := reflect.New(v.Type().Key()).Elem() - fc.doFuzz(key, 0) - val := reflect.New(v.Type().Elem()).Elem() - fc.doFuzz(val, 0) - v.SetMapIndex(key, val) - } - return - } - v.Set(reflect.Zero(v.Type())) - case reflect.Ptr: - if fc.fuzzer.genShouldFill() { - v.Set(reflect.New(v.Type().Elem())) - fc.doFuzz(v.Elem(), 0) - return - } - v.Set(reflect.Zero(v.Type())) - case reflect.Slice: - if fc.fuzzer.genShouldFill() { - n := fc.fuzzer.genElementCount() - v.Set(reflect.MakeSlice(v.Type(), n, n)) - for i := 0; i < n; i++ { - fc.doFuzz(v.Index(i), 0) - } - return - } - v.Set(reflect.Zero(v.Type())) - case reflect.Array: - if fc.fuzzer.genShouldFill() { - n := v.Len() - for i := 0; i < n; i++ { - fc.doFuzz(v.Index(i), 0) - } - return - } - v.Set(reflect.Zero(v.Type())) - case reflect.Struct: - for i := 0; i < v.NumField(); i++ { - fc.doFuzz(v.Field(i), 0) - } - case reflect.Chan: - fallthrough - case reflect.Func: - fallthrough - case reflect.Interface: - fallthrough - default: - panic(fmt.Sprintf("Can't handle %#v", v.Interface())) - } -} - -// tryCustom searches for custom handlers, and returns true iff it finds a match -// and successfully randomizes v. -func (fc *fuzzerContext) tryCustom(v reflect.Value) bool { - // First: see if we have a fuzz function for it. - doCustom, ok := fc.fuzzer.fuzzFuncs[v.Type()] - if !ok { - // Second: see if it can fuzz itself. - if v.CanInterface() { - intf := v.Interface() - if fuzzable, ok := intf.(Interface); ok { - fuzzable.Fuzz(Continue{fc: fc, Rand: fc.fuzzer.r}) - return true - } - } - // Finally: see if there is a default fuzz function. - doCustom, ok = fc.fuzzer.defaultFuzzFuncs[v.Type()] - if !ok { - return false - } - } - - switch v.Kind() { - case reflect.Ptr: - if v.IsNil() { - if !v.CanSet() { - return false - } - v.Set(reflect.New(v.Type().Elem())) - } - case reflect.Map: - if v.IsNil() { - if !v.CanSet() { - return false - } - v.Set(reflect.MakeMap(v.Type())) - } - default: - return false - } - - doCustom.Call([]reflect.Value{v, reflect.ValueOf(Continue{ - fc: fc, - Rand: fc.fuzzer.r, - })}) - return true -} - -// Interface represents an object that knows how to fuzz itself. Any time we -// find a type that implements this interface we will delegate the act of -// fuzzing itself. -type Interface interface { - Fuzz(c Continue) -} - -// Continue can be passed to custom fuzzing functions to allow them to use -// the correct source of randomness and to continue fuzzing their members. -type Continue struct { - fc *fuzzerContext - - // For convenience, Continue implements rand.Rand via embedding. - // Use this for generating any randomness if you want your fuzzing - // to be repeatable for a given seed. - *rand.Rand -} - -// Fuzz continues fuzzing obj. obj must be a pointer. -func (c Continue) Fuzz(obj interface{}) { - v := reflect.ValueOf(obj) - if v.Kind() != reflect.Ptr { - panic("needed ptr!") - } - v = v.Elem() - c.fc.doFuzz(v, 0) -} - -// FuzzNoCustom continues fuzzing obj, except that any custom fuzz function for -// obj's type will not be called and obj will not be tested for fuzz.Interface -// conformance. This applies only to obj and not other instances of obj's -// type. -func (c Continue) FuzzNoCustom(obj interface{}) { - v := reflect.ValueOf(obj) - if v.Kind() != reflect.Ptr { - panic("needed ptr!") - } - v = v.Elem() - c.fc.doFuzz(v, flagNoCustomFuzz) -} - -// RandString makes a random string up to 20 characters long. The returned string -// may include a variety of (valid) UTF-8 encodings. -func (c Continue) RandString() string { - return randString(c.Rand) -} - -// RandUint64 makes random 64 bit numbers. -// Weirdly, rand doesn't have a function that gives you 64 random bits. -func (c Continue) RandUint64() uint64 { - return randUint64(c.Rand) -} - -// RandBool returns true or false randomly. -func (c Continue) RandBool() bool { - return randBool(c.Rand) -} - -func fuzzInt(v reflect.Value, r *rand.Rand) { - v.SetInt(int64(randUint64(r))) -} - -func fuzzUint(v reflect.Value, r *rand.Rand) { - v.SetUint(randUint64(r)) -} - -func fuzzTime(t *time.Time, c Continue) { - var sec, nsec int64 - // Allow for about 1000 years of random time values, which keeps things - // like JSON parsing reasonably happy. - sec = c.Rand.Int63n(1000 * 365 * 24 * 60 * 60) - c.Fuzz(&nsec) - *t = time.Unix(sec, nsec) -} - -var fillFuncMap = map[reflect.Kind]func(reflect.Value, *rand.Rand){ - reflect.Bool: func(v reflect.Value, r *rand.Rand) { - v.SetBool(randBool(r)) - }, - reflect.Int: fuzzInt, - reflect.Int8: fuzzInt, - reflect.Int16: fuzzInt, - reflect.Int32: fuzzInt, - reflect.Int64: fuzzInt, - reflect.Uint: fuzzUint, - reflect.Uint8: fuzzUint, - reflect.Uint16: fuzzUint, - reflect.Uint32: fuzzUint, - reflect.Uint64: fuzzUint, - reflect.Uintptr: fuzzUint, - reflect.Float32: func(v reflect.Value, r *rand.Rand) { - v.SetFloat(float64(r.Float32())) - }, - reflect.Float64: func(v reflect.Value, r *rand.Rand) { - v.SetFloat(r.Float64()) - }, - reflect.Complex64: func(v reflect.Value, r *rand.Rand) { - panic("unimplemented") - }, - reflect.Complex128: func(v reflect.Value, r *rand.Rand) { - panic("unimplemented") - }, - reflect.String: func(v reflect.Value, r *rand.Rand) { - v.SetString(randString(r)) - }, - reflect.UnsafePointer: func(v reflect.Value, r *rand.Rand) { - panic("unimplemented") - }, -} - -// randBool returns true or false randomly. -func randBool(r *rand.Rand) bool { - if r.Int()&1 == 1 { - return true - } - return false -} - -type charRange struct { - first, last rune -} - -// choose returns a random unicode character from the given range, using the -// given randomness source. -func (r *charRange) choose(rand *rand.Rand) rune { - count := int64(r.last - r.first) - return r.first + rune(rand.Int63n(count)) -} - -var unicodeRanges = []charRange{ - {' ', '~'}, // ASCII characters - {'\u00a0', '\u02af'}, // Multi-byte encoded characters - {'\u4e00', '\u9fff'}, // Common CJK (even longer encodings) -} - -// randString makes a random string up to 20 characters long. The returned string -// may include a variety of (valid) UTF-8 encodings. -func randString(r *rand.Rand) string { - n := r.Intn(20) - runes := make([]rune, n) - for i := range runes { - runes[i] = unicodeRanges[r.Intn(len(unicodeRanges))].choose(r) - } - return string(runes) -} - -// randUint64 makes random 64 bit numbers. -// Weirdly, rand doesn't have a function that gives you 64 random bits. -func randUint64(r *rand.Rand) uint64 { - return uint64(r.Uint32())<<32 | uint64(r.Uint32()) -} diff --git a/vendor/github.com/hashicorp/aws-sdk-go-base/.golangci.yml b/vendor/github.com/hashicorp/aws-sdk-go-base/.golangci.yml new file mode 100644 index 000000000..59ef674ca --- /dev/null +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/.golangci.yml @@ -0,0 +1,19 @@ +issues: + max-per-linter: 0 + max-same-issues: 0 + +linters: + disable-all: true + enable: + - deadcode + - errcheck + - gofmt + - gosimple + - ineffassign + - misspell + - staticcheck + - structcheck + - unconvert + - unused + - varcheck + - vet diff --git a/vendor/github.com/hashicorp/aws-sdk-go-base/.travis.yml b/vendor/github.com/hashicorp/aws-sdk-go-base/.travis.yml new file mode 100644 index 000000000..d29b47205 --- /dev/null +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/.travis.yml @@ -0,0 +1,21 @@ +dist: xenial +language: go +go: +- "1.11.x" +env: + GOFLAGS=-mod=vendor + +install: +- make tools + +script: +- make lint +- make test + +branches: + only: + - master +matrix: + fast_finish: true + allow_failures: + - go: tip diff --git a/vendor/github.com/hashicorp/aws-sdk-go-base/CHANGELOG.md b/vendor/github.com/hashicorp/aws-sdk-go-base/CHANGELOG.md new file mode 100644 index 000000000..7810de13b --- /dev/null +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/CHANGELOG.md @@ -0,0 +1,3 @@ +# v0.1.0 (February 18, 2019) + +* Initial release after split from github.com/terraform-providers/terraform-provider-aws diff --git a/vendor/github.com/hashicorp/aws-sdk-go-base/GNUmakefile b/vendor/github.com/hashicorp/aws-sdk-go-base/GNUmakefile new file mode 100644 index 000000000..ef101a111 --- /dev/null +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/GNUmakefile @@ -0,0 +1,13 @@ +default: test lint + +lint: + @echo "==> Checking source code against linters..." + @golangci-lint run ./... + +test: + go test -timeout=30s -parallel=4 ./... + +tools: + GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint + +.PHONY: lint test tools diff --git a/vendor/github.com/jen20/awspolicyequivalence/LICENSE b/vendor/github.com/hashicorp/aws-sdk-go-base/LICENSE similarity index 100% rename from vendor/github.com/jen20/awspolicyequivalence/LICENSE rename to vendor/github.com/hashicorp/aws-sdk-go-base/LICENSE diff --git a/vendor/github.com/hashicorp/aws-sdk-go-base/README.md b/vendor/github.com/hashicorp/aws-sdk-go-base/README.md new file mode 100644 index 000000000..dc410ebd4 --- /dev/null +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/README.md @@ -0,0 +1,27 @@ +# aws-sdk-go-base + +An opinionated [AWS Go SDK](https://github.com/aws/aws-sdk-go) library for consistent authentication configuration between projects and additional helper functions. This library was originally started in [HashiCorp Terraform](https://github.com/hashicorp/terraform), migrated with the [Terraform AWS Provider](https://github.com/terraform-providers/terraform-provider-aws) during the Terraform 0.10 Core and Provider split, and now is offered as a separate library to allow easier dependency management in the Terraform ecosystem. + +**NOTE:** This library is not currently designed or intended for usage outside the [Terraform S3 Backend](https://www.terraform.io/docs/backends/types/s3.html) and the [Terraform AWS Provider](https://www.terraform.io/docs/providers/aws/index.html). + +## Requirements + +- [Go](https://golang.org/doc/install) 1.11.4+ + +## Development + +Testing this project can be done through Go standard library functionality or if [Make](https://www.gnu.org/software/make/) is available: + +```sh +$ go test -v ./... +# Optionally if Make is available; both run the same testing +$ make test +``` + +Code quality assurance uses [golangci-lint](https://github.com/golangci/golangci-lint): + +```sh +$ golangci-lint run ./... +# Optionally if Make is available; both run the same linting +$ make lint +``` diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/auth_helpers.go b/vendor/github.com/hashicorp/aws-sdk-go-base/awsauth.go similarity index 93% rename from vendor/github.com/terraform-providers/terraform-provider-aws/aws/auth_helpers.go rename to vendor/github.com/hashicorp/aws-sdk-go-base/awsauth.go index f0a8cbf3a..17bc443d5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/auth_helpers.go +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/awsauth.go @@ -1,4 +1,4 @@ -package aws +package awsbase import ( "errors" @@ -82,14 +82,11 @@ func GetAccountIDAndPartitionFromIAMGetUser(iamconn *iam.IAM) (string, string, e if err != nil { // AccessDenied and ValidationError can be raised // if credentials belong to federated profile, so we ignore these - if isAWSErr(err, "AccessDenied", "") { - return "", "", nil - } - if isAWSErr(err, "InvalidClientTokenId", "") { - return "", "", nil - } - if isAWSErr(err, "ValidationError", "") { - return "", "", nil + if awsErr, ok := err.(awserr.Error); ok { + switch awsErr.Code() { + case "AccessDenied", "InvalidClientTokenId", "ValidationError": + return "", "", nil + } } err = fmt.Errorf("failed getting account information via iam:GetUser: %s", err) log.Printf("[DEBUG] %s", err) @@ -206,7 +203,13 @@ func GetCredentials(c *Config) (*awsCredentials.Credentials, error) { // Real AWS should reply to a simple metadata request. // We check it actually does to ensure something else didn't just // happen to be listening on the same IP:Port - metadataClient := ec2metadata.New(session.New(cfg)) + ec2Session, err := session.NewSession(cfg) + + if err != nil { + return nil, fmt.Errorf("error creating EC2 Metadata session: %s", err) + } + + metadataClient := ec2metadata.New(ec2Session) if metadataClient.Available() { providers = append(providers, &ec2rolecreds.EC2RoleProvider{ Client: metadataClient, @@ -247,14 +250,19 @@ func GetCredentials(c *Config) (*awsCredentials.Credentials, error) { log.Printf("[INFO] AWS Auth provider used: %q", cp.ProviderName) awsConfig := &aws.Config{ - Credentials: creds, - Region: aws.String(c.Region), - MaxRetries: aws.Int(c.MaxRetries), - HTTPClient: cleanhttp.DefaultClient(), - S3ForcePathStyle: aws.Bool(c.S3ForcePathStyle), + Credentials: creds, + Region: aws.String(c.Region), + MaxRetries: aws.Int(c.MaxRetries), + HTTPClient: cleanhttp.DefaultClient(), } - stsclient := sts.New(session.New(awsConfig)) + assumeRoleSession, err := session.NewSession(awsConfig) + + if err != nil { + return nil, fmt.Errorf("error creating assume role session: %s", err) + } + + stsclient := sts.New(assumeRoleSession) assumeRoleProvider := &stscreds.AssumeRoleProvider{ Client: stsclient, RoleARN: c.AssumeRoleARN, diff --git a/vendor/github.com/hashicorp/aws-sdk-go-base/awserr.go b/vendor/github.com/hashicorp/aws-sdk-go-base/awserr.go new file mode 100644 index 000000000..282954835 --- /dev/null +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/awserr.go @@ -0,0 +1,37 @@ +package awsbase + +import ( + "strings" + + "github.com/aws/aws-sdk-go/aws/awserr" +) + +// IsAWSErr returns true if the error matches all these conditions: +// * err is of type awserr.Error +// * Error.Code() matches code +// * Error.Message() contains message +func IsAWSErr(err error, code string, message string) bool { + awsErr, ok := err.(awserr.Error) + + if !ok { + return false + } + + if awsErr.Code() != code { + return false + } + + return strings.Contains(awsErr.Message(), message) +} + +// IsAWSErrExtended returns true if the error matches all these conditions: +// * err is of type awserr.Error +// * Error.Code() matches code +// * Error.Message() contains message +// * Error.OrigErr() contains origErrMessage +func IsAWSErrExtended(err error, code string, message string, origErrMessage string) bool { + if !IsAWSErr(err, code, message) { + return false + } + return strings.Contains(err.(awserr.Error).OrigErr().Error(), origErrMessage) +} diff --git a/vendor/github.com/hashicorp/aws-sdk-go-base/config.go b/vendor/github.com/hashicorp/aws-sdk-go-base/config.go new file mode 100644 index 000000000..fb57e44e4 --- /dev/null +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/config.go @@ -0,0 +1,29 @@ +package awsbase + +type Config struct { + AccessKey string + AssumeRoleARN string + AssumeRoleExternalID string + AssumeRolePolicy string + AssumeRoleSessionName string + CredsFilename string + DebugLogging bool + IamEndpoint string + Insecure bool + MaxRetries int + Profile string + Region string + SecretKey string + SkipCredsValidation bool + SkipMetadataApiCheck bool + SkipRequestingAccountId bool + StsEndpoint string + Token string + UserAgentProducts []*UserAgentProduct +} + +type UserAgentProduct struct { + Extra []string + Name string + Version string +} diff --git a/vendor/github.com/hashicorp/aws-sdk-go-base/go.mod b/vendor/github.com/hashicorp/aws-sdk-go-base/go.mod new file mode 100644 index 000000000..9df74cb33 --- /dev/null +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/go.mod @@ -0,0 +1,10 @@ +module github.com/hashicorp/aws-sdk-go-base + +require ( + github.com/aws/aws-sdk-go v1.16.36 + github.com/hashicorp/go-cleanhttp v0.5.0 + github.com/hashicorp/go-multierror v1.0.0 + github.com/stretchr/testify v1.3.0 // indirect + golang.org/x/net v0.0.0-20190213061140-3a22650c66bd // indirect + golang.org/x/text v0.3.0 // indirect +) diff --git a/vendor/github.com/hashicorp/aws-sdk-go-base/go.sum b/vendor/github.com/hashicorp/aws-sdk-go-base/go.sum new file mode 100644 index 000000000..fe20b5e55 --- /dev/null +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/go.sum @@ -0,0 +1,21 @@ +github.com/aws/aws-sdk-go v1.16.36 h1:POeH34ZME++pr7GBGh+ZO6Y5kOwSMQpqp5BGUgooJ6k= +github.com/aws/aws-sdk-go v1.16.36/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd h1:HuTn7WObtcDo9uEEU7rEqL0jYthdXAmZ6PP+meazmaU= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/vendor/github.com/hashicorp/aws-sdk-go-base/logger.go b/vendor/github.com/hashicorp/aws-sdk-go-base/logger.go new file mode 100644 index 000000000..467d7acea --- /dev/null +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/logger.go @@ -0,0 +1,18 @@ +package awsbase + +import ( + "log" + "strings" +) + +type DebugLogger struct{} + +func (l DebugLogger) Log(args ...interface{}) { + tokens := make([]string, 0, len(args)) + for _, arg := range args { + if token, ok := arg.(string); ok { + tokens = append(tokens, token) + } + } + log.Printf("[DEBUG] [aws-sdk-go] %s", strings.Join(tokens, " ")) +} diff --git a/vendor/github.com/hashicorp/aws-sdk-go-base/mock.go b/vendor/github.com/hashicorp/aws-sdk-go-base/mock.go new file mode 100644 index 000000000..66d172564 --- /dev/null +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/mock.go @@ -0,0 +1,76 @@ +package awsbase + +import ( + "bytes" + "fmt" + "log" + "net/http" + "net/http/httptest" + "time" + + "github.com/aws/aws-sdk-go/aws" + awsCredentials "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/session" +) + +// GetMockedAwsApiSession establishes a httptest server to simulate behaviour +// of a real AWS API server +func GetMockedAwsApiSession(svcName string, endpoints []*MockEndpoint) (func(), *session.Session, error) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + buf := new(bytes.Buffer) + if _, err := buf.ReadFrom(r.Body); err != nil { + w.WriteHeader(500) + fmt.Fprintf(w, "Error reading from HTTP Request Body: %s", err) + return + } + requestBody := buf.String() + + log.Printf("[DEBUG] Received %s API %q request to %q: %s", + svcName, r.Method, r.RequestURI, requestBody) + + for _, e := range endpoints { + if r.Method == e.Request.Method && r.RequestURI == e.Request.Uri && requestBody == e.Request.Body { + log.Printf("[DEBUG] Mocked %s API responding with %d: %s", + svcName, e.Response.StatusCode, e.Response.Body) + + w.WriteHeader(e.Response.StatusCode) + w.Header().Set("Content-Type", e.Response.ContentType) + w.Header().Set("X-Amzn-Requestid", "1b206dd1-f9a8-11e5-becf-051c60f11c4a") + w.Header().Set("Date", time.Now().Format(time.RFC1123)) + + fmt.Fprintln(w, e.Response.Body) + return + } + } + + w.WriteHeader(400) + })) + + sc := awsCredentials.NewStaticCredentials("accessKey", "secretKey", "") + + sess, err := session.NewSession(&aws.Config{ + Credentials: sc, + Region: aws.String("us-east-1"), + Endpoint: aws.String(ts.URL), + CredentialsChainVerboseErrors: aws.Bool(true), + }) + + return ts.Close, sess, err +} + +type MockEndpoint struct { + Request *MockRequest + Response *MockResponse +} + +type MockRequest struct { + Method string + Uri string + Body string +} + +type MockResponse struct { + StatusCode int + Body string + ContentType string +} diff --git a/vendor/github.com/hashicorp/aws-sdk-go-base/session.go b/vendor/github.com/hashicorp/aws-sdk-go-base/session.go new file mode 100644 index 000000000..6fc3ae4b4 --- /dev/null +++ b/vendor/github.com/hashicorp/aws-sdk-go-base/session.go @@ -0,0 +1,203 @@ +package awsbase + +import ( + "crypto/tls" + "errors" + "fmt" + "log" + "net/http" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/endpoints" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/iam" + "github.com/aws/aws-sdk-go/service/sts" + "github.com/hashicorp/go-cleanhttp" +) + +// GetSessionOptions attempts to return valid AWS Go SDK session authentication +// options based on pre-existing credential provider, configured profile, or +// fallback to automatically a determined session via the AWS Go SDK. +func GetSessionOptions(c *Config) (*session.Options, error) { + options := &session.Options{ + Config: aws.Config{ + HTTPClient: cleanhttp.DefaultClient(), + MaxRetries: aws.Int(0), + Region: aws.String(c.Region), + }, + } + + creds, err := GetCredentials(c) + if err != nil { + return nil, err + } + + // Call Get to check for credential provider. If nothing found, we'll get an + // error, and we can present it nicely to the user + cp, err := creds.Get() + if err != nil { + if IsAWSErr(err, "NoCredentialProviders", "") { + // If a profile wasn't specified, the session may still be able to resolve credentials from shared config. + if c.Profile == "" { + sess, err := session.NewSession() + if err != nil { + return nil, errors.New(`No valid credential sources found for AWS Provider. + Please see https://terraform.io/docs/providers/aws/index.html for more information on + providing credentials for the AWS Provider`) + } + _, err = sess.Config.Credentials.Get() + if err != nil { + return nil, errors.New(`No valid credential sources found for AWS Provider. + Please see https://terraform.io/docs/providers/aws/index.html for more information on + providing credentials for the AWS Provider`) + } + log.Printf("[INFO] Using session-derived AWS Auth") + options.Config.Credentials = sess.Config.Credentials + } else { + log.Printf("[INFO] AWS Auth using Profile: %q", c.Profile) + options.Profile = c.Profile + options.SharedConfigState = session.SharedConfigEnable + } + } else { + return nil, fmt.Errorf("Error loading credentials for AWS Provider: %s", err) + } + } else { + // add the validated credentials to the session options + log.Printf("[INFO] AWS Auth provider used: %q", cp.ProviderName) + options.Config.Credentials = creds + } + + if c.Insecure { + transport := options.Config.HTTPClient.Transport.(*http.Transport) + transport.TLSClientConfig = &tls.Config{ + InsecureSkipVerify: true, + } + } + + if c.DebugLogging { + options.Config.LogLevel = aws.LogLevel(aws.LogDebugWithHTTPBody | aws.LogDebugWithRequestRetries | aws.LogDebugWithRequestErrors) + options.Config.Logger = DebugLogger{} + } + + return options, nil +} + +// GetSession attempts to return valid AWS Go SDK session +func GetSession(c *Config) (*session.Session, error) { + options, err := GetSessionOptions(c) + + if err != nil { + return nil, err + } + + sess, err := session.NewSessionWithOptions(*options) + if err != nil { + if IsAWSErr(err, "NoCredentialProviders", "") { + return nil, errors.New(`No valid credential sources found for AWS Provider. + Please see https://terraform.io/docs/providers/aws/index.html for more information on + providing credentials for the AWS Provider`) + } + return nil, fmt.Errorf("Error creating AWS session: %s", err) + } + + if c.MaxRetries > 0 { + sess = sess.Copy(&aws.Config{MaxRetries: aws.Int(c.MaxRetries)}) + } + + for _, product := range c.UserAgentProducts { + sess.Handlers.Build.PushBack(request.MakeAddToUserAgentHandler(product.Name, product.Version, product.Extra...)) + } + + // Generally, we want to configure a lower retry theshold for networking issues + // as the session retry threshold is very high by default and can mask permanent + // networking failures, such as a non-existent service endpoint. + // MaxRetries will override this logic if it has a lower retry threshold. + // NOTE: This logic can be fooled by other request errors raising the retry count + // before any networking error occurs + sess.Handlers.Retry.PushBack(func(r *request.Request) { + // We currently depend on the DefaultRetryer exponential backoff here. + // ~10 retries gives a fair backoff of a few seconds. + if r.RetryCount < 9 { + return + } + // RequestError: send request failed + // caused by: Post https://FQDN/: dial tcp: lookup FQDN: no such host + if IsAWSErrExtended(r.Error, "RequestError", "send request failed", "no such host") { + log.Printf("[WARN] Disabling retries after next request due to networking issue") + r.Retryable = aws.Bool(false) + } + // RequestError: send request failed + // caused by: Post https://FQDN/: dial tcp IPADDRESS:443: connect: connection refused + if IsAWSErrExtended(r.Error, "RequestError", "send request failed", "connection refused") { + log.Printf("[WARN] Disabling retries after next request due to networking issue") + r.Retryable = aws.Bool(false) + } + }) + + if !c.SkipCredsValidation { + stsClient := sts.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.StsEndpoint)})) + if _, _, err := GetAccountIDAndPartitionFromSTSGetCallerIdentity(stsClient); err != nil { + return nil, fmt.Errorf("error validating provider credentials: %s", err) + } + } + + return sess, nil +} + +// GetSessionWithAccountIDAndPartition attempts to return valid AWS Go SDK session +// along with account ID and partition information if available +func GetSessionWithAccountIDAndPartition(c *Config) (*session.Session, string, string, error) { + sess, err := GetSession(c) + + if err != nil { + return nil, "", "", err + } + + if c.AssumeRoleARN != "" { + accountID, partition, _ := parseAccountIDAndPartitionFromARN(c.AssumeRoleARN) + return sess, accountID, partition, nil + } + + iamClient := iam.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.IamEndpoint)})) + stsClient := sts.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.StsEndpoint)})) + + if !c.SkipCredsValidation { + accountID, partition, err := GetAccountIDAndPartitionFromSTSGetCallerIdentity(stsClient) + + if err != nil { + return nil, "", "", fmt.Errorf("error validating provider credentials: %s", err) + } + + return sess, accountID, partition, nil + } + + if !c.SkipRequestingAccountId { + credentialsProviderName := "" + + if credentialsValue, err := sess.Config.Credentials.Get(); err == nil { + credentialsProviderName = credentialsValue.ProviderName + } + + accountID, partition, err := GetAccountIDAndPartition(iamClient, stsClient, credentialsProviderName) + + if err == nil { + return sess, accountID, partition, nil + } + + // DEPRECATED: Next major version of the provider should return the error instead of logging + // if skip_request_account_id is not enabled. + log.Printf("[WARN] %s", fmt.Sprintf( + "AWS account ID not previously found and failed retrieving via all available methods. "+ + "This will return an error in the next major version of the AWS provider. "+ + "See https://www.terraform.io/docs/providers/aws/index.html#skip_requesting_account_id for workaround and implications. "+ + "Errors: %s", err)) + } + + var partition string + if p, ok := endpoints.PartitionForRegion(endpoints.DefaultPartitions(), c.Region); ok { + partition = p.ID() + } + + return sess, "", partition, nil +} diff --git a/vendor/github.com/jen20/awspolicyequivalence/.gitignore b/vendor/github.com/jen20/awspolicyequivalence/.gitignore deleted file mode 100644 index 67837b85b..000000000 --- a/vendor/github.com/jen20/awspolicyequivalence/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.iml -.idea/ -.DS_Store diff --git a/vendor/github.com/jen20/awspolicyequivalence/.travis.yml b/vendor/github.com/jen20/awspolicyequivalence/.travis.yml deleted file mode 100644 index e21f1cec0..000000000 --- a/vendor/github.com/jen20/awspolicyequivalence/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -sudo: false - -language: go - -go: - - 1.7 - -branches: - only: - - master diff --git a/vendor/github.com/jen20/awspolicyequivalence/README.md b/vendor/github.com/jen20/awspolicyequivalence/README.md deleted file mode 100644 index 3883fafaa..000000000 --- a/vendor/github.com/jen20/awspolicyequivalence/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## AWS Policy Equivalence Library - -This library checks for structural equivalence of two AWS policy documents. See Godoc for more information on usage. - -### CI - -Travis CI Build Status diff --git a/vendor/github.com/jen20/awspolicyequivalence/aws_policy_equivalence.go b/vendor/github.com/jen20/awspolicyequivalence/aws_policy_equivalence.go deleted file mode 100644 index adf38ba59..000000000 --- a/vendor/github.com/jen20/awspolicyequivalence/aws_policy_equivalence.go +++ /dev/null @@ -1,465 +0,0 @@ -// Package awspolicy contains functions to compare structural equivalence -// of AWS IAM policies. -package awspolicy - -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -import ( - "encoding/json" - "errors" - "fmt" - "reflect" - "regexp" - "strings" - - "github.com/mitchellh/mapstructure" -) - -// PoliciesAreEquivalent tests for the structural equivalence of two -// AWS policies. It does not read into the semantics, other than treating -// single element string arrays as equivalent to a string without an -// array, as the AWS endpoints do. -// -// It will, however, detect reordering and ignore whitespace. -// -// Returns true if the policies are structurally equivalent, false -// otherwise. If either of the input strings are not valid JSON, -// false is returned along with an error. -func PoliciesAreEquivalent(policy1, policy2 string) (bool, error) { - policy1intermediate := &intermediateAwsPolicyDocument{} - if err := json.Unmarshal([]byte(policy1), policy1intermediate); err != nil { - return false, fmt.Errorf("Error unmarshaling policy: %s", err) - } - - policy2intermediate := &intermediateAwsPolicyDocument{} - if err := json.Unmarshal([]byte(policy2), policy2intermediate); err != nil { - return false, fmt.Errorf("Error unmarshaling policy: %s", err) - } - - policy1Doc, err := policy1intermediate.document() - if err != nil { - return false, fmt.Errorf("Error parsing policy: %s", err) - } - policy2Doc, err := policy2intermediate.document() - if err != nil { - return false, fmt.Errorf("Error parsing policy: %s", err) - } - - return policy1Doc.equals(policy2Doc), nil -} - -type intermediateAwsPolicyDocument struct { - Version string `json:",omitempty"` - Id string `json:",omitempty"` - Statements interface{} `json:"Statement"` -} - -func (intermediate *intermediateAwsPolicyDocument) document() (*awsPolicyDocument, error) { - var statements []*awsPolicyStatement - - switch s := intermediate.Statements.(type) { - case []interface{}: - if err := mapstructure.Decode(s, &statements); err != nil { - return nil, fmt.Errorf("Error parsing statement: %s", err) - } - case map[string]interface{}: - var singleStatement *awsPolicyStatement - if err := mapstructure.Decode(s, &singleStatement); err != nil { - return nil, fmt.Errorf("Error parsing statement: %s", err) - } - statements = append(statements, singleStatement) - default: - return nil, errors.New("Unknown error parsing statement") - } - - document := &awsPolicyDocument{ - Version: intermediate.Version, - Id: intermediate.Id, - Statements: statements, - } - - return document, nil -} - -type awsPolicyDocument struct { - Version string - Id string - Statements []*awsPolicyStatement -} - -func (doc *awsPolicyDocument) equals(other *awsPolicyDocument) bool { - // Check the basic fields of the document - if doc.Version != other.Version { - return false - } - if doc.Id != other.Id { - return false - } - - // If we have different number of statements we are very unlikely - // to have them be equivalent. - if len(doc.Statements) != len(other.Statements) { - return false - } - - // If we have the same number of statements in the policy, does - // each statement in the intermediate have a corresponding statement in - // other which is equal? If no, policies are not equal, if yes, - // then they may be. - for _, ours := range doc.Statements { - found := false - for _, theirs := range other.Statements { - if ours.equals(theirs) { - found = true - } - } - - if !found { - return false - } - } - - // Now we need to repeat this process the other way around to - // ensure we don't have any matching errors. - for _, theirs := range other.Statements { - found := false - for _, ours := range doc.Statements { - if theirs.equals(ours) { - found = true - } - } - - if !found { - return false - } - } - - return true -} - -type awsPolicyStatement struct { - Sid string `json:",omitempty" mapstructure:"Sid"` - Effect string `json:",omitempty" mapstructure:"Effect"` - Actions interface{} `json:"Action,omitempty" mapstructure:"Action"` - NotActions interface{} `json:"NotAction,omitempty" mapstructure:"NotAction"` - Resources interface{} `json:"Resource,omitempty" mapstructure:"Resource"` - NotResources interface{} `json:"NotResource,omitempty" mapstructure:"NotResource"` - Principals interface{} `json:"Principal,omitempty" mapstructure:"Principal"` - NotPrincipals interface{} `json:"NotPrincipal,omitempty" mapstructure:"NotPrincipal"` - Conditions map[string]map[string]interface{} `json:"Condition,omitempty" mapstructure:"Condition"` -} - -func (statement *awsPolicyStatement) equals(other *awsPolicyStatement) bool { - if statement.Sid != other.Sid { - return false - } - - if strings.ToLower(statement.Effect) != strings.ToLower(other.Effect) { - return false - } - - ourActions := newAWSStringSet(statement.Actions) - theirActions := newAWSStringSet(other.Actions) - if !ourActions.equals(theirActions) { - return false - } - - ourNotActions := newAWSStringSet(statement.NotActions) - theirNotActions := newAWSStringSet(other.NotActions) - if !ourNotActions.equals(theirNotActions) { - return false - } - - ourResources := newAWSStringSet(statement.Resources) - theirResources := newAWSStringSet(other.Resources) - if !ourResources.equals(theirResources) { - return false - } - - ourNotResources := newAWSStringSet(statement.NotResources) - theirNotResources := newAWSStringSet(other.NotResources) - if !ourNotResources.equals(theirNotResources) { - return false - } - - ourConditionsBlock := awsConditionsBlock(statement.Conditions) - theirConditionsBlock := awsConditionsBlock(other.Conditions) - if !ourConditionsBlock.Equals(theirConditionsBlock) { - return false - } - - if statement.Principals != nil || other.Principals != nil { - stringPrincipalsEqual := stringPrincipalsEqual(statement.Principals, other.Principals) - mapPrincipalsEqual := mapPrincipalsEqual(statement.Principals, other.Principals) - if !(stringPrincipalsEqual || mapPrincipalsEqual) { - return false - } - } - - if statement.NotPrincipals != nil || other.NotPrincipals != nil { - stringNotPrincipalsEqual := stringPrincipalsEqual(statement.NotPrincipals, other.NotPrincipals) - mapNotPrincipalsEqual := mapPrincipalsEqual(statement.NotPrincipals, other.NotPrincipals) - if !(stringNotPrincipalsEqual || mapNotPrincipalsEqual) { - return false - } - } - - return true -} - -func mapPrincipalsEqual(ours, theirs interface{}) bool { - ourPrincipalMap, oursOk := ours.(map[string]interface{}) - theirPrincipalMap, theirsOk := theirs.(map[string]interface{}) - - oursNormalized := make(map[string]awsPrincipalStringSet) - if oursOk { - for key, val := range ourPrincipalMap { - var tmp = newAWSPrincipalStringSet(val) - if len(tmp) > 0 { - oursNormalized[key] = tmp - } - } - } - - theirsNormalized := make(map[string]awsPrincipalStringSet) - if theirsOk { - for key, val := range theirPrincipalMap { - var tmp = newAWSPrincipalStringSet(val) - if len(tmp) > 0 { - theirsNormalized[key] = newAWSPrincipalStringSet(val) - } - } - } - - for key, ours := range oursNormalized { - theirs, ok := theirsNormalized[key] - if !ok { - return false - } - - if !ours.equals(theirs) { - return false - } - } - - for key, theirs := range theirsNormalized { - ours, ok := oursNormalized[key] - if !ok { - return false - } - - if !theirs.equals(ours) { - return false - } - } - - return true -} - -func stringPrincipalsEqual(ours, theirs interface{}) bool { - ourPrincipal, oursIsString := ours.(string) - theirPrincipal, theirsIsString := theirs.(string) - - if !(oursIsString && theirsIsString) { - return false - } - - if ourPrincipal == theirPrincipal { - return true - } - - // Handle AWS converting account ID principal to root IAM user ARN - // ACCOUNTID == arn:PARTITION:iam::ACCOUNTID:root - awsAccountIDRegex := regexp.MustCompile(`^[0-9]{12}$`) - - if awsAccountIDRegex.MatchString(ourPrincipal) { - if theirArn, err := parseAwsArnString(theirPrincipal); err == nil { - if theirArn.service == "iam" && theirArn.resource == "root" && theirArn.account == ourPrincipal { - return true - } - } - } - - if awsAccountIDRegex.MatchString(theirPrincipal) { - if ourArn, err := parseAwsArnString(ourPrincipal); err == nil { - if ourArn.service == "iam" && ourArn.resource == "root" && ourArn.account == theirPrincipal { - return true - } - } - } - - return false -} - -type awsConditionsBlock map[string]map[string]interface{} - -func (conditions awsConditionsBlock) Equals(other awsConditionsBlock) bool { - if conditions == nil && other != nil || other == nil && conditions != nil { - return false - } - - if len(conditions) != len(other) { - return false - } - - oursNormalized := make(map[string]map[string]awsStringSet) - for key, condition := range conditions { - normalizedCondition := make(map[string]awsStringSet) - for innerKey, val := range condition { - normalizedCondition[innerKey] = newAWSStringSet(val) - } - oursNormalized[key] = normalizedCondition - } - - theirsNormalized := make(map[string]map[string]awsStringSet) - for key, condition := range other { - normalizedCondition := make(map[string]awsStringSet) - for innerKey, val := range condition { - normalizedCondition[innerKey] = newAWSStringSet(val) - } - theirsNormalized[key] = normalizedCondition - } - - for key, ours := range oursNormalized { - theirs, ok := theirsNormalized[key] - if !ok { - return false - } - - for innerKey, oursInner := range ours { - theirsInner, ok := theirs[innerKey] - if !ok { - return false - } - - if !oursInner.equals(theirsInner) { - return false - } - } - } - - for key, theirs := range theirsNormalized { - ours, ok := oursNormalized[key] - if !ok { - return false - } - - for innerKey, theirsInner := range theirs { - oursInner, ok := ours[innerKey] - if !ok { - return false - } - - if !theirsInner.equals(oursInner) { - return false - } - } - } - - return true -} - -type awsStringSet []string -type awsPrincipalStringSet awsStringSet - -// newAWSStringSet constructs an awsStringSet from an interface{} - which -// may be nil, a single string, or []interface{} (each of which is a string). -// This corresponds with how structures come off the JSON unmarshaler -// without any custom encoding rules. -func newAWSStringSet(members interface{}) awsStringSet { - if members == nil { - return awsStringSet{} - } - - if single, ok := members.(string); ok { - return awsStringSet{single} - } - - if multiple, ok := members.([]interface{}); ok { - if len(multiple) == 0 { - return awsStringSet{} - } - actions := make([]string, len(multiple)) - for i, action := range multiple { - actions[i] = action.(string) - } - return awsStringSet(actions) - } - - return nil -} - -func newAWSPrincipalStringSet(members interface{}) awsPrincipalStringSet { - return awsPrincipalStringSet(newAWSStringSet(members)) -} - -func (actions awsStringSet) equals(other awsStringSet) bool { - if len(actions) != len(other) { - return false - } - - ourMap := map[string]struct{}{} - theirMap := map[string]struct{}{} - - for _, action := range actions { - ourMap[action] = struct{}{} - } - - for _, action := range other { - theirMap[action] = struct{}{} - } - - return reflect.DeepEqual(ourMap, theirMap) -} - -func (ours awsPrincipalStringSet) equals(theirs awsPrincipalStringSet) bool { - if len(ours) != len(theirs) { - return false - } - - for _, ourPrincipal := range ours { - matches := false - for _, theirPrincipal := range theirs { - if stringPrincipalsEqual(ourPrincipal, theirPrincipal) { - matches = true - break - } - } - if !matches { - return false - } - } - - return true -} - -// awsArn describes an Amazon Resource Name -// More information: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html -type awsArn struct { - account string - partition string - region string - resource string - service string -} - -// parseAwsArnString converts a string into an awsArn -// Expects string in form of: arn:PARTITION:SERVICE:REGION:ACCOUNT:RESOURCE -func parseAwsArnString(arn string) (awsArn, error) { - if !strings.HasPrefix(arn, "arn:") { - return awsArn{}, fmt.Errorf("expected arn: prefix, received: %s", arn) - } - arnParts := strings.SplitN(arn, ":", 6) - if len(arnParts) != 6 { - return awsArn{}, fmt.Errorf("expected 6 colon delimited sections, received: %s", arn) - } - return awsArn{ - account: arnParts[4], - partition: arnParts[1], - region: arnParts[3], - resource: arnParts[5], - service: arnParts[2], - }, nil -} diff --git a/vendor/github.com/jen20/awspolicyequivalence/go.mod b/vendor/github.com/jen20/awspolicyequivalence/go.mod deleted file mode 100644 index 35e1621e8..000000000 --- a/vendor/github.com/jen20/awspolicyequivalence/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/jen20/awspolicyequivalence - -require github.com/mitchellh/mapstructure v1.0.0 diff --git a/vendor/github.com/jen20/awspolicyequivalence/go.sum b/vendor/github.com/jen20/awspolicyequivalence/go.sum deleted file mode 100644 index 8f6af4f39..000000000 --- a/vendor/github.com/jen20/awspolicyequivalence/go.sum +++ /dev/null @@ -1,2 +0,0 @@ -github.com/mitchellh/mapstructure v1.0.0 h1:vVpGvMXJPqSDh2VYHF7gsfQj8Ncx+Xw5Y1KHeTRY+7I= -github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= diff --git a/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/LICENSE b/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/LICENSE deleted file mode 100644 index 8dada3eda..000000000 --- a/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/arn/arn.go b/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/arn/arn.go deleted file mode 100644 index 35efede93..000000000 --- a/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/arn/arn.go +++ /dev/null @@ -1,69 +0,0 @@ -package arn - -import ( - "fmt" - "strings" - - awsarn "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/endpoints" -) - -// Canonicalize validates IAM resources are appropriate for the authenticator -// and converts STS assumed roles into the IAM role resource. -// -// Supported IAM resources are: -// * AWS account: arn:aws:iam::123456789012:root -// * IAM user: arn:aws:iam::123456789012:user/Bob -// * IAM role: arn:aws:iam::123456789012:role/S3Access -// * IAM Assumed role: arn:aws:sts::123456789012:assumed-role/Accounting-Role/Mary (converted to IAM role) -// * Federated user: arn:aws:sts::123456789012:federated-user/Bob -func Canonicalize(arn string) (string, error) { - parsed, err := awsarn.Parse(arn) - if err != nil { - return "", fmt.Errorf("arn '%s' is invalid: '%v'", arn, err) - } - - if err := checkPartition(parsed.Partition); err != nil { - return "", fmt.Errorf("arn '%s' does not have a recognized partition", arn) - } - - parts := strings.Split(parsed.Resource, "/") - resource := parts[0] - - switch parsed.Service { - case "sts": - switch resource { - case "federated-user": - return arn, nil - case "assumed-role": - if len(parts) < 3 { - return "", fmt.Errorf("assumed-role arn '%s' does not have a role", arn) - } - // IAM ARNs can contain paths, part[0] is resource, parts[len(parts)] is the SessionName. - role := strings.Join(parts[1:len(parts)-1], "/") - return fmt.Sprintf("arn:%s:iam::%s:role/%s", parsed.Partition, parsed.AccountID, role), nil - default: - return "", fmt.Errorf("unrecognized resource %s for service sts", parsed.Resource) - } - case "iam": - switch resource { - case "role", "user", "root": - return arn, nil - default: - return "", fmt.Errorf("unrecognized resource %s for service iam", parsed.Resource) - } - } - - return "", fmt.Errorf("service %s in arn %s is not a valid service for identities", parsed.Service, arn) -} - -func checkPartition(partition string) error { - switch partition { - case endpoints.AwsPartitionID: - case endpoints.AwsCnPartitionID: - case endpoints.AwsUsGovPartitionID: - default: - return fmt.Errorf("partion %s is not recognized", partition) - } - return nil -} diff --git a/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token/token.go b/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token/token.go deleted file mode 100644 index 14901f120..000000000 --- a/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token/token.go +++ /dev/null @@ -1,432 +0,0 @@ -/* -Copyright 2017 by the contributors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package token - -import ( - "encoding/base64" - "encoding/json" - "fmt" - "io/ioutil" - "net/http" - "net/url" - "os" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/credentials/stscreds" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/sts" - "github.com/kubernetes-sigs/aws-iam-authenticator/pkg/arn" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clientauthv1alpha1 "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" -) - -// Identity is returned on successful Verify() results. It contains a parsed -// version of the AWS identity used to create the token. -type Identity struct { - // ARN is the raw Amazon Resource Name returned by sts:GetCallerIdentity - ARN string - - // CanonicalARN is the Amazon Resource Name converted to a more canonical - // representation. In particular, STS assumed role ARNs like - // "arn:aws:sts::ACCOUNTID:assumed-role/ROLENAME/SESSIONNAME" are converted - // to their IAM ARN equivalent "arn:aws:iam::ACCOUNTID:role/NAME" - CanonicalARN string - - // AccountID is the 12 digit AWS account number. - AccountID string - - // UserID is the unique user/role ID (e.g., "AROAAAAAAAAAAAAAAAAAA"). - UserID string - - // SessionName is the STS session name (or "" if this is not a - // session-based identity). For EC2 instance roles, this will be the EC2 - // instance ID (e.g., "i-0123456789abcdef0"). You should only rely on it - // if you trust that _only_ EC2 is allowed to assume the IAM Role. If IAM - // users or other roles are allowed to assume the role, they can provide - // (nearly) arbitrary strings here. - SessionName string -} - -const ( - // The sts GetCallerIdentity request is valid for 15 minutes regardless of this parameters value after it has been - // signed, but we set this unused parameter to 60 for legacy reasons (we check for a value between 0 and 60 on the - // server side in 0.3.0 or earlier). IT IS IGNORED. If we can get STS to support x-amz-expires, then we should - // set this parameter to the actual expiration, and make it configurable. - requestPresignParam = 60 - // The actual token expiration (presigned STS urls are valid for 15 minutes after timestamp in x-amz-date). - presignedURLExpiration = 15 * time.Minute - v1Prefix = "k8s-aws-v1." - maxTokenLenBytes = 1024 * 4 - clusterIDHeader = "x-k8s-aws-id" - // Format of the X-Amz-Date header used for expiration - // https://golang.org/pkg/time/#pkg-constants - dateHeaderFormat = "20060102T150405Z" -) - -// Token is generated and used by Kubernetes client-go to authenticate with a Kubernetes cluster. -type Token struct { - Token string - Expiration time.Time -} - -// FormatError is returned when there is a problem with token that is -// an encoded sts request. This can include the url, data, action or anything -// else that prevents the sts call from being made. -type FormatError struct { - message string -} - -func (e FormatError) Error() string { - return "input token was not properly formatted: " + e.message -} - -// STSError is returned when there was either an error calling STS or a problem -// processing the data returned from STS. -type STSError struct { - message string -} - -func (e STSError) Error() string { - return "sts getCallerIdentity failed: " + e.message -} - -// NewSTSError creates a error of type STS. -func NewSTSError(m string) STSError { - return STSError{message: m} -} - -var parameterWhitelist = map[string]bool{ - "action": true, - "version": true, - "x-amz-algorithm": true, - "x-amz-credential": true, - "x-amz-date": true, - "x-amz-expires": true, - "x-amz-security-token": true, - "x-amz-signature": true, - "x-amz-signedheaders": true, -} - -// this is the result type from the GetCallerIdentity endpoint -type getCallerIdentityWrapper struct { - GetCallerIdentityResponse struct { - GetCallerIdentityResult struct { - Account string `json:"Account"` - Arn string `json:"Arn"` - UserID string `json:"UserId"` - } `json:"GetCallerIdentityResult"` - ResponseMetadata struct { - RequestID string `json:"RequestId"` - } `json:"ResponseMetadata"` - } `json:"GetCallerIdentityResponse"` -} - -// Generator provides new tokens for the heptio authenticator. -type Generator interface { - // Get a token using credentials in the default credentials chain. - Get(string) (Token, error) - // GetWithRole creates a token by assuming the provided role, using the credentials in the default chain. - GetWithRole(clusterID, roleARN string) (Token, error) - // GetWithRoleForSession creates a token by assuming the provided role, using the provided session. - GetWithRoleForSession(clusterID string, roleARN string, sess *session.Session) (Token, error) - // GetWithSTS returns a token valid for clusterID using the given STS client. - GetWithSTS(clusterID string, stsAPI *sts.STS) (Token, error) - // FormatJSON returns the client auth formatted json for the ExecCredential auth - FormatJSON(Token) string -} - -type generator struct { - forwardSessionName bool -} - -// NewGenerator creates a Generator and returns it. -func NewGenerator(forwardSessionName bool) (Generator, error) { - return generator{ - forwardSessionName: forwardSessionName, - }, nil -} - -// Get uses the directly available AWS credentials to return a token valid for -// clusterID. It follows the default AWS credential handling behavior. -func (g generator) Get(clusterID string) (Token, error) { - return g.GetWithRole(clusterID, "") -} - -func StdinStderrTokenProvider() (string, error) { - var v string - fmt.Fprint(os.Stderr, "Assume Role MFA token code: ") - _, err := fmt.Scanln(&v) - return v, err -} - -// GetWithRole assumes the given AWS IAM role and returns a token valid for -// clusterID. If roleARN is empty, behaves like Get (does not assume a role). -func (g generator) GetWithRole(clusterID string, roleARN string) (Token, error) { - // create a session with the "base" credentials available - // (from environment variable, profile files, EC2 metadata, etc) - sess, err := session.NewSessionWithOptions(session.Options{ - AssumeRoleTokenProvider: StdinStderrTokenProvider, - SharedConfigState: session.SharedConfigEnable, - }) - if err != nil { - return Token{}, fmt.Errorf("could not create session: %v", err) - } - - return g.GetWithRoleForSession(clusterID, roleARN, sess) -} - -// GetWithRole assumes the given AWS IAM role for the given session and behaves -// like GetWithRole. -func (g generator) GetWithRoleForSession(clusterID string, roleARN string, sess *session.Session) (Token, error) { - // use an STS client based on the direct credentials - stsAPI := sts.New(sess) - - // if a roleARN was specified, replace the STS client with one that uses - // temporary credentials from that role. - if roleARN != "" { - sessionSetter := func(provider *stscreds.AssumeRoleProvider) {} - if g.forwardSessionName { - // If the current session is already a federated identity, carry through - // this session name onto the new session to provide better debugging - // capabilities - resp, err := stsAPI.GetCallerIdentity(&sts.GetCallerIdentityInput{}) - if err != nil { - return Token{}, err - } - - userIDParts := strings.Split(*resp.UserId, ":") - sessionSetter = func(provider *stscreds.AssumeRoleProvider) { - if len(userIDParts) == 2 { - provider.RoleSessionName = userIDParts[1] - } - } - } - - // create STS-based credentials that will assume the given role - creds := stscreds.NewCredentials(sess, roleARN, sessionSetter) - - // create an STS API interface that uses the assumed role's temporary credentials - stsAPI = sts.New(sess, &aws.Config{Credentials: creds}) - } - - return g.GetWithSTS(clusterID, stsAPI) -} - -// GetWithSTS returns a token valid for clusterID using the given STS client. -func (g generator) GetWithSTS(clusterID string, stsAPI *sts.STS) (Token, error) { - // generate an sts:GetCallerIdentity request and add our custom cluster ID header - request, _ := stsAPI.GetCallerIdentityRequest(&sts.GetCallerIdentityInput{}) - request.HTTPRequest.Header.Add(clusterIDHeader, clusterID) - - // Sign the request. The expires parameter (sets the x-amz-expires header) is - // currently ignored by STS, and the token expires 15 minutes after the x-amz-date - // timestamp regardless. We set it to 60 seconds for backwards compatibility (the - // parameter is a required argument to Presign(), and authenticators 0.3.0 and older are expecting a value between - // 0 and 60 on the server side). - // https://github.com/aws/aws-sdk-go/issues/2167 - presignedURLString, err := request.Presign(requestPresignParam) - if err != nil { - return Token{}, err - } - - // Set token expiration to 1 minute before the presigned URL expires for some cushion - tokenExpiration := time.Now().Local().Add(presignedURLExpiration - 1*time.Minute) - // TODO: this may need to be a constant-time base64 encoding - return Token{v1Prefix + base64.RawURLEncoding.EncodeToString([]byte(presignedURLString)), tokenExpiration}, nil -} - -// FormatJSON formats the json to support ExecCredential authentication -func (g generator) FormatJSON(token Token) string { - expirationTimestamp := metav1.NewTime(token.Expiration) - execInput := &clientauthv1alpha1.ExecCredential{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "client.authentication.k8s.io/v1alpha1", - Kind: "ExecCredential", - }, - Status: &clientauthv1alpha1.ExecCredentialStatus{ - ExpirationTimestamp: &expirationTimestamp, - Token: token.Token, - }, - } - enc, _ := json.Marshal(execInput) - return string(enc) -} - -// Verifier validates tokens by calling STS and returning the associated identity. -type Verifier interface { - Verify(token string) (*Identity, error) -} - -type tokenVerifier struct { - client *http.Client - clusterID string -} - -// NewVerifier creates a Verifier that is bound to the clusterID and uses the default http client. -func NewVerifier(clusterID string) Verifier { - return tokenVerifier{ - client: http.DefaultClient, - clusterID: clusterID, - } -} - -// Verify a token is valid for the specified clusterID. On success, returns an -// Identity that contains information about the AWS principal that created the -// token. On failure, returns nil and a non-nil error. -func (v tokenVerifier) Verify(token string) (*Identity, error) { - if len(token) > maxTokenLenBytes { - return nil, FormatError{"token is too large"} - } - - if !strings.HasPrefix(token, v1Prefix) { - return nil, FormatError{fmt.Sprintf("token is missing expected %q prefix", v1Prefix)} - } - - // TODO: this may need to be a constant-time base64 decoding - tokenBytes, err := base64.RawURLEncoding.DecodeString(strings.TrimPrefix(token, v1Prefix)) - if err != nil { - return nil, FormatError{err.Error()} - } - - parsedURL, err := url.Parse(string(tokenBytes)) - if err != nil { - return nil, FormatError{err.Error()} - } - - if parsedURL.Scheme != "https" { - return nil, FormatError{fmt.Sprintf("unexpected scheme %q in pre-signed URL", parsedURL.Scheme)} - } - - if parsedURL.Host != "sts.amazonaws.com" { - return nil, FormatError{"unexpected hostname in pre-signed URL"} - } - - if parsedURL.Path != "/" { - return nil, FormatError{"unexpected path in pre-signed URL"} - } - - queryParamsLower := make(url.Values) - queryParams := parsedURL.Query() - for key, values := range queryParams { - if !parameterWhitelist[strings.ToLower(key)] { - return nil, FormatError{fmt.Sprintf("non-whitelisted query parameter %q", key)} - } - if len(values) != 1 { - return nil, FormatError{"query parameter with multiple values not supported"} - } - queryParamsLower.Set(strings.ToLower(key), values[0]) - } - - if queryParamsLower.Get("action") != "GetCallerIdentity" { - return nil, FormatError{"unexpected action parameter in pre-signed URL"} - } - - if !hasSignedClusterIDHeader(&queryParamsLower) { - return nil, FormatError{fmt.Sprintf("client did not sign the %s header in the pre-signed URL", clusterIDHeader)} - } - - // We validate x-amz-expires is between 0 and 15 minutes (900 seconds) although currently pre-signed STS URLs, and - // therefore tokens, expire exactly 15 minutes after the x-amz-date header, regardless of x-amz-expires. - expires, err := strconv.Atoi(queryParamsLower.Get("x-amz-expires")) - if err != nil || expires < 0 || expires > 900 { - return nil, FormatError{fmt.Sprintf("invalid X-Amz-Expires parameter in pre-signed URL: %d", expires)} - } - - date := queryParamsLower.Get("x-amz-date") - if date == "" { - return nil, FormatError{"X-Amz-Date parameter must be present in pre-signed URL"} - } - - dateParam, err := time.Parse(dateHeaderFormat, date) - if err != nil { - return nil, FormatError{fmt.Sprintf("error parsing X-Amz-Date parameter %s into format %s: %s", date, dateHeaderFormat, err.Error())} - } - - now := time.Now() - expiration := dateParam.Add(presignedURLExpiration) - if now.After(expiration) { - return nil, FormatError{fmt.Sprintf("X-Amz-Date parameter is expired (%.f minute expiration) %s", presignedURLExpiration.Minutes(), dateParam)} - } - - req, err := http.NewRequest("GET", parsedURL.String(), nil) - req.Header.Set(clusterIDHeader, v.clusterID) - req.Header.Set("accept", "application/json") - - response, err := v.client.Do(req) - if err != nil { - // special case to avoid printing the full URL if possible - if urlErr, ok := err.(*url.Error); ok { - return nil, NewSTSError(fmt.Sprintf("error during GET: %v", urlErr.Err)) - } - return nil, NewSTSError(fmt.Sprintf("error during GET: %v", err)) - } - defer response.Body.Close() - - if response.StatusCode != 200 { - return nil, NewSTSError(fmt.Sprintf("error from AWS (expected 200, got %d)", response.StatusCode)) - } - - responseBody, err := ioutil.ReadAll(response.Body) - if err != nil { - return nil, NewSTSError(fmt.Sprintf("error reading HTTP result: %v", err)) - } - - var callerIdentity getCallerIdentityWrapper - err = json.Unmarshal(responseBody, &callerIdentity) - if err != nil { - return nil, NewSTSError(err.Error()) - } - - // parse the response into an Identity - id := &Identity{ - ARN: callerIdentity.GetCallerIdentityResponse.GetCallerIdentityResult.Arn, - AccountID: callerIdentity.GetCallerIdentityResponse.GetCallerIdentityResult.Account, - } - id.CanonicalARN, err = arn.Canonicalize(id.ARN) - if err != nil { - return nil, NewSTSError(err.Error()) - } - - // The user ID is either UserID:SessionName (for assumed roles) or just - // UserID (for IAM User principals). - userIDParts := strings.Split(callerIdentity.GetCallerIdentityResponse.GetCallerIdentityResult.UserID, ":") - if len(userIDParts) == 2 { - id.UserID = userIDParts[0] - id.SessionName = userIDParts[1] - } else if len(userIDParts) == 1 { - id.UserID = userIDParts[0] - } else { - return nil, STSError{fmt.Sprintf( - "malformed UserID %q", - callerIdentity.GetCallerIdentityResponse.GetCallerIdentityResult.UserID)} - } - - return id, nil -} - -func hasSignedClusterIDHeader(paramsLower *url.Values) bool { - signedHeaders := strings.Split(paramsLower.Get("x-amz-signedheaders"), ";") - for _, hdr := range signedHeaders { - if strings.ToLower(hdr) == strings.ToLower(clusterIDHeader) { - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/LICENSE b/vendor/github.com/terraform-providers/terraform-provider-aws/LICENSE deleted file mode 100644 index a612ad981..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/autoscaling_tags.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/autoscaling_tags.go deleted file mode 100644 index c63d1623f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/autoscaling_tags.go +++ /dev/null @@ -1,288 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "regexp" - "strconv" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" -) - -// autoscalingTagSchema returns the schema to use for the tag element. -func autoscalingTagSchema() *schema.Schema { - return &schema.Schema{ - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key": { - Type: schema.TypeString, - Required: true, - }, - - "value": { - Type: schema.TypeString, - Required: true, - }, - - "propagate_at_launch": { - Type: schema.TypeBool, - Required: true, - }, - }, - }, - Set: autoscalingTagToHash, - } -} - -func autoscalingTagToHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["key"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["value"].(string))) - buf.WriteString(fmt.Sprintf("%t-", m["propagate_at_launch"].(bool))) - - return hashcode.String(buf.String()) -} - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tag" -func setAutoscalingTags(conn *autoscaling.AutoScaling, d *schema.ResourceData) error { - resourceID := d.Get("name").(string) - var createTags, removeTags []*autoscaling.Tag - - if d.HasChange("tag") || d.HasChange("tags") { - oraw, nraw := d.GetChange("tag") - o := setToMapByKey(oraw.(*schema.Set)) - n := setToMapByKey(nraw.(*schema.Set)) - - old, err := autoscalingTagsFromMap(o, resourceID) - if err != nil { - return err - } - - new, err := autoscalingTagsFromMap(n, resourceID) - if err != nil { - return err - } - - c, r, err := diffAutoscalingTags(old, new, resourceID) - if err != nil { - return err - } - - createTags = append(createTags, c...) - removeTags = append(removeTags, r...) - - oraw, nraw = d.GetChange("tags") - old, err = autoscalingTagsFromList(oraw.([]interface{}), resourceID) - if err != nil { - return err - } - - new, err = autoscalingTagsFromList(nraw.([]interface{}), resourceID) - if err != nil { - return err - } - - c, r, err = diffAutoscalingTags(old, new, resourceID) - if err != nil { - return err - } - - createTags = append(createTags, c...) - removeTags = append(removeTags, r...) - } - - // Set tags - if len(removeTags) > 0 { - log.Printf("[DEBUG] Removing autoscaling tags: %#v", removeTags) - - remove := autoscaling.DeleteTagsInput{ - Tags: removeTags, - } - - if _, err := conn.DeleteTags(&remove); err != nil { - return err - } - } - - if len(createTags) > 0 { - log.Printf("[DEBUG] Creating autoscaling tags: %#v", createTags) - - create := autoscaling.CreateOrUpdateTagsInput{ - Tags: createTags, - } - - if _, err := conn.CreateOrUpdateTags(&create); 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 diffAutoscalingTags(oldTags, newTags []*autoscaling.Tag, resourceID string) ([]*autoscaling.Tag, []*autoscaling.Tag, error) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - tag := map[string]interface{}{ - "key": *t.Key, - "value": *t.Value, - "propagate_at_launch": *t.PropagateAtLaunch, - } - create[*t.Key] = tag - } - - // Build the list of what to remove - var remove []*autoscaling.Tag - for _, t := range oldTags { - old, ok := create[*t.Key].(map[string]interface{}) - - if !ok || old["value"] != *t.Value || old["propagate_at_launch"] != *t.PropagateAtLaunch { - // Delete it! - remove = append(remove, t) - } - } - - createTags, err := autoscalingTagsFromMap(create, resourceID) - if err != nil { - return nil, nil, err - } - - return createTags, remove, nil -} - -func autoscalingTagsFromList(vs []interface{}, resourceID string) ([]*autoscaling.Tag, error) { - result := make([]*autoscaling.Tag, 0, len(vs)) - for _, tag := range vs { - attr, ok := tag.(map[string]interface{}) - if !ok { - continue - } - - t, err := autoscalingTagFromMap(attr, resourceID) - if err != nil { - return nil, err - } - - if t != nil { - result = append(result, t) - } - } - return result, nil -} - -// tagsFromMap returns the tags for the given map of data. -func autoscalingTagsFromMap(m map[string]interface{}, resourceID string) ([]*autoscaling.Tag, error) { - result := make([]*autoscaling.Tag, 0, len(m)) - for _, v := range m { - attr, ok := v.(map[string]interface{}) - if !ok { - continue - } - - t, err := autoscalingTagFromMap(attr, resourceID) - if err != nil { - return nil, err - } - - if t != nil { - result = append(result, t) - } - } - - return result, nil -} - -func autoscalingTagFromMap(attr map[string]interface{}, resourceID string) (*autoscaling.Tag, error) { - if _, ok := attr["key"]; !ok { - return nil, fmt.Errorf("%s: invalid tag attributes: key missing", resourceID) - } - - if _, ok := attr["value"]; !ok { - return nil, fmt.Errorf("%s: invalid tag attributes: value missing", resourceID) - } - - if _, ok := attr["propagate_at_launch"]; !ok { - return nil, fmt.Errorf("%s: invalid tag attributes: propagate_at_launch missing", resourceID) - } - - var propagateAtLaunch bool - var err error - - if v, ok := attr["propagate_at_launch"].(bool); ok { - propagateAtLaunch = v - } - - if v, ok := attr["propagate_at_launch"].(string); ok { - if propagateAtLaunch, err = strconv.ParseBool(v); err != nil { - return nil, fmt.Errorf( - "%s: invalid tag attribute: invalid value for propagate_at_launch: %s", - resourceID, - v, - ) - } - } - - t := &autoscaling.Tag{ - Key: aws.String(attr["key"].(string)), - Value: aws.String(attr["value"].(string)), - PropagateAtLaunch: aws.Bool(propagateAtLaunch), - ResourceId: aws.String(resourceID), - ResourceType: aws.String("auto-scaling-group"), - } - - if tagIgnoredAutoscaling(t) { - return nil, nil - } - - return t, nil -} - -// autoscalingTagDescriptionsToSlice turns the list of tags into a slice. -func autoscalingTagDescriptionsToSlice(ts []*autoscaling.TagDescription) []map[string]interface{} { - tags := make([]map[string]interface{}, 0, len(ts)) - for _, t := range ts { - tags = append(tags, map[string]interface{}{ - "key": *t.Key, - "value": *t.Value, - "propagate_at_launch": *t.PropagateAtLaunch, - }) - } - - return tags -} - -func setToMapByKey(s *schema.Set) map[string]interface{} { - result := make(map[string]interface{}) - for _, rawData := range s.List() { - data := rawData.(map[string]interface{}) - result[data["key"].(string)] = data - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredAutoscaling(t *autoscaling.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go deleted file mode 100644 index 7c944b923..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go +++ /dev/null @@ -1,73 +0,0 @@ -package aws - -import ( - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/hashicorp/terraform/helper/resource" -) - -// Returns true if the error matches all these conditions: -// * err is of type awserr.Error -// * Error.Code() matches code -// * Error.Message() contains message -func isAWSErr(err error, code string, message string) bool { - if err, ok := err.(awserr.Error); ok { - return err.Code() == code && strings.Contains(err.Message(), message) - } - return false -} - -// IsAWSErrExtended returns true if the error matches all conditions -// * err is of type awserr.Error -// * Error.Code() matches code -// * Error.Message() contains message -// * Error.OrigErr() contains origErrMessage -// Note: This function will be moved out of the aws package in the future. -func IsAWSErrExtended(err error, code string, message string, origErrMessage string) bool { - if !isAWSErr(err, code, message) { - return false - } - return strings.Contains(err.(awserr.Error).OrigErr().Error(), origErrMessage) -} - -func retryOnAwsCode(code string, f func() (interface{}, error)) (interface{}, error) { - var resp interface{} - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - resp, err = f() - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == code { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - return resp, err -} - -// RetryOnAwsCodes retries AWS error codes for one minute -// Note: This function will be moved out of the aws package in the future. -func RetryOnAwsCodes(codes []string, f func() (interface{}, error)) (interface{}, error) { - var resp interface{} - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - resp, err = f() - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok { - for _, code := range codes { - if awsErr.Code() == code { - return resource.RetryableError(err) - } - } - } - return resource.NonRetryableError(err) - } - return nil - }) - return resp, err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go deleted file mode 100644 index f22141895..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go +++ /dev/null @@ -1,1290 +0,0 @@ -// CloudFront DistributionConfig structure helpers. -// -// These functions assist in pulling in data from Terraform resource -// configuration for the aws_cloudfront_distribution resource, as there are -// several sub-fields that require their own data type, and do not necessarily -// 1-1 translate to resource configuration. - -package aws - -import ( - "bytes" - "fmt" - "reflect" - "sort" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudfront" - "github.com/hashicorp/terraform/flatmap" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" -) - -// cloudFrontRoute53ZoneID defines the route 53 zone ID for CloudFront. This -// is used to set the zone_id attribute. -const cloudFrontRoute53ZoneID = "Z2FDTNDATAQYW2" - -// Define Sort interface for []*string so we can ensure the order of -// geo_restrictions.locations -type StringPtrSlice []*string - -func (p StringPtrSlice) Len() int { return len(p) } -func (p StringPtrSlice) Less(i, j int) bool { return *p[i] < *p[j] } -func (p StringPtrSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -// Assemble the *cloudfront.DistributionConfig variable. Calls out to various -// expander functions to convert attributes and sub-attributes to the various -// complex structures which are necessary to properly build the -// DistributionConfig structure. -// -// Used by the aws_cloudfront_distribution Create and Update functions. -func expandDistributionConfig(d *schema.ResourceData) *cloudfront.DistributionConfig { - distributionConfig := &cloudfront.DistributionConfig{ - CustomErrorResponses: expandCustomErrorResponses(d.Get("custom_error_response").(*schema.Set)), - DefaultCacheBehavior: expandDefaultCacheBehavior(d.Get("default_cache_behavior").(*schema.Set).List()[0].(map[string]interface{})), - Enabled: aws.Bool(d.Get("enabled").(bool)), - IsIPV6Enabled: aws.Bool(d.Get("is_ipv6_enabled").(bool)), - HttpVersion: aws.String(d.Get("http_version").(string)), - Origins: expandOrigins(d.Get("origin").(*schema.Set)), - PriceClass: aws.String(d.Get("price_class").(string)), - } - if v, ok := d.GetOk("ordered_cache_behavior"); ok { - distributionConfig.CacheBehaviors = expandCacheBehaviors(v.([]interface{})) - } else { - distributionConfig.CacheBehaviors = expandCacheBehaviorsDeprecated(d.Get("cache_behavior").(*schema.Set)) - } - // This sets CallerReference if it's still pending computation (ie: new resource) - if v, ok := d.GetOk("caller_reference"); !ok { - distributionConfig.CallerReference = aws.String(time.Now().Format(time.RFC3339Nano)) - } else { - distributionConfig.CallerReference = aws.String(v.(string)) - } - if v, ok := d.GetOk("comment"); ok { - distributionConfig.Comment = aws.String(v.(string)) - } else { - distributionConfig.Comment = aws.String("") - } - if v, ok := d.GetOk("default_root_object"); ok { - distributionConfig.DefaultRootObject = aws.String(v.(string)) - } else { - distributionConfig.DefaultRootObject = aws.String("") - } - if v, ok := d.GetOk("logging_config"); ok { - distributionConfig.Logging = expandLoggingConfig(v.(*schema.Set).List()[0].(map[string]interface{})) - } else { - distributionConfig.Logging = expandLoggingConfig(nil) - } - if v, ok := d.GetOk("aliases"); ok { - distributionConfig.Aliases = expandAliases(v.(*schema.Set)) - } else { - distributionConfig.Aliases = expandAliases(schema.NewSet(aliasesHash, []interface{}{})) - } - if v, ok := d.GetOk("restrictions"); ok { - distributionConfig.Restrictions = expandRestrictions(v.(*schema.Set).List()[0].(map[string]interface{})) - } - if v, ok := d.GetOk("viewer_certificate"); ok { - distributionConfig.ViewerCertificate = expandViewerCertificate(v.(*schema.Set).List()[0].(map[string]interface{})) - } - if v, ok := d.GetOk("web_acl_id"); ok { - distributionConfig.WebACLId = aws.String(v.(string)) - } else { - distributionConfig.WebACLId = aws.String("") - } - - return distributionConfig -} - -// Unpack the *cloudfront.DistributionConfig variable and set resource data. -// Calls out to flatten functions to convert the DistributionConfig -// sub-structures to their respective attributes in the -// aws_cloudfront_distribution resource. -// -// Used by the aws_cloudfront_distribution Read function. -func flattenDistributionConfig(d *schema.ResourceData, distributionConfig *cloudfront.DistributionConfig) error { - var err error - - d.Set("enabled", distributionConfig.Enabled) - d.Set("is_ipv6_enabled", distributionConfig.IsIPV6Enabled) - d.Set("price_class", distributionConfig.PriceClass) - d.Set("hosted_zone_id", cloudFrontRoute53ZoneID) - - err = d.Set("default_cache_behavior", flattenDefaultCacheBehavior(distributionConfig.DefaultCacheBehavior)) - if err != nil { - return err - } - err = d.Set("viewer_certificate", flattenViewerCertificate(distributionConfig.ViewerCertificate)) - if err != nil { - return err - } - - if distributionConfig.CallerReference != nil { - d.Set("caller_reference", distributionConfig.CallerReference) - } - if distributionConfig.Comment != nil { - if *distributionConfig.Comment != "" { - d.Set("comment", distributionConfig.Comment) - } - } - if distributionConfig.DefaultRootObject != nil { - d.Set("default_root_object", distributionConfig.DefaultRootObject) - } - if distributionConfig.HttpVersion != nil { - d.Set("http_version", distributionConfig.HttpVersion) - } - if distributionConfig.WebACLId != nil { - d.Set("web_acl_id", distributionConfig.WebACLId) - } - - if distributionConfig.CustomErrorResponses != nil { - err = d.Set("custom_error_response", flattenCustomErrorResponses(distributionConfig.CustomErrorResponses)) - if err != nil { - return err - } - } - if distributionConfig.CacheBehaviors != nil { - if _, ok := d.GetOk("cache_behavior"); ok { - err = d.Set("cache_behavior", flattenCacheBehaviorsDeprecated(distributionConfig.CacheBehaviors)) - } else { - err = d.Set("ordered_cache_behavior", flattenCacheBehaviors(distributionConfig.CacheBehaviors)) - } - - if err != nil { - return err - } - } - - if distributionConfig.Logging != nil && *distributionConfig.Logging.Enabled { - err = d.Set("logging_config", flattenLoggingConfig(distributionConfig.Logging)) - } else { - err = d.Set("logging_config", schema.NewSet(loggingConfigHash, []interface{}{})) - } - if err != nil { - return err - } - - if distributionConfig.Aliases != nil { - err = d.Set("aliases", flattenAliases(distributionConfig.Aliases)) - if err != nil { - return err - } - } - if distributionConfig.Restrictions != nil { - err = d.Set("restrictions", flattenRestrictions(distributionConfig.Restrictions)) - if err != nil { - return err - } - } - if *distributionConfig.Origins.Quantity > 0 { - err = d.Set("origin", flattenOrigins(distributionConfig.Origins)) - if err != nil { - return err - } - } - - return nil -} - -func expandDefaultCacheBehavior(m map[string]interface{}) *cloudfront.DefaultCacheBehavior { - cb := expandCacheBehaviorDeprecated(m) - var dcb cloudfront.DefaultCacheBehavior - - simpleCopyStruct(cb, &dcb) - return &dcb -} - -func flattenDefaultCacheBehavior(dcb *cloudfront.DefaultCacheBehavior) *schema.Set { - var cb cloudfront.CacheBehavior - - simpleCopyStruct(dcb, &cb) - m := flattenCacheBehaviorDeprecated(&cb) - return schema.NewSet(defaultCacheBehaviorHash, []interface{}{m}) -} - -// Assemble the hash for the aws_cloudfront_distribution default_cache_behavior -// TypeSet attribute. -func defaultCacheBehaviorHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%t-", m["compress"].(bool))) - buf.WriteString(fmt.Sprintf("%s-", m["viewer_protocol_policy"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["target_origin_id"].(string))) - buf.WriteString(fmt.Sprintf("%d-", forwardedValuesHash(m["forwarded_values"].(*schema.Set).List()[0].(map[string]interface{})))) - buf.WriteString(fmt.Sprintf("%d-", m["min_ttl"].(int))) - if d, ok := m["field_level_encryption_id"]; ok && d.(string) != "" { - buf.WriteString(fmt.Sprintf("%s-", d.(string))) - } - if d, ok := m["trusted_signers"]; ok { - for _, e := range sortInterfaceSlice(d.([]interface{})) { - buf.WriteString(fmt.Sprintf("%s-", e.(string))) - } - } - if d, ok := m["max_ttl"]; ok { - buf.WriteString(fmt.Sprintf("%d-", d.(int))) - } - if d, ok := m["smooth_streaming"]; ok { - buf.WriteString(fmt.Sprintf("%t-", d.(bool))) - } - if d, ok := m["default_ttl"]; ok { - buf.WriteString(fmt.Sprintf("%d-", d.(int))) - } - if d, ok := m["allowed_methods"]; ok { - for _, e := range sortInterfaceSlice(d.([]interface{})) { - buf.WriteString(fmt.Sprintf("%s-", e.(string))) - } - } - if d, ok := m["cached_methods"]; ok { - for _, e := range sortInterfaceSlice(d.([]interface{})) { - buf.WriteString(fmt.Sprintf("%s-", e.(string))) - } - } - if d, ok := m["lambda_function_association"]; ok { - var associations []interface{} - switch d.(type) { - case *schema.Set: - associations = d.(*schema.Set).List() - default: - associations = d.([]interface{}) - } - for _, lfa := range associations { - buf.WriteString(fmt.Sprintf("%d-", lambdaFunctionAssociationHash(lfa.(map[string]interface{})))) - } - } - return hashcode.String(buf.String()) -} - -func expandCacheBehaviorsDeprecated(s *schema.Set) *cloudfront.CacheBehaviors { - var qty int64 - var items []*cloudfront.CacheBehavior - for _, v := range s.List() { - items = append(items, expandCacheBehaviorDeprecated(v.(map[string]interface{}))) - qty++ - } - return &cloudfront.CacheBehaviors{ - Quantity: aws.Int64(qty), - Items: items, - } -} - -func flattenCacheBehaviorsDeprecated(cbs *cloudfront.CacheBehaviors) *schema.Set { - s := []interface{}{} - for _, v := range cbs.Items { - s = append(s, flattenCacheBehaviorDeprecated(v)) - } - return schema.NewSet(cacheBehaviorHash, s) -} - -func expandCacheBehaviors(lst []interface{}) *cloudfront.CacheBehaviors { - var qty int64 - var items []*cloudfront.CacheBehavior - for _, v := range lst { - items = append(items, expandCacheBehavior(v.(map[string]interface{}))) - qty++ - } - return &cloudfront.CacheBehaviors{ - Quantity: aws.Int64(qty), - Items: items, - } -} - -func flattenCacheBehaviors(cbs *cloudfront.CacheBehaviors) []interface{} { - lst := []interface{}{} - for _, v := range cbs.Items { - lst = append(lst, flattenCacheBehavior(v)) - } - return lst -} - -// Deprecated. -func expandCacheBehaviorDeprecated(m map[string]interface{}) *cloudfront.CacheBehavior { - cb := &cloudfront.CacheBehavior{ - Compress: aws.Bool(m["compress"].(bool)), - FieldLevelEncryptionId: aws.String(m["field_level_encryption_id"].(string)), - ViewerProtocolPolicy: aws.String(m["viewer_protocol_policy"].(string)), - TargetOriginId: aws.String(m["target_origin_id"].(string)), - ForwardedValues: expandForwardedValues(m["forwarded_values"].(*schema.Set).List()[0].(map[string]interface{})), - DefaultTTL: aws.Int64(int64(m["default_ttl"].(int))), - MaxTTL: aws.Int64(int64(m["max_ttl"].(int))), - MinTTL: aws.Int64(int64(m["min_ttl"].(int))), - } - - if v, ok := m["trusted_signers"]; ok { - cb.TrustedSigners = expandTrustedSigners(v.([]interface{})) - } else { - cb.TrustedSigners = expandTrustedSigners([]interface{}{}) - } - - if v, ok := m["lambda_function_association"]; ok { - cb.LambdaFunctionAssociations = expandLambdaFunctionAssociations(v.(*schema.Set).List()) - } - - if v, ok := m["smooth_streaming"]; ok { - cb.SmoothStreaming = aws.Bool(v.(bool)) - } - if v, ok := m["allowed_methods"]; ok { - cb.AllowedMethods = expandAllowedMethodsDeprecated(v.([]interface{})) - } - if v, ok := m["cached_methods"]; ok { - cb.AllowedMethods.CachedMethods = expandCachedMethodsDeprecated(v.([]interface{})) - } - if v, ok := m["path_pattern"]; ok { - cb.PathPattern = aws.String(v.(string)) - } - return cb -} - -func expandCacheBehavior(m map[string]interface{}) *cloudfront.CacheBehavior { - cb := &cloudfront.CacheBehavior{ - Compress: aws.Bool(m["compress"].(bool)), - FieldLevelEncryptionId: aws.String(m["field_level_encryption_id"].(string)), - ViewerProtocolPolicy: aws.String(m["viewer_protocol_policy"].(string)), - TargetOriginId: aws.String(m["target_origin_id"].(string)), - ForwardedValues: expandForwardedValues(m["forwarded_values"].(*schema.Set).List()[0].(map[string]interface{})), - DefaultTTL: aws.Int64(int64(m["default_ttl"].(int))), - MaxTTL: aws.Int64(int64(m["max_ttl"].(int))), - MinTTL: aws.Int64(int64(m["min_ttl"].(int))), - } - - if v, ok := m["trusted_signers"]; ok { - cb.TrustedSigners = expandTrustedSigners(v.([]interface{})) - } else { - cb.TrustedSigners = expandTrustedSigners([]interface{}{}) - } - - if v, ok := m["lambda_function_association"]; ok { - cb.LambdaFunctionAssociations = expandLambdaFunctionAssociations(v.(*schema.Set).List()) - } - - if v, ok := m["smooth_streaming"]; ok { - cb.SmoothStreaming = aws.Bool(v.(bool)) - } - if v, ok := m["allowed_methods"]; ok { - cb.AllowedMethods = expandAllowedMethods(v.(*schema.Set)) - } - if v, ok := m["cached_methods"]; ok { - cb.AllowedMethods.CachedMethods = expandCachedMethods(v.(*schema.Set)) - } - if v, ok := m["path_pattern"]; ok { - cb.PathPattern = aws.String(v.(string)) - } - return cb -} - -func flattenCacheBehaviorDeprecated(cb *cloudfront.CacheBehavior) map[string]interface{} { - m := make(map[string]interface{}) - - m["compress"] = *cb.Compress - m["field_level_encryption_id"] = aws.StringValue(cb.FieldLevelEncryptionId) - m["viewer_protocol_policy"] = *cb.ViewerProtocolPolicy - m["target_origin_id"] = *cb.TargetOriginId - m["forwarded_values"] = schema.NewSet(forwardedValuesHash, []interface{}{flattenForwardedValues(cb.ForwardedValues)}) - m["min_ttl"] = int(*cb.MinTTL) - - if len(cb.TrustedSigners.Items) > 0 { - m["trusted_signers"] = flattenTrustedSigners(cb.TrustedSigners) - } - if len(cb.LambdaFunctionAssociations.Items) > 0 { - m["lambda_function_association"] = flattenLambdaFunctionAssociations(cb.LambdaFunctionAssociations) - } - if cb.MaxTTL != nil { - m["max_ttl"] = int(*cb.MaxTTL) - } - if cb.SmoothStreaming != nil { - m["smooth_streaming"] = *cb.SmoothStreaming - } - if cb.DefaultTTL != nil { - m["default_ttl"] = int(*cb.DefaultTTL) - } - if cb.AllowedMethods != nil { - m["allowed_methods"] = flattenAllowedMethodsDeprecated(cb.AllowedMethods) - } - if cb.AllowedMethods.CachedMethods != nil { - m["cached_methods"] = flattenCachedMethodsDeprecated(cb.AllowedMethods.CachedMethods) - } - if cb.PathPattern != nil { - m["path_pattern"] = *cb.PathPattern - } - return m -} - -func flattenCacheBehavior(cb *cloudfront.CacheBehavior) map[string]interface{} { - m := make(map[string]interface{}) - - m["compress"] = *cb.Compress - m["field_level_encryption_id"] = aws.StringValue(cb.FieldLevelEncryptionId) - m["viewer_protocol_policy"] = *cb.ViewerProtocolPolicy - m["target_origin_id"] = *cb.TargetOriginId - m["forwarded_values"] = schema.NewSet(forwardedValuesHash, []interface{}{flattenForwardedValues(cb.ForwardedValues)}) - m["min_ttl"] = int(*cb.MinTTL) - - if len(cb.TrustedSigners.Items) > 0 { - m["trusted_signers"] = flattenTrustedSigners(cb.TrustedSigners) - } - if len(cb.LambdaFunctionAssociations.Items) > 0 { - m["lambda_function_association"] = flattenLambdaFunctionAssociations(cb.LambdaFunctionAssociations) - } - if cb.MaxTTL != nil { - m["max_ttl"] = int(*cb.MaxTTL) - } - if cb.SmoothStreaming != nil { - m["smooth_streaming"] = *cb.SmoothStreaming - } - if cb.DefaultTTL != nil { - m["default_ttl"] = int(*cb.DefaultTTL) - } - if cb.AllowedMethods != nil { - m["allowed_methods"] = flattenAllowedMethods(cb.AllowedMethods) - } - if cb.AllowedMethods.CachedMethods != nil { - m["cached_methods"] = flattenCachedMethods(cb.AllowedMethods.CachedMethods) - } - if cb.PathPattern != nil { - m["path_pattern"] = *cb.PathPattern - } - return m -} - -// Assemble the hash for the aws_cloudfront_distribution cache_behavior -// TypeSet attribute. -func cacheBehaviorHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%t-", m["compress"].(bool))) - buf.WriteString(fmt.Sprintf("%s-", m["viewer_protocol_policy"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["target_origin_id"].(string))) - buf.WriteString(fmt.Sprintf("%d-", forwardedValuesHash(m["forwarded_values"].(*schema.Set).List()[0].(map[string]interface{})))) - buf.WriteString(fmt.Sprintf("%d-", m["min_ttl"].(int))) - if d, ok := m["field_level_encryption_id"]; ok && d.(string) != "" { - buf.WriteString(fmt.Sprintf("%s-", d.(string))) - } - if d, ok := m["trusted_signers"]; ok { - for _, e := range sortInterfaceSlice(d.([]interface{})) { - buf.WriteString(fmt.Sprintf("%s-", e.(string))) - } - } - if d, ok := m["max_ttl"]; ok { - buf.WriteString(fmt.Sprintf("%d-", d.(int))) - } - if d, ok := m["smooth_streaming"]; ok { - buf.WriteString(fmt.Sprintf("%t-", d.(bool))) - } - if d, ok := m["default_ttl"]; ok { - buf.WriteString(fmt.Sprintf("%d-", d.(int))) - } - if d, ok := m["allowed_methods"]; ok { - for _, e := range sortInterfaceSlice(d.([]interface{})) { - buf.WriteString(fmt.Sprintf("%s-", e.(string))) - } - } - if d, ok := m["cached_methods"]; ok { - for _, e := range sortInterfaceSlice(d.([]interface{})) { - buf.WriteString(fmt.Sprintf("%s-", e.(string))) - } - } - if d, ok := m["path_pattern"]; ok { - buf.WriteString(fmt.Sprintf("%s-", d)) - } - if d, ok := m["lambda_function_association"]; ok { - var associations []interface{} - switch d.(type) { - case *schema.Set: - associations = d.(*schema.Set).List() - default: - associations = d.([]interface{}) - } - for _, lfa := range associations { - buf.WriteString(fmt.Sprintf("%d-", lambdaFunctionAssociationHash(lfa.(map[string]interface{})))) - } - } - return hashcode.String(buf.String()) -} - -func expandTrustedSigners(s []interface{}) *cloudfront.TrustedSigners { - var ts cloudfront.TrustedSigners - if len(s) > 0 { - ts.Quantity = aws.Int64(int64(len(s))) - ts.Items = expandStringList(s) - ts.Enabled = aws.Bool(true) - } else { - ts.Quantity = aws.Int64(0) - ts.Enabled = aws.Bool(false) - } - return &ts -} - -func flattenTrustedSigners(ts *cloudfront.TrustedSigners) []interface{} { - if ts.Items != nil { - return flattenStringList(ts.Items) - } - return []interface{}{} -} - -func lambdaFunctionAssociationHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["event_type"].(string))) - buf.WriteString(m["lambda_arn"].(string)) - buf.WriteString(fmt.Sprintf("%t", m["include_body"].(bool))) - return hashcode.String(buf.String()) -} - -func expandLambdaFunctionAssociations(v interface{}) *cloudfront.LambdaFunctionAssociations { - if v == nil { - return &cloudfront.LambdaFunctionAssociations{ - Quantity: aws.Int64(0), - } - } - - s := v.([]interface{}) - var lfa cloudfront.LambdaFunctionAssociations - lfa.Quantity = aws.Int64(int64(len(s))) - lfa.Items = make([]*cloudfront.LambdaFunctionAssociation, len(s)) - for i, lf := range s { - lfa.Items[i] = expandLambdaFunctionAssociation(lf.(map[string]interface{})) - } - return &lfa -} - -func expandLambdaFunctionAssociation(lf map[string]interface{}) *cloudfront.LambdaFunctionAssociation { - var lfa cloudfront.LambdaFunctionAssociation - if v, ok := lf["event_type"]; ok { - lfa.EventType = aws.String(v.(string)) - } - if v, ok := lf["lambda_arn"]; ok { - lfa.LambdaFunctionARN = aws.String(v.(string)) - } - if v, ok := lf["include_body"]; ok { - lfa.IncludeBody = aws.Bool(v.(bool)) - } - return &lfa -} - -func flattenLambdaFunctionAssociations(lfa *cloudfront.LambdaFunctionAssociations) *schema.Set { - s := schema.NewSet(lambdaFunctionAssociationHash, []interface{}{}) - for _, v := range lfa.Items { - s.Add(flattenLambdaFunctionAssociation(v)) - } - return s -} - -func flattenLambdaFunctionAssociation(lfa *cloudfront.LambdaFunctionAssociation) map[string]interface{} { - m := map[string]interface{}{} - if lfa != nil { - m["event_type"] = *lfa.EventType - m["lambda_arn"] = *lfa.LambdaFunctionARN - m["include_body"] = *lfa.IncludeBody - } - return m -} - -func expandForwardedValues(m map[string]interface{}) *cloudfront.ForwardedValues { - fv := &cloudfront.ForwardedValues{ - QueryString: aws.Bool(m["query_string"].(bool)), - } - if v, ok := m["cookies"]; ok && v.(*schema.Set).Len() > 0 { - fv.Cookies = expandCookiePreference(v.(*schema.Set).List()[0].(map[string]interface{})) - } - if v, ok := m["headers"]; ok { - fv.Headers = expandHeaders(v.([]interface{})) - } - if v, ok := m["query_string_cache_keys"]; ok { - fv.QueryStringCacheKeys = expandQueryStringCacheKeys(v.([]interface{})) - } - return fv -} - -func flattenForwardedValues(fv *cloudfront.ForwardedValues) map[string]interface{} { - m := make(map[string]interface{}) - m["query_string"] = *fv.QueryString - if fv.Cookies != nil { - m["cookies"] = schema.NewSet(cookiePreferenceHash, []interface{}{flattenCookiePreference(fv.Cookies)}) - } - if fv.Headers != nil { - m["headers"] = flattenHeaders(fv.Headers) - } - if fv.QueryStringCacheKeys != nil { - m["query_string_cache_keys"] = flattenQueryStringCacheKeys(fv.QueryStringCacheKeys) - } - return m -} - -// Assemble the hash for the aws_cloudfront_distribution forwarded_values -// TypeSet attribute. -func forwardedValuesHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%t-", m["query_string"].(bool))) - if d, ok := m["cookies"]; ok && d.(*schema.Set).Len() > 0 { - buf.WriteString(fmt.Sprintf("%d-", cookiePreferenceHash(d.(*schema.Set).List()[0].(map[string]interface{})))) - } - if d, ok := m["headers"]; ok { - for _, e := range sortInterfaceSlice(d.([]interface{})) { - buf.WriteString(fmt.Sprintf("%s-", e.(string))) - } - } - if d, ok := m["query_string_cache_keys"]; ok { - for _, e := range sortInterfaceSlice(d.([]interface{})) { - buf.WriteString(fmt.Sprintf("%s-", e.(string))) - } - } - return hashcode.String(buf.String()) -} - -func expandHeaders(d []interface{}) *cloudfront.Headers { - return &cloudfront.Headers{ - Quantity: aws.Int64(int64(len(d))), - Items: expandStringList(d), - } -} - -func flattenHeaders(h *cloudfront.Headers) []interface{} { - if h.Items != nil { - return flattenStringList(h.Items) - } - return []interface{}{} -} - -func expandQueryStringCacheKeys(d []interface{}) *cloudfront.QueryStringCacheKeys { - return &cloudfront.QueryStringCacheKeys{ - Quantity: aws.Int64(int64(len(d))), - Items: expandStringList(d), - } -} - -func flattenQueryStringCacheKeys(k *cloudfront.QueryStringCacheKeys) []interface{} { - if k.Items != nil { - return flattenStringList(k.Items) - } - return []interface{}{} -} - -func expandCookiePreference(m map[string]interface{}) *cloudfront.CookiePreference { - cp := &cloudfront.CookiePreference{ - Forward: aws.String(m["forward"].(string)), - } - if v, ok := m["whitelisted_names"]; ok { - cp.WhitelistedNames = expandCookieNames(v.([]interface{})) - } - return cp -} - -func flattenCookiePreference(cp *cloudfront.CookiePreference) map[string]interface{} { - m := make(map[string]interface{}) - m["forward"] = *cp.Forward - if cp.WhitelistedNames != nil { - m["whitelisted_names"] = flattenCookieNames(cp.WhitelistedNames) - } - return m -} - -// Assemble the hash for the aws_cloudfront_distribution cookies -// TypeSet attribute. -func cookiePreferenceHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["forward"].(string))) - if d, ok := m["whitelisted_names"]; ok { - for _, e := range sortInterfaceSlice(d.([]interface{})) { - buf.WriteString(fmt.Sprintf("%s-", e.(string))) - } - } - return hashcode.String(buf.String()) -} - -func expandCookieNames(d []interface{}) *cloudfront.CookieNames { - return &cloudfront.CookieNames{ - Quantity: aws.Int64(int64(len(d))), - Items: expandStringList(d), - } -} - -func flattenCookieNames(cn *cloudfront.CookieNames) []interface{} { - if cn.Items != nil { - return flattenStringList(cn.Items) - } - return []interface{}{} -} - -func expandAllowedMethods(s *schema.Set) *cloudfront.AllowedMethods { - return &cloudfront.AllowedMethods{ - Quantity: aws.Int64(int64(s.Len())), - Items: expandStringList(s.List()), - } -} - -func flattenAllowedMethods(am *cloudfront.AllowedMethods) *schema.Set { - if am.Items != nil { - return schema.NewSet(schema.HashString, flattenStringList(am.Items)) - } - return nil -} - -func expandAllowedMethodsDeprecated(s []interface{}) *cloudfront.AllowedMethods { - return &cloudfront.AllowedMethods{ - Quantity: aws.Int64(int64(len(s))), - Items: expandStringList(s), - } -} - -func flattenAllowedMethodsDeprecated(am *cloudfront.AllowedMethods) []interface{} { - if am.Items != nil { - return flattenStringList(am.Items) - } - return []interface{}{} -} - -func expandCachedMethods(s *schema.Set) *cloudfront.CachedMethods { - return &cloudfront.CachedMethods{ - Quantity: aws.Int64(int64(s.Len())), - Items: expandStringList(s.List()), - } -} - -func flattenCachedMethods(cm *cloudfront.CachedMethods) *schema.Set { - if cm.Items != nil { - return schema.NewSet(schema.HashString, flattenStringList(cm.Items)) - } - return nil -} - -func expandCachedMethodsDeprecated(s []interface{}) *cloudfront.CachedMethods { - return &cloudfront.CachedMethods{ - Quantity: aws.Int64(int64(len(s))), - Items: expandStringList(s), - } -} - -func flattenCachedMethodsDeprecated(cm *cloudfront.CachedMethods) []interface{} { - if cm.Items != nil { - return flattenStringList(cm.Items) - } - return []interface{}{} -} - -func expandOrigins(s *schema.Set) *cloudfront.Origins { - qty := 0 - items := []*cloudfront.Origin{} - for _, v := range s.List() { - items = append(items, expandOrigin(v.(map[string]interface{}))) - qty++ - } - return &cloudfront.Origins{ - Quantity: aws.Int64(int64(qty)), - Items: items, - } -} - -func flattenOrigins(ors *cloudfront.Origins) *schema.Set { - s := []interface{}{} - for _, v := range ors.Items { - s = append(s, flattenOrigin(v)) - } - return schema.NewSet(originHash, s) -} - -func expandOrigin(m map[string]interface{}) *cloudfront.Origin { - origin := &cloudfront.Origin{ - Id: aws.String(m["origin_id"].(string)), - DomainName: aws.String(m["domain_name"].(string)), - } - if v, ok := m["custom_header"]; ok { - origin.CustomHeaders = expandCustomHeaders(v.(*schema.Set)) - } - if v, ok := m["custom_origin_config"]; ok { - if s := v.(*schema.Set).List(); len(s) > 0 { - origin.CustomOriginConfig = expandCustomOriginConfig(s[0].(map[string]interface{})) - } - } - if v, ok := m["origin_path"]; ok { - origin.OriginPath = aws.String(v.(string)) - } - if v, ok := m["s3_origin_config"]; ok { - if s := v.(*schema.Set).List(); len(s) > 0 { - origin.S3OriginConfig = expandS3OriginConfig(s[0].(map[string]interface{})) - } - } - - // if both custom and s3 origin are missing, add an empty s3 origin - // One or the other must be specified, but the S3 origin can be "empty" - if origin.S3OriginConfig == nil && origin.CustomOriginConfig == nil { - origin.S3OriginConfig = &cloudfront.S3OriginConfig{ - OriginAccessIdentity: aws.String(""), - } - } - - return origin -} - -func flattenOrigin(or *cloudfront.Origin) map[string]interface{} { - m := make(map[string]interface{}) - m["origin_id"] = *or.Id - m["domain_name"] = *or.DomainName - if or.CustomHeaders != nil { - m["custom_header"] = flattenCustomHeaders(or.CustomHeaders) - } - if or.CustomOriginConfig != nil { - m["custom_origin_config"] = schema.NewSet(customOriginConfigHash, []interface{}{flattenCustomOriginConfig(or.CustomOriginConfig)}) - } - if or.OriginPath != nil { - m["origin_path"] = *or.OriginPath - } - if or.S3OriginConfig != nil { - if or.S3OriginConfig.OriginAccessIdentity != nil && *or.S3OriginConfig.OriginAccessIdentity != "" { - m["s3_origin_config"] = schema.NewSet(s3OriginConfigHash, []interface{}{flattenS3OriginConfig(or.S3OriginConfig)}) - } - } - return m -} - -// Assemble the hash for the aws_cloudfront_distribution origin -// TypeSet attribute. -func originHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["origin_id"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["domain_name"].(string))) - if v, ok := m["custom_header"]; ok { - buf.WriteString(fmt.Sprintf("%d-", customHeadersHash(v.(*schema.Set)))) - } - if v, ok := m["custom_origin_config"]; ok { - if s := v.(*schema.Set).List(); len(s) > 0 { - buf.WriteString(fmt.Sprintf("%d-", customOriginConfigHash((s[0].(map[string]interface{}))))) - } - } - if v, ok := m["origin_path"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["s3_origin_config"]; ok { - if s := v.(*schema.Set).List(); len(s) > 0 { - buf.WriteString(fmt.Sprintf("%d-", s3OriginConfigHash((s[0].(map[string]interface{}))))) - } - } - return hashcode.String(buf.String()) -} - -func expandCustomHeaders(s *schema.Set) *cloudfront.CustomHeaders { - qty := 0 - items := []*cloudfront.OriginCustomHeader{} - for _, v := range s.List() { - items = append(items, expandOriginCustomHeader(v.(map[string]interface{}))) - qty++ - } - return &cloudfront.CustomHeaders{ - Quantity: aws.Int64(int64(qty)), - Items: items, - } -} - -func flattenCustomHeaders(chs *cloudfront.CustomHeaders) *schema.Set { - s := []interface{}{} - for _, v := range chs.Items { - s = append(s, flattenOriginCustomHeader(v)) - } - return schema.NewSet(originCustomHeaderHash, s) -} - -func expandOriginCustomHeader(m map[string]interface{}) *cloudfront.OriginCustomHeader { - return &cloudfront.OriginCustomHeader{ - HeaderName: aws.String(m["name"].(string)), - HeaderValue: aws.String(m["value"].(string)), - } -} - -func flattenOriginCustomHeader(och *cloudfront.OriginCustomHeader) map[string]interface{} { - return map[string]interface{}{ - "name": *och.HeaderName, - "value": *och.HeaderValue, - } -} - -// Helper function used by originHash to get a composite hash for all -// aws_cloudfront_distribution custom_header attributes. -func customHeadersHash(s *schema.Set) int { - var buf bytes.Buffer - for _, v := range s.List() { - buf.WriteString(fmt.Sprintf("%d-", originCustomHeaderHash(v))) - } - return hashcode.String(buf.String()) -} - -// Assemble the hash for the aws_cloudfront_distribution custom_header -// TypeSet attribute. -func originCustomHeaderHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["value"].(string))) - return hashcode.String(buf.String()) -} - -func expandCustomOriginConfig(m map[string]interface{}) *cloudfront.CustomOriginConfig { - - customOrigin := &cloudfront.CustomOriginConfig{ - OriginProtocolPolicy: aws.String(m["origin_protocol_policy"].(string)), - HTTPPort: aws.Int64(int64(m["http_port"].(int))), - HTTPSPort: aws.Int64(int64(m["https_port"].(int))), - OriginSslProtocols: expandCustomOriginConfigSSL(m["origin_ssl_protocols"].([]interface{})), - OriginReadTimeout: aws.Int64(int64(m["origin_read_timeout"].(int))), - OriginKeepaliveTimeout: aws.Int64(int64(m["origin_keepalive_timeout"].(int))), - } - - return customOrigin -} - -func flattenCustomOriginConfig(cor *cloudfront.CustomOriginConfig) map[string]interface{} { - - customOrigin := map[string]interface{}{ - "origin_protocol_policy": *cor.OriginProtocolPolicy, - "http_port": int(*cor.HTTPPort), - "https_port": int(*cor.HTTPSPort), - "origin_ssl_protocols": flattenCustomOriginConfigSSL(cor.OriginSslProtocols), - "origin_read_timeout": int(*cor.OriginReadTimeout), - "origin_keepalive_timeout": int(*cor.OriginKeepaliveTimeout), - } - - return customOrigin -} - -// Assemble the hash for the aws_cloudfront_distribution custom_origin_config -// TypeSet attribute. -func customOriginConfigHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["origin_protocol_policy"].(string))) - buf.WriteString(fmt.Sprintf("%d-", m["http_port"].(int))) - buf.WriteString(fmt.Sprintf("%d-", m["https_port"].(int))) - for _, v := range sortInterfaceSlice(m["origin_ssl_protocols"].([]interface{})) { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - buf.WriteString(fmt.Sprintf("%d-", m["origin_keepalive_timeout"].(int))) - buf.WriteString(fmt.Sprintf("%d-", m["origin_read_timeout"].(int))) - - return hashcode.String(buf.String()) -} - -func expandCustomOriginConfigSSL(s []interface{}) *cloudfront.OriginSslProtocols { - items := expandStringList(s) - return &cloudfront.OriginSslProtocols{ - Quantity: aws.Int64(int64(len(items))), - Items: items, - } -} - -func flattenCustomOriginConfigSSL(osp *cloudfront.OriginSslProtocols) []interface{} { - return flattenStringList(osp.Items) -} - -func expandS3OriginConfig(m map[string]interface{}) *cloudfront.S3OriginConfig { - return &cloudfront.S3OriginConfig{ - OriginAccessIdentity: aws.String(m["origin_access_identity"].(string)), - } -} - -func flattenS3OriginConfig(s3o *cloudfront.S3OriginConfig) map[string]interface{} { - return map[string]interface{}{ - "origin_access_identity": *s3o.OriginAccessIdentity, - } -} - -// Assemble the hash for the aws_cloudfront_distribution s3_origin_config -// TypeSet attribute. -func s3OriginConfigHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["origin_access_identity"].(string))) - return hashcode.String(buf.String()) -} - -func expandCustomErrorResponses(s *schema.Set) *cloudfront.CustomErrorResponses { - qty := 0 - items := []*cloudfront.CustomErrorResponse{} - for _, v := range s.List() { - items = append(items, expandCustomErrorResponse(v.(map[string]interface{}))) - qty++ - } - return &cloudfront.CustomErrorResponses{ - Quantity: aws.Int64(int64(qty)), - Items: items, - } -} - -func flattenCustomErrorResponses(ers *cloudfront.CustomErrorResponses) *schema.Set { - s := []interface{}{} - for _, v := range ers.Items { - s = append(s, flattenCustomErrorResponse(v)) - } - return schema.NewSet(customErrorResponseHash, s) -} - -func expandCustomErrorResponse(m map[string]interface{}) *cloudfront.CustomErrorResponse { - er := cloudfront.CustomErrorResponse{ - ErrorCode: aws.Int64(int64(m["error_code"].(int))), - } - if v, ok := m["error_caching_min_ttl"]; ok { - er.ErrorCachingMinTTL = aws.Int64(int64(v.(int))) - } - if v, ok := m["response_code"]; ok && v.(int) != 0 { - er.ResponseCode = aws.String(strconv.Itoa(v.(int))) - } else { - er.ResponseCode = aws.String("") - } - if v, ok := m["response_page_path"]; ok { - er.ResponsePagePath = aws.String(v.(string)) - } - - return &er -} - -func flattenCustomErrorResponse(er *cloudfront.CustomErrorResponse) map[string]interface{} { - m := make(map[string]interface{}) - m["error_code"] = int(*er.ErrorCode) - if er.ErrorCachingMinTTL != nil { - m["error_caching_min_ttl"] = int(*er.ErrorCachingMinTTL) - } - if er.ResponseCode != nil { - m["response_code"], _ = strconv.Atoi(*er.ResponseCode) - } - if er.ResponsePagePath != nil { - m["response_page_path"] = *er.ResponsePagePath - } - return m -} - -// Assemble the hash for the aws_cloudfront_distribution custom_error_response -// TypeSet attribute. -func customErrorResponseHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%d-", m["error_code"].(int))) - if v, ok := m["error_caching_min_ttl"]; ok { - buf.WriteString(fmt.Sprintf("%d-", v.(int))) - } - if v, ok := m["response_code"]; ok { - buf.WriteString(fmt.Sprintf("%d-", v.(int))) - } - if v, ok := m["response_page_path"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - return hashcode.String(buf.String()) -} - -func expandLoggingConfig(m map[string]interface{}) *cloudfront.LoggingConfig { - var lc cloudfront.LoggingConfig - if m != nil { - lc.Prefix = aws.String(m["prefix"].(string)) - lc.Bucket = aws.String(m["bucket"].(string)) - lc.IncludeCookies = aws.Bool(m["include_cookies"].(bool)) - lc.Enabled = aws.Bool(true) - } else { - lc.Prefix = aws.String("") - lc.Bucket = aws.String("") - lc.IncludeCookies = aws.Bool(false) - lc.Enabled = aws.Bool(false) - } - return &lc -} - -func flattenLoggingConfig(lc *cloudfront.LoggingConfig) *schema.Set { - m := make(map[string]interface{}) - m["prefix"] = *lc.Prefix - m["bucket"] = *lc.Bucket - m["include_cookies"] = *lc.IncludeCookies - return schema.NewSet(loggingConfigHash, []interface{}{m}) -} - -// Assemble the hash for the aws_cloudfront_distribution logging_config -// TypeSet attribute. -func loggingConfigHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["prefix"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["bucket"].(string))) - buf.WriteString(fmt.Sprintf("%t-", m["include_cookies"].(bool))) - return hashcode.String(buf.String()) -} - -func expandAliases(as *schema.Set) *cloudfront.Aliases { - s := as.List() - var aliases cloudfront.Aliases - if len(s) > 0 { - aliases.Quantity = aws.Int64(int64(len(s))) - aliases.Items = expandStringList(s) - } else { - aliases.Quantity = aws.Int64(0) - } - return &aliases -} - -func flattenAliases(aliases *cloudfront.Aliases) *schema.Set { - if aliases.Items != nil { - return schema.NewSet(aliasesHash, flattenStringList(aliases.Items)) - } - return schema.NewSet(aliasesHash, []interface{}{}) -} - -// Assemble the hash for the aws_cloudfront_distribution aliases -// TypeSet attribute. -func aliasesHash(v interface{}) int { - return hashcode.String(v.(string)) -} - -func expandRestrictions(m map[string]interface{}) *cloudfront.Restrictions { - return &cloudfront.Restrictions{ - GeoRestriction: expandGeoRestriction(m["geo_restriction"].(*schema.Set).List()[0].(map[string]interface{})), - } -} - -func flattenRestrictions(r *cloudfront.Restrictions) *schema.Set { - m := make(map[string]interface{}) - s := schema.NewSet(geoRestrictionHash, []interface{}{flattenGeoRestriction(r.GeoRestriction)}) - m["geo_restriction"] = s - return schema.NewSet(restrictionsHash, []interface{}{m}) -} - -// Assemble the hash for the aws_cloudfront_distribution restrictions -// TypeSet attribute. -func restrictionsHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%d-", geoRestrictionHash(m["geo_restriction"].(*schema.Set).List()[0].(map[string]interface{})))) - return hashcode.String(buf.String()) -} - -func expandGeoRestriction(m map[string]interface{}) *cloudfront.GeoRestriction { - gr := cloudfront.GeoRestriction{ - RestrictionType: aws.String(m["restriction_type"].(string)), - } - if v, ok := m["locations"]; ok { - gr.Quantity = aws.Int64(int64(len(v.([]interface{})))) - gr.Items = expandStringList(v.([]interface{})) - sort.Sort(StringPtrSlice(gr.Items)) - } else { - gr.Quantity = aws.Int64(0) - } - return &gr -} - -func flattenGeoRestriction(gr *cloudfront.GeoRestriction) map[string]interface{} { - m := make(map[string]interface{}) - - m["restriction_type"] = *gr.RestrictionType - if gr.Items != nil { - sort.Sort(StringPtrSlice(gr.Items)) - m["locations"] = flattenStringList(gr.Items) - } - return m -} - -// Assemble the hash for the aws_cloudfront_distribution geo_restriction -// TypeSet attribute. -func geoRestrictionHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - // All keys added in alphabetical order. - buf.WriteString(fmt.Sprintf("%s-", m["restriction_type"].(string))) - if v, ok := m["locations"]; ok { - for _, w := range sortInterfaceSlice(v.([]interface{})) { - buf.WriteString(fmt.Sprintf("%s-", w.(string))) - } - } - return hashcode.String(buf.String()) -} - -func expandViewerCertificate(m map[string]interface{}) *cloudfront.ViewerCertificate { - var vc cloudfront.ViewerCertificate - if v, ok := m["iam_certificate_id"]; ok && v != "" { - vc.IAMCertificateId = aws.String(v.(string)) - vc.SSLSupportMethod = aws.String(m["ssl_support_method"].(string)) - } else if v, ok := m["acm_certificate_arn"]; ok && v != "" { - vc.ACMCertificateArn = aws.String(v.(string)) - vc.SSLSupportMethod = aws.String(m["ssl_support_method"].(string)) - } else { - vc.CloudFrontDefaultCertificate = aws.Bool(m["cloudfront_default_certificate"].(bool)) - } - if v, ok := m["minimum_protocol_version"]; ok && v != "" { - vc.MinimumProtocolVersion = aws.String(v.(string)) - } - return &vc -} - -func flattenViewerCertificate(vc *cloudfront.ViewerCertificate) *schema.Set { - m := make(map[string]interface{}) - - if vc.IAMCertificateId != nil { - m["iam_certificate_id"] = *vc.IAMCertificateId - m["ssl_support_method"] = *vc.SSLSupportMethod - } - if vc.ACMCertificateArn != nil { - m["acm_certificate_arn"] = *vc.ACMCertificateArn - m["ssl_support_method"] = *vc.SSLSupportMethod - } - if vc.CloudFrontDefaultCertificate != nil { - m["cloudfront_default_certificate"] = *vc.CloudFrontDefaultCertificate - } - if vc.MinimumProtocolVersion != nil { - m["minimum_protocol_version"] = *vc.MinimumProtocolVersion - } - return schema.NewSet(viewerCertificateHash, []interface{}{m}) -} - -// Assemble the hash for the aws_cloudfront_distribution viewer_certificate -// TypeSet attribute. -func viewerCertificateHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - if v, ok := m["iam_certificate_id"]; ok && v.(string) != "" { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - buf.WriteString(fmt.Sprintf("%s-", m["ssl_support_method"].(string))) - } else if v, ok := m["acm_certificate_arn"]; ok && v.(string) != "" { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - buf.WriteString(fmt.Sprintf("%s-", m["ssl_support_method"].(string))) - } else { - buf.WriteString(fmt.Sprintf("%t-", m["cloudfront_default_certificate"].(bool))) - } - // if minimum_protocol_version is not specified and we use cloudfront_default_certificate, - // ignore current value of minimum_protocol_version - if c, ok := m["cloudfront_default_certificate"]; !(ok && c.(bool)) { - if v, ok := m["minimum_protocol_version"]; ok && v.(string) != "" { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - } - return hashcode.String(buf.String()) -} - -// Do a top-level copy of struct fields from one struct to another. Used to -// copy fields between CacheBehavior and DefaultCacheBehavior structs. -func simpleCopyStruct(src, dst interface{}) { - s := reflect.ValueOf(src).Elem() - d := reflect.ValueOf(dst).Elem() - - for i := 0; i < s.NumField(); i++ { - if s.Field(i).CanSet() { - if s.Field(i).Interface() != nil { - for j := 0; j < d.NumField(); j++ { - if d.Type().Field(j).Name == s.Type().Field(i).Name { - d.Field(j).Set(s.Field(i)) - } - } - } - } - } -} - -// Convert *cloudfront.ActiveTrustedSigners to a flatmap.Map type, which ensures -// it can probably be inserted into the schema.TypeMap type used by the -// active_trusted_signers attribute. -func flattenActiveTrustedSigners(ats *cloudfront.ActiveTrustedSigners) flatmap.Map { - m := make(map[string]interface{}) - s := []interface{}{} - m["enabled"] = *ats.Enabled - - for _, v := range ats.Items { - signer := make(map[string]interface{}) - signer["aws_account_number"] = *v.AwsAccountNumber - signer["key_pair_ids"] = aws.StringValueSlice(v.KeyPairIds.Items) - s = append(s, signer) - } - m["items"] = s - return flatmap.Flatten(m) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go deleted file mode 100644 index 6fafda43c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go +++ /dev/null @@ -1,834 +0,0 @@ -package aws - -import ( - "crypto/tls" - "errors" - "fmt" - "log" - "net/http" - "os" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/endpoints" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/acm" - "github.com/aws/aws-sdk-go/service/acmpca" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/aws/aws-sdk-go/service/apigatewayv2" - "github.com/aws/aws-sdk-go/service/applicationautoscaling" - "github.com/aws/aws-sdk-go/service/appmesh" - "github.com/aws/aws-sdk-go/service/appsync" - "github.com/aws/aws-sdk-go/service/athena" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/aws/aws-sdk-go/service/backup" - "github.com/aws/aws-sdk-go/service/batch" - "github.com/aws/aws-sdk-go/service/budgets" - "github.com/aws/aws-sdk-go/service/cloud9" - "github.com/aws/aws-sdk-go/service/cloudformation" - "github.com/aws/aws-sdk-go/service/cloudfront" - "github.com/aws/aws-sdk-go/service/cloudhsmv2" - "github.com/aws/aws-sdk-go/service/cloudsearch" - "github.com/aws/aws-sdk-go/service/cloudtrail" - "github.com/aws/aws-sdk-go/service/cloudwatch" - "github.com/aws/aws-sdk-go/service/cloudwatchevents" - "github.com/aws/aws-sdk-go/service/cloudwatchlogs" - "github.com/aws/aws-sdk-go/service/codebuild" - "github.com/aws/aws-sdk-go/service/codecommit" - "github.com/aws/aws-sdk-go/service/codedeploy" - "github.com/aws/aws-sdk-go/service/codepipeline" - "github.com/aws/aws-sdk-go/service/cognitoidentity" - "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" - "github.com/aws/aws-sdk-go/service/configservice" - "github.com/aws/aws-sdk-go/service/costandusagereportservice" - "github.com/aws/aws-sdk-go/service/databasemigrationservice" - "github.com/aws/aws-sdk-go/service/datapipeline" - "github.com/aws/aws-sdk-go/service/datasync" - "github.com/aws/aws-sdk-go/service/dax" - "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" - "github.com/aws/aws-sdk-go/service/ecr" - "github.com/aws/aws-sdk-go/service/ecs" - "github.com/aws/aws-sdk-go/service/efs" - "github.com/aws/aws-sdk-go/service/eks" - "github.com/aws/aws-sdk-go/service/elasticache" - "github.com/aws/aws-sdk-go/service/elasticbeanstalk" - elasticsearch "github.com/aws/aws-sdk-go/service/elasticsearchservice" - "github.com/aws/aws-sdk-go/service/elastictranscoder" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/aws/aws-sdk-go/service/elbv2" - "github.com/aws/aws-sdk-go/service/emr" - "github.com/aws/aws-sdk-go/service/firehose" - "github.com/aws/aws-sdk-go/service/fms" - "github.com/aws/aws-sdk-go/service/fsx" - "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/guardduty" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/aws/aws-sdk-go/service/inspector" - "github.com/aws/aws-sdk-go/service/iot" - "github.com/aws/aws-sdk-go/service/kafka" - "github.com/aws/aws-sdk-go/service/kinesis" - "github.com/aws/aws-sdk-go/service/kinesisanalytics" - "github.com/aws/aws-sdk-go/service/kms" - "github.com/aws/aws-sdk-go/service/lambda" - "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice" - "github.com/aws/aws-sdk-go/service/licensemanager" - "github.com/aws/aws-sdk-go/service/lightsail" - "github.com/aws/aws-sdk-go/service/macie" - "github.com/aws/aws-sdk-go/service/mediaconnect" - "github.com/aws/aws-sdk-go/service/mediaconvert" - "github.com/aws/aws-sdk-go/service/medialive" - "github.com/aws/aws-sdk-go/service/mediapackage" - "github.com/aws/aws-sdk-go/service/mediastore" - "github.com/aws/aws-sdk-go/service/mediastoredata" - "github.com/aws/aws-sdk-go/service/mq" - "github.com/aws/aws-sdk-go/service/neptune" - "github.com/aws/aws-sdk-go/service/opsworks" - "github.com/aws/aws-sdk-go/service/organizations" - "github.com/aws/aws-sdk-go/service/pinpoint" - "github.com/aws/aws-sdk-go/service/pricing" - "github.com/aws/aws-sdk-go/service/ram" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/aws/aws-sdk-go/service/redshift" - "github.com/aws/aws-sdk-go/service/resourcegroups" - "github.com/aws/aws-sdk-go/service/route53" - "github.com/aws/aws-sdk-go/service/route53resolver" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/aws/aws-sdk-go/service/s3control" - "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/serverlessapplicationrepository" - "github.com/aws/aws-sdk-go/service/servicecatalog" - "github.com/aws/aws-sdk-go/service/servicediscovery" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/aws/aws-sdk-go/service/sfn" - "github.com/aws/aws-sdk-go/service/simpledb" - "github.com/aws/aws-sdk-go/service/sns" - "github.com/aws/aws-sdk-go/service/sqs" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/aws/aws-sdk-go/service/storagegateway" - "github.com/aws/aws-sdk-go/service/sts" - "github.com/aws/aws-sdk-go/service/swf" - "github.com/aws/aws-sdk-go/service/transfer" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/aws/aws-sdk-go/service/worklink" - "github.com/aws/aws-sdk-go/service/workspaces" - "github.com/davecgh/go-spew/spew" - cleanhttp "github.com/hashicorp/go-cleanhttp" - "github.com/hashicorp/terraform/helper/logging" - "github.com/hashicorp/terraform/terraform" -) - -type Config struct { - AccessKey string - SecretKey string - CredsFilename string - Profile string - Token string - Region string - MaxRetries int - - AssumeRoleARN string - AssumeRoleExternalID string - AssumeRoleSessionName string - AssumeRolePolicy string - - AllowedAccountIds []interface{} - ForbiddenAccountIds []interface{} - - AcmEndpoint string - ApigatewayEndpoint string - CloudFormationEndpoint string - CloudWatchEndpoint string - CloudWatchEventsEndpoint string - CloudWatchLogsEndpoint string - DynamoDBEndpoint string - DeviceFarmEndpoint string - Ec2Endpoint string - EcsEndpoint string - AutoscalingEndpoint string - EcrEndpoint string - EfsEndpoint string - EsEndpoint string - ElbEndpoint string - IamEndpoint string - KinesisEndpoint string - KinesisAnalyticsEndpoint string - KmsEndpoint string - LambdaEndpoint string - RdsEndpoint string - R53Endpoint string - S3Endpoint string - S3ControlEndpoint string - SnsEndpoint string - SqsEndpoint string - StsEndpoint string - SsmEndpoint string - Insecure bool - - SkipCredsValidation bool - SkipGetEC2Platforms bool - SkipRegionValidation bool - SkipRequestingAccountId bool - SkipMetadataApiCheck bool - S3ForcePathStyle bool -} - -type AWSClient struct { - accountid string - acmconn *acm.ACM - acmpcaconn *acmpca.ACMPCA - apigateway *apigateway.APIGateway - apigatewayv2conn *apigatewayv2.ApiGatewayV2 - appautoscalingconn *applicationautoscaling.ApplicationAutoScaling - appmeshconn *appmesh.AppMesh - appsyncconn *appsync.AppSync - athenaconn *athena.Athena - autoscalingconn *autoscaling.AutoScaling - backupconn *backup.Backup - batchconn *batch.Batch - budgetconn *budgets.Budgets - cfconn *cloudformation.CloudFormation - cloud9conn *cloud9.Cloud9 - cloudfrontconn *cloudfront.CloudFront - cloudhsmv2conn *cloudhsmv2.CloudHSMV2 - cloudsearchconn *cloudsearch.CloudSearch - cloudtrailconn *cloudtrail.CloudTrail - cloudwatchconn *cloudwatch.CloudWatch - cloudwatcheventsconn *cloudwatchevents.CloudWatchEvents - cloudwatchlogsconn *cloudwatchlogs.CloudWatchLogs - codebuildconn *codebuild.CodeBuild - codecommitconn *codecommit.CodeCommit - codedeployconn *codedeploy.CodeDeploy - codepipelineconn *codepipeline.CodePipeline - cognitoconn *cognitoidentity.CognitoIdentity - cognitoidpconn *cognitoidentityprovider.CognitoIdentityProvider - configconn *configservice.ConfigService - costandusagereportconn *costandusagereportservice.CostandUsageReportService - datapipelineconn *datapipeline.DataPipeline - datasyncconn *datasync.DataSync - daxconn *dax.DAX - devicefarmconn *devicefarm.DeviceFarm - dlmconn *dlm.DLM - dmsconn *databasemigrationservice.DatabaseMigrationService - docdbconn *docdb.DocDB - dsconn *directoryservice.DirectoryService - dxconn *directconnect.DirectConnect - dynamodbconn *dynamodb.DynamoDB - ec2conn *ec2.EC2 - ecrconn *ecr.ECR - ecsconn *ecs.ECS - efsconn *efs.EFS - eksconn *eks.EKS - elasticacheconn *elasticache.ElastiCache - elasticbeanstalkconn *elasticbeanstalk.ElasticBeanstalk - elastictranscoderconn *elastictranscoder.ElasticTranscoder - elbconn *elb.ELB - elbv2conn *elbv2.ELBV2 - emrconn *emr.EMR - esconn *elasticsearch.ElasticsearchService - firehoseconn *firehose.Firehose - fmsconn *fms.FMS - fsxconn *fsx.FSx - gameliftconn *gamelift.GameLift - glacierconn *glacier.Glacier - globalacceleratorconn *globalaccelerator.GlobalAccelerator - glueconn *glue.Glue - guarddutyconn *guardduty.GuardDuty - iamconn *iam.IAM - inspectorconn *inspector.Inspector - iotconn *iot.IoT - kafkaconn *kafka.Kafka - kinesisanalyticsconn *kinesisanalytics.KinesisAnalytics - kinesisconn *kinesis.Kinesis - kmsconn *kms.KMS - lambdaconn *lambda.Lambda - lexmodelconn *lexmodelbuildingservice.LexModelBuildingService - licensemanagerconn *licensemanager.LicenseManager - lightsailconn *lightsail.Lightsail - macieconn *macie.Macie - mediaconnectconn *mediaconnect.MediaConnect - mediaconvertconn *mediaconvert.MediaConvert - medialiveconn *medialive.MediaLive - mediapackageconn *mediapackage.MediaPackage - mediastoreconn *mediastore.MediaStore - mediastoredataconn *mediastoredata.MediaStoreData - mqconn *mq.MQ - neptuneconn *neptune.Neptune - opsworksconn *opsworks.OpsWorks - organizationsconn *organizations.Organizations - partition string - pinpointconn *pinpoint.Pinpoint - pricingconn *pricing.Pricing - r53conn *route53.Route53 - ramconn *ram.RAM - rdsconn *rds.RDS - redshiftconn *redshift.Redshift - region string - resourcegroupsconn *resourcegroups.ResourceGroups - route53resolverconn *route53resolver.Route53Resolver - s3conn *s3.S3 - s3controlconn *s3control.S3Control - sagemakerconn *sagemaker.SageMaker - scconn *servicecatalog.ServiceCatalog - sdconn *servicediscovery.ServiceDiscovery - secretsmanagerconn *secretsmanager.SecretsManager - securityhubconn *securityhub.SecurityHub - serverlessapplicationrepositoryconn *serverlessapplicationrepository.ServerlessApplicationRepository - sesConn *ses.SES - sfnconn *sfn.SFN - simpledbconn *simpledb.SimpleDB - snsconn *sns.SNS - sqsconn *sqs.SQS - ssmconn *ssm.SSM - storagegatewayconn *storagegateway.StorageGateway - stsconn *sts.STS - supportedplatforms []string - swfconn *swf.SWF - transferconn *transfer.Transfer - wafconn *waf.WAF - wafregionalconn *wafregional.WAFRegional - worklinkconn *worklink.WorkLink - workspacesconn *workspaces.WorkSpaces -} - -func (c *AWSClient) S3() *s3.S3 { - return c.s3conn -} - -func (c *AWSClient) DynamoDB() *dynamodb.DynamoDB { - return c.dynamodbconn -} - -func (c *AWSClient) IsChinaCloud() bool { - _, isChinaCloud := endpoints.PartitionForRegion([]endpoints.Partition{endpoints.AwsCnPartition()}, c.region) - return isChinaCloud -} - -// Client configures and returns a fully initialized AWSClient -func (c *Config) Client() (interface{}, error) { - // Get the auth and region. This can fail if keys/regions were not - // specified and we're attempting to use the environment. - if c.SkipRegionValidation { - log.Println("[INFO] Skipping region validation") - } else { - log.Println("[INFO] Building AWS region structure") - err := c.ValidateRegion() - if err != nil { - return nil, err - } - } - - var client AWSClient - // store AWS region in client struct, for region specific operations such as - // bucket storage in S3 - client.region = c.Region - - log.Println("[INFO] Building AWS auth structure") - creds, err := GetCredentials(c) - if err != nil { - return nil, err - } - - // define the AWS Session options - // Credentials or Profile will be set in the Options below - // MaxRetries may be set once we validate credentials - var opt = session.Options{ - Config: aws.Config{ - Region: aws.String(c.Region), - MaxRetries: aws.Int(0), - HTTPClient: cleanhttp.DefaultClient(), - S3ForcePathStyle: aws.Bool(c.S3ForcePathStyle), - }, - } - - // Call Get to check for credential provider. If nothing found, we'll get an - // error, and we can present it nicely to the user - cp, err := creds.Get() - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoCredentialProviders" { - // If a profile wasn't specified, the session may still be able to resolve credentials from shared config. - if c.Profile == "" { - sess, err := session.NewSession() - if err != nil { - return nil, errors.New(`No valid credential sources found for AWS Provider. - Please see https://terraform.io/docs/providers/aws/index.html for more information on - providing credentials for the AWS Provider`) - } - _, err = sess.Config.Credentials.Get() - if err != nil { - return nil, errors.New(`No valid credential sources found for AWS Provider. - Please see https://terraform.io/docs/providers/aws/index.html for more information on - providing credentials for the AWS Provider`) - } - log.Printf("[INFO] Using session-derived AWS Auth") - opt.Config.Credentials = sess.Config.Credentials - } else { - log.Printf("[INFO] AWS Auth using Profile: %q", c.Profile) - opt.Profile = c.Profile - opt.SharedConfigState = session.SharedConfigEnable - } - } else { - return nil, fmt.Errorf("Error loading credentials for AWS Provider: %s", err) - } - } else { - // add the validated credentials to the session options - log.Printf("[INFO] AWS Auth provider used: %q", cp.ProviderName) - opt.Config.Credentials = creds - } - - if logging.IsDebugOrHigher() { - opt.Config.LogLevel = aws.LogLevel(aws.LogDebugWithHTTPBody | aws.LogDebugWithRequestRetries | aws.LogDebugWithRequestErrors) - opt.Config.Logger = awsLogger{} - } - - if c.Insecure { - transport := opt.Config.HTTPClient.Transport.(*http.Transport) - transport.TLSClientConfig = &tls.Config{ - InsecureSkipVerify: true, - } - } - - // create base session with no retries. MaxRetries will be set later - sess, err := session.NewSessionWithOptions(opt) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoCredentialProviders" { - return nil, errors.New(`No valid credential sources found for AWS Provider. - Please see https://terraform.io/docs/providers/aws/index.html for more information on - providing credentials for the AWS Provider`) - } - return nil, fmt.Errorf("Error creating AWS session: %s", err) - } - - sess.Handlers.Build.PushBackNamed(addTerraformVersionToUserAgent) - - if extraDebug := os.Getenv("TERRAFORM_AWS_AUTHFAILURE_DEBUG"); extraDebug != "" { - sess.Handlers.UnmarshalError.PushFrontNamed(debugAuthFailure) - } - - // if the desired number of retries is non-zero, update the session - if c.MaxRetries > 0 { - sess = sess.Copy(&aws.Config{MaxRetries: aws.Int(c.MaxRetries)}) - } - - // Generally, we want to configure a lower retry theshold for networking issues - // as the session retry threshold is very high by default and can mask permanent - // networking failures, such as a non-existent service endpoint. - // MaxRetries will override this logic if it has a lower retry threshold. - // NOTE: This logic can be fooled by other request errors raising the retry count - // before any networking error occurs - sess.Handlers.Retry.PushBack(func(r *request.Request) { - // We currently depend on the DefaultRetryer exponential backoff here. - // ~10 retries gives a fair backoff of a few seconds. - if r.RetryCount < 9 { - return - } - // RequestError: send request failed - // caused by: Post https://FQDN/: dial tcp: lookup FQDN: no such host - if IsAWSErrExtended(r.Error, "RequestError", "send request failed", "no such host") { - log.Printf("[WARN] Disabling retries after next request due to networking issue") - r.Retryable = aws.Bool(false) - } - // RequestError: send request failed - // caused by: Post https://FQDN/: dial tcp IPADDRESS:443: connect: connection refused - if IsAWSErrExtended(r.Error, "RequestError", "send request failed", "connection refused") { - log.Printf("[WARN] Disabling retries after next request due to networking issue") - r.Retryable = aws.Bool(false) - } - }) - - // This restriction should only be used for Route53 sessions. - // Other resources that have restrictions should allow the API to fail, rather - // than Terraform abstracting the region for the user. This can lead to breaking - // changes if that resource is ever opened up to more regions. - r53Sess := sess.Copy(&aws.Config{Region: aws.String("us-east-1"), Endpoint: aws.String(c.R53Endpoint)}) - - // Some services have user-configurable endpoints - awsAcmSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.AcmEndpoint)}) - awsApigatewaySess := sess.Copy(&aws.Config{Endpoint: aws.String(c.ApigatewayEndpoint)}) - awsCfSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.CloudFormationEndpoint)}) - awsCwSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.CloudWatchEndpoint)}) - awsCweSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.CloudWatchEventsEndpoint)}) - awsCwlSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.CloudWatchLogsEndpoint)}) - awsDynamoSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.DynamoDBEndpoint)}) - awsEc2Sess := sess.Copy(&aws.Config{Endpoint: aws.String(c.Ec2Endpoint)}) - awsAutoscalingSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.AutoscalingEndpoint)}) - awsEcrSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.EcrEndpoint)}) - awsEcsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.EcsEndpoint)}) - awsEfsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.EfsEndpoint)}) - awsElbSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.ElbEndpoint)}) - awsEsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.EsEndpoint)}) - awsIamSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.IamEndpoint)}) - awsLambdaSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.LambdaEndpoint)}) - awsKinesisSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.KinesisEndpoint)}) - awsKinesisAnalyticsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.KinesisAnalyticsEndpoint)}) - awsKmsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.KmsEndpoint)}) - awsRdsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.RdsEndpoint)}) - awsS3Sess := sess.Copy(&aws.Config{Endpoint: aws.String(c.S3Endpoint)}) - awsS3ControlSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.S3ControlEndpoint)}) - awsSnsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.SnsEndpoint)}) - awsSqsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.SqsEndpoint)}) - awsStsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.StsEndpoint)}) - awsDeviceFarmSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.DeviceFarmEndpoint)}) - awsSsmSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.SsmEndpoint)}) - - log.Println("[INFO] Initializing DeviceFarm SDK connection") - client.devicefarmconn = devicefarm.New(awsDeviceFarmSess) - - // Beyond verifying credentials (if enabled), we use the next set of logic - // to determine two pieces of information required for manually assembling - // resource ARNs when they are not available in the service API: - // * client.accountid - // * client.partition - client.iamconn = iam.New(awsIamSess) - client.stsconn = sts.New(awsStsSess) - - if c.AssumeRoleARN != "" { - client.accountid, client.partition, _ = parseAccountIDAndPartitionFromARN(c.AssumeRoleARN) - } - - // Validate credentials early and fail before we do any graph walking. - if !c.SkipCredsValidation { - var err error - client.accountid, client.partition, err = GetAccountIDAndPartitionFromSTSGetCallerIdentity(client.stsconn) - if err != nil { - return nil, fmt.Errorf("error validating provider credentials: %s", err) - } - } - - if client.accountid == "" && !c.SkipRequestingAccountId { - var err error - client.accountid, client.partition, err = GetAccountIDAndPartition(client.iamconn, client.stsconn, cp.ProviderName) - if err != nil { - // DEPRECATED: Next major version of the provider should return the error instead of logging - // if skip_request_account_id is not enabled. - log.Printf("[WARN] %s", fmt.Sprintf( - "AWS account ID not previously found and failed retrieving via all available methods. "+ - "This will return an error in the next major version of the AWS provider. "+ - "See https://www.terraform.io/docs/providers/aws/index.html#skip_requesting_account_id for workaround and implications. "+ - "Errors: %s", err)) - } - } - - if client.accountid == "" { - log.Printf("[WARN] AWS account ID not found for provider. See https://www.terraform.io/docs/providers/aws/index.html#skip_requesting_account_id for implications.") - } - - authErr := c.ValidateAccountId(client.accountid) - if authErr != nil { - return nil, authErr - } - - // Infer AWS partition from configured region if we still need it - if client.partition == "" { - if partition, ok := endpoints.PartitionForRegion(endpoints.DefaultPartitions(), client.region); ok { - client.partition = partition.ID() - } - } - - client.ec2conn = ec2.New(awsEc2Sess) - - if !c.SkipGetEC2Platforms { - supportedPlatforms, err := GetSupportedEC2Platforms(client.ec2conn) - if err != nil { - // We intentionally fail *silently* because there's a chance - // user just doesn't have ec2:DescribeAccountAttributes permissions - log.Printf("[WARN] Unable to get supported EC2 platforms: %s", err) - } else { - client.supportedplatforms = supportedPlatforms - } - } - - client.acmconn = acm.New(awsAcmSess) - client.acmpcaconn = acmpca.New(sess) - client.apigateway = apigateway.New(awsApigatewaySess) - client.apigatewayv2conn = apigatewayv2.New(sess) - client.appautoscalingconn = applicationautoscaling.New(sess) - client.appmeshconn = appmesh.New(sess) - client.appsyncconn = appsync.New(sess) - client.athenaconn = athena.New(sess) - client.autoscalingconn = autoscaling.New(awsAutoscalingSess) - client.backupconn = backup.New(sess) - client.batchconn = batch.New(sess) - client.budgetconn = budgets.New(sess) - client.cfconn = cloudformation.New(awsCfSess) - client.cloud9conn = cloud9.New(sess) - client.cloudfrontconn = cloudfront.New(sess) - client.cloudhsmv2conn = cloudhsmv2.New(sess) - client.cloudsearchconn = cloudsearch.New(sess) - client.cloudtrailconn = cloudtrail.New(sess) - client.cloudwatchconn = cloudwatch.New(awsCwSess) - client.cloudwatcheventsconn = cloudwatchevents.New(awsCweSess) - client.cloudwatchlogsconn = cloudwatchlogs.New(awsCwlSess) - client.codebuildconn = codebuild.New(sess) - client.codecommitconn = codecommit.New(sess) - client.codedeployconn = codedeploy.New(sess) - client.codepipelineconn = codepipeline.New(sess) - client.cognitoconn = cognitoidentity.New(sess) - client.cognitoidpconn = cognitoidentityprovider.New(sess) - client.configconn = configservice.New(sess) - client.costandusagereportconn = costandusagereportservice.New(sess) - client.datapipelineconn = datapipeline.New(sess) - client.datasyncconn = datasync.New(sess) - client.daxconn = dax.New(awsDynamoSess) - client.dlmconn = dlm.New(sess) - client.dmsconn = databasemigrationservice.New(sess) - client.docdbconn = docdb.New(sess) - client.dsconn = directoryservice.New(sess) - client.dxconn = directconnect.New(sess) - client.dynamodbconn = dynamodb.New(awsDynamoSess) - client.ecrconn = ecr.New(awsEcrSess) - client.ecsconn = ecs.New(awsEcsSess) - client.efsconn = efs.New(awsEfsSess) - client.eksconn = eks.New(sess) - client.elasticacheconn = elasticache.New(sess) - client.elasticbeanstalkconn = elasticbeanstalk.New(sess) - client.elastictranscoderconn = elastictranscoder.New(sess) - client.elbconn = elb.New(awsElbSess) - client.elbv2conn = elbv2.New(awsElbSess) - client.emrconn = emr.New(sess) - client.esconn = elasticsearch.New(awsEsSess) - client.firehoseconn = firehose.New(sess) - client.fmsconn = fms.New(sess) - client.fsxconn = fsx.New(sess) - client.gameliftconn = gamelift.New(sess) - client.glacierconn = glacier.New(sess) - client.globalacceleratorconn = globalaccelerator.New(sess) - client.glueconn = glue.New(sess) - client.guarddutyconn = guardduty.New(sess) - client.inspectorconn = inspector.New(sess) - client.iotconn = iot.New(sess) - client.kafkaconn = kafka.New(sess) - client.kinesisanalyticsconn = kinesisanalytics.New(awsKinesisAnalyticsSess) - client.kinesisconn = kinesis.New(awsKinesisSess) - client.kmsconn = kms.New(awsKmsSess) - client.lambdaconn = lambda.New(awsLambdaSess) - client.lexmodelconn = lexmodelbuildingservice.New(sess) - client.licensemanagerconn = licensemanager.New(sess) - client.lightsailconn = lightsail.New(sess) - client.macieconn = macie.New(sess) - client.mediaconnectconn = mediaconnect.New(sess) - client.mediaconvertconn = mediaconvert.New(sess) - client.medialiveconn = medialive.New(sess) - client.mediapackageconn = mediapackage.New(sess) - client.mediastoreconn = mediastore.New(sess) - client.mediastoredataconn = mediastoredata.New(sess) - client.mqconn = mq.New(sess) - client.neptuneconn = neptune.New(sess) - client.neptuneconn = neptune.New(sess) - client.opsworksconn = opsworks.New(sess) - client.organizationsconn = organizations.New(sess) - client.pinpointconn = pinpoint.New(sess) - client.pricingconn = pricing.New(sess) - client.r53conn = route53.New(r53Sess) - client.ramconn = ram.New(sess) - client.rdsconn = rds.New(awsRdsSess) - client.redshiftconn = redshift.New(sess) - client.resourcegroupsconn = resourcegroups.New(sess) - client.route53resolverconn = route53resolver.New(sess) - client.s3conn = s3.New(awsS3Sess) - client.s3controlconn = s3control.New(awsS3ControlSess) - client.sagemakerconn = sagemaker.New(sess) - client.scconn = servicecatalog.New(sess) - client.sdconn = servicediscovery.New(sess) - client.secretsmanagerconn = secretsmanager.New(sess) - client.securityhubconn = securityhub.New(sess) - client.serverlessapplicationrepositoryconn = serverlessapplicationrepository.New(sess) - client.sesConn = ses.New(sess) - client.sfnconn = sfn.New(sess) - client.simpledbconn = simpledb.New(sess) - client.snsconn = sns.New(awsSnsSess) - client.sqsconn = sqs.New(awsSqsSess) - client.ssmconn = ssm.New(awsSsmSess) - client.storagegatewayconn = storagegateway.New(sess) - client.swfconn = swf.New(sess) - client.transferconn = transfer.New(sess) - client.wafconn = waf.New(sess) - client.wafregionalconn = wafregional.New(sess) - client.worklinkconn = worklink.New(sess) - client.workspacesconn = workspaces.New(sess) - - // Workaround for https://github.com/aws/aws-sdk-go/issues/1376 - client.kinesisconn.Handlers.Retry.PushBack(func(r *request.Request) { - if !strings.HasPrefix(r.Operation.Name, "Describe") && !strings.HasPrefix(r.Operation.Name, "List") { - return - } - err, ok := r.Error.(awserr.Error) - if !ok || err == nil { - return - } - if err.Code() == kinesis.ErrCodeLimitExceededException { - r.Retryable = aws.Bool(true) - } - }) - - // Workaround for https://github.com/aws/aws-sdk-go/issues/1472 - client.appautoscalingconn.Handlers.Retry.PushBack(func(r *request.Request) { - if !strings.HasPrefix(r.Operation.Name, "Describe") && !strings.HasPrefix(r.Operation.Name, "List") { - return - } - err, ok := r.Error.(awserr.Error) - if !ok || err == nil { - return - } - if err.Code() == applicationautoscaling.ErrCodeFailedResourceAccessException { - r.Retryable = aws.Bool(true) - } - }) - - // See https://github.com/aws/aws-sdk-go/pull/1276 - client.dynamodbconn.Handlers.Retry.PushBack(func(r *request.Request) { - if r.Operation.Name != "PutItem" && r.Operation.Name != "UpdateItem" && r.Operation.Name != "DeleteItem" { - return - } - if isAWSErr(r.Error, dynamodb.ErrCodeLimitExceededException, "Subscriber limit exceeded:") { - r.Retryable = aws.Bool(true) - } - }) - - client.kinesisconn.Handlers.Retry.PushBack(func(r *request.Request) { - if r.Operation.Name == "CreateStream" { - if isAWSErr(r.Error, kinesis.ErrCodeLimitExceededException, "simultaneously be in CREATING or DELETING") { - r.Retryable = aws.Bool(true) - } - } - if r.Operation.Name == "CreateStream" || r.Operation.Name == "DeleteStream" { - if isAWSErr(r.Error, kinesis.ErrCodeLimitExceededException, "Rate exceeded for stream") { - r.Retryable = aws.Bool(true) - } - } - }) - - client.storagegatewayconn.Handlers.Retry.PushBack(func(r *request.Request) { - // InvalidGatewayRequestException: The specified gateway proxy network connection is busy. - if isAWSErr(r.Error, storagegateway.ErrCodeInvalidGatewayRequestException, "The specified gateway proxy network connection is busy") { - r.Retryable = aws.Bool(true) - } - }) - - return &client, nil -} - -func hasEc2Classic(platforms []string) bool { - for _, p := range platforms { - if p == "EC2" { - return true - } - } - return false -} - -// ValidateRegion returns an error if the configured region is not a -// valid aws region and nil otherwise. -func (c *Config) ValidateRegion() error { - for _, partition := range endpoints.DefaultPartitions() { - for _, region := range partition.Regions() { - if c.Region == region.ID() { - return nil - } - } - } - - return fmt.Errorf("Not a valid region: %s", c.Region) -} - -// ValidateAccountId returns a context-specific error if the configured account -// id is explicitly forbidden or not authorised; and nil if it is authorised. -func (c *Config) ValidateAccountId(accountId string) error { - if c.AllowedAccountIds == nil && c.ForbiddenAccountIds == nil { - return nil - } - - log.Println("[INFO] Validating account ID") - - if c.ForbiddenAccountIds != nil { - for _, id := range c.ForbiddenAccountIds { - if id == accountId { - return fmt.Errorf("Forbidden account ID (%s)", id) - } - } - } - - if c.AllowedAccountIds != nil { - for _, id := range c.AllowedAccountIds { - if id == accountId { - return nil - } - } - return fmt.Errorf("Account ID not allowed (%s)", accountId) - } - - return nil -} - -func GetSupportedEC2Platforms(conn *ec2.EC2) ([]string, error) { - attrName := "supported-platforms" - - input := ec2.DescribeAccountAttributesInput{ - AttributeNames: []*string{aws.String(attrName)}, - } - attributes, err := conn.DescribeAccountAttributes(&input) - if err != nil { - return nil, err - } - - var platforms []string - for _, attr := range attributes.AccountAttributes { - if *attr.AttributeName == attrName { - for _, v := range attr.AttributeValues { - platforms = append(platforms, *v.AttributeValue) - } - break - } - } - - if len(platforms) == 0 { - return nil, fmt.Errorf("No EC2 platforms detected") - } - - return platforms, nil -} - -// addTerraformVersionToUserAgent is a named handler that will add Terraform's -// version information to requests made by the AWS SDK. -var addTerraformVersionToUserAgent = request.NamedHandler{ - Name: "terraform.TerraformVersionUserAgentHandler", - Fn: request.MakeAddToUserAgentHandler( - "APN/1.0 HashiCorp/1.0 Terraform", terraform.VersionString()), -} - -var debugAuthFailure = request.NamedHandler{ - Name: "terraform.AuthFailureAdditionalDebugHandler", - Fn: func(req *request.Request) { - if isAWSErr(req.Error, "AuthFailure", "AWS was not able to validate the provided access credentials") { - log.Printf("[INFO] Additional AuthFailure Debugging Context") - log.Printf("[INFO] Current system UTC time: %s", time.Now().UTC()) - log.Printf("[INFO] Request object: %s", spew.Sdump(req)) - } - }, -} - -type awsLogger struct{} - -func (l awsLogger) Log(args ...interface{}) { - tokens := make([]string, 0, len(args)) - for _, arg := range args { - if token, ok := arg.(string); ok { - tokens = append(tokens, token) - } - } - log.Printf("[DEBUG] [aws-sdk-go] %s", strings.Join(tokens, " ")) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_acm_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_acm_certificate.go deleted file mode 100644 index a49ca9d88..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_acm_certificate.go +++ /dev/null @@ -1,168 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/acm" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsAcmCertificate() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsAcmCertificateRead, - Schema: map[string]*schema.Schema{ - "domain": { - Type: schema.TypeString, - Required: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "statuses": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "types": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "most_recent": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - } -} - -func dataSourceAwsAcmCertificateRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).acmconn - - params := &acm.ListCertificatesInput{} - target := d.Get("domain") - statuses, ok := d.GetOk("statuses") - if ok { - statusStrings := statuses.([]interface{}) - params.CertificateStatuses = expandStringList(statusStrings) - } else { - params.CertificateStatuses = []*string{aws.String("ISSUED")} - } - - var arns []*string - log.Printf("[DEBUG] Reading ACM Certificate: %s", params) - err := conn.ListCertificatesPages(params, func(page *acm.ListCertificatesOutput, lastPage bool) bool { - for _, cert := range page.CertificateSummaryList { - if *cert.DomainName == target { - arns = append(arns, cert.CertificateArn) - } - } - - return true - }) - if err != nil { - return fmt.Errorf("Error listing certificates: %q", err) - } - - if len(arns) == 0 { - return fmt.Errorf("No certificate for domain %q found in this region", target) - } - - filterMostRecent := d.Get("most_recent").(bool) - filterTypes, filterTypesOk := d.GetOk("types") - - var matchedCertificate *acm.CertificateDetail - - if !filterMostRecent && !filterTypesOk && len(arns) > 1 { - // Multiple certificates have been found and no additional filtering set - return fmt.Errorf("Multiple certificates for domain %q found in this region", target) - } - - typesStrings := expandStringList(filterTypes.([]interface{})) - - for _, arn := range arns { - var err error - - input := &acm.DescribeCertificateInput{ - CertificateArn: aws.String(*arn), - } - log.Printf("[DEBUG] Describing ACM Certificate: %s", input) - output, err := conn.DescribeCertificate(input) - if err != nil { - return fmt.Errorf("Error describing ACM certificate: %q", err) - } - certificate := output.Certificate - - if filterTypesOk { - for _, certType := range typesStrings { - if *certificate.Type == *certType { - // We do not have a candidate certificate - if matchedCertificate == nil { - matchedCertificate = certificate - break - } - // At this point, we already have a candidate certificate - // Check if we are filtering by most recent and update if necessary - if filterMostRecent { - matchedCertificate, err = mostRecentAcmCertificate(certificate, matchedCertificate) - if err != nil { - return err - } - break - } - // Now we have multiple candidate certificates and we only allow one certificate - return fmt.Errorf("Multiple certificates for domain %q found in this region", target) - } - } - continue - } - // We do not have a candidate certificate - if matchedCertificate == nil { - matchedCertificate = certificate - continue - } - // At this point, we already have a candidate certificate - // Check if we are filtering by most recent and update if necessary - if filterMostRecent { - matchedCertificate, err = mostRecentAcmCertificate(certificate, matchedCertificate) - if err != nil { - return err - } - continue - } - // Now we have multiple candidate certificates and we only allow one certificate - return fmt.Errorf("Multiple certificates for domain %q found in this region", target) - } - - if matchedCertificate == nil { - return fmt.Errorf("No certificate for domain %q found in this region", target) - } - - d.SetId(time.Now().UTC().String()) - d.Set("arn", matchedCertificate.CertificateArn) - - return nil -} - -func mostRecentAcmCertificate(i, j *acm.CertificateDetail) (*acm.CertificateDetail, error) { - if *i.Status != *j.Status { - return nil, fmt.Errorf("most_recent filtering on different ACM certificate statues is not supported") - } - // Cover IMPORTED and ISSUED AMAZON_ISSUED certificates - if *i.Status == acm.CertificateStatusIssued { - if (*i.NotBefore).After(*j.NotBefore) { - return i, nil - } - return j, nil - } - // Cover non-ISSUED AMAZON_ISSUED certificates - if (*i.CreatedAt).After(*j.CreatedAt) { - return i, nil - } - return j, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_acmpca_certificate_authority.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_acmpca_certificate_authority.go deleted file mode 100644 index b64902e2e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_acmpca_certificate_authority.go +++ /dev/null @@ -1,176 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/acmpca" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsAcmpcaCertificateAuthority() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsAcmpcaCertificateAuthorityRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Required: true, - }, - "certificate": { - Type: schema.TypeString, - Computed: true, - }, - "certificate_chain": { - Type: schema.TypeString, - Computed: true, - }, - "certificate_signing_request": { - Type: schema.TypeString, - Computed: true, - }, - "not_after": { - Type: schema.TypeString, - Computed: true, - }, - "not_before": { - Type: schema.TypeString, - Computed: true, - }, - // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_RevocationConfiguration.html - "revocation_configuration": { - Type: schema.TypeList, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CrlConfiguration.html - "crl_configuration": { - Type: schema.TypeList, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "custom_cname": { - Type: schema.TypeString, - Computed: true, - }, - "enabled": { - Type: schema.TypeBool, - Computed: true, - }, - "expiration_in_days": { - Type: schema.TypeInt, - Computed: true, - }, - "s3_bucket_name": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - }, - }, - }, - "serial": { - Type: schema.TypeString, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchemaComputed(), - "type": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsAcmpcaCertificateAuthorityRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).acmpcaconn - certificateAuthorityArn := d.Get("arn").(string) - - describeCertificateAuthorityInput := &acmpca.DescribeCertificateAuthorityInput{ - CertificateAuthorityArn: aws.String(certificateAuthorityArn), - } - - log.Printf("[DEBUG] Reading ACMPCA Certificate Authority: %s", describeCertificateAuthorityInput) - - describeCertificateAuthorityOutput, err := conn.DescribeCertificateAuthority(describeCertificateAuthorityInput) - if err != nil { - return fmt.Errorf("error reading ACMPCA Certificate Authority: %s", err) - } - - if describeCertificateAuthorityOutput.CertificateAuthority == nil { - return fmt.Errorf("error reading ACMPCA Certificate Authority: not found") - } - certificateAuthority := describeCertificateAuthorityOutput.CertificateAuthority - - d.Set("arn", certificateAuthority.Arn) - d.Set("not_after", certificateAuthority.NotAfter) - d.Set("not_before", certificateAuthority.NotBefore) - - if err := d.Set("revocation_configuration", flattenAcmpcaRevocationConfiguration(certificateAuthority.RevocationConfiguration)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - d.Set("serial", certificateAuthority.Serial) - d.Set("status", certificateAuthority.Status) - d.Set("type", certificateAuthority.Type) - - getCertificateAuthorityCertificateInput := &acmpca.GetCertificateAuthorityCertificateInput{ - CertificateAuthorityArn: aws.String(certificateAuthorityArn), - } - - log.Printf("[DEBUG] Reading ACMPCA Certificate Authority Certificate: %s", getCertificateAuthorityCertificateInput) - - getCertificateAuthorityCertificateOutput, err := conn.GetCertificateAuthorityCertificate(getCertificateAuthorityCertificateInput) - if err != nil { - // Returned when in PENDING_CERTIFICATE status - // InvalidStateException: The certificate authority XXXXX is not in the correct state to have a certificate signing request. - if !isAWSErr(err, acmpca.ErrCodeInvalidStateException, "") { - return fmt.Errorf("error reading ACMPCA Certificate Authority Certificate: %s", err) - } - } - - d.Set("certificate", "") - d.Set("certificate_chain", "") - if getCertificateAuthorityCertificateOutput != nil { - d.Set("certificate", getCertificateAuthorityCertificateOutput.Certificate) - d.Set("certificate_chain", getCertificateAuthorityCertificateOutput.CertificateChain) - } - - getCertificateAuthorityCsrInput := &acmpca.GetCertificateAuthorityCsrInput{ - CertificateAuthorityArn: aws.String(certificateAuthorityArn), - } - - log.Printf("[DEBUG] Reading ACMPCA Certificate Authority Certificate Signing Request: %s", getCertificateAuthorityCsrInput) - - getCertificateAuthorityCsrOutput, err := conn.GetCertificateAuthorityCsr(getCertificateAuthorityCsrInput) - if err != nil { - return fmt.Errorf("error reading ACMPCA Certificate Authority Certificate Signing Request: %s", err) - } - - d.Set("certificate_signing_request", "") - if getCertificateAuthorityCsrOutput != nil { - d.Set("certificate_signing_request", getCertificateAuthorityCsrOutput.Csr) - } - - tags, err := listAcmpcaTags(conn, certificateAuthorityArn) - if err != nil { - return fmt.Errorf("error reading ACMPCA Certificate Authority %q tags: %s", certificateAuthorityArn, err) - } - - if err := d.Set("tags", tagsToMapACMPCA(tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - d.SetId(certificateAuthorityArn) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami.go deleted file mode 100644 index f5b8a01d0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami.go +++ /dev/null @@ -1,442 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "regexp" - "sort" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func dataSourceAwsAmi() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsAmiRead, - - Schema: map[string]*schema.Schema{ - "filter": dataSourceFiltersSchema(), - "executable_users": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "name_regex": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.ValidateRegexp, - }, - "most_recent": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - "owners": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - // Computed values. - "architecture": { - Type: schema.TypeString, - Computed: true, - }, - "creation_date": { - Type: schema.TypeString, - Computed: true, - }, - "description": { - Type: schema.TypeString, - Computed: true, - }, - "hypervisor": { - Type: schema.TypeString, - Computed: true, - }, - "image_id": { - Type: schema.TypeString, - Computed: true, - }, - "image_location": { - Type: schema.TypeString, - Computed: true, - }, - "image_owner_alias": { - Type: schema.TypeString, - Computed: true, - }, - "image_type": { - Type: schema.TypeString, - Computed: true, - }, - "kernel_id": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Computed: true, - }, - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - "platform": { - Type: schema.TypeString, - Computed: true, - }, - "public": { - Type: schema.TypeBool, - Computed: true, - }, - "ramdisk_id": { - Type: schema.TypeString, - Computed: true, - }, - "root_device_name": { - Type: schema.TypeString, - Computed: true, - }, - "root_device_type": { - Type: schema.TypeString, - Computed: true, - }, - "root_snapshot_id": { - Type: schema.TypeString, - Computed: true, - }, - "sriov_net_support": { - Type: schema.TypeString, - Computed: true, - }, - "state": { - Type: schema.TypeString, - Computed: true, - }, - "virtualization_type": { - Type: schema.TypeString, - Computed: true, - }, - // Complex computed values - "block_device_mappings": { - Type: schema.TypeSet, - Computed: true, - Set: amiBlockDeviceMappingHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "device_name": { - Type: schema.TypeString, - Computed: true, - }, - "no_device": { - Type: schema.TypeString, - Computed: true, - }, - "virtual_name": { - Type: schema.TypeString, - Computed: true, - }, - "ebs": { - Type: schema.TypeMap, - Computed: true, - }, - }, - }, - }, - "product_codes": { - Type: schema.TypeSet, - Computed: true, - Set: amiProductCodesHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "product_code_id": { - Type: schema.TypeString, - Computed: true, - }, - "product_code_type": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "state_reason": { - Type: schema.TypeMap, - Computed: true, - }, - "tags": tagsSchemaComputed(), - }, - } -} - -// dataSourceAwsAmiDescriptionRead performs the AMI lookup. -func dataSourceAwsAmiRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - executableUsers, executableUsersOk := d.GetOk("executable_users") - filters, filtersOk := d.GetOk("filter") - nameRegex, nameRegexOk := d.GetOk("name_regex") - owners, ownersOk := d.GetOk("owners") - - if !executableUsersOk && !filtersOk && !nameRegexOk && !ownersOk { - return fmt.Errorf("One of executable_users, filters, name_regex, or owners must be assigned") - } - - params := &ec2.DescribeImagesInput{} - if executableUsersOk { - params.ExecutableUsers = expandStringList(executableUsers.([]interface{})) - } - if filtersOk { - params.Filters = buildAwsDataSourceFilters(filters.(*schema.Set)) - } - if ownersOk { - o := expandStringList(owners.([]interface{})) - - if len(o) > 0 { - params.Owners = o - } - } - - // Deprecated: pre-2.0.0 warning logging - if !ownersOk { - log.Print("[WARN] The \"owners\" argument will become required in the next major version.") - log.Print("[WARN] Documentation can be found at: https://www.terraform.io/docs/providers/aws/d/ami.html#owners") - - missingOwnerFilter := true - - if filtersOk { - for _, filter := range params.Filters { - if aws.StringValue(filter.Name) == "owner-alias" || aws.StringValue(filter.Name) == "owner-id" { - missingOwnerFilter = false - break - } - } - } - - if missingOwnerFilter { - log.Print("[WARN] Potential security issue: missing \"owners\" filtering for AMI. Check AMI to ensure it came from trusted source.") - } - } - - log.Printf("[DEBUG] Reading AMI: %s", params) - resp, err := conn.DescribeImages(params) - if err != nil { - return err - } - - var filteredImages []*ec2.Image - if nameRegexOk { - r := regexp.MustCompile(nameRegex.(string)) - for _, image := range resp.Images { - // Check for a very rare case where the response would include no - // image name. No name means nothing to attempt a match against, - // therefore we are skipping such image. - if image.Name == nil || *image.Name == "" { - log.Printf("[WARN] Unable to find AMI name to match against "+ - "for image ID %q owned by %q, nothing to do.", - *image.ImageId, *image.OwnerId) - continue - } - if r.MatchString(*image.Name) { - filteredImages = append(filteredImages, image) - } - } - } else { - filteredImages = resp.Images[:] - } - - if len(filteredImages) < 1 { - return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") - } - - if len(filteredImages) > 1 { - if !d.Get("most_recent").(bool) { - return fmt.Errorf("Your query returned more than one result. Please try a more " + - "specific search criteria, or set `most_recent` attribute to true.") - } - sort.Slice(filteredImages, func(i, j int) bool { - itime, _ := time.Parse(time.RFC3339, aws.StringValue(filteredImages[i].CreationDate)) - jtime, _ := time.Parse(time.RFC3339, aws.StringValue(filteredImages[j].CreationDate)) - return itime.Unix() > jtime.Unix() - }) - } - - return amiDescriptionAttributes(d, filteredImages[0]) -} - -// populate the numerous fields that the image description returns. -func amiDescriptionAttributes(d *schema.ResourceData, image *ec2.Image) error { - // Simple attributes first - d.SetId(*image.ImageId) - d.Set("architecture", image.Architecture) - d.Set("creation_date", image.CreationDate) - if image.Description != nil { - d.Set("description", image.Description) - } - d.Set("hypervisor", image.Hypervisor) - d.Set("image_id", image.ImageId) - d.Set("image_location", image.ImageLocation) - if image.ImageOwnerAlias != nil { - d.Set("image_owner_alias", image.ImageOwnerAlias) - } - d.Set("image_type", image.ImageType) - if image.KernelId != nil { - d.Set("kernel_id", image.KernelId) - } - d.Set("name", image.Name) - d.Set("owner_id", image.OwnerId) - if image.Platform != nil { - d.Set("platform", image.Platform) - } - d.Set("public", image.Public) - if image.RamdiskId != nil { - d.Set("ramdisk_id", image.RamdiskId) - } - if image.RootDeviceName != nil { - d.Set("root_device_name", image.RootDeviceName) - } - d.Set("root_device_type", image.RootDeviceType) - d.Set("root_snapshot_id", amiRootSnapshotId(image)) - if image.SriovNetSupport != nil { - d.Set("sriov_net_support", image.SriovNetSupport) - } - d.Set("state", image.State) - d.Set("virtualization_type", image.VirtualizationType) - // Complex types get their own functions - if err := d.Set("block_device_mappings", amiBlockDeviceMappings(image.BlockDeviceMappings)); err != nil { - return err - } - if err := d.Set("product_codes", amiProductCodes(image.ProductCodes)); err != nil { - return err - } - if err := d.Set("state_reason", amiStateReason(image.StateReason)); err != nil { - return err - } - if err := d.Set("tags", tagsToMap(image.Tags)); err != nil { - return err - } - return nil -} - -// Returns a set of block device mappings. -func amiBlockDeviceMappings(m []*ec2.BlockDeviceMapping) *schema.Set { - s := &schema.Set{ - F: amiBlockDeviceMappingHash, - } - for _, v := range m { - mapping := map[string]interface{}{ - "device_name": aws.StringValue(v.DeviceName), - "virtual_name": aws.StringValue(v.VirtualName), - } - - if v.Ebs != nil { - ebs := map[string]interface{}{ - "delete_on_termination": fmt.Sprintf("%t", aws.BoolValue(v.Ebs.DeleteOnTermination)), - "encrypted": fmt.Sprintf("%t", aws.BoolValue(v.Ebs.Encrypted)), - "iops": fmt.Sprintf("%d", aws.Int64Value(v.Ebs.Iops)), - "volume_size": fmt.Sprintf("%d", aws.Int64Value(v.Ebs.VolumeSize)), - "snapshot_id": aws.StringValue(v.Ebs.SnapshotId), - "volume_type": aws.StringValue(v.Ebs.VolumeType), - } - - mapping["ebs"] = ebs - } - - log.Printf("[DEBUG] aws_ami - adding block device mapping: %v", mapping) - s.Add(mapping) - } - return s -} - -// Returns a set of product codes. -func amiProductCodes(m []*ec2.ProductCode) *schema.Set { - s := &schema.Set{ - F: amiProductCodesHash, - } - for _, v := range m { - code := map[string]interface{}{ - "product_code_id": aws.StringValue(v.ProductCodeId), - "product_code_type": aws.StringValue(v.ProductCodeType), - } - s.Add(code) - } - return s -} - -// Returns the root snapshot ID for an image, if it has one -func amiRootSnapshotId(image *ec2.Image) string { - if image.RootDeviceName == nil { - return "" - } - for _, bdm := range image.BlockDeviceMappings { - if bdm.DeviceName == nil || *bdm.DeviceName != *image.RootDeviceName { - continue - } - if bdm.Ebs != nil && bdm.Ebs.SnapshotId != nil { - return *bdm.Ebs.SnapshotId - } - } - return "" -} - -// Returns the state reason. -func amiStateReason(m *ec2.StateReason) map[string]interface{} { - s := make(map[string]interface{}) - if m != nil { - s["code"] = aws.StringValue(m.Code) - s["message"] = aws.StringValue(m.Message) - } else { - s["code"] = "UNSET" - s["message"] = "UNSET" - } - return s -} - -// Generates a hash for the set hash function used by the block_device_mappings -// attribute. -func amiBlockDeviceMappingHash(v interface{}) int { - var buf bytes.Buffer - // All keys added in alphabetical order. - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["device_name"].(string))) - if d, ok := m["ebs"]; ok { - if len(d.(map[string]interface{})) > 0 { - e := d.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", e["delete_on_termination"].(string))) - buf.WriteString(fmt.Sprintf("%s-", e["encrypted"].(string))) - buf.WriteString(fmt.Sprintf("%s-", e["iops"].(string))) - buf.WriteString(fmt.Sprintf("%s-", e["volume_size"].(string))) - buf.WriteString(fmt.Sprintf("%s-", e["volume_type"].(string))) - } - } - if d, ok := m["no_device"]; ok { - buf.WriteString(fmt.Sprintf("%s-", d.(string))) - } - if d, ok := m["virtual_name"]; ok { - buf.WriteString(fmt.Sprintf("%s-", d.(string))) - } - if d, ok := m["snapshot_id"]; ok { - buf.WriteString(fmt.Sprintf("%s-", d.(string))) - } - return hashcode.String(buf.String()) -} - -// Generates a hash for the set hash function used by the product_codes -// attribute. -func amiProductCodesHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - // All keys added in alphabetical order. - buf.WriteString(fmt.Sprintf("%s-", m["product_code_id"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["product_code_type"].(string))) - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go deleted file mode 100644 index 7c932fa6c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go +++ /dev/null @@ -1,150 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "sort" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func dataSourceAwsAmiIds() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsAmiIdsRead, - - Schema: map[string]*schema.Schema{ - "filter": dataSourceFiltersSchema(), - "executable_users": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "name_regex": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.ValidateRegexp, - }, - "owners": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "ids": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "sort_ascending": { - Type: schema.TypeBool, - Default: false, - Optional: true, - }, - }, - } -} - -func dataSourceAwsAmiIdsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - executableUsers, executableUsersOk := d.GetOk("executable_users") - filters, filtersOk := d.GetOk("filter") - nameRegex, nameRegexOk := d.GetOk("name_regex") - owners, ownersOk := d.GetOk("owners") - sortAscending := d.Get("sort_ascending").(bool) - - if !executableUsersOk && !filtersOk && !nameRegexOk && !ownersOk { - return fmt.Errorf("One of executable_users, filters, name_regex, or owners must be assigned") - } - - params := &ec2.DescribeImagesInput{} - - if executableUsersOk { - params.ExecutableUsers = expandStringList(executableUsers.([]interface{})) - } - if filtersOk { - params.Filters = buildAwsDataSourceFilters(filters.(*schema.Set)) - } - if ownersOk { - o := expandStringList(owners.([]interface{})) - - if len(o) > 0 { - params.Owners = o - } - } - - // Deprecated: pre-2.0.0 warning logging - if !ownersOk { - log.Print("[WARN] The \"owners\" argument will become required in the next major version.") - log.Print("[WARN] Documentation can be found at: https://www.terraform.io/docs/providers/aws/d/ami.html#owners") - - missingOwnerFilter := true - - if filtersOk { - for _, filter := range params.Filters { - if aws.StringValue(filter.Name) == "owner-alias" || aws.StringValue(filter.Name) == "owner-id" { - missingOwnerFilter = false - break - } - } - } - - if missingOwnerFilter { - log.Print("[WARN] Potential security issue: missing \"owners\" filtering for AMI. Check AMI to ensure it came from trusted source.") - } - } - - log.Printf("[DEBUG] Reading AMI IDs: %s", params) - resp, err := conn.DescribeImages(params) - if err != nil { - return err - } - - var filteredImages []*ec2.Image - imageIds := make([]string, 0) - - if nameRegexOk { - r := regexp.MustCompile(nameRegex.(string)) - for _, image := range resp.Images { - // Check for a very rare case where the response would include no - // image name. No name means nothing to attempt a match against, - // therefore we are skipping such image. - if image.Name == nil || *image.Name == "" { - log.Printf("[WARN] Unable to find AMI name to match against "+ - "for image ID %q owned by %q, nothing to do.", - *image.ImageId, *image.OwnerId) - continue - } - if r.MatchString(*image.Name) { - filteredImages = append(filteredImages, image) - } - } - } else { - filteredImages = resp.Images[:] - } - - sort.Slice(filteredImages, func(i, j int) bool { - itime, _ := time.Parse(time.RFC3339, aws.StringValue(filteredImages[i].CreationDate)) - jtime, _ := time.Parse(time.RFC3339, aws.StringValue(filteredImages[j].CreationDate)) - if sortAscending { - return itime.Unix() < jtime.Unix() - } - return itime.Unix() > jtime.Unix() - }) - for _, image := range filteredImages { - imageIds = append(imageIds, *image.ImageId) - } - - d.SetId(fmt.Sprintf("%d", hashcode.String(params.String()))) - d.Set("ids", imageIds) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_api_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_api_key.go deleted file mode 100644 index e9a7d7a97..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_api_key.go +++ /dev/null @@ -1,45 +0,0 @@ -package aws - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsApiGatewayApiKey() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsApiGatewayApiKeyRead, - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Required: true, - }, - "name": { - Type: schema.TypeString, - Computed: true, - }, - "value": { - Type: schema.TypeString, - Computed: true, - Sensitive: true, - }, - }, - } -} - -func dataSourceAwsApiGatewayApiKeyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - apiKey, err := conn.GetApiKey(&apigateway.GetApiKeyInput{ - ApiKey: aws.String(d.Get("id").(string)), - IncludeValue: aws.Bool(true), - }) - - if err != nil { - return err - } - - d.SetId(aws.StringValue(apiKey.Id)) - d.Set("name", apiKey.Name) - d.Set("value", apiKey.Value) - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_resource.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_resource.go deleted file mode 100644 index 5092285fc..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_resource.go +++ /dev/null @@ -1,67 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsApiGatewayResource() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsApiGatewayResourceRead, - Schema: map[string]*schema.Schema{ - "rest_api_id": { - Type: schema.TypeString, - Required: true, - }, - "path": { - Type: schema.TypeString, - Required: true, - }, - "path_part": { - Type: schema.TypeString, - Computed: true, - }, - "parent_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsApiGatewayResourceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - restApiId := d.Get("rest_api_id").(string) - target := d.Get("path").(string) - params := &apigateway.GetResourcesInput{RestApiId: aws.String(restApiId)} - - var match *apigateway.Resource - log.Printf("[DEBUG] Reading API Gateway Resources: %s", params) - err := conn.GetResourcesPages(params, func(page *apigateway.GetResourcesOutput, lastPage bool) bool { - for _, resource := range page.Items { - if aws.StringValue(resource.Path) == target { - match = resource - return false - } - } - return !lastPage - }) - if err != nil { - return fmt.Errorf("error describing API Gateway Resources: %s", err) - } - - if match == nil { - return fmt.Errorf("no Resources with path %q found for rest api %q", target, restApiId) - } - - d.SetId(*match.Id) - d.Set("path_part", match.PathPart) - d.Set("parent_id", match.ParentId) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_rest_api.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_rest_api.go deleted file mode 100644 index cc71d87d2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_rest_api.go +++ /dev/null @@ -1,73 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsApiGatewayRestApi() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsApiGatewayRestApiRead, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "root_resource_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - params := &apigateway.GetRestApisInput{} - - target := d.Get("name") - var matchedApis []*apigateway.RestApi - log.Printf("[DEBUG] Reading API Gateway REST APIs: %s", params) - err := conn.GetRestApisPages(params, func(page *apigateway.GetRestApisOutput, lastPage bool) bool { - for _, api := range page.Items { - if aws.StringValue(api.Name) == target { - matchedApis = append(matchedApis, api) - } - } - return !lastPage - }) - if err != nil { - return fmt.Errorf("error describing API Gateway REST APIs: %s", err) - } - - if len(matchedApis) == 0 { - return fmt.Errorf("no REST APIs with name %q found in this region", target) - } - if len(matchedApis) > 1 { - return fmt.Errorf("multiple REST APIs with name %q found in this region", target) - } - - match := matchedApis[0] - - d.SetId(*match.Id) - - resp, err := conn.GetResources(&apigateway.GetResourcesInput{ - RestApiId: aws.String(d.Id()), - }) - if err != nil { - return err - } - - for _, item := range resp.Items { - if *item.Path == "/" { - d.Set("root_resource_id", item.Id) - break - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_vpc_link.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_vpc_link.go deleted file mode 100644 index 7ce38d711..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_vpc_link.go +++ /dev/null @@ -1,62 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsApiGatewayVpcLink() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsApiGatewayVpcLinkRead, - - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Required: true, - }, - }, - } -} - -func dataSourceAwsApiGatewayVpcLinkRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - params := &apigateway.GetVpcLinksInput{} - - target := d.Get("name") - var matchedVpcLinks []*apigateway.UpdateVpcLinkOutput - log.Printf("[DEBUG] Reading API Gateway VPC links: %s", params) - err := conn.GetVpcLinksPages(params, func(page *apigateway.GetVpcLinksOutput, lastPage bool) bool { - for _, api := range page.Items { - if aws.StringValue(api.Name) == target { - matchedVpcLinks = append(matchedVpcLinks, api) - } - } - return !lastPage - }) - if err != nil { - return fmt.Errorf("error describing API Gateway VPC links: %s", err) - } - - if len(matchedVpcLinks) == 0 { - return fmt.Errorf("no API Gateway VPC link with name %q found in this region", target) - } - if len(matchedVpcLinks) > 1 { - return fmt.Errorf("multiple API Gateway VPC links with name %q found in this region", target) - } - - match := matchedVpcLinks[0] - - d.SetId(*match.Id) - d.Set("name", match.Name) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_arn.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_arn.go deleted file mode 100644 index 93a369355..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_arn.go +++ /dev/null @@ -1,59 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsArn() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsArnRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "partition": { - Type: schema.TypeString, - Computed: true, - }, - "service": { - Type: schema.TypeString, - Computed: true, - }, - "region": { - Type: schema.TypeString, - Computed: true, - }, - "account": { - Type: schema.TypeString, - Computed: true, - }, - "resource": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsArnRead(d *schema.ResourceData, meta interface{}) error { - v := d.Get("arn").(string) - arn, err := arn.Parse(v) - if err != nil { - return fmt.Errorf("Error parsing '%s': %s", v, err.Error()) - } - - d.SetId(arn.String()) - d.Set("partition", arn.Partition) - d.Set("service", arn.Service) - d.Set("region", arn.Region) - d.Set("account", arn.AccountID) - d.Set("resource", arn.Resource) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_group.go deleted file mode 100644 index 291af71ef..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_group.go +++ /dev/null @@ -1,181 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsAutoscalingGroup() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsAutoscalingGroupRead, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "availability_zones": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - "default_cooldown": { - Type: schema.TypeInt, - Computed: true, - }, - "desired_capacity": { - Type: schema.TypeInt, - Computed: true, - }, - "health_check_grace_period": { - Type: schema.TypeInt, - Computed: true, - }, - "health_check_type": { - Type: schema.TypeString, - Computed: true, - }, - "launch_configuration": { - Type: schema.TypeString, - Computed: true, - }, - "load_balancers": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - "new_instances_protected_from_scale_in": { - Type: schema.TypeBool, - Computed: true, - }, - "max_size": { - Type: schema.TypeInt, - Computed: true, - }, - "min_size": { - Type: schema.TypeInt, - Computed: true, - }, - "placement_group": { - Type: schema.TypeString, - Computed: true, - }, - "service_linked_role_arn": { - Type: schema.TypeString, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "target_group_arns": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - "termination_policies": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - "vpc_zone_identifier": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsAutoscalingGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).autoscalingconn - d.SetId(time.Now().UTC().String()) - - groupName := d.Get("name").(string) - - input := &autoscaling.DescribeAutoScalingGroupsInput{ - AutoScalingGroupNames: []*string{ - aws.String(groupName), - }, - } - - log.Printf("[DEBUG] Reading Autoscaling Group: %s", input) - - result, err := conn.DescribeAutoScalingGroups(input) - - log.Printf("[DEBUG] Checking for error: %s", err) - - if err != nil { - return fmt.Errorf("error describing AutoScaling Groups: %s", err) - } - - log.Printf("[DEBUG] Found Autoscaling Group: %s", result) - - if len(result.AutoScalingGroups) < 1 { - return fmt.Errorf("Your query did not return any results. Please try a different search criteria.") - } - - if len(result.AutoScalingGroups) > 1 { - return fmt.Errorf("Your query returned more than one result. Please try a more " + - "specific search criteria.") - } - - // If execution made it to this point, we have exactly one 1 group returned - // and this is a safe operation - group := result.AutoScalingGroups[0] - - log.Printf("[DEBUG] aws_autoscaling_group - Single Auto Scaling Group found: %s", *group.AutoScalingGroupName) - - err1 := groupDescriptionAttributes(d, group) - return err1 -} - -// Populate group attribute fields with the returned group -func groupDescriptionAttributes(d *schema.ResourceData, group *autoscaling.Group) error { - log.Printf("[DEBUG] Setting attributes: %s", group) - d.Set("name", group.AutoScalingGroupName) - d.Set("arn", group.AutoScalingGroupARN) - if err := d.Set("availability_zones", aws.StringValueSlice(group.AvailabilityZones)); err != nil { - return err - } - d.Set("default_cooldown", group.DefaultCooldown) - d.Set("desired_capacity", group.DesiredCapacity) - d.Set("health_check_grace_period", group.HealthCheckGracePeriod) - d.Set("health_check_type", group.HealthCheckType) - d.Set("launch_configuration", group.LaunchConfigurationName) - if err := d.Set("load_balancers", aws.StringValueSlice(group.LoadBalancerNames)); err != nil { - return err - } - d.Set("new_instances_protected_from_scale_in", group.NewInstancesProtectedFromScaleIn) - d.Set("max_size", group.MaxSize) - d.Set("min_size", group.MinSize) - d.Set("placement_group", group.PlacementGroup) - d.Set("service_linked_role_arn", group.ServiceLinkedRoleARN) - d.Set("status", group.Status) - if err := d.Set("target_group_arns", aws.StringValueSlice(group.TargetGroupARNs)); err != nil { - return err - } - if err := d.Set("termination_policies", aws.StringValueSlice(group.TerminationPolicies)); err != nil { - return err - } - d.Set("vpc_zone_identifier", group.VPCZoneIdentifier) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go deleted file mode 100644 index 3498cc7e0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go +++ /dev/null @@ -1,133 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "sort" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsAutoscalingGroups() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsAutoscalingGroupsRead, - - Schema: map[string]*schema.Schema{ - "names": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "arns": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "filter": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "values": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - }, - }, - }, - } -} - -func dataSourceAwsAutoscalingGroupsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).autoscalingconn - - log.Printf("[DEBUG] Reading Autoscaling Groups.") - d.SetId(time.Now().UTC().String()) - - var rawName []string - var rawArn []string - var err error - - tf := d.Get("filter").(*schema.Set) - if tf.Len() > 0 { - input := &autoscaling.DescribeTagsInput{ - Filters: expandAsgTagFilters(tf.List()), - } - err = conn.DescribeTagsPages(input, func(resp *autoscaling.DescribeTagsOutput, lastPage bool) bool { - for _, v := range resp.Tags { - rawName = append(rawName, aws.StringValue(v.ResourceId)) - } - return !lastPage - }) - - maxAutoScalingGroupNames := 1600 - for i := 0; i < len(rawName); i += maxAutoScalingGroupNames { - end := i + maxAutoScalingGroupNames - - if end > len(rawName) { - end = len(rawName) - } - - nameInput := &autoscaling.DescribeAutoScalingGroupsInput{ - AutoScalingGroupNames: aws.StringSlice(rawName[i:end]), - MaxRecords: aws.Int64(100), - } - - err = conn.DescribeAutoScalingGroupsPages(nameInput, func(resp *autoscaling.DescribeAutoScalingGroupsOutput, lastPage bool) bool { - for _, group := range resp.AutoScalingGroups { - rawArn = append(rawArn, aws.StringValue(group.AutoScalingGroupARN)) - } - return !lastPage - }) - } - } else { - err = conn.DescribeAutoScalingGroupsPages(&autoscaling.DescribeAutoScalingGroupsInput{}, func(resp *autoscaling.DescribeAutoScalingGroupsOutput, lastPage bool) bool { - for _, group := range resp.AutoScalingGroups { - rawName = append(rawName, aws.StringValue(group.AutoScalingGroupName)) - rawArn = append(rawArn, aws.StringValue(group.AutoScalingGroupARN)) - } - return !lastPage - }) - } - if err != nil { - return fmt.Errorf("Error fetching Autoscaling Groups: %s", err) - } - - sort.Strings(rawName) - sort.Strings(rawArn) - - if err := d.Set("names", rawName); err != nil { - return fmt.Errorf("[WARN] Error setting Autoscaling Group Names: %s", err) - } - - if err := d.Set("arns", rawArn); err != nil { - return fmt.Errorf("[WARN] Error setting Autoscaling Group Arns: %s", err) - } - - return nil - -} - -func expandAsgTagFilters(in []interface{}) []*autoscaling.Filter { - out := make([]*autoscaling.Filter, len(in)) - for i, filter := range in { - m := filter.(map[string]interface{}) - values := expandStringList(m["values"].(*schema.Set).List()) - - out[i] = &autoscaling.Filter{ - Name: aws.String(m["name"].(string)), - Values: values, - } - } - return out -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zone.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zone.go deleted file mode 100644 index bc660cfdb..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zone.go +++ /dev/null @@ -1,97 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsAvailabilityZone() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsAvailabilityZoneRead, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "region": { - Type: schema.TypeString, - Computed: true, - }, - - "name_suffix": { - Type: schema.TypeString, - Computed: true, - }, - - "state": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "zone_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - } -} - -func dataSourceAwsAvailabilityZoneRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeAvailabilityZonesInput{} - - if v := d.Get("name").(string); v != "" { - req.ZoneNames = []*string{aws.String(v)} - } - if v := d.Get("zone_id").(string); v != "" { - req.ZoneIds = []*string{aws.String(v)} - } - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "state": d.Get("state").(string), - }, - ) - if len(req.Filters) == 0 { - // Don't send an empty filters list; the EC2 API won't accept it. - req.Filters = nil - } - - log.Printf("[DEBUG] Reading Availability Zone: %s", req) - resp, err := conn.DescribeAvailabilityZones(req) - if err != nil { - return err - } - if resp == nil || len(resp.AvailabilityZones) == 0 { - return fmt.Errorf("no matching AZ found") - } - if len(resp.AvailabilityZones) > 1 { - return fmt.Errorf("multiple AZs matched; use additional constraints to reduce matches to a single AZ") - } - - az := resp.AvailabilityZones[0] - - // As a convenience when working with AZs generically, we expose - // the AZ suffix alone, without the region name. - // This can be used e.g. to create lookup tables by AZ letter that - // work regardless of region. - nameSuffix := (*az.ZoneName)[len(*az.RegionName):] - - d.SetId(aws.StringValue(az.ZoneName)) - d.Set("name", az.ZoneName) - d.Set("name_suffix", nameSuffix) - d.Set("region", az.RegionName) - d.Set("state", az.State) - d.Set("zone_id", az.ZoneId) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zones.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zones.go deleted file mode 100644 index ef15bd0e0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zones.go +++ /dev/null @@ -1,86 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "sort" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func dataSourceAwsAvailabilityZones() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsAvailabilityZonesRead, - - Schema: map[string]*schema.Schema{ - "names": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "state": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - ec2.AvailabilityZoneStateAvailable, - ec2.AvailabilityZoneStateInformation, - ec2.AvailabilityZoneStateImpaired, - ec2.AvailabilityZoneStateUnavailable, - }, false), - }, - "zone_ids": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func dataSourceAwsAvailabilityZonesRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[DEBUG] Reading Availability Zones.") - d.SetId(time.Now().UTC().String()) - - request := &ec2.DescribeAvailabilityZonesInput{} - - if v, ok := d.GetOk("state"); ok { - request.Filters = []*ec2.Filter{ - { - Name: aws.String("state"), - Values: []*string{aws.String(v.(string))}, - }, - } - } - - log.Printf("[DEBUG] Reading Availability Zones: %s", request) - resp, err := conn.DescribeAvailabilityZones(request) - if err != nil { - return fmt.Errorf("Error fetching Availability Zones: %s", err) - } - - sort.Slice(resp.AvailabilityZones, func(i, j int) bool { - return aws.StringValue(resp.AvailabilityZones[i].ZoneName) < aws.StringValue(resp.AvailabilityZones[j].ZoneName) - }) - - names := []string{} - zoneIds := []string{} - for _, v := range resp.AvailabilityZones { - names = append(names, aws.StringValue(v.ZoneName)) - zoneIds = append(zoneIds, aws.StringValue(v.ZoneId)) - } - - if err := d.Set("names", names); err != nil { - return fmt.Errorf("Error setting Availability Zone names: %s", err) - } - if err := d.Set("zone_ids", zoneIds); err != nil { - return fmt.Errorf("Error setting Availability Zone IDs: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_batch_compute_environment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_batch_compute_environment.go deleted file mode 100644 index 11c363150..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_batch_compute_environment.go +++ /dev/null @@ -1,93 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/batch" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsBatchComputeEnvironment() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsBatchComputeEnvironmentRead, - - Schema: map[string]*schema.Schema{ - "compute_environment_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "ecs_cluster_arn": { - Type: schema.TypeString, - Computed: true, - }, - - "service_role": { - Type: schema.TypeString, - Computed: true, - }, - - "type": { - Type: schema.TypeString, - Computed: true, - }, - - "status": { - Type: schema.TypeString, - Computed: true, - }, - - "status_reason": { - Type: schema.TypeString, - Computed: true, - }, - - "state": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsBatchComputeEnvironmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).batchconn - - params := &batch.DescribeComputeEnvironmentsInput{ - ComputeEnvironments: []*string{aws.String(d.Get("compute_environment_name").(string))}, - } - log.Printf("[DEBUG] Reading Batch Compute Environment: %s", params) - desc, err := conn.DescribeComputeEnvironments(params) - - if err != nil { - return err - } - - if len(desc.ComputeEnvironments) == 0 { - return fmt.Errorf("no matches found for name: %s", d.Get("compute_environment_name").(string)) - } - - if len(desc.ComputeEnvironments) > 1 { - return fmt.Errorf("multiple matches found for name: %s", d.Get("compute_environment_name").(string)) - } - - computeEnvironment := desc.ComputeEnvironments[0] - d.SetId(aws.StringValue(computeEnvironment.ComputeEnvironmentArn)) - d.Set("arn", computeEnvironment.ComputeEnvironmentArn) - d.Set("compute_environment_name", computeEnvironment.ComputeEnvironmentName) - d.Set("ecs_cluster_arn", computeEnvironment.EcsClusterArn) - d.Set("service_role", computeEnvironment.ServiceRole) - d.Set("type", computeEnvironment.Type) - d.Set("status", computeEnvironment.Status) - d.Set("status_reason", computeEnvironment.StatusReason) - d.Set("state", computeEnvironment.State) - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_batch_job_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_batch_job_queue.go deleted file mode 100644 index 8afca929b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_batch_job_queue.go +++ /dev/null @@ -1,110 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/batch" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsBatchJobQueue() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsBatchJobQueueRead, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "status": { - Type: schema.TypeString, - Computed: true, - }, - - "status_reason": { - Type: schema.TypeString, - Computed: true, - }, - - "state": { - Type: schema.TypeString, - Computed: true, - }, - - "priority": { - Type: schema.TypeInt, - Computed: true, - }, - - "compute_environment_order": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "compute_environment": { - Type: schema.TypeString, - Computed: true, - }, - "order": { - Type: schema.TypeInt, - Computed: true, - }, - }, - }, - }, - }, - } -} - -func dataSourceAwsBatchJobQueueRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).batchconn - - params := &batch.DescribeJobQueuesInput{ - JobQueues: []*string{aws.String(d.Get("name").(string))}, - } - log.Printf("[DEBUG] Reading Batch Job Queue: %s", params) - desc, err := conn.DescribeJobQueues(params) - - if err != nil { - return err - } - - if len(desc.JobQueues) == 0 { - return fmt.Errorf("no matches found for name: %s", d.Get("name").(string)) - } - - if len(desc.JobQueues) > 1 { - return fmt.Errorf("multiple matches found for name: %s", d.Get("name").(string)) - } - - jobQueue := desc.JobQueues[0] - d.SetId(aws.StringValue(jobQueue.JobQueueArn)) - d.Set("arn", jobQueue.JobQueueArn) - d.Set("name", jobQueue.JobQueueName) - d.Set("status", jobQueue.Status) - d.Set("status_reason", jobQueue.StatusReason) - d.Set("state", jobQueue.State) - d.Set("priority", jobQueue.Priority) - - ceos := make([]map[string]interface{}, 0) - for _, v := range jobQueue.ComputeEnvironmentOrder { - ceo := map[string]interface{}{} - ceo["compute_environment"] = aws.StringValue(v.ComputeEnvironment) - ceo["order"] = int(aws.Int64Value(v.Order)) - ceos = append(ceos, ceo) - } - if err := d.Set("compute_environment_order", ceos); err != nil { - return fmt.Errorf("error setting compute_environment_order: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_billing_service_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_billing_service_account.go deleted file mode 100644 index 03ec2f7c4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_billing_service_account.go +++ /dev/null @@ -1,35 +0,0 @@ -package aws - -import ( - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/hashicorp/terraform/helper/schema" -) - -// See http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-getting-started.html#step-2 -var billingAccountId = "386209384616" - -func dataSourceAwsBillingServiceAccount() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsBillingServiceAccountRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsBillingServiceAccountRead(d *schema.ResourceData, meta interface{}) error { - d.SetId(billingAccountId) - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "iam", - AccountID: billingAccountId, - Resource: "root", - }.String() - d.Set("arn", arn) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_caller_identity.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_caller_identity.go deleted file mode 100644 index 2a87b21f7..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_caller_identity.go +++ /dev/null @@ -1,53 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/service/sts" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsCallerIdentity() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsCallerIdentityRead, - - Schema: map[string]*schema.Schema{ - "account_id": { - Type: schema.TypeString, - Computed: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "user_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsCallerIdentityRead(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).stsconn - - log.Printf("[DEBUG] Reading Caller Identity") - res, err := client.GetCallerIdentity(&sts.GetCallerIdentityInput{}) - - if err != nil { - return fmt.Errorf("Error getting Caller Identity: %v", err) - } - - log.Printf("[DEBUG] Received Caller Identity: %s", res) - - d.SetId(time.Now().UTC().String()) - d.Set("account_id", res.Account) - d.Set("arn", res.Arn) - d.Set("user_id", res.UserId) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_canonical_user_id.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_canonical_user_id.go deleted file mode 100644 index b5d659506..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_canonical_user_id.go +++ /dev/null @@ -1,43 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsCanonicalUserId() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsCanonicalUserIdRead, - - Schema: map[string]*schema.Schema{ - "display_name": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsCanonicalUserIdRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).s3conn - - log.Printf("[DEBUG] Reading S3 Buckets") - - req := &s3.ListBucketsInput{} - resp, err := conn.ListBuckets(req) - if err != nil { - return err - } - if resp == nil || resp.Owner == nil { - return fmt.Errorf("no canonical user ID found") - } - - d.SetId(aws.StringValue(resp.Owner.ID)) - d.Set("display_name", resp.Owner.DisplayName) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_export.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_export.go deleted file mode 100644 index 493d28aab..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_export.go +++ /dev/null @@ -1,58 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudformation" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsCloudFormationExport() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsCloudFormationExportRead, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Computed: true, - }, - "exporting_stack_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsCloudFormationExportRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cfconn - var value string - name := d.Get("name").(string) - region := meta.(*AWSClient).region - d.SetId(fmt.Sprintf("cloudformation-exports-%s-%s", region, name)) - input := &cloudformation.ListExportsInput{} - err := conn.ListExportsPages(input, - func(page *cloudformation.ListExportsOutput, lastPage bool) bool { - for _, e := range page.Exports { - if name == aws.StringValue(e.Name) { - value = aws.StringValue(e.Value) - d.Set("value", e.Value) - d.Set("exporting_stack_id", e.ExportingStackId) - return false - } - } - return !lastPage - }) - if err != nil { - return fmt.Errorf("Failed listing CloudFormation exports: %s", err) - } - if value == "" { - return fmt.Errorf("%s was not found in CloudFormation Exports for region %s", name, region) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_stack.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_stack.go deleted file mode 100644 index 84bc051fb..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_stack.go +++ /dev/null @@ -1,123 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudformation" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsCloudFormationStack() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsCloudFormationStackRead, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "template_body": { - Type: schema.TypeString, - Computed: true, - StateFunc: func(v interface{}) string { - template, _ := normalizeCloudFormationTemplate(v) - return template - }, - }, - "capabilities": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "description": { - Type: schema.TypeString, - Computed: true, - }, - "disable_rollback": { - Type: schema.TypeBool, - Computed: true, - }, - "notification_arns": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "parameters": { - Type: schema.TypeMap, - Computed: true, - }, - "outputs": { - Type: schema.TypeMap, - Computed: true, - }, - "timeout_in_minutes": { - Type: schema.TypeInt, - Computed: true, - }, - "iam_role_arn": { - Type: schema.TypeString, - Computed: true, - }, - "tags": { - Type: schema.TypeMap, - Computed: true, - }, - }, - } -} - -func dataSourceAwsCloudFormationStackRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cfconn - name := d.Get("name").(string) - input := &cloudformation.DescribeStacksInput{ - StackName: aws.String(name), - } - - log.Printf("[DEBUG] Reading CloudFormation Stack: %s", input) - out, err := conn.DescribeStacks(input) - if err != nil { - return fmt.Errorf("Failed describing CloudFormation stack (%s): %s", name, err) - } - if l := len(out.Stacks); l != 1 { - return fmt.Errorf("Expected 1 CloudFormation stack (%s), found %d", name, l) - } - stack := out.Stacks[0] - d.SetId(*stack.StackId) - - d.Set("description", stack.Description) - d.Set("disable_rollback", stack.DisableRollback) - d.Set("timeout_in_minutes", stack.TimeoutInMinutes) - d.Set("iam_role_arn", stack.RoleARN) - - if len(stack.NotificationARNs) > 0 { - d.Set("notification_arns", schema.NewSet(schema.HashString, flattenStringList(stack.NotificationARNs))) - } - - d.Set("parameters", flattenAllCloudFormationParameters(stack.Parameters)) - d.Set("tags", flattenCloudFormationTags(stack.Tags)) - d.Set("outputs", flattenCloudFormationOutputs(stack.Outputs)) - - if len(stack.Capabilities) > 0 { - d.Set("capabilities", schema.NewSet(schema.HashString, flattenStringList(stack.Capabilities))) - } - - tInput := cloudformation.GetTemplateInput{ - StackName: aws.String(name), - } - tOut, err := conn.GetTemplate(&tInput) - if err != nil { - return err - } - - template, err := normalizeCloudFormationTemplate(*tOut.TemplateBody) - if err != nil { - return fmt.Errorf("template body contains an invalid JSON or YAML: %s", err) - } - d.Set("template_body", template) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudhsm2_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudhsm2_cluster.go deleted file mode 100644 index 57535f2c7..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudhsm2_cluster.go +++ /dev/null @@ -1,131 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudhsmv2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceCloudHsm2Cluster() *schema.Resource { - return &schema.Resource{ - Read: dataSourceCloudHsm2ClusterRead, - - Schema: map[string]*schema.Schema{ - "cluster_id": { - Type: schema.TypeString, - Required: true, - }, - - "cluster_state": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - - "security_group_id": { - Type: schema.TypeString, - Computed: true, - }, - - "cluster_certificates": { - Type: schema.TypeList, - MaxItems: 1, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cluster_certificate": { - Type: schema.TypeString, - Computed: true, - }, - "cluster_csr": { - Type: schema.TypeString, - Computed: true, - }, - "aws_hardware_certificate": { - Type: schema.TypeString, - Computed: true, - }, - "hsm_certificate": { - Type: schema.TypeString, - Computed: true, - }, - "manufacturer_hardware_certificate": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "subnet_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - } -} - -func dataSourceCloudHsm2ClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudhsmv2conn - - clusterId := d.Get("cluster_id").(string) - filters := []*string{&clusterId} - log.Printf("[DEBUG] Reading CloudHSM v2 Cluster %s", clusterId) - result := int64(1) - input := &cloudhsmv2.DescribeClustersInput{ - Filters: map[string][]*string{ - "clusterIds": filters, - }, - MaxResults: &result, - } - state := d.Get("cluster_state").(string) - states := []*string{&state} - if len(state) > 0 { - input.Filters["states"] = states - } - out, err := conn.DescribeClusters(input) - - if err != nil { - return fmt.Errorf("error describing CloudHSM v2 Cluster: %s", err) - } - - var cluster *cloudhsmv2.Cluster - for _, c := range out.Clusters { - if aws.StringValue(c.ClusterId) == clusterId { - cluster = c - break - } - } - - if cluster == nil { - return fmt.Errorf("cluster with id %s not found", clusterId) - } - - d.SetId(clusterId) - d.Set("vpc_id", cluster.VpcId) - d.Set("security_group_id", cluster.SecurityGroup) - d.Set("cluster_state", cluster.State) - if err := d.Set("cluster_certificates", readCloudHsm2ClusterCertificates(cluster)); err != nil { - return fmt.Errorf("error setting cluster_certificates: %s", err) - } - - var subnets []string - for _, sn := range cluster.SubnetMapping { - subnets = append(subnets, *sn) - } - - if err := d.Set("subnet_ids", subnets); err != nil { - return fmt.Errorf("[DEBUG] Error saving Subnet IDs to state for CloudHSM v2 Cluster (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go deleted file mode 100644 index cf2949b2a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go +++ /dev/null @@ -1,73 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/hashicorp/terraform/helper/schema" -) - -// See http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-regions.html -// See https://docs.aws.amazon.com/govcloud-us/latest/ug-east/verifying-cloudtrail.html -// See https://docs.aws.amazon.com/govcloud-us/latest/ug-west/verifying-cloudtrail.html -var cloudTrailServiceAccountPerRegionMap = map[string]string{ - "ap-northeast-1": "216624486486", - "ap-northeast-2": "492519147666", - "ap-northeast-3": "765225791966", - "ap-south-1": "977081816279", - "ap-southeast-1": "903692715234", - "ap-southeast-2": "284668455005", - "ca-central-1": "819402241893", - "cn-northwest-1": "681348832753", - "eu-central-1": "035351147821", - "eu-north-1": "829690693026", - "eu-west-1": "859597730677", - "eu-west-2": "282025262664", - "eu-west-3": "262312530599", - "sa-east-1": "814480443879", - "us-east-1": "086441151436", - "us-east-2": "475085895292", - "us-gov-east-1": "608710470296", - "us-gov-west-1": "608710470296", - "us-west-1": "388731089494", - "us-west-2": "113285607260", -} - -func dataSourceAwsCloudTrailServiceAccount() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsCloudTrailServiceAccountRead, - - Schema: map[string]*schema.Schema{ - "region": { - Type: schema.TypeString, - Optional: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsCloudTrailServiceAccountRead(d *schema.ResourceData, meta interface{}) error { - region := meta.(*AWSClient).region - if v, ok := d.GetOk("region"); ok { - region = v.(string) - } - - if accid, ok := cloudTrailServiceAccountPerRegionMap[region]; ok { - d.SetId(accid) - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "iam", - AccountID: accid, - Resource: "root", - }.String() - d.Set("arn", arn) - - return nil - } - - return fmt.Errorf("Unknown region (%q)", region) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudwatch_log_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudwatch_log_group.go deleted file mode 100644 index 134f7f5dc..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudwatch_log_group.go +++ /dev/null @@ -1,47 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsCloudwatchLogGroup() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsCloudwatchLogGroupRead, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "creation_time": { - Type: schema.TypeInt, - Computed: true, - }, - }, - } -} - -func dataSourceAwsCloudwatchLogGroupRead(d *schema.ResourceData, meta interface{}) error { - name := d.Get("name").(string) - conn := meta.(*AWSClient).cloudwatchlogsconn - - logGroup, err := lookupCloudWatchLogGroup(conn, name) - if err != nil { - return err - } - if logGroup == nil { - return fmt.Errorf("No log group named %s found\n", name) - } - - d.SetId(name) - d.Set("arn", logGroup.Arn) - d.Set("creation_time", logGroup.CreationTime) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_codecommit_repository.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_codecommit_repository.go deleted file mode 100644 index aec07a0e0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_codecommit_repository.go +++ /dev/null @@ -1,79 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/codecommit" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func dataSourceAwsCodeCommitRepository() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsCodeCommitRepositoryRead, - - Schema: map[string]*schema.Schema{ - "repository_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 100), - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "repository_id": { - Type: schema.TypeString, - Computed: true, - }, - - "clone_url_http": { - Type: schema.TypeString, - Computed: true, - }, - - "clone_url_ssh": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsCodeCommitRepositoryRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codecommitconn - - repositoryName := d.Get("repository_name").(string) - input := &codecommit.GetRepositoryInput{ - RepositoryName: aws.String(repositoryName), - } - - out, err := conn.GetRepository(input) - if err != nil { - if isAWSErr(err, codecommit.ErrCodeRepositoryDoesNotExistException, "") { - log.Printf("[WARN] CodeCommit Repository (%s) not found, removing from state", d.Id()) - d.SetId("") - return fmt.Errorf("Resource codecommit repository not found for %s", repositoryName) - } else { - return fmt.Errorf("Error reading CodeCommit Repository: %s", err.Error()) - } - } - - if out.RepositoryMetadata == nil { - return fmt.Errorf("no matches found for repository name: %s", repositoryName) - } - - d.SetId(aws.StringValue(out.RepositoryMetadata.RepositoryName)) - d.Set("arn", out.RepositoryMetadata.Arn) - d.Set("clone_url_http", out.RepositoryMetadata.CloneUrlHttp) - d.Set("clone_url_ssh", out.RepositoryMetadata.CloneUrlSsh) - d.Set("repository_name", out.RepositoryMetadata.RepositoryName) - d.Set("repository_id", out.RepositoryMetadata.RepositoryId) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cognito_user_pools.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cognito_user_pools.go deleted file mode 100644 index 700f9f495..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cognito_user_pools.go +++ /dev/null @@ -1,96 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsCognitoUserPools() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsCognitoUserPoolsRead, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "arns": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func dataSourceAwsCognitoUserPoolsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - name := d.Get("name").(string) - var ids []string - var arns []string - - pools, err := getAllCognitoUserPools(conn) - if err != nil { - return fmt.Errorf("Error listing cognito user pools: %s", err) - } - for _, pool := range pools { - if name == aws.StringValue(pool.Name) { - id := aws.StringValue(pool.Id) - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "cognito-idp", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("userpool/%s", id), - }.String() - - ids = append(ids, id) - arns = append(arns, arn) - } - } - - if len(ids) == 0 { - return fmt.Errorf("No cognito user pool found with name: %s", name) - } - - d.SetId(name) - d.Set("ids", ids) - d.Set("arns", arns) - - return nil -} - -func getAllCognitoUserPools(conn *cognitoidentityprovider.CognitoIdentityProvider) ([]*cognitoidentityprovider.UserPoolDescriptionType, error) { - var pools []*cognitoidentityprovider.UserPoolDescriptionType - var nextToken string - - for { - input := &cognitoidentityprovider.ListUserPoolsInput{ - // MaxResults Valid Range: Minimum value of 1. Maximum value of 60 - MaxResults: aws.Int64(int64(60)), - } - if nextToken != "" { - input.NextToken = aws.String(nextToken) - } - out, err := conn.ListUserPools(input) - if err != nil { - return pools, err - } - pools = append(pools, out.UserPools...) - - if out.NextToken == nil { - break - } - nextToken = aws.StringValue(out.NextToken) - } - - return pools, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_common_schema.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_common_schema.go deleted file mode 100644 index bd7fb3333..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_common_schema.go +++ /dev/null @@ -1,45 +0,0 @@ -package aws - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func buildAwsDataSourceFilters(set *schema.Set) []*ec2.Filter { - var filters []*ec2.Filter - for _, v := range set.List() { - m := v.(map[string]interface{}) - var filterValues []*string - for _, e := range m["values"].([]interface{}) { - filterValues = append(filterValues, aws.String(e.(string))) - } - filters = append(filters, &ec2.Filter{ - Name: aws.String(m["name"].(string)), - Values: filterValues, - }) - } - return filters -} - -func dataSourceFiltersSchema() *schema.Schema { - return &schema.Schema{ - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - - "values": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_cluster_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_cluster_snapshot.go deleted file mode 100644 index d756b4806..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_cluster_snapshot.go +++ /dev/null @@ -1,203 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "sort" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsDbClusterSnapshot() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsDbClusterSnapshotRead, - - Schema: map[string]*schema.Schema{ - //selection criteria - "db_cluster_identifier": { - Type: schema.TypeString, - Optional: true, - }, - - "db_cluster_snapshot_identifier": { - Type: schema.TypeString, - Optional: true, - }, - - "snapshot_type": { - Type: schema.TypeString, - Optional: true, - }, - - "include_shared": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "include_public": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "most_recent": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - //Computed values returned - "allocated_storage": { - Type: schema.TypeInt, - Computed: true, - }, - "availability_zones": { - Type: schema.TypeList, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - }, - "db_cluster_snapshot_arn": { - Type: schema.TypeString, - Computed: true, - }, - "storage_encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - "engine": { - Type: schema.TypeString, - Computed: true, - }, - "engine_version": { - Type: schema.TypeString, - Computed: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "license_model": { - Type: schema.TypeString, - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Computed: true, - }, - "source_db_cluster_snapshot_arn": { - Type: schema.TypeString, - Computed: true, - }, - "snapshot_create_time": { - Type: schema.TypeString, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsDbClusterSnapshotRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - clusterIdentifier, clusterIdentifierOk := d.GetOk("db_cluster_identifier") - snapshotIdentifier, snapshotIdentifierOk := d.GetOk("db_cluster_snapshot_identifier") - - if !clusterIdentifierOk && !snapshotIdentifierOk { - return errors.New("One of db_cluster_snapshot_identifier or db_cluster_identifier must be assigned") - } - - params := &rds.DescribeDBClusterSnapshotsInput{ - IncludePublic: aws.Bool(d.Get("include_public").(bool)), - IncludeShared: aws.Bool(d.Get("include_shared").(bool)), - } - if v, ok := d.GetOk("snapshot_type"); ok { - params.SnapshotType = aws.String(v.(string)) - } - if clusterIdentifierOk { - params.DBClusterIdentifier = aws.String(clusterIdentifier.(string)) - } - if snapshotIdentifierOk { - params.DBClusterSnapshotIdentifier = aws.String(snapshotIdentifier.(string)) - } - - log.Printf("[DEBUG] Reading DB Cluster Snapshot: %s", params) - resp, err := conn.DescribeDBClusterSnapshots(params) - if err != nil { - return err - } - - if len(resp.DBClusterSnapshots) < 1 { - return errors.New("Your query returned no results. Please change your search criteria and try again.") - } - - var snapshot *rds.DBClusterSnapshot - if len(resp.DBClusterSnapshots) > 1 { - recent := d.Get("most_recent").(bool) - log.Printf("[DEBUG] aws_db_cluster_snapshot - multiple results found and `most_recent` is set to: %t", recent) - if recent { - snapshot = mostRecentDbClusterSnapshot(resp.DBClusterSnapshots) - } else { - return errors.New("Your query returned more than one result. Please try a more specific search criteria.") - } - } else { - snapshot = resp.DBClusterSnapshots[0] - } - - d.SetId(aws.StringValue(snapshot.DBClusterSnapshotIdentifier)) - d.Set("allocated_storage", snapshot.AllocatedStorage) - if err := d.Set("availability_zones", flattenStringList(snapshot.AvailabilityZones)); err != nil { - return fmt.Errorf("error setting availability_zones: %s", err) - } - d.Set("db_cluster_identifier", snapshot.DBClusterIdentifier) - d.Set("db_cluster_snapshot_arn", snapshot.DBClusterSnapshotArn) - d.Set("db_cluster_snapshot_identifier", snapshot.DBClusterSnapshotIdentifier) - d.Set("engine", snapshot.Engine) - d.Set("engine_version", snapshot.EngineVersion) - d.Set("kms_key_id", snapshot.KmsKeyId) - d.Set("license_model", snapshot.LicenseModel) - d.Set("port", snapshot.Port) - if snapshot.SnapshotCreateTime != nil { - d.Set("snapshot_create_time", snapshot.SnapshotCreateTime.Format(time.RFC3339)) - } - d.Set("snapshot_type", snapshot.SnapshotType) - d.Set("source_db_cluster_snapshot_arn", snapshot.SourceDBClusterSnapshotArn) - d.Set("status", snapshot.Status) - d.Set("storage_encrypted", snapshot.StorageEncrypted) - d.Set("vpc_id", snapshot.VpcId) - - return nil -} - -type rdsClusterSnapshotSort []*rds.DBClusterSnapshot - -func (a rdsClusterSnapshotSort) Len() int { return len(a) } -func (a rdsClusterSnapshotSort) Swap(i, j int) { a[i], a[j] = a[j], a[i] } -func (a rdsClusterSnapshotSort) Less(i, j int) bool { - // Snapshot creation can be in progress - if a[i].SnapshotCreateTime == nil { - return true - } - if a[j].SnapshotCreateTime == nil { - return false - } - - return (*a[i].SnapshotCreateTime).Before(*a[j].SnapshotCreateTime) -} - -func mostRecentDbClusterSnapshot(snapshots []*rds.DBClusterSnapshot) *rds.DBClusterSnapshot { - sortedSnapshots := snapshots - sort.Sort(rdsClusterSnapshotSort(sortedSnapshots)) - return sortedSnapshots[len(sortedSnapshots)-1] -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_event_categories.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_event_categories.go deleted file mode 100644 index 688e1deb3..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_event_categories.go +++ /dev/null @@ -1,66 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsDbEventCategories() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsDbEventCategoriesRead, - - Schema: map[string]*schema.Schema{ - "source_type": { - Type: schema.TypeString, - Optional: true, - }, - "event_categories": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - } -} - -func dataSourceAwsDbEventCategoriesRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - req := &rds.DescribeEventCategoriesInput{} - - if sourceType := d.Get("source_type").(string); sourceType != "" { - req.SourceType = aws.String(sourceType) - } - - log.Printf("[DEBUG] Describe Event Categories %s\n", req) - resp, err := conn.DescribeEventCategories(req) - if err != nil { - return err - } - - if resp == nil || len(resp.EventCategoriesMapList) == 0 { - return fmt.Errorf("Event Categories not found") - } - - eventCategories := make([]string, 0) - - for _, eventMap := range resp.EventCategoriesMapList { - for _, v := range eventMap.EventCategories { - eventCategories = append(eventCategories, aws.StringValue(v)) - } - } - - d.SetId(resource.UniqueId()) - if err := d.Set("event_categories", eventCategories); err != nil { - return fmt.Errorf("Error setting Event Categories: %s", err) - } - - return nil - -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_instance.go deleted file mode 100644 index fe3fb8898..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_instance.go +++ /dev/null @@ -1,311 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsDbInstance() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsDbInstanceRead, - - Schema: map[string]*schema.Schema{ - "db_instance_identifier": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "address": { - Type: schema.TypeString, - Computed: true, - }, - - "allocated_storage": { - Type: schema.TypeInt, - Computed: true, - }, - - "auto_minor_version_upgrade": { - Type: schema.TypeBool, - Computed: true, - }, - - "availability_zone": { - Type: schema.TypeString, - Computed: true, - }, - - "backup_retention_period": { - Type: schema.TypeInt, - Computed: true, - }, - - "db_cluster_identifier": { - Type: schema.TypeString, - Computed: true, - }, - - "db_instance_arn": { - Type: schema.TypeString, - Computed: true, - }, - - "db_instance_class": { - Type: schema.TypeString, - Computed: true, - }, - - "db_name": { - Type: schema.TypeString, - Computed: true, - }, - - "db_parameter_groups": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "db_security_groups": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "db_subnet_group": { - Type: schema.TypeString, - Computed: true, - }, - - "db_instance_port": { - Type: schema.TypeInt, - Computed: true, - }, - - "enabled_cloudwatch_logs_exports": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "engine": { - Type: schema.TypeString, - Computed: true, - }, - - "engine_version": { - Type: schema.TypeString, - Computed: true, - }, - - "hosted_zone_id": { - Type: schema.TypeString, - Computed: true, - }, - - "iops": { - Type: schema.TypeInt, - Computed: true, - }, - - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - - "license_model": { - Type: schema.TypeString, - Computed: true, - }, - - "master_username": { - Type: schema.TypeString, - Computed: true, - }, - - "monitoring_interval": { - Type: schema.TypeInt, - Computed: true, - }, - - "monitoring_role_arn": { - Type: schema.TypeString, - Computed: true, - }, - - "multi_az": { - Type: schema.TypeBool, - Computed: true, - }, - - "option_group_memberships": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "port": { - Type: schema.TypeInt, - Computed: true, - }, - - "preferred_backup_window": { - Type: schema.TypeString, - Computed: true, - }, - - "preferred_maintenance_window": { - Type: schema.TypeString, - Computed: true, - }, - - "publicly_accessible": { - Type: schema.TypeBool, - Computed: true, - }, - - "storage_encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - - "storage_type": { - Type: schema.TypeString, - Computed: true, - }, - - "timezone": { - Type: schema.TypeString, - Computed: true, - }, - - "vpc_security_groups": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "replicate_source_db": { - Type: schema.TypeString, - Computed: true, - }, - - "ca_cert_identifier": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - opts := &rds.DescribeDBInstancesInput{ - DBInstanceIdentifier: aws.String(d.Get("db_instance_identifier").(string)), - } - - log.Printf("[DEBUG] Reading DB Instance: %s", opts) - - resp, err := conn.DescribeDBInstances(opts) - if err != nil { - return err - } - - if len(resp.DBInstances) < 1 { - return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") - } - if len(resp.DBInstances) > 1 { - return fmt.Errorf("Your query returned more than one result. Please try a more specific search criteria.") - } - - dbInstance := *resp.DBInstances[0] - - d.SetId(d.Get("db_instance_identifier").(string)) - - d.Set("allocated_storage", dbInstance.AllocatedStorage) - d.Set("auto_minor_upgrade_enabled", dbInstance.AutoMinorVersionUpgrade) - d.Set("availability_zone", dbInstance.AvailabilityZone) - d.Set("backup_retention_period", dbInstance.BackupRetentionPeriod) - d.Set("db_cluster_identifier", dbInstance.DBClusterIdentifier) - d.Set("db_instance_arn", dbInstance.DBInstanceArn) - d.Set("db_instance_class", dbInstance.DBInstanceClass) - d.Set("db_name", dbInstance.DBName) - - var parameterGroups []string - for _, v := range dbInstance.DBParameterGroups { - parameterGroups = append(parameterGroups, *v.DBParameterGroupName) - } - if err := d.Set("db_parameter_groups", parameterGroups); err != nil { - return fmt.Errorf("Error setting db_parameter_groups attribute: %#v, error: %#v", parameterGroups, err) - } - - var dbSecurityGroups []string - for _, v := range dbInstance.DBSecurityGroups { - dbSecurityGroups = append(dbSecurityGroups, *v.DBSecurityGroupName) - } - if err := d.Set("db_security_groups", dbSecurityGroups); err != nil { - return fmt.Errorf("Error setting db_security_groups attribute: %#v, error: %#v", dbSecurityGroups, err) - } - - if dbInstance.DBSubnetGroup != nil { - d.Set("db_subnet_group", dbInstance.DBSubnetGroup.DBSubnetGroupName) - } else { - d.Set("db_subnet_group", "") - } - - d.Set("db_instance_port", dbInstance.DbInstancePort) - d.Set("engine", dbInstance.Engine) - d.Set("engine_version", dbInstance.EngineVersion) - d.Set("iops", dbInstance.Iops) - d.Set("kms_key_id", dbInstance.KmsKeyId) - d.Set("license_model", dbInstance.LicenseModel) - d.Set("master_username", dbInstance.MasterUsername) - d.Set("monitoring_interval", dbInstance.MonitoringInterval) - d.Set("monitoring_role_arn", dbInstance.MonitoringRoleArn) - d.Set("address", dbInstance.Endpoint.Address) - d.Set("port", dbInstance.Endpoint.Port) - d.Set("hosted_zone_id", dbInstance.Endpoint.HostedZoneId) - d.Set("endpoint", fmt.Sprintf("%s:%d", *dbInstance.Endpoint.Address, *dbInstance.Endpoint.Port)) - - if err := d.Set("enabled_cloudwatch_logs_exports", aws.StringValueSlice(dbInstance.EnabledCloudwatchLogsExports)); err != nil { - return fmt.Errorf("error setting enabled_cloudwatch_logs_exports: %#v", err) - } - - var optionGroups []string - for _, v := range dbInstance.OptionGroupMemberships { - optionGroups = append(optionGroups, *v.OptionGroupName) - } - if err := d.Set("option_group_memberships", optionGroups); err != nil { - return fmt.Errorf("Error setting option_group_memberships attribute: %#v, error: %#v", optionGroups, err) - } - - d.Set("preferred_backup_window", dbInstance.PreferredBackupWindow) - d.Set("preferred_maintenance_window", dbInstance.PreferredMaintenanceWindow) - d.Set("publicly_accessible", dbInstance.PubliclyAccessible) - d.Set("storage_encrypted", dbInstance.StorageEncrypted) - d.Set("storage_type", dbInstance.StorageType) - d.Set("timezone", dbInstance.Timezone) - d.Set("replicate_source_db", dbInstance.ReadReplicaSourceDBInstanceIdentifier) - d.Set("ca_cert_identifier", dbInstance.CACertificateIdentifier) - - var vpcSecurityGroups []string - for _, v := range dbInstance.VpcSecurityGroups { - vpcSecurityGroups = append(vpcSecurityGroups, *v.VpcSecurityGroupId) - } - if err := d.Set("vpc_security_groups", vpcSecurityGroups); err != nil { - return fmt.Errorf("Error setting vpc_security_groups attribute: %#v, error: %#v", vpcSecurityGroups, err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_snapshot.go deleted file mode 100644 index b9a1fb3af..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_snapshot.go +++ /dev/null @@ -1,229 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "sort" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsDbSnapshot() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsDbSnapshotRead, - - Schema: map[string]*schema.Schema{ - //selection criteria - "db_instance_identifier": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "db_snapshot_identifier": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "snapshot_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "include_shared": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Default: false, - }, - - "include_public": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Default: false, - }, - "most_recent": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - - //Computed values returned - "allocated_storage": { - Type: schema.TypeInt, - Computed: true, - }, - "availability_zone": { - Type: schema.TypeString, - Computed: true, - }, - "db_snapshot_arn": { - Type: schema.TypeString, - Computed: true, - }, - "encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - "engine": { - Type: schema.TypeString, - Computed: true, - }, - "engine_version": { - Type: schema.TypeString, - Computed: true, - }, - "iops": { - Type: schema.TypeInt, - Computed: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "license_model": { - Type: schema.TypeString, - Computed: true, - }, - "option_group_name": { - Type: schema.TypeString, - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Computed: true, - }, - "source_db_snapshot_identifier": { - Type: schema.TypeString, - Computed: true, - }, - "source_region": { - Type: schema.TypeString, - Computed: true, - }, - "snapshot_create_time": { - Type: schema.TypeString, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "storage_type": { - Type: schema.TypeString, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsDbSnapshotRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - instanceIdentifier, instanceIdentifierOk := d.GetOk("db_instance_identifier") - snapshotIdentifier, snapshotIdentifierOk := d.GetOk("db_snapshot_identifier") - - if !instanceIdentifierOk && !snapshotIdentifierOk { - return fmt.Errorf("One of db_snapshot_identifier or db_instance_identifier must be assigned") - } - - params := &rds.DescribeDBSnapshotsInput{ - IncludePublic: aws.Bool(d.Get("include_public").(bool)), - IncludeShared: aws.Bool(d.Get("include_shared").(bool)), - } - if v, ok := d.GetOk("snapshot_type"); ok { - params.SnapshotType = aws.String(v.(string)) - } - if instanceIdentifierOk { - params.DBInstanceIdentifier = aws.String(instanceIdentifier.(string)) - } - if snapshotIdentifierOk { - params.DBSnapshotIdentifier = aws.String(snapshotIdentifier.(string)) - } - - log.Printf("[DEBUG] Reading DB Snapshot: %s", params) - resp, err := conn.DescribeDBSnapshots(params) - if err != nil { - return err - } - - if len(resp.DBSnapshots) < 1 { - return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") - } - - var snapshot *rds.DBSnapshot - if len(resp.DBSnapshots) > 1 { - recent := d.Get("most_recent").(bool) - log.Printf("[DEBUG] aws_db_snapshot - multiple results found and `most_recent` is set to: %t", recent) - if recent { - snapshot = mostRecentDbSnapshot(resp.DBSnapshots) - } else { - return fmt.Errorf("Your query returned more than one result. Please try a more specific search criteria.") - } - } else { - snapshot = resp.DBSnapshots[0] - } - - return dbSnapshotDescriptionAttributes(d, snapshot) -} - -type rdsSnapshotSort []*rds.DBSnapshot - -func (a rdsSnapshotSort) Len() int { return len(a) } -func (a rdsSnapshotSort) Swap(i, j int) { a[i], a[j] = a[j], a[i] } -func (a rdsSnapshotSort) Less(i, j int) bool { - // Snapshot creation can be in progress - if a[i].SnapshotCreateTime == nil { - return true - } - if a[j].SnapshotCreateTime == nil { - return false - } - - return (*a[i].SnapshotCreateTime).Before(*a[j].SnapshotCreateTime) -} - -func mostRecentDbSnapshot(snapshots []*rds.DBSnapshot) *rds.DBSnapshot { - sortedSnapshots := snapshots - sort.Sort(rdsSnapshotSort(sortedSnapshots)) - return sortedSnapshots[len(sortedSnapshots)-1] -} - -func dbSnapshotDescriptionAttributes(d *schema.ResourceData, snapshot *rds.DBSnapshot) error { - d.SetId(*snapshot.DBSnapshotIdentifier) - d.Set("db_instance_identifier", snapshot.DBInstanceIdentifier) - d.Set("db_snapshot_identifier", snapshot.DBSnapshotIdentifier) - d.Set("snapshot_type", snapshot.SnapshotType) - d.Set("storage_type", snapshot.StorageType) - d.Set("allocated_storage", snapshot.AllocatedStorage) - d.Set("availability_zone", snapshot.AvailabilityZone) - d.Set("db_snapshot_arn", snapshot.DBSnapshotArn) - d.Set("encrypted", snapshot.Encrypted) - d.Set("engine", snapshot.Engine) - d.Set("engine_version", snapshot.EngineVersion) - d.Set("iops", snapshot.Iops) - d.Set("kms_key_id", snapshot.KmsKeyId) - d.Set("license_model", snapshot.LicenseModel) - d.Set("option_group_name", snapshot.OptionGroupName) - d.Set("port", snapshot.Port) - d.Set("source_db_snapshot_identifier", snapshot.SourceDBSnapshotIdentifier) - d.Set("source_region", snapshot.SourceRegion) - d.Set("status", snapshot.Status) - d.Set("vpc_id", snapshot.VpcId) - if snapshot.SnapshotCreateTime != nil { - d.Set("snapshot_create_time", snapshot.SnapshotCreateTime.Format(time.RFC3339)) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_dx_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_dx_gateway.go deleted file mode 100644 index f80025c9e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_dx_gateway.go +++ /dev/null @@ -1,66 +0,0 @@ -package aws - -import ( - "fmt" - "strconv" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsDxGateway() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsDxGatewayRead, - - Schema: map[string]*schema.Schema{ - "amazon_side_asn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - }, - }, - } -} - -func dataSourceAwsDxGatewayRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - name := d.Get("name").(string) - - gateways := make([]*directconnect.Gateway, 0) - // DescribeDirectConnectGatewaysInput does not have a name parameter for filtering - input := &directconnect.DescribeDirectConnectGatewaysInput{} - for { - output, err := conn.DescribeDirectConnectGateways(input) - if err != nil { - return fmt.Errorf("error reading Direct Connect Gateway: %s", err) - } - for _, gateway := range output.DirectConnectGateways { - if aws.StringValue(gateway.DirectConnectGatewayName) == name { - gateways = append(gateways, gateway) - } - } - if output.NextToken == nil { - break - } - input.NextToken = output.NextToken - } - - if len(gateways) == 0 { - return fmt.Errorf("Direct Connect Gateway not found for name: %s", name) - } - - if len(gateways) > 1 { - return fmt.Errorf("Multiple Direct Connect Gateways found for name: %s", name) - } - - gateway := gateways[0] - - d.SetId(aws.StringValue(gateway.DirectConnectGatewayId)) - d.Set("amazon_side_asn", strconv.FormatInt(aws.Int64Value(gateway.AmazonSideAsn), 10)) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_dynamodb_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_dynamodb_table.go deleted file mode 100644 index 0df305d51..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_dynamodb_table.go +++ /dev/null @@ -1,226 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/dynamodb" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsDynamoDbTable() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsDynamoDbTableRead, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "attribute": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Computed: true, - }, - "type": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) - return hashcode.String(buf.String()) - }, - }, - "global_secondary_index": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Computed: true, - }, - "write_capacity": { - Type: schema.TypeInt, - Computed: true, - }, - "read_capacity": { - Type: schema.TypeInt, - Computed: true, - }, - "hash_key": { - Type: schema.TypeString, - Computed: true, - }, - "range_key": { - Type: schema.TypeString, - Computed: true, - }, - "projection_type": { - Type: schema.TypeString, - Computed: true, - }, - "non_key_attributes": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "hash_key": { - Type: schema.TypeString, - Computed: true, - }, - "local_secondary_index": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Computed: true, - }, - "range_key": { - Type: schema.TypeString, - Computed: true, - }, - "projection_type": { - Type: schema.TypeString, - Computed: true, - }, - "non_key_attributes": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) - return hashcode.String(buf.String()) - }, - }, - "range_key": { - Type: schema.TypeString, - Computed: true, - }, - "read_capacity": { - Type: schema.TypeInt, - Computed: true, - }, - "stream_arn": { - Type: schema.TypeString, - Computed: true, - }, - "stream_enabled": { - Type: schema.TypeBool, - Computed: true, - }, - "stream_label": { - Type: schema.TypeString, - Computed: true, - }, - "stream_view_type": { - Type: schema.TypeString, - Computed: true, - StateFunc: func(v interface{}) string { - value := v.(string) - return strings.ToUpper(value) - }, - }, - "tags": tagsSchemaComputed(), - "ttl": { - Type: schema.TypeSet, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "attribute_name": { - Type: schema.TypeString, - Computed: true, - }, - "enabled": { - Type: schema.TypeBool, - Computed: true, - }, - }, - }, - }, - "write_capacity": { - Type: schema.TypeInt, - Computed: true, - }, - "server_side_encryption": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Computed: true, - }, - }, - }, - }, - }, - } -} - -func dataSourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dynamodbconn - - result, err := conn.DescribeTable(&dynamodb.DescribeTableInput{ - TableName: aws.String(d.Get("name").(string)), - }) - - if err != nil { - return fmt.Errorf("Error retrieving DynamoDB table: %s", err) - } - - d.SetId(*result.Table.TableName) - - err = flattenAwsDynamoDbTableResource(d, result.Table) - if err != nil { - return err - } - - ttlOut, err := conn.DescribeTimeToLive(&dynamodb.DescribeTimeToLiveInput{ - TableName: aws.String(d.Id()), - }) - if err != nil { - return err - } - if ttlOut.TimeToLiveDescription != nil { - err := d.Set("ttl", flattenDynamoDbTtl(ttlOut.TimeToLiveDescription)) - if err != nil { - return err - } - } - - tags, err := readDynamoDbTableTags(d.Get("arn").(string), conn) - if err != nil { - return err - } - d.Set("tags", tags) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go deleted file mode 100644 index e277085dc..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go +++ /dev/null @@ -1,155 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "sort" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsEbsSnapshot() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEbsSnapshotRead, - - Schema: map[string]*schema.Schema{ - //selection criteria - "filter": dataSourceFiltersSchema(), - "most_recent": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - "owners": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "snapshot_ids": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "restorable_by_user_ids": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - //Computed values returned - "snapshot_id": { - Type: schema.TypeString, - Computed: true, - }, - "volume_id": { - Type: schema.TypeString, - Computed: true, - }, - "state": { - Type: schema.TypeString, - Computed: true, - }, - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - "owner_alias": { - Type: schema.TypeString, - Computed: true, - }, - "encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - "description": { - Type: schema.TypeString, - Computed: true, - }, - "volume_size": { - Type: schema.TypeInt, - Computed: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "data_encryption_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchemaComputed(), - }, - } -} - -func dataSourceAwsEbsSnapshotRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - restorableUsers, restorableUsersOk := d.GetOk("restorable_by_user_ids") - filters, filtersOk := d.GetOk("filter") - snapshotIds, snapshotIdsOk := d.GetOk("snapshot_ids") - owners, ownersOk := d.GetOk("owners") - - if !restorableUsersOk && !filtersOk && !snapshotIdsOk && !ownersOk { - return fmt.Errorf("One of snapshot_ids, filters, restorable_by_user_ids, or owners must be assigned") - } - - params := &ec2.DescribeSnapshotsInput{} - if restorableUsersOk { - params.RestorableByUserIds = expandStringList(restorableUsers.([]interface{})) - } - if filtersOk { - params.Filters = buildAwsDataSourceFilters(filters.(*schema.Set)) - } - if ownersOk { - params.OwnerIds = expandStringList(owners.([]interface{})) - } - if snapshotIdsOk { - params.SnapshotIds = expandStringList(snapshotIds.([]interface{})) - } - - log.Printf("[DEBUG] Reading EBS Snapshot: %s", params) - resp, err := conn.DescribeSnapshots(params) - if err != nil { - return err - } - - if len(resp.Snapshots) < 1 { - return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") - } - - if len(resp.Snapshots) > 1 { - if !d.Get("most_recent").(bool) { - return fmt.Errorf("Your query returned more than one result. Please try a more " + - "specific search criteria, or set `most_recent` attribute to true.") - } - sort.Slice(resp.Snapshots, func(i, j int) bool { - return aws.TimeValue(resp.Snapshots[i].StartTime).Unix() > aws.TimeValue(resp.Snapshots[j].StartTime).Unix() - }) - } - - //Single Snapshot found so set to state - return snapshotDescriptionAttributes(d, resp.Snapshots[0]) -} - -func snapshotDescriptionAttributes(d *schema.ResourceData, snapshot *ec2.Snapshot) error { - d.SetId(*snapshot.SnapshotId) - d.Set("snapshot_id", snapshot.SnapshotId) - d.Set("volume_id", snapshot.VolumeId) - d.Set("data_encryption_key_id", snapshot.DataEncryptionKeyId) - d.Set("description", snapshot.Description) - d.Set("encrypted", snapshot.Encrypted) - d.Set("kms_key_id", snapshot.KmsKeyId) - d.Set("volume_size", snapshot.VolumeSize) - d.Set("state", snapshot.State) - d.Set("owner_id", snapshot.OwnerId) - d.Set("owner_alias", snapshot.OwnerAlias) - - err := d.Set("tags", tagsToMap(snapshot.Tags)) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go deleted file mode 100644 index a8fbb6377..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go +++ /dev/null @@ -1,83 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "sort" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsEbsSnapshotIds() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEbsSnapshotIdsRead, - - Schema: map[string]*schema.Schema{ - "filter": dataSourceFiltersSchema(), - "owners": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "restorable_by_user_ids": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "ids": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func dataSourceAwsEbsSnapshotIdsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - restorableUsers, restorableUsersOk := d.GetOk("restorable_by_user_ids") - filters, filtersOk := d.GetOk("filter") - owners, ownersOk := d.GetOk("owners") - - if restorableUsers == false && !filtersOk && !ownersOk { - return fmt.Errorf("One of filters, restorable_by_user_ids, or owners must be assigned") - } - - params := &ec2.DescribeSnapshotsInput{} - - if restorableUsersOk { - params.RestorableByUserIds = expandStringList(restorableUsers.([]interface{})) - } - if filtersOk { - params.Filters = buildAwsDataSourceFilters(filters.(*schema.Set)) - } - if ownersOk { - params.OwnerIds = expandStringList(owners.([]interface{})) - } - - log.Printf("[DEBUG] Reading EBS Snapshot IDs: %s", params) - resp, err := conn.DescribeSnapshots(params) - if err != nil { - return err - } - - snapshotIds := make([]string, 0) - - sort.Slice(resp.Snapshots, func(i, j int) bool { - return aws.TimeValue(resp.Snapshots[i].StartTime).Unix() > aws.TimeValue(resp.Snapshots[j].StartTime).Unix() - }) - for _, snapshot := range resp.Snapshots { - snapshotIds = append(snapshotIds, *snapshot.SnapshotId) - } - - d.SetId(fmt.Sprintf("%d", hashcode.String(params.String()))) - d.Set("ids", snapshotIds) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_volume.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_volume.go deleted file mode 100644 index 7795335d8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_volume.go +++ /dev/null @@ -1,149 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "sort" - - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/davecgh/go-spew/spew" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsEbsVolume() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEbsVolumeRead, - - Schema: map[string]*schema.Schema{ - "filter": dataSourceFiltersSchema(), - "most_recent": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "availability_zone": { - Type: schema.TypeString, - Computed: true, - }, - "encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - "iops": { - Type: schema.TypeInt, - Computed: true, - }, - "volume_type": { - Type: schema.TypeString, - Computed: true, - }, - "size": { - Type: schema.TypeInt, - Computed: true, - }, - "snapshot_id": { - Type: schema.TypeString, - Computed: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "volume_id": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchemaComputed(), - }, - } -} - -func dataSourceAwsEbsVolumeRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - filters, filtersOk := d.GetOk("filter") - - params := &ec2.DescribeVolumesInput{} - if filtersOk { - params.Filters = buildAwsDataSourceFilters(filters.(*schema.Set)) - } - - log.Printf("[DEBUG] Reading EBS Volume: %s", params) - resp, err := conn.DescribeVolumes(params) - if err != nil { - return err - } - - log.Printf("Found These Volumes %s", spew.Sdump(resp.Volumes)) - - filteredVolumes := resp.Volumes[:] - - var volume *ec2.Volume - if len(filteredVolumes) < 1 { - return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") - } - - if len(filteredVolumes) > 1 { - recent := d.Get("most_recent").(bool) - log.Printf("[DEBUG] aws_ebs_volume - multiple results found and `most_recent` is set to: %t", recent) - if recent { - volume = mostRecentVolume(filteredVolumes) - } else { - return fmt.Errorf("Your query returned more than one result. Please try a more " + - "specific search criteria, or set `most_recent` attribute to true.") - } - } else { - // Query returned single result. - volume = filteredVolumes[0] - } - - log.Printf("[DEBUG] aws_ebs_volume - Single Volume found: %s", *volume.VolumeId) - return volumeDescriptionAttributes(d, meta.(*AWSClient), volume) -} - -type volumeSort []*ec2.Volume - -func (a volumeSort) Len() int { return len(a) } -func (a volumeSort) Swap(i, j int) { a[i], a[j] = a[j], a[i] } -func (a volumeSort) Less(i, j int) bool { - itime := *a[i].CreateTime - jtime := *a[j].CreateTime - return itime.Unix() < jtime.Unix() -} - -func mostRecentVolume(volumes []*ec2.Volume) *ec2.Volume { - sortedVolumes := volumes - sort.Sort(volumeSort(sortedVolumes)) - return sortedVolumes[len(sortedVolumes)-1] -} - -func volumeDescriptionAttributes(d *schema.ResourceData, client *AWSClient, volume *ec2.Volume) error { - d.SetId(*volume.VolumeId) - d.Set("volume_id", volume.VolumeId) - - arn := arn.ARN{ - Partition: client.partition, - Region: client.region, - Service: "ec2", - AccountID: client.accountid, - Resource: fmt.Sprintf("volume/%s", d.Id()), - } - d.Set("arn", arn.String()) - - d.Set("availability_zone", volume.AvailabilityZone) - d.Set("encrypted", volume.Encrypted) - d.Set("iops", volume.Iops) - d.Set("kms_key_id", volume.KmsKeyId) - d.Set("size", volume.Size) - d.Set("snapshot_id", volume.SnapshotId) - d.Set("volume_type", volume.VolumeType) - - err := d.Set("tags", tagsToMap(volume.Tags)) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway.go deleted file mode 100644 index b44fc13c8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway.go +++ /dev/null @@ -1,130 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsEc2TransitGateway() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEc2TransitGatewayRead, - - Schema: map[string]*schema.Schema{ - "amazon_side_asn": { - Type: schema.TypeInt, - Computed: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "association_default_route_table_id": { - Type: schema.TypeString, - Computed: true, - }, - "auto_accept_shared_attachments": { - Type: schema.TypeString, - Computed: true, - }, - "default_route_table_association": { - Type: schema.TypeString, - Computed: true, - }, - "default_route_table_propagation": { - Type: schema.TypeString, - Computed: true, - }, - "description": { - Type: schema.TypeString, - Computed: true, - }, - "dns_support": { - Type: schema.TypeString, - Computed: true, - }, - "filter": dataSourceFiltersSchema(), - "id": { - Type: schema.TypeString, - Optional: true, - }, - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - "propagation_default_route_table_id": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchemaComputed(), - "vpn_ecmp_support": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsEc2TransitGatewayRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.DescribeTransitGatewaysInput{} - - if v, ok := d.GetOk("filter"); ok { - input.Filters = buildAwsDataSourceFilters(v.(*schema.Set)) - } - - if v, ok := d.GetOk("id"); ok { - input.TransitGatewayIds = []*string{aws.String(v.(string))} - } - - log.Printf("[DEBUG] Reading EC2 Transit Gateways: %s", input) - output, err := conn.DescribeTransitGateways(input) - - if err != nil { - return fmt.Errorf("error reading EC2 Transit Gateway: %s", err) - } - - if output == nil || len(output.TransitGateways) == 0 { - return errors.New("error reading EC2 Transit Gateway: no results found") - } - - if len(output.TransitGateways) > 1 { - return errors.New("error reading EC2 Transit Gateway: multiple results found, try adjusting search criteria") - } - - transitGateway := output.TransitGateways[0] - - if transitGateway == nil { - return errors.New("error reading EC2 Transit Gateway: empty result") - } - - if transitGateway.Options == nil { - return errors.New("error reading EC2 Transit Gateway: missing options") - } - - d.Set("amazon_side_asn", aws.Int64Value(transitGateway.Options.AmazonSideAsn)) - d.Set("arn", transitGateway.TransitGatewayArn) - d.Set("association_default_route_table_id", transitGateway.Options.AssociationDefaultRouteTableId) - d.Set("auto_accept_shared_attachments", transitGateway.Options.AutoAcceptSharedAttachments) - d.Set("default_route_table_association", transitGateway.Options.DefaultRouteTableAssociation) - d.Set("default_route_table_propagation", transitGateway.Options.DefaultRouteTablePropagation) - d.Set("description", transitGateway.Description) - d.Set("dns_support", transitGateway.Options.DnsSupport) - d.Set("owner_id", transitGateway.OwnerId) - d.Set("propagation_default_route_table_id", transitGateway.Options.PropagationDefaultRouteTableId) - - if err := d.Set("tags", tagsToMap(transitGateway.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - d.Set("vpn_ecmp_support", transitGateway.Options.VpnEcmpSupport) - - d.SetId(aws.StringValue(transitGateway.TransitGatewayId)) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_route_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_route_table.go deleted file mode 100644 index a011de02f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_route_table.go +++ /dev/null @@ -1,86 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsEc2TransitGatewayRouteTable() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEc2TransitGatewayRouteTableRead, - - Schema: map[string]*schema.Schema{ - "default_association_route_table": { - Type: schema.TypeBool, - Computed: true, - }, - "default_propagation_route_table": { - Type: schema.TypeBool, - Computed: true, - }, - "filter": dataSourceFiltersSchema(), - "id": { - Type: schema.TypeString, - Optional: true, - }, - "transit_gateway_id": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchemaComputed(), - }, - } -} - -func dataSourceAwsEc2TransitGatewayRouteTableRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.DescribeTransitGatewayRouteTablesInput{} - - if v, ok := d.GetOk("filter"); ok { - input.Filters = buildAwsDataSourceFilters(v.(*schema.Set)) - } - - if v, ok := d.GetOk("id"); ok { - input.TransitGatewayRouteTableIds = []*string{aws.String(v.(string))} - } - - log.Printf("[DEBUG] Reading EC2 Transit Gateways: %s", input) - output, err := conn.DescribeTransitGatewayRouteTables(input) - - if err != nil { - return fmt.Errorf("error reading EC2 Transit Gateway Route Table: %s", err) - } - - if output == nil || len(output.TransitGatewayRouteTables) == 0 { - return errors.New("error reading EC2 Transit Gateway Route Table: no results found") - } - - if len(output.TransitGatewayRouteTables) > 1 { - return errors.New("error reading EC2 Transit Gateway Route Table: multiple results found, try adjusting search criteria") - } - - transitGatewayRouteTable := output.TransitGatewayRouteTables[0] - - if transitGatewayRouteTable == nil { - return errors.New("error reading EC2 Transit Gateway Route Table: empty result") - } - - d.Set("default_association_route_table", aws.BoolValue(transitGatewayRouteTable.DefaultAssociationRouteTable)) - d.Set("default_propagation_route_table", aws.BoolValue(transitGatewayRouteTable.DefaultPropagationRouteTable)) - - if err := d.Set("tags", tagsToMap(transitGatewayRouteTable.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - d.Set("transit_gateway_id", aws.StringValue(transitGatewayRouteTable.TransitGatewayId)) - - d.SetId(aws.StringValue(transitGatewayRouteTable.TransitGatewayRouteTableId)) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_vpc_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_vpc_attachment.go deleted file mode 100644 index e28ef0986..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_vpc_attachment.go +++ /dev/null @@ -1,109 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsEc2TransitGatewayVpcAttachment() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEc2TransitGatewayVpcAttachmentRead, - - Schema: map[string]*schema.Schema{ - "dns_support": { - Type: schema.TypeString, - Computed: true, - }, - "filter": dataSourceFiltersSchema(), - "id": { - Type: schema.TypeString, - Optional: true, - }, - "ipv6_support": { - Type: schema.TypeString, - Computed: true, - }, - "subnet_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "transit_gateway_id": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchemaComputed(), - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - "vpc_owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsEc2TransitGatewayVpcAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.DescribeTransitGatewayVpcAttachmentsInput{} - - if v, ok := d.GetOk("filter"); ok { - input.Filters = buildAwsDataSourceFilters(v.(*schema.Set)) - } - - if v, ok := d.GetOk("id"); ok { - input.TransitGatewayAttachmentIds = []*string{aws.String(v.(string))} - } - - log.Printf("[DEBUG] Reading EC2 Transit Gateways: %s", input) - output, err := conn.DescribeTransitGatewayVpcAttachments(input) - - if err != nil { - return fmt.Errorf("error reading EC2 Transit Gateway Route Table: %s", err) - } - - if output == nil || len(output.TransitGatewayVpcAttachments) == 0 { - return errors.New("error reading EC2 Transit Gateway Route Table: no results found") - } - - if len(output.TransitGatewayVpcAttachments) > 1 { - return errors.New("error reading EC2 Transit Gateway Route Table: multiple results found, try adjusting search criteria") - } - - transitGatewayVpcAttachment := output.TransitGatewayVpcAttachments[0] - - if transitGatewayVpcAttachment == nil { - return errors.New("error reading EC2 Transit Gateway Route Table: empty result") - } - - if transitGatewayVpcAttachment.Options == nil { - return fmt.Errorf("error reading EC2 Transit Gateway VPC Attachment (%s): missing options", d.Id()) - } - - d.Set("dns_support", transitGatewayVpcAttachment.Options.DnsSupport) - d.Set("ipv6_support", transitGatewayVpcAttachment.Options.Ipv6Support) - - if err := d.Set("subnet_ids", aws.StringValueSlice(transitGatewayVpcAttachment.SubnetIds)); err != nil { - return fmt.Errorf("error setting subnet_ids: %s", err) - } - - if err := d.Set("tags", tagsToMap(transitGatewayVpcAttachment.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - d.Set("transit_gateway_id", aws.StringValue(transitGatewayVpcAttachment.TransitGatewayId)) - d.Set("vpc_id", aws.StringValue(transitGatewayVpcAttachment.VpcId)) - d.Set("vpc_owner_id", aws.StringValue(transitGatewayVpcAttachment.VpcOwnerId)) - - d.SetId(aws.StringValue(transitGatewayVpcAttachment.TransitGatewayAttachmentId)) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecr_repository.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecr_repository.go deleted file mode 100644 index 8b93434ac..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecr_repository.go +++ /dev/null @@ -1,71 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ecr" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsEcrRepository() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEcrRepositoryRead, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "registry_id": { - Type: schema.TypeString, - Computed: true, - }, - "repository_url": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchemaComputed(), - }, - } -} - -func dataSourceAwsEcrRepositoryRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecrconn - - params := &ecr.DescribeRepositoriesInput{ - RepositoryNames: aws.StringSlice([]string{d.Get("name").(string)}), - } - log.Printf("[DEBUG] Reading ECR repository: %s", params) - out, err := conn.DescribeRepositories(params) - if err != nil { - if isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { - log.Printf("[WARN] ECR Repository %s not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading ECR repository: %s", err) - } - - repository := out.Repositories[0] - - log.Printf("[DEBUG] Received ECR repository %s", out) - - d.SetId(aws.StringValue(repository.RepositoryName)) - d.Set("arn", repository.RepositoryArn) - d.Set("registry_id", repository.RegistryId) - d.Set("name", repository.RepositoryName) - d.Set("repository_url", repository.RepositoryUri) - - if err := getTagsECR(conn, d); err != nil { - return fmt.Errorf("error getting ECR repository tags: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_cluster.go deleted file mode 100644 index 308bdb9a9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_cluster.go +++ /dev/null @@ -1,81 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ecs" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsEcsCluster() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEcsClusterRead, - - Schema: map[string]*schema.Schema{ - "cluster_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "status": { - Type: schema.TypeString, - Computed: true, - }, - - "pending_tasks_count": { - Type: schema.TypeInt, - Computed: true, - }, - - "running_tasks_count": { - Type: schema.TypeInt, - Computed: true, - }, - - "registered_container_instances_count": { - Type: schema.TypeInt, - Computed: true, - }, - }, - } -} - -func dataSourceAwsEcsClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - params := &ecs.DescribeClustersInput{ - Clusters: []*string{aws.String(d.Get("cluster_name").(string))}, - } - log.Printf("[DEBUG] Reading ECS Cluster: %s", params) - desc, err := conn.DescribeClusters(params) - - if err != nil { - return err - } - - if len(desc.Clusters) == 0 { - return fmt.Errorf("no matches found for name: %s", d.Get("cluster_name").(string)) - } - - if len(desc.Clusters) > 1 { - return fmt.Errorf("multiple matches found for name: %s", d.Get("cluster_name").(string)) - } - - cluster := desc.Clusters[0] - d.SetId(aws.StringValue(cluster.ClusterArn)) - d.Set("arn", cluster.ClusterArn) - d.Set("status", cluster.Status) - d.Set("pending_tasks_count", cluster.PendingTasksCount) - d.Set("running_tasks_count", cluster.RunningTasksCount) - d.Set("registered_container_instances_count", cluster.RegisteredContainerInstancesCount) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_container_definition.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_container_definition.go deleted file mode 100644 index 914d58264..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_container_definition.go +++ /dev/null @@ -1,110 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ecs" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsEcsContainerDefinition() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEcsContainerDefinitionRead, - - Schema: map[string]*schema.Schema{ - "task_definition": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "container_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - // Computed values. - "image": { - Type: schema.TypeString, - Computed: true, - }, - "image_digest": { - Type: schema.TypeString, - Computed: true, - }, - "cpu": { - Type: schema.TypeInt, - Computed: true, - }, - "memory": { - Type: schema.TypeInt, - Computed: true, - }, - "memory_reservation": { - Type: schema.TypeInt, - Computed: true, - }, - "disable_networking": { - Type: schema.TypeBool, - Computed: true, - }, - "docker_labels": { - Type: schema.TypeMap, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "environment": { - Type: schema.TypeMap, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func dataSourceAwsEcsContainerDefinitionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - params := &ecs.DescribeTaskDefinitionInput{ - TaskDefinition: aws.String(d.Get("task_definition").(string)), - } - log.Printf("[DEBUG] Reading ECS Container Definition: %s", params) - desc, err := conn.DescribeTaskDefinition(params) - - if err != nil { - return err - } - - taskDefinition := *desc.TaskDefinition - for _, def := range taskDefinition.ContainerDefinitions { - if aws.StringValue(def.Name) != d.Get("container_name").(string) { - continue - } - - d.SetId(fmt.Sprintf("%s/%s", aws.StringValue(taskDefinition.TaskDefinitionArn), d.Get("container_name").(string))) - d.Set("image", aws.StringValue(def.Image)) - image := aws.StringValue(def.Image) - if strings.Contains(image, ":") { - d.Set("image_digest", strings.Split(image, ":")[1]) - } - d.Set("cpu", aws.Int64Value(def.Cpu)) - d.Set("memory", aws.Int64Value(def.Memory)) - d.Set("memory_reservation", aws.Int64Value(def.MemoryReservation)) - d.Set("disable_networking", aws.BoolValue(def.DisableNetworking)) - d.Set("docker_labels", aws.StringValueMap(def.DockerLabels)) - - var environment = map[string]string{} - for _, keyValuePair := range def.Environment { - environment[aws.StringValue(keyValuePair.Name)] = aws.StringValue(keyValuePair.Value) - } - d.Set("environment", environment) - } - - if d.Id() == "" { - return fmt.Errorf("container with name %q not found in task definition %q", d.Get("container_name").(string), d.Get("task_definition").(string)) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_service.go deleted file mode 100644 index 524b47f73..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_service.go +++ /dev/null @@ -1,89 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ecs" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsEcsService() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEcsServiceRead, - - Schema: map[string]*schema.Schema{ - "service_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "cluster_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "desired_count": { - Type: schema.TypeInt, - Computed: true, - }, - "launch_type": { - Type: schema.TypeString, - Computed: true, - }, - "scheduling_strategy": { - Type: schema.TypeString, - Computed: true, - }, - "task_definition": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - clusterArn := d.Get("cluster_arn").(string) - serviceName := d.Get("service_name").(string) - - params := &ecs.DescribeServicesInput{ - Cluster: aws.String(clusterArn), - Services: []*string{aws.String(serviceName)}, - } - - log.Printf("[DEBUG] Reading ECS Service: %s", params) - desc, err := conn.DescribeServices(params) - - if err != nil { - return err - } - - if desc == nil || len(desc.Services) == 0 { - return fmt.Errorf("service with name %q in cluster %q not found", serviceName, clusterArn) - } - - if len(desc.Services) > 1 { - return fmt.Errorf("multiple services with name %q found in cluster %q", serviceName, clusterArn) - } - - service := desc.Services[0] - d.SetId(aws.StringValue(service.ServiceArn)) - - d.Set("service_name", service.ServiceName) - d.Set("arn", service.ServiceArn) - d.Set("cluster_arn", service.ClusterArn) - d.Set("desired_count", service.DesiredCount) - d.Set("launch_type", service.LaunchType) - d.Set("scheduling_strategy", service.SchedulingStrategy) - d.Set("task_definition", service.TaskDefinition) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_task_definition.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_task_definition.go deleted file mode 100644 index a734bb0e8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_task_definition.go +++ /dev/null @@ -1,74 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ecs" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsEcsTaskDefinition() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEcsTaskDefinitionRead, - - Schema: map[string]*schema.Schema{ - "task_definition": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - // Computed values. - "family": { - Type: schema.TypeString, - Computed: true, - }, - "network_mode": { - Type: schema.TypeString, - Computed: true, - }, - "revision": { - Type: schema.TypeInt, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "task_role_arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsEcsTaskDefinitionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - params := &ecs.DescribeTaskDefinitionInput{ - TaskDefinition: aws.String(d.Get("task_definition").(string)), - } - log.Printf("[DEBUG] Reading ECS Task Definition: %s", params) - desc, err := conn.DescribeTaskDefinition(params) - - if err != nil { - return fmt.Errorf("Failed getting task definition %s %q", err, d.Get("task_definition").(string)) - } - - taskDefinition := *desc.TaskDefinition - - d.SetId(aws.StringValue(taskDefinition.TaskDefinitionArn)) - d.Set("family", aws.StringValue(taskDefinition.Family)) - d.Set("network_mode", aws.StringValue(taskDefinition.NetworkMode)) - d.Set("revision", aws.Int64Value(taskDefinition.Revision)) - d.Set("status", aws.StringValue(taskDefinition.Status)) - d.Set("task_role_arn", aws.StringValue(taskDefinition.TaskRoleArn)) - - if d.Id() == "" { - return fmt.Errorf("task definition %q not found", d.Get("task_definition").(string)) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go deleted file mode 100644 index 539a86788..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go +++ /dev/null @@ -1,146 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/efs" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func dataSourceAwsEfsFileSystem() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEfsFileSystemRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "creation_token": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 64), - }, - "encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - "file_system_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "performance_mode": { - Type: schema.TypeString, - Computed: true, - }, - "dns_name": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchemaComputed(), - }, - } -} - -func dataSourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) error { - efsconn := meta.(*AWSClient).efsconn - - describeEfsOpts := &efs.DescribeFileSystemsInput{} - - if v, ok := d.GetOk("creation_token"); ok { - describeEfsOpts.CreationToken = aws.String(v.(string)) - } - - if v, ok := d.GetOk("file_system_id"); ok { - describeEfsOpts.FileSystemId = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Reading EFS File System: %s", describeEfsOpts) - describeResp, err := efsconn.DescribeFileSystems(describeEfsOpts) - if err != nil { - return fmt.Errorf("Error retrieving EFS: %s", err) - } - if len(describeResp.FileSystems) != 1 { - return fmt.Errorf("Search returned %d results, please revise so only one is returned", len(describeResp.FileSystems)) - } - - d.SetId(*describeResp.FileSystems[0].FileSystemId) - - tags := make([]*efs.Tag, 0) - var marker string - for { - params := &efs.DescribeTagsInput{ - FileSystemId: aws.String(d.Id()), - } - if marker != "" { - params.Marker = aws.String(marker) - } - - tagsResp, err := efsconn.DescribeTags(params) - if err != nil { - return fmt.Errorf("Error retrieving EC2 tags for EFS file system (%q): %s", - d.Id(), err.Error()) - } - - tags = append(tags, tagsResp.Tags...) - //for _, tag := range tagsResp.Tags { - // tags = append(tags, tag) - //} - - if tagsResp.NextMarker != nil { - marker = *tagsResp.NextMarker - } else { - break - } - } - - err = d.Set("tags", tagsToMapEFS(tags)) - if err != nil { - return err - } - - var fs *efs.FileSystemDescription - for _, f := range describeResp.FileSystems { - if d.Id() == *f.FileSystemId { - fs = f - break - } - } - if fs == nil { - log.Printf("[WARN] EFS (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("creation_token", fs.CreationToken) - d.Set("performance_mode", fs.PerformanceMode) - - fsARN := arn.ARN{ - AccountID: meta.(*AWSClient).accountid, - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Resource: fmt.Sprintf("file-system/%s", aws.StringValue(fs.FileSystemId)), - Service: "elasticfilesystem", - }.String() - - d.Set("arn", fsARN) - d.Set("file_system_id", fs.FileSystemId) - d.Set("encrypted", fs.Encrypted) - d.Set("kms_key_id", fs.KmsKeyId) - - region := meta.(*AWSClient).region - err = d.Set("dns_name", resourceAwsEfsDnsName(*fs.FileSystemId, region)) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_mount_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_mount_target.go deleted file mode 100644 index 88e4dcf88..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_mount_target.go +++ /dev/null @@ -1,109 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/efs" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsEfsMountTarget() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEfsMountTargetRead, - - Schema: map[string]*schema.Schema{ - "mount_target_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "file_system_arn": { - Type: schema.TypeString, - Computed: true, - }, - "file_system_id": { - Type: schema.TypeString, - Computed: true, - }, - "ip_address": { - Type: schema.TypeString, - Computed: true, - }, - "security_groups": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - Computed: true, - }, - "subnet_id": { - Type: schema.TypeString, - Computed: true, - }, - "network_interface_id": { - Type: schema.TypeString, - Computed: true, - }, - "dns_name": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsEfsMountTargetRead(d *schema.ResourceData, meta interface{}) error { - efsconn := meta.(*AWSClient).efsconn - - describeEfsOpts := &efs.DescribeMountTargetsInput{ - MountTargetId: aws.String(d.Get("mount_target_id").(string)), - } - - log.Printf("[DEBUG] Reading EFS Mount Target: %s", describeEfsOpts) - resp, err := efsconn.DescribeMountTargets(describeEfsOpts) - if err != nil { - return fmt.Errorf("Error retrieving EFS Mount Target: %s", err) - } - if len(resp.MountTargets) != 1 { - return fmt.Errorf("Search returned %d results, please revise so only one is returned", len(resp.MountTargets)) - } - - mt := resp.MountTargets[0] - - log.Printf("[DEBUG] Found EFS mount target: %#v", mt) - - d.SetId(*mt.MountTargetId) - - fsARN := arn.ARN{ - AccountID: meta.(*AWSClient).accountid, - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Resource: fmt.Sprintf("file-system/%s", aws.StringValue(mt.FileSystemId)), - Service: "elasticfilesystem", - }.String() - - d.Set("file_system_arn", fsARN) - d.Set("file_system_id", mt.FileSystemId) - d.Set("ip_address", mt.IpAddress) - d.Set("subnet_id", mt.SubnetId) - d.Set("network_interface_id", mt.NetworkInterfaceId) - - sgResp, err := efsconn.DescribeMountTargetSecurityGroups(&efs.DescribeMountTargetSecurityGroupsInput{ - MountTargetId: aws.String(d.Id()), - }) - if err != nil { - return err - } - err = d.Set("security_groups", schema.NewSet(schema.HashString, flattenStringList(sgResp.SecurityGroups))) - if err != nil { - return err - } - - if err := d.Set("dns_name", resourceAwsEfsMountTargetDnsName(*mt.FileSystemId, meta.(*AWSClient).region)); err != nil { - return fmt.Errorf("Error setting dns_name error: %#v", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eip.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eip.go deleted file mode 100644 index fe650108b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eip.go +++ /dev/null @@ -1,121 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsEip() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEipRead, - - Schema: map[string]*schema.Schema{ - "association_id": { - Type: schema.TypeString, - Computed: true, - }, - "domain": { - Type: schema.TypeString, - Computed: true, - }, - "filter": ec2CustomFiltersSchema(), - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "instance_id": { - Type: schema.TypeString, - Computed: true, - }, - "network_interface_id": { - Type: schema.TypeString, - Computed: true, - }, - "network_interface_owner_id": { - Type: schema.TypeString, - Computed: true, - }, - "private_ip": { - Type: schema.TypeString, - Computed: true, - }, - "public_ip": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "public_ipv4_pool": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchemaComputed(), - }, - } -} - -func dataSourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeAddressesInput{} - - if v, ok := d.GetOk("id"); ok { - req.AllocationIds = []*string{aws.String(v.(string))} - } - - if v, ok := d.GetOk("public_ip"); ok { - req.PublicIps = []*string{aws.String(v.(string))} - } - - req.Filters = []*ec2.Filter{} - - req.Filters = append(req.Filters, buildEC2CustomFilterList( - d.Get("filter").(*schema.Set), - )...) - - req.Filters = append(req.Filters, buildEC2TagFilterList( - tagsFromMap(d.Get("tags").(map[string]interface{})), - )...) - - if len(req.Filters) == 0 { - // Don't send an empty filters list; the EC2 API won't accept it. - req.Filters = nil - } - - log.Printf("[DEBUG] Reading EIP: %s", req) - resp, err := conn.DescribeAddresses(req) - if err != nil { - return fmt.Errorf("error describing EC2 Address: %s", err) - } - if resp == nil || len(resp.Addresses) == 0 { - return fmt.Errorf("no matching Elastic IP found") - } - if len(resp.Addresses) > 1 { - return fmt.Errorf("multiple Elastic IPs matched; use additional constraints to reduce matches to a single Elastic IP") - } - - eip := resp.Addresses[0] - - if aws.StringValue(eip.Domain) == ec2.DomainTypeVpc { - d.SetId(aws.StringValue(eip.AllocationId)) - } else { - log.Printf("[DEBUG] Reading EIP, has no AllocationId, this means we have a Classic EIP, the id will also be the public ip : %s", req) - d.SetId(aws.StringValue(eip.PublicIp)) - } - - d.Set("association_id", eip.AssociationId) - d.Set("domain", eip.Domain) - d.Set("instance_id", eip.InstanceId) - d.Set("network_interface_id", eip.NetworkInterfaceId) - d.Set("network_interface_owner_id", eip.NetworkInterfaceOwnerId) - d.Set("private_ip", eip.PrivateIpAddress) - d.Set("public_ip", eip.PublicIp) - d.Set("public_ipv4_pool", eip.PublicIpv4Pool) - d.Set("tags", tagsToMap(eip.Tags)) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster.go deleted file mode 100644 index b9d66b90c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster.go +++ /dev/null @@ -1,126 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/eks" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func dataSourceAwsEksCluster() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEksClusterRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "certificate_authority": { - Type: schema.TypeList, - MaxItems: 1, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "data": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "created_at": { - Type: schema.TypeString, - Computed: true, - }, - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "platform_version": { - Type: schema.TypeString, - Computed: true, - }, - "role_arn": { - Type: schema.TypeString, - Computed: true, - }, - "vpc_config": { - Type: schema.TypeList, - MaxItems: 1, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "security_group_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "subnet_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "version": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsEksClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).eksconn - name := d.Get("name").(string) - - input := &eks.DescribeClusterInput{ - Name: aws.String(name), - } - - log.Printf("[DEBUG] Reading EKS Cluster: %s", input) - output, err := conn.DescribeCluster(input) - if err != nil { - return fmt.Errorf("error reading EKS Cluster (%s): %s", name, err) - } - - cluster := output.Cluster - if cluster == nil { - return fmt.Errorf("EKS Cluster (%s) not found", name) - } - - d.SetId(name) - d.Set("arn", cluster.Arn) - - if err := d.Set("certificate_authority", flattenEksCertificate(cluster.CertificateAuthority)); err != nil { - return fmt.Errorf("error setting certificate_authority: %s", err) - } - - d.Set("created_at", aws.TimeValue(cluster.CreatedAt).String()) - d.Set("endpoint", cluster.Endpoint) - d.Set("name", cluster.Name) - d.Set("platform_version", cluster.PlatformVersion) - d.Set("role_arn", cluster.RoleArn) - d.Set("version", cluster.Version) - - if err := d.Set("vpc_config", flattenEksVpcConfigResponse(cluster.ResourcesVpcConfig)); err != nil { - return fmt.Errorf("error setting vpc_config: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster_auth.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster_auth.go deleted file mode 100644 index 4ace7b051..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster_auth.go +++ /dev/null @@ -1,48 +0,0 @@ -package aws - -import ( - "fmt" - "time" - - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - "github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token" -) - -func dataSourceAwsEksClusterAuth() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsEksClusterAuthRead, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.NoZeroValues, - }, - - "token": { - Type: schema.TypeString, - Computed: true, - Sensitive: true, - }, - }, - } -} - -func dataSourceAwsEksClusterAuthRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).stsconn - name := d.Get("name").(string) - generator, err := token.NewGenerator(false) - if err != nil { - return fmt.Errorf("error getting token generator: %v", err) - } - token, err := generator.GetWithSTS(name, conn) - if err != nil { - return fmt.Errorf("error getting token: %v", err) - } - - d.SetId(time.Now().UTC().String()) - d.Set("token", token.Token) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_application.go deleted file mode 100644 index 5ec320d7a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_application.go +++ /dev/null @@ -1,87 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elasticbeanstalk" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsElasticBeanstalkApplication() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsElasticBeanstalkApplicationRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Computed: true, - }, - "appversion_lifecycle": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "service_role": { - Type: schema.TypeString, - Computed: true, - }, - "max_age_in_days": { - Type: schema.TypeInt, - Computed: true, - }, - "max_count": { - Type: schema.TypeInt, - Computed: true, - }, - "delete_source_from_s3": { - Type: schema.TypeBool, - Computed: true, - }, - }, - }, - }, - }, - } -} - -func dataSourceAwsElasticBeanstalkApplicationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - // Get the name and description - name := d.Get("name").(string) - - resp, err := conn.DescribeApplications(&elasticbeanstalk.DescribeApplicationsInput{ - ApplicationNames: []*string{aws.String(name)}, - }) - if err != nil { - return fmt.Errorf("Error describing Applications (%s): %s", name, err) - } - - if len(resp.Applications) > 1 || len(resp.Applications) < 1 { - return fmt.Errorf("Error %d Applications matched, expected 1", len(resp.Applications)) - } - - app := resp.Applications[0] - - d.SetId(name) - d.Set("arn", app.ApplicationArn) - d.Set("name", app.ApplicationName) - d.Set("description", app.Description) - - if app.ResourceLifecycleConfig != nil { - d.Set("appversion_lifecycle", flattenResourceLifecycleConfig(app.ResourceLifecycleConfig)) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_hosted_zone.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_hosted_zone.go deleted file mode 100644 index d0f209eae..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_hosted_zone.go +++ /dev/null @@ -1,56 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/hashicorp/terraform/helper/schema" -) - -// See # http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region -var elasticBeanstalkHostedZoneIds = map[string]string{ - "ap-southeast-1": "Z16FZ9L249IFLT", - "ap-southeast-2": "Z2PCDNR3VC2G1N", - "ap-northeast-1": "Z1R25G3KIG2GBW", - "ap-northeast-2": "Z3JE5OI70TWKCP", - "ap-south-1": "Z18NTBI3Y7N9TZ", - "ca-central-1": "ZJFCZL7SSZB5I", - "eu-central-1": "Z1FRNW7UH4DEZJ", - "eu-west-1": "Z2NYPWQ7DFZAZH", - "eu-west-2": "Z1GKAAAUGATPF1", - "eu-west-3": "Z5WN6GAYWG5OB", - "sa-east-1": "Z10X7K2B4QSOFV", - "us-east-1": "Z117KPS5GTRQ2G", - "us-east-2": "Z14LCN19Q5QHIC", - "us-west-1": "Z1LQECGX5PH1X", - "us-west-2": "Z38NKT9BP95V3O", -} - -func dataSourceAwsElasticBeanstalkHostedZone() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsElasticBeanstalkHostedZoneRead, - - Schema: map[string]*schema.Schema{ - "region": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func dataSourceAwsElasticBeanstalkHostedZoneRead(d *schema.ResourceData, meta interface{}) error { - region := meta.(*AWSClient).region - if v, ok := d.GetOk("region"); ok { - region = v.(string) - } - - zoneID, ok := elasticBeanstalkHostedZoneIds[region] - - if !ok { - return fmt.Errorf("Unsupported region: %s", region) - } - - d.SetId(zoneID) - d.Set("region", region) - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_solution_stack.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_solution_stack.go deleted file mode 100644 index b41f67568..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_solution_stack.go +++ /dev/null @@ -1,96 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - - "github.com/aws/aws-sdk-go/service/elasticbeanstalk" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func dataSourceAwsElasticBeanstalkSolutionStack() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsElasticBeanstalkSolutionStackRead, - - Schema: map[string]*schema.Schema{ - "name_regex": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.ValidateRegexp, - }, - "most_recent": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - // Computed values. - "name": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -// dataSourceAwsElasticBeanstalkSolutionStackRead performs the API lookup. -func dataSourceAwsElasticBeanstalkSolutionStackRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - nameRegex := d.Get("name_regex") - - var params *elasticbeanstalk.ListAvailableSolutionStacksInput - - log.Printf("[DEBUG] Reading Elastic Beanstalk Solution Stack: %s", params) - resp, err := conn.ListAvailableSolutionStacks(params) - if err != nil { - return err - } - - var filteredSolutionStacks []*string - - r := regexp.MustCompile(nameRegex.(string)) - for _, solutionStack := range resp.SolutionStacks { - if r.MatchString(*solutionStack) { - filteredSolutionStacks = append(filteredSolutionStacks, solutionStack) - } - } - - var solutionStack *string - if len(filteredSolutionStacks) < 1 { - return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") - } - - if len(filteredSolutionStacks) == 1 { - // Query returned single result. - solutionStack = filteredSolutionStacks[0] - } else { - recent := d.Get("most_recent").(bool) - log.Printf("[DEBUG] aws_elastic_beanstalk_solution_stack - multiple results found and `most_recent` is set to: %t", recent) - if recent { - solutionStack = mostRecentSolutionStack(filteredSolutionStacks) - } else { - return fmt.Errorf("Your query returned more than one result. Please try a more " + - "specific search criteria, or set `most_recent` attribute to true.") - } - } - - log.Printf("[DEBUG] aws_elastic_beanstalk_solution_stack - Single solution stack found: %s", *solutionStack) - return solutionStackDescriptionAttributes(d, solutionStack) -} - -// Returns the most recent solution stack out of a slice of stacks. -func mostRecentSolutionStack(solutionStacks []*string) *string { - return solutionStacks[0] -} - -// populate the numerous fields that the image description returns. -func solutionStackDescriptionAttributes(d *schema.ResourceData, solutionStack *string) error { - // Simple attributes first - d.SetId(*solutionStack) - d.Set("name", solutionStack) - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_cluster.go deleted file mode 100644 index 4456aef75..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_cluster.go +++ /dev/null @@ -1,241 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/elasticache" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsElastiCacheCluster() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsElastiCacheClusterRead, - - Schema: map[string]*schema.Schema{ - "cluster_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: func(v interface{}) string { - value := v.(string) - return strings.ToLower(value) - }, - }, - - "node_type": { - Type: schema.TypeString, - Computed: true, - }, - - "num_cache_nodes": { - Type: schema.TypeInt, - Computed: true, - }, - - "subnet_group_name": { - Type: schema.TypeString, - Computed: true, - }, - - "engine": { - Type: schema.TypeString, - Computed: true, - }, - - "engine_version": { - Type: schema.TypeString, - Computed: true, - }, - - "parameter_group_name": { - Type: schema.TypeString, - Computed: true, - }, - - "replication_group_id": { - Type: schema.TypeString, - Computed: true, - }, - - "security_group_names": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "security_group_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "maintenance_window": { - Type: schema.TypeString, - Computed: true, - }, - - "snapshot_window": { - Type: schema.TypeString, - Computed: true, - }, - - "snapshot_retention_limit": { - Type: schema.TypeInt, - Computed: true, - }, - - "availability_zone": { - Type: schema.TypeString, - Computed: true, - }, - - "notification_topic_arn": { - Type: schema.TypeString, - Computed: true, - }, - - "port": { - Type: schema.TypeInt, - Computed: true, - }, - - "configuration_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "cluster_address": { - Type: schema.TypeString, - Computed: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "cache_nodes": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, - "address": { - Type: schema.TypeString, - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Computed: true, - }, - "availability_zone": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - - "tags": tagsSchemaComputed(), - }, - } -} - -func dataSourceAwsElastiCacheClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - req := &elasticache.DescribeCacheClustersInput{ - CacheClusterId: aws.String(d.Get("cluster_id").(string)), - ShowCacheNodeInfo: aws.Bool(true), - } - - log.Printf("[DEBUG] Reading ElastiCache Cluster: %s", req) - resp, err := conn.DescribeCacheClusters(req) - if err != nil { - return err - } - - if len(resp.CacheClusters) < 1 { - return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") - } - if len(resp.CacheClusters) > 1 { - return fmt.Errorf("Your query returned more than one result. Please try a more specific search criteria.") - } - - cluster := resp.CacheClusters[0] - - d.SetId(*cluster.CacheClusterId) - - d.Set("cluster_id", cluster.CacheClusterId) - d.Set("node_type", cluster.CacheNodeType) - d.Set("num_cache_nodes", cluster.NumCacheNodes) - d.Set("subnet_group_name", cluster.CacheSubnetGroupName) - d.Set("engine", cluster.Engine) - d.Set("engine_version", cluster.EngineVersion) - d.Set("security_group_names", flattenElastiCacheSecurityGroupNames(cluster.CacheSecurityGroups)) - d.Set("security_group_ids", flattenElastiCacheSecurityGroupIds(cluster.SecurityGroups)) - - if cluster.CacheParameterGroup != nil { - d.Set("parameter_group_name", cluster.CacheParameterGroup.CacheParameterGroupName) - } - - if cluster.ReplicationGroupId != nil { - d.Set("replication_group_id", cluster.ReplicationGroupId) - } - - d.Set("maintenance_window", cluster.PreferredMaintenanceWindow) - d.Set("snapshot_window", cluster.SnapshotWindow) - d.Set("snapshot_retention_limit", cluster.SnapshotRetentionLimit) - d.Set("availability_zone", cluster.PreferredAvailabilityZone) - - if cluster.NotificationConfiguration != nil { - if *cluster.NotificationConfiguration.TopicStatus == "active" { - d.Set("notification_topic_arn", cluster.NotificationConfiguration.TopicArn) - } - } - - if cluster.ConfigurationEndpoint != nil { - d.Set("port", cluster.ConfigurationEndpoint.Port) - d.Set("configuration_endpoint", aws.String(fmt.Sprintf("%s:%d", *cluster.ConfigurationEndpoint.Address, *cluster.ConfigurationEndpoint.Port))) - d.Set("cluster_address", aws.String(*cluster.ConfigurationEndpoint.Address)) - } - - if err := setCacheNodeData(d, cluster); err != nil { - return err - } - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "elasticache", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("cluster:%s", d.Id()), - }.String() - d.Set("arn", arn) - - tagResp, err := conn.ListTagsForResource(&elasticache.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) - } - - var et []*elasticache.Tag - if len(tagResp.TagList) > 0 { - et = tagResp.TagList - } - d.Set("tags", tagsToMapEC(et)) - - return nil - -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_replication_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_replication_group.go deleted file mode 100644 index 7c3ee5e2c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_replication_group.go +++ /dev/null @@ -1,122 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elasticache" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsElasticacheReplicationGroup() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsElasticacheReplicationGroupRead, - Schema: map[string]*schema.Schema{ - "replication_group_id": { - Type: schema.TypeString, - Required: true, - }, - "replication_group_description": { - Type: schema.TypeString, - Computed: true, - }, - "auth_token_enabled": { - Type: schema.TypeBool, - Computed: true, - }, - "automatic_failover_enabled": { - Type: schema.TypeBool, - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Computed: true, - }, - "configuration_endpoint_address": { - Type: schema.TypeString, - Computed: true, - }, - "primary_endpoint_address": { - Type: schema.TypeString, - Computed: true, - }, - "number_cache_clusters": { - Type: schema.TypeInt, - Computed: true, - }, - "member_clusters": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "node_type": { - Type: schema.TypeString, - Computed: true, - }, - "snapshot_window": { - Type: schema.TypeString, - Computed: true, - }, - "snapshot_retention_limit": { - Type: schema.TypeInt, - Computed: true, - }, - }, - } -} - -func dataSourceAwsElasticacheReplicationGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - input := &elasticache.DescribeReplicationGroupsInput{ - ReplicationGroupId: aws.String(d.Get("replication_group_id").(string)), - } - - log.Printf("[DEBUG] Reading ElastiCache Replication Group: %s", input) - resp, err := conn.DescribeReplicationGroups(input) - if err != nil { - return err - } - - var rg *elasticache.ReplicationGroup - for _, r := range resp.ReplicationGroups { - if *r.ReplicationGroupId == d.Get("replication_group_id").(string) { - rg = r - } - } - if rg == nil { - return fmt.Errorf("Elasticache Replication Group (%s) not found", d.Get("replication_group_id").(string)) - } - - d.SetId(*rg.ReplicationGroupId) - d.Set("replication_group_description", rg.Description) - d.Set("auth_token_enabled", rg.AuthTokenEnabled) - if rg.AutomaticFailover != nil { - switch *rg.AutomaticFailover { - case elasticache.AutomaticFailoverStatusDisabled, elasticache.AutomaticFailoverStatusDisabling: - d.Set("automatic_failover_enabled", false) - case elasticache.AutomaticFailoverStatusEnabled, elasticache.AutomaticFailoverStatusEnabling: - d.Set("automatic_failover_enabled", true) - } - } - if rg.ConfigurationEndpoint != nil { - d.Set("port", rg.ConfigurationEndpoint.Port) - d.Set("configuration_endpoint_address", rg.ConfigurationEndpoint.Address) - } else { - if rg.NodeGroups == nil { - d.SetId("") - return fmt.Errorf("Elasticache Replication Group (%s) doesn't have node groups.", d.Get("replication_group_id").(string)) - } - d.Set("port", rg.NodeGroups[0].PrimaryEndpoint.Port) - d.Set("primary_endpoint_address", rg.NodeGroups[0].PrimaryEndpoint.Address) - } - d.Set("number_cache_clusters", len(rg.MemberClusters)) - if err := d.Set("member_clusters", flattenStringList(rg.MemberClusters)); err != nil { - return fmt.Errorf("error setting member_clusters: %s", err) - } - d.Set("node_type", rg.CacheNodeType) - d.Set("snapshot_window", rg.SnapshotWindow) - d.Set("snapshot_retention_limit", rg.SnapshotRetentionLimit) - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb.go deleted file mode 100644 index 626c2eaae..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb.go +++ /dev/null @@ -1,212 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsElb() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsElbRead, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - - "access_logs": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "interval": { - Type: schema.TypeInt, - Computed: true, - }, - "bucket": { - Type: schema.TypeString, - Computed: true, - }, - "bucket_prefix": { - Type: schema.TypeString, - Computed: true, - }, - "enabled": { - Type: schema.TypeBool, - Computed: true, - }, - }, - }, - }, - - "availability_zones": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - Set: schema.HashString, - }, - - "connection_draining": { - Type: schema.TypeBool, - Computed: true, - }, - - "connection_draining_timeout": { - Type: schema.TypeInt, - Computed: true, - }, - - "cross_zone_load_balancing": { - Type: schema.TypeBool, - Computed: true, - }, - - "dns_name": { - Type: schema.TypeString, - Computed: true, - }, - - "health_check": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "healthy_threshold": { - Type: schema.TypeInt, - Computed: true, - }, - - "unhealthy_threshold": { - Type: schema.TypeInt, - Computed: true, - }, - - "target": { - Type: schema.TypeString, - Computed: true, - }, - - "interval": { - Type: schema.TypeInt, - Computed: true, - }, - - "timeout": { - Type: schema.TypeInt, - Computed: true, - }, - }, - }, - }, - - "idle_timeout": { - Type: schema.TypeInt, - Computed: true, - }, - - "instances": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - Set: schema.HashString, - }, - - "internal": { - Type: schema.TypeBool, - Computed: true, - }, - - "listener": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "instance_port": { - Type: schema.TypeInt, - Computed: true, - }, - - "instance_protocol": { - Type: schema.TypeString, - Computed: true, - }, - - "lb_port": { - Type: schema.TypeInt, - Computed: true, - }, - - "lb_protocol": { - Type: schema.TypeString, - Computed: true, - }, - - "ssl_certificate_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - Set: resourceAwsElbListenerHash, - }, - - "security_groups": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - Set: schema.HashString, - }, - - "source_security_group": { - Type: schema.TypeString, - Computed: true, - }, - - "source_security_group_id": { - Type: schema.TypeString, - Computed: true, - }, - - "subnets": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - Set: schema.HashString, - }, - - "tags": tagsSchemaComputed(), - - "zone_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsElbRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - lbName := d.Get("name").(string) - - input := &elb.DescribeLoadBalancersInput{ - LoadBalancerNames: []*string{aws.String(lbName)}, - } - - log.Printf("[DEBUG] Reading ELB: %s", input) - resp, err := elbconn.DescribeLoadBalancers(input) - if err != nil { - return fmt.Errorf("Error retrieving LB: %s", err) - } - if len(resp.LoadBalancerDescriptions) != 1 { - return fmt.Errorf("Search returned %d results, please revise so only one is returned", len(resp.LoadBalancerDescriptions)) - } - d.SetId(*resp.LoadBalancerDescriptions[0].LoadBalancerName) - - return flattenAwsELbResource(d, meta.(*AWSClient).ec2conn, elbconn, resp.LoadBalancerDescriptions[0]) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_hosted_zone_id.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_hosted_zone_id.go deleted file mode 100644 index 3fec3f2ea..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_hosted_zone_id.go +++ /dev/null @@ -1,57 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/hashicorp/terraform/helper/schema" -) - -// See http://docs.aws.amazon.com/general/latest/gr/rande.html#elb_region -var elbHostedZoneIdPerRegionMap = map[string]string{ - "ap-northeast-1": "Z14GRHDCWA56QT", - "ap-northeast-2": "ZWKZPGTI48KDX", - "ap-northeast-3": "Z5LXEXXYW11ES", - "ap-south-1": "ZP97RAFLXTNZK", - "ap-southeast-1": "Z1LMS91P8CMLE5", - "ap-southeast-2": "Z1GM3OXH4ZPM65", - "ca-central-1": "ZQSVJUPU6J1EY", - "cn-north-1": "638102146993", - "eu-central-1": "Z215JYRZR1TBD5", - "eu-north-1": "Z23TAZ6LKFMNIO", - "eu-west-1": "Z32O12XQLNTSW2", - "eu-west-2": "ZHURV8PSTC4K8", - "eu-west-3": "Z3Q77PNBQS71R4", - "sa-east-1": "Z2P70J7HTTTPLU", - "us-east-1": "Z35SXDOTRQ7X7K", - "us-east-2": "Z3AADJGX6KTTL2", - "us-gov-west-1": "048591011584", - "us-west-1": "Z368ELLRRE2KJ0", - "us-west-2": "Z1H1FL5HABSF5", -} - -func dataSourceAwsElbHostedZoneId() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsElbHostedZoneIdRead, - - Schema: map[string]*schema.Schema{ - "region": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func dataSourceAwsElbHostedZoneIdRead(d *schema.ResourceData, meta interface{}) error { - region := meta.(*AWSClient).region - if v, ok := d.GetOk("region"); ok { - region = v.(string) - } - - if zoneId, ok := elbHostedZoneIdPerRegionMap[region]; ok { - d.SetId(zoneId) - return nil - } - - return fmt.Errorf("Unknown region (%q)", region) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_service_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_service_account.go deleted file mode 100644 index 8565c8e18..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_service_account.go +++ /dev/null @@ -1,72 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/hashicorp/terraform/helper/schema" -) - -// See http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy -var elbAccountIdPerRegionMap = map[string]string{ - "ap-northeast-1": "582318560864", - "ap-northeast-2": "600734575887", - "ap-northeast-3": "383597477331", - "ap-south-1": "718504428378", - "ap-southeast-1": "114774131450", - "ap-southeast-2": "783225319266", - "ca-central-1": "985666609251", - "cn-north-1": "638102146993", - "cn-northwest-1": "037604701340", - "eu-central-1": "054676820928", - "eu-north-1": "897822967062", - "eu-west-1": "156460612806", - "eu-west-2": "652711504416", - "eu-west-3": "009996457667", - "sa-east-1": "507241528517", - "us-east-1": "127311923021", - "us-east-2": "033677994240", - "us-gov-east-1": "190560391635", - "us-gov-west-1": "048591011584", - "us-west-1": "027434742980", - "us-west-2": "797873946194", -} - -func dataSourceAwsElbServiceAccount() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsElbServiceAccountRead, - - Schema: map[string]*schema.Schema{ - "region": { - Type: schema.TypeString, - Optional: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsElbServiceAccountRead(d *schema.ResourceData, meta interface{}) error { - region := meta.(*AWSClient).region - if v, ok := d.GetOk("region"); ok { - region = v.(string) - } - - if accid, ok := elbAccountIdPerRegionMap[region]; ok { - d.SetId(accid) - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "iam", - AccountID: accid, - Resource: "root", - }.String() - d.Set("arn", arn) - - return nil - } - - return fmt.Errorf("Unknown region (%q)", region) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_glue_script.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_glue_script.go deleted file mode 100644 index ec59b882c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_glue_script.go +++ /dev/null @@ -1,184 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/glue" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func dataSourceAwsGlueScript() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsGlueScriptRead, - Schema: map[string]*schema.Schema{ - "dag_edge": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "source": { - Type: schema.TypeString, - Required: true, - }, - "target": { - Type: schema.TypeString, - Required: true, - }, - "target_parameter": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "dag_node": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "args": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "param": { - Type: schema.TypeBool, - Optional: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "id": { - Type: schema.TypeString, - Required: true, - }, - "line_number": { - Type: schema.TypeInt, - Optional: true, - }, - "node_type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "language": { - Type: schema.TypeString, - Optional: true, - Default: glue.LanguagePython, - ValidateFunc: validation.StringInSlice([]string{ - glue.LanguagePython, - glue.LanguageScala, - }, false), - }, - "python_script": { - Type: schema.TypeString, - Computed: true, - }, - "scala_code": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsGlueScriptRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - dagEdge := d.Get("dag_edge").([]interface{}) - dagNode := d.Get("dag_node").([]interface{}) - - input := &glue.CreateScriptInput{ - DagEdges: expandGlueCodeGenEdges(dagEdge), - DagNodes: expandGlueCodeGenNodes(dagNode), - } - - if v, ok := d.GetOk("language"); ok && v.(string) != "" { - input.Language = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating Glue Script: %s", input) - output, err := conn.CreateScript(input) - if err != nil { - return fmt.Errorf("error creating Glue script: %s", err) - } - - if output == nil { - return errors.New("script not created") - } - - d.SetId(time.Now().UTC().String()) - d.Set("python_script", output.PythonScript) - d.Set("scala_code", output.ScalaCode) - - return nil -} - -func expandGlueCodeGenNodeArgs(l []interface{}) []*glue.CodeGenNodeArg { - args := []*glue.CodeGenNodeArg{} - - for _, mRaw := range l { - m := mRaw.(map[string]interface{}) - arg := &glue.CodeGenNodeArg{ - Name: aws.String(m["name"].(string)), - Param: aws.Bool(m["param"].(bool)), - Value: aws.String(m["value"].(string)), - } - args = append(args, arg) - } - - return args -} - -func expandGlueCodeGenEdges(l []interface{}) []*glue.CodeGenEdge { - edges := []*glue.CodeGenEdge{} - - for _, mRaw := range l { - m := mRaw.(map[string]interface{}) - edge := &glue.CodeGenEdge{ - Source: aws.String(m["source"].(string)), - Target: aws.String(m["target"].(string)), - } - if v, ok := m["target_parameter"]; ok && v.(string) != "" { - edge.TargetParameter = aws.String(v.(string)) - } - edges = append(edges, edge) - } - - return edges -} - -func expandGlueCodeGenNodes(l []interface{}) []*glue.CodeGenNode { - nodes := []*glue.CodeGenNode{} - - for _, mRaw := range l { - m := mRaw.(map[string]interface{}) - node := &glue.CodeGenNode{ - Args: expandGlueCodeGenNodeArgs(m["args"].([]interface{})), - Id: aws.String(m["id"].(string)), - NodeType: aws.String(m["node_type"].(string)), - } - if v, ok := m["line_number"]; ok && v.(int) != 0 { - node.LineNumber = aws.Int64(int64(v.(int))) - } - nodes = append(nodes, node) - } - - return nodes -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_account_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_account_alias.go deleted file mode 100644 index f93897373..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_account_alias.go +++ /dev/null @@ -1,48 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsIamAccountAlias() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsIamAccountAliasRead, - - Schema: map[string]*schema.Schema{ - "account_alias": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsIamAccountAliasRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - log.Printf("[DEBUG] Reading IAM Account Aliases.") - d.SetId(time.Now().UTC().String()) - - req := &iam.ListAccountAliasesInput{} - resp, err := conn.ListAccountAliases(req) - if err != nil { - return err - } - - // 'AccountAliases': [] if there is no alias. - if resp == nil || len(resp.AccountAliases) == 0 { - return fmt.Errorf("no IAM account alias found") - } - - alias := aws.StringValue(resp.AccountAliases[0]) - log.Printf("[DEBUG] Setting AWS IAM Account Alias to %s.", alias) - d.Set("account_alias", alias) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_group.go deleted file mode 100644 index 9376caf4b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_group.go +++ /dev/null @@ -1,63 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsIAMGroup() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsIAMGroupRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "path": { - Type: schema.TypeString, - Computed: true, - }, - "group_id": { - Type: schema.TypeString, - Computed: true, - }, - "group_name": { - Type: schema.TypeString, - Required: true, - }, - }, - } -} - -func dataSourceAwsIAMGroupRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - groupName := d.Get("group_name").(string) - - req := &iam.GetGroupInput{ - GroupName: aws.String(groupName), - } - - log.Printf("[DEBUG] Reading IAM Group: %s", req) - resp, err := iamconn.GetGroup(req) - if err != nil { - return fmt.Errorf("Error getting group: %s", err) - } - if resp == nil { - return fmt.Errorf("no IAM group found") - } - - group := resp.Group - - d.SetId(*group.GroupId) - d.Set("arn", group.Arn) - d.Set("path", group.Path) - d.Set("group_id", group.GroupId) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_instance_profile.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_instance_profile.go deleted file mode 100644 index de36b7189..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_instance_profile.go +++ /dev/null @@ -1,82 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsIAMInstanceProfile() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsIAMInstanceProfileRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "create_date": { - Type: schema.TypeString, - Computed: true, - }, - "path": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - }, - "role_arn": { - Type: schema.TypeString, - Computed: true, - }, - "role_id": { - Type: schema.TypeString, - Computed: true, - }, - "role_name": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsIAMInstanceProfileRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - name := d.Get("name").(string) - - req := &iam.GetInstanceProfileInput{ - InstanceProfileName: aws.String(name), - } - - log.Printf("[DEBUG] Reading IAM Instance Profile: %s", req) - resp, err := iamconn.GetInstanceProfile(req) - if err != nil { - return fmt.Errorf("Error getting instance profiles: %s", err) - } - if resp == nil { - return fmt.Errorf("no IAM instance profile found") - } - - instanceProfile := resp.InstanceProfile - - d.SetId(*instanceProfile.InstanceProfileId) - d.Set("arn", instanceProfile.Arn) - d.Set("create_date", fmt.Sprintf("%v", instanceProfile.CreateDate)) - d.Set("path", instanceProfile.Path) - - if len(instanceProfile.Roles) > 0 { - role := instanceProfile.Roles[0] - d.Set("role_arn", role.Arn) - d.Set("role_id", role.RoleId) - d.Set("role_name", role.RoleName) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_policy.go deleted file mode 100644 index 78ca5b91b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_policy.go +++ /dev/null @@ -1,40 +0,0 @@ -package aws - -import ( - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsIAMPolicy() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsIAMPolicyRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Required: true, - }, - "name": { - Type: schema.TypeString, - Computed: true, - }, - "policy": { - Type: schema.TypeString, - Computed: true, - }, - "path": { - Type: schema.TypeString, - Computed: true, - }, - - "description": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsIAMPolicyRead(d *schema.ResourceData, meta interface{}) error { - d.SetId(d.Get("arn").(string)) - return resourceAwsIamPolicyRead(d, meta) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_policy_document.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_policy_document.go deleted file mode 100644 index 8e9ce8cc8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_policy_document.go +++ /dev/null @@ -1,310 +0,0 @@ -package aws - -import ( - "encoding/json" - "fmt" - "strconv" - "strings" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -var dataSourceAwsIamPolicyDocumentVarReplacer = strings.NewReplacer("&{", "${") - -func dataSourceAwsIamPolicyDocument() *schema.Resource { - setOfString := &schema.Schema{ - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - } - - return &schema.Resource{ - Read: dataSourceAwsIamPolicyDocumentRead, - - Schema: map[string]*schema.Schema{ - "override_json": { - Type: schema.TypeString, - Optional: true, - }, - "policy_id": { - Type: schema.TypeString, - Optional: true, - }, - "source_json": { - Type: schema.TypeString, - Optional: true, - }, - "statement": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "sid": { - Type: schema.TypeString, - Optional: true, - }, - "effect": { - Type: schema.TypeString, - Optional: true, - Default: "Allow", - ValidateFunc: validation.StringInSlice([]string{"Allow", "Deny"}, false), - }, - "actions": setOfString, - "not_actions": setOfString, - "resources": setOfString, - "not_resources": setOfString, - "principals": dataSourceAwsIamPolicyPrincipalSchema(), - "not_principals": dataSourceAwsIamPolicyPrincipalSchema(), - "condition": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "test": { - Type: schema.TypeString, - Required: true, - }, - "variable": { - Type: schema.TypeString, - Required: true, - }, - "values": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - }, - }, - }, - }, - }, - }, - "version": { - Type: schema.TypeString, - Optional: true, - Default: "2012-10-17", - ValidateFunc: validation.StringInSlice([]string{ - "2008-10-17", - "2012-10-17", - }, false), - }, - "json": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsIamPolicyDocumentRead(d *schema.ResourceData, meta interface{}) error { - mergedDoc := &IAMPolicyDoc{} - - // populate mergedDoc directly with any source_json - if sourceJSON, hasSourceJSON := d.GetOk("source_json"); hasSourceJSON { - if err := json.Unmarshal([]byte(sourceJSON.(string)), mergedDoc); err != nil { - return err - } - } - - // process the current document - doc := &IAMPolicyDoc{ - Version: d.Get("version").(string), - } - - if policyID, hasPolicyID := d.GetOk("policy_id"); hasPolicyID { - doc.Id = policyID.(string) - } - - if cfgStmts, hasCfgStmts := d.GetOk("statement"); hasCfgStmts { - var cfgStmtIntf = cfgStmts.([]interface{}) - stmts := make([]*IAMPolicyStatement, len(cfgStmtIntf)) - sidMap := make(map[string]struct{}) - - for i, stmtI := range cfgStmtIntf { - cfgStmt := stmtI.(map[string]interface{}) - stmt := &IAMPolicyStatement{ - Effect: cfgStmt["effect"].(string), - } - - if sid, ok := cfgStmt["sid"]; ok { - if _, ok := sidMap[sid.(string)]; ok { - return fmt.Errorf("Found duplicate sid (%s). Either remove the sid or ensure the sid is unique across all statements.", sid.(string)) - } - stmt.Sid = sid.(string) - if len(stmt.Sid) > 0 { - sidMap[stmt.Sid] = struct{}{} - } - } - - if actions := cfgStmt["actions"].(*schema.Set).List(); len(actions) > 0 { - stmt.Actions = iamPolicyDecodeConfigStringList(actions) - } - if actions := cfgStmt["not_actions"].(*schema.Set).List(); len(actions) > 0 { - stmt.NotActions = iamPolicyDecodeConfigStringList(actions) - } - - if resources := cfgStmt["resources"].(*schema.Set).List(); len(resources) > 0 { - var err error - stmt.Resources, err = dataSourceAwsIamPolicyDocumentReplaceVarsInList( - iamPolicyDecodeConfigStringList(resources), doc.Version, - ) - if err != nil { - return fmt.Errorf("error reading resources: %s", err) - } - } - if notResources := cfgStmt["not_resources"].(*schema.Set).List(); len(notResources) > 0 { - var err error - stmt.NotResources, err = dataSourceAwsIamPolicyDocumentReplaceVarsInList( - iamPolicyDecodeConfigStringList(notResources), doc.Version, - ) - if err != nil { - return fmt.Errorf("error reading not_resources: %s", err) - } - } - - if principals := cfgStmt["principals"].(*schema.Set).List(); len(principals) > 0 { - var err error - stmt.Principals, err = dataSourceAwsIamPolicyDocumentMakePrincipals(principals, doc.Version) - if err != nil { - return fmt.Errorf("error reading principals: %s", err) - } - } - - if notPrincipals := cfgStmt["not_principals"].(*schema.Set).List(); len(notPrincipals) > 0 { - var err error - stmt.NotPrincipals, err = dataSourceAwsIamPolicyDocumentMakePrincipals(notPrincipals, doc.Version) - if err != nil { - return fmt.Errorf("error reading not_principals: %s", err) - } - } - - if conditions := cfgStmt["condition"].(*schema.Set).List(); len(conditions) > 0 { - var err error - stmt.Conditions, err = dataSourceAwsIamPolicyDocumentMakeConditions(conditions, doc.Version) - if err != nil { - return fmt.Errorf("error reading condition: %s", err) - } - } - - stmts[i] = stmt - } - - doc.Statements = stmts - - } - - // merge our current document into mergedDoc - mergedDoc.Merge(doc) - - // merge in override_json - if overrideJSON, hasOverrideJSON := d.GetOk("override_json"); hasOverrideJSON { - overrideDoc := &IAMPolicyDoc{} - if err := json.Unmarshal([]byte(overrideJSON.(string)), overrideDoc); err != nil { - return err - } - - mergedDoc.Merge(overrideDoc) - } - - jsonDoc, err := json.MarshalIndent(mergedDoc, "", " ") - if err != nil { - // should never happen if the above code is correct - return err - } - jsonString := string(jsonDoc) - - d.Set("json", jsonString) - d.SetId(strconv.Itoa(hashcode.String(jsonString))) - - return nil -} - -func dataSourceAwsIamPolicyDocumentReplaceVarsInList(in interface{}, version string) (interface{}, error) { - switch v := in.(type) { - case string: - if version == "2008-10-17" && strings.Contains(v, "&{") { - return nil, fmt.Errorf("found &{ sequence in (%s), which is not supported in document version 2008-10-17", v) - } - return dataSourceAwsIamPolicyDocumentVarReplacer.Replace(v), nil - case []string: - out := make([]string, len(v)) - for i, item := range v { - if version == "2008-10-17" && strings.Contains(item, "&{") { - return nil, fmt.Errorf("found &{ sequence in (%s), which is not supported in document version 2008-10-17", item) - } - out[i] = dataSourceAwsIamPolicyDocumentVarReplacer.Replace(item) - } - return out, nil - default: - panic("dataSourceAwsIamPolicyDocumentReplaceVarsInList: input not string nor []string") - } -} - -func dataSourceAwsIamPolicyDocumentMakeConditions(in []interface{}, version string) (IAMPolicyStatementConditionSet, error) { - out := make([]IAMPolicyStatementCondition, len(in)) - for i, itemI := range in { - var err error - item := itemI.(map[string]interface{}) - out[i] = IAMPolicyStatementCondition{ - Test: item["test"].(string), - Variable: item["variable"].(string), - } - out[i].Values, err = dataSourceAwsIamPolicyDocumentReplaceVarsInList( - iamPolicyDecodeConfigStringList( - item["values"].(*schema.Set).List(), - ), version, - ) - if err != nil { - return nil, fmt.Errorf("error reading values: %s", err) - } - } - return IAMPolicyStatementConditionSet(out), nil -} - -func dataSourceAwsIamPolicyDocumentMakePrincipals(in []interface{}, version string) (IAMPolicyStatementPrincipalSet, error) { - out := make([]IAMPolicyStatementPrincipal, len(in)) - for i, itemI := range in { - var err error - item := itemI.(map[string]interface{}) - out[i] = IAMPolicyStatementPrincipal{ - Type: item["type"].(string), - } - out[i].Identifiers, err = dataSourceAwsIamPolicyDocumentReplaceVarsInList( - iamPolicyDecodeConfigStringList( - item["identifiers"].(*schema.Set).List(), - ), version, - ) - if err != nil { - return nil, fmt.Errorf("error reading identifiers: %s", err) - } - } - return IAMPolicyStatementPrincipalSet(out), nil -} - -func dataSourceAwsIamPolicyPrincipalSchema() *schema.Schema { - return &schema.Schema{ - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - "identifiers": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - }, - }, - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_role.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_role.go deleted file mode 100644 index 26af5a2fb..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_role.go +++ /dev/null @@ -1,127 +0,0 @@ -package aws - -import ( - "fmt" - "net/url" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsIAMRole() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsIAMRoleRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "assume_role_policy_document": { - Type: schema.TypeString, - Computed: true, - Deprecated: "Use `assume_role_policy` instead", - }, - "assume_role_policy": { - Type: schema.TypeString, - Computed: true, - }, - "path": { - Type: schema.TypeString, - Computed: true, - }, - "permissions_boundary": { - Type: schema.TypeString, - Computed: true, - }, - "role_id": { - Type: schema.TypeString, - Computed: true, - Deprecated: "Use `unique_id` instead", - }, - "unique_id": { - Type: schema.TypeString, - Computed: true, - }, - "description": { - Type: schema.TypeString, - Computed: true, - }, - "role_name": { - Type: schema.TypeString, - Optional: true, - Deprecated: "Use `name` instead", - }, - "name": { - Type: schema.TypeString, - Optional: true, - }, - "create_date": { - Type: schema.TypeString, - Computed: true, - }, - "max_session_duration": { - Type: schema.TypeInt, - Computed: true, - }, - }, - } -} - -func dataSourceAwsIAMRoleRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - name, hasName := d.GetOk("name") - roleName, hasRoleName := d.GetOk("role_name") - - if !hasName && !hasRoleName { - return fmt.Errorf("`%s` must be set", "name") - } - - var id string - if hasName { - id = name.(string) - } else if hasRoleName { - id = roleName.(string) - } - d.SetId(id) - - input := &iam.GetRoleInput{ - RoleName: aws.String(d.Id()), - } - - output, err := iamconn.GetRole(input) - if err != nil { - return fmt.Errorf("Error reading IAM Role %s: %s", d.Id(), err) - } - - d.Set("arn", output.Role.Arn) - if err := d.Set("create_date", output.Role.CreateDate.Format(time.RFC3339)); err != nil { - return err - } - d.Set("description", output.Role.Description) - d.Set("max_session_duration", output.Role.MaxSessionDuration) - d.Set("name", output.Role.RoleName) - d.Set("path", output.Role.Path) - d.Set("permissions_boundary", "") - if output.Role.PermissionsBoundary != nil { - d.Set("permissions_boundary", output.Role.PermissionsBoundary.PermissionsBoundaryArn) - } - d.Set("unique_id", output.Role.RoleId) - - assumRolePolicy, err := url.QueryUnescape(aws.StringValue(output.Role.AssumeRolePolicyDocument)) - if err != nil { - return err - } - if err := d.Set("assume_role_policy", assumRolePolicy); err != nil { - return err - } - - // Keep backward compatibility with previous attributes - d.Set("role_id", output.Role.RoleId) - d.Set("assume_role_policy_document", assumRolePolicy) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go deleted file mode 100644 index 16403fbd1..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go +++ /dev/null @@ -1,161 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "sort" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func dataSourceAwsIAMServerCertificate() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsIAMServerCertificateRead, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validation.StringLenBetween(0, 128), - }, - - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validation.StringLenBetween(0, 128-resource.UniqueIDSuffixLength), - }, - - "path_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "latest": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Default: false, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "path": { - Type: schema.TypeString, - Computed: true, - }, - - "expiration_date": { - Type: schema.TypeString, - Computed: true, - }, - - "upload_date": { - Type: schema.TypeString, - Computed: true, - }, - - "certificate_body": { - Type: schema.TypeString, - Computed: true, - }, - - "certificate_chain": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -type certificateByExpiration []*iam.ServerCertificateMetadata - -func (m certificateByExpiration) Len() int { - return len(m) -} - -func (m certificateByExpiration) Swap(i, j int) { - m[i], m[j] = m[j], m[i] -} - -func (m certificateByExpiration) Less(i, j int) bool { - return m[i].Expiration.After(*m[j].Expiration) -} - -func dataSourceAwsIAMServerCertificateRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - var matcher = func(cert *iam.ServerCertificateMetadata) bool { - return strings.HasPrefix(aws.StringValue(cert.ServerCertificateName), d.Get("name_prefix").(string)) - } - if v, ok := d.GetOk("name"); ok { - matcher = func(cert *iam.ServerCertificateMetadata) bool { - return aws.StringValue(cert.ServerCertificateName) == v.(string) - } - } - - var metadatas []*iam.ServerCertificateMetadata - input := &iam.ListServerCertificatesInput{} - if v, ok := d.GetOk("path_prefix"); ok { - input.PathPrefix = aws.String(v.(string)) - } - log.Printf("[DEBUG] Reading IAM Server Certificate") - err := iamconn.ListServerCertificatesPages(input, func(p *iam.ListServerCertificatesOutput, lastPage bool) bool { - for _, cert := range p.ServerCertificateMetadataList { - if matcher(cert) { - metadatas = append(metadatas, cert) - } - } - return true - }) - if err != nil { - return fmt.Errorf("Error describing certificates: %s", err) - } - - if len(metadatas) == 0 { - return fmt.Errorf("Search for AWS IAM server certificate returned no results") - } - if len(metadatas) > 1 { - if !d.Get("latest").(bool) { - return fmt.Errorf("Search for AWS IAM server certificate returned too many results") - } - - sort.Sort(certificateByExpiration(metadatas)) - } - - metadata := metadatas[0] - d.SetId(*metadata.ServerCertificateId) - d.Set("arn", *metadata.Arn) - d.Set("path", *metadata.Path) - d.Set("name", *metadata.ServerCertificateName) - if metadata.Expiration != nil { - d.Set("expiration_date", metadata.Expiration.Format(time.RFC3339)) - } - - log.Printf("[DEBUG] Get Public Key Certificate for %s", *metadata.ServerCertificateName) - serverCertificateResp, err := iamconn.GetServerCertificate(&iam.GetServerCertificateInput{ - ServerCertificateName: metadata.ServerCertificateName, - }) - if err != nil { - return err - } - d.Set("upload_date", serverCertificateResp.ServerCertificate.ServerCertificateMetadata.UploadDate.Format(time.RFC3339)) - d.Set("certificate_body", aws.StringValue(serverCertificateResp.ServerCertificate.CertificateBody)) - d.Set("certificate_chain", aws.StringValue(serverCertificateResp.ServerCertificate.CertificateChain)) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_user.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_user.go deleted file mode 100644 index 2a627b918..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_user.go +++ /dev/null @@ -1,65 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsIAMUser() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsIAMUserRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "path": { - Type: schema.TypeString, - Computed: true, - }, - "permissions_boundary": { - Type: schema.TypeString, - Computed: true, - }, - "user_id": { - Type: schema.TypeString, - Computed: true, - }, - "user_name": { - Type: schema.TypeString, - Required: true, - }, - }, - } -} - -func dataSourceAwsIAMUserRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - userName := d.Get("user_name").(string) - req := &iam.GetUserInput{ - UserName: aws.String(userName), - } - - log.Printf("[DEBUG] Reading IAM User: %s", req) - resp, err := iamconn.GetUser(req) - if err != nil { - return fmt.Errorf("error getting user: %s", err) - } - - user := resp.User - d.SetId(aws.StringValue(user.UserId)) - d.Set("arn", user.Arn) - d.Set("path", user.Path) - d.Set("permissions_boundary", "") - if user.PermissionsBoundary != nil { - d.Set("permissions_boundary", user.PermissionsBoundary.PermissionsBoundaryArn) - } - d.Set("user_id", user.UserId) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_inspector_rules_packages.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_inspector_rules_packages.go deleted file mode 100644 index fb479bd5f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_inspector_rules_packages.go +++ /dev/null @@ -1,56 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "sort" - "time" - - "github.com/aws/aws-sdk-go/service/inspector" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsInspectorRulesPackages() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsInspectorRulesPackagesRead, - - Schema: map[string]*schema.Schema{ - "arns": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func dataSourceAwsInspectorRulesPackagesRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).inspectorconn - - log.Printf("[DEBUG] Reading Rules Packages.") - d.SetId(time.Now().UTC().String()) - - var arns []string - - input := &inspector.ListRulesPackagesInput{} - - err := conn.ListRulesPackagesPages(input, func(page *inspector.ListRulesPackagesOutput, lastPage bool) bool { - for _, arn := range page.RulesPackageArns { - arns = append(arns, *arn) - } - return !lastPage - }) - if err != nil { - return fmt.Errorf("Error fetching Rules Packages: %s", err) - } - - if len(arns) == 0 { - return errors.New("No rules packages found.") - } - - sort.Strings(arns) - d.Set("arns", arns) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go deleted file mode 100644 index e07fa1867..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go +++ /dev/null @@ -1,441 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsInstance() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsInstanceRead, - - Schema: map[string]*schema.Schema{ - "filter": dataSourceFiltersSchema(), - "tags": tagsSchemaComputed(), - "instance_tags": tagsSchemaComputed(), - "instance_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "ami": { - Type: schema.TypeString, - Computed: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "instance_type": { - Type: schema.TypeString, - Computed: true, - }, - "instance_state": { - Type: schema.TypeString, - Computed: true, - }, - "availability_zone": { - Type: schema.TypeString, - Computed: true, - }, - "placement_group": { - Type: schema.TypeString, - Computed: true, - }, - "tenancy": { - Type: schema.TypeString, - Computed: true, - }, - "host_id": { - Type: schema.TypeString, - Computed: true, - }, - "key_name": { - Type: schema.TypeString, - Computed: true, - }, - "get_password_data": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "password_data": { - Type: schema.TypeString, - Computed: true, - }, - "public_dns": { - Type: schema.TypeString, - Computed: true, - }, - "public_ip": { - Type: schema.TypeString, - Computed: true, - }, - "private_dns": { - Type: schema.TypeString, - Computed: true, - }, - "private_ip": { - Type: schema.TypeString, - Computed: true, - }, - "iam_instance_profile": { - Type: schema.TypeString, - Computed: true, - }, - "subnet_id": { - Type: schema.TypeString, - Computed: true, - }, - "network_interface_id": { - Type: schema.TypeString, - Computed: true, - }, - "associate_public_ip_address": { - Type: schema.TypeBool, - Computed: true, - }, - "ebs_optimized": { - Type: schema.TypeBool, - Computed: true, - }, - "source_dest_check": { - Type: schema.TypeBool, - Computed: true, - }, - "monitoring": { - Type: schema.TypeBool, - Computed: true, - }, - "user_data": { - Type: schema.TypeString, - Computed: true, - }, - "security_groups": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - "vpc_security_group_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - "ephemeral_block_device": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "device_name": { - Type: schema.TypeString, - Required: true, - }, - - "virtual_name": { - Type: schema.TypeString, - Optional: true, - }, - - "no_device": { - Type: schema.TypeBool, - Optional: true, - }, - }, - }, - }, - "ebs_block_device": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Computed: true, - }, - - "device_name": { - Type: schema.TypeString, - Computed: true, - }, - - "encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - - "iops": { - Type: schema.TypeInt, - Computed: true, - }, - - "snapshot_id": { - Type: schema.TypeString, - Computed: true, - }, - - "volume_size": { - Type: schema.TypeInt, - Computed: true, - }, - - "volume_type": { - Type: schema.TypeString, - Computed: true, - }, - - "volume_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "root_block_device": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Computed: true, - }, - - "iops": { - Type: schema.TypeInt, - Computed: true, - }, - - "volume_size": { - Type: schema.TypeInt, - Computed: true, - }, - - "volume_type": { - Type: schema.TypeString, - Computed: true, - }, - - "volume_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "credit_specification": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cpu_credits": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "disable_api_termination": { - Type: schema.TypeBool, - Computed: true, - }, - }, - } -} - -// dataSourceAwsInstanceRead performs the instanceID lookup -func dataSourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - filters, filtersOk := d.GetOk("filter") - instanceID, instanceIDOk := d.GetOk("instance_id") - tags, tagsOk := d.GetOk("instance_tags") - - if !filtersOk && !instanceIDOk && !tagsOk { - return fmt.Errorf("One of filters, instance_tags, or instance_id must be assigned") - } - - // Build up search parameters - params := &ec2.DescribeInstancesInput{} - if filtersOk { - params.Filters = buildAwsDataSourceFilters(filters.(*schema.Set)) - } - if instanceIDOk { - params.InstanceIds = []*string{aws.String(instanceID.(string))} - } - if tagsOk { - params.Filters = append(params.Filters, buildEC2TagFilterList( - tagsFromMap(tags.(map[string]interface{})), - )...) - } - - log.Printf("[DEBUG] Reading IAM Instance: %s", params) - resp, err := conn.DescribeInstances(params) - if err != nil { - return err - } - - // If no instances were returned, return - if len(resp.Reservations) == 0 { - return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") - } - - var filteredInstances []*ec2.Instance - - // loop through reservations, and remove terminated instances, populate instance slice - for _, res := range resp.Reservations { - for _, instance := range res.Instances { - if instance.State != nil && *instance.State.Name != "terminated" { - filteredInstances = append(filteredInstances, instance) - } - } - } - - var instance *ec2.Instance - if len(filteredInstances) < 1 { - return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") - } - - // (TODO: Support a list of instances to be returned) - // Possibly with a different data source that returns a list of individual instance data sources - if len(filteredInstances) > 1 { - return fmt.Errorf("Your query returned more than one result. Please try a more " + - "specific search criteria.") - } else { - instance = filteredInstances[0] - } - - log.Printf("[DEBUG] aws_instance - Single Instance ID found: %s", *instance.InstanceId) - if err := instanceDescriptionAttributes(d, instance, conn); err != nil { - return err - } - - if d.Get("get_password_data").(bool) { - passwordData, err := getAwsEc2InstancePasswordData(*instance.InstanceId, conn) - if err != nil { - return err - } - d.Set("password_data", passwordData) - } - - // ARN - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "ec2", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("instance/%s", d.Id()), - } - d.Set("arn", arn.String()) - - return nil -} - -// Populate instance attribute fields with the returned instance -func instanceDescriptionAttributes(d *schema.ResourceData, instance *ec2.Instance, conn *ec2.EC2) error { - d.SetId(*instance.InstanceId) - // Set the easy attributes - d.Set("instance_state", instance.State.Name) - if instance.Placement != nil { - d.Set("availability_zone", instance.Placement.AvailabilityZone) - } - if instance.Placement.GroupName != nil { - d.Set("placement_group", instance.Placement.GroupName) - } - if instance.Placement.Tenancy != nil { - d.Set("tenancy", instance.Placement.Tenancy) - } - if instance.Placement.HostId != nil { - d.Set("host_id", instance.Placement.HostId) - } - d.Set("ami", instance.ImageId) - d.Set("instance_type", instance.InstanceType) - d.Set("key_name", instance.KeyName) - d.Set("public_dns", instance.PublicDnsName) - d.Set("public_ip", instance.PublicIpAddress) - d.Set("private_dns", instance.PrivateDnsName) - d.Set("private_ip", instance.PrivateIpAddress) - d.Set("iam_instance_profile", iamInstanceProfileArnToName(instance.IamInstanceProfile)) - - // iterate through network interfaces, and set subnet, network_interface, public_addr - if len(instance.NetworkInterfaces) > 0 { - for _, ni := range instance.NetworkInterfaces { - if *ni.Attachment.DeviceIndex == 0 { - d.Set("subnet_id", ni.SubnetId) - d.Set("network_interface_id", ni.NetworkInterfaceId) - d.Set("associate_public_ip_address", ni.Association != nil) - } - } - } else { - d.Set("subnet_id", instance.SubnetId) - d.Set("network_interface_id", "") - } - - d.Set("ebs_optimized", instance.EbsOptimized) - if instance.SubnetId != nil && *instance.SubnetId != "" { - d.Set("source_dest_check", instance.SourceDestCheck) - } - - if instance.Monitoring != nil && instance.Monitoring.State != nil { - monitoringState := *instance.Monitoring.State - d.Set("monitoring", monitoringState == "enabled" || monitoringState == "pending") - } - - d.Set("tags", tagsToMap(instance.Tags)) - - // Security Groups - if err := readSecurityGroups(d, instance, conn); err != nil { - return err - } - - // Block devices - if err := readBlockDevices(d, instance, conn); err != nil { - return err - } - if _, ok := d.GetOk("ephemeral_block_device"); !ok { - d.Set("ephemeral_block_device", []interface{}{}) - } - - // Lookup and Set Instance Attributes - { - attr, err := conn.DescribeInstanceAttribute(&ec2.DescribeInstanceAttributeInput{ - Attribute: aws.String("disableApiTermination"), - InstanceId: aws.String(d.Id()), - }) - if err != nil { - return err - } - d.Set("disable_api_termination", attr.DisableApiTermination.Value) - } - { - attr, err := conn.DescribeInstanceAttribute(&ec2.DescribeInstanceAttributeInput{ - Attribute: aws.String(ec2.InstanceAttributeNameUserData), - InstanceId: aws.String(d.Id()), - }) - if err != nil { - return err - } - if attr.UserData.Value != nil { - d.Set("user_data", userDataHashSum(*attr.UserData.Value)) - } - } - { - creditSpecifications, err := getCreditSpecifications(conn, d.Id()) - if err != nil && !isAWSErr(err, "UnsupportedOperation", "") { - return err - } - if err := d.Set("credit_specification", creditSpecifications); err != nil { - return fmt.Errorf("error setting credit_specification: %s", err) - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instances.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instances.go deleted file mode 100644 index 5fd837383..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instances.go +++ /dev/null @@ -1,129 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func dataSourceAwsInstances() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsInstancesRead, - - Schema: map[string]*schema.Schema{ - "filter": dataSourceFiltersSchema(), - "instance_tags": tagsSchemaComputed(), - "instance_state_names": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - ec2.InstanceStateNamePending, - ec2.InstanceStateNameRunning, - ec2.InstanceStateNameShuttingDown, - ec2.InstanceStateNameStopped, - ec2.InstanceStateNameStopping, - ec2.InstanceStateNameTerminated, - }, false), - }, - }, - - "ids": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "private_ips": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "public_ips": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func dataSourceAwsInstancesRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - filters, filtersOk := d.GetOk("filter") - tags, tagsOk := d.GetOk("instance_tags") - - if !filtersOk && !tagsOk { - return fmt.Errorf("One of filters or instance_tags must be assigned") - } - - instanceStateNames := []*string{aws.String(ec2.InstanceStateNameRunning)} - if v, ok := d.GetOk("instance_state_names"); ok && len(v.(*schema.Set).List()) > 0 { - instanceStateNames = expandStringSet(v.(*schema.Set)) - } - params := &ec2.DescribeInstancesInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("instance-state-name"), - Values: instanceStateNames, - }, - }, - } - - if filtersOk { - params.Filters = append(params.Filters, - buildAwsDataSourceFilters(filters.(*schema.Set))...) - } - if tagsOk { - params.Filters = append(params.Filters, buildEC2TagFilterList( - tagsFromMap(tags.(map[string]interface{})), - )...) - } - - log.Printf("[DEBUG] Reading EC2 instances: %s", params) - - var instanceIds, privateIps, publicIps []string - err := conn.DescribeInstancesPages(params, func(resp *ec2.DescribeInstancesOutput, isLast bool) bool { - for _, res := range resp.Reservations { - for _, instance := range res.Instances { - instanceIds = append(instanceIds, *instance.InstanceId) - if instance.PrivateIpAddress != nil { - privateIps = append(privateIps, *instance.PrivateIpAddress) - } - if instance.PublicIpAddress != nil { - publicIps = append(publicIps, *instance.PublicIpAddress) - } - } - } - return !isLast - }) - if err != nil { - return err - } - - if len(instanceIds) < 1 { - return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") - } - - log.Printf("[DEBUG] Found %d instances via given filter", len(instanceIds)) - - d.SetId(resource.UniqueId()) - err = d.Set("ids", instanceIds) - if err != nil { - return err - } - - err = d.Set("private_ips", privateIps) - if err != nil { - return err - } - - err = d.Set("public_ips", publicIps) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_internet_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_internet_gateway.go deleted file mode 100644 index 5535fb7a3..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_internet_gateway.go +++ /dev/null @@ -1,102 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsInternetGateway() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsInternetGatewayRead, - Schema: map[string]*schema.Schema{ - "internet_gateway_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "filter": ec2CustomFiltersSchema(), - "tags": tagsSchemaComputed(), - "attachments": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "state": { - Type: schema.TypeString, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsInternetGatewayRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - req := &ec2.DescribeInternetGatewaysInput{} - internetGatewayId, internetGatewayIdOk := d.GetOk("internet_gateway_id") - tags, tagsOk := d.GetOk("tags") - filter, filterOk := d.GetOk("filter") - - if !internetGatewayIdOk && !filterOk && !tagsOk { - return fmt.Errorf("One of internet_gateway_id or filter or tags must be assigned") - } - - req.Filters = buildEC2AttributeFilterList(map[string]string{ - "internet-gateway-id": internetGatewayId.(string), - }) - req.Filters = append(req.Filters, buildEC2TagFilterList( - tagsFromMap(tags.(map[string]interface{})), - )...) - req.Filters = append(req.Filters, buildEC2CustomFilterList( - filter.(*schema.Set), - )...) - - log.Printf("[DEBUG] Reading Internet Gateway: %s", req) - resp, err := conn.DescribeInternetGateways(req) - - if err != nil { - return err - } - if resp == nil || len(resp.InternetGateways) == 0 { - return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") - } - if len(resp.InternetGateways) > 1 { - return fmt.Errorf("Multiple Internet Gateways matched; use additional constraints to reduce matches to a single Internet Gateway") - } - - igw := resp.InternetGateways[0] - d.SetId(aws.StringValue(igw.InternetGatewayId)) - d.Set("tags", tagsToMap(igw.Tags)) - d.Set("owner_id", igw.OwnerId) - d.Set("internet_gateway_id", igw.InternetGatewayId) - - err1 := d.Set("attachments", dataSourceAttachmentsRead(igw.Attachments)) - return err1 - -} - -func dataSourceAttachmentsRead(igwAttachments []*ec2.InternetGatewayAttachment) []map[string]interface{} { - attachments := make([]map[string]interface{}, 0, len(igwAttachments)) - for _, a := range igwAttachments { - m := make(map[string]interface{}) - m["state"] = *a.State - m["vpc_id"] = *a.VpcId - attachments = append(attachments, m) - } - - return attachments -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iot_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iot_endpoint.go deleted file mode 100644 index 2c5e94372..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iot_endpoint.go +++ /dev/null @@ -1,52 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iot" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func dataSourceAwsIotEndpoint() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsIotEndpointRead, - Schema: map[string]*schema.Schema{ - "endpoint_address": { - Type: schema.TypeString, - Computed: true, - }, - "endpoint_type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - "iot:CredentialProvider", - "iot:Data", - "iot:Data-ATS", - "iot:Jobs", - }, false), - }, - }, - } -} - -func dataSourceAwsIotEndpointRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - input := &iot.DescribeEndpointInput{} - - if v, ok := d.GetOk("endpoint_type"); ok { - input.EndpointType = aws.String(v.(string)) - } - - output, err := conn.DescribeEndpoint(input) - if err != nil { - return fmt.Errorf("error while describing iot endpoint: %s", err) - } - endpointAddress := aws.StringValue(output.EndpointAddress) - d.SetId(endpointAddress) - if err := d.Set("endpoint_address", endpointAddress); err != nil { - return fmt.Errorf("error setting endpoint_address: %s", err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ip_ranges.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ip_ranges.go deleted file mode 100644 index 3706ec8ba..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ip_ranges.go +++ /dev/null @@ -1,181 +0,0 @@ -package aws - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "log" - "sort" - "strconv" - "strings" - - "github.com/hashicorp/go-cleanhttp" - "github.com/hashicorp/terraform/helper/schema" -) - -type dataSourceAwsIPRangesResult struct { - CreateDate string - Prefixes []dataSourceAwsIPRangesPrefix - Ipv6Prefixes []dataSourceAwsIPRangesIpv6Prefix `json:"ipv6_prefixes"` - SyncToken string -} - -type dataSourceAwsIPRangesPrefix struct { - IpPrefix string `json:"ip_prefix"` - Region string - Service string -} - -type dataSourceAwsIPRangesIpv6Prefix struct { - Ipv6Prefix string `json:"ipv6_prefix"` - Region string - Service string -} - -func dataSourceAwsIPRanges() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsIPRangesRead, - - Schema: map[string]*schema.Schema{ - "cidr_blocks": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "create_date": { - Type: schema.TypeString, - Computed: true, - }, - "ipv6_cidr_blocks": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "regions": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - }, - "services": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "sync_token": { - Type: schema.TypeInt, - Computed: true, - }, - "url": { - Type: schema.TypeString, - Optional: true, - Default: "https://ip-ranges.amazonaws.com/ip-ranges.json", - }, - }, - } -} - -func dataSourceAwsIPRangesRead(d *schema.ResourceData, meta interface{}) error { - - conn := cleanhttp.DefaultClient() - url := d.Get("url").(string) - - log.Printf("[DEBUG] Reading IP ranges from %s", url) - - res, err := conn.Get(url) - - if err != nil { - return fmt.Errorf("Error listing IP ranges from (%s): %s", url, err) - } - - defer res.Body.Close() - - data, err := ioutil.ReadAll(res.Body) - - if err != nil { - return fmt.Errorf("Error reading response body from (%s): %s", url, err) - } - - result := new(dataSourceAwsIPRangesResult) - - if err := json.Unmarshal(data, result); err != nil { - return fmt.Errorf("Error parsing result from (%s): %s", url, err) - } - - if err := d.Set("create_date", result.CreateDate); err != nil { - return fmt.Errorf("Error setting create date: %s", err) - } - - syncToken, err := strconv.Atoi(result.SyncToken) - - if err != nil { - return fmt.Errorf("Error while converting sync token: %s", err) - } - - d.SetId(result.SyncToken) - - if err := d.Set("sync_token", syncToken); err != nil { - return fmt.Errorf("Error setting sync token: %s", err) - } - - get := func(key string) *schema.Set { - - set := d.Get(key).(*schema.Set) - - for _, e := range set.List() { - - s := e.(string) - - set.Remove(s) - set.Add(strings.ToLower(s)) - - } - - return set - - } - - var ( - regions = get("regions") - services = get("services") - noRegionFilter = regions.Len() == 0 - ipPrefixes []string - ipv6Prefixes []string - ) - - matchFilter := func(region, service string) bool { - matchRegion := noRegionFilter || regions.Contains(strings.ToLower(region)) - matchService := services.Contains(strings.ToLower(service)) - return matchRegion && matchService - } - - for _, e := range result.Prefixes { - if matchFilter(e.Region, e.Service) { - ipPrefixes = append(ipPrefixes, e.IpPrefix) - } - } - - for _, e := range result.Ipv6Prefixes { - if matchFilter(e.Region, e.Service) { - ipv6Prefixes = append(ipv6Prefixes, e.Ipv6Prefix) - } - } - - if len(ipPrefixes) == 0 && len(ipv6Prefixes) == 0 { - return fmt.Errorf("No IP ranges result from filters from (%s)", url) - } - - sort.Strings(ipPrefixes) - - if err := d.Set("cidr_blocks", ipPrefixes); err != nil { - return fmt.Errorf("Error setting cidr_blocks: %s", err) - } - - sort.Strings(ipv6Prefixes) - - if err := d.Set("ipv6_cidr_blocks", ipv6Prefixes); err != nil { - return fmt.Errorf("Error setting ipv6_cidr_blocks: %s", err) - } - - return nil - -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kinesis_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kinesis_stream.go deleted file mode 100644 index 3c82c1a70..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kinesis_stream.go +++ /dev/null @@ -1,95 +0,0 @@ -package aws - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/kinesis" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsKinesisStream() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsKinesisStreamRead, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "creation_timestamp": { - Type: schema.TypeInt, - Computed: true, - }, - - "status": { - Type: schema.TypeString, - Computed: true, - }, - - "retention_period": { - Type: schema.TypeInt, - Computed: true, - }, - - "open_shards": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "closed_shards": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "shard_level_metrics": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "tags": { - Type: schema.TypeMap, - Computed: true, - }, - }, - } -} - -func dataSourceAwsKinesisStreamRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kinesisconn - sn := d.Get("name").(string) - - state, err := readKinesisStreamState(conn, sn) - if err != nil { - return err - } - d.SetId(state.arn) - d.Set("arn", state.arn) - d.Set("name", sn) - d.Set("open_shards", state.openShards) - d.Set("closed_shards", state.closedShards) - d.Set("status", state.status) - d.Set("creation_timestamp", state.creationTimestamp) - d.Set("retention_period", state.retentionPeriod) - d.Set("shard_level_metrics", state.shardLevelMetrics) - - tags, err := conn.ListTagsForStream(&kinesis.ListTagsForStreamInput{ - StreamName: aws.String(sn), - }) - if err != nil { - return err - } - d.Set("tags", tagsToMapKinesis(tags.Tags)) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_alias.go deleted file mode 100644 index c002d1da8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_alias.go +++ /dev/null @@ -1,89 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/kms" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsKmsAlias() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsKmsAliasRead, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateAwsKmsName, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "target_key_arn": { - Type: schema.TypeString, - Computed: true, - }, - "target_key_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsKmsAliasRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - params := &kms.ListAliasesInput{} - - target := d.Get("name") - var alias *kms.AliasListEntry - log.Printf("[DEBUG] Reading KMS Alias: %s", params) - err := conn.ListAliasesPages(params, func(page *kms.ListAliasesOutput, lastPage bool) bool { - for _, entity := range page.Aliases { - if *entity.AliasName == target { - alias = entity - return false - } - } - - return true - }) - if err != nil { - return fmt.Errorf("Error fetch KMS alias list: %s", err) - } - - if alias == nil { - return fmt.Errorf("No alias with name %q found in this region.", target) - } - - d.SetId(time.Now().UTC().String()) - d.Set("arn", alias.AliasArn) - - // ListAliases can return an alias for an AWS service key (e.g. - // alias/aws/rds) without a TargetKeyId if the alias has not yet been - // used for the first time. In that situation, calling DescribeKey will - // associate an actual key with the alias, and the next call to - // ListAliases will have a TargetKeyId for the alias. - // - // For a simpler codepath, we always call DescribeKey with the alias - // name to get the target key's ARN and Id direct from AWS. - // - // https://docs.aws.amazon.com/kms/latest/APIReference/API_ListAliases.html - - req := &kms.DescribeKeyInput{ - KeyId: aws.String(target.(string)), - } - resp, err := conn.DescribeKey(req) - if err != nil { - return fmt.Errorf("Error calling KMS DescribeKey: %s", err) - } - - d.Set("target_key_arn", resp.KeyMetadata.Arn) - d.Set("target_key_id", resp.KeyMetadata.KeyId) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_ciphertext.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_ciphertext.go deleted file mode 100644 index 5125e2b92..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_ciphertext.go +++ /dev/null @@ -1,65 +0,0 @@ -package aws - -import ( - "encoding/base64" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/kms" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsKmsCiphertext() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsKmsCiphertextRead, - - Schema: map[string]*schema.Schema{ - "plaintext": { - Type: schema.TypeString, - Required: true, - }, - - "key_id": { - Type: schema.TypeString, - Required: true, - }, - - "context": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "ciphertext_blob": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsKmsCiphertextRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - - d.SetId(time.Now().UTC().String()) - - req := &kms.EncryptInput{ - KeyId: aws.String(d.Get("key_id").(string)), - Plaintext: []byte(d.Get("plaintext").(string)), - } - - if ec := d.Get("context"); ec != nil { - req.EncryptionContext = stringMapToPointers(ec.(map[string]interface{})) - } - - log.Printf("[DEBUG] KMS encrypt for key: %s", d.Get("key_id").(string)) - resp, err := conn.Encrypt(req) - if err != nil { - return err - } - - d.Set("ciphertext_blob", base64.StdEncoding.EncodeToString(resp.CiphertextBlob)) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_key.go deleted file mode 100644 index a05f8edfd..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_key.go +++ /dev/null @@ -1,111 +0,0 @@ -package aws - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/kms" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsKmsKey() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsKmsKeyRead, - Schema: map[string]*schema.Schema{ - "key_id": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateKmsKey, - }, - "grant_tokens": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "aws_account_id": { - Type: schema.TypeString, - Computed: true, - }, - "creation_date": { - Type: schema.TypeString, - Computed: true, - }, - "deletion_date": { - Type: schema.TypeString, - Computed: true, - }, - "description": { - Type: schema.TypeString, - Computed: true, - }, - "enabled": { - Type: schema.TypeBool, - Computed: true, - }, - "expiration_model": { - Type: schema.TypeString, - Computed: true, - }, - "key_manager": { - Type: schema.TypeString, - Computed: true, - }, - "key_state": { - Type: schema.TypeString, - Computed: true, - }, - "key_usage": { - Type: schema.TypeString, - Computed: true, - }, - "origin": { - Type: schema.TypeString, - Computed: true, - }, - "valid_to": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsKmsKeyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - keyId := d.Get("key_id") - var grantTokens []*string - if v, ok := d.GetOk("grant_tokens"); ok { - grantTokens = aws.StringSlice(v.([]string)) - } - input := &kms.DescribeKeyInput{ - KeyId: aws.String(keyId.(string)), - GrantTokens: grantTokens, - } - output, err := conn.DescribeKey(input) - if err != nil { - return fmt.Errorf("error while describing key [%s]: %s", keyId, err) - } - d.SetId(aws.StringValue(output.KeyMetadata.KeyId)) - d.Set("arn", output.KeyMetadata.Arn) - d.Set("aws_account_id", output.KeyMetadata.AWSAccountId) - d.Set("creation_date", aws.TimeValue(output.KeyMetadata.CreationDate).Format(time.RFC3339)) - if output.KeyMetadata.DeletionDate != nil { - d.Set("deletion_date", aws.TimeValue(output.KeyMetadata.DeletionDate).Format(time.RFC3339)) - } - d.Set("description", output.KeyMetadata.Description) - d.Set("enabled", output.KeyMetadata.Enabled) - d.Set("expiration_model", output.KeyMetadata.ExpirationModel) - d.Set("key_manager", output.KeyMetadata.KeyManager) - d.Set("key_state", output.KeyMetadata.KeyState) - d.Set("key_usage", output.KeyMetadata.KeyUsage) - d.Set("origin", output.KeyMetadata.Origin) - if output.KeyMetadata.ValidTo != nil { - d.Set("valid_to", aws.TimeValue(output.KeyMetadata.ValidTo).Format(time.RFC3339)) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secret.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secret.go deleted file mode 100644 index 16772633e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secret.go +++ /dev/null @@ -1,100 +0,0 @@ -package aws - -import ( - "encoding/base64" - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/kms" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsKmsSecret() *schema.Resource { - return &schema.Resource{ - DeprecationMessage: "This data source will be removed in Terraform AWS provider version 2.0. Please see migration information available in: https://www.terraform.io/docs/providers/aws/guides/version-2-upgrade.html#data-source-aws_kms_secret", - Read: dataSourceAwsKmsSecretRead, - - Schema: map[string]*schema.Schema{ - "secret": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "payload": { - Type: schema.TypeString, - Required: true, - }, - "context": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "grant_tokens": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "__has_dynamic_attributes": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -// dataSourceAwsKmsSecretRead decrypts the specified secrets -func dataSourceAwsKmsSecretRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - secrets := d.Get("secret").(*schema.Set) - - d.SetId(time.Now().UTC().String()) - - for _, v := range secrets.List() { - secret := v.(map[string]interface{}) - - // base64 decode the payload - payload, err := base64.StdEncoding.DecodeString(secret["payload"].(string)) - if err != nil { - return fmt.Errorf("Invalid base64 value for secret '%s': %v", secret["name"].(string), err) - } - - // build the kms decrypt params - params := &kms.DecryptInput{ - CiphertextBlob: payload, - } - if context, exists := secret["context"]; exists { - params.EncryptionContext = make(map[string]*string) - for k, v := range context.(map[string]interface{}) { - params.EncryptionContext[k] = aws.String(v.(string)) - } - } - if grant_tokens, exists := secret["grant_tokens"]; exists { - params.GrantTokens = make([]*string, 0) - for _, v := range grant_tokens.([]interface{}) { - params.GrantTokens = append(params.GrantTokens, aws.String(v.(string))) - } - } - - // decrypt - resp, err := conn.Decrypt(params) - if err != nil { - return fmt.Errorf("Failed to decrypt '%s': %s", secret["name"].(string), err) - } - - // Set the secret via the name - log.Printf("[DEBUG] aws_kms_secret - successfully decrypted secret: %s", secret["name"].(string)) - d.UnsafeSetFieldRaw(secret["name"].(string), string(resp.Plaintext)) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secrets.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secrets.go deleted file mode 100644 index 63caf7041..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secrets.go +++ /dev/null @@ -1,108 +0,0 @@ -package aws - -import ( - "encoding/base64" - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/kms" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsKmsSecrets() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsKmsSecretsRead, - - Schema: map[string]*schema.Schema{ - "secret": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "payload": { - Type: schema.TypeString, - Required: true, - }, - "context": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "grant_tokens": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "plaintext": { - Type: schema.TypeMap, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - Sensitive: true, - }, - }, - }, - } -} - -func dataSourceAwsKmsSecretsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - - secrets := d.Get("secret").(*schema.Set) - plaintext := make(map[string]string, len(secrets.List())) - - for _, v := range secrets.List() { - secret := v.(map[string]interface{}) - - // base64 decode the payload - payload, err := base64.StdEncoding.DecodeString(secret["payload"].(string)) - if err != nil { - return fmt.Errorf("Invalid base64 value for secret '%s': %v", secret["name"].(string), err) - } - - // build the kms decrypt params - params := &kms.DecryptInput{ - CiphertextBlob: payload, - } - if context, exists := secret["context"]; exists { - params.EncryptionContext = make(map[string]*string) - for k, v := range context.(map[string]interface{}) { - params.EncryptionContext[k] = aws.String(v.(string)) - } - } - if grant_tokens, exists := secret["grant_tokens"]; exists { - params.GrantTokens = make([]*string, 0) - for _, v := range grant_tokens.([]interface{}) { - params.GrantTokens = append(params.GrantTokens, aws.String(v.(string))) - } - } - - // decrypt - resp, err := conn.Decrypt(params) - if err != nil { - return fmt.Errorf("Failed to decrypt '%s': %s", secret["name"].(string), err) - } - - // Set the secret via the name - log.Printf("[DEBUG] aws_kms_secret - successfully decrypted secret: %s", secret["name"].(string)) - plaintext[secret["name"].(string)] = string(resp.Plaintext) - } - - if err := d.Set("plaintext", plaintext); err != nil { - return fmt.Errorf("error setting plaintext: %s", err) - } - - d.SetId(time.Now().UTC().String()) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_function.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_function.go deleted file mode 100644 index 0f5e47750..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_function.go +++ /dev/null @@ -1,162 +0,0 @@ -package aws - -import ( - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsLambdaFunction() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsLambdaFunctionRead, - - Schema: map[string]*schema.Schema{ - "function_name": { - Type: schema.TypeString, - Required: true, - }, - "qualifier": { - Type: schema.TypeString, - Optional: true, - Default: "$LATEST", - }, - "description": { - Type: schema.TypeString, - Computed: true, - }, - "dead_letter_config": { - Type: schema.TypeList, - Computed: true, - MinItems: 0, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "target_arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "handler": { - Type: schema.TypeString, - Computed: true, - }, - "layers": { - Type: schema.TypeList, - Computed: true, - MaxItems: 5, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - "memory_size": { - Type: schema.TypeInt, - Computed: true, - }, - "reserved_concurrent_executions": { - Type: schema.TypeInt, - Computed: true, - }, - "role": { - Type: schema.TypeString, - Computed: true, - }, - "runtime": { - Type: schema.TypeString, - Computed: true, - }, - "timeout": { - Type: schema.TypeInt, - Computed: true, - }, - "version": { - Type: schema.TypeString, - Computed: true, - }, - "vpc_config": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "subnet_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "security_group_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "qualified_arn": { - Type: schema.TypeString, - Computed: true, - }, - "invoke_arn": { - Type: schema.TypeString, - Computed: true, - }, - "last_modified": { - Type: schema.TypeString, - Computed: true, - }, - "source_code_hash": { - Type: schema.TypeString, - Computed: true, - }, - "source_code_size": { - Type: schema.TypeInt, - Computed: true, - }, - "environment": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "variables": { - Type: schema.TypeMap, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "tracing_config": { - Type: schema.TypeList, - MaxItems: 1, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "mode": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "kms_key_arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) error { - d.SetId(d.Get("function_name").(string)) - return resourceAwsLambdaFunctionRead(d, meta) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_invocation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_invocation.go deleted file mode 100644 index f21b99af6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_invocation.go +++ /dev/null @@ -1,95 +0,0 @@ -package aws - -import ( - "crypto/md5" - "encoding/json" - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/lambda" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func dataSourceAwsLambdaInvocation() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsLambdaInvocationRead, - - Schema: map[string]*schema.Schema{ - "function_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "qualifier": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "$LATEST", - }, - - "input": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.ValidateJsonString, - }, - - "result": { - Type: schema.TypeString, - Computed: true, - }, - - "result_map": { - Type: schema.TypeMap, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - }, - } -} - -func dataSourceAwsLambdaInvocationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - functionName := d.Get("function_name").(string) - qualifier := d.Get("qualifier").(string) - input := []byte(d.Get("input").(string)) - - res, err := conn.Invoke(&lambda.InvokeInput{ - FunctionName: aws.String(functionName), - InvocationType: aws.String(lambda.InvocationTypeRequestResponse), - Payload: input, - Qualifier: aws.String(qualifier), - }) - - if err != nil { - return err - } - - if res.FunctionError != nil { - return fmt.Errorf("Lambda function (%s) returned error: (%s)", functionName, string(res.Payload)) - } - - if err = d.Set("result", string(res.Payload)); err != nil { - return err - } - - var result map[string]interface{} - - if err = json.Unmarshal(res.Payload, &result); err != nil { - return err - } - - if err = d.Set("result_map", result); err != nil { - log.Printf("[WARN] Cannot use the result invocation as a string map: %s", err) - } - - d.SetId(fmt.Sprintf("%s_%s_%x", functionName, qualifier, md5.Sum(input))) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_configuration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_configuration.go deleted file mode 100644 index e02cbd2a0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_configuration.go +++ /dev/null @@ -1,246 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsLaunchConfiguration() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsLaunchConfigurationRead, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - - "image_id": { - Type: schema.TypeString, - Computed: true, - }, - - "instance_type": { - Type: schema.TypeString, - Computed: true, - }, - - "iam_instance_profile": { - Type: schema.TypeString, - Computed: true, - }, - - "key_name": { - Type: schema.TypeString, - Computed: true, - }, - - "user_data": { - Type: schema.TypeString, - Computed: true, - }, - - "security_groups": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "vpc_classic_link_id": { - Type: schema.TypeString, - Computed: true, - }, - - "vpc_classic_link_security_groups": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "associate_public_ip_address": { - Type: schema.TypeBool, - Computed: true, - }, - - "spot_price": { - Type: schema.TypeString, - Computed: true, - }, - - "ebs_optimized": { - Type: schema.TypeBool, - Computed: true, - }, - - "placement_tenancy": { - Type: schema.TypeString, - Computed: true, - }, - - "enable_monitoring": { - Type: schema.TypeBool, - Computed: true, - }, - - "ebs_block_device": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Computed: true, - }, - - "device_name": { - Type: schema.TypeString, - Computed: true, - }, - - "iops": { - Type: schema.TypeInt, - Computed: true, - }, - - "snapshot_id": { - Type: schema.TypeString, - Computed: true, - }, - - "volume_size": { - Type: schema.TypeInt, - Computed: true, - }, - - "volume_type": { - Type: schema.TypeString, - Computed: true, - }, - - "encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - }, - }, - }, - - "ephemeral_block_device": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "device_name": { - Type: schema.TypeString, - Computed: true, - }, - - "virtual_name": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - - "root_block_device": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Computed: true, - }, - - "iops": { - Type: schema.TypeInt, - Computed: true, - }, - - "volume_size": { - Type: schema.TypeInt, - Computed: true, - }, - - "volume_type": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - }, - } -} - -func dataSourceAwsLaunchConfigurationRead(d *schema.ResourceData, meta interface{}) error { - autoscalingconn := meta.(*AWSClient).autoscalingconn - ec2conn := meta.(*AWSClient).ec2conn - - if v, ok := d.GetOk("name"); ok { - d.SetId(v.(string)) - } - - describeOpts := autoscaling.DescribeLaunchConfigurationsInput{ - LaunchConfigurationNames: []*string{aws.String(d.Id())}, - } - - log.Printf("[DEBUG] launch configuration describe configuration: %s", describeOpts) - describConfs, err := autoscalingconn.DescribeLaunchConfigurations(&describeOpts) - if err != nil { - return fmt.Errorf("Error retrieving launch configuration: %s", err) - } - - if describConfs == nil || len(describConfs.LaunchConfigurations) == 0 { - return errors.New("No matching Launch Configuration found") - } - - if len(describConfs.LaunchConfigurations) > 1 { - return errors.New("Multiple matching Launch Configurations found") - } - - lc := describConfs.LaunchConfigurations[0] - - d.Set("key_name", lc.KeyName) - d.Set("image_id", lc.ImageId) - d.Set("instance_type", lc.InstanceType) - d.Set("name", lc.LaunchConfigurationName) - d.Set("user_data", lc.UserData) - d.Set("iam_instance_profile", lc.IamInstanceProfile) - d.Set("ebs_optimized", lc.EbsOptimized) - d.Set("spot_price", lc.SpotPrice) - d.Set("associate_public_ip_address", lc.AssociatePublicIpAddress) - d.Set("vpc_classic_link_id", lc.ClassicLinkVPCId) - d.Set("enable_monitoring", false) - - if lc.InstanceMonitoring != nil { - d.Set("enable_monitoring", lc.InstanceMonitoring.Enabled) - } - - vpcSGs := make([]string, 0, len(lc.SecurityGroups)) - for _, sg := range lc.SecurityGroups { - vpcSGs = append(vpcSGs, *sg) - } - if err := d.Set("security_groups", vpcSGs); err != nil { - return fmt.Errorf("error setting security_groups: %s", err) - } - - classicSGs := make([]string, 0, len(lc.ClassicLinkVPCSecurityGroups)) - for _, sg := range lc.ClassicLinkVPCSecurityGroups { - classicSGs = append(classicSGs, *sg) - } - if err := d.Set("vpc_classic_link_security_groups", classicSGs); err != nil { - return fmt.Errorf("error setting vpc_classic_link_security_groups: %s", err) - } - - if err := readLCBlockDevices(d, lc, ec2conn); err != nil { - return err - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_template.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_template.go deleted file mode 100644 index c27f24815..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_template.go +++ /dev/null @@ -1,461 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsLaunchTemplate() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsLaunchTemplateRead, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "description": { - Type: schema.TypeString, - Computed: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "default_version": { - Type: schema.TypeInt, - Computed: true, - }, - "latest_version": { - Type: schema.TypeInt, - Computed: true, - }, - "block_device_mappings": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "device_name": { - Type: schema.TypeString, - Computed: true, - }, - "no_device": { - Type: schema.TypeString, - Computed: true, - }, - "virtual_name": { - Type: schema.TypeString, - Computed: true, - }, - "ebs": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeString, - Computed: true, - }, - "encrypted": { - Type: schema.TypeString, - Computed: true, - }, - "iops": { - Type: schema.TypeInt, - Computed: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "snapshot_id": { - Type: schema.TypeString, - Computed: true, - }, - "volume_size": { - Type: schema.TypeInt, - Computed: true, - }, - "volume_type": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - }, - }, - }, - "credit_specification": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cpu_credits": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "disable_api_termination": { - Type: schema.TypeBool, - Computed: true, - }, - "ebs_optimized": { - Type: schema.TypeString, - Computed: true, - }, - "elastic_gpu_specifications": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "iam_instance_profile": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "image_id": { - Type: schema.TypeString, - Computed: true, - }, - - "instance_initiated_shutdown_behavior": { - Type: schema.TypeString, - Computed: true, - }, - "instance_market_options": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "market_type": { - Type: schema.TypeString, - Computed: true, - }, - "spot_options": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "block_duration_minutes": { - Type: schema.TypeInt, - Computed: true, - }, - "instance_interruption_behavior": { - Type: schema.TypeString, - Computed: true, - }, - "max_price": { - Type: schema.TypeString, - Computed: true, - }, - "spot_instance_type": { - Type: schema.TypeString, - Computed: true, - }, - "valid_until": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - }, - }, - }, - "instance_type": { - Type: schema.TypeString, - Computed: true, - }, - "kernel_id": { - Type: schema.TypeString, - Computed: true, - }, - "key_name": { - Type: schema.TypeString, - Computed: true, - }, - "monitoring": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Computed: true, - }, - }, - }, - }, - "network_interfaces": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "associate_public_ip_address": { - Type: schema.TypeBool, - Computed: true, - }, - "delete_on_termination": { - Type: schema.TypeBool, - Computed: true, - }, - "description": { - Type: schema.TypeString, - Computed: true, - }, - "device_index": { - Type: schema.TypeInt, - Computed: true, - }, - "security_groups": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "ipv6_address_count": { - Type: schema.TypeInt, - Computed: true, - }, - "ipv6_addresses": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "network_interface_id": { - Type: schema.TypeString, - Computed: true, - }, - "private_ip_address": { - Type: schema.TypeString, - Computed: true, - }, - "ipv4_addresses": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "ipv4_address_count": { - Type: schema.TypeInt, - Computed: true, - }, - "subnet_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "placement": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "affinity": { - Type: schema.TypeString, - Computed: true, - }, - "availability_zone": { - Type: schema.TypeString, - Computed: true, - }, - "group_name": { - Type: schema.TypeString, - Computed: true, - }, - "host_id": { - Type: schema.TypeString, - Computed: true, - }, - "spread_domain": { - Type: schema.TypeString, - Computed: true, - }, - "tenancy": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "ram_disk_id": { - Type: schema.TypeString, - Computed: true, - }, - "security_group_names": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "vpc_security_group_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "tag_specifications": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "resource_type": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchemaComputed(), - }, - }, - }, - "user_data": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchemaComputed(), - }, - } -} - -func dataSourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[DEBUG] Reading launch template %s", d.Get("name")) - - dlt, err := conn.DescribeLaunchTemplates(&ec2.DescribeLaunchTemplatesInput{ - LaunchTemplateNames: []*string{aws.String(d.Get("name").(string))}, - }) - - if isAWSErr(err, ec2.LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist, "") { - log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - // AWS SDK constant above is currently incorrect - if isAWSErr(err, "InvalidLaunchTemplateId.NotFound", "") { - log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("Error getting launch template: %s", err) - } - - if dlt == nil || len(dlt.LaunchTemplates) == 0 { - log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - log.Printf("[DEBUG] Found launch template %s", d.Id()) - - lt := dlt.LaunchTemplates[0] - d.SetId(*lt.LaunchTemplateId) - d.Set("name", lt.LaunchTemplateName) - d.Set("latest_version", lt.LatestVersionNumber) - d.Set("default_version", lt.DefaultVersionNumber) - d.Set("tags", tagsToMap(lt.Tags)) - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "ec2", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("launch-template/%s", d.Id()), - }.String() - d.Set("arn", arn) - - version := strconv.Itoa(int(*lt.LatestVersionNumber)) - dltv, err := conn.DescribeLaunchTemplateVersions(&ec2.DescribeLaunchTemplateVersionsInput{ - LaunchTemplateId: aws.String(d.Id()), - Versions: []*string{aws.String(version)}, - }) - if err != nil { - return err - } - - log.Printf("[DEBUG] Received launch template version %q (version %d)", d.Id(), *lt.LatestVersionNumber) - - ltData := dltv.LaunchTemplateVersions[0].LaunchTemplateData - - d.Set("disable_api_termination", ltData.DisableApiTermination) - d.Set("image_id", ltData.ImageId) - d.Set("instance_initiated_shutdown_behavior", ltData.InstanceInitiatedShutdownBehavior) - d.Set("instance_type", ltData.InstanceType) - d.Set("kernel_id", ltData.KernelId) - d.Set("key_name", ltData.KeyName) - d.Set("ram_disk_id", ltData.RamDiskId) - d.Set("security_group_names", aws.StringValueSlice(ltData.SecurityGroups)) - d.Set("user_data", ltData.UserData) - d.Set("vpc_security_group_ids", aws.StringValueSlice(ltData.SecurityGroupIds)) - d.Set("ebs_optimized", "") - - if ltData.EbsOptimized != nil { - d.Set("ebs_optimized", strconv.FormatBool(aws.BoolValue(ltData.EbsOptimized))) - } - - if err := d.Set("block_device_mappings", getBlockDeviceMappings(ltData.BlockDeviceMappings)); err != nil { - return err - } - - if strings.HasPrefix(aws.StringValue(ltData.InstanceType), "t2") || strings.HasPrefix(aws.StringValue(ltData.InstanceType), "t3") { - if err := d.Set("credit_specification", getCreditSpecification(ltData.CreditSpecification)); err != nil { - return err - } - } - - if err := d.Set("elastic_gpu_specifications", getElasticGpuSpecifications(ltData.ElasticGpuSpecifications)); err != nil { - return err - } - - if err := d.Set("iam_instance_profile", getIamInstanceProfile(ltData.IamInstanceProfile)); err != nil { - return err - } - - if err := d.Set("instance_market_options", getInstanceMarketOptions(ltData.InstanceMarketOptions)); err != nil { - return err - } - - if err := d.Set("monitoring", getMonitoring(ltData.Monitoring)); err != nil { - return err - } - - if err := d.Set("network_interfaces", getNetworkInterfaces(ltData.NetworkInterfaces)); err != nil { - return err - } - - if err := d.Set("placement", getPlacement(ltData.Placement)); err != nil { - return err - } - - if err := d.Set("tag_specifications", getTagSpecifications(ltData.TagSpecifications)); err != nil { - return err - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb.go deleted file mode 100644 index 6a7395a59..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb.go +++ /dev/null @@ -1,150 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elbv2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsLb() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsLbRead, - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "arn_suffix": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "internal": { - Type: schema.TypeBool, - Computed: true, - }, - - "load_balancer_type": { - Type: schema.TypeString, - Computed: true, - }, - - "security_groups": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - Set: schema.HashString, - }, - - "subnets": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - Set: schema.HashString, - }, - - "subnet_mapping": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "subnet_id": { - Type: schema.TypeString, - Required: true, - }, - "allocation_id": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "access_logs": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Computed: true, - }, - "prefix": { - Type: schema.TypeString, - Computed: true, - }, - "enabled": { - Type: schema.TypeBool, - Computed: true, - }, - }, - }, - }, - - "enable_deletion_protection": { - Type: schema.TypeBool, - Computed: true, - }, - - "idle_timeout": { - Type: schema.TypeInt, - Computed: true, - }, - - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - - "zone_id": { - Type: schema.TypeString, - Computed: true, - }, - - "dns_name": { - Type: schema.TypeString, - Computed: true, - }, - - "tags": tagsSchemaComputed(), - }, - } -} - -func dataSourceAwsLbRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - lbArn := d.Get("arn").(string) - lbName := d.Get("name").(string) - - describeLbOpts := &elbv2.DescribeLoadBalancersInput{} - switch { - case lbArn != "": - describeLbOpts.LoadBalancerArns = []*string{aws.String(lbArn)} - case lbName != "": - describeLbOpts.Names = []*string{aws.String(lbName)} - } - - log.Printf("[DEBUG] Reading Load Balancer: %s", describeLbOpts) - describeResp, err := elbconn.DescribeLoadBalancers(describeLbOpts) - if err != nil { - return fmt.Errorf("Error retrieving LB: %s", err) - } - if len(describeResp.LoadBalancers) != 1 { - return fmt.Errorf("Search returned %d results, please revise so only one is returned", len(describeResp.LoadBalancers)) - } - d.SetId(aws.StringValue(describeResp.LoadBalancers[0].LoadBalancerArn)) - - return flattenAwsLbResource(d, meta, describeResp.LoadBalancers[0]) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go deleted file mode 100644 index 8ef6dfd20..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go +++ /dev/null @@ -1,252 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elbv2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsLbListener() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsLbListenerRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ConflictsWith: []string{"load_balancer_arn", "port"}, - }, - - "load_balancer_arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ConflictsWith: []string{"arn"}, - }, - "port": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ConflictsWith: []string{"arn"}, - }, - - "protocol": { - Type: schema.TypeString, - Computed: true, - }, - - "ssl_policy": { - Type: schema.TypeString, - Computed: true, - }, - - "certificate_arn": { - Type: schema.TypeString, - Computed: true, - }, - - "default_action": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "authenticate_cognito": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "authentication_request_extra_params": { - Type: schema.TypeMap, - Computed: true, - }, - "on_unauthenticated_request": { - Type: schema.TypeString, - Computed: true, - }, - "scope": { - Type: schema.TypeString, - Computed: true, - }, - "session_cookie_name": { - Type: schema.TypeString, - Computed: true, - }, - "session_timeout": { - Type: schema.TypeInt, - Computed: true, - }, - "user_pool_arn": { - Type: schema.TypeString, - Computed: true, - }, - "user_pool_client_id": { - Type: schema.TypeString, - Computed: true, - }, - "user_pool_domain": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "authenticate_oidc": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "authentication_request_extra_params": { - Type: schema.TypeMap, - Computed: true, - }, - "authorization_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - "client_id": { - Type: schema.TypeString, - Computed: true, - }, - "client_secret": { - Type: schema.TypeString, - Computed: true, - Sensitive: true, - }, - "issuer": { - Type: schema.TypeString, - Computed: true, - }, - "on_unauthenticated_request": { - Type: schema.TypeString, - Computed: true, - }, - "scope": { - Type: schema.TypeString, - Computed: true, - }, - "session_cookie_name": { - Type: schema.TypeString, - Computed: true, - }, - "session_timeout": { - Type: schema.TypeInt, - Computed: true, - }, - "token_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - "user_info_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "fixed_response": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "content_type": { - Type: schema.TypeString, - Computed: true, - }, - "message_body": { - Type: schema.TypeString, - Computed: true, - }, - "status_code": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "order": { - Type: schema.TypeInt, - Computed: true, - }, - "redirect": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "host": { - Type: schema.TypeString, - Computed: true, - }, - "path": { - Type: schema.TypeString, - Computed: true, - }, - "port": { - Type: schema.TypeString, - Computed: true, - }, - "protocol": { - Type: schema.TypeString, - Computed: true, - }, - "query": { - Type: schema.TypeString, - Computed: true, - }, - "status_code": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "target_group_arn": { - Type: schema.TypeString, - Computed: true, - }, - "type": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - }, - } -} - -func dataSourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { - if _, ok := d.GetOk("arn"); ok { - d.SetId(d.Get("arn").(string)) - //log.Printf("[DEBUG] read listener %s", d.Get("arn").(string)) - return resourceAwsLbListenerRead(d, meta) - } - - conn := meta.(*AWSClient).elbv2conn - lbArn, lbOk := d.GetOk("load_balancer_arn") - port, portOk := d.GetOk("port") - if !lbOk || !portOk { - return errors.New("both load_balancer_arn and port must be set") - } - resp, err := conn.DescribeListeners(&elbv2.DescribeListenersInput{ - LoadBalancerArn: aws.String(lbArn.(string)), - }) - if err != nil { - return err - } - if len(resp.Listeners) == 0 { - return fmt.Errorf("no listener exists for load balancer: %s", lbArn) - } - for _, listener := range resp.Listeners { - if *listener.Port == int64(port.(int)) { - //log.Printf("[DEBUG] get listener arn for %s:%s: %s", lbArn, port, *listener.Port) - d.SetId(*listener.ListenerArn) - return resourceAwsLbListenerRead(d, meta) - } - } - - return errors.New("failed to get listener arn with given arguments") -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_target_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_target_group.go deleted file mode 100644 index 5f7f20f72..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_target_group.go +++ /dev/null @@ -1,159 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elbv2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsLbTargetGroup() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsLbTargetGroupRead, - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "arn_suffix": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "port": { - Type: schema.TypeInt, - Computed: true, - }, - - "protocol": { - Type: schema.TypeString, - Computed: true, - }, - - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - - "deregistration_delay": { - Type: schema.TypeInt, - Computed: true, - }, - - "slow_start": { - Type: schema.TypeInt, - Computed: true, - }, - - "stickiness": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Computed: true, - }, - "type": { - Type: schema.TypeString, - Computed: true, - }, - "cookie_duration": { - Type: schema.TypeInt, - Computed: true, - }, - }, - }, - }, - - "health_check": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "interval": { - Type: schema.TypeInt, - Computed: true, - }, - - "path": { - Type: schema.TypeString, - Computed: true, - }, - - "port": { - Type: schema.TypeString, - Computed: true, - }, - - "protocol": { - Type: schema.TypeString, - Computed: true, - }, - - "timeout": { - Type: schema.TypeInt, - Computed: true, - }, - - "healthy_threshold": { - Type: schema.TypeInt, - Computed: true, - }, - - "matcher": { - Type: schema.TypeString, - Computed: true, - }, - - "unhealthy_threshold": { - Type: schema.TypeInt, - Computed: true, - }, - }, - }, - }, - - "tags": tagsSchemaComputed(), - }, - } -} - -func dataSourceAwsLbTargetGroupRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - tgArn := d.Get("arn").(string) - tgName := d.Get("name").(string) - - describeTgOpts := &elbv2.DescribeTargetGroupsInput{} - switch { - case tgArn != "": - describeTgOpts.TargetGroupArns = []*string{aws.String(tgArn)} - case tgName != "": - describeTgOpts.Names = []*string{aws.String(tgName)} - } - - log.Printf("[DEBUG] Reading Load Balancer Target Group: %s", describeTgOpts) - describeResp, err := elbconn.DescribeTargetGroups(describeTgOpts) - if err != nil { - return fmt.Errorf("Error retrieving LB Target Group: %s", err) - } - if len(describeResp.TargetGroups) != 1 { - return fmt.Errorf("Search returned %d results, please revise so only one is returned", len(describeResp.TargetGroups)) - } - - targetGroup := describeResp.TargetGroups[0] - - d.SetId(aws.StringValue(targetGroup.TargetGroupArn)) - return flattenAwsLbTargetGroupResource(d, meta, targetGroup) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go deleted file mode 100644 index eb65ee3e1..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go +++ /dev/null @@ -1,209 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/mq" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsMqBroker() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsmQBrokerRead, - - Schema: map[string]*schema.Schema{ - "broker_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ConflictsWith: []string{"broker_name"}, - }, - "broker_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ConflictsWith: []string{"broker_id"}, - }, - "auto_minor_version_upgrade": { - Type: schema.TypeBool, - Computed: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "configuration": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, - "revision": { - Type: schema.TypeInt, - Computed: true, - }, - }, - }, - }, - "deployment_mode": { - Type: schema.TypeString, - Computed: true, - }, - "engine_type": { - Type: schema.TypeString, - Computed: true, - }, - "engine_version": { - Type: schema.TypeString, - Computed: true, - }, - "host_instance_type": { - Type: schema.TypeString, - Computed: true, - }, - "instances": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "console_url": { - Type: schema.TypeString, - Computed: true, - }, - "ip_address": { - Type: schema.TypeString, - Computed: true, - }, - "endpoints": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "logs": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - // Ignore missing configuration block - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "general": { - Type: schema.TypeBool, - Computed: true, - }, - "audit": { - Type: schema.TypeBool, - Computed: true, - }, - }, - }, - }, - "maintenance_window_start_time": { - Type: schema.TypeList, - MaxItems: 1, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "day_of_week": { - Type: schema.TypeString, - Computed: true, - }, - "time_of_day": { - Type: schema.TypeString, - Computed: true, - }, - "time_zone": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "publicly_accessible": { - Type: schema.TypeBool, - Computed: true, - }, - "security_groups": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - }, - "subnet_ids": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - }, - "tags": tagsSchemaComputed(), - "user": { - Type: schema.TypeSet, - Computed: true, - Set: resourceAwsMqUserHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "console_access": { - Type: schema.TypeBool, - Computed: true, - }, - "groups": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - Computed: true, - }, - "username": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func dataSourceAwsmQBrokerRead(d *schema.ResourceData, meta interface{}) error { - if brokerId, ok := d.GetOk("broker_id"); ok { - d.SetId(brokerId.(string)) - } else { - conn := meta.(*AWSClient).mqconn - brokerName := d.Get("broker_name").(string) - var nextToken string - for { - out, err := conn.ListBrokers(&mq.ListBrokersInput{NextToken: aws.String(nextToken)}) - if err != nil { - return errors.New("Failed to list mq brokers") - } - for _, broker := range out.BrokerSummaries { - if aws.StringValue(broker.BrokerName) == brokerName { - brokerId := aws.StringValue(broker.BrokerId) - d.Set("broker_id", brokerId) - d.SetId(brokerId) - } - } - if out.NextToken == nil { - break - } - nextToken = *out.NextToken - } - - if d.Id() == "" { - return fmt.Errorf("Failed to determine mq broker: %s", brokerName) - } - } - - return resourceAwsMqBrokerRead(d, meta) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_nat_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_nat_gateway.go deleted file mode 100644 index a80569447..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_nat_gateway.go +++ /dev/null @@ -1,138 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsNatGateway() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsNatGatewayRead, - - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "state": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "subnet_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "allocation_id": { - Type: schema.TypeString, - Computed: true, - }, - "network_interface_id": { - Type: schema.TypeString, - Computed: true, - }, - "public_ip": { - Type: schema.TypeString, - Computed: true, - }, - "private_ip": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchemaComputed(), - "filter": ec2CustomFiltersSchema(), - }, - } -} - -func dataSourceAwsNatGatewayRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeNatGatewaysInput{} - - if id, ok := d.GetOk("id"); ok { - req.NatGatewayIds = aws.StringSlice([]string{id.(string)}) - } - - if vpc_id, ok := d.GetOk("vpc_id"); ok { - req.Filter = append(req.Filter, buildEC2AttributeFilterList( - map[string]string{ - "vpc-id": vpc_id.(string), - }, - )...) - } - - if state, ok := d.GetOk("state"); ok { - req.Filter = append(req.Filter, buildEC2AttributeFilterList( - map[string]string{ - "state": state.(string), - }, - )...) - } - - if subnet_id, ok := d.GetOk("subnet_id"); ok { - req.Filter = append(req.Filter, buildEC2AttributeFilterList( - map[string]string{ - "subnet-id": subnet_id.(string), - }, - )...) - } - - if tags, ok := d.GetOk("tags"); ok { - req.Filter = append(req.Filter, buildEC2TagFilterList( - tagsFromMap(tags.(map[string]interface{})), - )...) - } - - req.Filter = append(req.Filter, buildEC2CustomFilterList( - d.Get("filter").(*schema.Set), - )...) - if len(req.Filter) == 0 { - // Don't send an empty filters list; the EC2 API won't accept it. - req.Filter = nil - } - log.Printf("[DEBUG] Reading NAT Gateway: %s", req) - resp, err := conn.DescribeNatGateways(req) - if err != nil { - return err - } - if resp == nil || len(resp.NatGateways) == 0 { - return fmt.Errorf("no matching NAT gateway found: %s", req) - } - if len(resp.NatGateways) > 1 { - return fmt.Errorf("multiple NAT gateways matched; use additional constraints to reduce matches to a single NAT gateway") - } - - ngw := resp.NatGateways[0] - - log.Printf("[DEBUG] NAT Gateway response: %s", ngw) - - d.SetId(aws.StringValue(ngw.NatGatewayId)) - d.Set("state", ngw.State) - d.Set("subnet_id", ngw.SubnetId) - d.Set("vpc_id", ngw.VpcId) - d.Set("tags", tagsToMap(ngw.Tags)) - - for _, address := range ngw.NatGatewayAddresses { - if *address.AllocationId != "" { - d.Set("allocation_id", address.AllocationId) - d.Set("network_interface_id", address.NetworkInterfaceId) - d.Set("private_ip", address.PrivateIp) - d.Set("public_ip", address.PublicIp) - break - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_acls.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_acls.go deleted file mode 100644 index bd99ed18a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_acls.go +++ /dev/null @@ -1,92 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsNetworkAcls() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsNetworkAclsRead, - Schema: map[string]*schema.Schema{ - "filter": ec2CustomFiltersSchema(), - - "tags": tagsSchemaComputed(), - - "vpc_id": { - Type: schema.TypeString, - Optional: true, - }, - - "ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - } -} - -func dataSourceAwsNetworkAclsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeNetworkAclsInput{} - - if v, ok := d.GetOk("vpc_id"); ok { - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "vpc-id": v.(string), - }, - ) - } - - filters, filtersOk := d.GetOk("filter") - tags, tagsOk := d.GetOk("tags") - - if tagsOk { - req.Filters = append(req.Filters, buildEC2TagFilterList( - tagsFromMap(tags.(map[string]interface{})), - )...) - } - - if filtersOk { - req.Filters = append(req.Filters, buildEC2CustomFilterList( - filters.(*schema.Set), - )...) - } - - if len(req.Filters) == 0 { - // Don't send an empty filters list; the EC2 API won't accept it. - req.Filters = nil - } - - log.Printf("[DEBUG] DescribeNetworkAcls %s\n", req) - resp, err := conn.DescribeNetworkAcls(req) - if err != nil { - return err - } - - if resp == nil || len(resp.NetworkAcls) == 0 { - return errors.New("no matching network ACLs found") - } - - networkAcls := make([]string, 0) - - for _, networkAcl := range resp.NetworkAcls { - networkAcls = append(networkAcls, aws.StringValue(networkAcl.NetworkAclId)) - } - - d.SetId(resource.UniqueId()) - if err := d.Set("ids", networkAcls); err != nil { - return fmt.Errorf("Error setting network ACL ids: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interface.go deleted file mode 100644 index 51b91b49a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interface.go +++ /dev/null @@ -1,185 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsNetworkInterface() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsNetworkInterfaceRead, - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "filter": dataSourceFiltersSchema(), - "association": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "allocation_id": { - Type: schema.TypeString, - Computed: true, - }, - "association_id": { - Type: schema.TypeString, - Computed: true, - }, - "ip_owner_id": { - Type: schema.TypeString, - Computed: true, - }, - "public_dns_name": { - Type: schema.TypeString, - Computed: true, - }, - "public_ip": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "attachment": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "attachment_id": { - Type: schema.TypeString, - Computed: true, - }, - "device_index": { - Type: schema.TypeInt, - Computed: true, - }, - "instance_id": { - Type: schema.TypeString, - Computed: true, - }, - "instance_owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "availability_zone": { - Type: schema.TypeString, - Computed: true, - }, - "description": { - Type: schema.TypeString, - Computed: true, - }, - "security_groups": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "interface_type": { - Type: schema.TypeString, - Computed: true, - }, - "ipv6_addresses": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "mac_address": { - Type: schema.TypeString, - Computed: true, - }, - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - "private_dns_name": { - Type: schema.TypeString, - Computed: true, - }, - "private_ip": { - Type: schema.TypeString, - Computed: true, - }, - "private_ips": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "requester_id": { - Type: schema.TypeString, - Computed: true, - }, - "subnet_id": { - Type: schema.TypeString, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchemaComputed(), - }, - } -} - -func dataSourceAwsNetworkInterfaceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.DescribeNetworkInterfacesInput{} - if v, ok := d.GetOk("id"); ok { - input.NetworkInterfaceIds = []*string{aws.String(v.(string))} - } - - if v, ok := d.GetOk("filter"); ok { - input.Filters = buildAwsDataSourceFilters(v.(*schema.Set)) - } - - log.Printf("[DEBUG] Reading Network Interface: %s", input) - resp, err := conn.DescribeNetworkInterfaces(input) - if err != nil { - return err - } - - if resp == nil || len(resp.NetworkInterfaces) == 0 { - return fmt.Errorf("no matching network interface found") - } - - if len(resp.NetworkInterfaces) > 1 { - return fmt.Errorf("Your query returned more than one result. Please try a more specific search criteria") - } - - eni := resp.NetworkInterfaces[0] - - d.SetId(*eni.NetworkInterfaceId) - if eni.Association != nil { - d.Set("association", flattenEc2NetworkInterfaceAssociation(eni.Association)) - } - if eni.Attachment != nil { - attachment := []interface{}{flattenAttachment(eni.Attachment)} - d.Set("attachment", attachment) - } - d.Set("availability_zone", eni.AvailabilityZone) - d.Set("description", eni.Description) - d.Set("security_groups", flattenGroupIdentifiers(eni.Groups)) - d.Set("interface_type", eni.InterfaceType) - d.Set("ipv6_addresses", flattenEc2NetworkInterfaceIpv6Address(eni.Ipv6Addresses)) - d.Set("mac_address", eni.MacAddress) - d.Set("owner_id", eni.OwnerId) - d.Set("private_dns_name", eni.PrivateDnsName) - d.Set("private_ip", eni.PrivateIpAddress) - d.Set("private_ips", flattenNetworkInterfacesPrivateIPAddresses(eni.PrivateIpAddresses)) - d.Set("requester_id", eni.RequesterId) - d.Set("subnet_id", eni.SubnetId) - d.Set("vpc_id", eni.VpcId) - d.Set("tags", tagsToMap(eni.TagSet)) - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interfaces.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interfaces.go deleted file mode 100644 index 316c59803..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interfaces.go +++ /dev/null @@ -1,79 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsNetworkInterfaces() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsNetworkInterfacesRead, - Schema: map[string]*schema.Schema{ - - "filter": ec2CustomFiltersSchema(), - - "tags": tagsSchemaComputed(), - - "ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - } -} - -func dataSourceAwsNetworkInterfacesRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeNetworkInterfacesInput{} - - filters, filtersOk := d.GetOk("filter") - tags, tagsOk := d.GetOk("tags") - - if tagsOk { - req.Filters = buildEC2TagFilterList( - tagsFromMap(tags.(map[string]interface{})), - ) - } - - if filtersOk { - req.Filters = append(req.Filters, buildEC2CustomFilterList( - filters.(*schema.Set), - )...) - } - - if len(req.Filters) == 0 { - req.Filters = nil - } - - log.Printf("[DEBUG] DescribeNetworkInterfaces %s\n", req) - resp, err := conn.DescribeNetworkInterfaces(req) - if err != nil { - return err - } - - if resp == nil || len(resp.NetworkInterfaces) == 0 { - return errors.New("no matching network interfaces found") - } - - networkInterfaces := make([]string, 0) - - for _, networkInterface := range resp.NetworkInterfaces { - networkInterfaces = append(networkInterfaces, aws.StringValue(networkInterface.NetworkInterfaceId)) - } - - d.SetId(resource.UniqueId()) - if err := d.Set("ids", networkInterfaces); err != nil { - return fmt.Errorf("Error setting network interfaces ids: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_partition.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_partition.go deleted file mode 100644 index d52f7ee47..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_partition.go +++ /dev/null @@ -1,33 +0,0 @@ -package aws - -import ( - "log" - "time" - - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsPartition() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsPartitionRead, - - Schema: map[string]*schema.Schema{ - "partition": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsPartitionRead(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient) - - log.Printf("[DEBUG] Reading Partition.") - d.SetId(time.Now().UTC().String()) - - log.Printf("[DEBUG] Setting AWS Partition to %s.", client.partition) - d.Set("partition", meta.(*AWSClient).partition) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_prefix_list.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_prefix_list.go deleted file mode 100644 index 5a251a737..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_prefix_list.go +++ /dev/null @@ -1,70 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsPrefixList() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsPrefixListRead, - - Schema: map[string]*schema.Schema{ - "prefix_list_id": { - Type: schema.TypeString, - Optional: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "cidr_blocks": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func dataSourceAwsPrefixListRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribePrefixListsInput{} - - if prefixListID := d.Get("prefix_list_id"); prefixListID != "" { - req.PrefixListIds = aws.StringSlice([]string{prefixListID.(string)}) - } - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "prefix-list-name": d.Get("name").(string), - }, - ) - - log.Printf("[DEBUG] Reading Prefix List: %s", req) - resp, err := conn.DescribePrefixLists(req) - if err != nil { - return err - } - if resp == nil || len(resp.PrefixLists) == 0 { - return fmt.Errorf("no matching prefix list found; the prefix list ID or name may be invalid or not exist in the current region") - } - - pl := resp.PrefixLists[0] - - d.SetId(*pl.PrefixListId) - d.Set("name", pl.PrefixListName) - - cidrs := make([]string, len(pl.Cidrs)) - for i, v := range pl.Cidrs { - cidrs[i] = *v - } - d.Set("cidr_blocks", cidrs) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_pricing_product.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_pricing_product.go deleted file mode 100644 index 393acef12..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_pricing_product.go +++ /dev/null @@ -1,92 +0,0 @@ -package aws - -import ( - "log" - - "encoding/json" - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/pricing" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsPricingProduct() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsPricingProductRead, - Schema: map[string]*schema.Schema{ - "service_code": { - Type: schema.TypeString, - Required: true, - }, - "filters": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "field": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "result": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsPricingProductRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pricingconn - - params := &pricing.GetProductsInput{ - ServiceCode: aws.String(d.Get("service_code").(string)), - Filters: []*pricing.Filter{}, - } - - filters := d.Get("filters") - for _, v := range filters.([]interface{}) { - m := v.(map[string]interface{}) - params.Filters = append(params.Filters, &pricing.Filter{ - Field: aws.String(m["field"].(string)), - Value: aws.String(m["value"].(string)), - Type: aws.String(pricing.FilterTypeTermMatch), - }) - } - - log.Printf("[DEBUG] Reading pricing of products: %s", params) - resp, err := conn.GetProducts(params) - if err != nil { - return fmt.Errorf("Error reading pricing of products: %s", err) - } - - numberOfElements := len(resp.PriceList) - if numberOfElements == 0 { - return fmt.Errorf("Pricing product query did not return any elements") - } else if numberOfElements > 1 { - priceListBytes, err := json.Marshal(resp.PriceList) - priceListString := string(priceListBytes) - if err != nil { - priceListString = err.Error() - } - return fmt.Errorf("Pricing product query not precise enough. Returned more than one element: %s", priceListString) - } - - pricingResult, err := json.Marshal(resp.PriceList[0]) - if err != nil { - return fmt.Errorf("Invalid JSON value returned by AWS: %s", err) - } - - d.SetId(fmt.Sprintf("%d", hashcode.String(params.String()))) - d.Set("result", string(pricingResult)) - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_rds_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_rds_cluster.go deleted file mode 100644 index 27f2d44f0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_rds_cluster.go +++ /dev/null @@ -1,267 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsRdsCluster() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsRdsClusterRead, - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "cluster_identifier": { - Type: schema.TypeString, - Required: true, - }, - - "availability_zones": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - Set: schema.HashString, - }, - - "backup_retention_period": { - Type: schema.TypeInt, - Computed: true, - }, - - "cluster_members": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - Set: schema.HashString, - }, - - "cluster_resource_id": { - Type: schema.TypeString, - Computed: true, - }, - - "database_name": { - Type: schema.TypeString, - Computed: true, - }, - - "db_subnet_group_name": { - Type: schema.TypeString, - Computed: true, - }, - - "db_cluster_parameter_group_name": { - Type: schema.TypeString, - Computed: true, - }, - - "enabled_cloudwatch_logs_exports": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "engine": { - Type: schema.TypeString, - Computed: true, - }, - - "engine_version": { - Type: schema.TypeString, - Computed: true, - }, - - "final_snapshot_identifier": { - Type: schema.TypeString, - Computed: true, - }, - - "iam_database_authentication_enabled": { - Type: schema.TypeBool, - Computed: true, - }, - - "iam_roles": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - - "master_username": { - Type: schema.TypeString, - Computed: true, - }, - - "preferred_backup_window": { - Type: schema.TypeString, - Computed: true, - }, - - "preferred_maintenance_window": { - Type: schema.TypeString, - Computed: true, - StateFunc: func(val interface{}) string { - if val == nil { - return "" - } - return strings.ToLower(val.(string)) - }, - }, - - "port": { - Type: schema.TypeInt, - Computed: true, - }, - - "reader_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "replication_source_identifier": { - Type: schema.TypeString, - Computed: true, - }, - - "storage_encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - - "tags": tagsSchemaComputed(), - - "vpc_security_group_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - } -} - -func dataSourceAwsRdsClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - dbClusterIdentifier := d.Get("cluster_identifier").(string) - - params := &rds.DescribeDBClustersInput{ - DBClusterIdentifier: aws.String(dbClusterIdentifier), - } - log.Printf("[DEBUG] Reading RDS Cluster: %s", params) - resp, err := conn.DescribeDBClusters(params) - - if err != nil { - return fmt.Errorf("Error retrieving RDS cluster: %s", err) - } - - if resp == nil { - return fmt.Errorf("Error retrieving RDS cluster: empty response for: %s", params) - } - - var dbc *rds.DBCluster - for _, c := range resp.DBClusters { - if aws.StringValue(c.DBClusterIdentifier) == dbClusterIdentifier { - dbc = c - break - } - } - - if dbc == nil { - return fmt.Errorf("Error retrieving RDS cluster: cluster not found in response for: %s", params) - } - - d.SetId(aws.StringValue(dbc.DBClusterIdentifier)) - - if err := d.Set("availability_zones", aws.StringValueSlice(dbc.AvailabilityZones)); err != nil { - return fmt.Errorf("error setting availability_zones: %s", err) - } - - d.Set("arn", dbc.DBClusterArn) - d.Set("backtrack_window", int(aws.Int64Value(dbc.BacktrackWindow))) - d.Set("backup_retention_period", dbc.BackupRetentionPeriod) - d.Set("cluster_identifier", dbc.DBClusterIdentifier) - - var cm []string - for _, m := range dbc.DBClusterMembers { - cm = append(cm, aws.StringValue(m.DBInstanceIdentifier)) - } - if err := d.Set("cluster_members", cm); err != nil { - return fmt.Errorf("error setting cluster_members: %s", err) - } - - d.Set("cluster_resource_id", dbc.DbClusterResourceId) - - // Only set the DatabaseName if it is not nil. There is a known API bug where - // RDS accepts a DatabaseName but does not return it, causing a perpetual - // diff. - // See https://github.com/hashicorp/terraform/issues/4671 for backstory - if dbc.DatabaseName != nil { - d.Set("database_name", dbc.DatabaseName) - } - - d.Set("db_cluster_parameter_group_name", dbc.DBClusterParameterGroup) - d.Set("db_subnet_group_name", dbc.DBSubnetGroup) - - if err := d.Set("enabled_cloudwatch_logs_exports", aws.StringValueSlice(dbc.EnabledCloudwatchLogsExports)); err != nil { - return fmt.Errorf("error setting enabled_cloudwatch_logs_exports: %s", err) - } - - d.Set("endpoint", dbc.Endpoint) - d.Set("engine_version", dbc.EngineVersion) - d.Set("engine", dbc.Engine) - d.Set("hosted_zone_id", dbc.HostedZoneId) - d.Set("iam_database_authentication_enabled", dbc.IAMDatabaseAuthenticationEnabled) - - var roles []string - for _, r := range dbc.AssociatedRoles { - roles = append(roles, aws.StringValue(r.RoleArn)) - } - if err := d.Set("iam_roles", roles); err != nil { - return fmt.Errorf("error setting iam_roles: %s", err) - } - - d.Set("kms_key_id", dbc.KmsKeyId) - d.Set("master_username", dbc.MasterUsername) - d.Set("port", dbc.Port) - d.Set("preferred_backup_window", dbc.PreferredBackupWindow) - d.Set("preferred_maintenance_window", dbc.PreferredMaintenanceWindow) - d.Set("reader_endpoint", dbc.ReaderEndpoint) - d.Set("replication_source_identifier", dbc.ReplicationSourceIdentifier) - - d.Set("storage_encrypted", dbc.StorageEncrypted) - - var vpcg []string - for _, g := range dbc.VpcSecurityGroups { - vpcg = append(vpcg, aws.StringValue(g.VpcSecurityGroupId)) - } - if err := d.Set("vpc_security_group_ids", vpcg); err != nil { - return fmt.Errorf("error setting vpc_security_group_ids: %s", err) - } - - // Fetch and save tags - if err := saveTagsRDS(conn, d, aws.StringValue(dbc.DBClusterArn)); err != nil { - log.Printf("[WARN] Failed to save tags for RDS Cluster (%s): %s", aws.StringValue(dbc.DBClusterIdentifier), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_cluster.go deleted file mode 100644 index 4aaeeb251..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_cluster.go +++ /dev/null @@ -1,278 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/redshift" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsRedshiftCluster() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsRedshiftClusterRead, - - Schema: map[string]*schema.Schema{ - - "cluster_identifier": { - Type: schema.TypeString, - Required: true, - }, - - "allow_version_upgrade": { - Type: schema.TypeBool, - Computed: true, - }, - - "automated_snapshot_retention_period": { - Type: schema.TypeInt, - Computed: true, - }, - - "availability_zone": { - Type: schema.TypeString, - Computed: true, - }, - - "bucket_name": { - Type: schema.TypeString, - Computed: true, - }, - - "cluster_parameter_group_name": { - Type: schema.TypeString, - Computed: true, - }, - - "cluster_public_key": { - Type: schema.TypeString, - Computed: true, - }, - - "cluster_revision_number": { - Type: schema.TypeString, - Computed: true, - }, - - "cluster_security_groups": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "cluster_subnet_group_name": { - Type: schema.TypeString, - Computed: true, - }, - - "cluster_type": { - Type: schema.TypeString, - Computed: true, - }, - - "cluster_version": { - Type: schema.TypeString, - Computed: true, - }, - - "database_name": { - Type: schema.TypeString, - Computed: true, - }, - - "elastic_ip": { - Type: schema.TypeString, - Computed: true, - }, - - "enable_logging": { - Type: schema.TypeBool, - Computed: true, - }, - - "encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "enhanced_vpc_routing": { - Type: schema.TypeBool, - Computed: true, - }, - - "iam_roles": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - - "master_username": { - Type: schema.TypeString, - Computed: true, - }, - - "node_type": { - Type: schema.TypeString, - Computed: true, - }, - - "number_of_nodes": { - Type: schema.TypeInt, - Computed: true, - }, - - "port": { - Type: schema.TypeInt, - Computed: true, - }, - - "preferred_maintenance_window": { - Type: schema.TypeString, - Computed: true, - }, - - "publicly_accessible": { - Type: schema.TypeBool, - Computed: true, - }, - - "s3_key_prefix": { - Type: schema.TypeString, - Computed: true, - }, - - "tags": tagsSchema(), - - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - - "vpc_security_group_ids": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func dataSourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - cluster := d.Get("cluster_identifier").(string) - - log.Printf("[INFO] Reading Redshift Cluster Information: %s", cluster) - - resp, err := conn.DescribeClusters(&redshift.DescribeClustersInput{ - ClusterIdentifier: aws.String(cluster), - }) - - if err != nil { - return fmt.Errorf("Error describing Redshift Cluster: %s, error: %s", cluster, err) - } - - if resp.Clusters == nil || len(resp.Clusters) == 0 { - return fmt.Errorf("Error describing Redshift Cluster: %s, cluster information not found", cluster) - } - - rsc := *resp.Clusters[0] - - d.SetId(cluster) - d.Set("allow_version_upgrade", rsc.AllowVersionUpgrade) - d.Set("automated_snapshot_retention_period", rsc.AutomatedSnapshotRetentionPeriod) - d.Set("availability_zone", rsc.AvailabilityZone) - d.Set("cluster_identifier", rsc.ClusterIdentifier) - - if len(rsc.ClusterParameterGroups) > 0 { - d.Set("cluster_parameter_group_name", rsc.ClusterParameterGroups[0].ParameterGroupName) - } - - d.Set("cluster_public_key", rsc.ClusterPublicKey) - d.Set("cluster_revision_number", rsc.ClusterRevisionNumber) - - var csg []string - for _, g := range rsc.ClusterSecurityGroups { - csg = append(csg, *g.ClusterSecurityGroupName) - } - if err := d.Set("cluster_security_groups", csg); err != nil { - return fmt.Errorf("Error saving Cluster Security Group Names to state for Redshift Cluster (%s): %s", cluster, err) - } - - d.Set("cluster_subnet_group_name", rsc.ClusterSubnetGroupName) - - if len(rsc.ClusterNodes) > 1 { - d.Set("cluster_type", "multi-node") - } else { - d.Set("cluster_type", "single-node") - } - - d.Set("cluster_version", rsc.ClusterVersion) - d.Set("database_name", rsc.DBName) - - if rsc.ElasticIpStatus != nil { - d.Set("elastic_ip", rsc.ElasticIpStatus.ElasticIp) - } - - d.Set("encrypted", rsc.Encrypted) - - if rsc.Endpoint != nil { - d.Set("endpoint", rsc.Endpoint.Address) - } - - d.Set("enhanced_vpc_routing", rsc.EnhancedVpcRouting) - - var iamRoles []string - for _, i := range rsc.IamRoles { - iamRoles = append(iamRoles, *i.IamRoleArn) - } - if err := d.Set("iam_roles", iamRoles); err != nil { - return fmt.Errorf("Error saving IAM Roles to state for Redshift Cluster (%s): %s", cluster, err) - } - - d.Set("kms_key_id", rsc.KmsKeyId) - d.Set("master_username", rsc.MasterUsername) - d.Set("node_type", rsc.NodeType) - d.Set("number_of_nodes", rsc.NumberOfNodes) - d.Set("port", rsc.Endpoint.Port) - d.Set("preferred_maintenance_window", rsc.PreferredMaintenanceWindow) - d.Set("publicly_accessible", rsc.PubliclyAccessible) - d.Set("tags", tagsToMapRedshift(rsc.Tags)) - d.Set("vpc_id", rsc.VpcId) - - var vpcg []string - for _, g := range rsc.VpcSecurityGroups { - vpcg = append(vpcg, *g.VpcSecurityGroupId) - } - if err := d.Set("vpc_security_group_ids", vpcg); err != nil { - return fmt.Errorf("Error saving VPC Security Group IDs to state for Redshift Cluster (%s): %s", cluster, err) - } - - log.Printf("[INFO] Reading Redshift Cluster Logging Status: %s", cluster) - loggingStatus, loggingErr := conn.DescribeLoggingStatus(&redshift.DescribeLoggingStatusInput{ - ClusterIdentifier: aws.String(cluster), - }) - - if loggingErr != nil { - return loggingErr - } - - if loggingStatus != nil && aws.BoolValue(loggingStatus.LoggingEnabled) { - d.Set("enable_logging", loggingStatus.LoggingEnabled) - d.Set("bucket_name", loggingStatus.BucketName) - d.Set("s3_key_prefix", loggingStatus.S3KeyPrefix) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_service_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_service_account.go deleted file mode 100644 index b9a39c28a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_service_account.go +++ /dev/null @@ -1,67 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/hashicorp/terraform/helper/schema" -) - -// See http://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-enable-logging -var redshiftServiceAccountPerRegionMap = map[string]string{ - "us-east-1": "193672423079", - "us-east-2": "391106570357", - "us-west-1": "262260360010", - "us-west-2": "902366379725", - "ap-south-1": "865932855811", - "ap-northeast-2": "760740231472", - "ap-southeast-1": "361669875840", - "ap-southeast-2": "762762565011", - "ap-northeast-1": "404641285394", - "ca-central-1": "907379612154", - "cn-northwest-1": "660998842044", - "eu-central-1": "053454850223", - "eu-west-1": "210876761215", - "eu-west-2": "307160386991", - "eu-west-3": "915173422425", - "sa-east-1": "075028567923", -} - -func dataSourceAwsRedshiftServiceAccount() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsRedshiftServiceAccountRead, - - Schema: map[string]*schema.Schema{ - "region": { - Type: schema.TypeString, - Optional: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsRedshiftServiceAccountRead(d *schema.ResourceData, meta interface{}) error { - region := meta.(*AWSClient).region - if v, ok := d.GetOk("region"); ok { - region = v.(string) - } - - if accid, ok := redshiftServiceAccountPerRegionMap[region]; ok { - d.SetId(accid) - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "iam", - AccountID: accid, - Resource: "user/logs", - }.String() - d.Set("arn", arn) - - return nil - } - - return fmt.Errorf("Unknown region (%q)", region) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_region.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_region.go deleted file mode 100644 index b3112a34b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_region.go +++ /dev/null @@ -1,118 +0,0 @@ -package aws - -import ( - "fmt" - "strings" - - "github.com/aws/aws-sdk-go/aws/endpoints" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsRegion() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsRegionRead, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "current": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - Deprecated: "Defaults to current provider region if no other filtering is enabled", - }, - - "endpoint": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "description": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsRegionRead(d *schema.ResourceData, meta interface{}) error { - providerRegion := meta.(*AWSClient).region - - var region *endpoints.Region - - if v, ok := d.GetOk("endpoint"); ok { - endpoint := v.(string) - matchingRegion, err := findRegionByEc2Endpoint(endpoint) - if err != nil { - return err - } - region = matchingRegion - } - - if v, ok := d.GetOk("name"); ok { - name := v.(string) - matchingRegion, err := findRegionByName(name) - if err != nil { - return err - } - if region != nil && region.ID() != matchingRegion.ID() { - return fmt.Errorf("multiple regions matched; use additional constraints to reduce matches to a single region") - } - region = matchingRegion - } - - // Default to provider current region if no other filters matched - if region == nil { - matchingRegion, err := findRegionByName(providerRegion) - if err != nil { - return err - } - region = matchingRegion - } - - d.SetId(region.ID()) - d.Set("current", region.ID() == providerRegion) - - regionEndpointEc2, err := region.ResolveEndpoint(endpoints.Ec2ServiceID) - if err != nil { - return err - } - d.Set("endpoint", strings.TrimPrefix(regionEndpointEc2.URL, "https://")) - - d.Set("name", region.ID()) - - d.Set("description", region.Description()) - - return nil -} - -func findRegionByEc2Endpoint(endpoint string) (*endpoints.Region, error) { - for _, partition := range endpoints.DefaultPartitions() { - for _, region := range partition.Regions() { - regionEndpointEc2, err := region.ResolveEndpoint(endpoints.Ec2ServiceID) - if err != nil { - return nil, err - } - if strings.TrimPrefix(regionEndpointEc2.URL, "https://") == endpoint { - return ®ion, nil - } - } - } - return nil, fmt.Errorf("region not found for endpoint: %s", endpoint) -} - -func findRegionByName(name string) (*endpoints.Region, error) { - for _, partition := range endpoints.DefaultPartitions() { - for _, region := range partition.Regions() { - if region.ID() == name { - return ®ion, nil - } - } - } - return nil, fmt.Errorf("region not found for name: %s", name) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route.go deleted file mode 100644 index e85f12d07..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route.go +++ /dev/null @@ -1,192 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsRoute() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsRouteRead, - - Schema: map[string]*schema.Schema{ - "route_table_id": { - Type: schema.TypeString, - Required: true, - }, - "destination_cidr_block": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "destination_ipv6_cidr_block": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "egress_only_gateway_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "gateway_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "instance_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "nat_gateway_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "transit_gateway_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "vpc_peering_connection_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "network_interface_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - } -} - -func dataSourceAwsRouteRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - req := &ec2.DescribeRouteTablesInput{} - rtbId := d.Get("route_table_id") - cidr := d.Get("destination_cidr_block") - ipv6Cidr := d.Get("destination_ipv6_cidr_block") - - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "route-table-id": rtbId.(string), - "route.destination-cidr-block": cidr.(string), - "route.destination-ipv6-cidr-block": ipv6Cidr.(string), - }, - ) - - log.Printf("[DEBUG] Reading Route Table: %s", req) - resp, err := conn.DescribeRouteTables(req) - if err != nil { - return err - } - if resp == nil || len(resp.RouteTables) == 0 { - return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") - } - if len(resp.RouteTables) > 1 { - return fmt.Errorf("Your query returned more than one route table. Please change your search criteria and try again.") - } - - results := getRoutes(resp.RouteTables[0], d) - - if len(results) == 0 { - return fmt.Errorf("No routes matching supplied arguments found in table(s)") - } - if len(results) > 1 { - return fmt.Errorf("Multiple routes matched; use additional constraints to reduce matches to a single route") - } - route := results[0] - - d.SetId(resourceAwsRouteID(d, route)) // using function from "resource_aws_route.go" - d.Set("destination_cidr_block", route.DestinationCidrBlock) - d.Set("destination_ipv6_cidr_block", route.DestinationIpv6CidrBlock) - d.Set("egress_only_gateway_id", route.EgressOnlyInternetGatewayId) - d.Set("gateway_id", route.GatewayId) - d.Set("instance_id", route.InstanceId) - d.Set("nat_gateway_id", route.NatGatewayId) - d.Set("transit_gateway_id", route.TransitGatewayId) - d.Set("vpc_peering_connection_id", route.VpcPeeringConnectionId) - d.Set("network_interface_id", route.NetworkInterfaceId) - - return nil -} - -func getRoutes(table *ec2.RouteTable, d *schema.ResourceData) []*ec2.Route { - ec2Routes := table.Routes - routes := make([]*ec2.Route, 0, len(ec2Routes)) - // Loop through the routes and add them to the set - for _, r := range ec2Routes { - - if r.Origin != nil && *r.Origin == "EnableVgwRoutePropagation" { - continue - } - - if r.DestinationPrefixListId != nil { - // Skipping because VPC endpoint routes are handled separately - // See aws_vpc_endpoint - continue - } - - if v, ok := d.GetOk("destination_cidr_block"); ok { - if r.DestinationCidrBlock == nil || *r.DestinationCidrBlock != v.(string) { - continue - } - } - - if v, ok := d.GetOk("destination_ipv6_cidr_block"); ok { - if r.DestinationIpv6CidrBlock == nil || *r.DestinationIpv6CidrBlock != v.(string) { - continue - } - } - - if v, ok := d.GetOk("egress_only_gateway_id"); ok { - if r.EgressOnlyInternetGatewayId == nil || *r.EgressOnlyInternetGatewayId != v.(string) { - continue - } - } - - if v, ok := d.GetOk("gateway_id"); ok { - if r.GatewayId == nil || *r.GatewayId != v.(string) { - continue - } - } - - if v, ok := d.GetOk("instance_id"); ok { - if r.InstanceId == nil || *r.InstanceId != v.(string) { - continue - } - } - - if v, ok := d.GetOk("nat_gateway_id"); ok { - if r.NatGatewayId == nil || *r.NatGatewayId != v.(string) { - continue - } - } - - if v, ok := d.GetOk("transit_gateway_id"); ok { - if r.TransitGatewayId == nil || *r.TransitGatewayId != v.(string) { - continue - } - } - - if v, ok := d.GetOk("vpc_peering_connection_id"); ok { - if r.VpcPeeringConnectionId == nil || *r.VpcPeeringConnectionId != v.(string) { - continue - } - } - - if v, ok := d.GetOk("network_interface_id"); ok { - if r.NetworkInterfaceId == nil || *r.NetworkInterfaceId != v.(string) { - continue - } - } - routes = append(routes, r) - } - return routes -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_delegation_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_delegation_set.go deleted file mode 100644 index 4cd4f08d2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_delegation_set.go +++ /dev/null @@ -1,58 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/route53" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsDelegationSet() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsDelegationSetRead, - - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Required: true, - }, - "caller_reference": { - Type: schema.TypeString, - Computed: true, - }, - "name_servers": { - Type: schema.TypeList, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - }, - }, - } -} - -func dataSourceAwsDelegationSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).r53conn - - dSetID := d.Get("id").(string) - - input := &route53.GetReusableDelegationSetInput{ - Id: aws.String(dSetID), - } - - log.Printf("[DEBUG] Reading Route53 delegation set: %s", input) - - resp, err := conn.GetReusableDelegationSet(input) - if err != nil { - return fmt.Errorf("Failed getting Route53 delegation set: %s Set: %q", err, dSetID) - } - - d.SetId(dSetID) - d.Set("caller_reference", resp.DelegationSet.CallerReference) - - if err := d.Set("name_servers", expandNameServers(resp.DelegationSet.NameServers)); err != nil { - return fmt.Errorf("error setting name_servers: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_zone.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_zone.go deleted file mode 100644 index e5ee30103..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_zone.go +++ /dev/null @@ -1,212 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/route53" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsRoute53Zone() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsRoute53ZoneRead, - - Schema: map[string]*schema.Schema{ - "zone_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "private_zone": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "comment": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "caller_reference": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "tags": tagsSchemaComputed(), - "resource_record_set_count": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - "name_servers": { - Type: schema.TypeList, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - }, - }, - } -} - -func dataSourceAwsRoute53ZoneRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).r53conn - name, nameExists := d.GetOk("name") - name = hostedZoneName(name.(string)) - id, idExists := d.GetOk("zone_id") - vpcId, vpcIdExists := d.GetOk("vpc_id") - tags := tagsFromMap(d.Get("tags").(map[string]interface{})) - if nameExists && idExists { - return fmt.Errorf("zone_id and name arguments can't be used together") - } - - if !nameExists && !idExists { - return fmt.Errorf("Either name or zone_id must be set") - } - - var nextMarker *string - - var hostedZoneFound *route53.HostedZone - // We loop through all hostedzone - for allHostedZoneListed := false; !allHostedZoneListed; { - req := &route53.ListHostedZonesInput{} - if nextMarker != nil { - req.Marker = nextMarker - } - log.Printf("[DEBUG] Reading Route53 Zone: %s", req) - resp, err := conn.ListHostedZones(req) - - if err != nil { - return fmt.Errorf("Error finding Route 53 Hosted Zone: %v", err) - } - for _, hostedZone := range resp.HostedZones { - hostedZoneId := cleanZoneID(*hostedZone.Id) - if idExists && hostedZoneId == id.(string) { - hostedZoneFound = hostedZone - break - // we check if the name is the same as requested and if private zone field is the same as requested or if there is a vpc_id - } else if *hostedZone.Name == name && (*hostedZone.Config.PrivateZone == d.Get("private_zone").(bool) || (*hostedZone.Config.PrivateZone && vpcIdExists)) { - matchingVPC := false - if vpcIdExists { - reqHostedZone := &route53.GetHostedZoneInput{} - reqHostedZone.Id = aws.String(hostedZoneId) - - respHostedZone, errHostedZone := conn.GetHostedZone(reqHostedZone) - if errHostedZone != nil { - return fmt.Errorf("Error finding Route 53 Hosted Zone: %v", errHostedZone) - } - // we go through all VPCs - for _, vpc := range respHostedZone.VPCs { - if *vpc.VPCId == vpcId.(string) { - matchingVPC = true - break - } - } - } else { - matchingVPC = true - } - // we check if tags match - matchingTags := true - if len(tags) > 0 { - reqListTags := &route53.ListTagsForResourceInput{} - reqListTags.ResourceId = aws.String(hostedZoneId) - reqListTags.ResourceType = aws.String("hostedzone") - respListTags, errListTags := conn.ListTagsForResource(reqListTags) - - if errListTags != nil { - return fmt.Errorf("Error finding Route 53 Hosted Zone: %v", errListTags) - } - for _, tag := range tags { - found := false - for _, tagRequested := range respListTags.ResourceTagSet.Tags { - if *tag.Key == *tagRequested.Key && *tag.Value == *tagRequested.Value { - found = true - } - } - - if !found { - matchingTags = false - break - } - } - } - - if matchingTags && matchingVPC { - if hostedZoneFound != nil { - return fmt.Errorf("multiple Route53Zone found please use vpc_id option to filter") - } - - hostedZoneFound = hostedZone - } - } - } - if *resp.IsTruncated { - nextMarker = resp.NextMarker - } else { - allHostedZoneListed = true - } - } - if hostedZoneFound == nil { - return fmt.Errorf("no matching Route53Zone found") - } - - idHostedZone := cleanZoneID(*hostedZoneFound.Id) - d.SetId(idHostedZone) - d.Set("zone_id", idHostedZone) - d.Set("name", hostedZoneFound.Name) - d.Set("comment", hostedZoneFound.Config.Comment) - d.Set("private_zone", hostedZoneFound.Config.PrivateZone) - d.Set("caller_reference", hostedZoneFound.CallerReference) - d.Set("resource_record_set_count", hostedZoneFound.ResourceRecordSetCount) - - nameServers, err := hostedZoneNameServers(idHostedZone, conn) - if err != nil { - return fmt.Errorf("Error finding Route 53 Hosted Zone: %v", err) - } - d.Set("name_servers", nameServers) - - return nil -} - -// used to manage trailing . -func hostedZoneName(name string) string { - if strings.HasSuffix(name, ".") { - return name - } - - return name + "." -} - -// used to retrieve name servers -func hostedZoneNameServers(id string, conn *route53.Route53) ([]string, error) { - req := &route53.GetHostedZoneInput{} - req.Id = aws.String(id) - - resp, err := conn.GetHostedZone(req) - if err != nil { - return []string{}, err - } - - if resp.DelegationSet == nil { - return []string{}, nil - } - - servers := []string{} - for _, server := range resp.DelegationSet.NameServers { - if server != nil { - servers = append(servers, *server) - } - } - return servers, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route_table.go deleted file mode 100644 index 80751a531..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route_table.go +++ /dev/null @@ -1,246 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsRouteTable() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsRouteTableRead, - - Schema: map[string]*schema.Schema{ - "subnet_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "route_table_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "filter": ec2CustomFiltersSchema(), - "tags": tagsSchemaComputed(), - "routes": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cidr_block": { - Type: schema.TypeString, - Computed: true, - }, - - "ipv6_cidr_block": { - Type: schema.TypeString, - Computed: true, - }, - - "egress_only_gateway_id": { - Type: schema.TypeString, - Computed: true, - }, - - "gateway_id": { - Type: schema.TypeString, - Computed: true, - }, - - "instance_id": { - Type: schema.TypeString, - Computed: true, - }, - - "nat_gateway_id": { - Type: schema.TypeString, - Computed: true, - }, - - "transit_gateway_id": { - Type: schema.TypeString, - Computed: true, - }, - - "vpc_peering_connection_id": { - Type: schema.TypeString, - Computed: true, - }, - - "network_interface_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "associations": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "route_table_association_id": { - Type: schema.TypeString, - Computed: true, - }, - - "route_table_id": { - Type: schema.TypeString, - Computed: true, - }, - - "subnet_id": { - Type: schema.TypeString, - Computed: true, - }, - - "main": { - Type: schema.TypeBool, - Computed: true, - }, - }, - }, - }, - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsRouteTableRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - req := &ec2.DescribeRouteTablesInput{} - vpcId, vpcIdOk := d.GetOk("vpc_id") - subnetId, subnetIdOk := d.GetOk("subnet_id") - rtbId, rtbOk := d.GetOk("route_table_id") - tags, tagsOk := d.GetOk("tags") - filter, filterOk := d.GetOk("filter") - - if !vpcIdOk && !subnetIdOk && !tagsOk && !filterOk && !rtbOk { - return fmt.Errorf("One of route_table_id, vpc_id, subnet_id, filters, or tags must be assigned") - } - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "route-table-id": rtbId.(string), - "vpc-id": vpcId.(string), - "association.subnet-id": subnetId.(string), - }, - ) - req.Filters = append(req.Filters, buildEC2TagFilterList( - tagsFromMap(tags.(map[string]interface{})), - )...) - req.Filters = append(req.Filters, buildEC2CustomFilterList( - filter.(*schema.Set), - )...) - - log.Printf("[DEBUG] Reading Route Table: %s", req) - resp, err := conn.DescribeRouteTables(req) - if err != nil { - return err - } - if resp == nil || len(resp.RouteTables) == 0 { - return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") - } - if len(resp.RouteTables) > 1 { - return fmt.Errorf("Multiple Route Table matched; use additional constraints to reduce matches to a single Route Table") - } - - rt := resp.RouteTables[0] - - d.SetId(aws.StringValue(rt.RouteTableId)) - d.Set("route_table_id", rt.RouteTableId) - d.Set("vpc_id", rt.VpcId) - d.Set("tags", tagsToMap(rt.Tags)) - d.Set("owner_id", rt.OwnerId) - if err := d.Set("routes", dataSourceRoutesRead(rt.Routes)); err != nil { - return err - } - - if err := d.Set("associations", dataSourceAssociationsRead(rt.Associations)); err != nil { - return err - } - - return nil -} - -func dataSourceRoutesRead(ec2Routes []*ec2.Route) []map[string]interface{} { - routes := make([]map[string]interface{}, 0, len(ec2Routes)) - // Loop through the routes and add them to the set - for _, r := range ec2Routes { - if r.GatewayId != nil && *r.GatewayId == "local" { - continue - } - - if r.Origin != nil && *r.Origin == "EnableVgwRoutePropagation" { - continue - } - - if r.DestinationPrefixListId != nil { - // Skipping because VPC endpoint routes are handled separately - // See aws_vpc_endpoint - continue - } - - m := make(map[string]interface{}) - - if r.DestinationCidrBlock != nil { - m["cidr_block"] = *r.DestinationCidrBlock - } - if r.DestinationIpv6CidrBlock != nil { - m["ipv6_cidr_block"] = *r.DestinationIpv6CidrBlock - } - if r.EgressOnlyInternetGatewayId != nil { - m["egress_only_gateway_id"] = *r.EgressOnlyInternetGatewayId - } - if r.GatewayId != nil { - m["gateway_id"] = *r.GatewayId - } - if r.NatGatewayId != nil { - m["nat_gateway_id"] = *r.NatGatewayId - } - if r.InstanceId != nil { - m["instance_id"] = *r.InstanceId - } - if r.TransitGatewayId != nil { - m["transit_gateway_id"] = *r.TransitGatewayId - } - if r.VpcPeeringConnectionId != nil { - m["vpc_peering_connection_id"] = *r.VpcPeeringConnectionId - } - if r.NetworkInterfaceId != nil { - m["network_interface_id"] = *r.NetworkInterfaceId - } - - routes = append(routes, m) - } - return routes -} - -func dataSourceAssociationsRead(ec2Assocations []*ec2.RouteTableAssociation) []map[string]interface{} { - associations := make([]map[string]interface{}, 0, len(ec2Assocations)) - // Loop through the routes and add them to the set - for _, a := range ec2Assocations { - - m := make(map[string]interface{}) - m["route_table_id"] = *a.RouteTableId - m["route_table_association_id"] = *a.RouteTableAssociationId - // GH[11134] - if a.SubnetId != nil { - m["subnet_id"] = *a.SubnetId - } - m["main"] = *a.Main - associations = append(associations, m) - } - return associations -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route_tables.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route_tables.go deleted file mode 100644 index ef34987c3..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route_tables.go +++ /dev/null @@ -1,80 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsRouteTables() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsRouteTablesRead, - Schema: map[string]*schema.Schema{ - - "filter": ec2CustomFiltersSchema(), - - "tags": tagsSchemaComputed(), - - "vpc_id": { - Type: schema.TypeString, - Optional: true, - }, - - "ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - } -} - -func dataSourceAwsRouteTablesRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeRouteTablesInput{} - - if v, ok := d.GetOk("vpc_id"); ok { - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "vpc-id": v.(string), - }, - ) - } - - req.Filters = append(req.Filters, buildEC2TagFilterList( - tagsFromMap(d.Get("tags").(map[string]interface{})), - )...) - - req.Filters = append(req.Filters, buildEC2CustomFilterList( - d.Get("filter").(*schema.Set), - )...) - - log.Printf("[DEBUG] DescribeRouteTables %s\n", req) - resp, err := conn.DescribeRouteTables(req) - if err != nil { - return err - } - - if resp == nil || len(resp.RouteTables) == 0 { - return fmt.Errorf("no matching route tables found for vpc with id %s", d.Get("vpc_id").(string)) - } - - routeTables := make([]string, 0) - - for _, routeTable := range resp.RouteTables { - routeTables = append(routeTables, aws.StringValue(routeTable.RouteTableId)) - } - - d.SetId(resource.UniqueId()) - if err = d.Set("ids", routeTables); err != nil { - return fmt.Errorf("error setting ids: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket.go deleted file mode 100644 index 2e3e25a40..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket.go +++ /dev/null @@ -1,120 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsS3Bucket() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsS3BucketRead, - - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Required: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "bucket_domain_name": { - Type: schema.TypeString, - Computed: true, - }, - "hosted_zone_id": { - Type: schema.TypeString, - Computed: true, - }, - "region": { - Type: schema.TypeString, - Computed: true, - }, - "website_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - "website_domain": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).s3conn - - bucket := d.Get("bucket").(string) - - input := &s3.HeadBucketInput{ - Bucket: aws.String(bucket), - } - - log.Printf("[DEBUG] Reading S3 bucket: %s", input) - _, err := conn.HeadBucket(input) - - if err != nil { - return fmt.Errorf("Failed getting S3 bucket: %s Bucket: %q", err, bucket) - } - - d.SetId(bucket) - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "s3", - Resource: bucket, - }.String() - d.Set("arn", arn) - d.Set("bucket_domain_name", bucketDomainName(bucket)) - - err = bucketLocation(d, bucket, conn) - return err -} - -func bucketLocation(d *schema.ResourceData, bucket string, conn *s3.S3) error { - location, err := conn.GetBucketLocation( - &s3.GetBucketLocationInput{ - Bucket: aws.String(bucket), - }, - ) - if err != nil { - return err - } - var region string - if location.LocationConstraint != nil { - region = *location.LocationConstraint - } - region = normalizeRegion(region) - if err := d.Set("region", region); err != nil { - return err - } - - hostedZoneID, err := HostedZoneIDForRegion(region) - if err != nil { - log.Printf("[WARN] %s", err) - } else { - d.Set("hosted_zone_id", hostedZoneID) - } - - _, websiteErr := conn.GetBucketWebsite( - &s3.GetBucketWebsiteInput{ - Bucket: aws.String(bucket), - }, - ) - - if websiteErr == nil { - websiteEndpoint := WebsiteEndpoint(bucket, region) - if err := d.Set("website_endpoint", websiteEndpoint.Endpoint); err != nil { - return err - } - if err := d.Set("website_domain", websiteEndpoint.Domain); err != nil { - return err - } - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket_object.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket_object.go deleted file mode 100644 index 5be6586d0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket_object.go +++ /dev/null @@ -1,239 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "regexp" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsS3BucketObject() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsS3BucketObjectRead, - - Schema: map[string]*schema.Schema{ - "body": { - Type: schema.TypeString, - Computed: true, - }, - "bucket": { - Type: schema.TypeString, - Required: true, - }, - "cache_control": { - Type: schema.TypeString, - Computed: true, - }, - "content_disposition": { - Type: schema.TypeString, - Computed: true, - }, - "content_encoding": { - Type: schema.TypeString, - Computed: true, - }, - "content_language": { - Type: schema.TypeString, - Computed: true, - }, - "content_length": { - Type: schema.TypeInt, - Computed: true, - }, - "content_type": { - Type: schema.TypeString, - Computed: true, - }, - "etag": { - Type: schema.TypeString, - Computed: true, - }, - "expiration": { - Type: schema.TypeString, - Computed: true, - }, - "expires": { - Type: schema.TypeString, - Computed: true, - }, - "key": { - Type: schema.TypeString, - Required: true, - }, - "last_modified": { - Type: schema.TypeString, - Computed: true, - }, - "metadata": { - Type: schema.TypeMap, - Computed: true, - }, - "range": { - Type: schema.TypeString, - Optional: true, - }, - "server_side_encryption": { - Type: schema.TypeString, - Computed: true, - }, - "sse_kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "storage_class": { - Type: schema.TypeString, - Computed: true, - }, - "version_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "website_redirect_location": { - Type: schema.TypeString, - Computed: true, - }, - - "tags": tagsSchemaComputed(), - }, - } -} - -func dataSourceAwsS3BucketObjectRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).s3conn - - bucket := d.Get("bucket").(string) - key := d.Get("key").(string) - - input := s3.HeadObjectInput{ - Bucket: aws.String(bucket), - Key: aws.String(key), - } - if v, ok := d.GetOk("range"); ok { - input.Range = aws.String(v.(string)) - } - if v, ok := d.GetOk("version_id"); ok { - input.VersionId = aws.String(v.(string)) - } - - versionText := "" - uniqueId := bucket + "/" + key - if v, ok := d.GetOk("version_id"); ok { - versionText = fmt.Sprintf(" of version %q", v.(string)) - uniqueId += "@" + v.(string) - } - - log.Printf("[DEBUG] Reading S3 Bucket Object: %s", input) - out, err := conn.HeadObject(&input) - if err != nil { - return fmt.Errorf("Failed getting S3 object: %s Bucket: %q Object: %q", err, bucket, key) - } - if out.DeleteMarker != nil && *out.DeleteMarker { - return fmt.Errorf("Requested S3 object %q%s has been deleted", - bucket+key, versionText) - } - - log.Printf("[DEBUG] Received S3 object: %s", out) - - d.SetId(uniqueId) - - d.Set("cache_control", out.CacheControl) - d.Set("content_disposition", out.ContentDisposition) - d.Set("content_encoding", out.ContentEncoding) - d.Set("content_language", out.ContentLanguage) - d.Set("content_length", out.ContentLength) - d.Set("content_type", out.ContentType) - // See https://forums.aws.amazon.com/thread.jspa?threadID=44003 - d.Set("etag", strings.Trim(*out.ETag, `"`)) - d.Set("expiration", out.Expiration) - d.Set("expires", out.Expires) - d.Set("last_modified", out.LastModified.Format(time.RFC1123)) - d.Set("metadata", pointersMapToStringList(out.Metadata)) - d.Set("server_side_encryption", out.ServerSideEncryption) - d.Set("sse_kms_key_id", out.SSEKMSKeyId) - d.Set("version_id", out.VersionId) - d.Set("website_redirect_location", out.WebsiteRedirectLocation) - - // The "STANDARD" (which is also the default) storage - // class when set would not be included in the results. - d.Set("storage_class", s3.StorageClassStandard) - if out.StorageClass != nil { - d.Set("storage_class", out.StorageClass) - } - - if isContentTypeAllowed(out.ContentType) { - input := s3.GetObjectInput{ - Bucket: aws.String(bucket), - Key: aws.String(key), - } - if v, ok := d.GetOk("range"); ok { - input.Range = aws.String(v.(string)) - } - if out.VersionId != nil { - input.VersionId = out.VersionId - } - out, err := conn.GetObject(&input) - if err != nil { - return fmt.Errorf("Failed getting S3 object: %s", err) - } - - buf := new(bytes.Buffer) - bytesRead, err := buf.ReadFrom(out.Body) - if err != nil { - return fmt.Errorf("Failed reading content of S3 object (%s): %s", - uniqueId, err) - } - log.Printf("[INFO] Saving %d bytes from S3 object %s", bytesRead, uniqueId) - d.Set("body", buf.String()) - } else { - contentType := "" - if out.ContentType == nil { - contentType = "" - } else { - contentType = *out.ContentType - } - - log.Printf("[INFO] Ignoring body of S3 object %s with Content-Type %q", - uniqueId, contentType) - } - - tagResp, err := conn.GetObjectTagging( - &s3.GetObjectTaggingInput{ - Bucket: aws.String(bucket), - Key: aws.String(key), - }) - if err != nil { - return err - } - d.Set("tags", tagsToMapS3(tagResp.TagSet)) - - return nil -} - -// This is to prevent potential issues w/ binary files -// and generally unprintable characters -// See https://github.com/hashicorp/terraform/pull/3858#issuecomment-156856738 -func isContentTypeAllowed(contentType *string) bool { - if contentType == nil { - return false - } - - allowedContentTypes := []*regexp.Regexp{ - regexp.MustCompile("^text/.+"), - regexp.MustCompile("^application/json$"), - } - - for _, r := range allowedContentTypes { - if r.MatchString(*contentType) { - return true - } - } - - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret.go deleted file mode 100644 index 1cba15188..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret.go +++ /dev/null @@ -1,139 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/secretsmanager" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" -) - -func dataSourceAwsSecretsManagerSecret() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsSecretsManagerSecretRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateArn, - }, - "description": { - Type: schema.TypeString, - Computed: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "policy": { - Type: schema.TypeString, - Computed: true, - }, - "rotation_enabled": { - Type: schema.TypeBool, - Computed: true, - }, - "rotation_lambda_arn": { - Type: schema.TypeString, - Computed: true, - }, - "rotation_rules": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "automatically_after_days": { - Type: schema.TypeInt, - Computed: true, - }, - }, - }, - }, - "tags": { - Type: schema.TypeMap, - Computed: true, - }, - }, - } -} - -func dataSourceAwsSecretsManagerSecretRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).secretsmanagerconn - var secretID string - if v, ok := d.GetOk("arn"); ok { - secretID = v.(string) - } - if v, ok := d.GetOk("name"); ok { - if secretID != "" { - return errors.New("specify only arn or name") - } - secretID = v.(string) - } - - if secretID == "" { - return errors.New("must specify either arn or name") - } - - input := &secretsmanager.DescribeSecretInput{ - SecretId: aws.String(secretID), - } - - log.Printf("[DEBUG] Reading Secrets Manager Secret: %s", input) - output, err := conn.DescribeSecret(input) - if err != nil { - if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { - return fmt.Errorf("Secrets Manager Secret %q not found", secretID) - } - return fmt.Errorf("error reading Secrets Manager Secret: %s", err) - } - - if output.ARN == nil { - return fmt.Errorf("Secrets Manager Secret %q not found", secretID) - } - - d.SetId(aws.StringValue(output.ARN)) - d.Set("arn", output.ARN) - d.Set("description", output.Description) - d.Set("kms_key_id", output.KmsKeyId) - d.Set("name", output.Name) - d.Set("rotation_enabled", output.RotationEnabled) - d.Set("rotation_lambda_arn", output.RotationLambdaARN) - d.Set("policy", "") - - pIn := &secretsmanager.GetResourcePolicyInput{ - SecretId: aws.String(d.Id()), - } - log.Printf("[DEBUG] Reading Secrets Manager Secret policy: %s", pIn) - pOut, err := conn.GetResourcePolicy(pIn) - if err != nil { - return fmt.Errorf("error reading Secrets Manager Secret policy: %s", err) - } - - if pOut != nil && pOut.ResourcePolicy != nil { - policy, err := structure.NormalizeJsonString(aws.StringValue(pOut.ResourcePolicy)) - if err != nil { - return fmt.Errorf("policy contains an invalid JSON: %s", err) - } - d.Set("policy", policy) - } - - if err := d.Set("rotation_rules", flattenSecretsManagerRotationRules(output.RotationRules)); err != nil { - return fmt.Errorf("error setting rotation_rules: %s", err) - } - - if err := d.Set("tags", tagsToMapSecretsManager(output.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret_version.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret_version.go deleted file mode 100644 index 7bc4170de..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret_version.go +++ /dev/null @@ -1,98 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/secretsmanager" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsSecretsManagerSecretVersion() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsSecretsManagerSecretVersionRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "secret_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "secret_string": { - Type: schema.TypeString, - Computed: true, - Sensitive: true, - }, - "secret_binary": { - Type: schema.TypeString, - Computed: true, - Sensitive: true, - }, - "version_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "version_stage": { - Type: schema.TypeString, - Optional: true, - Default: "AWSCURRENT", - }, - "version_stages": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func dataSourceAwsSecretsManagerSecretVersionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).secretsmanagerconn - secretID := d.Get("secret_id").(string) - var version string - - input := &secretsmanager.GetSecretValueInput{ - SecretId: aws.String(secretID), - } - - if v, ok := d.GetOk("version_id"); ok { - versionID := v.(string) - input.VersionId = aws.String(versionID) - version = versionID - } else { - versionStage := d.Get("version_stage").(string) - input.VersionStage = aws.String(versionStage) - version = versionStage - } - - log.Printf("[DEBUG] Reading Secrets Manager Secret Version: %s", input) - output, err := conn.GetSecretValue(input) - if err != nil { - if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { - return fmt.Errorf("Secrets Manager Secret %q Version %q not found", secretID, version) - } - if isAWSErr(err, secretsmanager.ErrCodeInvalidRequestException, "You can’t perform this operation on the secret because it was deleted") { - return fmt.Errorf("Secrets Manager Secret %q Version %q not found", secretID, version) - } - return fmt.Errorf("error reading Secrets Manager Secret Version: %s", err) - } - - d.SetId(fmt.Sprintf("%s|%s", secretID, version)) - d.Set("secret_id", secretID) - d.Set("secret_string", output.SecretString) - d.Set("version_id", output.VersionId) - d.Set("secret_binary", fmt.Sprintf("%s", output.SecretBinary)) - d.Set("arn", output.ARN) - - if err := d.Set("version_stages", flattenStringList(output.VersionStages)); err != nil { - return fmt.Errorf("error setting version_stages: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_group.go deleted file mode 100644 index 80207dd1a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_group.go +++ /dev/null @@ -1,105 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsSecurityGroup() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsSecurityGroupRead, - - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "filter": ec2CustomFiltersSchema(), - - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "tags": tagsSchemaComputed(), - - "description": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsSecurityGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - req := &ec2.DescribeSecurityGroupsInput{} - - if id, ok := d.GetOk("id"); ok { - req.GroupIds = []*string{aws.String(id.(string))} - } - - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "group-name": d.Get("name").(string), - "vpc-id": d.Get("vpc_id").(string), - }, - ) - req.Filters = append(req.Filters, buildEC2TagFilterList( - tagsFromMap(d.Get("tags").(map[string]interface{})), - )...) - req.Filters = append(req.Filters, buildEC2CustomFilterList( - d.Get("filter").(*schema.Set), - )...) - if len(req.Filters) == 0 { - // Don't send an empty filters list; the EC2 API won't accept it. - req.Filters = nil - } - - log.Printf("[DEBUG] Reading Security Group: %s", req) - resp, err := conn.DescribeSecurityGroups(req) - if err != nil { - return err - } - if resp == nil || len(resp.SecurityGroups) == 0 { - return fmt.Errorf("no matching SecurityGroup found") - } - if len(resp.SecurityGroups) > 1 { - return fmt.Errorf("multiple Security Groups matched; use additional constraints to reduce matches to a single Security Group") - } - - sg := resp.SecurityGroups[0] - - d.SetId(*sg.GroupId) - d.Set("name", sg.GroupName) - d.Set("description", sg.Description) - d.Set("vpc_id", sg.VpcId) - d.Set("tags", tagsToMap(sg.Tags)) - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "ec2", - Region: meta.(*AWSClient).region, - AccountID: *sg.OwnerId, - Resource: fmt.Sprintf("security-group/%s", *sg.GroupId), - }.String() - d.Set("arn", arn) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_groups.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_groups.go deleted file mode 100644 index d5b1ac121..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_groups.go +++ /dev/null @@ -1,90 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsSecurityGroups() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsSecurityGroupsRead, - - Schema: map[string]*schema.Schema{ - "filter": dataSourceFiltersSchema(), - "tags": tagsSchemaComputed(), - - "ids": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "vpc_ids": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func dataSourceAwsSecurityGroupsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - req := &ec2.DescribeSecurityGroupsInput{} - - filters, filtersOk := d.GetOk("filter") - tags, tagsOk := d.GetOk("tags") - - if !filtersOk && !tagsOk { - return fmt.Errorf("One of filters or tags must be assigned") - } - - if filtersOk { - req.Filters = append(req.Filters, - buildAwsDataSourceFilters(filters.(*schema.Set))...) - } - if tagsOk { - req.Filters = append(req.Filters, buildEC2TagFilterList( - tagsFromMap(tags.(map[string]interface{})), - )...) - } - - log.Printf("[DEBUG] Reading Security Groups with request: %s", req) - - var ids, vpc_ids []string - for { - resp, err := conn.DescribeSecurityGroups(req) - if err != nil { - return fmt.Errorf("error reading security groups: %s", err) - } - - for _, sg := range resp.SecurityGroups { - ids = append(ids, aws.StringValue(sg.GroupId)) - vpc_ids = append(vpc_ids, aws.StringValue(sg.VpcId)) - } - - if resp.NextToken == nil { - break - } - req.NextToken = resp.NextToken - } - - if len(ids) < 1 { - return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") - } - - log.Printf("[DEBUG] Found %d security groups via given filter: %s", len(ids), req) - - d.SetId(resource.UniqueId()) - err := d.Set("ids", ids) - if err != nil { - return err - } - - err = d.Set("vpc_ids", vpc_ids) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sns.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sns.go deleted file mode 100644 index a28a11879..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sns.go +++ /dev/null @@ -1,72 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/service/sns" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsSnsTopic() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsSnsTopicsRead, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - validNamePattern := "^[A-Za-z0-9_-]+$" - validName, nameMatchErr := regexp.MatchString(validNamePattern, value) - if !validName || nameMatchErr != nil { - errors = append(errors, fmt.Errorf( - "%q must match regex '%v'", k, validNamePattern)) - } - return - }, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsSnsTopicsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).snsconn - params := &sns.ListTopicsInput{} - - target := d.Get("name") - var arns []string - log.Printf("[DEBUG] Reading SNS Topic: %s", params) - err := conn.ListTopicsPages(params, func(page *sns.ListTopicsOutput, lastPage bool) bool { - for _, topic := range page.Topics { - topicPattern := fmt.Sprintf(".*:%v$", target) - matched, regexpErr := regexp.MatchString(topicPattern, *topic.TopicArn) - if matched && regexpErr == nil { - arns = append(arns, *topic.TopicArn) - } - } - - return true - }) - if err != nil { - return fmt.Errorf("Error describing topics: %s", err) - } - - if len(arns) == 0 { - return fmt.Errorf("No topic with name %q found in this region.", target) - } - if len(arns) > 1 { - return fmt.Errorf("Multiple topics with name %q found in this region.", target) - } - - d.SetId(time.Now().UTC().String()) - d.Set("arn", arns[0]) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sqs_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sqs_queue.go deleted file mode 100644 index 40099d6a4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sqs_queue.go +++ /dev/null @@ -1,57 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/sqs" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsSqsQueue() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsSqsQueueRead, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "url": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsSqsQueueRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sqsconn - name := d.Get("name").(string) - - urlOutput, err := conn.GetQueueUrl(&sqs.GetQueueUrlInput{ - QueueName: aws.String(name), - }) - if err != nil || urlOutput.QueueUrl == nil { - return fmt.Errorf("Error getting queue URL: %s", err) - } - - queueURL := aws.StringValue(urlOutput.QueueUrl) - - attributesOutput, err := conn.GetQueueAttributes(&sqs.GetQueueAttributesInput{ - QueueUrl: aws.String(queueURL), - AttributeNames: []*string{aws.String(sqs.QueueAttributeNameQueueArn)}, - }) - if err != nil { - return fmt.Errorf("Error getting queue attributes: %s", err) - } - - d.Set("arn", aws.StringValue(attributesOutput.Attributes[sqs.QueueAttributeNameQueueArn])) - d.Set("url", queueURL) - d.SetId(queueURL) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_document.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_document.go deleted file mode 100644 index 6819233a4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_document.go +++ /dev/null @@ -1,90 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func dataSourceAwsSsmDocument() *schema.Resource { - return &schema.Resource{ - Read: dataAwsSsmDocumentRead, - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "content": { - Type: schema.TypeString, - Computed: true, - }, - "document_format": { - Type: schema.TypeString, - Optional: true, - Default: ssm.DocumentFormatJson, - ValidateFunc: validation.StringInSlice([]string{ - ssm.DocumentFormatJson, - ssm.DocumentFormatYaml, - }, false), - }, - "document_type": { - Type: schema.TypeString, - Computed: true, - }, - "document_version": { - Type: schema.TypeString, - Optional: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - }, - }, - } -} - -func dataAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - name := d.Get("name").(string) - - docInput := &ssm.GetDocumentInput{ - Name: aws.String(name), - DocumentFormat: aws.String(d.Get("document_format").(string)), - } - - if docVersion, ok := d.GetOk("document_version"); ok { - docInput.DocumentVersion = aws.String(docVersion.(string)) - } - - log.Printf("[DEBUG] Reading SSM Document: %s", docInput) - resp, err := ssmconn.GetDocument(docInput) - - if err != nil { - return fmt.Errorf("Error reading SSM Document: %s", err) - } - - d.SetId(aws.StringValue(resp.Name)) - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "ssm", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("document/%s", aws.StringValue(resp.Name)), - }.String() - - d.Set("arn", arn) - d.Set("name", resp.Name) - d.Set("content", resp.Content) - d.Set("document_version", resp.DocumentVersion) - d.Set("document_format", resp.DocumentFormat) - d.Set("document_type", resp.DocumentType) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go deleted file mode 100644 index 68df28df4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go +++ /dev/null @@ -1,77 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsSsmParameter() *schema.Resource { - return &schema.Resource{ - Read: dataAwsSsmParameterRead, - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - }, - "type": { - Type: schema.TypeString, - Computed: true, - }, - "value": { - Type: schema.TypeString, - Computed: true, - Sensitive: true, - }, - "with_decryption": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - }, - } -} - -func dataAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - name := d.Get("name").(string) - - paramInput := &ssm.GetParameterInput{ - Name: aws.String(name), - WithDecryption: aws.Bool(d.Get("with_decryption").(bool)), - } - - log.Printf("[DEBUG] Reading SSM Parameter: %s", paramInput) - resp, err := ssmconn.GetParameter(paramInput) - - if err != nil { - return fmt.Errorf("Error describing SSM parameter: %s", err) - } - - param := resp.Parameter - d.SetId(*param.Name) - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "ssm", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("parameter/%s", strings.TrimPrefix(d.Id(), "/")), - } - d.Set("arn", arn.String()) - d.Set("name", param.Name) - d.Set("type", param.Type) - d.Set("value", param.Value) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_storagegateway_local_disk.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_storagegateway_local_disk.go deleted file mode 100644 index ed86c4a4b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_storagegateway_local_disk.go +++ /dev/null @@ -1,85 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/storagegateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsStorageGatewayLocalDisk() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsStorageGatewayLocalDiskRead, - - Schema: map[string]*schema.Schema{ - "disk_id": { - Type: schema.TypeString, - Computed: true, - }, - "disk_node": { - Type: schema.TypeString, - Optional: true, - }, - "disk_path": { - Type: schema.TypeString, - Optional: true, - }, - "gateway_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - } -} - -func dataSourceAwsStorageGatewayLocalDiskRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - input := &storagegateway.ListLocalDisksInput{ - GatewayARN: aws.String(d.Get("gateway_arn").(string)), - } - - log.Printf("[DEBUG] Reading Storage Gateway Local Disk: %s", input) - output, err := conn.ListLocalDisks(input) - if err != nil { - return fmt.Errorf("error reading Storage Gateway Local Disk: %s", err) - } - - if output == nil || len(output.Disks) == 0 { - return errors.New("no results found for query, try adjusting your search criteria") - } - - var matchingDisks []*storagegateway.Disk - - for _, disk := range output.Disks { - if v, ok := d.GetOk("disk_node"); ok && v.(string) == aws.StringValue(disk.DiskNode) { - matchingDisks = append(matchingDisks, disk) - continue - } - if v, ok := d.GetOk("disk_path"); ok && v.(string) == aws.StringValue(disk.DiskPath) { - matchingDisks = append(matchingDisks, disk) - continue - } - } - - if len(matchingDisks) == 0 { - return errors.New("no results found for query, try adjusting your search criteria") - } - - if len(matchingDisks) > 1 { - return errors.New("multiple results found for query, try adjusting your search criteria") - } - - disk := matchingDisks[0] - - d.SetId(aws.StringValue(disk.DiskId)) - d.Set("disk_id", disk.DiskId) - d.Set("disk_node", disk.DiskNode) - d.Set("disk_path", disk.DiskPath) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet.go deleted file mode 100644 index e14b2612b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet.go +++ /dev/null @@ -1,180 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsSubnet() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsSubnetRead, - - Schema: map[string]*schema.Schema{ - "availability_zone": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "availability_zone_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "cidr_block": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "ipv6_cidr_block": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "default_for_az": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "filter": ec2CustomFiltersSchema(), - - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "state": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "tags": tagsSchemaComputed(), - - "vpc_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "assign_ipv6_address_on_creation": { - Type: schema.TypeBool, - Computed: true, - }, - - "map_public_ip_on_launch": { - Type: schema.TypeBool, - Computed: true, - }, - - "ipv6_cidr_block_association_id": { - Type: schema.TypeString, - Computed: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsSubnetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeSubnetsInput{} - - if id, ok := d.GetOk("id"); ok { - req.SubnetIds = []*string{aws.String(id.(string))} - } - - // We specify default_for_az as boolean, but EC2 filters want - // it to be serialized as a string. Note that setting it to - // "false" here does not actually filter by it *not* being - // the default, because Terraform can't distinguish between - // "false" and "not set". - defaultForAzStr := "" - if d.Get("default_for_az").(bool) { - defaultForAzStr = "true" - } - - filters := map[string]string{ - "availabilityZone": d.Get("availability_zone").(string), - "availabilityZoneId": d.Get("availability_zone_id").(string), - "defaultForAz": defaultForAzStr, - "state": d.Get("state").(string), - "vpc-id": d.Get("vpc_id").(string), - } - - if v, ok := d.GetOk("cidr_block"); ok { - filters["cidrBlock"] = v.(string) - } - - if v, ok := d.GetOk("ipv6_cidr_block"); ok { - filters["ipv6-cidr-block-association.ipv6-cidr-block"] = v.(string) - } - - req.Filters = buildEC2AttributeFilterList(filters) - req.Filters = append(req.Filters, buildEC2TagFilterList( - tagsFromMap(d.Get("tags").(map[string]interface{})), - )...) - req.Filters = append(req.Filters, buildEC2CustomFilterList( - d.Get("filter").(*schema.Set), - )...) - if len(req.Filters) == 0 { - // Don't send an empty filters list; the EC2 API won't accept it. - req.Filters = nil - } - - log.Printf("[DEBUG] Reading Subnet: %s", req) - resp, err := conn.DescribeSubnets(req) - if err != nil { - return err - } - if resp == nil || len(resp.Subnets) == 0 { - return fmt.Errorf("no matching subnet found") - } - if len(resp.Subnets) > 1 { - return fmt.Errorf("multiple subnets matched; use additional constraints to reduce matches to a single subnet") - } - - subnet := resp.Subnets[0] - - d.SetId(*subnet.SubnetId) - d.Set("vpc_id", subnet.VpcId) - d.Set("availability_zone", subnet.AvailabilityZone) - d.Set("availability_zone_id", subnet.AvailabilityZoneId) - d.Set("cidr_block", subnet.CidrBlock) - d.Set("default_for_az", subnet.DefaultForAz) - d.Set("state", subnet.State) - d.Set("tags", tagsToMap(subnet.Tags)) - d.Set("assign_ipv6_address_on_creation", subnet.AssignIpv6AddressOnCreation) - d.Set("map_public_ip_on_launch", subnet.MapPublicIpOnLaunch) - - for _, a := range subnet.Ipv6CidrBlockAssociationSet { - if *a.Ipv6CidrBlockState.State == "associated" { //we can only ever have 1 IPv6 block associated at once - d.Set("ipv6_cidr_block_association_id", a.AssociationId) - d.Set("ipv6_cidr_block", a.Ipv6CidrBlock) - } - } - - d.Set("arn", subnet.SubnetArn) - d.Set("owner_id", subnet.OwnerId) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet_ids.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet_ids.go deleted file mode 100644 index 21339f1ab..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet_ids.go +++ /dev/null @@ -1,83 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsSubnetIDs() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsSubnetIDsRead, - Schema: map[string]*schema.Schema{ - "filter": ec2CustomFiltersSchema(), - - "tags": tagsSchemaComputed(), - - "vpc_id": { - Type: schema.TypeString, - Required: true, - }, - - "ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - } -} - -func dataSourceAwsSubnetIDsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeSubnetsInput{} - - if vpc, vpcOk := d.GetOk("vpc_id"); vpcOk { - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "vpc-id": vpc.(string), - }, - ) - } - - if tags, tagsOk := d.GetOk("tags"); tagsOk { - req.Filters = append(req.Filters, buildEC2TagFilterList( - tagsFromMap(tags.(map[string]interface{})), - )...) - } - - if filters, filtersOk := d.GetOk("filter"); filtersOk { - req.Filters = append(req.Filters, buildEC2CustomFilterList( - filters.(*schema.Set), - )...) - } - - if len(req.Filters) == 0 { - req.Filters = nil - } - - log.Printf("[DEBUG] DescribeSubnets %s\n", req) - resp, err := conn.DescribeSubnets(req) - if err != nil { - return err - } - - if resp == nil || len(resp.Subnets) == 0 { - return fmt.Errorf("no matching subnet found for vpc with id %s", d.Get("vpc_id").(string)) - } - - subnets := make([]string, 0) - - for _, subnet := range resp.Subnets { - subnets = append(subnets, *subnet.SubnetId) - } - - d.SetId(d.Get("vpc_id").(string)) - d.Set("ids", subnets) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go deleted file mode 100644 index 10db3e99f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go +++ /dev/null @@ -1,228 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsVpc() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsVpcRead, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "cidr_block": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "cidr_block_associations": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "association_id": { - Type: schema.TypeString, - Computed: true, - }, - "cidr_block": { - Type: schema.TypeString, - Computed: true, - }, - "state": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - - "default": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "dhcp_options_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "enable_dns_hostnames": { - Type: schema.TypeBool, - Computed: true, - }, - - "enable_dns_support": { - Type: schema.TypeBool, - Computed: true, - }, - - "filter": ec2CustomFiltersSchema(), - - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "instance_tenancy": { - Type: schema.TypeString, - Computed: true, - }, - - "ipv6_cidr_block": { - Type: schema.TypeString, - Computed: true, - }, - - "ipv6_association_id": { - Type: schema.TypeString, - Computed: true, - }, - - "main_route_table_id": { - Type: schema.TypeString, - Computed: true, - }, - - "state": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "tags": tagsSchemaComputed(), - - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeVpcsInput{} - - var id string - if cid, ok := d.GetOk("id"); ok { - id = cid.(string) - } - - if id != "" { - req.VpcIds = []*string{aws.String(id)} - } - - // We specify "default" as boolean, but EC2 filters want - // it to be serialized as a string. Note that setting it to - // "false" here does not actually filter by it *not* being - // the default, because Terraform can't distinguish between - // "false" and "not set". - isDefaultStr := "" - if d.Get("default").(bool) { - isDefaultStr = "true" - } - - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "cidr": d.Get("cidr_block").(string), - "dhcp-options-id": d.Get("dhcp_options_id").(string), - "isDefault": isDefaultStr, - "state": d.Get("state").(string), - }, - ) - req.Filters = append(req.Filters, buildEC2TagFilterList( - tagsFromMap(d.Get("tags").(map[string]interface{})), - )...) - req.Filters = append(req.Filters, buildEC2CustomFilterList( - d.Get("filter").(*schema.Set), - )...) - if len(req.Filters) == 0 { - // Don't send an empty filters list; the EC2 API won't accept it. - req.Filters = nil - } - - log.Printf("[DEBUG] Reading AWS VPC: %s", req) - resp, err := conn.DescribeVpcs(req) - if err != nil { - return err - } - if resp == nil || len(resp.Vpcs) == 0 { - return fmt.Errorf("no matching VPC found") - } - if len(resp.Vpcs) > 1 { - return fmt.Errorf("multiple VPCs matched; use additional constraints to reduce matches to a single VPC") - } - - vpc := resp.Vpcs[0] - - d.SetId(aws.StringValue(vpc.VpcId)) - d.Set("cidr_block", vpc.CidrBlock) - d.Set("dhcp_options_id", vpc.DhcpOptionsId) - d.Set("instance_tenancy", vpc.InstanceTenancy) - d.Set("default", vpc.IsDefault) - d.Set("state", vpc.State) - d.Set("tags", tagsToMap(vpc.Tags)) - d.Set("owner_id", vpc.OwnerId) - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "ec2", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("vpc/%s", d.Id()), - }.String() - d.Set("arn", arn) - - cidrAssociations := []interface{}{} - for _, associationSet := range vpc.CidrBlockAssociationSet { - association := map[string]interface{}{ - "association_id": aws.StringValue(associationSet.AssociationId), - "cidr_block": aws.StringValue(associationSet.CidrBlock), - "state": aws.StringValue(associationSet.CidrBlockState.State), - } - cidrAssociations = append(cidrAssociations, association) - } - if err := d.Set("cidr_block_associations", cidrAssociations); err != nil { - return fmt.Errorf("error setting cidr_block_associations: %s", err) - } - - if vpc.Ipv6CidrBlockAssociationSet != nil { - d.Set("ipv6_association_id", vpc.Ipv6CidrBlockAssociationSet[0].AssociationId) - d.Set("ipv6_cidr_block", vpc.Ipv6CidrBlockAssociationSet[0].Ipv6CidrBlock) - } - - attResp, err := awsVpcDescribeVpcAttribute("enableDnsSupport", aws.StringValue(vpc.VpcId), conn) - if err != nil { - return err - } - d.Set("enable_dns_support", attResp.EnableDnsSupport.Value) - - attResp, err = awsVpcDescribeVpcAttribute("enableDnsHostnames", aws.StringValue(vpc.VpcId), conn) - if err != nil { - return err - } - d.Set("enable_dns_hostnames", attResp.EnableDnsHostnames.Value) - - routeTableId, err := resourceAwsVpcSetMainRouteTable(conn, aws.StringValue(vpc.VpcId)) - if err != nil { - log.Printf("[WARN] Unable to set Main Route Table: %s", err) - } - d.Set("main_route_table_id", routeTableId) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_dhcp_options.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_dhcp_options.go deleted file mode 100644 index f66f1d4ba..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_dhcp_options.go +++ /dev/null @@ -1,131 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsVpcDhcpOptions() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsVpcDhcpOptionsRead, - - Schema: map[string]*schema.Schema{ - "dhcp_options_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "domain_name": { - Type: schema.TypeString, - Computed: true, - }, - "domain_name_servers": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "filter": ec2CustomFiltersSchema(), - "netbios_name_servers": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "netbios_node_type": { - Type: schema.TypeString, - Computed: true, - }, - "ntp_servers": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "tags": tagsSchemaComputed(), - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceAwsVpcDhcpOptionsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.DescribeDhcpOptionsInput{} - - if v, ok := d.GetOk("dhcp_options_id"); ok && v.(string) != "" { - input.DhcpOptionsIds = []*string{aws.String(v.(string))} - } - - input.Filters = append(input.Filters, buildEC2CustomFilterList( - d.Get("filter").(*schema.Set), - )...) - if len(input.Filters) == 0 { - // Don't send an empty filters list; the EC2 API won't accept it. - input.Filters = nil - } - - log.Printf("[DEBUG] Reading EC2 DHCP Options: %s", input) - output, err := conn.DescribeDhcpOptions(input) - if err != nil { - if isNoSuchDhcpOptionIDErr(err) { - return errors.New("No matching EC2 DHCP Options found") - } - return fmt.Errorf("error reading EC2 DHCP Options: %s", err) - } - - if len(output.DhcpOptions) == 0 { - return errors.New("No matching EC2 DHCP Options found") - } - - if len(output.DhcpOptions) > 1 { - return errors.New("Multiple matching EC2 DHCP Options found") - } - - dhcpOptionID := aws.StringValue(output.DhcpOptions[0].DhcpOptionsId) - d.SetId(dhcpOptionID) - d.Set("dhcp_options_id", dhcpOptionID) - - dhcpConfigurations := output.DhcpOptions[0].DhcpConfigurations - - for _, dhcpConfiguration := range dhcpConfigurations { - key := aws.StringValue(dhcpConfiguration.Key) - tfKey := strings.Replace(key, "-", "_", -1) - - if len(dhcpConfiguration.Values) == 0 { - continue - } - - switch key { - case "domain-name": - d.Set(tfKey, aws.StringValue(dhcpConfiguration.Values[0].Value)) - case "domain-name-servers": - if err := d.Set(tfKey, flattenEc2AttributeValues(dhcpConfiguration.Values)); err != nil { - return fmt.Errorf("error setting %s: %s", tfKey, err) - } - case "netbios-name-servers": - if err := d.Set(tfKey, flattenEc2AttributeValues(dhcpConfiguration.Values)); err != nil { - return fmt.Errorf("error setting %s: %s", tfKey, err) - } - case "netbios-node-type": - d.Set(tfKey, aws.StringValue(dhcpConfiguration.Values[0].Value)) - case "ntp-servers": - if err := d.Set(tfKey, flattenEc2AttributeValues(dhcpConfiguration.Values)); err != nil { - return fmt.Errorf("error setting %s: %s", tfKey, err) - } - } - } - - if err := d.Set("tags", d.Set("tags", tagsToMap(output.DhcpOptions[0].Tags))); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - d.Set("owner_id", output.DhcpOptions[0].OwnerId) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint.go deleted file mode 100644 index 2669ceb8e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint.go +++ /dev/null @@ -1,139 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsVpcEndpoint() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsVpcEndpointRead, - - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "service_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "state": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "vpc_endpoint_type": { - Type: schema.TypeString, - Computed: true, - }, - "policy": { - Type: schema.TypeString, - Computed: true, - }, - "route_table_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "prefix_list_id": { - Type: schema.TypeString, - Computed: true, - }, - "cidr_blocks": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "subnet_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "network_interface_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "security_group_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "private_dns_enabled": { - Type: schema.TypeBool, - Computed: true, - }, - "dns_entry": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "dns_name": { - Type: schema.TypeString, - Computed: true, - }, - "hosted_zone_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - }, - } -} - -func dataSourceAwsVpcEndpointRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeVpcEndpointsInput{} - - if id, ok := d.GetOk("id"); ok { - req.VpcEndpointIds = aws.StringSlice([]string{id.(string)}) - } - - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "vpc-endpoint-state": d.Get("state").(string), - "vpc-id": d.Get("vpc_id").(string), - "service-name": d.Get("service_name").(string), - }, - ) - if len(req.Filters) == 0 { - // Don't send an empty filters list; the EC2 API won't accept it. - req.Filters = nil - } - - log.Printf("[DEBUG] Reading VPC Endpoint: %s", req) - resp, err := conn.DescribeVpcEndpoints(req) - if err != nil { - return err - } - if resp == nil || len(resp.VpcEndpoints) == 0 { - return fmt.Errorf("no matching VPC endpoint found") - } - if len(resp.VpcEndpoints) > 1 { - return fmt.Errorf("multiple VPC endpoints matched; use additional constraints to reduce matches to a single VPC endpoint") - } - - vpce := resp.VpcEndpoints[0] - d.SetId(aws.StringValue(vpce.VpcEndpointId)) - - return vpcEndpointAttributes(d, vpce, conn) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint_service.go deleted file mode 100644 index b4eaa5e7d..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint_service.go +++ /dev/null @@ -1,126 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsVpcEndpointService() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsVpcEndpointServiceRead, - - Schema: map[string]*schema.Schema{ - "service": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"service_name"}, - }, - "service_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ConflictsWith: []string{"service"}, - }, - "service_type": { - Type: schema.TypeString, - Computed: true, - }, - "owner": { - Type: schema.TypeString, - Computed: true, - }, - "vpc_endpoint_policy_supported": { - Type: schema.TypeBool, - Computed: true, - }, - "acceptance_required": { - Type: schema.TypeBool, - Computed: true, - }, - "availability_zones": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - Set: schema.HashString, - }, - "private_dns_name": { - Type: schema.TypeString, - Computed: true, - }, - "base_endpoint_dns_names": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - Set: schema.HashString, - }, - }, - } -} - -func dataSourceAwsVpcEndpointServiceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - var serviceName string - if v, ok := d.GetOk("service_name"); ok { - serviceName = v.(string) - } else if v, ok := d.GetOk("service"); ok { - serviceName = fmt.Sprintf("com.amazonaws.%s.%s", meta.(*AWSClient).region, v.(string)) - } else { - return fmt.Errorf( - "One of ['service', 'service_name'] must be set to query VPC Endpoint Services") - } - - req := &ec2.DescribeVpcEndpointServicesInput{ - ServiceNames: aws.StringSlice([]string{serviceName}), - } - - log.Printf("[DEBUG] Reading VPC Endpoint Services: %s", req) - resp, err := conn.DescribeVpcEndpointServices(req) - if err != nil { - return fmt.Errorf("Error fetching VPC Endpoint Services: %s", err) - } - - if resp == nil || (len(resp.ServiceNames) == 0 && len(resp.ServiceDetails) == 0) { - return fmt.Errorf("no matching VPC Endpoint Service found") - } - - // Note: AWS Commercial now returns a response with `ServiceNames` and - // `ServiceDetails`, but GovCloud responses only include `ServiceNames` - if len(resp.ServiceDetails) == 0 { - // GovCloud doesn't respect the filter. - names := aws.StringValueSlice(resp.ServiceNames) - for _, name := range names { - if name == serviceName { - d.SetId(strconv.Itoa(hashcode.String(name))) - d.Set("service_name", name) - return nil - } - } - - return fmt.Errorf("no matching VPC Endpoint Service found") - } - - if len(resp.ServiceDetails) > 1 { - return fmt.Errorf("multiple VPC Endpoint Services matched; use additional constraints to reduce matches to a single VPC Endpoint Service") - } - - sd := resp.ServiceDetails[0] - serviceName = aws.StringValue(sd.ServiceName) - d.SetId(strconv.Itoa(hashcode.String(serviceName))) - d.Set("service_name", serviceName) - d.Set("service_type", sd.ServiceType[0].ServiceType) - d.Set("owner", sd.Owner) - d.Set("vpc_endpoint_policy_supported", sd.VpcEndpointPolicySupported) - d.Set("acceptance_required", sd.AcceptanceRequired) - d.Set("availability_zones", flattenStringList(sd.AvailabilityZones)) - d.Set("private_dns_name", sd.PrivateDnsName) - d.Set("base_endpoint_dns_names", flattenStringList(sd.BaseEndpointDnsNames)) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_peering_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_peering_connection.go deleted file mode 100644 index b3f1cca8e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_peering_connection.go +++ /dev/null @@ -1,155 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsVpcPeeringConnection() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsVpcPeeringConnectionRead, - - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "owner_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "cidr_block": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "region": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "peer_vpc_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "peer_owner_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "peer_cidr_block": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "peer_region": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "accepter": { - Type: schema.TypeMap, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeBool}, - }, - "requester": { - Type: schema.TypeMap, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeBool}, - }, - "filter": ec2CustomFiltersSchema(), - "tags": tagsSchemaComputed(), - }, - } -} - -func dataSourceAwsVpcPeeringConnectionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[DEBUG] Reading VPC Peering Connections.") - - req := &ec2.DescribeVpcPeeringConnectionsInput{} - - if id, ok := d.GetOk("id"); ok { - req.VpcPeeringConnectionIds = aws.StringSlice([]string{id.(string)}) - } - - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "status-code": d.Get("status").(string), - "requester-vpc-info.vpc-id": d.Get("vpc_id").(string), - "requester-vpc-info.owner-id": d.Get("owner_id").(string), - "requester-vpc-info.cidr-block": d.Get("cidr_block").(string), - "accepter-vpc-info.vpc-id": d.Get("peer_vpc_id").(string), - "accepter-vpc-info.owner-id": d.Get("peer_owner_id").(string), - "accepter-vpc-info.cidr-block": d.Get("peer_cidr_block").(string), - }, - ) - req.Filters = append(req.Filters, buildEC2TagFilterList( - tagsFromMap(d.Get("tags").(map[string]interface{})), - )...) - req.Filters = append(req.Filters, buildEC2CustomFilterList( - d.Get("filter").(*schema.Set), - )...) - if len(req.Filters) == 0 { - // Don't send an empty filters list; the EC2 API won't accept it. - req.Filters = nil - } - - log.Printf("[DEBUG] Reading VPC Peering Connection: %s", req) - resp, err := conn.DescribeVpcPeeringConnections(req) - if err != nil { - return err - } - if resp == nil || len(resp.VpcPeeringConnections) == 0 { - return fmt.Errorf("no matching VPC peering connection found") - } - if len(resp.VpcPeeringConnections) > 1 { - return fmt.Errorf("multiple VPC peering connections matched; use additional constraints to reduce matches to a single VPC peering connection") - } - - pcx := resp.VpcPeeringConnections[0] - - d.SetId(aws.StringValue(pcx.VpcPeeringConnectionId)) - d.Set("status", pcx.Status.Code) - d.Set("vpc_id", pcx.RequesterVpcInfo.VpcId) - d.Set("owner_id", pcx.RequesterVpcInfo.OwnerId) - d.Set("cidr_block", pcx.RequesterVpcInfo.CidrBlock) - d.Set("region", pcx.RequesterVpcInfo.Region) - d.Set("peer_vpc_id", pcx.AccepterVpcInfo.VpcId) - d.Set("peer_owner_id", pcx.AccepterVpcInfo.OwnerId) - d.Set("peer_cidr_block", pcx.AccepterVpcInfo.CidrBlock) - d.Set("peer_region", pcx.AccepterVpcInfo.Region) - d.Set("tags", tagsToMap(pcx.Tags)) - - if pcx.AccepterVpcInfo.PeeringOptions != nil { - if err := d.Set("accepter", flattenVpcPeeringConnectionOptions(pcx.AccepterVpcInfo.PeeringOptions)[0]); err != nil { - return err - } - } - - if pcx.RequesterVpcInfo.PeeringOptions != nil { - if err := d.Set("requester", flattenVpcPeeringConnectionOptions(pcx.RequesterVpcInfo.PeeringOptions)[0]); err != nil { - return err - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpcs.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpcs.go deleted file mode 100644 index b51053d8c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpcs.go +++ /dev/null @@ -1,77 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsVpcs() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsVpcsRead, - Schema: map[string]*schema.Schema{ - "filter": ec2CustomFiltersSchema(), - - "tags": tagsSchemaComputed(), - - "ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - } -} - -func dataSourceAwsVpcsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - filters, filtersOk := d.GetOk("filter") - tags, tagsOk := d.GetOk("tags") - - req := &ec2.DescribeVpcsInput{} - - if tagsOk { - req.Filters = buildEC2TagFilterList( - tagsFromMap(tags.(map[string]interface{})), - ) - } - - if filtersOk { - req.Filters = append(req.Filters, buildEC2CustomFilterList( - filters.(*schema.Set), - )...) - } - if len(req.Filters) == 0 { - // Don't send an empty filters list; the EC2 API won't accept it. - req.Filters = nil - } - - log.Printf("[DEBUG] DescribeVpcs %s\n", req) - resp, err := conn.DescribeVpcs(req) - if err != nil { - return err - } - - if resp == nil || len(resp.Vpcs) == 0 { - return fmt.Errorf("no matching VPC found") - } - - vpcs := make([]string, 0) - - for _, vpc := range resp.Vpcs { - vpcs = append(vpcs, aws.StringValue(vpc.VpcId)) - } - - d.SetId(time.Now().UTC().String()) - if err := d.Set("ids", vpcs); err != nil { - return fmt.Errorf("Error setting vpc ids: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpn_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpn_gateway.go deleted file mode 100644 index 2d0fa3277..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpn_gateway.go +++ /dev/null @@ -1,118 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsVpnGateway() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsVpnGatewayRead, - - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "state": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "attached_vpc_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "availability_zone": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "amazon_side_asn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "filter": ec2CustomFiltersSchema(), - "tags": tagsSchemaComputed(), - }, - } -} - -func dataSourceAwsVpnGatewayRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeVpnGatewaysInput{} - - if id, ok := d.GetOk("id"); ok { - req.VpnGatewayIds = aws.StringSlice([]string{id.(string)}) - } - - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "state": d.Get("state").(string), - "availability-zone": d.Get("availability_zone").(string), - }, - ) - if asn, ok := d.GetOk("amazon_side_asn"); ok { - req.Filters = append(req.Filters, buildEC2AttributeFilterList( - map[string]string{ - "amazon-side-asn": asn.(string), - }, - )...) - } - if id, ok := d.GetOk("attached_vpc_id"); ok { - req.Filters = append(req.Filters, buildEC2AttributeFilterList( - map[string]string{ - "attachment.state": "attached", - "attachment.vpc-id": id.(string), - }, - )...) - } - req.Filters = append(req.Filters, buildEC2TagFilterList( - tagsFromMap(d.Get("tags").(map[string]interface{})), - )...) - req.Filters = append(req.Filters, buildEC2CustomFilterList( - d.Get("filter").(*schema.Set), - )...) - if len(req.Filters) == 0 { - // Don't send an empty filters list; the EC2 API won't accept it. - req.Filters = nil - } - - log.Printf("[DEBUG] Reading VPN Gateway: %s", req) - resp, err := conn.DescribeVpnGateways(req) - if err != nil { - return err - } - if resp == nil || len(resp.VpnGateways) == 0 { - return fmt.Errorf("no matching VPN gateway found: %#v", req) - } - if len(resp.VpnGateways) > 1 { - return fmt.Errorf("multiple VPN gateways matched; use additional constraints to reduce matches to a single VPN gateway") - } - - vgw := resp.VpnGateways[0] - - d.SetId(aws.StringValue(vgw.VpnGatewayId)) - d.Set("state", vgw.State) - d.Set("availability_zone", vgw.AvailabilityZone) - d.Set("amazon_side_asn", strconv.FormatInt(aws.Int64Value(vgw.AmazonSideAsn), 10)) - d.Set("tags", tagsToMap(vgw.Tags)) - - for _, attachment := range vgw.VpcAttachments { - if *attachment.State == "attached" { - d.Set("attached_vpc_id", attachment.VpcId) - break - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_workspaces_bundle.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_workspaces_bundle.go deleted file mode 100644 index 0da1e52a1..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_workspaces_bundle.go +++ /dev/null @@ -1,126 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/workspaces" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceAwsWorkspaceBundle() *schema.Resource { - return &schema.Resource{ - Read: dataSourceAwsWorkspaceBundleRead, - - Schema: map[string]*schema.Schema{ - "bundle_id": { - Type: schema.TypeString, - Required: true, - }, - "description": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Computed: true, - }, - "owner": { - Type: schema.TypeString, - Computed: true, - }, - "compute_type": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "user_storage": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "capacity": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "root_storage": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "capacity": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - }, - } -} - -func dataSourceAwsWorkspaceBundleRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).workspacesconn - - bundleID := d.Get("bundle_id").(string) - input := &workspaces.DescribeWorkspaceBundlesInput{ - BundleIds: []*string{aws.String(bundleID)}, - } - - resp, err := conn.DescribeWorkspaceBundles(input) - if err != nil { - return err - } - - if len(resp.Bundles) != 1 { - return fmt.Errorf("The number of Workspace Bundle (%s) should be 1, but %d", bundleID, len(resp.Bundles)) - } - - bundle := resp.Bundles[0] - d.SetId(bundleID) - d.Set("description", bundle.Description) - d.Set("name", bundle.Name) - d.Set("owner", bundle.Owner) - - computeType := make([]map[string]interface{}, 1) - if bundle.ComputeType != nil { - computeType[0] = map[string]interface{}{ - "name": aws.StringValue(bundle.ComputeType.Name), - } - } - if err := d.Set("compute_type", computeType); err != nil { - return fmt.Errorf("error setting compute_type: %s", err) - } - - rootStorage := make([]map[string]interface{}, 1) - if bundle.RootStorage != nil { - rootStorage[0] = map[string]interface{}{ - "capacity": aws.StringValue(bundle.RootStorage.Capacity), - } - } - if err := d.Set("root_storage", rootStorage); err != nil { - return fmt.Errorf("error setting root_storage: %s", err) - } - - userStorage := make([]map[string]interface{}, 1) - if bundle.UserStorage != nil { - userStorage[0] = map[string]interface{}{ - "capacity": aws.StringValue(bundle.UserStorage.Capacity), - } - } - if err := d.Set("user_storage", userStorage); err != nil { - return fmt.Errorf("error setting user_storage: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/datasync.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/datasync.go deleted file mode 100644 index 9626c4c91..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/datasync.go +++ /dev/null @@ -1,144 +0,0 @@ -package aws - -import ( - "net/url" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/datasync" - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSyncParseLocationURI(uri string) (string, error) { - parsedURL, err := url.ParseRequestURI(uri) - - if err != nil { - return "", err - } - - return parsedURL.Path, nil -} - -func expandDataSyncEc2Config(l []interface{}) *datasync.Ec2Config { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - ec2Config := &datasync.Ec2Config{ - SecurityGroupArns: expandStringSet(m["security_group_arns"].(*schema.Set)), - SubnetArn: aws.String(m["subnet_arn"].(string)), - } - - return ec2Config -} - -func expandDataSyncOnPremConfig(l []interface{}) *datasync.OnPremConfig { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - onPremConfig := &datasync.OnPremConfig{ - AgentArns: expandStringSet(m["agent_arns"].(*schema.Set)), - } - - return onPremConfig -} - -func expandDataSyncOptions(l []interface{}) *datasync.Options { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - options := &datasync.Options{ - Atime: aws.String(m["atime"].(string)), - Gid: aws.String(m["gid"].(string)), - Mtime: aws.String(m["mtime"].(string)), - PreserveDeletedFiles: aws.String(m["preserve_deleted_files"].(string)), - PreserveDevices: aws.String(m["preserve_devices"].(string)), - PosixPermissions: aws.String(m["posix_permissions"].(string)), - Uid: aws.String(m["uid"].(string)), - VerifyMode: aws.String(m["verify_mode"].(string)), - } - - if v, ok := m["bytes_per_second"]; ok && v.(int) > 0 { - options.BytesPerSecond = aws.Int64(int64(v.(int))) - } - - return options -} - -func expandDataSyncS3Config(l []interface{}) *datasync.S3Config { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - s3Config := &datasync.S3Config{ - BucketAccessRoleArn: aws.String(m["bucket_access_role_arn"].(string)), - } - - return s3Config -} - -func flattenDataSyncEc2Config(ec2Config *datasync.Ec2Config) []interface{} { - if ec2Config == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "security_group_arns": schema.NewSet(schema.HashString, flattenStringList(ec2Config.SecurityGroupArns)), - "subnet_arn": aws.StringValue(ec2Config.SubnetArn), - } - - return []interface{}{m} -} - -func flattenDataSyncOnPremConfig(onPremConfig *datasync.OnPremConfig) []interface{} { - if onPremConfig == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "agent_arns": schema.NewSet(schema.HashString, flattenStringList(onPremConfig.AgentArns)), - } - - return []interface{}{m} -} - -func flattenDataSyncOptions(options *datasync.Options) []interface{} { - if options == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "atime": aws.StringValue(options.Atime), - "bytes_per_second": aws.Int64Value(options.BytesPerSecond), - "gid": aws.StringValue(options.Gid), - "mtime": aws.StringValue(options.Mtime), - "posix_permissions": aws.StringValue(options.PosixPermissions), - "preserve_deleted_files": aws.StringValue(options.PreserveDeletedFiles), - "preserve_devices": aws.StringValue(options.PreserveDevices), - "uid": aws.StringValue(options.Uid), - "verify_mode": aws.StringValue(options.VerifyMode), - } - - return []interface{}{m} -} - -func flattenDataSyncS3Config(s3Config *datasync.S3Config) []interface{} { - if s3Config == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "bucket_access_role_arn": aws.StringValue(s3Config.BucketAccessRoleArn), - } - - return []interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/datasync_tags.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/datasync_tags.go deleted file mode 100644 index 037d29d6d..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/datasync_tags.go +++ /dev/null @@ -1,63 +0,0 @@ -package aws - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/datasync" -) - -// dataSyncTagsDiff 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 dataSyncTagsDiff(oldTags, newTags []*datasync.TagListEntry) ([]*datasync.TagListEntry, []*datasync.TagListEntry) { - // 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 []*datasync.TagListEntry - for _, t := range oldTags { - old, ok := create[aws.StringValue(t.Key)] - if !ok || old != aws.StringValue(t.Value) { - // Delete it! - remove = append(remove, t) - } - } - - return expandDataSyncTagListEntry(create), remove -} - -func dataSyncTagsKeys(tags []*datasync.TagListEntry) []*string { - keys := make([]*string, 0) - - for _, tag := range tags { - if tag == nil { - continue - } - keys = append(keys, tag.Key) - } - - return keys -} - -func expandDataSyncTagListEntry(m map[string]interface{}) []*datasync.TagListEntry { - result := []*datasync.TagListEntry{} - for k, v := range m { - result = append(result, &datasync.TagListEntry{ - Key: aws.String(k), - Value: aws.String(v.(string)), - }) - } - - return result -} - -func flattenDataSyncTagListEntry(ts []*datasync.TagListEntry) map[string]string { - result := map[string]string{} - for _, t := range ts { - result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) - } - - return result -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/diff_suppress_funcs.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/diff_suppress_funcs.go deleted file mode 100644 index b994d2a9a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/diff_suppress_funcs.go +++ /dev/null @@ -1,104 +0,0 @@ -package aws - -import ( - "bytes" - "encoding/json" - "log" - "net/url" - "strings" - - "github.com/hashicorp/terraform/helper/schema" - "github.com/jen20/awspolicyequivalence" -) - -func suppressEquivalentAwsPolicyDiffs(k, old, new string, d *schema.ResourceData) bool { - equivalent, err := awspolicy.PoliciesAreEquivalent(old, new) - if err != nil { - return false - } - - return equivalent -} - -// suppressEquivalentTypeStringBoolean provides custom difference suppression for TypeString booleans -// Some arguments require three values: true, false, and "" (unspecified), but -// confusing behavior exists when converting bare true/false values with state. -func suppressEquivalentTypeStringBoolean(k, old, new string, d *schema.ResourceData) bool { - if old == "false" && new == "0" { - return true - } - if old == "true" && new == "1" { - return true - } - return false -} - -// Suppresses minor version changes to the db_instance engine_version attribute -func suppressAwsDbEngineVersionDiffs(k, old, new string, d *schema.ResourceData) bool { - // First check if the old/new values are nil. - // If both are nil, we have no state to compare the values with, so register a diff. - // This populates the attribute field during a plan/apply with fresh state, allowing - // the attribute to still be used in future resources. - // See https://github.com/hashicorp/terraform/issues/11881 - if old == "" && new == "" { - return false - } - - if v, ok := d.GetOk("auto_minor_version_upgrade"); ok { - if v.(bool) { - // If we're set to auto upgrade minor versions - // ignore a minor version diff between versions - if strings.HasPrefix(old, new) { - log.Printf("[DEBUG] Ignoring minor version diff") - return true - } - } - } - - // Throw a diff by default - return false -} - -func suppressEquivalentJsonDiffs(k, old, new string, d *schema.ResourceData) bool { - ob := bytes.NewBufferString("") - if err := json.Compact(ob, []byte(old)); err != nil { - return false - } - - nb := bytes.NewBufferString("") - if err := json.Compact(nb, []byte(new)); err != nil { - return false - } - - return jsonBytesEqual(ob.Bytes(), nb.Bytes()) -} - -func suppressOpenIdURL(k, old, new string, d *schema.ResourceData) bool { - oldUrl, err := url.Parse(old) - if err != nil { - return false - } - - newUrl, err := url.Parse(new) - if err != nil { - return false - } - - oldUrl.Scheme = "https" - - return oldUrl.String() == newUrl.String() -} - -func suppressAutoscalingGroupAvailabilityZoneDiffs(k, old, new string, d *schema.ResourceData) bool { - // If VPC zone identifiers are provided then there is no need to explicitly - // specify availability zones. - if _, ok := d.GetOk("vpc_zone_identifier"); ok { - return true - } - - return false -} - -func suppressRoute53ZoneNameWithTrailingDot(k, old, new string, d *schema.ResourceData) bool { - return strings.TrimSuffix(old, ".") == strings.TrimSuffix(new, ".") -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/dx_vif.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/dx_vif.go deleted file mode 100644 index ebf0a54e0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/dx_vif.go +++ /dev/null @@ -1,132 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { - resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() - if err != nil { - return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err) - } - if state == directconnect.VirtualInterfaceStateDeleted { - return nil, nil - } - - return resp.(*directconnect.VirtualInterface), nil -} - -func dxVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - req := &directconnect.UpdateVirtualInterfaceAttributesInput{ - VirtualInterfaceId: aws.String(d.Id()), - } - - requestUpdate := false - if d.HasChange("mtu") { - req.Mtu = aws.Int64(int64(d.Get("mtu").(int))) - requestUpdate = true - } - - if requestUpdate { - log.Printf("[DEBUG] Modifying Direct Connect virtual interface attributes: %#v", req) - _, err := conn.UpdateVirtualInterfaceAttributes(req) - if err != nil { - return fmt.Errorf("Error modifying Direct Connect virtual interface (%s) attributes, error: %s", d.Id(), err) - } - } - - if err := setTagsDX(conn, d, d.Get("arn").(string)); err != nil { - return err - } - - return nil -} - -func dxVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - log.Printf("[DEBUG] Deleting Direct Connect virtual interface: %s", d.Id()) - _, err := conn.DeleteVirtualInterface(&directconnect.DeleteVirtualInterfaceInput{ - VirtualInterfaceId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, directconnect.ErrCodeClientException, "does not exist") { - return nil - } - return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err) - } - - deleteStateConf := &resource.StateChangeConf{ - Pending: []string{ - directconnect.VirtualInterfaceStateAvailable, - directconnect.VirtualInterfaceStateConfirming, - directconnect.VirtualInterfaceStateDeleting, - directconnect.VirtualInterfaceStateDown, - directconnect.VirtualInterfaceStatePending, - directconnect.VirtualInterfaceStateRejected, - directconnect.VirtualInterfaceStateVerifying, - }, - Target: []string{ - directconnect.VirtualInterfaceStateDeleted, - }, - Refresh: dxVirtualInterfaceStateRefresh(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutDelete), - Delay: 10 * time.Second, - MinTimeout: 5 * time.Second, - } - _, err = deleteStateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to be deleted: %s", d.Id(), err) - } - - return nil -} - -func dxVirtualInterfaceStateRefresh(conn *directconnect.DirectConnect, vifId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeVirtualInterfaces(&directconnect.DescribeVirtualInterfacesInput{ - VirtualInterfaceId: aws.String(vifId), - }) - if err != nil { - return nil, "", err - } - - n := len(resp.VirtualInterfaces) - switch n { - case 0: - return "", directconnect.VirtualInterfaceStateDeleted, nil - - case 1: - vif := resp.VirtualInterfaces[0] - return vif, aws.StringValue(vif.VirtualInterfaceState), nil - - default: - return nil, "", fmt.Errorf("Found %d Direct Connect virtual interfaces for %s, expected 1", n, vifId) - } - } -} - -func dxVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration, pending, target []string) error { - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: target, - Refresh: dxVirtualInterfaceStateRefresh(conn, vifId), - Timeout: timeout, - Delay: 10 * time.Second, - MinTimeout: 5 * time.Second, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to become available: %s", vifId, err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ec2_filters.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ec2_filters.go deleted file mode 100644 index 743d28224..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ec2_filters.go +++ /dev/null @@ -1,163 +0,0 @@ -package aws - -import ( - "fmt" - "sort" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - - "github.com/hashicorp/terraform/helper/schema" -) - -// buildEC2AttributeFilterList takes a flat map of scalar attributes (most -// likely values extracted from a *schema.ResourceData on an EC2-querying -// data source) and produces a []*ec2.Filter representing an exact match -// for each of the given non-empty attributes. -// -// The keys of the given attributes map are the attribute names expected -// by the EC2 API, which are usually either in camelcase or with dash-separated -// words. We conventionally map these to underscore-separated identifiers -// with the same words when presenting these as data source query attributes -// in Terraform. -// -// It's the callers responsibility to transform any non-string values into -// the appropriate string serialization required by the AWS API when -// encoding the given filter. Any attributes given with empty string values -// are ignored, assuming that the user wishes to leave that attribute -// unconstrained while filtering. -// -// The purpose of this function is to create values to pass in -// for the "Filters" attribute on most of the "Describe..." API functions in -// the EC2 API, to aid in the implementation of Terraform data sources that -// retrieve data about EC2 objects. -func buildEC2AttributeFilterList(attrs map[string]string) []*ec2.Filter { - var filters []*ec2.Filter - - // sort the filters by name to make the output deterministic - var names []string - for filterName := range attrs { - names = append(names, filterName) - } - - sort.Strings(names) - - for _, filterName := range names { - value := attrs[filterName] - if value == "" { - continue - } - - filters = append(filters, &ec2.Filter{ - Name: aws.String(filterName), - Values: []*string{aws.String(value)}, - }) - } - - return filters -} - -// buildEC2TagFilterList takes a []*ec2.Tag and produces a []*ec2.Filter that -// represents exact matches for all of the tag key/value pairs given in -// the tag set. -// -// The purpose of this function is to create values to pass in for -// the "Filters" attribute on most of the "Describe..." API functions -// in the EC2 API, to implement filtering by tag values e.g. in Terraform -// data sources that retrieve data about EC2 objects. -// -// It is conventional for an EC2 data source to include an attribute called -// "tags" which conforms to the schema returned by the tagsSchema() function. -// The value of this can then be converted to a tags slice using tagsFromMap, -// and the result finally passed in to this function. -// -// In Terraform configuration this would then look like this, to constrain -// results by name: -// -// tags { -// Name = "my-awesome-subnet" -// } -func buildEC2TagFilterList(tags []*ec2.Tag) []*ec2.Filter { - filters := make([]*ec2.Filter, len(tags)) - - for i, tag := range tags { - filters[i] = &ec2.Filter{ - Name: aws.String(fmt.Sprintf("tag:%s", *tag.Key)), - Values: []*string{tag.Value}, - } - } - - return filters -} - -// ec2CustomFiltersSchema returns a *schema.Schema that represents -// a set of custom filtering criteria that a user can specify as input -// to a data source that wraps one of the many "Describe..." API calls -// in the EC2 API. -// -// It is conventional for an attribute of this type to be included -// as a top-level attribute called "filter". This is the "catch all" for -// filter combinations that are not possible to express using scalar -// attributes or tags. In Terraform configuration, the custom filter blocks -// then look like this: -// -// filter { -// name = "availabilityZone" -// values = ["us-west-2a", "us-west-2b"] -// } -func ec2CustomFiltersSchema() *schema.Schema { - return &schema.Schema{ - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "values": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - }, - }, - } -} - -// buildEC2CustomFilterList takes the set value extracted from a schema -// attribute conforming to the schema returned by ec2CustomFiltersSchema, -// and transforms it into a []*ec2.Filter representing the same filter -// expressions which is ready to pass into the "Filters" attribute on most -// of the "Describe..." functions in the EC2 API. -// -// This function is intended only to be used in conjunction with -// ec2CustomFitlersSchema. See the docs on that function for more details -// on the configuration pattern this is intended to support. -func buildEC2CustomFilterList(filterSet *schema.Set) []*ec2.Filter { - if filterSet == nil { - return []*ec2.Filter{} - } - - customFilters := filterSet.List() - filters := make([]*ec2.Filter, len(customFilters)) - - for filterIdx, customFilterI := range customFilters { - customFilterMapI := customFilterI.(map[string]interface{}) - name := customFilterMapI["name"].(string) - valuesI := customFilterMapI["values"].(*schema.Set).List() - values := make([]*string, len(valuesI)) - for valueIdx, valueI := range valuesI { - values[valueIdx] = aws.String(valueI.(string)) - } - - filters[filterIdx] = &ec2.Filter{ - Name: &name, - Values: values, - } - } - - return filters -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ec2_transit_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ec2_transit_gateway.go deleted file mode 100644 index b3d363d1e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ec2_transit_gateway.go +++ /dev/null @@ -1,592 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" -) - -func decodeEc2TransitGatewayRouteID(id string) (string, string, error) { - parts := strings.Split(id, "_") - - if len(parts) != 2 { - return "", "", fmt.Errorf("Unexpected format of ID (%q), expected tgw-rtb-ID_DESTINATION", id) - } - - return parts[0], parts[1], nil -} - -func decodeEc2TransitGatewayRouteTableAssociationID(id string) (string, string, error) { - parts := strings.Split(id, "_") - - if len(parts) != 2 { - return "", "", fmt.Errorf("Unexpected format of ID (%q), expected tgw-rtb-ID_tgw-attach-ID", id) - } - - return parts[0], parts[1], nil -} - -func decodeEc2TransitGatewayRouteTablePropagationID(id string) (string, string, error) { - parts := strings.Split(id, "_") - - if len(parts) != 2 { - return "", "", fmt.Errorf("Unexpected format of ID (%q), expected tgw-rtb-ID_tgw-attach-ID", id) - } - - return parts[0], parts[1], nil -} - -func ec2DescribeTransitGateway(conn *ec2.EC2, transitGatewayID string) (*ec2.TransitGateway, error) { - input := &ec2.DescribeTransitGatewaysInput{ - TransitGatewayIds: []*string{aws.String(transitGatewayID)}, - } - - log.Printf("[DEBUG] Reading EC2 Transit Gateway (%s): %s", transitGatewayID, input) - for { - output, err := conn.DescribeTransitGateways(input) - - if err != nil { - return nil, err - } - - if output == nil || len(output.TransitGateways) == 0 { - return nil, nil - } - - for _, transitGateway := range output.TransitGateways { - if transitGateway == nil { - continue - } - - if aws.StringValue(transitGateway.TransitGatewayId) == transitGatewayID { - return transitGateway, nil - } - } - - if aws.StringValue(output.NextToken) == "" { - break - } - - input.NextToken = output.NextToken - } - - return nil, nil -} - -func ec2DescribeTransitGatewayRoute(conn *ec2.EC2, transitGatewayRouteTableID, destination string) (*ec2.TransitGatewayRoute, error) { - input := &ec2.SearchTransitGatewayRoutesInput{ - // As of the time of writing, the EC2 API reference documentation (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SearchTransitGatewayRoutes.html) - // incorrectly states which filter Names are allowed. The below are example errors: - // InvalidParameterValue: Value (transit-gateway-route-destination-cidr-block) for parameter Filters is invalid. - // InvalidParameterValue: Value (transit-gateway-route-type) for parameter Filters is invalid. - // InvalidParameterValue: Value (destination-cidr-block) for parameter Filters is invalid. - Filters: []*ec2.Filter{ - { - Name: aws.String("type"), - Values: []*string{aws.String("static")}, - }, - }, - TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), - } - - log.Printf("[DEBUG] Searching EC2 Transit Gateway Route Table (%s): %s", transitGatewayRouteTableID, input) - output, err := conn.SearchTransitGatewayRoutes(input) - - if err != nil { - return nil, err - } - - if output == nil || len(output.Routes) == 0 { - return nil, nil - } - - for _, route := range output.Routes { - if route == nil { - continue - } - - if aws.StringValue(route.DestinationCidrBlock) == destination { - return route, nil - } - } - - return nil, nil -} - -func ec2DescribeTransitGatewayRouteTable(conn *ec2.EC2, transitGatewayRouteTableID string) (*ec2.TransitGatewayRouteTable, error) { - input := &ec2.DescribeTransitGatewayRouteTablesInput{ - TransitGatewayRouteTableIds: []*string{aws.String(transitGatewayRouteTableID)}, - } - - log.Printf("[DEBUG] Reading EC2 Transit Gateway Route Table (%s): %s", transitGatewayRouteTableID, input) - for { - output, err := conn.DescribeTransitGatewayRouteTables(input) - - if err != nil { - return nil, err - } - - if output == nil || len(output.TransitGatewayRouteTables) == 0 { - return nil, nil - } - - for _, transitGatewayRouteTable := range output.TransitGatewayRouteTables { - if transitGatewayRouteTable == nil { - continue - } - - if aws.StringValue(transitGatewayRouteTable.TransitGatewayRouteTableId) == transitGatewayRouteTableID { - return transitGatewayRouteTable, nil - } - } - - if aws.StringValue(output.NextToken) == "" { - break - } - - input.NextToken = output.NextToken - } - - return nil, nil -} - -func ec2DescribeTransitGatewayRouteTableAssociation(conn *ec2.EC2, transitGatewayRouteTableID, transitGatewayAttachmentID string) (*ec2.TransitGatewayRouteTableAssociation, error) { - if transitGatewayRouteTableID == "" { - return nil, nil - } - - input := &ec2.GetTransitGatewayRouteTableAssociationsInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("transit-gateway-attachment-id"), - Values: []*string{aws.String(transitGatewayAttachmentID)}, - }, - }, - TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), - } - - output, err := conn.GetTransitGatewayRouteTableAssociations(input) - - if err != nil { - return nil, err - } - - if output == nil || len(output.Associations) == 0 { - return nil, nil - } - - return output.Associations[0], nil -} - -func ec2DescribeTransitGatewayRouteTablePropagation(conn *ec2.EC2, transitGatewayRouteTableID, transitGatewayAttachmentID string) (*ec2.TransitGatewayRouteTablePropagation, error) { - if transitGatewayRouteTableID == "" { - return nil, nil - } - - input := &ec2.GetTransitGatewayRouteTablePropagationsInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("transit-gateway-attachment-id"), - Values: []*string{aws.String(transitGatewayAttachmentID)}, - }, - }, - TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), - } - - output, err := conn.GetTransitGatewayRouteTablePropagations(input) - - if err != nil { - return nil, err - } - - if output == nil || len(output.TransitGatewayRouteTablePropagations) == 0 { - return nil, nil - } - - return output.TransitGatewayRouteTablePropagations[0], nil -} - -func ec2DescribeTransitGatewayVpcAttachment(conn *ec2.EC2, transitGatewayAttachmentID string) (*ec2.TransitGatewayVpcAttachment, error) { - input := &ec2.DescribeTransitGatewayVpcAttachmentsInput{ - TransitGatewayAttachmentIds: []*string{aws.String(transitGatewayAttachmentID)}, - } - - log.Printf("[DEBUG] Reading EC2 Transit Gateway VPC Attachment (%s): %s", transitGatewayAttachmentID, input) - for { - output, err := conn.DescribeTransitGatewayVpcAttachments(input) - - if err != nil { - return nil, err - } - - if output == nil || len(output.TransitGatewayVpcAttachments) == 0 { - return nil, nil - } - - for _, transitGatewayVpcAttachment := range output.TransitGatewayVpcAttachments { - if transitGatewayVpcAttachment == nil { - continue - } - - if aws.StringValue(transitGatewayVpcAttachment.TransitGatewayAttachmentId) == transitGatewayAttachmentID { - return transitGatewayVpcAttachment, nil - } - } - - if aws.StringValue(output.NextToken) == "" { - break - } - - input.NextToken = output.NextToken - } - - return nil, nil -} - -func ec2TransitGatewayRouteTableAssociationUpdate(conn *ec2.EC2, transitGatewayRouteTableID, transitGatewayAttachmentID string, associate bool) error { - transitGatewayAssociation, err := ec2DescribeTransitGatewayRouteTableAssociation(conn, transitGatewayRouteTableID, transitGatewayAttachmentID) - if err != nil { - return fmt.Errorf("error determining EC2 Transit Gateway Attachment Route Table (%s) association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) - } - - if associate && transitGatewayAssociation == nil { - input := &ec2.AssociateTransitGatewayRouteTableInput{ - TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), - TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), - } - - if _, err := conn.AssociateTransitGatewayRouteTable(input); err != nil { - return fmt.Errorf("error associating EC2 Transit Gateway Route Table (%s) association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) - } - - if err := waitForEc2TransitGatewayRouteTableAssociationCreation(conn, transitGatewayRouteTableID, transitGatewayAttachmentID); err != nil { - return fmt.Errorf("error waiting for EC2 Transit Gateway Route Table (%s) association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) - } - } else if !associate && transitGatewayAssociation != nil { - input := &ec2.DisassociateTransitGatewayRouteTableInput{ - TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), - TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), - } - - if _, err := conn.DisassociateTransitGatewayRouteTable(input); err != nil { - return fmt.Errorf("error disassociating EC2 Transit Gateway Route Table (%s) disassociation (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) - } - - if err := waitForEc2TransitGatewayRouteTableAssociationDeletion(conn, transitGatewayRouteTableID, transitGatewayAttachmentID); err != nil { - return fmt.Errorf("error waiting for EC2 Transit Gateway Route Table (%s) disassociation (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) - } - } - - return nil -} - -func ec2TransitGatewayRouteTablePropagationUpdate(conn *ec2.EC2, transitGatewayRouteTableID, transitGatewayAttachmentID string, enablePropagation bool) error { - transitGatewayRouteTablePropagation, err := ec2DescribeTransitGatewayRouteTablePropagation(conn, transitGatewayRouteTableID, transitGatewayAttachmentID) - if err != nil { - return fmt.Errorf("error determining EC2 Transit Gateway Attachment (%s) propagation to Route Table (%s): %s", transitGatewayAttachmentID, transitGatewayRouteTableID, err) - } - - if enablePropagation && transitGatewayRouteTablePropagation == nil { - input := &ec2.EnableTransitGatewayRouteTablePropagationInput{ - TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), - TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), - } - - if _, err := conn.EnableTransitGatewayRouteTablePropagation(input); err != nil { - return fmt.Errorf("error enabling EC2 Transit Gateway Attachment (%s) propagation to Route Table (%s): %s", transitGatewayAttachmentID, transitGatewayRouteTableID, err) - } - } else if !enablePropagation && transitGatewayRouteTablePropagation != nil { - input := &ec2.DisableTransitGatewayRouteTablePropagationInput{ - TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), - TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), - } - - if _, err := conn.DisableTransitGatewayRouteTablePropagation(input); err != nil { - return fmt.Errorf("error disabling EC2 Transit Gateway Attachment (%s) propagation to Route Table (%s): %s", transitGatewayAttachmentID, transitGatewayRouteTableID, err) - } - } - - return nil -} - -func ec2TransitGatewayRefreshFunc(conn *ec2.EC2, transitGatewayID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - transitGateway, err := ec2DescribeTransitGateway(conn, transitGatewayID) - - if isAWSErr(err, "InvalidTransitGatewayID.NotFound", "") { - return nil, ec2.TransitGatewayStateDeleted, nil - } - - if err != nil { - return nil, "", fmt.Errorf("error reading EC2 Transit Gateway (%s): %s", transitGatewayID, err) - } - - if transitGateway == nil { - return nil, ec2.TransitGatewayStateDeleted, nil - } - - return transitGateway, aws.StringValue(transitGateway.State), nil - } -} - -func ec2TransitGatewayRouteTableRefreshFunc(conn *ec2.EC2, transitGatewayRouteTableID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - transitGatewayRouteTable, err := ec2DescribeTransitGatewayRouteTable(conn, transitGatewayRouteTableID) - - if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { - return nil, ec2.TransitGatewayRouteTableStateDeleted, nil - } - - if err != nil { - return nil, "", fmt.Errorf("error reading EC2 Transit Gateway Route Table (%s): %s", transitGatewayRouteTableID, err) - } - - if transitGatewayRouteTable == nil { - return nil, ec2.TransitGatewayRouteTableStateDeleted, nil - } - - return transitGatewayRouteTable, aws.StringValue(transitGatewayRouteTable.State), nil - } -} - -func ec2TransitGatewayRouteTableAssociationRefreshFunc(conn *ec2.EC2, transitGatewayRouteTableID, transitGatewayAttachmentID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - transitGatewayAssociation, err := ec2DescribeTransitGatewayRouteTableAssociation(conn, transitGatewayRouteTableID, transitGatewayAttachmentID) - - if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { - return nil, ec2.TransitGatewayRouteTableStateDeleted, nil - } - - if err != nil { - return nil, "", fmt.Errorf("error reading EC2 Transit Gateway Route Table (%s) Association for (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) - } - - if transitGatewayAssociation == nil { - return nil, ec2.TransitGatewayRouteTableStateDeleted, nil - } - - return transitGatewayAssociation, aws.StringValue(transitGatewayAssociation.State), nil - } -} - -func ec2TransitGatewayVpcAttachmentRefreshFunc(conn *ec2.EC2, transitGatewayAttachmentID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - transitGatewayVpcAttachment, err := ec2DescribeTransitGatewayVpcAttachment(conn, transitGatewayAttachmentID) - - if isAWSErr(err, "InvalidTransitGatewayAttachmentID.NotFound", "") { - return nil, ec2.TransitGatewayAttachmentStateDeleted, nil - } - - if err != nil { - return nil, "", fmt.Errorf("error reading EC2 Transit Gateway VPC Attachment (%s): %s", transitGatewayAttachmentID, err) - } - - if transitGatewayVpcAttachment == nil { - return nil, ec2.TransitGatewayAttachmentStateDeleted, nil - } - - return transitGatewayVpcAttachment, aws.StringValue(transitGatewayVpcAttachment.State), nil - } -} - -func expandEc2TransitGatewayTagSpecifications(m map[string]interface{}) []*ec2.TagSpecification { - if len(m) == 0 { - return nil - } - - return []*ec2.TagSpecification{ - { - ResourceType: aws.String("transit-gateway"), - Tags: tagsFromMap(m), - }, - } -} - -func expandEc2TransitGatewayAttachmentTagSpecifications(m map[string]interface{}) []*ec2.TagSpecification { - if len(m) == 0 { - return nil - } - - return []*ec2.TagSpecification{ - { - ResourceType: aws.String("transit-gateway-attachment"), - Tags: tagsFromMap(m), - }, - } -} - -func expandEc2TransitGatewayRouteTableTagSpecifications(m map[string]interface{}) []*ec2.TagSpecification { - if len(m) == 0 { - return nil - } - - return []*ec2.TagSpecification{ - { - ResourceType: aws.String("transit-gateway-route-table"), - Tags: tagsFromMap(m), - }, - } -} - -func waitForEc2TransitGatewayCreation(conn *ec2.EC2, transitGatewayID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ec2.TransitGatewayStatePending}, - Target: []string{ec2.TransitGatewayStateAvailable}, - Refresh: ec2TransitGatewayRefreshFunc(conn, transitGatewayID), - Timeout: 10 * time.Minute, - } - - log.Printf("[DEBUG] Waiting for EC2 Transit Gateway (%s) availability", transitGatewayID) - _, err := stateConf.WaitForState() - - return err -} - -func waitForEc2TransitGatewayDeletion(conn *ec2.EC2, transitGatewayID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ - ec2.TransitGatewayStateAvailable, - ec2.TransitGatewayStateDeleting, - }, - Target: []string{ec2.TransitGatewayStateDeleted}, - Refresh: ec2TransitGatewayRefreshFunc(conn, transitGatewayID), - Timeout: 10 * time.Minute, - NotFoundChecks: 1, - } - - log.Printf("[DEBUG] Waiting for EC2 Transit Gateway (%s) deletion", transitGatewayID) - _, err := stateConf.WaitForState() - - if isResourceNotFoundError(err) { - return nil - } - - return err -} - -func waitForEc2TransitGatewayRouteTableCreation(conn *ec2.EC2, transitGatewayRouteTableID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ec2.TransitGatewayRouteTableStatePending}, - Target: []string{ec2.TransitGatewayRouteTableStateAvailable}, - Refresh: ec2TransitGatewayRouteTableRefreshFunc(conn, transitGatewayRouteTableID), - Timeout: 10 * time.Minute, - } - - log.Printf("[DEBUG] Waiting for EC2 Transit Gateway Route Table (%s) availability", transitGatewayRouteTableID) - _, err := stateConf.WaitForState() - - return err -} - -func waitForEc2TransitGatewayRouteTableDeletion(conn *ec2.EC2, transitGatewayRouteTableID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ - ec2.TransitGatewayRouteTableStateAvailable, - ec2.TransitGatewayRouteTableStateDeleting, - }, - Target: []string{ec2.TransitGatewayRouteTableStateDeleted}, - Refresh: ec2TransitGatewayRouteTableRefreshFunc(conn, transitGatewayRouteTableID), - Timeout: 10 * time.Minute, - NotFoundChecks: 1, - } - - log.Printf("[DEBUG] Waiting for EC2 Transit Gateway Route Table (%s) deletion", transitGatewayRouteTableID) - _, err := stateConf.WaitForState() - - if isResourceNotFoundError(err) { - return nil - } - - return err -} - -func waitForEc2TransitGatewayRouteTableAssociationCreation(conn *ec2.EC2, transitGatewayRouteTableID, transitGatewayAttachmentID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ec2.TransitGatewayAssociationStateAssociating}, - Target: []string{ec2.TransitGatewayAssociationStateAssociated}, - Refresh: ec2TransitGatewayRouteTableAssociationRefreshFunc(conn, transitGatewayRouteTableID, transitGatewayAttachmentID), - Timeout: 5 * time.Minute, - } - - log.Printf("[DEBUG] Waiting for EC2 Transit Gateway Route Table (%s) association: %s", transitGatewayRouteTableID, transitGatewayAttachmentID) - _, err := stateConf.WaitForState() - - return err -} - -func waitForEc2TransitGatewayRouteTableAssociationDeletion(conn *ec2.EC2, transitGatewayRouteTableID, transitGatewayAttachmentID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ - ec2.TransitGatewayAssociationStateAssociated, - ec2.TransitGatewayAssociationStateDisassociating, - }, - Target: []string{""}, - Refresh: ec2TransitGatewayRouteTableAssociationRefreshFunc(conn, transitGatewayRouteTableID, transitGatewayAttachmentID), - Timeout: 5 * time.Minute, - NotFoundChecks: 1, - } - - log.Printf("[DEBUG] Waiting for EC2 Transit Gateway Route Table (%s) disassociation: %s", transitGatewayRouteTableID, transitGatewayAttachmentID) - _, err := stateConf.WaitForState() - - if isResourceNotFoundError(err) { - return nil - } - - return err -} - -func waitForEc2TransitGatewayRouteTableAttachmentCreation(conn *ec2.EC2, transitGatewayAttachmentID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ec2.TransitGatewayAttachmentStatePending}, - Target: []string{ec2.TransitGatewayAttachmentStateAvailable}, - Refresh: ec2TransitGatewayVpcAttachmentRefreshFunc(conn, transitGatewayAttachmentID), - Timeout: 10 * time.Minute, - } - - log.Printf("[DEBUG] Waiting for EC2 Transit Gateway VPC Attachment (%s) availability", transitGatewayAttachmentID) - _, err := stateConf.WaitForState() - - return err -} - -func waitForEc2TransitGatewayRouteTableAttachmentDeletion(conn *ec2.EC2, transitGatewayAttachmentID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ - ec2.TransitGatewayAttachmentStateAvailable, - ec2.TransitGatewayAttachmentStateDeleting, - }, - Target: []string{ec2.TransitGatewayAttachmentStateDeleted}, - Refresh: ec2TransitGatewayVpcAttachmentRefreshFunc(conn, transitGatewayAttachmentID), - Timeout: 10 * time.Minute, - NotFoundChecks: 1, - } - - log.Printf("[DEBUG] Waiting for EC2 Transit Gateway VPC Attachment (%s) deletion", transitGatewayAttachmentID) - _, err := stateConf.WaitForState() - - if isResourceNotFoundError(err) { - return nil - } - - return err -} - -func waitForEc2TransitGatewayRouteTableAttachmentUpdate(conn *ec2.EC2, transitGatewayAttachmentID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ec2.TransitGatewayAttachmentStateModifying}, - Target: []string{ec2.TransitGatewayAttachmentStateAvailable}, - Refresh: ec2TransitGatewayVpcAttachmentRefreshFunc(conn, transitGatewayAttachmentID), - Timeout: 10 * time.Minute, - } - - log.Printf("[DEBUG] Waiting for EC2 Transit Gateway VPC Attachment (%s) availability", transitGatewayAttachmentID) - _, err := stateConf.WaitForState() - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go deleted file mode 100644 index c67707dfc..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go +++ /dev/null @@ -1,105 +0,0 @@ -package aws - -import ( - "bytes" - "encoding/json" - "log" - "reflect" - "sort" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" - "github.com/aws/aws-sdk-go/service/ecs" - "github.com/mitchellh/copystructure" -) - -// EcsContainerDefinitionsAreEquivalent determines equality between two ECS container definition JSON strings -// Note: This function will be moved out of the aws package in the future. -func EcsContainerDefinitionsAreEquivalent(def1, def2 string, isAWSVPC bool) (bool, error) { - var obj1 containerDefinitions - err := json.Unmarshal([]byte(def1), &obj1) - if err != nil { - return false, err - } - err = obj1.Reduce(isAWSVPC) - if err != nil { - return false, err - } - canonicalJson1, err := jsonutil.BuildJSON(obj1) - if err != nil { - return false, err - } - - var obj2 containerDefinitions - err = json.Unmarshal([]byte(def2), &obj2) - if err != nil { - return false, err - } - err = obj2.Reduce(isAWSVPC) - if err != nil { - return false, err - } - - canonicalJson2, err := jsonutil.BuildJSON(obj2) - if err != nil { - return false, err - } - - equal := bytes.Equal(canonicalJson1, canonicalJson2) - if !equal { - log.Printf("[DEBUG] Canonical definitions are not equal.\nFirst: %s\nSecond: %s\n", - canonicalJson1, canonicalJson2) - } - return equal, nil -} - -type containerDefinitions []*ecs.ContainerDefinition - -func (cd containerDefinitions) Reduce(isAWSVPC bool) error { - for i, def := range cd { - // Deal with special fields which have defaults - if def.Cpu != nil && *def.Cpu == 0 { - def.Cpu = nil - } - if def.Essential == nil { - def.Essential = aws.Bool(true) - } - for j, pm := range def.PortMappings { - if pm.Protocol != nil && *pm.Protocol == "tcp" { - cd[i].PortMappings[j].Protocol = nil - } - if pm.HostPort != nil && *pm.HostPort == 0 { - cd[i].PortMappings[j].HostPort = nil - } - if isAWSVPC && cd[i].PortMappings[j].HostPort == nil { - cd[i].PortMappings[j].HostPort = cd[i].PortMappings[j].ContainerPort - } - } - - // Deal with fields which may be re-ordered in the API - sort.Slice(def.Environment, func(i, j int) bool { - return *def.Environment[i].Name < *def.Environment[j].Name - }) - - // Create a mutable copy - defCopy, err := copystructure.Copy(def) - if err != nil { - return err - } - - definition := reflect.ValueOf(defCopy).Elem() - for i := 0; i < definition.NumField(); i++ { - sf := definition.Field(i) - - // Set all empty slices to nil - if sf.Kind() == reflect.Slice { - if sf.IsValid() && !sf.IsNil() && sf.Len() == 0 { - sf.Set(reflect.Zero(sf.Type())) - } - } - } - iface := definition.Interface().(ecs.ContainerDefinition) - cd[i] = &iface - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/hosted_zones.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/hosted_zones.go deleted file mode 100644 index 9274c1af3..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/hosted_zones.go +++ /dev/null @@ -1,37 +0,0 @@ -package aws - -import "fmt" - -// This list is copied from -// http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints -// It currently cannot be generated from the API json. -var hostedZoneIDsMap = map[string]string{ - "ap-northeast-1": "Z2M4EHUR26P7ZW", - "ap-northeast-2": "Z3W03O7B5YMIYP", - "ap-northeast-3": "Z2YQB5RD63NC85", - "ap-south-1": "Z11RGJOFQNVJUP", - "ap-southeast-1": "Z3O0J2DXBE1FTB", - "ap-southeast-2": "Z1WCIGYICN2BYD", - "ca-central-1": "Z1QDHH18159H29", - "eu-central-1": "Z21DNDUVLTQW6Q", - "eu-north-1": "Z3BAZG2TWCNX0D", - "eu-west-1": "Z1BKCTXD74EZPE", - "eu-west-2": "Z3GKZC51ZF0DB4", - "eu-west-3": "Z3R1K369G5AVDG", - "sa-east-1": "Z7KQH4QJS55SO", - "us-east-1": "Z3AQBSTGFYJSTF", - "us-east-2": "Z2O1EMRO9K5GLX", - "us-gov-east-1": "Z31GFT0UA1I2HV", - "us-gov-west-1": "Z31GFT0UA1I2HV", - "us-west-1": "Z2F56UZL2M1ACD", - "us-west-2": "Z3BJ6K6RIION7M", -} - -// Returns the hosted zone ID for an S3 website endpoint region. This can be -// used as input to the aws_route53_record resource's zone_id argument. -func HostedZoneIDForRegion(region string) (string, error) { - if v, ok := hostedZoneIDsMap[region]; ok { - return v, nil - } - return "", fmt.Errorf("S3 hosted zone ID not found for region: %s", region) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/iam_policy_model.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/iam_policy_model.go deleted file mode 100644 index 4bb627955..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/iam_policy_model.go +++ /dev/null @@ -1,207 +0,0 @@ -package aws - -import ( - "encoding/json" - "fmt" - "sort" -) - -type IAMPolicyDoc struct { - Version string `json:",omitempty"` - Id string `json:",omitempty"` - Statements []*IAMPolicyStatement `json:"Statement"` -} - -type IAMPolicyStatement struct { - Sid string - Effect string `json:",omitempty"` - Actions interface{} `json:"Action,omitempty"` - NotActions interface{} `json:"NotAction,omitempty"` - Resources interface{} `json:"Resource,omitempty"` - NotResources interface{} `json:"NotResource,omitempty"` - Principals IAMPolicyStatementPrincipalSet `json:"Principal,omitempty"` - NotPrincipals IAMPolicyStatementPrincipalSet `json:"NotPrincipal,omitempty"` - Conditions IAMPolicyStatementConditionSet `json:"Condition,omitempty"` -} - -type IAMPolicyStatementPrincipal struct { - Type string - Identifiers interface{} -} - -type IAMPolicyStatementCondition struct { - Test string - Variable string - Values interface{} -} - -type IAMPolicyStatementPrincipalSet []IAMPolicyStatementPrincipal -type IAMPolicyStatementConditionSet []IAMPolicyStatementCondition - -func (s *IAMPolicyDoc) Merge(newDoc *IAMPolicyDoc) { - // adopt newDoc's Id - if len(newDoc.Id) > 0 { - s.Id = newDoc.Id - } - - // let newDoc upgrade our Version - if newDoc.Version > s.Version { - s.Version = newDoc.Version - } - - // merge in newDoc's statements, overwriting any existing Sids - var seen bool - for _, newStatement := range newDoc.Statements { - if len(newStatement.Sid) == 0 { - s.Statements = append(s.Statements, newStatement) - continue - } - seen = false - for i, existingStatement := range s.Statements { - if existingStatement.Sid == newStatement.Sid { - s.Statements[i] = newStatement - seen = true - break - } - } - if !seen { - s.Statements = append(s.Statements, newStatement) - } - } -} - -func (ps IAMPolicyStatementPrincipalSet) MarshalJSON() ([]byte, error) { - raw := map[string]interface{}{} - - // Although IAM documentation says, that "*" and {"AWS": "*"} are equivalent - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html), - // in practice they are not for IAM roles. IAM will return an error if trust - // policy have "*" or {"*": "*"} as principal, but will accept {"AWS": "*"}. - // Only {"*": "*"} should be normalized to "*". - if len(ps) == 1 { - p := ps[0] - if p.Type == "*" { - if sv, ok := p.Identifiers.(string); ok && sv == "*" { - return []byte(`"*"`), nil - } - - if av, ok := p.Identifiers.([]string); ok && len(av) == 1 && av[0] == "*" { - return []byte(`"*"`), nil - } - } - } - - for _, p := range ps { - switch i := p.Identifiers.(type) { - case []string: - if _, ok := raw[p.Type]; !ok { - raw[p.Type] = make([]string, 0, len(i)) - } - sort.Sort(sort.Reverse(sort.StringSlice(i))) - raw[p.Type] = append(raw[p.Type].([]string), i...) - case string: - raw[p.Type] = i - default: - return []byte{}, fmt.Errorf("Unsupported data type %T for IAMPolicyStatementPrincipalSet", i) - } - } - - return json.Marshal(&raw) -} - -func (ps *IAMPolicyStatementPrincipalSet) UnmarshalJSON(b []byte) error { - var out IAMPolicyStatementPrincipalSet - - var data interface{} - if err := json.Unmarshal(b, &data); err != nil { - return err - } - - switch t := data.(type) { - case string: - out = append(out, IAMPolicyStatementPrincipal{Type: "*", Identifiers: []string{"*"}}) - case map[string]interface{}: - for key, value := range data.(map[string]interface{}) { - switch vt := value.(type) { - case string: - out = append(out, IAMPolicyStatementPrincipal{Type: key, Identifiers: value.(string)}) - case []interface{}: - values := []string{} - for _, v := range value.([]interface{}) { - values = append(values, v.(string)) - } - out = append(out, IAMPolicyStatementPrincipal{Type: key, Identifiers: values}) - default: - return fmt.Errorf("Unsupported data type %T for IAMPolicyStatementPrincipalSet.Identifiers", vt) - } - } - default: - return fmt.Errorf("Unsupported data type %T for IAMPolicyStatementPrincipalSet", t) - } - - *ps = out - return nil -} - -func (cs IAMPolicyStatementConditionSet) MarshalJSON() ([]byte, error) { - raw := map[string]map[string]interface{}{} - - for _, c := range cs { - if _, ok := raw[c.Test]; !ok { - raw[c.Test] = map[string]interface{}{} - } - switch i := c.Values.(type) { - case []string: - if _, ok := raw[c.Test][c.Variable]; !ok { - raw[c.Test][c.Variable] = make([]string, 0, len(i)) - } - sort.Sort(sort.Reverse(sort.StringSlice(i))) - raw[c.Test][c.Variable] = append(raw[c.Test][c.Variable].([]string), i...) - case string: - raw[c.Test][c.Variable] = i - default: - panic("Unsupported data type for IAMPolicyStatementConditionSet") - } - } - - return json.Marshal(&raw) -} - -func (cs *IAMPolicyStatementConditionSet) UnmarshalJSON(b []byte) error { - var out IAMPolicyStatementConditionSet - - var data map[string]map[string]interface{} - if err := json.Unmarshal(b, &data); err != nil { - return err - } - - for test_key, test_value := range data { - for var_key, var_values := range test_value { - switch var_values.(type) { - case string: - out = append(out, IAMPolicyStatementCondition{Test: test_key, Variable: var_key, Values: []string{var_values.(string)}}) - case []interface{}: - values := []string{} - for _, v := range var_values.([]interface{}) { - values = append(values, v.(string)) - } - out = append(out, IAMPolicyStatementCondition{Test: test_key, Variable: var_key, Values: values}) - } - } - } - - *cs = out - return nil -} - -func iamPolicyDecodeConfigStringList(lI []interface{}) interface{} { - if len(lI) == 1 { - return lI[0].(string) - } - ret := make([]string, len(lI)) - for i, vI := range lI { - ret[i] = vI.(string) - } - sort.Sort(sort.Reverse(sort.StringSlice(ret))) - return ret -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_cloudfront_distribution.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_cloudfront_distribution.go deleted file mode 100644 index acfc836dc..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_cloudfront_distribution.go +++ /dev/null @@ -1,32 +0,0 @@ -package aws - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudfront" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsCloudFrontDistributionImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - // This is a non API attribute - // We are merely setting this to the same value as the Default setting in the schema - d.Set("retain_on_delete", false) - - conn := meta.(*AWSClient).cloudfrontconn - id := d.Id() - resp, err := conn.GetDistributionConfig(&cloudfront.GetDistributionConfigInput{ - Id: aws.String(id), - }) - - if err != nil { - return nil, err - } - - distConfig := resp.DistributionConfig - results := make([]*schema.ResourceData, 1) - err = flattenDistributionConfig(d, distConfig) - if err != nil { - return nil, err - } - results[0] = d - return results, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_db_event_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_db_event_subscription.go deleted file mode 100644 index 40b1d26f0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_db_event_subscription.go +++ /dev/null @@ -1,17 +0,0 @@ -package aws - -import "github.com/hashicorp/terraform/helper/schema" - -func resourceAwsDbEventSubscriptionImport( - d *schema.ResourceData, - meta interface{}) ([]*schema.ResourceData, error) { - - // The db event subscription Read function only needs the "name" of the event subscription - // in order to populate the necessary values. This takes the "id" from the supplied StateFunc - // and sets it as the "name" attribute, as described in the import documentation. This allows - // the Read function to actually succeed and set the ID of the resource - results := make([]*schema.ResourceData, 1) - d.Set("name", d.Id()) - results[0] = d - return results, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_dx_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_dx_gateway.go deleted file mode 100644 index 067e704e2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_dx_gateway.go +++ /dev/null @@ -1,48 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/schema" -) - -// Direct Connect Gateway import also imports all assocations -func resourceAwsDxGatewayImportState(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - conn := meta.(*AWSClient).dxconn - - id := d.Id() - resp, err := conn.DescribeDirectConnectGateways(&directconnect.DescribeDirectConnectGatewaysInput{ - DirectConnectGatewayId: aws.String(id), - }) - if err != nil { - return nil, err - } - if len(resp.DirectConnectGateways) < 1 || resp.DirectConnectGateways[0] == nil { - return nil, fmt.Errorf("Direct Connect Gateway %s was not found", id) - } - results := make([]*schema.ResourceData, 1) - results[0] = d - - { - subResource := resourceAwsDxGatewayAssociation() - resp, err := conn.DescribeDirectConnectGatewayAssociations(&directconnect.DescribeDirectConnectGatewayAssociationsInput{ - DirectConnectGatewayId: aws.String(id), - }) - if err != nil { - return nil, err - } - - for _, assoc := range resp.DirectConnectGatewayAssociations { - d := subResource.Data(nil) - d.SetType("aws_dx_gateway_association") - d.Set("dx_gateway_id", assoc.DirectConnectGatewayId) - d.Set("vpn_gateway_id", assoc.VirtualGatewayId) - d.SetId(dxGatewayAssociationId(aws.StringValue(assoc.DirectConnectGatewayId), aws.StringValue(assoc.VirtualGatewayId))) - results = append(results, d) - } - } - - return results, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_network_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_network_acl.go deleted file mode 100644 index bcc221d0e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_network_acl.go +++ /dev/null @@ -1,95 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -// Network ACLs import their rules and associations -func resourceAwsNetworkAclImportState( - d *schema.ResourceData, - meta interface{}) ([]*schema.ResourceData, error) { - conn := meta.(*AWSClient).ec2conn - - // First query the resource itself - resp, err := conn.DescribeNetworkAcls(&ec2.DescribeNetworkAclsInput{ - NetworkAclIds: []*string{aws.String(d.Id())}, - }) - if err != nil { - return nil, err - } - if resp == nil || len(resp.NetworkAcls) < 1 || resp.NetworkAcls[0] == nil { - return nil, fmt.Errorf("network ACL %s is not found", d.Id()) - } - acl := resp.NetworkAcls[0] - - // Start building our results - results := make([]*schema.ResourceData, 1, - 2+len(acl.Associations)+len(acl.Entries)) - results[0] = d - - /* - { - // Construct the entries - subResource := resourceAwsNetworkAclRule() - for _, entry := range acl.Entries { - // Minimal data for route - d := subResource.Data(nil) - d.SetType("aws_network_acl_rule") - d.Set("network_acl_id", acl.NetworkAclId) - d.Set("rule_number", entry.RuleNumber) - d.Set("egress", entry.Egress) - d.Set("protocol", entry.Protocol) - d.SetId(networkAclIdRuleNumberEgressHash( - d.Get("network_acl_id").(string), - d.Get("rule_number").(int), - d.Get("egress").(bool), - d.Get("protocol").(string))) - results = append(results, d) - } - } - - { - // Construct the associations - subResource := resourceAwsRouteTableAssociation() - for _, assoc := range table.Associations { - if *assoc.Main { - // Ignore - continue - } - - // Minimal data for route - d := subResource.Data(nil) - d.SetType("aws_route_table_association") - d.Set("route_table_id", assoc.RouteTableId) - d.SetId(*assoc.RouteTableAssociationId) - results = append(results, d) - } - } - - { - // Construct the main associations. We could do this above but - // I keep this as a separate section since it is a separate resource. - subResource := resourceAwsMainRouteTableAssociation() - for _, assoc := range table.Associations { - if !*assoc.Main { - // Ignore - continue - } - - // Minimal data for route - d := subResource.Data(nil) - d.SetType("aws_main_route_table_association") - d.Set("route_table_id", id) - d.Set("vpc_id", table.VpcId) - d.SetId(*assoc.RouteTableAssociationId) - results = append(results, d) - } - } - */ - - return results, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_route_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_route_table.go deleted file mode 100644 index 6934245a2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_route_table.go +++ /dev/null @@ -1,107 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -// Route table import also imports all the rules -func resourceAwsRouteTableImportState( - d *schema.ResourceData, - meta interface{}) ([]*schema.ResourceData, error) { - conn := meta.(*AWSClient).ec2conn - - // First query the resource itself - id := d.Id() - resp, err := conn.DescribeRouteTables(&ec2.DescribeRouteTablesInput{ - RouteTableIds: []*string{&id}, - }) - if err != nil { - return nil, err - } - if len(resp.RouteTables) < 1 || resp.RouteTables[0] == nil { - return nil, fmt.Errorf("route table %s is not found", id) - } - table := resp.RouteTables[0] - - // Start building our results - results := make([]*schema.ResourceData, 1, - 2+len(table.Associations)+len(table.Routes)) - results[0] = d - log.Print("[WARN] RouteTable imports will be handled differently in a future version.") - log.Printf("[WARN] This import will create %d resources (aws_route_table, aws_route, aws_route_table_association).", len(results)) - log.Print("[WARN] In the future, only 1 aws_route_table resource will be created with inline routes.") - - { - // Construct the routes - subResource := resourceAwsRoute() - for _, route := range table.Routes { - // Ignore the local/default route - if route.GatewayId != nil && *route.GatewayId == "local" { - continue - } - - if route.Origin != nil && *route.Origin == "EnableVgwRoutePropagation" { - continue - } - - if route.DestinationPrefixListId != nil { - // Skipping because VPC endpoint routes are handled separately - // See aws_vpc_endpoint - continue - } - - // Minimal data for route - d := subResource.Data(nil) - d.SetType("aws_route") - d.Set("route_table_id", id) - d.Set("destination_cidr_block", route.DestinationCidrBlock) - d.Set("destination_ipv6_cidr_block", route.DestinationIpv6CidrBlock) - d.SetId(resourceAwsRouteID(d, route)) - results = append(results, d) - } - } - - { - // Construct the associations - subResource := resourceAwsRouteTableAssociation() - for _, assoc := range table.Associations { - if *assoc.Main { - // Ignore - continue - } - - // Minimal data for route - d := subResource.Data(nil) - d.SetType("aws_route_table_association") - d.Set("route_table_id", assoc.RouteTableId) - d.SetId(*assoc.RouteTableAssociationId) - results = append(results, d) - } - } - - { - // Construct the main associations. We could do this above but - // I keep this as a separate section since it is a separate resource. - subResource := resourceAwsMainRouteTableAssociation() - for _, assoc := range table.Associations { - if !*assoc.Main { - // Ignore - continue - } - - // Minimal data for route - d := subResource.Data(nil) - d.SetType("aws_main_route_table_association") - d.Set("route_table_id", id) - d.Set("vpc_id", table.VpcId) - d.SetId(*assoc.RouteTableAssociationId) - results = append(results, d) - } - } - - return results, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_s3_bucket.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_s3_bucket.go deleted file mode 100644 index 44262623e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_s3_bucket.go +++ /dev/null @@ -1,40 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsS3BucketImportState( - d *schema.ResourceData, - meta interface{}) ([]*schema.ResourceData, error) { - - results := make([]*schema.ResourceData, 1) - results[0] = d - - conn := meta.(*AWSClient).s3conn - pol, err := conn.GetBucketPolicy(&s3.GetBucketPolicyInput{ - Bucket: aws.String(d.Id()), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoSuchBucketPolicy" { - // Bucket without policy - return results, nil - } - return nil, fmt.Errorf("Error importing AWS S3 bucket policy: %s", err) - } - - policy := resourceAwsS3BucketPolicy() - pData := policy.Data(nil) - pData.SetId(d.Id()) - pData.SetType("aws_s3_bucket_policy") - pData.Set("bucket", d.Id()) - pData.Set("policy", pol) - results = append(results, pData) - - return results, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_security_group.go deleted file mode 100644 index bbae893d6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_security_group.go +++ /dev/null @@ -1,185 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -// Security group import fans out to multiple resources due to the -// security group rules. Instead of creating one resource with nested -// rules, we use the best practices approach of one resource per rule. -func resourceAwsSecurityGroupImportState( - d *schema.ResourceData, - meta interface{}) ([]*schema.ResourceData, error) { - conn := meta.(*AWSClient).ec2conn - - // First query the security group - sgRaw, _, err := SGStateRefreshFunc(conn, d.Id())() - if err != nil { - return nil, err - } - if sgRaw == nil { - return nil, fmt.Errorf("security group not found") - } - sg := sgRaw.(*ec2.SecurityGroup) - - // Start building our results - results := make([]*schema.ResourceData, 1, - 1+len(sg.IpPermissions)+len(sg.IpPermissionsEgress)) - results[0] = d - - // Construct the rules - permMap := map[string][]*ec2.IpPermission{ - "ingress": sg.IpPermissions, - "egress": sg.IpPermissionsEgress, - } - for ruleType, perms := range permMap { - for _, perm := range perms { - ds, err := resourceAwsSecurityGroupImportStatePerm(sg, ruleType, perm) - if err != nil { - return nil, err - } - results = append(results, ds...) - } - } - - return results, nil -} - -func resourceAwsSecurityGroupImportStatePerm(sg *ec2.SecurityGroup, ruleType string, perm *ec2.IpPermission) ([]*schema.ResourceData, error) { - /* - Create a separate Security Group Rule for: - * The collection of IpRanges (cidr_blocks) - * The collection of Ipv6Ranges (ipv6_cidr_blocks) - * Each individual UserIdGroupPair (source_security_group_id) - - If, for example, a security group has rules for: - * 2 IpRanges - * 2 Ipv6Ranges - * 2 UserIdGroupPairs - - This would generate 4 security group rules: - * 1 for the collection of IpRanges - * 1 for the collection of Ipv6Ranges - * 1 for the first UserIdGroupPair - * 1 for the second UserIdGroupPair - */ - var result []*schema.ResourceData - - if perm.IpRanges != nil { - p := &ec2.IpPermission{ - FromPort: perm.FromPort, - IpProtocol: perm.IpProtocol, - PrefixListIds: perm.PrefixListIds, - ToPort: perm.ToPort, - IpRanges: perm.IpRanges, - } - - r, err := resourceAwsSecurityGroupImportStatePermPair(sg, ruleType, p) - if err != nil { - return nil, err - } - result = append(result, r) - } - - if perm.Ipv6Ranges != nil { - p := &ec2.IpPermission{ - FromPort: perm.FromPort, - IpProtocol: perm.IpProtocol, - PrefixListIds: perm.PrefixListIds, - ToPort: perm.ToPort, - Ipv6Ranges: perm.Ipv6Ranges, - } - - r, err := resourceAwsSecurityGroupImportStatePermPair(sg, ruleType, p) - if err != nil { - return nil, err - } - result = append(result, r) - } - - if len(perm.UserIdGroupPairs) > 0 { - for _, pair := range perm.UserIdGroupPairs { - p := &ec2.IpPermission{ - FromPort: perm.FromPort, - IpProtocol: perm.IpProtocol, - PrefixListIds: perm.PrefixListIds, - ToPort: perm.ToPort, - UserIdGroupPairs: []*ec2.UserIdGroupPair{pair}, - } - - r, err := resourceAwsSecurityGroupImportStatePermPair(sg, ruleType, p) - if err != nil { - return nil, err - } - result = append(result, r) - } - } - - if len(result) == 0 && len(perm.PrefixListIds) > 0 { - p := &ec2.IpPermission{ - FromPort: perm.FromPort, - IpProtocol: perm.IpProtocol, - PrefixListIds: perm.PrefixListIds, - ToPort: perm.ToPort, - } - - r, err := resourceAwsSecurityGroupImportStatePermPair(sg, ruleType, p) - if err != nil { - return nil, err - } - result = append(result, r) - } - - return result, nil -} - -func resourceAwsSecurityGroupImportStatePermPair(sg *ec2.SecurityGroup, ruleType string, perm *ec2.IpPermission) (*schema.ResourceData, error) { - // Construct the rule. We do this by populating the absolute - // minimum necessary for Refresh on the rule to work. This - // happens to be a lot of fields since they're almost all needed - // for de-dupping. - sgId := sg.GroupId - id := ipPermissionIDHash(*sgId, ruleType, perm) - ruleResource := resourceAwsSecurityGroupRule() - d := ruleResource.Data(nil) - d.SetId(id) - d.SetType("aws_security_group_rule") - d.Set("security_group_id", sgId) - d.Set("type", ruleType) - - // 'self' is false by default. Below, we range over the group ids and set true - // if the parent sg id is found - d.Set("self", false) - - if len(perm.UserIdGroupPairs) > 0 { - s := perm.UserIdGroupPairs[0] - - // Check for Pair that is the same as the Security Group, to denote self. - // Otherwise, mark the group id in source_security_group_id - isVPC := sg.VpcId != nil && *sg.VpcId != "" - if isVPC { - if *s.GroupId == *sg.GroupId { - d.Set("self", true) - // prune the self reference from the UserIdGroupPairs, so we don't - // have duplicate sg ids (both self and in source_security_group_id) - perm.UserIdGroupPairs = append(perm.UserIdGroupPairs[:0], perm.UserIdGroupPairs[0+1:]...) - } - } else { - if *s.GroupName == *sg.GroupName { - d.Set("self", true) - // prune the self reference from the UserIdGroupPairs, so we don't - // have duplicate sg ids (both self and in source_security_group_id) - perm.UserIdGroupPairs = append(perm.UserIdGroupPairs[:0], perm.UserIdGroupPairs[0+1:]...) - } - } - } - - if err := setFromIPPerm(d, sg, perm); err != nil { - return nil, fmt.Errorf("Error importing AWS Security Group: %s", err) - } - - return d, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/network_acl_entry.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/network_acl_entry.go deleted file mode 100644 index c08b68e78..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/network_acl_entry.go +++ /dev/null @@ -1,249 +0,0 @@ -package aws - -import ( - "fmt" - "net" - "strconv" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" -) - -func expandNetworkAclEntries(configured []interface{}, entryType string) ([]*ec2.NetworkAclEntry, error) { - entries := make([]*ec2.NetworkAclEntry, 0, len(configured)) - for _, eRaw := range configured { - data := eRaw.(map[string]interface{}) - protocol := data["protocol"].(string) - p, err := strconv.Atoi(protocol) - if err != nil { - var ok bool - p, ok = protocolIntegers()[protocol] - if !ok { - return nil, fmt.Errorf("Invalid Protocol %s for rule %#v", protocol, data) - } - } - - e := &ec2.NetworkAclEntry{ - Protocol: aws.String(strconv.Itoa(p)), - PortRange: &ec2.PortRange{ - From: aws.Int64(int64(data["from_port"].(int))), - To: aws.Int64(int64(data["to_port"].(int))), - }, - Egress: aws.Bool(entryType == "egress"), - RuleAction: aws.String(data["action"].(string)), - RuleNumber: aws.Int64(int64(data["rule_no"].(int))), - } - - if v, ok := data["ipv6_cidr_block"]; ok { - e.Ipv6CidrBlock = aws.String(v.(string)) - } - - if v, ok := data["cidr_block"]; ok { - e.CidrBlock = aws.String(v.(string)) - } - - // Specify additional required fields for ICMP - if p == 1 || p == 58 { - e.IcmpTypeCode = &ec2.IcmpTypeCode{} - if v, ok := data["icmp_code"]; ok { - e.IcmpTypeCode.Code = aws.Int64(int64(v.(int))) - } - if v, ok := data["icmp_type"]; ok { - e.IcmpTypeCode.Type = aws.Int64(int64(v.(int))) - } - } - - entries = append(entries, e) - } - return entries, nil -} - -func protocolStrings(protocolIntegers map[string]int) map[int]string { - protocolStrings := make(map[int]string, len(protocolIntegers)) - for k, v := range protocolIntegers { - protocolStrings[v] = k - } - - return protocolStrings -} - -func protocolIntegers() map[string]int { - return map[string]int{ - // defined at https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml - "all": -1, - "hopopt": 0, - "icmp": 1, - "igmp": 2, - "ggp": 3, - "ipv4": 4, - "st": 5, - "tcp": 6, - "cbt": 7, - "egp": 8, - "igp": 9, - "bbn-rcc-mon": 10, - "nvp-ii": 11, - "pup": 12, - "argus": 13, - "emcon": 14, - "xnet": 15, - "chaos": 16, - "udp": 17, - "mux": 18, - "dcn-meas": 19, - "hmp": 20, - "prm": 21, - "xns-idp": 22, - "trunk-1": 23, - "trunk-2": 24, - "leaf-1": 25, - "leaf-2": 26, - "rdp": 27, - "irtp": 28, - "iso-tp4": 29, - "netblt": 30, - "mfe-nsp": 31, - "merit-inp": 32, - "dccp": 33, - "3pc": 34, - "idpr": 35, - "xtp": 36, - "ddp": 37, - "idpr-cmtp": 38, - "tp++": 39, - "il": 40, - "ipv6": 41, - "sdrp": 42, - "ipv6-route": 43, - "ipv6-frag": 44, - "idrp": 45, - "rsvp": 46, - "gre": 47, - "dsr": 48, - "bna": 49, - "esp": 50, - "ah": 51, - "i-nlsp": 52, - "swipe": 53, - "narp": 54, - "mobile": 55, - "tlsp": 56, - "ipv6-icmp": 58, - "ipv6-nonxt": 59, - "ipv6-opts": 60, - "61": 61, - "cftp": 62, - "63": 63, - "sat-expak": 64, - "kryptolan": 65, - "rvd": 66, - "ippc": 67, - "68": 68, - "sat-mon": 69, - "visa": 70, - "ipcv": 71, - "cpnx": 72, - "cphb": 73, - "wsn": 74, - "pvp": 75, - "br-sat-mon": 76, - "sun-nd": 77, - "wb-mon": 78, - "wb-expak": 79, - "iso-ip": 80, - "vmtp": 81, - "secure-vmtp": 82, - "vines": 83, - "ttp": 84, - "nsfnet-igp": 85, - "dgp": 86, - "tcf": 87, - "eigrp": 88, - "ospfigp": 89, - "sprite-rpc": 90, - "larp": 91, - "mtp": 92, - "ax.25": 93, - "ipip": 94, - "micp": 95, - "scc-sp": 96, - "etherip": 97, - "encap": 98, - "99": 99, - "gmtp": 100, - "ifmp": 101, - "pnni": 102, - "pim": 103, - "aris": 104, - "scps": 105, - "qnx": 106, - "a/n": 107, - "ipcomp": 108, - "snp": 109, - "compaq-peer": 110, - "ipx-in-ip": 111, - "vrrp": 112, - "pgm": 113, - "114": 114, - "l2tp": 115, - "dd": 116, - "iatp": 117, - "stp": 118, - "srp": 119, - "uti": 120, - "smp": 121, - "sm": 122, - "ptp": 123, - "isis-over-ipv4": 124, - "fire": 125, - "crtp": 126, - "crudp": 127, - "sscopmce": 128, - "iplt": 129, - "sps": 130, - "pipe": 131, - "sctp": 132, - "fc": 133, - "rsvp-e2e-ignore": 134, - "mobility-header": 135, - "udplite": 136, - "mpls-in-ip": 137, - "manet": 138, - "hip": 139, - "shim6": 140, - "wesp": 141, - "rohc": 142, - "253": 253, - "254": 254, - } -} - -// expectedPortPair stores a pair of ports we expect to see together. -type expectedPortPair struct { - to_port int64 - from_port int64 -} - -// validatePorts ensures the ports and protocol match expected -// values. -func validatePorts(to int64, from int64, expected expectedPortPair) bool { - if to != expected.to_port || from != expected.from_port { - return false - } - - return true -} - -// validateCIDRBlock ensures the passed CIDR block represents an implied -// network, and not an overly-specified IP address. -func validateCIDRBlock(cidr string) error { - _, ipnet, err := net.ParseCIDR(cidr) - if err != nil { - return err - } - if ipnet.String() != cidr { - return fmt.Errorf("%s is not a valid mask; did you mean %s?", cidr, ipnet) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/opsworks_layers.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/opsworks_layers.go deleted file mode 100644 index 83e0b2d02..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/opsworks_layers.go +++ /dev/null @@ -1,645 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/opsworks" - "github.com/hashicorp/terraform/helper/structure" -) - -// OpsWorks has a single concept of "layer" which represents several different -// layer types. The differences between these are in some extra properties that -// get packed into an "Attributes" map, but in the OpsWorks UI these are presented -// as first-class options, and so Terraform prefers to expose them this way and -// hide the implementation detail that they are all packed into a single type -// in the underlying API. -// -// This file contains utilities that are shared between all of the concrete -// layer resource types, which have names matching aws_opsworks_*_layer . - -type opsworksLayerTypeAttribute struct { - AttrName string - Type schema.ValueType - Default interface{} - Required bool - WriteOnly bool -} - -type opsworksLayerType struct { - TypeName string - DefaultLayerName string - Attributes map[string]*opsworksLayerTypeAttribute - CustomShortName bool -} - -var ( - opsworksTrueString = "true" - opsworksFalseString = "false" -) - -func (lt *opsworksLayerType) SchemaResource() *schema.Resource { - resourceSchema := map[string]*schema.Schema{ - "auto_assign_elastic_ips": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "auto_assign_public_ips": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "custom_instance_profile_arn": { - Type: schema.TypeString, - Optional: true, - }, - - "elastic_load_balancer": { - Type: schema.TypeString, - Optional: true, - }, - - "custom_setup_recipes": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "custom_configure_recipes": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "custom_deploy_recipes": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "custom_undeploy_recipes": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "custom_shutdown_recipes": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "custom_security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "custom_json": { - Type: schema.TypeString, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - Optional: true, - }, - - "auto_healing": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "install_updates_on_boot": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "instance_shutdown_timeout": { - Type: schema.TypeInt, - Optional: true, - Default: 120, - }, - - "drain_elb_on_shutdown": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "system_packages": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "stack_id": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - - "use_ebs_optimized_instances": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "ebs_volume": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - - "iops": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - - "mount_point": { - Type: schema.TypeString, - Required: true, - }, - - "number_of_disks": { - Type: schema.TypeInt, - Required: true, - }, - - "raid_level": { - Type: schema.TypeString, - Optional: true, - Default: "", - }, - - "size": { - Type: schema.TypeInt, - Required: true, - }, - - "type": { - Type: schema.TypeString, - Optional: true, - Default: "standard", - }, - }, - }, - Set: func(v interface{}) int { - m := v.(map[string]interface{}) - return hashcode.String(m["mount_point"].(string)) - }, - }, - } - - if lt.CustomShortName { - resourceSchema["short_name"] = &schema.Schema{ - Type: schema.TypeString, - Required: true, - } - } - - if lt.DefaultLayerName != "" { - resourceSchema["name"] = &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Default: lt.DefaultLayerName, - } - } else { - resourceSchema["name"] = &schema.Schema{ - Type: schema.TypeString, - Required: true, - } - } - - for key, def := range lt.Attributes { - resourceSchema[key] = &schema.Schema{ - Type: def.Type, - Default: def.Default, - Required: def.Required, - Optional: !def.Required, - } - } - - return &schema.Resource{ - Read: func(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - return lt.Read(d, client) - }, - Create: func(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - return lt.Create(d, client) - }, - Update: func(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - return lt.Update(d, client) - }, - Delete: func(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - return lt.Delete(d, client) - }, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: resourceSchema, - } -} - -func (lt *opsworksLayerType) Read(d *schema.ResourceData, client *opsworks.OpsWorks) error { - - req := &opsworks.DescribeLayersInput{ - LayerIds: []*string{ - aws.String(d.Id()), - }, - } - - log.Printf("[DEBUG] Reading OpsWorks layer: %s", d.Id()) - - resp, err := client.DescribeLayers(req) - if err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "ResourceNotFoundException" { - d.SetId("") - return nil - } - } - return err - } - - layer := resp.Layers[0] - d.SetId(aws.StringValue(layer.LayerId)) - d.Set("auto_assign_elastic_ips", layer.AutoAssignElasticIps) - d.Set("auto_assign_public_ips", layer.AutoAssignPublicIps) - d.Set("custom_instance_profile_arn", layer.CustomInstanceProfileArn) - d.Set("custom_security_group_ids", flattenStringList(layer.CustomSecurityGroupIds)) - d.Set("auto_healing", layer.EnableAutoHealing) - d.Set("install_updates_on_boot", layer.InstallUpdatesOnBoot) - d.Set("name", layer.Name) - d.Set("system_packages", flattenStringList(layer.Packages)) - d.Set("stack_id", layer.StackId) - d.Set("use_ebs_optimized_instances", layer.UseEbsOptimizedInstances) - - if lt.CustomShortName { - d.Set("short_name", layer.Shortname) - } - - if layer.CustomJson == nil { - d.Set("custom_json", "") - } else { - policy, err := structure.NormalizeJsonString(*layer.CustomJson) - if err != nil { - return fmt.Errorf("policy contains an invalid JSON: %s", err) - } - d.Set("custom_json", policy) - } - - lt.SetAttributeMap(d, layer.Attributes) - lt.SetLifecycleEventConfiguration(d, layer.LifecycleEventConfiguration) - lt.SetCustomRecipes(d, layer.CustomRecipes) - lt.SetVolumeConfigurations(d, layer.VolumeConfigurations) - - /* get ELB */ - ebsRequest := &opsworks.DescribeElasticLoadBalancersInput{ - LayerIds: []*string{ - aws.String(d.Id()), - }, - } - loadBalancers, err := client.DescribeElasticLoadBalancers(ebsRequest) - if err != nil { - return err - } - - if loadBalancers.ElasticLoadBalancers == nil || len(loadBalancers.ElasticLoadBalancers) == 0 { - d.Set("elastic_load_balancer", "") - } else { - loadBalancer := loadBalancers.ElasticLoadBalancers[0] - if loadBalancer != nil { - d.Set("elastic_load_balancer", loadBalancer.ElasticLoadBalancerName) - } - } - - return nil -} - -func (lt *opsworksLayerType) Create(d *schema.ResourceData, client *opsworks.OpsWorks) error { - - req := &opsworks.CreateLayerInput{ - AutoAssignElasticIps: aws.Bool(d.Get("auto_assign_elastic_ips").(bool)), - AutoAssignPublicIps: aws.Bool(d.Get("auto_assign_public_ips").(bool)), - CustomInstanceProfileArn: aws.String(d.Get("custom_instance_profile_arn").(string)), - CustomRecipes: lt.CustomRecipes(d), - CustomSecurityGroupIds: expandStringSet(d.Get("custom_security_group_ids").(*schema.Set)), - EnableAutoHealing: aws.Bool(d.Get("auto_healing").(bool)), - InstallUpdatesOnBoot: aws.Bool(d.Get("install_updates_on_boot").(bool)), - LifecycleEventConfiguration: lt.LifecycleEventConfiguration(d), - Name: aws.String(d.Get("name").(string)), - Packages: expandStringSet(d.Get("system_packages").(*schema.Set)), - Type: aws.String(lt.TypeName), - StackId: aws.String(d.Get("stack_id").(string)), - UseEbsOptimizedInstances: aws.Bool(d.Get("use_ebs_optimized_instances").(bool)), - Attributes: lt.AttributeMap(d), - VolumeConfigurations: lt.VolumeConfigurations(d), - } - - if lt.CustomShortName { - req.Shortname = aws.String(d.Get("short_name").(string)) - } else { - req.Shortname = aws.String(lt.TypeName) - } - - req.CustomJson = aws.String(d.Get("custom_json").(string)) - - log.Printf("[DEBUG] Creating OpsWorks layer: %s", d.Id()) - - resp, err := client.CreateLayer(req) - if err != nil { - return err - } - - layerId := *resp.LayerId - d.SetId(layerId) - - loadBalancer := aws.String(d.Get("elastic_load_balancer").(string)) - if loadBalancer != nil && *loadBalancer != "" { - log.Printf("[DEBUG] Attaching load balancer: %s", *loadBalancer) - _, err := client.AttachElasticLoadBalancer(&opsworks.AttachElasticLoadBalancerInput{ - ElasticLoadBalancerName: loadBalancer, - LayerId: &layerId, - }) - if err != nil { - return err - } - } - - return lt.Read(d, client) -} - -func (lt *opsworksLayerType) Update(d *schema.ResourceData, client *opsworks.OpsWorks) error { - - req := &opsworks.UpdateLayerInput{ - LayerId: aws.String(d.Id()), - AutoAssignElasticIps: aws.Bool(d.Get("auto_assign_elastic_ips").(bool)), - AutoAssignPublicIps: aws.Bool(d.Get("auto_assign_public_ips").(bool)), - CustomInstanceProfileArn: aws.String(d.Get("custom_instance_profile_arn").(string)), - CustomRecipes: lt.CustomRecipes(d), - CustomSecurityGroupIds: expandStringSet(d.Get("custom_security_group_ids").(*schema.Set)), - EnableAutoHealing: aws.Bool(d.Get("auto_healing").(bool)), - InstallUpdatesOnBoot: aws.Bool(d.Get("install_updates_on_boot").(bool)), - LifecycleEventConfiguration: lt.LifecycleEventConfiguration(d), - Name: aws.String(d.Get("name").(string)), - Packages: expandStringSet(d.Get("system_packages").(*schema.Set)), - UseEbsOptimizedInstances: aws.Bool(d.Get("use_ebs_optimized_instances").(bool)), - Attributes: lt.AttributeMap(d), - VolumeConfigurations: lt.VolumeConfigurations(d), - } - - if lt.CustomShortName { - req.Shortname = aws.String(d.Get("short_name").(string)) - } else { - req.Shortname = aws.String(lt.TypeName) - } - - req.CustomJson = aws.String(d.Get("custom_json").(string)) - - log.Printf("[DEBUG] Updating OpsWorks layer: %s", d.Id()) - - if d.HasChange("elastic_load_balancer") { - lbo, lbn := d.GetChange("elastic_load_balancer") - - loadBalancerOld := aws.String(lbo.(string)) - loadBalancerNew := aws.String(lbn.(string)) - - if loadBalancerOld != nil && *loadBalancerOld != "" { - log.Printf("[DEBUG] Dettaching load balancer: %s", *loadBalancerOld) - _, err := client.DetachElasticLoadBalancer(&opsworks.DetachElasticLoadBalancerInput{ - ElasticLoadBalancerName: loadBalancerOld, - LayerId: aws.String(d.Id()), - }) - if err != nil { - return err - } - } - - if loadBalancerNew != nil && *loadBalancerNew != "" { - log.Printf("[DEBUG] Attaching load balancer: %s", *loadBalancerNew) - _, err := client.AttachElasticLoadBalancer(&opsworks.AttachElasticLoadBalancerInput{ - ElasticLoadBalancerName: loadBalancerNew, - LayerId: aws.String(d.Id()), - }) - if err != nil { - return err - } - } - } - - _, err := client.UpdateLayer(req) - if err != nil { - return err - } - - return lt.Read(d, client) -} - -func (lt *opsworksLayerType) Delete(d *schema.ResourceData, client *opsworks.OpsWorks) error { - req := &opsworks.DeleteLayerInput{ - LayerId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting OpsWorks layer: %s", d.Id()) - - _, err := client.DeleteLayer(req) - return err -} - -func (lt *opsworksLayerType) AttributeMap(d *schema.ResourceData) map[string]*string { - attrs := map[string]*string{} - - for key, def := range lt.Attributes { - value := d.Get(key) - switch def.Type { - case schema.TypeString: - strValue := value.(string) - attrs[def.AttrName] = &strValue - case schema.TypeInt: - intValue := value.(int) - strValue := strconv.Itoa(intValue) - attrs[def.AttrName] = &strValue - case schema.TypeBool: - boolValue := value.(bool) - if boolValue { - attrs[def.AttrName] = &opsworksTrueString - } else { - attrs[def.AttrName] = &opsworksFalseString - } - default: - // should never happen - panic(fmt.Errorf("Unsupported OpsWorks layer attribute type")) - } - } - - return attrs -} - -func (lt *opsworksLayerType) SetAttributeMap(d *schema.ResourceData, attrs map[string]*string) { - for key, def := range lt.Attributes { - // Ignore write-only attributes; we'll just keep what we already have stored. - // (The AWS API returns garbage placeholder values for these.) - if def.WriteOnly { - continue - } - - if strPtr, ok := attrs[def.AttrName]; ok && strPtr != nil { - strValue := *strPtr - - switch def.Type { - case schema.TypeString: - d.Set(key, strValue) - case schema.TypeInt: - intValue, err := strconv.Atoi(strValue) - if err == nil { - d.Set(key, intValue) - } else { - // Got garbage from the AWS API - d.Set(key, nil) - } - case schema.TypeBool: - boolValue := true - if strValue == opsworksFalseString { - boolValue = false - } - d.Set(key, boolValue) - default: - // should never happen - panic(fmt.Errorf("Unsupported OpsWorks layer attribute type")) - } - return - - } else { - d.Set(key, nil) - } - } -} - -func (lt *opsworksLayerType) LifecycleEventConfiguration(d *schema.ResourceData) *opsworks.LifecycleEventConfiguration { - return &opsworks.LifecycleEventConfiguration{ - Shutdown: &opsworks.ShutdownEventConfiguration{ - DelayUntilElbConnectionsDrained: aws.Bool(d.Get("drain_elb_on_shutdown").(bool)), - ExecutionTimeout: aws.Int64(int64(d.Get("instance_shutdown_timeout").(int))), - }, - } -} - -func (lt *opsworksLayerType) SetLifecycleEventConfiguration(d *schema.ResourceData, v *opsworks.LifecycleEventConfiguration) { - if v == nil || v.Shutdown == nil { - d.Set("drain_elb_on_shutdown", nil) - d.Set("instance_shutdown_timeout", nil) - } else { - d.Set("drain_elb_on_shutdown", v.Shutdown.DelayUntilElbConnectionsDrained) - d.Set("instance_shutdown_timeout", v.Shutdown.ExecutionTimeout) - } -} - -func (lt *opsworksLayerType) CustomRecipes(d *schema.ResourceData) *opsworks.Recipes { - return &opsworks.Recipes{ - Configure: expandStringList(d.Get("custom_configure_recipes").([]interface{})), - Deploy: expandStringList(d.Get("custom_deploy_recipes").([]interface{})), - Setup: expandStringList(d.Get("custom_setup_recipes").([]interface{})), - Shutdown: expandStringList(d.Get("custom_shutdown_recipes").([]interface{})), - Undeploy: expandStringList(d.Get("custom_undeploy_recipes").([]interface{})), - } -} - -func (lt *opsworksLayerType) SetCustomRecipes(d *schema.ResourceData, v *opsworks.Recipes) { - // Null out everything first, and then we'll consider what to put back. - d.Set("custom_configure_recipes", nil) - d.Set("custom_deploy_recipes", nil) - d.Set("custom_setup_recipes", nil) - d.Set("custom_shutdown_recipes", nil) - d.Set("custom_undeploy_recipes", nil) - - if v == nil { - return - } - - d.Set("custom_configure_recipes", flattenStringList(v.Configure)) - d.Set("custom_deploy_recipes", flattenStringList(v.Deploy)) - d.Set("custom_setup_recipes", flattenStringList(v.Setup)) - d.Set("custom_shutdown_recipes", flattenStringList(v.Shutdown)) - d.Set("custom_undeploy_recipes", flattenStringList(v.Undeploy)) -} - -func (lt *opsworksLayerType) VolumeConfigurations(d *schema.ResourceData) []*opsworks.VolumeConfiguration { - configuredVolumes := d.Get("ebs_volume").(*schema.Set).List() - result := make([]*opsworks.VolumeConfiguration, len(configuredVolumes)) - - for i := 0; i < len(configuredVolumes); i++ { - volumeData := configuredVolumes[i].(map[string]interface{}) - - result[i] = &opsworks.VolumeConfiguration{ - MountPoint: aws.String(volumeData["mount_point"].(string)), - NumberOfDisks: aws.Int64(int64(volumeData["number_of_disks"].(int))), - Size: aws.Int64(int64(volumeData["size"].(int))), - VolumeType: aws.String(volumeData["type"].(string)), - } - iops := int64(volumeData["iops"].(int)) - if iops != 0 { - result[i].Iops = aws.Int64(iops) - } - - raidLevelStr := volumeData["raid_level"].(string) - if raidLevelStr != "" { - raidLevel, err := strconv.Atoi(raidLevelStr) - if err == nil { - result[i].RaidLevel = aws.Int64(int64(raidLevel)) - } - } - } - - return result -} - -func (lt *opsworksLayerType) SetVolumeConfigurations(d *schema.ResourceData, v []*opsworks.VolumeConfiguration) { - newValue := make([]*map[string]interface{}, len(v)) - - for i := 0; i < len(v); i++ { - config := v[i] - data := make(map[string]interface{}) - newValue[i] = &data - - if config.Iops != nil { - data["iops"] = int(*config.Iops) - } else { - data["iops"] = 0 - } - if config.MountPoint != nil { - data["mount_point"] = *config.MountPoint - } - if config.NumberOfDisks != nil { - data["number_of_disks"] = int(*config.NumberOfDisks) - } - if config.RaidLevel != nil { - data["raid_level"] = strconv.Itoa(int(*config.RaidLevel)) - } - if config.Size != nil { - data["size"] = int(*config.Size) - } - if config.VolumeType != nil { - data["type"] = *config.VolumeType - } - } - - d.Set("ebs_volume", newValue) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go deleted file mode 100644 index 8c2c5e3b0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go +++ /dev/null @@ -1,1222 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/mutexkv" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/terraform" - homedir "github.com/mitchellh/go-homedir" -) - -// Provider returns a terraform.ResourceProvider. -func Provider() terraform.ResourceProvider { - // TODO: Move the validation to this, requires conditional schemas - // TODO: Move the configuration to this, requires validation - - // The actual provider - return &schema.Provider{ - Schema: map[string]*schema.Schema{ - "access_key": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["access_key"], - }, - - "secret_key": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["secret_key"], - }, - - "profile": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["profile"], - }, - - "assume_role": assumeRoleSchema(), - - "shared_credentials_file": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["shared_credentials_file"], - }, - - "token": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["token"], - }, - - "region": { - Type: schema.TypeString, - Required: true, - DefaultFunc: schema.MultiEnvDefaultFunc([]string{ - "AWS_REGION", - "AWS_DEFAULT_REGION", - }, nil), - Description: descriptions["region"], - InputDefault: "us-east-1", - }, - - "max_retries": { - Type: schema.TypeInt, - Optional: true, - Default: 25, - Description: descriptions["max_retries"], - }, - - "allowed_account_ids": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - ConflictsWith: []string{"forbidden_account_ids"}, - Set: schema.HashString, - }, - - "forbidden_account_ids": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - ConflictsWith: []string{"allowed_account_ids"}, - Set: schema.HashString, - }, - - "dynamodb_endpoint": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["dynamodb_endpoint"], - Removed: "Use `dynamodb` inside `endpoints` block instead", - }, - - "kinesis_endpoint": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["kinesis_endpoint"], - Removed: "Use `kinesis` inside `endpoints` block instead", - }, - - "endpoints": endpointsSchema(), - - "insecure": { - Type: schema.TypeBool, - Optional: true, - Default: false, - Description: descriptions["insecure"], - }, - - "skip_credentials_validation": { - Type: schema.TypeBool, - Optional: true, - Default: false, - Description: descriptions["skip_credentials_validation"], - }, - - "skip_get_ec2_platforms": { - Type: schema.TypeBool, - Optional: true, - Default: false, - Description: descriptions["skip_get_ec2_platforms"], - }, - - "skip_region_validation": { - Type: schema.TypeBool, - Optional: true, - Default: false, - Description: descriptions["skip_region_validation"], - }, - - "skip_requesting_account_id": { - Type: schema.TypeBool, - Optional: true, - Default: false, - Description: descriptions["skip_requesting_account_id"], - }, - - "skip_metadata_api_check": { - Type: schema.TypeBool, - Optional: true, - Default: false, - Description: descriptions["skip_metadata_api_check"], - }, - - "s3_force_path_style": { - Type: schema.TypeBool, - Optional: true, - Default: false, - Description: descriptions["s3_force_path_style"], - }, - }, - - DataSourcesMap: map[string]*schema.Resource{ - "aws_acm_certificate": dataSourceAwsAcmCertificate(), - "aws_acmpca_certificate_authority": dataSourceAwsAcmpcaCertificateAuthority(), - "aws_ami": dataSourceAwsAmi(), - "aws_ami_ids": dataSourceAwsAmiIds(), - "aws_api_gateway_api_key": dataSourceAwsApiGatewayApiKey(), - "aws_api_gateway_resource": dataSourceAwsApiGatewayResource(), - "aws_api_gateway_rest_api": dataSourceAwsApiGatewayRestApi(), - "aws_api_gateway_vpc_link": dataSourceAwsApiGatewayVpcLink(), - "aws_arn": dataSourceAwsArn(), - "aws_autoscaling_group": dataSourceAwsAutoscalingGroup(), - "aws_autoscaling_groups": dataSourceAwsAutoscalingGroups(), - "aws_availability_zone": dataSourceAwsAvailabilityZone(), - "aws_availability_zones": dataSourceAwsAvailabilityZones(), - "aws_batch_compute_environment": dataSourceAwsBatchComputeEnvironment(), - "aws_batch_job_queue": dataSourceAwsBatchJobQueue(), - "aws_billing_service_account": dataSourceAwsBillingServiceAccount(), - "aws_caller_identity": dataSourceAwsCallerIdentity(), - "aws_canonical_user_id": dataSourceAwsCanonicalUserId(), - "aws_cloudformation_export": dataSourceAwsCloudFormationExport(), - "aws_cloudformation_stack": dataSourceAwsCloudFormationStack(), - "aws_cloudhsm_v2_cluster": dataSourceCloudHsm2Cluster(), - "aws_cloudtrail_service_account": dataSourceAwsCloudTrailServiceAccount(), - "aws_cloudwatch_log_group": dataSourceAwsCloudwatchLogGroup(), - "aws_cognito_user_pools": dataSourceAwsCognitoUserPools(), - "aws_codecommit_repository": dataSourceAwsCodeCommitRepository(), - "aws_db_cluster_snapshot": dataSourceAwsDbClusterSnapshot(), - "aws_db_event_categories": dataSourceAwsDbEventCategories(), - "aws_db_instance": dataSourceAwsDbInstance(), - "aws_db_snapshot": dataSourceAwsDbSnapshot(), - "aws_dx_gateway": dataSourceAwsDxGateway(), - "aws_dynamodb_table": dataSourceAwsDynamoDbTable(), - "aws_ebs_snapshot": dataSourceAwsEbsSnapshot(), - "aws_ebs_snapshot_ids": dataSourceAwsEbsSnapshotIds(), - "aws_ebs_volume": dataSourceAwsEbsVolume(), - "aws_ec2_transit_gateway": dataSourceAwsEc2TransitGateway(), - "aws_ec2_transit_gateway_route_table": dataSourceAwsEc2TransitGatewayRouteTable(), - "aws_ec2_transit_gateway_vpc_attachment": dataSourceAwsEc2TransitGatewayVpcAttachment(), - "aws_ecr_repository": dataSourceAwsEcrRepository(), - "aws_ecs_cluster": dataSourceAwsEcsCluster(), - "aws_ecs_container_definition": dataSourceAwsEcsContainerDefinition(), - "aws_ecs_service": dataSourceAwsEcsService(), - "aws_ecs_task_definition": dataSourceAwsEcsTaskDefinition(), - "aws_efs_file_system": dataSourceAwsEfsFileSystem(), - "aws_efs_mount_target": dataSourceAwsEfsMountTarget(), - "aws_eip": dataSourceAwsEip(), - "aws_eks_cluster": dataSourceAwsEksCluster(), - "aws_eks_cluster_auth": dataSourceAwsEksClusterAuth(), - "aws_elastic_beanstalk_application": dataSourceAwsElasticBeanstalkApplication(), - "aws_elastic_beanstalk_hosted_zone": dataSourceAwsElasticBeanstalkHostedZone(), - "aws_elastic_beanstalk_solution_stack": dataSourceAwsElasticBeanstalkSolutionStack(), - "aws_elasticache_cluster": dataSourceAwsElastiCacheCluster(), - "aws_elb": dataSourceAwsElb(), - "aws_elasticache_replication_group": dataSourceAwsElasticacheReplicationGroup(), - "aws_elb_hosted_zone_id": dataSourceAwsElbHostedZoneId(), - "aws_elb_service_account": dataSourceAwsElbServiceAccount(), - "aws_glue_script": dataSourceAwsGlueScript(), - "aws_iam_account_alias": dataSourceAwsIamAccountAlias(), - "aws_iam_group": dataSourceAwsIAMGroup(), - "aws_iam_instance_profile": dataSourceAwsIAMInstanceProfile(), - "aws_iam_policy": dataSourceAwsIAMPolicy(), - "aws_iam_policy_document": dataSourceAwsIamPolicyDocument(), - "aws_iam_role": dataSourceAwsIAMRole(), - "aws_iam_server_certificate": dataSourceAwsIAMServerCertificate(), - "aws_iam_user": dataSourceAwsIAMUser(), - "aws_internet_gateway": dataSourceAwsInternetGateway(), - "aws_iot_endpoint": dataSourceAwsIotEndpoint(), - "aws_inspector_rules_packages": dataSourceAwsInspectorRulesPackages(), - "aws_instance": dataSourceAwsInstance(), - "aws_instances": dataSourceAwsInstances(), - "aws_ip_ranges": dataSourceAwsIPRanges(), - "aws_kinesis_stream": dataSourceAwsKinesisStream(), - "aws_kms_alias": dataSourceAwsKmsAlias(), - "aws_kms_ciphertext": dataSourceAwsKmsCiphertext(), - "aws_kms_key": dataSourceAwsKmsKey(), - "aws_kms_secret": dataSourceAwsKmsSecret(), - "aws_kms_secrets": dataSourceAwsKmsSecrets(), - "aws_lambda_function": dataSourceAwsLambdaFunction(), - "aws_lambda_invocation": dataSourceAwsLambdaInvocation(), - "aws_launch_configuration": dataSourceAwsLaunchConfiguration(), - "aws_launch_template": dataSourceAwsLaunchTemplate(), - "aws_mq_broker": dataSourceAwsMqBroker(), - "aws_nat_gateway": dataSourceAwsNatGateway(), - "aws_network_acls": dataSourceAwsNetworkAcls(), - "aws_network_interface": dataSourceAwsNetworkInterface(), - "aws_network_interfaces": dataSourceAwsNetworkInterfaces(), - "aws_partition": dataSourceAwsPartition(), - "aws_prefix_list": dataSourceAwsPrefixList(), - "aws_pricing_product": dataSourceAwsPricingProduct(), - "aws_rds_cluster": dataSourceAwsRdsCluster(), - "aws_redshift_cluster": dataSourceAwsRedshiftCluster(), - "aws_redshift_service_account": dataSourceAwsRedshiftServiceAccount(), - "aws_region": dataSourceAwsRegion(), - "aws_route": dataSourceAwsRoute(), - "aws_route_table": dataSourceAwsRouteTable(), - "aws_route_tables": dataSourceAwsRouteTables(), - "aws_route53_delegation_set": dataSourceAwsDelegationSet(), - "aws_route53_zone": dataSourceAwsRoute53Zone(), - "aws_s3_bucket": dataSourceAwsS3Bucket(), - "aws_s3_bucket_object": dataSourceAwsS3BucketObject(), - "aws_secretsmanager_secret": dataSourceAwsSecretsManagerSecret(), - "aws_secretsmanager_secret_version": dataSourceAwsSecretsManagerSecretVersion(), - "aws_sns_topic": dataSourceAwsSnsTopic(), - "aws_sqs_queue": dataSourceAwsSqsQueue(), - "aws_ssm_document": dataSourceAwsSsmDocument(), - "aws_ssm_parameter": dataSourceAwsSsmParameter(), - "aws_storagegateway_local_disk": dataSourceAwsStorageGatewayLocalDisk(), - "aws_subnet": dataSourceAwsSubnet(), - "aws_subnet_ids": dataSourceAwsSubnetIDs(), - "aws_vpcs": dataSourceAwsVpcs(), - "aws_security_group": dataSourceAwsSecurityGroup(), - "aws_security_groups": dataSourceAwsSecurityGroups(), - "aws_vpc": dataSourceAwsVpc(), - "aws_vpc_dhcp_options": dataSourceAwsVpcDhcpOptions(), - "aws_vpc_endpoint": dataSourceAwsVpcEndpoint(), - "aws_vpc_endpoint_service": dataSourceAwsVpcEndpointService(), - "aws_vpc_peering_connection": dataSourceAwsVpcPeeringConnection(), - "aws_vpn_gateway": dataSourceAwsVpnGateway(), - "aws_workspaces_bundle": dataSourceAwsWorkspaceBundle(), - - // Adding the Aliases for the ALB -> LB Rename - "aws_lb": dataSourceAwsLb(), - "aws_alb": dataSourceAwsLb(), - "aws_lb_listener": dataSourceAwsLbListener(), - "aws_alb_listener": dataSourceAwsLbListener(), - "aws_lb_target_group": dataSourceAwsLbTargetGroup(), - "aws_alb_target_group": dataSourceAwsLbTargetGroup(), - }, - - ResourcesMap: map[string]*schema.Resource{ - "aws_acm_certificate": resourceAwsAcmCertificate(), - "aws_acm_certificate_validation": resourceAwsAcmCertificateValidation(), - "aws_acmpca_certificate_authority": resourceAwsAcmpcaCertificateAuthority(), - "aws_ami": resourceAwsAmi(), - "aws_ami_copy": resourceAwsAmiCopy(), - "aws_ami_from_instance": resourceAwsAmiFromInstance(), - "aws_ami_launch_permission": resourceAwsAmiLaunchPermission(), - "aws_api_gateway_account": resourceAwsApiGatewayAccount(), - "aws_api_gateway_api_key": resourceAwsApiGatewayApiKey(), - "aws_api_gateway_authorizer": resourceAwsApiGatewayAuthorizer(), - "aws_api_gateway_base_path_mapping": resourceAwsApiGatewayBasePathMapping(), - "aws_api_gateway_client_certificate": resourceAwsApiGatewayClientCertificate(), - "aws_api_gateway_deployment": resourceAwsApiGatewayDeployment(), - "aws_api_gateway_documentation_part": resourceAwsApiGatewayDocumentationPart(), - "aws_api_gateway_documentation_version": resourceAwsApiGatewayDocumentationVersion(), - "aws_api_gateway_domain_name": resourceAwsApiGatewayDomainName(), - "aws_api_gateway_gateway_response": resourceAwsApiGatewayGatewayResponse(), - "aws_api_gateway_integration": resourceAwsApiGatewayIntegration(), - "aws_api_gateway_integration_response": resourceAwsApiGatewayIntegrationResponse(), - "aws_api_gateway_method": resourceAwsApiGatewayMethod(), - "aws_api_gateway_method_response": resourceAwsApiGatewayMethodResponse(), - "aws_api_gateway_method_settings": resourceAwsApiGatewayMethodSettings(), - "aws_api_gateway_model": resourceAwsApiGatewayModel(), - "aws_api_gateway_request_validator": resourceAwsApiGatewayRequestValidator(), - "aws_api_gateway_resource": resourceAwsApiGatewayResource(), - "aws_api_gateway_rest_api": resourceAwsApiGatewayRestApi(), - "aws_api_gateway_stage": resourceAwsApiGatewayStage(), - "aws_api_gateway_usage_plan": resourceAwsApiGatewayUsagePlan(), - "aws_api_gateway_usage_plan_key": resourceAwsApiGatewayUsagePlanKey(), - "aws_api_gateway_vpc_link": resourceAwsApiGatewayVpcLink(), - "aws_app_cookie_stickiness_policy": resourceAwsAppCookieStickinessPolicy(), - "aws_appautoscaling_target": resourceAwsAppautoscalingTarget(), - "aws_appautoscaling_policy": resourceAwsAppautoscalingPolicy(), - "aws_appautoscaling_scheduled_action": resourceAwsAppautoscalingScheduledAction(), - "aws_appmesh_mesh": resourceAwsAppmeshMesh(), - "aws_appmesh_route": resourceAwsAppmeshRoute(), - "aws_appmesh_virtual_node": resourceAwsAppmeshVirtualNode(), - "aws_appmesh_virtual_router": resourceAwsAppmeshVirtualRouter(), - "aws_appsync_api_key": resourceAwsAppsyncApiKey(), - "aws_appsync_datasource": resourceAwsAppsyncDatasource(), - "aws_appsync_graphql_api": resourceAwsAppsyncGraphqlApi(), - "aws_athena_database": resourceAwsAthenaDatabase(), - "aws_athena_named_query": resourceAwsAthenaNamedQuery(), - "aws_autoscaling_attachment": resourceAwsAutoscalingAttachment(), - "aws_autoscaling_group": resourceAwsAutoscalingGroup(), - "aws_autoscaling_lifecycle_hook": resourceAwsAutoscalingLifecycleHook(), - "aws_autoscaling_notification": resourceAwsAutoscalingNotification(), - "aws_autoscaling_policy": resourceAwsAutoscalingPolicy(), - "aws_autoscaling_schedule": resourceAwsAutoscalingSchedule(), - "aws_backup_vault": resourceAwsBackupVault(), - "aws_budgets_budget": resourceAwsBudgetsBudget(), - "aws_cloud9_environment_ec2": resourceAwsCloud9EnvironmentEc2(), - "aws_cloudformation_stack": resourceAwsCloudFormationStack(), - "aws_cloudfront_distribution": resourceAwsCloudFrontDistribution(), - "aws_cloudfront_origin_access_identity": resourceAwsCloudFrontOriginAccessIdentity(), - "aws_cloudfront_public_key": resourceAwsCloudFrontPublicKey(), - "aws_cloudtrail": resourceAwsCloudTrail(), - "aws_cloudwatch_event_permission": resourceAwsCloudWatchEventPermission(), - "aws_cloudwatch_event_rule": resourceAwsCloudWatchEventRule(), - "aws_cloudwatch_event_target": resourceAwsCloudWatchEventTarget(), - "aws_cloudwatch_log_destination": resourceAwsCloudWatchLogDestination(), - "aws_cloudwatch_log_destination_policy": resourceAwsCloudWatchLogDestinationPolicy(), - "aws_cloudwatch_log_group": resourceAwsCloudWatchLogGroup(), - "aws_cloudwatch_log_metric_filter": resourceAwsCloudWatchLogMetricFilter(), - "aws_cloudwatch_log_resource_policy": resourceAwsCloudWatchLogResourcePolicy(), - "aws_cloudwatch_log_stream": resourceAwsCloudWatchLogStream(), - "aws_cloudwatch_log_subscription_filter": resourceAwsCloudwatchLogSubscriptionFilter(), - "aws_config_aggregate_authorization": resourceAwsConfigAggregateAuthorization(), - "aws_config_config_rule": resourceAwsConfigConfigRule(), - "aws_config_configuration_aggregator": resourceAwsConfigConfigurationAggregator(), - "aws_config_configuration_recorder": resourceAwsConfigConfigurationRecorder(), - "aws_config_configuration_recorder_status": resourceAwsConfigConfigurationRecorderStatus(), - "aws_config_delivery_channel": resourceAwsConfigDeliveryChannel(), - "aws_cognito_identity_pool": resourceAwsCognitoIdentityPool(), - "aws_cognito_identity_pool_roles_attachment": resourceAwsCognitoIdentityPoolRolesAttachment(), - "aws_cognito_identity_provider": resourceAwsCognitoIdentityProvider(), - "aws_cognito_user_group": resourceAwsCognitoUserGroup(), - "aws_cognito_user_pool": resourceAwsCognitoUserPool(), - "aws_cognito_user_pool_client": resourceAwsCognitoUserPoolClient(), - "aws_cognito_user_pool_domain": resourceAwsCognitoUserPoolDomain(), - "aws_cloudhsm_v2_cluster": resourceAwsCloudHsm2Cluster(), - "aws_cloudhsm_v2_hsm": resourceAwsCloudHsm2Hsm(), - "aws_cognito_resource_server": resourceAwsCognitoResourceServer(), - "aws_cloudwatch_metric_alarm": resourceAwsCloudWatchMetricAlarm(), - "aws_cloudwatch_dashboard": resourceAwsCloudWatchDashboard(), - "aws_codedeploy_app": resourceAwsCodeDeployApp(), - "aws_codedeploy_deployment_config": resourceAwsCodeDeployDeploymentConfig(), - "aws_codedeploy_deployment_group": resourceAwsCodeDeployDeploymentGroup(), - "aws_codecommit_repository": resourceAwsCodeCommitRepository(), - "aws_codecommit_trigger": resourceAwsCodeCommitTrigger(), - "aws_codebuild_project": resourceAwsCodeBuildProject(), - "aws_codebuild_webhook": resourceAwsCodeBuildWebhook(), - "aws_codepipeline": resourceAwsCodePipeline(), - "aws_codepipeline_webhook": resourceAwsCodePipelineWebhook(), - "aws_customer_gateway": resourceAwsCustomerGateway(), - "aws_datasync_agent": resourceAwsDataSyncAgent(), - "aws_datasync_location_efs": resourceAwsDataSyncLocationEfs(), - "aws_datasync_location_nfs": resourceAwsDataSyncLocationNfs(), - "aws_datasync_location_s3": resourceAwsDataSyncLocationS3(), - "aws_datasync_task": resourceAwsDataSyncTask(), - "aws_dax_cluster": resourceAwsDaxCluster(), - "aws_dax_parameter_group": resourceAwsDaxParameterGroup(), - "aws_dax_subnet_group": resourceAwsDaxSubnetGroup(), - "aws_db_cluster_snapshot": resourceAwsDbClusterSnapshot(), - "aws_db_event_subscription": resourceAwsDbEventSubscription(), - "aws_db_instance": resourceAwsDbInstance(), - "aws_db_option_group": resourceAwsDbOptionGroup(), - "aws_db_parameter_group": resourceAwsDbParameterGroup(), - "aws_db_security_group": resourceAwsDbSecurityGroup(), - "aws_db_snapshot": resourceAwsDbSnapshot(), - "aws_db_subnet_group": resourceAwsDbSubnetGroup(), - "aws_devicefarm_project": resourceAwsDevicefarmProject(), - "aws_directory_service_directory": resourceAwsDirectoryServiceDirectory(), - "aws_directory_service_conditional_forwarder": resourceAwsDirectoryServiceConditionalForwarder(), - "aws_dlm_lifecycle_policy": resourceAwsDlmLifecyclePolicy(), - "aws_dms_certificate": resourceAwsDmsCertificate(), - "aws_dms_endpoint": resourceAwsDmsEndpoint(), - "aws_dms_replication_instance": resourceAwsDmsReplicationInstance(), - "aws_dms_replication_subnet_group": resourceAwsDmsReplicationSubnetGroup(), - "aws_dms_replication_task": resourceAwsDmsReplicationTask(), - "aws_docdb_cluster_parameter_group": resourceAwsDocDBClusterParameterGroup(), - "aws_docdb_cluster_snapshot": resourceAwsDocDBClusterSnapshot(), - "aws_docdb_subnet_group": resourceAwsDocDBSubnetGroup(), - "aws_docdb_cluster": resourceAwsDocDBCluster(), - "aws_dx_bgp_peer": resourceAwsDxBgpPeer(), - "aws_dx_connection": resourceAwsDxConnection(), - "aws_dx_connection_association": resourceAwsDxConnectionAssociation(), - "aws_dx_gateway": resourceAwsDxGateway(), - "aws_dx_gateway_association": resourceAwsDxGatewayAssociation(), - "aws_dx_hosted_private_virtual_interface": resourceAwsDxHostedPrivateVirtualInterface(), - "aws_dx_hosted_private_virtual_interface_accepter": resourceAwsDxHostedPrivateVirtualInterfaceAccepter(), - "aws_dx_hosted_public_virtual_interface": resourceAwsDxHostedPublicVirtualInterface(), - "aws_dx_hosted_public_virtual_interface_accepter": resourceAwsDxHostedPublicVirtualInterfaceAccepter(), - "aws_dx_lag": resourceAwsDxLag(), - "aws_dx_private_virtual_interface": resourceAwsDxPrivateVirtualInterface(), - "aws_dx_public_virtual_interface": resourceAwsDxPublicVirtualInterface(), - "aws_dynamodb_table": resourceAwsDynamoDbTable(), - "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), - "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), - "aws_ebs_snapshot": resourceAwsEbsSnapshot(), - "aws_ebs_snapshot_copy": resourceAwsEbsSnapshotCopy(), - "aws_ebs_volume": resourceAwsEbsVolume(), - "aws_ec2_capacity_reservation": resourceAwsEc2CapacityReservation(), - "aws_ec2_client_vpn_endpoint": resourceAwsEc2ClientVpnEndpoint(), - "aws_ec2_client_vpn_network_association": resourceAwsEc2ClientVpnNetworkAssociation(), - "aws_ec2_fleet": resourceAwsEc2Fleet(), - "aws_ec2_transit_gateway": resourceAwsEc2TransitGateway(), - "aws_ec2_transit_gateway_route": resourceAwsEc2TransitGatewayRoute(), - "aws_ec2_transit_gateway_route_table": resourceAwsEc2TransitGatewayRouteTable(), - "aws_ec2_transit_gateway_route_table_association": resourceAwsEc2TransitGatewayRouteTableAssociation(), - "aws_ec2_transit_gateway_route_table_propagation": resourceAwsEc2TransitGatewayRouteTablePropagation(), - "aws_ec2_transit_gateway_vpc_attachment": resourceAwsEc2TransitGatewayVpcAttachment(), - "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), - "aws_ecr_repository": resourceAwsEcrRepository(), - "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), - "aws_ecs_cluster": resourceAwsEcsCluster(), - "aws_ecs_service": resourceAwsEcsService(), - "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), - "aws_efs_file_system": resourceAwsEfsFileSystem(), - "aws_efs_mount_target": resourceAwsEfsMountTarget(), - "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), - "aws_eip": resourceAwsEip(), - "aws_eip_association": resourceAwsEipAssociation(), - "aws_eks_cluster": resourceAwsEksCluster(), - "aws_elasticache_cluster": resourceAwsElasticacheCluster(), - "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), - "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), - "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), - "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), - "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), - "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), - "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), - "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), - "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), - "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), - "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), - "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), - "aws_elb": resourceAwsElb(), - "aws_elb_attachment": resourceAwsElbAttachment(), - "aws_emr_cluster": resourceAwsEMRCluster(), - "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), - "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), - "aws_flow_log": resourceAwsFlowLog(), - "aws_gamelift_alias": resourceAwsGameliftAlias(), - "aws_gamelift_build": resourceAwsGameliftBuild(), - "aws_gamelift_fleet": resourceAwsGameliftFleet(), - "aws_gamelift_game_session_queue": resourceAwsGameliftGameSessionQueue(), - "aws_glacier_vault": resourceAwsGlacierVault(), - "aws_glacier_vault_lock": resourceAwsGlacierVaultLock(), - "aws_globalaccelerator_accelerator": resourceAwsGlobalAcceleratorAccelerator(), - "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), - "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), - "aws_glue_classifier": resourceAwsGlueClassifier(), - "aws_glue_connection": resourceAwsGlueConnection(), - "aws_glue_crawler": resourceAwsGlueCrawler(), - "aws_glue_job": resourceAwsGlueJob(), - "aws_glue_security_configuration": resourceAwsGlueSecurityConfiguration(), - "aws_glue_trigger": resourceAwsGlueTrigger(), - "aws_guardduty_detector": resourceAwsGuardDutyDetector(), - "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), - "aws_guardduty_member": resourceAwsGuardDutyMember(), - "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), - "aws_iam_access_key": resourceAwsIamAccessKey(), - "aws_iam_account_alias": resourceAwsIamAccountAlias(), - "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), - "aws_iam_group_policy": resourceAwsIamGroupPolicy(), - "aws_iam_group": resourceAwsIamGroup(), - "aws_iam_group_membership": resourceAwsIamGroupMembership(), - "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), - "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), - "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), - "aws_iam_policy": resourceAwsIamPolicy(), - "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), - "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), - "aws_iam_role_policy": resourceAwsIamRolePolicy(), - "aws_iam_role": resourceAwsIamRole(), - "aws_iam_saml_provider": resourceAwsIamSamlProvider(), - "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), - "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), - "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), - "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), - "aws_iam_user_policy": resourceAwsIamUserPolicy(), - "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), - "aws_iam_user": resourceAwsIamUser(), - "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), - "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), - "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), - "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), - "aws_instance": resourceAwsInstance(), - "aws_internet_gateway": resourceAwsInternetGateway(), - "aws_iot_certificate": resourceAwsIotCertificate(), - "aws_iot_policy": resourceAwsIotPolicy(), - "aws_iot_policy_attachment": resourceAwsIotPolicyAttachment(), - "aws_iot_thing": resourceAwsIotThing(), - "aws_iot_thing_principal_attachment": resourceAwsIotThingPrincipalAttachment(), - "aws_iot_thing_type": resourceAwsIotThingType(), - "aws_iot_topic_rule": resourceAwsIotTopicRule(), - "aws_key_pair": resourceAwsKeyPair(), - "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), - "aws_kinesis_stream": resourceAwsKinesisStream(), - "aws_kinesis_analytics_application": resourceAwsKinesisAnalyticsApplication(), - "aws_kms_alias": resourceAwsKmsAlias(), - "aws_kms_grant": resourceAwsKmsGrant(), - "aws_kms_key": resourceAwsKmsKey(), - "aws_lambda_function": resourceAwsLambdaFunction(), - "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), - "aws_lambda_alias": resourceAwsLambdaAlias(), - "aws_lambda_permission": resourceAwsLambdaPermission(), - "aws_lambda_layer_version": resourceAwsLambdaLayerVersion(), - "aws_launch_configuration": resourceAwsLaunchConfiguration(), - "aws_launch_template": resourceAwsLaunchTemplate(), - "aws_licensemanager_association": resourceAwsLicenseManagerAssociation(), - "aws_licensemanager_license_configuration": resourceAwsLicenseManagerLicenseConfiguration(), - "aws_lightsail_domain": resourceAwsLightsailDomain(), - "aws_lightsail_instance": resourceAwsLightsailInstance(), - "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), - "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), - "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), - "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), - "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), - "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), - "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), - "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), - "aws_macie_member_account_association": resourceAwsMacieMemberAccountAssociation(), - "aws_macie_s3_bucket_association": resourceAwsMacieS3BucketAssociation(), - "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), - "aws_mq_broker": resourceAwsMqBroker(), - "aws_mq_configuration": resourceAwsMqConfiguration(), - "aws_media_package_channel": resourceAwsMediaPackageChannel(), - "aws_media_store_container": resourceAwsMediaStoreContainer(), - "aws_media_store_container_policy": resourceAwsMediaStoreContainerPolicy(), - "aws_nat_gateway": resourceAwsNatGateway(), - "aws_network_acl": resourceAwsNetworkAcl(), - "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), - "aws_neptune_cluster": resourceAwsNeptuneCluster(), - "aws_neptune_cluster_instance": resourceAwsNeptuneClusterInstance(), - "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), - "aws_neptune_cluster_snapshot": resourceAwsNeptuneClusterSnapshot(), - "aws_neptune_event_subscription": resourceAwsNeptuneEventSubscription(), - "aws_neptune_parameter_group": resourceAwsNeptuneParameterGroup(), - "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), - "aws_network_acl_rule": resourceAwsNetworkAclRule(), - "aws_network_interface": resourceAwsNetworkInterface(), - "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), - "aws_opsworks_application": resourceAwsOpsworksApplication(), - "aws_opsworks_stack": resourceAwsOpsworksStack(), - "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), - "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), - "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), - "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), - "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), - "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), - "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), - "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), - "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), - "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), - "aws_opsworks_instance": resourceAwsOpsworksInstance(), - "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), - "aws_opsworks_permission": resourceAwsOpsworksPermission(), - "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), - "aws_organizations_organization": resourceAwsOrganizationsOrganization(), - "aws_organizations_account": resourceAwsOrganizationsAccount(), - "aws_organizations_policy": resourceAwsOrganizationsPolicy(), - "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), - "aws_placement_group": resourceAwsPlacementGroup(), - "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), - "aws_ram_resource_share": resourceAwsRamResourceShare(), - "aws_rds_cluster": resourceAwsRDSCluster(), - "aws_rds_cluster_endpoint": resourceAwsRDSClusterEndpoint(), - "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), - "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), - "aws_rds_global_cluster": resourceAwsRDSGlobalCluster(), - "aws_redshift_cluster": resourceAwsRedshiftCluster(), - "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), - "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), - "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), - "aws_redshift_snapshot_copy_grant": resourceAwsRedshiftSnapshotCopyGrant(), - "aws_redshift_event_subscription": resourceAwsRedshiftEventSubscription(), - "aws_resourcegroups_group": resourceAwsResourceGroupsGroup(), - "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), - "aws_route53_query_log": resourceAwsRoute53QueryLog(), - "aws_route53_record": resourceAwsRoute53Record(), - "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), - "aws_route53_zone": resourceAwsRoute53Zone(), - "aws_route53_health_check": resourceAwsRoute53HealthCheck(), - "aws_route": resourceAwsRoute(), - "aws_route_table": resourceAwsRouteTable(), - "aws_default_route_table": resourceAwsDefaultRouteTable(), - "aws_route_table_association": resourceAwsRouteTableAssociation(), - "aws_sagemaker_model": resourceAwsSagemakerModel(), - "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), - "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), - "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), - "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), - "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), - "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), - "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), - "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), - "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), - "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), - "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), - "aws_ses_event_destination": resourceAwsSesEventDestination(), - "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), - "aws_ses_template": resourceAwsSesTemplate(), - "aws_s3_account_public_access_block": resourceAwsS3AccountPublicAccessBlock(), - "aws_s3_bucket": resourceAwsS3Bucket(), - "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), - "aws_s3_bucket_public_access_block": resourceAwsS3BucketPublicAccessBlock(), - "aws_s3_bucket_object": resourceAwsS3BucketObject(), - "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), - "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), - "aws_s3_bucket_inventory": resourceAwsS3BucketInventory(), - "aws_sagemaker_notebook_instance": resourceAwsSagemakerNotebookInstance(), - "aws_security_group": resourceAwsSecurityGroup(), - "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), - "aws_default_security_group": resourceAwsDefaultSecurityGroup(), - "aws_security_group_rule": resourceAwsSecurityGroupRule(), - "aws_securityhub_account": resourceAwsSecurityHubAccount(), - "aws_securityhub_product_subscription": resourceAwsSecurityHubProductSubscription(), - "aws_securityhub_standards_subscription": resourceAwsSecurityHubStandardsSubscription(), - "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), - "aws_service_discovery_http_namespace": resourceAwsServiceDiscoveryHttpNamespace(), - "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), - "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), - "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), - "aws_simpledb_domain": resourceAwsSimpleDBDomain(), - "aws_ssm_activation": resourceAwsSsmActivation(), - "aws_ssm_association": resourceAwsSsmAssociation(), - "aws_ssm_document": resourceAwsSsmDocument(), - "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), - "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), - "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), - "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), - "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), - "aws_ssm_parameter": resourceAwsSsmParameter(), - "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), - "aws_storagegateway_cache": resourceAwsStorageGatewayCache(), - "aws_storagegateway_cached_iscsi_volume": resourceAwsStorageGatewayCachedIscsiVolume(), - "aws_storagegateway_gateway": resourceAwsStorageGatewayGateway(), - "aws_storagegateway_nfs_file_share": resourceAwsStorageGatewayNfsFileShare(), - "aws_storagegateway_smb_file_share": resourceAwsStorageGatewaySmbFileShare(), - "aws_storagegateway_upload_buffer": resourceAwsStorageGatewayUploadBuffer(), - "aws_storagegateway_working_storage": resourceAwsStorageGatewayWorkingStorage(), - "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), - "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), - "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), - "aws_sqs_queue": resourceAwsSqsQueue(), - "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), - "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), - "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), - "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), - "aws_sns_topic": resourceAwsSnsTopic(), - "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), - "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), - "aws_sfn_activity": resourceAwsSfnActivity(), - "aws_sfn_state_machine": resourceAwsSfnStateMachine(), - "aws_default_subnet": resourceAwsDefaultSubnet(), - "aws_subnet": resourceAwsSubnet(), - "aws_swf_domain": resourceAwsSwfDomain(), - "aws_transfer_server": resourceAwsTransferServer(), - "aws_transfer_ssh_key": resourceAwsTransferSshKey(), - "aws_transfer_user": resourceAwsTransferUser(), - "aws_volume_attachment": resourceAwsVolumeAttachment(), - "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), - "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), - "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), - "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), - "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), - "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), - "aws_default_vpc": resourceAwsDefaultVpc(), - "aws_vpc": resourceAwsVpc(), - "aws_vpc_endpoint": resourceAwsVpcEndpoint(), - "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), - "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), - "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), - "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), - "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), - "aws_vpc_ipv4_cidr_block_association": resourceAwsVpcIpv4CidrBlockAssociation(), - "aws_vpn_connection": resourceAwsVpnConnection(), - "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), - "aws_vpn_gateway": resourceAwsVpnGateway(), - "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), - "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), - "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), - "aws_waf_ipset": resourceAwsWafIPSet(), - "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), - "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), - "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), - "aws_waf_rule": resourceAwsWafRule(), - "aws_waf_rule_group": resourceAwsWafRuleGroup(), - "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), - "aws_waf_web_acl": resourceAwsWafWebAcl(), - "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), - "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), - "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), - "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), - "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), - "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), - "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), - "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), - "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), - "aws_wafregional_rule": resourceAwsWafRegionalRule(), - "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), - "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), - "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), - "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), - "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), - "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), - "aws_worklink_fleet": resourceAwsWorkLinkFleet(), - "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), - "aws_batch_job_definition": resourceAwsBatchJobDefinition(), - "aws_batch_job_queue": resourceAwsBatchJobQueue(), - "aws_pinpoint_app": resourceAwsPinpointApp(), - "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), - "aws_pinpoint_apns_channel": resourceAwsPinpointAPNSChannel(), - "aws_pinpoint_apns_sandbox_channel": resourceAwsPinpointAPNSSandboxChannel(), - "aws_pinpoint_apns_voip_channel": resourceAwsPinpointAPNSVoipChannel(), - "aws_pinpoint_apns_voip_sandbox_channel": resourceAwsPinpointAPNSVoipSandboxChannel(), - "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), - "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), - "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), - "aws_pinpoint_gcm_channel": resourceAwsPinpointGCMChannel(), - "aws_pinpoint_sms_channel": resourceAwsPinpointSMSChannel(), - - // ALBs are actually LBs because they can be type `network` or `application` - // To avoid regressions, we will add a new resource for each and they both point - // back to the old ALB version. IF the Terraform supported aliases for resources - // this would be a whole lot simpler - "aws_alb": resourceAwsLb(), - "aws_lb": resourceAwsLb(), - "aws_alb_listener": resourceAwsLbListener(), - "aws_lb_listener": resourceAwsLbListener(), - "aws_alb_listener_certificate": resourceAwsLbListenerCertificate(), - "aws_lb_listener_certificate": resourceAwsLbListenerCertificate(), - "aws_alb_listener_rule": resourceAwsLbbListenerRule(), - "aws_lb_listener_rule": resourceAwsLbbListenerRule(), - "aws_alb_target_group": resourceAwsLbTargetGroup(), - "aws_lb_target_group": resourceAwsLbTargetGroup(), - "aws_alb_target_group_attachment": resourceAwsLbTargetGroupAttachment(), - "aws_lb_target_group_attachment": resourceAwsLbTargetGroupAttachment(), - }, - ConfigureFunc: providerConfigure, - } -} - -var descriptions map[string]string - -func init() { - descriptions = map[string]string{ - "region": "The region where AWS operations will take place. Examples\n" + - "are us-east-1, us-west-2, etc.", - - "access_key": "The access key for API operations. You can retrieve this\n" + - "from the 'Security & Credentials' section of the AWS console.", - - "secret_key": "The secret key for API operations. You can retrieve this\n" + - "from the 'Security & Credentials' section of the AWS console.", - - "profile": "The profile for API operations. If not set, the default profile\n" + - "created with `aws configure` will be used.", - - "shared_credentials_file": "The path to the shared credentials file. If not set\n" + - "this defaults to ~/.aws/credentials.", - - "token": "session token. A session token is only required if you are\n" + - "using temporary security credentials.", - - "max_retries": "The maximum number of times an AWS API request is\n" + - "being executed. If the API request still fails, an error is\n" + - "thrown.", - - "apigateway_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "cloudformation_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "cloudwatch_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "cloudwatchevents_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "cloudwatchlogs_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "devicefarm_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "dynamodb_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n" + - "It's typically used to connect to dynamodb-local.", - - "kinesis_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n" + - "It's typically used to connect to kinesalite.", - - "kinesis_analytics_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "kms_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "iam_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "lambda_endpoint": "Use this to override the default endpoint URL constructed from the `region`\n", - - "ec2_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "autoscaling_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "efs_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "elb_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "es_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "rds_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "s3_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "s3control_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "sns_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "sqs_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "ssm_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - - "insecure": "Explicitly allow the provider to perform \"insecure\" SSL requests. If omitted," + - "default value is `false`", - - "skip_credentials_validation": "Skip the credentials validation via STS API. " + - "Used for AWS API implementations that do not have STS available/implemented.", - - "skip_get_ec2_platforms": "Skip getting the supported EC2 platforms. " + - "Used by users that don't have ec2:DescribeAccountAttributes permissions.", - - "skip_region_validation": "Skip static validation of region name. " + - "Used by users of alternative AWS-like APIs or users w/ access to regions that are not public (yet).", - - "skip_requesting_account_id": "Skip requesting the account ID. " + - "Used for AWS API implementations that do not have IAM/STS API and/or metadata API.", - - "skip_medatadata_api_check": "Skip the AWS Metadata API check. " + - "Used for AWS API implementations that do not have a metadata api endpoint.", - - "s3_force_path_style": "Set this to true to force the request to use path-style addressing,\n" + - "i.e., http://s3.amazonaws.com/BUCKET/KEY. By default, the S3 client will\n" + - "use virtual hosted bucket addressing when possible\n" + - "(http://BUCKET.s3.amazonaws.com/KEY). Specific to the Amazon S3 service.", - - "assume_role_role_arn": "The ARN of an IAM role to assume prior to making API calls.", - - "assume_role_session_name": "The session name to use when assuming the role. If omitted," + - " no session name is passed to the AssumeRole call.", - - "assume_role_external_id": "The external ID to use when assuming the role. If omitted," + - " no external ID is passed to the AssumeRole call.", - - "assume_role_policy": "The permissions applied when assuming a role. You cannot use," + - " this policy to grant further permissions that are in excess to those of the, " + - " role that is being assumed.", - } -} - -func providerConfigure(d *schema.ResourceData) (interface{}, error) { - config := Config{ - AccessKey: d.Get("access_key").(string), - SecretKey: d.Get("secret_key").(string), - Profile: d.Get("profile").(string), - Token: d.Get("token").(string), - Region: d.Get("region").(string), - MaxRetries: d.Get("max_retries").(int), - Insecure: d.Get("insecure").(bool), - SkipCredsValidation: d.Get("skip_credentials_validation").(bool), - SkipGetEC2Platforms: d.Get("skip_get_ec2_platforms").(bool), - SkipRegionValidation: d.Get("skip_region_validation").(bool), - SkipRequestingAccountId: d.Get("skip_requesting_account_id").(bool), - SkipMetadataApiCheck: d.Get("skip_metadata_api_check").(bool), - S3ForcePathStyle: d.Get("s3_force_path_style").(bool), - } - - // Set CredsFilename, expanding home directory - credsPath, err := homedir.Expand(d.Get("shared_credentials_file").(string)) - if err != nil { - return nil, err - } - config.CredsFilename = credsPath - - assumeRoleList := d.Get("assume_role").(*schema.Set).List() - if len(assumeRoleList) == 1 { - assumeRole := assumeRoleList[0].(map[string]interface{}) - config.AssumeRoleARN = assumeRole["role_arn"].(string) - config.AssumeRoleSessionName = assumeRole["session_name"].(string) - config.AssumeRoleExternalID = assumeRole["external_id"].(string) - - if v := assumeRole["policy"].(string); v != "" { - config.AssumeRolePolicy = v - } - - log.Printf("[INFO] assume_role configuration set: (ARN: %q, SessionID: %q, ExternalID: %q, Policy: %q)", - config.AssumeRoleARN, config.AssumeRoleSessionName, config.AssumeRoleExternalID, config.AssumeRolePolicy) - } else { - log.Printf("[INFO] No assume_role block read from configuration") - } - - endpointsSet := d.Get("endpoints").(*schema.Set) - - for _, endpointsSetI := range endpointsSet.List() { - endpoints := endpointsSetI.(map[string]interface{}) - config.AcmEndpoint = endpoints["acm"].(string) - config.ApigatewayEndpoint = endpoints["apigateway"].(string) - config.CloudFormationEndpoint = endpoints["cloudformation"].(string) - config.CloudWatchEndpoint = endpoints["cloudwatch"].(string) - config.CloudWatchEventsEndpoint = endpoints["cloudwatchevents"].(string) - config.CloudWatchLogsEndpoint = endpoints["cloudwatchlogs"].(string) - config.DeviceFarmEndpoint = endpoints["devicefarm"].(string) - config.DynamoDBEndpoint = endpoints["dynamodb"].(string) - config.Ec2Endpoint = endpoints["ec2"].(string) - config.AutoscalingEndpoint = endpoints["autoscaling"].(string) - config.EcrEndpoint = endpoints["ecr"].(string) - config.EcsEndpoint = endpoints["ecs"].(string) - config.EfsEndpoint = endpoints["efs"].(string) - config.ElbEndpoint = endpoints["elb"].(string) - config.EsEndpoint = endpoints["es"].(string) - config.IamEndpoint = endpoints["iam"].(string) - config.KinesisEndpoint = endpoints["kinesis"].(string) - config.KinesisAnalyticsEndpoint = endpoints["kinesis_analytics"].(string) - config.KmsEndpoint = endpoints["kms"].(string) - config.LambdaEndpoint = endpoints["lambda"].(string) - config.R53Endpoint = endpoints["r53"].(string) - config.RdsEndpoint = endpoints["rds"].(string) - config.S3Endpoint = endpoints["s3"].(string) - config.S3ControlEndpoint = endpoints["s3control"].(string) - config.SnsEndpoint = endpoints["sns"].(string) - config.SqsEndpoint = endpoints["sqs"].(string) - config.StsEndpoint = endpoints["sts"].(string) - config.SsmEndpoint = endpoints["ssm"].(string) - } - - if v, ok := d.GetOk("allowed_account_ids"); ok { - config.AllowedAccountIds = v.(*schema.Set).List() - } - - if v, ok := d.GetOk("forbidden_account_ids"); ok { - config.ForbiddenAccountIds = v.(*schema.Set).List() - } - - return config.Client() -} - -// This is a global MutexKV for use within this plugin. -var awsMutexKV = mutexkv.NewMutexKV() - -func assumeRoleSchema() *schema.Schema { - return &schema.Schema{ - Type: schema.TypeSet, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "role_arn": { - Type: schema.TypeString, - Optional: true, - Description: descriptions["assume_role_role_arn"], - }, - - "session_name": { - Type: schema.TypeString, - Optional: true, - Description: descriptions["assume_role_session_name"], - }, - - "external_id": { - Type: schema.TypeString, - Optional: true, - Description: descriptions["assume_role_external_id"], - }, - - "policy": { - Type: schema.TypeString, - Optional: true, - Description: descriptions["assume_role_policy"], - }, - }, - }, - } -} - -func endpointsSchema() *schema.Schema { - return &schema.Schema{ - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "acm": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["acm_endpoint"], - }, - "apigateway": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["apigateway_endpoint"], - }, - "cloudwatch": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["cloudwatch_endpoint"], - }, - "cloudwatchevents": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["cloudwatchevents_endpoint"], - }, - "cloudwatchlogs": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["cloudwatchlogs_endpoint"], - }, - "cloudformation": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["cloudformation_endpoint"], - }, - "devicefarm": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["devicefarm_endpoint"], - }, - "dynamodb": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["dynamodb_endpoint"], - }, - "iam": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["iam_endpoint"], - }, - - "ec2": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["ec2_endpoint"], - }, - - "autoscaling": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["autoscaling_endpoint"], - }, - - "ecr": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["ecr_endpoint"], - }, - - "ecs": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["ecs_endpoint"], - }, - - "efs": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["efs_endpoint"], - }, - - "elb": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["elb_endpoint"], - }, - "es": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["es_endpoint"], - }, - "kinesis": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["kinesis_endpoint"], - }, - "kinesis_analytics": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["kinesis_analytics_endpoint"], - }, - "kms": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["kms_endpoint"], - }, - "lambda": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["lambda_endpoint"], - }, - "r53": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["r53_endpoint"], - }, - "rds": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["rds_endpoint"], - }, - "s3": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["s3_endpoint"], - }, - "s3control": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["s3control_endpoint"], - }, - "sns": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["sns_endpoint"], - }, - "sqs": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["sqs_endpoint"], - }, - "sts": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["sts_endpoint"], - }, - "ssm": { - Type: schema.TypeString, - Optional: true, - Default: "", - Description: descriptions["ssm_endpoint"], - }, - }, - }, - Set: endpointsToHash, - } -} - -func endpointsToHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["apigateway"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["cloudwatch"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["cloudwatchevents"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["cloudwatchlogs"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["cloudformation"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["devicefarm"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["dynamodb"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["iam"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["ec2"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["autoscaling"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["efs"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["elb"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["kinesis"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["kms"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["lambda"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["rds"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["s3"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["sns"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["sqs"].(string))) - - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go deleted file mode 100644 index 09002b225..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go +++ /dev/null @@ -1,360 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/acm" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsAcmCertificate() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAcmCertificateCreate, - Read: resourceAwsAcmCertificateRead, - Update: resourceAwsAcmCertificateUpdate, - Delete: resourceAwsAcmCertificateDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "certificate_body": { - Type: schema.TypeString, - Optional: true, - StateFunc: normalizeCert, - }, - - "certificate_chain": { - Type: schema.TypeString, - Optional: true, - StateFunc: normalizeCert, - }, - "private_key": { - Type: schema.TypeString, - Optional: true, - StateFunc: normalizeCert, - Sensitive: true, - }, - "domain_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"private_key", "certificate_body", "certificate_chain"}, - StateFunc: func(v interface{}) string { - // AWS Provider 1.42.0+ aws_route53_zone references may contain a - // trailing period, which generates an ACM API error - return strings.TrimSuffix(v.(string), ".") - }, - }, - "subject_alternative_names": { - Type: schema.TypeList, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"private_key", "certificate_body", "certificate_chain"}, - Elem: &schema.Schema{ - Type: schema.TypeString, - StateFunc: func(v interface{}) string { - // AWS Provider 1.42.0+ aws_route53_zone references may contain a - // trailing period, which generates an ACM API error - return strings.TrimSuffix(v.(string), ".") - }, - }, - }, - "validation_method": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"private_key", "certificate_body", "certificate_chain"}, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "domain_validation_options": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "domain_name": { - Type: schema.TypeString, - Computed: true, - }, - "resource_record_name": { - Type: schema.TypeString, - Computed: true, - }, - "resource_record_type": { - Type: schema.TypeString, - Computed: true, - }, - "resource_record_value": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "validation_emails": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsAcmCertificateCreate(d *schema.ResourceData, meta interface{}) error { - if _, ok := d.GetOk("domain_name"); ok { - if _, ok := d.GetOk("validation_method"); !ok { - return errors.New("validation_method must be set when creating a certificate") - } - return resourceAwsAcmCertificateCreateRequested(d, meta) - } else if _, ok := d.GetOk("private_key"); ok { - if _, ok := d.GetOk("certificate_body"); !ok { - return errors.New("certificate_body must be set when importing a certificate with private_key") - } - return resourceAwsAcmCertificateCreateImported(d, meta) - } - return errors.New("certificate must be imported (private_key) or created (domain_name)") -} - -func resourceAwsAcmCertificateCreateImported(d *schema.ResourceData, meta interface{}) error { - acmconn := meta.(*AWSClient).acmconn - resp, err := resourceAwsAcmCertificateImport(acmconn, d, false) - if err != nil { - return fmt.Errorf("Error importing certificate: %s", err) - } - - d.SetId(*resp.CertificateArn) - if v, ok := d.GetOk("tags"); ok { - params := &acm.AddTagsToCertificateInput{ - CertificateArn: resp.CertificateArn, - Tags: tagsFromMapACM(v.(map[string]interface{})), - } - _, err := acmconn.AddTagsToCertificate(params) - - if err != nil { - return fmt.Errorf("Error requesting certificate: %s", err) - } - } - - return resourceAwsAcmCertificateRead(d, meta) -} - -func resourceAwsAcmCertificateCreateRequested(d *schema.ResourceData, meta interface{}) error { - acmconn := meta.(*AWSClient).acmconn - params := &acm.RequestCertificateInput{ - DomainName: aws.String(strings.TrimSuffix(d.Get("domain_name").(string), ".")), - ValidationMethod: aws.String(d.Get("validation_method").(string)), - } - - if sans, ok := d.GetOk("subject_alternative_names"); ok { - subjectAlternativeNames := make([]*string, len(sans.([]interface{}))) - for i, sanRaw := range sans.([]interface{}) { - subjectAlternativeNames[i] = aws.String(strings.TrimSuffix(sanRaw.(string), ".")) - } - params.SubjectAlternativeNames = subjectAlternativeNames - } - - log.Printf("[DEBUG] ACM Certificate Request: %#v", params) - resp, err := acmconn.RequestCertificate(params) - - if err != nil { - return fmt.Errorf("Error requesting certificate: %s", err) - } - - d.SetId(*resp.CertificateArn) - if v, ok := d.GetOk("tags"); ok { - params := &acm.AddTagsToCertificateInput{ - CertificateArn: resp.CertificateArn, - Tags: tagsFromMapACM(v.(map[string]interface{})), - } - _, err := acmconn.AddTagsToCertificate(params) - - if err != nil { - return fmt.Errorf("Error requesting certificate: %s", err) - } - } - - return resourceAwsAcmCertificateRead(d, meta) -} - -func resourceAwsAcmCertificateRead(d *schema.ResourceData, meta interface{}) error { - acmconn := meta.(*AWSClient).acmconn - - params := &acm.DescribeCertificateInput{ - CertificateArn: aws.String(d.Id()), - } - - return resource.Retry(time.Duration(1)*time.Minute, func() *resource.RetryError { - resp, err := acmconn.DescribeCertificate(params) - - if err != nil { - if isAWSErr(err, acm.ErrCodeResourceNotFoundException, "") { - d.SetId("") - return nil - } - return resource.NonRetryableError(fmt.Errorf("Error describing certificate: %s", err)) - } - - d.Set("domain_name", resp.Certificate.DomainName) - d.Set("arn", resp.Certificate.CertificateArn) - - if err := d.Set("subject_alternative_names", cleanUpSubjectAlternativeNames(resp.Certificate)); err != nil { - return resource.NonRetryableError(err) - } - - domainValidationOptions, emailValidationOptions, err := convertValidationOptions(resp.Certificate) - - if err != nil { - return resource.RetryableError(err) - } - - if err := d.Set("domain_validation_options", domainValidationOptions); err != nil { - return resource.NonRetryableError(err) - } - if err := d.Set("validation_emails", emailValidationOptions); err != nil { - return resource.NonRetryableError(err) - } - - d.Set("validation_method", resourceAwsAcmCertificateGuessValidationMethod(domainValidationOptions, emailValidationOptions)) - - params := &acm.ListTagsForCertificateInput{ - CertificateArn: aws.String(d.Id()), - } - - tagResp, err := acmconn.ListTagsForCertificate(params) - if err != nil { - return resource.NonRetryableError(fmt.Errorf("error listing tags for certificate (%s): %s", d.Id(), err)) - } - if err := d.Set("tags", tagsToMapACM(tagResp.Tags)); err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) -} -func resourceAwsAcmCertificateGuessValidationMethod(domainValidationOptions []map[string]interface{}, emailValidationOptions []string) string { - // The DescribeCertificate Response doesn't have information on what validation method was used - // so we need to guess from the validation options we see... - if len(domainValidationOptions) > 0 { - return acm.ValidationMethodDns - } else if len(emailValidationOptions) > 0 { - return acm.ValidationMethodEmail - } else { - return "NONE" - } -} - -func resourceAwsAcmCertificateUpdate(d *schema.ResourceData, meta interface{}) error { - acmconn := meta.(*AWSClient).acmconn - - if d.HasChange("private_key") || d.HasChange("certificate_body") || d.HasChange("certificate_chain") { - _, err := resourceAwsAcmCertificateImport(acmconn, d, true) - if err != nil { - return fmt.Errorf("Error updating certificate: %s", err) - } - } - - if d.HasChange("tags") { - err := setTagsACM(acmconn, d) - if err != nil { - return err - } - } - return resourceAwsAcmCertificateRead(d, meta) -} - -func cleanUpSubjectAlternativeNames(cert *acm.CertificateDetail) []string { - sans := cert.SubjectAlternativeNames - vs := make([]string, 0) - for _, v := range sans { - if aws.StringValue(v) != aws.StringValue(cert.DomainName) { - vs = append(vs, aws.StringValue(v)) - } - } - return vs - -} - -func convertValidationOptions(certificate *acm.CertificateDetail) ([]map[string]interface{}, []string, error) { - var domainValidationResult []map[string]interface{} - var emailValidationResult []string - - if *certificate.Type == acm.CertificateTypeAmazonIssued { - for _, o := range certificate.DomainValidationOptions { - if o.ResourceRecord != nil { - validationOption := map[string]interface{}{ - "domain_name": *o.DomainName, - "resource_record_name": *o.ResourceRecord.Name, - "resource_record_type": *o.ResourceRecord.Type, - "resource_record_value": *o.ResourceRecord.Value, - } - domainValidationResult = append(domainValidationResult, validationOption) - } else if o.ValidationEmails != nil && len(o.ValidationEmails) > 0 { - for _, validationEmail := range o.ValidationEmails { - emailValidationResult = append(emailValidationResult, *validationEmail) - } - } else if o.ValidationStatus == nil || aws.StringValue(o.ValidationStatus) == acm.DomainStatusPendingValidation { - log.Printf("[DEBUG] No validation options need to retry: %#v", o) - return nil, nil, fmt.Errorf("No validation options need to retry: %#v", o) - } - } - } - - return domainValidationResult, emailValidationResult, nil -} - -func resourceAwsAcmCertificateDelete(d *schema.ResourceData, meta interface{}) error { - acmconn := meta.(*AWSClient).acmconn - - log.Printf("[INFO] Deleting ACM Certificate: %s", d.Id()) - - params := &acm.DeleteCertificateInput{ - CertificateArn: aws.String(d.Id()), - } - - err := resource.Retry(10*time.Minute, func() *resource.RetryError { - _, err := acmconn.DeleteCertificate(params) - if err != nil { - if isAWSErr(err, acm.ErrCodeResourceInUseException, "") { - log.Printf("[WARN] Conflict deleting certificate in use: %s, retrying", err.Error()) - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil && !isAWSErr(err, acm.ErrCodeResourceNotFoundException, "") { - return fmt.Errorf("Error deleting certificate: %s", err) - } - - return nil -} - -func resourceAwsAcmCertificateImport(conn *acm.ACM, d *schema.ResourceData, update bool) (*acm.ImportCertificateOutput, error) { - params := &acm.ImportCertificateInput{ - PrivateKey: []byte(d.Get("private_key").(string)), - Certificate: []byte(d.Get("certificate_body").(string)), - } - if chain, ok := d.GetOk("certificate_chain"); ok { - params.CertificateChain = []byte(chain.(string)) - } - if update { - params.CertificateArn = aws.String(d.Get("arn").(string)) - } - - log.Printf("[DEBUG] ACM Certificate Import: %#v", params) - return conn.ImportCertificate(params) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go deleted file mode 100644 index 9cca55ef8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go +++ /dev/null @@ -1,164 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/acm" - multierror "github.com/hashicorp/go-multierror" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsAcmCertificateValidation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAcmCertificateValidationCreate, - Read: resourceAwsAcmCertificateValidationRead, - Delete: resourceAwsAcmCertificateValidationDelete, - - Schema: map[string]*schema.Schema{ - "certificate_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "validation_record_fqdns": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(45 * time.Minute), - }, - } -} - -func resourceAwsAcmCertificateValidationCreate(d *schema.ResourceData, meta interface{}) error { - certificate_arn := d.Get("certificate_arn").(string) - - acmconn := meta.(*AWSClient).acmconn - params := &acm.DescribeCertificateInput{ - CertificateArn: aws.String(certificate_arn), - } - - resp, err := acmconn.DescribeCertificate(params) - - if err != nil { - return fmt.Errorf("Error describing certificate: %s", err) - } - - if *resp.Certificate.Type != "AMAZON_ISSUED" { - return fmt.Errorf("Certificate %s has type %s, no validation necessary", *resp.Certificate.CertificateArn, *resp.Certificate.Type) - } - - if validation_record_fqdns, ok := d.GetOk("validation_record_fqdns"); ok { - err := resourceAwsAcmCertificateCheckValidationRecords(validation_record_fqdns.(*schema.Set).List(), resp.Certificate, acmconn) - if err != nil { - return err - } - } else { - log.Printf("[INFO] No validation_record_fqdns set, skipping check") - } - - return resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - resp, err := acmconn.DescribeCertificate(params) - - if err != nil { - return resource.NonRetryableError(fmt.Errorf("Error describing certificate: %s", err)) - } - - if *resp.Certificate.Status != "ISSUED" { - return resource.RetryableError(fmt.Errorf("Expected certificate to be issued but was in state %s", *resp.Certificate.Status)) - } - - log.Printf("[INFO] ACM Certificate validation for %s done, certificate was issued", certificate_arn) - return resource.NonRetryableError(resourceAwsAcmCertificateValidationRead(d, meta)) - }) -} - -func resourceAwsAcmCertificateCheckValidationRecords(validationRecordFqdns []interface{}, cert *acm.CertificateDetail, conn *acm.ACM) error { - expectedFqdns := make(map[string]*acm.DomainValidation) - - if len(cert.DomainValidationOptions) == 0 { - input := &acm.DescribeCertificateInput{ - CertificateArn: cert.CertificateArn, - } - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Certificate domain validation options empty for %q, retrying", *cert.CertificateArn) - output, err := conn.DescribeCertificate(input) - if err != nil { - return resource.NonRetryableError(err) - } - if len(output.Certificate.DomainValidationOptions) == 0 { - return resource.RetryableError(fmt.Errorf("Certificate domain validation options empty for %s", *cert.CertificateArn)) - } - cert = output.Certificate - return nil - }) - if err != nil { - return err - } - } - for _, v := range cert.DomainValidationOptions { - if v.ValidationMethod != nil { - if *v.ValidationMethod != acm.ValidationMethodDns { - return fmt.Errorf("validation_record_fqdns is only valid for DNS validation") - } - newExpectedFqdn := strings.TrimSuffix(*v.ResourceRecord.Name, ".") - expectedFqdns[newExpectedFqdn] = v - } else if len(v.ValidationEmails) > 0 { - // ACM API sometimes is not sending ValidationMethod for EMAIL validation - return fmt.Errorf("validation_record_fqdns is only valid for DNS validation") - } - } - - for _, v := range validationRecordFqdns { - delete(expectedFqdns, strings.TrimSuffix(v.(string), ".")) - } - - if len(expectedFqdns) > 0 { - var errors error - for expectedFqdn, domainValidation := range expectedFqdns { - errors = multierror.Append(errors, fmt.Errorf("missing %s DNS validation record: %s", *domainValidation.DomainName, expectedFqdn)) - } - return errors - } - - return nil -} - -func resourceAwsAcmCertificateValidationRead(d *schema.ResourceData, meta interface{}) error { - acmconn := meta.(*AWSClient).acmconn - - params := &acm.DescribeCertificateInput{ - CertificateArn: aws.String(d.Get("certificate_arn").(string)), - } - - resp, err := acmconn.DescribeCertificate(params) - - if err != nil && isAWSErr(err, acm.ErrCodeResourceNotFoundException, "") { - d.SetId("") - return nil - } else if err != nil { - return fmt.Errorf("Error describing certificate: %s", err) - } - - if *resp.Certificate.Status != "ISSUED" { - log.Printf("[INFO] Certificate status not issued, was %s, tainting validation", *resp.Certificate.Status) - d.SetId("") - } else { - d.SetId((*resp.Certificate.IssuedAt).String()) - } - return nil -} - -func resourceAwsAcmCertificateValidationDelete(d *schema.ResourceData, meta interface{}) error { - // No need to do anything, certificate will be deleted when acm_certificate is deleted - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go deleted file mode 100644 index 0ec7436fe..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go +++ /dev/null @@ -1,713 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/acmpca" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsAcmpcaCertificateAuthority() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAcmpcaCertificateAuthorityCreate, - Read: resourceAwsAcmpcaCertificateAuthorityRead, - Update: resourceAwsAcmpcaCertificateAuthorityUpdate, - Delete: resourceAwsAcmpcaCertificateAuthorityDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(1 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "certificate": { - Type: schema.TypeString, - Computed: true, - }, - // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CertificateAuthorityConfiguration.html - "certificate_authority_configuration": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key_algorithm": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - acmpca.KeyAlgorithmEcPrime256v1, - acmpca.KeyAlgorithmEcSecp384r1, - acmpca.KeyAlgorithmRsa2048, - acmpca.KeyAlgorithmRsa4096, - }, false), - }, - "signing_algorithm": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - acmpca.SigningAlgorithmSha256withecdsa, - acmpca.SigningAlgorithmSha256withrsa, - acmpca.SigningAlgorithmSha384withecdsa, - acmpca.SigningAlgorithmSha384withrsa, - acmpca.SigningAlgorithmSha512withecdsa, - acmpca.SigningAlgorithmSha512withrsa, - }, false), - }, - // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ASN1Subject.html - "subject": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "common_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 64), - }, - "country": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 2), - }, - "distinguished_name_qualifier": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 64), - }, - "generation_qualifier": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 3), - }, - "given_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 16), - }, - "initials": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 5), - }, - "locality": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 128), - }, - "organization": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 64), - }, - "organizational_unit": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 64), - }, - "pseudonym": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 128), - }, - "state": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 128), - }, - "surname": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 40), - }, - "title": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 64), - }, - }, - }, - }, - }, - }, - }, - "certificate_chain": { - Type: schema.TypeString, - Computed: true, - }, - "certificate_signing_request": { - Type: schema.TypeString, - Computed: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "not_after": { - Type: schema.TypeString, - Computed: true, - }, - "not_before": { - Type: schema.TypeString, - Computed: true, - }, - // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_RevocationConfiguration.html - "revocation_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CrlConfiguration.html - "crl_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "custom_cname": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 253), - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - }, - // ValidationException: 1 validation error detected: Value null or empty at 'expirationInDays' failed to satisfy constraint: Member must not be null or empty. - // InvalidParameter: 1 validation error(s) found. minimum field value of 1, CreateCertificateAuthorityInput.RevocationConfiguration.CrlConfiguration.ExpirationInDays. - "expiration_in_days": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(1, 5000), - }, - "s3_bucket_name": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 255), - }, - }, - }, - }, - }, - }, - }, - "serial": { - Type: schema.TypeString, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchema(), - "type": { - Type: schema.TypeString, - Optional: true, - Default: acmpca.CertificateAuthorityTypeSubordinate, - ValidateFunc: validation.StringInSlice([]string{ - acmpca.CertificateAuthorityTypeSubordinate, - }, false), - }, - }, - } -} - -func resourceAwsAcmpcaCertificateAuthorityCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).acmpcaconn - - input := &acmpca.CreateCertificateAuthorityInput{ - CertificateAuthorityConfiguration: expandAcmpcaCertificateAuthorityConfiguration(d.Get("certificate_authority_configuration").([]interface{})), - CertificateAuthorityType: aws.String(d.Get("type").(string)), - RevocationConfiguration: expandAcmpcaRevocationConfiguration(d.Get("revocation_configuration").([]interface{})), - } - - log.Printf("[DEBUG] Creating ACMPCA Certificate Authority: %s", input) - var output *acmpca.CreateCertificateAuthorityOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - output, err = conn.CreateCertificateAuthority(input) - if err != nil { - // ValidationException: The ACM Private CA service account 'acm-pca-prod-pdx' requires getBucketAcl permissions for your S3 bucket 'tf-acc-test-5224996536060125340'. Check your S3 bucket permissions and try again. - if isAWSErr(err, "ValidationException", "Check your S3 bucket permissions and try again") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error creating ACMPCA Certificate Authority: %s", err) - } - - d.SetId(aws.StringValue(output.CertificateAuthorityArn)) - - if v, ok := d.GetOk("tags"); ok { - input := &acmpca.TagCertificateAuthorityInput{ - CertificateAuthorityArn: aws.String(d.Id()), - Tags: tagsFromMapACMPCA(v.(map[string]interface{})), - } - - log.Printf("[DEBUG] Tagging ACMPCA Certificate Authority: %s", input) - _, err := conn.TagCertificateAuthority(input) - if err != nil { - return fmt.Errorf("error tagging ACMPCA Certificate Authority %q: %s", d.Id(), input) - } - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{ - "", - acmpca.CertificateAuthorityStatusCreating, - }, - Target: []string{ - acmpca.CertificateAuthorityStatusActive, - acmpca.CertificateAuthorityStatusPendingCertificate, - }, - Refresh: acmpcaCertificateAuthorityRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for ACMPCA Certificate Authority %q to be active or pending certificate: %s", d.Id(), err) - } - - return resourceAwsAcmpcaCertificateAuthorityRead(d, meta) -} - -func resourceAwsAcmpcaCertificateAuthorityRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).acmpcaconn - - describeCertificateAuthorityInput := &acmpca.DescribeCertificateAuthorityInput{ - CertificateAuthorityArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading ACMPCA Certificate Authority: %s", describeCertificateAuthorityInput) - - describeCertificateAuthorityOutput, err := conn.DescribeCertificateAuthority(describeCertificateAuthorityInput) - if err != nil { - if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] ACMPCA Certificate Authority %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading ACMPCA Certificate Authority: %s", err) - } - - if describeCertificateAuthorityOutput.CertificateAuthority == nil { - log.Printf("[WARN] ACMPCA Certificate Authority %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - certificateAuthority := describeCertificateAuthorityOutput.CertificateAuthority - - d.Set("arn", certificateAuthority.Arn) - - if err := d.Set("certificate_authority_configuration", flattenAcmpcaCertificateAuthorityConfiguration(certificateAuthority.CertificateAuthorityConfiguration)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - d.Set("enabled", (aws.StringValue(certificateAuthority.Status) != acmpca.CertificateAuthorityStatusDisabled)) - d.Set("not_after", certificateAuthority.NotAfter) - d.Set("not_before", certificateAuthority.NotBefore) - - if err := d.Set("revocation_configuration", flattenAcmpcaRevocationConfiguration(certificateAuthority.RevocationConfiguration)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - d.Set("serial", certificateAuthority.Serial) - d.Set("status", certificateAuthority.Status) - d.Set("type", certificateAuthority.Type) - - getCertificateAuthorityCertificateInput := &acmpca.GetCertificateAuthorityCertificateInput{ - CertificateAuthorityArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading ACMPCA Certificate Authority Certificate: %s", getCertificateAuthorityCertificateInput) - - getCertificateAuthorityCertificateOutput, err := conn.GetCertificateAuthorityCertificate(getCertificateAuthorityCertificateInput) - if err != nil { - if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] ACMPCA Certificate Authority %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - // Returned when in PENDING_CERTIFICATE status - // InvalidStateException: The certificate authority XXXXX is not in the correct state to have a certificate signing request. - if !isAWSErr(err, acmpca.ErrCodeInvalidStateException, "") { - return fmt.Errorf("error reading ACMPCA Certificate Authority Certificate: %s", err) - } - } - - d.Set("certificate", "") - d.Set("certificate_chain", "") - if getCertificateAuthorityCertificateOutput != nil { - d.Set("certificate", getCertificateAuthorityCertificateOutput.Certificate) - d.Set("certificate_chain", getCertificateAuthorityCertificateOutput.CertificateChain) - } - - getCertificateAuthorityCsrInput := &acmpca.GetCertificateAuthorityCsrInput{ - CertificateAuthorityArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading ACMPCA Certificate Authority Certificate Signing Request: %s", getCertificateAuthorityCsrInput) - - getCertificateAuthorityCsrOutput, err := conn.GetCertificateAuthorityCsr(getCertificateAuthorityCsrInput) - if err != nil { - if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] ACMPCA Certificate Authority %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading ACMPCA Certificate Authority Certificate Signing Request: %s", err) - } - - d.Set("certificate_signing_request", "") - if getCertificateAuthorityCsrOutput != nil { - d.Set("certificate_signing_request", getCertificateAuthorityCsrOutput.Csr) - } - - tags, err := listAcmpcaTags(conn, d.Id()) - if err != nil { - return fmt.Errorf("error reading ACMPCA Certificate Authority %q tags: %s", d.Id(), err) - } - - if err := d.Set("tags", tagsToMapACMPCA(tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func resourceAwsAcmpcaCertificateAuthorityUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).acmpcaconn - updateCertificateAuthority := false - - input := &acmpca.UpdateCertificateAuthorityInput{ - CertificateAuthorityArn: aws.String(d.Id()), - } - - if d.HasChange("enabled") { - input.Status = aws.String(acmpca.CertificateAuthorityStatusActive) - if !d.Get("enabled").(bool) { - input.Status = aws.String(acmpca.CertificateAuthorityStatusDisabled) - } - updateCertificateAuthority = true - } - - if d.HasChange("revocation_configuration") { - input.RevocationConfiguration = expandAcmpcaRevocationConfiguration(d.Get("revocation_configuration").([]interface{})) - updateCertificateAuthority = true - } - - if updateCertificateAuthority { - log.Printf("[DEBUG] Updating ACMPCA Certificate Authority: %s", input) - _, err := conn.UpdateCertificateAuthority(input) - if err != nil { - return fmt.Errorf("error updating ACMPCA Certificate Authority: %s", err) - } - } - - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsACMPCA(tagsFromMapACMPCA(o), tagsFromMapACMPCA(n)) - - if len(remove) > 0 { - log.Printf("[DEBUG] Removing ACMPCA Certificate Authority %q tags: %#v", d.Id(), remove) - _, err := conn.UntagCertificateAuthority(&acmpca.UntagCertificateAuthorityInput{ - CertificateAuthorityArn: aws.String(d.Id()), - Tags: remove, - }) - if err != nil { - return fmt.Errorf("error updating ACMPCA Certificate Authority %q tags: %s", d.Id(), err) - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating ACMPCA Certificate Authority %q tags: %#v", d.Id(), create) - _, err := conn.TagCertificateAuthority(&acmpca.TagCertificateAuthorityInput{ - CertificateAuthorityArn: aws.String(d.Id()), - Tags: create, - }) - if err != nil { - return fmt.Errorf("error updating ACMPCA Certificate Authority %q tags: %s", d.Id(), err) - } - } - } - - return resourceAwsAcmpcaCertificateAuthorityRead(d, meta) -} - -func resourceAwsAcmpcaCertificateAuthorityDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).acmpcaconn - - input := &acmpca.DeleteCertificateAuthorityInput{ - CertificateAuthorityArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting ACMPCA Certificate Authority: %s", input) - _, err := conn.DeleteCertificateAuthority(input) - if err != nil { - if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { - return nil - } - return fmt.Errorf("error deleting ACMPCA Certificate Authority: %s", err) - } - - return nil -} - -func acmpcaCertificateAuthorityRefreshFunc(conn *acmpca.ACMPCA, certificateAuthorityArn string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &acmpca.DescribeCertificateAuthorityInput{ - CertificateAuthorityArn: aws.String(certificateAuthorityArn), - } - - log.Printf("[DEBUG] Reading ACMPCA Certificate Authority: %s", input) - output, err := conn.DescribeCertificateAuthority(input) - if err != nil { - if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { - return nil, "", nil - } - return nil, "", err - } - - if output == nil || output.CertificateAuthority == nil { - return nil, "", nil - } - - return output.CertificateAuthority, aws.StringValue(output.CertificateAuthority.Status), nil - } -} - -func expandAcmpcaASN1Subject(l []interface{}) *acmpca.ASN1Subject { - if len(l) == 0 { - return nil - } - - m := l[0].(map[string]interface{}) - - subject := &acmpca.ASN1Subject{} - if v, ok := m["common_name"]; ok && v.(string) != "" { - subject.CommonName = aws.String(v.(string)) - } - if v, ok := m["country"]; ok && v.(string) != "" { - subject.Country = aws.String(v.(string)) - } - if v, ok := m["distinguished_name_qualifier"]; ok && v.(string) != "" { - subject.DistinguishedNameQualifier = aws.String(v.(string)) - } - if v, ok := m["generation_qualifier"]; ok && v.(string) != "" { - subject.GenerationQualifier = aws.String(v.(string)) - } - if v, ok := m["given_name"]; ok && v.(string) != "" { - subject.GivenName = aws.String(v.(string)) - } - if v, ok := m["initials"]; ok && v.(string) != "" { - subject.Initials = aws.String(v.(string)) - } - if v, ok := m["locality"]; ok && v.(string) != "" { - subject.Locality = aws.String(v.(string)) - } - if v, ok := m["organization"]; ok && v.(string) != "" { - subject.Organization = aws.String(v.(string)) - } - if v, ok := m["organizational_unit"]; ok && v.(string) != "" { - subject.OrganizationalUnit = aws.String(v.(string)) - } - if v, ok := m["pseudonym"]; ok && v.(string) != "" { - subject.Pseudonym = aws.String(v.(string)) - } - if v, ok := m["state"]; ok && v.(string) != "" { - subject.State = aws.String(v.(string)) - } - if v, ok := m["surname"]; ok && v.(string) != "" { - subject.Surname = aws.String(v.(string)) - } - if v, ok := m["title"]; ok && v.(string) != "" { - subject.Title = aws.String(v.(string)) - } - - return subject -} - -func expandAcmpcaCertificateAuthorityConfiguration(l []interface{}) *acmpca.CertificateAuthorityConfiguration { - if len(l) == 0 { - return nil - } - - m := l[0].(map[string]interface{}) - - config := &acmpca.CertificateAuthorityConfiguration{ - KeyAlgorithm: aws.String(m["key_algorithm"].(string)), - SigningAlgorithm: aws.String(m["signing_algorithm"].(string)), - Subject: expandAcmpcaASN1Subject(m["subject"].([]interface{})), - } - - return config -} - -func expandAcmpcaCrlConfiguration(l []interface{}) *acmpca.CrlConfiguration { - if len(l) == 0 { - return nil - } - - m := l[0].(map[string]interface{}) - - config := &acmpca.CrlConfiguration{ - Enabled: aws.Bool(m["enabled"].(bool)), - } - - if v, ok := m["custom_cname"]; ok && v.(string) != "" { - config.CustomCname = aws.String(v.(string)) - } - if v, ok := m["expiration_in_days"]; ok && v.(int) > 0 { - config.ExpirationInDays = aws.Int64(int64(v.(int))) - } - if v, ok := m["s3_bucket_name"]; ok && v.(string) != "" { - config.S3BucketName = aws.String(v.(string)) - } - - return config -} - -func expandAcmpcaRevocationConfiguration(l []interface{}) *acmpca.RevocationConfiguration { - if len(l) == 0 { - return nil - } - - m := l[0].(map[string]interface{}) - - config := &acmpca.RevocationConfiguration{ - CrlConfiguration: expandAcmpcaCrlConfiguration(m["crl_configuration"].([]interface{})), - } - - return config -} - -func flattenAcmpcaASN1Subject(subject *acmpca.ASN1Subject) []interface{} { - if subject == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "common_name": aws.StringValue(subject.CommonName), - "country": aws.StringValue(subject.Country), - "distinguished_name_qualifier": aws.StringValue(subject.DistinguishedNameQualifier), - "generation_qualifier": aws.StringValue(subject.GenerationQualifier), - "given_name": aws.StringValue(subject.GivenName), - "initials": aws.StringValue(subject.Initials), - "locality": aws.StringValue(subject.Locality), - "organization": aws.StringValue(subject.Organization), - "organizational_unit": aws.StringValue(subject.OrganizationalUnit), - "pseudonym": aws.StringValue(subject.Pseudonym), - "state": aws.StringValue(subject.State), - "surname": aws.StringValue(subject.Surname), - "title": aws.StringValue(subject.Title), - } - - return []interface{}{m} -} - -func flattenAcmpcaCertificateAuthorityConfiguration(config *acmpca.CertificateAuthorityConfiguration) []interface{} { - if config == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "key_algorithm": aws.StringValue(config.KeyAlgorithm), - "signing_algorithm": aws.StringValue(config.SigningAlgorithm), - "subject": flattenAcmpcaASN1Subject(config.Subject), - } - - return []interface{}{m} -} - -func flattenAcmpcaCrlConfiguration(config *acmpca.CrlConfiguration) []interface{} { - if config == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "custom_cname": aws.StringValue(config.CustomCname), - "enabled": aws.BoolValue(config.Enabled), - "expiration_in_days": int(aws.Int64Value(config.ExpirationInDays)), - "s3_bucket_name": aws.StringValue(config.S3BucketName), - } - - return []interface{}{m} -} - -func flattenAcmpcaRevocationConfiguration(config *acmpca.RevocationConfiguration) []interface{} { - if config == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "crl_configuration": flattenAcmpcaCrlConfiguration(config.CrlConfiguration), - } - - return []interface{}{m} -} - -func listAcmpcaTags(conn *acmpca.ACMPCA, certificateAuthorityArn string) ([]*acmpca.Tag, error) { - tags := []*acmpca.Tag{} - input := &acmpca.ListTagsInput{ - CertificateAuthorityArn: aws.String(certificateAuthorityArn), - } - - for { - output, err := conn.ListTags(input) - if err != nil { - return tags, err - } - tags = append(tags, output.Tags...) - if output.NextToken == nil { - break - } - input.NextToken = output.NextToken - } - - return tags, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go deleted file mode 100644 index f1e0ca9a3..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go +++ /dev/null @@ -1,536 +0,0 @@ -package aws - -import ( - "bytes" - "errors" - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -const ( - AWSAMIRetryTimeout = 40 * time.Minute - AWSAMIDeleteRetryTimeout = 90 * time.Minute - AWSAMIRetryDelay = 5 * time.Second - AWSAMIRetryMinTimeout = 3 * time.Second -) - -func resourceAwsAmi() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAmiCreate, - // The Read, Update and Delete operations are shared with aws_ami_copy - // and aws_ami_from_instance, since they differ only in how the image - // is created. - Read: resourceAwsAmiRead, - Update: resourceAwsAmiUpdate, - Delete: resourceAwsAmiDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(AWSAMIRetryTimeout), - Update: schema.DefaultTimeout(AWSAMIRetryTimeout), - Delete: schema.DefaultTimeout(AWSAMIDeleteRetryTimeout), - }, - - Schema: map[string]*schema.Schema{ - "image_location": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "architecture": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "x86_64", - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - // The following block device attributes intentionally mimick the - // corresponding attributes on aws_instance, since they have the - // same meaning. - // However, we don't use root_block_device here because the constraint - // on which root device attributes can be overridden for an instance to - // not apply when registering an AMI. - "ebs_block_device": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Optional: true, - Default: true, - ForceNew: true, - }, - - "device_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "encrypted": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - - "iops": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - - "snapshot_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "volume_size": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "volume_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "standard", - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["device_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["snapshot_id"].(string))) - return hashcode.String(buf.String()) - }, - }, - "ena_support": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - "ephemeral_block_device": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "device_name": { - Type: schema.TypeString, - Required: true, - }, - - "virtual_name": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["device_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["virtual_name"].(string))) - return hashcode.String(buf.String()) - }, - }, - "kernel_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - // Not a public attribute; used to let the aws_ami_copy and aws_ami_from_instance - // resources record that they implicitly created new EBS snapshots that we should - // now manage. Not set by aws_ami, since the snapshots used there are presumed to - // be independently managed. - "manage_ebs_snapshots": { - Type: schema.TypeBool, - Computed: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "ramdisk_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "root_device_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "root_snapshot_id": { - Type: schema.TypeString, - Computed: true, - }, - "sriov_net_support": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "simple", - }, - "tags": tagsSchema(), - "virtualization_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "paravirtual", - }, - }, - } -} - -func resourceAwsAmiCreate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).ec2conn - - req := &ec2.RegisterImageInput{ - Name: aws.String(d.Get("name").(string)), - Description: aws.String(d.Get("description").(string)), - Architecture: aws.String(d.Get("architecture").(string)), - ImageLocation: aws.String(d.Get("image_location").(string)), - RootDeviceName: aws.String(d.Get("root_device_name").(string)), - SriovNetSupport: aws.String(d.Get("sriov_net_support").(string)), - VirtualizationType: aws.String(d.Get("virtualization_type").(string)), - EnaSupport: aws.Bool(d.Get("ena_support").(bool)), - } - - if kernelId := d.Get("kernel_id").(string); kernelId != "" { - req.KernelId = aws.String(kernelId) - } - if ramdiskId := d.Get("ramdisk_id").(string); ramdiskId != "" { - req.RamdiskId = aws.String(ramdiskId) - } - - ebsBlockDevsSet := d.Get("ebs_block_device").(*schema.Set) - ephemeralBlockDevsSet := d.Get("ephemeral_block_device").(*schema.Set) - for _, ebsBlockDevI := range ebsBlockDevsSet.List() { - ebsBlockDev := ebsBlockDevI.(map[string]interface{}) - blockDev := &ec2.BlockDeviceMapping{ - DeviceName: aws.String(ebsBlockDev["device_name"].(string)), - Ebs: &ec2.EbsBlockDevice{ - DeleteOnTermination: aws.Bool(ebsBlockDev["delete_on_termination"].(bool)), - VolumeType: aws.String(ebsBlockDev["volume_type"].(string)), - }, - } - if iops, ok := ebsBlockDev["iops"]; ok { - if iop := iops.(int); iop != 0 { - blockDev.Ebs.Iops = aws.Int64(int64(iop)) - } - } - if size, ok := ebsBlockDev["volume_size"]; ok { - if s := size.(int); s != 0 { - blockDev.Ebs.VolumeSize = aws.Int64(int64(s)) - } - } - encrypted := ebsBlockDev["encrypted"].(bool) - if snapshotId := ebsBlockDev["snapshot_id"].(string); snapshotId != "" { - blockDev.Ebs.SnapshotId = aws.String(snapshotId) - if encrypted { - return errors.New("can't set both 'snapshot_id' and 'encrypted'") - } - } else if encrypted { - blockDev.Ebs.Encrypted = aws.Bool(true) - } - req.BlockDeviceMappings = append(req.BlockDeviceMappings, blockDev) - } - for _, ephemeralBlockDevI := range ephemeralBlockDevsSet.List() { - ephemeralBlockDev := ephemeralBlockDevI.(map[string]interface{}) - blockDev := &ec2.BlockDeviceMapping{ - DeviceName: aws.String(ephemeralBlockDev["device_name"].(string)), - VirtualName: aws.String(ephemeralBlockDev["virtual_name"].(string)), - } - req.BlockDeviceMappings = append(req.BlockDeviceMappings, blockDev) - } - - res, err := client.RegisterImage(req) - if err != nil { - return err - } - - id := *res.ImageId - d.SetId(id) - - _, err = resourceAwsAmiWaitForAvailable(d.Timeout(schema.TimeoutCreate), id, client) - if err != nil { - return err - } - - return resourceAwsAmiUpdate(d, meta) -} - -func resourceAwsAmiRead(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).ec2conn - id := d.Id() - - req := &ec2.DescribeImagesInput{ - ImageIds: []*string{aws.String(id)}, - } - - var res *ec2.DescribeImagesOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - res, err = client.DescribeImages(req) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidAMIID.NotFound" { - if d.IsNewResource() { - return resource.RetryableError(err) - } - - log.Printf("[DEBUG] %s no longer exists, so we'll drop it from the state", id) - d.SetId("") - return nil - } - - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Unable to find AMI after retries: %s", err) - } - - if len(res.Images) != 1 { - d.SetId("") - return nil - } - - image := res.Images[0] - state := *image.State - - if state == "pending" { - // This could happen if a user manually adds an image we didn't create - // to the state. We'll wait for the image to become available - // before we continue. We should never take this branch in normal - // circumstances since we would've waited for availability during - // the "Create" step. - image, err = resourceAwsAmiWaitForAvailable(d.Timeout(schema.TimeoutCreate), id, client) - if err != nil { - return err - } - state = *image.State - } - - if state == "deregistered" { - d.SetId("") - return nil - } - - if state != "available" { - return fmt.Errorf("AMI has become %s", state) - } - - d.Set("name", image.Name) - d.Set("description", image.Description) - d.Set("image_location", image.ImageLocation) - d.Set("architecture", image.Architecture) - d.Set("kernel_id", image.KernelId) - d.Set("ramdisk_id", image.RamdiskId) - d.Set("root_device_name", image.RootDeviceName) - d.Set("root_snapshot_id", amiRootSnapshotId(image)) - d.Set("sriov_net_support", image.SriovNetSupport) - d.Set("virtualization_type", image.VirtualizationType) - d.Set("ena_support", image.EnaSupport) - - var ebsBlockDevs []map[string]interface{} - var ephemeralBlockDevs []map[string]interface{} - - for _, blockDev := range image.BlockDeviceMappings { - if blockDev.Ebs != nil { - ebsBlockDev := map[string]interface{}{ - "device_name": *blockDev.DeviceName, - "delete_on_termination": *blockDev.Ebs.DeleteOnTermination, - "encrypted": *blockDev.Ebs.Encrypted, - "iops": 0, - "volume_size": int(*blockDev.Ebs.VolumeSize), - "volume_type": *blockDev.Ebs.VolumeType, - } - if blockDev.Ebs.Iops != nil { - ebsBlockDev["iops"] = int(*blockDev.Ebs.Iops) - } - // The snapshot ID might not be set. - if blockDev.Ebs.SnapshotId != nil { - ebsBlockDev["snapshot_id"] = *blockDev.Ebs.SnapshotId - } - ebsBlockDevs = append(ebsBlockDevs, ebsBlockDev) - } else { - ephemeralBlockDevs = append(ephemeralBlockDevs, map[string]interface{}{ - "device_name": *blockDev.DeviceName, - "virtual_name": *blockDev.VirtualName, - }) - } - } - - d.Set("ebs_block_device", ebsBlockDevs) - d.Set("ephemeral_block_device", ephemeralBlockDevs) - - d.Set("tags", tagsToMap(image.Tags)) - - return nil -} - -func resourceAwsAmiUpdate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).ec2conn - - d.Partial(true) - - if err := setTags(client, d); err != nil { - return err - } else { - d.SetPartial("tags") - } - - if d.Get("description").(string) != "" { - _, err := client.ModifyImageAttribute(&ec2.ModifyImageAttributeInput{ - ImageId: aws.String(d.Id()), - Description: &ec2.AttributeValue{ - Value: aws.String(d.Get("description").(string)), - }, - }) - if err != nil { - return err - } - d.SetPartial("description") - } - - d.Partial(false) - - return resourceAwsAmiRead(d, meta) -} - -func resourceAwsAmiDelete(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).ec2conn - - req := &ec2.DeregisterImageInput{ - ImageId: aws.String(d.Id()), - } - - _, err := client.DeregisterImage(req) - if err != nil { - return err - } - - // If we're managing the EBS snapshots then we need to delete those too. - if d.Get("manage_ebs_snapshots").(bool) { - errs := map[string]error{} - ebsBlockDevsSet := d.Get("ebs_block_device").(*schema.Set) - req := &ec2.DeleteSnapshotInput{} - for _, ebsBlockDevI := range ebsBlockDevsSet.List() { - ebsBlockDev := ebsBlockDevI.(map[string]interface{}) - snapshotId := ebsBlockDev["snapshot_id"].(string) - if snapshotId != "" { - req.SnapshotId = aws.String(snapshotId) - _, err := client.DeleteSnapshot(req) - if err != nil { - errs[snapshotId] = err - } - } - } - - if len(errs) > 0 { - errParts := []string{"Errors while deleting associated EBS snapshots:"} - for snapshotId, err := range errs { - errParts = append(errParts, fmt.Sprintf("%s: %s", snapshotId, err)) - } - errParts = append(errParts, "These are no longer managed by Terraform and must be deleted manually.") - return errors.New(strings.Join(errParts, "\n")) - } - } - - // Verify that the image is actually removed, if not we need to wait for it to be removed - if err := resourceAwsAmiWaitForDestroy(d.Timeout(schema.TimeoutDelete), d.Id(), client); err != nil { - return err - } - - return nil -} - -func AMIStateRefreshFunc(client *ec2.EC2, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - emptyResp := &ec2.DescribeImagesOutput{} - - resp, err := client.DescribeImages(&ec2.DescribeImagesInput{ImageIds: []*string{aws.String(id)}}) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidAMIID.NotFound" { - return emptyResp, "destroyed", nil - } else if resp != nil && len(resp.Images) == 0 { - return emptyResp, "destroyed", nil - } else { - return emptyResp, "", fmt.Errorf("Error on refresh: %+v", err) - } - } - - if resp == nil || resp.Images == nil || len(resp.Images) == 0 { - return emptyResp, "destroyed", nil - } - - // AMI is valid, so return it's state - return resp.Images[0], *resp.Images[0].State, nil - } -} - -func resourceAwsAmiWaitForDestroy(timeout time.Duration, id string, client *ec2.EC2) error { - log.Printf("Waiting for AMI %s to be deleted...", id) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"available", "pending", "failed"}, - Target: []string{"destroyed"}, - Refresh: AMIStateRefreshFunc(client, id), - Timeout: timeout, - Delay: AWSAMIRetryDelay, - MinTimeout: AWSAMIRetryMinTimeout, - } - - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for AMI (%s) to be deleted: %v", id, err) - } - - return nil -} - -func resourceAwsAmiWaitForAvailable(timeout time.Duration, id string, client *ec2.EC2) (*ec2.Image, error) { - log.Printf("Waiting for AMI %s to become available...", id) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"available"}, - Refresh: AMIStateRefreshFunc(client, id), - Timeout: timeout, - Delay: AWSAMIRetryDelay, - MinTimeout: AWSAMIRetryMinTimeout, - } - - info, err := stateConf.WaitForState() - if err != nil { - return nil, fmt.Errorf("Error waiting for AMI (%s) to be ready: %v", id, err) - } - return info.(*ec2.Image), nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_copy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_copy.go deleted file mode 100644 index e74d74f86..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_copy.go +++ /dev/null @@ -1,228 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsAmiCopy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAmiCopyCreate, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(AWSAMIRetryTimeout), - Update: schema.DefaultTimeout(AWSAMIRetryTimeout), - Delete: schema.DefaultTimeout(AWSAMIDeleteRetryTimeout), - }, - - Schema: map[string]*schema.Schema{ - "architecture": { - Type: schema.TypeString, - Computed: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - // The following block device attributes intentionally mimick the - // corresponding attributes on aws_instance, since they have the - // same meaning. - // However, we don't use root_block_device here because the constraint - // on which root device attributes can be overridden for an instance to - // not apply when registering an AMI. - "ebs_block_device": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Computed: true, - }, - - "device_name": { - Type: schema.TypeString, - Computed: true, - }, - - "encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - - "iops": { - Type: schema.TypeInt, - Computed: true, - }, - - "snapshot_id": { - Type: schema.TypeString, - Computed: true, - }, - - "volume_size": { - Type: schema.TypeInt, - Computed: true, - }, - - "volume_type": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["device_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["snapshot_id"].(string))) - return hashcode.String(buf.String()) - }, - }, - "ephemeral_block_device": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "device_name": { - Type: schema.TypeString, - Computed: true, - }, - - "virtual_name": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["device_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["virtual_name"].(string))) - return hashcode.String(buf.String()) - }, - }, - "ena_support": { - Type: schema.TypeBool, - Computed: true, - }, - "encrypted": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - "image_location": { - Type: schema.TypeString, - Computed: true, - }, - "kernel_id": { - Type: schema.TypeString, - Computed: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - // Not a public attribute; used to let the aws_ami_copy and aws_ami_from_instance - // resources record that they implicitly created new EBS snapshots that we should - // now manage. Not set by aws_ami, since the snapshots used there are presumed to - // be independently managed. - "manage_ebs_snapshots": { - Type: schema.TypeBool, - Computed: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "ramdisk_id": { - Type: schema.TypeString, - Computed: true, - }, - "root_device_name": { - Type: schema.TypeString, - Computed: true, - }, - "root_snapshot_id": { - Type: schema.TypeString, - Computed: true, - }, - "source_ami_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "source_ami_region": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "sriov_net_support": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchema(), - "virtualization_type": { - Type: schema.TypeString, - Computed: true, - }, - }, - - // The remaining operations are shared with the generic aws_ami resource, - // since the aws_ami_copy resource only differs in how it's created. - Read: resourceAwsAmiRead, - Update: resourceAwsAmiUpdate, - Delete: resourceAwsAmiDelete, - } -} - -func resourceAwsAmiCopyCreate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).ec2conn - - req := &ec2.CopyImageInput{ - Name: aws.String(d.Get("name").(string)), - Description: aws.String(d.Get("description").(string)), - SourceImageId: aws.String(d.Get("source_ami_id").(string)), - SourceRegion: aws.String(d.Get("source_ami_region").(string)), - Encrypted: aws.Bool(d.Get("encrypted").(bool)), - } - - if v, ok := d.GetOk("kms_key_id"); ok { - req.KmsKeyId = aws.String(v.(string)) - } - - res, err := client.CopyImage(req) - if err != nil { - return err - } - - id := *res.ImageId - d.SetId(id) - d.Partial(true) // make sure we record the id even if the rest of this gets interrupted - d.Set("manage_ebs_snapshots", true) - d.SetPartial("manage_ebs_snapshots") - d.Partial(false) - - _, err = resourceAwsAmiWaitForAvailable(d.Timeout(schema.TimeoutCreate), id, client) - if err != nil { - return err - } - - return resourceAwsAmiUpdate(d, meta) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_from_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_from_instance.go deleted file mode 100644 index af05db1f1..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_from_instance.go +++ /dev/null @@ -1,210 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsAmiFromInstance() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAmiFromInstanceCreate, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(AWSAMIRetryTimeout), - Update: schema.DefaultTimeout(AWSAMIRetryTimeout), - Delete: schema.DefaultTimeout(AWSAMIDeleteRetryTimeout), - }, - - Schema: map[string]*schema.Schema{ - "architecture": { - Type: schema.TypeString, - Computed: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - // The following block device attributes intentionally mimick the - // corresponding attributes on aws_instance, since they have the - // same meaning. - // However, we don't use root_block_device here because the constraint - // on which root device attributes can be overridden for an instance to - // not apply when registering an AMI. - "ebs_block_device": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Computed: true, - }, - - "device_name": { - Type: schema.TypeString, - Computed: true, - }, - - "encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - - "iops": { - Type: schema.TypeInt, - Computed: true, - }, - - "snapshot_id": { - Type: schema.TypeString, - Computed: true, - }, - - "volume_size": { - Type: schema.TypeInt, - Computed: true, - }, - - "volume_type": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["device_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["snapshot_id"].(string))) - return hashcode.String(buf.String()) - }, - }, - "ena_support": { - Type: schema.TypeBool, - Computed: true, - }, - "ephemeral_block_device": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "device_name": { - Type: schema.TypeString, - Computed: true, - }, - - "virtual_name": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["device_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["virtual_name"].(string))) - return hashcode.String(buf.String()) - }, - }, - "image_location": { - Type: schema.TypeString, - Computed: true, - }, - "kernel_id": { - Type: schema.TypeString, - Computed: true, - }, - // Not a public attribute; used to let the aws_ami_copy and aws_ami_from_instance - // resources record that they implicitly created new EBS snapshots that we should - // now manage. Not set by aws_ami, since the snapshots used there are presumed to - // be independently managed. - "manage_ebs_snapshots": { - Type: schema.TypeBool, - Computed: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "ramdisk_id": { - Type: schema.TypeString, - Computed: true, - }, - "root_device_name": { - Type: schema.TypeString, - Computed: true, - }, - "root_snapshot_id": { - Type: schema.TypeString, - Computed: true, - }, - "source_instance_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "snapshot_without_reboot": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - "sriov_net_support": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchema(), - "virtualization_type": { - Type: schema.TypeString, - Computed: true, - }, - }, - - // The remaining operations are shared with the generic aws_ami resource, - // since the aws_ami_copy resource only differs in how it's created. - Read: resourceAwsAmiRead, - Update: resourceAwsAmiUpdate, - Delete: resourceAwsAmiDelete, - } -} - -func resourceAwsAmiFromInstanceCreate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).ec2conn - - req := &ec2.CreateImageInput{ - Name: aws.String(d.Get("name").(string)), - Description: aws.String(d.Get("description").(string)), - InstanceId: aws.String(d.Get("source_instance_id").(string)), - NoReboot: aws.Bool(d.Get("snapshot_without_reboot").(bool)), - } - - res, err := client.CreateImage(req) - if err != nil { - return err - } - - id := *res.ImageId - d.SetId(id) - d.Partial(true) // make sure we record the id even if the rest of this gets interrupted - d.Set("manage_ebs_snapshots", true) - d.SetPartial("manage_ebs_snapshots") - d.Partial(false) - - _, err = resourceAwsAmiWaitForAvailable(d.Timeout(schema.TimeoutCreate), id, client) - if err != nil { - return err - } - - return resourceAwsAmiUpdate(d, meta) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_launch_permission.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_launch_permission.go deleted file mode 100644 index 9d075c3a4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_launch_permission.go +++ /dev/null @@ -1,114 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsAmiLaunchPermission() *schema.Resource { - return &schema.Resource{ - Exists: resourceAwsAmiLaunchPermissionExists, - Create: resourceAwsAmiLaunchPermissionCreate, - Read: resourceAwsAmiLaunchPermissionRead, - Delete: resourceAwsAmiLaunchPermissionDelete, - - Schema: map[string]*schema.Schema{ - "image_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "account_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsAmiLaunchPermissionExists(d *schema.ResourceData, meta interface{}) (bool, error) { - conn := meta.(*AWSClient).ec2conn - - image_id := d.Get("image_id").(string) - account_id := d.Get("account_id").(string) - return hasLaunchPermission(conn, image_id, account_id) -} - -func resourceAwsAmiLaunchPermissionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - image_id := d.Get("image_id").(string) - account_id := d.Get("account_id").(string) - - _, err := conn.ModifyImageAttribute(&ec2.ModifyImageAttributeInput{ - ImageId: aws.String(image_id), - Attribute: aws.String("launchPermission"), - LaunchPermission: &ec2.LaunchPermissionModifications{ - Add: []*ec2.LaunchPermission{ - {UserId: aws.String(account_id)}, - }, - }, - }) - if err != nil { - return fmt.Errorf("error creating ami launch permission: %s", err) - } - - d.SetId(fmt.Sprintf("%s-%s", image_id, account_id)) - return nil -} - -func resourceAwsAmiLaunchPermissionRead(d *schema.ResourceData, meta interface{}) error { - return nil -} - -func resourceAwsAmiLaunchPermissionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - image_id := d.Get("image_id").(string) - account_id := d.Get("account_id").(string) - - _, err := conn.ModifyImageAttribute(&ec2.ModifyImageAttributeInput{ - ImageId: aws.String(image_id), - Attribute: aws.String("launchPermission"), - LaunchPermission: &ec2.LaunchPermissionModifications{ - Remove: []*ec2.LaunchPermission{ - {UserId: aws.String(account_id)}, - }, - }, - }) - if err != nil { - return fmt.Errorf("error removing ami launch permission: %s", err) - } - - return nil -} - -func hasLaunchPermission(conn *ec2.EC2, image_id string, account_id string) (bool, error) { - attrs, err := conn.DescribeImageAttribute(&ec2.DescribeImageAttributeInput{ - ImageId: aws.String(image_id), - Attribute: aws.String("launchPermission"), - }) - if err != nil { - // When an AMI disappears out from under a launch permission resource, we will - // see either InvalidAMIID.NotFound or InvalidAMIID.Unavailable. - if ec2err, ok := err.(awserr.Error); ok && strings.HasPrefix(ec2err.Code(), "InvalidAMIID") { - log.Printf("[DEBUG] %s no longer exists, so we'll drop launch permission for %s from the state", image_id, account_id) - return false, nil - } - return false, err - } - - for _, lp := range attrs.LaunchPermissions { - if aws.StringValue(lp.UserId) == account_id { - return true, nil - } - } - return false, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_account.go deleted file mode 100644 index 29365633b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_account.go +++ /dev/null @@ -1,126 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayAccount() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayAccountUpdate, - Read: resourceAwsApiGatewayAccountRead, - Update: resourceAwsApiGatewayAccountUpdate, - Delete: resourceAwsApiGatewayAccountDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "cloudwatch_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - "throttle_settings": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "burst_limit": { - Type: schema.TypeInt, - Computed: true, - }, - "rate_limit": { - Type: schema.TypeFloat, - Computed: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsApiGatewayAccountRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[INFO] Reading API Gateway Account %s", d.Id()) - account, err := conn.GetAccount(&apigateway.GetAccountInput{}) - if err != nil { - return err - } - - log.Printf("[DEBUG] Received API Gateway Account: %s", account) - - if _, ok := d.GetOk("cloudwatch_role_arn"); ok { - // CloudwatchRoleArn cannot be empty nor made empty via API - // This resource can however be useful w/out defining cloudwatch_role_arn - // (e.g. for referencing throttle_settings) - d.Set("cloudwatch_role_arn", account.CloudwatchRoleArn) - } - d.Set("throttle_settings", flattenApiGatewayThrottleSettings(account.ThrottleSettings)) - - return nil -} - -func resourceAwsApiGatewayAccountUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - input := apigateway.UpdateAccountInput{} - operations := make([]*apigateway.PatchOperation, 0) - - if d.HasChange("cloudwatch_role_arn") { - arn := d.Get("cloudwatch_role_arn").(string) - if len(arn) > 0 { - // Unfortunately AWS API doesn't allow empty ARNs, - // even though that's default settings for new AWS accounts - // BadRequestException: The role ARN is not well formed - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/cloudwatchRoleArn"), - Value: aws.String(arn), - }) - } - } - input.PatchOperations = operations - - log.Printf("[INFO] Updating API Gateway Account: %s", input) - - // Retry due to eventual consistency of IAM - expectedErrMsg := "The role ARN does not have required permissions set to API Gateway" - otherErrMsg := "API Gateway could not successfully write to CloudWatch Logs using the ARN specified" - var out *apigateway.Account - var err error - err = resource.Retry(2*time.Minute, func() *resource.RetryError { - out, err = conn.UpdateAccount(&input) - - if err != nil { - if isAWSErr(err, "BadRequestException", expectedErrMsg) || - isAWSErr(err, "BadRequestException", otherErrMsg) { - log.Printf("[DEBUG] Retrying API Gateway Account update: %s", err) - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - - return nil - }) - if err != nil { - return fmt.Errorf("Updating API Gateway Account failed: %s", err) - } - log.Printf("[DEBUG] API Gateway Account updated: %s", out) - - d.SetId("api-gateway-account") - return resourceAwsApiGatewayAccountRead(d, meta) -} - -func resourceAwsApiGatewayAccountDelete(d *schema.ResourceData, meta interface{}) error { - // There is no API for "deleting" account or resetting it to "default" settings - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_api_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_api_key.go deleted file mode 100644 index 7748a74ec..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_api_key.go +++ /dev/null @@ -1,205 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsApiGatewayApiKey() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayApiKeyCreate, - Read: resourceAwsApiGatewayApiKeyRead, - Update: resourceAwsApiGatewayApiKeyUpdate, - Delete: resourceAwsApiGatewayApiKeyDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - Default: "Managed by Terraform", - }, - - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "stage_key": { - Type: schema.TypeSet, - Optional: true, - Deprecated: "Since the API Gateway usage plans feature was launched on August 11, 2016, usage plans are now required to associate an API key with an API stage", - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "rest_api_id": { - Type: schema.TypeString, - Required: true, - }, - - "stage_name": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - - "created_date": { - Type: schema.TypeString, - Computed: true, - }, - - "last_updated_date": { - Type: schema.TypeString, - Computed: true, - }, - - "value": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - Sensitive: true, - ValidateFunc: validation.StringLenBetween(30, 128), - }, - }, - } -} - -func resourceAwsApiGatewayApiKeyCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Creating API Gateway API Key") - - apiKey, err := conn.CreateApiKey(&apigateway.CreateApiKeyInput{ - Name: aws.String(d.Get("name").(string)), - Description: aws.String(d.Get("description").(string)), - Enabled: aws.Bool(d.Get("enabled").(bool)), - Value: aws.String(d.Get("value").(string)), - StageKeys: expandApiGatewayStageKeys(d), - }) - if err != nil { - return fmt.Errorf("Error creating API Gateway: %s", err) - } - - d.SetId(aws.StringValue(apiKey.Id)) - - return resourceAwsApiGatewayApiKeyRead(d, meta) -} - -func resourceAwsApiGatewayApiKeyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Reading API Gateway API Key: %s", d.Id()) - - apiKey, err := conn.GetApiKey(&apigateway.GetApiKeyInput{ - ApiKey: aws.String(d.Id()), - IncludeValue: aws.Bool(true), - }) - if err != nil { - if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { - log.Printf("[WARN] API Gateway API Key (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("name", apiKey.Name) - d.Set("description", apiKey.Description) - d.Set("enabled", apiKey.Enabled) - d.Set("stage_key", flattenApiGatewayStageKeys(apiKey.StageKeys)) - d.Set("value", apiKey.Value) - - if err := d.Set("created_date", apiKey.CreatedDate.Format(time.RFC3339)); err != nil { - log.Printf("[DEBUG] Error setting created_date: %s", err) - } - - if err := d.Set("last_updated_date", apiKey.LastUpdatedDate.Format(time.RFC3339)); err != nil { - log.Printf("[DEBUG] Error setting last_updated_date: %s", err) - } - - return nil -} - -func resourceAwsApiGatewayApiKeyUpdateOperations(d *schema.ResourceData) []*apigateway.PatchOperation { - operations := make([]*apigateway.PatchOperation, 0) - if d.HasChange("enabled") { - isEnabled := "false" - if d.Get("enabled").(bool) { - isEnabled = "true" - } - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/enabled"), - Value: aws.String(isEnabled), - }) - } - - if d.HasChange("description") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/description"), - Value: aws.String(d.Get("description").(string)), - }) - } - - if d.HasChange("stage_key") { - operations = append(operations, expandApiGatewayStageKeyOperations(d)...) - } - return operations -} - -func resourceAwsApiGatewayApiKeyUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Updating API Gateway API Key: %s", d.Id()) - - _, err := conn.UpdateApiKey(&apigateway.UpdateApiKeyInput{ - ApiKey: aws.String(d.Id()), - PatchOperations: resourceAwsApiGatewayApiKeyUpdateOperations(d), - }) - if err != nil { - return err - } - - return resourceAwsApiGatewayApiKeyRead(d, meta) -} - -func resourceAwsApiGatewayApiKeyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway API Key: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteApiKey(&apigateway.DeleteApiKeyInput{ - ApiKey: aws.String(d.Id()), - }) - - if err == nil { - return nil - } - - if err != nil { - if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { - return nil - } - } - - return resource.NonRetryableError(err) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_authorizer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_authorizer.go deleted file mode 100644 index ef069d6a7..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_authorizer.go +++ /dev/null @@ -1,288 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsApiGatewayAuthorizer() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayAuthorizerCreate, - Read: resourceAwsApiGatewayAuthorizerRead, - Update: resourceAwsApiGatewayAuthorizerUpdate, - Delete: resourceAwsApiGatewayAuthorizerDelete, - CustomizeDiff: resourceAwsApiGatewayAuthorizerCustomizeDiff, - - Schema: map[string]*schema.Schema{ - "authorizer_uri": { - Type: schema.TypeString, - Optional: true, // authorizer_uri is required for authorizer TOKEN/REQUEST - }, - "identity_source": { - Type: schema.TypeString, - Optional: true, - Default: "method.request.header.Authorization", - }, - "name": { - Type: schema.TypeString, - Required: true, - }, - "rest_api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - Default: "TOKEN", - ValidateFunc: validation.StringInSlice([]string{ - apigateway.AuthorizerTypeCognitoUserPools, - apigateway.AuthorizerTypeRequest, - apigateway.AuthorizerTypeToken, - }, false), - }, - "authorizer_credentials": { - Type: schema.TypeString, - Optional: true, - }, - "authorizer_result_ttl_in_seconds": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(0, 3600), - }, - "identity_validation_expression": { - Type: schema.TypeString, - Optional: true, - }, - "provider_arns": { - Type: schema.TypeSet, - Optional: true, // provider_arns is required for authorizer COGNITO_USER_POOLS. - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func resourceAwsApiGatewayAuthorizerCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - input := apigateway.CreateAuthorizerInput{ - IdentitySource: aws.String(d.Get("identity_source").(string)), - Name: aws.String(d.Get("name").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - Type: aws.String(d.Get("type").(string)), - } - - if err := validateAuthorizerType(d); err != nil { - return err - } - if v, ok := d.GetOk("authorizer_uri"); ok { - input.AuthorizerUri = aws.String(v.(string)) - } - if v, ok := d.GetOk("authorizer_credentials"); ok { - input.AuthorizerCredentials = aws.String(v.(string)) - } - if v, ok := d.GetOk("authorizer_result_ttl_in_seconds"); ok { - input.AuthorizerResultTtlInSeconds = aws.Int64(int64(v.(int))) - } - if v, ok := d.GetOk("identity_validation_expression"); ok { - input.IdentityValidationExpression = aws.String(v.(string)) - } - if v, ok := d.GetOk("provider_arns"); ok { - input.ProviderARNs = expandStringList(v.(*schema.Set).List()) - } - - log.Printf("[INFO] Creating API Gateway Authorizer: %s", input) - out, err := conn.CreateAuthorizer(&input) - if err != nil { - return fmt.Errorf("Error creating API Gateway Authorizer: %s", err) - } - - d.SetId(*out.Id) - - return resourceAwsApiGatewayAuthorizerRead(d, meta) -} - -func resourceAwsApiGatewayAuthorizerRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[INFO] Reading API Gateway Authorizer %s", d.Id()) - input := apigateway.GetAuthorizerInput{ - AuthorizerId: aws.String(d.Id()), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - } - - authorizer, err := conn.GetAuthorizer(&input) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] No API Gateway Authorizer found: %s", input) - d.SetId("") - return nil - } - return err - } - log.Printf("[DEBUG] Received API Gateway Authorizer: %s", authorizer) - - d.Set("authorizer_credentials", authorizer.AuthorizerCredentials) - d.Set("authorizer_result_ttl_in_seconds", authorizer.AuthorizerResultTtlInSeconds) - d.Set("authorizer_uri", authorizer.AuthorizerUri) - d.Set("identity_source", authorizer.IdentitySource) - d.Set("identity_validation_expression", authorizer.IdentityValidationExpression) - d.Set("name", authorizer.Name) - d.Set("type", authorizer.Type) - d.Set("provider_arns", flattenStringList(authorizer.ProviderARNs)) - - return nil -} - -func resourceAwsApiGatewayAuthorizerUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - input := apigateway.UpdateAuthorizerInput{ - AuthorizerId: aws.String(d.Id()), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - } - - operations := make([]*apigateway.PatchOperation, 0) - - if d.HasChange("authorizer_uri") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/authorizerUri"), - Value: aws.String(d.Get("authorizer_uri").(string)), - }) - } - if d.HasChange("identity_source") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/identitySource"), - Value: aws.String(d.Get("identity_source").(string)), - }) - } - if d.HasChange("name") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/name"), - Value: aws.String(d.Get("name").(string)), - }) - } - if d.HasChange("type") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/type"), - Value: aws.String(d.Get("type").(string)), - }) - } - if d.HasChange("authorizer_credentials") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/authorizerCredentials"), - Value: aws.String(d.Get("authorizer_credentials").(string)), - }) - } - if d.HasChange("authorizer_result_ttl_in_seconds") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/authorizerResultTtlInSeconds"), - Value: aws.String(fmt.Sprintf("%d", d.Get("authorizer_result_ttl_in_seconds").(int))), - }) - } - if d.HasChange("identity_validation_expression") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/identityValidationExpression"), - Value: aws.String(d.Get("identity_validation_expression").(string)), - }) - } - if d.HasChange("provider_arns") { - old, new := d.GetChange("provider_arns") - os := old.(*schema.Set) - ns := new.(*schema.Set) - // providerARNs can't be empty, so add first and then remove - additionList := ns.Difference(os) - for _, v := range additionList.List() { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String("/providerARNs"), - Value: aws.String(v.(string)), - }) - } - removalList := os.Difference(ns) - for _, v := range removalList.List() { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String("/providerARNs"), - Value: aws.String(v.(string)), - }) - } - } - - input.PatchOperations = operations - - log.Printf("[INFO] Updating API Gateway Authorizer: %s", input) - _, err := conn.UpdateAuthorizer(&input) - if err != nil { - return fmt.Errorf("Updating API Gateway Authorizer failed: %s", err) - } - - return resourceAwsApiGatewayAuthorizerRead(d, meta) -} - -func resourceAwsApiGatewayAuthorizerDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - input := apigateway.DeleteAuthorizerInput{ - AuthorizerId: aws.String(d.Id()), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - } - log.Printf("[INFO] Deleting API Gateway Authorizer: %s", input) - _, err := conn.DeleteAuthorizer(&input) - if err != nil { - // XXX: Figure out a way to delete the method that depends on the authorizer first - // otherwise the authorizer will be dangling until the API is deleted - if !strings.Contains(err.Error(), "ConflictException") { - return fmt.Errorf("Deleting API Gateway Authorizer failed: %s", err) - } - } - - return nil -} - -func resourceAwsApiGatewayAuthorizerCustomizeDiff(diff *schema.ResourceDiff, v interface{}) error { - // switch type between COGNITO_USER_POOLS and TOKEN/REQUEST will create new resource. - if diff.HasChange("type") { - o, n := diff.GetChange("type") - if o.(string) == apigateway.AuthorizerTypeCognitoUserPools || n.(string) == apigateway.AuthorizerTypeCognitoUserPools { - if err := diff.ForceNew("type"); err != nil { - return err - } - } - } - - return nil -} - -func validateAuthorizerType(d *schema.ResourceData) error { - authType := d.Get("type").(string) - // authorizer_uri is required for authorizer TOKEN/REQUEST - if authType == apigateway.AuthorizerTypeRequest || authType == apigateway.AuthorizerTypeToken { - if v, ok := d.GetOk("authorizer_uri"); !ok || v.(string) == "" { - return fmt.Errorf("authorizer_uri must be set non-empty when authorizer type is %s", authType) - } - } - // provider_arns is required for authorizer COGNITO_USER_POOLS. - if authType == apigateway.AuthorizerTypeCognitoUserPools { - if v, ok := d.GetOk("provider_arns"); !ok || len(v.(*schema.Set).List()) == 0 { - return fmt.Errorf("provider_arns must be set non-empty when authorizer type is %s", authType) - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_base_path_mapping.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_base_path_mapping.go deleted file mode 100644 index dfbcd7041..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_base_path_mapping.go +++ /dev/null @@ -1,166 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -const emptyBasePathMappingValue = "(none)" - -func resourceAwsApiGatewayBasePathMapping() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayBasePathMappingCreate, - Read: resourceAwsApiGatewayBasePathMappingRead, - Delete: resourceAwsApiGatewayBasePathMappingDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "base_path": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "stage_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "domain_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsApiGatewayBasePathMappingCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - err := resource.Retry(30*time.Second, func() *resource.RetryError { - _, err := conn.CreateBasePathMapping(&apigateway.CreateBasePathMappingInput{ - RestApiId: aws.String(d.Get("api_id").(string)), - DomainName: aws.String(d.Get("domain_name").(string)), - BasePath: aws.String(d.Get("base_path").(string)), - Stage: aws.String(d.Get("stage_name").(string)), - }) - - if err != nil { - if err, ok := err.(awserr.Error); ok && err.Code() != "BadRequestException" { - return resource.NonRetryableError(err) - } - - return resource.RetryableError( - fmt.Errorf("Error creating Gateway base path mapping: %s", err), - ) - } - - return nil - }) - - if err != nil { - return fmt.Errorf("Error creating Gateway base path mapping: %s", err) - } - - id := fmt.Sprintf("%s/%s", d.Get("domain_name").(string), d.Get("base_path").(string)) - d.SetId(id) - - return resourceAwsApiGatewayBasePathMappingRead(d, meta) -} - -func resourceAwsApiGatewayBasePathMappingRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - domainName, basePath, err := decodeApiGatewayBasePathMappingId(d.Id()) - if err != nil { - return err - } - - mapping, err := conn.GetBasePathMapping(&apigateway.GetBasePathMappingInput{ - DomainName: aws.String(domainName), - BasePath: aws.String(basePath), - }) - if err != nil { - if err, ok := err.(awserr.Error); ok && err.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Base Path Mapping (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("Error reading Gateway base path mapping: %s", err) - } - - mappingBasePath := *mapping.BasePath - - if mappingBasePath == emptyBasePathMappingValue { - mappingBasePath = "" - } - - d.Set("base_path", mappingBasePath) - d.Set("domain_name", domainName) - d.Set("api_id", mapping.RestApiId) - d.Set("stage_name", mapping.Stage) - - return nil -} - -func resourceAwsApiGatewayBasePathMappingDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - domainName, basePath, err := decodeApiGatewayBasePathMappingId(d.Id()) - if err != nil { - return err - } - - _, err = conn.DeleteBasePathMapping(&apigateway.DeleteBasePathMappingInput{ - DomainName: aws.String(domainName), - BasePath: aws.String(basePath), - }) - - if err != nil { - if err, ok := err.(awserr.Error); ok && err.Code() == "NotFoundException" { - return nil - } - - return err - } - - return nil -} - -func decodeApiGatewayBasePathMappingId(id string) (string, string, error) { - idFormatErr := fmt.Errorf("Unexpected format of ID (%q), expected DOMAIN/BASEPATH", id) - - parts := strings.SplitN(id, "/", 2) - if len(parts) != 2 { - return "", "", idFormatErr - } - - domainName := parts[0] - basePath := parts[1] - - if domainName == "" { - return "", "", idFormatErr - } - - if basePath == "" { - basePath = emptyBasePathMappingValue - } - - return domainName, basePath, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_client_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_client_certificate.go deleted file mode 100644 index e5ab97385..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_client_certificate.go +++ /dev/null @@ -1,125 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayClientCertificate() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayClientCertificateCreate, - Read: resourceAwsApiGatewayClientCertificateRead, - Update: resourceAwsApiGatewayClientCertificateUpdate, - Delete: resourceAwsApiGatewayClientCertificateDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "description": { - Type: schema.TypeString, - Optional: true, - }, - "created_date": { - Type: schema.TypeString, - Computed: true, - }, - "expiration_date": { - Type: schema.TypeString, - Computed: true, - }, - "pem_encoded_certificate": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsApiGatewayClientCertificateCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - input := apigateway.GenerateClientCertificateInput{} - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - log.Printf("[DEBUG] Generating API Gateway Client Certificate: %s", input) - out, err := conn.GenerateClientCertificate(&input) - if err != nil { - return fmt.Errorf("Failed to generate client certificate: %s", err) - } - - d.SetId(*out.ClientCertificateId) - - return resourceAwsApiGatewayClientCertificateRead(d, meta) -} - -func resourceAwsApiGatewayClientCertificateRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - input := apigateway.GetClientCertificateInput{ - ClientCertificateId: aws.String(d.Id()), - } - out, err := conn.GetClientCertificate(&input) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Client Certificate %s not found, removing", d.Id()) - d.SetId("") - return nil - } - return err - } - log.Printf("[DEBUG] Received API Gateway Client Certificate: %s", out) - - d.Set("description", out.Description) - d.Set("created_date", out.CreatedDate.String()) - d.Set("expiration_date", out.ExpirationDate.String()) - d.Set("pem_encoded_certificate", out.PemEncodedCertificate) - - return nil -} - -func resourceAwsApiGatewayClientCertificateUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - operations := make([]*apigateway.PatchOperation, 0) - if d.HasChange("description") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/description"), - Value: aws.String(d.Get("description").(string)), - }) - } - - input := apigateway.UpdateClientCertificateInput{ - ClientCertificateId: aws.String(d.Id()), - PatchOperations: operations, - } - - log.Printf("[DEBUG] Updating API Gateway Client Certificate: %s", input) - _, err := conn.UpdateClientCertificate(&input) - if err != nil { - return fmt.Errorf("Updating API Gateway Client Certificate failed: %s", err) - } - - return resourceAwsApiGatewayClientCertificateRead(d, meta) -} - -func resourceAwsApiGatewayClientCertificateDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway Client Certificate: %s", d.Id()) - input := apigateway.DeleteClientCertificateInput{ - ClientCertificateId: aws.String(d.Id()), - } - _, err := conn.DeleteClientCertificate(&input) - if err != nil { - return fmt.Errorf("Deleting API Gateway Client Certificate failed: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_deployment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_deployment.go deleted file mode 100644 index 252c0db97..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_deployment.go +++ /dev/null @@ -1,222 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayDeployment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayDeploymentCreate, - Read: resourceAwsApiGatewayDeploymentRead, - Update: resourceAwsApiGatewayDeploymentUpdate, - Delete: resourceAwsApiGatewayDeploymentDelete, - - Schema: map[string]*schema.Schema{ - "rest_api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "stage_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - }, - - "stage_description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "variables": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "created_date": { - Type: schema.TypeString, - Computed: true, - }, - - "invoke_url": { - Type: schema.TypeString, - Computed: true, - }, - - "execution_arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsApiGatewayDeploymentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - // Create the gateway - log.Printf("[DEBUG] Creating API Gateway Deployment") - - variables := make(map[string]string) - for k, v := range d.Get("variables").(map[string]interface{}) { - variables[k] = v.(string) - } - - var err error - deployment, err := conn.CreateDeployment(&apigateway.CreateDeploymentInput{ - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StageName: aws.String(d.Get("stage_name").(string)), - Description: aws.String(d.Get("description").(string)), - StageDescription: aws.String(d.Get("stage_description").(string)), - Variables: aws.StringMap(variables), - }) - if err != nil { - return fmt.Errorf("Error creating API Gateway Deployment: %s", err) - } - - d.SetId(*deployment.Id) - log.Printf("[DEBUG] API Gateway Deployment ID: %s", d.Id()) - - return resourceAwsApiGatewayDeploymentRead(d, meta) -} - -func resourceAwsApiGatewayDeploymentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Reading API Gateway Deployment %s", d.Id()) - restApiId := d.Get("rest_api_id").(string) - out, err := conn.GetDeployment(&apigateway.GetDeploymentInput{ - RestApiId: aws.String(restApiId), - DeploymentId: aws.String(d.Id()), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Deployment (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - log.Printf("[DEBUG] Received API Gateway Deployment: %s", out) - d.Set("description", out.Description) - - region := meta.(*AWSClient).region - stageName := d.Get("stage_name").(string) - - d.Set("invoke_url", buildApiGatewayInvokeURL(restApiId, region, stageName)) - - executionArn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "execute-api", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("%s/%s", restApiId, stageName), - }.String() - d.Set("execution_arn", executionArn) - - if err := d.Set("created_date", out.CreatedDate.Format(time.RFC3339)); err != nil { - log.Printf("[DEBUG] Error setting created_date: %s", err) - } - - return nil -} - -func resourceAwsApiGatewayDeploymentUpdateOperations(d *schema.ResourceData) []*apigateway.PatchOperation { - operations := make([]*apigateway.PatchOperation, 0) - - if d.HasChange("description") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/description"), - Value: aws.String(d.Get("description").(string)), - }) - } - - return operations -} - -func resourceAwsApiGatewayDeploymentUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Updating API Gateway API Key: %s", d.Id()) - - _, err := conn.UpdateDeployment(&apigateway.UpdateDeploymentInput{ - DeploymentId: aws.String(d.Id()), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - PatchOperations: resourceAwsApiGatewayDeploymentUpdateOperations(d), - }) - if err != nil { - return err - } - - return resourceAwsApiGatewayDeploymentRead(d, meta) -} - -func resourceAwsApiGatewayDeploymentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway Deployment: %s", d.Id()) - - // If the stage has been updated to point at a different deployment, then - // the stage should not be removed when this deployment is deleted. - shouldDeleteStage := false - - // API Gateway allows an empty state name (e.g. ""), but the AWS Go SDK - // now has validation for the parameter, so we must check first. - // InvalidParameter: 1 validation error(s) found. - // - minimum field size of 1, GetStageInput.StageName. - stageName := d.Get("stage_name").(string) - if stageName != "" { - stage, err := conn.GetStage(&apigateway.GetStageInput{ - StageName: aws.String(stageName), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }) - - if err != nil && !isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { - return fmt.Errorf("error getting referenced stage: %s", err) - } - - if stage != nil && aws.StringValue(stage.DeploymentId) == d.Id() { - shouldDeleteStage = true - } - } - - if shouldDeleteStage { - if _, err := conn.DeleteStage(&apigateway.DeleteStageInput{ - StageName: aws.String(d.Get("stage_name").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }); err == nil { - return nil - } - } - - _, err := conn.DeleteDeployment(&apigateway.DeleteDeploymentInput{ - DeploymentId: aws.String(d.Id()), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }) - - if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting API Gateway Deployment (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_documentation_part.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_documentation_part.go deleted file mode 100644 index 95d4f9924..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_documentation_part.go +++ /dev/null @@ -1,226 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayDocumentationPart() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayDocumentationPartCreate, - Read: resourceAwsApiGatewayDocumentationPartRead, - Update: resourceAwsApiGatewayDocumentationPartUpdate, - Delete: resourceAwsApiGatewayDocumentationPartDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "location": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "method": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "path": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "status_code": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - }, - }, - "properties": { - Type: schema.TypeString, - Required: true, - }, - "rest_api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsApiGatewayDocumentationPartCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - apiId := d.Get("rest_api_id").(string) - out, err := conn.CreateDocumentationPart(&apigateway.CreateDocumentationPartInput{ - Location: expandApiGatewayDocumentationPartLocation(d.Get("location").([]interface{})), - Properties: aws.String(d.Get("properties").(string)), - RestApiId: aws.String(apiId), - }) - if err != nil { - return err - } - d.SetId(apiId + "/" + *out.Id) - - return nil -} - -func resourceAwsApiGatewayDocumentationPartRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[INFO] Reading API Gateway Documentation Part %s", d.Id()) - - apiId, id, err := decodeApiGatewayDocumentationPartId(d.Id()) - if err != nil { - return err - } - - docPart, err := conn.GetDocumentationPart(&apigateway.GetDocumentationPartInput{ - DocumentationPartId: aws.String(id), - RestApiId: aws.String(apiId), - }) - if err != nil { - if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { - log.Printf("[WARN] API Gateway Documentation Part (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - log.Printf("[DEBUG] Received API Gateway Documentation Part: %s", docPart) - - d.Set("rest_api_id", apiId) - d.Set("location", flattenApiGatewayDocumentationPartLocation(docPart.Location)) - d.Set("properties", docPart.Properties) - - return nil -} - -func resourceAwsApiGatewayDocumentationPartUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - apiId, id, err := decodeApiGatewayDocumentationPartId(d.Id()) - if err != nil { - return err - } - - input := apigateway.UpdateDocumentationPartInput{ - DocumentationPartId: aws.String(id), - RestApiId: aws.String(apiId), - } - operations := make([]*apigateway.PatchOperation, 0) - - if d.HasChange("properties") { - properties := d.Get("properties").(string) - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/properties"), - Value: aws.String(properties), - }) - } - - input.PatchOperations = operations - - log.Printf("[INFO] Updating API Gateway Documentation Part: %s", input) - - out, err := conn.UpdateDocumentationPart(&input) - if err != nil { - return err - } - - log.Printf("[DEBUG] API Gateway Documentation Part updated: %s", out) - - return resourceAwsApiGatewayDocumentationPartRead(d, meta) -} - -func resourceAwsApiGatewayDocumentationPartDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - apiId, id, err := decodeApiGatewayDocumentationPartId(d.Id()) - if err != nil { - return err - } - - _, err = conn.DeleteDocumentationPart(&apigateway.DeleteDocumentationPartInput{ - DocumentationPartId: aws.String(id), - RestApiId: aws.String(apiId), - }) - return err -} - -func expandApiGatewayDocumentationPartLocation(l []interface{}) *apigateway.DocumentationPartLocation { - if len(l) == 0 { - return nil - } - loc := l[0].(map[string]interface{}) - out := &apigateway.DocumentationPartLocation{ - Type: aws.String(loc["type"].(string)), - } - if v, ok := loc["method"]; ok { - out.Method = aws.String(v.(string)) - } - if v, ok := loc["name"]; ok { - out.Name = aws.String(v.(string)) - } - if v, ok := loc["path"]; ok { - out.Path = aws.String(v.(string)) - } - if v, ok := loc["status_code"]; ok { - out.StatusCode = aws.String(v.(string)) - } - return out -} - -func flattenApiGatewayDocumentationPartLocation(l *apigateway.DocumentationPartLocation) []interface{} { - if l == nil { - return []interface{}{} - } - - m := make(map[string]interface{}) - m["type"] = *l.Type - if l.Method != nil { - m["method"] = *l.Method - } - if l.Name != nil { - m["name"] = *l.Name - } - if l.Path != nil { - m["path"] = *l.Path - } - if l.StatusCode != nil { - m["status_code"] = *l.StatusCode - } - - return []interface{}{m} -} - -func decodeApiGatewayDocumentationPartId(id string) (string, string, error) { - parts := strings.Split(id, "/") - if len(parts) != 2 { - return "", "", fmt.Errorf("Unexpected format of ID (%q), expected REST-API-ID/ID", id) - } - return parts[0], parts[1], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_documentation_version.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_documentation_version.go deleted file mode 100644 index 6f0280744..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_documentation_version.go +++ /dev/null @@ -1,137 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayDocumentationVersion() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayDocumentationVersionCreate, - Read: resourceAwsApiGatewayDocumentationVersionRead, - Update: resourceAwsApiGatewayDocumentationVersionUpdate, - Delete: resourceAwsApiGatewayDocumentationVersionDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "version": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "rest_api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsApiGatewayDocumentationVersionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - restApiId := d.Get("rest_api_id").(string) - - params := &apigateway.CreateDocumentationVersionInput{ - DocumentationVersion: aws.String(d.Get("version").(string)), - RestApiId: aws.String(restApiId), - } - if v, ok := d.GetOk("description"); ok { - params.Description = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating API Gateway Documentation Version: %s", params) - - version, err := conn.CreateDocumentationVersion(params) - if err != nil { - return fmt.Errorf("Error creating API Gateway Documentation Version: %s", err) - } - - d.SetId(restApiId + "/" + *version.Version) - - return resourceAwsApiGatewayDocumentationVersionRead(d, meta) -} - -func resourceAwsApiGatewayDocumentationVersionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Reading API Gateway Documentation Version %s", d.Id()) - - apiId, docVersion, err := decodeApiGatewayDocumentationVersionId(d.Id()) - if err != nil { - return err - } - - version, err := conn.GetDocumentationVersion(&apigateway.GetDocumentationVersionInput{ - DocumentationVersion: aws.String(docVersion), - RestApiId: aws.String(apiId), - }) - if err != nil { - if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { - log.Printf("[WARN] API Gateway Documentation Version (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("rest_api_id", apiId) - d.Set("description", version.Description) - d.Set("version", version.Version) - - return nil -} - -func resourceAwsApiGatewayDocumentationVersionUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Updating API Gateway Documentation Version %s", d.Id()) - - _, err := conn.UpdateDocumentationVersion(&apigateway.UpdateDocumentationVersionInput{ - DocumentationVersion: aws.String(d.Get("version").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - PatchOperations: []*apigateway.PatchOperation{ - { - Op: aws.String(apigateway.OpReplace), - Path: aws.String("/description"), - Value: aws.String(d.Get("description").(string)), - }, - }, - }) - if err != nil { - return err - } - log.Printf("[DEBUG] Updated API Gateway Documentation Version %s", d.Id()) - - return resourceAwsApiGatewayDocumentationVersionRead(d, meta) -} - -func resourceAwsApiGatewayDocumentationVersionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway Documentation Version: %s", d.Id()) - - _, err := conn.DeleteDocumentationVersion(&apigateway.DeleteDocumentationVersionInput{ - DocumentationVersion: aws.String(d.Get("version").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }) - return err -} - -func decodeApiGatewayDocumentationVersionId(id string) (string, string, error) { - parts := strings.Split(id, "/") - if len(parts) != 2 { - return "", "", fmt.Errorf("Expected ID in the form of REST-API-ID/VERSION, given: %q", id) - } - return parts[0], parts[1], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_domain_name.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_domain_name.go deleted file mode 100644 index b7669899f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_domain_name.go +++ /dev/null @@ -1,312 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsApiGatewayDomainName() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayDomainNameCreate, - Read: resourceAwsApiGatewayDomainNameRead, - Update: resourceAwsApiGatewayDomainNameUpdate, - Delete: resourceAwsApiGatewayDomainNameDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - - //According to AWS Documentation, ACM will be the only way to add certificates - //to ApiGateway DomainNames. When this happens, we will be deprecating all certificate methods - //except certificate_arn. We are not quite sure when this will happen. - "certificate_body": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - ConflictsWith: []string{"certificate_arn", "regional_certificate_arn"}, - }, - - "certificate_chain": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - ConflictsWith: []string{"certificate_arn", "regional_certificate_arn"}, - }, - - "certificate_name": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"certificate_arn", "regional_certificate_arn", "regional_certificate_name"}, - }, - - "certificate_private_key": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - Sensitive: true, - ConflictsWith: []string{"certificate_arn", "regional_certificate_arn"}, - }, - - "domain_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "certificate_arn": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"certificate_body", "certificate_chain", "certificate_name", "certificate_private_key", "regional_certificate_arn", "regional_certificate_name"}, - }, - - "cloudfront_domain_name": { - Type: schema.TypeString, - Computed: true, - }, - - "certificate_upload_date": { - Type: schema.TypeString, - Computed: true, - }, - - "cloudfront_zone_id": { - Type: schema.TypeString, - Computed: true, - }, - - "endpoint_configuration": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "types": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - // BadRequestException: Cannot create an api with multiple Endpoint Types - MaxItems: 1, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - apigateway.EndpointTypeEdge, - apigateway.EndpointTypeRegional, - }, false), - }, - }, - }, - }, - }, - - "regional_certificate_arn": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"certificate_arn", "certificate_body", "certificate_chain", "certificate_name", "certificate_private_key", "regional_certificate_name"}, - }, - - "regional_certificate_name": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"certificate_arn", "certificate_name", "regional_certificate_arn"}, - }, - - "regional_domain_name": { - Type: schema.TypeString, - Computed: true, - }, - - "regional_zone_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsApiGatewayDomainNameCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Creating API Gateway Domain Name") - - params := &apigateway.CreateDomainNameInput{ - DomainName: aws.String(d.Get("domain_name").(string)), - } - - if v, ok := d.GetOk("certificate_arn"); ok { - params.CertificateArn = aws.String(v.(string)) - } - - if v, ok := d.GetOk("certificate_name"); ok { - params.CertificateName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("certificate_body"); ok { - params.CertificateBody = aws.String(v.(string)) - } - - if v, ok := d.GetOk("certificate_chain"); ok { - params.CertificateChain = aws.String(v.(string)) - } - - if v, ok := d.GetOk("certificate_private_key"); ok { - params.CertificatePrivateKey = aws.String(v.(string)) - } - - if v, ok := d.GetOk("endpoint_configuration"); ok { - params.EndpointConfiguration = expandApiGatewayEndpointConfiguration(v.([]interface{})) - } - - if v, ok := d.GetOk("regional_certificate_arn"); ok && v.(string) != "" { - params.RegionalCertificateArn = aws.String(v.(string)) - } - - if v, ok := d.GetOk("regional_certificate_name"); ok && v.(string) != "" { - params.RegionalCertificateName = aws.String(v.(string)) - } - - domainName, err := conn.CreateDomainName(params) - if err != nil { - return fmt.Errorf("Error creating API Gateway Domain Name: %s", err) - } - - d.SetId(*domainName.DomainName) - - return resourceAwsApiGatewayDomainNameRead(d, meta) -} - -func resourceAwsApiGatewayDomainNameRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Reading API Gateway Domain Name %s", d.Id()) - - domainName, err := conn.GetDomainName(&apigateway.GetDomainNameInput{ - DomainName: aws.String(d.Id()), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Domain Name (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("certificate_arn", domainName.CertificateArn) - d.Set("certificate_name", domainName.CertificateName) - if err := d.Set("certificate_upload_date", domainName.CertificateUploadDate.Format(time.RFC3339)); err != nil { - log.Printf("[DEBUG] Error setting certificate_upload_date: %s", err) - } - d.Set("cloudfront_domain_name", domainName.DistributionDomainName) - d.Set("cloudfront_zone_id", cloudFrontRoute53ZoneID) - d.Set("domain_name", domainName.DomainName) - - if err := d.Set("endpoint_configuration", flattenApiGatewayEndpointConfiguration(domainName.EndpointConfiguration)); err != nil { - return fmt.Errorf("error setting endpoint_configuration: %s", err) - } - - d.Set("regional_certificate_arn", domainName.RegionalCertificateArn) - d.Set("regional_certificate_name", domainName.RegionalCertificateName) - d.Set("regional_domain_name", domainName.RegionalDomainName) - d.Set("regional_zone_id", domainName.RegionalHostedZoneId) - - return nil -} - -func resourceAwsApiGatewayDomainNameUpdateOperations(d *schema.ResourceData) []*apigateway.PatchOperation { - operations := make([]*apigateway.PatchOperation, 0) - - if d.HasChange("certificate_name") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/certificateName"), - Value: aws.String(d.Get("certificate_name").(string)), - }) - } - - if d.HasChange("certificate_arn") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/certificateArn"), - Value: aws.String(d.Get("certificate_arn").(string)), - }) - } - - if d.HasChange("regional_certificate_name") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/regionalCertificateName"), - Value: aws.String(d.Get("regional_certificate_name").(string)), - }) - } - - if d.HasChange("regional_certificate_arn") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/regionalCertificateArn"), - Value: aws.String(d.Get("regional_certificate_arn").(string)), - }) - } - - if d.HasChange("endpoint_configuration.0.types") { - // The domain name must have an endpoint type. - // If attempting to remove the configuration, do nothing. - if v, ok := d.GetOk("endpoint_configuration"); ok && len(v.([]interface{})) > 0 { - m := v.([]interface{})[0].(map[string]interface{}) - - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/endpointConfiguration/types/0"), - Value: aws.String(m["types"].([]interface{})[0].(string)), - }) - } - } - - return operations -} - -func resourceAwsApiGatewayDomainNameUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Updating API Gateway Domain Name %s", d.Id()) - - _, err := conn.UpdateDomainName(&apigateway.UpdateDomainNameInput{ - DomainName: aws.String(d.Id()), - PatchOperations: resourceAwsApiGatewayDomainNameUpdateOperations(d), - }) - - if err != nil { - return err - } - - return resourceAwsApiGatewayDomainNameRead(d, meta) -} - -func resourceAwsApiGatewayDomainNameDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway Domain Name: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteDomainName(&apigateway.DeleteDomainNameInput{ - DomainName: aws.String(d.Id()), - }) - - if err == nil { - return nil - } - - if apigatewayErr, ok := err.(awserr.Error); ok && apigatewayErr.Code() == "NotFoundException" { - return nil - } - - return resource.NonRetryableError(err) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_gateway_response.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_gateway_response.go deleted file mode 100644 index cddf6e161..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_gateway_response.go +++ /dev/null @@ -1,160 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayGatewayResponse() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayGatewayResponsePut, - Read: resourceAwsApiGatewayGatewayResponseRead, - Update: resourceAwsApiGatewayGatewayResponsePut, - Delete: resourceAwsApiGatewayGatewayResponseDelete, - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.Split(d.Id(), "/") - if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { - return nil, fmt.Errorf("Unexpected format of ID (%q), expected REST-API-ID/RESPONSE-TYPE", d.Id()) - } - restApiID := idParts[0] - responseType := idParts[1] - d.Set("response_type", responseType) - d.Set("rest_api_id", restApiID) - d.SetId(fmt.Sprintf("aggr-%s-%s", restApiID, responseType)) - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "rest_api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "response_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "status_code": { - Type: schema.TypeString, - Optional: true, - }, - - "response_templates": { - Type: schema.TypeMap, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - }, - - "response_parameters": { - Type: schema.TypeMap, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - }, - }, - } -} - -func resourceAwsApiGatewayGatewayResponsePut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - templates := make(map[string]string) - if kv, ok := d.GetOk("response_templates"); ok { - for k, v := range kv.(map[string]interface{}) { - templates[k] = v.(string) - } - } - - parameters := make(map[string]string) - if kv, ok := d.GetOk("response_parameters"); ok { - for k, v := range kv.(map[string]interface{}) { - parameters[k] = v.(string) - } - } - - input := apigateway.PutGatewayResponseInput{ - RestApiId: aws.String(d.Get("rest_api_id").(string)), - ResponseType: aws.String(d.Get("response_type").(string)), - ResponseTemplates: aws.StringMap(templates), - ResponseParameters: aws.StringMap(parameters), - } - - if v, ok := d.GetOk("status_code"); ok { - input.StatusCode = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Putting API Gateway Gateway Response: %s", input) - - _, err := conn.PutGatewayResponse(&input) - if err != nil { - return fmt.Errorf("Error putting API Gateway Gateway Response: %s", err) - } - - d.SetId(fmt.Sprintf("aggr-%s-%s", d.Get("rest_api_id").(string), d.Get("response_type").(string))) - log.Printf("[DEBUG] API Gateway Gateway Response put (%q)", d.Id()) - - return resourceAwsApiGatewayGatewayResponseRead(d, meta) -} - -func resourceAwsApiGatewayGatewayResponseRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Reading API Gateway Gateway Response %s", d.Id()) - gatewayResponse, err := conn.GetGatewayResponse(&apigateway.GetGatewayResponseInput{ - RestApiId: aws.String(d.Get("rest_api_id").(string)), - ResponseType: aws.String(d.Get("response_type").(string)), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Gateway Response (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - log.Printf("[DEBUG] Received API Gateway Gateway Response: %s", gatewayResponse) - - d.Set("response_type", gatewayResponse.ResponseType) - d.Set("status_code", gatewayResponse.StatusCode) - d.Set("response_templates", aws.StringValueMap(gatewayResponse.ResponseTemplates)) - d.Set("response_parameters", aws.StringValueMap(gatewayResponse.ResponseParameters)) - - return nil -} - -func resourceAwsApiGatewayGatewayResponseDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway Gateway Response: %s", d.Id()) - - return resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteGatewayResponse(&apigateway.DeleteGatewayResponseInput{ - RestApiId: aws.String(d.Get("rest_api_id").(string)), - ResponseType: aws.String(d.Get("response_type").(string)), - }) - - if err == nil { - return nil - } - - apigatewayErr, ok := err.(awserr.Error) - - if ok && apigatewayErr.Code() == "NotFoundException" { - return nil - } - - return resource.NonRetryableError(err) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration.go deleted file mode 100644 index 259d5d691..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration.go +++ /dev/null @@ -1,533 +0,0 @@ -package aws - -import ( - "encoding/json" - "fmt" - "log" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsApiGatewayIntegration() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayIntegrationCreate, - Read: resourceAwsApiGatewayIntegrationRead, - Update: resourceAwsApiGatewayIntegrationUpdate, - Delete: resourceAwsApiGatewayIntegrationDelete, - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.Split(d.Id(), "/") - if len(idParts) != 3 || idParts[0] == "" || idParts[1] == "" || idParts[2] == "" { - return nil, fmt.Errorf("Unexpected format of ID (%q), expected REST-API-ID/RESOURCE-ID/HTTP-METHOD", d.Id()) - } - restApiID := idParts[0] - resourceID := idParts[1] - httpMethod := idParts[2] - d.Set("http_method", httpMethod) - d.Set("resource_id", resourceID) - d.Set("rest_api_id", restApiID) - d.SetId(fmt.Sprintf("agi-%s-%s-%s", restApiID, resourceID, httpMethod)) - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "rest_api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "http_method": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateHTTPMethod(), - }, - - "type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - apigateway.IntegrationTypeHttp, - apigateway.IntegrationTypeAws, - apigateway.IntegrationTypeMock, - apigateway.IntegrationTypeHttpProxy, - apigateway.IntegrationTypeAwsProxy, - }, false), - }, - - "connection_type": { - Type: schema.TypeString, - Optional: true, - Default: apigateway.ConnectionTypeInternet, - ValidateFunc: validation.StringInSlice([]string{ - apigateway.ConnectionTypeInternet, - apigateway.ConnectionTypeVpcLink, - }, false), - }, - - "connection_id": { - Type: schema.TypeString, - Optional: true, - }, - - "uri": { - Type: schema.TypeString, - Optional: true, - }, - - "credentials": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "integration_http_method": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateHTTPMethod(), - }, - - "request_templates": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "request_parameters": { - Type: schema.TypeMap, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - ConflictsWith: []string{"request_parameters_in_json"}, - }, - - "request_parameters_in_json": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"request_parameters"}, - Deprecated: "Use field request_parameters instead", - }, - - "content_handling": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateApiGatewayIntegrationContentHandling(), - }, - - "passthrough_behavior": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - "WHEN_NO_MATCH", - "WHEN_NO_TEMPLATES", - "NEVER", - }, false), - }, - - "cache_key_parameters": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - Optional: true, - }, - - "cache_namespace": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "timeout_milliseconds": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(50, 29000), - Default: 29000, - }, - }, - } -} - -func resourceAwsApiGatewayIntegrationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Print("[DEBUG] Creating API Gateway Integration") - - connectionType := aws.String(d.Get("connection_type").(string)) - var connectionId *string - if *connectionType == apigateway.ConnectionTypeVpcLink { - if _, ok := d.GetOk("connection_id"); !ok { - return fmt.Errorf("connection_id required when connection_type set to VPC_LINK") - } - connectionId = aws.String(d.Get("connection_id").(string)) - } - - var integrationHttpMethod *string - if v, ok := d.GetOk("integration_http_method"); ok { - integrationHttpMethod = aws.String(v.(string)) - } - - var uri *string - if v, ok := d.GetOk("uri"); ok { - uri = aws.String(v.(string)) - } - - templates := make(map[string]string) - for k, v := range d.Get("request_templates").(map[string]interface{}) { - templates[k] = v.(string) - } - - parameters := make(map[string]string) - if kv, ok := d.GetOk("request_parameters"); ok { - for k, v := range kv.(map[string]interface{}) { - parameters[k] = v.(string) - } - } - - if v, ok := d.GetOk("request_parameters_in_json"); ok { - if err := json.Unmarshal([]byte(v.(string)), ¶meters); err != nil { - return fmt.Errorf("Error unmarshaling request_parameters_in_json: %s", err) - } - } - - var passthroughBehavior *string - if v, ok := d.GetOk("passthrough_behavior"); ok { - passthroughBehavior = aws.String(v.(string)) - } - - var credentials *string - if val, ok := d.GetOk("credentials"); ok { - credentials = aws.String(val.(string)) - } - - var contentHandling *string - if val, ok := d.GetOk("content_handling"); ok { - contentHandling = aws.String(val.(string)) - } - - var cacheKeyParameters []*string - if v, ok := d.GetOk("cache_key_parameters"); ok { - cacheKeyParameters = expandStringList(v.(*schema.Set).List()) - } - - var cacheNamespace *string - if cacheKeyParameters != nil { - // Use resource_id unless user provides a custom name - cacheNamespace = aws.String(d.Get("resource_id").(string)) - } - if v, ok := d.GetOk("cache_namespace"); ok { - cacheNamespace = aws.String(v.(string)) - } - - var timeoutInMillis *int64 - if v, ok := d.GetOk("timeout_milliseconds"); ok { - timeoutInMillis = aws.Int64(int64(v.(int))) - } - - _, err := conn.PutIntegration(&apigateway.PutIntegrationInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - Type: aws.String(d.Get("type").(string)), - IntegrationHttpMethod: integrationHttpMethod, - Uri: uri, - RequestParameters: aws.StringMap(parameters), - RequestTemplates: aws.StringMap(templates), - Credentials: credentials, - CacheNamespace: cacheNamespace, - CacheKeyParameters: cacheKeyParameters, - PassthroughBehavior: passthroughBehavior, - ContentHandling: contentHandling, - ConnectionType: connectionType, - ConnectionId: connectionId, - TimeoutInMillis: timeoutInMillis, - }) - if err != nil { - return fmt.Errorf("Error creating API Gateway Integration: %s", err) - } - - d.SetId(fmt.Sprintf("agi-%s-%s-%s", d.Get("rest_api_id").(string), d.Get("resource_id").(string), d.Get("http_method").(string))) - - return resourceAwsApiGatewayIntegrationRead(d, meta) -} - -func resourceAwsApiGatewayIntegrationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Reading API Gateway Integration: %s", d.Id()) - integration, err := conn.GetIntegration(&apigateway.GetIntegrationInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Integration (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - log.Printf("[DEBUG] Received API Gateway Integration: %s", integration) - - if err := d.Set("cache_key_parameters", flattenStringList(integration.CacheKeyParameters)); err != nil { - return fmt.Errorf("error setting cache_key_parameters: %s", err) - } - d.Set("cache_namespace", integration.CacheNamespace) - d.Set("connection_id", integration.ConnectionId) - d.Set("connection_type", apigateway.ConnectionTypeInternet) - if integration.ConnectionType != nil { - d.Set("connection_type", integration.ConnectionType) - } - d.Set("content_handling", integration.ContentHandling) - d.Set("credentials", integration.Credentials) - d.Set("integration_http_method", integration.HttpMethod) - d.Set("passthrough_behavior", integration.PassthroughBehavior) - - // KNOWN ISSUE: This next d.Set() is broken as it should be a JSON string of the map, - // however leaving as-is since this attribute has been deprecated - // for a very long time and will be removed soon in the next major release. - // Not worth the effort of fixing, acceptance testing, and potential JSON equivalence bugs. - if _, ok := d.GetOk("request_parameters_in_json"); ok { - d.Set("request_parameters_in_json", aws.StringValueMap(integration.RequestParameters)) - } - - d.Set("request_parameters", aws.StringValueMap(integration.RequestParameters)) - - // We need to explicitly convert key = nil values into key = "", which aws.StringValueMap() removes - requestTemplateMap := make(map[string]string) - for key, valuePointer := range integration.RequestTemplates { - requestTemplateMap[key] = aws.StringValue(valuePointer) - } - if err := d.Set("request_templates", requestTemplateMap); err != nil { - return fmt.Errorf("error setting request_templates: %s", err) - } - - d.Set("timeout_milliseconds", integration.TimeoutInMillis) - d.Set("type", integration.Type) - d.Set("uri", integration.Uri) - - return nil -} - -func resourceAwsApiGatewayIntegrationUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Updating API Gateway Integration: %s", d.Id()) - operations := make([]*apigateway.PatchOperation, 0) - - // https://docs.aws.amazon.com/apigateway/api-reference/link-relation/integration-update/#remarks - // According to the above documentation, only a few parts are addable / removable. - if d.HasChange("request_templates") { - o, n := d.GetChange("request_templates") - prefix := "requestTemplates" - - os := o.(map[string]interface{}) - ns := n.(map[string]interface{}) - - // Handle Removal - for k := range os { - if _, ok := ns[k]; !ok { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, strings.Replace(k, "/", "~1", -1))), - }) - } - } - - for k, v := range ns { - // Handle replaces - if _, ok := os[k]; ok { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, strings.Replace(k, "/", "~1", -1))), - Value: aws.String(v.(string)), - }) - } - - // Handle additions - if _, ok := os[k]; !ok { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, strings.Replace(k, "/", "~1", -1))), - Value: aws.String(v.(string)), - }) - } - } - } - - if d.HasChange("request_parameters") { - o, n := d.GetChange("request_parameters") - prefix := "requestParameters" - - os := o.(map[string]interface{}) - ns := n.(map[string]interface{}) - - // Handle Removal - for k := range os { - if _, ok := ns[k]; !ok { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, strings.Replace(k, "/", "~1", -1))), - }) - } - } - - for k, v := range ns { - // Handle replaces - if _, ok := os[k]; ok { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, strings.Replace(k, "/", "~1", -1))), - Value: aws.String(v.(string)), - }) - } - - // Handle additions - if _, ok := os[k]; !ok { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, strings.Replace(k, "/", "~1", -1))), - Value: aws.String(v.(string)), - }) - } - } - } - - if d.HasChange("cache_key_parameters") { - o, n := d.GetChange("cache_key_parameters") - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - removalList := os.Difference(ns) - for _, v := range removalList.List() { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String(fmt.Sprintf("/cacheKeyParameters/%s", v.(string))), - Value: aws.String(""), - }) - } - - additionList := ns.Difference(os) - for _, v := range additionList.List() { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String(fmt.Sprintf("/cacheKeyParameters/%s", v.(string))), - Value: aws.String(""), - }) - } - } - - if d.HasChange("cache_namespace") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/cacheNamespace"), - Value: aws.String(d.Get("cache_namespace").(string)), - }) - } - - // The documentation https://docs.aws.amazon.com/apigateway/api-reference/link-relation/integration-update/ says - // that uri changes are only supported for non-mock types. Because the uri value is not used in mock - // resources, it means that the uri can always be updated - if d.HasChange("uri") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/uri"), - Value: aws.String(d.Get("uri").(string)), - }) - } - - if d.HasChange("content_handling") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/contentHandling"), - Value: aws.String(d.Get("content_handling").(string)), - }) - } - - if d.HasChange("connection_type") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/connectionType"), - Value: aws.String(d.Get("connection_type").(string)), - }) - } - - if d.HasChange("connection_id") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/connectionId"), - Value: aws.String(d.Get("connection_id").(string)), - }) - } - - if d.HasChange("timeout_milliseconds") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/timeoutInMillis"), - Value: aws.String(strconv.Itoa(d.Get("timeout_milliseconds").(int))), - }) - } - - params := &apigateway.UpdateIntegrationInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - PatchOperations: operations, - } - - _, err := conn.UpdateIntegration(params) - if err != nil { - return fmt.Errorf("Error updating API Gateway Integration: %s", err) - } - - d.SetId(fmt.Sprintf("agi-%s-%s-%s", d.Get("rest_api_id").(string), d.Get("resource_id").(string), d.Get("http_method").(string))) - - return resourceAwsApiGatewayIntegrationRead(d, meta) -} - -func resourceAwsApiGatewayIntegrationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway Integration: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteIntegration(&apigateway.DeleteIntegrationInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }) - if err == nil { - return nil - } - - apigatewayErr, ok := err.(awserr.Error) - if apigatewayErr.Code() == "NotFoundException" { - return nil - } - - if !ok { - return resource.NonRetryableError(err) - } - - return resource.NonRetryableError(err) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration_response.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration_response.go deleted file mode 100644 index 1da6a1799..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration_response.go +++ /dev/null @@ -1,224 +0,0 @@ -package aws - -import ( - "encoding/json" - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayIntegrationResponse() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayIntegrationResponseCreate, - Read: resourceAwsApiGatewayIntegrationResponseRead, - Update: resourceAwsApiGatewayIntegrationResponseCreate, - Delete: resourceAwsApiGatewayIntegrationResponseDelete, - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.Split(d.Id(), "/") - if len(idParts) != 4 || idParts[0] == "" || idParts[1] == "" || idParts[2] == "" || idParts[3] == "" { - return nil, fmt.Errorf("Unexpected format of ID (%q), expected REST-API-ID/RESOURCE-ID/HTTP-METHOD/STATUS-CODE", d.Id()) - } - restApiID := idParts[0] - resourceID := idParts[1] - httpMethod := idParts[2] - statusCode := idParts[3] - d.Set("http_method", httpMethod) - d.Set("status_code", statusCode) - d.Set("resource_id", resourceID) - d.Set("rest_api_id", restApiID) - d.SetId(fmt.Sprintf("agir-%s-%s-%s-%s", restApiID, resourceID, httpMethod, statusCode)) - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "rest_api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "http_method": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateHTTPMethod(), - }, - - "status_code": { - Type: schema.TypeString, - Required: true, - }, - - "selection_pattern": { - Type: schema.TypeString, - Optional: true, - }, - - "response_templates": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "response_parameters": { - Type: schema.TypeMap, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - ConflictsWith: []string{"response_parameters_in_json"}, - }, - - "response_parameters_in_json": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"response_parameters"}, - Deprecated: "Use field response_parameters instead", - }, - - "content_handling": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateApiGatewayIntegrationContentHandling(), - }, - }, - } -} - -func resourceAwsApiGatewayIntegrationResponseCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - templates := make(map[string]string) - for k, v := range d.Get("response_templates").(map[string]interface{}) { - templates[k] = v.(string) - } - - parameters := make(map[string]string) - if kv, ok := d.GetOk("response_parameters"); ok { - for k, v := range kv.(map[string]interface{}) { - parameters[k] = v.(string) - } - } - if v, ok := d.GetOk("response_parameters_in_json"); ok { - if err := json.Unmarshal([]byte(v.(string)), ¶meters); err != nil { - return fmt.Errorf("Error unmarshaling response_parameters_in_json: %s", err) - } - } - var contentHandling *string - if val, ok := d.GetOk("content_handling"); ok { - contentHandling = aws.String(val.(string)) - } - - input := apigateway.PutIntegrationResponseInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StatusCode: aws.String(d.Get("status_code").(string)), - ResponseTemplates: aws.StringMap(templates), - ResponseParameters: aws.StringMap(parameters), - ContentHandling: contentHandling, - } - if v, ok := d.GetOk("selection_pattern"); ok { - input.SelectionPattern = aws.String(v.(string)) - } - - _, err := conn.PutIntegrationResponse(&input) - if err != nil { - return fmt.Errorf("Error creating API Gateway Integration Response: %s", err) - } - - d.SetId(fmt.Sprintf("agir-%s-%s-%s-%s", d.Get("rest_api_id").(string), d.Get("resource_id").(string), d.Get("http_method").(string), d.Get("status_code").(string))) - log.Printf("[DEBUG] API Gateway Integration Response ID: %s", d.Id()) - - return resourceAwsApiGatewayIntegrationResponseRead(d, meta) -} - -func resourceAwsApiGatewayIntegrationResponseRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Reading API Gateway Integration Response %s", d.Id()) - integrationResponse, err := conn.GetIntegrationResponse(&apigateway.GetIntegrationResponseInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StatusCode: aws.String(d.Get("status_code").(string)), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Integration Response (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - log.Printf("[DEBUG] Received API Gateway Integration Response: %s", integrationResponse) - - d.Set("content_handling", integrationResponse.ContentHandling) - - if err := d.Set("response_parameters", aws.StringValueMap(integrationResponse.ResponseParameters)); err != nil { - return fmt.Errorf("error setting response_parameters: %s", err) - } - - // KNOWN ISSUE: This next d.Set() is broken as it should be a JSON string of the map, - // however leaving as-is since this attribute has been deprecated - // for a very long time and will be removed soon in the next major release. - // Not worth the effort of fixing, acceptance testing, and potential JSON equivalence bugs. - if _, ok := d.GetOk("response_parameters_in_json"); ok { - d.Set("response_parameters_in_json", aws.StringValueMap(integrationResponse.ResponseParameters)) - } - - // We need to explicitly convert key = nil values into key = "", which aws.StringValueMap() removes - responseTemplateMap := make(map[string]string) - for key, valuePointer := range integrationResponse.ResponseTemplates { - responseTemplateMap[key] = aws.StringValue(valuePointer) - } - if err := d.Set("response_templates", responseTemplateMap); err != nil { - return fmt.Errorf("error setting response_templates: %s", err) - } - - d.Set("selection_pattern", integrationResponse.SelectionPattern) - - return nil -} - -func resourceAwsApiGatewayIntegrationResponseDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway Integration Response: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteIntegrationResponse(&apigateway.DeleteIntegrationResponseInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StatusCode: aws.String(d.Get("status_code").(string)), - }) - if err == nil { - return nil - } - - apigatewayErr, ok := err.(awserr.Error) - if apigatewayErr.Code() == "NotFoundException" { - return nil - } - - if !ok { - return resource.NonRetryableError(err) - } - - return resource.NonRetryableError(err) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method.go deleted file mode 100644 index 9c469078e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method.go +++ /dev/null @@ -1,370 +0,0 @@ -package aws - -import ( - "encoding/json" - "fmt" - "log" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayMethod() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayMethodCreate, - Read: resourceAwsApiGatewayMethodRead, - Update: resourceAwsApiGatewayMethodUpdate, - Delete: resourceAwsApiGatewayMethodDelete, - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.Split(d.Id(), "/") - if len(idParts) != 3 || idParts[0] == "" || idParts[1] == "" || idParts[2] == "" { - return nil, fmt.Errorf("Unexpected format of ID (%q), expected REST-API-ID/RESOURCE-ID/HTTP-METHOD", d.Id()) - } - restApiID := idParts[0] - resourceID := idParts[1] - httpMethod := idParts[2] - d.Set("http_method", httpMethod) - d.Set("resource_id", resourceID) - d.Set("rest_api_id", restApiID) - d.SetId(fmt.Sprintf("agm-%s-%s-%s", restApiID, resourceID, httpMethod)) - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "rest_api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "http_method": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateHTTPMethod(), - }, - - "authorization": { - Type: schema.TypeString, - Required: true, - }, - - "authorizer_id": { - Type: schema.TypeString, - Optional: true, - }, - - "authorization_scopes": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - Optional: true, - }, - - "api_key_required": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "request_models": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "request_parameters": { - Type: schema.TypeMap, - Elem: &schema.Schema{Type: schema.TypeBool}, - Optional: true, - ConflictsWith: []string{"request_parameters_in_json"}, - }, - - "request_parameters_in_json": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"request_parameters"}, - Deprecated: "Use field request_parameters instead", - }, - - "request_validator_id": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsApiGatewayMethodCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - input := apigateway.PutMethodInput{ - AuthorizationType: aws.String(d.Get("authorization").(string)), - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - ApiKeyRequired: aws.Bool(d.Get("api_key_required").(bool)), - } - - models := make(map[string]string) - for k, v := range d.Get("request_models").(map[string]interface{}) { - models[k] = v.(string) - } - if len(models) > 0 { - input.RequestModels = aws.StringMap(models) - } - - parameters := make(map[string]bool) - if kv, ok := d.GetOk("request_parameters"); ok { - for k, v := range kv.(map[string]interface{}) { - parameters[k], ok = v.(bool) - if !ok { - value, _ := strconv.ParseBool(v.(string)) - parameters[k] = value - } - } - input.RequestParameters = aws.BoolMap(parameters) - } - if v, ok := d.GetOk("request_parameters_in_json"); ok { - if err := json.Unmarshal([]byte(v.(string)), ¶meters); err != nil { - return fmt.Errorf("Error unmarshaling request_parameters_in_json: %s", err) - } - input.RequestParameters = aws.BoolMap(parameters) - } - - if v, ok := d.GetOk("authorizer_id"); ok { - input.AuthorizerId = aws.String(v.(string)) - } - - if v, ok := d.GetOk("authorization_scopes"); ok { - input.AuthorizationScopes = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("request_validator_id"); ok { - input.RequestValidatorId = aws.String(v.(string)) - } - - _, err := conn.PutMethod(&input) - if err != nil { - return fmt.Errorf("Error creating API Gateway Method: %s", err) - } - - d.SetId(fmt.Sprintf("agm-%s-%s-%s", d.Get("rest_api_id").(string), d.Get("resource_id").(string), d.Get("http_method").(string))) - log.Printf("[DEBUG] API Gateway Method ID: %s", d.Id()) - - return nil -} - -func resourceAwsApiGatewayMethodRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Reading API Gateway Method %s", d.Id()) - out, err := conn.GetMethod(&apigateway.GetMethodInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Method (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - log.Printf("[DEBUG] Received API Gateway Method: %s", out) - - d.Set("api_key_required", out.ApiKeyRequired) - - if err := d.Set("authorization_scopes", flattenStringList(out.AuthorizationScopes)); err != nil { - return fmt.Errorf("error setting authorization_scopes: %s", err) - } - - d.Set("authorization", out.AuthorizationType) - d.Set("authorizer_id", out.AuthorizerId) - - if err := d.Set("request_models", aws.StringValueMap(out.RequestModels)); err != nil { - return fmt.Errorf("error setting request_models: %s", err) - } - - // KNOWN ISSUE: This next d.Set() is broken as it should be a JSON string of the map, - // however leaving as-is since this attribute has been deprecated - // for a very long time and will be removed soon in the next major release. - // Not worth the effort of fixing, acceptance testing, and potential JSON equivalence bugs. - if _, ok := d.GetOk("request_parameters_in_json"); ok { - d.Set("request_parameters_in_json", aws.BoolValueMap(out.RequestParameters)) - } - - if err := d.Set("request_parameters", aws.BoolValueMap(out.RequestParameters)); err != nil { - return fmt.Errorf("error setting request_models: %s", err) - } - - d.Set("request_validator_id", out.RequestValidatorId) - - return nil -} - -func resourceAwsApiGatewayMethodUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Reading API Gateway Method %s", d.Id()) - operations := make([]*apigateway.PatchOperation, 0) - if d.HasChange("resource_id") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/resourceId"), - Value: aws.String(d.Get("resource_id").(string)), - }) - } - - if d.HasChange("request_models") { - operations = append(operations, expandApiGatewayRequestResponseModelOperations(d, "request_models", "requestModels")...) - } - - if d.HasChange("request_parameters_in_json") { - ops, err := deprecatedExpandApiGatewayMethodParametersJSONOperations(d, "request_parameters_in_json", "requestParameters") - if err != nil { - return err - } - operations = append(operations, ops...) - } - - if d.HasChange("request_parameters") { - parameters := make(map[string]bool) - var ok bool - for k, v := range d.Get("request_parameters").(map[string]interface{}) { - parameters[k], ok = v.(bool) - if !ok { - value, _ := strconv.ParseBool(v.(string)) - parameters[k] = value - } - } - ops, err := expandApiGatewayMethodParametersOperations(d, "request_parameters", "requestParameters") - if err != nil { - return err - } - operations = append(operations, ops...) - } - - if d.HasChange("authorization") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/authorizationType"), - Value: aws.String(d.Get("authorization").(string)), - }) - } - - if d.HasChange("authorizer_id") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/authorizerId"), - Value: aws.String(d.Get("authorizer_id").(string)), - }) - } - - if d.HasChange("authorization_scopes") { - old, new := d.GetChange("authorization_scopes") - path := "/authorizationScopes" - - os := old.(*schema.Set) - ns := new.(*schema.Set) - - additionList := ns.Difference(os) - for _, v := range additionList.List() { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String(path), - Value: aws.String(v.(string)), - }) - } - - removalList := os.Difference(ns) - for _, v := range removalList.List() { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String(path), - Value: aws.String(v.(string)), - }) - } - } - - if d.HasChange("api_key_required") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/apiKeyRequired"), - Value: aws.String(fmt.Sprintf("%t", d.Get("api_key_required").(bool))), - }) - } - - if d.HasChange("request_validator_id") { - var request_validator_id *string - if v, ok := d.GetOk("request_validator_id"); ok { - // requestValidatorId cannot be an empty string; it must either be nil - // or it must have some value. Otherwise, updating fails. - if s := v.(string); len(s) > 0 { - request_validator_id = &s - } - } - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/requestValidatorId"), - Value: request_validator_id, - }) - } - - method, err := conn.UpdateMethod(&apigateway.UpdateMethodInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - PatchOperations: operations, - }) - - if err != nil { - return err - } - - log.Printf("[DEBUG] Received API Gateway Method: %s", method) - - return resourceAwsApiGatewayMethodRead(d, meta) -} - -func resourceAwsApiGatewayMethodDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway Method: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteMethod(&apigateway.DeleteMethodInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }) - if err == nil { - return nil - } - - apigatewayErr, ok := err.(awserr.Error) - if apigatewayErr.Code() == "NotFoundException" { - return nil - } - - if !ok { - return resource.NonRetryableError(err) - } - - return resource.NonRetryableError(err) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_response.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_response.go deleted file mode 100644 index 9bd7cf8c9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_response.go +++ /dev/null @@ -1,251 +0,0 @@ -package aws - -import ( - "encoding/json" - "fmt" - "log" - "strconv" - "strings" - "sync" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -var resourceAwsApiGatewayMethodResponseMutex = &sync.Mutex{} - -func resourceAwsApiGatewayMethodResponse() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayMethodResponseCreate, - Read: resourceAwsApiGatewayMethodResponseRead, - Update: resourceAwsApiGatewayMethodResponseUpdate, - Delete: resourceAwsApiGatewayMethodResponseDelete, - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.Split(d.Id(), "/") - if len(idParts) != 4 || idParts[0] == "" || idParts[1] == "" || idParts[2] == "" || idParts[3] == "" { - return nil, fmt.Errorf("Unexpected format of ID (%q), expected REST-API-ID/RESOURCE-ID/HTTP-METHOD/STATUS-CODE", d.Id()) - } - restApiID := idParts[0] - resourceID := idParts[1] - httpMethod := idParts[2] - statusCode := idParts[3] - d.Set("http_method", httpMethod) - d.Set("status_code", statusCode) - d.Set("resource_id", resourceID) - d.Set("rest_api_id", restApiID) - d.SetId(fmt.Sprintf("agmr-%s-%s-%s-%s", restApiID, resourceID, httpMethod, statusCode)) - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "rest_api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "http_method": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateHTTPMethod(), - }, - - "status_code": { - Type: schema.TypeString, - Required: true, - }, - - "response_models": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "response_parameters": { - Type: schema.TypeMap, - Elem: &schema.Schema{Type: schema.TypeBool}, - Optional: true, - ConflictsWith: []string{"response_parameters_in_json"}, - }, - - "response_parameters_in_json": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"response_parameters"}, - Deprecated: "Use field response_parameters instead", - }, - }, - } -} - -func resourceAwsApiGatewayMethodResponseCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - models := make(map[string]string) - for k, v := range d.Get("response_models").(map[string]interface{}) { - models[k] = v.(string) - } - - parameters := make(map[string]bool) - if kv, ok := d.GetOk("response_parameters"); ok { - for k, v := range kv.(map[string]interface{}) { - parameters[k], ok = v.(bool) - if !ok { - value, _ := strconv.ParseBool(v.(string)) - parameters[k] = value - } - } - } - if v, ok := d.GetOk("response_parameters_in_json"); ok { - if err := json.Unmarshal([]byte(v.(string)), ¶meters); err != nil { - return fmt.Errorf("Error unmarshaling request_parameters_in_json: %s", err) - } - } - - resourceAwsApiGatewayMethodResponseMutex.Lock() - defer resourceAwsApiGatewayMethodResponseMutex.Unlock() - - _, err := retryOnAwsCode(apigateway.ErrCodeConflictException, func() (interface{}, error) { - return conn.PutMethodResponse(&apigateway.PutMethodResponseInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StatusCode: aws.String(d.Get("status_code").(string)), - ResponseModels: aws.StringMap(models), - ResponseParameters: aws.BoolMap(parameters), - }) - }) - - if err != nil { - return fmt.Errorf("Error creating API Gateway Method Response: %s", err) - } - - d.SetId(fmt.Sprintf("agmr-%s-%s-%s-%s", d.Get("rest_api_id").(string), d.Get("resource_id").(string), d.Get("http_method").(string), d.Get("status_code").(string))) - log.Printf("[DEBUG] API Gateway Method ID: %s", d.Id()) - - return nil -} - -func resourceAwsApiGatewayMethodResponseRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Reading API Gateway Method Response %s", d.Id()) - methodResponse, err := conn.GetMethodResponse(&apigateway.GetMethodResponseInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StatusCode: aws.String(d.Get("status_code").(string)), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Response (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - log.Printf("[DEBUG] Received API Gateway Method Response: %s", methodResponse) - - if err := d.Set("response_models", aws.StringValueMap(methodResponse.ResponseModels)); err != nil { - return fmt.Errorf("error setting response_models: %s", err) - } - - if err := d.Set("response_parameters", aws.BoolValueMap(methodResponse.ResponseParameters)); err != nil { - return fmt.Errorf("error setting response_parameters: %s", err) - } - - // KNOWN ISSUE: This next d.Set() is broken as it should be a JSON string of the map, - // however leaving as-is since this attribute has been deprecated - // for a very long time and will be removed soon in the next major release. - // Not worth the effort of fixing, acceptance testing, and potential JSON equivalence bugs. - if _, ok := d.GetOk("response_parameters_in_json"); ok { - d.Set("response_parameters_in_json", aws.BoolValueMap(methodResponse.ResponseParameters)) - } - - return nil -} - -func resourceAwsApiGatewayMethodResponseUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Updating API Gateway Method Response %s", d.Id()) - operations := make([]*apigateway.PatchOperation, 0) - - if d.HasChange("response_models") { - operations = append(operations, expandApiGatewayRequestResponseModelOperations(d, "response_models", "responseModels")...) - } - - if d.HasChange("response_parameters_in_json") { - ops, err := deprecatedExpandApiGatewayMethodParametersJSONOperations(d, "response_parameters_in_json", "responseParameters") - if err != nil { - return err - } - operations = append(operations, ops...) - } - - if d.HasChange("response_parameters") { - ops, err := expandApiGatewayMethodParametersOperations(d, "response_parameters", "responseParameters") - if err != nil { - return err - } - operations = append(operations, ops...) - } - - out, err := conn.UpdateMethodResponse(&apigateway.UpdateMethodResponseInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StatusCode: aws.String(d.Get("status_code").(string)), - PatchOperations: operations, - }) - - if err != nil { - return err - } - - log.Printf("[DEBUG] Received API Gateway Method Response: %s", out) - - return resourceAwsApiGatewayMethodResponseRead(d, meta) -} - -func resourceAwsApiGatewayMethodResponseDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway Method Response: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteMethodResponse(&apigateway.DeleteMethodResponseInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StatusCode: aws.String(d.Get("status_code").(string)), - }) - if err == nil { - return nil - } - - apigatewayErr, ok := err.(awserr.Error) - if apigatewayErr.Code() == "NotFoundException" { - return nil - } - - if !ok { - return resource.NonRetryableError(err) - } - - return resource.NonRetryableError(err) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_settings.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_settings.go deleted file mode 100644 index daa2ea15b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_settings.go +++ /dev/null @@ -1,248 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayMethodSettings() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayMethodSettingsUpdate, - Read: resourceAwsApiGatewayMethodSettingsRead, - Update: resourceAwsApiGatewayMethodSettingsUpdate, - Delete: resourceAwsApiGatewayMethodSettingsDelete, - - Schema: map[string]*schema.Schema{ - "rest_api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "stage_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "method_path": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "settings": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "metrics_enabled": { - Type: schema.TypeBool, - Optional: true, - }, - "logging_level": { - Type: schema.TypeString, - Optional: true, - }, - "data_trace_enabled": { - Type: schema.TypeBool, - Optional: true, - }, - "throttling_burst_limit": { - Type: schema.TypeInt, - Optional: true, - }, - "throttling_rate_limit": { - Type: schema.TypeFloat, - Optional: true, - }, - "caching_enabled": { - Type: schema.TypeBool, - Optional: true, - }, - "cache_ttl_in_seconds": { - Type: schema.TypeInt, - Optional: true, - }, - "cache_data_encrypted": { - Type: schema.TypeBool, - Optional: true, - }, - "require_authorization_for_cache_control": { - Type: schema.TypeBool, - Optional: true, - }, - "unauthorized_cache_control_header_strategy": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsApiGatewayMethodSettingsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Reading API Gateway Method Settings %s", d.Id()) - input := apigateway.GetStageInput{ - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StageName: aws.String(d.Get("stage_name").(string)), - } - stage, err := conn.GetStage(&input) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Stage (%s) not found, removing method settings", d.Id()) - d.SetId("") - return nil - } - return err - } - log.Printf("[DEBUG] Received API Gateway Stage: %s", stage) - - methodPath := d.Get("method_path").(string) - settings, ok := stage.MethodSettings[methodPath] - if !ok { - log.Printf("[WARN] API Gateway Method Settings for %q not found, removing", methodPath) - d.SetId("") - return nil - } - - d.Set("settings.0.metrics_enabled", settings.MetricsEnabled) - d.Set("settings.0.logging_level", settings.LoggingLevel) - d.Set("settings.0.data_trace_enabled", settings.DataTraceEnabled) - d.Set("settings.0.throttling_burst_limit", settings.ThrottlingBurstLimit) - d.Set("settings.0.throttling_rate_limit", settings.ThrottlingRateLimit) - d.Set("settings.0.caching_enabled", settings.CachingEnabled) - d.Set("settings.0.cache_ttl_in_seconds", settings.CacheTtlInSeconds) - d.Set("settings.0.cache_data_encrypted", settings.CacheDataEncrypted) - d.Set("settings.0.require_authorization_for_cache_control", settings.RequireAuthorizationForCacheControl) - d.Set("settings.0.unauthorized_cache_control_header_strategy", settings.UnauthorizedCacheControlHeaderStrategy) - - return nil -} - -func resourceAwsApiGatewayMethodSettingsUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - methodPath := d.Get("method_path").(string) - prefix := fmt.Sprintf("/%s/", methodPath) - - ops := make([]*apigateway.PatchOperation, 0) - if d.HasChange("settings.0.metrics_enabled") { - ops = append(ops, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String(prefix + "metrics/enabled"), - Value: aws.String(fmt.Sprintf("%t", d.Get("settings.0.metrics_enabled").(bool))), - }) - } - if d.HasChange("settings.0.logging_level") { - ops = append(ops, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String(prefix + "logging/loglevel"), - Value: aws.String(d.Get("settings.0.logging_level").(string)), - }) - } - if d.HasChange("settings.0.data_trace_enabled") { - ops = append(ops, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String(prefix + "logging/dataTrace"), - Value: aws.String(fmt.Sprintf("%t", d.Get("settings.0.data_trace_enabled").(bool))), - }) - } - - if d.HasChange("settings.0.throttling_burst_limit") { - ops = append(ops, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String(prefix + "throttling/burstLimit"), - Value: aws.String(fmt.Sprintf("%d", d.Get("settings.0.throttling_burst_limit").(int))), - }) - } - if d.HasChange("settings.0.throttling_rate_limit") { - ops = append(ops, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String(prefix + "throttling/rateLimit"), - Value: aws.String(fmt.Sprintf("%f", d.Get("settings.0.throttling_rate_limit").(float64))), - }) - } - if d.HasChange("settings.0.caching_enabled") { - ops = append(ops, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String(prefix + "caching/enabled"), - Value: aws.String(fmt.Sprintf("%t", d.Get("settings.0.caching_enabled").(bool))), - }) - } - if d.HasChange("settings.0.cache_ttl_in_seconds") { - ops = append(ops, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String(prefix + "caching/ttlInSeconds"), - Value: aws.String(fmt.Sprintf("%d", d.Get("settings.0.cache_ttl_in_seconds").(int))), - }) - } - if d.HasChange("settings.0.cache_data_encrypted") { - ops = append(ops, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String(prefix + "caching/dataEncrypted"), - Value: aws.String(fmt.Sprintf("%t", d.Get("settings.0.cache_data_encrypted").(bool))), - }) - } - if d.HasChange("settings.0.require_authorization_for_cache_control") { - ops = append(ops, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String(prefix + "caching/requireAuthorizationForCacheControl"), - Value: aws.String(fmt.Sprintf("%t", d.Get("settings.0.require_authorization_for_cache_control").(bool))), - }) - } - if d.HasChange("settings.0.unauthorized_cache_control_header_strategy") { - ops = append(ops, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String(prefix + "caching/unauthorizedCacheControlHeaderStrategy"), - Value: aws.String(d.Get("settings.0.unauthorized_cache_control_header_strategy").(string)), - }) - } - - restApiId := d.Get("rest_api_id").(string) - stageName := d.Get("stage_name").(string) - input := apigateway.UpdateStageInput{ - RestApiId: aws.String(restApiId), - StageName: aws.String(stageName), - PatchOperations: ops, - } - log.Printf("[DEBUG] Updating API Gateway Stage: %s", input) - _, err := conn.UpdateStage(&input) - if err != nil { - return fmt.Errorf("Updating API Gateway Stage failed: %s", err) - } - - d.SetId(restApiId + "-" + stageName + "-" + methodPath) - - return resourceAwsApiGatewayMethodSettingsRead(d, meta) -} - -func resourceAwsApiGatewayMethodSettingsDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway Method Settings: %s", d.Id()) - - input := apigateway.UpdateStageInput{ - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StageName: aws.String(d.Get("stage_name").(string)), - PatchOperations: []*apigateway.PatchOperation{ - { - Op: aws.String("remove"), - Path: aws.String(fmt.Sprintf("/%s", d.Get("method_path").(string))), - }, - }, - } - log.Printf("[DEBUG] Updating API Gateway Stage: %s", input) - _, err := conn.UpdateStage(&input) - if err != nil { - return fmt.Errorf("Updating API Gateway Stage failed: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_model.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_model.go deleted file mode 100644 index 7d59e6c7c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_model.go +++ /dev/null @@ -1,197 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayModel() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayModelCreate, - Read: resourceAwsApiGatewayModelRead, - Update: resourceAwsApiGatewayModelUpdate, - Delete: resourceAwsApiGatewayModelDelete, - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.Split(d.Id(), "/") - if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { - return nil, fmt.Errorf("Unexpected format of ID (%q), expected REST-API-ID/NAME", d.Id()) - } - restApiID := idParts[0] - name := idParts[1] - d.Set("name", name) - d.Set("rest_api_id", restApiID) - - conn := meta.(*AWSClient).apigateway - - output, err := conn.GetModel(&apigateway.GetModelInput{ - ModelName: aws.String(name), - RestApiId: aws.String(restApiID), - }) - - if err != nil { - return nil, err - } - - d.SetId(aws.StringValue(output.Id)) - - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "rest_api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - }, - - "schema": { - Type: schema.TypeString, - Optional: true, - }, - - "content_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsApiGatewayModelCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Creating API Gateway Model") - - var description *string - if v, ok := d.GetOk("description"); ok { - description = aws.String(v.(string)) - } - var schema *string - if v, ok := d.GetOk("schema"); ok { - schema = aws.String(v.(string)) - } - - var err error - model, err := conn.CreateModel(&apigateway.CreateModelInput{ - Name: aws.String(d.Get("name").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - ContentType: aws.String(d.Get("content_type").(string)), - - Description: description, - Schema: schema, - }) - - if err != nil { - return fmt.Errorf("Error creating API Gateway Model: %s", err) - } - - d.SetId(*model.Id) - - return nil -} - -func resourceAwsApiGatewayModelRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Reading API Gateway Model %s", d.Id()) - out, err := conn.GetModel(&apigateway.GetModelInput{ - ModelName: aws.String(d.Get("name").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Model (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - log.Printf("[DEBUG] Received API Gateway Model: %s", out) - - d.Set("content_type", out.ContentType) - d.Set("description", out.Description) - d.Set("schema", out.Schema) - - return nil -} - -func resourceAwsApiGatewayModelUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Reading API Gateway Model %s", d.Id()) - operations := make([]*apigateway.PatchOperation, 0) - if d.HasChange("description") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/description"), - Value: aws.String(d.Get("description").(string)), - }) - } - if d.HasChange("schema") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/schema"), - Value: aws.String(d.Get("schema").(string)), - }) - } - - out, err := conn.UpdateModel(&apigateway.UpdateModelInput{ - ModelName: aws.String(d.Get("name").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - PatchOperations: operations, - }) - if err != nil { - return err - } - log.Printf("[DEBUG] Received API Gateway Model: %s", out) - - return resourceAwsApiGatewayModelRead(d, meta) -} - -func resourceAwsApiGatewayModelDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway Model: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] schema is %#v", d) - _, err := conn.DeleteModel(&apigateway.DeleteModelInput{ - ModelName: aws.String(d.Get("name").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }) - if err == nil { - return nil - } - - apigatewayErr, ok := err.(awserr.Error) - if apigatewayErr.Code() == "NotFoundException" { - return nil - } - - if !ok { - return resource.NonRetryableError(err) - } - - return resource.NonRetryableError(err) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_request_validator.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_request_validator.go deleted file mode 100644 index 52fb87282..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_request_validator.go +++ /dev/null @@ -1,170 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayRequestValidator() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayRequestValidatorCreate, - Read: resourceAwsApiGatewayRequestValidatorRead, - Update: resourceAwsApiGatewayRequestValidatorUpdate, - Delete: resourceAwsApiGatewayRequestValidatorDelete, - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.Split(d.Id(), "/") - if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { - return nil, fmt.Errorf("Unexpected format of ID (%q), expected REST-API-ID/REQUEST-VALIDATOR-ID", d.Id()) - } - restApiID := idParts[0] - requestValidatorID := idParts[1] - d.Set("request_validator_id", requestValidatorID) - d.Set("rest_api_id", restApiID) - d.SetId(requestValidatorID) - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "rest_api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "name": { - Type: schema.TypeString, - Required: true, - }, - - "validate_request_body": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "validate_request_parameters": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - } -} - -func resourceAwsApiGatewayRequestValidatorCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - input := apigateway.CreateRequestValidatorInput{ - Name: aws.String(d.Get("name").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - ValidateRequestBody: aws.Bool(d.Get("validate_request_body").(bool)), - ValidateRequestParameters: aws.Bool(d.Get("validate_request_parameters").(bool)), - } - - out, err := conn.CreateRequestValidator(&input) - if err != nil { - return fmt.Errorf("Error creating Request Validator: %s", err) - } - - d.SetId(*out.Id) - - return nil -} - -func resourceAwsApiGatewayRequestValidatorRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - input := apigateway.GetRequestValidatorInput{ - RequestValidatorId: aws.String(d.Id()), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - } - - out, err := conn.GetRequestValidator(&input) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == apigateway.ErrCodeNotFoundException { - log.Printf("[WARN] API Gateway Request Validator (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("name", out.Name) - d.Set("validate_request_body", out.ValidateRequestBody) - d.Set("validate_request_parameters", out.ValidateRequestParameters) - - return nil -} - -func resourceAwsApiGatewayRequestValidatorUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Updating Request Validator %s", d.Id()) - - operations := make([]*apigateway.PatchOperation, 0) - - if d.HasChange("name") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/name"), - Value: aws.String(d.Get("name").(string)), - }) - } - - if d.HasChange("validate_request_body") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/validateRequestBody"), - Value: aws.String(fmt.Sprintf("%t", d.Get("validate_request_body").(bool))), - }) - } - - if d.HasChange("validate_request_parameters") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/validateRequestParameters"), - Value: aws.String(fmt.Sprintf("%t", d.Get("validate_request_parameters").(bool))), - }) - } - - input := apigateway.UpdateRequestValidatorInput{ - RequestValidatorId: aws.String(d.Id()), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - PatchOperations: operations, - } - - _, err := conn.UpdateRequestValidator(&input) - if err != nil { - return err - } - - log.Printf("[DEBUG] Updated Request Validator %s", d.Id()) - - return resourceAwsApiGatewayRequestValidatorRead(d, meta) -} - -func resourceAwsApiGatewayRequestValidatorDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting Request Validator %s", d.Id()) - - _, err := conn.DeleteRequestValidator(&apigateway.DeleteRequestValidatorInput{ - RequestValidatorId: aws.String(d.Id()), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }) - if err != nil { - // XXX: Figure out a way to delete the method that depends on the request validator first - // otherwise the validator will be dangling until the API is deleted - if !strings.Contains(err.Error(), apigateway.ErrCodeConflictException) { - return fmt.Errorf("Deleting Request Validator failed: %s", err) - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_resource.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_resource.go deleted file mode 100644 index 37eace971..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_resource.go +++ /dev/null @@ -1,164 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayResource() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayResourceCreate, - Read: resourceAwsApiGatewayResourceRead, - Update: resourceAwsApiGatewayResourceUpdate, - Delete: resourceAwsApiGatewayResourceDelete, - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.Split(d.Id(), "/") - if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { - return nil, fmt.Errorf("Unexpected format of ID (%q), expected REST-API-ID/RESOURCE-ID", d.Id()) - } - restApiID := idParts[0] - resourceID := idParts[1] - d.Set("request_validator_id", resourceID) - d.Set("rest_api_id", restApiID) - d.SetId(resourceID) - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "rest_api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "parent_id": { - Type: schema.TypeString, - Required: true, - }, - - "path_part": { - Type: schema.TypeString, - Required: true, - }, - - "path": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsApiGatewayResourceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Creating API Gateway Resource for API %s", d.Get("rest_api_id").(string)) - - var err error - resource, err := conn.CreateResource(&apigateway.CreateResourceInput{ - ParentId: aws.String(d.Get("parent_id").(string)), - PathPart: aws.String(d.Get("path_part").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }) - - if err != nil { - return fmt.Errorf("Error creating API Gateway Resource: %s", err) - } - - d.SetId(*resource.Id) - - return resourceAwsApiGatewayResourceRead(d, meta) -} - -func resourceAwsApiGatewayResourceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Reading API Gateway Resource %s", d.Id()) - resource, err := conn.GetResource(&apigateway.GetResourceInput{ - ResourceId: aws.String(d.Id()), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Resource (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("parent_id", resource.ParentId) - d.Set("path_part", resource.PathPart) - d.Set("path", resource.Path) - - return nil -} - -func resourceAwsApiGatewayResourceUpdateOperations(d *schema.ResourceData) []*apigateway.PatchOperation { - operations := make([]*apigateway.PatchOperation, 0) - if d.HasChange("path_part") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/pathPart"), - Value: aws.String(d.Get("path_part").(string)), - }) - } - - if d.HasChange("parent_id") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/parentId"), - Value: aws.String(d.Get("parent_id").(string)), - }) - } - return operations -} - -func resourceAwsApiGatewayResourceUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Updating API Gateway Resource %s", d.Id()) - _, err := conn.UpdateResource(&apigateway.UpdateResourceInput{ - ResourceId: aws.String(d.Id()), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - PatchOperations: resourceAwsApiGatewayResourceUpdateOperations(d), - }) - - if err != nil { - return err - } - - return resourceAwsApiGatewayResourceRead(d, meta) -} - -func resourceAwsApiGatewayResourceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway Resource: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] schema is %#v", d) - _, err := conn.DeleteResource(&apigateway.DeleteResourceInput{ - ResourceId: aws.String(d.Id()), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }) - if err == nil { - return nil - } - - if apigatewayErr, ok := err.(awserr.Error); ok && apigatewayErr.Code() == "NotFoundException" { - return nil - } - - return resource.NonRetryableError(err) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go deleted file mode 100644 index 7f304c8d7..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go +++ /dev/null @@ -1,417 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsApiGatewayRestApi() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayRestApiCreate, - Read: resourceAwsApiGatewayRestApiRead, - Update: resourceAwsApiGatewayRestApiUpdate, - Delete: resourceAwsApiGatewayRestApiDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - }, - - "api_key_source": { - Type: schema.TypeString, - Optional: true, - Default: "HEADER", - }, - - "policy": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - - "binary_media_types": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "body": { - Type: schema.TypeString, - Optional: true, - }, - - "minimum_compression_size": { - Type: schema.TypeInt, - Optional: true, - Default: -1, - ValidateFunc: validation.IntBetween(-1, 10485760), - }, - - "root_resource_id": { - Type: schema.TypeString, - Computed: true, - }, - - "created_date": { - Type: schema.TypeString, - Computed: true, - }, - "execution_arn": { - Type: schema.TypeString, - Computed: true, - }, - - "endpoint_configuration": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "types": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - apigateway.EndpointTypeEdge, - apigateway.EndpointTypeRegional, - apigateway.EndpointTypePrivate, - }, false), - }, - }, - }, - }, - }, - }, - } -} - -func resourceAwsApiGatewayRestApiCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Creating API Gateway") - - var description *string - if d.Get("description").(string) != "" { - description = aws.String(d.Get("description").(string)) - } - - params := &apigateway.CreateRestApiInput{ - Name: aws.String(d.Get("name").(string)), - Description: description, - } - - if v, ok := d.GetOk("endpoint_configuration"); ok { - params.EndpointConfiguration = expandApiGatewayEndpointConfiguration(v.([]interface{})) - } - - if v, ok := d.GetOk("api_key_source"); ok && v.(string) != "" { - params.ApiKeySource = aws.String(v.(string)) - } - - if v, ok := d.GetOk("policy"); ok && v.(string) != "" { - params.Policy = aws.String(v.(string)) - } - - binaryMediaTypes, binaryMediaTypesOk := d.GetOk("binary_media_types") - if binaryMediaTypesOk { - params.BinaryMediaTypes = expandStringList(binaryMediaTypes.([]interface{})) - } - - minimumCompressionSize := d.Get("minimum_compression_size").(int) - if minimumCompressionSize > -1 { - params.MinimumCompressionSize = aws.Int64(int64(minimumCompressionSize)) - } - - gateway, err := conn.CreateRestApi(params) - if err != nil { - return fmt.Errorf("Error creating API Gateway: %s", err) - } - - d.SetId(*gateway.Id) - - if body, ok := d.GetOk("body"); ok { - log.Printf("[DEBUG] Initializing API Gateway from OpenAPI spec %s", d.Id()) - _, err := conn.PutRestApi(&apigateway.PutRestApiInput{ - RestApiId: gateway.Id, - Mode: aws.String(apigateway.PutModeOverwrite), - Body: []byte(body.(string)), - }) - if err != nil { - return fmt.Errorf("error creating API Gateway specification: %s", err) - } - } - - return resourceAwsApiGatewayRestApiRead(d, meta) -} - -func resourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Reading API Gateway %s", d.Id()) - - api, err := conn.GetRestApi(&apigateway.GetRestApiInput{ - RestApiId: aws.String(d.Id()), - }) - if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { - log.Printf("[WARN] API Gateway (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - if err != nil { - return fmt.Errorf("error reading API Gateway REST API (%s): %s", d.Id(), err) - } - - getResourcesInput := &apigateway.GetResourcesInput{ - RestApiId: aws.String(d.Id()), - } - err = conn.GetResourcesPages(getResourcesInput, func(page *apigateway.GetResourcesOutput, lastPage bool) bool { - for _, item := range page.Items { - if aws.StringValue(item.Path) == "/" { - d.Set("root_resource_id", item.Id) - return false - } - } - return !lastPage - }) - if err != nil { - return fmt.Errorf("error reading API Gateway REST API (%s) resources: %s", d.Id(), err) - } - - d.Set("name", api.Name) - d.Set("description", api.Description) - d.Set("api_key_source", api.ApiKeySource) - - // The API returns policy as an escaped JSON string - // {\\\"Version\\\":\\\"2012-10-17\\\",...} - // The string must be normalized before unquoting as it may contain escaped - // forward slashes in CIDR blocks, which will break strconv.Unquote - - // I'm not sure why it needs to be wrapped with double quotes first, but it does - normalized_policy, err := structure.NormalizeJsonString(`"` + aws.StringValue(api.Policy) + `"`) - if err != nil { - fmt.Printf("error normalizing policy JSON: %s\n", err) - } - policy, err := strconv.Unquote(normalized_policy) - if err != nil { - return fmt.Errorf("error unescaping policy: %s", err) - } - d.Set("policy", policy) - - d.Set("binary_media_types", api.BinaryMediaTypes) - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "execute-api", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: d.Id(), - }.String() - d.Set("execution_arn", arn) - - if api.MinimumCompressionSize == nil { - d.Set("minimum_compression_size", -1) - } else { - d.Set("minimum_compression_size", api.MinimumCompressionSize) - } - if err := d.Set("created_date", api.CreatedDate.Format(time.RFC3339)); err != nil { - log.Printf("[DEBUG] Error setting created_date: %s", err) - } - - if err := d.Set("endpoint_configuration", flattenApiGatewayEndpointConfiguration(api.EndpointConfiguration)); err != nil { - return fmt.Errorf("error setting endpoint_configuration: %s", err) - } - - return nil -} - -func resourceAwsApiGatewayRestApiUpdateOperations(d *schema.ResourceData) []*apigateway.PatchOperation { - operations := make([]*apigateway.PatchOperation, 0) - - if d.HasChange("name") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/name"), - Value: aws.String(d.Get("name").(string)), - }) - } - - if d.HasChange("description") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/description"), - Value: aws.String(d.Get("description").(string)), - }) - } - - if d.HasChange("api_key_source") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/apiKeySource"), - Value: aws.String(d.Get("api_key_source").(string)), - }) - } - - if d.HasChange("policy") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/policy"), - Value: aws.String(d.Get("policy").(string)), - }) - } - - if d.HasChange("minimum_compression_size") { - minimumCompressionSize := d.Get("minimum_compression_size").(int) - var value string - if minimumCompressionSize > -1 { - value = strconv.Itoa(minimumCompressionSize) - } - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/minimumCompressionSize"), - Value: aws.String(value), - }) - } - - if d.HasChange("binary_media_types") { - o, n := d.GetChange("binary_media_types") - prefix := "binaryMediaTypes" - - old := o.([]interface{}) - new := n.([]interface{}) - - // Remove every binary media types. Simpler to remove and add new ones, - // since there are no replacings. - for _, v := range old { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, escapeJsonPointer(v.(string)))), - }) - } - - // Handle additions - if len(new) > 0 { - for _, v := range new { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, escapeJsonPointer(v.(string)))), - }) - } - } - } - - if d.HasChange("endpoint_configuration.0.types") { - // The REST API must have an endpoint type. - // If attempting to remove the configuration, do nothing. - if v, ok := d.GetOk("endpoint_configuration"); ok && len(v.([]interface{})) > 0 { - m := v.([]interface{})[0].(map[string]interface{}) - - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/endpointConfiguration/types/0"), - Value: aws.String(m["types"].([]interface{})[0].(string)), - }) - } - } - - return operations -} - -func resourceAwsApiGatewayRestApiUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Updating API Gateway %s", d.Id()) - - if d.HasChange("body") { - if body, ok := d.GetOk("body"); ok { - log.Printf("[DEBUG] Updating API Gateway from OpenAPI spec: %s", d.Id()) - _, err := conn.PutRestApi(&apigateway.PutRestApiInput{ - RestApiId: aws.String(d.Id()), - Mode: aws.String(apigateway.PutModeOverwrite), - Body: []byte(body.(string)), - }) - if err != nil { - return fmt.Errorf("error updating API Gateway specification: %s", err) - } - } - } - - _, err := conn.UpdateRestApi(&apigateway.UpdateRestApiInput{ - RestApiId: aws.String(d.Id()), - PatchOperations: resourceAwsApiGatewayRestApiUpdateOperations(d), - }) - - if err != nil { - return err - } - log.Printf("[DEBUG] Updated API Gateway %s", d.Id()) - - return resourceAwsApiGatewayRestApiRead(d, meta) -} - -func resourceAwsApiGatewayRestApiDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway: %s", d.Id()) - - return resource.Retry(10*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteRestApi(&apigateway.DeleteRestApiInput{ - RestApiId: aws.String(d.Id()), - }) - if err == nil { - return nil - } - - if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { - return nil - } - - return resource.NonRetryableError(err) - }) -} - -func expandApiGatewayEndpointConfiguration(l []interface{}) *apigateway.EndpointConfiguration { - if len(l) == 0 { - return nil - } - - m := l[0].(map[string]interface{}) - - endpointConfiguration := &apigateway.EndpointConfiguration{ - Types: expandStringList(m["types"].([]interface{})), - } - - return endpointConfiguration -} - -func flattenApiGatewayEndpointConfiguration(endpointConfiguration *apigateway.EndpointConfiguration) []interface{} { - if endpointConfiguration == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "types": flattenStringList(endpointConfiguration.Types), - } - - return []interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go deleted file mode 100644 index b3b1275db..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go +++ /dev/null @@ -1,485 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayStage() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayStageCreate, - Read: resourceAwsApiGatewayStageRead, - Update: resourceAwsApiGatewayStageUpdate, - Delete: resourceAwsApiGatewayStageDelete, - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.Split(d.Id(), "/") - if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { - return nil, fmt.Errorf("Unexpected format of ID (%q), expected REST-API-ID/STAGE-NAME", d.Id()) - } - restApiID := idParts[0] - stageName := idParts[1] - d.Set("stage_name", stageName) - d.Set("rest_api_id", restApiID) - d.SetId(fmt.Sprintf("ags-%s-%s", restApiID, stageName)) - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "access_log_settings": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "destination_arn": { - Type: schema.TypeString, - Required: true, - StateFunc: func(arn interface{}) string { - // arns coming from a TF reference to a log group contain a trailing `:*` which is not valid - return strings.TrimSuffix(arn.(string), ":*") - }, - }, - "format": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "cache_cluster_enabled": { - Type: schema.TypeBool, - Optional: true, - }, - "cache_cluster_size": { - Type: schema.TypeString, - Optional: true, - }, - "client_certificate_id": { - Type: schema.TypeString, - Optional: true, - }, - "deployment_id": { - Type: schema.TypeString, - Required: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "documentation_version": { - Type: schema.TypeString, - Optional: true, - }, - "execution_arn": { - Type: schema.TypeString, - Computed: true, - }, - "invoke_url": { - Type: schema.TypeString, - Computed: true, - }, - "rest_api_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "stage_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "variables": { - Type: schema.TypeMap, - Optional: true, - }, - "tags": tagsSchema(), - "xray_tracing_enabled": { - Type: schema.TypeBool, - Optional: true, - }, - }, - } -} - -func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - d.Partial(true) - - input := apigateway.CreateStageInput{ - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StageName: aws.String(d.Get("stage_name").(string)), - DeploymentId: aws.String(d.Get("deployment_id").(string)), - } - - waitForCache := false - if v, ok := d.GetOk("cache_cluster_enabled"); ok { - input.CacheClusterEnabled = aws.Bool(v.(bool)) - waitForCache = true - } - if v, ok := d.GetOk("cache_cluster_size"); ok { - input.CacheClusterSize = aws.String(v.(string)) - waitForCache = true - } - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - if v, ok := d.GetOk("xray_tracing_enabled"); ok { - input.TracingEnabled = aws.Bool(v.(bool)) - } - if v, ok := d.GetOk("documentation_version"); ok { - input.DocumentationVersion = aws.String(v.(string)) - } - if vars, ok := d.GetOk("variables"); ok { - variables := make(map[string]string) - for k, v := range vars.(map[string]interface{}) { - variables[k] = v.(string) - } - input.Variables = aws.StringMap(variables) - } - if vars, ok := d.GetOk("tags"); ok { - newMap := make(map[string]string, len(vars.(map[string]interface{}))) - for k, v := range vars.(map[string]interface{}) { - newMap[k] = v.(string) - } - input.Tags = aws.StringMap(newMap) - } - - out, err := conn.CreateStage(&input) - if err != nil { - return fmt.Errorf("Error creating API Gateway Stage: %s", err) - } - - d.SetId(fmt.Sprintf("ags-%s-%s", d.Get("rest_api_id").(string), d.Get("stage_name").(string))) - - d.SetPartial("rest_api_id") - d.SetPartial("stage_name") - d.SetPartial("deployment_id") - d.SetPartial("description") - d.SetPartial("variables") - d.SetPartial("xray_tracing_enabled") - - if waitForCache && *out.CacheClusterStatus != "NOT_AVAILABLE" { - stateConf := &resource.StateChangeConf{ - Pending: []string{ - "CREATE_IN_PROGRESS", - "DELETE_IN_PROGRESS", - "FLUSH_IN_PROGRESS", - }, - Target: []string{"AVAILABLE"}, - Refresh: apiGatewayStageCacheRefreshFunc(conn, - d.Get("rest_api_id").(string), - d.Get("stage_name").(string)), - Timeout: 90 * time.Minute, - } - - _, err := stateConf.WaitForState() - if err != nil { - return err - } - } - - d.SetPartial("cache_cluster_enabled") - d.SetPartial("cache_cluster_size") - d.Partial(false) - - if _, ok := d.GetOk("client_certificate_id"); ok { - return resourceAwsApiGatewayStageUpdate(d, meta) - } - if _, ok := d.GetOk("access_log_settings"); ok { - return resourceAwsApiGatewayStageUpdate(d, meta) - } - return resourceAwsApiGatewayStageRead(d, meta) -} - -func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Reading API Gateway Stage %s", d.Id()) - restApiId := d.Get("rest_api_id").(string) - stageName := d.Get("stage_name").(string) - input := apigateway.GetStageInput{ - RestApiId: aws.String(restApiId), - StageName: aws.String(stageName), - } - stage, err := conn.GetStage(&input) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Stage (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - log.Printf("[DEBUG] Received API Gateway Stage: %s", stage) - - if err := d.Set("access_log_settings", flattenApiGatewayStageAccessLogSettings(stage.AccessLogSettings)); err != nil { - return fmt.Errorf("error setting access_log_settings: %s", err) - } - - d.Set("client_certificate_id", stage.ClientCertificateId) - - if stage.CacheClusterStatus != nil && *stage.CacheClusterStatus == "DELETE_IN_PROGRESS" { - d.Set("cache_cluster_enabled", false) - d.Set("cache_cluster_size", nil) - } else { - d.Set("cache_cluster_enabled", stage.CacheClusterEnabled) - d.Set("cache_cluster_size", stage.CacheClusterSize) - } - - d.Set("deployment_id", stage.DeploymentId) - d.Set("description", stage.Description) - d.Set("documentation_version", stage.DocumentationVersion) - d.Set("xray_tracing_enabled", stage.TracingEnabled) - - if err := d.Set("tags", aws.StringValueMap(stage.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - if err := d.Set("variables", aws.StringValueMap(stage.Variables)); err != nil { - return fmt.Errorf("error setting variables: %s", err) - } - - region := meta.(*AWSClient).region - d.Set("invoke_url", buildApiGatewayInvokeURL(restApiId, region, stageName)) - - executionArn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "execute-api", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("%s/%s", restApiId, stageName), - }.String() - d.Set("execution_arn", executionArn) - - return nil -} - -func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - d.Partial(true) - - stageArn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "apigateway", - Resource: fmt.Sprintf("/restapis/%s/stages/%s", d.Get("rest_api_id").(string), d.Get("stage_name").(string)), - }.String() - if tagErr := setTagsAPIGatewayStage(conn, d, stageArn); tagErr != nil { - return tagErr - } - d.SetPartial("tags") - - operations := make([]*apigateway.PatchOperation, 0) - waitForCache := false - if d.HasChange("cache_cluster_enabled") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/cacheClusterEnabled"), - Value: aws.String(fmt.Sprintf("%t", d.Get("cache_cluster_enabled").(bool))), - }) - waitForCache = true - } - if d.HasChange("cache_cluster_size") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/cacheClusterSize"), - Value: aws.String(d.Get("cache_cluster_size").(string)), - }) - waitForCache = true - } - if d.HasChange("client_certificate_id") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/clientCertificateId"), - Value: aws.String(d.Get("client_certificate_id").(string)), - }) - } - if d.HasChange("deployment_id") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/deploymentId"), - Value: aws.String(d.Get("deployment_id").(string)), - }) - } - if d.HasChange("description") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/description"), - Value: aws.String(d.Get("description").(string)), - }) - } - if d.HasChange("xray_tracing_enabled") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/tracingEnabled"), - Value: aws.String(fmt.Sprintf("%t", d.Get("xray_tracing_enabled").(bool))), - }) - } - if d.HasChange("documentation_version") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/documentationVersion"), - Value: aws.String(d.Get("documentation_version").(string)), - }) - } - if d.HasChange("variables") { - o, n := d.GetChange("variables") - oldV := o.(map[string]interface{}) - newV := n.(map[string]interface{}) - operations = append(operations, diffVariablesOps(oldV, newV)...) - } - if d.HasChange("access_log_settings") { - accessLogSettings := d.Get("access_log_settings").([]interface{}) - if len(accessLogSettings) == 1 { - operations = append(operations, - &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/accessLogSettings/destinationArn"), - // arns coming from a TF reference to a log group contain a trailing `:*` which is not valid - Value: aws.String(strings.TrimSuffix(d.Get("access_log_settings.0.destination_arn").(string), ":*")), - }, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/accessLogSettings/format"), - Value: aws.String(d.Get("access_log_settings.0.format").(string)), - }) - } else if len(accessLogSettings) == 0 { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String("/accessLogSettings"), - }) - } - } - - input := apigateway.UpdateStageInput{ - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StageName: aws.String(d.Get("stage_name").(string)), - PatchOperations: operations, - } - log.Printf("[DEBUG] Updating API Gateway Stage: %s", input) - out, err := conn.UpdateStage(&input) - if err != nil { - return fmt.Errorf("Updating API Gateway Stage failed: %s", err) - } - - d.SetPartial("client_certificate_id") - d.SetPartial("deployment_id") - d.SetPartial("description") - d.SetPartial("xray_tracing_enabled") - d.SetPartial("variables") - - if waitForCache && *out.CacheClusterStatus != "NOT_AVAILABLE" { - stateConf := &resource.StateChangeConf{ - Pending: []string{ - "CREATE_IN_PROGRESS", - "FLUSH_IN_PROGRESS", - }, - Target: []string{ - "AVAILABLE", - // There's an AWS API bug (raised & confirmed in Sep 2016 by support) - // which causes the stage to remain in deletion state forever - "DELETE_IN_PROGRESS", - }, - Refresh: apiGatewayStageCacheRefreshFunc(conn, - d.Get("rest_api_id").(string), - d.Get("stage_name").(string)), - Timeout: 30 * time.Minute, - } - - _, err := stateConf.WaitForState() - if err != nil { - return err - } - } - - d.SetPartial("cache_cluster_enabled") - d.SetPartial("cache_cluster_size") - d.Partial(false) - - return resourceAwsApiGatewayStageRead(d, meta) -} - -func diffVariablesOps(oldVars, newVars map[string]interface{}) []*apigateway.PatchOperation { - ops := make([]*apigateway.PatchOperation, 0) - prefix := "/variables/" - - for k := range oldVars { - if _, ok := newVars[k]; !ok { - ops = append(ops, &apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String(prefix + k), - }) - } - } - - for k, v := range newVars { - newValue := v.(string) - - if oldV, ok := oldVars[k]; ok { - oldValue := oldV.(string) - if oldValue == newValue { - continue - } - } - ops = append(ops, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String(prefix + k), - Value: aws.String(newValue), - }) - } - - return ops -} - -func apiGatewayStageCacheRefreshFunc(conn *apigateway.APIGateway, apiId, stageName string) func() (interface{}, string, error) { - return func() (interface{}, string, error) { - input := apigateway.GetStageInput{ - RestApiId: aws.String(apiId), - StageName: aws.String(stageName), - } - out, err := conn.GetStage(&input) - if err != nil { - return 42, "", err - } - - return out, *out.CacheClusterStatus, nil - } -} - -func resourceAwsApiGatewayStageDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Deleting API Gateway Stage: %s", d.Id()) - input := apigateway.DeleteStageInput{ - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StageName: aws.String(d.Get("stage_name").(string)), - } - _, err := conn.DeleteStage(&input) - if err != nil { - return fmt.Errorf("Deleting API Gateway Stage failed: %s", err) - } - - return nil -} - -func flattenApiGatewayStageAccessLogSettings(accessLogSettings *apigateway.AccessLogSettings) []map[string]interface{} { - result := make([]map[string]interface{}, 0, 1) - if accessLogSettings != nil { - result = append(result, map[string]interface{}{ - "destination_arn": aws.StringValue(accessLogSettings.DestinationArn), - "format": aws.StringValue(accessLogSettings.Format), - }) - } - return result -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan.go deleted file mode 100644 index cf4653825..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan.go +++ /dev/null @@ -1,505 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsApiGatewayUsagePlan() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayUsagePlanCreate, - Read: resourceAwsApiGatewayUsagePlanRead, - Update: resourceAwsApiGatewayUsagePlanUpdate, - Delete: resourceAwsApiGatewayUsagePlanDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, // Required since not addable nor removable afterwards - }, - - "description": { - Type: schema.TypeString, - Optional: true, - }, - - "api_stages": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "api_id": { - Type: schema.TypeString, - Required: true, - }, - - "stage": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - - "quota_settings": { - Type: schema.TypeSet, - MaxItems: 1, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "limit": { - Type: schema.TypeInt, - Required: true, // Required as not removable singularly - }, - - "offset": { - Type: schema.TypeInt, - Default: 0, - Optional: true, - }, - - "period": { - Type: schema.TypeString, - Required: true, // Required as not removable - ValidateFunc: validation.StringInSlice([]string{ - apigateway.QuotaPeriodTypeDay, - apigateway.QuotaPeriodTypeWeek, - apigateway.QuotaPeriodTypeMonth, - }, false), - }, - }, - }, - }, - - "throttle_settings": { - Type: schema.TypeSet, - MaxItems: 1, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "burst_limit": { - Type: schema.TypeInt, - Default: 0, - Optional: true, - }, - - "rate_limit": { - Type: schema.TypeFloat, - Default: 0, - Optional: true, - }, - }, - }, - }, - - "product_code": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsApiGatewayUsagePlanCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Print("[DEBUG] Creating API Gateway Usage Plan") - - params := &apigateway.CreateUsagePlanInput{ - Name: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("description"); ok { - params.Description = aws.String(v.(string)) - } - - if s, ok := d.GetOk("api_stages"); ok { - stages := s.([]interface{}) - as := make([]*apigateway.ApiStage, 0) - - for _, v := range stages { - sv := v.(map[string]interface{}) - stage := &apigateway.ApiStage{} - - if v, ok := sv["api_id"].(string); ok && v != "" { - stage.ApiId = aws.String(v) - } - - if v, ok := sv["stage"].(string); ok && v != "" { - stage.Stage = aws.String(v) - } - - as = append(as, stage) - } - - if len(as) > 0 { - params.ApiStages = as - } - } - - if v, ok := d.GetOk("quota_settings"); ok { - settings := v.(*schema.Set).List() - q, ok := settings[0].(map[string]interface{}) - - if errors := validateApiGatewayUsagePlanQuotaSettings(q); len(errors) > 0 { - return fmt.Errorf("Error validating the quota settings: %v", errors) - } - - if !ok { - return errors.New("At least one field is expected inside quota_settings") - } - - qs := &apigateway.QuotaSettings{} - - if sv, ok := q["limit"].(int); ok { - qs.Limit = aws.Int64(int64(sv)) - } - - if sv, ok := q["offset"].(int); ok { - qs.Offset = aws.Int64(int64(sv)) - } - - if sv, ok := q["period"].(string); ok && sv != "" { - qs.Period = aws.String(sv) - } - - params.Quota = qs - } - - if v, ok := d.GetOk("throttle_settings"); ok { - settings := v.(*schema.Set).List() - q, ok := settings[0].(map[string]interface{}) - - if !ok { - return errors.New("At least one field is expected inside throttle_settings") - } - - ts := &apigateway.ThrottleSettings{} - - if sv, ok := q["burst_limit"].(int); ok { - ts.BurstLimit = aws.Int64(int64(sv)) - } - - if sv, ok := q["rate_limit"].(float64); ok { - ts.RateLimit = aws.Float64(sv) - } - - params.Throttle = ts - } - - up, err := conn.CreateUsagePlan(params) - if err != nil { - return fmt.Errorf("Error creating API Gateway Usage Plan: %s", err) - } - - d.SetId(*up.Id) - - // Handle case of adding the product code since not addable when - // creating the Usage Plan initially. - if v, ok := d.GetOk("product_code"); ok { - updateParameters := &apigateway.UpdateUsagePlanInput{ - UsagePlanId: aws.String(d.Id()), - PatchOperations: []*apigateway.PatchOperation{ - { - Op: aws.String("add"), - Path: aws.String("/productCode"), - Value: aws.String(v.(string)), - }, - }, - } - - up, err = conn.UpdateUsagePlan(updateParameters) - if err != nil { - return fmt.Errorf("Error creating the API Gateway Usage Plan product code: %s", err) - } - } - - return resourceAwsApiGatewayUsagePlanRead(d, meta) -} - -func resourceAwsApiGatewayUsagePlanRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Reading API Gateway Usage Plan: %s", d.Id()) - - up, err := conn.GetUsagePlan(&apigateway.GetUsagePlanInput{ - UsagePlanId: aws.String(d.Id()), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Usage Plan (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("name", up.Name) - d.Set("description", up.Description) - d.Set("product_code", up.ProductCode) - - if up.ApiStages != nil { - if err := d.Set("api_stages", flattenApiGatewayUsageApiStages(up.ApiStages)); err != nil { - return fmt.Errorf("Error setting api_stages error: %#v", err) - } - } - - if up.Throttle != nil { - if err := d.Set("throttle_settings", flattenApiGatewayUsagePlanThrottling(up.Throttle)); err != nil { - return fmt.Errorf("Error setting throttle_settings error: %#v", err) - } - } - - if up.Quota != nil { - if err := d.Set("quota_settings", flattenApiGatewayUsagePlanQuota(up.Quota)); err != nil { - return fmt.Errorf("Error setting quota_settings error: %#v", err) - } - } - - return nil -} - -func resourceAwsApiGatewayUsagePlanUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Print("[DEBUG] Updating API Gateway Usage Plan") - - operations := make([]*apigateway.PatchOperation, 0) - - if d.HasChange("name") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/name"), - Value: aws.String(d.Get("name").(string)), - }) - } - - if d.HasChange("description") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/description"), - Value: aws.String(d.Get("description").(string)), - }) - } - - if d.HasChange("product_code") { - v, ok := d.GetOk("product_code") - - if ok { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/productCode"), - Value: aws.String(v.(string)), - }) - } else { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String("/productCode"), - }) - } - } - - if d.HasChange("api_stages") { - o, n := d.GetChange("api_stages") - old := o.([]interface{}) - new := n.([]interface{}) - - // Remove every stages associated. Simpler to remove and add new ones, - // since there are no replacings. - for _, v := range old { - m := v.(map[string]interface{}) - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String("/apiStages"), - Value: aws.String(fmt.Sprintf("%s:%s", m["api_id"].(string), m["stage"].(string))), - }) - } - - // Handle additions - if len(new) > 0 { - for _, v := range new { - m := v.(map[string]interface{}) - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String("/apiStages"), - Value: aws.String(fmt.Sprintf("%s:%s", m["api_id"].(string), m["stage"].(string))), - }) - } - } - } - - if d.HasChange("throttle_settings") { - o, n := d.GetChange("throttle_settings") - - os := o.(*schema.Set) - ns := n.(*schema.Set) - diff := ns.Difference(os).List() - - // Handle Removal - if len(diff) == 0 { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String("/throttle"), - }) - } - - if len(diff) > 0 { - d := diff[0].(map[string]interface{}) - - // Handle Replaces - if o != nil && n != nil { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/throttle/rateLimit"), - Value: aws.String(strconv.FormatFloat(d["rate_limit"].(float64), 'f', -1, 64)), - }) - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/throttle/burstLimit"), - Value: aws.String(strconv.Itoa(d["burst_limit"].(int))), - }) - } - - // Handle Additions - if o == nil && n != nil { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String("/throttle/rateLimit"), - Value: aws.String(strconv.FormatFloat(d["rate_limit"].(float64), 'f', -1, 64)), - }) - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String("/throttle/burstLimit"), - Value: aws.String(strconv.Itoa(d["burst_limit"].(int))), - }) - } - } - } - - if d.HasChange("quota_settings") { - o, n := d.GetChange("quota_settings") - - os := o.(*schema.Set) - ns := n.(*schema.Set) - diff := ns.Difference(os).List() - - // Handle Removal - if len(diff) == 0 { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String("/quota"), - }) - } - - if len(diff) > 0 { - d := diff[0].(map[string]interface{}) - - if errors := validateApiGatewayUsagePlanQuotaSettings(d); len(errors) > 0 { - return fmt.Errorf("Error validating the quota settings: %v", errors) - } - - // Handle Replaces - if o != nil && n != nil { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/quota/limit"), - Value: aws.String(strconv.Itoa(d["limit"].(int))), - }) - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/quota/offset"), - Value: aws.String(strconv.Itoa(d["offset"].(int))), - }) - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/quota/period"), - Value: aws.String(d["period"].(string)), - }) - } - - // Handle Additions - if o == nil && n != nil { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String("/quota/limit"), - Value: aws.String(strconv.Itoa(d["limit"].(int))), - }) - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String("/quota/offset"), - Value: aws.String(strconv.Itoa(d["offset"].(int))), - }) - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String("/quota/period"), - Value: aws.String(d["period"].(string)), - }) - } - } - } - - params := &apigateway.UpdateUsagePlanInput{ - UsagePlanId: aws.String(d.Id()), - PatchOperations: operations, - } - - _, err := conn.UpdateUsagePlan(params) - if err != nil { - return fmt.Errorf("Error updating API Gateway Usage Plan: %s", err) - } - - return resourceAwsApiGatewayUsagePlanRead(d, meta) -} - -func resourceAwsApiGatewayUsagePlanDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - // Removing existing api stages associated - if apistages, ok := d.GetOk("api_stages"); ok { - log.Printf("[DEBUG] Deleting API Stages associated with Usage Plan: %s", d.Id()) - stages := apistages.([]interface{}) - operations := []*apigateway.PatchOperation{} - - for _, v := range stages { - sv := v.(map[string]interface{}) - - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String("/apiStages"), - Value: aws.String(fmt.Sprintf("%s:%s", sv["api_id"].(string), sv["stage"].(string))), - }) - } - - _, err := conn.UpdateUsagePlan(&apigateway.UpdateUsagePlanInput{ - UsagePlanId: aws.String(d.Id()), - PatchOperations: operations, - }) - if err != nil { - return fmt.Errorf("Error removing API Stages associated with Usage Plan: %s", err) - } - } - - log.Printf("[DEBUG] Deleting API Gateway Usage Plan: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteUsagePlan(&apigateway.DeleteUsagePlanInput{ - UsagePlanId: aws.String(d.Id()), - }) - - if err == nil { - return nil - } - - return resource.NonRetryableError(err) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan_key.go deleted file mode 100644 index b9218b6a0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan_key.go +++ /dev/null @@ -1,115 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayUsagePlanKey() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayUsagePlanKeyCreate, - Read: resourceAwsApiGatewayUsagePlanKeyRead, - Delete: resourceAwsApiGatewayUsagePlanKeyDelete, - - Schema: map[string]*schema.Schema{ - "key_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "key_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "usage_plan_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "name": { - Type: schema.TypeString, - Computed: true, - }, - - "value": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsApiGatewayUsagePlanKeyCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Print("[DEBUG] Creating API Gateway Usage Plan Key") - - params := &apigateway.CreateUsagePlanKeyInput{ - KeyId: aws.String(d.Get("key_id").(string)), - KeyType: aws.String(d.Get("key_type").(string)), - UsagePlanId: aws.String(d.Get("usage_plan_id").(string)), - } - - up, err := conn.CreateUsagePlanKey(params) - if err != nil { - return fmt.Errorf("Error creating API Gateway Usage Plan Key: %s", err) - } - - d.SetId(*up.Id) - - return resourceAwsApiGatewayUsagePlanKeyRead(d, meta) -} - -func resourceAwsApiGatewayUsagePlanKeyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - log.Printf("[DEBUG] Reading API Gateway Usage Plan Key: %s", d.Id()) - - up, err := conn.GetUsagePlanKey(&apigateway.GetUsagePlanKeyInput{ - UsagePlanId: aws.String(d.Get("usage_plan_id").(string)), - KeyId: aws.String(d.Get("key_id").(string)), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] API Gateway Usage Plan Key (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("name", up.Name) - d.Set("value", up.Value) - - return nil -} - -func resourceAwsApiGatewayUsagePlanKeyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - log.Printf("[DEBUG] Deleting API Gateway Usage Plan Key: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteUsagePlanKey(&apigateway.DeleteUsagePlanKeyInput{ - UsagePlanId: aws.String(d.Get("usage_plan_id").(string)), - KeyId: aws.String(d.Get("key_id").(string)), - }) - if err == nil { - return nil - } - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { - return nil - } - - return resource.NonRetryableError(err) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go deleted file mode 100644 index d892d7588..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go +++ /dev/null @@ -1,205 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsApiGatewayVpcLink() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsApiGatewayVpcLinkCreate, - Read: resourceAwsApiGatewayVpcLinkRead, - Update: resourceAwsApiGatewayVpcLinkUpdate, - Delete: resourceAwsApiGatewayVpcLinkDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "target_arns": { - Type: schema.TypeSet, - MaxItems: 1, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func resourceAwsApiGatewayVpcLinkCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - input := &apigateway.CreateVpcLinkInput{ - Name: aws.String(d.Get("name").(string)), - TargetArns: expandStringList(d.Get("target_arns").(*schema.Set).List()), - } - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - resp, err := conn.CreateVpcLink(input) - if err != nil { - return err - } - - d.SetId(*resp.Id) - - stateConf := &resource.StateChangeConf{ - Pending: []string{apigateway.VpcLinkStatusPending}, - Target: []string{apigateway.VpcLinkStatusAvailable}, - Refresh: apigatewayVpcLinkRefreshStatusFunc(conn, *resp.Id), - Timeout: 8 * time.Minute, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - d.SetId("") - return fmt.Errorf("Error waiting for APIGateway Vpc Link status to be \"%s\": %s", apigateway.VpcLinkStatusAvailable, err) - } - - return nil -} - -func resourceAwsApiGatewayVpcLinkRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - input := &apigateway.GetVpcLinkInput{ - VpcLinkId: aws.String(d.Id()), - } - - resp, err := conn.GetVpcLink(input) - if err != nil { - if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { - log.Printf("[WARN] VPC Link %s not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("name", resp.Name) - d.Set("description", resp.Description) - d.Set("target_arns", flattenStringList(resp.TargetArns)) - return nil -} - -func resourceAwsApiGatewayVpcLinkUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - operations := make([]*apigateway.PatchOperation, 0) - - if d.HasChange("name") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/name"), - Value: aws.String(d.Get("name").(string)), - }) - } - - if d.HasChange("description") { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), - Path: aws.String("/description"), - Value: aws.String(d.Get("description").(string)), - }) - } - - input := &apigateway.UpdateVpcLinkInput{ - VpcLinkId: aws.String(d.Id()), - PatchOperations: operations, - } - - _, err := conn.UpdateVpcLink(input) - if err != nil { - if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { - log.Printf("[WARN] VPC Link %s not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{apigateway.VpcLinkStatusPending}, - Target: []string{apigateway.VpcLinkStatusAvailable}, - Refresh: apigatewayVpcLinkRefreshStatusFunc(conn, d.Id()), - Timeout: 8 * time.Minute, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for APIGateway Vpc Link status to be \"%s\": %s", apigateway.VpcLinkStatusAvailable, err) - } - - return nil -} - -func resourceAwsApiGatewayVpcLinkDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - - input := &apigateway.DeleteVpcLinkInput{ - VpcLinkId: aws.String(d.Id()), - } - - _, err := conn.DeleteVpcLink(input) - if err != nil { - if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { - return nil - } - return err - } - - stateConf := resource.StateChangeConf{ - Pending: []string{apigateway.VpcLinkStatusPending, - apigateway.VpcLinkStatusAvailable, - apigateway.VpcLinkStatusDeleting}, - Target: []string{""}, - Timeout: 5 * time.Minute, - MinTimeout: 1 * time.Second, - Refresh: func() (interface{}, string, error) { - resp, err := conn.GetVpcLink(&apigateway.GetVpcLinkInput{ - VpcLinkId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { - return 1, "", nil - } - return nil, "failed", err - } - return resp, *resp.Status, nil - }, - } - - _, err = stateConf.WaitForState() - return err -} - -func apigatewayVpcLinkRefreshStatusFunc(conn *apigateway.APIGateway, vl string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &apigateway.GetVpcLinkInput{ - VpcLinkId: aws.String(vl), - } - resp, err := conn.GetVpcLink(input) - if err != nil { - return nil, "failed", err - } - return resp, *resp.Status, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_app_cookie_stickiness_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_app_cookie_stickiness_policy.go deleted file mode 100644 index a44bd364e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_app_cookie_stickiness_policy.go +++ /dev/null @@ -1,221 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "strconv" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsAppCookieStickinessPolicy() *schema.Resource { - return &schema.Resource{ - // There is no concept of "updating" an App Stickiness policy in - // the AWS API. - Create: resourceAwsAppCookieStickinessPolicyCreate, - Read: resourceAwsAppCookieStickinessPolicyRead, - Delete: resourceAwsAppCookieStickinessPolicyDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - es = append(es, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) - } - return - }, - }, - - "load_balancer": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "lb_port": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - - "cookie_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsAppCookieStickinessPolicyCreate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - // Provision the AppStickinessPolicy - acspOpts := &elb.CreateAppCookieStickinessPolicyInput{ - CookieName: aws.String(d.Get("cookie_name").(string)), - LoadBalancerName: aws.String(d.Get("load_balancer").(string)), - PolicyName: aws.String(d.Get("name").(string)), - } - - if _, err := elbconn.CreateAppCookieStickinessPolicy(acspOpts); err != nil { - return fmt.Errorf("Error creating AppCookieStickinessPolicy: %s", err) - } - - setLoadBalancerOpts := &elb.SetLoadBalancerPoliciesOfListenerInput{ - LoadBalancerName: aws.String(d.Get("load_balancer").(string)), - LoadBalancerPort: aws.Int64(int64(d.Get("lb_port").(int))), - PolicyNames: []*string{aws.String(d.Get("name").(string))}, - } - - if _, err := elbconn.SetLoadBalancerPoliciesOfListener(setLoadBalancerOpts); err != nil { - return fmt.Errorf("Error setting AppCookieStickinessPolicy: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%d:%s", - *acspOpts.LoadBalancerName, - *setLoadBalancerOpts.LoadBalancerPort, - *acspOpts.PolicyName)) - return nil -} - -func resourceAwsAppCookieStickinessPolicyRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - lbName, lbPort, policyName := resourceAwsAppCookieStickinessPolicyParseId(d.Id()) - - request := &elb.DescribeLoadBalancerPoliciesInput{ - LoadBalancerName: aws.String(lbName), - PolicyNames: []*string{aws.String(policyName)}, - } - - getResp, err := elbconn.DescribeLoadBalancerPolicies(request) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - if ec2err.Code() == "PolicyNotFound" || ec2err.Code() == "LoadBalancerNotFound" { - log.Printf("[WARN] Load Balancer / Load Balancer Policy (%s) not found, removing from state", d.Id()) - d.SetId("") - } - return nil - } - return fmt.Errorf("Error retrieving policy: %s", err) - } - if len(getResp.PolicyDescriptions) != 1 { - return fmt.Errorf("Unable to find policy %#v", getResp.PolicyDescriptions) - } - - // we know the policy exists now, but we have to check if it's assigned to a listener - assigned, err := resourceAwsELBSticknessPolicyAssigned(policyName, lbName, lbPort, elbconn) - if err != nil { - return err - } - if !assigned { - // policy exists, but isn't assigned to a listener - log.Printf("[DEBUG] policy '%s' exists, but isn't assigned to a listener", policyName) - d.SetId("") - return nil - } - - // We can get away with this because there's only one attribute, the - // cookie expiration, in these descriptions. - policyDesc := getResp.PolicyDescriptions[0] - cookieAttr := policyDesc.PolicyAttributeDescriptions[0] - if *cookieAttr.AttributeName != "CookieName" { - return fmt.Errorf("Unable to find cookie Name.") - } - - d.Set("cookie_name", cookieAttr.AttributeValue) - d.Set("name", policyName) - d.Set("load_balancer", lbName) - - lbPortInt, _ := strconv.Atoi(lbPort) - d.Set("lb_port", lbPortInt) - - return nil -} - -// Determine if a particular policy is assigned to an ELB listener -func resourceAwsELBSticknessPolicyAssigned(policyName, lbName, lbPort string, elbconn *elb.ELB) (bool, error) { - describeElbOpts := &elb.DescribeLoadBalancersInput{ - LoadBalancerNames: []*string{aws.String(lbName)}, - } - describeResp, err := elbconn.DescribeLoadBalancers(describeElbOpts) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - if ec2err.Code() == "LoadBalancerNotFound" { - return false, nil - } - } - return false, fmt.Errorf("Error retrieving ELB description: %s", err) - } - - if len(describeResp.LoadBalancerDescriptions) != 1 { - return false, fmt.Errorf("Unable to find ELB: %#v", describeResp.LoadBalancerDescriptions) - } - - lb := describeResp.LoadBalancerDescriptions[0] - assigned := false - for _, listener := range lb.ListenerDescriptions { - if lbPort != strconv.Itoa(int(*listener.Listener.LoadBalancerPort)) { - continue - } - - for _, name := range listener.PolicyNames { - if policyName == *name { - assigned = true - break - } - } - } - - return assigned, nil -} - -func resourceAwsAppCookieStickinessPolicyDelete(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - lbName, _, policyName := resourceAwsAppCookieStickinessPolicyParseId(d.Id()) - - // Perversely, if we Set an empty list of PolicyNames, we detach the - // policies attached to a listener, which is required to delete the - // policy itself. - setLoadBalancerOpts := &elb.SetLoadBalancerPoliciesOfListenerInput{ - LoadBalancerName: aws.String(d.Get("load_balancer").(string)), - LoadBalancerPort: aws.Int64(int64(d.Get("lb_port").(int))), - PolicyNames: []*string{}, - } - - if _, err := elbconn.SetLoadBalancerPoliciesOfListener(setLoadBalancerOpts); err != nil { - return fmt.Errorf("Error removing AppCookieStickinessPolicy: %s", err) - } - - request := &elb.DeleteLoadBalancerPolicyInput{ - LoadBalancerName: aws.String(lbName), - PolicyName: aws.String(policyName), - } - - if _, err := elbconn.DeleteLoadBalancerPolicy(request); err != nil { - return fmt.Errorf("Error deleting App stickiness policy %s: %s", d.Id(), err) - } - return nil -} - -// resourceAwsAppCookieStickinessPolicyParseId takes an ID and parses it into -// it's constituent parts. You need three axes (LB name, policy name, and LB -// port) to create or identify a stickiness policy in AWS's API. -func resourceAwsAppCookieStickinessPolicyParseId(id string) (string, string, string) { - parts := strings.SplitN(id, ":", 3) - return parts[0], parts[1], parts[2] -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go deleted file mode 100644 index 102c54062..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go +++ /dev/null @@ -1,764 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/applicationautoscaling" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsAppautoscalingPolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAppautoscalingPolicyCreate, - Read: resourceAwsAppautoscalingPolicyRead, - Update: resourceAwsAppautoscalingPolicyUpdate, - Delete: resourceAwsAppautoscalingPolicyDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - // https://github.com/boto/botocore/blob/9f322b1/botocore/data/autoscaling/2011-01-01/service-2.json#L1862-L1873 - ValidateFunc: validation.StringLenBetween(0, 255), - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "policy_type": { - Type: schema.TypeString, - Optional: true, - Default: "StepScaling", - }, - "resource_id": { - Type: schema.TypeString, - Required: true, - }, - "scalable_dimension": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "service_namespace": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "step_scaling_policy_configuration": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "adjustment_type": { - Type: schema.TypeString, - Optional: true, - }, - "cooldown": { - Type: schema.TypeInt, - Optional: true, - }, - "metric_aggregation_type": { - Type: schema.TypeString, - Optional: true, - }, - "min_adjustment_magnitude": { - Type: schema.TypeInt, - Optional: true, - }, - "step_adjustment": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "metric_interval_lower_bound": { - Type: schema.TypeString, - Optional: true, - }, - "metric_interval_upper_bound": { - Type: schema.TypeString, - Optional: true, - }, - "scaling_adjustment": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - }, - }, - }, - }, - "alarms": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "adjustment_type": { - Type: schema.TypeString, - Optional: true, - Deprecated: "Use step_scaling_policy_configuration -> adjustment_type instead", - }, - "cooldown": { - Type: schema.TypeInt, - Optional: true, - Deprecated: "Use step_scaling_policy_configuration -> cooldown instead", - }, - "metric_aggregation_type": { - Type: schema.TypeString, - Optional: true, - Deprecated: "Use step_scaling_policy_configuration -> metric_aggregation_type instead", - }, - "min_adjustment_magnitude": { - Type: schema.TypeInt, - Optional: true, - Deprecated: "Use step_scaling_policy_configuration -> min_adjustment_magnitude instead", - }, - "step_adjustment": { - Type: schema.TypeSet, - Optional: true, - Deprecated: "Use step_scaling_policy_configuration -> step_adjustment instead", - Set: resourceAwsAppautoscalingAdjustmentHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "metric_interval_lower_bound": { - Type: schema.TypeString, - Optional: true, - }, - "metric_interval_upper_bound": { - Type: schema.TypeString, - Optional: true, - }, - "scaling_adjustment": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - }, - "target_tracking_scaling_policy_configuration": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "customized_metric_specification": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - ConflictsWith: []string{"target_tracking_scaling_policy_configuration.0.predefined_metric_specification"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "dimensions": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "metric_name": { - Type: schema.TypeString, - Required: true, - }, - "namespace": { - Type: schema.TypeString, - Required: true, - }, - "statistic": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - applicationautoscaling.MetricStatisticAverage, - applicationautoscaling.MetricStatisticMinimum, - applicationautoscaling.MetricStatisticMaximum, - applicationautoscaling.MetricStatisticSampleCount, - applicationautoscaling.MetricStatisticSum, - }, false), - }, - "unit": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "predefined_metric_specification": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - ConflictsWith: []string{"target_tracking_scaling_policy_configuration.0.customized_metric_specification"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "predefined_metric_type": { - Type: schema.TypeString, - Required: true, - }, - "resource_label": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 1023), - }, - }, - }, - }, - "disable_scale_in": { - Type: schema.TypeBool, - Default: false, - Optional: true, - }, - "scale_in_cooldown": { - Type: schema.TypeInt, - Optional: true, - }, - "scale_out_cooldown": { - Type: schema.TypeInt, - Optional: true, - }, - "target_value": { - Type: schema.TypeFloat, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsAppautoscalingPolicyCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appautoscalingconn - - params, err := getAwsAppautoscalingPutScalingPolicyInput(d) - if err != nil { - return err - } - - log.Printf("[DEBUG] ApplicationAutoScaling PutScalingPolicy: %#v", params) - var resp *applicationautoscaling.PutScalingPolicyOutput - err = resource.Retry(2*time.Minute, func() *resource.RetryError { - var err error - resp, err = conn.PutScalingPolicy(¶ms) - if err != nil { - if isAWSErr(err, "FailedResourceAccessException", "Rate exceeded") { - return resource.RetryableError(err) - } - if isAWSErr(err, "FailedResourceAccessException", "is not authorized to perform") { - return resource.RetryableError(err) - } - if isAWSErr(err, "FailedResourceAccessException", "token included in the request is invalid") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(fmt.Errorf("Error putting scaling policy: %s", err)) - } - return nil - }) - if err != nil { - return fmt.Errorf("Failed to create scaling policy: %s", err) - } - - d.Set("arn", resp.PolicyARN) - d.SetId(d.Get("name").(string)) - log.Printf("[INFO] ApplicationAutoScaling scaling PolicyARN: %s", d.Get("arn").(string)) - - return resourceAwsAppautoscalingPolicyRead(d, meta) -} - -func resourceAwsAppautoscalingPolicyRead(d *schema.ResourceData, meta interface{}) error { - var p *applicationautoscaling.ScalingPolicy - - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var err error - p, err = getAwsAppautoscalingPolicy(d, meta) - if err != nil { - if isAWSErr(err, applicationautoscaling.ErrCodeFailedResourceAccessException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Failed to read scaling policy: %s", err) - } - - if p == nil { - log.Printf("[WARN] Application AutoScaling Policy (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - log.Printf("[DEBUG] Read ApplicationAutoScaling policy: %s, SP: %s, Obj: %s", d.Get("name"), d.Get("name"), p) - - d.Set("arn", p.PolicyARN) - d.Set("name", p.PolicyName) - d.Set("policy_type", p.PolicyType) - d.Set("resource_id", p.ResourceId) - d.Set("scalable_dimension", p.ScalableDimension) - d.Set("service_namespace", p.ServiceNamespace) - d.Set("alarms", p.Alarms) - d.Set("step_scaling_policy_configuration", flattenStepScalingPolicyConfiguration(p.StepScalingPolicyConfiguration)) - d.Set("target_tracking_scaling_policy_configuration", - flattenTargetTrackingScalingPolicyConfiguration(p.TargetTrackingScalingPolicyConfiguration)) - - return nil -} - -func resourceAwsAppautoscalingPolicyUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appautoscalingconn - - params, inputErr := getAwsAppautoscalingPutScalingPolicyInput(d) - if inputErr != nil { - return inputErr - } - - log.Printf("[DEBUG] Application Autoscaling Update Scaling Policy: %#v", params) - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - _, err := conn.PutScalingPolicy(¶ms) - if err != nil { - if isAWSErr(err, applicationautoscaling.ErrCodeFailedResourceAccessException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Failed to update scaling policy: %s", err) - } - - return resourceAwsAppautoscalingPolicyRead(d, meta) -} - -func resourceAwsAppautoscalingPolicyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appautoscalingconn - p, err := getAwsAppautoscalingPolicy(d, meta) - if err != nil { - return fmt.Errorf("Error getting policy: %s", err) - } - if p == nil { - return nil - } - - params := applicationautoscaling.DeleteScalingPolicyInput{ - PolicyName: aws.String(d.Get("name").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - ScalableDimension: aws.String(d.Get("scalable_dimension").(string)), - ServiceNamespace: aws.String(d.Get("service_namespace").(string)), - } - log.Printf("[DEBUG] Deleting Application AutoScaling Policy opts: %#v", params) - err = resource.Retry(2*time.Minute, func() *resource.RetryError { - _, err = conn.DeleteScalingPolicy(¶ms) - if err != nil { - if isAWSErr(err, applicationautoscaling.ErrCodeFailedResourceAccessException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Failed to delete scaling policy: %s", err) - } - return nil -} - -// Takes the result of flatmap.Expand for an array of step adjustments and -// returns a []*applicationautoscaling.StepAdjustment. -func expandAppautoscalingStepAdjustments(configured []interface{}) ([]*applicationautoscaling.StepAdjustment, error) { - var adjustments []*applicationautoscaling.StepAdjustment - - // Loop over our configured step adjustments and create an array - // of aws-sdk-go compatible objects. We're forced to convert strings - // to floats here because there's no way to detect whether or not - // an uninitialized, optional schema element is "0.0" deliberately. - // With strings, we can test for "", which is definitely an empty - // struct value. - for _, raw := range configured { - data := raw.(map[string]interface{}) - a := &applicationautoscaling.StepAdjustment{ - ScalingAdjustment: aws.Int64(int64(data["scaling_adjustment"].(int))), - } - if data["metric_interval_lower_bound"] != "" { - bound := data["metric_interval_lower_bound"] - switch bound := bound.(type) { - case string: - f, err := strconv.ParseFloat(bound, 64) - if err != nil { - return nil, fmt.Errorf( - "metric_interval_lower_bound must be a float value represented as a string") - } - a.MetricIntervalLowerBound = aws.Float64(f) - default: - return nil, fmt.Errorf( - "metric_interval_lower_bound isn't a string. This is a bug. Please file an issue.") - } - } - if data["metric_interval_upper_bound"] != "" { - bound := data["metric_interval_upper_bound"] - switch bound := bound.(type) { - case string: - f, err := strconv.ParseFloat(bound, 64) - if err != nil { - return nil, fmt.Errorf( - "metric_interval_upper_bound must be a float value represented as a string") - } - a.MetricIntervalUpperBound = aws.Float64(f) - default: - return nil, fmt.Errorf( - "metric_interval_upper_bound isn't a string. This is a bug. Please file an issue.") - } - } - adjustments = append(adjustments, a) - } - - return adjustments, nil -} - -func expandAppautoscalingCustomizedMetricSpecification(configured []interface{}) *applicationautoscaling.CustomizedMetricSpecification { - spec := &applicationautoscaling.CustomizedMetricSpecification{} - - for _, raw := range configured { - data := raw.(map[string]interface{}) - if v, ok := data["metric_name"]; ok { - spec.MetricName = aws.String(v.(string)) - } - - if v, ok := data["namespace"]; ok { - spec.Namespace = aws.String(v.(string)) - } - - if v, ok := data["unit"].(string); ok && v != "" { - spec.Unit = aws.String(v) - } - - if v, ok := data["statistic"]; ok { - spec.Statistic = aws.String(v.(string)) - } - - if s, ok := data["dimensions"].(*schema.Set); ok && s.Len() > 0 { - dimensions := make([]*applicationautoscaling.MetricDimension, s.Len()) - for i, d := range s.List() { - dimension := d.(map[string]interface{}) - dimensions[i] = &applicationautoscaling.MetricDimension{ - Name: aws.String(dimension["name"].(string)), - Value: aws.String(dimension["value"].(string)), - } - } - spec.Dimensions = dimensions - } - } - return spec -} - -func expandAppautoscalingPredefinedMetricSpecification(configured []interface{}) *applicationautoscaling.PredefinedMetricSpecification { - spec := &applicationautoscaling.PredefinedMetricSpecification{} - - for _, raw := range configured { - data := raw.(map[string]interface{}) - - if v, ok := data["predefined_metric_type"]; ok { - spec.PredefinedMetricType = aws.String(v.(string)) - } - - if v, ok := data["resource_label"].(string); ok && v != "" { - spec.ResourceLabel = aws.String(v) - } - } - return spec -} - -func getAwsAppautoscalingPutScalingPolicyInput(d *schema.ResourceData) (applicationautoscaling.PutScalingPolicyInput, error) { - var params = applicationautoscaling.PutScalingPolicyInput{ - PolicyName: aws.String(d.Get("name").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - } - - if v, ok := d.GetOk("policy_type"); ok { - params.PolicyType = aws.String(v.(string)) - } - - if v, ok := d.GetOk("service_namespace"); ok { - params.ServiceNamespace = aws.String(v.(string)) - } - - if v, ok := d.GetOk("scalable_dimension"); ok { - params.ScalableDimension = aws.String(v.(string)) - } - - // Deprecated fields - // TODO: Remove in next major version - at, atOk := d.GetOk("adjustment_type") - cd, cdOk := d.GetOk("cooldown") - mat, matOk := d.GetOk("metric_aggregation_type") - mam, mamOk := d.GetOk("min_adjustment_magnitude") - sa, saOk := d.GetOk("step_adjustment") - if atOk || cdOk || matOk || mamOk || saOk { - cfg := &applicationautoscaling.StepScalingPolicyConfiguration{} - - if atOk { - cfg.AdjustmentType = aws.String(at.(string)) - } - - if cdOk { - cfg.Cooldown = aws.Int64(int64(cd.(int))) - } - - if matOk { - cfg.MetricAggregationType = aws.String(mat.(string)) - } - - if saOk { - steps, err := expandAppautoscalingStepAdjustments(sa.(*schema.Set).List()) - if err != nil { - return params, fmt.Errorf("metric_interval_lower_bound and metric_interval_upper_bound must be strings!") - } - cfg.StepAdjustments = steps - } - - if mamOk { - cfg.MinAdjustmentMagnitude = aws.Int64(int64(mam.(int))) - } - - params.StepScalingPolicyConfiguration = cfg - } - - if v, ok := d.GetOk("step_scaling_policy_configuration"); ok { - params.StepScalingPolicyConfiguration = expandStepScalingPolicyConfiguration(v.([]interface{})) - } - - if l, ok := d.GetOk("target_tracking_scaling_policy_configuration"); ok { - v := l.([]interface{}) - if len(v) < 1 { - return params, fmt.Errorf("Empty target_tracking_scaling_policy_configuration block") - } - ttspCfg := v[0].(map[string]interface{}) - cfg := &applicationautoscaling.TargetTrackingScalingPolicyConfiguration{ - TargetValue: aws.Float64(ttspCfg["target_value"].(float64)), - } - - if v, ok := ttspCfg["scale_in_cooldown"]; ok { - cfg.ScaleInCooldown = aws.Int64(int64(v.(int))) - } - - if v, ok := ttspCfg["scale_out_cooldown"]; ok { - cfg.ScaleOutCooldown = aws.Int64(int64(v.(int))) - } - - if v, ok := ttspCfg["disable_scale_in"]; ok { - cfg.DisableScaleIn = aws.Bool(v.(bool)) - } - - if v, ok := ttspCfg["customized_metric_specification"].([]interface{}); ok && len(v) > 0 { - cfg.CustomizedMetricSpecification = expandAppautoscalingCustomizedMetricSpecification(v) - } - - if v, ok := ttspCfg["predefined_metric_specification"].([]interface{}); ok && len(v) > 0 { - cfg.PredefinedMetricSpecification = expandAppautoscalingPredefinedMetricSpecification(v) - } - - params.TargetTrackingScalingPolicyConfiguration = cfg - } - - return params, nil -} - -func getAwsAppautoscalingPolicy(d *schema.ResourceData, meta interface{}) (*applicationautoscaling.ScalingPolicy, error) { - conn := meta.(*AWSClient).appautoscalingconn - - params := applicationautoscaling.DescribeScalingPoliciesInput{ - PolicyNames: []*string{aws.String(d.Get("name").(string))}, - ResourceId: aws.String(d.Get("resource_id").(string)), - ScalableDimension: aws.String(d.Get("scalable_dimension").(string)), - ServiceNamespace: aws.String(d.Get("service_namespace").(string)), - } - - log.Printf("[DEBUG] Application AutoScaling Policy Describe Params: %#v", params) - resp, err := conn.DescribeScalingPolicies(¶ms) - if err != nil { - return nil, fmt.Errorf("Error retrieving scaling policies: %s", err) - } - if len(resp.ScalingPolicies) == 0 { - return nil, nil - } - - return resp.ScalingPolicies[0], nil -} - -func expandStepScalingPolicyConfiguration(cfg []interface{}) *applicationautoscaling.StepScalingPolicyConfiguration { - if len(cfg) < 1 { - return nil - } - - out := &applicationautoscaling.StepScalingPolicyConfiguration{} - - m := cfg[0].(map[string]interface{}) - if v, ok := m["adjustment_type"]; ok { - out.AdjustmentType = aws.String(v.(string)) - } - if v, ok := m["cooldown"]; ok { - out.Cooldown = aws.Int64(int64(v.(int))) - } - if v, ok := m["metric_aggregation_type"]; ok { - out.MetricAggregationType = aws.String(v.(string)) - } - if v, ok := m["min_adjustment_magnitude"].(int); ok && v > 0 { - out.MinAdjustmentMagnitude = aws.Int64(int64(v)) - } - if v, ok := m["step_adjustment"].(*schema.Set); ok && v.Len() > 0 { - out.StepAdjustments, _ = expandAppautoscalingStepAdjustments(v.List()) - } - - return out -} - -func flattenStepScalingPolicyConfiguration(cfg *applicationautoscaling.StepScalingPolicyConfiguration) []interface{} { - if cfg == nil { - return []interface{}{} - } - - m := make(map[string]interface{}) - - if cfg.AdjustmentType != nil { - m["adjustment_type"] = *cfg.AdjustmentType - } - if cfg.Cooldown != nil { - m["cooldown"] = *cfg.Cooldown - } - if cfg.MetricAggregationType != nil { - m["metric_aggregation_type"] = *cfg.MetricAggregationType - } - if cfg.MinAdjustmentMagnitude != nil { - m["min_adjustment_magnitude"] = *cfg.MinAdjustmentMagnitude - } - if cfg.StepAdjustments != nil { - m["step_adjustment"] = flattenAppautoscalingStepAdjustments(cfg.StepAdjustments) - } - - return []interface{}{m} -} - -func flattenAppautoscalingStepAdjustments(adjs []*applicationautoscaling.StepAdjustment) []interface{} { - out := make([]interface{}, len(adjs)) - - for i, adj := range adjs { - m := make(map[string]interface{}) - - m["scaling_adjustment"] = *adj.ScalingAdjustment - - if adj.MetricIntervalLowerBound != nil { - m["metric_interval_lower_bound"] = *adj.MetricIntervalLowerBound - } - if adj.MetricIntervalUpperBound != nil { - m["metric_interval_upper_bound"] = *adj.MetricIntervalUpperBound - } - - out[i] = m - } - - return out -} - -func flattenTargetTrackingScalingPolicyConfiguration(cfg *applicationautoscaling.TargetTrackingScalingPolicyConfiguration) []interface{} { - if cfg == nil { - return []interface{}{} - } - - m := make(map[string]interface{}) - m["target_value"] = *cfg.TargetValue - - if cfg.DisableScaleIn != nil { - m["disable_scale_in"] = *cfg.DisableScaleIn - } - if cfg.ScaleInCooldown != nil { - m["scale_in_cooldown"] = *cfg.ScaleInCooldown - } - if cfg.ScaleOutCooldown != nil { - m["scale_out_cooldown"] = *cfg.ScaleOutCooldown - } - if cfg.CustomizedMetricSpecification != nil { - m["customized_metric_specification"] = flattenCustomizedMetricSpecification(cfg.CustomizedMetricSpecification) - } - if cfg.PredefinedMetricSpecification != nil { - m["predefined_metric_specification"] = flattenPredefinedMetricSpecification(cfg.PredefinedMetricSpecification) - } - - return []interface{}{m} -} - -func flattenCustomizedMetricSpecification(cfg *applicationautoscaling.CustomizedMetricSpecification) []interface{} { - if cfg == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "metric_name": *cfg.MetricName, - "namespace": *cfg.Namespace, - "statistic": *cfg.Statistic, - } - - if len(cfg.Dimensions) > 0 { - m["dimensions"] = flattenMetricDimensions(cfg.Dimensions) - } - - if cfg.Unit != nil { - m["unit"] = *cfg.Unit - } - return []interface{}{m} -} - -func flattenMetricDimensions(ds []*applicationautoscaling.MetricDimension) []interface{} { - l := make([]interface{}, len(ds)) - for i, d := range ds { - l[i] = map[string]interface{}{ - "name": *d.Name, - "value": *d.Value, - } - } - return l -} - -func flattenPredefinedMetricSpecification(cfg *applicationautoscaling.PredefinedMetricSpecification) []interface{} { - if cfg == nil { - return []interface{}{} - } - m := map[string]interface{}{ - "predefined_metric_type": *cfg.PredefinedMetricType, - } - if cfg.ResourceLabel != nil { - m["resource_label"] = *cfg.ResourceLabel - } - return []interface{}{m} -} - -func resourceAwsAppautoscalingAdjustmentHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - if v, ok := m["metric_interval_lower_bound"]; ok { - buf.WriteString(fmt.Sprintf("%f-", v)) - } - if v, ok := m["metric_interval_upper_bound"]; ok { - buf.WriteString(fmt.Sprintf("%f-", v)) - } - buf.WriteString(fmt.Sprintf("%d-", m["scaling_adjustment"].(int))) - - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_scheduled_action.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_scheduled_action.go deleted file mode 100644 index 03ac1156b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_scheduled_action.go +++ /dev/null @@ -1,193 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/applicationautoscaling" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -const awsAppautoscalingScheduleTimeLayout = "2006-01-02T15:04:05Z" - -func resourceAwsAppautoscalingScheduledAction() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAppautoscalingScheduledActionPut, - Read: resourceAwsAppautoscalingScheduledActionRead, - Delete: resourceAwsAppautoscalingScheduledActionDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "service_namespace": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "resource_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "scalable_dimension": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "scalable_target_action": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "max_capacity": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - "min_capacity": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - "schedule": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "start_time": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "end_time": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsAppautoscalingScheduledActionPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appautoscalingconn - - input := &applicationautoscaling.PutScheduledActionInput{ - ScheduledActionName: aws.String(d.Get("name").(string)), - ServiceNamespace: aws.String(d.Get("service_namespace").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - } - if v, ok := d.GetOk("scalable_dimension"); ok { - input.ScalableDimension = aws.String(v.(string)) - } - if v, ok := d.GetOk("schedule"); ok { - input.Schedule = aws.String(v.(string)) - } - if v, ok := d.GetOk("scalable_target_action"); ok { - sta := &applicationautoscaling.ScalableTargetAction{} - raw := v.([]interface{})[0].(map[string]interface{}) - if max, ok := raw["max_capacity"]; ok { - sta.MaxCapacity = aws.Int64(int64(max.(int))) - } - if min, ok := raw["min_capacity"]; ok { - sta.MinCapacity = aws.Int64(int64(min.(int))) - } - input.ScalableTargetAction = sta - } - if v, ok := d.GetOk("start_time"); ok { - t, err := time.Parse(awsAppautoscalingScheduleTimeLayout, v.(string)) - if err != nil { - return fmt.Errorf("Error Parsing Appautoscaling Scheduled Action Start Time: %s", err.Error()) - } - input.StartTime = aws.Time(t) - } - if v, ok := d.GetOk("end_time"); ok { - t, err := time.Parse(awsAppautoscalingScheduleTimeLayout, v.(string)) - if err != nil { - return fmt.Errorf("Error Parsing Appautoscaling Scheduled Action End Time: %s", err.Error()) - } - input.EndTime = aws.Time(t) - } - - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.PutScheduledAction(input) - if err != nil { - if isAWSErr(err, applicationautoscaling.ErrCodeObjectNotFoundException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return err - } - - d.SetId(d.Get("name").(string) + "-" + d.Get("service_namespace").(string) + "-" + d.Get("resource_id").(string)) - return resourceAwsAppautoscalingScheduledActionRead(d, meta) -} - -func resourceAwsAppautoscalingScheduledActionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appautoscalingconn - - saName := d.Get("name").(string) - input := &applicationautoscaling.DescribeScheduledActionsInput{ - ScheduledActionNames: []*string{aws.String(saName)}, - ServiceNamespace: aws.String(d.Get("service_namespace").(string)), - } - resp, err := conn.DescribeScheduledActions(input) - if err != nil { - return err - } - if len(resp.ScheduledActions) < 1 { - log.Printf("[WARN] Application Autoscaling Scheduled Action (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - if len(resp.ScheduledActions) != 1 { - return fmt.Errorf("Expected 1 scheduled action under %s, found %d", saName, len(resp.ScheduledActions)) - } - if *resp.ScheduledActions[0].ScheduledActionName != saName { - return fmt.Errorf("Scheduled Action (%s) not found", saName) - } - d.Set("arn", resp.ScheduledActions[0].ScheduledActionARN) - return nil -} - -func resourceAwsAppautoscalingScheduledActionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appautoscalingconn - - input := &applicationautoscaling.DeleteScheduledActionInput{ - ScheduledActionName: aws.String(d.Get("name").(string)), - ServiceNamespace: aws.String(d.Get("service_namespace").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - } - if v, ok := d.GetOk("scalable_dimension"); ok { - input.ScalableDimension = aws.String(v.(string)) - } - _, err := conn.DeleteScheduledAction(input) - if err != nil { - if isAWSErr(err, applicationautoscaling.ErrCodeObjectNotFoundException, "") { - log.Printf("[WARN] Application Autoscaling Scheduled Action (%s) already gone, removing from state", d.Id()) - return nil - } - return err - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_target.go deleted file mode 100644 index d23bb194c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_target.go +++ /dev/null @@ -1,192 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/applicationautoscaling" -) - -func resourceAwsAppautoscalingTarget() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAppautoscalingTargetPut, - Read: resourceAwsAppautoscalingTargetRead, - Update: resourceAwsAppautoscalingTargetPut, - Delete: resourceAwsAppautoscalingTargetDelete, - - Schema: map[string]*schema.Schema{ - "max_capacity": { - Type: schema.TypeInt, - Required: true, - }, - "min_capacity": { - Type: schema.TypeInt, - Required: true, - }, - "resource_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "role_arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "scalable_dimension": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "service_namespace": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsAppautoscalingTargetPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appautoscalingconn - - var targetOpts applicationautoscaling.RegisterScalableTargetInput - - targetOpts.MaxCapacity = aws.Int64(int64(d.Get("max_capacity").(int))) - targetOpts.MinCapacity = aws.Int64(int64(d.Get("min_capacity").(int))) - targetOpts.ResourceId = aws.String(d.Get("resource_id").(string)) - targetOpts.ScalableDimension = aws.String(d.Get("scalable_dimension").(string)) - targetOpts.ServiceNamespace = aws.String(d.Get("service_namespace").(string)) - - if roleArn, exists := d.GetOk("role_arn"); exists { - targetOpts.RoleARN = aws.String(roleArn.(string)) - } - - log.Printf("[DEBUG] Application autoscaling target create configuration %s", targetOpts) - var err error - err = resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err = conn.RegisterScalableTarget(&targetOpts) - - if err != nil { - if isAWSErr(err, "ValidationException", "Unable to assume IAM role") { - log.Printf("[DEBUG] Retrying creation of Application Autoscaling Scalable Target due to possible issues with IAM: %s", err) - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - - return nil - }) - if err != nil { - return fmt.Errorf("Error creating application autoscaling target: %s", err) - } - - d.SetId(d.Get("resource_id").(string)) - log.Printf("[INFO] Application AutoScaling Target ID: %s", d.Id()) - - return resourceAwsAppautoscalingTargetRead(d, meta) -} - -func resourceAwsAppautoscalingTargetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appautoscalingconn - - namespace := d.Get("service_namespace").(string) - dimension := d.Get("scalable_dimension").(string) - t, err := getAwsAppautoscalingTarget(d.Id(), namespace, dimension, conn) - if err != nil { - return err - } - if t == nil { - log.Printf("[WARN] Application AutoScaling Target (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("max_capacity", t.MaxCapacity) - d.Set("min_capacity", t.MinCapacity) - d.Set("resource_id", t.ResourceId) - d.Set("role_arn", t.RoleARN) - d.Set("scalable_dimension", t.ScalableDimension) - d.Set("service_namespace", t.ServiceNamespace) - - return nil -} - -func resourceAwsAppautoscalingTargetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appautoscalingconn - - namespace := d.Get("service_namespace").(string) - dimension := d.Get("scalable_dimension").(string) - - t, err := getAwsAppautoscalingTarget(d.Id(), namespace, dimension, conn) - if err != nil { - return err - } - if t == nil { - log.Printf("[INFO] Application AutoScaling Target %q not found", d.Id()) - return nil - } - - log.Printf("[DEBUG] Application AutoScaling Target destroy: %#v", d.Id()) - deleteOpts := applicationautoscaling.DeregisterScalableTargetInput{ - ResourceId: aws.String(d.Get("resource_id").(string)), - ServiceNamespace: aws.String(d.Get("service_namespace").(string)), - ScalableDimension: aws.String(d.Get("scalable_dimension").(string)), - } - - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - if _, err := conn.DeregisterScalableTarget(&deleteOpts); err != nil { - if awserr, ok := err.(awserr.Error); ok { - // @TODO: We should do stuff here depending on the actual error returned - return resource.RetryableError(awserr) - } - // Non recognized error, no retry. - return resource.NonRetryableError(err) - } - // Successful delete - return nil - }) - if err != nil { - return err - } - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - if t, _ = getAwsAppautoscalingTarget(d.Id(), namespace, dimension, conn); t != nil { - return resource.RetryableError( - fmt.Errorf("Application AutoScaling Target still exists")) - } - return nil - }) -} - -func getAwsAppautoscalingTarget(resourceId, namespace, dimension string, - conn *applicationautoscaling.ApplicationAutoScaling) (*applicationautoscaling.ScalableTarget, error) { - - describeOpts := applicationautoscaling.DescribeScalableTargetsInput{ - ResourceIds: []*string{aws.String(resourceId)}, - ServiceNamespace: aws.String(namespace), - } - - log.Printf("[DEBUG] Application AutoScaling Target describe configuration: %#v", describeOpts) - describeTargets, err := conn.DescribeScalableTargets(&describeOpts) - if err != nil { - // @TODO: We should probably send something else back if we're trying to access an unknown Resource ID - // targetserr, ok := err.(awserr.Error) - // if ok && targetserr.Code() == "" - return nil, fmt.Errorf("Error retrieving Application AutoScaling Target: %s", err) - } - - for idx, tgt := range describeTargets.ScalableTargets { - if *tgt.ResourceId == resourceId && *tgt.ScalableDimension == dimension { - return describeTargets.ScalableTargets[idx], nil - } - } - - return nil, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_mesh.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_mesh.go deleted file mode 100644 index f68c81f45..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_mesh.go +++ /dev/null @@ -1,111 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/appmesh" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsAppmeshMesh() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAppmeshMeshCreate, - Read: resourceAwsAppmeshMeshRead, - Delete: resourceAwsAppmeshMeshDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 255), - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "created_date": { - Type: schema.TypeString, - Computed: true, - }, - - "last_updated_date": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsAppmeshMeshCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - meshName := d.Get("name").(string) - req := &appmesh.CreateMeshInput{ - MeshName: aws.String(meshName), - } - - log.Printf("[DEBUG] Creating App Mesh service mesh: %#v", req) - _, err := conn.CreateMesh(req) - if err != nil { - return fmt.Errorf("error creating App Mesh service mesh: %s", err) - } - - d.SetId(meshName) - - return resourceAwsAppmeshMeshRead(d, meta) -} - -func resourceAwsAppmeshMeshRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - resp, err := conn.DescribeMesh(&appmesh.DescribeMeshInput{ - MeshName: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, "NotFoundException", "") { - log.Printf("[WARN] App Mesh service mesh (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading App Mesh service mesh: %s", err) - } - if aws.StringValue(resp.Mesh.Status.Status) == appmesh.MeshStatusCodeDeleted { - log.Printf("[WARN] App Mesh service mesh (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("name", resp.Mesh.MeshName) - d.Set("arn", resp.Mesh.Metadata.Arn) - d.Set("created_date", resp.Mesh.Metadata.CreatedAt.Format(time.RFC3339)) - d.Set("last_updated_date", resp.Mesh.Metadata.LastUpdatedAt.Format(time.RFC3339)) - - return nil -} - -func resourceAwsAppmeshMeshDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - log.Printf("[DEBUG] Deleting App Mesh service mesh: %s", d.Id()) - _, err := conn.DeleteMesh(&appmesh.DeleteMeshInput{ - MeshName: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, "NotFoundException", "") { - return nil - } - return fmt.Errorf("error deleting App Mesh service mesh: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_route.go deleted file mode 100644 index 820ac41ca..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_route.go +++ /dev/null @@ -1,235 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/appmesh" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsAppmeshRoute() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAppmeshRouteCreate, - Read: resourceAwsAppmeshRouteRead, - Update: resourceAwsAppmeshRouteUpdate, - Delete: resourceAwsAppmeshRouteDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 255), - }, - - "mesh_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 255), - }, - - "virtual_router_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 255), - }, - - "spec": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "http_route": { - Type: schema.TypeList, - Optional: true, - MinItems: 0, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "action": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "weighted_target": { - Type: schema.TypeSet, - Required: true, - MinItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "virtual_node": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 255), - }, - "weight": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(0, 100), - }, - }, - }, - Set: appmeshRouteWeightedTargetHash, - }, - }, - }, - }, - - "match": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "prefix": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile(`^/`), "must start with /"), - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "created_date": { - Type: schema.TypeString, - Computed: true, - }, - - "last_updated_date": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsAppmeshRouteCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - req := &appmesh.CreateRouteInput{ - MeshName: aws.String(d.Get("mesh_name").(string)), - RouteName: aws.String(d.Get("name").(string)), - VirtualRouterName: aws.String(d.Get("virtual_router_name").(string)), - Spec: expandAppmeshRouteSpec(d.Get("spec").([]interface{})), - } - - log.Printf("[DEBUG] Creating App Mesh route: %#v", req) - resp, err := conn.CreateRoute(req) - if err != nil { - return fmt.Errorf("error creating App Mesh route: %s", err) - } - - d.SetId(aws.StringValue(resp.Route.Metadata.Uid)) - - return resourceAwsAppmeshRouteRead(d, meta) -} - -func resourceAwsAppmeshRouteRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - resp, err := conn.DescribeRoute(&appmesh.DescribeRouteInput{ - MeshName: aws.String(d.Get("mesh_name").(string)), - RouteName: aws.String(d.Get("name").(string)), - VirtualRouterName: aws.String(d.Get("virtual_router_name").(string)), - }) - if err != nil { - if isAWSErr(err, appmesh.ErrCodeNotFoundException, "") { - log.Printf("[WARN] App Mesh route (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading App Mesh route: %s", err) - } - if aws.StringValue(resp.Route.Status.Status) == appmesh.RouteStatusCodeDeleted { - log.Printf("[WARN] App Mesh route (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("name", resp.Route.RouteName) - d.Set("mesh_name", resp.Route.MeshName) - d.Set("virtual_router_name", resp.Route.VirtualRouterName) - d.Set("arn", resp.Route.Metadata.Arn) - d.Set("created_date", resp.Route.Metadata.CreatedAt.Format(time.RFC3339)) - d.Set("last_updated_date", resp.Route.Metadata.LastUpdatedAt.Format(time.RFC3339)) - err1 := d.Set("spec", flattenAppmeshRouteSpec(resp.Route.Spec)) - return err1 -} - -func resourceAwsAppmeshRouteUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - if d.HasChange("spec") { - _, v := d.GetChange("spec") - req := &appmesh.UpdateRouteInput{ - MeshName: aws.String(d.Get("mesh_name").(string)), - RouteName: aws.String(d.Get("name").(string)), - VirtualRouterName: aws.String(d.Get("virtual_router_name").(string)), - Spec: expandAppmeshRouteSpec(v.([]interface{})), - } - - log.Printf("[DEBUG] Updating App Mesh route: %#v", req) - _, err := conn.UpdateRoute(req) - if err != nil { - return fmt.Errorf("error updating App Mesh route: %s", err) - } - } - - return resourceAwsAppmeshRouteRead(d, meta) -} - -func resourceAwsAppmeshRouteDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - log.Printf("[DEBUG] Deleting App Mesh route: %s", d.Id()) - _, err := conn.DeleteRoute(&appmesh.DeleteRouteInput{ - MeshName: aws.String(d.Get("mesh_name").(string)), - RouteName: aws.String(d.Get("name").(string)), - VirtualRouterName: aws.String(d.Get("virtual_router_name").(string)), - }) - if err != nil { - if isAWSErr(err, appmesh.ErrCodeNotFoundException, "") { - return nil - } - return fmt.Errorf("error deleting App Mesh route: %s", err) - } - - return nil -} - -func appmeshRouteWeightedTargetHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - if v, ok := m["virtual_node"].(string); ok { - buf.WriteString(fmt.Sprintf("%s-", v)) - } - if v, ok := m["weight"].(int); ok { - buf.WriteString(fmt.Sprintf("%d-", v)) - } - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_node.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_node.go deleted file mode 100644 index 4b79272e7..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_node.go +++ /dev/null @@ -1,237 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/appmesh" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsAppmeshVirtualNode() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAppmeshVirtualNodeCreate, - Read: resourceAwsAppmeshVirtualNodeRead, - Update: resourceAwsAppmeshVirtualNodeUpdate, - Delete: resourceAwsAppmeshVirtualNodeDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 255), - }, - - "mesh_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 255), - }, - - "spec": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "backends": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "listener": { - Type: schema.TypeSet, - Optional: true, - MinItems: 0, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "port_mapping": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "port": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(1, 65535), - }, - - "protocol": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - appmesh.PortProtocolHttp, - appmesh.PortProtocolTcp, - }, false), - }, - }, - }, - }, - }, - }, - Set: appmeshVirtualNodeListenerHash, - }, - - "service_discovery": { - Type: schema.TypeList, - Optional: true, - MinItems: 0, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "dns": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "service_name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.NoZeroValues, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "created_date": { - Type: schema.TypeString, - Computed: true, - }, - - "last_updated_date": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsAppmeshVirtualNodeCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - req := &appmesh.CreateVirtualNodeInput{ - MeshName: aws.String(d.Get("mesh_name").(string)), - VirtualNodeName: aws.String(d.Get("name").(string)), - Spec: expandAppmeshVirtualNodeSpec(d.Get("spec").([]interface{})), - } - - log.Printf("[DEBUG] Creating App Mesh virtual node: %#v", req) - resp, err := conn.CreateVirtualNode(req) - if err != nil { - return fmt.Errorf("error creating App Mesh virtual node: %s", err) - } - - d.SetId(aws.StringValue(resp.VirtualNode.Metadata.Uid)) - - return resourceAwsAppmeshVirtualNodeRead(d, meta) -} - -func resourceAwsAppmeshVirtualNodeRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - resp, err := conn.DescribeVirtualNode(&appmesh.DescribeVirtualNodeInput{ - MeshName: aws.String(d.Get("mesh_name").(string)), - VirtualNodeName: aws.String(d.Get("name").(string)), - }) - if err != nil { - if isAWSErr(err, appmesh.ErrCodeNotFoundException, "") { - log.Printf("[WARN] App Mesh virtual node (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading App Mesh virtual node: %s", err) - } - if aws.StringValue(resp.VirtualNode.Status.Status) == appmesh.VirtualNodeStatusCodeDeleted { - log.Printf("[WARN] App Mesh virtual node (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("name", resp.VirtualNode.VirtualNodeName) - d.Set("mesh_name", resp.VirtualNode.MeshName) - d.Set("arn", resp.VirtualNode.Metadata.Arn) - d.Set("created_date", resp.VirtualNode.Metadata.CreatedAt.Format(time.RFC3339)) - d.Set("last_updated_date", resp.VirtualNode.Metadata.LastUpdatedAt.Format(time.RFC3339)) - err1 := d.Set("spec", flattenAppmeshVirtualNodeSpec(resp.VirtualNode.Spec)) - return err1 -} - -func resourceAwsAppmeshVirtualNodeUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - if d.HasChange("spec") { - _, v := d.GetChange("spec") - req := &appmesh.UpdateVirtualNodeInput{ - MeshName: aws.String(d.Get("mesh_name").(string)), - VirtualNodeName: aws.String(d.Get("name").(string)), - Spec: expandAppmeshVirtualNodeSpec(v.([]interface{})), - } - - log.Printf("[DEBUG] Updating App Mesh virtual node: %#v", req) - _, err := conn.UpdateVirtualNode(req) - if err != nil { - return fmt.Errorf("error updating App Mesh virtual node: %s", err) - } - } - - return resourceAwsAppmeshVirtualNodeRead(d, meta) -} - -func resourceAwsAppmeshVirtualNodeDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - log.Printf("[DEBUG] Deleting App Mesh virtual node: %s", d.Id()) - _, err := conn.DeleteVirtualNode(&appmesh.DeleteVirtualNodeInput{ - MeshName: aws.String(d.Get("mesh_name").(string)), - VirtualNodeName: aws.String(d.Get("name").(string)), - }) - if err != nil { - if isAWSErr(err, appmesh.ErrCodeNotFoundException, "") { - return nil - } - return fmt.Errorf("error deleting App Mesh virtual node: %s", err) - } - - return nil -} - -func appmeshVirtualNodeListenerHash(vListener interface{}) int { - var buf bytes.Buffer - mListener := vListener.(map[string]interface{}) - if vPortMapping, ok := mListener["port_mapping"].([]interface{}); ok && len(vPortMapping) > 0 && vPortMapping[0] != nil { - mPortMapping := vPortMapping[0].(map[string]interface{}) - if v, ok := mPortMapping["port"].(int); ok { - buf.WriteString(fmt.Sprintf("%d-", v)) - } - if v, ok := mPortMapping["protocol"].(string); ok { - buf.WriteString(fmt.Sprintf("%s-", v)) - } - } - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_router.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_router.go deleted file mode 100644 index 07245fcb8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_router.go +++ /dev/null @@ -1,160 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/appmesh" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsAppmeshVirtualRouter() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAppmeshVirtualRouterCreate, - Read: resourceAwsAppmeshVirtualRouterRead, - Update: resourceAwsAppmeshVirtualRouterUpdate, - Delete: resourceAwsAppmeshVirtualRouterDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 255), - }, - - "mesh_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 255), - }, - - "spec": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "service_names": { - Type: schema.TypeSet, - Required: true, - MinItems: 1, - MaxItems: 10, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - }, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "created_date": { - Type: schema.TypeString, - Computed: true, - }, - - "last_updated_date": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsAppmeshVirtualRouterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - req := &appmesh.CreateVirtualRouterInput{ - MeshName: aws.String(d.Get("mesh_name").(string)), - VirtualRouterName: aws.String(d.Get("name").(string)), - Spec: expandAppmeshVirtualRouterSpec(d.Get("spec").([]interface{})), - } - - log.Printf("[DEBUG] Creating App Mesh virtual router: %#v", req) - resp, err := conn.CreateVirtualRouter(req) - if err != nil { - return fmt.Errorf("error creating App Mesh virtual router: %s", err) - } - - d.SetId(aws.StringValue(resp.VirtualRouter.Metadata.Uid)) - - return resourceAwsAppmeshVirtualRouterRead(d, meta) -} - -func resourceAwsAppmeshVirtualRouterUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - if d.HasChange("spec") { - _, v := d.GetChange("spec") - req := &appmesh.UpdateVirtualRouterInput{ - MeshName: aws.String(d.Get("mesh_name").(string)), - VirtualRouterName: aws.String(d.Get("name").(string)), - Spec: expandAppmeshVirtualRouterSpec(v.([]interface{})), - } - - log.Printf("[DEBUG] Updating App Mesh virtual router: %#v", req) - _, err := conn.UpdateVirtualRouter(req) - if err != nil { - return fmt.Errorf("error updating App Mesh virtual router: %s", err) - } - } - - return resourceAwsAppmeshVirtualRouterRead(d, meta) -} - -func resourceAwsAppmeshVirtualRouterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - resp, err := conn.DescribeVirtualRouter(&appmesh.DescribeVirtualRouterInput{ - MeshName: aws.String(d.Get("mesh_name").(string)), - VirtualRouterName: aws.String(d.Get("name").(string)), - }) - if err != nil { - if isAWSErr(err, appmesh.ErrCodeNotFoundException, "") { - log.Printf("[WARN] App Mesh virtual router (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading App Mesh virtual router: %s", err) - } - if aws.StringValue(resp.VirtualRouter.Status.Status) == appmesh.VirtualRouterStatusCodeDeleted { - log.Printf("[WARN] App Mesh virtual router (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("name", resp.VirtualRouter.VirtualRouterName) - d.Set("mesh_name", resp.VirtualRouter.MeshName) - d.Set("arn", resp.VirtualRouter.Metadata.Arn) - d.Set("created_date", resp.VirtualRouter.Metadata.CreatedAt.Format(time.RFC3339)) - d.Set("last_updated_date", resp.VirtualRouter.Metadata.LastUpdatedAt.Format(time.RFC3339)) - err1 := d.Set("spec", flattenAppmeshVirtualRouterSpec(resp.VirtualRouter.Spec)) - return err1 -} - -func resourceAwsAppmeshVirtualRouterDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appmeshconn - - log.Printf("[DEBUG] Deleting App Mesh virtual router: %s", d.Id()) - _, err := conn.DeleteVirtualRouter(&appmesh.DeleteVirtualRouterInput{ - MeshName: aws.String(d.Get("mesh_name").(string)), - VirtualRouterName: aws.String(d.Get("name").(string)), - }) - if err != nil { - if isAWSErr(err, appmesh.ErrCodeNotFoundException, "") { - return nil - } - return fmt.Errorf("error deleting App Mesh virtual router: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_api_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_api_key.go deleted file mode 100644 index fd519e348..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_api_key.go +++ /dev/null @@ -1,184 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/appsync" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsAppsyncApiKey() *schema.Resource { - - return &schema.Resource{ - Create: resourceAwsAppsyncApiKeyCreate, - Read: resourceAwsAppsyncApiKeyRead, - Update: resourceAwsAppsyncApiKeyUpdate, - Delete: resourceAwsAppsyncApiKeyDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "description": { - Type: schema.TypeString, - Optional: true, - Default: "Managed by Terraform", - }, - "api_id": { - Type: schema.TypeString, - Required: true, - }, - "expires": { - Type: schema.TypeString, - Optional: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - // Ignore unsetting value - if old != "" && new == "" { - return true - } - return false - }, - ValidateFunc: validation.ValidateRFC3339TimeString, - }, - "key": { - Type: schema.TypeString, - Computed: true, - Sensitive: true, - }, - }, - } -} - -func resourceAwsAppsyncApiKeyCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appsyncconn - - apiID := d.Get("api_id").(string) - - params := &appsync.CreateApiKeyInput{ - ApiId: aws.String(apiID), - Description: aws.String(d.Get("description").(string)), - } - if v, ok := d.GetOk("expires"); ok { - t, _ := time.Parse(time.RFC3339, v.(string)) - params.Expires = aws.Int64(t.Unix()) - } - resp, err := conn.CreateApiKey(params) - if err != nil { - return fmt.Errorf("error creating Appsync API Key: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%s", apiID, aws.StringValue(resp.ApiKey.Id))) - return resourceAwsAppsyncApiKeyRead(d, meta) -} - -func resourceAwsAppsyncApiKeyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appsyncconn - - apiID, keyID, err := decodeAppSyncApiKeyId(d.Id()) - if err != nil { - return err - } - - key, err := getAppsyncApiKey(apiID, keyID, conn) - if err != nil { - return fmt.Errorf("error getting Appsync API Key %q: %s", d.Id(), err) - } - if key == nil { - log.Printf("[WARN] AppSync API Key %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("api_id", apiID) - d.Set("key", key.Id) - d.Set("description", key.Description) - d.Set("expires", time.Unix(aws.Int64Value(key.Expires), 0).UTC().Format(time.RFC3339)) - return nil -} - -func resourceAwsAppsyncApiKeyUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appsyncconn - - apiID, keyID, err := decodeAppSyncApiKeyId(d.Id()) - if err != nil { - return err - } - - params := &appsync.UpdateApiKeyInput{ - ApiId: aws.String(apiID), - Id: aws.String(keyID), - } - if d.HasChange("description") { - params.Description = aws.String(d.Get("description").(string)) - } - if d.HasChange("expires") { - t, _ := time.Parse(time.RFC3339, d.Get("expires").(string)) - params.Expires = aws.Int64(t.Unix()) - } - - _, err = conn.UpdateApiKey(params) - if err != nil { - return err - } - - return resourceAwsAppsyncApiKeyRead(d, meta) - -} - -func resourceAwsAppsyncApiKeyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appsyncconn - - apiID, keyID, err := decodeAppSyncApiKeyId(d.Id()) - if err != nil { - return err - } - - input := &appsync.DeleteApiKeyInput{ - ApiId: aws.String(apiID), - Id: aws.String(keyID), - } - _, err = conn.DeleteApiKey(input) - if err != nil { - if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { - return nil - } - return err - } - - return nil -} - -func decodeAppSyncApiKeyId(id string) (string, string, error) { - parts := strings.Split(id, ":") - if len(parts) != 2 { - return "", "", fmt.Errorf("Unexpected format of ID (%q), expected API-ID:API-KEY-ID", id) - } - return parts[0], parts[1], nil -} - -func getAppsyncApiKey(apiID, keyID string, conn *appsync.AppSync) (*appsync.ApiKey, error) { - input := &appsync.ListApiKeysInput{ - ApiId: aws.String(apiID), - } - for { - resp, err := conn.ListApiKeys(input) - if err != nil { - return nil, err - } - for _, apiKey := range resp.ApiKeys { - if aws.StringValue(apiKey.Id) == keyID { - return apiKey, nil - } - } - if resp.NextToken == nil { - break - } - input.NextToken = resp.NextToken - } - return nil, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_datasource.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_datasource.go deleted file mode 100644 index 5fdce8b9b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_datasource.go +++ /dev/null @@ -1,438 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/appsync" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsAppsyncDatasource() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAppsyncDatasourceCreate, - Read: resourceAwsAppsyncDatasourceRead, - Update: resourceAwsAppsyncDatasourceUpdate, - Delete: resourceAwsAppsyncDatasourceDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "api_id": { - Type: schema.TypeString, - Required: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`[_A-Za-z][_0-9A-Za-z]*`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q must match [_A-Za-z][_0-9A-Za-z]*", k)) - } - return - }, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - appsync.DataSourceTypeAwsLambda, - appsync.DataSourceTypeAmazonDynamodb, - appsync.DataSourceTypeAmazonElasticsearch, - appsync.DataSourceTypeHttp, - appsync.DataSourceTypeNone, - }, true), - StateFunc: func(v interface{}) string { - return strings.ToUpper(v.(string)) - }, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "dynamodb_config": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "region": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "table_name": { - Type: schema.TypeString, - Required: true, - }, - "use_caller_credentials": { - Type: schema.TypeBool, - Optional: true, - }, - }, - }, - ConflictsWith: []string{"elasticsearch_config", "http_config", "lambda_config"}, - }, - "elasticsearch_config": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "region": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "endpoint": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - ConflictsWith: []string{"dynamodb_config", "http_config", "lambda_config"}, - }, - "http_config": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "endpoint": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - ConflictsWith: []string{"dynamodb_config", "elasticsearch_config", "lambda_config"}, - }, - "lambda_config": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "function_arn": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - ConflictsWith: []string{"dynamodb_config", "elasticsearch_config", "http_config"}, - }, - "service_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsAppsyncDatasourceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appsyncconn - region := meta.(*AWSClient).region - - input := &appsync.CreateDataSourceInput{ - ApiId: aws.String(d.Get("api_id").(string)), - Name: aws.String(d.Get("name").(string)), - Type: aws.String(d.Get("type").(string)), - } - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("dynamodb_config"); ok { - input.DynamodbConfig = expandAppsyncDynamodbDataSourceConfig(v.([]interface{}), region) - } - - if v, ok := d.GetOk("elasticsearch_config"); ok { - input.ElasticsearchConfig = expandAppsyncElasticsearchDataSourceConfig(v.([]interface{}), region) - } - - if v, ok := d.GetOk("http_config"); ok { - input.HttpConfig = expandAppsyncHTTPDataSourceConfig(v.([]interface{})) - } - - if v, ok := d.GetOk("lambda_config"); ok { - input.LambdaConfig = expandAppsyncLambdaDataSourceConfig(v.([]interface{})) - } - - if v, ok := d.GetOk("service_role_arn"); ok { - input.ServiceRoleArn = aws.String(v.(string)) - } - - _, err := conn.CreateDataSource(input) - if err != nil { - return err - } - - d.SetId(d.Get("api_id").(string) + "-" + d.Get("name").(string)) - - return resourceAwsAppsyncDatasourceRead(d, meta) -} - -func resourceAwsAppsyncDatasourceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appsyncconn - - apiID, name, err := decodeAppsyncDataSourceID(d.Id()) - - if err != nil { - return err - } - - input := &appsync.GetDataSourceInput{ - ApiId: aws.String(apiID), - Name: aws.String(name), - } - - resp, err := conn.GetDataSource(input) - if err != nil { - if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { - log.Printf("[WARN] AppSync Datasource %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("api_id", apiID) - d.Set("arn", resp.DataSource.DataSourceArn) - d.Set("description", resp.DataSource.Description) - - if err := d.Set("dynamodb_config", flattenAppsyncDynamodbDataSourceConfig(resp.DataSource.DynamodbConfig)); err != nil { - return fmt.Errorf("error setting dynamodb_config: %s", err) - } - - if err := d.Set("elasticsearch_config", flattenAppsyncElasticsearchDataSourceConfig(resp.DataSource.ElasticsearchConfig)); err != nil { - return fmt.Errorf("error setting elasticsearch_config: %s", err) - } - - if err := d.Set("http_config", flattenAppsyncHTTPDataSourceConfig(resp.DataSource.HttpConfig)); err != nil { - return fmt.Errorf("error setting http_config: %s", err) - } - - if err := d.Set("lambda_config", flattenAppsyncLambdaDataSourceConfig(resp.DataSource.LambdaConfig)); err != nil { - return fmt.Errorf("error setting lambda_config: %s", err) - } - - d.Set("name", resp.DataSource.Name) - d.Set("service_role_arn", resp.DataSource.ServiceRoleArn) - d.Set("type", resp.DataSource.Type) - - return nil -} - -func resourceAwsAppsyncDatasourceUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appsyncconn - region := meta.(*AWSClient).region - - apiID, name, err := decodeAppsyncDataSourceID(d.Id()) - - if err != nil { - return err - } - - input := &appsync.UpdateDataSourceInput{ - ApiId: aws.String(apiID), - Name: aws.String(name), - Type: aws.String(d.Get("type").(string)), - } - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("dynamodb_config"); ok { - input.DynamodbConfig = expandAppsyncDynamodbDataSourceConfig(v.([]interface{}), region) - } - - if v, ok := d.GetOk("elasticsearch_config"); ok { - input.ElasticsearchConfig = expandAppsyncElasticsearchDataSourceConfig(v.([]interface{}), region) - } - - if v, ok := d.GetOk("http_config"); ok { - input.HttpConfig = expandAppsyncHTTPDataSourceConfig(v.([]interface{})) - } - - if v, ok := d.GetOk("lambda_config"); ok { - input.LambdaConfig = expandAppsyncLambdaDataSourceConfig(v.([]interface{})) - } - - if v, ok := d.GetOk("service_role_arn"); ok { - input.ServiceRoleArn = aws.String(v.(string)) - } - - _, err = conn.UpdateDataSource(input) - if err != nil { - return err - } - return resourceAwsAppsyncDatasourceRead(d, meta) -} - -func resourceAwsAppsyncDatasourceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appsyncconn - - apiID, name, err := decodeAppsyncDataSourceID(d.Id()) - - if err != nil { - return err - } - - input := &appsync.DeleteDataSourceInput{ - ApiId: aws.String(apiID), - Name: aws.String(name), - } - - _, err = conn.DeleteDataSource(input) - if err != nil { - if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { - return nil - } - return err - } - - return nil -} - -func decodeAppsyncDataSourceID(id string) (string, string, error) { - idParts := strings.SplitN(id, "-", 2) - if len(idParts) != 2 { - return "", "", fmt.Errorf("expected ID in format ApiID-DataSourceName, received: %s", id) - } - return idParts[0], idParts[1], nil -} - -func expandAppsyncDynamodbDataSourceConfig(l []interface{}, currentRegion string) *appsync.DynamodbDataSourceConfig { - if len(l) == 0 || l[0] == nil { - return nil - } - - configured := l[0].(map[string]interface{}) - - result := &appsync.DynamodbDataSourceConfig{ - AwsRegion: aws.String(currentRegion), - TableName: aws.String(configured["table_name"].(string)), - } - - if v, ok := configured["region"]; ok && v.(string) != "" { - result.AwsRegion = aws.String(v.(string)) - } - - if v, ok := configured["use_caller_credentials"]; ok { - result.UseCallerCredentials = aws.Bool(v.(bool)) - } - - return result -} - -func flattenAppsyncDynamodbDataSourceConfig(config *appsync.DynamodbDataSourceConfig) []map[string]interface{} { - if config == nil { - return nil - } - - result := map[string]interface{}{ - "region": aws.StringValue(config.AwsRegion), - "table_name": aws.StringValue(config.TableName), - } - - if config.UseCallerCredentials != nil { - result["use_caller_credentials"] = aws.BoolValue(config.UseCallerCredentials) - } - - return []map[string]interface{}{result} -} - -func expandAppsyncElasticsearchDataSourceConfig(l []interface{}, currentRegion string) *appsync.ElasticsearchDataSourceConfig { - if len(l) == 0 || l[0] == nil { - return nil - } - - configured := l[0].(map[string]interface{}) - - result := &appsync.ElasticsearchDataSourceConfig{ - AwsRegion: aws.String(currentRegion), - Endpoint: aws.String(configured["endpoint"].(string)), - } - - if v, ok := configured["region"]; ok && v.(string) != "" { - result.AwsRegion = aws.String(v.(string)) - } - - return result -} - -func flattenAppsyncElasticsearchDataSourceConfig(config *appsync.ElasticsearchDataSourceConfig) []map[string]interface{} { - if config == nil { - return nil - } - - result := map[string]interface{}{ - "endpoint": aws.StringValue(config.Endpoint), - "region": aws.StringValue(config.AwsRegion), - } - - return []map[string]interface{}{result} -} - -func expandAppsyncHTTPDataSourceConfig(l []interface{}) *appsync.HttpDataSourceConfig { - if len(l) == 0 || l[0] == nil { - return nil - } - - configured := l[0].(map[string]interface{}) - - result := &appsync.HttpDataSourceConfig{ - Endpoint: aws.String(configured["endpoint"].(string)), - } - - return result -} - -func flattenAppsyncHTTPDataSourceConfig(config *appsync.HttpDataSourceConfig) []map[string]interface{} { - if config == nil { - return nil - } - - result := map[string]interface{}{ - "endpoint": aws.StringValue(config.Endpoint), - } - - return []map[string]interface{}{result} -} - -func expandAppsyncLambdaDataSourceConfig(l []interface{}) *appsync.LambdaDataSourceConfig { - if len(l) == 0 || l[0] == nil { - return nil - } - - configured := l[0].(map[string]interface{}) - - result := &appsync.LambdaDataSourceConfig{ - LambdaFunctionArn: aws.String(configured["function_arn"].(string)), - } - - return result -} - -func flattenAppsyncLambdaDataSourceConfig(config *appsync.LambdaDataSourceConfig) []map[string]interface{} { - if config == nil { - return nil - } - - result := map[string]interface{}{ - "function_arn": aws.StringValue(config.LambdaFunctionArn), - } - - return []map[string]interface{}{result} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_graphql_api.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_graphql_api.go deleted file mode 100644 index 74d962eb6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_graphql_api.go +++ /dev/null @@ -1,362 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/appsync" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsAppsyncGraphqlApi() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAppsyncGraphqlApiCreate, - Read: resourceAwsAppsyncGraphqlApiRead, - Update: resourceAwsAppsyncGraphqlApiUpdate, - Delete: resourceAwsAppsyncGraphqlApiDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "authentication_type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - appsync.AuthenticationTypeApiKey, - appsync.AuthenticationTypeAwsIam, - appsync.AuthenticationTypeAmazonCognitoUserPools, - appsync.AuthenticationTypeOpenidConnect, - }, false), - }, - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`[_A-Za-z][_0-9A-Za-z]*`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q must match [_A-Za-z][_0-9A-Za-z]*", k)) - } - return - }, - }, - "log_config": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cloudwatch_logs_role_arn": { - Type: schema.TypeString, - Required: true, - }, - "field_log_level": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - appsync.FieldLogLevelAll, - appsync.FieldLogLevelError, - appsync.FieldLogLevelNone, - }, false), - }, - }, - }, - }, - "openid_connect_config": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "auth_ttl": { - Type: schema.TypeInt, - Optional: true, - }, - "client_id": { - Type: schema.TypeString, - Optional: true, - }, - "iat_ttl": { - Type: schema.TypeInt, - Optional: true, - }, - "issuer": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "user_pool_config": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "app_id_client_regex": { - Type: schema.TypeString, - Optional: true, - }, - "aws_region": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "default_action": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - appsync.DefaultActionAllow, - appsync.DefaultActionDeny, - }, false), - }, - "user_pool_id": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "uris": { - Type: schema.TypeMap, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func resourceAwsAppsyncGraphqlApiCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appsyncconn - - input := &appsync.CreateGraphqlApiInput{ - AuthenticationType: aws.String(d.Get("authentication_type").(string)), - Name: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("log_config"); ok { - input.LogConfig = expandAppsyncGraphqlApiLogConfig(v.([]interface{})) - } - - if v, ok := d.GetOk("openid_connect_config"); ok { - input.OpenIDConnectConfig = expandAppsyncGraphqlApiOpenIDConnectConfig(v.([]interface{})) - } - - if v, ok := d.GetOk("user_pool_config"); ok { - input.UserPoolConfig = expandAppsyncGraphqlApiUserPoolConfig(v.([]interface{}), meta.(*AWSClient).region) - } - - resp, err := conn.CreateGraphqlApi(input) - if err != nil { - return err - } - - d.SetId(*resp.GraphqlApi.ApiId) - - return resourceAwsAppsyncGraphqlApiRead(d, meta) -} - -func resourceAwsAppsyncGraphqlApiRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appsyncconn - - input := &appsync.GetGraphqlApiInput{ - ApiId: aws.String(d.Id()), - } - - resp, err := conn.GetGraphqlApi(input) - if err != nil { - if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { - log.Printf("[WARN] No such entity found for Appsync Graphql API (%s)", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("arn", resp.GraphqlApi.Arn) - d.Set("authentication_type", resp.GraphqlApi.AuthenticationType) - d.Set("name", resp.GraphqlApi.Name) - - if err := d.Set("log_config", flattenAppsyncGraphqlApiLogConfig(resp.GraphqlApi.LogConfig)); err != nil { - return fmt.Errorf("error setting log_config: %s", err) - } - - if err := d.Set("openid_connect_config", flattenAppsyncGraphqlApiOpenIDConnectConfig(resp.GraphqlApi.OpenIDConnectConfig)); err != nil { - return fmt.Errorf("error setting openid_connect_config: %s", err) - } - - if err := d.Set("user_pool_config", flattenAppsyncGraphqlApiUserPoolConfig(resp.GraphqlApi.UserPoolConfig)); err != nil { - return fmt.Errorf("error setting user_pool_config: %s", err) - } - - if err := d.Set("uris", aws.StringValueMap(resp.GraphqlApi.Uris)); err != nil { - return fmt.Errorf("error setting uris") - } - - return nil -} - -func resourceAwsAppsyncGraphqlApiUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appsyncconn - - input := &appsync.UpdateGraphqlApiInput{ - ApiId: aws.String(d.Id()), - AuthenticationType: aws.String(d.Get("authentication_type").(string)), - Name: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("log_config"); ok { - input.LogConfig = expandAppsyncGraphqlApiLogConfig(v.([]interface{})) - } - - if v, ok := d.GetOk("openid_connect_config"); ok { - input.OpenIDConnectConfig = expandAppsyncGraphqlApiOpenIDConnectConfig(v.([]interface{})) - } - - if v, ok := d.GetOk("user_pool_config"); ok { - input.UserPoolConfig = expandAppsyncGraphqlApiUserPoolConfig(v.([]interface{}), meta.(*AWSClient).region) - } - - _, err := conn.UpdateGraphqlApi(input) - if err != nil { - return err - } - - return resourceAwsAppsyncGraphqlApiRead(d, meta) -} - -func resourceAwsAppsyncGraphqlApiDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).appsyncconn - - input := &appsync.DeleteGraphqlApiInput{ - ApiId: aws.String(d.Id()), - } - _, err := conn.DeleteGraphqlApi(input) - if err != nil { - if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { - return nil - } - return err - } - - return nil -} - -func expandAppsyncGraphqlApiLogConfig(l []interface{}) *appsync.LogConfig { - if len(l) < 1 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - logConfig := &appsync.LogConfig{ - CloudWatchLogsRoleArn: aws.String(m["cloudwatch_logs_role_arn"].(string)), - FieldLogLevel: aws.String(m["field_log_level"].(string)), - } - - return logConfig -} - -func expandAppsyncGraphqlApiOpenIDConnectConfig(l []interface{}) *appsync.OpenIDConnectConfig { - if len(l) < 1 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - openIDConnectConfig := &appsync.OpenIDConnectConfig{ - Issuer: aws.String(m["issuer"].(string)), - } - - if v, ok := m["auth_ttl"].(int); ok && v != 0 { - openIDConnectConfig.AuthTTL = aws.Int64(int64(v)) - } - - if v, ok := m["client_id"].(string); ok && v != "" { - openIDConnectConfig.ClientId = aws.String(v) - } - - if v, ok := m["iat_ttl"].(int); ok && v != 0 { - openIDConnectConfig.IatTTL = aws.Int64(int64(v)) - } - - return openIDConnectConfig -} - -func expandAppsyncGraphqlApiUserPoolConfig(l []interface{}, currentRegion string) *appsync.UserPoolConfig { - if len(l) < 1 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - userPoolConfig := &appsync.UserPoolConfig{ - AwsRegion: aws.String(currentRegion), - DefaultAction: aws.String(m["default_action"].(string)), - UserPoolId: aws.String(m["user_pool_id"].(string)), - } - - if v, ok := m["app_id_client_regex"].(string); ok && v != "" { - userPoolConfig.AppIdClientRegex = aws.String(v) - } - - if v, ok := m["aws_region"].(string); ok && v != "" { - userPoolConfig.AwsRegion = aws.String(v) - } - - return userPoolConfig -} - -func flattenAppsyncGraphqlApiLogConfig(logConfig *appsync.LogConfig) []interface{} { - if logConfig == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "cloudwatch_logs_role_arn": aws.StringValue(logConfig.CloudWatchLogsRoleArn), - "field_log_level": aws.StringValue(logConfig.FieldLogLevel), - } - - return []interface{}{m} -} - -func flattenAppsyncGraphqlApiOpenIDConnectConfig(openIDConnectConfig *appsync.OpenIDConnectConfig) []interface{} { - if openIDConnectConfig == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "auth_ttl": aws.Int64Value(openIDConnectConfig.AuthTTL), - "client_id": aws.StringValue(openIDConnectConfig.ClientId), - "iat_ttl": aws.Int64Value(openIDConnectConfig.IatTTL), - "issuer": aws.StringValue(openIDConnectConfig.Issuer), - } - - return []interface{}{m} -} - -func flattenAppsyncGraphqlApiUserPoolConfig(userPoolConfig *appsync.UserPoolConfig) []interface{} { - if userPoolConfig == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "aws_region": aws.StringValue(userPoolConfig.AwsRegion), - "default_action": aws.StringValue(userPoolConfig.DefaultAction), - "user_pool_id": aws.StringValue(userPoolConfig.UserPoolId), - } - - if userPoolConfig.AppIdClientRegex != nil { - m["app_id_client_regex"] = aws.StringValue(userPoolConfig.AppIdClientRegex) - } - - return []interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go deleted file mode 100644 index f440bcd47..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go +++ /dev/null @@ -1,265 +0,0 @@ -package aws - -import ( - "fmt" - "regexp" - "strings" - "time" - - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/athena" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsAthenaDatabase() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAthenaDatabaseCreate, - Read: resourceAwsAthenaDatabaseRead, - Update: resourceAwsAthenaDatabaseUpdate, - Delete: resourceAwsAthenaDatabaseDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile("^[_a-z0-9]+$"), "see https://docs.aws.amazon.com/athena/latest/ug/tables-databases-columns-names.html"), - }, - "bucket": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "force_destroy": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "encryption_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "kms_key": { - Type: schema.TypeString, - Optional: true, - }, - "encryption_option": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - athena.EncryptionOptionCseKms, - athena.EncryptionOptionSseKms, - athena.EncryptionOptionSseS3, - }, false), - }, - }, - }, - }, - }, - } -} - -func expandAthenaResultConfiguration(bucket string, encryptionConfigurationList []interface{}) (*athena.ResultConfiguration, error) { - resultConfig := athena.ResultConfiguration{ - OutputLocation: aws.String("s3://" + bucket), - } - - if len(encryptionConfigurationList) <= 0 { - return &resultConfig, nil - } - - data := encryptionConfigurationList[0].(map[string]interface{}) - keyType := data["encryption_option"].(string) - keyID := data["kms_key"].(string) - - encryptionConfig := athena.EncryptionConfiguration{ - EncryptionOption: aws.String(keyType), - } - - if len(keyID) > 0 { - encryptionConfig.KmsKey = aws.String(keyID) - } - - resultConfig.EncryptionConfiguration = &encryptionConfig - - return &resultConfig, nil -} - -func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).athenaconn - - resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_configuration").([]interface{})) - if err != nil { - return err - } - - input := &athena.StartQueryExecutionInput{ - QueryString: aws.String(fmt.Sprintf("create database `%s`;", d.Get("name").(string))), - ResultConfiguration: resultConfig, - } - - resp, err := conn.StartQueryExecution(input) - if err != nil { - return err - } - - if err := executeAndExpectNoRowsWhenCreate(*resp.QueryExecutionId, conn); err != nil { - return err - } - d.SetId(d.Get("name").(string)) - return resourceAwsAthenaDatabaseRead(d, meta) -} - -func resourceAwsAthenaDatabaseRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).athenaconn - - resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_configuration").([]interface{})) - if err != nil { - return err - } - - input := &athena.StartQueryExecutionInput{ - QueryString: aws.String(fmt.Sprint("show databases;")), - ResultConfiguration: resultConfig, - } - - resp, err := conn.StartQueryExecution(input) - if err != nil { - return err - } - - if err := executeAndExpectMatchingRow(*resp.QueryExecutionId, d.Get("name").(string), conn); err != nil { - return err - } - return nil -} - -func resourceAwsAthenaDatabaseUpdate(d *schema.ResourceData, meta interface{}) error { - return resourceAwsAthenaDatabaseRead(d, meta) -} - -func resourceAwsAthenaDatabaseDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).athenaconn - - resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_configuration").([]interface{})) - if err != nil { - return err - } - - name := d.Get("name").(string) - - queryString := fmt.Sprintf("drop database `%s`", name) - if d.Get("force_destroy").(bool) { - queryString += " cascade" - } - queryString += ";" - - input := &athena.StartQueryExecutionInput{ - QueryString: aws.String(queryString), - ResultConfiguration: resultConfig, - } - - resp, err := conn.StartQueryExecution(input) - if err != nil { - return err - } - - if err := executeAndExpectNoRowsWhenDrop(*resp.QueryExecutionId, conn); err != nil { - return err - } - return nil -} - -func executeAndExpectNoRowsWhenCreate(qeid string, conn *athena.Athena) error { - rs, err := queryExecutionResult(qeid, conn) - if err != nil { - return err - } - if len(rs.Rows) != 0 { - return fmt.Errorf("Athena create database, unexpected query result: %s", flattenAthenaResultSet(rs)) - } - return nil -} - -func executeAndExpectMatchingRow(qeid string, dbName string, conn *athena.Athena) error { - rs, err := queryExecutionResult(qeid, conn) - if err != nil { - return err - } - for _, row := range rs.Rows { - for _, datum := range row.Data { - if *datum.VarCharValue == dbName { - return nil - } - } - } - return fmt.Errorf("Athena not found database: %s, query result: %s", dbName, flattenAthenaResultSet(rs)) -} - -func executeAndExpectNoRowsWhenDrop(qeid string, conn *athena.Athena) error { - rs, err := queryExecutionResult(qeid, conn) - if err != nil { - return err - } - if len(rs.Rows) != 0 { - return fmt.Errorf("Athena drop database, unexpected query result: %s", flattenAthenaResultSet(rs)) - } - return nil -} - -func queryExecutionResult(qeid string, conn *athena.Athena) (*athena.ResultSet, error) { - executionStateConf := &resource.StateChangeConf{ - Pending: []string{athena.QueryExecutionStateQueued, athena.QueryExecutionStateRunning}, - Target: []string{athena.QueryExecutionStateSucceeded}, - Refresh: queryExecutionStateRefreshFunc(qeid, conn), - Timeout: 10 * time.Minute, - Delay: 3 * time.Second, - MinTimeout: 3 * time.Second, - } - _, err := executionStateConf.WaitForState() - if err != nil { - return nil, err - } - - qrinput := &athena.GetQueryResultsInput{ - QueryExecutionId: aws.String(qeid), - } - resp, err := conn.GetQueryResults(qrinput) - if err != nil { - return nil, err - } - return resp.ResultSet, nil -} - -func queryExecutionStateRefreshFunc(qeid string, conn *athena.Athena) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &athena.GetQueryExecutionInput{ - QueryExecutionId: aws.String(qeid), - } - out, err := conn.GetQueryExecution(input) - if err != nil { - return nil, "failed", err - } - status := out.QueryExecution.Status - if *status.State == athena.QueryExecutionStateFailed && - status.StateChangeReason != nil { - err = fmt.Errorf("reason: %s", *status.StateChangeReason) - } - return out, *out.QueryExecution.Status.State, err - } -} - -func flattenAthenaResultSet(rs *athena.ResultSet) string { - ss := make([]string, 0) - for _, row := range rs.Rows { - for _, datum := range row.Data { - ss = append(ss, *datum.VarCharValue) - } - } - return strings.Join(ss, "\n") -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_named_query.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_named_query.go deleted file mode 100644 index e5bd43f28..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_named_query.go +++ /dev/null @@ -1,99 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/athena" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsAthenaNamedQuery() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAthenaNamedQueryCreate, - Read: resourceAwsAthenaNamedQueryRead, - Delete: resourceAwsAthenaNamedQueryDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "query": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "database": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsAthenaNamedQueryCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).athenaconn - - input := &athena.CreateNamedQueryInput{ - Database: aws.String(d.Get("database").(string)), - Name: aws.String(d.Get("name").(string)), - QueryString: aws.String(d.Get("query").(string)), - } - if raw, ok := d.GetOk("description"); ok { - input.Description = aws.String(raw.(string)) - } - - resp, err := conn.CreateNamedQuery(input) - if err != nil { - return err - } - d.SetId(*resp.NamedQueryId) - return resourceAwsAthenaNamedQueryRead(d, meta) -} - -func resourceAwsAthenaNamedQueryRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).athenaconn - - input := &athena.GetNamedQueryInput{ - NamedQueryId: aws.String(d.Id()), - } - - resp, err := conn.GetNamedQuery(input) - if err != nil { - if isAWSErr(err, athena.ErrCodeInvalidRequestException, d.Id()) { - log.Printf("[WARN] Athena Named Query (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("name", resp.NamedQuery.Name) - d.Set("query", resp.NamedQuery.QueryString) - d.Set("database", resp.NamedQuery.Database) - d.Set("description", resp.NamedQuery.Description) - return nil -} - -func resourceAwsAthenaNamedQueryDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).athenaconn - - input := &athena.DeleteNamedQueryInput{ - NamedQueryId: aws.String(d.Id()), - } - - _, err := conn.DeleteNamedQuery(input) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_attachment.go deleted file mode 100644 index 8563abd0e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_attachment.go +++ /dev/null @@ -1,156 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsAutoscalingAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAutoscalingAttachmentCreate, - Read: resourceAwsAutoscalingAttachmentRead, - Delete: resourceAwsAutoscalingAttachmentDelete, - - Schema: map[string]*schema.Schema{ - "autoscaling_group_name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - - "elb": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - }, - - "alb_target_group_arn": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - }, - }, - } -} - -func resourceAwsAutoscalingAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - asgconn := meta.(*AWSClient).autoscalingconn - asgName := d.Get("autoscaling_group_name").(string) - - if v, ok := d.GetOk("elb"); ok { - attachOpts := &autoscaling.AttachLoadBalancersInput{ - AutoScalingGroupName: aws.String(asgName), - LoadBalancerNames: []*string{aws.String(v.(string))}, - } - - log.Printf("[INFO] registering asg %s with ELBs %s", asgName, v.(string)) - - if _, err := asgconn.AttachLoadBalancers(attachOpts); err != nil { - return fmt.Errorf("Failure attaching AutoScaling Group %s with Elastic Load Balancer: %s: %s", asgName, v.(string), err) - } - } - - if v, ok := d.GetOk("alb_target_group_arn"); ok { - attachOpts := &autoscaling.AttachLoadBalancerTargetGroupsInput{ - AutoScalingGroupName: aws.String(asgName), - TargetGroupARNs: []*string{aws.String(v.(string))}, - } - - log.Printf("[INFO] registering asg %s with ALB Target Group %s", asgName, v.(string)) - - if _, err := asgconn.AttachLoadBalancerTargetGroups(attachOpts); err != nil { - return fmt.Errorf("Failure attaching AutoScaling Group %s with ALB Target Group: %s: %s", asgName, v.(string), err) - } - } - - d.SetId(resource.PrefixedUniqueId(fmt.Sprintf("%s-", asgName))) - - return resourceAwsAutoscalingAttachmentRead(d, meta) -} - -func resourceAwsAutoscalingAttachmentRead(d *schema.ResourceData, meta interface{}) error { - asgconn := meta.(*AWSClient).autoscalingconn - asgName := d.Get("autoscaling_group_name").(string) - - // Retrieve the ASG properties to get list of associated ELBs - asg, err := getAwsAutoscalingGroup(asgName, asgconn) - - if err != nil { - return err - } - if asg == nil { - log.Printf("[WARN] Autoscaling Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if v, ok := d.GetOk("elb"); ok { - found := false - for _, i := range asg.LoadBalancerNames { - if v.(string) == *i { - d.Set("elb", v.(string)) - found = true - break - } - } - - if !found { - log.Printf("[WARN] Association for %s was not found in ASG association", v.(string)) - d.SetId("") - } - } - - if v, ok := d.GetOk("alb_target_group_arn"); ok { - found := false - for _, i := range asg.TargetGroupARNs { - if v.(string) == *i { - d.Set("alb_target_group_arn", v.(string)) - found = true - break - } - } - - if !found { - log.Printf("[WARN] Association for %s was not found in ASG association", v.(string)) - d.SetId("") - } - } - - return nil -} - -func resourceAwsAutoscalingAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - asgconn := meta.(*AWSClient).autoscalingconn - asgName := d.Get("autoscaling_group_name").(string) - - if v, ok := d.GetOk("elb"); ok { - detachOpts := &autoscaling.DetachLoadBalancersInput{ - AutoScalingGroupName: aws.String(asgName), - LoadBalancerNames: []*string{aws.String(v.(string))}, - } - - log.Printf("[INFO] Deleting ELB %s association from: %s", v.(string), asgName) - if _, err := asgconn.DetachLoadBalancers(detachOpts); err != nil { - return fmt.Errorf("Failure detaching AutoScaling Group %s with Elastic Load Balancer: %s: %s", asgName, v.(string), err) - } - } - - if v, ok := d.GetOk("alb_target_group_arn"); ok { - detachOpts := &autoscaling.DetachLoadBalancerTargetGroupsInput{ - AutoScalingGroupName: aws.String(asgName), - TargetGroupARNs: []*string{aws.String(v.(string))}, - } - - log.Printf("[INFO] Deleting ALB Target Group %s association from: %s", v.(string), asgName) - if _, err := asgconn.DetachLoadBalancerTargetGroups(detachOpts); err != nil { - return fmt.Errorf("Failure detaching AutoScaling Group %s with ALB Target Group: %s: %s", asgName, v.(string), err) - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go deleted file mode 100644 index 0755f13ed..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go +++ /dev/null @@ -1,1447 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/hashicorp/terraform/helper/customdiff" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/aws/aws-sdk-go/service/elbv2" -) - -func resourceAwsAutoscalingGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAutoscalingGroupCreate, - Read: resourceAwsAutoscalingGroupRead, - Update: resourceAwsAutoscalingGroupUpdate, - Delete: resourceAwsAutoscalingGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validation.StringLenBetween(0, 255), - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 255-resource.UniqueIDSuffixLength), - }, - - "launch_configuration": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"launch_template"}, - }, - - "launch_template": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - ConflictsWith: []string{"launch_configuration"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ConflictsWith: []string{"launch_template.0.name"}, - ValidateFunc: validateLaunchTemplateId, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ConflictsWith: []string{"launch_template.0.id"}, - ValidateFunc: validateLaunchTemplateName, - }, - "version": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(1, 255), - }, - }, - }, - }, - - "mixed_instances_policy": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "instances_distribution": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - // Ignore missing configuration block - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "on_demand_allocation_strategy": { - Type: schema.TypeString, - Optional: true, - Default: "prioritized", - ValidateFunc: validation.StringInSlice([]string{ - "prioritized", - }, false), - }, - "on_demand_base_capacity": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "on_demand_percentage_above_base_capacity": { - Type: schema.TypeInt, - Optional: true, - Default: 100, - ValidateFunc: validation.IntBetween(0, 100), - }, - "spot_allocation_strategy": { - Type: schema.TypeString, - Optional: true, - Default: "lowest-price", - ValidateFunc: validation.StringInSlice([]string{ - "lowest-price", - }, false), - }, - "spot_instance_pools": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "spot_max_price": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "launch_template": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "launch_template_specification": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "launch_template_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "launch_template_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "version": { - Type: schema.TypeString, - Optional: true, - Default: "$Default", - }, - }, - }, - }, - "override": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "instance_type": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - - "desired_capacity": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - - "min_elb_capacity": { - Type: schema.TypeInt, - Optional: true, - }, - - "min_size": { - Type: schema.TypeInt, - Required: true, - }, - - "max_size": { - Type: schema.TypeInt, - Required: true, - }, - - "default_cooldown": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - - "force_delete": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "health_check_grace_period": { - Type: schema.TypeInt, - Optional: true, - Default: 300, - }, - - "health_check_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "availability_zones": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - DiffSuppressFunc: suppressAutoscalingGroupAvailabilityZoneDiffs, - }, - - "placement_group": { - Type: schema.TypeString, - Optional: true, - }, - - "load_balancers": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "vpc_zone_identifier": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "termination_policies": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "wait_for_capacity_timeout": { - Type: schema.TypeString, - Optional: true, - Default: "10m", - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - duration, err := time.ParseDuration(value) - if err != nil { - errors = append(errors, fmt.Errorf( - "%q cannot be parsed as a duration: %s", k, err)) - } - if duration < 0 { - errors = append(errors, fmt.Errorf( - "%q must be greater than zero", k)) - } - return - }, - }, - - "wait_for_elb_capacity": { - Type: schema.TypeInt, - Optional: true, - }, - - "enabled_metrics": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "suspended_processes": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "metrics_granularity": { - Type: schema.TypeString, - Optional: true, - Default: "1Minute", - }, - - "protect_from_scale_in": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "target_group_arns": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "initial_lifecycle_hook": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "default_result": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "heartbeat_timeout": { - Type: schema.TypeInt, - Optional: true, - }, - "lifecycle_transition": { - Type: schema.TypeString, - Required: true, - }, - "notification_metadata": { - Type: schema.TypeString, - Optional: true, - }, - "notification_target_arn": { - Type: schema.TypeString, - Optional: true, - }, - "role_arn": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "tag": autoscalingTagSchema(), - - "tags": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeMap}, - ConflictsWith: []string{"tag"}, - }, - - "service_linked_role_arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - - CustomizeDiff: customdiff.Sequence( - customdiff.ComputedIf("launch_template.0.id", func(diff *schema.ResourceDiff, meta interface{}) bool { - return diff.HasChange("launch_template.0.name") - }), - customdiff.ComputedIf("launch_template.0.name", func(diff *schema.ResourceDiff, meta interface{}) bool { - return diff.HasChange("launch_template.0.id") - }), - ), - } -} - -func generatePutLifecycleHookInputs(asgName string, cfgs []interface{}) []autoscaling.PutLifecycleHookInput { - res := make([]autoscaling.PutLifecycleHookInput, 0, len(cfgs)) - - for _, raw := range cfgs { - cfg := raw.(map[string]interface{}) - - input := autoscaling.PutLifecycleHookInput{ - AutoScalingGroupName: &asgName, - LifecycleHookName: aws.String(cfg["name"].(string)), - } - - if v, ok := cfg["default_result"]; ok && v.(string) != "" { - input.DefaultResult = aws.String(v.(string)) - } - - if v, ok := cfg["heartbeat_timeout"]; ok && v.(int) > 0 { - input.HeartbeatTimeout = aws.Int64(int64(v.(int))) - } - - if v, ok := cfg["lifecycle_transition"]; ok && v.(string) != "" { - input.LifecycleTransition = aws.String(v.(string)) - } - - if v, ok := cfg["notification_metadata"]; ok && v.(string) != "" { - input.NotificationMetadata = aws.String(v.(string)) - } - - if v, ok := cfg["notification_target_arn"]; ok && v.(string) != "" { - input.NotificationTargetARN = aws.String(v.(string)) - } - - if v, ok := cfg["role_arn"]; ok && v.(string) != "" { - input.RoleARN = aws.String(v.(string)) - } - - res = append(res, input) - } - - return res -} - -func resourceAwsAutoscalingGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).autoscalingconn - - var asgName string - if v, ok := d.GetOk("name"); ok { - asgName = v.(string) - } else { - if v, ok := d.GetOk("name_prefix"); ok { - asgName = resource.PrefixedUniqueId(v.(string)) - } else { - asgName = resource.PrefixedUniqueId("tf-asg-") - } - d.Set("name", asgName) - } - - createOpts := autoscaling.CreateAutoScalingGroupInput{ - AutoScalingGroupName: aws.String(asgName), - MixedInstancesPolicy: expandAutoScalingMixedInstancesPolicy(d.Get("mixed_instances_policy").([]interface{})), - NewInstancesProtectedFromScaleIn: aws.Bool(d.Get("protect_from_scale_in").(bool)), - } - updateOpts := autoscaling.UpdateAutoScalingGroupInput{ - AutoScalingGroupName: aws.String(asgName), - } - - initialLifecycleHooks := d.Get("initial_lifecycle_hook").(*schema.Set).List() - twoPhases := len(initialLifecycleHooks) > 0 - - minSize := aws.Int64(int64(d.Get("min_size").(int))) - maxSize := aws.Int64(int64(d.Get("max_size").(int))) - - if twoPhases { - createOpts.MinSize = aws.Int64(int64(0)) - createOpts.MaxSize = aws.Int64(int64(0)) - - updateOpts.MinSize = minSize - updateOpts.MaxSize = maxSize - - if v, ok := d.GetOk("desired_capacity"); ok { - updateOpts.DesiredCapacity = aws.Int64(int64(v.(int))) - } - } else { - createOpts.MinSize = minSize - createOpts.MaxSize = maxSize - - if v, ok := d.GetOk("desired_capacity"); ok { - createOpts.DesiredCapacity = aws.Int64(int64(v.(int))) - } - } - - launchConfigurationValue, launchConfigurationOk := d.GetOk("launch_configuration") - launchTemplateValue, launchTemplateOk := d.GetOk("launch_template") - - if createOpts.MixedInstancesPolicy == nil && !launchConfigurationOk && !launchTemplateOk { - return fmt.Errorf("One of `launch_configuration`, `launch_template`, or `mixed_instances_policy` must be set for an autoscaling group") - } - - if launchConfigurationOk { - createOpts.LaunchConfigurationName = aws.String(launchConfigurationValue.(string)) - } - - if launchTemplateOk { - var err error - createOpts.LaunchTemplate, err = expandLaunchTemplateSpecification(launchTemplateValue.([]interface{})) - if err != nil { - return err - } - } - - // Availability Zones are optional if VPC Zone Identifier(s) are specified - if v, ok := d.GetOk("availability_zones"); ok && v.(*schema.Set).Len() > 0 { - createOpts.AvailabilityZones = expandStringList(v.(*schema.Set).List()) - } - - resourceID := d.Get("name").(string) - if v, ok := d.GetOk("tag"); ok { - var err error - createOpts.Tags, err = autoscalingTagsFromMap( - setToMapByKey(v.(*schema.Set)), resourceID) - if err != nil { - return err - } - } - - if v, ok := d.GetOk("tags"); ok { - tags, err := autoscalingTagsFromList(v.([]interface{}), resourceID) - if err != nil { - return err - } - - createOpts.Tags = append(createOpts.Tags, tags...) - } - - if v, ok := d.GetOk("default_cooldown"); ok { - createOpts.DefaultCooldown = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("health_check_type"); ok && v.(string) != "" { - createOpts.HealthCheckType = aws.String(v.(string)) - } - - if v, ok := d.GetOk("health_check_grace_period"); ok { - createOpts.HealthCheckGracePeriod = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("placement_group"); ok { - createOpts.PlacementGroup = aws.String(v.(string)) - } - - if v, ok := d.GetOk("load_balancers"); ok && v.(*schema.Set).Len() > 0 { - createOpts.LoadBalancerNames = expandStringList( - v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("vpc_zone_identifier"); ok && v.(*schema.Set).Len() > 0 { - createOpts.VPCZoneIdentifier = expandVpcZoneIdentifiers(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("termination_policies"); ok && len(v.([]interface{})) > 0 { - createOpts.TerminationPolicies = expandStringList(v.([]interface{})) - } - - if v, ok := d.GetOk("target_group_arns"); ok && len(v.(*schema.Set).List()) > 0 { - createOpts.TargetGroupARNs = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("service_linked_role_arn"); ok { - createOpts.ServiceLinkedRoleARN = aws.String(v.(string)) - } - - log.Printf("[DEBUG] AutoScaling Group create configuration: %#v", createOpts) - - // Retry for IAM eventual consistency - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.CreateAutoScalingGroup(&createOpts) - - // ValidationError: You must use a valid fully-formed launch template. Value (tf-acc-test-6643732652421074386) for parameter iamInstanceProfile.name is invalid. Invalid IAM Instance Profile name - if isAWSErr(err, "ValidationError", "Invalid IAM Instance Profile") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - if err != nil { - return fmt.Errorf("Error creating AutoScaling Group: %s", err) - } - - d.SetId(d.Get("name").(string)) - log.Printf("[INFO] AutoScaling Group ID: %s", d.Id()) - - if twoPhases { - for _, hook := range generatePutLifecycleHookInputs(asgName, initialLifecycleHooks) { - if err = resourceAwsAutoscalingLifecycleHookPutOp(conn, &hook); err != nil { - return fmt.Errorf("Error creating initial lifecycle hooks: %s", err) - } - } - - _, err = conn.UpdateAutoScalingGroup(&updateOpts) - if err != nil { - return fmt.Errorf("Error setting AutoScaling Group initial capacity: %s", err) - } - } - - if err := waitForASGCapacity(d, meta, capacitySatisfiedCreate); err != nil { - return err - } - - if _, ok := d.GetOk("suspended_processes"); ok { - suspendedProcessesErr := enableASGSuspendedProcesses(d, conn) - if suspendedProcessesErr != nil { - return suspendedProcessesErr - } - } - - if _, ok := d.GetOk("enabled_metrics"); ok { - metricsErr := enableASGMetricsCollection(d, conn) - if metricsErr != nil { - return metricsErr - } - } - - return resourceAwsAutoscalingGroupRead(d, meta) -} - -func resourceAwsAutoscalingGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).autoscalingconn - - g, err := getAwsAutoscalingGroup(d.Id(), conn) - if err != nil { - return err - } - if g == nil { - log.Printf("[WARN] Autoscaling Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("availability_zones", flattenStringList(g.AvailabilityZones)) - d.Set("default_cooldown", g.DefaultCooldown) - d.Set("arn", g.AutoScalingGroupARN) - d.Set("desired_capacity", g.DesiredCapacity) - d.Set("health_check_grace_period", g.HealthCheckGracePeriod) - d.Set("health_check_type", g.HealthCheckType) - d.Set("load_balancers", flattenStringList(g.LoadBalancerNames)) - - d.Set("launch_configuration", g.LaunchConfigurationName) - - if g.LaunchTemplate != nil { - d.Set("launch_template", flattenLaunchTemplateSpecification(g.LaunchTemplate)) - } else { - d.Set("launch_template", nil) - } - - if err := d.Set("mixed_instances_policy", flattenAutoScalingMixedInstancesPolicy(g.MixedInstancesPolicy)); err != nil { - return fmt.Errorf("error setting mixed_instances_policy: %s", err) - } - - if err := d.Set("suspended_processes", flattenAsgSuspendedProcesses(g.SuspendedProcesses)); err != nil { - log.Printf("[WARN] Error setting suspended_processes for %q: %s", d.Id(), err) - } - if err := d.Set("target_group_arns", flattenStringList(g.TargetGroupARNs)); err != nil { - log.Printf("[ERR] Error setting target groups: %s", err) - } - d.Set("min_size", g.MinSize) - d.Set("max_size", g.MaxSize) - d.Set("placement_group", g.PlacementGroup) - d.Set("name", g.AutoScalingGroupName) - d.Set("service_linked_role_arn", g.ServiceLinkedRoleARN) - - var tagList, tagsList []*autoscaling.TagDescription - var tagOk, tagsOk bool - var v interface{} - - if v, tagOk = d.GetOk("tag"); tagOk { - tags := setToMapByKey(v.(*schema.Set)) - for _, t := range g.Tags { - if _, ok := tags[*t.Key]; ok { - tagList = append(tagList, t) - } - } - d.Set("tag", autoscalingTagDescriptionsToSlice(tagList)) - } - - if v, tagsOk = d.GetOk("tags"); tagsOk { - tags := map[string]struct{}{} - for _, tag := range v.([]interface{}) { - attr, ok := tag.(map[string]interface{}) - if !ok { - continue - } - - key, ok := attr["key"].(string) - if !ok { - continue - } - - tags[key] = struct{}{} - } - - for _, t := range g.Tags { - if _, ok := tags[*t.Key]; ok { - tagsList = append(tagsList, t) - } - } - d.Set("tags", autoscalingTagDescriptionsToSlice(tagsList)) - } - - if !tagOk && !tagsOk { - d.Set("tag", autoscalingTagDescriptionsToSlice(g.Tags)) - } - - if len(*g.VPCZoneIdentifier) > 0 { - d.Set("vpc_zone_identifier", strings.Split(*g.VPCZoneIdentifier, ",")) - } else { - d.Set("vpc_zone_identifier", []string{}) - } - - d.Set("protect_from_scale_in", g.NewInstancesProtectedFromScaleIn) - - // If no termination polices are explicitly configured and the upstream state - // is only using the "Default" policy, clear the state to make it consistent - // with the default AWS create API behavior. - _, ok := d.GetOk("termination_policies") - if !ok && len(g.TerminationPolicies) == 1 && *g.TerminationPolicies[0] == "Default" { - d.Set("termination_policies", []interface{}{}) - } else { - d.Set("termination_policies", flattenStringList(g.TerminationPolicies)) - } - - if g.EnabledMetrics != nil { - if err := d.Set("enabled_metrics", flattenAsgEnabledMetrics(g.EnabledMetrics)); err != nil { - log.Printf("[WARN] Error setting metrics for (%s): %s", d.Id(), err) - } - d.Set("metrics_granularity", g.EnabledMetrics[0].Granularity) - } else { - d.Set("enabled_metrics", nil) - } - - return nil -} - -func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).autoscalingconn - shouldWaitForCapacity := false - - opts := autoscaling.UpdateAutoScalingGroupInput{ - AutoScalingGroupName: aws.String(d.Id()), - } - - opts.NewInstancesProtectedFromScaleIn = aws.Bool(d.Get("protect_from_scale_in").(bool)) - - if d.HasChange("default_cooldown") { - opts.DefaultCooldown = aws.Int64(int64(d.Get("default_cooldown").(int))) - } - - if d.HasChange("desired_capacity") { - opts.DesiredCapacity = aws.Int64(int64(d.Get("desired_capacity").(int))) - shouldWaitForCapacity = true - } - - if d.HasChange("launch_configuration") { - if v, ok := d.GetOk("launch_configuration"); ok { - opts.LaunchConfigurationName = aws.String(v.(string)) - } - } - - if d.HasChange("launch_template") { - if v, ok := d.GetOk("launch_template"); ok && len(v.([]interface{})) > 0 { - opts.LaunchTemplate, _ = expandLaunchTemplateSpecification(v.([]interface{})) - } - } - - if d.HasChange("mixed_instances_policy") { - opts.MixedInstancesPolicy = expandAutoScalingMixedInstancesPolicy(d.Get("mixed_instances_policy").([]interface{})) - } - - if d.HasChange("min_size") { - opts.MinSize = aws.Int64(int64(d.Get("min_size").(int))) - shouldWaitForCapacity = true - } - - if d.HasChange("max_size") { - opts.MaxSize = aws.Int64(int64(d.Get("max_size").(int))) - } - - if d.HasChange("health_check_grace_period") { - opts.HealthCheckGracePeriod = aws.Int64(int64(d.Get("health_check_grace_period").(int))) - } - - if d.HasChange("health_check_type") { - opts.HealthCheckGracePeriod = aws.Int64(int64(d.Get("health_check_grace_period").(int))) - opts.HealthCheckType = aws.String(d.Get("health_check_type").(string)) - } - - if d.HasChange("vpc_zone_identifier") { - opts.VPCZoneIdentifier = expandVpcZoneIdentifiers(d.Get("vpc_zone_identifier").(*schema.Set).List()) - } - - if d.HasChange("availability_zones") { - if v, ok := d.GetOk("availability_zones"); ok && v.(*schema.Set).Len() > 0 { - opts.AvailabilityZones = expandStringList(v.(*schema.Set).List()) - } - } - - if d.HasChange("placement_group") { - opts.PlacementGroup = aws.String(d.Get("placement_group").(string)) - } - - if d.HasChange("termination_policies") { - // If the termination policy is set to null, we need to explicitly set - // it back to "Default", or the API won't reset it for us. - if v, ok := d.GetOk("termination_policies"); ok && len(v.([]interface{})) > 0 { - opts.TerminationPolicies = expandStringList(v.([]interface{})) - } else { - log.Printf("[DEBUG] Explicitly setting null termination policy to 'Default'") - opts.TerminationPolicies = aws.StringSlice([]string{"Default"}) - } - } - - if d.HasChange("service_linked_role_arn") { - opts.ServiceLinkedRoleARN = aws.String(d.Get("service_linked_role_arn").(string)) - } - - if err := setAutoscalingTags(conn, d); err != nil { - return err - } - - if d.HasChange("tag") { - d.SetPartial("tag") - } - - if d.HasChange("tags") { - d.SetPartial("tags") - } - - log.Printf("[DEBUG] AutoScaling Group update configuration: %#v", opts) - _, err := conn.UpdateAutoScalingGroup(&opts) - if err != nil { - d.Partial(true) - return fmt.Errorf("Error updating Autoscaling group: %s", err) - } - - if d.HasChange("load_balancers") { - - o, n := d.GetChange("load_balancers") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - remove := expandStringList(os.Difference(ns).List()) - add := expandStringList(ns.Difference(os).List()) - - if len(remove) > 0 { - _, err := conn.DetachLoadBalancers(&autoscaling.DetachLoadBalancersInput{ - AutoScalingGroupName: aws.String(d.Id()), - LoadBalancerNames: remove, - }) - if err != nil { - return fmt.Errorf("Error updating Load Balancers for AutoScaling Group (%s), error: %s", d.Id(), err) - } - } - - if len(add) > 0 { - _, err := conn.AttachLoadBalancers(&autoscaling.AttachLoadBalancersInput{ - AutoScalingGroupName: aws.String(d.Id()), - LoadBalancerNames: add, - }) - if err != nil { - return fmt.Errorf("Error updating Load Balancers for AutoScaling Group (%s), error: %s", d.Id(), err) - } - } - } - - if d.HasChange("target_group_arns") { - - o, n := d.GetChange("target_group_arns") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - remove := expandStringList(os.Difference(ns).List()) - add := expandStringList(ns.Difference(os).List()) - - if len(remove) > 0 { - _, err := conn.DetachLoadBalancerTargetGroups(&autoscaling.DetachLoadBalancerTargetGroupsInput{ - AutoScalingGroupName: aws.String(d.Id()), - TargetGroupARNs: remove, - }) - if err != nil { - return fmt.Errorf("Error updating Load Balancers Target Groups for AutoScaling Group (%s), error: %s", d.Id(), err) - } - } - - if len(add) > 0 { - _, err := conn.AttachLoadBalancerTargetGroups(&autoscaling.AttachLoadBalancerTargetGroupsInput{ - AutoScalingGroupName: aws.String(d.Id()), - TargetGroupARNs: add, - }) - if err != nil { - return fmt.Errorf("Error updating Load Balancers Target Groups for AutoScaling Group (%s), error: %s", d.Id(), err) - } - } - } - - if shouldWaitForCapacity { - if err := waitForASGCapacity(d, meta, capacitySatisfiedUpdate); err != nil { - return fmt.Errorf("Error waiting for AutoScaling Group Capacity: %s", err) - } - } - - if d.HasChange("enabled_metrics") { - if err := updateASGMetricsCollection(d, conn); err != nil { - return fmt.Errorf("Error updating AutoScaling Group Metrics collection: %s", err) - } - } - - if d.HasChange("suspended_processes") { - if err := updateASGSuspendedProcesses(d, conn); err != nil { - return fmt.Errorf("Error updating AutoScaling Group Suspended Processes: %s", err) - } - } - - return resourceAwsAutoscalingGroupRead(d, meta) -} - -func resourceAwsAutoscalingGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).autoscalingconn - - // Read the autoscaling group first. If it doesn't exist, we're done. - // We need the group in order to check if there are instances attached. - // If so, we need to remove those first. - g, err := getAwsAutoscalingGroup(d.Id(), conn) - if err != nil { - return err - } - if g == nil { - log.Printf("[WARN] Autoscaling Group (%s) not found, removing from state", d.Id()) - return nil - } - if len(g.Instances) > 0 || *g.DesiredCapacity > 0 { - if err := resourceAwsAutoscalingGroupDrain(d, meta); err != nil { - return err - } - } - - log.Printf("[DEBUG] AutoScaling Group destroy: %v", d.Id()) - deleteopts := autoscaling.DeleteAutoScalingGroupInput{ - AutoScalingGroupName: aws.String(d.Id()), - ForceDelete: aws.Bool(d.Get("force_delete").(bool)), - } - - // We retry the delete operation to handle InUse/InProgress errors coming - // from scaling operations. We should be able to sneak in a delete in between - // scaling operations within 5m. - err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { - if _, err := conn.DeleteAutoScalingGroup(&deleteopts); err != nil { - if awserr, ok := err.(awserr.Error); ok { - switch awserr.Code() { - case "InvalidGroup.NotFound": - // Already gone? Sure! - return nil - case "ResourceInUse", "ScalingActivityInProgress": - // These are retryable - return resource.RetryableError(awserr) - } - } - // Didn't recognize the error, so shouldn't retry. - return resource.NonRetryableError(err) - } - // Successful delete - return nil - }) - if err != nil { - return err - } - - return resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { - if g, _ = getAwsAutoscalingGroup(d.Id(), conn); g != nil { - return resource.RetryableError( - fmt.Errorf("Auto Scaling Group still exists")) - } - return nil - }) -} - -func getAwsAutoscalingGroup( - asgName string, - conn *autoscaling.AutoScaling) (*autoscaling.Group, error) { - - describeOpts := autoscaling.DescribeAutoScalingGroupsInput{ - AutoScalingGroupNames: []*string{aws.String(asgName)}, - } - - log.Printf("[DEBUG] AutoScaling Group describe configuration: %#v", describeOpts) - describeGroups, err := conn.DescribeAutoScalingGroups(&describeOpts) - if err != nil { - autoscalingerr, ok := err.(awserr.Error) - if ok && autoscalingerr.Code() == "InvalidGroup.NotFound" { - return nil, nil - } - - return nil, fmt.Errorf("Error retrieving AutoScaling groups: %s", err) - } - - // Search for the autoscaling group - for idx, asc := range describeGroups.AutoScalingGroups { - if *asc.AutoScalingGroupName == asgName { - return describeGroups.AutoScalingGroups[idx], nil - } - } - - return nil, nil -} - -func resourceAwsAutoscalingGroupDrain(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).autoscalingconn - - if d.Get("force_delete").(bool) { - log.Printf("[DEBUG] Skipping ASG drain, force_delete was set.") - return nil - } - - // First, set the capacity to zero so the group will drain - log.Printf("[DEBUG] Reducing autoscaling group capacity to zero") - opts := autoscaling.UpdateAutoScalingGroupInput{ - AutoScalingGroupName: aws.String(d.Id()), - DesiredCapacity: aws.Int64(0), - MinSize: aws.Int64(0), - MaxSize: aws.Int64(0), - } - if _, err := conn.UpdateAutoScalingGroup(&opts); err != nil { - return fmt.Errorf("Error setting capacity to zero to drain: %s", err) - } - - // Next, wait for the autoscale group to drain - log.Printf("[DEBUG] Waiting for group to have zero instances") - return resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { - g, err := getAwsAutoscalingGroup(d.Id(), conn) - if err != nil { - return resource.NonRetryableError(err) - } - if g == nil { - log.Printf("[WARN] Autoscaling Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if len(g.Instances) == 0 { - return nil - } - - return resource.RetryableError( - fmt.Errorf("group still has %d instances", len(g.Instances))) - }) -} - -func enableASGSuspendedProcesses(d *schema.ResourceData, conn *autoscaling.AutoScaling) error { - props := &autoscaling.ScalingProcessQuery{ - AutoScalingGroupName: aws.String(d.Id()), - ScalingProcesses: expandStringList(d.Get("suspended_processes").(*schema.Set).List()), - } - - _, err := conn.SuspendProcesses(props) - return err -} - -func enableASGMetricsCollection(d *schema.ResourceData, conn *autoscaling.AutoScaling) error { - props := &autoscaling.EnableMetricsCollectionInput{ - AutoScalingGroupName: aws.String(d.Id()), - Granularity: aws.String(d.Get("metrics_granularity").(string)), - Metrics: expandStringList(d.Get("enabled_metrics").(*schema.Set).List()), - } - - log.Printf("[INFO] Enabling metrics collection for the ASG: %s", d.Id()) - _, metricsErr := conn.EnableMetricsCollection(props) - return metricsErr - -} - -func updateASGSuspendedProcesses(d *schema.ResourceData, conn *autoscaling.AutoScaling) error { - o, n := d.GetChange("suspended_processes") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - resumeProcesses := os.Difference(ns) - if resumeProcesses.Len() != 0 { - props := &autoscaling.ScalingProcessQuery{ - AutoScalingGroupName: aws.String(d.Id()), - ScalingProcesses: expandStringList(resumeProcesses.List()), - } - - _, err := conn.ResumeProcesses(props) - if err != nil { - return fmt.Errorf("Error Resuming Processes for ASG %q: %s", d.Id(), err) - } - } - - suspendedProcesses := ns.Difference(os) - if suspendedProcesses.Len() != 0 { - props := &autoscaling.ScalingProcessQuery{ - AutoScalingGroupName: aws.String(d.Id()), - ScalingProcesses: expandStringList(suspendedProcesses.List()), - } - - _, err := conn.SuspendProcesses(props) - if err != nil { - return fmt.Errorf("Error Suspending Processes for ASG %q: %s", d.Id(), err) - } - } - - return nil - -} - -func updateASGMetricsCollection(d *schema.ResourceData, conn *autoscaling.AutoScaling) error { - - o, n := d.GetChange("enabled_metrics") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - disableMetrics := os.Difference(ns) - if disableMetrics.Len() != 0 { - props := &autoscaling.DisableMetricsCollectionInput{ - AutoScalingGroupName: aws.String(d.Id()), - Metrics: expandStringList(disableMetrics.List()), - } - - _, err := conn.DisableMetricsCollection(props) - if err != nil { - return fmt.Errorf("Failure to Disable metrics collection types for ASG %s: %s", d.Id(), err) - } - } - - enabledMetrics := ns.Difference(os) - if enabledMetrics.Len() != 0 { - props := &autoscaling.EnableMetricsCollectionInput{ - AutoScalingGroupName: aws.String(d.Id()), - Metrics: expandStringList(enabledMetrics.List()), - Granularity: aws.String(d.Get("metrics_granularity").(string)), - } - - _, err := conn.EnableMetricsCollection(props) - if err != nil { - return fmt.Errorf("Failure to Enable metrics collection types for ASG %s: %s", d.Id(), err) - } - } - - return nil -} - -// getELBInstanceStates returns a mapping of the instance states of all the ELBs attached to the -// provided ASG. -// -// Note that this is the instance state function for ELB Classic. -// -// Nested like: lbName -> instanceId -> instanceState -func getELBInstanceStates(g *autoscaling.Group, meta interface{}) (map[string]map[string]string, error) { - lbInstanceStates := make(map[string]map[string]string) - elbconn := meta.(*AWSClient).elbconn - - for _, lbName := range g.LoadBalancerNames { - lbInstanceStates[*lbName] = make(map[string]string) - opts := &elb.DescribeInstanceHealthInput{LoadBalancerName: lbName} - r, err := elbconn.DescribeInstanceHealth(opts) - if err != nil { - return nil, err - } - for _, is := range r.InstanceStates { - if is.InstanceId == nil || is.State == nil { - continue - } - lbInstanceStates[*lbName][*is.InstanceId] = *is.State - } - } - - return lbInstanceStates, nil -} - -// getTargetGroupInstanceStates returns a mapping of the instance states of -// all the ALB target groups attached to the provided ASG. -// -// Note that this is the instance state function for Application Load -// Balancing (aka ELBv2). -// -// Nested like: targetGroupARN -> instanceId -> instanceState -func getTargetGroupInstanceStates(g *autoscaling.Group, meta interface{}) (map[string]map[string]string, error) { - targetInstanceStates := make(map[string]map[string]string) - elbv2conn := meta.(*AWSClient).elbv2conn - - for _, targetGroupARN := range g.TargetGroupARNs { - targetInstanceStates[*targetGroupARN] = make(map[string]string) - opts := &elbv2.DescribeTargetHealthInput{TargetGroupArn: targetGroupARN} - r, err := elbv2conn.DescribeTargetHealth(opts) - if err != nil { - return nil, err - } - for _, desc := range r.TargetHealthDescriptions { - if desc.Target == nil || desc.Target.Id == nil || desc.TargetHealth == nil || desc.TargetHealth.State == nil { - continue - } - targetInstanceStates[*targetGroupARN][*desc.Target.Id] = *desc.TargetHealth.State - } - } - - return targetInstanceStates, nil -} - -func expandVpcZoneIdentifiers(list []interface{}) *string { - strs := make([]string, len(list)) - for _, s := range list { - strs = append(strs, s.(string)) - } - return aws.String(strings.Join(strs, ",")) -} - -func expandAutoScalingInstancesDistribution(l []interface{}) *autoscaling.InstancesDistribution { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - instancesDistribution := &autoscaling.InstancesDistribution{} - - if v, ok := m["on_demand_allocation_strategy"]; ok && v.(string) != "" { - instancesDistribution.OnDemandAllocationStrategy = aws.String(v.(string)) - } - - if v, ok := m["on_demand_base_capacity"]; ok && v.(int) != 0 { - instancesDistribution.OnDemandBaseCapacity = aws.Int64(int64(v.(int))) - } - - if v, ok := m["on_demand_percentage_above_base_capacity"]; ok { - instancesDistribution.OnDemandPercentageAboveBaseCapacity = aws.Int64(int64(v.(int))) - } - - if v, ok := m["spot_allocation_strategy"]; ok && v.(string) != "" { - instancesDistribution.SpotAllocationStrategy = aws.String(v.(string)) - } - - if v, ok := m["spot_instance_pools"]; ok && v.(int) != 0 { - instancesDistribution.SpotInstancePools = aws.Int64(int64(v.(int))) - } - - if v, ok := m["spot_max_price"]; ok && v.(string) != "" { - instancesDistribution.SpotMaxPrice = aws.String(v.(string)) - } - - return instancesDistribution -} - -func expandAutoScalingLaunchTemplate(l []interface{}) *autoscaling.LaunchTemplate { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - launchTemplate := &autoscaling.LaunchTemplate{ - LaunchTemplateSpecification: expandAutoScalingLaunchTemplateSpecification(m["launch_template_specification"].([]interface{})), - } - - if v, ok := m["override"]; ok { - launchTemplate.Overrides = expandAutoScalingLaunchTemplateOverrides(v.([]interface{})) - } - - return launchTemplate -} - -func expandAutoScalingLaunchTemplateOverrides(l []interface{}) []*autoscaling.LaunchTemplateOverrides { - if len(l) == 0 { - return nil - } - - launchTemplateOverrides := make([]*autoscaling.LaunchTemplateOverrides, len(l)) - for i, m := range l { - if m == nil { - launchTemplateOverrides[i] = &autoscaling.LaunchTemplateOverrides{} - continue - } - - launchTemplateOverrides[i] = expandAutoScalingLaunchTemplateOverride(m.(map[string]interface{})) - } - return launchTemplateOverrides -} - -func expandAutoScalingLaunchTemplateOverride(m map[string]interface{}) *autoscaling.LaunchTemplateOverrides { - launchTemplateOverrides := &autoscaling.LaunchTemplateOverrides{} - - if v, ok := m["instance_type"]; ok && v.(string) != "" { - launchTemplateOverrides.InstanceType = aws.String(v.(string)) - } - - return launchTemplateOverrides -} - -func expandAutoScalingLaunchTemplateSpecification(l []interface{}) *autoscaling.LaunchTemplateSpecification { - launchTemplateSpecification := &autoscaling.LaunchTemplateSpecification{} - - if len(l) == 0 || l[0] == nil { - return launchTemplateSpecification - } - - m := l[0].(map[string]interface{}) - - if v, ok := m["launch_template_id"]; ok && v.(string) != "" { - launchTemplateSpecification.LaunchTemplateId = aws.String(v.(string)) - } - - // API returns both ID and name, which Terraform saves to state. Next update returns: - // ValidationError: Valid requests must contain either launchTemplateId or LaunchTemplateName - // Prefer the ID if we have both. - if v, ok := m["launch_template_name"]; ok && v.(string) != "" && launchTemplateSpecification.LaunchTemplateId == nil { - launchTemplateSpecification.LaunchTemplateName = aws.String(v.(string)) - } - - if v, ok := m["version"]; ok && v.(string) != "" { - launchTemplateSpecification.Version = aws.String(v.(string)) - } - - return launchTemplateSpecification -} - -func expandAutoScalingMixedInstancesPolicy(l []interface{}) *autoscaling.MixedInstancesPolicy { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - mixedInstancesPolicy := &autoscaling.MixedInstancesPolicy{ - LaunchTemplate: expandAutoScalingLaunchTemplate(m["launch_template"].([]interface{})), - } - - if v, ok := m["instances_distribution"]; ok { - mixedInstancesPolicy.InstancesDistribution = expandAutoScalingInstancesDistribution(v.([]interface{})) - } - - return mixedInstancesPolicy -} - -func flattenAutoScalingInstancesDistribution(instancesDistribution *autoscaling.InstancesDistribution) []interface{} { - if instancesDistribution == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "on_demand_allocation_strategy": aws.StringValue(instancesDistribution.OnDemandAllocationStrategy), - "on_demand_base_capacity": aws.Int64Value(instancesDistribution.OnDemandBaseCapacity), - "on_demand_percentage_above_base_capacity": aws.Int64Value(instancesDistribution.OnDemandPercentageAboveBaseCapacity), - "spot_allocation_strategy": aws.StringValue(instancesDistribution.SpotAllocationStrategy), - "spot_instance_pools": aws.Int64Value(instancesDistribution.SpotInstancePools), - "spot_max_price": aws.StringValue(instancesDistribution.SpotMaxPrice), - } - - return []interface{}{m} -} - -func flattenAutoScalingLaunchTemplate(launchTemplate *autoscaling.LaunchTemplate) []interface{} { - if launchTemplate == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "launch_template_specification": flattenAutoScalingLaunchTemplateSpecification(launchTemplate.LaunchTemplateSpecification), - "override": flattenAutoScalingLaunchTemplateOverrides(launchTemplate.Overrides), - } - - return []interface{}{m} -} - -func flattenAutoScalingLaunchTemplateOverrides(launchTemplateOverrides []*autoscaling.LaunchTemplateOverrides) []interface{} { - l := make([]interface{}, len(launchTemplateOverrides)) - - for i, launchTemplateOverride := range launchTemplateOverrides { - if launchTemplateOverride == nil { - l[i] = map[string]interface{}{} - continue - } - m := map[string]interface{}{ - "instance_type": aws.StringValue(launchTemplateOverride.InstanceType), - } - l[i] = m - } - - return l -} - -func flattenAutoScalingLaunchTemplateSpecification(launchTemplateSpecification *autoscaling.LaunchTemplateSpecification) []interface{} { - if launchTemplateSpecification == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "launch_template_id": aws.StringValue(launchTemplateSpecification.LaunchTemplateId), - "launch_template_name": aws.StringValue(launchTemplateSpecification.LaunchTemplateName), - "version": aws.StringValue(launchTemplateSpecification.Version), - } - - return []interface{}{m} -} - -func flattenAutoScalingMixedInstancesPolicy(mixedInstancesPolicy *autoscaling.MixedInstancesPolicy) []interface{} { - if mixedInstancesPolicy == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "instances_distribution": flattenAutoScalingInstancesDistribution(mixedInstancesPolicy.InstancesDistribution), - "launch_template": flattenAutoScalingLaunchTemplate(mixedInstancesPolicy.LaunchTemplate), - } - - return []interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group_waiting.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group_waiting.go deleted file mode 100644 index 404d845fe..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group_waiting.go +++ /dev/null @@ -1,167 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -// waitForASGCapacityTimeout gathers the current numbers of healthy instances -// in the ASG and its attached ELBs and yields these numbers to a -// capacitySatifiedFunction. Loops for up to wait_for_capacity_timeout until -// the capacitySatisfiedFunc returns true. -// -// See "Waiting for Capacity" in docs for more discussion of the feature. -func waitForASGCapacity( - d *schema.ResourceData, - meta interface{}, - satisfiedFunc capacitySatisfiedFunc) error { - wait, err := time.ParseDuration(d.Get("wait_for_capacity_timeout").(string)) - if err != nil { - return err - } - - if wait == 0 { - log.Printf("[DEBUG] Capacity timeout set to 0, skipping capacity waiting.") - return nil - } - - log.Printf("[DEBUG] Waiting on %s for capacity...", d.Id()) - - err = resource.Retry(wait, func() *resource.RetryError { - g, err := getAwsAutoscalingGroup(d.Id(), meta.(*AWSClient).autoscalingconn) - if err != nil { - return resource.NonRetryableError(err) - } - if g == nil { - log.Printf("[WARN] Autoscaling Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - elbis, err := getELBInstanceStates(g, meta) - if err != nil { - return resource.NonRetryableError(err) - } - albis, err := getTargetGroupInstanceStates(g, meta) - if err != nil { - return resource.NonRetryableError(err) - } - - haveASG := 0 - haveELB := 0 - - for _, i := range g.Instances { - if i.HealthStatus == nil || i.InstanceId == nil || i.LifecycleState == nil { - continue - } - - if !strings.EqualFold(*i.HealthStatus, "Healthy") { - continue - } - - if !strings.EqualFold(*i.LifecycleState, "InService") { - continue - } - - haveASG++ - - inAllLbs := true - for _, states := range elbis { - state, ok := states[*i.InstanceId] - if !ok || !strings.EqualFold(state, "InService") { - inAllLbs = false - } - } - for _, states := range albis { - state, ok := states[*i.InstanceId] - if !ok || !strings.EqualFold(state, "healthy") { - inAllLbs = false - } - } - if inAllLbs { - haveELB++ - } - } - - satisfied, reason := satisfiedFunc(d, haveASG, haveELB) - - log.Printf("[DEBUG] %q Capacity: %d ASG, %d ELB/ALB, satisfied: %t, reason: %q", - d.Id(), haveASG, haveELB, satisfied, reason) - - if satisfied { - return nil - } - - return resource.RetryableError( - fmt.Errorf("%q: Waiting up to %s: %s", d.Id(), wait, reason)) - }) - - if err == nil { - return nil - } - - recentStatus := "" - - conn := meta.(*AWSClient).autoscalingconn - resp, aErr := conn.DescribeScalingActivities(&autoscaling.DescribeScalingActivitiesInput{ - AutoScalingGroupName: aws.String(d.Id()), - MaxRecords: aws.Int64(1), - }) - if aErr == nil { - if len(resp.Activities) > 0 { - recentStatus = (resp.Activities[0].String()) - } else { - recentStatus = "(0 activities found)" - } - } else { - recentStatus = fmt.Sprintf("(Failed to describe scaling activities: %s)", aErr) - } - - return fmt.Errorf("%s. Most recent activity: %s", err, recentStatus) -} - -type capacitySatisfiedFunc func(*schema.ResourceData, int, int) (bool, string) - -// capacitySatisfiedCreate treats all targets as minimums -func capacitySatisfiedCreate(d *schema.ResourceData, haveASG, haveELB int) (bool, string) { - minASG := d.Get("min_size").(int) - if wantASG := d.Get("desired_capacity").(int); wantASG > 0 { - minASG = wantASG - } - if haveASG < minASG { - return false, fmt.Sprintf( - "Need at least %d healthy instances in ASG, have %d", minASG, haveASG) - } - minELB := d.Get("min_elb_capacity").(int) - if wantELB := d.Get("wait_for_elb_capacity").(int); wantELB > 0 { - minELB = wantELB - } - if haveELB < minELB { - return false, fmt.Sprintf( - "Need at least %d healthy instances in ELB, have %d", minELB, haveELB) - } - return true, "" -} - -// capacitySatisfiedUpdate only cares about specific targets -func capacitySatisfiedUpdate(d *schema.ResourceData, haveASG, haveELB int) (bool, string) { - if wantASG := d.Get("desired_capacity").(int); wantASG > 0 { - if haveASG != wantASG { - return false, fmt.Sprintf( - "Need exactly %d healthy instances in ASG, have %d", wantASG, haveASG) - } - } - if wantELB := d.Get("wait_for_elb_capacity").(int); wantELB > 0 { - if haveELB != wantELB { - return false, fmt.Sprintf( - "Need exactly %d healthy instances in ELB, have %d", wantELB, haveELB) - } - } - return true, "" -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_lifecycle_hook.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_lifecycle_hook.go deleted file mode 100644 index 500924eac..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_lifecycle_hook.go +++ /dev/null @@ -1,194 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsAutoscalingLifecycleHook() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAutoscalingLifecycleHookPut, - Read: resourceAwsAutoscalingLifecycleHookRead, - Update: resourceAwsAutoscalingLifecycleHookPut, - Delete: resourceAwsAutoscalingLifecycleHookDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "autoscaling_group_name": { - Type: schema.TypeString, - Required: true, - }, - "default_result": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "heartbeat_timeout": { - Type: schema.TypeInt, - Optional: true, - }, - "lifecycle_transition": { - Type: schema.TypeString, - Required: true, - }, - "notification_metadata": { - Type: schema.TypeString, - Optional: true, - }, - "notification_target_arn": { - Type: schema.TypeString, - Optional: true, - }, - "role_arn": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsAutoscalingLifecycleHookPutOp(conn *autoscaling.AutoScaling, params *autoscaling.PutLifecycleHookInput) error { - log.Printf("[DEBUG] AutoScaling PutLifecyleHook: %s", params) - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.PutLifecycleHook(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if strings.Contains(awsErr.Message(), "Unable to publish test message to notification target") { - return resource.RetryableError(fmt.Errorf("Retrying AWS AutoScaling Lifecycle Hook: %s", awsErr)) - } - } - return resource.NonRetryableError(fmt.Errorf("Error putting lifecycle hook: %s", err)) - } - return nil - }) -} - -func resourceAwsAutoscalingLifecycleHookPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).autoscalingconn - params := getAwsAutoscalingPutLifecycleHookInput(d) - - if err := resourceAwsAutoscalingLifecycleHookPutOp(conn, ¶ms); err != nil { - return err - } - - d.SetId(d.Get("name").(string)) - - return resourceAwsAutoscalingLifecycleHookRead(d, meta) -} - -func resourceAwsAutoscalingLifecycleHookRead(d *schema.ResourceData, meta interface{}) error { - p, err := getAwsAutoscalingLifecycleHook(d, meta) - if err != nil { - return err - } - if p == nil { - log.Printf("[WARN] Autoscaling Lifecycle Hook (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - log.Printf("[DEBUG] Read Lifecycle Hook: ASG: %s, SH: %s, Obj: %#v", d.Get("autoscaling_group_name"), d.Get("name"), p) - - d.Set("default_result", p.DefaultResult) - d.Set("heartbeat_timeout", p.HeartbeatTimeout) - d.Set("lifecycle_transition", p.LifecycleTransition) - d.Set("notification_metadata", p.NotificationMetadata) - d.Set("notification_target_arn", p.NotificationTargetARN) - d.Set("name", p.LifecycleHookName) - d.Set("role_arn", p.RoleARN) - - return nil -} - -func resourceAwsAutoscalingLifecycleHookDelete(d *schema.ResourceData, meta interface{}) error { - autoscalingconn := meta.(*AWSClient).autoscalingconn - p, err := getAwsAutoscalingLifecycleHook(d, meta) - if err != nil { - return err - } - if p == nil { - return nil - } - - params := autoscaling.DeleteLifecycleHookInput{ - AutoScalingGroupName: aws.String(d.Get("autoscaling_group_name").(string)), - LifecycleHookName: aws.String(d.Get("name").(string)), - } - if _, err := autoscalingconn.DeleteLifecycleHook(¶ms); err != nil { - return fmt.Errorf("Autoscaling Lifecycle Hook: %s", err) - } - - return nil -} - -func getAwsAutoscalingPutLifecycleHookInput(d *schema.ResourceData) autoscaling.PutLifecycleHookInput { - var params = autoscaling.PutLifecycleHookInput{ - AutoScalingGroupName: aws.String(d.Get("autoscaling_group_name").(string)), - LifecycleHookName: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("default_result"); ok { - params.DefaultResult = aws.String(v.(string)) - } - - if v, ok := d.GetOk("heartbeat_timeout"); ok { - params.HeartbeatTimeout = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("lifecycle_transition"); ok { - params.LifecycleTransition = aws.String(v.(string)) - } - - if v, ok := d.GetOk("notification_metadata"); ok { - params.NotificationMetadata = aws.String(v.(string)) - } - - if v, ok := d.GetOk("notification_target_arn"); ok { - params.NotificationTargetARN = aws.String(v.(string)) - } - - if v, ok := d.GetOk("role_arn"); ok { - params.RoleARN = aws.String(v.(string)) - } - - return params -} - -func getAwsAutoscalingLifecycleHook(d *schema.ResourceData, meta interface{}) (*autoscaling.LifecycleHook, error) { - autoscalingconn := meta.(*AWSClient).autoscalingconn - - params := autoscaling.DescribeLifecycleHooksInput{ - AutoScalingGroupName: aws.String(d.Get("autoscaling_group_name").(string)), - LifecycleHookNames: []*string{aws.String(d.Get("name").(string))}, - } - - log.Printf("[DEBUG] AutoScaling Lifecycle Hook Describe Params: %#v", params) - resp, err := autoscalingconn.DescribeLifecycleHooks(¶ms) - if err != nil { - return nil, fmt.Errorf("Error retrieving lifecycle hooks: %s", err) - } - - // find lifecycle hooks - name := d.Get("name") - for idx, sp := range resp.LifecycleHooks { - if *sp.LifecycleHookName == name { - return resp.LifecycleHooks[idx], nil - } - } - - // lifecycle hook not found - return nil, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_notification.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_notification.go deleted file mode 100644 index 7b2108254..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_notification.go +++ /dev/null @@ -1,208 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsAutoscalingNotification() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAutoscalingNotificationCreate, - Read: resourceAwsAutoscalingNotificationRead, - Update: resourceAwsAutoscalingNotificationUpdate, - Delete: resourceAwsAutoscalingNotificationDelete, - - Schema: map[string]*schema.Schema{ - "topic_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "group_names": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "notifications": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - } -} - -func resourceAwsAutoscalingNotificationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).autoscalingconn - gl := convertSetToList(d.Get("group_names").(*schema.Set)) - nl := convertSetToList(d.Get("notifications").(*schema.Set)) - - topic := d.Get("topic_arn").(string) - if err := addNotificationConfigToGroupsWithTopic(conn, gl, nl, topic); err != nil { - return err - } - - // ARNs are unique, and these notifications are per ARN, so we re-use the ARN - // here as the ID - d.SetId(topic) - return resourceAwsAutoscalingNotificationRead(d, meta) -} - -func resourceAwsAutoscalingNotificationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).autoscalingconn - gl := convertSetToList(d.Get("group_names").(*schema.Set)) - - opts := &autoscaling.DescribeNotificationConfigurationsInput{ - AutoScalingGroupNames: gl, - } - - topic := d.Get("topic_arn").(string) - // Grab all applicable notifcation configurations for this Topic. - // Each NotificationType will have a record, so 1 Group with 3 Types results - // in 3 records, all with the same Group name - gRaw := make(map[string]bool) - nRaw := make(map[string]bool) - - i := 0 - err := conn.DescribeNotificationConfigurationsPages(opts, func(resp *autoscaling.DescribeNotificationConfigurationsOutput, lastPage bool) bool { - if resp != nil { - i++ - log.Printf("[DEBUG] Paging DescribeNotificationConfigurations for (%s), page: %d", d.Id(), i) - } else { - log.Printf("[DEBUG] Paging finished for DescribeNotificationConfigurations (%s)", d.Id()) - } - - for _, n := range resp.NotificationConfigurations { - if *n.TopicARN == topic { - gRaw[*n.AutoScalingGroupName] = true - nRaw[*n.NotificationType] = true - } - } - return true // return false to stop paging - }) - if err != nil { - return err - } - - // Grab the keys here as the list of Groups - var gList []string - for k := range gRaw { - gList = append(gList, k) - } - - // Grab the keys here as the list of Types - var nList []string - for k := range nRaw { - nList = append(nList, k) - } - - if err := d.Set("group_names", gList); err != nil { - return err - } - if err := d.Set("notifications", nList); err != nil { - return err - } - - return nil -} - -func resourceAwsAutoscalingNotificationUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).autoscalingconn - - // Notifications API call is a PUT, so we don't need to diff the list, just - // push whatever it is and AWS sorts it out - nl := convertSetToList(d.Get("notifications").(*schema.Set)) - - o, n := d.GetChange("group_names") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - remove := convertSetToList(os.Difference(ns)) - add := convertSetToList(ns.Difference(os)) - - topic := d.Get("topic_arn").(string) - - if err := removeNotificationConfigToGroupsWithTopic(conn, remove, topic); err != nil { - return err - } - - var update []*string - if d.HasChange("notifications") { - update = convertSetToList(d.Get("group_names").(*schema.Set)) - } else { - update = add - } - - if err := addNotificationConfigToGroupsWithTopic(conn, update, nl, topic); err != nil { - return err - } - - return resourceAwsAutoscalingNotificationRead(d, meta) -} - -func addNotificationConfigToGroupsWithTopic(conn *autoscaling.AutoScaling, groups []*string, nl []*string, topic string) error { - for _, a := range groups { - opts := &autoscaling.PutNotificationConfigurationInput{ - AutoScalingGroupName: a, - NotificationTypes: nl, - TopicARN: aws.String(topic), - } - - _, err := conn.PutNotificationConfiguration(opts) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - return fmt.Errorf("Error creating Autoscaling Group Notification for Group %s, error: \"%s\", code: \"%s\"", *a, awsErr.Message(), awsErr.Code()) - } - return err - } - } - return nil -} - -func removeNotificationConfigToGroupsWithTopic(conn *autoscaling.AutoScaling, groups []*string, topic string) error { - for _, r := range groups { - opts := &autoscaling.DeleteNotificationConfigurationInput{ - AutoScalingGroupName: r, - TopicARN: aws.String(topic), - } - - _, err := conn.DeleteNotificationConfiguration(opts) - if err != nil { - return fmt.Errorf("Error deleting notification configuration for ASG \"%s\", Topic ARN \"%s\"", *r, topic) - } - } - return nil -} - -func resourceAwsAutoscalingNotificationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).autoscalingconn - gl := convertSetToList(d.Get("group_names").(*schema.Set)) - - topic := d.Get("topic_arn").(string) - err := removeNotificationConfigToGroupsWithTopic(conn, gl, topic) - return err -} - -func convertSetToList(s *schema.Set) (nl []*string) { - l := s.List() - for _, n := range l { - nl = append(nl, aws.String(n.(string))) - } - - return nl -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go deleted file mode 100644 index 2eabb90a7..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go +++ /dev/null @@ -1,531 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsAutoscalingPolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAutoscalingPolicyCreate, - Read: resourceAwsAutoscalingPolicyRead, - Update: resourceAwsAutoscalingPolicyUpdate, - Delete: resourceAwsAutoscalingPolicyDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsAutoscalingPolicyImport, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "adjustment_type": { - Type: schema.TypeString, - Optional: true, - }, - "autoscaling_group_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "policy_type": { - Type: schema.TypeString, - Optional: true, - Default: "SimpleScaling", // preserve AWS's default to make validation easier. - ValidateFunc: validation.StringInSlice([]string{ - "SimpleScaling", - "StepScaling", - "TargetTrackingScaling", - }, false), - }, - "cooldown": { - Type: schema.TypeInt, - Optional: true, - }, - "estimated_instance_warmup": { - Type: schema.TypeInt, - Optional: true, - }, - "metric_aggregation_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "min_adjustment_magnitude": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(1), - }, - "min_adjustment_step": { - Type: schema.TypeInt, - Optional: true, - Deprecated: "Use min_adjustment_magnitude instead, otherwise you may see a perpetual diff on this resource.", - ConflictsWith: []string{"min_adjustment_magnitude"}, - }, - "scaling_adjustment": { - Type: schema.TypeInt, - Optional: true, - ConflictsWith: []string{"step_adjustment"}, - }, - "step_adjustment": { - Type: schema.TypeSet, - Optional: true, - ConflictsWith: []string{"scaling_adjustment"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "metric_interval_lower_bound": { - Type: schema.TypeString, - Optional: true, - }, - "metric_interval_upper_bound": { - Type: schema.TypeString, - Optional: true, - }, - "scaling_adjustment": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - Set: resourceAwsAutoscalingScalingAdjustmentHash, - }, - "target_tracking_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "predefined_metric_specification": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{"target_tracking_configuration.0.customized_metric_specification"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "predefined_metric_type": { - Type: schema.TypeString, - Required: true, - }, - "resource_label": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "customized_metric_specification": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{"target_tracking_configuration.0.predefined_metric_specification"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "metric_dimension": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "metric_name": { - Type: schema.TypeString, - Required: true, - }, - "namespace": { - Type: schema.TypeString, - Required: true, - }, - "statistic": { - Type: schema.TypeString, - Required: true, - }, - "unit": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "target_value": { - Type: schema.TypeFloat, - Required: true, - }, - "disable_scale_in": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - }, - }, - } -} - -func resourceAwsAutoscalingPolicyCreate(d *schema.ResourceData, meta interface{}) error { - autoscalingconn := meta.(*AWSClient).autoscalingconn - - params, err := getAwsAutoscalingPutScalingPolicyInput(d) - log.Printf("[DEBUG] AutoScaling PutScalingPolicy on Create: %#v", params) - if err != nil { - return err - } - - resp, err := autoscalingconn.PutScalingPolicy(¶ms) - if err != nil { - return fmt.Errorf("Error putting scaling policy: %s", err) - } - - d.Set("arn", resp.PolicyARN) - d.SetId(d.Get("name").(string)) - log.Printf("[INFO] AutoScaling Scaling PolicyARN: %s", d.Get("arn").(string)) - - return resourceAwsAutoscalingPolicyRead(d, meta) -} - -func resourceAwsAutoscalingPolicyRead(d *schema.ResourceData, meta interface{}) error { - p, err := getAwsAutoscalingPolicy(d, meta) - if err != nil { - return err - } - if p == nil { - log.Printf("[WARN] Autoscaling Policy (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - log.Printf("[DEBUG] Read Scaling Policy: ASG: %s, SP: %s, Obj: %s", d.Get("autoscaling_group_name"), d.Get("name"), p) - - d.Set("adjustment_type", p.AdjustmentType) - d.Set("autoscaling_group_name", p.AutoScalingGroupName) - d.Set("cooldown", p.Cooldown) - d.Set("estimated_instance_warmup", p.EstimatedInstanceWarmup) - d.Set("metric_aggregation_type", p.MetricAggregationType) - d.Set("policy_type", p.PolicyType) - if p.MinAdjustmentMagnitude != nil { - d.Set("min_adjustment_magnitude", p.MinAdjustmentMagnitude) - d.Set("min_adjustment_step", 0) - } else { - d.Set("min_adjustment_step", p.MinAdjustmentStep) - } - d.Set("arn", p.PolicyARN) - d.Set("name", p.PolicyName) - d.Set("scaling_adjustment", p.ScalingAdjustment) - if err := d.Set("step_adjustment", flattenStepAdjustments(p.StepAdjustments)); err != nil { - return fmt.Errorf("error setting step_adjustment: %s", err) - } - if err := d.Set("target_tracking_configuration", flattenTargetTrackingConfiguration(p.TargetTrackingConfiguration)); err != nil { - return fmt.Errorf("error setting target_tracking_configuration: %s", err) - } - - return nil -} - -func resourceAwsAutoscalingPolicyUpdate(d *schema.ResourceData, meta interface{}) error { - autoscalingconn := meta.(*AWSClient).autoscalingconn - - params, inputErr := getAwsAutoscalingPutScalingPolicyInput(d) - log.Printf("[DEBUG] AutoScaling PutScalingPolicy on Update: %#v", params) - if inputErr != nil { - return inputErr - } - - _, err := autoscalingconn.PutScalingPolicy(¶ms) - if err != nil { - return err - } - - return resourceAwsAutoscalingPolicyRead(d, meta) -} - -func resourceAwsAutoscalingPolicyDelete(d *schema.ResourceData, meta interface{}) error { - autoscalingconn := meta.(*AWSClient).autoscalingconn - p, err := getAwsAutoscalingPolicy(d, meta) - if err != nil { - return err - } - if p == nil { - return nil - } - - params := autoscaling.DeletePolicyInput{ - AutoScalingGroupName: aws.String(d.Get("autoscaling_group_name").(string)), - PolicyName: aws.String(d.Get("name").(string)), - } - log.Printf("[DEBUG] Deleting Autoscaling Policy opts: %s", params) - if _, err := autoscalingconn.DeletePolicy(¶ms); err != nil { - return fmt.Errorf("Autoscaling Scaling Policy: %s ", err) - } - - return nil -} - -func resourceAwsAutoscalingPolicyImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.SplitN(d.Id(), "/", 2) - if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { - return nil, fmt.Errorf("unexpected format (%q), expected /", d.Id()) - } - - asgName := idParts[0] - policyName := idParts[1] - - d.Set("name", policyName) - d.Set("autoscaling_group_name", asgName) - d.SetId(policyName) - - return []*schema.ResourceData{d}, nil -} - -// PutScalingPolicy can safely resend all parameters without destroying the -// resource, so create and update can share this common function. It will error -// if certain mutually exclusive values are set. -func getAwsAutoscalingPutScalingPolicyInput(d *schema.ResourceData) (autoscaling.PutScalingPolicyInput, error) { - var params = autoscaling.PutScalingPolicyInput{ - AutoScalingGroupName: aws.String(d.Get("autoscaling_group_name").(string)), - PolicyName: aws.String(d.Get("name").(string)), - } - - // get policy_type first as parameter support depends on policy type - policyType := d.Get("policy_type") - params.PolicyType = aws.String(policyType.(string)) - - // This parameter is supported if the policy type is SimpleScaling or StepScaling. - if v, ok := d.GetOk("adjustment_type"); ok && (policyType == "SimpleScaling" || policyType == "StepScaling") { - params.AdjustmentType = aws.String(v.(string)) - } - - // This parameter is supported if the policy type is SimpleScaling. - if v, ok := d.GetOkExists("cooldown"); ok { - // 0 is allowed as placeholder even if policyType is not supported - params.Cooldown = aws.Int64(int64(v.(int))) - if v.(int) != 0 && policyType != "SimpleScaling" { - return params, fmt.Errorf("cooldown is only supported for policy type SimpleScaling") - } - } - - // This parameter is supported if the policy type is StepScaling or TargetTrackingScaling. - if v, ok := d.GetOkExists("estimated_instance_warmup"); ok { - // 0 is NOT allowed as placeholder if policyType is not supported - if policyType == "StepScaling" || policyType == "TargetTrackingScaling" { - params.EstimatedInstanceWarmup = aws.Int64(int64(v.(int))) - } - if v.(int) != 0 && policyType != "StepScaling" && policyType != "TargetTrackingScaling" { - return params, fmt.Errorf("estimated_instance_warmup is only supported for policy type StepScaling and TargetTrackingScaling") - } - } - - // This parameter is supported if the policy type is StepScaling. - if v, ok := d.GetOk("metric_aggregation_type"); ok && policyType == "StepScaling" { - params.MetricAggregationType = aws.String(v.(string)) - } - - // MinAdjustmentMagnitude is supported if the policy type is SimpleScaling or StepScaling. - // MinAdjustmentStep is available for backward compatibility. Use MinAdjustmentMagnitude instead. - if v, ok := d.GetOkExists("min_adjustment_magnitude"); ok && v.(int) != 0 && (policyType == "SimpleScaling" || policyType == "StepScaling") { - params.MinAdjustmentMagnitude = aws.Int64(int64(v.(int))) - } else if v, ok := d.GetOkExists("min_adjustment_step"); ok && v.(int) != 0 && (policyType == "SimpleScaling" || policyType == "StepScaling") { - params.MinAdjustmentStep = aws.Int64(int64(v.(int))) - } - - // This parameter is required if the policy type is SimpleScaling and not supported otherwise. - //if policy_type=="SimpleScaling" then scaling_adjustment is required and 0 is allowed - if v, ok := d.GetOkExists("scaling_adjustment"); ok { - // 0 is NOT allowed as placeholder if policyType is not supported - if policyType == "SimpleScaling" { - params.ScalingAdjustment = aws.Int64(int64(v.(int))) - } - if v.(int) != 0 && policyType != "SimpleScaling" { - return params, fmt.Errorf("scaling_adjustment is only supported for policy type SimpleScaling") - } - } else if !ok && policyType == "SimpleScaling" { - return params, fmt.Errorf("scaling_adjustment is required for policy type SimpleScaling") - } - - // This parameter is required if the policy type is StepScaling and not supported otherwise. - if v, ok := d.GetOk("step_adjustment"); ok { - steps, err := expandStepAdjustments(v.(*schema.Set).List()) - if err != nil { - return params, fmt.Errorf("metric_interval_lower_bound and metric_interval_upper_bound must be strings!") - } - params.StepAdjustments = steps - if len(steps) != 0 && policyType != "StepScaling" { - return params, fmt.Errorf("step_adjustment is only supported for policy type StepScaling") - } - } else if !ok && policyType == "StepScaling" { - return params, fmt.Errorf("step_adjustment is required for policy type StepScaling") - } - - // This parameter is required if the policy type is TargetTrackingScaling and not supported otherwise. - if v, ok := d.GetOk("target_tracking_configuration"); ok { - params.TargetTrackingConfiguration = expandTargetTrackingConfiguration(v.([]interface{})) - if policyType != "TargetTrackingScaling" { - return params, fmt.Errorf("target_tracking_configuration is only supported for policy type TargetTrackingScaling") - } - } else if !ok && policyType == "TargetTrackingScaling" { - return params, fmt.Errorf("target_tracking_configuration is required for policy type TargetTrackingScaling") - } - - return params, nil -} - -func getAwsAutoscalingPolicy(d *schema.ResourceData, meta interface{}) (*autoscaling.ScalingPolicy, error) { - autoscalingconn := meta.(*AWSClient).autoscalingconn - - params := autoscaling.DescribePoliciesInput{ - AutoScalingGroupName: aws.String(d.Get("autoscaling_group_name").(string)), - PolicyNames: []*string{aws.String(d.Get("name").(string))}, - } - - log.Printf("[DEBUG] AutoScaling Scaling Policy Describe Params: %#v", params) - resp, err := autoscalingconn.DescribePolicies(¶ms) - if err != nil { - //A ValidationError here can mean that either the Policy is missing OR the Autoscaling Group is missing - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "ValidationError" { - log.Printf("[WARN] Autoscaling Policy (%s) not found, removing from state", d.Id()) - d.SetId("") - - return nil, nil - } - return nil, fmt.Errorf("Error retrieving scaling policies: %s", err) - } - - // find scaling policy - name := d.Get("name") - for idx, sp := range resp.ScalingPolicies { - if *sp.PolicyName == name { - return resp.ScalingPolicies[idx], nil - } - } - - // policy not found - return nil, nil -} - -func resourceAwsAutoscalingScalingAdjustmentHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - if v, ok := m["metric_interval_lower_bound"]; ok { - buf.WriteString(fmt.Sprintf("%f-", v)) - } - if v, ok := m["metric_interval_upper_bound"]; ok { - buf.WriteString(fmt.Sprintf("%f-", v)) - } - buf.WriteString(fmt.Sprintf("%d-", m["scaling_adjustment"].(int))) - - return hashcode.String(buf.String()) -} - -func expandTargetTrackingConfiguration(configs []interface{}) *autoscaling.TargetTrackingConfiguration { - if len(configs) < 1 { - return nil - } - - config := configs[0].(map[string]interface{}) - - result := &autoscaling.TargetTrackingConfiguration{} - - result.TargetValue = aws.Float64(config["target_value"].(float64)) - if v, ok := config["disable_scale_in"]; ok { - result.DisableScaleIn = aws.Bool(v.(bool)) - } - if v, ok := config["predefined_metric_specification"]; ok && len(v.([]interface{})) > 0 { - spec := v.([]interface{})[0].(map[string]interface{}) - predSpec := &autoscaling.PredefinedMetricSpecification{ - PredefinedMetricType: aws.String(spec["predefined_metric_type"].(string)), - } - if val, ok := spec["resource_label"]; ok && val.(string) != "" { - predSpec.ResourceLabel = aws.String(val.(string)) - } - result.PredefinedMetricSpecification = predSpec - } - if v, ok := config["customized_metric_specification"]; ok && len(v.([]interface{})) > 0 { - spec := v.([]interface{})[0].(map[string]interface{}) - customSpec := &autoscaling.CustomizedMetricSpecification{ - Namespace: aws.String(spec["namespace"].(string)), - MetricName: aws.String(spec["metric_name"].(string)), - Statistic: aws.String(spec["statistic"].(string)), - } - if val, ok := spec["unit"]; ok { - customSpec.Unit = aws.String(val.(string)) - } - if val, ok := spec["metric_dimension"]; ok { - dims := val.([]interface{}) - metDimList := make([]*autoscaling.MetricDimension, len(dims)) - for i := range metDimList { - dim := dims[i].(map[string]interface{}) - md := &autoscaling.MetricDimension{ - Name: aws.String(dim["name"].(string)), - Value: aws.String(dim["value"].(string)), - } - metDimList[i] = md - } - customSpec.Dimensions = metDimList - } - result.CustomizedMetricSpecification = customSpec - } - return result -} - -func flattenTargetTrackingConfiguration(config *autoscaling.TargetTrackingConfiguration) []interface{} { - if config == nil { - return []interface{}{} - } - - result := map[string]interface{}{} - result["disable_scale_in"] = *config.DisableScaleIn - result["target_value"] = *config.TargetValue - if config.PredefinedMetricSpecification != nil { - spec := map[string]interface{}{} - spec["predefined_metric_type"] = *config.PredefinedMetricSpecification.PredefinedMetricType - if config.PredefinedMetricSpecification.ResourceLabel != nil { - spec["resource_label"] = *config.PredefinedMetricSpecification.ResourceLabel - } - result["predefined_metric_specification"] = []map[string]interface{}{spec} - } - if config.CustomizedMetricSpecification != nil { - spec := map[string]interface{}{} - spec["metric_name"] = *config.CustomizedMetricSpecification.MetricName - spec["namespace"] = *config.CustomizedMetricSpecification.Namespace - spec["statistic"] = *config.CustomizedMetricSpecification.Statistic - if config.CustomizedMetricSpecification.Unit != nil { - spec["unit"] = *config.CustomizedMetricSpecification.Unit - } - if config.CustomizedMetricSpecification.Dimensions != nil { - dimSpec := make([]interface{}, len(config.CustomizedMetricSpecification.Dimensions)) - for i := range dimSpec { - dim := map[string]interface{}{} - rawDim := config.CustomizedMetricSpecification.Dimensions[i] - dim["name"] = *rawDim.Name - dim["value"] = *rawDim.Value - dimSpec[i] = dim - } - spec["metric_dimension"] = dimSpec - } - result["customized_metric_specification"] = []map[string]interface{}{spec} - } - return []interface{}{result} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_schedule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_schedule.go deleted file mode 100644 index e52b75556..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_schedule.go +++ /dev/null @@ -1,219 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/hashicorp/terraform/helper/schema" -) - -const awsAutoscalingScheduleTimeLayout = "2006-01-02T15:04:05Z" - -func resourceAwsAutoscalingSchedule() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsAutoscalingScheduleCreate, - Read: resourceAwsAutoscalingScheduleRead, - Update: resourceAwsAutoscalingScheduleCreate, - Delete: resourceAwsAutoscalingScheduleDelete, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "scheduled_action_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "autoscaling_group_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "start_time": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateASGScheduleTimestamp, - }, - "end_time": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateASGScheduleTimestamp, - }, - "recurrence": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "min_size": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - "max_size": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - "desired_capacity": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - }, - } -} - -func resourceAwsAutoscalingScheduleCreate(d *schema.ResourceData, meta interface{}) error { - autoscalingconn := meta.(*AWSClient).autoscalingconn - params := &autoscaling.PutScheduledUpdateGroupActionInput{ - AutoScalingGroupName: aws.String(d.Get("autoscaling_group_name").(string)), - ScheduledActionName: aws.String(d.Get("scheduled_action_name").(string)), - } - - if attr, ok := d.GetOk("start_time"); ok { - t, err := time.Parse(awsAutoscalingScheduleTimeLayout, attr.(string)) - if err != nil { - return fmt.Errorf("Error Parsing AWS Autoscaling Group Schedule Start Time: %s", err.Error()) - } - params.StartTime = aws.Time(t) - } - - if attr, ok := d.GetOk("end_time"); ok { - t, err := time.Parse(awsAutoscalingScheduleTimeLayout, attr.(string)) - if err != nil { - return fmt.Errorf("Error Parsing AWS Autoscaling Group Schedule End Time: %s", err.Error()) - } - params.EndTime = aws.Time(t) - } - - if attr, ok := d.GetOk("recurrence"); ok { - params.Recurrence = aws.String(attr.(string)) - } - - // Scheduled actions don't need to set all three size parameters. For example, - // you may want to change the min or max without also forcing an immediate - // resize by changing a desired_capacity that may have changed due to other - // autoscaling rules. Since Terraform doesn't have a great pattern for - // differentiating between 0 and unset fields, we accept "-1" to mean "don't - // include this parameter in the action". - minSize := int64(d.Get("min_size").(int)) - maxSize := int64(d.Get("max_size").(int)) - desiredCapacity := int64(d.Get("desired_capacity").(int)) - if minSize != -1 { - params.MinSize = aws.Int64(minSize) - } - if maxSize != -1 { - params.MaxSize = aws.Int64(maxSize) - } - if desiredCapacity != -1 { - params.DesiredCapacity = aws.Int64(desiredCapacity) - } - - log.Printf("[INFO] Creating Autoscaling Scheduled Action: %s", d.Get("scheduled_action_name").(string)) - _, err := autoscalingconn.PutScheduledUpdateGroupAction(params) - if err != nil { - return fmt.Errorf("Error Creating Autoscaling Scheduled Action: %s", err.Error()) - } - - d.SetId(d.Get("scheduled_action_name").(string)) - - return resourceAwsAutoscalingScheduleRead(d, meta) -} - -func resourceAwsAutoscalingScheduleRead(d *schema.ResourceData, meta interface{}) error { - sa, err, exists := resourceAwsASGScheduledActionRetrieve(d, meta) - if err != nil { - return err - } - - if !exists { - log.Printf("[WARN] Autoscaling Scheduled Action (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("autoscaling_group_name", sa.AutoScalingGroupName) - d.Set("arn", sa.ScheduledActionARN) - - if sa.MinSize == nil { - d.Set("min_size", -1) - } else { - d.Set("min_size", sa.MinSize) - } - if sa.MaxSize == nil { - d.Set("max_size", -1) - } else { - d.Set("max_size", sa.MaxSize) - } - if sa.DesiredCapacity == nil { - d.Set("desired_capacity", -1) - } else { - d.Set("desired_capacity", sa.DesiredCapacity) - } - - d.Set("recurrence", sa.Recurrence) - - if sa.StartTime != nil { - d.Set("start_time", sa.StartTime.Format(awsAutoscalingScheduleTimeLayout)) - } - - if sa.EndTime != nil { - d.Set("end_time", sa.EndTime.Format(awsAutoscalingScheduleTimeLayout)) - } - - return nil -} - -func resourceAwsAutoscalingScheduleDelete(d *schema.ResourceData, meta interface{}) error { - autoscalingconn := meta.(*AWSClient).autoscalingconn - - params := &autoscaling.DeleteScheduledActionInput{ - AutoScalingGroupName: aws.String(d.Get("autoscaling_group_name").(string)), - ScheduledActionName: aws.String(d.Id()), - } - - log.Printf("[INFO] Deleting Autoscaling Scheduled Action: %s", d.Id()) - _, err := autoscalingconn.DeleteScheduledAction(params) - if err != nil { - return fmt.Errorf("Error deleting Autoscaling Scheduled Action: %s", err.Error()) - } - - return nil -} - -func resourceAwsASGScheduledActionRetrieve(d *schema.ResourceData, meta interface{}) (*autoscaling.ScheduledUpdateGroupAction, error, bool) { - autoscalingconn := meta.(*AWSClient).autoscalingconn - - params := &autoscaling.DescribeScheduledActionsInput{ - AutoScalingGroupName: aws.String(d.Get("autoscaling_group_name").(string)), - ScheduledActionNames: []*string{aws.String(d.Id())}, - } - - log.Printf("[INFO] Describing Autoscaling Scheduled Action: %+v", params) - actions, err := autoscalingconn.DescribeScheduledActions(params) - if err != nil { - //A ValidationError here can mean that either the Schedule is missing OR the Autoscaling Group is missing - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "ValidationError" { - log.Printf("[WARN] Autoscaling Scheduled Action (%s) not found, removing from state", d.Id()) - d.SetId("") - - return nil, nil, false - } - return nil, fmt.Errorf("Error retrieving Autoscaling Scheduled Actions: %s", err), false - } - - if len(actions.ScheduledUpdateGroupActions) != 1 || - *actions.ScheduledUpdateGroupActions[0].ScheduledActionName != d.Id() { - return nil, nil, false - } - - return actions.ScheduledUpdateGroupActions[0], nil, true -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_backup_vault.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_backup_vault.go deleted file mode 100644 index 814273fbc..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_backup_vault.go +++ /dev/null @@ -1,121 +0,0 @@ -package aws - -import ( - "fmt" - "regexp" - - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/backup" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsBackupVault() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsBackupVaultCreate, - Read: resourceAwsBackupVaultRead, - Delete: resourceAwsBackupVaultDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9\-\_\.]{1,50}$`), "must consist of lowercase letters, numbers, and hyphens."), - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "kms_key_arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "recovery_points": { - Type: schema.TypeInt, - Computed: true, - }, - }, - } -} - -func resourceAwsBackupVaultCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).backupconn - - input := &backup.CreateBackupVaultInput{ - BackupVaultName: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("tags"); ok { - input.BackupVaultTags = tagsFromMapGeneric(v.(map[string]interface{})) - } - - if v, ok := d.GetOk("kms_key_arn"); ok { - input.EncryptionKeyArn = aws.String(v.(string)) - } - - _, err := conn.CreateBackupVault(input) - if err != nil { - return fmt.Errorf("error creating Backup Vault (%s): %s", d.Id(), err) - } - - d.SetId(d.Get("name").(string)) - - return resourceAwsBackupVaultRead(d, meta) -} - -func resourceAwsBackupVaultRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).backupconn - - input := &backup.DescribeBackupVaultInput{ - BackupVaultName: aws.String(d.Id()), - } - - resp, err := conn.DescribeBackupVault(input) - if err != nil { - return fmt.Errorf("error reading Backup Vault (%s): %s", d.Id(), err) - } - - d.Set("kms_key_arn", resp.EncryptionKeyArn) - d.Set("arn", resp.BackupVaultArn) - d.Set("recovery_points", resp.NumberOfRecoveryPoints) - - tresp, err := conn.ListTags(&backup.ListTagsInput{ - ResourceArn: aws.String(*resp.BackupVaultArn), - }) - - if err != nil { - return fmt.Errorf("error retrieving Backup Vault (%s) tags: %s", aws.StringValue(resp.BackupVaultArn), err) - } - - if err := d.Set("tags", tagsToMapGeneric(tresp.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func resourceAwsBackupVaultDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).backupconn - - input := &backup.DeleteBackupVaultInput{ - BackupVaultName: aws.String(d.Get("name").(string)), - } - - _, err := conn.DeleteBackupVault(input) - if err != nil { - return fmt.Errorf("error deleting Backup Vault (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_compute_environment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_compute_environment.go deleted file mode 100644 index 3d2e7c719..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_compute_environment.go +++ /dev/null @@ -1,442 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/batch" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsBatchComputeEnvironment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsBatchComputeEnvironmentCreate, - Read: resourceAwsBatchComputeEnvironmentRead, - Update: resourceAwsBatchComputeEnvironmentUpdate, - Delete: resourceAwsBatchComputeEnvironmentDelete, - - Schema: map[string]*schema.Schema{ - "compute_environment_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateBatchName, - }, - "compute_resources": { - Type: schema.TypeList, - Optional: true, - MinItems: 0, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bid_percentage": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - "desired_vcpus": { - Type: schema.TypeInt, - Optional: true, - }, - "ec2_key_pair": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "image_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "instance_role": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "instance_type": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "max_vcpus": { - Type: schema.TypeInt, - Required: true, - }, - "min_vcpus": { - Type: schema.TypeInt, - Required: true, - }, - "security_group_ids": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "spot_iam_fleet_role": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "subnets": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "tags": tagsSchema(), - "type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{batch.CRTypeEc2, batch.CRTypeSpot}, true), - }, - }, - }, - }, - "service_role": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "state": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{batch.CEStateEnabled, batch.CEStateDisabled}, true), - Default: batch.CEStateEnabled, - }, - "type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{batch.CETypeManaged, batch.CETypeUnmanaged}, true), - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "ecc_cluster_arn": { - Type: schema.TypeString, - Computed: true, - Deprecated: "Use ecs_cluster_arn instead", - }, - "ecs_cluster_arn": { - Type: schema.TypeString, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "status_reason": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsBatchComputeEnvironmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).batchconn - - computeEnvironmentName := d.Get("compute_environment_name").(string) - - serviceRole := d.Get("service_role").(string) - computeEnvironmentType := d.Get("type").(string) - - input := &batch.CreateComputeEnvironmentInput{ - ComputeEnvironmentName: aws.String(computeEnvironmentName), - ServiceRole: aws.String(serviceRole), - Type: aws.String(computeEnvironmentType), - } - - if v, ok := d.GetOk("state"); ok { - input.State = aws.String(v.(string)) - } - - if computeEnvironmentType == batch.CETypeManaged { - computeResources := d.Get("compute_resources").([]interface{}) - if len(computeResources) == 0 { - return fmt.Errorf("One compute environment is expected, but no compute environments are set") - } - computeResource := computeResources[0].(map[string]interface{}) - - instanceRole := computeResource["instance_role"].(string) - maxvCpus := int64(computeResource["max_vcpus"].(int)) - minvCpus := int64(computeResource["min_vcpus"].(int)) - computeResourceType := computeResource["type"].(string) - - var instanceTypes []*string - for _, v := range computeResource["instance_type"].(*schema.Set).List() { - instanceTypes = append(instanceTypes, aws.String(v.(string))) - } - - var securityGroupIds []*string - for _, v := range computeResource["security_group_ids"].(*schema.Set).List() { - securityGroupIds = append(securityGroupIds, aws.String(v.(string))) - } - - var subnets []*string - for _, v := range computeResource["subnets"].(*schema.Set).List() { - subnets = append(subnets, aws.String(v.(string))) - } - - input.ComputeResources = &batch.ComputeResource{ - InstanceRole: aws.String(instanceRole), - InstanceTypes: instanceTypes, - MaxvCpus: aws.Int64(maxvCpus), - MinvCpus: aws.Int64(minvCpus), - SecurityGroupIds: securityGroupIds, - Subnets: subnets, - Type: aws.String(computeResourceType), - } - - if v, ok := computeResource["bid_percentage"]; ok { - input.ComputeResources.BidPercentage = aws.Int64(int64(v.(int))) - } - if v, ok := computeResource["desired_vcpus"]; ok { - input.ComputeResources.DesiredvCpus = aws.Int64(int64(v.(int))) - } - if v, ok := computeResource["ec2_key_pair"]; ok { - input.ComputeResources.Ec2KeyPair = aws.String(v.(string)) - } - if v, ok := computeResource["image_id"]; ok { - input.ComputeResources.ImageId = aws.String(v.(string)) - } - if v, ok := computeResource["spot_iam_fleet_role"]; ok { - input.ComputeResources.SpotIamFleetRole = aws.String(v.(string)) - } - if v, ok := computeResource["tags"]; ok { - input.ComputeResources.Tags = tagsFromMapGeneric(v.(map[string]interface{})) - } - } - - log.Printf("[DEBUG] Create compute environment %s.\n", input) - - if _, err := conn.CreateComputeEnvironment(input); err != nil { - return err - } - - d.SetId(computeEnvironmentName) - - stateConf := &resource.StateChangeConf{ - Pending: []string{batch.CEStatusCreating}, - Target: []string{batch.CEStatusValid}, - Refresh: resourceAwsBatchComputeEnvironmentStatusRefreshFunc(computeEnvironmentName, conn), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 5 * time.Second, - } - if _, err := stateConf.WaitForState(); err != nil { - return err - } - - return resourceAwsBatchComputeEnvironmentRead(d, meta) -} - -func resourceAwsBatchComputeEnvironmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).batchconn - - computeEnvironmentName := d.Get("compute_environment_name").(string) - - input := &batch.DescribeComputeEnvironmentsInput{ - ComputeEnvironments: []*string{ - aws.String(computeEnvironmentName), - }, - } - - log.Printf("[DEBUG] Read compute environment %s.\n", input) - - result, err := conn.DescribeComputeEnvironments(input) - if err != nil { - return err - } - - if len(result.ComputeEnvironments) == 0 { - return fmt.Errorf("One compute environment is expected, but AWS return no compute environment") - } - computeEnvironment := result.ComputeEnvironments[0] - - d.Set("service_role", computeEnvironment.ServiceRole) - d.Set("state", computeEnvironment.State) - d.Set("type", computeEnvironment.Type) - - if aws.StringValue(computeEnvironment.Type) == batch.CETypeManaged { - if err := d.Set("compute_resources", flattenBatchComputeResources(computeEnvironment.ComputeResources)); err != nil { - return fmt.Errorf("error setting compute_resources: %s", err) - } - } - - d.Set("arn", computeEnvironment.ComputeEnvironmentArn) - d.Set("ecc_cluster_arn", computeEnvironment.EcsClusterArn) - d.Set("ecs_cluster_arn", computeEnvironment.EcsClusterArn) - d.Set("status", computeEnvironment.Status) - d.Set("status_reason", computeEnvironment.StatusReason) - - return nil -} - -func flattenBatchComputeResources(computeResource *batch.ComputeResource) []map[string]interface{} { - result := make([]map[string]interface{}, 0) - m := make(map[string]interface{}) - - m["bid_percentage"] = int(aws.Int64Value(computeResource.BidPercentage)) - m["desired_vcpus"] = int(aws.Int64Value(computeResource.DesiredvCpus)) - m["ec2_key_pair"] = aws.StringValue(computeResource.Ec2KeyPair) - m["image_id"] = aws.StringValue(computeResource.ImageId) - m["instance_role"] = aws.StringValue(computeResource.InstanceRole) - m["instance_type"] = schema.NewSet(schema.HashString, flattenStringList(computeResource.InstanceTypes)) - m["max_vcpus"] = int(aws.Int64Value(computeResource.MaxvCpus)) - m["min_vcpus"] = int(aws.Int64Value(computeResource.MinvCpus)) - m["security_group_ids"] = schema.NewSet(schema.HashString, flattenStringList(computeResource.SecurityGroupIds)) - m["spot_iam_fleet_role"] = aws.StringValue(computeResource.SpotIamFleetRole) - m["subnets"] = schema.NewSet(schema.HashString, flattenStringList(computeResource.Subnets)) - m["tags"] = tagsToMapGeneric(computeResource.Tags) - m["type"] = aws.StringValue(computeResource.Type) - - result = append(result, m) - return result -} - -func resourceAwsBatchComputeEnvironmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).batchconn - computeEnvironmentName := d.Get("compute_environment_name").(string) - - log.Printf("[DEBUG] Disabling Batch Compute Environment: %s", computeEnvironmentName) - err := disableBatchComputeEnvironment(computeEnvironmentName, d.Timeout(schema.TimeoutDelete), conn) - if err != nil { - return fmt.Errorf("error disabling Batch Compute Environment (%s): %s", computeEnvironmentName, err) - } - - log.Printf("[DEBUG] Deleting Batch Compute Environment: %s", computeEnvironmentName) - err = deleteBatchComputeEnvironment(computeEnvironmentName, d.Timeout(schema.TimeoutDelete), conn) - if err != nil { - return fmt.Errorf("error deleting Batch Compute Environment (%s): %s", computeEnvironmentName, err) - } - - return nil -} - -func resourceAwsBatchComputeEnvironmentUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).batchconn - - computeEnvironmentName := d.Get("compute_environment_name").(string) - - input := &batch.UpdateComputeEnvironmentInput{ - ComputeEnvironment: aws.String(computeEnvironmentName), - ComputeResources: &batch.ComputeResourceUpdate{}, - } - - if d.HasChange("service_role") { - input.ServiceRole = aws.String(d.Get("service_role").(string)) - } - if d.HasChange("state") { - input.State = aws.String(d.Get("state").(string)) - } - - if d.HasChange("compute_resources") { - computeResources := d.Get("compute_resources").([]interface{}) - if len(computeResources) == 0 { - return fmt.Errorf("One compute environment is expected, but no compute environments are set") - } - computeResource := computeResources[0].(map[string]interface{}) - - input.ComputeResources.DesiredvCpus = aws.Int64(int64(computeResource["desired_vcpus"].(int))) - input.ComputeResources.MaxvCpus = aws.Int64(int64(computeResource["max_vcpus"].(int))) - input.ComputeResources.MinvCpus = aws.Int64(int64(computeResource["min_vcpus"].(int))) - } - - log.Printf("[DEBUG] Update compute environment %s.\n", input) - - if _, err := conn.UpdateComputeEnvironment(input); err != nil { - return err - } - - return resourceAwsBatchComputeEnvironmentRead(d, meta) -} - -func resourceAwsBatchComputeEnvironmentStatusRefreshFunc(computeEnvironmentName string, conn *batch.Batch) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - result, err := conn.DescribeComputeEnvironments(&batch.DescribeComputeEnvironmentsInput{ - ComputeEnvironments: []*string{ - aws.String(computeEnvironmentName), - }, - }) - if err != nil { - return nil, "failed", err - } - - if len(result.ComputeEnvironments) == 0 { - return nil, "failed", fmt.Errorf("One compute environment is expected, but AWS return no compute environment") - } - - computeEnvironment := result.ComputeEnvironments[0] - return result, *(computeEnvironment.Status), nil - } -} - -func resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(computeEnvironmentName string, conn *batch.Batch) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - result, err := conn.DescribeComputeEnvironments(&batch.DescribeComputeEnvironmentsInput{ - ComputeEnvironments: []*string{ - aws.String(computeEnvironmentName), - }, - }) - if err != nil { - return nil, "failed", err - } - - if len(result.ComputeEnvironments) == 0 { - return result, batch.CEStatusDeleted, nil - } - - computeEnvironment := result.ComputeEnvironments[0] - return result, *(computeEnvironment.Status), nil - } -} - -func deleteBatchComputeEnvironment(computeEnvironment string, timeout time.Duration, conn *batch.Batch) error { - input := &batch.DeleteComputeEnvironmentInput{ - ComputeEnvironment: aws.String(computeEnvironment), - } - - if _, err := conn.DeleteComputeEnvironment(input); err != nil { - return err - } - - stateChangeConf := &resource.StateChangeConf{ - Pending: []string{batch.CEStatusDeleting}, - Target: []string{batch.CEStatusDeleted}, - Refresh: resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(computeEnvironment, conn), - Timeout: timeout, - MinTimeout: 5 * time.Second, - } - _, err := stateChangeConf.WaitForState() - return err -} - -func disableBatchComputeEnvironment(computeEnvironment string, timeout time.Duration, conn *batch.Batch) error { - input := &batch.UpdateComputeEnvironmentInput{ - ComputeEnvironment: aws.String(computeEnvironment), - State: aws.String(batch.CEStateDisabled), - } - - if _, err := conn.UpdateComputeEnvironment(input); err != nil { - return err - } - - stateChangeConf := &resource.StateChangeConf{ - Pending: []string{batch.CEStatusUpdating}, - Target: []string{batch.CEStatusValid}, - Refresh: resourceAwsBatchComputeEnvironmentStatusRefreshFunc(computeEnvironment, conn), - Timeout: timeout, - MinTimeout: 5 * time.Second, - } - _, err := stateChangeConf.WaitForState() - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_definition.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_definition.go deleted file mode 100644 index 755559501..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_definition.go +++ /dev/null @@ -1,267 +0,0 @@ -package aws - -import ( - "fmt" - - "encoding/json" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/batch" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsBatchJobDefinition() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsBatchJobDefinitionCreate, - Read: resourceAwsBatchJobDefinitionRead, - Delete: resourceAwsBatchJobDefinitionDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateBatchName, - }, - "container_properties": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - DiffSuppressFunc: suppressEquivalentJsonDiffs, - ValidateFunc: validateAwsBatchJobContainerProperties, - }, - "parameters": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "retry_strategy": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "attempts": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - ValidateFunc: validation.IntBetween(1, 10), - }, - }, - }, - }, - "timeout": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "attempt_duration_seconds": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - ValidateFunc: validation.IntAtLeast(60), - }, - }, - }, - }, - "type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{batch.JobDefinitionTypeContainer}, true), - }, - "revision": { - Type: schema.TypeInt, - Computed: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsBatchJobDefinitionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).batchconn - name := d.Get("name").(string) - - input := &batch.RegisterJobDefinitionInput{ - JobDefinitionName: aws.String(name), - Type: aws.String(d.Get("type").(string)), - } - - if v, ok := d.GetOk("container_properties"); ok { - props, err := expandBatchJobContainerProperties(v.(string)) - if err != nil { - return fmt.Errorf("%s %q", err, name) - } - input.ContainerProperties = props - } - - if v, ok := d.GetOk("parameters"); ok { - input.Parameters = expandJobDefinitionParameters(v.(map[string]interface{})) - } - - if v, ok := d.GetOk("retry_strategy"); ok { - input.RetryStrategy = expandJobDefinitionRetryStrategy(v.([]interface{})) - } - - if v, ok := d.GetOk("timeout"); ok { - input.Timeout = expandJobDefinitionTimeout(v.([]interface{})) - } - - out, err := conn.RegisterJobDefinition(input) - if err != nil { - return fmt.Errorf("%s %q", err, name) - } - d.SetId(*out.JobDefinitionArn) - d.Set("arn", out.JobDefinitionArn) - return resourceAwsBatchJobDefinitionRead(d, meta) -} - -func resourceAwsBatchJobDefinitionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).batchconn - arn := d.Get("arn").(string) - job, err := getJobDefinition(conn, arn) - if err != nil { - return fmt.Errorf("%s %q", err, arn) - } - if job == nil { - d.SetId("") - return nil - } - d.Set("arn", job.JobDefinitionArn) - d.Set("container_properties", job.ContainerProperties) - d.Set("parameters", aws.StringValueMap(job.Parameters)) - - if err := d.Set("retry_strategy", flattenBatchRetryStrategy(job.RetryStrategy)); err != nil { - return fmt.Errorf("error setting retry_strategy: %s", err) - } - - if err := d.Set("timeout", flattenBatchJobTimeout(job.Timeout)); err != nil { - return fmt.Errorf("error setting timeout: %s", err) - } - - d.Set("revision", job.Revision) - d.Set("type", job.Type) - return nil -} - -func resourceAwsBatchJobDefinitionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).batchconn - arn := d.Get("arn").(string) - _, err := conn.DeregisterJobDefinition(&batch.DeregisterJobDefinitionInput{ - JobDefinition: aws.String(arn), - }) - if err != nil { - return fmt.Errorf("%s %q", err, arn) - } - - return nil -} - -func getJobDefinition(conn *batch.Batch, arn string) (*batch.JobDefinition, error) { - describeOpts := &batch.DescribeJobDefinitionsInput{ - JobDefinitions: []*string{aws.String(arn)}, - } - resp, err := conn.DescribeJobDefinitions(describeOpts) - if err != nil { - return nil, err - } - - numJobDefinitions := len(resp.JobDefinitions) - switch { - case numJobDefinitions == 0: - return nil, nil - case numJobDefinitions == 1: - if *resp.JobDefinitions[0].Status == "ACTIVE" { - return resp.JobDefinitions[0], nil - } - return nil, nil - case numJobDefinitions > 1: - return nil, fmt.Errorf("Multiple Job Definitions with name %s", arn) - } - return nil, nil -} - -func validateAwsBatchJobContainerProperties(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - _, err := expandBatchJobContainerProperties(value) - if err != nil { - errors = append(errors, fmt.Errorf("AWS Batch Job container_properties is invalid: %s", err)) - } - return -} - -func expandBatchJobContainerProperties(rawProps string) (*batch.ContainerProperties, error) { - var props *batch.ContainerProperties - - err := json.Unmarshal([]byte(rawProps), &props) - if err != nil { - return nil, fmt.Errorf("Error decoding JSON: %s", err) - } - - return props, nil -} - -func expandJobDefinitionParameters(params map[string]interface{}) map[string]*string { - var jobParams = make(map[string]*string) - for k, v := range params { - jobParams[k] = aws.String(v.(string)) - } - - return jobParams -} - -func expandJobDefinitionRetryStrategy(item []interface{}) *batch.RetryStrategy { - retryStrategy := &batch.RetryStrategy{} - data := item[0].(map[string]interface{}) - - if v, ok := data["attempts"].(int); ok && v > 0 && v <= 10 { - retryStrategy.Attempts = aws.Int64(int64(v)) - } - - return retryStrategy -} - -func flattenBatchRetryStrategy(item *batch.RetryStrategy) []map[string]interface{} { - data := []map[string]interface{}{} - if item != nil && item.Attempts != nil { - data = append(data, map[string]interface{}{ - "attempts": int(aws.Int64Value(item.Attempts)), - }) - } - return data -} - -func expandJobDefinitionTimeout(item []interface{}) *batch.JobTimeout { - timeout := &batch.JobTimeout{} - data := item[0].(map[string]interface{}) - - if v, ok := data["attempt_duration_seconds"].(int); ok && v >= 60 { - timeout.AttemptDurationSeconds = aws.Int64(int64(v)) - } - - return timeout -} - -func flattenBatchJobTimeout(item *batch.JobTimeout) []map[string]interface{} { - data := []map[string]interface{}{} - if item != nil && item.AttemptDurationSeconds != nil { - data = append(data, map[string]interface{}{ - "attempt_duration_seconds": int(aws.Int64Value(item.AttemptDurationSeconds)), - }) - } - return data -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go deleted file mode 100644 index e4787c769..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go +++ /dev/null @@ -1,250 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/batch" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsBatchJobQueue() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsBatchJobQueueCreate, - Read: resourceAwsBatchJobQueueRead, - Update: resourceAwsBatchJobQueueUpdate, - Delete: resourceAwsBatchJobQueueDelete, - - Schema: map[string]*schema.Schema{ - "compute_environments": { - Type: schema.TypeList, - Required: true, - MaxItems: 3, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateBatchName, - }, - "priority": { - Type: schema.TypeInt, - Required: true, - }, - "state": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{batch.JQStateDisabled, batch.JQStateEnabled}, true), - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsBatchJobQueueCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).batchconn - input := batch.CreateJobQueueInput{ - ComputeEnvironmentOrder: createComputeEnvironmentOrder(d.Get("compute_environments").([]interface{})), - JobQueueName: aws.String(d.Get("name").(string)), - Priority: aws.Int64(int64(d.Get("priority").(int))), - State: aws.String(d.Get("state").(string)), - } - name := d.Get("name").(string) - out, err := conn.CreateJobQueue(&input) - if err != nil { - return fmt.Errorf("%s %q", err, name) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{batch.JQStatusCreating, batch.JQStatusUpdating}, - Target: []string{batch.JQStatusValid}, - Refresh: batchJobQueueRefreshStatusFunc(conn, name), - Timeout: 10 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for JobQueue state to be \"VALID\": %s", err) - } - - arn := *out.JobQueueArn - log.Printf("[DEBUG] JobQueue created: %s", arn) - d.SetId(arn) - - return resourceAwsBatchJobQueueRead(d, meta) -} - -func resourceAwsBatchJobQueueRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).batchconn - - jq, err := getJobQueue(conn, d.Get("name").(string)) - if err != nil { - return err - } - if jq == nil { - log.Printf("[WARN] Batch Job Queue (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("arn", jq.JobQueueArn) - - computeEnvironments := make([]string, len(jq.ComputeEnvironmentOrder)) - for _, computeEnvironmentOrder := range jq.ComputeEnvironmentOrder { - computeEnvironments[aws.Int64Value(computeEnvironmentOrder.Order)] = aws.StringValue(computeEnvironmentOrder.ComputeEnvironment) - } - if err := d.Set("compute_environments", computeEnvironments); err != nil { - return fmt.Errorf("error setting compute_environments: %s", err) - } - - d.Set("name", jq.JobQueueName) - d.Set("priority", jq.Priority) - d.Set("state", jq.State) - - return nil -} - -func resourceAwsBatchJobQueueUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).batchconn - - name := d.Get("name").(string) - updateInput := &batch.UpdateJobQueueInput{ - ComputeEnvironmentOrder: createComputeEnvironmentOrder(d.Get("compute_environments").([]interface{})), - JobQueue: aws.String(name), - Priority: aws.Int64(int64(d.Get("priority").(int))), - State: aws.String(d.Get("state").(string)), - } - _, err := conn.UpdateJobQueue(updateInput) - if err != nil { - return err - } - stateConf := &resource.StateChangeConf{ - Pending: []string{batch.JQStatusUpdating}, - Target: []string{batch.JQStatusValid}, - Refresh: batchJobQueueRefreshStatusFunc(conn, name), - Timeout: 10 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return err - } - return resourceAwsBatchJobQueueRead(d, meta) -} - -func resourceAwsBatchJobQueueDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).batchconn - name := d.Get("name").(string) - - log.Printf("[DEBUG] Disabling Batch Job Queue %s", name) - err := disableBatchJobQueue(name, conn) - if err != nil { - return fmt.Errorf("error disabling Batch Job Queue (%s): %s", name, err) - } - - log.Printf("[DEBUG] Deleting Batch Job Queue %s", name) - err = deleteBatchJobQueue(name, conn) - if err != nil { - return fmt.Errorf("error deleting Batch Job Queue (%s): %s", name, err) - } - - return nil -} - -func createComputeEnvironmentOrder(order []interface{}) (envs []*batch.ComputeEnvironmentOrder) { - for i, env := range order { - envs = append(envs, &batch.ComputeEnvironmentOrder{ - Order: aws.Int64(int64(i)), - ComputeEnvironment: aws.String(env.(string)), - }) - } - return -} - -func deleteBatchJobQueue(jobQueue string, conn *batch.Batch) error { - _, err := conn.DeleteJobQueue(&batch.DeleteJobQueueInput{ - JobQueue: aws.String(jobQueue), - }) - if err != nil { - return err - } - - stateChangeConf := &resource.StateChangeConf{ - Pending: []string{batch.JQStateDisabled, batch.JQStatusDeleting}, - Target: []string{batch.JQStatusDeleted}, - Refresh: batchJobQueueRefreshStatusFunc(conn, jobQueue), - Timeout: 10 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateChangeConf.WaitForState() - return err -} - -func disableBatchJobQueue(jobQueue string, conn *batch.Batch) error { - _, err := conn.UpdateJobQueue(&batch.UpdateJobQueueInput{ - JobQueue: aws.String(jobQueue), - State: aws.String(batch.JQStateDisabled), - }) - if err != nil { - return err - } - - stateChangeConf := &resource.StateChangeConf{ - Pending: []string{batch.JQStatusUpdating}, - Target: []string{batch.JQStatusValid}, - Refresh: batchJobQueueRefreshStatusFunc(conn, jobQueue), - Timeout: 10 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - _, err = stateChangeConf.WaitForState() - return err -} - -func getJobQueue(conn *batch.Batch, sn string) (*batch.JobQueueDetail, error) { - describeOpts := &batch.DescribeJobQueuesInput{ - JobQueues: []*string{aws.String(sn)}, - } - resp, err := conn.DescribeJobQueues(describeOpts) - if err != nil { - return nil, err - } - - numJobQueues := len(resp.JobQueues) - switch { - case numJobQueues == 0: - log.Printf("[DEBUG] Job Queue %q is already gone", sn) - return nil, nil - case numJobQueues == 1: - return resp.JobQueues[0], nil - case numJobQueues > 1: - return nil, fmt.Errorf("Multiple Job Queues with name %s", sn) - } - return nil, nil -} - -func batchJobQueueRefreshStatusFunc(conn *batch.Batch, sn string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - ce, err := getJobQueue(conn, sn) - if err != nil { - return nil, "failed", err - } - if ce == nil { - return 42, batch.JQStatusDeleted, nil - } - return ce, *ce.Status, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_budgets_budget.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_budgets_budget.go deleted file mode 100644 index d4c368d27..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_budgets_budget.go +++ /dev/null @@ -1,402 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/budgets" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsBudgetsBudget() *schema.Resource { - return &schema.Resource{ - Schema: map[string]*schema.Schema{ - "account_id": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - ValidateFunc: validateAwsAccountId, - }, - "name": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - }, - "name_prefix": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - }, - "budget_type": { - Type: schema.TypeString, - Required: true, - }, - "limit_amount": { - Type: schema.TypeString, - Required: true, - }, - "limit_unit": { - Type: schema.TypeString, - Required: true, - }, - "cost_types": { - Type: schema.TypeList, - Computed: true, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "include_credit": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "include_discount": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "include_other_subscription": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "include_recurring": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "include_refund": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "include_subscription": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "include_support": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "include_tax": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "include_upfront": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "use_amortized": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "use_blended": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - }, - "time_period_start": { - Type: schema.TypeString, - Required: true, - }, - "time_period_end": { - Type: schema.TypeString, - Optional: true, - Default: "2087-06-15_00:00", - }, - "time_unit": { - Type: schema.TypeString, - Required: true, - }, - "cost_filters": { - Type: schema.TypeMap, - Optional: true, - Computed: true, - }, - }, - Create: resourceAwsBudgetsBudgetCreate, - Read: resourceAwsBudgetsBudgetRead, - Update: resourceAwsBudgetsBudgetUpdate, - Delete: resourceAwsBudgetsBudgetDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - } -} - -func resourceAwsBudgetsBudgetCreate(d *schema.ResourceData, meta interface{}) error { - budget, err := expandBudgetsBudgetUnmarshal(d) - if err != nil { - return fmt.Errorf("failed unmarshalling budget: %v", err) - } - - if v, ok := d.GetOk("name"); ok { - budget.BudgetName = aws.String(v.(string)) - - } else if v, ok := d.GetOk("name_prefix"); ok { - budget.BudgetName = aws.String(resource.PrefixedUniqueId(v.(string))) - - } else { - budget.BudgetName = aws.String(resource.UniqueId()) - } - - client := meta.(*AWSClient).budgetconn - var accountID string - if v, ok := d.GetOk("account_id"); ok { - accountID = v.(string) - } else { - accountID = meta.(*AWSClient).accountid - } - - _, err = client.CreateBudget(&budgets.CreateBudgetInput{ - AccountId: aws.String(accountID), - Budget: budget, - }) - if err != nil { - return fmt.Errorf("create budget failed: %v", err) - } - - d.SetId(fmt.Sprintf("%s:%s", accountID, *budget.BudgetName)) - return resourceAwsBudgetsBudgetRead(d, meta) -} - -func resourceAwsBudgetsBudgetRead(d *schema.ResourceData, meta interface{}) error { - accountID, budgetName, err := decodeBudgetsBudgetID(d.Id()) - if err != nil { - return err - } - - client := meta.(*AWSClient).budgetconn - describeBudgetOutput, err := client.DescribeBudget(&budgets.DescribeBudgetInput{ - BudgetName: aws.String(budgetName), - AccountId: aws.String(accountID), - }) - if isAWSErr(err, budgets.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Budget %s not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("describe budget failed: %v", err) - } - - budget := describeBudgetOutput.Budget - if budget == nil { - log.Printf("[WARN] Budget %s not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("account_id", accountID) - d.Set("budget_type", budget.BudgetType) - - if err := d.Set("cost_filters", convertCostFiltersToStringMap(budget.CostFilters)); err != nil { - return fmt.Errorf("error setting cost_filters: %s", err) - } - - if err := d.Set("cost_types", flattenBudgetsCostTypes(budget.CostTypes)); err != nil { - return fmt.Errorf("error setting cost_types: %s %s", err, budget.CostTypes) - } - - if budget.BudgetLimit != nil { - d.Set("limit_amount", budget.BudgetLimit.Amount) - d.Set("limit_unit", budget.BudgetLimit.Unit) - } - - d.Set("name", budget.BudgetName) - - if budget.TimePeriod != nil { - d.Set("time_period_end", aws.TimeValue(budget.TimePeriod.End).Format("2006-01-02_15:04")) - d.Set("time_period_start", aws.TimeValue(budget.TimePeriod.Start).Format("2006-01-02_15:04")) - } - - d.Set("time_unit", budget.TimeUnit) - - return nil -} - -func resourceAwsBudgetsBudgetUpdate(d *schema.ResourceData, meta interface{}) error { - accountID, _, err := decodeBudgetsBudgetID(d.Id()) - if err != nil { - return err - } - - client := meta.(*AWSClient).budgetconn - budget, err := expandBudgetsBudgetUnmarshal(d) - if err != nil { - return fmt.Errorf("could not create budget: %v", err) - } - - _, err = client.UpdateBudget(&budgets.UpdateBudgetInput{ - AccountId: aws.String(accountID), - NewBudget: budget, - }) - if err != nil { - return fmt.Errorf("update budget failed: %v", err) - } - - return resourceAwsBudgetsBudgetRead(d, meta) -} - -func resourceAwsBudgetsBudgetDelete(d *schema.ResourceData, meta interface{}) error { - accountID, budgetName, err := decodeBudgetsBudgetID(d.Id()) - if err != nil { - return err - } - - client := meta.(*AWSClient).budgetconn - _, err = client.DeleteBudget(&budgets.DeleteBudgetInput{ - BudgetName: aws.String(budgetName), - AccountId: aws.String(accountID), - }) - if err != nil { - if isAWSErr(err, budgets.ErrCodeNotFoundException, "") { - log.Printf("[INFO] budget %s could not be found. skipping delete.", d.Id()) - return nil - } - - return fmt.Errorf("delete budget failed: %v", err) - } - - return nil -} - -func flattenBudgetsCostTypes(costTypes *budgets.CostTypes) []map[string]interface{} { - if costTypes == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "include_credit": aws.BoolValue(costTypes.IncludeCredit), - "include_discount": aws.BoolValue(costTypes.IncludeDiscount), - "include_other_subscription": aws.BoolValue(costTypes.IncludeOtherSubscription), - "include_recurring": aws.BoolValue(costTypes.IncludeRecurring), - "include_refund": aws.BoolValue(costTypes.IncludeRefund), - "include_subscription": aws.BoolValue(costTypes.IncludeSubscription), - "include_support": aws.BoolValue(costTypes.IncludeSupport), - "include_tax": aws.BoolValue(costTypes.IncludeTax), - "include_upfront": aws.BoolValue(costTypes.IncludeUpfront), - "use_amortized": aws.BoolValue(costTypes.UseAmortized), - "use_blended": aws.BoolValue(costTypes.UseBlended), - } - return []map[string]interface{}{m} -} - -func convertCostFiltersToStringMap(costFilters map[string][]*string) map[string]string { - convertedCostFilters := make(map[string]string) - for k, v := range costFilters { - filterValues := make([]string, 0) - for _, singleFilterValue := range v { - filterValues = append(filterValues, *singleFilterValue) - } - - convertedCostFilters[k] = strings.Join(filterValues, ",") - } - - return convertedCostFilters -} - -func expandBudgetsBudgetUnmarshal(d *schema.ResourceData) (*budgets.Budget, error) { - budgetName := d.Get("name").(string) - budgetType := d.Get("budget_type").(string) - budgetLimitAmount := d.Get("limit_amount").(string) - budgetLimitUnit := d.Get("limit_unit").(string) - costTypes := expandBudgetsCostTypesUnmarshal(d.Get("cost_types").([]interface{})) - budgetTimeUnit := d.Get("time_unit").(string) - budgetCostFilters := make(map[string][]*string) - for k, v := range d.Get("cost_filters").(map[string]interface{}) { - filterValue := v.(string) - budgetCostFilters[k] = append(budgetCostFilters[k], aws.String(filterValue)) - } - - budgetTimePeriodStart, err := time.Parse("2006-01-02_15:04", d.Get("time_period_start").(string)) - if err != nil { - return nil, fmt.Errorf("failure parsing time: %v", err) - } - - budgetTimePeriodEnd, err := time.Parse("2006-01-02_15:04", d.Get("time_period_end").(string)) - if err != nil { - return nil, fmt.Errorf("failure parsing time: %v", err) - } - - budget := &budgets.Budget{ - BudgetName: aws.String(budgetName), - BudgetType: aws.String(budgetType), - BudgetLimit: &budgets.Spend{ - Amount: aws.String(budgetLimitAmount), - Unit: aws.String(budgetLimitUnit), - }, - CostTypes: costTypes, - TimePeriod: &budgets.TimePeriod{ - End: &budgetTimePeriodEnd, - Start: &budgetTimePeriodStart, - }, - TimeUnit: aws.String(budgetTimeUnit), - CostFilters: budgetCostFilters, - } - return budget, nil -} - -func decodeBudgetsBudgetID(id string) (string, string, error) { - parts := strings.Split(id, ":") - if len(parts) != 2 { - return "", "", fmt.Errorf("Unexpected format of ID (%q), expected AccountID:BudgetName", id) - } - return parts[0], parts[1], nil -} - -func expandBudgetsCostTypesUnmarshal(budgetCostTypes []interface{}) *budgets.CostTypes { - costTypes := &budgets.CostTypes{ - IncludeCredit: aws.Bool(true), - IncludeDiscount: aws.Bool(true), - IncludeOtherSubscription: aws.Bool(true), - IncludeRecurring: aws.Bool(true), - IncludeRefund: aws.Bool(true), - IncludeSubscription: aws.Bool(true), - IncludeSupport: aws.Bool(true), - IncludeTax: aws.Bool(true), - IncludeUpfront: aws.Bool(true), - UseAmortized: aws.Bool(false), - UseBlended: aws.Bool(false), - } - if len(budgetCostTypes) == 1 { - costTypesMap := budgetCostTypes[0].(map[string]interface{}) - for k, v := range map[string]*bool{ - "include_credit": costTypes.IncludeCredit, - "include_discount": costTypes.IncludeDiscount, - "include_other_subscription": costTypes.IncludeOtherSubscription, - "include_recurring": costTypes.IncludeRecurring, - "include_refund": costTypes.IncludeRefund, - "include_subscription": costTypes.IncludeSubscription, - "include_support": costTypes.IncludeSupport, - "include_tax": costTypes.IncludeTax, - "include_upfront": costTypes.IncludeUpfront, - "use_amortized": costTypes.UseAmortized, - "use_blended": costTypes.UseBlended, - } { - if val, ok := costTypesMap[k]; ok { - *v = val.(bool) - } - } - } - - return costTypes -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloud9_environment_ec2.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloud9_environment_ec2.go deleted file mode 100644 index 9c4bdb24b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloud9_environment_ec2.go +++ /dev/null @@ -1,228 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloud9" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsCloud9EnvironmentEc2() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloud9EnvironmentEc2Create, - Read: resourceAwsCloud9EnvironmentEc2Read, - Update: resourceAwsCloud9EnvironmentEc2Update, - Delete: resourceAwsCloud9EnvironmentEc2Delete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "instance_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "automatic_stop_time_minutes": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "owner_arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "subnet_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "type": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsCloud9EnvironmentEc2Create(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloud9conn - - params := &cloud9.CreateEnvironmentEC2Input{ - InstanceType: aws.String(d.Get("instance_type").(string)), - Name: aws.String(d.Get("name").(string)), - ClientRequestToken: aws.String(resource.UniqueId()), - } - - if v, ok := d.GetOk("automatic_stop_time_minutes"); ok { - params.AutomaticStopTimeMinutes = aws.Int64(int64(v.(int))) - } - if v, ok := d.GetOk("description"); ok { - params.Description = aws.String(v.(string)) - } - if v, ok := d.GetOk("owner_arn"); ok { - params.OwnerArn = aws.String(v.(string)) - } - if v, ok := d.GetOk("subnet_id"); ok { - params.SubnetId = aws.String(v.(string)) - } - - var out *cloud9.CreateEnvironmentEC2Output - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - out, err = conn.CreateEnvironmentEC2(params) - if err != nil { - // NotFoundException: User arn:aws:iam::*******:user/****** does not exist. - if isAWSErr(err, cloud9.ErrCodeNotFoundException, "User") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return err - } - d.SetId(*out.EnvironmentId) - - stateConf := resource.StateChangeConf{ - Pending: []string{ - cloud9.EnvironmentStatusConnecting, - cloud9.EnvironmentStatusCreating, - }, - Target: []string{ - cloud9.EnvironmentStatusReady, - }, - Timeout: 10 * time.Minute, - Refresh: func() (interface{}, string, error) { - out, err := conn.DescribeEnvironmentStatus(&cloud9.DescribeEnvironmentStatusInput{ - EnvironmentId: aws.String(d.Id()), - }) - if err != nil { - return 42, "", err - } - - status := *out.Status - var sErr error - if status == cloud9.EnvironmentStatusError && out.Message != nil { - sErr = fmt.Errorf("Reason: %s", *out.Message) - } - - return out, status, sErr - }, - } - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsCloud9EnvironmentEc2Read(d, meta) -} - -func resourceAwsCloud9EnvironmentEc2Read(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloud9conn - - log.Printf("[INFO] Reading Cloud9 Environment EC2 %s", d.Id()) - - out, err := conn.DescribeEnvironments(&cloud9.DescribeEnvironmentsInput{ - EnvironmentIds: []*string{aws.String(d.Id())}, - }) - if err != nil { - if isAWSErr(err, cloud9.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Cloud9 Environment EC2 (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - if len(out.Environments) == 0 { - log.Printf("[WARN] Cloud9 Environment EC2 (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - env := out.Environments[0] - - d.Set("arn", env.Arn) - d.Set("description", env.Description) - d.Set("name", env.Name) - d.Set("owner_arn", env.OwnerArn) - d.Set("type", env.Type) - - log.Printf("[DEBUG] Received Cloud9 Environment EC2: %s", env) - - return nil -} - -func resourceAwsCloud9EnvironmentEc2Update(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloud9conn - - input := cloud9.UpdateEnvironmentInput{ - Description: aws.String(d.Get("description").(string)), - EnvironmentId: aws.String(d.Id()), - Name: aws.String(d.Get("name").(string)), - } - - log.Printf("[INFO] Updating Cloud9 Environment EC2: %s", input) - - out, err := conn.UpdateEnvironment(&input) - if err != nil { - return err - } - - log.Printf("[DEBUG] Cloud9 Environment EC2 updated: %s", out) - - return resourceAwsCloud9EnvironmentEc2Read(d, meta) -} - -func resourceAwsCloud9EnvironmentEc2Delete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloud9conn - - _, err := conn.DeleteEnvironment(&cloud9.DeleteEnvironmentInput{ - EnvironmentId: aws.String(d.Id()), - }) - if err != nil { - return err - } - err = resource.Retry(1*time.Minute, func() *resource.RetryError { - out, err := conn.DescribeEnvironments(&cloud9.DescribeEnvironmentsInput{ - EnvironmentIds: []*string{aws.String(d.Id())}, - }) - if err != nil { - if isAWSErr(err, cloud9.ErrCodeNotFoundException, "") { - return nil - } - // :'-( - if isAWSErr(err, "AccessDeniedException", "is not authorized to access this resource") { - return nil - } - return resource.NonRetryableError(err) - } - if len(out.Environments) == 0 { - return nil - } - return resource.RetryableError(fmt.Errorf("Cloud9 EC2 Environment %q still exists", d.Id())) - }) - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudformation_stack.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudformation_stack.go deleted file mode 100644 index 50fb92257..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudformation_stack.go +++ /dev/null @@ -1,650 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/cloudformation" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCloudFormationStack() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudFormationStackCreate, - Read: resourceAwsCloudFormationStackRead, - Update: resourceAwsCloudFormationStackUpdate, - Delete: resourceAwsCloudFormationStackDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(30 * time.Minute), - Update: schema.DefaultTimeout(30 * time.Minute), - Delete: schema.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "template_body": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateCloudFormationTemplate, - StateFunc: func(v interface{}) string { - template, _ := normalizeCloudFormationTemplate(v) - return template - }, - }, - "template_url": { - Type: schema.TypeString, - Optional: true, - }, - "capabilities": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "disable_rollback": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - "notification_arns": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "on_failure": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "parameters": { - Type: schema.TypeMap, - Optional: true, - Computed: true, - }, - "outputs": { - Type: schema.TypeMap, - Computed: true, - }, - "policy_body": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.ValidateJsonString, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - }, - "policy_url": { - Type: schema.TypeString, - Optional: true, - }, - "timeout_in_minutes": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - }, - "iam_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsCloudFormationStackCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cfconn - - input := cloudformation.CreateStackInput{ - StackName: aws.String(d.Get("name").(string)), - } - if v, ok := d.GetOk("template_body"); ok { - template, err := normalizeCloudFormationTemplate(v) - if err != nil { - return fmt.Errorf("template body contains an invalid JSON or YAML: %s", err) - } - input.TemplateBody = aws.String(template) - } - if v, ok := d.GetOk("template_url"); ok { - input.TemplateURL = aws.String(v.(string)) - } - if v, ok := d.GetOk("capabilities"); ok { - input.Capabilities = expandStringList(v.(*schema.Set).List()) - } - if v, ok := d.GetOk("disable_rollback"); ok { - input.DisableRollback = aws.Bool(v.(bool)) - } - if v, ok := d.GetOk("notification_arns"); ok { - input.NotificationARNs = expandStringList(v.(*schema.Set).List()) - } - if v, ok := d.GetOk("on_failure"); ok { - input.OnFailure = aws.String(v.(string)) - } - if v, ok := d.GetOk("parameters"); ok { - input.Parameters = expandCloudFormationParameters(v.(map[string]interface{})) - } - if v, ok := d.GetOk("policy_body"); ok { - policy, err := structure.NormalizeJsonString(v) - if err != nil { - return fmt.Errorf("policy body contains an invalid JSON: %s", err) - } - input.StackPolicyBody = aws.String(policy) - } - if v, ok := d.GetOk("policy_url"); ok { - input.StackPolicyURL = aws.String(v.(string)) - } - if v, ok := d.GetOk("tags"); ok { - input.Tags = expandCloudFormationTags(v.(map[string]interface{})) - } - if v, ok := d.GetOk("timeout_in_minutes"); ok { - m := int64(v.(int)) - input.TimeoutInMinutes = aws.Int64(m) - } - if v, ok := d.GetOk("iam_role_arn"); ok { - input.RoleARN = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating CloudFormation Stack: %s", input) - resp, err := conn.CreateStack(&input) - if err != nil { - return fmt.Errorf("Creating CloudFormation stack failed: %s", err.Error()) - } - - d.SetId(*resp.StackId) - var lastStatus string - - wait := resource.StateChangeConf{ - Pending: []string{ - "CREATE_IN_PROGRESS", - "DELETE_IN_PROGRESS", - "ROLLBACK_IN_PROGRESS", - }, - Target: []string{ - "CREATE_COMPLETE", - "CREATE_FAILED", - "DELETE_COMPLETE", - "DELETE_FAILED", - "ROLLBACK_COMPLETE", - "ROLLBACK_FAILED", - }, - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 1 * time.Second, - Refresh: func() (interface{}, string, error) { - resp, err := conn.DescribeStacks(&cloudformation.DescribeStacksInput{ - StackName: aws.String(d.Id()), - }) - if err != nil { - log.Printf("[ERROR] Failed to describe stacks: %s", err) - return nil, "", err - } - if len(resp.Stacks) == 0 { - // This shouldn't happen unless CloudFormation is inconsistent - // See https://github.com/hashicorp/terraform/issues/5487 - log.Printf("[WARN] CloudFormation stack %q not found.\nresponse: %q", - d.Id(), resp) - return resp, "", fmt.Errorf( - "CloudFormation stack %q vanished unexpectedly during creation.\n"+ - "Unless you knowingly manually deleted the stack "+ - "please report this as bug at https://github.com/hashicorp/terraform/issues\n"+ - "along with the config & Terraform version & the details below:\n"+ - "Full API response: %s\n", - d.Id(), resp) - } - - status := *resp.Stacks[0].StackStatus - lastStatus = status - log.Printf("[DEBUG] Current CloudFormation stack status: %q", status) - - return resp, status, err - }, - } - - _, err = wait.WaitForState() - if err != nil { - return err - } - - if lastStatus == "ROLLBACK_COMPLETE" || lastStatus == "ROLLBACK_FAILED" { - reasons, err := getCloudFormationRollbackReasons(d.Id(), nil, conn) - if err != nil { - return fmt.Errorf("Failed getting rollback reasons: %q", err.Error()) - } - - return fmt.Errorf("%s: %q", lastStatus, reasons) - } - if lastStatus == "DELETE_COMPLETE" || lastStatus == "DELETE_FAILED" { - reasons, err := getCloudFormationDeletionReasons(d.Id(), conn) - if err != nil { - return fmt.Errorf("Failed getting deletion reasons: %q", err.Error()) - } - - d.SetId("") - return fmt.Errorf("%s: %q", lastStatus, reasons) - } - if lastStatus == "CREATE_FAILED" { - reasons, err := getCloudFormationFailures(d.Id(), conn) - if err != nil { - return fmt.Errorf("Failed getting failure reasons: %q", err.Error()) - } - return fmt.Errorf("%s: %q", lastStatus, reasons) - } - - log.Printf("[INFO] CloudFormation Stack %q created", d.Id()) - - return resourceAwsCloudFormationStackRead(d, meta) -} - -func resourceAwsCloudFormationStackRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cfconn - - input := &cloudformation.DescribeStacksInput{ - StackName: aws.String(d.Id()), - } - resp, err := conn.DescribeStacks(input) - if err != nil { - awsErr, ok := err.(awserr.Error) - // ValidationError: Stack with id % does not exist - if ok && awsErr.Code() == "ValidationError" { - log.Printf("[WARN] Removing CloudFormation stack %s as it's already gone", d.Id()) - d.SetId("") - return nil - } - - return err - } - - stacks := resp.Stacks - if len(stacks) < 1 { - log.Printf("[WARN] Removing CloudFormation stack %s as it's already gone", d.Id()) - d.SetId("") - return nil - } - for _, s := range stacks { - if *s.StackId == d.Id() && *s.StackStatus == "DELETE_COMPLETE" { - log.Printf("[DEBUG] Removing CloudFormation stack %s"+ - " as it has been already deleted", d.Id()) - d.SetId("") - return nil - } - } - - tInput := cloudformation.GetTemplateInput{ - StackName: aws.String(d.Id()), - } - out, err := conn.GetTemplate(&tInput) - if err != nil { - return err - } - - template, err := normalizeCloudFormationTemplate(*out.TemplateBody) - if err != nil { - return fmt.Errorf("template body contains an invalid JSON or YAML: %s", err) - } - d.Set("template_body", template) - - stack := stacks[0] - log.Printf("[DEBUG] Received CloudFormation stack: %s", stack) - - d.Set("name", stack.StackName) - d.Set("iam_role_arn", stack.RoleARN) - - if stack.TimeoutInMinutes != nil { - d.Set("timeout_in_minutes", int(*stack.TimeoutInMinutes)) - } - if stack.Description != nil { - d.Set("description", stack.Description) - } - if stack.DisableRollback != nil { - d.Set("disable_rollback", stack.DisableRollback) - } - if len(stack.NotificationARNs) > 0 { - err = d.Set("notification_arns", schema.NewSet(schema.HashString, flattenStringList(stack.NotificationARNs))) - if err != nil { - return err - } - } - - originalParams := d.Get("parameters").(map[string]interface{}) - err = d.Set("parameters", flattenCloudFormationParameters(stack.Parameters, originalParams)) - if err != nil { - return err - } - - err = d.Set("tags", flattenCloudFormationTags(stack.Tags)) - if err != nil { - return err - } - - err = d.Set("outputs", flattenCloudFormationOutputs(stack.Outputs)) - if err != nil { - return err - } - - if len(stack.Capabilities) > 0 { - err = d.Set("capabilities", schema.NewSet(schema.HashString, flattenStringList(stack.Capabilities))) - if err != nil { - return err - } - } - - return nil -} - -func resourceAwsCloudFormationStackUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cfconn - - input := &cloudformation.UpdateStackInput{ - StackName: aws.String(d.Id()), - } - - // Either TemplateBody, TemplateURL or UsePreviousTemplate are required - if v, ok := d.GetOk("template_url"); ok { - input.TemplateURL = aws.String(v.(string)) - } - if v, ok := d.GetOk("template_body"); ok && input.TemplateURL == nil { - template, err := normalizeCloudFormationTemplate(v) - if err != nil { - return fmt.Errorf("template body contains an invalid JSON or YAML: %s", err) - } - input.TemplateBody = aws.String(template) - } - - // Capabilities must be present whether they are changed or not - if v, ok := d.GetOk("capabilities"); ok { - input.Capabilities = expandStringList(v.(*schema.Set).List()) - } - - if d.HasChange("notification_arns") { - input.NotificationARNs = expandStringList(d.Get("notification_arns").(*schema.Set).List()) - } - - // Parameters must be present whether they are changed or not - if v, ok := d.GetOk("parameters"); ok { - input.Parameters = expandCloudFormationParameters(v.(map[string]interface{})) - } - - if v, ok := d.GetOk("tags"); ok { - input.Tags = expandCloudFormationTags(v.(map[string]interface{})) - } - - if d.HasChange("policy_body") { - policy, err := structure.NormalizeJsonString(d.Get("policy_body")) - if err != nil { - return fmt.Errorf("policy body contains an invalid JSON: %s", err) - } - input.StackPolicyBody = aws.String(policy) - } - if d.HasChange("policy_url") { - input.StackPolicyURL = aws.String(d.Get("policy_url").(string)) - } - - if d.HasChange("iam_role_arn") { - input.RoleARN = aws.String(d.Get("iam_role_arn").(string)) - } - - log.Printf("[DEBUG] Updating CloudFormation stack: %s", input) - _, err := conn.UpdateStack(input) - if err != nil { - awsErr, ok := err.(awserr.Error) - // ValidationError: No updates are to be performed. - if !ok || - awsErr.Code() != "ValidationError" || - awsErr.Message() != "No updates are to be performed." { - return err - } - - log.Printf("[DEBUG] Current CloudFormation stack has no updates") - } - - lastUpdatedTime, err := getLastCfEventTimestamp(d.Id(), conn) - if err != nil { - return err - } - - var lastStatus string - var stackId string - wait := resource.StateChangeConf{ - Pending: []string{ - "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS", - "UPDATE_IN_PROGRESS", - "UPDATE_ROLLBACK_IN_PROGRESS", - "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS", - }, - Target: []string{ - "CREATE_COMPLETE", // If no stack update was performed - "UPDATE_COMPLETE", - "UPDATE_ROLLBACK_COMPLETE", - "UPDATE_ROLLBACK_FAILED", - }, - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 5 * time.Second, - Refresh: func() (interface{}, string, error) { - resp, err := conn.DescribeStacks(&cloudformation.DescribeStacksInput{ - StackName: aws.String(d.Id()), - }) - if err != nil { - log.Printf("[ERROR] Failed to describe stacks: %s", err) - return nil, "", err - } - - stackId = aws.StringValue(resp.Stacks[0].StackId) - - status := *resp.Stacks[0].StackStatus - lastStatus = status - log.Printf("[DEBUG] Current CloudFormation stack status: %q", status) - - return resp, status, err - }, - } - - _, err = wait.WaitForState() - if err != nil { - return err - } - - if lastStatus == "UPDATE_ROLLBACK_COMPLETE" || lastStatus == "UPDATE_ROLLBACK_FAILED" { - reasons, err := getCloudFormationRollbackReasons(stackId, lastUpdatedTime, conn) - if err != nil { - return fmt.Errorf("Failed getting details about rollback: %q", err.Error()) - } - - return fmt.Errorf("%s: %q", lastStatus, reasons) - } - - log.Printf("[DEBUG] CloudFormation stack %q has been updated", stackId) - - return resourceAwsCloudFormationStackRead(d, meta) -} - -func resourceAwsCloudFormationStackDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cfconn - - input := &cloudformation.DeleteStackInput{ - StackName: aws.String(d.Id()), - } - log.Printf("[DEBUG] Deleting CloudFormation stack %s", input) - _, err := conn.DeleteStack(input) - if err != nil { - awsErr, ok := err.(awserr.Error) - if !ok { - return err - } - - if awsErr.Code() == "ValidationError" { - // Ignore stack which has been already deleted - return nil - } - return err - } - var lastStatus string - wait := resource.StateChangeConf{ - Pending: []string{ - "DELETE_IN_PROGRESS", - "ROLLBACK_IN_PROGRESS", - }, - Target: []string{ - "DELETE_COMPLETE", - "DELETE_FAILED", - }, - Timeout: d.Timeout(schema.TimeoutDelete), - MinTimeout: 5 * time.Second, - Refresh: func() (interface{}, string, error) { - resp, err := conn.DescribeStacks(&cloudformation.DescribeStacksInput{ - StackName: aws.String(d.Id()), - }) - if err != nil { - awsErr, ok := err.(awserr.Error) - if !ok { - return nil, "", err - } - - log.Printf("[DEBUG] Error when deleting CloudFormation stack: %s: %s", - awsErr.Code(), awsErr.Message()) - - // ValidationError: Stack with id % does not exist - if awsErr.Code() == "ValidationError" { - return resp, "DELETE_COMPLETE", nil - } - return nil, "", err - } - - if len(resp.Stacks) == 0 { - log.Printf("[DEBUG] CloudFormation stack %q is already gone", d.Id()) - return resp, "DELETE_COMPLETE", nil - } - - status := *resp.Stacks[0].StackStatus - lastStatus = status - log.Printf("[DEBUG] Current CloudFormation stack status: %q", status) - - return resp, status, err - }, - } - - _, err = wait.WaitForState() - if err != nil { - return err - } - - if lastStatus == "DELETE_FAILED" { - reasons, err := getCloudFormationFailures(d.Id(), conn) - if err != nil { - return fmt.Errorf("Failed getting reasons of failure: %q", err.Error()) - } - - return fmt.Errorf("%s: %q", lastStatus, reasons) - } - - log.Printf("[DEBUG] CloudFormation stack %q has been deleted", d.Id()) - - return nil -} - -// getLastCfEventTimestamp takes the first event in a list -// of events ordered from the newest to the oldest -// and extracts timestamp from it -// LastUpdatedTime only provides last >successful< updated time -func getLastCfEventTimestamp(stackName string, conn *cloudformation.CloudFormation) ( - *time.Time, error) { - output, err := conn.DescribeStackEvents(&cloudformation.DescribeStackEventsInput{ - StackName: aws.String(stackName), - }) - if err != nil { - return nil, err - } - - return output.StackEvents[0].Timestamp, nil -} - -func getCloudFormationRollbackReasons(stackId string, afterTime *time.Time, conn *cloudformation.CloudFormation) ([]string, error) { - var failures []string - - err := conn.DescribeStackEventsPages(&cloudformation.DescribeStackEventsInput{ - StackName: aws.String(stackId), - }, func(page *cloudformation.DescribeStackEventsOutput, lastPage bool) bool { - for _, e := range page.StackEvents { - if afterTime != nil && !e.Timestamp.After(*afterTime) { - continue - } - - if cfStackEventIsFailure(e) || cfStackEventIsRollback(e) { - failures = append(failures, *e.ResourceStatusReason) - } - } - return !lastPage - }) - - return failures, err -} - -func getCloudFormationDeletionReasons(stackId string, conn *cloudformation.CloudFormation) ([]string, error) { - var failures []string - - err := conn.DescribeStackEventsPages(&cloudformation.DescribeStackEventsInput{ - StackName: aws.String(stackId), - }, func(page *cloudformation.DescribeStackEventsOutput, lastPage bool) bool { - for _, e := range page.StackEvents { - if cfStackEventIsFailure(e) || cfStackEventIsStackDeletion(e) { - failures = append(failures, *e.ResourceStatusReason) - } - } - return !lastPage - }) - - return failures, err -} - -func getCloudFormationFailures(stackId string, conn *cloudformation.CloudFormation) ([]string, error) { - var failures []string - - err := conn.DescribeStackEventsPages(&cloudformation.DescribeStackEventsInput{ - StackName: aws.String(stackId), - }, func(page *cloudformation.DescribeStackEventsOutput, lastPage bool) bool { - for _, e := range page.StackEvents { - if cfStackEventIsFailure(e) { - failures = append(failures, *e.ResourceStatusReason) - } - } - return !lastPage - }) - - return failures, err -} - -func cfStackEventIsFailure(event *cloudformation.StackEvent) bool { - failRe := regexp.MustCompile("_FAILED$") - return failRe.MatchString(*event.ResourceStatus) && event.ResourceStatusReason != nil -} - -func cfStackEventIsRollback(event *cloudformation.StackEvent) bool { - rollbackRe := regexp.MustCompile("^ROLLBACK_") - return rollbackRe.MatchString(*event.ResourceStatus) && event.ResourceStatusReason != nil -} - -func cfStackEventIsStackDeletion(event *cloudformation.StackEvent) bool { - return *event.ResourceStatus == "DELETE_IN_PROGRESS" && - *event.ResourceType == "AWS::CloudFormation::Stack" && - event.ResourceStatusReason != nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go deleted file mode 100644 index 1825ab02e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go +++ /dev/null @@ -1,908 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/cloudfront" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCloudFrontDistribution() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudFrontDistributionCreate, - Read: resourceAwsCloudFrontDistributionRead, - Update: resourceAwsCloudFrontDistributionUpdate, - Delete: resourceAwsCloudFrontDistributionDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsCloudFrontDistributionImport, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "aliases": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: aliasesHash, - }, - "cache_behavior": { - Type: schema.TypeSet, - Optional: true, - Set: cacheBehaviorHash, - ConflictsWith: []string{"ordered_cache_behavior"}, - Deprecated: "Use `ordered_cache_behavior` instead", - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "allowed_methods": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "cached_methods": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "compress": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "default_ttl": { - Type: schema.TypeInt, - Optional: true, - Default: 86400, - }, - "field_level_encryption_id": { - Type: schema.TypeString, - Optional: true, - }, - "forwarded_values": { - Type: schema.TypeSet, - Required: true, - Set: forwardedValuesHash, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cookies": { - Type: schema.TypeSet, - Required: true, - Set: cookiePreferenceHash, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "forward": { - Type: schema.TypeString, - Required: true, - }, - "whitelisted_names": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "headers": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "query_string": { - Type: schema.TypeBool, - Required: true, - }, - "query_string_cache_keys": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "lambda_function_association": { - Type: schema.TypeSet, - Optional: true, - MaxItems: 4, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "event_type": { - Type: schema.TypeString, - Required: true, - }, - "lambda_arn": { - Type: schema.TypeString, - Required: true, - }, - "include_body": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - Set: lambdaFunctionAssociationHash, - }, - "max_ttl": { - Type: schema.TypeInt, - Optional: true, - Default: 31536000, - }, - "min_ttl": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - "path_pattern": { - Type: schema.TypeString, - Required: true, - }, - "smooth_streaming": { - Type: schema.TypeBool, - Optional: true, - }, - "target_origin_id": { - Type: schema.TypeString, - Required: true, - }, - "trusted_signers": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "viewer_protocol_policy": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "ordered_cache_behavior": { - Type: schema.TypeList, - Optional: true, - ConflictsWith: []string{"cache_behavior"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "allowed_methods": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "cached_methods": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "compress": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "default_ttl": { - Type: schema.TypeInt, - Optional: true, - Default: 86400, - }, - "field_level_encryption_id": { - Type: schema.TypeString, - Optional: true, - }, - "forwarded_values": { - Type: schema.TypeSet, - Required: true, - Set: forwardedValuesHash, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cookies": { - Type: schema.TypeSet, - Required: true, - Set: cookiePreferenceHash, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "forward": { - Type: schema.TypeString, - Required: true, - }, - "whitelisted_names": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "headers": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "query_string": { - Type: schema.TypeBool, - Required: true, - }, - "query_string_cache_keys": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "lambda_function_association": { - Type: schema.TypeSet, - Optional: true, - MaxItems: 4, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "event_type": { - Type: schema.TypeString, - Required: true, - }, - "lambda_arn": { - Type: schema.TypeString, - Required: true, - }, - "include_body": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - Set: lambdaFunctionAssociationHash, - }, - "max_ttl": { - Type: schema.TypeInt, - Optional: true, - Default: 31536000, - }, - "min_ttl": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - "path_pattern": { - Type: schema.TypeString, - Required: true, - }, - "smooth_streaming": { - Type: schema.TypeBool, - Optional: true, - }, - "target_origin_id": { - Type: schema.TypeString, - Required: true, - }, - "trusted_signers": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "viewer_protocol_policy": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "comment": { - Type: schema.TypeString, - Optional: true, - }, - "custom_error_response": { - Type: schema.TypeSet, - Optional: true, - Set: customErrorResponseHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "error_caching_min_ttl": { - Type: schema.TypeInt, - Optional: true, - }, - "error_code": { - Type: schema.TypeInt, - Required: true, - }, - "response_code": { - Type: schema.TypeInt, - Optional: true, - }, - "response_page_path": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "default_cache_behavior": { - Type: schema.TypeSet, - Required: true, - Set: defaultCacheBehaviorHash, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "allowed_methods": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "cached_methods": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "compress": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "default_ttl": { - Type: schema.TypeInt, - Optional: true, - Default: 86400, - }, - "field_level_encryption_id": { - Type: schema.TypeString, - Optional: true, - }, - "forwarded_values": { - Type: schema.TypeSet, - Required: true, - Set: forwardedValuesHash, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cookies": { - Type: schema.TypeSet, - Required: true, - Set: cookiePreferenceHash, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "forward": { - Type: schema.TypeString, - Required: true, - }, - "whitelisted_names": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "headers": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "query_string": { - Type: schema.TypeBool, - Required: true, - }, - "query_string_cache_keys": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "lambda_function_association": { - Type: schema.TypeSet, - Optional: true, - MaxItems: 4, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "event_type": { - Type: schema.TypeString, - Required: true, - }, - "lambda_arn": { - Type: schema.TypeString, - Required: true, - }, - "include_body": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - Set: lambdaFunctionAssociationHash, - }, - "max_ttl": { - Type: schema.TypeInt, - Optional: true, - Default: 31536000, - }, - "min_ttl": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - "smooth_streaming": { - Type: schema.TypeBool, - Optional: true, - }, - "target_origin_id": { - Type: schema.TypeString, - Required: true, - }, - "trusted_signers": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "viewer_protocol_policy": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "default_root_object": { - Type: schema.TypeString, - Optional: true, - }, - "enabled": { - Type: schema.TypeBool, - Required: true, - }, - "http_version": { - Type: schema.TypeString, - Optional: true, - Default: "http2", - ValidateFunc: validation.StringInSlice([]string{"http1.1", "http2"}, false), - }, - "logging_config": { - Type: schema.TypeSet, - Optional: true, - Set: loggingConfigHash, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Required: true, - }, - "include_cookies": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "prefix": { - Type: schema.TypeString, - Optional: true, - Default: "", - }, - }, - }, - }, - "origin": { - Type: schema.TypeSet, - Required: true, - Set: originHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "custom_origin_config": { - Type: schema.TypeSet, - Optional: true, - ConflictsWith: []string{"origin.s3_origin_config"}, - Set: customOriginConfigHash, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "http_port": { - Type: schema.TypeInt, - Required: true, - }, - "https_port": { - Type: schema.TypeInt, - Required: true, - }, - "origin_keepalive_timeout": { - Type: schema.TypeInt, - Optional: true, - Default: 5, - }, - "origin_read_timeout": { - Type: schema.TypeInt, - Optional: true, - Default: 30, - }, - "origin_protocol_policy": { - Type: schema.TypeString, - Required: true, - }, - "origin_ssl_protocols": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "domain_name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.NoZeroValues, - }, - "custom_header": { - Type: schema.TypeSet, - Optional: true, - Set: originCustomHeaderHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "origin_id": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.NoZeroValues, - }, - "origin_path": { - Type: schema.TypeString, - Optional: true, - }, - "s3_origin_config": { - Type: schema.TypeSet, - Optional: true, - ConflictsWith: []string{"origin.custom_origin_config"}, - Set: s3OriginConfigHash, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "origin_access_identity": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - }, - }, - "price_class": { - Type: schema.TypeString, - Optional: true, - Default: "PriceClass_All", - }, - "restrictions": { - Type: schema.TypeSet, - Required: true, - Set: restrictionsHash, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "geo_restriction": { - Type: schema.TypeSet, - Required: true, - Set: geoRestrictionHash, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "locations": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "restriction_type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - }, - }, - "viewer_certificate": { - Type: schema.TypeSet, - Required: true, - Set: viewerCertificateHash, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "acm_certificate_arn": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"viewer_certificate.cloudfront_default_certificate", "viewer_certificate.iam_certificate_id"}, - }, - "cloudfront_default_certificate": { - Type: schema.TypeBool, - Optional: true, - ConflictsWith: []string{"viewer_certificate.acm_certificate_arn", "viewer_certificate.iam_certificate_id"}, - }, - "iam_certificate_id": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"viewer_certificate.acm_certificate_arn", "viewer_certificate.cloudfront_default_certificate"}, - }, - "minimum_protocol_version": { - Type: schema.TypeString, - Optional: true, - Default: "TLSv1", - }, - "ssl_support_method": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "web_acl_id": { - Type: schema.TypeString, - Optional: true, - }, - "caller_reference": { - Type: schema.TypeString, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "active_trusted_signers": { - Type: schema.TypeMap, - Computed: true, - }, - "domain_name": { - Type: schema.TypeString, - Computed: true, - }, - "last_modified_time": { - Type: schema.TypeString, - Computed: true, - }, - "in_progress_validation_batches": { - Type: schema.TypeInt, - Computed: true, - }, - "etag": { - Type: schema.TypeString, - Computed: true, - }, - "hosted_zone_id": { - Type: schema.TypeString, - Computed: true, - }, - // retain_on_delete is a non-API attribute that may help facilitate speedy - // deletion of a resoruce. It's mainly here for testing purposes, so - // enable at your own risk. - "retain_on_delete": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "is_ipv6_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsCloudFrontDistributionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudfrontconn - - params := &cloudfront.CreateDistributionWithTagsInput{ - DistributionConfigWithTags: &cloudfront.DistributionConfigWithTags{ - DistributionConfig: expandDistributionConfig(d), - Tags: tagsFromMapCloudFront(d.Get("tags").(map[string]interface{})), - }, - } - - var resp *cloudfront.CreateDistributionWithTagsOutput - // Handle eventual consistency issues - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - resp, err = conn.CreateDistributionWithTags(params) - if err != nil { - // ACM and IAM certificate eventual consistency - // InvalidViewerCertificate: The specified SSL certificate doesn't exist, isn't in us-east-1 region, isn't valid, or doesn't include a valid certificate chain. - if isAWSErr(err, cloudfront.ErrCodeInvalidViewerCertificate, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error creating CloudFront Distribution: %s", err) - } - - d.SetId(*resp.Distribution.Id) - return resourceAwsCloudFrontDistributionRead(d, meta) -} - -func resourceAwsCloudFrontDistributionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudfrontconn - params := &cloudfront.GetDistributionInput{ - Id: aws.String(d.Id()), - } - - resp, err := conn.GetDistribution(params) - if err != nil { - if errcode, ok := err.(awserr.Error); ok && errcode.Code() == "NoSuchDistribution" { - log.Printf("[WARN] No Distribution found: %s", d.Id()) - d.SetId("") - return nil - } - - return err - } - - // Update attributes from DistributionConfig - err = flattenDistributionConfig(d, resp.Distribution.DistributionConfig) - if err != nil { - return err - } - // Update other attributes outside of DistributionConfig - err = d.Set("active_trusted_signers", flattenActiveTrustedSigners(resp.Distribution.ActiveTrustedSigners)) - if err != nil { - return err - } - d.Set("status", resp.Distribution.Status) - d.Set("domain_name", resp.Distribution.DomainName) - d.Set("last_modified_time", aws.String(resp.Distribution.LastModifiedTime.String())) - d.Set("in_progress_validation_batches", resp.Distribution.InProgressInvalidationBatches) - d.Set("etag", resp.ETag) - d.Set("arn", resp.Distribution.ARN) - - tagResp, err := conn.ListTagsForResource(&cloudfront.ListTagsForResourceInput{ - Resource: aws.String(d.Get("arn").(string)), - }) - - if err != nil { - return fmt.Errorf( - "Error retrieving EC2 tags for CloudFront Distribution %q (ARN: %q): %s", - d.Id(), d.Get("arn").(string), err) - } - - if err := d.Set("tags", tagsToMapCloudFront(tagResp.Tags)); err != nil { - return err - } - - return nil -} - -func resourceAwsCloudFrontDistributionUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudfrontconn - params := &cloudfront.UpdateDistributionInput{ - Id: aws.String(d.Id()), - DistributionConfig: expandDistributionConfig(d), - IfMatch: aws.String(d.Get("etag").(string)), - } - - // Handle eventual consistency issues - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.UpdateDistribution(params) - if err != nil { - // ACM and IAM certificate eventual consistency - // InvalidViewerCertificate: The specified SSL certificate doesn't exist, isn't in us-east-1 region, isn't valid, or doesn't include a valid certificate chain. - if isAWSErr(err, cloudfront.ErrCodeInvalidViewerCertificate, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error updating CloudFront Distribution (%s): %s", d.Id(), err) - } - - if err := setTagsCloudFront(conn, d, d.Get("arn").(string)); err != nil { - return err - } - - return resourceAwsCloudFrontDistributionRead(d, meta) -} - -func resourceAwsCloudFrontDistributionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudfrontconn - - // manually disable the distribution first - d.Set("enabled", false) - err := resourceAwsCloudFrontDistributionUpdate(d, meta) - if err != nil { - return err - } - - // skip delete if retain_on_delete is enabled - if d.Get("retain_on_delete").(bool) { - log.Printf("[WARN] Removing CloudFront Distribution ID %q with `retain_on_delete` set. Please delete this distribution manually.", d.Id()) - return nil - } - - // Distribution needs to be in deployed state again before it can be deleted. - err = resourceAwsCloudFrontDistributionWaitUntilDeployed(d.Id(), meta) - if err != nil { - return err - } - - // now delete - params := &cloudfront.DeleteDistributionInput{ - Id: aws.String(d.Id()), - IfMatch: aws.String(d.Get("etag").(string)), - } - - // Eventual consistency for "deployed" state - err = resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteDistribution(params) - if err != nil { - if isAWSErr(err, cloudfront.ErrCodeDistributionNotDisabled, "The distribution you are trying to delete has not been disabled.") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("CloudFront Distribution %s cannot be deleted: %s", d.Id(), err) - } - - return nil -} - -// resourceAwsCloudFrontWebDistributionWaitUntilDeployed blocks until the -// distribution is deployed. It currently takes exactly 15 minutes to deploy -// but that might change in the future. -func resourceAwsCloudFrontDistributionWaitUntilDeployed(id string, meta interface{}) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{"InProgress"}, - Target: []string{"Deployed"}, - Refresh: resourceAwsCloudFrontWebDistributionStateRefreshFunc(id, meta), - Timeout: 70 * time.Minute, - MinTimeout: 15 * time.Second, - Delay: 10 * time.Minute, - } - - _, err := stateConf.WaitForState() - return err -} - -// The refresh function for resourceAwsCloudFrontWebDistributionWaitUntilDeployed. -func resourceAwsCloudFrontWebDistributionStateRefreshFunc(id string, meta interface{}) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - conn := meta.(*AWSClient).cloudfrontconn - params := &cloudfront.GetDistributionInput{ - Id: aws.String(id), - } - - resp, err := conn.GetDistribution(params) - if err != nil { - log.Printf("[WARN] Error retrieving CloudFront Distribution %q details: %s", id, err) - return nil, "", err - } - - if resp == nil { - return nil, "", nil - } - - return resp.Distribution, *resp.Distribution.Status, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_origin_access_identity.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_origin_access_identity.go deleted file mode 100644 index f568bf5dc..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_origin_access_identity.go +++ /dev/null @@ -1,140 +0,0 @@ -package aws - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/cloudfront" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsCloudFrontOriginAccessIdentity() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudFrontOriginAccessIdentityCreate, - Read: resourceAwsCloudFrontOriginAccessIdentityRead, - Update: resourceAwsCloudFrontOriginAccessIdentityUpdate, - Delete: resourceAwsCloudFrontOriginAccessIdentityDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "comment": { - Type: schema.TypeString, - Optional: true, - Default: "", - }, - "caller_reference": { - Type: schema.TypeString, - Computed: true, - }, - "cloudfront_access_identity_path": { - Type: schema.TypeString, - Computed: true, - }, - "etag": { - Type: schema.TypeString, - Computed: true, - }, - "iam_arn": { - Type: schema.TypeString, - Computed: true, - }, - "s3_canonical_user_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsCloudFrontOriginAccessIdentityCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudfrontconn - params := &cloudfront.CreateCloudFrontOriginAccessIdentityInput{ - CloudFrontOriginAccessIdentityConfig: expandOriginAccessIdentityConfig(d), - } - - resp, err := conn.CreateCloudFrontOriginAccessIdentity(params) - if err != nil { - return err - } - d.SetId(*resp.CloudFrontOriginAccessIdentity.Id) - return resourceAwsCloudFrontOriginAccessIdentityRead(d, meta) -} - -func resourceAwsCloudFrontOriginAccessIdentityRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudfrontconn - params := &cloudfront.GetCloudFrontOriginAccessIdentityInput{ - Id: aws.String(d.Id()), - } - - resp, err := conn.GetCloudFrontOriginAccessIdentity(params) - if err != nil { - return err - } - - // Update attributes from DistributionConfig - flattenOriginAccessIdentityConfig(d, resp.CloudFrontOriginAccessIdentity.CloudFrontOriginAccessIdentityConfig) - // Update other attributes outside of DistributionConfig - d.SetId(*resp.CloudFrontOriginAccessIdentity.Id) - d.Set("etag", resp.ETag) - d.Set("s3_canonical_user_id", resp.CloudFrontOriginAccessIdentity.S3CanonicalUserId) - d.Set("cloudfront_access_identity_path", fmt.Sprintf("origin-access-identity/cloudfront/%s", *resp.CloudFrontOriginAccessIdentity.Id)) - iamArn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "iam", - AccountID: "cloudfront", - Resource: fmt.Sprintf("user/CloudFront Origin Access Identity %s", *resp.CloudFrontOriginAccessIdentity.Id), - }.String() - d.Set("iam_arn", iamArn) - return nil -} - -func resourceAwsCloudFrontOriginAccessIdentityUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudfrontconn - params := &cloudfront.UpdateCloudFrontOriginAccessIdentityInput{ - Id: aws.String(d.Id()), - CloudFrontOriginAccessIdentityConfig: expandOriginAccessIdentityConfig(d), - IfMatch: aws.String(d.Get("etag").(string)), - } - _, err := conn.UpdateCloudFrontOriginAccessIdentity(params) - if err != nil { - return err - } - - return resourceAwsCloudFrontOriginAccessIdentityRead(d, meta) -} - -func resourceAwsCloudFrontOriginAccessIdentityDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudfrontconn - params := &cloudfront.DeleteCloudFrontOriginAccessIdentityInput{ - Id: aws.String(d.Id()), - IfMatch: aws.String(d.Get("etag").(string)), - } - - _, err := conn.DeleteCloudFrontOriginAccessIdentity(params) - - return err -} - -func expandOriginAccessIdentityConfig(d *schema.ResourceData) *cloudfront.OriginAccessIdentityConfig { - originAccessIdentityConfig := &cloudfront.OriginAccessIdentityConfig{ - Comment: aws.String(d.Get("comment").(string)), - } - // This sets CallerReference if it's still pending computation (ie: new resource) - if v, ok := d.GetOk("caller_reference"); !ok { - originAccessIdentityConfig.CallerReference = aws.String(time.Now().Format(time.RFC3339Nano)) - } else { - originAccessIdentityConfig.CallerReference = aws.String(v.(string)) - } - return originAccessIdentityConfig -} - -func flattenOriginAccessIdentityConfig(d *schema.ResourceData, originAccessIdentityConfig *cloudfront.OriginAccessIdentityConfig) { - if originAccessIdentityConfig.Comment != nil { - d.Set("comment", originAccessIdentityConfig.Comment) - } - d.Set("caller_reference", originAccessIdentityConfig.CallerReference) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_public_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_public_key.go deleted file mode 100644 index c0e20bcb7..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_public_key.go +++ /dev/null @@ -1,170 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudfront" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsCloudFrontPublicKey() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudFrontPublicKeyCreate, - Read: resourceAwsCloudFrontPublicKeyRead, - Update: resourceAwsCloudFrontPublicKeyUpdate, - Delete: resourceAwsCloudFrontPublicKeyDelete, - - Schema: map[string]*schema.Schema{ - "caller_reference": { - Type: schema.TypeString, - Computed: true, - }, - "comment": { - Type: schema.TypeString, - Optional: true, - }, - "encoded_key": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "etag": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateCloudFrontPublicKeyName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateCloudFrontPublicKeyNamePrefix, - }, - }, - } -} - -func resourceAwsCloudFrontPublicKeyCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudfrontconn - - if v, ok := d.GetOk("name"); ok { - d.Set("name", v.(string)) - } else if v, ok := d.GetOk("name_prefix"); ok { - d.Set("name", resource.PrefixedUniqueId(v.(string))) - } else { - d.Set("name", resource.PrefixedUniqueId("tf-")) - } - - request := &cloudfront.CreatePublicKeyInput{ - PublicKeyConfig: expandPublicKeyConfig(d), - } - - log.Println("[DEBUG] Create CloudFront PublicKey:", request) - - output, err := conn.CreatePublicKey(request) - if err != nil { - return fmt.Errorf("error creating CloudFront PublicKey: %s", err) - } - - d.SetId(aws.StringValue(output.PublicKey.Id)) - return resourceAwsCloudFrontPublicKeyRead(d, meta) -} - -func resourceAwsCloudFrontPublicKeyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudfrontconn - request := &cloudfront.GetPublicKeyInput{ - Id: aws.String(d.Id()), - } - - output, err := conn.GetPublicKey(request) - if err != nil { - if isAWSErr(err, cloudfront.ErrCodeNoSuchPublicKey, "") { - log.Printf("[WARN] No PublicKey found: %s, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - if output == nil || output.PublicKey == nil || output.PublicKey.PublicKeyConfig == nil { - log.Printf("[WARN] No PublicKey found: %s, removing from state", d.Id()) - d.SetId("") - return nil - } - publicKeyConfig := output.PublicKey.PublicKeyConfig - - d.Set("encoded_key", publicKeyConfig.EncodedKey) - d.Set("name", publicKeyConfig.Name) - d.Set("comment", publicKeyConfig.Comment) - d.Set("caller_reference", publicKeyConfig.CallerReference) - d.Set("etag", output.ETag) - - return nil -} - -func resourceAwsCloudFrontPublicKeyUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudfrontconn - - request := &cloudfront.UpdatePublicKeyInput{ - Id: aws.String(d.Id()), - PublicKeyConfig: expandPublicKeyConfig(d), - IfMatch: aws.String(d.Get("etag").(string)), - } - - _, err := conn.UpdatePublicKey(request) - if err != nil { - return fmt.Errorf("error updating CloudFront PublicKey (%s): %s", d.Id(), err) - } - - return resourceAwsCloudFrontPublicKeyRead(d, meta) -} - -func resourceAwsCloudFrontPublicKeyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudfrontconn - - request := &cloudfront.DeletePublicKeyInput{ - Id: aws.String(d.Id()), - IfMatch: aws.String(d.Get("etag").(string)), - } - - _, err := conn.DeletePublicKey(request) - if err != nil { - if isAWSErr(err, cloudfront.ErrCodeNoSuchPublicKey, "") { - return nil - } - return err - } - - return nil -} - -func expandPublicKeyConfig(d *schema.ResourceData) *cloudfront.PublicKeyConfig { - publicKeyConfig := &cloudfront.PublicKeyConfig{ - EncodedKey: aws.String(d.Get("encoded_key").(string)), - Name: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("comment"); ok { - publicKeyConfig.Comment = aws.String(v.(string)) - } - - if v, ok := d.GetOk("caller_reference"); ok { - publicKeyConfig.CallerReference = aws.String(v.(string)) - } else { - publicKeyConfig.CallerReference = aws.String(time.Now().Format(time.RFC3339Nano)) - } - - return publicKeyConfig -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudhsm2_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudhsm2_cluster.go deleted file mode 100644 index be666fef0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudhsm2_cluster.go +++ /dev/null @@ -1,363 +0,0 @@ -package aws - -import ( - "fmt" - "github.com/hashicorp/terraform/helper/validation" - "log" - "time" - - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudhsmv2" - "github.com/hashicorp/terraform/helper/resource" -) - -func resourceAwsCloudHsm2Cluster() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudHsm2ClusterCreate, - Read: resourceAwsCloudHsm2ClusterRead, - Update: resourceAwsCloudHsm2ClusterUpdate, - Delete: resourceAwsCloudHsm2ClusterDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(120 * time.Minute), - Update: schema.DefaultTimeout(120 * time.Minute), - Delete: schema.DefaultTimeout(120 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "source_backup_identifier": { - Type: schema.TypeString, - Computed: false, - Optional: true, - ForceNew: true, - }, - - "hsm_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{"hsm1.medium"}, false), - }, - - "subnet_ids": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - ForceNew: true, - }, - - "cluster_id": { - Type: schema.TypeString, - Computed: true, - }, - - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - - "cluster_certificates": { - Type: schema.TypeList, - MaxItems: 1, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cluster_certificate": { - Type: schema.TypeString, - Computed: true, - }, - "cluster_csr": { - Type: schema.TypeString, - Computed: true, - }, - "aws_hardware_certificate": { - Type: schema.TypeString, - Computed: true, - }, - "hsm_certificate": { - Type: schema.TypeString, - Computed: true, - }, - "manufacturer_hardware_certificate": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - - "security_group_id": { - Type: schema.TypeString, - Computed: true, - }, - - "cluster_state": { - Type: schema.TypeString, - Computed: true, - }, - - "tags": tagsSchema(), - }, - } -} - -func describeCloudHsm2Cluster(conn *cloudhsmv2.CloudHSMV2, clusterId string) (*cloudhsmv2.Cluster, error) { - filters := []*string{&clusterId} - result := int64(1) - out, err := conn.DescribeClusters(&cloudhsmv2.DescribeClustersInput{ - Filters: map[string][]*string{ - "clusterIds": filters, - }, - MaxResults: &result, - }) - if err != nil { - log.Printf("[WARN] Error on retrieving CloudHSMv2 Cluster (%s) when waiting: %s", clusterId, err) - return nil, err - } - - var cluster *cloudhsmv2.Cluster - - for _, c := range out.Clusters { - if aws.StringValue(c.ClusterId) == clusterId { - cluster = c - break - } - } - return cluster, nil -} - -func resourceAwsCloudHsm2ClusterRefreshFunc(conn *cloudhsmv2.CloudHSMV2, clusterId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - cluster, err := describeCloudHsm2Cluster(conn, clusterId) - - if cluster == nil { - return 42, "destroyed", nil - } - - if cluster.State != nil { - log.Printf("[DEBUG] CloudHSMv2 Cluster status (%s): %s", clusterId, *cluster.State) - } - - return cluster, aws.StringValue(cluster.State), err - } -} - -func resourceAwsCloudHsm2ClusterCreate(d *schema.ResourceData, meta interface{}) error { - cloudhsm2 := meta.(*AWSClient).cloudhsmv2conn - - input := &cloudhsmv2.CreateClusterInput{ - HsmType: aws.String(d.Get("hsm_type").(string)), - SubnetIds: expandStringSet(d.Get("subnet_ids").(*schema.Set)), - } - - backupId := d.Get("source_backup_identifier").(string) - if len(backupId) != 0 { - input.SourceBackupId = aws.String(backupId) - } - - log.Printf("[DEBUG] CloudHSMv2 Cluster create %s", input) - - var output *cloudhsmv2.CreateClusterOutput - - err := resource.Retry(180*time.Second, func() *resource.RetryError { - var err error - output, err = cloudhsm2.CreateCluster(input) - if err != nil { - if isAWSErr(err, cloudhsmv2.ErrCodeCloudHsmInternalFailureException, "request was rejected because of an AWS CloudHSM internal failure") { - log.Printf("[DEBUG] CloudHSMv2 Cluster re-try creating %s", input) - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return fmt.Errorf("error creating CloudHSMv2 Cluster: %s", err) - } - - d.SetId(aws.StringValue(output.Cluster.ClusterId)) - log.Printf("[INFO] CloudHSMv2 Cluster ID: %s", d.Id()) - log.Println("[INFO] Waiting for CloudHSMv2 Cluster to be available") - - targetState := cloudhsmv2.ClusterStateUninitialized - if len(backupId) > 0 { - targetState = cloudhsmv2.ClusterStateActive - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{cloudhsmv2.ClusterStateCreateInProgress, cloudhsmv2.ClusterStateInitializeInProgress}, - Target: []string{targetState}, - Refresh: resourceAwsCloudHsm2ClusterRefreshFunc(cloudhsm2, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 30 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, errWait := stateConf.WaitForState() - if errWait != nil { - if len(backupId) == 0 { - return fmt.Errorf("[WARN] Error waiting for CloudHSMv2 Cluster state to be \"UNINITIALIZED\": %s", errWait) - } else { - return fmt.Errorf("[WARN] Error waiting for CloudHSMv2 Cluster state to be \"ACTIVE\": %s", errWait) - } - } - - if err := setTagsAwsCloudHsm2Cluster(cloudhsm2, d); err != nil { - return err - } - - return resourceAwsCloudHsm2ClusterRead(d, meta) -} - -func resourceAwsCloudHsm2ClusterRead(d *schema.ResourceData, meta interface{}) error { - - cluster, err := describeCloudHsm2Cluster(meta.(*AWSClient).cloudhsmv2conn, d.Id()) - - if cluster == nil { - log.Printf("[WARN] CloudHSMv2 Cluster (%s) not found", d.Id()) - d.SetId("") - return err - } - - log.Printf("[INFO] Reading CloudHSMv2 Cluster Information: %s", d.Id()) - - d.Set("cluster_id", cluster.ClusterId) - d.Set("cluster_state", cluster.State) - d.Set("security_group_id", cluster.SecurityGroup) - d.Set("vpc_id", cluster.VpcId) - d.Set("source_backup_identifier", cluster.SourceBackupId) - d.Set("hsm_type", cluster.HsmType) - if err := d.Set("cluster_certificates", readCloudHsm2ClusterCertificates(cluster)); err != nil { - return fmt.Errorf("error setting cluster_certificates: %s", err) - } - - var subnets []string - for _, sn := range cluster.SubnetMapping { - subnets = append(subnets, aws.StringValue(sn)) - } - if err := d.Set("subnet_ids", subnets); err != nil { - return fmt.Errorf("Error saving Subnet IDs to state for CloudHSMv2 Cluster (%s): %s", d.Id(), err) - } - - return nil -} - -func resourceAwsCloudHsm2ClusterUpdate(d *schema.ResourceData, meta interface{}) error { - cloudhsm2 := meta.(*AWSClient).cloudhsmv2conn - - if err := setTagsAwsCloudHsm2Cluster(cloudhsm2, d); err != nil { - return err - } - - return resourceAwsCloudHsm2ClusterRead(d, meta) -} - -func resourceAwsCloudHsm2ClusterDelete(d *schema.ResourceData, meta interface{}) error { - cloudhsm2 := meta.(*AWSClient).cloudhsmv2conn - - log.Printf("[DEBUG] CloudHSMv2 Delete cluster: %s", d.Id()) - err := resource.Retry(180*time.Second, func() *resource.RetryError { - var err error - _, err = cloudhsm2.DeleteCluster(&cloudhsmv2.DeleteClusterInput{ - ClusterId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, cloudhsmv2.ErrCodeCloudHsmInternalFailureException, "request was rejected because of an AWS CloudHSM internal failure") { - log.Printf("[DEBUG] CloudHSMv2 Cluster re-try deleting %s", d.Id()) - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return err - } - log.Println("[INFO] Waiting for CloudHSMv2 Cluster to be deleted") - - stateConf := &resource.StateChangeConf{ - Pending: []string{cloudhsmv2.ClusterStateDeleteInProgress}, - Target: []string{cloudhsmv2.ClusterStateDeleted}, - Refresh: resourceAwsCloudHsm2ClusterRefreshFunc(cloudhsm2, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 30 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, errWait := stateConf.WaitForState() - if errWait != nil { - return fmt.Errorf("Error waiting for CloudHSMv2 Cluster state to be \"DELETED\": %s", errWait) - } - - return nil -} - -func setTagsAwsCloudHsm2Cluster(conn *cloudhsmv2.CloudHSMV2, d *schema.ResourceData) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - create, remove := diffTagsGeneric(oraw.(map[string]interface{}), nraw.(map[string]interface{})) - - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %#v", remove) - keys := make([]*string, 0, len(remove)) - for k := range remove { - keys = append(keys, aws.String(k)) - } - - _, err := conn.UntagResource(&cloudhsmv2.UntagResourceInput{ - ResourceId: aws.String(d.Id()), - TagKeyList: keys, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - tagList := make([]*cloudhsmv2.Tag, 0, len(create)) - for k, v := range create { - tagList = append(tagList, &cloudhsmv2.Tag{ - Key: &k, - Value: v, - }) - } - _, err := conn.TagResource(&cloudhsmv2.TagResourceInput{ - ResourceId: aws.String(d.Id()), - TagList: tagList, - }) - if err != nil { - return err - } - } - } - - return nil -} - -func readCloudHsm2ClusterCertificates(cluster *cloudhsmv2.Cluster) []map[string]interface{} { - certs := map[string]interface{}{} - if cluster.Certificates != nil { - if aws.StringValue(cluster.State) == "UNINITIALIZED" { - certs["cluster_csr"] = aws.StringValue(cluster.Certificates.ClusterCsr) - certs["aws_hardware_certificate"] = aws.StringValue(cluster.Certificates.AwsHardwareCertificate) - certs["hsm_certificate"] = aws.StringValue(cluster.Certificates.HsmCertificate) - certs["manufacturer_hardware_certificate"] = aws.StringValue(cluster.Certificates.ManufacturerHardwareCertificate) - } else if aws.StringValue(cluster.State) == "ACTIVE" { - certs["cluster_certificate"] = aws.StringValue(cluster.Certificates.ClusterCertificate) - } - } - if len(certs) > 0 { - return []map[string]interface{}{certs} - } - return []map[string]interface{}{} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudhsm2_hsm.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudhsm2_hsm.go deleted file mode 100644 index 0bb93ff97..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudhsm2_hsm.go +++ /dev/null @@ -1,261 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudhsmv2" - "github.com/hashicorp/terraform/helper/resource" -) - -func resourceAwsCloudHsm2Hsm() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudHsm2HsmCreate, - Read: resourceAwsCloudHsm2HsmRead, - Delete: resourceAwsCloudHsm2HsmDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsCloudHsm2HsmImport, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(120 * time.Minute), - Update: schema.DefaultTimeout(120 * time.Minute), - Delete: schema.DefaultTimeout(120 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "cluster_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "subnet_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "availability_zone": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "ip_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "hsm_id": { - Type: schema.TypeString, - Computed: true, - }, - - "hsm_state": { - Type: schema.TypeString, - Computed: true, - }, - - "hsm_eni_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsCloudHsm2HsmImport( - d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("hsm_id", d.Id()) - return []*schema.ResourceData{d}, nil -} - -func describeHsm(conn *cloudhsmv2.CloudHSMV2, hsmId string) (*cloudhsmv2.Hsm, error) { - out, err := conn.DescribeClusters(&cloudhsmv2.DescribeClustersInput{}) - if err != nil { - log.Printf("[WARN] Error on descibing CloudHSM v2 Cluster: %s", err) - return nil, err - } - - var hsm *cloudhsmv2.Hsm - - for _, c := range out.Clusters { - for _, h := range c.Hsms { - if aws.StringValue(h.HsmId) == hsmId { - hsm = h - break - } - } - } - - return hsm, nil -} - -func resourceAwsCloudHsm2HsmRefreshFunc( - d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - hsm, err := describeHsm(meta.(*AWSClient).cloudhsmv2conn, d.Id()) - - if hsm == nil { - return 42, "destroyed", nil - } - - if hsm.State != nil { - log.Printf("[DEBUG] CloudHSMv2 Cluster status (%s): %s", d.Id(), *hsm.State) - } - - return hsm, aws.StringValue(hsm.State), err - } -} - -func resourceAwsCloudHsm2HsmCreate(d *schema.ResourceData, meta interface{}) error { - cloudhsm2 := meta.(*AWSClient).cloudhsmv2conn - - clusterId := d.Get("cluster_id").(string) - - cluster, err := describeCloudHsm2Cluster(cloudhsm2, clusterId) - - if cluster == nil { - log.Printf("[WARN] Error on retrieving CloudHSMv2 Cluster: %s %s", clusterId, err) - return err - } - - availabilityZone := d.Get("availability_zone").(string) - if len(availabilityZone) == 0 { - subnetId := d.Get("subnet_id").(string) - for az, sn := range cluster.SubnetMapping { - if aws.StringValue(sn) == subnetId { - availabilityZone = az - } - } - } - - input := &cloudhsmv2.CreateHsmInput{ - ClusterId: aws.String(clusterId), - AvailabilityZone: aws.String(availabilityZone), - } - - ipAddress := d.Get("ip_address").(string) - if len(ipAddress) != 0 { - input.IpAddress = aws.String(ipAddress) - } - - log.Printf("[DEBUG] CloudHSMv2 HSM create %s", input) - - var output *cloudhsmv2.CreateHsmOutput - - errRetry := resource.Retry(180*time.Second, func() *resource.RetryError { - var err error - output, err = cloudhsm2.CreateHsm(input) - if err != nil { - if isAWSErr(err, cloudhsmv2.ErrCodeCloudHsmInternalFailureException, "request was rejected because of an AWS CloudHSM internal failure") { - log.Printf("[DEBUG] CloudHSMv2 HSM re-try creating %s", input) - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if errRetry != nil { - return fmt.Errorf("error creating CloudHSM v2 HSM module: %s", errRetry) - } - - d.SetId(aws.StringValue(output.Hsm.HsmId)) - log.Printf("[INFO] CloudHSMv2 HSM Id: %s", d.Id()) - log.Println("[INFO] Waiting for CloudHSMv2 HSM to be available") - - stateConf := &resource.StateChangeConf{ - Pending: []string{cloudhsmv2.HsmStateCreateInProgress, "destroyed"}, - Target: []string{cloudhsmv2.HsmStateActive}, - Refresh: resourceAwsCloudHsm2HsmRefreshFunc(d, meta), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 30 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, errWait := stateConf.WaitForState() - if errWait != nil { - return fmt.Errorf("Error waiting for CloudHSMv2 HSM state to be \"ACTIVE\": %s", errWait) - } - - return resourceAwsCloudHsm2HsmRead(d, meta) -} - -func resourceAwsCloudHsm2HsmRead(d *schema.ResourceData, meta interface{}) error { - - hsm, err := describeHsm(meta.(*AWSClient).cloudhsmv2conn, d.Id()) - - if hsm == nil { - log.Printf("[WARN] CloudHSMv2 HSM (%s) not found", d.Id()) - d.SetId("") - return err - } - - log.Printf("[INFO] Reading CloudHSMv2 HSM Information: %s", d.Id()) - - d.Set("cluster_id", hsm.ClusterId) - d.Set("subnet_id", hsm.SubnetId) - d.Set("availability_zone", hsm.AvailabilityZone) - d.Set("ip_address", hsm.EniIp) - d.Set("hsm_id", hsm.HsmId) - d.Set("hsm_state", hsm.State) - d.Set("hsm_eni_id", hsm.EniId) - - return nil -} - -func resourceAwsCloudHsm2HsmDelete(d *schema.ResourceData, meta interface{}) error { - cloudhsm2 := meta.(*AWSClient).cloudhsmv2conn - clusterId := d.Get("cluster_id").(string) - - log.Printf("[DEBUG] CloudHSMv2 HSM delete %s %s", clusterId, d.Id()) - - errRetry := resource.Retry(180*time.Second, func() *resource.RetryError { - var err error - _, err = cloudhsm2.DeleteHsm(&cloudhsmv2.DeleteHsmInput{ - ClusterId: aws.String(clusterId), - HsmId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, cloudhsmv2.ErrCodeCloudHsmInternalFailureException, "request was rejected because of an AWS CloudHSM internal failure") { - log.Printf("[DEBUG] CloudHSMv2 HSM re-try deleting %s", d.Id()) - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if errRetry != nil { - return fmt.Errorf("error deleting CloudHSM v2 HSM module (%s): %s", d.Id(), errRetry) - } - log.Println("[INFO] Waiting for CloudHSMv2 HSM to be deleted") - - stateConf := &resource.StateChangeConf{ - Pending: []string{cloudhsmv2.HsmStateDeleteInProgress}, - Target: []string{"destroyed"}, - Refresh: resourceAwsCloudHsm2HsmRefreshFunc(d, meta), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 30 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, errWait := stateConf.WaitForState() - if errWait != nil { - return fmt.Errorf("Error waiting for CloudHSMv2 HSM state to be \"DELETED\": %s", errWait) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go deleted file mode 100644 index 1b9896acd..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go +++ /dev/null @@ -1,538 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudtrail" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCloudTrail() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudTrailCreate, - Read: resourceAwsCloudTrailRead, - Update: resourceAwsCloudTrailUpdate, - Delete: resourceAwsCloudTrailDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "enable_logging": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "s3_bucket_name": { - Type: schema.TypeString, - Required: true, - }, - "s3_key_prefix": { - Type: schema.TypeString, - Optional: true, - }, - "cloud_watch_logs_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - "cloud_watch_logs_group_arn": { - Type: schema.TypeString, - Optional: true, - }, - "include_global_service_events": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "is_multi_region_trail": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "is_organization_trail": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "sns_topic_name": { - Type: schema.TypeString, - Optional: true, - }, - "enable_log_file_validation": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "event_selector": { - Type: schema.TypeList, - Optional: true, - MaxItems: 5, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "read_write_type": { - Type: schema.TypeString, - Optional: true, - Default: cloudtrail.ReadWriteTypeAll, - ValidateFunc: validation.StringInSlice([]string{ - cloudtrail.ReadWriteTypeAll, - cloudtrail.ReadWriteTypeReadOnly, - cloudtrail.ReadWriteTypeWriteOnly, - }, false), - }, - - "include_management_events": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "data_resource": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{"AWS::S3::Object", "AWS::Lambda::Function"}, false), - }, - "values": { - Type: schema.TypeList, - Required: true, - MaxItems: 250, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - }, - }, - }, - "home_region": { - Type: schema.TypeString, - Computed: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsCloudTrailCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudtrailconn - - input := cloudtrail.CreateTrailInput{ - Name: aws.String(d.Get("name").(string)), - S3BucketName: aws.String(d.Get("s3_bucket_name").(string)), - } - - if v, ok := d.GetOk("cloud_watch_logs_group_arn"); ok { - input.CloudWatchLogsLogGroupArn = aws.String(v.(string)) - } - if v, ok := d.GetOk("cloud_watch_logs_role_arn"); ok { - input.CloudWatchLogsRoleArn = aws.String(v.(string)) - } - if v, ok := d.GetOkExists("include_global_service_events"); ok { - input.IncludeGlobalServiceEvents = aws.Bool(v.(bool)) - } - if v, ok := d.GetOk("is_multi_region_trail"); ok { - input.IsMultiRegionTrail = aws.Bool(v.(bool)) - } - if v, ok := d.GetOk("is_organization_trail"); ok { - input.IsOrganizationTrail = aws.Bool(v.(bool)) - } - if v, ok := d.GetOk("enable_log_file_validation"); ok { - input.EnableLogFileValidation = aws.Bool(v.(bool)) - } - if v, ok := d.GetOk("kms_key_id"); ok { - input.KmsKeyId = aws.String(v.(string)) - } - if v, ok := d.GetOk("s3_key_prefix"); ok { - input.S3KeyPrefix = aws.String(v.(string)) - } - if v, ok := d.GetOk("sns_topic_name"); ok { - input.SnsTopicName = aws.String(v.(string)) - } - - var t *cloudtrail.CreateTrailOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - t, err = conn.CreateTrail(&input) - if err != nil { - if isAWSErr(err, cloudtrail.ErrCodeInvalidCloudWatchLogsRoleArnException, "Access denied.") { - return resource.RetryableError(err) - } - if isAWSErr(err, cloudtrail.ErrCodeInvalidCloudWatchLogsLogGroupArnException, "Access denied.") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - - log.Printf("[DEBUG] CloudTrail created: %s", t) - - d.Set("arn", t.TrailARN) - d.SetId(*t.Name) - - // AWS CloudTrail sets newly-created trails to false. - if v, ok := d.GetOk("enable_logging"); ok && v.(bool) { - err := cloudTrailSetLogging(conn, v.(bool), d.Id()) - if err != nil { - return err - } - } - - // Event Selectors - if _, ok := d.GetOk("event_selector"); ok { - if err := cloudTrailSetEventSelectors(conn, d); err != nil { - return err - } - } - - return resourceAwsCloudTrailUpdate(d, meta) -} - -func resourceAwsCloudTrailRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudtrailconn - - input := cloudtrail.DescribeTrailsInput{ - TrailNameList: []*string{ - aws.String(d.Id()), - }, - } - resp, err := conn.DescribeTrails(&input) - if err != nil { - return err - } - - // CloudTrail does not return a NotFound error in the event that the Trail - // you're looking for is not found. Instead, it's simply not in the list. - var trail *cloudtrail.Trail - for _, c := range resp.TrailList { - if d.Id() == *c.Name { - trail = c - } - } - - if trail == nil { - log.Printf("[WARN] CloudTrail (%s) not found", d.Id()) - d.SetId("") - return nil - } - - log.Printf("[DEBUG] CloudTrail received: %s", trail) - - d.Set("name", trail.Name) - d.Set("s3_bucket_name", trail.S3BucketName) - d.Set("s3_key_prefix", trail.S3KeyPrefix) - d.Set("cloud_watch_logs_role_arn", trail.CloudWatchLogsRoleArn) - d.Set("cloud_watch_logs_group_arn", trail.CloudWatchLogsLogGroupArn) - d.Set("include_global_service_events", trail.IncludeGlobalServiceEvents) - d.Set("is_multi_region_trail", trail.IsMultiRegionTrail) - d.Set("is_organization_trail", trail.IsOrganizationTrail) - d.Set("sns_topic_name", trail.SnsTopicName) - d.Set("enable_log_file_validation", trail.LogFileValidationEnabled) - - // TODO: Make it possible to use KMS Key names, not just ARNs - // In order to test it properly this PR needs to be merged 1st: - // https://github.com/hashicorp/terraform/pull/3928 - d.Set("kms_key_id", trail.KmsKeyId) - - d.Set("arn", trail.TrailARN) - d.Set("home_region", trail.HomeRegion) - - // Get tags - req := &cloudtrail.ListTagsInput{ - ResourceIdList: []*string{trail.TrailARN}, - } - - tagsOut, err := conn.ListTags(req) - if err != nil { - return err - } - log.Printf("[DEBUG] Received CloudTrail tags: %s", tagsOut) - - var tags []*cloudtrail.Tag - if tagsOut.ResourceTagList != nil && len(tagsOut.ResourceTagList) > 0 { - tags = tagsOut.ResourceTagList[0].TagsList - } - - if err := d.Set("tags", tagsToMapCloudtrail(tags)); err != nil { - return err - } - - logstatus, err := cloudTrailGetLoggingStatus(conn, trail.Name) - if err != nil { - return err - } - d.Set("enable_logging", logstatus) - - // Get EventSelectors - eventSelectorsOut, err := conn.GetEventSelectors(&cloudtrail.GetEventSelectorsInput{ - TrailName: aws.String(d.Id()), - }) - if err != nil { - return err - } - - if err := d.Set("event_selector", flattenAwsCloudTrailEventSelector(eventSelectorsOut.EventSelectors)); err != nil { - return err - } - - return nil -} - -func resourceAwsCloudTrailUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudtrailconn - - input := cloudtrail.UpdateTrailInput{ - Name: aws.String(d.Id()), - } - - if d.HasChange("s3_bucket_name") { - input.S3BucketName = aws.String(d.Get("s3_bucket_name").(string)) - } - if d.HasChange("s3_key_prefix") { - input.S3KeyPrefix = aws.String(d.Get("s3_key_prefix").(string)) - } - if d.HasChange("cloud_watch_logs_role_arn") || d.HasChange("cloud_watch_logs_group_arn") { - // Both of these need to be provided together - // in the update call otherwise API complains - input.CloudWatchLogsRoleArn = aws.String(d.Get("cloud_watch_logs_role_arn").(string)) - input.CloudWatchLogsLogGroupArn = aws.String(d.Get("cloud_watch_logs_group_arn").(string)) - } - if d.HasChange("include_global_service_events") { - input.IncludeGlobalServiceEvents = aws.Bool(d.Get("include_global_service_events").(bool)) - } - if d.HasChange("is_multi_region_trail") { - input.IsMultiRegionTrail = aws.Bool(d.Get("is_multi_region_trail").(bool)) - } - if d.HasChange("is_organization_trail") { - input.IsOrganizationTrail = aws.Bool(d.Get("is_organization_trail").(bool)) - } - if d.HasChange("enable_log_file_validation") { - input.EnableLogFileValidation = aws.Bool(d.Get("enable_log_file_validation").(bool)) - } - if d.HasChange("kms_key_id") { - input.KmsKeyId = aws.String(d.Get("kms_key_id").(string)) - } - if d.HasChange("sns_topic_name") { - input.SnsTopicName = aws.String(d.Get("sns_topic_name").(string)) - } - - log.Printf("[DEBUG] Updating CloudTrail: %s", input) - var t *cloudtrail.UpdateTrailOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - t, err = conn.UpdateTrail(&input) - if err != nil { - if isAWSErr(err, cloudtrail.ErrCodeInvalidCloudWatchLogsRoleArnException, "Access denied.") { - return resource.RetryableError(err) - } - if isAWSErr(err, cloudtrail.ErrCodeInvalidCloudWatchLogsLogGroupArnException, "Access denied.") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - - if d.HasChange("tags") { - err := setTagsCloudtrail(conn, d) - if err != nil { - return err - } - } - - if d.HasChange("enable_logging") { - log.Printf("[DEBUG] Updating logging on CloudTrail: %s", input) - err := cloudTrailSetLogging(conn, d.Get("enable_logging").(bool), *input.Name) - if err != nil { - return err - } - } - - if !d.IsNewResource() && d.HasChange("event_selector") { - log.Printf("[DEBUG] Updating event selector on CloudTrail: %s", input) - if err := cloudTrailSetEventSelectors(conn, d); err != nil { - return err - } - } - - log.Printf("[DEBUG] CloudTrail updated: %s", t) - - return resourceAwsCloudTrailRead(d, meta) -} - -func resourceAwsCloudTrailDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudtrailconn - - log.Printf("[DEBUG] Deleting CloudTrail: %q", d.Id()) - _, err := conn.DeleteTrail(&cloudtrail.DeleteTrailInput{ - Name: aws.String(d.Id()), - }) - - return err -} - -func cloudTrailGetLoggingStatus(conn *cloudtrail.CloudTrail, id *string) (bool, error) { - GetTrailStatusOpts := &cloudtrail.GetTrailStatusInput{ - Name: id, - } - resp, err := conn.GetTrailStatus(GetTrailStatusOpts) - if err != nil { - return false, fmt.Errorf("Error retrieving logging status of CloudTrail (%s): %s", *id, err) - } - - return *resp.IsLogging, err -} - -func cloudTrailSetLogging(conn *cloudtrail.CloudTrail, enabled bool, id string) error { - if enabled { - log.Printf( - "[DEBUG] Starting logging on CloudTrail (%s)", - id) - StartLoggingOpts := &cloudtrail.StartLoggingInput{ - Name: aws.String(id), - } - if _, err := conn.StartLogging(StartLoggingOpts); err != nil { - return fmt.Errorf( - "Error starting logging on CloudTrail (%s): %s", - id, err) - } - } else { - log.Printf( - "[DEBUG] Stopping logging on CloudTrail (%s)", - id) - StopLoggingOpts := &cloudtrail.StopLoggingInput{ - Name: aws.String(id), - } - if _, err := conn.StopLogging(StopLoggingOpts); err != nil { - return fmt.Errorf( - "Error stopping logging on CloudTrail (%s): %s", - id, err) - } - } - - return nil -} - -func cloudTrailSetEventSelectors(conn *cloudtrail.CloudTrail, d *schema.ResourceData) error { - input := &cloudtrail.PutEventSelectorsInput{ - TrailName: aws.String(d.Id()), - } - - eventSelectors := expandAwsCloudTrailEventSelector(d.Get("event_selector").([]interface{})) - input.EventSelectors = eventSelectors - - if err := input.Validate(); err != nil { - return fmt.Errorf("Error validate CloudTrail (%s): %s", d.Id(), err) - } - - _, err := conn.PutEventSelectors(input) - if err != nil { - return fmt.Errorf("Error set event selector on CloudTrail (%s): %s", d.Id(), err) - } - - return nil -} - -func expandAwsCloudTrailEventSelector(configured []interface{}) []*cloudtrail.EventSelector { - eventSelectors := make([]*cloudtrail.EventSelector, 0, len(configured)) - - for _, raw := range configured { - data := raw.(map[string]interface{}) - dataResources := expandAwsCloudTrailEventSelectorDataResource(data["data_resource"].([]interface{})) - - es := &cloudtrail.EventSelector{ - IncludeManagementEvents: aws.Bool(data["include_management_events"].(bool)), - ReadWriteType: aws.String(data["read_write_type"].(string)), - DataResources: dataResources, - } - eventSelectors = append(eventSelectors, es) - } - - return eventSelectors -} - -func expandAwsCloudTrailEventSelectorDataResource(configured []interface{}) []*cloudtrail.DataResource { - dataResources := make([]*cloudtrail.DataResource, 0, len(configured)) - - for _, raw := range configured { - data := raw.(map[string]interface{}) - - values := make([]*string, len(data["values"].([]interface{}))) - for i, vv := range data["values"].([]interface{}) { - str := vv.(string) - values[i] = aws.String(str) - } - - dataResource := &cloudtrail.DataResource{ - Type: aws.String(data["type"].(string)), - Values: values, - } - - dataResources = append(dataResources, dataResource) - } - - return dataResources -} - -func flattenAwsCloudTrailEventSelector(configured []*cloudtrail.EventSelector) []map[string]interface{} { - eventSelectors := make([]map[string]interface{}, 0, len(configured)) - - // Prevent default configurations shows differences - if len(configured) == 1 && len(configured[0].DataResources) == 0 { - return eventSelectors - } - - for _, raw := range configured { - item := make(map[string]interface{}) - item["read_write_type"] = *raw.ReadWriteType - item["include_management_events"] = *raw.IncludeManagementEvents - item["data_resource"] = flattenAwsCloudTrailEventSelectorDataResource(raw.DataResources) - - eventSelectors = append(eventSelectors, item) - } - - return eventSelectors -} - -func flattenAwsCloudTrailEventSelectorDataResource(configured []*cloudtrail.DataResource) []map[string]interface{} { - dataResources := make([]map[string]interface{}, 0, len(configured)) - - for _, raw := range configured { - item := make(map[string]interface{}) - item["type"] = *raw.Type - item["values"] = flattenStringList(raw.Values) - - dataResources = append(dataResources, item) - } - - return dataResources -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_dashboard.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_dashboard.go deleted file mode 100644 index 2a60e595f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_dashboard.go +++ /dev/null @@ -1,120 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudwatch" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCloudWatchDashboard() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudWatchDashboardPut, - Read: resourceAwsCloudWatchDashboardRead, - Update: resourceAwsCloudWatchDashboardPut, - Delete: resourceAwsCloudWatchDashboardDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - // Note that we specify both the `dashboard_body` and - // the `dashboard_name` as being required, even though - // according to the REST API documentation both are - // optional: http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutDashboard.html#API_PutDashboard_RequestParameters - Schema: map[string]*schema.Schema{ - "dashboard_arn": { - Type: schema.TypeString, - Computed: true, - }, - "dashboard_body": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.ValidateJsonString, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - DiffSuppressFunc: suppressEquivalentJsonDiffs, - }, - "dashboard_name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateCloudWatchDashboardName, - }, - }, - } -} - -func resourceAwsCloudWatchDashboardRead(d *schema.ResourceData, meta interface{}) error { - dashboardName := d.Get("dashboard_name").(string) - log.Printf("[DEBUG] Reading CloudWatch Dashboard: %s", dashboardName) - conn := meta.(*AWSClient).cloudwatchconn - - params := cloudwatch.GetDashboardInput{ - DashboardName: aws.String(d.Id()), - } - - resp, err := conn.GetDashboard(¶ms) - if err != nil { - if isCloudWatchDashboardNotFoundErr(err) { - log.Printf("[WARN] CloudWatch Dashboard %q not found, removing", dashboardName) - d.SetId("") - return nil - } - return fmt.Errorf("Reading dashboard failed: %s", err) - } - - d.Set("dashboard_arn", resp.DashboardArn) - d.Set("dashboard_name", resp.DashboardName) - d.Set("dashboard_body", resp.DashboardBody) - return nil -} - -func resourceAwsCloudWatchDashboardPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchconn - params := cloudwatch.PutDashboardInput{ - DashboardBody: aws.String(d.Get("dashboard_body").(string)), - DashboardName: aws.String(d.Get("dashboard_name").(string)), - } - - log.Printf("[DEBUG] Putting CloudWatch Dashboard: %#v", params) - - _, err := conn.PutDashboard(¶ms) - if err != nil { - return fmt.Errorf("Putting dashboard failed: %s", err) - } - d.SetId(d.Get("dashboard_name").(string)) - log.Println("[INFO] CloudWatch Dashboard put finished") - - return resourceAwsCloudWatchDashboardRead(d, meta) -} - -func resourceAwsCloudWatchDashboardDelete(d *schema.ResourceData, meta interface{}) error { - log.Printf("[INFO] Deleting CloudWatch Dashboard %s", d.Id()) - conn := meta.(*AWSClient).cloudwatchconn - params := cloudwatch.DeleteDashboardsInput{ - DashboardNames: []*string{aws.String(d.Id())}, - } - - if _, err := conn.DeleteDashboards(¶ms); err != nil { - if isCloudWatchDashboardNotFoundErr(err) { - return nil - } - return fmt.Errorf("Error deleting CloudWatch Dashboard: %s", err) - } - log.Printf("[INFO] CloudWatch Dashboard %s deleted", d.Id()) - - return nil -} - -func isCloudWatchDashboardNotFoundErr(err error) bool { - return isAWSErr( - err, - "ResourceNotFound", - "does not exist") -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_permission.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_permission.go deleted file mode 100644 index 8457bdf0e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_permission.go +++ /dev/null @@ -1,320 +0,0 @@ -package aws - -import ( - "encoding/json" - "fmt" - "log" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - events "github.com/aws/aws-sdk-go/service/cloudwatchevents" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCloudWatchEventPermission() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudWatchEventPermissionCreate, - Read: resourceAwsCloudWatchEventPermissionRead, - Update: resourceAwsCloudWatchEventPermissionUpdate, - Delete: resourceAwsCloudWatchEventPermissionDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "action": { - Type: schema.TypeString, - Optional: true, - Default: "events:PutEvents", - ValidateFunc: validateCloudWatchEventPermissionAction, - }, - "condition": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{"aws:PrincipalOrgID"}, false), - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{"StringEquals"}, false), - }, - "value": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.NoZeroValues, - }, - }, - }, - }, - "principal": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateCloudWatchEventPermissionPrincipal, - }, - "statement_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateCloudWatchEventPermissionStatementID, - }, - }, - } -} - -func resourceAwsCloudWatchEventPermissionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatcheventsconn - - statementID := d.Get("statement_id").(string) - - input := events.PutPermissionInput{ - Action: aws.String(d.Get("action").(string)), - Condition: expandCloudWatchEventsCondition(d.Get("condition").([]interface{})), - Principal: aws.String(d.Get("principal").(string)), - StatementId: aws.String(statementID), - } - - log.Printf("[DEBUG] Creating CloudWatch Events permission: %s", input) - _, err := conn.PutPermission(&input) - if err != nil { - return fmt.Errorf("Creating CloudWatch Events permission failed: %s", err.Error()) - } - - d.SetId(statementID) - - return resourceAwsCloudWatchEventPermissionRead(d, meta) -} - -// See also: https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_DescribeEventBus.html -func resourceAwsCloudWatchEventPermissionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatcheventsconn - input := events.DescribeEventBusInput{} - var policyDoc CloudWatchEventPermissionPolicyDoc - var policyStatement *CloudWatchEventPermissionPolicyStatement - - // Especially with concurrent PutPermission calls there can be a slight delay - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Reading CloudWatch Events bus: %s", input) - debo, err := conn.DescribeEventBus(&input) - if err != nil { - return resource.NonRetryableError(fmt.Errorf("Reading CloudWatch Events permission '%s' failed: %s", d.Id(), err.Error())) - } - - if debo.Policy == nil { - return resource.RetryableError(fmt.Errorf("CloudWatch Events permission %q not found", d.Id())) - } - - err = json.Unmarshal([]byte(*debo.Policy), &policyDoc) - if err != nil { - return resource.NonRetryableError(fmt.Errorf("Reading CloudWatch Events permission '%s' failed: %s", d.Id(), err.Error())) - } - - policyStatement, err = findCloudWatchEventPermissionPolicyStatementByID(&policyDoc, d.Id()) - return resource.RetryableError(err) - }) - if err != nil { - // Missing statement inside valid policy - if nfErr, ok := err.(*resource.NotFoundError); ok { - log.Printf("[WARN] %s", nfErr) - d.SetId("") - return nil - } - - return err - } - - d.Set("action", policyStatement.Action) - - if err := d.Set("condition", flattenCloudWatchEventPermissionPolicyStatementCondition(policyStatement.Condition)); err != nil { - return fmt.Errorf("error setting condition: %s", err) - } - - principalString, ok := policyStatement.Principal.(string) - if ok && (principalString == "*") { - d.Set("principal", "*") - } else { - principalMap := policyStatement.Principal.(map[string]interface{}) - policyARN, err := arn.Parse(principalMap["AWS"].(string)) - if err != nil { - return fmt.Errorf("Reading CloudWatch Events permission '%s' failed: %s", d.Id(), err.Error()) - } - d.Set("principal", policyARN.AccountID) - } - d.Set("statement_id", policyStatement.Sid) - - return nil -} - -func resourceAwsCloudWatchEventPermissionUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatcheventsconn - - input := events.PutPermissionInput{ - Action: aws.String(d.Get("action").(string)), - Condition: expandCloudWatchEventsCondition(d.Get("condition").([]interface{})), - Principal: aws.String(d.Get("principal").(string)), - StatementId: aws.String(d.Get("statement_id").(string)), - } - - log.Printf("[DEBUG] Update CloudWatch Events permission: %s", input) - _, err := conn.PutPermission(&input) - if err != nil { - return fmt.Errorf("Updating CloudWatch Events permission '%s' failed: %s", d.Id(), err.Error()) - } - - return resourceAwsCloudWatchEventPermissionRead(d, meta) -} - -func resourceAwsCloudWatchEventPermissionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatcheventsconn - input := events.RemovePermissionInput{ - StatementId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Delete CloudWatch Events permission: %s", input) - _, err := conn.RemovePermission(&input) - if err != nil { - return fmt.Errorf("Deleting CloudWatch Events permission '%s' failed: %s", d.Id(), err.Error()) - } - return nil -} - -// https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_PutPermission.html#API_PutPermission_RequestParameters -func validateCloudWatchEventPermissionAction(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if (len(value) < 1) || (len(value) > 64) { - es = append(es, fmt.Errorf("%q must be between 1 and 64 characters", k)) - } - - if !regexp.MustCompile(`^events:[a-zA-Z]+$`).MatchString(value) { - es = append(es, fmt.Errorf("%q must be: events: followed by one or more alphabetic characters", k)) - } - return -} - -// https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_PutPermission.html#API_PutPermission_RequestParameters -func validateCloudWatchEventPermissionPrincipal(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if !regexp.MustCompile(`^(\d{12}|\*)$`).MatchString(value) { - es = append(es, fmt.Errorf("%q must be * or a 12 digit AWS account ID", k)) - } - return -} - -// https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_PutPermission.html#API_PutPermission_RequestParameters -func validateCloudWatchEventPermissionStatementID(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if (len(value) < 1) || (len(value) > 64) { - es = append(es, fmt.Errorf("%q must be between 1 and 64 characters", k)) - } - - if !regexp.MustCompile(`^[a-zA-Z0-9-_]+$`).MatchString(value) { - es = append(es, fmt.Errorf("%q must be one or more alphanumeric, hyphen, or underscore characters", k)) - } - return -} - -// CloudWatchEventPermissionPolicyDoc represents the Policy attribute of DescribeEventBus -// See also: https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_DescribeEventBus.html -type CloudWatchEventPermissionPolicyDoc struct { - Version string - ID string `json:"Id,omitempty"` - Statements []CloudWatchEventPermissionPolicyStatement `json:"Statement"` -} - -// CloudWatchEventPermissionPolicyStatement represents the Statement attribute of CloudWatchEventPermissionPolicyDoc -// See also: https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_DescribeEventBus.html -type CloudWatchEventPermissionPolicyStatement struct { - Sid string - Effect string - Action string - Condition *CloudWatchEventPermissionPolicyStatementCondition `json:"Condition,omitempty"` - Principal interface{} // "*" or {"AWS": "arn:aws:iam::111111111111:root"} - Resource string -} - -// CloudWatchEventPermissionPolicyStatementCondition represents the Condition attribute of CloudWatchEventPermissionPolicyStatement -// See also: https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_DescribeEventBus.html -type CloudWatchEventPermissionPolicyStatementCondition struct { - Key string - Type string - Value string -} - -func (condition *CloudWatchEventPermissionPolicyStatementCondition) UnmarshalJSON(b []byte) error { - var out CloudWatchEventPermissionPolicyStatementCondition - - // JSON representation: \"Condition\":{\"StringEquals\":{\"aws:PrincipalOrgID\":\"o-0123456789\"}} - var data map[string]map[string]string - if err := json.Unmarshal(b, &data); err != nil { - return err - } - - for typeKey, typeValue := range data { - for conditionKey, conditionValue := range typeValue { - out = CloudWatchEventPermissionPolicyStatementCondition{ - Key: conditionKey, - Type: typeKey, - Value: conditionValue, - } - } - } - - *condition = out - return nil -} - -func findCloudWatchEventPermissionPolicyStatementByID(policy *CloudWatchEventPermissionPolicyDoc, id string) ( - *CloudWatchEventPermissionPolicyStatement, error) { - - log.Printf("[DEBUG] Received %d statements in CloudWatch Events permission policy: %s", len(policy.Statements), policy.Statements) - for _, statement := range policy.Statements { - if statement.Sid == id { - return &statement, nil - } - } - - return nil, &resource.NotFoundError{ - LastRequest: id, - LastResponse: policy, - Message: fmt.Sprintf("Failed to find statement %q in CloudWatch Events permission policy:\n%s", id, policy.Statements), - } -} - -func expandCloudWatchEventsCondition(l []interface{}) *events.Condition { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - condition := &events.Condition{ - Key: aws.String(m["key"].(string)), - Type: aws.String(m["type"].(string)), - Value: aws.String(m["value"].(string)), - } - - return condition -} - -func flattenCloudWatchEventPermissionPolicyStatementCondition(condition *CloudWatchEventPermissionPolicyStatementCondition) []interface{} { - if condition == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "key": condition.Key, - "type": condition.Type, - "value": condition.Value, - } - - return []interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go deleted file mode 100644 index 2c5dcfd6e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go +++ /dev/null @@ -1,303 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - events "github.com/aws/aws-sdk-go/service/cloudwatchevents" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCloudWatchEventRule() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudWatchEventRuleCreate, - Read: resourceAwsCloudWatchEventRuleRead, - Update: resourceAwsCloudWatchEventRuleUpdate, - Delete: resourceAwsCloudWatchEventRuleDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateCloudWatchEventRuleName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateCloudWatchEventRuleName, - }, - "schedule_expression": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 256), - }, - "event_pattern": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateEventPatternValue(), - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v.(string)) - return json - }, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 512), - }, - "role_arn": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 1600), - }, - "is_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsCloudWatchEventRuleCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatcheventsconn - - var name string - if v, ok := d.GetOk("name"); ok { - name = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - name = resource.PrefixedUniqueId(v.(string)) - } else { - name = resource.UniqueId() - } - - input, err := buildPutRuleInputStruct(d, name) - if err != nil { - return fmt.Errorf("Creating CloudWatch Event Rule failed: %s", err) - } - log.Printf("[DEBUG] Creating CloudWatch Event Rule: %s", input) - - // IAM Roles take some time to propagate - var out *events.PutRuleOutput - err = resource.Retry(30*time.Second, func() *resource.RetryError { - var err error - out, err = conn.PutRule(input) - pattern := regexp.MustCompile(`cannot be assumed by principal '[a-z]+\.amazonaws\.com'\.$`) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "ValidationException" && pattern.MatchString(awsErr.Message()) { - log.Printf("[DEBUG] Retrying creation of CloudWatch Event Rule %q", *input.Name) - return resource.RetryableError(err) - } - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Creating CloudWatch Event Rule failed: %s", err) - } - - d.Set("arn", out.RuleArn) - d.SetId(*input.Name) - - log.Printf("[INFO] CloudWatch Event Rule %q created", *out.RuleArn) - - return resourceAwsCloudWatchEventRuleUpdate(d, meta) -} - -func resourceAwsCloudWatchEventRuleRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatcheventsconn - - input := events.DescribeRuleInput{ - Name: aws.String(d.Id()), - } - log.Printf("[DEBUG] Reading CloudWatch Event Rule: %s", input) - out, err := conn.DescribeRule(&input) - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "ResourceNotFoundException" { - log.Printf("[WARN] Removing CloudWatch Event Rule %q because it's gone.", d.Id()) - d.SetId("") - return nil - } - } - if err != nil { - return err - } - log.Printf("[DEBUG] Found Event Rule: %s", out) - - d.Set("arn", out.Arn) - d.Set("description", out.Description) - if out.EventPattern != nil { - pattern, err := structure.NormalizeJsonString(*out.EventPattern) - if err != nil { - return fmt.Errorf("event pattern contains an invalid JSON: %s", err) - } - d.Set("event_pattern", pattern) - } - d.Set("name", out.Name) - d.Set("role_arn", out.RoleArn) - d.Set("schedule_expression", out.ScheduleExpression) - - boolState, err := getBooleanStateFromString(*out.State) - if err != nil { - return err - } - log.Printf("[DEBUG] Setting boolean state: %t", boolState) - d.Set("is_enabled", boolState) - - return nil -} - -func resourceAwsCloudWatchEventRuleUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatcheventsconn - - if d.HasChange("is_enabled") && d.Get("is_enabled").(bool) { - log.Printf("[DEBUG] Enabling CloudWatch Event Rule %q", d.Id()) - _, err := conn.EnableRule(&events.EnableRuleInput{ - Name: aws.String(d.Id()), - }) - if err != nil { - return err - } - log.Printf("[DEBUG] CloudWatch Event Rule (%q) enabled", d.Id()) - } - - input, err := buildPutRuleInputStruct(d, d.Id()) - if err != nil { - return fmt.Errorf("Updating CloudWatch Event Rule failed: %s", err) - } - log.Printf("[DEBUG] Updating CloudWatch Event Rule: %s", input) - - // IAM Roles take some time to propagate - err = resource.Retry(30*time.Second, func() *resource.RetryError { - _, err := conn.PutRule(input) - pattern := regexp.MustCompile(`cannot be assumed by principal '[a-z]+\.amazonaws\.com'\.$`) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "ValidationException" && pattern.MatchString(awsErr.Message()) { - log.Printf("[DEBUG] Retrying update of CloudWatch Event Rule %q", *input.Name) - return resource.RetryableError(err) - } - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Updating CloudWatch Event Rule failed: %s", err) - } - - if d.HasChange("is_enabled") && !d.Get("is_enabled").(bool) { - log.Printf("[DEBUG] Disabling CloudWatch Event Rule %q", d.Id()) - _, err := conn.DisableRule(&events.DisableRuleInput{ - Name: aws.String(d.Id()), - }) - if err != nil { - return err - } - log.Printf("[DEBUG] CloudWatch Event Rule (%q) disabled", d.Id()) - } - - return resourceAwsCloudWatchEventRuleRead(d, meta) -} - -func resourceAwsCloudWatchEventRuleDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatcheventsconn - - log.Printf("[INFO] Deleting CloudWatch Event Rule: %s", d.Id()) - _, err := conn.DeleteRule(&events.DeleteRuleInput{ - Name: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error deleting CloudWatch Event Rule: %s", err) - } - log.Println("[INFO] CloudWatch Event Rule deleted") - - return nil -} - -func buildPutRuleInputStruct(d *schema.ResourceData, name string) (*events.PutRuleInput, error) { - input := events.PutRuleInput{ - Name: aws.String(name), - } - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - if v, ok := d.GetOk("event_pattern"); ok { - pattern, err := structure.NormalizeJsonString(v) - if err != nil { - return nil, fmt.Errorf("event pattern contains an invalid JSON: %s", err) - } - input.EventPattern = aws.String(pattern) - } - if v, ok := d.GetOk("role_arn"); ok { - input.RoleArn = aws.String(v.(string)) - } - if v, ok := d.GetOk("schedule_expression"); ok { - input.ScheduleExpression = aws.String(v.(string)) - } - - input.State = aws.String(getStringStateFromBoolean(d.Get("is_enabled").(bool))) - - return &input, nil -} - -// State is represented as (ENABLED|DISABLED) in the API -func getBooleanStateFromString(state string) (bool, error) { - if state == "ENABLED" { - return true, nil - } else if state == "DISABLED" { - return false, nil - } - // We don't just blindly trust AWS as they tend to return - // unexpected values in similar cases (different casing etc.) - return false, fmt.Errorf("Failed converting state %q into boolean", state) -} - -// State is represented as (ENABLED|DISABLED) in the API -func getStringStateFromBoolean(isEnabled bool) string { - if isEnabled { - return "ENABLED" - } - return "DISABLED" -} - -func validateEventPatternValue() schema.SchemaValidateFunc { - return func(v interface{}, k string) (ws []string, errors []error) { - json, err := structure.NormalizeJsonString(v) - if err != nil { - errors = append(errors, fmt.Errorf("%q contains an invalid JSON: %s", k, err)) - - // Invalid JSON? Return immediately, - // there is no need to collect other - // errors. - return - } - - // Check whether the normalized JSON is within the given length. - if len(json) > 2048 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than %d characters: %q", k, 2048, json)) - } - return - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go deleted file mode 100644 index 5dc979a5f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go +++ /dev/null @@ -1,653 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "math" - "regexp" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - events "github.com/aws/aws-sdk-go/service/cloudwatchevents" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCloudWatchEventTarget() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudWatchEventTargetCreate, - Read: resourceAwsCloudWatchEventTargetRead, - Update: resourceAwsCloudWatchEventTargetUpdate, - Delete: resourceAwsCloudWatchEventTargetDelete, - - Schema: map[string]*schema.Schema{ - "rule": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateCloudWatchEventRuleName, - }, - - "target_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateCloudWatchEventTargetId, - }, - - "arn": { - Type: schema.TypeString, - Required: true, - }, - - "input": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"input_path"}, - // We could be normalizing the JSON here, - // but for built-in targets input may not be JSON - }, - - "input_path": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"input"}, - }, - - "role_arn": { - Type: schema.TypeString, - Optional: true, - }, - - "run_command_targets": { - Type: schema.TypeList, - Optional: true, - MaxItems: 5, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 128), - }, - "values": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - - "ecs_target": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "group": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(1, 255), - }, - "launch_type": { - Type: schema.TypeString, - Optional: true, - Default: "EC2", - }, - "network_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "security_groups": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "subnets": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "assign_public_ip": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - }, - "platform_version": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 1600), - }, - "task_count": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(1, math.MaxInt32), - }, - "task_definition_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 1600), - }, - }, - }, - }, - - "batch_target": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "job_definition": { - Type: schema.TypeString, - Required: true, - }, - "job_name": { - Type: schema.TypeString, - Required: true, - }, - "array_size": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(2, 10000), - }, - "job_attempts": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(1, 10), - }, - }, - }, - }, - - "kinesis_target": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "partition_key_path": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(1, 256), - }, - }, - }, - }, - - "sqs_target": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "message_group_id": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "input_transformer": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "input_paths": { - Type: schema.TypeMap, - Optional: true, - }, - "input_template": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 8192), - }, - }, - }, - }, - }, - } -} - -func resourceAwsCloudWatchEventTargetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatcheventsconn - - rule := d.Get("rule").(string) - - var targetId string - if v, ok := d.GetOk("target_id"); ok { - targetId = v.(string) - } else { - targetId = resource.UniqueId() - d.Set("target_id", targetId) - } - - input := buildPutTargetInputStruct(d) - - log.Printf("[DEBUG] Creating CloudWatch Event Target: %s", input) - out, err := conn.PutTargets(input) - if err != nil { - return fmt.Errorf("Creating CloudWatch Event Target failed: %s", err) - } - - if len(out.FailedEntries) > 0 { - return fmt.Errorf("Creating CloudWatch Event Target failed: %s", - out.FailedEntries) - } - - id := rule + "-" + targetId - d.SetId(id) - - log.Printf("[INFO] CloudWatch Event Target %q created", d.Id()) - - return resourceAwsCloudWatchEventTargetRead(d, meta) -} - -func resourceAwsCloudWatchEventTargetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatcheventsconn - - t, err := findEventTargetById( - d.Get("target_id").(string), - d.Get("rule").(string), - nil, conn) - if err != nil { - if regexp.MustCompile(" not found$").MatchString(err.Error()) { - log.Printf("[WARN] Removing CloudWatch Event Target %q because it's gone.", d.Id()) - d.SetId("") - return nil - } - if awsErr, ok := err.(awserr.Error); ok { - // This should never happen, but it's useful - // for recovering from https://github.com/hashicorp/terraform/issues/5389 - if awsErr.Code() == "ValidationException" { - log.Printf("[WARN] Removing CloudWatch Event Target %q because it never existed.", d.Id()) - d.SetId("") - return nil - } - - if awsErr.Code() == "ResourceNotFoundException" { - log.Printf("[WARN] CloudWatch Event Target (%q) not found. Removing it from state.", d.Id()) - d.SetId("") - return nil - } - - } - return err - } - log.Printf("[DEBUG] Found Event Target: %s", t) - - d.Set("arn", t.Arn) - d.Set("target_id", t.Id) - d.Set("input", t.Input) - d.Set("input_path", t.InputPath) - d.Set("role_arn", t.RoleArn) - - if t.RunCommandParameters != nil { - if err := d.Set("run_command_targets", flattenAwsCloudWatchEventTargetRunParameters(t.RunCommandParameters)); err != nil { - return fmt.Errorf("Error setting run_command_targets error: %#v", err) - } - } - - if t.EcsParameters != nil { - if err := d.Set("ecs_target", flattenAwsCloudWatchEventTargetEcsParameters(t.EcsParameters)); err != nil { - return fmt.Errorf("Error setting ecs_target error: %#v", err) - } - } - - if t.BatchParameters != nil { - if err := d.Set("batch_target", flattenAwsCloudWatchEventTargetBatchParameters(t.BatchParameters)); err != nil { - return fmt.Errorf("Error setting batch_target error: %#v", err) - } - } - - if t.KinesisParameters != nil { - if err := d.Set("kinesis_target", flattenAwsCloudWatchEventTargetKinesisParameters(t.KinesisParameters)); err != nil { - return fmt.Errorf("Error setting kinesis_target error: %#v", err) - } - } - - if t.SqsParameters != nil { - if err := d.Set("sqs_target", flattenAwsCloudWatchEventTargetSqsParameters(t.SqsParameters)); err != nil { - return fmt.Errorf("Error setting sqs_target error: %#v", err) - } - } - - if t.InputTransformer != nil { - if err := d.Set("input_transformer", flattenAwsCloudWatchInputTransformer(t.InputTransformer)); err != nil { - return fmt.Errorf("Error setting input_transformer error: %#v", err) - } - } - - return nil -} - -func findEventTargetById(id, rule string, nextToken *string, conn *events.CloudWatchEvents) (*events.Target, error) { - input := events.ListTargetsByRuleInput{ - Rule: aws.String(rule), - NextToken: nextToken, - Limit: aws.Int64(100), // Set limit to allowed maximum to prevent API throttling - } - log.Printf("[DEBUG] Reading CloudWatch Event Target: %s", input) - out, err := conn.ListTargetsByRule(&input) - if err != nil { - return nil, err - } - - for _, t := range out.Targets { - if *t.Id == id { - return t, nil - } - } - - if out.NextToken != nil { - return findEventTargetById(id, rule, nextToken, conn) - } - - return nil, fmt.Errorf("CloudWatch Event Target %q (%q) not found", id, rule) -} - -func resourceAwsCloudWatchEventTargetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatcheventsconn - - input := buildPutTargetInputStruct(d) - - log.Printf("[DEBUG] Updating CloudWatch Event Target: %s", input) - _, err := conn.PutTargets(input) - if err != nil { - return fmt.Errorf("Updating CloudWatch Event Target failed: %s", err) - } - - return resourceAwsCloudWatchEventTargetRead(d, meta) -} - -func resourceAwsCloudWatchEventTargetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatcheventsconn - - input := events.RemoveTargetsInput{ - Ids: []*string{aws.String(d.Get("target_id").(string))}, - Rule: aws.String(d.Get("rule").(string)), - } - log.Printf("[INFO] Deleting CloudWatch Event Target: %s", input) - _, err := conn.RemoveTargets(&input) - if err != nil { - return fmt.Errorf("Error deleting CloudWatch Event Target: %s", err) - } - log.Println("[INFO] CloudWatch Event Target deleted") - - return nil -} - -func buildPutTargetInputStruct(d *schema.ResourceData) *events.PutTargetsInput { - e := &events.Target{ - Arn: aws.String(d.Get("arn").(string)), - Id: aws.String(d.Get("target_id").(string)), - } - - if v, ok := d.GetOk("input"); ok { - e.Input = aws.String(v.(string)) - } - if v, ok := d.GetOk("input_path"); ok { - e.InputPath = aws.String(v.(string)) - } - - if v, ok := d.GetOk("role_arn"); ok { - e.RoleArn = aws.String(v.(string)) - } - - if v, ok := d.GetOk("run_command_targets"); ok { - e.RunCommandParameters = expandAwsCloudWatchEventTargetRunParameters(v.([]interface{})) - } - if v, ok := d.GetOk("ecs_target"); ok { - e.EcsParameters = expandAwsCloudWatchEventTargetEcsParameters(v.([]interface{})) - } - if v, ok := d.GetOk("batch_target"); ok { - e.BatchParameters = expandAwsCloudWatchEventTargetBatchParameters(v.([]interface{})) - } - - if v, ok := d.GetOk("kinesis_target"); ok { - e.KinesisParameters = expandAwsCloudWatchEventTargetKinesisParameters(v.([]interface{})) - } - - if v, ok := d.GetOk("sqs_target"); ok { - e.SqsParameters = expandAwsCloudWatchEventTargetSqsParameters(v.([]interface{})) - } - - if v, ok := d.GetOk("input_transformer"); ok { - e.InputTransformer = expandAwsCloudWatchEventTransformerParameters(v.([]interface{})) - } - - input := events.PutTargetsInput{ - Rule: aws.String(d.Get("rule").(string)), - Targets: []*events.Target{e}, - } - - return &input -} - -func expandAwsCloudWatchEventTargetRunParameters(config []interface{}) *events.RunCommandParameters { - - commands := make([]*events.RunCommandTarget, 0) - - for _, c := range config { - param := c.(map[string]interface{}) - command := &events.RunCommandTarget{ - Key: aws.String(param["key"].(string)), - Values: expandStringList(param["values"].([]interface{})), - } - - commands = append(commands, command) - } - - command := &events.RunCommandParameters{ - RunCommandTargets: commands, - } - - return command -} - -func expandAwsCloudWatchEventTargetEcsParameters(config []interface{}) *events.EcsParameters { - ecsParameters := &events.EcsParameters{} - for _, c := range config { - param := c.(map[string]interface{}) - if val, ok := param["group"].(string); ok && val != "" { - ecsParameters.Group = aws.String(val) - } - if val, ok := param["launch_type"].(string); ok && val != "" { - ecsParameters.LaunchType = aws.String(val) - } - if val, ok := param["network_configuration"]; ok { - ecsParameters.NetworkConfiguration = expandAwsCloudWatchEventTargetEcsParametersNetworkConfiguration(val.([]interface{})) - } - if val, ok := param["platform_version"].(string); ok && val != "" { - ecsParameters.PlatformVersion = aws.String(val) - } - ecsParameters.TaskCount = aws.Int64(int64(param["task_count"].(int))) - ecsParameters.TaskDefinitionArn = aws.String(param["task_definition_arn"].(string)) - } - - return ecsParameters -} -func expandAwsCloudWatchEventTargetEcsParametersNetworkConfiguration(nc []interface{}) *events.NetworkConfiguration { - if len(nc) == 0 { - return nil - } - awsVpcConfig := &events.AwsVpcConfiguration{} - raw := nc[0].(map[string]interface{}) - if val, ok := raw["security_groups"]; ok { - awsVpcConfig.SecurityGroups = expandStringSet(val.(*schema.Set)) - } - awsVpcConfig.Subnets = expandStringSet(raw["subnets"].(*schema.Set)) - if val, ok := raw["assign_public_ip"].(bool); ok { - awsVpcConfig.AssignPublicIp = aws.String(events.AssignPublicIpDisabled) - if val { - awsVpcConfig.AssignPublicIp = aws.String(events.AssignPublicIpEnabled) - } - } - - return &events.NetworkConfiguration{AwsvpcConfiguration: awsVpcConfig} -} - -func expandAwsCloudWatchEventTargetBatchParameters(config []interface{}) *events.BatchParameters { - batchParameters := &events.BatchParameters{} - for _, c := range config { - param := c.(map[string]interface{}) - batchParameters.JobDefinition = aws.String(param["job_definition"].(string)) - batchParameters.JobName = aws.String(param["job_name"].(string)) - if v, ok := param["array_size"].(int); ok && v > 1 && v <= 10000 { - arrayProperties := &events.BatchArrayProperties{} - arrayProperties.Size = aws.Int64(int64(v)) - batchParameters.ArrayProperties = arrayProperties - } - if v, ok := param["job_attempts"].(int); ok && v > 0 && v <= 10 { - retryStrategy := &events.BatchRetryStrategy{} - retryStrategy.Attempts = aws.Int64(int64(v)) - batchParameters.RetryStrategy = retryStrategy - } - } - - return batchParameters -} - -func expandAwsCloudWatchEventTargetKinesisParameters(config []interface{}) *events.KinesisParameters { - kinesisParameters := &events.KinesisParameters{} - for _, c := range config { - param := c.(map[string]interface{}) - if v, ok := param["partition_key_path"].(string); ok && v != "" { - kinesisParameters.PartitionKeyPath = aws.String(v) - } - } - - return kinesisParameters -} - -func expandAwsCloudWatchEventTargetSqsParameters(config []interface{}) *events.SqsParameters { - sqsParameters := &events.SqsParameters{} - for _, c := range config { - param := c.(map[string]interface{}) - if v, ok := param["message_group_id"].(string); ok && v != "" { - sqsParameters.MessageGroupId = aws.String(v) - } - } - - return sqsParameters -} - -func expandAwsCloudWatchEventTransformerParameters(config []interface{}) *events.InputTransformer { - transformerParameters := &events.InputTransformer{} - - inputPathsMaps := map[string]*string{} - - for _, c := range config { - param := c.(map[string]interface{}) - inputPaths := param["input_paths"].(map[string]interface{}) - - for k, v := range inputPaths { - inputPathsMaps[k] = aws.String(v.(string)) - } - transformerParameters.InputTemplate = aws.String(param["input_template"].(string)) - } - transformerParameters.InputPathsMap = inputPathsMaps - - return transformerParameters -} - -func flattenAwsCloudWatchEventTargetRunParameters(runCommand *events.RunCommandParameters) []map[string]interface{} { - result := make([]map[string]interface{}, 0) - - for _, x := range runCommand.RunCommandTargets { - config := make(map[string]interface{}) - - config["key"] = *x.Key - config["values"] = flattenStringList(x.Values) - - result = append(result, config) - } - - return result -} -func flattenAwsCloudWatchEventTargetEcsParameters(ecsParameters *events.EcsParameters) []map[string]interface{} { - config := make(map[string]interface{}) - if ecsParameters.Group != nil { - config["group"] = *ecsParameters.Group - } - if ecsParameters.LaunchType != nil { - config["launch_type"] = *ecsParameters.LaunchType - } - config["network_configuration"] = flattenAwsCloudWatchEventTargetEcsParametersNetworkConfiguration(ecsParameters.NetworkConfiguration) - if ecsParameters.PlatformVersion != nil { - config["platform_version"] = *ecsParameters.PlatformVersion - } - config["task_count"] = *ecsParameters.TaskCount - config["task_definition_arn"] = *ecsParameters.TaskDefinitionArn - result := []map[string]interface{}{config} - return result -} -func flattenAwsCloudWatchEventTargetEcsParametersNetworkConfiguration(nc *events.NetworkConfiguration) []interface{} { - if nc == nil { - return nil - } - - result := make(map[string]interface{}) - result["security_groups"] = schema.NewSet(schema.HashString, flattenStringList(nc.AwsvpcConfiguration.SecurityGroups)) - result["subnets"] = schema.NewSet(schema.HashString, flattenStringList(nc.AwsvpcConfiguration.Subnets)) - - if nc.AwsvpcConfiguration.AssignPublicIp != nil { - result["assign_public_ip"] = *nc.AwsvpcConfiguration.AssignPublicIp == events.AssignPublicIpEnabled - } - - return []interface{}{result} -} - -func flattenAwsCloudWatchEventTargetBatchParameters(batchParameters *events.BatchParameters) []map[string]interface{} { - config := make(map[string]interface{}) - config["job_definition"] = aws.StringValue(batchParameters.JobDefinition) - config["job_name"] = aws.StringValue(batchParameters.JobName) - if batchParameters.ArrayProperties != nil { - config["array_size"] = int(aws.Int64Value(batchParameters.ArrayProperties.Size)) - } - if batchParameters.RetryStrategy != nil { - config["job_attempts"] = int(aws.Int64Value(batchParameters.RetryStrategy.Attempts)) - } - result := []map[string]interface{}{config} - return result -} - -func flattenAwsCloudWatchEventTargetKinesisParameters(kinesisParameters *events.KinesisParameters) []map[string]interface{} { - config := make(map[string]interface{}) - config["partition_key_path"] = *kinesisParameters.PartitionKeyPath - result := []map[string]interface{}{config} - return result -} - -func flattenAwsCloudWatchEventTargetSqsParameters(sqsParameters *events.SqsParameters) []map[string]interface{} { - config := make(map[string]interface{}) - config["message_group_id"] = *sqsParameters.MessageGroupId - result := []map[string]interface{}{config} - return result -} - -func flattenAwsCloudWatchInputTransformer(inputTransformer *events.InputTransformer) []map[string]interface{} { - config := make(map[string]interface{}) - inputPathsMap := make(map[string]string) - for k, v := range inputTransformer.InputPathsMap { - inputPathsMap[k] = *v - } - config["input_template"] = *inputTransformer.InputTemplate - config["input_paths"] = inputPathsMap - - result := []map[string]interface{}{config} - return result -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination.go deleted file mode 100644 index e995cf62e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination.go +++ /dev/null @@ -1,150 +0,0 @@ -package aws - -import ( - "fmt" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/cloudwatchlogs" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsCloudWatchLogDestination() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudWatchLogDestinationPut, - Update: resourceAwsCloudWatchLogDestinationPut, - Read: resourceAwsCloudWatchLogDestinationRead, - Delete: resourceAwsCloudWatchLogDestinationDelete, - - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("name", d.Id()) - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - }, - - "target_arn": { - Type: schema.TypeString, - Required: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsCloudWatchLogDestinationPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - - name := d.Get("name").(string) - role_arn := d.Get("role_arn").(string) - target_arn := d.Get("target_arn").(string) - - params := &cloudwatchlogs.PutDestinationInput{ - DestinationName: aws.String(name), - RoleArn: aws.String(role_arn), - TargetArn: aws.String(target_arn), - } - - return resource.Retry(3*time.Minute, func() *resource.RetryError { - resp, err := conn.PutDestination(params) - - if err == nil { - d.SetId(name) - d.Set("arn", *resp.Destination.Arn) - } - - awsErr, ok := err.(awserr.Error) - if !ok { - return resource.RetryableError(err) - } - - if awsErr.Code() == "InvalidParameterException" { - if strings.Contains(awsErr.Message(), "Could not deliver test message to specified") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - - return resource.NonRetryableError(err) - }) -} - -func resourceAwsCloudWatchLogDestinationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - name := d.Get("name").(string) - destination, exists, err := lookupCloudWatchLogDestination(conn, name, nil) - if err != nil { - return err - } - - if !exists { - d.SetId("") - return nil - } - - d.SetId(name) - d.Set("arn", destination.Arn) - d.Set("role_arn", destination.RoleArn) - d.Set("target_arn", destination.TargetArn) - - return nil -} - -func resourceAwsCloudWatchLogDestinationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - - name := d.Get("name").(string) - - params := &cloudwatchlogs.DeleteDestinationInput{ - DestinationName: aws.String(name), - } - _, err := conn.DeleteDestination(params) - if err != nil { - return fmt.Errorf("Error deleting Destination with name %s", name) - } - - return nil -} - -func lookupCloudWatchLogDestination(conn *cloudwatchlogs.CloudWatchLogs, - name string, nextToken *string) (*cloudwatchlogs.Destination, bool, error) { - input := &cloudwatchlogs.DescribeDestinationsInput{ - DestinationNamePrefix: aws.String(name), - NextToken: nextToken, - } - resp, err := conn.DescribeDestinations(input) - if err != nil { - return nil, true, err - } - - for _, destination := range resp.Destinations { - if *destination.DestinationName == name { - return destination, true, nil - } - } - - if resp.NextToken != nil { - return lookupCloudWatchLogDestination(conn, name, resp.NextToken) - } - - return nil, false, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination_policy.go deleted file mode 100644 index 0c77419c4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination_policy.go +++ /dev/null @@ -1,87 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudwatchlogs" -) - -func resourceAwsCloudWatchLogDestinationPolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudWatchLogDestinationPolicyPut, - Update: resourceAwsCloudWatchLogDestinationPolicyPut, - Read: resourceAwsCloudWatchLogDestinationPolicyRead, - Delete: resourceAwsCloudWatchLogDestinationPolicyDelete, - - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("destination_name", d.Id()) - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "destination_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "access_policy": { - Type: schema.TypeString, - Required: true, - }, - }, - } -} - -func resourceAwsCloudWatchLogDestinationPolicyPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - - destination_name := d.Get("destination_name").(string) - access_policy := d.Get("access_policy").(string) - - params := &cloudwatchlogs.PutDestinationPolicyInput{ - DestinationName: aws.String(destination_name), - AccessPolicy: aws.String(access_policy), - } - - _, err := conn.PutDestinationPolicy(params) - - if err != nil { - return fmt.Errorf("Error creating DestinationPolicy with destination_name %s: %#v", destination_name, err) - } - - d.SetId(destination_name) - return resourceAwsCloudWatchLogDestinationPolicyRead(d, meta) -} - -func resourceAwsCloudWatchLogDestinationPolicyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - destination_name := d.Get("destination_name").(string) - destination, exists, err := lookupCloudWatchLogDestination(conn, destination_name, nil) - if err != nil { - return err - } - - if !exists { - d.SetId("") - return nil - } - - if destination.AccessPolicy != nil { - d.SetId(destination_name) - d.Set("access_policy", *destination.AccessPolicy) - } else { - d.SetId("") - } - - return nil -} - -func resourceAwsCloudWatchLogDestinationPolicyDelete(d *schema.ResourceData, meta interface{}) error { - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go deleted file mode 100644 index f8a7c8631..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go +++ /dev/null @@ -1,266 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/cloudwatchlogs" -) - -func resourceAwsCloudWatchLogGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudWatchLogGroupCreate, - Read: resourceAwsCloudWatchLogGroupRead, - Update: resourceAwsCloudWatchLogGroupUpdate, - Delete: resourceAwsCloudWatchLogGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateLogGroupName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateLogGroupNamePrefix, - }, - - "retention_in_days": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsCloudWatchLogGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - - var logGroupName string - if v, ok := d.GetOk("name"); ok { - logGroupName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - logGroupName = resource.PrefixedUniqueId(v.(string)) - } else { - logGroupName = resource.UniqueId() - } - - log.Printf("[DEBUG] Creating CloudWatch Log Group: %s", logGroupName) - - params := &cloudwatchlogs.CreateLogGroupInput{ - LogGroupName: aws.String(logGroupName), - } - - if v, ok := d.GetOk("kms_key_id"); ok { - params.KmsKeyId = aws.String(v.(string)) - } - - _, err := conn.CreateLogGroup(params) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceAlreadyExistsException" { - return fmt.Errorf("Creating CloudWatch Log Group failed: %s: The CloudWatch Log Group '%s' already exists.", err, d.Get("name").(string)) - } - return fmt.Errorf("Creating CloudWatch Log Group failed: %s '%s'", err, d.Get("name")) - } - - d.SetId(logGroupName) - - log.Println("[INFO] CloudWatch Log Group created") - - return resourceAwsCloudWatchLogGroupUpdate(d, meta) -} - -func resourceAwsCloudWatchLogGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - log.Printf("[DEBUG] Reading CloudWatch Log Group: %q", d.Get("name").(string)) - lg, err := lookupCloudWatchLogGroup(conn, d.Id()) - if err != nil { - return err - } - - if lg == nil { - log.Printf("[DEBUG] CloudWatch Group %q Not Found", d.Id()) - d.SetId("") - return nil - } - - log.Printf("[DEBUG] Found Log Group: %#v", *lg) - - d.Set("arn", lg.Arn) - d.Set("name", lg.LogGroupName) - d.Set("kms_key_id", lg.KmsKeyId) - d.Set("retention_in_days", lg.RetentionInDays) - - tags := make(map[string]string) - tagsOutput, err := conn.ListTagsLogGroup(&cloudwatchlogs.ListTagsLogGroupInput{ - LogGroupName: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("error listing CloudWatch Logs Group %q tags: %s", d.Id(), err) - } - if tagsOutput != nil { - tags = aws.StringValueMap(tagsOutput.Tags) - } - d.Set("tags", tags) - - return nil -} - -func lookupCloudWatchLogGroup(conn *cloudwatchlogs.CloudWatchLogs, name string) (*cloudwatchlogs.LogGroup, error) { - input := &cloudwatchlogs.DescribeLogGroupsInput{ - LogGroupNamePrefix: aws.String(name), - } - var logGroup *cloudwatchlogs.LogGroup - err := conn.DescribeLogGroupsPages(input, func(page *cloudwatchlogs.DescribeLogGroupsOutput, lastPage bool) bool { - for _, lg := range page.LogGroups { - if aws.StringValue(lg.LogGroupName) == name { - logGroup = lg - return false - } - } - return !lastPage - }) - if err != nil { - return nil, err - } - - return logGroup, nil -} - -func resourceAwsCloudWatchLogGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - - name := d.Id() - log.Printf("[DEBUG] Updating CloudWatch Log Group: %q", name) - - if d.HasChange("retention_in_days") { - var err error - - if v, ok := d.GetOk("retention_in_days"); ok { - input := cloudwatchlogs.PutRetentionPolicyInput{ - LogGroupName: aws.String(name), - RetentionInDays: aws.Int64(int64(v.(int))), - } - log.Printf("[DEBUG] Setting retention for CloudWatch Log Group: %q: %s", name, input) - _, err = conn.PutRetentionPolicy(&input) - } else { - log.Printf("[DEBUG] Deleting retention for CloudWatch Log Group: %q", name) - _, err = conn.DeleteRetentionPolicy(&cloudwatchlogs.DeleteRetentionPolicyInput{ - LogGroupName: aws.String(name), - }) - } - - if err != nil { - return err - } - } - - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffCloudWatchTags(o, n) - - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags from %s", name) - _, err := conn.UntagLogGroup(&cloudwatchlogs.UntagLogGroupInput{ - LogGroupName: aws.String(name), - Tags: remove, - }) - if err != nil { - return err - } - } - - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags on %s", name) - _, err := conn.TagLogGroup(&cloudwatchlogs.TagLogGroupInput{ - LogGroupName: aws.String(name), - Tags: create, - }) - if err != nil { - return err - } - } - } - - if d.HasChange("kms_key_id") && !d.IsNewResource() { - _, newKey := d.GetChange("kms_key_id") - - if newKey.(string) == "" { - _, err := conn.DisassociateKmsKey(&cloudwatchlogs.DisassociateKmsKeyInput{ - LogGroupName: aws.String(name), - }) - if err != nil { - return err - } - } else { - _, err := conn.AssociateKmsKey(&cloudwatchlogs.AssociateKmsKeyInput{ - LogGroupName: aws.String(name), - KmsKeyId: aws.String(newKey.(string)), - }) - if err != nil { - return err - } - } - } - - return resourceAwsCloudWatchLogGroupRead(d, meta) -} - -func diffCloudWatchTags(oldTags map[string]interface{}, newTags map[string]interface{}) (map[string]*string, []*string) { - create := make(map[string]*string) - for k, v := range newTags { - create[k] = aws.String(v.(string)) - } - - var remove []*string - for t := range oldTags { - _, ok := create[t] - if !ok { - remove = append(remove, aws.String(t)) - } - } - - return create, remove -} - -func resourceAwsCloudWatchLogGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - log.Printf("[INFO] Deleting CloudWatch Log Group: %s", d.Id()) - _, err := conn.DeleteLogGroup(&cloudwatchlogs.DeleteLogGroupInput{ - LogGroupName: aws.String(d.Get("name").(string)), - }) - if err != nil { - return fmt.Errorf("Error deleting CloudWatch Log Group: %s", err) - } - log.Println("[INFO] CloudWatch Log Group deleted") - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go deleted file mode 100644 index 92a361266..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go +++ /dev/null @@ -1,191 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/cloudwatchlogs" -) - -func resourceAwsCloudWatchLogMetricFilter() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudWatchLogMetricFilterUpdate, - Read: resourceAwsCloudWatchLogMetricFilterRead, - Update: resourceAwsCloudWatchLogMetricFilterUpdate, - Delete: resourceAwsCloudWatchLogMetricFilterDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateLogMetricFilterName, - }, - - "pattern": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(0, 1024), - StateFunc: func(v interface{}) string { - s, ok := v.(string) - if !ok { - return "" - } - return strings.TrimSpace(s) - }, - }, - - "log_group_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateLogGroupName, - }, - - "metric_transformation": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateLogMetricFilterTransformationName, - }, - "namespace": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateLogMetricFilterTransformationName, - }, - "value": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(0, 100), - }, - "default_value": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateTypeStringNullableFloat, - }, - }, - }, - }, - }, - } -} - -func resourceAwsCloudWatchLogMetricFilterUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - - input := cloudwatchlogs.PutMetricFilterInput{ - FilterName: aws.String(d.Get("name").(string)), - FilterPattern: aws.String(strings.TrimSpace(d.Get("pattern").(string))), - LogGroupName: aws.String(d.Get("log_group_name").(string)), - } - - transformations := d.Get("metric_transformation").([]interface{}) - o := transformations[0].(map[string]interface{}) - input.MetricTransformations = expandCloudWatchLogMetricTransformations(o) - - log.Printf("[DEBUG] Creating/Updating CloudWatch Log Metric Filter: %s", input) - _, err := conn.PutMetricFilter(&input) - if err != nil { - return fmt.Errorf("Creating/Updating CloudWatch Log Metric Filter failed: %s", err) - } - - d.SetId(d.Get("name").(string)) - - log.Println("[INFO] CloudWatch Log Metric Filter created/updated") - - return resourceAwsCloudWatchLogMetricFilterRead(d, meta) -} - -func resourceAwsCloudWatchLogMetricFilterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - - mf, err := lookupCloudWatchLogMetricFilter(conn, d.Get("name").(string), - d.Get("log_group_name").(string), nil) - if err != nil { - if _, ok := err.(*resource.NotFoundError); ok { - log.Printf("[WARN] Removing CloudWatch Log Metric Filter as it is gone") - d.SetId("") - return nil - } - - return fmt.Errorf("Failed reading CloudWatch Log Metric Filter: %s", err) - } - - log.Printf("[DEBUG] Found CloudWatch Log Metric Filter: %s", mf) - - d.Set("name", mf.FilterName) - d.Set("pattern", mf.FilterPattern) - d.Set("metric_transformation", flattenCloudWatchLogMetricTransformations(mf.MetricTransformations)) - - return nil -} - -func lookupCloudWatchLogMetricFilter(conn *cloudwatchlogs.CloudWatchLogs, - name, logGroupName string, nextToken *string) (*cloudwatchlogs.MetricFilter, error) { - - input := cloudwatchlogs.DescribeMetricFiltersInput{ - FilterNamePrefix: aws.String(name), - LogGroupName: aws.String(logGroupName), - NextToken: nextToken, - } - log.Printf("[DEBUG] Reading CloudWatch Log Metric Filter: %s", input) - resp, err := conn.DescribeMetricFilters(&input) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" { - return nil, &resource.NotFoundError{ - Message: fmt.Sprintf("CloudWatch Log Metric Filter %q / %q not found via"+ - " initial DescribeMetricFilters call", name, logGroupName), - LastError: err, - LastRequest: input, - } - } - - return nil, fmt.Errorf("Failed describing CloudWatch Log Metric Filter: %s", err) - } - - for _, mf := range resp.MetricFilters { - if *mf.FilterName == name { - return mf, nil - } - } - - if resp.NextToken != nil { - return lookupCloudWatchLogMetricFilter(conn, name, logGroupName, resp.NextToken) - } - - return nil, &resource.NotFoundError{ - Message: fmt.Sprintf("CloudWatch Log Metric Filter %q / %q not found "+ - "in given results from DescribeMetricFilters", name, logGroupName), - LastResponse: resp, - LastRequest: input, - } -} - -func resourceAwsCloudWatchLogMetricFilterDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - - input := cloudwatchlogs.DeleteMetricFilterInput{ - FilterName: aws.String(d.Get("name").(string)), - LogGroupName: aws.String(d.Get("log_group_name").(string)), - } - log.Printf("[INFO] Deleting CloudWatch Log Metric Filter: %s", d.Id()) - _, err := conn.DeleteMetricFilter(&input) - if err != nil { - return fmt.Errorf("Error deleting CloudWatch Log Metric Filter: %s", err) - } - log.Println("[INFO] CloudWatch Log Metric Filter deleted") - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_resource_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_resource_policy.go deleted file mode 100644 index 7e7ceb8b5..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_resource_policy.go +++ /dev/null @@ -1,118 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudwatchlogs" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsCloudWatchLogResourcePolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudWatchLogResourcePolicyPut, - Read: resourceAwsCloudWatchLogResourcePolicyRead, - Update: resourceAwsCloudWatchLogResourcePolicyPut, - Delete: resourceAwsCloudWatchLogResourcePolicyDelete, - - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("policy_name", d.Id()) - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "policy_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "policy_document": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateCloudWatchLogResourcePolicyDocument, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - }, - } -} - -func resourceAwsCloudWatchLogResourcePolicyPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - - policyName := d.Get("policy_name").(string) - - input := &cloudwatchlogs.PutResourcePolicyInput{ - PolicyDocument: aws.String(d.Get("policy_document").(string)), - PolicyName: aws.String(policyName), - } - - log.Printf("[DEBUG] Writing CloudWatch log resource policy: %#v", input) - _, err := conn.PutResourcePolicy(input) - - if err != nil { - return fmt.Errorf("Writing CloudWatch log resource policy failed: %s", err.Error()) - } - - d.SetId(policyName) - return resourceAwsCloudWatchLogResourcePolicyRead(d, meta) -} - -func resourceAwsCloudWatchLogResourcePolicyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - policyName := d.Get("policy_name").(string) - resourcePolicy, exists, err := lookupCloudWatchLogResourcePolicy(conn, policyName, nil) - if err != nil { - return err - } - - if !exists { - d.SetId("") - return nil - } - - d.SetId(policyName) - d.Set("policy_document", *resourcePolicy.PolicyDocument) - - return nil -} - -func resourceAwsCloudWatchLogResourcePolicyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - input := cloudwatchlogs.DeleteResourcePolicyInput{ - PolicyName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting CloudWatch log resource policy: %#v", input) - _, err := conn.DeleteResourcePolicy(&input) - if err != nil { - return fmt.Errorf("Deleting CloudWatch log resource policy '%s' failed: %s", *input.PolicyName, err.Error()) - } - return nil -} - -func lookupCloudWatchLogResourcePolicy(conn *cloudwatchlogs.CloudWatchLogs, - name string, nextToken *string) (*cloudwatchlogs.ResourcePolicy, bool, error) { - input := &cloudwatchlogs.DescribeResourcePoliciesInput{ - NextToken: nextToken, - } - log.Printf("[DEBUG] Reading CloudWatch log resource policies: %#v", input) - resp, err := conn.DescribeResourcePolicies(input) - if err != nil { - return nil, true, err - } - - for _, resourcePolicy := range resp.ResourcePolicies { - if *resourcePolicy.PolicyName == name { - return resourcePolicy, true, nil - } - } - - if resp.NextToken != nil { - return lookupCloudWatchLogResourcePolicy(conn, name, resp.NextToken) - } - - return nil, false, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_stream.go deleted file mode 100644 index 666f7ad58..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_stream.go +++ /dev/null @@ -1,139 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudwatchlogs" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsCloudWatchLogStream() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudWatchLogStreamCreate, - Read: resourceAwsCloudWatchLogStreamRead, - Delete: resourceAwsCloudWatchLogStreamDelete, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateCloudWatchLogStreamName, - }, - - "log_group_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsCloudWatchLogStreamCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - - log.Printf("[DEBUG] Creating CloudWatch Log Stream: %s", d.Get("name").(string)) - _, err := conn.CreateLogStream(&cloudwatchlogs.CreateLogStreamInput{ - LogGroupName: aws.String(d.Get("log_group_name").(string)), - LogStreamName: aws.String(d.Get("name").(string)), - }) - if err != nil { - return fmt.Errorf("Creating CloudWatch Log Stream failed: %s", err) - } - - d.SetId(d.Get("name").(string)) - - return resourceAwsCloudWatchLogStreamRead(d, meta) -} - -func resourceAwsCloudWatchLogStreamRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - - group := d.Get("log_group_name").(string) - - ls, exists, err := lookupCloudWatchLogStream(conn, d.Id(), group, nil) - if err != nil { - if !isAWSErr(err, cloudwatchlogs.ErrCodeResourceNotFoundException, "") { - return err - } - - log.Printf("[DEBUG] container CloudWatch group %q Not Found.", group) - exists = false - } - - if !exists { - log.Printf("[DEBUG] CloudWatch Stream %q Not Found. Removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("arn", ls.Arn) - d.Set("name", ls.LogStreamName) - - return nil -} - -func resourceAwsCloudWatchLogStreamDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - - log.Printf("[INFO] Deleting CloudWatch Log Stream: %s", d.Id()) - params := &cloudwatchlogs.DeleteLogStreamInput{ - LogGroupName: aws.String(d.Get("log_group_name").(string)), - LogStreamName: aws.String(d.Id()), - } - _, err := conn.DeleteLogStream(params) - if err != nil { - return fmt.Errorf("Error deleting CloudWatch Log Stream: %s", err) - } - - return nil -} - -func lookupCloudWatchLogStream(conn *cloudwatchlogs.CloudWatchLogs, - name string, logStreamName string, nextToken *string) (*cloudwatchlogs.LogStream, bool, error) { - input := &cloudwatchlogs.DescribeLogStreamsInput{ - LogStreamNamePrefix: aws.String(name), - LogGroupName: aws.String(logStreamName), - NextToken: nextToken, - } - resp, err := conn.DescribeLogStreams(input) - if err != nil { - return nil, true, err - } - - for _, ls := range resp.LogStreams { - if *ls.LogStreamName == name { - return ls, true, nil - } - } - - if resp.NextToken != nil { - return lookupCloudWatchLogStream(conn, name, logStreamName, resp.NextToken) - } - - return nil, false, nil -} - -func validateCloudWatchLogStreamName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if regexp.MustCompile(`:`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "colons not allowed in %q:", k)) - } - if len(value) < 1 || len(value) > 512 { - errors = append(errors, fmt.Errorf( - "%q must be between 1 and 512 characters: %q", k, value)) - } - - return - -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_subscription_filter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_subscription_filter.go deleted file mode 100644 index 21afba796..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_subscription_filter.go +++ /dev/null @@ -1,196 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/cloudwatchlogs" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsCloudwatchLogSubscriptionFilter() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudwatchLogSubscriptionFilterCreate, - Read: resourceAwsCloudwatchLogSubscriptionFilterRead, - Update: resourceAwsCloudwatchLogSubscriptionFilterUpdate, - Delete: resourceAwsCloudwatchLogSubscriptionFilterDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "destination_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "filter_pattern": { - Type: schema.TypeString, - Required: true, - ForceNew: false, - }, - "log_group_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "role_arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "distribution": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsCloudwatchLogSubscriptionFilterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - params := getAwsCloudWatchLogsSubscriptionFilterInput(d) - log.Printf("[DEBUG] Creating SubscriptionFilter %#v", params) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.PutSubscriptionFilter(¶ms) - - if err == nil { - d.SetId(cloudwatchLogsSubscriptionFilterId(d.Get("log_group_name").(string))) - log.Printf("[DEBUG] Cloudwatch logs subscription %q created", d.Id()) - } - - awsErr, ok := err.(awserr.Error) - if !ok { - return resource.RetryableError(err) - } - - if awsErr.Code() == "InvalidParameterException" { - log.Printf("[DEBUG] Caught message: %q, code: %q: Retrying", awsErr.Message(), awsErr.Code()) - if strings.Contains(awsErr.Message(), "Could not deliver test message to specified") { - return resource.RetryableError(err) - } - if strings.Contains(awsErr.Message(), "Could not execute the lambda function") { - return resource.RetryableError(err) - } - resource.NonRetryableError(err) - } - - return resource.NonRetryableError(err) - }) -} - -func resourceAwsCloudwatchLogSubscriptionFilterUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - - params := getAwsCloudWatchLogsSubscriptionFilterInput(d) - - log.Printf("[DEBUG] Update SubscriptionFilter %#v", params) - _, err := conn.PutSubscriptionFilter(¶ms) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - return fmt.Errorf("Error updating SubscriptionFilter (%s) for LogGroup (%s), message: \"%s\", code: \"%s\"", - d.Get("name").(string), d.Get("log_group_name").(string), awsErr.Message(), awsErr.Code()) - } - return err - } - - d.SetId(cloudwatchLogsSubscriptionFilterId(d.Get("log_group_name").(string))) - return resourceAwsCloudwatchLogSubscriptionFilterRead(d, meta) -} - -func getAwsCloudWatchLogsSubscriptionFilterInput(d *schema.ResourceData) cloudwatchlogs.PutSubscriptionFilterInput { - name := d.Get("name").(string) - destination_arn := d.Get("destination_arn").(string) - filter_pattern := d.Get("filter_pattern").(string) - log_group_name := d.Get("log_group_name").(string) - - params := cloudwatchlogs.PutSubscriptionFilterInput{ - FilterName: aws.String(name), - DestinationArn: aws.String(destination_arn), - FilterPattern: aws.String(filter_pattern), - LogGroupName: aws.String(log_group_name), - } - - if _, ok := d.GetOk("role_arn"); ok { - params.RoleArn = aws.String(d.Get("role_arn").(string)) - } - - if _, ok := d.GetOk("distribution"); ok { - params.Distribution = aws.String(d.Get("distribution").(string)) - } - - return params -} - -func resourceAwsCloudwatchLogSubscriptionFilterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - - log_group_name := d.Get("log_group_name").(string) - name := d.Get("name").(string) // "name" is a required field in the schema - - req := &cloudwatchlogs.DescribeSubscriptionFiltersInput{ - LogGroupName: aws.String(log_group_name), - FilterNamePrefix: aws.String(name), - } - - resp, err := conn.DescribeSubscriptionFilters(req) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" { - log.Printf("[WARN] SubscriptionFilters (%q) Not Found", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error reading SubscriptionFilters for log group %s with name prefix %s: %#v", log_group_name, d.Get("name").(string), err) - } - - for _, subscriptionFilter := range resp.SubscriptionFilters { - if *subscriptionFilter.LogGroupName == log_group_name { - d.SetId(cloudwatchLogsSubscriptionFilterId(log_group_name)) - return nil // OK, matching subscription filter found - } - } - - log.Printf("[DEBUG] Subscription Filter%q Not Found", name) - d.SetId("") - return nil -} - -func resourceAwsCloudwatchLogSubscriptionFilterDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchlogsconn - log.Printf("[INFO] Deleting CloudWatch Log Group Subscription: %s", d.Id()) - log_group_name := d.Get("log_group_name").(string) - name := d.Get("name").(string) - - params := &cloudwatchlogs.DeleteSubscriptionFilterInput{ - FilterName: aws.String(name), // Required - LogGroupName: aws.String(log_group_name), // Required - } - _, err := conn.DeleteSubscriptionFilter(params) - if err != nil { - if isAWSErr(err, cloudwatchlogs.ErrCodeResourceNotFoundException, "The specified log group does not exist") { - return nil - } - return fmt.Errorf( - "Error deleting Subscription Filter from log group: %s with name filter name %s: %+v", log_group_name, name, err) - } - - return nil -} - -func cloudwatchLogsSubscriptionFilterId(log_group_name string) string { - var buf bytes.Buffer - - buf.WriteString(fmt.Sprintf("%s-", log_group_name)) // only one filter allowed per log_group_name at the moment - - return fmt.Sprintf("cwlsf-%d", hashcode.String(buf.String())) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm.go deleted file mode 100644 index efdf80feb..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm.go +++ /dev/null @@ -1,359 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudwatch" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCloudWatchMetricAlarm() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCloudWatchMetricAlarmCreate, - Read: resourceAwsCloudWatchMetricAlarmRead, - Update: resourceAwsCloudWatchMetricAlarmUpdate, - Delete: resourceAwsCloudWatchMetricAlarmDelete, - SchemaVersion: 1, - MigrateState: resourceAwsCloudWatchMetricAlarmMigrateState, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "alarm_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "comparison_operator": { - Type: schema.TypeString, - Required: true, - }, - "evaluation_periods": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntAtLeast(1), - }, - "metric_name": { - Type: schema.TypeString, - Required: true, - }, - "namespace": { - Type: schema.TypeString, - Required: true, - }, - "period": { - Type: schema.TypeInt, - Required: true, - }, - "statistic": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"extended_statistic"}, - }, - "threshold": { - Type: schema.TypeFloat, - Required: true, - }, - "actions_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "alarm_actions": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateAny( - validateArn, - validateEC2AutomateARN, - ), - }, - Set: schema.HashString, - }, - "alarm_description": { - Type: schema.TypeString, - Optional: true, - }, - "datapoints_to_alarm": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(1), - }, - "dimensions": { - Type: schema.TypeMap, - Optional: true, - }, - "insufficient_data_actions": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "ok_actions": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "unit": { - Type: schema.TypeString, - Optional: true, - }, - "extended_statistic": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"statistic"}, - }, - "treat_missing_data": { - Type: schema.TypeString, - Optional: true, - Default: "missing", - ValidateFunc: validation.StringInSlice([]string{"breaching", "notBreaching", "ignore", "missing"}, true), - }, - "evaluate_low_sample_count_percentiles": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{"evaluate", "ignore"}, true), - }, - }, - } -} - -func resourceAwsCloudWatchMetricAlarmCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchconn - - _, statisticOk := d.GetOk("statistic") - _, extendedStatisticOk := d.GetOk("extended_statistic") - - if !statisticOk && !extendedStatisticOk { - return fmt.Errorf("One of `statistic` or `extended_statistic` must be set for a cloudwatch metric alarm") - } - - params := getAwsCloudWatchPutMetricAlarmInput(d) - - log.Printf("[DEBUG] Creating CloudWatch Metric Alarm: %#v", params) - _, err := conn.PutMetricAlarm(¶ms) - if err != nil { - return fmt.Errorf("Creating metric alarm failed: %s", err) - } - d.SetId(d.Get("alarm_name").(string)) - log.Println("[INFO] CloudWatch Metric Alarm created") - - return resourceAwsCloudWatchMetricAlarmRead(d, meta) -} - -func resourceAwsCloudWatchMetricAlarmRead(d *schema.ResourceData, meta interface{}) error { - a, err := getAwsCloudWatchMetricAlarm(d, meta) - if err != nil { - return err - } - if a == nil { - d.SetId("") - return nil - } - - log.Printf("[DEBUG] Reading CloudWatch Metric Alarm: %s", d.Get("alarm_name")) - - d.Set("actions_enabled", a.ActionsEnabled) - - if err := d.Set("alarm_actions", _strArrPtrToList(a.AlarmActions)); err != nil { - log.Printf("[WARN] Error setting Alarm Actions: %s", err) - } - d.Set("alarm_description", a.AlarmDescription) - d.Set("alarm_name", a.AlarmName) - d.Set("arn", a.AlarmArn) - d.Set("comparison_operator", a.ComparisonOperator) - d.Set("datapoints_to_alarm", a.DatapointsToAlarm) - if err := d.Set("dimensions", flattenDimensions(a.Dimensions)); err != nil { - return err - } - d.Set("evaluation_periods", a.EvaluationPeriods) - - if err := d.Set("insufficient_data_actions", _strArrPtrToList(a.InsufficientDataActions)); err != nil { - log.Printf("[WARN] Error setting Insufficient Data Actions: %s", err) - } - d.Set("metric_name", a.MetricName) - d.Set("namespace", a.Namespace) - - if err := d.Set("ok_actions", _strArrPtrToList(a.OKActions)); err != nil { - log.Printf("[WARN] Error setting OK Actions: %s", err) - } - d.Set("period", a.Period) - d.Set("statistic", a.Statistic) - d.Set("threshold", a.Threshold) - d.Set("unit", a.Unit) - d.Set("extended_statistic", a.ExtendedStatistic) - d.Set("treat_missing_data", a.TreatMissingData) - d.Set("evaluate_low_sample_count_percentiles", a.EvaluateLowSampleCountPercentile) - - return nil -} - -func resourceAwsCloudWatchMetricAlarmUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cloudwatchconn - params := getAwsCloudWatchPutMetricAlarmInput(d) - - log.Printf("[DEBUG] Updating CloudWatch Metric Alarm: %#v", params) - _, err := conn.PutMetricAlarm(¶ms) - if err != nil { - return fmt.Errorf("Updating metric alarm failed: %s", err) - } - log.Println("[INFO] CloudWatch Metric Alarm updated") - - return resourceAwsCloudWatchMetricAlarmRead(d, meta) -} - -func resourceAwsCloudWatchMetricAlarmDelete(d *schema.ResourceData, meta interface{}) error { - p, err := getAwsCloudWatchMetricAlarm(d, meta) - if err != nil { - return err - } - if p == nil { - log.Printf("[DEBUG] CloudWatch Metric Alarm %s is already gone", d.Id()) - return nil - } - - log.Printf("[INFO] Deleting CloudWatch Metric Alarm: %s", d.Id()) - - conn := meta.(*AWSClient).cloudwatchconn - params := cloudwatch.DeleteAlarmsInput{ - AlarmNames: []*string{aws.String(d.Id())}, - } - - if _, err := conn.DeleteAlarms(¶ms); err != nil { - return fmt.Errorf("Error deleting CloudWatch Metric Alarm: %s", err) - } - log.Println("[INFO] CloudWatch Metric Alarm deleted") - - return nil -} - -func getAwsCloudWatchPutMetricAlarmInput(d *schema.ResourceData) cloudwatch.PutMetricAlarmInput { - params := cloudwatch.PutMetricAlarmInput{ - AlarmName: aws.String(d.Get("alarm_name").(string)), - ComparisonOperator: aws.String(d.Get("comparison_operator").(string)), - EvaluationPeriods: aws.Int64(int64(d.Get("evaluation_periods").(int))), - MetricName: aws.String(d.Get("metric_name").(string)), - Namespace: aws.String(d.Get("namespace").(string)), - Period: aws.Int64(int64(d.Get("period").(int))), - Threshold: aws.Float64(d.Get("threshold").(float64)), - TreatMissingData: aws.String(d.Get("treat_missing_data").(string)), - } - - if v := d.Get("actions_enabled"); v != nil { - params.ActionsEnabled = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("alarm_description"); ok { - params.AlarmDescription = aws.String(v.(string)) - } - - if v, ok := d.GetOk("datapoints_to_alarm"); ok { - params.DatapointsToAlarm = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("unit"); ok { - params.Unit = aws.String(v.(string)) - } - - if v, ok := d.GetOk("statistic"); ok { - params.Statistic = aws.String(v.(string)) - } - - if v, ok := d.GetOk("extended_statistic"); ok { - params.ExtendedStatistic = aws.String(v.(string)) - } - - if v, ok := d.GetOk("evaluate_low_sample_count_percentiles"); ok { - params.EvaluateLowSampleCountPercentile = aws.String(v.(string)) - } - - var alarmActions []*string - if v := d.Get("alarm_actions"); v != nil { - for _, v := range v.(*schema.Set).List() { - str := v.(string) - alarmActions = append(alarmActions, aws.String(str)) - } - params.AlarmActions = alarmActions - } - - var insufficientDataActions []*string - if v := d.Get("insufficient_data_actions"); v != nil { - for _, v := range v.(*schema.Set).List() { - str := v.(string) - insufficientDataActions = append(insufficientDataActions, aws.String(str)) - } - params.InsufficientDataActions = insufficientDataActions - } - - var okActions []*string - if v := d.Get("ok_actions"); v != nil { - for _, v := range v.(*schema.Set).List() { - str := v.(string) - okActions = append(okActions, aws.String(str)) - } - params.OKActions = okActions - } - - a := d.Get("dimensions").(map[string]interface{}) - dimensions := make([]*cloudwatch.Dimension, 0, len(a)) - for k, v := range a { - dimensions = append(dimensions, &cloudwatch.Dimension{ - Name: aws.String(k), - Value: aws.String(v.(string)), - }) - } - params.Dimensions = dimensions - - return params -} - -func getAwsCloudWatchMetricAlarm(d *schema.ResourceData, meta interface{}) (*cloudwatch.MetricAlarm, error) { - conn := meta.(*AWSClient).cloudwatchconn - - params := cloudwatch.DescribeAlarmsInput{ - AlarmNames: []*string{aws.String(d.Id())}, - } - - resp, err := conn.DescribeAlarms(¶ms) - if err != nil { - return nil, err - } - - // Find it and return it - for idx, ma := range resp.MetricAlarms { - if aws.StringValue(ma.AlarmName) == d.Id() { - return resp.MetricAlarms[idx], nil - } - } - - return nil, nil -} - -func _strArrPtrToList(strArrPtr []*string) []string { - var result []string - for _, elem := range strArrPtr { - result = append(result, aws.StringValue(elem)) - } - return result -} - -func flattenDimensions(dims []*cloudwatch.Dimension) map[string]interface{} { - flatDims := make(map[string]interface{}) - for _, d := range dims { - flatDims[*d.Name] = *d.Value - } - return flatDims -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm_migrate.go deleted file mode 100644 index 0ebd7f80d..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm_migrate.go +++ /dev/null @@ -1,33 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsCloudWatchMetricAlarmMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS CloudWatch Metric Alarm State v0; migrating to v1") - return migrateCloudWatchMetricAlarmStateV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateCloudWatchMetricAlarmStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() { - log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") - return is, nil - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - - is.Attributes["treat_missing_data"] = "missing" - - log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) - return is, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go deleted file mode 100644 index 6dd1110d6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go +++ /dev/null @@ -1,1199 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "regexp" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/codebuild" - "github.com/hashicorp/terraform/helper/customdiff" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCodeBuildProject() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCodeBuildProjectCreate, - Read: resourceAwsCodeBuildProjectRead, - Update: resourceAwsCodeBuildProjectUpdate, - Delete: resourceAwsCodeBuildProjectDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "artifacts": { - Type: schema.TypeSet, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - }, - "encryption_disabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "location": { - Type: schema.TypeString, - Optional: true, - }, - "namespace_type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - codebuild.ArtifactNamespaceNone, - codebuild.ArtifactNamespaceBuildId, - }, false), - }, - "packaging": { - Type: schema.TypeString, - Optional: true, - }, - "path": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - codebuild.ArtifactsTypeCodepipeline, - codebuild.ArtifactsTypeS3, - codebuild.ArtifactsTypeNoArtifacts, - }, false), - }, - }, - }, - Set: resourceAwsCodeBuildProjectArtifactsHash, - }, - "cache": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Optional: true, - Default: codebuild.CacheTypeNoCache, - ValidateFunc: validation.StringInSlice([]string{ - codebuild.CacheTypeNoCache, - codebuild.CacheTypeS3, - }, false), - }, - "location": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "description": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringLenBetween(0, 255), - }, - "encryption_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "environment": { - Type: schema.TypeSet, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "compute_type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - codebuild.ComputeTypeBuildGeneral1Small, - codebuild.ComputeTypeBuildGeneral1Medium, - codebuild.ComputeTypeBuildGeneral1Large, - }, false), - }, - "environment_variable": { - Type: schema.TypeList, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - codebuild.EnvironmentVariableTypePlaintext, - codebuild.EnvironmentVariableTypeParameterStore, - }, false), - Default: codebuild.EnvironmentVariableTypePlaintext, - }, - }, - }, - }, - "image": { - Type: schema.TypeString, - Required: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - codebuild.EnvironmentTypeLinuxContainer, - codebuild.EnvironmentTypeWindowsContainer, - }, false), - }, - "privileged_mode": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "certificate": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile(`\.(pem|zip)$`), "must end in .pem or .zip"), - }, - }, - }, - Set: resourceAwsCodeBuildProjectEnvironmentHash, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateAwsCodeBuildProjectName, - }, - "secondary_artifacts": { - Type: schema.TypeSet, - Optional: true, - Set: resourceAwsCodeBuildProjectArtifactsHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - }, - "encryption_disabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "location": { - Type: schema.TypeString, - Optional: true, - }, - "namespace_type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - codebuild.ArtifactNamespaceNone, - codebuild.ArtifactNamespaceBuildId, - }, false), - }, - "packaging": { - Type: schema.TypeString, - Optional: true, - }, - "path": { - Type: schema.TypeString, - Optional: true, - }, - "artifact_identifier": { - Type: schema.TypeString, - Required: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - codebuild.ArtifactsTypeCodepipeline, - codebuild.ArtifactsTypeS3, - codebuild.ArtifactsTypeNoArtifacts, - }, false), - }, - }, - }, - }, - "secondary_sources": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "auth": { - Type: schema.TypeSet, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "resource": { - Type: schema.TypeString, - Sensitive: true, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - codebuild.SourceAuthTypeOauth, - }, false), - }, - }, - }, - Optional: true, - Set: resourceAwsCodeBuildProjectSourceAuthHash, - }, - "buildspec": { - Type: schema.TypeString, - Optional: true, - }, - "location": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - codebuild.SourceTypeCodecommit, - codebuild.SourceTypeCodepipeline, - codebuild.SourceTypeGithub, - codebuild.SourceTypeS3, - codebuild.SourceTypeBitbucket, - codebuild.SourceTypeGithubEnterprise, - }, false), - }, - "git_clone_depth": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "insecure_ssl": { - Type: schema.TypeBool, - Optional: true, - }, - "report_build_status": { - Type: schema.TypeBool, - Optional: true, - }, - "source_identifier": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "service_role": { - Type: schema.TypeString, - Required: true, - }, - "source": { - Type: schema.TypeSet, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "auth": { - Type: schema.TypeSet, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "resource": { - Type: schema.TypeString, - Sensitive: true, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - codebuild.SourceAuthTypeOauth, - }, false), - }, - }, - }, - Optional: true, - Set: resourceAwsCodeBuildProjectSourceAuthHash, - }, - "buildspec": { - Type: schema.TypeString, - Optional: true, - }, - "location": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - codebuild.SourceTypeCodecommit, - codebuild.SourceTypeCodepipeline, - codebuild.SourceTypeGithub, - codebuild.SourceTypeS3, - codebuild.SourceTypeBitbucket, - codebuild.SourceTypeGithubEnterprise, - codebuild.SourceTypeNoSource, - }, false), - }, - "git_clone_depth": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "insecure_ssl": { - Type: schema.TypeBool, - Optional: true, - }, - "report_build_status": { - Type: schema.TypeBool, - Optional: true, - }, - }, - }, - Required: true, - MaxItems: 1, - Set: resourceAwsCodeBuildProjectSourceHash, - }, - "timeout": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(5, 480), - Removed: "This field has been removed. Please use build_timeout instead", - }, - "build_timeout": { - Type: schema.TypeInt, - Optional: true, - Default: "60", - ValidateFunc: validation.IntBetween(5, 480), - }, - "badge_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "badge_url": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchema(), - "vpc_config": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Required: true, - }, - "subnets": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - // Set: schema.HashString, - MaxItems: 16, - }, - "security_group_ids": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - // Set: schema.HashString, - MaxItems: 5, - }, - }, - }, - }, - }, - - CustomizeDiff: customdiff.Sequence( - func(diff *schema.ResourceDiff, v interface{}) error { - // Plan time validation for cache location - cacheType, cacheTypeOk := diff.GetOk("cache.0.type") - if !cacheTypeOk || cacheType.(string) == codebuild.CacheTypeNoCache { - return nil - } - if v, ok := diff.GetOk("cache.0.location"); ok && v.(string) != "" { - return nil - } - return fmt.Errorf(`cache location is required when cache type is %q`, cacheType.(string)) - }, - ), - } -} - -func resourceAwsCodeBuildProjectCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codebuildconn - - projectEnv := expandProjectEnvironment(d) - projectSource := expandProjectSource(d) - projectArtifacts := expandProjectArtifacts(d) - projectSecondaryArtifacts := expandProjectSecondaryArtifacts(d) - projectSecondarySources := expandProjectSecondarySources(d) - - if aws.StringValue(projectSource.Type) == codebuild.SourceTypeNoSource { - if aws.StringValue(projectSource.Buildspec) == "" { - return fmt.Errorf("`build_spec` must be set when source's `type` is `NO_SOURCE`") - } - - if aws.StringValue(projectSource.Location) != "" { - return fmt.Errorf("`location` must be empty when source's `type` is `NO_SOURCE`") - } - } - - params := &codebuild.CreateProjectInput{ - Environment: projectEnv, - Name: aws.String(d.Get("name").(string)), - Source: &projectSource, - Artifacts: &projectArtifacts, - SecondaryArtifacts: projectSecondaryArtifacts, - SecondarySources: projectSecondarySources, - } - - if v, ok := d.GetOk("cache"); ok { - params.Cache = expandProjectCache(v.([]interface{})) - } - - if v, ok := d.GetOk("description"); ok { - params.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("encryption_key"); ok { - params.EncryptionKey = aws.String(v.(string)) - } - - if v, ok := d.GetOk("service_role"); ok { - params.ServiceRole = aws.String(v.(string)) - } - - if v, ok := d.GetOk("build_timeout"); ok { - params.TimeoutInMinutes = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("vpc_config"); ok { - params.VpcConfig = expandCodeBuildVpcConfig(v.([]interface{})) - } - - if v, ok := d.GetOk("badge_enabled"); ok { - params.BadgeEnabled = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("tags"); ok { - params.Tags = tagsFromMapCodeBuild(v.(map[string]interface{})) - } - - var resp *codebuild.CreateProjectOutput - // Handle IAM eventual consistency - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - var err error - - resp, err = conn.CreateProject(params) - if err != nil { - // InvalidInputException: CodeBuild is not authorized to perform - // InvalidInputException: Not authorized to perform DescribeSecurityGroups - if isAWSErr(err, "InvalidInputException", "ot authorized to perform") { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - - return nil - - }) - - if err != nil { - return fmt.Errorf("Error creating CodeBuild project: %s", err) - } - - d.SetId(*resp.Project.Arn) - - return resourceAwsCodeBuildProjectRead(d, meta) -} - -func expandProjectSecondaryArtifacts(d *schema.ResourceData) []*codebuild.ProjectArtifacts { - artifacts := make([]*codebuild.ProjectArtifacts, 0) - - configsList := d.Get("secondary_artifacts").(*schema.Set).List() - - if len(configsList) == 0 { - return nil - } - - for _, config := range configsList { - art := expandProjectArtifactData(config.(map[string]interface{})) - artifacts = append(artifacts, &art) - } - - return artifacts -} - -func expandProjectArtifacts(d *schema.ResourceData) codebuild.ProjectArtifacts { - configs := d.Get("artifacts").(*schema.Set).List() - data := configs[0].(map[string]interface{}) - - return expandProjectArtifactData(data) -} - -func expandProjectArtifactData(data map[string]interface{}) codebuild.ProjectArtifacts { - artifactType := data["type"].(string) - - projectArtifacts := codebuild.ProjectArtifacts{ - Type: aws.String(artifactType), - } - - // Only valid for S3 and CODEPIPELINE artifacts types - // InvalidInputException: Invalid artifacts: artifact type NO_ARTIFACTS should have null encryptionDisabled - if artifactType == codebuild.ArtifactsTypeS3 || artifactType == codebuild.ArtifactsTypeCodepipeline { - projectArtifacts.EncryptionDisabled = aws.Bool(data["encryption_disabled"].(bool)) - } - - if data["artifact_identifier"] != nil && data["artifact_identifier"].(string) != "" { - projectArtifacts.ArtifactIdentifier = aws.String(data["artifact_identifier"].(string)) - } - - if data["location"].(string) != "" { - projectArtifacts.Location = aws.String(data["location"].(string)) - } - - if data["name"].(string) != "" { - projectArtifacts.Name = aws.String(data["name"].(string)) - } - - if data["namespace_type"].(string) != "" { - projectArtifacts.NamespaceType = aws.String(data["namespace_type"].(string)) - } - - if data["packaging"].(string) != "" { - projectArtifacts.Packaging = aws.String(data["packaging"].(string)) - } - - if data["path"].(string) != "" { - projectArtifacts.Path = aws.String(data["path"].(string)) - } - - return projectArtifacts -} - -func expandProjectCache(s []interface{}) *codebuild.ProjectCache { - var projectCache *codebuild.ProjectCache - - data := s[0].(map[string]interface{}) - - projectCache = &codebuild.ProjectCache{ - Type: aws.String(data["type"].(string)), - } - - if v, ok := data["location"]; ok { - projectCache.Location = aws.String(v.(string)) - } - - return projectCache -} - -func expandProjectEnvironment(d *schema.ResourceData) *codebuild.ProjectEnvironment { - configs := d.Get("environment").(*schema.Set).List() - - envConfig := configs[0].(map[string]interface{}) - - projectEnv := &codebuild.ProjectEnvironment{ - PrivilegedMode: aws.Bool(envConfig["privileged_mode"].(bool)), - } - - if v := envConfig["compute_type"]; v != nil { - projectEnv.ComputeType = aws.String(v.(string)) - } - - if v := envConfig["image"]; v != nil { - projectEnv.Image = aws.String(v.(string)) - } - - if v := envConfig["type"]; v != nil { - projectEnv.Type = aws.String(v.(string)) - } - - if v, ok := envConfig["certificate"]; ok && v.(string) != "" { - projectEnv.Certificate = aws.String(v.(string)) - } - - if v := envConfig["environment_variable"]; v != nil { - envVariables := v.([]interface{}) - if len(envVariables) > 0 { - projectEnvironmentVariables := make([]*codebuild.EnvironmentVariable, 0, len(envVariables)) - - for _, envVariablesConfig := range envVariables { - config := envVariablesConfig.(map[string]interface{}) - - projectEnvironmentVar := &codebuild.EnvironmentVariable{} - - if v := config["name"].(string); v != "" { - projectEnvironmentVar.Name = &v - } - - if v := config["value"].(string); v != "" { - projectEnvironmentVar.Value = &v - } - - if v := config["type"].(string); v != "" { - projectEnvironmentVar.Type = &v - } - - projectEnvironmentVariables = append(projectEnvironmentVariables, projectEnvironmentVar) - } - - projectEnv.EnvironmentVariables = projectEnvironmentVariables - } - } - - return projectEnv -} - -func expandCodeBuildVpcConfig(rawVpcConfig []interface{}) *codebuild.VpcConfig { - vpcConfig := codebuild.VpcConfig{} - if len(rawVpcConfig) == 0 || rawVpcConfig[0] == nil { - return &vpcConfig - } - - data := rawVpcConfig[0].(map[string]interface{}) - vpcConfig.VpcId = aws.String(data["vpc_id"].(string)) - vpcConfig.Subnets = expandStringList(data["subnets"].(*schema.Set).List()) - vpcConfig.SecurityGroupIds = expandStringList(data["security_group_ids"].(*schema.Set).List()) - - return &vpcConfig -} - -func expandProjectSecondarySources(d *schema.ResourceData) []*codebuild.ProjectSource { - configs := d.Get("secondary_sources").(*schema.Set).List() - - if len(configs) == 0 { - return nil - } - - sources := make([]*codebuild.ProjectSource, 0) - - for _, config := range configs { - source := expandProjectSourceData(config.(map[string]interface{})) - sources = append(sources, &source) - } - - return sources -} - -func expandProjectSource(d *schema.ResourceData) codebuild.ProjectSource { - configs := d.Get("source").(*schema.Set).List() - - data := configs[0].(map[string]interface{}) - return expandProjectSourceData(data) -} - -func expandProjectSourceData(data map[string]interface{}) codebuild.ProjectSource { - sourceType := data["type"].(string) - - projectSource := codebuild.ProjectSource{ - Buildspec: aws.String(data["buildspec"].(string)), - GitCloneDepth: aws.Int64(int64(data["git_clone_depth"].(int))), - InsecureSsl: aws.Bool(data["insecure_ssl"].(bool)), - Type: aws.String(sourceType), - } - - if data["source_identifier"] != nil { - projectSource.SourceIdentifier = aws.String(data["source_identifier"].(string)) - } - - if data["location"].(string) != "" { - projectSource.Location = aws.String(data["location"].(string)) - } - - // Only valid for BITBUCKET, GITHUB, and GITHUB_ENTERPRISE source types, e.g. - // InvalidInputException: Source type NO_SOURCE does not support ReportBuildStatus - if sourceType == codebuild.SourceTypeBitbucket || sourceType == codebuild.SourceTypeGithub || sourceType == codebuild.SourceTypeGithubEnterprise { - projectSource.ReportBuildStatus = aws.Bool(data["report_build_status"].(bool)) - } - - if v, ok := data["auth"]; ok { - if len(v.(*schema.Set).List()) > 0 { - auth := v.(*schema.Set).List()[0].(map[string]interface{}) - - projectSource.Auth = &codebuild.SourceAuth{ - Type: aws.String(auth["type"].(string)), - Resource: aws.String(auth["resource"].(string)), - } - } - } - - return projectSource -} - -func resourceAwsCodeBuildProjectRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codebuildconn - - resp, err := conn.BatchGetProjects(&codebuild.BatchGetProjectsInput{ - Names: []*string{ - aws.String(d.Id()), - }, - }) - - if err != nil { - return fmt.Errorf("Error retreiving Projects: %q", err) - } - - // if nothing was found, then return no state - if len(resp.Projects) == 0 { - log.Printf("[INFO]: No projects were found, removing from state") - d.SetId("") - return nil - } - - project := resp.Projects[0] - - if err := d.Set("artifacts", flattenAwsCodeBuildProjectArtifacts(project.Artifacts)); err != nil { - return err - } - - if err := d.Set("environment", schema.NewSet(resourceAwsCodeBuildProjectEnvironmentHash, flattenAwsCodeBuildProjectEnvironment(project.Environment))); err != nil { - return err - } - - if err := d.Set("cache", flattenAwsCodebuildProjectCache(project.Cache)); err != nil { - return err - } - - if err := d.Set("secondary_artifacts", flattenAwsCodeBuildProjectSecondaryArtifacts(project.SecondaryArtifacts)); err != nil { - return err - } - - if err := d.Set("secondary_sources", flattenAwsCodeBuildProjectSecondarySources(project.SecondarySources)); err != nil { - return err - } - - if err := d.Set("source", flattenAwsCodeBuildProjectSource(project.Source)); err != nil { - return err - } - - if err := d.Set("vpc_config", flattenAwsCodeBuildVpcConfig(project.VpcConfig)); err != nil { - return err - } - - d.Set("arn", project.Arn) - d.Set("description", project.Description) - d.Set("encryption_key", project.EncryptionKey) - d.Set("name", project.Name) - d.Set("service_role", project.ServiceRole) - d.Set("build_timeout", project.TimeoutInMinutes) - if project.Badge != nil { - d.Set("badge_enabled", project.Badge.BadgeEnabled) - d.Set("badge_url", project.Badge.BadgeRequestUrl) - } else { - d.Set("badge_enabled", false) - d.Set("badge_url", "") - } - - if err := d.Set("tags", tagsToMapCodeBuild(project.Tags)); err != nil { - return err - } - - return nil -} - -func resourceAwsCodeBuildProjectUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codebuildconn - - params := &codebuild.UpdateProjectInput{ - Name: aws.String(d.Get("name").(string)), - } - - if d.HasChange("environment") { - projectEnv := expandProjectEnvironment(d) - params.Environment = projectEnv - } - - if d.HasChange("source") { - projectSource := expandProjectSource(d) - params.Source = &projectSource - } - - if d.HasChange("artifacts") { - projectArtifacts := expandProjectArtifacts(d) - params.Artifacts = &projectArtifacts - } - - if d.HasChange("secondary_sources") { - projectSecondarySources := expandProjectSecondarySources(d) - params.SecondarySources = projectSecondarySources - } - - if d.HasChange("secondary_artifacts") { - projectSecondaryArtifacts := expandProjectSecondaryArtifacts(d) - params.SecondaryArtifacts = projectSecondaryArtifacts - } - - if d.HasChange("vpc_config") { - params.VpcConfig = expandCodeBuildVpcConfig(d.Get("vpc_config").([]interface{})) - } - - if d.HasChange("cache") { - if v, ok := d.GetOk("cache"); ok { - params.Cache = expandProjectCache(v.([]interface{})) - } else { - params.Cache = &codebuild.ProjectCache{ - Type: aws.String("NO_CACHE"), - } - } - } - - if d.HasChange("description") { - params.Description = aws.String(d.Get("description").(string)) - } - - if d.HasChange("encryption_key") { - params.EncryptionKey = aws.String(d.Get("encryption_key").(string)) - } - - if d.HasChange("service_role") { - params.ServiceRole = aws.String(d.Get("service_role").(string)) - } - - if d.HasChange("build_timeout") { - params.TimeoutInMinutes = aws.Int64(int64(d.Get("build_timeout").(int))) - } - - if d.HasChange("badge_enabled") { - params.BadgeEnabled = aws.Bool(d.Get("badge_enabled").(bool)) - } - - // The documentation clearly says "The replacement set of tags for this build project." - // But its a slice of pointers so if not set for every update, they get removed. - params.Tags = tagsFromMapCodeBuild(d.Get("tags").(map[string]interface{})) - - // Handle IAM eventual consistency - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - - _, err = conn.UpdateProject(params) - if err != nil { - // InvalidInputException: CodeBuild is not authorized to perform - // InvalidInputException: Not authorized to perform DescribeSecurityGroups - if isAWSErr(err, "InvalidInputException", "ot authorized to perform") { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - - return nil - - }) - - if err != nil { - return fmt.Errorf( - "[ERROR] Error updating CodeBuild project (%s): %s", - d.Id(), err) - } - - return resourceAwsCodeBuildProjectRead(d, meta) -} - -func resourceAwsCodeBuildProjectDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codebuildconn - - _, err := conn.DeleteProject(&codebuild.DeleteProjectInput{ - Name: aws.String(d.Id()), - }) - return err -} - -func flattenAwsCodeBuildProjectSecondaryArtifacts(artifactsList []*codebuild.ProjectArtifacts) *schema.Set { - artifactSet := schema.Set{ - F: resourceAwsCodeBuildProjectArtifactsHash, - } - - for _, artifacts := range artifactsList { - artifactSet.Add(flattenAwsCodeBuildProjectArtifactsData(*artifacts)) - } - return &artifactSet -} - -func flattenAwsCodeBuildProjectArtifacts(artifacts *codebuild.ProjectArtifacts) *schema.Set { - - artifactSet := schema.Set{ - F: resourceAwsCodeBuildProjectArtifactsHash, - } - - values := flattenAwsCodeBuildProjectArtifactsData(*artifacts) - - artifactSet.Add(values) - - return &artifactSet -} - -func flattenAwsCodeBuildProjectArtifactsData(artifacts codebuild.ProjectArtifacts) map[string]interface{} { - values := map[string]interface{}{} - - values["type"] = *artifacts.Type - - if artifacts.ArtifactIdentifier != nil { - values["artifact_identifier"] = *artifacts.ArtifactIdentifier - } - - if artifacts.EncryptionDisabled != nil { - values["encryption_disabled"] = *artifacts.EncryptionDisabled - } - if artifacts.Location != nil { - values["location"] = *artifacts.Location - } - - if artifacts.Name != nil { - values["name"] = *artifacts.Name - } - - if artifacts.NamespaceType != nil { - values["namespace_type"] = *artifacts.NamespaceType - } - - if artifacts.Packaging != nil { - values["packaging"] = *artifacts.Packaging - } - - if artifacts.Path != nil { - values["path"] = *artifacts.Path - } - return values -} - -func flattenAwsCodebuildProjectCache(cache *codebuild.ProjectCache) []interface{} { - if cache == nil { - return []interface{}{} - } - - values := map[string]interface{}{ - "location": aws.StringValue(cache.Location), - "type": aws.StringValue(cache.Type), - } - - return []interface{}{values} -} - -func flattenAwsCodeBuildProjectEnvironment(environment *codebuild.ProjectEnvironment) []interface{} { - envConfig := map[string]interface{}{} - - envConfig["type"] = *environment.Type - envConfig["compute_type"] = *environment.ComputeType - envConfig["image"] = *environment.Image - envConfig["certificate"] = aws.StringValue(environment.Certificate) - envConfig["privileged_mode"] = *environment.PrivilegedMode - - if environment.EnvironmentVariables != nil { - envConfig["environment_variable"] = environmentVariablesToMap(environment.EnvironmentVariables) - } - - return []interface{}{envConfig} - -} - -func flattenAwsCodeBuildProjectSecondarySources(sourceList []*codebuild.ProjectSource) []interface{} { - l := make([]interface{}, 0) - - for _, source := range sourceList { - l = append(l, flattenAwsCodeBuildProjectSourceData(source)) - } - - return l -} - -func flattenAwsCodeBuildProjectSource(source *codebuild.ProjectSource) []interface{} { - l := make([]interface{}, 1) - - l[0] = flattenAwsCodeBuildProjectSourceData(source) - - return l -} - -func flattenAwsCodeBuildProjectSourceData(source *codebuild.ProjectSource) interface{} { - m := map[string]interface{}{ - "buildspec": aws.StringValue(source.Buildspec), - "location": aws.StringValue(source.Location), - "git_clone_depth": int(aws.Int64Value(source.GitCloneDepth)), - "insecure_ssl": aws.BoolValue(source.InsecureSsl), - "report_build_status": aws.BoolValue(source.ReportBuildStatus), - "type": aws.StringValue(source.Type), - } - - if source.Auth != nil { - m["auth"] = schema.NewSet(resourceAwsCodeBuildProjectSourceAuthHash, []interface{}{sourceAuthToMap(source.Auth)}) - } - - if source.SourceIdentifier != nil { - m["source_identifier"] = aws.StringValue(source.SourceIdentifier) - } - - return m -} - -func flattenAwsCodeBuildVpcConfig(vpcConfig *codebuild.VpcConfig) []interface{} { - if vpcConfig != nil { - values := map[string]interface{}{} - - values["vpc_id"] = *vpcConfig.VpcId - values["subnets"] = schema.NewSet(schema.HashString, flattenStringList(vpcConfig.Subnets)) - values["security_group_ids"] = schema.NewSet(schema.HashString, flattenStringList(vpcConfig.SecurityGroupIds)) - - return []interface{}{values} - } - return nil -} - -func resourceAwsCodeBuildProjectArtifactsHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - buf.WriteString(fmt.Sprintf("%s-", m["type"].(string))) - - if v, ok := m["artifact_identifier"]; ok { - buf.WriteString(fmt.Sprintf("%s:", v.(string))) - } - return hashcode.String(buf.String()) -} - -func resourceAwsCodeBuildProjectEnvironmentHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - environmentType := m["type"].(string) - computeType := m["compute_type"].(string) - image := m["image"].(string) - privilegedMode := m["privileged_mode"].(bool) - environmentVariables := m["environment_variable"].([]interface{}) - buf.WriteString(fmt.Sprintf("%s-", environmentType)) - buf.WriteString(fmt.Sprintf("%s-", computeType)) - buf.WriteString(fmt.Sprintf("%s-", image)) - buf.WriteString(fmt.Sprintf("%t-", privilegedMode)) - if v, ok := m["certificate"]; ok && v.(string) != "" { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - for _, e := range environmentVariables { - if e != nil { // Old statefiles might have nil values in them - ev := e.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s:", ev["name"].(string))) - // type is sometimes not returned by the API - if v, ok := ev["type"]; ok { - buf.WriteString(fmt.Sprintf("%s:", v.(string))) - } - buf.WriteString(fmt.Sprintf("%s-", ev["value"].(string))) - } - } - - return hashcode.String(buf.String()) -} - -func resourceAwsCodeBuildProjectSourceHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - buf.WriteString(fmt.Sprintf("%s-", m["type"].(string))) - if v, ok := m["source_identifier"]; ok { - buf.WriteString(fmt.Sprintf("%s-", strconv.Itoa(v.(int)))) - } - if v, ok := m["buildspec"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["location"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["git_clone_depth"]; ok { - buf.WriteString(fmt.Sprintf("%s-", strconv.Itoa(v.(int)))) - } - if v, ok := m["insecure_ssl"]; ok { - buf.WriteString(fmt.Sprintf("%s-", strconv.FormatBool(v.(bool)))) - } - if v, ok := m["report_build_status"]; ok { - buf.WriteString(fmt.Sprintf("%s-", strconv.FormatBool(v.(bool)))) - } - - return hashcode.String(buf.String()) -} - -func resourceAwsCodeBuildProjectSourceAuthHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - buf.WriteString(fmt.Sprintf("%s-", m["type"].(string))) - - if m["resource"] != nil { - buf.WriteString(fmt.Sprintf("%s-", m["resource"].(string))) - } - - return hashcode.String(buf.String()) -} - -func environmentVariablesToMap(environmentVariables []*codebuild.EnvironmentVariable) []interface{} { - - envVariables := []interface{}{} - if len(environmentVariables) > 0 { - for _, env := range environmentVariables { - item := map[string]interface{}{} - item["name"] = *env.Name - item["value"] = *env.Value - if env.Type != nil { - item["type"] = *env.Type - } - envVariables = append(envVariables, item) - } - } - - return envVariables -} - -func sourceAuthToMap(sourceAuth *codebuild.SourceAuth) map[string]interface{} { - - auth := map[string]interface{}{} - auth["type"] = *sourceAuth.Type - - if sourceAuth.Resource != nil { - auth["resource"] = *sourceAuth.Resource - } - - return auth -} - -func validateAwsCodeBuildProjectName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[A-Za-z0-9]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter or number", value)) - } - - if !regexp.MustCompile(`^[A-Za-z0-9\-_]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters, hyphens and underscores allowed in %q", value)) - } - - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than 255 characters", value)) - } - - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_webhook.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_webhook.go deleted file mode 100644 index 6022d4fd1..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_webhook.go +++ /dev/null @@ -1,134 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/codebuild" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsCodeBuildWebhook() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCodeBuildWebhookCreate, - Read: resourceAwsCodeBuildWebhookRead, - Delete: resourceAwsCodeBuildWebhookDelete, - Update: resourceAwsCodeBuildWebhookUpdate, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "project_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "branch_filter": { - Type: schema.TypeString, - Optional: true, - }, - "payload_url": { - Type: schema.TypeString, - Computed: true, - }, - "secret": { - Type: schema.TypeString, - Computed: true, - Sensitive: true, - }, - "url": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsCodeBuildWebhookCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codebuildconn - - resp, err := conn.CreateWebhook(&codebuild.CreateWebhookInput{ - ProjectName: aws.String(d.Get("project_name").(string)), - BranchFilter: aws.String(d.Get("branch_filter").(string)), - }) - if err != nil { - return err - } - - // Secret is only returned on create, so capture it at the start - d.Set("secret", resp.Webhook.Secret) - d.SetId(d.Get("project_name").(string)) - - return resourceAwsCodeBuildWebhookRead(d, meta) -} - -func resourceAwsCodeBuildWebhookRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codebuildconn - - resp, err := conn.BatchGetProjects(&codebuild.BatchGetProjectsInput{ - Names: []*string{ - aws.String(d.Id()), - }, - }) - - if err != nil { - return err - } - - if len(resp.Projects) == 0 { - log.Printf("[WARN] CodeBuild Project %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - project := resp.Projects[0] - - if project.Webhook == nil { - log.Printf("[WARN] CodeBuild Project %q webhook not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("branch_filter", project.Webhook.BranchFilter) - d.Set("payload_url", project.Webhook.PayloadUrl) - d.Set("project_name", project.Name) - d.Set("url", project.Webhook.Url) - // The secret is never returned after creation, so don't set it here - - return nil -} - -func resourceAwsCodeBuildWebhookUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codebuildconn - - _, err := conn.UpdateWebhook(&codebuild.UpdateWebhookInput{ - ProjectName: aws.String(d.Id()), - BranchFilter: aws.String(d.Get("branch_filter").(string)), - RotateSecret: aws.Bool(false), - }) - - if err != nil { - return err - } - - return resourceAwsCodeBuildWebhookRead(d, meta) -} - -func resourceAwsCodeBuildWebhookDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codebuildconn - - _, err := conn.DeleteWebhook(&codebuild.DeleteWebhookInput{ - ProjectName: aws.String(d.Id()), - }) - - if err != nil { - if isAWSErr(err, codebuild.ErrCodeResourceNotFoundException, "") { - return nil - } - return err - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_repository.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_repository.go deleted file mode 100644 index 1cb77a1d9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_repository.go +++ /dev/null @@ -1,195 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/codecommit" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCodeCommitRepository() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCodeCommitRepositoryCreate, - Update: resourceAwsCodeCommitRepositoryUpdate, - Read: resourceAwsCodeCommitRepositoryRead, - Delete: resourceAwsCodeCommitRepositoryDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "repository_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 100), - }, - - "description": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 1000), - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "repository_id": { - Type: schema.TypeString, - Computed: true, - }, - - "clone_url_http": { - Type: schema.TypeString, - Computed: true, - }, - - "clone_url_ssh": { - Type: schema.TypeString, - Computed: true, - }, - - "default_branch": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsCodeCommitRepositoryCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codecommitconn - - input := &codecommit.CreateRepositoryInput{ - RepositoryName: aws.String(d.Get("repository_name").(string)), - RepositoryDescription: aws.String(d.Get("description").(string)), - } - - out, err := conn.CreateRepository(input) - if err != nil { - return fmt.Errorf("Error creating CodeCommit Repository: %s", err) - } - - d.SetId(d.Get("repository_name").(string)) - d.Set("repository_id", out.RepositoryMetadata.RepositoryId) - d.Set("arn", out.RepositoryMetadata.Arn) - d.Set("clone_url_http", out.RepositoryMetadata.CloneUrlHttp) - d.Set("clone_url_ssh", out.RepositoryMetadata.CloneUrlSsh) - - return resourceAwsCodeCommitRepositoryUpdate(d, meta) -} - -func resourceAwsCodeCommitRepositoryUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codecommitconn - - if _, ok := d.GetOk("default_branch"); ok { - if d.HasChange("default_branch") { - if err := resourceAwsCodeCommitUpdateDefaultBranch(conn, d); err != nil { - return err - } - } - } - - if d.HasChange("description") { - if err := resourceAwsCodeCommitUpdateDescription(conn, d); err != nil { - return err - } - } - - return resourceAwsCodeCommitRepositoryRead(d, meta) -} - -func resourceAwsCodeCommitRepositoryRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codecommitconn - - input := &codecommit.GetRepositoryInput{ - RepositoryName: aws.String(d.Id()), - } - - out, err := conn.GetRepository(input) - if err != nil { - if isAWSErr(err, codecommit.ErrCodeRepositoryDoesNotExistException, "") { - log.Printf("[WARN] CodeCommit Repository (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } else { - return fmt.Errorf("Error reading CodeCommit Repository: %s", err.Error()) - } - } - - d.Set("repository_id", out.RepositoryMetadata.RepositoryId) - d.Set("arn", out.RepositoryMetadata.Arn) - d.Set("clone_url_http", out.RepositoryMetadata.CloneUrlHttp) - d.Set("clone_url_ssh", out.RepositoryMetadata.CloneUrlSsh) - d.Set("description", out.RepositoryMetadata.RepositoryDescription) - d.Set("repository_name", out.RepositoryMetadata.RepositoryName) - - if _, ok := d.GetOk("default_branch"); ok { - if out.RepositoryMetadata.DefaultBranch != nil { - d.Set("default_branch", out.RepositoryMetadata.DefaultBranch) - } - } - - return nil -} - -func resourceAwsCodeCommitRepositoryDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codecommitconn - - log.Printf("[DEBUG] CodeCommit Delete Repository: %s", d.Id()) - _, err := conn.DeleteRepository(&codecommit.DeleteRepositoryInput{ - RepositoryName: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error deleting CodeCommit Repository: %s", err.Error()) - } - - return nil -} - -func resourceAwsCodeCommitUpdateDescription(conn *codecommit.CodeCommit, d *schema.ResourceData) error { - branchInput := &codecommit.UpdateRepositoryDescriptionInput{ - RepositoryName: aws.String(d.Id()), - RepositoryDescription: aws.String(d.Get("description").(string)), - } - - _, err := conn.UpdateRepositoryDescription(branchInput) - if err != nil { - return fmt.Errorf("Error Updating Repository Description for CodeCommit Repository: %s", err.Error()) - } - - return nil -} - -func resourceAwsCodeCommitUpdateDefaultBranch(conn *codecommit.CodeCommit, d *schema.ResourceData) error { - input := &codecommit.ListBranchesInput{ - RepositoryName: aws.String(d.Id()), - } - - out, err := conn.ListBranches(input) - if err != nil { - return fmt.Errorf("Error reading CodeCommit Repository branches: %s", err.Error()) - } - - if len(out.Branches) == 0 { - log.Printf("[WARN] Not setting Default Branch CodeCommit Repository that has no branches: %s", d.Id()) - return nil - } - - branchInput := &codecommit.UpdateDefaultBranchInput{ - RepositoryName: aws.String(d.Id()), - DefaultBranchName: aws.String(d.Get("default_branch").(string)), - } - - _, err = conn.UpdateDefaultBranch(branchInput) - if err != nil { - return fmt.Errorf("Error Updating Default Branch for CodeCommit Repository: %s", err.Error()) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_trigger.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_trigger.go deleted file mode 100644 index 2435bb16e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_trigger.go +++ /dev/null @@ -1,159 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/codecommit" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsCodeCommitTrigger() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCodeCommitTriggerCreate, - Read: resourceAwsCodeCommitTriggerRead, - Delete: resourceAwsCodeCommitTriggerDelete, - - Schema: map[string]*schema.Schema{ - "repository_name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "configuration_id": { - Type: schema.TypeString, - Computed: true, - }, - "trigger": { - Type: schema.TypeSet, - ForceNew: true, - Required: true, - MaxItems: 10, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "destination_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "custom_data": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "branches": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "events": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - }, - } -} - -func resourceAwsCodeCommitTriggerCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codecommitconn - - // Expand the "trigger" set to aws-sdk-go compat []*codecommit.RepositoryTrigger - triggers := expandAwsCodeCommitTriggers(d.Get("trigger").(*schema.Set).List()) - - input := &codecommit.PutRepositoryTriggersInput{ - RepositoryName: aws.String(d.Get("repository_name").(string)), - Triggers: triggers, - } - - resp, err := conn.PutRepositoryTriggers(input) - if err != nil { - return fmt.Errorf("Error creating CodeCommit Trigger: %s", err) - } - - log.Printf("[INFO] Code Commit Trigger Created %s input %s", resp, input) - - d.SetId(d.Get("repository_name").(string)) - d.Set("configuration_id", resp.ConfigurationId) - - return resourceAwsCodeCommitTriggerRead(d, meta) -} - -func resourceAwsCodeCommitTriggerRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codecommitconn - - input := &codecommit.GetRepositoryTriggersInput{ - RepositoryName: aws.String(d.Id()), - } - - resp, err := conn.GetRepositoryTriggers(input) - if err != nil { - return fmt.Errorf("Error reading CodeCommit Trigger: %s", err.Error()) - } - - log.Printf("[DEBUG] CodeCommit Trigger: %s", resp) - - return nil -} - -func resourceAwsCodeCommitTriggerDelete(d *schema.ResourceData, meta interface{}) error { - - conn := meta.(*AWSClient).codecommitconn - - log.Printf("[DEBUG] Deleting Trigger: %q", d.Id()) - - input := &codecommit.PutRepositoryTriggersInput{ - RepositoryName: aws.String(d.Get("repository_name").(string)), - Triggers: []*codecommit.RepositoryTrigger{}, - } - - _, err := conn.PutRepositoryTriggers(input) - - return err -} - -func expandAwsCodeCommitTriggers(configured []interface{}) []*codecommit.RepositoryTrigger { - triggers := make([]*codecommit.RepositoryTrigger, 0, len(configured)) - // Loop over our configured triggers and create - // an array of aws-sdk-go compatible objects - for _, lRaw := range configured { - data := lRaw.(map[string]interface{}) - t := &codecommit.RepositoryTrigger{ - CustomData: aws.String(data["custom_data"].(string)), - DestinationArn: aws.String(data["destination_arn"].(string)), - Name: aws.String(data["name"].(string)), - } - - branches := make([]*string, len(data["branches"].([]interface{}))) - for i, vv := range data["branches"].([]interface{}) { - str := vv.(string) - branches[i] = aws.String(str) - } - t.Branches = branches - - events := make([]*string, len(data["events"].([]interface{}))) - for i, vv := range data["events"].([]interface{}) { - str := vv.(string) - events[i] = aws.String(str) - } - t.Events = events - - triggers = append(triggers, t) - } - return triggers -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_app.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_app.go deleted file mode 100644 index 09c48c655..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_app.go +++ /dev/null @@ -1,175 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/codedeploy" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCodeDeployApp() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCodeDeployAppCreate, - Read: resourceAwsCodeDeployAppRead, - Update: resourceAwsCodeDeployUpdate, - Delete: resourceAwsCodeDeployAppDelete, - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.Split(d.Id(), ":") - - if len(idParts) == 2 { - return []*schema.ResourceData{d}, nil - } - - applicationName := d.Id() - conn := meta.(*AWSClient).codedeployconn - - input := &codedeploy.GetApplicationInput{ - ApplicationName: aws.String(applicationName), - } - - log.Printf("[DEBUG] Reading CodeDeploy Application: %s", input) - output, err := conn.GetApplication(input) - - if err != nil { - return []*schema.ResourceData{}, err - } - - if output == nil || output.Application == nil { - return []*schema.ResourceData{}, fmt.Errorf("error reading CodeDeploy Application (%s): empty response", applicationName) - } - - d.SetId(fmt.Sprintf("%s:%s", aws.StringValue(output.Application.ApplicationId), applicationName)) - d.Set("name", applicationName) - - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "compute_platform": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - codedeploy.ComputePlatformEcs, - codedeploy.ComputePlatformLambda, - codedeploy.ComputePlatformServer, - }, false), - Default: codedeploy.ComputePlatformServer, - }, - - // The unique ID is set by AWS on create. - "unique_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - } -} - -func resourceAwsCodeDeployAppCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codedeployconn - - application := d.Get("name").(string) - computePlatform := d.Get("compute_platform").(string) - log.Printf("[DEBUG] Creating CodeDeploy application %s", application) - - resp, err := conn.CreateApplication(&codedeploy.CreateApplicationInput{ - ApplicationName: aws.String(application), - ComputePlatform: aws.String(computePlatform), - }) - if err != nil { - return err - } - log.Printf("[DEBUG] CodeDeploy application %s created", *resp.ApplicationId) - - // Despite giving the application a unique ID, AWS doesn't actually use - // it in API calls. Use it and the app name to identify the resource in - // the state file. This allows us to reliably detect both when the TF - // config file changes and when the user deletes the app without removing - // it first from the TF config. - d.SetId(fmt.Sprintf("%s:%s", *resp.ApplicationId, application)) - - return resourceAwsCodeDeployAppRead(d, meta) -} - -func resourceAwsCodeDeployAppRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codedeployconn - - application := resourceAwsCodeDeployAppParseId(d.Id()) - log.Printf("[DEBUG] Reading CodeDeploy application %s", application) - resp, err := conn.GetApplication(&codedeploy.GetApplicationInput{ - ApplicationName: aws.String(application), - }) - if err != nil { - if codedeployerr, ok := err.(awserr.Error); ok && codedeployerr.Code() == "ApplicationDoesNotExistException" { - d.SetId("") - return nil - } else { - log.Printf("[ERROR] Error finding CodeDeploy application: %s", err) - return err - } - } - - d.Set("compute_platform", resp.Application.ComputePlatform) - d.Set("name", resp.Application.ApplicationName) - - return nil -} - -func resourceAwsCodeDeployUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codedeployconn - - o, n := d.GetChange("name") - - _, err := conn.UpdateApplication(&codedeploy.UpdateApplicationInput{ - ApplicationName: aws.String(o.(string)), - NewApplicationName: aws.String(n.(string)), - }) - if err != nil { - return err - } - log.Printf("[DEBUG] CodeDeploy application %s updated", n) - - d.Set("name", n) - - return nil -} - -func resourceAwsCodeDeployAppDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codedeployconn - - _, err := conn.DeleteApplication(&codedeploy.DeleteApplicationInput{ - ApplicationName: aws.String(d.Get("name").(string)), - }) - if err != nil { - if cderr, ok := err.(awserr.Error); ok && cderr.Code() == "InvalidApplicationNameException" { - return nil - } else { - log.Printf("[ERROR] Error deleting CodeDeploy application: %s", err) - return err - } - } - - return nil -} - -func resourceAwsCodeDeployAppParseId(id string) string { - parts := strings.SplitN(id, ":", 2) - // We currently omit the application ID as it is not currently used anywhere - return parts[1] -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go deleted file mode 100644 index 96e4fbe08..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go +++ /dev/null @@ -1,323 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/codedeploy" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCodeDeployDeploymentConfig() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCodeDeployDeploymentConfigCreate, - Read: resourceAwsCodeDeployDeploymentConfigRead, - Delete: resourceAwsCodeDeployDeploymentConfigDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "deployment_config_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "compute_platform": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - codedeploy.ComputePlatformServer, - codedeploy.ComputePlatformLambda, - codedeploy.ComputePlatformEcs, - }, false), - Default: codedeploy.ComputePlatformServer, - }, - - "minimum_healthy_hosts": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - codedeploy.MinimumHealthyHostsTypeHostCount, - codedeploy.MinimumHealthyHostsTypeFleetPercent, - }, false), - }, - "value": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - - "traffic_routing_config": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - codedeploy.TrafficRoutingTypeAllAtOnce, - codedeploy.TrafficRoutingTypeTimeBasedCanary, - codedeploy.TrafficRoutingTypeTimeBasedLinear, - }, false), - Default: codedeploy.TrafficRoutingTypeAllAtOnce, - }, - - "time_based_canary": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"traffic_routing_config.0.time_based_linear"}, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "interval": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - "percentage": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - - "time_based_linear": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"traffic_routing_config.0.time_based_canary"}, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "interval": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - "percentage": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - }, - }, - }, - - "deployment_config_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsCodeDeployDeploymentConfigCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codedeployconn - - input := &codedeploy.CreateDeploymentConfigInput{ - DeploymentConfigName: aws.String(d.Get("deployment_config_name").(string)), - ComputePlatform: aws.String(d.Get("compute_platform").(string)), - MinimumHealthyHosts: expandAwsCodeDeployConfigMinimumHealthHosts(d), - TrafficRoutingConfig: expandAwsCodeDeployTrafficRoutingConfig(d), - } - - _, err := conn.CreateDeploymentConfig(input) - if err != nil { - return err - } - - d.SetId(d.Get("deployment_config_name").(string)) - - return resourceAwsCodeDeployDeploymentConfigRead(d, meta) -} - -func resourceAwsCodeDeployDeploymentConfigRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codedeployconn - - input := &codedeploy.GetDeploymentConfigInput{ - DeploymentConfigName: aws.String(d.Id()), - } - - resp, err := conn.GetDeploymentConfig(input) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "DeploymentConfigDoesNotExistException" { - log.Printf("[DEBUG] CodeDeploy Deployment Config (%s) not found", d.Id()) - d.SetId("") - return nil - } - } - return err - } - - if resp.DeploymentConfigInfo == nil { - return fmt.Errorf("Cannot find DeploymentConfig %q", d.Id()) - } - - if err := d.Set("minimum_healthy_hosts", flattenAwsCodeDeployConfigMinimumHealthHosts(resp.DeploymentConfigInfo.MinimumHealthyHosts)); err != nil { - return err - } - - if err := d.Set("traffic_routing_config", flattenAwsCodeDeployTrafficRoutingConfig(resp.DeploymentConfigInfo.TrafficRoutingConfig)); err != nil { - return err - } - - d.Set("deployment_config_id", resp.DeploymentConfigInfo.DeploymentConfigId) - d.Set("deployment_config_name", resp.DeploymentConfigInfo.DeploymentConfigName) - d.Set("compute_platform", resp.DeploymentConfigInfo.ComputePlatform) - - return nil -} - -func resourceAwsCodeDeployDeploymentConfigDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codedeployconn - - input := &codedeploy.DeleteDeploymentConfigInput{ - DeploymentConfigName: aws.String(d.Id()), - } - - _, err := conn.DeleteDeploymentConfig(input) - return err -} - -func expandAwsCodeDeployConfigMinimumHealthHosts(d *schema.ResourceData) *codedeploy.MinimumHealthyHosts { - hosts, ok := d.GetOk("minimum_healthy_hosts") - if !ok { - return nil - } - host := hosts.([]interface{})[0].(map[string]interface{}) - - minimumHealthyHost := codedeploy.MinimumHealthyHosts{ - Type: aws.String(host["type"].(string)), - Value: aws.Int64(int64(host["value"].(int))), - } - - return &minimumHealthyHost -} - -func expandAwsCodeDeployTrafficRoutingConfig(d *schema.ResourceData) *codedeploy.TrafficRoutingConfig { - block, ok := d.GetOk("traffic_routing_config") - if !ok { - return nil - } - config := block.([]interface{})[0].(map[string]interface{}) - trafficRoutingConfig := codedeploy.TrafficRoutingConfig{} - - if trafficType, ok := config["type"]; ok { - trafficRoutingConfig.Type = aws.String(trafficType.(string)) - } - if canary, ok := config["time_based_canary"]; ok && len(canary.([]interface{})) > 0 { - canaryConfig := canary.([]interface{})[0].(map[string]interface{}) - trafficRoutingConfig.TimeBasedCanary = expandAwsCodeDeployTrafficTimeBasedCanaryConfig(canaryConfig) - } - if linear, ok := config["time_based_linear"]; ok && len(linear.([]interface{})) > 0 { - linearConfig := linear.([]interface{})[0].(map[string]interface{}) - trafficRoutingConfig.TimeBasedLinear = expandAwsCodeDeployTrafficTimeBasedLinearConfig(linearConfig) - } - - return &trafficRoutingConfig -} - -func expandAwsCodeDeployTrafficTimeBasedCanaryConfig(config map[string]interface{}) *codedeploy.TimeBasedCanary { - canary := codedeploy.TimeBasedCanary{} - if interval, ok := config["interval"]; ok { - canary.CanaryInterval = aws.Int64(int64(interval.(int))) - } - if percentage, ok := config["percentage"]; ok { - canary.CanaryPercentage = aws.Int64(int64(percentage.(int))) - } - return &canary -} - -func expandAwsCodeDeployTrafficTimeBasedLinearConfig(config map[string]interface{}) *codedeploy.TimeBasedLinear { - linear := codedeploy.TimeBasedLinear{} - if interval, ok := config["interval"]; ok { - linear.LinearInterval = aws.Int64(int64(interval.(int))) - } - if percentage, ok := config["percentage"]; ok { - linear.LinearPercentage = aws.Int64(int64(percentage.(int))) - } - return &linear -} - -func flattenAwsCodeDeployConfigMinimumHealthHosts(hosts *codedeploy.MinimumHealthyHosts) []map[string]interface{} { - result := make([]map[string]interface{}, 0) - if hosts == nil { - return result - } - - item := make(map[string]interface{}) - - item["type"] = aws.StringValue(hosts.Type) - item["value"] = aws.Int64Value(hosts.Value) - - return append(result, item) -} - -func flattenAwsCodeDeployTrafficRoutingConfig(config *codedeploy.TrafficRoutingConfig) []map[string]interface{} { - result := make([]map[string]interface{}, 0) - if config == nil { - return result - } - - item := make(map[string]interface{}) - - item["type"] = aws.StringValue(config.Type) - item["time_based_canary"] = flattenAwsCodeDeployTrafficRoutingCanaryConfig(config.TimeBasedCanary) - item["time_based_linear"] = flattenAwsCodeDeployTrafficRoutingLinearConfig(config.TimeBasedLinear) - - return append(result, item) -} - -func flattenAwsCodeDeployTrafficRoutingCanaryConfig(canary *codedeploy.TimeBasedCanary) []map[string]interface{} { - result := make([]map[string]interface{}, 0) - if canary == nil { - return result - } - - item := make(map[string]interface{}) - item["interval"] = aws.Int64Value(canary.CanaryInterval) - item["percentage"] = aws.Int64Value(canary.CanaryPercentage) - - return append(result, item) -} - -func flattenAwsCodeDeployTrafficRoutingLinearConfig(linear *codedeploy.TimeBasedLinear) []map[string]interface{} { - result := make([]map[string]interface{}, 0) - if linear == nil { - return result - } - - item := make(map[string]interface{}) - item["interval"] = aws.Int64Value(linear.LinearInterval) - item["percentage"] = aws.Int64Value(linear.LinearPercentage) - - return append(result, item) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go deleted file mode 100644 index b4af8e082..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go +++ /dev/null @@ -1,1466 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "regexp" - "sort" - "strings" - "time" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/codedeploy" -) - -func resourceAwsCodeDeployDeploymentGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCodeDeployDeploymentGroupCreate, - Read: resourceAwsCodeDeployDeploymentGroupRead, - Update: resourceAwsCodeDeployDeploymentGroupUpdate, - Delete: resourceAwsCodeDeployDeploymentGroupDelete, - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.Split(d.Id(), ":") - - if len(idParts) != 2 { - return []*schema.ResourceData{}, fmt.Errorf("expected ID in format ApplicationName:DeploymentGroupName, received: %s", d.Id()) - } - - applicationName := idParts[0] - deploymentGroupName := idParts[1] - conn := meta.(*AWSClient).codedeployconn - - input := &codedeploy.GetDeploymentGroupInput{ - ApplicationName: aws.String(applicationName), - DeploymentGroupName: aws.String(deploymentGroupName), - } - - log.Printf("[DEBUG] Reading CodeDeploy Application: %s", input) - output, err := conn.GetDeploymentGroup(input) - - if err != nil { - return []*schema.ResourceData{}, err - } - - if output == nil || output.DeploymentGroupInfo == nil { - return []*schema.ResourceData{}, fmt.Errorf("error reading CodeDeploy Application (%s): empty response", d.Id()) - } - - d.SetId(aws.StringValue(output.DeploymentGroupInfo.DeploymentGroupId)) - d.Set("app_name", applicationName) - d.Set("deployment_group_name", deploymentGroupName) - - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "app_name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(0, 100), - }, - - "deployment_group_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 100), - }, - - "deployment_style": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "deployment_option": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - codedeploy.DeploymentOptionWithTrafficControl, - codedeploy.DeploymentOptionWithoutTrafficControl, - }, false), - }, - "deployment_type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - codedeploy.DeploymentTypeInPlace, - codedeploy.DeploymentTypeBlueGreen, - }, false), - }, - }, - }, - }, - - "blue_green_deployment_config": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "deployment_ready_option": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "action_on_timeout": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - codedeploy.DeploymentReadyActionContinueDeployment, - codedeploy.DeploymentReadyActionStopDeployment, - }, false), - }, - "wait_time_in_minutes": { - Type: schema.TypeInt, - Optional: true, - }, - }, - }, - }, - - "green_fleet_provisioning_option": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "action": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - codedeploy.GreenFleetProvisioningActionDiscoverExisting, - codedeploy.GreenFleetProvisioningActionCopyAutoScalingGroup, - }, false), - }, - }, - }, - }, - - "terminate_blue_instances_on_deployment_success": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "action": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - codedeploy.InstanceActionTerminate, - codedeploy.InstanceActionKeepAlive, - }, false), - }, - "termination_wait_time_in_minutes": { - Type: schema.TypeInt, - Optional: true, - }, - }, - }, - }, - }, - }, - }, - - "service_role_arn": { - Type: schema.TypeString, - Required: true, - }, - - "alarm_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "alarms": { - Type: schema.TypeSet, - MaxItems: 10, - Optional: true, - Set: schema.HashString, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "enabled": { - Type: schema.TypeBool, - Optional: true, - }, - - "ignore_poll_alarm_failure": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - }, - - "load_balancer_info": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "elb_info": { - Type: schema.TypeSet, - Optional: true, - Set: loadBalancerInfoHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "target_group_info": { - Type: schema.TypeSet, - Optional: true, - Set: loadBalancerInfoHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "target_group_pair_info": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "prod_traffic_route": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "listener_arns": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "target_group": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 2, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.NoZeroValues, - }, - }, - }, - }, - "test_traffic_route": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "listener_arns": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - - "auto_rollback_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Optional: true, - }, - - "events": { - Type: schema.TypeSet, - Optional: true, - Set: schema.HashString, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - - "autoscaling_groups": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "deployment_config_name": { - Type: schema.TypeString, - Optional: true, - Default: "CodeDeployDefault.OneAtATime", - ValidateFunc: validation.StringLenBetween(0, 100), - }, - - "ec2_tag_set": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "ec2_tag_filter": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key": { - Type: schema.TypeString, - Optional: true, - }, - - "type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateTagFilters, - }, - - "value": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - Set: resourceAwsCodeDeployTagFilterHash, - }, - }, - }, - Set: resourceAwsCodeDeployTagSetHash, - }, - - "ec2_tag_filter": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key": { - Type: schema.TypeString, - Optional: true, - }, - - "type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateTagFilters, - }, - - "value": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - Set: resourceAwsCodeDeployTagFilterHash, - }, - - "ecs_service": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cluster_name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.NoZeroValues, - }, - "service_name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.NoZeroValues, - }, - }, - }, - }, - - "on_premises_instance_tag_filter": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key": { - Type: schema.TypeString, - Optional: true, - }, - - "type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateTagFilters, - }, - - "value": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - Set: resourceAwsCodeDeployTagFilterHash, - }, - - "trigger_configuration": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "trigger_events": { - Type: schema.TypeSet, - Required: true, - Set: schema.HashString, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - codedeploy.TriggerEventTypeDeploymentStart, - codedeploy.TriggerEventTypeDeploymentSuccess, - codedeploy.TriggerEventTypeDeploymentFailure, - codedeploy.TriggerEventTypeDeploymentStop, - codedeploy.TriggerEventTypeDeploymentRollback, - codedeploy.TriggerEventTypeDeploymentReady, - codedeploy.TriggerEventTypeInstanceStart, - codedeploy.TriggerEventTypeInstanceSuccess, - codedeploy.TriggerEventTypeInstanceFailure, - codedeploy.TriggerEventTypeInstanceReady, - }, false), - }, - }, - - "trigger_name": { - Type: schema.TypeString, - Required: true, - }, - - "trigger_target_arn": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - Set: resourceAwsCodeDeployTriggerConfigHash, - }, - }, - } -} - -func resourceAwsCodeDeployDeploymentGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codedeployconn - - // required fields - applicationName := d.Get("app_name").(string) - deploymentGroupName := d.Get("deployment_group_name").(string) - serviceRoleArn := d.Get("service_role_arn").(string) - - input := codedeploy.CreateDeploymentGroupInput{ - ApplicationName: aws.String(applicationName), - DeploymentGroupName: aws.String(deploymentGroupName), - ServiceRoleArn: aws.String(serviceRoleArn), - } - - if attr, ok := d.GetOk("deployment_style"); ok { - input.DeploymentStyle = expandDeploymentStyle(attr.([]interface{})) - } - - if attr, ok := d.GetOk("deployment_config_name"); ok { - input.DeploymentConfigName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("autoscaling_groups"); ok { - input.AutoScalingGroups = expandStringList(attr.(*schema.Set).List()) - } - - if attr, ok := d.GetOk("on_premises_instance_tag_filter"); ok { - onPremFilters := buildOnPremTagFilters(attr.(*schema.Set).List()) - input.OnPremisesInstanceTagFilters = onPremFilters - } - - if attr, ok := d.GetOk("ec2_tag_set"); ok { - input.Ec2TagSet = buildEC2TagSet(attr.(*schema.Set).List()) - } - - if attr, ok := d.GetOk("ec2_tag_filter"); ok { - input.Ec2TagFilters = buildEC2TagFilters(attr.(*schema.Set).List()) - } - - if attr, ok := d.GetOk("ecs_service"); ok { - input.EcsServices = expandCodeDeployEcsServices(attr.([]interface{})) - } - - if attr, ok := d.GetOk("trigger_configuration"); ok { - triggerConfigs := buildTriggerConfigs(attr.(*schema.Set).List()) - input.TriggerConfigurations = triggerConfigs - } - - if attr, ok := d.GetOk("auto_rollback_configuration"); ok { - input.AutoRollbackConfiguration = buildAutoRollbackConfig(attr.([]interface{})) - } - - if attr, ok := d.GetOk("alarm_configuration"); ok { - input.AlarmConfiguration = buildAlarmConfig(attr.([]interface{})) - } - - if attr, ok := d.GetOk("load_balancer_info"); ok { - input.LoadBalancerInfo = expandLoadBalancerInfo(attr.([]interface{})) - } - - if attr, ok := d.GetOk("blue_green_deployment_config"); ok { - input.BlueGreenDeploymentConfiguration = expandBlueGreenDeploymentConfig(attr.([]interface{})) - } - - log.Printf("[DEBUG] Creating CodeDeploy DeploymentGroup %s", applicationName) - - var resp *codedeploy.CreateDeploymentGroupOutput - var err error - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - resp, err = conn.CreateDeploymentGroup(&input) - return handleCreateError(err) - }) - - if err != nil { - return err - } - - d.SetId(*resp.DeploymentGroupId) - - return resourceAwsCodeDeployDeploymentGroupRead(d, meta) -} - -func resourceAwsCodeDeployDeploymentGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codedeployconn - - log.Printf("[DEBUG] Reading CodeDeploy DeploymentGroup %s", d.Id()) - - resp, err := conn.GetDeploymentGroup(&codedeploy.GetDeploymentGroupInput{ - ApplicationName: aws.String(d.Get("app_name").(string)), - DeploymentGroupName: aws.String(d.Get("deployment_group_name").(string)), - }) - - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "DeploymentGroupDoesNotExistException" { - log.Printf("[INFO] CodeDeployment DeploymentGroup %s not found", d.Get("deployment_group_name").(string)) - d.SetId("") - return nil - } - - return err - } - - d.Set("app_name", resp.DeploymentGroupInfo.ApplicationName) - d.Set("deployment_config_name", resp.DeploymentGroupInfo.DeploymentConfigName) - d.Set("deployment_group_name", resp.DeploymentGroupInfo.DeploymentGroupName) - d.Set("service_role_arn", resp.DeploymentGroupInfo.ServiceRoleArn) - - autoScalingGroups := make([]string, len(resp.DeploymentGroupInfo.AutoScalingGroups)) - for i, autoScalingGroup := range resp.DeploymentGroupInfo.AutoScalingGroups { - autoScalingGroups[i] = aws.StringValue(autoScalingGroup.Name) - } - if err := d.Set("autoscaling_groups", autoScalingGroups); err != nil { - return fmt.Errorf("error setting autoscaling_groups: %s", err) - } - - if err := d.Set("deployment_style", flattenDeploymentStyle(resp.DeploymentGroupInfo.DeploymentStyle)); err != nil { - return err - } - - if err := d.Set("ec2_tag_set", ec2TagSetToMap(resp.DeploymentGroupInfo.Ec2TagSet)); err != nil { - return err - } - - if err := d.Set("ec2_tag_filter", ec2TagFiltersToMap(resp.DeploymentGroupInfo.Ec2TagFilters)); err != nil { - return err - } - - if err := d.Set("ecs_service", flattenCodeDeployEcsServices(resp.DeploymentGroupInfo.EcsServices)); err != nil { - return fmt.Errorf("error setting ecs_service: %s", err) - } - - if err := d.Set("on_premises_instance_tag_filter", onPremisesTagFiltersToMap(resp.DeploymentGroupInfo.OnPremisesInstanceTagFilters)); err != nil { - return err - } - - if err := d.Set("trigger_configuration", triggerConfigsToMap(resp.DeploymentGroupInfo.TriggerConfigurations)); err != nil { - return err - } - - if err := d.Set("auto_rollback_configuration", autoRollbackConfigToMap(resp.DeploymentGroupInfo.AutoRollbackConfiguration)); err != nil { - return err - } - - if err := d.Set("alarm_configuration", alarmConfigToMap(resp.DeploymentGroupInfo.AlarmConfiguration)); err != nil { - return err - } - - if err := d.Set("load_balancer_info", flattenLoadBalancerInfo(resp.DeploymentGroupInfo.LoadBalancerInfo)); err != nil { - return err - } - - if err := d.Set("blue_green_deployment_config", flattenBlueGreenDeploymentConfig(resp.DeploymentGroupInfo.BlueGreenDeploymentConfiguration)); err != nil { - return err - } - - return nil -} - -func resourceAwsCodeDeployDeploymentGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codedeployconn - - // required fields - applicationName := d.Get("app_name").(string) - deploymentGroupName := d.Get("deployment_group_name").(string) - serviceRoleArn := d.Get("service_role_arn").(string) - - input := codedeploy.UpdateDeploymentGroupInput{ - ApplicationName: aws.String(applicationName), - CurrentDeploymentGroupName: aws.String(deploymentGroupName), - ServiceRoleArn: aws.String(serviceRoleArn), - } - - if d.HasChange("deployment_group_name") { - _, n := d.GetChange("deployment_group_name") - input.NewDeploymentGroupName = aws.String(n.(string)) - } - - if d.HasChange("deployment_style") { - _, n := d.GetChange("deployment_style") - input.DeploymentStyle = expandDeploymentStyle(n.([]interface{})) - } - - if d.HasChange("deployment_config_name") { - _, n := d.GetChange("deployment_config_name") - input.DeploymentConfigName = aws.String(n.(string)) - } - - // include (original or new) autoscaling groups when blue_green_deployment_config changes - if d.HasChange("autoscaling_groups") || d.HasChange("blue_green_deployment_config") { - _, n := d.GetChange("autoscaling_groups") - input.AutoScalingGroups = expandStringList(n.(*schema.Set).List()) - } - - // TagFilters aren't like tags. They don't append. They simply replace. - if d.HasChange("on_premises_instance_tag_filter") { - _, n := d.GetChange("on_premises_instance_tag_filter") - onPremFilters := buildOnPremTagFilters(n.(*schema.Set).List()) - input.OnPremisesInstanceTagFilters = onPremFilters - } - - if d.HasChange("ec2_tag_set") { - _, n := d.GetChange("ec2_tag_set") - ec2TagSet := buildEC2TagSet(n.(*schema.Set).List()) - input.Ec2TagSet = ec2TagSet - } - - if d.HasChange("ec2_tag_filter") { - _, n := d.GetChange("ec2_tag_filter") - ec2Filters := buildEC2TagFilters(n.(*schema.Set).List()) - input.Ec2TagFilters = ec2Filters - } - - if d.HasChange("ecs_service") { - input.EcsServices = expandCodeDeployEcsServices(d.Get("ecs_service").([]interface{})) - } - - if d.HasChange("trigger_configuration") { - _, n := d.GetChange("trigger_configuration") - triggerConfigs := buildTriggerConfigs(n.(*schema.Set).List()) - input.TriggerConfigurations = triggerConfigs - } - - if d.HasChange("auto_rollback_configuration") { - _, n := d.GetChange("auto_rollback_configuration") - input.AutoRollbackConfiguration = buildAutoRollbackConfig(n.([]interface{})) - } - - if d.HasChange("alarm_configuration") { - _, n := d.GetChange("alarm_configuration") - input.AlarmConfiguration = buildAlarmConfig(n.([]interface{})) - } - - if d.HasChange("load_balancer_info") { - _, n := d.GetChange("load_balancer_info") - input.LoadBalancerInfo = expandLoadBalancerInfo(n.([]interface{})) - } - - if d.HasChange("blue_green_deployment_config") { - _, n := d.GetChange("blue_green_deployment_config") - input.BlueGreenDeploymentConfiguration = expandBlueGreenDeploymentConfig(n.([]interface{})) - } - - log.Printf("[DEBUG] Updating CodeDeploy DeploymentGroup %s", d.Id()) - - var err error - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err = conn.UpdateDeploymentGroup(&input) - return handleUpdateError(err) - }) - - if err != nil { - return err - } - - return resourceAwsCodeDeployDeploymentGroupRead(d, meta) -} - -func resourceAwsCodeDeployDeploymentGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codedeployconn - - log.Printf("[DEBUG] Deleting CodeDeploy DeploymentGroup %s", d.Id()) - _, err := conn.DeleteDeploymentGroup(&codedeploy.DeleteDeploymentGroupInput{ - ApplicationName: aws.String(d.Get("app_name").(string)), - DeploymentGroupName: aws.String(d.Get("deployment_group_name").(string)), - }) - - return err -} - -func handleCreateError(err error) *resource.RetryError { - return handleCodeDeployApiError(err, "create") -} - -func handleUpdateError(err error) *resource.RetryError { - return handleCodeDeployApiError(err, "update") -} - -func handleCodeDeployApiError(err error, operation string) *resource.RetryError { - if err == nil { - return nil - } - - retry := false - codedeployErr, ok := err.(awserr.Error) - if !ok { - return resource.NonRetryableError(err) - } - - if codedeployErr.Code() == "InvalidRoleException" { - retry = true - } - - if codedeployErr.Code() == "InvalidTriggerConfigException" { - r := regexp.MustCompile("^Topic ARN .+ is not valid$") - if r.MatchString(codedeployErr.Message()) { - retry = true - } - } - - if retry { - log.Printf("[DEBUG] Trying to %s DeploymentGroup again: %q", operation, codedeployErr.Message()) - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) -} - -// buildOnPremTagFilters converts raw schema lists into a list of -// codedeploy.TagFilters. -func buildOnPremTagFilters(configured []interface{}) []*codedeploy.TagFilter { - filters := make([]*codedeploy.TagFilter, 0) - for _, raw := range configured { - var filter codedeploy.TagFilter - m := raw.(map[string]interface{}) - - if v, ok := m["key"]; ok { - filter.Key = aws.String(v.(string)) - } - if v, ok := m["type"]; ok { - filter.Type = aws.String(v.(string)) - } - if v, ok := m["value"]; ok { - filter.Value = aws.String(v.(string)) - } - - filters = append(filters, &filter) - } - - return filters -} - -// buildEC2TagFilters converts raw schema lists into a list of -// codedeploy.EC2TagFilters. -func buildEC2TagFilters(configured []interface{}) []*codedeploy.EC2TagFilter { - filters := make([]*codedeploy.EC2TagFilter, 0) - for _, raw := range configured { - var filter codedeploy.EC2TagFilter - m := raw.(map[string]interface{}) - - filter.Key = aws.String(m["key"].(string)) - filter.Type = aws.String(m["type"].(string)) - filter.Value = aws.String(m["value"].(string)) - - filters = append(filters, &filter) - } - - return filters -} - -// buildEC2TagSet converts raw schema lists into a codedeploy.EC2TagSet. -func buildEC2TagSet(configured []interface{}) *codedeploy.EC2TagSet { - filterSets := make([][]*codedeploy.EC2TagFilter, 0) - for _, raw := range configured { - m := raw.(map[string]interface{}) - rawFilters := m["ec2_tag_filter"].(*schema.Set) - filters := buildEC2TagFilters(rawFilters.List()) - filterSets = append(filterSets, filters) - } - return &codedeploy.EC2TagSet{Ec2TagSetList: filterSets} -} - -// buildTriggerConfigs converts a raw schema list into a list of -// codedeploy.TriggerConfig. -func buildTriggerConfigs(configured []interface{}) []*codedeploy.TriggerConfig { - configs := make([]*codedeploy.TriggerConfig, 0, len(configured)) - for _, raw := range configured { - var config codedeploy.TriggerConfig - m := raw.(map[string]interface{}) - - config.TriggerEvents = expandStringSet(m["trigger_events"].(*schema.Set)) - config.TriggerName = aws.String(m["trigger_name"].(string)) - config.TriggerTargetArn = aws.String(m["trigger_target_arn"].(string)) - - configs = append(configs, &config) - } - return configs -} - -// buildAutoRollbackConfig converts a raw schema list containing a map[string]interface{} -// into a single codedeploy.AutoRollbackConfiguration -func buildAutoRollbackConfig(configured []interface{}) *codedeploy.AutoRollbackConfiguration { - result := &codedeploy.AutoRollbackConfiguration{} - - if len(configured) == 1 { - config := configured[0].(map[string]interface{}) - result.Enabled = aws.Bool(config["enabled"].(bool)) - result.Events = expandStringSet(config["events"].(*schema.Set)) - } else { // delete the configuration - result.Enabled = aws.Bool(false) - result.Events = make([]*string, 0) - } - - return result -} - -// buildAlarmConfig converts a raw schema list containing a map[string]interface{} -// into a single codedeploy.AlarmConfiguration -func buildAlarmConfig(configured []interface{}) *codedeploy.AlarmConfiguration { - result := &codedeploy.AlarmConfiguration{} - - if len(configured) == 1 { - config := configured[0].(map[string]interface{}) - names := expandStringSet(config["alarms"].(*schema.Set)) - alarms := make([]*codedeploy.Alarm, 0, len(names)) - - for _, name := range names { - alarm := &codedeploy.Alarm{ - Name: name, - } - alarms = append(alarms, alarm) - } - - result.Alarms = alarms - result.Enabled = aws.Bool(config["enabled"].(bool)) - result.IgnorePollAlarmFailure = aws.Bool(config["ignore_poll_alarm_failure"].(bool)) - } else { // delete the configuration - result.Alarms = make([]*codedeploy.Alarm, 0) - result.Enabled = aws.Bool(false) - result.IgnorePollAlarmFailure = aws.Bool(false) - } - - return result -} - -func expandCodeDeployEcsServices(l []interface{}) []*codedeploy.ECSService { - ecsServices := make([]*codedeploy.ECSService, 0) - - for _, mRaw := range l { - if mRaw == nil { - continue - } - - m := mRaw.(map[string]interface{}) - - ecsService := &codedeploy.ECSService{ - ClusterName: aws.String(m["cluster_name"].(string)), - ServiceName: aws.String(m["service_name"].(string)), - } - - ecsServices = append(ecsServices, ecsService) - } - - return ecsServices -} - -func expandCodeDeployElbInfo(l []interface{}) []*codedeploy.ELBInfo { - elbInfos := []*codedeploy.ELBInfo{} - - for _, mRaw := range l { - if mRaw == nil { - continue - } - - m := mRaw.(map[string]interface{}) - - elbInfo := &codedeploy.ELBInfo{ - Name: aws.String(m["name"].(string)), - } - - elbInfos = append(elbInfos, elbInfo) - } - - return elbInfos -} - -func expandCodeDeployTargetGroupInfo(l []interface{}) []*codedeploy.TargetGroupInfo { - targetGroupInfos := []*codedeploy.TargetGroupInfo{} - - for _, mRaw := range l { - if mRaw == nil { - continue - } - - m := mRaw.(map[string]interface{}) - - targetGroupInfo := &codedeploy.TargetGroupInfo{ - Name: aws.String(m["name"].(string)), - } - - targetGroupInfos = append(targetGroupInfos, targetGroupInfo) - } - - return targetGroupInfos -} - -func expandCodeDeployTargetGroupPairInfo(l []interface{}) []*codedeploy.TargetGroupPairInfo { - targetGroupPairInfos := []*codedeploy.TargetGroupPairInfo{} - - for _, mRaw := range l { - if mRaw == nil { - continue - } - - m := mRaw.(map[string]interface{}) - - targetGroupPairInfo := &codedeploy.TargetGroupPairInfo{ - ProdTrafficRoute: expandCodeDeployTrafficRoute(m["prod_traffic_route"].([]interface{})), - TargetGroups: expandCodeDeployTargetGroupInfo(m["target_group"].([]interface{})), - TestTrafficRoute: expandCodeDeployTrafficRoute(m["test_traffic_route"].([]interface{})), - } - - targetGroupPairInfos = append(targetGroupPairInfos, targetGroupPairInfo) - } - - return targetGroupPairInfos -} - -func expandCodeDeployTrafficRoute(l []interface{}) *codedeploy.TrafficRoute { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - trafficRoute := &codedeploy.TrafficRoute{ - ListenerArns: expandStringSet(m["listener_arns"].(*schema.Set)), - } - - return trafficRoute -} - -// expandDeploymentStyle converts a raw schema list containing a map[string]interface{} -// into a single codedeploy.DeploymentStyle object -func expandDeploymentStyle(list []interface{}) *codedeploy.DeploymentStyle { - if len(list) == 0 || list[0] == nil { - return nil - } - - style := list[0].(map[string]interface{}) - result := &codedeploy.DeploymentStyle{} - - if v, ok := style["deployment_option"]; ok { - result.DeploymentOption = aws.String(v.(string)) - } - if v, ok := style["deployment_type"]; ok { - result.DeploymentType = aws.String(v.(string)) - } - - return result -} - -// expandLoadBalancerInfo converts a raw schema list containing a map[string]interface{} -// into a single codedeploy.LoadBalancerInfo object -func expandLoadBalancerInfo(list []interface{}) *codedeploy.LoadBalancerInfo { - if len(list) == 0 || list[0] == nil { - return nil - } - - lbInfo := list[0].(map[string]interface{}) - loadBalancerInfo := &codedeploy.LoadBalancerInfo{} - - if attr, ok := lbInfo["elb_info"]; ok && attr.(*schema.Set).Len() > 0 { - loadBalancerInfo.ElbInfoList = expandCodeDeployElbInfo(attr.(*schema.Set).List()) - } - - if attr, ok := lbInfo["target_group_info"]; ok && attr.(*schema.Set).Len() > 0 { - loadBalancerInfo.TargetGroupInfoList = expandCodeDeployTargetGroupInfo(attr.(*schema.Set).List()) - } - - if attr, ok := lbInfo["target_group_pair_info"]; ok && len(attr.([]interface{})) > 0 { - loadBalancerInfo.TargetGroupPairInfoList = expandCodeDeployTargetGroupPairInfo(attr.([]interface{})) - } - - return loadBalancerInfo -} - -// expandBlueGreenDeploymentConfig converts a raw schema list containing a map[string]interface{} -// into a single codedeploy.BlueGreenDeploymentConfiguration object -func expandBlueGreenDeploymentConfig(list []interface{}) *codedeploy.BlueGreenDeploymentConfiguration { - if len(list) == 0 || list[0] == nil { - return nil - } - - config := list[0].(map[string]interface{}) - blueGreenDeploymentConfig := &codedeploy.BlueGreenDeploymentConfiguration{} - - if attr, ok := config["deployment_ready_option"]; ok { - a := attr.([]interface{}) - - if len(a) > 0 && a[0] != nil { - m := a[0].(map[string]interface{}) - - deploymentReadyOption := &codedeploy.DeploymentReadyOption{} - if v, ok := m["action_on_timeout"]; ok { - deploymentReadyOption.ActionOnTimeout = aws.String(v.(string)) - } - if v, ok := m["wait_time_in_minutes"]; ok { - deploymentReadyOption.WaitTimeInMinutes = aws.Int64(int64(v.(int))) - } - blueGreenDeploymentConfig.DeploymentReadyOption = deploymentReadyOption - } - } - - if attr, ok := config["green_fleet_provisioning_option"]; ok { - a := attr.([]interface{}) - - if len(a) > 0 && a[0] != nil { - m := a[0].(map[string]interface{}) - - greenFleetProvisioningOption := &codedeploy.GreenFleetProvisioningOption{} - if v, ok := m["action"]; ok { - greenFleetProvisioningOption.Action = aws.String(v.(string)) - } - blueGreenDeploymentConfig.GreenFleetProvisioningOption = greenFleetProvisioningOption - } - } - - if attr, ok := config["terminate_blue_instances_on_deployment_success"]; ok { - a := attr.([]interface{}) - - if len(a) > 0 && a[0] != nil { - m := a[0].(map[string]interface{}) - - blueInstanceTerminationOption := &codedeploy.BlueInstanceTerminationOption{} - if v, ok := m["action"]; ok { - blueInstanceTerminationOption.Action = aws.String(v.(string)) - } - if v, ok := m["termination_wait_time_in_minutes"]; ok { - blueInstanceTerminationOption.TerminationWaitTimeInMinutes = aws.Int64(int64(v.(int))) - } - blueGreenDeploymentConfig.TerminateBlueInstancesOnDeploymentSuccess = blueInstanceTerminationOption - } - } - - return blueGreenDeploymentConfig -} - -// ec2TagFiltersToMap converts lists of tag filters into a []map[string]interface{}. -func ec2TagFiltersToMap(list []*codedeploy.EC2TagFilter) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(list)) - for _, tf := range list { - l := make(map[string]interface{}) - if tf.Key != nil && *tf.Key != "" { - l["key"] = *tf.Key - } - if tf.Value != nil && *tf.Value != "" { - l["value"] = *tf.Value - } - if tf.Type != nil && *tf.Type != "" { - l["type"] = *tf.Type - } - result = append(result, l) - } - return result -} - -// onPremisesTagFiltersToMap converts lists of on-prem tag filters into a []map[string]string. -func onPremisesTagFiltersToMap(list []*codedeploy.TagFilter) []map[string]string { - result := make([]map[string]string, 0, len(list)) - for _, tf := range list { - l := make(map[string]string) - if tf.Key != nil && *tf.Key != "" { - l["key"] = *tf.Key - } - if tf.Value != nil && *tf.Value != "" { - l["value"] = *tf.Value - } - if tf.Type != nil && *tf.Type != "" { - l["type"] = *tf.Type - } - result = append(result, l) - } - return result -} - -// ec2TagSetToMap converts lists of tag filters into a [][]map[string]string. -func ec2TagSetToMap(tagSet *codedeploy.EC2TagSet) []map[string]interface{} { - var result []map[string]interface{} - if tagSet == nil { - result = make([]map[string]interface{}, 0) - } else { - result = make([]map[string]interface{}, 0, len(tagSet.Ec2TagSetList)) - for _, filterSet := range tagSet.Ec2TagSetList { - filters := ec2TagFiltersToMap(filterSet) - filtersAsIntfSlice := make([]interface{}, 0, len(filters)) - for _, item := range filters { - filtersAsIntfSlice = append(filtersAsIntfSlice, item) - } - tagFilters := map[string]interface{}{ - "ec2_tag_filter": schema.NewSet(resourceAwsCodeDeployTagFilterHash, filtersAsIntfSlice), - } - result = append(result, tagFilters) - } - } - return result -} - -// triggerConfigsToMap converts a list of []*codedeploy.TriggerConfig into a []map[string]interface{} -func triggerConfigsToMap(list []*codedeploy.TriggerConfig) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(list)) - for _, tc := range list { - item := make(map[string]interface{}) - item["trigger_events"] = schema.NewSet(schema.HashString, flattenStringList(tc.TriggerEvents)) - item["trigger_name"] = *tc.TriggerName - item["trigger_target_arn"] = *tc.TriggerTargetArn - result = append(result, item) - } - return result -} - -// autoRollbackConfigToMap converts a codedeploy.AutoRollbackConfiguration -// into a []map[string]interface{} list containing a single item -func autoRollbackConfigToMap(config *codedeploy.AutoRollbackConfiguration) []map[string]interface{} { - result := make([]map[string]interface{}, 0, 1) - - // only create configurations that are enabled or temporarily disabled (retaining events) - // otherwise empty configurations will be created - if config != nil && (*config.Enabled || len(config.Events) > 0) { - item := make(map[string]interface{}) - item["enabled"] = *config.Enabled - item["events"] = schema.NewSet(schema.HashString, flattenStringList(config.Events)) - result = append(result, item) - } - - return result -} - -// alarmConfigToMap converts a codedeploy.AlarmConfiguration -// into a []map[string]interface{} list containing a single item -func alarmConfigToMap(config *codedeploy.AlarmConfiguration) []map[string]interface{} { - result := make([]map[string]interface{}, 0, 1) - - // only create configurations that are enabled or temporarily disabled (retaining alarms) - // otherwise empty configurations will be created - if config != nil && (*config.Enabled || len(config.Alarms) > 0) { - names := make([]*string, 0, len(config.Alarms)) - for _, alarm := range config.Alarms { - names = append(names, alarm.Name) - } - - item := make(map[string]interface{}) - item["alarms"] = schema.NewSet(schema.HashString, flattenStringList(names)) - item["enabled"] = *config.Enabled - item["ignore_poll_alarm_failure"] = *config.IgnorePollAlarmFailure - - result = append(result, item) - } - - return result -} - -func flattenCodeDeployEcsServices(ecsServices []*codedeploy.ECSService) []interface{} { - l := make([]interface{}, 0) - - for _, ecsService := range ecsServices { - if ecsService == nil { - continue - } - - m := map[string]interface{}{ - "cluster_name": aws.StringValue(ecsService.ClusterName), - "service_name": aws.StringValue(ecsService.ServiceName), - } - - l = append(l, m) - } - - return l -} - -func flattenCodeDeployElbInfo(elbInfos []*codedeploy.ELBInfo) []interface{} { - l := make([]interface{}, 0) - - for _, elbInfo := range elbInfos { - if elbInfo == nil { - continue - } - - m := map[string]interface{}{ - "name": aws.StringValue(elbInfo.Name), - } - - l = append(l, m) - } - - return l -} - -func flattenCodeDeployTargetGroupInfo(targetGroupInfos []*codedeploy.TargetGroupInfo) []interface{} { - l := make([]interface{}, 0) - - for _, targetGroupInfo := range targetGroupInfos { - if targetGroupInfo == nil { - continue - } - - m := map[string]interface{}{ - "name": aws.StringValue(targetGroupInfo.Name), - } - - l = append(l, m) - } - - return l -} - -func flattenCodeDeployTargetGroupPairInfo(targetGroupPairInfos []*codedeploy.TargetGroupPairInfo) []interface{} { - l := make([]interface{}, 0) - - for _, targetGroupPairInfo := range targetGroupPairInfos { - if targetGroupPairInfo == nil { - continue - } - - m := map[string]interface{}{ - "prod_traffic_route": flattenCodeDeployTrafficRoute(targetGroupPairInfo.ProdTrafficRoute), - "target_group": flattenCodeDeployTargetGroupInfo(targetGroupPairInfo.TargetGroups), - "test_traffic_route": flattenCodeDeployTrafficRoute(targetGroupPairInfo.TestTrafficRoute), - } - - l = append(l, m) - } - - return l -} - -func flattenCodeDeployTrafficRoute(trafficRoute *codedeploy.TrafficRoute) []interface{} { - if trafficRoute == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "listener_arns": schema.NewSet(schema.HashString, flattenStringList(trafficRoute.ListenerArns)), - } - - return []interface{}{m} -} - -// flattenDeploymentStyle converts a codedeploy.DeploymentStyle object -// into a []map[string]interface{} list containing a single item -func flattenDeploymentStyle(style *codedeploy.DeploymentStyle) []map[string]interface{} { - if style == nil { - return nil - } - - item := make(map[string]interface{}) - if style.DeploymentOption != nil { - item["deployment_option"] = *style.DeploymentOption - } - if style.DeploymentType != nil { - item["deployment_type"] = *style.DeploymentType - } - - result := make([]map[string]interface{}, 0, 1) - result = append(result, item) - return result -} - -func flattenLoadBalancerInfo(loadBalancerInfo *codedeploy.LoadBalancerInfo) []interface{} { - if loadBalancerInfo == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "elb_info": schema.NewSet(loadBalancerInfoHash, flattenCodeDeployElbInfo(loadBalancerInfo.ElbInfoList)), - "target_group_info": schema.NewSet(loadBalancerInfoHash, flattenCodeDeployTargetGroupInfo(loadBalancerInfo.TargetGroupInfoList)), - "target_group_pair_info": flattenCodeDeployTargetGroupPairInfo(loadBalancerInfo.TargetGroupPairInfoList), - } - - return []interface{}{m} -} - -// flattenBlueGreenDeploymentConfig converts a codedeploy.BlueGreenDeploymentConfiguration object -// into a []map[string]interface{} list containing a single item -func flattenBlueGreenDeploymentConfig(config *codedeploy.BlueGreenDeploymentConfiguration) []map[string]interface{} { - - if config == nil { - return nil - } - - m := make(map[string]interface{}) - - if config.DeploymentReadyOption != nil { - a := make([]map[string]interface{}, 0) - deploymentReadyOption := make(map[string]interface{}) - - if config.DeploymentReadyOption.ActionOnTimeout != nil { - deploymentReadyOption["action_on_timeout"] = *config.DeploymentReadyOption.ActionOnTimeout - } - if config.DeploymentReadyOption.WaitTimeInMinutes != nil { - deploymentReadyOption["wait_time_in_minutes"] = *config.DeploymentReadyOption.WaitTimeInMinutes - } - - m["deployment_ready_option"] = append(a, deploymentReadyOption) - } - - if config.GreenFleetProvisioningOption != nil { - b := make([]map[string]interface{}, 0) - greenFleetProvisioningOption := make(map[string]interface{}) - - if config.GreenFleetProvisioningOption.Action != nil { - greenFleetProvisioningOption["action"] = *config.GreenFleetProvisioningOption.Action - } - - m["green_fleet_provisioning_option"] = append(b, greenFleetProvisioningOption) - } - - if config.TerminateBlueInstancesOnDeploymentSuccess != nil { - c := make([]map[string]interface{}, 0) - blueInstanceTerminationOption := make(map[string]interface{}) - - if config.TerminateBlueInstancesOnDeploymentSuccess.Action != nil { - blueInstanceTerminationOption["action"] = *config.TerminateBlueInstancesOnDeploymentSuccess.Action - } - if config.TerminateBlueInstancesOnDeploymentSuccess.TerminationWaitTimeInMinutes != nil { - blueInstanceTerminationOption["termination_wait_time_in_minutes"] = *config.TerminateBlueInstancesOnDeploymentSuccess.TerminationWaitTimeInMinutes - } - - m["terminate_blue_instances_on_deployment_success"] = append(c, blueInstanceTerminationOption) - } - - list := make([]map[string]interface{}, 0) - list = append(list, m) - return list -} - -func resourceAwsCodeDeployTagFilterHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - // Nothing's actually required in tag filters, so we must check the - // presence of all values before attempting a hash. - if v, ok := m["key"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["type"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["value"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - return hashcode.String(buf.String()) -} - -func resourceAwsCodeDeployTagSetHash(v interface{}) int { - tagSetMap := v.(map[string]interface{}) - filterSet := tagSetMap["ec2_tag_filter"] - filterSetSlice := filterSet.(*schema.Set).List() - - var x uint64 = 1 - for i, filter := range filterSetSlice { - x = ((x << 7) | (x >> (64 - 7))) ^ uint64(i) ^ uint64(resourceAwsCodeDeployTagFilterHash(filter)) - } - return int(x) -} - -func resourceAwsCodeDeployTriggerConfigHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["trigger_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["trigger_target_arn"].(string))) - - if triggerEvents, ok := m["trigger_events"]; ok { - names := triggerEvents.(*schema.Set).List() - strings := make([]string, len(names)) - for i, raw := range names { - strings[i] = raw.(string) - } - sort.Strings(strings) - - for _, s := range strings { - buf.WriteString(fmt.Sprintf("%s-", s)) - } - } - return hashcode.String(buf.String()) -} - -func loadBalancerInfoHash(v interface{}) int { - var buf bytes.Buffer - - if v == nil { - return hashcode.String(buf.String()) - } - - m := v.(map[string]interface{}) - if v, ok := m["name"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go deleted file mode 100644 index 9bd8a0d46..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go +++ /dev/null @@ -1,479 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "os" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/codepipeline" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCodePipeline() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCodePipelineCreate, - Read: resourceAwsCodePipelineRead, - Update: resourceAwsCodePipelineUpdate, - Delete: resourceAwsCodePipelineDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - }, - - "artifact_store": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "location": { - Type: schema.TypeString, - Required: true, - }, - - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - codepipeline.ArtifactStoreTypeS3, - }, false), - }, - - "encryption_key": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Required: true, - }, - - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - codepipeline.EncryptionKeyTypeKms, - }, false), - }, - }, - }, - }, - }, - }, - }, - "stage": { - Type: schema.TypeList, - MinItems: 2, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "action": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "configuration": { - Type: schema.TypeMap, - Optional: true, - }, - "category": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - codepipeline.ActionCategorySource, - codepipeline.ActionCategoryBuild, - codepipeline.ActionCategoryDeploy, - codepipeline.ActionCategoryTest, - codepipeline.ActionCategoryInvoke, - codepipeline.ActionCategoryApproval, - }, false), - }, - "owner": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - codepipeline.ActionOwnerAws, - codepipeline.ActionOwnerThirdParty, - codepipeline.ActionOwnerCustom, - }, false), - }, - "provider": { - Type: schema.TypeString, - Required: true, - }, - "version": { - Type: schema.TypeString, - Required: true, - }, - "input_artifacts": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "output_artifacts": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "name": { - Type: schema.TypeString, - Required: true, - }, - "role_arn": { - Type: schema.TypeString, - Optional: true, - }, - "run_order": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func resourceAwsCodePipelineCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codepipelineconn - params := &codepipeline.CreatePipelineInput{ - Pipeline: expandAwsCodePipeline(d), - } - - var resp *codepipeline.CreatePipelineOutput - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var err error - - resp, err = conn.CreatePipeline(params) - - if err != nil { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - }) - if err != nil { - return fmt.Errorf("Error creating CodePipeline: %s", err) - } - if resp.Pipeline == nil { - return fmt.Errorf("Error creating CodePipeline: invalid response from AWS") - } - - d.SetId(*resp.Pipeline.Name) - return resourceAwsCodePipelineRead(d, meta) -} - -func expandAwsCodePipeline(d *schema.ResourceData) *codepipeline.PipelineDeclaration { - pipelineArtifactStore := expandAwsCodePipelineArtifactStore(d) - pipelineStages := expandAwsCodePipelineStages(d) - - pipeline := codepipeline.PipelineDeclaration{ - Name: aws.String(d.Get("name").(string)), - RoleArn: aws.String(d.Get("role_arn").(string)), - ArtifactStore: pipelineArtifactStore, - Stages: pipelineStages, - } - return &pipeline -} -func expandAwsCodePipelineArtifactStore(d *schema.ResourceData) *codepipeline.ArtifactStore { - configs := d.Get("artifact_store").([]interface{}) - data := configs[0].(map[string]interface{}) - pipelineArtifactStore := codepipeline.ArtifactStore{ - Location: aws.String(data["location"].(string)), - Type: aws.String(data["type"].(string)), - } - tek := data["encryption_key"].([]interface{}) - if len(tek) > 0 { - vk := tek[0].(map[string]interface{}) - ek := codepipeline.EncryptionKey{ - Type: aws.String(vk["type"].(string)), - Id: aws.String(vk["id"].(string)), - } - pipelineArtifactStore.EncryptionKey = &ek - } - return &pipelineArtifactStore -} - -func flattenAwsCodePipelineArtifactStore(artifactStore *codepipeline.ArtifactStore) []interface{} { - values := map[string]interface{}{} - values["type"] = *artifactStore.Type - values["location"] = *artifactStore.Location - if artifactStore.EncryptionKey != nil { - as := map[string]interface{}{ - "id": *artifactStore.EncryptionKey.Id, - "type": *artifactStore.EncryptionKey.Type, - } - values["encryption_key"] = []interface{}{as} - } - return []interface{}{values} -} - -func expandAwsCodePipelineStages(d *schema.ResourceData) []*codepipeline.StageDeclaration { - configs := d.Get("stage").([]interface{}) - pipelineStages := []*codepipeline.StageDeclaration{} - - for _, stage := range configs { - data := stage.(map[string]interface{}) - a := data["action"].([]interface{}) - actions := expandAwsCodePipelineActions(a) - pipelineStages = append(pipelineStages, &codepipeline.StageDeclaration{ - Name: aws.String(data["name"].(string)), - Actions: actions, - }) - } - return pipelineStages -} - -func flattenAwsCodePipelineStages(stages []*codepipeline.StageDeclaration) []interface{} { - stagesList := []interface{}{} - for _, stage := range stages { - values := map[string]interface{}{} - values["name"] = *stage.Name - values["action"] = flattenAwsCodePipelineStageActions(stage.Actions) - stagesList = append(stagesList, values) - } - return stagesList - -} - -func expandAwsCodePipelineActions(s []interface{}) []*codepipeline.ActionDeclaration { - actions := []*codepipeline.ActionDeclaration{} - for _, config := range s { - data := config.(map[string]interface{}) - - conf := expandAwsCodePipelineStageActionConfiguration(data["configuration"].(map[string]interface{})) - if data["provider"].(string) == "GitHub" { - githubToken := os.Getenv("GITHUB_TOKEN") - if githubToken != "" { - conf["OAuthToken"] = aws.String(githubToken) - } - - } - - action := codepipeline.ActionDeclaration{ - ActionTypeId: &codepipeline.ActionTypeId{ - Category: aws.String(data["category"].(string)), - Owner: aws.String(data["owner"].(string)), - - Provider: aws.String(data["provider"].(string)), - Version: aws.String(data["version"].(string)), - }, - Name: aws.String(data["name"].(string)), - Configuration: conf, - } - - oa := data["output_artifacts"].([]interface{}) - if len(oa) > 0 { - outputArtifacts := expandAwsCodePipelineActionsOutputArtifacts(oa) - action.OutputArtifacts = outputArtifacts - - } - ia := data["input_artifacts"].([]interface{}) - if len(ia) > 0 { - inputArtifacts := expandAwsCodePipelineActionsInputArtifacts(ia) - action.InputArtifacts = inputArtifacts - - } - ra := data["role_arn"].(string) - if ra != "" { - action.RoleArn = aws.String(ra) - } - ro := data["run_order"].(int) - if ro > 0 { - action.RunOrder = aws.Int64(int64(ro)) - } - actions = append(actions, &action) - } - return actions -} - -func flattenAwsCodePipelineStageActions(actions []*codepipeline.ActionDeclaration) []interface{} { - actionsList := []interface{}{} - for _, action := range actions { - values := map[string]interface{}{ - "category": *action.ActionTypeId.Category, - "owner": *action.ActionTypeId.Owner, - "provider": *action.ActionTypeId.Provider, - "version": *action.ActionTypeId.Version, - "name": *action.Name, - } - if action.Configuration != nil { - config := flattenAwsCodePipelineStageActionConfiguration(action.Configuration) - _, ok := config["OAuthToken"] - actionProvider := *action.ActionTypeId.Provider - if ok && actionProvider == "GitHub" { - delete(config, "OAuthToken") - } - values["configuration"] = config - } - - if len(action.OutputArtifacts) > 0 { - values["output_artifacts"] = flattenAwsCodePipelineActionsOutputArtifacts(action.OutputArtifacts) - } - - if len(action.InputArtifacts) > 0 { - values["input_artifacts"] = flattenAwsCodePipelineActionsInputArtifacts(action.InputArtifacts) - } - - if action.RoleArn != nil { - values["role_arn"] = *action.RoleArn - } - - if action.RunOrder != nil { - values["run_order"] = int(*action.RunOrder) - } - - actionsList = append(actionsList, values) - } - return actionsList -} - -func expandAwsCodePipelineStageActionConfiguration(config map[string]interface{}) map[string]*string { - m := map[string]*string{} - for k, v := range config { - s := v.(string) - m[k] = &s - } - return m -} - -func flattenAwsCodePipelineStageActionConfiguration(config map[string]*string) map[string]string { - m := map[string]string{} - for k, v := range config { - m[k] = *v - } - return m -} - -func expandAwsCodePipelineActionsOutputArtifacts(s []interface{}) []*codepipeline.OutputArtifact { - outputArtifacts := []*codepipeline.OutputArtifact{} - for _, artifact := range s { - if artifact == nil { - continue - } - outputArtifacts = append(outputArtifacts, &codepipeline.OutputArtifact{ - Name: aws.String(artifact.(string)), - }) - } - return outputArtifacts -} - -func flattenAwsCodePipelineActionsOutputArtifacts(artifacts []*codepipeline.OutputArtifact) []string { - values := []string{} - for _, artifact := range artifacts { - values = append(values, *artifact.Name) - } - return values -} - -func expandAwsCodePipelineActionsInputArtifacts(s []interface{}) []*codepipeline.InputArtifact { - outputArtifacts := []*codepipeline.InputArtifact{} - for _, artifact := range s { - if artifact == nil { - continue - } - outputArtifacts = append(outputArtifacts, &codepipeline.InputArtifact{ - Name: aws.String(artifact.(string)), - }) - } - return outputArtifacts -} - -func flattenAwsCodePipelineActionsInputArtifacts(artifacts []*codepipeline.InputArtifact) []string { - values := []string{} - for _, artifact := range artifacts { - values = append(values, *artifact.Name) - } - return values -} - -func resourceAwsCodePipelineRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codepipelineconn - resp, err := conn.GetPipeline(&codepipeline.GetPipelineInput{ - Name: aws.String(d.Id()), - }) - - if err != nil { - pipelineerr, ok := err.(awserr.Error) - if ok && pipelineerr.Code() == "PipelineNotFoundException" { - log.Printf("[INFO] Codepipeline %q not found", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error retreiving Pipeline: %q", err) - } - metadata := resp.Metadata - pipeline := resp.Pipeline - - if err := d.Set("artifact_store", flattenAwsCodePipelineArtifactStore(pipeline.ArtifactStore)); err != nil { - return err - } - - if err := d.Set("stage", flattenAwsCodePipelineStages(pipeline.Stages)); err != nil { - return err - } - - d.Set("arn", metadata.PipelineArn) - d.Set("name", pipeline.Name) - d.Set("role_arn", pipeline.RoleArn) - return nil -} - -func resourceAwsCodePipelineUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codepipelineconn - - pipeline := expandAwsCodePipeline(d) - params := &codepipeline.UpdatePipelineInput{ - Pipeline: pipeline, - } - _, err := conn.UpdatePipeline(params) - - if err != nil { - return fmt.Errorf( - "[ERROR] Error updating CodePipeline (%s): %s", - d.Id(), err) - } - - return resourceAwsCodePipelineRead(d, meta) -} - -func resourceAwsCodePipelineDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codepipelineconn - - _, err := conn.DeletePipeline(&codepipeline.DeletePipelineInput{ - Name: aws.String(d.Id()), - }) - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline_webhook.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline_webhook.go deleted file mode 100644 index 9a8275fac..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline_webhook.go +++ /dev/null @@ -1,285 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/codepipeline" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCodePipelineWebhook() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCodePipelineWebhookCreate, - Read: resourceAwsCodePipelineWebhookRead, - Update: nil, - Delete: resourceAwsCodePipelineWebhookDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "authentication": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - codepipeline.WebhookAuthenticationTypeGithubHmac, - codepipeline.WebhookAuthenticationTypeIp, - codepipeline.WebhookAuthenticationTypeUnauthenticated, - }, false), - }, - "authentication_configuration": { - Type: schema.TypeList, - MaxItems: 1, - MinItems: 1, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "secret_token": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "allowed_ip_range": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.CIDRNetwork(0, 32), - }, - }, - }, - }, - "filter": { - Type: schema.TypeSet, - ForceNew: true, - Required: true, - MinItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "json_path": { - Type: schema.TypeString, - Required: true, - }, - - "match_equals": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "url": { - Type: schema.TypeString, - Computed: true, - }, - - "target_action": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "target_pipeline": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - }, - } -} - -func extractCodePipelineWebhookRules(filters *schema.Set) []*codepipeline.WebhookFilterRule { - var rules []*codepipeline.WebhookFilterRule - - for _, f := range filters.List() { - r := f.(map[string]interface{}) - filter := codepipeline.WebhookFilterRule{ - JsonPath: aws.String(r["json_path"].(string)), - MatchEquals: aws.String(r["match_equals"].(string)), - } - - rules = append(rules, &filter) - } - - return rules -} - -func extractCodePipelineWebhookAuthConfig(authType string, authConfig map[string]interface{}) *codepipeline.WebhookAuthConfiguration { - var conf codepipeline.WebhookAuthConfiguration - switch authType { - case codepipeline.WebhookAuthenticationTypeIp: - conf.AllowedIPRange = aws.String(authConfig["allowed_ip_range"].(string)) - case codepipeline.WebhookAuthenticationTypeGithubHmac: - conf.SecretToken = aws.String(authConfig["secret_token"].(string)) - } - - return &conf -} - -func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codepipelineconn - authType := d.Get("authentication").(string) - - var authConfig map[string]interface{} - if v, ok := d.GetOk("authentication_configuration"); ok { - l := v.([]interface{}) - authConfig = l[0].(map[string]interface{}) - } - - request := &codepipeline.PutWebhookInput{ - Webhook: &codepipeline.WebhookDefinition{ - Authentication: aws.String(authType), - Filters: extractCodePipelineWebhookRules(d.Get("filter").(*schema.Set)), - Name: aws.String(d.Get("name").(string)), - TargetAction: aws.String(d.Get("target_action").(string)), - TargetPipeline: aws.String(d.Get("target_pipeline").(string)), - AuthenticationConfiguration: extractCodePipelineWebhookAuthConfig(authType, authConfig), - }, - } - - webhook, err := conn.PutWebhook(request) - if err != nil { - return fmt.Errorf("Error creating webhook: %s", err) - } - - d.SetId(aws.StringValue(webhook.Webhook.Arn)) - - return resourceAwsCodePipelineWebhookRead(d, meta) -} - -func getCodePipelineWebhook(conn *codepipeline.CodePipeline, arn string) (*codepipeline.ListWebhookItem, error) { - var nextToken string - - for { - input := &codepipeline.ListWebhooksInput{ - MaxResults: aws.Int64(int64(60)), - } - if nextToken != "" { - input.NextToken = aws.String(nextToken) - } - - out, err := conn.ListWebhooks(input) - if err != nil { - return nil, err - } - - for _, w := range out.Webhooks { - if arn == aws.StringValue(w.Arn) { - return w, nil - } - } - - if out.NextToken == nil { - break - } - - nextToken = aws.StringValue(out.NextToken) - } - - return nil, &resource.NotFoundError{ - Message: fmt.Sprintf("No webhook with ARN %s found", arn), - } -} - -func flattenCodePipelineWebhookFilters(filters []*codepipeline.WebhookFilterRule) []interface{} { - results := []interface{}{} - for _, filter := range filters { - f := map[string]interface{}{ - "json_path": aws.StringValue(filter.JsonPath), - "match_equals": aws.StringValue(filter.MatchEquals), - } - results = append(results, f) - } - - return results -} - -func flattenCodePipelineWebhookAuthenticationConfiguration(authConfig *codepipeline.WebhookAuthConfiguration) []interface{} { - conf := map[string]interface{}{} - if authConfig.AllowedIPRange != nil { - conf["allowed_ip_range"] = aws.StringValue(authConfig.AllowedIPRange) - } - - if authConfig.SecretToken != nil { - conf["secret_token"] = aws.StringValue(authConfig.SecretToken) - } - - var results []interface{} - if len(conf) > 0 { - results = append(results, conf) - } - - return results -} - -func resourceAwsCodePipelineWebhookRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codepipelineconn - - arn := d.Id() - webhook, err := getCodePipelineWebhook(conn, arn) - - if isResourceNotFoundError(err) { - log.Printf("[WARN] CodePipeline Webhook (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error getting CodePipeline Webhook (%s): %s", d.Id(), err) - } - - name := aws.StringValue(webhook.Definition.Name) - if name == "" { - return fmt.Errorf("Webhook not found: %s", arn) - } - - d.Set("name", name) - d.Set("url", aws.StringValue(webhook.Url)) - - if err := d.Set("target_action", aws.StringValue(webhook.Definition.TargetAction)); err != nil { - return err - } - - if err := d.Set("target_pipeline", aws.StringValue(webhook.Definition.TargetPipeline)); err != nil { - return err - } - - if err := d.Set("authentication", aws.StringValue(webhook.Definition.Authentication)); err != nil { - return err - } - - if err := d.Set("authentication_configuration", flattenCodePipelineWebhookAuthenticationConfiguration(webhook.Definition.AuthenticationConfiguration)); err != nil { - return fmt.Errorf("error setting authentication_configuration: %s", err) - } - - if err := d.Set("filter", flattenCodePipelineWebhookFilters(webhook.Definition.Filters)); err != nil { - return fmt.Errorf("error setting filter: %s", err) - } - - return nil -} - -func resourceAwsCodePipelineWebhookDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codepipelineconn - name := d.Get("name").(string) - - input := codepipeline.DeleteWebhookInput{ - Name: &name, - } - _, err := conn.DeleteWebhook(&input) - - if err != nil { - return fmt.Errorf("Could not delete webhook: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go deleted file mode 100644 index bc043d111..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go +++ /dev/null @@ -1,244 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/cognitoidentity" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsCognitoIdentityPool() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCognitoIdentityPoolCreate, - Read: resourceAwsCognitoIdentityPoolRead, - Update: resourceAwsCognitoIdentityPoolUpdate, - Delete: resourceAwsCognitoIdentityPoolDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "identity_pool_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateCognitoIdentityPoolName, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "cognito_identity_providers": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "client_id": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateCognitoIdentityProvidersClientId, - }, - "provider_name": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateCognitoIdentityProvidersProviderName, - }, - "server_side_token_check": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - }, - - "developer_provider_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, // Forcing a new resource since it cannot be edited afterwards - ValidateFunc: validateCognitoProviderDeveloperName, - }, - - "allow_unauthenticated_identities": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "openid_connect_provider_arns": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateArn, - }, - }, - - "saml_provider_arns": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateArn, - }, - }, - - "supported_login_providers": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateCognitoSupportedLoginProviders, - }, - }, - }, - } -} - -func resourceAwsCognitoIdentityPoolCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoconn - log.Print("[DEBUG] Creating Cognito Identity Pool") - - params := &cognitoidentity.CreateIdentityPoolInput{ - IdentityPoolName: aws.String(d.Get("identity_pool_name").(string)), - AllowUnauthenticatedIdentities: aws.Bool(d.Get("allow_unauthenticated_identities").(bool)), - } - - if v, ok := d.GetOk("developer_provider_name"); ok { - params.DeveloperProviderName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("supported_login_providers"); ok { - params.SupportedLoginProviders = expandCognitoSupportedLoginProviders(v.(map[string]interface{})) - } - - if v, ok := d.GetOk("cognito_identity_providers"); ok { - params.CognitoIdentityProviders = expandCognitoIdentityProviders(v.(*schema.Set)) - } - - if v, ok := d.GetOk("saml_provider_arns"); ok { - params.SamlProviderARNs = expandStringList(v.([]interface{})) - } - - if v, ok := d.GetOk("openid_connect_provider_arns"); ok { - params.OpenIdConnectProviderARNs = expandStringList(v.([]interface{})) - } - - entity, err := conn.CreateIdentityPool(params) - if err != nil { - return fmt.Errorf("Error creating Cognito Identity Pool: %s", err) - } - - d.SetId(*entity.IdentityPoolId) - - return resourceAwsCognitoIdentityPoolRead(d, meta) -} - -func resourceAwsCognitoIdentityPoolRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoconn - log.Printf("[DEBUG] Reading Cognito Identity Pool: %s", d.Id()) - - ip, err := conn.DescribeIdentityPool(&cognitoidentity.DescribeIdentityPoolInput{ - IdentityPoolId: aws.String(d.Id()), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" { - d.SetId("") - return nil - } - return err - } - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "cognito-identity", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("identitypool/%s", d.Id()), - } - d.Set("arn", arn.String()) - d.Set("identity_pool_name", ip.IdentityPoolName) - d.Set("allow_unauthenticated_identities", ip.AllowUnauthenticatedIdentities) - d.Set("developer_provider_name", ip.DeveloperProviderName) - - if err := d.Set("cognito_identity_providers", flattenCognitoIdentityProviders(ip.CognitoIdentityProviders)); err != nil { - return fmt.Errorf("Error setting cognito_identity_providers error: %#v", err) - } - - if err := d.Set("openid_connect_provider_arns", flattenStringList(ip.OpenIdConnectProviderARNs)); err != nil { - return fmt.Errorf("Error setting openid_connect_provider_arns error: %#v", err) - } - - if err := d.Set("saml_provider_arns", flattenStringList(ip.SamlProviderARNs)); err != nil { - return fmt.Errorf("Error setting saml_provider_arns error: %#v", err) - } - - if err := d.Set("supported_login_providers", flattenCognitoSupportedLoginProviders(ip.SupportedLoginProviders)); err != nil { - return fmt.Errorf("Error setting supported_login_providers error: %#v", err) - } - - return nil -} - -func resourceAwsCognitoIdentityPoolUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoconn - log.Print("[DEBUG] Updating Cognito Identity Pool") - - params := &cognitoidentity.IdentityPool{ - IdentityPoolId: aws.String(d.Id()), - AllowUnauthenticatedIdentities: aws.Bool(d.Get("allow_unauthenticated_identities").(bool)), - IdentityPoolName: aws.String(d.Get("identity_pool_name").(string)), - } - - if d.HasChange("developer_provider_name") { - params.DeveloperProviderName = aws.String(d.Get("developer_provider_name").(string)) - } - - if d.HasChange("cognito_identity_providers") { - params.CognitoIdentityProviders = expandCognitoIdentityProviders(d.Get("cognito_identity_providers").(*schema.Set)) - } - - if d.HasChange("supported_login_providers") { - params.SupportedLoginProviders = expandCognitoSupportedLoginProviders(d.Get("supported_login_providers").(map[string]interface{})) - } - - if d.HasChange("openid_connect_provider_arns") { - params.OpenIdConnectProviderARNs = expandStringList(d.Get("openid_connect_provider_arns").([]interface{})) - } - - if d.HasChange("saml_provider_arns") { - params.SamlProviderARNs = expandStringList(d.Get("saml_provider_arns").([]interface{})) - } - - _, err := conn.UpdateIdentityPool(params) - if err != nil { - return fmt.Errorf("Error creating Cognito Identity Pool: %s", err) - } - - return resourceAwsCognitoIdentityPoolRead(d, meta) -} - -func resourceAwsCognitoIdentityPoolDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoconn - log.Printf("[DEBUG] Deleting Cognito Identity Pool: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteIdentityPool(&cognitoidentity.DeleteIdentityPoolInput{ - IdentityPoolId: aws.String(d.Id()), - }) - - if err == nil { - return nil - } - - return resource.NonRetryableError(err) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool_roles_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool_roles_attachment.go deleted file mode 100644 index 0b62891cd..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool_roles_attachment.go +++ /dev/null @@ -1,262 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/cognitoidentity" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCognitoIdentityPoolRolesAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCognitoIdentityPoolRolesAttachmentCreate, - Read: resourceAwsCognitoIdentityPoolRolesAttachmentRead, - Update: resourceAwsCognitoIdentityPoolRolesAttachmentUpdate, - Delete: resourceAwsCognitoIdentityPoolRolesAttachmentDelete, - - Schema: map[string]*schema.Schema{ - "identity_pool_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "role_mapping": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "identity_provider": { - Type: schema.TypeString, - Required: true, - }, - "ambiguous_role_resolution": { - Type: schema.TypeString, - Optional: true, // Required if Type equals Token or Rules. - ValidateFunc: validation.StringInSlice([]string{ - cognitoidentity.AmbiguousRoleResolutionTypeAuthenticatedRole, - cognitoidentity.AmbiguousRoleResolutionTypeDeny, - }, false), - }, - "mapping_rule": { - Type: schema.TypeList, - Optional: true, - MaxItems: 25, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "claim": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateCognitoRoleMappingsRulesClaim, - }, - "match_type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - cognitoidentity.MappingRuleMatchTypeEquals, - cognitoidentity.MappingRuleMatchTypeContains, - cognitoidentity.MappingRuleMatchTypeStartsWith, - cognitoidentity.MappingRuleMatchTypeNotEqual, - }, false), - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "value": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 128), - }, - }, - }, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - cognitoidentity.RoleMappingTypeToken, - cognitoidentity.RoleMappingTypeRules, - }, false), - }, - }, - }, - }, - - "roles": { - Type: schema.TypeMap, - Required: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "authenticated": { - Type: schema.TypeString, - ValidateFunc: validateArn, - Optional: true, // Required if unauthenticated isn't defined. - }, - "unauthenticated": { - Type: schema.TypeString, - ValidateFunc: validateArn, - Optional: true, // Required if authenticated isn't defined. - }, - }, - }, - }, - }, - } -} - -func resourceAwsCognitoIdentityPoolRolesAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoconn - - // Validates role keys to be either authenticated or unauthenticated, - // since ValidateFunc validates only the value not the key. - if errors := validateCognitoRoles(d.Get("roles").(map[string]interface{})); len(errors) > 0 { - return fmt.Errorf("Error validating Roles: %v", errors) - } - - params := &cognitoidentity.SetIdentityPoolRolesInput{ - IdentityPoolId: aws.String(d.Get("identity_pool_id").(string)), - Roles: expandCognitoIdentityPoolRoles(d.Get("roles").(map[string]interface{})), - } - - if v, ok := d.GetOk("role_mapping"); ok { - errors := validateRoleMappings(v.(*schema.Set).List()) - - if len(errors) > 0 { - return fmt.Errorf("Error validating ambiguous role resolution: %v", errors) - } - - params.RoleMappings = expandCognitoIdentityPoolRoleMappingsAttachment(v.(*schema.Set).List()) - } - - log.Printf("[DEBUG] Creating Cognito Identity Pool Roles Association: %#v", params) - _, err := conn.SetIdentityPoolRoles(params) - if err != nil { - return fmt.Errorf("Error creating Cognito Identity Pool Roles Association: %s", err) - } - - d.SetId(d.Get("identity_pool_id").(string)) - - return resourceAwsCognitoIdentityPoolRolesAttachmentRead(d, meta) -} - -func resourceAwsCognitoIdentityPoolRolesAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoconn - log.Printf("[DEBUG] Reading Cognito Identity Pool Roles Association: %s", d.Id()) - - ip, err := conn.GetIdentityPoolRoles(&cognitoidentity.GetIdentityPoolRolesInput{ - IdentityPoolId: aws.String(d.Get("identity_pool_id").(string)), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" { - log.Printf("[WARN] Cognito Identity Pool Roles Association %s not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - if err := d.Set("roles", flattenCognitoIdentityPoolRoles(ip.Roles)); err != nil { - return fmt.Errorf("Error setting roles error: %#v", err) - } - - if err := d.Set("role_mapping", flattenCognitoIdentityPoolRoleMappingsAttachment(ip.RoleMappings)); err != nil { - return fmt.Errorf("Error setting role mappings error: %#v", err) - } - - return nil -} - -func resourceAwsCognitoIdentityPoolRolesAttachmentUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoconn - - // Validates role keys to be either authenticated or unauthenticated, - // since ValidateFunc validates only the value not the key. - if errors := validateCognitoRoles(d.Get("roles").(map[string]interface{})); len(errors) > 0 { - return fmt.Errorf("Error validating Roles: %v", errors) - } - - params := &cognitoidentity.SetIdentityPoolRolesInput{ - IdentityPoolId: aws.String(d.Get("identity_pool_id").(string)), - Roles: expandCognitoIdentityPoolRoles(d.Get("roles").(map[string]interface{})), - } - - if d.HasChange("role_mapping") { - v, ok := d.GetOk("role_mapping") - var mappings []interface{} - - if ok { - errors := validateRoleMappings(v.(*schema.Set).List()) - - if len(errors) > 0 { - return fmt.Errorf("Error validating ambiguous role resolution: %v", errors) - } - mappings = v.(*schema.Set).List() - } else { - mappings = []interface{}{} - } - - params.RoleMappings = expandCognitoIdentityPoolRoleMappingsAttachment(mappings) - } - - log.Printf("[DEBUG] Updating Cognito Identity Pool Roles Association: %#v", params) - _, err := conn.SetIdentityPoolRoles(params) - if err != nil { - return fmt.Errorf("Error updating Cognito Identity Pool Roles Association: %s", err) - } - - d.SetId(d.Get("identity_pool_id").(string)) - - return resourceAwsCognitoIdentityPoolRolesAttachmentRead(d, meta) -} - -func resourceAwsCognitoIdentityPoolRolesAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoconn - log.Printf("[DEBUG] Deleting Cognito Identity Pool Roles Association: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.SetIdentityPoolRoles(&cognitoidentity.SetIdentityPoolRolesInput{ - IdentityPoolId: aws.String(d.Get("identity_pool_id").(string)), - Roles: expandCognitoIdentityPoolRoles(make(map[string]interface{})), - RoleMappings: expandCognitoIdentityPoolRoleMappingsAttachment([]interface{}{}), - }) - - if err == nil { - return nil - } - - return resource.NonRetryableError(err) - }) -} - -// Validating that each role_mapping ambiguous_role_resolution -// is defined when "type" equals Token or Rules. -func validateRoleMappings(roleMappings []interface{}) []error { - errors := make([]error, 0) - - for _, r := range roleMappings { - rm := r.(map[string]interface{}) - - // If Type equals "Token" or "Rules", ambiguous_role_resolution must be defined. - // This should be removed as soon as we can have a ValidateFuncAgainst callable on the schema. - if err := validateCognitoRoleMappingsAmbiguousRoleResolutionAgainstType(rm); len(err) > 0 { - errors = append(errors, fmt.Errorf("Role Mapping %q: %v", rm["identity_provider"].(string), err)) - } - - // Validating that Rules Configuration is defined when Type equals Rules - // but not defined when Type equals Token. - if err := validateCognitoRoleMappingsRulesConfiguration(rm); len(err) > 0 { - errors = append(errors, fmt.Errorf("Role Mapping %q: %v", rm["identity_provider"].(string), err)) - } - } - - return errors -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_provider.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_provider.go deleted file mode 100644 index 57b25f8ca..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_provider.go +++ /dev/null @@ -1,209 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsCognitoIdentityProvider() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCognitoIdentityProviderCreate, - Read: resourceAwsCognitoIdentityProviderRead, - Update: resourceAwsCognitoIdentityProviderUpdate, - Delete: resourceAwsCognitoIdentityProviderDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "attribute_mapping": { - Type: schema.TypeMap, - Optional: true, - }, - - "idp_identifiers": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - - "provider_details": { - Type: schema.TypeMap, - Required: true, - }, - - "provider_name": { - Type: schema.TypeString, - Required: true, - }, - - "provider_type": { - Type: schema.TypeString, - Required: true, - }, - - "user_pool_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsCognitoIdentityProviderCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - log.Print("[DEBUG] Creating Cognito Identity Provider") - - providerName := d.Get("provider_name").(string) - userPoolID := d.Get("user_pool_id").(string) - params := &cognitoidentityprovider.CreateIdentityProviderInput{ - ProviderName: aws.String(providerName), - ProviderType: aws.String(d.Get("provider_type").(string)), - UserPoolId: aws.String(userPoolID), - } - - if v, ok := d.GetOk("attribute_mapping"); ok { - params.AttributeMapping = stringMapToPointers(v.(map[string]interface{})) - } - - if v, ok := d.GetOk("provider_details"); ok { - params.ProviderDetails = stringMapToPointers(v.(map[string]interface{})) - } - - if v, ok := d.GetOk("idp_identifiers"); ok { - params.IdpIdentifiers = expandStringList(v.([]interface{})) - } - - _, err := conn.CreateIdentityProvider(params) - if err != nil { - return fmt.Errorf("Error creating Cognito Identity Provider: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%s", userPoolID, providerName)) - - return resourceAwsCognitoIdentityProviderRead(d, meta) -} - -func resourceAwsCognitoIdentityProviderRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - log.Printf("[DEBUG] Reading Cognito Identity Provider: %s", d.Id()) - - userPoolID, providerName, err := decodeCognitoIdentityProviderID(d.Id()) - if err != nil { - return err - } - - ret, err := conn.DescribeIdentityProvider(&cognitoidentityprovider.DescribeIdentityProviderInput{ - ProviderName: aws.String(providerName), - UserPoolId: aws.String(userPoolID), - }) - - if err != nil { - if isAWSErr(err, cognitoidentityprovider.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Cognito Identity Provider %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - if ret == nil || ret.IdentityProvider == nil { - log.Printf("[WARN] Cognito Identity Provider %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - ip := ret.IdentityProvider - d.Set("provider_name", ip.ProviderName) - d.Set("provider_type", ip.ProviderType) - d.Set("user_pool_id", ip.UserPoolId) - - if err := d.Set("attribute_mapping", aws.StringValueMap(ip.AttributeMapping)); err != nil { - return fmt.Errorf("error setting attribute_mapping error: %s", err) - } - - if err := d.Set("provider_details", aws.StringValueMap(ip.ProviderDetails)); err != nil { - return fmt.Errorf("error setting provider_details error: %s", err) - } - - if err := d.Set("idp_identifiers", flattenStringList(ip.IdpIdentifiers)); err != nil { - return fmt.Errorf("error setting idp_identifiers error: %s", err) - } - - return nil -} - -func resourceAwsCognitoIdentityProviderUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - log.Print("[DEBUG] Updating Cognito Identity Provider") - - userPoolID, providerName, err := decodeCognitoIdentityProviderID(d.Id()) - if err != nil { - return err - } - - params := &cognitoidentityprovider.UpdateIdentityProviderInput{ - ProviderName: aws.String(providerName), - UserPoolId: aws.String(userPoolID), - } - - if d.HasChange("attribute_mapping") { - params.AttributeMapping = stringMapToPointers(d.Get("attribute_mapping").(map[string]interface{})) - } - - if d.HasChange("provider_details") { - params.ProviderDetails = stringMapToPointers(d.Get("provider_details").(map[string]interface{})) - } - - if d.HasChange("idp_identifiers") { - params.IdpIdentifiers = expandStringList(d.Get("supported_login_providers").([]interface{})) - } - - _, err = conn.UpdateIdentityProvider(params) - if err != nil { - return fmt.Errorf("Error updating Cognito Identity Provider: %s", err) - } - - return resourceAwsCognitoIdentityProviderRead(d, meta) -} - -func resourceAwsCognitoIdentityProviderDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - log.Printf("[DEBUG] Deleting Cognito Identity Provider: %s", d.Id()) - - userPoolID, providerName, err := decodeCognitoIdentityProviderID(d.Id()) - if err != nil { - return err - } - - _, err = conn.DeleteIdentityProvider(&cognitoidentityprovider.DeleteIdentityProviderInput{ - ProviderName: aws.String(providerName), - UserPoolId: aws.String(userPoolID), - }) - - if err != nil { - if isAWSErr(err, cognitoidentityprovider.ErrCodeResourceNotFoundException, "") { - return nil - } - return err - } - - return nil -} - -func decodeCognitoIdentityProviderID(id string) (string, string, error) { - idParts := strings.Split(id, ":") - if len(idParts) != 2 { - return "", "", fmt.Errorf("expected ID in format UserPoolID:ProviderName, received: %s", id) - } - return idParts[0], idParts[1], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_resource_server.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_resource_server.go deleted file mode 100644 index 165695a11..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_resource_server.go +++ /dev/null @@ -1,213 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCognitoResourceServer() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCognitoResourceServerCreate, - Read: resourceAwsCognitoResourceServerRead, - Update: resourceAwsCognitoResourceServerUpdate, - Delete: resourceAwsCognitoResourceServerDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - // https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateResourceServer.html - Schema: map[string]*schema.Schema{ - "identifier": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "scope": { - Type: schema.TypeSet, - Optional: true, - MaxItems: 25, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "scope_description": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 256), - }, - "scope_name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateCognitoResourceServerScopeName, - }, - }, - }, - }, - "user_pool_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "scope_identifiers": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - }, - } -} - -func resourceAwsCognitoResourceServerCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - identifier := d.Get("identifier").(string) - userPoolID := d.Get("user_pool_id").(string) - - params := &cognitoidentityprovider.CreateResourceServerInput{ - Identifier: aws.String(identifier), - Name: aws.String(d.Get("name").(string)), - UserPoolId: aws.String(userPoolID), - } - - if v, ok := d.GetOk("scope"); ok { - configs := v.(*schema.Set).List() - params.Scopes = expandCognitoResourceServerScope(configs) - } - - log.Printf("[DEBUG] Creating Cognito Resource Server: %s", params) - - _, err := conn.CreateResourceServer(params) - - if err != nil { - return fmt.Errorf("Error creating Cognito Resource Server: %s", err) - } - - d.SetId(fmt.Sprintf("%s|%s", userPoolID, identifier)) - - return resourceAwsCognitoResourceServerRead(d, meta) -} - -func resourceAwsCognitoResourceServerRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - userPoolID, identifier, err := decodeCognitoResourceServerID(d.Id()) - if err != nil { - return err - } - - params := &cognitoidentityprovider.DescribeResourceServerInput{ - Identifier: aws.String(identifier), - UserPoolId: aws.String(userPoolID), - } - - log.Printf("[DEBUG] Reading Cognito Resource Server: %s", params) - - resp, err := conn.DescribeResourceServer(params) - - if err != nil { - if isAWSErr(err, cognitoidentityprovider.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Cognito Resource Server %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - if resp == nil || resp.ResourceServer == nil { - log.Printf("[WARN] Cognito Resource Server %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("identifier", resp.ResourceServer.Identifier) - d.Set("name", resp.ResourceServer.Name) - d.Set("user_pool_id", resp.ResourceServer.UserPoolId) - - scopes := flattenCognitoResourceServerScope(resp.ResourceServer.Scopes) - if err := d.Set("scope", scopes); err != nil { - return fmt.Errorf("Failed setting schema: %s", err) - } - - var scopeIdentifiers []string - for _, elem := range scopes { - - scopeIdentifier := fmt.Sprintf("%s/%s", aws.StringValue(resp.ResourceServer.Identifier), elem["scope_name"].(string)) - scopeIdentifiers = append(scopeIdentifiers, scopeIdentifier) - } - if err := d.Set("scope_identifiers", scopeIdentifiers); err != nil { - return fmt.Errorf("error setting scope_identifiers: %s", err) - } - return nil -} - -func resourceAwsCognitoResourceServerUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - userPoolID, identifier, err := decodeCognitoResourceServerID(d.Id()) - if err != nil { - return err - } - - params := &cognitoidentityprovider.UpdateResourceServerInput{ - Identifier: aws.String(identifier), - Name: aws.String(d.Get("name").(string)), - Scopes: expandCognitoResourceServerScope(d.Get("scope").(*schema.Set).List()), - UserPoolId: aws.String(userPoolID), - } - - log.Printf("[DEBUG] Updating Cognito Resource Server: %s", params) - - _, err = conn.UpdateResourceServer(params) - if err != nil { - return fmt.Errorf("Error updating Cognito Resource Server: %s", err) - } - - return resourceAwsCognitoResourceServerRead(d, meta) -} - -func resourceAwsCognitoResourceServerDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - userPoolID, identifier, err := decodeCognitoResourceServerID(d.Id()) - if err != nil { - return err - } - - params := &cognitoidentityprovider.DeleteResourceServerInput{ - Identifier: aws.String(identifier), - UserPoolId: aws.String(userPoolID), - } - - log.Printf("[DEBUG] Deleting Resource Server: %s", params) - - _, err = conn.DeleteResourceServer(params) - - if err != nil { - if isAWSErr(err, cognitoidentityprovider.ErrCodeResourceNotFoundException, "") { - return nil - } - return fmt.Errorf("Error deleting Resource Server: %s", err) - } - - return nil -} - -func decodeCognitoResourceServerID(id string) (string, string, error) { - idParts := strings.Split(id, "|") - if len(idParts) != 2 { - return "", "", fmt.Errorf("expected ID in format UserPoolID|Identifier, received: %s", id) - } - return idParts[0], idParts[1], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_group.go deleted file mode 100644 index c294665cd..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_group.go +++ /dev/null @@ -1,175 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCognitoUserGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCognitoUserGroupCreate, - Read: resourceAwsCognitoUserGroupRead, - Update: resourceAwsCognitoUserGroupUpdate, - Delete: resourceAwsCognitoUserGroupDelete, - - Importer: &schema.ResourceImporter{ - State: resourceAwsCognitoUserGroupImport, - }, - - // https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateGroup.html - Schema: map[string]*schema.Schema{ - "description": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 2048), - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateCognitoUserGroupName, - }, - "precedence": { - Type: schema.TypeInt, - Optional: true, - }, - "role_arn": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "user_pool_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateCognitoUserPoolId, - }, - }, - } -} - -func resourceAwsCognitoUserGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - params := &cognitoidentityprovider.CreateGroupInput{ - GroupName: aws.String(d.Get("name").(string)), - UserPoolId: aws.String(d.Get("user_pool_id").(string)), - } - - if v, ok := d.GetOk("description"); ok { - params.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("precedence"); ok { - params.Precedence = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("role_arn"); ok { - params.RoleArn = aws.String(v.(string)) - } - - log.Print("[DEBUG] Creating Cognito User Group") - - resp, err := conn.CreateGroup(params) - if err != nil { - return fmt.Errorf("Error creating Cognito User Group: %s", err) - } - - d.SetId(fmt.Sprintf("%s/%s", *resp.Group.UserPoolId, *resp.Group.GroupName)) - - return resourceAwsCognitoUserGroupRead(d, meta) -} - -func resourceAwsCognitoUserGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - params := &cognitoidentityprovider.GetGroupInput{ - GroupName: aws.String(d.Get("name").(string)), - UserPoolId: aws.String(d.Get("user_pool_id").(string)), - } - - log.Print("[DEBUG] Reading Cognito User Group") - - resp, err := conn.GetGroup(params) - if err != nil { - if isAWSErr(err, "ResourceNotFoundException", "") { - log.Printf("[WARN] Cognito User Group %s is already gone", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error reading Cognito User Group: %s", err) - } - - d.Set("description", resp.Group.Description) - d.Set("precedence", resp.Group.Precedence) - d.Set("role_arn", resp.Group.RoleArn) - - return nil -} - -func resourceAwsCognitoUserGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - params := &cognitoidentityprovider.UpdateGroupInput{ - GroupName: aws.String(d.Get("name").(string)), - UserPoolId: aws.String(d.Get("user_pool_id").(string)), - } - - if d.HasChange("description") { - params.Description = aws.String(d.Get("description").(string)) - } - - if d.HasChange("precedence") { - params.Precedence = aws.Int64(int64(d.Get("precedence").(int))) - } - - if d.HasChange("role_arn") { - params.RoleArn = aws.String(d.Get("role_arn").(string)) - } - - log.Print("[DEBUG] Updating Cognito User Group") - - _, err := conn.UpdateGroup(params) - if err != nil { - return fmt.Errorf("Error updating Cognito User Group: %s", err) - } - - return resourceAwsCognitoUserGroupRead(d, meta) -} - -func resourceAwsCognitoUserGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - params := &cognitoidentityprovider.DeleteGroupInput{ - GroupName: aws.String(d.Get("name").(string)), - UserPoolId: aws.String(d.Get("user_pool_id").(string)), - } - - log.Print("[DEBUG] Deleting Cognito User Group") - - _, err := conn.DeleteGroup(params) - if err != nil { - return fmt.Errorf("Error deleting Cognito User Group: %s", err) - } - - return nil -} - -func resourceAwsCognitoUserGroupImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idSplit := strings.Split(d.Id(), "/") - if len(idSplit) != 2 { - return nil, errors.New("Error importing Cognito User Group. Must specify user_pool_id/group_name") - } - userPoolId := idSplit[0] - name := idSplit[1] - d.Set("user_pool_id", userPoolId) - d.Set("name", name) - return []*schema.ResourceData{d}, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool.go deleted file mode 100644 index 33c417f12..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool.go +++ /dev/null @@ -1,886 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCognitoUserPool() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCognitoUserPoolCreate, - Read: resourceAwsCognitoUserPoolRead, - Update: resourceAwsCognitoUserPoolUpdate, - Delete: resourceAwsCognitoUserPoolDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - // https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html - Schema: map[string]*schema.Schema{ - "admin_create_user_config": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "allow_admin_create_user_only": { - Type: schema.TypeBool, - Optional: true, - }, - "invite_message_template": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "email_message": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateCognitoUserPoolInviteTemplateEmailMessage, - }, - "email_subject": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateCognitoUserPoolTemplateEmailSubject, - }, - "sms_message": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateCognitoUserPoolInviteTemplateSmsMessage, - }, - }, - }, - }, - "unused_account_validity_days": { - Type: schema.TypeInt, - Optional: true, - Default: 7, - ValidateFunc: validation.IntBetween(0, 90), - }, - }, - }, - }, - - "alias_attributes": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - cognitoidentityprovider.AliasAttributeTypeEmail, - cognitoidentityprovider.AliasAttributeTypePhoneNumber, - cognitoidentityprovider.AliasAttributeTypePreferredUsername, - }, false), - }, - ConflictsWith: []string{"username_attributes"}, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "auto_verified_attributes": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - cognitoidentityprovider.VerifiedAttributeTypePhoneNumber, - cognitoidentityprovider.VerifiedAttributeTypeEmail, - }, false), - }, - }, - - "creation_date": { - Type: schema.TypeString, - Computed: true, - }, - - "device_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "challenge_required_on_new_device": { - Type: schema.TypeBool, - Optional: true, - }, - "device_only_remembered_on_user_prompt": { - Type: schema.TypeBool, - Optional: true, - }, - }, - }, - }, - - "email_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "reply_to_email_address": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateCognitoUserPoolReplyEmailAddress, - }, - "source_arn": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - - "email_verification_subject": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateCognitoUserPoolEmailVerificationSubject, - }, - - "email_verification_message": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateCognitoUserPoolEmailVerificationMessage, - }, - - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "lambda_config": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "create_auth_challenge": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "custom_message": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "define_auth_challenge": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "post_authentication": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "post_confirmation": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "pre_authentication": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "pre_sign_up": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "pre_token_generation": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "user_migration": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "verify_auth_challenge_response": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - - "last_modified_date": { - Type: schema.TypeString, - Computed: true, - }, - - "mfa_configuration": { - Type: schema.TypeString, - Optional: true, - Default: cognitoidentityprovider.UserPoolMfaTypeOff, - ValidateFunc: validation.StringInSlice([]string{ - cognitoidentityprovider.UserPoolMfaTypeOff, - cognitoidentityprovider.UserPoolMfaTypeOn, - cognitoidentityprovider.UserPoolMfaTypeOptional, - }, false), - }, - - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "password_policy": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "minimum_length": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(6, 99), - }, - "require_lowercase": { - Type: schema.TypeBool, - Optional: true, - }, - "require_numbers": { - Type: schema.TypeBool, - Optional: true, - }, - "require_symbols": { - Type: schema.TypeBool, - Optional: true, - }, - "require_uppercase": { - Type: schema.TypeBool, - Optional: true, - }, - }, - }, - }, - - "schema": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - MinItems: 1, - MaxItems: 50, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "attribute_data_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - cognitoidentityprovider.AttributeDataTypeString, - cognitoidentityprovider.AttributeDataTypeNumber, - cognitoidentityprovider.AttributeDataTypeDateTime, - cognitoidentityprovider.AttributeDataTypeBoolean, - }, false), - }, - "developer_only_attribute": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - "mutable": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateCognitoUserPoolSchemaName, - }, - "number_attribute_constraints": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "min_value": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "max_value": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - "required": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - "string_attribute_constraints": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "min_length": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "max_length": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - }, - }, - }, - - "sms_authentication_message": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateCognitoUserPoolSmsAuthenticationMessage, - }, - - "sms_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "external_id": { - Type: schema.TypeString, - Required: true, - }, - "sns_caller_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - - "sms_verification_message": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateCognitoUserPoolSmsVerificationMessage, - }, - - "tags": tagsSchema(), - - "username_attributes": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - cognitoidentityprovider.UsernameAttributeTypeEmail, - cognitoidentityprovider.UsernameAttributeTypePhoneNumber, - }, false), - }, - ConflictsWith: []string{"alias_attributes"}, - }, - - "verification_message_template": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "default_email_option": { - Type: schema.TypeString, - Optional: true, - Default: cognitoidentityprovider.DefaultEmailOptionTypeConfirmWithCode, - ValidateFunc: validation.StringInSlice([]string{ - cognitoidentityprovider.DefaultEmailOptionTypeConfirmWithLink, - cognitoidentityprovider.DefaultEmailOptionTypeConfirmWithCode, - }, false), - }, - "email_message": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateCognitoUserPoolTemplateEmailMessage, - }, - "email_message_by_link": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateCognitoUserPoolTemplateEmailMessageByLink, - }, - "email_subject": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateCognitoUserPoolTemplateEmailSubject, - }, - "email_subject_by_link": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateCognitoUserPoolTemplateEmailSubjectByLink, - }, - "sms_message": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateCognitoUserPoolTemplateSmsMessage, - }, - }, - }, - }, - }, - } -} - -func resourceAwsCognitoUserPoolCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - params := &cognitoidentityprovider.CreateUserPoolInput{ - PoolName: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("admin_create_user_config"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - params.AdminCreateUserConfig = expandCognitoUserPoolAdminCreateUserConfig(config) - } - } - - if v, ok := d.GetOk("alias_attributes"); ok { - params.AliasAttributes = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("auto_verified_attributes"); ok { - params.AutoVerifiedAttributes = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("email_configuration"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - emailConfigurationType := &cognitoidentityprovider.EmailConfigurationType{} - - if v, ok := config["reply_to_email_address"]; ok && v.(string) != "" { - emailConfigurationType.ReplyToEmailAddress = aws.String(v.(string)) - } - - if v, ok := config["source_arn"]; ok && v.(string) != "" { - emailConfigurationType.SourceArn = aws.String(v.(string)) - } - - params.EmailConfiguration = emailConfigurationType - } - } - - if v, ok := d.GetOk("admin_create_user_config"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - params.AdminCreateUserConfig = expandCognitoUserPoolAdminCreateUserConfig(config) - } - } - - if v, ok := d.GetOk("device_configuration"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - params.DeviceConfiguration = expandCognitoUserPoolDeviceConfiguration(config) - } - } - - if v, ok := d.GetOk("email_verification_subject"); ok { - params.EmailVerificationSubject = aws.String(v.(string)) - } - - if v, ok := d.GetOk("email_verification_message"); ok { - params.EmailVerificationMessage = aws.String(v.(string)) - } - - if v, ok := d.GetOk("lambda_config"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - params.LambdaConfig = expandCognitoUserPoolLambdaConfig(config) - } - } - - if v, ok := d.GetOk("mfa_configuration"); ok { - params.MfaConfiguration = aws.String(v.(string)) - } - - if v, ok := d.GetOk("password_policy"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - policies := &cognitoidentityprovider.UserPoolPolicyType{} - policies.PasswordPolicy = expandCognitoUserPoolPasswordPolicy(config) - params.Policies = policies - } - } - - if v, ok := d.GetOk("schema"); ok { - configs := v.(*schema.Set).List() - params.Schema = expandCognitoUserPoolSchema(configs) - } - - if v, ok := d.GetOk("sms_authentication_message"); ok { - params.SmsAuthenticationMessage = aws.String(v.(string)) - } - - if v, ok := d.GetOk("sms_configuration"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - params.SmsConfiguration = expandCognitoUserPoolSmsConfiguration(config) - } - } - - if v, ok := d.GetOk("username_attributes"); ok { - params.UsernameAttributes = expandStringList(v.([]interface{})) - } - - if v, ok := d.GetOk("verification_message_template"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - params.VerificationMessageTemplate = expandCognitoUserPoolVerificationMessageTemplate(config) - } - } - - if v, ok := d.GetOk("sms_verification_message"); ok { - params.SmsVerificationMessage = aws.String(v.(string)) - } - - if v, ok := d.GetOk("tags"); ok { - params.UserPoolTags = tagsFromMapGeneric(v.(map[string]interface{})) - } - log.Printf("[DEBUG] Creating Cognito User Pool: %s", params) - - // IAM roles & policies can take some time to propagate and be attached - // to the User Pool - var resp *cognitoidentityprovider.CreateUserPoolOutput - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var err error - resp, err = conn.CreateUserPool(params) - if isAWSErr(err, "InvalidSmsRoleTrustRelationshipException", "Role does not have a trust relationship allowing Cognito to assume the role") { - log.Printf("[DEBUG] Received %s, retrying CreateUserPool", err) - return resource.RetryableError(err) - } - if isAWSErr(err, "InvalidSmsRoleAccessPolicyException", "Role does not have permission to publish with SNS") { - log.Printf("[DEBUG] Received %s, retrying CreateUserPool", err) - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - }) - if err != nil { - return fmt.Errorf("Error creating Cognito User Pool: %s", err) - } - - d.SetId(*resp.UserPool.Id) - - return resourceAwsCognitoUserPoolRead(d, meta) -} - -func resourceAwsCognitoUserPoolRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - params := &cognitoidentityprovider.DescribeUserPoolInput{ - UserPoolId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading Cognito User Pool: %s", params) - - resp, err := conn.DescribeUserPool(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" { - log.Printf("[WARN] Cognito User Pool %s is already gone", d.Id()) - d.SetId("") - return nil - } - return err - } - - if err := d.Set("admin_create_user_config", flattenCognitoUserPoolAdminCreateUserConfig(resp.UserPool.AdminCreateUserConfig)); err != nil { - return fmt.Errorf("Failed setting admin_create_user_config: %s", err) - } - if resp.UserPool.AliasAttributes != nil { - d.Set("alias_attributes", flattenStringList(resp.UserPool.AliasAttributes)) - } - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "cognito-idp", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("userpool/%s", d.Id()), - } - d.Set("arn", arn.String()) - d.Set("endpoint", fmt.Sprintf("cognito-idp.%s.amazonaws.com/%s", meta.(*AWSClient).region, d.Id())) - d.Set("auto_verified_attributes", flattenStringList(resp.UserPool.AutoVerifiedAttributes)) - - if resp.UserPool.EmailVerificationSubject != nil { - d.Set("email_verification_subject", *resp.UserPool.EmailVerificationSubject) - } - if resp.UserPool.EmailVerificationMessage != nil { - d.Set("email_verification_message", *resp.UserPool.EmailVerificationMessage) - } - if err := d.Set("lambda_config", flattenCognitoUserPoolLambdaConfig(resp.UserPool.LambdaConfig)); err != nil { - return fmt.Errorf("Failed setting lambda_config: %s", err) - } - if resp.UserPool.MfaConfiguration != nil { - d.Set("mfa_configuration", *resp.UserPool.MfaConfiguration) - } - if resp.UserPool.SmsVerificationMessage != nil { - d.Set("sms_verification_message", *resp.UserPool.SmsVerificationMessage) - } - if resp.UserPool.SmsAuthenticationMessage != nil { - d.Set("sms_authentication_message", *resp.UserPool.SmsAuthenticationMessage) - } - - if err := d.Set("device_configuration", flattenCognitoUserPoolDeviceConfiguration(resp.UserPool.DeviceConfiguration)); err != nil { - return fmt.Errorf("Failed setting device_configuration: %s", err) - } - - if err := d.Set("email_configuration", flattenCognitoUserPoolEmailConfiguration(resp.UserPool.EmailConfiguration)); err != nil { - return fmt.Errorf("Failed setting email_configuration: %s", err) - } - - if resp.UserPool.Policies != nil && resp.UserPool.Policies.PasswordPolicy != nil { - if err := d.Set("password_policy", flattenCognitoUserPoolPasswordPolicy(resp.UserPool.Policies.PasswordPolicy)); err != nil { - return fmt.Errorf("Failed setting password_policy: %s", err) - } - } - - var configuredSchema []interface{} - if v, ok := d.GetOk("schema"); ok { - configuredSchema = v.(*schema.Set).List() - } - if err := d.Set("schema", flattenCognitoUserPoolSchema(expandCognitoUserPoolSchema(configuredSchema), resp.UserPool.SchemaAttributes)); err != nil { - return fmt.Errorf("Failed setting schema: %s", err) - } - - if err := d.Set("sms_configuration", flattenCognitoUserPoolSmsConfiguration(resp.UserPool.SmsConfiguration)); err != nil { - return fmt.Errorf("Failed setting sms_configuration: %s", err) - } - - if resp.UserPool.UsernameAttributes != nil { - d.Set("username_attributes", flattenStringList(resp.UserPool.UsernameAttributes)) - } - - if err := d.Set("verification_message_template", flattenCognitoUserPoolVerificationMessageTemplate(resp.UserPool.VerificationMessageTemplate)); err != nil { - return fmt.Errorf("Failed setting verification_message_template: %s", err) - } - - d.Set("creation_date", resp.UserPool.CreationDate.Format(time.RFC3339)) - d.Set("last_modified_date", resp.UserPool.LastModifiedDate.Format(time.RFC3339)) - d.Set("name", resp.UserPool.Name) - d.Set("tags", tagsToMapGeneric(resp.UserPool.UserPoolTags)) - - return nil -} - -func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - params := &cognitoidentityprovider.UpdateUserPoolInput{ - UserPoolId: aws.String(d.Id()), - } - - if v, ok := d.GetOk("admin_create_user_config"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - params.AdminCreateUserConfig = expandCognitoUserPoolAdminCreateUserConfig(config) - } - } - - if v, ok := d.GetOk("auto_verified_attributes"); ok { - params.AutoVerifiedAttributes = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("device_configuration"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - params.DeviceConfiguration = expandCognitoUserPoolDeviceConfiguration(config) - } - } - - if v, ok := d.GetOk("email_configuration"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - emailConfigurationType := &cognitoidentityprovider.EmailConfigurationType{} - - if v, ok := config["reply_to_email_address"]; ok && v.(string) != "" { - emailConfigurationType.ReplyToEmailAddress = aws.String(v.(string)) - } - - if v, ok := config["source_arn"]; ok && v.(string) != "" { - emailConfigurationType.SourceArn = aws.String(v.(string)) - } - - params.EmailConfiguration = emailConfigurationType - } - } - - if v, ok := d.GetOk("email_verification_subject"); ok { - params.EmailVerificationSubject = aws.String(v.(string)) - } - - if v, ok := d.GetOk("email_verification_message"); ok { - params.EmailVerificationMessage = aws.String(v.(string)) - } - - if v, ok := d.GetOk("lambda_config"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - params.LambdaConfig = expandCognitoUserPoolLambdaConfig(config) - } - } - - if v, ok := d.GetOk("mfa_configuration"); ok { - params.MfaConfiguration = aws.String(v.(string)) - } - - if v, ok := d.GetOk("password_policy"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - policies := &cognitoidentityprovider.UserPoolPolicyType{} - policies.PasswordPolicy = expandCognitoUserPoolPasswordPolicy(config) - params.Policies = policies - } - } - - if v, ok := d.GetOk("sms_authentication_message"); ok { - params.SmsAuthenticationMessage = aws.String(v.(string)) - } - - if v, ok := d.GetOk("sms_configuration"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - params.SmsConfiguration = expandCognitoUserPoolSmsConfiguration(config) - } - } - - if v, ok := d.GetOk("verification_message_template"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if d.HasChange("email_verification_message") { - config["email_message"] = d.Get("email_verification_message") - } - if d.HasChange("email_verification_subject") { - config["email_subject"] = d.Get("email_verification_subject") - } - if d.HasChange("sms_verification_message") { - config["sms_message"] = d.Get("sms_verification_message") - } - - if ok && config != nil { - params.VerificationMessageTemplate = expandCognitoUserPoolVerificationMessageTemplate(config) - } - } - - if v, ok := d.GetOk("sms_verification_message"); ok { - params.SmsVerificationMessage = aws.String(v.(string)) - } - - if v, ok := d.GetOk("tags"); ok { - params.UserPoolTags = tagsFromMapGeneric(v.(map[string]interface{})) - } - - log.Printf("[DEBUG] Updating Cognito User Pool: %s", params) - - // IAM roles & policies can take some time to propagate and be attached - // to the User Pool. - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var err error - _, err = conn.UpdateUserPool(params) - if isAWSErr(err, "InvalidSmsRoleTrustRelationshipException", "Role does not have a trust relationship allowing Cognito to assume the role") { - log.Printf("[DEBUG] Received %s, retrying UpdateUserPool", err) - return resource.RetryableError(err) - } - if isAWSErr(err, "InvalidSmsRoleAccessPolicyException", "Role does not have permission to publish with SNS") { - log.Printf("[DEBUG] Received %s, retrying UpdateUserPool", err) - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - }) - if err != nil { - return fmt.Errorf("Error updating Cognito User pool: %s", err) - } - - return resourceAwsCognitoUserPoolRead(d, meta) -} - -func resourceAwsCognitoUserPoolDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - params := &cognitoidentityprovider.DeleteUserPoolInput{ - UserPoolId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting Cognito User Pool: %s", params) - - _, err := conn.DeleteUserPool(params) - - if err != nil { - return fmt.Errorf("Error deleting user pool: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go deleted file mode 100644 index e4a3ae596..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go +++ /dev/null @@ -1,356 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCognitoUserPoolClient() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCognitoUserPoolClientCreate, - Read: resourceAwsCognitoUserPoolClientRead, - Update: resourceAwsCognitoUserPoolClientUpdate, - Delete: resourceAwsCognitoUserPoolClientDelete, - - Importer: &schema.ResourceImporter{ - State: resourceAwsCognitoUserPoolClientImport, - }, - - // https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPoolClient.html - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - - "client_secret": { - Type: schema.TypeString, - Computed: true, - }, - - "generate_secret": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - - "user_pool_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "explicit_auth_flows": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - cognitoidentityprovider.ExplicitAuthFlowsTypeAdminNoSrpAuth, - cognitoidentityprovider.ExplicitAuthFlowsTypeCustomAuthFlowOnly, - cognitoidentityprovider.ExplicitAuthFlowsTypeUserPasswordAuth, - }, false), - }, - }, - - "read_attributes": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - - "write_attributes": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - - "refresh_token_validity": { - Type: schema.TypeInt, - Optional: true, - Default: 30, - ValidateFunc: validation.IntBetween(0, 3650), - }, - - "allowed_oauth_flows": { - Type: schema.TypeSet, - Optional: true, - MaxItems: 3, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - cognitoidentityprovider.OAuthFlowTypeCode, - cognitoidentityprovider.OAuthFlowTypeImplicit, - cognitoidentityprovider.OAuthFlowTypeClientCredentials, - }, false), - }, - }, - - "allowed_oauth_flows_user_pool_client": { - Type: schema.TypeBool, - Optional: true, - }, - - "allowed_oauth_scopes": { - Type: schema.TypeSet, - Optional: true, - MaxItems: 25, - Elem: &schema.Schema{ - Type: schema.TypeString, - // https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html - // System reserved scopes are openid, email, phone, profile, and aws.cognito.signin.user.admin. - // https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPoolClient.html#CognitoUserPools-CreateUserPoolClient-request-AllowedOAuthScopes - // Constraints seem like to be designed for custom scopes which are not supported yet? - }, - }, - - // TODO: analytics_configuration - - "callback_urls": { - Type: schema.TypeList, - Optional: true, - MaxItems: 100, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateCognitoUserPoolClientURL, - }, - }, - - "default_redirect_uri": { - Type: schema.TypeString, - Optional: true, - }, - - "logout_urls": { - Type: schema.TypeList, - Optional: true, - MaxItems: 100, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateCognitoUserPoolClientURL, - }, - }, - - "supported_identity_providers": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - }, - } -} - -func resourceAwsCognitoUserPoolClientCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - params := &cognitoidentityprovider.CreateUserPoolClientInput{ - ClientName: aws.String(d.Get("name").(string)), - UserPoolId: aws.String(d.Get("user_pool_id").(string)), - } - - if v, ok := d.GetOk("generate_secret"); ok { - params.GenerateSecret = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("explicit_auth_flows"); ok { - params.ExplicitAuthFlows = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("read_attributes"); ok { - params.ReadAttributes = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("write_attributes"); ok { - params.WriteAttributes = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("refresh_token_validity"); ok { - params.RefreshTokenValidity = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("allowed_oauth_flows"); ok { - params.AllowedOAuthFlows = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("allowed_oauth_flows_user_pool_client"); ok { - params.AllowedOAuthFlowsUserPoolClient = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("allowed_oauth_scopes"); ok { - params.AllowedOAuthScopes = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("callback_urls"); ok { - params.CallbackURLs = expandStringList(v.([]interface{})) - } - - if v, ok := d.GetOk("default_redirect_uri"); ok { - params.DefaultRedirectURI = aws.String(v.(string)) - } - - if v, ok := d.GetOk("logout_urls"); ok { - params.LogoutURLs = expandStringList(v.([]interface{})) - } - - if v, ok := d.GetOk("supported_identity_providers"); ok { - params.SupportedIdentityProviders = expandStringList(v.([]interface{})) - } - - log.Printf("[DEBUG] Creating Cognito User Pool Client: %s", params) - - resp, err := conn.CreateUserPoolClient(params) - - if err != nil { - return fmt.Errorf("Error creating Cognito User Pool Client: %s", err) - } - - d.SetId(*resp.UserPoolClient.ClientId) - - return resourceAwsCognitoUserPoolClientRead(d, meta) -} - -func resourceAwsCognitoUserPoolClientRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - params := &cognitoidentityprovider.DescribeUserPoolClientInput{ - ClientId: aws.String(d.Id()), - UserPoolId: aws.String(d.Get("user_pool_id").(string)), - } - - log.Printf("[DEBUG] Reading Cognito User Pool Client: %s", params) - - resp, err := conn.DescribeUserPoolClient(params) - - if err != nil { - if isAWSErr(err, "ResourceNotFoundException", "") { - log.Printf("[WARN] Cognito User Pool Client %s is already gone", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.SetId(*resp.UserPoolClient.ClientId) - d.Set("user_pool_id", *resp.UserPoolClient.UserPoolId) - d.Set("name", *resp.UserPoolClient.ClientName) - d.Set("explicit_auth_flows", flattenStringList(resp.UserPoolClient.ExplicitAuthFlows)) - d.Set("read_attributes", flattenStringList(resp.UserPoolClient.ReadAttributes)) - d.Set("write_attributes", flattenStringList(resp.UserPoolClient.WriteAttributes)) - d.Set("refresh_token_validity", resp.UserPoolClient.RefreshTokenValidity) - d.Set("client_secret", resp.UserPoolClient.ClientSecret) - d.Set("allowed_oauth_flows", flattenStringList(resp.UserPoolClient.AllowedOAuthFlows)) - d.Set("allowed_oauth_flows_user_pool_client", resp.UserPoolClient.AllowedOAuthFlowsUserPoolClient) - d.Set("allowed_oauth_scopes", flattenStringList(resp.UserPoolClient.AllowedOAuthScopes)) - d.Set("callback_urls", flattenStringList(resp.UserPoolClient.CallbackURLs)) - d.Set("default_redirect_uri", resp.UserPoolClient.DefaultRedirectURI) - d.Set("logout_urls", flattenStringList(resp.UserPoolClient.LogoutURLs)) - d.Set("supported_identity_providers", flattenStringList(resp.UserPoolClient.SupportedIdentityProviders)) - - return nil -} - -func resourceAwsCognitoUserPoolClientUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - params := &cognitoidentityprovider.UpdateUserPoolClientInput{ - ClientId: aws.String(d.Id()), - UserPoolId: aws.String(d.Get("user_pool_id").(string)), - } - - if v, ok := d.GetOk("explicit_auth_flows"); ok { - params.ExplicitAuthFlows = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("read_attributes"); ok { - params.ReadAttributes = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("write_attributes"); ok { - params.WriteAttributes = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("refresh_token_validity"); ok { - params.RefreshTokenValidity = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("allowed_oauth_flows"); ok { - params.AllowedOAuthFlows = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("allowed_oauth_flows_user_pool_client"); ok { - params.AllowedOAuthFlowsUserPoolClient = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("allowed_oauth_scopes"); ok { - params.AllowedOAuthScopes = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("callback_urls"); ok { - params.CallbackURLs = expandStringList(v.([]interface{})) - } - - if v, ok := d.GetOk("default_redirect_uri"); ok { - params.DefaultRedirectURI = aws.String(v.(string)) - } - - if v, ok := d.GetOk("logout_urls"); ok { - params.LogoutURLs = expandStringList(v.([]interface{})) - } - - if v, ok := d.GetOk("supported_identity_providers"); ok { - params.SupportedIdentityProviders = expandStringList(v.([]interface{})) - } - - log.Printf("[DEBUG] Updating Cognito User Pool Client: %s", params) - - _, err := conn.UpdateUserPoolClient(params) - if err != nil { - return fmt.Errorf("Error updating Cognito User Pool Client: %s", err) - } - - return resourceAwsCognitoUserPoolClientRead(d, meta) -} - -func resourceAwsCognitoUserPoolClientDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - params := &cognitoidentityprovider.DeleteUserPoolClientInput{ - ClientId: aws.String(d.Id()), - UserPoolId: aws.String(d.Get("user_pool_id").(string)), - } - - log.Printf("[DEBUG] Deleting Cognito User Pool Client: %s", params) - - _, err := conn.DeleteUserPoolClient(params) - - if err != nil { - return fmt.Errorf("Error deleting Cognito User Pool Client: %s", err) - } - - return nil -} - -func resourceAwsCognitoUserPoolClientImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - if len(strings.Split(d.Id(), "/")) != 2 || len(d.Id()) < 3 { - return []*schema.ResourceData{}, fmt.Errorf("Wrong format of resource: %s. Please follow 'user-pool-id/client-id'", d.Id()) - } - userPoolId := strings.Split(d.Id(), "/")[0] - clientId := strings.Split(d.Id(), "/")[1] - d.SetId(clientId) - d.Set("user_pool_id", userPoolId) - log.Printf("[DEBUG] Importing client %s for user pool %s", clientId, userPoolId) - - return []*schema.ResourceData{d}, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_domain.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_domain.go deleted file mode 100644 index 83a35b8c8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_domain.go +++ /dev/null @@ -1,194 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsCognitoUserPoolDomain() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCognitoUserPoolDomainCreate, - Read: resourceAwsCognitoUserPoolDomainRead, - Delete: resourceAwsCognitoUserPoolDomainDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "domain": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 63), - }, - "certificate_arn": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "user_pool_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "aws_account_id": { - Type: schema.TypeString, - Computed: true, - }, - "cloudfront_distribution_arn": { - Type: schema.TypeString, - Computed: true, - }, - "s3_bucket": { - Type: schema.TypeString, - Computed: true, - }, - "version": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsCognitoUserPoolDomainCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - - domain := d.Get("domain").(string) - - timeout := 1 * time.Minute //Default timeout for a basic domain - - params := &cognitoidentityprovider.CreateUserPoolDomainInput{ - Domain: aws.String(domain), - UserPoolId: aws.String(d.Get("user_pool_id").(string)), - } - - if v, ok := d.GetOk("certificate_arn"); ok { - customDomainConfig := &cognitoidentityprovider.CustomDomainConfigType{ - CertificateArn: aws.String(v.(string)), - } - params.CustomDomainConfig = customDomainConfig - timeout = 60 * time.Minute //Custom domains take more time to become active - } - - log.Printf("[DEBUG] Creating Cognito User Pool Domain: %s", params) - - _, err := conn.CreateUserPoolDomain(params) - if err != nil { - return fmt.Errorf("Error creating Cognito User Pool Domain: %s", err) - } - - d.SetId(domain) - - stateConf := resource.StateChangeConf{ - Pending: []string{ - cognitoidentityprovider.DomainStatusTypeCreating, - cognitoidentityprovider.DomainStatusTypeUpdating, - }, - Target: []string{ - cognitoidentityprovider.DomainStatusTypeActive, - }, - MinTimeout: 1 * time.Minute, - Timeout: timeout, - Refresh: func() (interface{}, string, error) { - domain, err := conn.DescribeUserPoolDomain(&cognitoidentityprovider.DescribeUserPoolDomainInput{ - Domain: aws.String(d.Get("domain").(string)), - }) - if err != nil { - return 42, "", err - } - - desc := domain.DomainDescription - - return domain, *desc.Status, nil - }, - } - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsCognitoUserPoolDomainRead(d, meta) -} - -func resourceAwsCognitoUserPoolDomainRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - log.Printf("[DEBUG] Reading Cognito User Pool Domain: %s", d.Id()) - - domain, err := conn.DescribeUserPoolDomain(&cognitoidentityprovider.DescribeUserPoolDomainInput{ - Domain: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, "ResourceNotFoundException", "") { - log.Printf("[WARN] Cognito User Pool Domain %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - desc := domain.DomainDescription - - d.Set("domain", d.Id()) - d.Set("certificate_arn", "") - if desc.CustomDomainConfig != nil { - d.Set("certificate_arn", desc.CustomDomainConfig.CertificateArn) - } - d.Set("aws_account_id", desc.AWSAccountId) - d.Set("cloudfront_distribution_arn", desc.CloudFrontDistribution) - d.Set("s3_bucket", desc.S3Bucket) - d.Set("user_pool_id", desc.UserPoolId) - d.Set("version", desc.Version) - - return nil -} - -func resourceAwsCognitoUserPoolDomainDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).cognitoidpconn - log.Printf("[DEBUG] Deleting Cognito User Pool Domain: %s", d.Id()) - - _, err := conn.DeleteUserPoolDomain(&cognitoidentityprovider.DeleteUserPoolDomainInput{ - Domain: aws.String(d.Id()), - UserPoolId: aws.String(d.Get("user_pool_id").(string)), - }) - if err != nil { - return err - } - - stateConf := resource.StateChangeConf{ - Pending: []string{ - cognitoidentityprovider.DomainStatusTypeUpdating, - cognitoidentityprovider.DomainStatusTypeDeleting, - }, - Target: []string{""}, - Timeout: 1 * time.Minute, - Refresh: func() (interface{}, string, error) { - domain, err := conn.DescribeUserPoolDomain(&cognitoidentityprovider.DescribeUserPoolDomainInput{ - Domain: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, "ResourceNotFoundException", "") { - return 42, "", nil - } - return 42, "", err - } - - desc := domain.DomainDescription - if desc.Status == nil { - return 42, "", nil - } - - return domain, *desc.Status, nil - }, - } - _, err = stateConf.WaitForState() - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_aggregate_authorization.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_aggregate_authorization.go deleted file mode 100644 index 47094e47b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_aggregate_authorization.go +++ /dev/null @@ -1,141 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/configservice" - - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsConfigAggregateAuthorization() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsConfigAggregateAuthorizationPut, - Read: resourceAwsConfigAggregateAuthorizationRead, - Delete: resourceAwsConfigAggregateAuthorizationDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "account_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateAwsAccountId, - }, - "region": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsConfigAggregateAuthorizationPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - - accountId := d.Get("account_id").(string) - region := d.Get("region").(string) - - req := &configservice.PutAggregationAuthorizationInput{ - AuthorizedAccountId: aws.String(accountId), - AuthorizedAwsRegion: aws.String(region), - } - - _, err := conn.PutAggregationAuthorization(req) - if err != nil { - return fmt.Errorf("Error creating aggregate authorization: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%s", accountId, region)) - return resourceAwsConfigAggregateAuthorizationRead(d, meta) -} - -func resourceAwsConfigAggregateAuthorizationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - - accountId, region, err := resourceAwsConfigAggregateAuthorizationParseID(d.Id()) - if err != nil { - return err - } - - d.Set("account_id", accountId) - d.Set("region", region) - - aggregateAuthorizations, err := describeConfigAggregateAuthorizations(conn) - if err != nil { - return fmt.Errorf("Error retrieving list of aggregate authorizations: %s", err) - } - - // Check for existing authorization - for _, auth := range aggregateAuthorizations { - if accountId == aws.StringValue(auth.AuthorizedAccountId) && region == aws.StringValue(auth.AuthorizedAwsRegion) { - d.Set("arn", auth.AggregationAuthorizationArn) - return nil - } - } - - log.Printf("[WARN] Aggregate Authorization not found, removing from state: %s", d.Id()) - d.SetId("") - return nil -} - -func resourceAwsConfigAggregateAuthorizationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - - accountId, region, err := resourceAwsConfigAggregateAuthorizationParseID(d.Id()) - if err != nil { - return err - } - - req := &configservice.DeleteAggregationAuthorizationInput{ - AuthorizedAccountId: aws.String(accountId), - AuthorizedAwsRegion: aws.String(region), - } - - _, err = conn.DeleteAggregationAuthorization(req) - if err != nil { - return fmt.Errorf("Error deleting aggregate authorization: %s", err) - } - - return nil -} - -func describeConfigAggregateAuthorizations(conn *configservice.ConfigService) ([]*configservice.AggregationAuthorization, error) { - aggregationAuthorizations := []*configservice.AggregationAuthorization{} - input := &configservice.DescribeAggregationAuthorizationsInput{} - - for { - output, err := conn.DescribeAggregationAuthorizations(input) - if err != nil { - return aggregationAuthorizations, err - } - aggregationAuthorizations = append(aggregationAuthorizations, output.AggregationAuthorizations...) - if output.NextToken == nil { - break - } - input.NextToken = output.NextToken - } - - return aggregationAuthorizations, nil -} - -func resourceAwsConfigAggregateAuthorizationParseID(id string) (string, string, error) { - idParts := strings.Split(id, ":") - if len(idParts) != 2 { - return "", "", fmt.Errorf("Please make sure the ID is in the form account_id:region (i.e. 123456789012:us-east-1") - } - accountId := idParts[0] - region := idParts[1] - return accountId, region, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_config_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_config_rule.go deleted file mode 100644 index 50d4df7d3..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_config_rule.go +++ /dev/null @@ -1,310 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "time" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/configservice" -) - -func resourceAwsConfigConfigRule() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsConfigConfigRulePut, - Read: resourceAwsConfigConfigRuleRead, - Update: resourceAwsConfigConfigRulePut, - Delete: resourceAwsConfigConfigRuleDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(0, 64), - }, - "rule_id": { - Type: schema.TypeString, - Computed: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 256), - }, - "input_parameters": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.ValidateJsonString, - }, - "maximum_execution_frequency": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateConfigExecutionFrequency(), - }, - "scope": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "compliance_resource_id": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 256), - }, - "compliance_resource_types": { - Type: schema.TypeSet, - Optional: true, - MaxItems: 100, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringLenBetween(0, 256), - }, - Set: schema.HashString, - }, - "tag_key": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 128), - }, - "tag_value": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 256), - }, - }, - }, - }, - "source": { - Type: schema.TypeList, - MaxItems: 1, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "owner": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - configservice.OwnerCustomLambda, - configservice.OwnerAws, - }, false), - }, - "source_detail": { - Type: schema.TypeSet, - Set: configRuleSourceDetailsHash, - Optional: true, - MaxItems: 25, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "event_source": { - Type: schema.TypeString, - Optional: true, - Default: "aws.config", - }, - "maximum_execution_frequency": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateConfigExecutionFrequency(), - }, - "message_type": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "source_identifier": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(0, 256), - }, - }, - }, - }, - }, - } -} - -func resourceAwsConfigConfigRulePut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - - name := d.Get("name").(string) - ruleInput := configservice.ConfigRule{ - ConfigRuleName: aws.String(name), - Scope: expandConfigRuleScope(d.Get("scope").([]interface{})), - Source: expandConfigRuleSource(d.Get("source").([]interface{})), - } - - if v, ok := d.GetOk("description"); ok { - ruleInput.Description = aws.String(v.(string)) - } - if v, ok := d.GetOk("input_parameters"); ok { - ruleInput.InputParameters = aws.String(v.(string)) - } - if v, ok := d.GetOk("maximum_execution_frequency"); ok { - ruleInput.MaximumExecutionFrequency = aws.String(v.(string)) - } - - input := configservice.PutConfigRuleInput{ - ConfigRule: &ruleInput, - } - log.Printf("[DEBUG] Creating AWSConfig config rule: %s", input) - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - _, err := conn.PutConfigRule(&input) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "InsufficientPermissionsException" { - // IAM is eventually consistent - return resource.RetryableError(err) - } - } - - return resource.NonRetryableError(fmt.Errorf("Failed to create AWSConfig rule: %s", err)) - } - - return nil - }) - if err != nil { - return err - } - - d.SetId(name) - - log.Printf("[DEBUG] AWSConfig config rule %q created", name) - - return resourceAwsConfigConfigRuleRead(d, meta) -} - -func resourceAwsConfigConfigRuleRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - - out, err := conn.DescribeConfigRules(&configservice.DescribeConfigRulesInput{ - ConfigRuleNames: []*string{aws.String(d.Id())}, - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoSuchConfigRuleException" { - log.Printf("[WARN] Config Rule %q is gone (NoSuchConfigRuleException)", d.Id()) - d.SetId("") - return nil - } - return err - } - - numberOfRules := len(out.ConfigRules) - if numberOfRules < 1 { - log.Printf("[WARN] Config Rule %q is gone (no rules found)", d.Id()) - d.SetId("") - return nil - } - - if numberOfRules > 1 { - return fmt.Errorf("Expected exactly 1 Config Rule, received %d: %#v", - numberOfRules, out.ConfigRules) - } - - log.Printf("[DEBUG] AWS Config config rule received: %s", out) - - rule := out.ConfigRules[0] - d.Set("arn", rule.ConfigRuleArn) - d.Set("rule_id", rule.ConfigRuleId) - d.Set("name", rule.ConfigRuleName) - d.Set("description", rule.Description) - d.Set("input_parameters", rule.InputParameters) - d.Set("maximum_execution_frequency", rule.MaximumExecutionFrequency) - - if rule.Scope != nil { - d.Set("scope", flattenConfigRuleScope(rule.Scope)) - } - - d.Set("source", flattenConfigRuleSource(rule.Source)) - - return nil -} - -func resourceAwsConfigConfigRuleDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - - name := d.Get("name").(string) - - log.Printf("[DEBUG] Deleting AWS Config config rule %q", name) - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteConfigRule(&configservice.DeleteConfigRuleInput{ - ConfigRuleName: aws.String(name), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceInUseException" { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Deleting Config Rule failed: %s", err) - } - - conf := resource.StateChangeConf{ - Pending: []string{ - configservice.ConfigRuleStateActive, - configservice.ConfigRuleStateDeleting, - configservice.ConfigRuleStateDeletingResults, - configservice.ConfigRuleStateEvaluating, - }, - Target: []string{""}, - Timeout: 5 * time.Minute, - Refresh: func() (interface{}, string, error) { - out, err := conn.DescribeConfigRules(&configservice.DescribeConfigRulesInput{ - ConfigRuleNames: []*string{aws.String(d.Id())}, - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoSuchConfigRuleException" { - return 42, "", nil - } - return 42, "", fmt.Errorf("Failed to describe config rule %q: %s", d.Id(), err) - } - if len(out.ConfigRules) < 1 { - return 42, "", nil - } - rule := out.ConfigRules[0] - return out, *rule.ConfigRuleState, nil - }, - } - _, err = conf.WaitForState() - if err != nil { - return err - } - - log.Printf("[DEBUG] AWS Config config rule %q deleted", name) - - return nil -} - -func configRuleSourceDetailsHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - if v, ok := m["message_type"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["event_source"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["maximum_execution_frequency"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_aggregator.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_aggregator.go deleted file mode 100644 index 0d48fc83f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_aggregator.go +++ /dev/null @@ -1,192 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/configservice" - - "github.com/hashicorp/terraform/helper/customdiff" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsConfigConfigurationAggregator() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsConfigConfigurationAggregatorPut, - Read: resourceAwsConfigConfigurationAggregatorRead, - Update: resourceAwsConfigConfigurationAggregatorPut, - Delete: resourceAwsConfigConfigurationAggregatorDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - CustomizeDiff: customdiff.Sequence( - // This is to prevent this error: - // All fields are ForceNew or Computed w/out Optional, Update is superfluous - customdiff.ForceNewIfChange("account_aggregation_source", func(old, new, meta interface{}) bool { - return len(old.([]interface{})) == 0 && len(new.([]interface{})) > 0 - }), - customdiff.ForceNewIfChange("organization_aggregation_source", func(old, new, meta interface{}) bool { - return len(old.([]interface{})) == 0 && len(new.([]interface{})) > 0 - }), - ), - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 256), - }, - "account_aggregation_source": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{"organization_aggregation_source"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "account_ids": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateAwsAccountId, - }, - }, - "all_regions": { - Type: schema.TypeBool, - Default: false, - Optional: true, - }, - "regions": { - Type: schema.TypeList, - Optional: true, - MinItems: 1, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - }, - }, - }, - "organization_aggregation_source": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{"account_aggregation_source"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "all_regions": { - Type: schema.TypeBool, - Default: false, - Optional: true, - }, - "regions": { - Type: schema.TypeList, - Optional: true, - MinItems: 1, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - }, - } -} - -func resourceAwsConfigConfigurationAggregatorPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - - name := d.Get("name").(string) - - req := &configservice.PutConfigurationAggregatorInput{ - ConfigurationAggregatorName: aws.String(name), - } - - account_aggregation_sources := d.Get("account_aggregation_source").([]interface{}) - if len(account_aggregation_sources) > 0 { - req.AccountAggregationSources = expandConfigAccountAggregationSources(account_aggregation_sources) - } - - organization_aggregation_sources := d.Get("organization_aggregation_source").([]interface{}) - if len(organization_aggregation_sources) > 0 { - req.OrganizationAggregationSource = expandConfigOrganizationAggregationSource(organization_aggregation_sources[0].(map[string]interface{})) - } - - _, err := conn.PutConfigurationAggregator(req) - if err != nil { - return fmt.Errorf("Error creating aggregator: %s", err) - } - - d.SetId(strings.ToLower(name)) - - return resourceAwsConfigConfigurationAggregatorRead(d, meta) -} - -func resourceAwsConfigConfigurationAggregatorRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - req := &configservice.DescribeConfigurationAggregatorsInput{ - ConfigurationAggregatorNames: []*string{aws.String(d.Id())}, - } - - res, err := conn.DescribeConfigurationAggregators(req) - if err != nil { - if isAWSErr(err, configservice.ErrCodeNoSuchConfigurationAggregatorException, "") { - log.Printf("[WARN] No such configuration aggregator (%s), removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - if res == nil || len(res.ConfigurationAggregators) == 0 { - log.Printf("[WARN] No aggregators returned (%s), removing from state", d.Id()) - d.SetId("") - return nil - } - - aggregator := res.ConfigurationAggregators[0] - d.Set("arn", aggregator.ConfigurationAggregatorArn) - d.Set("name", aggregator.ConfigurationAggregatorName) - - if err := d.Set("account_aggregation_source", flattenConfigAccountAggregationSources(aggregator.AccountAggregationSources)); err != nil { - return fmt.Errorf("error setting account_aggregation_source: %s", err) - } - - if err := d.Set("organization_aggregation_source", flattenConfigOrganizationAggregationSource(aggregator.OrganizationAggregationSource)); err != nil { - return fmt.Errorf("error setting organization_aggregation_source: %s", err) - } - - return nil -} - -func resourceAwsConfigConfigurationAggregatorDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - - req := &configservice.DeleteConfigurationAggregatorInput{ - ConfigurationAggregatorName: aws.String(d.Id()), - } - _, err := conn.DeleteConfigurationAggregator(req) - if err != nil { - return err - } - - d.SetId("") - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder.go deleted file mode 100644 index 91dd99886..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder.go +++ /dev/null @@ -1,149 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/configservice" -) - -func resourceAwsConfigConfigurationRecorder() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsConfigConfigurationRecorderPut, - Read: resourceAwsConfigConfigurationRecorderRead, - Update: resourceAwsConfigConfigurationRecorderPut, - Delete: resourceAwsConfigConfigurationRecorderDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "default", - ValidateFunc: validation.StringLenBetween(0, 256), - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "recording_group": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "all_supported": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "include_global_resource_types": { - Type: schema.TypeBool, - Optional: true, - }, - "resource_types": { - Type: schema.TypeSet, - Set: schema.HashString, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - }, - } -} - -func resourceAwsConfigConfigurationRecorderPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - - name := d.Get("name").(string) - recorder := configservice.ConfigurationRecorder{ - Name: aws.String(name), - RoleARN: aws.String(d.Get("role_arn").(string)), - } - - if g, ok := d.GetOk("recording_group"); ok { - recorder.RecordingGroup = expandConfigRecordingGroup(g.([]interface{})) - } - - input := configservice.PutConfigurationRecorderInput{ - ConfigurationRecorder: &recorder, - } - _, err := conn.PutConfigurationRecorder(&input) - if err != nil { - return fmt.Errorf("Creating Configuration Recorder failed: %s", err) - } - - d.SetId(name) - - return resourceAwsConfigConfigurationRecorderRead(d, meta) -} - -func resourceAwsConfigConfigurationRecorderRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - - input := configservice.DescribeConfigurationRecordersInput{ - ConfigurationRecorderNames: []*string{aws.String(d.Id())}, - } - out, err := conn.DescribeConfigurationRecorders(&input) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoSuchConfigurationRecorderException" { - log.Printf("[WARN] Configuration Recorder %q is gone (NoSuchConfigurationRecorderException)", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Getting Configuration Recorder failed: %s", err) - } - - numberOfRecorders := len(out.ConfigurationRecorders) - if numberOfRecorders < 1 { - log.Printf("[WARN] Configuration Recorder %q is gone (no recorders found)", d.Id()) - d.SetId("") - return nil - } - - if numberOfRecorders > 1 { - return fmt.Errorf("Expected exactly 1 Configuration Recorder, received %d: %#v", - numberOfRecorders, out.ConfigurationRecorders) - } - - recorder := out.ConfigurationRecorders[0] - - d.Set("name", recorder.Name) - d.Set("role_arn", recorder.RoleARN) - - if recorder.RecordingGroup != nil { - flattened := flattenConfigRecordingGroup(recorder.RecordingGroup) - err = d.Set("recording_group", flattened) - if err != nil { - return fmt.Errorf("Failed to set recording_group: %s", err) - } - } - - return nil -} - -func resourceAwsConfigConfigurationRecorderDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - input := configservice.DeleteConfigurationRecorderInput{ - ConfigurationRecorderName: aws.String(d.Id()), - } - _, err := conn.DeleteConfigurationRecorder(&input) - if err != nil { - return fmt.Errorf("Deleting Configuration Recorder failed: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder_status.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder_status.go deleted file mode 100644 index 3420ed5f5..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder_status.go +++ /dev/null @@ -1,121 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/configservice" -) - -func resourceAwsConfigConfigurationRecorderStatus() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsConfigConfigurationRecorderStatusPut, - Read: resourceAwsConfigConfigurationRecorderStatusRead, - Update: resourceAwsConfigConfigurationRecorderStatusPut, - Delete: resourceAwsConfigConfigurationRecorderStatusDelete, - - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("name", d.Id()) - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "is_enabled": { - Type: schema.TypeBool, - Required: true, - }, - }, - } -} - -func resourceAwsConfigConfigurationRecorderStatusPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - - name := d.Get("name").(string) - d.SetId(name) - - if d.HasChange("is_enabled") { - isEnabled := d.Get("is_enabled").(bool) - if isEnabled { - log.Printf("[DEBUG] Starting AWSConfig Configuration recorder %q", name) - startInput := configservice.StartConfigurationRecorderInput{ - ConfigurationRecorderName: aws.String(name), - } - _, err := conn.StartConfigurationRecorder(&startInput) - if err != nil { - return fmt.Errorf("Failed to start Configuration Recorder: %s", err) - } - } else { - log.Printf("[DEBUG] Stopping AWSConfig Configuration recorder %q", name) - stopInput := configservice.StopConfigurationRecorderInput{ - ConfigurationRecorderName: aws.String(name), - } - _, err := conn.StopConfigurationRecorder(&stopInput) - if err != nil { - return fmt.Errorf("Failed to stop Configuration Recorder: %s", err) - } - } - } - - return resourceAwsConfigConfigurationRecorderStatusRead(d, meta) -} - -func resourceAwsConfigConfigurationRecorderStatusRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - - name := d.Id() - statusInput := configservice.DescribeConfigurationRecorderStatusInput{ - ConfigurationRecorderNames: []*string{aws.String(name)}, - } - statusOut, err := conn.DescribeConfigurationRecorderStatus(&statusInput) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NoSuchConfigurationRecorderException" { - log.Printf("[WARN] Configuration Recorder (status) %q is gone (NoSuchConfigurationRecorderException)", name) - d.SetId("") - return nil - } - } - return fmt.Errorf("Failed describing Configuration Recorder %q status: %s", - name, err) - } - - numberOfStatuses := len(statusOut.ConfigurationRecordersStatus) - if numberOfStatuses < 1 { - log.Printf("[WARN] Configuration Recorder (status) %q is gone (no recorders found)", name) - d.SetId("") - return nil - } - - if numberOfStatuses > 1 { - return fmt.Errorf("Expected exactly 1 Configuration Recorder (status), received %d: %#v", - numberOfStatuses, statusOut.ConfigurationRecordersStatus) - } - - d.Set("is_enabled", statusOut.ConfigurationRecordersStatus[0].Recording) - - return nil -} - -func resourceAwsConfigConfigurationRecorderStatusDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - input := configservice.StopConfigurationRecorderInput{ - ConfigurationRecorderName: aws.String(d.Get("name").(string)), - } - _, err := conn.StopConfigurationRecorder(&input) - if err != nil { - return fmt.Errorf("Stopping Configuration Recorder failed: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_delivery_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_delivery_channel.go deleted file mode 100644 index 95bff5548..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_delivery_channel.go +++ /dev/null @@ -1,183 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/configservice" -) - -func resourceAwsConfigDeliveryChannel() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsConfigDeliveryChannelPut, - Read: resourceAwsConfigDeliveryChannelRead, - Update: resourceAwsConfigDeliveryChannelPut, - Delete: resourceAwsConfigDeliveryChannelDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "default", - ValidateFunc: validation.StringLenBetween(0, 256), - }, - "s3_bucket_name": { - Type: schema.TypeString, - Required: true, - }, - "s3_key_prefix": { - Type: schema.TypeString, - Optional: true, - }, - "sns_topic_arn": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "snapshot_delivery_properties": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delivery_frequency": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateConfigExecutionFrequency(), - }, - }, - }, - }, - }, - } -} - -func resourceAwsConfigDeliveryChannelPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - - name := d.Get("name").(string) - channel := configservice.DeliveryChannel{ - Name: aws.String(name), - S3BucketName: aws.String(d.Get("s3_bucket_name").(string)), - } - - if v, ok := d.GetOk("s3_key_prefix"); ok { - channel.S3KeyPrefix = aws.String(v.(string)) - } - if v, ok := d.GetOk("sns_topic_arn"); ok { - channel.SnsTopicARN = aws.String(v.(string)) - } - - if p, ok := d.GetOk("snapshot_delivery_properties"); ok { - propertiesBlocks := p.([]interface{}) - block := propertiesBlocks[0].(map[string]interface{}) - - if v, ok := block["delivery_frequency"]; ok { - channel.ConfigSnapshotDeliveryProperties = &configservice.ConfigSnapshotDeliveryProperties{ - DeliveryFrequency: aws.String(v.(string)), - } - } - } - - input := configservice.PutDeliveryChannelInput{DeliveryChannel: &channel} - - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - _, err := conn.PutDeliveryChannel(&input) - if err == nil { - return nil - } - - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "InsufficientDeliveryPolicyException" { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - }) - if err != nil { - return fmt.Errorf("Creating Delivery Channel failed: %s", err) - } - - d.SetId(name) - - return resourceAwsConfigDeliveryChannelRead(d, meta) -} - -func resourceAwsConfigDeliveryChannelRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - - input := configservice.DescribeDeliveryChannelsInput{ - DeliveryChannelNames: []*string{aws.String(d.Id())}, - } - out, err := conn.DescribeDeliveryChannels(&input) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NoSuchDeliveryChannelException" { - log.Printf("[WARN] Delivery Channel %q is gone (NoSuchDeliveryChannelException)", d.Id()) - d.SetId("") - return nil - } - } - return fmt.Errorf("Getting Delivery Channel failed: %s", err) - } - - if len(out.DeliveryChannels) < 1 { - log.Printf("[WARN] Delivery Channel %q is gone (no channels found)", d.Id()) - d.SetId("") - return nil - } - - if len(out.DeliveryChannels) > 1 { - return fmt.Errorf("Received %d delivery channels under %s (expected exactly 1): %s", - len(out.DeliveryChannels), d.Id(), out.DeliveryChannels) - } - - channel := out.DeliveryChannels[0] - - d.Set("name", channel.Name) - d.Set("s3_bucket_name", channel.S3BucketName) - d.Set("s3_key_prefix", channel.S3KeyPrefix) - d.Set("sns_topic_arn", channel.SnsTopicARN) - - if channel.ConfigSnapshotDeliveryProperties != nil { - d.Set("snapshot_delivery_properties", flattenConfigSnapshotDeliveryProperties(channel.ConfigSnapshotDeliveryProperties)) - } - - return nil -} - -func resourceAwsConfigDeliveryChannelDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).configconn - input := configservice.DeleteDeliveryChannelInput{ - DeliveryChannelName: aws.String(d.Id()), - } - - err := resource.Retry(30*time.Second, func() *resource.RetryError { - _, err := conn.DeleteDeliveryChannel(&input) - if err != nil { - if isAWSErr(err, configservice.ErrCodeLastDeliveryChannelDeleteFailedException, "there is a running configuration recorder") { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Unable to delete delivery channel: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go deleted file mode 100644 index 122b4c30d..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go +++ /dev/null @@ -1,278 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsCustomerGateway() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsCustomerGatewayCreate, - Read: resourceAwsCustomerGatewayRead, - Update: resourceAwsCustomerGatewayUpdate, - Delete: resourceAwsCustomerGatewayDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "bgp_asn": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - - "ip_address": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsCustomerGatewayCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - ipAddress := d.Get("ip_address").(string) - vpnType := d.Get("type").(string) - bgpAsn := d.Get("bgp_asn").(int) - - alreadyExists, err := resourceAwsCustomerGatewayExists(vpnType, ipAddress, bgpAsn, conn) - if err != nil { - return err - } - - if alreadyExists { - return fmt.Errorf("An existing customer gateway for IpAddress: %s, VpnType: %s, BGP ASN: %d has been found", ipAddress, vpnType, bgpAsn) - } - - createOpts := &ec2.CreateCustomerGatewayInput{ - BgpAsn: aws.Int64(int64(bgpAsn)), - PublicIp: aws.String(ipAddress), - Type: aws.String(vpnType), - } - - // Create the Customer Gateway. - log.Printf("[DEBUG] Creating customer gateway") - resp, err := conn.CreateCustomerGateway(createOpts) - if err != nil { - return fmt.Errorf("Error creating customer gateway: %s", err) - } - - // Store the ID - customerGateway := resp.CustomerGateway - d.SetId(*customerGateway.CustomerGatewayId) - log.Printf("[INFO] Customer gateway ID: %s", *customerGateway.CustomerGatewayId) - - // Wait for the CustomerGateway to be available. - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"available"}, - Refresh: customerGatewayRefreshFunc(conn, *customerGateway.CustomerGatewayId), - Timeout: 10 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, stateErr := stateConf.WaitForState() - if stateErr != nil { - return fmt.Errorf( - "Error waiting for customer gateway (%s) to become ready: %s", - *customerGateway.CustomerGatewayId, err) - } - - // Create tags. - if err := setTags(conn, d); err != nil { - return err - } - - return nil -} - -func customerGatewayRefreshFunc(conn *ec2.EC2, gatewayId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - gatewayFilter := &ec2.Filter{ - Name: aws.String("customer-gateway-id"), - Values: []*string{aws.String(gatewayId)}, - } - - resp, err := conn.DescribeCustomerGateways(&ec2.DescribeCustomerGatewaysInput{ - Filters: []*ec2.Filter{gatewayFilter}, - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidCustomerGatewayID.NotFound" { - resp = nil - } else { - log.Printf("Error on CustomerGatewayRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil || len(resp.CustomerGateways) == 0 { - // handle consistency issues - return nil, "", nil - } - - gateway := resp.CustomerGateways[0] - return gateway, *gateway.State, nil - } -} - -func resourceAwsCustomerGatewayExists(vpnType, ipAddress string, bgpAsn int, conn *ec2.EC2) (bool, error) { - ipAddressFilter := &ec2.Filter{ - Name: aws.String("ip-address"), - Values: []*string{aws.String(ipAddress)}, - } - - typeFilter := &ec2.Filter{ - Name: aws.String("type"), - Values: []*string{aws.String(vpnType)}, - } - - bgp := strconv.Itoa(bgpAsn) - bgpAsnFilter := &ec2.Filter{ - Name: aws.String("bgp-asn"), - Values: []*string{aws.String(bgp)}, - } - - resp, err := conn.DescribeCustomerGateways(&ec2.DescribeCustomerGatewaysInput{ - Filters: []*ec2.Filter{ipAddressFilter, typeFilter, bgpAsnFilter}, - }) - if err != nil { - return false, err - } - - if len(resp.CustomerGateways) > 0 && *resp.CustomerGateways[0].State != "deleted" { - return true, nil - } - - return false, nil -} - -func resourceAwsCustomerGatewayRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - gatewayFilter := &ec2.Filter{ - Name: aws.String("customer-gateway-id"), - Values: []*string{aws.String(d.Id())}, - } - - resp, err := conn.DescribeCustomerGateways(&ec2.DescribeCustomerGatewaysInput{ - Filters: []*ec2.Filter{gatewayFilter}, - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidCustomerGatewayID.NotFound" { - d.SetId("") - return nil - } else { - log.Printf("[ERROR] Error finding CustomerGateway: %s", err) - return err - } - } - - if len(resp.CustomerGateways) != 1 { - return fmt.Errorf("Error finding CustomerGateway: %s", d.Id()) - } - - if *resp.CustomerGateways[0].State == "deleted" { - log.Printf("[INFO] Customer Gateway is in `deleted` state: %s", d.Id()) - d.SetId("") - return nil - } - - customerGateway := resp.CustomerGateways[0] - d.Set("ip_address", customerGateway.IpAddress) - d.Set("type", customerGateway.Type) - d.Set("tags", tagsToMap(customerGateway.Tags)) - - if *customerGateway.BgpAsn != "" { - val, err := strconv.ParseInt(*customerGateway.BgpAsn, 0, 0) - if err != nil { - return fmt.Errorf("error parsing bgp_asn: %s", err) - } - - d.Set("bgp_asn", int(val)) - } - - return nil -} - -func resourceAwsCustomerGatewayUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Update tags if required. - if err := setTags(conn, d); err != nil { - return err - } - - d.SetPartial("tags") - - return resourceAwsCustomerGatewayRead(d, meta) -} - -func resourceAwsCustomerGatewayDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - _, err := conn.DeleteCustomerGateway(&ec2.DeleteCustomerGatewayInput{ - CustomerGatewayId: aws.String(d.Id()), - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidCustomerGatewayID.NotFound" { - return nil - } else { - log.Printf("[ERROR] Error deleting CustomerGateway: %s", err) - return err - } - } - - gatewayFilter := &ec2.Filter{ - Name: aws.String("customer-gateway-id"), - Values: []*string{aws.String(d.Id())}, - } - - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - resp, err := conn.DescribeCustomerGateways(&ec2.DescribeCustomerGatewaysInput{ - Filters: []*ec2.Filter{gatewayFilter}, - }) - - if err != nil { - if awserr, ok := err.(awserr.Error); ok && awserr.Code() == "InvalidCustomerGatewayID.NotFound" { - return nil - } - return resource.NonRetryableError(err) - } - - if len(resp.CustomerGateways) != 1 { - return resource.RetryableError(fmt.Errorf("Error finding CustomerGateway for delete: %s", d.Id())) - } - - switch *resp.CustomerGateways[0].State { - case "pending", "available", "deleting": - return resource.RetryableError(fmt.Errorf("Gateway (%s) in state (%s), retrying", d.Id(), *resp.CustomerGateways[0].State)) - case "deleted": - return nil - default: - return resource.RetryableError(fmt.Errorf("Unrecognized state (%s) for Customer Gateway delete on (%s)", *resp.CustomerGateways[0].State, d.Id())) - } - }) - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_agent.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_agent.go deleted file mode 100644 index d79a35da8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_agent.go +++ /dev/null @@ -1,270 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "net" - "net/http" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/datasync" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDataSyncAgent() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDataSyncAgentCreate, - Read: resourceAwsDataSyncAgentRead, - Update: resourceAwsDataSyncAgentUpdate, - Delete: resourceAwsDataSyncAgentDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "activation_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"ip_address"}, - }, - "ip_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"activation_key"}, - }, - "name": { - Type: schema.TypeString, - Optional: true, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func resourceAwsDataSyncAgentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - region := meta.(*AWSClient).region - - activationKey := d.Get("activation_key").(string) - agentIpAddress := d.Get("ip_address").(string) - - // Perform one time fetch of activation key from gateway IP address - if activationKey == "" { - if agentIpAddress == "" { - return fmt.Errorf("either activation_key or ip_address must be provided") - } - - client := &http.Client{ - CheckRedirect: func(req *http.Request, via []*http.Request) error { - return http.ErrUseLastResponse - }, - Timeout: time.Second * 10, - } - - requestURL := fmt.Sprintf("http://%s/?gatewayType=SYNC&activationRegion=%s", agentIpAddress, region) - log.Printf("[DEBUG] Creating HTTP request: %s", requestURL) - request, err := http.NewRequest("GET", requestURL, nil) - if err != nil { - return fmt.Errorf("error creating HTTP request: %s", err) - } - - err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - log.Printf("[DEBUG] Making HTTP request: %s", request.URL.String()) - response, err := client.Do(request) - if err != nil { - if err, ok := err.(net.Error); ok { - errMessage := fmt.Errorf("error making HTTP request: %s", err) - log.Printf("[DEBUG] retryable %s", errMessage) - return resource.RetryableError(errMessage) - } - return resource.NonRetryableError(fmt.Errorf("error making HTTP request: %s", err)) - } - - log.Printf("[DEBUG] Received HTTP response: %#v", response) - if response.StatusCode != 302 { - return resource.NonRetryableError(fmt.Errorf("expected HTTP status code 302, received: %d", response.StatusCode)) - } - - redirectURL, err := response.Location() - if err != nil { - return resource.NonRetryableError(fmt.Errorf("error extracting HTTP Location header: %s", err)) - } - - activationKey = redirectURL.Query().Get("activationKey") - - return nil - }) - if err != nil { - return fmt.Errorf("error retrieving activation key from IP Address (%s): %s", agentIpAddress, err) - } - if activationKey == "" { - return fmt.Errorf("empty activationKey received from IP Address: %s", agentIpAddress) - } - } - - input := &datasync.CreateAgentInput{ - ActivationKey: aws.String(activationKey), - Tags: expandDataSyncTagListEntry(d.Get("tags").(map[string]interface{})), - } - - if v, ok := d.GetOk("name"); ok { - input.AgentName = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating DataSync Agent: %s", input) - output, err := conn.CreateAgent(input) - if err != nil { - return fmt.Errorf("error creating DataSync Agent: %s", err) - } - - d.SetId(aws.StringValue(output.AgentArn)) - - // Agent activations can take a few minutes - err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - _, err := conn.DescribeAgent(&datasync.DescribeAgentInput{ - AgentArn: aws.String(d.Id()), - }) - - if isAWSErr(err, "InvalidRequestException", "not found") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - if err != nil { - return fmt.Errorf("error waiting for DataSync Agent (%s) creation: %s", d.Id(), err) - } - - return resourceAwsDataSyncAgentRead(d, meta) -} - -func resourceAwsDataSyncAgentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - input := &datasync.DescribeAgentInput{ - AgentArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading DataSync Agent: %s", input) - output, err := conn.DescribeAgent(input) - - if isAWSErr(err, "InvalidRequestException", "not found") { - log.Printf("[WARN] DataSync Agent %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading DataSync Agent (%s): %s", d.Id(), err) - } - - tagsInput := &datasync.ListTagsForResourceInput{ - ResourceArn: output.AgentArn, - } - - log.Printf("[DEBUG] Reading DataSync Agent tags: %s", tagsInput) - tagsOutput, err := conn.ListTagsForResource(tagsInput) - - if err != nil { - return fmt.Errorf("error reading DataSync Agent (%s) tags: %s", d.Id(), err) - } - - d.Set("arn", output.AgentArn) - d.Set("name", output.Name) - - if err := d.Set("tags", flattenDataSyncTagListEntry(tagsOutput.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func resourceAwsDataSyncAgentUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - if d.HasChange("name") { - input := &datasync.UpdateAgentInput{ - AgentArn: aws.String(d.Id()), - Name: aws.String(d.Get("name").(string)), - } - - log.Printf("[DEBUG] Updating DataSync Agent: %s", input) - _, err := conn.UpdateAgent(input) - if err != nil { - return fmt.Errorf("error updating DataSync Agent (%s): %s", d.Id(), err) - } - } - - if d.HasChange("tags") { - oldRaw, newRaw := d.GetChange("tags") - createTags, removeTags := dataSyncTagsDiff(expandDataSyncTagListEntry(oldRaw.(map[string]interface{})), expandDataSyncTagListEntry(newRaw.(map[string]interface{}))) - - if len(removeTags) > 0 { - input := &datasync.UntagResourceInput{ - Keys: dataSyncTagsKeys(removeTags), - ResourceArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Untagging DataSync Agent: %s", input) - if _, err := conn.UntagResource(input); err != nil { - return fmt.Errorf("error untagging DataSync Agent (%s): %s", d.Id(), err) - } - } - - if len(createTags) > 0 { - input := &datasync.TagResourceInput{ - ResourceArn: aws.String(d.Id()), - Tags: createTags, - } - - log.Printf("[DEBUG] Tagging DataSync Agent: %s", input) - if _, err := conn.TagResource(input); err != nil { - return fmt.Errorf("error tagging DataSync Agent (%s): %s", d.Id(), err) - } - } - } - - return resourceAwsDataSyncAgentRead(d, meta) -} - -func resourceAwsDataSyncAgentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - input := &datasync.DeleteAgentInput{ - AgentArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting DataSync Agent: %s", input) - _, err := conn.DeleteAgent(input) - - if isAWSErr(err, "InvalidRequestException", "not found") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting DataSync Agent (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_efs.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_efs.go deleted file mode 100644 index 3e53d7f87..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_efs.go +++ /dev/null @@ -1,215 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/datasync" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDataSyncLocationEfs() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDataSyncLocationEfsCreate, - Read: resourceAwsDataSyncLocationEfsRead, - Update: resourceAwsDataSyncLocationEfsUpdate, - Delete: resourceAwsDataSyncLocationEfsDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "ec2_config": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "security_group_arns": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "subnet_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - }, - }, - }, - "efs_file_system_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "subdirectory": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "/", - // Ignore missing trailing slash - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if new == "/" { - return false - } - if strings.TrimSuffix(old, "/") == strings.TrimSuffix(new, "/") { - return true - } - return false - }, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "uri": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsDataSyncLocationEfsCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - input := &datasync.CreateLocationEfsInput{ - Ec2Config: expandDataSyncEc2Config(d.Get("ec2_config").([]interface{})), - EfsFilesystemArn: aws.String(d.Get("efs_file_system_arn").(string)), - Subdirectory: aws.String(d.Get("subdirectory").(string)), - Tags: expandDataSyncTagListEntry(d.Get("tags").(map[string]interface{})), - } - - log.Printf("[DEBUG] Creating DataSync Location EFS: %s", input) - output, err := conn.CreateLocationEfs(input) - if err != nil { - return fmt.Errorf("error creating DataSync Location EFS: %s", err) - } - - d.SetId(aws.StringValue(output.LocationArn)) - - return resourceAwsDataSyncLocationEfsRead(d, meta) -} - -func resourceAwsDataSyncLocationEfsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - input := &datasync.DescribeLocationEfsInput{ - LocationArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading DataSync Location EFS: %s", input) - output, err := conn.DescribeLocationEfs(input) - - if isAWSErr(err, "InvalidRequestException", "not found") { - log.Printf("[WARN] DataSync Location EFS %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading DataSync Location EFS (%s): %s", d.Id(), err) - } - - tagsInput := &datasync.ListTagsForResourceInput{ - ResourceArn: output.LocationArn, - } - - log.Printf("[DEBUG] Reading DataSync Location EFS tags: %s", tagsInput) - tagsOutput, err := conn.ListTagsForResource(tagsInput) - - if err != nil { - return fmt.Errorf("error reading DataSync Location EFS (%s) tags: %s", d.Id(), err) - } - - subdirectory, err := dataSyncParseLocationURI(aws.StringValue(output.LocationUri)) - - if err != nil { - return fmt.Errorf("error parsing Location EFS (%s) URI (%s): %s", d.Id(), aws.StringValue(output.LocationUri), err) - } - - d.Set("arn", output.LocationArn) - - if err := d.Set("ec2_config", flattenDataSyncEc2Config(output.Ec2Config)); err != nil { - return fmt.Errorf("error setting ec2_config: %s", err) - } - - d.Set("subdirectory", subdirectory) - - if err := d.Set("tags", flattenDataSyncTagListEntry(tagsOutput.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - d.Set("uri", output.LocationUri) - - return nil -} - -func resourceAwsDataSyncLocationEfsUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - if d.HasChange("tags") { - oldRaw, newRaw := d.GetChange("tags") - createTags, removeTags := dataSyncTagsDiff(expandDataSyncTagListEntry(oldRaw.(map[string]interface{})), expandDataSyncTagListEntry(newRaw.(map[string]interface{}))) - - if len(removeTags) > 0 { - input := &datasync.UntagResourceInput{ - Keys: dataSyncTagsKeys(removeTags), - ResourceArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Untagging DataSync Location EFS: %s", input) - if _, err := conn.UntagResource(input); err != nil { - return fmt.Errorf("error untagging DataSync Location EFS (%s): %s", d.Id(), err) - } - } - - if len(createTags) > 0 { - input := &datasync.TagResourceInput{ - ResourceArn: aws.String(d.Id()), - Tags: createTags, - } - - log.Printf("[DEBUG] Tagging DataSync Location EFS: %s", input) - if _, err := conn.TagResource(input); err != nil { - return fmt.Errorf("error tagging DataSync Location EFS (%s): %s", d.Id(), err) - } - } - } - - return resourceAwsDataSyncLocationEfsRead(d, meta) -} - -func resourceAwsDataSyncLocationEfsDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - input := &datasync.DeleteLocationInput{ - LocationArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting DataSync Location EFS: %s", input) - _, err := conn.DeleteLocation(input) - - if isAWSErr(err, "InvalidRequestException", "not found") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting DataSync Location EFS (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_nfs.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_nfs.go deleted file mode 100644 index 56e8c1194..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_nfs.go +++ /dev/null @@ -1,208 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/datasync" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDataSyncLocationNfs() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDataSyncLocationNfsCreate, - Read: resourceAwsDataSyncLocationNfsRead, - Update: resourceAwsDataSyncLocationNfsUpdate, - Delete: resourceAwsDataSyncLocationNfsDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "on_prem_config": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "agent_arns": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "server_hostname": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "subdirectory": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - // Ignore missing trailing slash - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if new == "/" { - return false - } - if strings.TrimSuffix(old, "/") == strings.TrimSuffix(new, "/") { - return true - } - return false - }, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "uri": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsDataSyncLocationNfsCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - input := &datasync.CreateLocationNfsInput{ - OnPremConfig: expandDataSyncOnPremConfig(d.Get("on_prem_config").([]interface{})), - ServerHostname: aws.String(d.Get("server_hostname").(string)), - Subdirectory: aws.String(d.Get("subdirectory").(string)), - Tags: expandDataSyncTagListEntry(d.Get("tags").(map[string]interface{})), - } - - log.Printf("[DEBUG] Creating DataSync Location NFS: %s", input) - output, err := conn.CreateLocationNfs(input) - if err != nil { - return fmt.Errorf("error creating DataSync Location NFS: %s", err) - } - - d.SetId(aws.StringValue(output.LocationArn)) - - return resourceAwsDataSyncLocationNfsRead(d, meta) -} - -func resourceAwsDataSyncLocationNfsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - input := &datasync.DescribeLocationNfsInput{ - LocationArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading DataSync Location NFS: %s", input) - output, err := conn.DescribeLocationNfs(input) - - if isAWSErr(err, "InvalidRequestException", "not found") { - log.Printf("[WARN] DataSync Location NFS %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading DataSync Location NFS (%s): %s", d.Id(), err) - } - - tagsInput := &datasync.ListTagsForResourceInput{ - ResourceArn: output.LocationArn, - } - - log.Printf("[DEBUG] Reading DataSync Location NFS tags: %s", tagsInput) - tagsOutput, err := conn.ListTagsForResource(tagsInput) - - if err != nil { - return fmt.Errorf("error reading DataSync Location NFS (%s) tags: %s", d.Id(), err) - } - - subdirectory, err := dataSyncParseLocationURI(aws.StringValue(output.LocationUri)) - - if err != nil { - return fmt.Errorf("error parsing Location NFS (%s) URI (%s): %s", d.Id(), aws.StringValue(output.LocationUri), err) - } - - d.Set("arn", output.LocationArn) - - if err := d.Set("on_prem_config", flattenDataSyncOnPremConfig(output.OnPremConfig)); err != nil { - return fmt.Errorf("error setting on_prem_config: %s", err) - } - - d.Set("subdirectory", subdirectory) - - if err := d.Set("tags", flattenDataSyncTagListEntry(tagsOutput.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - d.Set("uri", output.LocationUri) - - return nil -} - -func resourceAwsDataSyncLocationNfsUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - if d.HasChange("tags") { - oldRaw, newRaw := d.GetChange("tags") - createTags, removeTags := dataSyncTagsDiff(expandDataSyncTagListEntry(oldRaw.(map[string]interface{})), expandDataSyncTagListEntry(newRaw.(map[string]interface{}))) - - if len(removeTags) > 0 { - input := &datasync.UntagResourceInput{ - Keys: dataSyncTagsKeys(removeTags), - ResourceArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Untagging DataSync Location NFS: %s", input) - if _, err := conn.UntagResource(input); err != nil { - return fmt.Errorf("error untagging DataSync Location NFS (%s): %s", d.Id(), err) - } - } - - if len(createTags) > 0 { - input := &datasync.TagResourceInput{ - ResourceArn: aws.String(d.Id()), - Tags: createTags, - } - - log.Printf("[DEBUG] Tagging DataSync Location NFS: %s", input) - if _, err := conn.TagResource(input); err != nil { - return fmt.Errorf("error tagging DataSync Location NFS (%s): %s", d.Id(), err) - } - } - } - - return resourceAwsDataSyncLocationNfsRead(d, meta) -} - -func resourceAwsDataSyncLocationNfsDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - input := &datasync.DeleteLocationInput{ - LocationArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting DataSync Location NFS: %s", input) - _, err := conn.DeleteLocation(input) - - if isAWSErr(err, "InvalidRequestException", "not found") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting DataSync Location NFS (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_s3.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_s3.go deleted file mode 100644 index 8f8cda3a5..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_location_s3.go +++ /dev/null @@ -1,208 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/datasync" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDataSyncLocationS3() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDataSyncLocationS3Create, - Read: resourceAwsDataSyncLocationS3Read, - Update: resourceAwsDataSyncLocationS3Update, - Delete: resourceAwsDataSyncLocationS3Delete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "s3_bucket_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "s3_config": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket_access_role_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - }, - }, - }, - "subdirectory": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - // Ignore missing trailing slash - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if new == "/" { - return false - } - if strings.TrimSuffix(old, "/") == strings.TrimSuffix(new, "/") { - return true - } - return false - }, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "uri": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsDataSyncLocationS3Create(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - input := &datasync.CreateLocationS3Input{ - S3BucketArn: aws.String(d.Get("s3_bucket_arn").(string)), - S3Config: expandDataSyncS3Config(d.Get("s3_config").([]interface{})), - Subdirectory: aws.String(d.Get("subdirectory").(string)), - Tags: expandDataSyncTagListEntry(d.Get("tags").(map[string]interface{})), - } - - log.Printf("[DEBUG] Creating DataSync Location S3: %s", input) - output, err := conn.CreateLocationS3(input) - if err != nil { - return fmt.Errorf("error creating DataSync Location S3: %s", err) - } - - d.SetId(aws.StringValue(output.LocationArn)) - - return resourceAwsDataSyncLocationS3Read(d, meta) -} - -func resourceAwsDataSyncLocationS3Read(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - input := &datasync.DescribeLocationS3Input{ - LocationArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading DataSync Location S3: %s", input) - output, err := conn.DescribeLocationS3(input) - - if isAWSErr(err, "InvalidRequestException", "not found") { - log.Printf("[WARN] DataSync Location S3 %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading DataSync Location S3 (%s): %s", d.Id(), err) - } - - tagsInput := &datasync.ListTagsForResourceInput{ - ResourceArn: output.LocationArn, - } - - log.Printf("[DEBUG] Reading DataSync Location S3 tags: %s", tagsInput) - tagsOutput, err := conn.ListTagsForResource(tagsInput) - - if err != nil { - return fmt.Errorf("error reading DataSync Location S3 (%s) tags: %s", d.Id(), err) - } - - subdirectory, err := dataSyncParseLocationURI(aws.StringValue(output.LocationUri)) - - if err != nil { - return fmt.Errorf("error parsing Location S3 (%s) URI (%s): %s", d.Id(), aws.StringValue(output.LocationUri), err) - } - - d.Set("arn", output.LocationArn) - - if err := d.Set("s3_config", flattenDataSyncS3Config(output.S3Config)); err != nil { - return fmt.Errorf("error setting s3_config: %s", err) - } - - d.Set("subdirectory", subdirectory) - - if err := d.Set("tags", flattenDataSyncTagListEntry(tagsOutput.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - d.Set("uri", output.LocationUri) - - return nil -} - -func resourceAwsDataSyncLocationS3Update(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - if d.HasChange("tags") { - oldRaw, newRaw := d.GetChange("tags") - createTags, removeTags := dataSyncTagsDiff(expandDataSyncTagListEntry(oldRaw.(map[string]interface{})), expandDataSyncTagListEntry(newRaw.(map[string]interface{}))) - - if len(removeTags) > 0 { - input := &datasync.UntagResourceInput{ - Keys: dataSyncTagsKeys(removeTags), - ResourceArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Untagging DataSync Location S3: %s", input) - if _, err := conn.UntagResource(input); err != nil { - return fmt.Errorf("error untagging DataSync Location S3 (%s): %s", d.Id(), err) - } - } - - if len(createTags) > 0 { - input := &datasync.TagResourceInput{ - ResourceArn: aws.String(d.Id()), - Tags: createTags, - } - - log.Printf("[DEBUG] Tagging DataSync Location S3: %s", input) - if _, err := conn.TagResource(input); err != nil { - return fmt.Errorf("error tagging DataSync Location S3 (%s): %s", d.Id(), err) - } - } - } - - return resourceAwsDataSyncLocationS3Read(d, meta) -} - -func resourceAwsDataSyncLocationS3Delete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - input := &datasync.DeleteLocationInput{ - LocationArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting DataSync Location S3: %s", input) - _, err := conn.DeleteLocation(input) - - if isAWSErr(err, "InvalidRequestException", "not found") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting DataSync Location S3 (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_task.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_task.go deleted file mode 100644 index 49d846cf5..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_datasync_task.go +++ /dev/null @@ -1,339 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/terraform/helper/resource" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/datasync" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDataSyncTask() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDataSyncTaskCreate, - Read: resourceAwsDataSyncTaskRead, - Update: resourceAwsDataSyncTaskUpdate, - Delete: resourceAwsDataSyncTaskDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(5 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "cloudwatch_log_group_arn": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "destination_location_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "name": { - Type: schema.TypeString, - Optional: true, - }, - "options": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - // Ignore missing configuration block - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "atime": { - Type: schema.TypeString, - Optional: true, - Default: datasync.AtimeBestEffort, - ValidateFunc: validation.StringInSlice([]string{ - datasync.AtimeBestEffort, - datasync.AtimeNone, - }, false), - }, - "bytes_per_second": { - Type: schema.TypeInt, - Optional: true, - Default: -1, - ValidateFunc: validation.IntAtLeast(-1), - }, - "gid": { - Type: schema.TypeString, - Optional: true, - Default: datasync.GidIntValue, - ValidateFunc: validation.StringInSlice([]string{ - datasync.GidBoth, - datasync.GidIntValue, - datasync.GidName, - datasync.GidNone, - }, false), - }, - "mtime": { - Type: schema.TypeString, - Optional: true, - Default: datasync.MtimePreserve, - ValidateFunc: validation.StringInSlice([]string{ - datasync.MtimeNone, - datasync.MtimePreserve, - }, false), - }, - "posix_permissions": { - Type: schema.TypeString, - Optional: true, - Default: datasync.PosixPermissionsPreserve, - ValidateFunc: validation.StringInSlice([]string{ - datasync.PosixPermissionsBestEffort, - datasync.PosixPermissionsNone, - datasync.PosixPermissionsPreserve, - }, false), - }, - "preserve_deleted_files": { - Type: schema.TypeString, - Optional: true, - Default: datasync.PreserveDeletedFilesPreserve, - ValidateFunc: validation.StringInSlice([]string{ - datasync.PreserveDeletedFilesPreserve, - datasync.PreserveDeletedFilesRemove, - }, false), - }, - "preserve_devices": { - Type: schema.TypeString, - Optional: true, - Default: datasync.PreserveDevicesNone, - ValidateFunc: validation.StringInSlice([]string{ - datasync.PreserveDevicesNone, - datasync.PreserveDevicesPreserve, - }, false), - }, - "uid": { - Type: schema.TypeString, - Optional: true, - Default: datasync.UidIntValue, - ValidateFunc: validation.StringInSlice([]string{ - datasync.UidBoth, - datasync.UidIntValue, - datasync.UidName, - datasync.UidNone, - }, false), - }, - "verify_mode": { - Type: schema.TypeString, - Optional: true, - Default: datasync.VerifyModePointInTimeConsistent, - ValidateFunc: validation.StringInSlice([]string{ - datasync.VerifyModeNone, - datasync.VerifyModePointInTimeConsistent, - }, false), - }, - }, - }, - }, - "source_location_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func resourceAwsDataSyncTaskCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - input := &datasync.CreateTaskInput{ - DestinationLocationArn: aws.String(d.Get("destination_location_arn").(string)), - Options: expandDataSyncOptions(d.Get("options").([]interface{})), - SourceLocationArn: aws.String(d.Get("source_location_arn").(string)), - Tags: expandDataSyncTagListEntry(d.Get("tags").(map[string]interface{})), - } - - if v, ok := d.GetOk("cloudwatch_log_group_arn"); ok { - input.CloudWatchLogGroupArn = aws.String(v.(string)) - } - - if v, ok := d.GetOk("name"); ok { - input.Name = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating DataSync Task: %s", input) - output, err := conn.CreateTask(input) - if err != nil { - return fmt.Errorf("error creating DataSync Task: %s", err) - } - - d.SetId(aws.StringValue(output.TaskArn)) - - // Task creation can take a few minutes - err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - output, err := conn.DescribeTask(&datasync.DescribeTaskInput{ - TaskArn: aws.String(d.Id()), - }) - - if isAWSErr(err, "InvalidRequestException", "not found") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - if aws.StringValue(output.Status) == datasync.TaskStatusAvailable || aws.StringValue(output.Status) == datasync.TaskStatusRunning { - return nil - } - - err = fmt.Errorf("waiting for DataSync Task (%s) creation: last status (%s), error code (%s), error detail: %s", - d.Id(), aws.StringValue(output.Status), aws.StringValue(output.ErrorCode), aws.StringValue(output.ErrorDetail)) - - if aws.StringValue(output.Status) == datasync.TaskStatusCreating { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - }) - if err != nil { - return fmt.Errorf("error waiting for DataSync Task (%s) creation: %s", d.Id(), err) - } - - return resourceAwsDataSyncTaskRead(d, meta) -} - -func resourceAwsDataSyncTaskRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - input := &datasync.DescribeTaskInput{ - TaskArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading DataSync Task: %s", input) - output, err := conn.DescribeTask(input) - - if isAWSErr(err, "InvalidRequestException", "not found") { - log.Printf("[WARN] DataSync Task %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading DataSync Task (%s): %s", d.Id(), err) - } - - tagsInput := &datasync.ListTagsForResourceInput{ - ResourceArn: output.TaskArn, - } - - log.Printf("[DEBUG] Reading DataSync Task tags: %s", tagsInput) - tagsOutput, err := conn.ListTagsForResource(tagsInput) - - if err != nil { - return fmt.Errorf("error reading DataSync Task (%s) tags: %s", d.Id(), err) - } - - d.Set("arn", output.TaskArn) - d.Set("cloudwatch_log_group_arn", output.CloudWatchLogGroupArn) - d.Set("destination_location_arn", output.DestinationLocationArn) - d.Set("name", output.Name) - - if err := d.Set("options", flattenDataSyncOptions(output.Options)); err != nil { - return fmt.Errorf("error setting options: %s", err) - } - - d.Set("source_location_arn", output.SourceLocationArn) - - if err := d.Set("tags", flattenDataSyncTagListEntry(tagsOutput.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func resourceAwsDataSyncTaskUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - if d.HasChange("options") || d.HasChange("name") { - input := &datasync.UpdateTaskInput{ - Options: expandDataSyncOptions(d.Get("options").([]interface{})), - Name: aws.String(d.Get("name").(string)), - TaskArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Updating DataSync Task: %s", input) - if _, err := conn.UpdateTask(input); err != nil { - return fmt.Errorf("error creating DataSync Task: %s", err) - } - } - - if d.HasChange("tags") { - oldRaw, newRaw := d.GetChange("tags") - createTags, removeTags := dataSyncTagsDiff(expandDataSyncTagListEntry(oldRaw.(map[string]interface{})), expandDataSyncTagListEntry(newRaw.(map[string]interface{}))) - - if len(removeTags) > 0 { - input := &datasync.UntagResourceInput{ - Keys: dataSyncTagsKeys(removeTags), - ResourceArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Untagging DataSync Task: %s", input) - if _, err := conn.UntagResource(input); err != nil { - return fmt.Errorf("error untagging DataSync Task (%s): %s", d.Id(), err) - } - } - - if len(createTags) > 0 { - input := &datasync.TagResourceInput{ - ResourceArn: aws.String(d.Id()), - Tags: createTags, - } - - log.Printf("[DEBUG] Tagging DataSync Task: %s", input) - if _, err := conn.TagResource(input); err != nil { - return fmt.Errorf("error tagging DataSync Task (%s): %s", d.Id(), err) - } - } - } - - return resourceAwsDataSyncTaskRead(d, meta) -} - -func resourceAwsDataSyncTaskDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).datasyncconn - - input := &datasync.DeleteTaskInput{ - TaskArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting DataSync Task: %s", input) - _, err := conn.DeleteTask(input) - - if isAWSErr(err, "InvalidRequestException", "not found") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting DataSync Task (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go deleted file mode 100644 index 8612a38fd..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go +++ /dev/null @@ -1,587 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "sort" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/dax" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDaxCluster() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDaxClusterCreate, - Read: resourceAwsDaxClusterRead, - Update: resourceAwsDaxClusterUpdate, - Delete: resourceAwsDaxClusterDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(45 * time.Minute), - Delete: schema.DefaultTimeout(45 * time.Minute), - Update: schema.DefaultTimeout(90 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "cluster_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: func(val interface{}) string { - return strings.ToLower(val.(string)) - }, - // DAX follows the same naming convention as ElastiCache clusters - ValidateFunc: validateElastiCacheClusterId, - }, - "iam_role_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "node_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "replication_factor": { - Type: schema.TypeInt, - Required: true, - }, - "availability_zones": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "notification_topic_arn": { - Type: schema.TypeString, - Optional: true, - }, - "parameter_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "maintenance_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - StateFunc: func(val interface{}) string { - return strings.ToLower(val.(string)) - }, - ValidateFunc: validateOnceAWeekWindowFormat, - }, - "security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "server_side_encryption": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - }, - }, - }, - "subnet_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "tags": tagsSchema(), - "port": { - Type: schema.TypeInt, - Computed: true, - }, - "configuration_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - "cluster_address": { - Type: schema.TypeString, - Computed: true, - }, - "nodes": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, - "address": { - Type: schema.TypeString, - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Computed: true, - }, - "availability_zone": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsDaxClusterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).daxconn - - clusterName := d.Get("cluster_name").(string) - iamRoleArn := d.Get("iam_role_arn").(string) - nodeType := d.Get("node_type").(string) - numNodes := int64(d.Get("replication_factor").(int)) - subnetGroupName := d.Get("subnet_group_name").(string) - securityIdSet := d.Get("security_group_ids").(*schema.Set) - - securityIds := expandStringList(securityIdSet.List()) - tags := tagsFromMapDax(d.Get("tags").(map[string]interface{})) - - req := &dax.CreateClusterInput{ - ClusterName: aws.String(clusterName), - IamRoleArn: aws.String(iamRoleArn), - NodeType: aws.String(nodeType), - ReplicationFactor: aws.Int64(numNodes), - SecurityGroupIds: securityIds, - SubnetGroupName: aws.String(subnetGroupName), - Tags: tags, - } - - // optionals can be defaulted by AWS - if v, ok := d.GetOk("description"); ok { - req.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("parameter_group_name"); ok { - req.ParameterGroupName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("maintenance_window"); ok { - req.PreferredMaintenanceWindow = aws.String(v.(string)) - } - - if v, ok := d.GetOk("notification_topic_arn"); ok { - req.NotificationTopicArn = aws.String(v.(string)) - } - - preferred_azs := d.Get("availability_zones").(*schema.Set).List() - if len(preferred_azs) > 0 { - azs := expandStringList(preferred_azs) - req.AvailabilityZones = azs - } - - if v, ok := d.GetOk("server_side_encryption"); ok && len(v.([]interface{})) > 0 { - options := v.([]interface{}) - s := options[0].(map[string]interface{}) - req.SSESpecification = expandDaxEncryptAtRestOptions(s) - } - - // IAM roles take some time to propagate - var resp *dax.CreateClusterOutput - err := resource.Retry(30*time.Second, func() *resource.RetryError { - var err error - resp, err = conn.CreateCluster(req) - if err != nil { - if isAWSErr(err, dax.ErrCodeInvalidParameterValueException, "No permission to assume role") { - log.Print("[DEBUG] Retrying create of DAX cluster") - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error creating DAX cluster: %s", err) - } - - // Assign the cluster id as the resource ID - // DAX always retains the id in lower case, so we have to - // mimic that or else we won't be able to refresh a resource whose - // name contained uppercase characters. - d.SetId(strings.ToLower(*resp.Cluster.ClusterName)) - - pending := []string{"creating", "modifying"} - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: []string{"available"}, - Refresh: daxClusterStateRefreshFunc(conn, d.Id(), "available", pending), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - log.Printf("[DEBUG] Waiting for state to become available: %v", d.Id()) - _, sterr := stateConf.WaitForState() - if sterr != nil { - return fmt.Errorf("Error waiting for DAX cluster (%s) to be created: %s", d.Id(), sterr) - } - - return resourceAwsDaxClusterRead(d, meta) -} - -func resourceAwsDaxClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).daxconn - req := &dax.DescribeClustersInput{ - ClusterNames: []*string{aws.String(d.Id())}, - } - - res, err := conn.DescribeClusters(req) - if err != nil { - if isAWSErr(err, dax.ErrCodeClusterNotFoundFault, "") { - log.Printf("[WARN] DAX cluster (%s) not found", d.Id()) - d.SetId("") - return nil - } - - return err - } - - if len(res.Clusters) == 0 { - log.Printf("[WARN] DAX cluster (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - c := res.Clusters[0] - d.Set("arn", c.ClusterArn) - d.Set("cluster_name", c.ClusterName) - d.Set("description", c.Description) - d.Set("iam_role_arn", c.IamRoleArn) - d.Set("node_type", c.NodeType) - d.Set("replication_factor", c.TotalNodes) - - if c.ClusterDiscoveryEndpoint != nil { - d.Set("port", aws.Int64Value(c.ClusterDiscoveryEndpoint.Port)) - d.Set("configuration_endpoint", fmt.Sprintf("%s:%d", aws.StringValue(c.ClusterDiscoveryEndpoint.Address), aws.Int64Value(c.ClusterDiscoveryEndpoint.Port))) - d.Set("cluster_address", aws.StringValue(c.ClusterDiscoveryEndpoint.Address)) - } - - d.Set("subnet_group_name", c.SubnetGroup) - d.Set("security_group_ids", flattenDaxSecurityGroupIds(c.SecurityGroups)) - - if c.ParameterGroup != nil { - d.Set("parameter_group_name", c.ParameterGroup.ParameterGroupName) - } - - d.Set("maintenance_window", c.PreferredMaintenanceWindow) - - if c.NotificationConfiguration != nil { - if *c.NotificationConfiguration.TopicStatus == "active" { - d.Set("notification_topic_arn", c.NotificationConfiguration.TopicArn) - } - } - - if err := setDaxClusterNodeData(d, c); err != nil { - return err - } - - if err := d.Set("server_side_encryption", flattenDaxEncryptAtRestOptions(c.SSEDescription)); err != nil { - return fmt.Errorf("error setting server_side_encryption: %s", err) - } - - // list tags for resource - resp, err := conn.ListTags(&dax.ListTagsInput{ - ResourceName: aws.String(aws.StringValue(c.ClusterArn)), - }) - - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", aws.StringValue(c.ClusterArn)) - } - - var dt []*dax.Tag - if len(resp.Tags) > 0 { - dt = resp.Tags - } - d.Set("tags", tagsToMapDax(dt)) - - return nil -} - -func resourceAwsDaxClusterUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).daxconn - - if err := setTagsDax(conn, d, d.Get("arn").(string)); err != nil { - return err - } - - req := &dax.UpdateClusterInput{ - ClusterName: aws.String(d.Id()), - } - - requestUpdate := false - awaitUpdate := false - if d.HasChange("description") { - req.Description = aws.String(d.Get("description").(string)) - requestUpdate = true - } - - if d.HasChange("security_group_ids") { - if attr := d.Get("security_group_ids").(*schema.Set); attr.Len() > 0 { - req.SecurityGroupIds = expandStringList(attr.List()) - requestUpdate = true - } - } - - if d.HasChange("parameter_group_name") { - req.ParameterGroupName = aws.String(d.Get("parameter_group_name").(string)) - requestUpdate = true - } - - if d.HasChange("maintenance_window") { - req.PreferredMaintenanceWindow = aws.String(d.Get("maintenance_window").(string)) - requestUpdate = true - } - - if d.HasChange("notification_topic_arn") { - v := d.Get("notification_topic_arn").(string) - req.NotificationTopicArn = aws.String(v) - if v == "" { - inactive := "inactive" - req.NotificationTopicStatus = &inactive - } - requestUpdate = true - } - - if requestUpdate { - log.Printf("[DEBUG] Modifying DAX Cluster (%s), opts:\n%s", d.Id(), req) - _, err := conn.UpdateCluster(req) - if err != nil { - return fmt.Errorf("Error updating DAX cluster (%s), error: %s", d.Id(), err) - } - awaitUpdate = true - } - - if d.HasChange("replication_factor") { - oraw, nraw := d.GetChange("replication_factor") - o := oraw.(int) - n := nraw.(int) - if n < o { - log.Printf("[INFO] Decreasing nodes in DAX cluster %s from %d to %d", d.Id(), o, n) - _, err := conn.DecreaseReplicationFactor(&dax.DecreaseReplicationFactorInput{ - ClusterName: aws.String(d.Id()), - NewReplicationFactor: aws.Int64(int64(nraw.(int))), - }) - if err != nil { - return fmt.Errorf("Error increasing nodes in DAX cluster %s, error: %s", d.Id(), err) - } - awaitUpdate = true - } - if n > o { - log.Printf("[INFO] Increasing nodes in DAX cluster %s from %d to %d", d.Id(), o, n) - _, err := conn.IncreaseReplicationFactor(&dax.IncreaseReplicationFactorInput{ - ClusterName: aws.String(d.Id()), - NewReplicationFactor: aws.Int64(int64(nraw.(int))), - }) - if err != nil { - return fmt.Errorf("Error increasing nodes in DAX cluster %s, error: %s", d.Id(), err) - } - awaitUpdate = true - } - } - - if awaitUpdate { - log.Printf("[DEBUG] Waiting for update: %s", d.Id()) - pending := []string{"modifying"} - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: []string{"available"}, - Refresh: daxClusterStateRefreshFunc(conn, d.Id(), "available", pending), - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - _, sterr := stateConf.WaitForState() - if sterr != nil { - return fmt.Errorf("Error waiting for DAX (%s) to update: %s", d.Id(), sterr) - } - } - - return resourceAwsDaxClusterRead(d, meta) -} - -func setDaxClusterNodeData(d *schema.ResourceData, c *dax.Cluster) error { - sortedNodes := make([]*dax.Node, len(c.Nodes)) - copy(sortedNodes, c.Nodes) - sort.Sort(byNodeId(sortedNodes)) - - nodeDate := make([]map[string]interface{}, 0, len(sortedNodes)) - - for _, node := range sortedNodes { - if node.NodeId == nil || node.Endpoint == nil || node.Endpoint.Address == nil || node.Endpoint.Port == nil || node.AvailabilityZone == nil { - return fmt.Errorf("Unexpected nil pointer in: %s", node) - } - nodeDate = append(nodeDate, map[string]interface{}{ - "id": *node.NodeId, - "address": *node.Endpoint.Address, - "port": int(*node.Endpoint.Port), - "availability_zone": *node.AvailabilityZone, - }) - } - - return d.Set("nodes", nodeDate) -} - -type byNodeId []*dax.Node - -func (b byNodeId) Len() int { return len(b) } -func (b byNodeId) Swap(i, j int) { b[i], b[j] = b[j], b[i] } -func (b byNodeId) Less(i, j int) bool { - return b[i].NodeId != nil && b[j].NodeId != nil && - *b[i].NodeId < *b[j].NodeId -} - -func resourceAwsDaxClusterDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).daxconn - - req := &dax.DeleteClusterInput{ - ClusterName: aws.String(d.Id()), - } - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteCluster(req) - if err != nil { - if isAWSErr(err, dax.ErrCodeInvalidClusterStateFault, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - - log.Printf("[DEBUG] Waiting for deletion: %v", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "available", "deleting", "incompatible-parameters", "incompatible-network"}, - Target: []string{}, - Refresh: daxClusterStateRefreshFunc(conn, d.Id(), "", []string{}), - Timeout: d.Timeout(schema.TimeoutDelete), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - _, sterr := stateConf.WaitForState() - if sterr != nil { - return fmt.Errorf("Error waiting for DAX (%s) to delete: %s", d.Id(), sterr) - } - - return nil -} - -func daxClusterStateRefreshFunc(conn *dax.DAX, clusterID, givenState string, pending []string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeClusters(&dax.DescribeClustersInput{ - ClusterNames: []*string{aws.String(clusterID)}, - }) - if err != nil { - if isAWSErr(err, dax.ErrCodeClusterNotFoundFault, "") { - log.Printf("[DEBUG] Detect deletion") - return nil, "", nil - } - - log.Printf("[ERROR] daxClusterStateRefreshFunc: %s", err) - return nil, "", err - } - - if len(resp.Clusters) == 0 { - return nil, "", fmt.Errorf("Error: no DAX clusters found for id (%s)", clusterID) - } - - var c *dax.Cluster - for _, cluster := range resp.Clusters { - if *cluster.ClusterName == clusterID { - log.Printf("[DEBUG] Found matching DAX cluster: %s", *cluster.ClusterName) - c = cluster - } - } - - if c == nil { - return nil, "", fmt.Errorf("Error: no matching DAX cluster for id (%s)", clusterID) - } - - // DescribeCluster returns a response without status late on in the - // deletion process - assume cluster is still deleting until we - // get ClusterNotFoundFault - if c.Status == nil { - log.Printf("[DEBUG] DAX Cluster %s has no status attribute set - assume status is deleting", clusterID) - return c, "deleting", nil - } - - log.Printf("[DEBUG] DAX Cluster (%s) status: %v", clusterID, *c.Status) - - // return the current state if it's in the pending array - for _, p := range pending { - log.Printf("[DEBUG] DAX: checking pending state (%s) for cluster (%s), cluster status: %s", pending, clusterID, *c.Status) - s := *c.Status - if p == s { - log.Printf("[DEBUG] Return with status: %v", *c.Status) - return c, p, nil - } - } - - // return given state if it's not in pending - if givenState != "" { - log.Printf("[DEBUG] DAX: checking given state (%s) of cluster (%s) against cluster status (%s)", givenState, clusterID, *c.Status) - // check to make sure we have the node count we're expecting - if int64(len(c.Nodes)) != *c.TotalNodes { - log.Printf("[DEBUG] Node count is not what is expected: %d found, %d expected", len(c.Nodes), *c.TotalNodes) - return nil, "creating", nil - } - - log.Printf("[DEBUG] Node count matched (%d)", len(c.Nodes)) - // loop the nodes and check their status as well - for _, n := range c.Nodes { - log.Printf("[DEBUG] Checking cache node for status: %s", n) - if n.NodeStatus != nil && *n.NodeStatus != "available" { - log.Printf("[DEBUG] Node (%s) is not yet available, status: %s", *n.NodeId, *n.NodeStatus) - return nil, "creating", nil - } - log.Printf("[DEBUG] Cache node not in expected state") - } - log.Printf("[DEBUG] DAX returning given state (%s), cluster: %s", givenState, c) - return c, givenState, nil - } - log.Printf("[DEBUG] current status: %v", *c.Status) - return c, *c.Status, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_parameter_group.go deleted file mode 100644 index 27dc04891..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_parameter_group.go +++ /dev/null @@ -1,160 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/dax" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDaxParameterGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDaxParameterGroupCreate, - Read: resourceAwsDaxParameterGroupRead, - Update: resourceAwsDaxParameterGroupUpdate, - Delete: resourceAwsDaxParameterGroupDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "parameters": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsDaxParameterGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).daxconn - - input := &dax.CreateParameterGroupInput{ - ParameterGroupName: aws.String(d.Get("name").(string)), - } - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - _, err := conn.CreateParameterGroup(input) - if err != nil { - return err - } - - d.SetId(d.Get("name").(string)) - - if len(d.Get("parameters").(*schema.Set).List()) > 0 { - return resourceAwsDaxParameterGroupUpdate(d, meta) - } - return resourceAwsDaxParameterGroupRead(d, meta) -} - -func resourceAwsDaxParameterGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).daxconn - - resp, err := conn.DescribeParameterGroups(&dax.DescribeParameterGroupsInput{ - ParameterGroupNames: []*string{aws.String(d.Id())}, - }) - if err != nil { - if isAWSErr(err, dax.ErrCodeParameterGroupNotFoundFault, "") { - log.Printf("[WARN] DAX ParameterGroup %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - if len(resp.ParameterGroups) == 0 { - log.Printf("[WARN] DAX ParameterGroup %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - pg := resp.ParameterGroups[0] - - paramresp, err := conn.DescribeParameters(&dax.DescribeParametersInput{ - ParameterGroupName: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, dax.ErrCodeParameterGroupNotFoundFault, "") { - log.Printf("[WARN] DAX ParameterGroup %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("name", pg.ParameterGroupName) - desc := pg.Description - // default description is " " - if desc != nil && *desc == " " { - *desc = "" - } - d.Set("description", desc) - d.Set("parameters", flattenDaxParameterGroupParameters(paramresp.Parameters)) - return nil -} - -func resourceAwsDaxParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).daxconn - - input := &dax.UpdateParameterGroupInput{ - ParameterGroupName: aws.String(d.Id()), - } - - if d.HasChange("parameters") { - input.ParameterNameValues = expandDaxParameterGroupParameterNameValue( - d.Get("parameters").(*schema.Set).List(), - ) - } - - _, err := conn.UpdateParameterGroup(input) - if err != nil { - return err - } - - return resourceAwsDaxParameterGroupRead(d, meta) -} - -func resourceAwsDaxParameterGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).daxconn - - input := &dax.DeleteParameterGroupInput{ - ParameterGroupName: aws.String(d.Id()), - } - - _, err := conn.DeleteParameterGroup(input) - if err != nil { - if isAWSErr(err, dax.ErrCodeParameterGroupNotFoundFault, "") { - return nil - } - return err - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_subnet_group.go deleted file mode 100644 index 15f15fcd3..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_subnet_group.go +++ /dev/null @@ -1,132 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/dax" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDaxSubnetGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDaxSubnetGroupCreate, - Read: resourceAwsDaxSubnetGroupRead, - Update: resourceAwsDaxSubnetGroupUpdate, - Delete: resourceAwsDaxSubnetGroupDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "subnet_ids": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsDaxSubnetGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).daxconn - - input := &dax.CreateSubnetGroupInput{ - SubnetGroupName: aws.String(d.Get("name").(string)), - SubnetIds: expandStringSet(d.Get("subnet_ids").(*schema.Set)), - } - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - _, err := conn.CreateSubnetGroup(input) - if err != nil { - return err - } - - d.SetId(d.Get("name").(string)) - return resourceAwsDaxSubnetGroupRead(d, meta) -} - -func resourceAwsDaxSubnetGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).daxconn - - resp, err := conn.DescribeSubnetGroups(&dax.DescribeSubnetGroupsInput{ - SubnetGroupNames: []*string{aws.String(d.Id())}, - }) - if err != nil { - if isAWSErr(err, dax.ErrCodeSubnetGroupNotFoundFault, "") { - log.Printf("[WARN] DAX SubnetGroup %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - sg := resp.SubnetGroups[0] - - d.Set("name", sg.SubnetGroupName) - d.Set("description", sg.Description) - subnetIDs := make([]*string, 0, len(sg.Subnets)) - for _, v := range sg.Subnets { - subnetIDs = append(subnetIDs, v.SubnetIdentifier) - } - d.Set("subnet_ids", flattenStringList(subnetIDs)) - d.Set("vpc_id", sg.VpcId) - return nil -} - -func resourceAwsDaxSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).daxconn - - input := &dax.UpdateSubnetGroupInput{ - SubnetGroupName: aws.String(d.Id()), - } - - if d.HasChange("description") { - input.Description = aws.String(d.Get("description").(string)) - } - - if d.HasChange("subnet_ids") { - input.SubnetIds = expandStringSet(d.Get("subnet_ids").(*schema.Set)) - } - - _, err := conn.UpdateSubnetGroup(input) - if err != nil { - return err - } - - return resourceAwsDaxSubnetGroupRead(d, meta) -} - -func resourceAwsDaxSubnetGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).daxconn - - input := &dax.DeleteSubnetGroupInput{ - SubnetGroupName: aws.String(d.Id()), - } - - _, err := conn.DeleteSubnetGroup(input) - if err != nil { - if isAWSErr(err, dax.ErrCodeSubnetGroupNotFoundFault, "") { - return nil - } - return err - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_cluster_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_cluster_snapshot.go deleted file mode 100644 index 089e4fa71..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_cluster_snapshot.go +++ /dev/null @@ -1,214 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDbClusterSnapshot() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDbClusterSnapshotCreate, - Read: resourceAwsDbClusterSnapshotRead, - Delete: resourceAwsDbClusterSnapshotDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(20 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "db_cluster_snapshot_identifier": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "db_cluster_identifier": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "allocated_storage": { - Type: schema.TypeInt, - Computed: true, - }, - "availability_zones": { - Type: schema.TypeList, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - }, - "db_cluster_snapshot_arn": { - Type: schema.TypeString, - Computed: true, - }, - "storage_encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - "engine": { - Type: schema.TypeString, - Computed: true, - }, - "engine_version": { - Type: schema.TypeString, - Computed: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "license_model": { - Type: schema.TypeString, - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Computed: true, - }, - "source_db_cluster_snapshot_arn": { - Type: schema.TypeString, - Computed: true, - }, - "snapshot_type": { - Type: schema.TypeString, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsDbClusterSnapshotCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - params := &rds.CreateDBClusterSnapshotInput{ - DBClusterIdentifier: aws.String(d.Get("db_cluster_identifier").(string)), - DBClusterSnapshotIdentifier: aws.String(d.Get("db_cluster_snapshot_identifier").(string)), - } - - _, err := conn.CreateDBClusterSnapshot(params) - if err != nil { - return fmt.Errorf("error creating RDS DB Cluster Snapshot: %s", err) - } - d.SetId(d.Get("db_cluster_snapshot_identifier").(string)) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating"}, - Target: []string{"available"}, - Refresh: resourceAwsDbClusterSnapshotStateRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 5 * time.Second, - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for RDS DB Cluster Snapshot %q to create: %s", d.Id(), err) - } - - return resourceAwsDbClusterSnapshotRead(d, meta) -} - -func resourceAwsDbClusterSnapshotRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - params := &rds.DescribeDBClusterSnapshotsInput{ - DBClusterSnapshotIdentifier: aws.String(d.Id()), - } - resp, err := conn.DescribeDBClusterSnapshots(params) - if err != nil { - if isAWSErr(err, rds.ErrCodeDBClusterSnapshotNotFoundFault, "") { - log.Printf("[WARN] RDS DB Cluster Snapshot %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading RDS DB Cluster Snapshot %q: %s", d.Id(), err) - } - - if resp == nil || len(resp.DBClusterSnapshots) == 0 || resp.DBClusterSnapshots[0] == nil || aws.StringValue(resp.DBClusterSnapshots[0].DBClusterSnapshotIdentifier) != d.Id() { - log.Printf("[WARN] RDS DB Cluster Snapshot %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - snapshot := resp.DBClusterSnapshots[0] - - d.Set("allocated_storage", snapshot.AllocatedStorage) - if err := d.Set("availability_zones", flattenStringList(snapshot.AvailabilityZones)); err != nil { - return fmt.Errorf("error setting availability_zones: %s", err) - } - d.Set("db_cluster_identifier", snapshot.DBClusterIdentifier) - d.Set("db_cluster_snapshot_arn", snapshot.DBClusterSnapshotArn) - d.Set("db_cluster_snapshot_identifier", snapshot.DBClusterSnapshotIdentifier) - d.Set("engine_version", snapshot.EngineVersion) - d.Set("engine", snapshot.Engine) - d.Set("kms_key_id", snapshot.KmsKeyId) - d.Set("license_model", snapshot.LicenseModel) - d.Set("port", snapshot.Port) - d.Set("snapshot_type", snapshot.SnapshotType) - d.Set("source_db_cluster_snapshot_arn", snapshot.SourceDBClusterSnapshotArn) - d.Set("status", snapshot.Status) - d.Set("storage_encrypted", snapshot.StorageEncrypted) - d.Set("vpc_id", snapshot.VpcId) - - return nil -} - -func resourceAwsDbClusterSnapshotDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - params := &rds.DeleteDBClusterSnapshotInput{ - DBClusterSnapshotIdentifier: aws.String(d.Id()), - } - _, err := conn.DeleteDBClusterSnapshot(params) - if err != nil { - if isAWSErr(err, rds.ErrCodeDBClusterSnapshotNotFoundFault, "") { - return nil - } - return fmt.Errorf("error deleting RDS DB Cluster Snapshot %q: %s", d.Id(), err) - } - - return nil -} - -func resourceAwsDbClusterSnapshotStateRefreshFunc(dbClusterSnapshotIdentifier string, conn *rds.RDS) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - opts := &rds.DescribeDBClusterSnapshotsInput{ - DBClusterSnapshotIdentifier: aws.String(dbClusterSnapshotIdentifier), - } - - log.Printf("[DEBUG] DB Cluster Snapshot describe configuration: %#v", opts) - - resp, err := conn.DescribeDBClusterSnapshots(opts) - if err != nil { - if isAWSErr(err, rds.ErrCodeDBClusterSnapshotNotFoundFault, "") { - return nil, "", nil - } - return nil, "", fmt.Errorf("Error retrieving DB Cluster Snapshots: %s", err) - } - - if resp == nil || len(resp.DBClusterSnapshots) == 0 || resp.DBClusterSnapshots[0] == nil { - return nil, "", fmt.Errorf("No snapshots returned for %s", dbClusterSnapshotIdentifier) - } - - snapshot := resp.DBClusterSnapshots[0] - - return resp, aws.StringValue(snapshot.Status), nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_event_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_event_subscription.go deleted file mode 100644 index e3838695e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_event_subscription.go +++ /dev/null @@ -1,398 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDbEventSubscription() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDbEventSubscriptionCreate, - Read: resourceAwsDbEventSubscriptionRead, - Update: resourceAwsDbEventSubscriptionUpdate, - Delete: resourceAwsDbEventSubscriptionDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsDbEventSubscriptionImport, - }, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(40 * time.Minute), - Delete: schema.DefaultTimeout(40 * time.Minute), - Update: schema.DefaultTimeout(40 * time.Minute), - }, - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateDbEventSubscriptionName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateDbEventSubscriptionName, - }, - "sns_topic": { - Type: schema.TypeString, - Required: true, - }, - "event_categories": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "source_ids": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - // ValidateFunc: validateDbEventSubscriptionSourceIds, - // requires source_type to be set, does not seem to be a way to validate this - }, - "source_type": { - Type: schema.TypeString, - Optional: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "customer_aws_id": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsDbEventSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - var name string - if v, ok := d.GetOk("name"); ok { - name = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - name = resource.PrefixedUniqueId(v.(string)) - } else { - name = resource.UniqueId() - } - - tags := tagsFromMapRDS(d.Get("tags").(map[string]interface{})) - - sourceIdsSet := d.Get("source_ids").(*schema.Set) - sourceIds := make([]*string, sourceIdsSet.Len()) - for i, sourceId := range sourceIdsSet.List() { - sourceIds[i] = aws.String(sourceId.(string)) - } - - eventCategoriesSet := d.Get("event_categories").(*schema.Set) - eventCategories := make([]*string, eventCategoriesSet.Len()) - for i, eventCategory := range eventCategoriesSet.List() { - eventCategories[i] = aws.String(eventCategory.(string)) - } - - request := &rds.CreateEventSubscriptionInput{ - SubscriptionName: aws.String(name), - SnsTopicArn: aws.String(d.Get("sns_topic").(string)), - Enabled: aws.Bool(d.Get("enabled").(bool)), - SourceIds: sourceIds, - SourceType: aws.String(d.Get("source_type").(string)), - EventCategories: eventCategories, - Tags: tags, - } - - log.Println("[DEBUG] Create RDS Event Subscription:", request) - - output, err := conn.CreateEventSubscription(request) - if err != nil || output.EventSubscription == nil { - return fmt.Errorf("Error creating RDS Event Subscription %s: %s", name, err) - } - - d.SetId(aws.StringValue(output.EventSubscription.CustSubscriptionId)) - - if err := setTagsRDS(conn, d, aws.StringValue(output.EventSubscription.EventSubscriptionArn)); err != nil { - return fmt.Errorf("Error creating RDS Event Subscription (%s) tags: %s", d.Id(), err) - } - - log.Println( - "[INFO] Waiting for RDS Event Subscription to be ready") - - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating"}, - Target: []string{"active"}, - Refresh: resourceAwsDbEventSubscriptionRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Creating RDS Event Subscription %s failed: %s", d.Id(), err) - } - - return resourceAwsDbEventSubscriptionRead(d, meta) -} - -func resourceAwsDbEventSubscriptionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - sub, err := resourceAwsDbEventSubscriptionRetrieve(d.Id(), conn) - if err != nil { - return fmt.Errorf("Error retrieving RDS Event Subscription %s: %s", d.Id(), err) - } - if sub == nil { - log.Printf("[WARN] RDS Event Subscription (%s) not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("arn", sub.EventSubscriptionArn) - if err := d.Set("name", sub.CustSubscriptionId); err != nil { - return err - } - if err := d.Set("sns_topic", sub.SnsTopicArn); err != nil { - return err - } - if err := d.Set("source_type", sub.SourceType); err != nil { - return err - } - if err := d.Set("enabled", sub.Enabled); err != nil { - return err - } - if err := d.Set("source_ids", flattenStringList(sub.SourceIdsList)); err != nil { - return err - } - if err := d.Set("event_categories", flattenStringList(sub.EventCategoriesList)); err != nil { - return err - } - if err := d.Set("customer_aws_id", sub.CustomerAwsId); err != nil { - return err - } - - // list tags for resource - resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: sub.EventSubscriptionArn, - }) - - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", aws.StringValue(sub.EventSubscriptionArn)) - } - - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - if err := d.Set("tags", tagsToMapRDS(dt)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func resourceAwsDbEventSubscriptionRetrieve(name string, conn *rds.RDS) (*rds.EventSubscription, error) { - - request := &rds.DescribeEventSubscriptionsInput{ - SubscriptionName: aws.String(name), - } - - describeResp, err := conn.DescribeEventSubscriptions(request) - if err != nil { - if isAWSErr(err, rds.ErrCodeSubscriptionNotFoundFault, "") { - log.Printf("[WARN] No RDS Event Subscription by name (%s) found", name) - return nil, nil - } - return nil, fmt.Errorf("Error reading RDS Event Subscription %s: %s", name, err) - } - - if len(describeResp.EventSubscriptionsList) != 1 { - return nil, fmt.Errorf("Unable to find RDS Event Subscription: %#v", describeResp.EventSubscriptionsList) - } - - return describeResp.EventSubscriptionsList[0], nil -} - -func resourceAwsDbEventSubscriptionUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - d.Partial(true) - requestUpdate := false - - req := &rds.ModifyEventSubscriptionInput{ - SubscriptionName: aws.String(d.Id()), - } - - if d.HasChange("event_categories") { - eventCategoriesSet := d.Get("event_categories").(*schema.Set) - req.EventCategories = make([]*string, eventCategoriesSet.Len()) - for i, eventCategory := range eventCategoriesSet.List() { - req.EventCategories[i] = aws.String(eventCategory.(string)) - } - req.SourceType = aws.String(d.Get("source_type").(string)) - requestUpdate = true - } - - if d.HasChange("enabled") { - req.Enabled = aws.Bool(d.Get("enabled").(bool)) - requestUpdate = true - } - - if d.HasChange("sns_topic") { - req.SnsTopicArn = aws.String(d.Get("sns_topic").(string)) - requestUpdate = true - } - - if d.HasChange("source_type") { - req.SourceType = aws.String(d.Get("source_type").(string)) - requestUpdate = true - } - - log.Printf("[DEBUG] Send RDS Event Subscription modification request: %#v", requestUpdate) - if requestUpdate { - log.Printf("[DEBUG] RDS Event Subscription modification request: %#v", req) - _, err := conn.ModifyEventSubscription(req) - if err != nil { - return fmt.Errorf("Modifying RDS Event Subscription %s failed: %s", d.Id(), err) - } - - log.Println( - "[INFO] Waiting for RDS Event Subscription modification to finish") - - stateConf := &resource.StateChangeConf{ - Pending: []string{"modifying"}, - Target: []string{"active"}, - Refresh: resourceAwsDbEventSubscriptionRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Modifying RDS Event Subscription %s failed: %s", d.Id(), err) - } - d.SetPartial("event_categories") - d.SetPartial("enabled") - d.SetPartial("sns_topic") - d.SetPartial("source_type") - } - - if err := setTagsRDS(conn, d, d.Get("arn").(string)); err != nil { - return err - } else { - d.SetPartial("tags") - } - - if d.HasChange("source_ids") { - o, n := d.GetChange("source_ids") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - remove := expandStringList(os.Difference(ns).List()) - add := expandStringList(ns.Difference(os).List()) - - if len(remove) > 0 { - for _, removing := range remove { - log.Printf("[INFO] Removing %s as a Source Identifier from %q", *removing, d.Id()) - _, err := conn.RemoveSourceIdentifierFromSubscription(&rds.RemoveSourceIdentifierFromSubscriptionInput{ - SourceIdentifier: removing, - SubscriptionName: aws.String(d.Id()), - }) - if err != nil { - return err - } - } - } - - if len(add) > 0 { - for _, adding := range add { - log.Printf("[INFO] Adding %s as a Source Identifier to %q", *adding, d.Id()) - _, err := conn.AddSourceIdentifierToSubscription(&rds.AddSourceIdentifierToSubscriptionInput{ - SourceIdentifier: adding, - SubscriptionName: aws.String(d.Id()), - }) - if err != nil { - return err - } - } - } - d.SetPartial("source_ids") - } - - d.Partial(false) - - return nil -} - -func resourceAwsDbEventSubscriptionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - deleteOpts := rds.DeleteEventSubscriptionInput{ - SubscriptionName: aws.String(d.Id()), - } - - if _, err := conn.DeleteEventSubscription(&deleteOpts); err != nil { - if isAWSErr(err, rds.ErrCodeSubscriptionNotFoundFault, "") { - return nil - } - return fmt.Errorf("Error deleting RDS Event Subscription %s: %s", d.Id(), err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"deleting"}, - Target: []string{}, - Refresh: resourceAwsDbEventSubscriptionRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutDelete), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error deleting RDS Event Subscription %s: %s", d.Id(), err) - } - return err -} - -func resourceAwsDbEventSubscriptionRefreshFunc(name string, conn *rds.RDS) resource.StateRefreshFunc { - - return func() (interface{}, string, error) { - sub, err := resourceAwsDbEventSubscriptionRetrieve(name, conn) - - if err != nil { - log.Printf("Error on retrieving DB Event Subscription when waiting: %s", err) - return nil, "", err - } - - if sub == nil { - return nil, "", nil - } - - if sub.Status != nil { - log.Printf("[DEBUG] DB Event Subscription status for %s: %s", name, *sub.Status) - } - - return sub, *sub.Status, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go deleted file mode 100644 index 60d2d1e3f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go +++ /dev/null @@ -1,1661 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDbInstance() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDbInstanceCreate, - Read: resourceAwsDbInstanceRead, - Update: resourceAwsDbInstanceUpdate, - Delete: resourceAwsDbInstanceDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsDbInstanceImport, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(40 * time.Minute), - Update: schema.DefaultTimeout(80 * time.Minute), - Delete: schema.DefaultTimeout(40 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "username": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - - "deletion_protection": { - Type: schema.TypeBool, - Optional: true, - }, - - "engine": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - StateFunc: func(v interface{}) string { - value := v.(string) - return strings.ToLower(value) - }, - }, - - "engine_version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - DiffSuppressFunc: suppressAwsDbEngineVersionDiffs, - }, - - "character_set_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "storage_encrypted": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - - "allocated_storage": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - - "storage_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "identifier": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"identifier_prefix"}, - ValidateFunc: validateRdsIdentifier, - }, - "identifier_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateRdsIdentifierPrefix, - }, - - "instance_class": { - Type: schema.TypeString, - Required: true, - }, - - "availability_zone": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "backup_retention_period": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - - "backup_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateOnceADayWindowFormat, - }, - - "iops": { - Type: schema.TypeInt, - Optional: true, - }, - - "license_model": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "maintenance_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - StateFunc: func(v interface{}) string { - if v != nil { - value := v.(string) - return strings.ToLower(value) - } - return "" - }, - ValidateFunc: validateOnceAWeekWindowFormat, - }, - - "multi_az": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "port": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - - "publicly_accessible": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "vpc_security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "security_group_names": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "final_snapshot_identifier": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - es = append(es, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - es = append(es, fmt.Errorf("%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - es = append(es, fmt.Errorf("%q cannot end in a hyphen", k)) - } - return - }, - }, - - "s3_import": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{ - "snapshot_identifier", - "replicate_source_db", - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "bucket_prefix": { - Type: schema.TypeString, - Required: false, - Optional: true, - ForceNew: true, - }, - "ingestion_role": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "source_engine": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "source_engine_version": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - }, - }, - - "skip_final_snapshot": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "copy_tags_to_snapshot": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "db_subnet_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "parameter_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "address": { - Type: schema.TypeString, - Computed: true, - }, - - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "hosted_zone_id": { - Type: schema.TypeString, - Computed: true, - }, - - "status": { - Type: schema.TypeString, - Computed: true, - }, - - // apply_immediately is used to determine when the update modifications - // take place. - // See http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html - "apply_immediately": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "replicate_source_db": { - Type: schema.TypeString, - Optional: true, - }, - - "replicas": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "snapshot_identifier": { - Type: schema.TypeString, - Computed: false, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "auto_minor_version_upgrade": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "allow_major_version_upgrade": { - Type: schema.TypeBool, - Computed: false, - Optional: true, - }, - - "monitoring_role_arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "monitoring_interval": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - - "option_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - - "timezone": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "iam_database_authentication_enabled": { - Type: schema.TypeBool, - Optional: true, - }, - - "resource_id": { - Type: schema.TypeString, - Computed: true, - }, - - "ca_cert_identifier": { - Type: schema.TypeString, - Computed: true, - }, - - "enabled_cloudwatch_logs_exports": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - "alert", - "audit", - "error", - "general", - "listener", - "slowquery", - "trace", - "postgresql", - "upgrade", - }, false), - }, - }, - - "domain": { - Type: schema.TypeString, - Optional: true, - }, - - "domain_iam_role_name": { - Type: schema.TypeString, - Optional: true, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - // Some API calls (e.g. CreateDBInstanceReadReplica and - // RestoreDBInstanceFromDBSnapshot do not support all parameters to - // correctly apply all settings in one pass. For missing parameters or - // unsupported configurations, we may need to call ModifyDBInstance - // afterwards to prevent Terraform operators from API errors or needing - // to double apply. - var requiresModifyDbInstance bool - modifyDbInstanceInput := &rds.ModifyDBInstanceInput{ - ApplyImmediately: aws.Bool(true), - } - - // Some ModifyDBInstance parameters (e.g. DBParameterGroupName) require - // a database instance reboot to take affect. During resource creation, - // we expect everything to be in sync before returning completion. - var requiresRebootDbInstance bool - - tags := tagsFromMapRDS(d.Get("tags").(map[string]interface{})) - - var identifier string - if v, ok := d.GetOk("identifier"); ok { - identifier = v.(string) - } else { - if v, ok := d.GetOk("identifier_prefix"); ok { - identifier = resource.PrefixedUniqueId(v.(string)) - } else { - identifier = resource.UniqueId() - } - - // SQL Server identifier size is max 15 chars, so truncate - if engine := d.Get("engine").(string); engine != "" { - if strings.Contains(strings.ToLower(engine), "sqlserver") { - identifier = identifier[:15] - } - } - d.Set("identifier", identifier) - } - - if v, ok := d.GetOk("replicate_source_db"); ok { - opts := rds.CreateDBInstanceReadReplicaInput{ - AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), - CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)), - DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), - DBInstanceClass: aws.String(d.Get("instance_class").(string)), - DBInstanceIdentifier: aws.String(identifier), - PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), - SourceDBInstanceIdentifier: aws.String(v.(string)), - Tags: tags, - } - - if attr, ok := d.GetOk("allocated_storage"); ok { - modifyDbInstanceInput.AllocatedStorage = aws.Int64(int64(attr.(int))) - requiresModifyDbInstance = true - } - - if attr, ok := d.GetOk("availability_zone"); ok { - opts.AvailabilityZone = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("backup_retention_period"); ok { - modifyDbInstanceInput.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) - requiresModifyDbInstance = true - } - - if attr, ok := d.GetOk("backup_window"); ok { - modifyDbInstanceInput.PreferredBackupWindow = aws.String(attr.(string)) - requiresModifyDbInstance = true - } - - if attr, ok := d.GetOk("db_subnet_group_name"); ok { - opts.DBSubnetGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { - opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) - } - - if attr, ok := d.GetOk("iam_database_authentication_enabled"); ok { - opts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) - } - - if attr, ok := d.GetOk("iops"); ok { - opts.Iops = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("kms_key_id"); ok { - opts.KmsKeyId = aws.String(attr.(string)) - if arnParts := strings.Split(v.(string), ":"); len(arnParts) >= 4 { - opts.SourceRegion = aws.String(arnParts[3]) - } - } - - if attr, ok := d.GetOk("maintenance_window"); ok { - modifyDbInstanceInput.PreferredMaintenanceWindow = aws.String(attr.(string)) - requiresModifyDbInstance = true - } - - if attr, ok := d.GetOk("monitoring_interval"); ok { - opts.MonitoringInterval = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("monitoring_role_arn"); ok { - opts.MonitoringRoleArn = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("multi_az"); ok { - opts.MultiAZ = aws.Bool(attr.(bool)) - } - - if attr, ok := d.GetOk("option_group_name"); ok { - opts.OptionGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("parameter_group_name"); ok { - modifyDbInstanceInput.DBParameterGroupName = aws.String(attr.(string)) - requiresModifyDbInstance = true - requiresRebootDbInstance = true - } - - if attr, ok := d.GetOk("password"); ok { - modifyDbInstanceInput.MasterUserPassword = aws.String(attr.(string)) - requiresModifyDbInstance = true - } - - if attr, ok := d.GetOk("port"); ok { - opts.Port = aws.Int64(int64(attr.(int))) - } - - if attr := d.Get("security_group_names").(*schema.Set); attr.Len() > 0 { - modifyDbInstanceInput.DBSecurityGroups = expandStringSet(attr) - requiresModifyDbInstance = true - } - - if attr, ok := d.GetOk("storage_type"); ok { - opts.StorageType = aws.String(attr.(string)) - } - - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - modifyDbInstanceInput.VpcSecurityGroupIds = expandStringSet(attr) - requiresModifyDbInstance = true - } - - log.Printf("[DEBUG] DB Instance Replica create configuration: %#v", opts) - _, err := conn.CreateDBInstanceReadReplica(&opts) - if err != nil { - return fmt.Errorf("Error creating DB Instance: %s", err) - } - } else if v, ok := d.GetOk("s3_import"); ok { - - if _, ok := d.GetOk("allocated_storage"); !ok { - return fmt.Errorf(`provider.aws: aws_db_instance: %s: "allocated_storage": required field is not set`, d.Get("name").(string)) - } - if _, ok := d.GetOk("engine"); !ok { - return fmt.Errorf(`provider.aws: aws_db_instance: %s: "engine": required field is not set`, d.Get("name").(string)) - } - if _, ok := d.GetOk("password"); !ok { - return fmt.Errorf(`provider.aws: aws_db_instance: %s: "password": required field is not set`, d.Get("name").(string)) - } - if _, ok := d.GetOk("username"); !ok { - return fmt.Errorf(`provider.aws: aws_db_instance: %s: "username": required field is not set`, d.Get("name").(string)) - } - - s3_bucket := v.([]interface{})[0].(map[string]interface{}) - opts := rds.RestoreDBInstanceFromS3Input{ - AllocatedStorage: aws.Int64(int64(d.Get("allocated_storage").(int))), - AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), - CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)), - DBName: aws.String(d.Get("name").(string)), - DBInstanceClass: aws.String(d.Get("instance_class").(string)), - DBInstanceIdentifier: aws.String(d.Get("identifier").(string)), - DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), - Engine: aws.String(d.Get("engine").(string)), - EngineVersion: aws.String(d.Get("engine_version").(string)), - S3BucketName: aws.String(s3_bucket["bucket_name"].(string)), - S3Prefix: aws.String(s3_bucket["bucket_prefix"].(string)), - S3IngestionRoleArn: aws.String(s3_bucket["ingestion_role"].(string)), - MasterUsername: aws.String(d.Get("username").(string)), - MasterUserPassword: aws.String(d.Get("password").(string)), - PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), - StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), - SourceEngine: aws.String(s3_bucket["source_engine"].(string)), - SourceEngineVersion: aws.String(s3_bucket["source_engine_version"].(string)), - Tags: tags, - } - - if attr, ok := d.GetOk("multi_az"); ok { - opts.MultiAZ = aws.Bool(attr.(bool)) - - } - - if _, ok := d.GetOk("character_set_name"); ok { - return fmt.Errorf(`provider.aws: aws_db_instance: %s: "character_set_name" doesn't work with with restores"`, d.Get("name").(string)) - } - if _, ok := d.GetOk("timezone"); ok { - return fmt.Errorf(`provider.aws: aws_db_instance: %s: "timezone" doesn't work with with restores"`, d.Get("name").(string)) - } - - attr := d.Get("backup_retention_period") - opts.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) - - if attr, ok := d.GetOk("maintenance_window"); ok { - opts.PreferredMaintenanceWindow = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("backup_window"); ok { - opts.PreferredBackupWindow = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("license_model"); ok { - opts.LicenseModel = aws.String(attr.(string)) - } - if attr, ok := d.GetOk("parameter_group_name"); ok { - opts.DBParameterGroupName = aws.String(attr.(string)) - } - - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - var s []*string - for _, v := range attr.List() { - s = append(s, aws.String(v.(string))) - } - opts.VpcSecurityGroupIds = s - } - - if attr := d.Get("security_group_names").(*schema.Set); attr.Len() > 0 { - var s []*string - for _, v := range attr.List() { - s = append(s, aws.String(v.(string))) - } - opts.DBSecurityGroups = s - } - if attr, ok := d.GetOk("storage_type"); ok { - opts.StorageType = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("db_subnet_group_name"); ok { - opts.DBSubnetGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("iops"); ok { - opts.Iops = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("port"); ok { - opts.Port = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("availability_zone"); ok { - opts.AvailabilityZone = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("monitoring_role_arn"); ok { - opts.MonitoringRoleArn = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("monitoring_interval"); ok { - opts.MonitoringInterval = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("option_group_name"); ok { - opts.OptionGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("kms_key_id"); ok { - opts.KmsKeyId = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("iam_database_authentication_enabled"); ok { - opts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) - } - - log.Printf("[DEBUG] DB Instance S3 Restore configuration: %#v", opts) - var err error - // Retry for IAM eventual consistency - err = resource.Retry(2*time.Minute, func() *resource.RetryError { - _, err = conn.RestoreDBInstanceFromS3(&opts) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "ENHANCED_MONITORING") { - return resource.RetryableError(err) - } - if isAWSErr(err, "InvalidParameterValue", "S3_SNAPSHOT_INGESTION") { - return resource.RetryableError(err) - } - if isAWSErr(err, "InvalidParameterValue", "S3 bucket cannot be found") { - return resource.RetryableError(err) - } - // InvalidParameterValue: Files from the specified Amazon S3 bucket cannot be downloaded. Make sure that you have created an AWS Identity and Access Management (IAM) role that lets Amazon RDS access Amazon S3 for you. - if isAWSErr(err, "InvalidParameterValue", "Files from the specified Amazon S3 bucket cannot be downloaded") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error creating DB Instance: %s", err) - } - - d.SetId(d.Get("identifier").(string)) - - log.Printf("[INFO] DB Instance ID: %s", d.Id()) - - log.Println( - "[INFO] Waiting for DB Instance to be available") - - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsDbInstanceCreatePendingStates, - Target: []string{"available", "storage-optimization"}, - Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsDbInstanceRead(d, meta) - } else if _, ok := d.GetOk("snapshot_identifier"); ok { - opts := rds.RestoreDBInstanceFromDBSnapshotInput{ - AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), - CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)), - DBInstanceClass: aws.String(d.Get("instance_class").(string)), - DBInstanceIdentifier: aws.String(d.Get("identifier").(string)), - DBSnapshotIdentifier: aws.String(d.Get("snapshot_identifier").(string)), - DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), - PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), - Tags: tags, - } - - if attr, ok := d.GetOk("name"); ok { - // "Note: This parameter [DBName] doesn't apply to the MySQL, PostgreSQL, or MariaDB engines." - // https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBInstanceFromDBSnapshot.html - switch strings.ToLower(d.Get("engine").(string)) { - case "mysql", "postgres", "mariadb": - // skip - default: - opts.DBName = aws.String(attr.(string)) - } - } - - if attr, ok := d.GetOk("allocated_storage"); ok { - modifyDbInstanceInput.AllocatedStorage = aws.Int64(int64(attr.(int))) - requiresModifyDbInstance = true - } - - if attr, ok := d.GetOk("availability_zone"); ok { - opts.AvailabilityZone = aws.String(attr.(string)) - } - - if attr, ok := d.GetOkExists("backup_retention_period"); ok { - modifyDbInstanceInput.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) - requiresModifyDbInstance = true - } - - if attr, ok := d.GetOk("backup_window"); ok { - modifyDbInstanceInput.PreferredBackupWindow = aws.String(attr.(string)) - requiresModifyDbInstance = true - } - - if attr, ok := d.GetOk("db_subnet_group_name"); ok { - opts.DBSubnetGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("domain"); ok { - opts.Domain = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("domain_iam_role_name"); ok { - opts.DomainIAMRoleName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { - opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) - } - - if attr, ok := d.GetOk("engine"); ok { - opts.Engine = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("iam_database_authentication_enabled"); ok { - opts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) - } - - if attr, ok := d.GetOk("iops"); ok { - opts.Iops = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("license_model"); ok { - opts.LicenseModel = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("maintenance_window"); ok { - modifyDbInstanceInput.PreferredMaintenanceWindow = aws.String(attr.(string)) - requiresModifyDbInstance = true - } - - if attr, ok := d.GetOk("monitoring_interval"); ok { - modifyDbInstanceInput.MonitoringInterval = aws.Int64(int64(attr.(int))) - requiresModifyDbInstance = true - } - - if attr, ok := d.GetOk("monitoring_role_arn"); ok { - modifyDbInstanceInput.MonitoringRoleArn = aws.String(attr.(string)) - requiresModifyDbInstance = true - } - - if attr, ok := d.GetOk("multi_az"); ok { - // When using SQL Server engine with MultiAZ enabled, its not - // possible to immediately enable mirroring since - // BackupRetentionPeriod is not available as a parameter to - // RestoreDBInstanceFromDBSnapshot and you receive an error. e.g. - // InvalidParameterValue: Mirroring cannot be applied to instances with backup retention set to zero. - // If we know the engine, prevent the error upfront. - if v, ok := d.GetOk("engine"); ok && strings.HasPrefix(strings.ToLower(v.(string)), "sqlserver") { - modifyDbInstanceInput.MultiAZ = aws.Bool(attr.(bool)) - requiresModifyDbInstance = true - } else { - opts.MultiAZ = aws.Bool(attr.(bool)) - } - } - - if attr, ok := d.GetOk("option_group_name"); ok { - opts.OptionGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("parameter_group_name"); ok { - opts.DBParameterGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("password"); ok { - modifyDbInstanceInput.MasterUserPassword = aws.String(attr.(string)) - requiresModifyDbInstance = true - } - - if attr, ok := d.GetOk("port"); ok { - opts.Port = aws.Int64(int64(attr.(int))) - } - - if attr := d.Get("security_group_names").(*schema.Set); attr.Len() > 0 { - modifyDbInstanceInput.DBSecurityGroups = expandStringSet(attr) - requiresModifyDbInstance = true - } - - if attr, ok := d.GetOk("storage_type"); ok { - opts.StorageType = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("tde_credential_arn"); ok { - opts.TdeCredentialArn = aws.String(attr.(string)) - } - - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - modifyDbInstanceInput.VpcSecurityGroupIds = expandStringSet(attr) - requiresModifyDbInstance = true - } - - log.Printf("[DEBUG] DB Instance restore from snapshot configuration: %s", opts) - _, err := conn.RestoreDBInstanceFromDBSnapshot(&opts) - - // When using SQL Server engine with MultiAZ enabled, its not - // possible to immediately enable mirroring since - // BackupRetentionPeriod is not available as a parameter to - // RestoreDBInstanceFromDBSnapshot and you receive an error. e.g. - // InvalidParameterValue: Mirroring cannot be applied to instances with backup retention set to zero. - // Since engine is not a required argument when using snapshot_identifier - // and the RDS API determines this condition, we catch the error - // and remove the invalid configuration for it to be fixed afterwards. - if isAWSErr(err, "InvalidParameterValue", "Mirroring cannot be applied to instances with backup retention set to zero") { - opts.MultiAZ = aws.Bool(false) - modifyDbInstanceInput.MultiAZ = aws.Bool(true) - requiresModifyDbInstance = true - _, err = conn.RestoreDBInstanceFromDBSnapshot(&opts) - } - - if err != nil { - return fmt.Errorf("Error creating DB Instance: %s", err) - } - } else { - if _, ok := d.GetOk("allocated_storage"); !ok { - return fmt.Errorf(`provider.aws: aws_db_instance: %s: "allocated_storage": required field is not set`, d.Get("name").(string)) - } - if _, ok := d.GetOk("engine"); !ok { - return fmt.Errorf(`provider.aws: aws_db_instance: %s: "engine": required field is not set`, d.Get("name").(string)) - } - if _, ok := d.GetOk("password"); !ok { - return fmt.Errorf(`provider.aws: aws_db_instance: %s: "password": required field is not set`, d.Get("name").(string)) - } - if _, ok := d.GetOk("username"); !ok { - return fmt.Errorf(`provider.aws: aws_db_instance: %s: "username": required field is not set`, d.Get("name").(string)) - } - opts := rds.CreateDBInstanceInput{ - AllocatedStorage: aws.Int64(int64(d.Get("allocated_storage").(int))), - DBName: aws.String(d.Get("name").(string)), - DBInstanceClass: aws.String(d.Get("instance_class").(string)), - DBInstanceIdentifier: aws.String(d.Get("identifier").(string)), - DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), - MasterUsername: aws.String(d.Get("username").(string)), - MasterUserPassword: aws.String(d.Get("password").(string)), - Engine: aws.String(d.Get("engine").(string)), - EngineVersion: aws.String(d.Get("engine_version").(string)), - StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), - AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), - PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), - Tags: tags, - CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)), - } - - attr := d.Get("backup_retention_period") - opts.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) - if attr, ok := d.GetOk("multi_az"); ok { - opts.MultiAZ = aws.Bool(attr.(bool)) - - } - - if attr, ok := d.GetOk("character_set_name"); ok { - opts.CharacterSetName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("timezone"); ok { - opts.Timezone = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("maintenance_window"); ok { - opts.PreferredMaintenanceWindow = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("backup_window"); ok { - opts.PreferredBackupWindow = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("license_model"); ok { - opts.LicenseModel = aws.String(attr.(string)) - } - if attr, ok := d.GetOk("parameter_group_name"); ok { - opts.DBParameterGroupName = aws.String(attr.(string)) - } - - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - var s []*string - for _, v := range attr.List() { - s = append(s, aws.String(v.(string))) - } - opts.VpcSecurityGroupIds = s - } - - if attr := d.Get("security_group_names").(*schema.Set); attr.Len() > 0 { - var s []*string - for _, v := range attr.List() { - s = append(s, aws.String(v.(string))) - } - opts.DBSecurityGroups = s - } - if attr, ok := d.GetOk("storage_type"); ok { - opts.StorageType = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("db_subnet_group_name"); ok { - opts.DBSubnetGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { - opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) - } - - if attr, ok := d.GetOk("iops"); ok { - opts.Iops = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("port"); ok { - opts.Port = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("availability_zone"); ok { - opts.AvailabilityZone = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("monitoring_role_arn"); ok { - opts.MonitoringRoleArn = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("monitoring_interval"); ok { - opts.MonitoringInterval = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("option_group_name"); ok { - opts.OptionGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("kms_key_id"); ok { - opts.KmsKeyId = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("iam_database_authentication_enabled"); ok { - opts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) - } - - if attr, ok := d.GetOk("domain"); ok { - opts.Domain = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("domain_iam_role_name"); ok { - opts.DomainIAMRoleName = aws.String(attr.(string)) - } - - log.Printf("[DEBUG] DB Instance create configuration: %#v", opts) - var err error - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err = conn.CreateDBInstance(&opts) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "ENHANCED_MONITORING") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "") { - return fmt.Errorf("Error creating DB Instance: %s, %+v", err, opts) - } - return fmt.Errorf("Error creating DB Instance: %s", err) - - } - } - - d.SetId(d.Get("identifier").(string)) - - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsDbInstanceCreatePendingStates, - Target: []string{"available", "storage-optimization"}, - Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - - log.Printf("[INFO] Waiting for DB Instance (%s) to be available", d.Id()) - _, err := stateConf.WaitForState() - if err != nil { - return err - } - - if requiresModifyDbInstance { - modifyDbInstanceInput.DBInstanceIdentifier = aws.String(d.Id()) - - log.Printf("[INFO] DB Instance (%s) configuration requires ModifyDBInstance: %s", d.Id(), modifyDbInstanceInput) - _, err := conn.ModifyDBInstance(modifyDbInstanceInput) - if err != nil { - return fmt.Errorf("error modifying DB Instance (%s): %s", d.Id(), err) - } - - log.Printf("[INFO] Waiting for DB Instance (%s) to be available", d.Id()) - err = waitUntilAwsDbInstanceIsAvailableAfterUpdate(d.Id(), conn, d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return fmt.Errorf("error waiting for DB Instance (%s) to be available: %s", d.Id(), err) - } - } - - if requiresRebootDbInstance { - rebootDbInstanceInput := &rds.RebootDBInstanceInput{ - DBInstanceIdentifier: aws.String(d.Id()), - } - - log.Printf("[INFO] DB Instance (%s) configuration requires RebootDBInstance: %s", d.Id(), rebootDbInstanceInput) - _, err := conn.RebootDBInstance(rebootDbInstanceInput) - if err != nil { - return fmt.Errorf("error rebooting DB Instance (%s): %s", d.Id(), err) - } - - log.Printf("[INFO] Waiting for DB Instance (%s) to be available", d.Id()) - err = waitUntilAwsDbInstanceIsAvailableAfterUpdate(d.Id(), conn, d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return fmt.Errorf("error waiting for DB Instance (%s) to be available: %s", d.Id(), err) - } - } - - return resourceAwsDbInstanceRead(d, meta) -} - -func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { - v, err := resourceAwsDbInstanceRetrieve(d.Id(), meta.(*AWSClient).rdsconn) - - if err != nil { - return err - } - if v == nil { - d.SetId("") - return nil - } - - d.Set("name", v.DBName) - d.Set("identifier", v.DBInstanceIdentifier) - d.Set("resource_id", v.DbiResourceId) - d.Set("username", v.MasterUsername) - d.Set("deletion_protection", v.DeletionProtection) - d.Set("engine", v.Engine) - d.Set("engine_version", v.EngineVersion) - d.Set("allocated_storage", v.AllocatedStorage) - d.Set("iops", v.Iops) - d.Set("copy_tags_to_snapshot", v.CopyTagsToSnapshot) - d.Set("auto_minor_version_upgrade", v.AutoMinorVersionUpgrade) - d.Set("storage_type", v.StorageType) - d.Set("instance_class", v.DBInstanceClass) - d.Set("availability_zone", v.AvailabilityZone) - d.Set("backup_retention_period", v.BackupRetentionPeriod) - d.Set("backup_window", v.PreferredBackupWindow) - d.Set("license_model", v.LicenseModel) - d.Set("maintenance_window", v.PreferredMaintenanceWindow) - d.Set("publicly_accessible", v.PubliclyAccessible) - d.Set("multi_az", v.MultiAZ) - d.Set("kms_key_id", v.KmsKeyId) - d.Set("port", v.DbInstancePort) - d.Set("iam_database_authentication_enabled", v.IAMDatabaseAuthenticationEnabled) - if v.DBSubnetGroup != nil { - d.Set("db_subnet_group_name", v.DBSubnetGroup.DBSubnetGroupName) - } - - if v.CharacterSetName != nil { - d.Set("character_set_name", v.CharacterSetName) - } - - d.Set("timezone", v.Timezone) - - if len(v.DBParameterGroups) > 0 { - d.Set("parameter_group_name", v.DBParameterGroups[0].DBParameterGroupName) - } - - if v.Endpoint != nil { - d.Set("port", v.Endpoint.Port) - d.Set("address", v.Endpoint.Address) - d.Set("hosted_zone_id", v.Endpoint.HostedZoneId) - if v.Endpoint.Address != nil && v.Endpoint.Port != nil { - d.Set("endpoint", - fmt.Sprintf("%s:%d", *v.Endpoint.Address, *v.Endpoint.Port)) - } - } - - d.Set("status", v.DBInstanceStatus) - d.Set("storage_encrypted", v.StorageEncrypted) - if v.OptionGroupMemberships != nil { - d.Set("option_group_name", v.OptionGroupMemberships[0].OptionGroupName) - } - - if v.MonitoringInterval != nil { - d.Set("monitoring_interval", v.MonitoringInterval) - } - - if v.MonitoringRoleArn != nil { - d.Set("monitoring_role_arn", v.MonitoringRoleArn) - } - - if err := d.Set("enabled_cloudwatch_logs_exports", flattenStringList(v.EnabledCloudwatchLogsExports)); err != nil { - return fmt.Errorf("error setting enabled_cloudwatch_logs_exports: %s", err) - } - - d.Set("domain", "") - d.Set("domain_iam_role_name", "") - if len(v.DomainMemberships) > 0 && v.DomainMemberships[0] != nil { - d.Set("domain", v.DomainMemberships[0].Domain) - d.Set("domain_iam_role_name", v.DomainMemberships[0].IAMRoleName) - } - - // list tags for resource - // set tags - conn := meta.(*AWSClient).rdsconn - - arn := aws.StringValue(v.DBInstanceArn) - d.Set("arn", arn) - resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - - if err != nil { - return fmt.Errorf("Error retrieving tags for ARN: %s", arn) - } - - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - d.Set("tags", tagsToMapRDS(dt)) - - // Create an empty schema.Set to hold all vpc security group ids - ids := &schema.Set{ - F: schema.HashString, - } - for _, v := range v.VpcSecurityGroups { - ids.Add(*v.VpcSecurityGroupId) - } - d.Set("vpc_security_group_ids", ids) - - // Create an empty schema.Set to hold all security group names - sgn := &schema.Set{ - F: schema.HashString, - } - for _, v := range v.DBSecurityGroups { - sgn.Add(*v.DBSecurityGroupName) - } - d.Set("security_group_names", sgn) - // replica things - - var replicas []string - for _, v := range v.ReadReplicaDBInstanceIdentifiers { - replicas = append(replicas, *v) - } - if err := d.Set("replicas", replicas); err != nil { - return fmt.Errorf("Error setting replicas attribute: %#v, error: %#v", replicas, err) - } - - d.Set("replicate_source_db", v.ReadReplicaSourceDBInstanceIdentifier) - - d.Set("ca_cert_identifier", v.CACertificateIdentifier) - - return nil -} - -func resourceAwsDbInstanceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - log.Printf("[DEBUG] DB Instance destroy: %v", d.Id()) - - opts := rds.DeleteDBInstanceInput{DBInstanceIdentifier: aws.String(d.Id())} - - skipFinalSnapshot := d.Get("skip_final_snapshot").(bool) - opts.SkipFinalSnapshot = aws.Bool(skipFinalSnapshot) - - if !skipFinalSnapshot { - if name, present := d.GetOk("final_snapshot_identifier"); present { - opts.FinalDBSnapshotIdentifier = aws.String(name.(string)) - } else { - return fmt.Errorf("DB Instance FinalSnapshotIdentifier is required when a final snapshot is required") - } - } - - log.Printf("[DEBUG] DB Instance destroy configuration: %v", opts) - _, err := conn.DeleteDBInstance(&opts) - - // InvalidDBInstanceState: Instance XXX is already being deleted. - if err != nil && !isAWSErr(err, rds.ErrCodeInvalidDBInstanceStateFault, "is already being deleted") { - return fmt.Errorf("error deleting Database Instance %q: %s", d.Id(), err) - } - - log.Println("[INFO] Waiting for DB Instance to be destroyed") - return waitUntilAwsDbInstanceIsDeleted(d.Id(), conn, d.Timeout(schema.TimeoutDelete)) -} - -func waitUntilAwsDbInstanceIsAvailableAfterUpdate(id string, conn *rds.RDS, timeout time.Duration) error { - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsDbInstanceUpdatePendingStates, - Target: []string{"available", "storage-optimization"}, - Refresh: resourceAwsDbInstanceStateRefreshFunc(id, conn), - Timeout: timeout, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - _, err := stateConf.WaitForState() - return err -} - -func waitUntilAwsDbInstanceIsDeleted(id string, conn *rds.RDS, timeout time.Duration) error { - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsDbInstanceDeletePendingStates, - Target: []string{}, - Refresh: resourceAwsDbInstanceStateRefreshFunc(id, conn), - Timeout: timeout, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - _, err := stateConf.WaitForState() - return err -} - -func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - d.Partial(true) - - req := &rds.ModifyDBInstanceInput{ - ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), - DBInstanceIdentifier: aws.String(d.Id()), - } - - d.SetPartial("apply_immediately") - - if !aws.BoolValue(req.ApplyImmediately) { - log.Println("[INFO] Only settings updating, instance changes will be applied in next maintenance window") - } - - requestUpdate := false - if d.HasChange("allocated_storage") || d.HasChange("iops") { - d.SetPartial("allocated_storage") - d.SetPartial("iops") - req.Iops = aws.Int64(int64(d.Get("iops").(int))) - req.AllocatedStorage = aws.Int64(int64(d.Get("allocated_storage").(int))) - requestUpdate = true - } - if d.HasChange("allow_major_version_upgrade") { - d.SetPartial("allow_major_version_upgrade") - req.AllowMajorVersionUpgrade = aws.Bool(d.Get("allow_major_version_upgrade").(bool)) - requestUpdate = true - } - if d.HasChange("backup_retention_period") { - d.SetPartial("backup_retention_period") - req.BackupRetentionPeriod = aws.Int64(int64(d.Get("backup_retention_period").(int))) - requestUpdate = true - } - if d.HasChange("copy_tags_to_snapshot") { - d.SetPartial("copy_tags_to_snapshot") - req.CopyTagsToSnapshot = aws.Bool(d.Get("copy_tags_to_snapshot").(bool)) - requestUpdate = true - } - if d.HasChange("deletion_protection") { - d.SetPartial("deletion_protection") - req.DeletionProtection = aws.Bool(d.Get("deletion_protection").(bool)) - requestUpdate = true - } - if d.HasChange("instance_class") { - d.SetPartial("instance_class") - req.DBInstanceClass = aws.String(d.Get("instance_class").(string)) - requestUpdate = true - } - if d.HasChange("parameter_group_name") { - d.SetPartial("parameter_group_name") - req.DBParameterGroupName = aws.String(d.Get("parameter_group_name").(string)) - requestUpdate = true - } - if d.HasChange("engine_version") { - d.SetPartial("engine_version") - req.EngineVersion = aws.String(d.Get("engine_version").(string)) - req.AllowMajorVersionUpgrade = aws.Bool(d.Get("allow_major_version_upgrade").(bool)) - requestUpdate = true - } - if d.HasChange("backup_window") { - d.SetPartial("backup_window") - req.PreferredBackupWindow = aws.String(d.Get("backup_window").(string)) - requestUpdate = true - } - if d.HasChange("maintenance_window") { - d.SetPartial("maintenance_window") - req.PreferredMaintenanceWindow = aws.String(d.Get("maintenance_window").(string)) - requestUpdate = true - } - if d.HasChange("password") { - d.SetPartial("password") - req.MasterUserPassword = aws.String(d.Get("password").(string)) - requestUpdate = true - } - if d.HasChange("multi_az") { - d.SetPartial("multi_az") - req.MultiAZ = aws.Bool(d.Get("multi_az").(bool)) - requestUpdate = true - } - if d.HasChange("publicly_accessible") { - d.SetPartial("publicly_accessible") - req.PubliclyAccessible = aws.Bool(d.Get("publicly_accessible").(bool)) - requestUpdate = true - } - if d.HasChange("storage_type") { - d.SetPartial("storage_type") - req.StorageType = aws.String(d.Get("storage_type").(string)) - requestUpdate = true - - if *req.StorageType == "io1" { - req.Iops = aws.Int64(int64(d.Get("iops").(int))) - } - } - if d.HasChange("auto_minor_version_upgrade") { - d.SetPartial("auto_minor_version_upgrade") - req.AutoMinorVersionUpgrade = aws.Bool(d.Get("auto_minor_version_upgrade").(bool)) - requestUpdate = true - } - - if d.HasChange("monitoring_role_arn") { - d.SetPartial("monitoring_role_arn") - req.MonitoringRoleArn = aws.String(d.Get("monitoring_role_arn").(string)) - requestUpdate = true - } - - if d.HasChange("monitoring_interval") { - d.SetPartial("monitoring_interval") - req.MonitoringInterval = aws.Int64(int64(d.Get("monitoring_interval").(int))) - requestUpdate = true - } - - if d.HasChange("vpc_security_group_ids") { - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - req.VpcSecurityGroupIds = expandStringSet(attr) - } - requestUpdate = true - } - - if d.HasChange("security_group_names") { - if attr := d.Get("security_group_names").(*schema.Set); attr.Len() > 0 { - req.DBSecurityGroups = expandStringSet(attr) - } - requestUpdate = true - } - - if d.HasChange("option_group_name") { - d.SetPartial("option_group_name") - req.OptionGroupName = aws.String(d.Get("option_group_name").(string)) - requestUpdate = true - } - - if d.HasChange("port") { - d.SetPartial("port") - req.DBPortNumber = aws.Int64(int64(d.Get("port").(int))) - requestUpdate = true - } - if d.HasChange("db_subnet_group_name") { - d.SetPartial("db_subnet_group_name") - req.DBSubnetGroupName = aws.String(d.Get("db_subnet_group_name").(string)) - requestUpdate = true - } - - if d.HasChange("enabled_cloudwatch_logs_exports") { - d.SetPartial("enabled_cloudwatch_logs_exports") - req.CloudwatchLogsExportConfiguration = buildCloudwatchLogsExportConfiguration(d) - requestUpdate = true - } - - if d.HasChange("iam_database_authentication_enabled") { - req.EnableIAMDatabaseAuthentication = aws.Bool(d.Get("iam_database_authentication_enabled").(bool)) - requestUpdate = true - } - - if d.HasChange("domain") || d.HasChange("domain_iam_role_name") { - d.SetPartial("domain") - d.SetPartial("domain_iam_role_name") - req.Domain = aws.String(d.Get("domain").(string)) - req.DomainIAMRoleName = aws.String(d.Get("domain_iam_role_name").(string)) - requestUpdate = true - } - - log.Printf("[DEBUG] Send DB Instance Modification request: %t", requestUpdate) - if requestUpdate { - log.Printf("[DEBUG] DB Instance Modification request: %s", req) - _, err := conn.ModifyDBInstance(req) - if err != nil { - return fmt.Errorf("Error modifying DB Instance %s: %s", d.Id(), err) - } - - log.Printf("[DEBUG] Waiting for DB Instance (%s) to be available", d.Id()) - err = waitUntilAwsDbInstanceIsAvailableAfterUpdate(d.Id(), conn, d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return fmt.Errorf("error waiting for DB Instance (%s) to be available: %s", d.Id(), err) - } - } - - // separate request to promote a database - if d.HasChange("replicate_source_db") { - if d.Get("replicate_source_db").(string) == "" { - // promote - opts := rds.PromoteReadReplicaInput{ - DBInstanceIdentifier: aws.String(d.Id()), - } - attr := d.Get("backup_retention_period") - opts.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) - if attr, ok := d.GetOk("backup_window"); ok { - opts.PreferredBackupWindow = aws.String(attr.(string)) - } - _, err := conn.PromoteReadReplica(&opts) - if err != nil { - return fmt.Errorf("Error promoting database: %#v", err) - } - d.Set("replicate_source_db", "") - } else { - return fmt.Errorf("cannot elect new source database for replication") - } - } - - if d.HasChange("tags") { - if err := setTagsRDS(conn, d, d.Get("arn").(string)); err != nil { - return err - } else { - d.SetPartial("tags") - } - } - - d.Partial(false) - - return resourceAwsDbInstanceRead(d, meta) -} - -// resourceAwsDbInstanceRetrieve fetches DBInstance information from the AWS -// API. It returns an error if there is a communication problem or unexpected -// error with AWS. When the DBInstance is not found, it returns no error and a -// nil pointer. -func resourceAwsDbInstanceRetrieve(id string, conn *rds.RDS) (*rds.DBInstance, error) { - opts := rds.DescribeDBInstancesInput{ - DBInstanceIdentifier: aws.String(id), - } - - log.Printf("[DEBUG] DB Instance describe configuration: %#v", opts) - - resp, err := conn.DescribeDBInstances(&opts) - if err != nil { - if isAWSErr(err, rds.ErrCodeDBInstanceNotFoundFault, "") { - return nil, nil - } - return nil, fmt.Errorf("Error retrieving DB Instances: %s", err) - } - - if len(resp.DBInstances) != 1 || - *resp.DBInstances[0].DBInstanceIdentifier != id { - if err != nil { - return nil, nil - } - } - - return resp.DBInstances[0], nil -} - -func resourceAwsDbInstanceImport( - d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - // Neither skip_final_snapshot nor final_snapshot_identifier can be fetched - // from any API call, so we need to default skip_final_snapshot to true so - // that final_snapshot_identifier is not required - d.Set("skip_final_snapshot", true) - return []*schema.ResourceData{d}, nil -} - -func resourceAwsDbInstanceStateRefreshFunc(id string, conn *rds.RDS) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - v, err := resourceAwsDbInstanceRetrieve(id, conn) - - if err != nil { - log.Printf("Error on retrieving DB Instance when waiting: %s", err) - return nil, "", err - } - - if v == nil { - return nil, "", nil - } - - if v.DBInstanceStatus != nil { - log.Printf("[DEBUG] DB Instance status for instance %s: %s", id, *v.DBInstanceStatus) - } - - return v, *v.DBInstanceStatus, nil - } -} - -func buildCloudwatchLogsExportConfiguration(d *schema.ResourceData) *rds.CloudwatchLogsExportConfiguration { - - oraw, nraw := d.GetChange("enabled_cloudwatch_logs_exports") - o := oraw.([]interface{}) - n := nraw.([]interface{}) - - create, disable := diffCloudwatchLogsExportConfiguration(o, n) - - return &rds.CloudwatchLogsExportConfiguration{ - EnableLogTypes: expandStringList(create), - DisableLogTypes: expandStringList(disable), - } -} - -func diffCloudwatchLogsExportConfiguration(old, new []interface{}) ([]interface{}, []interface{}) { - create := make([]interface{}, 0) - disable := make([]interface{}, 0) - - for _, n := range new { - if _, contains := sliceContainsString(old, n.(string)); !contains { - create = append(create, n) - } - } - - for _, o := range old { - if _, contains := sliceContainsString(new, o.(string)); !contains { - disable = append(disable, o) - } - } - - return create, disable -} - -// Database instance status: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Status.html -var resourceAwsDbInstanceCreatePendingStates = []string{ - "backing-up", - "configuring-enhanced-monitoring", - "configuring-iam-database-auth", - "configuring-log-exports", - "creating", - "maintenance", - "modifying", - "rebooting", - "renaming", - "resetting-master-credentials", - "starting", - "stopping", - "upgrading", -} - -var resourceAwsDbInstanceDeletePendingStates = []string{ - "available", - "backing-up", - "configuring-enhanced-monitoring", - "configuring-log-exports", - "creating", - "deleting", - "incompatible-parameters", - "modifying", - "starting", - "stopping", - "storage-full", - "storage-optimization", -} - -var resourceAwsDbInstanceUpdatePendingStates = []string{ - "backing-up", - "configuring-enhanced-monitoring", - "configuring-iam-database-auth", - "configuring-log-exports", - "creating", - "maintenance", - "modifying", - "moving-to-vpc", - "rebooting", - "renaming", - "resetting-master-credentials", - "starting", - "stopping", - "storage-full", - "upgrading", -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_option_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_option_group.go deleted file mode 100644 index af9605475..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_option_group.go +++ /dev/null @@ -1,363 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDbOptionGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDbOptionGroupCreate, - Read: resourceAwsDbOptionGroupRead, - Update: resourceAwsDbOptionGroupUpdate, - Delete: resourceAwsDbOptionGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Delete: schema.DefaultTimeout(15 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateDbOptionGroupName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateDbOptionGroupNamePrefix, - }, - "engine_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "major_engine_version": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "option_group_description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "Managed by Terraform", - }, - - "option": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "option_name": { - Type: schema.TypeString, - Required: true, - }, - "option_settings": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "port": { - Type: schema.TypeInt, - Optional: true, - }, - "db_security_group_memberships": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "vpc_security_group_memberships": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "version": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - Set: resourceAwsDbOptionHash, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsDbOptionGroupCreate(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 { - groupName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - groupName = resource.PrefixedUniqueId(v.(string)) - } else { - groupName = resource.UniqueId() - } - - createOpts := &rds.CreateOptionGroupInput{ - EngineName: aws.String(d.Get("engine_name").(string)), - MajorEngineVersion: aws.String(d.Get("major_engine_version").(string)), - OptionGroupDescription: aws.String(d.Get("option_group_description").(string)), - OptionGroupName: aws.String(groupName), - Tags: tags, - } - - log.Printf("[DEBUG] Create DB Option Group: %#v", createOpts) - output, err := rdsconn.CreateOptionGroup(createOpts) - if err != nil { - return fmt.Errorf("Error creating DB Option Group: %s", err) - } - - d.SetId(strings.ToLower(groupName)) - log.Printf("[INFO] DB Option Group ID: %s", d.Id()) - - // Set for update - d.Set("arn", output.OptionGroup.OptionGroupArn) - - return resourceAwsDbOptionGroupUpdate(d, meta) -} - -func resourceAwsDbOptionGroupRead(d *schema.ResourceData, meta interface{}) error { - rdsconn := meta.(*AWSClient).rdsconn - params := &rds.DescribeOptionGroupsInput{ - OptionGroupName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Describe DB Option Group: %#v", params) - options, err := rdsconn.DescribeOptionGroups(params) - - if isAWSErr(err, rds.ErrCodeOptionGroupNotFoundFault, "") { - log.Printf("[WARN] RDS Option Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("Error Describing DB Option Group: %s", err) - } - - var option *rds.OptionGroup - for _, ogl := range options.OptionGroupsList { - if *ogl.OptionGroupName == d.Id() { - option = ogl - break - } - } - - if option == nil { - log.Printf("[WARN] RDS Option Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("arn", option.OptionGroupArn) - d.Set("name", option.OptionGroupName) - d.Set("major_engine_version", option.MajorEngineVersion) - d.Set("engine_name", option.EngineName) - d.Set("option_group_description", option.OptionGroupDescription) - - if err := d.Set("option", flattenOptions(option.Options, expandOptionConfiguration(d.Get("option").(*schema.Set).List()))); err != nil { - return fmt.Errorf("error setting option: %s", err) - } - - resp, err := rdsconn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: option.OptionGroupArn, - }) - - if err != nil { - return fmt.Errorf("error listing tags for RDS Option Group (%s): %s", d.Id(), err) - } - - if err := d.Set("tags", tagsToMapRDS(resp.TagList)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func optionInList(optionName string, list []*string) bool { - for _, opt := range list { - if *opt == optionName { - return true - } - } - return false -} - -func resourceAwsDbOptionGroupUpdate(d *schema.ResourceData, meta interface{}) error { - rdsconn := meta.(*AWSClient).rdsconn - if d.HasChange("option") { - o, n := d.GetChange("option") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - optionsToInclude := expandOptionConfiguration(ns.Difference(os).List()) - optionsToIncludeNames := flattenOptionNames(ns.Difference(os).List()) - optionsToRemove := []*string{} - optionsToRemoveNames := flattenOptionNames(os.Difference(ns).List()) - - for _, optionToRemoveName := range optionsToRemoveNames { - if optionInList(*optionToRemoveName, optionsToIncludeNames) { - continue - } - optionsToRemove = append(optionsToRemove, optionToRemoveName) - } - - // Ensure there is actually something to update - // InvalidParameterValue: At least one option must be added, modified, or removed. - if len(optionsToInclude) > 0 || len(optionsToRemove) > 0 { - modifyOpts := &rds.ModifyOptionGroupInput{ - OptionGroupName: aws.String(d.Id()), - ApplyImmediately: aws.Bool(true), - } - - if len(optionsToInclude) > 0 { - modifyOpts.OptionsToInclude = optionsToInclude - } - - if len(optionsToRemove) > 0 { - modifyOpts.OptionsToRemove = optionsToRemove - } - - log.Printf("[DEBUG] Modify DB Option Group: %s", modifyOpts) - - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var err error - - _, err = rdsconn.ModifyOptionGroup(modifyOpts) - if err != nil { - // InvalidParameterValue: IAM role ARN value is invalid or does not include the required permissions for: SQLSERVER_BACKUP_RESTORE - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return fmt.Errorf("Error modifying DB Option Group: %s", err) - } - d.SetPartial("option") - } - } - - if err := setTagsRDS(rdsconn, d, d.Get("arn").(string)); err != nil { - return err - } else { - d.SetPartial("tags") - } - - return resourceAwsDbOptionGroupRead(d, meta) -} - -func resourceAwsDbOptionGroupDelete(d *schema.ResourceData, meta interface{}) error { - rdsconn := meta.(*AWSClient).rdsconn - - deleteOpts := &rds.DeleteOptionGroupInput{ - OptionGroupName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Delete DB Option Group: %#v", deleteOpts) - ret := resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { - _, err := rdsconn.DeleteOptionGroup(deleteOpts) - if err != nil { - if isAWSErr(err, rds.ErrCodeInvalidOptionGroupStateFault, "") { - log.Printf("[DEBUG] AWS believes the RDS Option Group is still in use, retrying") - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if ret != nil { - return fmt.Errorf("Error Deleting DB Option Group: %s", ret) - } - return nil -} - -func flattenOptionNames(configured []interface{}) []*string { - var optionNames []*string - for _, pRaw := range configured { - data := pRaw.(map[string]interface{}) - optionNames = append(optionNames, aws.String(data["option_name"].(string))) - } - - return optionNames -} - -func resourceAwsDbOptionHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["option_name"].(string))) - if _, ok := m["port"]; ok { - buf.WriteString(fmt.Sprintf("%d-", m["port"].(int))) - } - - for _, oRaw := range m["option_settings"].(*schema.Set).List() { - o := oRaw.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", o["name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", o["value"].(string))) - } - - for _, vpcRaw := range m["vpc_security_group_memberships"].(*schema.Set).List() { - buf.WriteString(fmt.Sprintf("%s-", vpcRaw.(string))) - } - - for _, sgRaw := range m["db_security_group_memberships"].(*schema.Set).List() { - buf.WriteString(fmt.Sprintf("%s-", sgRaw.(string))) - } - - if v, ok := m["version"]; ok && v.(string) != "" { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_parameter_group.go deleted file mode 100644 index e95d0b4d4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_parameter_group.go +++ /dev/null @@ -1,340 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "strings" - "time" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/rds" -) - -func resourceAwsDbParameterGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDbParameterGroupCreate, - Read: resourceAwsDbParameterGroupRead, - Update: resourceAwsDbParameterGroupUpdate, - Delete: resourceAwsDbParameterGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateDbParamGroupName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateDbParamGroupNamePrefix, - }, - "family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "Managed by Terraform", - }, - "parameter": { - Type: schema.TypeSet, - Optional: true, - ForceNew: false, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - "apply_method": { - Type: schema.TypeString, - Optional: true, - Default: "immediate", - }, - }, - }, - Set: resourceAwsDbParameterHash, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsDbParameterGroupCreate(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 { - groupName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - groupName = resource.PrefixedUniqueId(v.(string)) - } else { - groupName = resource.UniqueId() - } - d.Set("name", groupName) - - createOpts := rds.CreateDBParameterGroupInput{ - DBParameterGroupName: aws.String(groupName), - DBParameterGroupFamily: aws.String(d.Get("family").(string)), - Description: aws.String(d.Get("description").(string)), - Tags: tags, - } - - log.Printf("[DEBUG] Create DB Parameter Group: %#v", createOpts) - resp, err := rdsconn.CreateDBParameterGroup(&createOpts) - if err != nil { - return fmt.Errorf("Error creating DB Parameter Group: %s", err) - } - - d.Partial(true) - d.SetPartial("name") - d.SetPartial("family") - d.SetPartial("description") - d.Partial(false) - - d.SetId(aws.StringValue(resp.DBParameterGroup.DBParameterGroupName)) - d.Set("arn", resp.DBParameterGroup.DBParameterGroupArn) - log.Printf("[INFO] DB Parameter Group ID: %s", d.Id()) - - return resourceAwsDbParameterGroupUpdate(d, meta) -} - -func resourceAwsDbParameterGroupRead(d *schema.ResourceData, meta interface{}) error { - rdsconn := meta.(*AWSClient).rdsconn - - describeOpts := rds.DescribeDBParameterGroupsInput{ - DBParameterGroupName: aws.String(d.Id()), - } - - describeResp, err := rdsconn.DescribeDBParameterGroups(&describeOpts) - if err != nil { - if isAWSErr(err, rds.ErrCodeDBParameterGroupNotFoundFault, "") { - log.Printf("[WARN] DB Parameter Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - if len(describeResp.DBParameterGroups) != 1 || - *describeResp.DBParameterGroups[0].DBParameterGroupName != d.Id() { - return fmt.Errorf("Unable to find Parameter Group: %#v", describeResp.DBParameterGroups) - } - - d.Set("name", describeResp.DBParameterGroups[0].DBParameterGroupName) - d.Set("family", describeResp.DBParameterGroups[0].DBParameterGroupFamily) - d.Set("description", describeResp.DBParameterGroups[0].Description) - - configParams := d.Get("parameter").(*schema.Set) - describeParametersOpts := rds.DescribeDBParametersInput{ - DBParameterGroupName: aws.String(d.Id()), - } - if configParams.Len() < 1 { - // if we don't have any params in the ResourceData already, two possibilities - // first, we don't have a config available to us. Second, we do, but it has - // no parameters. We're going to assume the first, to be safe. In this case, - // we're only going to ask for the user-modified values, because any defaults - // the user may have _also_ set are indistinguishable from the hundreds of - // defaults AWS sets. If the user hasn't set any parameters, this will return - // an empty list anyways, so we just make some unnecessary requests. But in - // the more common case (I assume) of an import, this will make fewer requests - // and "do the right thing". - describeParametersOpts.Source = aws.String("user") - } - - var parameters []*rds.Parameter - err = rdsconn.DescribeDBParametersPages(&describeParametersOpts, - func(describeParametersResp *rds.DescribeDBParametersOutput, lastPage bool) bool { - parameters = append(parameters, describeParametersResp.Parameters...) - return !lastPage - }) - if err != nil { - return err - } - - var userParams []*rds.Parameter - if configParams.Len() < 1 { - // if we have no config/no parameters in config, we've already asked for only - // user-modified values, so we can just use the entire response. - userParams = parameters - } else { - // if we have a config available to us, we have two possible classes of value - // in the config. On the one hand, the user could have specified a parameter - // that _actually_ changed things, in which case its Source would be set to - // user. On the other, they may have specified a parameter that coincides with - // the default value. In that case, the Source will be set to "system" or - // "engine-default". We need to set the union of all "user" Source parameters - // _and_ the "system"/"engine-default" Source parameters _that appear in the - // config_ in the state, or the user gets a perpetual diff. See - // terraform-providers/terraform-provider-aws#593 for more context and details. - confParams, err := expandParameters(configParams.List()) - if err != nil { - return err - } - for _, param := range parameters { - if param.Source == nil || param.ParameterName == nil { - continue - } - if *param.Source == "user" { - userParams = append(userParams, param) - continue - } - var paramFound bool - for _, cp := range confParams { - if cp.ParameterName == nil { - continue - } - if *cp.ParameterName == *param.ParameterName { - userParams = append(userParams, param) - break - } - } - if !paramFound { - log.Printf("[DEBUG] Not persisting %s to state, as its source is %q and it isn't in the config", *param.ParameterName, *param.Source) - } - } - } - - err = d.Set("parameter", flattenParameters(userParams)) - if err != nil { - return fmt.Errorf("error setting 'parameter' in state: %#v", err) - } - - arn := aws.StringValue(describeResp.DBParameterGroups[0].DBParameterGroupArn) - d.Set("arn", arn) - - resp, err := rdsconn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) - } - - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - d.Set("tags", tagsToMapRDS(dt)) - - return nil -} - -func resourceAwsDbParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { - rdsconn := meta.(*AWSClient).rdsconn - - d.Partial(true) - - if d.HasChange("parameter") { - o, n := d.GetChange("parameter") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - // Expand the "parameter" set to aws-sdk-go compat []rds.Parameter - parameters, err := expandParameters(ns.Difference(os).List()) - if err != nil { - return err - } - - if len(parameters) > 0 { - // We can only modify 20 parameters at a time, so walk them until - // we've got them all. - maxParams := 20 - for parameters != nil { - var paramsToModify []*rds.Parameter - if len(parameters) <= maxParams { - paramsToModify, parameters = parameters[:], nil - } else { - paramsToModify, parameters = parameters[:maxParams], parameters[maxParams:] - } - modifyOpts := rds.ModifyDBParameterGroupInput{ - DBParameterGroupName: aws.String(d.Get("name").(string)), - Parameters: paramsToModify, - } - - log.Printf("[DEBUG] Modify DB Parameter Group: %s", modifyOpts) - _, err = rdsconn.ModifyDBParameterGroup(&modifyOpts) - if err != nil { - return fmt.Errorf("Error modifying DB Parameter Group: %s", err) - } - } - d.SetPartial("parameter") - } - } - - if err := setTagsRDS(rdsconn, d, d.Get("arn").(string)); err != nil { - return err - } else { - d.SetPartial("tags") - } - - d.Partial(false) - - return resourceAwsDbParameterGroupRead(d, meta) -} - -func resourceAwsDbParameterGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - return resource.Retry(3*time.Minute, func() *resource.RetryError { - deleteOpts := rds.DeleteDBParameterGroupInput{ - DBParameterGroupName: aws.String(d.Id()), - } - - _, err := conn.DeleteDBParameterGroup(&deleteOpts) - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "DBParameterGroupNotFoundFault" { - return resource.RetryableError(err) - } - if ok && awsErr.Code() == "InvalidDBParameterGroupState" { - return resource.RetryableError(err) - } - } - return resource.NonRetryableError(err) - }) -} - -func resourceAwsDbParameterHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) - // Store the value as a lower case string, to match how we store them in flattenParameters - buf.WriteString(fmt.Sprintf("%s-", strings.ToLower(m["value"].(string)))) - - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_security_group.go deleted file mode 100644 index 04d4ef1f9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_security_group.go +++ /dev/null @@ -1,413 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - - "github.com/hashicorp/go-multierror" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDbSecurityGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDbSecurityGroupCreate, - Read: resourceAwsDbSecurityGroupRead, - Update: resourceAwsDbSecurityGroupUpdate, - Delete: resourceAwsDbSecurityGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "Managed by Terraform", - }, - - "ingress": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cidr": { - Type: schema.TypeString, - Optional: true, - }, - - "security_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "security_group_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "security_group_owner_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - }, - Set: resourceAwsDbSecurityGroupIngressHash, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsDbSecurityGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - tags := tagsFromMapRDS(d.Get("tags").(map[string]interface{})) - - var err error - var errs []error - - opts := rds.CreateDBSecurityGroupInput{ - DBSecurityGroupName: aws.String(d.Get("name").(string)), - DBSecurityGroupDescription: aws.String(d.Get("description").(string)), - Tags: tags, - } - - log.Printf("[DEBUG] DB Security Group create configuration: %#v", opts) - _, err = conn.CreateDBSecurityGroup(&opts) - if err != nil { - return fmt.Errorf("Error creating DB Security Group: %s", err) - } - - d.SetId(d.Get("name").(string)) - - log.Printf("[INFO] DB Security Group ID: %s", d.Id()) - - sg, err := resourceAwsDbSecurityGroupRetrieve(d, meta) - if err != nil { - return err - } - - ingresses := d.Get("ingress").(*schema.Set) - for _, ing := range ingresses.List() { - err := resourceAwsDbSecurityGroupAuthorizeRule(ing, *sg.DBSecurityGroupName, conn) - if err != nil { - errs = append(errs, err) - } - } - - if len(errs) > 0 { - return &multierror.Error{Errors: errs} - } - - log.Println( - "[INFO] Waiting for Ingress Authorizations to be authorized") - - stateConf := &resource.StateChangeConf{ - Pending: []string{"authorizing"}, - Target: []string{"authorized"}, - Refresh: resourceAwsDbSecurityGroupStateRefreshFunc(d, meta), - Timeout: 10 * time.Minute, - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsDbSecurityGroupRead(d, meta) -} - -func resourceAwsDbSecurityGroupRead(d *schema.ResourceData, meta interface{}) error { - sg, err := resourceAwsDbSecurityGroupRetrieve(d, meta) - if err != nil { - return err - } - - d.Set("name", sg.DBSecurityGroupName) - d.Set("description", sg.DBSecurityGroupDescription) - - // Create an empty schema.Set to hold all ingress rules - rules := &schema.Set{ - F: resourceAwsDbSecurityGroupIngressHash, - } - - for _, v := range sg.IPRanges { - rule := map[string]interface{}{"cidr": *v.CIDRIP} - rules.Add(rule) - } - - for _, g := range sg.EC2SecurityGroups { - rule := map[string]interface{}{} - if g.EC2SecurityGroupId != nil { - rule["security_group_id"] = *g.EC2SecurityGroupId - } - if g.EC2SecurityGroupName != nil { - rule["security_group_name"] = *g.EC2SecurityGroupName - } - if g.EC2SecurityGroupOwnerId != nil { - rule["security_group_owner_id"] = *g.EC2SecurityGroupOwnerId - } - rules.Add(rule) - } - - d.Set("ingress", rules) - - conn := meta.(*AWSClient).rdsconn - - arn := aws.StringValue(sg.DBSecurityGroupArn) - d.Set("arn", arn) - resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) - } - - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - d.Set("tags", tagsToMapRDS(dt)) - - return nil -} - -func resourceAwsDbSecurityGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - d.Partial(true) - - if err := setTagsRDS(conn, d, d.Get("arn").(string)); err != nil { - return err - } else { - d.SetPartial("tags") - } - - if d.HasChange("ingress") { - sg, err := resourceAwsDbSecurityGroupRetrieve(d, meta) - if err != nil { - return err - } - - oi, ni := d.GetChange("ingress") - if oi == nil { - oi = new(schema.Set) - } - if ni == nil { - ni = new(schema.Set) - } - - ois := oi.(*schema.Set) - nis := ni.(*schema.Set) - removeIngress := ois.Difference(nis).List() - newIngress := nis.Difference(ois).List() - - // DELETE old Ingress rules - for _, ing := range removeIngress { - err := resourceAwsDbSecurityGroupRevokeRule(ing, *sg.DBSecurityGroupName, conn) - if err != nil { - return err - } - } - - // ADD new/updated Ingress rules - for _, ing := range newIngress { - err := resourceAwsDbSecurityGroupAuthorizeRule(ing, *sg.DBSecurityGroupName, conn) - if err != nil { - return err - } - } - } - d.Partial(false) - - return resourceAwsDbSecurityGroupRead(d, meta) -} - -func resourceAwsDbSecurityGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - log.Printf("[DEBUG] DB Security Group destroy: %v", d.Id()) - - opts := rds.DeleteDBSecurityGroupInput{DBSecurityGroupName: aws.String(d.Id())} - - log.Printf("[DEBUG] DB Security Group destroy configuration: %v", opts) - _, err := conn.DeleteDBSecurityGroup(&opts) - - if err != nil { - if isAWSErr(err, "InvalidDBSecurityGroup.NotFound", "") { - return nil - } - return err - } - - return nil -} - -func resourceAwsDbSecurityGroupRetrieve(d *schema.ResourceData, meta interface{}) (*rds.DBSecurityGroup, error) { - conn := meta.(*AWSClient).rdsconn - - opts := rds.DescribeDBSecurityGroupsInput{ - DBSecurityGroupName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] DB Security Group describe configuration: %#v", opts) - - resp, err := conn.DescribeDBSecurityGroups(&opts) - - if err != nil { - return nil, fmt.Errorf("Error retrieving DB Security Groups: %s", err) - } - - if len(resp.DBSecurityGroups) != 1 || - *resp.DBSecurityGroups[0].DBSecurityGroupName != d.Id() { - return nil, fmt.Errorf("Unable to find DB Security Group: %#v", resp.DBSecurityGroups) - } - - return resp.DBSecurityGroups[0], nil -} - -// Authorizes the ingress rule on the db security group -func resourceAwsDbSecurityGroupAuthorizeRule(ingress interface{}, dbSecurityGroupName string, conn *rds.RDS) error { - ing := ingress.(map[string]interface{}) - - opts := rds.AuthorizeDBSecurityGroupIngressInput{ - DBSecurityGroupName: aws.String(dbSecurityGroupName), - } - - if attr, ok := ing["cidr"]; ok && attr != "" { - opts.CIDRIP = aws.String(attr.(string)) - } - - if attr, ok := ing["security_group_name"]; ok && attr != "" { - opts.EC2SecurityGroupName = aws.String(attr.(string)) - } - - if attr, ok := ing["security_group_id"]; ok && attr != "" { - opts.EC2SecurityGroupId = aws.String(attr.(string)) - } - - if attr, ok := ing["security_group_owner_id"]; ok && attr != "" { - opts.EC2SecurityGroupOwnerId = aws.String(attr.(string)) - } - - log.Printf("[DEBUG] Authorize ingress rule configuration: %#v", opts) - - _, err := conn.AuthorizeDBSecurityGroupIngress(&opts) - - if err != nil { - return fmt.Errorf("Error authorizing security group ingress: %s", err) - } - - return nil -} - -// Revokes the ingress rule on the db security group -func resourceAwsDbSecurityGroupRevokeRule(ingress interface{}, dbSecurityGroupName string, conn *rds.RDS) error { - ing := ingress.(map[string]interface{}) - - opts := rds.RevokeDBSecurityGroupIngressInput{ - DBSecurityGroupName: aws.String(dbSecurityGroupName), - } - - if attr, ok := ing["cidr"]; ok && attr != "" { - opts.CIDRIP = aws.String(attr.(string)) - } - - if attr, ok := ing["security_group_name"]; ok && attr != "" { - opts.EC2SecurityGroupName = aws.String(attr.(string)) - } - - if attr, ok := ing["security_group_id"]; ok && attr != "" { - opts.EC2SecurityGroupId = aws.String(attr.(string)) - } - - if attr, ok := ing["security_group_owner_id"]; ok && attr != "" { - opts.EC2SecurityGroupOwnerId = aws.String(attr.(string)) - } - - log.Printf("[DEBUG] Revoking ingress rule configuration: %#v", opts) - - _, err := conn.RevokeDBSecurityGroupIngress(&opts) - - if err != nil { - return fmt.Errorf("Error revoking security group ingress: %s", err) - } - - return nil -} - -func resourceAwsDbSecurityGroupIngressHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - if v, ok := m["cidr"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["security_group_name"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["security_group_id"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["security_group_owner_id"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - return hashcode.String(buf.String()) -} - -func resourceAwsDbSecurityGroupStateRefreshFunc( - d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - v, err := resourceAwsDbSecurityGroupRetrieve(d, meta) - - if err != nil { - log.Printf("Error on retrieving DB Security Group when waiting: %s", err) - return nil, "", err - } - - statuses := make([]string, 0, len(v.EC2SecurityGroups)+len(v.IPRanges)) - for _, ec2g := range v.EC2SecurityGroups { - statuses = append(statuses, *ec2g.Status) - } - for _, ips := range v.IPRanges { - statuses = append(statuses, *ips.Status) - } - - for _, stat := range statuses { - // Not done - if stat != "authorized" { - return nil, "authorizing", nil - } - } - - return v, "authorized", nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_snapshot.go deleted file mode 100644 index 5bf584451..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_snapshot.go +++ /dev/null @@ -1,261 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDbSnapshot() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDbSnapshotCreate, - Read: resourceAwsDbSnapshotRead, - Update: resourceAwsDbSnapshotUpdate, - Delete: resourceAwsDbSnapshotDelete, - - Timeouts: &schema.ResourceTimeout{ - Read: schema.DefaultTimeout(20 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "db_snapshot_identifier": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "db_instance_identifier": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "allocated_storage": { - Type: schema.TypeInt, - Computed: true, - }, - "availability_zone": { - Type: schema.TypeString, - Computed: true, - }, - "db_snapshot_arn": { - Type: schema.TypeString, - Computed: true, - }, - "encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - "engine": { - Type: schema.TypeString, - Computed: true, - }, - "engine_version": { - Type: schema.TypeString, - Computed: true, - }, - "iops": { - Type: schema.TypeInt, - Computed: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "license_model": { - Type: schema.TypeString, - Computed: true, - }, - "option_group_name": { - Type: schema.TypeString, - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Computed: true, - }, - "source_db_snapshot_identifier": { - Type: schema.TypeString, - Computed: true, - }, - "source_region": { - Type: schema.TypeString, - Computed: true, - }, - "snapshot_type": { - Type: schema.TypeString, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "storage_type": { - Type: schema.TypeString, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsDbSnapshotCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - tags := tagsFromMapRDS(d.Get("tags").(map[string]interface{})) - - params := &rds.CreateDBSnapshotInput{ - DBInstanceIdentifier: aws.String(d.Get("db_instance_identifier").(string)), - DBSnapshotIdentifier: aws.String(d.Get("db_snapshot_identifier").(string)), - Tags: tags, - } - - _, err := conn.CreateDBSnapshot(params) - if err != nil { - return err - } - d.SetId(d.Get("db_snapshot_identifier").(string)) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating"}, - Target: []string{"available"}, - Refresh: resourceAwsDbSnapshotStateRefreshFunc(d, meta), - Timeout: d.Timeout(schema.TimeoutRead), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsDbSnapshotRead(d, meta) -} - -func resourceAwsDbSnapshotRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - params := &rds.DescribeDBSnapshotsInput{ - DBSnapshotIdentifier: aws.String(d.Id()), - } - resp, err := conn.DescribeDBSnapshots(params) - if err != nil { - return err - } - - snapshot := resp.DBSnapshots[0] - - d.Set("allocated_storage", snapshot.AllocatedStorage) - d.Set("availability_zone", snapshot.AvailabilityZone) - d.Set("db_snapshot_arn", snapshot.DBSnapshotArn) - d.Set("encrypted", snapshot.Encrypted) - d.Set("engine", snapshot.Engine) - d.Set("engine_version", snapshot.EngineVersion) - d.Set("iops", snapshot.Iops) - d.Set("kms_key_id", snapshot.KmsKeyId) - d.Set("license_model", snapshot.LicenseModel) - d.Set("option_group_name", snapshot.OptionGroupName) - d.Set("port", snapshot.Port) - d.Set("source_db_snapshot_identifier", snapshot.SourceDBSnapshotIdentifier) - d.Set("source_region", snapshot.SourceRegion) - d.Set("snapshot_type", snapshot.SnapshotType) - d.Set("status", snapshot.Status) - d.Set("vpc_id", snapshot.VpcId) - if err := saveTagsRDS(conn, d, aws.StringValue(snapshot.DBSnapshotArn)); err != nil { - log.Printf("[WARN] Failed to save tags for RDS Snapshot (%s): %s", d.Id(), err) - } - - return nil -} - -func resourceAwsDbSnapshotDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - params := &rds.DeleteDBSnapshotInput{ - DBSnapshotIdentifier: aws.String(d.Id()), - } - _, err := conn.DeleteDBSnapshot(params) - return err -} - -func resourceAwsDbSnapshotUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - arn := d.Get("db_snapshot_arn").(string) - if d.HasChange("tags") { - oldTagsRaw, newTagsRaw := d.GetChange("tags") - oldTagsMap := oldTagsRaw.(map[string]interface{}) - newTagsMap := newTagsRaw.(map[string]interface{}) - createTags, removeTags := diffTagsRDS(tagsFromMapRDS(oldTagsMap), tagsFromMapRDS(newTagsMap)) - - if len(removeTags) > 0 { - removeTagKeys := make([]*string, len(removeTags)) - for i, removeTag := range removeTags { - removeTagKeys[i] = removeTag.Key - } - - input := &rds.RemoveTagsFromResourceInput{ - ResourceName: aws.String(arn), - TagKeys: removeTagKeys, - } - - log.Printf("[DEBUG] Untagging RDS Cluster: %s", input) - if _, err := conn.RemoveTagsFromResource(input); err != nil { - return fmt.Errorf("error untagging RDS Cluster (%s): %s", d.Id(), err) - } - } - - if len(createTags) > 0 { - input := &rds.AddTagsToResourceInput{ - ResourceName: aws.String(arn), - Tags: createTags, - } - - log.Printf("[DEBUG] Tagging RDS Cluster: %s", input) - if _, err := conn.AddTagsToResource(input); err != nil { - return fmt.Errorf("error tagging RDS Cluster (%s): %s", d.Id(), err) - } - } - } - - return nil -} - -func resourceAwsDbSnapshotStateRefreshFunc( - d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - conn := meta.(*AWSClient).rdsconn - - opts := &rds.DescribeDBSnapshotsInput{ - DBSnapshotIdentifier: aws.String(d.Id()), - } - - log.Printf("[DEBUG] DB Snapshot describe configuration: %#v", opts) - - resp, err := conn.DescribeDBSnapshots(opts) - if err != nil { - snapshoterr, ok := err.(awserr.Error) - if ok && snapshoterr.Code() == "DBSnapshotNotFound" { - return nil, "", nil - } - return nil, "", fmt.Errorf("Error retrieving DB Snapshots: %s", err) - } - - if len(resp.DBSnapshots) != 1 { - return nil, "", fmt.Errorf("No snapshots returned for %s", d.Id()) - } - - snapshot := resp.DBSnapshots[0] - - return resp, *snapshot.Status, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_subnet_group.go deleted file mode 100644 index fef3518e9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_subnet_group.go +++ /dev/null @@ -1,243 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/rds" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDbSubnetGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDbSubnetGroupCreate, - Read: resourceAwsDbSubnetGroupRead, - Update: resourceAwsDbSubnetGroupUpdate, - Delete: resourceAwsDbSubnetGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateDbSubnetGroupName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateDbSubnetGroupNamePrefix, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - Default: "Managed by Terraform", - }, - - "subnet_ids": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsDbSubnetGroupCreate(d *schema.ResourceData, meta interface{}) error { - rdsconn := meta.(*AWSClient).rdsconn - tags := tagsFromMapRDS(d.Get("tags").(map[string]interface{})) - - subnetIdsSet := d.Get("subnet_ids").(*schema.Set) - subnetIds := make([]*string, subnetIdsSet.Len()) - for i, subnetId := range subnetIdsSet.List() { - subnetIds[i] = aws.String(subnetId.(string)) - } - - var groupName string - if v, ok := d.GetOk("name"); ok { - groupName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - groupName = resource.PrefixedUniqueId(v.(string)) - } else { - groupName = resource.UniqueId() - } - - createOpts := rds.CreateDBSubnetGroupInput{ - DBSubnetGroupName: aws.String(groupName), - DBSubnetGroupDescription: aws.String(d.Get("description").(string)), - SubnetIds: subnetIds, - Tags: tags, - } - - log.Printf("[DEBUG] Create DB Subnet Group: %#v", createOpts) - _, err := rdsconn.CreateDBSubnetGroup(&createOpts) - if err != nil { - return fmt.Errorf("Error creating DB Subnet Group: %s", err) - } - - d.SetId(*createOpts.DBSubnetGroupName) - log.Printf("[INFO] DB Subnet Group ID: %s", d.Id()) - return resourceAwsDbSubnetGroupRead(d, meta) -} - -func resourceAwsDbSubnetGroupRead(d *schema.ResourceData, meta interface{}) error { - rdsconn := meta.(*AWSClient).rdsconn - - describeOpts := rds.DescribeDBSubnetGroupsInput{ - DBSubnetGroupName: aws.String(d.Id()), - } - - describeResp, err := rdsconn.DescribeDBSubnetGroups(&describeOpts) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "DBSubnetGroupNotFoundFault" { - // Update state to indicate the db subnet no longer exists. - d.SetId("") - return nil - } - return err - } - - if len(describeResp.DBSubnetGroups) == 0 { - return fmt.Errorf("Unable to find DB Subnet Group: %#v", describeResp.DBSubnetGroups) - } - - var subnetGroup *rds.DBSubnetGroup - for _, s := range describeResp.DBSubnetGroups { - // AWS is down casing the name provided, so we compare lower case versions - // of the names. We lower case both our name and their name in the check, - // incase they change that someday. - if strings.EqualFold(d.Id(), *s.DBSubnetGroupName) { - subnetGroup = describeResp.DBSubnetGroups[0] - } - } - - if subnetGroup.DBSubnetGroupName == nil { - return fmt.Errorf("Unable to find DB Subnet Group: %#v", describeResp.DBSubnetGroups) - } - - d.Set("name", subnetGroup.DBSubnetGroupName) - d.Set("description", subnetGroup.DBSubnetGroupDescription) - - subnets := make([]string, 0, len(subnetGroup.Subnets)) - for _, s := range subnetGroup.Subnets { - subnets = append(subnets, *s.SubnetIdentifier) - } - d.Set("subnet_ids", subnets) - - // list tags for resource - // set tags - conn := meta.(*AWSClient).rdsconn - - arn := aws.StringValue(subnetGroup.DBSubnetGroupArn) - d.Set("arn", arn) - resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - - if err != nil { - log.Printf("[DEBUG] Error retreiving tags for ARN: %s", arn) - } - - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - d.Set("tags", tagsToMapRDS(dt)) - - return nil -} - -func resourceAwsDbSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - if d.HasChange("subnet_ids") || d.HasChange("description") { - _, n := d.GetChange("subnet_ids") - if n == nil { - n = new(schema.Set) - } - ns := n.(*schema.Set) - - var sIds []*string - for _, s := range ns.List() { - sIds = append(sIds, aws.String(s.(string))) - } - - _, err := conn.ModifyDBSubnetGroup(&rds.ModifyDBSubnetGroupInput{ - DBSubnetGroupName: aws.String(d.Id()), - DBSubnetGroupDescription: aws.String(d.Get("description").(string)), - SubnetIds: sIds, - }) - - if err != nil { - return err - } - } - - arn := d.Get("arn").(string) - if err := setTagsRDS(conn, d, arn); err != nil { - return err - } else { - d.SetPartial("tags") - } - - return resourceAwsDbSubnetGroupRead(d, meta) -} - -func resourceAwsDbSubnetGroupDelete(d *schema.ResourceData, meta interface{}) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"destroyed"}, - Refresh: resourceAwsDbSubnetGroupDeleteRefreshFunc(d, meta), - Timeout: 3 * time.Minute, - MinTimeout: 1 * time.Second, - } - _, err := stateConf.WaitForState() - return err -} - -func resourceAwsDbSubnetGroupDeleteRefreshFunc( - d *schema.ResourceData, - meta interface{}) resource.StateRefreshFunc { - rdsconn := meta.(*AWSClient).rdsconn - - return func() (interface{}, string, error) { - - deleteOpts := rds.DeleteDBSubnetGroupInput{ - DBSubnetGroupName: aws.String(d.Id()), - } - - if _, err := rdsconn.DeleteDBSubnetGroup(&deleteOpts); err != nil { - rdserr, ok := err.(awserr.Error) - if !ok { - return d, "error", err - } - - if rdserr.Code() != "DBSubnetGroupNotFoundFault" { - return d, "error", err - } - } - - return d, "destroyed", nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go deleted file mode 100644 index e0a143ebd..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go +++ /dev/null @@ -1,299 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -// ACL Network ACLs all contain explicit deny-all rules that cannot be -// destroyed or changed by users. This rules are numbered very high to be a -// catch-all. -// See http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html#default-network-acl -const ( - awsDefaultAclRuleNumberIpv4 = 32767 - awsDefaultAclRuleNumberIpv6 = 32768 -) - -func resourceAwsDefaultNetworkAcl() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDefaultNetworkAclCreate, - // We reuse aws_network_acl's read method, the operations are the same - Read: resourceAwsNetworkAclRead, - Delete: resourceAwsDefaultNetworkAclDelete, - Update: resourceAwsDefaultNetworkAclUpdate, - - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - "default_network_acl_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - Computed: false, - }, - // We want explicit management of Subnets here, so we do not allow them to be - // computed. Instead, an empty config will enforce just that; removal of the - // any Subnets that have been assigned to the Default Network ACL. Because we - // can't actually remove them, this will be a continual plan until the - // Subnets are themselves destroyed or reassigned to a different Network - // ACL - "subnet_ids": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - // We want explicit management of Rules here, so we do not allow them to be - // computed. Instead, an empty config will enforce just that; removal of the - // rules - "ingress": { - Type: schema.TypeSet, - Required: false, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "from_port": { - Type: schema.TypeInt, - Required: true, - }, - "to_port": { - Type: schema.TypeInt, - Required: true, - }, - "rule_no": { - Type: schema.TypeInt, - Required: true, - }, - "action": { - Type: schema.TypeString, - Required: true, - }, - "protocol": { - Type: schema.TypeString, - Required: true, - }, - "cidr_block": { - Type: schema.TypeString, - Optional: true, - }, - "ipv6_cidr_block": { - Type: schema.TypeString, - Optional: true, - }, - "icmp_type": { - Type: schema.TypeInt, - Optional: true, - }, - "icmp_code": { - Type: schema.TypeInt, - Optional: true, - }, - }, - }, - Set: resourceAwsNetworkAclEntryHash, - }, - "egress": { - Type: schema.TypeSet, - Required: false, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "from_port": { - Type: schema.TypeInt, - Required: true, - }, - "to_port": { - Type: schema.TypeInt, - Required: true, - }, - "rule_no": { - Type: schema.TypeInt, - Required: true, - }, - "action": { - Type: schema.TypeString, - Required: true, - }, - "protocol": { - Type: schema.TypeString, - Required: true, - }, - "cidr_block": { - Type: schema.TypeString, - Optional: true, - }, - "ipv6_cidr_block": { - Type: schema.TypeString, - Optional: true, - }, - "icmp_type": { - Type: schema.TypeInt, - Optional: true, - }, - "icmp_code": { - Type: schema.TypeInt, - Optional: true, - }, - }, - }, - Set: resourceAwsNetworkAclEntryHash, - }, - - "tags": tagsSchema(), - - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsDefaultNetworkAclCreate(d *schema.ResourceData, meta interface{}) error { - d.SetId(d.Get("default_network_acl_id").(string)) - - // revoke all default and pre-existing rules on the default network acl. - // In the UPDATE method, we'll apply only the rules in the configuration. - log.Printf("[DEBUG] Revoking default ingress and egress rules for Default Network ACL for %s", d.Id()) - err := revokeAllNetworkACLEntries(d.Id(), meta) - if err != nil { - return err - } - - return resourceAwsDefaultNetworkAclUpdate(d, meta) -} - -func resourceAwsDefaultNetworkAclUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - d.Partial(true) - - if d.HasChange("ingress") { - err := updateNetworkAclEntries(d, "ingress", conn) - if err != nil { - return err - } - } - - if d.HasChange("egress") { - err := updateNetworkAclEntries(d, "egress", conn) - if err != nil { - return err - } - } - - if d.HasChange("subnet_ids") { - o, n := d.GetChange("subnet_ids") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - remove := os.Difference(ns).List() - add := ns.Difference(os).List() - - if len(remove) > 0 { - // - // NO-OP - // - // Subnets *must* belong to a Network ACL. Subnets are not "removed" from - // Network ACLs, instead their association is replaced. In a normal - // Network ACL, any removal of a Subnet is done by replacing the - // Subnet/ACL association with an association between the Subnet and the - // Default Network ACL. Because we're managing the default here, we cannot - // do that, so we simply log a NO-OP. In order to remove the Subnet here, - // it must be destroyed, or assigned to different Network ACL. Those - // operations are not handled here - log.Printf("[WARN] Cannot remove subnets from the Default Network ACL. They must be re-assigned or destroyed") - } - - if len(add) > 0 { - for _, a := range add { - association, err := findNetworkAclAssociation(a.(string), conn) - if err != nil { - return fmt.Errorf("Failed to find acl association: acl %s with subnet %s: %s", d.Id(), a, err) - } - log.Printf("[DEBUG] Updating Network Association for Default Network ACL (%s) and Subnet (%s)", d.Id(), a.(string)) - _, err = conn.ReplaceNetworkAclAssociation(&ec2.ReplaceNetworkAclAssociationInput{ - AssociationId: association.NetworkAclAssociationId, - NetworkAclId: aws.String(d.Id()), - }) - if err != nil { - return err - } - } - } - } - - if err := setTags(conn, d); err != nil { - return err - } else { - d.SetPartial("tags") - } - - d.Partial(false) - // Re-use the exiting Network ACL Resources READ method - return resourceAwsNetworkAclRead(d, meta) -} - -func resourceAwsDefaultNetworkAclDelete(d *schema.ResourceData, meta interface{}) error { - log.Printf("[WARN] Cannot destroy Default Network ACL. Terraform will remove this resource from the state file, however resources may remain.") - return nil -} - -// revokeAllNetworkACLEntries revoke all ingress and egress rules that the Default -// Network ACL currently has -func revokeAllNetworkACLEntries(netaclId string, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - resp, err := conn.DescribeNetworkAcls(&ec2.DescribeNetworkAclsInput{ - NetworkAclIds: []*string{aws.String(netaclId)}, - }) - - if err != nil { - log.Printf("[DEBUG] Error looking up Network ACL: %s", err) - return err - } - - if resp == nil { - return fmt.Errorf("Error looking up Default Network ACL Entries: No results") - } - - networkAcl := resp.NetworkAcls[0] - for _, e := range networkAcl.Entries { - // Skip the default rules added by AWS. They can be neither - // configured or deleted by users. See http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html#default-network-acl - if *e.RuleNumber == awsDefaultAclRuleNumberIpv4 || - *e.RuleNumber == awsDefaultAclRuleNumberIpv6 { - continue - } - - // track if this is an egress or ingress rule, for logging purposes - rt := "ingress" - if *e.Egress { - rt = "egress" - } - - log.Printf("[DEBUG] Destroying Network ACL (%s) Entry number (%d)", rt, int(*e.RuleNumber)) - _, err := conn.DeleteNetworkAclEntry(&ec2.DeleteNetworkAclEntryInput{ - NetworkAclId: aws.String(netaclId), - RuleNumber: e.RuleNumber, - Egress: e.Egress, - }) - if err != nil { - return fmt.Errorf("Error deleting entry (%s): %s", e, err) - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_route_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_route_table.go deleted file mode 100644 index 43e24fc22..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_route_table.go +++ /dev/null @@ -1,245 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDefaultRouteTable() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDefaultRouteTableCreate, - Read: resourceAwsDefaultRouteTableRead, - Update: resourceAwsRouteTableUpdate, - Delete: resourceAwsDefaultRouteTableDelete, - - Schema: map[string]*schema.Schema{ - "default_route_table_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - - "propagating_vgws": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "route": { - Type: schema.TypeSet, - Computed: true, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cidr_block": { - Type: schema.TypeString, - Optional: true, - }, - - "ipv6_cidr_block": { - Type: schema.TypeString, - Optional: true, - }, - - "egress_only_gateway_id": { - Type: schema.TypeString, - Optional: true, - }, - - "gateway_id": { - Type: schema.TypeString, - Optional: true, - }, - - "instance_id": { - Type: schema.TypeString, - Optional: true, - }, - - "nat_gateway_id": { - Type: schema.TypeString, - Optional: true, - }, - - "transit_gateway_id": { - Type: schema.TypeString, - Optional: true, - }, - - "vpc_peering_connection_id": { - Type: schema.TypeString, - Optional: true, - }, - - "network_interface_id": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - Set: resourceAwsRouteTableHash, - }, - - "tags": tagsSchema(), - - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsDefaultRouteTableCreate(d *schema.ResourceData, meta interface{}) error { - d.SetId(d.Get("default_route_table_id").(string)) - - conn := meta.(*AWSClient).ec2conn - rtRaw, _, err := resourceAwsRouteTableStateRefreshFunc(conn, d.Id())() - if err != nil { - return err - } - if rtRaw == nil { - log.Printf("[WARN] Default Route Table not found") - d.SetId("") - return nil - } - - rt := rtRaw.(*ec2.RouteTable) - - d.Set("vpc_id", rt.VpcId) - - // revoke all default and pre-existing routes on the default route table. - // In the UPDATE method, we'll apply only the rules in the configuration. - log.Printf("[DEBUG] Revoking default routes for Default Route Table for %s", d.Id()) - if err := revokeAllRouteTableRules(d.Id(), meta); err != nil { - return err - } - - return resourceAwsRouteTableUpdate(d, meta) -} - -func resourceAwsDefaultRouteTableRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - // look up default route table for VPC - filter1 := &ec2.Filter{ - Name: aws.String("association.main"), - Values: []*string{aws.String("true")}, - } - filter2 := &ec2.Filter{ - Name: aws.String("vpc-id"), - Values: []*string{aws.String(d.Get("vpc_id").(string))}, - } - - findOpts := &ec2.DescribeRouteTablesInput{ - Filters: []*ec2.Filter{filter1, filter2}, - } - - resp, err := conn.DescribeRouteTables(findOpts) - if err != nil { - return err - } - - if len(resp.RouteTables) < 1 || resp.RouteTables[0] == nil { - return fmt.Errorf("Default Route table not found") - } - - rt := resp.RouteTables[0] - - d.Set("default_route_table_id", rt.RouteTableId) - d.SetId(*rt.RouteTableId) - - // re-use regular AWS Route Table READ. This is an extra API call but saves us - // from trying to manually keep parity - return resourceAwsRouteTableRead(d, meta) -} - -func resourceAwsDefaultRouteTableDelete(d *schema.ResourceData, meta interface{}) error { - log.Printf("[WARN] Cannot destroy Default Route Table. Terraform will remove this resource from the state file, however resources may remain.") - return nil -} - -// revokeAllRouteTableRules revoke all routes on the Default Route Table -// This should only be ran once at creation time of this resource -func revokeAllRouteTableRules(defaultRouteTableId string, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - log.Printf("\n***\nrevokeAllRouteTableRules\n***\n") - - resp, err := conn.DescribeRouteTables(&ec2.DescribeRouteTablesInput{ - RouteTableIds: []*string{aws.String(defaultRouteTableId)}, - }) - if err != nil { - return err - } - - if len(resp.RouteTables) < 1 || resp.RouteTables[0] == nil { - return fmt.Errorf("Default Route table not found") - } - - rt := resp.RouteTables[0] - - // Remove all Gateway association - for _, r := range rt.PropagatingVgws { - log.Printf( - "[INFO] Deleting VGW propagation from %s: %s", - defaultRouteTableId, *r.GatewayId) - _, err := conn.DisableVgwRoutePropagation(&ec2.DisableVgwRoutePropagationInput{ - RouteTableId: aws.String(defaultRouteTableId), - GatewayId: r.GatewayId, - }) - if err != nil { - return err - } - } - - // Delete all routes - for _, r := range rt.Routes { - // you cannot delete the local route - if r.GatewayId != nil && *r.GatewayId == "local" { - continue - } - if r.DestinationPrefixListId != nil { - // Skipping because VPC endpoint routes are handled separately - // See aws_vpc_endpoint - continue - } - - if r.DestinationCidrBlock != nil { - log.Printf( - "[INFO] Deleting route from %s: %s", - defaultRouteTableId, *r.DestinationCidrBlock) - _, err := conn.DeleteRoute(&ec2.DeleteRouteInput{ - RouteTableId: aws.String(defaultRouteTableId), - DestinationCidrBlock: r.DestinationCidrBlock, - }) - if err != nil { - return err - } - } - - if r.DestinationIpv6CidrBlock != nil { - log.Printf( - "[INFO] Deleting route from %s: %s", - defaultRouteTableId, *r.DestinationIpv6CidrBlock) - _, err := conn.DeleteRoute(&ec2.DeleteRouteInput{ - RouteTableId: aws.String(defaultRouteTableId), - DestinationIpv6CidrBlock: r.DestinationIpv6CidrBlock, - }) - if err != nil { - return err - } - } - - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_security_group.go deleted file mode 100644 index 0b3af038a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_security_group.go +++ /dev/null @@ -1,147 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDefaultSecurityGroup() *schema.Resource { - // reuse aws_security_group_rule schema, and methods for READ, UPDATE - dsg := resourceAwsSecurityGroup() - dsg.Create = resourceAwsDefaultSecurityGroupCreate - dsg.Delete = resourceAwsDefaultSecurityGroupDelete - - // Descriptions cannot be updated - delete(dsg.Schema, "description") - - // name is a computed value for Default Security Groups and cannot be changed - delete(dsg.Schema, "name_prefix") - dsg.Schema["name"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - - // We want explicit management of Rules here, so we do not allow them to be - // computed. Instead, an empty config will enforce just that; removal of the - // rules - dsg.Schema["ingress"].Computed = false - dsg.Schema["egress"].Computed = false - return dsg -} - -func resourceAwsDefaultSecurityGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - securityGroupOpts := &ec2.DescribeSecurityGroupsInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("group-name"), - Values: []*string{aws.String("default")}, - }, - }, - } - - var vpcId string - if v, ok := d.GetOk("vpc_id"); ok { - vpcId = v.(string) - securityGroupOpts.Filters = append(securityGroupOpts.Filters, &ec2.Filter{ - Name: aws.String("vpc-id"), - Values: []*string{aws.String(vpcId)}, - }) - } - - var err error - log.Printf("[DEBUG] Commandeer Default Security Group: %s", securityGroupOpts) - resp, err := conn.DescribeSecurityGroups(securityGroupOpts) - if err != nil { - return fmt.Errorf("Error creating Default Security Group: %s", err) - } - - var g *ec2.SecurityGroup - if vpcId != "" { - // if vpcId contains a value, then we expect just a single Security Group - // returned, as default is a protected name for each VPC, and for each - // Region on EC2 Classic - if len(resp.SecurityGroups) != 1 { - return fmt.Errorf("Error finding default security group; found (%d) groups: %s", len(resp.SecurityGroups), resp) - } - g = resp.SecurityGroups[0] - } else { - // we need to filter through any returned security groups for the group - // named "default", and does not belong to a VPC - for _, sg := range resp.SecurityGroups { - if sg.VpcId == nil && *sg.GroupName == "default" { - g = sg - } - } - } - - if g == nil { - return fmt.Errorf("Error finding default security group: no matching group found") - } - - d.SetId(*g.GroupId) - - log.Printf("[INFO] Default Security Group ID: %s", d.Id()) - - if err := setTags(conn, d); err != nil { - return err - } - - if err := revokeDefaultSecurityGroupRules(meta, g); err != nil { - return fmt.Errorf("%s", err) - } - - return resourceAwsSecurityGroupUpdate(d, meta) -} - -func resourceAwsDefaultSecurityGroupDelete(d *schema.ResourceData, meta interface{}) error { - log.Printf("[WARN] Cannot destroy Default Security Group. Terraform will remove this resource from the state file, however resources may remain.") - return nil -} - -func revokeDefaultSecurityGroupRules(meta interface{}, g *ec2.SecurityGroup) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[WARN] Removing all ingress and egress rules found on Default Security Group (%s)", *g.GroupId) - if len(g.IpPermissionsEgress) > 0 { - req := &ec2.RevokeSecurityGroupEgressInput{ - GroupId: g.GroupId, - IpPermissions: g.IpPermissionsEgress, - } - - log.Printf("[DEBUG] Revoking default egress rules for Default Security Group for %s", *g.GroupId) - if _, err := conn.RevokeSecurityGroupEgress(req); err != nil { - return fmt.Errorf( - "Error revoking default egress rules for Default Security Group (%s): %s", - *g.GroupId, err) - } - } - if len(g.IpPermissions) > 0 { - // a limitation in EC2 Classic is that a call to RevokeSecurityGroupIngress - // cannot contain both the GroupName and the GroupId - for _, p := range g.IpPermissions { - for _, uigp := range p.UserIdGroupPairs { - if uigp.GroupId != nil && uigp.GroupName != nil { - uigp.GroupName = nil - } - } - } - req := &ec2.RevokeSecurityGroupIngressInput{ - GroupId: g.GroupId, - IpPermissions: g.IpPermissions, - } - - log.Printf("[DEBUG] Revoking default ingress rules for Default Security Group for (%s): %s", *g.GroupId, req) - if _, err := conn.RevokeSecurityGroupIngress(req); err != nil { - return fmt.Errorf( - "Error revoking default ingress rules for Default Security Group (%s): %s", - *g.GroupId, err) - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_subnet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_subnet.go deleted file mode 100644 index 443ed252a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_subnet.go +++ /dev/null @@ -1,85 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDefaultSubnet() *schema.Resource { - // reuse aws_subnet schema, and methods for READ, UPDATE - dsubnet := resourceAwsSubnet() - dsubnet.Create = resourceAwsDefaultSubnetCreate - dsubnet.Delete = resourceAwsDefaultSubnetDelete - - // availability_zone is a required value for Default Subnets - dsubnet.Schema["availability_zone"] = &schema.Schema{ - Type: schema.TypeString, - Required: true, - } - // availability_zone_id is a computed value for Default Subnets - dsubnet.Schema["availability_zone_id"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - // vpc_id is a computed value for Default Subnets - dsubnet.Schema["vpc_id"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - // cidr_block is a computed value for Default Subnets - dsubnet.Schema["cidr_block"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - // ipv6_cidr_block is a computed value for Default Subnets - dsubnet.Schema["ipv6_cidr_block"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - // map_public_ip_on_launch is a computed value for Default Subnets - dsubnet.Schema["map_public_ip_on_launch"] = &schema.Schema{ - Type: schema.TypeBool, - Optional: true, - Computed: true, - } - // assign_ipv6_address_on_creation is a computed value for Default Subnets - dsubnet.Schema["assign_ipv6_address_on_creation"] = &schema.Schema{ - Type: schema.TypeBool, - Computed: true, - } - - return dsubnet -} - -func resourceAwsDefaultSubnetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeSubnetsInput{} - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "availabilityZone": d.Get("availability_zone").(string), - "defaultForAz": "true", - }, - ) - - log.Printf("[DEBUG] Reading Default Subnet: %s", req) - resp, err := conn.DescribeSubnets(req) - if err != nil { - return err - } - if len(resp.Subnets) != 1 || resp.Subnets[0] == nil { - return fmt.Errorf("Default subnet not found") - } - - d.SetId(aws.StringValue(resp.Subnets[0].SubnetId)) - return resourceAwsSubnetUpdate(d, meta) -} - -func resourceAwsDefaultSubnetDelete(d *schema.ResourceData, meta interface{}) error { - log.Printf("[WARN] Cannot destroy Default Subnet. Terraform will remove this resource from the state file, however resources may remain.") - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc.go deleted file mode 100644 index 345325fb8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc.go +++ /dev/null @@ -1,65 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDefaultVpc() *schema.Resource { - // reuse aws_vpc schema, and methods for READ, UPDATE - dvpc := resourceAwsVpc() - dvpc.Create = resourceAwsDefaultVpcCreate - dvpc.Delete = resourceAwsDefaultVpcDelete - - // cidr_block is a computed value for Default VPCs - dvpc.Schema["cidr_block"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - // instance_tenancy is a computed value for Default VPCs - dvpc.Schema["instance_tenancy"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - // assign_generated_ipv6_cidr_block is a computed value for Default VPCs - dvpc.Schema["assign_generated_ipv6_cidr_block"] = &schema.Schema{ - Type: schema.TypeBool, - Computed: true, - } - - return dvpc -} - -func resourceAwsDefaultVpcCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - req := &ec2.DescribeVpcsInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("isDefault"), - Values: aws.StringSlice([]string{"true"}), - }, - }, - } - - resp, err := conn.DescribeVpcs(req) - if err != nil { - return err - } - - if resp.Vpcs == nil || len(resp.Vpcs) == 0 { - return fmt.Errorf("No default VPC found in this region.") - } - - d.SetId(aws.StringValue(resp.Vpcs[0].VpcId)) - - return resourceAwsVpcUpdate(d, meta) -} - -func resourceAwsDefaultVpcDelete(d *schema.ResourceData, meta interface{}) error { - log.Printf("[WARN] Cannot destroy Default VPC. Terraform will remove this resource from the state file, however resources may remain.") - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc_dhcp_options.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc_dhcp_options.go deleted file mode 100644 index ecc0bd87c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc_dhcp_options.go +++ /dev/null @@ -1,85 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDefaultVpcDhcpOptions() *schema.Resource { - // reuse aws_vpc_dhcp_options schema, and methods for READ, UPDATE - dvpc := resourceAwsVpcDhcpOptions() - dvpc.Create = resourceAwsDefaultVpcDhcpOptionsCreate - dvpc.Delete = resourceAwsDefaultVpcDhcpOptionsDelete - - // domain_name is a computed value for Default Default DHCP Options Sets - dvpc.Schema["domain_name"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - // domain_name_servers is a computed value for Default Default DHCP Options Sets - dvpc.Schema["domain_name_servers"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - // ntp_servers is a computed value for Default Default DHCP Options Sets - dvpc.Schema["ntp_servers"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - - return dvpc -} - -func resourceAwsDefaultVpcDhcpOptionsCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - var domainName string - awsRegion := meta.(*AWSClient).region - if awsRegion == "us-east-1" { - domainName = "ec2.internal" - } else { - domainName = awsRegion + ".compute.internal" - } - req := &ec2.DescribeDhcpOptionsInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("key"), - Values: aws.StringSlice([]string{"domain-name"}), - }, - { - Name: aws.String("value"), - Values: aws.StringSlice([]string{domainName}), - }, - { - Name: aws.String("key"), - Values: aws.StringSlice([]string{"domain-name-servers"}), - }, - { - Name: aws.String("value"), - Values: aws.StringSlice([]string{"AmazonProvidedDNS"}), - }, - }, - } - - resp, err := conn.DescribeDhcpOptions(req) - if err != nil { - return err - } - - if len(resp.DhcpOptions) != 1 || resp.DhcpOptions[0] == nil { - return fmt.Errorf("Default DHCP Options Set not found") - } - - d.SetId(aws.StringValue(resp.DhcpOptions[0].DhcpOptionsId)) - - return resourceAwsVpcDhcpOptionsUpdate(d, meta) -} - -func resourceAwsDefaultVpcDhcpOptionsDelete(d *schema.ResourceData, meta interface{}) error { - log.Printf("[WARN] Cannot destroy Default DHCP Options Set. Terraform will remove this resource from the state file, however resources may remain.") - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_devicefarm_project.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_devicefarm_project.go deleted file mode 100644 index f35e3fe2b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_devicefarm_project.go +++ /dev/null @@ -1,112 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/devicefarm" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDevicefarmProject() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDevicefarmProjectCreate, - Read: resourceAwsDevicefarmProjectRead, - Update: resourceAwsDevicefarmProjectUpdate, - Delete: resourceAwsDevicefarmProjectDelete, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Required: true, - }, - }, - } -} - -func resourceAwsDevicefarmProjectCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).devicefarmconn - region := meta.(*AWSClient).region - - // We need to ensure that DeviceFarm is only being run against us-west-2 - // As this is the only place that AWS currently supports it - if region != "us-west-2" { - return fmt.Errorf("DeviceFarm can only be used with us-west-2. You are trying to use it on %s", region) - } - - input := &devicefarm.CreateProjectInput{ - Name: aws.String(d.Get("name").(string)), - } - - log.Printf("[DEBUG] Creating DeviceFarm Project: %s", d.Get("name").(string)) - out, err := conn.CreateProject(input) - if err != nil { - return fmt.Errorf("Error creating DeviceFarm Project: %s", err) - } - - log.Printf("[DEBUG] Successsfully Created DeviceFarm Project: %s", *out.Project.Arn) - d.SetId(*out.Project.Arn) - - return resourceAwsDevicefarmProjectRead(d, meta) -} - -func resourceAwsDevicefarmProjectRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).devicefarmconn - - input := &devicefarm.GetProjectInput{ - Arn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading DeviceFarm Project: %s", d.Id()) - out, err := conn.GetProject(input) - if err != nil { - return fmt.Errorf("Error reading DeviceFarm Project: %s", err) - } - - d.Set("name", out.Project.Name) - d.Set("arn", out.Project.Arn) - - return nil -} - -func resourceAwsDevicefarmProjectUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).devicefarmconn - - if d.HasChange("name") { - input := &devicefarm.UpdateProjectInput{ - Arn: aws.String(d.Id()), - Name: aws.String(d.Get("name").(string)), - } - - log.Printf("[DEBUG] Updating DeviceFarm Project: %s", d.Id()) - _, err := conn.UpdateProject(input) - if err != nil { - return fmt.Errorf("Error Updating DeviceFarm Project: %s", err) - } - - } - - return resourceAwsDevicefarmProjectRead(d, meta) -} - -func resourceAwsDevicefarmProjectDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).devicefarmconn - - input := &devicefarm.DeleteProjectInput{ - Arn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting DeviceFarm Project: %s", d.Id()) - _, err := conn.DeleteProject(input) - if err != nil { - return fmt.Errorf("Error deleting DeviceFarm Project: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_conditional_forwarder.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_conditional_forwarder.go deleted file mode 100644 index b04e82ba8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_conditional_forwarder.go +++ /dev/null @@ -1,164 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "strings" - - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/directoryservice" -) - -func resourceAwsDirectoryServiceConditionalForwarder() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDirectoryServiceConditionalForwarderCreate, - Read: resourceAwsDirectoryServiceConditionalForwarderRead, - Update: resourceAwsDirectoryServiceConditionalForwarderUpdate, - Delete: resourceAwsDirectoryServiceConditionalForwarderDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "directory_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "dns_ips": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - - "remote_domain_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile(`^([a-zA-Z0-9]+[\.-])+([a-zA-Z0-9])+[.]?$`), "invalid value, see the RemoteDomainName attribute documentation: https://docs.aws.amazon.com/directoryservice/latest/devguide/API_ConditionalForwarder.html"), - }, - }, - } -} - -func resourceAwsDirectoryServiceConditionalForwarderCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dsconn - - dnsIps := expandStringList(d.Get("dns_ips").([]interface{})) - - directoryId := d.Get("directory_id").(string) - domainName := d.Get("remote_domain_name").(string) - - _, err := conn.CreateConditionalForwarder(&directoryservice.CreateConditionalForwarderInput{ - DirectoryId: aws.String(directoryId), - DnsIpAddrs: dnsIps, - RemoteDomainName: aws.String(domainName), - }) - - if err != nil { - return err - } - - d.SetId(fmt.Sprintf("%s:%s", directoryId, domainName)) - - return nil -} - -func resourceAwsDirectoryServiceConditionalForwarderRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dsconn - - directoryId, domainName, err := parseDSConditionalForwarderId(d.Id()) - if err != nil { - return err - } - - res, err := conn.DescribeConditionalForwarders(&directoryservice.DescribeConditionalForwardersInput{ - DirectoryId: aws.String(directoryId), - RemoteDomainNames: []*string{aws.String(domainName)}, - }) - - if err != nil { - if isAWSErr(err, directoryservice.ErrCodeEntityDoesNotExistException, "") { - log.Printf("[WARN] Directory Service Conditional Forwarder (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - if len(res.ConditionalForwarders) == 0 { - log.Printf("[WARN] Directory Service Conditional Forwarder (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - cfd := res.ConditionalForwarders[0] - - d.Set("dns_ips", flattenStringList(cfd.DnsIpAddrs)) - d.Set("directory_id", directoryId) - d.Set("remote_domain_name", cfd.RemoteDomainName) - - return nil -} - -func resourceAwsDirectoryServiceConditionalForwarderUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dsconn - - directoryId, domainName, err := parseDSConditionalForwarderId(d.Id()) - if err != nil { - return err - } - - dnsIps := expandStringList(d.Get("dns_ips").([]interface{})) - - _, err = conn.UpdateConditionalForwarder(&directoryservice.UpdateConditionalForwarderInput{ - DirectoryId: aws.String(directoryId), - DnsIpAddrs: dnsIps, - RemoteDomainName: aws.String(domainName), - }) - - if err != nil { - return err - } - - return resourceAwsDirectoryServiceConditionalForwarderRead(d, meta) -} - -func resourceAwsDirectoryServiceConditionalForwarderDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dsconn - - directoryId, domainName, err := parseDSConditionalForwarderId(d.Id()) - if err != nil { - return err - } - - _, err = conn.DeleteConditionalForwarder(&directoryservice.DeleteConditionalForwarderInput{ - DirectoryId: aws.String(directoryId), - RemoteDomainName: aws.String(domainName), - }) - - if err != nil && !isAWSErr(err, directoryservice.ErrCodeEntityDoesNotExistException, "") { - return err - } - - return nil -} - -func parseDSConditionalForwarderId(id string) (directoryId, domainName string, err error) { - parts := strings.SplitN(id, ":", 2) - - if len(parts) != 2 { - return "", "", fmt.Errorf("please make sure ID is in format DIRECTORY_ID:DOMAIN_NAME") - } - - return parts[0], parts[1], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go deleted file mode 100644 index d440d1267..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go +++ /dev/null @@ -1,524 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/directoryservice" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDirectoryServiceDirectory() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDirectoryServiceDirectoryCreate, - Read: resourceAwsDirectoryServiceDirectoryRead, - Update: resourceAwsDirectoryServiceDirectoryUpdate, - Delete: resourceAwsDirectoryServiceDirectoryDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "password": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - Sensitive: true, - }, - "size": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - directoryservice.DirectorySizeLarge, - directoryservice.DirectorySizeSmall, - }, false), - }, - "alias": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "short_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "tags": tagsSchema(), - "vpc_settings": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "subnet_ids": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "vpc_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - }, - }, - "connect_settings": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "customer_username": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "customer_dns_ips": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "subnet_ids": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "vpc_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - }, - }, - "enable_sso": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "access_url": { - Type: schema.TypeString, - Computed: true, - }, - "dns_ip_addresses": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - Computed: true, - }, - "security_group_id": { - Type: schema.TypeString, - Computed: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - Default: directoryservice.DirectoryTypeSimpleAd, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - directoryservice.DirectoryTypeAdconnector, - directoryservice.DirectoryTypeMicrosoftAd, - directoryservice.DirectoryTypeSimpleAd, - }, false), - }, - "edition": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - directoryservice.DirectoryEditionEnterprise, - directoryservice.DirectoryEditionStandard, - }, false), - }, - }, - } -} - -func buildVpcSettings(d *schema.ResourceData) (vpcSettings *directoryservice.DirectoryVpcSettings, err error) { - v, ok := d.GetOk("vpc_settings") - if !ok { - return nil, fmt.Errorf("vpc_settings is required for type = SimpleAD or MicrosoftAD") - } - settings := v.([]interface{}) - s := settings[0].(map[string]interface{}) - var subnetIds []*string - for _, id := range s["subnet_ids"].(*schema.Set).List() { - subnetIds = append(subnetIds, aws.String(id.(string))) - } - - vpcSettings = &directoryservice.DirectoryVpcSettings{ - SubnetIds: subnetIds, - VpcId: aws.String(s["vpc_id"].(string)), - } - - return vpcSettings, nil -} - -func buildConnectSettings(d *schema.ResourceData) (connectSettings *directoryservice.DirectoryConnectSettings, err error) { - v, ok := d.GetOk("connect_settings") - if !ok { - return nil, fmt.Errorf("connect_settings is required for type = ADConnector") - } - settings := v.([]interface{}) - s := settings[0].(map[string]interface{}) - - var subnetIds []*string - for _, id := range s["subnet_ids"].(*schema.Set).List() { - subnetIds = append(subnetIds, aws.String(id.(string))) - } - - var customerDnsIps []*string - for _, id := range s["customer_dns_ips"].(*schema.Set).List() { - customerDnsIps = append(customerDnsIps, aws.String(id.(string))) - } - - connectSettings = &directoryservice.DirectoryConnectSettings{ - CustomerDnsIps: customerDnsIps, - CustomerUserName: aws.String(s["customer_username"].(string)), - SubnetIds: subnetIds, - VpcId: aws.String(s["vpc_id"].(string)), - } - - return connectSettings, nil -} - -func createDirectoryConnector(dsconn *directoryservice.DirectoryService, d *schema.ResourceData) (directoryId string, err error) { - input := directoryservice.ConnectDirectoryInput{ - Name: aws.String(d.Get("name").(string)), - Password: aws.String(d.Get("password").(string)), - } - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - if v, ok := d.GetOk("size"); ok { - input.Size = aws.String(v.(string)) - } else { - // Matching previous behavior of Default: "Large" for Size attribute - input.Size = aws.String(directoryservice.DirectorySizeLarge) - } - if v, ok := d.GetOk("short_name"); ok { - input.ShortName = aws.String(v.(string)) - } - - input.ConnectSettings, err = buildConnectSettings(d) - if err != nil { - return "", err - } - - log.Printf("[DEBUG] Creating Directory Connector: %s", input) - out, err := dsconn.ConnectDirectory(&input) - if err != nil { - return "", err - } - log.Printf("[DEBUG] Directory Connector created: %s", out) - - return *out.DirectoryId, nil -} - -func createSimpleDirectoryService(dsconn *directoryservice.DirectoryService, d *schema.ResourceData) (directoryId string, err error) { - input := directoryservice.CreateDirectoryInput{ - Name: aws.String(d.Get("name").(string)), - Password: aws.String(d.Get("password").(string)), - } - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - if v, ok := d.GetOk("size"); ok { - input.Size = aws.String(v.(string)) - } else { - // Matching previous behavior of Default: "Large" for Size attribute - input.Size = aws.String(directoryservice.DirectorySizeLarge) - } - if v, ok := d.GetOk("short_name"); ok { - input.ShortName = aws.String(v.(string)) - } - - input.VpcSettings, err = buildVpcSettings(d) - if err != nil { - return "", err - } - - log.Printf("[DEBUG] Creating Simple Directory Service: %s", input) - out, err := dsconn.CreateDirectory(&input) - if err != nil { - return "", err - } - log.Printf("[DEBUG] Simple Directory Service created: %s", out) - - return *out.DirectoryId, nil -} - -func createActiveDirectoryService(dsconn *directoryservice.DirectoryService, d *schema.ResourceData) (directoryId string, err error) { - input := directoryservice.CreateMicrosoftADInput{ - Name: aws.String(d.Get("name").(string)), - Password: aws.String(d.Get("password").(string)), - } - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - if v, ok := d.GetOk("short_name"); ok { - input.ShortName = aws.String(v.(string)) - } - if v, ok := d.GetOk("edition"); ok { - input.Edition = aws.String(v.(string)) - } - - input.VpcSettings, err = buildVpcSettings(d) - if err != nil { - return "", err - } - - log.Printf("[DEBUG] Creating Microsoft AD Directory Service: %s", input) - out, err := dsconn.CreateMicrosoftAD(&input) - if err != nil { - return "", err - } - log.Printf("[DEBUG] Microsoft AD Directory Service created: %s", out) - - return *out.DirectoryId, nil -} - -func resourceAwsDirectoryServiceDirectoryCreate(d *schema.ResourceData, meta interface{}) error { - dsconn := meta.(*AWSClient).dsconn - - var directoryId string - var err error - directoryType := d.Get("type").(string) - - if directoryType == directoryservice.DirectoryTypeAdconnector { - directoryId, err = createDirectoryConnector(dsconn, d) - } else if directoryType == directoryservice.DirectoryTypeMicrosoftAd { - directoryId, err = createActiveDirectoryService(dsconn, d) - } else if directoryType == directoryservice.DirectoryTypeSimpleAd { - directoryId, err = createSimpleDirectoryService(dsconn, d) - } - - if err != nil { - return err - } - - d.SetId(directoryId) - - // Wait for creation - log.Printf("[DEBUG] Waiting for DS (%q) to become available", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{ - directoryservice.DirectoryStageRequested, - directoryservice.DirectoryStageCreating, - directoryservice.DirectoryStageCreated, - }, - Target: []string{directoryservice.DirectoryStageActive}, - Refresh: func() (interface{}, string, error) { - resp, err := dsconn.DescribeDirectories(&directoryservice.DescribeDirectoriesInput{ - DirectoryIds: []*string{aws.String(d.Id())}, - }) - if err != nil { - log.Printf("Error during creation of DS: %q", err.Error()) - return nil, "", err - } - - ds := resp.DirectoryDescriptions[0] - log.Printf("[DEBUG] Creation of DS %q is in following stage: %q.", - d.Id(), *ds.Stage) - return ds, *ds.Stage, nil - }, - Timeout: 60 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for Directory Service (%s) to become available: %s", - d.Id(), err) - } - - if v, ok := d.GetOk("alias"); ok { - d.SetPartial("alias") - - input := directoryservice.CreateAliasInput{ - DirectoryId: aws.String(d.Id()), - Alias: aws.String(v.(string)), - } - - log.Printf("[DEBUG] Assigning alias %q to DS directory %q", - v.(string), d.Id()) - out, err := dsconn.CreateAlias(&input) - if err != nil { - return err - } - log.Printf("[DEBUG] Alias %q assigned to DS directory %q", - *out.Alias, *out.DirectoryId) - } - - return resourceAwsDirectoryServiceDirectoryUpdate(d, meta) -} - -func resourceAwsDirectoryServiceDirectoryUpdate(d *schema.ResourceData, meta interface{}) error { - dsconn := meta.(*AWSClient).dsconn - - if d.HasChange("enable_sso") { - d.SetPartial("enable_sso") - var err error - - if v, ok := d.GetOk("enable_sso"); ok && v.(bool) { - log.Printf("[DEBUG] Enabling SSO for DS directory %q", d.Id()) - _, err = dsconn.EnableSso(&directoryservice.EnableSsoInput{ - DirectoryId: aws.String(d.Id()), - }) - } else { - log.Printf("[DEBUG] Disabling SSO for DS directory %q", d.Id()) - _, err = dsconn.DisableSso(&directoryservice.DisableSsoInput{ - DirectoryId: aws.String(d.Id()), - }) - } - - if err != nil { - return err - } - } - - if err := setTagsDS(dsconn, d, d.Id()); err != nil { - return err - } - - return resourceAwsDirectoryServiceDirectoryRead(d, meta) -} - -func resourceAwsDirectoryServiceDirectoryRead(d *schema.ResourceData, meta interface{}) error { - dsconn := meta.(*AWSClient).dsconn - - input := directoryservice.DescribeDirectoriesInput{ - DirectoryIds: []*string{aws.String(d.Id())}, - } - out, err := dsconn.DescribeDirectories(&input) - if err != nil { - return err - - } - - if len(out.DirectoryDescriptions) == 0 { - log.Printf("[WARN] Directory %s not found", d.Id()) - d.SetId("") - return nil - } - - dir := out.DirectoryDescriptions[0] - log.Printf("[DEBUG] Received DS directory: %s", dir) - - d.Set("access_url", dir.AccessUrl) - d.Set("alias", dir.Alias) - d.Set("description", dir.Description) - - if *dir.Type == directoryservice.DirectoryTypeAdconnector { - d.Set("dns_ip_addresses", schema.NewSet(schema.HashString, flattenStringList(dir.ConnectSettings.ConnectIps))) - } else { - d.Set("dns_ip_addresses", schema.NewSet(schema.HashString, flattenStringList(dir.DnsIpAddrs))) - } - d.Set("name", dir.Name) - d.Set("short_name", dir.ShortName) - d.Set("size", dir.Size) - d.Set("edition", dir.Edition) - d.Set("type", dir.Type) - d.Set("vpc_settings", flattenDSVpcSettings(dir.VpcSettings)) - d.Set("connect_settings", flattenDSConnectSettings(dir.DnsIpAddrs, dir.ConnectSettings)) - d.Set("enable_sso", dir.SsoEnabled) - - if dir.VpcSettings != nil { - d.Set("security_group_id", *dir.VpcSettings.SecurityGroupId) - } - - tagList, err := dsconn.ListTagsForResource(&directoryservice.ListTagsForResourceInput{ - ResourceId: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Failed to get Directory service tags (id: %s): %s", d.Id(), err) - } - d.Set("tags", tagsToMapDS(tagList.Tags)) - - return nil -} - -func resourceAwsDirectoryServiceDirectoryDelete(d *schema.ResourceData, meta interface{}) error { - dsconn := meta.(*AWSClient).dsconn - - input := directoryservice.DeleteDirectoryInput{ - DirectoryId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting Directory Service Directory: %s", input) - _, err := dsconn.DeleteDirectory(&input) - if err != nil { - return fmt.Errorf("error deleting Directory Service Directory (%s): %s", d.Id(), err) - } - - log.Printf("[DEBUG] Waiting for Directory Service Directory (%q) to be deleted", d.Id()) - err = waitForDirectoryServiceDirectoryDeletion(dsconn, d.Id()) - if err != nil { - return fmt.Errorf("error waiting for Directory Service (%s) to be deleted: %s", d.Id(), err) - } - - return nil -} - -func waitForDirectoryServiceDirectoryDeletion(conn *directoryservice.DirectoryService, directoryID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ - directoryservice.DirectoryStageActive, - directoryservice.DirectoryStageDeleting, - }, - Target: []string{directoryservice.DirectoryStageDeleted}, - Refresh: func() (interface{}, string, error) { - resp, err := conn.DescribeDirectories(&directoryservice.DescribeDirectoriesInput{ - DirectoryIds: []*string{aws.String(directoryID)}, - }) - if err != nil { - if isAWSErr(err, directoryservice.ErrCodeEntityDoesNotExistException, "") { - return 42, directoryservice.DirectoryStageDeleted, nil - } - return nil, "error", err - } - - if len(resp.DirectoryDescriptions) == 0 || resp.DirectoryDescriptions[0] == nil { - return 42, directoryservice.DirectoryStageDeleted, nil - } - - ds := resp.DirectoryDescriptions[0] - log.Printf("[DEBUG] Deletion of Directory Service Directory %q is in following stage: %q.", directoryID, aws.StringValue(ds.Stage)) - return ds, aws.StringValue(ds.Stage), nil - }, - Timeout: 60 * time.Minute, - } - _, err := stateConf.WaitForState() - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dlm_lifecycle_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dlm_lifecycle_policy.go deleted file mode 100644 index 210310cb5..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dlm_lifecycle_policy.go +++ /dev/null @@ -1,367 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/dlm" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDlmLifecyclePolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDlmLifecyclePolicyCreate, - Read: resourceAwsDlmLifecyclePolicyRead, - Update: resourceAwsDlmLifecyclePolicyUpdate, - Delete: resourceAwsDlmLifecyclePolicyDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "description": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile("^[0-9A-Za-z _-]+$"), "see https://docs.aws.amazon.com/cli/latest/reference/dlm/create-lifecycle-policy.html"), - // TODO: https://docs.aws.amazon.com/dlm/latest/APIReference/API_LifecyclePolicy.html#dlm-Type-LifecyclePolicy-Description says it has max length of 500 but doesn't mention the regex but SDK and CLI docs only mention the regex and not max length. Check this - }, - "execution_role_arn": { - // TODO: Make this not required and if it's not provided then use the default service role, creating it if necessary - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "policy_details": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "resource_types": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "schedule": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "copy_tags": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - ForceNew: true, - }, - "create_rule": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "interval": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validateIntegerInSlice([]int{ - 12, - 24, - }), - }, - "interval_unit": { - Type: schema.TypeString, - Optional: true, - Default: dlm.IntervalUnitValuesHours, - ValidateFunc: validation.StringInSlice([]string{ - dlm.IntervalUnitValuesHours, - }, false), - }, - "times": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringMatch(regexp.MustCompile("^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$"), "see https://docs.aws.amazon.com/dlm/latest/APIReference/API_CreateRule.html#dlm-Type-CreateRule-Times"), - }, - }, - }, - }, - }, - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(0, 500), - }, - "retain_rule": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "count": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(1, 1000), - }, - }, - }, - }, - "tags_to_add": { - Type: schema.TypeMap, - Optional: true, - }, - }, - }, - }, - "target_tags": { - Type: schema.TypeMap, - Required: true, - }, - }, - }, - }, - "state": { - Type: schema.TypeString, - Optional: true, - Default: dlm.SettablePolicyStateValuesEnabled, - ValidateFunc: validation.StringInSlice([]string{ - dlm.SettablePolicyStateValuesDisabled, - dlm.SettablePolicyStateValuesEnabled, - }, false), - }, - }, - } -} - -func resourceAwsDlmLifecyclePolicyCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dlmconn - - input := dlm.CreateLifecyclePolicyInput{ - Description: aws.String(d.Get("description").(string)), - ExecutionRoleArn: aws.String(d.Get("execution_role_arn").(string)), - PolicyDetails: expandDlmPolicyDetails(d.Get("policy_details").([]interface{})), - State: aws.String(d.Get("state").(string)), - } - - log.Printf("[INFO] Creating DLM lifecycle policy: %s", input) - out, err := conn.CreateLifecyclePolicy(&input) - if err != nil { - return fmt.Errorf("error creating DLM Lifecycle Policy: %s", err) - } - - d.SetId(*out.PolicyId) - - return resourceAwsDlmLifecyclePolicyRead(d, meta) -} - -func resourceAwsDlmLifecyclePolicyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dlmconn - - log.Printf("[INFO] Reading DLM lifecycle policy: %s", d.Id()) - out, err := conn.GetLifecyclePolicy(&dlm.GetLifecyclePolicyInput{ - PolicyId: aws.String(d.Id()), - }) - - if isAWSErr(err, dlm.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] DLM Lifecycle Policy (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading DLM Lifecycle Policy (%s): %s", d.Id(), err) - } - - d.Set("description", out.Policy.Description) - d.Set("execution_role_arn", out.Policy.ExecutionRoleArn) - d.Set("state", out.Policy.State) - if err := d.Set("policy_details", flattenDlmPolicyDetails(out.Policy.PolicyDetails)); err != nil { - return fmt.Errorf("error setting policy details %s", err) - } - - return nil -} - -func resourceAwsDlmLifecyclePolicyUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dlmconn - - input := dlm.UpdateLifecyclePolicyInput{ - PolicyId: aws.String(d.Id()), - } - - if d.HasChange("description") { - input.Description = aws.String(d.Get("description").(string)) - } - if d.HasChange("execution_role_arn") { - input.ExecutionRoleArn = aws.String(d.Get("execution_role_arn").(string)) - } - if d.HasChange("state") { - input.State = aws.String(d.Get("state").(string)) - } - if d.HasChange("policy_details") { - input.PolicyDetails = expandDlmPolicyDetails(d.Get("policy_details").([]interface{})) - } - - log.Printf("[INFO] Updating lifecycle policy %s", d.Id()) - _, err := conn.UpdateLifecyclePolicy(&input) - if err != nil { - return fmt.Errorf("error updating DLM Lifecycle Policy (%s): %s", d.Id(), err) - } - - return resourceAwsDlmLifecyclePolicyRead(d, meta) -} - -func resourceAwsDlmLifecyclePolicyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dlmconn - - log.Printf("[INFO] Deleting DLM lifecycle policy: %s", d.Id()) - _, err := conn.DeleteLifecyclePolicy(&dlm.DeleteLifecyclePolicyInput{ - PolicyId: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("error deleting DLM Lifecycle Policy (%s): %s", d.Id(), err) - } - - return nil -} - -func expandDlmPolicyDetails(cfg []interface{}) *dlm.PolicyDetails { - if len(cfg) == 0 || cfg[0] == nil { - return nil - } - - policyDetails := &dlm.PolicyDetails{} - m := cfg[0].(map[string]interface{}) - if v, ok := m["resource_types"]; ok { - policyDetails.ResourceTypes = expandStringList(v.([]interface{})) - } - if v, ok := m["schedule"]; ok { - policyDetails.Schedules = expandDlmSchedules(v.([]interface{})) - } - if v, ok := m["target_tags"]; ok { - policyDetails.TargetTags = expandDlmTags(v.(map[string]interface{})) - } - - return policyDetails -} - -func flattenDlmPolicyDetails(policyDetails *dlm.PolicyDetails) []map[string]interface{} { - result := make(map[string]interface{}) - result["resource_types"] = flattenStringList(policyDetails.ResourceTypes) - result["schedule"] = flattenDlmSchedules(policyDetails.Schedules) - result["target_tags"] = flattenDlmTags(policyDetails.TargetTags) - - return []map[string]interface{}{result} -} - -func expandDlmSchedules(cfg []interface{}) []*dlm.Schedule { - schedules := make([]*dlm.Schedule, len(cfg)) - for i, c := range cfg { - schedule := &dlm.Schedule{} - m := c.(map[string]interface{}) - if v, ok := m["copy_tags"]; ok { - schedule.CopyTags = aws.Bool(v.(bool)) - } - if v, ok := m["create_rule"]; ok { - schedule.CreateRule = expandDlmCreateRule(v.([]interface{})) - } - if v, ok := m["name"]; ok { - schedule.Name = aws.String(v.(string)) - } - if v, ok := m["retain_rule"]; ok { - schedule.RetainRule = expandDlmRetainRule(v.([]interface{})) - } - if v, ok := m["tags_to_add"]; ok { - schedule.TagsToAdd = expandDlmTags(v.(map[string]interface{})) - } - schedules[i] = schedule - } - - return schedules -} - -func flattenDlmSchedules(schedules []*dlm.Schedule) []map[string]interface{} { - result := make([]map[string]interface{}, len(schedules)) - for i, s := range schedules { - m := make(map[string]interface{}) - m["copy_tags"] = aws.BoolValue(s.CopyTags) - m["create_rule"] = flattenDlmCreateRule(s.CreateRule) - m["name"] = aws.StringValue(s.Name) - m["retain_rule"] = flattenDlmRetainRule(s.RetainRule) - m["tags_to_add"] = flattenDlmTags(s.TagsToAdd) - result[i] = m - } - - return result -} - -func expandDlmCreateRule(cfg []interface{}) *dlm.CreateRule { - if len(cfg) == 0 || cfg[0] == nil { - return nil - } - c := cfg[0].(map[string]interface{}) - createRule := &dlm.CreateRule{ - Interval: aws.Int64(int64(c["interval"].(int))), - IntervalUnit: aws.String(c["interval_unit"].(string)), - } - if v, ok := c["times"]; ok { - createRule.Times = expandStringList(v.([]interface{})) - } - - return createRule -} - -func flattenDlmCreateRule(createRule *dlm.CreateRule) []map[string]interface{} { - if createRule == nil { - return []map[string]interface{}{} - } - - result := make(map[string]interface{}) - result["interval"] = aws.Int64Value(createRule.Interval) - result["interval_unit"] = aws.StringValue(createRule.IntervalUnit) - result["times"] = flattenStringList(createRule.Times) - - return []map[string]interface{}{result} -} - -func expandDlmRetainRule(cfg []interface{}) *dlm.RetainRule { - if len(cfg) == 0 || cfg[0] == nil { - return nil - } - m := cfg[0].(map[string]interface{}) - return &dlm.RetainRule{ - Count: aws.Int64(int64(m["count"].(int))), - } -} - -func flattenDlmRetainRule(retainRule *dlm.RetainRule) []map[string]interface{} { - result := make(map[string]interface{}) - result["count"] = aws.Int64Value(retainRule.Count) - - return []map[string]interface{}{result} -} - -func expandDlmTags(m map[string]interface{}) []*dlm.Tag { - var result []*dlm.Tag - for k, v := range m { - result = append(result, &dlm.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - }) - } - - return result -} - -func flattenDlmTags(tags []*dlm.Tag) map[string]string { - result := make(map[string]string) - for _, t := range tags { - result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) - } - - return result -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_certificate.go deleted file mode 100644 index a7835a742..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_certificate.go +++ /dev/null @@ -1,134 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - dms "github.com/aws/aws-sdk-go/service/databasemigrationservice" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDmsCertificate() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDmsCertificateCreate, - Read: resourceAwsDmsCertificateRead, - Delete: resourceAwsDmsCertificateDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "certificate_arn": { - Type: schema.TypeString, - Computed: true, - }, - "certificate_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateDmsCertificateId, - }, - "certificate_pem": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Sensitive: true, - }, - "certificate_wallet": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Sensitive: true, - }, - }, - } -} - -func resourceAwsDmsCertificateCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - request := &dms.ImportCertificateInput{ - CertificateIdentifier: aws.String(d.Get("certificate_id").(string)), - } - - pem, pemSet := d.GetOk("certificate_pem") - wallet, walletSet := d.GetOk("certificate_wallet") - - if !pemSet && !walletSet { - return fmt.Errorf("Must set either certificate_pem and certificate_wallet.") - } - if pemSet && walletSet { - return fmt.Errorf("Cannot set both certificate_pem and certificate_wallet.") - } - - if pemSet { - request.CertificatePem = aws.String(pem.(string)) - } - if walletSet { - request.CertificateWallet = []byte(wallet.(string)) - } - - log.Println("[DEBUG] DMS import certificate:", request) - - _, err := conn.ImportCertificate(request) - if err != nil { - return err - } - - d.SetId(d.Get("certificate_id").(string)) - return resourceAwsDmsCertificateRead(d, meta) -} - -func resourceAwsDmsCertificateRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - response, err := conn.DescribeCertificates(&dms.DescribeCertificatesInput{ - Filters: []*dms.Filter{ - { - Name: aws.String("certificate-id"), - Values: []*string{aws.String(d.Id())}, // Must use d.Id() to work with import. - }, - }, - }) - if err != nil { - if dmserr, ok := err.(awserr.Error); ok && dmserr.Code() == "ResourceNotFoundFault" { - d.SetId("") - return nil - } - return err - } - - return resourceAwsDmsCertificateSetState(d, response.Certificates[0]) -} - -func resourceAwsDmsCertificateDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - request := &dms.DeleteCertificateInput{ - CertificateArn: aws.String(d.Get("certificate_arn").(string)), - } - - log.Printf("[DEBUG] DMS delete certificate: %#v", request) - - _, err := conn.DeleteCertificate(request) - return err -} - -func resourceAwsDmsCertificateSetState(d *schema.ResourceData, cert *dms.Certificate) error { - d.SetId(*cert.CertificateIdentifier) - - d.Set("certificate_id", cert.CertificateIdentifier) - d.Set("certificate_arn", cert.CertificateArn) - - if cert.CertificatePem != nil && *cert.CertificatePem != "" { - d.Set("certificate_pem", cert.CertificatePem) - } - if cert.CertificateWallet != nil && len(cert.CertificateWallet) == 0 { - d.Set("certificate_wallet", cert.CertificateWallet) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_endpoint.go deleted file mode 100644 index 572102f41..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_endpoint.go +++ /dev/null @@ -1,610 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - dms "github.com/aws/aws-sdk-go/service/databasemigrationservice" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDmsEndpoint() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDmsEndpointCreate, - Read: resourceAwsDmsEndpointRead, - Update: resourceAwsDmsEndpointUpdate, - Delete: resourceAwsDmsEndpointDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "certificate_arn": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ValidateFunc: validateArn, - }, - "database_name": { - Type: schema.TypeString, - Optional: true, - }, - "endpoint_arn": { - Type: schema.TypeString, - Computed: true, - }, - "endpoint_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateDmsEndpointId, - }, - "service_access_role": { - Type: schema.TypeString, - Optional: true, - }, - "endpoint_type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - dms.ReplicationEndpointTypeValueSource, - dms.ReplicationEndpointTypeValueTarget, - }, false), - }, - "engine_name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - "mysql", - "oracle", - "postgres", - "dynamodb", - "mariadb", - "aurora", - "aurora-postgresql", - "redshift", - "sybase", - "sqlserver", - "mongodb", - "s3", - "azuredb", - }, false), - }, - "extra_connection_attributes": { - Type: schema.TypeString, - Computed: true, - Optional: true, - }, - "kms_key_arn": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "port": { - Type: schema.TypeInt, - Optional: true, - }, - "server_name": { - Type: schema.TypeString, - Optional: true, - }, - "ssl_mode": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - dms.DmsSslModeValueNone, - dms.DmsSslModeValueRequire, - dms.DmsSslModeValueVerifyCa, - dms.DmsSslModeValueVerifyFull, - }, false), - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - }, - "username": { - Type: schema.TypeString, - Optional: true, - }, - // With default values as per https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html - "mongodb_settings": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "auth_type": { - Type: schema.TypeString, - Optional: true, - Default: "PASSWORD", - }, - "auth_mechanism": { - Type: schema.TypeString, - Optional: true, - Default: "DEFAULT", - }, - "nesting_level": { - Type: schema.TypeString, - Optional: true, - Default: "NONE", - }, - "extract_doc_id": { - Type: schema.TypeString, - Optional: true, - Default: "false", - }, - "docs_to_investigate": { - Type: schema.TypeString, - Optional: true, - Default: "1000", - }, - "auth_source": { - Type: schema.TypeString, - Optional: true, - Default: "admin", - }, - }, - }, - }, - "s3_settings": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "service_access_role_arn": { - Type: schema.TypeString, - Optional: true, - Default: "", - }, - "external_table_definition": { - Type: schema.TypeString, - Optional: true, - Default: "", - }, - "csv_row_delimiter": { - Type: schema.TypeString, - Optional: true, - Default: "\\n", - }, - "csv_delimiter": { - Type: schema.TypeString, - Optional: true, - Default: ",", - }, - "bucket_folder": { - Type: schema.TypeString, - Optional: true, - Default: "", - }, - "bucket_name": { - Type: schema.TypeString, - Optional: true, - Default: "", - }, - "compression_type": { - Type: schema.TypeString, - Optional: true, - Default: "NONE", - }, - }, - }, - }, - }, - } -} - -func resourceAwsDmsEndpointCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - request := &dms.CreateEndpointInput{ - EndpointIdentifier: aws.String(d.Get("endpoint_id").(string)), - EndpointType: aws.String(d.Get("endpoint_type").(string)), - EngineName: aws.String(d.Get("engine_name").(string)), - Tags: dmsTagsFromMap(d.Get("tags").(map[string]interface{})), - } - - switch d.Get("engine_name").(string) { - // if dynamodb then add required params - case "dynamodb": - request.DynamoDbSettings = &dms.DynamoDbSettings{ - ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), - } - case "mongodb": - request.MongoDbSettings = &dms.MongoDbSettings{ - Username: aws.String(d.Get("username").(string)), - Password: aws.String(d.Get("password").(string)), - ServerName: aws.String(d.Get("server_name").(string)), - Port: aws.Int64(int64(d.Get("port").(int))), - DatabaseName: aws.String(d.Get("database_name").(string)), - KmsKeyId: aws.String(d.Get("kms_key_arn").(string)), - - AuthType: aws.String(d.Get("mongodb_settings.0.auth_type").(string)), - AuthMechanism: aws.String(d.Get("mongodb_settings.0.auth_mechanism").(string)), - NestingLevel: aws.String(d.Get("mongodb_settings.0.nesting_level").(string)), - ExtractDocId: aws.String(d.Get("mongodb_settings.0.extract_doc_id").(string)), - DocsToInvestigate: aws.String(d.Get("mongodb_settings.0.docs_to_investigate").(string)), - AuthSource: aws.String(d.Get("mongodb_settings.0.auth_source").(string)), - } - - // Set connection info in top-level namespace as well - request.Username = aws.String(d.Get("username").(string)) - request.Password = aws.String(d.Get("password").(string)) - request.ServerName = aws.String(d.Get("server_name").(string)) - request.Port = aws.Int64(int64(d.Get("port").(int))) - request.DatabaseName = aws.String(d.Get("database_name").(string)) - case "s3": - request.S3Settings = &dms.S3Settings{ - ServiceAccessRoleArn: aws.String(d.Get("s3_settings.0.service_access_role_arn").(string)), - ExternalTableDefinition: aws.String(d.Get("s3_settings.0.external_table_definition").(string)), - CsvRowDelimiter: aws.String(d.Get("s3_settings.0.csv_row_delimiter").(string)), - CsvDelimiter: aws.String(d.Get("s3_settings.0.csv_delimiter").(string)), - BucketFolder: aws.String(d.Get("s3_settings.0.bucket_folder").(string)), - BucketName: aws.String(d.Get("s3_settings.0.bucket_name").(string)), - CompressionType: aws.String(d.Get("s3_settings.0.compression_type").(string)), - } - default: - request.Password = aws.String(d.Get("password").(string)) - request.Port = aws.Int64(int64(d.Get("port").(int))) - request.ServerName = aws.String(d.Get("server_name").(string)) - request.Username = aws.String(d.Get("username").(string)) - - if v, ok := d.GetOk("database_name"); ok { - request.DatabaseName = aws.String(v.(string)) - } - if v, ok := d.GetOk("extra_connection_attributes"); ok { - request.ExtraConnectionAttributes = aws.String(v.(string)) - } - if v, ok := d.GetOk("kms_key_arn"); ok { - request.KmsKeyId = aws.String(v.(string)) - } - } - - if v, ok := d.GetOk("certificate_arn"); ok { - request.CertificateArn = aws.String(v.(string)) - } - if v, ok := d.GetOk("ssl_mode"); ok { - request.SslMode = aws.String(v.(string)) - } - - log.Println("[DEBUG] DMS create endpoint:", request) - - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - if _, err := conn.CreateEndpoint(request); err != nil { - if awserr, ok := err.(awserr.Error); ok { - switch awserr.Code() { - case "AccessDeniedFault": - return resource.RetryableError(awserr) - } - } - // Didn't recognize the error, so shouldn't retry. - return resource.NonRetryableError(err) - } - // Successful delete - return nil - }) - if err != nil { - return err - } - - d.SetId(d.Get("endpoint_id").(string)) - return resourceAwsDmsEndpointRead(d, meta) -} - -func resourceAwsDmsEndpointRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - response, err := conn.DescribeEndpoints(&dms.DescribeEndpointsInput{ - Filters: []*dms.Filter{ - { - Name: aws.String("endpoint-id"), - Values: []*string{aws.String(d.Id())}, // Must use d.Id() to work with import. - }, - }, - }) - if err != nil { - if dmserr, ok := err.(awserr.Error); ok && dmserr.Code() == "ResourceNotFoundFault" { - log.Printf("[DEBUG] DMS Replication Endpoint %q Not Found", d.Id()) - d.SetId("") - return nil - } - return err - } - - err = resourceAwsDmsEndpointSetState(d, response.Endpoints[0]) - if err != nil { - return err - } - - tagsResp, err := conn.ListTagsForResource(&dms.ListTagsForResourceInput{ - ResourceArn: aws.String(d.Get("endpoint_arn").(string)), - }) - if err != nil { - return err - } - return d.Set("tags", dmsTagsToMap(tagsResp.TagList)) -} - -func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - request := &dms.ModifyEndpointInput{ - EndpointArn: aws.String(d.Get("endpoint_arn").(string)), - } - hasChanges := false - - if d.HasChange("endpoint_type") { - request.EndpointType = aws.String(d.Get("endpoint_type").(string)) - hasChanges = true - } - - if d.HasChange("certificate_arn") { - request.CertificateArn = aws.String(d.Get("certificate_arn").(string)) - hasChanges = true - } - - if d.HasChange("service_access_role") { - request.DynamoDbSettings = &dms.DynamoDbSettings{ - ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), - } - hasChanges = true - } - - if d.HasChange("endpoint_type") { - request.EndpointType = aws.String(d.Get("endpoint_type").(string)) - hasChanges = true - } - - if d.HasChange("engine_name") { - request.EngineName = aws.String(d.Get("engine_name").(string)) - hasChanges = true - } - - if d.HasChange("extra_connection_attributes") { - request.ExtraConnectionAttributes = aws.String(d.Get("extra_connection_attributes").(string)) - hasChanges = true - } - - if d.HasChange("ssl_mode") { - request.SslMode = aws.String(d.Get("ssl_mode").(string)) - hasChanges = true - } - - if d.HasChange("tags") { - err := dmsSetTags(d.Get("endpoint_arn").(string), d, meta) - if err != nil { - return err - } - } - - switch d.Get("engine_name").(string) { - case "dynamodb": - if d.HasChange("service_access_role") { - request.DynamoDbSettings = &dms.DynamoDbSettings{ - ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), - } - hasChanges = true - } - case "mongodb": - if d.HasChange("username") || - d.HasChange("password") || - d.HasChange("server_name") || - d.HasChange("port") || - d.HasChange("database_name") || - d.HasChange("mongodb_settings.0.auth_type") || - d.HasChange("mongodb_settings.0.auth_mechanism") || - d.HasChange("mongodb_settings.0.nesting_level") || - d.HasChange("mongodb_settings.0.extract_doc_id") || - d.HasChange("mongodb_settings.0.docs_to_investigate") || - d.HasChange("mongodb_settings.0.auth_source") { - request.MongoDbSettings = &dms.MongoDbSettings{ - Username: aws.String(d.Get("username").(string)), - Password: aws.String(d.Get("password").(string)), - ServerName: aws.String(d.Get("server_name").(string)), - Port: aws.Int64(int64(d.Get("port").(int))), - DatabaseName: aws.String(d.Get("database_name").(string)), - KmsKeyId: aws.String(d.Get("kms_key_arn").(string)), - - AuthType: aws.String(d.Get("mongodb_settings.0.auth_type").(string)), - AuthMechanism: aws.String(d.Get("mongodb_settings.0.auth_mechanism").(string)), - NestingLevel: aws.String(d.Get("mongodb_settings.0.nesting_level").(string)), - ExtractDocId: aws.String(d.Get("mongodb_settings.0.extract_doc_id").(string)), - DocsToInvestigate: aws.String(d.Get("mongodb_settings.0.docs_to_investigate").(string)), - AuthSource: aws.String(d.Get("mongodb_settings.0.auth_source").(string)), - } - request.EngineName = aws.String(d.Get("engine_name").(string)) // Must be included (should be 'mongodb') - - // Update connection info in top-level namespace as well - request.Username = aws.String(d.Get("username").(string)) - request.Password = aws.String(d.Get("password").(string)) - request.ServerName = aws.String(d.Get("server_name").(string)) - request.Port = aws.Int64(int64(d.Get("port").(int))) - request.DatabaseName = aws.String(d.Get("database_name").(string)) - - hasChanges = true - } - case "s3": - if d.HasChange("s3_settings.0.service_access_role_arn") || - d.HasChange("s3_settings.0.external_table_definition") || - d.HasChange("s3_settings.0.csv_row_delimiter") || - d.HasChange("s3_settings.0.csv_delimiter") || - d.HasChange("s3_settings.0.bucket_folder") || - d.HasChange("s3_settings.0.bucket_name") || - d.HasChange("s3_settings.0.compression_type") { - request.S3Settings = &dms.S3Settings{ - ServiceAccessRoleArn: aws.String(d.Get("s3_settings.0.service_access_role_arn").(string)), - ExternalTableDefinition: aws.String(d.Get("s3_settings.0.external_table_definition").(string)), - CsvRowDelimiter: aws.String(d.Get("s3_settings.0.csv_row_delimiter").(string)), - CsvDelimiter: aws.String(d.Get("s3_settings.0.csv_delimiter").(string)), - BucketFolder: aws.String(d.Get("s3_settings.0.bucket_folder").(string)), - BucketName: aws.String(d.Get("s3_settings.0.bucket_name").(string)), - CompressionType: aws.String(d.Get("s3_settings.0.compression_type").(string)), - } - request.EngineName = aws.String(d.Get("engine_name").(string)) // Must be included (should be 's3') - hasChanges = true - } - default: - if d.HasChange("database_name") { - request.DatabaseName = aws.String(d.Get("database_name").(string)) - hasChanges = true - } - - if d.HasChange("password") { - request.Password = aws.String(d.Get("password").(string)) - hasChanges = true - } - - if d.HasChange("port") { - request.Port = aws.Int64(int64(d.Get("port").(int))) - hasChanges = true - } - - if d.HasChange("server_name") { - request.ServerName = aws.String(d.Get("server_name").(string)) - hasChanges = true - } - - if d.HasChange("username") { - request.Username = aws.String(d.Get("username").(string)) - hasChanges = true - } - } - - if hasChanges { - log.Println("[DEBUG] DMS update endpoint:", request) - - _, err := conn.ModifyEndpoint(request) - if err != nil { - return err - } - - return resourceAwsDmsEndpointRead(d, meta) - } - - return nil -} - -func resourceAwsDmsEndpointDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - request := &dms.DeleteEndpointInput{ - EndpointArn: aws.String(d.Get("endpoint_arn").(string)), - } - - log.Printf("[DEBUG] DMS delete endpoint: %#v", request) - - _, err := conn.DeleteEndpoint(request) - return err -} - -func resourceAwsDmsEndpointSetState(d *schema.ResourceData, endpoint *dms.Endpoint) error { - d.SetId(*endpoint.EndpointIdentifier) - - d.Set("certificate_arn", endpoint.CertificateArn) - d.Set("endpoint_arn", endpoint.EndpointArn) - d.Set("endpoint_id", endpoint.EndpointIdentifier) - // For some reason the AWS API only accepts lowercase type but returns it as uppercase - d.Set("endpoint_type", strings.ToLower(*endpoint.EndpointType)) - d.Set("engine_name", endpoint.EngineName) - - switch *endpoint.EngineName { - case "dynamodb": - if endpoint.DynamoDbSettings != nil { - d.Set("service_access_role", endpoint.DynamoDbSettings.ServiceAccessRoleArn) - } else { - d.Set("service_access_role", "") - } - case "mongodb": - if endpoint.MongoDbSettings != nil { - d.Set("username", endpoint.MongoDbSettings.Username) - d.Set("server_name", endpoint.MongoDbSettings.ServerName) - d.Set("port", endpoint.MongoDbSettings.Port) - d.Set("database_name", endpoint.MongoDbSettings.DatabaseName) - } else { - d.Set("username", endpoint.Username) - d.Set("server_name", endpoint.ServerName) - d.Set("port", endpoint.Port) - d.Set("database_name", endpoint.DatabaseName) - } - if err := d.Set("mongodb_settings", flattenDmsMongoDbSettings(endpoint.MongoDbSettings)); err != nil { - return fmt.Errorf("Error setting mongodb_settings for DMS: %s", err) - } - case "s3": - if err := d.Set("s3_settings", flattenDmsS3Settings(endpoint.S3Settings)); err != nil { - return fmt.Errorf("Error setting s3_settings for DMS: %s", err) - } - default: - d.Set("database_name", endpoint.DatabaseName) - d.Set("extra_connection_attributes", endpoint.ExtraConnectionAttributes) - d.Set("port", endpoint.Port) - d.Set("server_name", endpoint.ServerName) - d.Set("username", endpoint.Username) - } - - d.Set("kms_key_arn", endpoint.KmsKeyId) - d.Set("ssl_mode", endpoint.SslMode) - - return nil -} - -func flattenDmsMongoDbSettings(settings *dms.MongoDbSettings) []map[string]interface{} { - if settings == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "auth_type": aws.StringValue(settings.AuthType), - "auth_mechanism": aws.StringValue(settings.AuthMechanism), - "nesting_level": aws.StringValue(settings.NestingLevel), - "extract_doc_id": aws.StringValue(settings.ExtractDocId), - "docs_to_investigate": aws.StringValue(settings.DocsToInvestigate), - "auth_source": aws.StringValue(settings.AuthSource), - } - - return []map[string]interface{}{m} -} - -func flattenDmsS3Settings(settings *dms.S3Settings) []map[string]interface{} { - if settings == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "service_access_role_arn": aws.StringValue(settings.ServiceAccessRoleArn), - "external_table_definition": aws.StringValue(settings.ExternalTableDefinition), - "csv_row_delimiter": aws.StringValue(settings.CsvRowDelimiter), - "csv_delimiter": aws.StringValue(settings.CsvDelimiter), - "bucket_folder": aws.StringValue(settings.BucketFolder), - "bucket_name": aws.StringValue(settings.BucketName), - "compression_type": aws.StringValue(settings.CompressionType), - } - - return []map[string]interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_instance.go deleted file mode 100644 index 9277b0171..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_instance.go +++ /dev/null @@ -1,416 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - dms "github.com/aws/aws-sdk-go/service/databasemigrationservice" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDmsReplicationInstance() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDmsReplicationInstanceCreate, - Read: resourceAwsDmsReplicationInstanceRead, - Update: resourceAwsDmsReplicationInstanceUpdate, - Delete: resourceAwsDmsReplicationInstanceDelete, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(30 * time.Minute), - Update: schema.DefaultTimeout(30 * time.Minute), - Delete: schema.DefaultTimeout(30 * time.Minute), - }, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "allocated_storage": { - Type: schema.TypeInt, - Computed: true, - Optional: true, - ValidateFunc: validation.IntBetween(5, 6144), - }, - "apply_immediately": { - Type: schema.TypeBool, - Optional: true, - }, - "auto_minor_version_upgrade": { - Type: schema.TypeBool, - Computed: true, - Optional: true, - }, - "availability_zone": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - }, - "engine_version": { - Type: schema.TypeString, - Computed: true, - Optional: true, - }, - "kms_key_arn": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "multi_az": { - Type: schema.TypeBool, - Computed: true, - Optional: true, - }, - "preferred_maintenance_window": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ValidateFunc: validateOnceAWeekWindowFormat, - }, - "publicly_accessible": { - Type: schema.TypeBool, - Computed: true, - Optional: true, - ForceNew: true, - }, - "replication_instance_arn": { - Type: schema.TypeString, - Computed: true, - }, - "replication_instance_class": { - Type: schema.TypeString, - Required: true, - // Valid Values: dms.t2.micro | dms.t2.small | dms.t2.medium | dms.t2.large | dms.c4.large | - // dms.c4.xlarge | dms.c4.2xlarge | dms.c4.4xlarge - }, - "replication_instance_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateDmsReplicationInstanceId, - }, - "replication_instance_private_ips": { - Type: schema.TypeList, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - }, - "replication_instance_public_ips": { - Type: schema.TypeList, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - }, - "replication_subnet_group_id": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - }, - "vpc_security_group_ids": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - Computed: true, - Optional: true, - }, - }, - } -} - -func resourceAwsDmsReplicationInstanceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - request := &dms.CreateReplicationInstanceInput{ - AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), - PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), - MultiAZ: aws.Bool(d.Get("multi_az").(bool)), - ReplicationInstanceClass: aws.String(d.Get("replication_instance_class").(string)), - ReplicationInstanceIdentifier: aws.String(d.Get("replication_instance_id").(string)), - Tags: dmsTagsFromMap(d.Get("tags").(map[string]interface{})), - } - - // WARNING: GetOk returns the zero value for the type if the key is omitted in config. This means for optional - // keys that the zero value is valid we cannot know if the zero value was in the config and cannot allow the API - // to set the default value. See GitHub Issue #5694 https://github.com/hashicorp/terraform/issues/5694 - - if v, ok := d.GetOk("allocated_storage"); ok { - request.AllocatedStorage = aws.Int64(int64(v.(int))) - } - if v, ok := d.GetOk("availability_zone"); ok { - request.AvailabilityZone = aws.String(v.(string)) - } - if v, ok := d.GetOk("engine_version"); ok { - request.EngineVersion = aws.String(v.(string)) - } - if v, ok := d.GetOk("kms_key_arn"); ok { - request.KmsKeyId = aws.String(v.(string)) - } - if v, ok := d.GetOk("preferred_maintenance_window"); ok { - request.PreferredMaintenanceWindow = aws.String(v.(string)) - } - if v, ok := d.GetOk("replication_subnet_group_id"); ok { - request.ReplicationSubnetGroupIdentifier = aws.String(v.(string)) - } - if v, ok := d.GetOk("vpc_security_group_ids"); ok { - request.VpcSecurityGroupIds = expandStringList(v.(*schema.Set).List()) - } - - log.Println("[DEBUG] DMS create replication instance:", request) - - _, err := conn.CreateReplicationInstance(request) - if err != nil { - return fmt.Errorf("error creating DMS Replication Instance: %s", err) - } - - d.SetId(d.Get("replication_instance_id").(string)) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "modifying"}, - Target: []string{"available"}, - Refresh: resourceAwsDmsReplicationInstanceStateRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for DMS Replication Instance (%s) creation: %s", d.Id(), err) - } - - return resourceAwsDmsReplicationInstanceRead(d, meta) -} - -func resourceAwsDmsReplicationInstanceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - response, err := conn.DescribeReplicationInstances(&dms.DescribeReplicationInstancesInput{ - Filters: []*dms.Filter{ - { - Name: aws.String("replication-instance-id"), - Values: []*string{aws.String(d.Id())}, // Must use d.Id() to work with import. - }, - }, - }) - - if isAWSErr(err, dms.ErrCodeResourceNotFoundFault, "") { - log.Printf("[WARN] DMS Replication Instance (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error describing DMS Replication Instance (%s): %s", d.Id(), err) - } - - if response == nil || len(response.ReplicationInstances) == 0 || response.ReplicationInstances[0] == nil { - log.Printf("[WARN] DMS Replication Instance (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - instance := response.ReplicationInstances[0] - - d.Set("allocated_storage", instance.AllocatedStorage) - d.Set("auto_minor_version_upgrade", instance.AutoMinorVersionUpgrade) - d.Set("availability_zone", instance.AvailabilityZone) - d.Set("engine_version", instance.EngineVersion) - d.Set("kms_key_arn", instance.KmsKeyId) - d.Set("multi_az", instance.MultiAZ) - d.Set("preferred_maintenance_window", instance.PreferredMaintenanceWindow) - d.Set("publicly_accessible", instance.PubliclyAccessible) - d.Set("replication_instance_arn", instance.ReplicationInstanceArn) - d.Set("replication_instance_class", instance.ReplicationInstanceClass) - d.Set("replication_instance_id", instance.ReplicationInstanceIdentifier) - - if err := d.Set("replication_instance_private_ips", aws.StringValueSlice(instance.ReplicationInstancePrivateIpAddresses)); err != nil { - return fmt.Errorf("error setting replication_instance_private_ips: %s", err) - } - - if err := d.Set("replication_instance_public_ips", aws.StringValueSlice(instance.ReplicationInstancePublicIpAddresses)); err != nil { - return fmt.Errorf("error setting replication_instance_private_ips: %s", err) - } - - d.Set("replication_subnet_group_id", instance.ReplicationSubnetGroup.ReplicationSubnetGroupIdentifier) - - vpc_security_group_ids := []string{} - for _, sg := range instance.VpcSecurityGroups { - vpc_security_group_ids = append(vpc_security_group_ids, aws.StringValue(sg.VpcSecurityGroupId)) - } - - if err := d.Set("vpc_security_group_ids", vpc_security_group_ids); err != nil { - return fmt.Errorf("error setting vpc_security_group_ids: %s", err) - } - - tagsResp, err := conn.ListTagsForResource(&dms.ListTagsForResourceInput{ - ResourceArn: aws.String(d.Get("replication_instance_arn").(string)), - }) - if err != nil { - return fmt.Errorf("error listing tags for DMS Replication Instance (%s): %s", d.Id(), err) - } - - if err := d.Set("tags", dmsTagsToMap(tagsResp.TagList)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func resourceAwsDmsReplicationInstanceUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - request := &dms.ModifyReplicationInstanceInput{ - ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), - ReplicationInstanceArn: aws.String(d.Get("replication_instance_arn").(string)), - } - hasChanges := false - - if d.HasChange("auto_minor_version_upgrade") { - request.AutoMinorVersionUpgrade = aws.Bool(d.Get("auto_minor_version_upgrade").(bool)) - hasChanges = true - } - - if d.HasChange("allocated_storage") { - if v, ok := d.GetOk("allocated_storage"); ok { - request.AllocatedStorage = aws.Int64(int64(v.(int))) - hasChanges = true - } - } - - if d.HasChange("engine_version") { - if v, ok := d.GetOk("engine_version"); ok { - request.EngineVersion = aws.String(v.(string)) - hasChanges = true - } - } - - if d.HasChange("multi_az") { - request.MultiAZ = aws.Bool(d.Get("multi_az").(bool)) - hasChanges = true - } - - if d.HasChange("preferred_maintenance_window") { - if v, ok := d.GetOk("preferred_maintenance_window"); ok { - request.PreferredMaintenanceWindow = aws.String(v.(string)) - hasChanges = true - } - } - - if d.HasChange("replication_instance_class") { - request.ReplicationInstanceClass = aws.String(d.Get("replication_instance_class").(string)) - hasChanges = true - } - - if d.HasChange("vpc_security_group_ids") { - if v, ok := d.GetOk("vpc_security_group_ids"); ok { - request.VpcSecurityGroupIds = expandStringList(v.(*schema.Set).List()) - hasChanges = true - } - } - - if d.HasChange("tags") { - err := dmsSetTags(d.Get("replication_instance_arn").(string), d, meta) - if err != nil { - return err - } - } - - if hasChanges { - _, err := conn.ModifyReplicationInstance(request) - if err != nil { - return fmt.Errorf("error modifying DMS Replication Instance (%s): %s", d.Id(), err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"modifying", "upgrading"}, - Target: []string{"available"}, - Refresh: resourceAwsDmsReplicationInstanceStateRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for DMS Replication Instance (%s) modification: %s", d.Id(), err) - } - } - - return resourceAwsDmsReplicationInstanceRead(d, meta) -} - -func resourceAwsDmsReplicationInstanceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - request := &dms.DeleteReplicationInstanceInput{ - ReplicationInstanceArn: aws.String(d.Get("replication_instance_arn").(string)), - } - - log.Printf("[DEBUG] DMS delete replication instance: %#v", request) - - _, err := conn.DeleteReplicationInstance(request) - - if isAWSErr(err, dms.ErrCodeResourceNotFoundFault, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting DMS Replication Instance (%s): %s", d.Id(), err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"deleting"}, - Target: []string{}, - Refresh: resourceAwsDmsReplicationInstanceStateRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutDelete), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for DMS Replication Instance (%s) deletion: %s", d.Id(), err) - } - - return nil -} - -func resourceAwsDmsReplicationInstanceStateRefreshFunc(conn *dms.DatabaseMigrationService, replicationInstanceID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - v, err := conn.DescribeReplicationInstances(&dms.DescribeReplicationInstancesInput{ - Filters: []*dms.Filter{ - { - Name: aws.String("replication-instance-id"), - Values: []*string{aws.String(replicationInstanceID)}, - }, - }, - }) - - if isAWSErr(err, dms.ErrCodeResourceNotFoundFault, "") { - return nil, "", nil - } - - if err != nil { - return nil, "", err - } - - if v == nil || len(v.ReplicationInstances) == 0 || v.ReplicationInstances[0] == nil { - return nil, "", nil - } - - return v, aws.StringValue(v.ReplicationInstances[0].ReplicationInstanceStatus), nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_subnet_group.go deleted file mode 100644 index 65dd8b7fb..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_subnet_group.go +++ /dev/null @@ -1,183 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - dms "github.com/aws/aws-sdk-go/service/databasemigrationservice" - - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDmsReplicationSubnetGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDmsReplicationSubnetGroupCreate, - Read: resourceAwsDmsReplicationSubnetGroupRead, - Update: resourceAwsDmsReplicationSubnetGroupUpdate, - Delete: resourceAwsDmsReplicationSubnetGroupDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "replication_subnet_group_arn": { - Type: schema.TypeString, - Computed: true, - }, - "replication_subnet_group_description": { - Type: schema.TypeString, - Required: true, - }, - "replication_subnet_group_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateDmsReplicationSubnetGroupId, - }, - "subnet_ids": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - Required: true, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsDmsReplicationSubnetGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - request := &dms.CreateReplicationSubnetGroupInput{ - ReplicationSubnetGroupIdentifier: aws.String(d.Get("replication_subnet_group_id").(string)), - ReplicationSubnetGroupDescription: aws.String(d.Get("replication_subnet_group_description").(string)), - SubnetIds: expandStringList(d.Get("subnet_ids").(*schema.Set).List()), - Tags: dmsTagsFromMap(d.Get("tags").(map[string]interface{})), - } - - log.Println("[DEBUG] DMS create replication subnet group:", request) - - _, err := conn.CreateReplicationSubnetGroup(request) - if err != nil { - return err - } - - d.SetId(d.Get("replication_subnet_group_id").(string)) - return resourceAwsDmsReplicationSubnetGroupRead(d, meta) -} - -func resourceAwsDmsReplicationSubnetGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - response, err := conn.DescribeReplicationSubnetGroups(&dms.DescribeReplicationSubnetGroupsInput{ - Filters: []*dms.Filter{ - { - Name: aws.String("replication-subnet-group-id"), - Values: []*string{aws.String(d.Id())}, // Must use d.Id() to work with import. - }, - }, - }) - if err != nil { - return err - } - if len(response.ReplicationSubnetGroups) == 0 { - d.SetId("") - return nil - } - - // The AWS API for DMS subnet groups does not return the ARN which is required to - // retrieve tags. This ARN can be built. - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "dms", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("subgrp:%s", d.Id()), - }.String() - d.Set("replication_subnet_group_arn", arn) - - err = resourceAwsDmsReplicationSubnetGroupSetState(d, response.ReplicationSubnetGroups[0]) - if err != nil { - return err - } - - tagsResp, err := conn.ListTagsForResource(&dms.ListTagsForResourceInput{ - ResourceArn: aws.String(d.Get("replication_subnet_group_arn").(string)), - }) - if err != nil { - return err - } - d.Set("tags", dmsTagsToMap(tagsResp.TagList)) - - return nil -} - -func resourceAwsDmsReplicationSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - // Updates to subnet groups are only valid when sending SubnetIds even if there are no - // changes to SubnetIds. - request := &dms.ModifyReplicationSubnetGroupInput{ - ReplicationSubnetGroupIdentifier: aws.String(d.Get("replication_subnet_group_id").(string)), - SubnetIds: expandStringList(d.Get("subnet_ids").(*schema.Set).List()), - } - - if d.HasChange("replication_subnet_group_description") { - request.ReplicationSubnetGroupDescription = aws.String(d.Get("replication_subnet_group_description").(string)) - } - - if d.HasChange("tags") { - err := dmsSetTags(d.Get("replication_subnet_group_arn").(string), d, meta) - if err != nil { - return err - } - } - - log.Println("[DEBUG] DMS update replication subnet group:", request) - - _, err := conn.ModifyReplicationSubnetGroup(request) - if err != nil { - return err - } - - return resourceAwsDmsReplicationSubnetGroupRead(d, meta) -} - -func resourceAwsDmsReplicationSubnetGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - request := &dms.DeleteReplicationSubnetGroupInput{ - ReplicationSubnetGroupIdentifier: aws.String(d.Get("replication_subnet_group_id").(string)), - } - - log.Printf("[DEBUG] DMS delete replication subnet group: %#v", request) - - _, err := conn.DeleteReplicationSubnetGroup(request) - return err -} - -func resourceAwsDmsReplicationSubnetGroupSetState(d *schema.ResourceData, group *dms.ReplicationSubnetGroup) error { - d.SetId(*group.ReplicationSubnetGroupIdentifier) - - subnet_ids := []string{} - for _, subnet := range group.Subnets { - subnet_ids = append(subnet_ids, aws.StringValue(subnet.SubnetIdentifier)) - } - - d.Set("replication_subnet_group_description", group.ReplicationSubnetGroupDescription) - d.Set("replication_subnet_group_id", group.ReplicationSubnetGroupIdentifier) - d.Set("subnet_ids", subnet_ids) - d.Set("vpc_id", group.VpcId) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go deleted file mode 100644 index 8a0455961..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go +++ /dev/null @@ -1,327 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - dms "github.com/aws/aws-sdk-go/service/databasemigrationservice" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDmsReplicationTask() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDmsReplicationTaskCreate, - Read: resourceAwsDmsReplicationTaskRead, - Update: resourceAwsDmsReplicationTaskUpdate, - Delete: resourceAwsDmsReplicationTaskDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "cdc_start_time": { - Type: schema.TypeString, - Optional: true, - // Requires a Unix timestamp in seconds. Example 1484346880 - }, - "migration_type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - dms.MigrationTypeValueFullLoad, - dms.MigrationTypeValueCdc, - dms.MigrationTypeValueFullLoadAndCdc, - }, false), - }, - "replication_instance_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "replication_task_arn": { - Type: schema.TypeString, - Computed: true, - }, - "replication_task_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateDmsReplicationTaskId, - }, - "replication_task_settings": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentJsonDiffs, - }, - "source_endpoint_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "table_mappings": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentJsonDiffs, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - }, - "target_endpoint_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - }, - } -} - -func resourceAwsDmsReplicationTaskCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - request := &dms.CreateReplicationTaskInput{ - MigrationType: aws.String(d.Get("migration_type").(string)), - ReplicationInstanceArn: aws.String(d.Get("replication_instance_arn").(string)), - ReplicationTaskIdentifier: aws.String(d.Get("replication_task_id").(string)), - SourceEndpointArn: aws.String(d.Get("source_endpoint_arn").(string)), - TableMappings: aws.String(d.Get("table_mappings").(string)), - Tags: dmsTagsFromMap(d.Get("tags").(map[string]interface{})), - TargetEndpointArn: aws.String(d.Get("target_endpoint_arn").(string)), - } - - if v, ok := d.GetOk("cdc_start_time"); ok { - seconds, err := strconv.ParseInt(v.(string), 10, 64) - if err != nil { - return fmt.Errorf("DMS create replication task. Invalid CDC Unix timestamp: %s", err) - } - request.CdcStartTime = aws.Time(time.Unix(seconds, 0)) - } - - if v, ok := d.GetOk("replication_task_settings"); ok { - request.ReplicationTaskSettings = aws.String(v.(string)) - } - - log.Println("[DEBUG] DMS create replication task:", request) - - _, err := conn.CreateReplicationTask(request) - if err != nil { - return err - } - - taskId := d.Get("replication_task_id").(string) - d.SetId(taskId) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating"}, - Target: []string{"ready"}, - Refresh: resourceAwsDmsReplicationTaskStateRefreshFunc(d, meta), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsDmsReplicationTaskRead(d, meta) -} - -func resourceAwsDmsReplicationTaskRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - response, err := conn.DescribeReplicationTasks(&dms.DescribeReplicationTasksInput{ - Filters: []*dms.Filter{ - { - Name: aws.String("replication-task-id"), - Values: []*string{aws.String(d.Id())}, // Must use d.Id() to work with import. - }, - }, - }) - if err != nil { - if dmserr, ok := err.(awserr.Error); ok && dmserr.Code() == "ResourceNotFoundFault" { - log.Printf("[DEBUG] DMS Replication Task %q Not Found", d.Id()) - d.SetId("") - return nil - } - return err - } - - err = resourceAwsDmsReplicationTaskSetState(d, response.ReplicationTasks[0]) - if err != nil { - return err - } - - tagsResp, err := conn.ListTagsForResource(&dms.ListTagsForResourceInput{ - ResourceArn: aws.String(d.Get("replication_task_arn").(string)), - }) - if err != nil { - return err - } - d.Set("tags", dmsTagsToMap(tagsResp.TagList)) - - return nil -} - -func resourceAwsDmsReplicationTaskUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - request := &dms.ModifyReplicationTaskInput{ - ReplicationTaskArn: aws.String(d.Get("replication_task_arn").(string)), - } - hasChanges := false - - if d.HasChange("cdc_start_time") { - seconds, err := strconv.ParseInt(d.Get("cdc_start_time").(string), 10, 64) - if err != nil { - return fmt.Errorf("DMS update replication task. Invalid CRC Unix timestamp: %s", err) - } - request.CdcStartTime = aws.Time(time.Unix(seconds, 0)) - hasChanges = true - } - - if d.HasChange("migration_type") { - request.MigrationType = aws.String(d.Get("migration_type").(string)) - hasChanges = true - } - - if d.HasChange("replication_task_settings") { - request.ReplicationTaskSettings = aws.String(d.Get("replication_task_settings").(string)) - hasChanges = true - } - - if d.HasChange("table_mappings") { - request.TableMappings = aws.String(d.Get("table_mappings").(string)) - hasChanges = true - } - - if d.HasChange("tags") { - err := dmsSetTags(d.Get("replication_task_arn").(string), d, meta) - if err != nil { - return err - } - } - - if hasChanges { - log.Println("[DEBUG] DMS update replication task:", request) - - _, err := conn.ModifyReplicationTask(request) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"modifying"}, - Target: []string{"ready", "stopped", "failed"}, - Refresh: resourceAwsDmsReplicationTaskStateRefreshFunc(d, meta), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsDmsReplicationTaskRead(d, meta) - } - - return nil -} - -func resourceAwsDmsReplicationTaskDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - request := &dms.DeleteReplicationTaskInput{ - ReplicationTaskArn: aws.String(d.Get("replication_task_arn").(string)), - } - - log.Printf("[DEBUG] DMS delete replication task: %#v", request) - - _, err := conn.DeleteReplicationTask(request) - if err != nil { - if dmserr, ok := err.(awserr.Error); ok && dmserr.Code() == "ResourceNotFoundFault" { - log.Printf("[DEBUG] DMS Replication Task %q Not Found", d.Id()) - return nil - } - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"deleting"}, - Target: []string{}, - Refresh: resourceAwsDmsReplicationTaskStateRefreshFunc(d, meta), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - - return err -} - -func resourceAwsDmsReplicationTaskSetState(d *schema.ResourceData, task *dms.ReplicationTask) error { - d.SetId(*task.ReplicationTaskIdentifier) - - d.Set("migration_type", task.MigrationType) - d.Set("replication_instance_arn", task.ReplicationInstanceArn) - d.Set("replication_task_arn", task.ReplicationTaskArn) - d.Set("replication_task_id", task.ReplicationTaskIdentifier) - d.Set("replication_task_settings", task.ReplicationTaskSettings) - d.Set("source_endpoint_arn", task.SourceEndpointArn) - d.Set("table_mappings", task.TableMappings) - d.Set("target_endpoint_arn", task.TargetEndpointArn) - - return nil -} - -func resourceAwsDmsReplicationTaskStateRefreshFunc( - d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - conn := meta.(*AWSClient).dmsconn - - v, err := conn.DescribeReplicationTasks(&dms.DescribeReplicationTasksInput{ - Filters: []*dms.Filter{ - { - Name: aws.String("replication-task-id"), - Values: []*string{aws.String(d.Id())}, // Must use d.Id() to work with import. - }, - }, - }) - if err != nil { - if dmserr, ok := err.(awserr.Error); ok && dmserr.Code() == "ResourceNotFoundFault" { - return nil, "", nil - } - log.Printf("Error on retrieving DMS Replication Task when waiting: %s", err) - return nil, "", err - } - - if v == nil { - return nil, "", nil - } - - if v.ReplicationTasks != nil { - log.Printf("[DEBUG] DMS Replication Task status for instance %s: %s", d.Id(), *v.ReplicationTasks[0].Status) - } - - return v, *v.ReplicationTasks[0].Status, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster.go deleted file mode 100644 index b4d09f7ee..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster.go +++ /dev/null @@ -1,799 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/docdb" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDocDBCluster() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDocDBClusterCreate, - Read: resourceAwsDocDBClusterRead, - Update: resourceAwsDocDBClusterUpdate, - Delete: resourceAwsDocDBClusterDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsDocDBClusterImport, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(120 * time.Minute), - Update: schema.DefaultTimeout(120 * time.Minute), - Delete: schema.DefaultTimeout(120 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "availability_zones": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - ForceNew: true, - Computed: true, - Set: schema.HashString, - }, - - "cluster_identifier": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"cluster_identifier_prefix"}, - ValidateFunc: validateDocDBIdentifier, - }, - "cluster_identifier_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"cluster_identifier"}, - ValidateFunc: validateDocDBIdentifierPrefix, - }, - - "cluster_members": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Computed: true, - Set: schema.HashString, - }, - - "db_subnet_group_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "db_cluster_parameter_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "reader_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "hosted_zone_id": { - Type: schema.TypeString, - Computed: true, - }, - - "engine": { - Type: schema.TypeString, - Optional: true, - Default: "docdb", - ForceNew: true, - ValidateFunc: validateDocDBEngine(), - }, - - "engine_version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "storage_encrypted": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - - "final_snapshot_identifier": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - es = append(es, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - es = append(es, fmt.Errorf("%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - es = append(es, fmt.Errorf("%q cannot end in a hyphen", k)) - } - return - }, - }, - - "skip_final_snapshot": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "master_username": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - }, - - "master_password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - - "snapshot_identifier": { - Type: schema.TypeString, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "port": { - Type: schema.TypeInt, - Optional: true, - Default: 27017, - ForceNew: true, - ValidateFunc: validation.IntBetween(1150, 65535), - }, - - "apply_immediately": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "vpc_security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "preferred_backup_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateOnceADayWindowFormat, - }, - - "preferred_maintenance_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - StateFunc: func(val interface{}) string { - if val == nil { - return "" - } - return strings.ToLower(val.(string)) - }, - ValidateFunc: validateOnceAWeekWindowFormat, - }, - - "backup_retention_period": { - Type: schema.TypeInt, - Optional: true, - Default: 1, - ValidateFunc: validation.IntAtMost(35), - }, - - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - - "cluster_resource_id": { - Type: schema.TypeString, - Computed: true, - }, - - "enabled_cloudwatch_logs_exports": { - Type: schema.TypeList, - Computed: false, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - "audit", - }, false), - }, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsDocDBClusterImport( - d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - // Neither skip_final_snapshot nor final_snapshot_identifier can be fetched - // from any API call, so we need to default skip_final_snapshot to true so - // that final_snapshot_identifier is not required - d.Set("skip_final_snapshot", true) - return []*schema.ResourceData{d}, nil -} - -func resourceAwsDocDBClusterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - tags := tagsFromMapDocDB(d.Get("tags").(map[string]interface{})) - - // Some API calls (e.g. RestoreDBClusterFromSnapshot do not support all - // parameters to correctly apply all settings in one pass. For missing - // parameters or unsupported configurations, we may need to call - // ModifyDBInstance afterwadocdb to prevent Terraform operators from API - // errors or needing to double apply. - var requiresModifyDbCluster bool - modifyDbClusterInput := &docdb.ModifyDBClusterInput{ - ApplyImmediately: aws.Bool(true), - } - - var identifier string - if v, ok := d.GetOk("cluster_identifier"); ok { - identifier = v.(string) - } else if v, ok := d.GetOk("cluster_identifier_prefix"); ok { - identifier = resource.PrefixedUniqueId(v.(string)) - } else { - identifier = resource.PrefixedUniqueId("tf-") - } - - if _, ok := d.GetOk("snapshot_identifier"); ok { - opts := docdb.RestoreDBClusterFromSnapshotInput{ - DBClusterIdentifier: aws.String(identifier), - Engine: aws.String(d.Get("engine").(string)), - SnapshotIdentifier: aws.String(d.Get("snapshot_identifier").(string)), - Tags: tags, - } - - if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { - opts.AvailabilityZones = expandStringList(attr.List()) - } - - if attr, ok := d.GetOk("backup_retention_period"); ok { - modifyDbClusterInput.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) - requiresModifyDbCluster = true - } - - if attr, ok := d.GetOk("db_subnet_group_name"); ok { - opts.DBSubnetGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { - modifyDbClusterInput.DBClusterParameterGroupName = aws.String(attr.(string)) - requiresModifyDbCluster = true - } - - if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { - opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) - } - - if attr, ok := d.GetOk("engine_version"); ok { - opts.EngineVersion = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("kms_key_id"); ok { - opts.KmsKeyId = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("port"); ok { - opts.Port = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("preferred_backup_window"); ok { - modifyDbClusterInput.PreferredBackupWindow = aws.String(attr.(string)) - requiresModifyDbCluster = true - } - - if attr, ok := d.GetOk("preferred_maintenance_window"); ok { - modifyDbClusterInput.PreferredMaintenanceWindow = aws.String(attr.(string)) - requiresModifyDbCluster = true - } - - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - opts.VpcSecurityGroupIds = expandStringList(attr.List()) - } - - log.Printf("[DEBUG] DocDB Cluster restore from snapshot configuration: %s", opts) - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.RestoreDBClusterFromSnapshot(&opts) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error creating DocDB Cluster: %s", err) - } - } else { - if _, ok := d.GetOk("master_password"); !ok { - return fmt.Errorf(`provider.aws: aws_docdb_cluster: %s: "master_password": required field is not set`, identifier) - } - - if _, ok := d.GetOk("master_username"); !ok { - return fmt.Errorf(`provider.aws: aws_docdb_cluster: %s: "master_username": required field is not set`, identifier) - } - - createOpts := &docdb.CreateDBClusterInput{ - DBClusterIdentifier: aws.String(identifier), - Engine: aws.String(d.Get("engine").(string)), - MasterUserPassword: aws.String(d.Get("master_password").(string)), - MasterUsername: aws.String(d.Get("master_username").(string)), - Tags: tags, - } - - if attr, ok := d.GetOk("port"); ok { - createOpts.Port = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("db_subnet_group_name"); ok { - createOpts.DBSubnetGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { - createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("engine_version"); ok { - createOpts.EngineVersion = aws.String(attr.(string)) - } - - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - createOpts.VpcSecurityGroupIds = expandStringList(attr.List()) - } - - if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { - createOpts.AvailabilityZones = expandStringList(attr.List()) - } - - if v, ok := d.GetOk("backup_retention_period"); ok { - createOpts.BackupRetentionPeriod = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("preferred_backup_window"); ok { - createOpts.PreferredBackupWindow = aws.String(v.(string)) - } - - if v, ok := d.GetOk("preferred_maintenance_window"); ok { - createOpts.PreferredMaintenanceWindow = aws.String(v.(string)) - } - - if attr, ok := d.GetOk("kms_key_id"); ok { - createOpts.KmsKeyId = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { - createOpts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) - } - - if attr, ok := d.GetOkExists("storage_encrypted"); ok { - createOpts.StorageEncrypted = aws.Bool(attr.(bool)) - } - - log.Printf("[DEBUG] DocDB Cluster create options: %s", createOpts) - var resp *docdb.CreateDBClusterOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - resp, err = conn.CreateDBCluster(createOpts) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error creating DocDB cluster: %s", err) - } - - log.Printf("[DEBUG]: DocDB Cluster create response: %s", resp) - } - - d.SetId(identifier) - - log.Printf("[INFO] DocDB Cluster ID: %s", d.Id()) - - log.Println( - "[INFO] Waiting for DocDB Cluster to be available") - - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsDocDBClusterCreatePendingStates, - Target: []string{"available"}, - Refresh: resourceAwsDocDBClusterStateRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for DocDB Cluster state to be \"available\": %s", err) - } - - if requiresModifyDbCluster { - modifyDbClusterInput.DBClusterIdentifier = aws.String(d.Id()) - - log.Printf("[INFO] DocDB Cluster (%s) configuration requires ModifyDBCluster: %s", d.Id(), modifyDbClusterInput) - _, err := conn.ModifyDBCluster(modifyDbClusterInput) - if err != nil { - return fmt.Errorf("error modifying DocDB Cluster (%s): %s", d.Id(), err) - } - - log.Printf("[INFO] Waiting for DocDB Cluster (%s) to be available", d.Id()) - err = waitForDocDBClusterUpdate(conn, d.Id(), d.Timeout(schema.TimeoutCreate)) - if err != nil { - return fmt.Errorf("error waiting for DocDB Cluster (%s) to be available: %s", d.Id(), err) - } - } - - return resourceAwsDocDBClusterRead(d, meta) -} - -func resourceAwsDocDBClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - - input := &docdb.DescribeDBClustersInput{ - DBClusterIdentifier: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Describing DocDB Cluster: %s", input) - resp, err := conn.DescribeDBClusters(input) - - if isAWSErr(err, docdb.ErrCodeDBClusterNotFoundFault, "") { - log.Printf("[WARN] DocDB Cluster (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error describing DocDB Cluster (%s): %s", d.Id(), err) - } - - if resp == nil { - return fmt.Errorf("Error retrieving DocDB cluster: empty response for: %s", input) - } - - var dbc *docdb.DBCluster - for _, c := range resp.DBClusters { - if aws.StringValue(c.DBClusterIdentifier) == d.Id() { - dbc = c - break - } - } - - if dbc == nil { - log.Printf("[WARN] DocDB Cluster (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err := d.Set("availability_zones", aws.StringValueSlice(dbc.AvailabilityZones)); err != nil { - return fmt.Errorf("error setting availability_zones: %s", err) - } - - d.Set("arn", dbc.DBClusterArn) - d.Set("backup_retention_period", dbc.BackupRetentionPeriod) - d.Set("cluster_identifier", dbc.DBClusterIdentifier) - - var cm []string - for _, m := range dbc.DBClusterMembers { - cm = append(cm, aws.StringValue(m.DBInstanceIdentifier)) - } - if err := d.Set("cluster_members", cm); err != nil { - return fmt.Errorf("error setting cluster_members: %s", err) - } - - d.Set("cluster_resource_id", dbc.DbClusterResourceId) - - d.Set("db_cluster_parameter_group_name", dbc.DBClusterParameterGroup) - d.Set("db_subnet_group_name", dbc.DBSubnetGroup) - - if err := d.Set("enabled_cloudwatch_logs_exports", aws.StringValueSlice(dbc.EnabledCloudwatchLogsExports)); err != nil { - return fmt.Errorf("error setting enabled_cloudwatch_logs_exports: %s", err) - } - - d.Set("endpoint", dbc.Endpoint) - d.Set("engine_version", dbc.EngineVersion) - d.Set("engine", dbc.Engine) - d.Set("hosted_zone_id", dbc.HostedZoneId) - - d.Set("kms_key_id", dbc.KmsKeyId) - d.Set("master_username", dbc.MasterUsername) - d.Set("port", dbc.Port) - d.Set("preferred_backup_window", dbc.PreferredBackupWindow) - d.Set("preferred_maintenance_window", dbc.PreferredMaintenanceWindow) - d.Set("reader_endpoint", dbc.ReaderEndpoint) - d.Set("storage_encrypted", dbc.StorageEncrypted) - - var vpcg []string - for _, g := range dbc.VpcSecurityGroups { - vpcg = append(vpcg, aws.StringValue(g.VpcSecurityGroupId)) - } - if err := d.Set("vpc_security_group_ids", vpcg); err != nil { - return fmt.Errorf("error setting vpc_security_group_ids: %s", err) - } - - // Fetch and save tags - if err := saveTagsDocDB(conn, d, aws.StringValue(dbc.DBClusterArn)); err != nil { - log.Printf("[WARN] Failed to save tags for DocDB Cluster (%s): %s", aws.StringValue(dbc.DBClusterIdentifier), err) - } - - return nil -} - -func resourceAwsDocDBClusterUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - requestUpdate := false - - req := &docdb.ModifyDBClusterInput{ - ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), - DBClusterIdentifier: aws.String(d.Id()), - } - - if d.HasChange("master_password") { - req.MasterUserPassword = aws.String(d.Get("master_password").(string)) - requestUpdate = true - } - - if d.HasChange("engine_version") { - req.EngineVersion = aws.String(d.Get("engine_version").(string)) - requestUpdate = true - } - - if d.HasChange("vpc_security_group_ids") { - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - req.VpcSecurityGroupIds = expandStringList(attr.List()) - } else { - req.VpcSecurityGroupIds = []*string{} - } - requestUpdate = true - } - - if d.HasChange("preferred_backup_window") { - req.PreferredBackupWindow = aws.String(d.Get("preferred_backup_window").(string)) - requestUpdate = true - } - - if d.HasChange("preferred_maintenance_window") { - req.PreferredMaintenanceWindow = aws.String(d.Get("preferred_maintenance_window").(string)) - requestUpdate = true - } - - if d.HasChange("backup_retention_period") { - req.BackupRetentionPeriod = aws.Int64(int64(d.Get("backup_retention_period").(int))) - requestUpdate = true - } - - if d.HasChange("db_cluster_parameter_group_name") { - d.SetPartial("db_cluster_parameter_group_name") - req.DBClusterParameterGroupName = aws.String(d.Get("db_cluster_parameter_group_name").(string)) - requestUpdate = true - } - - if d.HasChange("enabled_cloudwatch_logs_exports") { - d.SetPartial("enabled_cloudwatch_logs_exports") - req.CloudwatchLogsExportConfiguration = buildDocDBCloudwatchLogsExportConfiguration(d) - requestUpdate = true - } - - if requestUpdate { - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.ModifyDBCluster(req) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - - if isAWSErr(err, docdb.ErrCodeInvalidDBClusterStateFault, "is not currently in the available state") { - return resource.RetryableError(err) - } - - if isAWSErr(err, docdb.ErrCodeInvalidDBClusterStateFault, "DB cluster is not available for modification") { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Failed to modify DocDB Cluster (%s): %s", d.Id(), err) - } - - log.Printf("[INFO] Waiting for DocDB Cluster (%s) to be available", d.Id()) - err = waitForDocDBClusterUpdate(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return fmt.Errorf("error waiting for DocDB Cluster (%s) to be available: %s", d.Id(), err) - } - } - - if d.HasChange("tags") { - if err := setTagsDocDB(conn, d); err != nil { - return err - } - - d.SetPartial("tags") - } - - return resourceAwsDocDBClusterRead(d, meta) -} - -func resourceAwsDocDBClusterDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - log.Printf("[DEBUG] Destroying DocDB Cluster (%s)", d.Id()) - - deleteOpts := docdb.DeleteDBClusterInput{ - DBClusterIdentifier: aws.String(d.Id()), - } - - skipFinalSnapshot := d.Get("skip_final_snapshot").(bool) - deleteOpts.SkipFinalSnapshot = aws.Bool(skipFinalSnapshot) - - if !skipFinalSnapshot { - if name, present := d.GetOk("final_snapshot_identifier"); present { - deleteOpts.FinalDBSnapshotIdentifier = aws.String(name.(string)) - } else { - return fmt.Errorf("DocDB Cluster FinalSnapshotIdentifier is required when a final snapshot is required") - } - } - - log.Printf("[DEBUG] DocDB Cluster delete options: %s", deleteOpts) - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteDBCluster(&deleteOpts) - if err != nil { - if isAWSErr(err, docdb.ErrCodeInvalidDBClusterStateFault, "is not currently in the available state") { - return resource.RetryableError(err) - } - if isAWSErr(err, docdb.ErrCodeDBClusterNotFoundFault, "") { - return nil - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("DocDB Cluster cannot be deleted: %s", err) - } - - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsDocDBClusterDeletePendingStates, - Target: []string{"destroyed"}, - Refresh: resourceAwsDocDBClusterStateRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutDelete), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error deleting DocDB Cluster (%s): %s", d.Id(), err) - } - - return nil -} - -func resourceAwsDocDBClusterStateRefreshFunc(conn *docdb.DocDB, dbClusterIdentifier string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeDBClusters(&docdb.DescribeDBClustersInput{ - DBClusterIdentifier: aws.String(dbClusterIdentifier), - }) - - if isAWSErr(err, docdb.ErrCodeDBClusterNotFoundFault, "") { - return 42, "destroyed", nil - } - - if err != nil { - return nil, "", err - } - - var dbc *docdb.DBCluster - - for _, c := range resp.DBClusters { - if *c.DBClusterIdentifier == dbClusterIdentifier { - dbc = c - } - } - - if dbc == nil { - return 42, "destroyed", nil - } - - if dbc.Status != nil { - log.Printf("[DEBUG] DB Cluster status (%s): %s", dbClusterIdentifier, *dbc.Status) - } - - return dbc, aws.StringValue(dbc.Status), nil - } -} - -var resourceAwsDocDBClusterCreatePendingStates = []string{ - "creating", - "backing-up", - "modifying", - "preparing-data-migration", - "migrating", - "resetting-master-credentials", -} - -var resourceAwsDocDBClusterDeletePendingStates = []string{ - "available", - "deleting", - "backing-up", - "modifying", -} - -var resourceAwsDocDBClusterUpdatePendingStates = []string{ - "backing-up", - "modifying", - "resetting-master-credentials", - "upgrading", -} - -func waitForDocDBClusterUpdate(conn *docdb.DocDB, id string, timeout time.Duration) error { - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsDocDBClusterUpdatePendingStates, - Target: []string{"available"}, - Refresh: resourceAwsDocDBClusterStateRefreshFunc(conn, id), - Timeout: timeout, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - _, err := stateConf.WaitForState() - return err -} - -func buildDocDBCloudwatchLogsExportConfiguration(d *schema.ResourceData) *docdb.CloudwatchLogsExportConfiguration { - - oraw, nraw := d.GetChange("enabled_cloudwatch_logs_exports") - o := oraw.([]interface{}) - n := nraw.([]interface{}) - - create, disable := diffCloudwatchLogsExportConfiguration(o, n) - - return &docdb.CloudwatchLogsExportConfiguration{ - EnableLogTypes: expandStringList(create), - DisableLogTypes: expandStringList(disable), - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_parameter_group.go deleted file mode 100644 index 2d1fce488..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_parameter_group.go +++ /dev/null @@ -1,282 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/docdb" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -const docdbClusterParameterGroupMaxParamsBulkEdit = 20 - -func resourceAwsDocDBClusterParameterGroup() *schema.Resource { - - return &schema.Resource{ - Create: resourceAwsDocDBClusterParameterGroupCreate, - Read: resourceAwsDocDBClusterParameterGroupRead, - Update: resourceAwsDocDBClusterParameterGroupUpdate, - Delete: resourceAwsDocDBClusterParameterGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateDocDBParamGroupName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateDocDBParamGroupNamePrefix, - }, - "family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "Managed by Terraform", - }, - "parameter": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - "apply_method": { - Type: schema.TypeString, - Optional: true, - Default: docdb.ApplyMethodPendingReboot, - ValidateFunc: validation.StringInSlice([]string{ - docdb.ApplyMethodImmediate, - docdb.ApplyMethodPendingReboot, - }, false), - }, - }, - }, - }, - - "tags": tagsSchema(), - }, - } - -} - -func resourceAwsDocDBClusterParameterGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - tags := tagsFromMapDocDB(d.Get("tags").(map[string]interface{})) - - var groupName string - if v, ok := d.GetOk("name"); ok { - groupName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - groupName = resource.PrefixedUniqueId(v.(string)) - } else { - groupName = resource.UniqueId() - } - - createOpts := docdb.CreateDBClusterParameterGroupInput{ - DBClusterParameterGroupName: aws.String(groupName), - DBParameterGroupFamily: aws.String(d.Get("family").(string)), - Description: aws.String(d.Get("description").(string)), - Tags: tags, - } - - log.Printf("[DEBUG] Create DocDB Cluster Parameter Group: %#v", createOpts) - - resp, err := conn.CreateDBClusterParameterGroup(&createOpts) - if err != nil { - return fmt.Errorf("Error creating DocDB Cluster Parameter Group: %s", err) - } - - d.SetId(aws.StringValue(createOpts.DBClusterParameterGroupName)) - - d.Set("arn", resp.DBClusterParameterGroup.DBClusterParameterGroupArn) - - return resourceAwsDocDBClusterParameterGroupUpdate(d, meta) -} - -func resourceAwsDocDBClusterParameterGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - - describeOpts := &docdb.DescribeDBClusterParameterGroupsInput{ - DBClusterParameterGroupName: aws.String(d.Id()), - } - - describeResp, err := conn.DescribeDBClusterParameterGroups(describeOpts) - if err != nil { - if isAWSErr(err, docdb.ErrCodeDBParameterGroupNotFoundFault, "") { - log.Printf("[WARN] DocDB Cluster Parameter Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading DocDB Cluster Parameter Group (%s): %s", d.Id(), err) - } - - if len(describeResp.DBClusterParameterGroups) != 1 || - *describeResp.DBClusterParameterGroups[0].DBClusterParameterGroupName != d.Id() { - return fmt.Errorf("Unable to find Cluster Parameter Group: %#v", describeResp.DBClusterParameterGroups) - } - - arn := aws.StringValue(describeResp.DBClusterParameterGroups[0].DBClusterParameterGroupArn) - d.Set("arn", arn) - d.Set("description", describeResp.DBClusterParameterGroups[0].Description) - d.Set("family", describeResp.DBClusterParameterGroups[0].DBParameterGroupFamily) - d.Set("name", describeResp.DBClusterParameterGroups[0].DBClusterParameterGroupName) - - describeParametersOpts := &docdb.DescribeDBClusterParametersInput{ - DBClusterParameterGroupName: aws.String(d.Id()), - Source: aws.String("user"), - } - - describeParametersResp, err := conn.DescribeDBClusterParameters(describeParametersOpts) - if err != nil { - return fmt.Errorf("error reading DocDB Cluster Parameter Group (%s) parameters: %s", d.Id(), err) - } - - if err := d.Set("parameter", flattenDocDBParameters(describeParametersResp.Parameters)); err != nil { - return fmt.Errorf("error setting docdb cluster parameter: %s", err) - } - - resp, err := conn.ListTagsForResource(&docdb.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - - if err != nil { - return fmt.Errorf("error listing tags for DocDB Cluster Parameter Group (%s): %s", d.Id(), err) - } - - if err := d.Set("tags", tagsToMapDocDB(resp.TagList)); err != nil { - return fmt.Errorf("Error setting docdb parameter group tags: %s", err) - } - - return nil -} - -func resourceAwsDocDBClusterParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - - d.Partial(true) - - if d.HasChange("parameter") { - o, n := d.GetChange("parameter") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - parameters, err := expandDocDBParameters(ns.Difference(os).List()) - if err != nil { - return err - } - if len(parameters) > 0 { - // We can only modify 20 parameters at a time, so walk them until - // we've got them all. - for parameters != nil { - var paramsToModify []*docdb.Parameter - if len(parameters) <= docdbClusterParameterGroupMaxParamsBulkEdit { - paramsToModify, parameters = parameters[:], nil - } else { - paramsToModify, parameters = parameters[:docdbClusterParameterGroupMaxParamsBulkEdit], parameters[docdbClusterParameterGroupMaxParamsBulkEdit:] - } - parameterGroupName := d.Id() - modifyOpts := docdb.ModifyDBClusterParameterGroupInput{ - DBClusterParameterGroupName: aws.String(parameterGroupName), - Parameters: paramsToModify, - } - - log.Printf("[DEBUG] Modify DocDB Cluster Parameter Group: %#v", modifyOpts) - _, err := conn.ModifyDBClusterParameterGroup(&modifyOpts) - if err != nil { - if isAWSErr(err, docdb.ErrCodeDBParameterGroupNotFoundFault, "") { - log.Printf("[WARN] DocDB Cluster Parameter Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error modifying DocDB Cluster Parameter Group: %s", err) - } - } - d.SetPartial("parameter") - } - } - - if err := setTagsDocDB(conn, d); err != nil { - return err - } - d.SetPartial("tags") - - d.Partial(false) - - return resourceAwsDocDBClusterParameterGroupRead(d, meta) -} - -func resourceAwsDocDBClusterParameterGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - - deleteOpts := &docdb.DeleteDBClusterParameterGroupInput{ - DBClusterParameterGroupName: aws.String(d.Id()), - } - - _, err := conn.DeleteDBClusterParameterGroup(deleteOpts) - if err != nil { - if isAWSErr(err, docdb.ErrCodeDBParameterGroupNotFoundFault, "") { - return nil - } - return err - } - - return waitForDocDBClusterParameterGroupDeletion(conn, d.Id()) -} - -func waitForDocDBClusterParameterGroupDeletion(conn *docdb.DocDB, name string) error { - params := &docdb.DescribeDBClusterParameterGroupsInput{ - DBClusterParameterGroupName: aws.String(name), - } - - return resource.Retry(10*time.Minute, func() *resource.RetryError { - _, err := conn.DescribeDBClusterParameterGroups(params) - - if isAWSErr(err, docdb.ErrCodeDBParameterGroupNotFoundFault, "") { - return nil - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return resource.RetryableError(fmt.Errorf("DocDB Parameter Group (%s) still exists", name)) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_snapshot.go deleted file mode 100644 index ff94c0f36..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_snapshot.go +++ /dev/null @@ -1,206 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/docdb" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDocDBClusterSnapshot() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDocDBClusterSnapshotCreate, - Read: resourceAwsDocDBClusterSnapshotRead, - Delete: resourceAwsDocDBClusterSnapshotDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(20 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "db_cluster_snapshot_identifier": { - Type: schema.TypeString, - ValidateFunc: validateDocDBClusterSnapshotIdentifier, - Required: true, - ForceNew: true, - }, - "db_cluster_identifier": { - Type: schema.TypeString, - ValidateFunc: validateDocDBClusterIdentifier, - Required: true, - ForceNew: true, - }, - - "availability_zones": { - Type: schema.TypeList, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - }, - "db_cluster_snapshot_arn": { - Type: schema.TypeString, - Computed: true, - }, - "storage_encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - "engine": { - Type: schema.TypeString, - Computed: true, - }, - "engine_version": { - Type: schema.TypeString, - Computed: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Computed: true, - }, - "source_db_cluster_snapshot_arn": { - Type: schema.TypeString, - Computed: true, - }, - "snapshot_type": { - Type: schema.TypeString, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsDocDBClusterSnapshotCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - - params := &docdb.CreateDBClusterSnapshotInput{ - DBClusterIdentifier: aws.String(d.Get("db_cluster_identifier").(string)), - DBClusterSnapshotIdentifier: aws.String(d.Get("db_cluster_snapshot_identifier").(string)), - } - - _, err := conn.CreateDBClusterSnapshot(params) - if err != nil { - return fmt.Errorf("error creating DocDB Cluster Snapshot: %s", err) - } - d.SetId(d.Get("db_cluster_snapshot_identifier").(string)) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating"}, - Target: []string{"available"}, - Refresh: resourceAwsDocDBClusterSnapshotStateRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 5 * time.Second, - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for DocDB Cluster Snapshot %q to create: %s", d.Id(), err) - } - - return resourceAwsDocDBClusterSnapshotRead(d, meta) -} - -func resourceAwsDocDBClusterSnapshotRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - - params := &docdb.DescribeDBClusterSnapshotsInput{ - DBClusterSnapshotIdentifier: aws.String(d.Id()), - } - resp, err := conn.DescribeDBClusterSnapshots(params) - if err != nil { - if isAWSErr(err, docdb.ErrCodeDBClusterSnapshotNotFoundFault, "") { - log.Printf("[WARN] DocDB Cluster Snapshot %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading DocDB Cluster Snapshot %q: %s", d.Id(), err) - } - - if resp == nil || len(resp.DBClusterSnapshots) == 0 || resp.DBClusterSnapshots[0] == nil || aws.StringValue(resp.DBClusterSnapshots[0].DBClusterSnapshotIdentifier) != d.Id() { - log.Printf("[WARN] DocDB Cluster Snapshot %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - snapshot := resp.DBClusterSnapshots[0] - - if err := d.Set("availability_zones", flattenStringList(snapshot.AvailabilityZones)); err != nil { - return fmt.Errorf("error setting availability_zones: %s", err) - } - d.Set("db_cluster_identifier", snapshot.DBClusterIdentifier) - d.Set("db_cluster_snapshot_arn", snapshot.DBClusterSnapshotArn) - d.Set("db_cluster_snapshot_identifier", snapshot.DBClusterSnapshotIdentifier) - d.Set("engine_version", snapshot.EngineVersion) - d.Set("engine", snapshot.Engine) - d.Set("kms_key_id", snapshot.KmsKeyId) - d.Set("port", snapshot.Port) - d.Set("snapshot_type", snapshot.SnapshotType) - d.Set("source_db_cluster_snapshot_arn", snapshot.SourceDBClusterSnapshotArn) - d.Set("status", snapshot.Status) - d.Set("storage_encrypted", snapshot.StorageEncrypted) - d.Set("vpc_id", snapshot.VpcId) - - return nil -} - -func resourceAwsDocDBClusterSnapshotDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - - params := &docdb.DeleteDBClusterSnapshotInput{ - DBClusterSnapshotIdentifier: aws.String(d.Id()), - } - _, err := conn.DeleteDBClusterSnapshot(params) - if err != nil { - if isAWSErr(err, docdb.ErrCodeDBClusterSnapshotNotFoundFault, "") { - return nil - } - return fmt.Errorf("error deleting DocDB Cluster Snapshot %q: %s", d.Id(), err) - } - - return nil -} - -func resourceAwsDocDBClusterSnapshotStateRefreshFunc(dbClusterSnapshotIdentifier string, conn *docdb.DocDB) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - opts := &docdb.DescribeDBClusterSnapshotsInput{ - DBClusterSnapshotIdentifier: aws.String(dbClusterSnapshotIdentifier), - } - - log.Printf("[DEBUG] DocDB Cluster Snapshot describe configuration: %#v", opts) - - resp, err := conn.DescribeDBClusterSnapshots(opts) - if err != nil { - if isAWSErr(err, docdb.ErrCodeDBClusterSnapshotNotFoundFault, "") { - return nil, "", nil - } - return nil, "", fmt.Errorf("Error retrieving DocDB Cluster Snapshots: %s", err) - } - - if resp == nil || len(resp.DBClusterSnapshots) == 0 || resp.DBClusterSnapshots[0] == nil { - return nil, "", fmt.Errorf("No snapshots returned for %s", dbClusterSnapshotIdentifier) - } - - snapshot := resp.DBClusterSnapshots[0] - - return resp, aws.StringValue(snapshot.Status), nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_subnet_group.go deleted file mode 100644 index 4f34f9aa2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_subnet_group.go +++ /dev/null @@ -1,219 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/docdb" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDocDBSubnetGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDocDBSubnetGroupCreate, - Read: resourceAwsDocDBSubnetGroupRead, - Update: resourceAwsDocDBSubnetGroupUpdate, - Delete: resourceAwsDocDBSubnetGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateDocDBSubnetGroupName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateDocDBSubnetGroupNamePrefix, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - Default: "Managed by Terraform", - }, - - "subnet_ids": { - Type: schema.TypeSet, - Required: true, - MinItems: 1, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsDocDBSubnetGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - tags := tagsFromMapDocDB(d.Get("tags").(map[string]interface{})) - - subnetIds := expandStringSet(d.Get("subnet_ids").(*schema.Set)) - - var groupName string - if v, ok := d.GetOk("name"); ok { - groupName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - groupName = resource.PrefixedUniqueId(v.(string)) - } else { - groupName = resource.UniqueId() - } - - createOpts := docdb.CreateDBSubnetGroupInput{ - DBSubnetGroupName: aws.String(groupName), - DBSubnetGroupDescription: aws.String(d.Get("description").(string)), - SubnetIds: subnetIds, - Tags: tags, - } - - log.Printf("[DEBUG] Create DocDB Subnet Group: %#v", createOpts) - _, err := conn.CreateDBSubnetGroup(&createOpts) - if err != nil { - return fmt.Errorf("error creating DocDB Subnet Group: %s", err) - } - - d.SetId(groupName) - - return resourceAwsDocDBSubnetGroupRead(d, meta) -} - -func resourceAwsDocDBSubnetGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - - describeOpts := docdb.DescribeDBSubnetGroupsInput{ - DBSubnetGroupName: aws.String(d.Id()), - } - - var subnetGroups []*docdb.DBSubnetGroup - if err := conn.DescribeDBSubnetGroupsPages(&describeOpts, func(resp *docdb.DescribeDBSubnetGroupsOutput, lastPage bool) bool { - subnetGroups = append(subnetGroups, resp.DBSubnetGroups...) - return !lastPage - }); err != nil { - if isAWSErr(err, docdb.ErrCodeDBSubnetGroupNotFoundFault, "") { - log.Printf("[WARN] DocDB Subnet Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading DocDB Subnet Group (%s) parameters: %s", d.Id(), err) - } - - if len(subnetGroups) != 1 || - *subnetGroups[0].DBSubnetGroupName != d.Id() { - return fmt.Errorf("unable to find DocDB Subnet Group: %s, removing from state", d.Id()) - } - - subnetGroup := subnetGroups[0] - d.Set("name", subnetGroup.DBSubnetGroupName) - d.Set("description", subnetGroup.DBSubnetGroupDescription) - d.Set("arn", subnetGroup.DBSubnetGroupArn) - - subnets := make([]string, 0, len(subnetGroup.Subnets)) - for _, s := range subnetGroup.Subnets { - subnets = append(subnets, aws.StringValue(s.SubnetIdentifier)) - } - if err := d.Set("subnet_ids", subnets); err != nil { - return fmt.Errorf("error setting subnet_ids: %s", err) - } - - resp, err := conn.ListTagsForResource(&docdb.ListTagsForResourceInput{ - ResourceName: subnetGroup.DBSubnetGroupArn, - }) - - if err != nil { - return fmt.Errorf("error retrieving tags for ARN: %s", aws.StringValue(subnetGroup.DBSubnetGroupArn)) - } - - if err := d.Set("tags", tagsToMapDocDB(resp.TagList)); err != nil { - return fmt.Errorf("error setting DocDB Subnet Group tags: %s", err) - } - return nil -} - -func resourceAwsDocDBSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - - if d.HasChange("subnet_ids") || d.HasChange("description") { - _, n := d.GetChange("subnet_ids") - if n == nil { - n = new(schema.Set) - } - sIds := expandStringSet(n.(*schema.Set)) - - _, err := conn.ModifyDBSubnetGroup(&docdb.ModifyDBSubnetGroupInput{ - DBSubnetGroupName: aws.String(d.Id()), - DBSubnetGroupDescription: aws.String(d.Get("description").(string)), - SubnetIds: sIds, - }) - - if err != nil { - return fmt.Errorf("error modify DocDB Subnet Group (%s) parameters: %s", d.Id(), err) - } - } - - if err := setTagsDocDB(conn, d); err != nil { - return fmt.Errorf("error setting DocDB Subnet Group (%s) tags: %s", d.Id(), err) - } - d.SetPartial("tags") - - return resourceAwsDocDBSubnetGroupRead(d, meta) -} - -func resourceAwsDocDBSubnetGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).docdbconn - - delOpts := docdb.DeleteDBSubnetGroupInput{ - DBSubnetGroupName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting DocDB Subnet Group: %s", d.Id()) - - _, err := conn.DeleteDBSubnetGroup(&delOpts) - if err != nil { - if isAWSErr(err, docdb.ErrCodeDBSubnetGroupNotFoundFault, "") { - return nil - } - return fmt.Errorf("error deleting DocDB Subnet Group (%s): %s", d.Id(), err) - } - - return waitForDocDBSubnetGroupDeletion(conn, d.Id()) -} - -func waitForDocDBSubnetGroupDeletion(conn *docdb.DocDB, name string) error { - params := &docdb.DescribeDBSubnetGroupsInput{ - DBSubnetGroupName: aws.String(name), - } - - return resource.Retry(10*time.Minute, func() *resource.RetryError { - _, err := conn.DescribeDBSubnetGroups(params) - - if isAWSErr(err, docdb.ErrCodeDBSubnetGroupNotFoundFault, "") { - return nil - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return resource.RetryableError(fmt.Errorf("DocDB Subnet Group (%s) still exists", name)) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_bgp_peer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_bgp_peer.go deleted file mode 100644 index faed5acc5..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_bgp_peer.go +++ /dev/null @@ -1,210 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDxBgpPeer() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDxBgpPeerCreate, - Read: resourceAwsDxBgpPeerRead, - Delete: resourceAwsDxBgpPeerDelete, - - Schema: map[string]*schema.Schema{ - "address_family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), - }, - "bgp_asn": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "virtual_interface_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "amazon_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "bgp_auth_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "customer_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "bgp_status": { - Type: schema.TypeString, - Computed: true, - }, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - } -} - -func resourceAwsDxBgpPeerCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - vifId := d.Get("virtual_interface_id").(string) - addrFamily := d.Get("address_family").(string) - asn := int64(d.Get("bgp_asn").(int)) - - req := &directconnect.CreateBGPPeerInput{ - VirtualInterfaceId: aws.String(vifId), - NewBGPPeer: &directconnect.NewBGPPeer{ - AddressFamily: aws.String(addrFamily), - Asn: aws.Int64(asn), - }, - } - if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { - req.NewBGPPeer.AmazonAddress = aws.String(v.(string)) - } - if v, ok := d.GetOk("bgp_auth_key"); ok && v.(string) != "" { - req.NewBGPPeer.AuthKey = aws.String(v.(string)) - } - if v, ok := d.GetOk("customer_address"); ok && v.(string) != "" { - req.NewBGPPeer.CustomerAddress = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating Direct Connect BGP peer: %#v", req) - _, err := conn.CreateBGPPeer(req) - if err != nil { - return fmt.Errorf("Error creating Direct Connect BGP peer: %s", err) - } - - d.SetId(fmt.Sprintf("%s-%s-%d", vifId, addrFamily, asn)) - - stateConf := &resource.StateChangeConf{ - Pending: []string{ - directconnect.BGPPeerStatePending, - }, - Target: []string{ - directconnect.BGPPeerStateAvailable, - directconnect.BGPPeerStateVerifying, - }, - Refresh: dxBgpPeerStateRefresh(conn, vifId, addrFamily, asn), - Timeout: d.Timeout(schema.TimeoutDelete), - Delay: 10 * time.Second, - MinTimeout: 5 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for Direct Connect BGP peer (%s) to be available: %s", d.Id(), err) - } - - return resourceAwsDxBgpPeerRead(d, meta) -} - -func resourceAwsDxBgpPeerRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - vifId := d.Get("virtual_interface_id").(string) - addrFamily := d.Get("address_family").(string) - asn := int64(d.Get("bgp_asn").(int)) - - bgpPeerRaw, state, err := dxBgpPeerStateRefresh(conn, vifId, addrFamily, asn)() - if err != nil { - return fmt.Errorf("Error reading Direct Connect BGP peer: %s", err) - } - if state == directconnect.BGPPeerStateDeleted { - log.Printf("[WARN] Direct Connect BGP peer (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - bgpPeer := bgpPeerRaw.(*directconnect.BGPPeer) - d.Set("amazon_address", bgpPeer.AmazonAddress) - d.Set("bgp_auth_key", bgpPeer.AuthKey) - d.Set("customer_address", bgpPeer.CustomerAddress) - d.Set("bgp_status", bgpPeer.BgpStatus) - - return nil -} - -func resourceAwsDxBgpPeerDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - vifId := d.Get("virtual_interface_id").(string) - addrFamily := d.Get("address_family").(string) - asn := int64(d.Get("bgp_asn").(int)) - - log.Printf("[DEBUG] Deleting Direct Connect BGP peer: %s", d.Id()) - _, err := conn.DeleteBGPPeer(&directconnect.DeleteBGPPeerInput{ - Asn: aws.Int64(asn), - CustomerAddress: aws.String(d.Get("customer_address").(string)), - VirtualInterfaceId: aws.String(vifId), - }) - if err != nil { - // This is the error returned if the BGP peering has already gone. - if isAWSErr(err, "DirectConnectClientException", "The last BGP Peer on a Virtual Interface cannot be deleted") { - return nil - } - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{ - directconnect.BGPPeerStateAvailable, - directconnect.BGPPeerStateDeleting, - directconnect.BGPPeerStatePending, - directconnect.BGPPeerStateVerifying, - }, - Target: []string{ - directconnect.BGPPeerStateDeleted, - }, - Refresh: dxBgpPeerStateRefresh(conn, vifId, addrFamily, asn), - Timeout: d.Timeout(schema.TimeoutDelete), - Delay: 10 * time.Second, - MinTimeout: 5 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for Direct Connect BGP peer (%s) to be deleted: %s", d.Id(), err) - } - - return nil -} - -func dxBgpPeerStateRefresh(conn *directconnect.DirectConnect, vifId, addrFamily string, asn int64) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - vif, err := dxVirtualInterfaceRead(vifId, conn) - if err != nil { - return nil, "", err - } - if vif == nil { - return "", directconnect.BGPPeerStateDeleted, nil - } - - for _, bgpPeer := range vif.BgpPeers { - if aws.StringValue(bgpPeer.AddressFamily) == addrFamily && aws.Int64Value(bgpPeer.Asn) == asn { - return bgpPeer, aws.StringValue(bgpPeer.BgpPeerState), nil - } - } - - return "", directconnect.BGPPeerStateDeleted, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go deleted file mode 100644 index add11c529..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go +++ /dev/null @@ -1,189 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDxConnection() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDxConnectionCreate, - Read: resourceAwsDxConnectionRead, - Update: resourceAwsDxConnectionUpdate, - Delete: resourceAwsDxConnectionDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "bandwidth": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateDxConnectionBandWidth(), - }, - "location": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "jumbo_frame_capable": { - Type: schema.TypeBool, - Computed: true, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsDxConnectionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - req := &directconnect.CreateConnectionInput{ - Bandwidth: aws.String(d.Get("bandwidth").(string)), - ConnectionName: aws.String(d.Get("name").(string)), - Location: aws.String(d.Get("location").(string)), - } - - log.Printf("[DEBUG] Creating Direct Connect connection: %#v", req) - resp, err := conn.CreateConnection(req) - if err != nil { - return err - } - - d.SetId(aws.StringValue(resp.ConnectionId)) - return resourceAwsDxConnectionUpdate(d, meta) -} - -func resourceAwsDxConnectionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - resp, err := conn.DescribeConnections(&directconnect.DescribeConnectionsInput{ - ConnectionId: aws.String(d.Id()), - }) - if err != nil { - if isNoSuchDxConnectionErr(err) { - log.Printf("[WARN] Direct Connect connection (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - if len(resp.Connections) < 1 { - log.Printf("[WARN] Direct Connect connection (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - if len(resp.Connections) != 1 { - return fmt.Errorf("Number of Direct Connect connections (%s) isn't one, got %d", d.Id(), len(resp.Connections)) - } - connection := resp.Connections[0] - if d.Id() != aws.StringValue(connection.ConnectionId) { - return fmt.Errorf("Direct Connect connection (%s) not found", d.Id()) - } - if aws.StringValue(connection.ConnectionState) == directconnect.ConnectionStateDeleted { - log.Printf("[WARN] Direct Connect connection (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxcon/%s", d.Id()), - }.String() - d.Set("arn", arn) - d.Set("name", connection.ConnectionName) - d.Set("bandwidth", connection.Bandwidth) - d.Set("location", connection.Location) - d.Set("jumbo_frame_capable", connection.JumboFrameCapable) - - err1 := getTagsDX(conn, d, arn) - return err1 -} - -func resourceAwsDxConnectionUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxcon/%s", d.Id()), - }.String() - if err := setTagsDX(conn, d, arn); err != nil { - return err - } - - return resourceAwsDxConnectionRead(d, meta) -} - -func resourceAwsDxConnectionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - log.Printf("[DEBUG] Deleting Direct Connect connection: %s", d.Id()) - _, err := conn.DeleteConnection(&directconnect.DeleteConnectionInput{ - ConnectionId: aws.String(d.Id()), - }) - if err != nil { - if isNoSuchDxConnectionErr(err) { - return nil - } - return err - } - - deleteStateConf := &resource.StateChangeConf{ - Pending: []string{directconnect.ConnectionStatePending, directconnect.ConnectionStateOrdering, directconnect.ConnectionStateAvailable, directconnect.ConnectionStateRequested, directconnect.ConnectionStateDeleting}, - Target: []string{directconnect.ConnectionStateDeleted}, - Refresh: dxConnectionRefreshStateFunc(conn, d.Id()), - Timeout: 10 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - _, err = deleteStateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for Direct Connect connection (%s) to be deleted: %s", d.Id(), err) - } - - return nil -} - -func dxConnectionRefreshStateFunc(conn *directconnect.DirectConnect, connId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &directconnect.DescribeConnectionsInput{ - ConnectionId: aws.String(connId), - } - resp, err := conn.DescribeConnections(input) - if err != nil { - return nil, "failed", err - } - if len(resp.Connections) < 1 { - return resp, directconnect.ConnectionStateDeleted, nil - } - return resp, *resp.Connections[0].ConnectionState, nil - } -} - -func isNoSuchDxConnectionErr(err error) bool { - return isAWSErr(err, "DirectConnectClientException", "Could not find Connection with ID") -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection_association.go deleted file mode 100644 index 3d6a9cb1a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection_association.go +++ /dev/null @@ -1,94 +0,0 @@ -package aws - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDxConnectionAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDxConnectionAssociationCreate, - Read: resourceAwsDxConnectionAssociationRead, - Delete: resourceAwsDxConnectionAssociationDelete, - - Schema: map[string]*schema.Schema{ - "connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "lag_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsDxConnectionAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - input := &directconnect.AssociateConnectionWithLagInput{ - ConnectionId: aws.String(d.Get("connection_id").(string)), - LagId: aws.String(d.Get("lag_id").(string)), - } - resp, err := conn.AssociateConnectionWithLag(input) - if err != nil { - return err - } - - d.SetId(*resp.ConnectionId) - return nil -} - -func resourceAwsDxConnectionAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - input := &directconnect.DescribeConnectionsInput{ - ConnectionId: aws.String(d.Id()), - } - - resp, err := conn.DescribeConnections(input) - if err != nil { - return err - } - if len(resp.Connections) < 1 { - d.SetId("") - return nil - } - if len(resp.Connections) != 1 { - return fmt.Errorf("Found %d DX connections for %s, expected 1", len(resp.Connections), d.Id()) - } - if *resp.Connections[0].LagId != d.Get("lag_id").(string) { - d.SetId("") - return nil - } - - return nil -} - -func resourceAwsDxConnectionAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - input := &directconnect.DisassociateConnectionFromLagInput{ - ConnectionId: aws.String(d.Id()), - LagId: aws.String(d.Get("lag_id").(string)), - } - - return resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.DisassociateConnectionFromLag(input) - if err != nil { - if isAWSErr(err, directconnect.ErrCodeClientException, "is in a transitioning state.") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go deleted file mode 100644 index c98a3bbb6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go +++ /dev/null @@ -1,160 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDxGateway() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDxGatewayCreate, - Read: resourceAwsDxGatewayRead, - Delete: resourceAwsDxGatewayDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsDxGatewayImportState, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "amazon_side_asn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateAmazonSideAsn, - }, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - } -} - -func resourceAwsDxGatewayCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - req := &directconnect.CreateDirectConnectGatewayInput{ - DirectConnectGatewayName: aws.String(d.Get("name").(string)), - } - if asn, ok := d.GetOk("amazon_side_asn"); ok { - i, err := strconv.ParseInt(asn.(string), 10, 64) - if err != nil { - return err - } - req.AmazonSideAsn = aws.Int64(i) - } - - log.Printf("[DEBUG] Creating Direct Connect gateway: %#v", req) - resp, err := conn.CreateDirectConnectGateway(req) - if err != nil { - return fmt.Errorf("Error creating Direct Connect gateway: %s", err) - } - - d.SetId(aws.StringValue(resp.DirectConnectGateway.DirectConnectGatewayId)) - - stateConf := &resource.StateChangeConf{ - Pending: []string{directconnect.GatewayStatePending}, - Target: []string{directconnect.GatewayStateAvailable}, - Refresh: dxGatewayStateRefresh(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), - Delay: 10 * time.Second, - MinTimeout: 5 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for Direct Connect gateway (%s) to become available: %s", d.Id(), err) - } - - return resourceAwsDxGatewayRead(d, meta) -} - -func resourceAwsDxGatewayRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - dxGwRaw, state, err := dxGatewayStateRefresh(conn, d.Id())() - if err != nil { - return fmt.Errorf("Error reading Direct Connect gateway: %s", err) - } - if state == directconnect.GatewayStateDeleted { - log.Printf("[WARN] Direct Connect gateway (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - dxGw := dxGwRaw.(*directconnect.Gateway) - d.Set("name", aws.StringValue(dxGw.DirectConnectGatewayName)) - d.Set("amazon_side_asn", strconv.FormatInt(aws.Int64Value(dxGw.AmazonSideAsn), 10)) - - return nil -} - -func resourceAwsDxGatewayDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - _, err := conn.DeleteDirectConnectGateway(&directconnect.DeleteDirectConnectGatewayInput{ - DirectConnectGatewayId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, "DirectConnectClientException", "does not exist") { - return nil - } - return fmt.Errorf("Error deleting Direct Connect gateway: %s", err) - } - - if err := waitForDirectConnectGatewayDeletion(conn, d.Id(), d.Timeout(schema.TimeoutDelete)); err != nil { - return fmt.Errorf("Error waiting for Direct Connect gateway (%s) to be deleted: %s", d.Id(), err) - } - - return nil -} - -func dxGatewayStateRefresh(conn *directconnect.DirectConnect, dxgwId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeDirectConnectGateways(&directconnect.DescribeDirectConnectGatewaysInput{ - DirectConnectGatewayId: aws.String(dxgwId), - }) - if err != nil { - return nil, "", err - } - - n := len(resp.DirectConnectGateways) - switch n { - case 0: - return "", directconnect.GatewayStateDeleted, nil - - case 1: - dxgw := resp.DirectConnectGateways[0] - return dxgw, aws.StringValue(dxgw.DirectConnectGatewayState), nil - - default: - return nil, "", fmt.Errorf("Found %d Direct Connect gateways for %s, expected 1", n, dxgwId) - } - } -} - -func waitForDirectConnectGatewayDeletion(conn *directconnect.DirectConnect, gatewayID string, timeout time.Duration) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{directconnect.GatewayStatePending, directconnect.GatewayStateAvailable, directconnect.GatewayStateDeleting}, - Target: []string{directconnect.GatewayStateDeleted}, - Refresh: dxGatewayStateRefresh(conn, gatewayID), - Timeout: timeout, - Delay: 10 * time.Second, - MinTimeout: 5 * time.Second, - } - - _, err := stateConf.WaitForState() - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway_association.go deleted file mode 100644 index 615aca392..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway_association.go +++ /dev/null @@ -1,164 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -const ( - GatewayAssociationStateDeleted = "deleted" -) - -func resourceAwsDxGatewayAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDxGatewayAssociationCreate, - Read: resourceAwsDxGatewayAssociationRead, - Delete: resourceAwsDxGatewayAssociationDelete, - - Schema: map[string]*schema.Schema{ - "dx_gateway_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vpn_gateway_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(15 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - } -} - -func resourceAwsDxGatewayAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - dxgwId := d.Get("dx_gateway_id").(string) - vgwId := d.Get("vpn_gateway_id").(string) - req := &directconnect.CreateDirectConnectGatewayAssociationInput{ - DirectConnectGatewayId: aws.String(dxgwId), - VirtualGatewayId: aws.String(vgwId), - } - - log.Printf("[DEBUG] Creating Direct Connect gateway association: %#v", req) - _, err := conn.CreateDirectConnectGatewayAssociation(req) - if err != nil { - return fmt.Errorf("Error creating Direct Connect gateway association: %s", err) - } - - d.SetId(dxGatewayAssociationId(dxgwId, vgwId)) - - stateConf := &resource.StateChangeConf{ - Pending: []string{directconnect.GatewayAssociationStateAssociating}, - Target: []string{directconnect.GatewayAssociationStateAssociated}, - Refresh: dxGatewayAssociationStateRefresh(conn, dxgwId, vgwId), - Timeout: d.Timeout(schema.TimeoutCreate), - Delay: 10 * time.Second, - MinTimeout: 5 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for Direct Connect gateway association (%s) to become available: %s", d.Id(), err) - } - - return nil -} - -func resourceAwsDxGatewayAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - dxgwId := d.Get("dx_gateway_id").(string) - vgwId := d.Get("vpn_gateway_id").(string) - _, state, err := dxGatewayAssociationStateRefresh(conn, dxgwId, vgwId)() - if err != nil { - return fmt.Errorf("Error reading Direct Connect gateway association: %s", err) - } - if state == GatewayAssociationStateDeleted { - log.Printf("[WARN] Direct Connect gateway association (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return nil -} - -func resourceAwsDxGatewayAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - dxgwId := d.Get("dx_gateway_id").(string) - vgwId := d.Get("vpn_gateway_id").(string) - - log.Printf("[DEBUG] Deleting Direct Connect gateway association: %s", d.Id()) - - _, err := conn.DeleteDirectConnectGatewayAssociation(&directconnect.DeleteDirectConnectGatewayAssociationInput{ - DirectConnectGatewayId: aws.String(dxgwId), - VirtualGatewayId: aws.String(vgwId), - }) - if err != nil { - if isAWSErr(err, "DirectConnectClientException", "No association exists") { - return nil - } - return fmt.Errorf("Error deleting Direct Connect gateway association: %s", err) - } - - if err := waitForDirectConnectGatewayAssociationDeletion(conn, dxgwId, vgwId, d.Timeout(schema.TimeoutDelete)); err != nil { - return fmt.Errorf("Error waiting for Direct Connect gateway association (%s) to be deleted: %s", d.Id(), err.Error()) - } - - return nil -} - -func dxGatewayAssociationStateRefresh(conn *directconnect.DirectConnect, dxgwId, vgwId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeDirectConnectGatewayAssociations(&directconnect.DescribeDirectConnectGatewayAssociationsInput{ - DirectConnectGatewayId: aws.String(dxgwId), - VirtualGatewayId: aws.String(vgwId), - }) - if err != nil { - return nil, "", err - } - - n := len(resp.DirectConnectGatewayAssociations) - switch n { - case 0: - return "", GatewayAssociationStateDeleted, nil - - case 1: - assoc := resp.DirectConnectGatewayAssociations[0] - return assoc, aws.StringValue(assoc.AssociationState), nil - - default: - return nil, "", fmt.Errorf("Found %d Direct Connect gateway associations for %s, expected 1", n, dxGatewayAssociationId(dxgwId, vgwId)) - } - } -} - -func dxGatewayAssociationId(dxgwId, vgwId string) string { - return fmt.Sprintf("ga-%s%s", dxgwId, vgwId) -} - -func waitForDirectConnectGatewayAssociationDeletion(conn *directconnect.DirectConnect, directConnectGatewayID, virtualGatewayID string, timeout time.Duration) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{directconnect.GatewayAssociationStateDisassociating}, - Target: []string{directconnect.GatewayAssociationStateDisassociated, GatewayAssociationStateDeleted}, - Refresh: dxGatewayAssociationStateRefresh(conn, directConnectGatewayID, virtualGatewayID), - Timeout: timeout, - Delay: 10 * time.Second, - MinTimeout: 5 * time.Second, - } - - _, err := stateConf.WaitForState() - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface.go deleted file mode 100644 index 56fc6f85a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface.go +++ /dev/null @@ -1,209 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDxHostedPrivateVirtualInterfaceCreate, - Read: resourceAwsDxHostedPrivateVirtualInterfaceRead, - Delete: resourceAwsDxHostedPrivateVirtualInterfaceDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsDxHostedPrivateVirtualInterfaceImport, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vlan": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - ValidateFunc: validation.IntBetween(1, 4094), - }, - "bgp_asn": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "bgp_auth_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "address_family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), - }, - "customer_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "amazon_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "owner_account_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateAwsAccountId, - }, - "mtu": { - Type: schema.TypeInt, - Default: 1500, - Optional: true, - ForceNew: true, - ValidateFunc: validateIntegerInSlice([]int{1500, 9001}), - }, - "jumbo_frame_capable": { - Type: schema.TypeBool, - Computed: true, - }, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Update: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - } -} - -func resourceAwsDxHostedPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - req := &directconnect.AllocatePrivateVirtualInterfaceInput{ - ConnectionId: aws.String(d.Get("connection_id").(string)), - OwnerAccount: aws.String(d.Get("owner_account_id").(string)), - NewPrivateVirtualInterfaceAllocation: &directconnect.NewPrivateVirtualInterfaceAllocation{ - VirtualInterfaceName: aws.String(d.Get("name").(string)), - Vlan: aws.Int64(int64(d.Get("vlan").(int))), - Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), - AddressFamily: aws.String(d.Get("address_family").(string)), - Mtu: aws.Int64(int64(d.Get("mtu").(int))), - }, - } - if v, ok := d.GetOk("bgp_auth_key"); ok && v.(string) != "" { - req.NewPrivateVirtualInterfaceAllocation.AuthKey = aws.String(v.(string)) - } - if v, ok := d.GetOk("customer_address"); ok && v.(string) != "" { - req.NewPrivateVirtualInterfaceAllocation.CustomerAddress = aws.String(v.(string)) - } - if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { - req.NewPrivateVirtualInterfaceAllocation.AmazonAddress = aws.String(v.(string)) - } - if v, ok := d.GetOk("mtu"); ok && v.(int) != 0 { - req.NewPrivateVirtualInterfaceAllocation.Mtu = aws.Int64(int64(v.(int))) - } - - log.Printf("[DEBUG] Creating Direct Connect hosted private virtual interface: %#v", req) - resp, err := conn.AllocatePrivateVirtualInterface(req) - if err != nil { - return fmt.Errorf("Error creating Direct Connect hosted private virtual interface: %s", err.Error()) - } - - d.SetId(aws.StringValue(resp.VirtualInterfaceId)) - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - if err := dxHostedPrivateVirtualInterfaceWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { - return err - } - - return resourceAwsDxHostedPrivateVirtualInterfaceRead(d, meta) -} - -func resourceAwsDxHostedPrivateVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - vif, err := dxVirtualInterfaceRead(d.Id(), conn) - if err != nil { - return err - } - if vif == nil { - log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("connection_id", vif.ConnectionId) - d.Set("name", vif.VirtualInterfaceName) - d.Set("vlan", vif.Vlan) - d.Set("bgp_asn", vif.Asn) - d.Set("bgp_auth_key", vif.AuthKey) - d.Set("address_family", vif.AddressFamily) - d.Set("customer_address", vif.CustomerAddress) - d.Set("amazon_address", vif.AmazonAddress) - d.Set("owner_account_id", vif.OwnerAccount) - d.Set("mtu", vif.Mtu) - d.Set("jumbo_frame_capable", vif.JumboFrameCapable) - - return nil -} - -func resourceAwsDxHostedPrivateVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { - return dxVirtualInterfaceDelete(d, meta) -} - -func resourceAwsDxHostedPrivateVirtualInterfaceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - return []*schema.ResourceData{d}, nil -} - -func dxHostedPrivateVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { - return dxVirtualInterfaceWaitUntilAvailable( - conn, - vifId, - timeout, - []string{ - directconnect.VirtualInterfaceStatePending, - }, - []string{ - directconnect.VirtualInterfaceStateAvailable, - directconnect.VirtualInterfaceStateConfirming, - directconnect.VirtualInterfaceStateDown, - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go deleted file mode 100644 index 7f7f62141..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go +++ /dev/null @@ -1,166 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDxHostedPrivateVirtualInterfaceAccepter() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDxHostedPrivateVirtualInterfaceAccepterCreate, - Read: resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead, - Update: resourceAwsDxHostedPrivateVirtualInterfaceAccepterUpdate, - Delete: resourceAwsDxHostedPrivateVirtualInterfaceAccepterDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsDxHostedPrivateVirtualInterfaceAccepterImport, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "virtual_interface_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vpn_gateway_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"dx_gateway_id"}, - }, - "dx_gateway_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"vpn_gateway_id"}, - }, - "tags": tagsSchema(), - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - } -} - -func resourceAwsDxHostedPrivateVirtualInterfaceAccepterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - vgwIdRaw, vgwOk := d.GetOk("vpn_gateway_id") - dxgwIdRaw, dxgwOk := d.GetOk("dx_gateway_id") - if vgwOk == dxgwOk { - return fmt.Errorf( - "One of ['vpn_gateway_id', 'dx_gateway_id'] must be set to create a Direct Connect private virtual interface accepter") - } - - vifId := d.Get("virtual_interface_id").(string) - req := &directconnect.ConfirmPrivateVirtualInterfaceInput{ - VirtualInterfaceId: aws.String(vifId), - } - if vgwOk && vgwIdRaw.(string) != "" { - req.VirtualGatewayId = aws.String(vgwIdRaw.(string)) - } - if dxgwOk && dxgwIdRaw.(string) != "" { - req.DirectConnectGatewayId = aws.String(dxgwIdRaw.(string)) - } - - log.Printf("[DEBUG] Accepting Direct Connect hosted private virtual interface: %#v", req) - _, err := conn.ConfirmPrivateVirtualInterface(req) - if err != nil { - return fmt.Errorf("Error accepting Direct Connect hosted private virtual interface: %s", err.Error()) - } - - d.SetId(vifId) - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - if err := dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { - return err - } - - return resourceAwsDxHostedPrivateVirtualInterfaceAccepterUpdate(d, meta) -} - -func resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - vif, err := dxVirtualInterfaceRead(d.Id(), conn) - if err != nil { - return err - } - if vif == nil { - log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - vifState := aws.StringValue(vif.VirtualInterfaceState) - if vifState != directconnect.VirtualInterfaceStateAvailable && - vifState != directconnect.VirtualInterfaceStateDown { - log.Printf("[WARN] Direct Connect virtual interface (%s) is '%s', removing from state", vifState, d.Id()) - d.SetId("") - return nil - } - - d.Set("virtual_interface_id", vif.VirtualInterfaceId) - d.Set("vpn_gateway_id", vif.VirtualGatewayId) - d.Set("dx_gateway_id", vif.DirectConnectGatewayId) - err1 := getTagsDX(conn, d, d.Get("arn").(string)) - return err1 -} - -func resourceAwsDxHostedPrivateVirtualInterfaceAccepterUpdate(d *schema.ResourceData, meta interface{}) error { - if err := dxVirtualInterfaceUpdate(d, meta); err != nil { - return err - } - - return resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead(d, meta) -} - -func resourceAwsDxHostedPrivateVirtualInterfaceAccepterDelete(d *schema.ResourceData, meta interface{}) error { - log.Printf("[WARN] Will not delete Direct Connect virtual interface. Terraform will remove this resource from the state file, however resources may remain.") - return nil -} - -func resourceAwsDxHostedPrivateVirtualInterfaceAccepterImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - return []*schema.ResourceData{d}, nil -} - -func dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { - return dxVirtualInterfaceWaitUntilAvailable( - conn, - vifId, - timeout, - []string{ - directconnect.VirtualInterfaceStateConfirming, - directconnect.VirtualInterfaceStatePending, - }, - []string{ - directconnect.VirtualInterfaceStateAvailable, - directconnect.VirtualInterfaceStateDown, - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface.go deleted file mode 100644 index 850acd898..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface.go +++ /dev/null @@ -1,215 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDxHostedPublicVirtualInterface() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDxHostedPublicVirtualInterfaceCreate, - Read: resourceAwsDxHostedPublicVirtualInterfaceRead, - Delete: resourceAwsDxHostedPublicVirtualInterfaceDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsDxHostedPublicVirtualInterfaceImport, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vlan": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - ValidateFunc: validation.IntBetween(1, 4094), - }, - "bgp_asn": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "bgp_auth_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "address_family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), - }, - "customer_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "amazon_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "owner_account_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateAwsAccountId, - }, - "route_filter_prefixes": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - MinItems: 1, - }, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - } -} - -func resourceAwsDxHostedPublicVirtualInterfaceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - addressFamily := d.Get("address_family").(string) - caRaw, caOk := d.GetOk("customer_address") - aaRaw, aaOk := d.GetOk("amazon_address") - if addressFamily == directconnect.AddressFamilyIpv4 { - if !caOk { - return fmt.Errorf("'customer_address' must be set when 'address_family' is '%s'", addressFamily) - } - if !aaOk { - return fmt.Errorf("'amazon_address' must be set when 'address_family' is '%s'", addressFamily) - } - } - - req := &directconnect.AllocatePublicVirtualInterfaceInput{ - ConnectionId: aws.String(d.Get("connection_id").(string)), - OwnerAccount: aws.String(d.Get("owner_account_id").(string)), - NewPublicVirtualInterfaceAllocation: &directconnect.NewPublicVirtualInterfaceAllocation{ - VirtualInterfaceName: aws.String(d.Get("name").(string)), - Vlan: aws.Int64(int64(d.Get("vlan").(int))), - Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), - AddressFamily: aws.String(addressFamily), - }, - } - if v, ok := d.GetOk("bgp_auth_key"); ok && v.(string) != "" { - req.NewPublicVirtualInterfaceAllocation.AuthKey = aws.String(v.(string)) - } - if caOk && caRaw.(string) != "" { - req.NewPublicVirtualInterfaceAllocation.CustomerAddress = aws.String(caRaw.(string)) - } - if aaOk && aaRaw.(string) != "" { - req.NewPublicVirtualInterfaceAllocation.AmazonAddress = aws.String(aaRaw.(string)) - } - if v, ok := d.GetOk("route_filter_prefixes"); ok { - req.NewPublicVirtualInterfaceAllocation.RouteFilterPrefixes = expandDxRouteFilterPrefixes(v.(*schema.Set).List()) - } - - log.Printf("[DEBUG] Allocating Direct Connect hosted public virtual interface: %#v", req) - resp, err := conn.AllocatePublicVirtualInterface(req) - if err != nil { - return fmt.Errorf("Error allocating Direct Connect hosted public virtual interface: %s", err.Error()) - } - - d.SetId(aws.StringValue(resp.VirtualInterfaceId)) - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - if err := dxHostedPublicVirtualInterfaceWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { - return err - } - - return resourceAwsDxHostedPublicVirtualInterfaceRead(d, meta) -} - -func resourceAwsDxHostedPublicVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - vif, err := dxVirtualInterfaceRead(d.Id(), conn) - if err != nil { - return err - } - if vif == nil { - log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("connection_id", vif.ConnectionId) - d.Set("name", vif.VirtualInterfaceName) - d.Set("vlan", vif.Vlan) - d.Set("bgp_asn", vif.Asn) - d.Set("bgp_auth_key", vif.AuthKey) - d.Set("address_family", vif.AddressFamily) - d.Set("customer_address", vif.CustomerAddress) - d.Set("amazon_address", vif.AmazonAddress) - d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes)) - d.Set("owner_account_id", vif.OwnerAccount) - - return nil -} - -func resourceAwsDxHostedPublicVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { - return dxVirtualInterfaceDelete(d, meta) -} - -func resourceAwsDxHostedPublicVirtualInterfaceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - return []*schema.ResourceData{d}, nil -} - -func dxHostedPublicVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { - return dxVirtualInterfaceWaitUntilAvailable( - conn, - vifId, - timeout, - []string{ - directconnect.VirtualInterfaceStatePending, - }, - []string{ - directconnect.VirtualInterfaceStateAvailable, - directconnect.VirtualInterfaceStateConfirming, - directconnect.VirtualInterfaceStateDown, - directconnect.VirtualInterfaceStateVerifying, - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go deleted file mode 100644 index 87b127b96..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go +++ /dev/null @@ -1,141 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDxHostedPublicVirtualInterfaceAccepter() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDxHostedPublicVirtualInterfaceAccepterCreate, - Read: resourceAwsDxHostedPublicVirtualInterfaceAccepterRead, - Update: resourceAwsDxHostedPublicVirtualInterfaceAccepterUpdate, - Delete: resourceAwsDxHostedPublicVirtualInterfaceAccepterDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsDxHostedPublicVirtualInterfaceAccepterImport, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "virtual_interface_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "tags": tagsSchema(), - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - } -} - -func resourceAwsDxHostedPublicVirtualInterfaceAccepterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - vifId := d.Get("virtual_interface_id").(string) - req := &directconnect.ConfirmPublicVirtualInterfaceInput{ - VirtualInterfaceId: aws.String(vifId), - } - - log.Printf("[DEBUG] Accepting Direct Connect hosted public virtual interface: %#v", req) - _, err := conn.ConfirmPublicVirtualInterface(req) - if err != nil { - return fmt.Errorf("Error accepting Direct Connect hosted public virtual interface: %s", err.Error()) - } - - d.SetId(vifId) - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - if err := dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { - return err - } - - return resourceAwsDxHostedPublicVirtualInterfaceAccepterUpdate(d, meta) -} - -func resourceAwsDxHostedPublicVirtualInterfaceAccepterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - vif, err := dxVirtualInterfaceRead(d.Id(), conn) - if err != nil { - return err - } - if vif == nil { - log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - vifState := aws.StringValue(vif.VirtualInterfaceState) - if vifState != directconnect.VirtualInterfaceStateAvailable && - vifState != directconnect.VirtualInterfaceStateDown && - vifState != directconnect.VirtualInterfaceStateVerifying { - log.Printf("[WARN] Direct Connect virtual interface (%s) is '%s', removing from state", vifState, d.Id()) - d.SetId("") - return nil - } - - d.Set("virtual_interface_id", vif.VirtualInterfaceId) - err1 := getTagsDX(conn, d, d.Get("arn").(string)) - return err1 -} - -func resourceAwsDxHostedPublicVirtualInterfaceAccepterUpdate(d *schema.ResourceData, meta interface{}) error { - if err := dxVirtualInterfaceUpdate(d, meta); err != nil { - return err - } - - return resourceAwsDxHostedPublicVirtualInterfaceAccepterRead(d, meta) -} - -func resourceAwsDxHostedPublicVirtualInterfaceAccepterDelete(d *schema.ResourceData, meta interface{}) error { - log.Printf("[WARN] Will not delete Direct Connect virtual interface. Terraform will remove this resource from the state file, however resources may remain.") - return nil -} - -func resourceAwsDxHostedPublicVirtualInterfaceAccepterImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - return []*schema.ResourceData{d}, nil -} - -func dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { - return dxVirtualInterfaceWaitUntilAvailable( - conn, - vifId, - timeout, - []string{ - directconnect.VirtualInterfaceStateConfirming, - directconnect.VirtualInterfaceStatePending, - }, - []string{ - directconnect.VirtualInterfaceStateAvailable, - directconnect.VirtualInterfaceStateDown, - directconnect.VirtualInterfaceStateVerifying, - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go deleted file mode 100644 index ad844e961..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go +++ /dev/null @@ -1,255 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDxLag() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDxLagCreate, - Read: resourceAwsDxLagRead, - Update: resourceAwsDxLagUpdate, - Delete: resourceAwsDxLagDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - }, - "connections_bandwidth": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateDxConnectionBandWidth(), - }, - "location": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "number_of_connections": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - Deprecated: "Use aws_dx_connection and aws_dx_connection_association resources instead. " + - "Default connections will be removed as part of LAG creation automatically in future versions.", - }, - "force_destroy": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsDxLagCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - var noOfConnections int - if v, ok := d.GetOk("number_of_connections"); ok { - noOfConnections = v.(int) - } else { - noOfConnections = 1 - } - - req := &directconnect.CreateLagInput{ - ConnectionsBandwidth: aws.String(d.Get("connections_bandwidth").(string)), - LagName: aws.String(d.Get("name").(string)), - Location: aws.String(d.Get("location").(string)), - NumberOfConnections: aws.Int64(int64(noOfConnections)), - } - - log.Printf("[DEBUG] Creating Direct Connect LAG: %#v", req) - resp, err := conn.CreateLag(req) - if err != nil { - return err - } - - // TODO: Remove default connection(s) automatically provisioned by AWS - // per NumberOfConnections - - d.SetId(aws.StringValue(resp.LagId)) - return resourceAwsDxLagUpdate(d, meta) -} - -func resourceAwsDxLagRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - resp, err := conn.DescribeLags(&directconnect.DescribeLagsInput{ - LagId: aws.String(d.Id()), - }) - if err != nil { - if isNoSuchDxLagErr(err) { - log.Printf("[WARN] Direct Connect LAG (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - if len(resp.Lags) < 1 { - log.Printf("[WARN] Direct Connect LAG (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - if len(resp.Lags) != 1 { - return fmt.Errorf("Number of Direct Connect LAGs (%s) isn't one, got %d", d.Id(), len(resp.Lags)) - } - lag := resp.Lags[0] - if d.Id() != aws.StringValue(lag.LagId) { - return fmt.Errorf("Direct Connect LAG (%s) not found", d.Id()) - } - - if aws.StringValue(lag.LagState) == directconnect.LagStateDeleted { - log.Printf("[WARN] Direct Connect LAG (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxlag/%s", d.Id()), - }.String() - d.Set("arn", arn) - d.Set("name", lag.LagName) - d.Set("connections_bandwidth", lag.ConnectionsBandwidth) - d.Set("location", lag.Location) - - err1 := getTagsDX(conn, d, arn) - return err1 -} - -func resourceAwsDxLagUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - d.Partial(true) - - if d.HasChange("name") { - req := &directconnect.UpdateLagInput{ - LagId: aws.String(d.Id()), - LagName: aws.String(d.Get("name").(string)), - } - - log.Printf("[DEBUG] Updating Direct Connect LAG: %#v", req) - _, err := conn.UpdateLag(req) - if err != nil { - return err - } else { - d.SetPartial("name") - } - } - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxlag/%s", d.Id()), - }.String() - if err := setTagsDX(conn, d, arn); err != nil { - return err - } else { - d.SetPartial("tags") - } - - d.Partial(false) - - return resourceAwsDxLagRead(d, meta) -} - -func resourceAwsDxLagDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - if d.Get("force_destroy").(bool) { - resp, err := conn.DescribeLags(&directconnect.DescribeLagsInput{ - LagId: aws.String(d.Id()), - }) - if err != nil { - if isNoSuchDxLagErr(err) { - return nil - } - return err - } - - if len(resp.Lags) < 1 { - return nil - } - lag := resp.Lags[0] - for _, v := range lag.Connections { - log.Printf("[DEBUG] Deleting Direct Connect connection: %s", aws.StringValue(v.ConnectionId)) - _, err := conn.DeleteConnection(&directconnect.DeleteConnectionInput{ - ConnectionId: v.ConnectionId, - }) - if err != nil && !isNoSuchDxConnectionErr(err) { - return err - } - } - } - - log.Printf("[DEBUG] Deleting Direct Connect LAG: %s", d.Id()) - _, err := conn.DeleteLag(&directconnect.DeleteLagInput{ - LagId: aws.String(d.Id()), - }) - if err != nil { - if isNoSuchDxLagErr(err) { - return nil - } - return err - } - - deleteStateConf := &resource.StateChangeConf{ - Pending: []string{directconnect.LagStateAvailable, directconnect.LagStateRequested, directconnect.LagStatePending, directconnect.LagStateDeleting}, - Target: []string{directconnect.LagStateDeleted}, - Refresh: dxLagRefreshStateFunc(conn, d.Id()), - Timeout: 10 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - _, err = deleteStateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for Direct Connect LAG (%s) to be deleted: %s", d.Id(), err) - } - - return nil -} - -func dxLagRefreshStateFunc(conn *directconnect.DirectConnect, lagId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &directconnect.DescribeLagsInput{ - LagId: aws.String(lagId), - } - resp, err := conn.DescribeLags(input) - if err != nil { - return nil, "failed", err - } - if len(resp.Lags) < 1 { - return resp, directconnect.LagStateDeleted, nil - } - return resp, *resp.Lags[0].LagState, nil - } -} - -func isNoSuchDxLagErr(err error) bool { - return isAWSErr(err, "DirectConnectClientException", "Could not find Lag with ID") -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go deleted file mode 100644 index affaf0ad3..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go +++ /dev/null @@ -1,237 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDxPrivateVirtualInterface() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDxPrivateVirtualInterfaceCreate, - Read: resourceAwsDxPrivateVirtualInterfaceRead, - Update: resourceAwsDxPrivateVirtualInterfaceUpdate, - Delete: resourceAwsDxPrivateVirtualInterfaceDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsDxPrivateVirtualInterfaceImport, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vpn_gateway_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"dx_gateway_id"}, - }, - "dx_gateway_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"vpn_gateway_id"}, - }, - "vlan": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - ValidateFunc: validation.IntBetween(1, 4094), - }, - "bgp_asn": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "bgp_auth_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "address_family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), - }, - "customer_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "amazon_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "mtu": { - Type: schema.TypeInt, - Default: 1500, - Optional: true, - ValidateFunc: validateIntegerInSlice([]int{1500, 9001}), - }, - "jumbo_frame_capable": { - Type: schema.TypeBool, - Computed: true, - }, - "tags": tagsSchema(), - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Update: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - } -} - -func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - vgwIdRaw, vgwOk := d.GetOk("vpn_gateway_id") - dxgwIdRaw, dxgwOk := d.GetOk("dx_gateway_id") - if vgwOk == dxgwOk { - return fmt.Errorf( - "One of ['vpn_gateway_id', 'dx_gateway_id'] must be set to create a Direct Connect private virtual interface") - } - - req := &directconnect.CreatePrivateVirtualInterfaceInput{ - ConnectionId: aws.String(d.Get("connection_id").(string)), - NewPrivateVirtualInterface: &directconnect.NewPrivateVirtualInterface{ - VirtualInterfaceName: aws.String(d.Get("name").(string)), - Vlan: aws.Int64(int64(d.Get("vlan").(int))), - Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), - AddressFamily: aws.String(d.Get("address_family").(string)), - Mtu: aws.Int64(int64(d.Get("mtu").(int))), - }, - } - if vgwOk && vgwIdRaw.(string) != "" { - req.NewPrivateVirtualInterface.VirtualGatewayId = aws.String(vgwIdRaw.(string)) - } - if dxgwOk && dxgwIdRaw.(string) != "" { - req.NewPrivateVirtualInterface.DirectConnectGatewayId = aws.String(dxgwIdRaw.(string)) - } - if v, ok := d.GetOk("bgp_auth_key"); ok { - req.NewPrivateVirtualInterface.AuthKey = aws.String(v.(string)) - } - if v, ok := d.GetOk("customer_address"); ok && v.(string) != "" { - req.NewPrivateVirtualInterface.CustomerAddress = aws.String(v.(string)) - } - if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { - req.NewPrivateVirtualInterface.AmazonAddress = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating Direct Connect private virtual interface: %#v", req) - resp, err := conn.CreatePrivateVirtualInterface(req) - if err != nil { - return fmt.Errorf("Error creating Direct Connect private virtual interface: %s", err.Error()) - } - - d.SetId(aws.StringValue(resp.VirtualInterfaceId)) - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - if err := dxPrivateVirtualInterfaceWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { - return err - } - - return resourceAwsDxPrivateVirtualInterfaceUpdate(d, meta) -} - -func resourceAwsDxPrivateVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - vif, err := dxVirtualInterfaceRead(d.Id(), conn) - if err != nil { - return err - } - if vif == nil { - log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("connection_id", vif.ConnectionId) - d.Set("name", vif.VirtualInterfaceName) - d.Set("vlan", vif.Vlan) - d.Set("bgp_asn", vif.Asn) - d.Set("bgp_auth_key", vif.AuthKey) - d.Set("address_family", vif.AddressFamily) - d.Set("customer_address", vif.CustomerAddress) - d.Set("amazon_address", vif.AmazonAddress) - d.Set("vpn_gateway_id", vif.VirtualGatewayId) - d.Set("dx_gateway_id", vif.DirectConnectGatewayId) - d.Set("mtu", vif.Mtu) - d.Set("jumbo_frame_capable", vif.JumboFrameCapable) - err1 := getTagsDX(conn, d, d.Get("arn").(string)) - return err1 -} - -func resourceAwsDxPrivateVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { - if err := dxVirtualInterfaceUpdate(d, meta); err != nil { - return err - } - - if err := dxPrivateVirtualInterfaceWaitUntilAvailable(meta.(*AWSClient).dxconn, d.Id(), d.Timeout(schema.TimeoutUpdate)); err != nil { - return err - } - - return resourceAwsDxPrivateVirtualInterfaceRead(d, meta) -} - -func resourceAwsDxPrivateVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { - return dxVirtualInterfaceDelete(d, meta) -} - -func resourceAwsDxPrivateVirtualInterfaceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - return []*schema.ResourceData{d}, nil -} - -func dxPrivateVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { - return dxVirtualInterfaceWaitUntilAvailable( - conn, - vifId, - timeout, - []string{ - directconnect.VirtualInterfaceStatePending, - }, - []string{ - directconnect.VirtualInterfaceStateAvailable, - directconnect.VirtualInterfaceStateDown, - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go deleted file mode 100644 index 592dba927..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go +++ /dev/null @@ -1,221 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDxPublicVirtualInterface() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDxPublicVirtualInterfaceCreate, - Read: resourceAwsDxPublicVirtualInterfaceRead, - Update: resourceAwsDxPublicVirtualInterfaceUpdate, - Delete: resourceAwsDxPublicVirtualInterfaceDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsDxPublicVirtualInterfaceImport, - }, - CustomizeDiff: resourceAwsDxPublicVirtualInterfaceCustomizeDiff, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vlan": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - ValidateFunc: validation.IntBetween(1, 4094), - }, - "bgp_asn": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "bgp_auth_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "address_family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), - }, - "customer_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "amazon_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "route_filter_prefixes": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - MinItems: 1, - }, - "tags": tagsSchema(), - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - } -} - -func resourceAwsDxPublicVirtualInterfaceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - req := &directconnect.CreatePublicVirtualInterfaceInput{ - ConnectionId: aws.String(d.Get("connection_id").(string)), - NewPublicVirtualInterface: &directconnect.NewPublicVirtualInterface{ - VirtualInterfaceName: aws.String(d.Get("name").(string)), - Vlan: aws.Int64(int64(d.Get("vlan").(int))), - Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), - AddressFamily: aws.String(d.Get("address_family").(string)), - }, - } - if v, ok := d.GetOk("bgp_auth_key"); ok && v.(string) != "" { - req.NewPublicVirtualInterface.AuthKey = aws.String(v.(string)) - } - if v, ok := d.GetOk("customer_address"); ok && v.(string) != "" { - req.NewPublicVirtualInterface.CustomerAddress = aws.String(v.(string)) - } - if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { - req.NewPublicVirtualInterface.AmazonAddress = aws.String(v.(string)) - } - if v, ok := d.GetOk("route_filter_prefixes"); ok { - req.NewPublicVirtualInterface.RouteFilterPrefixes = expandDxRouteFilterPrefixes(v.(*schema.Set).List()) - } - - log.Printf("[DEBUG] Creating Direct Connect public virtual interface: %#v", req) - resp, err := conn.CreatePublicVirtualInterface(req) - if err != nil { - return fmt.Errorf("Error creating Direct Connect public virtual interface: %s", err) - } - - d.SetId(aws.StringValue(resp.VirtualInterfaceId)) - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - if err := dxPublicVirtualInterfaceWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { - return err - } - - return resourceAwsDxPublicVirtualInterfaceUpdate(d, meta) -} - -func resourceAwsDxPublicVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dxconn - - vif, err := dxVirtualInterfaceRead(d.Id(), conn) - if err != nil { - return err - } - if vif == nil { - log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("connection_id", vif.ConnectionId) - d.Set("name", vif.VirtualInterfaceName) - d.Set("vlan", vif.Vlan) - d.Set("bgp_asn", vif.Asn) - d.Set("bgp_auth_key", vif.AuthKey) - d.Set("address_family", vif.AddressFamily) - d.Set("customer_address", vif.CustomerAddress) - d.Set("amazon_address", vif.AmazonAddress) - d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes)) - err1 := getTagsDX(conn, d, d.Get("arn").(string)) - return err1 -} - -func resourceAwsDxPublicVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { - if err := dxVirtualInterfaceUpdate(d, meta); err != nil { - return err - } - - return resourceAwsDxPublicVirtualInterfaceRead(d, meta) -} - -func resourceAwsDxPublicVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { - return dxVirtualInterfaceDelete(d, meta) -} - -func resourceAwsDxPublicVirtualInterfaceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - return []*schema.ResourceData{d}, nil -} - -func resourceAwsDxPublicVirtualInterfaceCustomizeDiff(diff *schema.ResourceDiff, meta interface{}) error { - if diff.Id() == "" { - // New resource. - if addressFamily := diff.Get("address_family").(string); addressFamily == directconnect.AddressFamilyIpv4 { - if _, ok := diff.GetOk("customer_address"); !ok { - return fmt.Errorf("'customer_address' must be set when 'address_family' is '%s'", addressFamily) - } - if _, ok := diff.GetOk("amazon_address"); !ok { - return fmt.Errorf("'amazon_address' must be set when 'address_family' is '%s'", addressFamily) - } - } - } - - return nil -} - -func dxPublicVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { - return dxVirtualInterfaceWaitUntilAvailable( - conn, - vifId, - timeout, - []string{ - directconnect.VirtualInterfaceStatePending, - }, - []string{ - directconnect.VirtualInterfaceStateAvailable, - directconnect.VirtualInterfaceStateDown, - directconnect.VirtualInterfaceStateVerifying, - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_global_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_global_table.go deleted file mode 100644 index bcc5b7c61..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_global_table.go +++ /dev/null @@ -1,313 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/dynamodb" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDynamoDbGlobalTable() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDynamoDbGlobalTableCreate, - Read: resourceAwsDynamoDbGlobalTableRead, - Update: resourceAwsDynamoDbGlobalTableUpdate, - Delete: resourceAwsDynamoDbGlobalTableDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(1 * time.Minute), - Update: schema.DefaultTimeout(1 * time.Minute), - Delete: schema.DefaultTimeout(1 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateAwsDynamoDbGlobalTableName, - }, - - "replica": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "region_name": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsDynamoDbGlobalTableCreate(d *schema.ResourceData, meta interface{}) error { - dynamodbconn := meta.(*AWSClient).dynamodbconn - - globalTableName := d.Get("name").(string) - - input := &dynamodb.CreateGlobalTableInput{ - GlobalTableName: aws.String(globalTableName), - ReplicationGroup: expandAwsDynamoDbReplicas(d.Get("replica").(*schema.Set).List()), - } - - log.Printf("[DEBUG] Creating DynamoDB Global Table: %#v", input) - _, err := dynamodbconn.CreateGlobalTable(input) - if err != nil { - return err - } - - d.SetId(globalTableName) - - log.Println("[INFO] Waiting for DynamoDB Global Table to be created") - stateConf := &resource.StateChangeConf{ - Pending: []string{ - dynamodb.GlobalTableStatusCreating, - dynamodb.GlobalTableStatusDeleting, - dynamodb.GlobalTableStatusUpdating, - }, - Target: []string{ - dynamodb.GlobalTableStatusActive, - }, - Refresh: resourceAwsDynamoDbGlobalTableStateRefreshFunc(d, meta), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsDynamoDbGlobalTableRead(d, meta) -} - -func resourceAwsDynamoDbGlobalTableRead(d *schema.ResourceData, meta interface{}) error { - globalTableDescription, err := resourceAwsDynamoDbGlobalTableRetrieve(d, meta) - - if err != nil { - return err - } - if globalTableDescription == nil { - log.Printf("[WARN] DynamoDB Global Table %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return flattenAwsDynamoDbGlobalTable(d, globalTableDescription) -} - -func resourceAwsDynamoDbGlobalTableUpdate(d *schema.ResourceData, meta interface{}) error { - dynamodbconn := meta.(*AWSClient).dynamodbconn - - if d.HasChange("replica") { - o, n := d.GetChange("replica") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - replicaUpdateCreateReplicas := expandAwsDynamoDbReplicaUpdateCreateReplicas(ns.Difference(os).List()) - replicaUpdateDeleteReplicas := expandAwsDynamoDbReplicaUpdateDeleteReplicas(os.Difference(ns).List()) - - replicaUpdates := make([]*dynamodb.ReplicaUpdate, 0, (len(replicaUpdateCreateReplicas) + len(replicaUpdateDeleteReplicas))) - replicaUpdates = append(replicaUpdates, replicaUpdateCreateReplicas...) - replicaUpdates = append(replicaUpdates, replicaUpdateDeleteReplicas...) - - input := &dynamodb.UpdateGlobalTableInput{ - GlobalTableName: aws.String(d.Id()), - ReplicaUpdates: replicaUpdates, - } - log.Printf("[DEBUG] Updating DynamoDB Global Table: %#v", input) - if _, err := dynamodbconn.UpdateGlobalTable(input); err != nil { - return err - } - - log.Println("[INFO] Waiting for DynamoDB Global Table to be updated") - stateConf := &resource.StateChangeConf{ - Pending: []string{ - dynamodb.GlobalTableStatusCreating, - dynamodb.GlobalTableStatusDeleting, - dynamodb.GlobalTableStatusUpdating, - }, - Target: []string{ - dynamodb.GlobalTableStatusActive, - }, - Refresh: resourceAwsDynamoDbGlobalTableStateRefreshFunc(d, meta), - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 10 * time.Second, - } - _, err := stateConf.WaitForState() - if err != nil { - return err - } - } - - return nil -} - -// Deleting a DynamoDB Global Table is represented by removing all replicas. -func resourceAwsDynamoDbGlobalTableDelete(d *schema.ResourceData, meta interface{}) error { - dynamodbconn := meta.(*AWSClient).dynamodbconn - - input := &dynamodb.UpdateGlobalTableInput{ - GlobalTableName: aws.String(d.Id()), - ReplicaUpdates: expandAwsDynamoDbReplicaUpdateDeleteReplicas(d.Get("replica").(*schema.Set).List()), - } - log.Printf("[DEBUG] Deleting DynamoDB Global Table: %#v", input) - if _, err := dynamodbconn.UpdateGlobalTable(input); err != nil { - return err - } - - log.Println("[INFO] Waiting for DynamoDB Global Table to be destroyed") - stateConf := &resource.StateChangeConf{ - Pending: []string{ - dynamodb.GlobalTableStatusActive, - dynamodb.GlobalTableStatusCreating, - dynamodb.GlobalTableStatusDeleting, - dynamodb.GlobalTableStatusUpdating, - }, - Target: []string{}, - Refresh: resourceAwsDynamoDbGlobalTableStateRefreshFunc(d, meta), - Timeout: d.Timeout(schema.TimeoutDelete), - MinTimeout: 10 * time.Second, - } - _, err := stateConf.WaitForState() - return err -} - -func resourceAwsDynamoDbGlobalTableRetrieve(d *schema.ResourceData, meta interface{}) (*dynamodb.GlobalTableDescription, error) { - dynamodbconn := meta.(*AWSClient).dynamodbconn - - input := &dynamodb.DescribeGlobalTableInput{ - GlobalTableName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Retrieving DynamoDB Global Table: %#v", input) - - output, err := dynamodbconn.DescribeGlobalTable(input) - if err != nil { - if isAWSErr(err, dynamodb.ErrCodeGlobalTableNotFoundException, "") { - return nil, nil - } - return nil, fmt.Errorf("Error retrieving DynamoDB Global Table: %s", err) - } - - return output.GlobalTableDescription, nil -} - -func resourceAwsDynamoDbGlobalTableStateRefreshFunc( - d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - gtd, err := resourceAwsDynamoDbGlobalTableRetrieve(d, meta) - - if err != nil { - log.Printf("Error on retrieving DynamoDB Global Table when waiting: %s", err) - return nil, "", err - } - - if gtd == nil { - return nil, "", nil - } - - if gtd.GlobalTableStatus != nil { - log.Printf("[DEBUG] Status for DynamoDB Global Table %s: %s", d.Id(), *gtd.GlobalTableStatus) - } - - return gtd, *gtd.GlobalTableStatus, nil - } -} - -func flattenAwsDynamoDbGlobalTable(d *schema.ResourceData, globalTableDescription *dynamodb.GlobalTableDescription) error { - var err error - - d.Set("arn", globalTableDescription.GlobalTableArn) - d.Set("name", globalTableDescription.GlobalTableName) - - err = d.Set("replica", flattenAwsDynamoDbReplicas(globalTableDescription.ReplicationGroup)) - return err -} - -func expandAwsDynamoDbReplicaUpdateCreateReplicas(configuredReplicas []interface{}) []*dynamodb.ReplicaUpdate { - replicaUpdates := make([]*dynamodb.ReplicaUpdate, 0, len(configuredReplicas)) - for _, replicaRaw := range configuredReplicas { - replica := replicaRaw.(map[string]interface{}) - replicaUpdates = append(replicaUpdates, expandAwsDynamoDbReplicaUpdateCreateReplica(replica)) - } - return replicaUpdates -} - -func expandAwsDynamoDbReplicaUpdateCreateReplica(configuredReplica map[string]interface{}) *dynamodb.ReplicaUpdate { - replicaUpdate := &dynamodb.ReplicaUpdate{ - Create: &dynamodb.CreateReplicaAction{ - RegionName: aws.String(configuredReplica["region_name"].(string)), - }, - } - return replicaUpdate -} - -func expandAwsDynamoDbReplicaUpdateDeleteReplicas(configuredReplicas []interface{}) []*dynamodb.ReplicaUpdate { - replicaUpdates := make([]*dynamodb.ReplicaUpdate, 0, len(configuredReplicas)) - for _, replicaRaw := range configuredReplicas { - replica := replicaRaw.(map[string]interface{}) - replicaUpdates = append(replicaUpdates, expandAwsDynamoDbReplicaUpdateDeleteReplica(replica)) - } - return replicaUpdates -} - -func expandAwsDynamoDbReplicaUpdateDeleteReplica(configuredReplica map[string]interface{}) *dynamodb.ReplicaUpdate { - replicaUpdate := &dynamodb.ReplicaUpdate{ - Delete: &dynamodb.DeleteReplicaAction{ - RegionName: aws.String(configuredReplica["region_name"].(string)), - }, - } - return replicaUpdate -} - -func expandAwsDynamoDbReplicas(configuredReplicas []interface{}) []*dynamodb.Replica { - replicas := make([]*dynamodb.Replica, 0, len(configuredReplicas)) - for _, replicaRaw := range configuredReplicas { - replica := replicaRaw.(map[string]interface{}) - replicas = append(replicas, expandAwsDynamoDbReplica(replica)) - } - return replicas -} - -func expandAwsDynamoDbReplica(configuredReplica map[string]interface{}) *dynamodb.Replica { - replica := &dynamodb.Replica{ - RegionName: aws.String(configuredReplica["region_name"].(string)), - } - return replica -} - -func flattenAwsDynamoDbReplicas(replicaDescriptions []*dynamodb.ReplicaDescription) []interface{} { - replicas := []interface{}{} - for _, replicaDescription := range replicaDescriptions { - replicas = append(replicas, flattenAwsDynamoDbReplica(replicaDescription)) - } - return replicas -} - -func flattenAwsDynamoDbReplica(replicaDescription *dynamodb.ReplicaDescription) map[string]interface{} { - replica := make(map[string]interface{}) - replica["region_name"] = *replicaDescription.RegionName - return replica -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go deleted file mode 100644 index 7cb0f72cc..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go +++ /dev/null @@ -1,950 +0,0 @@ -package aws - -import ( - "bytes" - "errors" - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/dynamodb" - "github.com/hashicorp/terraform/helper/customdiff" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsDynamoDbTable() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDynamoDbTableCreate, - Read: resourceAwsDynamoDbTableRead, - Update: resourceAwsDynamoDbTableUpdate, - Delete: resourceAwsDynamoDbTableDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - Update: schema.DefaultTimeout(10 * time.Minute), - }, - - CustomizeDiff: customdiff.Sequence( - func(diff *schema.ResourceDiff, v interface{}) error { - return validateDynamoDbStreamSpec(diff) - }, - func(diff *schema.ResourceDiff, v interface{}) error { - return validateDynamoDbTableAttributes(diff) - }, - func(diff *schema.ResourceDiff, v interface{}) error { - if diff.Id() != "" && diff.HasChange("server_side_encryption") { - o, n := diff.GetChange("server_side_encryption") - if isDynamoDbTableOptionDisabled(o) && isDynamoDbTableOptionDisabled(n) { - return diff.Clear("server_side_encryption") - } - } - return nil - }, - func(diff *schema.ResourceDiff, v interface{}) error { - if diff.Id() != "" && diff.HasChange("point_in_time_recovery") { - o, n := diff.GetChange("point_in_time_recovery") - if isDynamoDbTableOptionDisabled(o) && isDynamoDbTableOptionDisabled(n) { - return diff.Clear("point_in_time_recovery") - } - } - return nil - }, - ), - - SchemaVersion: 1, - MigrateState: resourceAwsDynamoDbTableMigrateState, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "hash_key": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "range_key": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "billing_mode": { - Type: schema.TypeString, - Optional: true, - Default: dynamodb.BillingModeProvisioned, - ValidateFunc: validation.StringInSlice([]string{ - dynamodb.BillingModePayPerRequest, - dynamodb.BillingModeProvisioned, - }, false), - }, - "write_capacity": { - Type: schema.TypeInt, - Optional: true, - }, - "read_capacity": { - Type: schema.TypeInt, - Optional: true, - }, - "attribute": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - dynamodb.ScalarAttributeTypeB, - dynamodb.ScalarAttributeTypeN, - dynamodb.ScalarAttributeTypeS, - }, false), - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) - return hashcode.String(buf.String()) - }, - }, - "ttl": { - Type: schema.TypeSet, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "attribute_name": { - Type: schema.TypeString, - Required: true, - }, - "enabled": { - Type: schema.TypeBool, - Required: true, - }, - }, - }, - }, - "local_secondary_index": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "range_key": { - Type: schema.TypeString, - Required: true, - }, - "projection_type": { - Type: schema.TypeString, - Required: true, - }, - "non_key_attributes": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) - return hashcode.String(buf.String()) - }, - }, - "global_secondary_index": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "write_capacity": { - Type: schema.TypeInt, - Optional: true, - }, - "read_capacity": { - Type: schema.TypeInt, - Optional: true, - }, - "hash_key": { - Type: schema.TypeString, - Required: true, - }, - "range_key": { - Type: schema.TypeString, - Optional: true, - }, - "projection_type": { - Type: schema.TypeString, - Required: true, - }, - "non_key_attributes": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "stream_enabled": { - Type: schema.TypeBool, - Optional: true, - }, - "stream_view_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - StateFunc: func(v interface{}) string { - value := v.(string) - return strings.ToUpper(value) - }, - ValidateFunc: validation.StringInSlice([]string{ - "", - dynamodb.StreamViewTypeNewImage, - dynamodb.StreamViewTypeOldImage, - dynamodb.StreamViewTypeNewAndOldImages, - dynamodb.StreamViewTypeKeysOnly, - }, false), - }, - "stream_arn": { - Type: schema.TypeString, - Computed: true, - }, - "stream_label": { - Type: schema.TypeString, - Computed: true, - }, - "server_side_encryption": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Required: true, - ForceNew: true, - }, - }, - }, - }, - "tags": tagsSchema(), - "point_in_time_recovery": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsDynamoDbTableCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dynamodbconn - - keySchemaMap := map[string]interface{}{ - "hash_key": d.Get("hash_key").(string), - } - if v, ok := d.GetOk("range_key"); ok { - keySchemaMap["range_key"] = v.(string) - } - - log.Printf("[DEBUG] Creating DynamoDB table with key schema: %#v", keySchemaMap) - - req := &dynamodb.CreateTableInput{ - TableName: aws.String(d.Get("name").(string)), - BillingMode: aws.String(d.Get("billing_mode").(string)), - KeySchema: expandDynamoDbKeySchema(keySchemaMap), - } - - billingMode := d.Get("billing_mode").(string) - capacityMap := map[string]interface{}{ - "write_capacity": d.Get("write_capacity"), - "read_capacity": d.Get("read_capacity"), - } - - if err := validateDynamoDbProvisionedThroughput(capacityMap, billingMode); err != nil { - return err - } - - req.ProvisionedThroughput = expandDynamoDbProvisionedThroughput(capacityMap, billingMode) - - if v, ok := d.GetOk("attribute"); ok { - aSet := v.(*schema.Set) - req.AttributeDefinitions = expandDynamoDbAttributes(aSet.List()) - } - - if v, ok := d.GetOk("local_secondary_index"); ok { - lsiSet := v.(*schema.Set) - req.LocalSecondaryIndexes = expandDynamoDbLocalSecondaryIndexes(lsiSet.List(), keySchemaMap) - } - - if v, ok := d.GetOk("global_secondary_index"); ok { - globalSecondaryIndexes := []*dynamodb.GlobalSecondaryIndex{} - gsiSet := v.(*schema.Set) - - for _, gsiObject := range gsiSet.List() { - gsi := gsiObject.(map[string]interface{}) - if err := validateDynamoDbProvisionedThroughput(gsi, billingMode); err != nil { - return fmt.Errorf("Failed to create GSI: %v", err) - } - - gsiObject := expandDynamoDbGlobalSecondaryIndex(gsi, billingMode) - globalSecondaryIndexes = append(globalSecondaryIndexes, gsiObject) - } - req.GlobalSecondaryIndexes = globalSecondaryIndexes - } - - if v, ok := d.GetOk("stream_enabled"); ok { - req.StreamSpecification = &dynamodb.StreamSpecification{ - StreamEnabled: aws.Bool(v.(bool)), - StreamViewType: aws.String(d.Get("stream_view_type").(string)), - } - } - - if v, ok := d.GetOk("server_side_encryption"); ok { - options := v.([]interface{}) - if options[0] == nil { - return fmt.Errorf("At least one field is expected inside server_side_encryption") - } - - s := options[0].(map[string]interface{}) - req.SSESpecification = expandDynamoDbEncryptAtRestOptions(s) - } - - var output *dynamodb.CreateTableOutput - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var err error - output, err = conn.CreateTable(req) - if err != nil { - if isAWSErr(err, "ThrottlingException", "") { - return resource.RetryableError(err) - } - if isAWSErr(err, dynamodb.ErrCodeLimitExceededException, "can be created, updated, or deleted simultaneously") { - return resource.RetryableError(err) - } - if isAWSErr(err, dynamodb.ErrCodeLimitExceededException, "indexed tables that can be created simultaneously") { - return resource.RetryableError(err) - } - // AWS GovCloud (US) and others may reply with the following until their API is updated: - // ValidationException: One or more parameter values were invalid: Unsupported input parameter BillingMode - if isAWSErr(err, "ValidationException", "Unsupported input parameter BillingMode") { - req.BillingMode = nil - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error creating DynamoDB Table: %s", err) - } - - d.SetId(*output.TableDescription.TableName) - d.Set("arn", output.TableDescription.TableArn) - - if err := waitForDynamoDbTableToBeActive(d.Id(), d.Timeout(schema.TimeoutCreate), conn); err != nil { - return err - } - - return resourceAwsDynamoDbTableUpdate(d, meta) -} - -func resourceAwsDynamoDbTableUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dynamodbconn - billingMode := d.Get("billing_mode").(string) - - if d.HasChange("billing_mode") && !d.IsNewResource() { - req := &dynamodb.UpdateTableInput{ - TableName: aws.String(d.Id()), - BillingMode: aws.String(billingMode), - } - capacityMap := map[string]interface{}{ - "write_capacity": d.Get("write_capacity"), - "read_capacity": d.Get("read_capacity"), - } - - if err := validateDynamoDbProvisionedThroughput(capacityMap, billingMode); err != nil { - return err - } - - req.ProvisionedThroughput = expandDynamoDbProvisionedThroughput(capacityMap, billingMode) - - _, err := conn.UpdateTable(req) - if err != nil { - return fmt.Errorf("Error updating DynamoDB Table (%s) billing mode: %s", d.Id(), err) - } - if err := waitForDynamoDbTableToBeActive(d.Id(), d.Timeout(schema.TimeoutUpdate), conn); err != nil { - return fmt.Errorf("Error waiting for DynamoDB Table update: %s", err) - } - } - // Cannot create or delete index while updating table IOPS - // so we update IOPS separately - if !d.HasChange("billing_mode") && d.Get("billing_mode").(string) == dynamodb.BillingModeProvisioned && (d.HasChange("read_capacity") || d.HasChange("write_capacity")) && !d.IsNewResource() { - _, err := conn.UpdateTable(&dynamodb.UpdateTableInput{ - TableName: aws.String(d.Id()), - ProvisionedThroughput: expandDynamoDbProvisionedThroughput(map[string]interface{}{ - "read_capacity": d.Get("read_capacity"), - "write_capacity": d.Get("write_capacity"), - }, billingMode), - }) - if err != nil { - return err - } - if err := waitForDynamoDbTableToBeActive(d.Id(), d.Timeout(schema.TimeoutUpdate), conn); err != nil { - return fmt.Errorf("Error waiting for DynamoDB Table update: %s", err) - } - } - - if (d.HasChange("stream_enabled") || d.HasChange("stream_view_type")) && !d.IsNewResource() { - toEnable := d.Get("stream_enabled").(bool) - streamSpec := dynamodb.StreamSpecification{ - StreamEnabled: aws.Bool(toEnable), - } - if toEnable { - streamSpec.StreamViewType = aws.String(d.Get("stream_view_type").(string)) - } - input := &dynamodb.UpdateTableInput{ - TableName: aws.String(d.Id()), - StreamSpecification: &streamSpec, - } - _, err := conn.UpdateTable(input) - if err != nil { - return err - } - - if err := waitForDynamoDbTableToBeActive(d.Id(), d.Timeout(schema.TimeoutUpdate), conn); err != nil { - return fmt.Errorf("Error waiting for DynamoDB Table update: %s", err) - } - } - - // Indexes and attributes are tightly coupled (DynamoDB requires attribute definitions - // for all indexed attributes) so it's necessary to update these together. - if (d.HasChange("global_secondary_index") || d.HasChange("attribute")) && !d.IsNewResource() { - attributes := d.Get("attribute").(*schema.Set).List() - - o, n := d.GetChange("global_secondary_index") - ops, err := diffDynamoDbGSI(o.(*schema.Set).List(), n.(*schema.Set).List(), billingMode) - if err != nil { - return fmt.Errorf("Computing difference for global_secondary_index failed: %s", err) - } - log.Printf("[DEBUG] Updating global secondary indexes:\n%s", ops) - - input := &dynamodb.UpdateTableInput{ - TableName: aws.String(d.Id()), - AttributeDefinitions: expandDynamoDbAttributes(attributes), - } - - // Only 1 online index can be created or deleted simultaneously per table - for _, op := range ops { - input.GlobalSecondaryIndexUpdates = []*dynamodb.GlobalSecondaryIndexUpdate{op} - log.Printf("[DEBUG] Updating DynamoDB Table: %s", input) - _, err := conn.UpdateTable(input) - if err != nil { - return err - } - if op.Create != nil { - idxName := *op.Create.IndexName - if err := waitForDynamoDbGSIToBeActive(d.Id(), idxName, conn); err != nil { - return fmt.Errorf("Error waiting for DynamoDB GSI %q to be created: %s", idxName, err) - } - } - if op.Update != nil { - idxName := *op.Update.IndexName - if err := waitForDynamoDbGSIToBeActive(d.Id(), idxName, conn); err != nil { - return fmt.Errorf("Error waiting for DynamoDB GSI %q to be updated: %s", idxName, err) - } - } - if op.Delete != nil { - idxName := *op.Delete.IndexName - if err := waitForDynamoDbGSIToBeDeleted(d.Id(), idxName, conn); err != nil { - return fmt.Errorf("Error waiting for DynamoDB GSI %q to be deleted: %s", idxName, err) - } - } - } - - // We may only be changing the attribute type - if len(ops) == 0 { - _, err := conn.UpdateTable(input) - if err != nil { - return err - } - } - - if err := waitForDynamoDbTableToBeActive(d.Id(), d.Timeout(schema.TimeoutUpdate), conn); err != nil { - return fmt.Errorf("Error waiting for DynamoDB Table op: %s", err) - } - } - - if d.HasChange("ttl") { - if err := updateDynamoDbTimeToLive(d, conn); err != nil { - log.Printf("[DEBUG] Error updating table TimeToLive: %s", err) - return err - } - } - - if d.HasChange("tags") { - if err := setTagsDynamoDb(conn, d); err != nil { - return err - } - } - - if d.HasChange("point_in_time_recovery") { - _, enabled := d.GetChange("point_in_time_recovery.0.enabled") - if !d.IsNewResource() || enabled.(bool) { - if err := updateDynamoDbPITR(d, conn); err != nil { - return err - } - } - } - - return resourceAwsDynamoDbTableRead(d, meta) -} - -func resourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dynamodbconn - - result, err := conn.DescribeTable(&dynamodb.DescribeTableInput{ - TableName: aws.String(d.Id()), - }) - - if err != nil { - if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Dynamodb Table (%s) not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - return err - } - - err = flattenAwsDynamoDbTableResource(d, result.Table) - if err != nil { - return err - } - - ttlOut, err := conn.DescribeTimeToLive(&dynamodb.DescribeTimeToLiveInput{ - TableName: aws.String(d.Id()), - }) - if err != nil { - return err - } - if ttlOut.TimeToLiveDescription != nil { - err := d.Set("ttl", flattenDynamoDbTtl(ttlOut.TimeToLiveDescription)) - if err != nil { - return err - } - } - - tags, err := readDynamoDbTableTags(d.Get("arn").(string), conn) - if err != nil { - return err - } - d.Set("tags", tags) - - pitrOut, err := conn.DescribeContinuousBackups(&dynamodb.DescribeContinuousBackupsInput{ - TableName: aws.String(d.Id()), - }) - if err != nil && !isAWSErr(err, "UnknownOperationException", "") { - return err - } - d.Set("point_in_time_recovery", flattenDynamoDbPitr(pitrOut)) - - return nil -} - -func resourceAwsDynamoDbTableDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dynamodbconn - - log.Printf("[DEBUG] DynamoDB delete table: %s", d.Id()) - - err := deleteAwsDynamoDbTable(d.Id(), conn) - if err != nil { - if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "Requested resource not found: Table: ") { - return nil - } - return fmt.Errorf("error deleting DynamoDB Table (%s): %s", d.Id(), err) - } - - if err := waitForDynamodbTableDeletion(conn, d.Id(), d.Timeout(schema.TimeoutDelete)); err != nil { - return fmt.Errorf("error waiting for DynamoDB Table (%s) deletion: %s", d.Id(), err) - } - - return nil -} - -func deleteAwsDynamoDbTable(tableName string, conn *dynamodb.DynamoDB) error { - input := &dynamodb.DeleteTableInput{ - TableName: aws.String(tableName), - } - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteTable(input) - if err != nil { - // Subscriber limit exceeded: Only 10 tables can be created, updated, or deleted simultaneously - if isAWSErr(err, dynamodb.ErrCodeLimitExceededException, "simultaneously") { - return resource.RetryableError(err) - } - // This handles multiple scenarios in the DynamoDB API: - // 1. Updating a table immediately before deletion may return: - // ResourceInUseException: Attempt to change a resource which is still in use: Table is being updated: - // 2. Removing a table from a DynamoDB global table may return: - // ResourceInUseException: Attempt to change a resource which is still in use: Table is being deleted: - if isAWSErr(err, dynamodb.ErrCodeResourceInUseException, "") { - return resource.RetryableError(err) - } - if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "Requested resource not found: Table: ") { - return resource.NonRetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) -} - -func waitForDynamodbTableDeletion(conn *dynamodb.DynamoDB, tableName string, timeout time.Duration) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ - dynamodb.TableStatusActive, - dynamodb.TableStatusDeleting, - }, - Target: []string{}, - Timeout: timeout, - Refresh: func() (interface{}, string, error) { - input := &dynamodb.DescribeTableInput{ - TableName: aws.String(tableName), - } - - output, err := conn.DescribeTable(input) - - if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "") { - return nil, "", nil - } - - if err != nil { - return 42, "", err - } - - if output == nil { - return nil, "", nil - } - - return output.Table, aws.StringValue(output.Table.TableStatus), nil - }, - } - - _, err := stateConf.WaitForState() - - return err -} - -func updateDynamoDbTimeToLive(d *schema.ResourceData, conn *dynamodb.DynamoDB) error { - toBeEnabled := false - attributeName := "" - - o, n := d.GetChange("ttl") - newTtl, ok := n.(*schema.Set) - blockExists := ok && newTtl.Len() > 0 - - if blockExists { - ttlList := newTtl.List() - ttlMap := ttlList[0].(map[string]interface{}) - attributeName = ttlMap["attribute_name"].(string) - toBeEnabled = ttlMap["enabled"].(bool) - - } else if !d.IsNewResource() { - oldTtlList := o.(*schema.Set).List() - ttlMap := oldTtlList[0].(map[string]interface{}) - attributeName = ttlMap["attribute_name"].(string) - toBeEnabled = false - } - - if attributeName != "" { - _, err := conn.UpdateTimeToLive(&dynamodb.UpdateTimeToLiveInput{ - TableName: aws.String(d.Id()), - TimeToLiveSpecification: &dynamodb.TimeToLiveSpecification{ - AttributeName: aws.String(attributeName), - Enabled: aws.Bool(toBeEnabled), - }, - }) - if err != nil { - if isAWSErr(err, "ValidationException", "TimeToLive is already disabled") { - return nil - } - return err - } - - err = waitForDynamoDbTtlUpdateToBeCompleted(d.Id(), toBeEnabled, conn) - if err != nil { - return fmt.Errorf("Error waiting for DynamoDB TimeToLive to be updated: %s", err) - } - } - - return nil -} - -func updateDynamoDbPITR(d *schema.ResourceData, conn *dynamodb.DynamoDB) error { - toEnable := d.Get("point_in_time_recovery.0.enabled").(bool) - - input := &dynamodb.UpdateContinuousBackupsInput{ - TableName: aws.String(d.Id()), - PointInTimeRecoverySpecification: &dynamodb.PointInTimeRecoverySpecification{ - PointInTimeRecoveryEnabled: aws.Bool(toEnable), - }, - } - - log.Printf("[DEBUG] Updating DynamoDB point in time recovery status to %v", toEnable) - - err := resource.Retry(20*time.Minute, func() *resource.RetryError { - _, err := conn.UpdateContinuousBackups(input) - if err != nil { - // Backups are still being enabled for this newly created table - if isAWSErr(err, dynamodb.ErrCodeContinuousBackupsUnavailableException, "Backups are being enabled") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return err - } - - if err := waitForDynamoDbBackupUpdateToBeCompleted(d.Id(), toEnable, conn); err != nil { - return fmt.Errorf("Error waiting for DynamoDB PITR update: %s", err) - } - - return nil -} - -func readDynamoDbTableTags(arn string, conn *dynamodb.DynamoDB) (map[string]string, error) { - output, err := conn.ListTagsOfResource(&dynamodb.ListTagsOfResourceInput{ - ResourceArn: aws.String(arn), - }) - - // Do not fail if interfacing with dynamodb-local - if err != nil && !isAWSErr(err, "UnknownOperationException", "Tagging is not currently supported in DynamoDB Local.") { - return nil, fmt.Errorf("Error reading tags from dynamodb resource: %s", err) - } - - result := tagsToMapDynamoDb(output.Tags) - - // TODO Read NextToken if available - - return result, nil -} - -// Waiters - -func waitForDynamoDbGSIToBeActive(tableName string, gsiName string, conn *dynamodb.DynamoDB) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ - dynamodb.IndexStatusCreating, - dynamodb.IndexStatusUpdating, - }, - Target: []string{dynamodb.IndexStatusActive}, - Timeout: 10 * time.Minute, - Refresh: func() (interface{}, string, error) { - result, err := conn.DescribeTable(&dynamodb.DescribeTableInput{ - TableName: aws.String(tableName), - }) - if err != nil { - return 42, "", err - } - - table := result.Table - - // Find index - var targetGSI *dynamodb.GlobalSecondaryIndexDescription - for _, gsi := range table.GlobalSecondaryIndexes { - if *gsi.IndexName == gsiName { - targetGSI = gsi - } - } - - if targetGSI != nil { - return table, *targetGSI.IndexStatus, nil - } - - return nil, "", nil - }, - } - _, err := stateConf.WaitForState() - return err -} - -func waitForDynamoDbGSIToBeDeleted(tableName string, gsiName string, conn *dynamodb.DynamoDB) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ - dynamodb.IndexStatusActive, - dynamodb.IndexStatusDeleting, - }, - Target: []string{}, - Timeout: 10 * time.Minute, - Refresh: func() (interface{}, string, error) { - result, err := conn.DescribeTable(&dynamodb.DescribeTableInput{ - TableName: aws.String(tableName), - }) - if err != nil { - return 42, "", err - } - - table := result.Table - - // Find index - var targetGSI *dynamodb.GlobalSecondaryIndexDescription - for _, gsi := range table.GlobalSecondaryIndexes { - if *gsi.IndexName == gsiName { - targetGSI = gsi - } - } - - if targetGSI == nil { - return nil, "", nil - } - - return targetGSI, *targetGSI.IndexStatus, nil - }, - } - _, err := stateConf.WaitForState() - return err -} - -func waitForDynamoDbTableToBeActive(tableName string, timeout time.Duration, conn *dynamodb.DynamoDB) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{dynamodb.TableStatusCreating, dynamodb.TableStatusUpdating}, - Target: []string{dynamodb.TableStatusActive}, - Timeout: timeout, - Refresh: func() (interface{}, string, error) { - result, err := conn.DescribeTable(&dynamodb.DescribeTableInput{ - TableName: aws.String(tableName), - }) - if err != nil { - return 42, "", err - } - - return result, *result.Table.TableStatus, nil - }, - } - _, err := stateConf.WaitForState() - - return err -} - -func waitForDynamoDbBackupUpdateToBeCompleted(tableName string, toEnable bool, conn *dynamodb.DynamoDB) error { - var pending []string - target := []string{dynamodb.TimeToLiveStatusDisabled} - - if toEnable { - pending = []string{ - "ENABLING", - } - target = []string{dynamodb.PointInTimeRecoveryStatusEnabled} - } - - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: target, - Timeout: 10 * time.Second, - Refresh: func() (interface{}, string, error) { - result, err := conn.DescribeContinuousBackups(&dynamodb.DescribeContinuousBackupsInput{ - TableName: aws.String(tableName), - }) - if err != nil { - return 42, "", err - } - - if result.ContinuousBackupsDescription == nil || result.ContinuousBackupsDescription.PointInTimeRecoveryDescription == nil { - return 42, "", errors.New("Error reading backup status from dynamodb resource: empty description") - } - pitr := result.ContinuousBackupsDescription.PointInTimeRecoveryDescription - - return result, *pitr.PointInTimeRecoveryStatus, nil - }, - } - _, err := stateConf.WaitForState() - return err -} - -func waitForDynamoDbTtlUpdateToBeCompleted(tableName string, toEnable bool, conn *dynamodb.DynamoDB) error { - pending := []string{ - dynamodb.TimeToLiveStatusEnabled, - dynamodb.TimeToLiveStatusDisabling, - } - target := []string{dynamodb.TimeToLiveStatusDisabled} - - if toEnable { - pending = []string{ - dynamodb.TimeToLiveStatusDisabled, - dynamodb.TimeToLiveStatusEnabling, - } - target = []string{dynamodb.TimeToLiveStatusEnabled} - } - - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: target, - Timeout: 10 * time.Second, - Refresh: func() (interface{}, string, error) { - result, err := conn.DescribeTimeToLive(&dynamodb.DescribeTimeToLiveInput{ - TableName: aws.String(tableName), - }) - if err != nil { - return 42, "", err - } - - ttlDesc := result.TimeToLiveDescription - - return result, *ttlDesc.TimeToLiveStatus, nil - }, - } - - _, err := stateConf.WaitForState() - return err -} - -func isDynamoDbTableOptionDisabled(v interface{}) bool { - options := v.([]interface{}) - if len(options) == 0 { - return true - } - e := options[0].(map[string]interface{})["enabled"] - return !e.(bool) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table_item.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table_item.go deleted file mode 100644 index 8ceb8a232..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table_item.go +++ /dev/null @@ -1,295 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "reflect" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/dynamodb" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsDynamoDbTableItem() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsDynamoDbTableItemCreate, - Read: resourceAwsDynamoDbTableItemRead, - Update: resourceAwsDynamoDbTableItemUpdate, - Delete: resourceAwsDynamoDbTableItemDelete, - - Schema: map[string]*schema.Schema{ - "table_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "hash_key": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "range_key": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - }, - "item": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateDynamoDbTableItem, - }, - }, - } -} - -func validateDynamoDbTableItem(v interface{}, k string) (ws []string, errors []error) { - _, err := expandDynamoDbTableItemAttributes(v.(string)) - if err != nil { - errors = append(errors, fmt.Errorf("Invalid format of %q: %s", k, err)) - } - return -} - -func resourceAwsDynamoDbTableItemCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dynamodbconn - - tableName := d.Get("table_name").(string) - hashKey := d.Get("hash_key").(string) - item := d.Get("item").(string) - attributes, err := expandDynamoDbTableItemAttributes(item) - if err != nil { - return err - } - - log.Printf("[DEBUG] DynamoDB item create: %s", tableName) - - _, err = conn.PutItem(&dynamodb.PutItemInput{ - Item: attributes, - // Explode if item exists. We didn't create it. - Expected: map[string]*dynamodb.ExpectedAttributeValue{ - hashKey: { - Exists: aws.Bool(false), - }, - }, - TableName: aws.String(tableName), - }) - if err != nil { - return err - } - - rangeKey := d.Get("range_key").(string) - id := buildDynamoDbTableItemId(tableName, hashKey, rangeKey, attributes) - - d.SetId(id) - - return resourceAwsDynamoDbTableItemRead(d, meta) -} - -func resourceAwsDynamoDbTableItemUpdate(d *schema.ResourceData, meta interface{}) error { - log.Printf("[DEBUG] Updating DynamoDB table %s", d.Id()) - conn := meta.(*AWSClient).dynamodbconn - - if d.HasChange("item") { - tableName := d.Get("table_name").(string) - hashKey := d.Get("hash_key").(string) - rangeKey := d.Get("range_key").(string) - - oldItem, newItem := d.GetChange("item") - - attributes, err := expandDynamoDbTableItemAttributes(newItem.(string)) - if err != nil { - return err - } - newQueryKey := buildDynamoDbTableItemQueryKey(attributes, hashKey, rangeKey) - - updates := map[string]*dynamodb.AttributeValueUpdate{} - for key, value := range attributes { - // Hash keys and range keys are not updatable, so we'll basically create - // a new record and delete the old one below - if key == hashKey || key == rangeKey { - continue - } - updates[key] = &dynamodb.AttributeValueUpdate{ - Action: aws.String(dynamodb.AttributeActionPut), - Value: value, - } - } - - _, err = conn.UpdateItem(&dynamodb.UpdateItemInput{ - AttributeUpdates: updates, - TableName: aws.String(tableName), - Key: newQueryKey, - }) - if err != nil { - return err - } - - oItem := oldItem.(string) - oldAttributes, err := expandDynamoDbTableItemAttributes(oItem) - if err != nil { - return err - } - - // New record is created via UpdateItem in case we're changing hash key - // so we need to get rid of the old one - oldQueryKey := buildDynamoDbTableItemQueryKey(oldAttributes, hashKey, rangeKey) - if !reflect.DeepEqual(oldQueryKey, newQueryKey) { - log.Printf("[DEBUG] Deleting old record: %#v", oldQueryKey) - _, err := conn.DeleteItem(&dynamodb.DeleteItemInput{ - Key: oldQueryKey, - TableName: aws.String(tableName), - }) - if err != nil { - return err - } - } - - id := buildDynamoDbTableItemId(tableName, hashKey, rangeKey, attributes) - d.SetId(id) - } - - return resourceAwsDynamoDbTableItemRead(d, meta) -} - -func resourceAwsDynamoDbTableItemRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dynamodbconn - - log.Printf("[DEBUG] Loading data for DynamoDB table item '%s'", d.Id()) - - tableName := d.Get("table_name").(string) - hashKey := d.Get("hash_key").(string) - rangeKey := d.Get("range_key").(string) - attributes, err := expandDynamoDbTableItemAttributes(d.Get("item").(string)) - if err != nil { - return err - } - - result, err := conn.GetItem(&dynamodb.GetItemInput{ - TableName: aws.String(tableName), - ConsistentRead: aws.Bool(true), - Key: buildDynamoDbTableItemQueryKey(attributes, hashKey, rangeKey), - ProjectionExpression: buildDynamoDbProjectionExpression(attributes), - ExpressionAttributeNames: buildDynamoDbExpressionAttributeNames(attributes), - }) - if err != nil { - if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Dynamodb Table Item (%s) not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("Error retrieving DynamoDB table item: %s", err) - } - - if result.Item == nil { - log.Printf("[WARN] Dynamodb Table Item (%s) not found", d.Id()) - d.SetId("") - return nil - } - - // The record exists, now test if it differs from what is desired - if !reflect.DeepEqual(result.Item, attributes) { - itemAttrs, err := flattenDynamoDbTableItemAttributes(result.Item) - if err != nil { - return err - } - d.Set("item", itemAttrs) - id := buildDynamoDbTableItemId(tableName, hashKey, rangeKey, result.Item) - d.SetId(id) - } - - return nil -} - -func resourceAwsDynamoDbTableItemDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dynamodbconn - - attributes, err := expandDynamoDbTableItemAttributes(d.Get("item").(string)) - if err != nil { - return err - } - hashKey := d.Get("hash_key").(string) - rangeKey := d.Get("range_key").(string) - queryKey := buildDynamoDbTableItemQueryKey(attributes, hashKey, rangeKey) - - _, err = conn.DeleteItem(&dynamodb.DeleteItemInput{ - Key: queryKey, - TableName: aws.String(d.Get("table_name").(string)), - }) - return err -} - -// Helpers - -func buildDynamoDbExpressionAttributeNames(attrs map[string]*dynamodb.AttributeValue) map[string]*string { - names := map[string]*string{} - for key := range attrs { - names["#a_"+key] = aws.String(key) - } - - return names -} - -func buildDynamoDbProjectionExpression(attrs map[string]*dynamodb.AttributeValue) *string { - keys := []string{} - for key := range attrs { - keys = append(keys, key) - } - return aws.String("#a_" + strings.Join(keys, ", #a_")) -} - -func buildDynamoDbTableItemId(tableName string, hashKey string, rangeKey string, attrs map[string]*dynamodb.AttributeValue) string { - hashVal := attrs[hashKey] - - id := []string{ - tableName, - hashKey, - base64Encode(hashVal.B), - } - - if hashVal.S != nil { - id = append(id, *hashVal.S) - } else { - id = append(id, "") - } - if hashVal.N != nil { - id = append(id, *hashVal.N) - } else { - id = append(id, "") - } - if rangeKey != "" { - rangeVal := attrs[rangeKey] - - id = append(id, - rangeKey, - base64Encode(rangeVal.B), - ) - - if rangeVal.S != nil { - id = append(id, *rangeVal.S) - } else { - id = append(id, "") - } - - if rangeVal.N != nil { - id = append(id, *rangeVal.N) - } else { - id = append(id, "") - } - - } - - return strings.Join(id, "|") -} - -func buildDynamoDbTableItemQueryKey(attrs map[string]*dynamodb.AttributeValue, hashKey string, rangeKey string) map[string]*dynamodb.AttributeValue { - queryKey := map[string]*dynamodb.AttributeValue{ - hashKey: attrs[hashKey], - } - if rangeKey != "" { - queryKey[rangeKey] = attrs[rangeKey] - } - - return queryKey -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table_migrate.go deleted file mode 100644 index 29eb38de4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table_migrate.go +++ /dev/null @@ -1,70 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsDynamoDbTableMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS DynamoDB Table State v0; migrating to v1") - return migrateDynamoDBStateV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateDynamoDBStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() { - log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") - return is, nil - } - - log.Printf("[DEBUG] DynamoDB Table Attributes before Migration: %#v", is.Attributes) - - prefix := "global_secondary_index" - entity := resourceAwsDynamoDbTable() - - // Read old keys - reader := &schema.MapFieldReader{ - Schema: entity.Schema, - Map: schema.BasicMapReader(is.Attributes), - } - result, err := reader.ReadField([]string{prefix}) - if err != nil { - return nil, err - } - - oldKeys, ok := result.Value.(*schema.Set) - if !ok { - return nil, fmt.Errorf("Got unexpected value from state: %#v", result.Value) - } - - // Delete old keys - for k := range is.Attributes { - if strings.HasPrefix(k, fmt.Sprintf("%s.", prefix)) { - delete(is.Attributes, k) - } - } - - // Write new keys - writer := schema.MapFieldWriter{ - Schema: entity.Schema, - } - if err := writer.WriteField([]string{prefix}, oldKeys); err != nil { - return is, err - } - for k, v := range writer.Map() { - is.Attributes[k] = v - } - - log.Printf("[DEBUG] DynamoDB Table Attributes after State Migration: %#v", is.Attributes) - - return is, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot.go deleted file mode 100644 index 7821ece72..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot.go +++ /dev/null @@ -1,182 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsEbsSnapshot() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEbsSnapshotCreate, - Read: resourceAwsEbsSnapshotRead, - Delete: resourceAwsEbsSnapshotDelete, - - Schema: map[string]*schema.Schema{ - "volume_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - "owner_alias": { - Type: schema.TypeString, - Computed: true, - }, - "encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - "volume_size": { - Type: schema.TypeInt, - Computed: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "data_encryption_key_id": { - Type: schema.TypeString, - Computed: true, - }, - - "tags": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsEbsSnapshotCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - request := &ec2.CreateSnapshotInput{ - VolumeId: aws.String(d.Get("volume_id").(string)), - } - if v, ok := d.GetOk("description"); ok { - request.Description = aws.String(v.(string)) - } - - var res *ec2.Snapshot - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - res, err = conn.CreateSnapshot(request) - - if isAWSErr(err, "SnapshotCreationPerVolumeRateExceeded", "The maximum per volume CreateSnapshot request rate has been exceeded") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - - if err != nil { - return fmt.Errorf("error creating EC2 EBS Snapshot: %s", err) - } - - d.SetId(*res.SnapshotId) - - err = resourceAwsEbsSnapshotWaitForAvailable(d.Id(), conn) - if err != nil { - return err - } - - if err := setTags(conn, d); err != nil { - log.Printf("[WARN] error setting tags: %s", err) - } - - return resourceAwsEbsSnapshotRead(d, meta) -} - -func resourceAwsEbsSnapshotRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeSnapshotsInput{ - SnapshotIds: []*string{aws.String(d.Id())}, - } - res, err := conn.DescribeSnapshots(req) - if err != nil { - if isAWSErr(err, "InvalidSnapshot.NotFound", "") { - log.Printf("[WARN] Snapshot %q Not found - removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - if len(res.Snapshots) == 0 { - d.SetId("") - return nil - } - - snapshot := res.Snapshots[0] - - d.Set("description", snapshot.Description) - d.Set("owner_id", snapshot.OwnerId) - d.Set("encrypted", snapshot.Encrypted) - d.Set("owner_alias", snapshot.OwnerAlias) - d.Set("volume_id", snapshot.VolumeId) - d.Set("data_encryption_key_id", snapshot.DataEncryptionKeyId) - d.Set("kms_key_id", snapshot.KmsKeyId) - d.Set("volume_size", snapshot.VolumeSize) - - if err := d.Set("tags", tagsToMap(snapshot.Tags)); err != nil { - log.Printf("[WARN] error saving tags to state: %s", err) - } - - return nil -} - -func resourceAwsEbsSnapshotDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - request := &ec2.DeleteSnapshotInput{ - SnapshotId: aws.String(d.Id()), - } - _, err := conn.DeleteSnapshot(request) - if err == nil { - return nil - } - - ebsErr, ok := err.(awserr.Error) - if ebsErr.Code() == "SnapshotInUse" { - return resource.RetryableError(fmt.Errorf("EBS SnapshotInUse - trying again while it detaches")) - } - - if !ok { - return resource.NonRetryableError(err) - } - - return resource.NonRetryableError(err) - }) -} - -func resourceAwsEbsSnapshotWaitForAvailable(id string, conn *ec2.EC2) error { - log.Printf("Waiting for Snapshot %s to become available...", id) - - req := &ec2.DescribeSnapshotsInput{ - SnapshotIds: []*string{aws.String(id)}, - } - err := conn.WaitUntilSnapshotCompleted(req) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot_copy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot_copy.go deleted file mode 100644 index f15954128..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot_copy.go +++ /dev/null @@ -1,176 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsEbsSnapshotCopy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEbsSnapshotCopyCreate, - Read: resourceAwsEbsSnapshotCopyRead, - Delete: resourceAwsEbsSnapshotCopyDelete, - - Schema: map[string]*schema.Schema{ - "volume_id": { - Type: schema.TypeString, - Computed: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - "owner_alias": { - Type: schema.TypeString, - Computed: true, - }, - "encrypted": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - "volume_size": { - Type: schema.TypeInt, - Computed: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "data_encryption_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "source_region": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "source_snapshot_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsEbsSnapshotCopyCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - request := &ec2.CopySnapshotInput{ - SourceRegion: aws.String(d.Get("source_region").(string)), - SourceSnapshotId: aws.String(d.Get("source_snapshot_id").(string)), - } - if v, ok := d.GetOk("description"); ok { - request.Description = aws.String(v.(string)) - } - if v, ok := d.GetOk("encrypted"); ok { - request.Encrypted = aws.Bool(v.(bool)) - } - if v, ok := d.GetOk("kms_key_id"); ok { - request.KmsKeyId = aws.String(v.(string)) - } - - res, err := conn.CopySnapshot(request) - if err != nil { - return err - } - - d.SetId(*res.SnapshotId) - - err = resourceAwsEbsSnapshotCopyWaitForAvailable(d.Id(), conn) - if err != nil { - return err - } - - if err := setTags(conn, d); err != nil { - log.Printf("[WARN] error setting tags: %s", err) - } - - return resourceAwsEbsSnapshotCopyRead(d, meta) -} - -func resourceAwsEbsSnapshotCopyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeSnapshotsInput{ - SnapshotIds: []*string{aws.String(d.Id())}, - } - res, err := conn.DescribeSnapshots(req) - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidSnapshotID.NotFound" { - log.Printf("Snapshot %q Not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - snapshot := res.Snapshots[0] - - d.Set("description", snapshot.Description) - d.Set("owner_id", snapshot.OwnerId) - d.Set("encrypted", snapshot.Encrypted) - d.Set("owner_alias", snapshot.OwnerAlias) - d.Set("volume_id", snapshot.VolumeId) - d.Set("data_encryption_key_id", snapshot.DataEncryptionKeyId) - d.Set("kms_key_id", snapshot.KmsKeyId) - d.Set("volume_size", snapshot.VolumeSize) - - if err := d.Set("tags", tagsToMap(snapshot.Tags)); err != nil { - log.Printf("[WARN] error saving tags to state: %s", err) - } - - return nil -} - -func resourceAwsEbsSnapshotCopyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - request := &ec2.DeleteSnapshotInput{ - SnapshotId: aws.String(d.Id()), - } - _, err := conn.DeleteSnapshot(request) - if err == nil { - return nil - } - - ebsErr, ok := err.(awserr.Error) - if ebsErr.Code() == "SnapshotInUse" { - return resource.RetryableError(fmt.Errorf("EBS SnapshotInUse - trying again while it detaches")) - } - - if !ok { - return resource.NonRetryableError(err) - } - - return resource.NonRetryableError(err) - }) -} - -func resourceAwsEbsSnapshotCopyWaitForAvailable(id string, conn *ec2.EC2) error { - log.Printf("Waiting for Snapshot %s to become available...", id) - - req := &ec2.DescribeSnapshotsInput{ - SnapshotIds: []*string{aws.String(id)}, - } - err := conn.WaitUntilSnapshotCompleted(req) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_volume.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_volume.go deleted file mode 100644 index 45dc65a89..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_volume.go +++ /dev/null @@ -1,318 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsEbsVolume() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEbsVolumeCreate, - Read: resourceAwsEbsVolumeRead, - Update: resourceAWSEbsVolumeUpdate, - Delete: resourceAwsEbsVolumeDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "availability_zone": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "encrypted": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - ForceNew: true, - }, - "iops": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "size": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - "snapshot_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsEbsVolumeCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - request := &ec2.CreateVolumeInput{ - AvailabilityZone: aws.String(d.Get("availability_zone").(string)), - } - if value, ok := d.GetOk("encrypted"); ok { - request.Encrypted = aws.Bool(value.(bool)) - } - if value, ok := d.GetOk("kms_key_id"); ok { - request.KmsKeyId = aws.String(value.(string)) - } - if value, ok := d.GetOk("size"); ok { - request.Size = aws.Int64(int64(value.(int))) - } - if value, ok := d.GetOk("snapshot_id"); ok { - request.SnapshotId = aws.String(value.(string)) - } - if value, ok := d.GetOk("tags"); ok { - request.TagSpecifications = []*ec2.TagSpecification{ - { - ResourceType: aws.String(ec2.ResourceTypeVolume), - Tags: tagsFromMap(value.(map[string]interface{})), - }, - } - } - - // IOPs are only valid, and required for, storage type io1. The current minimu - // is 100. Instead of a hard validation we we only apply the IOPs to the - // request if the type is io1, and log a warning otherwise. This allows users - // to "disable" iops. See https://github.com/hashicorp/terraform/pull/4146 - var t string - if value, ok := d.GetOk("type"); ok { - t = value.(string) - request.VolumeType = aws.String(t) - } - - iops := d.Get("iops").(int) - if t != "io1" && iops > 0 { - log.Printf("[WARN] IOPs is only valid for storate type io1 for EBS Volumes") - } else if t == "io1" { - // We add the iops value without validating it's size, to allow AWS to - // enforce a size requirement (currently 100) - request.Iops = aws.Int64(int64(iops)) - } - - log.Printf( - "[DEBUG] EBS Volume create opts: %s", request) - result, err := conn.CreateVolume(request) - if err != nil { - return fmt.Errorf("Error creating EC2 volume: %s", err) - } - - log.Println("[DEBUG] Waiting for Volume to become available") - - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating"}, - Target: []string{"available"}, - Refresh: volumeStateRefreshFunc(conn, *result.VolumeId), - Timeout: 5 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Volume (%s) to become available: %s", - *result.VolumeId, err) - } - - d.SetId(*result.VolumeId) - - return resourceAwsEbsVolumeRead(d, meta) -} - -func resourceAWSEbsVolumeUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - if _, ok := d.GetOk("tags"); ok { - if err := setTags(conn, d); err != nil { - return fmt.Errorf("Error updating tags for EBS Volume: %s", err) - } - } - - requestUpdate := false - params := &ec2.ModifyVolumeInput{ - VolumeId: aws.String(d.Id()), - } - - if d.HasChange("size") { - requestUpdate = true - params.Size = aws.Int64(int64(d.Get("size").(int))) - } - - if d.HasChange("type") { - requestUpdate = true - params.VolumeType = aws.String(d.Get("type").(string)) - } - - if d.HasChange("iops") { - requestUpdate = true - params.Iops = aws.Int64(int64(d.Get("iops").(int))) - } - - if requestUpdate { - result, err := conn.ModifyVolume(params) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "modifying"}, - Target: []string{"available", "in-use"}, - Refresh: volumeStateRefreshFunc(conn, *result.VolumeModification.VolumeId), - Timeout: 5 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Volume (%s) to become available: %s", - *result.VolumeModification.VolumeId, err) - } - } - - return resourceAwsEbsVolumeRead(d, meta) -} - -// volumeStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// a the state of a Volume. Returns successfully when volume is available -func volumeStateRefreshFunc(conn *ec2.EC2, volumeID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeVolumes(&ec2.DescribeVolumesInput{ - VolumeIds: []*string{aws.String(volumeID)}, - }) - - if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - // Set this to nil as if we didn't find anything. - log.Printf("Error on Volume State Refresh: message: \"%s\", code:\"%s\"", ec2err.Message(), ec2err.Code()) - resp = nil - return nil, "", err - } else { - log.Printf("Error on Volume State Refresh: %s", err) - return nil, "", err - } - } - - v := resp.Volumes[0] - return v, *v.State, nil - } -} - -func resourceAwsEbsVolumeRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - request := &ec2.DescribeVolumesInput{ - VolumeIds: []*string{aws.String(d.Id())}, - } - - response, err := conn.DescribeVolumes(request) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVolume.NotFound" { - d.SetId("") - return nil - } - return fmt.Errorf("Error reading EC2 volume %s: %s", d.Id(), err) - } - - return readVolume(d, meta.(*AWSClient), response.Volumes[0]) -} - -func resourceAwsEbsVolumeDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - request := &ec2.DeleteVolumeInput{ - VolumeId: aws.String(d.Id()), - } - _, err := conn.DeleteVolume(request) - if err == nil { - return nil - } - - ebsErr, ok := err.(awserr.Error) - if ebsErr.Code() == "VolumeInUse" { - return resource.RetryableError(fmt.Errorf("EBS VolumeInUse - trying again while it detaches")) - } - - if !ok { - return resource.NonRetryableError(err) - } - - return resource.NonRetryableError(err) - }) - -} - -func readVolume(d *schema.ResourceData, client *AWSClient, volume *ec2.Volume) error { - d.SetId(*volume.VolumeId) - - arn := arn.ARN{ - Partition: client.partition, - Region: client.region, - Service: "ec2", - AccountID: client.accountid, - Resource: fmt.Sprintf("volume/%s", d.Id()), - } - d.Set("arn", arn.String()) - - d.Set("availability_zone", *volume.AvailabilityZone) - if volume.Encrypted != nil { - d.Set("encrypted", *volume.Encrypted) - } - if volume.KmsKeyId != nil { - d.Set("kms_key_id", *volume.KmsKeyId) - } - if volume.Size != nil { - d.Set("size", *volume.Size) - } - if volume.SnapshotId != nil { - d.Set("snapshot_id", *volume.SnapshotId) - } - if volume.VolumeType != nil { - d.Set("type", *volume.VolumeType) - } - - if volume.VolumeType != nil && *volume.VolumeType == "io1" { - // Only set the iops attribute if the volume type is io1. Setting otherwise - // can trigger a refresh/plan loop based on the computed value that is given - // from AWS, and prevent us from specifying 0 as a valid iops. - // See https://github.com/hashicorp/terraform/pull/4146 - if volume.Iops != nil { - d.Set("iops", *volume.Iops) - } - } - - d.Set("tags", tagsToMap(volume.Tags)) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_capacity_reservation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_capacity_reservation.go deleted file mode 100644 index 46bae8a87..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_capacity_reservation.go +++ /dev/null @@ -1,260 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEc2CapacityReservation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEc2CapacityReservationCreate, - Read: resourceAwsEc2CapacityReservationRead, - Update: resourceAwsEc2CapacityReservationUpdate, - Delete: resourceAwsEc2CapacityReservationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "availability_zone": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "ebs_optimized": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Default: false, - }, - "end_date": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.ValidateRFC3339TimeString, - }, - "end_date_type": { - Type: schema.TypeString, - Optional: true, - Default: ec2.EndDateTypeUnlimited, - ValidateFunc: validation.StringInSlice([]string{ - ec2.EndDateTypeUnlimited, - ec2.EndDateTypeLimited, - }, false), - }, - "ephemeral_storage": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Default: false, - }, - "instance_count": { - Type: schema.TypeInt, - Required: true, - }, - "instance_match_criteria": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: ec2.InstanceMatchCriteriaOpen, - ValidateFunc: validation.StringInSlice([]string{ - ec2.InstanceMatchCriteriaOpen, - ec2.InstanceMatchCriteriaTargeted, - }, false), - }, - "instance_platform": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - ec2.CapacityReservationInstancePlatformLinuxUnix, - ec2.CapacityReservationInstancePlatformRedHatEnterpriseLinux, - ec2.CapacityReservationInstancePlatformSuselinux, - ec2.CapacityReservationInstancePlatformWindows, - ec2.CapacityReservationInstancePlatformWindowswithSqlserver, - ec2.CapacityReservationInstancePlatformWindowswithSqlserverEnterprise, - ec2.CapacityReservationInstancePlatformWindowswithSqlserverStandard, - ec2.CapacityReservationInstancePlatformWindowswithSqlserverWeb, - }, false), - }, - "instance_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "tags": tagsSchema(), - "tenancy": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: ec2.CapacityReservationTenancyDefault, - ValidateFunc: validation.StringInSlice([]string{ - ec2.CapacityReservationTenancyDefault, - ec2.CapacityReservationTenancyDedicated, - }, false), - }, - }, - } -} - -func resourceAwsEc2CapacityReservationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - opts := &ec2.CreateCapacityReservationInput{ - AvailabilityZone: aws.String(d.Get("availability_zone").(string)), - EndDateType: aws.String(d.Get("end_date_type").(string)), - InstanceCount: aws.Int64(int64(d.Get("instance_count").(int))), - InstancePlatform: aws.String(d.Get("instance_platform").(string)), - InstanceType: aws.String(d.Get("instance_type").(string)), - } - - if v, ok := d.GetOk("ebs_optimized"); ok { - opts.EbsOptimized = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("end_date"); ok { - t, err := time.Parse(time.RFC3339, v.(string)) - if err != nil { - return fmt.Errorf("Error parsing EC2 Capacity Reservation end date: %s", err.Error()) - } - opts.EndDate = aws.Time(t) - } - - if v, ok := d.GetOk("ephemeral_storage"); ok { - opts.EphemeralStorage = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("instance_match_criteria"); ok { - opts.InstanceMatchCriteria = aws.String(v.(string)) - } - - if v, ok := d.GetOk("tenancy"); ok { - opts.Tenancy = aws.String(v.(string)) - } - - if v, ok := d.GetOk("tags"); ok && len(v.(map[string]interface{})) > 0 { - opts.TagSpecifications = []*ec2.TagSpecification{ - { - // There is no constant in the SDK for this resource type - ResourceType: aws.String("capacity-reservation"), - Tags: tagsFromMap(v.(map[string]interface{})), - }, - } - } - - log.Printf("[DEBUG] Capacity reservation: %s", opts) - - out, err := conn.CreateCapacityReservation(opts) - if err != nil { - return fmt.Errorf("Error creating EC2 Capacity Reservation: %s", err) - } - d.SetId(*out.CapacityReservation.CapacityReservationId) - return resourceAwsEc2CapacityReservationRead(d, meta) -} - -func resourceAwsEc2CapacityReservationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - resp, err := conn.DescribeCapacityReservations(&ec2.DescribeCapacityReservationsInput{ - CapacityReservationIds: []*string{aws.String(d.Id())}, - }) - - if err != nil { - return fmt.Errorf("Error describing EC2 Capacity Reservations: %s", err) - } - - // If nothing was found, then return no state - if len(resp.CapacityReservations) == 0 { - log.Printf("[WARN] EC2 Capacity Reservation (%s) not found, removing from state", d.Id()) - d.SetId("") - } - - reservation := resp.CapacityReservations[0] - - if aws.StringValue(reservation.State) == ec2.CapacityReservationStateCancelled || aws.StringValue(reservation.State) == ec2.CapacityReservationStateExpired { - log.Printf("[WARN] EC2 Capacity Reservation (%s) no longer active, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("availability_zone", reservation.AvailabilityZone) - d.Set("ebs_optimized", reservation.EbsOptimized) - - d.Set("end_date", "") - if reservation.EndDate != nil { - d.Set("end_date", aws.TimeValue(reservation.EndDate).Format(time.RFC3339)) - } - - d.Set("end_date_type", reservation.EndDateType) - d.Set("ephemeral_storage", reservation.EphemeralStorage) - d.Set("instance_count", reservation.TotalInstanceCount) - d.Set("instance_match_criteria", reservation.InstanceMatchCriteria) - d.Set("instance_platform", reservation.InstancePlatform) - d.Set("instance_type", reservation.InstanceType) - - if err := d.Set("tags", tagsToMap(reservation.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - d.Set("tenancy", reservation.Tenancy) - - return nil -} - -func resourceAwsEc2CapacityReservationUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - d.Partial(true) - - if d.HasChange("tags") { - if err := setTags(conn, d); err != nil { - return err - } else { - d.SetPartial("tags") - } - } - - d.Partial(false) - - opts := &ec2.ModifyCapacityReservationInput{ - CapacityReservationId: aws.String(d.Id()), - EndDateType: aws.String(d.Get("end_date_type").(string)), - InstanceCount: aws.Int64(int64(d.Get("instance_count").(int))), - } - - if v, ok := d.GetOk("end_date"); ok { - t, err := time.Parse(time.RFC3339, v.(string)) - if err != nil { - return fmt.Errorf("Error parsing EC2 Capacity Reservation end date: %s", err.Error()) - } - opts.EndDate = aws.Time(t) - } - - log.Printf("[DEBUG] Capacity reservation: %s", opts) - - _, err := conn.ModifyCapacityReservation(opts) - if err != nil { - return fmt.Errorf("Error modifying EC2 Capacity Reservation: %s", err) - } - return resourceAwsEc2CapacityReservationRead(d, meta) -} - -func resourceAwsEc2CapacityReservationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - opts := &ec2.CancelCapacityReservationInput{ - CapacityReservationId: aws.String(d.Id()), - } - - _, err := conn.CancelCapacityReservation(opts) - if err != nil { - return fmt.Errorf("Error cancelling EC2 Capacity Reservation: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_endpoint.go deleted file mode 100644 index dc0b5694a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_endpoint.go +++ /dev/null @@ -1,337 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEc2ClientVpnEndpoint() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEc2ClientVpnEndpointCreate, - Read: resourceAwsEc2ClientVpnEndpointRead, - Delete: resourceAwsEc2ClientVpnEndpointDelete, - Update: resourceAwsEc2ClientVpnEndpointUpdate, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "description": { - Type: schema.TypeString, - Optional: true, - }, - "client_cidr_block": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "dns_servers": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "server_certificate_arn": { - Type: schema.TypeString, - Required: true, - }, - "transport_protocol": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: ec2.TransportProtocolUdp, - ValidateFunc: validation.StringInSlice([]string{ - ec2.TransportProtocolTcp, - ec2.TransportProtocolUdp, - }, false), - }, - "authentication_options": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - ec2.ClientVpnAuthenticationTypeCertificateAuthentication, - ec2.ClientVpnAuthenticationTypeDirectoryServiceAuthentication, - }, false), - }, - "active_directory_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "root_certificate_chain_arn": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - "connection_log_options": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cloudwatch_log_group": { - Type: schema.TypeString, - Optional: true, - }, - "cloudwatch_log_stream": { - Type: schema.TypeString, - Optional: true, - }, - "enabled": { - Type: schema.TypeBool, - Required: true, - }, - }, - }, - }, - "dns_name": { - Type: schema.TypeString, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsEc2ClientVpnEndpointCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.CreateClientVpnEndpointInput{ - ClientCidrBlock: aws.String(d.Get("client_cidr_block").(string)), - ServerCertificateArn: aws.String(d.Get("server_certificate_arn").(string)), - TransportProtocol: aws.String(d.Get("transport_protocol").(string)), - } - - if v, ok := d.GetOk("description"); ok { - req.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("dns_servers"); ok { - req.DnsServers = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("authentication_options"); ok { - authOptsSet := v.([]interface{}) - attrs := authOptsSet[0].(map[string]interface{}) - - authOptsReq := &ec2.ClientVpnAuthenticationRequest{ - Type: aws.String(attrs["type"].(string)), - } - - if attrs["type"].(string) == "certificate-authentication" { - authOptsReq.MutualAuthentication = &ec2.CertificateAuthenticationRequest{ - ClientRootCertificateChainArn: aws.String(attrs["root_certificate_chain_arn"].(string)), - } - } - - if attrs["type"].(string) == "directory-service-authentication" { - authOptsReq.ActiveDirectory = &ec2.DirectoryServiceAuthenticationRequest{ - DirectoryId: aws.String(attrs["active_directory_id"].(string)), - } - } - - req.AuthenticationOptions = []*ec2.ClientVpnAuthenticationRequest{authOptsReq} - } - - if v, ok := d.GetOk("connection_log_options"); ok { - connLogSet := v.([]interface{}) - attrs := connLogSet[0].(map[string]interface{}) - - connLogReq := &ec2.ConnectionLogOptions{ - Enabled: aws.Bool(attrs["enabled"].(bool)), - } - - if attrs["enabled"].(bool) && attrs["cloudwatch_log_group"].(string) != "" { - connLogReq.CloudwatchLogGroup = aws.String(attrs["cloudwatch_log_group"].(string)) - } - - if attrs["enabled"].(bool) && attrs["cloudwatch_log_stream"].(string) != "" { - connLogReq.CloudwatchLogStream = aws.String(attrs["cloudwatch_log_stream"].(string)) - } - - req.ConnectionLogOptions = connLogReq - } - - log.Printf("[DEBUG] Creating Client VPN endpoint: %#v", req) - var resp *ec2.CreateClientVpnEndpointOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - resp, err = conn.CreateClientVpnEndpoint(req) - if isAWSErr(err, "OperationNotPermitted", "Endpoint cannot be created while another endpoint is being created") { - return resource.RetryableError(err) - } - if err != nil { - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return fmt.Errorf("Error creating Client VPN endpoint: %s", err) - } - - d.SetId(*resp.ClientVpnEndpointId) - - return resourceAwsEc2ClientVpnEndpointRead(d, meta) -} - -func resourceAwsEc2ClientVpnEndpointRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - var err error - - result, err := conn.DescribeClientVpnEndpoints(&ec2.DescribeClientVpnEndpointsInput{ - ClientVpnEndpointIds: []*string{aws.String(d.Id())}, - }) - - if err != nil { - return fmt.Errorf("Error reading Client VPN endpoint: %s", err) - } - - if result == nil || len(result.ClientVpnEndpoints) == 0 || result.ClientVpnEndpoints[0] == nil { - log.Printf("[WARN] EC2 Client VPN Endpoint (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if result.ClientVpnEndpoints[0].Status != nil && aws.StringValue(result.ClientVpnEndpoints[0].Status.Code) == ec2.ClientVpnEndpointStatusCodeDeleted { - log.Printf("[WARN] EC2 Client VPN Endpoint (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("description", result.ClientVpnEndpoints[0].Description) - d.Set("client_cidr_block", result.ClientVpnEndpoints[0].ClientCidrBlock) - d.Set("server_certificate_arn", result.ClientVpnEndpoints[0].ServerCertificateArn) - d.Set("transport_protocol", result.ClientVpnEndpoints[0].TransportProtocol) - d.Set("dns_name", result.ClientVpnEndpoints[0].DnsName) - d.Set("status", result.ClientVpnEndpoints[0].Status) - - err = d.Set("authentication_options", flattenAuthOptsConfig(result.ClientVpnEndpoints[0].AuthenticationOptions)) - if err != nil { - return err - } - - err = d.Set("connection_log_options", flattenConnLoggingConfig(result.ClientVpnEndpoints[0].ConnectionLogOptions)) - if err != nil { - return err - } - - return nil -} - -func resourceAwsEc2ClientVpnEndpointDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - _, err := conn.DeleteClientVpnEndpoint(&ec2.DeleteClientVpnEndpointInput{ - ClientVpnEndpointId: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error deleting Client VPN endpoint: %s", err) - } - - return nil -} - -func resourceAwsEc2ClientVpnEndpointUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.ModifyClientVpnEndpointInput{ - ClientVpnEndpointId: aws.String(d.Id()), - } - - if d.HasChange("description") { - req.Description = aws.String(d.Get("description").(string)) - } - - if d.HasChange("dns_servers") { - dnsValue := expandStringList(d.Get("dns_servers").(*schema.Set).List()) - var enabledValue *bool - - if len(dnsValue) > 0 { - enabledValue = aws.Bool(true) - } else { - enabledValue = aws.Bool(false) - } - - dnsMod := &ec2.DnsServersOptionsModifyStructure{ - CustomDnsServers: dnsValue, - Enabled: enabledValue, - } - req.DnsServers = dnsMod - } - - if d.HasChange("server_certificate_arn") { - req.ServerCertificateArn = aws.String(d.Get("server_certificate_arn").(string)) - } - - if d.HasChange("connection_log_options") { - if v, ok := d.GetOk("connection_log_options"); ok { - connSet := v.([]interface{}) - attrs := connSet[0].(map[string]interface{}) - - connReq := &ec2.ConnectionLogOptions{ - Enabled: aws.Bool(attrs["enabled"].(bool)), - } - - if attrs["enabled"].(bool) && attrs["cloudwatch_log_group"].(string) != "" { - connReq.CloudwatchLogGroup = aws.String(attrs["cloudwatch_log_group"].(string)) - } - - if attrs["enabled"].(bool) && attrs["cloudwatch_log_stream"].(string) != "" { - connReq.CloudwatchLogStream = aws.String(attrs["cloudwatch_log_stream"].(string)) - } - - req.ConnectionLogOptions = connReq - } - } - - _, err := conn.ModifyClientVpnEndpoint(req) - if err != nil { - return fmt.Errorf("Error modifying Client VPN endpoint: %s", err) - } - - return resourceAwsEc2ClientVpnEndpointRead(d, meta) -} - -func flattenConnLoggingConfig(lopts *ec2.ConnectionLogResponseOptions) []map[string]interface{} { - m := make(map[string]interface{}) - if lopts.CloudwatchLogGroup != nil { - m["cloudwatch_log_group"] = *lopts.CloudwatchLogGroup - } - if lopts.CloudwatchLogStream != nil { - m["cloudwatch_log_stream"] = *lopts.CloudwatchLogStream - } - m["enabled"] = *lopts.Enabled - return []map[string]interface{}{m} -} - -func flattenAuthOptsConfig(aopts []*ec2.ClientVpnAuthentication) []map[string]interface{} { - m := make(map[string]interface{}) - if aopts[0].MutualAuthentication != nil { - m["root_certificate_chain_arn"] = *aopts[0].MutualAuthentication.ClientRootCertificateChain - } - if aopts[0].ActiveDirectory != nil { - m["active_directory_id"] = *aopts[0].ActiveDirectory.DirectoryId - } - m["type"] = *aopts[0].Type - return []map[string]interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_network_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_network_association.go deleted file mode 100644 index 6210a0c02..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_network_association.go +++ /dev/null @@ -1,175 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsEc2ClientVpnNetworkAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEc2ClientVpnNetworkAssociationCreate, - Read: resourceAwsEc2ClientVpnNetworkAssociationRead, - Delete: resourceAwsEc2ClientVpnNetworkAssociationDelete, - - Schema: map[string]*schema.Schema{ - "client_vpn_endpoint_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "subnet_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "security_groups": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsEc2ClientVpnNetworkAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.AssociateClientVpnTargetNetworkInput{ - ClientVpnEndpointId: aws.String(d.Get("client_vpn_endpoint_id").(string)), - SubnetId: aws.String(d.Get("subnet_id").(string)), - } - - log.Printf("[DEBUG] Creating Client VPN network association: %#v", req) - resp, err := conn.AssociateClientVpnTargetNetwork(req) - if err != nil { - return fmt.Errorf("Error creating Client VPN network association: %s", err) - } - - d.SetId(*resp.AssociationId) - - stateConf := &resource.StateChangeConf{ - Pending: []string{ec2.AssociationStatusCodeAssociating}, - Target: []string{ec2.AssociationStatusCodeAssociated}, - Refresh: clientVpnNetworkAssociationRefreshFunc(conn, d.Id(), d.Get("client_vpn_endpoint_id").(string)), - Timeout: d.Timeout(schema.TimeoutCreate), - } - - log.Printf("[DEBUG] Waiting for Client VPN endpoint to associate with target network: %s", d.Id()) - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for Client VPN endpoint to associate with target network: %s", err) - } - - return resourceAwsEc2ClientVpnNetworkAssociationRead(d, meta) -} - -func resourceAwsEc2ClientVpnNetworkAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - var err error - - result, err := conn.DescribeClientVpnTargetNetworks(&ec2.DescribeClientVpnTargetNetworksInput{ - ClientVpnEndpointId: aws.String(d.Get("client_vpn_endpoint_id").(string)), - AssociationIds: []*string{aws.String(d.Id())}, - }) - - if isAWSErr(err, "InvalidClientVpnAssociationId.NotFound", "") || isAWSErr(err, "InvalidClientVpnEndpointId.NotFound", "") { - log.Printf("[WARN] EC2 Client VPN Network Association (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("Error reading Client VPN network association: %s", err) - } - - if result == nil || len(result.ClientVpnTargetNetworks) == 0 || result.ClientVpnTargetNetworks[0] == nil { - log.Printf("[WARN] EC2 Client VPN Network Association (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if result.ClientVpnTargetNetworks[0].Status != nil && aws.StringValue(result.ClientVpnTargetNetworks[0].Status.Code) == ec2.AssociationStatusCodeDisassociated { - log.Printf("[WARN] EC2 Client VPN Network Association (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("client_vpn_endpoint_id", result.ClientVpnTargetNetworks[0].ClientVpnEndpointId) - d.Set("status", result.ClientVpnTargetNetworks[0].Status.Code) - d.Set("subnet_id", result.ClientVpnTargetNetworks[0].TargetNetworkId) - d.Set("vpc_id", result.ClientVpnTargetNetworks[0].VpcId) - - if err := d.Set("security_groups", aws.StringValueSlice(result.ClientVpnTargetNetworks[0].SecurityGroups)); err != nil { - return fmt.Errorf("error setting security_groups: %s", err) - } - - return nil -} - -func resourceAwsEc2ClientVpnNetworkAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - _, err := conn.DisassociateClientVpnTargetNetwork(&ec2.DisassociateClientVpnTargetNetworkInput{ - ClientVpnEndpointId: aws.String(d.Get("client_vpn_endpoint_id").(string)), - AssociationId: aws.String(d.Id()), - }) - - if isAWSErr(err, "InvalidClientVpnAssociationId.NotFound", "") || isAWSErr(err, "InvalidClientVpnEndpointId.NotFound", "") { - return nil - } - - if err != nil { - return fmt.Errorf("Error deleting Client VPN network association: %s", err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{ec2.AssociationStatusCodeDisassociating}, - Target: []string{ec2.AssociationStatusCodeDisassociated}, - Refresh: clientVpnNetworkAssociationRefreshFunc(conn, d.Id(), d.Get("client_vpn_endpoint_id").(string)), - Timeout: d.Timeout(schema.TimeoutDelete), - } - - log.Printf("[DEBUG] Waiting for Client VPN endpoint to disassociate with target network: %s", d.Id()) - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for Client VPN endpoint to disassociate with target network: %s", err) - } - - return nil -} - -func clientVpnNetworkAssociationRefreshFunc(conn *ec2.EC2, cvnaID string, cvepID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeClientVpnTargetNetworks(&ec2.DescribeClientVpnTargetNetworksInput{ - ClientVpnEndpointId: aws.String(cvepID), - AssociationIds: []*string{aws.String(cvnaID)}, - }) - - if isAWSErr(err, "InvalidClientVpnAssociationId.NotFound", "") || isAWSErr(err, "InvalidClientVpnEndpointId.NotFound", "") { - return 42, ec2.AssociationStatusCodeDisassociated, nil - } - - if err != nil { - return nil, "", err - } - - if resp == nil || len(resp.ClientVpnTargetNetworks) == 0 || resp.ClientVpnTargetNetworks[0] == nil { - return 42, ec2.AssociationStatusCodeDisassociated, nil - } - - return resp.ClientVpnTargetNetworks[0], aws.StringValue(resp.ClientVpnTargetNetworks[0].Status.Code), nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_fleet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_fleet.go deleted file mode 100644 index 03dd06f20..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_fleet.go +++ /dev/null @@ -1,834 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEc2Fleet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEc2FleetCreate, - Read: resourceAwsEc2FleetRead, - Update: resourceAwsEc2FleetUpdate, - Delete: resourceAwsEc2FleetDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - Update: schema.DefaultTimeout(10 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "excess_capacity_termination_policy": { - Type: schema.TypeString, - Optional: true, - Default: ec2.FleetExcessCapacityTerminationPolicyTermination, - ValidateFunc: validation.StringInSlice([]string{ - ec2.FleetExcessCapacityTerminationPolicyNoTermination, - ec2.FleetExcessCapacityTerminationPolicyTermination, - }, false), - }, - "launch_template_config": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "launch_template_specification": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "launch_template_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "launch_template_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "version": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - }, - }, - "override": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 50, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "availability_zone": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "instance_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "max_price": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "priority": { - Type: schema.TypeFloat, - Optional: true, - ForceNew: true, - }, - "subnet_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "weighted_capacity": { - Type: schema.TypeFloat, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - }, - }, - }, - "on_demand_options": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "allocation_strategy": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "lowestPrice", - ValidateFunc: validation.StringInSlice([]string{ - // AWS SDK constant incorrect - // ec2.FleetOnDemandAllocationStrategyLowestPrice, - "lowestPrice", - ec2.FleetOnDemandAllocationStrategyPrioritized, - }, false), - }, - }, - }, - }, - "replace_unhealthy_instances": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - "spot_options": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "allocation_strategy": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "lowestPrice", - ValidateFunc: validation.StringInSlice([]string{ - ec2.SpotAllocationStrategyDiversified, - // AWS SDK constant incorrect - // ec2.SpotAllocationStrategyLowestPrice, - "lowestPrice", - }, false), - }, - "instance_interruption_behavior": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: ec2.SpotInstanceInterruptionBehaviorTerminate, - ValidateFunc: validation.StringInSlice([]string{ - ec2.SpotInstanceInterruptionBehaviorHibernate, - ec2.SpotInstanceInterruptionBehaviorStop, - ec2.SpotInstanceInterruptionBehaviorTerminate, - }, false), - }, - "instance_pools_to_use_count": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - Default: 1, - ValidateFunc: validation.IntAtLeast(1), - }, - }, - }, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "target_capacity_specification": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "default_target_capacity_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - ec2.DefaultTargetCapacityTypeOnDemand, - ec2.DefaultTargetCapacityTypeSpot, - }, false), - }, - "on_demand_target_capacity": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - // Show difference for new resources - if d.Id() == "" { - return false - } - // Show difference if value is configured - if new != "0" { - return false - } - // Show difference if existing state reflects different default type - defaultTargetCapacityTypeO, _ := d.GetChange("target_capacity_specification.0.default_target_capacity_type") - if defaultTargetCapacityTypeO.(string) != ec2.DefaultTargetCapacityTypeOnDemand { - return false - } - // Show difference if existing state reflects different total capacity - oldInt, err := strconv.Atoi(old) - if err != nil { - log.Printf("[WARN] %s DiffSuppressFunc error converting %s to integer: %s", k, old, err) - return false - } - totalTargetCapacityO, _ := d.GetChange("target_capacity_specification.0.total_target_capacity") - return oldInt == totalTargetCapacityO.(int) - }, - }, - "spot_target_capacity": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - // Show difference for new resources - if d.Id() == "" { - return false - } - // Show difference if value is configured - if new != "0" { - return false - } - // Show difference if existing state reflects different default type - defaultTargetCapacityTypeO, _ := d.GetChange("target_capacity_specification.0.default_target_capacity_type") - if defaultTargetCapacityTypeO.(string) != ec2.DefaultTargetCapacityTypeSpot { - return false - } - // Show difference if existing state reflects different total capacity - oldInt, err := strconv.Atoi(old) - if err != nil { - log.Printf("[WARN] %s DiffSuppressFunc error converting %s to integer: %s", k, old, err) - return false - } - totalTargetCapacityO, _ := d.GetChange("target_capacity_specification.0.total_target_capacity") - return oldInt == totalTargetCapacityO.(int) - }, - }, - "total_target_capacity": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - }, - "terminate_instances": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "terminate_instances_with_expiration": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: ec2.FleetTypeMaintain, - ValidateFunc: validation.StringInSlice([]string{ - ec2.FleetTypeMaintain, - ec2.FleetTypeRequest, - }, false), - }, - }, - } -} - -func resourceAwsEc2FleetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.CreateFleetInput{ - ExcessCapacityTerminationPolicy: aws.String(d.Get("excess_capacity_termination_policy").(string)), - LaunchTemplateConfigs: expandEc2FleetLaunchTemplateConfigRequests(d.Get("launch_template_config").([]interface{})), - OnDemandOptions: expandEc2OnDemandOptionsRequest(d.Get("on_demand_options").([]interface{})), - ReplaceUnhealthyInstances: aws.Bool(d.Get("replace_unhealthy_instances").(bool)), - SpotOptions: expandEc2SpotOptionsRequest(d.Get("spot_options").([]interface{})), - TargetCapacitySpecification: expandEc2TargetCapacitySpecificationRequest(d.Get("target_capacity_specification").([]interface{})), - TerminateInstancesWithExpiration: aws.Bool(d.Get("terminate_instances_with_expiration").(bool)), - TagSpecifications: expandEc2TagSpecifications(d.Get("tags").(map[string]interface{})), - Type: aws.String(d.Get("type").(string)), - } - - log.Printf("[DEBUG] Creating EC2 Fleet: %s", input) - output, err := conn.CreateFleet(input) - if err != nil { - return fmt.Errorf("error creating EC2 Fleet: %s", err) - } - - d.SetId(aws.StringValue(output.FleetId)) - - // If a request type is fulfilled immediately, we can miss the transition from active to deleted - // Instead of an error here, allow the Read function to trigger recreation - target := []string{ec2.FleetStateCodeActive} - if d.Get("type").(string) == ec2.FleetTypeRequest { - target = append(target, ec2.FleetStateCodeDeleted) - target = append(target, ec2.FleetStateCodeDeletedRunning) - target = append(target, ec2.FleetStateCodeDeletedTerminating) - // AWS SDK constants incorrect - target = append(target, "deleted_running") - target = append(target, "deleted_terminating") - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{ec2.FleetStateCodeSubmitted}, - Target: target, - Refresh: ec2FleetRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), - } - - log.Printf("[DEBUG] Waiting for EC2 Fleet (%s) activation", d.Id()) - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for EC2 Fleet (%s) activation: %s", d.Id(), err) - } - - return resourceAwsEc2FleetRead(d, meta) -} - -func resourceAwsEc2FleetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.DescribeFleetsInput{ - FleetIds: []*string{aws.String(d.Id())}, - } - - log.Printf("[DEBUG] Reading EC2 Fleet (%s): %s", d.Id(), input) - output, err := conn.DescribeFleets(input) - - if isAWSErr(err, "InvalidFleetId.NotFound", "") { - log.Printf("[WARN] EC2 Fleet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading EC2 Fleet: %s", err) - } - - if output == nil || len(output.Fleets) == 0 { - log.Printf("[WARN] EC2 Fleet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - var fleet *ec2.FleetData - for _, fleetData := range output.Fleets { - if fleetData == nil { - continue - } - if aws.StringValue(fleetData.FleetId) != d.Id() { - continue - } - fleet = fleetData - break - } - - if fleet == nil { - log.Printf("[WARN] EC2 Fleet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - deletedStates := []string{ - ec2.FleetStateCodeDeleted, - ec2.FleetStateCodeDeletedRunning, - ec2.FleetStateCodeDeletedTerminating, - // AWS SDK constants are incorrect - "deleted_running", - "deleted_terminating", - } - for _, deletedState := range deletedStates { - if aws.StringValue(fleet.FleetState) == deletedState { - log.Printf("[WARN] EC2 Fleet (%s) in deleted state (%s), removing from state", d.Id(), aws.StringValue(fleet.FleetState)) - d.SetId("") - return nil - } - } - - d.Set("excess_capacity_termination_policy", fleet.ExcessCapacityTerminationPolicy) - - if err := d.Set("launch_template_config", flattenEc2FleetLaunchTemplateConfigs(fleet.LaunchTemplateConfigs)); err != nil { - return fmt.Errorf("error setting launch_template_config: %s", err) - } - - if err := d.Set("on_demand_options", flattenEc2OnDemandOptions(fleet.OnDemandOptions)); err != nil { - return fmt.Errorf("error setting on_demand_options: %s", err) - } - - d.Set("replace_unhealthy_instances", fleet.ReplaceUnhealthyInstances) - - if err := d.Set("spot_options", flattenEc2SpotOptions(fleet.SpotOptions)); err != nil { - return fmt.Errorf("error setting spot_options: %s", err) - } - - if err := d.Set("target_capacity_specification", flattenEc2TargetCapacitySpecification(fleet.TargetCapacitySpecification)); err != nil { - return fmt.Errorf("error setting target_capacity_specification: %s", err) - } - - d.Set("terminate_instances_with_expiration", fleet.TerminateInstancesWithExpiration) - d.Set("type", fleet.Type) - - if err := d.Set("tags", tagsToMap(fleet.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func resourceAwsEc2FleetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.ModifyFleetInput{ - ExcessCapacityTerminationPolicy: aws.String(d.Get("excess_capacity_termination_policy").(string)), - FleetId: aws.String(d.Id()), - // InvalidTargetCapacitySpecification: Currently we only support total target capacity modification. - // TargetCapacitySpecification: expandEc2TargetCapacitySpecificationRequest(d.Get("target_capacity_specification").([]interface{})), - TargetCapacitySpecification: &ec2.TargetCapacitySpecificationRequest{ - TotalTargetCapacity: aws.Int64(int64(d.Get("target_capacity_specification.0.total_target_capacity").(int))), - }, - } - - log.Printf("[DEBUG] Modifying EC2 Fleet (%s): %s", d.Id(), input) - _, err := conn.ModifyFleet(input) - - if err != nil { - return fmt.Errorf("error modifying EC2 Fleet: %s", err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{ec2.FleetStateCodeModifying}, - Target: []string{ec2.FleetStateCodeActive}, - Refresh: ec2FleetRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutUpdate), - } - - log.Printf("[DEBUG] Waiting for EC2 Fleet (%s) modification", d.Id()) - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for EC2 Fleet (%s) modification: %s", d.Id(), err) - } - - return resourceAwsEc2FleetRead(d, meta) -} - -func resourceAwsEc2FleetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.DeleteFleetsInput{ - FleetIds: []*string{aws.String(d.Id())}, - TerminateInstances: aws.Bool(d.Get("terminate_instances").(bool)), - } - - log.Printf("[DEBUG] Deleting EC2 Fleet (%s): %s", d.Id(), input) - _, err := conn.DeleteFleets(input) - - if isAWSErr(err, "InvalidFleetId.NotFound", "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting EC2 Fleet: %s", err) - } - - pending := []string{ec2.FleetStateCodeActive} - target := []string{ec2.FleetStateCodeDeleted} - if d.Get("terminate_instances").(bool) { - pending = append(pending, ec2.FleetStateCodeDeletedTerminating) - // AWS SDK constant is incorrect: unexpected state 'deleted_terminating', wanted target 'deleted, deleted-terminating' - pending = append(pending, "deleted_terminating") - } else { - target = append(target, ec2.FleetStateCodeDeletedRunning) - // AWS SDK constant is incorrect: unexpected state 'deleted_running', wanted target 'deleted, deleted-running' - target = append(target, "deleted_running") - } - - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: target, - Refresh: ec2FleetRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutDelete), - } - - log.Printf("[DEBUG] Waiting for EC2 Fleet (%s) deletion", d.Id()) - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for EC2 Fleet (%s) deletion: %s", d.Id(), err) - } - - return nil -} - -func ec2FleetRefreshFunc(conn *ec2.EC2, fleetID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &ec2.DescribeFleetsInput{ - FleetIds: []*string{aws.String(fleetID)}, - } - - log.Printf("[DEBUG] Reading EC2 Fleet (%s): %s", fleetID, input) - output, err := conn.DescribeFleets(input) - - if isAWSErr(err, "InvalidFleetId.NotFound", "") { - return nil, ec2.FleetStateCodeDeleted, nil - } - - if err != nil { - return nil, "", fmt.Errorf("error reading EC2 Fleet: %s", err) - } - - if output == nil || len(output.Fleets) == 0 { - return nil, ec2.FleetStateCodeDeleted, nil - } - - var fleet *ec2.FleetData - for _, fleetData := range output.Fleets { - if fleetData == nil { - continue - } - if aws.StringValue(fleetData.FleetId) == fleetID { - fleet = fleetData - break - } - } - - if fleet == nil { - return nil, ec2.FleetStateCodeDeleted, nil - } - - return fleet, aws.StringValue(fleet.FleetState), nil - } -} - -func expandEc2FleetLaunchTemplateConfigRequests(l []interface{}) []*ec2.FleetLaunchTemplateConfigRequest { - fleetLaunchTemplateConfigRequests := make([]*ec2.FleetLaunchTemplateConfigRequest, len(l)) - for i, m := range l { - if m == nil { - fleetLaunchTemplateConfigRequests[i] = &ec2.FleetLaunchTemplateConfigRequest{} - continue - } - - fleetLaunchTemplateConfigRequests[i] = expandEc2FleetLaunchTemplateConfigRequest(m.(map[string]interface{})) - } - return fleetLaunchTemplateConfigRequests -} - -func expandEc2FleetLaunchTemplateConfigRequest(m map[string]interface{}) *ec2.FleetLaunchTemplateConfigRequest { - fleetLaunchTemplateConfigRequest := &ec2.FleetLaunchTemplateConfigRequest{ - LaunchTemplateSpecification: expandEc2LaunchTemplateSpecificationRequest(m["launch_template_specification"].([]interface{})), - } - - if v, ok := m["override"]; ok { - fleetLaunchTemplateConfigRequest.Overrides = expandEc2FleetLaunchTemplateOverridesRequests(v.([]interface{})) - } - - return fleetLaunchTemplateConfigRequest -} - -func expandEc2FleetLaunchTemplateOverridesRequests(l []interface{}) []*ec2.FleetLaunchTemplateOverridesRequest { - if len(l) == 0 { - return nil - } - - fleetLaunchTemplateOverridesRequests := make([]*ec2.FleetLaunchTemplateOverridesRequest, len(l)) - for i, m := range l { - if m == nil { - fleetLaunchTemplateOverridesRequests[i] = &ec2.FleetLaunchTemplateOverridesRequest{} - continue - } - - fleetLaunchTemplateOverridesRequests[i] = expandEc2FleetLaunchTemplateOverridesRequest(m.(map[string]interface{})) - } - return fleetLaunchTemplateOverridesRequests -} - -func expandEc2FleetLaunchTemplateOverridesRequest(m map[string]interface{}) *ec2.FleetLaunchTemplateOverridesRequest { - fleetLaunchTemplateOverridesRequest := &ec2.FleetLaunchTemplateOverridesRequest{} - - if v, ok := m["availability_zone"]; ok && v.(string) != "" { - fleetLaunchTemplateOverridesRequest.AvailabilityZone = aws.String(v.(string)) - } - - if v, ok := m["instance_type"]; ok && v.(string) != "" { - fleetLaunchTemplateOverridesRequest.InstanceType = aws.String(v.(string)) - } - - if v, ok := m["max_price"]; ok && v.(string) != "" { - fleetLaunchTemplateOverridesRequest.MaxPrice = aws.String(v.(string)) - } - - if v, ok := m["priority"]; ok && v.(float64) != 0.0 { - fleetLaunchTemplateOverridesRequest.Priority = aws.Float64(v.(float64)) - } - - if v, ok := m["subnet_id"]; ok && v.(string) != "" { - fleetLaunchTemplateOverridesRequest.SubnetId = aws.String(v.(string)) - } - - if v, ok := m["weighted_capacity"]; ok && v.(float64) != 0.0 { - fleetLaunchTemplateOverridesRequest.WeightedCapacity = aws.Float64(v.(float64)) - } - - return fleetLaunchTemplateOverridesRequest -} - -func expandEc2LaunchTemplateSpecificationRequest(l []interface{}) *ec2.FleetLaunchTemplateSpecificationRequest { - fleetLaunchTemplateSpecificationRequest := &ec2.FleetLaunchTemplateSpecificationRequest{} - - if len(l) == 0 || l[0] == nil { - return fleetLaunchTemplateSpecificationRequest - } - - m := l[0].(map[string]interface{}) - - if v, ok := m["launch_template_id"]; ok && v.(string) != "" { - fleetLaunchTemplateSpecificationRequest.LaunchTemplateId = aws.String(v.(string)) - } - - if v, ok := m["launch_template_name"]; ok && v.(string) != "" { - fleetLaunchTemplateSpecificationRequest.LaunchTemplateName = aws.String(v.(string)) - } - - if v, ok := m["version"]; ok && v.(string) != "" { - fleetLaunchTemplateSpecificationRequest.Version = aws.String(v.(string)) - } - - return fleetLaunchTemplateSpecificationRequest -} - -func expandEc2OnDemandOptionsRequest(l []interface{}) *ec2.OnDemandOptionsRequest { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - return &ec2.OnDemandOptionsRequest{ - AllocationStrategy: aws.String(m["allocation_strategy"].(string)), - } -} - -func expandEc2SpotOptionsRequest(l []interface{}) *ec2.SpotOptionsRequest { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - spotOptionsRequest := &ec2.SpotOptionsRequest{ - AllocationStrategy: aws.String(m["allocation_strategy"].(string)), - InstanceInterruptionBehavior: aws.String(m["instance_interruption_behavior"].(string)), - } - - // InvalidFleetConfig: InstancePoolsToUseCount option is only available with the lowestPrice allocation strategy. - if aws.StringValue(spotOptionsRequest.AllocationStrategy) == "lowestPrice" { - spotOptionsRequest.InstancePoolsToUseCount = aws.Int64(int64(m["instance_pools_to_use_count"].(int))) - } - - return spotOptionsRequest -} - -func expandEc2TagSpecifications(m map[string]interface{}) []*ec2.TagSpecification { - if len(m) == 0 { - return nil - } - - return []*ec2.TagSpecification{ - { - ResourceType: aws.String("fleet"), - Tags: tagsFromMap(m), - }, - } -} - -func expandEc2TargetCapacitySpecificationRequest(l []interface{}) *ec2.TargetCapacitySpecificationRequest { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - targetCapacitySpecificationrequest := &ec2.TargetCapacitySpecificationRequest{ - TotalTargetCapacity: aws.Int64(int64(m["total_target_capacity"].(int))), - } - - if v, ok := m["default_target_capacity_type"]; ok && v.(string) != "" { - targetCapacitySpecificationrequest.DefaultTargetCapacityType = aws.String(v.(string)) - } - - if v, ok := m["on_demand_target_capacity"]; ok && v.(int) != 0 { - targetCapacitySpecificationrequest.OnDemandTargetCapacity = aws.Int64(int64(v.(int))) - } - - if v, ok := m["spot_target_capacity"]; ok && v.(int) != 0 { - targetCapacitySpecificationrequest.SpotTargetCapacity = aws.Int64(int64(v.(int))) - } - - return targetCapacitySpecificationrequest -} - -func flattenEc2FleetLaunchTemplateConfigs(fleetLaunchTemplateConfigs []*ec2.FleetLaunchTemplateConfig) []interface{} { - l := make([]interface{}, len(fleetLaunchTemplateConfigs)) - - for i, fleetLaunchTemplateConfig := range fleetLaunchTemplateConfigs { - if fleetLaunchTemplateConfig == nil { - l[i] = map[string]interface{}{} - continue - } - m := map[string]interface{}{ - "launch_template_specification": flattenEc2FleetLaunchTemplateSpecification(fleetLaunchTemplateConfig.LaunchTemplateSpecification), - "override": flattenEc2FleetLaunchTemplateOverrides(fleetLaunchTemplateConfig.Overrides), - } - l[i] = m - } - - return l -} - -func flattenEc2FleetLaunchTemplateOverrides(fleetLaunchTemplateOverrides []*ec2.FleetLaunchTemplateOverrides) []interface{} { - l := make([]interface{}, len(fleetLaunchTemplateOverrides)) - - for i, fleetLaunchTemplateOverride := range fleetLaunchTemplateOverrides { - if fleetLaunchTemplateOverride == nil { - l[i] = map[string]interface{}{} - continue - } - m := map[string]interface{}{ - "availability_zone": aws.StringValue(fleetLaunchTemplateOverride.AvailabilityZone), - "instance_type": aws.StringValue(fleetLaunchTemplateOverride.InstanceType), - "max_price": aws.StringValue(fleetLaunchTemplateOverride.MaxPrice), - "priority": aws.Float64Value(fleetLaunchTemplateOverride.Priority), - "subnet_id": aws.StringValue(fleetLaunchTemplateOverride.SubnetId), - "weighted_capacity": aws.Float64Value(fleetLaunchTemplateOverride.WeightedCapacity), - } - l[i] = m - } - - return l -} - -func flattenEc2FleetLaunchTemplateSpecification(fleetLaunchTemplateSpecification *ec2.FleetLaunchTemplateSpecification) []interface{} { - if fleetLaunchTemplateSpecification == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "launch_template_id": aws.StringValue(fleetLaunchTemplateSpecification.LaunchTemplateId), - "launch_template_name": aws.StringValue(fleetLaunchTemplateSpecification.LaunchTemplateName), - "version": aws.StringValue(fleetLaunchTemplateSpecification.Version), - } - - return []interface{}{m} -} - -func flattenEc2OnDemandOptions(onDemandOptions *ec2.OnDemandOptions) []interface{} { - if onDemandOptions == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "allocation_strategy": aws.StringValue(onDemandOptions.AllocationStrategy), - } - - return []interface{}{m} -} - -func flattenEc2SpotOptions(spotOptions *ec2.SpotOptions) []interface{} { - if spotOptions == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "allocation_strategy": aws.StringValue(spotOptions.AllocationStrategy), - "instance_interruption_behavior": aws.StringValue(spotOptions.InstanceInterruptionBehavior), - "instance_pools_to_use_count": aws.Int64Value(spotOptions.InstancePoolsToUseCount), - } - - // API will omit InstancePoolsToUseCount if AllocationStrategy is diversified, which breaks our Default: 1 - // Here we just reset it to 1 to prevent removing the Default and setting up a special DiffSuppressFunc - if spotOptions.InstancePoolsToUseCount == nil && aws.StringValue(spotOptions.AllocationStrategy) == ec2.SpotAllocationStrategyDiversified { - m["instance_pools_to_use_count"] = 1 - } - - return []interface{}{m} -} - -func flattenEc2TargetCapacitySpecification(targetCapacitySpecification *ec2.TargetCapacitySpecification) []interface{} { - if targetCapacitySpecification == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "default_target_capacity_type": aws.StringValue(targetCapacitySpecification.DefaultTargetCapacityType), - "on_demand_target_capacity": aws.Int64Value(targetCapacitySpecification.OnDemandTargetCapacity), - "spot_target_capacity": aws.Int64Value(targetCapacitySpecification.SpotTargetCapacity), - "total_target_capacity": aws.Int64Value(targetCapacitySpecification.TotalTargetCapacity), - } - - return []interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway.go deleted file mode 100644 index 13228ab14..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway.go +++ /dev/null @@ -1,249 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEc2TransitGateway() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEc2TransitGatewayCreate, - Read: resourceAwsEc2TransitGatewayRead, - Update: resourceAwsEc2TransitGatewayUpdate, - Delete: resourceAwsEc2TransitGatewayDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "amazon_side_asn": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - Default: 64512, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "association_default_route_table_id": { - Type: schema.TypeString, - Computed: true, - }, - "auto_accept_shared_attachments": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: ec2.AutoAcceptSharedAttachmentsValueDisable, - ValidateFunc: validation.StringInSlice([]string{ - ec2.AutoAcceptSharedAttachmentsValueDisable, - ec2.AutoAcceptSharedAttachmentsValueEnable, - }, false), - }, - "default_route_table_association": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: ec2.DefaultRouteTableAssociationValueEnable, - ValidateFunc: validation.StringInSlice([]string{ - ec2.DefaultRouteTableAssociationValueDisable, - ec2.DefaultRouteTableAssociationValueEnable, - }, false), - }, - "default_route_table_propagation": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: ec2.DefaultRouteTablePropagationValueEnable, - ValidateFunc: validation.StringInSlice([]string{ - ec2.DefaultRouteTablePropagationValueDisable, - ec2.DefaultRouteTablePropagationValueEnable, - }, false), - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "dns_support": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: ec2.DnsSupportValueEnable, - ValidateFunc: validation.StringInSlice([]string{ - ec2.DnsSupportValueDisable, - ec2.DnsSupportValueEnable, - }, false), - }, - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - "propagation_default_route_table_id": { - Type: schema.TypeString, - Computed: true, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "vpn_ecmp_support": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: ec2.VpnEcmpSupportValueEnable, - ValidateFunc: validation.StringInSlice([]string{ - ec2.VpnEcmpSupportValueDisable, - ec2.VpnEcmpSupportValueEnable, - }, false), - }, - }, - } -} - -func resourceAwsEc2TransitGatewayCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.CreateTransitGatewayInput{ - Options: &ec2.TransitGatewayRequestOptions{ - AutoAcceptSharedAttachments: aws.String(d.Get("auto_accept_shared_attachments").(string)), - DefaultRouteTableAssociation: aws.String(d.Get("default_route_table_association").(string)), - DefaultRouteTablePropagation: aws.String(d.Get("default_route_table_propagation").(string)), - DnsSupport: aws.String(d.Get("dns_support").(string)), - VpnEcmpSupport: aws.String(d.Get("vpn_ecmp_support").(string)), - }, - TagSpecifications: expandEc2TransitGatewayTagSpecifications(d.Get("tags").(map[string]interface{})), - } - - if v, ok := d.GetOk("amazon_side_asn"); ok { - input.Options.AmazonSideAsn = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating EC2 Transit Gateway: %s", input) - output, err := conn.CreateTransitGateway(input) - if err != nil { - return fmt.Errorf("error creating EC2 Transit Gateway: %s", err) - } - - d.SetId(aws.StringValue(output.TransitGateway.TransitGatewayId)) - - if err := waitForEc2TransitGatewayCreation(conn, d.Id()); err != nil { - return fmt.Errorf("error waiting for EC2 Transit Gateway (%s) availability: %s", d.Id(), err) - } - - return resourceAwsEc2TransitGatewayRead(d, meta) -} - -func resourceAwsEc2TransitGatewayRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - transitGateway, err := ec2DescribeTransitGateway(conn, d.Id()) - - if isAWSErr(err, "InvalidTransitGatewayID.NotFound", "") { - log.Printf("[WARN] EC2 Transit Gateway (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading EC2 Transit Gateway: %s", err) - } - - if transitGateway == nil { - log.Printf("[WARN] EC2 Transit Gateway (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if aws.StringValue(transitGateway.State) == ec2.TransitGatewayStateDeleting || aws.StringValue(transitGateway.State) == ec2.TransitGatewayStateDeleted { - log.Printf("[WARN] EC2 Transit Gateway (%s) in deleted state (%s), removing from state", d.Id(), aws.StringValue(transitGateway.State)) - d.SetId("") - return nil - } - - if transitGateway.Options == nil { - return fmt.Errorf("error reading EC2 Transit Gateway (%s): missing options", d.Id()) - } - - d.Set("amazon_side_asn", aws.Int64Value(transitGateway.Options.AmazonSideAsn)) - d.Set("arn", transitGateway.TransitGatewayArn) - d.Set("association_default_route_table_id", transitGateway.Options.AssociationDefaultRouteTableId) - d.Set("auto_accept_shared_attachments", transitGateway.Options.AutoAcceptSharedAttachments) - d.Set("default_route_table_association", transitGateway.Options.DefaultRouteTableAssociation) - d.Set("default_route_table_propagation", transitGateway.Options.DefaultRouteTablePropagation) - d.Set("description", transitGateway.Description) - d.Set("dns_support", transitGateway.Options.DnsSupport) - d.Set("owner_id", transitGateway.OwnerId) - d.Set("propagation_default_route_table_id", transitGateway.Options.PropagationDefaultRouteTableId) - - if err := d.Set("tags", tagsToMap(transitGateway.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - d.Set("vpn_ecmp_support", transitGateway.Options.VpnEcmpSupport) - - return nil -} - -func resourceAwsEc2TransitGatewayUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - if err := setTags(conn, d); err != nil { - return fmt.Errorf("error updating EC2 Transit Gateway (%s) tags: %s", d.Id(), err) - } - - return nil -} - -func resourceAwsEc2TransitGatewayDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.DeleteTransitGatewayInput{ - TransitGatewayId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting EC2 Transit Gateway (%s): %s", d.Id(), input) - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteTransitGateway(input) - - if isAWSErr(err, "IncorrectState", "has non-deleted Transit Gateway Attachments") { - return resource.RetryableError(err) - } - - if isAWSErr(err, "IncorrectState", "has non-deleted VPN Attachments") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - - if isAWSErr(err, "InvalidTransitGatewayID.NotFound", "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting EC2 Transit Gateway: %s", err) - } - - if err := waitForEc2TransitGatewayDeletion(conn, d.Id()); err != nil { - return fmt.Errorf("error waiting for EC2 Transit Gateway (%s) deletion: %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route.go deleted file mode 100644 index cd00adcb9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route.go +++ /dev/null @@ -1,161 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/terraform/helper/resource" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEc2TransitGatewayRoute() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEc2TransitGatewayRouteCreate, - Read: resourceAwsEc2TransitGatewayRouteRead, - Delete: resourceAwsEc2TransitGatewayRouteDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "destination_cidr_block": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "transit_gateway_attachment_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "transit_gateway_route_table_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - }, - } -} - -func resourceAwsEc2TransitGatewayRouteCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - destination := d.Get("destination_cidr_block").(string) - transitGatewayRouteTableID := d.Get("transit_gateway_route_table_id").(string) - - input := &ec2.CreateTransitGatewayRouteInput{ - DestinationCidrBlock: aws.String(destination), - TransitGatewayAttachmentId: aws.String(d.Get("transit_gateway_attachment_id").(string)), - TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), - } - - log.Printf("[DEBUG] Creating EC2 Transit Gateway Route: %s", input) - _, err := conn.CreateTransitGatewayRoute(input) - if err != nil { - return fmt.Errorf("error creating EC2 Transit Gateway Route: %s", err) - } - - d.SetId(fmt.Sprintf("%s_%s", transitGatewayRouteTableID, destination)) - - return resourceAwsEc2TransitGatewayRouteRead(d, meta) -} - -func resourceAwsEc2TransitGatewayRouteRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - transitGatewayRouteTableID, destination, err := decodeEc2TransitGatewayRouteID(d.Id()) - if err != nil { - return err - } - - // Handle EC2 eventual consistency - var transitGatewayRoute *ec2.TransitGatewayRoute - err = resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - transitGatewayRoute, err = ec2DescribeTransitGatewayRoute(conn, transitGatewayRouteTableID, destination) - - if err != nil { - return resource.NonRetryableError(err) - } - - if d.IsNewResource() && transitGatewayRoute == nil { - return resource.RetryableError(&resource.NotFoundError{}) - } - - return nil - }) - - if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { - log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) not found, removing from state", transitGatewayRouteTableID) - d.SetId("") - return nil - } - - if isResourceNotFoundError(err) { - log.Printf("[WARN] EC2 Transit Gateway Route (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading EC2 Transit Gateway Route: %s", err) - } - - if transitGatewayRoute == nil { - log.Printf("[WARN] EC2 Transit Gateway Route (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - state := aws.StringValue(transitGatewayRoute.State) - if state == ec2.TransitGatewayRouteStateDeleted || state == ec2.TransitGatewayRouteStateDeleting { - log.Printf("[WARN] EC2 Transit Gateway Route (%s) deleted, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("destination_cidr_block", transitGatewayRoute.DestinationCidrBlock) - - d.Set("transit_gateway_attachment_id", "") - if len(transitGatewayRoute.TransitGatewayAttachments) > 0 && transitGatewayRoute.TransitGatewayAttachments[0] != nil { - d.Set("transit_gateway_attachment_id", transitGatewayRoute.TransitGatewayAttachments[0].TransitGatewayAttachmentId) - } - - d.Set("transit_gateway_route_table_id", transitGatewayRouteTableID) - - return nil -} - -func resourceAwsEc2TransitGatewayRouteDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - transitGatewayRouteTableID, destination, err := decodeEc2TransitGatewayRouteID(d.Id()) - if err != nil { - return err - } - - input := &ec2.DeleteTransitGatewayRouteInput{ - DestinationCidrBlock: aws.String(destination), - TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), - } - - log.Printf("[DEBUG] Deleting EC2 Transit Gateway Route (%s): %s", d.Id(), input) - _, err = conn.DeleteTransitGatewayRoute(input) - - if isAWSErr(err, "InvalidRoute.NotFound", "") || isAWSErr(err, "InvalidRouteTableID.NotFound", "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting EC2 Transit Gateway Route: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table.go deleted file mode 100644 index b08c6e9d6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table.go +++ /dev/null @@ -1,142 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEc2TransitGatewayRouteTable() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEc2TransitGatewayRouteTableCreate, - Read: resourceAwsEc2TransitGatewayRouteTableRead, - Update: resourceAwsEc2TransitGatewayRouteTableUpdate, - Delete: resourceAwsEc2TransitGatewayRouteTableDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "default_association_route_table": { - Type: schema.TypeBool, - Computed: true, - }, - "default_propagation_route_table": { - Type: schema.TypeBool, - Computed: true, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "transit_gateway_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - }, - } -} - -func resourceAwsEc2TransitGatewayRouteTableCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.CreateTransitGatewayRouteTableInput{ - TransitGatewayId: aws.String(d.Get("transit_gateway_id").(string)), - TagSpecifications: expandEc2TransitGatewayRouteTableTagSpecifications(d.Get("tags").(map[string]interface{})), - } - - log.Printf("[DEBUG] Creating EC2 Transit Gateway Route Table: %s", input) - output, err := conn.CreateTransitGatewayRouteTable(input) - if err != nil { - return fmt.Errorf("error creating EC2 Transit Gateway Route Table: %s", err) - } - - d.SetId(aws.StringValue(output.TransitGatewayRouteTable.TransitGatewayRouteTableId)) - - if err := waitForEc2TransitGatewayRouteTableCreation(conn, d.Id()); err != nil { - return fmt.Errorf("error waiting for EC2 Transit Gateway Route Table (%s) availability: %s", d.Id(), err) - } - - return resourceAwsEc2TransitGatewayRouteTableRead(d, meta) -} - -func resourceAwsEc2TransitGatewayRouteTableRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - transitGatewayRouteTable, err := ec2DescribeTransitGatewayRouteTable(conn, d.Id()) - - if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { - log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading EC2 Transit Gateway Route Table: %s", err) - } - - if transitGatewayRouteTable == nil { - log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if aws.StringValue(transitGatewayRouteTable.State) == ec2.TransitGatewayRouteTableStateDeleting || aws.StringValue(transitGatewayRouteTable.State) == ec2.TransitGatewayRouteTableStateDeleted { - log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) in deleted state (%s), removing from state", d.Id(), aws.StringValue(transitGatewayRouteTable.State)) - d.SetId("") - return nil - } - - d.Set("default_association_route_table", aws.BoolValue(transitGatewayRouteTable.DefaultAssociationRouteTable)) - d.Set("default_propagation_route_table", aws.BoolValue(transitGatewayRouteTable.DefaultPropagationRouteTable)) - - if err := d.Set("tags", tagsToMap(transitGatewayRouteTable.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - d.Set("transit_gateway_id", aws.StringValue(transitGatewayRouteTable.TransitGatewayId)) - - return nil -} - -func resourceAwsEc2TransitGatewayRouteTableUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - if err := setTags(conn, d); err != nil { - return fmt.Errorf("error updating EC2 Transit Gateway Route Table (%s) tags: %s", d.Id(), err) - } - - return nil -} - -func resourceAwsEc2TransitGatewayRouteTableDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.DeleteTransitGatewayRouteTableInput{ - TransitGatewayRouteTableId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting EC2 Transit Gateway Route Table (%s): %s", d.Id(), input) - _, err := conn.DeleteTransitGatewayRouteTable(input) - - if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting EC2 Transit Gateway Route Table: %s", err) - } - - if err := waitForEc2TransitGatewayRouteTableDeletion(conn, d.Id()); err != nil { - return fmt.Errorf("error waiting for EC2 Transit Gateway Route Table (%s) deletion: %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_association.go deleted file mode 100644 index 6f5a647db..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_association.go +++ /dev/null @@ -1,141 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEc2TransitGatewayRouteTableAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEc2TransitGatewayRouteTableAssociationCreate, - Read: resourceAwsEc2TransitGatewayRouteTableAssociationRead, - Delete: resourceAwsEc2TransitGatewayRouteTableAssociationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "resource_id": { - Type: schema.TypeString, - Computed: true, - }, - "resource_type": { - Type: schema.TypeString, - Computed: true, - }, - "transit_gateway_attachment_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "transit_gateway_route_table_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - }, - } -} - -func resourceAwsEc2TransitGatewayRouteTableAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - transitGatewayAttachmentID := d.Get("transit_gateway_attachment_id").(string) - transitGatewayRouteTableID := d.Get("transit_gateway_route_table_id").(string) - - input := &ec2.AssociateTransitGatewayRouteTableInput{ - TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), - TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), - } - - _, err := conn.AssociateTransitGatewayRouteTable(input) - if err != nil { - return fmt.Errorf("error associating EC2 Transit Gateway Route Table (%s) association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) - } - - d.SetId(fmt.Sprintf("%s_%s", transitGatewayRouteTableID, transitGatewayAttachmentID)) - - if err := waitForEc2TransitGatewayRouteTableAssociationCreation(conn, transitGatewayRouteTableID, transitGatewayAttachmentID); err != nil { - return fmt.Errorf("error waiting for EC2 Transit Gateway Route Table (%s) association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) - } - - return resourceAwsEc2TransitGatewayRouteTableAssociationRead(d, meta) -} - -func resourceAwsEc2TransitGatewayRouteTableAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - transitGatewayRouteTableID, transitGatewayAttachmentID, err := decodeEc2TransitGatewayRouteTableAssociationID(d.Id()) - if err != nil { - return err - } - - transitGatewayAssociation, err := ec2DescribeTransitGatewayRouteTableAssociation(conn, transitGatewayRouteTableID, transitGatewayAttachmentID) - - if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { - log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) not found, removing from state", transitGatewayRouteTableID) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading EC2 Transit Gateway Route Table (%s) Association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) - } - - if transitGatewayAssociation == nil { - log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) Association (%s) not found, removing from state", transitGatewayRouteTableID, transitGatewayAttachmentID) - d.SetId("") - return nil - } - - if aws.StringValue(transitGatewayAssociation.State) == ec2.TransitGatewayAssociationStateDisassociating { - log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) Association (%s) in deleted state (%s), removing from state", transitGatewayRouteTableID, transitGatewayAttachmentID, aws.StringValue(transitGatewayAssociation.State)) - d.SetId("") - return nil - } - - d.Set("resource_id", aws.StringValue(transitGatewayAssociation.ResourceId)) - d.Set("resource_type", aws.StringValue(transitGatewayAssociation.ResourceType)) - d.Set("transit_gateway_attachment_id", aws.StringValue(transitGatewayAssociation.TransitGatewayAttachmentId)) - d.Set("transit_gateway_route_table_id", transitGatewayRouteTableID) - - return nil -} - -func resourceAwsEc2TransitGatewayRouteTableAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - transitGatewayRouteTableID, transitGatewayAttachmentID, err := decodeEc2TransitGatewayRouteTableAssociationID(d.Id()) - if err != nil { - return err - } - - input := &ec2.DisassociateTransitGatewayRouteTableInput{ - TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), - TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), - } - - log.Printf("[DEBUG] Disassociating EC2 Transit Gateway Route Table (%s) Association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, input) - _, err = conn.DisassociateTransitGatewayRouteTable(input) - - if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { - return nil - } - - if err != nil { - return fmt.Errorf("error disassociating EC2 Transit Gateway Route Table (%s) Association (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) - } - - if err := waitForEc2TransitGatewayRouteTableAssociationDeletion(conn, transitGatewayRouteTableID, transitGatewayAttachmentID); err != nil { - return fmt.Errorf("error waiting for EC2 Transit Gateway Route Table (%s) Association (%s) disassociation: %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_propagation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_propagation.go deleted file mode 100644 index b553db574..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_propagation.go +++ /dev/null @@ -1,127 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEc2TransitGatewayRouteTablePropagation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEc2TransitGatewayRouteTablePropagationCreate, - Read: resourceAwsEc2TransitGatewayRouteTablePropagationRead, - Delete: resourceAwsEc2TransitGatewayRouteTablePropagationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "resource_id": { - Type: schema.TypeString, - Computed: true, - }, - "resource_type": { - Type: schema.TypeString, - Computed: true, - }, - "transit_gateway_attachment_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "transit_gateway_route_table_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - }, - } -} - -func resourceAwsEc2TransitGatewayRouteTablePropagationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - transitGatewayAttachmentID := d.Get("transit_gateway_attachment_id").(string) - transitGatewayRouteTableID := d.Get("transit_gateway_route_table_id").(string) - - input := &ec2.EnableTransitGatewayRouteTablePropagationInput{ - TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), - TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), - } - - _, err := conn.EnableTransitGatewayRouteTablePropagation(input) - if err != nil { - return fmt.Errorf("error enabling EC2 Transit Gateway Route Table (%s) propagation (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) - } - - d.SetId(fmt.Sprintf("%s_%s", transitGatewayRouteTableID, transitGatewayAttachmentID)) - - return resourceAwsEc2TransitGatewayRouteTablePropagationRead(d, meta) -} - -func resourceAwsEc2TransitGatewayRouteTablePropagationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - transitGatewayRouteTableID, transitGatewayAttachmentID, err := decodeEc2TransitGatewayRouteTablePropagationID(d.Id()) - if err != nil { - return err - } - - transitGatewayPropagation, err := ec2DescribeTransitGatewayRouteTablePropagation(conn, transitGatewayRouteTableID, transitGatewayAttachmentID) - - if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { - log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) not found, removing from state", transitGatewayRouteTableID) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading EC2 Transit Gateway Route Table (%s) Propagation (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) - } - - if transitGatewayPropagation == nil { - log.Printf("[WARN] EC2 Transit Gateway Route Table (%s) Propagation (%s) not found, removing from state", transitGatewayRouteTableID, transitGatewayAttachmentID) - d.SetId("") - return nil - } - - d.Set("resource_id", aws.StringValue(transitGatewayPropagation.ResourceId)) - d.Set("resource_type", aws.StringValue(transitGatewayPropagation.ResourceType)) - d.Set("transit_gateway_attachment_id", aws.StringValue(transitGatewayPropagation.TransitGatewayAttachmentId)) - d.Set("transit_gateway_route_table_id", transitGatewayRouteTableID) - - return nil -} - -func resourceAwsEc2TransitGatewayRouteTablePropagationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - transitGatewayRouteTableID, transitGatewayAttachmentID, err := decodeEc2TransitGatewayRouteTablePropagationID(d.Id()) - if err != nil { - return err - } - - input := &ec2.DisableTransitGatewayRouteTablePropagationInput{ - TransitGatewayAttachmentId: aws.String(transitGatewayAttachmentID), - TransitGatewayRouteTableId: aws.String(transitGatewayRouteTableID), - } - - log.Printf("[DEBUG] Disabling EC2 Transit Gateway Route Table (%s) Propagation (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, input) - _, err = conn.DisableTransitGatewayRouteTablePropagation(input) - - if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { - return nil - } - - if err != nil { - return fmt.Errorf("error disabling EC2 Transit Gateway Route Table (%s) Propagation (%s): %s", transitGatewayRouteTableID, transitGatewayAttachmentID, err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_vpc_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_vpc_attachment.go deleted file mode 100644 index 07a05806b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_vpc_attachment.go +++ /dev/null @@ -1,294 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEc2TransitGatewayVpcAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEc2TransitGatewayVpcAttachmentCreate, - Read: resourceAwsEc2TransitGatewayVpcAttachmentRead, - Update: resourceAwsEc2TransitGatewayVpcAttachmentUpdate, - Delete: resourceAwsEc2TransitGatewayVpcAttachmentDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "dns_support": { - Type: schema.TypeString, - Optional: true, - Default: ec2.DnsSupportValueEnable, - ValidateFunc: validation.StringInSlice([]string{ - ec2.DnsSupportValueDisable, - ec2.DnsSupportValueEnable, - }, false), - }, - "ipv6_support": { - Type: schema.TypeString, - Optional: true, - Default: ec2.Ipv6SupportValueDisable, - ValidateFunc: validation.StringInSlice([]string{ - ec2.Ipv6SupportValueDisable, - ec2.Ipv6SupportValueEnable, - }, false), - }, - "subnet_ids": { - Type: schema.TypeSet, - Required: true, - MinItems: 1, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "transit_gateway_default_route_table_association": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "transit_gateway_default_route_table_propagation": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "transit_gateway_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "vpc_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "vpc_owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsEc2TransitGatewayVpcAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - transitGatewayID := d.Get("transit_gateway_id").(string) - - input := &ec2.CreateTransitGatewayVpcAttachmentInput{ - Options: &ec2.CreateTransitGatewayVpcAttachmentRequestOptions{ - DnsSupport: aws.String(d.Get("dns_support").(string)), - Ipv6Support: aws.String(d.Get("ipv6_support").(string)), - }, - SubnetIds: expandStringSet(d.Get("subnet_ids").(*schema.Set)), - TransitGatewayId: aws.String(transitGatewayID), - TagSpecifications: expandEc2TransitGatewayAttachmentTagSpecifications(d.Get("tags").(map[string]interface{})), - VpcId: aws.String(d.Get("vpc_id").(string)), - } - - log.Printf("[DEBUG] Creating EC2 Transit Gateway VPC Attachment: %s", input) - output, err := conn.CreateTransitGatewayVpcAttachment(input) - if err != nil { - return fmt.Errorf("error creating EC2 Transit Gateway VPC Attachment: %s", err) - } - - d.SetId(aws.StringValue(output.TransitGatewayVpcAttachment.TransitGatewayAttachmentId)) - - if err := waitForEc2TransitGatewayRouteTableAttachmentCreation(conn, d.Id()); err != nil { - return fmt.Errorf("error waiting for EC2 Transit Gateway VPC Attachment (%s) availability: %s", d.Id(), err) - } - - transitGateway, err := ec2DescribeTransitGateway(conn, transitGatewayID) - if err != nil { - return fmt.Errorf("error describing EC2 Transit Gateway (%s): %s", transitGatewayID, err) - } - - if transitGateway.Options == nil { - return fmt.Errorf("error describing EC2 Transit Gateway (%s): missing options", transitGatewayID) - } - - if err := ec2TransitGatewayRouteTableAssociationUpdate(conn, aws.StringValue(transitGateway.Options.AssociationDefaultRouteTableId), d.Id(), d.Get("transit_gateway_default_route_table_association").(bool)); err != nil { - return fmt.Errorf("error updating EC2 Transit Gateway Attachment (%s) Route Table (%s) association: %s", d.Id(), aws.StringValue(transitGateway.Options.AssociationDefaultRouteTableId), err) - } - - if err := ec2TransitGatewayRouteTablePropagationUpdate(conn, aws.StringValue(transitGateway.Options.PropagationDefaultRouteTableId), d.Id(), d.Get("transit_gateway_default_route_table_propagation").(bool)); err != nil { - return fmt.Errorf("error updating EC2 Transit Gateway Attachment (%s) Route Table (%s) propagation: %s", d.Id(), aws.StringValue(transitGateway.Options.PropagationDefaultRouteTableId), err) - } - - return resourceAwsEc2TransitGatewayVpcAttachmentRead(d, meta) -} - -func resourceAwsEc2TransitGatewayVpcAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - transitGatewayVpcAttachment, err := ec2DescribeTransitGatewayVpcAttachment(conn, d.Id()) - - if isAWSErr(err, "InvalidTransitGatewayAttachmentID.NotFound", "") { - log.Printf("[WARN] EC2 Transit Gateway VPC Attachment (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading EC2 Transit Gateway VPC Attachment: %s", err) - } - - if transitGatewayVpcAttachment == nil { - log.Printf("[WARN] EC2 Transit Gateway VPC Attachment (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if aws.StringValue(transitGatewayVpcAttachment.State) == ec2.TransitGatewayAttachmentStateDeleting || aws.StringValue(transitGatewayVpcAttachment.State) == ec2.TransitGatewayAttachmentStateDeleted { - log.Printf("[WARN] EC2 Transit Gateway VPC Attachment (%s) in deleted state (%s), removing from state", d.Id(), aws.StringValue(transitGatewayVpcAttachment.State)) - d.SetId("") - return nil - } - - transitGatewayID := aws.StringValue(transitGatewayVpcAttachment.TransitGatewayId) - transitGateway, err := ec2DescribeTransitGateway(conn, transitGatewayID) - if err != nil { - return fmt.Errorf("error describing EC2 Transit Gateway (%s): %s", transitGatewayID, err) - } - - if transitGateway.Options == nil { - return fmt.Errorf("error describing EC2 Transit Gateway (%s): missing options", transitGatewayID) - } - - transitGatewayAssociationDefaultRouteTableID := aws.StringValue(transitGateway.Options.AssociationDefaultRouteTableId) - transitGatewayDefaultRouteTableAssociation, err := ec2DescribeTransitGatewayRouteTableAssociation(conn, transitGatewayAssociationDefaultRouteTableID, d.Id()) - if err != nil { - return fmt.Errorf("error determining EC2 Transit Gateway Attachment (%s) association to Route Table (%s): %s", d.Id(), transitGatewayAssociationDefaultRouteTableID, err) - } - - transitGatewayPropagationDefaultRouteTableID := aws.StringValue(transitGateway.Options.PropagationDefaultRouteTableId) - transitGatewayDefaultRouteTablePropagation, err := ec2DescribeTransitGatewayRouteTablePropagation(conn, transitGatewayPropagationDefaultRouteTableID, d.Id()) - if err != nil { - return fmt.Errorf("error determining EC2 Transit Gateway Attachment (%s) propagation to Route Table (%s): %s", d.Id(), transitGatewayPropagationDefaultRouteTableID, err) - } - - if transitGatewayVpcAttachment.Options == nil { - return fmt.Errorf("error reading EC2 Transit Gateway VPC Attachment (%s): missing options", d.Id()) - } - - d.Set("dns_support", transitGatewayVpcAttachment.Options.DnsSupport) - d.Set("ipv6_support", transitGatewayVpcAttachment.Options.Ipv6Support) - - if err := d.Set("subnet_ids", aws.StringValueSlice(transitGatewayVpcAttachment.SubnetIds)); err != nil { - return fmt.Errorf("error setting subnet_ids: %s", err) - } - - if err := d.Set("tags", tagsToMap(transitGatewayVpcAttachment.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - d.Set("transit_gateway_default_route_table_association", (transitGatewayDefaultRouteTableAssociation != nil)) - d.Set("transit_gateway_default_route_table_propagation", (transitGatewayDefaultRouteTablePropagation != nil)) - d.Set("transit_gateway_id", aws.StringValue(transitGatewayVpcAttachment.TransitGatewayId)) - d.Set("vpc_id", aws.StringValue(transitGatewayVpcAttachment.VpcId)) - d.Set("vpc_owner_id", aws.StringValue(transitGatewayVpcAttachment.VpcOwnerId)) - - return nil -} - -func resourceAwsEc2TransitGatewayVpcAttachmentUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - if d.HasChange("dns_support") || d.HasChange("ipv6_support") || d.HasChange("subnet_ids") { - input := &ec2.ModifyTransitGatewayVpcAttachmentInput{ - Options: &ec2.ModifyTransitGatewayVpcAttachmentRequestOptions{ - DnsSupport: aws.String(d.Get("dns_support").(string)), - Ipv6Support: aws.String(d.Get("ipv6_support").(string)), - }, - TransitGatewayAttachmentId: aws.String(d.Id()), - } - - oldRaw, newRaw := d.GetChange("subnet_ids") - oldSet := oldRaw.(*schema.Set) - newSet := newRaw.(*schema.Set) - - if added := newSet.Difference(oldSet); added.Len() > 0 { - input.AddSubnetIds = expandStringSet(added) - } - - if removed := oldSet.Difference(newSet); removed.Len() > 0 { - input.RemoveSubnetIds = expandStringSet(removed) - } - - if _, err := conn.ModifyTransitGatewayVpcAttachment(input); err != nil { - return fmt.Errorf("error modifying EC2 Transit Gateway VPC Attachment (%s): %s", d.Id(), err) - } - - if err := waitForEc2TransitGatewayRouteTableAttachmentUpdate(conn, d.Id()); err != nil { - return fmt.Errorf("error waiting for EC2 Transit Gateway VPC Attachment (%s) update: %s", d.Id(), err) - } - } - - if d.HasChange("transit_gateway_default_route_table_association") || d.HasChange("transit_gateway_default_route_table_propagation") { - transitGatewayID := d.Get("transit_gateway_id").(string) - - transitGateway, err := ec2DescribeTransitGateway(conn, transitGatewayID) - if err != nil { - return fmt.Errorf("error describing EC2 Transit Gateway (%s): %s", transitGatewayID, err) - } - - if transitGateway.Options == nil { - return fmt.Errorf("error describing EC2 Transit Gateway (%s): missing options", transitGatewayID) - } - - if d.HasChange("transit_gateway_default_route_table_association") { - if err := ec2TransitGatewayRouteTableAssociationUpdate(conn, aws.StringValue(transitGateway.Options.AssociationDefaultRouteTableId), d.Id(), d.Get("transit_gateway_default_route_table_association").(bool)); err != nil { - return fmt.Errorf("error updating EC2 Transit Gateway Attachment (%s) Route Table (%s) association: %s", d.Id(), aws.StringValue(transitGateway.Options.AssociationDefaultRouteTableId), err) - } - } - - if d.HasChange("transit_gateway_default_route_table_propagation") { - if err := ec2TransitGatewayRouteTablePropagationUpdate(conn, aws.StringValue(transitGateway.Options.PropagationDefaultRouteTableId), d.Id(), d.Get("transit_gateway_default_route_table_propagation").(bool)); err != nil { - return fmt.Errorf("error updating EC2 Transit Gateway Attachment (%s) Route Table (%s) propagation: %s", d.Id(), aws.StringValue(transitGateway.Options.PropagationDefaultRouteTableId), err) - } - } - } - - if d.HasChange("tags") { - if err := setTags(conn, d); err != nil { - return fmt.Errorf("error updating EC2 Transit Gateway VPC Attachment (%s) tags: %s", d.Id(), err) - } - } - - return nil -} - -func resourceAwsEc2TransitGatewayVpcAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.DeleteTransitGatewayVpcAttachmentInput{ - TransitGatewayAttachmentId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting EC2 Transit Gateway VPC Attachment (%s): %s", d.Id(), input) - _, err := conn.DeleteTransitGatewayVpcAttachment(input) - - if isAWSErr(err, "InvalidTransitGatewayAttachmentID.NotFound", "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting EC2 Transit Gateway VPC Attachment: %s", err) - } - - if err := waitForEc2TransitGatewayRouteTableAttachmentDeletion(conn, d.Id()); err != nil { - return fmt.Errorf("error waiting for EC2 Transit Gateway VPC Attachment (%s) deletion: %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go deleted file mode 100644 index 31b73e648..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go +++ /dev/null @@ -1,104 +0,0 @@ -package aws - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ecr" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEcrLifecyclePolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEcrLifecyclePolicyCreate, - Read: resourceAwsEcrLifecyclePolicyRead, - Delete: resourceAwsEcrLifecyclePolicyDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "repository": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "policy": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentJsonDiffs, - }, - "registry_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsEcrLifecyclePolicyCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecrconn - - input := &ecr.PutLifecyclePolicyInput{ - RepositoryName: aws.String(d.Get("repository").(string)), - LifecyclePolicyText: aws.String(d.Get("policy").(string)), - } - - resp, err := conn.PutLifecyclePolicy(input) - if err != nil { - return err - } - d.SetId(*resp.RepositoryName) - d.Set("registry_id", resp.RegistryId) - return resourceAwsEcrLifecyclePolicyRead(d, meta) -} - -func resourceAwsEcrLifecyclePolicyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecrconn - - input := &ecr.GetLifecyclePolicyInput{ - RepositoryName: aws.String(d.Id()), - } - - resp, err := conn.GetLifecyclePolicy(input) - if err != nil { - if isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { - d.SetId("") - return nil - } - if isAWSErr(err, ecr.ErrCodeLifecyclePolicyNotFoundException, "") { - d.SetId("") - return nil - } - return err - } - - d.Set("repository", resp.RepositoryName) - d.Set("registry_id", resp.RegistryId) - d.Set("policy", resp.LifecyclePolicyText) - - return nil -} - -func resourceAwsEcrLifecyclePolicyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecrconn - - input := &ecr.DeleteLifecyclePolicyInput{ - RepositoryName: aws.String(d.Id()), - } - - _, err := conn.DeleteLifecyclePolicy(input) - if err != nil { - if isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { - return nil - } - if isAWSErr(err, ecr.ErrCodeLifecyclePolicyNotFoundException, "") { - return nil - } - return err - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go deleted file mode 100644 index 40da39502..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go +++ /dev/null @@ -1,172 +0,0 @@ -package aws - -import ( - "log" - "time" - - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ecr" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsEcrRepository() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEcrRepositoryCreate, - Read: resourceAwsEcrRepositoryRead, - Update: resourceAwsEcrRepositoryUpdate, - Delete: resourceAwsEcrRepositoryDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Delete: schema.DefaultTimeout(20 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "tags": tagsSchema(), - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "registry_id": { - Type: schema.TypeString, - Computed: true, - }, - "repository_url": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsEcrRepositoryCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecrconn - - input := ecr.CreateRepositoryInput{ - RepositoryName: aws.String(d.Get("name").(string)), - } - - log.Printf("[DEBUG] Creating ECR repository: %#v", input) - out, err := conn.CreateRepository(&input) - if err != nil { - return fmt.Errorf("error creating ECR repository: %s", err) - } - - repository := *out.Repository - - log.Printf("[DEBUG] ECR repository created: %q", *repository.RepositoryArn) - - d.SetId(aws.StringValue(repository.RepositoryName)) - // ARN required for setting any tags. - d.Set("arn", repository.RepositoryArn) - - if err := setTagsECR(conn, d); err != nil { - return fmt.Errorf("error setting ECR repository tags: %s", err) - } - - return resourceAwsEcrRepositoryRead(d, meta) -} - -func resourceAwsEcrRepositoryRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecrconn - - log.Printf("[DEBUG] Reading ECR repository %s", d.Id()) - var out *ecr.DescribeRepositoriesOutput - input := &ecr.DescribeRepositoriesInput{ - RepositoryNames: aws.StringSlice([]string{d.Id()}), - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - out, err = conn.DescribeRepositories(input) - if d.IsNewResource() && isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { - return resource.RetryableError(err) - } - if err != nil { - return resource.NonRetryableError(err) - } - return nil - }) - - if isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { - log.Printf("[WARN] ECR Repository (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading ECR repository: %s", err) - } - - repository := out.Repositories[0] - - d.Set("arn", repository.RepositoryArn) - d.Set("name", repository.RepositoryName) - d.Set("registry_id", repository.RegistryId) - d.Set("repository_url", repository.RepositoryUri) - - if err := getTagsECR(conn, d); err != nil { - return fmt.Errorf("error getting ECR repository tags: %s", err) - } - - return nil -} - -func resourceAwsEcrRepositoryUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecrconn - - if err := setTagsECR(conn, d); err != nil { - return fmt.Errorf("error setting ECR repository tags: %s", err) - } - - return resourceAwsEcrRepositoryRead(d, meta) -} - -func resourceAwsEcrRepositoryDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecrconn - - _, err := conn.DeleteRepository(&ecr.DeleteRepositoryInput{ - RepositoryName: aws.String(d.Id()), - RegistryId: aws.String(d.Get("registry_id").(string)), - Force: aws.Bool(true), - }) - if err != nil { - if isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { - return nil - } - return fmt.Errorf("error deleting ECR repository: %s", err) - } - - log.Printf("[DEBUG] Waiting for ECR Repository %q to be deleted", d.Id()) - err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { - _, err := conn.DescribeRepositories(&ecr.DescribeRepositoriesInput{ - RepositoryNames: aws.StringSlice([]string{d.Id()}), - }) - if err != nil { - if isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { - return nil - } - return resource.NonRetryableError(err) - } - - return resource.RetryableError( - fmt.Errorf("%q: Timeout while waiting for the ECR Repository to be deleted", d.Id())) - }) - if err != nil { - return fmt.Errorf("error deleting ECR repository: %s", err) - } - - log.Printf("[DEBUG] repository %q deleted.", d.Get("name").(string)) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository_policy.go deleted file mode 100644 index e2824ea2b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository_policy.go +++ /dev/null @@ -1,167 +0,0 @@ -package aws - -import ( - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ecr" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsEcrRepositoryPolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEcrRepositoryPolicyCreate, - Read: resourceAwsEcrRepositoryPolicyRead, - Update: resourceAwsEcrRepositoryPolicyUpdate, - Delete: resourceAwsEcrRepositoryPolicyDelete, - - Schema: map[string]*schema.Schema{ - "repository": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "policy": { - Type: schema.TypeString, - Required: true, - }, - "registry_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsEcrRepositoryPolicyCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecrconn - - input := ecr.SetRepositoryPolicyInput{ - RepositoryName: aws.String(d.Get("repository").(string)), - PolicyText: aws.String(d.Get("policy").(string)), - } - - log.Printf("[DEBUG] Creating ECR resository policy: %s", input) - - // Retry due to IAM eventual consistency - var out *ecr.SetRepositoryPolicyOutput - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var err error - out, err = conn.SetRepositoryPolicy(&input) - - if isAWSErr(err, "InvalidParameterException", "Invalid repository policy provided") { - return resource.RetryableError(err) - - } - return resource.NonRetryableError(err) - }) - if err != nil { - return err - } - - repositoryPolicy := *out - - log.Printf("[DEBUG] ECR repository policy created: %s", *repositoryPolicy.RepositoryName) - - d.SetId(*repositoryPolicy.RepositoryName) - d.Set("registry_id", repositoryPolicy.RegistryId) - - return resourceAwsEcrRepositoryPolicyRead(d, meta) -} - -func resourceAwsEcrRepositoryPolicyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecrconn - - log.Printf("[DEBUG] Reading repository policy %s", d.Id()) - out, err := conn.GetRepositoryPolicy(&ecr.GetRepositoryPolicyInput{ - RegistryId: aws.String(d.Get("registry_id").(string)), - RepositoryName: aws.String(d.Id()), - }) - if err != nil { - if ecrerr, ok := err.(awserr.Error); ok { - switch ecrerr.Code() { - case "RepositoryNotFoundException", "RepositoryPolicyNotFoundException": - d.SetId("") - return nil - default: - return err - } - } - return err - } - - log.Printf("[DEBUG] Received repository policy %s", out) - - repositoryPolicy := out - - d.SetId(*repositoryPolicy.RepositoryName) - d.Set("registry_id", repositoryPolicy.RegistryId) - - return nil -} - -func resourceAwsEcrRepositoryPolicyUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecrconn - - if !d.HasChange("policy") { - return nil - } - - input := ecr.SetRepositoryPolicyInput{ - RepositoryName: aws.String(d.Get("repository").(string)), - RegistryId: aws.String(d.Get("registry_id").(string)), - PolicyText: aws.String(d.Get("policy").(string)), - } - - log.Printf("[DEBUG] Updating ECR resository policy: %s", input) - - // Retry due to IAM eventual consistency - var out *ecr.SetRepositoryPolicyOutput - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var err error - out, err = conn.SetRepositoryPolicy(&input) - - if isAWSErr(err, "InvalidParameterException", "Invalid repository policy provided") { - return resource.RetryableError(err) - - } - return resource.NonRetryableError(err) - }) - if err != nil { - return err - } - - repositoryPolicy := *out - - d.SetId(*repositoryPolicy.RepositoryName) - d.Set("registry_id", repositoryPolicy.RegistryId) - - return nil -} - -func resourceAwsEcrRepositoryPolicyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecrconn - - _, err := conn.DeleteRepositoryPolicy(&ecr.DeleteRepositoryPolicyInput{ - RepositoryName: aws.String(d.Id()), - RegistryId: aws.String(d.Get("registry_id").(string)), - }) - if err != nil { - if ecrerr, ok := err.(awserr.Error); ok { - switch ecrerr.Code() { - case "RepositoryNotFoundException", "RepositoryPolicyNotFoundException": - return nil - default: - return err - } - } - return err - } - - log.Printf("[DEBUG] repository policy %s deleted.", d.Id()) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_cluster.go deleted file mode 100644 index 032318ed2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_cluster.go +++ /dev/null @@ -1,250 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ecs" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsEcsCluster() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEcsClusterCreate, - Read: resourceAwsEcsClusterRead, - Update: resourceAwsEcsClusterUpdate, - Delete: resourceAwsEcsClusterDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsEcsClusterImport, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "tags": tagsSchema(), - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsEcsClusterImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("name", d.Id()) - d.SetId(arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Service: "ecs", - Resource: fmt.Sprintf("cluster/%s", d.Id()), - }.String()) - return []*schema.ResourceData{d}, nil -} - -func resourceAwsEcsClusterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - clusterName := d.Get("name").(string) - log.Printf("[DEBUG] Creating ECS cluster %s", clusterName) - - out, err := conn.CreateCluster(&ecs.CreateClusterInput{ - ClusterName: aws.String(clusterName), - Tags: tagsFromMapECS(d.Get("tags").(map[string]interface{})), - }) - if err != nil { - return err - } - log.Printf("[DEBUG] ECS cluster %s created", *out.Cluster.ClusterArn) - - d.SetId(*out.Cluster.ClusterArn) - - return resourceAwsEcsClusterRead(d, meta) -} - -func resourceAwsEcsClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - input := &ecs.DescribeClustersInput{ - Clusters: []*string{aws.String(d.Id())}, - Include: []*string{aws.String(ecs.ClusterFieldTags)}, - } - - log.Printf("[DEBUG] Reading ECS Cluster: %s", input) - var out *ecs.DescribeClustersOutput - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var err error - out, err = conn.DescribeClusters(input) - - if err != nil { - return resource.NonRetryableError(err) - } - - if out == nil || len(out.Failures) > 0 { - if d.IsNewResource() { - return resource.RetryableError(&resource.NotFoundError{}) - } - return resource.NonRetryableError(&resource.NotFoundError{}) - } - - return nil - }) - - if isResourceNotFoundError(err) { - log.Printf("[WARN] ECS Cluster (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading ECS Cluster (%s): %s", d.Id(), err) - } - - var cluster *ecs.Cluster - for _, c := range out.Clusters { - if aws.StringValue(c.ClusterArn) == d.Id() { - cluster = c - break - } - } - - if cluster == nil { - log.Printf("[WARN] ECS Cluster (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - // Status==INACTIVE means deleted cluster - if aws.StringValue(cluster.Status) == "INACTIVE" { - log.Printf("[WARN] ECS Cluster (%s) deleted, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("arn", cluster.ClusterArn) - d.Set("name", cluster.ClusterName) - - if err := d.Set("tags", tagsToMapECS(cluster.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func resourceAwsEcsClusterUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - if d.HasChange("tags") { - oldTagsRaw, newTagsRaw := d.GetChange("tags") - oldTagsMap := oldTagsRaw.(map[string]interface{}) - newTagsMap := newTagsRaw.(map[string]interface{}) - createTags, removeTags := diffTagsECS(tagsFromMapECS(oldTagsMap), tagsFromMapECS(newTagsMap)) - - if len(removeTags) > 0 { - removeTagKeys := make([]*string, len(removeTags)) - for i, removeTag := range removeTags { - removeTagKeys[i] = removeTag.Key - } - - input := &ecs.UntagResourceInput{ - ResourceArn: aws.String(d.Id()), - TagKeys: removeTagKeys, - } - - log.Printf("[DEBUG] Untagging ECS Cluster: %s", input) - if _, err := conn.UntagResource(input); err != nil { - return fmt.Errorf("error untagging ECS Cluster (%s): %s", d.Id(), err) - } - } - - if len(createTags) > 0 { - input := &ecs.TagResourceInput{ - ResourceArn: aws.String(d.Id()), - Tags: createTags, - } - - log.Printf("[DEBUG] Tagging ECS Cluster: %s", input) - if _, err := conn.TagResource(input); err != nil { - return fmt.Errorf("error tagging ECS Cluster (%s): %s", d.Id(), err) - } - } - } - - return nil -} - -func resourceAwsEcsClusterDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - log.Printf("[DEBUG] Deleting ECS cluster %s", d.Id()) - - err := resource.Retry(10*time.Minute, func() *resource.RetryError { - out, err := conn.DeleteCluster(&ecs.DeleteClusterInput{ - Cluster: aws.String(d.Id()), - }) - - if err == nil { - log.Printf("[DEBUG] ECS cluster %s deleted: %s", d.Id(), out) - return nil - } - - awsErr, ok := err.(awserr.Error) - if !ok { - return resource.NonRetryableError(err) - } - - if awsErr.Code() == "ClusterContainsContainerInstancesException" { - log.Printf("[TRACE] Retrying ECS cluster %q deletion after %q", d.Id(), awsErr.Code()) - return resource.RetryableError(err) - } - - if awsErr.Code() == "ClusterContainsServicesException" { - log.Printf("[TRACE] Retrying ECS cluster %q deletion after %q", d.Id(), awsErr.Code()) - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - }) - if err != nil { - return err - } - - clusterName := d.Get("name").(string) - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Checking if ECS Cluster %q is INACTIVE", d.Id()) - out, err := conn.DescribeClusters(&ecs.DescribeClustersInput{ - Clusters: []*string{aws.String(clusterName)}, - }) - - for _, c := range out.Clusters { - if *c.ClusterName == clusterName { - if *c.Status == "INACTIVE" { - return nil - } - - return resource.RetryableError( - fmt.Errorf("ECS Cluster %q is still %q", clusterName, *c.Status)) - } - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - if err != nil { - return err - } - - log.Printf("[DEBUG] ECS cluster %q deleted", d.Id()) - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go deleted file mode 100644 index a22818818..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go +++ /dev/null @@ -1,1089 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/ecs" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEcsService() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEcsServiceCreate, - Read: resourceAwsEcsServiceRead, - Update: resourceAwsEcsServiceUpdate, - Delete: resourceAwsEcsServiceDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsEcsServiceImport, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "cluster": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "task_definition": { - Type: schema.TypeString, - Required: true, - }, - - "desired_count": { - Type: schema.TypeInt, - Optional: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - return d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon - }, - }, - - "enable_ecs_managed_tags": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "health_check_grace_period_seconds": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(0, 7200), - }, - - "launch_type": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - Default: "EC2", - }, - - "platform_version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "scheduling_strategy": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: ecs.SchedulingStrategyReplica, - ValidateFunc: validation.StringInSlice([]string{ - ecs.SchedulingStrategyDaemon, - ecs.SchedulingStrategyReplica, - }, false), - }, - - "iam_role": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - Computed: true, - }, - - "deployment_controller": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - // Ignore missing configuration block - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - Default: ecs.DeploymentControllerTypeEcs, - ValidateFunc: validation.StringInSlice([]string{ - ecs.DeploymentControllerTypeCodeDeploy, - ecs.DeploymentControllerTypeEcs, - }, false), - }, - }, - }, - }, - - "deployment_maximum_percent": { - Type: schema.TypeInt, - Optional: true, - Default: 200, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon && new == "200" { - return true - } - return false - }, - }, - - "deployment_minimum_healthy_percent": { - Type: schema.TypeInt, - Optional: true, - Default: 100, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon && new == "100" { - return true - } - return false - }, - }, - - "load_balancer": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "elb_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "target_group_arn": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "container_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "container_port": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - }, - }, - Set: resourceAwsEcsLoadBalancerHash, - }, - "network_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "security_groups": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "subnets": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "assign_public_ip": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - }, - "placement_strategy": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - MaxItems: 5, - ConflictsWith: []string{"ordered_placement_strategy"}, - Deprecated: "Use `ordered_placement_strategy` instead", - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "field": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - return strings.EqualFold(old, new) - }, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["type"].(string))) - if m["field"] != nil { - field := m["field"].(string) - if field == "host" { - buf.WriteString("instanceId-") - } else { - buf.WriteString(fmt.Sprintf("%s-", field)) - } - } - return hashcode.String(buf.String()) - }, - }, - "ordered_placement_strategy": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 5, - ConflictsWith: []string{"placement_strategy"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "field": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - StateFunc: func(v interface{}) string { - value := v.(string) - if value == "host" { - return "instanceId" - } - return value - }, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - return strings.EqualFold(old, new) - }, - }, - }, - }, - }, - "placement_constraints": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - MaxItems: 10, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "expression": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - }, - }, - }, - }, - - "propagate_tags": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "NONE" && new == "" { - return true - } - return false - }, - ValidateFunc: validation.StringInSlice([]string{ - ecs.PropagateTagsService, - ecs.PropagateTagsTaskDefinition, - "", - }, false), - }, - - "service_registries": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "container_name": { - Type: schema.TypeString, - Optional: true, - }, - "container_port": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(0, 65536), - }, - "port": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(0, 65536), - }, - "registry_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsEcsServiceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - if len(strings.Split(d.Id(), "/")) != 2 { - return []*schema.ResourceData{}, fmt.Errorf("Wrong format of resource: %s. Please follow 'cluster-name/service-name'", d.Id()) - } - cluster := strings.Split(d.Id(), "/")[0] - name := strings.Split(d.Id(), "/")[1] - log.Printf("[DEBUG] Importing ECS service %s from cluster %s", name, cluster) - - d.SetId(name) - clusterArn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "ecs", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("cluster/%s", cluster), - }.String() - d.Set("cluster", clusterArn) - return []*schema.ResourceData{d}, nil -} - -func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - deploymentMinimumHealthyPercent := d.Get("deployment_minimum_healthy_percent").(int) - schedulingStrategy := d.Get("scheduling_strategy").(string) - - input := ecs.CreateServiceInput{ - ClientToken: aws.String(resource.UniqueId()), - DeploymentController: expandEcsDeploymentController(d.Get("deployment_controller").([]interface{})), - SchedulingStrategy: aws.String(schedulingStrategy), - ServiceName: aws.String(d.Get("name").(string)), - Tags: tagsFromMapECS(d.Get("tags").(map[string]interface{})), - TaskDefinition: aws.String(d.Get("task_definition").(string)), - EnableECSManagedTags: aws.Bool(d.Get("enable_ecs_managed_tags").(bool)), - } - - if schedulingStrategy == ecs.SchedulingStrategyDaemon && deploymentMinimumHealthyPercent != 100 { - input.DeploymentConfiguration = &ecs.DeploymentConfiguration{ - MinimumHealthyPercent: aws.Int64(int64(deploymentMinimumHealthyPercent)), - } - } else if schedulingStrategy == ecs.SchedulingStrategyReplica { - input.DeploymentConfiguration = &ecs.DeploymentConfiguration{ - MaximumPercent: aws.Int64(int64(d.Get("deployment_maximum_percent").(int))), - MinimumHealthyPercent: aws.Int64(int64(deploymentMinimumHealthyPercent)), - } - input.DesiredCount = aws.Int64(int64(d.Get("desired_count").(int))) - } - - if v, ok := d.GetOk("cluster"); ok { - input.Cluster = aws.String(v.(string)) - } - - if v, ok := d.GetOk("health_check_grace_period_seconds"); ok { - input.HealthCheckGracePeriodSeconds = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("launch_type"); ok { - input.LaunchType = aws.String(v.(string)) - } - - if v, ok := d.GetOk("propagate_tags"); ok { - input.PropagateTags = aws.String(v.(string)) - } - - if v, ok := d.GetOk("platform_version"); ok { - input.PlatformVersion = aws.String(v.(string)) - } - - loadBalancers := expandEcsLoadBalancers(d.Get("load_balancer").(*schema.Set).List()) - if len(loadBalancers) > 0 { - log.Printf("[DEBUG] Adding ECS load balancers: %s", loadBalancers) - input.LoadBalancers = loadBalancers - } - if v, ok := d.GetOk("iam_role"); ok { - input.Role = aws.String(v.(string)) - } - - input.NetworkConfiguration = expandEcsNetworkConfiguration(d.Get("network_configuration").([]interface{})) - - if v, ok := d.GetOk("ordered_placement_strategy"); ok { - ps, err := expandPlacementStrategy(v.([]interface{})) - if err != nil { - return err - } - input.PlacementStrategy = ps - } else { - ps, err := expandPlacementStrategyDeprecated(d.Get("placement_strategy").(*schema.Set)) - if err != nil { - return err - } - input.PlacementStrategy = ps - } - - constraints := d.Get("placement_constraints").(*schema.Set).List() - if len(constraints) > 0 { - var pc []*ecs.PlacementConstraint - for _, raw := range constraints { - p := raw.(map[string]interface{}) - t := p["type"].(string) - e := p["expression"].(string) - if err := validateAwsEcsPlacementConstraint(t, e); err != nil { - return err - } - constraint := &ecs.PlacementConstraint{ - Type: aws.String(t), - } - if e != "" { - constraint.Expression = aws.String(e) - } - - pc = append(pc, constraint) - } - input.PlacementConstraints = pc - } - - serviceRegistries := d.Get("service_registries").(*schema.Set).List() - if len(serviceRegistries) > 0 { - srs := make([]*ecs.ServiceRegistry, 0, len(serviceRegistries)) - for _, v := range serviceRegistries { - raw := v.(map[string]interface{}) - sr := &ecs.ServiceRegistry{ - RegistryArn: aws.String(raw["registry_arn"].(string)), - } - if port, ok := raw["port"].(int); ok && port != 0 { - sr.Port = aws.Int64(int64(port)) - } - if raw, ok := raw["container_port"].(int); ok && raw != 0 { - sr.ContainerPort = aws.Int64(int64(raw)) - } - if raw, ok := raw["container_name"].(string); ok && raw != "" { - sr.ContainerName = aws.String(raw) - } - - srs = append(srs, sr) - } - input.ServiceRegistries = srs - } - - log.Printf("[DEBUG] Creating ECS service: %s", input) - - // Retry due to AWS IAM & ECS eventual consistency - var out *ecs.CreateServiceOutput - var err error - err = resource.Retry(2*time.Minute, func() *resource.RetryError { - out, err = conn.CreateService(&input) - - if err != nil { - if isAWSErr(err, ecs.ErrCodeClusterNotFoundException, "") { - return resource.RetryableError(err) - } - if isAWSErr(err, ecs.ErrCodeInvalidParameterException, "Please verify that the ECS service role being passed has the proper permissions.") { - return resource.RetryableError(err) - } - if isAWSErr(err, ecs.ErrCodeInvalidParameterException, "does not have an associated load balancer") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - - return nil - }) - if err != nil { - return fmt.Errorf("%s %q", err, d.Get("name").(string)) - } - - service := *out.Service - - log.Printf("[DEBUG] ECS service created: %s", *service.ServiceArn) - d.SetId(*service.ServiceArn) - - return resourceAwsEcsServiceRead(d, meta) -} - -func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - log.Printf("[DEBUG] Reading ECS service %s", d.Id()) - input := ecs.DescribeServicesInput{ - Cluster: aws.String(d.Get("cluster").(string)), - Include: []*string{aws.String(ecs.ServiceFieldTags)}, - Services: []*string{aws.String(d.Id())}, - } - - var out *ecs.DescribeServicesOutput - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var err error - out, err = conn.DescribeServices(&input) - if err != nil { - if d.IsNewResource() && isAWSErr(err, ecs.ErrCodeServiceNotFoundException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - - if len(out.Services) < 1 { - if d.IsNewResource() { - return resource.RetryableError(fmt.Errorf("ECS service not created yet: %q", d.Id())) - } - log.Printf("[WARN] ECS Service %s not found, removing from state.", d.Id()) - d.SetId("") - return nil - } - - service := out.Services[0] - if d.IsNewResource() && *service.Status == "INACTIVE" { - return resource.RetryableError(fmt.Errorf("ECS service currently INACTIVE: %q", d.Id())) - } - - return nil - }) - if err != nil { - return err - } - - if len(out.Services) < 1 { - log.Printf("[WARN] Removing ECS service %s (%s) because it's gone", d.Get("name").(string), d.Id()) - d.SetId("") - return nil - } - - service := out.Services[0] - - // Status==INACTIVE means deleted service - if *service.Status == "INACTIVE" { - log.Printf("[WARN] Removing ECS service %q because it's INACTIVE", *service.ServiceArn) - d.SetId("") - return nil - } - - log.Printf("[DEBUG] Received ECS service %s", service) - - d.SetId(*service.ServiceArn) - d.Set("name", service.ServiceName) - - // Save task definition in the same format - if strings.HasPrefix(d.Get("task_definition").(string), "arn:"+meta.(*AWSClient).partition+":ecs:") { - d.Set("task_definition", service.TaskDefinition) - } else { - taskDefinition := buildFamilyAndRevisionFromARN(*service.TaskDefinition) - d.Set("task_definition", taskDefinition) - } - - d.Set("scheduling_strategy", service.SchedulingStrategy) - d.Set("desired_count", service.DesiredCount) - d.Set("health_check_grace_period_seconds", service.HealthCheckGracePeriodSeconds) - d.Set("launch_type", service.LaunchType) - d.Set("enable_ecs_managed_tags", service.EnableECSManagedTags) - d.Set("propagate_tags", service.PropagateTags) - d.Set("platform_version", service.PlatformVersion) - - // Save cluster in the same format - if strings.HasPrefix(d.Get("cluster").(string), "arn:"+meta.(*AWSClient).partition+":ecs:") { - d.Set("cluster", service.ClusterArn) - } else { - clusterARN := getNameFromARN(*service.ClusterArn) - d.Set("cluster", clusterARN) - } - - // Save IAM role in the same format - if service.RoleArn != nil { - if strings.HasPrefix(d.Get("iam_role").(string), "arn:"+meta.(*AWSClient).partition+":iam:") { - d.Set("iam_role", service.RoleArn) - } else { - roleARN := getNameFromARN(*service.RoleArn) - d.Set("iam_role", roleARN) - } - } - - if service.DeploymentConfiguration != nil { - d.Set("deployment_maximum_percent", service.DeploymentConfiguration.MaximumPercent) - d.Set("deployment_minimum_healthy_percent", service.DeploymentConfiguration.MinimumHealthyPercent) - } - - if err := d.Set("deployment_controller", flattenEcsDeploymentController(service.DeploymentController)); err != nil { - return fmt.Errorf("Error setting deployment_controller for (%s): %s", d.Id(), err) - } - - if service.LoadBalancers != nil { - d.Set("load_balancer", flattenEcsLoadBalancers(service.LoadBalancers)) - } - - if _, ok := d.GetOk("placement_strategy"); ok { - if err := d.Set("placement_strategy", flattenPlacementStrategyDeprecated(service.PlacementStrategy)); err != nil { - return fmt.Errorf("error setting placement_strategy: %s", err) - } - } else { - if err := d.Set("ordered_placement_strategy", flattenPlacementStrategy(service.PlacementStrategy)); err != nil { - return fmt.Errorf("error setting ordered_placement_strategy: %s", err) - } - } - if err := d.Set("placement_constraints", flattenServicePlacementConstraints(service.PlacementConstraints)); err != nil { - log.Printf("[ERR] Error setting placement_constraints for (%s): %s", d.Id(), err) - } - - if err := d.Set("network_configuration", flattenEcsNetworkConfiguration(service.NetworkConfiguration)); err != nil { - return fmt.Errorf("Error setting network_configuration for (%s): %s", d.Id(), err) - } - - if err := d.Set("service_registries", flattenServiceRegistries(service.ServiceRegistries)); err != nil { - return fmt.Errorf("Error setting service_registries for (%s): %s", d.Id(), err) - } - - if err := d.Set("tags", tagsToMapECS(service.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func expandEcsDeploymentController(l []interface{}) *ecs.DeploymentController { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - deploymentController := &ecs.DeploymentController{ - Type: aws.String(m["type"].(string)), - } - - return deploymentController -} - -func flattenEcsDeploymentController(deploymentController *ecs.DeploymentController) []interface{} { - m := map[string]interface{}{ - "type": ecs.DeploymentControllerTypeEcs, - } - - if deploymentController == nil { - return []interface{}{m} - } - - m["type"] = aws.StringValue(deploymentController.Type) - - return []interface{}{m} -} - -func flattenEcsNetworkConfiguration(nc *ecs.NetworkConfiguration) []interface{} { - if nc == nil { - return nil - } - - result := make(map[string]interface{}) - result["security_groups"] = schema.NewSet(schema.HashString, flattenStringList(nc.AwsvpcConfiguration.SecurityGroups)) - result["subnets"] = schema.NewSet(schema.HashString, flattenStringList(nc.AwsvpcConfiguration.Subnets)) - - if nc.AwsvpcConfiguration.AssignPublicIp != nil { - result["assign_public_ip"] = *nc.AwsvpcConfiguration.AssignPublicIp == ecs.AssignPublicIpEnabled - } - - return []interface{}{result} -} - -func expandEcsNetworkConfiguration(nc []interface{}) *ecs.NetworkConfiguration { - if len(nc) == 0 { - return nil - } - awsVpcConfig := &ecs.AwsVpcConfiguration{} - raw := nc[0].(map[string]interface{}) - if val, ok := raw["security_groups"]; ok { - awsVpcConfig.SecurityGroups = expandStringSet(val.(*schema.Set)) - } - awsVpcConfig.Subnets = expandStringSet(raw["subnets"].(*schema.Set)) - if val, ok := raw["assign_public_ip"].(bool); ok { - awsVpcConfig.AssignPublicIp = aws.String(ecs.AssignPublicIpDisabled) - if val { - awsVpcConfig.AssignPublicIp = aws.String(ecs.AssignPublicIpEnabled) - } - } - - return &ecs.NetworkConfiguration{AwsvpcConfiguration: awsVpcConfig} -} - -func flattenServicePlacementConstraints(pcs []*ecs.PlacementConstraint) []map[string]interface{} { - if len(pcs) == 0 { - return nil - } - results := make([]map[string]interface{}, 0) - for _, pc := range pcs { - c := make(map[string]interface{}) - c["type"] = *pc.Type - if pc.Expression != nil { - c["expression"] = *pc.Expression - } - - results = append(results, c) - } - return results -} - -func flattenPlacementStrategyDeprecated(pss []*ecs.PlacementStrategy) []map[string]interface{} { - if len(pss) == 0 { - return nil - } - results := make([]map[string]interface{}, 0) - for _, ps := range pss { - c := make(map[string]interface{}) - c["type"] = *ps.Type - - if ps.Field != nil { - c["field"] = *ps.Field - - // for some fields the API requires lowercase for creation but will return uppercase on query - if *ps.Field == "MEMORY" || *ps.Field == "CPU" { - c["field"] = strings.ToLower(*ps.Field) - } - } - - results = append(results, c) - } - return results -} - -func expandPlacementStrategy(s []interface{}) ([]*ecs.PlacementStrategy, error) { - if len(s) == 0 { - return nil, nil - } - pss := make([]*ecs.PlacementStrategy, 0) - for _, raw := range s { - p := raw.(map[string]interface{}) - t := p["type"].(string) - f := p["field"].(string) - if err := validateAwsEcsPlacementStrategy(t, f); err != nil { - return nil, err - } - ps := &ecs.PlacementStrategy{ - Type: aws.String(t), - } - if f != "" { - // Field must be omitted (i.e. not empty string) for random strategy - ps.Field = aws.String(f) - } - pss = append(pss, ps) - } - return pss, nil -} - -func expandPlacementStrategyDeprecated(s *schema.Set) ([]*ecs.PlacementStrategy, error) { - if len(s.List()) == 0 { - return nil, nil - } - pss := make([]*ecs.PlacementStrategy, 0) - for _, raw := range s.List() { - p := raw.(map[string]interface{}) - t := p["type"].(string) - f := p["field"].(string) - if err := validateAwsEcsPlacementStrategy(t, f); err != nil { - return nil, err - } - ps := &ecs.PlacementStrategy{ - Type: aws.String(t), - } - if f != "" { - // Field must be omitted (i.e. not empty string) for random strategy - ps.Field = aws.String(f) - } - pss = append(pss, ps) - } - return pss, nil -} - -func flattenPlacementStrategy(pss []*ecs.PlacementStrategy) []interface{} { - if len(pss) == 0 { - return nil - } - results := make([]interface{}, 0, len(pss)) - for _, ps := range pss { - c := make(map[string]interface{}) - c["type"] = *ps.Type - - if ps.Field != nil { - c["field"] = *ps.Field - - // for some fields the API requires lowercase for creation but will return uppercase on query - if *ps.Field == "MEMORY" || *ps.Field == "CPU" { - c["field"] = strings.ToLower(*ps.Field) - } - } - - results = append(results, c) - } - return results -} - -func flattenServiceRegistries(srs []*ecs.ServiceRegistry) []map[string]interface{} { - if len(srs) == 0 { - return nil - } - results := make([]map[string]interface{}, 0) - for _, sr := range srs { - c := map[string]interface{}{ - "registry_arn": aws.StringValue(sr.RegistryArn), - } - if sr.Port != nil { - c["port"] = int(aws.Int64Value(sr.Port)) - } - if sr.ContainerPort != nil { - c["container_port"] = int(aws.Int64Value(sr.ContainerPort)) - } - if sr.ContainerName != nil { - c["container_name"] = aws.StringValue(sr.ContainerName) - } - results = append(results, c) - } - return results -} - -func resourceAwsEcsServiceUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - updateService := false - - input := ecs.UpdateServiceInput{ - Service: aws.String(d.Id()), - Cluster: aws.String(d.Get("cluster").(string)), - } - - schedulingStrategy := d.Get("scheduling_strategy").(string) - - if schedulingStrategy == ecs.SchedulingStrategyDaemon { - if d.HasChange("deployment_minimum_healthy_percent") { - updateService = true - input.DeploymentConfiguration = &ecs.DeploymentConfiguration{ - MinimumHealthyPercent: aws.Int64(int64(d.Get("deployment_minimum_healthy_percent").(int))), - } - } - } else if schedulingStrategy == ecs.SchedulingStrategyReplica { - if d.HasChange("desired_count") { - updateService = true - input.DesiredCount = aws.Int64(int64(d.Get("desired_count").(int))) - } - - if d.HasChange("deployment_maximum_percent") || d.HasChange("deployment_minimum_healthy_percent") { - updateService = true - input.DeploymentConfiguration = &ecs.DeploymentConfiguration{ - MaximumPercent: aws.Int64(int64(d.Get("deployment_maximum_percent").(int))), - MinimumHealthyPercent: aws.Int64(int64(d.Get("deployment_minimum_healthy_percent").(int))), - } - } - } - - if d.HasChange("platform_version") { - updateService = true - input.PlatformVersion = aws.String(d.Get("platform_version").(string)) - } - - if d.HasChange("health_check_grace_period_seconds") { - updateService = true - input.HealthCheckGracePeriodSeconds = aws.Int64(int64(d.Get("health_check_grace_period_seconds").(int))) - } - - if d.HasChange("task_definition") { - updateService = true - input.TaskDefinition = aws.String(d.Get("task_definition").(string)) - } - - if d.HasChange("network_configuration") { - updateService = true - input.NetworkConfiguration = expandEcsNetworkConfiguration(d.Get("network_configuration").([]interface{})) - } - - if updateService { - log.Printf("[DEBUG] Updating ECS Service (%s): %s", d.Id(), input) - // Retry due to IAM eventual consistency - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - out, err := conn.UpdateService(&input) - if err != nil { - if isAWSErr(err, ecs.ErrCodeInvalidParameterException, "Please verify that the ECS service role being passed has the proper permissions.") { - return resource.RetryableError(err) - } - if isAWSErr(err, ecs.ErrCodeInvalidParameterException, "does not have an associated load balancer") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - - log.Printf("[DEBUG] Updated ECS service %s", out.Service) - return nil - }) - if err != nil { - return fmt.Errorf("error updating ECS Service (%s): %s", d.Id(), err) - } - } - - if d.HasChange("tags") { - oldTagsRaw, newTagsRaw := d.GetChange("tags") - oldTagsMap := oldTagsRaw.(map[string]interface{}) - newTagsMap := newTagsRaw.(map[string]interface{}) - createTags, removeTags := diffTagsECS(tagsFromMapECS(oldTagsMap), tagsFromMapECS(newTagsMap)) - - if len(removeTags) > 0 { - removeTagKeys := make([]*string, len(removeTags)) - for i, removeTag := range removeTags { - removeTagKeys[i] = removeTag.Key - } - - input := &ecs.UntagResourceInput{ - ResourceArn: aws.String(d.Id()), - TagKeys: removeTagKeys, - } - - log.Printf("[DEBUG] Untagging ECS Cluster: %s", input) - if _, err := conn.UntagResource(input); err != nil { - return fmt.Errorf("error untagging ECS Cluster (%s): %s", d.Id(), err) - } - } - - if len(createTags) > 0 { - input := &ecs.TagResourceInput{ - ResourceArn: aws.String(d.Id()), - Tags: createTags, - } - - log.Printf("[DEBUG] Tagging ECS Cluster: %s", input) - if _, err := conn.TagResource(input); err != nil { - return fmt.Errorf("error tagging ECS Cluster (%s): %s", d.Id(), err) - } - } - } - - return resourceAwsEcsServiceRead(d, meta) -} - -func resourceAwsEcsServiceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - // Check if it's not already gone - resp, err := conn.DescribeServices(&ecs.DescribeServicesInput{ - Services: []*string{aws.String(d.Id())}, - Cluster: aws.String(d.Get("cluster").(string)), - }) - if err != nil { - if isAWSErr(err, ecs.ErrCodeServiceNotFoundException, "") { - log.Printf("[DEBUG] Removing ECS Service from state, %q is already gone", d.Id()) - return nil - } - return err - } - - if len(resp.Services) == 0 { - log.Printf("[DEBUG] Removing ECS Service from state, %q is already gone", d.Id()) - return nil - } - - log.Printf("[DEBUG] ECS service %s is currently %s", d.Id(), *resp.Services[0].Status) - - if *resp.Services[0].Status == "INACTIVE" { - return nil - } - - // Drain the ECS service - if *resp.Services[0].Status != "DRAINING" && aws.StringValue(resp.Services[0].SchedulingStrategy) != ecs.SchedulingStrategyDaemon { - log.Printf("[DEBUG] Draining ECS service %s", d.Id()) - _, err = conn.UpdateService(&ecs.UpdateServiceInput{ - Service: aws.String(d.Id()), - Cluster: aws.String(d.Get("cluster").(string)), - DesiredCount: aws.Int64(int64(0)), - }) - if err != nil { - return err - } - } - - input := ecs.DeleteServiceInput{ - Service: aws.String(d.Id()), - Cluster: aws.String(d.Get("cluster").(string)), - } - // Wait until the ECS service is drained - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Trying to delete ECS service %s", input) - _, err := conn.DeleteService(&input) - if err != nil { - if isAWSErr(err, ecs.ErrCodeInvalidParameterException, "The service cannot be stopped while deployments are active.") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return err - } - - // Wait until it's deleted - wait := resource.StateChangeConf{ - Pending: []string{"ACTIVE", "DRAINING"}, - Target: []string{"INACTIVE"}, - Timeout: 10 * time.Minute, - MinTimeout: 1 * time.Second, - Refresh: func() (interface{}, string, error) { - log.Printf("[DEBUG] Checking if ECS service %s is INACTIVE", d.Id()) - resp, err := conn.DescribeServices(&ecs.DescribeServicesInput{ - Services: []*string{aws.String(d.Id())}, - Cluster: aws.String(d.Get("cluster").(string)), - }) - if err != nil { - return resp, "FAILED", err - } - - log.Printf("[DEBUG] ECS service (%s) is currently %q", d.Id(), *resp.Services[0].Status) - return resp, *resp.Services[0].Status, nil - }, - } - - _, err = wait.WaitForState() - if err != nil { - return err - } - - log.Printf("[DEBUG] ECS service %s deleted.", d.Id()) - return nil -} - -func resourceAwsEcsLoadBalancerHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - buf.WriteString(fmt.Sprintf("%s-", m["elb_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["container_name"].(string))) - buf.WriteString(fmt.Sprintf("%d-", m["container_port"].(int))) - - if s := m["target_group_arn"].(string); s != "" { - buf.WriteString(fmt.Sprintf("%s-", s)) - } - - return hashcode.String(buf.String()) -} - -func buildFamilyAndRevisionFromARN(arn string) string { - return strings.Split(arn, "/")[1] -} - -// Expects the following ARNs: -// arn:aws:iam::0123456789:role/EcsService -// arn:aws:ecs:us-west-2:0123456789:cluster/radek-cluster -func getNameFromARN(arn string) string { - return strings.Split(arn, "/")[1] -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go deleted file mode 100644 index d07f6dafe..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go +++ /dev/null @@ -1,479 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/ecs" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEcsTaskDefinition() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEcsTaskDefinitionCreate, - Read: resourceAwsEcsTaskDefinitionRead, - Update: resourceAwsEcsTaskDefinitionUpdate, - Delete: resourceAwsEcsTaskDefinitionDelete, - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("arn", d.Id()) - - idErr := fmt.Errorf("Expected ID in format of arn:PARTITION:ecs:REGION:ACCOUNTID:task-definition/FAMILY:REVISION and provided: %s", d.Id()) - resARN, err := arn.Parse(d.Id()) - if err != nil { - return nil, idErr - } - familyRevision := strings.TrimPrefix(resARN.Resource, "task-definition/") - familyRevisionParts := strings.Split(familyRevision, ":") - if len(familyRevisionParts) != 2 { - return nil, idErr - } - d.SetId(familyRevisionParts[0]) - - return []*schema.ResourceData{d}, nil - }, - }, - - SchemaVersion: 1, - MigrateState: resourceAwsEcsTaskDefinitionMigrateState, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "cpu": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "revision": { - Type: schema.TypeInt, - Computed: true, - }, - - "container_definitions": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - networkMode, ok := d.GetOk("network_mode") - isAWSVPC := ok && networkMode.(string) == ecs.NetworkModeAwsvpc - equal, _ := EcsContainerDefinitionsAreEquivalent(old, new, isAWSVPC) - return equal - }, - ValidateFunc: validateAwsEcsTaskDefinitionContainerDefinitions, - }, - - "task_role_arn": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "execution_role_arn": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "memory": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "network_mode": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - ecs.NetworkModeBridge, - ecs.NetworkModeHost, - ecs.NetworkModeAwsvpc, - ecs.NetworkModeNone, - }, false), - }, - - "volume": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "host_path": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "docker_volume_configuration": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "scope": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - ecs.ScopeShared, - ecs.ScopeTask, - }, false), - }, - "autoprovision": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Default: false, - }, - "driver": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - }, - "driver_opts": { - Type: schema.TypeMap, - Elem: &schema.Schema{Type: schema.TypeString}, - ForceNew: true, - Optional: true, - }, - "labels": { - Type: schema.TypeMap, - Elem: &schema.Schema{Type: schema.TypeString}, - ForceNew: true, - Optional: true, - }, - }, - }, - }, - }, - }, - Set: resourceAwsEcsTaskDefinitionVolumeHash, - }, - - "placement_constraints": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - MaxItems: 10, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "expression": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - }, - }, - }, - }, - - "requires_compatibilities": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "ipc_mode": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - ecs.IpcModeHost, - ecs.IpcModeNone, - ecs.IpcModeTask, - }, false), - }, - - "pid_mode": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - ecs.PidModeHost, - ecs.PidModeTask, - }, false), - }, - - "tags": tagsSchema(), - }, - } -} - -func validateAwsEcsTaskDefinitionContainerDefinitions(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - _, err := expandEcsContainerDefinitions(value) - if err != nil { - errors = append(errors, fmt.Errorf("ECS Task Definition container_definitions is invalid: %s", err)) - } - return -} - -func resourceAwsEcsTaskDefinitionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - rawDefinitions := d.Get("container_definitions").(string) - definitions, err := expandEcsContainerDefinitions(rawDefinitions) - if err != nil { - return err - } - - input := ecs.RegisterTaskDefinitionInput{ - ContainerDefinitions: definitions, - Family: aws.String(d.Get("family").(string)), - } - - // ClientException: Tags can not be empty. - if v, ok := d.GetOk("tags"); ok { - input.Tags = tagsFromMapECS(v.(map[string]interface{})) - } - - if v, ok := d.GetOk("task_role_arn"); ok { - input.TaskRoleArn = aws.String(v.(string)) - } - - if v, ok := d.GetOk("execution_role_arn"); ok { - input.ExecutionRoleArn = aws.String(v.(string)) - } - - if v, ok := d.GetOk("cpu"); ok { - input.Cpu = aws.String(v.(string)) - } - - if v, ok := d.GetOk("memory"); ok { - input.Memory = aws.String(v.(string)) - } - - if v, ok := d.GetOk("network_mode"); ok { - input.NetworkMode = aws.String(v.(string)) - } - - if v, ok := d.GetOk("ipc_mode"); ok { - input.IpcMode = aws.String(v.(string)) - } - - if v, ok := d.GetOk("pid_mode"); ok { - input.PidMode = aws.String(v.(string)) - } - - if v, ok := d.GetOk("volume"); ok { - volumes, err := expandEcsVolumes(v.(*schema.Set).List()) - if err != nil { - return err - } - input.Volumes = volumes - } - - constraints := d.Get("placement_constraints").(*schema.Set).List() - if len(constraints) > 0 { - var pc []*ecs.TaskDefinitionPlacementConstraint - for _, raw := range constraints { - p := raw.(map[string]interface{}) - t := p["type"].(string) - e := p["expression"].(string) - if err := validateAwsEcsPlacementConstraint(t, e); err != nil { - return err - } - pc = append(pc, &ecs.TaskDefinitionPlacementConstraint{ - Type: aws.String(t), - Expression: aws.String(e), - }) - } - input.PlacementConstraints = pc - } - - if v, ok := d.GetOk("requires_compatibilities"); ok && v.(*schema.Set).Len() > 0 { - input.RequiresCompatibilities = expandStringList(v.(*schema.Set).List()) - } - - log.Printf("[DEBUG] Registering ECS task definition: %s", input) - out, err := conn.RegisterTaskDefinition(&input) - if err != nil { - return err - } - - taskDefinition := *out.TaskDefinition - - log.Printf("[DEBUG] ECS task definition registered: %q (rev. %d)", - *taskDefinition.TaskDefinitionArn, *taskDefinition.Revision) - - d.SetId(*taskDefinition.Family) - d.Set("arn", taskDefinition.TaskDefinitionArn) - - return resourceAwsEcsTaskDefinitionRead(d, meta) -} - -func resourceAwsEcsTaskDefinitionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - log.Printf("[DEBUG] Reading task definition %s", d.Id()) - out, err := conn.DescribeTaskDefinition(&ecs.DescribeTaskDefinitionInput{ - TaskDefinition: aws.String(d.Get("arn").(string)), - Include: []*string{aws.String(ecs.TaskDefinitionFieldTags)}, - }) - if err != nil { - return err - } - log.Printf("[DEBUG] Received task definition %s, status:%s\n %s", aws.StringValue(out.TaskDefinition.Family), - aws.StringValue(out.TaskDefinition.Status), out) - - taskDefinition := out.TaskDefinition - - if aws.StringValue(taskDefinition.Status) == "INACTIVE" { - log.Printf("[DEBUG] Removing ECS task definition %s because it's INACTIVE", aws.StringValue(out.TaskDefinition.Family)) - d.SetId("") - return nil - } - - d.SetId(*taskDefinition.Family) - d.Set("arn", taskDefinition.TaskDefinitionArn) - d.Set("family", taskDefinition.Family) - d.Set("revision", taskDefinition.Revision) - - defs, err := flattenEcsContainerDefinitions(taskDefinition.ContainerDefinitions) - if err != nil { - return err - } - err = d.Set("container_definitions", defs) - if err != nil { - return err - } - - d.Set("task_role_arn", taskDefinition.TaskRoleArn) - d.Set("execution_role_arn", taskDefinition.ExecutionRoleArn) - d.Set("cpu", taskDefinition.Cpu) - d.Set("memory", taskDefinition.Memory) - d.Set("network_mode", taskDefinition.NetworkMode) - - if err := d.Set("tags", tagsToMapECS(out.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - if err := d.Set("volume", flattenEcsVolumes(taskDefinition.Volumes)); err != nil { - return fmt.Errorf("error setting volume: %s", err) - } - - if err := d.Set("placement_constraints", flattenPlacementConstraints(taskDefinition.PlacementConstraints)); err != nil { - log.Printf("[ERR] Error setting placement_constraints for (%s): %s", d.Id(), err) - } - - if err := d.Set("requires_compatibilities", flattenStringList(taskDefinition.RequiresCompatibilities)); err != nil { - return err - } - - return nil -} - -func flattenPlacementConstraints(pcs []*ecs.TaskDefinitionPlacementConstraint) []map[string]interface{} { - if len(pcs) == 0 { - return nil - } - results := make([]map[string]interface{}, 0) - for _, pc := range pcs { - c := make(map[string]interface{}) - c["type"] = *pc.Type - c["expression"] = *pc.Expression - results = append(results, c) - } - return results -} - -func resourceAwsEcsTaskDefinitionUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - if d.HasChange("tags") { - oldTagsRaw, newTagsRaw := d.GetChange("tags") - oldTagsMap := oldTagsRaw.(map[string]interface{}) - newTagsMap := newTagsRaw.(map[string]interface{}) - createTags, removeTags := diffTagsECS(tagsFromMapECS(oldTagsMap), tagsFromMapECS(newTagsMap)) - - if len(removeTags) > 0 { - removeTagKeys := make([]*string, len(removeTags)) - for i, removeTag := range removeTags { - removeTagKeys[i] = removeTag.Key - } - - input := &ecs.UntagResourceInput{ - ResourceArn: aws.String(d.Get("arn").(string)), - TagKeys: removeTagKeys, - } - - log.Printf("[DEBUG] Untagging ECS Cluster: %s", input) - if _, err := conn.UntagResource(input); err != nil { - return fmt.Errorf("error untagging ECS Cluster (%s): %s", d.Get("arn").(string), err) - } - } - - if len(createTags) > 0 { - input := &ecs.TagResourceInput{ - ResourceArn: aws.String(d.Get("arn").(string)), - Tags: createTags, - } - - log.Printf("[DEBUG] Tagging ECS Cluster: %s", input) - if _, err := conn.TagResource(input); err != nil { - return fmt.Errorf("error tagging ECS Cluster (%s): %s", d.Get("arn").(string), err) - } - } - } - - return nil -} - -func resourceAwsEcsTaskDefinitionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ecsconn - - _, err := conn.DeregisterTaskDefinition(&ecs.DeregisterTaskDefinitionInput{ - TaskDefinition: aws.String(d.Get("arn").(string)), - }) - if err != nil { - return err - } - - log.Printf("[DEBUG] Task definition %q deregistered.", d.Get("arn").(string)) - - return nil -} - -func resourceAwsEcsTaskDefinitionVolumeHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["host_path"].(string))) - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition_migrate.go deleted file mode 100644 index 179b73bff..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition_migrate.go +++ /dev/null @@ -1,44 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" - "github.com/aws/aws-sdk-go/service/ecs" - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsEcsTaskDefinitionMigrateState(v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - conn := meta.(*AWSClient).ecsconn - - switch v { - case 0: - log.Println("[INFO] Found AWS ECS Task Definition State v0; migrating to v1") - return migrateEcsTaskDefinitionStateV0toV1(is, conn) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateEcsTaskDefinitionStateV0toV1(is *terraform.InstanceState, conn *ecs.ECS) (*terraform.InstanceState, error) { - arn := is.Attributes["arn"] - - // We need to pull definitions from the API b/c they're unrecoverable from the checksum - td, err := conn.DescribeTaskDefinition(&ecs.DescribeTaskDefinitionInput{ - TaskDefinition: aws.String(arn), - }) - if err != nil { - return nil, err - } - - b, err := jsonutil.BuildJSON(td.TaskDefinition.ContainerDefinitions) - if err != nil { - return nil, err - } - - is.Attributes["container_definitions"] = string(b) - - return is, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go deleted file mode 100644 index 3f4f98a72..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go +++ /dev/null @@ -1,394 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/efs" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEfsFileSystem() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEfsFileSystemCreate, - Read: resourceAwsEfsFileSystemRead, - Update: resourceAwsEfsFileSystemUpdate, - Delete: resourceAwsEfsFileSystemDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "creation_token": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 64), - }, - - "reference_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - Deprecated: "Please use attribute `creation_token' instead. This attribute might be removed in future releases.", - ValidateFunc: validateReferenceName, - }, - - "performance_mode": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - efs.PerformanceModeGeneralPurpose, - efs.PerformanceModeMaxIo, - }, false), - }, - - "encrypted": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - - "dns_name": { - Type: schema.TypeString, - Computed: true, - }, - - "provisioned_throughput_in_mibps": { - Type: schema.TypeFloat, - Optional: true, - }, - - "tags": tagsSchema(), - - "throughput_mode": { - Type: schema.TypeString, - Optional: true, - Default: efs.ThroughputModeBursting, - ValidateFunc: validation.StringInSlice([]string{ - efs.ThroughputModeBursting, - efs.ThroughputModeProvisioned, - }, false), - }, - }, - } -} - -func resourceAwsEfsFileSystemCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).efsconn - - creationToken := "" - if v, ok := d.GetOk("creation_token"); ok { - creationToken = v.(string) - } else { - if v, ok := d.GetOk("reference_name"); ok { - creationToken = resource.PrefixedUniqueId(fmt.Sprintf("%s-", v.(string))) - log.Printf("[WARN] Using deprecated `reference_name' attribute.") - } else { - creationToken = resource.UniqueId() - } - } - throughputMode := d.Get("throughput_mode").(string) - - createOpts := &efs.CreateFileSystemInput{ - CreationToken: aws.String(creationToken), - ThroughputMode: aws.String(throughputMode), - } - - if v, ok := d.GetOk("performance_mode"); ok { - createOpts.PerformanceMode = aws.String(v.(string)) - } - - if throughputMode == efs.ThroughputModeProvisioned { - createOpts.ProvisionedThroughputInMibps = aws.Float64(d.Get("provisioned_throughput_in_mibps").(float64)) - } - - encrypted, hasEncrypted := d.GetOk("encrypted") - kmsKeyId, hasKmsKeyId := d.GetOk("kms_key_id") - - if hasEncrypted { - createOpts.Encrypted = aws.Bool(encrypted.(bool)) - } - - if hasKmsKeyId { - createOpts.KmsKeyId = aws.String(kmsKeyId.(string)) - } - - if encrypted == false && hasKmsKeyId { - return errors.New("encrypted must be set to true when kms_key_id is specified") - } - - log.Printf("[DEBUG] EFS file system create options: %#v", *createOpts) - fs, err := conn.CreateFileSystem(createOpts) - if err != nil { - return fmt.Errorf("Error creating EFS file system: %s", err) - } - - d.SetId(*fs.FileSystemId) - log.Printf("[INFO] EFS file system ID: %s", d.Id()) - - stateConf := &resource.StateChangeConf{ - Pending: []string{efs.LifeCycleStateCreating}, - Target: []string{efs.LifeCycleStateAvailable}, - Refresh: resourceEfsFileSystemCreateUpdateRefreshFunc(d.Id(), conn), - Timeout: 10 * time.Minute, - Delay: 2 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for EFS file system (%q) to create: %s", d.Id(), err) - } - log.Printf("[DEBUG] EFS file system %q created.", d.Id()) - - err = setTagsEFS(conn, d) - if err != nil { - return fmt.Errorf("error setting tags for EFS file system (%q): %s", d.Id(), err) - } - - return resourceAwsEfsFileSystemRead(d, meta) -} - -func resourceAwsEfsFileSystemUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).efsconn - - if d.HasChange("provisioned_throughput_in_mibps") || d.HasChange("throughput_mode") { - throughputMode := d.Get("throughput_mode").(string) - - input := &efs.UpdateFileSystemInput{ - FileSystemId: aws.String(d.Id()), - ThroughputMode: aws.String(throughputMode), - } - - if throughputMode == efs.ThroughputModeProvisioned { - input.ProvisionedThroughputInMibps = aws.Float64(d.Get("provisioned_throughput_in_mibps").(float64)) - } - - _, err := conn.UpdateFileSystem(input) - if err != nil { - return fmt.Errorf("error updating EFS File System %q: %s", d.Id(), err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{efs.LifeCycleStateUpdating}, - Target: []string{efs.LifeCycleStateAvailable}, - Refresh: resourceEfsFileSystemCreateUpdateRefreshFunc(d.Id(), conn), - Timeout: 10 * time.Minute, - Delay: 2 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for EFS file system (%q) to update: %s", d.Id(), err) - } - } - - if d.HasChange("tags") { - err := setTagsEFS(conn, d) - if err != nil { - return fmt.Errorf("Error setting EC2 tags for EFS file system (%q): %s", - d.Id(), err.Error()) - } - } - - return resourceAwsEfsFileSystemRead(d, meta) -} - -func resourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).efsconn - - resp, err := conn.DescribeFileSystems(&efs.DescribeFileSystemsInput{ - FileSystemId: aws.String(d.Id()), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "FileSystemNotFound" { - log.Printf("[WARN] EFS file system (%s) could not be found.", d.Id()) - d.SetId("") - return nil - } - return err - } - - if hasEmptyFileSystems(resp) { - return fmt.Errorf("EFS file system %q could not be found.", d.Id()) - } - - tags := make([]*efs.Tag, 0) - var marker string - for { - params := &efs.DescribeTagsInput{ - FileSystemId: aws.String(d.Id()), - } - if marker != "" { - params.Marker = aws.String(marker) - } - - tagsResp, err := conn.DescribeTags(params) - if err != nil { - return fmt.Errorf("Error retrieving EC2 tags for EFS file system (%q): %s", - d.Id(), err.Error()) - } - - tags = append(tags, tagsResp.Tags...) - - if tagsResp.NextMarker != nil { - marker = *tagsResp.NextMarker - } else { - break - } - } - - err = d.Set("tags", tagsToMapEFS(tags)) - if err != nil { - return err - } - - var fs *efs.FileSystemDescription - for _, f := range resp.FileSystems { - if d.Id() == *f.FileSystemId { - fs = f - break - } - } - if fs == nil { - log.Printf("[WARN] EFS (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - fsARN := arn.ARN{ - AccountID: meta.(*AWSClient).accountid, - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Resource: fmt.Sprintf("file-system/%s", aws.StringValue(fs.FileSystemId)), - Service: "elasticfilesystem", - }.String() - - d.Set("arn", fsARN) - d.Set("creation_token", fs.CreationToken) - d.Set("encrypted", fs.Encrypted) - d.Set("kms_key_id", fs.KmsKeyId) - d.Set("performance_mode", fs.PerformanceMode) - d.Set("provisioned_throughput_in_mibps", fs.ProvisionedThroughputInMibps) - d.Set("throughput_mode", fs.ThroughputMode) - - region := meta.(*AWSClient).region - if err := d.Set("dns_name", resourceAwsEfsDnsName(aws.StringValue(fs.FileSystemId), region)); err != nil { - return fmt.Errorf("error setting dns_name: %s", err) - } - - return nil -} - -func resourceAwsEfsFileSystemDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).efsconn - - log.Printf("[DEBUG] Deleting EFS file system: %s", d.Id()) - _, err := conn.DeleteFileSystem(&efs.DeleteFileSystemInput{ - FileSystemId: aws.String(d.Id()), - }) - stateConf := &resource.StateChangeConf{ - Pending: []string{"available", "deleting"}, - Target: []string{}, - Refresh: func() (interface{}, string, error) { - resp, err := conn.DescribeFileSystems(&efs.DescribeFileSystemsInput{ - FileSystemId: aws.String(d.Id()), - }) - if err != nil { - efsErr, ok := err.(awserr.Error) - if ok && efsErr.Code() == "FileSystemNotFound" { - return nil, "", nil - } - return nil, "error", err - } - - if hasEmptyFileSystems(resp) { - return nil, "", nil - } - - fs := resp.FileSystems[0] - log.Printf("[DEBUG] current status of %q: %q", *fs.FileSystemId, *fs.LifeCycleState) - return fs, *fs.LifeCycleState, nil - }, - Timeout: 10 * time.Minute, - Delay: 2 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for EFS file system (%q) to delete: %s", - d.Id(), err.Error()) - } - - log.Printf("[DEBUG] EFS file system %q deleted.", d.Id()) - - return nil -} - -func validateReferenceName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - creationToken := resource.PrefixedUniqueId(fmt.Sprintf("%s-", value)) - if len(creationToken) > 64 { - errors = append(errors, fmt.Errorf( - "%q cannot take the Creation Token over the limit of 64 characters: %q", k, value)) - } - return -} - -func hasEmptyFileSystems(fs *efs.DescribeFileSystemsOutput) bool { - if fs != nil && len(fs.FileSystems) > 0 { - return false - } - return true -} - -func resourceAwsEfsDnsName(fileSystemId, region string) string { - return fmt.Sprintf("%s.efs.%s.amazonaws.com", fileSystemId, region) -} - -func resourceEfsFileSystemCreateUpdateRefreshFunc(id string, conn *efs.EFS) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeFileSystems(&efs.DescribeFileSystemsInput{ - FileSystemId: aws.String(id), - }) - if err != nil { - return nil, "error", err - } - - if hasEmptyFileSystems(resp) { - return nil, "not-found", fmt.Errorf("EFS file system %q could not be found.", id) - } - - fs := resp.FileSystems[0] - state := aws.StringValue(fs.LifeCycleState) - log.Printf("[DEBUG] current status of %q: %q", id, state) - return fs, state, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_mount_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_mount_target.go deleted file mode 100644 index 778881b11..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_mount_target.go +++ /dev/null @@ -1,312 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/aws/aws-sdk-go/service/efs" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsEfsMountTarget() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEfsMountTargetCreate, - Read: resourceAwsEfsMountTargetRead, - Update: resourceAwsEfsMountTargetUpdate, - Delete: resourceAwsEfsMountTargetDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "file_system_arn": { - Type: schema.TypeString, - Computed: true, - }, - "file_system_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "ip_address": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - }, - - "security_groups": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - Computed: true, - Optional: true, - }, - - "subnet_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "network_interface_id": { - Type: schema.TypeString, - Computed: true, - }, - "dns_name": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsEfsMountTargetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).efsconn - - fsId := d.Get("file_system_id").(string) - subnetId := d.Get("subnet_id").(string) - - // CreateMountTarget would return the same Mount Target ID - // to parallel requests if they both include the same AZ - // and we would end up managing the same MT as 2 resources. - // So we make it fail by calling 1 request per AZ at a time. - az, err := getAzFromSubnetId(subnetId, meta.(*AWSClient).ec2conn) - if err != nil { - return fmt.Errorf("Failed getting Availability Zone from subnet ID (%s): %s", subnetId, err) - } - mtKey := "efs-mt-" + fsId + "-" + az - awsMutexKV.Lock(mtKey) - defer awsMutexKV.Unlock(mtKey) - - input := efs.CreateMountTargetInput{ - FileSystemId: aws.String(fsId), - SubnetId: aws.String(subnetId), - } - - if v, ok := d.GetOk("ip_address"); ok { - input.IpAddress = aws.String(v.(string)) - } - if v, ok := d.GetOk("security_groups"); ok { - input.SecurityGroups = expandStringList(v.(*schema.Set).List()) - } - - log.Printf("[DEBUG] Creating EFS mount target: %#v", input) - - mt, err := conn.CreateMountTarget(&input) - if err != nil { - return err - } - - d.SetId(*mt.MountTargetId) - log.Printf("[INFO] EFS mount target ID: %s", d.Id()) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating"}, - Target: []string{"available"}, - Refresh: func() (interface{}, string, error) { - resp, err := conn.DescribeMountTargets(&efs.DescribeMountTargetsInput{ - MountTargetId: aws.String(d.Id()), - }) - if err != nil { - return nil, "error", err - } - - if hasEmptyMountTargets(resp) { - return nil, "error", fmt.Errorf("EFS mount target %q could not be found.", d.Id()) - } - - mt := resp.MountTargets[0] - - log.Printf("[DEBUG] Current status of %q: %q", *mt.MountTargetId, *mt.LifeCycleState) - return mt, *mt.LifeCycleState, nil - }, - Timeout: 10 * time.Minute, - Delay: 2 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for EFS mount target (%s) to create: %s", d.Id(), err) - } - - log.Printf("[DEBUG] EFS mount target created: %s", *mt.MountTargetId) - - return resourceAwsEfsMountTargetRead(d, meta) -} - -func resourceAwsEfsMountTargetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).efsconn - - if d.HasChange("security_groups") { - input := efs.ModifyMountTargetSecurityGroupsInput{ - MountTargetId: aws.String(d.Id()), - SecurityGroups: expandStringList(d.Get("security_groups").(*schema.Set).List()), - } - _, err := conn.ModifyMountTargetSecurityGroups(&input) - if err != nil { - return err - } - } - - return resourceAwsEfsMountTargetRead(d, meta) -} - -func resourceAwsEfsMountTargetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).efsconn - resp, err := conn.DescribeMountTargets(&efs.DescribeMountTargetsInput{ - MountTargetId: aws.String(d.Id()), - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "MountTargetNotFound" { - // The EFS mount target could not be found, - // which would indicate that it might be - // already deleted. - log.Printf("[WARN] EFS mount target %q could not be found.", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error reading EFS mount target %s: %s", d.Id(), err) - } - - if hasEmptyMountTargets(resp) { - return fmt.Errorf("EFS mount target %q could not be found.", d.Id()) - } - - mt := resp.MountTargets[0] - - log.Printf("[DEBUG] Found EFS mount target: %#v", mt) - - d.SetId(*mt.MountTargetId) - - fsARN := arn.ARN{ - AccountID: meta.(*AWSClient).accountid, - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Resource: fmt.Sprintf("file-system/%s", aws.StringValue(mt.FileSystemId)), - Service: "elasticfilesystem", - }.String() - - d.Set("file_system_arn", fsARN) - d.Set("file_system_id", mt.FileSystemId) - d.Set("ip_address", mt.IpAddress) - d.Set("subnet_id", mt.SubnetId) - d.Set("network_interface_id", mt.NetworkInterfaceId) - - sgResp, err := conn.DescribeMountTargetSecurityGroups(&efs.DescribeMountTargetSecurityGroupsInput{ - MountTargetId: aws.String(d.Id()), - }) - if err != nil { - return err - } - - err = d.Set("security_groups", schema.NewSet(schema.HashString, flattenStringList(sgResp.SecurityGroups))) - if err != nil { - return err - } - - // DNS name per http://docs.aws.amazon.com/efs/latest/ug/mounting-fs-mount-cmd-dns-name.html - _, err = getAzFromSubnetId(*mt.SubnetId, meta.(*AWSClient).ec2conn) - if err != nil { - return fmt.Errorf("Failed getting Availability Zone from subnet ID (%s): %s", *mt.SubnetId, err) - } - - region := meta.(*AWSClient).region - if err := d.Set("dns_name", resourceAwsEfsMountTargetDnsName(aws.StringValue(mt.FileSystemId), region)); err != nil { - return fmt.Errorf("error setting dns_name: %s", err) - } - - return nil -} - -func getAzFromSubnetId(subnetId string, conn *ec2.EC2) (string, error) { - input := ec2.DescribeSubnetsInput{ - SubnetIds: []*string{aws.String(subnetId)}, - } - out, err := conn.DescribeSubnets(&input) - if err != nil { - return "", err - } - - if l := len(out.Subnets); l != 1 { - return "", fmt.Errorf("Expected exactly 1 subnet returned for %q, got: %d", subnetId, l) - } - - return *out.Subnets[0].AvailabilityZone, nil -} - -func resourceAwsEfsMountTargetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).efsconn - - log.Printf("[DEBUG] Deleting EFS mount target %q", d.Id()) - _, err := conn.DeleteMountTarget(&efs.DeleteMountTargetInput{ - MountTargetId: aws.String(d.Id()), - }) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"available", "deleting", "deleted"}, - Target: []string{}, - Refresh: func() (interface{}, string, error) { - resp, err := conn.DescribeMountTargets(&efs.DescribeMountTargetsInput{ - MountTargetId: aws.String(d.Id()), - }) - if err != nil { - awsErr, ok := err.(awserr.Error) - if !ok { - return nil, "error", err - } - - if awsErr.Code() == "MountTargetNotFound" { - return nil, "", nil - } - - return nil, "error", awsErr - } - - if hasEmptyMountTargets(resp) { - return nil, "", nil - } - - mt := resp.MountTargets[0] - - log.Printf("[DEBUG] Current status of %q: %q", *mt.MountTargetId, *mt.LifeCycleState) - return mt, *mt.LifeCycleState, nil - }, - Timeout: 10 * time.Minute, - Delay: 2 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for EFS mount target (%q) to delete: %s", - d.Id(), err.Error()) - } - - log.Printf("[DEBUG] EFS mount target %q deleted.", d.Id()) - - return nil -} - -func resourceAwsEfsMountTargetDnsName(fileSystemId, region string) string { - return fmt.Sprintf("%s.efs.%s.amazonaws.com", fileSystemId, region) -} - -func hasEmptyMountTargets(mto *efs.DescribeMountTargetsOutput) bool { - if mto != nil && len(mto.MountTargets) > 0 { - return false - } - return true -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_egress_only_internet_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_egress_only_internet_gateway.go deleted file mode 100644 index bb4cd863a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_egress_only_internet_gateway.go +++ /dev/null @@ -1,100 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsEgressOnlyInternetGateway() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEgressOnlyInternetGatewayCreate, - Read: resourceAwsEgressOnlyInternetGatewayRead, - Delete: resourceAwsEgressOnlyInternetGatewayDelete, - - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsEgressOnlyInternetGatewayCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - resp, err := conn.CreateEgressOnlyInternetGateway(&ec2.CreateEgressOnlyInternetGatewayInput{ - VpcId: aws.String(d.Get("vpc_id").(string)), - }) - if err != nil { - return fmt.Errorf("Error creating egress internet gateway: %s", err) - } - - d.SetId(*resp.EgressOnlyInternetGateway.EgressOnlyInternetGatewayId) - - if err != nil { - return fmt.Errorf("%s", err) - } - - return resourceAwsEgressOnlyInternetGatewayRead(d, meta) -} - -func resourceAwsEgressOnlyInternetGatewayRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - var found bool - var req = &ec2.DescribeEgressOnlyInternetGatewaysInput{ - EgressOnlyInternetGatewayIds: []*string{aws.String(d.Id())}, - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - resp, err := conn.DescribeEgressOnlyInternetGateways(req) - if err != nil { - return resource.NonRetryableError(err) - } - if resp != nil && len(resp.EgressOnlyInternetGateways) > 0 { - for _, igw := range resp.EgressOnlyInternetGateways { - if aws.StringValue(igw.EgressOnlyInternetGatewayId) == d.Id() { - found = true - break - } - } - } - if d.IsNewResource() && !found { - return resource.RetryableError(fmt.Errorf("Egress Only Internet Gateway (%s) not found.", d.Id())) - } - return nil - }) - - if err != nil { - return fmt.Errorf("Error describing egress internet gateway: %s", err) - } - - if !found { - log.Printf("[Error] Cannot find Egress Only Internet Gateway: %q", d.Id()) - d.SetId("") - return nil - } - - return nil -} - -func resourceAwsEgressOnlyInternetGatewayDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - _, err := conn.DeleteEgressOnlyInternetGateway(&ec2.DeleteEgressOnlyInternetGatewayInput{ - EgressOnlyInternetGatewayId: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error deleting egress internet gateway: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip.go deleted file mode 100644 index c3f8a1d58..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip.go +++ /dev/null @@ -1,419 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "net" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsEip() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEipCreate, - Read: resourceAwsEipRead, - Update: resourceAwsEipUpdate, - Delete: resourceAwsEipDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Read: schema.DefaultTimeout(15 * time.Minute), - Update: schema.DefaultTimeout(5 * time.Minute), - Delete: schema.DefaultTimeout(3 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "vpc": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "instance": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "network_interface": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "allocation_id": { - Type: schema.TypeString, - Computed: true, - }, - - "association_id": { - Type: schema.TypeString, - Computed: true, - }, - - "domain": { - Type: schema.TypeString, - Computed: true, - }, - - "public_ip": { - Type: schema.TypeString, - Computed: true, - }, - - "private_ip": { - Type: schema.TypeString, - Computed: true, - }, - - "associate_with_private_ip": { - Type: schema.TypeString, - Optional: true, - }, - - "public_ipv4_pool": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsEipCreate(d *schema.ResourceData, meta interface{}) error { - ec2conn := meta.(*AWSClient).ec2conn - - // By default, we're not in a VPC - domainOpt := "" - if v := d.Get("vpc"); v != nil && v.(bool) { - domainOpt = "vpc" - } - - allocOpts := &ec2.AllocateAddressInput{ - Domain: aws.String(domainOpt), - } - - if v, ok := d.GetOk("public_ipv4_pool"); ok { - allocOpts.PublicIpv4Pool = aws.String(v.(string)) - } - - log.Printf("[DEBUG] EIP create configuration: %#v", allocOpts) - allocResp, err := ec2conn.AllocateAddress(allocOpts) - if err != nil { - return fmt.Errorf("Error creating EIP: %s", err) - } - - // The domain tells us if we're in a VPC or not - d.Set("domain", allocResp.Domain) - - // Assign the eips (unique) allocation id for use later - // the EIP api has a conditional unique ID (really), so - // if we're in a VPC we need to save the ID as such, otherwise - // it defaults to using the public IP - log.Printf("[DEBUG] EIP Allocate: %#v", allocResp) - if d.Get("domain").(string) == "vpc" { - d.SetId(*allocResp.AllocationId) - } else { - d.SetId(*allocResp.PublicIp) - } - - log.Printf("[INFO] EIP ID: %s (domain: %v)", d.Id(), *allocResp.Domain) - - if _, ok := d.GetOk("tags"); ok { - if err := setTags(ec2conn, d); err != nil { - return fmt.Errorf("Error creating EIP tags: %s", err) - } - } - - return resourceAwsEipUpdate(d, meta) -} - -func resourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { - ec2conn := meta.(*AWSClient).ec2conn - - domain := resourceAwsEipDomain(d) - id := d.Id() - - req := &ec2.DescribeAddressesInput{} - - if domain == "vpc" { - req.AllocationIds = []*string{aws.String(id)} - } else { - req.PublicIps = []*string{aws.String(id)} - } - - log.Printf( - "[DEBUG] EIP describe configuration: %s (domain: %s)", - req, domain) - - var err error - var describeAddresses *ec2.DescribeAddressesOutput - - if d.IsNewResource() { - err := resource.Retry(d.Timeout(schema.TimeoutRead), func() *resource.RetryError { - describeAddresses, err = ec2conn.DescribeAddresses(req) - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && (awsErr.Code() == "InvalidAllocationID.NotFound" || - awsErr.Code() == "InvalidAddress.NotFound") { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error retrieving EIP: %s", err) - } - } else { - describeAddresses, err = ec2conn.DescribeAddresses(req) - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && (awsErr.Code() == "InvalidAllocationID.NotFound" || - awsErr.Code() == "InvalidAddress.NotFound") { - log.Printf("[WARN] EIP not found, removing from state: %s", req) - d.SetId("") - return nil - } - return err - } - } - - var address *ec2.Address - - // In the case that AWS returns more EIPs than we intend it to, we loop - // over the returned addresses to see if it's in the list of results - for _, addr := range describeAddresses.Addresses { - if (domain == "vpc" && aws.StringValue(addr.AllocationId) == id) || aws.StringValue(addr.PublicIp) == id { - address = addr - break - } - } - - if address == nil { - log.Printf("[WARN] EIP %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("association_id", address.AssociationId) - if address.InstanceId != nil { - d.Set("instance", address.InstanceId) - } else { - d.Set("instance", "") - } - if address.NetworkInterfaceId != nil { - d.Set("network_interface", address.NetworkInterfaceId) - } else { - d.Set("network_interface", "") - } - d.Set("private_ip", address.PrivateIpAddress) - d.Set("public_ip", address.PublicIp) - d.Set("public_ipv4_pool", address.PublicIpv4Pool) - - // On import (domain never set, which it must've been if we created), - // set the 'vpc' attribute depending on if we're in a VPC. - if address.Domain != nil { - d.Set("vpc", *address.Domain == "vpc") - } - - d.Set("domain", address.Domain) - - // Force ID to be an Allocation ID if we're on a VPC - // This allows users to import the EIP based on the IP if they are in a VPC - if *address.Domain == "vpc" && net.ParseIP(id) != nil { - log.Printf("[DEBUG] Re-assigning EIP ID (%s) to it's Allocation ID (%s)", d.Id(), *address.AllocationId) - d.SetId(*address.AllocationId) - } - - d.Set("tags", tagsToMap(address.Tags)) - - return nil -} - -func resourceAwsEipUpdate(d *schema.ResourceData, meta interface{}) error { - ec2conn := meta.(*AWSClient).ec2conn - - domain := resourceAwsEipDomain(d) - - // If we are updating an EIP that is not newly created, and we are attached to - // an instance or interface, detach first. - disassociate := false - if !d.IsNewResource() { - if d.HasChange("instance") && d.Get("instance").(string) != "" { - disassociate = true - } else if (d.HasChange("network_interface") || d.HasChange("associate_with_private_ip")) && d.Get("association_id").(string) != "" { - disassociate = true - } - } - if disassociate { - if err := disassociateEip(d, meta); err != nil { - return err - } - } - - // Associate to instance or interface if specified - associate := false - v_instance, ok_instance := d.GetOk("instance") - v_interface, ok_interface := d.GetOk("network_interface") - - if d.HasChange("instance") && ok_instance { - associate = true - } else if (d.HasChange("network_interface") || d.HasChange("associate_with_private_ip")) && ok_interface { - associate = true - } - if associate { - instanceId := v_instance.(string) - networkInterfaceId := v_interface.(string) - - assocOpts := &ec2.AssociateAddressInput{ - InstanceId: aws.String(instanceId), - PublicIp: aws.String(d.Id()), - } - - // more unique ID conditionals - if domain == "vpc" { - var privateIpAddress *string - if v := d.Get("associate_with_private_ip").(string); v != "" { - privateIpAddress = aws.String(v) - } - assocOpts = &ec2.AssociateAddressInput{ - NetworkInterfaceId: aws.String(networkInterfaceId), - InstanceId: aws.String(instanceId), - AllocationId: aws.String(d.Id()), - PrivateIpAddress: privateIpAddress, - } - } - - log.Printf("[DEBUG] EIP associate configuration: %s (domain: %s)", assocOpts, domain) - - err := resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { - _, err := ec2conn.AssociateAddress(assocOpts) - if err != nil { - if isAWSErr(err, "InvalidAllocationID.NotFound", "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - // Prevent saving instance if association failed - // e.g. missing internet gateway in VPC - d.Set("instance", "") - d.Set("network_interface", "") - return fmt.Errorf("Failure associating EIP: %s", err) - } - } - - if _, ok := d.GetOk("tags"); ok { - if err := setTags(ec2conn, d); err != nil { - return fmt.Errorf("Error updating EIP tags: %s", err) - } - } - - return resourceAwsEipRead(d, meta) -} - -func resourceAwsEipDelete(d *schema.ResourceData, meta interface{}) error { - ec2conn := meta.(*AWSClient).ec2conn - - if err := resourceAwsEipRead(d, meta); err != nil { - return err - } - if d.Id() == "" { - // This might happen from the read - return nil - } - - // If we are attached to an instance or interface, detach first. - if d.Get("instance").(string) != "" || d.Get("association_id").(string) != "" { - if err := disassociateEip(d, meta); err != nil { - return err - } - } - - domain := resourceAwsEipDomain(d) - return resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { - var err error - switch domain { - case "vpc": - log.Printf( - "[DEBUG] EIP release (destroy) address allocation: %v", - d.Id()) - _, err = ec2conn.ReleaseAddress(&ec2.ReleaseAddressInput{ - AllocationId: aws.String(d.Id()), - }) - case "standard": - log.Printf("[DEBUG] EIP release (destroy) address: %v", d.Id()) - _, err = ec2conn.ReleaseAddress(&ec2.ReleaseAddressInput{ - PublicIp: aws.String(d.Id()), - }) - } - - if err == nil { - return nil - } - if _, ok := err.(awserr.Error); !ok { - return resource.NonRetryableError(err) - } - - return resource.RetryableError(err) - }) -} - -func resourceAwsEipDomain(d *schema.ResourceData) string { - if v, ok := d.GetOk("domain"); ok { - return v.(string) - } else if strings.Contains(d.Id(), "eipalloc") { - // We have to do this for backwards compatibility since TF 0.1 - // didn't have the "domain" computed attribute. - return "vpc" - } - - return "standard" -} - -func disassociateEip(d *schema.ResourceData, meta interface{}) error { - ec2conn := meta.(*AWSClient).ec2conn - log.Printf("[DEBUG] Disassociating EIP: %s", d.Id()) - var err error - switch resourceAwsEipDomain(d) { - case "vpc": - associationID := d.Get("association_id").(string) - if associationID == "" { - // If assiciationID is empty, it means there's no association. - // Hence this disassociation can be skipped. - return nil - } - _, err = ec2conn.DisassociateAddress(&ec2.DisassociateAddressInput{ - AssociationId: aws.String(associationID), - }) - case "standard": - _, err = ec2conn.DisassociateAddress(&ec2.DisassociateAddressInput{ - PublicIp: aws.String(d.Get("public_ip").(string)), - }) - } - - // First check if the association ID is not found. If this - // is the case, then it was already disassociated somehow, - // and that is okay. The most commmon reason for this is that - // the instance or ENI it was attached it was destroyed. - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidAssociationID.NotFound" { - err = nil - } - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip_association.go deleted file mode 100644 index c7485e1c6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip_association.go +++ /dev/null @@ -1,238 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "net" - "time" - - "github.com/hashicorp/terraform/helper/resource" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsEipAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEipAssociationCreate, - Read: resourceAwsEipAssociationRead, - Delete: resourceAwsEipAssociationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "allocation_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "allow_reassociation": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - - "instance_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "network_interface_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "private_ip_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "public_ip": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsEipAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - request := &ec2.AssociateAddressInput{} - - if v, ok := d.GetOk("allocation_id"); ok { - request.AllocationId = aws.String(v.(string)) - } - if v, ok := d.GetOk("allow_reassociation"); ok { - request.AllowReassociation = aws.Bool(v.(bool)) - } - if v, ok := d.GetOk("instance_id"); ok { - request.InstanceId = aws.String(v.(string)) - } - if v, ok := d.GetOk("network_interface_id"); ok { - request.NetworkInterfaceId = aws.String(v.(string)) - } - if v, ok := d.GetOk("private_ip_address"); ok { - request.PrivateIpAddress = aws.String(v.(string)) - } - if v, ok := d.GetOk("public_ip"); ok { - request.PublicIp = aws.String(v.(string)) - } - - log.Printf("[DEBUG] EIP association configuration: %#v", request) - - var resp *ec2.AssociateAddressOutput - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var err error - resp, err = conn.AssociateAddress(request) - if err != nil { - if isAWSErr(err, "InvalidInstanceID", "pending instance") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error associating EIP: %s", err) - } - - log.Printf("[DEBUG] EIP Assoc Response: %s", resp) - - supportedPlatforms := meta.(*AWSClient).supportedplatforms - if len(supportedPlatforms) > 0 && !hasEc2Classic(supportedPlatforms) && resp.AssociationId == nil { - // We expect no association ID in EC2 Classic - // but still error out if ID is missing and we _know_ it's NOT EC2 Classic - return fmt.Errorf("Received no EIP Association ID in account that doesn't support EC2 Classic (%q): %s", - supportedPlatforms, resp) - } - - if resp.AssociationId == nil { - // This is required field for EC2 Classic per docs - d.SetId(*request.PublicIp) - } else { - d.SetId(*resp.AssociationId) - } - - return resourceAwsEipAssociationRead(d, meta) -} - -func resourceAwsEipAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - request, err := describeAddressesById(d.Id(), meta.(*AWSClient).supportedplatforms) - if err != nil { - return err - } - - response, err := conn.DescribeAddresses(request) - if err != nil { - return fmt.Errorf("Error reading EC2 Elastic IP %s: %#v", d.Get("allocation_id").(string), err) - } - - if response.Addresses == nil || len(response.Addresses) == 0 { - log.Printf("[INFO] EIP Association ID Not Found. Refreshing from state") - d.SetId("") - return nil - } - - return readAwsEipAssociation(d, response.Addresses[0]) -} - -func resourceAwsEipAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - var opts *ec2.DisassociateAddressInput - // We assume EC2 Classic if ID is a valid IPv4 address - ip := net.ParseIP(d.Id()) - if ip != nil { - supportedPlatforms := meta.(*AWSClient).supportedplatforms - if len(supportedPlatforms) > 0 && !hasEc2Classic(supportedPlatforms) { - return fmt.Errorf("Received IPv4 address as ID in account that doesn't support EC2 Classic (%q)", - supportedPlatforms) - } - - opts = &ec2.DisassociateAddressInput{ - PublicIp: aws.String(d.Id()), - } - } else { - opts = &ec2.DisassociateAddressInput{ - AssociationId: aws.String(d.Id()), - } - } - - _, err := conn.DisassociateAddress(opts) - if err != nil { - if isAWSErr(err, "InvalidAssociationID.NotFound", "") { - return nil - } - return fmt.Errorf("Error deleting Elastic IP association: %s", err) - } - - return nil -} - -func readAwsEipAssociation(d *schema.ResourceData, address *ec2.Address) error { - if err := d.Set("allocation_id", address.AllocationId); err != nil { - return err - } - if err := d.Set("instance_id", address.InstanceId); err != nil { - return err - } - if err := d.Set("network_interface_id", address.NetworkInterfaceId); err != nil { - return err - } - if err := d.Set("private_ip_address", address.PrivateIpAddress); err != nil { - return err - } - if err := d.Set("public_ip", address.PublicIp); err != nil { - return err - } - - return nil -} - -func describeAddressesById(id string, supportedPlatforms []string) (*ec2.DescribeAddressesInput, error) { - // We assume EC2 Classic if ID is a valid IPv4 address - ip := net.ParseIP(id) - if ip != nil { - if len(supportedPlatforms) > 0 && !hasEc2Classic(supportedPlatforms) { - return nil, fmt.Errorf("Received IPv4 address as ID in account that doesn't support EC2 Classic (%q)", - supportedPlatforms) - } - - return &ec2.DescribeAddressesInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("public-ip"), - Values: []*string{aws.String(id)}, - }, - { - Name: aws.String("domain"), - Values: []*string{aws.String("standard")}, - }, - }, - }, nil - } - - return &ec2.DescribeAddressesInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("association-id"), - Values: []*string{aws.String(id)}, - }, - }, - }, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eks_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eks_cluster.go deleted file mode 100644 index 8183f0020..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eks_cluster.go +++ /dev/null @@ -1,416 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/eks" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEksCluster() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEksClusterCreate, - Read: resourceAwsEksClusterRead, - Update: resourceAwsEksClusterUpdate, - Delete: resourceAwsEksClusterDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(15 * time.Minute), - Update: schema.DefaultTimeout(60 * time.Minute), - Delete: schema.DefaultTimeout(15 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "certificate_authority": { - Type: schema.TypeList, - MaxItems: 1, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "data": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "created_at": { - Type: schema.TypeString, - Computed: true, - }, - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "platform_version": { - Type: schema.TypeString, - Computed: true, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "vpc_config": { - Type: schema.TypeList, - MinItems: 1, - MaxItems: 1, - Required: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "security_group_ids": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "subnet_ids": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - MinItems: 1, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsEksClusterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).eksconn - name := d.Get("name").(string) - - input := &eks.CreateClusterInput{ - Name: aws.String(name), - RoleArn: aws.String(d.Get("role_arn").(string)), - ResourcesVpcConfig: expandEksVpcConfigRequest(d.Get("vpc_config").([]interface{})), - } - - if v, ok := d.GetOk("version"); ok && v.(string) != "" { - input.Version = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating EKS Cluster: %s", input) - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.CreateCluster(input) - if err != nil { - // InvalidParameterException: roleArn, arn:aws:iam::123456789012:role/XXX, does not exist - if isAWSErr(err, eks.ErrCodeInvalidParameterException, "does not exist") { - return resource.RetryableError(err) - } - if isAWSErr(err, eks.ErrCodeInvalidParameterException, "Role could not be assumed because the trusted entity is not correct") { - return resource.RetryableError(err) - } - // InvalidParameterException: The provided role doesn't have the Amazon EKS Managed Policies associated with it. Please ensure the following policies [arn:aws:iam::aws:policy/AmazonEKSClusterPolicy, arn:aws:iam::aws:policy/AmazonEKSServicePolicy] are attached - if isAWSErr(err, eks.ErrCodeInvalidParameterException, "The provided role doesn't have the Amazon EKS Managed Policies associated with it") { - return resource.RetryableError(err) - } - // InvalidParameterException: IAM role's policy must include the `ec2:DescribeSubnets` action - if isAWSErr(err, eks.ErrCodeInvalidParameterException, "IAM role's policy must include") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return fmt.Errorf("error creating EKS Cluster (%s): %s", name, err) - } - - d.SetId(name) - - stateConf := resource.StateChangeConf{ - Pending: []string{eks.ClusterStatusCreating}, - Target: []string{eks.ClusterStatusActive}, - Timeout: d.Timeout(schema.TimeoutCreate), - Refresh: refreshEksClusterStatus(conn, name), - } - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsEksClusterRead(d, meta) -} - -func resourceAwsEksClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).eksconn - - input := &eks.DescribeClusterInput{ - Name: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading EKS Cluster: %s", input) - output, err := conn.DescribeCluster(input) - if err != nil { - if isAWSErr(err, eks.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] EKS Cluster (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading EKS Cluster (%s): %s", d.Id(), err) - } - - cluster := output.Cluster - if cluster == nil { - log.Printf("[WARN] EKS Cluster (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("arn", cluster.Arn) - - if err := d.Set("certificate_authority", flattenEksCertificate(cluster.CertificateAuthority)); err != nil { - return fmt.Errorf("error setting certificate_authority: %s", err) - } - - d.Set("created_at", aws.TimeValue(cluster.CreatedAt).String()) - d.Set("endpoint", cluster.Endpoint) - d.Set("name", cluster.Name) - d.Set("platform_version", cluster.PlatformVersion) - d.Set("role_arn", cluster.RoleArn) - d.Set("version", cluster.Version) - - if err := d.Set("vpc_config", flattenEksVpcConfigResponse(cluster.ResourcesVpcConfig)); err != nil { - return fmt.Errorf("error setting vpc_config: %s", err) - } - - return nil -} - -func resourceAwsEksClusterUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).eksconn - - if d.HasChange("version") { - input := &eks.UpdateClusterVersionInput{ - Name: aws.String(d.Id()), - Version: aws.String(d.Get("version").(string)), - } - - log.Printf("[DEBUG] Updating EKS Cluster (%s) version: %s", d.Id(), input) - output, err := conn.UpdateClusterVersion(input) - - if err != nil { - return fmt.Errorf("error updating EKS Cluster (%s) version: %s", d.Id(), err) - } - - if output == nil || output.Update == nil || output.Update.Id == nil { - return fmt.Errorf("error determining EKS Cluster (%s) version update ID: empty response", d.Id()) - } - - updateID := aws.StringValue(output.Update.Id) - - err = waitForUpdateEksCluster(conn, d.Id(), updateID, d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return fmt.Errorf("error waiting for EKS Cluster (%s) update (%s): %s", d.Id(), updateID, err) - } - } - - return resourceAwsEksClusterRead(d, meta) -} - -func resourceAwsEksClusterDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).eksconn - - log.Printf("[DEBUG] Deleting EKS Cluster: %s", d.Id()) - err := deleteEksCluster(conn, d.Id()) - if err != nil { - return fmt.Errorf("error deleting EKS Cluster (%s): %s", d.Id(), err) - } - - err = waitForDeleteEksCluster(conn, d.Id(), d.Timeout(schema.TimeoutDelete)) - if err != nil { - return fmt.Errorf("error waiting for EKS Cluster (%s) deletion: %s", d.Id(), err) - } - - return nil -} - -func deleteEksCluster(conn *eks.EKS, clusterName string) error { - input := &eks.DeleteClusterInput{ - Name: aws.String(clusterName), - } - - _, err := conn.DeleteCluster(input) - if err != nil { - if isAWSErr(err, eks.ErrCodeResourceNotFoundException, "") { - return nil - } - // Sometimes the EKS API returns the ResourceNotFound error in this form: - // ClientException: No cluster found for name: tf-acc-test-0o1f8 - if isAWSErr(err, eks.ErrCodeClientException, "No cluster found for name:") { - return nil - } - return err - } - - return nil -} - -func expandEksVpcConfigRequest(l []interface{}) *eks.VpcConfigRequest { - if len(l) == 0 { - return nil - } - - m := l[0].(map[string]interface{}) - - return &eks.VpcConfigRequest{ - SecurityGroupIds: expandStringSet(m["security_group_ids"].(*schema.Set)), - SubnetIds: expandStringSet(m["subnet_ids"].(*schema.Set)), - } -} - -func flattenEksCertificate(certificate *eks.Certificate) []map[string]interface{} { - if certificate == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "data": aws.StringValue(certificate.Data), - } - - return []map[string]interface{}{m} -} - -func flattenEksVpcConfigResponse(vpcConfig *eks.VpcConfigResponse) []map[string]interface{} { - if vpcConfig == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "security_group_ids": schema.NewSet(schema.HashString, flattenStringList(vpcConfig.SecurityGroupIds)), - "subnet_ids": schema.NewSet(schema.HashString, flattenStringList(vpcConfig.SubnetIds)), - "vpc_id": aws.StringValue(vpcConfig.VpcId), - } - - return []map[string]interface{}{m} -} - -func refreshEksClusterStatus(conn *eks.EKS, clusterName string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - output, err := conn.DescribeCluster(&eks.DescribeClusterInput{ - Name: aws.String(clusterName), - }) - if err != nil { - return 42, "", err - } - cluster := output.Cluster - if cluster == nil { - return cluster, "", fmt.Errorf("EKS Cluster (%s) missing", clusterName) - } - return cluster, aws.StringValue(cluster.Status), nil - } -} - -func refreshEksUpdateStatus(conn *eks.EKS, clusterName, updateID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &eks.DescribeUpdateInput{ - Name: aws.String(clusterName), - UpdateId: aws.String(updateID), - } - - output, err := conn.DescribeUpdate(input) - - if err != nil { - return nil, "", err - } - - if output == nil || output.Update == nil { - return nil, "", fmt.Errorf("EKS Cluster (%s) update (%s) missing", clusterName, updateID) - } - - return output.Update, aws.StringValue(output.Update.Status), nil - } -} - -func waitForDeleteEksCluster(conn *eks.EKS, clusterName string, timeout time.Duration) error { - stateConf := resource.StateChangeConf{ - Pending: []string{ - eks.ClusterStatusActive, - eks.ClusterStatusDeleting, - }, - Target: []string{""}, - Timeout: timeout, - Refresh: refreshEksClusterStatus(conn, clusterName), - } - cluster, err := stateConf.WaitForState() - if err != nil { - if isAWSErr(err, eks.ErrCodeResourceNotFoundException, "") { - return nil - } - // Sometimes the EKS API returns the ResourceNotFound error in this form: - // ClientException: No cluster found for name: tf-acc-test-0o1f8 - if isAWSErr(err, eks.ErrCodeClientException, "No cluster found for name:") { - return nil - } - } - if cluster == nil { - return nil - } - return err -} - -func waitForUpdateEksCluster(conn *eks.EKS, clusterName, updateID string, timeout time.Duration) error { - stateConf := resource.StateChangeConf{ - Pending: []string{eks.UpdateStatusInProgress}, - Target: []string{ - eks.UpdateStatusCancelled, - eks.UpdateStatusFailed, - eks.UpdateStatusSuccessful, - }, - Timeout: timeout, - Refresh: refreshEksUpdateStatus(conn, clusterName, updateID), - } - updateRaw, err := stateConf.WaitForState() - - if err != nil { - return err - } - - update := updateRaw.(*eks.Update) - - if aws.StringValue(update.Status) == eks.UpdateStatusSuccessful { - return nil - } - - var detailedErrors []string - for i, updateError := range update.Errors { - detailedErrors = append(detailedErrors, fmt.Sprintf("Error %d: Code: %s / Message: %s", i+1, aws.StringValue(updateError.ErrorCode), aws.StringValue(updateError.ErrorMessage))) - } - - return fmt.Errorf("EKS Cluster (%s) update (%s) status (%s) not successful: Errors:\n%s", clusterName, updateID, aws.StringValue(update.Status), strings.Join(detailedErrors, "\n")) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application.go deleted file mode 100644 index 2966c26e1..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application.go +++ /dev/null @@ -1,280 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elasticbeanstalk" - "github.com/hashicorp/terraform/helper/resource" -) - -func resourceAwsElasticBeanstalkApplication() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElasticBeanstalkApplicationCreate, - Read: resourceAwsElasticBeanstalkApplicationRead, - Update: resourceAwsElasticBeanstalkApplicationUpdate, - Delete: resourceAwsElasticBeanstalkApplicationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: false, - }, - "appversion_lifecycle": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "service_role": { - Type: schema.TypeString, - Required: true, - }, - "max_age_in_days": { - Type: schema.TypeInt, - Optional: true, - }, - "max_count": { - Type: schema.TypeInt, - Optional: true, - }, - "delete_source_from_s3": { - Type: schema.TypeBool, - Optional: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsElasticBeanstalkApplicationCreate(d *schema.ResourceData, meta interface{}) error { - beanstalkConn := meta.(*AWSClient).elasticbeanstalkconn - - // Get the name and description - name := d.Get("name").(string) - description := d.Get("description").(string) - - log.Printf("[DEBUG] Elastic Beanstalk application create: %s, description: %s", name, description) - - req := &elasticbeanstalk.CreateApplicationInput{ - ApplicationName: aws.String(name), - Description: aws.String(description), - } - - app, err := beanstalkConn.CreateApplication(req) - if err != nil { - return err - } - - d.SetId(name) - - if err = resourceAwsElasticBeanstalkApplicationAppversionLifecycleUpdate(beanstalkConn, d, app.Application); err != nil { - return err - } - - return resourceAwsElasticBeanstalkApplicationRead(d, meta) -} - -func resourceAwsElasticBeanstalkApplicationUpdate(d *schema.ResourceData, meta interface{}) error { - beanstalkConn := meta.(*AWSClient).elasticbeanstalkconn - - if d.HasChange("description") { - if err := resourceAwsElasticBeanstalkApplicationDescriptionUpdate(beanstalkConn, d); err != nil { - return err - } - } - - if d.HasChange("appversion_lifecycle") { - if err := resourceAwsElasticBeanstalkApplicationAppversionLifecycleUpdate(beanstalkConn, d, nil); err != nil { - return err - } - } - - return resourceAwsElasticBeanstalkApplicationRead(d, meta) -} - -func resourceAwsElasticBeanstalkApplicationDescriptionUpdate(beanstalkConn *elasticbeanstalk.ElasticBeanstalk, d *schema.ResourceData) error { - name := d.Get("name").(string) - description := d.Get("description").(string) - - log.Printf("[DEBUG] Elastic Beanstalk application: %s, update description: %s", name, description) - - _, err := beanstalkConn.UpdateApplication(&elasticbeanstalk.UpdateApplicationInput{ - ApplicationName: aws.String(name), - Description: aws.String(description), - }) - - return err -} - -func resourceAwsElasticBeanstalkApplicationAppversionLifecycleUpdate(beanstalkConn *elasticbeanstalk.ElasticBeanstalk, d *schema.ResourceData, app *elasticbeanstalk.ApplicationDescription) error { - name := d.Get("name").(string) - appversion_lifecycles := d.Get("appversion_lifecycle").([]interface{}) - var appversion_lifecycle map[string]interface{} = nil - if len(appversion_lifecycles) == 1 { - appversion_lifecycle = appversion_lifecycles[0].(map[string]interface{}) - } - - if appversion_lifecycle == nil && app != nil && app.ResourceLifecycleConfig.ServiceRole == nil { - // We want appversion lifecycle management to be disabled, and it currently is, and there's no way to reproduce - // this state in a UpdateApplicationResourceLifecycle service call (fails w/ ServiceRole is not a valid arn). So, - // in this special case we just do nothing. - log.Printf("[DEBUG] Elastic Beanstalk application: %s, update appversion_lifecycle is anticipated no-op", name) - return nil - } - - log.Printf("[DEBUG] Elastic Beanstalk application: %s, update appversion_lifecycle: %v", name, appversion_lifecycle) - - rlc := &elasticbeanstalk.ApplicationResourceLifecycleConfig{ - ServiceRole: nil, - VersionLifecycleConfig: &elasticbeanstalk.ApplicationVersionLifecycleConfig{ - MaxCountRule: &elasticbeanstalk.MaxCountRule{ - Enabled: aws.Bool(false), - }, - MaxAgeRule: &elasticbeanstalk.MaxAgeRule{ - Enabled: aws.Bool(false), - }, - }, - } - - if appversion_lifecycle != nil { - service_role, ok := appversion_lifecycle["service_role"] - if ok { - rlc.ServiceRole = aws.String(service_role.(string)) - } - - rlc.VersionLifecycleConfig = &elasticbeanstalk.ApplicationVersionLifecycleConfig{ - MaxCountRule: &elasticbeanstalk.MaxCountRule{ - Enabled: aws.Bool(false), - }, - MaxAgeRule: &elasticbeanstalk.MaxAgeRule{ - Enabled: aws.Bool(false), - }, - } - - max_age_in_days, ok := appversion_lifecycle["max_age_in_days"] - if ok && max_age_in_days != 0 { - rlc.VersionLifecycleConfig.MaxAgeRule = &elasticbeanstalk.MaxAgeRule{ - Enabled: aws.Bool(true), - DeleteSourceFromS3: aws.Bool(appversion_lifecycle["delete_source_from_s3"].(bool)), - MaxAgeInDays: aws.Int64(int64(max_age_in_days.(int))), - } - } - - max_count, ok := appversion_lifecycle["max_count"] - if ok && max_count != 0 { - rlc.VersionLifecycleConfig.MaxCountRule = &elasticbeanstalk.MaxCountRule{ - Enabled: aws.Bool(true), - DeleteSourceFromS3: aws.Bool(appversion_lifecycle["delete_source_from_s3"].(bool)), - MaxCount: aws.Int64(int64(max_count.(int))), - } - } - } - - _, err := beanstalkConn.UpdateApplicationResourceLifecycle(&elasticbeanstalk.UpdateApplicationResourceLifecycleInput{ - ApplicationName: aws.String(name), - ResourceLifecycleConfig: rlc, - }) - - return err -} - -func resourceAwsElasticBeanstalkApplicationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - var app *elasticbeanstalk.ApplicationDescription - err := resource.Retry(30*time.Second, func() *resource.RetryError { - var err error - app, err = getBeanstalkApplication(d.Id(), conn) - if err != nil { - return resource.NonRetryableError(err) - } - - if app == nil { - err = fmt.Errorf("Elastic Beanstalk Application %q not found", d.Id()) - if d.IsNewResource() { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - if app == nil { - log.Printf("[WARN] %s, removing from state", err) - d.SetId("") - return nil - } - return err - } - - d.Set("name", app.ApplicationName) - d.Set("description", app.Description) - - if app.ResourceLifecycleConfig != nil { - d.Set("appversion_lifecycle", flattenResourceLifecycleConfig(app.ResourceLifecycleConfig)) - } - - return nil -} - -func resourceAwsElasticBeanstalkApplicationDelete(d *schema.ResourceData, meta interface{}) error { - beanstalkConn := meta.(*AWSClient).elasticbeanstalkconn - - _, err := beanstalkConn.DeleteApplication(&elasticbeanstalk.DeleteApplicationInput{ - ApplicationName: aws.String(d.Id()), - }) - if err != nil { - return err - } - - return resource.Retry(10*time.Second, func() *resource.RetryError { - app, err := getBeanstalkApplication(d.Id(), meta.(*AWSClient).elasticbeanstalkconn) - if err != nil { - return resource.NonRetryableError(err) - } - - if app != nil { - return resource.RetryableError( - fmt.Errorf("Beanstalk Application (%s) still exists: %s", d.Id(), err)) - } - return nil - }) -} - -func getBeanstalkApplication(id string, conn *elasticbeanstalk.ElasticBeanstalk) (*elasticbeanstalk.ApplicationDescription, error) { - resp, err := conn.DescribeApplications(&elasticbeanstalk.DescribeApplicationsInput{ - ApplicationNames: []*string{aws.String(id)}, - }) - if err != nil { - if isAWSErr(err, "InvalidBeanstalkAppID.NotFound", "") { - return nil, nil - } - return nil, err - } - - if len(resp.Applications) > 1 { - return nil, fmt.Errorf("Error %d Applications matched, expected 1", len(resp.Applications)) - } - - if len(resp.Applications) == 0 { - return nil, nil - } - - return resp.Applications[0], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application_version.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application_version.go deleted file mode 100644 index ffe4c13a3..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application_version.go +++ /dev/null @@ -1,200 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/elasticbeanstalk" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsElasticBeanstalkApplicationVersion() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElasticBeanstalkApplicationVersionCreate, - Read: resourceAwsElasticBeanstalkApplicationVersionRead, - Update: resourceAwsElasticBeanstalkApplicationVersionUpdate, - Delete: resourceAwsElasticBeanstalkApplicationVersionDelete, - - Schema: map[string]*schema.Schema{ - "application": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "bucket": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "key": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "force_delete": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - } -} - -func resourceAwsElasticBeanstalkApplicationVersionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - application := d.Get("application").(string) - description := d.Get("description").(string) - bucket := d.Get("bucket").(string) - key := d.Get("key").(string) - name := d.Get("name").(string) - - s3Location := elasticbeanstalk.S3Location{ - S3Bucket: aws.String(bucket), - S3Key: aws.String(key), - } - - createOpts := elasticbeanstalk.CreateApplicationVersionInput{ - ApplicationName: aws.String(application), - Description: aws.String(description), - SourceBundle: &s3Location, - VersionLabel: aws.String(name), - } - - log.Printf("[DEBUG] Elastic Beanstalk Application Version create opts: %s", createOpts) - _, err := conn.CreateApplicationVersion(&createOpts) - if err != nil { - return err - } - - d.SetId(name) - log.Printf("[INFO] Elastic Beanstalk Application Version Label: %s", name) - - return resourceAwsElasticBeanstalkApplicationVersionRead(d, meta) -} - -func resourceAwsElasticBeanstalkApplicationVersionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - resp, err := conn.DescribeApplicationVersions(&elasticbeanstalk.DescribeApplicationVersionsInput{ - ApplicationName: aws.String(d.Get("application").(string)), - VersionLabels: []*string{aws.String(d.Id())}, - }) - if err != nil { - return err - } - - if len(resp.ApplicationVersions) == 0 { - log.Printf("[DEBUG] Elastic Beanstalk application version read: application version not found") - - d.SetId("") - - return nil - } else if len(resp.ApplicationVersions) != 1 { - return fmt.Errorf("Error reading application version properties: found %d versions of label %q, expected 1", - len(resp.ApplicationVersions), d.Id()) - } - - if err := d.Set("description", resp.ApplicationVersions[0].Description); err != nil { - return err - } - - return nil -} - -func resourceAwsElasticBeanstalkApplicationVersionUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - if d.HasChange("description") { - if err := resourceAwsElasticBeanstalkApplicationVersionDescriptionUpdate(conn, d); err != nil { - return err - } - } - - return resourceAwsElasticBeanstalkApplicationVersionRead(d, meta) - -} - -func resourceAwsElasticBeanstalkApplicationVersionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - application := d.Get("application").(string) - name := d.Id() - - if !d.Get("force_delete").(bool) { - environments, err := versionUsedBy(application, name, conn) - if err != nil { - return err - } - - if len(environments) > 1 { - return fmt.Errorf("Unable to delete Application Version, it is currently in use by the following environments: %s.", environments) - } - } - _, err := conn.DeleteApplicationVersion(&elasticbeanstalk.DeleteApplicationVersionInput{ - ApplicationName: aws.String(application), - VersionLabel: aws.String(name), - DeleteSourceBundle: aws.Bool(false), - }) - - if err != nil { - if awserr, ok := err.(awserr.Error); ok { - // application version is pending delete, or no longer exists. - if awserr.Code() == "InvalidParameterValue" { - return nil - } - } - return err - } - - return nil -} - -func resourceAwsElasticBeanstalkApplicationVersionDescriptionUpdate(conn *elasticbeanstalk.ElasticBeanstalk, d *schema.ResourceData) error { - application := d.Get("application").(string) - description := d.Get("description").(string) - name := d.Get("name").(string) - - log.Printf("[DEBUG] Elastic Beanstalk application version: %s, update description: %s", name, description) - - _, err := conn.UpdateApplicationVersion(&elasticbeanstalk.UpdateApplicationVersionInput{ - ApplicationName: aws.String(application), - Description: aws.String(description), - VersionLabel: aws.String(name), - }) - - return err -} - -func versionUsedBy(applicationName, versionLabel string, conn *elasticbeanstalk.ElasticBeanstalk) ([]string, error) { - now := time.Now() - resp, err := conn.DescribeEnvironments(&elasticbeanstalk.DescribeEnvironmentsInput{ - ApplicationName: aws.String(applicationName), - VersionLabel: aws.String(versionLabel), - IncludeDeleted: aws.Bool(true), - IncludedDeletedBackTo: aws.Time(now.Add(-1 * time.Minute)), - }) - - if err != nil { - return nil, err - } - - var environmentIDs []string - for _, environment := range resp.Environments { - environmentIDs = append(environmentIDs, *environment.EnvironmentId) - } - - return environmentIDs, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_configuration_template.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_configuration_template.go deleted file mode 100644 index 6a3c66daa..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_configuration_template.go +++ /dev/null @@ -1,244 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/elasticbeanstalk" -) - -func resourceAwsElasticBeanstalkConfigurationTemplate() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElasticBeanstalkConfigurationTemplateCreate, - Read: resourceAwsElasticBeanstalkConfigurationTemplateRead, - Update: resourceAwsElasticBeanstalkConfigurationTemplateUpdate, - Delete: resourceAwsElasticBeanstalkConfigurationTemplateDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "application": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "environment_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "setting": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: resourceAwsElasticBeanstalkOptionSetting(), - Set: optionSettingValueHash, - }, - "solution_stack_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsElasticBeanstalkConfigurationTemplateCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - // Get the relevant properties - name := d.Get("name").(string) - appName := d.Get("application").(string) - - optionSettings := gatherOptionSettings(d) - - opts := elasticbeanstalk.CreateConfigurationTemplateInput{ - ApplicationName: aws.String(appName), - TemplateName: aws.String(name), - OptionSettings: optionSettings, - } - - if attr, ok := d.GetOk("description"); ok { - opts.Description = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("environment_id"); ok { - opts.EnvironmentId = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("solution_stack_name"); ok { - opts.SolutionStackName = aws.String(attr.(string)) - } - - log.Printf("[DEBUG] Elastic Beanstalk configuration template create opts: %s", opts) - if _, err := conn.CreateConfigurationTemplate(&opts); err != nil { - return fmt.Errorf("Error creating Elastic Beanstalk configuration template: %s", err) - } - - d.SetId(name) - - return resourceAwsElasticBeanstalkConfigurationTemplateRead(d, meta) -} - -func resourceAwsElasticBeanstalkConfigurationTemplateRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - log.Printf("[DEBUG] Elastic Beanstalk configuration template read: %s", d.Get("name").(string)) - - resp, err := conn.DescribeConfigurationSettings(&elasticbeanstalk.DescribeConfigurationSettingsInput{ - TemplateName: aws.String(d.Id()), - ApplicationName: aws.String(d.Get("application").(string)), - }) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "InvalidParameterValue" && strings.Contains(awsErr.Message(), "No Configuration Template named") { - log.Printf("[WARN] No Configuration Template named (%s) found", d.Id()) - d.SetId("") - return nil - } else if awsErr.Code() == "InvalidParameterValue" && strings.Contains(awsErr.Message(), "No Platform named") { - log.Printf("[WARN] No Platform named (%s) found", d.Get("solution_stack_name").(string)) - d.SetId("") - return nil - } - } - return err - } - - if len(resp.ConfigurationSettings) != 1 { - log.Printf("[DEBUG] Elastic Beanstalk unexpected describe configuration template response: %+v", resp) - return fmt.Errorf("Error reading application properties: found %d applications, expected 1", len(resp.ConfigurationSettings)) - } - - d.Set("description", resp.ConfigurationSettings[0].Description) - return nil -} - -func resourceAwsElasticBeanstalkConfigurationTemplateUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - log.Printf("[DEBUG] Elastic Beanstalk configuration template update: %s", d.Get("name").(string)) - - if d.HasChange("description") { - if err := resourceAwsElasticBeanstalkConfigurationTemplateDescriptionUpdate(conn, d); err != nil { - return err - } - } - - if d.HasChange("setting") { - if err := resourceAwsElasticBeanstalkConfigurationTemplateOptionSettingsUpdate(conn, d); err != nil { - return err - } - } - - return resourceAwsElasticBeanstalkConfigurationTemplateRead(d, meta) -} - -func resourceAwsElasticBeanstalkConfigurationTemplateDescriptionUpdate(conn *elasticbeanstalk.ElasticBeanstalk, d *schema.ResourceData) error { - _, err := conn.UpdateConfigurationTemplate(&elasticbeanstalk.UpdateConfigurationTemplateInput{ - ApplicationName: aws.String(d.Get("application").(string)), - TemplateName: aws.String(d.Get("name").(string)), - Description: aws.String(d.Get("description").(string)), - }) - - return err -} - -func resourceAwsElasticBeanstalkConfigurationTemplateOptionSettingsUpdate(conn *elasticbeanstalk.ElasticBeanstalk, d *schema.ResourceData) error { - if d.HasChange("setting") { - _, err := conn.ValidateConfigurationSettings(&elasticbeanstalk.ValidateConfigurationSettingsInput{ - ApplicationName: aws.String(d.Get("application").(string)), - TemplateName: aws.String(d.Get("name").(string)), - OptionSettings: gatherOptionSettings(d), - }) - if err != nil { - return err - } - - o, n := d.GetChange("setting") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - rm := extractOptionSettings(os.Difference(ns)) - add := extractOptionSettings(ns.Difference(os)) - - // Additions and removals of options are done in a single API call, so we - // can't do our normal "remove these" and then later "add these", re-adding - // any updated settings. - // Because of this, we need to remove any settings in the "removable" - // settings that are also found in the "add" settings, otherwise they - // conflict. Here we loop through all the initial removables from the set - // difference, and we build up a slice of settings not found in the "add" - // set - var remove []*elasticbeanstalk.ConfigurationOptionSetting - for _, r := range rm { - for _, a := range add { - if *r.Namespace == *a.Namespace && *r.OptionName == *a.OptionName { - continue - } - remove = append(remove, r) - } - } - - req := &elasticbeanstalk.UpdateConfigurationTemplateInput{ - ApplicationName: aws.String(d.Get("application").(string)), - TemplateName: aws.String(d.Get("name").(string)), - OptionSettings: add, - } - - for _, elem := range remove { - req.OptionsToRemove = append(req.OptionsToRemove, &elasticbeanstalk.OptionSpecification{ - Namespace: elem.Namespace, - OptionName: elem.OptionName, - }) - } - - log.Printf("[DEBUG] Update Configuration Template request: %s", req) - if _, err := conn.UpdateConfigurationTemplate(req); err != nil { - return err - } - } - - return nil -} - -func resourceAwsElasticBeanstalkConfigurationTemplateDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - application := d.Get("application").(string) - - _, err := conn.DeleteConfigurationTemplate(&elasticbeanstalk.DeleteConfigurationTemplateInput{ - ApplicationName: aws.String(application), - TemplateName: aws.String(d.Id()), - }) - - return err -} - -func gatherOptionSettings(d *schema.ResourceData) []*elasticbeanstalk.ConfigurationOptionSetting { - optionSettingsSet, ok := d.Get("setting").(*schema.Set) - if !ok || optionSettingsSet == nil { - optionSettingsSet = new(schema.Set) - } - - return extractOptionSettings(optionSettingsSet) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment.go deleted file mode 100644 index ae7ae16d5..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment.go +++ /dev/null @@ -1,1013 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "sort" - "strings" - "time" - - "github.com/hashicorp/go-multierror" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/aws/aws-sdk-go/service/elasticbeanstalk" - "github.com/hashicorp/terraform/helper/structure" -) - -func resourceAwsElasticBeanstalkOptionSetting() *schema.Resource { - return &schema.Resource{ - Schema: map[string]*schema.Schema{ - "namespace": { - Type: schema.TypeString, - Required: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - "resource": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsElasticBeanstalkEnvironment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElasticBeanstalkEnvironmentCreate, - Read: resourceAwsElasticBeanstalkEnvironmentRead, - Update: resourceAwsElasticBeanstalkEnvironmentUpdate, - Delete: resourceAwsElasticBeanstalkEnvironmentDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - SchemaVersion: 1, - MigrateState: resourceAwsElasticBeanstalkEnvironmentMigrateState, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "application": { - Type: schema.TypeString, - Required: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "version_label": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "cname": { - Type: schema.TypeString, - Computed: true, - }, - "cname_prefix": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - }, - "tier": { - Type: schema.TypeString, - Optional: true, - Default: "WebServer", - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - switch value { - case - "Worker", - "WebServer": - return - } - errors = append(errors, fmt.Errorf("%s is not a valid tier. Valid options are WebServer or Worker", value)) - return - }, - ForceNew: true, - }, - "setting": { - Type: schema.TypeSet, - Optional: true, - Elem: resourceAwsElasticBeanstalkOptionSetting(), - Set: optionSettingValueHash, - }, - "all_settings": { - Type: schema.TypeSet, - Computed: true, - Elem: resourceAwsElasticBeanstalkOptionSetting(), - Set: optionSettingValueHash, - }, - "solution_stack_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ConflictsWith: []string{"platform_arn", "template_name"}, - }, - "platform_arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ConflictsWith: []string{"solution_stack_name", "template_name"}, - }, - "template_name": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"solution_stack_name", "platform_arn"}, - }, - "wait_for_ready_timeout": { - Type: schema.TypeString, - Optional: true, - Default: "20m", - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - duration, err := time.ParseDuration(value) - if err != nil { - errors = append(errors, fmt.Errorf( - "%q cannot be parsed as a duration: %s", k, err)) - } - if duration < 0 { - errors = append(errors, fmt.Errorf( - "%q must be greater than zero", k)) - } - return - }, - }, - "poll_interval": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - duration, err := time.ParseDuration(value) - if err != nil { - errors = append(errors, fmt.Errorf( - "%q cannot be parsed as a duration: %s", k, err)) - } - if duration < 10*time.Second || duration > 60*time.Second { - errors = append(errors, fmt.Errorf( - "%q must be between 10s and 180s", k)) - } - return - }, - }, - "autoscaling_groups": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "instances": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "launch_configurations": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "load_balancers": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "queues": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "triggers": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsElasticBeanstalkEnvironmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - // Get values from config - name := d.Get("name").(string) - cnamePrefix := d.Get("cname_prefix").(string) - tier := d.Get("tier").(string) - app := d.Get("application").(string) - desc := d.Get("description").(string) - version := d.Get("version_label").(string) - settings := d.Get("setting").(*schema.Set) - solutionStack := d.Get("solution_stack_name").(string) - platformArn := d.Get("platform_arn").(string) - templateName := d.Get("template_name").(string) - - // TODO set tags - // Note: at time of writing, you cannot view or edit Tags after creation - // d.Set("tags", tagsToMap(instance.Tags)) - createOpts := elasticbeanstalk.CreateEnvironmentInput{ - EnvironmentName: aws.String(name), - ApplicationName: aws.String(app), - OptionSettings: extractOptionSettings(settings), - Tags: tagsFromMapBeanstalk(d.Get("tags").(map[string]interface{})), - } - - if desc != "" { - createOpts.Description = aws.String(desc) - } - - if cnamePrefix != "" { - if tier != "WebServer" { - return fmt.Errorf("Cannot set cname_prefix for tier: %s.", tier) - } - createOpts.CNAMEPrefix = aws.String(cnamePrefix) - } - - if tier != "" { - var tierType string - - switch tier { - case "WebServer": - tierType = "Standard" - case "Worker": - tierType = "SQS/HTTP" - } - environmentTier := elasticbeanstalk.EnvironmentTier{ - Name: aws.String(tier), - Type: aws.String(tierType), - } - createOpts.Tier = &environmentTier - } - - if solutionStack != "" { - createOpts.SolutionStackName = aws.String(solutionStack) - } - - if platformArn != "" { - createOpts.PlatformArn = aws.String(platformArn) - } - - if templateName != "" { - createOpts.TemplateName = aws.String(templateName) - } - - if version != "" { - createOpts.VersionLabel = aws.String(version) - } - - // Get the current time to filter getBeanstalkEnvironmentErrors messages - t := time.Now() - log.Printf("[DEBUG] Elastic Beanstalk Environment create opts: %s", createOpts) - resp, err := conn.CreateEnvironment(&createOpts) - if err != nil { - return err - } - - // Assign the application name as the resource ID - d.SetId(*resp.EnvironmentId) - - waitForReadyTimeOut, err := time.ParseDuration(d.Get("wait_for_ready_timeout").(string)) - if err != nil { - return err - } - - pollInterval, err := time.ParseDuration(d.Get("poll_interval").(string)) - if err != nil { - pollInterval = 0 - log.Printf("[WARN] Error parsing poll_interval, using default backoff") - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"Launching", "Updating"}, - Target: []string{"Ready"}, - Refresh: environmentStateRefreshFunc(conn, d.Id(), t), - Timeout: waitForReadyTimeOut, - Delay: 10 * time.Second, - PollInterval: pollInterval, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Elastic Beanstalk Environment (%s) to become ready: %s", - d.Id(), err) - } - - envErrors, err := getBeanstalkEnvironmentErrors(conn, d.Id(), t) - if err != nil { - return err - } - if envErrors != nil { - return envErrors - } - - return resourceAwsElasticBeanstalkEnvironmentRead(d, meta) -} - -func resourceAwsElasticBeanstalkEnvironmentUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - envId := d.Id() - - var hasChange bool - - updateOpts := elasticbeanstalk.UpdateEnvironmentInput{ - EnvironmentId: aws.String(envId), - } - - if d.HasChange("description") { - hasChange = true - updateOpts.Description = aws.String(d.Get("description").(string)) - } - - if d.HasChange("solution_stack_name") { - hasChange = true - if v, ok := d.GetOk("solution_stack_name"); ok { - updateOpts.SolutionStackName = aws.String(v.(string)) - } - } - - if d.HasChange("setting") { - hasChange = true - o, n := d.GetChange("setting") - if o == nil { - o = &schema.Set{F: optionSettingValueHash} - } - if n == nil { - n = &schema.Set{F: optionSettingValueHash} - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - rm := extractOptionSettings(os.Difference(ns)) - add := extractOptionSettings(ns.Difference(os)) - - // Additions and removals of options are done in a single API call, so we - // can't do our normal "remove these" and then later "add these", re-adding - // any updated settings. - // Because of this, we need to exclude any settings in the "removable" - // settings that are also found in the "add" settings, otherwise they - // conflict. Here we loop through all the initial removables from the set - // difference, and create a new slice `remove` that contains those settings - // found in `rm` but not in `add` - var remove []*elasticbeanstalk.ConfigurationOptionSetting - if len(add) > 0 { - for _, r := range rm { - var update = false - for _, a := range add { - // ResourceNames are optional. Some defaults come with it, some do - // not. We need to guard against nil/empty in state as well as - // nil/empty from the API - if a.ResourceName != nil { - if r.ResourceName == nil { - continue - } - if *r.ResourceName != *a.ResourceName { - continue - } - } - if *r.Namespace == *a.Namespace && *r.OptionName == *a.OptionName { - log.Printf("[DEBUG] Updating Beanstalk setting (%s::%s) \"%s\" => \"%s\"", *a.Namespace, *a.OptionName, *r.Value, *a.Value) - update = true - break - } - } - // Only remove options that are not updates - if !update { - remove = append(remove, r) - } - } - } else { - remove = rm - } - - for _, elem := range remove { - updateOpts.OptionsToRemove = append(updateOpts.OptionsToRemove, &elasticbeanstalk.OptionSpecification{ - Namespace: elem.Namespace, - OptionName: elem.OptionName, - }) - } - - updateOpts.OptionSettings = add - } - - if d.HasChange("platform_arn") { - hasChange = true - if v, ok := d.GetOk("platform_arn"); ok { - updateOpts.PlatformArn = aws.String(v.(string)) - } - } - - if d.HasChange("template_name") { - hasChange = true - if v, ok := d.GetOk("template_name"); ok { - updateOpts.TemplateName = aws.String(v.(string)) - } - } - - if d.HasChange("version_label") { - hasChange = true - updateOpts.VersionLabel = aws.String(d.Get("version_label").(string)) - } - - if hasChange { - // Get the current time to filter getBeanstalkEnvironmentErrors messages - t := time.Now() - log.Printf("[DEBUG] Elastic Beanstalk Environment update opts: %s", updateOpts) - _, err := conn.UpdateEnvironment(&updateOpts) - if err != nil { - return err - } - - waitForReadyTimeOut, err := time.ParseDuration(d.Get("wait_for_ready_timeout").(string)) - if err != nil { - return err - } - pollInterval, err := time.ParseDuration(d.Get("poll_interval").(string)) - if err != nil { - pollInterval = 0 - log.Printf("[WARN] Error parsing poll_interval, using default backoff") - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"Launching", "Updating"}, - Target: []string{"Ready"}, - Refresh: environmentStateRefreshFunc(conn, d.Id(), t), - Timeout: waitForReadyTimeOut, - Delay: 10 * time.Second, - PollInterval: pollInterval, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Elastic Beanstalk Environment (%s) to become ready: %s", - d.Id(), err) - } - - envErrors, err := getBeanstalkEnvironmentErrors(conn, d.Id(), t) - if err != nil { - return err - } - if envErrors != nil { - return envErrors - } - } - - if d.HasChange("tags") { - o, n := d.GetChange("tags") - oldTags := tagsFromMapBeanstalk(o.(map[string]interface{})) - newTags := tagsFromMapBeanstalk(n.(map[string]interface{})) - - tagsToAdd, tagNamesToRemove := diffTagsBeanstalk(oldTags, newTags) - - updateTags := elasticbeanstalk.UpdateTagsForResourceInput{ - ResourceArn: aws.String(d.Get("arn").(string)), - TagsToAdd: tagsToAdd, - TagsToRemove: tagNamesToRemove, - } - - // Get the current time to filter getBeanstalkEnvironmentErrors messages - t := time.Now() - log.Printf("[DEBUG] Elastic Beanstalk Environment update tags: %s", updateTags) - _, err := conn.UpdateTagsForResource(&updateTags) - if err != nil { - return err - } - - waitForReadyTimeOut, err := time.ParseDuration(d.Get("wait_for_ready_timeout").(string)) - if err != nil { - return err - } - pollInterval, err := time.ParseDuration(d.Get("poll_interval").(string)) - if err != nil { - pollInterval = 0 - log.Printf("[WARN] Error parsing poll_interval, using default backoff") - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"Launching", "Updating"}, - Target: []string{"Ready"}, - Refresh: environmentStateRefreshFunc(conn, d.Id(), t), - Timeout: waitForReadyTimeOut, - Delay: 10 * time.Second, - PollInterval: pollInterval, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Elastic Beanstalk Environment (%s) to become ready: %s", - d.Id(), err) - } - - envErrors, err := getBeanstalkEnvironmentErrors(conn, d.Id(), t) - if err != nil { - return err - } - if envErrors != nil { - return envErrors - } - } - - return resourceAwsElasticBeanstalkEnvironmentRead(d, meta) -} - -func resourceAwsElasticBeanstalkEnvironmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - envId := d.Id() - - log.Printf("[DEBUG] Elastic Beanstalk environment read %s: id %s", d.Get("name").(string), d.Id()) - - resp, err := conn.DescribeEnvironments(&elasticbeanstalk.DescribeEnvironmentsInput{ - EnvironmentIds: []*string{aws.String(envId)}, - }) - - if err != nil { - return err - } - - if len(resp.Environments) == 0 { - log.Printf("[DEBUG] Elastic Beanstalk environment properties: could not find environment %s", d.Id()) - - d.SetId("") - return nil - } else if len(resp.Environments) != 1 { - return fmt.Errorf("Error reading application properties: found %d environments, expected 1", len(resp.Environments)) - } - - env := resp.Environments[0] - - if *env.Status == "Terminated" { - log.Printf("[DEBUG] Elastic Beanstalk environment %s was terminated", d.Id()) - - d.SetId("") - return nil - } - - resources, err := conn.DescribeEnvironmentResources(&elasticbeanstalk.DescribeEnvironmentResourcesInput{ - EnvironmentId: aws.String(envId), - }) - - if err != nil { - return err - } - - d.Set("arn", env.EnvironmentArn) - - if err := d.Set("name", env.EnvironmentName); err != nil { - return err - } - - if err := d.Set("application", env.ApplicationName); err != nil { - return err - } - - if err := d.Set("description", env.Description); err != nil { - return err - } - - if err := d.Set("cname", env.CNAME); err != nil { - return err - } - - if err := d.Set("version_label", env.VersionLabel); err != nil { - return err - } - - if err := d.Set("tier", *env.Tier.Name); err != nil { - return err - } - - if env.CNAME != nil { - beanstalkCnamePrefixRegexp := regexp.MustCompile(`(^[^.]+)(.\w{2}-\w{4,9}-\d)?.(elasticbeanstalk.com|eb.amazonaws.com.cn)$`) - var cnamePrefix string - cnamePrefixMatch := beanstalkCnamePrefixRegexp.FindStringSubmatch(*env.CNAME) - - if cnamePrefixMatch == nil { - cnamePrefix = "" - } else { - cnamePrefix = cnamePrefixMatch[1] - } - - if err := d.Set("cname_prefix", cnamePrefix); err != nil { - return err - } - } else { - if err := d.Set("cname_prefix", ""); err != nil { - return err - } - } - - if err := d.Set("solution_stack_name", env.SolutionStackName); err != nil { - return err - } - - if err := d.Set("platform_arn", env.PlatformArn); err != nil { - return err - } - - if err := d.Set("autoscaling_groups", flattenBeanstalkAsg(resources.EnvironmentResources.AutoScalingGroups)); err != nil { - return err - } - - if err := d.Set("instances", flattenBeanstalkInstances(resources.EnvironmentResources.Instances)); err != nil { - return err - } - if err := d.Set("launch_configurations", flattenBeanstalkLc(resources.EnvironmentResources.LaunchConfigurations)); err != nil { - return err - } - if err := d.Set("load_balancers", flattenBeanstalkElb(resources.EnvironmentResources.LoadBalancers)); err != nil { - return err - } - if err := d.Set("queues", flattenBeanstalkSqs(resources.EnvironmentResources.Queues)); err != nil { - return err - } - if err := d.Set("triggers", flattenBeanstalkTrigger(resources.EnvironmentResources.Triggers)); err != nil { - return err - } - - tags, err := conn.ListTagsForResource(&elasticbeanstalk.ListTagsForResourceInput{ - ResourceArn: aws.String(d.Get("arn").(string)), - }) - - if err != nil { - return err - } - - if err := d.Set("tags", tagsToMapBeanstalk(tags.ResourceTags)); err != nil { - return err - } - - return resourceAwsElasticBeanstalkEnvironmentSettingsRead(d, meta) -} - -func fetchAwsElasticBeanstalkEnvironmentSettings(d *schema.ResourceData, meta interface{}) (*schema.Set, error) { - conn := meta.(*AWSClient).elasticbeanstalkconn - - app := d.Get("application").(string) - name := d.Get("name").(string) - - resp, err := conn.DescribeConfigurationSettings(&elasticbeanstalk.DescribeConfigurationSettingsInput{ - ApplicationName: aws.String(app), - EnvironmentName: aws.String(name), - }) - - if err != nil { - return nil, err - } - - if len(resp.ConfigurationSettings) != 1 { - return nil, fmt.Errorf("Error reading environment settings: received %d settings groups, expected 1", len(resp.ConfigurationSettings)) - } - - settings := &schema.Set{F: optionSettingValueHash} - for _, optionSetting := range resp.ConfigurationSettings[0].OptionSettings { - m := map[string]interface{}{} - - if optionSetting.Namespace != nil { - m["namespace"] = *optionSetting.Namespace - } else { - return nil, fmt.Errorf("Error reading environment settings: option setting with no namespace: %v", optionSetting) - } - - if optionSetting.OptionName != nil { - m["name"] = *optionSetting.OptionName - } else { - return nil, fmt.Errorf("Error reading environment settings: option setting with no name: %v", optionSetting) - } - - if *optionSetting.Namespace == "aws:autoscaling:scheduledaction" && optionSetting.ResourceName != nil { - m["resource"] = *optionSetting.ResourceName - } - - if optionSetting.Value != nil { - switch *optionSetting.OptionName { - case "SecurityGroups": - m["value"] = dropGeneratedSecurityGroup(*optionSetting.Value, meta) - case "Subnets", "ELBSubnets": - m["value"] = sortValues(*optionSetting.Value) - default: - m["value"] = *optionSetting.Value - } - } - - settings.Add(m) - } - - return settings, nil -} - -func resourceAwsElasticBeanstalkEnvironmentSettingsRead(d *schema.ResourceData, meta interface{}) error { - log.Printf("[DEBUG] Elastic Beanstalk environment settings read %s: id %s", d.Get("name").(string), d.Id()) - - allSettings, err := fetchAwsElasticBeanstalkEnvironmentSettings(d, meta) - if err != nil { - return err - } - - settings := d.Get("setting").(*schema.Set) - - log.Printf("[DEBUG] Elastic Beanstalk allSettings: %s", allSettings.GoString()) - log.Printf("[DEBUG] Elastic Beanstalk settings: %s", settings.GoString()) - - // perform the set operation with only name/namespace as keys, excluding value - // this is so we override things in the settings resource data key with updated values - // from the api. we skip values we didn't know about before because there are so many - // defaults set by the eb api that we would delete many useful defaults. - // - // there is likely a better way to do this - allSettingsKeySet := schema.NewSet(optionSettingKeyHash, allSettings.List()) - settingsKeySet := schema.NewSet(optionSettingKeyHash, settings.List()) - updatedSettingsKeySet := allSettingsKeySet.Intersection(settingsKeySet) - - log.Printf("[DEBUG] Elastic Beanstalk updatedSettingsKeySet: %s", updatedSettingsKeySet.GoString()) - - updatedSettings := schema.NewSet(optionSettingValueHash, updatedSettingsKeySet.List()) - - log.Printf("[DEBUG] Elastic Beanstalk updatedSettings: %s", updatedSettings.GoString()) - - if err := d.Set("all_settings", allSettings.List()); err != nil { - return err - } - - if err := d.Set("setting", updatedSettings.List()); err != nil { - return err - } - - return nil -} - -func resourceAwsElasticBeanstalkEnvironmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticbeanstalkconn - - opts := elasticbeanstalk.TerminateEnvironmentInput{ - EnvironmentId: aws.String(d.Id()), - TerminateResources: aws.Bool(true), - } - - // Get the current time to filter getBeanstalkEnvironmentErrors messages - t := time.Now() - log.Printf("[DEBUG] Elastic Beanstalk Environment terminate opts: %s", opts) - _, err := conn.TerminateEnvironment(&opts) - - if err != nil { - return err - } - - waitForReadyTimeOut, err := time.ParseDuration(d.Get("wait_for_ready_timeout").(string)) - if err != nil { - return err - } - pollInterval, err := time.ParseDuration(d.Get("poll_interval").(string)) - if err != nil { - pollInterval = 0 - log.Printf("[WARN] Error parsing poll_interval, using default backoff") - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"Terminating"}, - Target: []string{"Terminated"}, - Refresh: environmentStateRefreshFunc(conn, d.Id(), t), - Timeout: waitForReadyTimeOut, - Delay: 10 * time.Second, - PollInterval: pollInterval, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Elastic Beanstalk Environment (%s) to become terminated: %s", - d.Id(), err) - } - - envErrors, err := getBeanstalkEnvironmentErrors(conn, d.Id(), t) - if err != nil { - return err - } - if envErrors != nil { - return envErrors - } - - return nil -} - -// environmentStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// the creation of the Beanstalk Environment -func environmentStateRefreshFunc(conn *elasticbeanstalk.ElasticBeanstalk, environmentId string, t time.Time) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeEnvironments(&elasticbeanstalk.DescribeEnvironmentsInput{ - EnvironmentIds: []*string{aws.String(environmentId)}, - }) - if err != nil { - log.Printf("[Err] Error waiting for Elastic Beanstalk Environment state: %s", err) - return -1, "failed", fmt.Errorf("Error waiting for Elastic Beanstalk Environment state: %s", err) - } - - if resp == nil || len(resp.Environments) == 0 { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - var env *elasticbeanstalk.EnvironmentDescription - for _, e := range resp.Environments { - if environmentId == *e.EnvironmentId { - env = e - } - } - - if env == nil { - return -1, "failed", fmt.Errorf("Error finding Elastic Beanstalk Environment, environment not found") - } - - envErrors, err := getBeanstalkEnvironmentErrors(conn, environmentId, t) - if err != nil { - return -1, "failed", err - } - if envErrors != nil { - return -1, "failed", envErrors - } - - return env, *env.Status, nil - } -} - -// we use the following two functions to allow us to split out defaults -// as they become overridden from within the template -func optionSettingValueHash(v interface{}) int { - rd := v.(map[string]interface{}) - namespace := rd["namespace"].(string) - optionName := rd["name"].(string) - var resourceName string - if v, ok := rd["resource"].(string); ok { - resourceName = v - } - value, _ := rd["value"].(string) - value, _ = structure.NormalizeJsonString(value) - hk := fmt.Sprintf("%s:%s%s=%s", namespace, optionName, resourceName, sortValues(value)) - log.Printf("[DEBUG] Elastic Beanstalk optionSettingValueHash(%#v): %s: hk=%s,hc=%d", v, optionName, hk, hashcode.String(hk)) - return hashcode.String(hk) -} - -func optionSettingKeyHash(v interface{}) int { - rd := v.(map[string]interface{}) - namespace := rd["namespace"].(string) - optionName := rd["name"].(string) - var resourceName string - if v, ok := rd["resource"].(string); ok { - resourceName = v - } - hk := fmt.Sprintf("%s:%s%s", namespace, optionName, resourceName) - log.Printf("[DEBUG] Elastic Beanstalk optionSettingKeyHash(%#v): %s: hk=%s,hc=%d", v, optionName, hk, hashcode.String(hk)) - return hashcode.String(hk) -} - -func sortValues(v string) string { - values := strings.Split(v, ",") - sort.Strings(values) - return strings.Join(values, ",") -} - -func extractOptionSettings(s *schema.Set) []*elasticbeanstalk.ConfigurationOptionSetting { - settings := []*elasticbeanstalk.ConfigurationOptionSetting{} - - if s != nil { - for _, setting := range s.List() { - optionSetting := elasticbeanstalk.ConfigurationOptionSetting{ - Namespace: aws.String(setting.(map[string]interface{})["namespace"].(string)), - OptionName: aws.String(setting.(map[string]interface{})["name"].(string)), - Value: aws.String(setting.(map[string]interface{})["value"].(string)), - } - if *optionSetting.Namespace == "aws:autoscaling:scheduledaction" { - if v, ok := setting.(map[string]interface{})["resource"].(string); ok && v != "" { - optionSetting.ResourceName = aws.String(v) - } - } - settings = append(settings, &optionSetting) - } - } - - return settings -} - -func dropGeneratedSecurityGroup(settingValue string, meta interface{}) string { - conn := meta.(*AWSClient).ec2conn - - groups := strings.Split(settingValue, ",") - - // Check to see if groups are ec2-classic or vpc security groups - ec2Classic := true - beanstalkSGRegexp := "sg-[0-9a-fA-F]{8}" - for _, g := range groups { - if ok, _ := regexp.MatchString(beanstalkSGRegexp, g); ok { - ec2Classic = false - break - } - } - - var resp *ec2.DescribeSecurityGroupsOutput - var err error - - if ec2Classic { - resp, err = conn.DescribeSecurityGroups(&ec2.DescribeSecurityGroupsInput{ - GroupNames: aws.StringSlice(groups), - }) - } else { - resp, err = conn.DescribeSecurityGroups(&ec2.DescribeSecurityGroupsInput{ - GroupIds: aws.StringSlice(groups), - }) - } - - if err != nil { - log.Printf("[DEBUG] Elastic Beanstalk error describing SecurityGroups: %v", err) - return settingValue - } - - log.Printf("[DEBUG] Elastic Beanstalk using ec2-classic security-groups: %t", ec2Classic) - var legitGroups []string - for _, group := range resp.SecurityGroups { - log.Printf("[DEBUG] Elastic Beanstalk SecurityGroup: %v", *group.GroupName) - if !strings.HasPrefix(*group.GroupName, "awseb") { - if ec2Classic { - legitGroups = append(legitGroups, *group.GroupName) - } else { - legitGroups = append(legitGroups, *group.GroupId) - } - } - } - - sort.Strings(legitGroups) - - return strings.Join(legitGroups, ",") -} - -type beanstalkEnvironmentError struct { - eventDate *time.Time - environmentID string - message *string -} - -func (e beanstalkEnvironmentError) Error() string { - return e.eventDate.String() + " (" + e.environmentID + ") : " + *e.message -} - -type beanstalkEnvironmentErrors []*beanstalkEnvironmentError - -func (e beanstalkEnvironmentErrors) Len() int { return len(e) } -func (e beanstalkEnvironmentErrors) Swap(i, j int) { e[i], e[j] = e[j], e[i] } -func (e beanstalkEnvironmentErrors) Less(i, j int) bool { return e[i].eventDate.Before(*e[j].eventDate) } - -func getBeanstalkEnvironmentErrors(conn *elasticbeanstalk.ElasticBeanstalk, environmentId string, t time.Time) (*multierror.Error, error) { - environmentErrors, err := conn.DescribeEvents(&elasticbeanstalk.DescribeEventsInput{ - EnvironmentId: aws.String(environmentId), - Severity: aws.String("ERROR"), - StartTime: aws.Time(t), - }) - - if err != nil { - return nil, fmt.Errorf("Unable to get Elastic Beanstalk Evironment events: %s", err) - } - - var events beanstalkEnvironmentErrors - for _, event := range environmentErrors.Events { - e := &beanstalkEnvironmentError{ - eventDate: event.EventDate, - environmentID: environmentId, - message: event.Message, - } - events = append(events, e) - } - sort.Sort(events) - - var result *multierror.Error - for _, event := range events { - result = multierror.Append(result, event) - } - - return result, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment_migrate.go deleted file mode 100644 index 31cd5c777..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment_migrate.go +++ /dev/null @@ -1,35 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsElasticBeanstalkEnvironmentMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS Elastic Beanstalk Environment State v0; migrating to v1") - return migrateBeanstalkEnvironmentStateV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateBeanstalkEnvironmentStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() || is.Attributes == nil { - log.Println("[DEBUG] Empty Elastic Beanstalk Environment State; nothing to migrate.") - return is, nil - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - - if is.Attributes["tier"] == "" { - is.Attributes["tier"] = "WebServer" - } - - log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) - return is, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_pipeline.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_pipeline.go deleted file mode 100644 index 0947ea92b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_pipeline.go +++ /dev/null @@ -1,491 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/elastictranscoder" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsElasticTranscoderPipeline() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElasticTranscoderPipelineCreate, - Read: resourceAwsElasticTranscoderPipelineRead, - Update: resourceAwsElasticTranscoderPipelineUpdate, - Delete: resourceAwsElasticTranscoderPipelineDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "aws_kms_key_arn": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - - // ContentConfig also requires ThumbnailConfig - "content_config": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - // elastictranscoder.PipelineOutputConfig - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Optional: true, - // AWS may insert the bucket name here taken from output_bucket - Computed: true, - }, - "storage_class": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "content_config_permissions": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "access": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "grantee": { - Type: schema.TypeString, - Optional: true, - }, - "grantee_type": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "input_bucket": { - Type: schema.TypeString, - Required: true, - }, - - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[.0-9A-Za-z-_]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters, hyphens, underscores, and periods allowed in %q", k)) - } - if len(value) > 40 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 40 characters", k)) - } - return - }, - }, - - "notifications": { - Type: schema.TypeSet, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "completed": { - Type: schema.TypeString, - Optional: true, - }, - "error": { - Type: schema.TypeString, - Optional: true, - }, - "progressing": { - Type: schema.TypeString, - Optional: true, - }, - "warning": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - // The output_bucket must be set, or both of content_config.bucket - // and thumbnail_config.bucket. - // This is set as Computed, because the API may or may not return - // this as set based on the other 2 configurations. - "output_bucket": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "role": { - Type: schema.TypeString, - Required: true, - }, - - "thumbnail_config": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - // elastictranscoder.PipelineOutputConfig - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Optional: true, - // AWS may insert the bucket name here taken from output_bucket - Computed: true, - }, - "storage_class": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "thumbnail_config_permissions": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "access": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "grantee": { - Type: schema.TypeString, - Optional: true, - }, - "grantee_type": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsElasticTranscoderPipelineCreate(d *schema.ResourceData, meta interface{}) error { - elastictranscoderconn := meta.(*AWSClient).elastictranscoderconn - - req := &elastictranscoder.CreatePipelineInput{ - AwsKmsKeyArn: getStringPtr(d, "aws_kms_key_arn"), - ContentConfig: expandETPiplineOutputConfig(d, "content_config"), - InputBucket: aws.String(d.Get("input_bucket").(string)), - Notifications: expandETNotifications(d), - OutputBucket: getStringPtr(d, "output_bucket"), - Role: getStringPtr(d, "role"), - ThumbnailConfig: expandETPiplineOutputConfig(d, "thumbnail_config"), - } - - if name, ok := d.GetOk("name"); ok { - req.Name = aws.String(name.(string)) - } else { - name := resource.PrefixedUniqueId("tf-et-") - d.Set("name", name) - req.Name = aws.String(name) - } - - if (req.OutputBucket == nil && (req.ContentConfig == nil || req.ContentConfig.Bucket == nil)) || - (req.OutputBucket != nil && req.ContentConfig != nil && req.ContentConfig.Bucket != nil) { - return fmt.Errorf("you must specify only one of output_bucket or content_config.bucket") - } - - log.Printf("[DEBUG] Elastic Transcoder Pipeline create opts: %s", req) - resp, err := elastictranscoderconn.CreatePipeline(req) - if err != nil { - return fmt.Errorf("Error creating Elastic Transcoder Pipeline: %s", err) - } - - d.SetId(*resp.Pipeline.Id) - - for _, w := range resp.Warnings { - log.Printf("[WARN] Elastic Transcoder Pipeline %v: %v", *w.Code, *w.Message) - } - - return resourceAwsElasticTranscoderPipelineRead(d, meta) -} - -func expandETNotifications(d *schema.ResourceData) *elastictranscoder.Notifications { - set, ok := d.GetOk("notifications") - if !ok { - return nil - } - - s := set.(*schema.Set).List() - if len(s) == 0 { - return nil - } - - if s[0] == nil { - log.Printf("[ERR] First element of Notifications set is nil") - return nil - } - - rN := s[0].(map[string]interface{}) - - return &elastictranscoder.Notifications{ - Completed: aws.String(rN["completed"].(string)), - Error: aws.String(rN["error"].(string)), - Progressing: aws.String(rN["progressing"].(string)), - Warning: aws.String(rN["warning"].(string)), - } -} - -func flattenETNotifications(n *elastictranscoder.Notifications) []map[string]interface{} { - if n == nil { - return nil - } - - allEmpty := func(s ...*string) bool { - for _, s := range s { - if s != nil && *s != "" { - return false - } - } - return true - } - - // the API always returns a Notifications value, even when all fields are nil - if allEmpty(n.Completed, n.Error, n.Progressing, n.Warning) { - return nil - } - - m := setMap(make(map[string]interface{})) - - m.SetString("completed", n.Completed) - m.SetString("error", n.Error) - m.SetString("progressing", n.Progressing) - m.SetString("warning", n.Warning) - return m.MapList() -} - -func expandETPiplineOutputConfig(d *schema.ResourceData, key string) *elastictranscoder.PipelineOutputConfig { - set, ok := d.GetOk(key) - if !ok { - return nil - } - - s := set.(*schema.Set) - if s == nil || s.Len() == 0 { - return nil - } - - cc := s.List()[0].(map[string]interface{}) - - cfg := &elastictranscoder.PipelineOutputConfig{ - Bucket: getStringPtr(cc, "bucket"), - StorageClass: getStringPtr(cc, "storage_class"), - } - - switch key { - case "content_config": - cfg.Permissions = expandETPermList(d.Get("content_config_permissions").(*schema.Set)) - case "thumbnail_config": - cfg.Permissions = expandETPermList(d.Get("thumbnail_config_permissions").(*schema.Set)) - } - - return cfg -} - -func flattenETPipelineOutputConfig(cfg *elastictranscoder.PipelineOutputConfig) []map[string]interface{} { - m := setMap(make(map[string]interface{})) - - m.SetString("bucket", cfg.Bucket) - m.SetString("storage_class", cfg.StorageClass) - - return m.MapList() -} - -func expandETPermList(permissions *schema.Set) []*elastictranscoder.Permission { - var perms []*elastictranscoder.Permission - - for _, p := range permissions.List() { - if p == nil { - continue - } - - m := p.(map[string]interface{}) - - perm := &elastictranscoder.Permission{ - Access: expandStringList(m["access"].([]interface{})), - Grantee: getStringPtr(p, "grantee"), - GranteeType: getStringPtr(p, "grantee_type"), - } - - perms = append(perms, perm) - } - return perms -} - -func flattenETPermList(perms []*elastictranscoder.Permission) []map[string]interface{} { - var set []map[string]interface{} - - for _, p := range perms { - m := setMap(make(map[string]interface{})) - m.Set("access", flattenStringList(p.Access)) - m.SetString("grantee", p.Grantee) - m.SetString("grantee_type", p.GranteeType) - - set = append(set, m) - } - return set -} - -func resourceAwsElasticTranscoderPipelineUpdate(d *schema.ResourceData, meta interface{}) error { - elastictranscoderconn := meta.(*AWSClient).elastictranscoderconn - - req := &elastictranscoder.UpdatePipelineInput{ - Id: aws.String(d.Id()), - } - - if d.HasChange("aws_kms_key_arn") { - req.AwsKmsKeyArn = getStringPtr(d, "aws_kms_key_arn") - } - - if d.HasChange("content_config") { - req.ContentConfig = expandETPiplineOutputConfig(d, "content_config") - } - - if d.HasChange("input_bucket") { - req.InputBucket = getStringPtr(d, "input_bucket") - } - - if d.HasChange("name") { - req.Name = getStringPtr(d, "name") - } - - if d.HasChange("notifications") { - req.Notifications = expandETNotifications(d) - } - - if d.HasChange("role") { - req.Role = getStringPtr(d, "role") - } - - if d.HasChange("thumbnail_config") { - req.ThumbnailConfig = expandETPiplineOutputConfig(d, "thumbnail_config") - } - - log.Printf("[DEBUG] Updating Elastic Transcoder Pipeline: %#v", req) - output, err := elastictranscoderconn.UpdatePipeline(req) - if err != nil { - return fmt.Errorf("Error updating Elastic Transcoder pipeline: %s", err) - } - - for _, w := range output.Warnings { - log.Printf("[WARN] Elastic Transcoder Pipeline %v: %v", *w.Code, *w.Message) - } - - return resourceAwsElasticTranscoderPipelineRead(d, meta) -} - -func resourceAwsElasticTranscoderPipelineRead(d *schema.ResourceData, meta interface{}) error { - elastictranscoderconn := meta.(*AWSClient).elastictranscoderconn - - resp, err := elastictranscoderconn.ReadPipeline(&elastictranscoder.ReadPipelineInput{ - Id: aws.String(d.Id()), - }) - - if err != nil { - if err, ok := err.(awserr.Error); ok && err.Code() == "ResourceNotFoundException" { - d.SetId("") - return nil - } - return err - } - - log.Printf("[DEBUG] Elastic Transcoder Pipeline Read response: %#v", resp) - - pipeline := resp.Pipeline - - d.Set("arn", *pipeline.Arn) - - if arn := pipeline.AwsKmsKeyArn; arn != nil { - d.Set("aws_kms_key_arn", *arn) - } - - if pipeline.ContentConfig != nil { - err := d.Set("content_config", flattenETPipelineOutputConfig(pipeline.ContentConfig)) - if err != nil { - return fmt.Errorf("error setting content_config: %s", err) - } - - if pipeline.ContentConfig.Permissions != nil { - err := d.Set("content_config_permissions", flattenETPermList(pipeline.ContentConfig.Permissions)) - if err != nil { - return fmt.Errorf("error setting content_config_permissions: %s", err) - } - } - } - - d.Set("input_bucket", *pipeline.InputBucket) - d.Set("name", *pipeline.Name) - - notifications := flattenETNotifications(pipeline.Notifications) - if notifications != nil { - if err := d.Set("notifications", notifications); err != nil { - return fmt.Errorf("error setting notifications: %s", err) - } - } - - d.Set("role", *pipeline.Role) - - if pipeline.ThumbnailConfig != nil { - err := d.Set("thumbnail_config", flattenETPipelineOutputConfig(pipeline.ThumbnailConfig)) - if err != nil { - return fmt.Errorf("error setting thumbnail_config: %s", err) - } - - if pipeline.ThumbnailConfig.Permissions != nil { - err := d.Set("thumbnail_config_permissions", flattenETPermList(pipeline.ThumbnailConfig.Permissions)) - if err != nil { - return fmt.Errorf("error setting thumbnail_config_permissions: %s", err) - } - } - } - - if pipeline.OutputBucket != nil { - d.Set("output_bucket", *pipeline.OutputBucket) - } - - return nil -} - -func resourceAwsElasticTranscoderPipelineDelete(d *schema.ResourceData, meta interface{}) error { - elastictranscoderconn := meta.(*AWSClient).elastictranscoderconn - - log.Printf("[DEBUG] Elastic Transcoder Delete Pipeline: %s", d.Id()) - _, err := elastictranscoderconn.DeletePipeline(&elastictranscoder.DeletePipelineInput{ - Id: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("error deleting Elastic Transcoder Pipeline: %s", err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_preset.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_preset.go deleted file mode 100644 index cea85f33c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_preset.go +++ /dev/null @@ -1,643 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/elastictranscoder" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsElasticTranscoderPreset() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElasticTranscoderPresetCreate, - Read: resourceAwsElasticTranscoderPresetRead, - Delete: resourceAwsElasticTranscoderPresetDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "audio": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - // elastictranscoder.AudioParameters - Schema: map[string]*schema.Schema{ - "audio_packing_mode": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "bit_rate": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "channels": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "codec": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "sample_rate": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - "audio_codec_options": { - Type: schema.TypeSet, - MaxItems: 1, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bit_depth": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "bit_order": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "profile": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "signed": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - - "container": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "thumbnails": { - Type: schema.TypeSet, - MaxItems: 1, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - // elastictranscoder.Thumbnails - Schema: map[string]*schema.Schema{ - "aspect_ratio": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "format": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "interval": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "max_height": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "max_width": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "padding_policy": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "resolution": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "sizing_policy": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - - "type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "video": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - // elastictranscoder.VideoParameters - Schema: map[string]*schema.Schema{ - "aspect_ratio": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "bit_rate": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "codec": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "display_aspect_ratio": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "fixed_gop": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "frame_rate": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "keyframes_max_dist": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "max_frame_rate": { - Type: schema.TypeString, - Optional: true, - Default: "30", - ForceNew: true, - }, - "max_height": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "max_width": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "padding_policy": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "resolution": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "sizing_policy": { - Type: schema.TypeString, - Default: "Fit", - Optional: true, - ForceNew: true, - }, - }, - }, - }, - - "video_watermarks": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - // elastictranscoder.PresetWatermark - Schema: map[string]*schema.Schema{ - "horizontal_align": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "horizontal_offset": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "max_height": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "max_width": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "opacity": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "sizing_policy": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "target": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "vertical_align": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "vertical_offset": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - - "video_codec_options": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsElasticTranscoderPresetCreate(d *schema.ResourceData, meta interface{}) error { - elastictranscoderconn := meta.(*AWSClient).elastictranscoderconn - - req := &elastictranscoder.CreatePresetInput{ - Audio: expandETAudioParams(d), - Container: aws.String(d.Get("container").(string)), - Description: getStringPtr(d, "description"), - Thumbnails: expandETThumbnails(d), - Video: expandETVideoParams(d), - } - - if name, ok := d.GetOk("name"); ok { - req.Name = aws.String(name.(string)) - } else { - name := resource.PrefixedUniqueId("tf-et-preset-") - d.Set("name", name) - req.Name = aws.String(name) - } - - log.Printf("[DEBUG] Elastic Transcoder Preset create opts: %s", req) - resp, err := elastictranscoderconn.CreatePreset(req) - if err != nil { - return fmt.Errorf("Error creating Elastic Transcoder Preset: %s", err) - } - - if resp.Warning != nil && *resp.Warning != "" { - log.Printf("[WARN] Elastic Transcoder Preset: %s", *resp.Warning) - } - - d.SetId(*resp.Preset.Id) - d.Set("arn", *resp.Preset.Arn) - - return nil -} - -func expandETThumbnails(d *schema.ResourceData) *elastictranscoder.Thumbnails { - set, ok := d.GetOk("thumbnails") - if !ok { - return nil - } - - s := set.(*schema.Set) - if s == nil || s.Len() == 0 { - return nil - } - t := s.List()[0].(map[string]interface{}) - - return &elastictranscoder.Thumbnails{ - AspectRatio: getStringPtr(t, "aspect_ratio"), - Format: getStringPtr(t, "format"), - Interval: getStringPtr(t, "interval"), - MaxHeight: getStringPtr(t, "max_height"), - MaxWidth: getStringPtr(t, "max_width"), - PaddingPolicy: getStringPtr(t, "padding_policy"), - Resolution: getStringPtr(t, "resolution"), - SizingPolicy: getStringPtr(t, "sizing_policy"), - } -} - -func expandETAudioParams(d *schema.ResourceData) *elastictranscoder.AudioParameters { - set, ok := d.GetOk("audio") - if !ok { - return nil - } - - s := set.(*schema.Set) - if s == nil || s.Len() == 0 { - return nil - } - audio := s.List()[0].(map[string]interface{}) - - return &elastictranscoder.AudioParameters{ - AudioPackingMode: getStringPtr(audio, "audio_packing_mode"), - BitRate: getStringPtr(audio, "bit_rate"), - Channels: getStringPtr(audio, "channels"), - Codec: getStringPtr(audio, "codec"), - CodecOptions: expandETAudioCodecOptions(d), - SampleRate: getStringPtr(audio, "sample_rate"), - } -} - -func expandETAudioCodecOptions(d *schema.ResourceData) *elastictranscoder.AudioCodecOptions { - s := d.Get("audio_codec_options").(*schema.Set) - if s == nil || s.Len() == 0 { - return nil - } - - codec := s.List()[0].(map[string]interface{}) - - codecOpts := &elastictranscoder.AudioCodecOptions{ - BitDepth: getStringPtr(codec, "bit_depth"), - BitOrder: getStringPtr(codec, "bit_order"), - Profile: getStringPtr(codec, "profile"), - Signed: getStringPtr(codec, "signed"), - } - - return codecOpts -} - -func expandETVideoParams(d *schema.ResourceData) *elastictranscoder.VideoParameters { - s := d.Get("video").(*schema.Set) - if s == nil || s.Len() == 0 { - return nil - } - p := s.List()[0].(map[string]interface{}) - - return &elastictranscoder.VideoParameters{ - AspectRatio: getStringPtr(p, "aspect_ratio"), - BitRate: getStringPtr(p, "bit_rate"), - Codec: getStringPtr(p, "codec"), - CodecOptions: stringMapToPointers(d.Get("video_codec_options").(map[string]interface{})), - DisplayAspectRatio: getStringPtr(p, "display_aspect_ratio"), - FixedGOP: getStringPtr(p, "fixed_gop"), - FrameRate: getStringPtr(p, "frame_rate"), - KeyframesMaxDist: getStringPtr(p, "keyframes_max_dist"), - MaxFrameRate: getStringPtr(p, "max_frame_rate"), - MaxHeight: getStringPtr(p, "max_height"), - MaxWidth: getStringPtr(p, "max_width"), - PaddingPolicy: getStringPtr(p, "padding_policy"), - Resolution: getStringPtr(p, "resolution"), - SizingPolicy: getStringPtr(p, "sizing_policy"), - Watermarks: expandETVideoWatermarks(d), - } -} - -func expandETVideoWatermarks(d *schema.ResourceData) []*elastictranscoder.PresetWatermark { - s := d.Get("video_watermarks").(*schema.Set) - if s == nil || s.Len() == 0 { - return nil - } - var watermarks []*elastictranscoder.PresetWatermark - - for _, w := range s.List() { - watermark := &elastictranscoder.PresetWatermark{ - HorizontalAlign: getStringPtr(w, "horizontal_align"), - HorizontalOffset: getStringPtr(w, "horizontal_offset"), - Id: getStringPtr(w, "id"), - MaxHeight: getStringPtr(w, "max_height"), - MaxWidth: getStringPtr(w, "max_width"), - Opacity: getStringPtr(w, "opacity"), - SizingPolicy: getStringPtr(w, "sizing_policy"), - Target: getStringPtr(w, "target"), - VerticalAlign: getStringPtr(w, "vertical_align"), - VerticalOffset: getStringPtr(w, "vertical_offset"), - } - watermarks = append(watermarks, watermark) - } - - return watermarks -} - -func resourceAwsElasticTranscoderPresetRead(d *schema.ResourceData, meta interface{}) error { - elastictranscoderconn := meta.(*AWSClient).elastictranscoderconn - - resp, err := elastictranscoderconn.ReadPreset(&elastictranscoder.ReadPresetInput{ - Id: aws.String(d.Id()), - }) - - if err != nil { - if err, ok := err.(awserr.Error); ok && err.Code() == "ResourceNotFoundException" { - d.SetId("") - return nil - } - return err - } - - log.Printf("[DEBUG] Elastic Transcoder Preset Read response: %#v", resp) - - preset := resp.Preset - d.Set("arn", *preset.Arn) - - if preset.Audio != nil { - err := d.Set("audio", flattenETAudioParameters(preset.Audio)) - if err != nil { - return err - } - - if preset.Audio.CodecOptions != nil { - d.Set("audio_codec_options", flattenETAudioCodecOptions(preset.Audio.CodecOptions)) - } - } - - d.Set("container", *preset.Container) - d.Set("name", *preset.Name) - d.Set("description", *preset.Description) - - if preset.Thumbnails != nil { - err := d.Set("thumbnails", flattenETThumbnails(preset.Thumbnails)) - if err != nil { - return err - } - } - - d.Set("type", *preset.Type) - - if preset.Video != nil { - err := d.Set("video", flattenETVideoParams(preset.Video)) - if err != nil { - return err - } - - if preset.Video.CodecOptions != nil { - d.Set("video_codec_options", flattenETVideoCodecOptions(preset.Video.CodecOptions)) - } - - if preset.Video.Watermarks != nil { - d.Set("video_watermarks", flattenETWatermarks(preset.Video.Watermarks)) - } - } - - return nil -} - -func flattenETAudioParameters(audio *elastictranscoder.AudioParameters) []map[string]interface{} { - m := setMap(make(map[string]interface{})) - - m.SetString("audio_packing_mode", audio.AudioPackingMode) - m.SetString("bit_rate", audio.BitRate) - m.SetString("channels", audio.Channels) - m.SetString("codec", audio.Codec) - m.SetString("sample_rate", audio.SampleRate) - - return m.MapList() -} - -func flattenETAudioCodecOptions(opts *elastictranscoder.AudioCodecOptions) []map[string]interface{} { - if opts == nil { - return nil - } - - m := setMap(make(map[string]interface{})) - - m.SetString("bit_depth", opts.BitDepth) - m.SetString("bit_order", opts.BitOrder) - m.SetString("profile", opts.Profile) - m.SetString("signed", opts.Signed) - - return m.MapList() -} - -func flattenETThumbnails(thumbs *elastictranscoder.Thumbnails) []map[string]interface{} { - m := setMap(make(map[string]interface{})) - - m.SetString("aspect_ratio", thumbs.AspectRatio) - m.SetString("format", thumbs.Format) - m.SetString("interval", thumbs.Interval) - m.SetString("max_height", thumbs.MaxHeight) - m.SetString("max_width", thumbs.MaxWidth) - m.SetString("padding_policy", thumbs.PaddingPolicy) - m.SetString("resolution", thumbs.Resolution) - m.SetString("sizing_policy", thumbs.SizingPolicy) - - return m.MapList() -} - -func flattenETVideoParams(video *elastictranscoder.VideoParameters) []map[string]interface{} { - m := setMap(make(map[string]interface{})) - - m.SetString("aspect_ratio", video.AspectRatio) - m.SetString("bit_rate", video.BitRate) - m.SetString("codec", video.Codec) - m.SetString("display_aspect_ratio", video.DisplayAspectRatio) - m.SetString("fixed_gop", video.FixedGOP) - m.SetString("frame_rate", video.FrameRate) - m.SetString("keyframes_max_dist", video.KeyframesMaxDist) - m.SetString("max_frame_rate", video.MaxFrameRate) - m.SetString("max_height", video.MaxHeight) - m.SetString("max_width", video.MaxWidth) - m.SetString("padding_policy", video.PaddingPolicy) - m.SetString("resolution", video.Resolution) - m.SetString("sizing_policy", video.SizingPolicy) - - return m.MapList() -} - -func flattenETVideoCodecOptions(opts map[string]*string) map[string]interface{} { - codecOpts := setMap(make(map[string]interface{})) - - for k, v := range opts { - codecOpts.SetString(k, v) - } - - return codecOpts.Map() -} - -func flattenETWatermarks(watermarks []*elastictranscoder.PresetWatermark) []map[string]interface{} { - var watermarkSet []map[string]interface{} - - for _, w := range watermarks { - watermark := setMap(make(map[string]interface{})) - - watermark.SetString("horizontal_align", w.HorizontalAlign) - watermark.SetString("horizontal_offset", w.HorizontalOffset) - watermark.SetString("id", w.Id) - watermark.SetString("max_height", w.MaxHeight) - watermark.SetString("max_width", w.MaxWidth) - watermark.SetString("opacity", w.Opacity) - watermark.SetString("sizing_policy", w.SizingPolicy) - watermark.SetString("target", w.Target) - watermark.SetString("vertical_align", w.VerticalAlign) - watermark.SetString("vertical_offset", w.VerticalOffset) - - watermarkSet = append(watermarkSet, watermark.Map()) - } - - return watermarkSet -} - -func resourceAwsElasticTranscoderPresetDelete(d *schema.ResourceData, meta interface{}) error { - elastictranscoderconn := meta.(*AWSClient).elastictranscoderconn - - log.Printf("[DEBUG] Elastic Transcoder Delete Preset: %s", d.Id()) - _, err := elastictranscoderconn.DeletePreset(&elastictranscoder.DeletePresetInput{ - Id: aws.String(d.Id()), - }) - - if err != nil { - return fmt.Errorf("error deleting Elastic Transcoder Preset: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go deleted file mode 100644 index d30a9f0bb..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go +++ /dev/null @@ -1,828 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "sort" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/elasticache" - gversion "github.com/hashicorp/go-version" - "github.com/hashicorp/terraform/helper/customdiff" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsElasticacheCluster() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElasticacheClusterCreate, - Read: resourceAwsElasticacheClusterRead, - Update: resourceAwsElasticacheClusterUpdate, - Delete: resourceAwsElasticacheClusterDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "apply_immediately": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - "availability_zone": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "availability_zones": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - ConflictsWith: []string{"preferred_availability_zones"}, - Deprecated: "Use `preferred_availability_zones` instead", - }, - "az_mode": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - elasticache.AZModeCrossAz, - elasticache.AZModeSingleAz, - }, false), - }, - "cache_nodes": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, - "address": { - Type: schema.TypeString, - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Computed: true, - }, - "availability_zone": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "cluster_address": { - Type: schema.TypeString, - Computed: true, - }, - "cluster_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: func(val interface{}) string { - // Elasticache normalizes cluster ids to lowercase, - // so we have to do this too or else we can end up - // with non-converging diffs. - return strings.ToLower(val.(string)) - }, - ValidateFunc: validateElastiCacheClusterId, - }, - "configuration_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - "engine": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "engine_version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "maintenance_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - StateFunc: func(val interface{}) string { - // Elasticache always changes the maintenance - // to lowercase - return strings.ToLower(val.(string)) - }, - ValidateFunc: validateOnceAWeekWindowFormat, - }, - "node_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "notification_topic_arn": { - Type: schema.TypeString, - Optional: true, - }, - "num_cache_nodes": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - "parameter_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - // Suppress default memcached/redis ports when not defined - if !d.IsNewResource() && new == "0" && (old == "6379" || old == "11211") { - return true - } - return false - }, - }, - "preferred_availability_zones": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "replication_group_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{ - "availability_zones", - "az_mode", - "engine_version", - "engine", - "maintenance_window", - "node_type", - "notification_topic_arn", - "num_cache_nodes", - "parameter_group_name", - "port", - "security_group_ids", - "security_group_names", - "snapshot_arns", - "snapshot_name", - "snapshot_retention_limit", - "snapshot_window", - "subnet_group_name", - }, - Computed: true, - }, - "security_group_names": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - // A single-element string list containing an Amazon Resource Name (ARN) that - // uniquely identifies a Redis RDB snapshot file stored in Amazon S3. The snapshot - // file will be used to populate the node group. - // - // See also: - // https://github.com/aws/aws-sdk-go/blob/4862a174f7fc92fb523fc39e68f00b87d91d2c3d/service/elasticache/api.go#L2079 - "snapshot_arns": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "snapshot_retention_limit": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtMost(35), - }, - "snapshot_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateOnceADayWindowFormat, - }, - "snapshot_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "subnet_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "tags": tagsSchema(), - }, - - CustomizeDiff: customdiff.Sequence( - func(diff *schema.ResourceDiff, v interface{}) error { - // Plan time validation for az_mode - // InvalidParameterCombination: Must specify at least two cache nodes in order to specify AZ Mode of 'cross-az'. - if v, ok := diff.GetOk("az_mode"); !ok || v.(string) != elasticache.AZModeCrossAz { - return nil - } - if v, ok := diff.GetOk("num_cache_nodes"); !ok || v.(int) != 1 { - return nil - } - return errors.New(`az_mode "cross-az" is not supported with num_cache_nodes = 1`) - }, - func(diff *schema.ResourceDiff, v interface{}) error { - // Plan time validation for engine_version - // InvalidParameterCombination: Cannot modify memcached from 1.4.33 to 1.4.24 - // InvalidParameterCombination: Cannot modify redis from 3.2.6 to 3.2.4 - if diff.Id() == "" || !diff.HasChange("engine_version") { - return nil - } - o, n := diff.GetChange("engine_version") - oVersion, err := gversion.NewVersion(o.(string)) - if err != nil { - return err - } - nVersion, err := gversion.NewVersion(n.(string)) - if err != nil { - return err - } - if nVersion.GreaterThan(oVersion) { - return nil - } - return diff.ForceNew("engine_version") - }, - func(diff *schema.ResourceDiff, v interface{}) error { - // Plan time validation for num_cache_nodes - // InvalidParameterValue: Cannot create a Redis cluster with a NumCacheNodes parameter greater than 1. - if v, ok := diff.GetOk("engine"); !ok || v.(string) == "memcached" { - return nil - } - if v, ok := diff.GetOk("num_cache_nodes"); !ok || v.(int) == 1 { - return nil - } - return errors.New(`engine "redis" does not support num_cache_nodes > 1`) - }, - func(diff *schema.ResourceDiff, v interface{}) error { - // Engine memcached does not currently support vertical scaling - // InvalidParameterCombination: Scaling is not supported for engine memcached - // https://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Scaling.Memcached.html#Scaling.Memcached.Vertically - if diff.Id() == "" || !diff.HasChange("node_type") { - return nil - } - if v, ok := diff.GetOk("engine"); !ok || v.(string) == "redis" { - return nil - } - return diff.ForceNew("node_type") - }, - ), - } -} - -func resourceAwsElasticacheClusterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - req := &elasticache.CreateCacheClusterInput{} - - if v, ok := d.GetOk("replication_group_id"); ok { - req.ReplicationGroupId = aws.String(v.(string)) - } else { - securityNameSet := d.Get("security_group_names").(*schema.Set) - securityIdSet := d.Get("security_group_ids").(*schema.Set) - securityNames := expandStringList(securityNameSet.List()) - securityIds := expandStringList(securityIdSet.List()) - tags := tagsFromMapEC(d.Get("tags").(map[string]interface{})) - - req.CacheSecurityGroupNames = securityNames - req.SecurityGroupIds = securityIds - req.Tags = tags - } - - if v, ok := d.GetOk("cluster_id"); ok { - req.CacheClusterId = aws.String(v.(string)) - } - - if v, ok := d.GetOk("node_type"); ok { - req.CacheNodeType = aws.String(v.(string)) - } - - if v, ok := d.GetOk("num_cache_nodes"); ok { - req.NumCacheNodes = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("engine"); ok { - req.Engine = aws.String(v.(string)) - } - - if v, ok := d.GetOk("engine_version"); ok { - req.EngineVersion = aws.String(v.(string)) - } - - if v, ok := d.GetOk("port"); ok { - req.Port = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("subnet_group_name"); ok { - req.CacheSubnetGroupName = aws.String(v.(string)) - } - - // parameter groups are optional and can be defaulted by AWS - if v, ok := d.GetOk("parameter_group_name"); ok { - req.CacheParameterGroupName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("snapshot_retention_limit"); ok { - req.SnapshotRetentionLimit = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("snapshot_window"); ok { - req.SnapshotWindow = aws.String(v.(string)) - } - - if v, ok := d.GetOk("maintenance_window"); ok { - req.PreferredMaintenanceWindow = aws.String(v.(string)) - } - - if v, ok := d.GetOk("notification_topic_arn"); ok { - req.NotificationTopicArn = aws.String(v.(string)) - } - - snaps := d.Get("snapshot_arns").(*schema.Set).List() - if len(snaps) > 0 { - s := expandStringList(snaps) - req.SnapshotArns = s - log.Printf("[DEBUG] Restoring Redis cluster from S3 snapshot: %#v", s) - } - - if v, ok := d.GetOk("snapshot_name"); ok { - req.SnapshotName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("az_mode"); ok { - req.AZMode = aws.String(v.(string)) - } - - if v, ok := d.GetOk("availability_zone"); ok { - req.PreferredAvailabilityZone = aws.String(v.(string)) - } - - if v, ok := d.GetOk("preferred_availability_zones"); ok && len(v.([]interface{})) > 0 { - req.PreferredAvailabilityZones = expandStringList(v.([]interface{})) - } else { - preferred_azs := d.Get("availability_zones").(*schema.Set).List() - if len(preferred_azs) > 0 { - azs := expandStringList(preferred_azs) - req.PreferredAvailabilityZones = azs - } - } - - id, err := createElasticacheCacheCluster(conn, req) - if err != nil { - return fmt.Errorf("error creating Elasticache Cache Cluster: %s", err) - } - - d.SetId(id) - - err = waitForCreateElasticacheCacheCluster(conn, d.Id(), 40*time.Minute) - if err != nil { - return fmt.Errorf("error waiting for Elasticache Cache Cluster (%s) to be created: %s", d.Id(), err) - } - - return resourceAwsElasticacheClusterRead(d, meta) -} - -func resourceAwsElasticacheClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - req := &elasticache.DescribeCacheClustersInput{ - CacheClusterId: aws.String(d.Id()), - ShowCacheNodeInfo: aws.Bool(true), - } - - res, err := conn.DescribeCacheClusters(req) - if err != nil { - if isAWSErr(err, elasticache.ErrCodeCacheClusterNotFoundFault, "") { - log.Printf("[WARN] ElastiCache Cluster (%s) not found", d.Id()) - d.SetId("") - return nil - } - - return err - } - - if len(res.CacheClusters) == 1 { - c := res.CacheClusters[0] - d.Set("cluster_id", c.CacheClusterId) - d.Set("node_type", c.CacheNodeType) - d.Set("num_cache_nodes", c.NumCacheNodes) - d.Set("engine", c.Engine) - d.Set("engine_version", c.EngineVersion) - if c.ConfigurationEndpoint != nil { - d.Set("port", c.ConfigurationEndpoint.Port) - d.Set("configuration_endpoint", aws.String(fmt.Sprintf("%s:%d", *c.ConfigurationEndpoint.Address, *c.ConfigurationEndpoint.Port))) - d.Set("cluster_address", aws.String((*c.ConfigurationEndpoint.Address))) - } else if len(c.CacheNodes) > 0 { - d.Set("port", int(aws.Int64Value(c.CacheNodes[0].Endpoint.Port))) - } - - if c.ReplicationGroupId != nil { - d.Set("replication_group_id", c.ReplicationGroupId) - } - - d.Set("subnet_group_name", c.CacheSubnetGroupName) - d.Set("security_group_names", flattenElastiCacheSecurityGroupNames(c.CacheSecurityGroups)) - d.Set("security_group_ids", flattenElastiCacheSecurityGroupIds(c.SecurityGroups)) - if c.CacheParameterGroup != nil { - d.Set("parameter_group_name", c.CacheParameterGroup.CacheParameterGroupName) - } - d.Set("maintenance_window", c.PreferredMaintenanceWindow) - d.Set("snapshot_window", c.SnapshotWindow) - d.Set("snapshot_retention_limit", c.SnapshotRetentionLimit) - if c.NotificationConfiguration != nil { - if *c.NotificationConfiguration.TopicStatus == "active" { - d.Set("notification_topic_arn", c.NotificationConfiguration.TopicArn) - } - } - d.Set("availability_zone", c.PreferredAvailabilityZone) - if *c.PreferredAvailabilityZone == "Multiple" { - d.Set("az_mode", "cross-az") - } else { - d.Set("az_mode", "single-az") - } - - if err := setCacheNodeData(d, c); err != nil { - return err - } - // list tags for resource - // set tags - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "elasticache", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("cluster:%s", d.Id()), - }.String() - resp, err := conn.ListTagsForResource(&elasticache.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) - } - - var et []*elasticache.Tag - if len(resp.TagList) > 0 { - et = resp.TagList - } - d.Set("tags", tagsToMapEC(et)) - } - - return nil -} - -func resourceAwsElasticacheClusterUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "elasticache", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("cluster:%s", d.Id()), - }.String() - if err := setTagsEC(conn, d, arn); err != nil { - return err - } - - req := &elasticache.ModifyCacheClusterInput{ - CacheClusterId: aws.String(d.Id()), - ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), - } - - requestUpdate := false - if d.HasChange("security_group_ids") { - if attr := d.Get("security_group_ids").(*schema.Set); attr.Len() > 0 { - req.SecurityGroupIds = expandStringList(attr.List()) - requestUpdate = true - } - } - - if d.HasChange("parameter_group_name") { - req.CacheParameterGroupName = aws.String(d.Get("parameter_group_name").(string)) - requestUpdate = true - } - - if d.HasChange("maintenance_window") { - req.PreferredMaintenanceWindow = aws.String(d.Get("maintenance_window").(string)) - requestUpdate = true - } - - if d.HasChange("notification_topic_arn") { - v := d.Get("notification_topic_arn").(string) - req.NotificationTopicArn = aws.String(v) - if v == "" { - inactive := "inactive" - req.NotificationTopicStatus = &inactive - } - requestUpdate = true - } - - if d.HasChange("engine_version") { - req.EngineVersion = aws.String(d.Get("engine_version").(string)) - requestUpdate = true - } - - if d.HasChange("snapshot_window") { - req.SnapshotWindow = aws.String(d.Get("snapshot_window").(string)) - requestUpdate = true - } - - if d.HasChange("node_type") { - req.CacheNodeType = aws.String(d.Get("node_type").(string)) - requestUpdate = true - } - - if d.HasChange("snapshot_retention_limit") { - req.SnapshotRetentionLimit = aws.Int64(int64(d.Get("snapshot_retention_limit").(int))) - requestUpdate = true - } - - if d.HasChange("az_mode") { - req.AZMode = aws.String(d.Get("az_mode").(string)) - requestUpdate = true - } - - if d.HasChange("num_cache_nodes") { - oraw, nraw := d.GetChange("num_cache_nodes") - o := oraw.(int) - n := nraw.(int) - if n < o { - log.Printf("[INFO] Cluster %s is marked for Decreasing cache nodes from %d to %d", d.Id(), o, n) - nodesToRemove := getCacheNodesToRemove(o, o-n) - req.CacheNodeIdsToRemove = nodesToRemove - } else { - log.Printf("[INFO] Cluster %s is marked for increasing cache nodes from %d to %d", d.Id(), o, n) - // SDK documentation for NewAvailabilityZones states: - // The list of Availability Zones where the new Memcached cache nodes are created. - // - // This parameter is only valid when NumCacheNodes in the request is greater - // than the sum of the number of active cache nodes and the number of cache - // nodes pending creation (which may be zero). The number of Availability Zones - // supplied in this list must match the cache nodes being added in this request. - if v, ok := d.GetOk("preferred_availability_zones"); ok && len(v.([]interface{})) > 0 { - // Here we check the list length to prevent a potential panic :) - if len(v.([]interface{})) != n { - return fmt.Errorf("length of preferred_availability_zones (%d) must match num_cache_nodes (%d)", len(v.([]interface{})), n) - } - req.NewAvailabilityZones = expandStringList(v.([]interface{})[o:]) - } - } - - req.NumCacheNodes = aws.Int64(int64(d.Get("num_cache_nodes").(int))) - requestUpdate = true - - } - - if requestUpdate { - log.Printf("[DEBUG] Modifying ElastiCache Cluster (%s), opts:\n%s", d.Id(), req) - _, err := conn.ModifyCacheCluster(req) - if err != nil { - return fmt.Errorf("Error updating ElastiCache cluster (%s), error: %s", d.Id(), err) - } - - log.Printf("[DEBUG] Waiting for update: %s", d.Id()) - pending := []string{"modifying", "rebooting cache cluster nodes", "snapshotting"} - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: []string{"available"}, - Refresh: cacheClusterStateRefreshFunc(conn, d.Id(), "available", pending), - Timeout: 80 * time.Minute, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - _, sterr := stateConf.WaitForState() - if sterr != nil { - return fmt.Errorf("Error waiting for elasticache (%s) to update: %s", d.Id(), sterr) - } - } - - return resourceAwsElasticacheClusterRead(d, meta) -} - -func getCacheNodesToRemove(oldNumberOfNodes int, cacheNodesToRemove int) []*string { - nodesIdsToRemove := []*string{} - for i := oldNumberOfNodes; i > oldNumberOfNodes-cacheNodesToRemove && i > 0; i-- { - s := fmt.Sprintf("%04d", i) - nodesIdsToRemove = append(nodesIdsToRemove, &s) - } - - return nodesIdsToRemove -} - -func setCacheNodeData(d *schema.ResourceData, c *elasticache.CacheCluster) error { - sortedCacheNodes := make([]*elasticache.CacheNode, len(c.CacheNodes)) - copy(sortedCacheNodes, c.CacheNodes) - sort.Sort(byCacheNodeId(sortedCacheNodes)) - - cacheNodeData := make([]map[string]interface{}, 0, len(sortedCacheNodes)) - - for _, node := range sortedCacheNodes { - if node.CacheNodeId == nil || node.Endpoint == nil || node.Endpoint.Address == nil || node.Endpoint.Port == nil || node.CustomerAvailabilityZone == nil { - return fmt.Errorf("Unexpected nil pointer in: %s", node) - } - cacheNodeData = append(cacheNodeData, map[string]interface{}{ - "id": *node.CacheNodeId, - "address": *node.Endpoint.Address, - "port": int(*node.Endpoint.Port), - "availability_zone": *node.CustomerAvailabilityZone, - }) - } - - return d.Set("cache_nodes", cacheNodeData) -} - -type byCacheNodeId []*elasticache.CacheNode - -func (b byCacheNodeId) Len() int { return len(b) } -func (b byCacheNodeId) Swap(i, j int) { b[i], b[j] = b[j], b[i] } -func (b byCacheNodeId) Less(i, j int) bool { - return b[i].CacheNodeId != nil && b[j].CacheNodeId != nil && - *b[i].CacheNodeId < *b[j].CacheNodeId -} - -func resourceAwsElasticacheClusterDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - err := deleteElasticacheCacheCluster(conn, d.Id()) - if err != nil { - if isAWSErr(err, elasticache.ErrCodeCacheClusterNotFoundFault, "") { - return nil - } - return fmt.Errorf("error deleting Elasticache Cache Cluster (%s): %s", d.Id(), err) - } - err = waitForDeleteElasticacheCacheCluster(conn, d.Id(), 40*time.Minute) - if err != nil { - return fmt.Errorf("error waiting for Elasticache Cache Cluster (%s) to be deleted: %s", d.Id(), err) - } - - return nil -} - -func cacheClusterStateRefreshFunc(conn *elasticache.ElastiCache, clusterID, givenState string, pending []string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeCacheClusters(&elasticache.DescribeCacheClustersInput{ - CacheClusterId: aws.String(clusterID), - ShowCacheNodeInfo: aws.Bool(true), - }) - if err != nil { - if isAWSErr(err, elasticache.ErrCodeCacheClusterNotFoundFault, "") { - log.Printf("[DEBUG] Detect deletion") - return nil, "", nil - } - - log.Printf("[ERROR] CacheClusterStateRefreshFunc: %s", err) - return nil, "", err - } - - if len(resp.CacheClusters) == 0 { - return nil, "", fmt.Errorf("Error: no Cache Clusters found for id (%s)", clusterID) - } - - var c *elasticache.CacheCluster - for _, cluster := range resp.CacheClusters { - if *cluster.CacheClusterId == clusterID { - log.Printf("[DEBUG] Found matching ElastiCache cluster: %s", *cluster.CacheClusterId) - c = cluster - } - } - - if c == nil { - return nil, "", fmt.Errorf("Error: no matching Elastic Cache cluster for id (%s)", clusterID) - } - - log.Printf("[DEBUG] ElastiCache Cluster (%s) status: %v", clusterID, *c.CacheClusterStatus) - - // return the current state if it's in the pending array - for _, p := range pending { - log.Printf("[DEBUG] ElastiCache: checking pending state (%s) for cluster (%s), cluster status: %s", pending, clusterID, *c.CacheClusterStatus) - s := *c.CacheClusterStatus - if p == s { - log.Printf("[DEBUG] Return with status: %v", *c.CacheClusterStatus) - return c, p, nil - } - } - - // return given state if it's not in pending - if givenState != "" { - log.Printf("[DEBUG] ElastiCache: checking given state (%s) of cluster (%s) against cluster status (%s)", givenState, clusterID, *c.CacheClusterStatus) - // check to make sure we have the node count we're expecting - if int64(len(c.CacheNodes)) != *c.NumCacheNodes { - log.Printf("[DEBUG] Node count is not what is expected: %d found, %d expected", len(c.CacheNodes), *c.NumCacheNodes) - return nil, "creating", nil - } - - log.Printf("[DEBUG] Node count matched (%d)", len(c.CacheNodes)) - // loop the nodes and check their status as well - for _, n := range c.CacheNodes { - log.Printf("[DEBUG] Checking cache node for status: %s", n) - if n.CacheNodeStatus != nil && *n.CacheNodeStatus != "available" { - log.Printf("[DEBUG] Node (%s) is not yet available, status: %s", *n.CacheNodeId, *n.CacheNodeStatus) - return nil, "creating", nil - } - log.Printf("[DEBUG] Cache node not in expected state") - } - log.Printf("[DEBUG] ElastiCache returning given state (%s), cluster: %s", givenState, c) - return c, givenState, nil - } - log.Printf("[DEBUG] current status: %v", *c.CacheClusterStatus) - return c, *c.CacheClusterStatus, nil - } -} - -func createElasticacheCacheCluster(conn *elasticache.ElastiCache, input *elasticache.CreateCacheClusterInput) (string, error) { - log.Printf("[DEBUG] Creating Elasticache Cache Cluster: %s", input) - output, err := conn.CreateCacheCluster(input) - if err != nil { - return "", err - } - if output == nil || output.CacheCluster == nil { - return "", errors.New("missing cluster ID after creation") - } - // Elasticache always retains the id in lower case, so we have to - // mimic that or else we won't be able to refresh a resource whose - // name contained uppercase characters. - return strings.ToLower(aws.StringValue(output.CacheCluster.CacheClusterId)), nil -} - -func waitForCreateElasticacheCacheCluster(conn *elasticache.ElastiCache, cacheClusterID string, timeout time.Duration) error { - pending := []string{"creating", "modifying", "restoring", "snapshotting"} - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: []string{"available"}, - Refresh: cacheClusterStateRefreshFunc(conn, cacheClusterID, "available", pending), - Timeout: timeout, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - log.Printf("[DEBUG] Waiting for Elasticache Cache Cluster (%s) to be created", cacheClusterID) - _, err := stateConf.WaitForState() - return err -} - -func deleteElasticacheCacheCluster(conn *elasticache.ElastiCache, cacheClusterID string) error { - input := &elasticache.DeleteCacheClusterInput{ - CacheClusterId: aws.String(cacheClusterID), - } - log.Printf("[DEBUG] Deleting Elasticache Cache Cluster: %s", input) - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteCacheCluster(input) - if err != nil { - // This will not be fixed by retrying - if isAWSErr(err, elasticache.ErrCodeInvalidCacheClusterStateFault, "serving as primary") { - return resource.NonRetryableError(err) - } - // The cluster may be just snapshotting, so we retry until it's ready for deletion - if isAWSErr(err, elasticache.ErrCodeInvalidCacheClusterStateFault, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - return err -} - -func waitForDeleteElasticacheCacheCluster(conn *elasticache.ElastiCache, cacheClusterID string, timeout time.Duration) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "available", "deleting", "incompatible-parameters", "incompatible-network", "restore-failed", "snapshotting"}, - Target: []string{}, - Refresh: cacheClusterStateRefreshFunc(conn, cacheClusterID, "", []string{}), - Timeout: timeout, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - log.Printf("[DEBUG] Waiting for Elasticache Cache Cluster deletion: %v", cacheClusterID) - - _, err := stateConf.WaitForState() - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go deleted file mode 100644 index e8b57cf6b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go +++ /dev/null @@ -1,347 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "strings" - "time" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/elasticache" -) - -func resourceAwsElasticacheParameterGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElasticacheParameterGroupCreate, - Read: resourceAwsElasticacheParameterGroupRead, - Update: resourceAwsElasticacheParameterGroupUpdate, - Delete: resourceAwsElasticacheParameterGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - StateFunc: func(val interface{}) string { - return strings.ToLower(val.(string)) - }, - }, - "family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "Managed by Terraform", - }, - "parameter": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - Set: resourceAwsElasticacheParameterHash, - }, - }, - } -} - -func resourceAwsElasticacheParameterGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - createOpts := elasticache.CreateCacheParameterGroupInput{ - CacheParameterGroupName: aws.String(d.Get("name").(string)), - CacheParameterGroupFamily: aws.String(d.Get("family").(string)), - Description: aws.String(d.Get("description").(string)), - } - - log.Printf("[DEBUG] Create Cache Parameter Group: %#v", createOpts) - resp, err := conn.CreateCacheParameterGroup(&createOpts) - if err != nil { - return fmt.Errorf("Error creating Cache Parameter Group: %s", err) - } - - d.Partial(true) - d.SetPartial("name") - d.SetPartial("family") - d.SetPartial("description") - d.Partial(false) - - d.SetId(*resp.CacheParameterGroup.CacheParameterGroupName) - log.Printf("[INFO] Cache Parameter Group ID: %s", d.Id()) - - return resourceAwsElasticacheParameterGroupUpdate(d, meta) -} - -func resourceAwsElasticacheParameterGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - describeOpts := elasticache.DescribeCacheParameterGroupsInput{ - CacheParameterGroupName: aws.String(d.Id()), - } - - describeResp, err := conn.DescribeCacheParameterGroups(&describeOpts) - if err != nil { - return err - } - - if len(describeResp.CacheParameterGroups) != 1 || - *describeResp.CacheParameterGroups[0].CacheParameterGroupName != d.Id() { - return fmt.Errorf("Unable to find Parameter Group: %#v", describeResp.CacheParameterGroups) - } - - d.Set("name", describeResp.CacheParameterGroups[0].CacheParameterGroupName) - d.Set("family", describeResp.CacheParameterGroups[0].CacheParameterGroupFamily) - d.Set("description", describeResp.CacheParameterGroups[0].Description) - - // Only include user customized parameters as there's hundreds of system/default ones - describeParametersOpts := elasticache.DescribeCacheParametersInput{ - CacheParameterGroupName: aws.String(d.Id()), - Source: aws.String("user"), - } - - describeParametersResp, err := conn.DescribeCacheParameters(&describeParametersOpts) - if err != nil { - return err - } - - d.Set("parameter", flattenElastiCacheParameters(describeParametersResp.Parameters)) - - return nil -} - -func resourceAwsElasticacheParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - d.Partial(true) - - if d.HasChange("parameter") { - o, n := d.GetChange("parameter") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - toRemove, err := expandElastiCacheParameters(os.Difference(ns).List()) - if err != nil { - return err - } - - log.Printf("[DEBUG] Parameters to remove: %#v", toRemove) - - toAdd, err := expandElastiCacheParameters(ns.Difference(os).List()) - if err != nil { - return err - } - - log.Printf("[DEBUG] Parameters to add: %#v", toAdd) - - // We can only modify 20 parameters at a time, so walk them until - // we've got them all. - maxParams := 20 - - for len(toRemove) > 0 { - var paramsToModify []*elasticache.ParameterNameValue - if len(toRemove) <= maxParams { - paramsToModify, toRemove = toRemove[:], nil - } else { - paramsToModify, toRemove = toRemove[:maxParams], toRemove[maxParams:] - } - resetOpts := elasticache.ResetCacheParameterGroupInput{ - CacheParameterGroupName: aws.String(d.Get("name").(string)), - ParameterNameValues: paramsToModify, - } - - log.Printf("[DEBUG] Reset Cache Parameter Group: %s", resetOpts) - err := resource.Retry(30*time.Second, func() *resource.RetryError { - _, err = conn.ResetCacheParameterGroup(&resetOpts) - if err != nil { - if isAWSErr(err, "InvalidCacheParameterGroupState", " has pending changes") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - // When attempting to reset the reserved-memory parameter, the API - // can return the below 500 error, which causes the AWS Go SDK to - // automatically retry and hence timeout resource.Retry(): - // InternalFailure: An internal error has occurred. Please try your query again at a later time. - // Instead of hardcoding the reserved-memory parameter removal - // above, which may become out of date, here we add logic to - // workaround this API behavior - - if isResourceTimeoutError(err) { - for i, paramToModify := range paramsToModify { - if aws.StringValue(paramToModify.ParameterName) != "reserved-memory" { - continue - } - - // Always reset the top level error and remove the reset for reserved-memory - err = nil - paramsToModify = append(paramsToModify[:i], paramsToModify[i+1:]...) - - // If we are only trying to remove reserved-memory and not perform - // an update to reserved-memory or reserved-memory-percentage, we - // can attempt to workaround the API issue by switching it to - // reserved-memory-percentage first then reset that temporary parameter. - - tryReservedMemoryPercentageWorkaround := true - - allConfiguredParameters, err := expandElastiCacheParameters(d.Get("parameter").(*schema.Set).List()) - if err != nil { - return fmt.Errorf("error expanding parameter configuration: %s", err) - } - - for _, configuredParameter := range allConfiguredParameters { - if aws.StringValue(configuredParameter.ParameterName) == "reserved-memory" || aws.StringValue(configuredParameter.ParameterName) == "reserved-memory-percentage" { - tryReservedMemoryPercentageWorkaround = false - break - } - } - - if !tryReservedMemoryPercentageWorkaround { - break - } - - // The reserved-memory-percentage parameter does not exist in redis2.6 and redis2.8 - family := d.Get("family").(string) - if family == "redis2.6" || family == "redis2.8" { - log.Printf("[WARN] Cannot reset Elasticache Parameter Group (%s) reserved-memory parameter with %s family", d.Id(), family) - break - } - - modifyInput := &elasticache.ModifyCacheParameterGroupInput{ - CacheParameterGroupName: aws.String(d.Get("name").(string)), - ParameterNameValues: []*elasticache.ParameterNameValue{ - { - ParameterName: aws.String("reserved-memory-percentage"), - ParameterValue: aws.String("0"), - }, - }, - } - _, err = conn.ModifyCacheParameterGroup(modifyInput) - - if err != nil { - log.Printf("[WARN] Error attempting reserved-memory workaround to switch to reserved-memory-percentage: %s", err) - break - } - - resetInput := &elasticache.ResetCacheParameterGroupInput{ - CacheParameterGroupName: aws.String(d.Get("name").(string)), - ParameterNameValues: []*elasticache.ParameterNameValue{ - { - ParameterName: aws.String("reserved-memory-percentage"), - ParameterValue: aws.String("0"), - }, - }, - } - - _, err = conn.ResetCacheParameterGroup(resetInput) - - if err != nil { - log.Printf("[WARN] Error attempting reserved-memory workaround to reset reserved-memory-percentage: %s", err) - } - - break - } - - // Retry any remaining parameter resets with reserved-memory potentially removed - if len(paramsToModify) > 0 { - resetOpts = elasticache.ResetCacheParameterGroupInput{ - CacheParameterGroupName: aws.String(d.Get("name").(string)), - ParameterNameValues: paramsToModify, - } - // Reset top level error with potentially any new errors - _, err = conn.ResetCacheParameterGroup(&resetOpts) - } - } - - if err != nil { - return fmt.Errorf("Error resetting Cache Parameter Group: %s", err) - } - } - - for len(toAdd) > 0 { - var paramsToModify []*elasticache.ParameterNameValue - if len(toAdd) <= maxParams { - paramsToModify, toAdd = toAdd[:], nil - } else { - paramsToModify, toAdd = toAdd[:maxParams], toAdd[maxParams:] - } - modifyOpts := elasticache.ModifyCacheParameterGroupInput{ - CacheParameterGroupName: aws.String(d.Get("name").(string)), - ParameterNameValues: paramsToModify, - } - - log.Printf("[DEBUG] Modify Cache Parameter Group: %s", modifyOpts) - _, err = conn.ModifyCacheParameterGroup(&modifyOpts) - if err != nil { - return fmt.Errorf("Error modifying Cache Parameter Group: %s", err) - } - } - - d.SetPartial("parameter") - } - - d.Partial(false) - - return resourceAwsElasticacheParameterGroupRead(d, meta) -} - -func resourceAwsElasticacheParameterGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - return resource.Retry(3*time.Minute, func() *resource.RetryError { - deleteOpts := elasticache.DeleteCacheParameterGroupInput{ - CacheParameterGroupName: aws.String(d.Id()), - } - _, err := conn.DeleteCacheParameterGroup(&deleteOpts) - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "CacheParameterGroupNotFoundFault" { - return nil - } - if ok && awsErr.Code() == "InvalidCacheParameterGroupState" { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) -} - -func resourceAwsElasticacheParameterHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["value"].(string))) - - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go deleted file mode 100644 index 5a127aafd..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go +++ /dev/null @@ -1,929 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elasticache" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsElasticacheReplicationGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElasticacheReplicationGroupCreate, - Read: resourceAwsElasticacheReplicationGroupRead, - Update: resourceAwsElasticacheReplicationGroupUpdate, - Delete: resourceAwsElasticacheReplicationGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "apply_immediately": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - "at_rest_encryption_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - "auth_token": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - ForceNew: true, - ValidateFunc: validateAwsElastiCacheReplicationGroupAuthToken, - }, - "auto_minor_version_upgrade": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "automatic_failover_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "availability_zones": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "cluster_mode": { - Type: schema.TypeList, - Optional: true, - // We allow Computed: true here since using number_cache_clusters - // and a cluster mode enabled parameter_group_name will create - // a single shard replication group with number_cache_clusters - 1 - // read replicas. Otherwise, the resource is marked ForceNew. - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "replicas_per_node_group": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "num_node_groups": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - }, - "configuration_endpoint_address": { - Type: schema.TypeString, - Computed: true, - }, - "engine": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "redis", - ValidateFunc: validateAwsElastiCacheReplicationGroupEngine, - }, - "engine_version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "maintenance_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - StateFunc: func(val interface{}) string { - // Elasticache always changes the maintenance - // to lowercase - return strings.ToLower(val.(string)) - }, - ValidateFunc: validateOnceAWeekWindowFormat, - }, - "member_clusters": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "node_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "notification_topic_arn": { - Type: schema.TypeString, - Optional: true, - }, - "number_cache_clusters": { - Type: schema.TypeInt, - Computed: true, - Optional: true, - }, - "parameter_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - // Suppress default memcached/redis ports when not defined - if !d.IsNewResource() && new == "0" && (old == "6379" || old == "11211") { - return true - } - return false - }, - }, - "primary_endpoint_address": { - Type: schema.TypeString, - Computed: true, - }, - "replication_group_description": { - Type: schema.TypeString, - Required: true, - }, - "replication_group_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateAwsElastiCacheReplicationGroupId, - StateFunc: func(val interface{}) string { - return strings.ToLower(val.(string)) - }, - }, - "security_group_names": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - // A single-element string list containing an Amazon Resource Name (ARN) that - // uniquely identifies a Redis RDB snapshot file stored in Amazon S3. The snapshot - // file will be used to populate the node group. - // - // See also: - // https://github.com/aws/aws-sdk-go/blob/4862a174f7fc92fb523fc39e68f00b87d91d2c3d/service/elasticache/api.go#L2079 - "snapshot_arns": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "snapshot_retention_limit": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtMost(35), - }, - "snapshot_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateOnceADayWindowFormat, - }, - "snapshot_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "subnet_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "tags": tagsSchema(), - "transit_encryption_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - }, - SchemaVersion: 1, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(60 * time.Minute), - Delete: schema.DefaultTimeout(40 * time.Minute), - Update: schema.DefaultTimeout(40 * time.Minute), - }, - } -} - -func resourceAwsElasticacheReplicationGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - tags := tagsFromMapEC(d.Get("tags").(map[string]interface{})) - params := &elasticache.CreateReplicationGroupInput{ - ReplicationGroupId: aws.String(d.Get("replication_group_id").(string)), - ReplicationGroupDescription: aws.String(d.Get("replication_group_description").(string)), - AutomaticFailoverEnabled: aws.Bool(d.Get("automatic_failover_enabled").(bool)), - AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), - CacheNodeType: aws.String(d.Get("node_type").(string)), - Engine: aws.String(d.Get("engine").(string)), - Tags: tags, - } - - if v, ok := d.GetOk("engine_version"); ok { - params.EngineVersion = aws.String(v.(string)) - } - - preferred_azs := d.Get("availability_zones").(*schema.Set).List() - if len(preferred_azs) > 0 { - azs := expandStringList(preferred_azs) - params.PreferredCacheClusterAZs = azs - } - - if v, ok := d.GetOk("parameter_group_name"); ok { - params.CacheParameterGroupName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("port"); ok { - params.Port = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("subnet_group_name"); ok { - params.CacheSubnetGroupName = aws.String(v.(string)) - } - - security_group_names := d.Get("security_group_names").(*schema.Set).List() - if len(security_group_names) > 0 { - params.CacheSecurityGroupNames = expandStringList(security_group_names) - } - - security_group_ids := d.Get("security_group_ids").(*schema.Set).List() - if len(security_group_ids) > 0 { - params.SecurityGroupIds = expandStringList(security_group_ids) - } - - snaps := d.Get("snapshot_arns").(*schema.Set).List() - if len(snaps) > 0 { - params.SnapshotArns = expandStringList(snaps) - } - - if v, ok := d.GetOk("maintenance_window"); ok { - params.PreferredMaintenanceWindow = aws.String(v.(string)) - } - - if v, ok := d.GetOk("notification_topic_arn"); ok { - params.NotificationTopicArn = aws.String(v.(string)) - } - - if v, ok := d.GetOk("snapshot_retention_limit"); ok { - params.SnapshotRetentionLimit = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("snapshot_window"); ok { - params.SnapshotWindow = aws.String(v.(string)) - } - - if v, ok := d.GetOk("snapshot_name"); ok { - params.SnapshotName = aws.String(v.(string)) - } - - if _, ok := d.GetOk("transit_encryption_enabled"); ok { - params.TransitEncryptionEnabled = aws.Bool(d.Get("transit_encryption_enabled").(bool)) - } - - if _, ok := d.GetOk("at_rest_encryption_enabled"); ok { - params.AtRestEncryptionEnabled = aws.Bool(d.Get("at_rest_encryption_enabled").(bool)) - } - - if v, ok := d.GetOk("auth_token"); ok { - params.AuthToken = aws.String(v.(string)) - } - - clusterMode, clusterModeOk := d.GetOk("cluster_mode") - cacheClusters, cacheClustersOk := d.GetOk("number_cache_clusters") - - if !clusterModeOk && !cacheClustersOk || clusterModeOk && cacheClustersOk { - return fmt.Errorf("Either `number_cache_clusters` or `cluster_mode` must be set") - } - - if clusterModeOk { - clusterModeList := clusterMode.([]interface{}) - attributes := clusterModeList[0].(map[string]interface{}) - - if v, ok := attributes["num_node_groups"]; ok { - params.NumNodeGroups = aws.Int64(int64(v.(int))) - } - - if v, ok := attributes["replicas_per_node_group"]; ok { - params.ReplicasPerNodeGroup = aws.Int64(int64(v.(int))) - } - } - - if cacheClustersOk { - params.NumCacheClusters = aws.Int64(int64(cacheClusters.(int))) - } - - resp, err := conn.CreateReplicationGroup(params) - if err != nil { - return fmt.Errorf("Error creating Elasticache Replication Group: %s", err) - } - - d.SetId(*resp.ReplicationGroup.ReplicationGroupId) - - pending := []string{"creating", "modifying", "restoring", "snapshotting"} - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: []string{"available"}, - Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), pending), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - log.Printf("[DEBUG] Waiting for state to become available: %v", d.Id()) - _, sterr := stateConf.WaitForState() - if sterr != nil { - return fmt.Errorf("Error waiting for elasticache replication group (%s) to be created: %s", d.Id(), sterr) - } - - return resourceAwsElasticacheReplicationGroupRead(d, meta) -} - -func resourceAwsElasticacheReplicationGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - req := &elasticache.DescribeReplicationGroupsInput{ - ReplicationGroupId: aws.String(d.Id()), - } - - res, err := conn.DescribeReplicationGroups(req) - if err != nil { - if isAWSErr(err, elasticache.ErrCodeReplicationGroupNotFoundFault, "") { - log.Printf("[WARN] Elasticache Replication Group (%s) not found", d.Id()) - d.SetId("") - return nil - } - - return err - } - - var rgp *elasticache.ReplicationGroup - for _, r := range res.ReplicationGroups { - if *r.ReplicationGroupId == d.Id() { - rgp = r - } - } - - if rgp == nil { - log.Printf("[WARN] Replication Group (%s) not found", d.Id()) - d.SetId("") - return nil - } - - if *rgp.Status == "deleting" { - log.Printf("[WARN] The Replication Group %q is currently in the `deleting` state", d.Id()) - d.SetId("") - return nil - } - - if rgp.AutomaticFailover != nil { - switch strings.ToLower(*rgp.AutomaticFailover) { - case "disabled", "disabling": - d.Set("automatic_failover_enabled", false) - case "enabled", "enabling": - d.Set("automatic_failover_enabled", true) - default: - log.Printf("Unknown AutomaticFailover state %s", *rgp.AutomaticFailover) - } - } - - d.Set("replication_group_description", rgp.Description) - d.Set("number_cache_clusters", len(rgp.MemberClusters)) - if err := d.Set("member_clusters", flattenStringList(rgp.MemberClusters)); err != nil { - return fmt.Errorf("error setting member_clusters: %s", err) - } - if err := d.Set("cluster_mode", flattenElasticacheNodeGroupsToClusterMode(aws.BoolValue(rgp.ClusterEnabled), rgp.NodeGroups)); err != nil { - return fmt.Errorf("error setting cluster_mode attribute: %s", err) - } - d.Set("replication_group_id", rgp.ReplicationGroupId) - - if rgp.NodeGroups != nil { - if len(rgp.NodeGroups[0].NodeGroupMembers) == 0 { - return nil - } - - cacheCluster := *rgp.NodeGroups[0].NodeGroupMembers[0] - - res, err := conn.DescribeCacheClusters(&elasticache.DescribeCacheClustersInput{ - CacheClusterId: cacheCluster.CacheClusterId, - ShowCacheNodeInfo: aws.Bool(true), - }) - if err != nil { - return err - } - - if len(res.CacheClusters) == 0 { - return nil - } - - c := res.CacheClusters[0] - d.Set("node_type", c.CacheNodeType) - d.Set("engine", c.Engine) - d.Set("engine_version", c.EngineVersion) - d.Set("subnet_group_name", c.CacheSubnetGroupName) - d.Set("security_group_names", flattenElastiCacheSecurityGroupNames(c.CacheSecurityGroups)) - d.Set("security_group_ids", flattenElastiCacheSecurityGroupIds(c.SecurityGroups)) - - if c.CacheParameterGroup != nil { - d.Set("parameter_group_name", c.CacheParameterGroup.CacheParameterGroupName) - } - - d.Set("maintenance_window", c.PreferredMaintenanceWindow) - d.Set("snapshot_window", rgp.SnapshotWindow) - d.Set("snapshot_retention_limit", rgp.SnapshotRetentionLimit) - - if rgp.ConfigurationEndpoint != nil { - d.Set("port", rgp.ConfigurationEndpoint.Port) - d.Set("configuration_endpoint_address", rgp.ConfigurationEndpoint.Address) - } else { - d.Set("port", rgp.NodeGroups[0].PrimaryEndpoint.Port) - d.Set("primary_endpoint_address", rgp.NodeGroups[0].PrimaryEndpoint.Address) - } - - d.Set("auto_minor_version_upgrade", c.AutoMinorVersionUpgrade) - d.Set("at_rest_encryption_enabled", c.AtRestEncryptionEnabled) - d.Set("transit_encryption_enabled", c.TransitEncryptionEnabled) - - if c.AuthTokenEnabled != nil && !*c.AuthTokenEnabled { - d.Set("auth_token", nil) - } - } - - return nil -} - -func resourceAwsElasticacheReplicationGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - if d.HasChange("cluster_mode.0.num_node_groups") { - o, n := d.GetChange("cluster_mode.0.num_node_groups") - oldNumNodeGroups := o.(int) - newNumNodeGroups := n.(int) - - input := &elasticache.ModifyReplicationGroupShardConfigurationInput{ - ApplyImmediately: aws.Bool(true), - NodeGroupCount: aws.Int64(int64(newNumNodeGroups)), - ReplicationGroupId: aws.String(d.Id()), - } - - if oldNumNodeGroups > newNumNodeGroups { - // Node Group IDs are 1 indexed: 0001 through 0015 - // Loop from highest old ID until we reach highest new ID - nodeGroupsToRemove := []string{} - for i := oldNumNodeGroups; i > newNumNodeGroups; i-- { - nodeGroupID := fmt.Sprintf("%04d", i) - nodeGroupsToRemove = append(nodeGroupsToRemove, nodeGroupID) - } - input.NodeGroupsToRemove = aws.StringSlice(nodeGroupsToRemove) - } - - log.Printf("[DEBUG] Modifying Elasticache Replication Group (%s) shard configuration: %s", d.Id(), input) - _, err := conn.ModifyReplicationGroupShardConfiguration(input) - if err != nil { - return fmt.Errorf("error modifying Elasticache Replication Group shard configuration: %s", err) - } - - err = waitForModifyElasticacheReplicationGroup(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return fmt.Errorf("error waiting for Elasticache Replication Group (%s) shard reconfiguration completion: %s", d.Id(), err) - } - } - - if d.HasChange("number_cache_clusters") { - o, n := d.GetChange("number_cache_clusters") - oldNumberCacheClusters := o.(int) - newNumberCacheClusters := n.(int) - - // We will try to use similar naming to the console, which are 1 indexed: RGID-001 through RGID-006 - var addClusterIDs, removeClusterIDs []string - for clusterID := oldNumberCacheClusters + 1; clusterID <= newNumberCacheClusters; clusterID++ { - addClusterIDs = append(addClusterIDs, fmt.Sprintf("%s-%03d", d.Id(), clusterID)) - } - for clusterID := oldNumberCacheClusters; clusterID >= (newNumberCacheClusters + 1); clusterID-- { - removeClusterIDs = append(removeClusterIDs, fmt.Sprintf("%s-%03d", d.Id(), clusterID)) - } - - if len(addClusterIDs) > 0 { - // Kick off all the Cache Cluster creations - for _, cacheClusterID := range addClusterIDs { - input := &elasticache.CreateCacheClusterInput{ - CacheClusterId: aws.String(cacheClusterID), - ReplicationGroupId: aws.String(d.Id()), - } - _, err := createElasticacheCacheCluster(conn, input) - if err != nil { - // Future enhancement: we could retry creation with random ID on naming collision - // if isAWSErr(err, elasticache.ErrCodeCacheClusterAlreadyExistsFault, "") { ... } - return fmt.Errorf("error creating Elasticache Cache Cluster (adding replica): %s", err) - } - } - - // Wait for all Cache Cluster creations - for _, cacheClusterID := range addClusterIDs { - err := waitForCreateElasticacheCacheCluster(conn, cacheClusterID, d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return fmt.Errorf("error waiting for Elasticache Cache Cluster (%s) to be created (adding replica): %s", cacheClusterID, err) - } - } - } - - if len(removeClusterIDs) > 0 { - // Cannot reassign primary cluster ID while automatic failover is enabled - // If we temporarily disable automatic failover, ensure we re-enable it - reEnableAutomaticFailover := false - - // Kick off all the Cache Cluster deletions - for _, cacheClusterID := range removeClusterIDs { - err := deleteElasticacheCacheCluster(conn, cacheClusterID) - if err != nil { - // Future enhancement: we could retry deletion with random existing ID on missing name - // if isAWSErr(err, elasticache.ErrCodeCacheClusterNotFoundFault, "") { ... } - if !isAWSErr(err, elasticache.ErrCodeInvalidCacheClusterStateFault, "serving as primary") { - return fmt.Errorf("error deleting Elasticache Cache Cluster (%s) (removing replica): %s", cacheClusterID, err) - } - - // Use Replication Group MemberClusters to find a new primary cache cluster ID - // that is not in removeClusterIDs - newPrimaryClusterID := "" - - describeReplicationGroupInput := &elasticache.DescribeReplicationGroupsInput{ - ReplicationGroupId: aws.String(d.Id()), - } - log.Printf("[DEBUG] Reading Elasticache Replication Group: %s", describeReplicationGroupInput) - output, err := conn.DescribeReplicationGroups(describeReplicationGroupInput) - if err != nil { - return fmt.Errorf("error reading Elasticache Replication Group (%s) to determine new primary: %s", d.Id(), err) - } - if output == nil || len(output.ReplicationGroups) == 0 || len(output.ReplicationGroups[0].MemberClusters) == 0 { - return fmt.Errorf("error reading Elasticache Replication Group (%s) to determine new primary: missing replication group information", d.Id()) - } - - for _, memberClusterPtr := range output.ReplicationGroups[0].MemberClusters { - memberCluster := aws.StringValue(memberClusterPtr) - memberClusterInRemoveClusterIDs := false - for _, removeClusterID := range removeClusterIDs { - if memberCluster == removeClusterID { - memberClusterInRemoveClusterIDs = true - break - } - } - if !memberClusterInRemoveClusterIDs { - newPrimaryClusterID = memberCluster - break - } - } - if newPrimaryClusterID == "" { - return fmt.Errorf("error reading Elasticache Replication Group (%s) to determine new primary: unable to assign new primary", d.Id()) - } - - // Disable automatic failover if enabled - // Must be applied previous to trying to set new primary - // InvalidReplicationGroupState: Cannot manually promote a new master cache cluster while autofailover is enabled - if aws.StringValue(output.ReplicationGroups[0].AutomaticFailover) == elasticache.AutomaticFailoverStatusEnabled { - // Be kind and rewind - if d.Get("automatic_failover_enabled").(bool) { - reEnableAutomaticFailover = true - } - - modifyReplicationGroupInput := &elasticache.ModifyReplicationGroupInput{ - ApplyImmediately: aws.Bool(true), - AutomaticFailoverEnabled: aws.Bool(false), - ReplicationGroupId: aws.String(d.Id()), - } - log.Printf("[DEBUG] Modifying Elasticache Replication Group: %s", modifyReplicationGroupInput) - _, err = conn.ModifyReplicationGroup(modifyReplicationGroupInput) - if err != nil { - return fmt.Errorf("error modifying Elasticache Replication Group (%s) to set new primary: %s", d.Id(), err) - } - err = waitForModifyElasticacheReplicationGroup(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return fmt.Errorf("error waiting for Elasticache Replication Group (%s) to be available: %s", d.Id(), err) - } - } - - // Set new primary - modifyReplicationGroupInput := &elasticache.ModifyReplicationGroupInput{ - ApplyImmediately: aws.Bool(true), - PrimaryClusterId: aws.String(newPrimaryClusterID), - ReplicationGroupId: aws.String(d.Id()), - } - log.Printf("[DEBUG] Modifying Elasticache Replication Group: %s", modifyReplicationGroupInput) - _, err = conn.ModifyReplicationGroup(modifyReplicationGroupInput) - if err != nil { - return fmt.Errorf("error modifying Elasticache Replication Group (%s) to set new primary: %s", d.Id(), err) - } - err = waitForModifyElasticacheReplicationGroup(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return fmt.Errorf("error waiting for Elasticache Replication Group (%s) to be available: %s", d.Id(), err) - } - - // Finally retry deleting the cache cluster - err = deleteElasticacheCacheCluster(conn, cacheClusterID) - if err != nil { - return fmt.Errorf("error deleting Elasticache Cache Cluster (%s) (removing replica after setting new primary): %s", cacheClusterID, err) - } - } - } - - // Wait for all Cache Cluster deletions - for _, cacheClusterID := range removeClusterIDs { - err := waitForDeleteElasticacheCacheCluster(conn, cacheClusterID, d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return fmt.Errorf("error waiting for Elasticache Cache Cluster (%s) to be deleted (removing replica): %s", cacheClusterID, err) - } - } - - // Re-enable automatic failover if we needed to temporarily disable it - if reEnableAutomaticFailover { - input := &elasticache.ModifyReplicationGroupInput{ - ApplyImmediately: aws.Bool(true), - AutomaticFailoverEnabled: aws.Bool(true), - ReplicationGroupId: aws.String(d.Id()), - } - log.Printf("[DEBUG] Modifying Elasticache Replication Group: %s", input) - _, err := conn.ModifyReplicationGroup(input) - if err != nil { - return fmt.Errorf("error modifying Elasticache Replication Group (%s) to re-enable automatic failover: %s", d.Id(), err) - } - } - } - } - - requestUpdate := false - params := &elasticache.ModifyReplicationGroupInput{ - ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), - ReplicationGroupId: aws.String(d.Id()), - } - - if d.HasChange("replication_group_description") { - params.ReplicationGroupDescription = aws.String(d.Get("replication_group_description").(string)) - requestUpdate = true - } - - if d.HasChange("automatic_failover_enabled") { - params.AutomaticFailoverEnabled = aws.Bool(d.Get("automatic_failover_enabled").(bool)) - requestUpdate = true - } - - if d.HasChange("auto_minor_version_upgrade") { - params.AutoMinorVersionUpgrade = aws.Bool(d.Get("auto_minor_version_upgrade").(bool)) - requestUpdate = true - } - - if d.HasChange("security_group_ids") { - if attr := d.Get("security_group_ids").(*schema.Set); attr.Len() > 0 { - params.SecurityGroupIds = expandStringList(attr.List()) - requestUpdate = true - } - } - - if d.HasChange("security_group_names") { - if attr := d.Get("security_group_names").(*schema.Set); attr.Len() > 0 { - params.CacheSecurityGroupNames = expandStringList(attr.List()) - requestUpdate = true - } - } - - if d.HasChange("maintenance_window") { - params.PreferredMaintenanceWindow = aws.String(d.Get("maintenance_window").(string)) - requestUpdate = true - } - - if d.HasChange("notification_topic_arn") { - params.NotificationTopicArn = aws.String(d.Get("notification_topic_arn").(string)) - requestUpdate = true - } - - if d.HasChange("parameter_group_name") { - params.CacheParameterGroupName = aws.String(d.Get("parameter_group_name").(string)) - requestUpdate = true - } - - if d.HasChange("engine_version") { - params.EngineVersion = aws.String(d.Get("engine_version").(string)) - requestUpdate = true - } - - if d.HasChange("snapshot_retention_limit") { - // This is a real hack to set the Snapshotting Cluster ID to be the first Cluster in the RG - o, _ := d.GetChange("snapshot_retention_limit") - if o.(int) == 0 { - params.SnapshottingClusterId = aws.String(fmt.Sprintf("%s-001", d.Id())) - } - - params.SnapshotRetentionLimit = aws.Int64(int64(d.Get("snapshot_retention_limit").(int))) - requestUpdate = true - } - - if d.HasChange("snapshot_window") { - params.SnapshotWindow = aws.String(d.Get("snapshot_window").(string)) - requestUpdate = true - } - - if d.HasChange("node_type") { - params.CacheNodeType = aws.String(d.Get("node_type").(string)) - requestUpdate = true - } - - if requestUpdate { - _, err := conn.ModifyReplicationGroup(params) - if err != nil { - return fmt.Errorf("error updating Elasticache Replication Group (%s): %s", d.Id(), err) - } - - err = waitForModifyElasticacheReplicationGroup(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return fmt.Errorf("error waiting for Elasticache Replication Group (%s) to be updated: %s", d.Id(), err) - } - } - return resourceAwsElasticacheReplicationGroupRead(d, meta) -} - -func resourceAwsElasticacheReplicationGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - err := deleteElasticacheReplicationGroup(d.Id(), conn) - if err != nil { - return fmt.Errorf("error deleting Elasticache Replication Group (%s): %s", d.Id(), err) - } - - return nil -} - -func cacheReplicationGroupStateRefreshFunc(conn *elasticache.ElastiCache, replicationGroupId string, pending []string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeReplicationGroups(&elasticache.DescribeReplicationGroupsInput{ - ReplicationGroupId: aws.String(replicationGroupId), - }) - if err != nil { - if isAWSErr(err, elasticache.ErrCodeReplicationGroupNotFoundFault, "") { - log.Printf("[DEBUG] Replication Group Not Found") - return nil, "", nil - } - - log.Printf("[ERROR] cacheClusterReplicationGroupStateRefreshFunc: %s", err) - return nil, "", err - } - - if len(resp.ReplicationGroups) == 0 { - return nil, "", fmt.Errorf("Error: no Cache Replication Groups found for id (%s)", replicationGroupId) - } - - var rg *elasticache.ReplicationGroup - for _, replicationGroup := range resp.ReplicationGroups { - if *replicationGroup.ReplicationGroupId == replicationGroupId { - log.Printf("[DEBUG] Found matching ElastiCache Replication Group: %s", *replicationGroup.ReplicationGroupId) - rg = replicationGroup - } - } - - if rg == nil { - return nil, "", fmt.Errorf("Error: no matching ElastiCache Replication Group for id (%s)", replicationGroupId) - } - - log.Printf("[DEBUG] ElastiCache Replication Group (%s) status: %v", replicationGroupId, *rg.Status) - - // return the current state if it's in the pending array - for _, p := range pending { - log.Printf("[DEBUG] ElastiCache: checking pending state (%s) for Replication Group (%s), Replication Group status: %s", pending, replicationGroupId, *rg.Status) - s := *rg.Status - if p == s { - log.Printf("[DEBUG] Return with status: %v", *rg.Status) - return s, p, nil - } - } - - return rg, *rg.Status, nil - } -} - -func deleteElasticacheReplicationGroup(replicationGroupID string, conn *elasticache.ElastiCache) error { - input := &elasticache.DeleteReplicationGroupInput{ - ReplicationGroupId: aws.String(replicationGroupID), - } - - // 10 minutes should give any creating/deleting cache clusters or snapshots time to complete - err := resource.Retry(10*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteReplicationGroup(input) - if err != nil { - if isAWSErr(err, elasticache.ErrCodeReplicationGroupNotFoundFault, "") { - return nil - } - // Cache Cluster is creating/deleting or Replication Group is snapshotting - // InvalidReplicationGroupState: Cache cluster tf-acc-test-uqhe-003 is not in a valid state to be deleted - if isAWSErr(err, elasticache.ErrCodeInvalidReplicationGroupStateFault, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - - log.Printf("[DEBUG] Waiting for deletion: %s", replicationGroupID) - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "available", "deleting"}, - Target: []string{}, - Refresh: cacheReplicationGroupStateRefreshFunc(conn, replicationGroupID, []string{}), - Timeout: 40 * time.Minute, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - _, err = stateConf.WaitForState() - return err -} - -func flattenElasticacheNodeGroupsToClusterMode(clusterEnabled bool, nodeGroups []*elasticache.NodeGroup) []map[string]interface{} { - if !clusterEnabled { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "num_node_groups": 0, - "replicas_per_node_group": 0, - } - - if len(nodeGroups) == 0 { - return []map[string]interface{}{m} - } - - m["num_node_groups"] = len(nodeGroups) - m["replicas_per_node_group"] = (len(nodeGroups[0].NodeGroupMembers) - 1) - return []map[string]interface{}{m} -} - -func waitForModifyElasticacheReplicationGroup(conn *elasticache.ElastiCache, replicationGroupID string, timeout time.Duration) error { - pending := []string{"creating", "modifying", "snapshotting"} - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: []string{"available"}, - Refresh: cacheReplicationGroupStateRefreshFunc(conn, replicationGroupID, pending), - Timeout: timeout, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - log.Printf("[DEBUG] Waiting for Elasticache Replication Group (%s) to become available", replicationGroupID) - _, err := stateConf.WaitForState() - return err -} - -func validateAwsElastiCacheReplicationGroupEngine(v interface{}, k string) (ws []string, errors []error) { - if strings.ToLower(v.(string)) != "redis" { - errors = append(errors, fmt.Errorf("The only acceptable Engine type when using Replication Groups is Redis")) - } - return -} - -func validateAwsElastiCacheReplicationGroupId(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if (len(value) < 1) || (len(value) > 20) { - errors = append(errors, fmt.Errorf( - "%q must contain from 1 to 20 alphanumeric characters or hyphens", k)) - } - if !regexp.MustCompile(`^[0-9a-zA-Z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-zA-Z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) - } - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_security_group.go deleted file mode 100644 index 41fc03ce9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_security_group.go +++ /dev/null @@ -1,153 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/elasticache" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsElasticacheSecurityGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElasticacheSecurityGroupCreate, - Read: resourceAwsElasticacheSecurityGroupRead, - Delete: resourceAwsElasticacheSecurityGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "Managed by Terraform", - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "security_group_names": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - } -} - -func resourceAwsElasticacheSecurityGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - name := d.Get("name").(string) - desc := d.Get("description").(string) - nameSet := d.Get("security_group_names").(*schema.Set) - - names := make([]string, nameSet.Len()) - for i, name := range nameSet.List() { - names[i] = name.(string) - } - - log.Printf("[DEBUG] Cache security group create: name: %s, description: %s, security_group_names: %v", name, desc, names) - res, err := conn.CreateCacheSecurityGroup(&elasticache.CreateCacheSecurityGroupInput{ - Description: aws.String(desc), - CacheSecurityGroupName: aws.String(name), - }) - if err != nil { - return fmt.Errorf("Error creating CacheSecurityGroup: %s", err) - } - - for _, n := range names { - log.Printf("[DEBUG] Authorize cache security group ingress name: %v, ec2 security group name: %v", name, n) - _, err = conn.AuthorizeCacheSecurityGroupIngress(&elasticache.AuthorizeCacheSecurityGroupIngressInput{ - CacheSecurityGroupName: aws.String(name), - EC2SecurityGroupName: aws.String(n), - EC2SecurityGroupOwnerId: aws.String(*res.CacheSecurityGroup.OwnerId), - }) - if err != nil { - log.Printf("[ERROR] Failed to authorize: %v", err) - _, err := conn.DeleteCacheSecurityGroup(&elasticache.DeleteCacheSecurityGroupInput{ - CacheSecurityGroupName: aws.String(d.Id()), - }) - log.Printf("[ERROR] Revert cache security group: %v", err) - } - } - - d.SetId(name) - - return nil -} - -func resourceAwsElasticacheSecurityGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - req := &elasticache.DescribeCacheSecurityGroupsInput{ - CacheSecurityGroupName: aws.String(d.Id()), - } - - res, err := conn.DescribeCacheSecurityGroups(req) - if err != nil { - return err - } - if len(res.CacheSecurityGroups) == 0 { - return fmt.Errorf("Error missing %v", d.Id()) - } - - var group *elasticache.CacheSecurityGroup - for _, g := range res.CacheSecurityGroups { - log.Printf("[DEBUG] CacheSecurityGroupName: %v, id: %v", g.CacheSecurityGroupName, d.Id()) - if *g.CacheSecurityGroupName == d.Id() { - group = g - } - } - if group == nil { - return fmt.Errorf("Error retrieving cache security group: %v", res) - } - - d.Set("name", group.CacheSecurityGroupName) - d.Set("description", group.Description) - - sgNames := make([]string, 0, len(group.EC2SecurityGroups)) - for _, sg := range group.EC2SecurityGroups { - sgNames = append(sgNames, *sg.EC2SecurityGroupName) - } - d.Set("security_group_names", sgNames) - - return nil -} - -func resourceAwsElasticacheSecurityGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - log.Printf("[DEBUG] Cache security group delete: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteCacheSecurityGroup(&elasticache.DeleteCacheSecurityGroupInput{ - CacheSecurityGroupName: aws.String(d.Id()), - }) - if err != nil { - apierr, ok := err.(awserr.Error) - if !ok { - return resource.RetryableError(err) - } - log.Printf("[DEBUG] APIError.Code: %v", apierr.Code()) - switch apierr.Code() { - case "InvalidCacheSecurityGroupState": - return resource.RetryableError(err) - case "DependencyViolation": - // If it is a dependency violation, we want to retry - return resource.RetryableError(err) - default: - return resource.NonRetryableError(err) - } - } - return nil - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_subnet_group.go deleted file mode 100644 index fce1e9d53..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_subnet_group.go +++ /dev/null @@ -1,176 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/elasticache" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsElasticacheSubnetGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElasticacheSubnetGroupCreate, - Read: resourceAwsElasticacheSubnetGroupRead, - Update: resourceAwsElasticacheSubnetGroupUpdate, - Delete: resourceAwsElasticacheSubnetGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "description": { - Type: schema.TypeString, - Optional: true, - Default: "Managed by Terraform", - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: func(val interface{}) string { - // Elasticache normalizes subnet names to lowercase, - // so we have to do this too or else we can end up - // with non-converging diffs. - return strings.ToLower(val.(string)) - }, - }, - "subnet_ids": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - } -} - -func resourceAwsElasticacheSubnetGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - // Get the group properties - name := d.Get("name").(string) - desc := d.Get("description").(string) - subnetIdsSet := d.Get("subnet_ids").(*schema.Set) - - log.Printf("[DEBUG] Cache subnet group create: name: %s, description: %s", name, desc) - - subnetIds := expandStringList(subnetIdsSet.List()) - - req := &elasticache.CreateCacheSubnetGroupInput{ - CacheSubnetGroupDescription: aws.String(desc), - CacheSubnetGroupName: aws.String(name), - SubnetIds: subnetIds, - } - - _, err := conn.CreateCacheSubnetGroup(req) - if err != nil { - return fmt.Errorf("Error creating CacheSubnetGroup: %s", err) - } - - // Assign the group name as the resource ID - // Elasticache always retains the name in lower case, so we have to - // mimic that or else we won't be able to refresh a resource whose - // name contained uppercase characters. - d.SetId(strings.ToLower(name)) - - return nil -} - -func resourceAwsElasticacheSubnetGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - req := &elasticache.DescribeCacheSubnetGroupsInput{ - CacheSubnetGroupName: aws.String(d.Get("name").(string)), - } - - res, err := conn.DescribeCacheSubnetGroups(req) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "CacheSubnetGroupNotFoundFault" { - // Update state to indicate the db subnet no longer exists. - log.Printf("[WARN] Elasticache Subnet Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - if len(res.CacheSubnetGroups) == 0 { - return fmt.Errorf("Error missing %v", d.Get("name")) - } - - var group *elasticache.CacheSubnetGroup - for _, g := range res.CacheSubnetGroups { - log.Printf("[DEBUG] %v %v", g.CacheSubnetGroupName, d.Id()) - if *g.CacheSubnetGroupName == d.Id() { - group = g - } - } - if group == nil { - return fmt.Errorf("Error retrieving cache subnet group: %v", res) - } - - ids := make([]string, len(group.Subnets)) - for i, s := range group.Subnets { - ids[i] = *s.SubnetIdentifier - } - - d.Set("name", group.CacheSubnetGroupName) - d.Set("description", group.CacheSubnetGroupDescription) - d.Set("subnet_ids", ids) - - return nil -} - -func resourceAwsElasticacheSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - if d.HasChange("subnet_ids") || d.HasChange("description") { - var subnets []*string - if v := d.Get("subnet_ids"); v != nil { - for _, v := range v.(*schema.Set).List() { - subnets = append(subnets, aws.String(v.(string))) - } - } - log.Printf("[DEBUG] Updating ElastiCache Subnet Group") - - _, err := conn.ModifyCacheSubnetGroup(&elasticache.ModifyCacheSubnetGroupInput{ - CacheSubnetGroupName: aws.String(d.Get("name").(string)), - CacheSubnetGroupDescription: aws.String(d.Get("description").(string)), - SubnetIds: subnets, - }) - if err != nil { - return err - } - } - - return resourceAwsElasticacheSubnetGroupRead(d, meta) -} -func resourceAwsElasticacheSubnetGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elasticacheconn - - log.Printf("[DEBUG] Cache subnet group delete: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteCacheSubnetGroup(&elasticache.DeleteCacheSubnetGroupInput{ - CacheSubnetGroupName: aws.String(d.Id()), - }) - if err != nil { - apierr, ok := err.(awserr.Error) - if !ok { - return resource.RetryableError(err) - } - log.Printf("[DEBUG] APIError.Code: %v", apierr.Code()) - switch apierr.Code() { - case "DependencyViolation": - // If it is a dependency violation, we want to retry - return resource.RetryableError(err) - default: - return resource.NonRetryableError(err) - } - } - return nil - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go deleted file mode 100644 index b5f38a6fb..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go +++ /dev/null @@ -1,901 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - elasticsearch "github.com/aws/aws-sdk-go/service/elasticsearchservice" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/customdiff" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsElasticSearchDomain() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElasticSearchDomainCreate, - Read: resourceAwsElasticSearchDomainRead, - Update: resourceAwsElasticSearchDomainUpdate, - Delete: resourceAwsElasticSearchDomainDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsElasticSearchDomainImport, - }, - - CustomizeDiff: customdiff.Sequence( - customdiff.ForceNewIf("elasticsearch_version", func(d *schema.ResourceDiff, meta interface{}) bool { - newVersion := d.Get("elasticsearch_version").(string) - domainName := d.Get("domain_name").(string) - - conn := meta.(*AWSClient).esconn - resp, err := conn.GetCompatibleElasticsearchVersions(&elasticsearch.GetCompatibleElasticsearchVersionsInput{ - DomainName: aws.String(domainName), - }) - if err != nil { - log.Printf("[ERROR] Failed to get compatible ElasticSearch versions %s", domainName) - return false - } - if len(resp.CompatibleElasticsearchVersions) != 1 { - return true - } - for _, targetVersion := range resp.CompatibleElasticsearchVersions[0].TargetVersions { - if aws.StringValue(targetVersion) == newVersion { - return false - } - } - return true - }), - ), - - Schema: map[string]*schema.Schema{ - "access_policies": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - "advanced_options": { - Type: schema.TypeMap, - Optional: true, - Computed: true, - }, - "domain_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[a-z][0-9a-z\-]{2,27}$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must start with a lowercase alphabet and be at least 3 and no more than 28 characters long. Valid characters are a-z (lowercase letters), 0-9, and - (hyphen).", k)) - } - return - }, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "domain_id": { - Type: schema.TypeString, - Computed: true, - }, - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - "kibana_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - "ebs_options": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "ebs_enabled": { - Type: schema.TypeBool, - Required: true, - }, - "iops": { - Type: schema.TypeInt, - Optional: true, - }, - "volume_size": { - Type: schema.TypeInt, - Optional: true, - }, - "volume_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - }, - }, - "encrypt_at_rest": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Required: true, - ForceNew: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - DiffSuppressFunc: suppressEquivalentKmsKeyIds, - }, - }, - }, - }, - "node_to_node_encryption": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Required: true, - ForceNew: true, - }, - }, - }, - }, - "cluster_config": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "dedicated_master_count": { - Type: schema.TypeInt, - Optional: true, - DiffSuppressFunc: isDedicatedMasterDisabled, - }, - "dedicated_master_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "dedicated_master_type": { - Type: schema.TypeString, - Optional: true, - DiffSuppressFunc: isDedicatedMasterDisabled, - }, - "instance_count": { - Type: schema.TypeInt, - Optional: true, - Default: 1, - }, - "instance_type": { - Type: schema.TypeString, - Optional: true, - Default: "m3.medium.elasticsearch", - }, - "zone_awareness_enabled": { - Type: schema.TypeBool, - Optional: true, - }, - }, - }, - }, - "snapshot_options": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "automated_snapshot_start_hour": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - }, - "vpc_options": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "availability_zones": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "subnet_ids": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "log_publishing_options": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "log_type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - elasticsearch.LogTypeIndexSlowLogs, - elasticsearch.LogTypeSearchSlowLogs, - elasticsearch.LogTypeEsApplicationLogs, - }, false), - }, - "cloudwatch_log_group_arn": { - Type: schema.TypeString, - Required: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - }, - }, - }, - "elasticsearch_version": { - Type: schema.TypeString, - Optional: true, - Default: "1.5", - }, - "cognito_options": { - Type: schema.TypeList, - Optional: true, - ForceNew: false, - MaxItems: 1, - DiffSuppressFunc: esCognitoOptionsDiffSuppress, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "user_pool_id": { - Type: schema.TypeString, - Required: true, - }, - "identity_pool_id": { - Type: schema.TypeString, - Required: true, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsElasticSearchDomainImport( - d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("domain_name", d.Id()) - return []*schema.ResourceData{d}, nil -} - -// This would be created automatically if the domain is created via Console -// see http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-enabling-slr -func createAwsElasticsearchIAMServiceRoleIfMissing(meta interface{}) error { - serviceRoleName := "AWSServiceRoleForAmazonElasticsearchService" - serviceName := "es.amazonaws.com" - - conn := meta.(*AWSClient).iamconn - - getRequest := &iam.GetRoleInput{ - RoleName: aws.String(serviceRoleName), - } - _, err := conn.GetRole(getRequest) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "Role not found") { - createRequest := &iam.CreateServiceLinkedRoleInput{ - AWSServiceName: aws.String(serviceName), - } - _, err := conn.CreateServiceLinkedRole(createRequest) - if err != nil { - if isAWSErr(err, iam.ErrCodeInvalidInputException, "has been taken in this account") { - return nil - } - return fmt.Errorf("Error creating IAM Service-Linked Role %s: %s", serviceRoleName, err) - } - return nil - } - return fmt.Errorf("Error reading IAM Role %s: %s", serviceRoleName, err) - } - return nil -} - -func resourceAwsElasticSearchDomainCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).esconn - - // The API doesn't check for duplicate names - // so w/out this check Create would act as upsert - // and might cause duplicate domain to appear in state - resp, err := conn.DescribeElasticsearchDomain(&elasticsearch.DescribeElasticsearchDomainInput{ - DomainName: aws.String(d.Get("domain_name").(string)), - }) - if err == nil { - return fmt.Errorf("ElasticSearch domain %s already exists", aws.StringValue(resp.DomainStatus.DomainName)) - } - - input := elasticsearch.CreateElasticsearchDomainInput{ - DomainName: aws.String(d.Get("domain_name").(string)), - ElasticsearchVersion: aws.String(d.Get("elasticsearch_version").(string)), - } - - if v, ok := d.GetOk("access_policies"); ok { - input.AccessPolicies = aws.String(v.(string)) - } - - if v, ok := d.GetOk("advanced_options"); ok { - input.AdvancedOptions = stringMapToPointers(v.(map[string]interface{})) - } - - if v, ok := d.GetOk("ebs_options"); ok { - options := v.([]interface{}) - - if len(options) == 1 { - if options[0] == nil { - return fmt.Errorf("At least one field is expected inside ebs_options") - } - - s := options[0].(map[string]interface{}) - input.EBSOptions = expandESEBSOptions(s) - } - } - - if v, ok := d.GetOk("encrypt_at_rest"); ok { - options := v.([]interface{}) - if options[0] == nil { - return fmt.Errorf("At least one field is expected inside encrypt_at_rest") - } - - s := options[0].(map[string]interface{}) - input.EncryptionAtRestOptions = expandESEncryptAtRestOptions(s) - } - - if v, ok := d.GetOk("cluster_config"); ok { - config := v.([]interface{}) - - if len(config) == 1 { - if config[0] == nil { - return fmt.Errorf("At least one field is expected inside cluster_config") - } - m := config[0].(map[string]interface{}) - input.ElasticsearchClusterConfig = expandESClusterConfig(m) - } - } - - if v, ok := d.GetOk("node_to_node_encryption"); ok { - options := v.([]interface{}) - - s := options[0].(map[string]interface{}) - input.NodeToNodeEncryptionOptions = expandESNodeToNodeEncryptionOptions(s) - } - - if v, ok := d.GetOk("snapshot_options"); ok { - options := v.([]interface{}) - - if len(options) == 1 { - if options[0] == nil { - return fmt.Errorf("At least one field is expected inside snapshot_options") - } - - o := options[0].(map[string]interface{}) - - snapshotOptions := elasticsearch.SnapshotOptions{ - AutomatedSnapshotStartHour: aws.Int64(int64(o["automated_snapshot_start_hour"].(int))), - } - - input.SnapshotOptions = &snapshotOptions - } - } - - if v, ok := d.GetOk("vpc_options"); ok { - err = createAwsElasticsearchIAMServiceRoleIfMissing(meta) - if err != nil { - return err - } - - options := v.([]interface{}) - if options[0] == nil { - return fmt.Errorf("At least one field is expected inside vpc_options") - } - - s := options[0].(map[string]interface{}) - input.VPCOptions = expandESVPCOptions(s) - } - - if v, ok := d.GetOk("log_publishing_options"); ok { - input.LogPublishingOptions = make(map[string]*elasticsearch.LogPublishingOption) - options := v.(*schema.Set).List() - for _, vv := range options { - lo := vv.(map[string]interface{}) - input.LogPublishingOptions[lo["log_type"].(string)] = &elasticsearch.LogPublishingOption{ - CloudWatchLogsLogGroupArn: aws.String(lo["cloudwatch_log_group_arn"].(string)), - Enabled: aws.Bool(lo["enabled"].(bool)), - } - } - } - - if v, ok := d.GetOk("cognito_options"); ok { - input.CognitoOptions = expandESCognitoOptions(v.([]interface{})) - } - - log.Printf("[DEBUG] Creating ElasticSearch domain: %s", input) - - // IAM Roles can take some time to propagate if set in AccessPolicies and created in the same terraform - var out *elasticsearch.CreateElasticsearchDomainOutput - err = resource.Retry(30*time.Second, func() *resource.RetryError { - var err error - out, err = conn.CreateElasticsearchDomain(&input) - if err != nil { - if isAWSErr(err, "InvalidTypeException", "Error setting policy") { - log.Printf("[DEBUG] Retrying creation of ElasticSearch domain %s", aws.StringValue(input.DomainName)) - return resource.RetryableError(err) - } - if isAWSErr(err, "ValidationException", "enable a service-linked role to give Amazon ES permissions") { - return resource.RetryableError(err) - } - if isAWSErr(err, "ValidationException", "Domain is still being deleted") { - return resource.RetryableError(err) - } - if isAWSErr(err, "ValidationException", "Amazon Elasticsearch must be allowed to use the passed role") { - return resource.RetryableError(err) - } - if isAWSErr(err, "ValidationException", "The passed role has not propagated yet") { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return err - } - - d.SetId(aws.StringValue(out.DomainStatus.ARN)) - - // Whilst the domain is being created, we can initialise the tags. - // This should mean that if the creation fails (eg because your token expired - // whilst the operation is being performed), we still get the required tags on - // the resources. - tags := tagsFromMapElasticsearchService(d.Get("tags").(map[string]interface{})) - - if err := setTagsElasticsearchService(conn, d, aws.StringValue(out.DomainStatus.ARN)); err != nil { - return err - } - - d.Set("tags", tagsToMapElasticsearchService(tags)) - d.SetPartial("tags") - - log.Printf("[DEBUG] Waiting for ElasticSearch domain %q to be created", d.Id()) - err = waitForElasticSearchDomainCreation(conn, d.Get("domain_name").(string), d.Id()) - if err != nil { - return err - } - d.Partial(false) - - log.Printf("[DEBUG] ElasticSearch domain %q created", d.Id()) - - return resourceAwsElasticSearchDomainRead(d, meta) -} - -func waitForElasticSearchDomainCreation(conn *elasticsearch.ElasticsearchService, domainName, arn string) error { - return resource.Retry(60*time.Minute, func() *resource.RetryError { - out, err := conn.DescribeElasticsearchDomain(&elasticsearch.DescribeElasticsearchDomainInput{ - DomainName: aws.String(domainName), - }) - if err != nil { - return resource.NonRetryableError(err) - } - - if !*out.DomainStatus.Processing && (out.DomainStatus.Endpoint != nil || out.DomainStatus.Endpoints != nil) { - return nil - } - - return resource.RetryableError( - fmt.Errorf("%q: Timeout while waiting for the domain to be created", arn)) - }) -} - -func resourceAwsElasticSearchDomainRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).esconn - - out, err := conn.DescribeElasticsearchDomain(&elasticsearch.DescribeElasticsearchDomainInput{ - DomainName: aws.String(d.Get("domain_name").(string)), - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "ResourceNotFoundException" { - log.Printf("[INFO] ElasticSearch Domain %q not found", d.Get("domain_name").(string)) - d.SetId("") - return nil - } - return err - } - - log.Printf("[DEBUG] Received ElasticSearch domain: %s", out) - - ds := out.DomainStatus - - if ds.AccessPolicies != nil && aws.StringValue(ds.AccessPolicies) != "" { - policies, err := structure.NormalizeJsonString(aws.StringValue(ds.AccessPolicies)) - if err != nil { - return fmt.Errorf("access policies contain an invalid JSON: %s", err) - } - d.Set("access_policies", policies) - } - err = d.Set("advanced_options", pointersMapToStringList(ds.AdvancedOptions)) - if err != nil { - return err - } - d.SetId(aws.StringValue(ds.ARN)) - d.Set("domain_id", ds.DomainId) - d.Set("domain_name", ds.DomainName) - d.Set("elasticsearch_version", ds.ElasticsearchVersion) - - err = d.Set("ebs_options", flattenESEBSOptions(ds.EBSOptions)) - if err != nil { - return err - } - err = d.Set("encrypt_at_rest", flattenESEncryptAtRestOptions(ds.EncryptionAtRestOptions)) - if err != nil { - return err - } - err = d.Set("cluster_config", flattenESClusterConfig(ds.ElasticsearchClusterConfig)) - if err != nil { - return err - } - err = d.Set("cognito_options", flattenESCognitoOptions(ds.CognitoOptions)) - if err != nil { - return err - } - err = d.Set("node_to_node_encryption", flattenESNodeToNodeEncryptionOptions(ds.NodeToNodeEncryptionOptions)) - if err != nil { - return err - } - - if err := d.Set("snapshot_options", flattenESSnapshotOptions(ds.SnapshotOptions)); err != nil { - return fmt.Errorf("error setting snapshot_options: %s", err) - } - - if ds.VPCOptions != nil { - err = d.Set("vpc_options", flattenESVPCDerivedInfo(ds.VPCOptions)) - if err != nil { - return err - } - endpoints := pointersMapToStringList(ds.Endpoints) - err = d.Set("endpoint", endpoints["vpc"]) - if err != nil { - return err - } - d.Set("kibana_endpoint", getKibanaEndpoint(d)) - if ds.Endpoint != nil { - return fmt.Errorf("%q: Elasticsearch domain in VPC expected to have null Endpoint value", d.Id()) - } - } else { - if ds.Endpoint != nil { - d.Set("endpoint", aws.StringValue(ds.Endpoint)) - d.Set("kibana_endpoint", getKibanaEndpoint(d)) - } - if ds.Endpoints != nil { - return fmt.Errorf("%q: Elasticsearch domain not in VPC expected to have null Endpoints value", d.Id()) - } - } - - if ds.LogPublishingOptions != nil { - m := make([]map[string]interface{}, 0) - for k, val := range ds.LogPublishingOptions { - mm := map[string]interface{}{} - mm["log_type"] = k - if val.CloudWatchLogsLogGroupArn != nil { - mm["cloudwatch_log_group_arn"] = aws.StringValue(val.CloudWatchLogsLogGroupArn) - } - mm["enabled"] = aws.BoolValue(val.Enabled) - m = append(m, mm) - } - d.Set("log_publishing_options", m) - } - - d.Set("arn", ds.ARN) - - listOut, err := conn.ListTags(&elasticsearch.ListTagsInput{ - ARN: ds.ARN, - }) - - if err != nil { - return err - } - var est []*elasticsearch.Tag - if len(listOut.TagList) > 0 { - est = listOut.TagList - } - - d.Set("tags", tagsToMapElasticsearchService(est)) - - return nil -} - -func resourceAwsElasticSearchDomainUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).esconn - - d.Partial(true) - - if err := setTagsElasticsearchService(conn, d, d.Id()); err != nil { - return err - } - - d.SetPartial("tags") - - input := elasticsearch.UpdateElasticsearchDomainConfigInput{ - DomainName: aws.String(d.Get("domain_name").(string)), - } - - if d.HasChange("access_policies") { - input.AccessPolicies = aws.String(d.Get("access_policies").(string)) - } - - if d.HasChange("advanced_options") { - input.AdvancedOptions = stringMapToPointers(d.Get("advanced_options").(map[string]interface{})) - } - - if d.HasChange("ebs_options") || d.HasChange("cluster_config") { - options := d.Get("ebs_options").([]interface{}) - - if len(options) == 1 { - s := options[0].(map[string]interface{}) - input.EBSOptions = expandESEBSOptions(s) - } - - if d.HasChange("cluster_config") { - config := d.Get("cluster_config").([]interface{}) - - if len(config) == 1 { - m := config[0].(map[string]interface{}) - input.ElasticsearchClusterConfig = expandESClusterConfig(m) - } - } - - } - - if d.HasChange("snapshot_options") { - options := d.Get("snapshot_options").([]interface{}) - - if len(options) == 1 { - o := options[0].(map[string]interface{}) - - snapshotOptions := elasticsearch.SnapshotOptions{ - AutomatedSnapshotStartHour: aws.Int64(int64(o["automated_snapshot_start_hour"].(int))), - } - - input.SnapshotOptions = &snapshotOptions - } - } - - if d.HasChange("vpc_options") { - options := d.Get("vpc_options").([]interface{}) - s := options[0].(map[string]interface{}) - input.VPCOptions = expandESVPCOptions(s) - } - - if d.HasChange("cognito_options") { - options := d.Get("cognito_options").([]interface{}) - input.CognitoOptions = expandESCognitoOptions(options) - } - - if d.HasChange("log_publishing_options") { - input.LogPublishingOptions = make(map[string]*elasticsearch.LogPublishingOption) - options := d.Get("log_publishing_options").(*schema.Set).List() - for _, vv := range options { - lo := vv.(map[string]interface{}) - input.LogPublishingOptions[lo["log_type"].(string)] = &elasticsearch.LogPublishingOption{ - CloudWatchLogsLogGroupArn: aws.String(lo["cloudwatch_log_group_arn"].(string)), - Enabled: aws.Bool(lo["enabled"].(bool)), - } - } - } - - _, err := conn.UpdateElasticsearchDomainConfig(&input) - if err != nil { - return err - } - - err = resource.Retry(60*time.Minute, func() *resource.RetryError { - out, err := conn.DescribeElasticsearchDomain(&elasticsearch.DescribeElasticsearchDomainInput{ - DomainName: aws.String(d.Get("domain_name").(string)), - }) - if err != nil { - return resource.NonRetryableError(err) - } - - if !*out.DomainStatus.Processing { - return nil - } - - return resource.RetryableError( - fmt.Errorf("%q: Timeout while waiting for changes to be processed", d.Id())) - }) - if err != nil { - return err - } - - if d.HasChange("elasticsearch_version") { - upgradeInput := elasticsearch.UpgradeElasticsearchDomainInput{ - DomainName: aws.String(d.Get("domain_name").(string)), - TargetVersion: aws.String(d.Get("elasticsearch_version").(string)), - } - - _, err := conn.UpgradeElasticsearchDomain(&upgradeInput) - if err != nil { - return fmt.Errorf("Failed to upgrade elasticsearch domain: %s", err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{elasticsearch.UpgradeStatusInProgress}, - Target: []string{elasticsearch.UpgradeStatusSucceeded}, - Refresh: func() (interface{}, string, error) { - out, err := conn.GetUpgradeStatus(&elasticsearch.GetUpgradeStatusInput{ - DomainName: aws.String(d.Get("domain_name").(string)), - }) - if err != nil { - return nil, "", err - } - - return out, aws.StringValue(out.StepStatus), nil - }, - Timeout: 60 * time.Minute, // TODO: Make this configurable. Large ES domains may take a very long time to upgrade - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // The upgrade status isn't instantly available for the current upgrade so will either be nil or reflect a previous upgrade - } - _, waitErr := stateConf.WaitForState() - if waitErr != nil { - return waitErr - } - } - - d.Partial(false) - - return resourceAwsElasticSearchDomainRead(d, meta) -} - -func resourceAwsElasticSearchDomainDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).esconn - domainName := d.Get("domain_name").(string) - - log.Printf("[DEBUG] Deleting ElasticSearch domain: %q", domainName) - _, err := conn.DeleteElasticsearchDomain(&elasticsearch.DeleteElasticsearchDomainInput{ - DomainName: aws.String(domainName), - }) - if err != nil { - if isAWSErr(err, elasticsearch.ErrCodeResourceNotFoundException, "") { - return nil - } - return err - } - - log.Printf("[DEBUG] Waiting for ElasticSearch domain %q to be deleted", domainName) - err = resourceAwsElasticSearchDomainDeleteWaiter(domainName, conn) - - return err -} - -func resourceAwsElasticSearchDomainDeleteWaiter(domainName string, conn *elasticsearch.ElasticsearchService) error { - input := &elasticsearch.DescribeElasticsearchDomainInput{ - DomainName: aws.String(domainName), - } - err := resource.Retry(90*time.Minute, func() *resource.RetryError { - out, err := conn.DescribeElasticsearchDomain(input) - - if err != nil { - if isAWSErr(err, elasticsearch.ErrCodeResourceNotFoundException, "") { - return nil - } - return resource.NonRetryableError(err) - } - - if out.DomainStatus != nil && !aws.BoolValue(out.DomainStatus.Processing) { - return nil - } - - return resource.RetryableError(fmt.Errorf("timeout while waiting for the domain %q to be deleted", domainName)) - }) - - return err -} - -func suppressEquivalentKmsKeyIds(k, old, new string, d *schema.ResourceData) bool { - // The Elasticsearch API accepts a short KMS key id but always returns the ARN of the key. - // The ARN is of the format 'arn:aws:kms:REGION:ACCOUNT_ID:key/KMS_KEY_ID'. - // These should be treated as equivalent. - return strings.Contains(old, new) -} - -func getKibanaEndpoint(d *schema.ResourceData) string { - return d.Get("endpoint").(string) + "/_plugin/kibana/" -} - -func esCognitoOptionsDiffSuppress(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false -} - -func isDedicatedMasterDisabled(k, old, new string, d *schema.ResourceData) bool { - v, ok := d.GetOk("cluster_config") - if ok { - clusterConfig := v.([]interface{})[0].(map[string]interface{}) - return !clusterConfig["dedicated_master_enabled"].(bool) - } - return false -} - -func expandESNodeToNodeEncryptionOptions(s map[string]interface{}) *elasticsearch.NodeToNodeEncryptionOptions { - options := elasticsearch.NodeToNodeEncryptionOptions{} - - if v, ok := s["enabled"]; ok { - options.Enabled = aws.Bool(v.(bool)) - } - return &options -} - -func flattenESNodeToNodeEncryptionOptions(o *elasticsearch.NodeToNodeEncryptionOptions) []map[string]interface{} { - if o == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{} - if o.Enabled != nil { - m["enabled"] = aws.BoolValue(o.Enabled) - } - - return []map[string]interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go deleted file mode 100644 index 46ae0c1f8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go +++ /dev/null @@ -1,122 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - elasticsearch "github.com/aws/aws-sdk-go/service/elasticsearchservice" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsElasticSearchDomainPolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElasticSearchDomainPolicyUpsert, - Read: resourceAwsElasticSearchDomainPolicyRead, - Update: resourceAwsElasticSearchDomainPolicyUpsert, - Delete: resourceAwsElasticSearchDomainPolicyDelete, - - Schema: map[string]*schema.Schema{ - "domain_name": { - Type: schema.TypeString, - Required: true, - }, - "access_policies": { - Type: schema.TypeString, - Required: true, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - }, - } -} - -func resourceAwsElasticSearchDomainPolicyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).esconn - name := d.Get("domain_name").(string) - out, err := conn.DescribeElasticsearchDomain(&elasticsearch.DescribeElasticsearchDomainInput{ - DomainName: aws.String(name), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" { - log.Printf("[WARN] ElasticSearch Domain %q not found, removing", name) - d.SetId("") - return nil - } - return err - } - - log.Printf("[DEBUG] Received ElasticSearch domain: %s", out) - - ds := out.DomainStatus - d.Set("access_policies", ds.AccessPolicies) - - return nil -} - -func resourceAwsElasticSearchDomainPolicyUpsert(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).esconn - domainName := d.Get("domain_name").(string) - _, err := conn.UpdateElasticsearchDomainConfig(&elasticsearch.UpdateElasticsearchDomainConfigInput{ - DomainName: aws.String(domainName), - AccessPolicies: aws.String(d.Get("access_policies").(string)), - }) - if err != nil { - return err - } - - d.SetId("esd-policy-" + domainName) - - err = resource.Retry(50*time.Minute, func() *resource.RetryError { - out, err := conn.DescribeElasticsearchDomain(&elasticsearch.DescribeElasticsearchDomainInput{ - DomainName: aws.String(d.Get("domain_name").(string)), - }) - if err != nil { - return resource.NonRetryableError(err) - } - - if !*out.DomainStatus.Processing { - return nil - } - - return resource.RetryableError( - fmt.Errorf("%q: Timeout while waiting for changes to be processed", d.Id())) - }) - if err != nil { - return err - } - - return resourceAwsElasticSearchDomainPolicyRead(d, meta) -} - -func resourceAwsElasticSearchDomainPolicyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).esconn - - _, err := conn.UpdateElasticsearchDomainConfig(&elasticsearch.UpdateElasticsearchDomainConfigInput{ - DomainName: aws.String(d.Get("domain_name").(string)), - AccessPolicies: aws.String(""), - }) - if err != nil { - return err - } - - log.Printf("[DEBUG] Waiting for ElasticSearch domain policy %q to be deleted", d.Get("domain_name").(string)) - err = resource.Retry(60*time.Minute, func() *resource.RetryError { - out, err := conn.DescribeElasticsearchDomain(&elasticsearch.DescribeElasticsearchDomainInput{ - DomainName: aws.String(d.Get("domain_name").(string)), - }) - if err != nil { - return resource.NonRetryableError(err) - } - - if !*out.DomainStatus.Processing { - return nil - } - - return resource.RetryableError( - fmt.Errorf("%q: Timeout while waiting for policy to be deleted", d.Id())) - }) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go deleted file mode 100644 index 331c9b711..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go +++ /dev/null @@ -1,1091 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "regexp" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsElb() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElbCreate, - Read: resourceAwsElbRead, - Update: resourceAwsElbUpdate, - Delete: resourceAwsElbDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateElbName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateElbNamePrefix, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "internal": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "cross_zone_load_balancing": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "availability_zones": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Computed: true, - Set: schema.HashString, - }, - - "instances": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Computed: true, - Set: schema.HashString, - }, - - "security_groups": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Computed: true, - Set: schema.HashString, - }, - - "source_security_group": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "source_security_group_id": { - Type: schema.TypeString, - Computed: true, - }, - - "subnets": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Computed: true, - Set: schema.HashString, - }, - - "idle_timeout": { - Type: schema.TypeInt, - Optional: true, - Default: 60, - ValidateFunc: validation.IntBetween(1, 4000), - }, - - "connection_draining": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "connection_draining_timeout": { - Type: schema.TypeInt, - Optional: true, - Default: 300, - }, - - "access_logs": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "interval": { - Type: schema.TypeInt, - Optional: true, - Default: 60, - ValidateFunc: validateAccessLogsInterval, - }, - "bucket": { - Type: schema.TypeString, - Required: true, - }, - "bucket_prefix": { - Type: schema.TypeString, - Optional: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - }, - }, - }, - - "listener": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "instance_port": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(1, 65535), - }, - - "instance_protocol": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateListenerProtocol(), - }, - - "lb_port": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(1, 65535), - }, - - "lb_protocol": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateListenerProtocol(), - }, - - "ssl_certificate_id": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - }, - }, - Set: resourceAwsElbListenerHash, - }, - - "health_check": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "healthy_threshold": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(2, 10), - }, - - "unhealthy_threshold": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(2, 10), - }, - - "target": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateHeathCheckTarget, - }, - - "interval": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(5, 300), - }, - - "timeout": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(2, 60), - }, - }, - }, - }, - - "dns_name": { - Type: schema.TypeString, - Computed: true, - }, - - "zone_id": { - Type: schema.TypeString, - Computed: true, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsElbCreate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - // Expand the "listener" set to aws-sdk-go compat []*elb.Listener - listeners, err := expandListeners(d.Get("listener").(*schema.Set).List()) - if err != nil { - return err - } - - var elbName string - if v, ok := d.GetOk("name"); ok { - elbName = v.(string) - } else { - if v, ok := d.GetOk("name_prefix"); ok { - elbName = resource.PrefixedUniqueId(v.(string)) - } else { - elbName = resource.PrefixedUniqueId("tf-lb-") - } - d.Set("name", elbName) - } - - tags := tagsFromMapELB(d.Get("tags").(map[string]interface{})) - // Provision the elb - elbOpts := &elb.CreateLoadBalancerInput{ - LoadBalancerName: aws.String(elbName), - Listeners: listeners, - Tags: tags, - } - - if scheme, ok := d.GetOk("internal"); ok && scheme.(bool) { - elbOpts.Scheme = aws.String("internal") - } - - if v, ok := d.GetOk("availability_zones"); ok { - elbOpts.AvailabilityZones = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("security_groups"); ok { - elbOpts.SecurityGroups = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("subnets"); ok { - elbOpts.Subnets = expandStringList(v.(*schema.Set).List()) - } - - log.Printf("[DEBUG] ELB create configuration: %#v", elbOpts) - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := elbconn.CreateLoadBalancer(elbOpts) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Check for IAM SSL Cert error, eventual consistancy issue - if awsErr.Code() == "CertificateNotFound" { - return resource.RetryableError( - fmt.Errorf("Error creating ELB Listener with SSL Cert, retrying: %s", err)) - } - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return err - } - - // Assign the elb's unique identifier for use later - d.SetId(elbName) - log.Printf("[INFO] ELB ID: %s", d.Id()) - - // Enable partial mode and record what we set - d.Partial(true) - d.SetPartial("name") - d.SetPartial("internal") - d.SetPartial("availability_zones") - d.SetPartial("listener") - d.SetPartial("security_groups") - d.SetPartial("subnets") - - d.Set("tags", tagsToMapELB(tags)) - - return resourceAwsElbUpdate(d, meta) -} - -func resourceAwsElbRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - elbName := d.Id() - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "elasticloadbalancing", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("loadbalancer/%s", d.Id()), - } - d.Set("arn", arn.String()) - - // Retrieve the ELB properties for updating the state - describeElbOpts := &elb.DescribeLoadBalancersInput{ - LoadBalancerNames: []*string{aws.String(elbName)}, - } - - describeResp, err := elbconn.DescribeLoadBalancers(describeElbOpts) - if err != nil { - if isLoadBalancerNotFound(err) { - // The ELB is gone now, so just remove it from the state - d.SetId("") - return nil - } - - return fmt.Errorf("Error retrieving ELB: %s", err) - } - if len(describeResp.LoadBalancerDescriptions) != 1 { - return fmt.Errorf("Unable to find ELB: %#v", describeResp.LoadBalancerDescriptions) - } - - return flattenAwsELbResource(d, meta.(*AWSClient).ec2conn, elbconn, describeResp.LoadBalancerDescriptions[0]) -} - -// flattenAwsELbResource takes a *elbv2.LoadBalancer and populates all respective resource fields. -func flattenAwsELbResource(d *schema.ResourceData, ec2conn *ec2.EC2, elbconn *elb.ELB, lb *elb.LoadBalancerDescription) error { - describeAttrsOpts := &elb.DescribeLoadBalancerAttributesInput{ - LoadBalancerName: aws.String(d.Id()), - } - describeAttrsResp, err := elbconn.DescribeLoadBalancerAttributes(describeAttrsOpts) - if err != nil { - return fmt.Errorf("Error retrieving ELB: %s", err) - } - - lbAttrs := describeAttrsResp.LoadBalancerAttributes - - d.Set("name", lb.LoadBalancerName) - d.Set("dns_name", lb.DNSName) - d.Set("zone_id", lb.CanonicalHostedZoneNameID) - - var scheme bool - if lb.Scheme != nil { - scheme = *lb.Scheme == "internal" - } - d.Set("internal", scheme) - d.Set("availability_zones", flattenStringList(lb.AvailabilityZones)) - d.Set("instances", flattenInstances(lb.Instances)) - d.Set("listener", flattenListeners(lb.ListenerDescriptions)) - d.Set("security_groups", flattenStringList(lb.SecurityGroups)) - if lb.SourceSecurityGroup != nil { - group := lb.SourceSecurityGroup.GroupName - if lb.SourceSecurityGroup.OwnerAlias != nil && *lb.SourceSecurityGroup.OwnerAlias != "" { - group = aws.String(*lb.SourceSecurityGroup.OwnerAlias + "/" + *lb.SourceSecurityGroup.GroupName) - } - d.Set("source_security_group", group) - - // Manually look up the ELB Security Group ID, since it's not provided - var elbVpc string - if lb.VPCId != nil { - elbVpc = *lb.VPCId - sgId, err := sourceSGIdByName(ec2conn, *lb.SourceSecurityGroup.GroupName, elbVpc) - if err != nil { - return fmt.Errorf("Error looking up ELB Security Group ID: %s", err) - } else { - d.Set("source_security_group_id", sgId) - } - } - } - d.Set("subnets", flattenStringList(lb.Subnets)) - if lbAttrs.ConnectionSettings != nil { - d.Set("idle_timeout", lbAttrs.ConnectionSettings.IdleTimeout) - } - d.Set("connection_draining", lbAttrs.ConnectionDraining.Enabled) - d.Set("connection_draining_timeout", lbAttrs.ConnectionDraining.Timeout) - d.Set("cross_zone_load_balancing", lbAttrs.CrossZoneLoadBalancing.Enabled) - if lbAttrs.AccessLog != nil { - // The AWS API does not allow users to remove access_logs, only disable them. - // During creation of the ELB, Terraform sets the access_logs to disabled, - // so there should not be a case where lbAttrs.AccessLog above is nil. - - // Here we do not record the remove value of access_log if: - // - there is no access_log block in the configuration - // - the remote access_logs are disabled - // - // This indicates there is no access_log in the configuration. - // - externally added access_logs will be enabled, so we'll detect the drift - // - locally added access_logs will be in the config, so we'll add to the - // API/state - // See https://github.com/hashicorp/terraform/issues/10138 - _, n := d.GetChange("access_logs") - elbal := lbAttrs.AccessLog - nl := n.([]interface{}) - if len(nl) == 0 && !*elbal.Enabled { - elbal = nil - } - if err := d.Set("access_logs", flattenAccessLog(elbal)); err != nil { - return err - } - } - - resp, err := elbconn.DescribeTags(&elb.DescribeTagsInput{ - LoadBalancerNames: []*string{lb.LoadBalancerName}, - }) - if err != nil { - return fmt.Errorf("error describing tags for ELB (%s): %s", d.Id(), err) - } - - var et []*elb.Tag - if len(resp.TagDescriptions) > 0 { - et = resp.TagDescriptions[0].Tags - } - d.Set("tags", tagsToMapELB(et)) - - // There's only one health check, so save that to state as we - // currently can - if *lb.HealthCheck.Target != "" { - d.Set("health_check", flattenHealthCheck(lb.HealthCheck)) - } - - return nil -} - -func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - d.Partial(true) - - if d.HasChange("listener") { - o, n := d.GetChange("listener") - os := o.(*schema.Set) - ns := n.(*schema.Set) - - remove, _ := expandListeners(os.Difference(ns).List()) - add, err := expandListeners(ns.Difference(os).List()) - if err != nil { - return err - } - - if len(remove) > 0 { - ports := make([]*int64, 0, len(remove)) - for _, listener := range remove { - ports = append(ports, listener.LoadBalancerPort) - } - - deleteListenersOpts := &elb.DeleteLoadBalancerListenersInput{ - LoadBalancerName: aws.String(d.Id()), - LoadBalancerPorts: ports, - } - - log.Printf("[DEBUG] ELB Delete Listeners opts: %s", deleteListenersOpts) - _, err := elbconn.DeleteLoadBalancerListeners(deleteListenersOpts) - if err != nil { - return fmt.Errorf("Failure removing outdated ELB listeners: %s", err) - } - } - - if len(add) > 0 { - createListenersOpts := &elb.CreateLoadBalancerListenersInput{ - LoadBalancerName: aws.String(d.Id()), - Listeners: add, - } - - // Occasionally AWS will error with a 'duplicate listener', without any - // other listeners on the ELB. Retry here to eliminate that. - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] ELB Create Listeners opts: %s", createListenersOpts) - if _, err := elbconn.CreateLoadBalancerListeners(createListenersOpts); err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "DuplicateListener" { - log.Printf("[DEBUG] Duplicate listener found for ELB (%s), retrying", d.Id()) - return resource.RetryableError(awsErr) - } - if awsErr.Code() == "CertificateNotFound" && strings.Contains(awsErr.Message(), "Server Certificate not found for the key: arn") { - log.Printf("[DEBUG] SSL Cert not found for given ARN, retrying") - return resource.RetryableError(awsErr) - } - } - - // Didn't recognize the error, so shouldn't retry. - return resource.NonRetryableError(err) - } - // Successful creation - return nil - }) - if err != nil { - return fmt.Errorf("Failure adding new or updated ELB listeners: %s", err) - } - } - - d.SetPartial("listener") - } - - // If we currently have instances, or did have instances, - // we want to figure out what to add and remove from the load - // balancer - if d.HasChange("instances") { - o, n := d.GetChange("instances") - os := o.(*schema.Set) - ns := n.(*schema.Set) - remove := expandInstanceString(os.Difference(ns).List()) - add := expandInstanceString(ns.Difference(os).List()) - - if len(add) > 0 { - registerInstancesOpts := elb.RegisterInstancesWithLoadBalancerInput{ - LoadBalancerName: aws.String(d.Id()), - Instances: add, - } - - _, err := elbconn.RegisterInstancesWithLoadBalancer(®isterInstancesOpts) - if err != nil { - return fmt.Errorf("Failure registering instances with ELB: %s", err) - } - } - if len(remove) > 0 { - deRegisterInstancesOpts := elb.DeregisterInstancesFromLoadBalancerInput{ - LoadBalancerName: aws.String(d.Id()), - Instances: remove, - } - - _, err := elbconn.DeregisterInstancesFromLoadBalancer(&deRegisterInstancesOpts) - if err != nil { - return fmt.Errorf("Failure deregistering instances from ELB: %s", err) - } - } - - d.SetPartial("instances") - } - - if d.HasChange("cross_zone_load_balancing") || d.HasChange("idle_timeout") || d.HasChange("access_logs") { - attrs := elb.ModifyLoadBalancerAttributesInput{ - LoadBalancerName: aws.String(d.Get("name").(string)), - LoadBalancerAttributes: &elb.LoadBalancerAttributes{ - CrossZoneLoadBalancing: &elb.CrossZoneLoadBalancing{ - Enabled: aws.Bool(d.Get("cross_zone_load_balancing").(bool)), - }, - ConnectionSettings: &elb.ConnectionSettings{ - IdleTimeout: aws.Int64(int64(d.Get("idle_timeout").(int))), - }, - }, - } - - logs := d.Get("access_logs").([]interface{}) - if len(logs) == 1 { - l := logs[0].(map[string]interface{}) - attrs.LoadBalancerAttributes.AccessLog = &elb.AccessLog{ - Enabled: aws.Bool(l["enabled"].(bool)), - EmitInterval: aws.Int64(int64(l["interval"].(int))), - S3BucketName: aws.String(l["bucket"].(string)), - S3BucketPrefix: aws.String(l["bucket_prefix"].(string)), - } - } else if len(logs) == 0 { - // disable access logs - attrs.LoadBalancerAttributes.AccessLog = &elb.AccessLog{ - Enabled: aws.Bool(false), - } - } - - log.Printf("[DEBUG] ELB Modify Load Balancer Attributes Request: %#v", attrs) - _, err := elbconn.ModifyLoadBalancerAttributes(&attrs) - if err != nil { - return fmt.Errorf("Failure configuring ELB attributes: %s", err) - } - - d.SetPartial("cross_zone_load_balancing") - d.SetPartial("idle_timeout") - d.SetPartial("connection_draining_timeout") - } - - // We have to do these changes separately from everything else since - // they have some weird undocumented rules. You can't set the timeout - // without having connection draining to true, so we set that to true, - // set the timeout, then reset it to false if requested. - if d.HasChange("connection_draining") || d.HasChange("connection_draining_timeout") { - // We do timeout changes first since they require us to set draining - // to true for a hot second. - if d.HasChange("connection_draining_timeout") { - attrs := elb.ModifyLoadBalancerAttributesInput{ - LoadBalancerName: aws.String(d.Get("name").(string)), - LoadBalancerAttributes: &elb.LoadBalancerAttributes{ - ConnectionDraining: &elb.ConnectionDraining{ - Enabled: aws.Bool(true), - Timeout: aws.Int64(int64(d.Get("connection_draining_timeout").(int))), - }, - }, - } - - _, err := elbconn.ModifyLoadBalancerAttributes(&attrs) - if err != nil { - return fmt.Errorf("Failure configuring ELB attributes: %s", err) - } - - d.SetPartial("connection_draining_timeout") - } - - // Then we always set connection draining even if there is no change. - // This lets us reset to "false" if requested even with a timeout - // change. - attrs := elb.ModifyLoadBalancerAttributesInput{ - LoadBalancerName: aws.String(d.Get("name").(string)), - LoadBalancerAttributes: &elb.LoadBalancerAttributes{ - ConnectionDraining: &elb.ConnectionDraining{ - Enabled: aws.Bool(d.Get("connection_draining").(bool)), - }, - }, - } - - _, err := elbconn.ModifyLoadBalancerAttributes(&attrs) - if err != nil { - return fmt.Errorf("Failure configuring ELB attributes: %s", err) - } - - d.SetPartial("connection_draining") - } - - if d.HasChange("health_check") { - hc := d.Get("health_check").([]interface{}) - if len(hc) > 0 { - check := hc[0].(map[string]interface{}) - configureHealthCheckOpts := elb.ConfigureHealthCheckInput{ - LoadBalancerName: aws.String(d.Id()), - HealthCheck: &elb.HealthCheck{ - HealthyThreshold: aws.Int64(int64(check["healthy_threshold"].(int))), - UnhealthyThreshold: aws.Int64(int64(check["unhealthy_threshold"].(int))), - Interval: aws.Int64(int64(check["interval"].(int))), - Target: aws.String(check["target"].(string)), - Timeout: aws.Int64(int64(check["timeout"].(int))), - }, - } - _, err := elbconn.ConfigureHealthCheck(&configureHealthCheckOpts) - if err != nil { - return fmt.Errorf("Failure configuring health check for ELB: %s", err) - } - d.SetPartial("health_check") - } - } - - if d.HasChange("security_groups") { - groups := d.Get("security_groups").(*schema.Set).List() - - applySecurityGroupsOpts := elb.ApplySecurityGroupsToLoadBalancerInput{ - LoadBalancerName: aws.String(d.Id()), - SecurityGroups: expandStringList(groups), - } - - _, err := elbconn.ApplySecurityGroupsToLoadBalancer(&applySecurityGroupsOpts) - if err != nil { - return fmt.Errorf("Failure applying security groups to ELB: %s", err) - } - - d.SetPartial("security_groups") - } - - if d.HasChange("availability_zones") { - o, n := d.GetChange("availability_zones") - os := o.(*schema.Set) - ns := n.(*schema.Set) - - removed := expandStringList(os.Difference(ns).List()) - added := expandStringList(ns.Difference(os).List()) - - if len(added) > 0 { - enableOpts := &elb.EnableAvailabilityZonesForLoadBalancerInput{ - LoadBalancerName: aws.String(d.Id()), - AvailabilityZones: added, - } - - log.Printf("[DEBUG] ELB enable availability zones opts: %s", enableOpts) - _, err := elbconn.EnableAvailabilityZonesForLoadBalancer(enableOpts) - if err != nil { - return fmt.Errorf("Failure enabling ELB availability zones: %s", err) - } - } - - if len(removed) > 0 { - disableOpts := &elb.DisableAvailabilityZonesForLoadBalancerInput{ - LoadBalancerName: aws.String(d.Id()), - AvailabilityZones: removed, - } - - log.Printf("[DEBUG] ELB disable availability zones opts: %s", disableOpts) - _, err := elbconn.DisableAvailabilityZonesForLoadBalancer(disableOpts) - if err != nil { - return fmt.Errorf("Failure disabling ELB availability zones: %s", err) - } - } - - d.SetPartial("availability_zones") - } - - if d.HasChange("subnets") { - o, n := d.GetChange("subnets") - os := o.(*schema.Set) - ns := n.(*schema.Set) - - removed := expandStringList(os.Difference(ns).List()) - added := expandStringList(ns.Difference(os).List()) - - if len(removed) > 0 { - detachOpts := &elb.DetachLoadBalancerFromSubnetsInput{ - LoadBalancerName: aws.String(d.Id()), - Subnets: removed, - } - - log.Printf("[DEBUG] ELB detach subnets opts: %s", detachOpts) - _, err := elbconn.DetachLoadBalancerFromSubnets(detachOpts) - if err != nil { - return fmt.Errorf("Failure removing ELB subnets: %s", err) - } - } - - if len(added) > 0 { - attachOpts := &elb.AttachLoadBalancerToSubnetsInput{ - LoadBalancerName: aws.String(d.Id()), - Subnets: added, - } - - log.Printf("[DEBUG] ELB attach subnets opts: %s", attachOpts) - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := elbconn.AttachLoadBalancerToSubnets(attachOpts) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // eventually consistent issue with removing a subnet in AZ1 and - // immediately adding a new one in the same AZ - if awsErr.Code() == "InvalidConfigurationRequest" && strings.Contains(awsErr.Message(), "cannot be attached to multiple subnets in the same AZ") { - log.Printf("[DEBUG] retrying az association") - return resource.RetryableError(awsErr) - } - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Failure adding ELB subnets: %s", err) - } - } - - d.SetPartial("subnets") - } - - if err := setTagsELB(elbconn, d); err != nil { - return err - } - - d.SetPartial("tags") - d.Partial(false) - - return resourceAwsElbRead(d, meta) -} - -func resourceAwsElbDelete(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - log.Printf("[INFO] Deleting ELB: %s", d.Id()) - - // Destroy the load balancer - deleteElbOpts := elb.DeleteLoadBalancerInput{ - LoadBalancerName: aws.String(d.Id()), - } - if _, err := elbconn.DeleteLoadBalancer(&deleteElbOpts); err != nil { - return fmt.Errorf("Error deleting ELB: %s", err) - } - - name := d.Get("name").(string) - - err := cleanupELBNetworkInterfaces(meta.(*AWSClient).ec2conn, name) - if err != nil { - log.Printf("[WARN] Failed to cleanup ENIs for ELB %q: %#v", name, err) - } - - return nil -} - -func resourceAwsElbListenerHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%d-", m["instance_port"].(int))) - buf.WriteString(fmt.Sprintf("%s-", - strings.ToLower(m["instance_protocol"].(string)))) - buf.WriteString(fmt.Sprintf("%d-", m["lb_port"].(int))) - buf.WriteString(fmt.Sprintf("%s-", - strings.ToLower(m["lb_protocol"].(string)))) - - if v, ok := m["ssl_certificate_id"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - return hashcode.String(buf.String()) -} - -func isLoadBalancerNotFound(err error) bool { - elberr, ok := err.(awserr.Error) - return ok && elberr.Code() == "LoadBalancerNotFound" -} - -func sourceSGIdByName(conn *ec2.EC2, sg, vpcId string) (string, error) { - var filters []*ec2.Filter - var sgFilterName, sgFilterVPCID *ec2.Filter - sgFilterName = &ec2.Filter{ - Name: aws.String("group-name"), - Values: []*string{aws.String(sg)}, - } - - if vpcId != "" { - sgFilterVPCID = &ec2.Filter{ - Name: aws.String("vpc-id"), - Values: []*string{aws.String(vpcId)}, - } - } - - filters = append(filters, sgFilterName) - - if sgFilterVPCID != nil { - filters = append(filters, sgFilterVPCID) - } - - req := &ec2.DescribeSecurityGroupsInput{ - Filters: filters, - } - resp, err := conn.DescribeSecurityGroups(req) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - if ec2err.Code() == "InvalidSecurityGroupID.NotFound" || - ec2err.Code() == "InvalidGroup.NotFound" { - resp = nil - err = nil - } - } - - if err != nil { - log.Printf("Error on ELB SG look up: %s", err) - return "", err - } - } - - if resp == nil || len(resp.SecurityGroups) == 0 { - return "", fmt.Errorf("No security groups found for name %s and vpc id %s", sg, vpcId) - } - - group := resp.SecurityGroups[0] - return *group.GroupId, nil -} - -func validateAccessLogsInterval(v interface{}, k string) (ws []string, errors []error) { - value := v.(int) - - // Check if the value is either 5 or 60 (minutes). - if value != 5 && value != 60 { - errors = append(errors, fmt.Errorf( - "%q contains an invalid Access Logs interval \"%d\". "+ - "Valid intervals are either 5 or 60 (minutes).", - k, value)) - } - return -} - -func validateHeathCheckTarget(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - // Parse the Health Check target value. - matches := regexp.MustCompile(`\A(\w+):(\d+)(.+)?\z`).FindStringSubmatch(value) - - // Check if the value contains a valid target. - if matches == nil || len(matches) < 1 { - errors = append(errors, fmt.Errorf( - "%q contains an invalid Health Check: %s", - k, value)) - - // Invalid target? Return immediately, - // there is no need to collect other - // errors. - return - } - - // Check if the value contains a valid protocol. - if !isValidProtocol(matches[1]) { - errors = append(errors, fmt.Errorf( - "%q contains an invalid Health Check protocol %q. "+ - "Valid protocols are either %q, %q, %q, or %q.", - k, matches[1], "TCP", "SSL", "HTTP", "HTTPS")) - } - - // Check if the value contains a valid port range. - port, _ := strconv.Atoi(matches[2]) - if port < 1 || port > 65535 { - errors = append(errors, fmt.Errorf( - "%q contains an invalid Health Check target port \"%d\". "+ - "Valid port is in the range from 1 to 65535 inclusive.", - k, port)) - } - - switch strings.ToLower(matches[1]) { - case "tcp", "ssl": - // Check if value is in the form : for TCP and/or SSL. - if matches[3] != "" { - errors = append(errors, fmt.Errorf( - "%q cannot contain a path in the Health Check target: %s", - k, value)) - } - - case "http", "https": - // Check if value is in the form :/ for HTTP and/or HTTPS. - if matches[3] == "" { - errors = append(errors, fmt.Errorf( - "%q must contain a path in the Health Check target: %s", - k, value)) - } - - // Cannot be longer than 1024 multibyte characters. - if len([]rune(matches[3])) > 1024 { - errors = append(errors, fmt.Errorf("%q cannot contain a path longer "+ - "than 1024 characters in the Health Check target: %s", - k, value)) - } - - } - - return -} - -func isValidProtocol(s string) bool { - if s == "" { - return false - } - s = strings.ToLower(s) - - validProtocols := map[string]bool{ - "http": true, - "https": true, - "ssl": true, - "tcp": true, - } - - if _, ok := validProtocols[s]; !ok { - return false - } - - return true -} - -func validateListenerProtocol() schema.SchemaValidateFunc { - return validation.StringInSlice([]string{ - "HTTP", - "HTTPS", - "SSL", - "TCP", - }, true) -} - -// ELB automatically creates ENI(s) on creation -// but the cleanup is asynchronous and may take time -// which then blocks IGW, SG or VPC on deletion -// So we make the cleanup "synchronous" here -func cleanupELBNetworkInterfaces(conn *ec2.EC2, name string) error { - out, err := conn.DescribeNetworkInterfaces(&ec2.DescribeNetworkInterfacesInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("attachment.instance-owner-id"), - Values: []*string{aws.String("amazon-elb")}, - }, - { - Name: aws.String("description"), - Values: []*string{aws.String("ELB " + name)}, - }, - }, - }) - if err != nil { - return err - } - - log.Printf("[DEBUG] Found %d ENIs to cleanup for ELB %q", - len(out.NetworkInterfaces), name) - - if len(out.NetworkInterfaces) == 0 { - // Nothing to cleanup - return nil - } - - err = detachNetworkInterfaces(conn, out.NetworkInterfaces) - if err != nil { - return err - } - - err = deleteNetworkInterfaces(conn, out.NetworkInterfaces) - return err -} - -func detachNetworkInterfaces(conn *ec2.EC2, nis []*ec2.NetworkInterface) error { - log.Printf("[DEBUG] Trying to detach %d leftover ENIs", len(nis)) - for _, ni := range nis { - if ni.Attachment == nil { - log.Printf("[DEBUG] ENI %s is already detached", *ni.NetworkInterfaceId) - continue - } - _, err := conn.DetachNetworkInterface(&ec2.DetachNetworkInterfaceInput{ - AttachmentId: ni.Attachment.AttachmentId, - Force: aws.Bool(true), - }) - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "InvalidAttachmentID.NotFound" { - log.Printf("[DEBUG] ENI %s is already detached", *ni.NetworkInterfaceId) - continue - } - return err - } - - log.Printf("[DEBUG] Waiting for ENI (%s) to become detached", *ni.NetworkInterfaceId) - stateConf := &resource.StateChangeConf{ - Pending: []string{"true"}, - Target: []string{"false"}, - Refresh: networkInterfaceAttachmentRefreshFunc(conn, *ni.NetworkInterfaceId), - Timeout: 10 * time.Minute, - } - - if _, err := stateConf.WaitForState(); err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "InvalidNetworkInterfaceID.NotFound" { - continue - } - return fmt.Errorf( - "Error waiting for ENI (%s) to become detached: %s", *ni.NetworkInterfaceId, err) - } - } - return nil -} - -func deleteNetworkInterfaces(conn *ec2.EC2, nis []*ec2.NetworkInterface) error { - log.Printf("[DEBUG] Trying to delete %d leftover ENIs", len(nis)) - for _, ni := range nis { - _, err := conn.DeleteNetworkInterface(&ec2.DeleteNetworkInterfaceInput{ - NetworkInterfaceId: ni.NetworkInterfaceId, - }) - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "InvalidNetworkInterfaceID.NotFound" { - log.Printf("[DEBUG] ENI %s is already deleted", *ni.NetworkInterfaceId) - continue - } - return err - } - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb_attachment.go deleted file mode 100644 index 119c4e663..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb_attachment.go +++ /dev/null @@ -1,121 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsElbAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsElbAttachmentCreate, - Read: resourceAwsElbAttachmentRead, - Delete: resourceAwsElbAttachmentDelete, - - Schema: map[string]*schema.Schema{ - "elb": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - - "instance": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - }, - } -} - -func resourceAwsElbAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - elbName := d.Get("elb").(string) - - instance := d.Get("instance").(string) - - registerInstancesOpts := elb.RegisterInstancesWithLoadBalancerInput{ - LoadBalancerName: aws.String(elbName), - Instances: []*elb.Instance{{InstanceId: aws.String(instance)}}, - } - - log.Printf("[INFO] registering instance %s with ELB %s", instance, elbName) - - _, err := elbconn.RegisterInstancesWithLoadBalancer(®isterInstancesOpts) - if err != nil { - return fmt.Errorf("Failure registering instances with ELB: %s", err) - } - - d.SetId(resource.PrefixedUniqueId(fmt.Sprintf("%s-", elbName))) - - return nil -} - -func resourceAwsElbAttachmentRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - elbName := d.Get("elb").(string) - - // only add the instance that was previously defined for this resource - expected := d.Get("instance").(string) - - // Retrieve the ELB properties to get a list of attachments - describeElbOpts := &elb.DescribeLoadBalancersInput{ - LoadBalancerNames: []*string{aws.String(elbName)}, - } - - resp, err := elbconn.DescribeLoadBalancers(describeElbOpts) - if err != nil { - if isLoadBalancerNotFound(err) { - log.Printf("[ERROR] ELB %s not found", elbName) - d.SetId("") - return nil - } - return fmt.Errorf("Error retrieving ELB: %s", err) - } - if len(resp.LoadBalancerDescriptions) != 1 { - log.Printf("[ERROR] Unable to find ELB: %s", resp.LoadBalancerDescriptions) - d.SetId("") - return nil - } - - // only set the instance Id that this resource manages - found := false - for _, i := range resp.LoadBalancerDescriptions[0].Instances { - if expected == *i.InstanceId { - d.Set("instance", expected) - found = true - } - } - - if !found { - log.Printf("[WARN] instance %s not found in elb attachments", expected) - d.SetId("") - } - - return nil -} - -func resourceAwsElbAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - elbName := d.Get("elb").(string) - - instance := d.Get("instance").(string) - - log.Printf("[INFO] Deleting Attachment %s from: %s", instance, elbName) - - deRegisterInstancesOpts := elb.DeregisterInstancesFromLoadBalancerInput{ - LoadBalancerName: aws.String(elbName), - Instances: []*elb.Instance{{InstanceId: aws.String(instance)}}, - } - - _, err := elbconn.DeregisterInstancesFromLoadBalancer(&deRegisterInstancesOpts) - if err != nil { - return fmt.Errorf("Failure deregistering instances from ELB: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go deleted file mode 100644 index 8cb418e38..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go +++ /dev/null @@ -1,1720 +0,0 @@ -package aws - -import ( - "bytes" - "log" - - "encoding/json" - "fmt" - "io/ioutil" - "net/http" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" - "github.com/aws/aws-sdk-go/service/emr" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEMRCluster() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEMRClusterCreate, - Read: resourceAwsEMRClusterRead, - Update: resourceAwsEMRClusterUpdate, - Delete: resourceAwsEMRClusterDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - CustomizeDiff: func(diff *schema.ResourceDiff, v interface{}) error { - if diff.HasChange("instance_group") { - o, n := diff.GetChange("instance_group") - oSet := o.(*schema.Set).List() - nSet := n.(*schema.Set).List() - - // Everything in instance group needs to be set to forcenew if the autoscaling policy doesn't change - if len(oSet) != len(nSet) { - return nil - } - for _, currInstanceGroup := range oSet { - for _, nextInstanceGroup := range nSet { - oInstanceGroup := currInstanceGroup.(map[string]interface{}) - nInstanceGroup := nextInstanceGroup.(map[string]interface{}) - - if oInstanceGroup["instance_role"].(string) != nInstanceGroup["instance_role"].(string) || oInstanceGroup["name"].(string) != nInstanceGroup["name"].(string) { - continue - } - - oAutoScalingPolicy := oInstanceGroup["autoscaling_policy"].(string) - nAutoScalingPolicy := nInstanceGroup["autoscaling_policy"].(string) - - if oAutoScalingPolicy == "" && nAutoScalingPolicy == "" { - continue - } - - oJSON, err := structure.NormalizeJsonString(oAutoScalingPolicy) - if err != nil { - return fmt.Errorf("error reading old json value: %s", err) - } - nJSON, err := structure.NormalizeJsonString(nAutoScalingPolicy) - if err != nil { - return fmt.Errorf("error reading new json value: %s", err) - } - - if oJSON != nJSON { - continue - } - for _, k := range diff.GetChangedKeysPrefix(fmt.Sprintf("instance_group.%d", resourceAwsEMRClusterInstanceGroupHash(oInstanceGroup))) { - if strings.HasSuffix(k, ".#") { - k = strings.TrimSuffix(k, ".#") - } - diff.ForceNew(k) - } - break - } - } - } - return nil - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "release_label": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "master_instance_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - "additional_info": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentJsonDiffs, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - }, - "core_instance_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - "core_instance_count": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(1), - Computed: true, - }, - "cluster_state": { - Type: schema.TypeString, - Computed: true, - }, - "log_uri": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - // EMR uses a proprietary filesystem called EMRFS - // and both s3n & s3 protocols are mapped to that FS - // so they're equvivalent in this context (confirmed by AWS support) - old = strings.Replace(old, "s3n://", "s3://", -1) - return old == new - }, - }, - "master_public_dns": { - Type: schema.TypeString, - Computed: true, - }, - "applications": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "termination_protection": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - "keep_job_flow_alive_when_no_steps": { - Type: schema.TypeBool, - ForceNew: true, - Optional: true, - Computed: true, - }, - "ec2_attributes": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "subnet_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "additional_master_security_groups": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "additional_slave_security_groups": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "emr_managed_master_security_group": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "emr_managed_slave_security_group": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "instance_profile": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "service_access_security_group": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - "kerberos_attributes": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "ad_domain_join_password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - ForceNew: true, - }, - "ad_domain_join_user": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "cross_realm_trust_principal_password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - ForceNew: true, - }, - "kdc_admin_password": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - ForceNew: true, - }, - "realm": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - }, - }, - "instance_group": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bid_price": { - Type: schema.TypeString, - Optional: true, - }, - "ebs_config": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "iops": { - Type: schema.TypeInt, - Optional: true, - }, - "size": { - Type: schema.TypeInt, - Required: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateAwsEmrEbsVolumeType(), - }, - "volumes_per_instance": { - Type: schema.TypeInt, - Optional: true, - Default: 1, - }, - }, - }, - Set: resourceAwsEMRClusterEBSConfigHash, - }, - "instance_count": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - "autoscaling_policy": { - Type: schema.TypeString, - Optional: true, - DiffSuppressFunc: suppressEquivalentJsonDiffs, - ValidateFunc: validation.ValidateJsonString, - StateFunc: func(v interface{}) string { - jsonString, _ := structure.NormalizeJsonString(v) - return jsonString - }, - }, - "instance_role": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - emr.InstanceFleetTypeMaster, - emr.InstanceFleetTypeCore, - emr.InstanceFleetTypeTask, - }, false), - }, - "instance_type": { - Type: schema.TypeString, - Required: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - }, - "id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - Set: resourceAwsEMRClusterInstanceGroupHash, - }, - "bootstrap_action": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "path": { - Type: schema.TypeString, - Required: true, - }, - "args": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "step": { - Type: schema.TypeList, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "action_on_failure": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - emr.ActionOnFailureCancelAndWait, - emr.ActionOnFailureContinue, - emr.ActionOnFailureTerminateCluster, - emr.ActionOnFailureTerminateJobFlow, - }, false), - }, - "hadoop_jar_step": { - Type: schema.TypeList, - MaxItems: 1, - Required: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "args": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "jar": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "main_class": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "properties": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - }, - }, - "tags": tagsSchema(), - "configurations": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - ConflictsWith: []string{"configurations_json"}, - }, - "configurations_json": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"configurations"}, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentJsonDiffs, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - }, - "service_role": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "scale_down_behavior": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - emr.ScaleDownBehaviorTerminateAtInstanceHour, - emr.ScaleDownBehaviorTerminateAtTaskCompletion, - }, false), - }, - "security_configuration": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - }, - "autoscaling_role": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - }, - "visible_to_all_users": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "ebs_root_volume_size": { - Type: schema.TypeInt, - ForceNew: true, - Optional: true, - }, - "custom_ami_id": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - ValidateFunc: validateAwsEmrCustomAmiId, - }, - }, - } -} - -func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).emrconn - - log.Printf("[DEBUG] Creating EMR cluster") - applications := d.Get("applications").(*schema.Set).List() - - keepJobFlowAliveWhenNoSteps := true - if v, ok := d.GetOkExists("keep_job_flow_alive_when_no_steps"); ok { - keepJobFlowAliveWhenNoSteps = v.(bool) - } - - terminationProtection := false - if v, ok := d.GetOk("termination_protection"); ok { - terminationProtection = v.(bool) - } - instanceConfig := &emr.JobFlowInstancesConfig{ - KeepJobFlowAliveWhenNoSteps: aws.Bool(keepJobFlowAliveWhenNoSteps), - TerminationProtected: aws.Bool(terminationProtection), - } - - if v, ok := d.GetOk("master_instance_type"); ok { - masterInstanceGroupConfig := &emr.InstanceGroupConfig{ - InstanceRole: aws.String("MASTER"), - InstanceType: aws.String(v.(string)), - InstanceCount: aws.Int64(1), - } - instanceConfig.InstanceGroups = append(instanceConfig.InstanceGroups, masterInstanceGroupConfig) - } - - var coreInstanceType string - if v, ok := d.GetOk("core_instance_type"); ok { - coreInstanceType = v.(string) - } - var coreInstanceCount int64 - if v, ok := d.GetOk("core_instance_count"); ok { - coreInstanceCount = int64(v.(int)) - } - if (coreInstanceCount == 0 && coreInstanceType != "") || (coreInstanceCount > 0 && coreInstanceType == "") { - return fmt.Errorf("Must specify both `core_instance_count` and `core_instance_type`") - } else if coreInstanceCount > 0 && coreInstanceType != "" { - coreInstanceGroupConfig := &emr.InstanceGroupConfig{ - InstanceCount: aws.Int64(int64(d.Get("core_instance_count").(int))), - InstanceRole: aws.String("CORE"), - InstanceType: aws.String(d.Get("core_instance_type").(string)), - } - instanceConfig.InstanceGroups = append(instanceConfig.InstanceGroups, coreInstanceGroupConfig) - } - - var instanceProfile string - if a, ok := d.GetOk("ec2_attributes"); ok { - ec2Attributes := a.([]interface{}) - attributes := ec2Attributes[0].(map[string]interface{}) - - if v, ok := attributes["key_name"]; ok { - instanceConfig.Ec2KeyName = aws.String(v.(string)) - } - if v, ok := attributes["subnet_id"]; ok { - instanceConfig.Ec2SubnetId = aws.String(v.(string)) - } - - if v, ok := attributes["additional_master_security_groups"]; ok { - strSlice := strings.Split(v.(string), ",") - for i, s := range strSlice { - strSlice[i] = strings.TrimSpace(s) - } - instanceConfig.AdditionalMasterSecurityGroups = aws.StringSlice(strSlice) - } - - if v, ok := attributes["additional_slave_security_groups"]; ok { - strSlice := strings.Split(v.(string), ",") - for i, s := range strSlice { - strSlice[i] = strings.TrimSpace(s) - } - instanceConfig.AdditionalSlaveSecurityGroups = aws.StringSlice(strSlice) - } - - if v, ok := attributes["emr_managed_master_security_group"]; ok { - instanceConfig.EmrManagedMasterSecurityGroup = aws.String(v.(string)) - } - if v, ok := attributes["emr_managed_slave_security_group"]; ok { - instanceConfig.EmrManagedSlaveSecurityGroup = aws.String(v.(string)) - } - - if len(strings.TrimSpace(attributes["instance_profile"].(string))) != 0 { - instanceProfile = strings.TrimSpace(attributes["instance_profile"].(string)) - } - - if v, ok := attributes["service_access_security_group"]; ok { - instanceConfig.ServiceAccessSecurityGroup = aws.String(v.(string)) - } - } - if v, ok := d.GetOk("instance_group"); ok { - instanceGroupConfigs := v.(*schema.Set).List() - instanceGroups, err := expandInstanceGroupConfigs(instanceGroupConfigs) - - if err != nil { - return fmt.Errorf("error parsing EMR instance groups configuration: %s", err) - } - - instanceConfig.InstanceGroups = instanceGroups - } - - emrApps := expandApplications(applications) - - params := &emr.RunJobFlowInput{ - Instances: instanceConfig, - Name: aws.String(d.Get("name").(string)), - Applications: emrApps, - - ReleaseLabel: aws.String(d.Get("release_label").(string)), - ServiceRole: aws.String(d.Get("service_role").(string)), - VisibleToAllUsers: aws.Bool(d.Get("visible_to_all_users").(bool)), - } - - if v, ok := d.GetOk("additional_info"); ok { - info, err := structure.NormalizeJsonString(v) - if err != nil { - return fmt.Errorf("Additional Info contains an invalid JSON: %v", err) - } - params.AdditionalInfo = aws.String(info) - } - - if v, ok := d.GetOk("log_uri"); ok { - params.LogUri = aws.String(v.(string)) - } - - if v, ok := d.GetOk("autoscaling_role"); ok { - params.AutoScalingRole = aws.String(v.(string)) - } - - if v, ok := d.GetOk("scale_down_behavior"); ok { - params.ScaleDownBehavior = aws.String(v.(string)) - } - - if v, ok := d.GetOk("security_configuration"); ok { - params.SecurityConfiguration = aws.String(v.(string)) - } - - if v, ok := d.GetOk("ebs_root_volume_size"); ok { - params.EbsRootVolumeSize = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("custom_ami_id"); ok { - params.CustomAmiId = aws.String(v.(string)) - } - - if instanceProfile != "" { - params.JobFlowRole = aws.String(instanceProfile) - } - - if v, ok := d.GetOk("bootstrap_action"); ok { - bootstrapActions := v.(*schema.Set).List() - params.BootstrapActions = expandBootstrapActions(bootstrapActions) - } - if v, ok := d.GetOk("step"); ok { - steps := v.([]interface{}) - params.Steps = expandEmrStepConfigs(steps) - } - if v, ok := d.GetOk("tags"); ok { - tagsIn := v.(map[string]interface{}) - params.Tags = expandTags(tagsIn) - } - if v, ok := d.GetOk("configurations"); ok { - confUrl := v.(string) - params.Configurations = expandConfigures(confUrl) - } - - if v, ok := d.GetOk("configurations_json"); ok { - info, err := structure.NormalizeJsonString(v) - if err != nil { - return fmt.Errorf("configurations_json contains an invalid JSON: %v", err) - } - params.Configurations, err = expandConfigurationJson(info) - if err != nil { - return fmt.Errorf("Error reading EMR configurations_json: %s", err) - } - } - - if v, ok := d.GetOk("kerberos_attributes"); ok { - kerberosAttributesList := v.([]interface{}) - kerberosAttributesMap := kerberosAttributesList[0].(map[string]interface{}) - params.KerberosAttributes = expandEmrKerberosAttributes(kerberosAttributesMap) - } - - log.Printf("[DEBUG] EMR Cluster create options: %s", params) - - var resp *emr.RunJobFlowOutput - err := resource.Retry(30*time.Second, func() *resource.RetryError { - var err error - resp, err = conn.RunJobFlow(params) - if err != nil { - if isAWSErr(err, "ValidationException", "Invalid InstanceProfile:") { - return resource.RetryableError(err) - } - if isAWSErr(err, "AccessDeniedException", "Failed to authorize instance profile") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - - d.SetId(*resp.JobFlowId) - // This value can only be obtained through a deprecated function - d.Set("keep_job_flow_alive_when_no_steps", params.Instances.KeepJobFlowAliveWhenNoSteps) - - log.Println("[INFO] Waiting for EMR Cluster to be available") - - stateConf := &resource.StateChangeConf{ - Pending: []string{ - emr.ClusterStateBootstrapping, - emr.ClusterStateStarting, - }, - Target: []string{ - emr.ClusterStateRunning, - emr.ClusterStateWaiting, - }, - Refresh: resourceAwsEMRClusterStateRefreshFunc(d, meta), - Timeout: 75 * time.Minute, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for EMR Cluster state to be \"WAITING\" or \"RUNNING\": %s", err) - } - - return resourceAwsEMRClusterRead(d, meta) -} - -func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { - emrconn := meta.(*AWSClient).emrconn - - req := &emr.DescribeClusterInput{ - ClusterId: aws.String(d.Id()), - } - - resp, err := emrconn.DescribeCluster(req) - if err != nil { - return fmt.Errorf("Error reading EMR cluster: %s", err) - } - - if resp.Cluster == nil { - log.Printf("[DEBUG] EMR Cluster (%s) not found", d.Id()) - d.SetId("") - return nil - } - - cluster := resp.Cluster - - if cluster.Status != nil { - state := aws.StringValue(cluster.Status.State) - - if state == emr.ClusterStateTerminated || state == emr.ClusterStateTerminatedWithErrors { - log.Printf("[WARN] EMR Cluster (%s) was %s already, removing from state", d.Id(), state) - d.SetId("") - return nil - } - - d.Set("cluster_state", state) - } - - instanceGroups, err := fetchAllEMRInstanceGroups(emrconn, d.Id()) - if err == nil { - coreGroup := emrCoreInstanceGroup(instanceGroups) - if coreGroup != nil { - d.Set("core_instance_type", coreGroup.InstanceType) - d.Set("core_instance_count", coreGroup.RequestedInstanceCount) - } - masterGroup := findMasterGroup(instanceGroups) - if masterGroup != nil { - d.Set("master_instance_type", masterGroup.InstanceType) - } - - flattenedInstanceGroups, err := flattenInstanceGroups(instanceGroups) - if err != nil { - return fmt.Errorf("error flattening instance groups: %+v", err) - } - if err := d.Set("instance_group", flattenedInstanceGroups); err != nil { - return fmt.Errorf("[ERR] Error setting EMR instance groups: %s", err) - } - } - - d.Set("name", cluster.Name) - - d.Set("service_role", cluster.ServiceRole) - d.Set("security_configuration", cluster.SecurityConfiguration) - d.Set("autoscaling_role", cluster.AutoScalingRole) - d.Set("release_label", cluster.ReleaseLabel) - d.Set("log_uri", cluster.LogUri) - d.Set("master_public_dns", cluster.MasterPublicDnsName) - d.Set("visible_to_all_users", cluster.VisibleToAllUsers) - d.Set("tags", tagsToMapEMR(cluster.Tags)) - d.Set("ebs_root_volume_size", cluster.EbsRootVolumeSize) - d.Set("scale_down_behavior", cluster.ScaleDownBehavior) - d.Set("termination_protection", cluster.TerminationProtected) - - if cluster.CustomAmiId != nil { - d.Set("custom_ami_id", cluster.CustomAmiId) - } - - if err := d.Set("applications", flattenApplications(cluster.Applications)); err != nil { - return fmt.Errorf("error setting EMR Applications for cluster (%s): %s", d.Id(), err) - } - - if _, ok := d.GetOk("configurations_json"); ok { - configOut, err := flattenConfigurationJson(cluster.Configurations) - if err != nil { - return fmt.Errorf("Error reading EMR cluster configurations: %s", err) - } - if err := d.Set("configurations_json", configOut); err != nil { - return fmt.Errorf("Error setting EMR configurations_json for cluster (%s): %s", d.Id(), err) - } - } - - if err := d.Set("ec2_attributes", flattenEc2Attributes(cluster.Ec2InstanceAttributes)); err != nil { - return fmt.Errorf("error setting EMR Ec2 Attributes: %s", err) - } - - if err := d.Set("kerberos_attributes", flattenEmrKerberosAttributes(d, cluster.KerberosAttributes)); err != nil { - return fmt.Errorf("error setting kerberos_attributes: %s", err) - } - - respBootstraps, err := emrconn.ListBootstrapActions(&emr.ListBootstrapActionsInput{ - ClusterId: cluster.Id, - }) - if err != nil { - return fmt.Errorf("error listing bootstrap actions: %s", err) - } - - if err := d.Set("bootstrap_action", flattenBootstrapArguments(respBootstraps.BootstrapActions)); err != nil { - return fmt.Errorf("error setting Bootstrap Actions: %s", err) - } - - var stepSummaries []*emr.StepSummary - listStepsInput := &emr.ListStepsInput{ - ClusterId: aws.String(d.Id()), - } - err = emrconn.ListStepsPages(listStepsInput, func(page *emr.ListStepsOutput, lastPage bool) bool { - // ListSteps returns steps in reverse order (newest first) - for _, step := range page.Steps { - stepSummaries = append([]*emr.StepSummary{step}, stepSummaries...) - } - return !lastPage - }) - if err != nil { - return fmt.Errorf("error listing steps: %s", err) - } - if err := d.Set("step", flattenEmrStepSummaries(stepSummaries)); err != nil { - return fmt.Errorf("error setting step: %s", err) - } - - // AWS provides no other way to read back the additional_info - if v, ok := d.GetOk("additional_info"); ok { - info, err := structure.NormalizeJsonString(v) - if err != nil { - return fmt.Errorf("Additional Info contains an invalid JSON: %v", err) - } - d.Set("additional_info", info) - } - - return nil -} - -func resourceAwsEMRClusterUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).emrconn - - d.Partial(true) - - if d.HasChange("core_instance_count") { - d.SetPartial("core_instance_count") - log.Printf("[DEBUG] Modify EMR cluster") - groups, err := fetchAllEMRInstanceGroups(conn, d.Id()) - if err != nil { - log.Printf("[DEBUG] Error finding all instance groups: %s", err) - return err - } - - coreInstanceCount := d.Get("core_instance_count").(int) - coreGroup := emrCoreInstanceGroup(groups) - if coreGroup == nil { - return fmt.Errorf("Error finding core group") - } - - params := &emr.ModifyInstanceGroupsInput{ - InstanceGroups: []*emr.InstanceGroupModifyConfig{ - { - InstanceGroupId: coreGroup.Id, - InstanceCount: aws.Int64(int64(coreInstanceCount) - 1), - }, - }, - } - _, errModify := conn.ModifyInstanceGroups(params) - if errModify != nil { - log.Printf("[ERROR] %s", errModify) - return errModify - } - - log.Printf("[DEBUG] Modify EMR Cluster done...") - - log.Println("[INFO] Waiting for EMR Cluster to be available") - - stateConf := &resource.StateChangeConf{ - Pending: []string{ - emr.ClusterStateBootstrapping, - emr.ClusterStateStarting, - }, - Target: []string{ - emr.ClusterStateRunning, - emr.ClusterStateWaiting, - }, - Refresh: resourceAwsEMRClusterStateRefreshFunc(d, meta), - Timeout: 40 * time.Minute, - MinTimeout: 10 * time.Second, - Delay: 5 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for EMR Cluster state to be \"WAITING\" or \"RUNNING\" after modification: %s", err) - } - } - - if d.HasChange("visible_to_all_users") { - d.SetPartial("visible_to_all_users") - _, errModify := conn.SetVisibleToAllUsers(&emr.SetVisibleToAllUsersInput{ - JobFlowIds: []*string{aws.String(d.Id())}, - VisibleToAllUsers: aws.Bool(d.Get("visible_to_all_users").(bool)), - }) - if errModify != nil { - log.Printf("[ERROR] %s", errModify) - return errModify - } - } - - if d.HasChange("termination_protection") { - d.SetPartial("termination_protection") - _, errModify := conn.SetTerminationProtection(&emr.SetTerminationProtectionInput{ - JobFlowIds: []*string{aws.String(d.Id())}, - TerminationProtected: aws.Bool(d.Get("termination_protection").(bool)), - }) - if errModify != nil { - log.Printf("[ERROR] %s", errModify) - return errModify - } - } - - if d.HasChange("instance_group") { - o, n := d.GetChange("instance_group") - oSet := o.(*schema.Set).List() - nSet := n.(*schema.Set).List() - for _, currInstanceGroup := range oSet { - for _, nextInstanceGroup := range nSet { - oInstanceGroup := currInstanceGroup.(map[string]interface{}) - nInstanceGroup := nextInstanceGroup.(map[string]interface{}) - - if oInstanceGroup["instance_role"].(string) != nInstanceGroup["instance_role"].(string) || oInstanceGroup["name"].(string) != nInstanceGroup["name"].(string) { - continue - } - - if v, ok := nInstanceGroup["autoscaling_policy"]; ok && v.(string) != "" { - var autoScalingPolicy *emr.AutoScalingPolicy - - err := json.Unmarshal([]byte(v.(string)), &autoScalingPolicy) - if err != nil { - return fmt.Errorf("error parsing EMR Auto Scaling Policy JSON for update: \n\n%s\n\n%s", v.(string), err) - } - - putAutoScalingPolicy := &emr.PutAutoScalingPolicyInput{ - ClusterId: aws.String(d.Id()), - AutoScalingPolicy: autoScalingPolicy, - InstanceGroupId: aws.String(oInstanceGroup["id"].(string)), - } - - _, errModify := conn.PutAutoScalingPolicy(putAutoScalingPolicy) - if errModify != nil { - return fmt.Errorf("error updating autoscaling policy for instance group %q: %s", oInstanceGroup["id"].(string), errModify) - } - - break - } - } - - } - } - - if err := setTagsEMR(conn, d); err != nil { - return err - } else { - d.SetPartial("tags") - } - - d.Partial(false) - - return resourceAwsEMRClusterRead(d, meta) -} - -func resourceAwsEMRClusterDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).emrconn - - req := &emr.TerminateJobFlowsInput{ - JobFlowIds: []*string{ - aws.String(d.Id()), - }, - } - - _, err := conn.TerminateJobFlows(req) - if err != nil { - log.Printf("[ERROR], %s", err) - return err - } - - err = resource.Retry(10*time.Minute, func() *resource.RetryError { - resp, err := conn.ListInstances(&emr.ListInstancesInput{ - ClusterId: aws.String(d.Id()), - }) - - if err != nil { - return resource.NonRetryableError(err) - } - - instanceCount := len(resp.Instances) - - if resp == nil || instanceCount == 0 { - log.Printf("[DEBUG] No instances found for EMR Cluster (%s)", d.Id()) - return nil - } - - // Collect instance status states, wait for all instances to be terminated - // before moving on - var terminated []string - for j, i := range resp.Instances { - if i.Status != nil { - if aws.StringValue(i.Status.State) == emr.InstanceStateTerminated { - terminated = append(terminated, *i.Ec2InstanceId) - } - } else { - log.Printf("[DEBUG] Cluster instance (%d : %s) has no status", j, *i.Ec2InstanceId) - } - } - if len(terminated) == instanceCount { - log.Printf("[DEBUG] All (%d) EMR Cluster (%s) Instances terminated", instanceCount, d.Id()) - return nil - } - return resource.RetryableError(fmt.Errorf("EMR Cluster (%s) has (%d) Instances remaining, retrying", d.Id(), len(resp.Instances))) - }) - - if err != nil { - return fmt.Errorf("error waiting for EMR Cluster (%s) Instances to drain", d.Id()) - } - - return nil -} - -func expandApplications(apps []interface{}) []*emr.Application { - appOut := make([]*emr.Application, 0, len(apps)) - - for _, appName := range expandStringList(apps) { - app := &emr.Application{ - Name: appName, - } - appOut = append(appOut, app) - } - return appOut -} - -func flattenApplications(apps []*emr.Application) []interface{} { - appOut := make([]interface{}, 0, len(apps)) - - for _, app := range apps { - appOut = append(appOut, *app.Name) - } - return appOut -} - -func flattenEc2Attributes(ia *emr.Ec2InstanceAttributes) []map[string]interface{} { - attrs := map[string]interface{}{} - result := make([]map[string]interface{}, 0) - - if ia.Ec2KeyName != nil { - attrs["key_name"] = *ia.Ec2KeyName - } - if ia.Ec2SubnetId != nil { - attrs["subnet_id"] = *ia.Ec2SubnetId - } - if ia.IamInstanceProfile != nil { - attrs["instance_profile"] = *ia.IamInstanceProfile - } - if ia.EmrManagedMasterSecurityGroup != nil { - attrs["emr_managed_master_security_group"] = *ia.EmrManagedMasterSecurityGroup - } - if ia.EmrManagedSlaveSecurityGroup != nil { - attrs["emr_managed_slave_security_group"] = *ia.EmrManagedSlaveSecurityGroup - } - - if len(ia.AdditionalMasterSecurityGroups) > 0 { - strs := aws.StringValueSlice(ia.AdditionalMasterSecurityGroups) - attrs["additional_master_security_groups"] = strings.Join(strs, ",") - } - if len(ia.AdditionalSlaveSecurityGroups) > 0 { - strs := aws.StringValueSlice(ia.AdditionalSlaveSecurityGroups) - attrs["additional_slave_security_groups"] = strings.Join(strs, ",") - } - - if ia.ServiceAccessSecurityGroup != nil { - attrs["service_access_security_group"] = *ia.ServiceAccessSecurityGroup - } - - result = append(result, attrs) - - return result -} - -func flattenEmrKerberosAttributes(d *schema.ResourceData, kerberosAttributes *emr.KerberosAttributes) []map[string]interface{} { - l := make([]map[string]interface{}, 0) - - if kerberosAttributes == nil || kerberosAttributes.Realm == nil { - return l - } - - // Do not set from API: - // * ad_domain_join_password - // * cross_realm_trust_principal_password - // * kdc_admin_password - - m := map[string]interface{}{ - "kdc_admin_password": d.Get("kerberos_attributes.0.kdc_admin_password").(string), - "realm": *kerberosAttributes.Realm, - } - - if v, ok := d.GetOk("kerberos_attributes.0.ad_domain_join_password"); ok { - m["ad_domain_join_password"] = v.(string) - } - - if kerberosAttributes.ADDomainJoinUser != nil { - m["ad_domain_join_user"] = *kerberosAttributes.ADDomainJoinUser - } - - if v, ok := d.GetOk("kerberos_attributes.0.cross_realm_trust_principal_password"); ok { - m["cross_realm_trust_principal_password"] = v.(string) - } - - l = append(l, m) - - return l -} - -func flattenEmrHadoopStepConfig(config *emr.HadoopStepConfig) map[string]interface{} { - if config == nil { - return nil - } - - m := map[string]interface{}{ - "args": aws.StringValueSlice(config.Args), - "jar": aws.StringValue(config.Jar), - "main_class": aws.StringValue(config.MainClass), - "properties": aws.StringValueMap(config.Properties), - } - - return m -} - -func flattenEmrStepSummaries(stepSummaries []*emr.StepSummary) []map[string]interface{} { - l := make([]map[string]interface{}, 0) - - if len(stepSummaries) == 0 { - return l - } - - for _, stepSummary := range stepSummaries { - l = append(l, flattenEmrStepSummary(stepSummary)) - } - - return l -} - -func flattenEmrStepSummary(stepSummary *emr.StepSummary) map[string]interface{} { - if stepSummary == nil { - return nil - } - - m := map[string]interface{}{ - "action_on_failure": aws.StringValue(stepSummary.ActionOnFailure), - "hadoop_jar_step": []map[string]interface{}{flattenEmrHadoopStepConfig(stepSummary.Config)}, - "name": aws.StringValue(stepSummary.Name), - } - - return m -} - -func flattenInstanceGroup(ig *emr.InstanceGroup) (map[string]interface{}, error) { - attrs := map[string]interface{}{} - if ig.BidPrice != nil { - attrs["bid_price"] = *ig.BidPrice - } - - attrs["id"] = *ig.Id - attrs["ebs_config"] = flattenEBSConfig(ig.EbsBlockDevices) - attrs["instance_count"] = int(*ig.RequestedInstanceCount) - attrs["instance_role"] = *ig.InstanceGroupType - attrs["instance_type"] = *ig.InstanceType - if ig.Name != nil { - attrs["name"] = *ig.Name - } - - if ig.AutoScalingPolicy != nil { - // AutoScalingPolicy has an additional Status field and null values that are causing a new hashcode to be generated - // for `instance_group`. - // We are purposefully omitting that field and the null values here when we flatten the autoscaling policy string - // for the statefile. - for i, rule := range ig.AutoScalingPolicy.Rules { - for j, dimension := range rule.Trigger.CloudWatchAlarmDefinition.Dimensions { - if *dimension.Key == "JobFlowId" { - tmpDimensions := append(ig.AutoScalingPolicy.Rules[i].Trigger.CloudWatchAlarmDefinition.Dimensions[:j], ig.AutoScalingPolicy.Rules[i].Trigger.CloudWatchAlarmDefinition.Dimensions[j+1:]...) - ig.AutoScalingPolicy.Rules[i].Trigger.CloudWatchAlarmDefinition.Dimensions = tmpDimensions - } - } - if len(ig.AutoScalingPolicy.Rules[i].Trigger.CloudWatchAlarmDefinition.Dimensions) == 0 { - ig.AutoScalingPolicy.Rules[i].Trigger.CloudWatchAlarmDefinition.Dimensions = nil - } - } - - tmpAutoScalingPolicy := emr.AutoScalingPolicy{ - Constraints: ig.AutoScalingPolicy.Constraints, - Rules: ig.AutoScalingPolicy.Rules, - } - autoscalingPolicyConstraintsBytes, err := json.Marshal(tmpAutoScalingPolicy.Constraints) - if err != nil { - return nil, fmt.Errorf("error parsing EMR Cluster Instance Groups AutoScalingPolicy Constraints: %s", err) - } - autoscalingPolicyConstraintsString := string(autoscalingPolicyConstraintsBytes) - - autoscalingPolicyRulesBytes, err := json.Marshal(tmpAutoScalingPolicy.Rules) - if err != nil { - return nil, fmt.Errorf("error parsing EMR Cluster Instance Groups AutoScalingPolicy Rules: %s", err) - } - - var rules []map[string]interface{} - if err := json.Unmarshal(autoscalingPolicyRulesBytes, &rules); err != nil { - return nil, err - } - - var cleanRules []map[string]interface{} - for _, rule := range rules { - cleanRules = append(cleanRules, removeNil(rule)) - } - - withoutNulls, err := json.Marshal(cleanRules) - if err != nil { - return nil, err - } - autoscalingPolicyRulesString := string(withoutNulls) - - autoscalingPolicyString := fmt.Sprintf("{\"Constraints\":%s,\"Rules\":%s}", autoscalingPolicyConstraintsString, autoscalingPolicyRulesString) - - attrs["autoscaling_policy"] = autoscalingPolicyString - } else { - attrs["autoscaling_policy"] = "" - } - - if attrs["name"] != nil { - attrs["name"] = *ig.Name - } - - return attrs, nil -} - -func flattenInstanceGroups(igs []*emr.InstanceGroup) (*schema.Set, error) { - instanceGroupSet := []interface{}{} - for _, ig := range igs { - flattenedInstanceGroup, err := flattenInstanceGroup(ig) - if err != nil { - return nil, err - } - instanceGroupSet = append(instanceGroupSet, flattenedInstanceGroup) - } - - return schema.NewSet(resourceAwsEMRClusterInstanceGroupHash, instanceGroupSet), nil -} - -func flattenEBSConfig(ebsBlockDevices []*emr.EbsBlockDevice) *schema.Set { - ebsConfig := make([]interface{}, 0) - for _, ebs := range ebsBlockDevices { - ebsAttrs := make(map[string]interface{}) - if ebs.VolumeSpecification.Iops != nil { - ebsAttrs["iops"] = int(*ebs.VolumeSpecification.Iops) - } - if ebs.VolumeSpecification.SizeInGB != nil { - ebsAttrs["size"] = int(*ebs.VolumeSpecification.SizeInGB) - } - if ebs.VolumeSpecification.VolumeType != nil { - ebsAttrs["type"] = *ebs.VolumeSpecification.VolumeType - } - ebsAttrs["volumes_per_instance"] = 1 - - ebsConfig = append(ebsConfig, ebsAttrs) - } - - return schema.NewSet(resourceAwsEMRClusterEBSConfigHash, ebsConfig) -} - -func flattenBootstrapArguments(actions []*emr.Command) []map[string]interface{} { - result := make([]map[string]interface{}, 0) - - for _, b := range actions { - attrs := make(map[string]interface{}) - attrs["name"] = *b.Name - attrs["path"] = *b.ScriptPath - attrs["args"] = flattenStringList(b.Args) - result = append(result, attrs) - } - - return result -} - -func emrCoreInstanceGroup(grps []*emr.InstanceGroup) *emr.InstanceGroup { - for _, grp := range grps { - if aws.StringValue(grp.InstanceGroupType) == emr.InstanceGroupTypeCore { - return grp - } - } - return nil -} - -func expandTags(m map[string]interface{}) []*emr.Tag { - var result []*emr.Tag - for k, v := range m { - result = append(result, &emr.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - }) - } - - return result -} - -func tagsToMapEMR(ts []*emr.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - result[*t.Key] = *t.Value - } - - return result -} - -func diffTagsEMR(oldTags, newTags []*emr.Tag) ([]*emr.Tag, []*emr.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*emr.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return expandTags(create), remove -} - -func setTagsEMR(conn *emr.EMR, 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 := diffTagsEMR(expandTags(o), expandTags(n)) - - // Set tags - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %s", remove) - k := make([]*string, len(remove)) - for i, t := range remove { - k[i] = t.Key - } - - _, err := conn.RemoveTags(&emr.RemoveTagsInput{ - ResourceId: aws.String(d.Id()), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %s", create) - _, err := conn.AddTags(&emr.AddTagsInput{ - ResourceId: aws.String(d.Id()), - Tags: create, - }) - if err != nil { - return err - } - } - } - - return nil -} - -func expandBootstrapActions(bootstrapActions []interface{}) []*emr.BootstrapActionConfig { - actionsOut := []*emr.BootstrapActionConfig{} - - for _, raw := range bootstrapActions { - actionAttributes := raw.(map[string]interface{}) - actionName := actionAttributes["name"].(string) - actionPath := actionAttributes["path"].(string) - actionArgs := actionAttributes["args"].([]interface{}) - - action := &emr.BootstrapActionConfig{ - Name: aws.String(actionName), - ScriptBootstrapAction: &emr.ScriptBootstrapActionConfig{ - Path: aws.String(actionPath), - Args: expandStringList(actionArgs), - }, - } - actionsOut = append(actionsOut, action) - } - - return actionsOut -} - -func expandEmrHadoopJarStepConfig(m map[string]interface{}) *emr.HadoopJarStepConfig { - hadoopJarStepConfig := &emr.HadoopJarStepConfig{ - Jar: aws.String(m["jar"].(string)), - } - - if v, ok := m["args"]; ok { - hadoopJarStepConfig.Args = expandStringList(v.([]interface{})) - } - - if v, ok := m["main_class"]; ok { - hadoopJarStepConfig.MainClass = aws.String(v.(string)) - } - - if v, ok := m["properties"]; ok { - hadoopJarStepConfig.Properties = expandEmrKeyValues(v.(map[string]interface{})) - } - - return hadoopJarStepConfig -} - -func expandEmrKeyValues(m map[string]interface{}) []*emr.KeyValue { - keyValues := make([]*emr.KeyValue, 0) - - for k, v := range m { - keyValue := &emr.KeyValue{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - keyValues = append(keyValues, keyValue) - } - - return keyValues -} - -func expandEmrKerberosAttributes(m map[string]interface{}) *emr.KerberosAttributes { - kerberosAttributes := &emr.KerberosAttributes{ - KdcAdminPassword: aws.String(m["kdc_admin_password"].(string)), - Realm: aws.String(m["realm"].(string)), - } - if v, ok := m["ad_domain_join_password"]; ok && v.(string) != "" { - kerberosAttributes.ADDomainJoinPassword = aws.String(v.(string)) - } - if v, ok := m["ad_domain_join_user"]; ok && v.(string) != "" { - kerberosAttributes.ADDomainJoinUser = aws.String(v.(string)) - } - if v, ok := m["cross_realm_trust_principal_password"]; ok && v.(string) != "" { - kerberosAttributes.CrossRealmTrustPrincipalPassword = aws.String(v.(string)) - } - return kerberosAttributes -} - -func expandEmrStepConfig(m map[string]interface{}) *emr.StepConfig { - hadoopJarStepList := m["hadoop_jar_step"].([]interface{}) - hadoopJarStepMap := hadoopJarStepList[0].(map[string]interface{}) - - stepConfig := &emr.StepConfig{ - ActionOnFailure: aws.String(m["action_on_failure"].(string)), - HadoopJarStep: expandEmrHadoopJarStepConfig(hadoopJarStepMap), - Name: aws.String(m["name"].(string)), - } - - return stepConfig -} - -func expandEmrStepConfigs(l []interface{}) []*emr.StepConfig { - stepConfigs := []*emr.StepConfig{} - - for _, raw := range l { - m := raw.(map[string]interface{}) - stepConfigs = append(stepConfigs, expandEmrStepConfig(m)) - } - - return stepConfigs -} - -func expandInstanceGroupConfigs(instanceGroupConfigs []interface{}) ([]*emr.InstanceGroupConfig, error) { - instanceGroupConfig := []*emr.InstanceGroupConfig{} - - for _, raw := range instanceGroupConfigs { - configAttributes := raw.(map[string]interface{}) - configInstanceRole := configAttributes["instance_role"].(string) - configInstanceCount := configAttributes["instance_count"].(int) - configInstanceType := configAttributes["instance_type"].(string) - configName := configAttributes["name"].(string) - config := &emr.InstanceGroupConfig{ - Name: aws.String(configName), - InstanceRole: aws.String(configInstanceRole), - InstanceType: aws.String(configInstanceType), - InstanceCount: aws.Int64(int64(configInstanceCount)), - } - - expandBidPrice(config, configAttributes) - expandEbsConfig(configAttributes, config) - - if v, ok := configAttributes["autoscaling_policy"]; ok && v.(string) != "" { - var autoScalingPolicy *emr.AutoScalingPolicy - - err := json.Unmarshal([]byte(v.(string)), &autoScalingPolicy) - - if err != nil { - return []*emr.InstanceGroupConfig{}, fmt.Errorf("error parsing EMR Auto Scaling Policy JSON: %s", err) - } - - config.AutoScalingPolicy = autoScalingPolicy - } - - instanceGroupConfig = append(instanceGroupConfig, config) - } - - return instanceGroupConfig, nil -} - -func expandBidPrice(config *emr.InstanceGroupConfig, configAttributes map[string]interface{}) { - if bidPrice, ok := configAttributes["bid_price"]; ok { - if bidPrice != "" { - config.BidPrice = aws.String(bidPrice.(string)) - config.Market = aws.String("SPOT") - } else { - config.Market = aws.String("ON_DEMAND") - } - } -} - -func expandEbsConfig(configAttributes map[string]interface{}, config *emr.InstanceGroupConfig) { - if rawEbsConfigs, ok := configAttributes["ebs_config"]; ok { - ebsConfig := &emr.EbsConfiguration{} - - ebsBlockDeviceConfigs := make([]*emr.EbsBlockDeviceConfig, 0) - for _, rawEbsConfig := range rawEbsConfigs.(*schema.Set).List() { - rawEbsConfig := rawEbsConfig.(map[string]interface{}) - ebsBlockDeviceConfig := &emr.EbsBlockDeviceConfig{ - VolumesPerInstance: aws.Int64(int64(rawEbsConfig["volumes_per_instance"].(int))), - VolumeSpecification: &emr.VolumeSpecification{ - SizeInGB: aws.Int64(int64(rawEbsConfig["size"].(int))), - VolumeType: aws.String(rawEbsConfig["type"].(string)), - }, - } - if v, ok := rawEbsConfig["iops"].(int); ok && v != 0 { - ebsBlockDeviceConfig.VolumeSpecification.Iops = aws.Int64(int64(v)) - } - ebsBlockDeviceConfigs = append(ebsBlockDeviceConfigs, ebsBlockDeviceConfig) - } - ebsConfig.EbsBlockDeviceConfigs = ebsBlockDeviceConfigs - - config.EbsConfiguration = ebsConfig - } -} - -func expandConfigurationJson(input string) ([]*emr.Configuration, error) { - configsOut := []*emr.Configuration{} - err := json.Unmarshal([]byte(input), &configsOut) - if err != nil { - return nil, err - } - log.Printf("[DEBUG] Expanded EMR Configurations %s", configsOut) - - return configsOut, nil -} - -func flattenConfigurationJson(config []*emr.Configuration) (string, error) { - out, err := jsonutil.BuildJSON(config) - if err != nil { - return "", err - } - return string(out), nil -} - -func expandConfigures(input string) []*emr.Configuration { - configsOut := []*emr.Configuration{} - if strings.HasPrefix(input, "http") { - if err := readHttpJson(input, &configsOut); err != nil { - log.Printf("[ERR] Error reading HTTP JSON: %s", err) - } - } else if strings.HasSuffix(input, ".json") { - if err := readLocalJson(input, &configsOut); err != nil { - log.Printf("[ERR] Error reading local JSON: %s", err) - } - } else { - if err := readBodyJson(input, &configsOut); err != nil { - log.Printf("[ERR] Error reading body JSON: %s", err) - } - } - log.Printf("[DEBUG] Expanded EMR Configurations %s", configsOut) - - return configsOut -} - -func readHttpJson(url string, target interface{}) error { - r, err := http.Get(url) - if err != nil { - return err - } - defer r.Body.Close() - - return json.NewDecoder(r.Body).Decode(target) -} - -func readLocalJson(localFile string, target interface{}) error { - file, e := ioutil.ReadFile(localFile) - if e != nil { - log.Printf("[ERROR] %s", e) - return e - } - - return json.Unmarshal(file, target) -} - -func readBodyJson(body string, target interface{}) error { - log.Printf("[DEBUG] Raw Body %s\n", body) - err := json.Unmarshal([]byte(body), target) - if err != nil { - log.Printf("[ERROR] parsing JSON %s", err) - return err - } - return nil -} - -func resourceAwsEMRClusterStateRefreshFunc(d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - conn := meta.(*AWSClient).emrconn - - log.Printf("[INFO] Reading EMR Cluster Information: %s", d.Id()) - params := &emr.DescribeClusterInput{ - ClusterId: aws.String(d.Id()), - } - - resp, err := conn.DescribeCluster(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "ClusterNotFound" { - return 42, "destroyed", nil - } - } - log.Printf("[WARN] Error on retrieving EMR Cluster (%s) when waiting: %s", d.Id(), err) - return nil, "", err - } - - if resp.Cluster == nil { - return 42, "destroyed", nil - } - - if resp.Cluster.Status == nil { - return resp.Cluster, "", fmt.Errorf("cluster status not provided") - } - - state := aws.StringValue(resp.Cluster.Status.State) - log.Printf("[DEBUG] EMR Cluster status (%s): %s", d.Id(), state) - - if state == emr.ClusterStateTerminating || state == emr.ClusterStateTerminatedWithErrors { - reason := resp.Cluster.Status.StateChangeReason - if reason == nil { - return resp.Cluster, state, fmt.Errorf("%s: reason code and message not provided", state) - } - return resp.Cluster, state, fmt.Errorf("%s: %s: %s", state, aws.StringValue(reason.Code), aws.StringValue(reason.Message)) - } - - return resp.Cluster, state, nil - } -} - -func findMasterGroup(instanceGroups []*emr.InstanceGroup) *emr.InstanceGroup { - for _, group := range instanceGroups { - if *group.InstanceGroupType == emr.InstanceRoleTypeMaster { - return group - } - } - return nil -} - -// EMRCluster always has an instance role of either master, core, or task -// Name is optional for core and master(only group allowed for this type) but needed for task -// since you can have multiple task instance groups. -func resourceAwsEMRClusterInstanceGroupHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["instance_role"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["instance_type"].(string))) - buf.WriteString(fmt.Sprintf("%d-", m["instance_count"].(int))) - if v, ok := m["name"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["bid_price"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["autoscaling_policy"]; ok { - pleaseWork, _ := structure.NormalizeJsonString(v.(string)) - buf.WriteString(fmt.Sprintf("%s-", pleaseWork)) - } - - if v, ok := m["ebs_config"]; ok { - configs := v.(*schema.Set).List() - - // There is an issue where an `ebs_config` is automatically configured when not specified in Terraform and - // this causes the hashcode to change. Instead, we'll ignore that configuration when setting up the hashcode. - if len(configs) > 1 { - for _, ebsConfigs := range configs { - buf.WriteString(fmt.Sprintf("%d-", resourceAwsEMRClusterEBSConfigHash(ebsConfigs.(map[string]interface{})))) - } - } - } - - return hashcode.String(buf.String()) -} - -func resourceAwsEMRClusterEBSConfigHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%d-", m["size"].(int))) - buf.WriteString(fmt.Sprintf("%s-", m["type"].(string))) - buf.WriteString(fmt.Sprintf("%d-", m["volumes_per_instance"].(int))) - if v, ok := m["iops"]; ok && v.(int) != 0 { - buf.WriteString(fmt.Sprintf("%d-", v.(int))) - } - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go deleted file mode 100644 index 9b0c80f07..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go +++ /dev/null @@ -1,311 +0,0 @@ -package aws - -import ( - "errors" - "log" - "time" - - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/emr" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -var emrInstanceGroupNotFound = errors.New("No matching EMR Instance Group") - -func resourceAwsEMRInstanceGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEMRInstanceGroupCreate, - Read: resourceAwsEMRInstanceGroupRead, - Update: resourceAwsEMRInstanceGroupUpdate, - Delete: resourceAwsEMRInstanceGroupDelete, - Schema: map[string]*schema.Schema{ - "cluster_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "instance_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "instance_count": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - "running_instance_count": { - Type: schema.TypeInt, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "ebs_optimized": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - "ebs_config": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "iops": { - Type: schema.TypeInt, - Optional: true, - }, - "size": { - Type: schema.TypeInt, - Required: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateAwsEmrEbsVolumeType(), - }, - "volumes_per_instance": { - Type: schema.TypeInt, - Optional: true, - }, - }, - }, - }, - }, - } -} - -// Populates an emr.EbsConfiguration struct -func readEmrEBSConfig(d *schema.ResourceData) *emr.EbsConfiguration { - result := &emr.EbsConfiguration{} - if v, ok := d.GetOk("ebs_optimized"); ok { - result.EbsOptimized = aws.Bool(v.(bool)) - } - - ebsConfigs := make([]*emr.EbsBlockDeviceConfig, 0) - if rawConfig, ok := d.GetOk("ebs_config"); ok { - configList := rawConfig.(*schema.Set).List() - for _, config := range configList { - conf := config.(map[string]interface{}) - ebs := &emr.EbsBlockDeviceConfig{} - volumeSpec := &emr.VolumeSpecification{ - SizeInGB: aws.Int64(int64(conf["size"].(int))), - VolumeType: aws.String(conf["type"].(string)), - } - if v, ok := conf["iops"].(int); ok && v != 0 { - volumeSpec.Iops = aws.Int64(int64(v)) - } - if v, ok := conf["volumes_per_instance"].(int); ok && v != 0 { - ebs.VolumesPerInstance = aws.Int64(int64(v)) - } - ebs.VolumeSpecification = volumeSpec - ebsConfigs = append(ebsConfigs, ebs) - } - } - result.EbsBlockDeviceConfigs = ebsConfigs - return result -} - -func resourceAwsEMRInstanceGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).emrconn - - clusterId := d.Get("cluster_id").(string) - instanceType := d.Get("instance_type").(string) - instanceCount := d.Get("instance_count").(int) - groupName := d.Get("name").(string) - - ebsConfig := readEmrEBSConfig(d) - - params := &emr.AddInstanceGroupsInput{ - InstanceGroups: []*emr.InstanceGroupConfig{ - { - InstanceRole: aws.String("TASK"), - InstanceCount: aws.Int64(int64(instanceCount)), - InstanceType: aws.String(instanceType), - Name: aws.String(groupName), - EbsConfiguration: ebsConfig, - }, - }, - JobFlowId: aws.String(clusterId), - } - - log.Printf("[DEBUG] Creating EMR task group params: %s", params) - resp, err := conn.AddInstanceGroups(params) - if err != nil { - return err - } - - log.Printf("[DEBUG] Created EMR task group finished: %#v", resp) - if resp == nil || len(resp.InstanceGroupIds) == 0 { - return fmt.Errorf("Error creating instance groups: no instance group returned") - } - d.SetId(*resp.InstanceGroupIds[0]) - - return nil -} - -func resourceAwsEMRInstanceGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).emrconn - group, err := fetchEMRInstanceGroup(conn, d.Get("cluster_id").(string), d.Id()) - if err != nil { - switch err { - case emrInstanceGroupNotFound: - log.Printf("[DEBUG] EMR Instance Group (%s) not found, removing", d.Id()) - d.SetId("") - return nil - default: - return err - } - } - - // Guard against the chance of fetchEMRInstanceGroup returning nil group but - // not a emrInstanceGroupNotFound error - if group == nil { - log.Printf("[DEBUG] EMR Instance Group (%s) not found, removing", d.Id()) - d.SetId("") - return nil - } - - d.Set("name", group.Name) - d.Set("instance_count", group.RequestedInstanceCount) - d.Set("running_instance_count", group.RunningInstanceCount) - d.Set("instance_type", group.InstanceType) - if group.Status != nil && group.Status.State != nil { - d.Set("status", group.Status.State) - } - - return nil -} - -func fetchAllEMRInstanceGroups(conn *emr.EMR, clusterId string) ([]*emr.InstanceGroup, error) { - req := &emr.ListInstanceGroupsInput{ - ClusterId: aws.String(clusterId), - } - - var groups []*emr.InstanceGroup - marker := aws.String("intitial") - for marker != nil { - log.Printf("[DEBUG] EMR Cluster Instance Marker: %s", *marker) - respGrps, errGrps := conn.ListInstanceGroups(req) - if errGrps != nil { - return nil, fmt.Errorf("Error reading EMR cluster (%s): %s", clusterId, errGrps) - } - if respGrps == nil { - return nil, fmt.Errorf("Error reading EMR Instance Group for cluster (%s)", clusterId) - } - - if respGrps.InstanceGroups != nil { - groups = append(groups, respGrps.InstanceGroups...) - } else { - log.Printf("[DEBUG] EMR Instance Group list was empty") - } - marker = respGrps.Marker - } - - if len(groups) == 0 { - return nil, fmt.Errorf("No instance groups found for EMR Cluster (%s)", clusterId) - } - - return groups, nil -} - -func fetchEMRInstanceGroup(conn *emr.EMR, clusterId, groupId string) (*emr.InstanceGroup, error) { - groups, err := fetchAllEMRInstanceGroups(conn, clusterId) - if err != nil { - return nil, err - } - - var group *emr.InstanceGroup - for _, ig := range groups { - if groupId == *ig.Id { - group = ig - break - } - } - - if group != nil { - return group, nil - } - - return nil, emrInstanceGroupNotFound -} - -func resourceAwsEMRInstanceGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).emrconn - - log.Printf("[DEBUG] Modify EMR task group") - instanceCount := d.Get("instance_count").(int) - - params := &emr.ModifyInstanceGroupsInput{ - InstanceGroups: []*emr.InstanceGroupModifyConfig{ - { - InstanceGroupId: aws.String(d.Id()), - InstanceCount: aws.Int64(int64(instanceCount)), - }, - }, - } - - _, err := conn.ModifyInstanceGroups(params) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"PROVISIONING", "BOOTSTRAPPING", "RESIZING"}, - Target: []string{"RUNNING"}, - Refresh: instanceGroupStateRefresh(conn, d.Get("cluster_id").(string), d.Id()), - Timeout: 10 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for instance (%s) to terminate: %s", d.Id(), err) - } - - return resourceAwsEMRInstanceGroupRead(d, meta) -} - -func instanceGroupStateRefresh(conn *emr.EMR, clusterID, igID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - group, err := fetchEMRInstanceGroup(conn, clusterID, igID) - if err != nil { - return nil, "Not Found", err - } - - if group.Status == nil || group.Status.State == nil { - log.Printf("[WARN] ERM Instance Group found, but without state") - return nil, "Undefined", fmt.Errorf("Undefined EMR Cluster Instance Group state") - } - - return group, *group.Status.State, nil - } -} - -func resourceAwsEMRInstanceGroupDelete(d *schema.ResourceData, meta interface{}) error { - log.Printf("[WARN] AWS EMR Instance Group does not support DELETE; resizing cluster to zero before removing from state") - conn := meta.(*AWSClient).emrconn - params := &emr.ModifyInstanceGroupsInput{ - InstanceGroups: []*emr.InstanceGroupModifyConfig{ - { - InstanceGroupId: aws.String(d.Id()), - InstanceCount: aws.Int64(0), - }, - }, - } - - _, err := conn.ModifyInstanceGroups(params) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_security_configuration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_security_configuration.go deleted file mode 100644 index caad7eed7..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_security_configuration.go +++ /dev/null @@ -1,117 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/emr" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsEMRSecurityConfiguration() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsEmrSecurityConfigurationCreate, - Read: resourceAwsEmrSecurityConfigurationRead, - Delete: resourceAwsEmrSecurityConfigurationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validation.StringLenBetween(0, 10280), - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validation.StringLenBetween(0, 10280-resource.UniqueIDSuffixLength), - }, - - "configuration": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.ValidateJsonString, - }, - - "creation_date": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsEmrSecurityConfigurationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).emrconn - - var emrSCName string - if v, ok := d.GetOk("name"); ok { - emrSCName = v.(string) - } else { - if v, ok := d.GetOk("name_prefix"); ok { - emrSCName = resource.PrefixedUniqueId(v.(string)) - } else { - emrSCName = resource.PrefixedUniqueId("tf-emr-sc-") - } - } - - resp, err := conn.CreateSecurityConfiguration(&emr.CreateSecurityConfigurationInput{ - Name: aws.String(emrSCName), - SecurityConfiguration: aws.String(d.Get("configuration").(string)), - }) - - if err != nil { - return err - } - - d.SetId(*resp.Name) - return resourceAwsEmrSecurityConfigurationRead(d, meta) -} - -func resourceAwsEmrSecurityConfigurationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).emrconn - - resp, err := conn.DescribeSecurityConfiguration(&emr.DescribeSecurityConfigurationInput{ - Name: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, "InvalidRequestException", "does not exist") { - log.Printf("[WARN] EMR Security Configuration (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("creation_date", resp.CreationDateTime) - d.Set("name", resp.Name) - d.Set("configuration", resp.SecurityConfiguration) - - return nil -} - -func resourceAwsEmrSecurityConfigurationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).emrconn - - _, err := conn.DeleteSecurityConfiguration(&emr.DeleteSecurityConfigurationInput{ - Name: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, "InvalidRequestException", "does not exist") { - return nil - } - return err - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_flow_log.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_flow_log.go deleted file mode 100644 index ae0dd9dac..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_flow_log.go +++ /dev/null @@ -1,210 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsFlowLog() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLogFlowCreate, - Read: resourceAwsLogFlowRead, - Delete: resourceAwsLogFlowDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "iam_role_arn": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "log_destination": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"log_group_name"}, - ValidateFunc: validateArn, - StateFunc: func(arn interface{}) string { - // aws_cloudwatch_log_group arn attribute references contain a trailing `:*`, which breaks functionality - return strings.TrimSuffix(arn.(string), ":*") - }, - }, - - "log_destination_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: ec2.LogDestinationTypeCloudWatchLogs, - ValidateFunc: validation.StringInSlice([]string{ - ec2.LogDestinationTypeCloudWatchLogs, - ec2.LogDestinationTypeS3, - }, false), - }, - - "log_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"log_destination"}, - Deprecated: "use 'log_destination' argument instead", - }, - - "vpc_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"subnet_id", "eni_id"}, - }, - - "subnet_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"eni_id", "vpc_id"}, - }, - - "eni_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"subnet_id", "vpc_id"}, - }, - - "traffic_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsLogFlowCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - types := []struct { - ID string - Type string - }{ - {ID: d.Get("vpc_id").(string), Type: "VPC"}, - {ID: d.Get("subnet_id").(string), Type: "Subnet"}, - {ID: d.Get("eni_id").(string), Type: "NetworkInterface"}, - } - - var resourceId string - var resourceType string - for _, t := range types { - if t.ID != "" { - resourceId = t.ID - resourceType = t.Type - break - } - } - - if resourceId == "" || resourceType == "" { - return fmt.Errorf("Error: Flow Logs require either a VPC, Subnet, or ENI ID") - } - - opts := &ec2.CreateFlowLogsInput{ - LogDestinationType: aws.String(d.Get("log_destination_type").(string)), - ResourceIds: []*string{aws.String(resourceId)}, - ResourceType: aws.String(resourceType), - TrafficType: aws.String(d.Get("traffic_type").(string)), - } - - if v, ok := d.GetOk("iam_role_arn"); ok && v != "" { - opts.DeliverLogsPermissionArn = aws.String(v.(string)) - } - - if v, ok := d.GetOk("log_destination"); ok && v != "" { - opts.LogDestination = aws.String(strings.TrimSuffix(v.(string), ":*")) - } - - if v, ok := d.GetOk("log_group_name"); ok && v != "" { - opts.LogGroupName = aws.String(v.(string)) - } - - log.Printf( - "[DEBUG] Flow Log Create configuration: %s", opts) - resp, err := conn.CreateFlowLogs(opts) - if err != nil { - return fmt.Errorf("Error creating Flow Log for (%s), error: %s", resourceId, err) - } - - if len(resp.FlowLogIds) > 1 { - return fmt.Errorf("Error: multiple Flow Logs created for (%s)", resourceId) - } - - d.SetId(*resp.FlowLogIds[0]) - - return resourceAwsLogFlowRead(d, meta) -} - -func resourceAwsLogFlowRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - opts := &ec2.DescribeFlowLogsInput{ - FlowLogIds: []*string{aws.String(d.Id())}, - } - - resp, err := conn.DescribeFlowLogs(opts) - if err != nil { - log.Printf("[WARN] Error describing Flow Logs for id (%s)", d.Id()) - d.SetId("") - return nil - } - - if len(resp.FlowLogs) == 0 { - log.Printf("[WARN] No Flow Logs found for id (%s)", d.Id()) - d.SetId("") - return nil - } - - fl := resp.FlowLogs[0] - d.Set("traffic_type", fl.TrafficType) - d.Set("log_destination", fl.LogDestination) - d.Set("log_destination_type", fl.LogDestinationType) - d.Set("log_group_name", fl.LogGroupName) - d.Set("iam_role_arn", fl.DeliverLogsPermissionArn) - - var resourceKey string - if strings.HasPrefix(*fl.ResourceId, "vpc-") { - resourceKey = "vpc_id" - } else if strings.HasPrefix(*fl.ResourceId, "subnet-") { - resourceKey = "subnet_id" - } else if strings.HasPrefix(*fl.ResourceId, "eni-") { - resourceKey = "eni_id" - } - if resourceKey != "" { - d.Set(resourceKey, fl.ResourceId) - } - - return nil -} - -func resourceAwsLogFlowDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf( - "[DEBUG] Flow Log Destroy: %s", d.Id()) - _, err := conn.DeleteFlowLogs(&ec2.DeleteFlowLogsInput{ - FlowLogIds: []*string{aws.String(d.Id())}, - }) - - if err != nil { - return fmt.Errorf("Error deleting Flow Log with ID (%s), error: %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_alias.go deleted file mode 100644 index 22d81714d..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_alias.go +++ /dev/null @@ -1,177 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/gamelift" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsGameliftAlias() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGameliftAliasCreate, - Read: resourceAwsGameliftAliasRead, - Update: resourceAwsGameliftAliasUpdate, - Delete: resourceAwsGameliftAliasDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 1024), - }, - "description": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(1, 1024), - }, - "routing_strategy": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "fleet_id": { - Type: schema.TypeString, - Optional: true, - }, - "message": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - gamelift.RoutingStrategyTypeSimple, - gamelift.RoutingStrategyTypeTerminal, - }, false), - }, - }, - }, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsGameliftAliasCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - - rs := expandGameliftRoutingStrategy(d.Get("routing_strategy").([]interface{})) - input := gamelift.CreateAliasInput{ - Name: aws.String(d.Get("name").(string)), - RoutingStrategy: rs, - } - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - log.Printf("[INFO] Creating Gamelift Alias: %s", input) - out, err := conn.CreateAlias(&input) - if err != nil { - return err - } - - d.SetId(*out.Alias.AliasId) - - return resourceAwsGameliftAliasRead(d, meta) -} - -func resourceAwsGameliftAliasRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - - log.Printf("[INFO] Describing Gamelift Alias: %s", d.Id()) - out, err := conn.DescribeAlias(&gamelift.DescribeAliasInput{ - AliasId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, gamelift.ErrCodeNotFoundException, "") { - d.SetId("") - log.Printf("[WARN] Gamelift Alias (%s) not found, removing from state", d.Id()) - return nil - } - return err - } - a := out.Alias - - d.Set("arn", a.AliasArn) - d.Set("description", a.Description) - d.Set("name", a.Name) - d.Set("routing_strategy", flattenGameliftRoutingStrategy(a.RoutingStrategy)) - - return nil -} - -func resourceAwsGameliftAliasUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - - log.Printf("[INFO] Updating Gamelift Alias: %s", d.Id()) - _, err := conn.UpdateAlias(&gamelift.UpdateAliasInput{ - AliasId: aws.String(d.Id()), - Name: aws.String(d.Get("name").(string)), - Description: aws.String(d.Get("description").(string)), - RoutingStrategy: expandGameliftRoutingStrategy(d.Get("routing_strategy").([]interface{})), - }) - if err != nil { - return err - } - - return resourceAwsGameliftAliasRead(d, meta) -} - -func resourceAwsGameliftAliasDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - - log.Printf("[INFO] Deleting Gamelift Alias: %s", d.Id()) - _, err := conn.DeleteAlias(&gamelift.DeleteAliasInput{ - AliasId: aws.String(d.Id()), - }) - return err -} - -func expandGameliftRoutingStrategy(cfg []interface{}) *gamelift.RoutingStrategy { - if len(cfg) < 1 { - return nil - } - - strategy := cfg[0].(map[string]interface{}) - - out := gamelift.RoutingStrategy{ - Type: aws.String(strategy["type"].(string)), - } - - if v, ok := strategy["fleet_id"].(string); ok && len(v) > 0 { - out.FleetId = aws.String(v) - } - if v, ok := strategy["message"].(string); ok && len(v) > 0 { - out.Message = aws.String(v) - } - - return &out -} - -func flattenGameliftRoutingStrategy(rs *gamelift.RoutingStrategy) []interface{} { - if rs == nil { - return []interface{}{} - } - - m := make(map[string]interface{}) - if rs.FleetId != nil { - m["fleet_id"] = *rs.FleetId - } - if rs.Message != nil { - m["message"] = *rs.Message - } - m["type"] = *rs.Type - - return []interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_build.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_build.go deleted file mode 100644 index 322a1ad6c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_build.go +++ /dev/null @@ -1,186 +0,0 @@ -package aws - -import ( - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/gamelift" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsGameliftBuild() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGameliftBuildCreate, - Read: resourceAwsGameliftBuildRead, - Update: resourceAwsGameliftBuildUpdate, - Delete: resourceAwsGameliftBuildDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 1024), - }, - "operating_system": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - gamelift.OperatingSystemAmazonLinux, - gamelift.OperatingSystemWindows2012, - }, false), - }, - "storage_location": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "key": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - "version": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(1, 1024), - }, - }, - } -} - -func resourceAwsGameliftBuildCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - - sl := expandGameliftStorageLocation(d.Get("storage_location").([]interface{})) - input := gamelift.CreateBuildInput{ - Name: aws.String(d.Get("name").(string)), - OperatingSystem: aws.String(d.Get("operating_system").(string)), - StorageLocation: sl, - } - if v, ok := d.GetOk("version"); ok { - input.Version = aws.String(v.(string)) - } - log.Printf("[INFO] Creating Gamelift Build: %s", input) - var out *gamelift.CreateBuildOutput - err := resource.Retry(30*time.Second, func() *resource.RetryError { - var err error - out, err = conn.CreateBuild(&input) - if err != nil { - if isAWSErr(err, gamelift.ErrCodeInvalidRequestException, "Provided build is not accessible.") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - - d.SetId(*out.Build.BuildId) - - stateConf := resource.StateChangeConf{ - Pending: []string{gamelift.BuildStatusInitialized}, - Target: []string{gamelift.BuildStatusReady}, - Timeout: 1 * time.Minute, - Refresh: func() (interface{}, string, error) { - out, err := conn.DescribeBuild(&gamelift.DescribeBuildInput{ - BuildId: aws.String(d.Id()), - }) - if err != nil { - return 42, "", err - } - - return out, *out.Build.Status, nil - }, - } - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsGameliftBuildRead(d, meta) -} - -func resourceAwsGameliftBuildRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - - log.Printf("[INFO] Reading Gamelift Build: %s", d.Id()) - out, err := conn.DescribeBuild(&gamelift.DescribeBuildInput{ - BuildId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, gamelift.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Gamelift Build (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - b := out.Build - - d.Set("name", b.Name) - d.Set("operating_system", b.OperatingSystem) - d.Set("version", b.Version) - - return nil -} - -func resourceAwsGameliftBuildUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - - log.Printf("[INFO] Updating Gamelift Build: %s", d.Id()) - input := gamelift.UpdateBuildInput{ - BuildId: aws.String(d.Id()), - Name: aws.String(d.Get("name").(string)), - } - if v, ok := d.GetOk("version"); ok { - input.Version = aws.String(v.(string)) - } - - _, err := conn.UpdateBuild(&input) - if err != nil { - return err - } - - return resourceAwsGameliftBuildRead(d, meta) -} - -func resourceAwsGameliftBuildDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - - log.Printf("[INFO] Deleting Gamelift Build: %s", d.Id()) - _, err := conn.DeleteBuild(&gamelift.DeleteBuildInput{ - BuildId: aws.String(d.Id()), - }) - return err -} - -func expandGameliftStorageLocation(cfg []interface{}) *gamelift.S3Location { - loc := cfg[0].(map[string]interface{}) - return &gamelift.S3Location{ - Bucket: aws.String(loc["bucket"].(string)), - Key: aws.String(loc["key"].(string)), - RoleArn: aws.String(loc["role_arn"].(string)), - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go deleted file mode 100644 index 36212a997..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go +++ /dev/null @@ -1,589 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "reflect" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/gamelift" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsGameliftFleet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGameliftFleetCreate, - Read: resourceAwsGameliftFleetRead, - Update: resourceAwsGameliftFleetUpdate, - Delete: resourceAwsGameliftFleetDelete, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(70 * time.Minute), - Delete: schema.DefaultTimeout(5 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "build_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "ec2_instance_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 1024), - }, - "description": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(1, 1024), - }, - "ec2_inbound_permission": { - Type: schema.TypeList, - Optional: true, - MaxItems: 50, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "from_port": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(1, 60000), - }, - "ip_range": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateCIDRNetworkAddress, - }, - "protocol": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - gamelift.IpProtocolTcp, - gamelift.IpProtocolUdp, - }, false), - }, - "to_port": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(1, 60000), - }, - }, - }, - }, - "log_paths": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "metric_groups": { - Type: schema.TypeList, - Optional: true, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringLenBetween(1, 255), - }, - }, - "new_game_session_protection_policy": { - Type: schema.TypeString, - Optional: true, - Default: gamelift.ProtectionPolicyNoProtection, - ValidateFunc: validation.StringInSlice([]string{ - gamelift.ProtectionPolicyNoProtection, - gamelift.ProtectionPolicyFullProtection, - }, false), - }, - "operating_system": { - Type: schema.TypeString, - Computed: true, - }, - "resource_creation_limit_policy": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "new_game_sessions_per_creator": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "policy_period_in_minutes": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - }, - }, - }, - "runtime_configuration": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "game_session_activation_timeout_seconds": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(1, 600), - }, - "max_concurrent_game_session_activations": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(1, 2147483647), - }, - "server_process": { - Type: schema.TypeList, - Optional: true, - MaxItems: 50, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "concurrent_executions": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntAtLeast(1), - }, - "launch_path": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 1024), - }, - "parameters": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(1, 1024), - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func resourceAwsGameliftFleetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - - input := gamelift.CreateFleetInput{ - BuildId: aws.String(d.Get("build_id").(string)), - EC2InstanceType: aws.String(d.Get("ec2_instance_type").(string)), - Name: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - if v, ok := d.GetOk("ec2_inbound_permission"); ok { - input.EC2InboundPermissions = expandGameliftIpPermissions(v.([]interface{})) - } - if v, ok := d.GetOk("metric_groups"); ok { - input.MetricGroups = expandStringList(v.([]interface{})) - } - if v, ok := d.GetOk("new_game_session_protection_policy"); ok { - input.NewGameSessionProtectionPolicy = aws.String(v.(string)) - } - if v, ok := d.GetOk("resource_creation_limit_policy"); ok { - input.ResourceCreationLimitPolicy = expandGameliftResourceCreationLimitPolicy(v.([]interface{})) - } - if v, ok := d.GetOk("runtime_configuration"); ok { - input.RuntimeConfiguration = expandGameliftRuntimeConfiguration(v.([]interface{})) - } - - log.Printf("[INFO] Creating Gamelift Fleet: %s", input) - out, err := conn.CreateFleet(&input) - if err != nil { - return err - } - - d.SetId(*out.FleetAttributes.FleetId) - - stateConf := &resource.StateChangeConf{ - Pending: []string{ - gamelift.FleetStatusActivating, - gamelift.FleetStatusBuilding, - gamelift.FleetStatusDownloading, - gamelift.FleetStatusNew, - gamelift.FleetStatusValidating, - }, - Target: []string{gamelift.FleetStatusActive}, - Timeout: d.Timeout(schema.TimeoutCreate), - Refresh: func() (interface{}, string, error) { - out, err := conn.DescribeFleetAttributes(&gamelift.DescribeFleetAttributesInput{ - FleetIds: aws.StringSlice([]string{d.Id()}), - }) - if err != nil { - return 42, "", err - } - - attributes := out.FleetAttributes - if len(attributes) < 1 { - return nil, "", nil - } - if len(attributes) != 1 { - return 42, "", fmt.Errorf("Expected exactly 1 Gamelift fleet, found %d under %q", - len(attributes), d.Id()) - } - - fleet := attributes[0] - return fleet, *fleet.Status, nil - }, - } - _, err = stateConf.WaitForState() - if err != nil { - events, fErr := getGameliftFleetFailures(conn, d.Id()) - if fErr != nil { - log.Printf("[WARN] Failed to poll fleet failures: %s", fErr) - } - if len(events) > 0 { - return fmt.Errorf("%s Recent failures:\n%+v", err, events) - } - - return err - } - - return resourceAwsGameliftFleetRead(d, meta) -} - -func resourceAwsGameliftFleetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - - log.Printf("[INFO] Describing Gamelift Fleet: %s", d.Id()) - out, err := conn.DescribeFleetAttributes(&gamelift.DescribeFleetAttributesInput{ - FleetIds: aws.StringSlice([]string{d.Id()}), - }) - if err != nil { - return err - } - attributes := out.FleetAttributes - if len(attributes) < 1 { - log.Printf("[WARN] Gamelift Fleet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - if len(attributes) != 1 { - return fmt.Errorf("Expected exactly 1 Gamelift fleet, found %d under %q", - len(attributes), d.Id()) - } - fleet := attributes[0] - - d.Set("build_id", fleet.BuildId) - d.Set("description", fleet.Description) - d.Set("arn", fleet.FleetArn) - d.Set("log_paths", aws.StringValueSlice(fleet.LogPaths)) - d.Set("metric_groups", flattenStringList(fleet.MetricGroups)) - d.Set("name", fleet.Name) - d.Set("new_game_session_protection_policy", fleet.NewGameSessionProtectionPolicy) - d.Set("operating_system", fleet.OperatingSystem) - d.Set("resource_creation_limit_policy", flattenGameliftResourceCreationLimitPolicy(fleet.ResourceCreationLimitPolicy)) - - return nil -} - -func resourceAwsGameliftFleetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - - log.Printf("[INFO] Updating Gamelift Fleet: %s", d.Id()) - - if d.HasChange("description") || d.HasChange("metric_groups") || d.HasChange("name") || - d.HasChange("new_game_session_protection_policy") || d.HasChange("resource_creation_limit_policy") { - _, err := conn.UpdateFleetAttributes(&gamelift.UpdateFleetAttributesInput{ - Description: aws.String(d.Get("description").(string)), - FleetId: aws.String(d.Id()), - MetricGroups: expandStringList(d.Get("metric_groups").([]interface{})), - Name: aws.String(d.Get("name").(string)), - NewGameSessionProtectionPolicy: aws.String(d.Get("new_game_session_protection_policy").(string)), - ResourceCreationLimitPolicy: expandGameliftResourceCreationLimitPolicy(d.Get("resource_creation_limit_policy").([]interface{})), - }) - if err != nil { - return err - } - } - - if d.HasChange("ec2_inbound_permission") { - oldPerms, newPerms := d.GetChange("ec2_inbound_permission") - authorizations, revocations := diffGameliftPortSettings(oldPerms.([]interface{}), newPerms.([]interface{})) - - _, err := conn.UpdateFleetPortSettings(&gamelift.UpdateFleetPortSettingsInput{ - FleetId: aws.String(d.Id()), - InboundPermissionAuthorizations: authorizations, - InboundPermissionRevocations: revocations, - }) - if err != nil { - return err - } - } - - if d.HasChange("runtime_configuration") { - _, err := conn.UpdateRuntimeConfiguration(&gamelift.UpdateRuntimeConfigurationInput{ - FleetId: aws.String(d.Id()), - RuntimeConfiguration: expandGameliftRuntimeConfiguration(d.Get("runtime_configuration").([]interface{})), - }) - if err != nil { - return err - } - } - - return resourceAwsGameliftFleetRead(d, meta) -} - -func resourceAwsGameliftFleetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - - log.Printf("[INFO] Deleting Gamelift Fleet: %s", d.Id()) - // It can take ~ 1 hr as Gamelift will keep retrying on errors like - // invalid launch path and remain in state when it can't be deleted :/ - err := resource.Retry(60*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteFleet(&gamelift.DeleteFleetInput{ - FleetId: aws.String(d.Id()), - }) - if err != nil { - msg := fmt.Sprintf("Cannot delete fleet %s that is in status of ", d.Id()) - if isAWSErr(err, gamelift.ErrCodeInvalidRequestException, msg) { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - - return waitForGameliftFleetToBeDeleted(conn, d.Id(), d.Timeout(schema.TimeoutDelete)) -} - -func waitForGameliftFleetToBeDeleted(conn *gamelift.GameLift, id string, timeout time.Duration) error { - stateConf := resource.StateChangeConf{ - Pending: []string{ - gamelift.FleetStatusActive, - gamelift.FleetStatusDeleting, - gamelift.FleetStatusError, - gamelift.FleetStatusTerminated, - }, - Target: []string{}, - Timeout: timeout, - Refresh: func() (interface{}, string, error) { - out, err := conn.DescribeFleetAttributes(&gamelift.DescribeFleetAttributesInput{ - FleetIds: aws.StringSlice([]string{id}), - }) - if err != nil { - return 42, "", err - } - - attributes := out.FleetAttributes - if len(attributes) < 1 { - return nil, "", nil - } - if len(attributes) != 1 { - return 42, "", fmt.Errorf("Expected exactly 1 Gamelift fleet, found %d under %q", - len(attributes), id) - } - - fleet := attributes[0] - return fleet, *fleet.Status, nil - }, - } - _, err := stateConf.WaitForState() - if err != nil { - events, fErr := getGameliftFleetFailures(conn, id) - if fErr != nil { - log.Printf("[WARN] Failed to poll fleet failures: %s", fErr) - } - if len(events) > 0 { - return fmt.Errorf("%s Recent failures:\n%+v", err, events) - } - } - return err -} - -func expandGameliftIpPermissions(cfgs []interface{}) []*gamelift.IpPermission { - if len(cfgs) < 1 { - return []*gamelift.IpPermission{} - } - - perms := make([]*gamelift.IpPermission, len(cfgs)) - for i, rawCfg := range cfgs { - cfg := rawCfg.(map[string]interface{}) - perms[i] = expandGameliftIpPermission(cfg) - } - return perms -} - -func expandGameliftIpPermission(cfg map[string]interface{}) *gamelift.IpPermission { - return &gamelift.IpPermission{ - FromPort: aws.Int64(int64(cfg["from_port"].(int))), - IpRange: aws.String(cfg["ip_range"].(string)), - Protocol: aws.String(cfg["protocol"].(string)), - ToPort: aws.Int64(int64(cfg["to_port"].(int))), - } -} - -func expandGameliftResourceCreationLimitPolicy(cfg []interface{}) *gamelift.ResourceCreationLimitPolicy { - if len(cfg) < 1 { - return nil - } - out := gamelift.ResourceCreationLimitPolicy{} - m := cfg[0].(map[string]interface{}) - - if v, ok := m["new_game_sessions_per_creator"]; ok { - out.NewGameSessionsPerCreator = aws.Int64(int64(v.(int))) - } - if v, ok := m["policy_period_in_minutes"]; ok { - out.PolicyPeriodInMinutes = aws.Int64(int64(v.(int))) - } - - return &out -} - -func flattenGameliftResourceCreationLimitPolicy(policy *gamelift.ResourceCreationLimitPolicy) []interface{} { - if policy == nil { - return []interface{}{} - } - - m := make(map[string]interface{}) - m["new_game_sessions_per_creator"] = *policy.NewGameSessionsPerCreator - m["policy_period_in_minutes"] = *policy.PolicyPeriodInMinutes - - return []interface{}{m} -} - -func expandGameliftRuntimeConfiguration(cfg []interface{}) *gamelift.RuntimeConfiguration { - if len(cfg) < 1 { - return nil - } - out := gamelift.RuntimeConfiguration{} - m := cfg[0].(map[string]interface{}) - - if v, ok := m["game_session_activation_timeout_seconds"].(int); ok && v > 0 { - out.GameSessionActivationTimeoutSeconds = aws.Int64(int64(v)) - } - if v, ok := m["max_concurrent_game_session_activations"].(int); ok && v > 0 { - out.MaxConcurrentGameSessionActivations = aws.Int64(int64(v)) - } - if v, ok := m["server_process"]; ok { - out.ServerProcesses = expandGameliftServerProcesses(v.([]interface{})) - } - - return &out -} - -func expandGameliftServerProcesses(cfgs []interface{}) []*gamelift.ServerProcess { - if len(cfgs) < 1 { - return []*gamelift.ServerProcess{} - } - - processes := make([]*gamelift.ServerProcess, len(cfgs)) - for i, rawCfg := range cfgs { - cfg := rawCfg.(map[string]interface{}) - process := &gamelift.ServerProcess{ - ConcurrentExecutions: aws.Int64(int64(cfg["concurrent_executions"].(int))), - LaunchPath: aws.String(cfg["launch_path"].(string)), - } - if v, ok := cfg["parameters"].(string); ok && len(v) > 0 { - process.Parameters = aws.String(v) - } - processes[i] = process - } - return processes -} - -func getGameliftFleetFailures(conn *gamelift.GameLift, id string) ([]*gamelift.Event, error) { - var events []*gamelift.Event - err := _getGameliftFleetFailures(conn, id, nil, &events) - return events, err -} - -func _getGameliftFleetFailures(conn *gamelift.GameLift, id string, nextToken *string, events *[]*gamelift.Event) error { - eOut, err := conn.DescribeFleetEvents(&gamelift.DescribeFleetEventsInput{ - FleetId: aws.String(id), - NextToken: nextToken, - }) - if err != nil { - return err - } - - for _, e := range eOut.Events { - if isGameliftEventFailure(e) { - *events = append(*events, e) - } - } - - if eOut.NextToken != nil { - err := _getGameliftFleetFailures(conn, id, nextToken, events) - if err != nil { - return err - } - } - - return nil -} - -func isGameliftEventFailure(event *gamelift.Event) bool { - failureCodes := []string{ - gamelift.EventCodeFleetActivationFailed, - gamelift.EventCodeFleetActivationFailedNoInstances, - gamelift.EventCodeFleetBinaryDownloadFailed, - gamelift.EventCodeFleetInitializationFailed, - gamelift.EventCodeFleetStateError, - gamelift.EventCodeFleetValidationExecutableRuntimeFailure, - gamelift.EventCodeFleetValidationLaunchPathNotFound, - gamelift.EventCodeFleetValidationTimedOut, - gamelift.EventCodeFleetVpcPeeringFailed, - gamelift.EventCodeGameSessionActivationTimeout, - gamelift.EventCodeServerProcessCrashed, - gamelift.EventCodeServerProcessForceTerminated, - gamelift.EventCodeServerProcessInvalidPath, - gamelift.EventCodeServerProcessProcessExitTimeout, - gamelift.EventCodeServerProcessProcessReadyTimeout, - gamelift.EventCodeServerProcessSdkInitializationTimeout, - gamelift.EventCodeServerProcessTerminatedUnhealthy, - } - for _, fc := range failureCodes { - if *event.EventCode == fc { - return true - } - } - return false -} - -func diffGameliftPortSettings(oldPerms, newPerms []interface{}) (a []*gamelift.IpPermission, r []*gamelift.IpPermission) { -OUTER: - for i, op := range oldPerms { - oldPerm := op.(map[string]interface{}) - for j, np := range newPerms { - newPerm := np.(map[string]interface{}) - - // Remove permissions which have not changed so we're not wasting - // API calls for removal & subseq. addition of the same ones - if reflect.DeepEqual(oldPerm, newPerm) { - oldPerms = append(oldPerms[:i], oldPerms[i+1:]...) - newPerms = append(newPerms[:j], newPerms[j+1:]...) - continue OUTER - } - } - - // Add what's left for revocation - r = append(r, expandGameliftIpPermission(oldPerm)) - } - - for _, np := range newPerms { - newPerm := np.(map[string]interface{}) - // Add what's left for authorization - a = append(a, expandGameliftIpPermission(newPerm)) - } - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_game_session_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_game_session_queue.go deleted file mode 100644 index 9cdfddbbc..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_game_session_queue.go +++ /dev/null @@ -1,218 +0,0 @@ -package aws - -import ( - "fmt" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/gamelift" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - "log" -) - -func resourceAwsGameliftGameSessionQueue() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGameliftGameSessionQueueCreate, - Read: resourceAwsGameliftGameSessionQueueRead, - Update: resourceAwsGameliftGameSessionQueueUpdate, - Delete: resourceAwsGameliftGameSessionQueueDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "destinations": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 128), - }, - "player_latency_policy": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "maximum_individual_player_latency_milliseconds": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "policy_duration_seconds": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - }, - }, - }, - "timeout_in_seconds": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(10, 600), - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsGameliftGameSessionQueueCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - - input := gamelift.CreateGameSessionQueueInput{ - Name: aws.String(d.Get("name").(string)), - Destinations: expandGameliftGameSessionQueueDestinations(d.Get("destinations").([]interface{})), - PlayerLatencyPolicies: expandGameliftGameSessionPlayerLatencyPolicies(d.Get("player_latency_policy").([]interface{})), - TimeoutInSeconds: aws.Int64(int64(d.Get("timeout_in_seconds").(int))), - } - log.Printf("[INFO] Creating Gamelift Session Queue: %s", input) - out, err := conn.CreateGameSessionQueue(&input) - if err != nil { - return fmt.Errorf("error creating Gamelift Game Session Queue: %s", err) - } - - d.SetId(*out.GameSessionQueue.Name) - - return resourceAwsGameliftGameSessionQueueRead(d, meta) -} - -func resourceAwsGameliftGameSessionQueueRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - log.Printf("[INFO] Describing Gamelift Session Queues: %s", d.Id()) - limit := int64(1) - out, err := conn.DescribeGameSessionQueues(&gamelift.DescribeGameSessionQueuesInput{ - Names: aws.StringSlice([]string{d.Id()}), - Limit: &limit, - }) - if err != nil { - if isAWSErr(err, gamelift.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Gamelift Session Queues (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Gamelift Game Session Queue (%s): %s", d.Id(), err) - } - sessionQueues := out.GameSessionQueues - - if len(sessionQueues) < 1 { - log.Printf("[WARN] Gamelift Session Queue (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - if len(sessionQueues) != 1 { - return fmt.Errorf("expected exactly 1 Gamelift Session Queues, found %d under %q", - len(sessionQueues), d.Id()) - } - sessionQueue := sessionQueues[0] - - d.Set("arn", sessionQueue.GameSessionQueueArn) - d.Set("name", sessionQueue.Name) - d.Set("timeout_in_seconds", sessionQueue.TimeoutInSeconds) - if err := d.Set("destinations", flattenGameliftGameSessionQueueDestinations(sessionQueue.Destinations)); err != nil { - return fmt.Errorf("error setting destinations: %s", err) - } - if err := d.Set("player_latency_policy", flattenGameliftPlayerLatencyPolicies(sessionQueue.PlayerLatencyPolicies)); err != nil { - return fmt.Errorf("error setting player_latency_policy: %s", err) - } - - return nil -} - -func flattenGameliftGameSessionQueueDestinations(destinations []*gamelift.GameSessionQueueDestination) []interface{} { - l := make([]interface{}, 0) - - for _, destination := range destinations { - if destination == nil { - continue - } - l = append(l, aws.StringValue(destination.DestinationArn)) - } - - return l -} - -func flattenGameliftPlayerLatencyPolicies(playerLatencyPolicies []*gamelift.PlayerLatencyPolicy) []interface{} { - l := make([]interface{}, 0) - for _, policy := range playerLatencyPolicies { - m := map[string]interface{}{ - "maximum_individual_player_latency_milliseconds": aws.Int64Value(policy.MaximumIndividualPlayerLatencyMilliseconds), - "policy_duration_seconds": aws.Int64Value(policy.PolicyDurationSeconds), - } - l = append(l, m) - } - return l -} - -func resourceAwsGameliftGameSessionQueueUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - - log.Printf("[INFO] Updating Gamelift Session Queue: %s", d.Id()) - - input := gamelift.UpdateGameSessionQueueInput{ - Name: aws.String(d.Id()), - Destinations: expandGameliftGameSessionQueueDestinations(d.Get("destinations").([]interface{})), - PlayerLatencyPolicies: expandGameliftGameSessionPlayerLatencyPolicies(d.Get("player_latency_policy").([]interface{})), - TimeoutInSeconds: aws.Int64(int64(d.Get("timeout_in_seconds").(int))), - } - - _, err := conn.UpdateGameSessionQueue(&input) - if err != nil { - return fmt.Errorf("error updating Gamelift Game Session Queue (%s): %s", d.Id(), err) - } - - return resourceAwsGameliftGameSessionQueueRead(d, meta) -} - -func resourceAwsGameliftGameSessionQueueDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).gameliftconn - log.Printf("[INFO] Deleting Gamelift Session Queue: %s", d.Id()) - _, err := conn.DeleteGameSessionQueue(&gamelift.DeleteGameSessionQueueInput{ - Name: aws.String(d.Id()), - }) - if isAWSErr(err, gamelift.ErrCodeNotFoundException, "") { - return nil - } - if err != nil { - return fmt.Errorf("error deleting Gamelift Game Session Queue (%s): %s", d.Id(), err) - } - - return nil -} - -func expandGameliftGameSessionQueueDestinations(destinationsMap []interface{}) []*gamelift.GameSessionQueueDestination { - if len(destinationsMap) < 1 { - return nil - } - var destinations []*gamelift.GameSessionQueueDestination - for _, destination := range destinationsMap { - destinations = append( - destinations, - &gamelift.GameSessionQueueDestination{ - DestinationArn: aws.String(destination.(string)), - }) - } - return destinations -} - -func expandGameliftGameSessionPlayerLatencyPolicies(destinationsPlayerLatencyPolicyMap []interface{}) []*gamelift.PlayerLatencyPolicy { - if len(destinationsPlayerLatencyPolicyMap) < 1 { - return nil - } - var playerLatencyPolicies []*gamelift.PlayerLatencyPolicy - for _, playerLatencyPolicy := range destinationsPlayerLatencyPolicyMap { - item := playerLatencyPolicy.(map[string]interface{}) - playerLatencyPolicies = append( - playerLatencyPolicies, - &gamelift.PlayerLatencyPolicy{ - MaximumIndividualPlayerLatencyMilliseconds: aws.Int64(int64(item["maximum_individual_player_latency_milliseconds"].(int))), - PolicyDurationSeconds: aws.Int64(int64(item["policy_duration_seconds"].(int))), - }) - } - return playerLatencyPolicies -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault.go deleted file mode 100644 index 08b505722..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault.go +++ /dev/null @@ -1,417 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "regexp" - - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/glacier" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsGlacierVault() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGlacierVaultCreate, - Read: resourceAwsGlacierVaultRead, - Update: resourceAwsGlacierVaultUpdate, - Delete: resourceAwsGlacierVaultDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[.0-9A-Za-z-_]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters, hyphens, underscores, and periods are allowed in %q", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 255 characters", k)) - } - return - }, - }, - - "location": { - Type: schema.TypeString, - Computed: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "access_policy": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.ValidateJsonString, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - }, - - "notification": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "events": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "sns_topic": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsGlacierVaultCreate(d *schema.ResourceData, meta interface{}) error { - glacierconn := meta.(*AWSClient).glacierconn - - input := &glacier.CreateVaultInput{ - VaultName: aws.String(d.Get("name").(string)), - } - - out, err := glacierconn.CreateVault(input) - if err != nil { - return fmt.Errorf("Error creating Glacier Vault: %s", err) - } - - d.SetId(d.Get("name").(string)) - d.Set("location", *out.Location) - - return resourceAwsGlacierVaultUpdate(d, meta) -} - -func resourceAwsGlacierVaultUpdate(d *schema.ResourceData, meta interface{}) error { - glacierconn := meta.(*AWSClient).glacierconn - - if err := setGlacierVaultTags(glacierconn, d); err != nil { - return err - } - - if d.HasChange("access_policy") { - if err := resourceAwsGlacierVaultPolicyUpdate(glacierconn, d); err != nil { - return err - } - } - - if d.HasChange("notification") { - if err := resourceAwsGlacierVaultNotificationUpdate(glacierconn, d); err != nil { - return err - } - } - - return resourceAwsGlacierVaultRead(d, meta) -} - -func resourceAwsGlacierVaultRead(d *schema.ResourceData, meta interface{}) error { - glacierconn := meta.(*AWSClient).glacierconn - - input := &glacier.DescribeVaultInput{ - VaultName: aws.String(d.Id()), - } - - out, err := glacierconn.DescribeVault(input) - if err != nil { - return fmt.Errorf("Error reading Glacier Vault: %s", err.Error()) - } - - awsClient := meta.(*AWSClient) - d.Set("name", out.VaultName) - d.Set("arn", out.VaultARN) - - location, err := buildGlacierVaultLocation(awsClient.accountid, d.Id()) - if err != nil { - return err - } - d.Set("location", location) - - tags, err := getGlacierVaultTags(glacierconn, d.Id()) - if err != nil { - return err - } - d.Set("tags", tags) - - log.Printf("[DEBUG] Getting the access_policy for Vault %s", d.Id()) - pol, err := glacierconn.GetVaultAccessPolicy(&glacier.GetVaultAccessPolicyInput{ - VaultName: aws.String(d.Id()), - }) - - if awserr, ok := err.(awserr.Error); ok && awserr.Code() == "ResourceNotFoundException" { - d.Set("access_policy", "") - } else if pol != nil { - policy, err := structure.NormalizeJsonString(*pol.Policy.Policy) - if err != nil { - return fmt.Errorf("access policy contains an invalid JSON: %s", err) - } - d.Set("access_policy", policy) - } else { - return err - } - - notifications, err := getGlacierVaultNotification(glacierconn, d.Id()) - if awserr, ok := err.(awserr.Error); ok && awserr.Code() == "ResourceNotFoundException" { - d.Set("notification", "") - } else if pol != nil { - d.Set("notification", notifications) - } else { - return err - } - - return nil -} - -func resourceAwsGlacierVaultDelete(d *schema.ResourceData, meta interface{}) error { - glacierconn := meta.(*AWSClient).glacierconn - - log.Printf("[DEBUG] Glacier Delete Vault: %s", d.Id()) - _, err := glacierconn.DeleteVault(&glacier.DeleteVaultInput{ - VaultName: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error deleting Glacier Vault: %s", err.Error()) - } - return nil -} - -func resourceAwsGlacierVaultNotificationUpdate(glacierconn *glacier.Glacier, d *schema.ResourceData) error { - - if v, ok := d.GetOk("notification"); ok { - settings := v.([]interface{}) - - if len(settings) > 1 { - return fmt.Errorf("Only a single Notification Block is allowed for Glacier Vault") - } else if len(settings) == 1 { - s := settings[0].(map[string]interface{}) - var events []*string - for _, id := range s["events"].(*schema.Set).List() { - events = append(events, aws.String(id.(string))) - } - - _, err := glacierconn.SetVaultNotifications(&glacier.SetVaultNotificationsInput{ - VaultName: aws.String(d.Id()), - VaultNotificationConfig: &glacier.VaultNotificationConfig{ - SNSTopic: aws.String(s["sns_topic"].(string)), - Events: events, - }, - }) - - if err != nil { - return fmt.Errorf("Error Updating Glacier Vault Notifications: %s", err.Error()) - } - } - } else { - _, err := glacierconn.DeleteVaultNotifications(&glacier.DeleteVaultNotificationsInput{ - VaultName: aws.String(d.Id()), - }) - - if err != nil { - return fmt.Errorf("Error Removing Glacier Vault Notifications: %s", err.Error()) - } - - } - - return nil -} - -func resourceAwsGlacierVaultPolicyUpdate(glacierconn *glacier.Glacier, d *schema.ResourceData) error { - vaultName := d.Id() - policyContents := d.Get("access_policy").(string) - - policy := &glacier.VaultAccessPolicy{ - Policy: aws.String(policyContents), - } - - if policyContents != "" { - log.Printf("[DEBUG] Glacier Vault: %s, put policy", vaultName) - - _, err := glacierconn.SetVaultAccessPolicy(&glacier.SetVaultAccessPolicyInput{ - VaultName: aws.String(d.Id()), - Policy: policy, - }) - - if err != nil { - return fmt.Errorf("Error putting Glacier Vault policy: %s", err.Error()) - } - } else { - log.Printf("[DEBUG] Glacier Vault: %s, delete policy: %s", vaultName, policy) - _, err := glacierconn.DeleteVaultAccessPolicy(&glacier.DeleteVaultAccessPolicyInput{ - VaultName: aws.String(d.Id()), - }) - - if err != nil { - return fmt.Errorf("Error deleting Glacier Vault policy: %s", err.Error()) - } - } - - return nil -} - -func setGlacierVaultTags(conn *glacier.Glacier, 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 := diffGlacierVaultTags(mapGlacierVaultTags(o), mapGlacierVaultTags(n)) - - // Set tags - if len(remove) > 0 { - tagsToRemove := &glacier.RemoveTagsFromVaultInput{ - VaultName: aws.String(d.Id()), - TagKeys: glacierStringsToPointyString(remove), - } - - log.Printf("[DEBUG] Removing tags: from %s", d.Id()) - _, err := conn.RemoveTagsFromVault(tagsToRemove) - if err != nil { - return err - } - } - if len(create) > 0 { - tagsToAdd := &glacier.AddTagsToVaultInput{ - VaultName: aws.String(d.Id()), - Tags: glacierVaultTagsFromMap(create), - } - - log.Printf("[DEBUG] Creating tags: for %s", d.Id()) - _, err := conn.AddTagsToVault(tagsToAdd) - if err != nil { - return err - } - } - } - - return nil -} - -func mapGlacierVaultTags(m map[string]interface{}) map[string]string { - results := make(map[string]string) - for k, v := range m { - results[k] = v.(string) - } - - return results -} - -func diffGlacierVaultTags(oldTags, newTags map[string]string) (map[string]string, []string) { - - create := make(map[string]string) - for k, v := range newTags { - create[k] = v - } - - // Build the list of what to remove - var remove []string - for k, v := range oldTags { - old, ok := create[k] - if !ok || old != v { - // Delete it! - remove = append(remove, k) - } - } - - return create, remove -} - -func getGlacierVaultTags(glacierconn *glacier.Glacier, vaultName string) (map[string]string, error) { - request := &glacier.ListTagsForVaultInput{ - VaultName: aws.String(vaultName), - } - - log.Printf("[DEBUG] Getting the tags: for %s", vaultName) - response, err := glacierconn.ListTagsForVault(request) - if awserr, ok := err.(awserr.Error); ok && awserr.Code() == "NoSuchTagSet" { - return map[string]string{}, nil - } else if err != nil { - return nil, err - } - - return glacierVaultTagsToMap(response.Tags), nil -} - -func glacierVaultTagsToMap(responseTags map[string]*string) map[string]string { - results := make(map[string]string, len(responseTags)) - for k, v := range responseTags { - results[k] = *v - } - - return results -} - -func glacierVaultTagsFromMap(responseTags map[string]string) map[string]*string { - results := make(map[string]*string, len(responseTags)) - for k, v := range responseTags { - results[k] = aws.String(v) - } - - return results -} - -func glacierStringsToPointyString(s []string) []*string { - results := make([]*string, len(s)) - for i, x := range s { - results[i] = aws.String(x) - } - - return results -} - -func glacierPointersToStringList(pointers []*string) []interface{} { - list := make([]interface{}, len(pointers)) - for i, v := range pointers { - list[i] = *v - } - return list -} - -func buildGlacierVaultLocation(accountId, vaultName string) (string, error) { - if accountId == "" { - return "", errors.New("AWS account ID unavailable - failed to construct Vault location") - } - return fmt.Sprintf("/" + accountId + "/vaults/" + vaultName), nil -} - -func getGlacierVaultNotification(glacierconn *glacier.Glacier, vaultName string) ([]map[string]interface{}, error) { - request := &glacier.GetVaultNotificationsInput{ - VaultName: aws.String(vaultName), - } - - response, err := glacierconn.GetVaultNotifications(request) - if err != nil { - return nil, fmt.Errorf("Error reading Glacier Vault Notifications: %s", err.Error()) - } - - notifications := make(map[string]interface{}) - - log.Print("[DEBUG] Flattening Glacier Vault Notifications") - - notifications["events"] = schema.NewSet(schema.HashString, glacierPointersToStringList(response.VaultNotificationConfig.Events)) - notifications["sns_topic"] = *response.VaultNotificationConfig.SNSTopic - - return []map[string]interface{}{notifications}, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault_lock.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault_lock.go deleted file mode 100644 index c181510cb..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault_lock.go +++ /dev/null @@ -1,188 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/glacier" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsGlacierVaultLock() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGlacierVaultLockCreate, - Read: resourceAwsGlacierVaultLockRead, - // Allow ignore_deletion_error update - Update: schema.Noop, - Delete: resourceAwsGlacierVaultLockDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "complete_lock": { - Type: schema.TypeBool, - Required: true, - ForceNew: true, - }, - "ignore_deletion_error": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "policy": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - ValidateFunc: validateIAMPolicyJson, - }, - "vault_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - }, - } -} - -func resourceAwsGlacierVaultLockCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glacierconn - vaultName := d.Get("vault_name").(string) - - input := &glacier.InitiateVaultLockInput{ - AccountId: aws.String("-"), - Policy: &glacier.VaultLockPolicy{ - Policy: aws.String(d.Get("policy").(string)), - }, - VaultName: aws.String(vaultName), - } - - log.Printf("[DEBUG] Initiating Glacier Vault Lock: %s", input) - output, err := conn.InitiateVaultLock(input) - if err != nil { - return fmt.Errorf("error initiating Glacier Vault Lock: %s", err) - } - - d.SetId(vaultName) - - if !d.Get("complete_lock").(bool) { - return resourceAwsGlacierVaultLockRead(d, meta) - } - - completeLockInput := &glacier.CompleteVaultLockInput{ - LockId: output.LockId, - VaultName: aws.String(vaultName), - } - - log.Printf("[DEBUG] Completing Glacier Vault (%s) Lock: %s", vaultName, completeLockInput) - if _, err := conn.CompleteVaultLock(completeLockInput); err != nil { - return fmt.Errorf("error completing Glacier Vault (%s) Lock: %s", vaultName, err) - } - - if err := waitForGlacierVaultLockCompletion(conn, vaultName); err != nil { - return fmt.Errorf("error waiting for Glacier Vault Lock (%s) completion: %s", d.Id(), err) - } - - return resourceAwsGlacierVaultLockRead(d, meta) -} - -func resourceAwsGlacierVaultLockRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glacierconn - - input := &glacier.GetVaultLockInput{ - AccountId: aws.String("-"), - VaultName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading Glacier Vault Lock (%s): %s", d.Id(), input) - output, err := conn.GetVaultLock(input) - - if isAWSErr(err, glacier.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Glacier Vault Lock (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading Glacier Vault Lock (%s): %s", d.Id(), err) - } - - if output == nil { - log.Printf("[WARN] Glacier Vault Lock (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("complete_lock", aws.StringValue(output.State) == "Locked") - d.Set("policy", output.Policy) - d.Set("vault_name", d.Id()) - - return nil -} - -func resourceAwsGlacierVaultLockDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glacierconn - - input := &glacier.AbortVaultLockInput{ - VaultName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Aborting Glacier Vault Lock (%s): %s", d.Id(), input) - _, err := conn.AbortVaultLock(input) - - if isAWSErr(err, glacier.ErrCodeResourceNotFoundException, "") { - return nil - } - - if err != nil && !d.Get("ignore_deletion_error").(bool) { - return fmt.Errorf("error aborting Glacier Vault Lock (%s): %s", d.Id(), err) - } - - return nil -} - -func glacierVaultLockRefreshFunc(conn *glacier.Glacier, vaultName string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &glacier.GetVaultLockInput{ - AccountId: aws.String("-"), - VaultName: aws.String(vaultName), - } - - log.Printf("[DEBUG] Reading Glacier Vault Lock (%s): %s", vaultName, input) - output, err := conn.GetVaultLock(input) - - if isAWSErr(err, glacier.ErrCodeResourceNotFoundException, "") { - return nil, "", nil - } - - if err != nil { - return nil, "", fmt.Errorf("error reading Glacier Vault Lock (%s): %s", vaultName, err) - } - - if output == nil { - return nil, "", nil - } - - return output, aws.StringValue(output.State), nil - } -} - -func waitForGlacierVaultLockCompletion(conn *glacier.Glacier, vaultName string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{"InProgress"}, - Target: []string{"Locked"}, - Refresh: glacierVaultLockRefreshFunc(conn, vaultName), - Timeout: 5 * time.Minute, - } - - log.Printf("[DEBUG] Waiting for Glacier Vault Lock (%s) completion", vaultName) - _, err := stateConf.WaitForState() - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_globalaccelerator_accelerator.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_globalaccelerator_accelerator.go deleted file mode 100644 index c95d4a800..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_globalaccelerator_accelerator.go +++ /dev/null @@ -1,362 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/globalaccelerator" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsGlobalAcceleratorAccelerator() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGlobalAcceleratorAcceleratorCreate, - Read: resourceAwsGlobalAcceleratorAcceleratorRead, - Update: resourceAwsGlobalAcceleratorAcceleratorUpdate, - Delete: resourceAwsGlobalAcceleratorAcceleratorDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "ip_address_type": { - Type: schema.TypeString, - Optional: true, - Default: globalaccelerator.IpAddressTypeIpv4, - ValidateFunc: validation.StringInSlice([]string{ - globalaccelerator.IpAddressTypeIpv4, - }, false), - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "ip_sets": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "ip_addresses": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "ip_family": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "attributes": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "flow_logs_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "flow_logs_s3_bucket": { - Type: schema.TypeString, - Optional: true, - }, - "flow_logs_s3_prefix": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsGlobalAcceleratorAcceleratorCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).globalacceleratorconn - - opts := &globalaccelerator.CreateAcceleratorInput{ - Name: aws.String(d.Get("name").(string)), - IdempotencyToken: aws.String(resource.UniqueId()), - Enabled: aws.Bool(d.Get("enabled").(bool)), - } - - if v, ok := d.GetOk("ip_address_type"); ok { - opts.IpAddressType = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Create Global Accelerator accelerator: %s", opts) - - resp, err := conn.CreateAccelerator(opts) - if err != nil { - return fmt.Errorf("Error creating Global Accelerator accelerator: %s", err) - } - - d.SetId(*resp.Accelerator.AcceleratorArn) - - err = resourceAwsGlobalAcceleratorAcceleratorWaitForState(conn, d.Id()) - if err != nil { - return err - } - - if v := d.Get("attributes").([]interface{}); len(v) > 0 { - err = resourceAwsGlobalAcceleratorAcceleratorUpdateAttributes(conn, d.Id(), v[0].(map[string]interface{})) - if err != nil { - return err - } - } - - return resourceAwsGlobalAcceleratorAcceleratorRead(d, meta) -} - -func resourceAwsGlobalAcceleratorAcceleratorRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).globalacceleratorconn - - accelerator, err := resourceAwsGlobalAcceleratorAcceleratorRetrieve(conn, d.Id()) - - if err != nil { - return fmt.Errorf("Error reading Global Accelerator accelerator: %s", err) - } - - if accelerator == nil { - log.Printf("[WARN] Global Accelerator accelerator (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("name", accelerator.Name) - d.Set("ip_address_type", accelerator.IpAddressType) - d.Set("enabled", accelerator.Enabled) - if err := d.Set("ip_sets", resourceAwsGlobalAcceleratorAcceleratorFlattenIpSets(accelerator.IpSets)); err != nil { - return fmt.Errorf("Error setting Global Accelerator accelerator ip_sets: %s", err) - } - - resp, err := conn.DescribeAcceleratorAttributes(&globalaccelerator.DescribeAcceleratorAttributesInput{ - AcceleratorArn: aws.String(d.Id()), - }) - - if err != nil { - return fmt.Errorf("Error reading Global Accelerator accelerator attributes: %s", err) - } - - if err := d.Set("attributes", resourceAwsGlobalAcceleratorAcceleratorFlattenAttributes(resp.AcceleratorAttributes)); err != nil { - return fmt.Errorf("Error setting Global Accelerator accelerator attributes: %s", err) - } - - return nil -} - -func resourceAwsGlobalAcceleratorAcceleratorFlattenIpSets(ipsets []*globalaccelerator.IpSet) []interface{} { - out := make([]interface{}, len(ipsets)) - - for i, ipset := range ipsets { - m := make(map[string]interface{}) - - m["ip_addresses"] = flattenStringList(ipset.IpAddresses) - m["ip_family"] = aws.StringValue(ipset.IpFamily) - - out[i] = m - } - - return out -} - -func resourceAwsGlobalAcceleratorAcceleratorFlattenAttributes(attributes *globalaccelerator.AcceleratorAttributes) []interface{} { - if attributes == nil { - return nil - } - - out := make([]interface{}, 1) - m := make(map[string]interface{}) - m["flow_logs_enabled"] = aws.BoolValue(attributes.FlowLogsEnabled) - m["flow_logs_s3_bucket"] = aws.StringValue(attributes.FlowLogsS3Bucket) - m["flow_logs_s3_prefix"] = aws.StringValue(attributes.FlowLogsS3Prefix) - out[0] = m - - return out -} - -func resourceAwsGlobalAcceleratorAcceleratorStateRefreshFunc(conn *globalaccelerator.GlobalAccelerator, acceleratorArn string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - accelerator, err := resourceAwsGlobalAcceleratorAcceleratorRetrieve(conn, acceleratorArn) - - if err != nil { - log.Printf("Error retrieving Global Accelerator accelerator when waiting: %s", err) - return nil, "", err - } - - if accelerator == nil { - return nil, "", nil - } - - if accelerator.Status != nil { - log.Printf("[DEBUG] Global Accelerator accelerator (%s) status : %s", acceleratorArn, aws.StringValue(accelerator.Status)) - } - - return accelerator, aws.StringValue(accelerator.Status), nil - } -} - -func resourceAwsGlobalAcceleratorAcceleratorRetrieve(conn *globalaccelerator.GlobalAccelerator, acceleratorArn string) (*globalaccelerator.Accelerator, error) { - resp, err := conn.DescribeAccelerator(&globalaccelerator.DescribeAcceleratorInput{ - AcceleratorArn: aws.String(acceleratorArn), - }) - - if err != nil { - if isAWSErr(err, globalaccelerator.ErrCodeAcceleratorNotFoundException, "") { - return nil, nil - } - return nil, err - } - - return resp.Accelerator, nil -} - -func resourceAwsGlobalAcceleratorAcceleratorUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).globalacceleratorconn - - d.Partial(true) - - if d.HasChange("name") || d.HasChange("ip_address_type") || d.HasChange("enabled") { - opts := &globalaccelerator.UpdateAcceleratorInput{ - AcceleratorArn: aws.String(d.Id()), - Name: aws.String(d.Get("name").(string)), - Enabled: aws.Bool(d.Get("enabled").(bool)), - } - - if v, ok := d.GetOk("ip_address_type"); ok { - opts.IpAddressType = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Update Global Accelerator accelerator: %s", opts) - - _, err := conn.UpdateAccelerator(opts) - if err != nil { - return fmt.Errorf("Error updating Global Accelerator accelerator: %s", err) - } - - d.SetPartial("name") - d.SetPartial("ip_address_type") - d.SetPartial("enabled") - - err = resourceAwsGlobalAcceleratorAcceleratorWaitForState(conn, d.Id()) - if err != nil { - return err - } - } - - if d.HasChange("attributes") { - if v := d.Get("attributes").([]interface{}); len(v) > 0 { - err := resourceAwsGlobalAcceleratorAcceleratorUpdateAttributes(conn, d.Id(), v[0].(map[string]interface{})) - if err != nil { - return err - } - - } - - d.SetPartial("attributes") - } - - d.Partial(false) - - return resourceAwsGlobalAcceleratorAcceleratorRead(d, meta) -} - -func resourceAwsGlobalAcceleratorAcceleratorWaitForState(conn *globalaccelerator.GlobalAccelerator, acceleratorArn string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{globalaccelerator.AcceleratorStatusInProgress}, - Target: []string{globalaccelerator.AcceleratorStatusDeployed}, - Refresh: resourceAwsGlobalAcceleratorAcceleratorStateRefreshFunc(conn, acceleratorArn), - Timeout: 5 * time.Minute, - } - - log.Printf("[DEBUG] Waiting for Global Accelerator accelerator (%s) availability", acceleratorArn) - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for Global Accelerator accelerator (%s) availability: %s", acceleratorArn, err) - } - - return nil -} - -func resourceAwsGlobalAcceleratorAcceleratorUpdateAttributes(conn *globalaccelerator.GlobalAccelerator, acceleratorArn string, attributes map[string]interface{}) error { - opts := &globalaccelerator.UpdateAcceleratorAttributesInput{ - AcceleratorArn: aws.String(acceleratorArn), - FlowLogsEnabled: aws.Bool(attributes["flow_logs_enabled"].(bool)), - } - - if v := attributes["flow_logs_s3_bucket"]; v != nil { - opts.FlowLogsS3Bucket = aws.String(v.(string)) - } - - if v := attributes["flow_logs_s3_prefix"]; v != nil { - opts.FlowLogsS3Prefix = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Update Global Accelerator accelerator attributes: %s", opts) - - _, err := conn.UpdateAcceleratorAttributes(opts) - if err != nil { - return fmt.Errorf("Error updating Global Accelerator accelerator attributes: %s", err) - } - - return nil -} - -func resourceAwsGlobalAcceleratorAcceleratorDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).globalacceleratorconn - - { - opts := &globalaccelerator.UpdateAcceleratorInput{ - AcceleratorArn: aws.String(d.Id()), - Enabled: aws.Bool(false), - } - - log.Printf("[DEBUG] Disabling Global Accelerator accelerator: %s", opts) - - _, err := conn.UpdateAccelerator(opts) - if err != nil { - return fmt.Errorf("Error disabling Global Accelerator accelerator: %s", err) - } - - err = resourceAwsGlobalAcceleratorAcceleratorWaitForState(conn, d.Id()) - if err != nil { - return err - } - } - - { - opts := &globalaccelerator.DeleteAcceleratorInput{ - AcceleratorArn: aws.String(d.Id()), - } - - _, err := conn.DeleteAccelerator(opts) - if err != nil { - if isAWSErr(err, globalaccelerator.ErrCodeAcceleratorNotFoundException, "") { - return nil - } - return fmt.Errorf("Error deleting Global Accelerator accelerator: %s", err) - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_database.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_database.go deleted file mode 100644 index 8e9478dea..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_database.go +++ /dev/null @@ -1,215 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/glue" - - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsGlueCatalogDatabase() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGlueCatalogDatabaseCreate, - Read: resourceAwsGlueCatalogDatabaseRead, - Update: resourceAwsGlueCatalogDatabaseUpdate, - Delete: resourceAwsGlueCatalogDatabaseDelete, - Exists: resourceAwsGlueCatalogDatabaseExists, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "catalog_id": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - Computed: true, - }, - "name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "location_uri": { - Type: schema.TypeString, - Optional: true, - }, - "parameters": { - Type: schema.TypeMap, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - }, - }, - } -} - -func resourceAwsGlueCatalogDatabaseCreate(d *schema.ResourceData, meta interface{}) error { - glueconn := meta.(*AWSClient).glueconn - catalogID := createAwsGlueCatalogID(d, meta.(*AWSClient).accountid) - name := d.Get("name").(string) - - input := &glue.CreateDatabaseInput{ - CatalogId: aws.String(catalogID), - DatabaseInput: &glue.DatabaseInput{ - Name: aws.String(name), - }, - } - - _, err := glueconn.CreateDatabase(input) - if err != nil { - return fmt.Errorf("Error creating Catalog Database: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%s", catalogID, name)) - - return resourceAwsGlueCatalogDatabaseUpdate(d, meta) -} - -func resourceAwsGlueCatalogDatabaseUpdate(d *schema.ResourceData, meta interface{}) error { - glueconn := meta.(*AWSClient).glueconn - - catalogID, name, err := readAwsGlueCatalogID(d.Id()) - if err != nil { - return err - } - - dbUpdateInput := &glue.UpdateDatabaseInput{ - CatalogId: aws.String(catalogID), - Name: aws.String(name), - } - - dbInput := &glue.DatabaseInput{ - Name: aws.String(name), - } - - if desc, ok := d.GetOk("description"); ok { - dbInput.Description = aws.String(desc.(string)) - } - - if loc, ok := d.GetOk("location_uri"); ok { - dbInput.LocationUri = aws.String(loc.(string)) - } - - if params, ok := d.GetOk("parameters"); ok { - parametersInput := make(map[string]*string) - for key, value := range params.(map[string]interface{}) { - parametersInput[key] = aws.String(value.(string)) - } - dbInput.Parameters = parametersInput - } - - dbUpdateInput.DatabaseInput = dbInput - - if d.HasChange("description") || d.HasChange("location_uri") || d.HasChange("parameters") { - if _, err := glueconn.UpdateDatabase(dbUpdateInput); err != nil { - return err - } - } - - return resourceAwsGlueCatalogDatabaseRead(d, meta) -} - -func resourceAwsGlueCatalogDatabaseRead(d *schema.ResourceData, meta interface{}) error { - glueconn := meta.(*AWSClient).glueconn - - catalogID, name, err := readAwsGlueCatalogID(d.Id()) - if err != nil { - return err - } - - input := &glue.GetDatabaseInput{ - CatalogId: aws.String(catalogID), - Name: aws.String(name), - } - - out, err := glueconn.GetDatabase(input) - if err != nil { - - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - log.Printf("[WARN] Glue Catalog Database (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("Error reading Glue Catalog Database: %s", err.Error()) - } - - d.Set("name", out.Database.Name) - d.Set("catalog_id", catalogID) - d.Set("description", out.Database.Description) - d.Set("location_uri", out.Database.LocationUri) - - dParams := make(map[string]string) - if len(out.Database.Parameters) > 0 { - for key, value := range out.Database.Parameters { - dParams[key] = *value - } - } - d.Set("parameters", dParams) - - return nil -} - -func resourceAwsGlueCatalogDatabaseDelete(d *schema.ResourceData, meta interface{}) error { - glueconn := meta.(*AWSClient).glueconn - catalogID, name, err := readAwsGlueCatalogID(d.Id()) - if err != nil { - return err - } - - log.Printf("[DEBUG] Glue Catalog Database: %s:%s", catalogID, name) - _, err = glueconn.DeleteDatabase(&glue.DeleteDatabaseInput{ - Name: aws.String(name), - }) - if err != nil { - return fmt.Errorf("Error deleting Glue Catalog Database: %s", err.Error()) - } - return nil -} - -func resourceAwsGlueCatalogDatabaseExists(d *schema.ResourceData, meta interface{}) (bool, error) { - glueconn := meta.(*AWSClient).glueconn - catalogID, name, err := readAwsGlueCatalogID(d.Id()) - if err != nil { - return false, err - } - - input := &glue.GetDatabaseInput{ - CatalogId: aws.String(catalogID), - Name: aws.String(name), - } - - _, err = glueconn.GetDatabase(input) - if err != nil { - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - return false, nil - } - return false, err - } - return true, nil -} - -func readAwsGlueCatalogID(id string) (catalogID string, name string, err error) { - idParts := strings.Split(id, ":") - if len(idParts) != 2 { - return "", "", fmt.Errorf("Unexpected format of ID (%q), expected CATALOG-ID:DATABASE-NAME", id) - } - return idParts[0], idParts[1], nil -} - -func createAwsGlueCatalogID(d *schema.ResourceData, accountid string) (catalogID string) { - if rawCatalogID, ok := d.GetOkExists("catalog_id"); ok { - catalogID = rawCatalogID.(string) - } else { - catalogID = accountid - } - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_table.go deleted file mode 100644 index 3f9c19b13..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_table.go +++ /dev/null @@ -1,667 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/glue" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsGlueCatalogTable() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGlueCatalogTableCreate, - Read: resourceAwsGlueCatalogTableRead, - Update: resourceAwsGlueCatalogTableUpdate, - Delete: resourceAwsGlueCatalogTableDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "catalog_id": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - Computed: true, - }, - "database_name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "owner": { - Type: schema.TypeString, - Optional: true, - }, - "parameters": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "partition_keys": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "comment": { - Type: schema.TypeString, - Optional: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "retention": { - Type: schema.TypeInt, - Optional: true, - }, - "storage_descriptor": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket_columns": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "columns": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "comment": { - Type: schema.TypeString, - Optional: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "compressed": { - Type: schema.TypeBool, - Optional: true, - }, - "input_format": { - Type: schema.TypeString, - Optional: true, - }, - "location": { - Type: schema.TypeString, - Optional: true, - }, - "number_of_buckets": { - Type: schema.TypeInt, - Optional: true, - }, - "output_format": { - Type: schema.TypeString, - Optional: true, - }, - "parameters": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "ser_de_info": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - }, - "parameters": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "serialization_library": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "skewed_info": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "skewed_column_names": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "skewed_column_values": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "skewed_column_value_location_maps": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "sort_columns": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "column": { - Type: schema.TypeString, - Required: true, - }, - "sort_order": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - }, - "stored_as_sub_directories": { - Type: schema.TypeBool, - Optional: true, - }, - }, - }, - }, - "table_type": { - Type: schema.TypeString, - Optional: true, - }, - "view_original_text": { - Type: schema.TypeString, - Optional: true, - }, - "view_expanded_text": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func readAwsGlueTableID(id string) (catalogID string, dbName string, name string, error error) { - idParts := strings.Split(id, ":") - if len(idParts) != 3 { - return "", "", "", fmt.Errorf("expected ID in format catalog-id:database-name:table-name, received: %s", id) - } - return idParts[0], idParts[1], idParts[2], nil -} - -func resourceAwsGlueCatalogTableCreate(d *schema.ResourceData, meta interface{}) error { - glueconn := meta.(*AWSClient).glueconn - catalogID := createAwsGlueCatalogID(d, meta.(*AWSClient).accountid) - dbName := d.Get("database_name").(string) - name := d.Get("name").(string) - - input := &glue.CreateTableInput{ - CatalogId: aws.String(catalogID), - DatabaseName: aws.String(dbName), - TableInput: expandGlueTableInput(d), - } - - _, err := glueconn.CreateTable(input) - if err != nil { - return fmt.Errorf("Error creating Catalog Table: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%s:%s", catalogID, dbName, name)) - - return resourceAwsGlueCatalogTableRead(d, meta) -} - -func resourceAwsGlueCatalogTableRead(d *schema.ResourceData, meta interface{}) error { - glueconn := meta.(*AWSClient).glueconn - - catalogID, dbName, name, err := readAwsGlueTableID(d.Id()) - if err != nil { - return err - } - - input := &glue.GetTableInput{ - CatalogId: aws.String(catalogID), - DatabaseName: aws.String(dbName), - Name: aws.String(name), - } - - out, err := glueconn.GetTable(input) - if err != nil { - - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - log.Printf("[WARN] Glue Catalog Table (%s) not found, removing from state", d.Id()) - d.SetId("") - } - - return fmt.Errorf("Error reading Glue Catalog Table: %s", err) - } - - d.Set("name", out.Table.Name) - d.Set("catalog_id", catalogID) - d.Set("database_name", dbName) - d.Set("description", out.Table.Description) - d.Set("owner", out.Table.Owner) - d.Set("retention", out.Table.Retention) - - if err := d.Set("storage_descriptor", flattenGlueStorageDescriptor(out.Table.StorageDescriptor)); err != nil { - return fmt.Errorf("error setting storage_descriptor: %s", err) - } - - if err := d.Set("partition_keys", flattenGlueColumns(out.Table.PartitionKeys)); err != nil { - return fmt.Errorf("error setting partition_keys: %s", err) - } - - d.Set("view_original_text", out.Table.ViewOriginalText) - d.Set("view_expanded_text", out.Table.ViewExpandedText) - d.Set("table_type", out.Table.TableType) - - if err := d.Set("parameters", aws.StringValueMap(out.Table.Parameters)); err != nil { - return fmt.Errorf("error setting parameters: %s", err) - } - - return nil -} - -func resourceAwsGlueCatalogTableUpdate(d *schema.ResourceData, meta interface{}) error { - glueconn := meta.(*AWSClient).glueconn - - catalogID, dbName, _, err := readAwsGlueTableID(d.Id()) - if err != nil { - return err - } - - updateTableInput := &glue.UpdateTableInput{ - CatalogId: aws.String(catalogID), - DatabaseName: aws.String(dbName), - TableInput: expandGlueTableInput(d), - } - - if _, err := glueconn.UpdateTable(updateTableInput); err != nil { - return fmt.Errorf("Error updating Glue Catalog Table: %s", err) - } - - return resourceAwsGlueCatalogTableRead(d, meta) -} - -func resourceAwsGlueCatalogTableDelete(d *schema.ResourceData, meta interface{}) error { - glueconn := meta.(*AWSClient).glueconn - - catalogID, dbName, name, tableIdErr := readAwsGlueTableID(d.Id()) - if tableIdErr != nil { - return tableIdErr - } - - log.Printf("[DEBUG] Glue Catalog Table: %s:%s:%s", catalogID, dbName, name) - _, err := glueconn.DeleteTable(&glue.DeleteTableInput{ - CatalogId: aws.String(catalogID), - Name: aws.String(name), - DatabaseName: aws.String(dbName), - }) - if err != nil { - return fmt.Errorf("Error deleting Glue Catalog Table: %s", err.Error()) - } - return nil -} - -func expandGlueTableInput(d *schema.ResourceData) *glue.TableInput { - tableInput := &glue.TableInput{ - Name: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("description"); ok { - tableInput.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("owner"); ok { - tableInput.Owner = aws.String(v.(string)) - } - - if v, ok := d.GetOk("retention"); ok { - tableInput.Retention = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("storage_descriptor"); ok { - tableInput.StorageDescriptor = expandGlueStorageDescriptor(v.([]interface{})) - } - - if v, ok := d.GetOk("partition_keys"); ok { - columns := expandGlueColumns(v.([]interface{})) - tableInput.PartitionKeys = columns - } - - if v, ok := d.GetOk("view_original_text"); ok { - tableInput.ViewOriginalText = aws.String(v.(string)) - } - - if v, ok := d.GetOk("view_expanded_text"); ok { - tableInput.ViewExpandedText = aws.String(v.(string)) - } - - if v, ok := d.GetOk("table_type"); ok { - tableInput.TableType = aws.String(v.(string)) - } - - if v, ok := d.GetOk("parameters"); ok { - paramsMap := map[string]string{} - for key, value := range v.(map[string]interface{}) { - paramsMap[key] = value.(string) - } - tableInput.Parameters = aws.StringMap(paramsMap) - } - - return tableInput -} - -func expandGlueStorageDescriptor(l []interface{}) *glue.StorageDescriptor { - if len(l) == 0 { - return nil - } - - s := l[0].(map[string]interface{}) - storageDescriptor := &glue.StorageDescriptor{} - - if v, ok := s["columns"]; ok { - columns := expandGlueColumns(v.([]interface{})) - storageDescriptor.Columns = columns - } - - if v, ok := s["location"]; ok { - storageDescriptor.Location = aws.String(v.(string)) - } - - if v, ok := s["input_format"]; ok { - storageDescriptor.InputFormat = aws.String(v.(string)) - } - - if v, ok := s["output_format"]; ok { - storageDescriptor.OutputFormat = aws.String(v.(string)) - } - - if v, ok := s["compressed"]; ok { - storageDescriptor.Compressed = aws.Bool(v.(bool)) - } - - if v, ok := s["number_of_buckets"]; ok { - storageDescriptor.NumberOfBuckets = aws.Int64(int64(v.(int))) - } - - if v, ok := s["ser_de_info"]; ok { - storageDescriptor.SerdeInfo = expandGlueSerDeInfo(v.([]interface{})) - } - - if v, ok := s["bucket_columns"]; ok { - bucketColumns := make([]string, len(v.([]interface{}))) - for i, item := range v.([]interface{}) { - bucketColumns[i] = fmt.Sprint(item) - } - storageDescriptor.BucketColumns = aws.StringSlice(bucketColumns) - } - - if v, ok := s["sort_columns"]; ok { - storageDescriptor.SortColumns = expandGlueSortColumns(v.([]interface{})) - } - - if v, ok := s["skewed_info"]; ok { - storageDescriptor.SkewedInfo = expandGlueSkewedInfo(v.([]interface{})) - } - - if v, ok := s["parameters"]; ok { - paramsMap := map[string]string{} - for key, value := range v.(map[string]interface{}) { - paramsMap[key] = value.(string) - } - storageDescriptor.Parameters = aws.StringMap(paramsMap) - } - - if v, ok := s["stored_as_sub_directories"]; ok { - storageDescriptor.StoredAsSubDirectories = aws.Bool(v.(bool)) - } - - return storageDescriptor -} - -func expandGlueColumns(columns []interface{}) []*glue.Column { - columnSlice := []*glue.Column{} - for _, element := range columns { - elementMap := element.(map[string]interface{}) - - column := &glue.Column{ - Name: aws.String(elementMap["name"].(string)), - } - - if v, ok := elementMap["comment"]; ok { - column.Comment = aws.String(v.(string)) - } - - if v, ok := elementMap["type"]; ok { - column.Type = aws.String(v.(string)) - } - - columnSlice = append(columnSlice, column) - } - - return columnSlice -} - -func expandGlueSerDeInfo(l []interface{}) *glue.SerDeInfo { - if len(l) == 0 { - return nil - } - - s := l[0].(map[string]interface{}) - serDeInfo := &glue.SerDeInfo{} - - if v, ok := s["name"]; ok { - serDeInfo.Name = aws.String(v.(string)) - } - - if v, ok := s["parameters"]; ok { - paramsMap := map[string]string{} - for key, value := range v.(map[string]interface{}) { - paramsMap[key] = value.(string) - } - serDeInfo.Parameters = aws.StringMap(paramsMap) - } - - if v, ok := s["serialization_library"]; ok { - serDeInfo.SerializationLibrary = aws.String(v.(string)) - } - - return serDeInfo -} - -func expandGlueSortColumns(columns []interface{}) []*glue.Order { - orderSlice := make([]*glue.Order, len(columns)) - - for i, element := range columns { - elementMap := element.(map[string]interface{}) - - order := &glue.Order{ - Column: aws.String(elementMap["column"].(string)), - } - - if v, ok := elementMap["sort_order"]; ok { - order.SortOrder = aws.Int64(int64(v.(int))) - } - - orderSlice[i] = order - } - - return orderSlice -} - -func expandGlueSkewedInfo(l []interface{}) *glue.SkewedInfo { - if len(l) == 0 { - return nil - } - - s := l[0].(map[string]interface{}) - skewedInfo := &glue.SkewedInfo{} - - if v, ok := s["skewed_column_names"]; ok { - columnsSlice := make([]string, len(v.([]interface{}))) - for i, item := range v.([]interface{}) { - columnsSlice[i] = fmt.Sprint(item) - } - skewedInfo.SkewedColumnNames = aws.StringSlice(columnsSlice) - } - - if v, ok := s["skewed_column_value_location_maps"]; ok { - typeMap := map[string]string{} - for key, value := range v.(map[string]interface{}) { - typeMap[key] = value.(string) - } - skewedInfo.SkewedColumnValueLocationMaps = aws.StringMap(typeMap) - } - - if v, ok := s["skewed_column_values"]; ok { - columnsSlice := make([]string, len(v.([]interface{}))) - for i, item := range v.([]interface{}) { - columnsSlice[i] = fmt.Sprint(item) - } - skewedInfo.SkewedColumnValues = aws.StringSlice(columnsSlice) - } - - return skewedInfo -} - -func flattenGlueStorageDescriptor(s *glue.StorageDescriptor) []map[string]interface{} { - if s == nil { - storageDescriptors := make([]map[string]interface{}, 0) - return storageDescriptors - } - - storageDescriptors := make([]map[string]interface{}, 1) - - storageDescriptor := make(map[string]interface{}) - - storageDescriptor["columns"] = flattenGlueColumns(s.Columns) - storageDescriptor["location"] = aws.StringValue(s.Location) - storageDescriptor["input_format"] = aws.StringValue(s.InputFormat) - storageDescriptor["output_format"] = aws.StringValue(s.OutputFormat) - storageDescriptor["compressed"] = aws.BoolValue(s.Compressed) - storageDescriptor["number_of_buckets"] = aws.Int64Value(s.NumberOfBuckets) - storageDescriptor["ser_de_info"] = flattenGlueSerDeInfo(s.SerdeInfo) - storageDescriptor["bucket_columns"] = flattenStringList(s.BucketColumns) - storageDescriptor["sort_columns"] = flattenGlueOrders(s.SortColumns) - storageDescriptor["parameters"] = aws.StringValueMap(s.Parameters) - storageDescriptor["skewed_info"] = flattenGlueSkewedInfo(s.SkewedInfo) - storageDescriptor["stored_as_sub_directories"] = aws.BoolValue(s.StoredAsSubDirectories) - - storageDescriptors[0] = storageDescriptor - - return storageDescriptors -} - -func flattenGlueColumns(cs []*glue.Column) []map[string]string { - columnsSlice := make([]map[string]string, len(cs)) - if len(cs) > 0 { - for i, v := range cs { - columnsSlice[i] = flattenGlueColumn(v) - } - } - - return columnsSlice -} - -func flattenGlueColumn(c *glue.Column) map[string]string { - column := make(map[string]string) - - if c == nil { - return column - } - - if v := aws.StringValue(c.Name); v != "" { - column["name"] = v - } - - if v := aws.StringValue(c.Type); v != "" { - column["type"] = v - } - - if v := aws.StringValue(c.Comment); v != "" { - column["comment"] = v - } - - return column -} - -func flattenGlueSerDeInfo(s *glue.SerDeInfo) []map[string]interface{} { - if s == nil { - serDeInfos := make([]map[string]interface{}, 0) - return serDeInfos - } - - serDeInfos := make([]map[string]interface{}, 1) - serDeInfo := make(map[string]interface{}) - - serDeInfo["name"] = aws.StringValue(s.Name) - serDeInfo["parameters"] = aws.StringValueMap(s.Parameters) - serDeInfo["serialization_library"] = aws.StringValue(s.SerializationLibrary) - - serDeInfos[0] = serDeInfo - return serDeInfos -} - -func flattenGlueOrders(os []*glue.Order) []map[string]interface{} { - orders := make([]map[string]interface{}, len(os)) - for i, v := range os { - order := make(map[string]interface{}) - order["column"] = aws.StringValue(v.Column) - order["sort_order"] = int(aws.Int64Value(v.SortOrder)) - orders[i] = order - } - - return orders -} - -func flattenGlueSkewedInfo(s *glue.SkewedInfo) []map[string]interface{} { - if s == nil { - skewedInfoSlice := make([]map[string]interface{}, 0) - return skewedInfoSlice - } - - skewedInfoSlice := make([]map[string]interface{}, 1) - - skewedInfo := make(map[string]interface{}) - skewedInfo["skewed_column_names"] = flattenStringList(s.SkewedColumnNames) - skewedInfo["skewed_column_value_location_maps"] = aws.StringValueMap(s.SkewedColumnValueLocationMaps) - skewedInfo["skewed_column_values"] = flattenStringList(s.SkewedColumnValues) - skewedInfoSlice[0] = skewedInfo - - return skewedInfoSlice -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_classifier.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_classifier.go deleted file mode 100644 index 9505201cc..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_classifier.go +++ /dev/null @@ -1,348 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/glue" - "github.com/hashicorp/terraform/helper/customdiff" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsGlueClassifier() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGlueClassifierCreate, - Read: resourceAwsGlueClassifierRead, - Update: resourceAwsGlueClassifierUpdate, - Delete: resourceAwsGlueClassifierDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - CustomizeDiff: customdiff.Sequence( - func(diff *schema.ResourceDiff, v interface{}) error { - // ForceNew when changing classifier type - // InvalidInputException: UpdateClassifierRequest can't change the type of the classifier - if diff.HasChange("grok_classifier") && diff.HasChange("json_classifier") { - diff.ForceNew("grok_classifier") - diff.ForceNew("json_classifier") - } - if diff.HasChange("grok_classifier") && diff.HasChange("xml_classifier") { - diff.ForceNew("grok_classifier") - diff.ForceNew("xml_classifier") - } - if diff.HasChange("json_classifier") && diff.HasChange("xml_classifier") { - diff.ForceNew("json_classifier") - diff.ForceNew("xml_classifier") - } - return nil - }, - ), - - Schema: map[string]*schema.Schema{ - "grok_classifier": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{"json_classifier", "xml_classifier"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "classification": { - Type: schema.TypeString, - Required: true, - }, - "custom_patterns": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 16000), - }, - "grok_pattern": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 2048), - }, - }, - }, - }, - "json_classifier": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{"grok_classifier", "xml_classifier"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "json_path": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 255), - }, - "xml_classifier": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{"grok_classifier", "json_classifier"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "classification": { - Type: schema.TypeString, - Required: true, - }, - "row_tag": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsGlueClassifierCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - name := d.Get("name").(string) - - input := &glue.CreateClassifierInput{} - - if v, ok := d.GetOk("grok_classifier"); ok { - m := v.([]interface{})[0].(map[string]interface{}) - input.GrokClassifier = expandGlueGrokClassifierCreate(name, m) - } - - if v, ok := d.GetOk("json_classifier"); ok { - m := v.([]interface{})[0].(map[string]interface{}) - input.JsonClassifier = expandGlueJsonClassifierCreate(name, m) - } - - if v, ok := d.GetOk("xml_classifier"); ok { - m := v.([]interface{})[0].(map[string]interface{}) - input.XMLClassifier = expandGlueXmlClassifierCreate(name, m) - } - - log.Printf("[DEBUG] Creating Glue Classifier: %s", input) - _, err := conn.CreateClassifier(input) - if err != nil { - return fmt.Errorf("error creating Glue Classifier (%s): %s", name, err) - } - - d.SetId(name) - - return resourceAwsGlueClassifierRead(d, meta) -} - -func resourceAwsGlueClassifierRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - input := &glue.GetClassifierInput{ - Name: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading Glue Classifier: %s", input) - output, err := conn.GetClassifier(input) - if err != nil { - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - log.Printf("[WARN] Glue Classifier (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Glue Classifier (%s): %s", d.Id(), err) - } - - classifier := output.Classifier - if classifier == nil { - log.Printf("[WARN] Glue Classifier (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err := d.Set("grok_classifier", flattenGlueGrokClassifier(classifier.GrokClassifier)); err != nil { - return fmt.Errorf("error setting match_criteria: %s", err) - } - - if err := d.Set("json_classifier", flattenGlueJsonClassifier(classifier.JsonClassifier)); err != nil { - return fmt.Errorf("error setting json_classifier: %s", err) - } - - d.Set("name", d.Id()) - - if err := d.Set("xml_classifier", flattenGlueXmlClassifier(classifier.XMLClassifier)); err != nil { - return fmt.Errorf("error setting xml_classifier: %s", err) - } - - return nil -} - -func resourceAwsGlueClassifierUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - input := &glue.UpdateClassifierInput{} - - if v, ok := d.GetOk("grok_classifier"); ok { - m := v.([]interface{})[0].(map[string]interface{}) - input.GrokClassifier = expandGlueGrokClassifierUpdate(d.Id(), m) - } - - if v, ok := d.GetOk("json_classifier"); ok { - m := v.([]interface{})[0].(map[string]interface{}) - input.JsonClassifier = expandGlueJsonClassifierUpdate(d.Id(), m) - } - - if v, ok := d.GetOk("xml_classifier"); ok { - m := v.([]interface{})[0].(map[string]interface{}) - input.XMLClassifier = expandGlueXmlClassifierUpdate(d.Id(), m) - } - - log.Printf("[DEBUG] Updating Glue Classifier: %s", input) - _, err := conn.UpdateClassifier(input) - if err != nil { - return fmt.Errorf("error updating Glue Classifier (%s): %s", d.Id(), err) - } - - return nil -} - -func resourceAwsGlueClassifierDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - log.Printf("[DEBUG] Deleting Glue Classifier: %s", d.Id()) - err := deleteGlueClassifier(conn, d.Id()) - if err != nil { - return fmt.Errorf("error deleting Glue Classifier (%s): %s", d.Id(), err) - } - - return nil -} - -func deleteGlueClassifier(conn *glue.Glue, name string) error { - input := &glue.DeleteClassifierInput{ - Name: aws.String(name), - } - - _, err := conn.DeleteClassifier(input) - if err != nil { - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - return nil - } - return err - } - - return nil -} - -func expandGlueGrokClassifierCreate(name string, m map[string]interface{}) *glue.CreateGrokClassifierRequest { - grokClassifier := &glue.CreateGrokClassifierRequest{ - Classification: aws.String(m["classification"].(string)), - GrokPattern: aws.String(m["grok_pattern"].(string)), - Name: aws.String(name), - } - - if v, ok := m["custom_patterns"]; ok && v.(string) != "" { - grokClassifier.CustomPatterns = aws.String(v.(string)) - } - - return grokClassifier -} - -func expandGlueGrokClassifierUpdate(name string, m map[string]interface{}) *glue.UpdateGrokClassifierRequest { - grokClassifier := &glue.UpdateGrokClassifierRequest{ - Classification: aws.String(m["classification"].(string)), - GrokPattern: aws.String(m["grok_pattern"].(string)), - Name: aws.String(name), - } - - if v, ok := m["custom_patterns"]; ok && v.(string) != "" { - grokClassifier.CustomPatterns = aws.String(v.(string)) - } - - return grokClassifier -} - -func expandGlueJsonClassifierCreate(name string, m map[string]interface{}) *glue.CreateJsonClassifierRequest { - jsonClassifier := &glue.CreateJsonClassifierRequest{ - JsonPath: aws.String(m["json_path"].(string)), - Name: aws.String(name), - } - - return jsonClassifier -} - -func expandGlueJsonClassifierUpdate(name string, m map[string]interface{}) *glue.UpdateJsonClassifierRequest { - jsonClassifier := &glue.UpdateJsonClassifierRequest{ - JsonPath: aws.String(m["json_path"].(string)), - Name: aws.String(name), - } - - return jsonClassifier -} - -func expandGlueXmlClassifierCreate(name string, m map[string]interface{}) *glue.CreateXMLClassifierRequest { - xmlClassifier := &glue.CreateXMLClassifierRequest{ - Classification: aws.String(m["classification"].(string)), - Name: aws.String(name), - RowTag: aws.String(m["row_tag"].(string)), - } - - return xmlClassifier -} - -func expandGlueXmlClassifierUpdate(name string, m map[string]interface{}) *glue.UpdateXMLClassifierRequest { - xmlClassifier := &glue.UpdateXMLClassifierRequest{ - Classification: aws.String(m["classification"].(string)), - Name: aws.String(name), - RowTag: aws.String(m["row_tag"].(string)), - } - - if v, ok := m["row_tag"]; ok && v.(string) != "" { - xmlClassifier.RowTag = aws.String(v.(string)) - } - - return xmlClassifier -} - -func flattenGlueGrokClassifier(grokClassifier *glue.GrokClassifier) []map[string]interface{} { - if grokClassifier == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "classification": aws.StringValue(grokClassifier.Classification), - "custom_patterns": aws.StringValue(grokClassifier.CustomPatterns), - "grok_pattern": aws.StringValue(grokClassifier.GrokPattern), - } - - return []map[string]interface{}{m} -} - -func flattenGlueJsonClassifier(jsonClassifier *glue.JsonClassifier) []map[string]interface{} { - if jsonClassifier == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "json_path": aws.StringValue(jsonClassifier.JsonPath), - } - - return []map[string]interface{}{m} -} - -func flattenGlueXmlClassifier(xmlClassifier *glue.XMLClassifier) []map[string]interface{} { - if xmlClassifier == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "classification": aws.StringValue(xmlClassifier.Classification), - "row_tag": aws.StringValue(xmlClassifier.RowTag), - } - - return []map[string]interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_connection.go deleted file mode 100644 index 546f3e9f4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_connection.go +++ /dev/null @@ -1,283 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/glue" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsGlueConnection() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGlueConnectionCreate, - Read: resourceAwsGlueConnectionRead, - Update: resourceAwsGlueConnectionUpdate, - Delete: resourceAwsGlueConnectionDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "catalog_id": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - Computed: true, - }, - "connection_properties": { - Type: schema.TypeMap, - Required: true, - }, - "connection_type": { - Type: schema.TypeString, - Optional: true, - Default: glue.ConnectionTypeJdbc, - ValidateFunc: validation.StringInSlice([]string{ - glue.ConnectionTypeJdbc, - glue.ConnectionTypeSftp, - }, false), - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "match_criteria": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "physical_connection_requirements": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "availability_zone": { - Type: schema.TypeString, - Optional: true, - }, - "security_group_id_list": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "subnet_id": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsGlueConnectionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - var catalogID string - if v, ok := d.GetOkExists("catalog_id"); ok { - catalogID = v.(string) - } else { - catalogID = meta.(*AWSClient).accountid - } - name := d.Get("name").(string) - - input := &glue.CreateConnectionInput{ - CatalogId: aws.String(catalogID), - ConnectionInput: expandGlueConnectionInput(d), - } - - log.Printf("[DEBUG] Creating Glue Connection: %s", input) - _, err := conn.CreateConnection(input) - if err != nil { - return fmt.Errorf("error creating Glue Connection (%s): %s", name, err) - } - - d.SetId(fmt.Sprintf("%s:%s", catalogID, name)) - - return resourceAwsGlueConnectionRead(d, meta) -} - -func resourceAwsGlueConnectionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - catalogID, connectionName, err := decodeGlueConnectionID(d.Id()) - if err != nil { - return err - } - - input := &glue.GetConnectionInput{ - CatalogId: aws.String(catalogID), - Name: aws.String(connectionName), - } - - log.Printf("[DEBUG] Reading Glue Connection: %s", input) - output, err := conn.GetConnection(input) - if err != nil { - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - log.Printf("[WARN] Glue Connection (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Glue Connection (%s): %s", d.Id(), err) - } - - connection := output.Connection - if connection == nil { - log.Printf("[WARN] Glue Connection (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("catalog_id", catalogID) - if err := d.Set("connection_properties", aws.StringValueMap(connection.ConnectionProperties)); err != nil { - return fmt.Errorf("error setting connection_properties: %s", err) - } - d.Set("connection_type", connection.ConnectionType) - d.Set("description", connection.Description) - if err := d.Set("match_criteria", flattenStringList(connection.MatchCriteria)); err != nil { - return fmt.Errorf("error setting match_criteria: %s", err) - } - d.Set("name", connection.Name) - if err := d.Set("physical_connection_requirements", flattenGluePhysicalConnectionRequirements(connection.PhysicalConnectionRequirements)); err != nil { - return fmt.Errorf("error setting physical_connection_requirements: %s", err) - } - - return nil -} - -func resourceAwsGlueConnectionUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - catalogID, connectionName, err := decodeGlueConnectionID(d.Id()) - if err != nil { - return err - } - - input := &glue.UpdateConnectionInput{ - CatalogId: aws.String(catalogID), - ConnectionInput: expandGlueConnectionInput(d), - Name: aws.String(connectionName), - } - - log.Printf("[DEBUG] Updating Glue Connection: %s", input) - _, err = conn.UpdateConnection(input) - if err != nil { - return fmt.Errorf("error updating Glue Connection (%s): %s", d.Id(), err) - } - - return nil -} - -func resourceAwsGlueConnectionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - catalogID, connectionName, err := decodeGlueConnectionID(d.Id()) - if err != nil { - return err - } - - log.Printf("[DEBUG] Deleting Glue Connection: %s", d.Id()) - err = deleteGlueConnection(conn, catalogID, connectionName) - if err != nil { - return fmt.Errorf("error deleting Glue Connection (%s): %s", d.Id(), err) - } - - return nil -} - -func decodeGlueConnectionID(id string) (string, string, error) { - idParts := strings.Split(id, ":") - if len(idParts) != 2 { - return "", "", fmt.Errorf("expected ID in format CATALOG-ID:NAME, provided: %s", id) - } - return idParts[0], idParts[1], nil -} - -func deleteGlueConnection(conn *glue.Glue, catalogID, connectionName string) error { - input := &glue.DeleteConnectionInput{ - CatalogId: aws.String(catalogID), - ConnectionName: aws.String(connectionName), - } - - _, err := conn.DeleteConnection(input) - if err != nil { - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - return nil - } - return err - } - - return nil -} - -func expandGlueConnectionInput(d *schema.ResourceData) *glue.ConnectionInput { - connectionProperties := make(map[string]string) - for k, v := range d.Get("connection_properties").(map[string]interface{}) { - connectionProperties[k] = v.(string) - } - - connectionInput := &glue.ConnectionInput{ - ConnectionProperties: aws.StringMap(connectionProperties), - ConnectionType: aws.String(d.Get("connection_type").(string)), - Name: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("description"); ok { - connectionInput.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("match_criteria"); ok { - connectionInput.MatchCriteria = expandStringList(v.([]interface{})) - } - - if v, ok := d.GetOk("physical_connection_requirements"); ok { - physicalConnectionRequirementsList := v.([]interface{}) - physicalConnectionRequirementsMap := physicalConnectionRequirementsList[0].(map[string]interface{}) - connectionInput.PhysicalConnectionRequirements = expandGluePhysicalConnectionRequirements(physicalConnectionRequirementsMap) - } - - return connectionInput -} - -func expandGluePhysicalConnectionRequirements(m map[string]interface{}) *glue.PhysicalConnectionRequirements { - physicalConnectionRequirements := &glue.PhysicalConnectionRequirements{} - - if v, ok := m["availability_zone"]; ok { - physicalConnectionRequirements.AvailabilityZone = aws.String(v.(string)) - } - - if v, ok := m["security_group_id_list"]; ok { - physicalConnectionRequirements.SecurityGroupIdList = expandStringList(v.([]interface{})) - } - - if v, ok := m["subnet_id"]; ok { - physicalConnectionRequirements.SubnetId = aws.String(v.(string)) - } - - return physicalConnectionRequirements -} - -func flattenGluePhysicalConnectionRequirements(physicalConnectionRequirements *glue.PhysicalConnectionRequirements) []map[string]interface{} { - if physicalConnectionRequirements == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "availability_zone": aws.StringValue(physicalConnectionRequirements.AvailabilityZone), - "security_group_id_list": flattenStringList(physicalConnectionRequirements.SecurityGroupIdList), - "subnet_id": aws.StringValue(physicalConnectionRequirements.SubnetId), - } - - return []map[string]interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go deleted file mode 100644 index 63699ce4b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go +++ /dev/null @@ -1,531 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/glue" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsGlueCrawler() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGlueCrawlerCreate, - Read: resourceAwsGlueCrawlerRead, - Update: resourceAwsGlueCrawlerUpdate, - Delete: resourceAwsGlueCrawlerDelete, - Exists: resourceAwsGlueCrawlerExists, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "database_name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "role": { - Type: schema.TypeString, - Required: true, - // Glue API always returns name - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - newARN, err := arn.Parse(new) - - if err != nil { - return false - } - - return old == strings.TrimPrefix(newARN.Resource, "role/") - }, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "schedule": { - Type: schema.TypeString, - Optional: true, - }, - "classifiers": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "schema_change_policy": { - Type: schema.TypeList, - Optional: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_behavior": { - Type: schema.TypeString, - Optional: true, - Default: glue.DeleteBehaviorDeprecateInDatabase, - ValidateFunc: validation.StringInSlice([]string{ - glue.DeleteBehaviorDeleteFromDatabase, - glue.DeleteBehaviorDeprecateInDatabase, - glue.DeleteBehaviorLog, - }, false), - }, - "update_behavior": { - Type: schema.TypeString, - Optional: true, - Default: glue.UpdateBehaviorUpdateInDatabase, - ValidateFunc: validation.StringInSlice([]string{ - glue.UpdateBehaviorLog, - glue.UpdateBehaviorUpdateInDatabase, - }, false), - }, - }, - }, - }, - "table_prefix": { - Type: schema.TypeString, - Optional: true, - }, - "s3_target": { - Type: schema.TypeList, - Optional: true, - MinItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "path": { - Type: schema.TypeString, - Required: true, - }, - "exclusions": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "dynamodb_target": { - Type: schema.TypeList, - Optional: true, - MinItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "path": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "jdbc_target": { - Type: schema.TypeList, - Optional: true, - MinItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "connection_name": { - Type: schema.TypeString, - Required: true, - }, - "path": { - Type: schema.TypeString, - Required: true, - }, - "exclusions": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "configuration": { - Type: schema.TypeString, - Optional: true, - DiffSuppressFunc: suppressEquivalentJsonDiffs, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - ValidateFunc: validation.ValidateJsonString, - }, - "security_configuration": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsGlueCrawlerCreate(d *schema.ResourceData, meta interface{}) error { - glueConn := meta.(*AWSClient).glueconn - name := d.Get("name").(string) - - crawlerInput, err := createCrawlerInput(name, d) - if err != nil { - return err - } - - // Retry for IAM eventual consistency - err = resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err = glueConn.CreateCrawler(crawlerInput) - 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 nil - }) - - if err != nil { - return fmt.Errorf("error creating Glue crawler: %s", err) - } - d.SetId(name) - - return resourceAwsGlueCrawlerRead(d, meta) -} - -func createCrawlerInput(crawlerName string, d *schema.ResourceData) (*glue.CreateCrawlerInput, error) { - crawlerTargets, err := expandGlueCrawlerTargets(d) - if err != nil { - return nil, err - } - crawlerInput := &glue.CreateCrawlerInput{ - Name: aws.String(crawlerName), - DatabaseName: aws.String(d.Get("database_name").(string)), - Role: aws.String(d.Get("role").(string)), - Targets: crawlerTargets, - } - if description, ok := d.GetOk("description"); ok { - crawlerInput.Description = aws.String(description.(string)) - } - if schedule, ok := d.GetOk("schedule"); ok { - crawlerInput.Schedule = aws.String(schedule.(string)) - } - if classifiers, ok := d.GetOk("classifiers"); ok { - crawlerInput.Classifiers = expandStringList(classifiers.([]interface{})) - } - - crawlerInput.SchemaChangePolicy = expandGlueSchemaChangePolicy(d.Get("schema_change_policy").([]interface{})) - - if tablePrefix, ok := d.GetOk("table_prefix"); ok { - crawlerInput.TablePrefix = aws.String(tablePrefix.(string)) - } - if configuration, ok := d.GetOk("configuration"); ok { - crawlerInput.Configuration = aws.String(configuration.(string)) - } - - if v, ok := d.GetOk("configuration"); ok { - configuration, err := structure.NormalizeJsonString(v) - if err != nil { - return nil, fmt.Errorf("Configuration contains an invalid JSON: %v", err) - } - crawlerInput.Configuration = aws.String(configuration) - } - - if securityConfiguration, ok := d.GetOk("security_configuration"); ok { - crawlerInput.CrawlerSecurityConfiguration = aws.String(securityConfiguration.(string)) - } - - return crawlerInput, nil -} - -func expandGlueSchemaChangePolicy(v []interface{}) *glue.SchemaChangePolicy { - if len(v) == 0 { - return nil - } - - schemaPolicy := &glue.SchemaChangePolicy{} - - member := v[0].(map[string]interface{}) - - if updateBehavior, ok := member["update_behavior"]; ok && updateBehavior.(string) != "" { - schemaPolicy.UpdateBehavior = aws.String(updateBehavior.(string)) - } - - if deleteBehavior, ok := member["delete_behavior"]; ok && deleteBehavior.(string) != "" { - schemaPolicy.DeleteBehavior = aws.String(deleteBehavior.(string)) - } - return schemaPolicy -} - -func expandGlueCrawlerTargets(d *schema.ResourceData) (*glue.CrawlerTargets, error) { - crawlerTargets := &glue.CrawlerTargets{} - - dynamodbTargets, dynamodbTargetsOk := d.GetOk("dynamodb_target") - jdbcTargets, jdbcTargetsOk := d.GetOk("jdbc_target") - s3Targets, s3TargetsOk := d.GetOk("s3_target") - if !dynamodbTargetsOk && !jdbcTargetsOk && !s3TargetsOk { - return nil, fmt.Errorf("One of the following configurations is required: dynamodb_target, jdbc_target, s3_target") - } - - log.Print("[DEBUG] Creating crawler target") - crawlerTargets.DynamoDBTargets = expandGlueDynamoDBTargets(dynamodbTargets.([]interface{})) - crawlerTargets.JdbcTargets = expandGlueJdbcTargets(jdbcTargets.([]interface{})) - crawlerTargets.S3Targets = expandGlueS3Targets(s3Targets.([]interface{})) - - return crawlerTargets, nil -} - -func expandGlueDynamoDBTargets(targets []interface{}) []*glue.DynamoDBTarget { - if len(targets) < 1 { - return []*glue.DynamoDBTarget{} - } - - perms := make([]*glue.DynamoDBTarget, len(targets)) - for i, rawCfg := range targets { - cfg := rawCfg.(map[string]interface{}) - perms[i] = expandGlueDynamoDBTarget(cfg) - } - return perms -} - -func expandGlueDynamoDBTarget(cfg map[string]interface{}) *glue.DynamoDBTarget { - target := &glue.DynamoDBTarget{ - Path: aws.String(cfg["path"].(string)), - } - - return target -} - -func expandGlueS3Targets(targets []interface{}) []*glue.S3Target { - if len(targets) < 1 { - return []*glue.S3Target{} - } - - perms := make([]*glue.S3Target, len(targets)) - for i, rawCfg := range targets { - cfg := rawCfg.(map[string]interface{}) - perms[i] = expandGlueS3Target(cfg) - } - return perms -} - -func expandGlueS3Target(cfg map[string]interface{}) *glue.S3Target { - target := &glue.S3Target{ - Path: aws.String(cfg["path"].(string)), - } - - if exclusions, ok := cfg["exclusions"]; ok { - target.Exclusions = expandStringList(exclusions.([]interface{})) - } - return target -} - -func expandGlueJdbcTargets(targets []interface{}) []*glue.JdbcTarget { - if len(targets) < 1 { - return []*glue.JdbcTarget{} - } - - perms := make([]*glue.JdbcTarget, len(targets)) - for i, rawCfg := range targets { - cfg := rawCfg.(map[string]interface{}) - perms[i] = expandGlueJdbcTarget(cfg) - } - return perms -} - -func expandGlueJdbcTarget(cfg map[string]interface{}) *glue.JdbcTarget { - target := &glue.JdbcTarget{ - Path: aws.String(cfg["path"].(string)), - ConnectionName: aws.String(cfg["connection_name"].(string)), - } - - if exclusions, ok := cfg["exclusions"]; ok { - target.Exclusions = expandStringList(exclusions.([]interface{})) - } - return target -} - -func resourceAwsGlueCrawlerUpdate(d *schema.ResourceData, meta interface{}) error { - glueConn := meta.(*AWSClient).glueconn - name := d.Get("name").(string) - - crawlerInput, err := createCrawlerInput(name, d) - if err != nil { - return err - } - updateCrawlerInput := glue.UpdateCrawlerInput(*crawlerInput) - - // 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 nil - }) - - if err != nil { - return fmt.Errorf("error updating Glue crawler: %s", err) - } - - return resourceAwsGlueCrawlerRead(d, meta) -} - -func resourceAwsGlueCrawlerRead(d *schema.ResourceData, meta interface{}) error { - glueConn := meta.(*AWSClient).glueconn - - input := &glue.GetCrawlerInput{ - Name: aws.String(d.Id()), - } - - crawlerOutput, err := glueConn.GetCrawler(input) - if err != nil { - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - log.Printf("[WARN] Glue Crawler (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("error reading Glue crawler: %s", err.Error()) - } - - if crawlerOutput.Crawler == nil { - log.Printf("[WARN] Glue Crawler (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("name", crawlerOutput.Crawler.Name) - d.Set("database_name", crawlerOutput.Crawler.DatabaseName) - d.Set("role", crawlerOutput.Crawler.Role) - d.Set("configuration", crawlerOutput.Crawler.Configuration) - d.Set("description", crawlerOutput.Crawler.Description) - d.Set("security_configuration", crawlerOutput.Crawler.CrawlerSecurityConfiguration) - d.Set("schedule", "") - if crawlerOutput.Crawler.Schedule != nil { - d.Set("schedule", crawlerOutput.Crawler.Schedule.ScheduleExpression) - } - if err := d.Set("classifiers", flattenStringList(crawlerOutput.Crawler.Classifiers)); err != nil { - return fmt.Errorf("error setting classifiers: %s", err) - } - d.Set("table_prefix", crawlerOutput.Crawler.TablePrefix) - - if crawlerOutput.Crawler.SchemaChangePolicy != nil { - schemaPolicy := map[string]string{ - "delete_behavior": aws.StringValue(crawlerOutput.Crawler.SchemaChangePolicy.DeleteBehavior), - "update_behavior": aws.StringValue(crawlerOutput.Crawler.SchemaChangePolicy.UpdateBehavior), - } - - if err := d.Set("schema_change_policy", []map[string]string{schemaPolicy}); err != nil { - return fmt.Errorf("error setting schema_change_policy: %s", schemaPolicy) - } - } - - if crawlerOutput.Crawler.Targets != nil { - if err := d.Set("dynamodb_target", flattenGlueDynamoDBTargets(crawlerOutput.Crawler.Targets.DynamoDBTargets)); err != nil { - return fmt.Errorf("error setting dynamodb_target: %s", err) - } - - if err := d.Set("jdbc_target", flattenGlueJdbcTargets(crawlerOutput.Crawler.Targets.JdbcTargets)); err != nil { - return fmt.Errorf("error setting jdbc_target: %s", err) - } - - if err := d.Set("s3_target", flattenGlueS3Targets(crawlerOutput.Crawler.Targets.S3Targets)); err != nil { - return fmt.Errorf("error setting s3_target: %s", err) - } - } - - return nil -} - -func flattenGlueS3Targets(s3Targets []*glue.S3Target) []map[string]interface{} { - result := make([]map[string]interface{}, 0) - - for _, s3Target := range s3Targets { - attrs := make(map[string]interface{}) - attrs["exclusions"] = flattenStringList(s3Target.Exclusions) - attrs["path"] = aws.StringValue(s3Target.Path) - - result = append(result, attrs) - } - return result -} - -func flattenGlueDynamoDBTargets(dynamodbTargets []*glue.DynamoDBTarget) []map[string]interface{} { - result := make([]map[string]interface{}, 0) - - for _, dynamodbTarget := range dynamodbTargets { - attrs := make(map[string]interface{}) - attrs["path"] = aws.StringValue(dynamodbTarget.Path) - - result = append(result, attrs) - } - return result -} - -func flattenGlueJdbcTargets(jdbcTargets []*glue.JdbcTarget) []map[string]interface{} { - result := make([]map[string]interface{}, 0) - - for _, jdbcTarget := range jdbcTargets { - attrs := make(map[string]interface{}) - attrs["connection_name"] = aws.StringValue(jdbcTarget.ConnectionName) - attrs["exclusions"] = flattenStringList(jdbcTarget.Exclusions) - attrs["path"] = aws.StringValue(jdbcTarget.Path) - - result = append(result, attrs) - } - return result -} - -func resourceAwsGlueCrawlerDelete(d *schema.ResourceData, meta interface{}) error { - glueConn := meta.(*AWSClient).glueconn - - log.Printf("[DEBUG] deleting Glue crawler: %s", d.Id()) - _, err := glueConn.DeleteCrawler(&glue.DeleteCrawlerInput{ - Name: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - return nil - } - return fmt.Errorf("error deleting Glue crawler: %s", err.Error()) - } - return nil -} - -func resourceAwsGlueCrawlerExists(d *schema.ResourceData, meta interface{}) (bool, error) { - glueConn := meta.(*AWSClient).glueconn - - input := &glue.GetCrawlerInput{ - Name: aws.String(d.Id()), - } - - _, err := glueConn.GetCrawler(input) - if err != nil { - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - return false, nil - } - return false, err - } - return true, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_job.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_job.go deleted file mode 100644 index 3a296c393..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_job.go +++ /dev/null @@ -1,349 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/glue" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsGlueJob() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGlueJobCreate, - Read: resourceAwsGlueJobRead, - Update: resourceAwsGlueJobUpdate, - Delete: resourceAwsGlueJobDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "allocated_capacity": { - Type: schema.TypeInt, - Optional: true, - Default: 10, - ValidateFunc: validation.IntAtLeast(2), - }, - "command": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Default: "glueetl", - }, - "script_location": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "connections": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "default_arguments": { - Type: schema.TypeMap, - Optional: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "execution_property": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "max_concurrent_runs": { - Type: schema.TypeInt, - Optional: true, - Default: 1, - ValidateFunc: validation.IntAtLeast(1), - }, - }, - }, - }, - "max_retries": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(0, 10), - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "timeout": { - Type: schema.TypeInt, - Optional: true, - Default: 2880, - }, - "security_configuration": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsGlueJobCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - name := d.Get("name").(string) - - input := &glue.CreateJobInput{ - Command: expandGlueJobCommand(d.Get("command").([]interface{})), - Name: aws.String(name), - Role: aws.String(d.Get("role_arn").(string)), - Timeout: aws.Int64(int64(d.Get("timeout").(int))), - } - - if v, ok := d.GetOk("allocated_capacity"); ok { - input.AllocatedCapacity = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("connections"); ok { - input.Connections = &glue.ConnectionsList{ - Connections: expandStringList(v.([]interface{})), - } - } - - if kv, ok := d.GetOk("default_arguments"); ok { - defaultArgumentsMap := make(map[string]string) - for k, v := range kv.(map[string]interface{}) { - defaultArgumentsMap[k] = v.(string) - } - input.DefaultArguments = aws.StringMap(defaultArgumentsMap) - } - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("execution_property"); ok { - input.ExecutionProperty = expandGlueExecutionProperty(v.([]interface{})) - } - - if v, ok := d.GetOk("max_retries"); ok { - input.MaxRetries = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("security_configuration"); ok { - input.SecurityConfiguration = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating Glue Job: %s", input) - _, err := conn.CreateJob(input) - if err != nil { - return fmt.Errorf("error creating Glue Job (%s): %s", name, err) - } - - d.SetId(name) - - return resourceAwsGlueJobRead(d, meta) -} - -func resourceAwsGlueJobRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - input := &glue.GetJobInput{ - JobName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading Glue Job: %s", input) - output, err := conn.GetJob(input) - if err != nil { - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - log.Printf("[WARN] Glue Job (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Glue Job (%s): %s", d.Id(), err) - } - - job := output.Job - if job == nil { - log.Printf("[WARN] Glue Job (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("allocated_capacity", int(aws.Int64Value(job.AllocatedCapacity))) - if err := d.Set("command", flattenGlueJobCommand(job.Command)); err != nil { - return fmt.Errorf("error setting command: %s", err) - } - if err := d.Set("connections", flattenGlueConnectionsList(job.Connections)); err != nil { - return fmt.Errorf("error setting connections: %s", err) - } - if err := d.Set("default_arguments", aws.StringValueMap(job.DefaultArguments)); err != nil { - return fmt.Errorf("error setting default_arguments: %s", err) - } - d.Set("description", job.Description) - if err := d.Set("execution_property", flattenGlueExecutionProperty(job.ExecutionProperty)); err != nil { - return fmt.Errorf("error setting execution_property: %s", err) - } - d.Set("max_retries", int(aws.Int64Value(job.MaxRetries))) - d.Set("name", job.Name) - d.Set("role_arn", job.Role) - d.Set("timeout", int(aws.Int64Value(job.Timeout))) - if err := d.Set("security_configuration", job.SecurityConfiguration); err != nil { - return fmt.Errorf("error setting security_configuration: %s", err) - } - - return nil -} - -func resourceAwsGlueJobUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - jobUpdate := &glue.JobUpdate{ - Command: expandGlueJobCommand(d.Get("command").([]interface{})), - Role: aws.String(d.Get("role_arn").(string)), - Timeout: aws.Int64(int64(d.Get("timeout").(int))), - } - - if v, ok := d.GetOk("allocated_capacity"); ok { - jobUpdate.AllocatedCapacity = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("connections"); ok { - jobUpdate.Connections = &glue.ConnectionsList{ - Connections: expandStringList(v.([]interface{})), - } - } - - if kv, ok := d.GetOk("default_arguments"); ok { - defaultArgumentsMap := make(map[string]string) - for k, v := range kv.(map[string]interface{}) { - defaultArgumentsMap[k] = v.(string) - } - jobUpdate.DefaultArguments = aws.StringMap(defaultArgumentsMap) - } - - if v, ok := d.GetOk("description"); ok { - jobUpdate.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("execution_property"); ok { - jobUpdate.ExecutionProperty = expandGlueExecutionProperty(v.([]interface{})) - } - - if v, ok := d.GetOk("max_retries"); ok { - jobUpdate.MaxRetries = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("security_configuration"); ok { - jobUpdate.SecurityConfiguration = aws.String(v.(string)) - } - - input := &glue.UpdateJobInput{ - JobName: aws.String(d.Id()), - JobUpdate: jobUpdate, - } - - log.Printf("[DEBUG] Updating Glue Job: %s", input) - _, err := conn.UpdateJob(input) - if err != nil { - return fmt.Errorf("error updating Glue Job (%s): %s", d.Id(), err) - } - - return nil -} - -func resourceAwsGlueJobDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - log.Printf("[DEBUG] Deleting Glue Job: %s", d.Id()) - err := deleteGlueJob(conn, d.Id()) - if err != nil { - return fmt.Errorf("error deleting Glue Job (%s): %s", d.Id(), err) - } - - return nil -} - -func deleteGlueJob(conn *glue.Glue, jobName string) error { - input := &glue.DeleteJobInput{ - JobName: aws.String(jobName), - } - - _, err := conn.DeleteJob(input) - if err != nil { - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - return nil - } - return err - } - - return nil -} - -func expandGlueExecutionProperty(l []interface{}) *glue.ExecutionProperty { - m := l[0].(map[string]interface{}) - - executionProperty := &glue.ExecutionProperty{ - MaxConcurrentRuns: aws.Int64(int64(m["max_concurrent_runs"].(int))), - } - - return executionProperty -} - -func expandGlueJobCommand(l []interface{}) *glue.JobCommand { - m := l[0].(map[string]interface{}) - - jobCommand := &glue.JobCommand{ - Name: aws.String(m["name"].(string)), - ScriptLocation: aws.String(m["script_location"].(string)), - } - - return jobCommand -} - -func flattenGlueConnectionsList(connectionsList *glue.ConnectionsList) []interface{} { - if connectionsList == nil { - return []interface{}{} - } - - return flattenStringList(connectionsList.Connections) -} - -func flattenGlueExecutionProperty(executionProperty *glue.ExecutionProperty) []map[string]interface{} { - if executionProperty == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "max_concurrent_runs": int(aws.Int64Value(executionProperty.MaxConcurrentRuns)), - } - - return []map[string]interface{}{m} -} - -func flattenGlueJobCommand(jobCommand *glue.JobCommand) []map[string]interface{} { - if jobCommand == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "name": aws.StringValue(jobCommand.Name), - "script_location": aws.StringValue(jobCommand.ScriptLocation), - } - - return []map[string]interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_security_configuration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_security_configuration.go deleted file mode 100644 index aa152ec6c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_security_configuration.go +++ /dev/null @@ -1,342 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/glue" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsGlueSecurityConfiguration() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGlueSecurityConfigurationCreate, - Read: resourceAwsGlueSecurityConfigurationRead, - Delete: resourceAwsGlueSecurityConfigurationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "encryption_configuration": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cloudwatch_encryption": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cloudwatch_encryption_mode": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: glue.CloudWatchEncryptionModeDisabled, - ValidateFunc: validation.StringInSlice([]string{ - glue.CloudWatchEncryptionModeDisabled, - glue.CloudWatchEncryptionModeSseKms, - }, false), - }, - "kms_key_arn": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - "job_bookmarks_encryption": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "job_bookmarks_encryption_mode": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: glue.JobBookmarksEncryptionModeDisabled, - ValidateFunc: validation.StringInSlice([]string{ - glue.JobBookmarksEncryptionModeCseKms, - glue.JobBookmarksEncryptionModeDisabled, - }, false), - }, - "kms_key_arn": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - "s3_encryption": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "kms_key_arn": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "s3_encryption_mode": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: glue.S3EncryptionModeDisabled, - ValidateFunc: validation.StringInSlice([]string{ - glue.S3EncryptionModeDisabled, - glue.S3EncryptionModeSseKms, - glue.S3EncryptionModeSseS3, - }, false), - }, - }, - }, - }, - }, - }, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - }, - } -} - -func resourceAwsGlueSecurityConfigurationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - name := d.Get("name").(string) - - input := &glue.CreateSecurityConfigurationInput{ - EncryptionConfiguration: expandGlueEncryptionConfiguration(d.Get("encryption_configuration").([]interface{})), - Name: aws.String(name), - } - - log.Printf("[DEBUG] Creating Glue Security Configuration: %s", input) - _, err := conn.CreateSecurityConfiguration(input) - if err != nil { - return fmt.Errorf("error creating Glue Security Configuration (%s): %s", name, err) - } - - d.SetId(name) - - return resourceAwsGlueSecurityConfigurationRead(d, meta) -} - -func resourceAwsGlueSecurityConfigurationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - input := &glue.GetSecurityConfigurationInput{ - Name: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading Glue Security Configuration: %s", input) - output, err := conn.GetSecurityConfiguration(input) - - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - log.Printf("[WARN] Glue Security Configuration (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading Glue Security Configuration (%s): %s", d.Id(), err) - } - - securityConfiguration := output.SecurityConfiguration - if securityConfiguration == nil { - log.Printf("[WARN] Glue Security Configuration (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err := d.Set("encryption_configuration", flattenGlueEncryptionConfiguration(securityConfiguration.EncryptionConfiguration)); err != nil { - return fmt.Errorf("error setting encryption_configuration: %s", err) - } - - d.Set("name", securityConfiguration.Name) - - return nil -} - -func resourceAwsGlueSecurityConfigurationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - log.Printf("[DEBUG] Deleting Glue Security Configuration: %s", d.Id()) - err := deleteGlueSecurityConfiguration(conn, d.Id()) - if err != nil { - return fmt.Errorf("error deleting Glue Security Configuration (%s): %s", d.Id(), err) - } - - return nil -} - -func deleteGlueSecurityConfiguration(conn *glue.Glue, name string) error { - input := &glue.DeleteSecurityConfigurationInput{ - Name: aws.String(name), - } - - _, err := conn.DeleteSecurityConfiguration(input) - - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - return nil - } - - if err != nil { - return err - } - - return nil -} - -func expandGlueCloudWatchEncryption(l []interface{}) *glue.CloudWatchEncryption { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - cloudwatchEncryption := &glue.CloudWatchEncryption{ - CloudWatchEncryptionMode: aws.String(m["cloudwatch_encryption_mode"].(string)), - } - - if v, ok := m["kms_key_arn"]; ok { - cloudwatchEncryption.KmsKeyArn = aws.String(v.(string)) - } - - return cloudwatchEncryption -} - -func expandGlueEncryptionConfiguration(l []interface{}) *glue.EncryptionConfiguration { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - encryptionConfiguration := &glue.EncryptionConfiguration{ - CloudWatchEncryption: expandGlueCloudWatchEncryption(m["cloudwatch_encryption"].([]interface{})), - JobBookmarksEncryption: expandGlueJobBookmarksEncryption(m["job_bookmarks_encryption"].([]interface{})), - S3Encryption: expandGlueS3Encryptions(m["s3_encryption"].([]interface{})), - } - - return encryptionConfiguration -} - -func expandGlueJobBookmarksEncryption(l []interface{}) *glue.JobBookmarksEncryption { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - jobBookmarksEncryption := &glue.JobBookmarksEncryption{ - JobBookmarksEncryptionMode: aws.String(m["job_bookmarks_encryption_mode"].(string)), - } - - if v, ok := m["kms_key_arn"]; ok { - jobBookmarksEncryption.KmsKeyArn = aws.String(v.(string)) - } - - return jobBookmarksEncryption -} - -func expandGlueS3Encryptions(l []interface{}) []*glue.S3Encryption { - s3Encryptions := make([]*glue.S3Encryption, 0) - - for _, s3Encryption := range l { - if s3Encryption == nil { - continue - } - s3Encryptions = append(s3Encryptions, expandGlueS3Encryption(s3Encryption.(map[string]interface{}))) - } - - return s3Encryptions -} - -func expandGlueS3Encryption(m map[string]interface{}) *glue.S3Encryption { - s3Encryption := &glue.S3Encryption{ - S3EncryptionMode: aws.String(m["s3_encryption_mode"].(string)), - } - - if v, ok := m["kms_key_arn"]; ok { - s3Encryption.KmsKeyArn = aws.String(v.(string)) - } - - return s3Encryption -} - -func flattenGlueCloudWatchEncryption(cloudwatchEncryption *glue.CloudWatchEncryption) []interface{} { - if cloudwatchEncryption == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "cloudwatch_encryption_mode": aws.StringValue(cloudwatchEncryption.CloudWatchEncryptionMode), - "kms_key_arn": aws.StringValue(cloudwatchEncryption.KmsKeyArn), - } - - return []interface{}{m} -} - -func flattenGlueEncryptionConfiguration(encryptionConfiguration *glue.EncryptionConfiguration) []interface{} { - if encryptionConfiguration == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "cloudwatch_encryption": flattenGlueCloudWatchEncryption(encryptionConfiguration.CloudWatchEncryption), - "job_bookmarks_encryption": flattenGlueJobBookmarksEncryption(encryptionConfiguration.JobBookmarksEncryption), - "s3_encryption": flattenGlueS3Encryptions(encryptionConfiguration.S3Encryption), - } - - return []interface{}{m} -} - -func flattenGlueJobBookmarksEncryption(jobBookmarksEncryption *glue.JobBookmarksEncryption) []interface{} { - if jobBookmarksEncryption == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "job_bookmarks_encryption_mode": aws.StringValue(jobBookmarksEncryption.JobBookmarksEncryptionMode), - "kms_key_arn": aws.StringValue(jobBookmarksEncryption.KmsKeyArn), - } - - return []interface{}{m} -} - -func flattenGlueS3Encryptions(s3Encryptions []*glue.S3Encryption) []interface{} { - l := make([]interface{}, 0) - - for _, s3Encryption := range s3Encryptions { - if s3Encryption == nil { - continue - } - l = append(l, flattenGlueS3Encryption(s3Encryption)) - } - - return l -} - -func flattenGlueS3Encryption(s3Encryption *glue.S3Encryption) map[string]interface{} { - m := map[string]interface{}{ - "kms_key_arn": aws.StringValue(s3Encryption.KmsKeyArn), - "s3_encryption_mode": aws.StringValue(s3Encryption.S3EncryptionMode), - } - - return m -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_trigger.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_trigger.go deleted file mode 100644 index 903f9551a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_trigger.go +++ /dev/null @@ -1,461 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/glue" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsGlueTrigger() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGlueTriggerCreate, - Read: resourceAwsGlueTriggerRead, - Update: resourceAwsGlueTriggerUpdate, - Delete: resourceAwsGlueTriggerDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(5 * time.Minute), - Delete: schema.DefaultTimeout(5 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "actions": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "arguments": { - Type: schema.TypeMap, - Optional: true, - }, - "job_name": { - Type: schema.TypeString, - Required: true, - }, - "timeout": { - Type: schema.TypeInt, - Optional: true, - }, - }, - }, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "predicate": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "conditions": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "job_name": { - Type: schema.TypeString, - Required: true, - }, - "logical_operator": { - Type: schema.TypeString, - Optional: true, - Default: glue.LogicalOperatorEquals, - ValidateFunc: validation.StringInSlice([]string{ - glue.LogicalOperatorEquals, - }, false), - }, - "state": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - glue.JobRunStateFailed, - glue.JobRunStateStopped, - glue.JobRunStateSucceeded, - glue.JobRunStateTimeout, - }, false), - }, - }, - }, - }, - "logical": { - Type: schema.TypeString, - Optional: true, - Default: glue.LogicalAnd, - ValidateFunc: validation.StringInSlice([]string{ - glue.LogicalAnd, - glue.LogicalAny, - }, false), - }, - }, - }, - }, - "schedule": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - glue.TriggerTypeConditional, - glue.TriggerTypeOnDemand, - glue.TriggerTypeScheduled, - }, false), - }, - }, - } -} - -func resourceAwsGlueTriggerCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - name := d.Get("name").(string) - triggerType := d.Get("type").(string) - - input := &glue.CreateTriggerInput{ - Actions: expandGlueActions(d.Get("actions").([]interface{})), - Name: aws.String(name), - Type: aws.String(triggerType), - } - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("predicate"); ok { - input.Predicate = expandGluePredicate(v.([]interface{})) - } - - if v, ok := d.GetOk("schedule"); ok { - input.Schedule = aws.String(v.(string)) - } - - if d.Get("enabled").(bool) && triggerType != glue.TriggerTypeOnDemand { - input.StartOnCreation = aws.Bool(true) - } - - log.Printf("[DEBUG] Creating Glue Trigger: %s", input) - _, err := conn.CreateTrigger(input) - if err != nil { - return fmt.Errorf("error creating Glue Trigger (%s): %s", name, err) - } - - d.SetId(name) - - log.Printf("[DEBUG] Waiting for Glue Trigger (%s) to create", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{ - glue.TriggerStateActivating, - glue.TriggerStateCreating, - }, - Target: []string{ - glue.TriggerStateActivated, - glue.TriggerStateCreated, - }, - Refresh: resourceAwsGlueTriggerRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for Glue Trigger (%s) to create", d.Id()) - } - - return resourceAwsGlueTriggerRead(d, meta) -} - -func resourceAwsGlueTriggerRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - input := &glue.GetTriggerInput{ - Name: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading Glue Trigger: %s", input) - output, err := conn.GetTrigger(input) - if err != nil { - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - log.Printf("[WARN] Glue Trigger (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Glue Trigger (%s): %s", d.Id(), err) - } - - trigger := output.Trigger - if trigger == nil { - log.Printf("[WARN] Glue Trigger (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err := d.Set("actions", flattenGlueActions(trigger.Actions)); err != nil { - return fmt.Errorf("error setting actions: %s", err) - } - - d.Set("description", trigger.Description) - - var enabled bool - state := aws.StringValue(trigger.State) - - if aws.StringValue(trigger.Type) == glue.TriggerTypeOnDemand { - enabled = (state == glue.TriggerStateCreated || state == glue.TriggerStateCreating) - } else { - enabled = (state == glue.TriggerStateActivated || state == glue.TriggerStateActivating) - } - d.Set("enabled", enabled) - - if err := d.Set("predicate", flattenGluePredicate(trigger.Predicate)); err != nil { - return fmt.Errorf("error setting predicate: %s", err) - } - - d.Set("name", trigger.Name) - d.Set("schedule", trigger.Schedule) - d.Set("type", trigger.Type) - - return nil -} - -func resourceAwsGlueTriggerUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - if d.HasChange("actions") || - d.HasChange("description") || - d.HasChange("predicate") || - d.HasChange("schedule") { - triggerUpdate := &glue.TriggerUpdate{ - Actions: expandGlueActions(d.Get("actions").([]interface{})), - } - - if v, ok := d.GetOk("description"); ok { - triggerUpdate.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("predicate"); ok { - triggerUpdate.Predicate = expandGluePredicate(v.([]interface{})) - } - - if v, ok := d.GetOk("schedule"); ok { - triggerUpdate.Schedule = aws.String(v.(string)) - } - input := &glue.UpdateTriggerInput{ - Name: aws.String(d.Id()), - TriggerUpdate: triggerUpdate, - } - - log.Printf("[DEBUG] Updating Glue Trigger: %s", input) - _, err := conn.UpdateTrigger(input) - if err != nil { - return fmt.Errorf("error updating Glue Trigger (%s): %s", d.Id(), err) - } - } - - if d.HasChange("enabled") { - if d.Get("enabled").(bool) { - input := &glue.StartTriggerInput{ - Name: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Starting Glue Trigger: %s", input) - _, err := conn.StartTrigger(input) - if err != nil { - return fmt.Errorf("error starting Glue Trigger (%s): %s", d.Id(), err) - } - } else { - input := &glue.StopTriggerInput{ - Name: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Stopping Glue Trigger: %s", input) - _, err := conn.StopTrigger(input) - if err != nil { - return fmt.Errorf("error stopping Glue Trigger (%s): %s", d.Id(), err) - } - } - } - - return nil -} - -func resourceAwsGlueTriggerDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).glueconn - - log.Printf("[DEBUG] Deleting Glue Trigger: %s", d.Id()) - err := deleteGlueTrigger(conn, d.Id()) - if err != nil { - return fmt.Errorf("error deleting Glue Trigger (%s): %s", d.Id(), err) - } - - log.Printf("[DEBUG] Waiting for Glue Trigger (%s) to delete", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{glue.TriggerStateDeleting}, - Target: []string{""}, - Refresh: resourceAwsGlueTriggerRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutDelete), - } - _, err = stateConf.WaitForState() - if err != nil { - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - return nil - } - return fmt.Errorf("error waiting for Glue Trigger (%s) to delete", d.Id()) - } - - return nil -} - -func resourceAwsGlueTriggerRefreshFunc(conn *glue.Glue, name string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - output, err := conn.GetTrigger(&glue.GetTriggerInput{ - Name: aws.String(name), - }) - if err != nil { - return output, "", err - } - - if output.Trigger == nil { - return output, "", nil - } - - return output, aws.StringValue(output.Trigger.State), nil - } -} - -func deleteGlueTrigger(conn *glue.Glue, Name string) error { - input := &glue.DeleteTriggerInput{ - Name: aws.String(Name), - } - - _, err := conn.DeleteTrigger(input) - if err != nil { - if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - return nil - } - return err - } - - return nil -} - -func expandGlueActions(l []interface{}) []*glue.Action { - actions := []*glue.Action{} - - for _, mRaw := range l { - m := mRaw.(map[string]interface{}) - - action := &glue.Action{ - JobName: aws.String(m["job_name"].(string)), - } - - argumentsMap := make(map[string]string) - for k, v := range m["arguments"].(map[string]interface{}) { - argumentsMap[k] = v.(string) - } - action.Arguments = aws.StringMap(argumentsMap) - - if v, ok := m["timeout"]; ok && v.(int) > 0 { - action.Timeout = aws.Int64(int64(v.(int))) - } - - actions = append(actions, action) - } - - return actions -} - -func expandGlueConditions(l []interface{}) []*glue.Condition { - conditions := []*glue.Condition{} - - for _, mRaw := range l { - m := mRaw.(map[string]interface{}) - - condition := &glue.Condition{ - JobName: aws.String(m["job_name"].(string)), - LogicalOperator: aws.String(m["logical_operator"].(string)), - State: aws.String(m["state"].(string)), - } - - conditions = append(conditions, condition) - } - - return conditions -} - -func expandGluePredicate(l []interface{}) *glue.Predicate { - m := l[0].(map[string]interface{}) - - predicate := &glue.Predicate{ - Conditions: expandGlueConditions(m["conditions"].([]interface{})), - } - - if v, ok := m["logical"]; ok && v.(string) != "" { - predicate.Logical = aws.String(v.(string)) - } - - return predicate -} - -func flattenGlueActions(actions []*glue.Action) []interface{} { - l := []interface{}{} - - for _, action := range actions { - m := map[string]interface{}{ - "arguments": aws.StringValueMap(action.Arguments), - "job_name": aws.StringValue(action.JobName), - "timeout": int(aws.Int64Value(action.Timeout)), - } - l = append(l, m) - } - - return l -} - -func flattenGlueConditions(conditions []*glue.Condition) []interface{} { - l := []interface{}{} - - for _, condition := range conditions { - m := map[string]interface{}{ - "job_name": aws.StringValue(condition.JobName), - "logical_operator": aws.StringValue(condition.LogicalOperator), - "state": aws.StringValue(condition.State), - } - l = append(l, m) - } - - return l -} - -func flattenGluePredicate(predicate *glue.Predicate) []map[string]interface{} { - if predicate == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "conditions": flattenGlueConditions(predicate.Conditions), - "logical": aws.StringValue(predicate.Logical), - } - - return []map[string]interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_detector.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_detector.go deleted file mode 100644 index a2cff2eea..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_detector.go +++ /dev/null @@ -1,114 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/guardduty" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsGuardDutyDetector() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGuardDutyDetectorCreate, - Read: resourceAwsGuardDutyDetectorRead, - Update: resourceAwsGuardDutyDetectorUpdate, - Delete: resourceAwsGuardDutyDetectorDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "enable": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "account_id": { - Type: schema.TypeString, - Computed: true, - }, - "finding_publishing_frequency": { - Type: schema.TypeString, - Optional: true, - Default: "SIX_HOURS", - }, - }, - } -} - -func resourceAwsGuardDutyDetectorCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - - input := guardduty.CreateDetectorInput{ - Enable: aws.Bool(d.Get("enable").(bool)), - FindingPublishingFrequency: aws.String(d.Get("finding_publishing_frequency").(string)), - } - - log.Printf("[DEBUG] Creating GuardDuty Detector: %s", input) - output, err := conn.CreateDetector(&input) - if err != nil { - return fmt.Errorf("Creating GuardDuty Detector failed: %s", err.Error()) - } - d.SetId(*output.DetectorId) - - return resourceAwsGuardDutyDetectorRead(d, meta) -} - -func resourceAwsGuardDutyDetectorRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - input := guardduty.GetDetectorInput{ - DetectorId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading GuardDuty Detector: %s", input) - gdo, err := conn.GetDetector(&input) - if err != nil { - if isAWSErr(err, guardduty.ErrCodeBadRequestException, "The request is rejected because the input detectorId is not owned by the current account.") { - log.Printf("[WARN] GuardDuty detector %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Reading GuardDuty Detector '%s' failed: %s", d.Id(), err.Error()) - } - - d.Set("account_id", meta.(*AWSClient).accountid) - d.Set("enable", *gdo.Status == guardduty.DetectorStatusEnabled) - d.Set("finding_publishing_frequency", gdo.FindingPublishingFrequency) - - return nil -} - -func resourceAwsGuardDutyDetectorUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - - input := guardduty.UpdateDetectorInput{ - DetectorId: aws.String(d.Id()), - Enable: aws.Bool(d.Get("enable").(bool)), - FindingPublishingFrequency: aws.String(d.Get("finding_publishing_frequency").(string)), - } - - log.Printf("[DEBUG] Update GuardDuty Detector: %s", input) - _, err := conn.UpdateDetector(&input) - if err != nil { - return fmt.Errorf("Updating GuardDuty Detector '%s' failed: %s", d.Id(), err.Error()) - } - - return resourceAwsGuardDutyDetectorRead(d, meta) -} - -func resourceAwsGuardDutyDetectorDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - input := guardduty.DeleteDetectorInput{ - DetectorId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Delete GuardDuty Detector: %s", input) - _, err := conn.DeleteDetector(&input) - if err != nil { - return fmt.Errorf("Deleting GuardDuty Detector '%s' failed: %s", d.Id(), err.Error()) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_ipset.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_ipset.go deleted file mode 100644 index b6e0ab64c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_ipset.go +++ /dev/null @@ -1,218 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/guardduty" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsGuardDutyIpset() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGuardDutyIpsetCreate, - Read: resourceAwsGuardDutyIpsetRead, - Update: resourceAwsGuardDutyIpsetUpdate, - Delete: resourceAwsGuardDutyIpsetDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "detector_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - }, - "format": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - guardduty.IpSetFormatTxt, - guardduty.IpSetFormatStix, - guardduty.IpSetFormatOtxCsv, - guardduty.IpSetFormatAlienVault, - guardduty.IpSetFormatProofPoint, - guardduty.IpSetFormatFireEye, - }, false), - }, - "location": { - Type: schema.TypeString, - Required: true, - }, - "activate": { - Type: schema.TypeBool, - Required: true, - }, - }, - } -} - -func resourceAwsGuardDutyIpsetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - - detectorID := d.Get("detector_id").(string) - input := &guardduty.CreateIPSetInput{ - DetectorId: aws.String(detectorID), - Name: aws.String(d.Get("name").(string)), - Format: aws.String(d.Get("format").(string)), - Location: aws.String(d.Get("location").(string)), - Activate: aws.Bool(d.Get("activate").(bool)), - } - - resp, err := conn.CreateIPSet(input) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{guardduty.IpSetStatusActivating, guardduty.IpSetStatusDeactivating}, - Target: []string{guardduty.IpSetStatusActive, guardduty.IpSetStatusInactive}, - Refresh: guardDutyIpsetRefreshStatusFunc(conn, *resp.IpSetId, detectorID), - Timeout: 5 * time.Minute, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for GuardDuty IpSet status to be \"%s\" or \"%s\": %s", guardduty.IpSetStatusActive, guardduty.IpSetStatusInactive, err) - } - - d.SetId(fmt.Sprintf("%s:%s", detectorID, *resp.IpSetId)) - return resourceAwsGuardDutyIpsetRead(d, meta) -} - -func resourceAwsGuardDutyIpsetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - - ipSetId, detectorId, err := decodeGuardDutyIpsetID(d.Id()) - if err != nil { - return err - } - input := &guardduty.GetIPSetInput{ - DetectorId: aws.String(detectorId), - IpSetId: aws.String(ipSetId), - } - - resp, err := conn.GetIPSet(input) - if err != nil { - if isAWSErr(err, guardduty.ErrCodeBadRequestException, "The request is rejected because the input detectorId is not owned by the current account.") { - log.Printf("[WARN] GuardDuty IpSet %q not found, removing from state", ipSetId) - d.SetId("") - return nil - } - return err - } - - d.Set("detector_id", detectorId) - d.Set("format", resp.Format) - d.Set("location", resp.Location) - d.Set("name", resp.Name) - d.Set("activate", *resp.Status == guardduty.IpSetStatusActive) - return nil -} - -func resourceAwsGuardDutyIpsetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - - ipSetId, detectorId, err := decodeGuardDutyIpsetID(d.Id()) - if err != nil { - return err - } - input := &guardduty.UpdateIPSetInput{ - DetectorId: aws.String(detectorId), - IpSetId: aws.String(ipSetId), - } - - if d.HasChange("name") { - input.Name = aws.String(d.Get("name").(string)) - } - if d.HasChange("location") { - input.Location = aws.String(d.Get("location").(string)) - } - if d.HasChange("activate") { - input.Activate = aws.Bool(d.Get("activate").(bool)) - } - - _, err = conn.UpdateIPSet(input) - if err != nil { - return err - } - - return resourceAwsGuardDutyIpsetRead(d, meta) -} - -func resourceAwsGuardDutyIpsetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - - ipSetId, detectorId, err := decodeGuardDutyIpsetID(d.Id()) - if err != nil { - return err - } - input := &guardduty.DeleteIPSetInput{ - DetectorId: aws.String(detectorId), - IpSetId: aws.String(ipSetId), - } - - _, err = conn.DeleteIPSet(input) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{ - guardduty.IpSetStatusActive, - guardduty.IpSetStatusActivating, - guardduty.IpSetStatusInactive, - guardduty.IpSetStatusDeactivating, - guardduty.IpSetStatusDeletePending, - }, - Target: []string{guardduty.IpSetStatusDeleted}, - Refresh: guardDutyIpsetRefreshStatusFunc(conn, ipSetId, detectorId), - Timeout: 5 * time.Minute, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for GuardDuty IpSet status to be \"%s\": %s", guardduty.IpSetStatusDeleted, err) - } - - return nil -} - -func guardDutyIpsetRefreshStatusFunc(conn *guardduty.GuardDuty, ipSetID, detectorID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &guardduty.GetIPSetInput{ - DetectorId: aws.String(detectorID), - IpSetId: aws.String(ipSetID), - } - resp, err := conn.GetIPSet(input) - if err != nil { - return nil, "failed", err - } - return resp, *resp.Status, nil - } -} - -func decodeGuardDutyIpsetID(id string) (ipsetID, detectorID string, err error) { - parts := strings.Split(id, ":") - if len(parts) != 2 { - err = fmt.Errorf("GuardDuty IPSet ID must be of the form :, was provided: %s", id) - return - } - ipsetID = parts[1] - detectorID = parts[0] - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_member.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_member.go deleted file mode 100644 index 49ca3beb9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_member.go +++ /dev/null @@ -1,274 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/guardduty" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsGuardDutyMember() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGuardDutyMemberCreate, - Read: resourceAwsGuardDutyMemberRead, - Update: resourceAwsGuardDutyMemberUpdate, - Delete: resourceAwsGuardDutyMemberDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "account_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateAwsAccountId, - }, - "detector_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "email": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "relationship_status": { - Type: schema.TypeString, - Computed: true, - }, - "invite": { - Type: schema.TypeBool, - Optional: true, - }, - "disable_email_notification": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - "invitation_message": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(60 * time.Second), - Update: schema.DefaultTimeout(60 * time.Second), - }, - } -} - -func resourceAwsGuardDutyMemberCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - accountID := d.Get("account_id").(string) - detectorID := d.Get("detector_id").(string) - - input := guardduty.CreateMembersInput{ - AccountDetails: []*guardduty.AccountDetail{{ - AccountId: aws.String(accountID), - Email: aws.String(d.Get("email").(string)), - }}, - DetectorId: aws.String(detectorID), - } - - log.Printf("[DEBUG] Creating GuardDuty Member: %s", input) - _, err := conn.CreateMembers(&input) - if err != nil { - return fmt.Errorf("Creating GuardDuty Member failed: %s", err.Error()) - } - - d.SetId(fmt.Sprintf("%s:%s", detectorID, accountID)) - - if !d.Get("invite").(bool) { - return resourceAwsGuardDutyMemberRead(d, meta) - } - - imi := &guardduty.InviteMembersInput{ - DetectorId: aws.String(detectorID), - AccountIds: []*string{aws.String(accountID)}, - DisableEmailNotification: aws.Bool(d.Get("disable_email_notification").(bool)), - Message: aws.String(d.Get("invitation_message").(string)), - } - - log.Printf("[INFO] Inviting GuardDuty Member: %s", input) - _, err = conn.InviteMembers(imi) - if err != nil { - return fmt.Errorf("error inviting GuardDuty Member %q: %s", d.Id(), err) - } - - err = inviteGuardDutyMemberWaiter(accountID, detectorID, d.Timeout(schema.TimeoutUpdate), conn) - if err != nil { - return fmt.Errorf("error waiting for GuardDuty Member %q invite: %s", d.Id(), err) - } - - return resourceAwsGuardDutyMemberRead(d, meta) -} - -func resourceAwsGuardDutyMemberRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - - accountID, detectorID, err := decodeGuardDutyMemberID(d.Id()) - if err != nil { - return err - } - - input := guardduty.GetMembersInput{ - AccountIds: []*string{aws.String(accountID)}, - DetectorId: aws.String(detectorID), - } - - log.Printf("[DEBUG] Reading GuardDuty Member: %s", input) - gmo, err := conn.GetMembers(&input) - if err != nil { - if isAWSErr(err, guardduty.ErrCodeBadRequestException, "The request is rejected because the input detectorId is not owned by the current account.") { - log.Printf("[WARN] GuardDuty detector %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Reading GuardDuty Member '%s' failed: %s", d.Id(), err.Error()) - } - - if gmo.Members == nil || (len(gmo.Members) < 1) { - log.Printf("[WARN] GuardDuty Member %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - member := gmo.Members[0] - d.Set("account_id", member.AccountId) - d.Set("detector_id", detectorID) - d.Set("email", member.Email) - - status := aws.StringValue(member.RelationshipStatus) - d.Set("relationship_status", status) - - // https://docs.aws.amazon.com/guardduty/latest/ug/list-members.html - d.Set("invite", false) - if status == "Disabled" || status == "Enabled" || status == "Invited" || status == "EmailVerificationInProgress" { - d.Set("invite", true) - } - - return nil -} - -func resourceAwsGuardDutyMemberUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - - accountID, detectorID, err := decodeGuardDutyMemberID(d.Id()) - if err != nil { - return err - } - - if d.HasChange("invite") { - if d.Get("invite").(bool) { - input := &guardduty.InviteMembersInput{ - DetectorId: aws.String(detectorID), - AccountIds: []*string{aws.String(accountID)}, - DisableEmailNotification: aws.Bool(d.Get("disable_email_notification").(bool)), - Message: aws.String(d.Get("invitation_message").(string)), - } - - log.Printf("[INFO] Inviting GuardDuty Member: %s", input) - output, err := conn.InviteMembers(input) - if err != nil { - return fmt.Errorf("error inviting GuardDuty Member %q: %s", d.Id(), err) - } - - // {"unprocessedAccounts":[{"result":"The request is rejected because the current account has already invited or is already the GuardDuty master of the given member account ID.","accountId":"067819342479"}]} - if len(output.UnprocessedAccounts) > 0 { - return fmt.Errorf("error inviting GuardDuty Member %q: %s", d.Id(), aws.StringValue(output.UnprocessedAccounts[0].Result)) - } - - err = inviteGuardDutyMemberWaiter(accountID, detectorID, d.Timeout(schema.TimeoutUpdate), conn) - if err != nil { - return fmt.Errorf("error waiting for GuardDuty Member %q invite: %s", d.Id(), err) - } - } else { - input := &guardduty.DisassociateMembersInput{ - AccountIds: []*string{aws.String(accountID)}, - DetectorId: aws.String(detectorID), - } - log.Printf("[INFO] Disassociating GuardDuty Member: %s", input) - _, err := conn.DisassociateMembers(input) - if err != nil { - return fmt.Errorf("error disassociating GuardDuty Member %q: %s", d.Id(), err) - } - } - } - - return resourceAwsGuardDutyMemberRead(d, meta) -} - -func resourceAwsGuardDutyMemberDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - - accountID, detectorID, err := decodeGuardDutyMemberID(d.Id()) - if err != nil { - return err - } - - input := guardduty.DeleteMembersInput{ - AccountIds: []*string{aws.String(accountID)}, - DetectorId: aws.String(detectorID), - } - - log.Printf("[DEBUG] Delete GuardDuty Member: %s", input) - _, err = conn.DeleteMembers(&input) - if err != nil { - return fmt.Errorf("Deleting GuardDuty Member '%s' failed: %s", d.Id(), err.Error()) - } - return nil -} - -func inviteGuardDutyMemberWaiter(accountID, detectorID string, timeout time.Duration, conn *guardduty.GuardDuty) error { - input := guardduty.GetMembersInput{ - DetectorId: aws.String(detectorID), - AccountIds: []*string{aws.String(accountID)}, - } - - // wait until e-mail verification finishes - return resource.Retry(timeout, func() *resource.RetryError { - log.Printf("[DEBUG] Reading GuardDuty Member: %s", input) - gmo, err := conn.GetMembers(&input) - - if err != nil { - return resource.NonRetryableError(fmt.Errorf("error reading GuardDuty Member %q: %s", accountID, err)) - } - - if gmo == nil || len(gmo.Members) == 0 { - return resource.RetryableError(fmt.Errorf("error reading GuardDuty Member %q: member missing from response", accountID)) - } - - member := gmo.Members[0] - status := aws.StringValue(member.RelationshipStatus) - - if status == "Disabled" || status == "Enabled" || status == "Invited" { - return nil - } - - if status == "Created" || status == "EmailVerificationInProgress" { - return resource.RetryableError(fmt.Errorf("Expected member to be invited but was in state: %s", status)) - } - - return resource.NonRetryableError(fmt.Errorf("error inviting GuardDuty Member %q: invalid status: %s", accountID, status)) - }) -} - -func decodeGuardDutyMemberID(id string) (accountID, detectorID string, err error) { - parts := strings.Split(id, ":") - if len(parts) != 2 { - err = fmt.Errorf("GuardDuty Member ID must be of the form :, was provided: %s", id) - return - } - accountID = parts[1] - detectorID = parts[0] - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_threatintelset.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_threatintelset.go deleted file mode 100644 index 75622cef5..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_threatintelset.go +++ /dev/null @@ -1,219 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/guardduty" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsGuardDutyThreatintelset() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGuardDutyThreatintelsetCreate, - Read: resourceAwsGuardDutyThreatintelsetRead, - Update: resourceAwsGuardDutyThreatintelsetUpdate, - Delete: resourceAwsGuardDutyThreatintelsetDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "detector_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - }, - "format": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - guardduty.ThreatIntelSetFormatTxt, - guardduty.ThreatIntelSetFormatStix, - guardduty.ThreatIntelSetFormatOtxCsv, - guardduty.ThreatIntelSetFormatAlienVault, - guardduty.ThreatIntelSetFormatProofPoint, - guardduty.ThreatIntelSetFormatFireEye, - }, false), - }, - "location": { - Type: schema.TypeString, - Required: true, - }, - "activate": { - Type: schema.TypeBool, - Required: true, - }, - }, - } -} - -func resourceAwsGuardDutyThreatintelsetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - - detectorID := d.Get("detector_id").(string) - input := &guardduty.CreateThreatIntelSetInput{ - DetectorId: aws.String(detectorID), - Name: aws.String(d.Get("name").(string)), - Format: aws.String(d.Get("format").(string)), - Location: aws.String(d.Get("location").(string)), - Activate: aws.Bool(d.Get("activate").(bool)), - } - - resp, err := conn.CreateThreatIntelSet(input) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{guardduty.ThreatIntelSetStatusActivating, guardduty.ThreatIntelSetStatusDeactivating}, - Target: []string{guardduty.ThreatIntelSetStatusActive, guardduty.ThreatIntelSetStatusInactive}, - Refresh: guardDutyThreatintelsetRefreshStatusFunc(conn, *resp.ThreatIntelSetId, detectorID), - Timeout: 5 * time.Minute, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for GuardDuty ThreatIntelSet status to be \"%s\" or \"%s\": %s", - guardduty.ThreatIntelSetStatusActive, guardduty.ThreatIntelSetStatusInactive, err) - } - - d.SetId(fmt.Sprintf("%s:%s", detectorID, *resp.ThreatIntelSetId)) - return resourceAwsGuardDutyThreatintelsetRead(d, meta) -} - -func resourceAwsGuardDutyThreatintelsetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - - threatIntelSetId, detectorId, err := decodeGuardDutyThreatintelsetID(d.Id()) - if err != nil { - return err - } - input := &guardduty.GetThreatIntelSetInput{ - DetectorId: aws.String(detectorId), - ThreatIntelSetId: aws.String(threatIntelSetId), - } - - resp, err := conn.GetThreatIntelSet(input) - if err != nil { - if isAWSErr(err, guardduty.ErrCodeBadRequestException, "The request is rejected because the input detectorId is not owned by the current account.") { - log.Printf("[WARN] GuardDuty ThreatIntelSet %q not found, removing from state", threatIntelSetId) - d.SetId("") - return nil - } - return err - } - - d.Set("detector_id", detectorId) - d.Set("format", resp.Format) - d.Set("location", resp.Location) - d.Set("name", resp.Name) - d.Set("activate", *resp.Status == guardduty.ThreatIntelSetStatusActive) - return nil -} - -func resourceAwsGuardDutyThreatintelsetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - - threatIntelSetID, detectorId, err := decodeGuardDutyThreatintelsetID(d.Id()) - if err != nil { - return err - } - input := &guardduty.UpdateThreatIntelSetInput{ - DetectorId: aws.String(detectorId), - ThreatIntelSetId: aws.String(threatIntelSetID), - } - - if d.HasChange("name") { - input.Name = aws.String(d.Get("name").(string)) - } - if d.HasChange("location") { - input.Location = aws.String(d.Get("location").(string)) - } - if d.HasChange("activate") { - input.Activate = aws.Bool(d.Get("activate").(bool)) - } - - _, err = conn.UpdateThreatIntelSet(input) - if err != nil { - return err - } - - return resourceAwsGuardDutyThreatintelsetRead(d, meta) -} - -func resourceAwsGuardDutyThreatintelsetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - - threatIntelSetID, detectorId, err := decodeGuardDutyThreatintelsetID(d.Id()) - if err != nil { - return err - } - input := &guardduty.DeleteThreatIntelSetInput{ - DetectorId: aws.String(detectorId), - ThreatIntelSetId: aws.String(threatIntelSetID), - } - - _, err = conn.DeleteThreatIntelSet(input) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{ - guardduty.ThreatIntelSetStatusActive, - guardduty.ThreatIntelSetStatusActivating, - guardduty.ThreatIntelSetStatusInactive, - guardduty.ThreatIntelSetStatusDeactivating, - guardduty.ThreatIntelSetStatusDeletePending, - }, - Target: []string{guardduty.ThreatIntelSetStatusDeleted}, - Refresh: guardDutyThreatintelsetRefreshStatusFunc(conn, threatIntelSetID, detectorId), - Timeout: 5 * time.Minute, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for GuardDuty ThreatIntelSet status to be \"%s\": %s", guardduty.ThreatIntelSetStatusDeleted, err) - } - - return nil -} - -func guardDutyThreatintelsetRefreshStatusFunc(conn *guardduty.GuardDuty, threatIntelSetID, detectorID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &guardduty.GetThreatIntelSetInput{ - DetectorId: aws.String(detectorID), - ThreatIntelSetId: aws.String(threatIntelSetID), - } - resp, err := conn.GetThreatIntelSet(input) - if err != nil { - return nil, "failed", err - } - return resp, *resp.Status, nil - } -} - -func decodeGuardDutyThreatintelsetID(id string) (threatIntelSetID, detectorID string, err error) { - parts := strings.Split(id, ":") - if len(parts) != 2 { - err = fmt.Errorf("GuardDuty ThreatIntelSet ID must be of the form :, was provided: %s", id) - return - } - threatIntelSetID = parts[1] - detectorID = parts[0] - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go deleted file mode 100644 index 9b2fe4efa..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go +++ /dev/null @@ -1,183 +0,0 @@ -package aws - -import ( - "crypto/hmac" - "crypto/sha256" - "encoding/base64" - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" - - "github.com/hashicorp/terraform/helper/encryption" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamAccessKey() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamAccessKeyCreate, - Read: resourceAwsIamAccessKeyRead, - Delete: resourceAwsIamAccessKeyDelete, - - Schema: map[string]*schema.Schema{ - "user": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "secret": { - Type: schema.TypeString, - Computed: true, - Deprecated: "Please use a PGP key to encrypt", - }, - "ses_smtp_password": { - Type: schema.TypeString, - Computed: true, - }, - "pgp_key": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - }, - "key_fingerprint": { - Type: schema.TypeString, - Computed: true, - }, - "encrypted_secret": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsIamAccessKeyCreate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - request := &iam.CreateAccessKeyInput{ - UserName: aws.String(d.Get("user").(string)), - } - - createResp, err := iamconn.CreateAccessKey(request) - if err != nil { - return fmt.Errorf( - "Error creating access key for user %s: %s", - *request.UserName, - err, - ) - } - - d.SetId(*createResp.AccessKey.AccessKeyId) - - if createResp.AccessKey == nil || createResp.AccessKey.SecretAccessKey == nil { - return fmt.Errorf("CreateAccessKey response did not contain a Secret Access Key as expected") - } - - if v, ok := d.GetOk("pgp_key"); ok { - pgpKey := v.(string) - encryptionKey, err := encryption.RetrieveGPGKey(pgpKey) - if err != nil { - return err - } - fingerprint, encrypted, err := encryption.EncryptValue(encryptionKey, *createResp.AccessKey.SecretAccessKey, "IAM Access Key Secret") - if err != nil { - return err - } - - d.Set("key_fingerprint", fingerprint) - d.Set("encrypted_secret", encrypted) - } else { - if err := d.Set("secret", createResp.AccessKey.SecretAccessKey); err != nil { - return err - } - } - - sesSMTPPassword, err := sesSmtpPasswordFromSecretKey(createResp.AccessKey.SecretAccessKey) - if err != nil { - return fmt.Errorf("error getting SES SMTP Password from Secret Access Key: %s", err) - } - d.Set("ses_smtp_password", sesSMTPPassword) - - return resourceAwsIamAccessKeyReadResult(d, &iam.AccessKeyMetadata{ - AccessKeyId: createResp.AccessKey.AccessKeyId, - CreateDate: createResp.AccessKey.CreateDate, - Status: createResp.AccessKey.Status, - UserName: createResp.AccessKey.UserName, - }) -} - -func resourceAwsIamAccessKeyRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - request := &iam.ListAccessKeysInput{ - UserName: aws.String(d.Get("user").(string)), - } - - getResp, err := iamconn.ListAccessKeys(request) - if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { // XXX TEST ME - // the user does not exist, so the key can't exist. - d.SetId("") - return nil - } - return fmt.Errorf("Error reading IAM access key: %s", err) - } - - for _, key := range getResp.AccessKeyMetadata { - if key.AccessKeyId != nil && *key.AccessKeyId == d.Id() { - return resourceAwsIamAccessKeyReadResult(d, key) - } - } - - // Guess the key isn't around anymore. - d.SetId("") - return nil -} - -func resourceAwsIamAccessKeyReadResult(d *schema.ResourceData, key *iam.AccessKeyMetadata) error { - d.SetId(*key.AccessKeyId) - if err := d.Set("user", key.UserName); err != nil { - return err - } - if err := d.Set("status", key.Status); err != nil { - return err - } - return nil -} - -func resourceAwsIamAccessKeyDelete(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - request := &iam.DeleteAccessKeyInput{ - AccessKeyId: aws.String(d.Id()), - UserName: aws.String(d.Get("user").(string)), - } - - if _, err := iamconn.DeleteAccessKey(request); err != nil { - return fmt.Errorf("Error deleting access key %s: %s", d.Id(), err) - } - return nil -} - -func sesSmtpPasswordFromSecretKey(key *string) (string, error) { - if key == nil { - return "", nil - } - version := byte(0x02) - message := []byte("SendRawEmail") - hmacKey := []byte(*key) - h := hmac.New(sha256.New, hmacKey) - if _, err := h.Write(message); err != nil { - return "", err - } - rawSig := h.Sum(nil) - versionedSig := make([]byte, 0, len(rawSig)+1) - versionedSig = append(versionedSig, version) - versionedSig = append(versionedSig, rawSig...) - return base64.StdEncoding.EncodeToString(versionedSig), nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_alias.go deleted file mode 100644 index 717f8187e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_alias.go +++ /dev/null @@ -1,92 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamAccountAlias() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamAccountAliasCreate, - Read: resourceAwsIamAccountAliasRead, - Delete: resourceAwsIamAccountAliasDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "account_alias": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateAccountAlias, - }, - }, - } -} - -func resourceAwsIamAccountAliasCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - account_alias := d.Get("account_alias").(string) - - params := &iam.CreateAccountAliasInput{ - AccountAlias: aws.String(account_alias), - } - - _, err := conn.CreateAccountAlias(params) - - if err != nil { - return fmt.Errorf("Error creating account alias with name '%s': %s", account_alias, err) - } - - d.SetId(account_alias) - - return nil -} - -func resourceAwsIamAccountAliasRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - params := &iam.ListAccountAliasesInput{} - - resp, err := conn.ListAccountAliases(params) - - if err != nil { - return fmt.Errorf("Error listing account aliases: %s", err) - } - - if resp == nil || len(resp.AccountAliases) == 0 { - d.SetId("") - return nil - } - - account_alias := aws.StringValue(resp.AccountAliases[0]) - - d.SetId(account_alias) - d.Set("account_alias", account_alias) - - return nil -} - -func resourceAwsIamAccountAliasDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - account_alias := d.Get("account_alias").(string) - - params := &iam.DeleteAccountAliasInput{ - AccountAlias: aws.String(account_alias), - } - - _, err := conn.DeleteAccountAlias(params) - - if err != nil { - return fmt.Errorf("Error deleting account alias with name '%s': %s", account_alias, err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_password_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_password_policy.go deleted file mode 100644 index c3b63cc6a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_password_policy.go +++ /dev/null @@ -1,167 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" - - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamAccountPasswordPolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamAccountPasswordPolicyUpdate, - Read: resourceAwsIamAccountPasswordPolicyRead, - Update: resourceAwsIamAccountPasswordPolicyUpdate, - Delete: resourceAwsIamAccountPasswordPolicyDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "allow_users_to_change_password": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "expire_passwords": { - Type: schema.TypeBool, - Computed: true, - }, - "hard_expiry": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - "max_password_age": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - "minimum_password_length": { - Type: schema.TypeInt, - Optional: true, - Default: 6, - }, - "password_reuse_prevention": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - "require_lowercase_characters": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - "require_numbers": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - "require_symbols": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - "require_uppercase_characters": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - }, - } -} - -func resourceAwsIamAccountPasswordPolicyUpdate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - input := &iam.UpdateAccountPasswordPolicyInput{} - - if v, ok := d.GetOk("allow_users_to_change_password"); ok { - input.AllowUsersToChangePassword = aws.Bool(v.(bool)) - } - if v, ok := d.GetOk("hard_expiry"); ok { - input.HardExpiry = aws.Bool(v.(bool)) - } - if v, ok := d.GetOk("max_password_age"); ok { - input.MaxPasswordAge = aws.Int64(int64(v.(int))) - } - if v, ok := d.GetOk("minimum_password_length"); ok { - input.MinimumPasswordLength = aws.Int64(int64(v.(int))) - } - if v, ok := d.GetOk("password_reuse_prevention"); ok { - input.PasswordReusePrevention = aws.Int64(int64(v.(int))) - } - if v, ok := d.GetOk("require_lowercase_characters"); ok { - input.RequireLowercaseCharacters = aws.Bool(v.(bool)) - } - if v, ok := d.GetOk("require_numbers"); ok { - input.RequireNumbers = aws.Bool(v.(bool)) - } - if v, ok := d.GetOk("require_symbols"); ok { - input.RequireSymbols = aws.Bool(v.(bool)) - } - if v, ok := d.GetOk("require_uppercase_characters"); ok { - input.RequireUppercaseCharacters = aws.Bool(v.(bool)) - } - - log.Printf("[DEBUG] Updating IAM account password policy: %s", input) - _, err := iamconn.UpdateAccountPasswordPolicy(input) - if err != nil { - return fmt.Errorf("Error updating IAM Password Policy: %s", err) - } - log.Println("[DEBUG] IAM account password policy updated") - - d.SetId("iam-account-password-policy") - - return resourceAwsIamAccountPasswordPolicyRead(d, meta) -} - -func resourceAwsIamAccountPasswordPolicyRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - input := &iam.GetAccountPasswordPolicyInput{} - resp, err := iamconn.GetAccountPasswordPolicy(input) - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "NoSuchEntity" { - log.Printf("[WARN] IAM account password policy is gone (i.e. default)") - d.SetId("") - return nil - } - return fmt.Errorf("Error reading IAM account password policy: %s", err) - } - - log.Printf("[DEBUG] Received IAM account password policy: %s", resp) - - policy := resp.PasswordPolicy - - d.Set("allow_users_to_change_password", policy.AllowUsersToChangePassword) - d.Set("expire_passwords", policy.ExpirePasswords) - d.Set("hard_expiry", policy.HardExpiry) - d.Set("max_password_age", policy.MaxPasswordAge) - d.Set("minimum_password_length", policy.MinimumPasswordLength) - d.Set("password_reuse_prevention", policy.PasswordReusePrevention) - d.Set("require_lowercase_characters", policy.RequireLowercaseCharacters) - d.Set("require_numbers", policy.RequireNumbers) - d.Set("require_symbols", policy.RequireSymbols) - d.Set("require_uppercase_characters", policy.RequireUppercaseCharacters) - - return nil -} - -func resourceAwsIamAccountPasswordPolicyDelete(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - log.Println("[DEBUG] Deleting IAM account password policy") - input := &iam.DeleteAccountPasswordPolicyInput{} - if _, err := iamconn.DeleteAccountPasswordPolicy(input); err != nil { - return fmt.Errorf("Error deleting IAM Password Policy: %s", err) - } - log.Println("[DEBUG] Deleted IAM account password policy") - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group.go deleted file mode 100644 index 694a9aa0e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group.go +++ /dev/null @@ -1,141 +0,0 @@ -package aws - -import ( - "fmt" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" - - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamGroupCreate, - Read: resourceAwsIamGroupRead, - Update: resourceAwsIamGroupUpdate, - Delete: resourceAwsIamGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "unique_id": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateAwsIamGroupName, - }, - "path": { - Type: schema.TypeString, - Optional: true, - Default: "/", - }, - }, - } -} - -func resourceAwsIamGroupCreate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - name := d.Get("name").(string) - path := d.Get("path").(string) - - request := &iam.CreateGroupInput{ - Path: aws.String(path), - GroupName: aws.String(name), - } - - createResp, err := iamconn.CreateGroup(request) - if err != nil { - return fmt.Errorf("Error creating IAM Group %s: %s", name, err) - } - d.SetId(*createResp.Group.GroupName) - - return resourceAwsIamGroupReadResult(d, createResp.Group) -} - -func resourceAwsIamGroupRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - request := &iam.GetGroupInput{ - GroupName: aws.String(d.Id()), - } - - getResp, err := iamconn.GetGroup(request) - if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { - d.SetId("") - return nil - } - return fmt.Errorf("Error reading IAM Group %s: %s", d.Id(), err) - } - return resourceAwsIamGroupReadResult(d, getResp.Group) -} - -func resourceAwsIamGroupReadResult(d *schema.ResourceData, group *iam.Group) error { - if err := d.Set("name", group.GroupName); err != nil { - return err - } - if err := d.Set("arn", group.Arn); err != nil { - return err - } - if err := d.Set("path", group.Path); err != nil { - return err - } - if err := d.Set("unique_id", group.GroupId); err != nil { - return err - } - return nil -} - -func resourceAwsIamGroupUpdate(d *schema.ResourceData, meta interface{}) error { - if d.HasChange("name") || d.HasChange("path") { - iamconn := meta.(*AWSClient).iamconn - on, nn := d.GetChange("name") - _, np := d.GetChange("path") - - request := &iam.UpdateGroupInput{ - GroupName: aws.String(on.(string)), - NewGroupName: aws.String(nn.(string)), - NewPath: aws.String(np.(string)), - } - _, err := iamconn.UpdateGroup(request) - if err != nil { - return fmt.Errorf("Error updating IAM Group %s: %s", d.Id(), err) - } - return resourceAwsIamGroupRead(d, meta) - } - return nil -} - -func resourceAwsIamGroupDelete(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - request := &iam.DeleteGroupInput{ - GroupName: aws.String(d.Id()), - } - - if _, err := iamconn.DeleteGroup(request); err != nil { - return fmt.Errorf("Error deleting IAM Group %s: %s", d.Id(), err) - } - return nil -} - -func validateAwsIamGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z=,.@\-_+]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters, hyphens, underscores, commas, periods, @ symbols, plus and equals signs allowed in %q: %q", - k, value)) - } - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_membership.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_membership.go deleted file mode 100644 index 64af0bf48..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_membership.go +++ /dev/null @@ -1,166 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamGroupMembership() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamGroupMembershipCreate, - Read: resourceAwsIamGroupMembershipRead, - Update: resourceAwsIamGroupMembershipUpdate, - Delete: resourceAwsIamGroupMembershipDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "users": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "group": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsIamGroupMembershipCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - group := d.Get("group").(string) - userList := expandStringList(d.Get("users").(*schema.Set).List()) - - if err := addUsersToGroup(conn, userList, group); err != nil { - return err - } - - d.SetId(d.Get("name").(string)) - return resourceAwsIamGroupMembershipRead(d, meta) -} - -func resourceAwsIamGroupMembershipRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - group := d.Get("group").(string) - - var ul []string - var marker *string - for { - resp, err := conn.GetGroup(&iam.GetGroupInput{ - GroupName: aws.String(group), - Marker: marker, - }) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // aws specific error - if awsErr.Code() == "NoSuchEntity" { - // group not found - d.SetId("") - return nil - } - } - return err - } - - for _, u := range resp.Users { - ul = append(ul, *u.UserName) - } - - if !*resp.IsTruncated { - break - } - marker = resp.Marker - } - - if err := d.Set("users", ul); err != nil { - return fmt.Errorf("Error setting user list from IAM Group Membership (%s), error: %s", group, err) - } - - return nil -} - -func resourceAwsIamGroupMembershipUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - if d.HasChange("users") { - group := d.Get("group").(string) - - o, n := d.GetChange("users") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - remove := expandStringList(os.Difference(ns).List()) - add := expandStringList(ns.Difference(os).List()) - - if err := removeUsersFromGroup(conn, remove, group); err != nil { - return err - } - - if err := addUsersToGroup(conn, add, group); err != nil { - return err - } - } - - return resourceAwsIamGroupMembershipRead(d, meta) -} - -func resourceAwsIamGroupMembershipDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - userList := expandStringList(d.Get("users").(*schema.Set).List()) - group := d.Get("group").(string) - - err := removeUsersFromGroup(conn, userList, group) - return err -} - -func removeUsersFromGroup(conn *iam.IAM, users []*string, group string) error { - for _, u := range users { - _, err := conn.RemoveUserFromGroup(&iam.RemoveUserFromGroupInput{ - UserName: u, - GroupName: aws.String(group), - }) - - if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { - return nil - } - return err - } - } - return nil -} - -func addUsersToGroup(conn *iam.IAM, users []*string, group string) error { - for _, u := range users { - _, err := conn.AddUserToGroup(&iam.AddUserToGroupInput{ - UserName: u, - GroupName: aws.String(group), - }) - - if err != nil { - return err - } - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy.go deleted file mode 100644 index 4f00c273c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy.go +++ /dev/null @@ -1,139 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "net/url" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamGroupPolicy() *schema.Resource { - return &schema.Resource{ - // PutGroupPolicy API is idempotent, so these can be the same. - Create: resourceAwsIamGroupPolicyPut, - Update: resourceAwsIamGroupPolicyPut, - - Read: resourceAwsIamGroupPolicyRead, - Delete: resourceAwsIamGroupPolicyDelete, - - Schema: map[string]*schema.Schema{ - "policy": { - Type: schema.TypeString, - Required: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - }, - "group": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsIamGroupPolicyPut(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - request := &iam.PutGroupPolicyInput{ - GroupName: aws.String(d.Get("group").(string)), - PolicyDocument: aws.String(d.Get("policy").(string)), - } - - var policyName string - if v, ok := d.GetOk("name"); ok { - policyName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - policyName = resource.PrefixedUniqueId(v.(string)) - } else { - policyName = resource.UniqueId() - } - request.PolicyName = aws.String(policyName) - - if _, err := iamconn.PutGroupPolicy(request); err != nil { - return fmt.Errorf("Error putting IAM group policy %s: %s", *request.PolicyName, err) - } - - d.SetId(fmt.Sprintf("%s:%s", *request.GroupName, *request.PolicyName)) - return nil -} - -func resourceAwsIamGroupPolicyRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - group, name := resourceAwsIamGroupPolicyParseId(d.Id()) - - request := &iam.GetGroupPolicyInput{ - PolicyName: aws.String(name), - GroupName: aws.String(group), - } - - var err error - getResp, err := iamconn.GetGroupPolicy(request) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - log.Printf("[WARN] IAM Group Policy (%s) for %s not found, removing from state", name, group) - d.SetId("") - return nil - } - return fmt.Errorf("Error reading IAM policy %s from group %s: %s", name, group, err) - } - - if getResp.PolicyDocument == nil { - return fmt.Errorf("GetGroupPolicy returned a nil policy document") - } - - policy, err := url.QueryUnescape(*getResp.PolicyDocument) - if err != nil { - return err - } - - d.Set("group", group) - d.Set("name", name) - d.Set("policy", policy) - - return nil -} - -func resourceAwsIamGroupPolicyDelete(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - group, name := resourceAwsIamGroupPolicyParseId(d.Id()) - - request := &iam.DeleteGroupPolicyInput{ - PolicyName: aws.String(name), - GroupName: aws.String(group), - } - - if _, err := iamconn.DeleteGroupPolicy(request); err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return nil - } - return fmt.Errorf("Error deleting IAM group policy %s: %s", d.Id(), err) - } - return nil -} - -func resourceAwsIamGroupPolicyParseId(id string) (groupName, policyName string) { - parts := strings.SplitN(id, ":", 2) - groupName = parts[0] - policyName = parts[1] - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy_attachment.go deleted file mode 100644 index 84ab11d96..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy_attachment.go +++ /dev/null @@ -1,135 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamGroupPolicyAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamGroupPolicyAttachmentCreate, - Read: resourceAwsIamGroupPolicyAttachmentRead, - Delete: resourceAwsIamGroupPolicyAttachmentDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsIamGroupPolicyAttachmentImport, - }, - - Schema: map[string]*schema.Schema{ - "group": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "policy_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsIamGroupPolicyAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - group := d.Get("group").(string) - arn := d.Get("policy_arn").(string) - - err := attachPolicyToGroup(conn, group, arn) - if err != nil { - return fmt.Errorf("Error attaching policy %s to IAM group %s: %v", arn, group, err) - } - - d.SetId(resource.PrefixedUniqueId(fmt.Sprintf("%s-", group))) - return resourceAwsIamGroupPolicyAttachmentRead(d, meta) -} - -func resourceAwsIamGroupPolicyAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - group := d.Get("group").(string) - arn := d.Get("policy_arn").(string) - - _, err := conn.GetGroup(&iam.GetGroupInput{ - GroupName: aws.String(group), - }) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NoSuchEntity" { - log.Printf("[WARN] No such entity found for Policy Attachment (%s)", group) - d.SetId("") - return nil - } - } - return err - } - - attachedPolicies, err := conn.ListAttachedGroupPolicies(&iam.ListAttachedGroupPoliciesInput{ - GroupName: aws.String(group), - }) - if err != nil { - return err - } - - var policy string - for _, p := range attachedPolicies.AttachedPolicies { - if *p.PolicyArn == arn { - policy = *p.PolicyArn - } - } - - if policy == "" { - log.Printf("[WARN] No such policy found for Group Policy Attachment (%s)", group) - d.SetId("") - } - - return nil -} - -func resourceAwsIamGroupPolicyAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - group := d.Get("group").(string) - arn := d.Get("policy_arn").(string) - - err := detachPolicyFromGroup(conn, group, arn) - if err != nil { - return fmt.Errorf("Error removing policy %s from IAM Group %s: %v", arn, group, err) - } - return nil -} - -func resourceAwsIamGroupPolicyAttachmentImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.SplitN(d.Id(), "/", 2) - if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { - return nil, fmt.Errorf("unexpected format of ID (%q), expected /", d.Id()) - } - groupName := idParts[0] - policyARN := idParts[1] - d.Set("group", groupName) - d.Set("policy_arn", policyARN) - d.SetId(fmt.Sprintf("%s-%s", groupName, policyARN)) - return []*schema.ResourceData{d}, nil -} - -func attachPolicyToGroup(conn *iam.IAM, group string, arn string) error { - _, err := conn.AttachGroupPolicy(&iam.AttachGroupPolicyInput{ - GroupName: aws.String(group), - PolicyArn: aws.String(arn), - }) - return err -} - -func detachPolicyFromGroup(conn *iam.IAM, group string, arn string) error { - _, err := conn.DetachGroupPolicy(&iam.DetachGroupPolicyInput{ - GroupName: aws.String(group), - PolicyArn: aws.String(arn), - }) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go deleted file mode 100644 index a9f958e42..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go +++ /dev/null @@ -1,347 +0,0 @@ -package aws - -import ( - "fmt" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamInstanceProfile() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamInstanceProfileCreate, - Read: resourceAwsIamInstanceProfileRead, - Update: resourceAwsIamInstanceProfileUpdate, - Delete: resourceAwsIamInstanceProfileDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "create_date": { - Type: schema.TypeString, - Computed: true, - }, - - "unique_id": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8196-L8201 - value := v.(string) - if len(value) > 128 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 128 characters", k)) - } - if !regexp.MustCompile(`^[\w+=,.@-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must match [\\w+=,.@-]", k)) - } - return - }, - }, - - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8196-L8201 - value := v.(string) - if len(value) > 64 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 64 characters, name is limited to 128", k)) - } - if !regexp.MustCompile(`^[\w+=,.@-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must match [\\w+=,.@-]", k)) - } - return - }, - }, - - "path": { - Type: schema.TypeString, - Optional: true, - Default: "/", - ForceNew: true, - }, - - "roles": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ConflictsWith: []string{"role"}, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - Deprecated: "Use `role` instead. Only a single role can be passed to an IAM Instance Profile", - }, - - "role": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ConflictsWith: []string{"roles"}, - }, - }, - } -} - -func resourceAwsIamInstanceProfileCreate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - var name string - if v, ok := d.GetOk("name"); ok { - name = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - name = resource.PrefixedUniqueId(v.(string)) - } else { - name = resource.UniqueId() - } - - _, hasRoles := d.GetOk("roles") - _, hasRole := d.GetOk("role") - - if !hasRole && !hasRoles { - return fmt.Errorf("Either `role` or `roles` (deprecated) must be specified when creating an IAM Instance Profile") - } - - request := &iam.CreateInstanceProfileInput{ - InstanceProfileName: aws.String(name), - Path: aws.String(d.Get("path").(string)), - } - - var err error - response, err := iamconn.CreateInstanceProfile(request) - if err == nil { - err = instanceProfileReadResult(d, response.InstanceProfile) - } - if err != nil { - return fmt.Errorf("Error creating IAM instance profile %s: %s", name, err) - } - - waiterRequest := &iam.GetInstanceProfileInput{ - InstanceProfileName: aws.String(name), - } - // don't return until the IAM service reports that the instance profile is ready. - // this ensures that terraform resources which rely on the instance profile will 'see' - // that the instance profile exists. - err = iamconn.WaitUntilInstanceProfileExists(waiterRequest) - if err != nil { - return fmt.Errorf("Timed out while waiting for instance profile %s: %s", name, err) - } - - return resourceAwsIamInstanceProfileUpdate(d, meta) -} - -func instanceProfileAddRole(iamconn *iam.IAM, profileName, roleName string) error { - request := &iam.AddRoleToInstanceProfileInput{ - InstanceProfileName: aws.String(profileName), - RoleName: aws.String(roleName), - } - - err := resource.Retry(30*time.Second, func() *resource.RetryError { - var err error - _, err = iamconn.AddRoleToInstanceProfile(request) - // IAM unfortunately does not provide a better error code or message for eventual consistency - // InvalidParameterValue: Value (XXX) for parameter iamInstanceProfile.name is invalid. Invalid IAM Instance Profile name - // NoSuchEntity: The request was rejected because it referenced an entity that does not exist. The error message describes the entity. HTTP Status Code: 404 - if isAWSErr(err, "InvalidParameterValue", "Invalid IAM Instance Profile name") || isAWSErr(err, "NoSuchEntity", "The role with name") { - return resource.RetryableError(err) - } - if err != nil { - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error adding IAM Role %s to Instance Profile %s: %s", roleName, profileName, err) - } - - return err -} - -func instanceProfileRemoveRole(iamconn *iam.IAM, profileName, roleName string) error { - request := &iam.RemoveRoleFromInstanceProfileInput{ - InstanceProfileName: aws.String(profileName), - RoleName: aws.String(roleName), - } - - _, err := iamconn.RemoveRoleFromInstanceProfile(request) - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { - return nil - } - return err -} - -func instanceProfileSetRoles(d *schema.ResourceData, iamconn *iam.IAM) error { - oldInterface, newInterface := d.GetChange("roles") - oldRoles := oldInterface.(*schema.Set) - newRoles := newInterface.(*schema.Set) - - currentRoles := schema.CopySet(oldRoles) - - d.Partial(true) - - for _, role := range oldRoles.Difference(newRoles).List() { - err := instanceProfileRemoveRole(iamconn, d.Id(), role.(string)) - if err != nil { - return fmt.Errorf("Error removing role %s from IAM instance profile %s: %s", role, d.Id(), err) - } - currentRoles.Remove(role) - d.Set("roles", currentRoles) - d.SetPartial("roles") - } - - for _, role := range newRoles.Difference(oldRoles).List() { - err := instanceProfileAddRole(iamconn, d.Id(), role.(string)) - if err != nil { - return fmt.Errorf("Error adding role %s to IAM instance profile %s: %s", role, d.Id(), err) - } - currentRoles.Add(role) - d.Set("roles", currentRoles) - d.SetPartial("roles") - } - - d.Partial(false) - - return nil -} - -func instanceProfileRemoveAllRoles(d *schema.ResourceData, iamconn *iam.IAM) error { - role, hasRole := d.GetOk("role") - roles, hasRoles := d.GetOk("roles") - if hasRole && !hasRoles { // "roles" will always be a superset of "role", if set - err := instanceProfileRemoveRole(iamconn, d.Id(), role.(string)) - if err != nil { - return fmt.Errorf("Error removing role %s from IAM instance profile %s: %s", role, d.Id(), err) - } - } else { - for _, role := range roles.(*schema.Set).List() { - err := instanceProfileRemoveRole(iamconn, d.Id(), role.(string)) - if err != nil { - return fmt.Errorf("Error removing role %s from IAM instance profile %s: %s", role, d.Id(), err) - } - } - } - return nil -} - -func resourceAwsIamInstanceProfileUpdate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - d.Partial(true) - - if d.HasChange("role") { - oldRole, newRole := d.GetChange("role") - - if oldRole.(string) != "" { - err := instanceProfileRemoveRole(iamconn, d.Id(), oldRole.(string)) - if err != nil { - return fmt.Errorf("Error adding role %s to IAM instance profile %s: %s", oldRole.(string), d.Id(), err) - } - } - - if newRole.(string) != "" { - err := instanceProfileAddRole(iamconn, d.Id(), newRole.(string)) - if err != nil { - return fmt.Errorf("Error adding role %s to IAM instance profile %s: %s", newRole.(string), d.Id(), err) - } - } - - d.SetPartial("role") - } - - if d.HasChange("roles") { - return instanceProfileSetRoles(d, iamconn) - } - - d.Partial(false) - - return nil -} - -func resourceAwsIamInstanceProfileRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - request := &iam.GetInstanceProfileInput{ - InstanceProfileName: aws.String(d.Id()), - } - - result, err := iamconn.GetInstanceProfile(request) - if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { - d.SetId("") - return nil - } - return fmt.Errorf("Error reading IAM instance profile %s: %s", d.Id(), err) - } - - return instanceProfileReadResult(d, result.InstanceProfile) -} - -func resourceAwsIamInstanceProfileDelete(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - if err := instanceProfileRemoveAllRoles(d, iamconn); err != nil { - return err - } - - request := &iam.DeleteInstanceProfileInput{ - InstanceProfileName: aws.String(d.Id()), - } - _, err := iamconn.DeleteInstanceProfile(request) - if err != nil { - return fmt.Errorf("Error deleting IAM instance profile %s: %s", d.Id(), err) - } - - return nil -} - -func instanceProfileReadResult(d *schema.ResourceData, result *iam.InstanceProfile) error { - d.SetId(*result.InstanceProfileName) - if err := d.Set("name", result.InstanceProfileName); err != nil { - return err - } - if err := d.Set("arn", result.Arn); err != nil { - return err - } - if err := d.Set("create_date", result.CreateDate.Format(time.RFC3339)); err != nil { - return err - } - if err := d.Set("path", result.Path); err != nil { - return err - } - d.Set("unique_id", result.InstanceProfileId) - - if result.Roles != nil && len(result.Roles) > 0 { - d.Set("role", result.Roles[0].RoleName) //there will only be 1 role returned - } - - roles := &schema.Set{F: schema.HashString} - for _, role := range result.Roles { - roles.Add(*role.RoleName) - } - err := d.Set("roles", roles) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_openid_connect_provider.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_openid_connect_provider.go deleted file mode 100644 index bf7b82327..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_openid_connect_provider.go +++ /dev/null @@ -1,141 +0,0 @@ -package aws - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" - - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamOpenIDConnectProvider() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamOpenIDConnectProviderCreate, - Read: resourceAwsIamOpenIDConnectProviderRead, - Update: resourceAwsIamOpenIDConnectProviderUpdate, - Delete: resourceAwsIamOpenIDConnectProviderDelete, - Exists: resourceAwsIamOpenIDConnectProviderExists, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "url": { - Type: schema.TypeString, - Computed: false, - Required: true, - ForceNew: true, - ValidateFunc: validateOpenIdURL, - DiffSuppressFunc: suppressOpenIdURL, - }, - "client_id_list": { - Elem: &schema.Schema{Type: schema.TypeString}, - Type: schema.TypeList, - Required: true, - ForceNew: true, - }, - "thumbprint_list": { - Elem: &schema.Schema{Type: schema.TypeString}, - Type: schema.TypeList, - Required: true, - }, - }, - } -} - -func resourceAwsIamOpenIDConnectProviderCreate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - input := &iam.CreateOpenIDConnectProviderInput{ - Url: aws.String(d.Get("url").(string)), - ClientIDList: expandStringList(d.Get("client_id_list").([]interface{})), - ThumbprintList: expandStringList(d.Get("thumbprint_list").([]interface{})), - } - - out, err := iamconn.CreateOpenIDConnectProvider(input) - if err != nil { - return err - } - - d.SetId(*out.OpenIDConnectProviderArn) - - return resourceAwsIamOpenIDConnectProviderRead(d, meta) -} - -func resourceAwsIamOpenIDConnectProviderRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - input := &iam.GetOpenIDConnectProviderInput{ - OpenIDConnectProviderArn: aws.String(d.Id()), - } - out, err := iamconn.GetOpenIDConnectProvider(input) - if err != nil { - return err - } - - d.Set("arn", d.Id()) - d.Set("url", out.Url) - d.Set("client_id_list", flattenStringList(out.ClientIDList)) - d.Set("thumbprint_list", flattenStringList(out.ThumbprintList)) - - return nil -} - -func resourceAwsIamOpenIDConnectProviderUpdate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - if d.HasChange("thumbprint_list") { - input := &iam.UpdateOpenIDConnectProviderThumbprintInput{ - OpenIDConnectProviderArn: aws.String(d.Id()), - ThumbprintList: expandStringList(d.Get("thumbprint_list").([]interface{})), - } - - _, err := iamconn.UpdateOpenIDConnectProviderThumbprint(input) - if err != nil { - return err - } - } - - return resourceAwsIamOpenIDConnectProviderRead(d, meta) -} - -func resourceAwsIamOpenIDConnectProviderDelete(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - input := &iam.DeleteOpenIDConnectProviderInput{ - OpenIDConnectProviderArn: aws.String(d.Id()), - } - _, err := iamconn.DeleteOpenIDConnectProvider(input) - - if err != nil { - if err, ok := err.(awserr.Error); ok && err.Code() == "NoSuchEntity" { - return nil - } - return fmt.Errorf("Error deleting platform application %s", err) - } - - return nil -} - -func resourceAwsIamOpenIDConnectProviderExists(d *schema.ResourceData, meta interface{}) (bool, error) { - iamconn := meta.(*AWSClient).iamconn - - input := &iam.GetOpenIDConnectProviderInput{ - OpenIDConnectProviderArn: aws.String(d.Id()), - } - _, err := iamconn.GetOpenIDConnectProvider(input) - if err != nil { - if err, ok := err.(awserr.Error); ok && err.Code() == "NoSuchEntity" { - return false, nil - } - return true, err - } - - return true, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go deleted file mode 100644 index c6b153c80..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go +++ /dev/null @@ -1,329 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "net/url" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamPolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamPolicyCreate, - Read: resourceAwsIamPolicyRead, - Update: resourceAwsIamPolicyUpdate, - Delete: resourceAwsIamPolicyDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "description": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - }, - "path": { - Type: schema.TypeString, - Optional: true, - Default: "/", - ForceNew: true, - }, - "policy": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateIAMPolicyJson, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8329-L8334 - value := v.(string) - if len(value) > 128 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 128 characters", k)) - } - if !regexp.MustCompile(`^[\w+=,.@-]*$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must match [\\w+=,.@-]", k)) - } - return - }, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8329-L8334 - value := v.(string) - if len(value) > 96 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 96 characters, name is limited to 128", k)) - } - if !regexp.MustCompile(`^[\w+=,.@-]*$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must match [\\w+=,.@-]", k)) - } - return - }, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsIamPolicyCreate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - var name string - if v, ok := d.GetOk("name"); ok { - name = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - name = resource.PrefixedUniqueId(v.(string)) - } else { - name = resource.UniqueId() - } - - request := &iam.CreatePolicyInput{ - Description: aws.String(d.Get("description").(string)), - Path: aws.String(d.Get("path").(string)), - PolicyDocument: aws.String(d.Get("policy").(string)), - PolicyName: aws.String(name), - } - - response, err := iamconn.CreatePolicy(request) - if err != nil { - return fmt.Errorf("Error creating IAM policy %s: %s", name, err) - } - - d.SetId(*response.Policy.Arn) - - return resourceAwsIamPolicyRead(d, meta) -} - -func resourceAwsIamPolicyRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - getPolicyRequest := &iam.GetPolicyInput{ - PolicyArn: aws.String(d.Id()), - } - log.Printf("[DEBUG] Getting IAM Policy: %s", getPolicyRequest) - - // Handle IAM eventual consistency - var getPolicyResponse *iam.GetPolicyOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - getPolicyResponse, err = iamconn.GetPolicy(getPolicyRequest) - - if d.IsNewResource() && isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - log.Printf("[WARN] IAM Policy (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("Error reading IAM policy %s: %s", d.Id(), err) - } - - if getPolicyResponse == nil || getPolicyResponse.Policy == nil { - log.Printf("[WARN] IAM Policy (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("arn", getPolicyResponse.Policy.Arn) - d.Set("description", getPolicyResponse.Policy.Description) - d.Set("name", getPolicyResponse.Policy.PolicyName) - d.Set("path", getPolicyResponse.Policy.Path) - - // Retrieve policy - - getPolicyVersionRequest := &iam.GetPolicyVersionInput{ - PolicyArn: aws.String(d.Id()), - VersionId: getPolicyResponse.Policy.DefaultVersionId, - } - log.Printf("[DEBUG] Getting IAM Policy Version: %s", getPolicyVersionRequest) - - // Handle IAM eventual consistency - var getPolicyVersionResponse *iam.GetPolicyVersionOutput - err = resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - getPolicyVersionResponse, err = iamconn.GetPolicyVersion(getPolicyVersionRequest) - - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - log.Printf("[WARN] IAM Policy (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("Error reading IAM policy version %s: %s", d.Id(), err) - } - - policy := "" - if getPolicyVersionResponse != nil && getPolicyVersionResponse.PolicyVersion != nil { - var err error - policy, err = url.QueryUnescape(aws.StringValue(getPolicyVersionResponse.PolicyVersion.Document)) - if err != nil { - return fmt.Errorf("error parsing policy: %s", err) - } - } - - d.Set("policy", policy) - - return nil -} - -func resourceAwsIamPolicyUpdate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - if err := iamPolicyPruneVersions(d.Id(), iamconn); err != nil { - return err - } - - request := &iam.CreatePolicyVersionInput{ - PolicyArn: aws.String(d.Id()), - PolicyDocument: aws.String(d.Get("policy").(string)), - SetAsDefault: aws.Bool(true), - } - - if _, err := iamconn.CreatePolicyVersion(request); err != nil { - return fmt.Errorf("Error updating IAM policy %s: %s", d.Id(), err) - } - - return resourceAwsIamPolicyRead(d, meta) -} - -func resourceAwsIamPolicyDelete(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - if err := iamPolicyDeleteNondefaultVersions(d.Id(), iamconn); err != nil { - return err - } - - request := &iam.DeletePolicyInput{ - PolicyArn: aws.String(d.Id()), - } - - if _, err := iamconn.DeletePolicy(request); err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return nil - } - return fmt.Errorf("Error deleting IAM policy %s: %s", d.Id(), err) - } - - return nil -} - -// iamPolicyPruneVersions deletes the oldest versions. -// -// Old versions are deleted until there are 4 or less remaining, which means at -// least one more can be created before hitting the maximum of 5. -// -// The default version is never deleted. - -func iamPolicyPruneVersions(arn string, iamconn *iam.IAM) error { - versions, err := iamPolicyListVersions(arn, iamconn) - if err != nil { - return err - } - if len(versions) < 5 { - return nil - } - - var oldestVersion *iam.PolicyVersion - - for _, version := range versions { - if *version.IsDefaultVersion { - continue - } - if oldestVersion == nil || - version.CreateDate.Before(*oldestVersion.CreateDate) { - oldestVersion = version - } - } - - err1 := iamPolicyDeleteVersion(arn, *oldestVersion.VersionId, iamconn) - return err1 -} - -func iamPolicyDeleteNondefaultVersions(arn string, iamconn *iam.IAM) error { - versions, err := iamPolicyListVersions(arn, iamconn) - if err != nil { - return err - } - - for _, version := range versions { - if *version.IsDefaultVersion { - continue - } - if err := iamPolicyDeleteVersion(arn, *version.VersionId, iamconn); err != nil { - return err - } - } - - return nil -} - -func iamPolicyDeleteVersion(arn, versionID string, iamconn *iam.IAM) error { - request := &iam.DeletePolicyVersionInput{ - PolicyArn: aws.String(arn), - VersionId: aws.String(versionID), - } - - _, err := iamconn.DeletePolicyVersion(request) - if err != nil { - return fmt.Errorf("Error deleting version %s from IAM policy %s: %s", versionID, arn, err) - } - return nil -} - -func iamPolicyListVersions(arn string, iamconn *iam.IAM) ([]*iam.PolicyVersion, error) { - request := &iam.ListPolicyVersionsInput{ - PolicyArn: aws.String(arn), - } - - response, err := iamconn.ListPolicyVersions(request) - if err != nil { - return nil, fmt.Errorf("Error listing versions for IAM policy %s: %s", arn, err) - } - return response.Versions, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy_attachment.go deleted file mode 100644 index 5cf0b47b8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy_attachment.go +++ /dev/null @@ -1,368 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsIamPolicyAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamPolicyAttachmentCreate, - Read: resourceAwsIamPolicyAttachmentRead, - Update: resourceAwsIamPolicyAttachmentUpdate, - Delete: resourceAwsIamPolicyAttachmentDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - "users": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "roles": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "groups": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "policy_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsIamPolicyAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - name := d.Get("name").(string) - arn := d.Get("policy_arn").(string) - users := expandStringList(d.Get("users").(*schema.Set).List()) - roles := expandStringList(d.Get("roles").(*schema.Set).List()) - groups := expandStringList(d.Get("groups").(*schema.Set).List()) - - if len(users) == 0 && len(roles) == 0 && len(groups) == 0 { - return fmt.Errorf("No Users, Roles, or Groups specified for IAM Policy Attachment %s", name) - } else { - var userErr, roleErr, groupErr error - if users != nil { - userErr = attachPolicyToUsers(conn, users, arn) - } - if roles != nil { - roleErr = attachPolicyToRoles(conn, roles, arn) - } - if groups != nil { - groupErr = attachPolicyToGroups(conn, groups, arn) - } - if userErr != nil || roleErr != nil || groupErr != nil { - return composeErrors(fmt.Sprint("[WARN] Error attaching policy with IAM Policy Attachment ", name, ":"), userErr, roleErr, groupErr) - } - } - d.SetId(d.Get("name").(string)) - return resourceAwsIamPolicyAttachmentRead(d, meta) -} - -func resourceAwsIamPolicyAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - arn := d.Get("policy_arn").(string) - name := d.Get("name").(string) - - _, err := conn.GetPolicy(&iam.GetPolicyInput{ - PolicyArn: aws.String(arn), - }) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NoSuchEntity" { - log.Printf("[WARN] No such entity found for Policy Attachment (%s)", d.Id()) - d.SetId("") - return nil - } - } - return err - } - - ul := make([]string, 0) - rl := make([]string, 0) - gl := make([]string, 0) - - args := iam.ListEntitiesForPolicyInput{ - PolicyArn: aws.String(arn), - } - err = conn.ListEntitiesForPolicyPages(&args, func(page *iam.ListEntitiesForPolicyOutput, lastPage bool) bool { - for _, u := range page.PolicyUsers { - ul = append(ul, *u.UserName) - } - - for _, r := range page.PolicyRoles { - rl = append(rl, *r.RoleName) - } - - for _, g := range page.PolicyGroups { - gl = append(gl, *g.GroupName) - } - return true - }) - if err != nil { - return err - } - - userErr := d.Set("users", ul) - roleErr := d.Set("roles", rl) - groupErr := d.Set("groups", gl) - - if userErr != nil || roleErr != nil || groupErr != nil { - return composeErrors(fmt.Sprint("[WARN} Error setting user, role, or group list from IAM Policy Attachment ", name, ":"), userErr, roleErr, groupErr) - } - - return nil -} -func resourceAwsIamPolicyAttachmentUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - name := d.Get("name").(string) - var userErr, roleErr, groupErr error - - if d.HasChange("users") { - userErr = updateUsers(conn, d) - } - if d.HasChange("roles") { - roleErr = updateRoles(conn, d) - } - if d.HasChange("groups") { - groupErr = updateGroups(conn, d) - } - if userErr != nil || roleErr != nil || groupErr != nil { - return composeErrors(fmt.Sprint("[WARN] Error updating user, role, or group list from IAM Policy Attachment ", name, ":"), userErr, roleErr, groupErr) - } - return resourceAwsIamPolicyAttachmentRead(d, meta) -} - -func resourceAwsIamPolicyAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - name := d.Get("name").(string) - arn := d.Get("policy_arn").(string) - users := expandStringList(d.Get("users").(*schema.Set).List()) - roles := expandStringList(d.Get("roles").(*schema.Set).List()) - groups := expandStringList(d.Get("groups").(*schema.Set).List()) - - var userErr, roleErr, groupErr error - if len(users) != 0 { - userErr = detachPolicyFromUsers(conn, users, arn) - } - if len(roles) != 0 { - roleErr = detachPolicyFromRoles(conn, roles, arn) - } - if len(groups) != 0 { - groupErr = detachPolicyFromGroups(conn, groups, arn) - } - if userErr != nil || roleErr != nil || groupErr != nil { - return composeErrors(fmt.Sprint("[WARN] Error removing user, role, or group list from IAM Policy Detach ", name, ":"), userErr, roleErr, groupErr) - } - return nil -} - -func composeErrors(desc string, uErr error, rErr error, gErr error) error { - errMsg := fmt.Sprint(desc) - errs := []error{uErr, rErr, gErr} - for _, e := range errs { - if e != nil { - errMsg = errMsg + "\n– " + e.Error() - } - } - return fmt.Errorf(errMsg) -} - -func attachPolicyToUsers(conn *iam.IAM, users []*string, arn string) error { - for _, u := range users { - _, err := conn.AttachUserPolicy(&iam.AttachUserPolicyInput{ - UserName: u, - PolicyArn: aws.String(arn), - }) - if err != nil { - return err - } - } - return nil -} -func attachPolicyToRoles(conn *iam.IAM, roles []*string, arn string) error { - for _, r := range roles { - _, err := conn.AttachRolePolicy(&iam.AttachRolePolicyInput{ - RoleName: r, - PolicyArn: aws.String(arn), - }) - if err != nil { - return err - } - - var attachmentErr = resource.Retry(2*time.Minute, func() *resource.RetryError { - - input := iam.ListRolePoliciesInput{ - RoleName: r, - } - - attachedPolicies, err := conn.ListRolePolicies(&input) - if err != nil { - return resource.NonRetryableError(err) - } - - if len(attachedPolicies.PolicyNames) > 0 { - var foundPolicy bool - for _, policyName := range attachedPolicies.PolicyNames { - if strings.HasSuffix(arn, *policyName) { - foundPolicy = true - break - } - } - - if !foundPolicy { - return resource.NonRetryableError(err) - } - } - - return nil - }) - - if attachmentErr != nil { - return attachmentErr - } - } - return nil -} -func attachPolicyToGroups(conn *iam.IAM, groups []*string, arn string) error { - for _, g := range groups { - _, err := conn.AttachGroupPolicy(&iam.AttachGroupPolicyInput{ - GroupName: g, - PolicyArn: aws.String(arn), - }) - if err != nil { - return err - } - } - return nil -} -func updateUsers(conn *iam.IAM, d *schema.ResourceData) error { - arn := d.Get("policy_arn").(string) - o, n := d.GetChange("users") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - os := o.(*schema.Set) - ns := n.(*schema.Set) - remove := expandStringList(os.Difference(ns).List()) - add := expandStringList(ns.Difference(os).List()) - - if rErr := detachPolicyFromUsers(conn, remove, arn); rErr != nil { - return rErr - } - if aErr := attachPolicyToUsers(conn, add, arn); aErr != nil { - return aErr - } - return nil -} -func updateRoles(conn *iam.IAM, d *schema.ResourceData) error { - arn := d.Get("policy_arn").(string) - o, n := d.GetChange("roles") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - os := o.(*schema.Set) - ns := n.(*schema.Set) - remove := expandStringList(os.Difference(ns).List()) - add := expandStringList(ns.Difference(os).List()) - - if rErr := detachPolicyFromRoles(conn, remove, arn); rErr != nil { - return rErr - } - if aErr := attachPolicyToRoles(conn, add, arn); aErr != nil { - return aErr - } - return nil -} -func updateGroups(conn *iam.IAM, d *schema.ResourceData) error { - arn := d.Get("policy_arn").(string) - o, n := d.GetChange("groups") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - os := o.(*schema.Set) - ns := n.(*schema.Set) - remove := expandStringList(os.Difference(ns).List()) - add := expandStringList(ns.Difference(os).List()) - - if rErr := detachPolicyFromGroups(conn, remove, arn); rErr != nil { - return rErr - } - if aErr := attachPolicyToGroups(conn, add, arn); aErr != nil { - return aErr - } - return nil - -} -func detachPolicyFromUsers(conn *iam.IAM, users []*string, arn string) error { - for _, u := range users { - _, err := conn.DetachUserPolicy(&iam.DetachUserPolicyInput{ - UserName: u, - PolicyArn: aws.String(arn), - }) - if err != nil { - return err - } - } - return nil -} -func detachPolicyFromRoles(conn *iam.IAM, roles []*string, arn string) error { - for _, r := range roles { - _, err := conn.DetachRolePolicy(&iam.DetachRolePolicyInput{ - RoleName: r, - PolicyArn: aws.String(arn), - }) - if err != nil { - return err - } - } - return nil -} -func detachPolicyFromGroups(conn *iam.IAM, groups []*string, arn string) error { - for _, g := range groups { - _, err := conn.DetachGroupPolicy(&iam.DetachGroupPolicyInput{ - GroupName: g, - PolicyArn: aws.String(arn), - }) - if err != nil { - return err - } - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go deleted file mode 100644 index 2b68cf41b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go +++ /dev/null @@ -1,471 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "net/url" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsIamRole() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamRoleCreate, - Read: resourceAwsIamRoleRead, - Update: resourceAwsIamRoleUpdate, - Delete: resourceAwsIamRoleDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsIamRoleImport, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "unique_id": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8329-L8334 - value := v.(string) - if len(value) > 64 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 64 characters", k)) - } - if !regexp.MustCompile(`^[\w+=,.@-]*$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must match [\\w+=,.@-]", k)) - } - return - }, - }, - - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8329-L8334 - value := v.(string) - if len(value) > 32 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 32 characters, name is limited to 64", k)) - } - if !regexp.MustCompile(`^[\w+=,.@-]*$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must match [\\w+=,.@-]", k)) - } - return - }, - }, - - "path": { - Type: schema.TypeString, - Optional: true, - Default: "/", - ForceNew: true, - }, - - "permissions_boundary": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 2048), - }, - - "description": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateIamRoleDescription, - }, - - "assume_role_policy": { - Type: schema.TypeString, - Required: true, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - ValidateFunc: validation.ValidateJsonString, - }, - - "force_detach_policies": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "create_date": { - Type: schema.TypeString, - Computed: true, - }, - - "max_session_duration": { - Type: schema.TypeInt, - Optional: true, - Default: 3600, - ValidateFunc: validation.IntBetween(3600, 43200), - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsIamRoleImport( - d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("force_detach_policies", false) - return []*schema.ResourceData{d}, nil -} - -func resourceAwsIamRoleCreate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - var name string - if v, ok := d.GetOk("name"); ok { - name = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - name = resource.PrefixedUniqueId(v.(string)) - } else { - name = resource.UniqueId() - } - - request := &iam.CreateRoleInput{ - Path: aws.String(d.Get("path").(string)), - RoleName: aws.String(name), - AssumeRolePolicyDocument: aws.String(d.Get("assume_role_policy").(string)), - } - - if v, ok := d.GetOk("description"); ok { - request.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("max_session_duration"); ok { - request.MaxSessionDuration = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("permissions_boundary"); ok { - request.PermissionsBoundary = aws.String(v.(string)) - } - - if v, ok := d.GetOk("tags"); ok { - request.Tags = tagsFromMapIAM(v.(map[string]interface{})) - } - - var createResp *iam.CreateRoleOutput - err := resource.Retry(30*time.Second, func() *resource.RetryError { - var err error - createResp, err = iamconn.CreateRole(request) - // IAM users (referenced in Principal field of assume policy) - // can take ~30 seconds to propagate in AWS - if isAWSErr(err, "MalformedPolicyDocument", "Invalid principal in policy") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - }) - if err != nil { - return fmt.Errorf("Error creating IAM Role %s: %s", name, err) - } - d.SetId(*createResp.Role.RoleName) - return resourceAwsIamRoleRead(d, meta) -} - -func resourceAwsIamRoleRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - request := &iam.GetRoleInput{ - RoleName: aws.String(d.Id()), - } - - getResp, err := iamconn.GetRole(request) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - log.Printf("[WARN] IAM Role %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error reading IAM Role %s: %s", d.Id(), err) - } - - if getResp == nil || getResp.Role == nil { - log.Printf("[WARN] IAM Role %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - role := getResp.Role - - d.Set("arn", role.Arn) - if err := d.Set("create_date", role.CreateDate.Format(time.RFC3339)); err != nil { - return err - } - d.Set("description", role.Description) - d.Set("max_session_duration", role.MaxSessionDuration) - d.Set("name", role.RoleName) - d.Set("path", role.Path) - if role.PermissionsBoundary != nil { - d.Set("permissions_boundary", role.PermissionsBoundary.PermissionsBoundaryArn) - } - d.Set("unique_id", role.RoleId) - if err := d.Set("tags", tagsToMapIAM(role.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - assumRolePolicy, err := url.QueryUnescape(*role.AssumeRolePolicyDocument) - if err != nil { - return err - } - if err := d.Set("assume_role_policy", assumRolePolicy); err != nil { - return err - } - return nil -} - -func resourceAwsIamRoleUpdate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - if d.HasChange("assume_role_policy") { - assumeRolePolicyInput := &iam.UpdateAssumeRolePolicyInput{ - RoleName: aws.String(d.Id()), - PolicyDocument: aws.String(d.Get("assume_role_policy").(string)), - } - _, err := iamconn.UpdateAssumeRolePolicy(assumeRolePolicyInput) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - d.SetId("") - return nil - } - return fmt.Errorf("Error Updating IAM Role (%s) Assume Role Policy: %s", d.Id(), err) - } - } - - if d.HasChange("description") { - roleDescriptionInput := &iam.UpdateRoleDescriptionInput{ - RoleName: aws.String(d.Id()), - Description: aws.String(d.Get("description").(string)), - } - _, err := iamconn.UpdateRoleDescription(roleDescriptionInput) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - d.SetId("") - return nil - } - return fmt.Errorf("Error Updating IAM Role (%s) Assume Role Policy: %s", d.Id(), err) - } - } - - if d.HasChange("max_session_duration") { - roleMaxDurationInput := &iam.UpdateRoleInput{ - RoleName: aws.String(d.Id()), - MaxSessionDuration: aws.Int64(int64(d.Get("max_session_duration").(int))), - } - _, err := iamconn.UpdateRole(roleMaxDurationInput) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - d.SetId("") - return nil - } - return fmt.Errorf("Error Updating IAM Role (%s) Max Session Duration: %s", d.Id(), err) - } - } - - if d.HasChange("permissions_boundary") { - permissionsBoundary := d.Get("permissions_boundary").(string) - if permissionsBoundary != "" { - input := &iam.PutRolePermissionsBoundaryInput{ - PermissionsBoundary: aws.String(permissionsBoundary), - RoleName: aws.String(d.Id()), - } - _, err := iamconn.PutRolePermissionsBoundary(input) - if err != nil { - return fmt.Errorf("error updating IAM Role permissions boundary: %s", err) - } - } else { - input := &iam.DeleteRolePermissionsBoundaryInput{ - RoleName: aws.String(d.Id()), - } - _, err := iamconn.DeleteRolePermissionsBoundary(input) - if err != nil { - return fmt.Errorf("error deleting IAM Role permissions boundary: %s", err) - } - } - } - - if d.HasChange("tags") { - // Reset all tags to empty set - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - c, r := diffTagsIAM(tagsFromMapIAM(o), tagsFromMapIAM(n)) - - if len(r) > 0 { - _, err := iamconn.UntagRole(&iam.UntagRoleInput{ - RoleName: aws.String(d.Id()), - TagKeys: tagKeysIam(r), - }) - if err != nil { - return fmt.Errorf("error deleting IAM role tags: %s", err) - } - } - - if len(c) > 0 { - input := &iam.TagRoleInput{ - RoleName: aws.String(d.Id()), - Tags: c, - } - _, err := iamconn.TagRole(input) - if err != nil { - return fmt.Errorf("error update IAM role tags: %s", err) - } - } - } - - return resourceAwsIamRoleRead(d, meta) -} - -func resourceAwsIamRoleDelete(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - // Roles cannot be destroyed when attached to an existing Instance Profile - if err := deleteAwsIamRoleInstanceProfiles(iamconn, d.Id()); err != nil { - return fmt.Errorf("error deleting IAM Role (%s) instance profiles: %s", d.Id(), err) - } - - if d.Get("force_detach_policies").(bool) { - // For managed policies - if err := deleteAwsIamRolePolicyAttachments(iamconn, d.Id()); err != nil { - return fmt.Errorf("error deleting IAM Role (%s) policy attachments: %s", d.Id(), err) - } - - // For inline policies - if err := deleteAwsIamRolePolicies(iamconn, d.Id()); err != nil { - return fmt.Errorf("error deleting IAM Role (%s) policies: %s", d.Id(), err) - } - } - - deleteRoleInput := &iam.DeleteRoleInput{ - RoleName: aws.String(d.Id()), - } - - // IAM is eventually consistent and deletion of attached policies may take time - return resource.Retry(30*time.Second, func() *resource.RetryError { - _, err := iamconn.DeleteRole(deleteRoleInput) - if err != nil { - if isAWSErr(err, iam.ErrCodeDeleteConflictException, "") { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(fmt.Errorf("Error deleting IAM Role %s: %s", d.Id(), err)) - } - return nil - }) -} - -func deleteAwsIamRoleInstanceProfiles(conn *iam.IAM, rolename string) error { - resp, err := conn.ListInstanceProfilesForRole(&iam.ListInstanceProfilesForRoleInput{ - RoleName: aws.String(rolename), - }) - if err != nil { - return fmt.Errorf("Error listing Profiles for IAM Role (%s) when trying to delete: %s", rolename, err) - } - - // Loop and remove this Role from any Profiles - for _, i := range resp.InstanceProfiles { - input := &iam.RemoveRoleFromInstanceProfileInput{ - InstanceProfileName: i.InstanceProfileName, - RoleName: aws.String(rolename), - } - - _, err := conn.RemoveRoleFromInstanceProfile(input) - - if err != nil { - return fmt.Errorf("Error deleting IAM Role %s: %s", rolename, err) - } - } - - return nil -} - -func deleteAwsIamRolePolicyAttachments(conn *iam.IAM, rolename string) error { - managedPolicies := make([]*string, 0) - input := &iam.ListAttachedRolePoliciesInput{ - RoleName: aws.String(rolename), - } - - err := conn.ListAttachedRolePoliciesPages(input, func(page *iam.ListAttachedRolePoliciesOutput, lastPage bool) bool { - for _, v := range page.AttachedPolicies { - managedPolicies = append(managedPolicies, v.PolicyArn) - } - return !lastPage - }) - if err != nil { - return fmt.Errorf("Error listing Policies for IAM Role (%s) when trying to delete: %s", rolename, err) - } - for _, parn := range managedPolicies { - input := &iam.DetachRolePolicyInput{ - PolicyArn: parn, - RoleName: aws.String(rolename), - } - - _, err = conn.DetachRolePolicy(input) - - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - continue - } - - if err != nil { - return fmt.Errorf("Error deleting IAM Role %s: %s", rolename, err) - } - } - - return nil -} - -func deleteAwsIamRolePolicies(conn *iam.IAM, rolename string) error { - inlinePolicies := make([]*string, 0) - input := &iam.ListRolePoliciesInput{ - RoleName: aws.String(rolename), - } - - err := conn.ListRolePoliciesPages(input, func(page *iam.ListRolePoliciesOutput, lastPage bool) bool { - inlinePolicies = append(inlinePolicies, page.PolicyNames...) - return !lastPage - }) - - if err != nil { - return fmt.Errorf("Error listing inline Policies for IAM Role (%s) when trying to delete: %s", rolename, err) - } - - for _, pname := range inlinePolicies { - input := &iam.DeleteRolePolicyInput{ - PolicyName: pname, - RoleName: aws.String(rolename), - } - - _, err := conn.DeleteRolePolicy(input) - - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - continue - } - - if err != nil { - return fmt.Errorf("Error deleting inline policy of IAM Role %s: %s", rolename, err) - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go deleted file mode 100644 index c317c4e48..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go +++ /dev/null @@ -1,157 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "net/url" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamRolePolicy() *schema.Resource { - return &schema.Resource{ - // PutRolePolicy API is idempotent, so these can be the same. - Create: resourceAwsIamRolePolicyPut, - Update: resourceAwsIamRolePolicyPut, - - Read: resourceAwsIamRolePolicyRead, - Delete: resourceAwsIamRolePolicyDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "policy": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateIAMPolicyJson, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateIamRolePolicyName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateIamRolePolicyNamePrefix, - }, - "role": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsIamRolePolicyPut(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - request := &iam.PutRolePolicyInput{ - RoleName: aws.String(d.Get("role").(string)), - PolicyDocument: aws.String(d.Get("policy").(string)), - } - - var policyName string - if v, ok := d.GetOk("name"); ok { - policyName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - policyName = resource.PrefixedUniqueId(v.(string)) - } else { - policyName = resource.UniqueId() - } - request.PolicyName = aws.String(policyName) - - if _, err := iamconn.PutRolePolicy(request); err != nil { - return fmt.Errorf("Error putting IAM role policy %s: %s", *request.PolicyName, err) - } - - d.SetId(fmt.Sprintf("%s:%s", *request.RoleName, *request.PolicyName)) - return resourceAwsIamRolePolicyRead(d, meta) -} - -func resourceAwsIamRolePolicyRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - role, name, err := resourceAwsIamRolePolicyParseId(d.Id()) - if err != nil { - return err - } - - request := &iam.GetRolePolicyInput{ - PolicyName: aws.String(name), - RoleName: aws.String(role), - } - - getResp, err := iamconn.GetRolePolicy(request) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - log.Printf("[WARN] IAM Role Policy (%s) for %s not found, removing from state", name, role) - d.SetId("") - return nil - } - return fmt.Errorf("Error reading IAM policy %s from role %s: %s", name, role, err) - } - - if getResp.PolicyDocument == nil { - return fmt.Errorf("GetRolePolicy returned a nil policy document") - } - - policy, err := url.QueryUnescape(*getResp.PolicyDocument) - if err != nil { - return err - } - if err := d.Set("policy", policy); err != nil { - return err - } - if err := d.Set("name", name); err != nil { - return err - } - return d.Set("role", role) -} - -func resourceAwsIamRolePolicyDelete(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - role, name, err := resourceAwsIamRolePolicyParseId(d.Id()) - if err != nil { - return err - } - - request := &iam.DeleteRolePolicyInput{ - PolicyName: aws.String(name), - RoleName: aws.String(role), - } - - if _, err := iamconn.DeleteRolePolicy(request); err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return nil - } - return fmt.Errorf("Error deleting IAM role policy %s: %s", d.Id(), err) - } - return nil -} - -func resourceAwsIamRolePolicyParseId(id string) (roleName, policyName string, err error) { - parts := strings.SplitN(id, ":", 2) - if len(parts) != 2 { - err = fmt.Errorf("role_policy id must be of the form :") - return - } - - roleName = parts[0] - policyName = parts[1] - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy_attachment.go deleted file mode 100644 index d4f4975f9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy_attachment.go +++ /dev/null @@ -1,140 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamRolePolicyAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamRolePolicyAttachmentCreate, - Read: resourceAwsIamRolePolicyAttachmentRead, - Delete: resourceAwsIamRolePolicyAttachmentDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsIamRolePolicyAttachmentImport, - }, - - Schema: map[string]*schema.Schema{ - "role": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "policy_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsIamRolePolicyAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - role := d.Get("role").(string) - arn := d.Get("policy_arn").(string) - - err := attachPolicyToRole(conn, role, arn) - if err != nil { - return fmt.Errorf("Error attaching policy %s to IAM Role %s: %v", arn, role, err) - } - - d.SetId(resource.PrefixedUniqueId(fmt.Sprintf("%s-", role))) - return resourceAwsIamRolePolicyAttachmentRead(d, meta) -} - -func resourceAwsIamRolePolicyAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - role := d.Get("role").(string) - arn := d.Get("policy_arn").(string) - - _, err := conn.GetRole(&iam.GetRoleInput{ - RoleName: aws.String(role), - }) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NoSuchEntity" { - log.Printf("[WARN] No such entity found for Policy Attachment (%s)", role) - d.SetId("") - return nil - } - } - return err - } - - args := iam.ListAttachedRolePoliciesInput{ - RoleName: aws.String(role), - } - var policy string - err = conn.ListAttachedRolePoliciesPages(&args, func(page *iam.ListAttachedRolePoliciesOutput, lastPage bool) bool { - for _, p := range page.AttachedPolicies { - if *p.PolicyArn == arn { - policy = *p.PolicyArn - } - } - - return policy == "" - }) - if err != nil { - return err - } - if policy == "" { - log.Printf("[WARN] No such policy found for Role Policy Attachment (%s)", role) - d.SetId("") - } - - return nil -} - -func resourceAwsIamRolePolicyAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - role := d.Get("role").(string) - arn := d.Get("policy_arn").(string) - - err := detachPolicyFromRole(conn, role, arn) - if err != nil { - return fmt.Errorf("Error removing policy %s from IAM Role %s: %v", arn, role, err) - } - return nil -} - -func resourceAwsIamRolePolicyAttachmentImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.SplitN(d.Id(), "/", 2) - if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { - return nil, fmt.Errorf("unexpected format of ID (%q), expected /", d.Id()) - } - - roleName := idParts[0] - policyARN := idParts[1] - - d.Set("role", roleName) - d.Set("policy_arn", policyARN) - d.SetId(fmt.Sprintf("%s-%s", roleName, policyARN)) - - return []*schema.ResourceData{d}, nil -} - -func attachPolicyToRole(conn *iam.IAM, role string, arn string) error { - _, err := conn.AttachRolePolicy(&iam.AttachRolePolicyInput{ - RoleName: aws.String(role), - PolicyArn: aws.String(arn), - }) - return err -} - -func detachPolicyFromRole(conn *iam.IAM, role string, arn string) error { - _, err := conn.DetachRolePolicy(&iam.DetachRolePolicyInput{ - RoleName: aws.String(role), - PolicyArn: aws.String(arn), - }) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_saml_provider.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_saml_provider.go deleted file mode 100644 index 55496b415..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_saml_provider.go +++ /dev/null @@ -1,130 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" - - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamSamlProvider() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamSamlProviderCreate, - Read: resourceAwsIamSamlProviderRead, - Update: resourceAwsIamSamlProviderUpdate, - Delete: resourceAwsIamSamlProviderDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "valid_until": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "saml_metadata_document": { - Type: schema.TypeString, - Required: true, - }, - }, - } -} - -func resourceAwsIamSamlProviderCreate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - input := &iam.CreateSAMLProviderInput{ - Name: aws.String(d.Get("name").(string)), - SAMLMetadataDocument: aws.String(d.Get("saml_metadata_document").(string)), - } - - out, err := iamconn.CreateSAMLProvider(input) - if err != nil { - return err - } - - d.SetId(*out.SAMLProviderArn) - - return resourceAwsIamSamlProviderRead(d, meta) -} - -func resourceAwsIamSamlProviderRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - input := &iam.GetSAMLProviderInput{ - SAMLProviderArn: aws.String(d.Id()), - } - out, err := iamconn.GetSAMLProvider(input) - if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { - log.Printf("[WARN] IAM SAML Provider %q not found.", d.Id()) - d.SetId("") - return nil - } - return err - } - - validUntil := out.ValidUntil.Format(time.RFC1123) - d.Set("arn", d.Id()) - name, err := extractNameFromIAMSamlProviderArn(d.Id(), meta.(*AWSClient).partition) - if err != nil { - return err - } - d.Set("name", name) - d.Set("valid_until", validUntil) - d.Set("saml_metadata_document", *out.SAMLMetadataDocument) - - return nil -} - -func resourceAwsIamSamlProviderUpdate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - input := &iam.UpdateSAMLProviderInput{ - SAMLProviderArn: aws.String(d.Id()), - SAMLMetadataDocument: aws.String(d.Get("saml_metadata_document").(string)), - } - _, err := iamconn.UpdateSAMLProvider(input) - if err != nil { - return err - } - - return resourceAwsIamSamlProviderRead(d, meta) -} - -func resourceAwsIamSamlProviderDelete(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - input := &iam.DeleteSAMLProviderInput{ - SAMLProviderArn: aws.String(d.Id()), - } - _, err := iamconn.DeleteSAMLProvider(input) - - return err -} - -func extractNameFromIAMSamlProviderArn(arn, partition string) (string, error) { - // arn:aws:iam::123456789012:saml-provider/tf-salesforce-test - r := regexp.MustCompile(fmt.Sprintf("^arn:%s:iam::[0-9]{12}:saml-provider/(.+)$", partition)) - submatches := r.FindStringSubmatch(arn) - if len(submatches) != 2 { - return "", fmt.Errorf("Unable to extract name from a given ARN: %q", arn) - } - return submatches[1], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go deleted file mode 100644 index e3402f032..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go +++ /dev/null @@ -1,243 +0,0 @@ -package aws - -import ( - "crypto/sha1" - "encoding/hex" - "fmt" - "log" - "regexp" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsIAMServerCertificate() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIAMServerCertificateCreate, - Read: resourceAwsIAMServerCertificateRead, - Delete: resourceAwsIAMServerCertificateDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsIAMServerCertificateImport, - }, - - Schema: map[string]*schema.Schema{ - "certificate_body": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: normalizeCert, - }, - - "certificate_chain": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - StateFunc: normalizeCert, - }, - - "path": { - Type: schema.TypeString, - Optional: true, - Default: "/", - ForceNew: true, - }, - - "private_key": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: normalizeCert, - Sensitive: true, - }, - - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validation.StringLenBetween(0, 128), - }, - - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validation.StringLenBetween(0, 128-resource.UniqueIDSuffixLength), - }, - - "arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - } -} - -func resourceAwsIAMServerCertificateCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - var sslCertName string - if v, ok := d.GetOk("name"); ok { - sslCertName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - sslCertName = resource.PrefixedUniqueId(v.(string)) - } else { - sslCertName = resource.UniqueId() - } - - createOpts := &iam.UploadServerCertificateInput{ - CertificateBody: aws.String(d.Get("certificate_body").(string)), - PrivateKey: aws.String(d.Get("private_key").(string)), - ServerCertificateName: aws.String(sslCertName), - } - - if v, ok := d.GetOk("certificate_chain"); ok { - createOpts.CertificateChain = aws.String(v.(string)) - } - - if v, ok := d.GetOk("path"); ok { - createOpts.Path = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating IAM Server Certificate with opts: %s", createOpts) - resp, err := conn.UploadServerCertificate(createOpts) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - return fmt.Errorf("Error uploading server certificate, error: %s: %s", awsErr.Code(), awsErr.Message()) - } - return fmt.Errorf("Error uploading server certificate, error: %s", err) - } - - d.SetId(*resp.ServerCertificateMetadata.ServerCertificateId) - d.Set("name", sslCertName) - - return resourceAwsIAMServerCertificateRead(d, meta) -} - -func resourceAwsIAMServerCertificateRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - resp, err := conn.GetServerCertificate(&iam.GetServerCertificateInput{ - ServerCertificateName: aws.String(d.Get("name").(string)), - }) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NoSuchEntity" { - log.Printf("[WARN] IAM Server Cert (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error reading IAM Server Certificate: %s: %s", awsErr.Code(), awsErr.Message()) - } - return fmt.Errorf("Error reading IAM Server Certificate: %s", err) - } - - d.SetId(*resp.ServerCertificate.ServerCertificateMetadata.ServerCertificateId) - - // these values should always be present, and have a default if not set in - // configuration, and so safe to reference with nil checks - d.Set("certificate_body", normalizeCert(resp.ServerCertificate.CertificateBody)) - - c := normalizeCert(resp.ServerCertificate.CertificateChain) - if c != "" { - d.Set("certificate_chain", c) - } - - d.Set("path", resp.ServerCertificate.ServerCertificateMetadata.Path) - d.Set("arn", resp.ServerCertificate.ServerCertificateMetadata.Arn) - - return nil -} - -func resourceAwsIAMServerCertificateDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - log.Printf("[INFO] Deleting IAM Server Certificate: %s", d.Id()) - err := resource.Retry(15*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteServerCertificate(&iam.DeleteServerCertificateInput{ - ServerCertificateName: aws.String(d.Get("name").(string)), - }) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "DeleteConflict" && strings.Contains(awsErr.Message(), "currently in use by arn") { - currentlyInUseBy(awsErr.Message(), meta.(*AWSClient).elbconn) - log.Printf("[WARN] Conflict deleting server certificate: %s, retrying", awsErr.Message()) - return resource.RetryableError(err) - } - if awsErr.Code() == "NoSuchEntity" { - return nil - } - } - return resource.NonRetryableError(err) - } - return nil - }) - - return err -} - -func resourceAwsIAMServerCertificateImport( - d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("name", d.Id()) - // private_key can't be fetched from any API call - return []*schema.ResourceData{d}, nil -} - -func currentlyInUseBy(awsErr string, conn *elb.ELB) { - r := regexp.MustCompile(`currently in use by ([a-z0-9:-]+)\/([a-z0-9-]+)\.`) - matches := r.FindStringSubmatch(awsErr) - if len(matches) > 0 { - lbName := matches[2] - describeElbOpts := &elb.DescribeLoadBalancersInput{ - LoadBalancerNames: []*string{aws.String(lbName)}, - } - if _, err := conn.DescribeLoadBalancers(describeElbOpts); err != nil { - if isAWSErr(err, "LoadBalancerNotFound", "") { - log.Printf("[WARN] Load Balancer (%s) causing delete conflict not found", lbName) - } - } - } -} - -func normalizeCert(cert interface{}) string { - if cert == nil || cert == (*string)(nil) { - return "" - } - - var rawCert string - switch cert.(type) { - case string: - rawCert = cert.(string) - case *string: - rawCert = *cert.(*string) - default: - return "" - } - - cleanVal := sha1.Sum(stripCR([]byte(strings.TrimSpace(rawCert)))) - return hex.EncodeToString(cleanVal[:]) -} - -// strip CRs from raw literals. Lifted from go/scanner/scanner.go -// See https://github.com/golang/go/blob/release-branch.go1.6/src/go/scanner/scanner.go#L479 -func stripCR(b []byte) []byte { - c := make([]byte, len(b)) - i := 0 - for _, ch := range b { - if ch != '\r' { - c[i] = ch - i++ - } - } - return c[:i] -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_service_linked_role.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_service_linked_role.go deleted file mode 100644 index 9744dab0c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_service_linked_role.go +++ /dev/null @@ -1,262 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamServiceLinkedRole() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamServiceLinkedRoleCreate, - Read: resourceAwsIamServiceLinkedRoleRead, - Update: resourceAwsIamServiceLinkedRoleUpdate, - Delete: resourceAwsIamServiceLinkedRoleDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "aws_service_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if !strings.HasSuffix(value, ".amazonaws.com") { - es = append(es, fmt.Errorf( - "%q must be a service URL e.g. elasticbeanstalk.amazonaws.com", k)) - } - return - }, - }, - - "name": { - Type: schema.TypeString, - Computed: true, - }, - - "path": { - Type: schema.TypeString, - Computed: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "create_date": { - Type: schema.TypeString, - Computed: true, - }, - - "unique_id": { - Type: schema.TypeString, - Computed: true, - }, - - "custom_suffix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsIamServiceLinkedRoleCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - serviceName := d.Get("aws_service_name").(string) - - params := &iam.CreateServiceLinkedRoleInput{ - AWSServiceName: aws.String(serviceName), - } - - if v, ok := d.GetOk("custom_suffix"); ok && v.(string) != "" { - params.CustomSuffix = aws.String(v.(string)) - } - - if v, ok := d.GetOk("description"); ok && v.(string) != "" { - params.Description = aws.String(v.(string)) - } - - resp, err := conn.CreateServiceLinkedRole(params) - - if err != nil { - return fmt.Errorf("Error creating service-linked role with name %s: %s", serviceName, err) - } - d.SetId(*resp.Role.Arn) - - return resourceAwsIamServiceLinkedRoleRead(d, meta) -} - -func resourceAwsIamServiceLinkedRoleRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - serviceName, roleName, customSuffix, err := decodeIamServiceLinkedRoleID(d.Id()) - if err != nil { - return err - } - - params := &iam.GetRoleInput{ - RoleName: aws.String(roleName), - } - - resp, err := conn.GetRole(params) - - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - log.Printf("[WARN] IAM service linked role %s not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - role := resp.Role - - d.Set("arn", role.Arn) - d.Set("aws_service_name", serviceName) - d.Set("create_date", role.CreateDate) - d.Set("custom_suffix", customSuffix) - d.Set("description", role.Description) - d.Set("name", role.RoleName) - d.Set("path", role.Path) - d.Set("unique_id", role.RoleId) - - return nil -} - -func resourceAwsIamServiceLinkedRoleUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - _, roleName, _, err := decodeIamServiceLinkedRoleID(d.Id()) - if err != nil { - return err - } - - params := &iam.UpdateRoleInput{ - Description: aws.String(d.Get("description").(string)), - RoleName: aws.String(roleName), - } - - _, err = conn.UpdateRole(params) - - if err != nil { - return fmt.Errorf("Error updating service-linked role %s: %s", d.Id(), err) - } - - return resourceAwsIamServiceLinkedRoleRead(d, meta) -} - -func resourceAwsIamServiceLinkedRoleDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - _, roleName, _, err := decodeIamServiceLinkedRoleID(d.Id()) - if err != nil { - return err - } - - deletionID, err := deleteIamServiceLinkedRole(conn, roleName) - if err != nil { - return fmt.Errorf("Error deleting service-linked role %s: %s", d.Id(), err) - } - if deletionID == "" { - return nil - } - - err = deleteIamServiceLinkedRoleWaiter(conn, deletionID) - if err != nil { - return fmt.Errorf("Error waiting for role (%s) to be deleted: %s", d.Id(), err) - } - - return nil -} - -func decodeIamServiceLinkedRoleID(id string) (serviceName, roleName, customSuffix string, err error) { - idArn, err := arn.Parse(id) - if err != nil { - return "", "", "", err - } - - resourceParts := strings.Split(idArn.Resource, "/") - if len(resourceParts) != 4 { - return "", "", "", fmt.Errorf("expected IAM Service Role ARN (arn:PARTITION:iam::ACCOUNTID:role/aws-service-role/SERVICENAME/ROLENAME), received: %s", id) - } - - serviceName = resourceParts[2] - roleName = resourceParts[3] - - roleNameParts := strings.Split(roleName, "_") - if len(roleNameParts) == 2 { - customSuffix = roleNameParts[1] - } - - return -} - -func deleteIamServiceLinkedRole(conn *iam.IAM, roleName string) (string, error) { - params := &iam.DeleteServiceLinkedRoleInput{ - RoleName: aws.String(roleName), - } - - resp, err := conn.DeleteServiceLinkedRole(params) - - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return "", nil - } - return "", err - } - - return aws.StringValue(resp.DeletionTaskId), nil -} - -func deleteIamServiceLinkedRoleWaiter(conn *iam.IAM, deletionTaskID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{iam.DeletionTaskStatusTypeInProgress, iam.DeletionTaskStatusTypeNotStarted}, - Target: []string{iam.DeletionTaskStatusTypeSucceeded}, - Refresh: deleteIamServiceLinkedRoleRefreshFunc(conn, deletionTaskID), - Timeout: 5 * time.Minute, - Delay: 10 * time.Second, - } - - _, err := stateConf.WaitForState() - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return nil - } - return err - } - - return nil -} - -func deleteIamServiceLinkedRoleRefreshFunc(conn *iam.IAM, deletionTaskId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - params := &iam.GetServiceLinkedRoleDeletionStatusInput{ - DeletionTaskId: aws.String(deletionTaskId), - } - - resp, err := conn.GetServiceLinkedRoleDeletionStatus(params) - if err != nil { - return nil, "", err - } - - return resp, aws.StringValue(resp.Status), nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user.go deleted file mode 100644 index 4f23ef8f1..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user.go +++ /dev/null @@ -1,412 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsIamUser() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamUserCreate, - Read: resourceAwsIamUserRead, - Update: resourceAwsIamUserUpdate, - Delete: resourceAwsIamUserDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - /* - The UniqueID could be used as the Id(), but none of the API - calls allow specifying a user by the UniqueID: they require the - name. The only way to locate a user by UniqueID is to list them - all and that would make this provider unnecessarily complex - and inefficient. Still, there are other reasons one might want - the UniqueID, so we can make it available. - */ - "unique_id": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateAwsIamUserName, - }, - "path": { - Type: schema.TypeString, - Optional: true, - Default: "/", - }, - "permissions_boundary": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 2048), - }, - "force_destroy": { - Type: schema.TypeBool, - Optional: true, - Default: false, - Description: "Delete user even if it has non-Terraform-managed IAM access keys, login profile or MFA devices", - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsIamUserCreate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - name := d.Get("name").(string) - path := d.Get("path").(string) - - request := &iam.CreateUserInput{ - Path: aws.String(path), - UserName: aws.String(name), - } - - if v, ok := d.GetOk("permissions_boundary"); ok && v.(string) != "" { - request.PermissionsBoundary = aws.String(v.(string)) - } - - if v, ok := d.GetOk("tags"); ok { - tags := tagsFromMapIAM(v.(map[string]interface{})) - request.Tags = tags - } - - log.Println("[DEBUG] Create IAM User request:", request) - createResp, err := iamconn.CreateUser(request) - if err != nil { - return fmt.Errorf("Error creating IAM User %s: %s", name, err) - } - - d.SetId(aws.StringValue(createResp.User.UserName)) - - return resourceAwsIamUserRead(d, meta) -} - -func resourceAwsIamUserRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - request := &iam.GetUserInput{ - UserName: aws.String(d.Id()), - } - - output, err := iamconn.GetUser(request) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - log.Printf("[WARN] No IAM user by name (%s) found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error reading IAM User %s: %s", d.Id(), err) - } - - if output == nil || output.User == nil { - log.Printf("[WARN] No IAM user by name (%s) found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("arn", output.User.Arn) - d.Set("name", output.User.UserName) - d.Set("path", output.User.Path) - if output.User.PermissionsBoundary != nil { - d.Set("permissions_boundary", output.User.PermissionsBoundary.PermissionsBoundaryArn) - } - d.Set("unique_id", output.User.UserId) - if err := d.Set("tags", tagsToMapIAM(output.User.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func resourceAwsIamUserUpdate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - if d.HasChange("name") || d.HasChange("path") { - on, nn := d.GetChange("name") - _, np := d.GetChange("path") - - request := &iam.UpdateUserInput{ - UserName: aws.String(on.(string)), - NewUserName: aws.String(nn.(string)), - NewPath: aws.String(np.(string)), - } - - log.Println("[DEBUG] Update IAM User request:", request) - _, err := iamconn.UpdateUser(request) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - log.Printf("[WARN] No IAM user by name (%s) found", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error updating IAM User %s: %s", d.Id(), err) - } - - d.SetId(nn.(string)) - } - - if d.HasChange("permissions_boundary") { - permissionsBoundary := d.Get("permissions_boundary").(string) - if permissionsBoundary != "" { - input := &iam.PutUserPermissionsBoundaryInput{ - PermissionsBoundary: aws.String(permissionsBoundary), - UserName: aws.String(d.Id()), - } - _, err := iamconn.PutUserPermissionsBoundary(input) - if err != nil { - return fmt.Errorf("error updating IAM User permissions boundary: %s", err) - } - } else { - input := &iam.DeleteUserPermissionsBoundaryInput{ - UserName: aws.String(d.Id()), - } - _, err := iamconn.DeleteUserPermissionsBoundary(input) - if err != nil { - return fmt.Errorf("error deleting IAM User permissions boundary: %s", err) - } - } - } - - if d.HasChange("tags") { - // Reset all tags to empty set - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - c, r := diffTagsIAM(tagsFromMapIAM(o), tagsFromMapIAM(n)) - - if len(r) > 0 { - _, err := iamconn.UntagUser(&iam.UntagUserInput{ - UserName: aws.String(d.Id()), - TagKeys: tagKeysIam(r), - }) - if err != nil { - return fmt.Errorf("error deleting IAM user tags: %s", err) - } - } - - if len(c) > 0 { - input := &iam.TagUserInput{ - UserName: aws.String(d.Id()), - Tags: c, - } - _, err := iamconn.TagUser(input) - if err != nil { - return fmt.Errorf("error update IAM user tags: %s", err) - } - } - } - - return resourceAwsIamUserRead(d, meta) -} - -func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - // IAM Users must be removed from all groups before they can be deleted - if err := deleteAwsIamUserGroupMemberships(iamconn, d.Id()); err != nil { - return fmt.Errorf("error removing IAM User (%s) group memberships: %s", d.Id(), err) - } - - // All access keys, MFA devices and login profile for the user must be removed - if d.Get("force_destroy").(bool) { - if err := deleteAwsIamUserAccessKeys(iamconn, d.Id()); err != nil { - return fmt.Errorf("error removing IAM User (%s) access keys: %s", d.Id(), err) - } - - if err := deleteAwsIamUserSSHKeys(iamconn, d.Id()); err != nil { - return fmt.Errorf("error removing IAM User (%s) SSH keys: %s", d.Id(), err) - } - - if err := deleteAwsIamUserMFADevices(iamconn, d.Id()); err != nil { - return fmt.Errorf("error removing IAM User (%s) MFA devices: %s", d.Id(), err) - } - - if err := deleteAwsIamUserLoginProfile(iamconn, d.Id()); err != nil { - return fmt.Errorf("error removing IAM User (%s) login profile: %s", d.Id(), err) - } - } - - deleteUserInput := &iam.DeleteUserInput{ - UserName: aws.String(d.Id()), - } - - log.Println("[DEBUG] Delete IAM User request:", deleteUserInput) - _, err := iamconn.DeleteUser(deleteUserInput) - - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return nil - } - - if err != nil { - return fmt.Errorf("Error deleting IAM User %s: %s", d.Id(), err) - } - - return nil -} - -func validateAwsIamUserName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z=,.@\-_+]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters, hyphens, underscores, commas, periods, @ symbols, plus and equals signs allowed in %q: %q", - k, value)) - } - return -} - -func deleteAwsIamUserGroupMemberships(conn *iam.IAM, username string) error { - var groups []string - listGroups := &iam.ListGroupsForUserInput{ - UserName: aws.String(username), - } - pageOfGroups := func(page *iam.ListGroupsForUserOutput, lastPage bool) (shouldContinue bool) { - for _, g := range page.Groups { - groups = append(groups, *g.GroupName) - } - return !lastPage - } - err := conn.ListGroupsForUserPages(listGroups, pageOfGroups) - if err != nil { - return fmt.Errorf("Error removing user %q from all groups: %s", username, err) - } - for _, g := range groups { - // use iam group membership func to remove user from all groups - log.Printf("[DEBUG] Removing IAM User %s from IAM Group %s", username, g) - if err := removeUsersFromGroup(conn, []*string{aws.String(username)}, g); err != nil { - return err - } - } - - return nil -} - -func deleteAwsIamUserSSHKeys(svc *iam.IAM, username string) error { - var publicKeys []string - var err error - - listSSHPublicKeys := &iam.ListSSHPublicKeysInput{ - UserName: aws.String(username), - } - pageOfListSSHPublicKeys := func(page *iam.ListSSHPublicKeysOutput, lastPage bool) (shouldContinue bool) { - for _, k := range page.SSHPublicKeys { - publicKeys = append(publicKeys, *k.SSHPublicKeyId) - } - return !lastPage - } - err = svc.ListSSHPublicKeysPages(listSSHPublicKeys, pageOfListSSHPublicKeys) - if err != nil { - return fmt.Errorf("Error removing public SSH keys of user %s: %s", username, err) - } - for _, k := range publicKeys { - _, err := svc.DeleteSSHPublicKey(&iam.DeleteSSHPublicKeyInput{ - UserName: aws.String(username), - SSHPublicKeyId: aws.String(k), - }) - if err != nil { - return fmt.Errorf("Error deleting public SSH key %s: %s", k, err) - } - } - - return nil -} - -func deleteAwsIamUserMFADevices(svc *iam.IAM, username string) error { - var MFADevices []string - var err error - - listMFADevices := &iam.ListMFADevicesInput{ - UserName: aws.String(username), - } - pageOfMFADevices := func(page *iam.ListMFADevicesOutput, lastPage bool) (shouldContinue bool) { - for _, m := range page.MFADevices { - MFADevices = append(MFADevices, *m.SerialNumber) - } - return !lastPage - } - err = svc.ListMFADevicesPages(listMFADevices, pageOfMFADevices) - if err != nil { - return fmt.Errorf("Error removing MFA devices of user %s: %s", username, err) - } - for _, m := range MFADevices { - _, err := svc.DeactivateMFADevice(&iam.DeactivateMFADeviceInput{ - UserName: aws.String(username), - SerialNumber: aws.String(m), - }) - if err != nil { - return fmt.Errorf("Error deactivating MFA device %s: %s", m, err) - } - } - - return nil -} - -func deleteAwsIamUserLoginProfile(svc *iam.IAM, username string) error { - var err error - err = resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err = svc.DeleteLoginProfile(&iam.DeleteLoginProfileInput{ - UserName: aws.String(username), - }) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return nil - } - // EntityTemporarilyUnmodifiable: Login Profile for User XXX cannot be modified while login profile is being created. - if isAWSErr(err, iam.ErrCodeEntityTemporarilyUnmodifiableException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return fmt.Errorf("Error deleting Account Login Profile: %s", err) - } - - return nil -} - -func deleteAwsIamUserAccessKeys(svc *iam.IAM, username string) error { - var accessKeys []string - var err error - listAccessKeys := &iam.ListAccessKeysInput{ - UserName: aws.String(username), - } - pageOfAccessKeys := func(page *iam.ListAccessKeysOutput, lastPage bool) (shouldContinue bool) { - for _, k := range page.AccessKeyMetadata { - accessKeys = append(accessKeys, *k.AccessKeyId) - } - return !lastPage - } - err = svc.ListAccessKeysPages(listAccessKeys, pageOfAccessKeys) - if err != nil { - return fmt.Errorf("Error removing access keys of user %s: %s", username, err) - } - for _, k := range accessKeys { - _, err := svc.DeleteAccessKey(&iam.DeleteAccessKeyInput{ - UserName: aws.String(username), - AccessKeyId: aws.String(k), - }) - if err != nil { - return fmt.Errorf("Error deleting access key %s: %s", k, err) - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go deleted file mode 100644 index 815272009..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go +++ /dev/null @@ -1,164 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/service/iam" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamUserGroupMembership() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamUserGroupMembershipCreate, - Read: resourceAwsIamUserGroupMembershipRead, - Update: resourceAwsIamUserGroupMembershipUpdate, - Delete: resourceAwsIamUserGroupMembershipDelete, - - Schema: map[string]*schema.Schema{ - "user": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "groups": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func resourceAwsIamUserGroupMembershipCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - user := d.Get("user").(string) - groupList := expandStringList(d.Get("groups").(*schema.Set).List()) - - if err := addUserToGroups(conn, user, groupList); err != nil { - return err - } - - d.SetId(resource.UniqueId()) - - return resourceAwsIamUserGroupMembershipRead(d, meta) -} - -func resourceAwsIamUserGroupMembershipRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - user := d.Get("user").(string) - groups := d.Get("groups").(*schema.Set) - var gl []string - var marker *string - - for { - resp, err := conn.ListGroupsForUser(&iam.ListGroupsForUserInput{ - UserName: &user, - Marker: marker, - }) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - // no such user - log.Printf("[WARN] Groups not found for user (%s), removing from state", user) - d.SetId("") - return nil - } - return err - } - - for _, g := range resp.Groups { - // only read in the groups we care about - if groups.Contains(*g.GroupName) { - gl = append(gl, *g.GroupName) - } - } - - if !*resp.IsTruncated { - break - } - - marker = resp.Marker - } - - if err := d.Set("groups", gl); err != nil { - return fmt.Errorf("Error setting group list from IAM (%s), error: %s", user, err) - } - - return nil -} - -func resourceAwsIamUserGroupMembershipUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - if d.HasChange("groups") { - user := d.Get("user").(string) - - o, n := d.GetChange("groups") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - remove := expandStringList(os.Difference(ns).List()) - add := expandStringList(ns.Difference(os).List()) - - if err := removeUserFromGroups(conn, user, remove); err != nil { - return err - } - - if err := addUserToGroups(conn, user, add); err != nil { - return err - } - } - - return resourceAwsIamUserGroupMembershipRead(d, meta) -} - -func resourceAwsIamUserGroupMembershipDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - user := d.Get("user").(string) - groups := expandStringList(d.Get("groups").(*schema.Set).List()) - - err := removeUserFromGroups(conn, user, groups) - return err -} - -func removeUserFromGroups(conn *iam.IAM, user string, groups []*string) error { - for _, group := range groups { - _, err := conn.RemoveUserFromGroup(&iam.RemoveUserFromGroupInput{ - UserName: &user, - GroupName: group, - }) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - continue - } - return err - } - } - - return nil -} - -func addUserToGroups(conn *iam.IAM, user string, groups []*string) error { - for _, group := range groups { - _, err := conn.AddUserToGroup(&iam.AddUserToGroupInput{ - UserName: &user, - GroupName: group, - }) - if err != nil { - return err - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_login_profile.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_login_profile.go deleted file mode 100644 index 98b6c0aa1..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_login_profile.go +++ /dev/null @@ -1,172 +0,0 @@ -package aws - -import ( - "bytes" - "crypto/rand" - "fmt" - "log" - "math/big" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/encryption" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsIamUserLoginProfile() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamUserLoginProfileCreate, - Read: schema.Noop, - Update: schema.Noop, - Delete: schema.RemoveFromState, - - Schema: map[string]*schema.Schema{ - "user": { - Type: schema.TypeString, - Required: true, - }, - "pgp_key": { - Type: schema.TypeString, - Required: true, - }, - "password_reset_required": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "password_length": { - Type: schema.TypeInt, - Optional: true, - Default: 20, - ValidateFunc: validation.IntBetween(5, 128), - }, - - "key_fingerprint": { - Type: schema.TypeString, - Computed: true, - }, - "encrypted_password": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -const ( - charLower = "abcdefghijklmnopqrstuvwxyz" - charUpper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - charNumbers = "0123456789" - charSymbols = "!@#$%^&*()_+-=[]{}|'" -) - -// generateIAMPassword generates a random password of a given length, matching the -// most restrictive iam password policy. -func generateIAMPassword(length int) string { - const charset = charLower + charUpper + charNumbers + charSymbols - - result := make([]byte, length) - charsetSize := big.NewInt(int64(len(charset))) - - // rather than trying to artificially add specific characters from each - // class to the password to match the policy, we generate passwords - // randomly and reject those that don't match. - // - // Even in the worst case, this tends to take less than 10 tries to find a - // matching password. Any sufficiently long password is likely to succeed - // on the first try - for n := 0; n < 100000; n++ { - for i := range result { - r, err := rand.Int(rand.Reader, charsetSize) - if err != nil { - panic(err) - } - if !r.IsInt64() { - panic("rand.Int() not representable as an Int64") - } - - result[i] = charset[r.Int64()] - } - - if !checkIAMPwdPolicy(result) { - continue - } - - return string(result) - } - - panic("failed to generate acceptable password") -} - -// Check the generated password contains all character classes listed in the -// IAM password policy. -func checkIAMPwdPolicy(pass []byte) bool { - return (bytes.ContainsAny(pass, charLower) && - bytes.ContainsAny(pass, charNumbers) && - bytes.ContainsAny(pass, charSymbols) && - bytes.ContainsAny(pass, charUpper)) -} - -func resourceAwsIamUserLoginProfileCreate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - encryptionKey, err := encryption.RetrieveGPGKey(strings.TrimSpace(d.Get("pgp_key").(string))) - if err != nil { - return err - } - - username := d.Get("user").(string) - passwordResetRequired := d.Get("password_reset_required").(bool) - passwordLength := d.Get("password_length").(int) - - _, err = iamconn.GetLoginProfile(&iam.GetLoginProfileInput{ - UserName: aws.String(username), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() != "NoSuchEntity" { - // If there is already a login profile, bring it under management (to prevent - // resource creation diffs) - we will never modify it, but obviously cannot - // set the password. - d.SetId(username) - d.Set("key_fingerprint", "") - d.Set("encrypted_password", "") - return nil - } - } - - initialPassword := generateIAMPassword(passwordLength) - - fingerprint, encrypted, err := encryption.EncryptValue(encryptionKey, initialPassword, "Password") - if err != nil { - return err - } - - request := &iam.CreateLoginProfileInput{ - UserName: aws.String(username), - Password: aws.String(initialPassword), - PasswordResetRequired: aws.Bool(passwordResetRequired), - } - - log.Println("[DEBUG] Create IAM User Login Profile request:", request) - createResp, err := iamconn.CreateLoginProfile(request) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "EntityAlreadyExists" { - // If there is already a login profile, bring it under management (to prevent - // resource creation diffs) - we will never modify it, but obviously cannot - // set the password. - d.SetId(username) - d.Set("key_fingerprint", "") - d.Set("encrypted_password", "") - return nil - } - return fmt.Errorf("Error creating IAM User Login Profile for %q: %s", username, err) - } - - d.SetId(*createResp.LoginProfile.UserName) - d.Set("key_fingerprint", fingerprint) - d.Set("encrypted_password", encrypted) - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy.go deleted file mode 100644 index 5bcccc259..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy.go +++ /dev/null @@ -1,161 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "net/url" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamUserPolicy() *schema.Resource { - return &schema.Resource{ - // PutUserPolicy API is idempotent, so these can be the same. - Create: resourceAwsIamUserPolicyPut, - Read: resourceAwsIamUserPolicyRead, - Update: resourceAwsIamUserPolicyPut, - Delete: resourceAwsIamUserPolicyDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "policy": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateIAMPolicyJson, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - }, - "user": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsIamUserPolicyPut(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - request := &iam.PutUserPolicyInput{ - UserName: aws.String(d.Get("user").(string)), - PolicyDocument: aws.String(d.Get("policy").(string)), - } - - var policyName string - var err error - if !d.IsNewResource() { - _, policyName, err = resourceAwsIamUserPolicyParseId(d.Id()) - if err != nil { - return err - } - } else if v, ok := d.GetOk("name"); ok { - policyName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - policyName = resource.PrefixedUniqueId(v.(string)) - } else { - policyName = resource.UniqueId() - } - request.PolicyName = aws.String(policyName) - - if _, err := iamconn.PutUserPolicy(request); err != nil { - return fmt.Errorf("Error putting IAM user policy %s: %s", *request.PolicyName, err) - } - - d.SetId(fmt.Sprintf("%s:%s", *request.UserName, *request.PolicyName)) - return nil -} - -func resourceAwsIamUserPolicyRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - user, name, err := resourceAwsIamUserPolicyParseId(d.Id()) - if err != nil { - return err - } - - request := &iam.GetUserPolicyInput{ - PolicyName: aws.String(name), - UserName: aws.String(user), - } - - getResp, err := iamconn.GetUserPolicy(request) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - log.Printf("[WARN] IAM User Policy (%s) for %s not found, removing from state", name, user) - d.SetId("") - return nil - } - return fmt.Errorf("Error reading IAM policy %s from user %s: %s", name, user, err) - } - - if getResp.PolicyDocument == nil { - return fmt.Errorf("GetUserPolicy returned a nil policy document") - } - - policy, err := url.QueryUnescape(*getResp.PolicyDocument) - if err != nil { - return err - } - if err := d.Set("policy", policy); err != nil { - return err - } - if err := d.Set("name", name); err != nil { - return err - } - return d.Set("user", user) -} - -func resourceAwsIamUserPolicyDelete(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - user, name, err := resourceAwsIamUserPolicyParseId(d.Id()) - if err != nil { - return err - } - - request := &iam.DeleteUserPolicyInput{ - PolicyName: aws.String(name), - UserName: aws.String(user), - } - - if _, err := iamconn.DeleteUserPolicy(request); err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return nil - } - return fmt.Errorf("Error deleting IAM user policy %s: %s", d.Id(), err) - } - return nil -} - -func resourceAwsIamUserPolicyParseId(id string) (userName, policyName string, err error) { - parts := strings.SplitN(id, ":", 2) - if len(parts) != 2 { - err = fmt.Errorf("user_policy id must be of the form :") - return - } - - userName = parts[0] - policyName = parts[1] - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy_attachment.go deleted file mode 100644 index 7e8ed3ad7..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy_attachment.go +++ /dev/null @@ -1,137 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIamUserPolicyAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamUserPolicyAttachmentCreate, - Read: resourceAwsIamUserPolicyAttachmentRead, - Delete: resourceAwsIamUserPolicyAttachmentDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsIamUserPolicyAttachmentImport, - }, - - Schema: map[string]*schema.Schema{ - "user": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "policy_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsIamUserPolicyAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - - user := d.Get("user").(string) - arn := d.Get("policy_arn").(string) - - err := attachPolicyToUser(conn, user, arn) - if err != nil { - return fmt.Errorf("Error attaching policy %s to IAM User %s: %v", arn, user, err) - } - - d.SetId(resource.PrefixedUniqueId(fmt.Sprintf("%s-", user))) - return resourceAwsIamUserPolicyAttachmentRead(d, meta) -} - -func resourceAwsIamUserPolicyAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - user := d.Get("user").(string) - arn := d.Get("policy_arn").(string) - - _, err := conn.GetUser(&iam.GetUserInput{ - UserName: aws.String(user), - }) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NoSuchEntity" { - log.Printf("[WARN] No such entity found for Policy Attachment (%s)", user) - d.SetId("") - return nil - } - } - return err - } - - attachedPolicies, err := conn.ListAttachedUserPolicies(&iam.ListAttachedUserPoliciesInput{ - UserName: aws.String(user), - }) - if err != nil { - return err - } - - var policy string - for _, p := range attachedPolicies.AttachedPolicies { - if *p.PolicyArn == arn { - policy = *p.PolicyArn - } - } - - if policy == "" { - log.Printf("[WARN] No such User found for Policy Attachment (%s)", user) - d.SetId("") - } - return nil -} - -func resourceAwsIamUserPolicyAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iamconn - user := d.Get("user").(string) - arn := d.Get("policy_arn").(string) - - err := detachPolicyFromUser(conn, user, arn) - if err != nil { - return fmt.Errorf("Error removing policy %s from IAM User %s: %v", arn, user, err) - } - return nil -} - -func resourceAwsIamUserPolicyAttachmentImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.SplitN(d.Id(), "/", 2) - if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { - return nil, fmt.Errorf("unexpected format of ID (%q), expected /", d.Id()) - } - - userName := idParts[0] - policyARN := idParts[1] - - d.Set("user", userName) - d.Set("policy_arn", policyARN) - d.SetId(fmt.Sprintf("%s-%s", userName, policyARN)) - - return []*schema.ResourceData{d}, nil -} - -func attachPolicyToUser(conn *iam.IAM, user string, arn string) error { - _, err := conn.AttachUserPolicy(&iam.AttachUserPolicyInput{ - UserName: aws.String(user), - PolicyArn: aws.String(arn), - }) - return err -} - -func detachPolicyFromUser(conn *iam.IAM, user string, arn string) error { - _, err := conn.DetachUserPolicy(&iam.DetachUserPolicyInput{ - UserName: aws.String(user), - PolicyArn: aws.String(arn), - }) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_ssh_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_ssh_key.go deleted file mode 100644 index 241c3040f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_ssh_key.go +++ /dev/null @@ -1,191 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" - - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsIamUserSshKey() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIamUserSshKeyCreate, - Read: resourceAwsIamUserSshKeyRead, - Update: resourceAwsIamUserSshKeyUpdate, - Delete: resourceAwsIamUserSshKeyDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsIamUserSshKeyImport, - }, - - Schema: map[string]*schema.Schema{ - "ssh_public_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "fingerprint": { - Type: schema.TypeString, - Computed: true, - }, - "username": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "public_key": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if d.Get("encoding").(string) == "SSH" { - old = cleanSshKey(old) - new = cleanSshKey(new) - } - return strings.Trim(old, "\n") == strings.Trim(new, "\n") - }, - }, - - "encoding": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - iam.EncodingTypeSsh, - iam.EncodingTypePem, - }, false), - }, - - "status": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - } -} - -func resourceAwsIamUserSshKeyCreate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - username := d.Get("username").(string) - publicKey := d.Get("public_key").(string) - - request := &iam.UploadSSHPublicKeyInput{ - UserName: aws.String(username), - SSHPublicKeyBody: aws.String(publicKey), - } - - log.Println("[DEBUG] Create IAM User SSH Key Request:", request) - createResp, err := iamconn.UploadSSHPublicKey(request) - if err != nil { - return fmt.Errorf("Error creating IAM User SSH Key %s: %s", username, err) - } - - d.SetId(*createResp.SSHPublicKey.SSHPublicKeyId) - - return resourceAwsIamUserSshKeyUpdate(d, meta) -} - -func resourceAwsIamUserSshKeyRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - username := d.Get("username").(string) - encoding := d.Get("encoding").(string) - request := &iam.GetSSHPublicKeyInput{ - UserName: aws.String(username), - SSHPublicKeyId: aws.String(d.Id()), - Encoding: aws.String(encoding), - } - - getResp, err := iamconn.GetSSHPublicKey(request) - if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { // XXX test me - log.Printf("[WARN] No IAM user ssh key (%s) found", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error reading IAM User SSH Key %s: %s", d.Id(), err) - } - - publicKey := *getResp.SSHPublicKey.SSHPublicKeyBody - if encoding == "SSH" { - publicKey = cleanSshKey(publicKey) - } - - d.Set("fingerprint", getResp.SSHPublicKey.Fingerprint) - d.Set("status", getResp.SSHPublicKey.Status) - d.Set("ssh_public_key_id", getResp.SSHPublicKey.SSHPublicKeyId) - d.Set("public_key", publicKey) - return nil -} - -func resourceAwsIamUserSshKeyUpdate(d *schema.ResourceData, meta interface{}) error { - if d.HasChange("status") { - iamconn := meta.(*AWSClient).iamconn - - request := &iam.UpdateSSHPublicKeyInput{ - UserName: aws.String(d.Get("username").(string)), - SSHPublicKeyId: aws.String(d.Id()), - Status: aws.String(d.Get("status").(string)), - } - - log.Println("[DEBUG] Update IAM User SSH Key request:", request) - _, err := iamconn.UpdateSSHPublicKey(request) - if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { - log.Printf("[WARN] No IAM user ssh key by ID (%s) found", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error updating IAM User SSH Key %s: %s", d.Id(), err) - } - } - return resourceAwsIamUserSshKeyRead(d, meta) -} - -func resourceAwsIamUserSshKeyDelete(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn - - request := &iam.DeleteSSHPublicKeyInput{ - UserName: aws.String(d.Get("username").(string)), - SSHPublicKeyId: aws.String(d.Id()), - } - - log.Println("[DEBUG] Delete IAM User SSH Key request:", request) - if _, err := iamconn.DeleteSSHPublicKey(request); err != nil { - return fmt.Errorf("Error deleting IAM User SSH Key %s: %s", d.Id(), err) - } - return nil -} - -func resourceAwsIamUserSshKeyImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.SplitN(d.Id(), ":", 3) - - if len(idParts) != 3 || idParts[0] == "" || idParts[1] == "" || idParts[2] == "" { - return nil, fmt.Errorf("unexpected format of ID (%q), UserName:SSHPublicKeyId:Encoding", d.Id()) - } - - username := idParts[0] - sshPublicKeyId := idParts[1] - encoding := idParts[2] - - d.Set("username", username) - d.Set("ssh_public_key_id", sshPublicKeyId) - d.Set("encoding", encoding) - d.SetId(sshPublicKeyId) - - return []*schema.ResourceData{d}, nil -} - -func cleanSshKey(key string) string { - // Remove comments from SSH Keys - // Comments are anything after "ssh-rsa XXXX" where XXXX is the key. - parts := strings.Split(key, " ") - if len(parts) > 2 { - parts = parts[0:2] - } - return strings.Join(parts, " ") -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_assessment_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_assessment_target.go deleted file mode 100644 index dc34ef660..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_assessment_target.go +++ /dev/null @@ -1,150 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/inspector" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAWSInspectorAssessmentTarget() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsInspectorAssessmentTargetCreate, - Read: resourceAwsInspectorAssessmentTargetRead, - Update: resourceAwsInspectorAssessmentTargetUpdate, - Delete: resourceAwsInspectorAssessmentTargetDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "resource_group_arn": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsInspectorAssessmentTargetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).inspectorconn - - input := &inspector.CreateAssessmentTargetInput{ - AssessmentTargetName: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("resource_group_arn"); ok { - input.ResourceGroupArn = aws.String(v.(string)) - } - - resp, err := conn.CreateAssessmentTarget(input) - if err != nil { - return fmt.Errorf("error creating Inspector Assessment Target: %s", err) - } - - d.SetId(*resp.AssessmentTargetArn) - - return resourceAwsInspectorAssessmentTargetRead(d, meta) -} - -func resourceAwsInspectorAssessmentTargetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).inspectorconn - - assessmentTarget, err := describeInspectorAssessmentTarget(conn, d.Id()) - - if err != nil { - return fmt.Errorf("error describing Inspector Assessment Target (%s): %s", d.Id(), err) - } - - if assessmentTarget == nil { - log.Printf("[WARN] Inspector Assessment Target (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("arn", assessmentTarget.Arn) - d.Set("name", assessmentTarget.Name) - d.Set("resource_group_arn", assessmentTarget.ResourceGroupArn) - - return nil -} - -func resourceAwsInspectorAssessmentTargetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).inspectorconn - - input := inspector.UpdateAssessmentTargetInput{ - AssessmentTargetArn: aws.String(d.Id()), - AssessmentTargetName: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("resource_group_arn"); ok { - input.ResourceGroupArn = aws.String(v.(string)) - } - - _, err := conn.UpdateAssessmentTarget(&input) - if err != nil { - return fmt.Errorf("error updating Inspector Assessment Target (%s): %s", d.Id(), err) - } - - return resourceAwsInspectorAssessmentTargetRead(d, meta) -} - -func resourceAwsInspectorAssessmentTargetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).inspectorconn - - return resource.Retry(60*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteAssessmentTarget(&inspector.DeleteAssessmentTargetInput{ - AssessmentTargetArn: aws.String(d.Id()), - }) - - if isAWSErr(err, inspector.ErrCodeAssessmentRunInProgressException, "") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - -} - -func describeInspectorAssessmentTarget(conn *inspector.Inspector, arn string) (*inspector.AssessmentTarget, error) { - input := &inspector.DescribeAssessmentTargetsInput{ - AssessmentTargetArns: []*string{aws.String(arn)}, - } - - output, err := conn.DescribeAssessmentTargets(input) - - if isAWSErr(err, inspector.ErrCodeInvalidInputException, "") { - return nil, nil - } - - if err != nil { - return nil, err - } - - var assessmentTarget *inspector.AssessmentTarget - for _, target := range output.AssessmentTargets { - if aws.StringValue(target.Arn) == arn { - assessmentTarget = target - break - } - } - - return assessmentTarget, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_assessment_template.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_assessment_template.go deleted file mode 100644 index 3a4b0d918..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_assessment_template.go +++ /dev/null @@ -1,121 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/inspector" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAWSInspectorAssessmentTemplate() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsInspectorAssessmentTemplateCreate, - Read: resourceAwsInspectorAssessmentTemplateRead, - Delete: resourceAwsInspectorAssessmentTemplateDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "target_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - ForceNew: true, - }, - "duration": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "rules_package_arns": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsInspectorAssessmentTemplateCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).inspectorconn - - rules := []*string{} - if attr := d.Get("rules_package_arns").(*schema.Set); attr.Len() > 0 { - rules = expandStringList(attr.List()) - } - - targetArn := d.Get("target_arn").(string) - templateName := d.Get("name").(string) - duration := int64(d.Get("duration").(int)) - - resp, err := conn.CreateAssessmentTemplate(&inspector.CreateAssessmentTemplateInput{ - AssessmentTargetArn: aws.String(targetArn), - AssessmentTemplateName: aws.String(templateName), - DurationInSeconds: aws.Int64(duration), - RulesPackageArns: rules, - }) - if err != nil { - return err - } - log.Printf("[DEBUG] Inspector Assessment Template %s created", *resp.AssessmentTemplateArn) - - d.Set("arn", resp.AssessmentTemplateArn) - - d.SetId(*resp.AssessmentTemplateArn) - - return resourceAwsInspectorAssessmentTemplateRead(d, meta) -} - -func resourceAwsInspectorAssessmentTemplateRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).inspectorconn - - resp, err := conn.DescribeAssessmentTemplates(&inspector.DescribeAssessmentTemplatesInput{ - AssessmentTemplateArns: []*string{ - aws.String(d.Id()), - }, - }, - ) - if err != nil { - if inspectorerr, ok := err.(awserr.Error); ok && inspectorerr.Code() == "InvalidInputException" { - return nil - } else { - log.Printf("[ERROR] Error finding Inspector Assessment Template: %s", err) - return err - } - } - - if resp.AssessmentTemplates != nil && len(resp.AssessmentTemplates) > 0 { - d.Set("name", resp.AssessmentTemplates[0].Name) - } - return nil -} - -func resourceAwsInspectorAssessmentTemplateDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).inspectorconn - - _, err := conn.DeleteAssessmentTemplate(&inspector.DeleteAssessmentTemplateInput{ - AssessmentTemplateArn: aws.String(d.Id()), - }) - if err != nil { - if inspectorerr, ok := err.(awserr.Error); ok && inspectorerr.Code() == "AssessmentRunInProgressException" { - log.Printf("[ERROR] Assement Run in progress: %s", err) - return err - } else { - log.Printf("[ERROR] Error deleting Assement Template: %s", err) - return err - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_resource_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_resource_group.go deleted file mode 100644 index af0cf8180..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_resource_group.go +++ /dev/null @@ -1,73 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/inspector" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAWSInspectorResourceGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsInspectorResourceGroupCreate, - Read: resourceAwsInspectorResourceGroupRead, - Delete: resourceAwsInspectorResourceGroupDelete, - - Schema: map[string]*schema.Schema{ - "tags": { - ForceNew: true, - Type: schema.TypeMap, - Required: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsInspectorResourceGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).inspectorconn - - resp, err := conn.CreateResourceGroup(&inspector.CreateResourceGroupInput{ - ResourceGroupTags: tagsFromMapInspector(d.Get("tags").(map[string]interface{})), - }) - - if err != nil { - return err - } - - d.Set("arn", *resp.ResourceGroupArn) - - d.SetId(*resp.ResourceGroupArn) - - return resourceAwsInspectorResourceGroupRead(d, meta) -} - -func resourceAwsInspectorResourceGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).inspectorconn - - _, err := conn.DescribeResourceGroups(&inspector.DescribeResourceGroupsInput{ - ResourceGroupArns: []*string{ - aws.String(d.Id()), - }, - }) - - if err != nil { - if inspectorerr, ok := err.(awserr.Error); ok && inspectorerr.Code() == "InvalidInputException" { - return nil - } else { - log.Printf("[ERROR] Error finding Inspector resource group: %s", err) - return err - } - } - - return nil -} - -func resourceAwsInspectorResourceGroupDelete(d *schema.ResourceData, meta interface{}) error { - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go deleted file mode 100644 index a66e5d53b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go +++ /dev/null @@ -1,2016 +0,0 @@ -package aws - -import ( - "bytes" - "crypto/sha1" - "encoding/base64" - "encoding/hex" - "errors" - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsInstance() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsInstanceCreate, - Read: resourceAwsInstanceRead, - Update: resourceAwsInstanceUpdate, - Delete: resourceAwsInstanceDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - SchemaVersion: 1, - MigrateState: resourceAwsInstanceMigrateState, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Update: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(20 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "ami": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "associate_public_ip_address": { - Type: schema.TypeBool, - ForceNew: true, - Computed: true, - Optional: true, - }, - - "availability_zone": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "placement_group": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "instance_type": { - Type: schema.TypeString, - Required: true, - }, - - "key_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "get_password_data": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "password_data": { - Type: schema.TypeString, - Computed: true, - }, - - "subnet_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "private_ip": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "source_dest_check": { - Type: schema.TypeBool, - Optional: true, - Default: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - // Suppress diff if network_interface is set - _, ok := d.GetOk("network_interface") - return ok - }, - }, - - "user_data": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"user_data_base64"}, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - // Sometimes the EC2 API responds with the equivalent, empty SHA1 sum - // echo -n "" | shasum - if (old == "da39a3ee5e6b4b0d3255bfef95601890afd80709" && new == "") || - (old == "" && new == "da39a3ee5e6b4b0d3255bfef95601890afd80709") { - return true - } - return false - }, - StateFunc: func(v interface{}) string { - switch v.(type) { - case string: - return userDataHashSum(v.(string)) - default: - return "" - } - }, - ValidateFunc: validation.StringLenBetween(0, 16384), - }, - - "user_data_base64": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"user_data"}, - ValidateFunc: func(v interface{}, name string) (warns []string, errs []error) { - s := v.(string) - if !isBase64Encoded([]byte(s)) { - errs = append(errs, fmt.Errorf( - "%s: must be base64-encoded", name, - )) - } - return - }, - }, - - "security_groups": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "vpc_security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "public_dns": { - Type: schema.TypeString, - Computed: true, - }, - - // TODO: Deprecate me v0.10.0 - "network_interface_id": { - Type: schema.TypeString, - Computed: true, - Deprecated: "Please use `primary_network_interface_id` instead", - }, - - "primary_network_interface_id": { - Type: schema.TypeString, - Computed: true, - }, - - "network_interface": { - ConflictsWith: []string{"associate_public_ip_address", "subnet_id", "private_ip", "vpc_security_group_ids", "security_groups", "ipv6_addresses", "ipv6_address_count", "source_dest_check"}, - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Default: false, - Optional: true, - ForceNew: true, - }, - "network_interface_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "device_index": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - }, - }, - }, - - "public_ip": { - Type: schema.TypeString, - Computed: true, - }, - - "instance_state": { - Type: schema.TypeString, - Computed: true, - }, - - "private_dns": { - Type: schema.TypeString, - Computed: true, - }, - - "ebs_optimized": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - - "disable_api_termination": { - Type: schema.TypeBool, - Optional: true, - }, - - "instance_initiated_shutdown_behavior": { - Type: schema.TypeString, - Optional: true, - }, - - "monitoring": { - Type: schema.TypeBool, - Optional: true, - }, - - "iam_instance_profile": { - Type: schema.TypeString, - Optional: true, - }, - - "ipv6_address_count": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "ipv6_addresses": { - Type: schema.TypeList, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - - "tenancy": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "host_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "cpu_core_count": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "cpu_threads_per_core": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "tags": tagsSchema(), - - "volume_tags": tagsSchemaComputed(), - - "block_device": { - Type: schema.TypeMap, - Optional: true, - Removed: "Split out into three sub-types; see Changelog and Docs", - }, - - "ebs_block_device": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Optional: true, - Default: true, - ForceNew: true, - }, - - "device_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "encrypted": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "iops": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - DiffSuppressFunc: iopsDiffSuppressFunc, - }, - - "snapshot_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "volume_size": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "volume_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "volume_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["device_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["snapshot_id"].(string))) - return hashcode.String(buf.String()) - }, - }, - - "ephemeral_block_device": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "device_name": { - Type: schema.TypeString, - Required: true, - }, - - "virtual_name": { - Type: schema.TypeString, - Optional: true, - }, - - "no_device": { - Type: schema.TypeBool, - Optional: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["device_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["virtual_name"].(string))) - if v, ok := m["no_device"].(bool); ok && v { - buf.WriteString(fmt.Sprintf("%t-", v)) - } - return hashcode.String(buf.String()) - }, - }, - - "root_block_device": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - // "You can only modify the volume size, volume type, and Delete on - // Termination flag on the block device mapping entry for the root - // device volume." - bit.ly/ec2bdmap - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Optional: true, - Default: true, - ForceNew: true, - }, - - "iops": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - DiffSuppressFunc: iopsDiffSuppressFunc, - }, - - "volume_size": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "volume_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "volume_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - - "credit_specification": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cpu_credits": { - Type: schema.TypeString, - Optional: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - // Only work with existing instances - if d.Id() == "" { - return false - } - // Only work with missing configurations - if new != "" { - return false - } - // Only work when already set in Terraform state - if old == "" { - return false - } - return true - }, - }, - }, - }, - }, - }, - } -} - -func iopsDiffSuppressFunc(k, old, new string, d *schema.ResourceData) bool { - // Suppress diff if volume_type is not io1 - i := strings.LastIndexByte(k, '.') - vt := k[:i+1] + "volume_type" - v := d.Get(vt).(string) - return strings.ToLower(v) != ec2.VolumeTypeIo1 -} - -func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - instanceOpts, err := buildAwsInstanceOpts(d, meta) - if err != nil { - return err - } - - // Build the creation struct - runOpts := &ec2.RunInstancesInput{ - BlockDeviceMappings: instanceOpts.BlockDeviceMappings, - DisableApiTermination: instanceOpts.DisableAPITermination, - EbsOptimized: instanceOpts.EBSOptimized, - Monitoring: instanceOpts.Monitoring, - IamInstanceProfile: instanceOpts.IAMInstanceProfile, - ImageId: instanceOpts.ImageID, - InstanceInitiatedShutdownBehavior: instanceOpts.InstanceInitiatedShutdownBehavior, - InstanceType: instanceOpts.InstanceType, - Ipv6AddressCount: instanceOpts.Ipv6AddressCount, - Ipv6Addresses: instanceOpts.Ipv6Addresses, - KeyName: instanceOpts.KeyName, - MaxCount: aws.Int64(int64(1)), - MinCount: aws.Int64(int64(1)), - NetworkInterfaces: instanceOpts.NetworkInterfaces, - Placement: instanceOpts.Placement, - PrivateIpAddress: instanceOpts.PrivateIPAddress, - SecurityGroupIds: instanceOpts.SecurityGroupIDs, - SecurityGroups: instanceOpts.SecurityGroups, - SubnetId: instanceOpts.SubnetID, - UserData: instanceOpts.UserData64, - CreditSpecification: instanceOpts.CreditSpecification, - CpuOptions: instanceOpts.CpuOptions, - } - - _, ipv6CountOk := d.GetOk("ipv6_address_count") - _, ipv6AddressOk := d.GetOk("ipv6_addresses") - - if ipv6AddressOk && ipv6CountOk { - return fmt.Errorf("Only 1 of `ipv6_address_count` or `ipv6_addresses` can be specified") - } - - restricted := meta.(*AWSClient).IsChinaCloud() - if !restricted { - - tagsSpec := make([]*ec2.TagSpecification, 0) - - if v, ok := d.GetOk("tags"); ok { - tags := tagsFromMap(v.(map[string]interface{})) - - spec := &ec2.TagSpecification{ - ResourceType: aws.String("instance"), - Tags: tags, - } - - tagsSpec = append(tagsSpec, spec) - } - - if v, ok := d.GetOk("volume_tags"); ok { - tags := tagsFromMap(v.(map[string]interface{})) - - spec := &ec2.TagSpecification{ - ResourceType: aws.String("volume"), - Tags: tags, - } - - tagsSpec = append(tagsSpec, spec) - } - - if len(tagsSpec) > 0 { - runOpts.TagSpecifications = tagsSpec - } - } - - // Create the instance - log.Printf("[DEBUG] Run configuration: %s", runOpts) - - var runResp *ec2.Reservation - err = resource.Retry(30*time.Second, func() *resource.RetryError { - var err error - runResp, err = conn.RunInstances(runOpts) - // IAM instance profiles can take ~10 seconds to propagate in AWS: - // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console - if isAWSErr(err, "InvalidParameterValue", "Invalid IAM Instance Profile") { - log.Print("[DEBUG] Invalid IAM Instance Profile referenced, retrying...") - return resource.RetryableError(err) - } - // IAM roles can also take time to propagate in AWS: - if isAWSErr(err, "InvalidParameterValue", " has no associated IAM Roles") { - log.Print("[DEBUG] IAM Instance Profile appears to have no IAM roles, retrying...") - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - }) - // Warn if the AWS Error involves group ids, to help identify situation - // where a user uses group ids in security_groups for the Default VPC. - // See https://github.com/hashicorp/terraform/issues/3798 - if isAWSErr(err, "InvalidParameterValue", "groupId is invalid") { - return fmt.Errorf("Error launching instance, possible mismatch of Security Group IDs and Names. See AWS Instance docs here: %s.\n\n\tAWS Error: %s", "https://terraform.io/docs/providers/aws/r/instance.html", err.(awserr.Error).Message()) - } - if err != nil { - return fmt.Errorf("Error launching source instance: %s", err) - } - if runResp == nil || len(runResp.Instances) == 0 { - return errors.New("Error launching source instance: no instances returned in response") - } - - instance := runResp.Instances[0] - log.Printf("[INFO] Instance ID: %s", *instance.InstanceId) - - // Store the resulting ID so we can look this up later - d.SetId(*instance.InstanceId) - - // Wait for the instance to become running so we can get some attributes - // that aren't available until later. - log.Printf( - "[DEBUG] Waiting for instance (%s) to become running", - *instance.InstanceId) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"running"}, - Refresh: InstanceStateRefreshFunc(conn, *instance.InstanceId, []string{"terminated", "shutting-down"}), - Timeout: d.Timeout(schema.TimeoutCreate), - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - instanceRaw, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for instance (%s) to become ready: %s", - *instance.InstanceId, err) - } - - instance = instanceRaw.(*ec2.Instance) - - // Initialize the connection info - if instance.PublicIpAddress != nil { - d.SetConnInfo(map[string]string{ - "type": "ssh", - "host": *instance.PublicIpAddress, - }) - } else if instance.PrivateIpAddress != nil { - d.SetConnInfo(map[string]string{ - "type": "ssh", - "host": *instance.PrivateIpAddress, - }) - } - - // Update if we need to - return resourceAwsInstanceUpdate(d, meta) -} - -func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - resp, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{ - InstanceIds: []*string{aws.String(d.Id())}, - }) - if err != nil { - // If the instance was not found, return nil so that we can show - // that the instance is gone. - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidInstanceID.NotFound" { - d.SetId("") - return nil - } - - // Some other error, report it - return err - } - - // If nothing was found, then return no state - if len(resp.Reservations) == 0 { - d.SetId("") - return nil - } - - instance := resp.Reservations[0].Instances[0] - - if instance.State != nil { - // If the instance is terminated, then it is gone - if *instance.State.Name == "terminated" { - d.SetId("") - return nil - } - - d.Set("instance_state", instance.State.Name) - } - - if instance.Placement != nil { - d.Set("availability_zone", instance.Placement.AvailabilityZone) - } - if instance.Placement.GroupName != nil { - d.Set("placement_group", instance.Placement.GroupName) - } - if instance.Placement.Tenancy != nil { - d.Set("tenancy", instance.Placement.Tenancy) - } - if instance.Placement.HostId != nil { - d.Set("host_id", instance.Placement.HostId) - } - - if instance.CpuOptions != nil { - d.Set("cpu_core_count", instance.CpuOptions.CoreCount) - d.Set("cpu_threads_per_core", instance.CpuOptions.ThreadsPerCore) - } - - d.Set("ami", instance.ImageId) - d.Set("instance_type", instance.InstanceType) - d.Set("key_name", instance.KeyName) - d.Set("public_dns", instance.PublicDnsName) - d.Set("public_ip", instance.PublicIpAddress) - d.Set("private_dns", instance.PrivateDnsName) - d.Set("private_ip", instance.PrivateIpAddress) - d.Set("iam_instance_profile", iamInstanceProfileArnToName(instance.IamInstanceProfile)) - - // Set configured Network Interface Device Index Slice - // We only want to read, and populate state for the configured network_interface attachments. Otherwise, other - // resources have the potential to attach network interfaces to the instance, and cause a perpetual create/destroy - // diff. We should only read on changes configured for this specific resource because of this. - var configuredDeviceIndexes []int - if v, ok := d.GetOk("network_interface"); ok { - vL := v.(*schema.Set).List() - for _, vi := range vL { - mVi := vi.(map[string]interface{}) - configuredDeviceIndexes = append(configuredDeviceIndexes, mVi["device_index"].(int)) - } - } - - var ipv6Addresses []string - if len(instance.NetworkInterfaces) > 0 { - var primaryNetworkInterface ec2.InstanceNetworkInterface - var networkInterfaces []map[string]interface{} - for _, iNi := range instance.NetworkInterfaces { - ni := make(map[string]interface{}) - if *iNi.Attachment.DeviceIndex == 0 { - primaryNetworkInterface = *iNi - } - // If the attached network device is inside our configuration, refresh state with values found. - // Otherwise, assume the network device was attached via an outside resource. - for _, index := range configuredDeviceIndexes { - if index == int(*iNi.Attachment.DeviceIndex) { - ni["device_index"] = *iNi.Attachment.DeviceIndex - ni["network_interface_id"] = *iNi.NetworkInterfaceId - ni["delete_on_termination"] = *iNi.Attachment.DeleteOnTermination - } - } - // Don't add empty network interfaces to schema - if len(ni) == 0 { - continue - } - networkInterfaces = append(networkInterfaces, ni) - } - if err := d.Set("network_interface", networkInterfaces); err != nil { - return fmt.Errorf("Error setting network_interfaces: %v", err) - } - - // Set primary network interface details - // If an instance is shutting down, network interfaces are detached, and attributes may be nil, - // need to protect against nil pointer dereferences - if primaryNetworkInterface.SubnetId != nil { - d.Set("subnet_id", primaryNetworkInterface.SubnetId) - } - if primaryNetworkInterface.NetworkInterfaceId != nil { - d.Set("network_interface_id", primaryNetworkInterface.NetworkInterfaceId) // TODO: Deprecate me v0.10.0 - d.Set("primary_network_interface_id", primaryNetworkInterface.NetworkInterfaceId) - } - if primaryNetworkInterface.Ipv6Addresses != nil { - d.Set("ipv6_address_count", len(primaryNetworkInterface.Ipv6Addresses)) - } - if primaryNetworkInterface.SourceDestCheck != nil { - d.Set("source_dest_check", primaryNetworkInterface.SourceDestCheck) - } - - d.Set("associate_public_ip_address", primaryNetworkInterface.Association != nil) - - for _, address := range primaryNetworkInterface.Ipv6Addresses { - ipv6Addresses = append(ipv6Addresses, *address.Ipv6Address) - } - - } else { - d.Set("subnet_id", instance.SubnetId) - d.Set("network_interface_id", "") // TODO: Deprecate me v0.10.0 - d.Set("primary_network_interface_id", "") - } - - if err := d.Set("ipv6_addresses", ipv6Addresses); err != nil { - log.Printf("[WARN] Error setting ipv6_addresses for AWS Instance (%s): %s", d.Id(), err) - } - - d.Set("ebs_optimized", instance.EbsOptimized) - if instance.SubnetId != nil && *instance.SubnetId != "" { - d.Set("source_dest_check", instance.SourceDestCheck) - } - - if instance.Monitoring != nil && instance.Monitoring.State != nil { - monitoringState := *instance.Monitoring.State - d.Set("monitoring", monitoringState == "enabled" || monitoringState == "pending") - } - - d.Set("tags", tagsToMap(instance.Tags)) - - if err := readVolumeTags(conn, d); err != nil { - return err - } - - if err := readSecurityGroups(d, instance, conn); err != nil { - return err - } - - if err := readBlockDevices(d, instance, conn); err != nil { - return err - } - if _, ok := d.GetOk("ephemeral_block_device"); !ok { - d.Set("ephemeral_block_device", []interface{}{}) - } - - // ARN - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "ec2", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("instance/%s", d.Id()), - } - d.Set("arn", arn.String()) - - // Instance attributes - { - attr, err := conn.DescribeInstanceAttribute(&ec2.DescribeInstanceAttributeInput{ - Attribute: aws.String("disableApiTermination"), - InstanceId: aws.String(d.Id()), - }) - if err != nil { - return err - } - d.Set("disable_api_termination", attr.DisableApiTermination.Value) - } - { - attr, err := conn.DescribeInstanceAttribute(&ec2.DescribeInstanceAttributeInput{ - Attribute: aws.String(ec2.InstanceAttributeNameUserData), - InstanceId: aws.String(d.Id()), - }) - if err != nil { - return err - } - if attr.UserData != nil && attr.UserData.Value != nil { - // Since user_data and user_data_base64 conflict with each other, - // we'll only set one or the other here to avoid a perma-diff. - // Since user_data_base64 was added later, we'll prefer to set - // user_data. - _, b64 := d.GetOk("user_data_base64") - if b64 { - d.Set("user_data_base64", attr.UserData.Value) - } else { - d.Set("user_data", userDataHashSum(*attr.UserData.Value)) - } - } - } - { - creditSpecifications, err := getCreditSpecifications(conn, d.Id()) - if err != nil && !isAWSErr(err, "UnsupportedOperation", "") { - return err - } - if err := d.Set("credit_specification", creditSpecifications); err != nil { - return fmt.Errorf("error setting credit_specification: %s", err) - } - } - - if d.Get("get_password_data").(bool) { - passwordData, err := getAwsEc2InstancePasswordData(*instance.InstanceId, conn) - if err != nil { - return err - } - d.Set("password_data", passwordData) - } else { - d.Set("get_password_data", false) - d.Set("password_data", nil) - } - - return nil -} - -func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - d.Partial(true) - restricted := meta.(*AWSClient).IsChinaCloud() - - if d.HasChange("tags") { - if !d.IsNewResource() || restricted { - if err := setTags(conn, d); err != nil { - return err - } else { - d.SetPartial("tags") - } - } - } - if d.HasChange("volume_tags") { - if !d.IsNewResource() || restricted { - if err := setVolumeTags(conn, d); err != nil { - return err - } else { - d.SetPartial("volume_tags") - } - } - } - - if d.HasChange("iam_instance_profile") && !d.IsNewResource() { - request := &ec2.DescribeIamInstanceProfileAssociationsInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("instance-id"), - Values: []*string{aws.String(d.Id())}, - }, - }, - } - - resp, err := conn.DescribeIamInstanceProfileAssociations(request) - if err != nil { - return err - } - - // An Iam Instance Profile has been provided and is pending a change - // This means it is an association or a replacement to an association - if _, ok := d.GetOk("iam_instance_profile"); ok { - // Does not have an Iam Instance Profile associated with it, need to associate - if len(resp.IamInstanceProfileAssociations) == 0 { - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.AssociateIamInstanceProfile(&ec2.AssociateIamInstanceProfileInput{ - InstanceId: aws.String(d.Id()), - IamInstanceProfile: &ec2.IamInstanceProfileSpecification{ - Name: aws.String(d.Get("iam_instance_profile").(string)), - }, - }) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "Invalid IAM Instance Profile") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - - } else { - // Has an Iam Instance Profile associated with it, need to replace the association - associationId := resp.IamInstanceProfileAssociations[0].AssociationId - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.ReplaceIamInstanceProfileAssociation(&ec2.ReplaceIamInstanceProfileAssociationInput{ - AssociationId: associationId, - IamInstanceProfile: &ec2.IamInstanceProfileSpecification{ - Name: aws.String(d.Get("iam_instance_profile").(string)), - }, - }) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "Invalid IAM Instance Profile") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - } - // An Iam Instance Profile has _not_ been provided but is pending a change. This means there is a pending removal - } else { - if len(resp.IamInstanceProfileAssociations) > 0 { - // Has an Iam Instance Profile associated with it, need to remove the association - associationId := resp.IamInstanceProfileAssociations[0].AssociationId - - _, err := conn.DisassociateIamInstanceProfile(&ec2.DisassociateIamInstanceProfileInput{ - AssociationId: associationId, - }) - if err != nil { - return err - } - } - } - } - - // SourceDestCheck can only be modified on an instance without manually specified network interfaces. - // SourceDestCheck, in that case, is configured at the network interface level - if _, ok := d.GetOk("network_interface"); !ok { - - // If we have a new resource and source_dest_check is still true, don't modify - sourceDestCheck := d.Get("source_dest_check").(bool) - - // Because we're calling Update prior to Read, and the default value of `source_dest_check` is `true`, - // HasChange() thinks there is a diff between what is set on the instance and what is set in state. We need to ensure that - // if a diff has occurred, it's not because it's a new instance. - if d.HasChange("source_dest_check") && !d.IsNewResource() || d.IsNewResource() && !sourceDestCheck { - // SourceDestCheck can only be set on VPC instances - // AWS will return an error of InvalidParameterCombination if we attempt - // to modify the source_dest_check of an instance in EC2 Classic - log.Printf("[INFO] Modifying `source_dest_check` on Instance %s", d.Id()) - _, err := conn.ModifyInstanceAttribute(&ec2.ModifyInstanceAttributeInput{ - InstanceId: aws.String(d.Id()), - SourceDestCheck: &ec2.AttributeBooleanValue{ - Value: aws.Bool(sourceDestCheck), - }, - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - // Tolerate InvalidParameterCombination error in Classic, otherwise - // return the error - if ec2err.Code() != "InvalidParameterCombination" { - return err - } - log.Printf("[WARN] Attempted to modify SourceDestCheck on non VPC instance: %s", ec2err.Message()) - } - } - } - } - - if d.HasChange("vpc_security_group_ids") && !d.IsNewResource() { - var groups []*string - if v := d.Get("vpc_security_group_ids").(*schema.Set); v.Len() > 0 { - for _, v := range v.List() { - groups = append(groups, aws.String(v.(string))) - } - } - - if len(groups) < 1 { - return fmt.Errorf("VPC-based instances require at least one security group to be attached.") - } - // If a user has multiple network interface attachments on the target EC2 instance, simply modifying the - // instance attributes via a `ModifyInstanceAttributes()` request would fail with the following error message: - // "There are multiple interfaces attached to instance 'i-XX'. Please specify an interface ID for the operation instead." - // Thus, we need to actually modify the primary network interface for the new security groups, as the primary - // network interface is where we modify/create security group assignments during Create. - log.Printf("[INFO] Modifying `vpc_security_group_ids` on Instance %q", d.Id()) - instances, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{ - InstanceIds: []*string{aws.String(d.Id())}, - }) - if err != nil { - return err - } - instance := instances.Reservations[0].Instances[0] - var primaryInterface ec2.InstanceNetworkInterface - for _, ni := range instance.NetworkInterfaces { - if *ni.Attachment.DeviceIndex == 0 { - primaryInterface = *ni - } - } - - if primaryInterface.NetworkInterfaceId == nil { - log.Print("[Error] Attempted to set vpc_security_group_ids on an instance without a primary network interface") - return fmt.Errorf( - "Failed to update vpc_security_group_ids on %q, which does not contain a primary network interface", - d.Id()) - } - - if _, err := conn.ModifyNetworkInterfaceAttribute(&ec2.ModifyNetworkInterfaceAttributeInput{ - NetworkInterfaceId: primaryInterface.NetworkInterfaceId, - Groups: groups, - }); err != nil { - return err - } - } - - if d.HasChange("instance_type") && !d.IsNewResource() { - log.Printf("[INFO] Stopping Instance %q for instance_type change", d.Id()) - _, err := conn.StopInstances(&ec2.StopInstancesInput{ - InstanceIds: []*string{aws.String(d.Id())}, - }) - if err != nil { - return fmt.Errorf("error stopping instance (%s): %s", d.Id(), err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"}, - Target: []string{"stopped"}, - Refresh: InstanceStateRefreshFunc(conn, d.Id(), []string{}), - Timeout: d.Timeout(schema.TimeoutUpdate), - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for instance (%s) to stop: %s", d.Id(), err) - } - - log.Printf("[INFO] Modifying instance type %s", d.Id()) - _, err = conn.ModifyInstanceAttribute(&ec2.ModifyInstanceAttributeInput{ - InstanceId: aws.String(d.Id()), - InstanceType: &ec2.AttributeValue{ - Value: aws.String(d.Get("instance_type").(string)), - }, - }) - if err != nil { - return err - } - - log.Printf("[INFO] Starting Instance %q after instance_type change", d.Id()) - _, err = conn.StartInstances(&ec2.StartInstancesInput{ - InstanceIds: []*string{aws.String(d.Id())}, - }) - if err != nil { - return fmt.Errorf("error starting instance (%s): %s", d.Id(), err) - } - - stateConf = &resource.StateChangeConf{ - Pending: []string{"pending", "stopped"}, - Target: []string{"running"}, - Refresh: InstanceStateRefreshFunc(conn, d.Id(), []string{"terminated"}), - Timeout: d.Timeout(schema.TimeoutUpdate), - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for instance (%s) to become ready: %s", - d.Id(), err) - } - } - - if d.HasChange("disable_api_termination") && !d.IsNewResource() { - _, err := conn.ModifyInstanceAttribute(&ec2.ModifyInstanceAttributeInput{ - InstanceId: aws.String(d.Id()), - DisableApiTermination: &ec2.AttributeBooleanValue{ - Value: aws.Bool(d.Get("disable_api_termination").(bool)), - }, - }) - if err != nil { - return err - } - } - - if d.HasChange("instance_initiated_shutdown_behavior") { - log.Printf("[INFO] Modifying instance %s", d.Id()) - _, err := conn.ModifyInstanceAttribute(&ec2.ModifyInstanceAttributeInput{ - InstanceId: aws.String(d.Id()), - InstanceInitiatedShutdownBehavior: &ec2.AttributeValue{ - Value: aws.String(d.Get("instance_initiated_shutdown_behavior").(string)), - }, - }) - if err != nil { - return err - } - } - - if d.HasChange("monitoring") { - var mErr error - if d.Get("monitoring").(bool) { - log.Printf("[DEBUG] Enabling monitoring for Instance (%s)", d.Id()) - _, mErr = conn.MonitorInstances(&ec2.MonitorInstancesInput{ - InstanceIds: []*string{aws.String(d.Id())}, - }) - } else { - log.Printf("[DEBUG] Disabling monitoring for Instance (%s)", d.Id()) - _, mErr = conn.UnmonitorInstances(&ec2.UnmonitorInstancesInput{ - InstanceIds: []*string{aws.String(d.Id())}, - }) - } - if mErr != nil { - return fmt.Errorf("Error updating Instance monitoring: %s", mErr) - } - } - - if d.HasChange("credit_specification") && !d.IsNewResource() { - if v, ok := d.GetOk("credit_specification"); ok { - creditSpecification := v.([]interface{})[0].(map[string]interface{}) - log.Printf("[DEBUG] Modifying credit specification for Instance (%s)", d.Id()) - _, err := conn.ModifyInstanceCreditSpecification(&ec2.ModifyInstanceCreditSpecificationInput{ - InstanceCreditSpecifications: []*ec2.InstanceCreditSpecificationRequest{ - { - InstanceId: aws.String(d.Id()), - CpuCredits: aws.String(creditSpecification["cpu_credits"].(string)), - }, - }, - }) - if err != nil { - return fmt.Errorf("Error updating Instance credit specification: %s", err) - } - } - } - - // TODO(mitchellh): wait for the attributes we modified to - // persist the change... - - d.Partial(false) - - return resourceAwsInstanceRead(d, meta) -} - -func resourceAwsInstanceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - err := awsTerminateInstance(conn, d.Id(), d.Timeout(schema.TimeoutDelete)) - return err -} - -// InstanceStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// an EC2 instance. -func InstanceStateRefreshFunc(conn *ec2.EC2, instanceID string, failStates []string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{ - InstanceIds: []*string{aws.String(instanceID)}, - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidInstanceID.NotFound" { - // Set this to nil as if we didn't find anything. - resp = nil - } else { - log.Printf("Error on InstanceStateRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil || len(resp.Reservations) == 0 || len(resp.Reservations[0].Instances) == 0 { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - i := resp.Reservations[0].Instances[0] - state := *i.State.Name - - for _, failState := range failStates { - if state == failState { - return i, state, fmt.Errorf("Failed to reach target state. Reason: %s", - stringifyStateReason(i.StateReason)) - } - } - - return i, state, nil - } -} - -func stringifyStateReason(sr *ec2.StateReason) string { - if sr.Message != nil { - return *sr.Message - } - if sr.Code != nil { - return *sr.Code - } - - return sr.String() -} - -func readBlockDevices(d *schema.ResourceData, instance *ec2.Instance, conn *ec2.EC2) error { - ibds, err := readBlockDevicesFromInstance(instance, conn) - if err != nil { - return err - } - - if err := d.Set("ebs_block_device", ibds["ebs"]); err != nil { - return err - } - - // This handles the import case which needs to be defaulted to empty - if _, ok := d.GetOk("root_block_device"); !ok { - if err := d.Set("root_block_device", []interface{}{}); err != nil { - return err - } - } - - if ibds["root"] != nil { - roots := []interface{}{ibds["root"]} - if err := d.Set("root_block_device", roots); err != nil { - return err - } - } - - return nil -} - -func readBlockDevicesFromInstance(instance *ec2.Instance, conn *ec2.EC2) (map[string]interface{}, error) { - blockDevices := make(map[string]interface{}) - blockDevices["ebs"] = make([]map[string]interface{}, 0) - blockDevices["root"] = nil - - instanceBlockDevices := make(map[string]*ec2.InstanceBlockDeviceMapping) - for _, bd := range instance.BlockDeviceMappings { - if bd.Ebs != nil { - instanceBlockDevices[*bd.Ebs.VolumeId] = bd - } - } - - if len(instanceBlockDevices) == 0 { - return nil, nil - } - - volIDs := make([]*string, 0, len(instanceBlockDevices)) - for volID := range instanceBlockDevices { - volIDs = append(volIDs, aws.String(volID)) - } - - // Need to call DescribeVolumes to get volume_size and volume_type for each - // EBS block device - volResp, err := conn.DescribeVolumes(&ec2.DescribeVolumesInput{ - VolumeIds: volIDs, - }) - if err != nil { - return nil, err - } - - for _, vol := range volResp.Volumes { - instanceBd := instanceBlockDevices[*vol.VolumeId] - bd := make(map[string]interface{}) - - bd["volume_id"] = *vol.VolumeId - - if instanceBd.Ebs != nil && instanceBd.Ebs.DeleteOnTermination != nil { - bd["delete_on_termination"] = *instanceBd.Ebs.DeleteOnTermination - } - if vol.Size != nil { - bd["volume_size"] = *vol.Size - } - if vol.VolumeType != nil { - bd["volume_type"] = *vol.VolumeType - } - if vol.Iops != nil { - bd["iops"] = *vol.Iops - } - - if blockDeviceIsRoot(instanceBd, instance) { - blockDevices["root"] = bd - } else { - if instanceBd.DeviceName != nil { - bd["device_name"] = *instanceBd.DeviceName - } - if vol.Encrypted != nil { - bd["encrypted"] = *vol.Encrypted - } - if vol.SnapshotId != nil { - bd["snapshot_id"] = *vol.SnapshotId - } - - blockDevices["ebs"] = append(blockDevices["ebs"].([]map[string]interface{}), bd) - } - } - - return blockDevices, nil -} - -func blockDeviceIsRoot(bd *ec2.InstanceBlockDeviceMapping, instance *ec2.Instance) bool { - return bd.DeviceName != nil && - instance.RootDeviceName != nil && - *bd.DeviceName == *instance.RootDeviceName -} - -func fetchRootDeviceName(ami string, conn *ec2.EC2) (*string, error) { - if ami == "" { - return nil, errors.New("Cannot fetch root device name for blank AMI ID.") - } - - log.Printf("[DEBUG] Describing AMI %q to get root block device name", ami) - res, err := conn.DescribeImages(&ec2.DescribeImagesInput{ - ImageIds: []*string{aws.String(ami)}, - }) - if err != nil { - return nil, err - } - - // For a bad image, we just return nil so we don't block a refresh - if len(res.Images) == 0 { - return nil, nil - } - - image := res.Images[0] - rootDeviceName := image.RootDeviceName - - // Instance store backed AMIs do not provide a root device name. - if *image.RootDeviceType == ec2.DeviceTypeInstanceStore { - return nil, nil - } - - // Some AMIs have a RootDeviceName like "/dev/sda1" that does not appear as a - // DeviceName in the BlockDeviceMapping list (which will instead have - // something like "/dev/sda") - // - // While this seems like it breaks an invariant of AMIs, it ends up working - // on the AWS side, and AMIs like this are common enough that we need to - // special case it so Terraform does the right thing. - // - // Our heuristic is: if the RootDeviceName does not appear in the - // BlockDeviceMapping, assume that the DeviceName of the first - // BlockDeviceMapping entry serves as the root device. - rootDeviceNameInMapping := false - for _, bdm := range image.BlockDeviceMappings { - if aws.StringValue(bdm.DeviceName) == aws.StringValue(image.RootDeviceName) { - rootDeviceNameInMapping = true - } - } - - if !rootDeviceNameInMapping && len(image.BlockDeviceMappings) > 0 { - rootDeviceName = image.BlockDeviceMappings[0].DeviceName - } - - if rootDeviceName == nil { - return nil, fmt.Errorf("Error finding Root Device Name for AMI (%s)", ami) - } - - return rootDeviceName, nil -} - -func buildNetworkInterfaceOpts(d *schema.ResourceData, groups []*string, nInterfaces interface{}) []*ec2.InstanceNetworkInterfaceSpecification { - networkInterfaces := []*ec2.InstanceNetworkInterfaceSpecification{} - // Get necessary items - subnet, hasSubnet := d.GetOk("subnet_id") - - if hasSubnet { - // If we have a non-default VPC / Subnet specified, we can flag - // AssociatePublicIpAddress to get a Public IP assigned. By default these are not provided. - // You cannot specify both SubnetId and the NetworkInterface.0.* parameters though, otherwise - // you get: Network interfaces and an instance-level subnet ID may not be specified on the same request - // You also need to attach Security Groups to the NetworkInterface instead of the instance, - // to avoid: Network interfaces and an instance-level security groups may not be specified on - // the same request - ni := &ec2.InstanceNetworkInterfaceSpecification{ - DeviceIndex: aws.Int64(int64(0)), - SubnetId: aws.String(subnet.(string)), - Groups: groups, - } - - if v, ok := d.GetOkExists("associate_public_ip_address"); ok { - ni.AssociatePublicIpAddress = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("private_ip"); ok { - ni.PrivateIpAddress = aws.String(v.(string)) - } - - if v, ok := d.GetOk("ipv6_address_count"); ok { - ni.Ipv6AddressCount = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("ipv6_addresses"); ok { - ipv6Addresses := make([]*ec2.InstanceIpv6Address, len(v.([]interface{}))) - for _, address := range v.([]interface{}) { - ipv6Address := &ec2.InstanceIpv6Address{ - Ipv6Address: aws.String(address.(string)), - } - - ipv6Addresses = append(ipv6Addresses, ipv6Address) - } - - ni.Ipv6Addresses = ipv6Addresses - } - - if v := d.Get("vpc_security_group_ids").(*schema.Set); v.Len() > 0 { - for _, v := range v.List() { - ni.Groups = append(ni.Groups, aws.String(v.(string))) - } - } - - networkInterfaces = append(networkInterfaces, ni) - } else { - // If we have manually specified network interfaces, build and attach those here. - vL := nInterfaces.(*schema.Set).List() - for _, v := range vL { - ini := v.(map[string]interface{}) - ni := &ec2.InstanceNetworkInterfaceSpecification{ - DeviceIndex: aws.Int64(int64(ini["device_index"].(int))), - NetworkInterfaceId: aws.String(ini["network_interface_id"].(string)), - DeleteOnTermination: aws.Bool(ini["delete_on_termination"].(bool)), - } - networkInterfaces = append(networkInterfaces, ni) - } - } - - return networkInterfaces -} - -func readBlockDeviceMappingsFromConfig( - d *schema.ResourceData, conn *ec2.EC2) ([]*ec2.BlockDeviceMapping, error) { - blockDevices := make([]*ec2.BlockDeviceMapping, 0) - - if v, ok := d.GetOk("ebs_block_device"); ok { - vL := v.(*schema.Set).List() - for _, v := range vL { - bd := v.(map[string]interface{}) - ebs := &ec2.EbsBlockDevice{ - DeleteOnTermination: aws.Bool(bd["delete_on_termination"].(bool)), - } - - if v, ok := bd["snapshot_id"].(string); ok && v != "" { - ebs.SnapshotId = aws.String(v) - } - - if v, ok := bd["encrypted"].(bool); ok && v { - ebs.Encrypted = aws.Bool(v) - } - - if v, ok := bd["volume_size"].(int); ok && v != 0 { - ebs.VolumeSize = aws.Int64(int64(v)) - } - - if v, ok := bd["volume_type"].(string); ok && v != "" { - ebs.VolumeType = aws.String(v) - if ec2.VolumeTypeIo1 == strings.ToLower(v) { - // Condition: This parameter is required for requests to create io1 - // volumes; it is not used in requests to create gp2, st1, sc1, or - // standard volumes. - // See: http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html - if v, ok := bd["iops"].(int); ok && v > 0 { - ebs.Iops = aws.Int64(int64(v)) - } - } - } - - blockDevices = append(blockDevices, &ec2.BlockDeviceMapping{ - DeviceName: aws.String(bd["device_name"].(string)), - Ebs: ebs, - }) - } - } - - if v, ok := d.GetOk("ephemeral_block_device"); ok { - vL := v.(*schema.Set).List() - for _, v := range vL { - bd := v.(map[string]interface{}) - bdm := &ec2.BlockDeviceMapping{ - DeviceName: aws.String(bd["device_name"].(string)), - VirtualName: aws.String(bd["virtual_name"].(string)), - } - if v, ok := bd["no_device"].(bool); ok && v { - bdm.NoDevice = aws.String("") - // When NoDevice is true, just ignore VirtualName since it's not needed - bdm.VirtualName = nil - } - - if bdm.NoDevice == nil && aws.StringValue(bdm.VirtualName) == "" { - return nil, errors.New("virtual_name cannot be empty when no_device is false or undefined.") - } - - blockDevices = append(blockDevices, bdm) - } - } - - if v, ok := d.GetOk("root_block_device"); ok { - vL := v.([]interface{}) - if len(vL) > 1 { - return nil, errors.New("Cannot specify more than one root_block_device.") - } - for _, v := range vL { - bd := v.(map[string]interface{}) - ebs := &ec2.EbsBlockDevice{ - DeleteOnTermination: aws.Bool(bd["delete_on_termination"].(bool)), - } - - if v, ok := bd["volume_size"].(int); ok && v != 0 { - ebs.VolumeSize = aws.Int64(int64(v)) - } - - if v, ok := bd["volume_type"].(string); ok && v != "" { - ebs.VolumeType = aws.String(v) - } - - if v, ok := bd["iops"].(int); ok && v > 0 && *ebs.VolumeType == "io1" { - // Only set the iops attribute if the volume type is io1. Setting otherwise - // can trigger a refresh/plan loop based on the computed value that is given - // from AWS, and prevent us from specifying 0 as a valid iops. - // See https://github.com/hashicorp/terraform/pull/4146 - // See https://github.com/hashicorp/terraform/issues/7765 - ebs.Iops = aws.Int64(int64(v)) - } else if v, ok := bd["iops"].(int); ok && v > 0 && *ebs.VolumeType != "io1" { - // Message user about incompatibility - log.Print("[WARN] IOPs is only valid for storate type io1 for EBS Volumes") - } - - if dn, err := fetchRootDeviceName(d.Get("ami").(string), conn); err == nil { - if dn == nil { - return nil, fmt.Errorf( - "Expected 1 AMI for ID: %s, got none", - d.Get("ami").(string)) - } - - blockDevices = append(blockDevices, &ec2.BlockDeviceMapping{ - DeviceName: dn, - Ebs: ebs, - }) - } else { - return nil, err - } - } - } - - return blockDevices, nil -} - -func readVolumeTags(conn *ec2.EC2, d *schema.ResourceData) error { - volumeIds, err := getAwsInstanceVolumeIds(conn, d) - if err != nil { - return err - } - - tagsResp, err := conn.DescribeTags(&ec2.DescribeTagsInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("resource-id"), - Values: volumeIds, - }, - }, - }) - if err != nil { - return err - } - - var tags []*ec2.Tag - - for _, t := range tagsResp.Tags { - tag := &ec2.Tag{ - Key: t.Key, - Value: t.Value, - } - tags = append(tags, tag) - } - - d.Set("volume_tags", tagsToMap(tags)) - - return nil -} - -// Determine whether we're referring to security groups with -// IDs or names. We use a heuristic to figure this out. By default, -// we use IDs if we're in a VPC, and names otherwise (EC2-Classic). -// However, the default VPC accepts either, so store them both here and let the -// config determine which one to use in Plan and Apply. -func readSecurityGroups(d *schema.ResourceData, instance *ec2.Instance, conn *ec2.EC2) error { - // An instance with a subnet is in a VPC; an instance without a subnet is in EC2-Classic. - hasSubnet := instance.SubnetId != nil && *instance.SubnetId != "" - useID, useName := hasSubnet, !hasSubnet - - // If the instance is in a VPC, find out if that VPC is Default to determine - // whether to store names. - if instance.VpcId != nil && *instance.VpcId != "" { - out, err := conn.DescribeVpcs(&ec2.DescribeVpcsInput{ - VpcIds: []*string{instance.VpcId}, - }) - if err != nil { - log.Printf("[WARN] Unable to describe VPC %q: %s", *instance.VpcId, err) - } else if len(out.Vpcs) == 0 { - // This may happen in Eucalyptus Cloud - log.Printf("[WARN] Unable to retrieve VPCs") - } else { - isInDefaultVpc := *out.Vpcs[0].IsDefault - useName = isInDefaultVpc - } - } - - // Build up the security groups - if useID { - sgs := make([]string, 0, len(instance.SecurityGroups)) - for _, sg := range instance.SecurityGroups { - sgs = append(sgs, *sg.GroupId) - } - log.Printf("[DEBUG] Setting Security Group IDs: %#v", sgs) - if err := d.Set("vpc_security_group_ids", sgs); err != nil { - return err - } - } else { - if err := d.Set("vpc_security_group_ids", []string{}); err != nil { - return err - } - } - if useName { - sgs := make([]string, 0, len(instance.SecurityGroups)) - for _, sg := range instance.SecurityGroups { - sgs = append(sgs, *sg.GroupName) - } - log.Printf("[DEBUG] Setting Security Group Names: %#v", sgs) - if err := d.Set("security_groups", sgs); err != nil { - return err - } - } else { - if err := d.Set("security_groups", []string{}); err != nil { - return err - } - } - return nil -} - -func getAwsEc2InstancePasswordData(instanceID string, conn *ec2.EC2) (string, error) { - log.Printf("[INFO] Reading password data for instance %s", instanceID) - - var passwordData string - - err := resource.Retry(15*time.Minute, func() *resource.RetryError { - resp, err := conn.GetPasswordData(&ec2.GetPasswordDataInput{ - InstanceId: aws.String(instanceID), - }) - - if err != nil { - return resource.NonRetryableError(err) - } - - if resp.PasswordData == nil || *resp.PasswordData == "" { - return resource.RetryableError(fmt.Errorf("Password data is blank for instance ID: %s", instanceID)) - } - - passwordData = strings.TrimSpace(*resp.PasswordData) - - log.Printf("[INFO] Password data read for instance %s", instanceID) - return nil - }) - - if err != nil { - return "", err - } - - return passwordData, nil -} - -type awsInstanceOpts struct { - BlockDeviceMappings []*ec2.BlockDeviceMapping - DisableAPITermination *bool - EBSOptimized *bool - Monitoring *ec2.RunInstancesMonitoringEnabled - IAMInstanceProfile *ec2.IamInstanceProfileSpecification - ImageID *string - InstanceInitiatedShutdownBehavior *string - InstanceType *string - Ipv6AddressCount *int64 - Ipv6Addresses []*ec2.InstanceIpv6Address - KeyName *string - NetworkInterfaces []*ec2.InstanceNetworkInterfaceSpecification - Placement *ec2.Placement - PrivateIPAddress *string - SecurityGroupIDs []*string - SecurityGroups []*string - SpotPlacement *ec2.SpotPlacement - SubnetID *string - UserData64 *string - CreditSpecification *ec2.CreditSpecificationRequest - CpuOptions *ec2.CpuOptionsRequest -} - -func buildAwsInstanceOpts( - d *schema.ResourceData, meta interface{}) (*awsInstanceOpts, error) { - conn := meta.(*AWSClient).ec2conn - - instanceType := d.Get("instance_type").(string) - opts := &awsInstanceOpts{ - DisableAPITermination: aws.Bool(d.Get("disable_api_termination").(bool)), - EBSOptimized: aws.Bool(d.Get("ebs_optimized").(bool)), - ImageID: aws.String(d.Get("ami").(string)), - InstanceType: aws.String(instanceType), - } - - // Set default cpu_credits as Unlimited for T3 instance type - if strings.HasPrefix(instanceType, "t3") { - opts.CreditSpecification = &ec2.CreditSpecificationRequest{ - CpuCredits: aws.String("unlimited"), - } - } - - if v, ok := d.GetOk("credit_specification"); ok { - // Only T2 and T3 are burstable performance instance types and supports Unlimited - if strings.HasPrefix(instanceType, "t2") || strings.HasPrefix(instanceType, "t3") { - cs := v.([]interface{})[0].(map[string]interface{}) - opts.CreditSpecification = &ec2.CreditSpecificationRequest{ - CpuCredits: aws.String(cs["cpu_credits"].(string)), - } - } else { - log.Print("[WARN] credit_specification is defined but instance type is not T2/T3. Ignoring...") - } - } - - if v := d.Get("instance_initiated_shutdown_behavior").(string); v != "" { - opts.InstanceInitiatedShutdownBehavior = aws.String(v) - } - - opts.Monitoring = &ec2.RunInstancesMonitoringEnabled{ - Enabled: aws.Bool(d.Get("monitoring").(bool)), - } - - opts.IAMInstanceProfile = &ec2.IamInstanceProfileSpecification{ - Name: aws.String(d.Get("iam_instance_profile").(string)), - } - - userData := d.Get("user_data").(string) - userDataBase64 := d.Get("user_data_base64").(string) - - if userData != "" { - opts.UserData64 = aws.String(base64Encode([]byte(userData))) - } else if userDataBase64 != "" { - opts.UserData64 = aws.String(userDataBase64) - } - - // check for non-default Subnet, and cast it to a String - subnet, hasSubnet := d.GetOk("subnet_id") - subnetID := subnet.(string) - - // Placement is used for aws_instance; SpotPlacement is used for - // aws_spot_instance_request. They represent the same data. :-| - opts.Placement = &ec2.Placement{ - AvailabilityZone: aws.String(d.Get("availability_zone").(string)), - GroupName: aws.String(d.Get("placement_group").(string)), - } - - opts.SpotPlacement = &ec2.SpotPlacement{ - AvailabilityZone: aws.String(d.Get("availability_zone").(string)), - GroupName: aws.String(d.Get("placement_group").(string)), - } - - if v := d.Get("tenancy").(string); v != "" { - opts.Placement.Tenancy = aws.String(v) - } - if v := d.Get("host_id").(string); v != "" { - opts.Placement.HostId = aws.String(v) - } - - if v := d.Get("cpu_core_count").(int); v > 0 { - tc := d.Get("cpu_threads_per_core").(int) - if tc < 0 { - tc = 2 - } - opts.CpuOptions = &ec2.CpuOptionsRequest{ - CoreCount: aws.Int64(int64(v)), - ThreadsPerCore: aws.Int64(int64(tc)), - } - } - - var groups []*string - if v := d.Get("security_groups"); v != nil { - // Security group names. - // For a nondefault VPC, you must use security group IDs instead. - // See http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html - sgs := v.(*schema.Set).List() - if len(sgs) > 0 && hasSubnet { - log.Print("[WARN] Deprecated. Attempting to use 'security_groups' within a VPC instance. Use 'vpc_security_group_ids' instead.") - } - for _, v := range sgs { - str := v.(string) - groups = append(groups, aws.String(str)) - } - } - - networkInterfaces, interfacesOk := d.GetOk("network_interface") - - // If setting subnet and public address, OR manual network interfaces, populate those now. - if hasSubnet || interfacesOk { - // Otherwise we're attaching (a) network interface(s) - opts.NetworkInterfaces = buildNetworkInterfaceOpts(d, groups, networkInterfaces) - } else { - // If simply specifying a subnetID, privateIP, Security Groups, or VPC Security Groups, build these now - if subnetID != "" { - opts.SubnetID = aws.String(subnetID) - } - - if v, ok := d.GetOk("private_ip"); ok { - opts.PrivateIPAddress = aws.String(v.(string)) - } - if opts.SubnetID != nil && - *opts.SubnetID != "" { - opts.SecurityGroupIDs = groups - } else { - opts.SecurityGroups = groups - } - - if v, ok := d.GetOk("ipv6_address_count"); ok { - opts.Ipv6AddressCount = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("ipv6_addresses"); ok { - ipv6Addresses := make([]*ec2.InstanceIpv6Address, len(v.([]interface{}))) - for _, address := range v.([]interface{}) { - ipv6Address := &ec2.InstanceIpv6Address{ - Ipv6Address: aws.String(address.(string)), - } - - ipv6Addresses = append(ipv6Addresses, ipv6Address) - } - - opts.Ipv6Addresses = ipv6Addresses - } - - if v := d.Get("vpc_security_group_ids").(*schema.Set); v.Len() > 0 { - for _, v := range v.List() { - opts.SecurityGroupIDs = append(opts.SecurityGroupIDs, aws.String(v.(string))) - } - } - } - - if v, ok := d.GetOk("key_name"); ok { - opts.KeyName = aws.String(v.(string)) - } - - blockDevices, err := readBlockDeviceMappingsFromConfig(d, conn) - if err != nil { - return nil, err - } - if len(blockDevices) > 0 { - opts.BlockDeviceMappings = blockDevices - } - return opts, nil -} - -func awsTerminateInstance(conn *ec2.EC2, id string, timeout time.Duration) error { - log.Printf("[INFO] Terminating instance: %s", id) - req := &ec2.TerminateInstancesInput{ - InstanceIds: []*string{aws.String(id)}, - } - if _, err := conn.TerminateInstances(req); err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidInstanceID.NotFound" { - return nil - } - return fmt.Errorf("Error terminating instance: %s", err) - } - - return waitForInstanceDeletion(conn, id, timeout) -} - -func waitForInstanceDeletion(conn *ec2.EC2, id string, timeout time.Duration) error { - log.Printf("[DEBUG] Waiting for instance (%s) to become terminated", id) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"}, - Target: []string{"terminated"}, - Refresh: InstanceStateRefreshFunc(conn, id, []string{}), - Timeout: timeout, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for instance (%s) to terminate: %s", id, err) - } - - return nil -} - -func iamInstanceProfileArnToName(ip *ec2.IamInstanceProfile) string { - if ip == nil || ip.Arn == nil { - return "" - } - parts := strings.Split(*ip.Arn, "/") - return parts[len(parts)-1] -} - -func userDataHashSum(user_data string) string { - // Check whether the user_data is not Base64 encoded. - // Always calculate hash of base64 decoded value since we - // check against double-encoding when setting it - v, base64DecodeError := base64.StdEncoding.DecodeString(user_data) - if base64DecodeError != nil { - v = []byte(user_data) - } - - hash := sha1.Sum(v) - return hex.EncodeToString(hash[:]) -} - -func getAwsInstanceVolumeIds(conn *ec2.EC2, d *schema.ResourceData) ([]*string, error) { - volumeIds := make([]*string, 0) - - opts := &ec2.DescribeVolumesInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("attachment.instance-id"), - Values: []*string{aws.String(d.Id())}, - }, - }, - } - - resp, err := conn.DescribeVolumes(opts) - if err != nil { - return nil, err - } - - for _, v := range resp.Volumes { - volumeIds = append(volumeIds, v.VolumeId) - } - - return volumeIds, nil -} - -func getCreditSpecifications(conn *ec2.EC2, instanceId string) ([]map[string]interface{}, error) { - var creditSpecifications []map[string]interface{} - creditSpecification := make(map[string]interface{}) - - attr, err := conn.DescribeInstanceCreditSpecifications(&ec2.DescribeInstanceCreditSpecificationsInput{ - InstanceIds: []*string{aws.String(instanceId)}, - }) - if err != nil { - return creditSpecifications, err - } - if len(attr.InstanceCreditSpecifications) > 0 { - creditSpecification["cpu_credits"] = aws.StringValue(attr.InstanceCreditSpecifications[0].CpuCredits) - creditSpecifications = append(creditSpecifications, creditSpecification) - } - - return creditSpecifications, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance_migrate.go deleted file mode 100644 index 31f28b39f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance_migrate.go +++ /dev/null @@ -1,111 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - "strings" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsInstanceMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS Instance State v0; migrating to v1") - return migrateAwsInstanceStateV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateAwsInstanceStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() || is.Attributes == nil { - log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") - return is, nil - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - - // Delete old count - delete(is.Attributes, "block_device.#") - - oldBds, err := readV0BlockDevices(is) - if err != nil { - return is, err - } - // seed count fields for new types - is.Attributes["ebs_block_device.#"] = "0" - is.Attributes["ephemeral_block_device.#"] = "0" - // depending on if state was v0.3.7 or an earlier version, it might have - // root_block_device defined already - if _, ok := is.Attributes["root_block_device.#"]; !ok { - is.Attributes["root_block_device.#"] = "0" - } - for _, oldBd := range oldBds { - if err := writeV1BlockDevice(is, oldBd); err != nil { - return is, err - } - } - log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) - return is, nil -} - -func readV0BlockDevices(is *terraform.InstanceState) (map[string]map[string]string, error) { - oldBds := make(map[string]map[string]string) - for k, v := range is.Attributes { - if !strings.HasPrefix(k, "block_device.") { - continue - } - path := strings.Split(k, ".") - if len(path) != 3 { - return oldBds, fmt.Errorf("Found unexpected block_device field: %#v", k) - } - hashcode, attribute := path[1], path[2] - oldBd, ok := oldBds[hashcode] - if !ok { - oldBd = make(map[string]string) - oldBds[hashcode] = oldBd - } - oldBd[attribute] = v - delete(is.Attributes, k) - } - return oldBds, nil -} - -func writeV1BlockDevice( - is *terraform.InstanceState, oldBd map[string]string) error { - code := hashcode.String(oldBd["device_name"]) - bdType := "ebs_block_device" - if vn, ok := oldBd["virtual_name"]; ok && strings.HasPrefix(vn, "ephemeral") { - bdType = "ephemeral_block_device" - } else if dn, ok := oldBd["device_name"]; ok && dn == "/dev/sda1" { - bdType = "root_block_device" - } - - switch bdType { - case "ebs_block_device": - delete(oldBd, "virtual_name") - case "root_block_device": - delete(oldBd, "virtual_name") - delete(oldBd, "encrypted") - delete(oldBd, "snapshot_id") - case "ephemeral_block_device": - delete(oldBd, "delete_on_termination") - delete(oldBd, "encrypted") - delete(oldBd, "iops") - delete(oldBd, "volume_size") - delete(oldBd, "volume_type") - } - for attr, val := range oldBd { - attrKey := fmt.Sprintf("%s.%d.%s", bdType, code, attr) - is.Attributes[attrKey] = val - } - - countAttr := fmt.Sprintf("%s.#", bdType) - count, _ := strconv.Atoi(is.Attributes[countAttr]) - is.Attributes[countAttr] = strconv.Itoa(count + 1) - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_internet_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_internet_gateway.go deleted file mode 100644 index befc93f29..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_internet_gateway.go +++ /dev/null @@ -1,390 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsInternetGateway() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsInternetGatewayCreate, - Read: resourceAwsInternetGatewayRead, - Update: resourceAwsInternetGatewayUpdate, - Delete: resourceAwsInternetGatewayDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Optional: true, - }, - "tags": tagsSchema(), - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsInternetGatewayCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Create the gateway - log.Printf("[DEBUG] Creating internet gateway") - var err error - resp, err := conn.CreateInternetGateway(nil) - if err != nil { - return fmt.Errorf("Error creating internet gateway: %s", err) - } - - // Get the ID and store it - ig := *resp.InternetGateway - d.SetId(*ig.InternetGatewayId) - log.Printf("[INFO] InternetGateway ID: %s", d.Id()) - - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - igRaw, _, err := IGStateRefreshFunc(conn, d.Id())() - if igRaw != nil { - return nil - } - if err == nil { - return resource.RetryableError(err) - } else { - return resource.NonRetryableError(err) - } - }) - - if err != nil { - return fmt.Errorf("%s", err) - } - - err = setTags(conn, d) - if err != nil { - return err - } - - // Attach the new gateway to the correct vpc - err = resourceAwsInternetGatewayAttach(d, meta) - if err != nil { - return fmt.Errorf("error attaching EC2 Internet Gateway (%s): %s", d.Id(), err) - } - - return resourceAwsInternetGatewayRead(d, meta) -} - -func resourceAwsInternetGatewayRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - igRaw, _, err := IGStateRefreshFunc(conn, d.Id())() - if err != nil { - return err - } - if igRaw == nil { - // Seems we have lost our internet gateway - d.SetId("") - return nil - } - - ig := igRaw.(*ec2.InternetGateway) - if len(ig.Attachments) == 0 { - // Gateway exists but not attached to the VPC - d.Set("vpc_id", "") - } else { - d.Set("vpc_id", ig.Attachments[0].VpcId) - } - - d.Set("tags", tagsToMap(ig.Tags)) - d.Set("owner_id", ig.OwnerId) - - return nil -} - -func resourceAwsInternetGatewayUpdate(d *schema.ResourceData, meta interface{}) error { - if d.HasChange("vpc_id") { - // If we're already attached, detach it first - if err := resourceAwsInternetGatewayDetach(d, meta); err != nil { - return err - } - - // Attach the gateway to the new vpc - if err := resourceAwsInternetGatewayAttach(d, meta); err != nil { - return err - } - } - - conn := meta.(*AWSClient).ec2conn - - if err := setTags(conn, d); err != nil { - return err - } - - d.SetPartial("tags") - - return resourceAwsInternetGatewayRead(d, meta) -} - -func resourceAwsInternetGatewayDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Detach if it is attached - if err := resourceAwsInternetGatewayDetach(d, meta); err != nil { - return err - } - - log.Printf("[INFO] Deleting Internet Gateway: %s", d.Id()) - - return resource.Retry(10*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteInternetGateway(&ec2.DeleteInternetGatewayInput{ - InternetGatewayId: aws.String(d.Id()), - }) - if err == nil { - return nil - } - - ec2err, ok := err.(awserr.Error) - if !ok { - return resource.RetryableError(err) - } - - switch ec2err.Code() { - case "InvalidInternetGatewayID.NotFound": - return nil - case "DependencyViolation": - return resource.RetryableError(err) // retry - } - - return resource.NonRetryableError(err) - }) -} - -func resourceAwsInternetGatewayAttach(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - if d.Get("vpc_id").(string) == "" { - log.Printf( - "[DEBUG] Not attaching Internet Gateway '%s' as no VPC ID is set", - d.Id()) - return nil - } - - log.Printf( - "[INFO] Attaching Internet Gateway '%s' to VPC '%s'", - d.Id(), - d.Get("vpc_id").(string)) - - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - _, err := conn.AttachInternetGateway(&ec2.AttachInternetGatewayInput{ - InternetGatewayId: aws.String(d.Id()), - VpcId: aws.String(d.Get("vpc_id").(string)), - }) - if err == nil { - return nil - } - if ec2err, ok := err.(awserr.Error); ok { - switch ec2err.Code() { - case "InvalidInternetGatewayID.NotFound": - return resource.RetryableError(err) // retry - } - } - return resource.NonRetryableError(err) - }) - if err != nil { - return err - } - - // A note on the states below: the AWS docs (as of July, 2014) say - // that the states would be: attached, attaching, detached, detaching, - // but when running, I noticed that the state is usually "available" when - // it is attached. - - // Wait for it to be fully attached before continuing - log.Printf("[DEBUG] Waiting for internet gateway (%s) to attach", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"detached", "attaching"}, - Target: []string{"available"}, - Refresh: IGAttachStateRefreshFunc(conn, d.Id(), "available"), - Timeout: 4 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for internet gateway (%s) to attach: %s", - d.Id(), err) - } - - return nil -} - -func resourceAwsInternetGatewayDetach(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Get the old VPC ID to detach from - vpcID, _ := d.GetChange("vpc_id") - - if vpcID.(string) == "" { - log.Printf( - "[DEBUG] Not detaching Internet Gateway '%s' as no VPC ID is set", - d.Id()) - return nil - } - - log.Printf( - "[INFO] Detaching Internet Gateway '%s' from VPC '%s'", - d.Id(), - vpcID.(string)) - - // Wait for it to be fully detached before continuing - log.Printf("[DEBUG] Waiting for internet gateway (%s) to detach", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"detaching"}, - Target: []string{"detached"}, - Refresh: detachIGStateRefreshFunc(conn, d.Id(), vpcID.(string)), - Timeout: 15 * time.Minute, - Delay: 10 * time.Second, - NotFoundChecks: 30, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for internet gateway (%s) to detach: %s", - d.Id(), err) - } - - return nil -} - -// InstanceStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// an EC2 instance. -func detachIGStateRefreshFunc(conn *ec2.EC2, gatewayID, vpcID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - _, err := conn.DetachInternetGateway(&ec2.DetachInternetGatewayInput{ - InternetGatewayId: aws.String(gatewayID), - VpcId: aws.String(vpcID), - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - switch ec2err.Code() { - case "InvalidInternetGatewayID.NotFound": - log.Printf("[TRACE] Error detaching Internet Gateway '%s' from VPC '%s': %s", gatewayID, vpcID, err) - return nil, "", nil - - case "Gateway.NotAttached": - return 42, "detached", nil - - case "DependencyViolation": - // This can be caused by associated public IPs left (e.g. by ELBs) - // and here we find and log which ones are to blame - out, err := findPublicNetworkInterfacesForVpcID(conn, vpcID) - if err != nil { - return 42, "detaching", err - } - if len(out.NetworkInterfaces) > 0 { - log.Printf("[DEBUG] Waiting for the following %d ENIs to be gone: %s", - len(out.NetworkInterfaces), out.NetworkInterfaces) - } - - return 42, "detaching", nil - } - } - return 42, "", err - } - - // DetachInternetGateway only returns an error, so if it's nil, assume we're - // detached - return 42, "detached", nil - } -} - -func findPublicNetworkInterfacesForVpcID(conn *ec2.EC2, vpcID string) (*ec2.DescribeNetworkInterfacesOutput, error) { - return conn.DescribeNetworkInterfaces(&ec2.DescribeNetworkInterfacesInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("vpc-id"), - Values: []*string{aws.String(vpcID)}, - }, - { - Name: aws.String("association.public-ip"), - Values: []*string{aws.String("*")}, - }, - }, - }) -} - -// IGStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// an internet gateway. -func IGStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeInternetGateways(&ec2.DescribeInternetGatewaysInput{ - InternetGatewayIds: []*string{aws.String(id)}, - }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if ok && ec2err.Code() == "InvalidInternetGatewayID.NotFound" { - resp = nil - } else { - log.Printf("[ERROR] Error on IGStateRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - ig := resp.InternetGateways[0] - return ig, "available", nil - } -} - -// IGAttachStateRefreshFunc returns a resource.StateRefreshFunc that is used -// watch the state of an internet gateway's attachment. -func IGAttachStateRefreshFunc(conn *ec2.EC2, id string, expected string) resource.StateRefreshFunc { - var start time.Time - return func() (interface{}, string, error) { - if start.IsZero() { - start = time.Now() - } - - resp, err := conn.DescribeInternetGateways(&ec2.DescribeInternetGatewaysInput{ - InternetGatewayIds: []*string{aws.String(id)}, - }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if ok && ec2err.Code() == "InvalidInternetGatewayID.NotFound" { - resp = nil - } else { - log.Printf("[ERROR] Error on IGStateRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - ig := resp.InternetGateways[0] - - if time.Since(start) > 10*time.Second { - return ig, expected, nil - } - - if len(ig.Attachments) == 0 { - // No attachments, we're detached - return ig, "detached", nil - } - - return ig, *ig.Attachments[0].State, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_certificate.go deleted file mode 100644 index 48949fd05..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_certificate.go +++ /dev/null @@ -1,119 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iot" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIotCertificate() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIotCertificateCreate, - Read: resourceAwsIotCertificateRead, - Update: resourceAwsIotCertificateUpdate, - Delete: resourceAwsIotCertificateDelete, - Schema: map[string]*schema.Schema{ - "csr": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "active": { - Type: schema.TypeBool, - Required: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsIotCertificateCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - log.Printf("[DEBUG] Creating certificate from csr") - out, err := conn.CreateCertificateFromCsr(&iot.CreateCertificateFromCsrInput{ - CertificateSigningRequest: aws.String(d.Get("csr").(string)), - SetAsActive: aws.Bool(d.Get("active").(bool)), - }) - - if err != nil { - log.Printf("[ERROR] %s", err) - return err - } - log.Printf("[DEBUG] Created certificate from csr") - - d.SetId(*out.CertificateId) - - return resourceAwsIotCertificateRead(d, meta) -} - -func resourceAwsIotCertificateRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - out, err := conn.DescribeCertificate(&iot.DescribeCertificateInput{ - CertificateId: aws.String(d.Id()), - }) - - if err != nil { - log.Printf("[ERROR] %s", err) - return err - } - - d.Set("active", aws.Bool(*out.CertificateDescription.Status == iot.CertificateStatusActive)) - d.Set("arn", out.CertificateDescription.CertificateArn) - - return nil -} - -func resourceAwsIotCertificateUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - if d.HasChange("active") { - status := iot.CertificateStatusInactive - if d.Get("active").(bool) { - status = iot.CertificateStatusActive - } - - _, err := conn.UpdateCertificate(&iot.UpdateCertificateInput{ - CertificateId: aws.String(d.Id()), - NewStatus: aws.String(status), - }) - - if err != nil { - log.Printf("[ERROR] %s", err) - return err - } - } - - return resourceAwsIotCertificateRead(d, meta) -} - -func resourceAwsIotCertificateDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - _, err := conn.UpdateCertificate(&iot.UpdateCertificateInput{ - CertificateId: aws.String(d.Id()), - NewStatus: aws.String("INACTIVE"), - }) - - if err != nil { - log.Printf("[ERROR], %s", err) - return err - } - - _, err = conn.DeleteCertificate(&iot.DeleteCertificateInput{ - CertificateId: aws.String(d.Id()), - }) - - if err != nil { - log.Printf("[ERROR] %s", err) - return err - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_policy.go deleted file mode 100644 index 724540e74..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_policy.go +++ /dev/null @@ -1,131 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iot" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIotPolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIotPolicyCreate, - Read: resourceAwsIotPolicyRead, - Update: resourceAwsIotPolicyUpdate, - Delete: resourceAwsIotPolicyDelete, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "policy": { - Type: schema.TypeString, - Required: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "default_version_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsIotPolicyCreate(d *schema.ResourceData, meta interface{}) error { - - conn := meta.(*AWSClient).iotconn - - out, err := conn.CreatePolicy(&iot.CreatePolicyInput{ - PolicyName: aws.String(d.Get("name").(string)), - PolicyDocument: aws.String(d.Get("policy").(string)), - }) - - if err != nil { - log.Printf("[ERROR] %s", err) - return err - } - - d.SetId(*out.PolicyName) - - return resourceAwsIotPolicyRead(d, meta) -} - -func resourceAwsIotPolicyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - out, err := conn.GetPolicy(&iot.GetPolicyInput{ - PolicyName: aws.String(d.Id()), - }) - - if err != nil { - log.Printf("[ERROR] %s", err) - return err - } - - d.Set("arn", out.PolicyArn) - d.Set("default_version_id", out.DefaultVersionId) - - return nil -} - -func resourceAwsIotPolicyUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - if d.HasChange("policy") { - _, err := conn.CreatePolicyVersion(&iot.CreatePolicyVersionInput{ - PolicyName: aws.String(d.Id()), - PolicyDocument: aws.String(d.Get("policy").(string)), - SetAsDefault: aws.Bool(true), - }) - - if err != nil { - log.Printf("[ERROR] %s", err) - return err - } - } - - return resourceAwsIotPolicyRead(d, meta) -} - -func resourceAwsIotPolicyDelete(d *schema.ResourceData, meta interface{}) error { - - conn := meta.(*AWSClient).iotconn - - out, err := conn.ListPolicyVersions(&iot.ListPolicyVersionsInput{ - PolicyName: aws.String(d.Id()), - }) - - if err != nil { - return err - } - - // Delete all non-default versions of the policy - for _, ver := range out.PolicyVersions { - if !*ver.IsDefaultVersion { - _, err = conn.DeletePolicyVersion(&iot.DeletePolicyVersionInput{ - PolicyName: aws.String(d.Id()), - PolicyVersionId: ver.VersionId, - }) - if err != nil { - log.Printf("[ERROR] %s", err) - return err - } - } - } - - //Delete default policy version - _, err = conn.DeletePolicy(&iot.DeletePolicyInput{ - PolicyName: aws.String(d.Id()), - }) - - if err != nil { - log.Printf("[ERROR] %s", err) - return err - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_policy_attachment.go deleted file mode 100644 index eba80e6fe..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_policy_attachment.go +++ /dev/null @@ -1,137 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iot" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIotPolicyAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIotPolicyAttachmentCreate, - Read: resourceAwsIotPolicyAttachmentRead, - Delete: resourceAwsIotPolicyAttachmentDelete, - Schema: map[string]*schema.Schema{ - "policy": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "target": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsIotPolicyAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - policyName := d.Get("policy").(string) - target := d.Get("target").(string) - - _, err := conn.AttachPolicy(&iot.AttachPolicyInput{ - PolicyName: aws.String(policyName), - Target: aws.String(target), - }) - - if err != nil { - return fmt.Errorf("error attaching policy %s to target %s: %s", policyName, target, err) - } - - d.SetId(fmt.Sprintf("%s|%s", policyName, target)) - return resourceAwsIotPolicyAttachmentRead(d, meta) -} - -func listIotPolicyAttachmentPages(conn *iot.IoT, input *iot.ListAttachedPoliciesInput, - fn func(out *iot.ListAttachedPoliciesOutput, lastPage bool) bool) error { - for { - page, err := conn.ListAttachedPolicies(input) - if err != nil { - return err - } - lastPage := page.NextMarker == nil - - shouldContinue := fn(page, lastPage) - if !shouldContinue || lastPage { - break - } - input.Marker = page.NextMarker - } - return nil -} - -func getIotPolicyAttachment(conn *iot.IoT, target, policyName string) (*iot.Policy, error) { - var policy *iot.Policy - - input := &iot.ListAttachedPoliciesInput{ - PageSize: aws.Int64(250), - Recursive: aws.Bool(false), - Target: aws.String(target), - } - - err := listIotPolicyAttachmentPages(conn, input, func(out *iot.ListAttachedPoliciesOutput, lastPage bool) bool { - for _, att := range out.Policies { - if policyName == aws.StringValue(att.PolicyName) { - policy = att - return false - } - } - return true - }) - - return policy, err -} - -func resourceAwsIotPolicyAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - policyName := d.Get("policy").(string) - target := d.Get("target").(string) - - var policy *iot.Policy - - policy, err := getIotPolicyAttachment(conn, target, policyName) - - if err != nil { - return fmt.Errorf("error listing policy attachments for target %s: %s", target, err) - } - - if policy == nil { - log.Printf("[WARN] IOT Policy Attachment (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return nil -} - -func resourceAwsIotPolicyAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - policyName := d.Get("policy").(string) - target := d.Get("target").(string) - - _, err := conn.DetachPolicy(&iot.DetachPolicyInput{ - PolicyName: aws.String(policyName), - Target: aws.String(target), - }) - - // DetachPolicy doesn't return an error if the policy doesn't exist, - // but it returns an error if the Target is not found. - if isAWSErr(err, iot.ErrCodeInvalidRequestException, "Invalid Target") { - log.Printf("[WARN] IOT target (%s) not found, removing attachment to policy (%s) from state", target, policyName) - return nil - } - - if err != nil { - return fmt.Errorf("error detaching policy %s from target %s: %s", policyName, target, err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing.go deleted file mode 100644 index 3fef149f8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing.go +++ /dev/null @@ -1,162 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iot" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsIotThing() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIotThingCreate, - Read: resourceAwsIotThingRead, - Update: resourceAwsIotThingUpdate, - Delete: resourceAwsIotThingDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 128), - }, - "attributes": { - Type: schema.TypeMap, - Optional: true, - }, - "thing_type_name": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(1, 128), - }, - "default_client_id": { - Type: schema.TypeString, - Computed: true, - }, - "version": { - Type: schema.TypeInt, - Computed: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsIotThingCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - params := &iot.CreateThingInput{ - ThingName: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("thing_type_name"); ok { - params.ThingTypeName = aws.String(v.(string)) - } - if v, ok := d.GetOk("attributes"); ok { - params.AttributePayload = &iot.AttributePayload{ - Attributes: stringMapToPointers(v.(map[string]interface{})), - } - } - - log.Printf("[DEBUG] Creating IoT Thing: %s", params) - out, err := conn.CreateThing(params) - if err != nil { - return err - } - - d.SetId(*out.ThingName) - - return resourceAwsIotThingRead(d, meta) -} - -func resourceAwsIotThingRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - params := &iot.DescribeThingInput{ - ThingName: aws.String(d.Id()), - } - log.Printf("[DEBUG] Reading IoT Thing: %s", params) - out, err := conn.DescribeThing(params) - - if err != nil { - if isAWSErr(err, iot.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] IoT Thing %q not found, removing from state", d.Id()) - d.SetId("") - } - return err - } - - log.Printf("[DEBUG] Received IoT Thing: %s", out) - - d.Set("arn", out.ThingArn) - d.Set("name", out.ThingName) - d.Set("attributes", aws.StringValueMap(out.Attributes)) - d.Set("default_client_id", out.DefaultClientId) - d.Set("thing_type_name", out.ThingTypeName) - d.Set("version", out.Version) - - return nil -} - -func resourceAwsIotThingUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - params := &iot.UpdateThingInput{ - ThingName: aws.String(d.Get("name").(string)), - } - if d.HasChange("thing_type_name") { - if v, ok := d.GetOk("thing_type_name"); ok { - params.ThingTypeName = aws.String(v.(string)) - } else { - params.RemoveThingType = aws.Bool(true) - } - } - if d.HasChange("attributes") { - attributes := map[string]*string{} - - if v, ok := d.GetOk("attributes"); ok { - if m, ok := v.(map[string]interface{}); ok { - attributes = stringMapToPointers(m) - } - } - params.AttributePayload = &iot.AttributePayload{ - Attributes: attributes, - } - } - - _, err := conn.UpdateThing(params) - if err != nil { - return err - } - - return resourceAwsIotThingRead(d, meta) -} - -func resourceAwsIotThingDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - params := &iot.DeleteThingInput{ - ThingName: aws.String(d.Id()), - } - log.Printf("[DEBUG] Deleting IoT Thing: %s", params) - - _, err := conn.DeleteThing(params) - if err != nil { - if isAWSErr(err, iot.ErrCodeResourceNotFoundException, "") { - return nil - } - return err - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_principal_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_principal_attachment.go deleted file mode 100644 index 4cc9e9395..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_principal_attachment.go +++ /dev/null @@ -1,109 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iot" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIotThingPrincipalAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIotThingPrincipalAttachmentCreate, - Read: resourceAwsIotThingPrincipalAttachmentRead, - Delete: resourceAwsIotThingPrincipalAttachmentDelete, - - Schema: map[string]*schema.Schema{ - "principal": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "thing": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsIotThingPrincipalAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - principal := d.Get("principal").(string) - thing := d.Get("thing").(string) - - _, err := conn.AttachThingPrincipal(&iot.AttachThingPrincipalInput{ - Principal: aws.String(principal), - ThingName: aws.String(thing), - }) - - if err != nil { - return fmt.Errorf("error attaching principal %s to thing %s: %s", principal, thing, err) - } - - d.SetId(fmt.Sprintf("%s|%s", thing, principal)) - return resourceAwsIotThingPrincipalAttachmentRead(d, meta) -} - -func getIoTThingPricipalAttachment(conn *iot.IoT, thing, principal string) (bool, error) { - out, err := conn.ListThingPrincipals(&iot.ListThingPrincipalsInput{ - ThingName: aws.String(thing), - }) - if isAWSErr(err, iot.ErrCodeResourceNotFoundException, "") { - return false, nil - } else if err != nil { - return false, err - } - found := false - for _, name := range out.Principals { - if principal == aws.StringValue(name) { - found = true - break - } - } - return found, nil -} - -func resourceAwsIotThingPrincipalAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - principal := d.Get("principal").(string) - thing := d.Get("thing").(string) - - found, err := getIoTThingPricipalAttachment(conn, thing, principal) - - if err != nil { - return fmt.Errorf("error listing principals for thing %s: %s", thing, err) - } - - if !found { - log.Printf("[WARN] IoT Thing Principal Attachment (%s) not found, removing from state", d.Id()) - d.SetId("") - } - - return nil -} - -func resourceAwsIotThingPrincipalAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - principal := d.Get("principal").(string) - thing := d.Get("thing").(string) - - _, err := conn.DetachThingPrincipal(&iot.DetachThingPrincipalInput{ - Principal: aws.String(principal), - ThingName: aws.String(thing), - }) - - if isAWSErr(err, iot.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] IoT Principal %s or Thing %s not found, removing from state", principal, thing) - } else if err != nil { - return fmt.Errorf("error detaching principal %s from thing %s: %s", principal, thing, err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_type.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_type.go deleted file mode 100644 index 5aa60465d..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_type.go +++ /dev/null @@ -1,202 +0,0 @@ -package aws - -import ( - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iot" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -// https://docs.aws.amazon.com/iot/latest/apireference/API_CreateThingType.html -func resourceAwsIotThingType() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIotThingTypeCreate, - Read: resourceAwsIotThingTypeRead, - Update: resourceAwsIotThingTypeUpdate, - Delete: resourceAwsIotThingTypeDelete, - - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("name", d.Id()) - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateIotThingTypeName, - }, - "properties": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateIotThingTypeDescription, - }, - "searchable_attributes": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - MaxItems: 3, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateIotThingTypeSearchableAttribute, - }, - }, - }, - }, - }, - "deprecated": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsIotThingTypeCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - params := &iot.CreateThingTypeInput{ - ThingTypeName: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("properties"); ok { - configs := v.([]interface{}) - config, ok := configs[0].(map[string]interface{}) - - if ok && config != nil { - params.ThingTypeProperties = expandIotThingTypeProperties(config) - } - } - - log.Printf("[DEBUG] Creating IoT Thing Type: %s", params) - out, err := conn.CreateThingType(params) - - if err != nil { - return err - } - - d.SetId(*out.ThingTypeName) - - if v := d.Get("deprecated").(bool); v { - params := &iot.DeprecateThingTypeInput{ - ThingTypeName: aws.String(d.Id()), - UndoDeprecate: aws.Bool(false), - } - - log.Printf("[DEBUG] Deprecating IoT Thing Type: %s", params) - _, err := conn.DeprecateThingType(params) - - if err != nil { - return err - } - } - - return resourceAwsIotThingTypeRead(d, meta) -} - -func resourceAwsIotThingTypeRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - params := &iot.DescribeThingTypeInput{ - ThingTypeName: aws.String(d.Id()), - } - log.Printf("[DEBUG] Reading IoT Thing Type: %s", params) - out, err := conn.DescribeThingType(params) - - if err != nil { - if isAWSErr(err, iot.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] IoT Thing Type %q not found, removing from state", d.Id()) - d.SetId("") - } - return err - } - - if out.ThingTypeMetadata != nil { - d.Set("deprecated", out.ThingTypeMetadata.Deprecated) - } - - d.Set("arn", out.ThingTypeArn) - d.Set("properties", flattenIotThingTypeProperties(out.ThingTypeProperties)) - - return nil -} - -func resourceAwsIotThingTypeUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - if d.HasChange("deprecated") { - params := &iot.DeprecateThingTypeInput{ - ThingTypeName: aws.String(d.Id()), - UndoDeprecate: aws.Bool(!d.Get("deprecated").(bool)), - } - - log.Printf("[DEBUG] Updating IoT Thing Type: %s", params) - _, err := conn.DeprecateThingType(params) - - if err != nil { - return err - } - } - - return resourceAwsIotThingTypeRead(d, meta) -} - -func resourceAwsIotThingTypeDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - // In order to delete an IoT Thing Type, you must deprecate it first and wait - // at least 5 minutes. - deprecateParams := &iot.DeprecateThingTypeInput{ - ThingTypeName: aws.String(d.Id()), - } - log.Printf("[DEBUG] Deprecating IoT Thing Type: %s", deprecateParams) - _, err := conn.DeprecateThingType(deprecateParams) - - if err != nil { - return err - } - - deleteParams := &iot.DeleteThingTypeInput{ - ThingTypeName: aws.String(d.Id()), - } - log.Printf("[DEBUG] Deleting IoT Thing Type: %s", deleteParams) - - return resource.Retry(6*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteThingType(deleteParams) - - if err != nil { - if isAWSErr(err, iot.ErrCodeInvalidRequestException, "Please wait for 5 minutes after deprecation and then retry") { - return resource.RetryableError(err) - } - - // As the delay post-deprecation is about 5 minutes, it may have been - // deleted in between, thus getting a Not Found Exception. - if isAWSErr(err, iot.ErrCodeResourceNotFoundException, "") { - return nil - } - - return resource.NonRetryableError(err) - } - - return nil - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_topic_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_topic_rule.go deleted file mode 100644 index 425247d9a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_topic_rule.go +++ /dev/null @@ -1,612 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iot" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsIotTopicRule() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsIotTopicRuleCreate, - Read: resourceAwsIotTopicRuleRead, - Update: resourceAwsIotTopicRuleUpdate, - Delete: resourceAwsIotTopicRuleDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateIoTTopicRuleName, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "enabled": { - Type: schema.TypeBool, - Required: true, - }, - "sql": { - Type: schema.TypeString, - Required: true, - }, - "sql_version": { - Type: schema.TypeString, - Required: true, - }, - "cloudwatch_alarm": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "alarm_name": { - Type: schema.TypeString, - Required: true, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "state_reason": { - Type: schema.TypeString, - Required: true, - }, - "state_value": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateIoTTopicRuleCloudWatchAlarmStateValue, - }, - }, - }, - }, - "cloudwatch_metric": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "metric_name": { - Type: schema.TypeString, - Required: true, - }, - "metric_namespace": { - Type: schema.TypeString, - Required: true, - }, - "metric_timestamp": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateIoTTopicRuleCloudWatchMetricTimestamp, - }, - "metric_unit": { - Type: schema.TypeString, - Required: true, - }, - "metric_value": { - Type: schema.TypeString, - Required: true, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - "dynamodb": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "hash_key_field": { - Type: schema.TypeString, - Required: true, - }, - "hash_key_value": { - Type: schema.TypeString, - Required: true, - }, - "hash_key_type": { - Type: schema.TypeString, - Optional: true, - }, - "payload_field": { - Type: schema.TypeString, - Optional: true, - }, - "range_key_field": { - Type: schema.TypeString, - Required: true, - }, - "range_key_value": { - Type: schema.TypeString, - Required: true, - }, - "range_key_type": { - Type: schema.TypeString, - Optional: true, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "table_name": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "elasticsearch": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "endpoint": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateIoTTopicRuleElasticSearchEndpoint, - }, - "id": { - Type: schema.TypeString, - Required: true, - }, - "index": { - Type: schema.TypeString, - Required: true, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "firehose": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delivery_stream_name": { - Type: schema.TypeString, - Required: true, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "separator": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateIoTTopicRuleFirehoseSeparator, - }, - }, - }, - }, - "kinesis": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "partition_key": { - Type: schema.TypeString, - Optional: true, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "stream_name": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "lambda": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "function_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - "republish": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "topic": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "s3": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket_name": { - Type: schema.TypeString, - Required: true, - }, - "key": { - Type: schema.TypeString, - Required: true, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - "sns": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "message_format": { - Type: schema.TypeString, - Default: iot.MessageFormatRaw, - Optional: true, - }, - "target_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - "sqs": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "queue_url": { - Type: schema.TypeString, - Required: true, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "use_base64": { - Type: schema.TypeBool, - Required: true, - }, - }, - }, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func createTopicRulePayload(d *schema.ResourceData) *iot.TopicRulePayload { - cloudwatchAlarmActions := d.Get("cloudwatch_alarm").(*schema.Set).List() - cloudwatchMetricActions := d.Get("cloudwatch_metric").(*schema.Set).List() - dynamoDbActions := d.Get("dynamodb").(*schema.Set).List() - elasticsearchActions := d.Get("elasticsearch").(*schema.Set).List() - firehoseActions := d.Get("firehose").(*schema.Set).List() - kinesisActions := d.Get("kinesis").(*schema.Set).List() - lambdaActions := d.Get("lambda").(*schema.Set).List() - republishActions := d.Get("republish").(*schema.Set).List() - s3Actions := d.Get("s3").(*schema.Set).List() - snsActions := d.Get("sns").(*schema.Set).List() - sqsActions := d.Get("sqs").(*schema.Set).List() - - numActions := len(cloudwatchAlarmActions) + len(cloudwatchMetricActions) + - len(dynamoDbActions) + len(elasticsearchActions) + len(firehoseActions) + - len(kinesisActions) + len(lambdaActions) + len(republishActions) + - len(s3Actions) + len(snsActions) + len(sqsActions) - actions := make([]*iot.Action, numActions) - - i := 0 - // Add Cloudwatch Alarm actions - for _, a := range cloudwatchAlarmActions { - raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ - CloudwatchAlarm: &iot.CloudwatchAlarmAction{ - AlarmName: aws.String(raw["alarm_name"].(string)), - RoleArn: aws.String(raw["role_arn"].(string)), - StateReason: aws.String(raw["state_reason"].(string)), - StateValue: aws.String(raw["state_value"].(string)), - }, - } - i++ - } - - // Add Cloudwatch Metric actions - for _, a := range cloudwatchMetricActions { - raw := a.(map[string]interface{}) - act := &iot.Action{ - CloudwatchMetric: &iot.CloudwatchMetricAction{ - MetricName: aws.String(raw["metric_name"].(string)), - MetricNamespace: aws.String(raw["metric_namespace"].(string)), - MetricUnit: aws.String(raw["metric_unit"].(string)), - MetricValue: aws.String(raw["metric_value"].(string)), - RoleArn: aws.String(raw["role_arn"].(string)), - }, - } - if v, ok := raw["metric_timestamp"].(string); ok && v != "" { - act.CloudwatchMetric.MetricTimestamp = aws.String(v) - } - actions[i] = act - i++ - } - - // Add DynamoDB actions - for _, a := range dynamoDbActions { - raw := a.(map[string]interface{}) - act := &iot.Action{ - DynamoDB: &iot.DynamoDBAction{ - HashKeyField: aws.String(raw["hash_key_field"].(string)), - HashKeyValue: aws.String(raw["hash_key_value"].(string)), - RangeKeyField: aws.String(raw["range_key_field"].(string)), - RangeKeyValue: aws.String(raw["range_key_value"].(string)), - RoleArn: aws.String(raw["role_arn"].(string)), - TableName: aws.String(raw["table_name"].(string)), - }, - } - if v, ok := raw["hash_key_type"].(string); ok && v != "" { - act.DynamoDB.HashKeyType = aws.String(v) - } - if v, ok := raw["range_key_type"].(string); ok && v != "" { - act.DynamoDB.RangeKeyType = aws.String(v) - } - if v, ok := raw["payload_field"].(string); ok && v != "" { - act.DynamoDB.PayloadField = aws.String(v) - } - actions[i] = act - i++ - } - - // Add Elasticsearch actions - - for _, a := range elasticsearchActions { - raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ - Elasticsearch: &iot.ElasticsearchAction{ - Endpoint: aws.String(raw["endpoint"].(string)), - Id: aws.String(raw["id"].(string)), - Index: aws.String(raw["index"].(string)), - RoleArn: aws.String(raw["role_arn"].(string)), - Type: aws.String(raw["type"].(string)), - }, - } - i++ - } - - // Add Firehose actions - - for _, a := range firehoseActions { - raw := a.(map[string]interface{}) - act := &iot.Action{ - Firehose: &iot.FirehoseAction{ - DeliveryStreamName: aws.String(raw["delivery_stream_name"].(string)), - RoleArn: aws.String(raw["role_arn"].(string)), - }, - } - if v, ok := raw["separator"].(string); ok && v != "" { - act.Firehose.Separator = aws.String(raw["separator"].(string)) - } - actions[i] = act - i++ - } - - // Add Kinesis actions - - for _, a := range kinesisActions { - raw := a.(map[string]interface{}) - act := &iot.Action{ - Kinesis: &iot.KinesisAction{ - RoleArn: aws.String(raw["role_arn"].(string)), - StreamName: aws.String(raw["stream_name"].(string)), - }, - } - if v, ok := raw["partition_key"].(string); ok && v != "" { - act.Kinesis.PartitionKey = aws.String(v) - } - actions[i] = act - i++ - } - - // Add Lambda actions - - for _, a := range lambdaActions { - raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ - Lambda: &iot.LambdaAction{ - FunctionArn: aws.String(raw["function_arn"].(string)), - }, - } - i++ - } - - // Add Republish actions - - for _, a := range republishActions { - raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ - Republish: &iot.RepublishAction{ - RoleArn: aws.String(raw["role_arn"].(string)), - Topic: aws.String(raw["topic"].(string)), - }, - } - i++ - } - - // Add S3 actions - - for _, a := range s3Actions { - raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ - S3: &iot.S3Action{ - BucketName: aws.String(raw["bucket_name"].(string)), - Key: aws.String(raw["key"].(string)), - RoleArn: aws.String(raw["role_arn"].(string)), - }, - } - i++ - } - - // Add SNS actions - - for _, a := range snsActions { - raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ - Sns: &iot.SnsAction{ - RoleArn: aws.String(raw["role_arn"].(string)), - TargetArn: aws.String(raw["target_arn"].(string)), - MessageFormat: aws.String(raw["message_format"].(string)), - }, - } - i++ - } - - // Add SQS actions - - for _, a := range sqsActions { - raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ - Sqs: &iot.SqsAction{ - QueueUrl: aws.String(raw["queue_url"].(string)), - RoleArn: aws.String(raw["role_arn"].(string)), - UseBase64: aws.Bool(raw["use_base64"].(bool)), - }, - } - i++ - } - - return &iot.TopicRulePayload{ - Description: aws.String(d.Get("description").(string)), - RuleDisabled: aws.Bool(!d.Get("enabled").(bool)), - Sql: aws.String(d.Get("sql").(string)), - AwsIotSqlVersion: aws.String(d.Get("sql_version").(string)), - Actions: actions, - } -} - -func resourceAwsIotTopicRuleCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - ruleName := d.Get("name").(string) - - params := &iot.CreateTopicRuleInput{ - RuleName: aws.String(ruleName), - TopicRulePayload: createTopicRulePayload(d), - } - log.Printf("[DEBUG] Creating IoT Topic Rule: %s", params) - _, err := conn.CreateTopicRule(params) - - if err != nil { - return err - } - - d.SetId(ruleName) - - return resourceAwsIotTopicRuleRead(d, meta) -} - -func resourceAwsIotTopicRuleRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - params := &iot.GetTopicRuleInput{ - RuleName: aws.String(d.Id()), - } - log.Printf("[DEBUG] Reading IoT Topic Rule: %s", params) - out, err := conn.GetTopicRule(params) - - if err != nil { - return err - } - - d.Set("arn", out.RuleArn) - d.Set("name", out.Rule.RuleName) - d.Set("description", out.Rule.Description) - d.Set("enabled", !(*out.Rule.RuleDisabled)) - d.Set("sql", out.Rule.Sql) - d.Set("sql_version", out.Rule.AwsIotSqlVersion) - d.Set("cloudwatch_alarm", flattenIoTRuleCloudWatchAlarmActions(out.Rule.Actions)) - d.Set("cloudwatch_metric", flattenIoTRuleCloudWatchMetricActions(out.Rule.Actions)) - d.Set("dynamodb", flattenIoTRuleDynamoDbActions(out.Rule.Actions)) - d.Set("elasticsearch", flattenIoTRuleElasticSearchActions(out.Rule.Actions)) - d.Set("firehose", flattenIoTRuleFirehoseActions(out.Rule.Actions)) - d.Set("kinesis", flattenIoTRuleKinesisActions(out.Rule.Actions)) - d.Set("lambda", flattenIoTRuleLambdaActions(out.Rule.Actions)) - d.Set("republish", flattenIoTRuleRepublishActions(out.Rule.Actions)) - d.Set("s3", flattenIoTRuleS3Actions(out.Rule.Actions)) - d.Set("sns", flattenIoTRuleSnsActions(out.Rule.Actions)) - d.Set("sqs", flattenIoTRuleSqsActions(out.Rule.Actions)) - - return nil -} - -func resourceAwsIotTopicRuleUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - params := &iot.ReplaceTopicRuleInput{ - RuleName: aws.String(d.Get("name").(string)), - TopicRulePayload: createTopicRulePayload(d), - } - log.Printf("[DEBUG] Updating IoT Topic Rule: %s", params) - _, err := conn.ReplaceTopicRule(params) - - if err != nil { - return err - } - - return resourceAwsIotTopicRuleRead(d, meta) -} - -func resourceAwsIotTopicRuleDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - params := &iot.DeleteTopicRuleInput{ - RuleName: aws.String(d.Id()), - } - log.Printf("[DEBUG] Deleting IoT Topic Rule: %s", params) - _, err := conn.DeleteTopicRule(params) - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair.go deleted file mode 100644 index 48f954b9c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair.go +++ /dev/null @@ -1,127 +0,0 @@ -package aws - -import ( - "fmt" - "strings" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" -) - -func resourceAwsKeyPair() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsKeyPairCreate, - Read: resourceAwsKeyPairRead, - Update: nil, - Delete: resourceAwsKeyPairDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - SchemaVersion: 1, - MigrateState: resourceAwsKeyPairMigrateState, - - Schema: map[string]*schema.Schema{ - "key_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"key_name_prefix"}, - ValidateFunc: validation.StringLenBetween(0, 255), - }, - "key_name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"key_name"}, - ValidateFunc: validation.StringLenBetween(0, 255-resource.UniqueIDSuffixLength), - }, - "public_key": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: func(v interface{}) string { - switch v.(type) { - case string: - return strings.TrimSpace(v.(string)) - default: - return "" - } - }, - }, - "fingerprint": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsKeyPairCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - var keyName string - if v, ok := d.GetOk("key_name"); ok { - keyName = v.(string) - } else if v, ok := d.GetOk("key_name_prefix"); ok { - keyName = resource.PrefixedUniqueId(v.(string)) - d.Set("key_name", keyName) - } else { - keyName = resource.UniqueId() - d.Set("key_name", keyName) - } - - publicKey := d.Get("public_key").(string) - req := &ec2.ImportKeyPairInput{ - KeyName: aws.String(keyName), - PublicKeyMaterial: []byte(publicKey), - } - resp, err := conn.ImportKeyPair(req) - if err != nil { - return fmt.Errorf("Error import KeyPair: %s", err) - } - - d.SetId(*resp.KeyName) - return resourceAwsKeyPairRead(d, meta) -} - -func resourceAwsKeyPairRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - req := &ec2.DescribeKeyPairsInput{ - KeyNames: []*string{aws.String(d.Id())}, - } - resp, err := conn.DescribeKeyPairs(req) - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "InvalidKeyPair.NotFound" { - d.SetId("") - return nil - } - return fmt.Errorf("Error retrieving KeyPair: %s", err) - } - - for _, keyPair := range resp.KeyPairs { - if *keyPair.KeyName == d.Id() { - d.Set("key_name", keyPair.KeyName) - d.Set("fingerprint", keyPair.KeyFingerprint) - return nil - } - } - - return fmt.Errorf("Unable to find key pair within: %#v", resp.KeyPairs) -} - -func resourceAwsKeyPairDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - _, err := conn.DeleteKeyPair(&ec2.DeleteKeyPairInput{ - KeyName: aws.String(d.Id()), - }) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair_migrate.go deleted file mode 100644 index c937ac360..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair_migrate.go +++ /dev/null @@ -1,36 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsKeyPairMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS Key Pair State v0; migrating to v1") - return migrateKeyPairStateV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateKeyPairStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() { - log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") - return is, nil - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - - // replace public_key with a stripped version, removing `\n` from the end - // see https://github.com/hashicorp/terraform/issues/3455 - is.Attributes["public_key"] = strings.TrimSpace(is.Attributes["public_key"]) - - log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) - return is, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_analytics_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_analytics_application.go deleted file mode 100644 index 9bb0ff083..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_analytics_application.go +++ /dev/null @@ -1,1575 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "reflect" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/kinesisanalytics" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsKinesisAnalyticsApplication() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsKinesisAnalyticsApplicationCreate, - Read: resourceAwsKinesisAnalyticsApplicationRead, - Update: resourceAwsKinesisAnalyticsApplicationUpdate, - Delete: resourceAwsKinesisAnalyticsApplicationDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "code": { - Type: schema.TypeString, - Optional: true, - }, - - "create_timestamp": { - Type: schema.TypeString, - Computed: true, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - }, - - "last_update_timestamp": { - Type: schema.TypeString, - Computed: true, - }, - - "status": { - Type: schema.TypeString, - Computed: true, - }, - - "version": { - Type: schema.TypeInt, - Computed: true, - }, - - "cloudwatch_logging_options": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, - - "log_stream_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - - "inputs": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, - - "kinesis_firehose": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "resource_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - - "kinesis_stream": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "resource_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - - "name_prefix": { - Type: schema.TypeString, - Required: true, - }, - - "parallelism": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "count": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - }, - - "processing_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "lambda": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "resource_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - }, - }, - }, - - "schema": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "record_columns": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "mapping": { - Type: schema.TypeString, - Optional: true, - }, - - "name": { - Type: schema.TypeString, - Required: true, - }, - - "sql_type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - - "record_encoding": { - Type: schema.TypeString, - Optional: true, - }, - - "record_format": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "mapping_parameters": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "csv": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "record_column_delimiter": { - Type: schema.TypeString, - Required: true, - }, - - "record_row_delimiter": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - - "json": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "record_row_path": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - }, - }, - - "record_format_type": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - }, - }, - }, - - "starting_position_configuration": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "starting_position": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - - "stream_names": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - - "outputs": { - Type: schema.TypeList, - Optional: true, - MaxItems: 3, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, - - "kinesis_firehose": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "resource_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - - "kinesis_stream": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "resource_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - - "lambda": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "resource_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - - "name": { - Type: schema.TypeString, - Required: true, - }, - - "schema": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "record_format_type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - kinesisanalytics.RecordFormatTypeCsv, - kinesisanalytics.RecordFormatTypeJson, - }, false), - }, - }, - }, - }, - }, - }, - }, - - "reference_data_sources": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, - - "s3": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - - "file_key": { - Type: schema.TypeString, - Required: true, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - - "schema": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "record_columns": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "mapping": { - Type: schema.TypeString, - Optional: true, - }, - - "name": { - Type: schema.TypeString, - Required: true, - }, - - "sql_type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - - "record_encoding": { - Type: schema.TypeString, - Optional: true, - }, - - "record_format": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "mapping_parameters": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "csv": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "record_column_delimiter": { - Type: schema.TypeString, - Required: true, - }, - - "record_row_delimiter": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - - "json": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "record_row_path": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - }, - }, - - "record_format_type": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - }, - }, - }, - - "table_name": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsKinesisAnalyticsApplicationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kinesisanalyticsconn - name := d.Get("name").(string) - createOpts := &kinesisanalytics.CreateApplicationInput{ - ApplicationName: aws.String(name), - } - - if v, ok := d.GetOk("code"); ok && v.(string) != "" { - createOpts.ApplicationCode = aws.String(v.(string)) - } - - if v, ok := d.GetOk("cloudwatch_logging_options"); ok { - clo := v.([]interface{})[0].(map[string]interface{}) - cloudwatchLoggingOption := expandKinesisAnalyticsCloudwatchLoggingOption(clo) - createOpts.CloudWatchLoggingOptions = []*kinesisanalytics.CloudWatchLoggingOption{cloudwatchLoggingOption} - } - - if v, ok := d.GetOk("inputs"); ok { - i := v.([]interface{})[0].(map[string]interface{}) - inputs := expandKinesisAnalyticsInputs(i) - createOpts.Inputs = []*kinesisanalytics.Input{inputs} - } - - if v, ok := d.GetOk("outputs"); ok { - o := v.([]interface{})[0].(map[string]interface{}) - outputs := expandKinesisAnalyticsOutputs(o) - createOpts.Outputs = []*kinesisanalytics.Output{outputs} - } - - // Retry for IAM eventual consistency - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - output, err := conn.CreateApplication(createOpts) - if err != nil { - if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "Kinesis Analytics service doesn't have sufficient privileges") { - return resource.RetryableError(err) - } - // InvalidArgumentException: Given IAM role arn : arn:aws:iam::123456789012:role/xxx does not provide Invoke permissions on the Lambda resource : arn:aws:lambda:us-west-2:123456789012:function:yyy - if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "does not provide Invoke permissions on the Lambda resource") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - d.SetId(aws.StringValue(output.ApplicationSummary.ApplicationARN)) - return nil - }) - if err != nil { - return fmt.Errorf("Unable to create Kinesis Analytics application: %s", err) - } - - return resourceAwsKinesisAnalyticsApplicationUpdate(d, meta) -} - -func resourceAwsKinesisAnalyticsApplicationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kinesisanalyticsconn - name := d.Get("name").(string) - - describeOpts := &kinesisanalytics.DescribeApplicationInput{ - ApplicationName: aws.String(name), - } - resp, err := conn.DescribeApplication(describeOpts) - if isAWSErr(err, kinesisanalytics.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Kinesis Analytics Application (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - if err != nil { - return fmt.Errorf("error reading Kinesis Analytics Application (%s): %s", d.Id(), err) - } - - d.Set("name", aws.StringValue(resp.ApplicationDetail.ApplicationName)) - d.Set("arn", aws.StringValue(resp.ApplicationDetail.ApplicationARN)) - d.Set("code", aws.StringValue(resp.ApplicationDetail.ApplicationCode)) - d.Set("create_timestamp", aws.TimeValue(resp.ApplicationDetail.CreateTimestamp).Format(time.RFC3339)) - d.Set("description", aws.StringValue(resp.ApplicationDetail.ApplicationDescription)) - d.Set("last_update_timestamp", aws.TimeValue(resp.ApplicationDetail.LastUpdateTimestamp).Format(time.RFC3339)) - d.Set("status", aws.StringValue(resp.ApplicationDetail.ApplicationStatus)) - d.Set("version", int(aws.Int64Value(resp.ApplicationDetail.ApplicationVersionId))) - - if err := d.Set("cloudwatch_logging_options", flattenKinesisAnalyticsCloudwatchLoggingOptions(resp.ApplicationDetail.CloudWatchLoggingOptionDescriptions)); err != nil { - return fmt.Errorf("error setting cloudwatch_logging_options: %s", err) - } - - if err := d.Set("inputs", flattenKinesisAnalyticsInputs(resp.ApplicationDetail.InputDescriptions)); err != nil { - return fmt.Errorf("error setting inputs: %s", err) - } - - if err := d.Set("outputs", flattenKinesisAnalyticsOutputs(resp.ApplicationDetail.OutputDescriptions)); err != nil { - return fmt.Errorf("error setting outputs: %s", err) - } - - if err := d.Set("reference_data_sources", flattenKinesisAnalyticsReferenceDataSources(resp.ApplicationDetail.ReferenceDataSourceDescriptions)); err != nil { - return fmt.Errorf("error setting reference_data_sources: %s", err) - } - - return nil -} - -func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta interface{}) error { - var version int - conn := meta.(*AWSClient).kinesisanalyticsconn - name := d.Get("name").(string) - - if v, ok := d.GetOk("version"); ok { - version = v.(int) - } else { - version = 1 - } - - if !d.IsNewResource() { - updateApplicationOpts := &kinesisanalytics.UpdateApplicationInput{ - ApplicationName: aws.String(name), - CurrentApplicationVersionId: aws.Int64(int64(version)), - } - - applicationUpdate, err := createApplicationUpdateOpts(d) - if err != nil { - return err - } - - if !reflect.DeepEqual(applicationUpdate, &kinesisanalytics.ApplicationUpdate{}) { - updateApplicationOpts.SetApplicationUpdate(applicationUpdate) - _, updateErr := conn.UpdateApplication(updateApplicationOpts) - if updateErr != nil { - return updateErr - } - version = version + 1 - } - - oldLoggingOptions, newLoggingOptions := d.GetChange("cloudwatch_logging_options") - if len(oldLoggingOptions.([]interface{})) == 0 && len(newLoggingOptions.([]interface{})) > 0 { - if v, ok := d.GetOk("cloudwatch_logging_options"); ok { - clo := v.([]interface{})[0].(map[string]interface{}) - cloudwatchLoggingOption := expandKinesisAnalyticsCloudwatchLoggingOption(clo) - addOpts := &kinesisanalytics.AddApplicationCloudWatchLoggingOptionInput{ - ApplicationName: aws.String(name), - CurrentApplicationVersionId: aws.Int64(int64(version)), - CloudWatchLoggingOption: cloudwatchLoggingOption, - } - // Retry for IAM eventual consistency - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.AddApplicationCloudWatchLoggingOption(addOpts) - if err != nil { - if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "Kinesis Analytics service doesn't have sufficient privileges") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Unable to add CloudWatch logging options: %s", err) - } - version = version + 1 - } - } - - oldInputs, newInputs := d.GetChange("inputs") - if len(oldInputs.([]interface{})) == 0 && len(newInputs.([]interface{})) > 0 { - if v, ok := d.GetOk("inputs"); ok { - i := v.([]interface{})[0].(map[string]interface{}) - input := expandKinesisAnalyticsInputs(i) - addOpts := &kinesisanalytics.AddApplicationInputInput{ - ApplicationName: aws.String(name), - CurrentApplicationVersionId: aws.Int64(int64(version)), - Input: input, - } - // Retry for IAM eventual consistency - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.AddApplicationInput(addOpts) - if err != nil { - if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "Kinesis Analytics service doesn't have sufficient privileges") { - return resource.RetryableError(err) - } - // InvalidArgumentException: Given IAM role arn : arn:aws:iam::123456789012:role/xxx does not provide Invoke permissions on the Lambda resource : arn:aws:lambda:us-west-2:123456789012:function:yyy - if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "does not provide Invoke permissions on the Lambda resource") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Unable to add application inputs: %s", err) - } - version = version + 1 - } - } - - oldOutputs, newOutputs := d.GetChange("outputs") - if len(oldOutputs.([]interface{})) == 0 && len(newOutputs.([]interface{})) > 0 { - if v, ok := d.GetOk("outputs"); ok { - o := v.([]interface{})[0].(map[string]interface{}) - output := expandKinesisAnalyticsOutputs(o) - addOpts := &kinesisanalytics.AddApplicationOutputInput{ - ApplicationName: aws.String(name), - CurrentApplicationVersionId: aws.Int64(int64(version)), - Output: output, - } - // Retry for IAM eventual consistency - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.AddApplicationOutput(addOpts) - if err != nil { - if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "Kinesis Analytics service doesn't have sufficient privileges") { - return resource.RetryableError(err) - } - // InvalidArgumentException: Given IAM role arn : arn:aws:iam::123456789012:role/xxx does not provide Invoke permissions on the Lambda resource : arn:aws:lambda:us-west-2:123456789012:function:yyy - if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "does not provide Invoke permissions on the Lambda resource") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Unable to add application outputs: %s", err) - } - version = version + 1 - } - } - } - - oldReferenceData, newReferenceData := d.GetChange("reference_data_sources") - if len(oldReferenceData.([]interface{})) == 0 && len(newReferenceData.([]interface{})) > 0 { - if v := d.Get("reference_data_sources").([]interface{}); len(v) > 0 { - for _, r := range v { - rd := r.(map[string]interface{}) - referenceData := expandKinesisAnalyticsReferenceData(rd) - addOpts := &kinesisanalytics.AddApplicationReferenceDataSourceInput{ - ApplicationName: aws.String(name), - CurrentApplicationVersionId: aws.Int64(int64(version)), - ReferenceDataSource: referenceData, - } - // Retry for IAM eventual consistency - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.AddApplicationReferenceDataSource(addOpts) - if err != nil { - if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "Kinesis Analytics service doesn't have sufficient privileges") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Unable to add application reference data source: %s", err) - } - version = version + 1 - } - } - } - - return resourceAwsKinesisAnalyticsApplicationRead(d, meta) -} - -func resourceAwsKinesisAnalyticsApplicationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kinesisanalyticsconn - name := d.Get("name").(string) - createTimestamp, parseErr := time.Parse(time.RFC3339, d.Get("create_timestamp").(string)) - if parseErr != nil { - return parseErr - } - - log.Printf("[DEBUG] Kinesis Analytics Application destroy: %v", d.Id()) - deleteOpts := &kinesisanalytics.DeleteApplicationInput{ - ApplicationName: aws.String(name), - CreateTimestamp: aws.Time(createTimestamp), - } - _, deleteErr := conn.DeleteApplication(deleteOpts) - if isAWSErr(deleteErr, kinesisanalytics.ErrCodeResourceNotFoundException, "") { - return nil - } - deleteErr = waitForDeleteKinesisAnalyticsApplication(conn, d.Id(), d.Timeout(schema.TimeoutDelete)) - if deleteErr != nil { - return fmt.Errorf("error waiting for deletion of Kinesis Analytics Application (%s): %s", d.Id(), deleteErr) - } - - log.Printf("[DEBUG] Kinesis Analytics Application deleted: %v", d.Id()) - return nil -} - -func expandKinesisAnalyticsCloudwatchLoggingOption(clo map[string]interface{}) *kinesisanalytics.CloudWatchLoggingOption { - cloudwatchLoggingOption := &kinesisanalytics.CloudWatchLoggingOption{ - LogStreamARN: aws.String(clo["log_stream_arn"].(string)), - RoleARN: aws.String(clo["role_arn"].(string)), - } - return cloudwatchLoggingOption -} - -func expandKinesisAnalyticsInputs(i map[string]interface{}) *kinesisanalytics.Input { - input := &kinesisanalytics.Input{ - NamePrefix: aws.String(i["name_prefix"].(string)), - } - - if v := i["kinesis_firehose"].([]interface{}); len(v) > 0 { - kf := v[0].(map[string]interface{}) - kfi := &kinesisanalytics.KinesisFirehoseInput{ - ResourceARN: aws.String(kf["resource_arn"].(string)), - RoleARN: aws.String(kf["role_arn"].(string)), - } - input.KinesisFirehoseInput = kfi - } - - if v := i["kinesis_stream"].([]interface{}); len(v) > 0 { - ks := v[0].(map[string]interface{}) - ksi := &kinesisanalytics.KinesisStreamsInput{ - ResourceARN: aws.String(ks["resource_arn"].(string)), - RoleARN: aws.String(ks["role_arn"].(string)), - } - input.KinesisStreamsInput = ksi - } - - if v := i["parallelism"].([]interface{}); len(v) > 0 { - p := v[0].(map[string]interface{}) - - if c, ok := p["count"]; ok { - ip := &kinesisanalytics.InputParallelism{ - Count: aws.Int64(int64(c.(int))), - } - input.InputParallelism = ip - } - } - - if v := i["processing_configuration"].([]interface{}); len(v) > 0 { - pc := v[0].(map[string]interface{}) - - if l := pc["lambda"].([]interface{}); len(l) > 0 { - lp := l[0].(map[string]interface{}) - ipc := &kinesisanalytics.InputProcessingConfiguration{ - InputLambdaProcessor: &kinesisanalytics.InputLambdaProcessor{ - ResourceARN: aws.String(lp["resource_arn"].(string)), - RoleARN: aws.String(lp["role_arn"].(string)), - }, - } - input.InputProcessingConfiguration = ipc - } - } - - if v := i["schema"].([]interface{}); len(v) > 0 { - vL := v[0].(map[string]interface{}) - ss := expandKinesisAnalyticsSourceSchema(vL) - input.InputSchema = ss - } - - return input -} - -func expandKinesisAnalyticsSourceSchema(vL map[string]interface{}) *kinesisanalytics.SourceSchema { - ss := &kinesisanalytics.SourceSchema{} - if v := vL["record_columns"].([]interface{}); len(v) > 0 { - var rcs []*kinesisanalytics.RecordColumn - - for _, rc := range v { - rcD := rc.(map[string]interface{}) - rc := &kinesisanalytics.RecordColumn{ - Name: aws.String(rcD["name"].(string)), - SqlType: aws.String(rcD["sql_type"].(string)), - } - - if v, ok := rcD["mapping"]; ok { - rc.Mapping = aws.String(v.(string)) - } - - rcs = append(rcs, rc) - } - - ss.RecordColumns = rcs - } - - if v, ok := vL["record_encoding"]; ok && v.(string) != "" { - ss.RecordEncoding = aws.String(v.(string)) - } - - if v := vL["record_format"].([]interface{}); len(v) > 0 { - vL := v[0].(map[string]interface{}) - rf := &kinesisanalytics.RecordFormat{} - - if v := vL["mapping_parameters"].([]interface{}); len(v) > 0 { - vL := v[0].(map[string]interface{}) - mp := &kinesisanalytics.MappingParameters{} - - if v := vL["csv"].([]interface{}); len(v) > 0 { - cL := v[0].(map[string]interface{}) - cmp := &kinesisanalytics.CSVMappingParameters{ - RecordColumnDelimiter: aws.String(cL["record_column_delimiter"].(string)), - RecordRowDelimiter: aws.String(cL["record_row_delimiter"].(string)), - } - mp.CSVMappingParameters = cmp - rf.RecordFormatType = aws.String("CSV") - } - - if v := vL["json"].([]interface{}); len(v) > 0 { - jL := v[0].(map[string]interface{}) - jmp := &kinesisanalytics.JSONMappingParameters{ - RecordRowPath: aws.String(jL["record_row_path"].(string)), - } - mp.JSONMappingParameters = jmp - rf.RecordFormatType = aws.String("JSON") - } - rf.MappingParameters = mp - } - - ss.RecordFormat = rf - } - return ss -} - -func expandKinesisAnalyticsOutputs(o map[string]interface{}) *kinesisanalytics.Output { - output := &kinesisanalytics.Output{ - Name: aws.String(o["name"].(string)), - } - - if v := o["kinesis_firehose"].([]interface{}); len(v) > 0 { - kf := v[0].(map[string]interface{}) - kfo := &kinesisanalytics.KinesisFirehoseOutput{ - ResourceARN: aws.String(kf["resource_arn"].(string)), - RoleARN: aws.String(kf["role_arn"].(string)), - } - output.KinesisFirehoseOutput = kfo - } - - if v := o["kinesis_stream"].([]interface{}); len(v) > 0 { - ks := v[0].(map[string]interface{}) - kso := &kinesisanalytics.KinesisStreamsOutput{ - ResourceARN: aws.String(ks["resource_arn"].(string)), - RoleARN: aws.String(ks["role_arn"].(string)), - } - output.KinesisStreamsOutput = kso - } - - if v := o["lambda"].([]interface{}); len(v) > 0 { - l := v[0].(map[string]interface{}) - lo := &kinesisanalytics.LambdaOutput{ - ResourceARN: aws.String(l["resource_arn"].(string)), - RoleARN: aws.String(l["role_arn"].(string)), - } - output.LambdaOutput = lo - } - - if v := o["schema"].([]interface{}); len(v) > 0 { - ds := v[0].(map[string]interface{}) - dso := &kinesisanalytics.DestinationSchema{ - RecordFormatType: aws.String(ds["record_format_type"].(string)), - } - output.DestinationSchema = dso - } - - return output -} - -func expandKinesisAnalyticsReferenceData(rd map[string]interface{}) *kinesisanalytics.ReferenceDataSource { - referenceData := &kinesisanalytics.ReferenceDataSource{ - TableName: aws.String(rd["table_name"].(string)), - } - - if v := rd["s3"].([]interface{}); len(v) > 0 { - s3 := v[0].(map[string]interface{}) - s3rds := &kinesisanalytics.S3ReferenceDataSource{ - BucketARN: aws.String(s3["bucket_arn"].(string)), - FileKey: aws.String(s3["file_key"].(string)), - ReferenceRoleARN: aws.String(s3["role_arn"].(string)), - } - referenceData.S3ReferenceDataSource = s3rds - } - - if v := rd["schema"].([]interface{}); len(v) > 0 { - ss := expandKinesisAnalyticsSourceSchema(v[0].(map[string]interface{})) - referenceData.ReferenceSchema = ss - } - - return referenceData -} - -func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.ApplicationUpdate, error) { - applicationUpdate := &kinesisanalytics.ApplicationUpdate{} - - if d.HasChange("code") { - if v, ok := d.GetOk("code"); ok && v.(string) != "" { - applicationUpdate.ApplicationCodeUpdate = aws.String(v.(string)) - } - } - - oldLoggingOptions, newLoggingOptions := d.GetChange("cloudwatch_logging_options") - if len(oldLoggingOptions.([]interface{})) > 0 && len(newLoggingOptions.([]interface{})) > 0 { - if v, ok := d.GetOk("cloudwatch_logging_options"); ok { - clo := v.([]interface{})[0].(map[string]interface{}) - cloudwatchLoggingOption := expandKinesisAnalyticsCloudwatchLoggingOptionUpdate(clo) - applicationUpdate.CloudWatchLoggingOptionUpdates = []*kinesisanalytics.CloudWatchLoggingOptionUpdate{cloudwatchLoggingOption} - } - } - - oldInputs, newInputs := d.GetChange("inputs") - if len(oldInputs.([]interface{})) > 0 && len(newInputs.([]interface{})) > 0 { - if v, ok := d.GetOk("inputs"); ok { - vL := v.([]interface{})[0].(map[string]interface{}) - inputUpdate := expandKinesisAnalyticsInputUpdate(vL) - applicationUpdate.InputUpdates = []*kinesisanalytics.InputUpdate{inputUpdate} - } - } - - oldOutputs, newOutputs := d.GetChange("outputs") - if len(oldOutputs.([]interface{})) > 0 && len(newOutputs.([]interface{})) > 0 { - if v, ok := d.GetOk("outputs"); ok { - vL := v.([]interface{})[0].(map[string]interface{}) - outputUpdate := expandKinesisAnalyticsOutputUpdate(vL) - applicationUpdate.OutputUpdates = []*kinesisanalytics.OutputUpdate{outputUpdate} - } - } - - oldReferenceData, newReferenceData := d.GetChange("reference_data_sources") - if len(oldReferenceData.([]interface{})) > 0 && len(newReferenceData.([]interface{})) > 0 { - if v := d.Get("reference_data_sources").([]interface{}); len(v) > 0 { - var rdsus []*kinesisanalytics.ReferenceDataSourceUpdate - for _, rd := range v { - rdL := rd.(map[string]interface{}) - rdsu := &kinesisanalytics.ReferenceDataSourceUpdate{ - ReferenceId: aws.String(rdL["id"].(string)), - TableNameUpdate: aws.String(rdL["table_name"].(string)), - } - - if v := rdL["s3"].([]interface{}); len(v) > 0 { - vL := v[0].(map[string]interface{}) - s3rdsu := &kinesisanalytics.S3ReferenceDataSourceUpdate{ - BucketARNUpdate: aws.String(vL["bucket_arn"].(string)), - FileKeyUpdate: aws.String(vL["file_key"].(string)), - ReferenceRoleARNUpdate: aws.String(vL["role_arn"].(string)), - } - rdsu.S3ReferenceDataSourceUpdate = s3rdsu - } - - if v := rdL["schema"].([]interface{}); len(v) > 0 { - vL := v[0].(map[string]interface{}) - ss := expandKinesisAnalyticsSourceSchema(vL) - rdsu.ReferenceSchemaUpdate = ss - } - - rdsus = append(rdsus, rdsu) - } - applicationUpdate.ReferenceDataSourceUpdates = rdsus - } - } - - return applicationUpdate, nil -} - -func expandKinesisAnalyticsInputUpdate(vL map[string]interface{}) *kinesisanalytics.InputUpdate { - inputUpdate := &kinesisanalytics.InputUpdate{ - InputId: aws.String(vL["id"].(string)), - NamePrefixUpdate: aws.String(vL["name_prefix"].(string)), - } - - if v := vL["kinesis_firehose"].([]interface{}); len(v) > 0 { - kf := v[0].(map[string]interface{}) - kfiu := &kinesisanalytics.KinesisFirehoseInputUpdate{ - ResourceARNUpdate: aws.String(kf["resource_arn"].(string)), - RoleARNUpdate: aws.String(kf["role_arn"].(string)), - } - inputUpdate.KinesisFirehoseInputUpdate = kfiu - } - - if v := vL["kinesis_stream"].([]interface{}); len(v) > 0 { - ks := v[0].(map[string]interface{}) - ksiu := &kinesisanalytics.KinesisStreamsInputUpdate{ - ResourceARNUpdate: aws.String(ks["resource_arn"].(string)), - RoleARNUpdate: aws.String(ks["role_arn"].(string)), - } - inputUpdate.KinesisStreamsInputUpdate = ksiu - } - - if v := vL["parallelism"].([]interface{}); len(v) > 0 { - p := v[0].(map[string]interface{}) - - if c, ok := p["count"]; ok { - ipu := &kinesisanalytics.InputParallelismUpdate{ - CountUpdate: aws.Int64(int64(c.(int))), - } - inputUpdate.InputParallelismUpdate = ipu - } - } - - if v := vL["processing_configuration"].([]interface{}); len(v) > 0 { - pc := v[0].(map[string]interface{}) - - if l := pc["lambda"].([]interface{}); len(l) > 0 { - lp := l[0].(map[string]interface{}) - ipc := &kinesisanalytics.InputProcessingConfigurationUpdate{ - InputLambdaProcessorUpdate: &kinesisanalytics.InputLambdaProcessorUpdate{ - ResourceARNUpdate: aws.String(lp["resource_arn"].(string)), - RoleARNUpdate: aws.String(lp["role_arn"].(string)), - }, - } - inputUpdate.InputProcessingConfigurationUpdate = ipc - } - } - - if v := vL["schema"].([]interface{}); len(v) > 0 { - ss := &kinesisanalytics.InputSchemaUpdate{} - vL := v[0].(map[string]interface{}) - - if v := vL["record_columns"].([]interface{}); len(v) > 0 { - var rcs []*kinesisanalytics.RecordColumn - - for _, rc := range v { - rcD := rc.(map[string]interface{}) - rc := &kinesisanalytics.RecordColumn{ - Name: aws.String(rcD["name"].(string)), - SqlType: aws.String(rcD["sql_type"].(string)), - } - - if v, ok := rcD["mapping"]; ok { - rc.Mapping = aws.String(v.(string)) - } - - rcs = append(rcs, rc) - } - - ss.RecordColumnUpdates = rcs - } - - if v, ok := vL["record_encoding"]; ok && v.(string) != "" { - ss.RecordEncodingUpdate = aws.String(v.(string)) - } - - if v := vL["record_format"].([]interface{}); len(v) > 0 { - vL := v[0].(map[string]interface{}) - rf := &kinesisanalytics.RecordFormat{} - - if v := vL["mapping_parameters"].([]interface{}); len(v) > 0 { - vL := v[0].(map[string]interface{}) - mp := &kinesisanalytics.MappingParameters{} - - if v := vL["csv"].([]interface{}); len(v) > 0 { - cL := v[0].(map[string]interface{}) - cmp := &kinesisanalytics.CSVMappingParameters{ - RecordColumnDelimiter: aws.String(cL["record_column_delimiter"].(string)), - RecordRowDelimiter: aws.String(cL["record_row_delimiter"].(string)), - } - mp.CSVMappingParameters = cmp - rf.RecordFormatType = aws.String("CSV") - } - - if v := vL["json"].([]interface{}); len(v) > 0 { - jL := v[0].(map[string]interface{}) - jmp := &kinesisanalytics.JSONMappingParameters{ - RecordRowPath: aws.String(jL["record_row_path"].(string)), - } - mp.JSONMappingParameters = jmp - rf.RecordFormatType = aws.String("JSON") - } - rf.MappingParameters = mp - } - ss.RecordFormatUpdate = rf - } - inputUpdate.InputSchemaUpdate = ss - } - - return inputUpdate -} - -func expandKinesisAnalyticsOutputUpdate(vL map[string]interface{}) *kinesisanalytics.OutputUpdate { - outputUpdate := &kinesisanalytics.OutputUpdate{ - OutputId: aws.String(vL["id"].(string)), - NameUpdate: aws.String(vL["name"].(string)), - } - - if v := vL["kinesis_firehose"].([]interface{}); len(v) > 0 { - kf := v[0].(map[string]interface{}) - kfou := &kinesisanalytics.KinesisFirehoseOutputUpdate{ - ResourceARNUpdate: aws.String(kf["resource_arn"].(string)), - RoleARNUpdate: aws.String(kf["role_arn"].(string)), - } - outputUpdate.KinesisFirehoseOutputUpdate = kfou - } - - if v := vL["kinesis_stream"].([]interface{}); len(v) > 0 { - ks := v[0].(map[string]interface{}) - ksou := &kinesisanalytics.KinesisStreamsOutputUpdate{ - ResourceARNUpdate: aws.String(ks["resource_arn"].(string)), - RoleARNUpdate: aws.String(ks["role_arn"].(string)), - } - outputUpdate.KinesisStreamsOutputUpdate = ksou - } - - if v := vL["lambda"].([]interface{}); len(v) > 0 { - l := v[0].(map[string]interface{}) - lou := &kinesisanalytics.LambdaOutputUpdate{ - ResourceARNUpdate: aws.String(l["resource_arn"].(string)), - RoleARNUpdate: aws.String(l["role_arn"].(string)), - } - outputUpdate.LambdaOutputUpdate = lou - } - - if v := vL["schema"].([]interface{}); len(v) > 0 { - ds := v[0].(map[string]interface{}) - dsu := &kinesisanalytics.DestinationSchema{ - RecordFormatType: aws.String(ds["record_format_type"].(string)), - } - outputUpdate.DestinationSchemaUpdate = dsu - } - - return outputUpdate -} - -func expandKinesisAnalyticsCloudwatchLoggingOptionUpdate(clo map[string]interface{}) *kinesisanalytics.CloudWatchLoggingOptionUpdate { - cloudwatchLoggingOption := &kinesisanalytics.CloudWatchLoggingOptionUpdate{ - CloudWatchLoggingOptionId: aws.String(clo["id"].(string)), - LogStreamARNUpdate: aws.String(clo["log_stream_arn"].(string)), - RoleARNUpdate: aws.String(clo["role_arn"].(string)), - } - return cloudwatchLoggingOption -} - -func flattenKinesisAnalyticsCloudwatchLoggingOptions(options []*kinesisanalytics.CloudWatchLoggingOptionDescription) []interface{} { - s := []interface{}{} - for _, v := range options { - option := map[string]interface{}{ - "id": aws.StringValue(v.CloudWatchLoggingOptionId), - "log_stream_arn": aws.StringValue(v.LogStreamARN), - "role_arn": aws.StringValue(v.RoleARN), - } - s = append(s, option) - } - return s -} - -func flattenKinesisAnalyticsInputs(inputs []*kinesisanalytics.InputDescription) []interface{} { - s := []interface{}{} - - if len(inputs) > 0 { - id := inputs[0] - - input := map[string]interface{}{ - "id": aws.StringValue(id.InputId), - "name_prefix": aws.StringValue(id.NamePrefix), - } - - list := schema.NewSet(schema.HashString, nil) - for _, sn := range id.InAppStreamNames { - list.Add(aws.StringValue(sn)) - } - input["stream_names"] = list - - if id.InputParallelism != nil { - input["parallelism"] = []interface{}{ - map[string]interface{}{ - "count": int(aws.Int64Value(id.InputParallelism.Count)), - }, - } - } - - if id.InputProcessingConfigurationDescription != nil { - ipcd := id.InputProcessingConfigurationDescription - - if ipcd.InputLambdaProcessorDescription != nil { - input["processing_configuration"] = []interface{}{ - map[string]interface{}{ - "lambda": []interface{}{ - map[string]interface{}{ - "resource_arn": aws.StringValue(ipcd.InputLambdaProcessorDescription.ResourceARN), - "role_arn": aws.StringValue(ipcd.InputLambdaProcessorDescription.RoleARN), - }, - }, - }, - } - } - } - - if id.InputSchema != nil { - inputSchema := id.InputSchema - is := []interface{}{} - rcs := []interface{}{} - ss := map[string]interface{}{ - "record_encoding": aws.StringValue(inputSchema.RecordEncoding), - } - - for _, rc := range inputSchema.RecordColumns { - rcM := map[string]interface{}{ - "mapping": aws.StringValue(rc.Mapping), - "name": aws.StringValue(rc.Name), - "sql_type": aws.StringValue(rc.SqlType), - } - rcs = append(rcs, rcM) - } - ss["record_columns"] = rcs - - if inputSchema.RecordFormat != nil { - rf := inputSchema.RecordFormat - rfM := map[string]interface{}{ - "record_format_type": aws.StringValue(rf.RecordFormatType), - } - - if rf.MappingParameters != nil { - mps := []interface{}{} - if rf.MappingParameters.CSVMappingParameters != nil { - cmp := map[string]interface{}{ - "csv": []interface{}{ - map[string]interface{}{ - "record_column_delimiter": aws.StringValue(rf.MappingParameters.CSVMappingParameters.RecordColumnDelimiter), - "record_row_delimiter": aws.StringValue(rf.MappingParameters.CSVMappingParameters.RecordRowDelimiter), - }, - }, - } - mps = append(mps, cmp) - } - - if rf.MappingParameters.JSONMappingParameters != nil { - jmp := map[string]interface{}{ - "json": []interface{}{ - map[string]interface{}{ - "record_row_path": aws.StringValue(rf.MappingParameters.JSONMappingParameters.RecordRowPath), - }, - }, - } - mps = append(mps, jmp) - } - - rfM["mapping_parameters"] = mps - } - ss["record_format"] = []interface{}{rfM} - } - - is = append(is, ss) - input["schema"] = is - } - - if id.InputStartingPositionConfiguration != nil && id.InputStartingPositionConfiguration.InputStartingPosition != nil { - input["starting_position_configuration"] = []interface{}{ - map[string]interface{}{ - "starting_position": aws.StringValue(id.InputStartingPositionConfiguration.InputStartingPosition), - }, - } - } - - if id.KinesisFirehoseInputDescription != nil { - input["kinesis_firehose"] = []interface{}{ - map[string]interface{}{ - "resource_arn": aws.StringValue(id.KinesisFirehoseInputDescription.ResourceARN), - "role_arn": aws.StringValue(id.KinesisFirehoseInputDescription.RoleARN), - }, - } - } - - if id.KinesisStreamsInputDescription != nil { - input["kinesis_stream"] = []interface{}{ - map[string]interface{}{ - "resource_arn": aws.StringValue(id.KinesisStreamsInputDescription.ResourceARN), - "role_arn": aws.StringValue(id.KinesisStreamsInputDescription.RoleARN), - }, - } - } - - s = append(s, input) - } - return s -} - -func flattenKinesisAnalyticsOutputs(outputs []*kinesisanalytics.OutputDescription) []interface{} { - s := []interface{}{} - - if len(outputs) > 0 { - id := outputs[0] - - output := map[string]interface{}{ - "id": aws.StringValue(id.OutputId), - "name": aws.StringValue(id.Name), - } - - if id.KinesisFirehoseOutputDescription != nil { - output["kinesis_firehose"] = []interface{}{ - map[string]interface{}{ - "resource_arn": aws.StringValue(id.KinesisFirehoseOutputDescription.ResourceARN), - "role_arn": aws.StringValue(id.KinesisFirehoseOutputDescription.RoleARN), - }, - } - } - - if id.KinesisStreamsOutputDescription != nil { - output["kinesis_stream"] = []interface{}{ - map[string]interface{}{ - "resource_arn": aws.StringValue(id.KinesisStreamsOutputDescription.ResourceARN), - "role_arn": aws.StringValue(id.KinesisStreamsOutputDescription.RoleARN), - }, - } - } - - if id.LambdaOutputDescription != nil { - output["lambda"] = []interface{}{ - map[string]interface{}{ - "resource_arn": aws.StringValue(id.LambdaOutputDescription.ResourceARN), - "role_arn": aws.StringValue(id.LambdaOutputDescription.RoleARN), - }, - } - } - - if id.DestinationSchema != nil { - output["schema"] = []interface{}{ - map[string]interface{}{ - "record_format_type": aws.StringValue(id.DestinationSchema.RecordFormatType), - }, - } - } - - s = append(s, output) - } - - return s -} - -func flattenKinesisAnalyticsReferenceDataSources(dataSources []*kinesisanalytics.ReferenceDataSourceDescription) []interface{} { - s := []interface{}{} - - if len(dataSources) > 0 { - for _, ds := range dataSources { - dataSource := map[string]interface{}{ - "id": aws.StringValue(ds.ReferenceId), - "table_name": aws.StringValue(ds.TableName), - } - - if ds.S3ReferenceDataSourceDescription != nil { - dataSource["s3"] = []interface{}{ - map[string]interface{}{ - "bucket_arn": aws.StringValue(ds.S3ReferenceDataSourceDescription.BucketARN), - "file_key": aws.StringValue(ds.S3ReferenceDataSourceDescription.FileKey), - "role_arn": aws.StringValue(ds.S3ReferenceDataSourceDescription.ReferenceRoleARN), - }, - } - } - - if ds.ReferenceSchema != nil { - rs := ds.ReferenceSchema - rcs := []interface{}{} - ss := map[string]interface{}{ - "record_encoding": aws.StringValue(rs.RecordEncoding), - } - - for _, rc := range rs.RecordColumns { - rcM := map[string]interface{}{ - "mapping": aws.StringValue(rc.Mapping), - "name": aws.StringValue(rc.Name), - "sql_type": aws.StringValue(rc.SqlType), - } - rcs = append(rcs, rcM) - } - ss["record_columns"] = rcs - - if rs.RecordFormat != nil { - rf := rs.RecordFormat - rfM := map[string]interface{}{ - "record_format_type": aws.StringValue(rf.RecordFormatType), - } - - if rf.MappingParameters != nil { - mps := []interface{}{} - if rf.MappingParameters.CSVMappingParameters != nil { - cmp := map[string]interface{}{ - "csv": []interface{}{ - map[string]interface{}{ - "record_column_delimiter": aws.StringValue(rf.MappingParameters.CSVMappingParameters.RecordColumnDelimiter), - "record_row_delimiter": aws.StringValue(rf.MappingParameters.CSVMappingParameters.RecordRowDelimiter), - }, - }, - } - mps = append(mps, cmp) - } - - if rf.MappingParameters.JSONMappingParameters != nil { - jmp := map[string]interface{}{ - "json": []interface{}{ - map[string]interface{}{ - "record_row_path": aws.StringValue(rf.MappingParameters.JSONMappingParameters.RecordRowPath), - }, - }, - } - mps = append(mps, jmp) - } - - rfM["mapping_parameters"] = mps - } - ss["record_format"] = []interface{}{rfM} - } - - dataSource["schema"] = []interface{}{ss} - } - - s = append(s, dataSource) - } - } - - return s -} - -func waitForDeleteKinesisAnalyticsApplication(conn *kinesisanalytics.KinesisAnalytics, applicationId string, timeout time.Duration) error { - stateConf := resource.StateChangeConf{ - Pending: []string{ - kinesisanalytics.ApplicationStatusRunning, - kinesisanalytics.ApplicationStatusDeleting, - }, - Target: []string{""}, - Timeout: timeout, - Refresh: refreshKinesisAnalyticsApplicationStatus(conn, applicationId), - } - application, err := stateConf.WaitForState() - if err != nil { - if isAWSErr(err, kinesisanalytics.ErrCodeResourceNotFoundException, "") { - return nil - } - } - if application == nil { - return nil - } - return err -} - -func refreshKinesisAnalyticsApplicationStatus(conn *kinesisanalytics.KinesisAnalytics, applicationId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - output, err := conn.DescribeApplication(&kinesisanalytics.DescribeApplicationInput{ - ApplicationName: aws.String(applicationId), - }) - if err != nil { - return nil, "", err - } - application := output.ApplicationDetail - if application == nil { - return application, "", fmt.Errorf("Kinesis Analytics Application (%s) could not be found.", applicationId) - } - return application, aws.StringValue(application.ApplicationStatus), nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go deleted file mode 100644 index fd72e32e1..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ /dev/null @@ -1,2337 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/firehose" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func cloudWatchLoggingOptionsSchema() *schema.Schema { - return &schema.Schema{ - Type: schema.TypeSet, - MaxItems: 1, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "log_group_name": { - Type: schema.TypeString, - Optional: true, - }, - - "log_stream_name": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - } -} - -func s3ConfigurationSchema() *schema.Schema { - return &schema.Schema{ - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket_arn": { - Type: schema.TypeString, - Required: true, - }, - - "buffer_size": { - Type: schema.TypeInt, - Optional: true, - Default: 5, - }, - - "buffer_interval": { - Type: schema.TypeInt, - Optional: true, - Default: 300, - }, - - "compression_format": { - Type: schema.TypeString, - Optional: true, - Default: "UNCOMPRESSED", - }, - - "kms_key_arn": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - }, - - "prefix": { - Type: schema.TypeString, - Optional: true, - }, - - "cloudwatch_logging_options": cloudWatchLoggingOptionsSchema(), - }, - }, - } -} - -func processingConfigurationSchema() *schema.Schema { - return &schema.Schema{ - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Optional: true, - }, - "processors": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "parameters": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "parameter_name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != "LambdaArn" && value != "NumberOfRetries" && value != "RoleArn" && value != "BufferSizeInMBs" && value != "BufferIntervalInSeconds" { - errors = append(errors, fmt.Errorf( - "%q must be one of 'LambdaArn', 'NumberOfRetries', 'RoleArn', 'BufferSizeInMBs', 'BufferIntervalInSeconds'", k)) - } - return - }, - }, - "parameter_value": { - Type: schema.TypeString, - Required: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) < 1 || len(value) > 512 { - errors = append(errors, fmt.Errorf( - "%q must be at least one character long and at most 512 characters long", k)) - } - return - }, - }, - }, - }, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != "Lambda" { - errors = append(errors, fmt.Errorf( - "%q must be 'Lambda'", k)) - } - return - }, - }, - }, - }, - }, - }, - }, - } -} - -func cloudwatchLoggingOptionsHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%t-", m["enabled"].(bool))) - if m["enabled"].(bool) { - buf.WriteString(fmt.Sprintf("%s-", m["log_group_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["log_stream_name"].(string))) - } - return hashcode.String(buf.String()) -} - -func flattenCloudwatchLoggingOptions(clo *firehose.CloudWatchLoggingOptions) *schema.Set { - if clo == nil { - return schema.NewSet(cloudwatchLoggingOptionsHash, []interface{}{}) - } - - cloudwatchLoggingOptions := map[string]interface{}{ - "enabled": aws.BoolValue(clo.Enabled), - } - if aws.BoolValue(clo.Enabled) { - cloudwatchLoggingOptions["log_group_name"] = aws.StringValue(clo.LogGroupName) - cloudwatchLoggingOptions["log_stream_name"] = aws.StringValue(clo.LogStreamName) - } - return schema.NewSet(cloudwatchLoggingOptionsHash, []interface{}{cloudwatchLoggingOptions}) -} - -func flattenFirehoseElasticsearchConfiguration(description *firehose.ElasticsearchDestinationDescription) []map[string]interface{} { - if description == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), - "domain_arn": aws.StringValue(description.DomainARN), - "role_arn": aws.StringValue(description.RoleARN), - "type_name": aws.StringValue(description.TypeName), - "index_name": aws.StringValue(description.IndexName), - "s3_backup_mode": aws.StringValue(description.S3BackupMode), - "index_rotation_period": aws.StringValue(description.IndexRotationPeriod), - "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, aws.StringValue(description.RoleARN)), - } - - if description.BufferingHints != nil { - m["buffering_interval"] = int(aws.Int64Value(description.BufferingHints.IntervalInSeconds)) - m["buffering_size"] = int(aws.Int64Value(description.BufferingHints.SizeInMBs)) - } - - if description.RetryOptions != nil { - m["retry_duration"] = int(aws.Int64Value(description.RetryOptions.DurationInSeconds)) - } - - return []map[string]interface{}{m} -} - -func flattenFirehoseExtendedS3Configuration(description *firehose.ExtendedS3DestinationDescription) []map[string]interface{} { - if description == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "bucket_arn": aws.StringValue(description.BucketARN), - "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), - "compression_format": aws.StringValue(description.CompressionFormat), - "data_format_conversion_configuration": flattenFirehoseDataFormatConversionConfiguration(description.DataFormatConversionConfiguration), - "error_output_prefix": aws.StringValue(description.ErrorOutputPrefix), - "prefix": aws.StringValue(description.Prefix), - "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, aws.StringValue(description.RoleARN)), - "role_arn": aws.StringValue(description.RoleARN), - "s3_backup_configuration": flattenFirehoseS3Configuration(description.S3BackupDescription), - "s3_backup_mode": aws.StringValue(description.S3BackupMode), - } - - if description.BufferingHints != nil { - m["buffer_interval"] = int(aws.Int64Value(description.BufferingHints.IntervalInSeconds)) - m["buffer_size"] = int(aws.Int64Value(description.BufferingHints.SizeInMBs)) - } - - if description.EncryptionConfiguration != nil && description.EncryptionConfiguration.KMSEncryptionConfig != nil { - m["kms_key_arn"] = aws.StringValue(description.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN) - } - - return []map[string]interface{}{m} -} - -func flattenFirehoseRedshiftConfiguration(description *firehose.RedshiftDestinationDescription, configuredPassword string) []map[string]interface{} { - if description == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), - "cluster_jdbcurl": aws.StringValue(description.ClusterJDBCURL), - "password": configuredPassword, - "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, aws.StringValue(description.RoleARN)), - "role_arn": aws.StringValue(description.RoleARN), - "s3_backup_configuration": flattenFirehoseS3Configuration(description.S3BackupDescription), - "s3_backup_mode": aws.StringValue(description.S3BackupMode), - "username": aws.StringValue(description.Username), - } - - if description.CopyCommand != nil { - m["copy_options"] = aws.StringValue(description.CopyCommand.CopyOptions) - m["data_table_columns"] = aws.StringValue(description.CopyCommand.DataTableColumns) - m["data_table_name"] = aws.StringValue(description.CopyCommand.DataTableName) - } - - if description.RetryOptions != nil { - m["retry_duration"] = int(aws.Int64Value(description.RetryOptions.DurationInSeconds)) - } - - return []map[string]interface{}{m} -} - -func flattenFirehoseSplunkConfiguration(description *firehose.SplunkDestinationDescription) []map[string]interface{} { - if description == nil { - return []map[string]interface{}{} - } - m := map[string]interface{}{ - "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), - "hec_acknowledgment_timeout": int(aws.Int64Value(description.HECAcknowledgmentTimeoutInSeconds)), - "hec_endpoint_type": aws.StringValue(description.HECEndpointType), - "hec_endpoint": aws.StringValue(description.HECEndpoint), - "hec_token": aws.StringValue(description.HECToken), - "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, ""), - "s3_backup_mode": aws.StringValue(description.S3BackupMode), - } - - if description.RetryOptions != nil { - m["retry_duration"] = int(aws.Int64Value(description.RetryOptions.DurationInSeconds)) - } - - return []map[string]interface{}{m} -} - -func flattenFirehoseS3Configuration(description *firehose.S3DestinationDescription) []map[string]interface{} { - if description == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "bucket_arn": aws.StringValue(description.BucketARN), - "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), - "compression_format": aws.StringValue(description.CompressionFormat), - "prefix": aws.StringValue(description.Prefix), - "role_arn": aws.StringValue(description.RoleARN), - } - - if description.BufferingHints != nil { - m["buffer_interval"] = int(aws.Int64Value(description.BufferingHints.IntervalInSeconds)) - m["buffer_size"] = int(aws.Int64Value(description.BufferingHints.SizeInMBs)) - } - - if description.EncryptionConfiguration != nil && description.EncryptionConfiguration.KMSEncryptionConfig != nil { - m["kms_key_arn"] = aws.StringValue(description.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN) - } - - return []map[string]interface{}{m} -} - -func flattenFirehoseDataFormatConversionConfiguration(dfcc *firehose.DataFormatConversionConfiguration) []map[string]interface{} { - if dfcc == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "enabled": aws.BoolValue(dfcc.Enabled), - "input_format_configuration": flattenFirehoseInputFormatConfiguration(dfcc.InputFormatConfiguration), - "output_format_configuration": flattenFirehoseOutputFormatConfiguration(dfcc.OutputFormatConfiguration), - "schema_configuration": flattenFirehoseSchemaConfiguration(dfcc.SchemaConfiguration), - } - - return []map[string]interface{}{m} -} - -func flattenFirehoseInputFormatConfiguration(ifc *firehose.InputFormatConfiguration) []map[string]interface{} { - if ifc == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "deserializer": flattenFirehoseDeserializer(ifc.Deserializer), - } - - return []map[string]interface{}{m} -} - -func flattenFirehoseDeserializer(deserializer *firehose.Deserializer) []map[string]interface{} { - if deserializer == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "hive_json_ser_de": flattenFirehoseHiveJsonSerDe(deserializer.HiveJsonSerDe), - "open_x_json_ser_de": flattenFirehoseOpenXJsonSerDe(deserializer.OpenXJsonSerDe), - } - - return []map[string]interface{}{m} -} - -func flattenFirehoseHiveJsonSerDe(hjsd *firehose.HiveJsonSerDe) []map[string]interface{} { - if hjsd == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "timestamp_formats": flattenStringList(hjsd.TimestampFormats), - } - - return []map[string]interface{}{m} -} - -func flattenFirehoseOpenXJsonSerDe(oxjsd *firehose.OpenXJsonSerDe) []map[string]interface{} { - if oxjsd == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "column_to_json_key_mappings": aws.StringValueMap(oxjsd.ColumnToJsonKeyMappings), - "convert_dots_in_json_keys_to_underscores": aws.BoolValue(oxjsd.ConvertDotsInJsonKeysToUnderscores), - } - - // API omits default values - // Return defaults that are not type zero values to prevent extraneous difference - - m["case_insensitive"] = true - if oxjsd.CaseInsensitive != nil { - m["case_insensitive"] = aws.BoolValue(oxjsd.CaseInsensitive) - } - - return []map[string]interface{}{m} -} - -func flattenFirehoseOutputFormatConfiguration(ofc *firehose.OutputFormatConfiguration) []map[string]interface{} { - if ofc == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "serializer": flattenFirehoseSerializer(ofc.Serializer), - } - - return []map[string]interface{}{m} -} - -func flattenFirehoseSerializer(serializer *firehose.Serializer) []map[string]interface{} { - if serializer == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "orc_ser_de": flattenFirehoseOrcSerDe(serializer.OrcSerDe), - "parquet_ser_de": flattenFirehoseParquetSerDe(serializer.ParquetSerDe), - } - - return []map[string]interface{}{m} -} - -func flattenFirehoseOrcSerDe(osd *firehose.OrcSerDe) []map[string]interface{} { - if osd == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "bloom_filter_columns": aws.StringValueSlice(osd.BloomFilterColumns), - "dictionary_key_threshold": aws.Float64Value(osd.DictionaryKeyThreshold), - "enable_padding": aws.BoolValue(osd.EnablePadding), - } - - // API omits default values - // Return defaults that are not type zero values to prevent extraneous difference - - m["block_size_bytes"] = 268435456 - if osd.BlockSizeBytes != nil { - m["block_size_bytes"] = int(aws.Int64Value(osd.BlockSizeBytes)) - } - - m["bloom_filter_false_positive_probability"] = 0.05 - if osd.BloomFilterFalsePositiveProbability != nil { - m["bloom_filter_false_positive_probability"] = aws.Float64Value(osd.BloomFilterFalsePositiveProbability) - } - - m["compression"] = firehose.OrcCompressionSnappy - if osd.Compression != nil { - m["compression"] = aws.StringValue(osd.Compression) - } - - m["format_version"] = firehose.OrcFormatVersionV012 - if osd.FormatVersion != nil { - m["format_version"] = aws.StringValue(osd.FormatVersion) - } - - m["padding_tolerance"] = 0.05 - if osd.PaddingTolerance != nil { - m["padding_tolerance"] = aws.Float64Value(osd.PaddingTolerance) - } - - m["row_index_stride"] = 10000 - if osd.RowIndexStride != nil { - m["row_index_stride"] = int(aws.Int64Value(osd.RowIndexStride)) - } - - m["stripe_size_bytes"] = 67108864 - if osd.StripeSizeBytes != nil { - m["stripe_size_bytes"] = int(aws.Int64Value(osd.StripeSizeBytes)) - } - - return []map[string]interface{}{m} -} - -func flattenFirehoseParquetSerDe(psd *firehose.ParquetSerDe) []map[string]interface{} { - if psd == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "enable_dictionary_compression": aws.BoolValue(psd.EnableDictionaryCompression), - "max_padding_bytes": int(aws.Int64Value(psd.MaxPaddingBytes)), - } - - // API omits default values - // Return defaults that are not type zero values to prevent extraneous difference - - m["block_size_bytes"] = 268435456 - if psd.BlockSizeBytes != nil { - m["block_size_bytes"] = int(aws.Int64Value(psd.BlockSizeBytes)) - } - - m["compression"] = firehose.ParquetCompressionSnappy - if psd.Compression != nil { - m["compression"] = aws.StringValue(psd.Compression) - } - - m["page_size_bytes"] = 1048576 - if psd.PageSizeBytes != nil { - m["page_size_bytes"] = int(aws.Int64Value(psd.PageSizeBytes)) - } - - m["writer_version"] = firehose.ParquetWriterVersionV1 - if psd.WriterVersion != nil { - m["writer_version"] = aws.StringValue(psd.WriterVersion) - } - - return []map[string]interface{}{m} -} - -func flattenFirehoseSchemaConfiguration(sc *firehose.SchemaConfiguration) []map[string]interface{} { - if sc == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "catalog_id": aws.StringValue(sc.CatalogId), - "database_name": aws.StringValue(sc.DatabaseName), - "region": aws.StringValue(sc.Region), - "role_arn": aws.StringValue(sc.RoleARN), - "table_name": aws.StringValue(sc.TableName), - "version_id": aws.StringValue(sc.VersionId), - } - - return []map[string]interface{}{m} -} - -func flattenProcessingConfiguration(pc *firehose.ProcessingConfiguration, roleArn string) []map[string]interface{} { - if pc == nil { - return []map[string]interface{}{} - } - - processingConfiguration := make([]map[string]interface{}, 1) - - // It is necessary to explicitly filter this out - // to prevent diffs during routine use and retain the ability - // to show diffs if any field has drifted - defaultLambdaParams := map[string]string{ - "NumberOfRetries": "3", - "RoleArn": roleArn, - "BufferSizeInMBs": "3", - "BufferIntervalInSeconds": "60", - } - - processors := make([]interface{}, len(pc.Processors)) - for i, p := range pc.Processors { - t := aws.StringValue(p.Type) - parameters := make([]interface{}, 0) - - for _, params := range p.Parameters { - name := aws.StringValue(params.ParameterName) - value := aws.StringValue(params.ParameterValue) - - if t == firehose.ProcessorTypeLambda { - // Ignore defaults - if v, ok := defaultLambdaParams[name]; ok && v == value { - continue - } - } - - parameters = append(parameters, map[string]interface{}{ - "parameter_name": name, - "parameter_value": value, - }) - } - - processors[i] = map[string]interface{}{ - "type": t, - "parameters": parameters, - } - } - processingConfiguration[0] = map[string]interface{}{ - "enabled": aws.BoolValue(pc.Enabled), - "processors": processors, - } - return processingConfiguration -} - -func flattenKinesisFirehoseDeliveryStream(d *schema.ResourceData, s *firehose.DeliveryStreamDescription) error { - d.Set("version_id", s.VersionId) - d.Set("arn", *s.DeliveryStreamARN) - d.Set("name", s.DeliveryStreamName) - if len(s.Destinations) > 0 { - destination := s.Destinations[0] - if destination.RedshiftDestinationDescription != nil { - d.Set("destination", "redshift") - configuredPassword := d.Get("redshift_configuration.0.password").(string) - if err := d.Set("redshift_configuration", flattenFirehoseRedshiftConfiguration(destination.RedshiftDestinationDescription, configuredPassword)); err != nil { - return fmt.Errorf("error setting redshift_configuration: %s", err) - } - if err := d.Set("s3_configuration", flattenFirehoseS3Configuration(destination.RedshiftDestinationDescription.S3DestinationDescription)); err != nil { - return fmt.Errorf("error setting s3_configuration: %s", err) - } - } else if destination.ElasticsearchDestinationDescription != nil { - d.Set("destination", "elasticsearch") - if err := d.Set("elasticsearch_configuration", flattenFirehoseElasticsearchConfiguration(destination.ElasticsearchDestinationDescription)); err != nil { - return fmt.Errorf("error setting elasticsearch_configuration: %s", err) - } - if err := d.Set("s3_configuration", flattenFirehoseS3Configuration(destination.ElasticsearchDestinationDescription.S3DestinationDescription)); err != nil { - return fmt.Errorf("error setting s3_configuration: %s", err) - } - } else if destination.SplunkDestinationDescription != nil { - d.Set("destination", "splunk") - if err := d.Set("splunk_configuration", flattenFirehoseSplunkConfiguration(destination.SplunkDestinationDescription)); err != nil { - return fmt.Errorf("error setting splunk_configuration: %s", err) - } - if err := d.Set("s3_configuration", flattenFirehoseS3Configuration(destination.SplunkDestinationDescription.S3DestinationDescription)); err != nil { - return fmt.Errorf("error setting s3_configuration: %s", err) - } - } else if d.Get("destination").(string) == "s3" { - d.Set("destination", "s3") - if err := d.Set("s3_configuration", flattenFirehoseS3Configuration(destination.S3DestinationDescription)); err != nil { - return fmt.Errorf("error setting s3_configuration: %s", err) - } - } else { - d.Set("destination", "extended_s3") - if err := d.Set("extended_s3_configuration", flattenFirehoseExtendedS3Configuration(destination.ExtendedS3DestinationDescription)); err != nil { - return fmt.Errorf("error setting extended_s3_configuration: %s", err) - } - } - d.Set("destination_id", destination.DestinationId) - } - return nil -} - -func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsKinesisFirehoseDeliveryStreamCreate, - Read: resourceAwsKinesisFirehoseDeliveryStreamRead, - Update: resourceAwsKinesisFirehoseDeliveryStreamUpdate, - Delete: resourceAwsKinesisFirehoseDeliveryStreamDelete, - - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idErr := fmt.Errorf("Expected ID in format of arn:PARTITION:firehose:REGION:ACCOUNTID:deliverystream/NAME and provided: %s", d.Id()) - resARN, err := arn.Parse(d.Id()) - if err != nil { - return nil, idErr - } - resourceParts := strings.Split(resARN.Resource, "/") - if len(resourceParts) != 2 { - return nil, idErr - } - d.Set("name", resourceParts[1]) - return []*schema.ResourceData{d}, nil - }, - }, - - SchemaVersion: 1, - MigrateState: resourceAwsKinesisFirehoseMigrateState, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 64 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 64 characters", k)) - } - return - }, - }, - - "tags": tagsSchema(), - - "kinesis_source_configuration": { - Type: schema.TypeList, - ForceNew: true, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "kinesis_stream_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - - "destination": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: func(v interface{}) string { - value := v.(string) - return strings.ToLower(value) - }, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != "s3" && value != "extended_s3" && value != "redshift" && value != "elasticsearch" && value != "splunk" { - errors = append(errors, fmt.Errorf( - "%q must be one of 's3', 'extended_s3', 'redshift', 'elasticsearch', 'splunk'", k)) - } - return - }, - }, - - "s3_configuration": s3ConfigurationSchema(), - - "extended_s3_configuration": { - Type: schema.TypeList, - Optional: true, - ConflictsWith: []string{"s3_configuration"}, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket_arn": { - Type: schema.TypeString, - Required: true, - }, - - "buffer_size": { - Type: schema.TypeInt, - Optional: true, - Default: 5, - }, - - "buffer_interval": { - Type: schema.TypeInt, - Optional: true, - Default: 300, - }, - - "compression_format": { - Type: schema.TypeString, - Optional: true, - Default: "UNCOMPRESSED", - }, - - "data_format_conversion_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "input_format_configuration": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "deserializer": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "hive_json_ser_de": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{"extended_s3_configuration.0.data_format_conversion_configuration.0.input_format_configuration.0.deserializer.0.open_x_json_ser_de"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "timestamp_formats": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "open_x_json_ser_de": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{"extended_s3_configuration.0.data_format_conversion_configuration.0.input_format_configuration.0.deserializer.0.hive_json_ser_de"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "case_insensitive": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "column_to_json_key_mappings": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "convert_dots_in_json_keys_to_underscores": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - "output_format_configuration": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "serializer": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "orc_ser_de": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{"extended_s3_configuration.0.data_format_conversion_configuration.0.output_format_configuration.0.serializer.0.parquet_ser_de"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "block_size_bytes": { - Type: schema.TypeInt, - Optional: true, - // 256 MiB - Default: 268435456, - // 64 MiB - ValidateFunc: validation.IntAtLeast(67108864), - }, - "bloom_filter_columns": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "bloom_filter_false_positive_probability": { - Type: schema.TypeFloat, - Optional: true, - Default: 0.05, - }, - "compression": { - Type: schema.TypeString, - Optional: true, - Default: firehose.OrcCompressionSnappy, - ValidateFunc: validation.StringInSlice([]string{ - firehose.OrcCompressionNone, - firehose.OrcCompressionSnappy, - firehose.OrcCompressionZlib, - }, false), - }, - "dictionary_key_threshold": { - Type: schema.TypeFloat, - Optional: true, - Default: 0.0, - }, - "enable_padding": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "format_version": { - Type: schema.TypeString, - Optional: true, - Default: firehose.OrcFormatVersionV012, - ValidateFunc: validation.StringInSlice([]string{ - firehose.OrcFormatVersionV011, - firehose.OrcFormatVersionV012, - }, false), - }, - "padding_tolerance": { - Type: schema.TypeFloat, - Optional: true, - Default: 0.05, - }, - "row_index_stride": { - Type: schema.TypeInt, - Optional: true, - Default: 10000, - ValidateFunc: validation.IntAtLeast(1000), - }, - "stripe_size_bytes": { - Type: schema.TypeInt, - Optional: true, - // 64 MiB - Default: 67108864, - // 8 MiB - ValidateFunc: validation.IntAtLeast(8388608), - }, - }, - }, - }, - "parquet_ser_de": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{"extended_s3_configuration.0.data_format_conversion_configuration.0.output_format_configuration.0.serializer.0.orc_ser_de"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "block_size_bytes": { - Type: schema.TypeInt, - Optional: true, - // 256 MiB - Default: 268435456, - // 64 MiB - ValidateFunc: validation.IntAtLeast(67108864), - }, - "compression": { - Type: schema.TypeString, - Optional: true, - Default: firehose.ParquetCompressionSnappy, - ValidateFunc: validation.StringInSlice([]string{ - firehose.ParquetCompressionGzip, - firehose.ParquetCompressionSnappy, - firehose.ParquetCompressionUncompressed, - }, false), - }, - "enable_dictionary_compression": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "max_padding_bytes": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - "page_size_bytes": { - Type: schema.TypeInt, - Optional: true, - // 1 MiB - Default: 1048576, - // 64 KiB - ValidateFunc: validation.IntAtLeast(65536), - }, - "writer_version": { - Type: schema.TypeString, - Optional: true, - Default: firehose.ParquetWriterVersionV1, - ValidateFunc: validation.StringInSlice([]string{ - firehose.ParquetWriterVersionV1, - firehose.ParquetWriterVersionV2, - }, false), - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - "schema_configuration": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "catalog_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "database_name": { - Type: schema.TypeString, - Required: true, - }, - "region": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - }, - "table_name": { - Type: schema.TypeString, - Required: true, - }, - "version_id": { - Type: schema.TypeString, - Optional: true, - Default: "LATEST", - }, - }, - }, - }, - }, - }, - }, - - "error_output_prefix": { - Type: schema.TypeString, - Optional: true, - }, - - "kms_key_arn": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - }, - - "prefix": { - Type: schema.TypeString, - Optional: true, - }, - - "s3_backup_mode": { - Type: schema.TypeString, - Optional: true, - Default: "Disabled", - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != "Disabled" && value != "Enabled" { - errors = append(errors, fmt.Errorf( - "%q must be one of 'Disabled', 'Enabled'", k)) - } - return - }, - }, - - "s3_backup_configuration": s3ConfigurationSchema(), - - "cloudwatch_logging_options": cloudWatchLoggingOptionsSchema(), - - "processing_configuration": processingConfigurationSchema(), - }, - }, - }, - - "redshift_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cluster_jdbcurl": { - Type: schema.TypeString, - Required: true, - }, - - "username": { - Type: schema.TypeString, - Required: true, - }, - - "password": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - }, - - "processing_configuration": processingConfigurationSchema(), - - "role_arn": { - Type: schema.TypeString, - Required: true, - }, - - "s3_backup_mode": { - Type: schema.TypeString, - Optional: true, - Default: "Disabled", - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != "Disabled" && value != "Enabled" { - errors = append(errors, fmt.Errorf( - "%q must be one of 'Disabled', 'Enabled'", k)) - } - return - }, - }, - - "s3_backup_configuration": s3ConfigurationSchema(), - - "retry_duration": { - Type: schema.TypeInt, - Optional: true, - Default: 3600, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(int) - if value < 0 || value > 7200 { - errors = append(errors, fmt.Errorf( - "%q must be in the range from 0 to 7200 seconds.", k)) - } - return - }, - }, - - "copy_options": { - Type: schema.TypeString, - Optional: true, - }, - - "data_table_columns": { - Type: schema.TypeString, - Optional: true, - }, - - "data_table_name": { - Type: schema.TypeString, - Required: true, - }, - - "cloudwatch_logging_options": cloudWatchLoggingOptionsSchema(), - }, - }, - }, - - "elasticsearch_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "buffering_interval": { - Type: schema.TypeInt, - Optional: true, - Default: 300, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(int) - if value < 60 || value > 900 { - errors = append(errors, fmt.Errorf( - "%q must be in the range from 60 to 900 seconds.", k)) - } - return - }, - }, - - "buffering_size": { - Type: schema.TypeInt, - Optional: true, - Default: 5, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(int) - if value < 1 || value > 100 { - errors = append(errors, fmt.Errorf( - "%q must be in the range from 1 to 100 MB.", k)) - } - return - }, - }, - - "domain_arn": { - Type: schema.TypeString, - Required: true, - }, - - "index_name": { - Type: schema.TypeString, - Required: true, - }, - - "index_rotation_period": { - Type: schema.TypeString, - Optional: true, - Default: "OneDay", - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != "NoRotation" && value != "OneHour" && value != "OneDay" && value != "OneWeek" && value != "OneMonth" { - errors = append(errors, fmt.Errorf( - "%q must be one of 'NoRotation', 'OneHour', 'OneDay', 'OneWeek', 'OneMonth'", k)) - } - return - }, - }, - - "retry_duration": { - Type: schema.TypeInt, - Optional: true, - Default: 300, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(int) - if value < 0 || value > 7200 { - errors = append(errors, fmt.Errorf( - "%q must be in the range from 0 to 7200 seconds.", k)) - } - return - }, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - }, - - "s3_backup_mode": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - Default: "FailedDocumentsOnly", - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != "FailedDocumentsOnly" && value != "AllDocuments" { - errors = append(errors, fmt.Errorf( - "%q must be one of 'FailedDocumentsOnly', 'AllDocuments'", k)) - } - return - }, - }, - - "type_name": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 100 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 100 characters", k)) - } - return - }, - }, - - "cloudwatch_logging_options": cloudWatchLoggingOptionsSchema(), - - "processing_configuration": processingConfigurationSchema(), - }, - }, - }, - - "splunk_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "hec_acknowledgment_timeout": { - Type: schema.TypeInt, - Optional: true, - Default: 180, - ValidateFunc: validation.IntBetween(180, 600), - }, - - "hec_endpoint": { - Type: schema.TypeString, - Required: true, - }, - - "hec_endpoint_type": { - Type: schema.TypeString, - Optional: true, - Default: firehose.HECEndpointTypeRaw, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != firehose.HECEndpointTypeRaw && value != firehose.HECEndpointTypeEvent { - errors = append(errors, fmt.Errorf( - "%q must be one of 'Raw', 'Event'", k)) - } - return - }, - }, - - "hec_token": { - Type: schema.TypeString, - Required: true, - }, - - "s3_backup_mode": { - Type: schema.TypeString, - Optional: true, - Default: firehose.SplunkS3BackupModeFailedEventsOnly, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != firehose.SplunkS3BackupModeFailedEventsOnly && value != firehose.SplunkS3BackupModeAllEvents { - errors = append(errors, fmt.Errorf( - "%q must be one of 'FailedEventsOnly', 'AllEvents'", k)) - } - return - }, - }, - - "retry_duration": { - Type: schema.TypeInt, - Optional: true, - Default: 3600, - ValidateFunc: validation.IntBetween(0, 7200), - }, - - "cloudwatch_logging_options": cloudWatchLoggingOptionsSchema(), - - "processing_configuration": processingConfigurationSchema(), - }, - }, - }, - - "arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "version_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "destination_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - } -} - -func createSourceConfig(source map[string]interface{}) *firehose.KinesisStreamSourceConfiguration { - - configuration := &firehose.KinesisStreamSourceConfiguration{ - KinesisStreamARN: aws.String(source["kinesis_stream_arn"].(string)), - RoleARN: aws.String(source["role_arn"].(string)), - } - - return configuration -} - -func createS3Config(d *schema.ResourceData) *firehose.S3DestinationConfiguration { - s3 := d.Get("s3_configuration").([]interface{})[0].(map[string]interface{}) - - configuration := &firehose.S3DestinationConfiguration{ - BucketARN: aws.String(s3["bucket_arn"].(string)), - RoleARN: aws.String(s3["role_arn"].(string)), - BufferingHints: &firehose.BufferingHints{ - IntervalInSeconds: aws.Int64(int64(s3["buffer_interval"].(int))), - SizeInMBs: aws.Int64(int64(s3["buffer_size"].(int))), - }, - Prefix: extractPrefixConfiguration(s3), - CompressionFormat: aws.String(s3["compression_format"].(string)), - EncryptionConfiguration: extractEncryptionConfiguration(s3), - } - - if _, ok := s3["cloudwatch_logging_options"]; ok { - configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(s3) - } - - return configuration -} - -func expandS3BackupConfig(d map[string]interface{}) *firehose.S3DestinationConfiguration { - config := d["s3_backup_configuration"].([]interface{}) - if len(config) == 0 { - return nil - } - - s3 := config[0].(map[string]interface{}) - - configuration := &firehose.S3DestinationConfiguration{ - BucketARN: aws.String(s3["bucket_arn"].(string)), - RoleARN: aws.String(s3["role_arn"].(string)), - BufferingHints: &firehose.BufferingHints{ - IntervalInSeconds: aws.Int64(int64(s3["buffer_interval"].(int))), - SizeInMBs: aws.Int64(int64(s3["buffer_size"].(int))), - }, - Prefix: extractPrefixConfiguration(s3), - CompressionFormat: aws.String(s3["compression_format"].(string)), - EncryptionConfiguration: extractEncryptionConfiguration(s3), - } - - if _, ok := s3["cloudwatch_logging_options"]; ok { - configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(s3) - } - - return configuration -} - -func createExtendedS3Config(d *schema.ResourceData) *firehose.ExtendedS3DestinationConfiguration { - s3 := d.Get("extended_s3_configuration").([]interface{})[0].(map[string]interface{}) - - configuration := &firehose.ExtendedS3DestinationConfiguration{ - BucketARN: aws.String(s3["bucket_arn"].(string)), - RoleARN: aws.String(s3["role_arn"].(string)), - BufferingHints: &firehose.BufferingHints{ - IntervalInSeconds: aws.Int64(int64(s3["buffer_interval"].(int))), - SizeInMBs: aws.Int64(int64(s3["buffer_size"].(int))), - }, - Prefix: extractPrefixConfiguration(s3), - CompressionFormat: aws.String(s3["compression_format"].(string)), - DataFormatConversionConfiguration: expandFirehoseDataFormatConversionConfiguration(s3["data_format_conversion_configuration"].([]interface{})), - EncryptionConfiguration: extractEncryptionConfiguration(s3), - } - - if _, ok := s3["processing_configuration"]; ok { - configuration.ProcessingConfiguration = extractProcessingConfiguration(s3) - } - - if _, ok := s3["cloudwatch_logging_options"]; ok { - configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(s3) - } - - if v, ok := s3["error_output_prefix"]; ok && v.(string) != "" { - configuration.ErrorOutputPrefix = aws.String(v.(string)) - } - - if s3BackupMode, ok := s3["s3_backup_mode"]; ok { - configuration.S3BackupMode = aws.String(s3BackupMode.(string)) - configuration.S3BackupConfiguration = expandS3BackupConfig(d.Get("extended_s3_configuration").([]interface{})[0].(map[string]interface{})) - } - - return configuration -} - -func updateS3Config(d *schema.ResourceData) *firehose.S3DestinationUpdate { - s3 := d.Get("s3_configuration").([]interface{})[0].(map[string]interface{}) - - configuration := &firehose.S3DestinationUpdate{ - BucketARN: aws.String(s3["bucket_arn"].(string)), - RoleARN: aws.String(s3["role_arn"].(string)), - BufferingHints: &firehose.BufferingHints{ - IntervalInSeconds: aws.Int64((int64)(s3["buffer_interval"].(int))), - SizeInMBs: aws.Int64((int64)(s3["buffer_size"].(int))), - }, - Prefix: extractPrefixConfiguration(s3), - CompressionFormat: aws.String(s3["compression_format"].(string)), - EncryptionConfiguration: extractEncryptionConfiguration(s3), - CloudWatchLoggingOptions: extractCloudWatchLoggingConfiguration(s3), - } - - if _, ok := s3["cloudwatch_logging_options"]; ok { - configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(s3) - } - - return configuration -} - -func updateS3BackupConfig(d map[string]interface{}) *firehose.S3DestinationUpdate { - config := d["s3_backup_configuration"].([]interface{}) - if len(config) == 0 { - return nil - } - - s3 := config[0].(map[string]interface{}) - - configuration := &firehose.S3DestinationUpdate{ - BucketARN: aws.String(s3["bucket_arn"].(string)), - RoleARN: aws.String(s3["role_arn"].(string)), - BufferingHints: &firehose.BufferingHints{ - IntervalInSeconds: aws.Int64((int64)(s3["buffer_interval"].(int))), - SizeInMBs: aws.Int64((int64)(s3["buffer_size"].(int))), - }, - Prefix: extractPrefixConfiguration(s3), - CompressionFormat: aws.String(s3["compression_format"].(string)), - EncryptionConfiguration: extractEncryptionConfiguration(s3), - CloudWatchLoggingOptions: extractCloudWatchLoggingConfiguration(s3), - } - - if _, ok := s3["cloudwatch_logging_options"]; ok { - configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(s3) - } - - return configuration -} - -func updateExtendedS3Config(d *schema.ResourceData) *firehose.ExtendedS3DestinationUpdate { - s3 := d.Get("extended_s3_configuration").([]interface{})[0].(map[string]interface{}) - - configuration := &firehose.ExtendedS3DestinationUpdate{ - BucketARN: aws.String(s3["bucket_arn"].(string)), - RoleARN: aws.String(s3["role_arn"].(string)), - BufferingHints: &firehose.BufferingHints{ - IntervalInSeconds: aws.Int64((int64)(s3["buffer_interval"].(int))), - SizeInMBs: aws.Int64((int64)(s3["buffer_size"].(int))), - }, - Prefix: extractPrefixConfiguration(s3), - CompressionFormat: aws.String(s3["compression_format"].(string)), - EncryptionConfiguration: extractEncryptionConfiguration(s3), - DataFormatConversionConfiguration: expandFirehoseDataFormatConversionConfiguration(s3["data_format_conversion_configuration"].([]interface{})), - CloudWatchLoggingOptions: extractCloudWatchLoggingConfiguration(s3), - ProcessingConfiguration: extractProcessingConfiguration(s3), - } - - if _, ok := s3["cloudwatch_logging_options"]; ok { - configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(s3) - } - - if v, ok := s3["error_output_prefix"]; ok && v.(string) != "" { - configuration.ErrorOutputPrefix = aws.String(v.(string)) - } - - if s3BackupMode, ok := s3["s3_backup_mode"]; ok { - configuration.S3BackupMode = aws.String(s3BackupMode.(string)) - configuration.S3BackupUpdate = updateS3BackupConfig(d.Get("extended_s3_configuration").([]interface{})[0].(map[string]interface{})) - } - - return configuration -} - -func expandFirehoseDataFormatConversionConfiguration(l []interface{}) *firehose.DataFormatConversionConfiguration { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - return &firehose.DataFormatConversionConfiguration{ - Enabled: aws.Bool(m["enabled"].(bool)), - InputFormatConfiguration: expandFirehoseInputFormatConfiguration(m["input_format_configuration"].([]interface{})), - OutputFormatConfiguration: expandFirehoseOutputFormatConfiguration(m["output_format_configuration"].([]interface{})), - SchemaConfiguration: expandFirehoseSchemaConfiguration(m["schema_configuration"].([]interface{})), - } -} - -func expandFirehoseInputFormatConfiguration(l []interface{}) *firehose.InputFormatConfiguration { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - return &firehose.InputFormatConfiguration{ - Deserializer: expandFirehoseDeserializer(m["deserializer"].([]interface{})), - } -} - -func expandFirehoseDeserializer(l []interface{}) *firehose.Deserializer { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - return &firehose.Deserializer{ - HiveJsonSerDe: expandFirehoseHiveJsonSerDe(m["hive_json_ser_de"].([]interface{})), - OpenXJsonSerDe: expandFirehoseOpenXJsonSerDe(m["open_x_json_ser_de"].([]interface{})), - } -} - -func expandFirehoseHiveJsonSerDe(l []interface{}) *firehose.HiveJsonSerDe { - if len(l) == 0 { - return nil - } - - if l[0] == nil { - return &firehose.HiveJsonSerDe{} - } - - m := l[0].(map[string]interface{}) - - return &firehose.HiveJsonSerDe{ - TimestampFormats: expandStringList(m["timestamp_formats"].([]interface{})), - } -} - -func expandFirehoseOpenXJsonSerDe(l []interface{}) *firehose.OpenXJsonSerDe { - if len(l) == 0 { - return nil - } - - if l[0] == nil { - return &firehose.OpenXJsonSerDe{} - } - - m := l[0].(map[string]interface{}) - - return &firehose.OpenXJsonSerDe{ - CaseInsensitive: aws.Bool(m["case_insensitive"].(bool)), - ColumnToJsonKeyMappings: stringMapToPointers(m["column_to_json_key_mappings"].(map[string]interface{})), - ConvertDotsInJsonKeysToUnderscores: aws.Bool(m["convert_dots_in_json_keys_to_underscores"].(bool)), - } -} - -func expandFirehoseOutputFormatConfiguration(l []interface{}) *firehose.OutputFormatConfiguration { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - return &firehose.OutputFormatConfiguration{ - Serializer: expandFirehoseSerializer(m["serializer"].([]interface{})), - } -} - -func expandFirehoseSerializer(l []interface{}) *firehose.Serializer { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - return &firehose.Serializer{ - OrcSerDe: expandFirehoseOrcSerDe(m["orc_ser_de"].([]interface{})), - ParquetSerDe: expandFirehoseParquetSerDe(m["parquet_ser_de"].([]interface{})), - } -} - -func expandFirehoseOrcSerDe(l []interface{}) *firehose.OrcSerDe { - if len(l) == 0 { - return nil - } - - if l[0] == nil { - return &firehose.OrcSerDe{} - } - - m := l[0].(map[string]interface{}) - - orcSerDe := &firehose.OrcSerDe{ - BlockSizeBytes: aws.Int64(int64(m["block_size_bytes"].(int))), - BloomFilterFalsePositiveProbability: aws.Float64(m["bloom_filter_false_positive_probability"].(float64)), - Compression: aws.String(m["compression"].(string)), - DictionaryKeyThreshold: aws.Float64(m["dictionary_key_threshold"].(float64)), - EnablePadding: aws.Bool(m["enable_padding"].(bool)), - FormatVersion: aws.String(m["format_version"].(string)), - PaddingTolerance: aws.Float64(m["padding_tolerance"].(float64)), - RowIndexStride: aws.Int64(int64(m["row_index_stride"].(int))), - StripeSizeBytes: aws.Int64(int64(m["stripe_size_bytes"].(int))), - } - - if v, ok := m["bloom_filter_columns"].([]interface{}); ok && len(v) > 0 { - orcSerDe.BloomFilterColumns = expandStringList(v) - } - - return orcSerDe -} - -func expandFirehoseParquetSerDe(l []interface{}) *firehose.ParquetSerDe { - if len(l) == 0 { - return nil - } - - if l[0] == nil { - return &firehose.ParquetSerDe{} - } - - m := l[0].(map[string]interface{}) - - return &firehose.ParquetSerDe{ - BlockSizeBytes: aws.Int64(int64(m["block_size_bytes"].(int))), - Compression: aws.String(m["compression"].(string)), - EnableDictionaryCompression: aws.Bool(m["enable_dictionary_compression"].(bool)), - MaxPaddingBytes: aws.Int64(int64(m["max_padding_bytes"].(int))), - PageSizeBytes: aws.Int64(int64(m["page_size_bytes"].(int))), - WriterVersion: aws.String(m["writer_version"].(string)), - } -} - -func expandFirehoseSchemaConfiguration(l []interface{}) *firehose.SchemaConfiguration { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - config := &firehose.SchemaConfiguration{ - DatabaseName: aws.String(m["database_name"].(string)), - RoleARN: aws.String(m["role_arn"].(string)), - TableName: aws.String(m["table_name"].(string)), - VersionId: aws.String(m["version_id"].(string)), - } - - if v, ok := m["catalog_id"].(string); ok && v != "" { - config.CatalogId = aws.String(v) - } - if v, ok := m["region"].(string); ok && v != "" { - config.Region = aws.String(v) - } - - return config -} - -func extractProcessingConfiguration(s3 map[string]interface{}) *firehose.ProcessingConfiguration { - config := s3["processing_configuration"].([]interface{}) - if len(config) == 0 { - return nil - } - - processingConfiguration := config[0].(map[string]interface{}) - - return &firehose.ProcessingConfiguration{ - Enabled: aws.Bool(processingConfiguration["enabled"].(bool)), - Processors: extractProcessors(processingConfiguration["processors"].([]interface{})), - } -} - -func extractProcessors(processingConfigurationProcessors []interface{}) []*firehose.Processor { - processors := []*firehose.Processor{} - - for _, processor := range processingConfigurationProcessors { - processors = append(processors, extractProcessor(processor.(map[string]interface{}))) - } - - return processors -} - -func extractProcessor(processingConfigurationProcessor map[string]interface{}) *firehose.Processor { - return &firehose.Processor{ - Type: aws.String(processingConfigurationProcessor["type"].(string)), - Parameters: extractProcessorParameters(processingConfigurationProcessor["parameters"].([]interface{})), - } -} - -func extractProcessorParameters(processorParameters []interface{}) []*firehose.ProcessorParameter { - parameters := []*firehose.ProcessorParameter{} - - for _, attr := range processorParameters { - parameters = append(parameters, extractProcessorParameter(attr.(map[string]interface{}))) - } - - return parameters -} - -func extractProcessorParameter(processorParameter map[string]interface{}) *firehose.ProcessorParameter { - parameter := &firehose.ProcessorParameter{ - ParameterName: aws.String(processorParameter["parameter_name"].(string)), - ParameterValue: aws.String(processorParameter["parameter_value"].(string)), - } - - return parameter -} - -func extractEncryptionConfiguration(s3 map[string]interface{}) *firehose.EncryptionConfiguration { - if key, ok := s3["kms_key_arn"]; ok && len(key.(string)) > 0 { - return &firehose.EncryptionConfiguration{ - KMSEncryptionConfig: &firehose.KMSEncryptionConfig{ - AWSKMSKeyARN: aws.String(key.(string)), - }, - } - } - - return &firehose.EncryptionConfiguration{ - NoEncryptionConfig: aws.String("NoEncryption"), - } -} - -func extractCloudWatchLoggingConfiguration(s3 map[string]interface{}) *firehose.CloudWatchLoggingOptions { - config := s3["cloudwatch_logging_options"].(*schema.Set).List() - if len(config) == 0 { - return nil - } - - loggingConfig := config[0].(map[string]interface{}) - loggingOptions := &firehose.CloudWatchLoggingOptions{ - Enabled: aws.Bool(loggingConfig["enabled"].(bool)), - } - - if v, ok := loggingConfig["log_group_name"]; ok { - loggingOptions.LogGroupName = aws.String(v.(string)) - } - - if v, ok := loggingConfig["log_stream_name"]; ok { - loggingOptions.LogStreamName = aws.String(v.(string)) - } - - return loggingOptions - -} - -func extractPrefixConfiguration(s3 map[string]interface{}) *string { - if v, ok := s3["prefix"]; ok { - return aws.String(v.(string)) - } - - return nil -} - -func createRedshiftConfig(d *schema.ResourceData, s3Config *firehose.S3DestinationConfiguration) (*firehose.RedshiftDestinationConfiguration, error) { - redshiftRaw, ok := d.GetOk("redshift_configuration") - if !ok { - return nil, fmt.Errorf("Error loading Redshift Configuration for Kinesis Firehose: redshift_configuration not found") - } - rl := redshiftRaw.([]interface{}) - - redshift := rl[0].(map[string]interface{}) - - configuration := &firehose.RedshiftDestinationConfiguration{ - ClusterJDBCURL: aws.String(redshift["cluster_jdbcurl"].(string)), - RetryOptions: extractRedshiftRetryOptions(redshift), - Password: aws.String(redshift["password"].(string)), - Username: aws.String(redshift["username"].(string)), - RoleARN: aws.String(redshift["role_arn"].(string)), - CopyCommand: extractCopyCommandConfiguration(redshift), - S3Configuration: s3Config, - } - - if _, ok := redshift["cloudwatch_logging_options"]; ok { - configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(redshift) - } - if _, ok := redshift["processing_configuration"]; ok { - configuration.ProcessingConfiguration = extractProcessingConfiguration(redshift) - } - if s3BackupMode, ok := redshift["s3_backup_mode"]; ok { - configuration.S3BackupMode = aws.String(s3BackupMode.(string)) - configuration.S3BackupConfiguration = expandS3BackupConfig(d.Get("redshift_configuration").([]interface{})[0].(map[string]interface{})) - } - - return configuration, nil -} - -func updateRedshiftConfig(d *schema.ResourceData, s3Update *firehose.S3DestinationUpdate) (*firehose.RedshiftDestinationUpdate, error) { - redshiftRaw, ok := d.GetOk("redshift_configuration") - if !ok { - return nil, fmt.Errorf("Error loading Redshift Configuration for Kinesis Firehose: redshift_configuration not found") - } - rl := redshiftRaw.([]interface{}) - - redshift := rl[0].(map[string]interface{}) - - configuration := &firehose.RedshiftDestinationUpdate{ - ClusterJDBCURL: aws.String(redshift["cluster_jdbcurl"].(string)), - RetryOptions: extractRedshiftRetryOptions(redshift), - Password: aws.String(redshift["password"].(string)), - Username: aws.String(redshift["username"].(string)), - RoleARN: aws.String(redshift["role_arn"].(string)), - CopyCommand: extractCopyCommandConfiguration(redshift), - S3Update: s3Update, - } - - if _, ok := redshift["cloudwatch_logging_options"]; ok { - configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(redshift) - } - if _, ok := redshift["processing_configuration"]; ok { - configuration.ProcessingConfiguration = extractProcessingConfiguration(redshift) - } - if s3BackupMode, ok := redshift["s3_backup_mode"]; ok { - configuration.S3BackupMode = aws.String(s3BackupMode.(string)) - configuration.S3BackupUpdate = updateS3BackupConfig(d.Get("redshift_configuration").([]interface{})[0].(map[string]interface{})) - } - - return configuration, nil -} - -func createElasticsearchConfig(d *schema.ResourceData, s3Config *firehose.S3DestinationConfiguration) (*firehose.ElasticsearchDestinationConfiguration, error) { - esConfig, ok := d.GetOk("elasticsearch_configuration") - if !ok { - return nil, fmt.Errorf("Error loading Elasticsearch Configuration for Kinesis Firehose: elasticsearch_configuration not found") - } - esList := esConfig.([]interface{}) - - es := esList[0].(map[string]interface{}) - - config := &firehose.ElasticsearchDestinationConfiguration{ - BufferingHints: extractBufferingHints(es), - DomainARN: aws.String(es["domain_arn"].(string)), - IndexName: aws.String(es["index_name"].(string)), - RetryOptions: extractElasticSearchRetryOptions(es), - RoleARN: aws.String(es["role_arn"].(string)), - TypeName: aws.String(es["type_name"].(string)), - S3Configuration: s3Config, - } - - if _, ok := es["cloudwatch_logging_options"]; ok { - config.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(es) - } - - if _, ok := es["processing_configuration"]; ok { - config.ProcessingConfiguration = extractProcessingConfiguration(es) - } - - if indexRotationPeriod, ok := es["index_rotation_period"]; ok { - config.IndexRotationPeriod = aws.String(indexRotationPeriod.(string)) - } - if s3BackupMode, ok := es["s3_backup_mode"]; ok { - config.S3BackupMode = aws.String(s3BackupMode.(string)) - } - - return config, nil -} - -func updateElasticsearchConfig(d *schema.ResourceData, s3Update *firehose.S3DestinationUpdate) (*firehose.ElasticsearchDestinationUpdate, error) { - esConfig, ok := d.GetOk("elasticsearch_configuration") - if !ok { - return nil, fmt.Errorf("Error loading Elasticsearch Configuration for Kinesis Firehose: elasticsearch_configuration not found") - } - esList := esConfig.([]interface{}) - - es := esList[0].(map[string]interface{}) - - update := &firehose.ElasticsearchDestinationUpdate{ - BufferingHints: extractBufferingHints(es), - DomainARN: aws.String(es["domain_arn"].(string)), - IndexName: aws.String(es["index_name"].(string)), - RetryOptions: extractElasticSearchRetryOptions(es), - RoleARN: aws.String(es["role_arn"].(string)), - TypeName: aws.String(es["type_name"].(string)), - S3Update: s3Update, - } - - if _, ok := es["cloudwatch_logging_options"]; ok { - update.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(es) - } - - if _, ok := es["processing_configuration"]; ok { - update.ProcessingConfiguration = extractProcessingConfiguration(es) - } - - if indexRotationPeriod, ok := es["index_rotation_period"]; ok { - update.IndexRotationPeriod = aws.String(indexRotationPeriod.(string)) - } - - return update, nil -} - -func createSplunkConfig(d *schema.ResourceData, s3Config *firehose.S3DestinationConfiguration) (*firehose.SplunkDestinationConfiguration, error) { - splunkRaw, ok := d.GetOk("splunk_configuration") - if !ok { - return nil, fmt.Errorf("Error loading Splunk Configuration for Kinesis Firehose: splunk_configuration not found") - } - sl := splunkRaw.([]interface{}) - - splunk := sl[0].(map[string]interface{}) - - configuration := &firehose.SplunkDestinationConfiguration{ - HECToken: aws.String(splunk["hec_token"].(string)), - HECEndpointType: aws.String(splunk["hec_endpoint_type"].(string)), - HECEndpoint: aws.String(splunk["hec_endpoint"].(string)), - HECAcknowledgmentTimeoutInSeconds: aws.Int64(int64(splunk["hec_acknowledgment_timeout"].(int))), - RetryOptions: extractSplunkRetryOptions(splunk), - S3Configuration: s3Config, - } - - if _, ok := splunk["processing_configuration"]; ok { - configuration.ProcessingConfiguration = extractProcessingConfiguration(splunk) - } - - if _, ok := splunk["cloudwatch_logging_options"]; ok { - configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(splunk) - } - if s3BackupMode, ok := splunk["s3_backup_mode"]; ok { - configuration.S3BackupMode = aws.String(s3BackupMode.(string)) - } - - return configuration, nil -} - -func updateSplunkConfig(d *schema.ResourceData, s3Update *firehose.S3DestinationUpdate) (*firehose.SplunkDestinationUpdate, error) { - splunkRaw, ok := d.GetOk("splunk_configuration") - if !ok { - return nil, fmt.Errorf("Error loading Splunk Configuration for Kinesis Firehose: splunk_configuration not found") - } - sl := splunkRaw.([]interface{}) - - splunk := sl[0].(map[string]interface{}) - - configuration := &firehose.SplunkDestinationUpdate{ - HECToken: aws.String(splunk["hec_token"].(string)), - HECEndpointType: aws.String(splunk["hec_endpoint_type"].(string)), - HECEndpoint: aws.String(splunk["hec_endpoint"].(string)), - HECAcknowledgmentTimeoutInSeconds: aws.Int64(int64(splunk["hec_acknowledgment_timeout"].(int))), - RetryOptions: extractSplunkRetryOptions(splunk), - S3Update: s3Update, - } - - if _, ok := splunk["processing_configuration"]; ok { - configuration.ProcessingConfiguration = extractProcessingConfiguration(splunk) - } - - if _, ok := splunk["cloudwatch_logging_options"]; ok { - configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(splunk) - } - if s3BackupMode, ok := splunk["s3_backup_mode"]; ok { - configuration.S3BackupMode = aws.String(s3BackupMode.(string)) - } - - return configuration, nil -} - -func extractBufferingHints(es map[string]interface{}) *firehose.ElasticsearchBufferingHints { - bufferingHints := &firehose.ElasticsearchBufferingHints{} - - if bufferingInterval, ok := es["buffering_interval"].(int); ok { - bufferingHints.IntervalInSeconds = aws.Int64(int64(bufferingInterval)) - } - if bufferingSize, ok := es["buffering_size"].(int); ok { - bufferingHints.SizeInMBs = aws.Int64(int64(bufferingSize)) - } - - return bufferingHints -} - -func extractElasticSearchRetryOptions(es map[string]interface{}) *firehose.ElasticsearchRetryOptions { - retryOptions := &firehose.ElasticsearchRetryOptions{} - - if retryDuration, ok := es["retry_duration"].(int); ok { - retryOptions.DurationInSeconds = aws.Int64(int64(retryDuration)) - } - - return retryOptions -} - -func extractRedshiftRetryOptions(redshift map[string]interface{}) *firehose.RedshiftRetryOptions { - retryOptions := &firehose.RedshiftRetryOptions{} - - if retryDuration, ok := redshift["retry_duration"].(int); ok { - retryOptions.DurationInSeconds = aws.Int64(int64(retryDuration)) - } - - return retryOptions -} - -func extractSplunkRetryOptions(splunk map[string]interface{}) *firehose.SplunkRetryOptions { - retryOptions := &firehose.SplunkRetryOptions{} - - if retryDuration, ok := splunk["retry_duration"].(int); ok { - retryOptions.DurationInSeconds = aws.Int64(int64(retryDuration)) - } - - return retryOptions -} - -func extractCopyCommandConfiguration(redshift map[string]interface{}) *firehose.CopyCommand { - cmd := &firehose.CopyCommand{ - DataTableName: aws.String(redshift["data_table_name"].(string)), - } - if copyOptions, ok := redshift["copy_options"]; ok { - cmd.CopyOptions = aws.String(copyOptions.(string)) - } - if columns, ok := redshift["data_table_columns"]; ok { - cmd.DataTableColumns = aws.String(columns.(string)) - } - - return cmd -} - -func resourceAwsKinesisFirehoseDeliveryStreamCreate(d *schema.ResourceData, meta interface{}) error { - validateError := validateAwsKinesisFirehoseSchema(d) - - if validateError != nil { - return validateError - } - - conn := meta.(*AWSClient).firehoseconn - - sn := d.Get("name").(string) - - createInput := &firehose.CreateDeliveryStreamInput{ - DeliveryStreamName: aws.String(sn), - } - - if v, ok := d.GetOk("kinesis_source_configuration"); ok { - sourceConfig := createSourceConfig(v.([]interface{})[0].(map[string]interface{})) - createInput.KinesisStreamSourceConfiguration = sourceConfig - createInput.DeliveryStreamType = aws.String(firehose.DeliveryStreamTypeKinesisStreamAsSource) - } else { - createInput.DeliveryStreamType = aws.String(firehose.DeliveryStreamTypeDirectPut) - } - - if d.Get("destination").(string) == "extended_s3" { - extendedS3Config := createExtendedS3Config(d) - createInput.ExtendedS3DestinationConfiguration = extendedS3Config - } else { - s3Config := createS3Config(d) - - if d.Get("destination").(string) == "s3" { - createInput.S3DestinationConfiguration = s3Config - } else if d.Get("destination").(string) == "elasticsearch" { - esConfig, err := createElasticsearchConfig(d, s3Config) - if err != nil { - return err - } - createInput.ElasticsearchDestinationConfiguration = esConfig - } else if d.Get("destination").(string) == "redshift" { - rc, err := createRedshiftConfig(d, s3Config) - if err != nil { - return err - } - createInput.RedshiftDestinationConfiguration = rc - } else if d.Get("destination").(string) == "splunk" { - rc, err := createSplunkConfig(d, s3Config) - if err != nil { - return err - } - createInput.SplunkDestinationConfiguration = rc - } - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.CreateDeliveryStream(createInput) - if err != nil { - log.Printf("[DEBUG] Error creating Firehose Delivery Stream: %s", err) - - // Retry for IAM eventual consistency - if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "is not authorized to") { - return resource.RetryableError(err) - } - // InvalidArgumentException: Verify that the IAM role has access to the ElasticSearch domain. - if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "Verify that the IAM role has access") { - return resource.RetryableError(err) - } - // IAM roles can take ~10 seconds to propagate in AWS: - // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console - if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "Firehose is unable to assume role") { - log.Printf("[DEBUG] Firehose could not assume role referenced, retrying...") - return resource.RetryableError(err) - } - // Not retryable - return resource.NonRetryableError(err) - } - - return nil - }) - if err != nil { - return fmt.Errorf("error creating Kinesis Firehose Delivery Stream: %s", err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"CREATING"}, - Target: []string{"ACTIVE"}, - Refresh: firehoseStreamStateRefreshFunc(conn, sn), - Timeout: 20 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - firehoseStream, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Kinesis Stream (%s) to become active: %s", - sn, err) - } - - s := firehoseStream.(*firehose.DeliveryStreamDescription) - d.SetId(*s.DeliveryStreamARN) - d.Set("arn", s.DeliveryStreamARN) - - if err := setTagsKinesisFirehose(conn, d, sn); err != nil { - return fmt.Errorf( - "Error setting for Kinesis Stream (%s) tags: %s", - sn, err) - } - - return resourceAwsKinesisFirehoseDeliveryStreamRead(d, meta) -} - -func validateAwsKinesisFirehoseSchema(d *schema.ResourceData) error { - - _, s3Exists := d.GetOk("s3_configuration") - _, extendedS3Exists := d.GetOk("extended_s3_configuration") - - if d.Get("destination").(string) == "extended_s3" { - if !extendedS3Exists { - return fmt.Errorf( - "When destination is 'extended_s3', extended_s3_configuration is required", - ) - } else if s3Exists { - return fmt.Errorf( - "When destination is 'extended_s3', s3_configuration must not be set", - ) - } - } else { - if !s3Exists { - return fmt.Errorf( - "When destination is %s, s3_configuration is required", - d.Get("destination").(string), - ) - } else if extendedS3Exists { - return fmt.Errorf( - "extended_s3_configuration can only be used when destination is 'extended_s3'", - ) - } - } - - return nil -} - -func resourceAwsKinesisFirehoseDeliveryStreamUpdate(d *schema.ResourceData, meta interface{}) error { - validateError := validateAwsKinesisFirehoseSchema(d) - - if validateError != nil { - return validateError - } - - conn := meta.(*AWSClient).firehoseconn - - sn := d.Get("name").(string) - updateInput := &firehose.UpdateDestinationInput{ - DeliveryStreamName: aws.String(sn), - CurrentDeliveryStreamVersionId: aws.String(d.Get("version_id").(string)), - DestinationId: aws.String(d.Get("destination_id").(string)), - } - - if d.Get("destination").(string) == "extended_s3" { - extendedS3Config := updateExtendedS3Config(d) - updateInput.ExtendedS3DestinationUpdate = extendedS3Config - } else { - s3Config := updateS3Config(d) - - if d.Get("destination").(string) == "s3" { - updateInput.S3DestinationUpdate = s3Config - } else if d.Get("destination").(string) == "elasticsearch" { - esUpdate, err := updateElasticsearchConfig(d, s3Config) - if err != nil { - return err - } - updateInput.ElasticsearchDestinationUpdate = esUpdate - } else if d.Get("destination").(string) == "redshift" { - rc, err := updateRedshiftConfig(d, s3Config) - if err != nil { - return err - } - updateInput.RedshiftDestinationUpdate = rc - } else if d.Get("destination").(string) == "splunk" { - rc, err := updateSplunkConfig(d, s3Config) - if err != nil { - return err - } - updateInput.SplunkDestinationUpdate = rc - } - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.UpdateDestination(updateInput) - if err != nil { - log.Printf("[DEBUG] Error creating Firehose Delivery Stream: %s", err) - - // Retry for IAM eventual consistency - if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "is not authorized to") { - return resource.RetryableError(err) - } - // InvalidArgumentException: Verify that the IAM role has access to the ElasticSearch domain. - if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "Verify that the IAM role has access") { - return resource.RetryableError(err) - } - // IAM roles can take ~10 seconds to propagate in AWS: - // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console - if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "Firehose is unable to assume role") { - log.Printf("[DEBUG] Firehose could not assume role referenced, retrying...") - return resource.RetryableError(err) - } - // Not retryable - return resource.NonRetryableError(err) - } - - return nil - }) - - if err != nil { - return fmt.Errorf( - "Error Updating Kinesis Firehose Delivery Stream: \"%s\"\n%s", - sn, err) - } - - if err := setTagsKinesisFirehose(conn, d, sn); err != nil { - return fmt.Errorf( - "Error Updating Kinesis Firehose Delivery Stream tags: \"%s\"\n%s", - sn, err) - } - - return resourceAwsKinesisFirehoseDeliveryStreamRead(d, meta) -} - -func resourceAwsKinesisFirehoseDeliveryStreamRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).firehoseconn - - sn := d.Get("name").(string) - resp, err := conn.DescribeDeliveryStream(&firehose.DescribeDeliveryStreamInput{ - DeliveryStreamName: aws.String(sn), - }) - - if err != nil { - if isAWSErr(err, firehose.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Kinesis Firehose Delivery Stream (%s) not found, removing from state", sn) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Kinesis Firehose Delivery Stream: %s", err) - } - - s := resp.DeliveryStreamDescription - err = flattenKinesisFirehoseDeliveryStream(d, s) - if err != nil { - return err - } - - if err := getTagsKinesisFirehose(conn, d, sn); err != nil { - return err - } - - return nil -} - -func resourceAwsKinesisFirehoseDeliveryStreamDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).firehoseconn - - sn := d.Get("name").(string) - _, err := conn.DeleteDeliveryStream(&firehose.DeleteDeliveryStreamInput{ - DeliveryStreamName: aws.String(sn), - }) - - if err != nil { - return fmt.Errorf("error deleting Kinesis Firehose Delivery Stream (%s): %s", sn, err) - } - - if err := waitForKinesisFirehoseDeliveryStreamDeletion(conn, sn); err != nil { - return fmt.Errorf( - "Error waiting for Delivery Stream (%s) to be destroyed: %s", - sn, err) - } - - return nil -} - -func firehoseStreamStateRefreshFunc(conn *firehose.Firehose, sn string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - describeOpts := &firehose.DescribeDeliveryStreamInput{ - DeliveryStreamName: aws.String(sn), - } - resp, err := conn.DescribeDeliveryStream(describeOpts) - if err != nil { - if isAWSErr(err, firehose.ErrCodeResourceNotFoundException, "") { - return 42, "DESTROYED", nil - } - return nil, "failed", err - } - - return resp.DeliveryStreamDescription, *resp.DeliveryStreamDescription.DeliveryStreamStatus, nil - } -} - -func waitForKinesisFirehoseDeliveryStreamDeletion(conn *firehose.Firehose, deliveryStreamName string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{"DELETING"}, - Target: []string{"DESTROYED"}, - Refresh: firehoseStreamStateRefreshFunc(conn, deliveryStreamName), - Timeout: 20 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err := stateConf.WaitForState() - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream_migrate.go deleted file mode 100644 index 7ed8bfa33..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream_migrate.go +++ /dev/null @@ -1,59 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsKinesisFirehoseMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS Kinesis Firehose Delivery Stream State v0; migrating to v1") - return migrateKinesisFirehoseV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateKinesisFirehoseV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() { - log.Println("[DEBUG] Empty Kinesis Firehose Delivery State; nothing to migrate.") - return is, nil - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - - // migrate flate S3 configuration to a s3_configuration block - // grab initial values - is.Attributes["s3_configuration.#"] = "1" - // Required parameters - is.Attributes["s3_configuration.0.role_arn"] = is.Attributes["role_arn"] - is.Attributes["s3_configuration.0.bucket_arn"] = is.Attributes["s3_bucket_arn"] - - // Optional parameters - if is.Attributes["s3_buffer_size"] != "" { - is.Attributes["s3_configuration.0.buffer_size"] = is.Attributes["s3_buffer_size"] - } - if is.Attributes["s3_data_compression"] != "" { - is.Attributes["s3_configuration.0.compression_format"] = is.Attributes["s3_data_compression"] - } - if is.Attributes["s3_buffer_interval"] != "" { - is.Attributes["s3_configuration.0.buffer_interval"] = is.Attributes["s3_buffer_interval"] - } - if is.Attributes["s3_prefix"] != "" { - is.Attributes["s3_configuration.0.prefix"] = is.Attributes["s3_prefix"] - } - - delete(is.Attributes, "role_arn") - delete(is.Attributes, "s3_bucket_arn") - delete(is.Attributes, "s3_buffer_size") - delete(is.Attributes, "s3_data_compression") - delete(is.Attributes, "s3_buffer_interval") - delete(is.Attributes, "s3_prefix") - - log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) - return is, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go deleted file mode 100644 index a0a2eb311..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go +++ /dev/null @@ -1,530 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/kinesis" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsKinesisStream() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsKinesisStreamCreate, - Read: resourceAwsKinesisStreamRead, - Update: resourceAwsKinesisStreamUpdate, - Delete: resourceAwsKinesisStreamDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsKinesisStreamImport, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(5 * time.Minute), - Update: schema.DefaultTimeout(120 * time.Minute), - Delete: schema.DefaultTimeout(120 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "shard_count": { - Type: schema.TypeInt, - Required: true, - }, - - "retention_period": { - Type: schema.TypeInt, - Optional: true, - Default: 24, - ValidateFunc: validation.IntBetween(24, 168), - }, - - "shard_level_metrics": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "encryption_type": { - Type: schema.TypeString, - Optional: true, - Default: "NONE", - ValidateFunc: validation.StringInSlice([]string{ - kinesis.EncryptionTypeNone, - kinesis.EncryptionTypeKms, - }, true), - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - return strings.EqualFold(old, new) - }, - }, - - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - }, - - "arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsKinesisStreamImport( - d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("name", d.Id()) - return []*schema.ResourceData{d}, nil -} - -func resourceAwsKinesisStreamCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kinesisconn - sn := d.Get("name").(string) - createOpts := &kinesis.CreateStreamInput{ - ShardCount: aws.Int64(int64(d.Get("shard_count").(int))), - StreamName: aws.String(sn), - } - - _, err := conn.CreateStream(createOpts) - if err != nil { - return fmt.Errorf("Unable to create stream: %s", err) - } - - // No error, wait for ACTIVE state - stateConf := &resource.StateChangeConf{ - Pending: []string{"CREATING"}, - Target: []string{"ACTIVE"}, - Refresh: streamStateRefreshFunc(conn, sn), - Timeout: d.Timeout(schema.TimeoutCreate), - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - streamRaw, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Kinesis Stream (%s) to become active: %s", - sn, err) - } - - s := streamRaw.(*kinesisStreamState) - d.SetId(s.arn) - d.Set("arn", s.arn) - d.Set("shard_count", len(s.openShards)) - - return resourceAwsKinesisStreamUpdate(d, meta) -} - -func resourceAwsKinesisStreamUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kinesisconn - - d.Partial(true) - if err := setTagsKinesis(conn, d); err != nil { - return err - } - - d.SetPartial("tags") - d.Partial(false) - - if err := updateKinesisShardCount(conn, d); err != nil { - return err - } - if err := setKinesisRetentionPeriod(conn, d); err != nil { - return err - } - if err := updateKinesisShardLevelMetrics(conn, d); err != nil { - return err - } - - if err := updateKinesisStreamEncryption(conn, d); err != nil { - return err - } - - return resourceAwsKinesisStreamRead(d, meta) -} - -func resourceAwsKinesisStreamRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kinesisconn - sn := d.Get("name").(string) - - state, err := readKinesisStreamState(conn, sn) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "ResourceNotFoundException" { - d.SetId("") - return nil - } - return fmt.Errorf("Error reading Kinesis Stream: \"%s\", code: \"%s\"", awsErr.Message(), awsErr.Code()) - } - return err - - } - d.SetId(state.arn) - d.Set("arn", state.arn) - d.Set("shard_count", len(state.openShards)) - d.Set("retention_period", state.retentionPeriod) - - d.Set("encryption_type", state.encryptionType) - d.Set("kms_key_id", state.keyId) - - if len(state.shardLevelMetrics) > 0 { - d.Set("shard_level_metrics", state.shardLevelMetrics) - } - - // set tags - describeTagsOpts := &kinesis.ListTagsForStreamInput{ - StreamName: aws.String(sn), - } - tagsResp, err := conn.ListTagsForStream(describeTagsOpts) - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for Stream: %s. %s", sn, err) - } else { - d.Set("tags", tagsToMapKinesis(tagsResp.Tags)) - } - - return nil -} - -func resourceAwsKinesisStreamDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kinesisconn - sn := d.Get("name").(string) - - _, err := conn.DeleteStream(&kinesis.DeleteStreamInput{ - StreamName: aws.String(sn), - }) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"DELETING"}, - Target: []string{"DESTROYED"}, - Refresh: streamStateRefreshFunc(conn, sn), - Timeout: d.Timeout(schema.TimeoutDelete), - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Stream (%s) to be destroyed: %s", - sn, err) - } - - return nil -} - -func setKinesisRetentionPeriod(conn *kinesis.Kinesis, d *schema.ResourceData) error { - sn := d.Get("name").(string) - - oraw, nraw := d.GetChange("retention_period") - o := oraw.(int) - n := nraw.(int) - - if n == 0 { - log.Printf("[DEBUG] Kinesis Stream (%q) Retention Period Not Changed", sn) - return nil - } - - if n > o { - log.Printf("[DEBUG] Increasing %s Stream Retention Period to %d", sn, n) - _, err := conn.IncreaseStreamRetentionPeriod(&kinesis.IncreaseStreamRetentionPeriodInput{ - StreamName: aws.String(sn), - RetentionPeriodHours: aws.Int64(int64(n)), - }) - if err != nil { - return err - } - - } else { - log.Printf("[DEBUG] Decreasing %s Stream Retention Period to %d", sn, n) - _, err := conn.DecreaseStreamRetentionPeriod(&kinesis.DecreaseStreamRetentionPeriodInput{ - StreamName: aws.String(sn), - RetentionPeriodHours: aws.Int64(int64(n)), - }) - if err != nil { - return err - } - } - - if err := waitForKinesisToBeActive(conn, d.Timeout(schema.TimeoutUpdate), sn); err != nil { - return err - } - - return nil -} - -func updateKinesisShardCount(conn *kinesis.Kinesis, d *schema.ResourceData) error { - sn := d.Get("name").(string) - - oraw, nraw := d.GetChange("shard_count") - o := oraw.(int) - n := nraw.(int) - - if n == o { - log.Printf("[DEBUG] Kinesis Stream (%q) Shard Count Not Changed", sn) - return nil - } - - log.Printf("[DEBUG] Change %s Stream ShardCount to %d", sn, n) - _, err := conn.UpdateShardCount(&kinesis.UpdateShardCountInput{ - StreamName: aws.String(sn), - TargetShardCount: aws.Int64(int64(n)), - ScalingType: aws.String("UNIFORM_SCALING"), - }) - if err != nil { - return err - } - - if err := waitForKinesisToBeActive(conn, d.Timeout(schema.TimeoutUpdate), sn); err != nil { - return err - } - - return nil -} - -func updateKinesisStreamEncryption(conn *kinesis.Kinesis, d *schema.ResourceData) error { - sn := d.Get("name").(string) - - // If this is not a new resource AND there is no change to encryption_type or kms_key_id - // return nil - if !d.IsNewResource() && (!d.HasChange("encryption_type") || !d.HasChange("kms_key_id")) { - return nil - } - - oldType, newType := d.GetChange("encryption_type") - if oldType.(string) != "" && oldType.(string) != "NONE" { - // This means that we have an old encryption type - i.e. Encryption is enabled and we want to change it - // The quirk about this API is that, when we are disabling the StreamEncryption - // We need to pass in that old KMS Key Id that was being used for Encryption and - // We also need to pass in the type of Encryption we were using - i.e. KMS as that - // Is the only supported Encryption method right now - // If we don't get this and pass in the actual EncryptionType we want to move to i.e. NONE - // We get the following error - // - // InvalidArgumentException: Encryption type cannot be NONE. - oldKey, _ := d.GetChange("kms_key_id") - oldType, _ := d.GetChange("encryption_type") - - log.Printf("[INFO] Stopping Stream Encryption for %s", sn) - params := &kinesis.StopStreamEncryptionInput{ - StreamName: aws.String(sn), - EncryptionType: aws.String(oldType.(string)), - KeyId: aws.String(oldKey.(string)), - } - - _, err := conn.StopStreamEncryption(params) - if err != nil { - return err - } - } - - if newType.(string) != "NONE" { - if _, ok := d.GetOk("kms_key_id"); !ok { - return fmt.Errorf("KMS Key Id required when setting encryption_type is not set as NONE") - } - - log.Printf("[INFO] Starting Stream Encryption for %s", sn) - params := &kinesis.StartStreamEncryptionInput{ - StreamName: aws.String(sn), - EncryptionType: aws.String(newType.(string)), - KeyId: aws.String(d.Get("kms_key_id").(string)), - } - - _, err := conn.StartStreamEncryption(params) - if err != nil { - return err - } - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"UPDATING"}, - Target: []string{"ACTIVE"}, - Refresh: streamStateRefreshFunc(conn, sn), - Timeout: 5 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Stream (%s) to be ACTIVE: %s", - sn, err) - } - - return nil -} - -func updateKinesisShardLevelMetrics(conn *kinesis.Kinesis, d *schema.ResourceData) error { - sn := d.Get("name").(string) - - o, n := d.GetChange("shard_level_metrics") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - disableMetrics := os.Difference(ns) - if disableMetrics.Len() != 0 { - metrics := disableMetrics.List() - log.Printf("[DEBUG] Disabling shard level metrics %v for stream %s", metrics, sn) - - props := &kinesis.DisableEnhancedMonitoringInput{ - StreamName: aws.String(sn), - ShardLevelMetrics: expandStringList(metrics), - } - - _, err := conn.DisableEnhancedMonitoring(props) - if err != nil { - return fmt.Errorf("Failure to disable shard level metrics for stream %s: %s", sn, err) - } - if err := waitForKinesisToBeActive(conn, d.Timeout(schema.TimeoutUpdate), sn); err != nil { - return err - } - } - - enabledMetrics := ns.Difference(os) - if enabledMetrics.Len() != 0 { - metrics := enabledMetrics.List() - log.Printf("[DEBUG] Enabling shard level metrics %v for stream %s", metrics, sn) - - props := &kinesis.EnableEnhancedMonitoringInput{ - StreamName: aws.String(sn), - ShardLevelMetrics: expandStringList(metrics), - } - - _, err := conn.EnableEnhancedMonitoring(props) - if err != nil { - return fmt.Errorf("Failure to enable shard level metrics for stream %s: %s", sn, err) - } - if err := waitForKinesisToBeActive(conn, d.Timeout(schema.TimeoutUpdate), sn); err != nil { - return err - } - } - - return nil -} - -type kinesisStreamState struct { - arn string - creationTimestamp int64 - status string - retentionPeriod int64 - openShards []string - closedShards []string - shardLevelMetrics []string - encryptionType string - keyId string -} - -func readKinesisStreamState(conn *kinesis.Kinesis, sn string) (*kinesisStreamState, error) { - describeOpts := &kinesis.DescribeStreamInput{ - StreamName: aws.String(sn), - } - - state := &kinesisStreamState{} - err := conn.DescribeStreamPages(describeOpts, func(page *kinesis.DescribeStreamOutput, last bool) (shouldContinue bool) { - state.arn = aws.StringValue(page.StreamDescription.StreamARN) - state.creationTimestamp = aws.TimeValue(page.StreamDescription.StreamCreationTimestamp).Unix() - state.status = aws.StringValue(page.StreamDescription.StreamStatus) - state.retentionPeriod = aws.Int64Value(page.StreamDescription.RetentionPeriodHours) - state.openShards = append(state.openShards, flattenShards(openShards(page.StreamDescription.Shards))...) - state.closedShards = append(state.closedShards, flattenShards(closedShards(page.StreamDescription.Shards))...) - state.shardLevelMetrics = flattenKinesisShardLevelMetrics(page.StreamDescription.EnhancedMonitoring) - // EncryptionType can be nil in certain APIs, e.g. AWS China - if page.StreamDescription.EncryptionType != nil { - state.encryptionType = aws.StringValue(page.StreamDescription.EncryptionType) - } else { - state.encryptionType = kinesis.EncryptionTypeNone - } - state.keyId = aws.StringValue(page.StreamDescription.KeyId) - return !last - }) - return state, err -} - -func streamStateRefreshFunc(conn *kinesis.Kinesis, sn string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - state, err := readKinesisStreamState(conn, sn) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "ResourceNotFoundException" { - return 42, "DESTROYED", nil - } - return nil, awsErr.Code(), err - } - return nil, "failed", err - } - - return state, state.status, nil - } -} - -func waitForKinesisToBeActive(conn *kinesis.Kinesis, timeout time.Duration, sn string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{"UPDATING"}, - Target: []string{"ACTIVE"}, - Refresh: streamStateRefreshFunc(conn, sn), - Timeout: timeout, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Kinesis Stream (%s) to become active: %s", - sn, err) - } - return nil -} - -func openShards(shards []*kinesis.Shard) []*kinesis.Shard { - return filterShards(shards, true) -} - -func closedShards(shards []*kinesis.Shard) []*kinesis.Shard { - return filterShards(shards, false) -} - -// See http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-merge.html -func filterShards(shards []*kinesis.Shard, open bool) []*kinesis.Shard { - res := make([]*kinesis.Shard, 0, len(shards)) - for _, s := range shards { - if open && s.SequenceNumberRange.EndingSequenceNumber == nil { - res = append(res, s) - } else if !open && s.SequenceNumberRange.EndingSequenceNumber != nil { - res = append(res, s) - } - } - return res -} - -func flattenShards(shards []*kinesis.Shard) []string { - res := make([]string, len(shards)) - for i, s := range shards { - res[i] = aws.StringValue(s.ShardId) - } - return res -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_alias.go deleted file mode 100644 index 68ee76f17..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_alias.go +++ /dev/null @@ -1,236 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/kms" -) - -func resourceAwsKmsAlias() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsKmsAliasCreate, - Read: resourceAwsKmsAliasRead, - Update: resourceAwsKmsAliasUpdate, - Delete: resourceAwsKmsAliasDelete, - - Importer: &schema.ResourceImporter{ - State: resourceAwsKmsAliasImport, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateAwsKmsName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateAwsKmsName, - }, - "target_key_id": { - Type: schema.TypeString, - Required: true, - DiffSuppressFunc: suppressEquivalentTargetKeyIdAndARN, - }, - "target_key_arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsKmsAliasCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - - var name string - if v, ok := d.GetOk("name"); ok { - name = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - name = resource.PrefixedUniqueId(v.(string)) - } else { - name = resource.PrefixedUniqueId("alias/") - } - - targetKeyId := d.Get("target_key_id").(string) - - log.Printf("[DEBUG] KMS alias create name: %s, target_key: %s", name, targetKeyId) - - req := &kms.CreateAliasInput{ - AliasName: aws.String(name), - TargetKeyId: aws.String(targetKeyId), - } - - // KMS is eventually consistent - _, err := retryOnAwsCode("NotFoundException", func() (interface{}, error) { - return conn.CreateAlias(req) - }) - if err != nil { - return err - } - d.SetId(name) - return resourceAwsKmsAliasRead(d, meta) -} - -func resourceAwsKmsAliasRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - - var alias *kms.AliasListEntry - var err error - if d.IsNewResource() { - alias, err = retryFindKmsAliasByName(conn, d.Id()) - } else { - alias, err = findKmsAliasByName(conn, d.Id(), nil) - } - if err != nil { - return err - } - if alias == nil { - log.Printf("[DEBUG] Removing KMS Alias (%s) as it's already gone", d.Id()) - d.SetId("") - return nil - } - - log.Printf("[DEBUG] Found KMS Alias: %s", alias) - - d.Set("arn", alias.AliasArn) - d.Set("target_key_id", alias.TargetKeyId) - - aliasARN, err := arn.Parse(*alias.AliasArn) - if err != nil { - return err - } - targetKeyARN := arn.ARN{ - Partition: aliasARN.Partition, - Service: aliasARN.Service, - Region: aliasARN.Region, - AccountID: aliasARN.AccountID, - Resource: fmt.Sprintf("key/%s", *alias.TargetKeyId), - } - d.Set("target_key_arn", targetKeyARN.String()) - - return nil -} - -func resourceAwsKmsAliasUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - - if d.HasChange("target_key_id") { - err := resourceAwsKmsAliasTargetUpdate(conn, d) - if err != nil { - return err - } - return resourceAwsKmsAliasRead(d, meta) - } - return nil -} - -func resourceAwsKmsAliasTargetUpdate(conn *kms.KMS, d *schema.ResourceData) error { - name := d.Get("name").(string) - targetKeyId := d.Get("target_key_id").(string) - - log.Printf("[DEBUG] KMS alias: %s, update target: %s", name, targetKeyId) - - req := &kms.UpdateAliasInput{ - AliasName: aws.String(name), - TargetKeyId: aws.String(targetKeyId), - } - _, err := conn.UpdateAlias(req) - - return err -} - -func resourceAwsKmsAliasDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - - req := &kms.DeleteAliasInput{ - AliasName: aws.String(d.Id()), - } - _, err := conn.DeleteAlias(req) - if err != nil { - return err - } - - log.Printf("[DEBUG] KMS Alias: (%s) deleted.", d.Id()) - - return nil -} - -func retryFindKmsAliasByName(conn *kms.KMS, name string) (*kms.AliasListEntry, error) { - var resp *kms.AliasListEntry - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - resp, err = findKmsAliasByName(conn, name, nil) - if err != nil { - return resource.NonRetryableError(err) - } - if resp == nil { - return resource.RetryableError(err) - } - return nil - }) - return resp, err -} - -// API by default limits results to 50 aliases -// This is how we make sure we won't miss any alias -// See http://docs.aws.amazon.com/kms/latest/APIReference/API_ListAliases.html -func findKmsAliasByName(conn *kms.KMS, name string, marker *string) (*kms.AliasListEntry, error) { - req := kms.ListAliasesInput{ - Limit: aws.Int64(int64(100)), - } - if marker != nil { - req.Marker = marker - } - - log.Printf("[DEBUG] Listing KMS aliases: %s", req) - resp, err := conn.ListAliases(&req) - if err != nil { - return nil, err - } - - for _, entry := range resp.Aliases { - if *entry.AliasName == name { - return entry, nil - } - } - if *resp.Truncated { - log.Printf("[DEBUG] KMS alias list is truncated, listing more via %s", *resp.NextMarker) - return findKmsAliasByName(conn, name, resp.NextMarker) - } - - return nil, nil -} - -func resourceAwsKmsAliasImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("name", d.Id()) - return []*schema.ResourceData{d}, nil -} - -func suppressEquivalentTargetKeyIdAndARN(k, old, new string, d *schema.ResourceData) bool { - newARN, err := arn.Parse(new) - if err != nil { - log.Printf("[DEBUG] %q can not be parsed as an ARN: %q", new, err) - return false - } - - resource := strings.TrimPrefix(newARN.Resource, "key/") - return old == resource -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go deleted file mode 100644 index a6362f0cd..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go +++ /dev/null @@ -1,550 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "sort" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/kms" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsKmsGrant() *schema.Resource { - return &schema.Resource{ - // There is no API for updating/modifying grants, hence no Update - // Instead changes to most fields will force a new resource - Create: resourceAwsKmsGrantCreate, - Read: resourceAwsKmsGrantRead, - Delete: resourceAwsKmsGrantDelete, - Exists: resourceAwsKmsGrantExists, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateAwsKmsGrantName, - }, - "key_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "grantee_principal": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "operations": { - Type: schema.TypeSet, - Set: schema.HashString, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - kms.GrantOperationCreateGrant, - kms.GrantOperationDecrypt, - kms.GrantOperationDescribeKey, - kms.GrantOperationEncrypt, - kms.GrantOperationGenerateDataKey, - kms.GrantOperationGenerateDataKeyWithoutPlaintext, - kms.GrantOperationReEncryptFrom, - kms.GrantOperationReEncryptTo, - kms.GrantOperationRetireGrant, - }, false), - }, - Required: true, - ForceNew: true, - }, - "constraints": { - Type: schema.TypeSet, - Set: resourceKmsGrantConstraintsHash, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "encryption_context_equals": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - // ConflictsWith encryption_context_subset handled in Create, see kmsGrantConstraintsIsValid - }, - "encryption_context_subset": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - // ConflictsWith encryption_context_equals handled in Create, see kmsGrantConstraintsIsValid - }, - }, - }, - }, - "retiring_principal": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "grant_creation_tokens": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - ForceNew: true, - }, - "retire_on_delete": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - "grant_id": { - Type: schema.TypeString, - Computed: true, - }, - "grant_token": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsKmsGrantCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - keyId := d.Get("key_id").(string) - - input := kms.CreateGrantInput{ - GranteePrincipal: aws.String(d.Get("grantee_principal").(string)), - KeyId: aws.String(keyId), - Operations: expandStringSet(d.Get("operations").(*schema.Set)), - } - - if v, ok := d.GetOk("name"); ok { - input.Name = aws.String(v.(string)) - } - if v, ok := d.GetOk("constraints"); ok { - if !kmsGrantConstraintsIsValid(v.(*schema.Set)) { - return fmt.Errorf("A grant constraint can't have both encryption_context_equals and encryption_context_subset set") - } - input.Constraints = expandKmsGrantConstraints(v.(*schema.Set)) - } - if v, ok := d.GetOk("retiring_principal"); ok { - input.RetiringPrincipal = aws.String(v.(string)) - } - if v, ok := d.GetOk("grant_creation_tokens"); ok { - input.GrantTokens = expandStringSet(v.(*schema.Set)) - } - - log.Printf("[DEBUG]: Adding new KMS Grant: %s", input) - - var out *kms.CreateGrantOutput - - err := resource.Retry(3*time.Minute, func() *resource.RetryError { - var err error - - out, err = conn.CreateGrant(&input) - - if err != nil { - // Error Codes: https://docs.aws.amazon.com/sdk-for-go/api/service/kms/#KMS.CreateGrant - // Under some circumstances a newly created IAM Role doesn't show up and causes - // an InvalidArnException to be thrown. - if isAWSErr(err, kms.ErrCodeDependencyTimeoutException, "") || - isAWSErr(err, kms.ErrCodeInternalException, "") || - isAWSErr(err, kms.ErrCodeInvalidArnException, "") { - return resource.RetryableError( - fmt.Errorf("Error adding new KMS Grant for key: %s, retrying %s", - *input.KeyId, err)) - } - log.Printf("[ERROR] An error occurred creating new AWS KMS Grant: %s", err) - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return err - } - - log.Printf("[DEBUG] Created new KMS Grant: %s", *out.GrantId) - d.SetId(fmt.Sprintf("%s:%s", keyId, *out.GrantId)) - d.Set("grant_id", out.GrantId) - d.Set("grant_token", out.GrantToken) - - return resourceAwsKmsGrantRead(d, meta) -} - -func resourceAwsKmsGrantRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - - keyId, grantId, err := decodeKmsGrantId(d.Id()) - if err != nil { - return err - } - - log.Printf("[DEBUG] Looking for grant id: %s", grantId) - grant, err := findKmsGrantByIdWithRetry(conn, keyId, grantId) - - if err != nil { - return err - } - - if grant == nil { - log.Printf("[WARN] %s KMS grant id not found for key id %s, removing from state file", grantId, keyId) - d.SetId("") - return nil - } - - // The grant sometimes contains principals that identified by their unique id: "AROAJYCVIVUZIMTXXXXX" - // instead of "arn:aws:...", in this case don't update the state file - if strings.HasPrefix(*grant.GranteePrincipal, "arn:aws") { - d.Set("grantee_principal", grant.GranteePrincipal) - } else { - log.Printf( - "[WARN] Unable to update grantee principal state %s for grant id %s for key id %s.", - *grant.GranteePrincipal, grantId, keyId) - } - - if grant.RetiringPrincipal != nil { - if strings.HasPrefix(*grant.RetiringPrincipal, "arn:aws") { - d.Set("retiring_principal", grant.RetiringPrincipal) - } else { - log.Printf( - "[WARN] Unable to update retiring principal state %s for grant id %s for key id %s", - *grant.RetiringPrincipal, grantId, keyId) - } - } - - if err := d.Set("operations", aws.StringValueSlice(grant.Operations)); err != nil { - log.Printf("[DEBUG] Error setting operations for grant %s with error %s", grantId, err) - } - if *grant.Name != "" { - d.Set("name", grant.Name) - } - if grant.Constraints != nil { - if err := d.Set("constraints", flattenKmsGrantConstraints(grant.Constraints)); err != nil { - log.Printf("[DEBUG] Error setting constraints for grant %s with error %s", grantId, err) - } - } - - return nil -} - -func resourceAwsKmsGrantDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - - keyId, grantId, decodeErr := decodeKmsGrantId(d.Id()) - if decodeErr != nil { - return decodeErr - } - doRetire := d.Get("retire_on_delete").(bool) - - var err error - if doRetire { - retireInput := kms.RetireGrantInput{ - GrantId: aws.String(grantId), - KeyId: aws.String(keyId), - } - - log.Printf("[DEBUG] Retiring KMS grant: %s", grantId) - _, err = conn.RetireGrant(&retireInput) - } else { - revokeInput := kms.RevokeGrantInput{ - GrantId: aws.String(grantId), - KeyId: aws.String(keyId), - } - - log.Printf("[DEBUG] Revoking KMS grant: %s", grantId) - _, err = conn.RevokeGrant(&revokeInput) - } - - if err != nil { - if isAWSErr(err, kms.ErrCodeNotFoundException, "") { - return nil - } - return err - } - - log.Printf("[DEBUG] Checking if grant is revoked: %s", grantId) - err = waitForKmsGrantToBeRevoked(conn, keyId, grantId) - - return err -} - -func resourceAwsKmsGrantExists(d *schema.ResourceData, meta interface{}) (bool, error) { - conn := meta.(*AWSClient).kmsconn - - keyId, grantId, err := decodeKmsGrantId(d.Id()) - if err != nil { - return false, err - } - - log.Printf("[DEBUG] Looking for Grant: %s", grantId) - grant, err := findKmsGrantByIdWithRetry(conn, keyId, grantId) - - if err != nil { - return true, err - } - if grant != nil { - return true, err - } - - return false, nil -} - -func getKmsGrantById(grants []*kms.GrantListEntry, grantIdentifier string) *kms.GrantListEntry { - for _, grant := range grants { - if *grant.GrantId == grantIdentifier { - return grant - } - } - - return nil -} - -/* -In the functions below it is not possible to use retryOnAwsCodes function, as there -is no describe grants call, so an error has to be created if the grant is or isn't returned -by the list grants call when expected. -*/ - -// NB: This function only retries the grant not being returned and some edge cases, while AWS Errors -// are handled by the findKmsGrantById function -func findKmsGrantByIdWithRetry(conn *kms.KMS, keyId string, grantId string) (*kms.GrantListEntry, error) { - var grant *kms.GrantListEntry - err := resource.Retry(3*time.Minute, func() *resource.RetryError { - var err error - grant, err = findKmsGrantById(conn, keyId, grantId, nil) - - if err != nil { - if serr, ok := err.(KmsGrantMissingError); ok { - // Force a retry if the grant should exist - return resource.RetryableError(serr) - } - - return resource.NonRetryableError(err) - } - - return nil - }) - - return grant, err -} - -// Used by the tests as well -func waitForKmsGrantToBeRevoked(conn *kms.KMS, keyId string, grantId string) error { - err := resource.Retry(3*time.Minute, func() *resource.RetryError { - grant, err := findKmsGrantById(conn, keyId, grantId, nil) - if err != nil { - if _, ok := err.(KmsGrantMissingError); ok { - return nil - } - } - - if grant != nil { - // Force a retry if the grant still exists - return resource.RetryableError( - fmt.Errorf("Grant still exists while expected to be revoked, retyring revocation check: %s", *grant.GrantId)) - } - - return resource.NonRetryableError(err) - }) - - return err -} - -// The ListGrants API defaults to listing only 50 grants -// Use a marker to iterate over all grants in "pages" -// NB: This function only retries on AWS Errors -func findKmsGrantById(conn *kms.KMS, keyId string, grantId string, marker *string) (*kms.GrantListEntry, error) { - - input := kms.ListGrantsInput{ - KeyId: aws.String(keyId), - Limit: aws.Int64(int64(100)), - Marker: marker, - } - - var out *kms.ListGrantsResponse - var err error - var grant *kms.GrantListEntry - - err = resource.Retry(3*time.Minute, func() *resource.RetryError { - out, err = conn.ListGrants(&input) - - if err != nil { - if isAWSErr(err, kms.ErrCodeDependencyTimeoutException, "") || - isAWSErr(err, kms.ErrCodeInternalException, "") || - isAWSErr(err, kms.ErrCodeInvalidArnException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - - return nil - }) - if err != nil { - return nil, fmt.Errorf("error listing KMS Grants: %s", err) - } - - grant = getKmsGrantById(out.Grants, grantId) - if grant != nil { - return grant, nil - } - if aws.BoolValue(out.Truncated) { - log.Printf("[DEBUG] KMS Grant list truncated, getting next page via marker: %s", aws.StringValue(out.NextMarker)) - return findKmsGrantById(conn, keyId, grantId, out.NextMarker) - } - - return nil, NewKmsGrantMissingError(fmt.Sprintf("[DEBUG] Grant %s not found for key id: %s", grantId, keyId)) -} - -// Can't have both constraint options set: -// ValidationException: More than one constraint supplied -// NB: set.List() returns an empty map if the constraint is not set, filter those out -// using len(v) > 0 -func kmsGrantConstraintsIsValid(constraints *schema.Set) bool { - constraintCount := 0 - for _, raw := range constraints.List() { - data := raw.(map[string]interface{}) - if v, ok := data["encryption_context_equals"].(map[string]interface{}); ok { - if len(v) > 0 { - constraintCount += 1 - } - } - if v, ok := data["encryption_context_subset"].(map[string]interface{}); ok { - if len(v) > 0 { - constraintCount += 1 - } - } - } - - return constraintCount <= 1 - -} - -func expandKmsGrantConstraints(configured *schema.Set) *kms.GrantConstraints { - if len(configured.List()) < 1 { - return nil - } - - var constraint kms.GrantConstraints - - for _, raw := range configured.List() { - data := raw.(map[string]interface{}) - if contextEq, ok := data["encryption_context_equals"]; ok { - constraint.SetEncryptionContextEquals(stringMapToPointers(contextEq.(map[string]interface{}))) - } - if contextSub, ok := data["encryption_context_subset"]; ok { - constraint.SetEncryptionContextSubset(stringMapToPointers(contextSub.(map[string]interface{}))) - } - } - - return &constraint -} - -func sortStringMapKeys(m map[string]*string) []string { - keys := make([]string, 0) - for k := range m { - keys = append(keys, k) - } - sort.Strings(keys) - - return keys -} - -// NB: For the constraint hash to be deterministic the order in which -// print the keys and values of the encryption context maps needs to be -// determistic, so sort them. -func sortedConcatStringMap(m map[string]*string) string { - var strList []string - mapKeys := sortStringMapKeys(m) - for _, key := range mapKeys { - strList = append(strList, key, *m[key]) - } - return strings.Join(strList, "-") -} - -// The hash needs to encapsulate what type of constraint it is -// as well as the keys and values of the constraint. -func resourceKmsGrantConstraintsHash(v interface{}) int { - var buf bytes.Buffer - m, castOk := v.(map[string]interface{}) - if !castOk { - return 0 - } - - if v, ok := m["encryption_context_equals"]; ok { - if len(v.(map[string]interface{})) > 0 { - buf.WriteString(fmt.Sprintf("encryption_context_equals-%s-", sortedConcatStringMap(stringMapToPointers(v.(map[string]interface{}))))) - } - } - if v, ok := m["encryption_context_subset"]; ok { - if len(v.(map[string]interface{})) > 0 { - buf.WriteString(fmt.Sprintf("encryption_context_subset-%s-", sortedConcatStringMap(stringMapToPointers(v.(map[string]interface{}))))) - } - } - - return hashcode.String(buf.String()) -} - -func flattenKmsGrantConstraints(constraint *kms.GrantConstraints) *schema.Set { - constraints := schema.NewSet(resourceKmsGrantConstraintsHash, []interface{}{}) - if constraint == nil { - return constraints - } - - m := make(map[string]interface{}) - if constraint.EncryptionContextEquals != nil { - if len(constraint.EncryptionContextEquals) > 0 { - m["encryption_context_equals"] = pointersMapToStringList(constraint.EncryptionContextEquals) - } - } - if constraint.EncryptionContextSubset != nil { - if len(constraint.EncryptionContextSubset) > 0 { - m["encryption_context_subset"] = pointersMapToStringList(constraint.EncryptionContextSubset) - } - } - constraints.Add(m) - - return constraints -} - -func decodeKmsGrantId(id string) (string, string, error) { - if strings.HasPrefix(id, "arn:aws") { - arn_parts := strings.Split(id, "/") - if len(arn_parts) != 2 { - return "", "", fmt.Errorf("unexpected format of ARN (%q), expected KeyID:GrantID", id) - } - arn_prefix := arn_parts[0] - parts := strings.Split(arn_parts[1], ":") - if len(parts) != 2 { - return "", "", fmt.Errorf("unexpected format of ID (%q), expected KeyID:GrantID", id) - } - return fmt.Sprintf("%s/%s", arn_prefix, parts[0]), parts[1], nil - } else { - parts := strings.Split(id, ":") - if len(parts) != 2 { - return "", "", fmt.Errorf("unexpected format of ID (%q), expected KeyID:GrantID", id) - } - return parts[0], parts[1], nil - } -} - -// Custom error, so we don't have to rely on -// the content of an error message -type KmsGrantMissingError string - -func (e KmsGrantMissingError) Error() string { - return e.Error() -} - -func NewKmsGrantMissingError(msg string) KmsGrantMissingError { - return KmsGrantMissingError(msg) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go deleted file mode 100644 index 477ac628c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go +++ /dev/null @@ -1,477 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/kms" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsKmsKey() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsKmsKeyCreate, - Read: resourceAwsKmsKeyRead, - Update: resourceAwsKmsKeyUpdate, - Delete: resourceAwsKmsKeyDelete, - Exists: resourceAwsKmsKeyExists, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "key_id": { - Type: schema.TypeString, - Computed: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "key_usage": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - "", - kms.KeyUsageTypeEncryptDecrypt, - }, false), - }, - "policy": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - "is_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "enable_key_rotation": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "deletion_window_in_days": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(7, 30), - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsKmsKeyCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - - // Allow aws to chose default values if we don't pass them - var req kms.CreateKeyInput - if v, exists := d.GetOk("description"); exists { - req.Description = aws.String(v.(string)) - } - if v, exists := d.GetOk("key_usage"); exists { - req.KeyUsage = aws.String(v.(string)) - } - if v, exists := d.GetOk("policy"); exists { - req.Policy = aws.String(v.(string)) - } - if v, exists := d.GetOk("tags"); exists { - req.Tags = tagsFromMapKMS(v.(map[string]interface{})) - } - - var resp *kms.CreateKeyOutput - // AWS requires any principal in the policy to exist before the key is created. - // The KMS service's awareness of principals is limited by "eventual consistency". - // They acknowledge this here: - // http://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html - err := resource.Retry(30*time.Second, func() *resource.RetryError { - var err error - resp, err = conn.CreateKey(&req) - if isAWSErr(err, "MalformedPolicyDocumentException", "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - }) - if err != nil { - return err - } - - d.SetId(*resp.KeyMetadata.KeyId) - d.Set("key_id", resp.KeyMetadata.KeyId) - - return resourceAwsKmsKeyUpdate(d, meta) -} - -func resourceAwsKmsKeyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - - req := &kms.DescribeKeyInput{ - KeyId: aws.String(d.Id()), - } - - var resp *kms.DescribeKeyOutput - var err error - if d.IsNewResource() { - var out interface{} - out, err = retryOnAwsCode("NotFoundException", func() (interface{}, error) { - return conn.DescribeKey(req) - }) - resp, _ = out.(*kms.DescribeKeyOutput) - } else { - resp, err = conn.DescribeKey(req) - } - if err != nil { - return err - } - metadata := resp.KeyMetadata - - if *metadata.KeyState == "PendingDeletion" { - log.Printf("[WARN] Removing KMS key %s because it's already gone", d.Id()) - d.SetId("") - return nil - } - - d.SetId(*metadata.KeyId) - - d.Set("arn", metadata.Arn) - d.Set("key_id", metadata.KeyId) - d.Set("description", metadata.Description) - d.Set("key_usage", metadata.KeyUsage) - d.Set("is_enabled", metadata.Enabled) - - pOut, err := retryOnAwsCode("NotFoundException", func() (interface{}, error) { - return conn.GetKeyPolicy(&kms.GetKeyPolicyInput{ - KeyId: metadata.KeyId, - PolicyName: aws.String("default"), - }) - }) - if err != nil { - return err - } - - p := pOut.(*kms.GetKeyPolicyOutput) - policy, err := structure.NormalizeJsonString(*p.Policy) - if err != nil { - return fmt.Errorf("policy contains an invalid JSON: %s", err) - } - d.Set("policy", policy) - - out, err := retryOnAwsCode("NotFoundException", func() (interface{}, error) { - return conn.GetKeyRotationStatus(&kms.GetKeyRotationStatusInput{ - KeyId: metadata.KeyId, - }) - }) - if err != nil { - return err - } - krs, _ := out.(*kms.GetKeyRotationStatusOutput) - d.Set("enable_key_rotation", krs.KeyRotationEnabled) - - tOut, err := retryOnAwsCode("NotFoundException", func() (interface{}, error) { - return conn.ListResourceTags(&kms.ListResourceTagsInput{ - KeyId: metadata.KeyId, - }) - }) - if err != nil { - return fmt.Errorf("Failed to get KMS key tags (key: %s): %s", d.Get("key_id").(string), err) - } - tagList := tOut.(*kms.ListResourceTagsOutput) - d.Set("tags", tagsToMapKMS(tagList.Tags)) - - return nil -} - -func resourceAwsKmsKeyUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - - // We expect new keys to be enabled already - if d.HasChange("is_enabled") && d.Get("is_enabled").(bool) && !d.IsNewResource() { - // Enable before any attributes will be modified - if err := updateKmsKeyStatus(conn, d.Id(), d.Get("is_enabled").(bool)); err != nil { - return err - } - } - - if d.HasChange("enable_key_rotation") { - if err := updateKmsKeyRotationStatus(conn, d); err != nil { - return err - } - } - - if d.HasChange("description") { - if err := resourceAwsKmsKeyDescriptionUpdate(conn, d); err != nil { - return err - } - } - if d.HasChange("policy") { - if err := resourceAwsKmsKeyPolicyUpdate(conn, d); err != nil { - return err - } - } - - if d.HasChange("is_enabled") && !d.Get("is_enabled").(bool) { - // Only disable when all attributes are modified - // because we cannot modify disabled keys - if err := updateKmsKeyStatus(conn, d.Id(), d.Get("is_enabled").(bool)); err != nil { - return err - } - } - - if err := setTagsKMS(conn, d, d.Id()); err != nil { - return err - } - - return resourceAwsKmsKeyRead(d, meta) -} - -func resourceAwsKmsKeyDescriptionUpdate(conn *kms.KMS, d *schema.ResourceData) error { - description := d.Get("description").(string) - keyId := d.Get("key_id").(string) - - log.Printf("[DEBUG] KMS key: %s, update description: %s", keyId, description) - - req := &kms.UpdateKeyDescriptionInput{ - Description: aws.String(description), - KeyId: aws.String(keyId), - } - _, err := retryOnAwsCode("NotFoundException", func() (interface{}, error) { - return conn.UpdateKeyDescription(req) - }) - return err -} - -func resourceAwsKmsKeyPolicyUpdate(conn *kms.KMS, d *schema.ResourceData) error { - policy, err := structure.NormalizeJsonString(d.Get("policy").(string)) - if err != nil { - return fmt.Errorf("policy contains an invalid JSON: %s", err) - } - keyId := d.Get("key_id").(string) - - log.Printf("[DEBUG] KMS key: %s, update policy: %s", keyId, policy) - - req := &kms.PutKeyPolicyInput{ - KeyId: aws.String(keyId), - Policy: aws.String(policy), - PolicyName: aws.String("default"), - } - _, err = retryOnAwsCode("NotFoundException", func() (interface{}, error) { - return conn.PutKeyPolicy(req) - }) - return err -} - -func updateKmsKeyStatus(conn *kms.KMS, id string, shouldBeEnabled bool) error { - var err error - - if shouldBeEnabled { - log.Printf("[DEBUG] Enabling KMS key %q", id) - _, err = conn.EnableKey(&kms.EnableKeyInput{ - KeyId: aws.String(id), - }) - } else { - log.Printf("[DEBUG] Disabling KMS key %q", id) - _, err = conn.DisableKey(&kms.DisableKeyInput{ - KeyId: aws.String(id), - }) - } - - if err != nil { - return fmt.Errorf("Failed to set KMS key %q status to %t: %q", - id, shouldBeEnabled, err.Error()) - } - - // Wait for propagation since KMS is eventually consistent - wait := resource.StateChangeConf{ - Pending: []string{fmt.Sprintf("%t", !shouldBeEnabled)}, - Target: []string{fmt.Sprintf("%t", shouldBeEnabled)}, - Timeout: 20 * time.Minute, - MinTimeout: 2 * time.Second, - ContinuousTargetOccurence: 15, - Refresh: func() (interface{}, string, error) { - log.Printf("[DEBUG] Checking if KMS key %s enabled status is %t", - id, shouldBeEnabled) - resp, err := conn.DescribeKey(&kms.DescribeKeyInput{ - KeyId: aws.String(id), - }) - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "NotFoundException" { - return nil, fmt.Sprintf("%t", !shouldBeEnabled), nil - } - return resp, "FAILED", err - } - status := fmt.Sprintf("%t", *resp.KeyMetadata.Enabled) - log.Printf("[DEBUG] KMS key %s status received: %s, retrying", id, status) - - return resp, status, nil - }, - } - - _, err = wait.WaitForState() - if err != nil { - return fmt.Errorf("Failed setting KMS key status to %t: %s", shouldBeEnabled, err) - } - - return nil -} - -func updateKmsKeyRotationStatus(conn *kms.KMS, d *schema.ResourceData) error { - shouldEnableRotation := d.Get("enable_key_rotation").(bool) - - err := resource.Retry(10*time.Minute, func() *resource.RetryError { - var err error - if shouldEnableRotation { - log.Printf("[DEBUG] Enabling key rotation for KMS key %q", d.Id()) - _, err = conn.EnableKeyRotation(&kms.EnableKeyRotationInput{ - KeyId: aws.String(d.Id()), - }) - } else { - log.Printf("[DEBUG] Disabling key rotation for KMS key %q", d.Id()) - _, err = conn.DisableKeyRotation(&kms.DisableKeyRotationInput{ - KeyId: aws.String(d.Id()), - }) - } - - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "DisabledException" { - return resource.RetryableError(err) - } - if ok && awsErr.Code() == "NotFoundException" { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - - return nil - }) - - if err != nil { - return fmt.Errorf("Failed to set key rotation for %q to %t: %q", - d.Id(), shouldEnableRotation, err.Error()) - } - - // Wait for propagation since KMS is eventually consistent - wait := resource.StateChangeConf{ - Pending: []string{fmt.Sprintf("%t", !shouldEnableRotation)}, - Target: []string{fmt.Sprintf("%t", shouldEnableRotation)}, - Timeout: 5 * time.Minute, - MinTimeout: 1 * time.Second, - ContinuousTargetOccurence: 5, - Refresh: func() (interface{}, string, error) { - log.Printf("[DEBUG] Checking if KMS key %s rotation status is %t", - d.Id(), shouldEnableRotation) - - out, err := retryOnAwsCode("NotFoundException", func() (interface{}, error) { - return conn.GetKeyRotationStatus(&kms.GetKeyRotationStatusInput{ - KeyId: aws.String(d.Id()), - }) - }) - if err != nil { - return 42, "", err - } - resp, _ := out.(*kms.GetKeyRotationStatusOutput) - - status := fmt.Sprintf("%t", *resp.KeyRotationEnabled) - log.Printf("[DEBUG] KMS key %s rotation status received: %s, retrying", d.Id(), status) - - return resp, status, nil - }, - } - - _, err = wait.WaitForState() - if err != nil { - return fmt.Errorf("Failed setting KMS key rotation status to %t: %s", shouldEnableRotation, err) - } - - return nil -} - -func resourceAwsKmsKeyExists(d *schema.ResourceData, meta interface{}) (bool, error) { - conn := meta.(*AWSClient).kmsconn - - req := &kms.DescribeKeyInput{ - KeyId: aws.String(d.Id()), - } - resp, err := conn.DescribeKey(req) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NotFoundException" { - return false, nil - } - } - return false, err - } - metadata := resp.KeyMetadata - - if *metadata.KeyState == "PendingDeletion" { - return false, nil - } - - return true, nil -} - -func resourceAwsKmsKeyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).kmsconn - keyId := d.Get("key_id").(string) - - req := &kms.ScheduleKeyDeletionInput{ - KeyId: aws.String(keyId), - } - if v, exists := d.GetOk("deletion_window_in_days"); exists { - req.PendingWindowInDays = aws.Int64(int64(v.(int))) - } - _, err := conn.ScheduleKeyDeletion(req) - if err != nil { - return err - } - - // Wait for propagation since KMS is eventually consistent - wait := resource.StateChangeConf{ - Pending: []string{"Enabled", "Disabled"}, - Target: []string{"PendingDeletion"}, - Timeout: 20 * time.Minute, - MinTimeout: 2 * time.Second, - ContinuousTargetOccurence: 10, - Refresh: func() (interface{}, string, error) { - log.Printf("[DEBUG] Checking if KMS key %s state is PendingDeletion", keyId) - resp, err := conn.DescribeKey(&kms.DescribeKeyInput{ - KeyId: aws.String(keyId), - }) - if err != nil { - return resp, "Failed", err - } - - metadata := *resp.KeyMetadata - log.Printf("[DEBUG] KMS key %s state is %s, retrying", keyId, *metadata.KeyState) - - return resp, *metadata.KeyState, nil - }, - } - - _, err = wait.WaitForState() - if err != nil { - return fmt.Errorf("Failed deactivating KMS key %s: %s", keyId, err) - } - - log.Printf("[DEBUG] KMS Key %s deactivated.", keyId) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_alias.go deleted file mode 100644 index 62f36fd69..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_alias.go +++ /dev/null @@ -1,188 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/lambda" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsLambdaAlias() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLambdaAliasCreate, - Read: resourceAwsLambdaAliasRead, - Update: resourceAwsLambdaAliasUpdate, - Delete: resourceAwsLambdaAliasDelete, - - Schema: map[string]*schema.Schema{ - "description": { - Type: schema.TypeString, - Optional: true, - }, - "function_name": { - Type: schema.TypeString, - Required: true, - }, - "function_version": { - Type: schema.TypeString, - Required: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "invoke_arn": { - Type: schema.TypeString, - Computed: true, - }, - "routing_config": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "additional_version_weights": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeFloat}, - }, - }, - }, - }, - }, - } -} - -// resourceAwsLambdaAliasCreate maps to: -// CreateAlias in the API / SDK -func resourceAwsLambdaAliasCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - functionName := d.Get("function_name").(string) - aliasName := d.Get("name").(string) - - log.Printf("[DEBUG] Creating Lambda alias: alias %s for function %s", aliasName, functionName) - - params := &lambda.CreateAliasInput{ - Description: aws.String(d.Get("description").(string)), - FunctionName: aws.String(functionName), - FunctionVersion: aws.String(d.Get("function_version").(string)), - Name: aws.String(aliasName), - RoutingConfig: expandLambdaAliasRoutingConfiguration(d.Get("routing_config").([]interface{})), - } - - aliasConfiguration, err := conn.CreateAlias(params) - if err != nil { - return fmt.Errorf("Error creating Lambda alias: %s", err) - } - - d.SetId(*aliasConfiguration.AliasArn) - - return resourceAwsLambdaAliasRead(d, meta) -} - -// resourceAwsLambdaAliasRead maps to: -// GetAlias in the API / SDK -func resourceAwsLambdaAliasRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - log.Printf("[DEBUG] Fetching Lambda alias: %s:%s", d.Get("function_name"), d.Get("name")) - - params := &lambda.GetAliasInput{ - FunctionName: aws.String(d.Get("function_name").(string)), - Name: aws.String(d.Get("name").(string)), - } - - aliasConfiguration, err := conn.GetAlias(params) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "ResourceNotFoundException" && strings.Contains(awsErr.Message(), "Cannot find alias arn") { - d.SetId("") - return nil - } - } - return err - } - - d.Set("description", aliasConfiguration.Description) - d.Set("function_version", aliasConfiguration.FunctionVersion) - d.Set("name", aliasConfiguration.Name) - d.Set("arn", aliasConfiguration.AliasArn) - - invokeArn := lambdaFunctionInvokeArn(*aliasConfiguration.AliasArn, meta) - d.Set("invoke_arn", invokeArn) - - if err := d.Set("routing_config", flattenLambdaAliasRoutingConfiguration(aliasConfiguration.RoutingConfig)); err != nil { - return fmt.Errorf("error setting routing_config: %s", err) - } - - return nil -} - -// resourceAwsLambdaAliasDelete maps to: -// DeleteAlias in the API / SDK -func resourceAwsLambdaAliasDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - log.Printf("[INFO] Deleting Lambda alias: %s:%s", d.Get("function_name"), d.Get("name")) - - params := &lambda.DeleteAliasInput{ - FunctionName: aws.String(d.Get("function_name").(string)), - Name: aws.String(d.Get("name").(string)), - } - - _, err := conn.DeleteAlias(params) - if err != nil { - return fmt.Errorf("Error deleting Lambda alias: %s", err) - } - - return nil -} - -// resourceAwsLambdaAliasUpdate maps to: -// UpdateAlias in the API / SDK -func resourceAwsLambdaAliasUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - log.Printf("[DEBUG] Updating Lambda alias: %s:%s", d.Get("function_name"), d.Get("name")) - - params := &lambda.UpdateAliasInput{ - Description: aws.String(d.Get("description").(string)), - FunctionName: aws.String(d.Get("function_name").(string)), - FunctionVersion: aws.String(d.Get("function_version").(string)), - Name: aws.String(d.Get("name").(string)), - RoutingConfig: expandLambdaAliasRoutingConfiguration(d.Get("routing_config").([]interface{})), - } - - _, err := conn.UpdateAlias(params) - if err != nil { - return fmt.Errorf("Error updating Lambda alias: %s", err) - } - - return nil -} - -func expandLambdaAliasRoutingConfiguration(l []interface{}) *lambda.AliasRoutingConfiguration { - aliasRoutingConfiguration := &lambda.AliasRoutingConfiguration{} - - if len(l) == 0 || l[0] == nil { - return aliasRoutingConfiguration - } - - m := l[0].(map[string]interface{}) - - if v, ok := m["additional_version_weights"]; ok { - aliasRoutingConfiguration.AdditionalVersionWeights = expandFloat64Map(v.(map[string]interface{})) - } - - return aliasRoutingConfiguration -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_event_source_mapping.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_event_source_mapping.go deleted file mode 100644 index 8cc414923..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_event_source_mapping.go +++ /dev/null @@ -1,293 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/dynamodb" - "github.com/aws/aws-sdk-go/service/kinesis" - "github.com/aws/aws-sdk-go/service/lambda" - "github.com/aws/aws-sdk-go/service/sqs" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsLambdaEventSourceMapping() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLambdaEventSourceMappingCreate, - Read: resourceAwsLambdaEventSourceMappingRead, - Update: resourceAwsLambdaEventSourceMappingUpdate, - Delete: resourceAwsLambdaEventSourceMappingDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "event_source_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "function_name": { - Type: schema.TypeString, - Required: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - // Using function name or ARN should not be shown as a diff. - // Try to convert the old and new values from ARN to function name - oldFunctionName, oldFunctionNameErr := getFunctionNameFromLambdaArn(old) - newFunctionName, newFunctionNameErr := getFunctionNameFromLambdaArn(new) - return (oldFunctionName == new && oldFunctionNameErr == nil) || (newFunctionName == old && newFunctionNameErr == nil) - }, - }, - "starting_position": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - lambda.EventSourcePositionAtTimestamp, - lambda.EventSourcePositionLatest, - lambda.EventSourcePositionTrimHorizon, - }, false), - }, - "starting_position_timestamp": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.ValidateRFC3339TimeString, - }, - "batch_size": { - Type: schema.TypeInt, - Optional: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - // When AWS repurposed EventSourceMapping for use with SQS they kept - // the default for BatchSize at 100 for Kinesis and DynamoDB, but made - // the default 10 for SQS. As such, we had to make batch_size optional. - // Because of this, we need to ensure that if someone doesn't have - // batch_size specified that it is not treated as a diff for those - if new != "" && new != "0" { - return false - } - - eventSourceARN, err := arn.Parse(d.Get("event_source_arn").(string)) - if err != nil { - return false - } - switch eventSourceARN.Service { - case dynamodb.ServiceName, kinesis.ServiceName: - if old == "100" { - return true - } - case sqs.ServiceName: - if old == "10" { - return true - } - } - return false - }, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "function_arn": { - Type: schema.TypeString, - Computed: true, - }, - "last_modified": { - Type: schema.TypeString, - Computed: true, - }, - "last_processing_result": { - Type: schema.TypeString, - Computed: true, - }, - "state": { - Type: schema.TypeString, - Computed: true, - }, - "state_transition_reason": { - Type: schema.TypeString, - Computed: true, - }, - "uuid": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -// resourceAwsLambdaEventSourceMappingCreate maps to: -// CreateEventSourceMapping in the API / SDK -func resourceAwsLambdaEventSourceMappingCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - functionName := d.Get("function_name").(string) - eventSourceArn := d.Get("event_source_arn").(string) - - log.Printf("[DEBUG] Creating Lambda event source mapping: source %s to function %s", eventSourceArn, functionName) - - params := &lambda.CreateEventSourceMappingInput{ - EventSourceArn: aws.String(eventSourceArn), - FunctionName: aws.String(functionName), - Enabled: aws.Bool(d.Get("enabled").(bool)), - } - - if batchSize, ok := d.GetOk("batch_size"); ok { - params.BatchSize = aws.Int64(int64(batchSize.(int))) - } - - if startingPosition, ok := d.GetOk("starting_position"); ok { - params.StartingPosition = aws.String(startingPosition.(string)) - } - - if startingPositionTimestamp, ok := d.GetOk("starting_position_timestamp"); ok { - t, _ := time.Parse(time.RFC3339, startingPositionTimestamp.(string)) - params.StartingPositionTimestamp = aws.Time(t) - } - - // IAM profiles and roles can take some time to propagate in AWS: - // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console - // Error creating Lambda function: InvalidParameterValueException: The - // function defined for the task cannot be assumed by Lambda. - // - // The role may exist, but the permissions may not have propagated, so we - // retry - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - eventSourceMappingConfiguration, err := conn.CreateEventSourceMapping(params) - if err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "InvalidParameterValueException" { - return resource.RetryableError(awserr) - } - } - return resource.NonRetryableError(err) - } - // No error - d.Set("uuid", eventSourceMappingConfiguration.UUID) - d.SetId(*eventSourceMappingConfiguration.UUID) - return nil - }) - - if err != nil { - return fmt.Errorf("Error creating Lambda event source mapping: %s", err) - } - - return resourceAwsLambdaEventSourceMappingRead(d, meta) -} - -// resourceAwsLambdaEventSourceMappingRead maps to: -// GetEventSourceMapping in the API / SDK -func resourceAwsLambdaEventSourceMappingRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - log.Printf("[DEBUG] Fetching Lambda event source mapping: %s", d.Id()) - - params := &lambda.GetEventSourceMappingInput{ - UUID: aws.String(d.Id()), - } - - eventSourceMappingConfiguration, err := conn.GetEventSourceMapping(params) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "ResourceNotFoundException" { - log.Printf("[DEBUG] Lambda event source mapping (%s) not found", d.Id()) - d.SetId("") - - return nil - } - return err - } - - d.Set("batch_size", eventSourceMappingConfiguration.BatchSize) - d.Set("event_source_arn", eventSourceMappingConfiguration.EventSourceArn) - d.Set("function_arn", eventSourceMappingConfiguration.FunctionArn) - d.Set("last_modified", eventSourceMappingConfiguration.LastModified) - d.Set("last_processing_result", eventSourceMappingConfiguration.LastProcessingResult) - d.Set("state", eventSourceMappingConfiguration.State) - d.Set("state_transition_reason", eventSourceMappingConfiguration.StateTransitionReason) - d.Set("uuid", eventSourceMappingConfiguration.UUID) - d.Set("function_name", eventSourceMappingConfiguration.FunctionArn) - - state := aws.StringValue(eventSourceMappingConfiguration.State) - - switch state { - case "Enabled", "Enabling": - d.Set("enabled", true) - case "Disabled", "Disabling": - d.Set("enabled", false) - default: - log.Printf("[DEBUG] Lambda event source mapping is neither enabled nor disabled but %s", *eventSourceMappingConfiguration.State) - } - - return nil -} - -// resourceAwsLambdaEventSourceMappingDelete maps to: -// DeleteEventSourceMapping in the API / SDK -func resourceAwsLambdaEventSourceMappingDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - log.Printf("[INFO] Deleting Lambda event source mapping: %s", d.Id()) - - params := &lambda.DeleteEventSourceMappingInput{ - UUID: aws.String(d.Id()), - } - - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteEventSourceMapping(params) - if err != nil { - if isAWSErr(err, lambda.ErrCodeResourceInUseException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return fmt.Errorf("Error deleting Lambda event source mapping: %s", err) - } - - return nil -} - -// resourceAwsLambdaEventSourceMappingUpdate maps to: -// UpdateEventSourceMapping in the API / SDK -func resourceAwsLambdaEventSourceMappingUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - log.Printf("[DEBUG] Updating Lambda event source mapping: %s", d.Id()) - - params := &lambda.UpdateEventSourceMappingInput{ - UUID: aws.String(d.Id()), - BatchSize: aws.Int64(int64(d.Get("batch_size").(int))), - FunctionName: aws.String(d.Get("function_name").(string)), - Enabled: aws.Bool(d.Get("enabled").(bool)), - } - - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.UpdateEventSourceMapping(params) - if err != nil { - if isAWSErr(err, lambda.ErrCodeInvalidParameterValueException, "") || - isAWSErr(err, lambda.ErrCodeResourceInUseException, "") { - - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return fmt.Errorf("Error updating Lambda event source mapping: %s", err) - } - - return resourceAwsLambdaEventSourceMappingRead(d, meta) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go deleted file mode 100644 index 74ebeadbd..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go +++ /dev/null @@ -1,919 +0,0 @@ -package aws - -import ( - "fmt" - "io/ioutil" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/lambda" - homedir "github.com/mitchellh/go-homedir" - - "errors" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -const awsMutexLambdaKey = `aws_lambda_function` - -var validLambdaRuntimes = []string{ - // lambda.RuntimeNodejs has reached end of life since October 2016 so not included here - lambda.RuntimeDotnetcore10, - lambda.RuntimeDotnetcore20, - lambda.RuntimeDotnetcore21, - lambda.RuntimeGo1X, - lambda.RuntimeJava8, - lambda.RuntimeNodejs43, - lambda.RuntimeNodejs43Edge, - lambda.RuntimeNodejs610, - lambda.RuntimeNodejs810, - lambda.RuntimeProvided, - lambda.RuntimePython27, - lambda.RuntimePython36, - lambda.RuntimePython37, - lambda.RuntimeRuby25, -} - -func resourceAwsLambdaFunction() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLambdaFunctionCreate, - Read: resourceAwsLambdaFunctionRead, - Update: resourceAwsLambdaFunctionUpdate, - Delete: resourceAwsLambdaFunctionDelete, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - }, - - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("function_name", d.Id()) - return []*schema.ResourceData{d}, nil - }, - }, - - Schema: map[string]*schema.Schema{ - "filename": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"s3_bucket", "s3_key", "s3_object_version"}, - }, - "s3_bucket": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"filename"}, - }, - "s3_key": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"filename"}, - }, - "s3_object_version": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"filename"}, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "dead_letter_config": { - Type: schema.TypeList, - Optional: true, - MinItems: 0, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "target_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - "function_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "handler": { - Type: schema.TypeString, - Required: true, - }, - "layers": { - Type: schema.TypeList, - Optional: true, - MaxItems: 5, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateArn, - }, - }, - "memory_size": { - Type: schema.TypeInt, - Optional: true, - Default: 128, - }, - "reserved_concurrent_executions": { - Type: schema.TypeInt, - Optional: true, - }, - "role": { - Type: schema.TypeString, - Required: true, - }, - "runtime": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice(validLambdaRuntimes, false), - }, - "timeout": { - Type: schema.TypeInt, - Optional: true, - Default: 3, - }, - "publish": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "version": { - Type: schema.TypeString, - Computed: true, - }, - "vpc_config": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "subnet_ids": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "security_group_ids": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - - // Suppress diffs if the VPC configuration is provided, but empty - // which is a valid Lambda function configuration. e.g. - // vpc_config { - // security_group_ids = [] - // subnet_ids = [] - // } - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if d.Id() == "" || old == "1" || new == "0" { - return false - } - - if d.HasChange("vpc_config.0.security_group_ids") || d.HasChange("vpc_config.0.subnet_ids") { - return false - } - - return true - }, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "qualified_arn": { - Type: schema.TypeString, - Computed: true, - }, - "invoke_arn": { - Type: schema.TypeString, - Computed: true, - }, - "last_modified": { - Type: schema.TypeString, - Computed: true, - }, - "source_code_hash": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "source_code_size": { - Type: schema.TypeInt, - Computed: true, - }, - "environment": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "variables": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "tracing_config": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "mode": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{"Active", "PassThrough"}, true), - }, - }, - }, - }, - "kms_key_arn": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "tags": tagsSchema(), - }, - - CustomizeDiff: updateComputedAttributesOnPublish, - } -} - -func updateComputedAttributesOnPublish(d *schema.ResourceDiff, meta interface{}) error { - if needsFunctionCodeUpdate(d) { - d.SetNewComputed("last_modified") - publish := d.Get("publish").(bool) - if publish { - d.SetNewComputed("version") - d.SetNewComputed("qualified_arn") - } - } - return nil -} - -// resourceAwsLambdaFunction maps to: -// CreateFunction in the API / SDK -func resourceAwsLambdaFunctionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - functionName := d.Get("function_name").(string) - reservedConcurrentExecutions := d.Get("reserved_concurrent_executions").(int) - iamRole := d.Get("role").(string) - - log.Printf("[DEBUG] Creating Lambda Function %s with role %s", functionName, iamRole) - - filename, hasFilename := d.GetOk("filename") - s3Bucket, bucketOk := d.GetOk("s3_bucket") - s3Key, keyOk := d.GetOk("s3_key") - s3ObjectVersion, versionOk := d.GetOk("s3_object_version") - - if !hasFilename && !bucketOk && !keyOk && !versionOk { - return errors.New("filename or s3_* attributes must be set") - } - - var functionCode *lambda.FunctionCode - if hasFilename { - // Grab an exclusive lock so that we're only reading one function into - // memory at a time. - // See https://github.com/hashicorp/terraform/issues/9364 - awsMutexKV.Lock(awsMutexLambdaKey) - defer awsMutexKV.Unlock(awsMutexLambdaKey) - file, err := loadFileContent(filename.(string)) - if err != nil { - return fmt.Errorf("Unable to load %q: %s", filename.(string), err) - } - functionCode = &lambda.FunctionCode{ - ZipFile: file, - } - } else { - if !bucketOk || !keyOk { - return errors.New("s3_bucket and s3_key must all be set while using S3 code source") - } - functionCode = &lambda.FunctionCode{ - S3Bucket: aws.String(s3Bucket.(string)), - S3Key: aws.String(s3Key.(string)), - } - if versionOk { - functionCode.S3ObjectVersion = aws.String(s3ObjectVersion.(string)) - } - } - - params := &lambda.CreateFunctionInput{ - Code: functionCode, - Description: aws.String(d.Get("description").(string)), - FunctionName: aws.String(functionName), - Handler: aws.String(d.Get("handler").(string)), - MemorySize: aws.Int64(int64(d.Get("memory_size").(int))), - Role: aws.String(iamRole), - Runtime: aws.String(d.Get("runtime").(string)), - Timeout: aws.Int64(int64(d.Get("timeout").(int))), - Publish: aws.Bool(d.Get("publish").(bool)), - } - - if v, ok := d.GetOk("layers"); ok && len(v.([]interface{})) > 0 { - params.Layers = expandStringList(v.([]interface{})) - } - - if v, ok := d.GetOk("dead_letter_config"); ok { - dlcMaps := v.([]interface{}) - if len(dlcMaps) == 1 { // Schema guarantees either 0 or 1 - // Prevent panic on nil dead_letter_config. See GH-14961 - if dlcMaps[0] == nil { - return fmt.Errorf("Nil dead_letter_config supplied for function: %s", functionName) - } - dlcMap := dlcMaps[0].(map[string]interface{}) - params.DeadLetterConfig = &lambda.DeadLetterConfig{ - TargetArn: aws.String(dlcMap["target_arn"].(string)), - } - } - } - - if v, ok := d.GetOk("vpc_config"); ok && len(v.([]interface{})) > 0 { - config := v.([]interface{})[0].(map[string]interface{}) - - params.VpcConfig = &lambda.VpcConfig{ - SecurityGroupIds: expandStringSet(config["security_group_ids"].(*schema.Set)), - SubnetIds: expandStringSet(config["subnet_ids"].(*schema.Set)), - } - } - - if v, ok := d.GetOk("tracing_config"); ok { - tracingConfig := v.([]interface{}) - tracing := tracingConfig[0].(map[string]interface{}) - params.TracingConfig = &lambda.TracingConfig{ - Mode: aws.String(tracing["mode"].(string)), - } - } - - if v, ok := d.GetOk("environment"); ok { - environments := v.([]interface{}) - environment, ok := environments[0].(map[string]interface{}) - if !ok { - return errors.New("At least one field is expected inside environment") - } - - if environmentVariables, ok := environment["variables"]; ok { - variables := readEnvironmentVariables(environmentVariables.(map[string]interface{})) - - params.Environment = &lambda.Environment{ - Variables: aws.StringMap(variables), - } - } - } - - if v, ok := d.GetOk("kms_key_arn"); ok { - params.KMSKeyArn = aws.String(v.(string)) - } - - if v, exists := d.GetOk("tags"); exists { - params.Tags = tagsFromMapGeneric(v.(map[string]interface{})) - } - - // IAM changes can take 1 minute to propagate in AWS - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.CreateFunction(params) - if err != nil { - log.Printf("[DEBUG] Error creating Lambda Function: %s", err) - - if isAWSErr(err, "InvalidParameterValueException", "The role defined for the function cannot be assumed by Lambda") { - log.Printf("[DEBUG] Received %s, retrying CreateFunction", err) - return resource.RetryableError(err) - } - if isAWSErr(err, "InvalidParameterValueException", "The provided execution role does not have permissions") { - log.Printf("[DEBUG] Received %s, retrying CreateFunction", err) - return resource.RetryableError(err) - } - if isAWSErr(err, "InvalidParameterValueException", "Your request has been throttled by EC2") { - log.Printf("[DEBUG] Received %s, retrying CreateFunction", err) - return resource.RetryableError(err) - } - if isAWSErr(err, "InvalidParameterValueException", "Lambda was unable to configure access to your environment variables because the KMS key is invalid for CreateGrant") { - log.Printf("[DEBUG] Received %s, retrying CreateFunction", err) - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - if !isResourceTimeoutError(err) && !isAWSErr(err, "InvalidParameterValueException", "Your request has been throttled by EC2") { - return fmt.Errorf("Error creating Lambda function: %s", err) - } - // Allow additional time for slower uploads or EC2 throttling - err := resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - _, err := conn.CreateFunction(params) - if err != nil { - log.Printf("[DEBUG] Error creating Lambda Function: %s", err) - - if isAWSErr(err, "InvalidParameterValueException", "Your request has been throttled by EC2") { - log.Printf("[DEBUG] Received %s, retrying CreateFunction", err) - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error creating Lambda function: %s", err) - } - } - - d.SetId(d.Get("function_name").(string)) - - if reservedConcurrentExecutions > 0 { - - log.Printf("[DEBUG] Setting Concurrency to %d for the Lambda Function %s", reservedConcurrentExecutions, functionName) - - concurrencyParams := &lambda.PutFunctionConcurrencyInput{ - FunctionName: aws.String(functionName), - ReservedConcurrentExecutions: aws.Int64(int64(reservedConcurrentExecutions)), - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.PutFunctionConcurrency(concurrencyParams) - if err != nil { - if isAWSErr(err, lambda.ErrCodeResourceNotFoundException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error setting concurrency for Lambda %s: %s", functionName, err) - } - } - - return resourceAwsLambdaFunctionRead(d, meta) -} - -// resourceAwsLambdaFunctionRead maps to: -// GetFunction in the API / SDK -func resourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - params := &lambda.GetFunctionInput{ - FunctionName: aws.String(d.Get("function_name").(string)), - } - - // qualifier for lambda function data source - qualifier, qualifierExistance := d.GetOk("qualifier") - if qualifierExistance { - params.Qualifier = aws.String(qualifier.(string)) - log.Printf("[DEBUG] Fetching Lambda Function: %s:%s", d.Id(), qualifier.(string)) - } else { - log.Printf("[DEBUG] Fetching Lambda Function: %s", d.Id()) - } - - getFunctionOutput, err := conn.GetFunction(params) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" && !d.IsNewResource() { - d.SetId("") - return nil - } - return err - } - - if getFunctionOutput.Concurrency != nil { - d.Set("reserved_concurrent_executions", getFunctionOutput.Concurrency.ReservedConcurrentExecutions) - } else { - d.Set("reserved_concurrent_executions", nil) - } - - // Tagging operations are permitted on Lambda functions only. - // Tags on aliases and versions are not supported. - if !qualifierExistance { - d.Set("tags", tagsToMapGeneric(getFunctionOutput.Tags)) - } - - // getFunctionOutput.Code.Location is a pre-signed URL pointing at the zip - // file that we uploaded when we created the resource. You can use it to - // download the code from AWS. The other part is - // getFunctionOutput.Configuration which holds metadata. - - function := getFunctionOutput.Configuration - // TODO error checking / handling on the Set() calls. - d.Set("arn", function.FunctionArn) - d.Set("description", function.Description) - d.Set("handler", function.Handler) - d.Set("memory_size", function.MemorySize) - d.Set("last_modified", function.LastModified) - d.Set("role", function.Role) - d.Set("runtime", function.Runtime) - d.Set("timeout", function.Timeout) - d.Set("kms_key_arn", function.KMSKeyArn) - d.Set("source_code_hash", function.CodeSha256) - d.Set("source_code_size", function.CodeSize) - - layers := flattenLambdaLayers(function.Layers) - log.Printf("[INFO] Setting Lambda %s Layers %#v from API", d.Id(), layers) - if err := d.Set("layers", layers); err != nil { - return fmt.Errorf("Error setting layers for Lambda Function (%s): %s", d.Id(), err) - } - - config := flattenLambdaVpcConfigResponse(function.VpcConfig) - log.Printf("[INFO] Setting Lambda %s VPC config %#v from API", d.Id(), config) - if err := d.Set("vpc_config", config); err != nil { - return fmt.Errorf("Error setting vpc_config for Lambda Function (%s): %s", d.Id(), err) - } - - environment := flattenLambdaEnvironment(function.Environment) - log.Printf("[INFO] Setting Lambda %s environment %#v from API", d.Id(), environment) - if err := d.Set("environment", environment); err != nil { - log.Printf("[ERR] Error setting environment for Lambda Function (%s): %s", d.Id(), err) - } - - if function.DeadLetterConfig != nil && function.DeadLetterConfig.TargetArn != nil { - d.Set("dead_letter_config", []interface{}{ - map[string]interface{}{ - "target_arn": *function.DeadLetterConfig.TargetArn, - }, - }) - } else { - d.Set("dead_letter_config", []interface{}{}) - } - - // Assume `PassThrough` on partitions that don't support tracing config - tracingConfigMode := "PassThrough" - if function.TracingConfig != nil { - tracingConfigMode = *function.TracingConfig.Mode - } - d.Set("tracing_config", []interface{}{ - map[string]interface{}{ - "mode": tracingConfigMode, - }, - }) - - // Get latest version and ARN unless qualifier is specified via data source - if qualifierExistance { - d.Set("version", function.Version) - d.Set("qualified_arn", function.FunctionArn) - } else { - // List is sorted from oldest to latest - // so this may get costly over time :'( - var lastVersion, lastQualifiedArn string - err = listVersionsByFunctionPages(conn, &lambda.ListVersionsByFunctionInput{ - FunctionName: function.FunctionName, - MaxItems: aws.Int64(10000), - }, func(p *lambda.ListVersionsByFunctionOutput, lastPage bool) bool { - if lastPage { - last := p.Versions[len(p.Versions)-1] - lastVersion = *last.Version - lastQualifiedArn = *last.FunctionArn - return false - } - return true - }) - if err != nil { - return err - } - - d.Set("version", lastVersion) - d.Set("qualified_arn", lastQualifiedArn) - } - - invokeArn := lambdaFunctionInvokeArn(*function.FunctionArn, meta) - d.Set("invoke_arn", invokeArn) - - return nil -} - -func listVersionsByFunctionPages(c *lambda.Lambda, input *lambda.ListVersionsByFunctionInput, - fn func(p *lambda.ListVersionsByFunctionOutput, lastPage bool) bool) error { - for { - page, err := c.ListVersionsByFunction(input) - if err != nil { - return err - } - lastPage := page.NextMarker == nil - - shouldContinue := fn(page, lastPage) - if !shouldContinue || lastPage { - break - } - input.Marker = page.NextMarker - } - return nil -} - -// resourceAwsLambdaFunction maps to: -// DeleteFunction in the API / SDK -func resourceAwsLambdaFunctionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - log.Printf("[INFO] Deleting Lambda Function: %s", d.Id()) - - params := &lambda.DeleteFunctionInput{ - FunctionName: aws.String(d.Get("function_name").(string)), - } - - _, err := conn.DeleteFunction(params) - if err != nil { - return fmt.Errorf("Error deleting Lambda Function: %s", err) - } - - return nil -} - -type resourceDiffer interface { - HasChange(string) bool -} - -func needsFunctionCodeUpdate(d resourceDiffer) bool { - return d.HasChange("filename") || d.HasChange("source_code_hash") || d.HasChange("s3_bucket") || d.HasChange("s3_key") || d.HasChange("s3_object_version") -} - -// resourceAwsLambdaFunctionUpdate maps to: -// UpdateFunctionCode in the API / SDK -func resourceAwsLambdaFunctionUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - d.Partial(true) - - arn := d.Get("arn").(string) - if tagErr := setTagsLambda(conn, d, arn); tagErr != nil { - return tagErr - } - d.SetPartial("tags") - - configReq := &lambda.UpdateFunctionConfigurationInput{ - FunctionName: aws.String(d.Id()), - } - - configUpdate := false - if d.HasChange("description") { - configReq.Description = aws.String(d.Get("description").(string)) - configUpdate = true - } - if d.HasChange("handler") { - configReq.Handler = aws.String(d.Get("handler").(string)) - configUpdate = true - } - if d.HasChange("memory_size") { - configReq.MemorySize = aws.Int64(int64(d.Get("memory_size").(int))) - configUpdate = true - } - if d.HasChange("role") { - configReq.Role = aws.String(d.Get("role").(string)) - configUpdate = true - } - if d.HasChange("timeout") { - configReq.Timeout = aws.Int64(int64(d.Get("timeout").(int))) - configUpdate = true - } - if d.HasChange("kms_key_arn") { - configReq.KMSKeyArn = aws.String(d.Get("kms_key_arn").(string)) - configUpdate = true - } - if d.HasChange("layers") { - layers := d.Get("layers").([]interface{}) - configReq.Layers = expandStringList(layers) - configUpdate = true - } - if d.HasChange("dead_letter_config") { - dlcMaps := d.Get("dead_letter_config").([]interface{}) - configReq.DeadLetterConfig = &lambda.DeadLetterConfig{ - TargetArn: aws.String(""), - } - if len(dlcMaps) == 1 { // Schema guarantees either 0 or 1 - dlcMap := dlcMaps[0].(map[string]interface{}) - configReq.DeadLetterConfig.TargetArn = aws.String(dlcMap["target_arn"].(string)) - } - configUpdate = true - } - if d.HasChange("tracing_config") { - tracingConfig := d.Get("tracing_config").([]interface{}) - if len(tracingConfig) == 1 { // Schema guarantees either 0 or 1 - config := tracingConfig[0].(map[string]interface{}) - configReq.TracingConfig = &lambda.TracingConfig{ - Mode: aws.String(config["mode"].(string)), - } - configUpdate = true - } - } - if d.HasChange("vpc_config") { - configReq.VpcConfig = &lambda.VpcConfig{ - SecurityGroupIds: []*string{}, - SubnetIds: []*string{}, - } - if v, ok := d.GetOk("vpc_config"); ok && len(v.([]interface{})) > 0 { - vpcConfig := v.([]interface{})[0].(map[string]interface{}) - configReq.VpcConfig.SecurityGroupIds = expandStringSet(vpcConfig["security_group_ids"].(*schema.Set)) - configReq.VpcConfig.SubnetIds = expandStringSet(vpcConfig["subnet_ids"].(*schema.Set)) - } - configUpdate = true - } - - if d.HasChange("runtime") { - configReq.Runtime = aws.String(d.Get("runtime").(string)) - configUpdate = true - } - if d.HasChange("environment") { - if v, ok := d.GetOk("environment"); ok { - environments := v.([]interface{}) - environment, ok := environments[0].(map[string]interface{}) - if !ok { - return errors.New("At least one field is expected inside environment") - } - - if environmentVariables, ok := environment["variables"]; ok { - variables := readEnvironmentVariables(environmentVariables.(map[string]interface{})) - - configReq.Environment = &lambda.Environment{ - Variables: aws.StringMap(variables), - } - configUpdate = true - } - } else { - configReq.Environment = &lambda.Environment{ - Variables: aws.StringMap(map[string]string{}), - } - configUpdate = true - } - } - - if configUpdate { - log.Printf("[DEBUG] Send Update Lambda Function Configuration request: %#v", configReq) - - // IAM changes can take 1 minute to propagate in AWS - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.UpdateFunctionConfiguration(configReq) - if err != nil { - log.Printf("[DEBUG] Received error modifying Lambda Function Configuration %s: %s", d.Id(), err) - - if isAWSErr(err, "InvalidParameterValueException", "The role defined for the function cannot be assumed by Lambda") { - log.Printf("[DEBUG] Received %s, retrying UpdateFunctionConfiguration", err) - return resource.RetryableError(err) - } - if isAWSErr(err, "InvalidParameterValueException", "The provided execution role does not have permissions") { - log.Printf("[DEBUG] Received %s, retrying UpdateFunctionConfiguration", err) - return resource.RetryableError(err) - } - if isAWSErr(err, "InvalidParameterValueException", "Your request has been throttled by EC2, please make sure you have enough API rate limit.") { - log.Printf("[DEBUG] Received %s, retrying UpdateFunctionConfiguration", err) - return resource.RetryableError(err) - } - if isAWSErr(err, "InvalidParameterValueException", "Lambda was unable to configure access to your environment variables because the KMS key is invalid for CreateGrant") { - log.Printf("[DEBUG] Received %s, retrying CreateFunction", err) - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - if !isAWSErr(err, "InvalidParameterValueException", "Your request has been throttled by EC2, please make sure you have enough API rate limit.") { - return fmt.Errorf("Error modifying Lambda Function Configuration %s: %s", d.Id(), err) - } - // Allow 9 more minutes for EC2 throttling - err := resource.Retry(9*time.Minute, func() *resource.RetryError { - _, err := conn.UpdateFunctionConfiguration(configReq) - if err != nil { - log.Printf("[DEBUG] Received error modifying Lambda Function Configuration %s: %s", d.Id(), err) - - if isAWSErr(err, "InvalidParameterValueException", "Your request has been throttled by EC2, please make sure you have enough API rate limit.") { - log.Printf("[DEBUG] Received %s, retrying UpdateFunctionConfiguration", err) - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error modifying Lambda Function Configuration %s: %s", d.Id(), err) - } - } - - d.SetPartial("description") - d.SetPartial("handler") - d.SetPartial("memory_size") - d.SetPartial("role") - d.SetPartial("timeout") - } - - if needsFunctionCodeUpdate(d) { - codeReq := &lambda.UpdateFunctionCodeInput{ - FunctionName: aws.String(d.Id()), - Publish: aws.Bool(d.Get("publish").(bool)), - } - - if v, ok := d.GetOk("filename"); ok { - // Grab an exclusive lock so that we're only reading one function into - // memory at a time. - // See https://github.com/hashicorp/terraform/issues/9364 - awsMutexKV.Lock(awsMutexLambdaKey) - defer awsMutexKV.Unlock(awsMutexLambdaKey) - file, err := loadFileContent(v.(string)) - if err != nil { - return fmt.Errorf("Unable to load %q: %s", v.(string), err) - } - codeReq.ZipFile = file - } else { - s3Bucket, _ := d.GetOk("s3_bucket") - s3Key, _ := d.GetOk("s3_key") - s3ObjectVersion, versionOk := d.GetOk("s3_object_version") - - codeReq.S3Bucket = aws.String(s3Bucket.(string)) - codeReq.S3Key = aws.String(s3Key.(string)) - if versionOk { - codeReq.S3ObjectVersion = aws.String(s3ObjectVersion.(string)) - } - } - - log.Printf("[DEBUG] Send Update Lambda Function Code request: %#v", codeReq) - - _, err := conn.UpdateFunctionCode(codeReq) - if err != nil { - return fmt.Errorf("Error modifying Lambda Function Code %s: %s", d.Id(), err) - } - - d.SetPartial("filename") - d.SetPartial("source_code_hash") - d.SetPartial("s3_bucket") - d.SetPartial("s3_key") - d.SetPartial("s3_object_version") - } - - if d.HasChange("reserved_concurrent_executions") { - nc := d.Get("reserved_concurrent_executions") - - if nc.(int) > 0 { - log.Printf("[DEBUG] Updating Concurrency to %d for the Lambda Function %s", nc.(int), d.Id()) - - concurrencyParams := &lambda.PutFunctionConcurrencyInput{ - FunctionName: aws.String(d.Id()), - ReservedConcurrentExecutions: aws.Int64(int64(d.Get("reserved_concurrent_executions").(int))), - } - - _, err := conn.PutFunctionConcurrency(concurrencyParams) - if err != nil { - return fmt.Errorf("Error setting concurrency for Lambda %s: %s", d.Id(), err) - } - } else { - log.Printf("[DEBUG] Removing Concurrency for the Lambda Function %s", d.Id()) - - deleteConcurrencyParams := &lambda.DeleteFunctionConcurrencyInput{ - FunctionName: aws.String(d.Id()), - } - _, err := conn.DeleteFunctionConcurrency(deleteConcurrencyParams) - if err != nil { - return fmt.Errorf("Error setting concurrency for Lambda %s: %s", d.Id(), err) - } - } - } - - d.Partial(false) - - return resourceAwsLambdaFunctionRead(d, meta) -} - -// loadFileContent returns contents of a file in a given path -func loadFileContent(v string) ([]byte, error) { - filename, err := homedir.Expand(v) - if err != nil { - return nil, err - } - fileContent, err := ioutil.ReadFile(filename) - if err != nil { - return nil, err - } - return fileContent, nil -} - -func readEnvironmentVariables(ev map[string]interface{}) map[string]string { - variables := make(map[string]string) - for k, v := range ev { - variables[k] = v.(string) - } - - return variables -} - -func lambdaFunctionInvokeArn(functionArn string, meta interface{}) string { - return arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "apigateway", - Region: meta.(*AWSClient).region, - AccountID: "lambda", - Resource: fmt.Sprintf("path/2015-03-31/functions/%s/invocations", functionArn), - }.String() -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_layer_version.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_layer_version.go deleted file mode 100644 index f0f89d710..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_layer_version.go +++ /dev/null @@ -1,261 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "strconv" - "strings" - - "github.com/aws/aws-sdk-go/aws" - arn2 "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/lambda" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -const awsMutexLambdaLayerKey = `aws_lambda_layer_version` - -func resourceAwsLambdaLayerVersion() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLambdaLayerVersionPublish, - Read: resourceAwsLambdaLayerVersionRead, - Delete: resourceAwsLambdaLayerVersionDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "layer_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "filename": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"s3_bucket", "s3_key", "s3_object_version"}, - }, - "s3_bucket": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"filename"}, - }, - "s3_key": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"filename"}, - }, - "s3_object_version": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"filename"}, - }, - "compatible_runtimes": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - MinItems: 0, - MaxItems: 5, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice(validLambdaRuntimes, false), - }, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "license_info": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 512), - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "layer_arn": { - Type: schema.TypeString, - Computed: true, - }, - "created_date": { - Type: schema.TypeString, - Computed: true, - }, - "source_code_hash": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - "source_code_size": { - Type: schema.TypeInt, - Computed: true, - }, - "version": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsLambdaLayerVersionPublish(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - layerName := d.Get("layer_name").(string) - filename, hasFilename := d.GetOk("filename") - s3Bucket, bucketOk := d.GetOk("s3_bucket") - s3Key, keyOk := d.GetOk("s3_key") - s3ObjectVersion, versionOk := d.GetOk("s3_object_version") - - if !hasFilename && !bucketOk && !keyOk && !versionOk { - return errors.New("filename or s3_* attributes must be set") - } - - var layerContent *lambda.LayerVersionContentInput - if hasFilename { - awsMutexKV.Lock(awsMutexLambdaLayerKey) - defer awsMutexKV.Unlock(awsMutexLambdaLayerKey) - file, err := loadFileContent(filename.(string)) - if err != nil { - return fmt.Errorf("Unable to load %q: %s", filename.(string), err) - } - layerContent = &lambda.LayerVersionContentInput{ - ZipFile: file, - } - } else { - if !bucketOk || !keyOk { - return errors.New("s3_bucket and s3_key must all be set while using s3 code source") - } - layerContent = &lambda.LayerVersionContentInput{ - S3Bucket: aws.String(s3Bucket.(string)), - S3Key: aws.String(s3Key.(string)), - } - if versionOk { - layerContent.S3ObjectVersion = aws.String(s3ObjectVersion.(string)) - } - } - - params := &lambda.PublishLayerVersionInput{ - Content: layerContent, - Description: aws.String(d.Get("description").(string)), - LayerName: aws.String(layerName), - LicenseInfo: aws.String(d.Get("license_info").(string)), - } - - if v, ok := d.GetOk("compatible_runtimes"); ok && v.(*schema.Set).Len() > 0 { - params.CompatibleRuntimes = expandStringList(v.(*schema.Set).List()) - } - - log.Printf("[DEBUG] Publishing Lambda layer: %s", params) - result, err := conn.PublishLayerVersion(params) - if err != nil { - return fmt.Errorf("Error creating lambda layer: %s", err) - } - - d.SetId(aws.StringValue(result.LayerVersionArn)) - return resourceAwsLambdaLayerVersionRead(d, meta) -} - -func resourceAwsLambdaLayerVersionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - layerName, version, err := resourceAwsLambdaLayerVersionParseId(d.Id()) - if err != nil { - return fmt.Errorf("Error parsing lambda layer ID: %s", err) - } - - layerVersion, err := conn.GetLayerVersion(&lambda.GetLayerVersionInput{ - LayerName: aws.String(layerName), - VersionNumber: aws.Int64(version), - }) - - if isAWSErr(err, lambda.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Lambda Layer Version (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading Lambda Layer version (%s): %s", d.Id(), err) - } - - if err := d.Set("layer_name", layerName); err != nil { - return fmt.Errorf("Error setting lambda layer name: %s", err) - } - if err := d.Set("version", strconv.FormatInt(version, 10)); err != nil { - return fmt.Errorf("Error setting lambda layer version: %s", err) - } - if err := d.Set("arn", layerVersion.LayerArn); err != nil { - return fmt.Errorf("Error setting lambda layer arn: %s", err) - } - if err := d.Set("layer_arn", layerVersion.LayerVersionArn); err != nil { - return fmt.Errorf("Error setting lambda layer qualified arn: %s", err) - } - if err := d.Set("description", layerVersion.Description); err != nil { - return fmt.Errorf("Error setting lambda layer description: %s", err) - } - if err := d.Set("license_info", layerVersion.LicenseInfo); err != nil { - return fmt.Errorf("Error setting lambda layer license info: %s", err) - } - if err := d.Set("created_date", layerVersion.CreatedDate); err != nil { - return fmt.Errorf("Error setting lambda layer created date: %s", err) - } - if err := d.Set("source_code_hash", layerVersion.Content.CodeSha256); err != nil { - return fmt.Errorf("Error setting lambda layer source code hash: %s", err) - } - if err := d.Set("source_code_size", layerVersion.Content.CodeSize); err != nil { - return fmt.Errorf("Error setting lambda layer source code size: %s", err) - } - if err := d.Set("compatible_runtimes", flattenStringList(layerVersion.CompatibleRuntimes)); err != nil { - return fmt.Errorf("Error setting lambda layer compatible runtimes: %s", err) - } - - return nil -} - -func resourceAwsLambdaLayerVersionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - version, err := strconv.ParseInt(d.Get("version").(string), 10, 64) - if err != nil { - return fmt.Errorf("Error parsing lambda layer version: %s", err) - } - - _, err = conn.DeleteLayerVersion(&lambda.DeleteLayerVersionInput{ - LayerName: aws.String(d.Get("layer_name").(string)), - VersionNumber: aws.Int64(version), - }) - if err != nil { - return fmt.Errorf("error deleting Lambda Layer Version (%s): %s", d.Id(), err) - } - - log.Printf("[DEBUG] Lambda layer %q deleted", d.Get("arn").(string)) - return nil -} - -func resourceAwsLambdaLayerVersionParseId(id string) (layerName string, version int64, err error) { - arn, err := arn2.Parse(id) - if err != nil { - return - } - parts := strings.Split(arn.Resource, ":") - if len(parts) != 3 || parts[0] != "layer" { - err = fmt.Errorf("lambda_layer ID must be a valid Layer ARN") - return - } - - layerName = parts[1] - version, err = strconv.ParseInt(parts[2], 10, 64) - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go deleted file mode 100644 index 1382612d9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go +++ /dev/null @@ -1,416 +0,0 @@ -package aws - -import ( - "encoding/json" - "fmt" - "log" - "regexp" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/lambda" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -var LambdaFunctionRegexp = `^(arn:[\w-]+:lambda:)?([a-z]{2}-(?:[a-z]+-){1,2}\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?$` - -func resourceAwsLambdaPermission() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLambdaPermissionCreate, - Read: resourceAwsLambdaPermissionRead, - Delete: resourceAwsLambdaPermissionDelete, - - Schema: map[string]*schema.Schema{ - "action": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateLambdaPermissionAction, - }, - "event_source_token": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateLambdaPermissionEventSourceToken, - }, - "function_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateLambdaFunctionName, - }, - "principal": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "qualifier": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateLambdaQualifier, - }, - "source_account": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateAwsAccountId, - }, - "source_arn": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "statement_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"statement_id_prefix"}, - ValidateFunc: validatePolicyStatementId, - }, - "statement_id_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"statement_id"}, - ValidateFunc: validatePolicyStatementId, - }, - }, - } -} - -func resourceAwsLambdaPermissionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - functionName := d.Get("function_name").(string) - - var statementId string - if v, ok := d.GetOk("statement_id"); ok { - statementId = v.(string) - } else if v, ok := d.GetOk("statement_id_prefix"); ok { - statementId = resource.PrefixedUniqueId(v.(string)) - } else { - statementId = resource.UniqueId() - } - - // There is a bug in the API (reported and acknowledged by AWS) - // which causes some permissions to be ignored when API calls are sent in parallel - // We work around this bug via mutex - awsMutexKV.Lock(functionName) - defer awsMutexKV.Unlock(functionName) - - input := lambda.AddPermissionInput{ - Action: aws.String(d.Get("action").(string)), - FunctionName: aws.String(functionName), - Principal: aws.String(d.Get("principal").(string)), - StatementId: aws.String(statementId), - } - - if v, ok := d.GetOk("event_source_token"); ok { - input.EventSourceToken = aws.String(v.(string)) - } - if v, ok := d.GetOk("qualifier"); ok { - input.Qualifier = aws.String(v.(string)) - } - if v, ok := d.GetOk("source_account"); ok { - input.SourceAccount = aws.String(v.(string)) - } - if v, ok := d.GetOk("source_arn"); ok { - input.SourceArn = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Adding new Lambda permission: %s", input) - var out *lambda.AddPermissionOutput - // Retry for IAM and Lambda eventual consistency - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - out, err = conn.AddPermission(&input) - - if isAWSErr(err, lambda.ErrCodeResourceConflictException, "") { - return resource.RetryableError(err) - } - - if isAWSErr(err, lambda.ErrCodeResourceNotFoundException, "") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - - if err != nil { - return fmt.Errorf("Error adding new Lambda Permission for %s: %s", functionName, err) - } - - if out != nil && out.Statement != nil { - log.Printf("[DEBUG] Created new Lambda permission: %s", *out.Statement) - } else { - log.Printf("[DEBUG] Created new Lambda permission, but no Statement was included") - } - - d.SetId(statementId) - - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - // IAM is eventually consistent :/ - err := resourceAwsLambdaPermissionRead(d, meta) - if err != nil { - if strings.HasPrefix(err.Error(), "Error reading Lambda policy: ResourceNotFoundException") { - return resource.RetryableError( - fmt.Errorf("Error reading newly created Lambda Permission for %s, retrying: %s", - *input.FunctionName, err)) - } - if strings.HasPrefix(err.Error(), "Failed to find statement \""+d.Id()) { - return resource.RetryableError( - fmt.Errorf("Error reading newly created Lambda Permission statement for %s, retrying: %s", - *input.FunctionName, err)) - } - - log.Printf("[ERROR] An actual error occurred when expecting Lambda policy to be there: %s", err) - return resource.NonRetryableError(err) - } - return nil - }) - - return err -} - -func resourceAwsLambdaPermissionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - input := lambda.GetPolicyInput{ - FunctionName: aws.String(d.Get("function_name").(string)), - } - if v, ok := d.GetOk("qualifier"); ok { - input.Qualifier = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Looking for Lambda permission: %s", input) - var out *lambda.GetPolicyOutput - var statement *LambdaPolicyStatement - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - // IAM is eventually consistent :/ - var err error - out, err = conn.GetPolicy(&input) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "ResourceNotFoundException" { - return resource.RetryableError(err) - } - } - return resource.NonRetryableError(err) - } - - policyInBytes := []byte(*out.Policy) - policy := LambdaPolicy{} - err = json.Unmarshal(policyInBytes, &policy) - if err != nil { - return resource.NonRetryableError(err) - } - - statement, err = findLambdaPolicyStatementById(&policy, d.Id()) - return resource.RetryableError(err) - }) - - if err != nil { - // Missing whole policy or Lambda function (API error) - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "ResourceNotFoundException" { - log.Printf("[WARN] No Lambda Permission Policy found: %v", input) - d.SetId("") - return nil - } - } - - // Missing permission inside valid policy - if nfErr, ok := err.(*resource.NotFoundError); ok { - log.Printf("[WARN] %s", nfErr) - d.SetId("") - return nil - } - - return err - } - - qualifier, err := getQualifierFromLambdaAliasOrVersionArn(statement.Resource) - if err != nil { - log.Printf("[ERR] Error getting Lambda Qualifier: %s", err) - } - d.Set("qualifier", qualifier) - - // Save Lambda function name in the same format - if strings.HasPrefix(d.Get("function_name").(string), "arn:"+meta.(*AWSClient).partition+":lambda:") { - // Strip qualifier off - trimmedArn := strings.TrimSuffix(statement.Resource, ":"+qualifier) - d.Set("function_name", trimmedArn) - } else { - functionName, err := getFunctionNameFromLambdaArn(statement.Resource) - if err != nil { - return err - } - d.Set("function_name", functionName) - } - - d.Set("action", statement.Action) - // Check if the principal is a cross-account IAM role - if _, ok := statement.Principal["AWS"]; ok { - d.Set("principal", statement.Principal["AWS"]) - } else { - d.Set("principal", statement.Principal["Service"]) - } - - if stringEquals, ok := statement.Condition["StringEquals"]; ok { - d.Set("source_account", stringEquals["AWS:SourceAccount"]) - d.Set("event_source_token", stringEquals["lambda:EventSourceToken"]) - } - - if arnLike, ok := statement.Condition["ArnLike"]; ok { - d.Set("source_arn", arnLike["AWS:SourceArn"]) - } - - d.Set("statement_id", statement.Sid) - - return nil -} - -func resourceAwsLambdaPermissionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lambdaconn - - functionName := d.Get("function_name").(string) - - // There is a bug in the API (reported and acknowledged by AWS) - // which causes some permissions to be ignored when API calls are sent in parallel - // We work around this bug via mutex - awsMutexKV.Lock(functionName) - defer awsMutexKV.Unlock(functionName) - - input := lambda.RemovePermissionInput{ - FunctionName: aws.String(functionName), - StatementId: aws.String(d.Id()), - } - - if v, ok := d.GetOk("qualifier"); ok { - input.Qualifier = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Removing Lambda permission: %s", input) - _, err := conn.RemovePermission(&input) - if err != nil { - // Missing whole policy or Lambda function (API error) - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "ResourceNotFoundException" { - log.Printf("[WARN] No Lambda Permission Policy found: %v", input) - return nil - } - } - return err - } - - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Checking if Lambda permission %q is deleted", d.Id()) - - params := &lambda.GetPolicyInput{ - FunctionName: aws.String(d.Get("function_name").(string)), - } - if v, ok := d.GetOk("qualifier"); ok { - params.Qualifier = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Looking for Lambda permission: %s", *params) - resp, err := conn.GetPolicy(params) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "ResourceNotFoundException" { - return nil - } - } - return resource.NonRetryableError(err) - } - - if resp.Policy == nil { - return nil - } - - policyInBytes := []byte(*resp.Policy) - policy := LambdaPolicy{} - err = json.Unmarshal(policyInBytes, &policy) - if err != nil { - return resource.RetryableError( - fmt.Errorf("Error unmarshalling Lambda policy: %s", err)) - } - - _, err = findLambdaPolicyStatementById(&policy, d.Id()) - if err != nil { - return nil - } - - log.Printf("[DEBUG] No error when checking if Lambda permission %s is deleted", d.Id()) - return nil - }) - - if err != nil { - return fmt.Errorf("Failed removing Lambda permission: %s", err) - } - - log.Printf("[DEBUG] Lambda permission with ID %q removed", d.Id()) - - return nil -} - -func findLambdaPolicyStatementById(policy *LambdaPolicy, id string) ( - *LambdaPolicyStatement, error) { - - log.Printf("[DEBUG] Received %d statements in Lambda policy: %s", len(policy.Statement), policy.Statement) - for _, statement := range policy.Statement { - if statement.Sid == id { - return &statement, nil - } - } - - return nil, &resource.NotFoundError{ - LastRequest: id, - LastResponse: policy, - Message: fmt.Sprintf("Failed to find statement %q in Lambda policy:\n%s", id, policy.Statement), - } -} - -func getQualifierFromLambdaAliasOrVersionArn(arn string) (string, error) { - matches := regexp.MustCompile(LambdaFunctionRegexp).FindStringSubmatch(arn) - if len(matches) < 8 || matches[7] == "" { - return "", fmt.Errorf("Invalid ARN or otherwise unable to get qualifier from ARN (%q)", - arn) - } - - return matches[7], nil -} - -func getFunctionNameFromLambdaArn(arn string) (string, error) { - matches := regexp.MustCompile(LambdaFunctionRegexp).FindStringSubmatch(arn) - if len(matches) < 6 || matches[5] == "" { - return "", fmt.Errorf("Invalid ARN or otherwise unable to get qualifier from ARN (%q)", - arn) - } - return matches[5], nil -} - -type LambdaPolicy struct { - Version string - Statement []LambdaPolicyStatement - Id string -} - -type LambdaPolicyStatement struct { - Condition map[string]map[string]string - Action string - Resource string - Effect string - Principal map[string]string - Sid string -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_configuration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_configuration.go deleted file mode 100644 index 7417d8f34..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_configuration.go +++ /dev/null @@ -1,686 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsLaunchConfiguration() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLaunchConfigurationCreate, - Read: resourceAwsLaunchConfigurationRead, - Delete: resourceAwsLaunchConfigurationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validation.StringLenBetween(1, 255), - }, - - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validation.StringLenBetween(1, 255-resource.UniqueIDSuffixLength), - }, - - "image_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "instance_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "iam_instance_profile": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "key_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "user_data": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"user_data_base64"}, - StateFunc: func(v interface{}) string { - switch v.(type) { - case string: - return userDataHashSum(v.(string)) - default: - return "" - } - }, - ValidateFunc: validation.StringLenBetween(1, 16384), - }, - - "user_data_base64": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"user_data"}, - ValidateFunc: func(v interface{}, name string) (warns []string, errs []error) { - s := v.(string) - if !isBase64Encoded([]byte(s)) { - errs = append(errs, fmt.Errorf( - "%s: must be base64-encoded", name, - )) - } - return - }, - }, - - "security_groups": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "vpc_classic_link_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "vpc_classic_link_security_groups": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "associate_public_ip_address": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Default: false, - }, - - "spot_price": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "ebs_optimized": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "placement_tenancy": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "enable_monitoring": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Default: true, - }, - - "ebs_block_device": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Optional: true, - Default: true, - ForceNew: true, - }, - - "device_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "no_device": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - - "iops": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "snapshot_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "volume_size": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "volume_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "encrypted": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - ForceNew: true, - }, - }, - }, - }, - - "ephemeral_block_device": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "device_name": { - Type: schema.TypeString, - Required: true, - }, - - "virtual_name": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["device_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["virtual_name"].(string))) - return hashcode.String(buf.String()) - }, - }, - - "root_block_device": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - // "You can only modify the volume size, volume type, and Delete on - // Termination flag on the block device mapping entry for the root - // device volume." - bit.ly/ec2bdmap - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Optional: true, - Default: true, - ForceNew: true, - }, - - "iops": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "volume_size": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "volume_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsLaunchConfigurationCreate(d *schema.ResourceData, meta interface{}) error { - autoscalingconn := meta.(*AWSClient).autoscalingconn - ec2conn := meta.(*AWSClient).ec2conn - - createLaunchConfigurationOpts := autoscaling.CreateLaunchConfigurationInput{ - LaunchConfigurationName: aws.String(d.Get("name").(string)), - ImageId: aws.String(d.Get("image_id").(string)), - InstanceType: aws.String(d.Get("instance_type").(string)), - EbsOptimized: aws.Bool(d.Get("ebs_optimized").(bool)), - } - - if v, ok := d.GetOk("user_data"); ok { - userData := base64Encode([]byte(v.(string))) - createLaunchConfigurationOpts.UserData = aws.String(userData) - } else if v, ok := d.GetOk("user_data_base64"); ok { - createLaunchConfigurationOpts.UserData = aws.String(v.(string)) - } - - createLaunchConfigurationOpts.InstanceMonitoring = &autoscaling.InstanceMonitoring{ - Enabled: aws.Bool(d.Get("enable_monitoring").(bool)), - } - - if v, ok := d.GetOk("iam_instance_profile"); ok { - createLaunchConfigurationOpts.IamInstanceProfile = aws.String(v.(string)) - } - - if v, ok := d.GetOk("placement_tenancy"); ok { - createLaunchConfigurationOpts.PlacementTenancy = aws.String(v.(string)) - } - - if v, ok := d.GetOk("associate_public_ip_address"); ok { - createLaunchConfigurationOpts.AssociatePublicIpAddress = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("key_name"); ok { - createLaunchConfigurationOpts.KeyName = aws.String(v.(string)) - } - if v, ok := d.GetOk("spot_price"); ok { - createLaunchConfigurationOpts.SpotPrice = aws.String(v.(string)) - } - - if v, ok := d.GetOk("security_groups"); ok { - createLaunchConfigurationOpts.SecurityGroups = expandStringList( - v.(*schema.Set).List(), - ) - } - - if v, ok := d.GetOk("vpc_classic_link_id"); ok { - createLaunchConfigurationOpts.ClassicLinkVPCId = aws.String(v.(string)) - } - - if v, ok := d.GetOk("vpc_classic_link_security_groups"); ok { - createLaunchConfigurationOpts.ClassicLinkVPCSecurityGroups = expandStringList( - v.(*schema.Set).List(), - ) - } - - var blockDevices []*autoscaling.BlockDeviceMapping - - // We'll use this to detect if we're declaring it incorrectly as an ebs_block_device. - rootDeviceName, err := fetchRootDeviceName(d.Get("image_id").(string), ec2conn) - if err != nil { - return err - } - if rootDeviceName == nil { - // We do this so the value is empty so we don't have to do nil checks later - var blank string - rootDeviceName = &blank - } - - if v, ok := d.GetOk("ebs_block_device"); ok { - vL := v.(*schema.Set).List() - for _, v := range vL { - bd := v.(map[string]interface{}) - ebs := &autoscaling.Ebs{} - - var noDevice *bool - if v, ok := bd["no_device"].(bool); ok && v { - noDevice = aws.Bool(v) - } else { - ebs.DeleteOnTermination = aws.Bool(bd["delete_on_termination"].(bool)) - } - - if v, ok := bd["snapshot_id"].(string); ok && v != "" { - ebs.SnapshotId = aws.String(v) - } - - if v, ok := bd["encrypted"].(bool); ok && v { - ebs.Encrypted = aws.Bool(v) - } - - if v, ok := bd["volume_size"].(int); ok && v != 0 { - ebs.VolumeSize = aws.Int64(int64(v)) - } - - if v, ok := bd["volume_type"].(string); ok && v != "" { - ebs.VolumeType = aws.String(v) - } - - if v, ok := bd["iops"].(int); ok && v > 0 { - ebs.Iops = aws.Int64(int64(v)) - } - - if *aws.String(bd["device_name"].(string)) == *rootDeviceName { - return fmt.Errorf("Root device (%s) declared as an 'ebs_block_device'. Use 'root_block_device' keyword.", *rootDeviceName) - } - - blockDevices = append(blockDevices, &autoscaling.BlockDeviceMapping{ - DeviceName: aws.String(bd["device_name"].(string)), - Ebs: ebs, - NoDevice: noDevice, - }) - } - } - - if v, ok := d.GetOk("ephemeral_block_device"); ok { - vL := v.(*schema.Set).List() - for _, v := range vL { - bd := v.(map[string]interface{}) - blockDevices = append(blockDevices, &autoscaling.BlockDeviceMapping{ - DeviceName: aws.String(bd["device_name"].(string)), - VirtualName: aws.String(bd["virtual_name"].(string)), - }) - } - } - - if v, ok := d.GetOk("root_block_device"); ok { - vL := v.([]interface{}) - for _, v := range vL { - bd := v.(map[string]interface{}) - ebs := &autoscaling.Ebs{ - DeleteOnTermination: aws.Bool(bd["delete_on_termination"].(bool)), - } - - if v, ok := bd["volume_size"].(int); ok && v != 0 { - ebs.VolumeSize = aws.Int64(int64(v)) - } - - if v, ok := bd["volume_type"].(string); ok && v != "" { - ebs.VolumeType = aws.String(v) - } - - if v, ok := bd["iops"].(int); ok && v > 0 { - ebs.Iops = aws.Int64(int64(v)) - } - - if dn, err := fetchRootDeviceName(d.Get("image_id").(string), ec2conn); err == nil { - if dn == nil { - return fmt.Errorf( - "Expected to find a Root Device name for AMI (%s), but got none", - d.Get("image_id").(string)) - } - blockDevices = append(blockDevices, &autoscaling.BlockDeviceMapping{ - DeviceName: dn, - Ebs: ebs, - }) - } else { - return err - } - } - } - - if len(blockDevices) > 0 { - createLaunchConfigurationOpts.BlockDeviceMappings = blockDevices - } - - var lcName string - if v, ok := d.GetOk("name"); ok { - lcName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - lcName = resource.PrefixedUniqueId(v.(string)) - } else { - lcName = resource.UniqueId() - } - createLaunchConfigurationOpts.LaunchConfigurationName = aws.String(lcName) - - log.Printf("[DEBUG] autoscaling create launch configuration: %s", createLaunchConfigurationOpts) - - // IAM profiles can take ~10 seconds to propagate in AWS: - // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console - err = resource.Retry(90*time.Second, func() *resource.RetryError { - _, err := autoscalingconn.CreateLaunchConfiguration(&createLaunchConfigurationOpts) - if err != nil { - if isAWSErr(err, "ValidationError", "Invalid IamInstanceProfile") { - return resource.RetryableError(err) - } - if isAWSErr(err, "ValidationError", "You are not authorized to perform this operation") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error creating launch configuration: %s", err) - } - - d.SetId(lcName) - log.Printf("[INFO] launch configuration ID: %s", d.Id()) - - // We put a Retry here since sometimes eventual consistency bites - // us and we need to retry a few times to get the LC to load properly - return resource.Retry(30*time.Second, func() *resource.RetryError { - err := resourceAwsLaunchConfigurationRead(d, meta) - if err != nil { - return resource.RetryableError(err) - } - return nil - }) -} - -func resourceAwsLaunchConfigurationRead(d *schema.ResourceData, meta interface{}) error { - autoscalingconn := meta.(*AWSClient).autoscalingconn - ec2conn := meta.(*AWSClient).ec2conn - - describeOpts := autoscaling.DescribeLaunchConfigurationsInput{ - LaunchConfigurationNames: []*string{aws.String(d.Id())}, - } - - log.Printf("[DEBUG] launch configuration describe configuration: %s", describeOpts) - describConfs, err := autoscalingconn.DescribeLaunchConfigurations(&describeOpts) - if err != nil { - return fmt.Errorf("Error retrieving launch configuration: %s", err) - } - if len(describConfs.LaunchConfigurations) == 0 { - log.Printf("[WARN] Launch Configuration (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - // Verify AWS returned our launch configuration - if *describConfs.LaunchConfigurations[0].LaunchConfigurationName != d.Id() { - return fmt.Errorf( - "Unable to find launch configuration: %#v", - describConfs.LaunchConfigurations) - } - - lc := describConfs.LaunchConfigurations[0] - log.Printf("[DEBUG] launch configuration output: %s", lc) - - d.Set("key_name", lc.KeyName) - d.Set("image_id", lc.ImageId) - d.Set("instance_type", lc.InstanceType) - d.Set("name", lc.LaunchConfigurationName) - - d.Set("iam_instance_profile", lc.IamInstanceProfile) - d.Set("ebs_optimized", lc.EbsOptimized) - d.Set("spot_price", lc.SpotPrice) - d.Set("enable_monitoring", lc.InstanceMonitoring.Enabled) - d.Set("associate_public_ip_address", lc.AssociatePublicIpAddress) - if err := d.Set("security_groups", flattenStringList(lc.SecurityGroups)); err != nil { - return fmt.Errorf("error setting security_groups: %s", err) - } - if v := aws.StringValue(lc.UserData); v != "" { - _, b64 := d.GetOk("user_data_base64") - if b64 { - d.Set("user_data_base64", v) - } else { - d.Set("user_data", userDataHashSum(v)) - } - } - - d.Set("vpc_classic_link_id", lc.ClassicLinkVPCId) - if err := d.Set("vpc_classic_link_security_groups", flattenStringList(lc.ClassicLinkVPCSecurityGroups)); err != nil { - return fmt.Errorf("error setting vpc_classic_link_security_groups: %s", err) - } - - if err := readLCBlockDevices(d, lc, ec2conn); err != nil { - return err - } - - return nil -} - -func resourceAwsLaunchConfigurationDelete(d *schema.ResourceData, meta interface{}) error { - autoscalingconn := meta.(*AWSClient).autoscalingconn - - log.Printf("[DEBUG] Launch Configuration destroy: %v", d.Id()) - _, err := autoscalingconn.DeleteLaunchConfiguration( - &autoscaling.DeleteLaunchConfigurationInput{ - LaunchConfigurationName: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, "InvalidConfiguration.NotFound", "") { - log.Printf("[DEBUG] Launch configuration (%s) not found", d.Id()) - return nil - } - - return err - } - - return nil -} - -func readLCBlockDevices(d *schema.ResourceData, lc *autoscaling.LaunchConfiguration, ec2conn *ec2.EC2) error { - ibds, err := readBlockDevicesFromLaunchConfiguration(d, lc, ec2conn) - if err != nil { - return err - } - - if err := d.Set("ebs_block_device", ibds["ebs"]); err != nil { - return err - } - if err := d.Set("ephemeral_block_device", ibds["ephemeral"]); err != nil { - return err - } - if ibds["root"] != nil { - if err := d.Set("root_block_device", []interface{}{ibds["root"]}); err != nil { - return err - } - } else { - d.Set("root_block_device", []interface{}{}) - } - - return nil -} - -func readBlockDevicesFromLaunchConfiguration(d *schema.ResourceData, lc *autoscaling.LaunchConfiguration, ec2conn *ec2.EC2) ( - map[string]interface{}, error) { - blockDevices := make(map[string]interface{}) - blockDevices["ebs"] = make([]map[string]interface{}, 0) - blockDevices["ephemeral"] = make([]map[string]interface{}, 0) - blockDevices["root"] = nil - if len(lc.BlockDeviceMappings) == 0 { - return nil, nil - } - rootDeviceName, err := fetchRootDeviceName(d.Get("image_id").(string), ec2conn) - if err != nil { - return nil, err - } - if rootDeviceName == nil { - // We do this so the value is empty so we don't have to do nil checks later - var blank string - rootDeviceName = &blank - } - - // Collect existing configured devices, so we can check - // existing value of delete_on_termination below - existingEbsBlockDevices := make(map[string]map[string]interface{}) - if v, ok := d.GetOk("ebs_block_device"); ok { - ebsBlocks := v.(*schema.Set) - for _, ebd := range ebsBlocks.List() { - m := ebd.(map[string]interface{}) - deviceName := m["device_name"].(string) - existingEbsBlockDevices[deviceName] = m - } - } - - for _, bdm := range lc.BlockDeviceMappings { - bd := make(map[string]interface{}) - - if bdm.NoDevice != nil { - // Keep existing value in place to avoid spurious diff - deleteOnTermination := true - if device, ok := existingEbsBlockDevices[*bdm.DeviceName]; ok { - deleteOnTermination = device["delete_on_termination"].(bool) - } - bd["delete_on_termination"] = deleteOnTermination - } else if bdm.Ebs != nil && bdm.Ebs.DeleteOnTermination != nil { - bd["delete_on_termination"] = *bdm.Ebs.DeleteOnTermination - } - - if bdm.Ebs != nil && bdm.Ebs.VolumeSize != nil { - bd["volume_size"] = *bdm.Ebs.VolumeSize - } - if bdm.Ebs != nil && bdm.Ebs.VolumeType != nil { - bd["volume_type"] = *bdm.Ebs.VolumeType - } - if bdm.Ebs != nil && bdm.Ebs.Iops != nil { - bd["iops"] = *bdm.Ebs.Iops - } - - if bdm.DeviceName != nil && *bdm.DeviceName == *rootDeviceName { - blockDevices["root"] = bd - } else { - if bdm.Ebs != nil && bdm.Ebs.Encrypted != nil { - bd["encrypted"] = *bdm.Ebs.Encrypted - } - if bdm.DeviceName != nil { - bd["device_name"] = *bdm.DeviceName - } - if bdm.VirtualName != nil { - bd["virtual_name"] = *bdm.VirtualName - blockDevices["ephemeral"] = append(blockDevices["ephemeral"].([]map[string]interface{}), bd) - } else { - if bdm.Ebs != nil && bdm.Ebs.SnapshotId != nil { - bd["snapshot_id"] = *bdm.Ebs.SnapshotId - } - if bdm.NoDevice != nil { - bd["no_device"] = *bdm.NoDevice - } - blockDevices["ebs"] = append(blockDevices["ebs"].([]map[string]interface{}), bd) - } - } - } - return blockDevices, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go deleted file mode 100644 index 3dd76480a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go +++ /dev/null @@ -1,1420 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/customdiff" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsLaunchTemplate() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLaunchTemplateCreate, - Read: resourceAwsLaunchTemplateRead, - Update: resourceAwsLaunchTemplateUpdate, - Delete: resourceAwsLaunchTemplateDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateLaunchTemplateName, - }, - - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateLaunchTemplateName, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 255), - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "default_version": { - Type: schema.TypeInt, - Computed: true, - }, - - "latest_version": { - Type: schema.TypeInt, - Computed: true, - }, - - "block_device_mappings": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "device_name": { - Type: schema.TypeString, - Optional: true, - }, - "no_device": { - Type: schema.TypeString, - Optional: true, - }, - "virtual_name": { - Type: schema.TypeString, - Optional: true, - }, - "ebs": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - // Use TypeString to allow an "unspecified" value, - // since TypeBool only has true/false with false default. - // The conversion from bare true/false values in - // configurations to TypeString value is currently safe. - Type: schema.TypeString, - Optional: true, - DiffSuppressFunc: suppressEquivalentTypeStringBoolean, - ValidateFunc: validateTypeStringNullableBoolean, - }, - "encrypted": { - // Use TypeString to allow an "unspecified" value, - // since TypeBool only has true/false with false default. - // The conversion from bare true/false values in - // configurations to TypeString value is currently safe. - Type: schema.TypeString, - Optional: true, - DiffSuppressFunc: suppressEquivalentTypeStringBoolean, - ValidateFunc: validateTypeStringNullableBoolean, - }, - "iops": { - Type: schema.TypeInt, - Computed: true, - Optional: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "snapshot_id": { - Type: schema.TypeString, - Optional: true, - }, - "volume_size": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - "volume_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - }, - }, - }, - }, - }, - - "capacity_reservation_specification": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "capacity_reservation_preference": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - ec2.CapacityReservationPreferenceOpen, - ec2.CapacityReservationPreferenceNone, - }, false), - }, - "capacity_reservation_target": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "capacity_reservation_id": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - }, - }, - }, - - "credit_specification": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cpu_credits": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "disable_api_termination": { - Type: schema.TypeBool, - Optional: true, - }, - - "ebs_optimized": { - // Use TypeString to allow an "unspecified" value, - // since TypeBool only has true/false with false default. - // The conversion from bare true/false values in - // configurations to TypeString value is currently safe. - Type: schema.TypeString, - Optional: true, - DiffSuppressFunc: suppressEquivalentTypeStringBoolean, - ValidateFunc: validateTypeStringNullableBoolean, - }, - - "elastic_gpu_specifications": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - - "iam_instance_profile": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"iam_instance_profile.0.name"}, - ValidateFunc: validateArn, - }, - "name": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "image_id": { - Type: schema.TypeString, - Optional: true, - }, - - "instance_initiated_shutdown_behavior": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - ec2.ShutdownBehaviorStop, - ec2.ShutdownBehaviorTerminate, - }, false), - }, - - "instance_market_options": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "market_type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ec2.MarketTypeSpot}, false), - }, - "spot_options": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "block_duration_minutes": { - Type: schema.TypeInt, - Optional: true, - }, - "instance_interruption_behavior": { - Type: schema.TypeString, - Optional: true, - }, - "max_price": { - Type: schema.TypeString, - Optional: true, - }, - "spot_instance_type": { - Type: schema.TypeString, - Optional: true, - }, - "valid_until": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.ValidateRFC3339TimeString, - }, - }, - }, - }, - }, - }, - }, - - "instance_type": { - Type: schema.TypeString, - Optional: true, - }, - - "kernel_id": { - Type: schema.TypeString, - Optional: true, - }, - - "key_name": { - Type: schema.TypeString, - Optional: true, - }, - - "license_specification": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "license_configuration_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - - "monitoring": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Optional: true, - }, - }, - }, - }, - - "network_interfaces": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "associate_public_ip_address": { - Type: schema.TypeBool, - Optional: true, - }, - "delete_on_termination": { - Type: schema.TypeBool, - Optional: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "device_index": { - Type: schema.TypeInt, - Optional: true, - }, - "security_groups": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "ipv6_address_count": { - Type: schema.TypeInt, - Optional: true, - }, - "ipv6_addresses": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "network_interface_id": { - Type: schema.TypeString, - Optional: true, - }, - "private_ip_address": { - Type: schema.TypeString, - Optional: true, - }, - "ipv4_addresses": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "ipv4_address_count": { - Type: schema.TypeInt, - Optional: true, - }, - "subnet_id": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "placement": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "affinity": { - Type: schema.TypeString, - Optional: true, - }, - "availability_zone": { - Type: schema.TypeString, - Optional: true, - }, - "group_name": { - Type: schema.TypeString, - Optional: true, - }, - "host_id": { - Type: schema.TypeString, - Optional: true, - }, - "spread_domain": { - Type: schema.TypeString, - Optional: true, - }, - "tenancy": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - ec2.TenancyDedicated, - ec2.TenancyDefault, - ec2.TenancyHost, - }, false), - }, - }, - }, - }, - - "ram_disk_id": { - Type: schema.TypeString, - Optional: true, - }, - - "security_group_names": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - ConflictsWith: []string{"vpc_security_group_ids"}, - }, - - "vpc_security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - ConflictsWith: []string{"security_group_names"}, - }, - - "tag_specifications": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "resource_type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - "instance", - "volume", - }, false), - }, - "tags": tagsSchema(), - }, - }, - }, - - "user_data": { - Type: schema.TypeString, - Optional: true, - }, - - "tags": tagsSchema(), - }, - - CustomizeDiff: customdiff.Sequence( - customdiff.ComputedIf("latest_version", func(diff *schema.ResourceDiff, meta interface{}) bool { - for _, changedKey := range diff.GetChangedKeysPrefix("") { - switch changedKey { - case "name", "name_prefix", "description", "default_version", "latest_version": - continue - default: - return true - } - } - return false - }), - ), - } -} - -func resourceAwsLaunchTemplateCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - var ltName string - if v, ok := d.GetOk("name"); ok { - ltName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - ltName = resource.PrefixedUniqueId(v.(string)) - } else { - ltName = resource.UniqueId() - } - - launchTemplateData, err := buildLaunchTemplateData(d) - if err != nil { - return err - } - - launchTemplateOpts := &ec2.CreateLaunchTemplateInput{ - ClientToken: aws.String(resource.UniqueId()), - LaunchTemplateName: aws.String(ltName), - LaunchTemplateData: launchTemplateData, - } - - resp, err := conn.CreateLaunchTemplate(launchTemplateOpts) - if err != nil { - return err - } - - launchTemplate := resp.LaunchTemplate - d.SetId(*launchTemplate.LaunchTemplateId) - - log.Printf("[DEBUG] Launch Template created: %q (version %d)", - *launchTemplate.LaunchTemplateId, *launchTemplate.LatestVersionNumber) - - return resourceAwsLaunchTemplateUpdate(d, meta) -} - -func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[DEBUG] Reading launch template %s", d.Id()) - - dlt, err := conn.DescribeLaunchTemplates(&ec2.DescribeLaunchTemplatesInput{ - LaunchTemplateIds: []*string{aws.String(d.Id())}, - }) - - if isAWSErr(err, ec2.LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist, "") { - log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - // AWS SDK constant above is currently incorrect - if isAWSErr(err, "InvalidLaunchTemplateId.NotFound", "") { - log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("Error getting launch template: %s", err) - } - - if dlt == nil || len(dlt.LaunchTemplates) == 0 { - log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - if *dlt.LaunchTemplates[0].LaunchTemplateId != d.Id() { - return fmt.Errorf("Unable to find launch template: %#v", dlt.LaunchTemplates) - } - - log.Printf("[DEBUG] Found launch template %s", d.Id()) - - lt := dlt.LaunchTemplates[0] - d.Set("name", lt.LaunchTemplateName) - d.Set("latest_version", lt.LatestVersionNumber) - d.Set("default_version", lt.DefaultVersionNumber) - d.Set("tags", tagsToMap(lt.Tags)) - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "ec2", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("launch-template/%s", d.Id()), - }.String() - d.Set("arn", arn) - - version := strconv.Itoa(int(*lt.LatestVersionNumber)) - dltv, err := conn.DescribeLaunchTemplateVersions(&ec2.DescribeLaunchTemplateVersionsInput{ - LaunchTemplateId: aws.String(d.Id()), - Versions: []*string{aws.String(version)}, - }) - if err != nil { - return err - } - - log.Printf("[DEBUG] Received launch template version %q (version %d)", d.Id(), *lt.LatestVersionNumber) - - ltData := dltv.LaunchTemplateVersions[0].LaunchTemplateData - - d.Set("disable_api_termination", ltData.DisableApiTermination) - d.Set("image_id", ltData.ImageId) - d.Set("instance_initiated_shutdown_behavior", ltData.InstanceInitiatedShutdownBehavior) - d.Set("instance_type", ltData.InstanceType) - d.Set("kernel_id", ltData.KernelId) - d.Set("key_name", ltData.KeyName) - d.Set("ram_disk_id", ltData.RamDiskId) - d.Set("security_group_names", aws.StringValueSlice(ltData.SecurityGroups)) - d.Set("user_data", ltData.UserData) - d.Set("vpc_security_group_ids", aws.StringValueSlice(ltData.SecurityGroupIds)) - d.Set("ebs_optimized", "") - - if ltData.EbsOptimized != nil { - d.Set("ebs_optimized", strconv.FormatBool(aws.BoolValue(ltData.EbsOptimized))) - } - - if err := d.Set("block_device_mappings", getBlockDeviceMappings(ltData.BlockDeviceMappings)); err != nil { - return err - } - - if err := d.Set("capacity_reservation_specification", getCapacityReservationSpecification(ltData.CapacityReservationSpecification)); err != nil { - return err - } - - if strings.HasPrefix(aws.StringValue(ltData.InstanceType), "t2") || strings.HasPrefix(aws.StringValue(ltData.InstanceType), "t3") { - if err := d.Set("credit_specification", getCreditSpecification(ltData.CreditSpecification)); err != nil { - return err - } - } - - if err := d.Set("elastic_gpu_specifications", getElasticGpuSpecifications(ltData.ElasticGpuSpecifications)); err != nil { - return err - } - - if err := d.Set("iam_instance_profile", getIamInstanceProfile(ltData.IamInstanceProfile)); err != nil { - return err - } - - if err := d.Set("instance_market_options", getInstanceMarketOptions(ltData.InstanceMarketOptions)); err != nil { - return err - } - - if err := d.Set("license_specification", getLicenseSpecifications(ltData.LicenseSpecifications)); err != nil { - return err - } - - if err := d.Set("monitoring", getMonitoring(ltData.Monitoring)); err != nil { - return err - } - - if err := d.Set("network_interfaces", getNetworkInterfaces(ltData.NetworkInterfaces)); err != nil { - return err - } - - if err := d.Set("placement", getPlacement(ltData.Placement)); err != nil { - return err - } - - if err := d.Set("tag_specifications", getTagSpecifications(ltData.TagSpecifications)); err != nil { - return err - } - - return nil -} - -func resourceAwsLaunchTemplateUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - if !d.IsNewResource() { - launchTemplateData, err := buildLaunchTemplateData(d) - if err != nil { - return err - } - - launchTemplateVersionOpts := &ec2.CreateLaunchTemplateVersionInput{ - ClientToken: aws.String(resource.UniqueId()), - LaunchTemplateId: aws.String(d.Id()), - LaunchTemplateData: launchTemplateData, - } - - _, createErr := conn.CreateLaunchTemplateVersion(launchTemplateVersionOpts) - if createErr != nil { - return createErr - } - } - - d.Partial(true) - - if err := setTags(conn, d); err != nil { - return err - } else { - d.SetPartial("tags") - } - - d.Partial(false) - - return resourceAwsLaunchTemplateRead(d, meta) -} - -func resourceAwsLaunchTemplateDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[DEBUG] Launch Template destroy: %v", d.Id()) - _, err := conn.DeleteLaunchTemplate(&ec2.DeleteLaunchTemplateInput{ - LaunchTemplateId: aws.String(d.Id()), - }) - - if isAWSErr(err, ec2.LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist, "") { - return nil - } - // AWS SDK constant above is currently incorrect - if isAWSErr(err, "InvalidLaunchTemplateId.NotFound", "") { - return nil - } - if err != nil { - return err - } - - log.Printf("[DEBUG] Launch Template deleted: %v", d.Id()) - return nil -} - -func getBlockDeviceMappings(m []*ec2.LaunchTemplateBlockDeviceMapping) []interface{} { - s := []interface{}{} - for _, v := range m { - mapping := map[string]interface{}{ - "device_name": aws.StringValue(v.DeviceName), - "virtual_name": aws.StringValue(v.VirtualName), - } - if v.NoDevice != nil { - mapping["no_device"] = aws.StringValue(v.NoDevice) - } - if v.Ebs != nil { - ebs := map[string]interface{}{ - "volume_size": int(aws.Int64Value(v.Ebs.VolumeSize)), - "volume_type": aws.StringValue(v.Ebs.VolumeType), - } - if v.Ebs.DeleteOnTermination != nil { - ebs["delete_on_termination"] = strconv.FormatBool(aws.BoolValue(v.Ebs.DeleteOnTermination)) - } - if v.Ebs.Encrypted != nil { - ebs["encrypted"] = strconv.FormatBool(aws.BoolValue(v.Ebs.Encrypted)) - } - if v.Ebs.Iops != nil { - ebs["iops"] = aws.Int64Value(v.Ebs.Iops) - } - if v.Ebs.KmsKeyId != nil { - ebs["kms_key_id"] = aws.StringValue(v.Ebs.KmsKeyId) - } - if v.Ebs.SnapshotId != nil { - ebs["snapshot_id"] = aws.StringValue(v.Ebs.SnapshotId) - } - - mapping["ebs"] = []interface{}{ebs} - } - s = append(s, mapping) - } - return s -} - -func getCapacityReservationSpecification(crs *ec2.LaunchTemplateCapacityReservationSpecificationResponse) []interface{} { - s := []interface{}{} - if crs != nil { - s = append(s, map[string]interface{}{ - "capacity_reservation_preference": aws.StringValue(crs.CapacityReservationPreference), - "capacity_reservation_target": getCapacityReservationTarget(crs.CapacityReservationTarget), - }) - } - return s -} - -func getCapacityReservationTarget(crt *ec2.CapacityReservationTargetResponse) []interface{} { - s := []interface{}{} - if crt != nil { - s = append(s, map[string]interface{}{ - "capacity_reservation_id": aws.StringValue(crt.CapacityReservationId), - }) - } - return s -} - -func getCreditSpecification(cs *ec2.CreditSpecification) []interface{} { - s := []interface{}{} - if cs != nil { - s = append(s, map[string]interface{}{ - "cpu_credits": aws.StringValue(cs.CpuCredits), - }) - } - return s -} - -func getElasticGpuSpecifications(e []*ec2.ElasticGpuSpecificationResponse) []interface{} { - s := []interface{}{} - for _, v := range e { - s = append(s, map[string]interface{}{ - "type": aws.StringValue(v.Type), - }) - } - return s -} - -func getIamInstanceProfile(i *ec2.LaunchTemplateIamInstanceProfileSpecification) []interface{} { - s := []interface{}{} - if i != nil { - s = append(s, map[string]interface{}{ - "arn": aws.StringValue(i.Arn), - "name": aws.StringValue(i.Name), - }) - } - return s -} - -func getInstanceMarketOptions(m *ec2.LaunchTemplateInstanceMarketOptions) []interface{} { - s := []interface{}{} - if m != nil { - mo := map[string]interface{}{ - "market_type": aws.StringValue(m.MarketType), - } - so := m.SpotOptions - if so != nil { - spotOptions := map[string]interface{}{} - - if so.BlockDurationMinutes != nil { - spotOptions["block_duration_minutes"] = aws.Int64Value(so.BlockDurationMinutes) - } - - if so.InstanceInterruptionBehavior != nil { - spotOptions["instance_interruption_behavior"] = aws.StringValue(so.InstanceInterruptionBehavior) - } - - if so.MaxPrice != nil { - spotOptions["max_price"] = aws.StringValue(so.MaxPrice) - } - - if so.SpotInstanceType != nil { - spotOptions["spot_instance_type"] = aws.StringValue(so.SpotInstanceType) - } - - if so.ValidUntil != nil { - spotOptions["valid_until"] = aws.TimeValue(so.ValidUntil).Format(time.RFC3339) - } - - mo["spot_options"] = []interface{}{spotOptions} - } - s = append(s, mo) - } - return s -} - -func getLicenseSpecifications(licenseSpecifications []*ec2.LaunchTemplateLicenseConfiguration) []map[string]interface{} { - var s []map[string]interface{} - for _, v := range licenseSpecifications { - s = append(s, map[string]interface{}{ - "license_configuration_arn": aws.StringValue(v.LicenseConfigurationArn), - }) - } - return s -} - -func getMonitoring(m *ec2.LaunchTemplatesMonitoring) []interface{} { - s := []interface{}{} - if m != nil { - mo := map[string]interface{}{ - "enabled": aws.BoolValue(m.Enabled), - } - s = append(s, mo) - } - return s -} - -func getNetworkInterfaces(n []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecification) []interface{} { - s := []interface{}{} - for _, v := range n { - var ipv4Addresses []string - - networkInterface := map[string]interface{}{ - "associate_public_ip_address": aws.BoolValue(v.AssociatePublicIpAddress), - "delete_on_termination": aws.BoolValue(v.DeleteOnTermination), - "description": aws.StringValue(v.Description), - "device_index": aws.Int64Value(v.DeviceIndex), - "ipv4_address_count": aws.Int64Value(v.SecondaryPrivateIpAddressCount), - "ipv6_address_count": aws.Int64Value(v.Ipv6AddressCount), - "network_interface_id": aws.StringValue(v.NetworkInterfaceId), - "private_ip_address": aws.StringValue(v.PrivateIpAddress), - "subnet_id": aws.StringValue(v.SubnetId), - } - - if len(v.Ipv6Addresses) > 0 { - raw, ok := networkInterface["ipv6_addresses"] - if !ok { - raw = schema.NewSet(schema.HashString, nil) - } - - list := raw.(*schema.Set) - - for _, address := range v.Ipv6Addresses { - list.Add(aws.StringValue(address.Ipv6Address)) - } - - networkInterface["ipv6_addresses"] = list - } - - for _, address := range v.PrivateIpAddresses { - ipv4Addresses = append(ipv4Addresses, aws.StringValue(address.PrivateIpAddress)) - } - if len(ipv4Addresses) > 0 { - networkInterface["ipv4_addresses"] = ipv4Addresses - } - - if len(v.Groups) > 0 { - raw, ok := networkInterface["security_groups"] - if !ok { - raw = schema.NewSet(schema.HashString, nil) - } - list := raw.(*schema.Set) - - for _, group := range v.Groups { - list.Add(aws.StringValue(group)) - } - - networkInterface["security_groups"] = list - } - - s = append(s, networkInterface) - } - return s -} - -func getPlacement(p *ec2.LaunchTemplatePlacement) []interface{} { - s := []interface{}{} - if p != nil { - s = append(s, map[string]interface{}{ - "affinity": aws.StringValue(p.Affinity), - "availability_zone": aws.StringValue(p.AvailabilityZone), - "group_name": aws.StringValue(p.GroupName), - "host_id": aws.StringValue(p.HostId), - "spread_domain": aws.StringValue(p.SpreadDomain), - "tenancy": aws.StringValue(p.Tenancy), - }) - } - return s -} - -func getTagSpecifications(t []*ec2.LaunchTemplateTagSpecification) []interface{} { - s := []interface{}{} - for _, v := range t { - s = append(s, map[string]interface{}{ - "resource_type": aws.StringValue(v.ResourceType), - "tags": tagsToMap(v.Tags), - }) - } - return s -} - -func buildLaunchTemplateData(d *schema.ResourceData) (*ec2.RequestLaunchTemplateData, error) { - opts := &ec2.RequestLaunchTemplateData{ - UserData: aws.String(d.Get("user_data").(string)), - } - - if v, ok := d.GetOk("image_id"); ok { - opts.ImageId = aws.String(v.(string)) - } - - if v, ok := d.GetOk("instance_initiated_shutdown_behavior"); ok { - opts.InstanceInitiatedShutdownBehavior = aws.String(v.(string)) - } - - instanceType := d.Get("instance_type").(string) - if instanceType != "" { - opts.InstanceType = aws.String(instanceType) - } - - if v, ok := d.GetOk("kernel_id"); ok { - opts.KernelId = aws.String(v.(string)) - } - - if v, ok := d.GetOk("key_name"); ok { - opts.KeyName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("ram_disk_id"); ok { - opts.RamDiskId = aws.String(v.(string)) - } - - if v, ok := d.GetOk("disable_api_termination"); ok { - opts.DisableApiTermination = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("ebs_optimized"); ok && v.(string) != "" { - vBool, err := strconv.ParseBool(v.(string)) - if err != nil { - return nil, fmt.Errorf("error converting ebs_optimized %q from string to boolean: %s", v.(string), err) - } - opts.EbsOptimized = aws.Bool(vBool) - } - - if v, ok := d.GetOk("security_group_names"); ok { - opts.SecurityGroups = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("vpc_security_group_ids"); ok { - opts.SecurityGroupIds = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("block_device_mappings"); ok { - var blockDeviceMappings []*ec2.LaunchTemplateBlockDeviceMappingRequest - bdms := v.([]interface{}) - - for _, bdm := range bdms { - if bdm == nil { - continue - } - blockDeviceMapping, err := readBlockDeviceMappingFromConfig(bdm.(map[string]interface{})) - if err != nil { - return nil, err - } - blockDeviceMappings = append(blockDeviceMappings, blockDeviceMapping) - } - opts.BlockDeviceMappings = blockDeviceMappings - } - - if v, ok := d.GetOk("capacity_reservation_specification"); ok { - crs := v.([]interface{}) - - if len(crs) > 0 && crs[0] != nil { - opts.CapacityReservationSpecification = readCapacityReservationSpecificationFromConfig(crs[0].(map[string]interface{})) - } - } - - if v, ok := d.GetOk("credit_specification"); ok && (strings.HasPrefix(instanceType, "t2") || strings.HasPrefix(instanceType, "t3")) { - cs := v.([]interface{}) - - if len(cs) > 0 && cs[0] != nil { - opts.CreditSpecification = readCreditSpecificationFromConfig(cs[0].(map[string]interface{})) - } - } - - if v, ok := d.GetOk("elastic_gpu_specifications"); ok { - var elasticGpuSpecifications []*ec2.ElasticGpuSpecification - egsList := v.([]interface{}) - - for _, egs := range egsList { - elasticGpuSpecifications = append(elasticGpuSpecifications, readElasticGpuSpecificationsFromConfig(egs.(map[string]interface{}))) - } - opts.ElasticGpuSpecifications = elasticGpuSpecifications - } - - if v, ok := d.GetOk("iam_instance_profile"); ok { - iip := v.([]interface{}) - - if len(iip) > 0 && iip[0] != nil { - opts.IamInstanceProfile = readIamInstanceProfileFromConfig(iip[0].(map[string]interface{})) - } - } - - if v, ok := d.GetOk("instance_market_options"); ok { - imo := v.([]interface{}) - - if len(imo) > 0 && imo[0] != nil { - instanceMarketOptions, err := readInstanceMarketOptionsFromConfig(imo[0].(map[string]interface{})) - if err != nil { - return nil, err - } - opts.InstanceMarketOptions = instanceMarketOptions - } - } - - if v, ok := d.GetOk("license_specification"); ok { - var licenseSpecifications []*ec2.LaunchTemplateLicenseConfigurationRequest - lsList := v.(*schema.Set).List() - - for _, ls := range lsList { - if ls == nil { - continue - } - licenseSpecifications = append(licenseSpecifications, readLicenseSpecificationFromConfig(ls.(map[string]interface{}))) - } - opts.LicenseSpecifications = licenseSpecifications - } - - if v, ok := d.GetOk("monitoring"); ok { - m := v.([]interface{}) - if len(m) > 0 && m[0] != nil { - mData := m[0].(map[string]interface{}) - monitoring := &ec2.LaunchTemplatesMonitoringRequest{ - Enabled: aws.Bool(mData["enabled"].(bool)), - } - opts.Monitoring = monitoring - } - } - - if v, ok := d.GetOk("network_interfaces"); ok { - var networkInterfaces []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest - niList := v.([]interface{}) - - for _, ni := range niList { - if ni == nil { - continue - } - niData := ni.(map[string]interface{}) - networkInterface := readNetworkInterfacesFromConfig(niData) - networkInterfaces = append(networkInterfaces, networkInterface) - } - opts.NetworkInterfaces = networkInterfaces - } - - if v, ok := d.GetOk("placement"); ok { - p := v.([]interface{}) - - if len(p) > 0 && p[0] != nil { - opts.Placement = readPlacementFromConfig(p[0].(map[string]interface{})) - } - } - - if v, ok := d.GetOk("tag_specifications"); ok { - var tagSpecifications []*ec2.LaunchTemplateTagSpecificationRequest - t := v.([]interface{}) - - for _, ts := range t { - if ts == nil { - continue - } - tsData := ts.(map[string]interface{}) - tags := tagsFromMap(tsData["tags"].(map[string]interface{})) - tagSpecification := &ec2.LaunchTemplateTagSpecificationRequest{ - ResourceType: aws.String(tsData["resource_type"].(string)), - Tags: tags, - } - tagSpecifications = append(tagSpecifications, tagSpecification) - } - opts.TagSpecifications = tagSpecifications - } - - return opts, nil -} - -func readBlockDeviceMappingFromConfig(bdm map[string]interface{}) (*ec2.LaunchTemplateBlockDeviceMappingRequest, error) { - blockDeviceMapping := &ec2.LaunchTemplateBlockDeviceMappingRequest{} - - if v := bdm["device_name"].(string); v != "" { - blockDeviceMapping.DeviceName = aws.String(v) - } - - if v := bdm["no_device"].(string); v != "" { - blockDeviceMapping.NoDevice = aws.String(v) - } - - if v := bdm["virtual_name"].(string); v != "" { - blockDeviceMapping.VirtualName = aws.String(v) - } - - if v := bdm["ebs"]; len(v.([]interface{})) > 0 { - ebs := v.([]interface{}) - if len(ebs) > 0 && ebs[0] != nil { - ebsData := ebs[0].(map[string]interface{}) - launchTemplateEbsBlockDeviceRequest, err := readEbsBlockDeviceFromConfig(ebsData) - if err != nil { - return nil, err - } - blockDeviceMapping.Ebs = launchTemplateEbsBlockDeviceRequest - } - } - - return blockDeviceMapping, nil -} - -func readEbsBlockDeviceFromConfig(ebs map[string]interface{}) (*ec2.LaunchTemplateEbsBlockDeviceRequest, error) { - ebsDevice := &ec2.LaunchTemplateEbsBlockDeviceRequest{} - - if v, ok := ebs["delete_on_termination"]; ok && v.(string) != "" { - vBool, err := strconv.ParseBool(v.(string)) - if err != nil { - return nil, fmt.Errorf("error converting delete_on_termination %q from string to boolean: %s", v.(string), err) - } - ebsDevice.DeleteOnTermination = aws.Bool(vBool) - } - - if v, ok := ebs["encrypted"]; ok && v.(string) != "" { - vBool, err := strconv.ParseBool(v.(string)) - if err != nil { - return nil, fmt.Errorf("error converting encrypted %q from string to boolean: %s", v.(string), err) - } - ebsDevice.Encrypted = aws.Bool(vBool) - } - - if v := ebs["iops"].(int); v > 0 { - ebsDevice.Iops = aws.Int64(int64(v)) - } - - if v := ebs["kms_key_id"].(string); v != "" { - ebsDevice.KmsKeyId = aws.String(v) - } - - if v := ebs["snapshot_id"].(string); v != "" { - ebsDevice.SnapshotId = aws.String(v) - } - - if v := ebs["volume_size"]; v != nil { - ebsDevice.VolumeSize = aws.Int64(int64(v.(int))) - } - - if v := ebs["volume_type"].(string); v != "" { - ebsDevice.VolumeType = aws.String(v) - } - - return ebsDevice, nil -} - -func readNetworkInterfacesFromConfig(ni map[string]interface{}) *ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - var ipv4Addresses []*ec2.PrivateIpAddressSpecification - var ipv6Addresses []*ec2.InstanceIpv6AddressRequest - var privateIpAddress string - networkInterface := &ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest{} - - if v, ok := ni["delete_on_termination"]; ok { - networkInterface.DeleteOnTermination = aws.Bool(v.(bool)) - } - - if v, ok := ni["description"].(string); ok && v != "" { - networkInterface.Description = aws.String(v) - } - - if v, ok := ni["device_index"].(int); ok { - networkInterface.DeviceIndex = aws.Int64(int64(v)) - } - - if v, ok := ni["network_interface_id"].(string); ok && v != "" { - networkInterface.NetworkInterfaceId = aws.String(v) - } else if v, ok := ni["associate_public_ip_address"]; ok { - networkInterface.AssociatePublicIpAddress = aws.Bool(v.(bool)) - } - - if v, ok := ni["private_ip_address"].(string); ok && v != "" { - privateIpAddress = v - networkInterface.PrivateIpAddress = aws.String(v) - } - - if v, ok := ni["subnet_id"].(string); ok && v != "" { - networkInterface.SubnetId = aws.String(v) - } - - if v := ni["security_groups"].(*schema.Set); v.Len() > 0 { - for _, v := range v.List() { - networkInterface.Groups = append(networkInterface.Groups, aws.String(v.(string))) - } - } - - ipv6AddressList := ni["ipv6_addresses"].(*schema.Set).List() - for _, address := range ipv6AddressList { - ipv6Addresses = append(ipv6Addresses, &ec2.InstanceIpv6AddressRequest{ - Ipv6Address: aws.String(address.(string)), - }) - } - networkInterface.Ipv6Addresses = ipv6Addresses - - if v := ni["ipv6_address_count"].(int); v > 0 { - networkInterface.Ipv6AddressCount = aws.Int64(int64(v)) - } - - if v := ni["ipv4_address_count"].(int); v > 0 { - networkInterface.SecondaryPrivateIpAddressCount = aws.Int64(int64(v)) - } else if v := ni["ipv4_addresses"].(*schema.Set); v.Len() > 0 { - for _, address := range v.List() { - privateIp := &ec2.PrivateIpAddressSpecification{ - Primary: aws.Bool(address.(string) == privateIpAddress), - PrivateIpAddress: aws.String(address.(string)), - } - ipv4Addresses = append(ipv4Addresses, privateIp) - } - networkInterface.PrivateIpAddresses = ipv4Addresses - } - - return networkInterface -} - -func readIamInstanceProfileFromConfig(iip map[string]interface{}) *ec2.LaunchTemplateIamInstanceProfileSpecificationRequest { - iamInstanceProfile := &ec2.LaunchTemplateIamInstanceProfileSpecificationRequest{} - - if v, ok := iip["arn"].(string); ok && v != "" { - iamInstanceProfile.Arn = aws.String(v) - } - - if v, ok := iip["name"].(string); ok && v != "" { - iamInstanceProfile.Name = aws.String(v) - } - - return iamInstanceProfile -} - -func readCapacityReservationSpecificationFromConfig(crs map[string]interface{}) *ec2.LaunchTemplateCapacityReservationSpecificationRequest { - capacityReservationSpecification := &ec2.LaunchTemplateCapacityReservationSpecificationRequest{} - - if v, ok := crs["capacity_reservation_preference"].(string); ok && v != "" { - capacityReservationSpecification.CapacityReservationPreference = aws.String(v) - } - - if v, ok := crs["capacity_reservation_target"]; ok { - crt := v.([]interface{}) - - if len(crt) > 0 { - capacityReservationSpecification.CapacityReservationTarget = readCapacityReservationTargetFromConfig(crt[0].(map[string]interface{})) - } - } - - return capacityReservationSpecification -} - -func readCapacityReservationTargetFromConfig(crt map[string]interface{}) *ec2.CapacityReservationTarget { - capacityReservationTarget := &ec2.CapacityReservationTarget{} - - if v, ok := crt["capacity_reservation_id"].(string); ok && v != "" { - capacityReservationTarget.CapacityReservationId = aws.String(v) - } - - return capacityReservationTarget -} - -func readCreditSpecificationFromConfig(cs map[string]interface{}) *ec2.CreditSpecificationRequest { - creditSpecification := &ec2.CreditSpecificationRequest{} - - if v, ok := cs["cpu_credits"].(string); ok && v != "" { - creditSpecification.CpuCredits = aws.String(v) - } - - return creditSpecification -} - -func readElasticGpuSpecificationsFromConfig(egs map[string]interface{}) *ec2.ElasticGpuSpecification { - elasticGpuSpecification := &ec2.ElasticGpuSpecification{} - - if v, ok := egs["type"].(string); ok && v != "" { - elasticGpuSpecification.Type = aws.String(v) - } - - return elasticGpuSpecification -} - -func readInstanceMarketOptionsFromConfig(imo map[string]interface{}) (*ec2.LaunchTemplateInstanceMarketOptionsRequest, error) { - instanceMarketOptions := &ec2.LaunchTemplateInstanceMarketOptionsRequest{} - spotOptions := &ec2.LaunchTemplateSpotMarketOptionsRequest{} - - if v, ok := imo["market_type"].(string); ok && v != "" { - instanceMarketOptions.MarketType = aws.String(v) - } - - if v, ok := imo["spot_options"]; ok { - vL := v.([]interface{}) - for _, v := range vL { - so := v.(map[string]interface{}) - - if v, ok := so["block_duration_minutes"].(int); ok && v != 0 { - spotOptions.BlockDurationMinutes = aws.Int64(int64(v)) - } - - if v, ok := so["instance_interruption_behavior"].(string); ok && v != "" { - spotOptions.InstanceInterruptionBehavior = aws.String(v) - } - - if v, ok := so["max_price"].(string); ok && v != "" { - spotOptions.MaxPrice = aws.String(v) - } - - if v, ok := so["spot_instance_type"].(string); ok && v != "" { - spotOptions.SpotInstanceType = aws.String(v) - } - - if v, ok := so["valid_until"].(string); ok && v != "" { - t, err := time.Parse(time.RFC3339, v) - if err != nil { - return nil, fmt.Errorf("Error Parsing Launch Template Spot Options valid until: %s", err.Error()) - } - spotOptions.ValidUntil = aws.Time(t) - } - } - instanceMarketOptions.SpotOptions = spotOptions - } - - return instanceMarketOptions, nil -} - -func readLicenseSpecificationFromConfig(ls map[string]interface{}) *ec2.LaunchTemplateLicenseConfigurationRequest { - licenseSpecification := &ec2.LaunchTemplateLicenseConfigurationRequest{} - - if v, ok := ls["license_configuration_arn"].(string); ok && v != "" { - licenseSpecification.LicenseConfigurationArn = aws.String(v) - } - - return licenseSpecification -} - -func readPlacementFromConfig(p map[string]interface{}) *ec2.LaunchTemplatePlacementRequest { - placement := &ec2.LaunchTemplatePlacementRequest{} - - if v, ok := p["affinity"].(string); ok && v != "" { - placement.Affinity = aws.String(v) - } - - if v, ok := p["availability_zone"].(string); ok && v != "" { - placement.AvailabilityZone = aws.String(v) - } - - if v, ok := p["group_name"].(string); ok && v != "" { - placement.GroupName = aws.String(v) - } - - if v, ok := p["host_id"].(string); ok && v != "" { - placement.HostId = aws.String(v) - } - - if v, ok := p["spread_domain"].(string); ok && v != "" { - placement.SpreadDomain = aws.String(v) - } - - if v, ok := p["tenancy"].(string); ok && v != "" { - placement.Tenancy = aws.String(v) - } - - return placement -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go deleted file mode 100644 index e31943a33..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go +++ /dev/null @@ -1,789 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "regexp" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/aws/aws-sdk-go/service/elbv2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsLb() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLbCreate, - Read: resourceAwsLbRead, - Update: resourceAwsLbUpdate, - Delete: resourceAwsLbDelete, - // Subnets are ForceNew for Network Load Balancers - CustomizeDiff: customizeDiffNLBSubnets, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Update: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "arn_suffix": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateElbName, - }, - - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateElbNamePrefix, - }, - - "internal": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "load_balancer_type": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - Default: "application", - }, - - "security_groups": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - Optional: true, - Set: schema.HashString, - }, - - "subnets": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Computed: true, - Set: schema.HashString, - }, - - "subnet_mapping": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "subnet_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "allocation_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["subnet_id"].(string))) - if m["allocation_id"] != "" { - buf.WriteString(fmt.Sprintf("%s-", m["allocation_id"].(string))) - } - return hashcode.String(buf.String()) - }, - }, - - "access_logs": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - DiffSuppressFunc: suppressIfLBType("network"), - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Required: true, - DiffSuppressFunc: suppressIfLBType("network"), - }, - "prefix": { - Type: schema.TypeString, - Optional: true, - DiffSuppressFunc: suppressIfLBType("network"), - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - DiffSuppressFunc: suppressIfLBType("network"), - }, - }, - }, - }, - - "enable_deletion_protection": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "idle_timeout": { - Type: schema.TypeInt, - Optional: true, - Default: 60, - DiffSuppressFunc: suppressIfLBType("network"), - }, - - "enable_cross_zone_load_balancing": { - Type: schema.TypeBool, - Optional: true, - Default: false, - DiffSuppressFunc: suppressIfLBType("application"), - }, - - "enable_http2": { - Type: schema.TypeBool, - Optional: true, - Default: true, - DiffSuppressFunc: suppressIfLBType("network"), - }, - - "ip_address_type": { - Type: schema.TypeString, - Computed: true, - Optional: true, - }, - - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - - "zone_id": { - Type: schema.TypeString, - Computed: true, - }, - - "dns_name": { - Type: schema.TypeString, - Computed: true, - }, - - "tags": tagsSchema(), - }, - } -} - -func suppressIfLBType(t string) schema.SchemaDiffSuppressFunc { - return func(k string, old string, new string, d *schema.ResourceData) bool { - return d.Get("load_balancer_type").(string) == t - } -} - -func resourceAwsLbCreate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - var name string - if v, ok := d.GetOk("name"); ok { - name = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - name = resource.PrefixedUniqueId(v.(string)) - } else { - name = resource.PrefixedUniqueId("tf-lb-") - } - d.Set("name", name) - - elbOpts := &elbv2.CreateLoadBalancerInput{ - Name: aws.String(name), - Type: aws.String(d.Get("load_balancer_type").(string)), - Tags: tagsFromMapELBv2(d.Get("tags").(map[string]interface{})), - } - - if scheme, ok := d.GetOk("internal"); ok && scheme.(bool) { - elbOpts.Scheme = aws.String("internal") - } - - if v, ok := d.GetOk("security_groups"); ok { - elbOpts.SecurityGroups = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("subnets"); ok { - elbOpts.Subnets = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("subnet_mapping"); ok { - rawMappings := v.(*schema.Set).List() - elbOpts.SubnetMappings = make([]*elbv2.SubnetMapping, len(rawMappings)) - for i, mapping := range rawMappings { - subnetMap := mapping.(map[string]interface{}) - - elbOpts.SubnetMappings[i] = &elbv2.SubnetMapping{ - SubnetId: aws.String(subnetMap["subnet_id"].(string)), - } - - if subnetMap["allocation_id"].(string) != "" { - elbOpts.SubnetMappings[i].AllocationId = aws.String(subnetMap["allocation_id"].(string)) - } - } - } - - if v, ok := d.GetOk("ip_address_type"); ok { - elbOpts.IpAddressType = aws.String(v.(string)) - } - - log.Printf("[DEBUG] ALB create configuration: %#v", elbOpts) - - resp, err := elbconn.CreateLoadBalancer(elbOpts) - if err != nil { - return fmt.Errorf("Error creating Application Load Balancer: %s", err) - } - - if len(resp.LoadBalancers) != 1 { - return fmt.Errorf("No load balancers returned following creation of %s", d.Get("name").(string)) - } - - lb := resp.LoadBalancers[0] - d.SetId(aws.StringValue(lb.LoadBalancerArn)) - log.Printf("[INFO] LB ID: %s", d.Id()) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"provisioning", "failed"}, - Target: []string{"active"}, - Refresh: func() (interface{}, string, error) { - describeResp, err := elbconn.DescribeLoadBalancers(&elbv2.DescribeLoadBalancersInput{ - LoadBalancerArns: []*string{lb.LoadBalancerArn}, - }) - if err != nil { - return nil, "", err - } - - if len(describeResp.LoadBalancers) != 1 { - return nil, "", fmt.Errorf("No load balancers returned for %s", aws.StringValue(lb.LoadBalancerArn)) - } - dLb := describeResp.LoadBalancers[0] - - log.Printf("[INFO] LB state: %s", aws.StringValue(dLb.State.Code)) - - return describeResp, aws.StringValue(dLb.State.Code), nil - }, - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsLbUpdate(d, meta) -} - -func resourceAwsLbRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - lbArn := d.Id() - - describeLbOpts := &elbv2.DescribeLoadBalancersInput{ - LoadBalancerArns: []*string{aws.String(lbArn)}, - } - - describeResp, err := elbconn.DescribeLoadBalancers(describeLbOpts) - if err != nil { - if isLoadBalancerNotFound(err) { - // The ALB is gone now, so just remove it from the state - log.Printf("[WARN] ALB %s not found in AWS, removing from state", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("Error retrieving ALB: %s", err) - } - if len(describeResp.LoadBalancers) != 1 { - return fmt.Errorf("Unable to find ALB: %#v", describeResp.LoadBalancers) - } - - return flattenAwsLbResource(d, meta, describeResp.LoadBalancers[0]) -} - -func resourceAwsLbUpdate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - if !d.IsNewResource() { - if err := setElbV2Tags(elbconn, d); err != nil { - return fmt.Errorf("Error Modifying Tags on ALB: %s", err) - } - } - - attributes := make([]*elbv2.LoadBalancerAttribute, 0) - - switch d.Get("load_balancer_type").(string) { - case "application": - if d.HasChange("access_logs") || d.IsNewResource() { - logs := d.Get("access_logs").([]interface{}) - if len(logs) == 1 { - log := logs[0].(map[string]interface{}) - - attributes = append(attributes, - &elbv2.LoadBalancerAttribute{ - Key: aws.String("access_logs.s3.enabled"), - Value: aws.String(strconv.FormatBool(log["enabled"].(bool))), - }, - &elbv2.LoadBalancerAttribute{ - Key: aws.String("access_logs.s3.bucket"), - Value: aws.String(log["bucket"].(string)), - }, - &elbv2.LoadBalancerAttribute{ - Key: aws.String("access_logs.s3.prefix"), - Value: aws.String(log["prefix"].(string)), - }) - } else if len(logs) == 0 { - attributes = append(attributes, &elbv2.LoadBalancerAttribute{ - Key: aws.String("access_logs.s3.enabled"), - Value: aws.String("false"), - }) - } - } - if d.HasChange("idle_timeout") || d.IsNewResource() { - attributes = append(attributes, &elbv2.LoadBalancerAttribute{ - Key: aws.String("idle_timeout.timeout_seconds"), - Value: aws.String(fmt.Sprintf("%d", d.Get("idle_timeout").(int))), - }) - } - if d.HasChange("enable_http2") || d.IsNewResource() { - attributes = append(attributes, &elbv2.LoadBalancerAttribute{ - Key: aws.String("routing.http2.enabled"), - Value: aws.String(strconv.FormatBool(d.Get("enable_http2").(bool))), - }) - } - case "network": - if d.HasChange("enable_cross_zone_load_balancing") || d.IsNewResource() { - attributes = append(attributes, &elbv2.LoadBalancerAttribute{ - Key: aws.String("load_balancing.cross_zone.enabled"), - Value: aws.String(fmt.Sprintf("%t", d.Get("enable_cross_zone_load_balancing").(bool))), - }) - } - } - - if d.HasChange("enable_deletion_protection") || d.IsNewResource() { - attributes = append(attributes, &elbv2.LoadBalancerAttribute{ - Key: aws.String("deletion_protection.enabled"), - Value: aws.String(fmt.Sprintf("%t", d.Get("enable_deletion_protection").(bool))), - }) - } - - if len(attributes) != 0 { - input := &elbv2.ModifyLoadBalancerAttributesInput{ - LoadBalancerArn: aws.String(d.Id()), - Attributes: attributes, - } - - log.Printf("[DEBUG] ALB Modify Load Balancer Attributes Request: %#v", input) - _, err := elbconn.ModifyLoadBalancerAttributes(input) - if err != nil { - return fmt.Errorf("Failure configuring LB attributes: %s", err) - } - } - - if d.HasChange("security_groups") { - sgs := expandStringList(d.Get("security_groups").(*schema.Set).List()) - - params := &elbv2.SetSecurityGroupsInput{ - LoadBalancerArn: aws.String(d.Id()), - SecurityGroups: sgs, - } - _, err := elbconn.SetSecurityGroups(params) - if err != nil { - return fmt.Errorf("Failure Setting LB Security Groups: %s", err) - } - - } - - // subnets are assigned at Create; the 'change' here is an empty map for old - // and current subnets for new, so this change is redundant when the - // resource is just created, so we don't attempt if it is a newly created - // resource. - if d.HasChange("subnets") && !d.IsNewResource() { - subnets := expandStringList(d.Get("subnets").(*schema.Set).List()) - - params := &elbv2.SetSubnetsInput{ - LoadBalancerArn: aws.String(d.Id()), - Subnets: subnets, - } - - _, err := elbconn.SetSubnets(params) - if err != nil { - return fmt.Errorf("Failure Setting LB Subnets: %s", err) - } - } - - if d.HasChange("ip_address_type") { - - params := &elbv2.SetIpAddressTypeInput{ - LoadBalancerArn: aws.String(d.Id()), - IpAddressType: aws.String(d.Get("ip_address_type").(string)), - } - - _, err := elbconn.SetIpAddressType(params) - if err != nil { - return fmt.Errorf("Failure Setting LB IP Address Type: %s", err) - } - - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"active", "provisioning", "failed"}, - Target: []string{"active"}, - Refresh: func() (interface{}, string, error) { - describeResp, err := elbconn.DescribeLoadBalancers(&elbv2.DescribeLoadBalancersInput{ - LoadBalancerArns: []*string{aws.String(d.Id())}, - }) - if err != nil { - return nil, "", err - } - - if len(describeResp.LoadBalancers) != 1 { - return nil, "", fmt.Errorf("No load balancers returned for %s", d.Id()) - } - dLb := describeResp.LoadBalancers[0] - - log.Printf("[INFO] LB state: %s", aws.StringValue(dLb.State.Code)) - - return describeResp, aws.StringValue(dLb.State.Code), nil - }, - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - _, err := stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsLbRead(d, meta) -} - -func resourceAwsLbDelete(d *schema.ResourceData, meta interface{}) error { - lbconn := meta.(*AWSClient).elbv2conn - - log.Printf("[INFO] Deleting LB: %s", d.Id()) - - // Destroy the load balancer - deleteElbOpts := elbv2.DeleteLoadBalancerInput{ - LoadBalancerArn: aws.String(d.Id()), - } - if _, err := lbconn.DeleteLoadBalancer(&deleteElbOpts); err != nil { - return fmt.Errorf("Error deleting LB: %s", err) - } - - conn := meta.(*AWSClient).ec2conn - - err := cleanupLBNetworkInterfaces(conn, d.Id()) - if err != nil { - log.Printf("[WARN] Failed to cleanup ENIs for ALB %q: %#v", d.Id(), err) - } - - err = waitForNLBNetworkInterfacesToDetach(conn, d.Id()) - if err != nil { - log.Printf("[WARN] Failed to wait for ENIs to disappear for NLB %q: %#v", d.Id(), err) - } - - return nil -} - -// ALB automatically creates ENI(s) on creation -// but the cleanup is asynchronous and may take time -// which then blocks IGW, SG or VPC on deletion -// So we make the cleanup "synchronous" here -func cleanupLBNetworkInterfaces(conn *ec2.EC2, lbArn string) error { - name, err := getLbNameFromArn(lbArn) - if err != nil { - return err - } - - out, err := conn.DescribeNetworkInterfaces(&ec2.DescribeNetworkInterfacesInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("attachment.instance-owner-id"), - Values: []*string{aws.String("amazon-elb")}, - }, - { - Name: aws.String("description"), - Values: []*string{aws.String("ELB " + name)}, - }, - }, - }) - if err != nil { - return err - } - - log.Printf("[DEBUG] Found %d ENIs to cleanup for LB %q", - len(out.NetworkInterfaces), name) - - if len(out.NetworkInterfaces) == 0 { - // Nothing to cleanup - return nil - } - - err = detachNetworkInterfaces(conn, out.NetworkInterfaces) - if err != nil { - return err - } - - err = deleteNetworkInterfaces(conn, out.NetworkInterfaces) - - return err -} - -func waitForNLBNetworkInterfacesToDetach(conn *ec2.EC2, lbArn string) error { - name, err := getLbNameFromArn(lbArn) - if err != nil { - return err - } - - // We cannot cleanup these ENIs ourselves as that would result in - // OperationNotPermitted: You are not allowed to manage 'ela-attach' attachments. - // yet presence of these ENIs may prevent us from deleting EIPs associated w/ the NLB - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - out, err := conn.DescribeNetworkInterfaces(&ec2.DescribeNetworkInterfacesInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("attachment.instance-owner-id"), - Values: []*string{aws.String("amazon-aws")}, - }, - { - Name: aws.String("attachment.attachment-id"), - Values: []*string{aws.String("ela-attach-*")}, - }, - { - Name: aws.String("description"), - Values: []*string{aws.String("ELB " + name)}, - }, - }, - }) - if err != nil { - return resource.NonRetryableError(err) - } - - niCount := len(out.NetworkInterfaces) - if niCount > 0 { - log.Printf("[DEBUG] Found %d ENIs to cleanup for NLB %q", niCount, lbArn) - return resource.RetryableError(fmt.Errorf("Waiting for %d ENIs of %q to clean up", niCount, lbArn)) - } - log.Printf("[DEBUG] ENIs gone for NLB %q", lbArn) - - return nil - }) -} - -func getLbNameFromArn(arn string) (string, error) { - re := regexp.MustCompile("([^/]+/[^/]+/[^/]+)$") - matches := re.FindStringSubmatch(arn) - if len(matches) != 2 { - return "", fmt.Errorf("Unexpected ARN format: %q", arn) - } - - // e.g. app/example-alb/b26e625cdde161e6 - return matches[1], nil -} - -// flattenSubnetsFromAvailabilityZones creates a slice of strings containing the subnet IDs -// for the ALB based on the AvailabilityZones structure returned by the API. -func flattenSubnetsFromAvailabilityZones(availabilityZones []*elbv2.AvailabilityZone) []string { - var result []string - for _, az := range availabilityZones { - result = append(result, aws.StringValue(az.SubnetId)) - } - return result -} - -func flattenSubnetMappingsFromAvailabilityZones(availabilityZones []*elbv2.AvailabilityZone) []map[string]interface{} { - l := make([]map[string]interface{}, 0) - for _, availabilityZone := range availabilityZones { - for _, loadBalancerAddress := range availabilityZone.LoadBalancerAddresses { - m := make(map[string]interface{}) - m["subnet_id"] = aws.StringValue(availabilityZone.SubnetId) - - if loadBalancerAddress.AllocationId != nil { - m["allocation_id"] = aws.StringValue(loadBalancerAddress.AllocationId) - } - - l = append(l, m) - } - } - return l -} - -func lbSuffixFromARN(arn *string) string { - if arn == nil { - return "" - } - - if arnComponents := regexp.MustCompile(`arn:.*:loadbalancer/(.*)`).FindAllStringSubmatch(*arn, -1); len(arnComponents) == 1 { - if len(arnComponents[0]) == 2 { - return arnComponents[0][1] - } - } - - return "" -} - -// flattenAwsLbResource takes a *elbv2.LoadBalancer and populates all respective resource fields. -func flattenAwsLbResource(d *schema.ResourceData, meta interface{}, lb *elbv2.LoadBalancer) error { - elbconn := meta.(*AWSClient).elbv2conn - - d.Set("arn", lb.LoadBalancerArn) - d.Set("arn_suffix", lbSuffixFromARN(lb.LoadBalancerArn)) - d.Set("name", lb.LoadBalancerName) - d.Set("internal", (lb.Scheme != nil && aws.StringValue(lb.Scheme) == "internal")) - d.Set("security_groups", flattenStringList(lb.SecurityGroups)) - d.Set("vpc_id", lb.VpcId) - d.Set("zone_id", lb.CanonicalHostedZoneId) - d.Set("dns_name", lb.DNSName) - d.Set("ip_address_type", lb.IpAddressType) - d.Set("load_balancer_type", lb.Type) - - if err := d.Set("subnets", flattenSubnetsFromAvailabilityZones(lb.AvailabilityZones)); err != nil { - return fmt.Errorf("error setting subnets: %s", err) - } - - if err := d.Set("subnet_mapping", flattenSubnetMappingsFromAvailabilityZones(lb.AvailabilityZones)); err != nil { - return fmt.Errorf("error setting subnet_mapping: %s", err) - } - - respTags, err := elbconn.DescribeTags(&elbv2.DescribeTagsInput{ - ResourceArns: []*string{lb.LoadBalancerArn}, - }) - if err != nil { - return fmt.Errorf("Error retrieving LB Tags: %s", err) - } - - var et []*elbv2.Tag - if len(respTags.TagDescriptions) > 0 { - et = respTags.TagDescriptions[0].Tags - } - - if err := d.Set("tags", tagsToMapELBv2(et)); err != nil { - log.Printf("[WARN] Error setting tags for AWS LB (%s): %s", d.Id(), err) - } - - attributesResp, err := elbconn.DescribeLoadBalancerAttributes(&elbv2.DescribeLoadBalancerAttributesInput{ - LoadBalancerArn: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error retrieving LB Attributes: %s", err) - } - - accessLogMap := map[string]interface{}{} - for _, attr := range attributesResp.Attributes { - switch aws.StringValue(attr.Key) { - case "access_logs.s3.enabled": - accessLogMap["enabled"] = aws.StringValue(attr.Value) == "true" - case "access_logs.s3.bucket": - accessLogMap["bucket"] = aws.StringValue(attr.Value) - case "access_logs.s3.prefix": - accessLogMap["prefix"] = aws.StringValue(attr.Value) - case "idle_timeout.timeout_seconds": - timeout, err := strconv.Atoi(aws.StringValue(attr.Value)) - if err != nil { - return fmt.Errorf("Error parsing ALB timeout: %s", err) - } - log.Printf("[DEBUG] Setting ALB Timeout Seconds: %d", timeout) - d.Set("idle_timeout", timeout) - case "deletion_protection.enabled": - protectionEnabled := aws.StringValue(attr.Value) == "true" - log.Printf("[DEBUG] Setting LB Deletion Protection Enabled: %t", protectionEnabled) - d.Set("enable_deletion_protection", protectionEnabled) - case "routing.http2.enabled": - http2Enabled := aws.StringValue(attr.Value) == "true" - log.Printf("[DEBUG] Setting ALB HTTP/2 Enabled: %t", http2Enabled) - d.Set("enable_http2", http2Enabled) - case "load_balancing.cross_zone.enabled": - crossZoneLbEnabled := aws.StringValue(attr.Value) == "true" - log.Printf("[DEBUG] Setting NLB Cross Zone Load Balancing Enabled: %t", crossZoneLbEnabled) - d.Set("enable_cross_zone_load_balancing", crossZoneLbEnabled) - } - } - - if accessLogMap["bucket"] != "" || accessLogMap["prefix"] != "" { - if err := d.Set("access_logs", []interface{}{accessLogMap}); err != nil { - return fmt.Errorf("error setting access_logs: %s", err) - } - } else { - d.Set("access_logs", []interface{}{}) - } - - return nil -} - -// Load balancers of type 'network' cannot have their subnets updated at -// this time. If the type is 'network' and subnets have changed, mark the -// diff as a ForceNew operation -func customizeDiffNLBSubnets(diff *schema.ResourceDiff, v interface{}) error { - // The current criteria for determining if the operation should be ForceNew: - // - lb of type "network" - // - existing resource (id is not "") - // - there are actual changes to be made in the subnets - // - // Any other combination should be treated as normal. At this time, subnet - // handling is the only known difference between Network Load Balancers and - // Application Load Balancers, so the logic below is simple individual checks. - // If other differences arise we'll want to refactor to check other - // conditions in combinations, but for now all we handle is subnets - if lbType := diff.Get("load_balancer_type").(string); lbType != "network" { - return nil - } - - if diff.Id() == "" { - return nil - } - - o, n := diff.GetChange("subnets") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - os := o.(*schema.Set) - ns := n.(*schema.Set) - remove := os.Difference(ns).List() - add := ns.Difference(os).List() - if len(remove) > 0 || len(add) > 0 { - if err := diff.SetNew("subnets", n); err != nil { - return err - } - - if err := diff.ForceNew("subnets"); err != nil { - return err - } - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_cookie_stickiness_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_cookie_stickiness_policy.go deleted file mode 100644 index acb6acdbe..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_cookie_stickiness_policy.go +++ /dev/null @@ -1,176 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsLBCookieStickinessPolicy() *schema.Resource { - return &schema.Resource{ - // There is no concept of "updating" an LB Stickiness policy in - // the AWS API. - Create: resourceAwsLBCookieStickinessPolicyCreate, - Read: resourceAwsLBCookieStickinessPolicyRead, - Delete: resourceAwsLBCookieStickinessPolicyDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "load_balancer": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "lb_port": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - - "cookie_expiration_period": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - ValidateFunc: validation.IntAtLeast(1), - }, - }, - } -} - -func resourceAwsLBCookieStickinessPolicyCreate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - // Provision the LBStickinessPolicy - lbspOpts := &elb.CreateLBCookieStickinessPolicyInput{ - LoadBalancerName: aws.String(d.Get("load_balancer").(string)), - PolicyName: aws.String(d.Get("name").(string)), - } - - if v := d.Get("cookie_expiration_period").(int); v > 0 { - lbspOpts.CookieExpirationPeriod = aws.Int64(int64(v)) - } - - log.Printf("[DEBUG] LB Cookie Stickiness Policy opts: %#v", lbspOpts) - if _, err := elbconn.CreateLBCookieStickinessPolicy(lbspOpts); err != nil { - return fmt.Errorf("Error creating LBCookieStickinessPolicy: %s", err) - } - - setLoadBalancerOpts := &elb.SetLoadBalancerPoliciesOfListenerInput{ - LoadBalancerName: aws.String(d.Get("load_balancer").(string)), - LoadBalancerPort: aws.Int64(int64(d.Get("lb_port").(int))), - PolicyNames: []*string{aws.String(d.Get("name").(string))}, - } - - log.Printf("[DEBUG] LB Cookie Stickiness create configuration: %#v", setLoadBalancerOpts) - if _, err := elbconn.SetLoadBalancerPoliciesOfListener(setLoadBalancerOpts); err != nil { - return fmt.Errorf("Error setting LBCookieStickinessPolicy: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%d:%s", - *lbspOpts.LoadBalancerName, - *setLoadBalancerOpts.LoadBalancerPort, - *lbspOpts.PolicyName)) - return nil -} - -func resourceAwsLBCookieStickinessPolicyRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - lbName, lbPort, policyName := resourceAwsLBCookieStickinessPolicyParseId(d.Id()) - - request := &elb.DescribeLoadBalancerPoliciesInput{ - LoadBalancerName: aws.String(lbName), - PolicyNames: []*string{aws.String(policyName)}, - } - - getResp, err := elbconn.DescribeLoadBalancerPolicies(request) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - if ec2err.Code() == "PolicyNotFound" || ec2err.Code() == "LoadBalancerNotFound" { - d.SetId("") - } - return nil - } - return fmt.Errorf("Error retrieving policy: %s", err) - } - - if len(getResp.PolicyDescriptions) != 1 { - return fmt.Errorf("Unable to find policy %#v", getResp.PolicyDescriptions) - } - - // we know the policy exists now, but we have to check if it's assigned to a listener - assigned, err := resourceAwsELBSticknessPolicyAssigned(policyName, lbName, lbPort, elbconn) - if err != nil { - return err - } - if !assigned { - // policy exists, but isn't assigned to a listener - log.Printf("[DEBUG] policy '%s' exists, but isn't assigned to a listener", policyName) - d.SetId("") - return nil - } - - // We can get away with this because there's only one attribute, the - // cookie expiration, in these descriptions. - policyDesc := getResp.PolicyDescriptions[0] - cookieAttr := policyDesc.PolicyAttributeDescriptions[0] - if *cookieAttr.AttributeName != "CookieExpirationPeriod" { - return fmt.Errorf("Unable to find cookie expiration period.") - } - d.Set("cookie_expiration_period", cookieAttr.AttributeValue) - - d.Set("name", policyName) - d.Set("load_balancer", lbName) - d.Set("lb_port", lbPort) - - return nil -} - -func resourceAwsLBCookieStickinessPolicyDelete(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - lbName, _, policyName := resourceAwsLBCookieStickinessPolicyParseId(d.Id()) - - // Perversely, if we Set an empty list of PolicyNames, we detach the - // policies attached to a listener, which is required to delete the - // policy itself. - setLoadBalancerOpts := &elb.SetLoadBalancerPoliciesOfListenerInput{ - LoadBalancerName: aws.String(d.Get("load_balancer").(string)), - LoadBalancerPort: aws.Int64(int64(d.Get("lb_port").(int))), - PolicyNames: []*string{}, - } - - if _, err := elbconn.SetLoadBalancerPoliciesOfListener(setLoadBalancerOpts); err != nil { - return fmt.Errorf("Error removing LBCookieStickinessPolicy: %s", err) - } - - request := &elb.DeleteLoadBalancerPolicyInput{ - LoadBalancerName: aws.String(lbName), - PolicyName: aws.String(policyName), - } - - if _, err := elbconn.DeleteLoadBalancerPolicy(request); err != nil { - return fmt.Errorf("Error deleting LB stickiness policy %s: %s", d.Id(), err) - } - return nil -} - -// resourceAwsLBCookieStickinessPolicyParseId takes an ID and parses it into -// it's constituent parts. You need three axes (LB name, policy name, and LB -// port) to create or identify a stickiness policy in AWS's API. -func resourceAwsLBCookieStickinessPolicyParseId(id string) (string, string, string) { - parts := strings.SplitN(id, ":", 3) - return parts[0], parts[1], parts[2] -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go deleted file mode 100644 index 7720ddc6c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go +++ /dev/null @@ -1,820 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "regexp" - "sort" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elbv2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsLbListener() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLbListenerCreate, - Read: resourceAwsLbListenerRead, - Update: resourceAwsLbListenerUpdate, - Delete: resourceAwsLbListenerDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Read: schema.DefaultTimeout(10 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "load_balancer_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "port": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntBetween(1, 65535), - }, - - "protocol": { - Type: schema.TypeString, - Optional: true, - Default: "HTTP", - StateFunc: func(v interface{}) string { - return strings.ToUpper(v.(string)) - }, - ValidateFunc: validation.StringInSlice([]string{ - elbv2.ProtocolEnumHttp, - elbv2.ProtocolEnumHttps, - elbv2.ProtocolEnumTcp, - elbv2.ProtocolEnumTls, - }, true), - }, - - "ssl_policy": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "certificate_arn": { - Type: schema.TypeString, - Optional: true, - }, - - "default_action": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - elbv2.ActionTypeEnumAuthenticateCognito, - elbv2.ActionTypeEnumAuthenticateOidc, - elbv2.ActionTypeEnumFixedResponse, - elbv2.ActionTypeEnumForward, - elbv2.ActionTypeEnumRedirect, - }, true), - }, - "order": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ValidateFunc: validation.IntBetween(1, 50000), - }, - - "target_group_arn": { - Type: schema.TypeString, - Optional: true, - DiffSuppressFunc: suppressIfDefaultActionTypeNot("forward"), - }, - - "redirect": { - Type: schema.TypeList, - Optional: true, - DiffSuppressFunc: suppressIfDefaultActionTypeNot("redirect"), - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "host": { - Type: schema.TypeString, - Optional: true, - Default: "#{host}", - }, - - "path": { - Type: schema.TypeString, - Optional: true, - Default: "/#{path}", - }, - - "port": { - Type: schema.TypeString, - Optional: true, - Default: "#{port}", - }, - - "protocol": { - Type: schema.TypeString, - Optional: true, - Default: "#{protocol}", - ValidateFunc: validation.StringInSlice([]string{ - "#{protocol}", - "HTTP", - "HTTPS", - }, false), - }, - - "query": { - Type: schema.TypeString, - Optional: true, - Default: "#{query}", - }, - - "status_code": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - "HTTP_301", - "HTTP_302", - }, false), - }, - }, - }, - }, - - "fixed_response": { - Type: schema.TypeList, - Optional: true, - DiffSuppressFunc: suppressIfDefaultActionTypeNot("fixed-response"), - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "content_type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - "text/plain", - "text/css", - "text/html", - "application/javascript", - "application/json", - }, false), - }, - - "message_body": { - Type: schema.TypeString, - Optional: true, - }, - - "status_code": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[245]\d\d$`), ""), - }, - }, - }, - }, - - "authenticate_cognito": { - Type: schema.TypeList, - Optional: true, - DiffSuppressFunc: suppressIfDefaultActionTypeNot("authenticate-cognito"), - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "authentication_request_extra_params": { - Type: schema.TypeMap, - Optional: true, - }, - "on_unauthenticated_request": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - elbv2.AuthenticateCognitoActionConditionalBehaviorEnumDeny, - elbv2.AuthenticateCognitoActionConditionalBehaviorEnumAllow, - elbv2.AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate, - }, true), - }, - "scope": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "session_cookie_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "session_timeout": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - "user_pool_arn": { - Type: schema.TypeString, - Required: true, - }, - "user_pool_client_id": { - Type: schema.TypeString, - Required: true, - }, - "user_pool_domain": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - - "authenticate_oidc": { - Type: schema.TypeList, - Optional: true, - DiffSuppressFunc: suppressIfDefaultActionTypeNot("authenticate-oidc"), - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "authentication_request_extra_params": { - Type: schema.TypeMap, - Optional: true, - }, - "authorization_endpoint": { - Type: schema.TypeString, - Required: true, - }, - "client_id": { - Type: schema.TypeString, - Required: true, - }, - "client_secret": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - }, - "issuer": { - Type: schema.TypeString, - Required: true, - }, - "on_unauthenticated_request": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - elbv2.AuthenticateOidcActionConditionalBehaviorEnumDeny, - elbv2.AuthenticateOidcActionConditionalBehaviorEnumAllow, - elbv2.AuthenticateOidcActionConditionalBehaviorEnumAuthenticate, - }, true), - }, - "scope": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "session_cookie_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "session_timeout": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - "token_endpoint": { - Type: schema.TypeString, - Required: true, - }, - "user_info_endpoint": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func suppressIfDefaultActionTypeNot(t string) schema.SchemaDiffSuppressFunc { - return func(k, old, new string, d *schema.ResourceData) bool { - take := 2 - i := strings.IndexFunc(k, func(r rune) bool { - if r == '.' { - take -= 1 - return take == 0 - } - return false - }) - at := k[:i+1] + "type" - return d.Get(at).(string) != t - } -} - -func resourceAwsLbListenerCreate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - lbArn := d.Get("load_balancer_arn").(string) - - params := &elbv2.CreateListenerInput{ - LoadBalancerArn: aws.String(lbArn), - Port: aws.Int64(int64(d.Get("port").(int))), - Protocol: aws.String(d.Get("protocol").(string)), - } - - if sslPolicy, ok := d.GetOk("ssl_policy"); ok { - params.SslPolicy = aws.String(sslPolicy.(string)) - } - - if certificateArn, ok := d.GetOk("certificate_arn"); ok { - params.Certificates = make([]*elbv2.Certificate, 1) - params.Certificates[0] = &elbv2.Certificate{ - CertificateArn: aws.String(certificateArn.(string)), - } - } - - defaultActions := d.Get("default_action").([]interface{}) - params.DefaultActions = make([]*elbv2.Action, len(defaultActions)) - for i, defaultAction := range defaultActions { - defaultActionMap := defaultAction.(map[string]interface{}) - - action := &elbv2.Action{ - Order: aws.Int64(int64(i + 1)), - Type: aws.String(defaultActionMap["type"].(string)), - } - - if order, ok := defaultActionMap["order"]; ok && order.(int) != 0 { - action.Order = aws.Int64(int64(order.(int))) - } - - switch defaultActionMap["type"].(string) { - case "forward": - action.TargetGroupArn = aws.String(defaultActionMap["target_group_arn"].(string)) - - case "redirect": - redirectList := defaultActionMap["redirect"].([]interface{}) - - if len(redirectList) == 1 { - redirectMap := redirectList[0].(map[string]interface{}) - - action.RedirectConfig = &elbv2.RedirectActionConfig{ - Host: aws.String(redirectMap["host"].(string)), - Path: aws.String(redirectMap["path"].(string)), - Port: aws.String(redirectMap["port"].(string)), - Protocol: aws.String(redirectMap["protocol"].(string)), - Query: aws.String(redirectMap["query"].(string)), - StatusCode: aws.String(redirectMap["status_code"].(string)), - } - } else { - return errors.New("for actions of type 'redirect', you must specify a 'redirect' block") - } - - case "fixed-response": - fixedResponseList := defaultActionMap["fixed_response"].([]interface{}) - - if len(fixedResponseList) == 1 { - fixedResponseMap := fixedResponseList[0].(map[string]interface{}) - - action.FixedResponseConfig = &elbv2.FixedResponseActionConfig{ - ContentType: aws.String(fixedResponseMap["content_type"].(string)), - MessageBody: aws.String(fixedResponseMap["message_body"].(string)), - StatusCode: aws.String(fixedResponseMap["status_code"].(string)), - } - } else { - return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") - } - - case elbv2.ActionTypeEnumAuthenticateCognito: - authenticateCognitoList := defaultActionMap["authenticate_cognito"].([]interface{}) - - if len(authenticateCognitoList) == 1 { - authenticateCognitoMap := authenticateCognitoList[0].(map[string]interface{}) - - authenticationRequestExtraParams := make(map[string]*string) - for key, value := range authenticateCognitoMap["authentication_request_extra_params"].(map[string]interface{}) { - authenticationRequestExtraParams[key] = aws.String(value.(string)) - } - - action.AuthenticateCognitoConfig = &elbv2.AuthenticateCognitoActionConfig{ - AuthenticationRequestExtraParams: authenticationRequestExtraParams, - UserPoolArn: aws.String(authenticateCognitoMap["user_pool_arn"].(string)), - UserPoolClientId: aws.String(authenticateCognitoMap["user_pool_client_id"].(string)), - UserPoolDomain: aws.String(authenticateCognitoMap["user_pool_domain"].(string)), - } - - if onUnauthenticatedRequest, ok := authenticateCognitoMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { - action.AuthenticateCognitoConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) - } - if scope, ok := authenticateCognitoMap["scope"]; ok && scope != "" { - action.AuthenticateCognitoConfig.Scope = aws.String(scope.(string)) - } - if sessionCookieName, ok := authenticateCognitoMap["session_cookie_name"]; ok && sessionCookieName != "" { - action.AuthenticateCognitoConfig.SessionCookieName = aws.String(sessionCookieName.(string)) - } - if sessionTimeout, ok := authenticateCognitoMap["session_timeout"]; ok && sessionTimeout != 0 { - action.AuthenticateCognitoConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) - } - } else { - return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") - } - - case elbv2.ActionTypeEnumAuthenticateOidc: - authenticateOidcList := defaultActionMap["authenticate_oidc"].([]interface{}) - - if len(authenticateOidcList) == 1 { - authenticateOidcMap := authenticateOidcList[0].(map[string]interface{}) - - authenticationRequestExtraParams := make(map[string]*string) - for key, value := range authenticateOidcMap["authentication_request_extra_params"].(map[string]interface{}) { - authenticationRequestExtraParams[key] = aws.String(value.(string)) - } - - action.AuthenticateOidcConfig = &elbv2.AuthenticateOidcActionConfig{ - AuthenticationRequestExtraParams: authenticationRequestExtraParams, - AuthorizationEndpoint: aws.String(authenticateOidcMap["authorization_endpoint"].(string)), - ClientId: aws.String(authenticateOidcMap["client_id"].(string)), - ClientSecret: aws.String(authenticateOidcMap["client_secret"].(string)), - Issuer: aws.String(authenticateOidcMap["issuer"].(string)), - TokenEndpoint: aws.String(authenticateOidcMap["token_endpoint"].(string)), - UserInfoEndpoint: aws.String(authenticateOidcMap["user_info_endpoint"].(string)), - } - - if onUnauthenticatedRequest, ok := authenticateOidcMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { - action.AuthenticateOidcConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) - } - if scope, ok := authenticateOidcMap["scope"]; ok && scope != "" { - action.AuthenticateOidcConfig.Scope = aws.String(scope.(string)) - } - if sessionCookieName, ok := authenticateOidcMap["session_cookie_name"]; ok && sessionCookieName != "" { - action.AuthenticateOidcConfig.SessionCookieName = aws.String(sessionCookieName.(string)) - } - if sessionTimeout, ok := authenticateOidcMap["session_timeout"]; ok && sessionTimeout != 0 { - action.AuthenticateOidcConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) - } - } else { - return errors.New("for actions of type 'authenticate-oidc', you must specify a 'authenticate_oidc' block") - } - } - - params.DefaultActions[i] = action - } - - var resp *elbv2.CreateListenerOutput - - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - var err error - log.Printf("[DEBUG] Creating LB listener for ARN: %s", d.Get("load_balancer_arn").(string)) - resp, err = elbconn.CreateListener(params) - if err != nil { - if isAWSErr(err, elbv2.ErrCodeCertificateNotFoundException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return fmt.Errorf("Error creating LB Listener: %s", err) - } - - if len(resp.Listeners) == 0 { - return errors.New("Error creating LB Listener: no listeners returned in response") - } - - d.SetId(*resp.Listeners[0].ListenerArn) - - return resourceAwsLbListenerRead(d, meta) -} - -func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - var resp *elbv2.DescribeListenersOutput - var request = &elbv2.DescribeListenersInput{ - ListenerArns: []*string{aws.String(d.Id())}, - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - resp, err = elbconn.DescribeListeners(request) - if d.IsNewResource() && isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { - return resource.RetryableError(err) - } - if err != nil { - return resource.NonRetryableError(err) - } - return nil - }) - - if isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { - log.Printf("[WARN] ELBv2 Listener (%s) not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("Error retrieving Listener: %s", err) - } - - if len(resp.Listeners) != 1 { - return fmt.Errorf("Error retrieving Listener %q", d.Id()) - } - - listener := resp.Listeners[0] - - d.Set("arn", listener.ListenerArn) - d.Set("load_balancer_arn", listener.LoadBalancerArn) - d.Set("port", listener.Port) - d.Set("protocol", listener.Protocol) - d.Set("ssl_policy", listener.SslPolicy) - - if listener.Certificates != nil && len(listener.Certificates) == 1 && listener.Certificates[0] != nil { - d.Set("certificate_arn", listener.Certificates[0].CertificateArn) - } - - sort.Slice(listener.DefaultActions, func(i, j int) bool { - return aws.Int64Value(listener.DefaultActions[i].Order) < aws.Int64Value(listener.DefaultActions[j].Order) - }) - defaultActions := make([]interface{}, len(listener.DefaultActions)) - for i, defaultAction := range listener.DefaultActions { - defaultActionMap := make(map[string]interface{}) - defaultActionMap["type"] = aws.StringValue(defaultAction.Type) - defaultActionMap["order"] = aws.Int64Value(defaultAction.Order) - - switch aws.StringValue(defaultAction.Type) { - case "forward": - defaultActionMap["target_group_arn"] = aws.StringValue(defaultAction.TargetGroupArn) - - case "redirect": - defaultActionMap["redirect"] = []map[string]interface{}{ - { - "host": aws.StringValue(defaultAction.RedirectConfig.Host), - "path": aws.StringValue(defaultAction.RedirectConfig.Path), - "port": aws.StringValue(defaultAction.RedirectConfig.Port), - "protocol": aws.StringValue(defaultAction.RedirectConfig.Protocol), - "query": aws.StringValue(defaultAction.RedirectConfig.Query), - "status_code": aws.StringValue(defaultAction.RedirectConfig.StatusCode), - }, - } - - case "fixed-response": - defaultActionMap["fixed_response"] = []map[string]interface{}{ - { - "content_type": aws.StringValue(defaultAction.FixedResponseConfig.ContentType), - "message_body": aws.StringValue(defaultAction.FixedResponseConfig.MessageBody), - "status_code": aws.StringValue(defaultAction.FixedResponseConfig.StatusCode), - }, - } - - case "authenticate-cognito": - authenticationRequestExtraParams := make(map[string]interface{}) - for key, value := range defaultAction.AuthenticateCognitoConfig.AuthenticationRequestExtraParams { - authenticationRequestExtraParams[key] = aws.StringValue(value) - } - defaultActionMap["authenticate_cognito"] = []map[string]interface{}{ - { - "authentication_request_extra_params": authenticationRequestExtraParams, - "on_unauthenticated_request": aws.StringValue(defaultAction.AuthenticateCognitoConfig.OnUnauthenticatedRequest), - "scope": aws.StringValue(defaultAction.AuthenticateCognitoConfig.Scope), - "session_cookie_name": aws.StringValue(defaultAction.AuthenticateCognitoConfig.SessionCookieName), - "session_timeout": aws.Int64Value(defaultAction.AuthenticateCognitoConfig.SessionTimeout), - "user_pool_arn": aws.StringValue(defaultAction.AuthenticateCognitoConfig.UserPoolArn), - "user_pool_client_id": aws.StringValue(defaultAction.AuthenticateCognitoConfig.UserPoolClientId), - "user_pool_domain": aws.StringValue(defaultAction.AuthenticateCognitoConfig.UserPoolDomain), - }, - } - - case "authenticate-oidc": - authenticationRequestExtraParams := make(map[string]interface{}) - for key, value := range defaultAction.AuthenticateOidcConfig.AuthenticationRequestExtraParams { - authenticationRequestExtraParams[key] = aws.StringValue(value) - } - - // The LB API currently provides no way to read the ClientSecret - // Instead we passthrough the configuration value into the state - clientSecret := d.Get("default_action." + strconv.Itoa(i) + ".authenticate_oidc.0.client_secret").(string) - - defaultActionMap["authenticate_oidc"] = []map[string]interface{}{ - { - "authentication_request_extra_params": authenticationRequestExtraParams, - "authorization_endpoint": aws.StringValue(defaultAction.AuthenticateOidcConfig.AuthorizationEndpoint), - "client_id": aws.StringValue(defaultAction.AuthenticateOidcConfig.ClientId), - "client_secret": clientSecret, - "issuer": aws.StringValue(defaultAction.AuthenticateOidcConfig.Issuer), - "on_unauthenticated_request": aws.StringValue(defaultAction.AuthenticateOidcConfig.OnUnauthenticatedRequest), - "scope": aws.StringValue(defaultAction.AuthenticateOidcConfig.Scope), - "session_cookie_name": aws.StringValue(defaultAction.AuthenticateOidcConfig.SessionCookieName), - "session_timeout": aws.Int64Value(defaultAction.AuthenticateOidcConfig.SessionTimeout), - "token_endpoint": aws.StringValue(defaultAction.AuthenticateOidcConfig.TokenEndpoint), - "user_info_endpoint": aws.StringValue(defaultAction.AuthenticateOidcConfig.UserInfoEndpoint), - }, - } - } - - defaultActions[i] = defaultActionMap - } - if err := d.Set("default_action", defaultActions); err != nil { - return fmt.Errorf("error setting default_action: %s", err) - } - - return nil -} - -func resourceAwsLbListenerUpdate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - params := &elbv2.ModifyListenerInput{ - ListenerArn: aws.String(d.Id()), - Port: aws.Int64(int64(d.Get("port").(int))), - Protocol: aws.String(d.Get("protocol").(string)), - } - - if sslPolicy, ok := d.GetOk("ssl_policy"); ok { - params.SslPolicy = aws.String(sslPolicy.(string)) - } - - if certificateArn, ok := d.GetOk("certificate_arn"); ok { - params.Certificates = make([]*elbv2.Certificate, 1) - params.Certificates[0] = &elbv2.Certificate{ - CertificateArn: aws.String(certificateArn.(string)), - } - } - - if d.HasChange("default_action") { - defaultActions := d.Get("default_action").([]interface{}) - params.DefaultActions = make([]*elbv2.Action, len(defaultActions)) - - for i, defaultAction := range defaultActions { - defaultActionMap := defaultAction.(map[string]interface{}) - - action := &elbv2.Action{ - Order: aws.Int64(int64(i + 1)), - Type: aws.String(defaultActionMap["type"].(string)), - } - - if order, ok := defaultActionMap["order"]; ok && order.(int) != 0 { - action.Order = aws.Int64(int64(order.(int))) - } - - switch defaultActionMap["type"].(string) { - case "forward": - action.TargetGroupArn = aws.String(defaultActionMap["target_group_arn"].(string)) - - case "redirect": - redirectList := defaultActionMap["redirect"].([]interface{}) - - if len(redirectList) == 1 { - redirectMap := redirectList[0].(map[string]interface{}) - - action.RedirectConfig = &elbv2.RedirectActionConfig{ - Host: aws.String(redirectMap["host"].(string)), - Path: aws.String(redirectMap["path"].(string)), - Port: aws.String(redirectMap["port"].(string)), - Protocol: aws.String(redirectMap["protocol"].(string)), - Query: aws.String(redirectMap["query"].(string)), - StatusCode: aws.String(redirectMap["status_code"].(string)), - } - } else { - return errors.New("for actions of type 'redirect', you must specify a 'redirect' block") - } - - case "fixed-response": - fixedResponseList := defaultActionMap["fixed_response"].([]interface{}) - - if len(fixedResponseList) == 1 { - fixedResponseMap := fixedResponseList[0].(map[string]interface{}) - - action.FixedResponseConfig = &elbv2.FixedResponseActionConfig{ - ContentType: aws.String(fixedResponseMap["content_type"].(string)), - MessageBody: aws.String(fixedResponseMap["message_body"].(string)), - StatusCode: aws.String(fixedResponseMap["status_code"].(string)), - } - } else { - return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") - } - - case "authenticate-cognito": - authenticateCognitoList := defaultActionMap["authenticate_cognito"].([]interface{}) - - if len(authenticateCognitoList) == 1 { - authenticateCognitoMap := authenticateCognitoList[0].(map[string]interface{}) - - authenticationRequestExtraParams := make(map[string]*string) - for key, value := range authenticateCognitoMap["authentication_request_extra_params"].(map[string]interface{}) { - authenticationRequestExtraParams[key] = aws.String(value.(string)) - } - - action.AuthenticateCognitoConfig = &elbv2.AuthenticateCognitoActionConfig{ - AuthenticationRequestExtraParams: authenticationRequestExtraParams, - UserPoolArn: aws.String(authenticateCognitoMap["user_pool_arn"].(string)), - UserPoolClientId: aws.String(authenticateCognitoMap["user_pool_client_id"].(string)), - UserPoolDomain: aws.String(authenticateCognitoMap["user_pool_domain"].(string)), - } - - if onUnauthenticatedRequest, ok := authenticateCognitoMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { - action.AuthenticateCognitoConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) - } - if scope, ok := authenticateCognitoMap["scope"]; ok && scope != "" { - action.AuthenticateCognitoConfig.Scope = aws.String(scope.(string)) - } - if sessionCookieName, ok := authenticateCognitoMap["session_cookie_name"]; ok && sessionCookieName != "" { - action.AuthenticateCognitoConfig.SessionCookieName = aws.String(sessionCookieName.(string)) - } - if sessionTimeout, ok := authenticateCognitoMap["session_timeout"]; ok && sessionTimeout != 0 { - action.AuthenticateCognitoConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) - } - } else { - return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") - } - - case "authenticate-oidc": - authenticateOidcList := defaultActionMap["authenticate_oidc"].([]interface{}) - - if len(authenticateOidcList) == 1 { - authenticateOidcMap := authenticateOidcList[0].(map[string]interface{}) - - authenticationRequestExtraParams := make(map[string]*string) - for key, value := range authenticateOidcMap["authentication_request_extra_params"].(map[string]interface{}) { - authenticationRequestExtraParams[key] = aws.String(value.(string)) - } - - action.AuthenticateOidcConfig = &elbv2.AuthenticateOidcActionConfig{ - AuthenticationRequestExtraParams: authenticationRequestExtraParams, - AuthorizationEndpoint: aws.String(authenticateOidcMap["authorization_endpoint"].(string)), - ClientId: aws.String(authenticateOidcMap["client_id"].(string)), - ClientSecret: aws.String(authenticateOidcMap["client_secret"].(string)), - Issuer: aws.String(authenticateOidcMap["issuer"].(string)), - TokenEndpoint: aws.String(authenticateOidcMap["token_endpoint"].(string)), - UserInfoEndpoint: aws.String(authenticateOidcMap["user_info_endpoint"].(string)), - } - - if onUnauthenticatedRequest, ok := authenticateOidcMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { - action.AuthenticateOidcConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) - } - if scope, ok := authenticateOidcMap["scope"]; ok && scope != "" { - action.AuthenticateOidcConfig.Scope = aws.String(scope.(string)) - } - if sessionCookieName, ok := authenticateOidcMap["session_cookie_name"]; ok && sessionCookieName != "" { - action.AuthenticateOidcConfig.SessionCookieName = aws.String(sessionCookieName.(string)) - } - if sessionTimeout, ok := authenticateOidcMap["session_timeout"]; ok && sessionTimeout != 0 { - action.AuthenticateOidcConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) - } - } else { - return errors.New("for actions of type 'authenticate-oidc', you must specify a 'authenticate_oidc' block") - } - } - - params.DefaultActions[i] = action - } - } - - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := elbconn.ModifyListener(params) - if err != nil { - if isAWSErr(err, elbv2.ErrCodeCertificateNotFoundException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error modifying LB Listener: %s", err) - } - - return resourceAwsLbListenerRead(d, meta) -} - -func resourceAwsLbListenerDelete(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - _, err := elbconn.DeleteListener(&elbv2.DeleteListenerInput{ - ListenerArn: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error deleting Listener: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_certificate.go deleted file mode 100644 index 51405e30f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_certificate.go +++ /dev/null @@ -1,156 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elbv2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsLbListenerCertificate() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLbListenerCertificateCreate, - Read: resourceAwsLbListenerCertificateRead, - Delete: resourceAwsLbListenerCertificateDelete, - - Schema: map[string]*schema.Schema{ - "listener_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "certificate_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsLbListenerCertificateCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elbv2conn - - params := &elbv2.AddListenerCertificatesInput{ - ListenerArn: aws.String(d.Get("listener_arn").(string)), - Certificates: []*elbv2.Certificate{ - { - CertificateArn: aws.String(d.Get("certificate_arn").(string)), - }, - }, - } - - log.Printf("[DEBUG] Adding certificate: %s of listener: %s", d.Get("certificate_arn").(string), d.Get("listener_arn").(string)) - resp, err := conn.AddListenerCertificates(params) - if err != nil { - return fmt.Errorf("Error creating LB Listener Certificate: %s", err) - } - - if len(resp.Certificates) == 0 { - return errors.New("Error creating LB Listener Certificate: no certificates returned in response") - } - - d.SetId(d.Get("listener_arn").(string) + "_" + d.Get("certificate_arn").(string)) - - return resourceAwsLbListenerCertificateRead(d, meta) -} - -func resourceAwsLbListenerCertificateRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elbv2conn - - certificateArn := d.Get("certificate_arn").(string) - listenerArn := d.Get("listener_arn").(string) - - log.Printf("[DEBUG] Reading certificate: %s of listener: %s", certificateArn, listenerArn) - - var certificate *elbv2.Certificate - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - certificate, err = findAwsLbListenerCertificate(certificateArn, listenerArn, true, nil, conn) - if err != nil { - return resource.NonRetryableError(err) - } - - if certificate == nil { - err = fmt.Errorf("certificate not found: %s", certificateArn) - if d.IsNewResource() { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - - return nil - }) - if err != nil { - if certificate == nil { - log.Printf("[WARN] %s - removing from state", err) - d.SetId("") - return nil - } - return err - } - - return nil -} - -func resourceAwsLbListenerCertificateDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).elbv2conn - log.Printf("[DEBUG] Deleting certificate: %s of listener: %s", d.Get("certificate_arn").(string), d.Get("listener_arn").(string)) - - params := &elbv2.RemoveListenerCertificatesInput{ - ListenerArn: aws.String(d.Get("listener_arn").(string)), - Certificates: []*elbv2.Certificate{ - { - CertificateArn: aws.String(d.Get("certificate_arn").(string)), - }, - }, - } - - _, err := conn.RemoveListenerCertificates(params) - if err != nil { - if isAWSErr(err, elbv2.ErrCodeCertificateNotFoundException, "") { - return nil - } - if isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { - return nil - } - return fmt.Errorf("Error removing LB Listener Certificate: %s", err) - } - - return nil -} - -func findAwsLbListenerCertificate(certificateArn, listenerArn string, skipDefault bool, nextMarker *string, conn *elbv2.ELBV2) (*elbv2.Certificate, error) { - params := &elbv2.DescribeListenerCertificatesInput{ - ListenerArn: aws.String(listenerArn), - PageSize: aws.Int64(400), - } - if nextMarker != nil { - params.Marker = nextMarker - } - - resp, err := conn.DescribeListenerCertificates(params) - if err != nil { - return nil, err - } - - for _, cert := range resp.Certificates { - if skipDefault && aws.BoolValue(cert.IsDefault) { - continue - } - - if aws.StringValue(cert.CertificateArn) == certificateArn { - return cert, nil - } - } - - if resp.NextMarker != nil { - return findAwsLbListenerCertificate(certificateArn, listenerArn, skipDefault, resp.NextMarker, conn) - } - return nil, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go deleted file mode 100644 index a6edf2293..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go +++ /dev/null @@ -1,922 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "regexp" - "sort" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elbv2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsLbbListenerRule() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLbListenerRuleCreate, - Read: resourceAwsLbListenerRuleRead, - Update: resourceAwsLbListenerRuleUpdate, - Delete: resourceAwsLbListenerRuleDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "listener_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "priority": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateAwsLbListenerRulePriority, - }, - "action": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - elbv2.ActionTypeEnumAuthenticateCognito, - elbv2.ActionTypeEnumAuthenticateOidc, - elbv2.ActionTypeEnumFixedResponse, - elbv2.ActionTypeEnumForward, - elbv2.ActionTypeEnumRedirect, - }, true), - }, - "order": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ValidateFunc: validation.IntBetween(1, 50000), - }, - - "target_group_arn": { - Type: schema.TypeString, - Optional: true, - DiffSuppressFunc: suppressIfActionTypeNot("forward"), - }, - - "redirect": { - Type: schema.TypeList, - Optional: true, - DiffSuppressFunc: suppressIfActionTypeNot("redirect"), - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "host": { - Type: schema.TypeString, - Optional: true, - Default: "#{host}", - }, - - "path": { - Type: schema.TypeString, - Optional: true, - Default: "/#{path}", - }, - - "port": { - Type: schema.TypeString, - Optional: true, - Default: "#{port}", - }, - - "protocol": { - Type: schema.TypeString, - Optional: true, - Default: "#{protocol}", - ValidateFunc: validation.StringInSlice([]string{ - "#{protocol}", - "HTTP", - "HTTPS", - }, false), - }, - - "query": { - Type: schema.TypeString, - Optional: true, - Default: "#{query}", - }, - - "status_code": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - "HTTP_301", - "HTTP_302", - }, false), - }, - }, - }, - }, - - "fixed_response": { - Type: schema.TypeList, - Optional: true, - DiffSuppressFunc: suppressIfActionTypeNot("fixed-response"), - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "content_type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - "text/plain", - "text/css", - "text/html", - "application/javascript", - "application/json", - }, false), - }, - - "message_body": { - Type: schema.TypeString, - Optional: true, - }, - - "status_code": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[245]\d\d$`), ""), - }, - }, - }, - }, - - "authenticate_cognito": { - Type: schema.TypeList, - Optional: true, - DiffSuppressFunc: suppressIfDefaultActionTypeNot(elbv2.ActionTypeEnumAuthenticateCognito), - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "authentication_request_extra_params": { - Type: schema.TypeMap, - Optional: true, - }, - "on_unauthenticated_request": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - elbv2.AuthenticateCognitoActionConditionalBehaviorEnumDeny, - elbv2.AuthenticateCognitoActionConditionalBehaviorEnumAllow, - elbv2.AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate, - }, true), - }, - "scope": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "session_cookie_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "session_timeout": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - "user_pool_arn": { - Type: schema.TypeString, - Required: true, - }, - "user_pool_client_id": { - Type: schema.TypeString, - Required: true, - }, - "user_pool_domain": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - - "authenticate_oidc": { - Type: schema.TypeList, - Optional: true, - DiffSuppressFunc: suppressIfDefaultActionTypeNot(elbv2.ActionTypeEnumAuthenticateOidc), - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "authentication_request_extra_params": { - Type: schema.TypeMap, - Optional: true, - }, - "authorization_endpoint": { - Type: schema.TypeString, - Required: true, - }, - "client_id": { - Type: schema.TypeString, - Required: true, - }, - "client_secret": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - }, - "issuer": { - Type: schema.TypeString, - Required: true, - }, - "on_unauthenticated_request": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - elbv2.AuthenticateOidcActionConditionalBehaviorEnumDeny, - elbv2.AuthenticateOidcActionConditionalBehaviorEnumAllow, - elbv2.AuthenticateOidcActionConditionalBehaviorEnumAuthenticate, - }, true), - }, - "scope": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "session_cookie_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "session_timeout": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - "token_endpoint": { - Type: schema.TypeString, - Required: true, - }, - "user_info_endpoint": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - }, - }, - "condition": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "field": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 64), - }, - "values": { - Type: schema.TypeList, - MaxItems: 1, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - }, - }, - }, - }, - }, - } -} - -func suppressIfActionTypeNot(t string) schema.SchemaDiffSuppressFunc { - return func(k, old, new string, d *schema.ResourceData) bool { - take := 2 - i := strings.IndexFunc(k, func(r rune) bool { - if r == '.' { - take -= 1 - return take == 0 - } - return false - }) - at := k[:i+1] + "type" - return d.Get(at).(string) != t - } -} - -func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - listenerArn := d.Get("listener_arn").(string) - - params := &elbv2.CreateRuleInput{ - ListenerArn: aws.String(listenerArn), - } - - actions := d.Get("action").([]interface{}) - params.Actions = make([]*elbv2.Action, len(actions)) - for i, action := range actions { - actionMap := action.(map[string]interface{}) - - action := &elbv2.Action{ - Order: aws.Int64(int64(i + 1)), - Type: aws.String(actionMap["type"].(string)), - } - - if order, ok := actionMap["order"]; ok && order.(int) != 0 { - action.Order = aws.Int64(int64(order.(int))) - } - - switch actionMap["type"].(string) { - case "forward": - action.TargetGroupArn = aws.String(actionMap["target_group_arn"].(string)) - - case "redirect": - redirectList := actionMap["redirect"].([]interface{}) - - if len(redirectList) == 1 { - redirectMap := redirectList[0].(map[string]interface{}) - - action.RedirectConfig = &elbv2.RedirectActionConfig{ - Host: aws.String(redirectMap["host"].(string)), - Path: aws.String(redirectMap["path"].(string)), - Port: aws.String(redirectMap["port"].(string)), - Protocol: aws.String(redirectMap["protocol"].(string)), - Query: aws.String(redirectMap["query"].(string)), - StatusCode: aws.String(redirectMap["status_code"].(string)), - } - } else { - return errors.New("for actions of type 'redirect', you must specify a 'redirect' block") - } - - case "fixed-response": - fixedResponseList := actionMap["fixed_response"].([]interface{}) - - if len(fixedResponseList) == 1 { - fixedResponseMap := fixedResponseList[0].(map[string]interface{}) - - action.FixedResponseConfig = &elbv2.FixedResponseActionConfig{ - ContentType: aws.String(fixedResponseMap["content_type"].(string)), - MessageBody: aws.String(fixedResponseMap["message_body"].(string)), - StatusCode: aws.String(fixedResponseMap["status_code"].(string)), - } - } else { - return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") - } - - case "authenticate-cognito": - authenticateCognitoList := actionMap["authenticate_cognito"].([]interface{}) - - if len(authenticateCognitoList) == 1 { - authenticateCognitoMap := authenticateCognitoList[0].(map[string]interface{}) - - authenticationRequestExtraParams := make(map[string]*string) - for key, value := range authenticateCognitoMap["authentication_request_extra_params"].(map[string]interface{}) { - authenticationRequestExtraParams[key] = aws.String(value.(string)) - } - - action.AuthenticateCognitoConfig = &elbv2.AuthenticateCognitoActionConfig{ - AuthenticationRequestExtraParams: authenticationRequestExtraParams, - UserPoolArn: aws.String(authenticateCognitoMap["user_pool_arn"].(string)), - UserPoolClientId: aws.String(authenticateCognitoMap["user_pool_client_id"].(string)), - UserPoolDomain: aws.String(authenticateCognitoMap["user_pool_domain"].(string)), - } - - if onUnauthenticatedRequest, ok := authenticateCognitoMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { - action.AuthenticateCognitoConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) - } - if scope, ok := authenticateCognitoMap["scope"]; ok && scope != "" { - action.AuthenticateCognitoConfig.Scope = aws.String(scope.(string)) - } - if sessionCookieName, ok := authenticateCognitoMap["session_cookie_name"]; ok && sessionCookieName != "" { - action.AuthenticateCognitoConfig.SessionCookieName = aws.String(sessionCookieName.(string)) - } - if sessionTimeout, ok := authenticateCognitoMap["session_timeout"]; ok && sessionTimeout != 0 { - action.AuthenticateCognitoConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) - } - } else { - return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") - } - - case "authenticate-oidc": - authenticateOidcList := actionMap["authenticate_oidc"].([]interface{}) - - if len(authenticateOidcList) == 1 { - authenticateOidcMap := authenticateOidcList[0].(map[string]interface{}) - - authenticationRequestExtraParams := make(map[string]*string) - for key, value := range authenticateOidcMap["authentication_request_extra_params"].(map[string]interface{}) { - authenticationRequestExtraParams[key] = aws.String(value.(string)) - } - - action.AuthenticateOidcConfig = &elbv2.AuthenticateOidcActionConfig{ - AuthenticationRequestExtraParams: authenticationRequestExtraParams, - AuthorizationEndpoint: aws.String(authenticateOidcMap["authorization_endpoint"].(string)), - ClientId: aws.String(authenticateOidcMap["client_id"].(string)), - ClientSecret: aws.String(authenticateOidcMap["client_secret"].(string)), - Issuer: aws.String(authenticateOidcMap["issuer"].(string)), - TokenEndpoint: aws.String(authenticateOidcMap["token_endpoint"].(string)), - UserInfoEndpoint: aws.String(authenticateOidcMap["user_info_endpoint"].(string)), - } - - if onUnauthenticatedRequest, ok := authenticateOidcMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { - action.AuthenticateOidcConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) - } - if scope, ok := authenticateOidcMap["scope"]; ok && scope != "" { - action.AuthenticateOidcConfig.Scope = aws.String(scope.(string)) - } - if sessionCookieName, ok := authenticateOidcMap["session_cookie_name"]; ok && sessionCookieName != "" { - action.AuthenticateOidcConfig.SessionCookieName = aws.String(sessionCookieName.(string)) - } - if sessionTimeout, ok := authenticateOidcMap["session_timeout"]; ok && sessionTimeout != 0 { - action.AuthenticateOidcConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) - } - } else { - return errors.New("for actions of type 'authenticate-oidc', you must specify a 'authenticate_oidc' block") - } - } - - params.Actions[i] = action - } - - conditions := d.Get("condition").(*schema.Set).List() - params.Conditions = make([]*elbv2.RuleCondition, len(conditions)) - for i, condition := range conditions { - conditionMap := condition.(map[string]interface{}) - values := conditionMap["values"].([]interface{}) - params.Conditions[i] = &elbv2.RuleCondition{ - Field: aws.String(conditionMap["field"].(string)), - Values: make([]*string, len(values)), - } - for j, value := range values { - params.Conditions[i].Values[j] = aws.String(value.(string)) - } - } - - var resp *elbv2.CreateRuleOutput - if v, ok := d.GetOk("priority"); ok { - var err error - params.Priority = aws.Int64(int64(v.(int))) - resp, err = elbconn.CreateRule(params) - if err != nil { - return fmt.Errorf("Error creating LB Listener Rule: %v", err) - } - } else { - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - var err error - priority, err := highestListenerRulePriority(elbconn, listenerArn) - if err != nil { - return resource.NonRetryableError(err) - } - params.Priority = aws.Int64(priority + 1) - resp, err = elbconn.CreateRule(params) - if err != nil { - if isAWSErr(err, elbv2.ErrCodePriorityInUseException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error creating LB Listener Rule: %v", err) - } - } - - if len(resp.Rules) == 0 { - return errors.New("Error creating LB Listener Rule: no rules returned in response") - } - - d.SetId(aws.StringValue(resp.Rules[0].RuleArn)) - - return resourceAwsLbListenerRuleRead(d, meta) -} - -func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - var resp *elbv2.DescribeRulesOutput - var req = &elbv2.DescribeRulesInput{ - RuleArns: []*string{aws.String(d.Id())}, - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - resp, err = elbconn.DescribeRules(req) - if err != nil { - if d.IsNewResource() && isAWSErr(err, elbv2.ErrCodeRuleNotFoundException, "") { - return resource.RetryableError(err) - } else { - return resource.NonRetryableError(err) - } - } - return nil - }) - - if err != nil { - if isAWSErr(err, elbv2.ErrCodeRuleNotFoundException, "") { - log.Printf("[WARN] DescribeRules - removing %s from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error retrieving Rules for listener %q: %s", d.Id(), err) - } - - if len(resp.Rules) != 1 { - return fmt.Errorf("Error retrieving Rule %q", d.Id()) - } - - rule := resp.Rules[0] - - d.Set("arn", rule.RuleArn) - - // The listener arn isn't in the response but can be derived from the rule arn - d.Set("listener_arn", lbListenerARNFromRuleARN(aws.StringValue(rule.RuleArn))) - - // Rules are evaluated in priority order, from the lowest value to the highest value. The default rule has the lowest priority. - if aws.StringValue(rule.Priority) == "default" { - d.Set("priority", 99999) - } else { - if priority, err := strconv.Atoi(aws.StringValue(rule.Priority)); err != nil { - return fmt.Errorf("Cannot convert rule priority %q to int: %s", aws.StringValue(rule.Priority), err) - } else { - d.Set("priority", priority) - } - } - - sort.Slice(rule.Actions, func(i, j int) bool { - return aws.Int64Value(rule.Actions[i].Order) < aws.Int64Value(rule.Actions[j].Order) - }) - actions := make([]interface{}, len(rule.Actions)) - for i, action := range rule.Actions { - actionMap := make(map[string]interface{}) - actionMap["type"] = aws.StringValue(action.Type) - actionMap["order"] = aws.Int64Value(action.Order) - - switch actionMap["type"] { - case "forward": - actionMap["target_group_arn"] = aws.StringValue(action.TargetGroupArn) - - case "redirect": - actionMap["redirect"] = []map[string]interface{}{ - { - "host": aws.StringValue(action.RedirectConfig.Host), - "path": aws.StringValue(action.RedirectConfig.Path), - "port": aws.StringValue(action.RedirectConfig.Port), - "protocol": aws.StringValue(action.RedirectConfig.Protocol), - "query": aws.StringValue(action.RedirectConfig.Query), - "status_code": aws.StringValue(action.RedirectConfig.StatusCode), - }, - } - - case "fixed-response": - actionMap["fixed_response"] = []map[string]interface{}{ - { - "content_type": aws.StringValue(action.FixedResponseConfig.ContentType), - "message_body": aws.StringValue(action.FixedResponseConfig.MessageBody), - "status_code": aws.StringValue(action.FixedResponseConfig.StatusCode), - }, - } - - case "authenticate-cognito": - authenticationRequestExtraParams := make(map[string]interface{}) - for key, value := range action.AuthenticateCognitoConfig.AuthenticationRequestExtraParams { - authenticationRequestExtraParams[key] = aws.StringValue(value) - } - - actionMap["authenticate_cognito"] = []map[string]interface{}{ - { - "authentication_request_extra_params": authenticationRequestExtraParams, - "on_unauthenticated_request": aws.StringValue(action.AuthenticateCognitoConfig.OnUnauthenticatedRequest), - "scope": aws.StringValue(action.AuthenticateCognitoConfig.Scope), - "session_cookie_name": aws.StringValue(action.AuthenticateCognitoConfig.SessionCookieName), - "session_timeout": aws.Int64Value(action.AuthenticateCognitoConfig.SessionTimeout), - "user_pool_arn": aws.StringValue(action.AuthenticateCognitoConfig.UserPoolArn), - "user_pool_client_id": aws.StringValue(action.AuthenticateCognitoConfig.UserPoolClientId), - "user_pool_domain": aws.StringValue(action.AuthenticateCognitoConfig.UserPoolDomain), - }, - } - - case "authenticate-oidc": - authenticationRequestExtraParams := make(map[string]interface{}) - for key, value := range action.AuthenticateOidcConfig.AuthenticationRequestExtraParams { - authenticationRequestExtraParams[key] = aws.StringValue(value) - } - - // The LB API currently provides no way to read the ClientSecret - // Instead we passthrough the configuration value into the state - clientSecret := d.Get("action." + strconv.Itoa(i) + ".authenticate_oidc.0.client_secret").(string) - - actionMap["authenticate_oidc"] = []map[string]interface{}{ - { - "authentication_request_extra_params": authenticationRequestExtraParams, - "authorization_endpoint": aws.StringValue(action.AuthenticateOidcConfig.AuthorizationEndpoint), - "client_id": aws.StringValue(action.AuthenticateOidcConfig.ClientId), - "client_secret": clientSecret, - "issuer": aws.StringValue(action.AuthenticateOidcConfig.Issuer), - "on_unauthenticated_request": aws.StringValue(action.AuthenticateOidcConfig.OnUnauthenticatedRequest), - "scope": aws.StringValue(action.AuthenticateOidcConfig.Scope), - "session_cookie_name": aws.StringValue(action.AuthenticateOidcConfig.SessionCookieName), - "session_timeout": aws.Int64Value(action.AuthenticateOidcConfig.SessionTimeout), - "token_endpoint": aws.StringValue(action.AuthenticateOidcConfig.TokenEndpoint), - "user_info_endpoint": aws.StringValue(action.AuthenticateOidcConfig.UserInfoEndpoint), - }, - } - } - - actions[i] = actionMap - } - d.Set("action", actions) - - conditions := make([]interface{}, len(rule.Conditions)) - for i, condition := range rule.Conditions { - conditionMap := make(map[string]interface{}) - conditionMap["field"] = aws.StringValue(condition.Field) - conditionValues := make([]string, len(condition.Values)) - for k, value := range condition.Values { - conditionValues[k] = aws.StringValue(value) - } - conditionMap["values"] = conditionValues - conditions[i] = conditionMap - } - d.Set("condition", conditions) - - return nil -} - -func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - d.Partial(true) - - if d.HasChange("priority") { - params := &elbv2.SetRulePrioritiesInput{ - RulePriorities: []*elbv2.RulePriorityPair{ - { - RuleArn: aws.String(d.Id()), - Priority: aws.Int64(int64(d.Get("priority").(int))), - }, - }, - } - - _, err := elbconn.SetRulePriorities(params) - if err != nil { - return err - } - - d.SetPartial("priority") - } - - requestUpdate := false - params := &elbv2.ModifyRuleInput{ - RuleArn: aws.String(d.Id()), - } - - if d.HasChange("action") { - actions := d.Get("action").([]interface{}) - params.Actions = make([]*elbv2.Action, len(actions)) - for i, action := range actions { - actionMap := action.(map[string]interface{}) - - action := &elbv2.Action{ - Order: aws.Int64(int64(i + 1)), - Type: aws.String(actionMap["type"].(string)), - } - - if order, ok := actionMap["order"]; ok && order.(int) != 0 { - action.Order = aws.Int64(int64(order.(int))) - } - - switch actionMap["type"].(string) { - case "forward": - action.TargetGroupArn = aws.String(actionMap["target_group_arn"].(string)) - - case "redirect": - redirectList := actionMap["redirect"].([]interface{}) - - if len(redirectList) == 1 { - redirectMap := redirectList[0].(map[string]interface{}) - - action.RedirectConfig = &elbv2.RedirectActionConfig{ - Host: aws.String(redirectMap["host"].(string)), - Path: aws.String(redirectMap["path"].(string)), - Port: aws.String(redirectMap["port"].(string)), - Protocol: aws.String(redirectMap["protocol"].(string)), - Query: aws.String(redirectMap["query"].(string)), - StatusCode: aws.String(redirectMap["status_code"].(string)), - } - } else { - return errors.New("for actions of type 'redirect', you must specify a 'redirect' block") - } - - case "fixed-response": - fixedResponseList := actionMap["fixed_response"].([]interface{}) - - if len(fixedResponseList) == 1 { - fixedResponseMap := fixedResponseList[0].(map[string]interface{}) - - action.FixedResponseConfig = &elbv2.FixedResponseActionConfig{ - ContentType: aws.String(fixedResponseMap["content_type"].(string)), - MessageBody: aws.String(fixedResponseMap["message_body"].(string)), - StatusCode: aws.String(fixedResponseMap["status_code"].(string)), - } - } else { - return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") - } - - case "authenticate-cognito": - authenticateCognitoList := actionMap["authenticate_cognito"].([]interface{}) - - if len(authenticateCognitoList) == 1 { - authenticateCognitoMap := authenticateCognitoList[0].(map[string]interface{}) - - authenticationRequestExtraParams := make(map[string]*string) - for key, value := range authenticateCognitoMap["authentication_request_extra_params"].(map[string]interface{}) { - authenticationRequestExtraParams[key] = aws.String(value.(string)) - } - - action.AuthenticateCognitoConfig = &elbv2.AuthenticateCognitoActionConfig{ - AuthenticationRequestExtraParams: authenticationRequestExtraParams, - UserPoolArn: aws.String(authenticateCognitoMap["user_pool_arn"].(string)), - UserPoolClientId: aws.String(authenticateCognitoMap["user_pool_client_id"].(string)), - UserPoolDomain: aws.String(authenticateCognitoMap["user_pool_domain"].(string)), - } - - if onUnauthenticatedRequest, ok := authenticateCognitoMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { - action.AuthenticateCognitoConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) - } - if scope, ok := authenticateCognitoMap["scope"]; ok && scope != "" { - action.AuthenticateCognitoConfig.Scope = aws.String(scope.(string)) - } - if sessionCookieName, ok := authenticateCognitoMap["session_cookie_name"]; ok && sessionCookieName != "" { - action.AuthenticateCognitoConfig.SessionCookieName = aws.String(sessionCookieName.(string)) - } - if sessionTimeout, ok := authenticateCognitoMap["session_timeout"]; ok && sessionTimeout != 0 { - action.AuthenticateCognitoConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) - } - } else { - return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") - } - - case "authenticate-oidc": - authenticateOidcList := actionMap["authenticate_oidc"].([]interface{}) - - if len(authenticateOidcList) == 1 { - authenticateOidcMap := authenticateOidcList[0].(map[string]interface{}) - - authenticationRequestExtraParams := make(map[string]*string) - for key, value := range authenticateOidcMap["authentication_request_extra_params"].(map[string]interface{}) { - authenticationRequestExtraParams[key] = aws.String(value.(string)) - } - - action.AuthenticateOidcConfig = &elbv2.AuthenticateOidcActionConfig{ - AuthenticationRequestExtraParams: authenticationRequestExtraParams, - AuthorizationEndpoint: aws.String(authenticateOidcMap["authorization_endpoint"].(string)), - ClientId: aws.String(authenticateOidcMap["client_id"].(string)), - ClientSecret: aws.String(authenticateOidcMap["client_secret"].(string)), - Issuer: aws.String(authenticateOidcMap["issuer"].(string)), - TokenEndpoint: aws.String(authenticateOidcMap["token_endpoint"].(string)), - UserInfoEndpoint: aws.String(authenticateOidcMap["user_info_endpoint"].(string)), - } - - if onUnauthenticatedRequest, ok := authenticateOidcMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { - action.AuthenticateOidcConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) - } - if scope, ok := authenticateOidcMap["scope"]; ok && scope != "" { - action.AuthenticateOidcConfig.Scope = aws.String(scope.(string)) - } - if sessionCookieName, ok := authenticateOidcMap["session_cookie_name"]; ok && sessionCookieName != "" { - action.AuthenticateOidcConfig.SessionCookieName = aws.String(sessionCookieName.(string)) - } - if sessionTimeout, ok := authenticateOidcMap["session_timeout"]; ok && sessionTimeout != 0 { - action.AuthenticateOidcConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) - } - } else { - return errors.New("for actions of type 'authenticate-oidc', you must specify a 'authenticate_oidc' block") - } - } - - params.Actions[i] = action - } - requestUpdate = true - d.SetPartial("action") - } - - if d.HasChange("condition") { - conditions := d.Get("condition").(*schema.Set).List() - params.Conditions = make([]*elbv2.RuleCondition, len(conditions)) - for i, condition := range conditions { - conditionMap := condition.(map[string]interface{}) - values := conditionMap["values"].([]interface{}) - params.Conditions[i] = &elbv2.RuleCondition{ - Field: aws.String(conditionMap["field"].(string)), - Values: make([]*string, len(values)), - } - for j, value := range values { - params.Conditions[i].Values[j] = aws.String(value.(string)) - } - } - requestUpdate = true - d.SetPartial("condition") - } - - if requestUpdate { - resp, err := elbconn.ModifyRule(params) - if err != nil { - return fmt.Errorf("Error modifying LB Listener Rule: %s", err) - } - - if len(resp.Rules) == 0 { - return errors.New("Error modifying creating LB Listener Rule: no rules returned in response") - } - } - - d.Partial(false) - - return resourceAwsLbListenerRuleRead(d, meta) -} - -func resourceAwsLbListenerRuleDelete(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - _, err := elbconn.DeleteRule(&elbv2.DeleteRuleInput{ - RuleArn: aws.String(d.Id()), - }) - if err != nil && !isAWSErr(err, elbv2.ErrCodeRuleNotFoundException, "") { - return fmt.Errorf("Error deleting LB Listener Rule: %s", err) - } - return nil -} - -func validateAwsLbListenerRulePriority(v interface{}, k string) (ws []string, errors []error) { - value := v.(int) - if value < 1 || (value > 50000 && value != 99999) { - errors = append(errors, fmt.Errorf("%q must be in the range 1-50000 for normal rule or 99999 for default rule", k)) - } - return -} - -// from arn: -// arn:aws:elasticloadbalancing:us-east-1:012345678912:listener-rule/app/name/0123456789abcdef/abcdef0123456789/456789abcedf1234 -// select submatches: -// (arn:aws:elasticloadbalancing:us-east-1:012345678912:listener)-rule(/app/name/0123456789abcdef/abcdef0123456789)/456789abcedf1234 -// concat to become: -// arn:aws:elasticloadbalancing:us-east-1:012345678912:listener/app/name/0123456789abcdef/abcdef0123456789 -var lbListenerARNFromRuleARNRegexp = regexp.MustCompile(`^(arn:.+:listener)-rule(/.+)/[^/]+$`) - -func lbListenerARNFromRuleARN(ruleArn string) string { - if arnComponents := lbListenerARNFromRuleARNRegexp.FindStringSubmatch(ruleArn); len(arnComponents) > 1 { - return arnComponents[1] + arnComponents[2] - } - - return "" -} - -func highestListenerRulePriority(conn *elbv2.ELBV2, arn string) (priority int64, err error) { - var priorities []int - var nextMarker *string - - for { - out, aerr := conn.DescribeRules(&elbv2.DescribeRulesInput{ - ListenerArn: aws.String(arn), - Marker: nextMarker, - }) - if aerr != nil { - err = aerr - return - } - for _, rule := range out.Rules { - if aws.StringValue(rule.Priority) != "default" { - p, _ := strconv.Atoi(aws.StringValue(rule.Priority)) - priorities = append(priorities, p) - } - } - if out.NextMarker == nil { - break - } - nextMarker = out.NextMarker - } - - if len(priorities) == 0 { - priority = 0 - return - } - - sort.IntSlice(priorities).Sort() - priority = int64(priorities[len(priorities)-1]) - - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_ssl_negotiation_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_ssl_negotiation_policy.go deleted file mode 100644 index eab8350ff..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_ssl_negotiation_policy.go +++ /dev/null @@ -1,189 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsLBSSLNegotiationPolicy() *schema.Resource { - return &schema.Resource{ - // There is no concept of "updating" an LB policy in - // the AWS API. - Create: resourceAwsLBSSLNegotiationPolicyCreate, - Read: resourceAwsLBSSLNegotiationPolicyRead, - Delete: resourceAwsLBSSLNegotiationPolicyDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "load_balancer": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "lb_port": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - - "attribute": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) - return hashcode.String(buf.String()) - }, - }, - }, - } -} - -func resourceAwsLBSSLNegotiationPolicyCreate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - // Provision the SSLNegotiationPolicy - lbspOpts := &elb.CreateLoadBalancerPolicyInput{ - LoadBalancerName: aws.String(d.Get("load_balancer").(string)), - PolicyName: aws.String(d.Get("name").(string)), - PolicyTypeName: aws.String("SSLNegotiationPolicyType"), - } - - // Check for Policy Attributes - if v, ok := d.GetOk("attribute"); ok { - var err error - // Expand the "attribute" set to aws-sdk-go compat []*elb.PolicyAttribute - lbspOpts.PolicyAttributes, err = expandPolicyAttributes(v.(*schema.Set).List()) - if err != nil { - return err - } - } - - log.Printf("[DEBUG] Load Balancer Policy opts: %#v", lbspOpts) - if _, err := elbconn.CreateLoadBalancerPolicy(lbspOpts); err != nil { - return fmt.Errorf("Error creating Load Balancer Policy: %s", err) - } - - setLoadBalancerOpts := &elb.SetLoadBalancerPoliciesOfListenerInput{ - LoadBalancerName: aws.String(d.Get("load_balancer").(string)), - LoadBalancerPort: aws.Int64(int64(d.Get("lb_port").(int))), - PolicyNames: []*string{aws.String(d.Get("name").(string))}, - } - - log.Printf("[DEBUG] SSL Negotiation create configuration: %#v", setLoadBalancerOpts) - if _, err := elbconn.SetLoadBalancerPoliciesOfListener(setLoadBalancerOpts); err != nil { - return fmt.Errorf("Error setting SSLNegotiationPolicy: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%d:%s", - *lbspOpts.LoadBalancerName, - *setLoadBalancerOpts.LoadBalancerPort, - *lbspOpts.PolicyName)) - return nil -} - -func resourceAwsLBSSLNegotiationPolicyRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - lbName, lbPort, policyName := resourceAwsLBSSLNegotiationPolicyParseId(d.Id()) - - request := &elb.DescribeLoadBalancerPoliciesInput{ - LoadBalancerName: aws.String(lbName), - PolicyNames: []*string{aws.String(policyName)}, - } - - getResp, err := elbconn.DescribeLoadBalancerPolicies(request) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "PolicyNotFound" { - // The policy is gone. - d.SetId("") - return nil - } else if isLoadBalancerNotFound(err) { - // The ELB is gone now, so just remove it from the state - d.SetId("") - return nil - } - return fmt.Errorf("Error retrieving policy: %s", err) - } - - if len(getResp.PolicyDescriptions) != 1 { - return fmt.Errorf("Unable to find policy %#v", getResp.PolicyDescriptions) - } - - // We can get away with this because there's only one policy returned - policyDesc := getResp.PolicyDescriptions[0] - attributes := flattenPolicyAttributes(policyDesc.PolicyAttributeDescriptions) - d.Set("attributes", attributes) - - d.Set("name", policyName) - d.Set("load_balancer", lbName) - d.Set("lb_port", lbPort) - - return nil -} - -func resourceAwsLBSSLNegotiationPolicyDelete(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - lbName, _, policyName := resourceAwsLBSSLNegotiationPolicyParseId(d.Id()) - - // Perversely, if we Set an empty list of PolicyNames, we detach the - // policies attached to a listener, which is required to delete the - // policy itself. - setLoadBalancerOpts := &elb.SetLoadBalancerPoliciesOfListenerInput{ - LoadBalancerName: aws.String(d.Get("load_balancer").(string)), - LoadBalancerPort: aws.Int64(int64(d.Get("lb_port").(int))), - PolicyNames: []*string{}, - } - - if _, err := elbconn.SetLoadBalancerPoliciesOfListener(setLoadBalancerOpts); err != nil { - return fmt.Errorf("Error removing SSLNegotiationPolicy: %s", err) - } - - request := &elb.DeleteLoadBalancerPolicyInput{ - LoadBalancerName: aws.String(lbName), - PolicyName: aws.String(policyName), - } - - if _, err := elbconn.DeleteLoadBalancerPolicy(request); err != nil { - return fmt.Errorf("Error deleting SSL negotiation policy %s: %s", d.Id(), err) - } - return nil -} - -// resourceAwsLBSSLNegotiationPolicyParseId takes an ID and parses it into -// it's constituent parts. You need three axes (LB name, policy name, and LB -// port) to create or identify an SSL negotiation policy in AWS's API. -func resourceAwsLBSSLNegotiationPolicyParseId(id string) (string, string, string) { - parts := strings.SplitN(id, ":", 3) - return parts[0], parts[1], parts[2] -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go deleted file mode 100644 index 94ffb3d8a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go +++ /dev/null @@ -1,710 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "regexp" - "strconv" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elbv2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsLbTargetGroup() *schema.Resource { - return &schema.Resource{ - // NLBs have restrictions on them at this time - CustomizeDiff: resourceAwsLbTargetGroupCustomizeDiff, - - Create: resourceAwsLbTargetGroupCreate, - Read: resourceAwsLbTargetGroupRead, - Update: resourceAwsLbTargetGroupUpdate, - Delete: resourceAwsLbTargetGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "arn_suffix": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateLbTargetGroupName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateLbTargetGroupNamePrefix, - }, - - "port": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - ValidateFunc: validation.IntBetween(1, 65535), - }, - - "protocol": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - elbv2.ProtocolEnumHttp, - elbv2.ProtocolEnumHttps, - elbv2.ProtocolEnumTcp, - elbv2.ProtocolEnumTls, - }, true), - }, - - "vpc_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "deregistration_delay": { - Type: schema.TypeInt, - Optional: true, - Default: 300, - ValidateFunc: validation.IntBetween(0, 3600), - }, - - "slow_start": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - ValidateFunc: validateSlowStart, - }, - - "proxy_protocol_v2": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "target_type": { - Type: schema.TypeString, - Optional: true, - Default: elbv2.TargetTypeEnumInstance, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - elbv2.TargetTypeEnumInstance, - elbv2.TargetTypeEnumIp, - elbv2.TargetTypeEnumLambda, - }, false), - }, - - "stickiness": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - "lb_cookie", - }, false), - }, - "cookie_duration": { - Type: schema.TypeInt, - Optional: true, - Default: 86400, - ValidateFunc: validation.IntBetween(0, 604800), - }, - }, - }, - }, - - "health_check": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "interval": { - Type: schema.TypeInt, - Optional: true, - Default: 30, - }, - - "path": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateAwsLbTargetGroupHealthCheckPath, - }, - - "port": { - Type: schema.TypeString, - Optional: true, - Default: "traffic-port", - ValidateFunc: validateAwsLbTargetGroupHealthCheckPort, - }, - - "protocol": { - Type: schema.TypeString, - Optional: true, - Default: "HTTP", - StateFunc: func(v interface{}) string { - return strings.ToUpper(v.(string)) - }, - ValidateFunc: validation.StringInSlice([]string{ - elbv2.ProtocolEnumHttp, - elbv2.ProtocolEnumHttps, - elbv2.ProtocolEnumTcp, - }, true), - }, - - "timeout": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ValidateFunc: validation.IntBetween(2, 60), - }, - - "healthy_threshold": { - Type: schema.TypeInt, - Optional: true, - Default: 3, - ValidateFunc: validation.IntBetween(2, 10), - }, - - "matcher": { - Type: schema.TypeString, - Computed: true, - Optional: true, - }, - - "unhealthy_threshold": { - Type: schema.TypeInt, - Optional: true, - Default: 3, - ValidateFunc: validation.IntBetween(2, 10), - }, - }, - }, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsLbTargetGroupCreate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - var groupName string - if v, ok := d.GetOk("name"); ok { - groupName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - groupName = resource.PrefixedUniqueId(v.(string)) - } else { - groupName = resource.PrefixedUniqueId("tf-") - } - - params := &elbv2.CreateTargetGroupInput{ - Name: aws.String(groupName), - TargetType: aws.String(d.Get("target_type").(string)), - } - - if d.Get("target_type").(string) != elbv2.TargetTypeEnumLambda { - if _, ok := d.GetOk("port"); !ok { - return fmt.Errorf("port should be set when target type is %s", d.Get("target_type").(string)) - } - - if _, ok := d.GetOk("protocol"); !ok { - return fmt.Errorf("protocol should be set when target type is %s", d.Get("target_type").(string)) - } - - if _, ok := d.GetOk("vpc_id"); !ok { - return fmt.Errorf("vpc_id should be set when target type is %s", d.Get("target_type").(string)) - } - params.Port = aws.Int64(int64(d.Get("port").(int))) - params.Protocol = aws.String(d.Get("protocol").(string)) - params.VpcId = aws.String(d.Get("vpc_id").(string)) - } - - if healthChecks := d.Get("health_check").([]interface{}); len(healthChecks) == 1 { - healthCheck := healthChecks[0].(map[string]interface{}) - - params.HealthCheckIntervalSeconds = aws.Int64(int64(healthCheck["interval"].(int))) - - params.HealthyThresholdCount = aws.Int64(int64(healthCheck["healthy_threshold"].(int))) - params.UnhealthyThresholdCount = aws.Int64(int64(healthCheck["unhealthy_threshold"].(int))) - t := healthCheck["timeout"].(int) - if t != 0 { - params.HealthCheckTimeoutSeconds = aws.Int64(int64(t)) - } - healthCheckProtocol := healthCheck["protocol"].(string) - - if healthCheckProtocol != "TCP" { - p := healthCheck["path"].(string) - if p != "" { - params.HealthCheckPath = aws.String(p) - } - - m := healthCheck["matcher"].(string) - if m != "" { - params.Matcher = &elbv2.Matcher{ - HttpCode: aws.String(m), - } - } - } - if d.Get("target_type").(string) != elbv2.TargetTypeEnumLambda { - params.HealthCheckPort = aws.String(healthCheck["port"].(string)) - params.HealthCheckProtocol = aws.String(healthCheckProtocol) - } - } - - resp, err := elbconn.CreateTargetGroup(params) - if err != nil { - return fmt.Errorf("Error creating LB Target Group: %s", err) - } - - if len(resp.TargetGroups) == 0 { - return errors.New("Error creating LB Target Group: no groups returned in response") - } - d.SetId(aws.StringValue(resp.TargetGroups[0].TargetGroupArn)) - return resourceAwsLbTargetGroupUpdate(d, meta) -} - -func resourceAwsLbTargetGroupRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - resp, err := elbconn.DescribeTargetGroups(&elbv2.DescribeTargetGroupsInput{ - TargetGroupArns: []*string{aws.String(d.Id())}, - }) - if err != nil { - if isAWSErr(err, elbv2.ErrCodeTargetGroupNotFoundException, "") { - log.Printf("[DEBUG] DescribeTargetGroups - removing %s from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error retrieving Target Group: %s", err) - } - - if len(resp.TargetGroups) != 1 { - return fmt.Errorf("Error retrieving Target Group %q", d.Id()) - } - - return flattenAwsLbTargetGroupResource(d, meta, resp.TargetGroups[0]) -} - -func resourceAwsLbTargetGroupUpdate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - if err := setElbV2Tags(elbconn, d); err != nil { - return fmt.Errorf("Error Modifying Tags on LB Target Group: %s", err) - } - - if d.HasChange("health_check") { - var params *elbv2.ModifyTargetGroupInput - healthChecks := d.Get("health_check").([]interface{}) - if len(healthChecks) == 1 { - params = &elbv2.ModifyTargetGroupInput{ - TargetGroupArn: aws.String(d.Id()), - } - healthCheck := healthChecks[0].(map[string]interface{}) - - params = &elbv2.ModifyTargetGroupInput{ - TargetGroupArn: aws.String(d.Id()), - HealthyThresholdCount: aws.Int64(int64(healthCheck["healthy_threshold"].(int))), - UnhealthyThresholdCount: aws.Int64(int64(healthCheck["unhealthy_threshold"].(int))), - } - - t := healthCheck["timeout"].(int) - if t != 0 { - params.HealthCheckTimeoutSeconds = aws.Int64(int64(t)) - } - - healthCheckProtocol := healthCheck["protocol"].(string) - - if healthCheckProtocol != "TCP" && !d.IsNewResource() { - params.Matcher = &elbv2.Matcher{ - HttpCode: aws.String(healthCheck["matcher"].(string)), - } - params.HealthCheckPath = aws.String(healthCheck["path"].(string)) - params.HealthCheckIntervalSeconds = aws.Int64(int64(healthCheck["interval"].(int))) - } - if d.Get("target_type").(string) != elbv2.TargetTypeEnumLambda { - params.HealthCheckPort = aws.String(healthCheck["port"].(string)) - params.HealthCheckProtocol = aws.String(healthCheckProtocol) - } - } - - if params != nil { - _, err := elbconn.ModifyTargetGroup(params) - if err != nil { - return fmt.Errorf("Error modifying Target Group: %s", err) - } - } - } - - if d.Get("target_type").(string) != elbv2.TargetTypeEnumLambda { - var attrs []*elbv2.TargetGroupAttribute - - if d.HasChange("deregistration_delay") { - attrs = append(attrs, &elbv2.TargetGroupAttribute{ - Key: aws.String("deregistration_delay.timeout_seconds"), - Value: aws.String(fmt.Sprintf("%d", d.Get("deregistration_delay").(int))), - }) - } - - if d.HasChange("slow_start") { - attrs = append(attrs, &elbv2.TargetGroupAttribute{ - Key: aws.String("slow_start.duration_seconds"), - Value: aws.String(fmt.Sprintf("%d", d.Get("slow_start").(int))), - }) - } - - if d.HasChange("proxy_protocol_v2") { - attrs = append(attrs, &elbv2.TargetGroupAttribute{ - Key: aws.String("proxy_protocol_v2.enabled"), - Value: aws.String(strconv.FormatBool(d.Get("proxy_protocol_v2").(bool))), - }) - } - - // In CustomizeDiff we allow LB stickiness to be declared for TCP target - // groups, so long as it's not enabled. This allows for better support for - // modules, but also means we need to completely skip sending the data to the - // API if it's defined on a TCP target group. - if d.HasChange("stickiness") && d.Get("protocol") != "TCP" && d.Get("target_type").(string) != elbv2.TargetTypeEnumLambda { - stickinessBlocks := d.Get("stickiness").([]interface{}) - if len(stickinessBlocks) == 1 { - stickiness := stickinessBlocks[0].(map[string]interface{}) - - attrs = append(attrs, - &elbv2.TargetGroupAttribute{ - Key: aws.String("stickiness.enabled"), - Value: aws.String(strconv.FormatBool(stickiness["enabled"].(bool))), - }, - &elbv2.TargetGroupAttribute{ - Key: aws.String("stickiness.type"), - Value: aws.String(stickiness["type"].(string)), - }, - &elbv2.TargetGroupAttribute{ - Key: aws.String("stickiness.lb_cookie.duration_seconds"), - Value: aws.String(fmt.Sprintf("%d", stickiness["cookie_duration"].(int))), - }) - } else if len(stickinessBlocks) == 0 { - attrs = append(attrs, &elbv2.TargetGroupAttribute{ - Key: aws.String("stickiness.enabled"), - Value: aws.String("false"), - }) - } - } - - if len(attrs) > 0 { - params := &elbv2.ModifyTargetGroupAttributesInput{ - TargetGroupArn: aws.String(d.Id()), - Attributes: attrs, - } - - _, err := elbconn.ModifyTargetGroupAttributes(params) - if err != nil { - return fmt.Errorf("Error modifying Target Group Attributes: %s", err) - } - } - } - - return resourceAwsLbTargetGroupRead(d, meta) -} - -func resourceAwsLbTargetGroupDelete(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - _, err := elbconn.DeleteTargetGroup(&elbv2.DeleteTargetGroupInput{ - TargetGroupArn: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error deleting Target Group: %s", err) - } - - return nil -} - -func validateAwsLbTargetGroupHealthCheckPath(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 1024 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 1024 characters: %q", k, value)) - } - if len(value) > 0 && !strings.HasPrefix(value, "/") { - errors = append(errors, fmt.Errorf( - "%q must begin with a '/' character: %q", k, value)) - } - return -} - -func validateSlowStart(v interface{}, k string) (ws []string, errors []error) { - value := v.(int) - - // Check if the value is between 30-900 or 0 (seconds). - if value != 0 && !(value >= 30 && value <= 900) { - errors = append(errors, fmt.Errorf( - "%q contains an invalid Slow Start Duration \"%d\". "+ - "Valid intervals are 30-900 or 0 to disable.", - k, value)) - } - return -} - -func validateAwsLbTargetGroupHealthCheckPort(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if value == "traffic-port" { - return - } - - port, err := strconv.Atoi(value) - if err != nil { - errors = append(errors, fmt.Errorf("%q must be a valid port number (1-65536) or %q", k, "traffic-port")) - } - - if port < 1 || port > 65536 { - errors = append(errors, fmt.Errorf("%q must be a valid port number (1-65536) or %q", k, "traffic-port")) - } - - return -} - -func lbTargetGroupSuffixFromARN(arn *string) string { - if arn == nil { - return "" - } - - if arnComponents := regexp.MustCompile(`arn:.*:targetgroup/(.*)`).FindAllStringSubmatch(*arn, -1); len(arnComponents) == 1 { - if len(arnComponents[0]) == 2 { - return fmt.Sprintf("targetgroup/%s", arnComponents[0][1]) - } - } - - return "" -} - -// flattenAwsLbTargetGroupResource takes a *elbv2.TargetGroup and populates all respective resource fields. -func flattenAwsLbTargetGroupResource(d *schema.ResourceData, meta interface{}, targetGroup *elbv2.TargetGroup) error { - elbconn := meta.(*AWSClient).elbv2conn - - d.Set("arn", targetGroup.TargetGroupArn) - d.Set("arn_suffix", lbTargetGroupSuffixFromARN(targetGroup.TargetGroupArn)) - d.Set("name", targetGroup.TargetGroupName) - d.Set("target_type", targetGroup.TargetType) - - healthCheck := make(map[string]interface{}) - healthCheck["interval"] = int(aws.Int64Value(targetGroup.HealthCheckIntervalSeconds)) - healthCheck["port"] = aws.StringValue(targetGroup.HealthCheckPort) - healthCheck["protocol"] = aws.StringValue(targetGroup.HealthCheckProtocol) - healthCheck["timeout"] = int(aws.Int64Value(targetGroup.HealthCheckTimeoutSeconds)) - healthCheck["healthy_threshold"] = int(aws.Int64Value(targetGroup.HealthyThresholdCount)) - healthCheck["unhealthy_threshold"] = int(aws.Int64Value(targetGroup.UnhealthyThresholdCount)) - - if targetGroup.HealthCheckPath != nil { - healthCheck["path"] = aws.StringValue(targetGroup.HealthCheckPath) - } - if targetGroup.Matcher != nil && targetGroup.Matcher.HttpCode != nil { - healthCheck["matcher"] = aws.StringValue(targetGroup.Matcher.HttpCode) - } - if v, _ := d.Get("target_type").(string); v != elbv2.TargetTypeEnumLambda { - d.Set("vpc_id", targetGroup.VpcId) - d.Set("port", targetGroup.Port) - d.Set("protocol", targetGroup.Protocol) - } - - if err := d.Set("health_check", []interface{}{healthCheck}); err != nil { - return fmt.Errorf("error setting health_check: %s", err) - } - - attrResp, err := elbconn.DescribeTargetGroupAttributes(&elbv2.DescribeTargetGroupAttributesInput{ - TargetGroupArn: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error retrieving Target Group Attributes: %s", err) - } - - for _, attr := range attrResp.Attributes { - switch aws.StringValue(attr.Key) { - case "proxy_protocol_v2.enabled": - enabled, err := strconv.ParseBool(aws.StringValue(attr.Value)) - if err != nil { - return fmt.Errorf("Error converting proxy_protocol_v2.enabled to bool: %s", aws.StringValue(attr.Value)) - } - d.Set("proxy_protocol_v2", enabled) - case "slow_start.duration_seconds": - slowStart, err := strconv.Atoi(aws.StringValue(attr.Value)) - if err != nil { - return fmt.Errorf("Error converting slow_start.duration_seconds to int: %s", aws.StringValue(attr.Value)) - } - d.Set("slow_start", slowStart) - } - } - - // We only read in the stickiness attributes if the target group is not - // TCP-based. This ensures we don't end up causing a spurious diff if someone - // has defined the stickiness block on a TCP target group (albeit with - // false), for which this update would clobber the state coming from config - // for. - // - // This is a workaround to support module design where the module needs to - // support HTTP and TCP target groups. - switch { - case aws.StringValue(targetGroup.Protocol) != "TCP": - if err = flattenAwsLbTargetGroupStickiness(d, attrResp.Attributes); err != nil { - return err - } - case aws.StringValue(targetGroup.Protocol) == "TCP" && len(d.Get("stickiness").([]interface{})) < 1: - if err = d.Set("stickiness", []interface{}{}); err != nil { - return fmt.Errorf("error setting stickiness: %s", err) - } - } - - tagsResp, err := elbconn.DescribeTags(&elbv2.DescribeTagsInput{ - ResourceArns: []*string{aws.String(d.Id())}, - }) - if err != nil { - return fmt.Errorf("Error retrieving Target Group Tags: %s", err) - } - for _, t := range tagsResp.TagDescriptions { - if aws.StringValue(t.ResourceArn) == d.Id() { - if err := d.Set("tags", tagsToMapELBv2(t.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - } - } - - return nil -} - -func flattenAwsLbTargetGroupStickiness(d *schema.ResourceData, attributes []*elbv2.TargetGroupAttribute) error { - stickinessMap := map[string]interface{}{} - for _, attr := range attributes { - switch aws.StringValue(attr.Key) { - case "stickiness.enabled": - enabled, err := strconv.ParseBool(aws.StringValue(attr.Value)) - if err != nil { - return fmt.Errorf("Error converting stickiness.enabled to bool: %s", aws.StringValue(attr.Value)) - } - stickinessMap["enabled"] = enabled - case "stickiness.type": - stickinessMap["type"] = aws.StringValue(attr.Value) - case "stickiness.lb_cookie.duration_seconds": - duration, err := strconv.Atoi(aws.StringValue(attr.Value)) - if err != nil { - return fmt.Errorf("Error converting stickiness.lb_cookie.duration_seconds to int: %s", aws.StringValue(attr.Value)) - } - stickinessMap["cookie_duration"] = duration - case "deregistration_delay.timeout_seconds": - timeout, err := strconv.Atoi(aws.StringValue(attr.Value)) - if err != nil { - return fmt.Errorf("Error converting deregistration_delay.timeout_seconds to int: %s", aws.StringValue(attr.Value)) - } - d.Set("deregistration_delay", timeout) - } - } - - setStickyMap := []interface{}{} - if len(stickinessMap) > 0 { - setStickyMap = []interface{}{stickinessMap} - } - if err := d.Set("stickiness", setStickyMap); err != nil { - return err - } - return nil -} - -func resourceAwsLbTargetGroupCustomizeDiff(diff *schema.ResourceDiff, v interface{}) error { - protocol := diff.Get("protocol").(string) - if protocol == "TCP" { - // TCP load balancers do not support stickiness - if stickinessBlocks := diff.Get("stickiness").([]interface{}); len(stickinessBlocks) == 1 { - stickiness := stickinessBlocks[0].(map[string]interface{}) - if val := stickiness["enabled"].(bool); val { - return fmt.Errorf("Network Load Balancers do not support Stickiness") - } - } - } - - // Network Load Balancers have many special qwirks to them. - // See http://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html - if healthChecks := diff.Get("health_check").([]interface{}); len(healthChecks) == 1 { - healthCheck := healthChecks[0].(map[string]interface{}) - protocol := healthCheck["protocol"].(string) - - if protocol == "TCP" { - // Cannot set custom matcher on TCP health checks - if m := healthCheck["matcher"].(string); m != "" { - return fmt.Errorf("%s: health_check.matcher is not supported for target_groups with TCP protocol", diff.Id()) - } - // Cannot set custom path on TCP health checks - if m := healthCheck["path"].(string); m != "" { - return fmt.Errorf("%s: health_check.path is not supported for target_groups with TCP protocol", diff.Id()) - } - // Cannot set custom timeout on TCP health checks - if t := healthCheck["timeout"].(int); t != 0 && diff.Id() == "" { - // timeout has a default value, so only check this if this is a network - // LB and is a first run - return fmt.Errorf("%s: health_check.timeout is not supported for target_groups with TCP protocol", diff.Id()) - } - if healthCheck["healthy_threshold"].(int) != healthCheck["unhealthy_threshold"].(int) { - return fmt.Errorf("%s: health_check.healthy_threshold %d and health_check.unhealthy_threshold %d must be the same for target_groups with TCP protocol", diff.Id(), healthCheck["healthy_threshold"].(int), healthCheck["unhealthy_threshold"].(int)) - } - } - } - - if strings.Contains(protocol, "HTTP") { - if healthChecks := diff.Get("health_check").([]interface{}); len(healthChecks) == 1 { - healthCheck := healthChecks[0].(map[string]interface{}) - // HTTP(S) Target Groups cannot use TCP health checks - if p := healthCheck["protocol"].(string); strings.ToLower(p) == "tcp" { - return fmt.Errorf("HTTP Target Groups cannot use TCP health checks") - } - } - } - - if diff.Id() == "" { - return nil - } - - if protocol == "TCP" { - if diff.HasChange("health_check.0.interval") { - old, new := diff.GetChange("health_check.0.interval") - return fmt.Errorf("Health check interval cannot be updated from %d to %d for TCP based Target Group %s,"+ - " use 'terraform taint' to recreate the resource if you wish", - old, new, diff.Id()) - } - if diff.HasChange("health_check.0.timeout") { - old, new := diff.GetChange("health_check.0.timeout") - return fmt.Errorf("Health check timeout cannot be updated from %d to %d for TCP based Target Group %s,"+ - " use 'terraform taint' to recreate the resource if you wish", - old, new, diff.Id()) - } - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group_attachment.go deleted file mode 100644 index d845a1d40..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group_attachment.go +++ /dev/null @@ -1,150 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elbv2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsLbTargetGroupAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLbAttachmentCreate, - Read: resourceAwsLbAttachmentRead, - Delete: resourceAwsLbAttachmentDelete, - - Schema: map[string]*schema.Schema{ - "target_group_arn": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - - "target_id": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - - "port": { - Type: schema.TypeInt, - ForceNew: true, - Optional: true, - }, - - "availability_zone": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - }, - }, - } -} - -func resourceAwsLbAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - target := &elbv2.TargetDescription{ - Id: aws.String(d.Get("target_id").(string)), - } - - if v, ok := d.GetOk("port"); ok { - target.Port = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("availability_zone"); ok { - target.AvailabilityZone = aws.String(v.(string)) - } - - params := &elbv2.RegisterTargetsInput{ - TargetGroupArn: aws.String(d.Get("target_group_arn").(string)), - Targets: []*elbv2.TargetDescription{target}, - } - - log.Printf("[INFO] Registering Target %s with Target Group %s", d.Get("target_id").(string), - d.Get("target_group_arn").(string)) - - _, err := elbconn.RegisterTargets(params) - if err != nil { - return fmt.Errorf("Error registering targets with target group: %s", err) - } - - d.SetId(resource.PrefixedUniqueId(fmt.Sprintf("%s-", d.Get("target_group_arn")))) - - return nil -} - -func resourceAwsLbAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - target := &elbv2.TargetDescription{ - Id: aws.String(d.Get("target_id").(string)), - } - - if v, ok := d.GetOk("port"); ok { - target.Port = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("availability_zone"); ok { - target.AvailabilityZone = aws.String(v.(string)) - } - - params := &elbv2.DeregisterTargetsInput{ - TargetGroupArn: aws.String(d.Get("target_group_arn").(string)), - Targets: []*elbv2.TargetDescription{target}, - } - - _, err := elbconn.DeregisterTargets(params) - if err != nil && !isAWSErr(err, elbv2.ErrCodeTargetGroupNotFoundException, "") { - return fmt.Errorf("Error deregistering Targets: %s", err) - } - - return nil -} - -// resourceAwsLbAttachmentRead requires all of the fields in order to describe the correct -// target, so there is no work to do beyond ensuring that the target and group still exist. -func resourceAwsLbAttachmentRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbv2conn - - target := &elbv2.TargetDescription{ - Id: aws.String(d.Get("target_id").(string)), - } - - if v, ok := d.GetOk("port"); ok { - target.Port = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("availability_zone"); ok { - target.AvailabilityZone = aws.String(v.(string)) - } - - resp, err := elbconn.DescribeTargetHealth(&elbv2.DescribeTargetHealthInput{ - TargetGroupArn: aws.String(d.Get("target_group_arn").(string)), - Targets: []*elbv2.TargetDescription{target}, - }) - if err != nil { - if isAWSErr(err, elbv2.ErrCodeTargetGroupNotFoundException, "") { - log.Printf("[WARN] Target group does not exist, removing target attachment %s", d.Id()) - d.SetId("") - return nil - } - if isAWSErr(err, elbv2.ErrCodeInvalidTargetException, "") { - log.Printf("[WARN] Target does not exist, removing target attachment %s", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error reading Target Health: %s", err) - } - - if len(resp.TargetHealthDescriptions) != 1 { - log.Printf("[WARN] Target does not exist, removing target attachment %s", d.Id()) - d.SetId("") - return nil - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_association.go deleted file mode 100644 index 646d4031b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_association.go +++ /dev/null @@ -1,146 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/licensemanager" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsLicenseManagerAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLicenseManagerAssociationCreate, - Read: resourceAwsLicenseManagerAssociationRead, - Delete: resourceAwsLicenseManagerAssociationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "resource_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "license_configuration_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - }, - } -} - -func resourceAwsLicenseManagerAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).licensemanagerconn - - resourceArn := d.Get("resource_arn").(string) - licenseConfigurationArn := d.Get("license_configuration_arn").(string) - - opts := &licensemanager.UpdateLicenseSpecificationsForResourceInput{ - AddLicenseSpecifications: []*licensemanager.LicenseSpecification{{ - LicenseConfigurationArn: aws.String(licenseConfigurationArn), - }}, - ResourceArn: aws.String(resourceArn), - } - - log.Printf("[DEBUG] License Manager association: %s", opts) - - _, err := conn.UpdateLicenseSpecificationsForResource(opts) - if err != nil { - return fmt.Errorf("Error creating License Manager association: %s", err) - } - - d.SetId(fmt.Sprintf("%s,%s", resourceArn, licenseConfigurationArn)) - - return resourceAwsLicenseManagerAssociationRead(d, meta) -} - -func resourceAwsLicenseManagerAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).licensemanagerconn - - resourceArn, licenseConfigurationArn, err := resourceAwsLicenseManagerAssociationParseId(d.Id()) - if err != nil { - return err - } - - licenseSpecification, err := resourceAwsLicenseManagerAssociationFindSpecification(conn, resourceArn, licenseConfigurationArn) - if err != nil { - return fmt.Errorf("Error reading License Manager association: %s", err) - } - - if licenseSpecification == nil { - log.Printf("[WARN] License Manager association (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("resource_arn", resourceArn) - d.Set("license_configuration_arn", licenseConfigurationArn) - - return nil -} - -func resourceAwsLicenseManagerAssociationFindSpecification(conn *licensemanager.LicenseManager, resourceArn, licenseConfigurationArn string) (*licensemanager.LicenseSpecification, error) { - opts := &licensemanager.ListLicenseSpecificationsForResourceInput{ - ResourceArn: aws.String(resourceArn), - } - - for { - resp, err := conn.ListLicenseSpecificationsForResource(opts) - - if err != nil { - return nil, err - } - - for _, licenseSpecification := range resp.LicenseSpecifications { - if aws.StringValue(licenseSpecification.LicenseConfigurationArn) == licenseConfigurationArn { - return licenseSpecification, nil - } - } - - if len(resp.LicenseSpecifications) == 0 || resp.NextToken == nil { - return nil, nil - } - - opts.NextToken = resp.NextToken - } -} - -func resourceAwsLicenseManagerAssociationParseId(id string) (string, string, error) { - parts := strings.SplitN(id, ",", 2) - if len(parts) != 2 { - return "", "", fmt.Errorf("Expected License Manager Association ID in the form resource_arn,license_configuration_arn - received: %s", id) - } - return parts[0], parts[1], nil -} - -func resourceAwsLicenseManagerAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).licensemanagerconn - - resourceArn, licenseConfigurationArn, err := resourceAwsLicenseManagerAssociationParseId(d.Id()) - if err != nil { - return err - } - - opts := &licensemanager.UpdateLicenseSpecificationsForResourceInput{ - RemoveLicenseSpecifications: []*licensemanager.LicenseSpecification{{ - LicenseConfigurationArn: aws.String(licenseConfigurationArn), - }}, - ResourceArn: aws.String(resourceArn), - } - - log.Printf("[DEBUG] License Manager association: %s", opts) - - _, err = conn.UpdateLicenseSpecificationsForResource(opts) - if err != nil { - return fmt.Errorf("Error deleting License Manager association: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_license_configuration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_license_configuration.go deleted file mode 100644 index 8dd6a17f0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_license_configuration.go +++ /dev/null @@ -1,187 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/licensemanager" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsLicenseManagerLicenseConfiguration() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLicenseManagerLicenseConfigurationCreate, - Read: resourceAwsLicenseManagerLicenseConfigurationRead, - Update: resourceAwsLicenseManagerLicenseConfigurationUpdate, - Delete: resourceAwsLicenseManagerLicenseConfigurationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "description": { - Type: schema.TypeString, - Optional: true, - }, - "license_count": { - Type: schema.TypeInt, - Optional: true, - }, - "license_count_hard_limit": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "license_counting_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - licensemanager.LicenseCountingTypeVCpu, - licensemanager.LicenseCountingTypeInstance, - licensemanager.LicenseCountingTypeCore, - licensemanager.LicenseCountingTypeSocket, - }, false), - }, - "license_rules": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringMatch(regexp.MustCompile("^#([^=]+)=(.+)$"), "Expected format is #RuleType=RuleValue"), - }, - }, - "name": { - Type: schema.TypeString, - Required: true, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsLicenseManagerLicenseConfigurationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).licensemanagerconn - - opts := &licensemanager.CreateLicenseConfigurationInput{ - LicenseCountingType: aws.String(d.Get("license_counting_type").(string)), - Name: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("description"); ok { - opts.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("license_count"); ok { - opts.LicenseCount = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("license_count_hard_limit"); ok { - opts.LicenseCountHardLimit = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("license_rules"); ok { - opts.LicenseRules = expandStringList(v.([]interface{})) - } - - if v, ok := d.GetOk("tags"); ok && len(v.(map[string]interface{})) > 0 { - opts.Tags = tagsFromMapLicenseManager(v.(map[string]interface{})) - } - - log.Printf("[DEBUG] License Manager license configuration: %s", opts) - - resp, err := conn.CreateLicenseConfiguration(opts) - if err != nil { - return fmt.Errorf("Error creating License Manager license configuration: %s", err) - } - d.SetId(*resp.LicenseConfigurationArn) - return resourceAwsLicenseManagerLicenseConfigurationRead(d, meta) -} - -func resourceAwsLicenseManagerLicenseConfigurationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).licensemanagerconn - - resp, err := conn.GetLicenseConfiguration(&licensemanager.GetLicenseConfigurationInput{ - LicenseConfigurationArn: aws.String(d.Id()), - }) - - if err != nil { - if isAWSErr(err, licensemanager.ErrCodeInvalidParameterValueException, "") { - log.Printf("[WARN] License Manager license configuration (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error reading License Manager license configuration: %s", err) - } - - d.Set("description", resp.Description) - d.Set("license_count", resp.LicenseCount) - d.Set("license_count_hard_limit", resp.LicenseCountHardLimit) - d.Set("license_counting_type", resp.LicenseCountingType) - if err := d.Set("license_rules", flattenStringList(resp.LicenseRules)); err != nil { - return fmt.Errorf("error setting license_rules: %s", err) - } - d.Set("name", resp.Name) - - if err := d.Set("tags", tagsToMapLicenseManager(resp.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func resourceAwsLicenseManagerLicenseConfigurationUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).licensemanagerconn - - d.Partial(true) - - if d.HasChange("tags") { - if err := setTagsLicenseManager(conn, d); err != nil { - return err - } - d.SetPartial("tags") - } - - d.Partial(false) - - opts := &licensemanager.UpdateLicenseConfigurationInput{ - LicenseConfigurationArn: aws.String(d.Id()), - Name: aws.String(d.Get("name").(string)), - Description: aws.String(d.Get("description").(string)), - LicenseCountHardLimit: aws.Bool(d.Get("license_count_hard_limit").(bool)), - } - - if v, ok := d.GetOk("license_count"); ok { - opts.LicenseCount = aws.Int64(int64(v.(int))) - } - - log.Printf("[DEBUG] License Manager license configuration: %s", opts) - - _, err := conn.UpdateLicenseConfiguration(opts) - if err != nil { - return fmt.Errorf("Error updating License Manager license configuration: %s", err) - } - return resourceAwsLicenseManagerLicenseConfigurationRead(d, meta) -} - -func resourceAwsLicenseManagerLicenseConfigurationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).licensemanagerconn - - opts := &licensemanager.DeleteLicenseConfigurationInput{ - LicenseConfigurationArn: aws.String(d.Id()), - } - - _, err := conn.DeleteLicenseConfiguration(opts) - if err != nil { - if isAWSErr(err, licensemanager.ErrCodeInvalidParameterValueException, "") { - return nil - } - return fmt.Errorf("Error deleting License Manager license configuration: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_domain.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_domain.go deleted file mode 100644 index 0656a88d6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_domain.go +++ /dev/null @@ -1,76 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/lightsail" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsLightsailDomain() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLightsailDomainCreate, - Read: resourceAwsLightsailDomainRead, - Delete: resourceAwsLightsailDomainDelete, - - Schema: map[string]*schema.Schema{ - "domain_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsLightsailDomainCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - _, err := conn.CreateDomain(&lightsail.CreateDomainInput{ - DomainName: aws.String(d.Get("domain_name").(string)), - }) - - if err != nil { - return err - } - - d.SetId(d.Get("domain_name").(string)) - - return resourceAwsLightsailDomainRead(d, meta) -} - -func resourceAwsLightsailDomainRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - resp, err := conn.GetDomain(&lightsail.GetDomainInput{ - DomainName: aws.String(d.Id()), - }) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] Lightsail Domain (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - return err - } - - d.Set("arn", resp.Domain.Arn) - return nil -} - -func resourceAwsLightsailDomainDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - _, err := conn.DeleteDomain(&lightsail.DeleteDomainInput{ - DomainName: aws.String(d.Id()), - }) - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_instance.go deleted file mode 100644 index 17fdf90e6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_instance.go +++ /dev/null @@ -1,263 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/lightsail" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsLightsailInstance() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLightsailInstanceCreate, - Read: resourceAwsLightsailInstanceRead, - Delete: resourceAwsLightsailInstanceDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "availability_zone": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "blueprint_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "bundle_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - // Optional attributes - "key_pair_name": { - // Not compatible with aws_key_pair (yet) - // We'll need a new aws_lightsail_key_pair resource - Type: schema.TypeString, - Optional: true, - ForceNew: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "LightsailDefaultKeyPair" && new == "" { - return true - } - return false - }, - }, - - // cannot be retrieved from the API - "user_data": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - // additional info returned from the API - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "created_at": { - Type: schema.TypeString, - Computed: true, - }, - "cpu_count": { - Type: schema.TypeInt, - Computed: true, - }, - "ram_size": { - Type: schema.TypeInt, - Computed: true, - }, - "ipv6_address": { - Type: schema.TypeString, - Computed: true, - }, - "is_static_ip": { - Type: schema.TypeBool, - Computed: true, - }, - "private_ip_address": { - Type: schema.TypeString, - Computed: true, - }, - "public_ip_address": { - Type: schema.TypeString, - Computed: true, - }, - "username": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsLightsailInstanceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - - iName := d.Get("name").(string) - - req := lightsail.CreateInstancesInput{ - AvailabilityZone: aws.String(d.Get("availability_zone").(string)), - BlueprintId: aws.String(d.Get("blueprint_id").(string)), - BundleId: aws.String(d.Get("bundle_id").(string)), - InstanceNames: aws.StringSlice([]string{iName}), - } - - if v, ok := d.GetOk("key_pair_name"); ok { - req.KeyPairName = aws.String(v.(string)) - } - if v, ok := d.GetOk("user_data"); ok { - req.UserData = aws.String(v.(string)) - } - - resp, err := conn.CreateInstances(&req) - if err != nil { - return err - } - - if len(resp.Operations) == 0 { - return fmt.Errorf("No operations found for CreateInstance request") - } - - op := resp.Operations[0] - d.SetId(d.Get("name").(string)) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"Started"}, - Target: []string{"Completed", "Succeeded"}, - Refresh: resourceAwsLightsailOperationRefreshFunc(op.Id, meta), - Timeout: 10 * time.Minute, - Delay: 5 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - // We don't return an error here because the Create call succeeded - log.Printf("[ERR] Error waiting for instance (%s) to become ready: %s", d.Id(), err) - } - - return resourceAwsLightsailInstanceRead(d, meta) -} - -func resourceAwsLightsailInstanceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - resp, err := conn.GetInstance(&lightsail.GetInstanceInput{ - InstanceName: aws.String(d.Id()), - }) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] Lightsail Instance (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - return err - } - - if resp == nil { - log.Printf("[WARN] Lightsail Instance (%s) not found, nil response from server, removing from state", d.Id()) - d.SetId("") - return nil - } - - i := resp.Instance - - d.Set("availability_zone", i.Location.AvailabilityZone) - d.Set("blueprint_id", i.BlueprintId) - d.Set("bundle_id", i.BundleId) - d.Set("key_pair_name", i.SshKeyName) - d.Set("name", i.Name) - - // additional attributes - d.Set("arn", i.Arn) - d.Set("username", i.Username) - d.Set("created_at", i.CreatedAt.Format(time.RFC3339)) - d.Set("cpu_count", i.Hardware.CpuCount) - d.Set("ram_size", strconv.FormatFloat(*i.Hardware.RamSizeInGb, 'f', 0, 64)) - d.Set("ipv6_address", i.Ipv6Address) - d.Set("is_static_ip", i.IsStaticIp) - d.Set("private_ip_address", i.PrivateIpAddress) - d.Set("public_ip_address", i.PublicIpAddress) - - return nil -} - -func resourceAwsLightsailInstanceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - resp, err := conn.DeleteInstance(&lightsail.DeleteInstanceInput{ - InstanceName: aws.String(d.Id()), - }) - - if err != nil { - return err - } - - op := resp.Operations[0] - - stateConf := &resource.StateChangeConf{ - Pending: []string{"Started"}, - Target: []string{"Completed", "Succeeded"}, - Refresh: resourceAwsLightsailOperationRefreshFunc(op.Id, meta), - Timeout: 10 * time.Minute, - Delay: 5 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for instance (%s) to become destroyed: %s", - d.Id(), err) - } - - return nil -} - -// method to check the status of an Operation, which is returned from -// Create/Delete methods. -// Status's are an aws.OperationStatus enum: -// - NotStarted -// - Started -// - Failed -// - Completed -// - Succeeded (not documented?) -func resourceAwsLightsailOperationRefreshFunc( - oid *string, meta interface{}) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - conn := meta.(*AWSClient).lightsailconn - log.Printf("[DEBUG] Checking if Lightsail Operation (%s) is Completed", *oid) - o, err := conn.GetOperation(&lightsail.GetOperationInput{ - OperationId: oid, - }) - if err != nil { - return o, "FAILED", err - } - - if o.Operation == nil { - return nil, "Failed", fmt.Errorf("Error retrieving Operation info for operation (%s)", *oid) - } - - log.Printf("[DEBUG] Lightsail Operation (%s) is currently %q", *oid, *o.Operation.Status) - return o, *o.Operation.Status, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_key_pair.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_key_pair.go deleted file mode 100644 index 892ed298f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_key_pair.go +++ /dev/null @@ -1,225 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/lightsail" - "github.com/hashicorp/terraform/helper/encryption" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsLightsailKeyPair() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLightsailKeyPairCreate, - Read: resourceAwsLightsailKeyPairRead, - Delete: resourceAwsLightsailKeyPairDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - }, - - // optional fields - "pgp_key": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - // additional info returned from the API - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - // fields returned from CreateKey - "fingerprint": { - Type: schema.TypeString, - Computed: true, - }, - "public_key": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - }, - "private_key": { - Type: schema.TypeString, - Computed: true, - }, - - // encrypted fields if pgp_key is given - "encrypted_fingerprint": { - Type: schema.TypeString, - Computed: true, - }, - "encrypted_private_key": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsLightsailKeyPairCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - - var kName string - if v, ok := d.GetOk("name"); ok { - kName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - kName = resource.PrefixedUniqueId(v.(string)) - } else { - kName = resource.UniqueId() - } - - var pubKey string - var op *lightsail.Operation - if pubKeyInterface, ok := d.GetOk("public_key"); ok { - pubKey = pubKeyInterface.(string) - } - - if pubKey == "" { - // creating new key - resp, err := conn.CreateKeyPair(&lightsail.CreateKeyPairInput{ - KeyPairName: aws.String(kName), - }) - if err != nil { - return err - } - if resp.Operation == nil { - return fmt.Errorf("No operation found for CreateKeyPair response") - } - if resp.KeyPair == nil { - return fmt.Errorf("No KeyPair information found for CreateKeyPair response") - } - d.SetId(kName) - - // private_key and public_key are only available in the response from - // CreateKey pair. Here we set the public_key, and encrypt the private_key - // if a pgp_key is given, else we store the private_key in state - d.Set("public_key", resp.PublicKeyBase64) - - // encrypt private key if pgp_key is given - pgpKey, err := encryption.RetrieveGPGKey(d.Get("pgp_key").(string)) - if err != nil { - return err - } - if pgpKey != "" { - fingerprint, encrypted, err := encryption.EncryptValue(pgpKey, *resp.PrivateKeyBase64, "Lightsail Private Key") - if err != nil { - return err - } - - d.Set("encrypted_fingerprint", fingerprint) - d.Set("encrypted_private_key", encrypted) - } else { - d.Set("private_key", resp.PrivateKeyBase64) - } - - op = resp.Operation - } else { - // importing key - resp, err := conn.ImportKeyPair(&lightsail.ImportKeyPairInput{ - KeyPairName: aws.String(kName), - PublicKeyBase64: aws.String(pubKey), - }) - - if err != nil { - log.Printf("[ERR] Error importing key: %s", err) - return err - } - d.SetId(kName) - - op = resp.Operation - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"Started"}, - Target: []string{"Completed", "Succeeded"}, - Refresh: resourceAwsLightsailOperationRefreshFunc(op.Id, meta), - Timeout: 10 * time.Minute, - Delay: 5 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err := stateConf.WaitForState() - if err != nil { - // We don't return an error here because the Create call succeeded - log.Printf("[ERR] Error waiting for KeyPair (%s) to become ready: %s", d.Id(), err) - } - - return resourceAwsLightsailKeyPairRead(d, meta) -} - -func resourceAwsLightsailKeyPairRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - - resp, err := conn.GetKeyPair(&lightsail.GetKeyPairInput{ - KeyPairName: aws.String(d.Id()), - }) - - if err != nil { - log.Printf("[WARN] Error getting KeyPair (%s): %s", d.Id(), err) - // check for known not found error - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] Lightsail KeyPair (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - } - return err - } - - d.Set("arn", resp.KeyPair.Arn) - d.Set("name", resp.KeyPair.Name) - d.Set("fingerprint", resp.KeyPair.Fingerprint) - - return nil -} - -func resourceAwsLightsailKeyPairDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - resp, err := conn.DeleteKeyPair(&lightsail.DeleteKeyPairInput{ - KeyPairName: aws.String(d.Id()), - }) - - if err != nil { - return err - } - - op := resp.Operation - stateConf := &resource.StateChangeConf{ - Pending: []string{"Started"}, - Target: []string{"Completed", "Succeeded"}, - Refresh: resourceAwsLightsailOperationRefreshFunc(op.Id, meta), - Timeout: 10 * time.Minute, - Delay: 5 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for KeyPair (%s) to become destroyed: %s", - d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_static_ip.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_static_ip.go deleted file mode 100644 index 1f593ad40..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_static_ip.go +++ /dev/null @@ -1,98 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/lightsail" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsLightsailStaticIp() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLightsailStaticIpCreate, - Read: resourceAwsLightsailStaticIpRead, - Delete: resourceAwsLightsailStaticIpDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "ip_address": { - Type: schema.TypeString, - Computed: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "support_code": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsLightsailStaticIpCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - - name := d.Get("name").(string) - log.Printf("[INFO] Allocating Lightsail Static IP: %q", name) - out, err := conn.AllocateStaticIp(&lightsail.AllocateStaticIpInput{ - StaticIpName: aws.String(name), - }) - if err != nil { - return err - } - log.Printf("[INFO] Lightsail Static IP allocated: %s", *out) - - d.SetId(name) - - return resourceAwsLightsailStaticIpRead(d, meta) -} - -func resourceAwsLightsailStaticIpRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - - name := d.Get("name").(string) - log.Printf("[INFO] Reading Lightsail Static IP: %q", name) - out, err := conn.GetStaticIp(&lightsail.GetStaticIpInput{ - StaticIpName: aws.String(name), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] Lightsail Static IP (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - } - return err - } - log.Printf("[INFO] Received Lightsail Static IP: %s", *out) - - d.Set("arn", out.StaticIp.Arn) - d.Set("ip_address", out.StaticIp.IpAddress) - d.Set("support_code", out.StaticIp.SupportCode) - - return nil -} - -func resourceAwsLightsailStaticIpDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - - name := d.Get("name").(string) - log.Printf("[INFO] Deleting Lightsail Static IP: %q", name) - out, err := conn.ReleaseStaticIp(&lightsail.ReleaseStaticIpInput{ - StaticIpName: aws.String(name), - }) - if err != nil { - return err - } - log.Printf("[INFO] Deleted Lightsail Static IP: %s", *out) - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_static_ip_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_static_ip_attachment.go deleted file mode 100644 index 766ccff55..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_static_ip_attachment.go +++ /dev/null @@ -1,96 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/lightsail" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsLightsailStaticIpAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLightsailStaticIpAttachmentCreate, - Read: resourceAwsLightsailStaticIpAttachmentRead, - Delete: resourceAwsLightsailStaticIpAttachmentDelete, - - Schema: map[string]*schema.Schema{ - "static_ip_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "instance_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsLightsailStaticIpAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - - staticIpName := d.Get("static_ip_name").(string) - log.Printf("[INFO] Attaching Lightsail Static IP: %q", staticIpName) - out, err := conn.AttachStaticIp(&lightsail.AttachStaticIpInput{ - StaticIpName: aws.String(staticIpName), - InstanceName: aws.String(d.Get("instance_name").(string)), - }) - if err != nil { - return err - } - log.Printf("[INFO] Lightsail Static IP attached: %s", *out) - - d.SetId(staticIpName) - - return resourceAwsLightsailStaticIpAttachmentRead(d, meta) -} - -func resourceAwsLightsailStaticIpAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - - staticIpName := d.Get("static_ip_name").(string) - log.Printf("[INFO] Reading Lightsail Static IP: %q", staticIpName) - out, err := conn.GetStaticIp(&lightsail.GetStaticIpInput{ - StaticIpName: aws.String(staticIpName), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NotFoundException" { - log.Printf("[WARN] Lightsail Static IP (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - } - return err - } - if !*out.StaticIp.IsAttached { - log.Printf("[WARN] Lightsail Static IP (%s) is not attached, removing from state", d.Id()) - d.SetId("") - return nil - } - - log.Printf("[INFO] Received Lightsail Static IP: %s", *out) - - d.Set("instance_name", out.StaticIp.AttachedTo) - - return nil -} - -func resourceAwsLightsailStaticIpAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).lightsailconn - - name := d.Get("static_ip_name").(string) - log.Printf("[INFO] Detaching Lightsail Static IP: %q", name) - out, err := conn.DetachStaticIp(&lightsail.DetachStaticIpInput{ - StaticIpName: aws.String(name), - }) - if err != nil { - return err - } - log.Printf("[INFO] Detached Lightsail Static IP: %s", *out) - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_backend_server_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_backend_server_policy.go deleted file mode 100644 index d8c5746ce..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_backend_server_policy.go +++ /dev/null @@ -1,135 +0,0 @@ -package aws - -import ( - "fmt" - "strconv" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsLoadBalancerBackendServerPolicies() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLoadBalancerBackendServerPoliciesCreate, - Read: resourceAwsLoadBalancerBackendServerPoliciesRead, - Update: resourceAwsLoadBalancerBackendServerPoliciesCreate, - Delete: resourceAwsLoadBalancerBackendServerPoliciesDelete, - - Schema: map[string]*schema.Schema{ - "load_balancer_name": { - Type: schema.TypeString, - Required: true, - }, - - "policy_names": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Set: schema.HashString, - }, - - "instance_port": { - Type: schema.TypeInt, - Required: true, - }, - }, - } -} - -func resourceAwsLoadBalancerBackendServerPoliciesCreate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - loadBalancerName := d.Get("load_balancer_name") - - policyNames := []*string{} - if v, ok := d.GetOk("policy_names"); ok { - policyNames = expandStringList(v.(*schema.Set).List()) - } - - setOpts := &elb.SetLoadBalancerPoliciesForBackendServerInput{ - LoadBalancerName: aws.String(loadBalancerName.(string)), - InstancePort: aws.Int64(int64(d.Get("instance_port").(int))), - PolicyNames: policyNames, - } - - if _, err := elbconn.SetLoadBalancerPoliciesForBackendServer(setOpts); err != nil { - return fmt.Errorf("Error setting LoadBalancerPoliciesForBackendServer: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%s", *setOpts.LoadBalancerName, strconv.FormatInt(*setOpts.InstancePort, 10))) - return resourceAwsLoadBalancerBackendServerPoliciesRead(d, meta) -} - -func resourceAwsLoadBalancerBackendServerPoliciesRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - loadBalancerName, instancePort := resourceAwsLoadBalancerBackendServerPoliciesParseId(d.Id()) - - describeElbOpts := &elb.DescribeLoadBalancersInput{ - LoadBalancerNames: []*string{aws.String(loadBalancerName)}, - } - - describeResp, err := elbconn.DescribeLoadBalancers(describeElbOpts) - - if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - if ec2err.Code() == "LoadBalancerNotFound" { - d.SetId("") - return fmt.Errorf("LoadBalancerNotFound: %s", err) - } - } - return fmt.Errorf("Error retrieving ELB description: %s", err) - } - - if len(describeResp.LoadBalancerDescriptions) != 1 { - return fmt.Errorf("Unable to find ELB: %#v", describeResp.LoadBalancerDescriptions) - } - - lb := describeResp.LoadBalancerDescriptions[0] - - policyNames := []*string{} - for _, backendServer := range lb.BackendServerDescriptions { - if instancePort != strconv.Itoa(int(*backendServer.InstancePort)) { - continue - } - - policyNames = append(policyNames, backendServer.PolicyNames...) - } - - d.Set("load_balancer_name", loadBalancerName) - d.Set("instance_port", instancePort) - d.Set("policy_names", flattenStringList(policyNames)) - - return nil -} - -func resourceAwsLoadBalancerBackendServerPoliciesDelete(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - loadBalancerName, instancePort := resourceAwsLoadBalancerBackendServerPoliciesParseId(d.Id()) - - instancePortInt, err := strconv.ParseInt(instancePort, 10, 64) - if err != nil { - return fmt.Errorf("Error parsing instancePort as integer: %s", err) - } - - setOpts := &elb.SetLoadBalancerPoliciesForBackendServerInput{ - LoadBalancerName: aws.String(loadBalancerName), - InstancePort: aws.Int64(instancePortInt), - PolicyNames: []*string{}, - } - - if _, err := elbconn.SetLoadBalancerPoliciesForBackendServer(setOpts); err != nil { - return fmt.Errorf("Error setting LoadBalancerPoliciesForBackendServer: %s", err) - } - - return nil -} - -func resourceAwsLoadBalancerBackendServerPoliciesParseId(id string) (string, string) { - parts := strings.SplitN(id, ":", 2) - return parts[0], parts[1] -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_listener_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_listener_policy.go deleted file mode 100644 index 96ca1ccdd..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_listener_policy.go +++ /dev/null @@ -1,135 +0,0 @@ -package aws - -import ( - "fmt" - "strconv" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsLoadBalancerListenerPolicies() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLoadBalancerListenerPoliciesCreate, - Read: resourceAwsLoadBalancerListenerPoliciesRead, - Update: resourceAwsLoadBalancerListenerPoliciesCreate, - Delete: resourceAwsLoadBalancerListenerPoliciesDelete, - - Schema: map[string]*schema.Schema{ - "load_balancer_name": { - Type: schema.TypeString, - Required: true, - }, - - "policy_names": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Set: schema.HashString, - }, - - "load_balancer_port": { - Type: schema.TypeInt, - Required: true, - }, - }, - } -} - -func resourceAwsLoadBalancerListenerPoliciesCreate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - loadBalancerName := d.Get("load_balancer_name") - - policyNames := []*string{} - if v, ok := d.GetOk("policy_names"); ok { - policyNames = expandStringList(v.(*schema.Set).List()) - } - - setOpts := &elb.SetLoadBalancerPoliciesOfListenerInput{ - LoadBalancerName: aws.String(loadBalancerName.(string)), - LoadBalancerPort: aws.Int64(int64(d.Get("load_balancer_port").(int))), - PolicyNames: policyNames, - } - - if _, err := elbconn.SetLoadBalancerPoliciesOfListener(setOpts); err != nil { - return fmt.Errorf("Error setting LoadBalancerPoliciesOfListener: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%s", *setOpts.LoadBalancerName, strconv.FormatInt(*setOpts.LoadBalancerPort, 10))) - return resourceAwsLoadBalancerListenerPoliciesRead(d, meta) -} - -func resourceAwsLoadBalancerListenerPoliciesRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - loadBalancerName, loadBalancerPort := resourceAwsLoadBalancerListenerPoliciesParseId(d.Id()) - - describeElbOpts := &elb.DescribeLoadBalancersInput{ - LoadBalancerNames: []*string{aws.String(loadBalancerName)}, - } - - describeResp, err := elbconn.DescribeLoadBalancers(describeElbOpts) - - if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - if ec2err.Code() == "LoadBalancerNotFound" { - d.SetId("") - return fmt.Errorf("LoadBalancerNotFound: %s", err) - } - } - return fmt.Errorf("Error retrieving ELB description: %s", err) - } - - if len(describeResp.LoadBalancerDescriptions) != 1 { - return fmt.Errorf("Unable to find ELB: %#v", describeResp.LoadBalancerDescriptions) - } - - lb := describeResp.LoadBalancerDescriptions[0] - - policyNames := []*string{} - for _, listener := range lb.ListenerDescriptions { - if loadBalancerPort != strconv.Itoa(int(*listener.Listener.LoadBalancerPort)) { - continue - } - - policyNames = append(policyNames, listener.PolicyNames...) - } - - d.Set("load_balancer_name", loadBalancerName) - d.Set("load_balancer_port", loadBalancerPort) - d.Set("policy_names", flattenStringList(policyNames)) - - return nil -} - -func resourceAwsLoadBalancerListenerPoliciesDelete(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - loadBalancerName, loadBalancerPort := resourceAwsLoadBalancerListenerPoliciesParseId(d.Id()) - - loadBalancerPortInt, err := strconv.ParseInt(loadBalancerPort, 10, 64) - if err != nil { - return fmt.Errorf("Error parsing loadBalancerPort as integer: %s", err) - } - - setOpts := &elb.SetLoadBalancerPoliciesOfListenerInput{ - LoadBalancerName: aws.String(loadBalancerName), - LoadBalancerPort: aws.Int64(loadBalancerPortInt), - PolicyNames: []*string{}, - } - - if _, err := elbconn.SetLoadBalancerPoliciesOfListener(setOpts); err != nil { - return fmt.Errorf("Error setting LoadBalancerPoliciesOfListener: %s", err) - } - - return nil -} - -func resourceAwsLoadBalancerListenerPoliciesParseId(id string) (string, string) { - parts := strings.SplitN(id, ":", 2) - return parts[0], parts[1] -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_policy.go deleted file mode 100644 index 703ba85cd..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_policy.go +++ /dev/null @@ -1,364 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsLoadBalancerPolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsLoadBalancerPolicyCreate, - Read: resourceAwsLoadBalancerPolicyRead, - Update: resourceAwsLoadBalancerPolicyUpdate, - Delete: resourceAwsLoadBalancerPolicyDelete, - - Schema: map[string]*schema.Schema{ - "load_balancer_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "policy_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "policy_type_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "policy_attribute": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - }, - - "value": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsLoadBalancerPolicyCreate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - attributes := []*elb.PolicyAttribute{} - if attributedata, ok := d.GetOk("policy_attribute"); ok { - attributeSet := attributedata.(*schema.Set).List() - for _, attribute := range attributeSet { - data := attribute.(map[string]interface{}) - attributes = append(attributes, &elb.PolicyAttribute{ - AttributeName: aws.String(data["name"].(string)), - AttributeValue: aws.String(data["value"].(string)), - }) - } - } - - lbspOpts := &elb.CreateLoadBalancerPolicyInput{ - LoadBalancerName: aws.String(d.Get("load_balancer_name").(string)), - PolicyName: aws.String(d.Get("policy_name").(string)), - PolicyTypeName: aws.String(d.Get("policy_type_name").(string)), - PolicyAttributes: attributes, - } - - if _, err := elbconn.CreateLoadBalancerPolicy(lbspOpts); err != nil { - return fmt.Errorf("Error creating LoadBalancerPolicy: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%s", - *lbspOpts.LoadBalancerName, - *lbspOpts.PolicyName)) - return resourceAwsLoadBalancerPolicyRead(d, meta) -} - -func resourceAwsLoadBalancerPolicyRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - loadBalancerName, policyName := resourceAwsLoadBalancerPolicyParseId(d.Id()) - - request := &elb.DescribeLoadBalancerPoliciesInput{ - LoadBalancerName: aws.String(loadBalancerName), - PolicyNames: []*string{aws.String(policyName)}, - } - - getResp, err := elbconn.DescribeLoadBalancerPolicies(request) - - if isAWSErr(err, "LoadBalancerNotFound", "") { - log.Printf("[WARN] Load Balancer Policy (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if isAWSErr(err, elb.ErrCodePolicyNotFoundException, "") { - log.Printf("[WARN] Load Balancer Policy (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("Error retrieving policy: %s", err) - } - - if len(getResp.PolicyDescriptions) != 1 { - return fmt.Errorf("Unable to find policy %#v", getResp.PolicyDescriptions) - } - - policyDesc := getResp.PolicyDescriptions[0] - policyTypeName := policyDesc.PolicyTypeName - policyAttributes := policyDesc.PolicyAttributeDescriptions - - attributes := []map[string]string{} - for _, a := range policyAttributes { - pair := make(map[string]string) - pair["name"] = *a.AttributeName - pair["value"] = *a.AttributeValue - if (*policyTypeName == "SSLNegotiationPolicyType") && (*a.AttributeValue == "false") { - continue - } - attributes = append(attributes, pair) - } - - d.Set("policy_name", policyName) - d.Set("policy_type_name", policyTypeName) - d.Set("load_balancer_name", loadBalancerName) - d.Set("policy_attribute", attributes) - - return nil -} - -func resourceAwsLoadBalancerPolicyUpdate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - reassignments := Reassignment{} - - loadBalancerName, policyName := resourceAwsLoadBalancerPolicyParseId(d.Id()) - - assigned, err := resourceAwsLoadBalancerPolicyAssigned(policyName, loadBalancerName, elbconn) - if err != nil { - return fmt.Errorf("Error determining assignment status of Load Balancer Policy %s: %s", policyName, err) - } - - if assigned { - reassignments, err = resourceAwsLoadBalancerPolicyUnassign(policyName, loadBalancerName, elbconn) - if err != nil { - return fmt.Errorf("Error unassigning Load Balancer Policy %s: %s", policyName, err) - } - } - - request := &elb.DeleteLoadBalancerPolicyInput{ - LoadBalancerName: aws.String(loadBalancerName), - PolicyName: aws.String(policyName), - } - - if _, err := elbconn.DeleteLoadBalancerPolicy(request); err != nil { - return fmt.Errorf("Error deleting Load Balancer Policy %s: %s", d.Id(), err) - } - - err = resourceAwsLoadBalancerPolicyCreate(d, meta) - if err != nil { - return err - } - - for _, listenerAssignment := range reassignments.listenerPolicies { - if _, err := elbconn.SetLoadBalancerPoliciesOfListener(listenerAssignment); err != nil { - return fmt.Errorf("Error setting LoadBalancerPoliciesOfListener: %s", err) - } - } - - for _, backendServerAssignment := range reassignments.backendServerPolicies { - if _, err := elbconn.SetLoadBalancerPoliciesForBackendServer(backendServerAssignment); err != nil { - return fmt.Errorf("Error setting LoadBalancerPoliciesForBackendServer: %s", err) - } - } - - return resourceAwsLoadBalancerPolicyRead(d, meta) -} - -func resourceAwsLoadBalancerPolicyDelete(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - - loadBalancerName, policyName := resourceAwsLoadBalancerPolicyParseId(d.Id()) - - assigned, err := resourceAwsLoadBalancerPolicyAssigned(policyName, loadBalancerName, elbconn) - if err != nil { - return fmt.Errorf("Error determining assignment status of Load Balancer Policy %s: %s", policyName, err) - } - - if assigned { - _, err := resourceAwsLoadBalancerPolicyUnassign(policyName, loadBalancerName, elbconn) - if err != nil { - return fmt.Errorf("Error unassigning Load Balancer Policy %s: %s", policyName, err) - } - } - - request := &elb.DeleteLoadBalancerPolicyInput{ - LoadBalancerName: aws.String(loadBalancerName), - PolicyName: aws.String(policyName), - } - - if _, err := elbconn.DeleteLoadBalancerPolicy(request); err != nil { - return fmt.Errorf("Error deleting Load Balancer Policy %s: %s", d.Id(), err) - } - - return nil -} - -func resourceAwsLoadBalancerPolicyParseId(id string) (string, string) { - parts := strings.SplitN(id, ":", 2) - return parts[0], parts[1] -} - -func resourceAwsLoadBalancerPolicyAssigned(policyName, loadBalancerName string, elbconn *elb.ELB) (bool, error) { - describeElbOpts := &elb.DescribeLoadBalancersInput{ - LoadBalancerNames: []*string{aws.String(loadBalancerName)}, - } - - describeResp, err := elbconn.DescribeLoadBalancers(describeElbOpts) - - if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - if ec2err.Code() == "LoadBalancerNotFound" { - return false, nil - } - } - return false, fmt.Errorf("Error retrieving ELB description: %s", err) - } - - if len(describeResp.LoadBalancerDescriptions) != 1 { - return false, fmt.Errorf("Unable to find ELB: %#v", describeResp.LoadBalancerDescriptions) - } - - lb := describeResp.LoadBalancerDescriptions[0] - assigned := false - for _, backendServer := range lb.BackendServerDescriptions { - for _, name := range backendServer.PolicyNames { - if policyName == *name { - assigned = true - break - } - } - } - - for _, listener := range lb.ListenerDescriptions { - for _, name := range listener.PolicyNames { - if policyName == *name { - assigned = true - break - } - } - } - - return assigned, nil -} - -type Reassignment struct { - backendServerPolicies []*elb.SetLoadBalancerPoliciesForBackendServerInput - listenerPolicies []*elb.SetLoadBalancerPoliciesOfListenerInput -} - -func resourceAwsLoadBalancerPolicyUnassign(policyName, loadBalancerName string, elbconn *elb.ELB) (Reassignment, error) { - reassignments := Reassignment{} - - describeElbOpts := &elb.DescribeLoadBalancersInput{ - LoadBalancerNames: []*string{aws.String(loadBalancerName)}, - } - - describeResp, err := elbconn.DescribeLoadBalancers(describeElbOpts) - - if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - if ec2err.Code() == "LoadBalancerNotFound" { - return reassignments, nil - } - } - return reassignments, fmt.Errorf("Error retrieving ELB description: %s", err) - } - - if len(describeResp.LoadBalancerDescriptions) != 1 { - return reassignments, fmt.Errorf("Unable to find ELB: %#v", describeResp.LoadBalancerDescriptions) - } - - lb := describeResp.LoadBalancerDescriptions[0] - - for _, backendServer := range lb.BackendServerDescriptions { - policies := []*string{} - - for _, name := range backendServer.PolicyNames { - if policyName != *name { - policies = append(policies, name) - } - } - - if len(backendServer.PolicyNames) != len(policies) { - setOpts := &elb.SetLoadBalancerPoliciesForBackendServerInput{ - LoadBalancerName: aws.String(loadBalancerName), - InstancePort: aws.Int64(*backendServer.InstancePort), - PolicyNames: policies, - } - - reassignOpts := &elb.SetLoadBalancerPoliciesForBackendServerInput{ - LoadBalancerName: aws.String(loadBalancerName), - InstancePort: aws.Int64(*backendServer.InstancePort), - PolicyNames: backendServer.PolicyNames, - } - - reassignments.backendServerPolicies = append(reassignments.backendServerPolicies, reassignOpts) - - _, err = elbconn.SetLoadBalancerPoliciesForBackendServer(setOpts) - if err != nil { - return reassignments, fmt.Errorf("Error Setting Load Balancer Policies for Backend Server: %s", err) - } - } - } - - for _, listener := range lb.ListenerDescriptions { - policies := []*string{} - - for _, name := range listener.PolicyNames { - if policyName != *name { - policies = append(policies, name) - } - } - - if len(listener.PolicyNames) != len(policies) { - setOpts := &elb.SetLoadBalancerPoliciesOfListenerInput{ - LoadBalancerName: aws.String(loadBalancerName), - LoadBalancerPort: aws.Int64(*listener.Listener.LoadBalancerPort), - PolicyNames: policies, - } - - reassignOpts := &elb.SetLoadBalancerPoliciesOfListenerInput{ - LoadBalancerName: aws.String(loadBalancerName), - LoadBalancerPort: aws.Int64(*listener.Listener.LoadBalancerPort), - PolicyNames: listener.PolicyNames, - } - - reassignments.listenerPolicies = append(reassignments.listenerPolicies, reassignOpts) - - _, err = elbconn.SetLoadBalancerPoliciesOfListener(setOpts) - if err != nil { - return reassignments, fmt.Errorf("Error Setting Load Balancer Policies of Listener: %s", err) - } - } - } - - return reassignments, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_macie_member_account_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_macie_member_account_association.go deleted file mode 100644 index 23b53147d..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_macie_member_account_association.go +++ /dev/null @@ -1,96 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/macie" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsMacieMemberAccountAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsMacieMemberAccountAssociationCreate, - Read: resourceAwsMacieMemberAccountAssociationRead, - Delete: resourceAwsMacieMemberAccountAssociationDelete, - - Schema: map[string]*schema.Schema{ - "member_account_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateAwsAccountId, - }, - }, - } -} - -func resourceAwsMacieMemberAccountAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).macieconn - - memberAccountId := d.Get("member_account_id").(string) - req := &macie.AssociateMemberAccountInput{ - MemberAccountId: aws.String(memberAccountId), - } - - log.Printf("[DEBUG] Creating Macie member account association: %#v", req) - _, err := conn.AssociateMemberAccount(req) - if err != nil { - return fmt.Errorf("Error creating Macie member account association: %s", err) - } - - d.SetId(memberAccountId) - return resourceAwsMacieMemberAccountAssociationRead(d, meta) -} - -func resourceAwsMacieMemberAccountAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).macieconn - - req := &macie.ListMemberAccountsInput{} - - var res *macie.MemberAccount - err := conn.ListMemberAccountsPages(req, func(page *macie.ListMemberAccountsOutput, lastPage bool) bool { - for _, v := range page.MemberAccounts { - if aws.StringValue(v.AccountId) == d.Get("member_account_id").(string) { - res = v - return false - } - } - - return true - }) - if err != nil { - return fmt.Errorf("Error listing Macie member account associations: %s", err) - } - - if res == nil { - log.Printf("[WARN] Macie member account association (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return nil -} - -func resourceAwsMacieMemberAccountAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).macieconn - - log.Printf("[DEBUG] Deleting Macie member account association: %s", d.Id()) - - _, err := conn.DisassociateMemberAccount(&macie.DisassociateMemberAccountInput{ - MemberAccountId: aws.String(d.Get("member_account_id").(string)), - }) - if err != nil { - if isAWSErr(err, macie.ErrCodeInvalidInputException, "is a master Macie account and cannot be disassociated") { - log.Printf("[INFO] Macie master account (%s) cannot be disassociated, removing from state", d.Id()) - return nil - } else if isAWSErr(err, macie.ErrCodeInvalidInputException, "is not yet associated with Macie") { - return nil - } else { - return fmt.Errorf("Error deleting Macie member account association: %s", err) - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_macie_s3_bucket_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_macie_s3_bucket_association.go deleted file mode 100644 index 8f8606eba..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_macie_s3_bucket_association.go +++ /dev/null @@ -1,206 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/macie" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsMacieS3BucketAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsMacieS3BucketAssociationCreate, - Read: resourceAwsMacieS3BucketAssociationRead, - Update: resourceAwsMacieS3BucketAssociationUpdate, - Delete: resourceAwsMacieS3BucketAssociationDelete, - - Schema: map[string]*schema.Schema{ - "bucket_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "member_account_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateAwsAccountId, - }, - "classification_type": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "continuous": { - Type: schema.TypeString, - Optional: true, - Default: macie.S3ContinuousClassificationTypeFull, - ValidateFunc: validation.StringInSlice([]string{macie.S3ContinuousClassificationTypeFull}, false), - }, - "one_time": { - Type: schema.TypeString, - Optional: true, - Default: macie.S3OneTimeClassificationTypeNone, - ValidateFunc: validation.StringInSlice([]string{macie.S3OneTimeClassificationTypeFull, macie.S3OneTimeClassificationTypeNone}, false), - }, - }, - }, - }, - }, - } -} - -func resourceAwsMacieS3BucketAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).macieconn - - req := &macie.AssociateS3ResourcesInput{ - S3Resources: []*macie.S3ResourceClassification{ - { - BucketName: aws.String(d.Get("bucket_name").(string)), - ClassificationType: expandMacieClassificationType(d), - }, - }, - } - if v, ok := d.GetOk("member_account_id"); ok { - req.MemberAccountId = aws.String(v.(string)) - } - if v, ok := d.GetOk("prefix"); ok { - req.S3Resources[0].Prefix = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating Macie S3 bucket association: %#v", req) - resp, err := conn.AssociateS3Resources(req) - if err != nil { - return fmt.Errorf("Error creating Macie S3 bucket association: %s", err) - } - if len(resp.FailedS3Resources) > 0 { - return fmt.Errorf("Error creating Macie S3 bucket association: %s", resp.FailedS3Resources[0]) - } - - d.SetId(fmt.Sprintf("%s/%s", d.Get("bucket_name"), d.Get("prefix"))) - return resourceAwsMacieS3BucketAssociationRead(d, meta) -} - -func resourceAwsMacieS3BucketAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).macieconn - - req := &macie.ListS3ResourcesInput{} - if v, ok := d.GetOk("member_account_id"); ok { - req.MemberAccountId = aws.String(v.(string)) - } - - bucketName := d.Get("bucket_name").(string) - prefix := d.Get("prefix") - - var res *macie.S3ResourceClassification - err := conn.ListS3ResourcesPages(req, func(page *macie.ListS3ResourcesOutput, lastPage bool) bool { - for _, v := range page.S3Resources { - if aws.StringValue(v.BucketName) == bucketName && aws.StringValue(v.Prefix) == prefix { - res = v - return false - } - } - - return true - }) - if err != nil { - return fmt.Errorf("Error listing Macie S3 bucket associations: %s", err) - } - - if res == nil { - log.Printf("[WARN] Macie S3 bucket association (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err := d.Set("classification_type", flattenMacieClassificationType(res.ClassificationType)); err != nil { - return fmt.Errorf("error setting classification_type: %s", err) - } - - return nil -} - -func resourceAwsMacieS3BucketAssociationUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).macieconn - - if d.HasChange("classification_type") { - req := &macie.UpdateS3ResourcesInput{ - S3ResourcesUpdate: []*macie.S3ResourceClassificationUpdate{ - { - BucketName: aws.String(d.Get("bucket_name").(string)), - ClassificationTypeUpdate: expandMacieClassificationTypeUpdate(d), - }, - }, - } - if v, ok := d.GetOk("member_account_id"); ok { - req.MemberAccountId = aws.String(v.(string)) - } - if v, ok := d.GetOk("prefix"); ok { - req.S3ResourcesUpdate[0].Prefix = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Updating Macie S3 bucket association: %#v", req) - resp, err := conn.UpdateS3Resources(req) - if err != nil { - return fmt.Errorf("Error updating Macie S3 bucket association: %s", err) - } - if len(resp.FailedS3Resources) > 0 { - return fmt.Errorf("Error updating Macie S3 bucket association: %s", resp.FailedS3Resources[0]) - } - } - - return resourceAwsMacieS3BucketAssociationRead(d, meta) -} - -func resourceAwsMacieS3BucketAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).macieconn - - log.Printf("[DEBUG] Deleting Macie S3 bucket association: %s", d.Id()) - - req := &macie.DisassociateS3ResourcesInput{ - AssociatedS3Resources: []*macie.S3Resource{ - { - BucketName: aws.String(d.Get("bucket_name").(string)), - }, - }, - } - if v, ok := d.GetOk("member_account_id"); ok { - req.MemberAccountId = aws.String(v.(string)) - } - if v, ok := d.GetOk("prefix"); ok { - req.AssociatedS3Resources[0].Prefix = aws.String(v.(string)) - } - - resp, err := conn.DisassociateS3Resources(req) - if err != nil { - return fmt.Errorf("Error deleting Macie S3 bucket association: %s", err) - } - if len(resp.FailedS3Resources) > 0 { - failed := resp.FailedS3Resources[0] - // { - // ErrorCode: "InvalidInputException", - // ErrorMessage: "The request was rejected. The specified S3 resource (bucket or prefix) is not associated with Macie.", - // FailedItem: { - // BucketName: "tf-macie-example-002" - // } - // } - if aws.StringValue(failed.ErrorCode) == macie.ErrCodeInvalidInputException && - strings.Contains(aws.StringValue(failed.ErrorMessage), "is not associated with Macie") { - return nil - } - return fmt.Errorf("Error deleting Macie S3 bucket association: %s", failed) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_main_route_table_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_main_route_table_association.go deleted file mode 100644 index 58dadccd8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_main_route_table_association.go +++ /dev/null @@ -1,169 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsMainRouteTableAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsMainRouteTableAssociationCreate, - Read: resourceAwsMainRouteTableAssociationRead, - Update: resourceAwsMainRouteTableAssociationUpdate, - Delete: resourceAwsMainRouteTableAssociationDelete, - - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Required: true, - }, - - "route_table_id": { - Type: schema.TypeString, - Required: true, - }, - - // We use this field to record the main route table that is automatically - // created when the VPC is created. We need this to be able to "destroy" - // our main route table association, which we do by returning this route - // table to its original place as the Main Route Table for the VPC. - "original_route_table_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsMainRouteTableAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - vpcId := d.Get("vpc_id").(string) - routeTableId := d.Get("route_table_id").(string) - - log.Printf("[INFO] Creating main route table association: %s => %s", vpcId, routeTableId) - - mainAssociation, err := findMainRouteTableAssociation(conn, vpcId) - if err != nil { - return err - } - - resp, err := conn.ReplaceRouteTableAssociation(&ec2.ReplaceRouteTableAssociationInput{ - AssociationId: mainAssociation.RouteTableAssociationId, - RouteTableId: aws.String(routeTableId), - }) - if err != nil { - return err - } - - d.Set("original_route_table_id", mainAssociation.RouteTableId) - d.SetId(*resp.NewAssociationId) - log.Printf("[INFO] New main route table association ID: %s", d.Id()) - - return nil -} - -func resourceAwsMainRouteTableAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - mainAssociation, err := findMainRouteTableAssociation( - conn, - d.Get("vpc_id").(string)) - if err != nil { - return err - } - - if mainAssociation == nil || *mainAssociation.RouteTableAssociationId != d.Id() { - // It seems it doesn't exist anymore, so clear the ID - d.SetId("") - } - - return nil -} - -// Update is almost exactly like Create, except we want to retain the -// original_route_table_id - this needs to stay recorded as the AWS-created -// table from VPC creation. -func resourceAwsMainRouteTableAssociationUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - vpcId := d.Get("vpc_id").(string) - routeTableId := d.Get("route_table_id").(string) - - log.Printf("[INFO] Updating main route table association: %s => %s", vpcId, routeTableId) - - resp, err := conn.ReplaceRouteTableAssociation(&ec2.ReplaceRouteTableAssociationInput{ - AssociationId: aws.String(d.Id()), - RouteTableId: aws.String(routeTableId), - }) - if err != nil { - return err - } - - d.SetId(*resp.NewAssociationId) - log.Printf("[INFO] New main route table association ID: %s", d.Id()) - - return nil -} - -func resourceAwsMainRouteTableAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - vpcId := d.Get("vpc_id").(string) - originalRouteTableId := d.Get("original_route_table_id").(string) - - log.Printf("[INFO] Deleting main route table association by resetting Main Route Table for VPC: %s to its original Route Table: %s", - vpcId, - originalRouteTableId) - - resp, err := conn.ReplaceRouteTableAssociation(&ec2.ReplaceRouteTableAssociationInput{ - AssociationId: aws.String(d.Id()), - RouteTableId: aws.String(originalRouteTableId), - }) - if err != nil { - return err - } - - log.Printf("[INFO] Resulting Association ID: %s", *resp.NewAssociationId) - - return nil -} - -func findMainRouteTableAssociation(conn *ec2.EC2, vpcId string) (*ec2.RouteTableAssociation, error) { - mainRouteTable, err := findMainRouteTable(conn, vpcId) - if err != nil { - return nil, err - } - if mainRouteTable == nil { - return nil, nil - } - - for _, a := range mainRouteTable.Associations { - if *a.Main { - return a, nil - } - } - return nil, fmt.Errorf("Could not find main routing table association for VPC: %s", vpcId) -} - -func findMainRouteTable(conn *ec2.EC2, vpcId string) (*ec2.RouteTable, error) { - mainFilter := &ec2.Filter{ - Name: aws.String("association.main"), - Values: []*string{aws.String("true")}, - } - vpcFilter := &ec2.Filter{ - Name: aws.String("vpc-id"), - Values: []*string{aws.String(vpcId)}, - } - routeResp, err := conn.DescribeRouteTables(&ec2.DescribeRouteTablesInput{ - Filters: []*ec2.Filter{mainFilter, vpcFilter}, - }) - if err != nil { - return nil, err - } else if len(routeResp.RouteTables) != 1 { - return nil, nil - } - - return routeResp.RouteTables[0], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_package_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_package_channel.go deleted file mode 100644 index 356d3241a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_package_channel.go +++ /dev/null @@ -1,182 +0,0 @@ -package aws - -import ( - "fmt" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/mediapackage" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsMediaPackageChannel() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsMediaPackageChannelCreate, - Read: resourceAwsMediaPackageChannelRead, - Update: resourceAwsMediaPackageChannelUpdate, - Delete: resourceAwsMediaPackageChannelDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "channel_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[\w-]+$`), "must only contain alphanumeric characters, dashes or underscores"), - }, - "description": { - Type: schema.TypeString, - Optional: true, - Default: "Managed by Terraform", - }, - "hls_ingest": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "ingest_endpoints": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "password": { - Type: schema.TypeString, - Computed: true, - Sensitive: true, - }, - "url": { - Type: schema.TypeString, - Computed: true, - }, - "username": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func resourceAwsMediaPackageChannelCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mediapackageconn - - input := &mediapackage.CreateChannelInput{ - Id: aws.String(d.Get("channel_id").(string)), - Description: aws.String(d.Get("description").(string)), - } - - _, err := conn.CreateChannel(input) - if err != nil { - return fmt.Errorf("error creating MediaPackage Channel: %s", err) - } - - d.SetId(d.Get("channel_id").(string)) - return resourceAwsMediaPackageChannelRead(d, meta) -} - -func resourceAwsMediaPackageChannelRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mediapackageconn - - input := &mediapackage.DescribeChannelInput{ - Id: aws.String(d.Id()), - } - resp, err := conn.DescribeChannel(input) - if err != nil { - return fmt.Errorf("error describing MediaPackage Channel: %s", err) - } - d.Set("arn", resp.Arn) - d.Set("channel_id", resp.Id) - d.Set("description", resp.Description) - - if err := d.Set("hls_ingest", flattenMediaPackageHLSIngest(resp.HlsIngest)); err != nil { - return fmt.Errorf("error setting hls_ingest: %s", err) - } - - return nil -} - -func resourceAwsMediaPackageChannelUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mediapackageconn - - input := &mediapackage.UpdateChannelInput{ - Id: aws.String(d.Id()), - Description: aws.String(d.Get("description").(string)), - } - - _, err := conn.UpdateChannel(input) - if err != nil { - return fmt.Errorf("error updating MediaPackage Channel: %s", err) - } - - return resourceAwsMediaPackageChannelRead(d, meta) -} - -func resourceAwsMediaPackageChannelDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mediapackageconn - - input := &mediapackage.DeleteChannelInput{ - Id: aws.String(d.Id()), - } - _, err := conn.DeleteChannel(input) - if err != nil { - if isAWSErr(err, mediapackage.ErrCodeNotFoundException, "") { - return nil - } - return fmt.Errorf("error deleting MediaPackage Channel: %s", err) - } - - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - dcinput := &mediapackage.DescribeChannelInput{ - Id: aws.String(d.Id()), - } - _, err := conn.DescribeChannel(dcinput) - if err != nil { - if isAWSErr(err, mediapackage.ErrCodeNotFoundException, "") { - return nil - } - return resource.NonRetryableError(err) - } - return resource.RetryableError(fmt.Errorf("MediaPackage Channel (%s) still exists", d.Id())) - }) - if err != nil { - return fmt.Errorf("error waiting for MediaPackage Channel (%s) deletion: %s", d.Id(), err) - } - - return nil -} - -func flattenMediaPackageHLSIngest(h *mediapackage.HlsIngest) []map[string]interface{} { - if h.IngestEndpoints == nil { - return []map[string]interface{}{ - {"ingest_endpoints": []map[string]interface{}{}}, - } - } - - var ingestEndpoints []map[string]interface{} - for _, e := range h.IngestEndpoints { - endpoint := map[string]interface{}{ - "password": aws.StringValue(e.Password), - "url": aws.StringValue(e.Url), - "username": aws.StringValue(e.Username), - } - - ingestEndpoints = append(ingestEndpoints, endpoint) - } - - return []map[string]interface{}{ - {"ingest_endpoints": ingestEndpoints}, - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container.go deleted file mode 100644 index ce76b6ad9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container.go +++ /dev/null @@ -1,132 +0,0 @@ -package aws - -import ( - "fmt" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/mediastore" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsMediaStoreContainer() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsMediaStoreContainerCreate, - Read: resourceAwsMediaStoreContainerRead, - Delete: resourceAwsMediaStoreContainerDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile(`^\w+$`), "must contain alphanumeric characters or underscores"), - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsMediaStoreContainerCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mediastoreconn - - input := &mediastore.CreateContainerInput{ - ContainerName: aws.String(d.Get("name").(string)), - } - - _, err := conn.CreateContainer(input) - if err != nil { - return err - } - stateConf := &resource.StateChangeConf{ - Pending: []string{mediastore.ContainerStatusCreating}, - Target: []string{mediastore.ContainerStatusActive}, - Refresh: mediaStoreContainerRefreshStatusFunc(conn, d.Get("name").(string)), - Timeout: 10 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - d.SetId(d.Get("name").(string)) - return resourceAwsMediaStoreContainerRead(d, meta) -} - -func resourceAwsMediaStoreContainerRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mediastoreconn - - input := &mediastore.DescribeContainerInput{ - ContainerName: aws.String(d.Id()), - } - resp, err := conn.DescribeContainer(input) - if err != nil { - return err - } - d.Set("arn", resp.Container.ARN) - d.Set("name", resp.Container.Name) - d.Set("endpoint", resp.Container.Endpoint) - return nil -} - -func resourceAwsMediaStoreContainerDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mediastoreconn - - input := &mediastore.DeleteContainerInput{ - ContainerName: aws.String(d.Id()), - } - _, err := conn.DeleteContainer(input) - if err != nil { - if isAWSErr(err, mediastore.ErrCodeContainerNotFoundException, "") { - return nil - } - return err - } - - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - dcinput := &mediastore.DescribeContainerInput{ - ContainerName: aws.String(d.Id()), - } - _, err := conn.DescribeContainer(dcinput) - if err != nil { - if isAWSErr(err, mediastore.ErrCodeContainerNotFoundException, "") { - return nil - } - return resource.NonRetryableError(err) - } - return resource.RetryableError(fmt.Errorf("Media Store Container (%s) still exists", d.Id())) - }) - if err != nil { - return fmt.Errorf("error waiting for Media Store Container (%s) deletion: %s", d.Id(), err) - } - - return nil -} - -func mediaStoreContainerRefreshStatusFunc(conn *mediastore.MediaStore, cn string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &mediastore.DescribeContainerInput{ - ContainerName: aws.String(cn), - } - resp, err := conn.DescribeContainer(input) - if err != nil { - return nil, "failed", err - } - return resp, *resp.Container.Status, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container_policy.go deleted file mode 100644 index b3469fe9c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container_policy.go +++ /dev/null @@ -1,103 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/mediastore" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsMediaStoreContainerPolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsMediaStoreContainerPolicyPut, - Read: resourceAwsMediaStoreContainerPolicyRead, - Update: resourceAwsMediaStoreContainerPolicyPut, - Delete: resourceAwsMediaStoreContainerPolicyDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "container_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "policy": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateIAMPolicyJson, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - }, - } -} - -func resourceAwsMediaStoreContainerPolicyPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mediastoreconn - - input := &mediastore.PutContainerPolicyInput{ - ContainerName: aws.String(d.Get("container_name").(string)), - Policy: aws.String(d.Get("policy").(string)), - } - - _, err := conn.PutContainerPolicy(input) - if err != nil { - return err - } - - d.SetId(d.Get("container_name").(string)) - return resourceAwsMediaStoreContainerPolicyRead(d, meta) -} - -func resourceAwsMediaStoreContainerPolicyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mediastoreconn - - input := &mediastore.GetContainerPolicyInput{ - ContainerName: aws.String(d.Id()), - } - - resp, err := conn.GetContainerPolicy(input) - if err != nil { - if isAWSErr(err, mediastore.ErrCodeContainerNotFoundException, "") { - log.Printf("[WARN] MediaContainer Policy %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - if isAWSErr(err, mediastore.ErrCodePolicyNotFoundException, "") { - log.Printf("[WARN] MediaContainer Policy %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("container_name", d.Id()) - d.Set("policy", resp.Policy) - return nil -} - -func resourceAwsMediaStoreContainerPolicyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mediastoreconn - - input := &mediastore.DeleteContainerPolicyInput{ - ContainerName: aws.String(d.Id()), - } - - _, err := conn.DeleteContainerPolicy(input) - if err != nil { - if isAWSErr(err, mediastore.ErrCodeContainerNotFoundException, "") { - return nil - } - if isAWSErr(err, mediastore.ErrCodePolicyNotFoundException, "") { - return nil - } - // if isAWSErr(err, mediastore.ErrCodeContainerInUseException, "Container must be ACTIVE in order to perform this operation") { - // return nil - // } - return err - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go deleted file mode 100644 index 704ad6a41..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go +++ /dev/null @@ -1,605 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "reflect" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/mq" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/mitchellh/copystructure" -) - -func resourceAwsMqBroker() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsMqBrokerCreate, - Read: resourceAwsMqBrokerRead, - Update: resourceAwsMqBrokerUpdate, - Delete: resourceAwsMqBrokerDelete, - - Schema: map[string]*schema.Schema{ - "apply_immediately": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "auto_minor_version_upgrade": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - "broker_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "configuration": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "revision": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - }, - }, - }, - "deployment_mode": { - Type: schema.TypeString, - Optional: true, - Default: "SINGLE_INSTANCE", - ForceNew: true, - }, - "engine_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "engine_version": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "host_instance_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "logs": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - // Ignore missing configuration block - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "general": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "audit": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - }, - "maintenance_window_start_time": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "day_of_week": { - Type: schema.TypeString, - Required: true, - }, - "time_of_day": { - Type: schema.TypeString, - Required: true, - }, - "time_zone": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "publicly_accessible": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - "security_groups": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Required: true, - ForceNew: true, - }, - "subnet_ids": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Computed: true, - ForceNew: true, - }, - "user": { - Type: schema.TypeSet, - Required: true, - Set: resourceAwsMqUserHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "console_access": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "groups": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - Optional: true, - }, - "password": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - ValidateFunc: validateMqBrokerPassword, - }, - "username": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "instances": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "console_url": { - Type: schema.TypeString, - Computed: true, - }, - "ip_address": { - Type: schema.TypeString, - Computed: true, - }, - "endpoints": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsMqBrokerCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mqconn - - name := d.Get("broker_name").(string) - requestId := resource.PrefixedUniqueId(fmt.Sprintf("tf-%s", name)) - input := mq.CreateBrokerRequest{ - AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), - BrokerName: aws.String(name), - CreatorRequestId: aws.String(requestId), - EngineType: aws.String(d.Get("engine_type").(string)), - EngineVersion: aws.String(d.Get("engine_version").(string)), - HostInstanceType: aws.String(d.Get("host_instance_type").(string)), - PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), - SecurityGroups: expandStringSet(d.Get("security_groups").(*schema.Set)), - Users: expandMqUsers(d.Get("user").(*schema.Set).List()), - Logs: expandMqLogs(d.Get("logs").([]interface{})), - } - - if v, ok := d.GetOk("configuration"); ok { - input.Configuration = expandMqConfigurationId(v.([]interface{})) - } - if v, ok := d.GetOk("deployment_mode"); ok { - input.DeploymentMode = aws.String(v.(string)) - } - if v, ok := d.GetOk("maintenance_window_start_time"); ok { - input.MaintenanceWindowStartTime = expandMqWeeklyStartTime(v.([]interface{})) - } - if v, ok := d.GetOk("subnet_ids"); ok { - input.SubnetIds = expandStringList(v.(*schema.Set).List()) - } - if v, ok := d.GetOk("tags"); ok { - input.Tags = tagsFromMapGeneric(v.(map[string]interface{})) - } - - log.Printf("[INFO] Creating MQ Broker: %s", input) - out, err := conn.CreateBroker(&input) - if err != nil { - return err - } - - d.SetId(*out.BrokerId) - d.Set("arn", out.BrokerArn) - - stateConf := resource.StateChangeConf{ - Pending: []string{ - mq.BrokerStateCreationInProgress, - mq.BrokerStateRebootInProgress, - }, - Target: []string{mq.BrokerStateRunning}, - Timeout: 30 * time.Minute, - Refresh: func() (interface{}, string, error) { - out, err := conn.DescribeBroker(&mq.DescribeBrokerInput{ - BrokerId: aws.String(d.Id()), - }) - if err != nil { - return 42, "", err - } - - return out, *out.BrokerState, nil - }, - } - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsMqBrokerRead(d, meta) -} - -func resourceAwsMqBrokerRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mqconn - - log.Printf("[INFO] Reading MQ Broker: %s", d.Id()) - out, err := conn.DescribeBroker(&mq.DescribeBrokerInput{ - BrokerId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, "NotFoundException", "") { - log.Printf("[WARN] MQ Broker %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - // API docs say a 404 can also return a 403 - if isAWSErr(err, "ForbiddenException", "Forbidden") { - log.Printf("[WARN] MQ Broker %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("auto_minor_version_upgrade", out.AutoMinorVersionUpgrade) - d.Set("arn", out.BrokerArn) - d.Set("instances", flattenMqBrokerInstances(out.BrokerInstances)) - d.Set("broker_name", out.BrokerName) - d.Set("deployment_mode", out.DeploymentMode) - d.Set("engine_type", out.EngineType) - d.Set("engine_version", out.EngineVersion) - d.Set("host_instance_type", out.HostInstanceType) - d.Set("publicly_accessible", out.PubliclyAccessible) - err = d.Set("maintenance_window_start_time", flattenMqWeeklyStartTime(out.MaintenanceWindowStartTime)) - if err != nil { - return err - } - d.Set("security_groups", aws.StringValueSlice(out.SecurityGroups)) - d.Set("subnet_ids", aws.StringValueSlice(out.SubnetIds)) - - if err := d.Set("logs", flattenMqLogs(out.Logs)); err != nil { - return fmt.Errorf("error setting logs: %s", err) - } - - err = d.Set("configuration", flattenMqConfigurationId(out.Configurations.Current)) - if err != nil { - return err - } - - rawUsers := make([]*mq.User, len(out.Users)) - for i, u := range out.Users { - uOut, err := conn.DescribeUser(&mq.DescribeUserInput{ - BrokerId: aws.String(d.Id()), - Username: u.Username, - }) - if err != nil { - return err - } - - rawUsers[i] = &mq.User{ - ConsoleAccess: uOut.ConsoleAccess, - Groups: uOut.Groups, - Username: uOut.Username, - } - } - - users := flattenMqUsers(rawUsers, d.Get("user").(*schema.Set).List()) - if err = d.Set("user", users); err != nil { - return err - } - - return getTagsMQ(conn, d, aws.StringValue(out.BrokerArn)) -} - -func resourceAwsMqBrokerUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mqconn - - if d.HasChange("configuration") || d.HasChange("logs") { - _, err := conn.UpdateBroker(&mq.UpdateBrokerRequest{ - BrokerId: aws.String(d.Id()), - Configuration: expandMqConfigurationId(d.Get("configuration").([]interface{})), - Logs: expandMqLogs(d.Get("logs").([]interface{})), - }) - if err != nil { - return err - } - } - - if d.HasChange("user") { - o, n := d.GetChange("user") - err := updateAwsMqBrokerUsers(conn, d.Id(), - o.(*schema.Set).List(), n.(*schema.Set).List()) - if err != nil { - return err - } - } - - if d.Get("apply_immediately").(bool) { - _, err := conn.RebootBroker(&mq.RebootBrokerInput{ - BrokerId: aws.String(d.Id()), - }) - if err != nil { - return err - } - - stateConf := resource.StateChangeConf{ - Pending: []string{ - mq.BrokerStateRunning, - mq.BrokerStateRebootInProgress, - }, - Target: []string{mq.BrokerStateRunning}, - Timeout: 30 * time.Minute, - Refresh: func() (interface{}, string, error) { - out, err := conn.DescribeBroker(&mq.DescribeBrokerInput{ - BrokerId: aws.String(d.Id()), - }) - if err != nil { - return 42, "", err - } - - return out, *out.BrokerState, nil - }, - } - _, err = stateConf.WaitForState() - if err != nil { - return err - } - } - - if tagErr := setTagsMQ(conn, d, d.Get("arn").(string)); tagErr != nil { - return fmt.Errorf("error setting mq broker tags: %s", tagErr) - } - - return nil -} - -func resourceAwsMqBrokerDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mqconn - - log.Printf("[INFO] Deleting MQ Broker: %s", d.Id()) - _, err := conn.DeleteBroker(&mq.DeleteBrokerInput{ - BrokerId: aws.String(d.Id()), - }) - if err != nil { - return err - } - - return waitForMqBrokerDeletion(conn, d.Id()) -} - -func resourceAwsMqUserHash(v interface{}) int { - var buf bytes.Buffer - - m := v.(map[string]interface{}) - if ca, ok := m["console_access"]; ok { - buf.WriteString(fmt.Sprintf("%t-", ca.(bool))) - } else { - buf.WriteString("false-") - } - if g, ok := m["groups"]; ok { - buf.WriteString(fmt.Sprintf("%v-", g.(*schema.Set).List())) - } - if p, ok := m["password"]; ok { - buf.WriteString(fmt.Sprintf("%s-", p.(string))) - } - buf.WriteString(fmt.Sprintf("%s-", m["username"].(string))) - - return hashcode.String(buf.String()) -} - -func waitForMqBrokerDeletion(conn *mq.MQ, id string) error { - stateConf := resource.StateChangeConf{ - Pending: []string{ - mq.BrokerStateRunning, - mq.BrokerStateRebootInProgress, - mq.BrokerStateDeletionInProgress, - }, - Target: []string{""}, - Timeout: 30 * time.Minute, - Refresh: func() (interface{}, string, error) { - out, err := conn.DescribeBroker(&mq.DescribeBrokerInput{ - BrokerId: aws.String(id), - }) - if err != nil { - if isAWSErr(err, "NotFoundException", "") { - return 42, "", nil - } - return 42, "", err - } - - return out, *out.BrokerState, nil - }, - } - _, err := stateConf.WaitForState() - return err -} - -func updateAwsMqBrokerUsers(conn *mq.MQ, bId string, oldUsers, newUsers []interface{}) error { - createL, deleteL, updateL, err := diffAwsMqBrokerUsers(bId, oldUsers, newUsers) - if err != nil { - return err - } - - for _, c := range createL { - _, err := conn.CreateUser(c) - if err != nil { - return err - } - } - for _, d := range deleteL { - _, err := conn.DeleteUser(d) - if err != nil { - return err - } - } - for _, u := range updateL { - _, err := conn.UpdateUser(u) - if err != nil { - return err - } - } - - return nil -} - -func diffAwsMqBrokerUsers(bId string, oldUsers, newUsers []interface{}) ( - cr []*mq.CreateUserRequest, di []*mq.DeleteUserInput, ur []*mq.UpdateUserRequest, e error) { - - existingUsers := make(map[string]interface{}) - for _, ou := range oldUsers { - u := ou.(map[string]interface{}) - username := u["username"].(string) - // Convert Set to slice to allow easier comparison - if g, ok := u["groups"]; ok { - groups := g.(*schema.Set).List() - u["groups"] = groups - } - - existingUsers[username] = u - } - - for _, nu := range newUsers { - // Still need access to the original map - // because Set contents doesn't get copied - // Likely related to https://github.com/mitchellh/copystructure/issues/17 - nuOriginal := nu.(map[string]interface{}) - - // Create a mutable copy - newUser, err := copystructure.Copy(nu) - if err != nil { - e = err - return - } - - newUserMap := newUser.(map[string]interface{}) - username := newUserMap["username"].(string) - - // Convert Set to slice to allow easier comparison - var ng []interface{} - if g, ok := nuOriginal["groups"]; ok { - ng = g.(*schema.Set).List() - newUserMap["groups"] = ng - } - - if eu, ok := existingUsers[username]; ok { - - existingUserMap := eu.(map[string]interface{}) - - if !reflect.DeepEqual(existingUserMap, newUserMap) { - ur = append(ur, &mq.UpdateUserRequest{ - BrokerId: aws.String(bId), - ConsoleAccess: aws.Bool(newUserMap["console_access"].(bool)), - Groups: expandStringList(ng), - Password: aws.String(newUserMap["password"].(string)), - Username: aws.String(username), - }) - } - - // Delete after processing, so we know what's left for deletion - delete(existingUsers, username) - } else { - cur := &mq.CreateUserRequest{ - BrokerId: aws.String(bId), - ConsoleAccess: aws.Bool(newUserMap["console_access"].(bool)), - Password: aws.String(newUserMap["password"].(string)), - Username: aws.String(username), - } - if len(ng) > 0 { - cur.Groups = expandStringList(ng) - } - cr = append(cr, cur) - } - } - - for username := range existingUsers { - di = append(di, &mq.DeleteUserInput{ - BrokerId: aws.String(bId), - Username: aws.String(username), - }) - } - - return -} - -func validateMqBrokerPassword(v interface{}, k string) (ws []string, errors []error) { - min := 12 - max := 250 - value := v.(string) - unique := make(map[string]bool) - - for _, v := range value { - if _, ok := unique[string(v)]; ok { - continue - } - if string(v) == "," { - errors = append(errors, fmt.Errorf("%q must not contain commas", k)) - } - unique[string(v)] = true - } - if len(unique) < 4 { - errors = append(errors, fmt.Errorf("%q must contain at least 4 unique characters", k)) - } - if len(value) < min || len(value) > max { - errors = append(errors, fmt.Errorf( - "%q must be %d to %d characters long. provided string length: %d", k, min, max, len(value))) - } - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_configuration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_configuration.go deleted file mode 100644 index 169faf0ff..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_configuration.go +++ /dev/null @@ -1,187 +0,0 @@ -package aws - -import ( - "encoding/base64" - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/mq" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsMqConfiguration() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsMqConfigurationCreate, - Read: resourceAwsMqConfigurationRead, - Update: resourceAwsMqConfigurationUpdate, - Delete: resourceAwsMqConfigurationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - CustomizeDiff: func(diff *schema.ResourceDiff, v interface{}) error { - if diff.HasChange("description") { - return diff.SetNewComputed("latest_revision") - } - if diff.HasChange("data") { - o, n := diff.GetChange("data") - os := o.(string) - ns := n.(string) - if !suppressXMLEquivalentConfig("data", os, ns, nil) { - return diff.SetNewComputed("latest_revision") - } - } - return nil - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "data": { - Type: schema.TypeString, - Required: true, - DiffSuppressFunc: suppressXMLEquivalentConfig, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "engine_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "engine_version": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "latest_revision": { - Type: schema.TypeInt, - Computed: true, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsMqConfigurationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mqconn - - input := mq.CreateConfigurationRequest{ - EngineType: aws.String(d.Get("engine_type").(string)), - EngineVersion: aws.String(d.Get("engine_version").(string)), - Name: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("tags"); ok { - input.Tags = tagsFromMapGeneric(v.(map[string]interface{})) - } - - log.Printf("[INFO] Creating MQ Configuration: %s", input) - out, err := conn.CreateConfiguration(&input) - if err != nil { - return err - } - - d.SetId(*out.Id) - d.Set("arn", out.Arn) - - return resourceAwsMqConfigurationUpdate(d, meta) -} - -func resourceAwsMqConfigurationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mqconn - - log.Printf("[INFO] Reading MQ Configuration %s", d.Id()) - out, err := conn.DescribeConfiguration(&mq.DescribeConfigurationInput{ - ConfigurationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, "NotFoundException", "") { - log.Printf("[WARN] MQ Configuration %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("arn", out.Arn) - d.Set("description", out.LatestRevision.Description) - d.Set("engine_type", out.EngineType) - d.Set("engine_version", out.EngineVersion) - d.Set("name", out.Name) - d.Set("latest_revision", out.LatestRevision.Revision) - - rOut, err := conn.DescribeConfigurationRevision(&mq.DescribeConfigurationRevisionInput{ - ConfigurationId: aws.String(d.Id()), - ConfigurationRevision: aws.String(fmt.Sprintf("%d", *out.LatestRevision.Revision)), - }) - if err != nil { - return err - } - - b, err := base64.StdEncoding.DecodeString(*rOut.Data) - if err != nil { - return err - } - - d.Set("data", string(b)) - - return getTagsMQ(conn, d, aws.StringValue(out.Arn)) -} - -func resourceAwsMqConfigurationUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).mqconn - - rawData := d.Get("data").(string) - data := base64.StdEncoding.EncodeToString([]byte(rawData)) - - input := mq.UpdateConfigurationRequest{ - ConfigurationId: aws.String(d.Id()), - Data: aws.String(data), - } - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - log.Printf("[INFO] Updating MQ Configuration %s: %s", d.Id(), input) - _, err := conn.UpdateConfiguration(&input) - if err != nil { - return err - } - - if tagErr := setTagsMQ(conn, d, d.Get("arn").(string)); tagErr != nil { - return fmt.Errorf("error setting mq configuration tags: %s", err) - } - - return resourceAwsMqConfigurationRead(d, meta) -} - -func resourceAwsMqConfigurationDelete(d *schema.ResourceData, meta interface{}) error { - // TODO: Delete is not available in the API - - return nil -} - -func suppressXMLEquivalentConfig(k, old, new string, d *schema.ResourceData) bool { - os, err := canonicalXML(old) - if err != nil { - log.Printf("[ERR] Error getting cannonicalXML from state (%s): %s", k, err) - return false - } - ns, err := canonicalXML(new) - if err != nil { - log.Printf("[ERR] Error getting cannonicalXML from config (%s): %s", k, err) - return false - } - - return os == ns -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_nat_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_nat_gateway.go deleted file mode 100644 index d227ca2f9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_nat_gateway.go +++ /dev/null @@ -1,213 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsNatGateway() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsNatGatewayCreate, - Read: resourceAwsNatGatewayRead, - Update: resourceAwsNatGatewayUpdate, - Delete: resourceAwsNatGatewayDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "allocation_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "subnet_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "network_interface_id": { - Type: schema.TypeString, - Computed: true, - }, - - "private_ip": { - Type: schema.TypeString, - Computed: true, - }, - - "public_ip": { - Type: schema.TypeString, - Computed: true, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsNatGatewayCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Create the NAT Gateway - createOpts := &ec2.CreateNatGatewayInput{ - AllocationId: aws.String(d.Get("allocation_id").(string)), - SubnetId: aws.String(d.Get("subnet_id").(string)), - } - - log.Printf("[DEBUG] Create NAT Gateway: %s", *createOpts) - natResp, err := conn.CreateNatGateway(createOpts) - if err != nil { - return fmt.Errorf("Error creating NAT Gateway: %s", err) - } - - // Get the ID and store it - ng := natResp.NatGateway - d.SetId(*ng.NatGatewayId) - log.Printf("[INFO] NAT Gateway ID: %s", d.Id()) - - // Wait for the NAT Gateway to become available - log.Printf("[DEBUG] Waiting for NAT Gateway (%s) to become available", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"available"}, - Refresh: NGStateRefreshFunc(conn, d.Id()), - Timeout: 10 * time.Minute, - } - - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for NAT Gateway (%s) to become available: %s", d.Id(), err) - } - - // Update our attributes and return - return resourceAwsNatGatewayUpdate(d, meta) -} - -func resourceAwsNatGatewayRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Refresh the NAT Gateway state - ngRaw, state, err := NGStateRefreshFunc(conn, d.Id())() - if err != nil { - return err - } - - status := map[string]bool{ - "deleted": true, - "deleting": true, - "failed": true, - } - - if _, ok := status[strings.ToLower(state)]; ngRaw == nil || ok { - log.Printf("[INFO] Removing %s from Terraform state as it is not found or in the deleted state.", d.Id()) - d.SetId("") - return nil - } - - // Set NAT Gateway attributes - ng := ngRaw.(*ec2.NatGateway) - d.Set("subnet_id", ng.SubnetId) - - // Address - address := ng.NatGatewayAddresses[0] - d.Set("allocation_id", address.AllocationId) - d.Set("network_interface_id", address.NetworkInterfaceId) - d.Set("private_ip", address.PrivateIp) - d.Set("public_ip", address.PublicIp) - - // Tags - d.Set("tags", tagsToMap(ng.Tags)) - - return nil -} - -func resourceAwsNatGatewayUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Turn on partial mode - d.Partial(true) - - if err := setTags(conn, d); err != nil { - return err - } - d.SetPartial("tags") - - d.Partial(false) - return resourceAwsNatGatewayRead(d, meta) -} - -func resourceAwsNatGatewayDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - deleteOpts := &ec2.DeleteNatGatewayInput{ - NatGatewayId: aws.String(d.Id()), - } - log.Printf("[INFO] Deleting NAT Gateway: %s", d.Id()) - - _, err := conn.DeleteNatGateway(deleteOpts) - if err != nil { - ec2err, ok := err.(awserr.Error) - if !ok { - return err - } - - if ec2err.Code() == "NatGatewayNotFound" { - return nil - } - - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"deleting"}, - Target: []string{"deleted"}, - Refresh: NGStateRefreshFunc(conn, d.Id()), - Timeout: 30 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 10 * time.Second, - } - - _, stateErr := stateConf.WaitForState() - if stateErr != nil { - return fmt.Errorf("Error waiting for NAT Gateway (%s) to delete: %s", d.Id(), err) - } - - return nil -} - -// NGStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// a NAT Gateway. -func NGStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - opts := &ec2.DescribeNatGatewaysInput{ - NatGatewayIds: []*string{aws.String(id)}, - } - resp, err := conn.DescribeNatGateways(opts) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "NatGatewayNotFound" { - resp = nil - } else { - log.Printf("Error on NGStateRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - ng := resp.NatGateways[0] - return ng, *ng.State, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go deleted file mode 100644 index 792bf867f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go +++ /dev/null @@ -1,736 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/neptune" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsNeptuneCluster() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsNeptuneClusterCreate, - Read: resourceAwsNeptuneClusterRead, - Update: resourceAwsNeptuneClusterUpdate, - Delete: resourceAwsNeptuneClusterDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(120 * time.Minute), - Update: schema.DefaultTimeout(120 * time.Minute), - Delete: schema.DefaultTimeout(120 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - - // apply_immediately is used to determine when the update modifications - // take place. - "apply_immediately": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "availability_zones": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - ForceNew: true, - Computed: true, - Set: schema.HashString, - }, - - "backup_retention_period": { - Type: schema.TypeInt, - Optional: true, - Default: 1, - ValidateFunc: validation.IntAtMost(35), - }, - - "cluster_identifier": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"cluster_identifier_prefix"}, - ValidateFunc: validateNeptuneIdentifier, - }, - - "cluster_identifier_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateNeptuneIdentifierPrefix, - }, - - "cluster_members": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - Set: schema.HashString, - }, - - "cluster_resource_id": { - Type: schema.TypeString, - Computed: true, - }, - - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "engine": { - Type: schema.TypeString, - Optional: true, - Default: "neptune", - ForceNew: true, - ValidateFunc: validateNeptuneEngine(), - }, - - "engine_version": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "final_snapshot_identifier": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - es = append(es, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - es = append(es, fmt.Errorf("%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - es = append(es, fmt.Errorf("%q cannot end in a hyphen", k)) - } - return - }, - }, - - "hosted_zone_id": { - Type: schema.TypeString, - Computed: true, - }, - - "iam_roles": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "iam_database_authentication_enabled": { - Type: schema.TypeBool, - Optional: true, - }, - - "kms_key_arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - - "neptune_subnet_group_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "neptune_cluster_parameter_group_name": { - Type: schema.TypeString, - Optional: true, - Default: "default.neptune1", - }, - - "port": { - Type: schema.TypeInt, - Optional: true, - Default: 8182, - ForceNew: true, - }, - - "preferred_backup_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateOnceADayWindowFormat, - }, - - "preferred_maintenance_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - StateFunc: func(val interface{}) string { - if val == nil { - return "" - } - return strings.ToLower(val.(string)) - }, - ValidateFunc: validateOnceAWeekWindowFormat, - }, - - "reader_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "replication_source_identifier": { - Type: schema.TypeString, - Optional: true, - }, - - "storage_encrypted": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - - "skip_final_snapshot": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "snapshot_identifier": { - Type: schema.TypeString, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "tags": tagsSchema(), - - "vpc_security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - } -} - -func resourceAwsNeptuneClusterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - tags := tagsFromMapNeptune(d.Get("tags").(map[string]interface{})) - - // Check if any of the parameters that require a cluster modification after creation are set - clusterUpdate := false - restoreDBClusterFromSnapshot := false - if _, ok := d.GetOk("snapshot_identifier"); ok { - restoreDBClusterFromSnapshot = true - } - - if v, ok := d.GetOk("cluster_identifier"); ok { - d.Set("cluster_identifier", v.(string)) - } else { - if v, ok := d.GetOk("cluster_identifier_prefix"); ok { - d.Set("cluster_identifier", resource.PrefixedUniqueId(v.(string))) - } else { - d.Set("cluster_identifier", resource.PrefixedUniqueId("tf-")) - } - } - - createDbClusterInput := &neptune.CreateDBClusterInput{ - DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), - Engine: aws.String(d.Get("engine").(string)), - Port: aws.Int64(int64(d.Get("port").(int))), - StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), - Tags: tags, - } - restoreDBClusterFromSnapshotInput := &neptune.RestoreDBClusterFromSnapshotInput{ - DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), - Engine: aws.String(d.Get("engine").(string)), - Port: aws.Int64(int64(d.Get("port").(int))), - SnapshotIdentifier: aws.String(d.Get("snapshot_identifier").(string)), - Tags: tags, - } - - if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { - createDbClusterInput.AvailabilityZones = expandStringList(attr.List()) - restoreDBClusterFromSnapshotInput.AvailabilityZones = expandStringList(attr.List()) - } - - if attr, ok := d.GetOk("backup_retention_period"); ok { - createDbClusterInput.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) - if restoreDBClusterFromSnapshot { - clusterUpdate = true - } - } - - if attr, ok := d.GetOk("engine_version"); ok { - createDbClusterInput.EngineVersion = aws.String(attr.(string)) - restoreDBClusterFromSnapshotInput.EngineVersion = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("iam_database_authentication_enabled"); ok { - createDbClusterInput.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) - restoreDBClusterFromSnapshotInput.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) - } - - if attr, ok := d.GetOk("kms_key_arn"); ok { - createDbClusterInput.KmsKeyId = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("neptune_cluster_parameter_group_name"); ok { - createDbClusterInput.DBClusterParameterGroupName = aws.String(attr.(string)) - if restoreDBClusterFromSnapshot { - clusterUpdate = true - } - } - - if attr, ok := d.GetOk("neptune_subnet_group_name"); ok { - createDbClusterInput.DBSubnetGroupName = aws.String(attr.(string)) - restoreDBClusterFromSnapshotInput.DBSubnetGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("preferred_backup_window"); ok { - createDbClusterInput.PreferredBackupWindow = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("preferred_maintenance_window"); ok { - createDbClusterInput.PreferredMaintenanceWindow = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("replication_source_identifier"); ok { - createDbClusterInput.ReplicationSourceIdentifier = aws.String(attr.(string)) - } - - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - createDbClusterInput.VpcSecurityGroupIds = expandStringList(attr.List()) - if restoreDBClusterFromSnapshot { - clusterUpdate = true - } - restoreDBClusterFromSnapshotInput.VpcSecurityGroupIds = expandStringList(attr.List()) - } - - if restoreDBClusterFromSnapshot { - log.Printf("[DEBUG] Neptune Cluster restore from snapshot configuration: %s", restoreDBClusterFromSnapshotInput) - } else { - log.Printf("[DEBUG] Neptune Cluster create options: %s", createDbClusterInput) - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - if restoreDBClusterFromSnapshot { - _, err = conn.RestoreDBClusterFromSnapshot(restoreDBClusterFromSnapshotInput) - } else { - _, err = conn.CreateDBCluster(createDbClusterInput) - } - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error creating Neptune Cluster: %s", err) - } - - d.SetId(d.Get("cluster_identifier").(string)) - - log.Printf("[INFO] Neptune Cluster ID: %s", d.Id()) - log.Println("[INFO] Waiting for Neptune Cluster to be available") - - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsNeptuneClusterCreatePendingStates, - Target: []string{"available"}, - Refresh: resourceAwsNeptuneClusterStateRefreshFunc(d, meta), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for Neptune Cluster state to be \"available\": %s", err) - } - - if v, ok := d.GetOk("iam_roles"); ok { - for _, role := range v.(*schema.Set).List() { - err := setIamRoleToNeptuneCluster(d.Id(), role.(string), conn) - if err != nil { - return err - } - } - } - - if clusterUpdate { - return resourceAwsNeptuneClusterUpdate(d, meta) - } - - return resourceAwsNeptuneClusterRead(d, meta) - -} - -func resourceAwsNeptuneClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - resp, err := conn.DescribeDBClusters(&neptune.DescribeDBClustersInput{ - DBClusterIdentifier: aws.String(d.Id()), - }) - - if err != nil { - if isAWSErr(err, neptune.ErrCodeDBClusterNotFoundFault, "") { - d.SetId("") - log.Printf("[DEBUG] Neptune Cluster (%s) not found", d.Id()) - return nil - } - log.Printf("[DEBUG] Error describing Neptune Cluster (%s) when waiting: %s", d.Id(), err) - return err - } - - var dbc *neptune.DBCluster - for _, v := range resp.DBClusters { - if aws.StringValue(v.DBClusterIdentifier) == d.Id() { - dbc = v - } - } - - if dbc == nil { - log.Printf("[WARN] Neptune Cluster (%s) not found", d.Id()) - d.SetId("") - return nil - } - - return flattenAwsNeptuneClusterResource(d, meta, dbc) -} - -func flattenAwsNeptuneClusterResource(d *schema.ResourceData, meta interface{}, dbc *neptune.DBCluster) error { - conn := meta.(*AWSClient).neptuneconn - - if err := d.Set("availability_zones", aws.StringValueSlice(dbc.AvailabilityZones)); err != nil { - return fmt.Errorf("Error saving AvailabilityZones to state for Neptune Cluster (%s): %s", d.Id(), err) - } - - d.Set("backup_retention_period", dbc.BackupRetentionPeriod) - d.Set("cluster_identifier", dbc.DBClusterIdentifier) - d.Set("cluster_resource_id", dbc.DbClusterResourceId) - d.Set("endpoint", dbc.Endpoint) - d.Set("engine_version", dbc.EngineVersion) - d.Set("engine", dbc.Engine) - d.Set("hosted_zone_id", dbc.HostedZoneId) - d.Set("iam_database_authentication_enabled", dbc.IAMDatabaseAuthenticationEnabled) - d.Set("kms_key_arn", dbc.KmsKeyId) - d.Set("neptune_cluster_parameter_group_name", dbc.DBClusterParameterGroup) - d.Set("neptune_subnet_group_name", dbc.DBSubnetGroup) - d.Set("port", dbc.Port) - d.Set("preferred_backup_window", dbc.PreferredBackupWindow) - d.Set("preferred_maintenance_window", dbc.PreferredMaintenanceWindow) - d.Set("reader_endpoint", dbc.ReaderEndpoint) - d.Set("replication_source_identifier", dbc.ReplicationSourceIdentifier) - d.Set("storage_encrypted", dbc.StorageEncrypted) - - var sg []string - for _, g := range dbc.VpcSecurityGroups { - sg = append(sg, aws.StringValue(g.VpcSecurityGroupId)) - } - if err := d.Set("vpc_security_group_ids", sg); err != nil { - return fmt.Errorf("Error saving VPC Security Group IDs to state for Neptune Cluster (%s): %s", d.Id(), err) - } - - var cm []string - for _, m := range dbc.DBClusterMembers { - cm = append(cm, aws.StringValue(m.DBInstanceIdentifier)) - } - if err := d.Set("cluster_members", cm); err != nil { - return fmt.Errorf("Error saving Neptune Cluster Members to state for Neptune Cluster (%s): %s", d.Id(), err) - } - - var roles []string - for _, r := range dbc.AssociatedRoles { - roles = append(roles, aws.StringValue(r.RoleArn)) - } - - if err := d.Set("iam_roles", roles); err != nil { - return fmt.Errorf("Error saving IAM Roles to state for Neptune Cluster (%s): %s", d.Id(), err) - } - - arn := aws.StringValue(dbc.DBClusterArn) - d.Set("arn", arn) - - if err := saveTagsNeptune(conn, d, arn); err != nil { - return fmt.Errorf("Failed to save tags for Neptune Cluster (%s): %s", aws.StringValue(dbc.DBClusterIdentifier), err) - } - - return nil -} - -func resourceAwsNeptuneClusterUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - requestUpdate := false - - req := &neptune.ModifyDBClusterInput{ - ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), - DBClusterIdentifier: aws.String(d.Id()), - } - - if d.HasChange("vpc_security_group_ids") { - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - req.VpcSecurityGroupIds = expandStringList(attr.List()) - } else { - req.VpcSecurityGroupIds = []*string{} - } - requestUpdate = true - } - - if d.HasChange("preferred_backup_window") { - req.PreferredBackupWindow = aws.String(d.Get("preferred_backup_window").(string)) - requestUpdate = true - } - - if d.HasChange("preferred_maintenance_window") { - req.PreferredMaintenanceWindow = aws.String(d.Get("preferred_maintenance_window").(string)) - requestUpdate = true - } - - if d.HasChange("backup_retention_period") { - req.BackupRetentionPeriod = aws.Int64(int64(d.Get("backup_retention_period").(int))) - requestUpdate = true - } - - if d.HasChange("neptune_cluster_parameter_group_name") { - d.SetPartial("neptune_cluster_parameter_group_name") - req.DBClusterParameterGroupName = aws.String(d.Get("neptune_cluster_parameter_group_name").(string)) - requestUpdate = true - } - - if d.HasChange("iam_database_authentication_enabled") { - req.EnableIAMDatabaseAuthentication = aws.Bool(d.Get("iam_database_authentication_enabled").(bool)) - requestUpdate = true - } - - if requestUpdate { - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.ModifyDBCluster(req) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - if isAWSErr(err, neptune.ErrCodeInvalidDBClusterStateFault, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Failed to modify Neptune Cluster (%s): %s", d.Id(), err) - } - - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsNeptuneClusterUpdatePendingStates, - Target: []string{"available"}, - Refresh: resourceAwsNeptuneClusterStateRefreshFunc(d, meta), - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 10 * time.Second, - Delay: 10 * time.Second, - } - - log.Printf("[INFO] Waiting for Neptune Cluster (%s) to modify", d.Id()) - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for Neptune Cluster (%s) to modify: %s", d.Id(), err) - } - } - - if d.HasChange("iam_roles") { - oraw, nraw := d.GetChange("iam_roles") - if oraw == nil { - oraw = new(schema.Set) - } - if nraw == nil { - nraw = new(schema.Set) - } - - os := oraw.(*schema.Set) - ns := nraw.(*schema.Set) - removeRoles := os.Difference(ns) - enableRoles := ns.Difference(os) - - for _, role := range enableRoles.List() { - err := setIamRoleToNeptuneCluster(d.Id(), role.(string), conn) - if err != nil { - return err - } - } - - for _, role := range removeRoles.List() { - err := removeIamRoleFromNeptuneCluster(d.Id(), role.(string), conn) - if err != nil { - return err - } - } - } - - if arn, ok := d.GetOk("arn"); ok { - if err := setTagsNeptune(conn, d, arn.(string)); err != nil { - return err - } else { - d.SetPartial("tags") - } - } - - return resourceAwsNeptuneClusterRead(d, meta) -} - -func resourceAwsNeptuneClusterDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - log.Printf("[DEBUG] Destroying Neptune Cluster (%s)", d.Id()) - - deleteOpts := neptune.DeleteDBClusterInput{ - DBClusterIdentifier: aws.String(d.Id()), - } - - skipFinalSnapshot := d.Get("skip_final_snapshot").(bool) - deleteOpts.SkipFinalSnapshot = aws.Bool(skipFinalSnapshot) - - if !skipFinalSnapshot { - if name, present := d.GetOk("final_snapshot_identifier"); present { - deleteOpts.FinalDBSnapshotIdentifier = aws.String(name.(string)) - } else { - return fmt.Errorf("Neptune Cluster FinalSnapshotIdentifier is required when a final snapshot is required") - } - } - - log.Printf("[DEBUG] Neptune Cluster delete options: %s", deleteOpts) - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteDBCluster(&deleteOpts) - if err != nil { - if isAWSErr(err, neptune.ErrCodeInvalidDBClusterStateFault, "is not currently in the available state") { - return resource.RetryableError(err) - } - if isAWSErr(err, neptune.ErrCodeDBClusterNotFoundFault, "") { - return nil - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Neptune Cluster cannot be deleted: %s", err) - } - - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsNeptuneClusterDeletePendingStates, - Target: []string{"destroyed"}, - Refresh: resourceAwsNeptuneClusterStateRefreshFunc(d, meta), - Timeout: d.Timeout(schema.TimeoutDelete), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error deleting Neptune Cluster (%s): %s", d.Id(), err) - } - - return nil -} - -func resourceAwsNeptuneClusterStateRefreshFunc( - d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - conn := meta.(*AWSClient).neptuneconn - - resp, err := conn.DescribeDBClusters(&neptune.DescribeDBClustersInput{ - DBClusterIdentifier: aws.String(d.Id()), - }) - - if err != nil { - if isAWSErr(err, neptune.ErrCodeDBClusterNotFoundFault, "") { - log.Printf("[DEBUG] Neptune Cluster (%s) not found", d.Id()) - return 42, "destroyed", nil - } - log.Printf("[DEBUG] Error on retrieving Neptune Cluster (%s) when waiting: %s", d.Id(), err) - return nil, "", err - } - - var dbc *neptune.DBCluster - - for _, v := range resp.DBClusters { - if aws.StringValue(v.DBClusterIdentifier) == d.Id() { - dbc = v - } - } - - if dbc == nil { - return 42, "destroyed", nil - } - - if dbc.Status != nil { - log.Printf("[DEBUG] Neptune Cluster status (%s): %s", d.Id(), aws.StringValue(dbc.Status)) - } - - return dbc, aws.StringValue(dbc.Status), nil - } -} - -func setIamRoleToNeptuneCluster(clusterIdentifier string, roleArn string, conn *neptune.Neptune) error { - params := &neptune.AddRoleToDBClusterInput{ - DBClusterIdentifier: aws.String(clusterIdentifier), - RoleArn: aws.String(roleArn), - } - _, err := conn.AddRoleToDBCluster(params) - return err -} - -func removeIamRoleFromNeptuneCluster(clusterIdentifier string, roleArn string, conn *neptune.Neptune) error { - params := &neptune.RemoveRoleFromDBClusterInput{ - DBClusterIdentifier: aws.String(clusterIdentifier), - RoleArn: aws.String(roleArn), - } - _, err := conn.RemoveRoleFromDBCluster(params) - return err -} - -var resourceAwsNeptuneClusterCreatePendingStates = []string{ - "creating", - "backing-up", - "modifying", - "preparing-data-migration", - "migrating", -} - -var resourceAwsNeptuneClusterUpdatePendingStates = []string{ - "backing-up", - "modifying", - "configuring-iam-database-auth", -} - -var resourceAwsNeptuneClusterDeletePendingStates = []string{ - "available", - "deleting", - "backing-up", - "modifying", -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_instance.go deleted file mode 100644 index 6a4458303..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_instance.go +++ /dev/null @@ -1,526 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/neptune" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsNeptuneClusterInstance() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsNeptuneClusterInstanceCreate, - Read: resourceAwsNeptuneClusterInstanceRead, - Update: resourceAwsNeptuneClusterInstanceUpdate, - Delete: resourceAwsNeptuneClusterInstanceDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(90 * time.Minute), - Update: schema.DefaultTimeout(90 * time.Minute), - Delete: schema.DefaultTimeout(90 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "address": { - Type: schema.TypeString, - Computed: true, - }, - - "apply_immediately": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "auto_minor_version_upgrade": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "availability_zone": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "cluster_identifier": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "dbi_resource_id": { - Type: schema.TypeString, - Computed: true, - }, - - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "engine": { - Type: schema.TypeString, - Optional: true, - Default: "neptune", - ForceNew: true, - ValidateFunc: validateNeptuneEngine(), - }, - - "engine_version": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "identifier": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"identifier_prefix"}, - ValidateFunc: validateNeptuneIdentifier, - }, - - "identifier_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"identifier"}, - ValidateFunc: validateNeptuneIdentifierPrefix, - }, - - "instance_class": { - Type: schema.TypeString, - Required: true, - }, - - "kms_key_arn": { - Type: schema.TypeString, - Computed: true, - }, - - "neptune_parameter_group_name": { - Type: schema.TypeString, - Optional: true, - Default: "default.neptune1", - }, - - "neptune_subnet_group_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "port": { - Type: schema.TypeInt, - Optional: true, - Default: 8182, - ForceNew: true, - }, - - "preferred_backup_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateOnceADayWindowFormat, - }, - - "preferred_maintenance_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - StateFunc: func(val interface{}) string { - if val == nil { - return "" - } - return strings.ToLower(val.(string)) - }, - ValidateFunc: validateOnceAWeekWindowFormat, - }, - - "promotion_tier": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - - "publicly_accessible": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - - "storage_encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - - "tags": tagsSchema(), - - "writer": { - Type: schema.TypeBool, - Computed: true, - }, - }, - } -} - -func resourceAwsNeptuneClusterInstanceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - tags := tagsFromMapNeptune(d.Get("tags").(map[string]interface{})) - - createOpts := &neptune.CreateDBInstanceInput{ - DBInstanceClass: aws.String(d.Get("instance_class").(string)), - DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), - Engine: aws.String(d.Get("engine").(string)), - 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, - } - - if attr, ok := d.GetOk("availability_zone"); ok { - createOpts.AvailabilityZone = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("neptune_parameter_group_name"); ok { - createOpts.DBParameterGroupName = aws.String(attr.(string)) - } - - if v, ok := d.GetOk("identifier"); ok { - createOpts.DBInstanceIdentifier = aws.String(v.(string)) - } else { - if v, ok := d.GetOk("identifier_prefix"); ok { - createOpts.DBInstanceIdentifier = aws.String(resource.PrefixedUniqueId(v.(string))) - } else { - createOpts.DBInstanceIdentifier = aws.String(resource.PrefixedUniqueId("tf-")) - } - } - - if attr, ok := d.GetOk("neptune_subnet_group_name"); ok { - createOpts.DBSubnetGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("engine_version"); ok { - createOpts.EngineVersion = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("preferred_backup_window"); ok { - createOpts.PreferredBackupWindow = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("preferred_maintenance_window"); ok { - createOpts.PreferredMaintenanceWindow = aws.String(attr.(string)) - } - - log.Printf("[DEBUG] Creating Neptune Instance: %s", createOpts) - - var resp *neptune.CreateDBInstanceOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - resp, err = conn.CreateDBInstance(createOpts) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error creating Neptune Instance: %s", err) - } - - d.SetId(aws.StringValue(resp.DBInstance.DBInstanceIdentifier)) - - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsNeptuneClusterInstanceCreateUpdatePendingStates, - Target: []string{"available"}, - Refresh: resourceAwsNeptuneInstanceStateRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsNeptuneClusterInstanceRead(d, meta) -} - -func resourceAwsNeptuneClusterInstanceRead(d *schema.ResourceData, meta interface{}) error { - db, err := resourceAwsNeptuneInstanceRetrieve(d.Id(), meta.(*AWSClient).neptuneconn) - if err != nil { - return fmt.Errorf("Error on retrieving Neptune Cluster Instance (%s): %s", d.Id(), err) - } - - if db == nil { - log.Printf("[WARN] Neptune Cluster Instance (%s): not found, removing from state.", d.Id()) - d.SetId("") - return nil - } - - if db.DBClusterIdentifier == nil { - return fmt.Errorf("Cluster identifier is missing from instance (%s)", d.Id()) - } - - conn := meta.(*AWSClient).neptuneconn - resp, err := conn.DescribeDBClusters(&neptune.DescribeDBClustersInput{ - DBClusterIdentifier: db.DBClusterIdentifier, - }) - - var dbc *neptune.DBCluster - for _, c := range resp.DBClusters { - if aws.StringValue(c.DBClusterIdentifier) == aws.StringValue(db.DBClusterIdentifier) { - dbc = c - } - } - if dbc == nil { - return fmt.Errorf("Error finding Neptune Cluster (%s) for Cluster Instance (%s): %s", - aws.StringValue(db.DBClusterIdentifier), aws.StringValue(db.DBInstanceIdentifier), err) - } - for _, m := range dbc.DBClusterMembers { - if aws.StringValue(db.DBInstanceIdentifier) == aws.StringValue(m.DBInstanceIdentifier) { - if aws.BoolValue(m.IsClusterWriter) { - d.Set("writer", true) - } else { - d.Set("writer", false) - } - } - } - - if db.Endpoint != nil { - address := aws.StringValue(db.Endpoint.Address) - port := int(aws.Int64Value(db.Endpoint.Port)) - d.Set("address", address) - d.Set("endpoint", fmt.Sprintf("%s:%d", address, port)) - d.Set("port", port) - } - - if db.DBSubnetGroup != nil { - d.Set("neptune_subnet_group_name", db.DBSubnetGroup.DBSubnetGroupName) - } - - d.Set("arn", db.DBInstanceArn) - d.Set("auto_minor_version_upgrade", db.AutoMinorVersionUpgrade) - d.Set("availability_zone", db.AvailabilityZone) - d.Set("cluster_identifier", db.DBClusterIdentifier) - d.Set("dbi_resource_id", db.DbiResourceId) - d.Set("engine_version", db.EngineVersion) - d.Set("engine", db.Engine) - d.Set("identifier", db.DBInstanceIdentifier) - d.Set("instance_class", db.DBInstanceClass) - d.Set("kms_key_arn", db.KmsKeyId) - d.Set("preferred_backup_window", db.PreferredBackupWindow) - d.Set("preferred_maintenance_window", db.PreferredMaintenanceWindow) - d.Set("promotion_tier", db.PromotionTier) - d.Set("publicly_accessible", db.PubliclyAccessible) - d.Set("storage_encrypted", db.StorageEncrypted) - - if len(db.DBParameterGroups) > 0 { - d.Set("neptune_parameter_group_name", db.DBParameterGroups[0].DBParameterGroupName) - } - - if err := saveTagsNeptune(conn, d, aws.StringValue(db.DBInstanceArn)); err != nil { - return fmt.Errorf("Failed to save tags for Neptune Cluster Instance (%s): %s", aws.StringValue(db.DBInstanceIdentifier), err) - } - - return nil -} - -func resourceAwsNeptuneClusterInstanceUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - requestUpdate := false - - req := &neptune.ModifyDBInstanceInput{ - ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), - DBInstanceIdentifier: aws.String(d.Id()), - } - - if d.HasChange("neptune_parameter_group_name") { - req.DBParameterGroupName = aws.String(d.Get("neptune_parameter_group_name").(string)) - requestUpdate = true - } - - if d.HasChange("instance_class") { - req.DBInstanceClass = aws.String(d.Get("instance_class").(string)) - requestUpdate = true - } - - if d.HasChange("preferred_backup_window") { - d.SetPartial("preferred_backup_window") - req.PreferredBackupWindow = aws.String(d.Get("preferred_backup_window").(string)) - requestUpdate = true - } - - if d.HasChange("preferred_maintenance_window") { - d.SetPartial("preferred_maintenance_window") - req.PreferredMaintenanceWindow = aws.String(d.Get("preferred_maintenance_window").(string)) - requestUpdate = true - } - - if d.HasChange("auto_minor_version_upgrade") { - d.SetPartial("auto_minor_version_upgrade") - req.AutoMinorVersionUpgrade = aws.Bool(d.Get("auto_minor_version_upgrade").(bool)) - requestUpdate = true - } - - if d.HasChange("promotion_tier") { - d.SetPartial("promotion_tier") - req.PromotionTier = aws.Int64(int64(d.Get("promotion_tier").(int))) - requestUpdate = true - } - - log.Printf("[DEBUG] Send Neptune Instance Modification request: %#v", requestUpdate) - if requestUpdate { - log.Printf("[DEBUG] Neptune Instance Modification request: %#v", req) - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.ModifyDBInstance(req) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error modifying Neptune Instance %s: %s", d.Id(), err) - } - - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsNeptuneClusterInstanceCreateUpdatePendingStates, - Target: []string{"available"}, - Refresh: resourceAwsNeptuneInstanceStateRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - } - - if err := setTagsNeptune(conn, d, d.Get("arn").(string)); err != nil { - return err - } - - return resourceAwsNeptuneClusterInstanceRead(d, meta) -} - -func resourceAwsNeptuneClusterInstanceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - log.Printf("[DEBUG] Neptune Cluster Instance destroy: %v", d.Id()) - - opts := neptune.DeleteDBInstanceInput{DBInstanceIdentifier: aws.String(d.Id())} - - log.Printf("[DEBUG] Neptune Cluster Instance destroy configuration: %s", opts) - if _, err := conn.DeleteDBInstance(&opts); err != nil { - if isAWSErr(err, neptune.ErrCodeDBInstanceNotFoundFault, "") { - return nil - } - return fmt.Errorf("error deleting Neptune cluster instance %q: %s", d.Id(), err) - } - - log.Println("[INFO] Waiting for Neptune Cluster Instance to be destroyed") - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsNeptuneClusterInstanceDeletePendingStates, - Target: []string{}, - Refresh: resourceAwsNeptuneInstanceStateRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutDelete), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - _, err := stateConf.WaitForState() - return err - -} - -var resourceAwsNeptuneClusterInstanceCreateUpdatePendingStates = []string{ - "backing-up", - "creating", - "maintenance", - "modifying", - "rebooting", - "renaming", - "starting", - "upgrading", -} - -var resourceAwsNeptuneClusterInstanceDeletePendingStates = []string{ - "modifying", - "deleting", -} - -func resourceAwsNeptuneInstanceStateRefreshFunc(id string, conn *neptune.Neptune) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - v, err := resourceAwsNeptuneInstanceRetrieve(id, conn) - - if err != nil { - log.Printf("Error on retrieving Neptune Instance when waiting: %s", err) - return nil, "", err - } - - if v == nil { - return nil, "", nil - } - - if v.DBInstanceStatus != nil { - log.Printf("[DEBUG] Neptune Instance status for instance %s: %s", id, aws.StringValue(v.DBInstanceStatus)) - } - - return v, aws.StringValue(v.DBInstanceStatus), nil - } -} - -func resourceAwsNeptuneInstanceRetrieve(id string, conn *neptune.Neptune) (*neptune.DBInstance, error) { - opts := neptune.DescribeDBInstancesInput{ - DBInstanceIdentifier: aws.String(id), - } - - log.Printf("[DEBUG] Neptune Instance describe configuration: %#v", opts) - - resp, err := conn.DescribeDBInstances(&opts) - if err != nil { - if isAWSErr(err, neptune.ErrCodeDBInstanceNotFoundFault, "") { - return nil, nil - } - return nil, fmt.Errorf("Error retrieving Neptune Instances: %s", err) - } - - if len(resp.DBInstances) != 1 || - aws.StringValue(resp.DBInstances[0].DBInstanceIdentifier) != id { - return nil, nil - } - - return resp.DBInstances[0], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_parameter_group.go deleted file mode 100644 index 3f31f345a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_parameter_group.go +++ /dev/null @@ -1,260 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/neptune" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -const neptuneClusterParameterGroupMaxParamsBulkEdit = 20 - -func resourceAwsNeptuneClusterParameterGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsNeptuneClusterParameterGroupCreate, - Read: resourceAwsNeptuneClusterParameterGroupRead, - Update: resourceAwsNeptuneClusterParameterGroupUpdate, - Delete: resourceAwsNeptuneClusterParameterGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateNeptuneParamGroupName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateNeptuneParamGroupNamePrefix, - }, - "family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "Managed by Terraform", - }, - "parameter": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - "apply_method": { - Type: schema.TypeString, - Optional: true, - Default: neptune.ApplyMethodPendingReboot, - ValidateFunc: validation.StringInSlice([]string{ - neptune.ApplyMethodImmediate, - neptune.ApplyMethodPendingReboot, - }, false), - }, - }, - }, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsNeptuneClusterParameterGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - tags := tagsFromMapNeptune(d.Get("tags").(map[string]interface{})) - - var groupName string - if v, ok := d.GetOk("name"); ok { - groupName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - groupName = resource.PrefixedUniqueId(v.(string)) - } else { - groupName = resource.UniqueId() - } - - createOpts := neptune.CreateDBClusterParameterGroupInput{ - DBClusterParameterGroupName: aws.String(groupName), - DBParameterGroupFamily: aws.String(d.Get("family").(string)), - Description: aws.String(d.Get("description").(string)), - Tags: tags, - } - - log.Printf("[DEBUG] Create Neptune Cluster Parameter Group: %#v", createOpts) - resp, err := conn.CreateDBClusterParameterGroup(&createOpts) - if err != nil { - return fmt.Errorf("Error creating Neptune Cluster Parameter Group: %s", err) - } - - d.SetId(aws.StringValue(createOpts.DBClusterParameterGroupName)) - log.Printf("[INFO] Neptune Cluster Parameter Group ID: %s", d.Id()) - - d.Set("arn", resp.DBClusterParameterGroup.DBClusterParameterGroupArn) - - return resourceAwsNeptuneClusterParameterGroupUpdate(d, meta) -} - -func resourceAwsNeptuneClusterParameterGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - describeOpts := neptune.DescribeDBClusterParameterGroupsInput{ - DBClusterParameterGroupName: aws.String(d.Id()), - } - - describeResp, err := conn.DescribeDBClusterParameterGroups(&describeOpts) - if err != nil { - if isAWSErr(err, neptune.ErrCodeDBParameterGroupNotFoundFault, "") { - log.Printf("[WARN] Neptune Cluster Parameter Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - if len(describeResp.DBClusterParameterGroups) == 0 { - log.Printf("[WARN] Neptune Cluster Parameter Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("name", describeResp.DBClusterParameterGroups[0].DBClusterParameterGroupName) - d.Set("family", describeResp.DBClusterParameterGroups[0].DBParameterGroupFamily) - d.Set("description", describeResp.DBClusterParameterGroups[0].Description) - arn := aws.StringValue(describeResp.DBClusterParameterGroups[0].DBClusterParameterGroupArn) - d.Set("arn", arn) - - // Only include user customized parameters as there's hundreds of system/default ones - describeParametersOpts := neptune.DescribeDBClusterParametersInput{ - DBClusterParameterGroupName: aws.String(d.Id()), - Source: aws.String("user"), - } - - describeParametersResp, err := conn.DescribeDBClusterParameters(&describeParametersOpts) - if err != nil { - return err - } - - if err := d.Set("parameter", flattenNeptuneParameters(describeParametersResp.Parameters)); err != nil { - return fmt.Errorf("error setting neptune parameter: %s", err) - } - - resp, err := conn.ListTagsForResource(&neptune.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) - } - - if err := d.Set("tags", tagsToMapNeptune(resp.TagList)); err != nil { - return fmt.Errorf("error setting neptune tags: %s", err) - } - - return nil -} - -func resourceAwsNeptuneClusterParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - d.Partial(true) - - if d.HasChange("parameter") { - o, n := d.GetChange("parameter") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - parameters, err := expandNeptuneParameters(ns.Difference(os).List()) - if err != nil { - return err - } - - if len(parameters) > 0 { - // We can only modify 20 parameters at a time, so walk them until - // we've got them all. - for parameters != nil { - var paramsToModify []*neptune.Parameter - if len(parameters) <= neptuneClusterParameterGroupMaxParamsBulkEdit { - paramsToModify, parameters = parameters[:], nil - } else { - paramsToModify, parameters = parameters[:neptuneClusterParameterGroupMaxParamsBulkEdit], parameters[neptuneClusterParameterGroupMaxParamsBulkEdit:] - } - parameterGroupName := d.Get("name").(string) - modifyOpts := neptune.ModifyDBClusterParameterGroupInput{ - DBClusterParameterGroupName: aws.String(parameterGroupName), - Parameters: paramsToModify, - } - - log.Printf("[DEBUG] Modify Neptune Cluster Parameter Group: %s", modifyOpts) - _, err = conn.ModifyDBClusterParameterGroup(&modifyOpts) - if err != nil { - return fmt.Errorf("Error modifying Neptune Cluster Parameter Group: %s", err) - } - } - d.SetPartial("parameter") - } - } - - arn := d.Get("arn").(string) - if err := setTagsNeptune(conn, d, arn); err != nil { - return err - } else { - d.SetPartial("tags") - } - - d.Partial(false) - - return resourceAwsNeptuneClusterParameterGroupRead(d, meta) -} - -func resourceAwsNeptuneClusterParameterGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - input := neptune.DeleteDBClusterParameterGroupInput{ - DBClusterParameterGroupName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting Neptune Cluster Parameter Group: %s", d.Id()) - _, err := conn.DeleteDBClusterParameterGroup(&input) - if err != nil { - if isAWSErr(err, neptune.ErrCodeDBParameterGroupNotFoundFault, "") { - return nil - } - return fmt.Errorf("error deleting Neptune Cluster Parameter Group (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_snapshot.go deleted file mode 100644 index cb06484d3..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_snapshot.go +++ /dev/null @@ -1,218 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/neptune" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsNeptuneClusterSnapshot() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsNeptuneClusterSnapshotCreate, - Read: resourceAwsNeptuneClusterSnapshotRead, - Delete: resourceAwsNeptuneClusterSnapshotDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(20 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "db_cluster_snapshot_identifier": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "db_cluster_identifier": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "allocated_storage": { - Type: schema.TypeInt, - Computed: true, - }, - "availability_zones": { - Type: schema.TypeList, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - }, - "db_cluster_snapshot_arn": { - Type: schema.TypeString, - Computed: true, - }, - "engine": { - Type: schema.TypeString, - Computed: true, - }, - "engine_version": { - Type: schema.TypeString, - Computed: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - "license_model": { - Type: schema.TypeString, - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Computed: true, - }, - "source_db_cluster_snapshot_arn": { - Type: schema.TypeString, - Computed: true, - }, - "snapshot_type": { - Type: schema.TypeString, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "storage_encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsNeptuneClusterSnapshotCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - input := &neptune.CreateDBClusterSnapshotInput{ - DBClusterIdentifier: aws.String(d.Get("db_cluster_identifier").(string)), - DBClusterSnapshotIdentifier: aws.String(d.Get("db_cluster_snapshot_identifier").(string)), - } - - log.Printf("[DEBUG] Creating Neptune DB Cluster Snapshot: %s", input) - _, err := conn.CreateDBClusterSnapshot(input) - if err != nil { - return fmt.Errorf("error creating Neptune DB Cluster Snapshot: %s", err) - } - d.SetId(d.Get("db_cluster_snapshot_identifier").(string)) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating"}, - Target: []string{"available"}, - Refresh: resourceAwsNeptuneClusterSnapshotStateRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 5 * time.Second, - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for Neptune DB Cluster Snapshot %q to create: %s", d.Id(), err) - } - - return resourceAwsNeptuneClusterSnapshotRead(d, meta) -} - -func resourceAwsNeptuneClusterSnapshotRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - input := &neptune.DescribeDBClusterSnapshotsInput{ - DBClusterSnapshotIdentifier: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading Neptune DB Cluster Snapshot: %s", input) - output, err := conn.DescribeDBClusterSnapshots(input) - if err != nil { - if isAWSErr(err, neptune.ErrCodeDBClusterSnapshotNotFoundFault, "") { - log.Printf("[WARN] Neptune DB Cluster Snapshot %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Neptune DB Cluster Snapshot %q: %s", d.Id(), err) - } - - if output == nil || len(output.DBClusterSnapshots) == 0 || output.DBClusterSnapshots[0] == nil || aws.StringValue(output.DBClusterSnapshots[0].DBClusterSnapshotIdentifier) != d.Id() { - log.Printf("[WARN] Neptune DB Cluster Snapshot %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - snapshot := output.DBClusterSnapshots[0] - - d.Set("allocated_storage", snapshot.AllocatedStorage) - if err := d.Set("availability_zones", flattenStringList(snapshot.AvailabilityZones)); err != nil { - return fmt.Errorf("error setting availability_zones: %s", err) - } - d.Set("db_cluster_identifier", snapshot.DBClusterIdentifier) - d.Set("db_cluster_snapshot_arn", snapshot.DBClusterSnapshotArn) - d.Set("db_cluster_snapshot_identifier", snapshot.DBClusterSnapshotIdentifier) - d.Set("engine_version", snapshot.EngineVersion) - d.Set("engine", snapshot.Engine) - d.Set("kms_key_id", snapshot.KmsKeyId) - d.Set("license_model", snapshot.LicenseModel) - d.Set("port", snapshot.Port) - d.Set("snapshot_type", snapshot.SnapshotType) - d.Set("source_db_cluster_snapshot_arn", snapshot.SourceDBClusterSnapshotArn) - d.Set("status", snapshot.Status) - d.Set("storage_encrypted", snapshot.StorageEncrypted) - d.Set("vpc_id", snapshot.VpcId) - - return nil -} - -func resourceAwsNeptuneClusterSnapshotDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - input := &neptune.DeleteDBClusterSnapshotInput{ - DBClusterSnapshotIdentifier: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting Neptune DB Cluster Snapshot: %s", input) - _, err := conn.DeleteDBClusterSnapshot(input) - if err != nil { - if isAWSErr(err, neptune.ErrCodeDBClusterSnapshotNotFoundFault, "") { - return nil - } - return fmt.Errorf("error deleting Neptune DB Cluster Snapshot %q: %s", d.Id(), err) - } - - return nil -} - -func resourceAwsNeptuneClusterSnapshotStateRefreshFunc(dbClusterSnapshotIdentifier string, conn *neptune.Neptune) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &neptune.DescribeDBClusterSnapshotsInput{ - DBClusterSnapshotIdentifier: aws.String(dbClusterSnapshotIdentifier), - } - - log.Printf("[DEBUG] Reading Neptune DB Cluster Snapshot: %s", input) - output, err := conn.DescribeDBClusterSnapshots(input) - if err != nil { - if isAWSErr(err, neptune.ErrCodeDBClusterSnapshotNotFoundFault, "") { - return nil, "", nil - } - return nil, "", fmt.Errorf("Error retrieving DB Cluster Snapshots: %s", err) - } - - if output == nil || len(output.DBClusterSnapshots) == 0 || output.DBClusterSnapshots[0] == nil { - return nil, "", fmt.Errorf("No snapshots returned for %s", dbClusterSnapshotIdentifier) - } - - snapshot := output.DBClusterSnapshots[0] - - return output, aws.StringValue(snapshot.Status), nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_event_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_event_subscription.go deleted file mode 100644 index 7e2e11940..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_event_subscription.go +++ /dev/null @@ -1,391 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/neptune" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsNeptuneEventSubscription() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsNeptuneEventSubscriptionCreate, - Read: resourceAwsNeptuneEventSubscriptionRead, - Update: resourceAwsNeptuneEventSubscriptionUpdate, - Delete: resourceAwsNeptuneEventSubscriptionDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(40 * time.Minute), - Delete: schema.DefaultTimeout(40 * time.Minute), - Update: schema.DefaultTimeout(40 * time.Minute), - }, - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateNeptuneEventSubscriptionName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateNeptuneEventSubscriptionNamePrefix, - }, - "sns_topic_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "event_categories": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "source_ids": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "source_type": { - Type: schema.TypeString, - Optional: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "customer_aws_id": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsNeptuneEventSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - if v, ok := d.GetOk("name"); ok { - d.Set("name", v.(string)) - } else if v, ok := d.GetOk("name_prefix"); ok { - d.Set("name", resource.PrefixedUniqueId(v.(string))) - } else { - d.Set("name", resource.PrefixedUniqueId("tf-")) - } - - tags := tagsFromMapNeptune(d.Get("tags").(map[string]interface{})) - - request := &neptune.CreateEventSubscriptionInput{ - SubscriptionName: aws.String(d.Get("name").(string)), - SnsTopicArn: aws.String(d.Get("sns_topic_arn").(string)), - Enabled: aws.Bool(d.Get("enabled").(bool)), - Tags: tags, - } - - if v, ok := d.GetOk("source_ids"); ok { - sourceIdsSet := v.(*schema.Set) - sourceIds := make([]*string, sourceIdsSet.Len()) - for i, sourceId := range sourceIdsSet.List() { - sourceIds[i] = aws.String(sourceId.(string)) - } - request.SourceIds = sourceIds - } - - if v, ok := d.GetOk("event_categories"); ok { - eventCategoriesSet := v.(*schema.Set) - eventCategories := make([]*string, eventCategoriesSet.Len()) - for i, eventCategory := range eventCategoriesSet.List() { - eventCategories[i] = aws.String(eventCategory.(string)) - } - request.EventCategories = eventCategories - } - - if v, ok := d.GetOk("source_type"); ok { - request.SourceType = aws.String(v.(string)) - } - - log.Println("[DEBUG] Create Neptune Event Subscription:", request) - - output, err := conn.CreateEventSubscription(request) - if err != nil || output.EventSubscription == nil { - return fmt.Errorf("Error creating Neptune Event Subscription %s: %s", d.Get("name").(string), err) - } - - d.SetId(aws.StringValue(output.EventSubscription.CustSubscriptionId)) - - log.Println("[INFO] Waiting for Neptune Event Subscription to be ready") - - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating"}, - Target: []string{"active"}, - Refresh: resourceAwsNeptuneEventSubscriptionRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for Neptune Event Subscription state to be \"active\": %s", err) - } - - return resourceAwsNeptuneEventSubscriptionRead(d, meta) -} - -func resourceAwsNeptuneEventSubscriptionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - sub, err := resourceAwsNeptuneEventSubscriptionRetrieve(d.Id(), conn) - if err != nil { - return fmt.Errorf("Error reading Neptune Event Subscription %s: %s", d.Id(), err) - } - - if sub == nil { - log.Printf("[DEBUG] Neptune Event Subscription (%s) not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("arn", sub.EventSubscriptionArn) - d.Set("name", sub.CustSubscriptionId) - d.Set("sns_topic_arn", sub.SnsTopicArn) - d.Set("enabled", sub.Enabled) - d.Set("customer_aws_id", sub.CustomerAwsId) - - if sub.SourceType != nil { - d.Set("source_type", sub.SourceType) - } - - if sub.SourceIdsList != nil { - if err := d.Set("source_ids", flattenStringList(sub.SourceIdsList)); err != nil { - return fmt.Errorf("Error saving Source IDs to state for Neptune Event Subscription (%s): %s", d.Id(), err) - } - } - - if sub.EventCategoriesList != nil { - if err := d.Set("event_categories", flattenStringList(sub.EventCategoriesList)); err != nil { - return fmt.Errorf("Error saving Event Categories to state for Neptune Event Subscription (%s): %s", d.Id(), err) - } - } - - if err := saveTagsNeptune(conn, d, aws.StringValue(sub.EventSubscriptionArn)); err != nil { - return fmt.Errorf("Error saving tags for Neptune Event Subscription (%s): %s", d.Id(), err) - } - - return nil -} - -func resourceAwsNeptuneEventSubscriptionUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - d.Partial(true) - requestUpdate := false - - req := &neptune.ModifyEventSubscriptionInput{ - SubscriptionName: aws.String(d.Id()), - } - - if d.HasChange("event_categories") { - eventCategoriesSet := d.Get("event_categories").(*schema.Set) - req.EventCategories = make([]*string, eventCategoriesSet.Len()) - for i, eventCategory := range eventCategoriesSet.List() { - req.EventCategories[i] = aws.String(eventCategory.(string)) - } - req.SourceType = aws.String(d.Get("source_type").(string)) - requestUpdate = true - } - - if d.HasChange("enabled") { - req.Enabled = aws.Bool(d.Get("enabled").(bool)) - requestUpdate = true - } - - if d.HasChange("sns_topic_arn") { - req.SnsTopicArn = aws.String(d.Get("sns_topic_arn").(string)) - requestUpdate = true - } - - if d.HasChange("source_type") { - req.SourceType = aws.String(d.Get("source_type").(string)) - requestUpdate = true - } - - log.Printf("[DEBUG] Send Neptune Event Subscription modification request: %#v", requestUpdate) - if requestUpdate { - log.Printf("[DEBUG] Neptune Event Subscription modification request: %#v", req) - _, err := conn.ModifyEventSubscription(req) - if err != nil { - return fmt.Errorf("Modifying Neptune Event Subscription %s failed: %s", d.Id(), err) - } - - log.Println("[INFO] Waiting for Neptune Event Subscription modification to finish") - - stateConf := &resource.StateChangeConf{ - Pending: []string{"modifying"}, - Target: []string{"active"}, - Refresh: resourceAwsNeptuneEventSubscriptionRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return err - } - d.SetPartial("event_categories") - d.SetPartial("enabled") - d.SetPartial("sns_topic_arn") - d.SetPartial("source_type") - } - - if err := setTagsNeptune(conn, d, d.Get("arn").(string)); err != nil { - return err - } else { - d.SetPartial("tags") - } - - if d.HasChange("source_ids") { - o, n := d.GetChange("source_ids") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - remove := expandStringList(os.Difference(ns).List()) - add := expandStringList(ns.Difference(os).List()) - - if len(remove) > 0 { - for _, removing := range remove { - log.Printf("[INFO] Removing %s as a Source Identifier from %q", *removing, d.Id()) - _, err := conn.RemoveSourceIdentifierFromSubscription(&neptune.RemoveSourceIdentifierFromSubscriptionInput{ - SourceIdentifier: removing, - SubscriptionName: aws.String(d.Id()), - }) - if err != nil { - return err - } - } - } - - if len(add) > 0 { - for _, adding := range add { - log.Printf("[INFO] Adding %s as a Source Identifier to %q", *adding, d.Id()) - _, err := conn.AddSourceIdentifierToSubscription(&neptune.AddSourceIdentifierToSubscriptionInput{ - SourceIdentifier: adding, - SubscriptionName: aws.String(d.Id()), - }) - if err != nil { - return err - } - } - } - d.SetPartial("source_ids") - } - - d.Partial(false) - - return resourceAwsNeptuneEventSubscriptionRead(d, meta) -} - -func resourceAwsNeptuneEventSubscriptionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - deleteOpts := neptune.DeleteEventSubscriptionInput{ - SubscriptionName: aws.String(d.Id()), - } - - if _, err := conn.DeleteEventSubscription(&deleteOpts); err != nil { - if isAWSErr(err, neptune.ErrCodeSubscriptionNotFoundFault, "") { - log.Printf("[WARN] Neptune Event Subscription %s not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error deleting Neptune Event Subscription %s: %s", d.Id(), err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"deleting"}, - Target: []string{}, - Refresh: resourceAwsNeptuneEventSubscriptionRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutDelete), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error deleting Neptune Event Subscription %s: %s", d.Id(), err) - } - - return nil -} - -func resourceAwsNeptuneEventSubscriptionRefreshFunc(name string, conn *neptune.Neptune) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - sub, err := resourceAwsNeptuneEventSubscriptionRetrieve(name, conn) - - if err != nil { - log.Printf("Error on retrieving Neptune Event Subscription when waiting: %s", err) - return nil, "", err - } - - if sub == nil { - return nil, "", nil - } - - if sub.Status != nil { - log.Printf("[DEBUG] Neptune Event Subscription status for %s: %s", name, aws.StringValue(sub.Status)) - } - - return sub, aws.StringValue(sub.Status), nil - } -} - -func resourceAwsNeptuneEventSubscriptionRetrieve(name string, conn *neptune.Neptune) (*neptune.EventSubscription, error) { - - request := &neptune.DescribeEventSubscriptionsInput{ - SubscriptionName: aws.String(name), - } - - describeResp, err := conn.DescribeEventSubscriptions(request) - if err != nil { - if isAWSErr(err, neptune.ErrCodeSubscriptionNotFoundFault, "") { - log.Printf("[DEBUG] Neptune Event Subscription (%s) not found", name) - return nil, nil - } - return nil, err - } - - if len(describeResp.EventSubscriptionsList) != 1 || - aws.StringValue(describeResp.EventSubscriptionsList[0].CustSubscriptionId) != name { - return nil, nil - } - - return describeResp.EventSubscriptionsList[0], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_parameter_group.go deleted file mode 100644 index 05bc64b55..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_parameter_group.go +++ /dev/null @@ -1,291 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/neptune" -) - -// We can only modify 20 parameters at a time, so walk them until -// we've got them all. -const maxParams = 20 - -func resourceAwsNeptuneParameterGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsNeptuneParameterGroupCreate, - Read: resourceAwsNeptuneParameterGroupRead, - Update: resourceAwsNeptuneParameterGroupUpdate, - Delete: resourceAwsNeptuneParameterGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - StateFunc: func(val interface{}) string { - return strings.ToLower(val.(string)) - }, - }, - "family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "Managed by Terraform", - }, - "parameter": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - "apply_method": { - Type: schema.TypeString, - Optional: true, - Default: neptune.ApplyMethodPendingReboot, - ValidateFunc: validation.StringInSlice([]string{ - neptune.ApplyMethodImmediate, - neptune.ApplyMethodPendingReboot, - }, false), - }, - }, - }, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsNeptuneParameterGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - createOpts := neptune.CreateDBParameterGroupInput{ - DBParameterGroupName: aws.String(d.Get("name").(string)), - DBParameterGroupFamily: aws.String(d.Get("family").(string)), - Description: aws.String(d.Get("description").(string)), - } - - log.Printf("[DEBUG] Create Neptune Parameter Group: %#v", createOpts) - resp, err := conn.CreateDBParameterGroup(&createOpts) - if err != nil { - return fmt.Errorf("Error creating Neptune Parameter Group: %s", err) - } - - d.Partial(true) - d.SetPartial("name") - d.SetPartial("family") - d.SetPartial("description") - d.Partial(false) - - d.SetId(*resp.DBParameterGroup.DBParameterGroupName) - d.Set("arn", resp.DBParameterGroup.DBParameterGroupArn) - log.Printf("[INFO] Neptune Parameter Group ID: %s", d.Id()) - - return resourceAwsNeptuneParameterGroupUpdate(d, meta) -} - -func resourceAwsNeptuneParameterGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - describeOpts := neptune.DescribeDBParameterGroupsInput{ - DBParameterGroupName: aws.String(d.Id()), - } - - describeResp, err := conn.DescribeDBParameterGroups(&describeOpts) - if err != nil { - if isAWSErr(err, neptune.ErrCodeDBParameterGroupNotFoundFault, "") { - log.Printf("[WARN] Neptune Parameter Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - if describeResp == nil { - return fmt.Errorf("Unable to get Describe Response for Neptune Parameter Group (%s)", d.Id()) - } - - if len(describeResp.DBParameterGroups) != 1 || - *describeResp.DBParameterGroups[0].DBParameterGroupName != d.Id() { - return fmt.Errorf("Unable to find Parameter Group: %#v", describeResp.DBParameterGroups) - } - - arn := aws.StringValue(describeResp.DBParameterGroups[0].DBParameterGroupArn) - d.Set("arn", arn) - d.Set("name", describeResp.DBParameterGroups[0].DBParameterGroupName) - d.Set("family", describeResp.DBParameterGroups[0].DBParameterGroupFamily) - d.Set("description", describeResp.DBParameterGroups[0].Description) - - // Only include user customized parameters as there's hundreds of system/default ones - describeParametersOpts := neptune.DescribeDBParametersInput{ - DBParameterGroupName: aws.String(d.Id()), - Source: aws.String("user"), - } - - var parameters []*neptune.Parameter - err = conn.DescribeDBParametersPages(&describeParametersOpts, - func(describeParametersResp *neptune.DescribeDBParametersOutput, lastPage bool) bool { - parameters = append(parameters, describeParametersResp.Parameters...) - return !lastPage - }) - if err != nil { - return err - } - - if err := d.Set("parameter", flattenNeptuneParameters(parameters)); err != nil { - return fmt.Errorf("error setting parameter: %s", err) - } - - resp, err := conn.ListTagsForResource(&neptune.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) - } - - if err := d.Set("tags", tagsToMapNeptune(resp.TagList)); err != nil { - return fmt.Errorf("error setting neptune tags: %s", err) - } - - return nil -} - -func resourceAwsNeptuneParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - d.Partial(true) - - if d.HasChange("parameter") { - o, n := d.GetChange("parameter") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - toRemove, err := expandNeptuneParameters(os.Difference(ns).List()) - if err != nil { - return err - } - - log.Printf("[DEBUG] Parameters to remove: %#v", toRemove) - - toAdd, err := expandNeptuneParameters(ns.Difference(os).List()) - if err != nil { - return err - } - - log.Printf("[DEBUG] Parameters to add: %#v", toAdd) - - for len(toRemove) > 0 { - var paramsToModify []*neptune.Parameter - if len(toRemove) <= maxParams { - paramsToModify, toRemove = toRemove[:], nil - } else { - paramsToModify, toRemove = toRemove[:maxParams], toRemove[maxParams:] - } - resetOpts := neptune.ResetDBParameterGroupInput{ - DBParameterGroupName: aws.String(d.Get("name").(string)), - Parameters: paramsToModify, - } - - log.Printf("[DEBUG] Reset Neptune Parameter Group: %s", resetOpts) - err := resource.Retry(30*time.Second, func() *resource.RetryError { - _, err = conn.ResetDBParameterGroup(&resetOpts) - if err != nil { - if isAWSErr(err, "InvalidDBParameterGroupState", " has pending changes") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error resetting Neptune Parameter Group: %s", err) - } - } - - for len(toAdd) > 0 { - var paramsToModify []*neptune.Parameter - if len(toAdd) <= maxParams { - paramsToModify, toAdd = toAdd[:], nil - } else { - paramsToModify, toAdd = toAdd[:maxParams], toAdd[maxParams:] - } - modifyOpts := neptune.ModifyDBParameterGroupInput{ - DBParameterGroupName: aws.String(d.Get("name").(string)), - Parameters: paramsToModify, - } - - log.Printf("[DEBUG] Modify Neptune Parameter Group: %s", modifyOpts) - _, err = conn.ModifyDBParameterGroup(&modifyOpts) - if err != nil { - return fmt.Errorf("Error modifying Neptune Parameter Group: %s", err) - } - } - - d.SetPartial("parameter") - } - - if d.HasChange("tags") { - err := setTagsNeptune(conn, d, d.Get("arn").(string)) - if err != nil { - return fmt.Errorf("error setting Neptune Parameter Group %q tags: %s", d.Id(), err) - } - d.SetPartial("tags") - } - - d.Partial(false) - - return resourceAwsNeptuneParameterGroupRead(d, meta) -} - -func resourceAwsNeptuneParameterGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - return resource.Retry(3*time.Minute, func() *resource.RetryError { - deleteOpts := neptune.DeleteDBParameterGroupInput{ - DBParameterGroupName: aws.String(d.Id()), - } - _, err := conn.DeleteDBParameterGroup(&deleteOpts) - if err != nil { - if isAWSErr(err, neptune.ErrCodeDBParameterGroupNotFoundFault, "") { - return nil - } - if isAWSErr(err, neptune.ErrCodeInvalidDBParameterGroupStateFault, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_subnet_group.go deleted file mode 100644 index 9d6647699..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_subnet_group.go +++ /dev/null @@ -1,218 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/neptune" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsNeptuneSubnetGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsNeptuneSubnetGroupCreate, - Read: resourceAwsNeptuneSubnetGroupRead, - Update: resourceAwsNeptuneSubnetGroupUpdate, - Delete: resourceAwsNeptuneSubnetGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateNeptuneSubnetGroupName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateNeptuneSubnetGroupNamePrefix, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - Default: "Managed by Terraform", - }, - - "subnet_ids": { - Type: schema.TypeSet, - Required: true, - MinItems: 1, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsNeptuneSubnetGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - tags := tagsFromMapNeptune(d.Get("tags").(map[string]interface{})) - - subnetIdsSet := d.Get("subnet_ids").(*schema.Set) - subnetIds := make([]*string, subnetIdsSet.Len()) - for i, subnetId := range subnetIdsSet.List() { - subnetIds[i] = aws.String(subnetId.(string)) - } - - var groupName string - if v, ok := d.GetOk("name"); ok { - groupName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - groupName = resource.PrefixedUniqueId(v.(string)) - } else { - groupName = resource.UniqueId() - } - - createOpts := neptune.CreateDBSubnetGroupInput{ - DBSubnetGroupName: aws.String(groupName), - DBSubnetGroupDescription: aws.String(d.Get("description").(string)), - SubnetIds: subnetIds, - Tags: tags, - } - - log.Printf("[DEBUG] Create Neptune Subnet Group: %#v", createOpts) - _, err := conn.CreateDBSubnetGroup(&createOpts) - if err != nil { - return fmt.Errorf("Error creating Neptune Subnet Group: %s", err) - } - - d.SetId(aws.StringValue(createOpts.DBSubnetGroupName)) - log.Printf("[INFO] Neptune Subnet Group ID: %s", d.Id()) - return resourceAwsNeptuneSubnetGroupRead(d, meta) -} - -func resourceAwsNeptuneSubnetGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - describeOpts := neptune.DescribeDBSubnetGroupsInput{ - DBSubnetGroupName: aws.String(d.Id()), - } - - var subnetGroups []*neptune.DBSubnetGroup - if err := conn.DescribeDBSubnetGroupsPages(&describeOpts, func(resp *neptune.DescribeDBSubnetGroupsOutput, lastPage bool) bool { - subnetGroups = append(subnetGroups, resp.DBSubnetGroups...) - return !lastPage - }); err != nil { - if isAWSErr(err, neptune.ErrCodeDBSubnetGroupNotFoundFault, "") { - log.Printf("[WARN] Neptune Subnet Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - if len(subnetGroups) == 0 { - log.Printf("[WARN] Unable to find Neptune Subnet Group: %#v, removing from state", subnetGroups) - d.SetId("") - return nil - } - - var subnetGroup *neptune.DBSubnetGroup = subnetGroups[0] - - if subnetGroup.DBSubnetGroupName == nil { - return fmt.Errorf("Unable to find Neptune Subnet Group: %#v", subnetGroups) - } - - d.Set("name", subnetGroup.DBSubnetGroupName) - d.Set("description", subnetGroup.DBSubnetGroupDescription) - - subnets := make([]string, 0, len(subnetGroup.Subnets)) - for _, s := range subnetGroup.Subnets { - subnets = append(subnets, aws.StringValue(s.SubnetIdentifier)) - } - if err := d.Set("subnet_ids", subnets); err != nil { - return fmt.Errorf("error setting subnet_ids: %s", err) - } - - // list tags for resource - // set tags - - //Amazon Neptune shares the format of Amazon RDS ARNs. Neptune ARNs contain rds and not neptune. - //https://docs.aws.amazon.com/neptune/latest/userguide/tagging.ARN.html - d.Set("arn", subnetGroup.DBSubnetGroupArn) - resp, err := conn.ListTagsForResource(&neptune.ListTagsForResourceInput{ - ResourceName: subnetGroup.DBSubnetGroupArn, - }) - - if err != nil { - log.Printf("[DEBUG] Error retreiving tags for ARN: %s", aws.StringValue(subnetGroup.DBSubnetGroupArn)) - } - - d.Set("tags", tagsToMapNeptune(resp.TagList)) - - return nil -} - -func resourceAwsNeptuneSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - if d.HasChange("subnet_ids") || d.HasChange("description") { - _, n := d.GetChange("subnet_ids") - if n == nil { - n = new(schema.Set) - } - ns := n.(*schema.Set) - - var sIds []*string - for _, s := range ns.List() { - sIds = append(sIds, aws.String(s.(string))) - } - - _, err := conn.ModifyDBSubnetGroup(&neptune.ModifyDBSubnetGroupInput{ - DBSubnetGroupName: aws.String(d.Id()), - DBSubnetGroupDescription: aws.String(d.Get("description").(string)), - SubnetIds: sIds, - }) - - if err != nil { - return err - } - } - - //https://docs.aws.amazon.com/neptune/latest/userguide/tagging.ARN.html - arn := d.Get("arn").(string) - if err := setTagsNeptune(conn, d, arn); err != nil { - return err - } else { - d.SetPartial("tags") - } - - return resourceAwsNeptuneSubnetGroupRead(d, meta) -} - -func resourceAwsNeptuneSubnetGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).neptuneconn - - input := neptune.DeleteDBSubnetGroupInput{ - DBSubnetGroupName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting Neptune Subnet Group: %s", d.Id()) - _, err := conn.DeleteDBSubnetGroup(&input) - if err != nil { - if isAWSErr(err, neptune.ErrCodeDBSubnetGroupNotFoundFault, "") { - return nil - } - return fmt.Errorf("error deleting Neptune Subnet Group (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go deleted file mode 100644 index 746c6858a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go +++ /dev/null @@ -1,672 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "sort" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsNetworkAcl() *schema.Resource { - - return &schema.Resource{ - Create: resourceAwsNetworkAclCreate, - Read: resourceAwsNetworkAclRead, - Delete: resourceAwsNetworkAclDelete, - Update: resourceAwsNetworkAclUpdate, - Importer: &schema.ResourceImporter{ - State: resourceAwsNetworkAclImportState, - }, - - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - Computed: false, - }, - "subnet_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: false, - ConflictsWith: []string{"subnet_ids"}, - Deprecated: "Attribute subnet_id is deprecated on network_acl resources. Use subnet_ids instead", - }, - "subnet_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ConflictsWith: []string{"subnet_id"}, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "ingress": { - Type: schema.TypeSet, - Required: false, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "from_port": { - Type: schema.TypeInt, - Required: true, - }, - "to_port": { - Type: schema.TypeInt, - Required: true, - }, - "rule_no": { - Type: schema.TypeInt, - Required: true, - }, - "action": { - Type: schema.TypeString, - Required: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - return strings.EqualFold(old, new) - }, - }, - "protocol": { - Type: schema.TypeString, - Required: true, - }, - "cidr_block": { - Type: schema.TypeString, - Optional: true, - }, - "ipv6_cidr_block": { - Type: schema.TypeString, - Optional: true, - }, - "icmp_type": { - Type: schema.TypeInt, - Optional: true, - }, - "icmp_code": { - Type: schema.TypeInt, - Optional: true, - }, - }, - }, - Set: resourceAwsNetworkAclEntryHash, - }, - "egress": { - Type: schema.TypeSet, - Required: false, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "from_port": { - Type: schema.TypeInt, - Required: true, - }, - "to_port": { - Type: schema.TypeInt, - Required: true, - }, - "rule_no": { - Type: schema.TypeInt, - Required: true, - }, - "action": { - Type: schema.TypeString, - Required: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - return strings.EqualFold(old, new) - }, - }, - "protocol": { - Type: schema.TypeString, - Required: true, - }, - "cidr_block": { - Type: schema.TypeString, - Optional: true, - }, - "ipv6_cidr_block": { - Type: schema.TypeString, - Optional: true, - }, - "icmp_type": { - Type: schema.TypeInt, - Optional: true, - }, - "icmp_code": { - Type: schema.TypeInt, - Optional: true, - }, - }, - }, - Set: resourceAwsNetworkAclEntryHash, - }, - "tags": tagsSchema(), - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsNetworkAclCreate(d *schema.ResourceData, meta interface{}) error { - - conn := meta.(*AWSClient).ec2conn - - // Create the Network Acl - createOpts := &ec2.CreateNetworkAclInput{ - VpcId: aws.String(d.Get("vpc_id").(string)), - } - - log.Printf("[DEBUG] Network Acl create config: %#v", createOpts) - resp, err := conn.CreateNetworkAcl(createOpts) - if err != nil { - return fmt.Errorf("Error creating network acl: %s", err) - } - - // Get the ID and store it - networkAcl := resp.NetworkAcl - d.SetId(*networkAcl.NetworkAclId) - log.Printf("[INFO] Network Acl ID: %s", *networkAcl.NetworkAclId) - - // Update rules and subnet association once acl is created - return resourceAwsNetworkAclUpdate(d, meta) -} - -func resourceAwsNetworkAclRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - resp, err := conn.DescribeNetworkAcls(&ec2.DescribeNetworkAclsInput{ - NetworkAclIds: []*string{aws.String(d.Id())}, - }) - - if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - if ec2err.Code() == "InvalidNetworkAclID.NotFound" { - log.Printf("[DEBUG] Network ACL (%s) not found", d.Id()) - d.SetId("") - return nil - } - } - return err - } - if resp == nil { - return nil - } - - networkAcl := resp.NetworkAcls[0] - var ingressEntries []*ec2.NetworkAclEntry - var egressEntries []*ec2.NetworkAclEntry - - // separate the ingress and egress rules - for _, e := range networkAcl.Entries { - // Skip the default rules added by AWS. They can be neither - // configured or deleted by users. - if *e.RuleNumber == awsDefaultAclRuleNumberIpv4 || - *e.RuleNumber == awsDefaultAclRuleNumberIpv6 { - continue - } - - if *e.Egress { - egressEntries = append(egressEntries, e) - } else { - ingressEntries = append(ingressEntries, e) - } - } - - d.Set("vpc_id", networkAcl.VpcId) - d.Set("tags", tagsToMap(networkAcl.Tags)) - d.Set("owner_id", networkAcl.OwnerId) - - var s []string - for _, a := range networkAcl.Associations { - s = append(s, *a.SubnetId) - } - sort.Strings(s) - if err := d.Set("subnet_ids", s); err != nil { - return err - } - - if err := d.Set("ingress", networkAclEntriesToMapList(ingressEntries)); err != nil { - return err - } - if err := d.Set("egress", networkAclEntriesToMapList(egressEntries)); err != nil { - return err - } - - return nil -} - -func resourceAwsNetworkAclUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - d.Partial(true) - - if d.HasChange("ingress") { - err := updateNetworkAclEntries(d, "ingress", conn) - if err != nil { - return err - } - } - - if d.HasChange("egress") { - err := updateNetworkAclEntries(d, "egress", conn) - if err != nil { - return err - } - } - - if d.HasChange("subnet_id") { - //associate new subnet with the acl. - _, n := d.GetChange("subnet_id") - newSubnet := n.(string) - association, err := findNetworkAclAssociation(newSubnet, conn) - if err != nil { - return fmt.Errorf("Failed to update acl %s with subnet %s: %s", d.Id(), newSubnet, err) - } - _, err = conn.ReplaceNetworkAclAssociation(&ec2.ReplaceNetworkAclAssociationInput{ - AssociationId: association.NetworkAclAssociationId, - NetworkAclId: aws.String(d.Id()), - }) - if err != nil { - return err - } - } - - if d.HasChange("subnet_ids") { - o, n := d.GetChange("subnet_ids") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - remove := os.Difference(ns).List() - add := ns.Difference(os).List() - - if len(remove) > 0 { - // A Network ACL is required for each subnet. In order to disassociate a - // subnet from this ACL, we must associate it with the default ACL. - defaultAcl, err := getDefaultNetworkAcl(d.Get("vpc_id").(string), conn) - if err != nil { - return fmt.Errorf("Failed to find Default ACL for VPC %s", d.Get("vpc_id").(string)) - } - for _, r := range remove { - association, err := findNetworkAclAssociation(r.(string), conn) - if err != nil { - if isResourceNotFoundError(err) { - // Subnet has been deleted. - continue - } - return fmt.Errorf("Failed to find acl association: acl %s with subnet %s: %s", d.Id(), r, err) - } - log.Printf("DEBUG] Replacing Network Acl Association (%s) with Default Network ACL ID (%s)", *association.NetworkAclAssociationId, *defaultAcl.NetworkAclId) - _, err = conn.ReplaceNetworkAclAssociation(&ec2.ReplaceNetworkAclAssociationInput{ - AssociationId: association.NetworkAclAssociationId, - NetworkAclId: defaultAcl.NetworkAclId, - }) - if err != nil { - return err - } - } - } - - if len(add) > 0 { - for _, a := range add { - association, err := findNetworkAclAssociation(a.(string), conn) - if err != nil { - return fmt.Errorf("Failed to find acl association: acl %s with subnet %s: %s", d.Id(), a, err) - } - _, err = conn.ReplaceNetworkAclAssociation(&ec2.ReplaceNetworkAclAssociationInput{ - AssociationId: association.NetworkAclAssociationId, - NetworkAclId: aws.String(d.Id()), - }) - if err != nil { - return err - } - } - } - - } - - if err := setTags(conn, d); err != nil { - return err - } else { - d.SetPartial("tags") - } - - d.Partial(false) - return resourceAwsNetworkAclRead(d, meta) -} - -func updateNetworkAclEntries(d *schema.ResourceData, entryType string, conn *ec2.EC2) error { - if d.HasChange(entryType) { - o, n := d.GetChange(entryType) - - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - toBeDeleted, err := expandNetworkAclEntries(os.Difference(ns).List(), entryType) - if err != nil { - return err - } - for _, remove := range toBeDeleted { - // AWS includes default rules with all network ACLs that can be - // neither modified nor destroyed. They have a custom rule - // number that is out of bounds for any other rule. If we - // encounter it, just continue. There's no work to be done. - if *remove.RuleNumber == awsDefaultAclRuleNumberIpv4 || - *remove.RuleNumber == awsDefaultAclRuleNumberIpv6 { - continue - } - - // Delete old Acl - log.Printf("[DEBUG] Destroying Network ACL Entry number (%d)", int(*remove.RuleNumber)) - _, err := conn.DeleteNetworkAclEntry(&ec2.DeleteNetworkAclEntryInput{ - NetworkAclId: aws.String(d.Id()), - RuleNumber: remove.RuleNumber, - Egress: remove.Egress, - }) - if err != nil { - return fmt.Errorf("Error deleting %s entry: %s", entryType, err) - } - } - - toBeCreated, err := expandNetworkAclEntries(ns.Difference(os).List(), entryType) - if err != nil { - return err - } - for _, add := range toBeCreated { - // Protocol -1 rules don't store ports in AWS. Thus, they'll always - // hash differently when being read out of the API. Force the user - // to set from_port and to_port to 0 for these rules, to keep the - // hashing consistent. - if *add.Protocol == "-1" { - to := *add.PortRange.To - from := *add.PortRange.From - expected := &expectedPortPair{ - to_port: 0, - from_port: 0, - } - if ok := validatePorts(to, from, *expected); !ok { - return fmt.Errorf( - "to_port (%d) and from_port (%d) must both be 0 to use the the 'all' \"-1\" protocol!", - to, from) - } - } - - if add.CidrBlock != nil && *add.CidrBlock != "" { - // AWS mutates the CIDR block into a network implied by the IP and - // mask provided. This results in hashing inconsistencies between - // the local config file and the state returned by the API. Error - // if the user provides a CIDR block with an inappropriate mask - if err := validateCIDRBlock(*add.CidrBlock); err != nil { - return err - } - } - - createOpts := &ec2.CreateNetworkAclEntryInput{ - NetworkAclId: aws.String(d.Id()), - Egress: add.Egress, - PortRange: add.PortRange, - Protocol: add.Protocol, - RuleAction: add.RuleAction, - RuleNumber: add.RuleNumber, - IcmpTypeCode: add.IcmpTypeCode, - } - - if add.CidrBlock != nil && *add.CidrBlock != "" { - createOpts.CidrBlock = add.CidrBlock - } - - if add.Ipv6CidrBlock != nil && *add.Ipv6CidrBlock != "" { - createOpts.Ipv6CidrBlock = add.Ipv6CidrBlock - } - - // Add new Acl entry - _, connErr := conn.CreateNetworkAclEntry(createOpts) - if connErr != nil { - return fmt.Errorf("Error creating %s entry: %s", entryType, connErr) - } - } - } - return nil -} - -func resourceAwsNetworkAclDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[INFO] Deleting Network Acl: %s", d.Id()) - retryErr := resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteNetworkAcl(&ec2.DeleteNetworkAclInput{ - NetworkAclId: aws.String(d.Id()), - }) - if err != nil { - ec2err := err.(awserr.Error) - switch ec2err.Code() { - case "InvalidNetworkAclID.NotFound": - return nil - case "DependencyViolation": - // In case of dependency violation, we remove the association between subnet and network acl. - // This means the subnet is attached to default acl of vpc. - var associations []*ec2.NetworkAclAssociation - if v, ok := d.GetOk("subnet_id"); ok { - - a, err := findNetworkAclAssociation(v.(string), conn) - if err != nil { - return resource.NonRetryableError(err) - } - associations = append(associations, a) - } else if v, ok := d.GetOk("subnet_ids"); ok { - ids := v.(*schema.Set).List() - for _, i := range ids { - a, err := findNetworkAclAssociation(i.(string), conn) - if err != nil { - if isResourceNotFoundError(err) { - continue - } - return resource.NonRetryableError(err) - } - associations = append(associations, a) - } - } - - log.Printf("[DEBUG] Replacing network associations for Network ACL (%s): %s", d.Id(), associations) - defaultAcl, err := getDefaultNetworkAcl(d.Get("vpc_id").(string), conn) - if err != nil { - return resource.NonRetryableError(err) - } - - for _, a := range associations { - log.Printf("DEBUG] Replacing Network Acl Association (%s) with Default Network ACL ID (%s)", *a.NetworkAclAssociationId, *defaultAcl.NetworkAclId) - _, replaceErr := conn.ReplaceNetworkAclAssociation(&ec2.ReplaceNetworkAclAssociationInput{ - AssociationId: a.NetworkAclAssociationId, - NetworkAclId: defaultAcl.NetworkAclId, - }) - if replaceErr != nil { - if replaceEc2err, ok := replaceErr.(awserr.Error); ok { - // It's possible that during an attempt to replace this - // association, the Subnet in question has already been moved to - // another ACL. This can happen if you're destroying a network acl - // and simultaneously re-associating it's subnet(s) with another - // ACL; Terraform may have already re-associated the subnet(s) by - // the time we attempt to destroy them, even between the time we - // list them and then try to destroy them. In this case, the - // association we're trying to replace will no longer exist and - // this call will fail. Here we trap that error and fail - // gracefully; the association we tried to replace gone, we trust - // someone else has taken ownership. - if replaceEc2err.Code() == "InvalidAssociationID.NotFound" { - log.Printf("[WARN] Network Association (%s) no longer found; Network Association likely updated or removed externally, removing from state", *a.NetworkAclAssociationId) - continue - } - } - log.Printf("[ERR] Non retry-able error in replacing associations for Network ACL (%s): %s", d.Id(), replaceErr) - return resource.NonRetryableError(replaceErr) - } - } - return resource.RetryableError(fmt.Errorf("Dependencies found and cleaned up, retrying")) - default: - // Any other error, we want to quit the retry loop immediately - return resource.NonRetryableError(err) - } - } - log.Printf("[Info] Deleted network ACL %s successfully", d.Id()) - return nil - }) - - if retryErr != nil { - return fmt.Errorf("Error destroying Network ACL (%s): %s", d.Id(), retryErr) - } - return nil -} - -func resourceAwsNetworkAclEntryHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%d-", m["from_port"].(int))) - buf.WriteString(fmt.Sprintf("%d-", m["to_port"].(int))) - buf.WriteString(fmt.Sprintf("%d-", m["rule_no"].(int))) - buf.WriteString(fmt.Sprintf("%s-", strings.ToLower(m["action"].(string)))) - - // The AWS network ACL API only speaks protocol numbers, and that's - // all we store. Never hash a protocol name. - protocol := m["protocol"].(string) - if _, err := strconv.Atoi(m["protocol"].(string)); err != nil { - // We're a protocol name. Look up the number. - buf.WriteString(fmt.Sprintf("%d-", protocolIntegers()[protocol])) - } else { - // We're a protocol number. Pass the value through. - buf.WriteString(fmt.Sprintf("%s-", protocol)) - } - - if v, ok := m["cidr_block"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["ipv6_cidr_block"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["ssl_certificate_id"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["icmp_type"]; ok { - buf.WriteString(fmt.Sprintf("%d-", v.(int))) - } - if v, ok := m["icmp_code"]; ok { - buf.WriteString(fmt.Sprintf("%d-", v.(int))) - } - - return hashcode.String(buf.String()) -} - -func getDefaultNetworkAcl(vpc_id string, conn *ec2.EC2) (defaultAcl *ec2.NetworkAcl, err error) { - resp, err := conn.DescribeNetworkAcls(&ec2.DescribeNetworkAclsInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("default"), - Values: []*string{aws.String("true")}, - }, - { - Name: aws.String("vpc-id"), - Values: []*string{aws.String(vpc_id)}, - }, - }, - }) - - if err != nil { - return nil, err - } - return resp.NetworkAcls[0], nil -} - -func findNetworkAclAssociation(subnetId string, conn *ec2.EC2) (networkAclAssociation *ec2.NetworkAclAssociation, err error) { - req := &ec2.DescribeNetworkAclsInput{} - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "association.subnet-id": subnetId, - }, - ) - resp, err := conn.DescribeNetworkAcls(req) - if err != nil { - return nil, err - } - - if len(resp.NetworkAcls) > 0 { - for _, association := range resp.NetworkAcls[0].Associations { - if aws.StringValue(association.SubnetId) == subnetId { - return association, nil - } - } - } - - return nil, &resource.NotFoundError{ - LastRequest: req, - LastResponse: resp, - Message: fmt.Sprintf("could not find association for subnet: %s ", subnetId), - } -} - -// networkAclEntriesToMapList turns ingress/egress rules read from AWS into a list -// of maps. -func networkAclEntriesToMapList(networkAcls []*ec2.NetworkAclEntry) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(networkAcls)) - for _, entry := range networkAcls { - acl := make(map[string]interface{}) - acl["rule_no"] = *entry.RuleNumber - acl["action"] = *entry.RuleAction - if entry.CidrBlock != nil { - acl["cidr_block"] = *entry.CidrBlock - } - if entry.Ipv6CidrBlock != nil { - acl["ipv6_cidr_block"] = *entry.Ipv6CidrBlock - } - // The AWS network ACL API only speaks protocol numbers, and - // that's all we record. - if _, err := strconv.Atoi(*entry.Protocol); err != nil { - // We're a protocol name. Look up the number. - acl["protocol"] = protocolIntegers()[*entry.Protocol] - } else { - // We're a protocol number. Pass through. - acl["protocol"] = *entry.Protocol - } - - acl["protocol"] = *entry.Protocol - if entry.PortRange != nil { - acl["from_port"] = *entry.PortRange.From - acl["to_port"] = *entry.PortRange.To - } - - if entry.IcmpTypeCode != nil { - acl["icmp_type"] = *entry.IcmpTypeCode.Type - acl["icmp_code"] = *entry.IcmpTypeCode.Code - } - - result = append(result, acl) - } - - return result -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go deleted file mode 100644 index ac4c4a422..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go +++ /dev/null @@ -1,315 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsNetworkAclRule() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsNetworkAclRuleCreate, - Read: resourceAwsNetworkAclRuleRead, - Delete: resourceAwsNetworkAclRuleDelete, - - Schema: map[string]*schema.Schema{ - "network_acl_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "rule_number": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "egress": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Default: false, - }, - "protocol": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - pi := protocolIntegers() - if val, ok := pi[old]; ok { - old = strconv.Itoa(val) - } - if val, ok := pi[new]; ok { - new = strconv.Itoa(val) - } - - return old == new - }, - }, - "rule_action": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "cidr_block": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"ipv6_cidr_block"}, - }, - "ipv6_cidr_block": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"cidr_block"}, - }, - "from_port": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - "to_port": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - "icmp_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateICMPArgumentValue, - }, - "icmp_code": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateICMPArgumentValue, - }, - }, - } -} - -func resourceAwsNetworkAclRuleCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - protocol := d.Get("protocol").(string) - p, protocolErr := strconv.Atoi(protocol) - if protocolErr != nil { - var ok bool - p, ok = protocolIntegers()[protocol] - if !ok { - return fmt.Errorf("Invalid Protocol %s for rule %d", protocol, d.Get("rule_number").(int)) - } - } - log.Printf("[INFO] Transformed Protocol %s into %d", protocol, p) - - params := &ec2.CreateNetworkAclEntryInput{ - NetworkAclId: aws.String(d.Get("network_acl_id").(string)), - Egress: aws.Bool(d.Get("egress").(bool)), - RuleNumber: aws.Int64(int64(d.Get("rule_number").(int))), - Protocol: aws.String(strconv.Itoa(p)), - RuleAction: aws.String(d.Get("rule_action").(string)), - PortRange: &ec2.PortRange{ - From: aws.Int64(int64(d.Get("from_port").(int))), - To: aws.Int64(int64(d.Get("to_port").(int))), - }, - } - - cidr, hasCidr := d.GetOk("cidr_block") - ipv6Cidr, hasIpv6Cidr := d.GetOk("ipv6_cidr_block") - - if !hasCidr && !hasIpv6Cidr { - return fmt.Errorf("Either `cidr_block` or `ipv6_cidr_block` must be defined") - } - - if hasCidr { - params.CidrBlock = aws.String(cidr.(string)) - } - - if hasIpv6Cidr { - params.Ipv6CidrBlock = aws.String(ipv6Cidr.(string)) - } - - // Specify additional required fields for ICMP. For the list - // of ICMP codes and types, see: https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml - if p == 1 || p == 58 { - params.IcmpTypeCode = &ec2.IcmpTypeCode{} - if v, ok := d.GetOk("icmp_type"); ok { - icmpType, err := strconv.Atoi(v.(string)) - if err != nil { - return fmt.Errorf("Unable to parse ICMP type %s for rule %d", v, d.Get("rule_number").(int)) - } - params.IcmpTypeCode.Type = aws.Int64(int64(icmpType)) - log.Printf("[DEBUG] Got ICMP type %d for rule %d", icmpType, d.Get("rule_number").(int)) - } - if v, ok := d.GetOk("icmp_code"); ok { - icmpCode, err := strconv.Atoi(v.(string)) - if err != nil { - return fmt.Errorf("Unable to parse ICMP code %s for rule %d", v, d.Get("rule_number").(int)) - } - params.IcmpTypeCode.Code = aws.Int64(int64(icmpCode)) - log.Printf("[DEBUG] Got ICMP code %d for rule %d", icmpCode, d.Get("rule_number").(int)) - } - } - - log.Printf("[INFO] Creating Network Acl Rule: %d (%t)", d.Get("rule_number").(int), d.Get("egress").(bool)) - _, err := conn.CreateNetworkAclEntry(params) - if err != nil { - return fmt.Errorf("Error Creating Network Acl Rule: %s", err.Error()) - } - d.SetId(networkAclIdRuleNumberEgressHash(d.Get("network_acl_id").(string), d.Get("rule_number").(int), d.Get("egress").(bool), d.Get("protocol").(string))) - - // It appears it might be a while until the newly created rule is visible via the - // API (see issue GH-4721). Retry the `findNetworkAclRule` function until it is - // visible (which in most cases is likely immediately). - err = resource.Retry(3*time.Minute, func() *resource.RetryError { - r, findErr := findNetworkAclRule(d, meta) - if findErr != nil { - return resource.RetryableError(findErr) - } - if r == nil { - err := fmt.Errorf("Network ACL rule (%s) not found", d.Id()) - return resource.RetryableError(err) - } - - return nil - }) - if err != nil { - return fmt.Errorf("Created Network ACL Rule was not visible in API within 3 minute period. Running 'terraform apply' again will resume infrastructure creation.") - } - - return resourceAwsNetworkAclRuleRead(d, meta) -} - -func resourceAwsNetworkAclRuleRead(d *schema.ResourceData, meta interface{}) error { - resp, err := findNetworkAclRule(d, meta) - if err != nil { - return err - } - if resp == nil { - log.Printf("[DEBUG] Network ACL rule (%s) not found", d.Id()) - d.SetId("") - return nil - } - - d.Set("rule_number", resp.RuleNumber) - d.Set("cidr_block", resp.CidrBlock) - d.Set("ipv6_cidr_block", resp.Ipv6CidrBlock) - d.Set("egress", resp.Egress) - if resp.IcmpTypeCode != nil { - d.Set("icmp_code", resp.IcmpTypeCode.Code) - d.Set("icmp_type", resp.IcmpTypeCode.Type) - } - if resp.PortRange != nil { - d.Set("from_port", resp.PortRange.From) - d.Set("to_port", resp.PortRange.To) - } - - d.Set("rule_action", resp.RuleAction) - - p, protocolErr := strconv.Atoi(*resp.Protocol) - log.Printf("[INFO] Converting the protocol %v", p) - if protocolErr == nil { - var ok bool - protocol, ok := protocolStrings(protocolIntegers())[p] - if !ok { - return fmt.Errorf("Invalid Protocol %s for rule %d", *resp.Protocol, d.Get("rule_number").(int)) - } - log.Printf("[INFO] Transformed Protocol %s back into %s", *resp.Protocol, protocol) - d.Set("protocol", protocol) - } - - return nil -} - -func resourceAwsNetworkAclRuleDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - params := &ec2.DeleteNetworkAclEntryInput{ - NetworkAclId: aws.String(d.Get("network_acl_id").(string)), - RuleNumber: aws.Int64(int64(d.Get("rule_number").(int))), - Egress: aws.Bool(d.Get("egress").(bool)), - } - - log.Printf("[INFO] Deleting Network Acl Rule: %s", d.Id()) - _, err := conn.DeleteNetworkAclEntry(params) - if err != nil { - return fmt.Errorf("Error Deleting Network Acl Rule: %s", err.Error()) - } - - return nil -} - -func findNetworkAclRule(d *schema.ResourceData, meta interface{}) (*ec2.NetworkAclEntry, error) { - conn := meta.(*AWSClient).ec2conn - - filters := make([]*ec2.Filter, 0, 2) - ruleNumberFilter := &ec2.Filter{ - Name: aws.String("entry.rule-number"), - Values: []*string{aws.String(fmt.Sprintf("%d", d.Get("rule_number").(int)))}, - } - filters = append(filters, ruleNumberFilter) - egressFilter := &ec2.Filter{ - Name: aws.String("entry.egress"), - Values: []*string{aws.String(fmt.Sprintf("%v", d.Get("egress").(bool)))}, - } - filters = append(filters, egressFilter) - params := &ec2.DescribeNetworkAclsInput{ - NetworkAclIds: []*string{aws.String(d.Get("network_acl_id").(string))}, - Filters: filters, - } - - log.Printf("[INFO] Describing Network Acl: %s", d.Get("network_acl_id").(string)) - log.Printf("[INFO] Describing Network Acl with the Filters %#v", params) - resp, err := conn.DescribeNetworkAcls(params) - if err != nil { - return nil, fmt.Errorf("Error Finding Network Acl Rule %d: %s", d.Get("rule_number").(int), err.Error()) - } - - if resp == nil || len(resp.NetworkAcls) == 0 || resp.NetworkAcls[0] == nil { - // Missing NACL rule. - return nil, nil - } - if len(resp.NetworkAcls) > 1 { - return nil, fmt.Errorf( - "Expected to find one Network ACL, got: %#v", - resp.NetworkAcls) - } - networkAcl := resp.NetworkAcls[0] - if networkAcl.Entries != nil { - for _, i := range networkAcl.Entries { - if *i.RuleNumber == int64(d.Get("rule_number").(int)) && *i.Egress == d.Get("egress").(bool) { - return i, nil - } - } - } - return nil, fmt.Errorf( - "Expected the Network ACL to have Entries, got: %#v", - networkAcl) - -} - -func networkAclIdRuleNumberEgressHash(networkAclId string, ruleNumber int, egress bool, protocol string) string { - var buf bytes.Buffer - buf.WriteString(fmt.Sprintf("%s-", networkAclId)) - buf.WriteString(fmt.Sprintf("%d-", ruleNumber)) - buf.WriteString(fmt.Sprintf("%t-", egress)) - buf.WriteString(fmt.Sprintf("%s-", protocol)) - return fmt.Sprintf("nacl-%d", hashcode.String(buf.String())) -} - -func validateICMPArgumentValue(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - _, err := strconv.Atoi(value) - if len(value) == 0 || err != nil { - errors = append(errors, fmt.Errorf("%q must be an integer value: %q", k, value)) - } - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface.go deleted file mode 100644 index 92cf2769d..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface.go +++ /dev/null @@ -1,435 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "math" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsNetworkInterface() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsNetworkInterfaceCreate, - Read: resourceAwsNetworkInterfaceRead, - Update: resourceAwsNetworkInterfaceUpdate, - Delete: resourceAwsNetworkInterfaceDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - - "subnet_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "private_ip": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "private_dns_name": { - Type: schema.TypeString, - Computed: true, - }, - - "private_ips": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "private_ips_count": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - }, - - "security_groups": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "source_dest_check": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - }, - - "attachment": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "instance": { - Type: schema.TypeString, - Required: true, - }, - "device_index": { - Type: schema.TypeInt, - Required: true, - }, - "attachment_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - Set: resourceAwsEniAttachmentHash, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsNetworkInterfaceCreate(d *schema.ResourceData, meta interface{}) error { - - conn := meta.(*AWSClient).ec2conn - - request := &ec2.CreateNetworkInterfaceInput{ - SubnetId: aws.String(d.Get("subnet_id").(string)), - } - - security_groups := d.Get("security_groups").(*schema.Set).List() - if len(security_groups) != 0 { - request.Groups = expandStringList(security_groups) - } - - private_ips := d.Get("private_ips").(*schema.Set).List() - if len(private_ips) != 0 { - request.PrivateIpAddresses = expandPrivateIPAddresses(private_ips) - } - - if v, ok := d.GetOk("description"); ok { - request.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("private_ips_count"); ok { - request.SecondaryPrivateIpAddressCount = aws.Int64(int64(v.(int))) - } - - log.Printf("[DEBUG] Creating network interface") - resp, err := conn.CreateNetworkInterface(request) - if err != nil { - return fmt.Errorf("Error creating ENI: %s", err) - } - - d.SetId(*resp.NetworkInterface.NetworkInterfaceId) - log.Printf("[INFO] ENI ID: %s", d.Id()) - return resourceAwsNetworkInterfaceUpdate(d, meta) -} - -func resourceAwsNetworkInterfaceRead(d *schema.ResourceData, meta interface{}) error { - - conn := meta.(*AWSClient).ec2conn - describe_network_interfaces_request := &ec2.DescribeNetworkInterfacesInput{ - NetworkInterfaceIds: []*string{aws.String(d.Id())}, - } - describeResp, err := conn.DescribeNetworkInterfaces(describe_network_interfaces_request) - - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidNetworkInterfaceID.NotFound" { - // The ENI is gone now, so just remove it from the state - d.SetId("") - return nil - } - - return fmt.Errorf("Error retrieving ENI: %s", err) - } - if len(describeResp.NetworkInterfaces) != 1 { - return fmt.Errorf("Unable to find ENI: %#v", describeResp.NetworkInterfaces) - } - - eni := describeResp.NetworkInterfaces[0] - d.Set("subnet_id", eni.SubnetId) - d.Set("private_ip", eni.PrivateIpAddress) - d.Set("private_dns_name", eni.PrivateDnsName) - d.Set("private_ips", flattenNetworkInterfacesPrivateIPAddresses(eni.PrivateIpAddresses)) - d.Set("security_groups", flattenGroupIdentifiers(eni.Groups)) - d.Set("source_dest_check", eni.SourceDestCheck) - - if eni.Description != nil { - d.Set("description", eni.Description) - } - - // Tags - d.Set("tags", tagsToMap(eni.TagSet)) - - if eni.Attachment != nil { - attachment := []map[string]interface{}{flattenAttachment(eni.Attachment)} - d.Set("attachment", attachment) - } else { - d.Set("attachment", nil) - } - - return nil -} - -func networkInterfaceAttachmentRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - - describe_network_interfaces_request := &ec2.DescribeNetworkInterfacesInput{ - NetworkInterfaceIds: []*string{aws.String(id)}, - } - describeResp, err := conn.DescribeNetworkInterfaces(describe_network_interfaces_request) - - if err != nil { - log.Printf("[ERROR] Could not find network interface %s. %s", id, err) - return nil, "", err - } - - eni := describeResp.NetworkInterfaces[0] - hasAttachment := strconv.FormatBool(eni.Attachment != nil) - log.Printf("[DEBUG] ENI %s has attachment state %s", id, hasAttachment) - return eni, hasAttachment, nil - } -} - -func resourceAwsNetworkInterfaceDetach(oa *schema.Set, meta interface{}, eniId string) error { - // if there was an old attachment, remove it - if oa != nil && len(oa.List()) > 0 { - old_attachment := oa.List()[0].(map[string]interface{}) - detach_request := &ec2.DetachNetworkInterfaceInput{ - AttachmentId: aws.String(old_attachment["attachment_id"].(string)), - Force: aws.Bool(true), - } - conn := meta.(*AWSClient).ec2conn - _, detach_err := conn.DetachNetworkInterface(detach_request) - if detach_err != nil { - if awsErr, _ := detach_err.(awserr.Error); awsErr.Code() != "InvalidAttachmentID.NotFound" { - return fmt.Errorf("Error detaching ENI: %s", detach_err) - } - } - - log.Printf("[DEBUG] Waiting for ENI (%s) to become detached", eniId) - stateConf := &resource.StateChangeConf{ - Pending: []string{"true"}, - Target: []string{"false"}, - Refresh: networkInterfaceAttachmentRefreshFunc(conn, eniId), - Timeout: 10 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for ENI (%s) to become detached: %s", eniId, err) - } - } - - return nil -} - -func resourceAwsNetworkInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - d.Partial(true) - - if d.HasChange("attachment") { - oa, na := d.GetChange("attachment") - - detach_err := resourceAwsNetworkInterfaceDetach(oa.(*schema.Set), meta, d.Id()) - if detach_err != nil { - return detach_err - } - - // if there is a new attachment, attach it - if na != nil && len(na.(*schema.Set).List()) > 0 { - new_attachment := na.(*schema.Set).List()[0].(map[string]interface{}) - di := new_attachment["device_index"].(int) - attach_request := &ec2.AttachNetworkInterfaceInput{ - DeviceIndex: aws.Int64(int64(di)), - InstanceId: aws.String(new_attachment["instance"].(string)), - NetworkInterfaceId: aws.String(d.Id()), - } - _, attach_err := conn.AttachNetworkInterface(attach_request) - if attach_err != nil { - return fmt.Errorf("Error attaching ENI: %s", attach_err) - } - } - - d.SetPartial("attachment") - } - - if d.HasChange("private_ips") { - o, n := d.GetChange("private_ips") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - // Unassign old IP addresses - unassignIps := os.Difference(ns) - if unassignIps.Len() != 0 { - input := &ec2.UnassignPrivateIpAddressesInput{ - NetworkInterfaceId: aws.String(d.Id()), - PrivateIpAddresses: expandStringList(unassignIps.List()), - } - _, err := conn.UnassignPrivateIpAddresses(input) - if err != nil { - return fmt.Errorf("Failure to unassign Private IPs: %s", err) - } - } - - // Assign new IP addresses - assignIps := ns.Difference(os) - if assignIps.Len() != 0 { - input := &ec2.AssignPrivateIpAddressesInput{ - NetworkInterfaceId: aws.String(d.Id()), - PrivateIpAddresses: expandStringList(assignIps.List()), - } - _, err := conn.AssignPrivateIpAddresses(input) - if err != nil { - return fmt.Errorf("Failure to assign Private IPs: %s", err) - } - } - - d.SetPartial("private_ips") - } - - request := &ec2.ModifyNetworkInterfaceAttributeInput{ - NetworkInterfaceId: aws.String(d.Id()), - SourceDestCheck: &ec2.AttributeBooleanValue{Value: aws.Bool(d.Get("source_dest_check").(bool))}, - } - - _, err := conn.ModifyNetworkInterfaceAttribute(request) - if err != nil { - return fmt.Errorf("Failure updating ENI: %s", err) - } - - d.SetPartial("source_dest_check") - - if d.HasChange("private_ips_count") { - o, n := d.GetChange("private_ips_count") - private_ips := d.Get("private_ips").(*schema.Set).List() - private_ips_filtered := private_ips[:0] - primary_ip := d.Get("private_ip") - - for _, ip := range private_ips { - if ip != primary_ip { - private_ips_filtered = append(private_ips_filtered, ip) - } - } - - if o != nil && o != 0 && n != nil && n != len(private_ips_filtered) { - - diff := n.(int) - o.(int) - - // Surplus of IPs, add the diff - if diff > 0 { - input := &ec2.AssignPrivateIpAddressesInput{ - NetworkInterfaceId: aws.String(d.Id()), - SecondaryPrivateIpAddressCount: aws.Int64(int64(diff)), - } - _, err := conn.AssignPrivateIpAddresses(input) - if err != nil { - return fmt.Errorf("Failure to assign Private IPs: %s", err) - } - } - - if diff < 0 { - input := &ec2.UnassignPrivateIpAddressesInput{ - NetworkInterfaceId: aws.String(d.Id()), - PrivateIpAddresses: expandStringList(private_ips_filtered[0:int(math.Abs(float64(diff)))]), - } - _, err := conn.UnassignPrivateIpAddresses(input) - if err != nil { - return fmt.Errorf("Failure to unassign Private IPs: %s", err) - } - } - - d.SetPartial("private_ips_count") - } - } - - if d.HasChange("security_groups") { - request := &ec2.ModifyNetworkInterfaceAttributeInput{ - NetworkInterfaceId: aws.String(d.Id()), - Groups: expandStringList(d.Get("security_groups").(*schema.Set).List()), - } - - _, err := conn.ModifyNetworkInterfaceAttribute(request) - if err != nil { - return fmt.Errorf("Failure updating ENI: %s", err) - } - - d.SetPartial("security_groups") - } - - if d.HasChange("description") { - request := &ec2.ModifyNetworkInterfaceAttributeInput{ - NetworkInterfaceId: aws.String(d.Id()), - Description: &ec2.AttributeValue{Value: aws.String(d.Get("description").(string))}, - } - - _, err := conn.ModifyNetworkInterfaceAttribute(request) - if err != nil { - return fmt.Errorf("Failure updating ENI: %s", err) - } - - d.SetPartial("description") - } - - if err := setTags(conn, d); err != nil { - return err - } else { - d.SetPartial("tags") - } - - d.Partial(false) - - return resourceAwsNetworkInterfaceRead(d, meta) -} - -func resourceAwsNetworkInterfaceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[INFO] Deleting ENI: %s", d.Id()) - - detach_err := resourceAwsNetworkInterfaceDetach(d.Get("attachment").(*schema.Set), meta, d.Id()) - if detach_err != nil { - return detach_err - } - - deleteEniOpts := ec2.DeleteNetworkInterfaceInput{ - NetworkInterfaceId: aws.String(d.Id()), - } - if _, err := conn.DeleteNetworkInterface(&deleteEniOpts); err != nil { - return fmt.Errorf("Error deleting ENI: %s", err) - } - - return nil -} - -func resourceAwsEniAttachmentHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["instance"].(string))) - buf.WriteString(fmt.Sprintf("%d-", m["device_index"].(int))) - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_attachment.go deleted file mode 100644 index 684a407f7..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_attachment.go +++ /dev/null @@ -1,166 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsNetworkInterfaceAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsNetworkInterfaceAttachmentCreate, - Read: resourceAwsNetworkInterfaceAttachmentRead, - Delete: resourceAwsNetworkInterfaceAttachmentDelete, - - Schema: map[string]*schema.Schema{ - "device_index": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - - "instance_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "network_interface_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "attachment_id": { - Type: schema.TypeString, - Computed: true, - }, - - "status": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsNetworkInterfaceAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - device_index := d.Get("device_index").(int) - instance_id := d.Get("instance_id").(string) - network_interface_id := d.Get("network_interface_id").(string) - - opts := &ec2.AttachNetworkInterfaceInput{ - DeviceIndex: aws.Int64(int64(device_index)), - InstanceId: aws.String(instance_id), - NetworkInterfaceId: aws.String(network_interface_id), - } - - log.Printf("[DEBUG] Attaching network interface (%s) to instance (%s)", network_interface_id, instance_id) - resp, err := conn.AttachNetworkInterface(opts) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - return fmt.Errorf("Error attaching network interface (%s) to instance (%s), message: \"%s\", code: \"%s\"", - network_interface_id, instance_id, awsErr.Message(), awsErr.Code()) - } - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"false"}, - Target: []string{"true"}, - Refresh: networkInterfaceAttachmentRefreshFunc(conn, network_interface_id), - Timeout: 5 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Volume (%s) to attach to Instance: %s, error: %s", network_interface_id, instance_id, err) - } - - d.SetId(*resp.AttachmentId) - return resourceAwsNetworkInterfaceAttachmentRead(d, meta) -} - -func resourceAwsNetworkInterfaceAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - interfaceId := d.Get("network_interface_id").(string) - - req := &ec2.DescribeNetworkInterfacesInput{ - NetworkInterfaceIds: []*string{aws.String(interfaceId)}, - } - - resp, err := conn.DescribeNetworkInterfaces(req) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidNetworkInterfaceID.NotFound" { - // The ENI is gone now, so just remove the attachment from the state - d.SetId("") - return nil - } - - return fmt.Errorf("Error retrieving ENI: %s", err) - } - if len(resp.NetworkInterfaces) != 1 { - return fmt.Errorf("Unable to find ENI (%s): %#v", interfaceId, resp.NetworkInterfaces) - } - - eni := resp.NetworkInterfaces[0] - - if eni.Attachment == nil { - // Interface is no longer attached, remove from state - d.SetId("") - return nil - } - - d.Set("attachment_id", eni.Attachment.AttachmentId) - d.Set("device_index", eni.Attachment.DeviceIndex) - d.Set("instance_id", eni.Attachment.InstanceId) - d.Set("network_interface_id", eni.NetworkInterfaceId) - d.Set("status", eni.Attachment.Status) - - return nil -} - -func resourceAwsNetworkInterfaceAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - interfaceId := d.Get("network_interface_id").(string) - - detach_request := &ec2.DetachNetworkInterfaceInput{ - AttachmentId: aws.String(d.Id()), - Force: aws.Bool(true), - } - - _, detach_err := conn.DetachNetworkInterface(detach_request) - if detach_err != nil { - if awsErr, _ := detach_err.(awserr.Error); awsErr.Code() != "InvalidAttachmentID.NotFound" { - return fmt.Errorf("Error detaching ENI: %s", detach_err) - } - } - - log.Printf("[DEBUG] Waiting for ENI (%s) to become detached", interfaceId) - stateConf := &resource.StateChangeConf{ - Pending: []string{"true"}, - Target: []string{"false"}, - Refresh: networkInterfaceAttachmentRefreshFunc(conn, interfaceId), - Timeout: 10 * time.Minute, - } - - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for ENI (%s) to become detached: %s", interfaceId, err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_sg_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_sg_attachment.go deleted file mode 100644 index 1ac647697..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_sg_attachment.go +++ /dev/null @@ -1,182 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "reflect" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsNetworkInterfaceSGAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsNetworkInterfaceSGAttachmentCreate, - Read: resourceAwsNetworkInterfaceSGAttachmentRead, - Delete: resourceAwsNetworkInterfaceSGAttachmentDelete, - Schema: map[string]*schema.Schema{ - "security_group_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "network_interface_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsNetworkInterfaceSGAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - mk := "network_interface_sg_attachment_" + d.Get("network_interface_id").(string) - awsMutexKV.Lock(mk) - defer awsMutexKV.Unlock(mk) - - sgID := d.Get("security_group_id").(string) - interfaceID := d.Get("network_interface_id").(string) - - conn := meta.(*AWSClient).ec2conn - - // Fetch the network interface we will be working with. - iface, err := fetchNetworkInterface(conn, interfaceID) - if err != nil { - return err - } - - // Add the security group to the network interface. - log.Printf("[DEBUG] Attaching security group %s to network interface ID %s", sgID, interfaceID) - - if sgExistsInENI(sgID, iface) { - return fmt.Errorf("security group %s already attached to interface ID %s", sgID, *iface.NetworkInterfaceId) - } - var groupIDs []string - for _, v := range iface.Groups { - groupIDs = append(groupIDs, *v.GroupId) - } - groupIDs = append(groupIDs, sgID) - params := &ec2.ModifyNetworkInterfaceAttributeInput{ - NetworkInterfaceId: iface.NetworkInterfaceId, - Groups: aws.StringSlice(groupIDs), - } - - _, err = conn.ModifyNetworkInterfaceAttribute(params) - if err != nil { - return err - } - - log.Printf("[DEBUG] Successful attachment of security group %s to network interface ID %s", sgID, interfaceID) - - return resourceAwsNetworkInterfaceSGAttachmentRead(d, meta) -} - -func resourceAwsNetworkInterfaceSGAttachmentRead(d *schema.ResourceData, meta interface{}) error { - sgID := d.Get("security_group_id").(string) - interfaceID := d.Get("network_interface_id").(string) - - log.Printf("[DEBUG] Checking association of security group %s to network interface ID %s", sgID, interfaceID) - - conn := meta.(*AWSClient).ec2conn - - iface, err := fetchNetworkInterface(conn, interfaceID) - - if isAWSErr(err, "InvalidNetworkInterfaceID.NotFound", "") { - log.Printf("[WARN] EC2 Network Interface (%s) not found, removing from state", interfaceID) - d.SetId("") - return nil - } - - if err != nil { - return err - } - - if sgExistsInENI(sgID, iface) { - d.SetId(fmt.Sprintf("%s_%s", sgID, interfaceID)) - } else { - // The association does not exist when it should, taint this resource. - log.Printf("[WARN] Security group %s not associated with network interface ID %s, tainting", sgID, interfaceID) - d.SetId("") - } - return nil -} - -func resourceAwsNetworkInterfaceSGAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - mk := "network_interface_sg_attachment_" + d.Get("network_interface_id").(string) - awsMutexKV.Lock(mk) - defer awsMutexKV.Unlock(mk) - - sgID := d.Get("security_group_id").(string) - interfaceID := d.Get("network_interface_id").(string) - - log.Printf("[DEBUG] Removing security group %s from interface ID %s", sgID, interfaceID) - - conn := meta.(*AWSClient).ec2conn - - iface, err := fetchNetworkInterface(conn, interfaceID) - - if isAWSErr(err, "InvalidNetworkInterfaceID.NotFound", "") { - return nil - } - - if err != nil { - return err - } - - return delSGFromENI(conn, sgID, iface) -} - -// fetchNetworkInterface is a utility function used by Read and Delete to fetch -// the full ENI details for a specific interface ID. -func fetchNetworkInterface(conn *ec2.EC2, ifaceID string) (*ec2.NetworkInterface, error) { - log.Printf("[DEBUG] Fetching information for interface ID %s", ifaceID) - dniParams := &ec2.DescribeNetworkInterfacesInput{ - NetworkInterfaceIds: aws.StringSlice([]string{ifaceID}), - } - - dniResp, err := conn.DescribeNetworkInterfaces(dniParams) - if err != nil { - return nil, err - } - return dniResp.NetworkInterfaces[0], nil -} - -func delSGFromENI(conn *ec2.EC2, sgID string, iface *ec2.NetworkInterface) error { - old := iface.Groups - var new []*string - for _, v := range iface.Groups { - if *v.GroupId == sgID { - continue - } - new = append(new, v.GroupId) - } - if reflect.DeepEqual(old, new) { - // The interface already didn't have the security group, nothing to do - return nil - } - - params := &ec2.ModifyNetworkInterfaceAttributeInput{ - NetworkInterfaceId: iface.NetworkInterfaceId, - Groups: new, - } - - _, err := conn.ModifyNetworkInterfaceAttribute(params) - - if isAWSErr(err, "InvalidNetworkInterfaceID.NotFound", "") { - return nil - } - - return err -} - -// sgExistsInENI is a utility function that can be used to quickly check to -// see if a security group exists in an *ec2.NetworkInterface. -func sgExistsInENI(sgID string, iface *ec2.NetworkInterface) bool { - for _, v := range iface.Groups { - if *v.GroupId == sgID { - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go deleted file mode 100644 index ef983b6a4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go +++ /dev/null @@ -1,620 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/opsworks" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsOpsworksApplication() *schema.Resource { - return &schema.Resource{ - - Create: resourceAwsOpsworksApplicationCreate, - Read: resourceAwsOpsworksApplicationRead, - Update: resourceAwsOpsworksApplicationUpdate, - Delete: resourceAwsOpsworksApplicationDelete, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "short_name": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - opsworks.AppTypeAwsFlowRuby, - opsworks.AppTypeJava, - opsworks.AppTypeRails, - opsworks.AppTypePhp, - opsworks.AppTypeNodejs, - opsworks.AppTypeStatic, - opsworks.AppTypeOther, - }, false), - }, - "stack_id": { - Type: schema.TypeString, - Required: true, - }, - // TODO: the following 4 vals are really part of the Attributes array. We should validate that only ones relevant to the chosen type are set, perhaps. (what is the default type? how do they map?) - "document_root": { - Type: schema.TypeString, - Optional: true, - //Default: "public", - }, - "rails_env": { - Type: schema.TypeString, - Optional: true, - //Default: "production", - }, - "auto_bundle_on_deploy": { - Type: schema.TypeString, - Optional: true, - //Default: true, - }, - "aws_flow_ruby_settings": { - Type: schema.TypeString, - Optional: true, - }, - "app_source": { - Type: schema.TypeList, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - - "url": { - Type: schema.TypeString, - Optional: true, - }, - - "username": { - Type: schema.TypeString, - Optional: true, - }, - - "password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - - "revision": { - Type: schema.TypeString, - Optional: true, - }, - - "ssh_key": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - // AutoSelectOpsworksMysqlInstance, OpsworksMysqlInstance, or RdsDbInstance. - // anything beside auto select will lead into failure in case the instance doesn't exist - // XXX: validation? - "data_source_type": { - Type: schema.TypeString, - Optional: true, - }, - "data_source_database_name": { - Type: schema.TypeString, - Optional: true, - }, - "data_source_arn": { - Type: schema.TypeString, - Optional: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "domains": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "environment": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - "secure": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - }, - }, - }, - "enable_ssl": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "ssl_configuration": { - Type: schema.TypeList, - Optional: true, - //Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "certificate": { - Type: schema.TypeString, - Required: true, - StateFunc: func(v interface{}) string { - switch v.(type) { - case string: - return strings.TrimSpace(v.(string)) - default: - return "" - } - }, - }, - "private_key": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - StateFunc: func(v interface{}) string { - switch v.(type) { - case string: - return strings.TrimSpace(v.(string)) - default: - return "" - } - }, - }, - "chain": { - Type: schema.TypeString, - Optional: true, - StateFunc: func(v interface{}) string { - switch v.(type) { - case string: - return strings.TrimSpace(v.(string)) - default: - return "" - } - }, - }, - }, - }, - }, - }, - } -} - -func resourceAwsOpsworksApplicationValidate(d *schema.ResourceData) error { - appSourceCount := d.Get("app_source.#").(int) - if appSourceCount > 1 { - return fmt.Errorf("Only one app_source is permitted.") - } - - sslCount := d.Get("ssl_configuration.#").(int) - if sslCount > 1 { - return fmt.Errorf("Only one ssl_configuration is permitted.") - } - - if d.Get("type") == opsworks.AppTypeNodejs || d.Get("type") == opsworks.AppTypeJava { - // allowed attributes: none - if d.Get("document_root").(string) != "" || d.Get("rails_env").(string) != "" || d.Get("auto_bundle_on_deploy").(string) != "" || d.Get("aws_flow_ruby_settings").(string) != "" { - return fmt.Errorf("No additional attributes are allowed for app type '%s'.", d.Get("type").(string)) - } - } else if d.Get("type") == opsworks.AppTypeRails { - // allowed attributes: document_root, rails_env, auto_bundle_on_deploy - if d.Get("aws_flow_ruby_settings").(string) != "" { - return fmt.Errorf("Only 'document_root, rails_env, auto_bundle_on_deploy' are allowed for app type '%s'.", opsworks.AppTypeRails) - } - // rails_env is required - if _, ok := d.GetOk("rails_env"); !ok { - return fmt.Errorf("Set rails_env must be set if type is set to rails.") - } - } else if d.Get("type") == opsworks.AppTypePhp || d.Get("type") == opsworks.AppTypeStatic || d.Get("type") == opsworks.AppTypeOther { - log.Printf("[DEBUG] the app type is : %s", d.Get("type").(string)) - log.Printf("[DEBUG] the attributes are: document_root '%s', rails_env '%s', auto_bundle_on_deploy '%s', aws_flow_ruby_settings '%s'", d.Get("document_root").(string), d.Get("rails_env").(string), d.Get("auto_bundle_on_deploy").(string), d.Get("aws_flow_ruby_settings").(string)) - // allowed attributes: document_root - if d.Get("rails_env").(string) != "" || d.Get("auto_bundle_on_deploy").(string) != "" || d.Get("aws_flow_ruby_settings").(string) != "" { - return fmt.Errorf("Only 'document_root' is allowed for app type '%s'.", d.Get("type").(string)) - } - } else if d.Get("type") == opsworks.AppTypeAwsFlowRuby { - // allowed attributes: aws_flow_ruby_settings - if d.Get("document_root").(string) != "" || d.Get("rails_env").(string) != "" || d.Get("auto_bundle_on_deploy").(string) != "" { - return fmt.Errorf("Only 'aws_flow_ruby_settings' is allowed for app type '%s'.", d.Get("type").(string)) - } - } - - return nil -} - -func resourceAwsOpsworksApplicationRead(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - req := &opsworks.DescribeAppsInput{ - AppIds: []*string{ - aws.String(d.Id()), - }, - } - - log.Printf("[DEBUG] Reading OpsWorks app: %s", d.Id()) - - resp, err := client.DescribeApps(req) - if err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "ResourceNotFoundException" { - log.Printf("[INFO] App not found: %s", d.Id()) - d.SetId("") - return nil - } - } - return err - } - - app := resp.Apps[0] - - d.Set("name", app.Name) - d.Set("stack_id", app.StackId) - d.Set("type", app.Type) - d.Set("description", app.Description) - d.Set("domains", flattenStringList(app.Domains)) - d.Set("enable_ssl", app.EnableSsl) - resourceAwsOpsworksSetApplicationSsl(d, app.SslConfiguration) - resourceAwsOpsworksSetApplicationSource(d, app.AppSource) - resourceAwsOpsworksSetApplicationDataSources(d, app.DataSources) - resourceAwsOpsworksSetApplicationEnvironmentVariable(d, app.Environment) - resourceAwsOpsworksSetApplicationAttributes(d, app.Attributes) - return nil -} - -func resourceAwsOpsworksApplicationCreate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - err := resourceAwsOpsworksApplicationValidate(d) - if err != nil { - return err - } - - req := &opsworks.CreateAppInput{ - Name: aws.String(d.Get("name").(string)), - Shortname: aws.String(d.Get("short_name").(string)), - StackId: aws.String(d.Get("stack_id").(string)), - Type: aws.String(d.Get("type").(string)), - Description: aws.String(d.Get("description").(string)), - Domains: expandStringList(d.Get("domains").([]interface{})), - EnableSsl: aws.Bool(d.Get("enable_ssl").(bool)), - SslConfiguration: resourceAwsOpsworksApplicationSsl(d), - AppSource: resourceAwsOpsworksApplicationSource(d), - DataSources: resourceAwsOpsworksApplicationDataSources(d), - Environment: resourceAwsOpsworksApplicationEnvironmentVariable(d), - Attributes: resourceAwsOpsworksApplicationAttributes(d), - } - - var resp *opsworks.CreateAppOutput - err = resource.Retry(2*time.Minute, func() *resource.RetryError { - var cerr error - resp, cerr = client.CreateApp(req) - if cerr != nil { - log.Printf("[INFO] client error") - if opserr, ok := cerr.(awserr.Error); ok { - // XXX: handle errors - log.Printf("[ERROR] OpsWorks error: %s message: %s", opserr.Code(), opserr.Message()) - return resource.RetryableError(cerr) - } - return resource.NonRetryableError(cerr) - } - return nil - }) - - if err != nil { - return err - } - - appID := *resp.AppId - d.SetId(appID) - - return resourceAwsOpsworksApplicationRead(d, meta) -} - -func resourceAwsOpsworksApplicationUpdate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - err := resourceAwsOpsworksApplicationValidate(d) - if err != nil { - return err - } - - req := &opsworks.UpdateAppInput{ - AppId: aws.String(d.Id()), - Name: aws.String(d.Get("name").(string)), - Type: aws.String(d.Get("type").(string)), - Description: aws.String(d.Get("description").(string)), - Domains: expandStringList(d.Get("domains").([]interface{})), - EnableSsl: aws.Bool(d.Get("enable_ssl").(bool)), - SslConfiguration: resourceAwsOpsworksApplicationSsl(d), - AppSource: resourceAwsOpsworksApplicationSource(d), - DataSources: resourceAwsOpsworksApplicationDataSources(d), - Environment: resourceAwsOpsworksApplicationEnvironmentVariable(d), - Attributes: resourceAwsOpsworksApplicationAttributes(d), - } - - log.Printf("[DEBUG] Updating OpsWorks layer: %s", d.Id()) - - err = resource.Retry(2*time.Minute, func() *resource.RetryError { - _, cerr := client.UpdateApp(req) - if cerr != nil { - log.Printf("[INFO] client error") - if opserr, ok := cerr.(awserr.Error); ok { - // XXX: handle errors - log.Printf("[ERROR] OpsWorks error: %s message: %s", opserr.Code(), opserr.Message()) - return resource.NonRetryableError(cerr) - } - return resource.RetryableError(cerr) - } - return nil - }) - - if err != nil { - return err - } - return resourceAwsOpsworksApplicationRead(d, meta) -} - -func resourceAwsOpsworksApplicationDelete(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - req := &opsworks.DeleteAppInput{ - AppId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting OpsWorks application: %s", d.Id()) - - _, err := client.DeleteApp(req) - return err -} - -func resourceAwsOpsworksSetApplicationEnvironmentVariable(d *schema.ResourceData, v []*opsworks.EnvironmentVariable) { - log.Printf("[DEBUG] envs: %s %d", v, len(v)) - if len(v) == 0 { - d.Set("environment", nil) - return - } - newValue := make([]*map[string]interface{}, len(v)) - - for i := 0; i < len(v); i++ { - config := v[i] - data := make(map[string]interface{}) - newValue[i] = &data - - if config.Key != nil { - data["key"] = *config.Key - } - if config.Value != nil { - data["value"] = *config.Value - } - if config.Secure != nil { - - if aws.BoolValue(config.Secure) { - data["secure"] = &opsworksTrueString - } else { - data["secure"] = &opsworksFalseString - } - } - log.Printf("[DEBUG] v: %s", data) - } - - d.Set("environment", newValue) -} - -func resourceAwsOpsworksApplicationEnvironmentVariable(d *schema.ResourceData) []*opsworks.EnvironmentVariable { - environmentVariables := d.Get("environment").(*schema.Set).List() - result := make([]*opsworks.EnvironmentVariable, len(environmentVariables)) - - for i := 0; i < len(environmentVariables); i++ { - env := environmentVariables[i].(map[string]interface{}) - - result[i] = &opsworks.EnvironmentVariable{ - Key: aws.String(env["key"].(string)), - Value: aws.String(env["value"].(string)), - Secure: aws.Bool(env["secure"].(bool)), - } - } - return result -} - -func resourceAwsOpsworksApplicationSource(d *schema.ResourceData) *opsworks.Source { - count := d.Get("app_source.#").(int) - if count == 0 { - return nil - } - - return &opsworks.Source{ - Type: aws.String(d.Get("app_source.0.type").(string)), - Url: aws.String(d.Get("app_source.0.url").(string)), - Username: aws.String(d.Get("app_source.0.username").(string)), - Password: aws.String(d.Get("app_source.0.password").(string)), - Revision: aws.String(d.Get("app_source.0.revision").(string)), - SshKey: aws.String(d.Get("app_source.0.ssh_key").(string)), - } -} - -func resourceAwsOpsworksSetApplicationSource(d *schema.ResourceData, v *opsworks.Source) { - nv := make([]interface{}, 0, 1) - if v != nil { - m := make(map[string]interface{}) - if v.Type != nil { - m["type"] = *v.Type - } - if v.Url != nil { - m["url"] = *v.Url - } - if v.Username != nil { - m["username"] = *v.Username - } - if v.Password != nil { - m["password"] = *v.Password - } - if v.Revision != nil { - m["revision"] = *v.Revision - } - nv = append(nv, m) - } - - err := d.Set("app_source", nv) - if err != nil { - // should never happen - panic(err) - } -} - -func resourceAwsOpsworksApplicationDataSources(d *schema.ResourceData) []*opsworks.DataSource { - arn := d.Get("data_source_arn").(string) - databaseName := d.Get("data_source_database_name").(string) - databaseType := d.Get("data_source_type").(string) - - result := make([]*opsworks.DataSource, 1) - - if len(arn) > 0 || len(databaseName) > 0 || len(databaseType) > 0 { - result[0] = &opsworks.DataSource{ - Arn: aws.String(arn), - DatabaseName: aws.String(databaseName), - Type: aws.String(databaseType), - } - } - return result -} - -func resourceAwsOpsworksSetApplicationDataSources(d *schema.ResourceData, v []*opsworks.DataSource) { - d.Set("data_source_arn", nil) - d.Set("data_source_database_name", nil) - d.Set("data_source_type", nil) - - if len(v) == 0 { - return - } - - d.Set("data_source_arn", v[0].Arn) - d.Set("data_source_database_name", v[0].DatabaseName) - d.Set("data_source_type", v[0].Type) -} - -func resourceAwsOpsworksApplicationSsl(d *schema.ResourceData) *opsworks.SslConfiguration { - count := d.Get("ssl_configuration.#").(int) - if count == 0 { - return nil - } - - return &opsworks.SslConfiguration{ - PrivateKey: aws.String(d.Get("ssl_configuration.0.private_key").(string)), - Certificate: aws.String(d.Get("ssl_configuration.0.certificate").(string)), - Chain: aws.String(d.Get("ssl_configuration.0.chain").(string)), - } -} - -func resourceAwsOpsworksSetApplicationSsl(d *schema.ResourceData, v *opsworks.SslConfiguration) { - nv := make([]interface{}, 0, 1) - set := false - if v != nil { - m := make(map[string]interface{}) - if v.PrivateKey != nil { - m["private_key"] = *v.PrivateKey - set = true - } - if v.Certificate != nil { - m["certificate"] = *v.Certificate - set = true - } - if v.Chain != nil { - m["chain"] = *v.Chain - set = true - } - if set { - nv = append(nv, m) - } - } - - err := d.Set("ssl_configuration", nv) - if err != nil { - // should never happen - panic(err) - } -} - -func resourceAwsOpsworksApplicationAttributes(d *schema.ResourceData) map[string]*string { - attributes := make(map[string]*string) - - if val := d.Get("document_root").(string); len(val) > 0 { - attributes[opsworks.AppAttributesKeysDocumentRoot] = aws.String(val) - } - if val := d.Get("aws_flow_ruby_settings").(string); len(val) > 0 { - attributes[opsworks.AppAttributesKeysAwsFlowRubySettings] = aws.String(val) - } - if val := d.Get("rails_env").(string); len(val) > 0 { - attributes[opsworks.AppAttributesKeysRailsEnv] = aws.String(val) - } - if val := d.Get("auto_bundle_on_deploy").(string); len(val) > 0 { - if val == "1" { - val = "true" - } else if val == "0" { - val = "false" - } - attributes[opsworks.AppAttributesKeysAutoBundleOnDeploy] = aws.String(val) - } - - return attributes -} - -func resourceAwsOpsworksSetApplicationAttributes(d *schema.ResourceData, v map[string]*string) { - d.Set("document_root", nil) - d.Set("rails_env", nil) - d.Set("aws_flow_ruby_settings", nil) - d.Set("auto_bundle_on_deploy", nil) - - if d.Get("type") == opsworks.AppTypeNodejs || d.Get("type") == opsworks.AppTypeJava { - return - } else if d.Get("type") == opsworks.AppTypeRails { - if val, ok := v[opsworks.AppAttributesKeysDocumentRoot]; ok { - d.Set("document_root", val) - } - if val, ok := v[opsworks.AppAttributesKeysRailsEnv]; ok { - d.Set("rails_env", val) - } - if val, ok := v[opsworks.AppAttributesKeysAutoBundleOnDeploy]; ok { - d.Set("auto_bundle_on_deploy", val) - } - return - } else if d.Get("type") == opsworks.AppTypePhp || d.Get("type") == opsworks.AppTypeStatic || d.Get("type") == opsworks.AppTypeOther { - if val, ok := v[opsworks.AppAttributesKeysDocumentRoot]; ok { - d.Set("document_root", val) - } - return - } else if d.Get("type") == opsworks.AppTypeAwsFlowRuby { - if val, ok := v[opsworks.AppAttributesKeysAwsFlowRubySettings]; ok { - d.Set("aws_flow_ruby_settings", val) - } - return - } - -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_custom_layer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_custom_layer.go deleted file mode 100644 index 59de60db6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_custom_layer.go +++ /dev/null @@ -1,17 +0,0 @@ -package aws - -import ( - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsOpsworksCustomLayer() *schema.Resource { - layerType := &opsworksLayerType{ - TypeName: "custom", - CustomShortName: true, - - // The "custom" layer type has no additional attributes - Attributes: map[string]*opsworksLayerTypeAttribute{}, - } - - return layerType.SchemaResource() -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_ganglia_layer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_ganglia_layer.go deleted file mode 100644 index 1aadefe5d..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_ganglia_layer.go +++ /dev/null @@ -1,33 +0,0 @@ -package aws - -import ( - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsOpsworksGangliaLayer() *schema.Resource { - layerType := &opsworksLayerType{ - TypeName: "monitoring-master", - DefaultLayerName: "Ganglia", - - Attributes: map[string]*opsworksLayerTypeAttribute{ - "url": { - AttrName: "GangliaUrl", - Type: schema.TypeString, - Default: "/ganglia", - }, - "username": { - AttrName: "GangliaUser", - Type: schema.TypeString, - Default: "opsworks", - }, - "password": { - AttrName: "GangliaPassword", - Type: schema.TypeString, - Required: true, - WriteOnly: true, - }, - }, - } - - return layerType.SchemaResource() -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_haproxy_layer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_haproxy_layer.go deleted file mode 100644 index 91e843257..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_haproxy_layer.go +++ /dev/null @@ -1,48 +0,0 @@ -package aws - -import ( - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsOpsworksHaproxyLayer() *schema.Resource { - layerType := &opsworksLayerType{ - TypeName: "lb", - DefaultLayerName: "HAProxy", - - Attributes: map[string]*opsworksLayerTypeAttribute{ - "stats_enabled": { - AttrName: "EnableHaproxyStats", - Type: schema.TypeBool, - Default: true, - }, - "stats_url": { - AttrName: "HaproxyStatsUrl", - Type: schema.TypeString, - Default: "/haproxy?stats", - }, - "stats_user": { - AttrName: "HaproxyStatsUser", - Type: schema.TypeString, - Default: "opsworks", - }, - "stats_password": { - AttrName: "HaproxyStatsPassword", - Type: schema.TypeString, - WriteOnly: true, - Required: true, - }, - "healthcheck_url": { - AttrName: "HaproxyHealthCheckUrl", - Type: schema.TypeString, - Default: "/", - }, - "healthcheck_method": { - AttrName: "HaproxyHealthCheckMethod", - Type: schema.TypeString, - Default: "OPTIONS", - }, - }, - } - - return layerType.SchemaResource() -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go deleted file mode 100644 index f89bec61b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go +++ /dev/null @@ -1,1011 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "time" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/opsworks" -) - -func resourceAwsOpsworksInstance() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsOpsworksInstanceCreate, - Read: resourceAwsOpsworksInstanceRead, - Update: resourceAwsOpsworksInstanceUpdate, - Delete: resourceAwsOpsworksInstanceDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsOpsworksInstanceImport, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - Update: schema.DefaultTimeout(10 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "agent_version": { - Type: schema.TypeString, - Optional: true, - Default: "INHERIT", - }, - - "ami_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "architecture": { - Type: schema.TypeString, - Optional: true, - Default: "x86_64", - ValidateFunc: validation.StringInSlice([]string{ - opsworks.ArchitectureX8664, - opsworks.ArchitectureI386, - }, false), - }, - - "auto_scaling_type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - opsworks.AutoScalingTypeLoad, - opsworks.AutoScalingTypeTimer, - }, false), - }, - - "availability_zone": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "created_at": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "delete_ebs": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "delete_eip": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "ebs_optimized": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - - "ec2_instance_id": { - Type: schema.TypeString, - Computed: true, - }, - - "ecs_cluster_arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "elastic_ip": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "hostname": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "infrastructure_class": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "install_updates_on_boot": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "instance_profile_arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "instance_type": { - Type: schema.TypeString, - Optional: true, - }, - - "last_service_error_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "layer_ids": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "os": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "platform": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "private_dns": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "private_ip": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "public_dns": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "public_ip": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "registered_by": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "reported_agent_version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "reported_os_family": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "reported_os_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "reported_os_version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "root_device_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - opsworks.RootDeviceTypeEbs, - opsworks.RootDeviceTypeInstanceStore, - }, false), - }, - - "root_device_volume_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "security_group_ids": { - Type: schema.TypeList, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "ssh_host_dsa_key_fingerprint": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "ssh_host_rsa_key_fingerprint": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "ssh_key_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "stack_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "state": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - "running", - "stopped", - }, false), - }, - - "status": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "subnet_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "tenancy": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - "dedicated", - "default", - "host", - }, false), - }, - - "virtualization_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - opsworks.VirtualizationTypeParavirtual, - opsworks.VirtualizationTypeHvm, - }, false), - }, - - "ebs_block_device": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Optional: true, - Default: true, - ForceNew: true, - }, - - "device_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "iops": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "snapshot_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "volume_size": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "volume_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["device_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["snapshot_id"].(string))) - return hashcode.String(buf.String()) - }, - }, - "ephemeral_block_device": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "device_name": { - Type: schema.TypeString, - Required: true, - }, - - "virtual_name": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["device_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["virtual_name"].(string))) - return hashcode.String(buf.String()) - }, - }, - - "root_block_device": { - // TODO: This is a set because we don't support singleton - // sub-resources today. We'll enforce that the set only ever has - // length zero or one below. When TF gains support for - // sub-resources this can be converted. - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Resource{ - // "You can only modify the volume size, volume type, and Delete on - // Termination flag on the block device mapping entry for the root - // device volume." - bit.ly/ec2bdmap - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Optional: true, - Default: true, - ForceNew: true, - }, - - "iops": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "volume_size": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "volume_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - }, - }, - Set: func(v interface{}) int { - // there can be only one root device; no need to hash anything - return 0 - }, - }, - }, - } -} - -func resourceAwsOpsworksInstanceValidate(d *schema.ResourceData) error { - if d.HasChange("ami_id") { - if v, ok := d.GetOk("os"); ok { - if v.(string) != "Custom" { - return fmt.Errorf("OS must be \"Custom\" when using using a custom ami_id") - } - } - - if _, ok := d.GetOk("root_block_device"); ok { - return fmt.Errorf("Cannot specify root_block_device when using a custom ami_id.") - } - - if _, ok := d.GetOk("ebs_block_device"); ok { - return fmt.Errorf("Cannot specify ebs_block_device when using a custom ami_id.") - } - - if _, ok := d.GetOk("ephemeral_block_device"); ok { - return fmt.Errorf("Cannot specify ephemeral_block_device when using a custom ami_id.") - } - } - return nil -} - -func resourceAwsOpsworksInstanceRead(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - req := &opsworks.DescribeInstancesInput{ - InstanceIds: []*string{ - aws.String(d.Id()), - }, - } - - log.Printf("[DEBUG] Reading OpsWorks instance: %s", d.Id()) - - resp, err := client.DescribeInstances(req) - if err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "ResourceNotFoundException" { - d.SetId("") - return nil - } - } - return err - } - - // If nothing was found, then return no state - if len(resp.Instances) == 0 { - d.SetId("") - return nil - } - instance := resp.Instances[0] - - if instance.InstanceId == nil { - d.SetId("") - return nil - } - instanceId := *instance.InstanceId - - d.SetId(instanceId) - d.Set("agent_version", instance.AgentVersion) - d.Set("ami_id", instance.AmiId) - d.Set("architecture", instance.Architecture) - d.Set("auto_scaling_type", instance.AutoScalingType) - d.Set("availability_zone", instance.AvailabilityZone) - d.Set("created_at", instance.CreatedAt) - d.Set("ebs_optimized", instance.EbsOptimized) - d.Set("ec2_instance_id", instance.Ec2InstanceId) - d.Set("ecs_cluster_arn", instance.EcsClusterArn) - d.Set("elastic_ip", instance.ElasticIp) - d.Set("hostname", instance.Hostname) - d.Set("infrastructure_class", instance.InfrastructureClass) - d.Set("install_updates_on_boot", instance.InstallUpdatesOnBoot) - d.Set("instance_profile_arn", instance.InstanceProfileArn) - d.Set("instance_type", instance.InstanceType) - d.Set("last_service_error_id", instance.LastServiceErrorId) - var layerIds []string - for _, v := range instance.LayerIds { - layerIds = append(layerIds, *v) - } - layerIds, err = sortListBasedonTFFile(layerIds, d) - if err != nil { - return fmt.Errorf("Error sorting layer_ids attribute: %#v", err) - } - if err := d.Set("layer_ids", layerIds); err != nil { - return fmt.Errorf("Error setting layer_ids attribute: %#v, error: %#v", layerIds, err) - } - d.Set("os", instance.Os) - d.Set("platform", instance.Platform) - d.Set("private_dns", instance.PrivateDns) - d.Set("private_ip", instance.PrivateIp) - d.Set("public_dns", instance.PublicDns) - d.Set("public_ip", instance.PublicIp) - d.Set("registered_by", instance.RegisteredBy) - d.Set("reported_agent_version", instance.ReportedAgentVersion) - d.Set("reported_os_family", instance.ReportedOs.Family) - d.Set("reported_os_name", instance.ReportedOs.Name) - d.Set("reported_os_version", instance.ReportedOs.Version) - d.Set("root_device_type", instance.RootDeviceType) - d.Set("root_device_volume_id", instance.RootDeviceVolumeId) - d.Set("ssh_host_dsa_key_fingerprint", instance.SshHostDsaKeyFingerprint) - d.Set("ssh_host_rsa_key_fingerprint", instance.SshHostRsaKeyFingerprint) - d.Set("ssh_key_name", instance.SshKeyName) - d.Set("stack_id", instance.StackId) - d.Set("status", instance.Status) - d.Set("subnet_id", instance.SubnetId) - d.Set("tenancy", instance.Tenancy) - d.Set("virtualization_type", instance.VirtualizationType) - - // Read BlockDeviceMapping - ibds, err := readOpsworksBlockDevices(instance) - if err != nil { - return err - } - - if err := d.Set("ebs_block_device", ibds["ebs"]); err != nil { - return err - } - if err := d.Set("ephemeral_block_device", ibds["ephemeral"]); err != nil { - return err - } - if ibds["root"] != nil { - if err := d.Set("root_block_device", []interface{}{ibds["root"]}); err != nil { - return err - } - } else { - d.Set("root_block_device", []interface{}{}) - } - - // Read Security Groups - sgs := make([]string, 0, len(instance.SecurityGroupIds)) - for _, sg := range instance.SecurityGroupIds { - sgs = append(sgs, *sg) - } - err1 := d.Set("security_group_ids", sgs) - return err1 -} - -func resourceAwsOpsworksInstanceCreate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - err := resourceAwsOpsworksInstanceValidate(d) - if err != nil { - return err - } - - req := &opsworks.CreateInstanceInput{ - AgentVersion: aws.String(d.Get("agent_version").(string)), - Architecture: aws.String(d.Get("architecture").(string)), - EbsOptimized: aws.Bool(d.Get("ebs_optimized").(bool)), - InstallUpdatesOnBoot: aws.Bool(d.Get("install_updates_on_boot").(bool)), - InstanceType: aws.String(d.Get("instance_type").(string)), - LayerIds: expandStringList(d.Get("layer_ids").([]interface{})), - StackId: aws.String(d.Get("stack_id").(string)), - } - - if v, ok := d.GetOk("ami_id"); ok { - req.AmiId = aws.String(v.(string)) - req.Os = aws.String("Custom") - } - - if v, ok := d.GetOk("auto_scaling_type"); ok { - req.AutoScalingType = aws.String(v.(string)) - } - - if v, ok := d.GetOk("availability_zone"); ok { - req.AvailabilityZone = aws.String(v.(string)) - } - - if v, ok := d.GetOk("hostname"); ok { - req.Hostname = aws.String(v.(string)) - } - - if v, ok := d.GetOk("os"); ok { - req.Os = aws.String(v.(string)) - } - - if v, ok := d.GetOk("root_device_type"); ok { - req.RootDeviceType = aws.String(v.(string)) - } - - if v, ok := d.GetOk("ssh_key_name"); ok { - req.SshKeyName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("subnet_id"); ok { - req.SubnetId = aws.String(v.(string)) - } - - if v, ok := d.GetOk("tenancy"); ok { - req.Tenancy = aws.String(v.(string)) - } - - if v, ok := d.GetOk("virtualization_type"); ok { - req.VirtualizationType = aws.String(v.(string)) - } - - var blockDevices []*opsworks.BlockDeviceMapping - - if v, ok := d.GetOk("ebs_block_device"); ok { - vL := v.(*schema.Set).List() - for _, v := range vL { - bd := v.(map[string]interface{}) - ebs := &opsworks.EbsBlockDevice{ - DeleteOnTermination: aws.Bool(bd["delete_on_termination"].(bool)), - } - - if v, ok := bd["snapshot_id"].(string); ok && v != "" { - ebs.SnapshotId = aws.String(v) - } - - if v, ok := bd["volume_size"].(int); ok && v != 0 { - ebs.VolumeSize = aws.Int64(int64(v)) - } - - if v, ok := bd["volume_type"].(string); ok && v != "" { - ebs.VolumeType = aws.String(v) - } - - if v, ok := bd["iops"].(int); ok && v > 0 { - ebs.Iops = aws.Int64(int64(v)) - } - - blockDevices = append(blockDevices, &opsworks.BlockDeviceMapping{ - DeviceName: aws.String(bd["device_name"].(string)), - Ebs: ebs, - }) - } - } - - if v, ok := d.GetOk("ephemeral_block_device"); ok { - vL := v.(*schema.Set).List() - for _, v := range vL { - bd := v.(map[string]interface{}) - blockDevices = append(blockDevices, &opsworks.BlockDeviceMapping{ - DeviceName: aws.String(bd["device_name"].(string)), - VirtualName: aws.String(bd["virtual_name"].(string)), - }) - } - } - - if v, ok := d.GetOk("root_block_device"); ok { - vL := v.(*schema.Set).List() - if len(vL) > 1 { - return fmt.Errorf("Cannot specify more than one root_block_device.") - } - for _, v := range vL { - bd := v.(map[string]interface{}) - ebs := &opsworks.EbsBlockDevice{ - DeleteOnTermination: aws.Bool(bd["delete_on_termination"].(bool)), - } - - if v, ok := bd["volume_size"].(int); ok && v != 0 { - ebs.VolumeSize = aws.Int64(int64(v)) - } - - if v, ok := bd["volume_type"].(string); ok && v != "" { - ebs.VolumeType = aws.String(v) - } - - if v, ok := bd["iops"].(int); ok && v > 0 { - ebs.Iops = aws.Int64(int64(v)) - } - - blockDevices = append(blockDevices, &opsworks.BlockDeviceMapping{ - DeviceName: aws.String("ROOT_DEVICE"), - Ebs: ebs, - }) - } - } - - if len(blockDevices) > 0 { - req.BlockDeviceMappings = blockDevices - } - - log.Printf("[DEBUG] Creating OpsWorks instance") - - var resp *opsworks.CreateInstanceOutput - - resp, err = client.CreateInstance(req) - if err != nil { - return err - } - - if resp.InstanceId == nil { - return fmt.Errorf("Error launching instance: no instance returned in response") - } - - instanceId := *resp.InstanceId - d.SetId(instanceId) - - if v, ok := d.GetOk("state"); ok && v.(string) == "running" { - err := startOpsworksInstance(d, meta, true, d.Timeout(schema.TimeoutCreate)) - if err != nil { - return err - } - } - - return resourceAwsOpsworksInstanceRead(d, meta) -} - -func resourceAwsOpsworksInstanceUpdate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - err := resourceAwsOpsworksInstanceValidate(d) - if err != nil { - return err - } - - req := &opsworks.UpdateInstanceInput{ - InstanceId: aws.String(d.Id()), - AgentVersion: aws.String(d.Get("agent_version").(string)), - Architecture: aws.String(d.Get("architecture").(string)), - InstallUpdatesOnBoot: aws.Bool(d.Get("install_updates_on_boot").(bool)), - } - - if v, ok := d.GetOk("ami_id"); ok { - req.AmiId = aws.String(v.(string)) - req.Os = aws.String("Custom") - } - - if v, ok := d.GetOk("auto_scaling_type"); ok { - req.AutoScalingType = aws.String(v.(string)) - } - - if v, ok := d.GetOk("hostname"); ok { - req.Hostname = aws.String(v.(string)) - } - - if v, ok := d.GetOk("instance_type"); ok { - req.InstanceType = aws.String(v.(string)) - } - - if v, ok := d.GetOk("layer_ids"); ok { - req.LayerIds = expandStringList(v.([]interface{})) - } - - if v, ok := d.GetOk("os"); ok { - req.Os = aws.String(v.(string)) - } - - if v, ok := d.GetOk("ssh_key_name"); ok { - req.SshKeyName = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Updating OpsWorks instance: %s", d.Id()) - - _, err = client.UpdateInstance(req) - if err != nil { - return err - } - - var status string - - if v, ok := d.GetOk("status"); ok { - status = v.(string) - } else { - status = "stopped" - } - - if v, ok := d.GetOk("state"); ok { - state := v.(string) - if state == "running" { - if status == "stopped" || status == "stopping" || status == "shutting_down" { - err := startOpsworksInstance(d, meta, false, d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return err - } - } - } else { - if status != "stopped" && status != "stopping" && status != "shutting_down" { - err := stopOpsworksInstance(d, meta, d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return err - } - } - } - } - - return resourceAwsOpsworksInstanceRead(d, meta) -} - -func resourceAwsOpsworksInstanceDelete(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - if v, ok := d.GetOk("status"); ok && v.(string) != "stopped" { - err := stopOpsworksInstance(d, meta, d.Timeout(schema.TimeoutDelete)) - if err != nil { - return err - } - } - - req := &opsworks.DeleteInstanceInput{ - InstanceId: aws.String(d.Id()), - DeleteElasticIp: aws.Bool(d.Get("delete_eip").(bool)), - DeleteVolumes: aws.Bool(d.Get("delete_ebs").(bool)), - } - - log.Printf("[DEBUG] Deleting OpsWorks instance: %s", d.Id()) - - _, err := client.DeleteInstance(req) - return err -} - -func resourceAwsOpsworksInstanceImport( - d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - // Neither delete_eip nor delete_ebs can be fetched - // from any API call, so we need to default to the values - // we set in the schema by default - d.Set("delete_ebs", true) - d.Set("delete_eip", true) - return []*schema.ResourceData{d}, nil -} - -func startOpsworksInstance(d *schema.ResourceData, meta interface{}, wait bool, timeout time.Duration) error { - client := meta.(*AWSClient).opsworksconn - - instanceId := d.Id() - - req := &opsworks.StartInstanceInput{ - InstanceId: aws.String(instanceId), - } - - log.Printf("[DEBUG] Starting OpsWorks instance: %s", instanceId) - - _, err := client.StartInstance(req) - - if err != nil { - return err - } - - if wait { - log.Printf("[DEBUG] Waiting for instance (%s) to become running", instanceId) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"requested", "pending", "booting", "running_setup"}, - Target: []string{"online"}, - Refresh: OpsworksInstanceStateRefreshFunc(client, instanceId), - Timeout: timeout, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for instance (%s) to become stopped: %s", - instanceId, err) - } - } - - return nil -} - -func stopOpsworksInstance(d *schema.ResourceData, meta interface{}, timeout time.Duration) error { - client := meta.(*AWSClient).opsworksconn - - instanceId := d.Id() - - req := &opsworks.StopInstanceInput{ - InstanceId: aws.String(instanceId), - } - - log.Printf("[DEBUG] Stopping OpsWorks instance: %s", instanceId) - - _, err := client.StopInstance(req) - - if err != nil { - return err - } - - log.Printf("[DEBUG] Waiting for instance (%s) to become stopped", instanceId) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"stopping", "terminating", "shutting_down", "terminated"}, - Target: []string{"stopped"}, - Refresh: OpsworksInstanceStateRefreshFunc(client, instanceId), - Timeout: timeout, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for instance (%s) to become stopped: %s", - instanceId, err) - } - - return nil -} - -func readOpsworksBlockDevices(instance *opsworks.Instance) (map[string]interface{}, error) { - - blockDevices := make(map[string]interface{}) - blockDevices["ebs"] = make([]map[string]interface{}, 0) - blockDevices["ephemeral"] = make([]map[string]interface{}, 0) - blockDevices["root"] = nil - - if len(instance.BlockDeviceMappings) == 0 { - return nil, nil - } - - for _, bdm := range instance.BlockDeviceMappings { - bd := make(map[string]interface{}) - if bdm.Ebs != nil && bdm.Ebs.DeleteOnTermination != nil { - bd["delete_on_termination"] = *bdm.Ebs.DeleteOnTermination - } - if bdm.Ebs != nil && bdm.Ebs.VolumeSize != nil { - bd["volume_size"] = *bdm.Ebs.VolumeSize - } - if bdm.Ebs != nil && bdm.Ebs.VolumeType != nil { - bd["volume_type"] = *bdm.Ebs.VolumeType - } - if bdm.Ebs != nil && bdm.Ebs.Iops != nil { - bd["iops"] = *bdm.Ebs.Iops - } - if bdm.DeviceName != nil && *bdm.DeviceName == "ROOT_DEVICE" { - blockDevices["root"] = bd - } else { - if bdm.DeviceName != nil { - bd["device_name"] = *bdm.DeviceName - } - if bdm.VirtualName != nil { - bd["virtual_name"] = *bdm.VirtualName - blockDevices["ephemeral"] = append(blockDevices["ephemeral"].([]map[string]interface{}), bd) - } else { - if bdm.Ebs != nil && bdm.Ebs.SnapshotId != nil { - bd["snapshot_id"] = *bdm.Ebs.SnapshotId - } - blockDevices["ebs"] = append(blockDevices["ebs"].([]map[string]interface{}), bd) - } - } - } - return blockDevices, nil -} - -func OpsworksInstanceStateRefreshFunc(conn *opsworks.OpsWorks, instanceID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeInstances(&opsworks.DescribeInstancesInput{ - InstanceIds: []*string{aws.String(instanceID)}, - }) - if err != nil { - if awserr, ok := err.(awserr.Error); ok && awserr.Code() == "ResourceNotFoundException" { - // Set this to nil as if we didn't find anything. - resp = nil - } else { - log.Printf("Error on OpsworksInstanceStateRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil || len(resp.Instances) == 0 { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - i := resp.Instances[0] - return i, *i.Status, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_java_app_layer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_java_app_layer.go deleted file mode 100644 index 14679658f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_java_app_layer.go +++ /dev/null @@ -1,42 +0,0 @@ -package aws - -import ( - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsOpsworksJavaAppLayer() *schema.Resource { - layerType := &opsworksLayerType{ - TypeName: "java-app", - DefaultLayerName: "Java App Server", - - Attributes: map[string]*opsworksLayerTypeAttribute{ - "jvm_type": { - AttrName: "Jvm", - Type: schema.TypeString, - Default: "openjdk", - }, - "jvm_version": { - AttrName: "JvmVersion", - Type: schema.TypeString, - Default: "7", - }, - "jvm_options": { - AttrName: "JvmOptions", - Type: schema.TypeString, - Default: "", - }, - "app_server": { - AttrName: "JavaAppServer", - Type: schema.TypeString, - Default: "tomcat", - }, - "app_server_version": { - AttrName: "JavaAppServerVersion", - Type: schema.TypeString, - Default: "7", - }, - }, - } - - return layerType.SchemaResource() -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_memcached_layer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_memcached_layer.go deleted file mode 100644 index 301d73924..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_memcached_layer.go +++ /dev/null @@ -1,22 +0,0 @@ -package aws - -import ( - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsOpsworksMemcachedLayer() *schema.Resource { - layerType := &opsworksLayerType{ - TypeName: "memcached", - DefaultLayerName: "Memcached", - - Attributes: map[string]*opsworksLayerTypeAttribute{ - "allocated_memory": { - AttrName: "MemcachedMemory", - Type: schema.TypeInt, - Default: 512, - }, - }, - } - - return layerType.SchemaResource() -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_mysql_layer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_mysql_layer.go deleted file mode 100644 index 560641a4e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_mysql_layer.go +++ /dev/null @@ -1,27 +0,0 @@ -package aws - -import ( - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsOpsworksMysqlLayer() *schema.Resource { - layerType := &opsworksLayerType{ - TypeName: "db-master", - DefaultLayerName: "MySQL", - - Attributes: map[string]*opsworksLayerTypeAttribute{ - "root_password": { - AttrName: "MysqlRootPassword", - Type: schema.TypeString, - WriteOnly: true, - }, - "root_password_on_all_instances": { - AttrName: "MysqlRootPasswordUbiquitous", - Type: schema.TypeBool, - Default: true, - }, - }, - } - - return layerType.SchemaResource() -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_nodejs_app_layer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_nodejs_app_layer.go deleted file mode 100644 index d11261b63..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_nodejs_app_layer.go +++ /dev/null @@ -1,22 +0,0 @@ -package aws - -import ( - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsOpsworksNodejsAppLayer() *schema.Resource { - layerType := &opsworksLayerType{ - TypeName: "nodejs-app", - DefaultLayerName: "Node.js App Server", - - Attributes: map[string]*opsworksLayerTypeAttribute{ - "nodejs_version": { - AttrName: "NodejsVersion", - Type: schema.TypeString, - Default: "0.10.38", - }, - }, - } - - return layerType.SchemaResource() -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_permission.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_permission.go deleted file mode 100644 index 22d998386..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_permission.go +++ /dev/null @@ -1,143 +0,0 @@ -package aws - -import ( - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/opsworks" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsOpsworksPermission() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsOpsworksSetPermission, - Update: resourceAwsOpsworksSetPermission, - Delete: resourceAwsOpsworksPermissionDelete, - Read: resourceAwsOpsworksPermissionRead, - - Schema: map[string]*schema.Schema{ - "allow_ssh": { - Type: schema.TypeBool, - Computed: true, - Optional: true, - }, - "allow_sudo": { - Type: schema.TypeBool, - Computed: true, - Optional: true, - }, - "user_arn": { - Type: schema.TypeString, - Required: true, - }, - "level": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - "deny", - "show", - "deploy", - "manage", - "iam_only", - }, false), - }, - "stack_id": { - Type: schema.TypeString, - Computed: true, - Optional: true, - }, - }, - } -} - -func resourceAwsOpsworksPermissionDelete(d *schema.ResourceData, meta interface{}) error { - return nil -} - -func resourceAwsOpsworksPermissionRead(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - req := &opsworks.DescribePermissionsInput{ - IamUserArn: aws.String(d.Get("user_arn").(string)), - StackId: aws.String(d.Get("stack_id").(string)), - } - - log.Printf("[DEBUG] Reading OpsWorks prermissions for: %s on stack: %s", d.Get("user_arn"), d.Get("stack_id")) - - resp, err := client.DescribePermissions(req) - if err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "ResourceNotFoundException" { - log.Printf("[INFO] Permission not found") - d.SetId("") - return nil - } - } - return err - } - - found := false - id := "" - for _, permission := range resp.Permissions { - id = *permission.IamUserArn + *permission.StackId - - if d.Get("user_arn").(string)+d.Get("stack_id").(string) == id { - found = true - d.SetId(id) - d.Set("allow_ssh", permission.AllowSsh) - d.Set("allow_sudo", permission.AllowSudo) - d.Set("user_arn", permission.IamUserArn) - d.Set("stack_id", permission.StackId) - d.Set("level", permission.Level) - } - - } - - if !found { - d.SetId("") - log.Printf("[INFO] The correct permission could not be found for: %s on stack: %s", d.Get("user_arn"), d.Get("stack_id")) - } - - return nil -} - -func resourceAwsOpsworksSetPermission(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - req := &opsworks.SetPermissionInput{ - AllowSudo: aws.Bool(d.Get("allow_sudo").(bool)), - AllowSsh: aws.Bool(d.Get("allow_ssh").(bool)), - IamUserArn: aws.String(d.Get("user_arn").(string)), - StackId: aws.String(d.Get("stack_id").(string)), - } - - if v, ok := d.GetOk("level"); ok { - req.Level = aws.String(v.(string)) - } - - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var cerr error - _, cerr = client.SetPermission(req) - if cerr != nil { - log.Printf("[INFO] client error") - if opserr, ok := cerr.(awserr.Error); ok { - // XXX: handle errors - log.Printf("[ERROR] OpsWorks error: %s message: %s", opserr.Code(), opserr.Message()) - return resource.RetryableError(cerr) - } - return resource.NonRetryableError(cerr) - } - return nil - }) - - if err != nil { - return err - } - - return resourceAwsOpsworksPermissionRead(d, meta) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_php_app_layer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_php_app_layer.go deleted file mode 100644 index c3176af5b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_php_app_layer.go +++ /dev/null @@ -1,16 +0,0 @@ -package aws - -import ( - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsOpsworksPhpAppLayer() *schema.Resource { - layerType := &opsworksLayerType{ - TypeName: "php-app", - DefaultLayerName: "PHP App Server", - - Attributes: map[string]*opsworksLayerTypeAttribute{}, - } - - return layerType.SchemaResource() -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rails_app_layer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rails_app_layer.go deleted file mode 100644 index 55f869c6d..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rails_app_layer.go +++ /dev/null @@ -1,47 +0,0 @@ -package aws - -import ( - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsOpsworksRailsAppLayer() *schema.Resource { - layerType := &opsworksLayerType{ - TypeName: "rails-app", - DefaultLayerName: "Rails App Server", - - Attributes: map[string]*opsworksLayerTypeAttribute{ - "ruby_version": { - AttrName: "RubyVersion", - Type: schema.TypeString, - Default: "2.0.0", - }, - "app_server": { - AttrName: "RailsStack", - Type: schema.TypeString, - Default: "apache_passenger", - }, - "passenger_version": { - AttrName: "PassengerVersion", - Type: schema.TypeString, - Default: "4.0.46", - }, - "rubygems_version": { - AttrName: "RubygemsVersion", - Type: schema.TypeString, - Default: "2.2.2", - }, - "manage_bundler": { - AttrName: "ManageBundler", - Type: schema.TypeBool, - Default: true, - }, - "bundler_version": { - AttrName: "BundlerVersion", - Type: schema.TypeString, - Default: "1.5.3", - }, - }, - } - - return layerType.SchemaResource() -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go deleted file mode 100644 index 27933eef9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go +++ /dev/null @@ -1,193 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/opsworks" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsOpsworksRdsDbInstance() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsOpsworksRdsDbInstanceRegister, - Update: resourceAwsOpsworksRdsDbInstanceUpdate, - Delete: resourceAwsOpsworksRdsDbInstanceDeregister, - Read: resourceAwsOpsworksRdsDbInstanceRead, - - Schema: map[string]*schema.Schema{ - "stack_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "rds_db_instance_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "db_password": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - }, - "db_user": { - Type: schema.TypeString, - Required: true, - }, - }, - } -} - -func resourceAwsOpsworksRdsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - d.Partial(true) - - d.SetPartial("rds_db_instance_arn") - req := &opsworks.UpdateRdsDbInstanceInput{ - RdsDbInstanceArn: aws.String(d.Get("rds_db_instance_arn").(string)), - } - - requestUpdate := false - if d.HasChange("db_user") { - d.SetPartial("db_user") - req.DbUser = aws.String(d.Get("db_user").(string)) - requestUpdate = true - } - if d.HasChange("db_password") { - d.SetPartial("db_password") - req.DbPassword = aws.String(d.Get("db_password").(string)) - requestUpdate = true - } - - if requestUpdate { - log.Printf("[DEBUG] Opsworks RDS DB Instance Modification request: %s", req) - - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var cerr error - _, cerr = client.UpdateRdsDbInstance(req) - if cerr != nil { - log.Printf("[INFO] client error") - if opserr, ok := cerr.(awserr.Error); ok { - log.Printf("[ERROR] OpsWorks error: %s message: %s", opserr.Code(), opserr.Message()) - } - return resource.NonRetryableError(cerr) - } - return nil - }) - - if err != nil { - return err - } - - } - - d.Partial(false) - - return resourceAwsOpsworksRdsDbInstanceRead(d, meta) -} - -func resourceAwsOpsworksRdsDbInstanceDeregister(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - req := &opsworks.DeregisterRdsDbInstanceInput{ - RdsDbInstanceArn: aws.String(d.Get("rds_db_instance_arn").(string)), - } - - log.Printf("[DEBUG] Unregistering rds db instance '%s' from stack: %s", d.Get("rds_db_instance_arn"), d.Get("stack_id")) - - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var cerr error - _, cerr = client.DeregisterRdsDbInstance(req) - if cerr != nil { - log.Printf("[INFO] client error") - if opserr, ok := cerr.(awserr.Error); ok { - if opserr.Code() == "ResourceNotFoundException" { - log.Printf("[INFO] The db instance could not be found. Remove it from state.") - d.SetId("") - - return nil - } - log.Printf("[ERROR] OpsWorks error: %s message: %s", opserr.Code(), opserr.Message()) - } - return resource.NonRetryableError(cerr) - } - - return nil - }) - - return err -} - -func resourceAwsOpsworksRdsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - req := &opsworks.DescribeRdsDbInstancesInput{ - StackId: aws.String(d.Get("stack_id").(string)), - } - - log.Printf("[DEBUG] Reading OpsWorks registered rds db instances for stack: %s", d.Get("stack_id")) - - resp, err := client.DescribeRdsDbInstances(req) - if err != nil { - return err - } - - found := false - id := "" - for _, instance := range resp.RdsDbInstances { - id = fmt.Sprintf("%s%s", *instance.RdsDbInstanceArn, *instance.StackId) - - if fmt.Sprintf("%s%s", d.Get("rds_db_instance_arn").(string), d.Get("stack_id").(string)) == id { - found = true - d.SetId(id) - d.Set("stack_id", instance.StackId) - d.Set("rds_db_instance_arn", instance.RdsDbInstanceArn) - d.Set("db_user", instance.DbUser) - } - - } - - if !found { - d.SetId("") - log.Printf("[INFO] The rds instance '%s' could not be found for stack: '%s'", d.Get("rds_db_instance_arn"), d.Get("stack_id")) - } - - return nil -} - -func resourceAwsOpsworksRdsDbInstanceRegister(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - req := &opsworks.RegisterRdsDbInstanceInput{ - StackId: aws.String(d.Get("stack_id").(string)), - RdsDbInstanceArn: aws.String(d.Get("rds_db_instance_arn").(string)), - DbUser: aws.String(d.Get("db_user").(string)), - DbPassword: aws.String(d.Get("db_password").(string)), - } - - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var cerr error - _, cerr = client.RegisterRdsDbInstance(req) - if cerr != nil { - log.Printf("[INFO] client error") - if opserr, ok := cerr.(awserr.Error); ok { - log.Printf("[ERROR] OpsWorks error: %s message: %s", opserr.Code(), opserr.Message()) - } - return resource.NonRetryableError(cerr) - } - - return nil - }) - - if err != nil { - return err - } - - return resourceAwsOpsworksRdsDbInstanceRead(d, meta) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_stack.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_stack.go deleted file mode 100644 index dbb0887be..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_stack.go +++ /dev/null @@ -1,605 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "os" - "strings" - "time" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/opsworks" -) - -func resourceAwsOpsworksStack() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsOpsworksStackCreate, - Read: resourceAwsOpsworksStackRead, - Update: resourceAwsOpsworksStackUpdate, - Delete: resourceAwsOpsworksStackDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "agent_version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Required: true, - }, - - "region": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - - "service_role_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "default_instance_profile_arn": { - Type: schema.TypeString, - Required: true, - }, - - "color": { - Type: schema.TypeString, - Optional: true, - }, - - "configuration_manager_name": { - Type: schema.TypeString, - Optional: true, - Default: "Chef", - }, - - "configuration_manager_version": { - Type: schema.TypeString, - Optional: true, - Default: "11.10", - }, - - "manage_berkshelf": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "berkshelf_version": { - Type: schema.TypeString, - Optional: true, - Default: "3.2.0", - }, - - "custom_cookbooks_source": { - Type: schema.TypeList, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - - "url": { - Type: schema.TypeString, - Required: true, - }, - - "username": { - Type: schema.TypeString, - Optional: true, - }, - - "password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - - "revision": { - Type: schema.TypeString, - Optional: true, - }, - - "ssh_key": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "custom_json": { - Type: schema.TypeString, - Optional: true, - }, - - "default_availability_zone": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "default_os": { - Type: schema.TypeString, - Optional: true, - Default: "Ubuntu 12.04 LTS", - }, - - "default_root_device_type": { - Type: schema.TypeString, - Optional: true, - Default: "instance-store", - }, - - "default_ssh_key_name": { - Type: schema.TypeString, - Optional: true, - }, - - "default_subnet_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "hostname_theme": { - Type: schema.TypeString, - Optional: true, - Default: "Layer_Dependent", - }, - - "tags": tagsSchema(), - - "use_custom_cookbooks": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "use_opsworks_security_groups": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "vpc_id": { - Type: schema.TypeString, - ForceNew: true, - Computed: true, - Optional: true, - }, - - "stack_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsOpsworksStackValidate(d *schema.ResourceData) error { - cookbooksSourceCount := d.Get("custom_cookbooks_source.#").(int) - if cookbooksSourceCount > 1 { - return fmt.Errorf("Only one custom_cookbooks_source is permitted") - } - - vpcId := d.Get("vpc_id").(string) - if vpcId != "" { - if d.Get("default_subnet_id").(string) == "" { - return fmt.Errorf("default_subnet_id must be set if vpc_id is set") - } - } else { - if d.Get("default_availability_zone").(string) == "" { - return fmt.Errorf("either vpc_id or default_availability_zone must be set") - } - } - - return nil -} - -func resourceAwsOpsworksStackCustomCookbooksSource(d *schema.ResourceData) *opsworks.Source { - count := d.Get("custom_cookbooks_source.#").(int) - if count == 0 { - return nil - } - - return &opsworks.Source{ - Type: aws.String(d.Get("custom_cookbooks_source.0.type").(string)), - Url: aws.String(d.Get("custom_cookbooks_source.0.url").(string)), - Username: aws.String(d.Get("custom_cookbooks_source.0.username").(string)), - Password: aws.String(d.Get("custom_cookbooks_source.0.password").(string)), - Revision: aws.String(d.Get("custom_cookbooks_source.0.revision").(string)), - SshKey: aws.String(d.Get("custom_cookbooks_source.0.ssh_key").(string)), - } -} - -func resourceAwsOpsworksSetStackCustomCookbooksSource(d *schema.ResourceData, v *opsworks.Source) { - nv := make([]interface{}, 0, 1) - if v != nil && v.Type != nil && *v.Type != "" { - m := make(map[string]interface{}) - if v.Type != nil { - m["type"] = *v.Type - } - if v.Url != nil { - m["url"] = *v.Url - } - if v.Username != nil { - m["username"] = *v.Username - } - if v.Revision != nil { - m["revision"] = *v.Revision - } - // v.Password will, on read, contain the placeholder string - // "*****FILTERED*****", so we ignore it on read and let persist - // the value already in the state. - nv = append(nv, m) - } - - err := d.Set("custom_cookbooks_source", nv) - if err != nil { - // should never happen - panic(err) - } -} - -func resourceAwsOpsworksStackRead(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - var conErr error - if v := d.Get("stack_endpoint").(string); v != "" { - client, conErr = opsworksConnForRegion(v, meta) - if conErr != nil { - return conErr - } - } - - req := &opsworks.DescribeStacksInput{ - StackIds: []*string{ - aws.String(d.Id()), - }, - } - - log.Printf("[DEBUG] Reading OpsWorks stack: %s", d.Id()) - - // notFound represents the number of times we've called DescribeStacks looking - // for this Stack. If it's not found in the the default region we're in, we - // check us-east-1 in the event this stack was created with Terraform before - // version 0.9 - // See https://github.com/hashicorp/terraform/issues/12842 - var notFound int - var resp *opsworks.DescribeStacksOutput - var dErr error - - for { - resp, dErr = client.DescribeStacks(req) - if dErr != nil { - if awserr, ok := dErr.(awserr.Error); ok { - if awserr.Code() == "ResourceNotFoundException" { - if notFound < 1 { - // If we haven't already, try us-east-1, legacy connection - notFound++ - var connErr error - client, connErr = opsworksConnForRegion("us-east-1", meta) - if connErr != nil { - return connErr - } - // start again from the top of the FOR loop, but with a client - // configured to talk to us-east-1 - continue - } - - // We've tried both the original and us-east-1 endpoint, and the stack - // is still not found - log.Printf("[DEBUG] OpsWorks stack (%s) not found", d.Id()) - d.SetId("") - return nil - } - // not ResoureNotFoundException, fall through to returning error - } - return dErr - } - // If the stack was found, set the stack_endpoint - if client.Config.Region != nil && *client.Config.Region != "" { - log.Printf("[DEBUG] Setting stack_endpoint for (%s) to (%s)", d.Id(), *client.Config.Region) - if err := d.Set("stack_endpoint", *client.Config.Region); err != nil { - log.Printf("[WARN] Error setting stack_endpoint: %s", err) - } - } - log.Printf("[DEBUG] Breaking stack endpoint search, found stack for (%s)", d.Id()) - // Break the FOR loop - break - } - - stack := resp.Stacks[0] - d.Set("arn", stack.Arn) - d.Set("agent_version", stack.AgentVersion) - d.Set("name", stack.Name) - d.Set("region", stack.Region) - d.Set("default_instance_profile_arn", stack.DefaultInstanceProfileArn) - d.Set("service_role_arn", stack.ServiceRoleArn) - d.Set("default_availability_zone", stack.DefaultAvailabilityZone) - d.Set("default_os", stack.DefaultOs) - d.Set("default_root_device_type", stack.DefaultRootDeviceType) - d.Set("default_ssh_key_name", stack.DefaultSshKeyName) - d.Set("default_subnet_id", stack.DefaultSubnetId) - d.Set("hostname_theme", stack.HostnameTheme) - d.Set("use_custom_cookbooks", stack.UseCustomCookbooks) - if stack.CustomJson != nil { - d.Set("custom_json", stack.CustomJson) - } - d.Set("use_opsworks_security_groups", stack.UseOpsworksSecurityGroups) - d.Set("vpc_id", stack.VpcId) - if color, ok := stack.Attributes["Color"]; ok { - d.Set("color", color) - } - if stack.ConfigurationManager != nil { - d.Set("configuration_manager_name", stack.ConfigurationManager.Name) - d.Set("configuration_manager_version", stack.ConfigurationManager.Version) - } - if stack.ChefConfiguration != nil { - d.Set("berkshelf_version", stack.ChefConfiguration.BerkshelfVersion) - d.Set("manage_berkshelf", stack.ChefConfiguration.ManageBerkshelf) - } - resourceAwsOpsworksSetStackCustomCookbooksSource(d, stack.CustomCookbooksSource) - - return nil -} - -// opsworksConn will return a connection for the stack_endpoint in the -// configuration. Stacks can only be accessed or managed within the endpoint -// in which they are created, so we allow users to specify an original endpoint -// for Stacks created before multiple endpoints were offered (Terraform v0.9.0). -// See: -// - https://github.com/hashicorp/terraform/pull/12688 -// - https://github.com/hashicorp/terraform/issues/12842 -func opsworksConnForRegion(region string, meta interface{}) (*opsworks.OpsWorks, error) { - originalConn := meta.(*AWSClient).opsworksconn - - // Regions are the same, no need to reconfigure - if originalConn.Config.Region != nil && *originalConn.Config.Region == region { - return originalConn, nil - } - - // Set up base session - sess, err := session.NewSession(&originalConn.Config) - if err != nil { - return nil, fmt.Errorf("Error creating AWS session: %s", err) - } - - sess.Handlers.Build.PushBackNamed(addTerraformVersionToUserAgent) - - if extraDebug := os.Getenv("TERRAFORM_AWS_AUTHFAILURE_DEBUG"); extraDebug != "" { - sess.Handlers.UnmarshalError.PushFrontNamed(debugAuthFailure) - } - - newSession := sess.Copy(&aws.Config{Region: aws.String(region)}) - newOpsworksconn := opsworks.New(newSession) - - log.Printf("[DEBUG] Returning new OpsWorks client") - return newOpsworksconn, nil -} - -func resourceAwsOpsworksStackCreate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - err := resourceAwsOpsworksStackValidate(d) - if err != nil { - return err - } - - req := &opsworks.CreateStackInput{ - DefaultInstanceProfileArn: aws.String(d.Get("default_instance_profile_arn").(string)), - Name: aws.String(d.Get("name").(string)), - Region: aws.String(d.Get("region").(string)), - ServiceRoleArn: aws.String(d.Get("service_role_arn").(string)), - DefaultOs: aws.String(d.Get("default_os").(string)), - UseOpsworksSecurityGroups: aws.Bool(d.Get("use_opsworks_security_groups").(bool)), - } - req.ConfigurationManager = &opsworks.StackConfigurationManager{ - Name: aws.String(d.Get("configuration_manager_name").(string)), - Version: aws.String(d.Get("configuration_manager_version").(string)), - } - inVpc := false - if vpcId, ok := d.GetOk("vpc_id"); ok { - req.VpcId = aws.String(vpcId.(string)) - inVpc = true - } - if defaultSubnetId, ok := d.GetOk("default_subnet_id"); ok { - req.DefaultSubnetId = aws.String(defaultSubnetId.(string)) - } - if defaultAvailabilityZone, ok := d.GetOk("default_availability_zone"); ok { - req.DefaultAvailabilityZone = aws.String(defaultAvailabilityZone.(string)) - } - if defaultRootDeviceType, ok := d.GetOk("default_root_device_type"); ok { - req.DefaultRootDeviceType = aws.String(defaultRootDeviceType.(string)) - } - - log.Printf("[DEBUG] Creating OpsWorks stack: %s", req) - - var resp *opsworks.CreateStackOutput - err = resource.Retry(20*time.Minute, func() *resource.RetryError { - var cerr error - resp, cerr = client.CreateStack(req) - if cerr != nil { - if opserr, ok := cerr.(awserr.Error); ok { - // If Terraform is also managing the service IAM role, - // it may have just been created and not yet be - // propagated. - // AWS doesn't provide a machine-readable code for this - // specific error, so we're forced to do fragile message - // matching. - // The full error we're looking for looks something like - // the following: - // Service Role Arn: [...] is not yet propagated, please try again in a couple of minutes - propErr := "not yet propagated" - trustErr := "not the necessary trust relationship" - validateErr := "validate IAM role permission" - if opserr.Code() == "ValidationException" && (strings.Contains(opserr.Message(), trustErr) || strings.Contains(opserr.Message(), propErr) || strings.Contains(opserr.Message(), validateErr)) { - log.Printf("[INFO] Waiting for service IAM role to propagate") - return resource.RetryableError(cerr) - } - } - return resource.NonRetryableError(cerr) - } - return nil - }) - if err != nil { - return err - } - - stackId := *resp.StackId - d.SetId(stackId) - - if inVpc && *req.UseOpsworksSecurityGroups { - // For VPC-based stacks, OpsWorks asynchronously creates some default - // security groups which must exist before layers can be created. - // Unfortunately it doesn't tell us what the ids of these are, so - // we can't actually check for them. Instead, we just wait a nominal - // amount of time for their creation to complete. - log.Print("[INFO] Waiting for OpsWorks built-in security groups to be created") - time.Sleep(30 * time.Second) - } - - return resourceAwsOpsworksStackUpdate(d, meta) -} - -func resourceAwsOpsworksStackUpdate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - var conErr error - if v := d.Get("stack_endpoint").(string); v != "" { - client, conErr = opsworksConnForRegion(v, meta) - if conErr != nil { - return conErr - } - } - - err := resourceAwsOpsworksStackValidate(d) - if err != nil { - return err - } - - req := &opsworks.UpdateStackInput{ - CustomJson: aws.String(d.Get("custom_json").(string)), - DefaultInstanceProfileArn: aws.String(d.Get("default_instance_profile_arn").(string)), - DefaultRootDeviceType: aws.String(d.Get("default_root_device_type").(string)), - DefaultSshKeyName: aws.String(d.Get("default_ssh_key_name").(string)), - Name: aws.String(d.Get("name").(string)), - ServiceRoleArn: aws.String(d.Get("service_role_arn").(string)), - StackId: aws.String(d.Id()), - UseCustomCookbooks: aws.Bool(d.Get("use_custom_cookbooks").(bool)), - UseOpsworksSecurityGroups: aws.Bool(d.Get("use_opsworks_security_groups").(bool)), - Attributes: make(map[string]*string), - CustomCookbooksSource: resourceAwsOpsworksStackCustomCookbooksSource(d), - } - if v, ok := d.GetOk("agent_version"); ok { - req.AgentVersion = aws.String(v.(string)) - } - if v, ok := d.GetOk("default_os"); ok { - req.DefaultOs = aws.String(v.(string)) - } - if v, ok := d.GetOk("default_subnet_id"); ok { - req.DefaultSubnetId = aws.String(v.(string)) - } - if v, ok := d.GetOk("default_availability_zone"); ok { - req.DefaultAvailabilityZone = aws.String(v.(string)) - } - if v, ok := d.GetOk("hostname_theme"); ok { - req.HostnameTheme = aws.String(v.(string)) - } - if v, ok := d.GetOk("color"); ok { - req.Attributes["Color"] = aws.String(v.(string)) - } - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "opsworks", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("stack/%s/", d.Id()), - } - - if tagErr := setTagsOpsworks(client, d, arn.String()); tagErr != nil { - return tagErr - } - - req.ChefConfiguration = &opsworks.ChefConfiguration{ - BerkshelfVersion: aws.String(d.Get("berkshelf_version").(string)), - ManageBerkshelf: aws.Bool(d.Get("manage_berkshelf").(bool)), - } - - req.ConfigurationManager = &opsworks.StackConfigurationManager{ - Name: aws.String(d.Get("configuration_manager_name").(string)), - Version: aws.String(d.Get("configuration_manager_version").(string)), - } - - log.Printf("[DEBUG] Updating OpsWorks stack: %s", req) - - _, err = client.UpdateStack(req) - if err != nil { - return err - } - - return resourceAwsOpsworksStackRead(d, meta) -} - -func resourceAwsOpsworksStackDelete(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - var conErr error - if v := d.Get("stack_endpoint").(string); v != "" { - client, conErr = opsworksConnForRegion(v, meta) - if conErr != nil { - return conErr - } - } - - req := &opsworks.DeleteStackInput{ - StackId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting OpsWorks stack: %s", d.Id()) - - _, err := client.DeleteStack(req) - if err != nil { - return err - } - - // For a stack in a VPC, OpsWorks has created some default security groups - // in the VPC, which it will now delete. - // Unfortunately, the security groups are deleted asynchronously and there - // is no robust way for us to determine when it is done. The VPC itself - // isn't deletable until the security groups are cleaned up, so this could - // make 'terraform destroy' fail if the VPC is also managed and we don't - // wait for the security groups to be deleted. - // There is no robust way to check for this, so we'll just wait a - // nominal amount of time. - _, inVpc := d.GetOk("vpc_id") - _, useOpsworksDefaultSg := d.GetOk("use_opsworks_security_group") - - if inVpc && useOpsworksDefaultSg { - log.Print("[INFO] Waiting for Opsworks built-in security groups to be deleted") - time.Sleep(30 * time.Second) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_static_web_layer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_static_web_layer.go deleted file mode 100644 index df91b1b1b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_static_web_layer.go +++ /dev/null @@ -1,16 +0,0 @@ -package aws - -import ( - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsOpsworksStaticWebLayer() *schema.Resource { - layerType := &opsworksLayerType{ - TypeName: "web", - DefaultLayerName: "Static Web Server", - - Attributes: map[string]*opsworksLayerTypeAttribute{}, - } - - return layerType.SchemaResource() -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_user_profile.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_user_profile.go deleted file mode 100644 index ce24f5b2f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_user_profile.go +++ /dev/null @@ -1,132 +0,0 @@ -package aws - -import ( - "log" - - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/opsworks" -) - -func resourceAwsOpsworksUserProfile() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsOpsworksUserProfileCreate, - Read: resourceAwsOpsworksUserProfileRead, - Update: resourceAwsOpsworksUserProfileUpdate, - Delete: resourceAwsOpsworksUserProfileDelete, - - Schema: map[string]*schema.Schema{ - "user_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "allow_self_management": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "ssh_username": { - Type: schema.TypeString, - Required: true, - }, - - "ssh_public_key": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsOpsworksUserProfileRead(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - req := &opsworks.DescribeUserProfilesInput{ - IamUserArns: []*string{ - aws.String(d.Id()), - }, - } - - log.Printf("[DEBUG] Reading OpsWorks user profile: %s", d.Id()) - - resp, err := client.DescribeUserProfiles(req) - if err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "ResourceNotFoundException" { - log.Printf("[DEBUG] OpsWorks user profile (%s) not found", d.Id()) - d.SetId("") - return nil - } - } - return err - } - - for _, profile := range resp.UserProfiles { - d.Set("allow_self_management", profile.AllowSelfManagement) - d.Set("user_arn", profile.IamUserArn) - d.Set("ssh_public_key", profile.SshPublicKey) - d.Set("ssh_username", profile.SshUsername) - break - } - - return nil -} - -func resourceAwsOpsworksUserProfileCreate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - req := &opsworks.CreateUserProfileInput{ - AllowSelfManagement: aws.Bool(d.Get("allow_self_management").(bool)), - IamUserArn: aws.String(d.Get("user_arn").(string)), - SshPublicKey: aws.String(d.Get("ssh_public_key").(string)), - SshUsername: aws.String(d.Get("ssh_username").(string)), - } - - resp, err := client.CreateUserProfile(req) - if err != nil { - return err - } - - d.SetId(*resp.IamUserArn) - - return resourceAwsOpsworksUserProfileUpdate(d, meta) -} - -func resourceAwsOpsworksUserProfileUpdate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - req := &opsworks.UpdateUserProfileInput{ - AllowSelfManagement: aws.Bool(d.Get("allow_self_management").(bool)), - IamUserArn: aws.String(d.Get("user_arn").(string)), - SshPublicKey: aws.String(d.Get("ssh_public_key").(string)), - SshUsername: aws.String(d.Get("ssh_username").(string)), - } - - log.Printf("[DEBUG] Updating OpsWorks user profile: %s", req) - - _, err := client.UpdateUserProfile(req) - if err != nil { - return err - } - - return resourceAwsOpsworksUserProfileRead(d, meta) -} - -func resourceAwsOpsworksUserProfileDelete(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient).opsworksconn - - req := &opsworks.DeleteUserProfileInput{ - IamUserArn: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting OpsWorks user profile: %s", d.Id()) - - _, err := client.DeleteUserProfile(req) - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_account.go deleted file mode 100644 index 99bd7dae8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_account.go +++ /dev/null @@ -1,243 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/organizations" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsOrganizationsAccount() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsOrganizationsAccountCreate, - Read: resourceAwsOrganizationsAccountRead, - Delete: resourceAwsOrganizationsAccountDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "joined_method": { - Type: schema.TypeString, - Computed: true, - }, - "joined_timestamp": { - Type: schema.TypeString, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - ForceNew: true, - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 50), - }, - "email": { - ForceNew: true, - Type: schema.TypeString, - Required: true, - ValidateFunc: validateAwsOrganizationsAccountEmail, - }, - "iam_user_access_to_billing": { - ForceNew: true, - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{organizations.IAMUserAccessToBillingAllow, organizations.IAMUserAccessToBillingDeny}, true), - }, - "role_name": { - ForceNew: true, - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateAwsOrganizationsAccountRoleName, - }, - }, - } -} - -func resourceAwsOrganizationsAccountCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).organizationsconn - - // Create the account - createOpts := &organizations.CreateAccountInput{ - AccountName: aws.String(d.Get("name").(string)), - Email: aws.String(d.Get("email").(string)), - } - if role, ok := d.GetOk("role_name"); ok { - createOpts.RoleName = aws.String(role.(string)) - } - - if iam_user, ok := d.GetOk("iam_user_access_to_billing"); ok { - createOpts.IamUserAccessToBilling = aws.String(iam_user.(string)) - } - - log.Printf("[DEBUG] Account create config: %#v", createOpts) - - var err error - var resp *organizations.CreateAccountOutput - err = resource.Retry(4*time.Minute, func() *resource.RetryError { - resp, err = conn.CreateAccount(createOpts) - - if err != nil { - if isAWSErr(err, organizations.ErrCodeFinalizingOrganizationException, "") { - log.Printf("[DEBUG] Trying to create account again: %q", err.Error()) - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - - return nil - }) - - if err != nil { - return fmt.Errorf("Error creating account: %s", err) - } - log.Printf("[DEBUG] Account create response: %#v", resp) - - requestId := *resp.CreateAccountStatus.Id - - // Wait for the account to become available - log.Printf("[DEBUG] Waiting for account request (%s) to succeed", requestId) - - stateConf := &resource.StateChangeConf{ - Pending: []string{organizations.CreateAccountStateInProgress}, - Target: []string{organizations.CreateAccountStateSucceeded}, - Refresh: resourceAwsOrganizationsAccountStateRefreshFunc(conn, requestId), - PollInterval: 10 * time.Second, - Timeout: 5 * time.Minute, - } - stateResp, stateErr := stateConf.WaitForState() - if stateErr != nil { - return fmt.Errorf( - "Error waiting for account request (%s) to become available: %s", - requestId, stateErr) - } - - // Store the ID - accountId := stateResp.(*organizations.CreateAccountStatus).AccountId - d.SetId(*accountId) - - return resourceAwsOrganizationsAccountRead(d, meta) -} - -func resourceAwsOrganizationsAccountRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).organizationsconn - describeOpts := &organizations.DescribeAccountInput{ - AccountId: aws.String(d.Id()), - } - resp, err := conn.DescribeAccount(describeOpts) - if err != nil { - if isAWSErr(err, organizations.ErrCodeAccountNotFoundException, "") { - log.Printf("[WARN] Account does not exist, removing from state: %s", d.Id()) - d.SetId("") - return nil - } - return err - } - - account := resp.Account - if account == nil { - log.Printf("[WARN] Account does not exist, removing from state: %s", d.Id()) - d.SetId("") - return nil - } - - d.Set("arn", account.Arn) - d.Set("email", account.Email) - d.Set("joined_method", account.JoinedMethod) - d.Set("joined_timestamp", account.JoinedTimestamp) - d.Set("name", account.Name) - d.Set("status", account.Status) - return nil -} - -func resourceAwsOrganizationsAccountDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).organizationsconn - - input := &organizations.RemoveAccountFromOrganizationInput{ - AccountId: aws.String(d.Id()), - } - log.Printf("[DEBUG] Removing AWS account from organization: %s", input) - _, err := conn.RemoveAccountFromOrganization(input) - if err != nil { - if isAWSErr(err, organizations.ErrCodeAccountNotFoundException, "") { - return nil - } - return err - } - return nil -} - -// resourceAwsOrganizationsAccountStateRefreshFunc returns a resource.StateRefreshFunc -// that is used to watch a CreateAccount request -func resourceAwsOrganizationsAccountStateRefreshFunc(conn *organizations.Organizations, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - opts := &organizations.DescribeCreateAccountStatusInput{ - CreateAccountRequestId: aws.String(id), - } - resp, err := conn.DescribeCreateAccountStatus(opts) - if err != nil { - if isAWSErr(err, organizations.ErrCodeCreateAccountStatusNotFoundException, "") { - resp = nil - } else { - log.Printf("Error on OrganizationAccountStateRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our account yet. Return an empty state. - return nil, "", nil - } - - accountStatus := resp.CreateAccountStatus - if *accountStatus.State == organizations.CreateAccountStateFailed { - return nil, *accountStatus.State, fmt.Errorf(*accountStatus.FailureReason) - } - return accountStatus, *accountStatus.State, nil - } -} - -func validateAwsOrganizationsAccountEmail(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[^\s@]+@[^\s@]+\.[^\s@]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must be a valid email address", value)) - } - - if len(value) < 6 { - errors = append(errors, fmt.Errorf( - "%q cannot be less than 6 characters", value)) - } - - if len(value) > 64 { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than 64 characters", value)) - } - - return -} - -func validateAwsOrganizationsAccountRoleName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[\w+=,.@-]{1,64}$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must consist of uppercase letters, lowercase letters, digits with no spaces, and any of the following characters: =,.@-", value)) - } - - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_organization.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_organization.go deleted file mode 100644 index 0e45120b0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_organization.go +++ /dev/null @@ -1,189 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/organizations" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsOrganizationsOrganization() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsOrganizationsOrganizationCreate, - Read: resourceAwsOrganizationsOrganizationRead, - Update: resourceAwsOrganizationsOrganizationUpdate, - Delete: resourceAwsOrganizationsOrganizationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "master_account_arn": { - Type: schema.TypeString, - Computed: true, - }, - "master_account_email": { - Type: schema.TypeString, - Computed: true, - }, - "master_account_id": { - Type: schema.TypeString, - Computed: true, - }, - "aws_service_access_principals": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "feature_set": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: organizations.OrganizationFeatureSetAll, - ValidateFunc: validation.StringInSlice([]string{ - organizations.OrganizationFeatureSetAll, - organizations.OrganizationFeatureSetConsolidatedBilling, - }, true), - }, - }, - } -} - -func resourceAwsOrganizationsOrganizationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).organizationsconn - - createOpts := &organizations.CreateOrganizationInput{ - FeatureSet: aws.String(d.Get("feature_set").(string)), - } - log.Printf("[DEBUG] Creating Organization: %#v", createOpts) - - resp, err := conn.CreateOrganization(createOpts) - if err != nil { - return fmt.Errorf("Error creating organization: %s", err) - } - - org := resp.Organization - d.SetId(*org.Id) - - awsServiceAccessPrincipals := d.Get("aws_service_access_principals").(*schema.Set).List() - for _, principalRaw := range awsServiceAccessPrincipals { - principal := principalRaw.(string) - input := &organizations.EnableAWSServiceAccessInput{ - ServicePrincipal: aws.String(principal), - } - - log.Printf("[DEBUG] Enabling AWS Service Access in Organization: %s", input) - _, err := conn.EnableAWSServiceAccess(input) - - if err != nil { - return fmt.Errorf("error enabling AWS Service Access (%s) in Organization: %s", principal, err) - } - } - - return resourceAwsOrganizationsOrganizationRead(d, meta) -} - -func resourceAwsOrganizationsOrganizationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).organizationsconn - - log.Printf("[INFO] Reading Organization: %s", d.Id()) - org, err := conn.DescribeOrganization(&organizations.DescribeOrganizationInput{}) - - if isAWSErr(err, organizations.ErrCodeAWSOrganizationsNotInUseException, "") { - log.Printf("[WARN] Organization does not exist, removing from state: %s", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error describing Organization: %s", err) - } - - d.Set("arn", org.Organization.Arn) - d.Set("feature_set", org.Organization.FeatureSet) - d.Set("master_account_arn", org.Organization.MasterAccountArn) - d.Set("master_account_email", org.Organization.MasterAccountEmail) - d.Set("master_account_id", org.Organization.MasterAccountId) - - awsServiceAccessPrincipals := make([]string, 0) - - // ConstraintViolationException: The request failed because the organization does not have all features enabled. Please enable all features in your organization and then retry. - if aws.StringValue(org.Organization.FeatureSet) == organizations.OrganizationFeatureSetAll { - err = conn.ListAWSServiceAccessForOrganizationPages(&organizations.ListAWSServiceAccessForOrganizationInput{}, func(page *organizations.ListAWSServiceAccessForOrganizationOutput, lastPage bool) bool { - for _, enabledServicePrincipal := range page.EnabledServicePrincipals { - awsServiceAccessPrincipals = append(awsServiceAccessPrincipals, aws.StringValue(enabledServicePrincipal.ServicePrincipal)) - } - return !lastPage - }) - - if err != nil { - return fmt.Errorf("error listing AWS Service Access for Organization (%s): %s", d.Id(), err) - } - } - - if err := d.Set("aws_service_access_principals", awsServiceAccessPrincipals); err != nil { - return fmt.Errorf("error setting aws_service_access_principals: %s", err) - } - - return nil -} - -func resourceAwsOrganizationsOrganizationUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).organizationsconn - - if d.HasChange("aws_service_access_principals") { - oldRaw, newRaw := d.GetChange("aws_service_access_principals") - oldSet := oldRaw.(*schema.Set) - newSet := newRaw.(*schema.Set) - - for _, disablePrincipalRaw := range oldSet.Difference(newSet).List() { - principal := disablePrincipalRaw.(string) - input := &organizations.DisableAWSServiceAccessInput{ - ServicePrincipal: aws.String(principal), - } - - log.Printf("[DEBUG] Disabling AWS Service Access in Organization: %s", input) - _, err := conn.DisableAWSServiceAccess(input) - - if err != nil { - return fmt.Errorf("error disabling AWS Service Access (%s) in Organization: %s", principal, err) - } - } - - for _, enablePrincipalRaw := range newSet.Difference(oldSet).List() { - principal := enablePrincipalRaw.(string) - input := &organizations.EnableAWSServiceAccessInput{ - ServicePrincipal: aws.String(principal), - } - - log.Printf("[DEBUG] Enabling AWS Service Access in Organization: %s", input) - _, err := conn.EnableAWSServiceAccess(input) - - if err != nil { - return fmt.Errorf("error enabling AWS Service Access (%s) in Organization: %s", principal, err) - } - } - } - - return resourceAwsOrganizationsOrganizationRead(d, meta) -} - -func resourceAwsOrganizationsOrganizationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).organizationsconn - - log.Printf("[INFO] Deleting Organization: %s", d.Id()) - - _, err := conn.DeleteOrganization(&organizations.DeleteOrganizationInput{}) - if err != nil { - return fmt.Errorf("Error deleting Organization: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy.go deleted file mode 100644 index 715e6bf93..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy.go +++ /dev/null @@ -1,174 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/organizations" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsOrganizationsPolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsOrganizationsPolicyCreate, - Read: resourceAwsOrganizationsPolicyRead, - Update: resourceAwsOrganizationsPolicyUpdate, - Delete: resourceAwsOrganizationsPolicyDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "content": { - Type: schema.TypeString, - Required: true, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - ValidateFunc: validation.ValidateJsonString, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: organizations.PolicyTypeServiceControlPolicy, - ValidateFunc: validation.StringInSlice([]string{ - organizations.PolicyTypeServiceControlPolicy, - }, false), - }, - }, - } -} - -func resourceAwsOrganizationsPolicyCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).organizationsconn - - // Description is required: - // InvalidParameter: 1 validation error(s) found. - // - missing required field, CreatePolicyInput.Description. - input := &organizations.CreatePolicyInput{ - Content: aws.String(d.Get("content").(string)), - Description: aws.String(d.Get("description").(string)), - Name: aws.String(d.Get("name").(string)), - Type: aws.String(d.Get("type").(string)), - } - - log.Printf("[DEBUG] Creating Organizations Policy: %s", input) - - var err error - var resp *organizations.CreatePolicyOutput - err = resource.Retry(4*time.Minute, func() *resource.RetryError { - resp, err = conn.CreatePolicy(input) - - if err != nil { - if isAWSErr(err, organizations.ErrCodeFinalizingOrganizationException, "") { - log.Printf("[DEBUG] Trying to create policy again: %q", err.Error()) - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - - return nil - }) - - if err != nil { - return fmt.Errorf("error creating Organizations Policy: %s", err) - } - - d.SetId(*resp.Policy.PolicySummary.Id) - - return resourceAwsOrganizationsPolicyRead(d, meta) -} - -func resourceAwsOrganizationsPolicyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).organizationsconn - - input := &organizations.DescribePolicyInput{ - PolicyId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading Organizations Policy: %s", input) - resp, err := conn.DescribePolicy(input) - if err != nil { - if isAWSErr(err, organizations.ErrCodePolicyNotFoundException, "") { - log.Printf("[WARN] Policy does not exist, removing from state: %s", d.Id()) - d.SetId("") - return nil - } - return err - } - - if resp.Policy == nil || resp.Policy.PolicySummary == nil { - log.Printf("[WARN] Policy does not exist, removing from state: %s", d.Id()) - d.SetId("") - return nil - } - - d.Set("arn", resp.Policy.PolicySummary.Arn) - d.Set("content", resp.Policy.Content) - d.Set("description", resp.Policy.PolicySummary.Description) - d.Set("name", resp.Policy.PolicySummary.Name) - d.Set("type", resp.Policy.PolicySummary.Type) - return nil -} - -func resourceAwsOrganizationsPolicyUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).organizationsconn - - input := &organizations.UpdatePolicyInput{ - PolicyId: aws.String(d.Id()), - } - - if d.HasChange("content") { - input.Content = aws.String(d.Get("content").(string)) - } - - if d.HasChange("description") { - input.Description = aws.String(d.Get("description").(string)) - } - - if d.HasChange("name") { - input.Name = aws.String(d.Get("name").(string)) - } - - log.Printf("[DEBUG] Updating Organizations Policy: %s", input) - _, err := conn.UpdatePolicy(input) - if err != nil { - return fmt.Errorf("error updating Organizations Policy: %s", err) - } - - return resourceAwsOrganizationsPolicyRead(d, meta) -} - -func resourceAwsOrganizationsPolicyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).organizationsconn - - input := &organizations.DeletePolicyInput{ - PolicyId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deletion Organizations Policy: %s", input) - _, err := conn.DeletePolicy(input) - if err != nil { - if isAWSErr(err, organizations.ErrCodePolicyNotFoundException, "") { - return nil - } - return err - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy_attachment.go deleted file mode 100644 index b51949e80..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy_attachment.go +++ /dev/null @@ -1,154 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/organizations" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsOrganizationsPolicyAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsOrganizationsPolicyAttachmentCreate, - Read: resourceAwsOrganizationsPolicyAttachmentRead, - Delete: resourceAwsOrganizationsPolicyAttachmentDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "policy_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "target_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsOrganizationsPolicyAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).organizationsconn - - policyID := d.Get("policy_id").(string) - targetID := d.Get("target_id").(string) - - input := &organizations.AttachPolicyInput{ - PolicyId: aws.String(policyID), - TargetId: aws.String(targetID), - } - - log.Printf("[DEBUG] Creating Organizations Policy Attachment: %s", input) - - err := resource.Retry(4*time.Minute, func() *resource.RetryError { - _, err := conn.AttachPolicy(input) - - if err != nil { - if isAWSErr(err, organizations.ErrCodeFinalizingOrganizationException, "") { - log.Printf("[DEBUG] Trying to create policy attachment again: %q", err.Error()) - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - - return nil - }) - - if err != nil { - return fmt.Errorf("error creating Organizations Policy Attachment: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%s", targetID, policyID)) - - return resourceAwsOrganizationsPolicyAttachmentRead(d, meta) -} - -func resourceAwsOrganizationsPolicyAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).organizationsconn - - targetID, policyID, err := decodeAwsOrganizationsPolicyAttachmentID(d.Id()) - if err != nil { - return err - } - - input := &organizations.ListPoliciesForTargetInput{ - Filter: aws.String(organizations.PolicyTypeServiceControlPolicy), - TargetId: aws.String(targetID), - } - - log.Printf("[DEBUG] Listing Organizations Policies for Target: %s", input) - var output *organizations.PolicySummary - err = conn.ListPoliciesForTargetPages(input, func(page *organizations.ListPoliciesForTargetOutput, lastPage bool) bool { - for _, policySummary := range page.Policies { - if aws.StringValue(policySummary.Id) == policyID { - output = policySummary - return true - } - } - return !lastPage - }) - - if err != nil { - if isAWSErr(err, organizations.ErrCodeTargetNotFoundException, "") { - log.Printf("[WARN] Target does not exist, removing from state: %s", d.Id()) - d.SetId("") - return nil - } - return err - } - - if output == nil { - log.Printf("[WARN] Attachment does not exist, removing from state: %s", d.Id()) - d.SetId("") - return nil - } - - d.Set("policy_id", policyID) - d.Set("target_id", targetID) - return nil -} - -func resourceAwsOrganizationsPolicyAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).organizationsconn - - targetID, policyID, err := decodeAwsOrganizationsPolicyAttachmentID(d.Id()) - if err != nil { - return err - } - - input := &organizations.DetachPolicyInput{ - PolicyId: aws.String(policyID), - TargetId: aws.String(targetID), - } - - log.Printf("[DEBUG] Detaching Organizations Policy %q from %q", policyID, targetID) - _, err = conn.DetachPolicy(input) - if err != nil { - if isAWSErr(err, organizations.ErrCodePolicyNotFoundException, "") { - return nil - } - if isAWSErr(err, organizations.ErrCodeTargetNotFoundException, "") { - return nil - } - return err - } - return nil -} - -func decodeAwsOrganizationsPolicyAttachmentID(id string) (string, string, error) { - idParts := strings.Split(id, ":") - if len(idParts) != 2 { - return "", "", fmt.Errorf("expected ID in format of TARGETID:POLICYID, received: %s", id) - } - return idParts[0], idParts[1], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_adm_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_adm_channel.go deleted file mode 100644 index 71373a98b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_adm_channel.go +++ /dev/null @@ -1,114 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/pinpoint" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsPinpointADMChannel() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsPinpointADMChannelUpsert, - Read: resourceAwsPinpointADMChannelRead, - Update: resourceAwsPinpointADMChannelUpsert, - Delete: resourceAwsPinpointADMChannelDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "application_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "client_id": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - }, - "client_secret": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - }, - } -} - -func resourceAwsPinpointADMChannelUpsert(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - applicationId := d.Get("application_id").(string) - - params := &pinpoint.ADMChannelRequest{} - - params.ClientId = aws.String(d.Get("client_id").(string)) - params.ClientSecret = aws.String(d.Get("client_secret").(string)) - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - - req := pinpoint.UpdateAdmChannelInput{ - ApplicationId: aws.String(applicationId), - ADMChannelRequest: params, - } - - _, err := conn.UpdateAdmChannel(&req) - if err != nil { - return err - } - - d.SetId(applicationId) - - return resourceAwsPinpointADMChannelRead(d, meta) -} - -func resourceAwsPinpointADMChannelRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[INFO] Reading Pinpoint ADM Channel for application %s", d.Id()) - - channel, err := conn.GetAdmChannel(&pinpoint.GetAdmChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Pinpoint ADM Channel for application %s not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("error getting Pinpoint ADM Channel for application %s: %s", d.Id(), err) - } - - d.Set("application_id", channel.ADMChannelResponse.ApplicationId) - d.Set("enabled", channel.ADMChannelResponse.Enabled) - // client_id and client_secret are never returned - - return nil -} - -func resourceAwsPinpointADMChannelDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[DEBUG] Pinpoint Delete ADM Channel: %s", d.Id()) - _, err := conn.DeleteAdmChannel(&pinpoint.DeleteAdmChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting Pinpoint ADM Channel for application %s: %s", d.Id(), err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_channel.go deleted file mode 100644 index 95949cb14..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_channel.go +++ /dev/null @@ -1,159 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/pinpoint" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsPinpointAPNSChannel() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsPinpointAPNSChannelUpsert, - Read: resourceAwsPinpointAPNSChannelRead, - Update: resourceAwsPinpointAPNSChannelUpsert, - Delete: resourceAwsPinpointAPNSChannelDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "application_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "bundle_id": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "certificate": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "default_authentication_method": { - Type: schema.TypeString, - Optional: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "private_key": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "team_id": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "token_key": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "token_key_id": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - }, - } -} - -func resourceAwsPinpointAPNSChannelUpsert(d *schema.ResourceData, meta interface{}) error { - certificate, certificateOk := d.GetOk("certificate") - privateKey, privateKeyOk := d.GetOk("private_key") - - bundleId, bundleIdOk := d.GetOk("bundle_id") - teamId, teamIdOk := d.GetOk("team_id") - tokenKey, tokenKeyOk := d.GetOk("token_key") - tokenKeyId, tokenKeyIdOk := d.GetOk("token_key_id") - - if !(certificateOk && privateKeyOk) && !(bundleIdOk && teamIdOk && tokenKeyOk && tokenKeyIdOk) { - return errors.New("At least one set of credentials is required; either [certificate, private_key] or [bundle_id, team_id, token_key, token_key_id]") - } - - conn := meta.(*AWSClient).pinpointconn - - applicationId := d.Get("application_id").(string) - - params := &pinpoint.APNSChannelRequest{} - - params.DefaultAuthenticationMethod = aws.String(d.Get("default_authentication_method").(string)) - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - - params.Certificate = aws.String(certificate.(string)) - params.PrivateKey = aws.String(privateKey.(string)) - - params.BundleId = aws.String(bundleId.(string)) - params.TeamId = aws.String(teamId.(string)) - params.TokenKey = aws.String(tokenKey.(string)) - params.TokenKeyId = aws.String(tokenKeyId.(string)) - - req := pinpoint.UpdateApnsChannelInput{ - ApplicationId: aws.String(applicationId), - APNSChannelRequest: params, - } - - _, err := conn.UpdateApnsChannel(&req) - if err != nil { - return fmt.Errorf("error updating Pinpoint APNs Channel for Application %s: %s", applicationId, err) - } - - d.SetId(applicationId) - - return resourceAwsPinpointAPNSChannelRead(d, meta) -} - -func resourceAwsPinpointAPNSChannelRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[INFO] Reading Pinpoint APNs Channel for Application %s", d.Id()) - - output, err := conn.GetApnsChannel(&pinpoint.GetApnsChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Pinpoint APNs Channel for application %s not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("error getting Pinpoint APNs Channel for application %s: %s", d.Id(), err) - } - - d.Set("application_id", output.APNSChannelResponse.ApplicationId) - d.Set("default_authentication_method", output.APNSChannelResponse.DefaultAuthenticationMethod) - d.Set("enabled", output.APNSChannelResponse.Enabled) - // Sensitive params are not returned - - return nil -} - -func resourceAwsPinpointAPNSChannelDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[DEBUG] Deleting Pinpoint APNs Channel: %s", d.Id()) - _, err := conn.DeleteApnsChannel(&pinpoint.DeleteApnsChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting Pinpoint APNs Channel for Application %s: %s", d.Id(), err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_sandbox_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_sandbox_channel.go deleted file mode 100644 index e20a9a632..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_sandbox_channel.go +++ /dev/null @@ -1,159 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/pinpoint" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsPinpointAPNSSandboxChannel() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsPinpointAPNSSandboxChannelUpsert, - Read: resourceAwsPinpointAPNSSandboxChannelRead, - Update: resourceAwsPinpointAPNSSandboxChannelUpsert, - Delete: resourceAwsPinpointAPNSSandboxChannelDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "application_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "bundle_id": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "certificate": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "default_authentication_method": { - Type: schema.TypeString, - Optional: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "private_key": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "team_id": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "token_key": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "token_key_id": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - }, - } -} - -func resourceAwsPinpointAPNSSandboxChannelUpsert(d *schema.ResourceData, meta interface{}) error { - certificate, certificateOk := d.GetOk("certificate") - privateKey, privateKeyOk := d.GetOk("private_key") - - bundleId, bundleIdOk := d.GetOk("bundle_id") - teamId, teamIdOk := d.GetOk("team_id") - tokenKey, tokenKeyOk := d.GetOk("token_key") - tokenKeyId, tokenKeyIdOk := d.GetOk("token_key_id") - - if !(certificateOk && privateKeyOk) && !(bundleIdOk && teamIdOk && tokenKeyOk && tokenKeyIdOk) { - return errors.New("At least one set of credentials is required; either [certificate, private_key] or [bundle_id, team_id, token_key, token_key_id]") - } - - conn := meta.(*AWSClient).pinpointconn - - applicationId := d.Get("application_id").(string) - - params := &pinpoint.APNSSandboxChannelRequest{} - - params.DefaultAuthenticationMethod = aws.String(d.Get("default_authentication_method").(string)) - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - - params.Certificate = aws.String(certificate.(string)) - params.PrivateKey = aws.String(privateKey.(string)) - - params.BundleId = aws.String(bundleId.(string)) - params.TeamId = aws.String(teamId.(string)) - params.TokenKey = aws.String(tokenKey.(string)) - params.TokenKeyId = aws.String(tokenKeyId.(string)) - - req := pinpoint.UpdateApnsSandboxChannelInput{ - ApplicationId: aws.String(applicationId), - APNSSandboxChannelRequest: params, - } - - _, err := conn.UpdateApnsSandboxChannel(&req) - if err != nil { - return fmt.Errorf("error updating Pinpoint APNs Sandbox Channel for Application %s: %s", applicationId, err) - } - - d.SetId(applicationId) - - return resourceAwsPinpointAPNSSandboxChannelRead(d, meta) -} - -func resourceAwsPinpointAPNSSandboxChannelRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[INFO] Reading Pinpoint APNs Channel for Application %s", d.Id()) - - output, err := conn.GetApnsSandboxChannel(&pinpoint.GetApnsSandboxChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Pinpoint APNs Sandbox Channel for application %s not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("error getting Pinpoint APNs Sandbox Channel for application %s: %s", d.Id(), err) - } - - d.Set("application_id", output.APNSSandboxChannelResponse.ApplicationId) - d.Set("default_authentication_method", output.APNSSandboxChannelResponse.DefaultAuthenticationMethod) - d.Set("enabled", output.APNSSandboxChannelResponse.Enabled) - // Sensitive params are not returned - - return nil -} - -func resourceAwsPinpointAPNSSandboxChannelDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[DEBUG] Deleting Pinpoint APNs Sandbox Channel: %s", d.Id()) - _, err := conn.DeleteApnsSandboxChannel(&pinpoint.DeleteApnsSandboxChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting Pinpoint APNs Sandbox Channel for Application %s: %s", d.Id(), err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_channel.go deleted file mode 100644 index 0663b95be..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_channel.go +++ /dev/null @@ -1,159 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/pinpoint" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsPinpointAPNSVoipChannel() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsPinpointAPNSVoipChannelUpsert, - Read: resourceAwsPinpointAPNSVoipChannelRead, - Update: resourceAwsPinpointAPNSVoipChannelUpsert, - Delete: resourceAwsPinpointAPNSVoipChannelDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "application_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "bundle_id": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "certificate": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "default_authentication_method": { - Type: schema.TypeString, - Optional: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "private_key": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "team_id": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "token_key": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "token_key_id": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - }, - } -} - -func resourceAwsPinpointAPNSVoipChannelUpsert(d *schema.ResourceData, meta interface{}) error { - certificate, certificateOk := d.GetOk("certificate") - privateKey, privateKeyOk := d.GetOk("private_key") - - bundleId, bundleIdOk := d.GetOk("bundle_id") - teamId, teamIdOk := d.GetOk("team_id") - tokenKey, tokenKeyOk := d.GetOk("token_key") - tokenKeyId, tokenKeyIdOk := d.GetOk("token_key_id") - - if !(certificateOk && privateKeyOk) && !(bundleIdOk && teamIdOk && tokenKeyOk && tokenKeyIdOk) { - return errors.New("At least one set of credentials is required; either [certificate, private_key] or [bundle_id, team_id, token_key, token_key_id]") - } - - conn := meta.(*AWSClient).pinpointconn - - applicationId := d.Get("application_id").(string) - - params := &pinpoint.APNSVoipChannelRequest{} - - params.DefaultAuthenticationMethod = aws.String(d.Get("default_authentication_method").(string)) - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - - params.Certificate = aws.String(certificate.(string)) - params.PrivateKey = aws.String(privateKey.(string)) - - params.BundleId = aws.String(bundleId.(string)) - params.TeamId = aws.String(teamId.(string)) - params.TokenKey = aws.String(tokenKey.(string)) - params.TokenKeyId = aws.String(tokenKeyId.(string)) - - req := pinpoint.UpdateApnsVoipChannelInput{ - ApplicationId: aws.String(applicationId), - APNSVoipChannelRequest: params, - } - - _, err := conn.UpdateApnsVoipChannel(&req) - if err != nil { - return fmt.Errorf("error updating Pinpoint APNs Voip Channel for Application %s: %s", applicationId, err) - } - - d.SetId(applicationId) - - return resourceAwsPinpointAPNSVoipChannelRead(d, meta) -} - -func resourceAwsPinpointAPNSVoipChannelRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[INFO] Reading Pinpoint APNs Voip Channel for Application %s", d.Id()) - - output, err := conn.GetApnsVoipChannel(&pinpoint.GetApnsVoipChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Pinpoint APNs Voip Channel for application %s not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("error getting Pinpoint APNs Voip Channel for application %s: %s", d.Id(), err) - } - - d.Set("application_id", output.APNSVoipChannelResponse.ApplicationId) - d.Set("default_authentication_method", output.APNSVoipChannelResponse.DefaultAuthenticationMethod) - d.Set("enabled", output.APNSVoipChannelResponse.Enabled) - // Sensitive params are not returned - - return nil -} - -func resourceAwsPinpointAPNSVoipChannelDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[DEBUG] Deleting Pinpoint APNs Voip Channel: %s", d.Id()) - _, err := conn.DeleteApnsVoipChannel(&pinpoint.DeleteApnsVoipChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting Pinpoint APNs Voip Channel for Application %s: %s", d.Id(), err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_sandbox_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_sandbox_channel.go deleted file mode 100644 index 44a7203a9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_sandbox_channel.go +++ /dev/null @@ -1,159 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/pinpoint" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsPinpointAPNSVoipSandboxChannel() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsPinpointAPNSVoipSandboxChannelUpsert, - Read: resourceAwsPinpointAPNSVoipSandboxChannelRead, - Update: resourceAwsPinpointAPNSVoipSandboxChannelUpsert, - Delete: resourceAwsPinpointAPNSVoipSandboxChannelDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "application_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "bundle_id": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "certificate": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "default_authentication_method": { - Type: schema.TypeString, - Optional: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "private_key": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "team_id": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "token_key": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "token_key_id": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - }, - } -} - -func resourceAwsPinpointAPNSVoipSandboxChannelUpsert(d *schema.ResourceData, meta interface{}) error { - certificate, certificateOk := d.GetOk("certificate") - privateKey, privateKeyOk := d.GetOk("private_key") - - bundleId, bundleIdOk := d.GetOk("bundle_id") - teamId, teamIdOk := d.GetOk("team_id") - tokenKey, tokenKeyOk := d.GetOk("token_key") - tokenKeyId, tokenKeyIdOk := d.GetOk("token_key_id") - - if !(certificateOk && privateKeyOk) && !(bundleIdOk && teamIdOk && tokenKeyOk && tokenKeyIdOk) { - return errors.New("At least one set of credentials is required; either [certificate, private_key] or [bundle_id, team_id, token_key, token_key_id]") - } - - conn := meta.(*AWSClient).pinpointconn - - applicationId := d.Get("application_id").(string) - - params := &pinpoint.APNSVoipSandboxChannelRequest{} - - params.DefaultAuthenticationMethod = aws.String(d.Get("default_authentication_method").(string)) - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - - params.Certificate = aws.String(certificate.(string)) - params.PrivateKey = aws.String(privateKey.(string)) - - params.BundleId = aws.String(bundleId.(string)) - params.TeamId = aws.String(teamId.(string)) - params.TokenKey = aws.String(tokenKey.(string)) - params.TokenKeyId = aws.String(tokenKeyId.(string)) - - req := pinpoint.UpdateApnsVoipSandboxChannelInput{ - ApplicationId: aws.String(applicationId), - APNSVoipSandboxChannelRequest: params, - } - - _, err := conn.UpdateApnsVoipSandboxChannel(&req) - if err != nil { - return fmt.Errorf("error updating Pinpoint APNs Voip Sandbox Channel for Application %s: %s", applicationId, err) - } - - d.SetId(applicationId) - - return resourceAwsPinpointAPNSVoipSandboxChannelRead(d, meta) -} - -func resourceAwsPinpointAPNSVoipSandboxChannelRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[INFO] Reading Pinpoint APNs Voip Sandbox Channel for Application %s", d.Id()) - - output, err := conn.GetApnsVoipSandboxChannel(&pinpoint.GetApnsVoipSandboxChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Pinpoint APNs Voip Sandbox Channel for application %s not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("error getting Pinpoint APNs Voip Sandbox Channel for application %s: %s", d.Id(), err) - } - - d.Set("application_id", output.APNSVoipSandboxChannelResponse.ApplicationId) - d.Set("default_authentication_method", output.APNSVoipSandboxChannelResponse.DefaultAuthenticationMethod) - d.Set("enabled", output.APNSVoipSandboxChannelResponse.Enabled) - // Sensitive params are not returned - - return nil -} - -func resourceAwsPinpointAPNSVoipSandboxChannelDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[DEBUG] Deleting Pinpoint APNs Voip Sandbox Channel: %s", d.Id()) - _, err := conn.DeleteApnsVoipSandboxChannel(&pinpoint.DeleteApnsVoipSandboxChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting Pinpoint APNs Voip Sandbox Channel for Application %s: %s", d.Id(), err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_app.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_app.go deleted file mode 100644 index 69908963e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_app.go +++ /dev/null @@ -1,376 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/pinpoint" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsPinpointApp() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsPinpointAppCreate, - Read: resourceAwsPinpointAppRead, - Update: resourceAwsPinpointAppUpdate, - Delete: resourceAwsPinpointAppDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "application_id": { - Type: schema.TypeString, - Computed: true, - }, - //"cloudwatch_metrics_enabled": { - // Type: schema.TypeBool, - // Optional: true, - // Default: false, - //}, - "campaign_hook": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "lambda_function_name": { - Type: schema.TypeString, - Optional: true, - }, - "mode": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - pinpoint.ModeDelivery, - pinpoint.ModeFilter, - }, false), - }, - "web_url": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "limits": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "daily": { - Type: schema.TypeInt, - Optional: true, - }, - "maximum_duration": { - Type: schema.TypeInt, - Optional: true, - }, - "messages_per_second": { - Type: schema.TypeInt, - Optional: true, - }, - "total": { - Type: schema.TypeInt, - Optional: true, - }, - }, - }, - }, - "quiet_time": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "end": { - Type: schema.TypeString, - Optional: true, - }, - "start": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsPinpointAppCreate(d *schema.ResourceData, meta interface{}) error { - pinpointconn := meta.(*AWSClient).pinpointconn - - var name string - if v, ok := d.GetOk("name"); ok { - name = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - name = resource.PrefixedUniqueId(v.(string)) - } else { - name = resource.UniqueId() - } - - log.Printf("[DEBUG] Pinpoint create app: %s", name) - - req := &pinpoint.CreateAppInput{ - CreateApplicationRequest: &pinpoint.CreateApplicationRequest{ - Name: aws.String(name), - }, - } - - output, err := pinpointconn.CreateApp(req) - if err != nil { - return fmt.Errorf("error creating Pinpoint app: %s", err) - } - - d.SetId(*output.ApplicationResponse.Id) - - return resourceAwsPinpointAppUpdate(d, meta) -} - -func resourceAwsPinpointAppUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - appSettings := &pinpoint.WriteApplicationSettingsRequest{} - - //if d.HasChange("cloudwatch_metrics_enabled") { - // appSettings.CloudWatchMetricsEnabled = aws.Bool(d.Get("cloudwatch_metrics_enabled").(bool)); - //} - - if d.HasChange("campaign_hook") { - appSettings.CampaignHook = expandPinpointCampaignHook(d.Get("campaign_hook").([]interface{})) - } - - if d.HasChange("limits") { - appSettings.Limits = expandPinpointCampaignLimits(d.Get("limits").([]interface{})) - } - - if d.HasChange("quiet_time") { - appSettings.QuietTime = expandPinpointQuietTime(d.Get("quiet_time").([]interface{})) - } - - req := pinpoint.UpdateApplicationSettingsInput{ - ApplicationId: aws.String(d.Id()), - WriteApplicationSettingsRequest: appSettings, - } - - _, err := conn.UpdateApplicationSettings(&req) - if err != nil { - return err - } - - return resourceAwsPinpointAppRead(d, meta) -} - -func resourceAwsPinpointAppRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[INFO] Reading Pinpoint App Attributes for %s", d.Id()) - - app, err := conn.GetApp(&pinpoint.GetAppInput{ - ApplicationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Pinpoint App (%s) not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return err - } - - settings, err := conn.GetApplicationSettings(&pinpoint.GetApplicationSettingsInput{ - ApplicationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Pinpoint App (%s) not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("name", app.ApplicationResponse.Name) - d.Set("application_id", app.ApplicationResponse.Id) - - if err := d.Set("campaign_hook", flattenPinpointCampaignHook(settings.ApplicationSettingsResource.CampaignHook)); err != nil { - return fmt.Errorf("error setting campaign_hook: %s", err) - } - if err := d.Set("limits", flattenPinpointCampaignLimits(settings.ApplicationSettingsResource.Limits)); err != nil { - return fmt.Errorf("error setting limits: %s", err) - } - if err := d.Set("quiet_time", flattenPinpointQuietTime(settings.ApplicationSettingsResource.QuietTime)); err != nil { - return fmt.Errorf("error setting quiet_time: %s", err) - } - - return nil -} - -func resourceAwsPinpointAppDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[DEBUG] Pinpoint Delete App: %s", d.Id()) - _, err := conn.DeleteApp(&pinpoint.DeleteAppInput{ - ApplicationId: aws.String(d.Id()), - }) - - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - return nil - } - - if err != nil { - return err - } - return nil -} - -func expandPinpointCampaignHook(configs []interface{}) *pinpoint.CampaignHook { - if len(configs) == 0 { - return nil - } - - m := configs[0].(map[string]interface{}) - - ch := &pinpoint.CampaignHook{} - - if v, ok := m["lambda_function_name"]; ok { - ch.LambdaFunctionName = aws.String(v.(string)) - } - - if v, ok := m["mode"]; ok { - ch.Mode = aws.String(v.(string)) - } - - if v, ok := m["web_url"]; ok { - ch.WebUrl = aws.String(v.(string)) - } - - return ch -} - -func flattenPinpointCampaignHook(ch *pinpoint.CampaignHook) []interface{} { - l := make([]interface{}, 0) - - m := map[string]interface{}{} - - m["lambda_function_name"] = aws.StringValue(ch.LambdaFunctionName) - m["mode"] = aws.StringValue(ch.Mode) - m["web_url"] = aws.StringValue(ch.WebUrl) - - l = append(l, m) - - return l -} - -func expandPinpointCampaignLimits(configs []interface{}) *pinpoint.CampaignLimits { - if len(configs) == 0 { - return nil - } - - m := configs[0].(map[string]interface{}) - - cl := pinpoint.CampaignLimits{} - - if v, ok := m["daily"]; ok { - cl.Daily = aws.Int64(int64(v.(int))) - } - - if v, ok := m["maximum_duration"]; ok { - cl.MaximumDuration = aws.Int64(int64(v.(int))) - } - - if v, ok := m["messages_per_second"]; ok { - cl.MessagesPerSecond = aws.Int64(int64(v.(int))) - } - - if v, ok := m["total"]; ok { - cl.Total = aws.Int64(int64(v.(int))) - } - - return &cl -} - -func flattenPinpointCampaignLimits(cl *pinpoint.CampaignLimits) []interface{} { - l := make([]interface{}, 0) - - m := map[string]interface{}{} - - m["daily"] = aws.Int64Value(cl.Daily) - m["maximum_duration"] = aws.Int64Value(cl.MaximumDuration) - m["messages_per_second"] = aws.Int64Value(cl.MessagesPerSecond) - m["total"] = aws.Int64Value(cl.Total) - - l = append(l, m) - - return l -} - -func expandPinpointQuietTime(configs []interface{}) *pinpoint.QuietTime { - if len(configs) == 0 { - return nil - } - - m := configs[0].(map[string]interface{}) - - qt := pinpoint.QuietTime{} - - if v, ok := m["end"]; ok { - qt.End = aws.String(v.(string)) - } - - if v, ok := m["start"]; ok { - qt.Start = aws.String(v.(string)) - } - - return &qt -} - -func flattenPinpointQuietTime(qt *pinpoint.QuietTime) []interface{} { - l := make([]interface{}, 0) - - m := map[string]interface{}{} - - m["end"] = aws.StringValue(qt.End) - m["start"] = aws.StringValue(qt.Start) - - l = append(l, m) - - return l -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_baidu_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_baidu_channel.go deleted file mode 100644 index 595696b7a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_baidu_channel.go +++ /dev/null @@ -1,114 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/pinpoint" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsPinpointBaiduChannel() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsPinpointBaiduChannelUpsert, - Read: resourceAwsPinpointBaiduChannelRead, - Update: resourceAwsPinpointBaiduChannelUpsert, - Delete: resourceAwsPinpointBaiduChannelDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "application_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "api_key": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - }, - "secret_key": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - }, - }, - } -} - -func resourceAwsPinpointBaiduChannelUpsert(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - applicationId := d.Get("application_id").(string) - - params := &pinpoint.BaiduChannelRequest{} - - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - params.ApiKey = aws.String(d.Get("api_key").(string)) - params.SecretKey = aws.String(d.Get("secret_key").(string)) - - req := pinpoint.UpdateBaiduChannelInput{ - ApplicationId: aws.String(applicationId), - BaiduChannelRequest: params, - } - - _, err := conn.UpdateBaiduChannel(&req) - if err != nil { - return fmt.Errorf("error updating Pinpoint Baidu Channel for application %s: %s", applicationId, err) - } - - d.SetId(applicationId) - - return resourceAwsPinpointBaiduChannelRead(d, meta) -} - -func resourceAwsPinpointBaiduChannelRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[INFO] Reading Pinpoint Baidu Channel for application %s", d.Id()) - - output, err := conn.GetBaiduChannel(&pinpoint.GetBaiduChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Pinpoint Baidu Channel for application %s not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("error getting Pinpoint Baidu Channel for application %s: %s", d.Id(), err) - } - - d.Set("application_id", output.BaiduChannelResponse.ApplicationId) - d.Set("enabled", output.BaiduChannelResponse.Enabled) - // ApiKey and SecretKey are never returned - - return nil -} - -func resourceAwsPinpointBaiduChannelDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[DEBUG] Deleting Pinpoint Baidu Channel for application %s", d.Id()) - _, err := conn.DeleteBaiduChannel(&pinpoint.DeleteBaiduChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting Pinpoint Baidu Channel for application %s: %s", d.Id(), err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_email_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_email_channel.go deleted file mode 100644 index 9809556e4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_email_channel.go +++ /dev/null @@ -1,123 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/pinpoint" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsPinpointEmailChannel() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsPinpointEmailChannelUpsert, - Read: resourceAwsPinpointEmailChannelRead, - Update: resourceAwsPinpointEmailChannelUpsert, - Delete: resourceAwsPinpointEmailChannelDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "application_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "from_address": { - Type: schema.TypeString, - Required: true, - }, - "identity": { - Type: schema.TypeString, - Required: true, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - }, - "messages_per_second": { - Type: schema.TypeInt, - Computed: true, - }, - }, - } -} - -func resourceAwsPinpointEmailChannelUpsert(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - applicationId := d.Get("application_id").(string) - - params := &pinpoint.EmailChannelRequest{} - - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - params.FromAddress = aws.String(d.Get("from_address").(string)) - params.Identity = aws.String(d.Get("identity").(string)) - params.RoleArn = aws.String(d.Get("role_arn").(string)) - - req := pinpoint.UpdateEmailChannelInput{ - ApplicationId: aws.String(applicationId), - EmailChannelRequest: params, - } - - _, err := conn.UpdateEmailChannel(&req) - if err != nil { - return fmt.Errorf("error updating Pinpoint Email Channel for application %s: %s", applicationId, err) - } - - d.SetId(applicationId) - - return resourceAwsPinpointEmailChannelRead(d, meta) -} - -func resourceAwsPinpointEmailChannelRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[INFO] Reading Pinpoint Email Channel for application %s", d.Id()) - - output, err := conn.GetEmailChannel(&pinpoint.GetEmailChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Pinpoint Email Channel for application %s not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("error getting Pinpoint Email Channel for application %s: %s", d.Id(), err) - } - - d.Set("application_id", output.EmailChannelResponse.ApplicationId) - d.Set("enabled", output.EmailChannelResponse.Enabled) - d.Set("from_address", output.EmailChannelResponse.FromAddress) - d.Set("identity", output.EmailChannelResponse.Identity) - d.Set("role_arn", output.EmailChannelResponse.RoleArn) - d.Set("messages_per_second", aws.Int64Value(output.EmailChannelResponse.MessagesPerSecond)) - return nil -} - -func resourceAwsPinpointEmailChannelDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[DEBUG] Deleting Pinpoint Email Channel for application %s", d.Id()) - _, err := conn.DeleteEmailChannel(&pinpoint.DeleteEmailChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting Pinpoint Email Channel for application %s: %s", d.Id(), err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_event_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_event_stream.go deleted file mode 100644 index f5fa4f33a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_event_stream.go +++ /dev/null @@ -1,106 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/pinpoint" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsPinpointEventStream() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsPinpointEventStreamUpsert, - Read: resourceAwsPinpointEventStreamRead, - Update: resourceAwsPinpointEventStreamUpsert, - Delete: resourceAwsPinpointEventStreamDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "application_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "destination_stream_arn": { - Type: schema.TypeString, - Required: true, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - }, - }, - } -} - -func resourceAwsPinpointEventStreamUpsert(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - applicationId := d.Get("application_id").(string) - - params := &pinpoint.WriteEventStream{} - - params.DestinationStreamArn = aws.String(d.Get("destination_stream_arn").(string)) - params.RoleArn = aws.String(d.Get("role_arn").(string)) - - req := pinpoint.PutEventStreamInput{ - ApplicationId: aws.String(applicationId), - WriteEventStream: params, - } - - _, err := conn.PutEventStream(&req) - if err != nil { - return fmt.Errorf("error putting Pinpoint Event Stream for application %s: %s", applicationId, err) - } - - d.SetId(applicationId) - - return resourceAwsPinpointEventStreamRead(d, meta) -} - -func resourceAwsPinpointEventStreamRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[INFO] Reading Pinpoint Event Stream for application %s", d.Id()) - - output, err := conn.GetEventStream(&pinpoint.GetEventStreamInput{ - ApplicationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Pinpoint Event Stream for application %s not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("error getting Pinpoint Event Stream for application %s: %s", d.Id(), err) - } - - d.Set("application_id", output.EventStream.ApplicationId) - d.Set("destination_stream_arn", output.EventStream.DestinationStreamArn) - d.Set("role_arn", output.EventStream.RoleArn) - - return nil -} - -func resourceAwsPinpointEventStreamDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[DEBUG] Pinpoint Delete Event Stream: %s", d.Id()) - _, err := conn.DeleteEventStream(&pinpoint.DeleteEventStreamInput{ - ApplicationId: aws.String(d.Id()), - }) - - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting Pinpoint Event Stream for application %s: %s", d.Id(), err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_gcm_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_gcm_channel.go deleted file mode 100644 index 4b7232600..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_gcm_channel.go +++ /dev/null @@ -1,108 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/pinpoint" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsPinpointGCMChannel() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsPinpointGCMChannelUpsert, - Read: resourceAwsPinpointGCMChannelRead, - Update: resourceAwsPinpointGCMChannelUpsert, - Delete: resourceAwsPinpointGCMChannelDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "application_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "api_key": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - }, - } -} - -func resourceAwsPinpointGCMChannelUpsert(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - applicationId := d.Get("application_id").(string) - - params := &pinpoint.GCMChannelRequest{} - - params.ApiKey = aws.String(d.Get("api_key").(string)) - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - - req := pinpoint.UpdateGcmChannelInput{ - ApplicationId: aws.String(applicationId), - GCMChannelRequest: params, - } - - _, err := conn.UpdateGcmChannel(&req) - if err != nil { - return fmt.Errorf("error putting Pinpoint GCM Channel for application %s: %s", applicationId, err) - } - - d.SetId(applicationId) - - return resourceAwsPinpointGCMChannelRead(d, meta) -} - -func resourceAwsPinpointGCMChannelRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[INFO] Reading Pinpoint GCM Channel for application %s", d.Id()) - - output, err := conn.GetGcmChannel(&pinpoint.GetGcmChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Pinpoint GCM Channel for application %s not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("error getting Pinpoint GCM Channel for application %s: %s", d.Id(), err) - } - - d.Set("application_id", output.GCMChannelResponse.ApplicationId) - d.Set("enabled", output.GCMChannelResponse.Enabled) - // api_key is never returned - - return nil -} - -func resourceAwsPinpointGCMChannelDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[DEBUG] Deleting Pinpoint GCM Channel for application %s", d.Id()) - _, err := conn.DeleteGcmChannel(&pinpoint.DeleteGcmChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting Pinpoint GCM Channel for application %s: %s", d.Id(), err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_sms_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_sms_channel.go deleted file mode 100644 index 659d852cb..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_sms_channel.go +++ /dev/null @@ -1,128 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/pinpoint" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsPinpointSMSChannel() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsPinpointSMSChannelUpsert, - Read: resourceAwsPinpointSMSChannelRead, - Update: resourceAwsPinpointSMSChannelUpsert, - Delete: resourceAwsPinpointSMSChannelDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "application_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "sender_id": { - Type: schema.TypeString, - Optional: true, - }, - "short_code": { - Type: schema.TypeString, - Optional: true, - }, - "promotional_messages_per_second": { - Type: schema.TypeInt, - Computed: true, - }, - "transactional_messages_per_second": { - Type: schema.TypeInt, - Computed: true, - }, - }, - } -} - -func resourceAwsPinpointSMSChannelUpsert(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - applicationId := d.Get("application_id").(string) - - params := &pinpoint.SMSChannelRequest{} - - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - - if d.HasChange("sender_id") { - params.SenderId = aws.String(d.Get("sender_id").(string)) - } - - if d.HasChange("short_code") { - params.ShortCode = aws.String(d.Get("short_code").(string)) - } - - req := pinpoint.UpdateSmsChannelInput{ - ApplicationId: aws.String(applicationId), - SMSChannelRequest: params, - } - - _, err := conn.UpdateSmsChannel(&req) - if err != nil { - return fmt.Errorf("error putting Pinpoint SMS Channel for application %s: %s", applicationId, err) - } - - d.SetId(applicationId) - - return resourceAwsPinpointSMSChannelRead(d, meta) -} - -func resourceAwsPinpointSMSChannelRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[INFO] Reading Pinpoint SMS Channel for application %s", d.Id()) - - output, err := conn.GetSmsChannel(&pinpoint.GetSmsChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Pinpoint SMS Channel for application %s not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("error getting Pinpoint SMS Channel for application %s: %s", d.Id(), err) - } - - d.Set("application_id", output.SMSChannelResponse.ApplicationId) - d.Set("enabled", output.SMSChannelResponse.Enabled) - d.Set("sender_id", output.SMSChannelResponse.SenderId) - d.Set("short_code", output.SMSChannelResponse.ShortCode) - d.Set("promotional_messages_per_second", aws.Int64Value(output.SMSChannelResponse.PromotionalMessagesPerSecond)) - d.Set("transactional_messages_per_second", aws.Int64Value(output.SMSChannelResponse.TransactionalMessagesPerSecond)) - return nil -} - -func resourceAwsPinpointSMSChannelDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).pinpointconn - - log.Printf("[DEBUG] Deleting Pinpoint SMS Channel for application %s", d.Id()) - _, err := conn.DeleteSmsChannel(&pinpoint.DeleteSmsChannelInput{ - ApplicationId: aws.String(d.Id()), - }) - - if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting Pinpoint SMS Channel for application %s: %s", d.Id(), err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_placement_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_placement_group.go deleted file mode 100644 index 58b579b80..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_placement_group.go +++ /dev/null @@ -1,148 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsPlacementGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsPlacementGroupCreate, - Read: resourceAwsPlacementGroupRead, - Delete: resourceAwsPlacementGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "strategy": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsPlacementGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - name := d.Get("name").(string) - input := ec2.CreatePlacementGroupInput{ - GroupName: aws.String(name), - Strategy: aws.String(d.Get("strategy").(string)), - } - log.Printf("[DEBUG] Creating EC2 Placement group: %s", input) - _, err := conn.CreatePlacementGroup(&input) - if err != nil { - return err - } - - wait := resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"available"}, - Timeout: 5 * time.Minute, - MinTimeout: 1 * time.Second, - Refresh: func() (interface{}, string, error) { - out, err := conn.DescribePlacementGroups(&ec2.DescribePlacementGroupsInput{ - GroupNames: []*string{aws.String(name)}, - }) - - if err != nil { - return out, "", err - } - - if len(out.PlacementGroups) == 0 { - return out, "", fmt.Errorf("Placement group not found (%q)", name) - } - pg := out.PlacementGroups[0] - - return out, *pg.State, nil - }, - } - - _, err = wait.WaitForState() - if err != nil { - return err - } - - log.Printf("[DEBUG] EC2 Placement group created: %q", name) - - d.SetId(name) - - return resourceAwsPlacementGroupRead(d, meta) -} - -func resourceAwsPlacementGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - input := ec2.DescribePlacementGroupsInput{ - GroupNames: []*string{aws.String(d.Id())}, - } - out, err := conn.DescribePlacementGroups(&input) - if err != nil { - return err - } - pg := out.PlacementGroups[0] - - log.Printf("[DEBUG] Received EC2 Placement Group: %s", pg) - - d.Set("name", pg.GroupName) - d.Set("strategy", pg.Strategy) - - return nil -} - -func resourceAwsPlacementGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[DEBUG] Deleting EC2 Placement Group %q", d.Id()) - _, err := conn.DeletePlacementGroup(&ec2.DeletePlacementGroupInput{ - GroupName: aws.String(d.Id()), - }) - if err != nil { - return err - } - - wait := resource.StateChangeConf{ - Pending: []string{"deleting"}, - Target: []string{"deleted"}, - Timeout: 5 * time.Minute, - MinTimeout: 1 * time.Second, - Refresh: func() (interface{}, string, error) { - out, err := conn.DescribePlacementGroups(&ec2.DescribePlacementGroupsInput{ - GroupNames: []*string{aws.String(d.Id())}, - }) - - if err != nil { - awsErr := err.(awserr.Error) - if awsErr.Code() == "InvalidPlacementGroup.Unknown" { - return out, "deleted", nil - } - return out, "", awsErr - } - - if len(out.PlacementGroups) == 0 { - return out, "deleted", nil - } - - pg := out.PlacementGroups[0] - - return out, *pg.State, nil - }, - } - - _, err = wait.WaitForState() - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_proxy_protocol_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_proxy_protocol_policy.go deleted file mode 100644 index 094bfbc5b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_proxy_protocol_policy.go +++ /dev/null @@ -1,266 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsProxyProtocolPolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsProxyProtocolPolicyCreate, - Read: resourceAwsProxyProtocolPolicyRead, - Update: resourceAwsProxyProtocolPolicyUpdate, - Delete: resourceAwsProxyProtocolPolicyDelete, - - Schema: map[string]*schema.Schema{ - "load_balancer": { - Type: schema.TypeString, - Required: true, - }, - - "instance_ports": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Required: true, - Set: schema.HashString, - }, - }, - } -} - -func resourceAwsProxyProtocolPolicyCreate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - elbname := aws.String(d.Get("load_balancer").(string)) - - input := &elb.CreateLoadBalancerPolicyInput{ - LoadBalancerName: elbname, - PolicyAttributes: []*elb.PolicyAttribute{ - { - AttributeName: aws.String("ProxyProtocol"), - AttributeValue: aws.String("True"), - }, - }, - PolicyName: aws.String("TFEnableProxyProtocol"), - PolicyTypeName: aws.String("ProxyProtocolPolicyType"), - } - - // Create a policy - log.Printf("[DEBUG] ELB create a policy %s from policy type %s", - *input.PolicyName, *input.PolicyTypeName) - - if _, err := elbconn.CreateLoadBalancerPolicy(input); err != nil { - return fmt.Errorf("Error creating a policy %s: %s", - *input.PolicyName, err) - } - - // Assign the policy name for use later - d.Partial(true) - d.SetId(fmt.Sprintf("%s:%s", *elbname, *input.PolicyName)) - d.SetPartial("load_balancer") - log.Printf("[INFO] ELB PolicyName: %s", *input.PolicyName) - - return resourceAwsProxyProtocolPolicyUpdate(d, meta) -} - -func resourceAwsProxyProtocolPolicyRead(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - elbname := aws.String(d.Get("load_balancer").(string)) - - // Retrieve the current ELB policies for updating the state - req := &elb.DescribeLoadBalancersInput{ - LoadBalancerNames: []*string{elbname}, - } - resp, err := elbconn.DescribeLoadBalancers(req) - if err != nil { - if isLoadBalancerNotFound(err) { - // The ELB is gone now, so just remove it from the state - d.SetId("") - return nil - } - return fmt.Errorf("Error retrieving ELB attributes: %s", err) - } - - backends := flattenBackendPolicies(resp.LoadBalancerDescriptions[0].BackendServerDescriptions) - - ports := []*string{} - for ip := range backends { - ipstr := strconv.Itoa(int(ip)) - ports = append(ports, &ipstr) - } - d.Set("instance_ports", ports) - d.Set("load_balancer", *elbname) - return nil -} - -func resourceAwsProxyProtocolPolicyUpdate(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - elbname := aws.String(d.Get("load_balancer").(string)) - - // Retrieve the current ELB policies for updating the state - req := &elb.DescribeLoadBalancersInput{ - LoadBalancerNames: []*string{elbname}, - } - resp, err := elbconn.DescribeLoadBalancers(req) - if err != nil { - if isLoadBalancerNotFound(err) { - // The ELB is gone now, so just remove it from the state - d.SetId("") - return nil - } - return fmt.Errorf("Error retrieving ELB attributes: %s", err) - } - - backends := flattenBackendPolicies(resp.LoadBalancerDescriptions[0].BackendServerDescriptions) - policyName := resourceAwsProxyProtocolPolicyParseId(d.Id()) - - d.Partial(true) - if d.HasChange("instance_ports") { - o, n := d.GetChange("instance_ports") - os := o.(*schema.Set) - ns := n.(*schema.Set) - remove := os.Difference(ns).List() - add := ns.Difference(os).List() - - inputs := []*elb.SetLoadBalancerPoliciesForBackendServerInput{} - - i, err := resourceAwsProxyProtocolPolicyRemove(policyName, remove, backends) - if err != nil { - return err - } - inputs = append(inputs, i...) - - i, err = resourceAwsProxyProtocolPolicyAdd(policyName, add, backends) - if err != nil { - return err - } - inputs = append(inputs, i...) - - for _, input := range inputs { - input.LoadBalancerName = elbname - if _, err := elbconn.SetLoadBalancerPoliciesForBackendServer(input); err != nil { - return fmt.Errorf("Error setting policy for backend: %s", err) - } - } - - d.SetPartial("instance_ports") - } - - return resourceAwsProxyProtocolPolicyRead(d, meta) -} - -func resourceAwsProxyProtocolPolicyDelete(d *schema.ResourceData, meta interface{}) error { - elbconn := meta.(*AWSClient).elbconn - elbname := aws.String(d.Get("load_balancer").(string)) - - // Retrieve the current ELB policies for updating the state - req := &elb.DescribeLoadBalancersInput{ - LoadBalancerNames: []*string{elbname}, - } - var err error - resp, err := elbconn.DescribeLoadBalancers(req) - if err != nil { - if isLoadBalancerNotFound(err) { - return nil - } - return fmt.Errorf("Error retrieving ELB attributes: %s", err) - } - - backends := flattenBackendPolicies(resp.LoadBalancerDescriptions[0].BackendServerDescriptions) - ports := d.Get("instance_ports").(*schema.Set).List() - policyName := resourceAwsProxyProtocolPolicyParseId(d.Id()) - - inputs, err := resourceAwsProxyProtocolPolicyRemove(policyName, ports, backends) - if err != nil { - return fmt.Errorf("Error detaching a policy from backend: %s", err) - } - for _, input := range inputs { - input.LoadBalancerName = elbname - if _, err := elbconn.SetLoadBalancerPoliciesForBackendServer(input); err != nil { - return fmt.Errorf("Error setting policy for backend: %s", err) - } - } - - pOpt := &elb.DeleteLoadBalancerPolicyInput{ - LoadBalancerName: elbname, - PolicyName: aws.String(policyName), - } - if _, err := elbconn.DeleteLoadBalancerPolicy(pOpt); err != nil { - return fmt.Errorf("Error removing a policy from load balancer: %s", err) - } - - return nil -} - -func resourceAwsProxyProtocolPolicyRemove(policyName string, ports []interface{}, backends map[int64][]string) ([]*elb.SetLoadBalancerPoliciesForBackendServerInput, error) { - inputs := make([]*elb.SetLoadBalancerPoliciesForBackendServerInput, 0, len(ports)) - for _, p := range ports { - ip, err := strconv.ParseInt(p.(string), 10, 64) - if err != nil { - return nil, fmt.Errorf("Error detaching the policy: %s", err) - } - - newPolicies := []*string{} - curPolicies, found := backends[ip] - if !found { - // No policy for this instance port found, just skip it. - continue - } - - for _, policy := range curPolicies { - if policy == policyName { - // remove the policy - continue - } - newPolicies = append(newPolicies, &policy) - } - - inputs = append(inputs, &elb.SetLoadBalancerPoliciesForBackendServerInput{ - InstancePort: &ip, - PolicyNames: newPolicies, - }) - } - return inputs, nil -} - -func resourceAwsProxyProtocolPolicyAdd(policyName string, ports []interface{}, backends map[int64][]string) ([]*elb.SetLoadBalancerPoliciesForBackendServerInput, error) { - inputs := make([]*elb.SetLoadBalancerPoliciesForBackendServerInput, 0, len(ports)) - for _, p := range ports { - ip, err := strconv.ParseInt(p.(string), 10, 64) - if err != nil { - return nil, fmt.Errorf("Error attaching the policy: %s", err) - } - - newPolicies := []*string{} - curPolicies := backends[ip] - for _, p := range curPolicies { - if p == policyName { - // Just remove it for now. It will be back later. - continue - } else { - newPolicies = append(newPolicies, &p) - } - } - newPolicies = append(newPolicies, aws.String(policyName)) - - inputs = append(inputs, &elb.SetLoadBalancerPoliciesForBackendServerInput{ - InstancePort: &ip, - PolicyNames: newPolicies, - }) - } - return inputs, nil -} - -// resourceAwsProxyProtocolPolicyParseId takes an ID and parses it into -// it's constituent parts. You need two axes (LB name, policy name) -// to create or identify a proxy protocol policy in AWS's API. -func resourceAwsProxyProtocolPolicyParseId(id string) string { - parts := strings.SplitN(id, ":", 2) - // We currently omit the ELB name as it is not currently used anywhere - return parts[1] -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ram_resource_share.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ram_resource_share.go deleted file mode 100644 index 9820e7c67..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ram_resource_share.go +++ /dev/null @@ -1,241 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ram" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsRamResourceShare() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRamResourceShareCreate, - Read: resourceAwsRamResourceShareRead, - Update: resourceAwsRamResourceShareUpdate, - Delete: resourceAwsRamResourceShareDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(5 * time.Minute), - Delete: schema.DefaultTimeout(5 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - - "allow_external_principals": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsRamResourceShareCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ramconn - - request := &ram.CreateResourceShareInput{ - Name: aws.String(d.Get("name").(string)), - AllowExternalPrincipals: aws.Bool(d.Get("allow_external_principals").(bool)), - } - - if v, ok := d.GetOk("tags"); ok { - tags := tagsFromMapRAM(v.(map[string]interface{})) - request.Tags = tags - } - - log.Println("[DEBUG] Create RAM resource share request:", request) - createResp, err := conn.CreateResourceShare(request) - if err != nil { - return fmt.Errorf("Error creating RAM resource share: %s", err) - } - - d.SetId(aws.StringValue(createResp.ResourceShare.ResourceShareArn)) - - stateConf := &resource.StateChangeConf{ - Pending: []string{ram.ResourceShareStatusPending}, - Target: []string{ram.ResourceShareStatusActive}, - Refresh: resourceAwsRamResourceShareStateRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for RAM resource share (%s) to become ready: %s", d.Id(), err) - } - - return resourceAwsRamResourceShareRead(d, meta) -} - -func resourceAwsRamResourceShareRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ramconn - - request := &ram.GetResourceSharesInput{ - ResourceShareArns: []*string{aws.String(d.Id())}, - ResourceOwner: aws.String(ram.ResourceOwnerSelf), - } - - output, err := conn.GetResourceShares(request) - if err != nil { - if isAWSErr(err, ram.ErrCodeUnknownResourceException, "") { - log.Printf("[WARN] No RAM resource share by ARN (%s) found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error reading RAM resource share %s: %s", d.Id(), err) - } - - if len(output.ResourceShares) == 0 { - log.Printf("[WARN] No RAM resource share by ARN (%s) found, removing from state", d.Id()) - d.SetId("") - return nil - } - - resourceShare := output.ResourceShares[0] - - if aws.StringValue(resourceShare.Status) != ram.ResourceShareStatusActive { - log.Printf("[WARN] RAM resource share (%s) delet(ing|ed), removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("name", resourceShare.Name) - d.Set("allow_external_principals", resourceShare.AllowExternalPrincipals) - - if err := d.Set("tags", tagsToMapRAM(resourceShare.Tags)); err != nil { - return fmt.Errorf("Error setting tags: %s", err) - } - - return nil -} - -func resourceAwsRamResourceShareUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ramconn - - d.Partial(true) - - if d.HasChange("name") || d.HasChange("allow_external_principals") { - request := &ram.UpdateResourceShareInput{ - ResourceShareArn: aws.String(d.Id()), - Name: aws.String(d.Get("name").(string)), - AllowExternalPrincipals: aws.Bool(d.Get("allow_external_principals").(bool)), - } - - log.Println("[DEBUG] Update RAM resource share request:", request) - _, err := conn.UpdateResourceShare(request) - if err != nil { - if isAWSErr(err, ram.ErrCodeUnknownResourceException, "") { - log.Printf("[WARN] No RAM resource share by ARN (%s) found", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error updating RAM resource share %s: %s", d.Id(), err) - } - - d.SetPartial("name") - d.SetPartial("allow_external_principals") - } - - if d.HasChange("tags") { - // Reset all tags to empty set - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - c, r := diffTagsRAM(tagsFromMapRAM(o), tagsFromMapRAM(n)) - - if len(r) > 0 { - _, err := conn.UntagResource(&ram.UntagResourceInput{ - ResourceShareArn: aws.String(d.Id()), - TagKeys: tagKeysRam(r), - }) - if err != nil { - return fmt.Errorf("Error deleting RAM resource share tags: %s", err) - } - } - - if len(c) > 0 { - input := &ram.TagResourceInput{ - ResourceShareArn: aws.String(d.Id()), - Tags: c, - } - _, err := conn.TagResource(input) - if err != nil { - return fmt.Errorf("Error updating RAM resource share tags: %s", err) - } - } - - d.SetPartial("tags") - } - - d.Partial(false) - - return resourceAwsRamResourceShareRead(d, meta) -} - -func resourceAwsRamResourceShareDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ramconn - - deleteResourceShareInput := &ram.DeleteResourceShareInput{ - ResourceShareArn: aws.String(d.Id()), - } - - log.Println("[DEBUG] Delete RAM resource share request:", deleteResourceShareInput) - _, err := conn.DeleteResourceShare(deleteResourceShareInput) - if err != nil { - if isAWSErr(err, ram.ErrCodeUnknownResourceException, "") { - return nil - } - return fmt.Errorf("Error deleting RAM resource share %s: %s", d.Id(), err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{ram.ResourceShareStatusDeleting}, - Target: []string{ram.ResourceShareStatusDeleted}, - Refresh: resourceAwsRamResourceShareStateRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutDelete), - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for RAM resource share (%s) to become ready: %s", d.Id(), err) - } - - return nil -} - -func resourceAwsRamResourceShareStateRefreshFunc(conn *ram.RAM, resourceShareArn string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - request := &ram.GetResourceSharesInput{ - ResourceShareArns: []*string{aws.String(resourceShareArn)}, - ResourceOwner: aws.String(ram.ResourceOwnerSelf), - } - - output, err := conn.GetResourceShares(request) - - if err != nil { - return nil, ram.ResourceShareStatusFailed, err - } - - if len(output.ResourceShares) == 0 { - return nil, ram.ResourceShareStatusDeleted, nil - } - - resourceShare := output.ResourceShares[0] - - return resourceShare, aws.StringValue(resourceShare.Status), nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go deleted file mode 100644 index ba3f28c88..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go +++ /dev/null @@ -1,1335 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "regexp" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsRDSCluster() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRDSClusterCreate, - Read: resourceAwsRDSClusterRead, - Update: resourceAwsRDSClusterUpdate, - Delete: resourceAwsRDSClusterDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsRdsClusterImport, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(120 * time.Minute), - Update: schema.DefaultTimeout(120 * time.Minute), - Delete: schema.DefaultTimeout(120 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "availability_zones": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - ForceNew: true, - Computed: true, - Set: schema.HashString, - }, - - "backtrack_window": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(0, 259200), - }, - - "cluster_identifier": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"cluster_identifier_prefix"}, - ValidateFunc: validateRdsIdentifier, - }, - "cluster_identifier_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"cluster_identifier"}, - ValidateFunc: validateRdsIdentifierPrefix, - }, - - "cluster_members": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Computed: true, - Set: schema.HashString, - }, - - "database_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "db_subnet_group_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "db_cluster_parameter_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "deletion_protection": { - Type: schema.TypeBool, - Optional: true, - }, - - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "global_cluster_identifier": { - Type: schema.TypeString, - Optional: true, - }, - - "reader_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "hosted_zone_id": { - Type: schema.TypeString, - Computed: true, - }, - - "engine": { - Type: schema.TypeString, - Optional: true, - Default: "aurora", - ForceNew: true, - ValidateFunc: validateRdsEngine(), - }, - - "engine_mode": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "provisioned", - ValidateFunc: validation.StringInSlice([]string{ - "global", - "parallelquery", - "provisioned", - "serverless", - }, false), - }, - - "engine_version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "scaling_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "1" && new == "0" { - return true - } - return false - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "auto_pause": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "max_capacity": { - Type: schema.TypeInt, - Optional: true, - Default: 16, - }, - "min_capacity": { - Type: schema.TypeInt, - Optional: true, - Default: 2, - }, - "seconds_until_auto_pause": { - Type: schema.TypeInt, - Optional: true, - Default: 300, - ValidateFunc: validation.IntBetween(300, 86400), - }, - }, - }, - }, - - "storage_encrypted": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - // Allow configuration to be unset when using engine_mode serverless, as its required to be true - // InvalidParameterCombination: Aurora Serverless DB clusters are always encrypted at rest. Encryption can't be disabled. - if d.Get("engine_mode").(string) != "serverless" { - return false - } - if new != "false" { - return false - } - return true - }, - }, - - "s3_import": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{ - "snapshot_identifier", - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "bucket_prefix": { - Type: schema.TypeString, - Required: false, - Optional: true, - ForceNew: true, - }, - "ingestion_role": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "source_engine": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "source_engine_version": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - }, - }, - - "final_snapshot_identifier": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - es = append(es, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - es = append(es, fmt.Errorf("%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - es = append(es, fmt.Errorf("%q cannot end in a hyphen", k)) - } - return - }, - }, - - "skip_final_snapshot": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "master_username": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - }, - - "master_password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - - "snapshot_identifier": { - Type: schema.TypeString, - Computed: false, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "port": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - - // apply_immediately is used to determine when the update modifications - // take place. - // See http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html - "apply_immediately": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "vpc_security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "preferred_backup_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateOnceADayWindowFormat, - }, - - "preferred_maintenance_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - StateFunc: func(val interface{}) string { - if val == nil { - return "" - } - return strings.ToLower(val.(string)) - }, - ValidateFunc: validateOnceAWeekWindowFormat, - }, - - "backup_retention_period": { - Type: schema.TypeInt, - Optional: true, - Default: 1, - ValidateFunc: validation.IntAtMost(35), - }, - - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - - "replication_source_identifier": { - Type: schema.TypeString, - Optional: true, - }, - - "iam_roles": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "iam_database_authentication_enabled": { - Type: schema.TypeBool, - Optional: true, - }, - - "cluster_resource_id": { - Type: schema.TypeString, - Computed: true, - }, - - "source_region": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "enabled_cloudwatch_logs_exports": { - Type: schema.TypeList, - Computed: false, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - "audit", - "error", - "general", - "slowquery", - }, false), - }, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsRdsClusterImport( - d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - // Neither skip_final_snapshot nor final_snapshot_identifier can be fetched - // from any API call, so we need to default skip_final_snapshot to true so - // that final_snapshot_identifier is not required - d.Set("skip_final_snapshot", true) - return []*schema.ResourceData{d}, nil -} - -func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - tags := tagsFromMapRDS(d.Get("tags").(map[string]interface{})) - - // Some API calls (e.g. RestoreDBClusterFromSnapshot do not support all - // parameters to correctly apply all settings in one pass. For missing - // parameters or unsupported configurations, we may need to call - // ModifyDBInstance afterwards to prevent Terraform operators from API - // errors or needing to double apply. - var requiresModifyDbCluster bool - modifyDbClusterInput := &rds.ModifyDBClusterInput{ - ApplyImmediately: aws.Bool(true), - } - - var identifier string - if v, ok := d.GetOk("cluster_identifier"); ok { - identifier = v.(string) - } else if v, ok := d.GetOk("cluster_identifier_prefix"); ok { - identifier = resource.PrefixedUniqueId(v.(string)) - } else { - identifier = resource.PrefixedUniqueId("tf-") - } - - if _, ok := d.GetOk("snapshot_identifier"); ok { - opts := rds.RestoreDBClusterFromSnapshotInput{ - DBClusterIdentifier: aws.String(identifier), - DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), - Engine: aws.String(d.Get("engine").(string)), - EngineMode: aws.String(d.Get("engine_mode").(string)), - ScalingConfiguration: expandRdsScalingConfiguration(d.Get("scaling_configuration").([]interface{})), - SnapshotIdentifier: aws.String(d.Get("snapshot_identifier").(string)), - Tags: tags, - } - - if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { - opts.AvailabilityZones = expandStringList(attr.List()) - } - - // Need to check value > 0 due to: - // InvalidParameterValue: Backtrack is not enabled for the aurora-postgresql engine. - if v, ok := d.GetOk("backtrack_window"); ok && v.(int) > 0 { - opts.BacktrackWindow = aws.Int64(int64(v.(int))) - } - - if attr, ok := d.GetOk("backup_retention_period"); ok { - modifyDbClusterInput.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) - requiresModifyDbCluster = true - } - - if attr, ok := d.GetOk("database_name"); ok { - opts.DatabaseName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { - opts.DBClusterParameterGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("db_subnet_group_name"); ok { - opts.DBSubnetGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { - opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) - } - - if attr, ok := d.GetOk("engine_version"); ok { - opts.EngineVersion = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("kms_key_id"); ok { - opts.KmsKeyId = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("option_group_name"); ok { - opts.OptionGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("port"); ok { - opts.Port = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("preferred_backup_window"); ok { - modifyDbClusterInput.PreferredBackupWindow = aws.String(attr.(string)) - requiresModifyDbCluster = true - } - - if attr, ok := d.GetOk("preferred_maintenance_window"); ok { - modifyDbClusterInput.PreferredMaintenanceWindow = aws.String(attr.(string)) - requiresModifyDbCluster = true - } - - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - opts.VpcSecurityGroupIds = expandStringList(attr.List()) - } - - log.Printf("[DEBUG] RDS Cluster restore from snapshot configuration: %s", opts) - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.RestoreDBClusterFromSnapshot(&opts) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error creating RDS Cluster: %s", err) - } - } else if _, ok := d.GetOk("replication_source_identifier"); ok { - createOpts := &rds.CreateDBClusterInput{ - DBClusterIdentifier: aws.String(identifier), - DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), - Engine: aws.String(d.Get("engine").(string)), - EngineMode: aws.String(d.Get("engine_mode").(string)), - ReplicationSourceIdentifier: aws.String(d.Get("replication_source_identifier").(string)), - ScalingConfiguration: expandRdsScalingConfiguration(d.Get("scaling_configuration").([]interface{})), - Tags: tags, - } - - // Need to check value > 0 due to: - // InvalidParameterValue: Backtrack is not enabled for the aurora-postgresql engine. - if v, ok := d.GetOk("backtrack_window"); ok && v.(int) > 0 { - createOpts.BacktrackWindow = aws.Int64(int64(v.(int))) - } - - if attr, ok := d.GetOk("port"); ok { - createOpts.Port = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("db_subnet_group_name"); ok { - createOpts.DBSubnetGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { - createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("engine_version"); ok { - createOpts.EngineVersion = aws.String(attr.(string)) - } - - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - createOpts.VpcSecurityGroupIds = expandStringList(attr.List()) - } - - if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { - createOpts.AvailabilityZones = expandStringList(attr.List()) - } - - if v, ok := d.GetOk("backup_retention_period"); ok { - createOpts.BackupRetentionPeriod = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("preferred_backup_window"); ok { - createOpts.PreferredBackupWindow = aws.String(v.(string)) - } - - if v, ok := d.GetOk("preferred_maintenance_window"); ok { - createOpts.PreferredMaintenanceWindow = aws.String(v.(string)) - } - - if attr, ok := d.GetOk("kms_key_id"); ok { - createOpts.KmsKeyId = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("source_region"); ok { - createOpts.SourceRegion = aws.String(attr.(string)) - } - - if attr, ok := d.GetOkExists("storage_encrypted"); ok { - createOpts.StorageEncrypted = aws.Bool(attr.(bool)) - } - - if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { - createOpts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) - } - - log.Printf("[DEBUG] Create RDS Cluster as read replica: %s", createOpts) - var resp *rds.CreateDBClusterOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - resp, err = conn.CreateDBCluster(createOpts) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error creating RDS cluster: %s", err) - } - - log.Printf("[DEBUG]: RDS Cluster create response: %s", resp) - - } else if v, ok := d.GetOk("s3_import"); ok { - if _, ok := d.GetOk("master_password"); !ok { - return fmt.Errorf(`provider.aws: aws_db_instance: %s: "master_password": required field is not set`, d.Get("name").(string)) - } - if _, ok := d.GetOk("master_username"); !ok { - return fmt.Errorf(`provider.aws: aws_db_instance: %s: "master_username": required field is not set`, d.Get("name").(string)) - } - s3_bucket := v.([]interface{})[0].(map[string]interface{}) - createOpts := &rds.RestoreDBClusterFromS3Input{ - DBClusterIdentifier: aws.String(identifier), - DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), - Engine: aws.String(d.Get("engine").(string)), - MasterUsername: aws.String(d.Get("master_username").(string)), - MasterUserPassword: aws.String(d.Get("master_password").(string)), - S3BucketName: aws.String(s3_bucket["bucket_name"].(string)), - S3IngestionRoleArn: aws.String(s3_bucket["ingestion_role"].(string)), - S3Prefix: aws.String(s3_bucket["bucket_prefix"].(string)), - SourceEngine: aws.String(s3_bucket["source_engine"].(string)), - SourceEngineVersion: aws.String(s3_bucket["source_engine_version"].(string)), - Tags: tags, - } - - // Need to check value > 0 due to: - // InvalidParameterValue: Backtrack is not enabled for the aurora-postgresql engine. - if v, ok := d.GetOk("backtrack_window"); ok && v.(int) > 0 { - createOpts.BacktrackWindow = aws.Int64(int64(v.(int))) - } - - if v := d.Get("database_name"); v.(string) != "" { - createOpts.DatabaseName = aws.String(v.(string)) - } - - if attr, ok := d.GetOk("port"); ok { - createOpts.Port = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("db_subnet_group_name"); ok { - createOpts.DBSubnetGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { - createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("engine_version"); ok { - createOpts.EngineVersion = aws.String(attr.(string)) - } - - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - createOpts.VpcSecurityGroupIds = expandStringList(attr.List()) - } - - if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { - createOpts.AvailabilityZones = expandStringList(attr.List()) - } - - if v, ok := d.GetOk("backup_retention_period"); ok { - createOpts.BackupRetentionPeriod = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("preferred_backup_window"); ok { - createOpts.PreferredBackupWindow = aws.String(v.(string)) - } - - if v, ok := d.GetOk("preferred_maintenance_window"); ok { - createOpts.PreferredMaintenanceWindow = aws.String(v.(string)) - } - - if attr, ok := d.GetOk("kms_key_id"); ok { - createOpts.KmsKeyId = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("iam_database_authentication_enabled"); ok { - createOpts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) - } - - if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { - createOpts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) - } - - if attr, ok := d.GetOkExists("storage_encrypted"); ok { - createOpts.StorageEncrypted = aws.Bool(attr.(bool)) - } - - log.Printf("[DEBUG] RDS Cluster restore options: %s", createOpts) - // Retry for IAM/S3 eventual consistency - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - resp, err := conn.RestoreDBClusterFromS3(createOpts) - if err != nil { - // InvalidParameterValue: Files from the specified Amazon S3 bucket cannot be downloaded. - // Make sure that you have created an AWS Identity and Access Management (IAM) role that lets Amazon RDS access Amazon S3 for you. - if isAWSErr(err, "InvalidParameterValue", "Files from the specified Amazon S3 bucket cannot be downloaded") { - return resource.RetryableError(err) - } - if isAWSErr(err, "InvalidParameterValue", "S3_SNAPSHOT_INGESTION") { - return resource.RetryableError(err) - } - if isAWSErr(err, "InvalidParameterValue", "S3 bucket cannot be found") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - log.Printf("[DEBUG]: RDS Cluster create response: %s", resp) - return nil - }) - - if err != nil { - log.Printf("[ERROR] Error creating RDS Cluster: %s", err) - return err - } - - } else { - if _, ok := d.GetOk("master_password"); !ok { - return fmt.Errorf(`provider.aws: aws_rds_cluster: %s: "master_password": required field is not set`, d.Get("database_name").(string)) - } - - if _, ok := d.GetOk("master_username"); !ok { - return fmt.Errorf(`provider.aws: aws_rds_cluster: %s: "master_username": required field is not set`, d.Get("database_name").(string)) - } - - createOpts := &rds.CreateDBClusterInput{ - DBClusterIdentifier: aws.String(identifier), - DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), - Engine: aws.String(d.Get("engine").(string)), - EngineMode: aws.String(d.Get("engine_mode").(string)), - MasterUserPassword: aws.String(d.Get("master_password").(string)), - MasterUsername: aws.String(d.Get("master_username").(string)), - ScalingConfiguration: expandRdsScalingConfiguration(d.Get("scaling_configuration").([]interface{})), - Tags: tags, - } - - // Need to check value > 0 due to: - // InvalidParameterValue: Backtrack is not enabled for the aurora-postgresql engine. - if v, ok := d.GetOk("backtrack_window"); ok && v.(int) > 0 { - createOpts.BacktrackWindow = aws.Int64(int64(v.(int))) - } - - if v := d.Get("database_name"); v.(string) != "" { - createOpts.DatabaseName = aws.String(v.(string)) - } - - if attr, ok := d.GetOk("port"); ok { - createOpts.Port = aws.Int64(int64(attr.(int))) - } - - if attr, ok := d.GetOk("db_subnet_group_name"); ok { - createOpts.DBSubnetGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { - createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("engine_version"); ok { - createOpts.EngineVersion = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("global_cluster_identifier"); ok { - createOpts.GlobalClusterIdentifier = aws.String(attr.(string)) - } - - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - createOpts.VpcSecurityGroupIds = expandStringList(attr.List()) - } - - if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { - createOpts.AvailabilityZones = expandStringList(attr.List()) - } - - if v, ok := d.GetOk("backup_retention_period"); ok { - createOpts.BackupRetentionPeriod = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("preferred_backup_window"); ok { - createOpts.PreferredBackupWindow = aws.String(v.(string)) - } - - if v, ok := d.GetOk("preferred_maintenance_window"); ok { - createOpts.PreferredMaintenanceWindow = aws.String(v.(string)) - } - - if attr, ok := d.GetOk("kms_key_id"); ok { - createOpts.KmsKeyId = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("iam_database_authentication_enabled"); ok { - createOpts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) - } - - if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { - createOpts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) - } - - if attr, ok := d.GetOk("scaling_configuration"); ok && len(attr.([]interface{})) > 0 { - createOpts.ScalingConfiguration = expandRdsScalingConfiguration(attr.([]interface{})) - } - - if attr, ok := d.GetOkExists("storage_encrypted"); ok { - createOpts.StorageEncrypted = aws.Bool(attr.(bool)) - } - - log.Printf("[DEBUG] RDS Cluster create options: %s", createOpts) - var resp *rds.CreateDBClusterOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - resp, err = conn.CreateDBCluster(createOpts) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error creating RDS cluster: %s", err) - } - - log.Printf("[DEBUG]: RDS Cluster create response: %s", resp) - } - - d.SetId(identifier) - - log.Printf("[INFO] RDS Cluster ID: %s", d.Id()) - - log.Println( - "[INFO] Waiting for RDS Cluster to be available") - - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsRdsClusterCreatePendingStates, - Target: []string{"available"}, - Refresh: resourceAwsRDSClusterStateRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for RDS Cluster state to be \"available\": %s", err) - } - - if v, ok := d.GetOk("iam_roles"); ok { - for _, role := range v.(*schema.Set).List() { - err := setIamRoleToRdsCluster(d.Id(), role.(string), conn) - if err != nil { - return err - } - } - } - - if requiresModifyDbCluster { - modifyDbClusterInput.DBClusterIdentifier = aws.String(d.Id()) - - log.Printf("[INFO] RDS Cluster (%s) configuration requires ModifyDBCluster: %s", d.Id(), modifyDbClusterInput) - _, err := conn.ModifyDBCluster(modifyDbClusterInput) - if err != nil { - return fmt.Errorf("error modifying RDS Cluster (%s): %s", d.Id(), err) - } - - log.Printf("[INFO] Waiting for RDS Cluster (%s) to be available", d.Id()) - err = waitForRDSClusterUpdate(conn, d.Id(), d.Timeout(schema.TimeoutCreate)) - if err != nil { - return fmt.Errorf("error waiting for RDS Cluster (%s) to be available: %s", d.Id(), err) - } - } - - return resourceAwsRDSClusterRead(d, meta) -} - -func resourceAwsRDSClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - input := &rds.DescribeDBClustersInput{ - DBClusterIdentifier: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Describing RDS Cluster: %s", input) - resp, err := conn.DescribeDBClusters(input) - - if isAWSErr(err, rds.ErrCodeDBClusterNotFoundFault, "") { - log.Printf("[WARN] RDS Cluster (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error describing RDS Cluster (%s): %s", d.Id(), err) - } - - if resp == nil { - return fmt.Errorf("Error retrieving RDS cluster: empty response for: %s", input) - } - - var dbc *rds.DBCluster - for _, c := range resp.DBClusters { - if aws.StringValue(c.DBClusterIdentifier) == d.Id() { - dbc = c - break - } - } - - if dbc == nil { - log.Printf("[WARN] RDS Cluster (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err := d.Set("availability_zones", aws.StringValueSlice(dbc.AvailabilityZones)); err != nil { - return fmt.Errorf("error setting availability_zones: %s", err) - } - - d.Set("arn", dbc.DBClusterArn) - d.Set("backtrack_window", int(aws.Int64Value(dbc.BacktrackWindow))) - d.Set("backup_retention_period", dbc.BackupRetentionPeriod) - d.Set("cluster_identifier", dbc.DBClusterIdentifier) - - var cm []string - for _, m := range dbc.DBClusterMembers { - cm = append(cm, aws.StringValue(m.DBInstanceIdentifier)) - } - if err := d.Set("cluster_members", cm); err != nil { - return fmt.Errorf("error setting cluster_members: %s", err) - } - - d.Set("cluster_resource_id", dbc.DbClusterResourceId) - - // Only set the DatabaseName if it is not nil. There is a known API bug where - // RDS accepts a DatabaseName but does not return it, causing a perpetual - // diff. - // See https://github.com/hashicorp/terraform/issues/4671 for backstory - if dbc.DatabaseName != nil { - d.Set("database_name", dbc.DatabaseName) - } - - d.Set("db_cluster_parameter_group_name", dbc.DBClusterParameterGroup) - d.Set("db_subnet_group_name", dbc.DBSubnetGroup) - d.Set("deletion_protection", dbc.DeletionProtection) - - if err := d.Set("enabled_cloudwatch_logs_exports", aws.StringValueSlice(dbc.EnabledCloudwatchLogsExports)); err != nil { - return fmt.Errorf("error setting enabled_cloudwatch_logs_exports: %s", err) - } - - d.Set("endpoint", dbc.Endpoint) - d.Set("engine_mode", dbc.EngineMode) - d.Set("engine_version", dbc.EngineVersion) - d.Set("engine", dbc.Engine) - d.Set("hosted_zone_id", dbc.HostedZoneId) - d.Set("iam_database_authentication_enabled", dbc.IAMDatabaseAuthenticationEnabled) - - var roles []string - for _, r := range dbc.AssociatedRoles { - roles = append(roles, aws.StringValue(r.RoleArn)) - } - if err := d.Set("iam_roles", roles); err != nil { - return fmt.Errorf("error setting iam_roles: %s", err) - } - - d.Set("kms_key_id", dbc.KmsKeyId) - d.Set("master_username", dbc.MasterUsername) - d.Set("port", dbc.Port) - d.Set("preferred_backup_window", dbc.PreferredBackupWindow) - d.Set("preferred_maintenance_window", dbc.PreferredMaintenanceWindow) - d.Set("reader_endpoint", dbc.ReaderEndpoint) - d.Set("replication_source_identifier", dbc.ReplicationSourceIdentifier) - - if err := d.Set("scaling_configuration", flattenRdsScalingConfigurationInfo(dbc.ScalingConfigurationInfo)); err != nil { - return fmt.Errorf("error setting scaling_configuration: %s", err) - } - - d.Set("storage_encrypted", dbc.StorageEncrypted) - - var vpcg []string - for _, g := range dbc.VpcSecurityGroups { - vpcg = append(vpcg, aws.StringValue(g.VpcSecurityGroupId)) - } - if err := d.Set("vpc_security_group_ids", vpcg); err != nil { - return fmt.Errorf("error setting vpc_security_group_ids: %s", err) - } - - // Fetch and save tags - if err := saveTagsRDS(conn, d, aws.StringValue(dbc.DBClusterArn)); err != nil { - log.Printf("[WARN] Failed to save tags for RDS Cluster (%s): %s", aws.StringValue(dbc.DBClusterIdentifier), err) - } - - // Fetch and save Global Cluster if engine mode global - d.Set("global_cluster_identifier", "") - - if aws.StringValue(dbc.EngineMode) == "global" { - globalCluster, err := rdsDescribeGlobalClusterFromDbClusterARN(conn, aws.StringValue(dbc.DBClusterArn)) - - if err != nil { - return fmt.Errorf("error reading RDS Global Cluster information for DB Cluster (%s): %s", d.Id(), err) - } - - if globalCluster != nil { - d.Set("global_cluster_identifier", globalCluster.GlobalClusterIdentifier) - } - } - - return nil -} - -func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - requestUpdate := false - - req := &rds.ModifyDBClusterInput{ - ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), - DBClusterIdentifier: aws.String(d.Id()), - } - - if d.HasChange("backtrack_window") { - req.BacktrackWindow = aws.Int64(int64(d.Get("backtrack_window").(int))) - requestUpdate = true - } - - if d.HasChange("master_password") { - req.MasterUserPassword = aws.String(d.Get("master_password").(string)) - requestUpdate = true - } - - if d.HasChange("engine_version") { - req.EngineVersion = aws.String(d.Get("engine_version").(string)) - requestUpdate = true - } - - if d.HasChange("vpc_security_group_ids") { - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - req.VpcSecurityGroupIds = expandStringList(attr.List()) - } else { - req.VpcSecurityGroupIds = []*string{} - } - requestUpdate = true - } - - if d.HasChange("preferred_backup_window") { - req.PreferredBackupWindow = aws.String(d.Get("preferred_backup_window").(string)) - requestUpdate = true - } - - if d.HasChange("preferred_maintenance_window") { - req.PreferredMaintenanceWindow = aws.String(d.Get("preferred_maintenance_window").(string)) - requestUpdate = true - } - - if d.HasChange("backup_retention_period") { - req.BackupRetentionPeriod = aws.Int64(int64(d.Get("backup_retention_period").(int))) - requestUpdate = true - } - - if d.HasChange("db_cluster_parameter_group_name") { - d.SetPartial("db_cluster_parameter_group_name") - req.DBClusterParameterGroupName = aws.String(d.Get("db_cluster_parameter_group_name").(string)) - requestUpdate = true - } - - if d.HasChange("deletion_protection") { - req.DeletionProtection = aws.Bool(d.Get("deletion_protection").(bool)) - requestUpdate = true - } - - if d.HasChange("iam_database_authentication_enabled") { - req.EnableIAMDatabaseAuthentication = aws.Bool(d.Get("iam_database_authentication_enabled").(bool)) - requestUpdate = true - } - - if d.HasChange("enabled_cloudwatch_logs_exports") { - d.SetPartial("enabled_cloudwatch_logs_exports") - req.CloudwatchLogsExportConfiguration = buildCloudwatchLogsExportConfiguration(d) - requestUpdate = true - } - - if d.HasChange("scaling_configuration") { - d.SetPartial("scaling_configuration") - req.ScalingConfiguration = expandRdsScalingConfiguration(d.Get("scaling_configuration").([]interface{})) - requestUpdate = true - } - - if requestUpdate { - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.ModifyDBCluster(req) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - - if isAWSErr(err, rds.ErrCodeInvalidDBClusterStateFault, "Cannot modify engine version without a primary instance in DB cluster") { - return resource.NonRetryableError(err) - } - - if isAWSErr(err, rds.ErrCodeInvalidDBClusterStateFault, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Failed to modify RDS Cluster (%s): %s", d.Id(), err) - } - - log.Printf("[INFO] Waiting for RDS Cluster (%s) to be available", d.Id()) - err = waitForRDSClusterUpdate(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return fmt.Errorf("error waiting for RDS Cluster (%s) to be available: %s", d.Id(), err) - } - } - - if d.HasChange("global_cluster_identifier") { - oRaw, nRaw := d.GetChange("global_cluster_identifier") - o := oRaw.(string) - n := nRaw.(string) - - if o == "" { - return errors.New("Existing RDS Clusters cannot be added to an existing RDS Global Cluster") - } - - if n != "" { - return errors.New("Existing RDS Clusters cannot be migrated between existing RDS Global Clusters") - } - - input := &rds.RemoveFromGlobalClusterInput{ - DbClusterIdentifier: aws.String(d.Get("arn").(string)), - GlobalClusterIdentifier: aws.String(o), - } - - log.Printf("[DEBUG] Removing RDS Cluster from RDS Global Cluster: %s", input) - if _, err := conn.RemoveFromGlobalCluster(input); err != nil { - return fmt.Errorf("error removing RDS Cluster (%s) from RDS Global Cluster: %s", d.Id(), err) - } - } - - if d.HasChange("iam_roles") { - oraw, nraw := d.GetChange("iam_roles") - if oraw == nil { - oraw = new(schema.Set) - } - if nraw == nil { - nraw = new(schema.Set) - } - - os := oraw.(*schema.Set) - ns := nraw.(*schema.Set) - removeRoles := os.Difference(ns) - enableRoles := ns.Difference(os) - - for _, role := range enableRoles.List() { - err := setIamRoleToRdsCluster(d.Id(), role.(string), conn) - if err != nil { - return err - } - } - - for _, role := range removeRoles.List() { - err := removeIamRoleFromRdsCluster(d.Id(), role.(string), conn) - if err != nil { - return err - } - } - } - - if d.HasChange("tags") { - if err := setTagsRDS(conn, d, d.Get("arn").(string)); err != nil { - return err - } else { - d.SetPartial("tags") - } - } - - return resourceAwsRDSClusterRead(d, meta) -} - -func resourceAwsRDSClusterDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - log.Printf("[DEBUG] Destroying RDS Cluster (%s)", d.Id()) - - // Automatically remove from global cluster to bypass this error on deletion: - // InvalidDBClusterStateFault: This cluster is a part of a global cluster, please remove it from globalcluster first - if d.Get("global_cluster_identifier").(string) != "" { - input := &rds.RemoveFromGlobalClusterInput{ - DbClusterIdentifier: aws.String(d.Get("arn").(string)), - GlobalClusterIdentifier: aws.String(d.Get("global_cluster_identifier").(string)), - } - - log.Printf("[DEBUG] Removing RDS Cluster from RDS Global Cluster: %s", input) - _, err := conn.RemoveFromGlobalCluster(input) - - if err != nil && !isAWSErr(err, rds.ErrCodeGlobalClusterNotFoundFault, "") { - return fmt.Errorf("error removing RDS Cluster (%s) from RDS Global Cluster: %s", d.Id(), err) - } - } - - deleteOpts := rds.DeleteDBClusterInput{ - DBClusterIdentifier: aws.String(d.Id()), - } - - skipFinalSnapshot := d.Get("skip_final_snapshot").(bool) - deleteOpts.SkipFinalSnapshot = aws.Bool(skipFinalSnapshot) - - if !skipFinalSnapshot { - if name, present := d.GetOk("final_snapshot_identifier"); present { - deleteOpts.FinalDBSnapshotIdentifier = aws.String(name.(string)) - } else { - return fmt.Errorf("RDS Cluster FinalSnapshotIdentifier is required when a final snapshot is required") - } - } - - log.Printf("[DEBUG] RDS Cluster delete options: %s", deleteOpts) - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteDBCluster(&deleteOpts) - if err != nil { - if isAWSErr(err, rds.ErrCodeInvalidDBClusterStateFault, "is not currently in the available state") { - return resource.RetryableError(err) - } - if isAWSErr(err, rds.ErrCodeDBClusterNotFoundFault, "") { - return nil - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("RDS Cluster cannot be deleted: %s", err) - } - - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsRdsClusterDeletePendingStates, - Target: []string{"destroyed"}, - Refresh: resourceAwsRDSClusterStateRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutDelete), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error deleting RDS Cluster (%s): %s", d.Id(), err) - } - - return nil -} - -func resourceAwsRDSClusterStateRefreshFunc(conn *rds.RDS, dbClusterIdentifier string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeDBClusters(&rds.DescribeDBClustersInput{ - DBClusterIdentifier: aws.String(dbClusterIdentifier), - }) - - if isAWSErr(err, rds.ErrCodeDBClusterNotFoundFault, "") { - return 42, "destroyed", nil - } - - if err != nil { - return nil, "", err - } - - var dbc *rds.DBCluster - - for _, c := range resp.DBClusters { - if *c.DBClusterIdentifier == dbClusterIdentifier { - dbc = c - } - } - - if dbc == nil { - return 42, "destroyed", nil - } - - if dbc.Status != nil { - log.Printf("[DEBUG] DB Cluster status (%s): %s", dbClusterIdentifier, *dbc.Status) - } - - return dbc, aws.StringValue(dbc.Status), nil - } -} - -func setIamRoleToRdsCluster(clusterIdentifier string, roleArn string, conn *rds.RDS) error { - params := &rds.AddRoleToDBClusterInput{ - DBClusterIdentifier: aws.String(clusterIdentifier), - RoleArn: aws.String(roleArn), - } - _, err := conn.AddRoleToDBCluster(params) - return err -} - -func removeIamRoleFromRdsCluster(clusterIdentifier string, roleArn string, conn *rds.RDS) error { - params := &rds.RemoveRoleFromDBClusterInput{ - DBClusterIdentifier: aws.String(clusterIdentifier), - RoleArn: aws.String(roleArn), - } - _, err := conn.RemoveRoleFromDBCluster(params) - return err -} - -var resourceAwsRdsClusterCreatePendingStates = []string{ - "creating", - "backing-up", - "modifying", - "preparing-data-migration", - "migrating", - "resetting-master-credentials", -} - -var resourceAwsRdsClusterDeletePendingStates = []string{ - "available", - "deleting", - "backing-up", - "modifying", -} - -var resourceAwsRdsClusterUpdatePendingStates = []string{ - "backing-up", - "modifying", - "resetting-master-credentials", - "upgrading", -} - -func waitForRDSClusterUpdate(conn *rds.RDS, id string, timeout time.Duration) error { - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsRdsClusterUpdatePendingStates, - Target: []string{"available"}, - Refresh: resourceAwsRDSClusterStateRefreshFunc(conn, id), - Timeout: timeout, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - _, err := stateConf.WaitForState() - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_endpoint.go deleted file mode 100644 index 3c24a35ec..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_endpoint.go +++ /dev/null @@ -1,267 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -const ( - AWSRDSClusterEndpointRetryDelay = 5 * time.Second - AWSRDSClusterEndpointRetryMinTimeout = 3 * time.Second -) - -func resourceAwsRDSClusterEndpoint() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRDSClusterEndpointCreate, - Read: resourceAwsRDSClusterEndpointRead, - Update: resourceAwsRDSClusterEndpointUpdate, - Delete: resourceAwsRDSClusterEndpointDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "cluster_endpoint_identifier": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - ValidateFunc: validateRdsIdentifier, - }, - "cluster_identifier": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - ValidateFunc: validateRdsIdentifier, - }, - "custom_endpoint_type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - "READER", - "ANY", - }, false), - }, - "excluded_members": { - Type: schema.TypeSet, - Optional: true, - ConflictsWith: []string{"static_members"}, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "static_members": { - Type: schema.TypeSet, - Optional: true, - ConflictsWith: []string{"excluded_members"}, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsRDSClusterEndpointCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - clusterId := d.Get("cluster_identifier").(string) - endpointId := d.Get("cluster_endpoint_identifier").(string) - endpointType := d.Get("custom_endpoint_type").(string) - - createClusterEndpointInput := &rds.CreateDBClusterEndpointInput{ - DBClusterIdentifier: aws.String(clusterId), - DBClusterEndpointIdentifier: aws.String(endpointId), - EndpointType: aws.String(endpointType), - } - - if v := d.Get("static_members"); v != nil { - createClusterEndpointInput.StaticMembers = expandStringSet(v.(*schema.Set)) - } - if v := d.Get("excluded_members"); v != nil { - createClusterEndpointInput.ExcludedMembers = expandStringSet(v.(*schema.Set)) - } - - _, err := conn.CreateDBClusterEndpoint(createClusterEndpointInput) - if err != nil { - return fmt.Errorf("Error creating RDS Cluster Endpoint: %s", err) - } - - d.SetId(endpointId) - - err = resourceAwsRDSClusterEndpointWaitForAvailable(d.Timeout(schema.TimeoutDelete), d.Id(), conn) - if err != nil { - return err - } - - return resourceAwsRDSClusterEndpointRead(d, meta) -} - -func resourceAwsRDSClusterEndpointRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - input := &rds.DescribeDBClusterEndpointsInput{ - DBClusterEndpointIdentifier: aws.String(d.Id()), - } - log.Printf("[DEBUG] Describing RDS Cluster: %s", input) - resp, err := conn.DescribeDBClusterEndpoints(input) - - if err != nil { - return fmt.Errorf("error describing RDS Cluster Endpoints (%s): %s", d.Id(), err) - } - - if resp == nil { - return fmt.Errorf("Error retrieving RDS Cluster Endpoints: empty response for: %s", input) - } - - var clusterEp *rds.DBClusterEndpoint - for _, e := range resp.DBClusterEndpoints { - if aws.StringValue(e.DBClusterEndpointIdentifier) == d.Id() { - clusterEp = e - break - } - } - - if clusterEp == nil { - log.Printf("[WARN] RDS Cluster Endpoint (%s) not found", d.Id()) - d.SetId("") - return nil - } - - d.Set("cluster_endpoint_identifier", clusterEp.DBClusterEndpointIdentifier) - d.Set("cluster_identifier", clusterEp.DBClusterIdentifier) - d.Set("arn", clusterEp.DBClusterEndpointArn) - d.Set("endpoint", clusterEp.Endpoint) - d.Set("custom_endpoint_type", clusterEp.CustomEndpointType) - - if err := d.Set("excluded_members", flattenStringList(clusterEp.ExcludedMembers)); err != nil { - return fmt.Errorf("error setting excluded_members: %s", err) - } - - if err := d.Set("static_members", flattenStringList(clusterEp.StaticMembers)); err != nil { - return fmt.Errorf("error setting static_members: %s", err) - } - - return nil -} - -func resourceAwsRDSClusterEndpointUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - input := &rds.ModifyDBClusterEndpointInput{ - DBClusterEndpointIdentifier: aws.String(d.Id()), - } - - if v, ok := d.GetOk("custom_endpoint_type"); ok { - input.EndpointType = aws.String(v.(string)) - } - - if attr := d.Get("excluded_members").(*schema.Set); attr.Len() > 0 { - input.ExcludedMembers = expandStringList(attr.List()) - } else { - input.ExcludedMembers = make([]*string, 0) - } - - if attr := d.Get("static_members").(*schema.Set); attr.Len() > 0 { - input.StaticMembers = expandStringList(attr.List()) - } else { - input.StaticMembers = make([]*string, 0) - } - - _, err := conn.ModifyDBClusterEndpoint(input) - if err != nil { - return fmt.Errorf("Error modifying RDS Cluster Endpoint: %s", err) - } - - return resourceAwsRDSClusterEndpointRead(d, meta) -} - -func resourceAwsRDSClusterEndpointDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - input := &rds.DeleteDBClusterEndpointInput{ - DBClusterEndpointIdentifier: aws.String(d.Id()), - } - _, err := conn.DeleteDBClusterEndpoint(input) - if err != nil { - return fmt.Errorf("Error deleting RDS Cluster Endpoint: %s", err) - } - - if err := resourceAwsRDSClusterEndpointWaitForDestroy(d.Timeout(schema.TimeoutDelete), d.Id(), conn); err != nil { - return err - } - - return nil -} - -func resourceAwsRDSClusterEndpointWaitForDestroy(timeout time.Duration, id string, conn *rds.RDS) error { - log.Printf("Waiting for RDS Cluster Endpoint %s to be deleted...", id) - stateConf := &resource.StateChangeConf{ - Pending: []string{"available", "deleting"}, - Target: []string{"destroyed"}, - Refresh: DBClusterEndpointStateRefreshFunc(conn, id), - Timeout: timeout, - Delay: AWSRDSClusterEndpointRetryDelay, - MinTimeout: AWSRDSClusterEndpointRetryMinTimeout, - } - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for RDS Cluster Endpoint (%s) to be deleted: %v", id, err) - } - return nil -} - -func resourceAwsRDSClusterEndpointWaitForAvailable(timeout time.Duration, id string, conn *rds.RDS) error { - log.Printf("Waiting for RDS Cluster Endpoint %s to become available...", id) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating"}, - Target: []string{"available"}, - Refresh: DBClusterEndpointStateRefreshFunc(conn, id), - Timeout: timeout, - Delay: AWSRDSClusterEndpointRetryDelay, - MinTimeout: AWSRDSClusterEndpointRetryMinTimeout, - } - - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for RDS Cluster Endpoint (%s) to be ready: %v", id, err) - } - return nil -} - -func DBClusterEndpointStateRefreshFunc(conn *rds.RDS, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - emptyResp := &rds.DescribeDBClusterEndpointsOutput{} - - resp, err := conn.DescribeDBClusterEndpoints( - &rds.DescribeDBClusterEndpointsInput{ - DBClusterEndpointIdentifier: aws.String(id), - }) - if err != nil { - if isAWSErr(err, rds.ErrCodeDBClusterNotFoundFault, "") { - return emptyResp, "destroyed", nil - } else if resp != nil && len(resp.DBClusterEndpoints) == 0 { - return emptyResp, "destroyed", nil - } else { - return emptyResp, "", fmt.Errorf("Error on refresh: %+v", err) - } - } - - if resp == nil || resp.DBClusterEndpoints == nil || len(resp.DBClusterEndpoints) == 0 { - return emptyResp, "destroyed", nil - } - - return resp.DBClusterEndpoints[0], *resp.DBClusterEndpoints[0].Status, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go deleted file mode 100644 index 13dc9a4c2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go +++ /dev/null @@ -1,578 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsRDSClusterInstance() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRDSClusterInstanceCreate, - Read: resourceAwsRDSClusterInstanceRead, - Update: resourceAwsRDSClusterInstanceUpdate, - Delete: resourceAwsRDSClusterInstanceDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(90 * time.Minute), - Update: schema.DefaultTimeout(90 * time.Minute), - Delete: schema.DefaultTimeout(90 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "identifier": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"identifier_prefix"}, - ValidateFunc: validateRdsIdentifier, - }, - "identifier_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateRdsIdentifierPrefix, - }, - - "db_subnet_group_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "writer": { - Type: schema.TypeBool, - Computed: true, - }, - - "cluster_identifier": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "port": { - Type: schema.TypeInt, - Computed: true, - }, - - "publicly_accessible": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "instance_class": { - Type: schema.TypeString, - Required: true, - }, - - "engine": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "aurora", - ValidateFunc: validateRdsEngine(), - }, - - "engine_version": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "db_parameter_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - // apply_immediately is used to determine when the update modifications - // take place. - // See http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html - "apply_immediately": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "kms_key_id": { - Type: schema.TypeString, - Computed: true, - }, - - "storage_encrypted": { - Type: schema.TypeBool, - Computed: true, - }, - - "dbi_resource_id": { - Type: schema.TypeString, - Computed: true, - }, - - "auto_minor_version_upgrade": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "monitoring_role_arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "preferred_maintenance_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - StateFunc: func(v interface{}) string { - if v != nil { - value := v.(string) - return strings.ToLower(value) - } - return "" - }, - ValidateFunc: validateOnceAWeekWindowFormat, - }, - - "preferred_backup_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateOnceADayWindowFormat, - }, - - "monitoring_interval": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - - "promotion_tier": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - - "availability_zone": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "performance_insights_enabled": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "performance_insights_kms_key_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateArn, - }, - - "copy_tags_to_snapshot": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "tags": tagsSchema(), - }, - } -} - -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)), - CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)), - DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), - Engine: aws.String(d.Get("engine").(string)), - 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, - } - - if attr, ok := d.GetOk("availability_zone"); ok { - createOpts.AvailabilityZone = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("db_parameter_group_name"); ok { - createOpts.DBParameterGroupName = aws.String(attr.(string)) - } - - if v, ok := d.GetOk("identifier"); ok { - createOpts.DBInstanceIdentifier = aws.String(v.(string)) - } else { - if v, ok := d.GetOk("identifier_prefix"); ok { - createOpts.DBInstanceIdentifier = aws.String(resource.PrefixedUniqueId(v.(string))) - } else { - createOpts.DBInstanceIdentifier = aws.String(resource.PrefixedUniqueId("tf-")) - } - } - - if attr, ok := d.GetOk("db_subnet_group_name"); ok { - createOpts.DBSubnetGroupName = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("engine_version"); ok { - createOpts.EngineVersion = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("monitoring_role_arn"); ok { - createOpts.MonitoringRoleArn = aws.String(attr.(string)) - } - - if attr, _ := d.GetOk("engine"); attr == "aurora-postgresql" || attr == "aurora" { - if attr, ok := d.GetOk("performance_insights_enabled"); ok { - createOpts.EnablePerformanceInsights = aws.Bool(attr.(bool)) - } - - if attr, ok := d.GetOk("performance_insights_kms_key_id"); ok { - createOpts.PerformanceInsightsKMSKeyId = aws.String(attr.(string)) - } - } - - if attr, ok := d.GetOk("preferred_backup_window"); ok { - createOpts.PreferredBackupWindow = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("preferred_maintenance_window"); ok { - createOpts.PreferredMaintenanceWindow = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("monitoring_interval"); ok { - createOpts.MonitoringInterval = aws.Int64(int64(attr.(int))) - } - - log.Printf("[DEBUG] Creating RDS DB Instance opts: %s", createOpts) - var resp *rds.CreateDBInstanceOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - resp, err = conn.CreateDBInstance(createOpts) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error creating RDS DB Instance: %s", err) - } - - d.SetId(*resp.DBInstance.DBInstanceIdentifier) - - // reuse db_instance refresh func - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsRdsClusterInstanceCreateUpdatePendingStates, - Target: []string{"available"}, - Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsRDSClusterInstanceRead(d, meta) -} - -func resourceAwsRDSClusterInstanceRead(d *schema.ResourceData, meta interface{}) error { - db, err := resourceAwsDbInstanceRetrieve(d.Id(), meta.(*AWSClient).rdsconn) - // Errors from this helper are always reportable - if err != nil { - return fmt.Errorf("Error on retrieving RDS Cluster Instance (%s): %s", d.Id(), err) - } - // A nil response means "not found" - if db == nil { - log.Printf("[WARN] RDS Cluster Instance (%s): not found, removing from state.", d.Id()) - d.SetId("") - return nil - } - // Database instance is not in RDS Cluster - if db.DBClusterIdentifier == nil { - return fmt.Errorf("Cluster identifier is missing from instance (%s). The aws_db_instance resource should be used for non-Aurora instances", d.Id()) - } - - // Retrieve DB Cluster information, to determine if this Instance is a writer - conn := meta.(*AWSClient).rdsconn - resp, err := conn.DescribeDBClusters(&rds.DescribeDBClustersInput{ - DBClusterIdentifier: db.DBClusterIdentifier, - }) - - var dbc *rds.DBCluster - for _, c := range resp.DBClusters { - if *c.DBClusterIdentifier == *db.DBClusterIdentifier { - dbc = c - } - } - - if dbc == nil { - return fmt.Errorf("Error finding RDS Cluster (%s) for Cluster Instance (%s): %s", - *db.DBClusterIdentifier, *db.DBInstanceIdentifier, err) - } - - for _, m := range dbc.DBClusterMembers { - if *db.DBInstanceIdentifier == *m.DBInstanceIdentifier { - if *m.IsClusterWriter { - d.Set("writer", true) - } else { - d.Set("writer", false) - } - } - } - - if db.Endpoint != nil { - d.Set("endpoint", db.Endpoint.Address) - d.Set("port", db.Endpoint.Port) - } - - if db.DBSubnetGroup != nil { - d.Set("db_subnet_group_name", db.DBSubnetGroup.DBSubnetGroupName) - } - - d.Set("arn", db.DBInstanceArn) - d.Set("auto_minor_version_upgrade", db.AutoMinorVersionUpgrade) - d.Set("availability_zone", db.AvailabilityZone) - d.Set("cluster_identifier", db.DBClusterIdentifier) - d.Set("copy_tags_to_snapshot", db.CopyTagsToSnapshot) - d.Set("dbi_resource_id", db.DbiResourceId) - d.Set("engine_version", db.EngineVersion) - d.Set("engine", db.Engine) - d.Set("identifier", db.DBInstanceIdentifier) - d.Set("instance_class", db.DBInstanceClass) - d.Set("kms_key_id", db.KmsKeyId) - d.Set("performance_insights_enabled", db.PerformanceInsightsEnabled) - d.Set("performance_insights_kms_key_id", db.PerformanceInsightsKMSKeyId) - d.Set("preferred_backup_window", db.PreferredBackupWindow) - d.Set("preferred_maintenance_window", db.PreferredMaintenanceWindow) - d.Set("promotion_tier", db.PromotionTier) - d.Set("publicly_accessible", db.PubliclyAccessible) - d.Set("storage_encrypted", db.StorageEncrypted) - - if db.MonitoringInterval != nil { - d.Set("monitoring_interval", db.MonitoringInterval) - } - - if db.MonitoringRoleArn != nil { - d.Set("monitoring_role_arn", db.MonitoringRoleArn) - } - - if len(db.DBParameterGroups) > 0 { - 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) - } - - return nil -} - -func resourceAwsRDSClusterInstanceUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - requestUpdate := false - - req := &rds.ModifyDBInstanceInput{ - ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), - DBInstanceIdentifier: aws.String(d.Id()), - } - - if d.HasChange("db_parameter_group_name") { - req.DBParameterGroupName = aws.String(d.Get("db_parameter_group_name").(string)) - requestUpdate = true - } - - if d.HasChange("instance_class") { - req.DBInstanceClass = aws.String(d.Get("instance_class").(string)) - requestUpdate = true - } - - if d.HasChange("monitoring_role_arn") { - d.SetPartial("monitoring_role_arn") - req.MonitoringRoleArn = aws.String(d.Get("monitoring_role_arn").(string)) - requestUpdate = true - } - - if d.HasChange("performance_insights_enabled") { - d.SetPartial("performance_insights_enabled") - req.EnablePerformanceInsights = aws.Bool(d.Get("performance_insights_enabled").(bool)) - requestUpdate = true - } - - if d.HasChange("performance_insights_kms_key_id") { - d.SetPartial("performance_insights_kms_key_id") - req.PerformanceInsightsKMSKeyId = aws.String(d.Get("performance_insights_kms_key_id").(string)) - requestUpdate = true - } - - if d.HasChange("preferred_backup_window") { - d.SetPartial("preferred_backup_window") - req.PreferredBackupWindow = aws.String(d.Get("preferred_backup_window").(string)) - requestUpdate = true - } - - if d.HasChange("preferred_maintenance_window") { - d.SetPartial("preferred_maintenance_window") - req.PreferredMaintenanceWindow = aws.String(d.Get("preferred_maintenance_window").(string)) - requestUpdate = true - } - - if d.HasChange("monitoring_interval") { - d.SetPartial("monitoring_interval") - req.MonitoringInterval = aws.Int64(int64(d.Get("monitoring_interval").(int))) - requestUpdate = true - } - - if d.HasChange("auto_minor_version_upgrade") { - d.SetPartial("auto_minor_version_upgrade") - req.AutoMinorVersionUpgrade = aws.Bool(d.Get("auto_minor_version_upgrade").(bool)) - requestUpdate = true - } - - if d.HasChange("copy_tags_to_snapshot") { - d.SetPartial("copy_tags_to_snapshot") - req.CopyTagsToSnapshot = aws.Bool(d.Get("copy_tags_to_snapshot").(bool)) - requestUpdate = true - } - - if d.HasChange("promotion_tier") { - d.SetPartial("promotion_tier") - req.PromotionTier = aws.Int64(int64(d.Get("promotion_tier").(int))) - requestUpdate = true - } - - if d.HasChange("publicly_accessible") { - d.SetPartial("publicly_accessible") - req.PubliclyAccessible = aws.Bool(d.Get("publicly_accessible").(bool)) - requestUpdate = true - } - - log.Printf("[DEBUG] Send DB Instance Modification request: %#v", requestUpdate) - if requestUpdate { - log.Printf("[DEBUG] DB Instance Modification request: %#v", req) - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.ModifyDBInstance(req) - if err != nil { - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error modifying DB Instance %s: %s", d.Id(), err) - } - - // reuse db_instance refresh func - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsRdsClusterInstanceCreateUpdatePendingStates, - Target: []string{"available"}, - Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - } - - if err := setTagsRDS(conn, d, d.Get("arn").(string)); err != nil { - return err - } - - return resourceAwsRDSClusterInstanceRead(d, meta) -} - -func resourceAwsRDSClusterInstanceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - log.Printf("[DEBUG] RDS Cluster Instance destroy: %v", d.Id()) - - opts := rds.DeleteDBInstanceInput{DBInstanceIdentifier: aws.String(d.Id())} - - log.Printf("[DEBUG] RDS Cluster Instance destroy configuration: %s", opts) - if _, err := conn.DeleteDBInstance(&opts); err != nil { - return err - } - - // re-uses db_instance refresh func - log.Println("[INFO] Waiting for RDS Cluster Instance to be destroyed") - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsRdsClusterInstanceDeletePendingStates, - Target: []string{}, - Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutDelete), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } - - _, err := stateConf.WaitForState() - return err - -} - -var resourceAwsRdsClusterInstanceCreateUpdatePendingStates = []string{ - "backing-up", - "configuring-enhanced-monitoring", - "configuring-log-exports", - "creating", - "maintenance", - "modifying", - "rebooting", - "renaming", - "resetting-master-credentials", - "starting", - "upgrading", -} - -var resourceAwsRdsClusterInstanceDeletePendingStates = []string{ - "configuring-log-exports", - "modifying", - "deleting", -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go deleted file mode 100644 index 160cea0a2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go +++ /dev/null @@ -1,278 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/rds" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -const rdsClusterParameterGroupMaxParamsBulkEdit = 20 - -func resourceAwsRDSClusterParameterGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRDSClusterParameterGroupCreate, - Read: resourceAwsRDSClusterParameterGroupRead, - Update: resourceAwsRDSClusterParameterGroupUpdate, - Delete: resourceAwsRDSClusterParameterGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateDbParamGroupName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateDbParamGroupNamePrefix, - }, - "family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "Managed by Terraform", - }, - "parameter": { - Type: schema.TypeSet, - Optional: true, - ForceNew: false, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - "apply_method": { - Type: schema.TypeString, - Optional: true, - Default: "immediate", - }, - }, - }, - Set: resourceAwsDbParameterHash, - }, - - "tags": tagsSchema(), - }, - } -} - -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 { - groupName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - groupName = resource.PrefixedUniqueId(v.(string)) - } else { - groupName = resource.UniqueId() - } - - createOpts := rds.CreateDBClusterParameterGroupInput{ - DBClusterParameterGroupName: aws.String(groupName), - DBParameterGroupFamily: aws.String(d.Get("family").(string)), - Description: aws.String(d.Get("description").(string)), - Tags: tags, - } - - log.Printf("[DEBUG] Create DB Cluster Parameter Group: %#v", createOpts) - output, err := rdsconn.CreateDBClusterParameterGroup(&createOpts) - if err != nil { - return fmt.Errorf("Error creating DB Cluster Parameter Group: %s", err) - } - - d.SetId(*createOpts.DBClusterParameterGroupName) - log.Printf("[INFO] DB Cluster Parameter Group ID: %s", d.Id()) - - // Set for update - d.Set("arn", output.DBClusterParameterGroup.DBClusterParameterGroupArn) - - return resourceAwsRDSClusterParameterGroupUpdate(d, meta) -} - -func resourceAwsRDSClusterParameterGroupRead(d *schema.ResourceData, meta interface{}) error { - rdsconn := meta.(*AWSClient).rdsconn - - describeOpts := rds.DescribeDBClusterParameterGroupsInput{ - DBClusterParameterGroupName: aws.String(d.Id()), - } - - describeResp, err := rdsconn.DescribeDBClusterParameterGroups(&describeOpts) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "DBParameterGroupNotFound" { - log.Printf("[WARN] DB Cluster Parameter Group (%s) not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return err - } - - if len(describeResp.DBClusterParameterGroups) != 1 || - *describeResp.DBClusterParameterGroups[0].DBClusterParameterGroupName != d.Id() { - return fmt.Errorf("Unable to find Cluster Parameter Group: %#v", describeResp.DBClusterParameterGroups) - } - - arn := aws.StringValue(describeResp.DBClusterParameterGroups[0].DBClusterParameterGroupArn) - d.Set("arn", arn) - d.Set("description", describeResp.DBClusterParameterGroups[0].Description) - d.Set("family", describeResp.DBClusterParameterGroups[0].DBParameterGroupFamily) - d.Set("name", describeResp.DBClusterParameterGroups[0].DBClusterParameterGroupName) - - // Only include user customized parameters as there's hundreds of system/default ones - describeParametersOpts := rds.DescribeDBClusterParametersInput{ - DBClusterParameterGroupName: aws.String(d.Id()), - Source: aws.String("user"), - } - - describeParametersResp, err := rdsconn.DescribeDBClusterParameters(&describeParametersOpts) - if err != nil { - return err - } - - d.Set("parameter", flattenParameters(describeParametersResp.Parameters)) - - resp, err := rdsconn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) - } - - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - d.Set("tags", tagsToMapRDS(dt)) - - return nil -} - -func resourceAwsRDSClusterParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { - rdsconn := meta.(*AWSClient).rdsconn - - d.Partial(true) - - if d.HasChange("parameter") { - o, n := d.GetChange("parameter") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - // Expand the "parameter" set to aws-sdk-go compat []rds.Parameter - parameters, err := expandParameters(ns.Difference(os).List()) - if err != nil { - return err - } - - if len(parameters) > 0 { - // We can only modify 20 parameters at a time, so walk them until - // we've got them all. - for parameters != nil { - var paramsToModify []*rds.Parameter - if len(parameters) <= rdsClusterParameterGroupMaxParamsBulkEdit { - paramsToModify, parameters = parameters[:], nil - } else { - paramsToModify, parameters = parameters[:rdsClusterParameterGroupMaxParamsBulkEdit], parameters[rdsClusterParameterGroupMaxParamsBulkEdit:] - } - - modifyOpts := rds.ModifyDBClusterParameterGroupInput{ - DBClusterParameterGroupName: aws.String(d.Id()), - Parameters: paramsToModify, - } - - log.Printf("[DEBUG] Modify DB Cluster Parameter Group: %s", modifyOpts) - _, err = rdsconn.ModifyDBClusterParameterGroup(&modifyOpts) - if err != nil { - return fmt.Errorf("Error modifying DB Cluster Parameter Group: %s", err) - } - } - d.SetPartial("parameter") - } - } - - if err := setTagsRDS(rdsconn, d, d.Get("arn").(string)); err != nil { - return err - } else { - d.SetPartial("tags") - } - - d.Partial(false) - - return resourceAwsRDSClusterParameterGroupRead(d, meta) -} - -func resourceAwsRDSClusterParameterGroupDelete(d *schema.ResourceData, meta interface{}) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"destroyed"}, - Refresh: resourceAwsRDSClusterParameterGroupDeleteRefreshFunc(d, meta), - Timeout: 3 * time.Minute, - MinTimeout: 1 * time.Second, - } - _, err := stateConf.WaitForState() - return err -} - -func resourceAwsRDSClusterParameterGroupDeleteRefreshFunc( - d *schema.ResourceData, - meta interface{}) resource.StateRefreshFunc { - rdsconn := meta.(*AWSClient).rdsconn - - return func() (interface{}, string, error) { - - deleteOpts := rds.DeleteDBClusterParameterGroupInput{ - DBClusterParameterGroupName: aws.String(d.Id()), - } - - if _, err := rdsconn.DeleteDBClusterParameterGroup(&deleteOpts); err != nil { - rdserr, ok := err.(awserr.Error) - if !ok { - return d, "error", err - } - - if rdserr.Code() != "DBParameterGroupNotFound" { - return d, "error", err - } - } - - return d, "destroyed", nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_global_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_global_cluster.go deleted file mode 100644 index 119415992..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_global_cluster.go +++ /dev/null @@ -1,349 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsRDSGlobalCluster() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRDSGlobalClusterCreate, - Read: resourceAwsRDSGlobalClusterRead, - Update: resourceAwsRDSGlobalClusterUpdate, - Delete: resourceAwsRDSGlobalClusterDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "database_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "deletion_protection": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "engine": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "aurora", - ValidateFunc: validation.StringInSlice([]string{ - "aurora", - }, false), - }, - "engine_version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "global_cluster_identifier": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "global_cluster_resource_id": { - Type: schema.TypeString, - Computed: true, - }, - "storage_encrypted": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsRDSGlobalClusterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - input := &rds.CreateGlobalClusterInput{ - DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), - GlobalClusterIdentifier: aws.String(d.Get("global_cluster_identifier").(string)), - StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), - } - - if v, ok := d.GetOk("database_name"); ok { - input.DatabaseName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("engine"); ok { - input.Engine = aws.String(v.(string)) - } - - if v, ok := d.GetOk("engine_version"); ok { - input.EngineVersion = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating RDS Global Cluster: %s", input) - output, err := conn.CreateGlobalCluster(input) - if err != nil { - return fmt.Errorf("error creating RDS Global Cluster: %s", err) - } - - d.SetId(aws.StringValue(output.GlobalCluster.GlobalClusterIdentifier)) - - if err := waitForRdsGlobalClusterCreation(conn, d.Id()); err != nil { - return fmt.Errorf("error waiting for RDS Global Cluster (%s) availability: %s", d.Id(), err) - } - - return resourceAwsRDSGlobalClusterRead(d, meta) -} - -func resourceAwsRDSGlobalClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - globalCluster, err := rdsDescribeGlobalCluster(conn, d.Id()) - - if isAWSErr(err, rds.ErrCodeGlobalClusterNotFoundFault, "") { - log.Printf("[WARN] RDS Global Cluster (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading RDS Global Cluster: %s", err) - } - - if globalCluster == nil { - log.Printf("[WARN] RDS Global Cluster (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if aws.StringValue(globalCluster.Status) == "deleting" || aws.StringValue(globalCluster.Status) == "deleted" { - log.Printf("[WARN] RDS Global Cluster (%s) in deleted state (%s), removing from state", d.Id(), aws.StringValue(globalCluster.Status)) - d.SetId("") - return nil - } - - d.Set("arn", globalCluster.GlobalClusterArn) - d.Set("database_name", globalCluster.DatabaseName) - d.Set("deletion_protection", globalCluster.DeletionProtection) - d.Set("engine", globalCluster.Engine) - d.Set("engine_version", globalCluster.EngineVersion) - d.Set("global_cluster_identifier", globalCluster.GlobalClusterIdentifier) - d.Set("global_cluster_resource_id", globalCluster.GlobalClusterResourceId) - d.Set("storage_encrypted", globalCluster.StorageEncrypted) - - return nil -} - -func resourceAwsRDSGlobalClusterUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - input := &rds.ModifyGlobalClusterInput{ - DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), - GlobalClusterIdentifier: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Updating RDS Global Cluster (%s): %s", d.Id(), input) - _, err := conn.ModifyGlobalCluster(input) - - if isAWSErr(err, rds.ErrCodeGlobalClusterNotFoundFault, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting RDS Global Cluster: %s", err) - } - - if err := waitForRdsGlobalClusterUpdate(conn, d.Id()); err != nil { - return fmt.Errorf("error waiting for RDS Global Cluster (%s) update: %s", d.Id(), err) - } - - return nil -} - -func resourceAwsRDSGlobalClusterDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).rdsconn - - input := &rds.DeleteGlobalClusterInput{ - GlobalClusterIdentifier: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting RDS Global Cluster (%s): %s", d.Id(), input) - - // Allow for eventual consistency - // InvalidGlobalClusterStateFault: Global Cluster arn:aws:rds::123456789012:global-cluster:tf-acc-test-5618525093076697001-0 is not empty - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteGlobalCluster(input) - - if isAWSErr(err, rds.ErrCodeInvalidGlobalClusterStateFault, "is not empty") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - - if isAWSErr(err, rds.ErrCodeGlobalClusterNotFoundFault, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting RDS Global Cluster: %s", err) - } - - if err := waitForRdsGlobalClusterDeletion(conn, d.Id()); err != nil { - return fmt.Errorf("error waiting for RDS Global Cluster (%s) deletion: %s", d.Id(), err) - } - - return nil -} - -func rdsDescribeGlobalCluster(conn *rds.RDS, globalClusterID string) (*rds.GlobalCluster, error) { - var globalCluster *rds.GlobalCluster - - input := &rds.DescribeGlobalClustersInput{ - GlobalClusterIdentifier: aws.String(globalClusterID), - } - - log.Printf("[DEBUG] Reading RDS Global Cluster (%s): %s", globalClusterID, input) - err := conn.DescribeGlobalClustersPages(input, func(page *rds.DescribeGlobalClustersOutput, lastPage bool) bool { - if page == nil { - return !lastPage - } - - for _, gc := range page.GlobalClusters { - if gc == nil { - continue - } - - if aws.StringValue(gc.GlobalClusterIdentifier) == globalClusterID { - globalCluster = gc - return false - } - } - - return !lastPage - }) - - return globalCluster, err -} - -func rdsDescribeGlobalClusterFromDbClusterARN(conn *rds.RDS, dbClusterARN string) (*rds.GlobalCluster, error) { - var globalCluster *rds.GlobalCluster - - input := &rds.DescribeGlobalClustersInput{ - Filters: []*rds.Filter{ - { - Name: aws.String("db-cluster-id"), - Values: []*string{aws.String(dbClusterARN)}, - }, - }, - } - - log.Printf("[DEBUG] Reading RDS Global Clusters: %s", input) - err := conn.DescribeGlobalClustersPages(input, func(page *rds.DescribeGlobalClustersOutput, lastPage bool) bool { - if page == nil { - return !lastPage - } - - for _, gc := range page.GlobalClusters { - if gc == nil { - continue - } - - for _, globalClusterMember := range gc.GlobalClusterMembers { - if aws.StringValue(globalClusterMember.DBClusterArn) == dbClusterARN { - globalCluster = gc - return false - } - } - } - - return !lastPage - }) - - return globalCluster, err -} - -func rdsGlobalClusterRefreshFunc(conn *rds.RDS, globalClusterID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - globalCluster, err := rdsDescribeGlobalCluster(conn, globalClusterID) - - if isAWSErr(err, rds.ErrCodeGlobalClusterNotFoundFault, "") { - return nil, "deleted", nil - } - - if err != nil { - return nil, "", fmt.Errorf("error reading RDS Global Cluster (%s): %s", globalClusterID, err) - } - - if globalCluster == nil { - return nil, "deleted", nil - } - - return globalCluster, aws.StringValue(globalCluster.Status), nil - } -} - -func waitForRdsGlobalClusterCreation(conn *rds.RDS, globalClusterID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating"}, - Target: []string{"available"}, - Refresh: rdsGlobalClusterRefreshFunc(conn, globalClusterID), - Timeout: 10 * time.Minute, - } - - log.Printf("[DEBUG] Waiting for RDS Global Cluster (%s) availability", globalClusterID) - _, err := stateConf.WaitForState() - - return err -} - -func waitForRdsGlobalClusterUpdate(conn *rds.RDS, globalClusterID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{"modifying"}, - Target: []string{"available"}, - Refresh: rdsGlobalClusterRefreshFunc(conn, globalClusterID), - Timeout: 10 * time.Minute, - } - - log.Printf("[DEBUG] Waiting for RDS Global Cluster (%s) availability", globalClusterID) - _, err := stateConf.WaitForState() - - return err -} - -func waitForRdsGlobalClusterDeletion(conn *rds.RDS, globalClusterID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ - "available", - "deleting", - }, - Target: []string{"deleted"}, - Refresh: rdsGlobalClusterRefreshFunc(conn, globalClusterID), - Timeout: 10 * time.Minute, - NotFoundChecks: 1, - } - - log.Printf("[DEBUG] Waiting for RDS Global Cluster (%s) deletion", globalClusterID) - _, err := stateConf.WaitForState() - - if isResourceNotFoundError(err) { - return nil - } - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go deleted file mode 100644 index fbe782fd6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go +++ /dev/null @@ -1,1085 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/redshift" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsRedshiftCluster() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRedshiftClusterCreate, - Read: resourceAwsRedshiftClusterRead, - Update: resourceAwsRedshiftClusterUpdate, - Delete: resourceAwsRedshiftClusterDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsRedshiftClusterImport, - }, - - Schema: map[string]*schema.Schema{ - "database_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateRedshiftClusterDbName, - }, - - "cluster_identifier": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateRedshiftClusterIdentifier, - }, - "cluster_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "node_type": { - Type: schema.TypeString, - Required: true, - }, - - "master_username": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateRedshiftClusterMasterUsername, - }, - - "master_password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - ValidateFunc: validateRedshiftClusterMasterPassword, - }, - - "cluster_security_groups": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "vpc_security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "cluster_subnet_group_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "availability_zone": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "preferred_maintenance_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - StateFunc: func(val interface{}) string { - if val == nil { - return "" - } - return strings.ToLower(val.(string)) - }, - ValidateFunc: validateOnceAWeekWindowFormat, - }, - - "cluster_parameter_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "automated_snapshot_retention_period": { - Type: schema.TypeInt, - Optional: true, - Default: 1, - ValidateFunc: validation.IntAtMost(35), - }, - - "port": { - Type: schema.TypeInt, - Optional: true, - Default: 5439, - }, - - "cluster_version": { - Type: schema.TypeString, - Optional: true, - Default: "1.0", - }, - - "allow_version_upgrade": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "number_of_nodes": { - Type: schema.TypeInt, - Optional: true, - Default: 1, - }, - - "publicly_accessible": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "encrypted": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "enhanced_vpc_routing": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateArn, - }, - - "elastic_ip": { - Type: schema.TypeString, - Optional: true, - }, - - "final_snapshot_identifier": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateRedshiftClusterFinalSnapshotIdentifier, - }, - - "skip_final_snapshot": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "endpoint": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "dns_name": { - Type: schema.TypeString, - Computed: true, - }, - - "cluster_public_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "cluster_revision_number": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "iam_roles": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "snapshot_copy": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "destination_region": { - Type: schema.TypeString, - Required: true, - }, - "retention_period": { - Type: schema.TypeInt, - Optional: true, - Default: 7, - }, - "grant_name": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "logging": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enable": { - Type: schema.TypeBool, - Required: true, - }, - - "bucket_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "s3_key_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - }, - }, - - "enable_logging": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - Deprecated: "Use enable in the 'logging' block instead", - ConflictsWith: []string{"logging"}, - }, - - "bucket_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - Deprecated: "Use bucket_name in the 'logging' block instead", - ConflictsWith: []string{"logging"}, - }, - - "s3_key_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - Deprecated: "Use s3_key_prefix in the 'logging' block instead", - ConflictsWith: []string{"logging"}, - }, - - "snapshot_identifier": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "snapshot_cluster_identifier": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "owner_account": { - Type: schema.TypeString, - Optional: true, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsRedshiftClusterImport( - d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - // Neither skip_final_snapshot nor final_snapshot_identifier can be fetched - // from any API call, so we need to default skip_final_snapshot to true so - // that final_snapshot_identifier is not required - d.Set("skip_final_snapshot", true) - return []*schema.ResourceData{d}, nil -} - -func resourceAwsRedshiftClusterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - tags := tagsFromMapRedshift(d.Get("tags").(map[string]interface{})) - - if v, ok := d.GetOk("snapshot_identifier"); ok { - restoreOpts := &redshift.RestoreFromClusterSnapshotInput{ - ClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), - SnapshotIdentifier: aws.String(v.(string)), - Port: aws.Int64(int64(d.Get("port").(int))), - AllowVersionUpgrade: aws.Bool(d.Get("allow_version_upgrade").(bool)), - NodeType: aws.String(d.Get("node_type").(string)), - PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), - AutomatedSnapshotRetentionPeriod: aws.Int64(int64(d.Get("automated_snapshot_retention_period").(int))), - } - - if v, ok := d.GetOk("owner_account"); ok { - restoreOpts.OwnerAccount = aws.String(v.(string)) - } - - if v, ok := d.GetOk("snapshot_cluster_identifier"); ok { - restoreOpts.SnapshotClusterIdentifier = aws.String(v.(string)) - } - - if v, ok := d.GetOk("availability_zone"); ok { - restoreOpts.AvailabilityZone = aws.String(v.(string)) - } - - if v, ok := d.GetOk("cluster_subnet_group_name"); ok { - restoreOpts.ClusterSubnetGroupName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("cluster_parameter_group_name"); ok { - restoreOpts.ClusterParameterGroupName = aws.String(v.(string)) - } - - if v := d.Get("cluster_security_groups").(*schema.Set); v.Len() > 0 { - restoreOpts.ClusterSecurityGroups = expandStringList(v.List()) - } - - if v := d.Get("vpc_security_group_ids").(*schema.Set); v.Len() > 0 { - restoreOpts.VpcSecurityGroupIds = expandStringList(v.List()) - } - - if v, ok := d.GetOk("preferred_maintenance_window"); ok { - restoreOpts.PreferredMaintenanceWindow = aws.String(v.(string)) - } - - if v, ok := d.GetOk("kms_key_id"); ok { - restoreOpts.KmsKeyId = aws.String(v.(string)) - } - - if v, ok := d.GetOk("elastic_ip"); ok { - restoreOpts.ElasticIp = aws.String(v.(string)) - } - - if v, ok := d.GetOk("enhanced_vpc_routing"); ok { - restoreOpts.EnhancedVpcRouting = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("iam_roles"); ok { - restoreOpts.IamRoles = expandStringList(v.(*schema.Set).List()) - } - - log.Printf("[DEBUG] Redshift Cluster restore cluster options: %s", restoreOpts) - - resp, err := conn.RestoreFromClusterSnapshot(restoreOpts) - if err != nil { - log.Printf("[ERROR] Error Restoring Redshift Cluster from Snapshot: %s", err) - return err - } - - d.SetId(*resp.Cluster.ClusterIdentifier) - - } else { - if _, ok := d.GetOk("master_password"); !ok { - return fmt.Errorf(`provider.aws: aws_redshift_cluster: %s: "master_password": required field is not set`, d.Get("cluster_identifier").(string)) - } - - if _, ok := d.GetOk("master_username"); !ok { - return fmt.Errorf(`provider.aws: aws_redshift_cluster: %s: "master_username": required field is not set`, d.Get("cluster_identifier").(string)) - } - - createOpts := &redshift.CreateClusterInput{ - ClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), - Port: aws.Int64(int64(d.Get("port").(int))), - MasterUserPassword: aws.String(d.Get("master_password").(string)), - MasterUsername: aws.String(d.Get("master_username").(string)), - ClusterVersion: aws.String(d.Get("cluster_version").(string)), - NodeType: aws.String(d.Get("node_type").(string)), - DBName: aws.String(d.Get("database_name").(string)), - AllowVersionUpgrade: aws.Bool(d.Get("allow_version_upgrade").(bool)), - PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), - AutomatedSnapshotRetentionPeriod: aws.Int64(int64(d.Get("automated_snapshot_retention_period").(int))), - Tags: tags, - } - - if v := d.Get("number_of_nodes").(int); v > 1 { - createOpts.ClusterType = aws.String("multi-node") - createOpts.NumberOfNodes = aws.Int64(int64(d.Get("number_of_nodes").(int))) - } else { - createOpts.ClusterType = aws.String("single-node") - } - - if v := d.Get("cluster_security_groups").(*schema.Set); v.Len() > 0 { - createOpts.ClusterSecurityGroups = expandStringList(v.List()) - } - - if v := d.Get("vpc_security_group_ids").(*schema.Set); v.Len() > 0 { - createOpts.VpcSecurityGroupIds = expandStringList(v.List()) - } - - if v, ok := d.GetOk("cluster_subnet_group_name"); ok { - createOpts.ClusterSubnetGroupName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("availability_zone"); ok { - createOpts.AvailabilityZone = aws.String(v.(string)) - } - - if v, ok := d.GetOk("preferred_maintenance_window"); ok { - createOpts.PreferredMaintenanceWindow = aws.String(v.(string)) - } - - if v, ok := d.GetOk("cluster_parameter_group_name"); ok { - createOpts.ClusterParameterGroupName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("encrypted"); ok { - createOpts.Encrypted = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("enhanced_vpc_routing"); ok { - createOpts.EnhancedVpcRouting = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("kms_key_id"); ok { - createOpts.KmsKeyId = aws.String(v.(string)) - } - - if v, ok := d.GetOk("elastic_ip"); ok { - createOpts.ElasticIp = aws.String(v.(string)) - } - - if v, ok := d.GetOk("iam_roles"); ok { - createOpts.IamRoles = expandStringList(v.(*schema.Set).List()) - } - - log.Printf("[DEBUG] Redshift Cluster create options: %s", createOpts) - resp, err := conn.CreateCluster(createOpts) - if err != nil { - log.Printf("[ERROR] Error creating Redshift Cluster: %s", err) - return err - } - - log.Printf("[DEBUG]: Cluster create response: %s", resp) - d.SetId(*resp.Cluster.ClusterIdentifier) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "backing-up", "modifying", "restoring"}, - Target: []string{"available"}, - Refresh: resourceAwsRedshiftClusterStateRefreshFunc(d.Id(), conn), - Timeout: 75 * time.Minute, - MinTimeout: 10 * time.Second, - } - - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for Redshift Cluster state to be \"available\": %s", err) - } - - if v, ok := d.GetOk("snapshot_copy"); ok { - err := enableRedshiftSnapshotCopy(d.Id(), v.([]interface{}), conn) - if err != nil { - return err - } - } - - logging, ok := d.GetOk("logging.0.enable") - _, deprecatedOk := d.GetOk("enable_logging") - if (ok && logging.(bool)) || deprecatedOk { - loggingErr := enableRedshiftClusterLogging(d, conn) - if loggingErr != nil { - log.Printf("[ERROR] Error Enabling Logging on Redshift Cluster: %s", err) - return loggingErr - } - } - - return resourceAwsRedshiftClusterRead(d, meta) -} - -func resourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - log.Printf("[INFO] Reading Redshift Cluster Information: %s", d.Id()) - resp, err := conn.DescribeClusters(&redshift.DescribeClustersInput{ - ClusterIdentifier: aws.String(d.Id()), - }) - - if err != nil { - if isAWSErr(err, redshift.ErrCodeClusterNotFoundFault, "") { - d.SetId("") - log.Printf("[DEBUG] Redshift Cluster (%s) not found", d.Id()) - return nil - } - log.Printf("[DEBUG] Error describing Redshift Cluster (%s)", d.Id()) - return err - } - - var rsc *redshift.Cluster - for _, c := range resp.Clusters { - if *c.ClusterIdentifier == d.Id() { - rsc = c - } - } - - if rsc == nil { - log.Printf("[WARN] Redshift Cluster (%s) not found", d.Id()) - d.SetId("") - return nil - } - - log.Printf("[INFO] Reading Redshift Cluster Logging Status: %s", d.Id()) - loggingStatus, loggingErr := conn.DescribeLoggingStatus(&redshift.DescribeLoggingStatusInput{ - ClusterIdentifier: aws.String(d.Id()), - }) - - if loggingErr != nil { - return loggingErr - } - - d.Set("master_username", rsc.MasterUsername) - d.Set("node_type", rsc.NodeType) - d.Set("allow_version_upgrade", rsc.AllowVersionUpgrade) - d.Set("database_name", rsc.DBName) - d.Set("cluster_identifier", rsc.ClusterIdentifier) - d.Set("cluster_version", rsc.ClusterVersion) - - d.Set("cluster_subnet_group_name", rsc.ClusterSubnetGroupName) - d.Set("availability_zone", rsc.AvailabilityZone) - d.Set("encrypted", rsc.Encrypted) - d.Set("enhanced_vpc_routing", rsc.EnhancedVpcRouting) - d.Set("kms_key_id", rsc.KmsKeyId) - d.Set("automated_snapshot_retention_period", rsc.AutomatedSnapshotRetentionPeriod) - d.Set("preferred_maintenance_window", rsc.PreferredMaintenanceWindow) - if rsc.Endpoint != nil && rsc.Endpoint.Address != nil { - endpoint := *rsc.Endpoint.Address - if rsc.Endpoint.Port != nil { - endpoint = fmt.Sprintf("%s:%d", endpoint, *rsc.Endpoint.Port) - } - d.Set("dns_name", rsc.Endpoint.Address) - d.Set("port", rsc.Endpoint.Port) - d.Set("endpoint", endpoint) - } - d.Set("cluster_parameter_group_name", rsc.ClusterParameterGroups[0].ParameterGroupName) - if len(rsc.ClusterNodes) > 1 { - d.Set("cluster_type", "multi-node") - } else { - d.Set("cluster_type", "single-node") - } - d.Set("number_of_nodes", rsc.NumberOfNodes) - d.Set("publicly_accessible", rsc.PubliclyAccessible) - - var vpcg []string - for _, g := range rsc.VpcSecurityGroups { - vpcg = append(vpcg, *g.VpcSecurityGroupId) - } - if err := d.Set("vpc_security_group_ids", vpcg); err != nil { - return fmt.Errorf("Error saving VPC Security Group IDs to state for Redshift Cluster (%s): %s", d.Id(), err) - } - - var csg []string - for _, g := range rsc.ClusterSecurityGroups { - csg = append(csg, *g.ClusterSecurityGroupName) - } - if err := d.Set("cluster_security_groups", csg); err != nil { - return fmt.Errorf("Error saving Cluster Security Group Names to state for Redshift Cluster (%s): %s", d.Id(), err) - } - - var iamRoles []string - for _, i := range rsc.IamRoles { - iamRoles = append(iamRoles, *i.IamRoleArn) - } - if err := d.Set("iam_roles", iamRoles); err != nil { - return fmt.Errorf("Error saving IAM Roles to state for Redshift Cluster (%s): %s", d.Id(), err) - } - - d.Set("cluster_public_key", rsc.ClusterPublicKey) - d.Set("cluster_revision_number", rsc.ClusterRevisionNumber) - d.Set("tags", tagsToMapRedshift(rsc.Tags)) - - d.Set("snapshot_copy", flattenRedshiftSnapshotCopy(rsc.ClusterSnapshotCopyStatus)) - - // TODO: Deprecated fields - remove in next major version - d.Set("bucket_name", loggingStatus.BucketName) - d.Set("enable_logging", loggingStatus.LoggingEnabled) - d.Set("s3_key_prefix", loggingStatus.S3KeyPrefix) - - d.Set("logging", flattenRedshiftLogging(loggingStatus)) - - return nil -} - -func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - d.Partial(true) - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "redshift", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("cluster:%s", d.Id()), - }.String() - if tagErr := setTagsRedshift(conn, d, arn); tagErr != nil { - return tagErr - } else { - d.SetPartial("tags") - } - - requestUpdate := false - log.Printf("[INFO] Building Redshift Modify Cluster Options") - req := &redshift.ModifyClusterInput{ - ClusterIdentifier: aws.String(d.Id()), - } - - // If the cluster type, node type, or number of nodes changed, then the AWS API expects all three - // items to be sent over - if d.HasChange("cluster_type") || d.HasChange("node_type") || d.HasChange("number_of_nodes") { - req.ClusterType = aws.String(d.Get("cluster_type").(string)) - req.NodeType = aws.String(d.Get("node_type").(string)) - if v := d.Get("number_of_nodes").(int); v > 1 { - req.ClusterType = aws.String("multi-node") - req.NumberOfNodes = aws.Int64(int64(d.Get("number_of_nodes").(int))) - } else { - req.ClusterType = aws.String("single-node") - } - requestUpdate = true - } - - if d.HasChange("cluster_security_groups") { - req.ClusterSecurityGroups = expandStringList(d.Get("cluster_security_groups").(*schema.Set).List()) - requestUpdate = true - } - - if d.HasChange("vpc_security_group_ids") { - req.VpcSecurityGroupIds = expandStringList(d.Get("vpc_security_group_ids").(*schema.Set).List()) - requestUpdate = true - } - - if d.HasChange("master_password") { - req.MasterUserPassword = aws.String(d.Get("master_password").(string)) - requestUpdate = true - } - - if d.HasChange("cluster_parameter_group_name") { - req.ClusterParameterGroupName = aws.String(d.Get("cluster_parameter_group_name").(string)) - requestUpdate = true - } - - if d.HasChange("automated_snapshot_retention_period") { - req.AutomatedSnapshotRetentionPeriod = aws.Int64(int64(d.Get("automated_snapshot_retention_period").(int))) - requestUpdate = true - } - - if d.HasChange("preferred_maintenance_window") { - req.PreferredMaintenanceWindow = aws.String(d.Get("preferred_maintenance_window").(string)) - requestUpdate = true - } - - if d.HasChange("cluster_version") { - req.ClusterVersion = aws.String(d.Get("cluster_version").(string)) - requestUpdate = true - } - - if d.HasChange("allow_version_upgrade") { - req.AllowVersionUpgrade = aws.Bool(d.Get("allow_version_upgrade").(bool)) - requestUpdate = true - } - - if d.HasChange("publicly_accessible") { - req.PubliclyAccessible = aws.Bool(d.Get("publicly_accessible").(bool)) - requestUpdate = true - } - - if d.HasChange("enhanced_vpc_routing") { - req.EnhancedVpcRouting = aws.Bool(d.Get("enhanced_vpc_routing").(bool)) - requestUpdate = true - } - - if d.HasChange("encrypted") { - req.Encrypted = aws.Bool(d.Get("encrypted").(bool)) - requestUpdate = true - } - - if d.Get("encrypted").(bool) && d.HasChange("kms_key_id") { - req.KmsKeyId = aws.String(d.Get("kms_key_id").(string)) - requestUpdate = true - } - - if requestUpdate { - log.Printf("[INFO] Modifying Redshift Cluster: %s", d.Id()) - log.Printf("[DEBUG] Redshift Cluster Modify options: %s", req) - _, err := conn.ModifyCluster(req) - if err != nil { - return fmt.Errorf("Error modifying Redshift Cluster (%s): %s", d.Id(), err) - } - } - - if d.HasChange("iam_roles") { - o, n := d.GetChange("iam_roles") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - removeIams := os.Difference(ns).List() - addIams := ns.Difference(os).List() - - log.Printf("[INFO] Building Redshift Modify Cluster IAM Role Options") - req := &redshift.ModifyClusterIamRolesInput{ - ClusterIdentifier: aws.String(d.Id()), - AddIamRoles: expandStringList(addIams), - RemoveIamRoles: expandStringList(removeIams), - } - - log.Printf("[INFO] Modifying Redshift Cluster IAM Roles: %s", d.Id()) - log.Printf("[DEBUG] Redshift Cluster Modify IAM Role options: %s", req) - _, err := conn.ModifyClusterIamRoles(req) - if err != nil { - return fmt.Errorf("Error modifying Redshift Cluster IAM Roles (%s): %s", d.Id(), err) - } - - d.SetPartial("iam_roles") - } - - if requestUpdate || d.HasChange("iam_roles") { - - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "deleting", "rebooting", "resizing", "renaming", "modifying"}, - Target: []string{"available"}, - Refresh: resourceAwsRedshiftClusterStateRefreshFunc(d.Id(), conn), - Timeout: 40 * time.Minute, - MinTimeout: 10 * time.Second, - } - - // Wait, catching any errors - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error Modifying Redshift Cluster (%s): %s", d.Id(), err) - } - } - - if d.HasChange("snapshot_copy") { - if v, ok := d.GetOk("snapshot_copy"); ok { - err := enableRedshiftSnapshotCopy(d.Id(), v.([]interface{}), conn) - if err != nil { - return err - } - } else { - _, err := conn.DisableSnapshotCopy(&redshift.DisableSnapshotCopyInput{ - ClusterIdentifier: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Failed to disable snapshot copy: %s", err) - } - } - } - - if d.HasChange("logging") { - if loggingEnabled, ok := d.GetOk("logging.0.enable"); ok && loggingEnabled.(bool) { - log.Printf("[INFO] Enabling Logging for Redshift Cluster %q", d.Id()) - err := enableRedshiftClusterLogging(d, conn) - if err != nil { - return err - } - } else { - log.Printf("[INFO] Disabling Logging for Redshift Cluster %q", d.Id()) - _, err := conn.DisableLogging(&redshift.DisableLoggingInput{ - ClusterIdentifier: aws.String(d.Id()), - }) - if err != nil { - return err - } - } - } else if d.HasChange("enable_logging") || d.HasChange("bucket_name") || d.HasChange("s3_key_prefix") { - if enableLogging, ok := d.GetOk("enable_logging"); ok && enableLogging.(bool) { - log.Printf("[INFO] Enabling Logging for Redshift Cluster %q", d.Id()) - err := enableRedshiftClusterLogging(d, conn) - if err != nil { - return err - } - } else { - log.Printf("[INFO] Disabling Logging for Redshift Cluster %q", d.Id()) - _, err := conn.DisableLogging(&redshift.DisableLoggingInput{ - ClusterIdentifier: aws.String(d.Id()), - }) - if err != nil { - return err - } - } - } - - d.Partial(false) - - return resourceAwsRedshiftClusterRead(d, meta) -} - -func enableRedshiftClusterLogging(d *schema.ResourceData, conn *redshift.Redshift) error { - var bucketName, v interface{} - var deprecatedOk, ok bool - bucketName, deprecatedOk = d.GetOk("bucket_name") - v, ok = d.GetOk("logging.0.bucket_name") - if ok { - bucketName = v - } - if !ok && !deprecatedOk { - return fmt.Errorf("bucket_name must be set when enabling logging for Redshift Clusters") - } - - params := &redshift.EnableLoggingInput{ - ClusterIdentifier: aws.String(d.Id()), - BucketName: aws.String(bucketName.(string)), - } - - var s3KeyPrefix interface{} - s3KeyPrefix, deprecatedOk = d.GetOk("s3_key_prefix") - v, ok = d.GetOk("logging.0.s3_key_prefix") - if ok { - s3KeyPrefix = v - } - if ok || deprecatedOk { - params.S3KeyPrefix = aws.String(s3KeyPrefix.(string)) - } - - _, loggingErr := conn.EnableLogging(params) - if loggingErr != nil { - log.Printf("[ERROR] Error Enabling Logging on Redshift Cluster: %s", loggingErr) - return loggingErr - } - return nil -} - -func enableRedshiftSnapshotCopy(id string, scList []interface{}, conn *redshift.Redshift) error { - sc := scList[0].(map[string]interface{}) - - input := redshift.EnableSnapshotCopyInput{ - ClusterIdentifier: aws.String(id), - DestinationRegion: aws.String(sc["destination_region"].(string)), - } - if rp, ok := sc["retention_period"]; ok { - input.RetentionPeriod = aws.Int64(int64(rp.(int))) - } - if gn, ok := sc["grant_name"]; ok { - input.SnapshotCopyGrantName = aws.String(gn.(string)) - } - - _, err := conn.EnableSnapshotCopy(&input) - if err != nil { - return fmt.Errorf("Failed to enable snapshot copy: %s", err) - } - return nil -} - -func resourceAwsRedshiftClusterDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - log.Printf("[DEBUG] Destroying Redshift Cluster (%s)", d.Id()) - - deleteOpts := redshift.DeleteClusterInput{ - ClusterIdentifier: aws.String(d.Id()), - } - - skipFinalSnapshot := d.Get("skip_final_snapshot").(bool) - deleteOpts.SkipFinalClusterSnapshot = aws.Bool(skipFinalSnapshot) - - if !skipFinalSnapshot { - if name, present := d.GetOk("final_snapshot_identifier"); present { - deleteOpts.FinalClusterSnapshotIdentifier = aws.String(name.(string)) - } else { - return fmt.Errorf("Redshift Cluster Instance FinalSnapshotIdentifier is required when a final snapshot is required") - } - } - - log.Printf("[DEBUG] Deleting Redshift Cluster: %s", deleteOpts) - err := deleteAwsRedshiftCluster(&deleteOpts, conn) - if err != nil { - return err - } - - log.Printf("[INFO] Redshift Cluster %s successfully deleted", d.Id()) - - return nil -} - -func deleteAwsRedshiftCluster(opts *redshift.DeleteClusterInput, conn *redshift.Redshift) error { - id := *opts.ClusterIdentifier - log.Printf("[INFO] Deleting Redshift Cluster %q", id) - err := resource.Retry(15*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteCluster(opts) - if isAWSErr(err, redshift.ErrCodeInvalidClusterStateFault, "") { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - }) - if err != nil { - return fmt.Errorf("Error deleting Redshift Cluster (%s): %s", id, err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"available", "creating", "deleting", "rebooting", "resizing", "renaming", "final-snapshot"}, - Target: []string{"destroyed"}, - Refresh: resourceAwsRedshiftClusterStateRefreshFunc(id, conn), - Timeout: 40 * time.Minute, - MinTimeout: 5 * time.Second, - } - - _, err = stateConf.WaitForState() - - return err -} - -func resourceAwsRedshiftClusterStateRefreshFunc(id string, conn *redshift.Redshift) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - log.Printf("[INFO] Reading Redshift Cluster Information: %s", id) - resp, err := conn.DescribeClusters(&redshift.DescribeClustersInput{ - ClusterIdentifier: aws.String(id), - }) - - if err != nil { - if isAWSErr(err, redshift.ErrCodeClusterNotFoundFault, "") { - return 42, "destroyed", nil - } - log.Printf("[WARN] Error on retrieving Redshift Cluster (%s) when waiting: %s", id, err) - return nil, "", err - } - - var rsc *redshift.Cluster - - for _, c := range resp.Clusters { - if *c.ClusterIdentifier == id { - rsc = c - } - } - - if rsc == nil { - return 42, "destroyed", nil - } - - if rsc.ClusterStatus != nil { - log.Printf("[DEBUG] Redshift Cluster status (%s): %s", id, *rsc.ClusterStatus) - } - - return rsc, *rsc.ClusterStatus, nil - } -} - -func validateRedshiftClusterIdentifier(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) - } - return -} - -func validateRedshiftClusterDbName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z_$]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters, underscores, and dollar signs are allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-zA-Z_]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter or underscore", k)) - } - if len(value) > 64 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 64 characters: %q", k, value)) - } - if value == "" { - errors = append(errors, fmt.Errorf( - "%q cannot be an empty string", k)) - } - - return -} - -func validateRedshiftClusterFinalSnapshotIdentifier(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q cannot end in a hyphen", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf("%q cannot be more than 255 characters", k)) - } - return -} - -func validateRedshiftClusterMasterUsername(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^\w+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters in %q", k)) - } - if !regexp.MustCompile(`^[A-Za-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if len(value) > 128 { - errors = append(errors, fmt.Errorf("%q cannot be more than 128 characters", k)) - } - return -} - -func validateRedshiftClusterMasterPassword(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^.*[a-z].*`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must contain at least one lowercase letter", k)) - } - if !regexp.MustCompile(`^.*[A-Z].*`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must contain at least one uppercase letter", k)) - } - if !regexp.MustCompile(`^.*[0-9].*`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must contain at least one number", k)) - } - if !regexp.MustCompile(`^[^\@\/'" ]*$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain [/@\"' ]", k)) - } - if len(value) < 8 { - errors = append(errors, fmt.Errorf("%q must be at least 8 characters", k)) - } - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_event_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_event_subscription.go deleted file mode 100644 index 8704ba6fb..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_event_subscription.go +++ /dev/null @@ -1,211 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/redshift" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsRedshiftEventSubscription() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRedshiftEventSubscriptionCreate, - Read: resourceAwsRedshiftEventSubscriptionRead, - Update: resourceAwsRedshiftEventSubscriptionUpdate, - Delete: resourceAwsRedshiftEventSubscriptionDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(40 * time.Minute), - Delete: schema.DefaultTimeout(40 * time.Minute), - Update: schema.DefaultTimeout(40 * time.Minute), - }, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "sns_topic_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "event_categories": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "source_ids": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "source_type": { - Type: schema.TypeString, - Optional: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "severity": { - Type: schema.TypeString, - Optional: true, - }, - "customer_aws_id": { - Type: schema.TypeString, - Computed: true, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsRedshiftEventSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - request := &redshift.CreateEventSubscriptionInput{ - SubscriptionName: aws.String(d.Get("name").(string)), - SnsTopicArn: aws.String(d.Get("sns_topic_arn").(string)), - Enabled: aws.Bool(d.Get("enabled").(bool)), - SourceIds: expandStringSet(d.Get("source_ids").(*schema.Set)), - SourceType: aws.String(d.Get("source_type").(string)), - Severity: aws.String(d.Get("severity").(string)), - EventCategories: expandStringSet(d.Get("event_categories").(*schema.Set)), - Tags: tagsFromMapRedshift(d.Get("tags").(map[string]interface{})), - } - - log.Println("[DEBUG] Create Redshift Event Subscription:", request) - - output, err := conn.CreateEventSubscription(request) - if err != nil || output.EventSubscription == nil { - return fmt.Errorf("Error creating Redshift Event Subscription %s: %s", d.Get("name").(string), err) - } - - d.SetId(aws.StringValue(output.EventSubscription.CustSubscriptionId)) - - return resourceAwsRedshiftEventSubscriptionRead(d, meta) -} - -func resourceAwsRedshiftEventSubscriptionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - sub, err := resourceAwsRedshiftEventSubscriptionRetrieve(d.Id(), conn) - if err != nil { - return fmt.Errorf("Error retrieving Redshift Event Subscription %s: %s", d.Id(), err) - } - if sub == nil { - log.Printf("[WARN] Redshift Event Subscription (%s) not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - if err := d.Set("name", sub.CustSubscriptionId); err != nil { - return err - } - if err := d.Set("sns_topic_arn", sub.SnsTopicArn); err != nil { - return err - } - if err := d.Set("status", sub.Status); err != nil { - return err - } - if err := d.Set("source_type", sub.SourceType); err != nil { - return err - } - if err := d.Set("severity", sub.Severity); err != nil { - return err - } - if err := d.Set("enabled", sub.Enabled); err != nil { - return err - } - if err := d.Set("source_ids", flattenStringList(sub.SourceIdsList)); err != nil { - return err - } - if err := d.Set("event_categories", flattenStringList(sub.EventCategoriesList)); err != nil { - return err - } - if err := d.Set("customer_aws_id", sub.CustomerAwsId); err != nil { - return err - } - if err := d.Set("tags", tagsToMapRedshift(sub.Tags)); err != nil { - return err - } - - return nil -} - -func resourceAwsRedshiftEventSubscriptionRetrieve(name string, conn *redshift.Redshift) (*redshift.EventSubscription, error) { - - request := &redshift.DescribeEventSubscriptionsInput{ - SubscriptionName: aws.String(name), - } - - describeResp, err := conn.DescribeEventSubscriptions(request) - if err != nil { - if isAWSErr(err, redshift.ErrCodeSubscriptionNotFoundFault, "") { - log.Printf("[WARN] No Redshift Event Subscription by name (%s) found", name) - return nil, nil - } - return nil, fmt.Errorf("Error reading Redshift Event Subscription %s: %s", name, err) - } - - if len(describeResp.EventSubscriptionsList) != 1 { - return nil, fmt.Errorf("Unable to find Redshift Event Subscription: %#v", describeResp.EventSubscriptionsList) - } - - return describeResp.EventSubscriptionsList[0], nil -} - -func resourceAwsRedshiftEventSubscriptionUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - req := &redshift.ModifyEventSubscriptionInput{ - SubscriptionName: aws.String(d.Id()), - SnsTopicArn: aws.String(d.Get("sns_topic_arn").(string)), - Enabled: aws.Bool(d.Get("enabled").(bool)), - SourceIds: expandStringSet(d.Get("source_ids").(*schema.Set)), - SourceType: aws.String(d.Get("source_type").(string)), - Severity: aws.String(d.Get("severity").(string)), - EventCategories: expandStringSet(d.Get("event_categories").(*schema.Set)), - } - - log.Printf("[DEBUG] Redshift Event Subscription modification request: %#v", req) - _, err := conn.ModifyEventSubscription(req) - if err != nil { - return fmt.Errorf("Modifying Redshift Event Subscription %s failed: %s", d.Id(), err) - } - - return nil -} - -func resourceAwsRedshiftEventSubscriptionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - deleteOpts := redshift.DeleteEventSubscriptionInput{ - SubscriptionName: aws.String(d.Id()), - } - - if _, err := conn.DeleteEventSubscription(&deleteOpts); err != nil { - if isAWSErr(err, redshift.ErrCodeSubscriptionNotFoundFault, "") { - return nil - } - return fmt.Errorf("Error deleting Redshift Event Subscription %s: %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_parameter_group.go deleted file mode 100644 index ae7778f54..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_parameter_group.go +++ /dev/null @@ -1,213 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "regexp" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/redshift" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsRedshiftParameterGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRedshiftParameterGroupCreate, - Read: resourceAwsRedshiftParameterGroupRead, - Update: resourceAwsRedshiftParameterGroupUpdate, - Delete: resourceAwsRedshiftParameterGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - ValidateFunc: validateRedshiftParamGroupName, - }, - - "family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "Managed by Terraform", - }, - - "parameter": { - Type: schema.TypeSet, - Optional: true, - ForceNew: false, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - Set: resourceAwsRedshiftParameterHash, - }, - }, - } -} - -func resourceAwsRedshiftParameterGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - createOpts := redshift.CreateClusterParameterGroupInput{ - ParameterGroupName: aws.String(d.Get("name").(string)), - ParameterGroupFamily: aws.String(d.Get("family").(string)), - Description: aws.String(d.Get("description").(string)), - } - - log.Printf("[DEBUG] Create Redshift Parameter Group: %#v", createOpts) - _, err := conn.CreateClusterParameterGroup(&createOpts) - if err != nil { - return fmt.Errorf("Error creating Redshift Parameter Group: %s", err) - } - - d.SetId(*createOpts.ParameterGroupName) - log.Printf("[INFO] Redshift Parameter Group ID: %s", d.Id()) - - return resourceAwsRedshiftParameterGroupUpdate(d, meta) -} - -func resourceAwsRedshiftParameterGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - describeOpts := redshift.DescribeClusterParameterGroupsInput{ - ParameterGroupName: aws.String(d.Id()), - } - - describeResp, err := conn.DescribeClusterParameterGroups(&describeOpts) - if err != nil { - return err - } - - if len(describeResp.ParameterGroups) != 1 || - *describeResp.ParameterGroups[0].ParameterGroupName != d.Id() { - d.SetId("") - return fmt.Errorf("Unable to find Parameter Group: %#v", describeResp.ParameterGroups) - } - - d.Set("name", describeResp.ParameterGroups[0].ParameterGroupName) - d.Set("family", describeResp.ParameterGroups[0].ParameterGroupFamily) - d.Set("description", describeResp.ParameterGroups[0].Description) - - describeParametersOpts := redshift.DescribeClusterParametersInput{ - ParameterGroupName: aws.String(d.Id()), - Source: aws.String("user"), - } - - describeParametersResp, err := conn.DescribeClusterParameters(&describeParametersOpts) - if err != nil { - return err - } - - d.Set("parameter", flattenRedshiftParameters(describeParametersResp.Parameters)) - return nil -} - -func resourceAwsRedshiftParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - d.Partial(true) - - if d.HasChange("parameter") { - o, n := d.GetChange("parameter") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - // Expand the "parameter" set to aws-sdk-go compat []redshift.Parameter - parameters, err := expandRedshiftParameters(ns.Difference(os).List()) - if err != nil { - return err - } - - if len(parameters) > 0 { - modifyOpts := redshift.ModifyClusterParameterGroupInput{ - ParameterGroupName: aws.String(d.Get("name").(string)), - Parameters: parameters, - } - - log.Printf("[DEBUG] Modify Redshift Parameter Group: %s", modifyOpts) - _, err = conn.ModifyClusterParameterGroup(&modifyOpts) - if err != nil { - return fmt.Errorf("Error modifying Redshift Parameter Group: %s", err) - } - } - d.SetPartial("parameter") - } - - d.Partial(false) - return resourceAwsRedshiftParameterGroupRead(d, meta) -} - -func resourceAwsRedshiftParameterGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - _, err := conn.DeleteClusterParameterGroup(&redshift.DeleteClusterParameterGroupInput{ - ParameterGroupName: aws.String(d.Id()), - }) - if err != nil && isAWSErr(err, "RedshiftParameterGroupNotFoundFault", "") { - return nil - } - return err -} - -func resourceAwsRedshiftParameterHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) - // Store the value as a lower case string, to match how we store them in flattenParameters - buf.WriteString(fmt.Sprintf("%s-", strings.ToLower(m["value"].(string)))) - - return hashcode.String(buf.String()) -} - -func validateRedshiftParamGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than 255 characters", k)) - } - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_security_group.go deleted file mode 100644 index 87e2b2fc2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_security_group.go +++ /dev/null @@ -1,400 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/redshift" - "github.com/hashicorp/go-multierror" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsRedshiftSecurityGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRedshiftSecurityGroupCreate, - Read: resourceAwsRedshiftSecurityGroupRead, - Update: resourceAwsRedshiftSecurityGroupUpdate, - Delete: resourceAwsRedshiftSecurityGroupDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsRedshiftClusterImport, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateRedshiftSecurityGroupName, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "Managed by Terraform", - }, - - "ingress": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cidr": { - Type: schema.TypeString, - Optional: true, - }, - - "security_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "security_group_owner_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - }, - Set: resourceAwsRedshiftSecurityGroupIngressHash, - }, - }, - } -} - -func resourceAwsRedshiftSecurityGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - var err error - var errs []error - - name := d.Get("name").(string) - desc := d.Get("description").(string) - sgInput := &redshift.CreateClusterSecurityGroupInput{ - ClusterSecurityGroupName: aws.String(name), - Description: aws.String(desc), - } - log.Printf("[DEBUG] Redshift security group create: name: %s, description: %s", name, desc) - _, err = conn.CreateClusterSecurityGroup(sgInput) - if err != nil { - return fmt.Errorf("Error creating RedshiftSecurityGroup: %s", err) - } - - d.SetId(d.Get("name").(string)) - - log.Printf("[INFO] Redshift Security Group ID: %s", d.Id()) - sg, err := resourceAwsRedshiftSecurityGroupRetrieve(d, meta) - if err != nil { - return err - } - - ingresses := d.Get("ingress").(*schema.Set) - for _, ing := range ingresses.List() { - err := resourceAwsRedshiftSecurityGroupAuthorizeRule(ing, *sg.ClusterSecurityGroupName, conn) - if err != nil { - errs = append(errs, err) - } - } - - if len(errs) > 0 { - return &multierror.Error{Errors: errs} - } - - log.Println("[INFO] Waiting for Redshift Security Group Ingress Authorizations to be authorized") - stateConf := &resource.StateChangeConf{ - Pending: []string{"authorizing"}, - Target: []string{"authorized"}, - Refresh: resourceAwsRedshiftSecurityGroupStateRefreshFunc(d, meta), - Timeout: 10 * time.Minute, - } - - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsRedshiftSecurityGroupRead(d, meta) -} - -func resourceAwsRedshiftSecurityGroupRead(d *schema.ResourceData, meta interface{}) error { - sg, err := resourceAwsRedshiftSecurityGroupRetrieve(d, meta) - if err != nil { - return err - } - - rules := &schema.Set{ - F: resourceAwsRedshiftSecurityGroupIngressHash, - } - - for _, v := range sg.IPRanges { - rule := map[string]interface{}{"cidr": *v.CIDRIP} - rules.Add(rule) - } - - for _, g := range sg.EC2SecurityGroups { - rule := map[string]interface{}{ - "security_group_name": *g.EC2SecurityGroupName, - "security_group_owner_id": *g.EC2SecurityGroupOwnerId, - } - rules.Add(rule) - } - - d.Set("ingress", rules) - d.Set("name", *sg.ClusterSecurityGroupName) - d.Set("description", *sg.Description) - - return nil -} - -func resourceAwsRedshiftSecurityGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - if d.HasChange("ingress") { - o, n := d.GetChange("ingress") - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := o.(*schema.Set) - ns := n.(*schema.Set) - - removeIngressRules, err := expandRedshiftSGRevokeIngress(os.Difference(ns).List()) - if err != nil { - return err - } - if len(removeIngressRules) > 0 { - for _, r := range removeIngressRules { - r.ClusterSecurityGroupName = aws.String(d.Id()) - - _, err := conn.RevokeClusterSecurityGroupIngress(&r) - if err != nil { - return err - } - } - } - - addIngressRules, err := expandRedshiftSGAuthorizeIngress(ns.Difference(os).List()) - if err != nil { - return err - } - if len(addIngressRules) > 0 { - for _, r := range addIngressRules { - r.ClusterSecurityGroupName = aws.String(d.Id()) - - _, err := conn.AuthorizeClusterSecurityGroupIngress(&r) - if err != nil { - return err - } - } - } - - } - return resourceAwsRedshiftSecurityGroupRead(d, meta) -} - -func resourceAwsRedshiftSecurityGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - log.Printf("[DEBUG] Redshift Security Group destroy: %v", d.Id()) - opts := redshift.DeleteClusterSecurityGroupInput{ - ClusterSecurityGroupName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Redshift Security Group destroy configuration: %v", opts) - _, err := conn.DeleteClusterSecurityGroup(&opts) - - if err != nil { - newerr, ok := err.(awserr.Error) - if ok && newerr.Code() == "InvalidRedshiftSecurityGroup.NotFound" { - return nil - } - return err - } - - return nil -} - -func resourceAwsRedshiftSecurityGroupRetrieve(d *schema.ResourceData, meta interface{}) (*redshift.ClusterSecurityGroup, error) { - conn := meta.(*AWSClient).redshiftconn - - opts := redshift.DescribeClusterSecurityGroupsInput{ - ClusterSecurityGroupName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Redshift Security Group describe configuration: %#v", opts) - - resp, err := conn.DescribeClusterSecurityGroups(&opts) - - if err != nil { - return nil, fmt.Errorf("Error retrieving Redshift Security Groups: %s", err) - } - - if len(resp.ClusterSecurityGroups) != 1 || - *resp.ClusterSecurityGroups[0].ClusterSecurityGroupName != d.Id() { - return nil, fmt.Errorf("Unable to find Redshift Security Group: %#v", resp.ClusterSecurityGroups) - } - - return resp.ClusterSecurityGroups[0], nil -} - -func validateRedshiftSecurityGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value == "default" { - errors = append(errors, fmt.Errorf("the Redshift Security Group name cannot be %q", value)) - } - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q: %q", - k, value)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 32 characters: %q", k, value)) - } - return - -} - -func resourceAwsRedshiftSecurityGroupIngressHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - if v, ok := m["cidr"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["security_group_name"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["security_group_owner_id"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - return hashcode.String(buf.String()) -} - -func resourceAwsRedshiftSecurityGroupAuthorizeRule(ingress interface{}, redshiftSecurityGroupName string, conn *redshift.Redshift) error { - ing := ingress.(map[string]interface{}) - - opts := redshift.AuthorizeClusterSecurityGroupIngressInput{ - ClusterSecurityGroupName: aws.String(redshiftSecurityGroupName), - } - - if attr, ok := ing["cidr"]; ok && attr != "" { - opts.CIDRIP = aws.String(attr.(string)) - } - - if attr, ok := ing["security_group_name"]; ok && attr != "" { - opts.EC2SecurityGroupName = aws.String(attr.(string)) - } - - if attr, ok := ing["security_group_owner_id"]; ok && attr != "" { - opts.EC2SecurityGroupOwnerId = aws.String(attr.(string)) - } - - log.Printf("[DEBUG] Authorize ingress rule configuration: %#v", opts) - _, err := conn.AuthorizeClusterSecurityGroupIngress(&opts) - - if err != nil { - return fmt.Errorf("Error authorizing security group ingress: %s", err) - } - - return nil -} - -func resourceAwsRedshiftSecurityGroupStateRefreshFunc( - d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - v, err := resourceAwsRedshiftSecurityGroupRetrieve(d, meta) - - if err != nil { - log.Printf("Error on retrieving Redshift Security Group when waiting: %s", err) - return nil, "", err - } - - statuses := make([]string, 0, len(v.EC2SecurityGroups)+len(v.IPRanges)) - for _, ec2g := range v.EC2SecurityGroups { - statuses = append(statuses, *ec2g.Status) - } - for _, ips := range v.IPRanges { - statuses = append(statuses, *ips.Status) - } - - for _, stat := range statuses { - // Not done - if stat != "authorized" { - return nil, "authorizing", nil - } - } - - return v, "authorized", nil - } -} - -func expandRedshiftSGAuthorizeIngress(configured []interface{}) ([]redshift.AuthorizeClusterSecurityGroupIngressInput, error) { - var ingress []redshift.AuthorizeClusterSecurityGroupIngressInput - - // Loop over our configured parameters and create - // an array of aws-sdk-go compatible objects - for _, pRaw := range configured { - data := pRaw.(map[string]interface{}) - - i := redshift.AuthorizeClusterSecurityGroupIngressInput{} - - if v, ok := data["cidr"]; ok { - i.CIDRIP = aws.String(v.(string)) - } - - if v, ok := data["security_group_name"]; ok { - i.EC2SecurityGroupName = aws.String(v.(string)) - } - - if v, ok := data["security_group_owner_id"]; ok { - i.EC2SecurityGroupOwnerId = aws.String(v.(string)) - } - - ingress = append(ingress, i) - } - - return ingress, nil -} - -func expandRedshiftSGRevokeIngress(configured []interface{}) ([]redshift.RevokeClusterSecurityGroupIngressInput, error) { - var ingress []redshift.RevokeClusterSecurityGroupIngressInput - - // Loop over our configured parameters and create - // an array of aws-sdk-go compatible objects - for _, pRaw := range configured { - data := pRaw.(map[string]interface{}) - - i := redshift.RevokeClusterSecurityGroupIngressInput{} - - if v, ok := data["cidr"]; ok { - i.CIDRIP = aws.String(v.(string)) - } - - if v, ok := data["security_group_name"]; ok { - i.EC2SecurityGroupName = aws.String(v.(string)) - } - - if v, ok := data["security_group_owner_id"]; ok { - i.EC2SecurityGroupOwnerId = aws.String(v.(string)) - } - - ingress = append(ingress, i) - } - - return ingress, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_snapshot_copy_grant.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_snapshot_copy_grant.go deleted file mode 100644 index a9d4ad026..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_snapshot_copy_grant.go +++ /dev/null @@ -1,251 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/redshift" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsRedshiftSnapshotCopyGrant() *schema.Resource { - return &schema.Resource{ - // There is no API for updating/modifying grants, hence no Update - // Instead changes to most fields will force a new resource - Create: resourceAwsRedshiftSnapshotCopyGrantCreate, - Read: resourceAwsRedshiftSnapshotCopyGrantRead, - Delete: resourceAwsRedshiftSnapshotCopyGrantDelete, - Exists: resourceAwsRedshiftSnapshotCopyGrantExists, - - Schema: map[string]*schema.Schema{ - "snapshot_copy_grant_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsRedshiftSnapshotCopyGrantCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - grantName := d.Get("snapshot_copy_grant_name").(string) - - input := redshift.CreateSnapshotCopyGrantInput{ - SnapshotCopyGrantName: aws.String(grantName), - } - - if v, ok := d.GetOk("kms_key_id"); ok { - input.KmsKeyId = aws.String(v.(string)) - } - - input.Tags = tagsFromMapRedshift(d.Get("tags").(map[string]interface{})) - - log.Printf("[DEBUG]: Adding new Redshift SnapshotCopyGrant: %s", input) - - var out *redshift.CreateSnapshotCopyGrantOutput - var err error - - out, err = conn.CreateSnapshotCopyGrant(&input) - - if err != nil { - return fmt.Errorf("error creating Redshift Snapshot Copy Grant (%s): %s", grantName, err) - } - - log.Printf("[DEBUG] Created new Redshift SnapshotCopyGrant: %s", *out.SnapshotCopyGrant.SnapshotCopyGrantName) - d.SetId(grantName) - - return resourceAwsRedshiftSnapshotCopyGrantRead(d, meta) -} - -func resourceAwsRedshiftSnapshotCopyGrantRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - grantName := d.Id() - log.Printf("[DEBUG] Looking for grant: %s", grantName) - grant, err := findAwsRedshiftSnapshotCopyGrantWithRetry(conn, grantName) - - if err != nil { - return err - } - - if grant == nil { - log.Printf("[WARN] %s Redshift snapshot copy grant not found, removing from state file", grantName) - d.SetId("") - return nil - } - - d.Set("kms_key_id", grant.KmsKeyId) - d.Set("snapshot_copy_grant_name", grant.SnapshotCopyGrantName) - if err := d.Set("tags", tagsToMapRedshift(grant.Tags)); err != nil { - return fmt.Errorf("Error setting Redshift Snapshot Copy Grant Tags: %#v", err) - } - - return nil -} - -func resourceAwsRedshiftSnapshotCopyGrantDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - grantName := d.Id() - - deleteInput := redshift.DeleteSnapshotCopyGrantInput{ - SnapshotCopyGrantName: aws.String(grantName), - } - - log.Printf("[DEBUG] Deleting snapshot copy grant: %s", grantName) - _, err := conn.DeleteSnapshotCopyGrant(&deleteInput) - - if err != nil { - if isAWSErr(err, redshift.ErrCodeSnapshotCopyGrantNotFoundFault, "") { - return nil - } - return err - } - - log.Printf("[DEBUG] Checking if grant is deleted: %s", grantName) - err = waitForAwsRedshiftSnapshotCopyGrantToBeDeleted(conn, grantName) - - return err -} - -func resourceAwsRedshiftSnapshotCopyGrantExists(d *schema.ResourceData, meta interface{}) (bool, error) { - conn := meta.(*AWSClient).redshiftconn - - grantName := d.Id() - - log.Printf("[DEBUG] Looking for Grant: %s", grantName) - grant, err := findAwsRedshiftSnapshotCopyGrantWithRetry(conn, grantName) - - if err != nil { - return false, err - } - if grant != nil { - return true, err - } - - return false, nil -} - -func getAwsRedshiftSnapshotCopyGrant(grants []*redshift.SnapshotCopyGrant, grantName string) *redshift.SnapshotCopyGrant { - for _, grant := range grants { - if *grant.SnapshotCopyGrantName == grantName { - return grant - } - } - - return nil -} - -/* -In the functions below it is not possible to use retryOnAwsCodes function, as there -is no get grant call, so an error has to be created if the grant is or isn't returned -by the describe grants call when expected. -*/ - -// NB: This function only retries the grant not being returned and some edge cases, while AWS Errors -// are handled by the findAwsRedshiftSnapshotCopyGrant function -func findAwsRedshiftSnapshotCopyGrantWithRetry(conn *redshift.Redshift, grantName string) (*redshift.SnapshotCopyGrant, error) { - var grant *redshift.SnapshotCopyGrant - err := resource.Retry(3*time.Minute, func() *resource.RetryError { - var err error - grant, err = findAwsRedshiftSnapshotCopyGrant(conn, grantName, nil) - - if err != nil { - if serr, ok := err.(*resource.NotFoundError); ok { - // Force a retry if the grant should exist - return resource.RetryableError(serr) - } - - return resource.NonRetryableError(err) - } - - return nil - }) - - return grant, err -} - -// Used by the tests as well -func waitForAwsRedshiftSnapshotCopyGrantToBeDeleted(conn *redshift.Redshift, grantName string) error { - err := resource.Retry(3*time.Minute, func() *resource.RetryError { - grant, err := findAwsRedshiftSnapshotCopyGrant(conn, grantName, nil) - if err != nil { - if isAWSErr(err, redshift.ErrCodeSnapshotCopyGrantNotFoundFault, "") { - return nil - } - } - - if grant != nil { - // Force a retry if the grant still exists - return resource.RetryableError( - fmt.Errorf("[DEBUG] Grant still exists while expected to be deleted: %s", *grant.SnapshotCopyGrantName)) - } - - return resource.NonRetryableError(err) - }) - - return err -} - -// The DescribeSnapshotCopyGrants API defaults to listing only 100 grants -// Use a marker to iterate over all grants in "pages" -// NB: This function only retries on AWS Errors -func findAwsRedshiftSnapshotCopyGrant(conn *redshift.Redshift, grantName string, marker *string) (*redshift.SnapshotCopyGrant, error) { - - input := redshift.DescribeSnapshotCopyGrantsInput{ - MaxRecords: aws.Int64(int64(100)), - } - - // marker and grant name are mutually exclusive - if marker != nil { - input.Marker = marker - } else { - input.SnapshotCopyGrantName = aws.String(grantName) - } - - var out *redshift.DescribeSnapshotCopyGrantsOutput - var err error - var grant *redshift.SnapshotCopyGrant - - err = resource.Retry(3*time.Minute, func() *resource.RetryError { - out, err = conn.DescribeSnapshotCopyGrants(&input) - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - if err != nil { - return nil, err - } - - grant = getAwsRedshiftSnapshotCopyGrant(out.SnapshotCopyGrants, grantName) - if grant != nil { - return grant, nil - } else if out.Marker != nil { - log.Printf("[DEBUG] Snapshot copy grant not found but marker returned, getting next page via marker: %s", aws.StringValue(out.Marker)) - return findAwsRedshiftSnapshotCopyGrant(conn, grantName, out.Marker) - } - - return nil, &resource.NotFoundError{ - Message: fmt.Sprintf("[DEBUG] Grant %s not found", grantName), - LastRequest: input, - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_subnet_group.go deleted file mode 100644 index e503108ec..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_subnet_group.go +++ /dev/null @@ -1,185 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/redshift" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsRedshiftSubnetGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRedshiftSubnetGroupCreate, - Read: resourceAwsRedshiftSubnetGroupRead, - Update: resourceAwsRedshiftSubnetGroupUpdate, - Delete: resourceAwsRedshiftSubnetGroupDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - ValidateFunc: validateRedshiftSubnetGroupName, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - Default: "Managed by Terraform", - }, - - "subnet_ids": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsRedshiftSubnetGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - subnetIdsSet := d.Get("subnet_ids").(*schema.Set) - subnetIds := make([]*string, subnetIdsSet.Len()) - for i, subnetId := range subnetIdsSet.List() { - subnetIds[i] = aws.String(subnetId.(string)) - } - tags := tagsFromMapRedshift(d.Get("tags").(map[string]interface{})) - - createOpts := redshift.CreateClusterSubnetGroupInput{ - ClusterSubnetGroupName: aws.String(d.Get("name").(string)), - Description: aws.String(d.Get("description").(string)), - SubnetIds: subnetIds, - Tags: tags, - } - - log.Printf("[DEBUG] Create Redshift Subnet Group: %#v", createOpts) - _, err := conn.CreateClusterSubnetGroup(&createOpts) - if err != nil { - return fmt.Errorf("Error creating Redshift Subnet Group: %s", err) - } - - d.SetId(*createOpts.ClusterSubnetGroupName) - log.Printf("[INFO] Redshift Subnet Group ID: %s", d.Id()) - return resourceAwsRedshiftSubnetGroupRead(d, meta) -} - -func resourceAwsRedshiftSubnetGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - describeOpts := redshift.DescribeClusterSubnetGroupsInput{ - ClusterSubnetGroupName: aws.String(d.Id()), - } - - describeResp, err := conn.DescribeClusterSubnetGroups(&describeOpts) - if err != nil { - if isAWSErr(err, "ClusterSubnetGroupNotFoundFault", "") { - log.Printf("[INFO] Redshift Subnet Group: %s was not found", d.Id()) - d.SetId("") - return nil - } - return err - } - - if len(describeResp.ClusterSubnetGroups) == 0 { - return fmt.Errorf("Unable to find Redshift Subnet Group: %#v", describeResp.ClusterSubnetGroups) - } - - d.Set("name", d.Id()) - d.Set("description", describeResp.ClusterSubnetGroups[0].Description) - d.Set("subnet_ids", subnetIdsToSlice(describeResp.ClusterSubnetGroups[0].Subnets)) - if err := d.Set("tags", tagsToMapRedshift(describeResp.ClusterSubnetGroups[0].Tags)); err != nil { - return fmt.Errorf("Error setting Redshift Subnet Group Tags: %#v", err) - } - - return nil -} - -func resourceAwsRedshiftSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "redshift", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("subnetgroup:%s", d.Id()), - }.String() - if tagErr := setTagsRedshift(conn, d, arn); tagErr != nil { - return tagErr - } - - if d.HasChange("subnet_ids") || d.HasChange("description") { - _, n := d.GetChange("subnet_ids") - if n == nil { - n = new(schema.Set) - } - ns := n.(*schema.Set) - - var sIds []*string - for _, s := range ns.List() { - sIds = append(sIds, aws.String(s.(string))) - } - - _, err := conn.ModifyClusterSubnetGroup(&redshift.ModifyClusterSubnetGroupInput{ - ClusterSubnetGroupName: aws.String(d.Id()), - Description: aws.String(d.Get("description").(string)), - SubnetIds: sIds, - }) - - if err != nil { - return err - } - } - - return nil -} - -func resourceAwsRedshiftSubnetGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).redshiftconn - - _, err := conn.DeleteClusterSubnetGroup(&redshift.DeleteClusterSubnetGroupInput{ - ClusterSubnetGroupName: aws.String(d.Id()), - }) - if err != nil && isAWSErr(err, "ClusterSubnetGroupNotFoundFault", "") { - return nil - } - - return err -} - -func subnetIdsToSlice(subnetIds []*redshift.Subnet) []string { - subnetsSlice := make([]string, 0, len(subnetIds)) - for _, s := range subnetIds { - subnetsSlice = append(subnetsSlice, *s.SubnetIdentifier) - } - return subnetsSlice -} - -func validateRedshiftSubnetGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 255 characters", k)) - } - if regexp.MustCompile(`(?i)^default$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q is not allowed as %q", "Default", k)) - } - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_resourcegroups_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_resourcegroups_group.go deleted file mode 100644 index ac3138ed4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_resourcegroups_group.go +++ /dev/null @@ -1,178 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/resourcegroups" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsResourceGroupsGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsResourceGroupsGroupCreate, - Read: resourceAwsResourceGroupsGroupRead, - Update: resourceAwsResourceGroupsGroupUpdate, - Delete: resourceAwsResourceGroupsGroupDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - }, - - "resource_query": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "query": { - Type: schema.TypeString, - Required: true, - }, - - "type": { - Type: schema.TypeString, - Optional: true, - Default: resourcegroups.QueryTypeTagFilters10, - ValidateFunc: validation.StringInSlice([]string{ - resourcegroups.QueryTypeTagFilters10, - }, false), - }, - }, - }, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func extractResourceGroupResourceQuery(resourceQueryList []interface{}) *resourcegroups.ResourceQuery { - resourceQuery := resourceQueryList[0].(map[string]interface{}) - - return &resourcegroups.ResourceQuery{ - Query: aws.String(resourceQuery["query"].(string)), - Type: aws.String(resourceQuery["type"].(string)), - } -} - -func resourceAwsResourceGroupsGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).resourcegroupsconn - - input := resourcegroups.CreateGroupInput{ - Description: aws.String(d.Get("description").(string)), - Name: aws.String(d.Get("name").(string)), - ResourceQuery: extractResourceGroupResourceQuery(d.Get("resource_query").([]interface{})), - } - - res, err := conn.CreateGroup(&input) - if err != nil { - return fmt.Errorf("error creating resource group: %s", err) - } - - d.SetId(aws.StringValue(res.Group.Name)) - - return resourceAwsResourceGroupsGroupRead(d, meta) -} - -func resourceAwsResourceGroupsGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).resourcegroupsconn - - g, err := conn.GetGroup(&resourcegroups.GetGroupInput{ - GroupName: aws.String(d.Id()), - }) - - if err != nil { - if isAWSErr(err, resourcegroups.ErrCodeNotFoundException, "") { - log.Printf("[WARN] Resource Groups Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("error reading resource group (%s): %s", d.Id(), err) - } - - d.Set("name", aws.StringValue(g.Group.Name)) - d.Set("description", aws.StringValue(g.Group.Description)) - d.Set("arn", aws.StringValue(g.Group.GroupArn)) - - q, err := conn.GetGroupQuery(&resourcegroups.GetGroupQueryInput{ - GroupName: aws.String(d.Id()), - }) - - if err != nil { - return fmt.Errorf("error reading resource query for resource group (%s): %s", d.Id(), err) - } - - resultQuery := map[string]interface{}{} - resultQuery["query"] = aws.StringValue(q.GroupQuery.ResourceQuery.Query) - resultQuery["type"] = aws.StringValue(q.GroupQuery.ResourceQuery.Type) - if err := d.Set("resource_query", []map[string]interface{}{resultQuery}); err != nil { - return fmt.Errorf("error setting resource_query: %s", err) - } - - return nil -} - -func resourceAwsResourceGroupsGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).resourcegroupsconn - - if d.HasChange("description") { - input := resourcegroups.UpdateGroupInput{ - GroupName: aws.String(d.Id()), - Description: aws.String(d.Get("description").(string)), - } - - _, err := conn.UpdateGroup(&input) - if err != nil { - return fmt.Errorf("error updating resource group (%s): %s", d.Id(), err) - } - } - - if d.HasChange("resource_query") { - input := resourcegroups.UpdateGroupQueryInput{ - GroupName: aws.String(d.Id()), - ResourceQuery: extractResourceGroupResourceQuery(d.Get("resource_query").([]interface{})), - } - - _, err := conn.UpdateGroupQuery(&input) - if err != nil { - return fmt.Errorf("error updating resource query for resource group (%s): %s", d.Id(), err) - } - } - - return resourceAwsResourceGroupsGroupRead(d, meta) -} - -func resourceAwsResourceGroupsGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).resourcegroupsconn - - input := resourcegroups.DeleteGroupInput{ - GroupName: aws.String(d.Id()), - } - - _, err := conn.DeleteGroup(&input) - if err != nil { - return fmt.Errorf("error deleting resource group (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go deleted file mode 100644 index 15fc8ee6c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go +++ /dev/null @@ -1,564 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -// How long to sleep if a limit-exceeded event happens -var routeTargetValidationError = errors.New("Error: more than 1 target specified. Only 1 of gateway_id, " + - "egress_only_gateway_id, nat_gateway_id, instance_id, network_interface_id or " + - "vpc_peering_connection_id is allowed.") - -// AWS Route resource Schema declaration -func resourceAwsRoute() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRouteCreate, - Read: resourceAwsRouteRead, - Update: resourceAwsRouteUpdate, - Delete: resourceAwsRouteDelete, - Exists: resourceAwsRouteExists, - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.Split(d.Id(), "_") - if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { - return nil, fmt.Errorf("unexpected format of ID (%q), expected ROUTETABLEID_DESTINATION", d.Id()) - } - routeTableID := idParts[0] - destination := idParts[1] - d.Set("route_table_id", routeTableID) - if strings.Contains(destination, ":") { - d.Set("destination_ipv6_cidr_block", destination) - } else { - d.Set("destination_cidr_block", destination) - } - d.SetId(fmt.Sprintf("r-%s%d", routeTableID, hashcode.String(destination))) - return []*schema.ResourceData{d}, nil - }, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(2 * time.Minute), - Delete: schema.DefaultTimeout(5 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "destination_cidr_block": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "destination_ipv6_cidr_block": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "destination_prefix_list_id": { - Type: schema.TypeString, - Computed: true, - }, - - "gateway_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "egress_only_gateway_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "nat_gateway_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "instance_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "instance_owner_id": { - Type: schema.TypeString, - Computed: true, - }, - - "network_interface_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "origin": { - Type: schema.TypeString, - Computed: true, - }, - - "state": { - Type: schema.TypeString, - Computed: true, - }, - - "route_table_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "transit_gateway_id": { - Type: schema.TypeString, - Optional: true, - }, - - "vpc_peering_connection_id": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsRouteCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - var numTargets int - var setTarget string - allowedTargets := []string{ - "egress_only_gateway_id", - "gateway_id", - "nat_gateway_id", - "instance_id", - "network_interface_id", - "transit_gateway_id", - "vpc_peering_connection_id", - } - - // Check if more than 1 target is specified - for _, target := range allowedTargets { - if len(d.Get(target).(string)) > 0 { - numTargets++ - setTarget = target - } - } - - if numTargets > 1 { - return routeTargetValidationError - } - - createOpts := &ec2.CreateRouteInput{} - // Formulate CreateRouteInput based on the target type - switch setTarget { - case "gateway_id": - createOpts = &ec2.CreateRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - GatewayId: aws.String(d.Get("gateway_id").(string)), - } - - if v, ok := d.GetOk("destination_cidr_block"); ok { - createOpts.DestinationCidrBlock = aws.String(v.(string)) - } - - if v, ok := d.GetOk("destination_ipv6_cidr_block"); ok { - createOpts.DestinationIpv6CidrBlock = aws.String(v.(string)) - } - - case "egress_only_gateway_id": - createOpts = &ec2.CreateRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - DestinationIpv6CidrBlock: aws.String(d.Get("destination_ipv6_cidr_block").(string)), - EgressOnlyInternetGatewayId: aws.String(d.Get("egress_only_gateway_id").(string)), - } - case "nat_gateway_id": - createOpts = &ec2.CreateRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - DestinationCidrBlock: aws.String(d.Get("destination_cidr_block").(string)), - NatGatewayId: aws.String(d.Get("nat_gateway_id").(string)), - } - case "instance_id": - createOpts = &ec2.CreateRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - InstanceId: aws.String(d.Get("instance_id").(string)), - } - - if v, ok := d.GetOk("destination_cidr_block"); ok { - createOpts.DestinationCidrBlock = aws.String(v.(string)) - } - - if v, ok := d.GetOk("destination_ipv6_cidr_block"); ok { - createOpts.DestinationIpv6CidrBlock = aws.String(v.(string)) - } - - case "network_interface_id": - createOpts = &ec2.CreateRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - NetworkInterfaceId: aws.String(d.Get("network_interface_id").(string)), - } - - if v, ok := d.GetOk("destination_cidr_block"); ok { - createOpts.DestinationCidrBlock = aws.String(v.(string)) - } - - if v, ok := d.GetOk("destination_ipv6_cidr_block"); ok { - createOpts.DestinationIpv6CidrBlock = aws.String(v.(string)) - } - - case "transit_gateway_id": - createOpts = &ec2.CreateRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - TransitGatewayId: aws.String(d.Get("transit_gateway_id").(string)), - } - - if v, ok := d.GetOk("destination_cidr_block"); ok { - createOpts.DestinationCidrBlock = aws.String(v.(string)) - } - - if v, ok := d.GetOk("destination_ipv6_cidr_block"); ok { - createOpts.DestinationIpv6CidrBlock = aws.String(v.(string)) - } - - case "vpc_peering_connection_id": - createOpts = &ec2.CreateRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - VpcPeeringConnectionId: aws.String(d.Get("vpc_peering_connection_id").(string)), - } - - if v, ok := d.GetOk("destination_cidr_block"); ok { - createOpts.DestinationCidrBlock = aws.String(v.(string)) - } - - if v, ok := d.GetOk("destination_ipv6_cidr_block"); ok { - createOpts.DestinationIpv6CidrBlock = aws.String(v.(string)) - } - - default: - return fmt.Errorf("A valid target type is missing. Specify one of the following attributes: %s", strings.Join(allowedTargets, ", ")) - } - log.Printf("[DEBUG] Route create config: %s", createOpts) - - // Create the route - var err error - - err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - _, err = conn.CreateRoute(createOpts) - - if isAWSErr(err, "InvalidParameterException", "") { - return resource.RetryableError(err) - } - - if isAWSErr(err, "InvalidTransitGatewayID.NotFound", "") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - if err != nil { - return fmt.Errorf("Error creating route: %s", err) - } - - var route *ec2.Route - - if v, ok := d.GetOk("destination_cidr_block"); ok { - err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - route, err = resourceAwsRouteFindRoute(conn, d.Get("route_table_id").(string), v.(string), "") - return resource.RetryableError(err) - }) - if err != nil { - return fmt.Errorf("Error finding route after creating it: %s", err) - } - } - - if v, ok := d.GetOk("destination_ipv6_cidr_block"); ok { - err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - route, err = resourceAwsRouteFindRoute(conn, d.Get("route_table_id").(string), "", v.(string)) - return resource.RetryableError(err) - }) - if err != nil { - return fmt.Errorf("Error finding route after creating it: %s", err) - } - } - - d.SetId(resourceAwsRouteID(d, route)) - resourceAwsRouteSetResourceData(d, route) - return nil -} - -func resourceAwsRouteRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - routeTableId := d.Get("route_table_id").(string) - - destinationCidrBlock := d.Get("destination_cidr_block").(string) - destinationIpv6CidrBlock := d.Get("destination_ipv6_cidr_block").(string) - - route, err := resourceAwsRouteFindRoute(conn, routeTableId, destinationCidrBlock, destinationIpv6CidrBlock) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidRouteTableID.NotFound" { - log.Printf("[WARN] Route Table %q could not be found. Removing Route from state.", - routeTableId) - d.SetId("") - return nil - } - return err - } - resourceAwsRouteSetResourceData(d, route) - return nil -} - -func resourceAwsRouteSetResourceData(d *schema.ResourceData, route *ec2.Route) { - d.Set("destination_prefix_list_id", route.DestinationPrefixListId) - d.Set("gateway_id", route.GatewayId) - d.Set("egress_only_gateway_id", route.EgressOnlyInternetGatewayId) - d.Set("nat_gateway_id", route.NatGatewayId) - d.Set("instance_id", route.InstanceId) - d.Set("instance_owner_id", route.InstanceOwnerId) - d.Set("network_interface_id", route.NetworkInterfaceId) - d.Set("origin", route.Origin) - d.Set("state", route.State) - d.Set("transit_gateway_id", route.TransitGatewayId) - d.Set("vpc_peering_connection_id", route.VpcPeeringConnectionId) -} - -func resourceAwsRouteUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - var numTargets int - var setTarget string - - allowedTargets := []string{ - "egress_only_gateway_id", - "gateway_id", - "nat_gateway_id", - "network_interface_id", - "instance_id", - "transit_gateway_id", - "vpc_peering_connection_id", - } - replaceOpts := &ec2.ReplaceRouteInput{} - - // Check if more than 1 target is specified - for _, target := range allowedTargets { - if len(d.Get(target).(string)) > 0 { - numTargets++ - setTarget = target - } - } - - switch setTarget { - //instance_id is a special case due to the fact that AWS will "discover" the network_interface_id - //when it creates the route and return that data. In the case of an update, we should ignore the - //existing network_interface_id - case "instance_id": - if numTargets > 2 || (numTargets == 2 && len(d.Get("network_interface_id").(string)) == 0) { - return routeTargetValidationError - } - default: - if numTargets > 1 { - return routeTargetValidationError - } - } - - // Formulate ReplaceRouteInput based on the target type - switch setTarget { - case "gateway_id": - replaceOpts = &ec2.ReplaceRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - DestinationCidrBlock: aws.String(d.Get("destination_cidr_block").(string)), - GatewayId: aws.String(d.Get("gateway_id").(string)), - } - case "egress_only_gateway_id": - replaceOpts = &ec2.ReplaceRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - DestinationIpv6CidrBlock: aws.String(d.Get("destination_ipv6_cidr_block").(string)), - EgressOnlyInternetGatewayId: aws.String(d.Get("egress_only_gateway_id").(string)), - } - case "nat_gateway_id": - replaceOpts = &ec2.ReplaceRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - DestinationCidrBlock: aws.String(d.Get("destination_cidr_block").(string)), - NatGatewayId: aws.String(d.Get("nat_gateway_id").(string)), - } - case "instance_id": - replaceOpts = &ec2.ReplaceRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - DestinationCidrBlock: aws.String(d.Get("destination_cidr_block").(string)), - InstanceId: aws.String(d.Get("instance_id").(string)), - } - case "network_interface_id": - replaceOpts = &ec2.ReplaceRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - DestinationCidrBlock: aws.String(d.Get("destination_cidr_block").(string)), - NetworkInterfaceId: aws.String(d.Get("network_interface_id").(string)), - } - case "transit_gateway_id": - replaceOpts = &ec2.ReplaceRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - DestinationCidrBlock: aws.String(d.Get("destination_cidr_block").(string)), - TransitGatewayId: aws.String(d.Get("transit_gateway_id").(string)), - } - case "vpc_peering_connection_id": - replaceOpts = &ec2.ReplaceRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - DestinationCidrBlock: aws.String(d.Get("destination_cidr_block").(string)), - VpcPeeringConnectionId: aws.String(d.Get("vpc_peering_connection_id").(string)), - } - default: - return fmt.Errorf("An invalid target type specified: %s", setTarget) - } - log.Printf("[DEBUG] Route replace config: %s", replaceOpts) - - // Replace the route - _, err := conn.ReplaceRoute(replaceOpts) - return err -} - -func resourceAwsRouteDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - deleteOpts := &ec2.DeleteRouteInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - } - if v, ok := d.GetOk("destination_cidr_block"); ok { - deleteOpts.DestinationCidrBlock = aws.String(v.(string)) - } - if v, ok := d.GetOk("destination_ipv6_cidr_block"); ok { - deleteOpts.DestinationIpv6CidrBlock = aws.String(v.(string)) - } - log.Printf("[DEBUG] Route delete opts: %s", deleteOpts) - - var err error = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { - log.Printf("[DEBUG] Trying to delete route with opts %s", deleteOpts) - resp, err := conn.DeleteRoute(deleteOpts) - log.Printf("[DEBUG] Route delete result: %s", resp) - - if err == nil { - return nil - } - - ec2err, ok := err.(awserr.Error) - if !ok { - return resource.NonRetryableError(err) - } - if ec2err.Code() == "InvalidParameterException" { - log.Printf("[DEBUG] Trying to delete route again: %q", - ec2err.Message()) - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - }) - - return err -} - -func resourceAwsRouteExists(d *schema.ResourceData, meta interface{}) (bool, error) { - conn := meta.(*AWSClient).ec2conn - routeTableId := d.Get("route_table_id").(string) - - findOpts := &ec2.DescribeRouteTablesInput{ - RouteTableIds: []*string{&routeTableId}, - } - - res, err := conn.DescribeRouteTables(findOpts) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidRouteTableID.NotFound" { - log.Printf("[WARN] Route Table %q could not be found.", routeTableId) - return false, nil - } - return false, fmt.Errorf("Error while checking if route exists: %s", err) - } - - if len(res.RouteTables) < 1 || res.RouteTables[0] == nil { - log.Printf("[WARN] Route Table %q is gone, or route does not exist.", - routeTableId) - return false, nil - } - - if v, ok := d.GetOk("destination_cidr_block"); ok { - for _, route := range (*res.RouteTables[0]).Routes { - if route.DestinationCidrBlock != nil && *route.DestinationCidrBlock == v.(string) { - return true, nil - } - } - } - - if v, ok := d.GetOk("destination_ipv6_cidr_block"); ok { - for _, route := range (*res.RouteTables[0]).Routes { - if route.DestinationIpv6CidrBlock != nil && *route.DestinationIpv6CidrBlock == v.(string) { - return true, nil - } - } - } - - return false, nil -} - -// Helper: Create an ID for a route -func resourceAwsRouteID(d *schema.ResourceData, r *ec2.Route) string { - - if r.DestinationIpv6CidrBlock != nil && *r.DestinationIpv6CidrBlock != "" { - return fmt.Sprintf("r-%s%d", d.Get("route_table_id").(string), hashcode.String(*r.DestinationIpv6CidrBlock)) - } - - return fmt.Sprintf("r-%s%d", d.Get("route_table_id").(string), hashcode.String(*r.DestinationCidrBlock)) -} - -// Helper: retrieve a route -func resourceAwsRouteFindRoute(conn *ec2.EC2, rtbid string, cidr string, ipv6cidr string) (*ec2.Route, error) { - routeTableID := rtbid - - findOpts := &ec2.DescribeRouteTablesInput{ - RouteTableIds: []*string{&routeTableID}, - } - - resp, err := conn.DescribeRouteTables(findOpts) - if err != nil { - return nil, err - } - - if len(resp.RouteTables) < 1 || resp.RouteTables[0] == nil { - return nil, fmt.Errorf("Route Table %q is gone, or route does not exist.", - routeTableID) - } - - if cidr != "" { - for _, route := range (*resp.RouteTables[0]).Routes { - if route.DestinationCidrBlock != nil && *route.DestinationCidrBlock == cidr { - return route, nil - } - } - - return nil, fmt.Errorf("Unable to find matching route for Route Table (%s) "+ - "and destination CIDR block (%s).", rtbid, cidr) - } - - if ipv6cidr != "" { - for _, route := range (*resp.RouteTables[0]).Routes { - if route.DestinationIpv6CidrBlock != nil && *route.DestinationIpv6CidrBlock == ipv6cidr { - return route, nil - } - } - - return nil, fmt.Errorf("Unable to find matching route for Route Table (%s) "+ - "and destination IPv6 CIDR block (%s).", rtbid, ipv6cidr) - } - - return nil, fmt.Errorf("When trying to find a matching route for Route Table %q "+ - "you need to specify a CIDR block of IPv6 CIDR Block", rtbid) - -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_delegation_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_delegation_set.go deleted file mode 100644 index 1b14c6c1c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_delegation_set.go +++ /dev/null @@ -1,111 +0,0 @@ -package aws - -import ( - "log" - "sort" - "strings" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/route53" -) - -func resourceAwsRoute53DelegationSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRoute53DelegationSetCreate, - Read: resourceAwsRoute53DelegationSetRead, - Delete: resourceAwsRoute53DelegationSetDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "reference_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "name_servers": { - Type: schema.TypeList, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - }, - }, - } -} - -func resourceAwsRoute53DelegationSetCreate(d *schema.ResourceData, meta interface{}) error { - r53 := meta.(*AWSClient).r53conn - - callerRef := resource.UniqueId() - if v, ok := d.GetOk("reference_name"); ok { - callerRef = strings.Join([]string{ - v.(string), "-", callerRef, - }, "") - } - input := &route53.CreateReusableDelegationSetInput{ - CallerReference: aws.String(callerRef), - } - - log.Printf("[DEBUG] Creating Route53 reusable delegation set: %#v", input) - out, err := r53.CreateReusableDelegationSet(input) - if err != nil { - return err - } - log.Printf("[DEBUG] Route53 reusable delegation set created: %#v", out) - - set := out.DelegationSet - d.SetId(cleanDelegationSetId(*set.Id)) - d.Set("name_servers", expandNameServers(set.NameServers)) - return nil -} - -func resourceAwsRoute53DelegationSetRead(d *schema.ResourceData, meta interface{}) error { - r53 := meta.(*AWSClient).r53conn - - input := &route53.GetReusableDelegationSetInput{ - Id: aws.String(cleanDelegationSetId(d.Id())), - } - log.Printf("[DEBUG] Reading Route53 reusable delegation set: %#v", input) - out, err := r53.GetReusableDelegationSet(input) - if err != nil { - return err - } - log.Printf("[DEBUG] Route53 reusable delegation set received: %#v", out) - - set := out.DelegationSet - - d.SetId(cleanDelegationSetId(*set.Id)) - d.Set("name_servers", expandNameServers(set.NameServers)) - - return nil -} - -func resourceAwsRoute53DelegationSetDelete(d *schema.ResourceData, meta interface{}) error { - r53 := meta.(*AWSClient).r53conn - - input := &route53.DeleteReusableDelegationSetInput{ - Id: aws.String(cleanDelegationSetId(d.Id())), - } - log.Printf("[DEBUG] Deleting Route53 reusable delegation set: %#v", input) - _, err := r53.DeleteReusableDelegationSet(input) - return err -} - -func expandNameServers(name_servers []*string) []string { - log.Printf("[DEBUG] Processing %d name servers: %#v...", len(name_servers), name_servers) - ns := make([]string, len(name_servers)) - for i, server := range name_servers { - ns[i] = *server - } - sort.Strings(ns) - log.Printf("[DEBUG] Returning processed name servers: %#v", ns) - return ns -} - -func cleanDelegationSetId(id string) string { - return strings.TrimPrefix(id, "/delegationset/") -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_health_check.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_health_check.go deleted file mode 100644 index d9c609907..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_health_check.go +++ /dev/null @@ -1,390 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/route53" -) - -func resourceAwsRoute53HealthCheck() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRoute53HealthCheckCreate, - Read: resourceAwsRoute53HealthCheckRead, - Update: resourceAwsRoute53HealthCheckUpdate, - Delete: resourceAwsRoute53HealthCheckDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: func(val interface{}) string { - return strings.ToUpper(val.(string)) - }, - ValidateFunc: validation.StringInSlice([]string{ - route53.HealthCheckTypeCalculated, - route53.HealthCheckTypeCloudwatchMetric, - route53.HealthCheckTypeHttp, - route53.HealthCheckTypeHttpStrMatch, - route53.HealthCheckTypeHttps, - route53.HealthCheckTypeHttpsStrMatch, - route53.HealthCheckTypeTcp, - }, true), - }, - "failure_threshold": { - Type: schema.TypeInt, - Optional: true, - }, - "request_interval": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, // todo this should be updateable but the awslabs route53 service doesnt have the ability - }, - "ip_address": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "fqdn": { - Type: schema.TypeString, - Optional: true, - }, - "port": { - Type: schema.TypeInt, - Optional: true, - }, - - "invert_healthcheck": { - Type: schema.TypeBool, - Optional: true, - }, - - "resource_path": { - Type: schema.TypeString, - Optional: true, - }, - - "search_string": { - Type: schema.TypeString, - Optional: true, - }, - - "measure_latency": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - - "child_healthchecks": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Set: schema.HashString, - }, - "child_health_threshold": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtMost(256), - }, - - "cloudwatch_alarm_name": { - Type: schema.TypeString, - Optional: true, - }, - - "cloudwatch_alarm_region": { - Type: schema.TypeString, - Optional: true, - }, - - "insufficient_data_health_status": { - Type: schema.TypeString, - Optional: true, - }, - "reference_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "enable_sni": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "regions": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Set: schema.HashString, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsRoute53HealthCheckUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).r53conn - - updateHealthCheck := &route53.UpdateHealthCheckInput{ - HealthCheckId: aws.String(d.Id()), - } - - if d.HasChange("failure_threshold") { - updateHealthCheck.FailureThreshold = aws.Int64(int64(d.Get("failure_threshold").(int))) - } - - if d.HasChange("fqdn") { - updateHealthCheck.FullyQualifiedDomainName = aws.String(d.Get("fqdn").(string)) - } - - if d.HasChange("port") { - updateHealthCheck.Port = aws.Int64(int64(d.Get("port").(int))) - } - - if d.HasChange("resource_path") { - updateHealthCheck.ResourcePath = aws.String(d.Get("resource_path").(string)) - } - - if d.HasChange("invert_healthcheck") { - updateHealthCheck.Inverted = aws.Bool(d.Get("invert_healthcheck").(bool)) - } - - if d.HasChange("child_healthchecks") { - updateHealthCheck.ChildHealthChecks = expandStringList(d.Get("child_healthchecks").(*schema.Set).List()) - - } - if d.HasChange("child_health_threshold") { - updateHealthCheck.HealthThreshold = aws.Int64(int64(d.Get("child_health_threshold").(int))) - } - - if d.HasChange("search_string") { - updateHealthCheck.SearchString = aws.String(d.Get("search_string").(string)) - } - - if d.HasChange("cloudwatch_alarm_name") || d.HasChange("cloudwatch_alarm_region") { - cloudwatchAlarm := &route53.AlarmIdentifier{ - Name: aws.String(d.Get("cloudwatch_alarm_name").(string)), - Region: aws.String(d.Get("cloudwatch_alarm_region").(string)), - } - - updateHealthCheck.AlarmIdentifier = cloudwatchAlarm - } - - if d.HasChange("insufficient_data_health_status") { - updateHealthCheck.InsufficientDataHealthStatus = aws.String(d.Get("insufficient_data_health_status").(string)) - } - - if d.HasChange("enable_sni") { - updateHealthCheck.EnableSNI = aws.Bool(d.Get("enable_sni").(bool)) - } - - if d.HasChange("regions") { - updateHealthCheck.Regions = expandStringList(d.Get("regions").(*schema.Set).List()) - } - - _, err := conn.UpdateHealthCheck(updateHealthCheck) - if err != nil { - return err - } - - if err := setTagsR53(conn, d, "healthcheck"); err != nil { - return err - } - - return resourceAwsRoute53HealthCheckRead(d, meta) -} - -func resourceAwsRoute53HealthCheckCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).r53conn - - healthConfig := &route53.HealthCheckConfig{ - Type: aws.String(d.Get("type").(string)), - } - - if v, ok := d.GetOk("request_interval"); ok { - healthConfig.RequestInterval = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("failure_threshold"); ok { - healthConfig.FailureThreshold = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("fqdn"); ok { - healthConfig.FullyQualifiedDomainName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("search_string"); ok { - healthConfig.SearchString = aws.String(v.(string)) - } - - if v, ok := d.GetOk("ip_address"); ok { - healthConfig.IPAddress = aws.String(v.(string)) - } - - if v, ok := d.GetOk("port"); ok { - healthConfig.Port = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("resource_path"); ok { - healthConfig.ResourcePath = aws.String(v.(string)) - } - - if *healthConfig.Type != route53.HealthCheckTypeCalculated && *healthConfig.Type != route53.HealthCheckTypeCloudwatchMetric { - if v, ok := d.GetOk("measure_latency"); ok { - healthConfig.MeasureLatency = aws.Bool(v.(bool)) - } - } - - if v, ok := d.GetOk("invert_healthcheck"); ok { - healthConfig.Inverted = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("enable_sni"); ok { - healthConfig.EnableSNI = aws.Bool(v.(bool)) - } - - if *healthConfig.Type == route53.HealthCheckTypeCalculated { - if v, ok := d.GetOk("child_healthchecks"); ok { - healthConfig.ChildHealthChecks = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("child_health_threshold"); ok { - healthConfig.HealthThreshold = aws.Int64(int64(v.(int))) - } - } - - if *healthConfig.Type == route53.HealthCheckTypeCloudwatchMetric { - cloudwatchAlarmIdentifier := &route53.AlarmIdentifier{} - - if v, ok := d.GetOk("cloudwatch_alarm_name"); ok { - cloudwatchAlarmIdentifier.Name = aws.String(v.(string)) - } - - if v, ok := d.GetOk("cloudwatch_alarm_region"); ok { - cloudwatchAlarmIdentifier.Region = aws.String(v.(string)) - } - - healthConfig.AlarmIdentifier = cloudwatchAlarmIdentifier - - if v, ok := d.GetOk("insufficient_data_health_status"); ok { - healthConfig.InsufficientDataHealthStatus = aws.String(v.(string)) - } - } - - if v, ok := d.GetOk("regions"); ok { - healthConfig.Regions = expandStringList(v.(*schema.Set).List()) - } - - callerRef := resource.UniqueId() - if v, ok := d.GetOk("reference_name"); ok { - callerRef = fmt.Sprintf("%s-%s", v.(string), callerRef) - } - - input := &route53.CreateHealthCheckInput{ - CallerReference: aws.String(callerRef), - HealthCheckConfig: healthConfig, - } - - resp, err := conn.CreateHealthCheck(input) - - if err != nil { - return err - } - - d.SetId(*resp.HealthCheck.Id) - - if err := setTagsR53(conn, d, "healthcheck"); err != nil { - return err - } - - return resourceAwsRoute53HealthCheckRead(d, meta) -} - -func resourceAwsRoute53HealthCheckRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).r53conn - - read, err := conn.GetHealthCheck(&route53.GetHealthCheckInput{HealthCheckId: aws.String(d.Id())}) - if err != nil { - if r53err, ok := err.(awserr.Error); ok && r53err.Code() == "NoSuchHealthCheck" { - d.SetId("") - return nil - - } - return err - } - - if read == nil { - return nil - } - - updated := read.HealthCheck.HealthCheckConfig - d.Set("type", updated.Type) - d.Set("failure_threshold", updated.FailureThreshold) - d.Set("request_interval", updated.RequestInterval) - d.Set("fqdn", updated.FullyQualifiedDomainName) - d.Set("search_string", updated.SearchString) - d.Set("ip_address", updated.IPAddress) - d.Set("port", updated.Port) - d.Set("resource_path", updated.ResourcePath) - d.Set("measure_latency", updated.MeasureLatency) - d.Set("invert_healthcheck", updated.Inverted) - - if err := d.Set("child_healthchecks", flattenStringList(updated.ChildHealthChecks)); err != nil { - return fmt.Errorf("error setting child_healthchecks: %s", err) - } - - d.Set("child_health_threshold", updated.HealthThreshold) - d.Set("insufficient_data_health_status", updated.InsufficientDataHealthStatus) - d.Set("enable_sni", updated.EnableSNI) - - d.Set("regions", flattenStringList(updated.Regions)) - - if updated.AlarmIdentifier != nil { - d.Set("cloudwatch_alarm_name", updated.AlarmIdentifier.Name) - d.Set("cloudwatch_alarm_region", updated.AlarmIdentifier.Region) - } - - // read the tags - req := &route53.ListTagsForResourceInput{ - ResourceId: aws.String(d.Id()), - ResourceType: aws.String("healthcheck"), - } - - resp, err := conn.ListTagsForResource(req) - if err != nil { - return err - } - - var tags []*route53.Tag - if resp.ResourceTagSet != nil { - tags = resp.ResourceTagSet.Tags - } - - if err := d.Set("tags", tagsToMapR53(tags)); err != nil { - return err - } - - return nil -} - -func resourceAwsRoute53HealthCheckDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).r53conn - - log.Printf("[DEBUG] Deleteing Route53 health check: %s", d.Id()) - _, err := conn.DeleteHealthCheck(&route53.DeleteHealthCheckInput{HealthCheckId: aws.String(d.Id())}) - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_query_log.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_query_log.go deleted file mode 100644 index f992141f2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_query_log.go +++ /dev/null @@ -1,91 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/route53" -) - -func resourceAwsRoute53QueryLog() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRoute53QueryLogCreate, - Read: resourceAwsRoute53QueryLogRead, - Delete: resourceAwsRoute53QueryLogDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "cloudwatch_log_group_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - - "zone_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsRoute53QueryLogCreate(d *schema.ResourceData, meta interface{}) error { - r53 := meta.(*AWSClient).r53conn - - input := &route53.CreateQueryLoggingConfigInput{ - CloudWatchLogsLogGroupArn: aws.String(d.Get("cloudwatch_log_group_arn").(string)), - HostedZoneId: aws.String(d.Get("zone_id").(string)), - } - - log.Printf("[DEBUG] Creating Route53 query logging configuration: %#v", input) - out, err := r53.CreateQueryLoggingConfig(input) - if err != nil { - return fmt.Errorf("Error creating Route53 query logging configuration: %s", err) - } - log.Printf("[DEBUG] Route53 query logging configuration created: %#v", out) - - d.SetId(*out.QueryLoggingConfig.Id) - - return resourceAwsRoute53QueryLogRead(d, meta) -} - -func resourceAwsRoute53QueryLogRead(d *schema.ResourceData, meta interface{}) error { - r53 := meta.(*AWSClient).r53conn - - input := &route53.GetQueryLoggingConfigInput{ - Id: aws.String(d.Id()), - } - log.Printf("[DEBUG] Reading Route53 query logging configuration: %#v", input) - out, err := r53.GetQueryLoggingConfig(input) - if err != nil { - return fmt.Errorf("Error reading Route53 query logging configuration: %s", err) - } - log.Printf("[DEBUG] Route53 query logging configuration received: %#v", out) - - d.Set("cloudwatch_log_group_arn", out.QueryLoggingConfig.CloudWatchLogsLogGroupArn) - d.Set("zone_id", out.QueryLoggingConfig.HostedZoneId) - - return nil -} - -func resourceAwsRoute53QueryLogDelete(d *schema.ResourceData, meta interface{}) error { - r53 := meta.(*AWSClient).r53conn - - input := &route53.DeleteQueryLoggingConfigInput{ - Id: aws.String(d.Id()), - } - log.Printf("[DEBUG] Deleting Route53 query logging configuration: %#v", input) - _, err := r53.DeleteQueryLoggingConfig(input) - if err != nil { - return fmt.Errorf("Error deleting Route53 query logging configuration: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go deleted file mode 100644 index 671cc7af8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go +++ /dev/null @@ -1,990 +0,0 @@ -package aws - -import ( - "bytes" - "errors" - "fmt" - "log" - "regexp" - "strconv" - "strings" - "time" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/route53" -) - -var r53NoRecordsFound = errors.New("No matching records found") -var r53NoHostedZoneFound = errors.New("No matching Hosted Zone found") -var r53ValidRecordTypes = regexp.MustCompile("^(A|AAAA|CAA|CNAME|MX|NAPTR|NS|PTR|SOA|SPF|SRV|TXT)$") - -func resourceAwsRoute53Record() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRoute53RecordCreate, - Read: resourceAwsRoute53RecordRead, - Update: resourceAwsRoute53RecordUpdate, - Delete: resourceAwsRoute53RecordDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - SchemaVersion: 2, - MigrateState: resourceAwsRoute53RecordMigrateState, - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: func(v interface{}) string { - value := strings.TrimSuffix(v.(string), ".") - return strings.ToLower(value) - }, - }, - - "fqdn": { - Type: schema.TypeString, - Computed: true, - }, - - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - route53.RRTypeSoa, - route53.RRTypeA, - route53.RRTypeTxt, - route53.RRTypeNs, - route53.RRTypeCname, - route53.RRTypeMx, - route53.RRTypeNaptr, - route53.RRTypePtr, - route53.RRTypeSrv, - route53.RRTypeSpf, - route53.RRTypeAaaa, - route53.RRTypeCaa, - }, false), - }, - - "zone_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - - "ttl": { - Type: schema.TypeInt, - Optional: true, - ConflictsWith: []string{"alias"}, - }, - - "weight": { - Type: schema.TypeInt, - Optional: true, - Removed: "Now implemented as weighted_routing_policy; Please see https://www.terraform.io/docs/providers/aws/r/route53_record.html", - }, - - "set_identifier": { - Type: schema.TypeString, - Optional: true, - }, - - "alias": { - Type: schema.TypeSet, - Optional: true, - ConflictsWith: []string{"records", "ttl"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "zone_id": { - Type: schema.TypeString, - Required: true, - }, - - "name": { - Type: schema.TypeString, - Required: true, - StateFunc: normalizeAwsAliasName, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - return strings.EqualFold(old, new) - }, - }, - - "evaluate_target_health": { - Type: schema.TypeBool, - Required: true, - }, - }, - }, - Set: resourceAwsRoute53AliasRecordHash, - }, - - "failover": { // PRIMARY | SECONDARY - Type: schema.TypeString, - Optional: true, - Removed: "Now implemented as failover_routing_policy; see docs", - }, - - "failover_routing_policy": { - Type: schema.TypeList, - Optional: true, - ConflictsWith: []string{ - "geolocation_routing_policy", - "latency_routing_policy", - "weighted_routing_policy", - "multivalue_answer_routing_policy", - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if value != "PRIMARY" && value != "SECONDARY" { - es = append(es, fmt.Errorf("Failover policy type must be PRIMARY or SECONDARY")) - } - return - }, - }, - }, - }, - }, - - "latency_routing_policy": { - Type: schema.TypeList, - Optional: true, - ConflictsWith: []string{ - "failover_routing_policy", - "geolocation_routing_policy", - "weighted_routing_policy", - "multivalue_answer_routing_policy", - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "region": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - - "geolocation_routing_policy": { // AWS Geolocation - Type: schema.TypeList, - Optional: true, - ConflictsWith: []string{ - "failover_routing_policy", - "latency_routing_policy", - "weighted_routing_policy", - "multivalue_answer_routing_policy", - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "continent": { - Type: schema.TypeString, - Optional: true, - }, - "country": { - Type: schema.TypeString, - Optional: true, - }, - "subdivision": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "weighted_routing_policy": { - Type: schema.TypeList, - Optional: true, - ConflictsWith: []string{ - "failover_routing_policy", - "geolocation_routing_policy", - "latency_routing_policy", - "multivalue_answer_routing_policy", - }, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "weight": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - }, - - "multivalue_answer_routing_policy": { - Type: schema.TypeBool, - Optional: true, - ConflictsWith: []string{ - "failover_routing_policy", - "geolocation_routing_policy", - "latency_routing_policy", - "weighted_routing_policy", - }, - }, - - "health_check_id": { // ID of health check - Type: schema.TypeString, - Optional: true, - }, - - "records": { - Type: schema.TypeSet, - ConflictsWith: []string{"alias"}, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Set: schema.HashString, - }, - - "allow_overwrite": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - }, - } -} - -func resourceAwsRoute53RecordUpdate(d *schema.ResourceData, meta interface{}) error { - // Route 53 supports CREATE, DELETE, and UPSERT actions. We use UPSERT, and - // AWS dynamically determines if a record should be created or updated. - // Amazon Route 53 can update an existing resource record set only when all - // of the following values match: Name, Type and SetIdentifier - // See http://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html - - if !d.HasChange("type") && !d.HasChange("set_identifier") { - // If neither type nor set_identifier changed we use UPSERT, - // for resource update here we simply fall through to - // our resource create function. - return resourceAwsRoute53RecordCreate(d, meta) - } - - // Otherwise we delete the existing record and create a new record within - // a transactional change - conn := meta.(*AWSClient).r53conn - zone := cleanZoneID(d.Get("zone_id").(string)) - - var err error - zoneRecord, err := conn.GetHostedZone(&route53.GetHostedZoneInput{Id: aws.String(zone)}) - if err != nil { - return err - } - if zoneRecord.HostedZone == nil { - return fmt.Errorf("No Route53 Zone found for id (%s)", zone) - } - - // Build the to be deleted record - en := expandRecordName(d.Get("name").(string), *zoneRecord.HostedZone.Name) - typeo, _ := d.GetChange("type") - - oldRec := &route53.ResourceRecordSet{ - Name: aws.String(en), - Type: aws.String(typeo.(string)), - } - - if v, _ := d.GetChange("ttl"); v.(int) != 0 { - oldRec.TTL = aws.Int64(int64(v.(int))) - } - - // Resource records - if v, _ := d.GetChange("records"); v != nil { - recs := v.(*schema.Set).List() - if len(recs) > 0 { - oldRec.ResourceRecords = expandResourceRecords(recs, typeo.(string)) - } - } - - // Alias record - if v, _ := d.GetChange("alias"); v != nil { - aliases := v.(*schema.Set).List() - if len(aliases) == 1 { - alias := aliases[0].(map[string]interface{}) - oldRec.AliasTarget = &route53.AliasTarget{ - DNSName: aws.String(alias["name"].(string)), - EvaluateTargetHealth: aws.Bool(alias["evaluate_target_health"].(bool)), - HostedZoneId: aws.String(alias["zone_id"].(string)), - } - } - } - - if v, _ := d.GetChange("set_identifier"); v.(string) != "" { - oldRec.SetIdentifier = aws.String(v.(string)) - } - - // Build the to be created record - rec, err := resourceAwsRoute53RecordBuildSet(d, *zoneRecord.HostedZone.Name) - if err != nil { - return err - } - - // Delete the old and create the new records in a single batch. We abuse - // StateChangeConf for this to retry for us since Route53 sometimes returns - // errors about another operation happening at the same time. - changeBatch := &route53.ChangeBatch{ - Comment: aws.String("Managed by Terraform"), - Changes: []*route53.Change{ - { - Action: aws.String("DELETE"), - ResourceRecordSet: oldRec, - }, - { - Action: aws.String("CREATE"), - ResourceRecordSet: rec, - }, - }, - } - - req := &route53.ChangeResourceRecordSetsInput{ - HostedZoneId: aws.String(cleanZoneID(*zoneRecord.HostedZone.Id)), - ChangeBatch: changeBatch, - } - - log.Printf("[DEBUG] Updating resource records for zone: %s, name: %s\n\n%s", - zone, *rec.Name, req) - - respRaw, err := changeRoute53RecordSet(conn, req) - if err != nil { - return fmt.Errorf("[ERR]: Error building changeset: %s", err) - } - - changeInfo := respRaw.(*route53.ChangeResourceRecordSetsOutput).ChangeInfo - - // Generate an ID - vars := []string{ - zone, - strings.ToLower(d.Get("name").(string)), - d.Get("type").(string), - } - if v, ok := d.GetOk("set_identifier"); ok { - vars = append(vars, v.(string)) - } - - d.SetId(strings.Join(vars, "_")) - - err = waitForRoute53RecordSetToSync(conn, cleanChangeID(*changeInfo.Id)) - if err != nil { - return err - } - - _, err = findRecord(d, meta) - return err -} - -func resourceAwsRoute53RecordCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).r53conn - zone := cleanZoneID(d.Get("zone_id").(string)) - - var err error - zoneRecord, err := conn.GetHostedZone(&route53.GetHostedZoneInput{Id: aws.String(zone)}) - if err != nil { - return err - } - if zoneRecord.HostedZone == nil { - return fmt.Errorf("No Route53 Zone found for id (%s)", zone) - } - - // Build the record - rec, err := resourceAwsRoute53RecordBuildSet(d, *zoneRecord.HostedZone.Name) - if err != nil { - return err - } - - // Protect existing DNS records which might be managed in another way - // Use UPSERT only if the overwrite flag is true or if the current action is an update - // Else CREATE is used and fail if the same record exists - var action string - if d.Get("allow_overwrite").(bool) || !d.IsNewResource() { - action = "UPSERT" - } else { - action = "CREATE" - } - - // Create the new records. We abuse StateChangeConf for this to - // retry for us since Route53 sometimes returns errors about another - // operation happening at the same time. - changeBatch := &route53.ChangeBatch{ - Comment: aws.String("Managed by Terraform"), - Changes: []*route53.Change{ - { - Action: aws.String(action), - ResourceRecordSet: rec, - }, - }, - } - - req := &route53.ChangeResourceRecordSetsInput{ - HostedZoneId: aws.String(cleanZoneID(*zoneRecord.HostedZone.Id)), - ChangeBatch: changeBatch, - } - - log.Printf("[DEBUG] Creating resource records for zone: %s, name: %s\n\n%s", - zone, *rec.Name, req) - - respRaw, err := changeRoute53RecordSet(conn, req) - if err != nil { - return fmt.Errorf("[ERR]: Error building changeset: %s", err) - } - - changeInfo := respRaw.(*route53.ChangeResourceRecordSetsOutput).ChangeInfo - - // Generate an ID - vars := []string{ - zone, - strings.ToLower(d.Get("name").(string)), - d.Get("type").(string), - } - if v, ok := d.GetOk("set_identifier"); ok { - vars = append(vars, v.(string)) - } - - d.SetId(strings.Join(vars, "_")) - - err = waitForRoute53RecordSetToSync(conn, cleanChangeID(*changeInfo.Id)) - if err != nil { - return err - } - - _, err = findRecord(d, meta) - return err -} - -func changeRoute53RecordSet(conn *route53.Route53, input *route53.ChangeResourceRecordSetsInput) (interface{}, error) { - wait := resource.StateChangeConf{ - Pending: []string{"rejected"}, - Target: []string{"accepted"}, - Timeout: 5 * time.Minute, - MinTimeout: 1 * time.Second, - Refresh: func() (interface{}, string, error) { - resp, err := conn.ChangeResourceRecordSets(input) - if err != nil { - if r53err, ok := err.(awserr.Error); ok { - if r53err.Code() == "PriorRequestNotComplete" { - // There is some pending operation, so just retry - // in a bit. - return nil, "rejected", nil - } - } - - return nil, "failure", err - } - - return resp, "accepted", nil - }, - } - - return wait.WaitForState() -} - -func waitForRoute53RecordSetToSync(conn *route53.Route53, requestId string) error { - wait := resource.StateChangeConf{ - Delay: 30 * time.Second, - Pending: []string{"PENDING"}, - Target: []string{"INSYNC"}, - Timeout: 30 * time.Minute, - MinTimeout: 5 * time.Second, - Refresh: func() (result interface{}, state string, err error) { - changeRequest := &route53.GetChangeInput{ - Id: aws.String(requestId), - } - return resourceAwsGoRoute53Wait(conn, changeRequest) - }, - } - _, err := wait.WaitForState() - return err -} - -func resourceAwsRoute53RecordRead(d *schema.ResourceData, meta interface{}) error { - // If we don't have a zone ID we're doing an import. Parse it from the ID. - if _, ok := d.GetOk("zone_id"); !ok { - parts := parseRecordId(d.Id()) - //we check that we have parsed the id into the correct number of segments - //we need at least 3 segments! - if parts[0] == "" || parts[1] == "" || parts[2] == "" { - return fmt.Errorf("Error Importing aws_route_53 record. Please make sure the record ID is in the form ZONEID_RECORDNAME_TYPE (i.e. Z4KAPRWWNC7JR_dev_A") - } - - d.Set("zone_id", parts[0]) - d.Set("name", parts[1]) - d.Set("type", parts[2]) - if parts[3] != "" { - d.Set("set_identifier", parts[3]) - } - } - - record, err := findRecord(d, meta) - if err != nil { - switch err { - case r53NoHostedZoneFound, r53NoRecordsFound: - log.Printf("[DEBUG] %s for: %s, removing from state file", err, d.Id()) - d.SetId("") - return nil - default: - return err - } - } - - err = d.Set("records", flattenResourceRecords(record.ResourceRecords, *record.Type)) - if err != nil { - return fmt.Errorf("Error setting records for: %s, error: %#v", d.Id(), err) - } - - if alias := record.AliasTarget; alias != nil { - name := normalizeAwsAliasName(*alias.DNSName) - d.Set("alias", []interface{}{ - map[string]interface{}{ - "zone_id": *alias.HostedZoneId, - "name": name, - "evaluate_target_health": *alias.EvaluateTargetHealth, - }, - }) - } - - d.Set("ttl", record.TTL) - - if record.Failover != nil { - v := []map[string]interface{}{{ - "type": aws.StringValue(record.Failover), - }} - if err := d.Set("failover_routing_policy", v); err != nil { - return fmt.Errorf("Error setting failover records for: %s, error: %#v", d.Id(), err) - } - } - - if record.GeoLocation != nil { - v := []map[string]interface{}{{ - "continent": aws.StringValue(record.GeoLocation.ContinentCode), - "country": aws.StringValue(record.GeoLocation.CountryCode), - "subdivision": aws.StringValue(record.GeoLocation.SubdivisionCode), - }} - if err := d.Set("geolocation_routing_policy", v); err != nil { - return fmt.Errorf("Error setting gelocation records for: %s, error: %#v", d.Id(), err) - } - } - - if record.Region != nil { - v := []map[string]interface{}{{ - "region": aws.StringValue(record.Region), - }} - if err := d.Set("latency_routing_policy", v); err != nil { - return fmt.Errorf("Error setting latency records for: %s, error: %#v", d.Id(), err) - } - } - - if record.Weight != nil { - v := []map[string]interface{}{{ - "weight": aws.Int64Value((record.Weight)), - }} - if err := d.Set("weighted_routing_policy", v); err != nil { - return fmt.Errorf("Error setting weighted records for: %s, error: %#v", d.Id(), err) - } - } - - if record.MultiValueAnswer != nil { - if err := d.Set("multivalue_answer_routing_policy", *record.MultiValueAnswer); err != nil { - return fmt.Errorf("Error setting multivalue answer records for: %s, error: %#v", d.Id(), err) - } - } - - d.Set("set_identifier", record.SetIdentifier) - d.Set("health_check_id", record.HealthCheckId) - - return nil -} - -// findRecord takes a ResourceData struct for aws_resource_route53_record. It -// uses the referenced zone_id to query Route53 and find information on it's -// records. -// -// If records are found, it returns the matching -// route53.ResourceRecordSet and nil for the error. -// -// If no hosted zone is found, it returns a nil recordset and r53NoHostedZoneFound -// error. -// -// If no matching recordset is found, it returns nil and a r53NoRecordsFound -// error -// -// If there are other errors, it returns nil a nil recordset and passes on the -// error. -func findRecord(d *schema.ResourceData, meta interface{}) (*route53.ResourceRecordSet, error) { - conn := meta.(*AWSClient).r53conn - // Scan for a - zone := cleanZoneID(d.Get("zone_id").(string)) - - // get expanded name - zoneRecord, err := conn.GetHostedZone(&route53.GetHostedZoneInput{Id: aws.String(zone)}) - if err != nil { - if r53err, ok := err.(awserr.Error); ok && r53err.Code() == "NoSuchHostedZone" { - return nil, r53NoHostedZoneFound - } - return nil, err - } - - en := expandRecordName(d.Get("name").(string), *zoneRecord.HostedZone.Name) - log.Printf("[DEBUG] Expanded record name: %s", en) - d.Set("fqdn", en) - - recordName := FQDN(strings.ToLower(en)) - recordType := d.Get("type").(string) - recordSetIdentifier := d.Get("set_identifier") - - // If this isn't a Weighted, Latency, Geo, or Failover resource with - // a SetIdentifier we only need to look at the first record in the response since there can be - // only one - maxItems := "1" - if recordSetIdentifier != "" { - maxItems = "100" - } - - lopts := &route53.ListResourceRecordSetsInput{ - HostedZoneId: aws.String(cleanZoneID(zone)), - StartRecordName: aws.String(recordName), - StartRecordType: aws.String(recordType), - MaxItems: aws.String(maxItems), - } - - log.Printf("[DEBUG] List resource records sets for zone: %s, opts: %s", - zone, lopts) - - var record *route53.ResourceRecordSet - - // We need to loop over all records starting from the record we are looking for because - // Weighted, Latency, Geo, and Failover resource record sets have a special option - // called SetIdentifier which allows multiple entries with the same name and type but - // a different SetIdentifier - // For all other records we are setting the maxItems to 1 so that we don't return extra - // unneeded records - err = conn.ListResourceRecordSetsPages(lopts, func(resp *route53.ListResourceRecordSetsOutput, lastPage bool) bool { - for _, recordSet := range resp.ResourceRecordSets { - - responseName := strings.ToLower(cleanRecordName(*recordSet.Name)) - responseType := strings.ToUpper(*recordSet.Type) - - if recordName != responseName { - continue - } - if recordType != responseType { - continue - } - if recordSet.SetIdentifier != nil && *recordSet.SetIdentifier != recordSetIdentifier { - continue - } - - record = recordSet - return false - } - - nextRecordName := strings.ToLower(cleanRecordName(aws.StringValue(resp.NextRecordName))) - nextRecordType := strings.ToUpper(aws.StringValue(resp.NextRecordType)) - - if nextRecordName != recordName { - return false - } - - if nextRecordType != recordType { - return false - } - - return !lastPage - }) - - if err != nil { - return nil, err - } - if record == nil { - return nil, r53NoRecordsFound - } - return record, nil -} - -func resourceAwsRoute53RecordDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).r53conn - // Get the records - rec, err := findRecord(d, meta) - if err != nil { - switch err { - case r53NoHostedZoneFound, r53NoRecordsFound: - return nil - default: - return err - } - } - - // Change batch for deleting - changeBatch := &route53.ChangeBatch{ - Comment: aws.String("Deleted by Terraform"), - Changes: []*route53.Change{ - { - Action: aws.String("DELETE"), - ResourceRecordSet: rec, - }, - }, - } - - zone := cleanZoneID(d.Get("zone_id").(string)) - - req := &route53.ChangeResourceRecordSetsInput{ - HostedZoneId: aws.String(cleanZoneID(zone)), - ChangeBatch: changeBatch, - } - - respRaw, err := deleteRoute53RecordSet(conn, req) - if err != nil { - return fmt.Errorf("[ERR]: Error building changeset: %s", err) - } - - changeInfo := respRaw.(*route53.ChangeResourceRecordSetsOutput).ChangeInfo - if changeInfo == nil { - log.Printf("[INFO] No ChangeInfo Found. Waiting for Sync not required") - return nil - } - - err = waitForRoute53RecordSetToSync(conn, cleanChangeID(*changeInfo.Id)) - return err -} - -func deleteRoute53RecordSet(conn *route53.Route53, input *route53.ChangeResourceRecordSetsInput) (interface{}, error) { - wait := resource.StateChangeConf{ - Pending: []string{"rejected"}, - Target: []string{"accepted"}, - Timeout: 5 * time.Minute, - MinTimeout: 1 * time.Second, - Refresh: func() (interface{}, string, error) { - resp, err := conn.ChangeResourceRecordSets(input) - if err != nil { - if r53err, ok := err.(awserr.Error); ok { - if r53err.Code() == "PriorRequestNotComplete" { - // There is some pending operation, so just retry - // in a bit. - return 42, "rejected", nil - } - - if r53err.Code() == "InvalidChangeBatch" { - // This means that the record is already gone. - return resp, "accepted", nil - } - } - - return 42, "failure", err - } - - return resp, "accepted", nil - }, - } - - return wait.WaitForState() -} - -func resourceAwsRoute53RecordBuildSet(d *schema.ResourceData, zoneName string) (*route53.ResourceRecordSet, error) { - // get expanded name - en := expandRecordName(d.Get("name").(string), zoneName) - - // Create the RecordSet request with the fully expanded name, e.g. - // sub.domain.com. Route 53 requires a fully qualified domain name, but does - // not require the trailing ".", which it will itself, so we don't call FQDN - // here. - rec := &route53.ResourceRecordSet{ - Name: aws.String(en), - Type: aws.String(d.Get("type").(string)), - } - - if v, ok := d.GetOk("ttl"); ok { - rec.TTL = aws.Int64(int64(v.(int))) - } - - // Resource records - if v, ok := d.GetOk("records"); ok { - recs := v.(*schema.Set).List() - rec.ResourceRecords = expandResourceRecords(recs, d.Get("type").(string)) - } - - // Alias record - if v, ok := d.GetOk("alias"); ok { - aliases := v.(*schema.Set).List() - if len(aliases) > 1 { - return nil, fmt.Errorf("You can only define a single alias target per record") - } - alias := aliases[0].(map[string]interface{}) - rec.AliasTarget = &route53.AliasTarget{ - DNSName: aws.String(alias["name"].(string)), - EvaluateTargetHealth: aws.Bool(alias["evaluate_target_health"].(bool)), - HostedZoneId: aws.String(alias["zone_id"].(string)), - } - log.Printf("[DEBUG] Creating alias: %#v", alias) - } else { - if _, ok := d.GetOk("ttl"); !ok { - return nil, fmt.Errorf(`provider.aws: aws_route53_record: %s: "ttl": required field is not set`, d.Get("name").(string)) - } - - if _, ok := d.GetOk("records"); !ok { - return nil, fmt.Errorf(`provider.aws: aws_route53_record: %s: "records": required field is not set`, d.Get("name").(string)) - } - } - - if v, ok := d.GetOk("failover_routing_policy"); ok { - if _, ok := d.GetOk("set_identifier"); !ok { - return nil, fmt.Errorf(`provider.aws: aws_route53_record: %s: "set_identifier": required field is not set when "failover_routing_policy" is set`, d.Get("name").(string)) - } - records := v.([]interface{}) - if len(records) > 1 { - return nil, fmt.Errorf("You can only define a single failover_routing_policy per record") - } - failover := records[0].(map[string]interface{}) - - rec.Failover = aws.String(failover["type"].(string)) - } - - if v, ok := d.GetOk("health_check_id"); ok { - rec.HealthCheckId = aws.String(v.(string)) - } - - if v, ok := d.GetOk("weighted_routing_policy"); ok { - if _, ok := d.GetOk("set_identifier"); !ok { - return nil, fmt.Errorf(`provider.aws: aws_route53_record: %s: "set_identifier": required field is not set when "weighted_routing_policy" is set`, d.Get("name").(string)) - } - records := v.([]interface{}) - if len(records) > 1 { - return nil, fmt.Errorf("You can only define a single weighted_routing_policy per record") - } - weight := records[0].(map[string]interface{}) - - rec.Weight = aws.Int64(int64(weight["weight"].(int))) - } - - if v, ok := d.GetOk("set_identifier"); ok { - rec.SetIdentifier = aws.String(v.(string)) - } - - if v, ok := d.GetOk("latency_routing_policy"); ok { - if _, ok := d.GetOk("set_identifier"); !ok { - return nil, fmt.Errorf(`provider.aws: aws_route53_record: %s: "set_identifier": required field is not set when "latency_routing_policy" is set`, d.Get("name").(string)) - } - records := v.([]interface{}) - if len(records) > 1 { - return nil, fmt.Errorf("You can only define a single latency_routing_policy per record") - } - latency := records[0].(map[string]interface{}) - - rec.Region = aws.String(latency["region"].(string)) - } - - if v, ok := d.GetOk("geolocation_routing_policy"); ok { - if _, ok := d.GetOk("set_identifier"); !ok { - return nil, fmt.Errorf(`provider.aws: aws_route53_record: %s: "set_identifier": required field is not set when "geolocation_routing_policy" is set`, d.Get("name").(string)) - } - geolocations := v.([]interface{}) - if len(geolocations) > 1 { - return nil, fmt.Errorf("You can only define a single geolocation_routing_policy per record") - } - geolocation := geolocations[0].(map[string]interface{}) - - rec.GeoLocation = &route53.GeoLocation{ - ContinentCode: nilString(geolocation["continent"].(string)), - CountryCode: nilString(geolocation["country"].(string)), - SubdivisionCode: nilString(geolocation["subdivision"].(string)), - } - log.Printf("[DEBUG] Creating geolocation: %#v", geolocation) - } - - if v, ok := d.GetOk("multivalue_answer_routing_policy"); ok { - if _, ok := d.GetOk("set_identifier"); !ok { - return nil, fmt.Errorf(`provider.aws: aws_route53_record: %s: "set_identifier": required field is not set when "multivalue_answer_routing_policy" is set`, d.Get("name").(string)) - } - rec.MultiValueAnswer = aws.Bool(v.(bool)) - } - - return rec, nil -} - -func FQDN(name string) string { - n := len(name) - if n == 0 || name[n-1] == '.' { - return name - } else { - return name + "." - } -} - -// Route 53 stores certain characters with the octal equivalent in ASCII format. -// This function converts all of these characters back into the original character -// E.g. "*" is stored as "\\052" and "@" as "\\100" - -func cleanRecordName(name string) string { - str := name - s, err := strconv.Unquote(`"` + str + `"`) - if err != nil { - return str - } - return s -} - -// Check if the current record name contains the zone suffix. -// If it does not, add the zone name to form a fully qualified name -// and keep AWS happy. -func expandRecordName(name, zone string) string { - rn := strings.ToLower(strings.TrimSuffix(name, ".")) - zone = strings.TrimSuffix(zone, ".") - if !strings.HasSuffix(rn, zone) { - if len(name) == 0 { - rn = zone - } else { - rn = strings.Join([]string{rn, zone}, ".") - } - } - return rn -} - -func resourceAwsRoute53AliasRecordHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", normalizeAwsAliasName(m["name"].(string)))) - buf.WriteString(fmt.Sprintf("%s-", m["zone_id"].(string))) - buf.WriteString(fmt.Sprintf("%t-", m["evaluate_target_health"].(bool))) - - return hashcode.String(buf.String()) -} - -// nilString takes a string as an argument and returns a string -// pointer. The returned pointer is nil if the string argument is -// empty, otherwise it is a pointer to a copy of the string. -func nilString(s string) *string { - if s == "" { - return nil - } - return aws.String(s) -} - -func normalizeAwsAliasName(alias interface{}) string { - input := strings.ToLower(alias.(string)) - output := strings.TrimPrefix(input, "dualstack.") - return strings.TrimSuffix(output, ".") -} - -func parseRecordId(id string) [4]string { - var recZone, recType, recName, recSet string - parts := strings.SplitN(id, "_", 2) - if len(parts) == 2 { - recZone = parts[0] - lastUnderscore := strings.LastIndex(parts[1], "_") - if lastUnderscore != -1 { - recName, recType = parts[1][0:lastUnderscore], parts[1][lastUnderscore+1:] - if !r53ValidRecordTypes.MatchString(recType) { - recSet, recType = recType, "" - lastUnderscore = strings.LastIndex(recName, "_") - if lastUnderscore != -1 { - recName, recType = recName[0:lastUnderscore], recName[lastUnderscore+1:] - } - } - } - } - recName = strings.TrimSuffix(recName, ".") - return [4]string{recZone, recName, recType, recSet} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record_migrate.go deleted file mode 100644 index ad6cda9d3..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record_migrate.go +++ /dev/null @@ -1,62 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsRoute53RecordMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS Route53 Record State v0; migrating to v1 then v2") - v1InstanceState, err := migrateRoute53RecordStateV0toV1(is) - if err != nil { - return v1InstanceState, err - } - return migrateRoute53RecordStateV1toV2(v1InstanceState) - case 1: - log.Println("[INFO] Found AWS Route53 Record State v1; migrating to v2") - return migrateRoute53RecordStateV1toV2(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateRoute53RecordStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() { - log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") - return is, nil - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - newName := strings.TrimSuffix(is.Attributes["name"], ".") - is.Attributes["name"] = newName - log.Printf("[DEBUG] Attributes after migration: %#v, new name: %s", is.Attributes, newName) - return is, nil -} - -func migrateRoute53RecordStateV1toV2(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() { - log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") - return is, nil - } - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - if is.Attributes["weight"] != "" && is.Attributes["weight"] != "-1" { - is.Attributes["weighted_routing_policy.#"] = "1" - key := fmt.Sprintf("weighted_routing_policy.0.weight") - is.Attributes[key] = is.Attributes["weight"] - } - if is.Attributes["failover"] != "" { - is.Attributes["failover_routing_policy.#"] = "1" - key := fmt.Sprintf("failover_routing_policy.0.type") - is.Attributes[key] = is.Attributes["failover"] - } - delete(is.Attributes, "weight") - delete(is.Attributes, "failover") - log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) - return is, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go deleted file mode 100644 index a550f9afa..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go +++ /dev/null @@ -1,618 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "sort" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/route53" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsRoute53Zone() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRoute53ZoneCreate, - Read: resourceAwsRoute53ZoneRead, - Update: resourceAwsRoute53ZoneUpdate, - Delete: resourceAwsRoute53ZoneDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - DiffSuppressFunc: suppressRoute53ZoneNameWithTrailingDot, - }, - - "comment": { - Type: schema.TypeString, - Optional: true, - Default: "Managed by Terraform", - }, - - "vpc": { - Type: schema.TypeSet, - Optional: true, - // Deprecated: Remove Computed: true in next major version of the provider - Computed: true, - MinItems: 1, - ConflictsWith: []string{"delegation_set_id", "vpc_id", "vpc_region"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.NoZeroValues, - }, - "vpc_region": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - }, - Set: route53HostedZoneVPCHash, - }, - - "vpc_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - ConflictsWith: []string{"delegation_set_id", "vpc"}, - Deprecated: "use 'vpc' attribute instead", - }, - - "vpc_region": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - ConflictsWith: []string{"delegation_set_id", "vpc"}, - Deprecated: "use 'vpc' attribute instead", - }, - - "zone_id": { - Type: schema.TypeString, - Computed: true, - }, - - "delegation_set_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"vpc_id"}, - }, - - "name_servers": { - Type: schema.TypeList, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - }, - - "tags": tagsSchema(), - - "force_destroy": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - } -} - -func resourceAwsRoute53ZoneCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).r53conn - region := meta.(*AWSClient).region - - input := &route53.CreateHostedZoneInput{ - CallerReference: aws.String(resource.UniqueId()), - Name: aws.String(d.Get("name").(string)), - HostedZoneConfig: &route53.HostedZoneConfig{ - Comment: aws.String(d.Get("comment").(string)), - }, - } - - if v, ok := d.GetOk("delegation_set_id"); ok { - input.DelegationSetId = aws.String(v.(string)) - } - - // Private Route53 Hosted Zones can only be created with their first VPC association, - // however we need to associate the remaining after creation. - - var vpcs []*route53.VPC = expandRoute53VPCs(d.Get("vpc").(*schema.Set).List(), region) - - // Backwards compatibility - if vpcID, ok := d.GetOk("vpc_id"); ok { - vpc := &route53.VPC{ - VPCId: aws.String(vpcID.(string)), - VPCRegion: aws.String(region), - } - - if vpcRegion, ok := d.GetOk("vpc_region"); ok { - vpc.VPCRegion = aws.String(vpcRegion.(string)) - } - - vpcs = []*route53.VPC{vpc} - } - - if len(vpcs) > 0 { - input.VPC = vpcs[0] - } - - log.Printf("[DEBUG] Creating Route53 hosted zone: %s", input) - output, err := conn.CreateHostedZone(input) - - if err != nil { - return fmt.Errorf("error creating Route53 Hosted Zone: %s", err) - } - - d.SetId(cleanZoneID(aws.StringValue(output.HostedZone.Id))) - - if err := route53WaitForChangeSynchronization(conn, cleanChangeID(aws.StringValue(output.ChangeInfo.Id))); err != nil { - return fmt.Errorf("error waiting for Route53 Hosted Zone (%s) creation: %s", d.Id(), err) - } - - if err := setTagsR53(conn, d, route53.TagResourceTypeHostedzone); err != nil { - return fmt.Errorf("error setting tags for Route53 Hosted Zone (%s): %s", d.Id(), err) - } - - // Associate additional VPCs beyond the first - if len(vpcs) > 1 { - for _, vpc := range vpcs[1:] { - err := route53HostedZoneVPCAssociate(conn, d.Id(), vpc) - - if err != nil { - return err - } - } - } - - return resourceAwsRoute53ZoneRead(d, meta) -} - -func resourceAwsRoute53ZoneRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).r53conn - - input := &route53.GetHostedZoneInput{ - Id: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Getting Route53 Hosted Zone: %s", input) - output, err := conn.GetHostedZone(input) - - if isAWSErr(err, route53.ErrCodeNoSuchHostedZone, "") { - log.Printf("[WARN] Route53 Hosted Zone (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error getting Route53 Hosted Zone (%s): %s", d.Id(), err) - } - - if output == nil || output.HostedZone == nil { - log.Printf("[WARN] Route53 Hosted Zone (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("comment", "") - d.Set("delegation_set_id", "") - d.Set("name", output.HostedZone.Name) - d.Set("zone_id", cleanZoneID(aws.StringValue(output.HostedZone.Id))) - - var nameServers []string - - if output.DelegationSet != nil { - d.Set("delegation_set_id", cleanDelegationSetId(aws.StringValue(output.DelegationSet.Id))) - - nameServers = aws.StringValueSlice(output.DelegationSet.NameServers) - } - - if output.HostedZone.Config != nil { - d.Set("comment", output.HostedZone.Config.Comment) - - if aws.BoolValue(output.HostedZone.Config.PrivateZone) { - var err error - nameServers, err = getNameServers(d.Id(), d.Get("name").(string), conn) - - if err != nil { - return fmt.Errorf("error getting Route53 Hosted Zone (%s) name servers: %s", d.Id(), err) - } - } - } - - sort.Strings(nameServers) - if err := d.Set("name_servers", nameServers); err != nil { - return fmt.Errorf("error setting name_servers: %s", err) - } - - // Backwards compatibility: only set vpc_id/vpc_region if either is true: - // * Previously configured - // * Only one VPC association - existingVpcID := d.Get("vpc_id").(string) - - // Detect drift in configuration - d.Set("vpc_id", "") - d.Set("vpc_region", "") - - if len(output.VPCs) == 1 && output.VPCs[0] != nil { - d.Set("vpc_id", output.VPCs[0].VPCId) - d.Set("vpc_region", output.VPCs[0].VPCRegion) - } else if len(output.VPCs) > 1 { - for _, vpc := range output.VPCs { - if vpc == nil { - continue - } - if aws.StringValue(vpc.VPCId) == existingVpcID { - d.Set("vpc_id", vpc.VPCId) - d.Set("vpc_region", vpc.VPCRegion) - } - } - } - - if err := d.Set("vpc", flattenRoute53VPCs(output.VPCs)); err != nil { - return fmt.Errorf("error setting vpc: %s", err) - } - - // get tags - req := &route53.ListTagsForResourceInput{ - ResourceId: aws.String(d.Id()), - ResourceType: aws.String(route53.TagResourceTypeHostedzone), - } - - log.Printf("[DEBUG] Listing tags for Route53 Hosted Zone: %s", req) - resp, err := conn.ListTagsForResource(req) - - if err != nil { - return fmt.Errorf("error listing tags for Route53 Hosted Zone (%s): %s", d.Id(), err) - } - - var tags []*route53.Tag - if resp.ResourceTagSet != nil { - tags = resp.ResourceTagSet.Tags - } - - if err := d.Set("tags", tagsToMapR53(tags)); err != nil { - return err - } - - return nil -} - -func resourceAwsRoute53ZoneUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).r53conn - region := meta.(*AWSClient).region - - d.Partial(true) - - if d.HasChange("comment") { - input := route53.UpdateHostedZoneCommentInput{ - Id: aws.String(d.Id()), - Comment: aws.String(d.Get("comment").(string)), - } - - _, err := conn.UpdateHostedZoneComment(&input) - - if err != nil { - return fmt.Errorf("error updating Route53 Hosted Zone (%s) comment: %s", d.Id(), err) - } - - d.SetPartial("comment") - } - - if d.HasChange("tags") { - if err := setTagsR53(conn, d, route53.TagResourceTypeHostedzone); err != nil { - return err - } - - d.SetPartial("tags") - } - - if d.HasChange("vpc") { - o, n := d.GetChange("vpc") - oldVPCs := o.(*schema.Set) - newVPCs := n.(*schema.Set) - - // VPCs cannot be empty, so add first and then remove - for _, vpcRaw := range newVPCs.Difference(oldVPCs).List() { - if vpcRaw == nil { - continue - } - - vpc := expandRoute53VPC(vpcRaw.(map[string]interface{}), region) - err := route53HostedZoneVPCAssociate(conn, d.Id(), vpc) - - if err != nil { - return err - } - } - - for _, vpcRaw := range oldVPCs.Difference(newVPCs).List() { - if vpcRaw == nil { - continue - } - - vpc := expandRoute53VPC(vpcRaw.(map[string]interface{}), region) - err := route53HostedZoneVPCDisassociate(conn, d.Id(), vpc) - - if err != nil { - return err - } - } - - d.SetPartial("vpc") - } - - d.Partial(false) - - return resourceAwsRoute53ZoneRead(d, meta) -} - -func resourceAwsRoute53ZoneDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).r53conn - - if d.Get("force_destroy").(bool) { - if err := deleteAllRecordsInHostedZoneId(d.Id(), d.Get("name").(string), conn); err != nil { - return fmt.Errorf("error deleting records in Route53 Hosted Zone (%s): %s", d.Id(), err) - } - } - - input := &route53.DeleteHostedZoneInput{ - Id: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting Route53 Hosted Zone: %s", input) - _, err := conn.DeleteHostedZone(input) - - if isAWSErr(err, route53.ErrCodeNoSuchHostedZone, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting Route53 Hosted Zone (%s): %s", d.Id(), err) - } - - return nil -} - -func deleteAllRecordsInHostedZoneId(hostedZoneId, hostedZoneName string, conn *route53.Route53) error { - input := &route53.ListResourceRecordSetsInput{ - HostedZoneId: aws.String(hostedZoneId), - } - - var lastDeleteErr, lastErrorFromWaiter error - var pageNum = 0 - err := conn.ListResourceRecordSetsPages(input, func(page *route53.ListResourceRecordSetsOutput, isLastPage bool) bool { - sets := page.ResourceRecordSets - pageNum += 1 - - changes := make([]*route53.Change, 0) - // 100 items per page returned by default - for _, set := range sets { - if strings.TrimSuffix(*set.Name, ".") == strings.TrimSuffix(hostedZoneName, ".") && (*set.Type == "NS" || *set.Type == "SOA") { - // Zone NS & SOA records cannot be deleted - continue - } - changes = append(changes, &route53.Change{ - Action: aws.String("DELETE"), - ResourceRecordSet: set, - }) - } - log.Printf("[DEBUG] Deleting %d records (page %d) from %s", - len(changes), pageNum, hostedZoneId) - - req := &route53.ChangeResourceRecordSetsInput{ - HostedZoneId: aws.String(hostedZoneId), - ChangeBatch: &route53.ChangeBatch{ - Comment: aws.String("Deleted by Terraform"), - Changes: changes, - }, - } - - var resp interface{} - resp, lastDeleteErr = deleteRoute53RecordSet(conn, req) - if out, ok := resp.(*route53.ChangeResourceRecordSetsOutput); ok { - log.Printf("[DEBUG] Waiting for change batch to become INSYNC: %#v", out) - if out.ChangeInfo != nil && out.ChangeInfo.Id != nil { - lastErrorFromWaiter = waitForRoute53RecordSetToSync(conn, cleanChangeID(*out.ChangeInfo.Id)) - } else { - log.Printf("[DEBUG] Change info was empty") - } - } else { - log.Printf("[DEBUG] Unable to wait for change batch because of an error: %s", lastDeleteErr) - } - - return !isLastPage - }) - if err != nil { - return fmt.Errorf("Failed listing/deleting record sets: %s\nLast error from deletion: %s\nLast error from waiter: %s", - err, lastDeleteErr, lastErrorFromWaiter) - } - - return nil -} - -func resourceAwsGoRoute53Wait(r53 *route53.Route53, ref *route53.GetChangeInput) (result interface{}, state string, err error) { - - status, err := r53.GetChange(ref) - if err != nil { - return nil, "UNKNOWN", err - } - return true, *status.ChangeInfo.Status, nil -} - -// cleanChangeID is used to remove the leading /change/ -func cleanChangeID(ID string) string { - return cleanPrefix(ID, "/change/") -} - -// cleanZoneID is used to remove the leading /hostedzone/ -func cleanZoneID(ID string) string { - return cleanPrefix(ID, "/hostedzone/") -} - -// cleanPrefix removes a string prefix from an ID -func cleanPrefix(ID, prefix string) string { - if strings.HasPrefix(ID, prefix) { - ID = strings.TrimPrefix(ID, prefix) - } - return ID -} - -func getNameServers(zoneId string, zoneName string, r53 *route53.Route53) ([]string, error) { - resp, err := r53.ListResourceRecordSets(&route53.ListResourceRecordSetsInput{ - HostedZoneId: aws.String(zoneId), - StartRecordName: aws.String(zoneName), - StartRecordType: aws.String("NS"), - }) - if err != nil { - return nil, err - } - if len(resp.ResourceRecordSets) == 0 { - return nil, nil - } - ns := make([]string, len(resp.ResourceRecordSets[0].ResourceRecords)) - for i := range resp.ResourceRecordSets[0].ResourceRecords { - ns[i] = *resp.ResourceRecordSets[0].ResourceRecords[i].Value - } - sort.Strings(ns) - return ns, nil -} - -func expandRoute53VPCs(l []interface{}, currentRegion string) []*route53.VPC { - vpcs := []*route53.VPC{} - - for _, mRaw := range l { - if mRaw == nil { - continue - } - - vpcs = append(vpcs, expandRoute53VPC(mRaw.(map[string]interface{}), currentRegion)) - } - - return vpcs -} - -func expandRoute53VPC(m map[string]interface{}, currentRegion string) *route53.VPC { - vpc := &route53.VPC{ - VPCId: aws.String(m["vpc_id"].(string)), - VPCRegion: aws.String(currentRegion), - } - - if v, ok := m["vpc_region"]; ok && v.(string) != "" { - vpc.VPCRegion = aws.String(v.(string)) - } - - return vpc -} - -func flattenRoute53VPCs(vpcs []*route53.VPC) []interface{} { - l := []interface{}{} - - for _, vpc := range vpcs { - if vpc == nil { - continue - } - - m := map[string]interface{}{ - "vpc_id": aws.StringValue(vpc.VPCId), - "vpc_region": aws.StringValue(vpc.VPCRegion), - } - - l = append(l, m) - } - - return l -} - -func route53HostedZoneVPCAssociate(conn *route53.Route53, zoneID string, vpc *route53.VPC) error { - input := &route53.AssociateVPCWithHostedZoneInput{ - HostedZoneId: aws.String(zoneID), - VPC: vpc, - } - - log.Printf("[DEBUG] Associating Route53 Hosted Zone with VPC: %s", input) - output, err := conn.AssociateVPCWithHostedZone(input) - - if err != nil { - return fmt.Errorf("error associating Route53 Hosted Zone (%s) to VPC (%s): %s", zoneID, aws.StringValue(vpc.VPCId), err) - } - - if err := route53WaitForChangeSynchronization(conn, cleanChangeID(aws.StringValue(output.ChangeInfo.Id))); err != nil { - return fmt.Errorf("error waiting for Route53 Hosted Zone (%s) association to VPC (%s): %s", zoneID, aws.StringValue(vpc.VPCId), err) - } - - return nil -} - -func route53HostedZoneVPCDisassociate(conn *route53.Route53, zoneID string, vpc *route53.VPC) error { - input := &route53.DisassociateVPCFromHostedZoneInput{ - HostedZoneId: aws.String(zoneID), - VPC: vpc, - } - - log.Printf("[DEBUG] Disassociating Route53 Hosted Zone with VPC: %s", input) - output, err := conn.DisassociateVPCFromHostedZone(input) - - if err != nil { - return fmt.Errorf("error disassociating Route53 Hosted Zone (%s) from VPC (%s): %s", zoneID, aws.StringValue(vpc.VPCId), err) - } - - if err := route53WaitForChangeSynchronization(conn, cleanChangeID(aws.StringValue(output.ChangeInfo.Id))); err != nil { - return fmt.Errorf("error waiting for Route53 Hosted Zone (%s) disassociation from VPC (%s): %s", zoneID, aws.StringValue(vpc.VPCId), err) - } - - return nil -} - -func route53HostedZoneVPCHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["vpc_id"].(string))) - - return hashcode.String(buf.String()) -} - -func route53WaitForChangeSynchronization(conn *route53.Route53, changeID string) error { - conf := resource.StateChangeConf{ - Delay: 30 * time.Second, - Pending: []string{route53.ChangeStatusPending}, - Target: []string{route53.ChangeStatusInsync}, - Timeout: 15 * time.Minute, - MinTimeout: 2 * time.Second, - Refresh: func() (result interface{}, state string, err error) { - input := &route53.GetChangeInput{ - Id: aws.String(changeID), - } - - log.Printf("[DEBUG] Getting Route53 Change status: %s", input) - output, err := conn.GetChange(input) - - if err != nil { - return nil, "UNKNOWN", err - } - - if output == nil || output.ChangeInfo == nil { - return nil, "UNKNOWN", fmt.Errorf("Route53 GetChange response empty for ID: %s", changeID) - } - - return true, aws.StringValue(output.ChangeInfo.Status), nil - }, - } - - _, err := conf.WaitForState() - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone_association.go deleted file mode 100644 index ccac3f10a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone_association.go +++ /dev/null @@ -1,145 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/route53" -) - -func resourceAwsRoute53ZoneAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRoute53ZoneAssociationCreate, - Read: resourceAwsRoute53ZoneAssociationRead, - Update: resourceAwsRoute53ZoneAssociationUpdate, - Delete: resourceAwsRoute53ZoneAssociationDelete, - - Schema: map[string]*schema.Schema{ - "zone_id": { - Type: schema.TypeString, - Required: true, - }, - - "vpc_id": { - Type: schema.TypeString, - Required: true, - }, - - "vpc_region": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - } -} - -func resourceAwsRoute53ZoneAssociationCreate(d *schema.ResourceData, meta interface{}) error { - r53 := meta.(*AWSClient).r53conn - - req := &route53.AssociateVPCWithHostedZoneInput{ - HostedZoneId: aws.String(d.Get("zone_id").(string)), - VPC: &route53.VPC{ - VPCId: aws.String(d.Get("vpc_id").(string)), - VPCRegion: aws.String(meta.(*AWSClient).region), - }, - Comment: aws.String("Managed by Terraform"), - } - if w := d.Get("vpc_region"); w != "" { - req.VPC.VPCRegion = aws.String(w.(string)) - } - - log.Printf("[DEBUG] Associating Route53 Private Zone %s with VPC %s with region %s", *req.HostedZoneId, *req.VPC.VPCId, *req.VPC.VPCRegion) - var err error - resp, err := r53.AssociateVPCWithHostedZone(req) - if err != nil { - return err - } - - // Store association id - d.SetId(fmt.Sprintf("%s:%s", *req.HostedZoneId, *req.VPC.VPCId)) - d.Set("vpc_region", req.VPC.VPCRegion) - - // Wait until we are done initializing - wait := resource.StateChangeConf{ - Delay: 30 * time.Second, - Pending: []string{"PENDING"}, - Target: []string{"INSYNC"}, - Timeout: 10 * time.Minute, - MinTimeout: 2 * time.Second, - Refresh: func() (result interface{}, state string, err error) { - changeRequest := &route53.GetChangeInput{ - Id: aws.String(cleanChangeID(*resp.ChangeInfo.Id)), - } - return resourceAwsGoRoute53Wait(r53, changeRequest) - }, - } - _, err = wait.WaitForState() - if err != nil { - return err - } - - return resourceAwsRoute53ZoneAssociationUpdate(d, meta) -} - -func resourceAwsRoute53ZoneAssociationRead(d *schema.ResourceData, meta interface{}) error { - r53 := meta.(*AWSClient).r53conn - zone_id, vpc_id := resourceAwsRoute53ZoneAssociationParseId(d.Id()) - zone, err := r53.GetHostedZone(&route53.GetHostedZoneInput{Id: aws.String(zone_id)}) - if err != nil { - // Handle a deleted zone - if r53err, ok := err.(awserr.Error); ok && r53err.Code() == "NoSuchHostedZone" { - d.SetId("") - return nil - } - return err - } - - for _, vpc := range zone.VPCs { - if vpc_id == *vpc.VPCId { - // association is there, return - return nil - } - } - - // no association found - d.SetId("") - return nil -} - -func resourceAwsRoute53ZoneAssociationUpdate(d *schema.ResourceData, meta interface{}) error { - return resourceAwsRoute53ZoneAssociationRead(d, meta) -} - -func resourceAwsRoute53ZoneAssociationDelete(d *schema.ResourceData, meta interface{}) error { - r53 := meta.(*AWSClient).r53conn - zone_id, vpc_id := resourceAwsRoute53ZoneAssociationParseId(d.Id()) - log.Printf("[DEBUG] Deleting Route53 Private Zone (%s) association (VPC: %s)", - zone_id, vpc_id) - - req := &route53.DisassociateVPCFromHostedZoneInput{ - HostedZoneId: aws.String(zone_id), - VPC: &route53.VPC{ - VPCId: aws.String(vpc_id), - VPCRegion: aws.String(d.Get("vpc_region").(string)), - }, - Comment: aws.String("Managed by Terraform"), - } - - _, err := r53.DisassociateVPCFromHostedZone(req) - return err -} - -func resourceAwsRoute53ZoneAssociationParseId(id string) (zone_id, vpc_id string) { - parts := strings.SplitN(id, ":", 2) - zone_id = parts[0] - vpc_id = parts[1] - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table.go deleted file mode 100644 index a2010ce09..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table.go +++ /dev/null @@ -1,553 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsRouteTable() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRouteTableCreate, - Read: resourceAwsRouteTableRead, - Update: resourceAwsRouteTableUpdate, - Delete: resourceAwsRouteTableDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsRouteTableImportState, - }, - - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "tags": tagsSchema(), - - "propagating_vgws": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "route": { - Type: schema.TypeSet, - Computed: true, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cidr_block": { - Type: schema.TypeString, - Optional: true, - }, - - "ipv6_cidr_block": { - Type: schema.TypeString, - Optional: true, - }, - - "egress_only_gateway_id": { - Type: schema.TypeString, - Optional: true, - }, - - "gateway_id": { - Type: schema.TypeString, - Optional: true, - }, - - "instance_id": { - Type: schema.TypeString, - Optional: true, - }, - - "nat_gateway_id": { - Type: schema.TypeString, - Optional: true, - }, - - "transit_gateway_id": { - Type: schema.TypeString, - Optional: true, - }, - - "vpc_peering_connection_id": { - Type: schema.TypeString, - Optional: true, - }, - - "network_interface_id": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - Set: resourceAwsRouteTableHash, - }, - - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsRouteTableCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Create the routing table - createOpts := &ec2.CreateRouteTableInput{ - VpcId: aws.String(d.Get("vpc_id").(string)), - } - log.Printf("[DEBUG] RouteTable create config: %#v", createOpts) - - resp, err := conn.CreateRouteTable(createOpts) - if err != nil { - return fmt.Errorf("Error creating route table: %s", err) - } - - // Get the ID and store it - rt := resp.RouteTable - d.SetId(*rt.RouteTableId) - log.Printf("[INFO] Route Table ID: %s", d.Id()) - - // Wait for the route table to become available - log.Printf( - "[DEBUG] Waiting for route table (%s) to become available", - d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"ready"}, - Refresh: resourceAwsRouteTableStateRefreshFunc(conn, d.Id()), - Timeout: 10 * time.Minute, - NotFoundChecks: 40, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for route table (%s) to become available: %s", - d.Id(), err) - } - - return resourceAwsRouteTableUpdate(d, meta) -} - -func resourceAwsRouteTableRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - rtRaw, _, err := resourceAwsRouteTableStateRefreshFunc(conn, d.Id())() - if err != nil { - return err - } - if rtRaw == nil { - d.SetId("") - return nil - } - - rt := rtRaw.(*ec2.RouteTable) - d.Set("vpc_id", rt.VpcId) - - propagatingVGWs := make([]string, 0, len(rt.PropagatingVgws)) - for _, vgw := range rt.PropagatingVgws { - propagatingVGWs = append(propagatingVGWs, *vgw.GatewayId) - } - d.Set("propagating_vgws", propagatingVGWs) - - // Create an empty schema.Set to hold all routes - route := &schema.Set{F: resourceAwsRouteTableHash} - - // Loop through the routes and add them to the set - for _, r := range rt.Routes { - if r.GatewayId != nil && *r.GatewayId == "local" { - continue - } - - if r.Origin != nil && *r.Origin == "EnableVgwRoutePropagation" { - continue - } - - if r.DestinationPrefixListId != nil { - // Skipping because VPC endpoint routes are handled separately - // See aws_vpc_endpoint - continue - } - - m := make(map[string]interface{}) - - if r.DestinationCidrBlock != nil { - m["cidr_block"] = *r.DestinationCidrBlock - } - if r.DestinationIpv6CidrBlock != nil { - m["ipv6_cidr_block"] = *r.DestinationIpv6CidrBlock - } - if r.EgressOnlyInternetGatewayId != nil { - m["egress_only_gateway_id"] = *r.EgressOnlyInternetGatewayId - } - if r.GatewayId != nil { - m["gateway_id"] = *r.GatewayId - } - if r.NatGatewayId != nil { - m["nat_gateway_id"] = *r.NatGatewayId - } - if r.InstanceId != nil { - m["instance_id"] = *r.InstanceId - } - if r.TransitGatewayId != nil { - m["transit_gateway_id"] = *r.TransitGatewayId - } - if r.VpcPeeringConnectionId != nil { - m["vpc_peering_connection_id"] = *r.VpcPeeringConnectionId - } - if r.NetworkInterfaceId != nil { - m["network_interface_id"] = *r.NetworkInterfaceId - } - - route.Add(m) - } - d.Set("route", route) - - // Tags - d.Set("tags", tagsToMap(rt.Tags)) - - d.Set("owner_id", rt.OwnerId) - - return nil -} - -func resourceAwsRouteTableUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - if d.HasChange("propagating_vgws") { - o, n := d.GetChange("propagating_vgws") - os := o.(*schema.Set) - ns := n.(*schema.Set) - remove := os.Difference(ns).List() - add := ns.Difference(os).List() - - // Now first loop through all the old propagations and disable any obsolete ones - for _, vgw := range remove { - id := vgw.(string) - - // Disable the propagation as it no longer exists in the config - log.Printf( - "[INFO] Deleting VGW propagation from %s: %s", - d.Id(), id) - _, err := conn.DisableVgwRoutePropagation(&ec2.DisableVgwRoutePropagationInput{ - RouteTableId: aws.String(d.Id()), - GatewayId: aws.String(id), - }) - if err != nil { - return err - } - } - - // Make sure we save the state of the currently configured rules - propagatingVGWs := os.Intersection(ns) - d.Set("propagating_vgws", propagatingVGWs) - - // Then loop through all the newly configured propagations and enable them - for _, vgw := range add { - id := vgw.(string) - - var err error - for i := 0; i < 5; i++ { - log.Printf("[INFO] Enabling VGW propagation for %s: %s", d.Id(), id) - _, err = conn.EnableVgwRoutePropagation(&ec2.EnableVgwRoutePropagationInput{ - RouteTableId: aws.String(d.Id()), - GatewayId: aws.String(id), - }) - if err == nil { - break - } - - // If we get a Gateway.NotAttached, it is usually some - // eventually consistency stuff. So we have to just wait a - // bit... - ec2err, ok := err.(awserr.Error) - if ok && ec2err.Code() == "Gateway.NotAttached" { - time.Sleep(20 * time.Second) - continue - } - } - if err != nil { - return err - } - - propagatingVGWs.Add(vgw) - d.Set("propagating_vgws", propagatingVGWs) - } - } - - // Check if the route set as a whole has changed - if d.HasChange("route") { - o, n := d.GetChange("route") - ors := o.(*schema.Set).Difference(n.(*schema.Set)) - nrs := n.(*schema.Set).Difference(o.(*schema.Set)) - - // Now first loop through all the old routes and delete any obsolete ones - for _, route := range ors.List() { - m := route.(map[string]interface{}) - - deleteOpts := &ec2.DeleteRouteInput{ - RouteTableId: aws.String(d.Id()), - } - - if s := m["ipv6_cidr_block"].(string); s != "" { - deleteOpts.DestinationIpv6CidrBlock = aws.String(s) - - log.Printf( - "[INFO] Deleting route from %s: %s", - d.Id(), m["ipv6_cidr_block"].(string)) - } - - if s := m["cidr_block"].(string); s != "" { - deleteOpts.DestinationCidrBlock = aws.String(s) - - log.Printf( - "[INFO] Deleting route from %s: %s", - d.Id(), m["cidr_block"].(string)) - } - - _, err := conn.DeleteRoute(deleteOpts) - if err != nil { - return err - } - } - - // Make sure we save the state of the currently configured rules - routes := o.(*schema.Set).Intersection(n.(*schema.Set)) - d.Set("route", routes) - - // Then loop through all the newly configured routes and create them - for _, route := range nrs.List() { - m := route.(map[string]interface{}) - - opts := ec2.CreateRouteInput{ - RouteTableId: aws.String(d.Id()), - } - - if s := m["transit_gateway_id"].(string); s != "" { - opts.TransitGatewayId = aws.String(s) - } - - if s := m["vpc_peering_connection_id"].(string); s != "" { - opts.VpcPeeringConnectionId = aws.String(s) - } - - if s := m["network_interface_id"].(string); s != "" { - opts.NetworkInterfaceId = aws.String(s) - } - - if s := m["instance_id"].(string); s != "" { - opts.InstanceId = aws.String(s) - } - - if s := m["ipv6_cidr_block"].(string); s != "" { - opts.DestinationIpv6CidrBlock = aws.String(s) - } - - if s := m["cidr_block"].(string); s != "" { - opts.DestinationCidrBlock = aws.String(s) - } - - if s := m["gateway_id"].(string); s != "" { - opts.GatewayId = aws.String(s) - } - - if s := m["egress_only_gateway_id"].(string); s != "" { - opts.EgressOnlyInternetGatewayId = aws.String(s) - } - - if s := m["nat_gateway_id"].(string); s != "" { - opts.NatGatewayId = aws.String(s) - } - - log.Printf("[INFO] Creating route for %s: %#v", d.Id(), opts) - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.CreateRoute(&opts) - - if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { - return resource.RetryableError(err) - } - - if isAWSErr(err, "InvalidTransitGatewayID.NotFound", "") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - - routes.Add(route) - d.Set("route", routes) - } - } - - if err := setTags(conn, d); err != nil { - return err - } else { - d.SetPartial("tags") - } - - return resourceAwsRouteTableRead(d, meta) -} - -func resourceAwsRouteTableDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // First request the routing table since we'll have to disassociate - // all the subnets first. - rtRaw, _, err := resourceAwsRouteTableStateRefreshFunc(conn, d.Id())() - if err != nil { - return err - } - if rtRaw == nil { - return nil - } - rt := rtRaw.(*ec2.RouteTable) - - // Do all the disassociations - for _, a := range rt.Associations { - log.Printf("[INFO] Disassociating association: %s", *a.RouteTableAssociationId) - _, err := conn.DisassociateRouteTable(&ec2.DisassociateRouteTableInput{ - AssociationId: a.RouteTableAssociationId, - }) - if err != nil { - // First check if the association ID is not found. If this - // is the case, then it was already disassociated somehow, - // and that is okay. - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidAssociationID.NotFound" { - err = nil - } - } - if err != nil { - return err - } - } - - // Delete the route table - log.Printf("[INFO] Deleting Route Table: %s", d.Id()) - _, err = conn.DeleteRouteTable(&ec2.DeleteRouteTableInput{ - RouteTableId: aws.String(d.Id()), - }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if ok && ec2err.Code() == "InvalidRouteTableID.NotFound" { - return nil - } - - return fmt.Errorf("Error deleting route table: %s", err) - } - - // Wait for the route table to really destroy - log.Printf( - "[DEBUG] Waiting for route table (%s) to become destroyed", - d.Id()) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"ready"}, - Target: []string{}, - Refresh: resourceAwsRouteTableStateRefreshFunc(conn, d.Id()), - Timeout: 5 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for route table (%s) to become destroyed: %s", - d.Id(), err) - } - - return nil -} - -func resourceAwsRouteTableHash(v interface{}) int { - var buf bytes.Buffer - m, castOk := v.(map[string]interface{}) - if !castOk { - return 0 - } - - if v, ok := m["ipv6_cidr_block"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["cidr_block"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["gateway_id"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["egress_only_gateway_id"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - natGatewaySet := false - if v, ok := m["nat_gateway_id"]; ok { - natGatewaySet = v.(string) != "" - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - instanceSet := false - if v, ok := m["instance_id"]; ok { - instanceSet = v.(string) != "" - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["transit_gateway_id"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["vpc_peering_connection_id"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["network_interface_id"]; ok && !(instanceSet || natGatewaySet) { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - return hashcode.String(buf.String()) -} - -// resourceAwsRouteTableStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// a RouteTable. -func resourceAwsRouteTableStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeRouteTables(&ec2.DescribeRouteTablesInput{ - RouteTableIds: []*string{aws.String(id)}, - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidRouteTableID.NotFound" { - resp = nil - } else { - log.Printf("Error on RouteTableStateRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - rt := resp.RouteTables[0] - return rt, "ready", nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table_association.go deleted file mode 100644 index 9dc6e0b4b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table_association.go +++ /dev/null @@ -1,155 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsRouteTableAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsRouteTableAssociationCreate, - Read: resourceAwsRouteTableAssociationRead, - Update: resourceAwsRouteTableAssociationUpdate, - Delete: resourceAwsRouteTableAssociationDelete, - - Schema: map[string]*schema.Schema{ - "subnet_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "route_table_id": { - Type: schema.TypeString, - Required: true, - }, - }, - } -} - -func resourceAwsRouteTableAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf( - "[INFO] Creating route table association: %s => %s", - d.Get("subnet_id").(string), - d.Get("route_table_id").(string)) - - associationOpts := ec2.AssociateRouteTableInput{ - RouteTableId: aws.String(d.Get("route_table_id").(string)), - SubnetId: aws.String(d.Get("subnet_id").(string)), - } - - var resp *ec2.AssociateRouteTableOutput - var err error - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - resp, err = conn.AssociateRouteTable(&associationOpts) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "InvalidRouteTableID.NotFound" { - return resource.RetryableError(awsErr) - } - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - - // Set the ID and return - d.SetId(*resp.AssociationId) - log.Printf("[INFO] Association ID: %s", d.Id()) - - return nil -} - -func resourceAwsRouteTableAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Get the routing table that this association belongs to - rtRaw, _, err := resourceAwsRouteTableStateRefreshFunc( - conn, d.Get("route_table_id").(string))() - if err != nil { - return err - } - if rtRaw == nil { - return nil - } - rt := rtRaw.(*ec2.RouteTable) - - // Inspect that the association exists - found := false - for _, a := range rt.Associations { - if *a.RouteTableAssociationId == d.Id() { - found = true - d.Set("subnet_id", *a.SubnetId) - break - } - } - - if !found { - // It seems it doesn't exist anymore, so clear the ID - d.SetId("") - } - - return nil -} - -func resourceAwsRouteTableAssociationUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf( - "[INFO] Creating route table association: %s => %s", - d.Get("subnet_id").(string), - d.Get("route_table_id").(string)) - - req := &ec2.ReplaceRouteTableAssociationInput{ - AssociationId: aws.String(d.Id()), - RouteTableId: aws.String(d.Get("route_table_id").(string)), - } - resp, err := conn.ReplaceRouteTableAssociation(req) - - if err != nil { - ec2err, ok := err.(awserr.Error) - if ok && ec2err.Code() == "InvalidAssociationID.NotFound" { - // Not found, so just create a new one - return resourceAwsRouteTableAssociationCreate(d, meta) - } - - return err - } - - // Update the ID - d.SetId(*resp.NewAssociationId) - log.Printf("[INFO] Association ID: %s", d.Id()) - - return nil -} - -func resourceAwsRouteTableAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[INFO] Deleting route table association: %s", d.Id()) - _, err := conn.DisassociateRouteTable(&ec2.DisassociateRouteTableInput{ - AssociationId: aws.String(d.Id()), - }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if ok && ec2err.Code() == "InvalidAssociationID.NotFound" { - return nil - } - - return fmt.Errorf("Error deleting route table association: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_account_public_access_block.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_account_public_access_block.go deleted file mode 100644 index e809824b2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_account_public_access_block.go +++ /dev/null @@ -1,182 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/s3control" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsS3AccountPublicAccessBlock() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsS3AccountPublicAccessBlockCreate, - Read: resourceAwsS3AccountPublicAccessBlockRead, - Update: resourceAwsS3AccountPublicAccessBlockUpdate, - Delete: resourceAwsS3AccountPublicAccessBlockDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "account_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateAwsAccountId, - }, - "block_public_acls": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "block_public_policy": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "ignore_public_acls": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "restrict_public_buckets": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - } -} - -func resourceAwsS3AccountPublicAccessBlockCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).s3controlconn - - accountID := meta.(*AWSClient).accountid - if v, ok := d.GetOk("account_id"); ok { - accountID = v.(string) - } - - input := &s3control.PutPublicAccessBlockInput{ - AccountId: aws.String(accountID), - PublicAccessBlockConfiguration: &s3control.PublicAccessBlockConfiguration{ - BlockPublicAcls: aws.Bool(d.Get("block_public_acls").(bool)), - BlockPublicPolicy: aws.Bool(d.Get("block_public_policy").(bool)), - IgnorePublicAcls: aws.Bool(d.Get("ignore_public_acls").(bool)), - RestrictPublicBuckets: aws.Bool(d.Get("restrict_public_buckets").(bool)), - }, - } - - log.Printf("[DEBUG] Creating S3 Account Public Access Block: %s", input) - _, err := conn.PutPublicAccessBlock(input) - if err != nil { - return fmt.Errorf("error creating S3 Account Public Access Block: %s", err) - } - - d.SetId(accountID) - - return resourceAwsS3AccountPublicAccessBlockRead(d, meta) -} - -func resourceAwsS3AccountPublicAccessBlockRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).s3controlconn - - input := &s3control.GetPublicAccessBlockInput{ - AccountId: aws.String(d.Id()), - } - - // Retry for eventual consistency on creation - var output *s3control.GetPublicAccessBlockOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - output, err = conn.GetPublicAccessBlock(input) - - if d.IsNewResource() && isAWSErr(err, s3control.ErrCodeNoSuchPublicAccessBlockConfiguration, "") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - - if isAWSErr(err, s3control.ErrCodeNoSuchPublicAccessBlockConfiguration, "") { - log.Printf("[WARN] S3 Account Public Access Block (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading S3 Account Public Access Block: %s", err) - } - - if output == nil || output.PublicAccessBlockConfiguration == nil { - return fmt.Errorf("error reading S3 Account Public Access Block (%s): missing public access block configuration", d.Id()) - } - - d.Set("account_id", d.Id()) - d.Set("block_public_acls", output.PublicAccessBlockConfiguration.BlockPublicAcls) - d.Set("block_public_policy", output.PublicAccessBlockConfiguration.BlockPublicPolicy) - d.Set("ignore_public_acls", output.PublicAccessBlockConfiguration.IgnorePublicAcls) - d.Set("restrict_public_buckets", output.PublicAccessBlockConfiguration.RestrictPublicBuckets) - - return nil -} - -func resourceAwsS3AccountPublicAccessBlockUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).s3controlconn - - input := &s3control.PutPublicAccessBlockInput{ - AccountId: aws.String(d.Id()), - PublicAccessBlockConfiguration: &s3control.PublicAccessBlockConfiguration{ - BlockPublicAcls: aws.Bool(d.Get("block_public_acls").(bool)), - BlockPublicPolicy: aws.Bool(d.Get("block_public_policy").(bool)), - IgnorePublicAcls: aws.Bool(d.Get("ignore_public_acls").(bool)), - RestrictPublicBuckets: aws.Bool(d.Get("restrict_public_buckets").(bool)), - }, - } - - log.Printf("[DEBUG] Updating S3 Account Public Access Block: %s", input) - _, err := conn.PutPublicAccessBlock(input) - if err != nil { - return fmt.Errorf("error updating S3 Account Public Access Block (%s): %s", d.Id(), err) - } - - // Workaround API eventual consistency issues. This type of logic should not normally be used. - // We cannot reliably determine when the Read after Update might be properly updated. - // Rather than introduce complicated retry logic, we presume that a lack of an update error - // means our update succeeded with our expected values. - d.Set("block_public_acls", input.PublicAccessBlockConfiguration.BlockPublicAcls) - d.Set("block_public_policy", input.PublicAccessBlockConfiguration.BlockPublicPolicy) - d.Set("ignore_public_acls", input.PublicAccessBlockConfiguration.IgnorePublicAcls) - d.Set("restrict_public_buckets", input.PublicAccessBlockConfiguration.RestrictPublicBuckets) - - // Skip normal Read after Update due to eventual consistency issues - return nil -} - -func resourceAwsS3AccountPublicAccessBlockDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).s3controlconn - - input := &s3control.DeletePublicAccessBlockInput{ - AccountId: aws.String(d.Id()), - } - - _, err := conn.DeletePublicAccessBlock(input) - - if isAWSErr(err, s3control.ErrCodeNoSuchPublicAccessBlockConfiguration, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting S3 Account Public Access Block (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go deleted file mode 100644 index dc6a8ade9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go +++ /dev/null @@ -1,2554 +0,0 @@ -package aws - -import ( - "bytes" - "encoding/json" - "fmt" - "log" - "net/url" - "regexp" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/endpoints" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsS3Bucket() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsS3BucketCreate, - Read: resourceAwsS3BucketRead, - Update: resourceAwsS3BucketUpdate, - Delete: resourceAwsS3BucketDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsS3BucketImportState, - }, - - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"bucket_prefix"}, - }, - "bucket_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"bucket"}, - }, - - "bucket_domain_name": { - Type: schema.TypeString, - Computed: true, - }, - - "bucket_regional_domain_name": { - Type: schema.TypeString, - Computed: true, - }, - - "arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "acl": { - Type: schema.TypeString, - Default: "private", - Optional: true, - }, - - "policy": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - - "cors_rule": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "allowed_headers": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "allowed_methods": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "allowed_origins": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "expose_headers": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "max_age_seconds": { - Type: schema.TypeInt, - Optional: true, - }, - }, - }, - }, - - "website": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "index_document": { - Type: schema.TypeString, - Optional: true, - }, - - "error_document": { - Type: schema.TypeString, - Optional: true, - }, - - "redirect_all_requests_to": { - Type: schema.TypeString, - ConflictsWith: []string{ - "website.0.index_document", - "website.0.error_document", - "website.0.routing_rules", - }, - Optional: true, - }, - - "routing_rules": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.ValidateJsonString, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - }, - }, - }, - }, - - "hosted_zone_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "region": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "website_endpoint": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "website_domain": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "versioning": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "mfa_delete": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - }, - - "logging": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "target_bucket": { - Type: schema.TypeString, - Required: true, - }, - "target_prefix": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["target_bucket"])) - buf.WriteString(fmt.Sprintf("%s-", m["target_prefix"])) - return hashcode.String(buf.String()) - }, - }, - - "lifecycle_rule": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringLenBetween(0, 255), - }, - "prefix": { - Type: schema.TypeString, - Optional: true, - }, - "tags": tagsSchema(), - "enabled": { - Type: schema.TypeBool, - Required: true, - }, - "abort_incomplete_multipart_upload_days": { - Type: schema.TypeInt, - Optional: true, - }, - "expiration": { - Type: schema.TypeSet, - Optional: true, - Set: expirationHash, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "date": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateS3BucketLifecycleTimestamp, - }, - "days": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "expired_object_delete_marker": { - Type: schema.TypeBool, - Optional: true, - }, - }, - }, - }, - "noncurrent_version_expiration": { - Type: schema.TypeSet, - MaxItems: 1, - Optional: true, - Set: expirationHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "days": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(1), - }, - }, - }, - }, - "transition": { - Type: schema.TypeSet, - Optional: true, - Set: transitionHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "date": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateS3BucketLifecycleTimestamp, - }, - "days": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "storage_class": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateS3BucketLifecycleTransitionStorageClass(), - }, - }, - }, - }, - "noncurrent_version_transition": { - Type: schema.TypeSet, - Optional: true, - Set: transitionHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "days": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(0), - }, - "storage_class": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateS3BucketLifecycleTransitionStorageClass(), - }, - }, - }, - }, - }, - }, - }, - - "force_destroy": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "acceleration_status": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - s3.BucketAccelerateStatusEnabled, - s3.BucketAccelerateStatusSuspended, - }, false), - }, - - "request_payer": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - s3.PayerRequester, - s3.PayerBucketOwner, - }, false), - }, - - "replication_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "role": { - Type: schema.TypeString, - Required: true, - }, - "rules": { - Type: schema.TypeSet, - Required: true, - Set: rulesHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 255), - }, - "destination": { - Type: schema.TypeSet, - MaxItems: 1, - MinItems: 1, - Required: true, - Set: destinationHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "account_id": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateAwsAccountId, - }, - "bucket": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "storage_class": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - s3.StorageClassStandard, - s3.StorageClassReducedRedundancy, - s3.StorageClassStandardIa, - s3.StorageClassOnezoneIa, - s3.StorageClassIntelligentTiering, - s3.StorageClassGlacier, - }, false), - }, - "replica_kms_key_id": { - Type: schema.TypeString, - Optional: true, - }, - "access_control_translation": { - Type: schema.TypeList, - Optional: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "owner": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - s3.OwnerOverrideDestination, - }, false), - }, - }, - }, - }, - }, - }, - }, - "source_selection_criteria": { - Type: schema.TypeSet, - Optional: true, - MinItems: 1, - MaxItems: 1, - Set: sourceSelectionCriteriaHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "sse_kms_encrypted_objects": { - Type: schema.TypeSet, - Optional: true, - MinItems: 1, - MaxItems: 1, - Set: sourceSseKmsObjectsHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Required: true, - }, - }, - }, - }, - }, - }, - }, - "prefix": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 1024), - }, - "status": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - s3.ReplicationRuleStatusEnabled, - s3.ReplicationRuleStatusDisabled, - }, false), - }, - "priority": { - Type: schema.TypeInt, - Optional: true, - }, - "filter": { - Type: schema.TypeList, - Optional: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "prefix": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 1024), - }, - "tags": tagsSchema(), - }, - }, - }, - }, - }, - }, - }, - }, - }, - - "server_side_encryption_configuration": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "rule": { - Type: schema.TypeList, - MaxItems: 1, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "apply_server_side_encryption_by_default": { - Type: schema.TypeList, - MaxItems: 1, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "kms_master_key_id": { - Type: schema.TypeString, - Optional: true, - }, - "sse_algorithm": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - s3.ServerSideEncryptionAes256, - s3.ServerSideEncryptionAwsKms, - }, false), - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - - "object_lock_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "object_lock_enabled": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - s3.ObjectLockEnabledEnabled, - }, false), - }, - - "rule": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "default_retention": { - Type: schema.TypeList, - Required: true, - MinItems: 1, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "mode": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - s3.ObjectLockModeGovernance, - s3.ObjectLockModeCompliance, - }, false), - }, - - "days": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(1), - }, - - "years": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtLeast(1), - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsS3BucketCreate(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - - // Get the bucket and acl - var bucket string - if v, ok := d.GetOk("bucket"); ok { - bucket = v.(string) - } else if v, ok := d.GetOk("bucket_prefix"); ok { - bucket = resource.PrefixedUniqueId(v.(string)) - } else { - bucket = resource.UniqueId() - } - d.Set("bucket", bucket) - acl := d.Get("acl").(string) - - log.Printf("[DEBUG] S3 bucket create: %s, ACL: %s", bucket, acl) - - req := &s3.CreateBucketInput{ - Bucket: aws.String(bucket), - ACL: aws.String(acl), - } - - var awsRegion string - if region, ok := d.GetOk("region"); ok { - awsRegion = region.(string) - } else { - awsRegion = meta.(*AWSClient).region - } - log.Printf("[DEBUG] S3 bucket create: %s, using region: %s", bucket, awsRegion) - - // Special case us-east-1 region and do not set the LocationConstraint. - // See "Request Elements: http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUT.html - if awsRegion != "us-east-1" { - req.CreateBucketConfiguration = &s3.CreateBucketConfiguration{ - LocationConstraint: aws.String(awsRegion), - } - } - - if err := validateS3BucketName(bucket, awsRegion); err != nil { - return fmt.Errorf("Error validating S3 bucket name: %s", err) - } - - // S3 Object Lock can only be enabled on bucket creation. - objectLockConfiguration := expandS3ObjectLockConfiguration(d.Get("object_lock_configuration").([]interface{})) - if objectLockConfiguration != nil && aws.StringValue(objectLockConfiguration.ObjectLockEnabled) == s3.ObjectLockEnabledEnabled { - req.ObjectLockEnabledForBucket = aws.Bool(true) - } - - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Trying to create new S3 bucket: %q", bucket) - _, err := s3conn.CreateBucket(req) - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "OperationAborted" { - log.Printf("[WARN] Got an error while trying to create S3 bucket %s: %s", bucket, err) - return resource.RetryableError( - fmt.Errorf("Error creating S3 bucket %s, retrying: %s", - bucket, err)) - } - } - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - - if err != nil { - return fmt.Errorf("Error creating S3 bucket: %s", err) - } - - // Assign the bucket name as the resource ID - d.SetId(bucket) - return resourceAwsS3BucketUpdate(d, meta) -} - -func resourceAwsS3BucketUpdate(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - if err := setTagsS3(s3conn, d); err != nil { - return fmt.Errorf("%q: %s", d.Get("bucket").(string), err) - } - - if d.HasChange("policy") { - if err := resourceAwsS3BucketPolicyUpdate(s3conn, d); err != nil { - return err - } - } - - if d.HasChange("cors_rule") { - if err := resourceAwsS3BucketCorsUpdate(s3conn, d); err != nil { - return err - } - } - - if d.HasChange("website") { - if err := resourceAwsS3BucketWebsiteUpdate(s3conn, d); err != nil { - return err - } - } - - if d.HasChange("versioning") { - if err := resourceAwsS3BucketVersioningUpdate(s3conn, d); err != nil { - return err - } - } - if d.HasChange("acl") && !d.IsNewResource() { - if err := resourceAwsS3BucketAclUpdate(s3conn, d); err != nil { - return err - } - } - - if d.HasChange("logging") { - if err := resourceAwsS3BucketLoggingUpdate(s3conn, d); err != nil { - return err - } - } - - if d.HasChange("lifecycle_rule") { - if err := resourceAwsS3BucketLifecycleUpdate(s3conn, d); err != nil { - return err - } - } - - if d.HasChange("acceleration_status") { - if err := resourceAwsS3BucketAccelerationUpdate(s3conn, d); err != nil { - return err - } - } - - if d.HasChange("request_payer") { - if err := resourceAwsS3BucketRequestPayerUpdate(s3conn, d); err != nil { - return err - } - } - - if d.HasChange("replication_configuration") { - if err := resourceAwsS3BucketReplicationConfigurationUpdate(s3conn, d); err != nil { - return err - } - } - - if d.HasChange("server_side_encryption_configuration") { - if err := resourceAwsS3BucketServerSideEncryptionConfigurationUpdate(s3conn, d); err != nil { - return err - } - } - - if d.HasChange("object_lock_configuration") { - if err := resourceAwsS3BucketObjectLockConfigurationUpdate(s3conn, d); err != nil { - return err - } - } - - return resourceAwsS3BucketRead(d, meta) -} - -func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - - var err error - - _, err = retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.HeadBucket(&s3.HeadBucketInput{ - Bucket: aws.String(d.Id()), - }) - }) - if err != nil { - if awsError, ok := err.(awserr.RequestFailure); ok && awsError.StatusCode() == 404 { - log.Printf("[WARN] S3 Bucket (%s) not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading S3 Bucket (%s): %s", d.Id(), err) - } - - // In the import case, we won't have this - if _, ok := d.GetOk("bucket"); !ok { - d.Set("bucket", d.Id()) - } - - d.Set("bucket_domain_name", bucketDomainName(d.Get("bucket").(string))) - - // Read the policy - if _, ok := d.GetOk("policy"); ok { - - pol, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.GetBucketPolicy(&s3.GetBucketPolicyInput{ - Bucket: aws.String(d.Id()), - }) - }) - log.Printf("[DEBUG] S3 bucket: %s, read policy: %v", d.Id(), pol) - if err != nil { - if err := d.Set("policy", ""); err != nil { - return err - } - } else { - if v := pol.(*s3.GetBucketPolicyOutput).Policy; v == nil { - if err := d.Set("policy", ""); err != nil { - return err - } - } else { - policy, err := structure.NormalizeJsonString(*v) - if err != nil { - return fmt.Errorf("policy contains an invalid JSON: %s", err) - } - d.Set("policy", policy) - } - } - } - - // Read the CORS - corsResponse, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.GetBucketCors(&s3.GetBucketCorsInput{ - Bucket: aws.String(d.Id()), - }) - }) - if err != nil && !isAWSErr(err, "NoSuchCORSConfiguration", "") { - return fmt.Errorf("error getting S3 Bucket CORS configuration: %s", err) - } - - corsRules := make([]map[string]interface{}, 0) - if cors, ok := corsResponse.(*s3.GetBucketCorsOutput); ok && len(cors.CORSRules) > 0 { - corsRules = make([]map[string]interface{}, 0, len(cors.CORSRules)) - for _, ruleObject := range cors.CORSRules { - rule := make(map[string]interface{}) - rule["allowed_headers"] = flattenStringList(ruleObject.AllowedHeaders) - rule["allowed_methods"] = flattenStringList(ruleObject.AllowedMethods) - rule["allowed_origins"] = flattenStringList(ruleObject.AllowedOrigins) - // Both the "ExposeHeaders" and "MaxAgeSeconds" might not be set. - if ruleObject.AllowedOrigins != nil { - rule["expose_headers"] = flattenStringList(ruleObject.ExposeHeaders) - } - if ruleObject.MaxAgeSeconds != nil { - rule["max_age_seconds"] = int(*ruleObject.MaxAgeSeconds) - } - corsRules = append(corsRules, rule) - } - } - if err := d.Set("cors_rule", corsRules); err != nil { - return fmt.Errorf("error setting cors_rule: %s", err) - } - - // Read the website configuration - wsResponse, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.GetBucketWebsite(&s3.GetBucketWebsiteInput{ - Bucket: aws.String(d.Id()), - }) - }) - if err != nil && !isAWSErr(err, "NotImplemented", "") && !isAWSErr(err, "NoSuchWebsiteConfiguration", "") { - return fmt.Errorf("error getting S3 Bucket website configuration: %s", err) - } - - websites := make([]map[string]interface{}, 0, 1) - if ws, ok := wsResponse.(*s3.GetBucketWebsiteOutput); ok { - w := make(map[string]interface{}) - - if v := ws.IndexDocument; v != nil { - w["index_document"] = *v.Suffix - } - - if v := ws.ErrorDocument; v != nil { - w["error_document"] = *v.Key - } - - if v := ws.RedirectAllRequestsTo; v != nil { - if v.Protocol == nil { - w["redirect_all_requests_to"] = *v.HostName - } else { - var host string - var path string - var query string - parsedHostName, err := url.Parse(*v.HostName) - if err == nil { - host = parsedHostName.Host - path = parsedHostName.Path - query = parsedHostName.RawQuery - } else { - host = *v.HostName - path = "" - } - - w["redirect_all_requests_to"] = (&url.URL{ - Host: host, - Path: path, - Scheme: *v.Protocol, - RawQuery: query, - }).String() - } - } - - if v := ws.RoutingRules; v != nil { - rr, err := normalizeRoutingRules(v) - if err != nil { - return fmt.Errorf("Error while marshaling routing rules: %s", err) - } - w["routing_rules"] = rr - } - - // We have special handling for the website configuration, - // so only add the configuration if there is any - if len(w) > 0 { - websites = append(websites, w) - } - } - if err := d.Set("website", websites); err != nil { - return fmt.Errorf("error setting website: %s", err) - } - - // Read the versioning configuration - - versioningResponse, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.GetBucketVersioning(&s3.GetBucketVersioningInput{ - Bucket: aws.String(d.Id()), - }) - }) - if err != nil { - return err - } - - vcl := make([]map[string]interface{}, 0, 1) - if versioning, ok := versioningResponse.(*s3.GetBucketVersioningOutput); ok { - vc := make(map[string]interface{}) - if versioning.Status != nil && *versioning.Status == s3.BucketVersioningStatusEnabled { - vc["enabled"] = true - } else { - vc["enabled"] = false - } - - if versioning.MFADelete != nil && *versioning.MFADelete == s3.MFADeleteEnabled { - vc["mfa_delete"] = true - } else { - vc["mfa_delete"] = false - } - vcl = append(vcl, vc) - } - if err := d.Set("versioning", vcl); err != nil { - return fmt.Errorf("error setting versioning: %s", err) - } - - // Read the acceleration status - - accelerateResponse, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.GetBucketAccelerateConfiguration(&s3.GetBucketAccelerateConfigurationInput{ - Bucket: aws.String(d.Id()), - }) - }) - - // Amazon S3 Transfer Acceleration might not be supported in the region - if err != nil && !isAWSErr(err, "MethodNotAllowed", "") && !isAWSErr(err, "UnsupportedArgument", "") { - return fmt.Errorf("error getting S3 Bucket acceleration configuration: %s", err) - } - if accelerate, ok := accelerateResponse.(*s3.GetBucketAccelerateConfigurationOutput); ok { - d.Set("acceleration_status", accelerate.Status) - } - - // Read the request payer configuration. - - payerResponse, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.GetBucketRequestPayment(&s3.GetBucketRequestPaymentInput{ - Bucket: aws.String(d.Id()), - }) - }) - - if err != nil { - return fmt.Errorf("error getting S3 Bucket request payment: %s", err) - } - - if payer, ok := payerResponse.(*s3.GetBucketRequestPaymentOutput); ok { - d.Set("request_payer", payer.Payer) - } - - // Read the logging configuration - loggingResponse, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.GetBucketLogging(&s3.GetBucketLoggingInput{ - Bucket: aws.String(d.Id()), - }) - }) - - if err != nil { - return fmt.Errorf("error getting S3 Bucket logging: %s", err) - } - - lcl := make([]map[string]interface{}, 0, 1) - if logging, ok := loggingResponse.(*s3.GetBucketLoggingOutput); ok && logging.LoggingEnabled != nil { - v := logging.LoggingEnabled - lc := make(map[string]interface{}) - if *v.TargetBucket != "" { - lc["target_bucket"] = *v.TargetBucket - } - if *v.TargetPrefix != "" { - lc["target_prefix"] = *v.TargetPrefix - } - lcl = append(lcl, lc) - } - if err := d.Set("logging", lcl); err != nil { - return fmt.Errorf("error setting logging: %s", err) - } - - // Read the lifecycle configuration - - lifecycleResponse, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.GetBucketLifecycleConfiguration(&s3.GetBucketLifecycleConfigurationInput{ - Bucket: aws.String(d.Id()), - }) - }) - if err != nil && !isAWSErr(err, "NoSuchLifecycleConfiguration", "") { - return err - } - - lifecycleRules := make([]map[string]interface{}, 0) - if lifecycle, ok := lifecycleResponse.(*s3.GetBucketLifecycleConfigurationOutput); ok && len(lifecycle.Rules) > 0 { - lifecycleRules = make([]map[string]interface{}, 0, len(lifecycle.Rules)) - - for _, lifecycleRule := range lifecycle.Rules { - rule := make(map[string]interface{}) - - // ID - if lifecycleRule.ID != nil && *lifecycleRule.ID != "" { - rule["id"] = *lifecycleRule.ID - } - filter := lifecycleRule.Filter - if filter != nil { - if filter.And != nil { - // Prefix - if filter.And.Prefix != nil && *filter.And.Prefix != "" { - rule["prefix"] = *filter.And.Prefix - } - // Tag - if len(filter.And.Tags) > 0 { - rule["tags"] = tagsToMapS3(filter.And.Tags) - } - } else { - // Prefix - if filter.Prefix != nil && *filter.Prefix != "" { - rule["prefix"] = *filter.Prefix - } - } - } else { - if lifecycleRule.Prefix != nil { - rule["prefix"] = *lifecycleRule.Prefix - } - } - - // Enabled - if lifecycleRule.Status != nil { - if *lifecycleRule.Status == s3.ExpirationStatusEnabled { - rule["enabled"] = true - } else { - rule["enabled"] = false - } - } - - // AbortIncompleteMultipartUploadDays - if lifecycleRule.AbortIncompleteMultipartUpload != nil { - if lifecycleRule.AbortIncompleteMultipartUpload.DaysAfterInitiation != nil { - rule["abort_incomplete_multipart_upload_days"] = int(*lifecycleRule.AbortIncompleteMultipartUpload.DaysAfterInitiation) - } - } - - // expiration - if lifecycleRule.Expiration != nil { - e := make(map[string]interface{}) - if lifecycleRule.Expiration.Date != nil { - e["date"] = (*lifecycleRule.Expiration.Date).Format("2006-01-02") - } - if lifecycleRule.Expiration.Days != nil { - e["days"] = int(*lifecycleRule.Expiration.Days) - } - if lifecycleRule.Expiration.ExpiredObjectDeleteMarker != nil { - e["expired_object_delete_marker"] = *lifecycleRule.Expiration.ExpiredObjectDeleteMarker - } - rule["expiration"] = schema.NewSet(expirationHash, []interface{}{e}) - } - // noncurrent_version_expiration - if lifecycleRule.NoncurrentVersionExpiration != nil { - e := make(map[string]interface{}) - if lifecycleRule.NoncurrentVersionExpiration.NoncurrentDays != nil { - e["days"] = int(*lifecycleRule.NoncurrentVersionExpiration.NoncurrentDays) - } - rule["noncurrent_version_expiration"] = schema.NewSet(expirationHash, []interface{}{e}) - } - //// transition - if len(lifecycleRule.Transitions) > 0 { - transitions := make([]interface{}, 0, len(lifecycleRule.Transitions)) - for _, v := range lifecycleRule.Transitions { - t := make(map[string]interface{}) - if v.Date != nil { - t["date"] = (*v.Date).Format("2006-01-02") - } - if v.Days != nil { - t["days"] = int(*v.Days) - } - if v.StorageClass != nil { - t["storage_class"] = *v.StorageClass - } - transitions = append(transitions, t) - } - rule["transition"] = schema.NewSet(transitionHash, transitions) - } - // noncurrent_version_transition - if len(lifecycleRule.NoncurrentVersionTransitions) > 0 { - transitions := make([]interface{}, 0, len(lifecycleRule.NoncurrentVersionTransitions)) - for _, v := range lifecycleRule.NoncurrentVersionTransitions { - t := make(map[string]interface{}) - if v.NoncurrentDays != nil { - t["days"] = int(*v.NoncurrentDays) - } - if v.StorageClass != nil { - t["storage_class"] = *v.StorageClass - } - transitions = append(transitions, t) - } - rule["noncurrent_version_transition"] = schema.NewSet(transitionHash, transitions) - } - - lifecycleRules = append(lifecycleRules, rule) - } - } - if err := d.Set("lifecycle_rule", lifecycleRules); err != nil { - return fmt.Errorf("error setting lifecycle_rule: %s", err) - } - - // Read the bucket replication configuration - - replicationResponse, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.GetBucketReplication(&s3.GetBucketReplicationInput{ - Bucket: aws.String(d.Id()), - }) - }) - if err != nil && !isAWSErr(err, "ReplicationConfigurationNotFoundError", "") { - return fmt.Errorf("error getting S3 Bucket replication: %s", err) - } - - replicationConfiguration := make([]map[string]interface{}, 0) - if replication, ok := replicationResponse.(*s3.GetBucketReplicationOutput); ok { - replicationConfiguration = flattenAwsS3BucketReplicationConfiguration(replication.ReplicationConfiguration) - } - if err := d.Set("replication_configuration", replicationConfiguration); err != nil { - return fmt.Errorf("error setting replication_configuration: %s", err) - } - - // Read the bucket server side encryption configuration - - encryptionResponse, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.GetBucketEncryption(&s3.GetBucketEncryptionInput{ - Bucket: aws.String(d.Id()), - }) - }) - if err != nil && !isAWSErr(err, "ServerSideEncryptionConfigurationNotFoundError", "encryption configuration was not found") { - return fmt.Errorf("error getting S3 Bucket encryption: %s", err) - } - - serverSideEncryptionConfiguration := make([]map[string]interface{}, 0) - if encryption, ok := encryptionResponse.(*s3.GetBucketEncryptionOutput); ok && encryption.ServerSideEncryptionConfiguration != nil { - serverSideEncryptionConfiguration = flattenAwsS3ServerSideEncryptionConfiguration(encryption.ServerSideEncryptionConfiguration) - } - if err := d.Set("server_side_encryption_configuration", serverSideEncryptionConfiguration); err != nil { - return fmt.Errorf("error setting server_side_encryption_configuration: %s", err) - } - - // Object Lock configuration. - if conf, err := readS3ObjectLockConfiguration(s3conn, d.Id()); err != nil { - return fmt.Errorf("error getting S3 Bucket Object Lock configuration: %s", err) - } else { - if err := d.Set("object_lock_configuration", conf); err != nil { - return fmt.Errorf("error setting object_lock_configuration: %s", err) - } - } - - // Add the region as an attribute - - locationResponse, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.GetBucketLocation( - &s3.GetBucketLocationInput{ - Bucket: aws.String(d.Id()), - }, - ) - }) - if err != nil { - return fmt.Errorf("error getting S3 Bucket location: %s", err) - } - - var region string - if location, ok := locationResponse.(*s3.GetBucketLocationOutput); ok && location.LocationConstraint != nil { - region = *location.LocationConstraint - } - region = normalizeRegion(region) - if err := d.Set("region", region); err != nil { - return err - } - - // Add the bucket_regional_domain_name as an attribute - regionalEndpoint, err := BucketRegionalDomainName(d.Get("bucket").(string), region) - if err != nil { - return err - } - d.Set("bucket_regional_domain_name", regionalEndpoint) - - // Add the hosted zone ID for this bucket's region as an attribute - hostedZoneID, err := HostedZoneIDForRegion(region) - if err != nil { - log.Printf("[WARN] %s", err) - } else { - d.Set("hosted_zone_id", hostedZoneID) - } - - // Add website_endpoint as an attribute - websiteEndpoint, err := websiteEndpoint(s3conn, d) - if err != nil { - return err - } - if websiteEndpoint != nil { - if err := d.Set("website_endpoint", websiteEndpoint.Endpoint); err != nil { - return err - } - if err := d.Set("website_domain", websiteEndpoint.Domain); err != nil { - return err - } - } - - tagSet, err := getTagSetS3(s3conn, d.Id()) - if err != nil { - return err - } - - if err := d.Set("tags", tagsToMapS3(tagSet)); err != nil { - return err - } - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "s3", - Resource: d.Id(), - }.String() - d.Set("arn", arn) - - return nil -} - -func resourceAwsS3BucketDelete(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - - log.Printf("[DEBUG] S3 Delete Bucket: %s", d.Id()) - _, err := s3conn.DeleteBucket(&s3.DeleteBucketInput{ - Bucket: aws.String(d.Id()), - }) - - if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") { - return nil - } - - if isAWSErr(err, "BucketNotEmpty", "") { - if d.Get("force_destroy").(bool) { - // bucket may have things delete them - log.Printf("[DEBUG] S3 Bucket attempting to forceDestroy %+v", err) - - bucket := d.Get("bucket").(string) - resp, err := s3conn.ListObjectVersions( - &s3.ListObjectVersionsInput{ - Bucket: aws.String(bucket), - }, - ) - - if err != nil { - return fmt.Errorf("Error S3 Bucket list Object Versions err: %s", err) - } - - objectsToDelete := make([]*s3.ObjectIdentifier, 0) - - if len(resp.DeleteMarkers) != 0 { - - for _, v := range resp.DeleteMarkers { - objectsToDelete = append(objectsToDelete, &s3.ObjectIdentifier{ - Key: v.Key, - VersionId: v.VersionId, - }) - } - } - - if len(resp.Versions) != 0 { - for _, v := range resp.Versions { - objectsToDelete = append(objectsToDelete, &s3.ObjectIdentifier{ - Key: v.Key, - VersionId: v.VersionId, - }) - } - } - - params := &s3.DeleteObjectsInput{ - Bucket: aws.String(bucket), - Delete: &s3.Delete{ - Objects: objectsToDelete, - }, - } - - _, err = s3conn.DeleteObjects(params) - - if err != nil { - return fmt.Errorf("Error S3 Bucket force_destroy error deleting: %s", err) - } - - // this line recurses until all objects are deleted or an error is returned - return resourceAwsS3BucketDelete(d, meta) - } - } - - if err != nil { - return fmt.Errorf("error deleting S3 Bucket (%s): %s", d.Id(), err) - } - - return nil -} - -func resourceAwsS3BucketPolicyUpdate(s3conn *s3.S3, d *schema.ResourceData) error { - bucket := d.Get("bucket").(string) - policy := d.Get("policy").(string) - - if policy != "" { - log.Printf("[DEBUG] S3 bucket: %s, put policy: %s", bucket, policy) - - params := &s3.PutBucketPolicyInput{ - Bucket: aws.String(bucket), - Policy: aws.String(policy), - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - if _, err := s3conn.PutBucketPolicy(params); err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "MalformedPolicy" || awserr.Code() == "NoSuchBucket" { - return resource.RetryableError(awserr) - } - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return fmt.Errorf("Error putting S3 policy: %s", err) - } - } else { - log.Printf("[DEBUG] S3 bucket: %s, delete policy: %s", bucket, policy) - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.DeleteBucketPolicy(&s3.DeleteBucketPolicyInput{ - Bucket: aws.String(bucket), - }) - }) - - if err != nil { - return fmt.Errorf("Error deleting S3 policy: %s", err) - } - } - - return nil -} - -func resourceAwsS3BucketCorsUpdate(s3conn *s3.S3, d *schema.ResourceData) error { - bucket := d.Get("bucket").(string) - rawCors := d.Get("cors_rule").([]interface{}) - - if len(rawCors) == 0 { - // Delete CORS - log.Printf("[DEBUG] S3 bucket: %s, delete CORS", bucket) - - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.DeleteBucketCors(&s3.DeleteBucketCorsInput{ - Bucket: aws.String(bucket), - }) - }) - if err != nil { - return fmt.Errorf("Error deleting S3 CORS: %s", err) - } - } else { - // Put CORS - rules := make([]*s3.CORSRule, 0, len(rawCors)) - for _, cors := range rawCors { - corsMap := cors.(map[string]interface{}) - r := &s3.CORSRule{} - for k, v := range corsMap { - log.Printf("[DEBUG] S3 bucket: %s, put CORS: %#v, %#v", bucket, k, v) - if k == "max_age_seconds" { - r.MaxAgeSeconds = aws.Int64(int64(v.(int))) - } else { - vMap := make([]*string, len(v.([]interface{}))) - for i, vv := range v.([]interface{}) { - if str, ok := vv.(string); ok { - vMap[i] = aws.String(str) - } - } - switch k { - case "allowed_headers": - r.AllowedHeaders = vMap - case "allowed_methods": - r.AllowedMethods = vMap - case "allowed_origins": - r.AllowedOrigins = vMap - case "expose_headers": - r.ExposeHeaders = vMap - } - } - } - rules = append(rules, r) - } - corsInput := &s3.PutBucketCorsInput{ - Bucket: aws.String(bucket), - CORSConfiguration: &s3.CORSConfiguration{ - CORSRules: rules, - }, - } - log.Printf("[DEBUG] S3 bucket: %s, put CORS: %#v", bucket, corsInput) - - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.PutBucketCors(corsInput) - }) - if err != nil { - return fmt.Errorf("Error putting S3 CORS: %s", err) - } - } - - return nil -} - -func resourceAwsS3BucketWebsiteUpdate(s3conn *s3.S3, d *schema.ResourceData) error { - ws := d.Get("website").([]interface{}) - - if len(ws) == 0 { - return resourceAwsS3BucketWebsiteDelete(s3conn, d) - } - - var w map[string]interface{} - if ws[0] != nil { - w = ws[0].(map[string]interface{}) - } else { - w = make(map[string]interface{}) - } - return resourceAwsS3BucketWebsitePut(s3conn, d, w) -} - -func resourceAwsS3BucketWebsitePut(s3conn *s3.S3, d *schema.ResourceData, website map[string]interface{}) error { - bucket := d.Get("bucket").(string) - - var indexDocument, errorDocument, redirectAllRequestsTo, routingRules string - if v, ok := website["index_document"]; ok { - indexDocument = v.(string) - } - if v, ok := website["error_document"]; ok { - errorDocument = v.(string) - } - if v, ok := website["redirect_all_requests_to"]; ok { - redirectAllRequestsTo = v.(string) - } - if v, ok := website["routing_rules"]; ok { - routingRules = v.(string) - } - - if indexDocument == "" && redirectAllRequestsTo == "" { - return fmt.Errorf("Must specify either index_document or redirect_all_requests_to.") - } - - websiteConfiguration := &s3.WebsiteConfiguration{} - - if indexDocument != "" { - websiteConfiguration.IndexDocument = &s3.IndexDocument{Suffix: aws.String(indexDocument)} - } - - if errorDocument != "" { - websiteConfiguration.ErrorDocument = &s3.ErrorDocument{Key: aws.String(errorDocument)} - } - - if redirectAllRequestsTo != "" { - redirect, err := url.Parse(redirectAllRequestsTo) - if err == nil && redirect.Scheme != "" { - var redirectHostBuf bytes.Buffer - redirectHostBuf.WriteString(redirect.Host) - if redirect.Path != "" { - redirectHostBuf.WriteString(redirect.Path) - } - if redirect.RawQuery != "" { - redirectHostBuf.WriteString("?") - redirectHostBuf.WriteString(redirect.RawQuery) - } - websiteConfiguration.RedirectAllRequestsTo = &s3.RedirectAllRequestsTo{HostName: aws.String(redirectHostBuf.String()), Protocol: aws.String(redirect.Scheme)} - } else { - websiteConfiguration.RedirectAllRequestsTo = &s3.RedirectAllRequestsTo{HostName: aws.String(redirectAllRequestsTo)} - } - } - - if routingRules != "" { - var unmarshaledRules []*s3.RoutingRule - if err := json.Unmarshal([]byte(routingRules), &unmarshaledRules); err != nil { - return err - } - websiteConfiguration.RoutingRules = unmarshaledRules - } - - putInput := &s3.PutBucketWebsiteInput{ - Bucket: aws.String(bucket), - WebsiteConfiguration: websiteConfiguration, - } - - log.Printf("[DEBUG] S3 put bucket website: %#v", putInput) - - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.PutBucketWebsite(putInput) - }) - if err != nil { - return fmt.Errorf("Error putting S3 website: %s", err) - } - - return nil -} - -func resourceAwsS3BucketWebsiteDelete(s3conn *s3.S3, d *schema.ResourceData) error { - bucket := d.Get("bucket").(string) - deleteInput := &s3.DeleteBucketWebsiteInput{Bucket: aws.String(bucket)} - - log.Printf("[DEBUG] S3 delete bucket website: %#v", deleteInput) - - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.DeleteBucketWebsite(deleteInput) - }) - if err != nil { - return fmt.Errorf("Error deleting S3 website: %s", err) - } - - d.Set("website_endpoint", "") - d.Set("website_domain", "") - - return nil -} - -func websiteEndpoint(s3conn *s3.S3, d *schema.ResourceData) (*S3Website, error) { - // If the bucket doesn't have a website configuration, return an empty - // endpoint - if _, ok := d.GetOk("website"); !ok { - return nil, nil - } - - bucket := d.Get("bucket").(string) - - // Lookup the region for this bucket - - locationResponse, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.GetBucketLocation( - &s3.GetBucketLocationInput{ - Bucket: aws.String(bucket), - }, - ) - }) - if err != nil { - return nil, err - } - location := locationResponse.(*s3.GetBucketLocationOutput) - var region string - if location.LocationConstraint != nil { - region = *location.LocationConstraint - } - - return WebsiteEndpoint(bucket, region), nil -} - -func bucketDomainName(bucket string) string { - return fmt.Sprintf("%s.s3.amazonaws.com", bucket) -} - -// https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region -func BucketRegionalDomainName(bucket string, region string) (string, error) { - // Return a default AWS Commercial domain name if no region is provided - // Otherwise EndpointFor() will return BUCKET.s3..amazonaws.com - if region == "" { - return fmt.Sprintf("%s.s3.amazonaws.com", bucket), nil - } - endpoint, err := endpoints.DefaultResolver().EndpointFor(endpoints.S3ServiceID, region) - if err != nil { - return "", err - } - return fmt.Sprintf("%s.%s", bucket, strings.TrimPrefix(endpoint.URL, "https://")), nil -} - -func WebsiteEndpoint(bucket string, region string) *S3Website { - domain := WebsiteDomainUrl(region) - return &S3Website{Endpoint: fmt.Sprintf("%s.%s", bucket, domain), Domain: domain} -} - -func WebsiteDomainUrl(region string) string { - region = normalizeRegion(region) - - // New regions uses different syntax for website endpoints - // http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html - if isOldRegion(region) { - return fmt.Sprintf("s3-website-%s.amazonaws.com", region) - } - return fmt.Sprintf("s3-website.%s.amazonaws.com", region) -} - -func isOldRegion(region string) bool { - oldRegions := []string{ - "ap-northeast-1", - "ap-southeast-1", - "ap-southeast-2", - "eu-west-1", - "sa-east-1", - "us-east-1", - "us-gov-west-1", - "us-west-1", - "us-west-2", - } - for _, r := range oldRegions { - if region == r { - return true - } - } - return false -} - -func resourceAwsS3BucketAclUpdate(s3conn *s3.S3, d *schema.ResourceData) error { - acl := d.Get("acl").(string) - bucket := d.Get("bucket").(string) - - i := &s3.PutBucketAclInput{ - Bucket: aws.String(bucket), - ACL: aws.String(acl), - } - log.Printf("[DEBUG] S3 put bucket ACL: %#v", i) - - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.PutBucketAcl(i) - }) - if err != nil { - return fmt.Errorf("Error putting S3 ACL: %s", err) - } - - return nil -} - -func resourceAwsS3BucketVersioningUpdate(s3conn *s3.S3, d *schema.ResourceData) error { - v := d.Get("versioning").([]interface{}) - bucket := d.Get("bucket").(string) - vc := &s3.VersioningConfiguration{} - - if len(v) > 0 { - c := v[0].(map[string]interface{}) - - if c["enabled"].(bool) { - vc.Status = aws.String(s3.BucketVersioningStatusEnabled) - } else { - vc.Status = aws.String(s3.BucketVersioningStatusSuspended) - } - - if c["mfa_delete"].(bool) { - vc.MFADelete = aws.String(s3.MFADeleteEnabled) - } else { - vc.MFADelete = aws.String(s3.MFADeleteDisabled) - } - - } else { - vc.Status = aws.String(s3.BucketVersioningStatusSuspended) - } - - i := &s3.PutBucketVersioningInput{ - Bucket: aws.String(bucket), - VersioningConfiguration: vc, - } - log.Printf("[DEBUG] S3 put bucket versioning: %#v", i) - - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.PutBucketVersioning(i) - }) - if err != nil { - return fmt.Errorf("Error putting S3 versioning: %s", err) - } - - return nil -} - -func resourceAwsS3BucketLoggingUpdate(s3conn *s3.S3, d *schema.ResourceData) error { - logging := d.Get("logging").(*schema.Set).List() - bucket := d.Get("bucket").(string) - loggingStatus := &s3.BucketLoggingStatus{} - - if len(logging) > 0 { - c := logging[0].(map[string]interface{}) - - loggingEnabled := &s3.LoggingEnabled{} - if val, ok := c["target_bucket"]; ok { - loggingEnabled.TargetBucket = aws.String(val.(string)) - } - if val, ok := c["target_prefix"]; ok { - loggingEnabled.TargetPrefix = aws.String(val.(string)) - } - - loggingStatus.LoggingEnabled = loggingEnabled - } - - i := &s3.PutBucketLoggingInput{ - Bucket: aws.String(bucket), - BucketLoggingStatus: loggingStatus, - } - log.Printf("[DEBUG] S3 put bucket logging: %#v", i) - - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.PutBucketLogging(i) - }) - if err != nil { - return fmt.Errorf("Error putting S3 logging: %s", err) - } - - return nil -} - -func resourceAwsS3BucketAccelerationUpdate(s3conn *s3.S3, d *schema.ResourceData) error { - bucket := d.Get("bucket").(string) - enableAcceleration := d.Get("acceleration_status").(string) - - i := &s3.PutBucketAccelerateConfigurationInput{ - Bucket: aws.String(bucket), - AccelerateConfiguration: &s3.AccelerateConfiguration{ - Status: aws.String(enableAcceleration), - }, - } - log.Printf("[DEBUG] S3 put bucket acceleration: %#v", i) - - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.PutBucketAccelerateConfiguration(i) - }) - if err != nil { - return fmt.Errorf("Error putting S3 acceleration: %s", err) - } - - return nil -} - -func resourceAwsS3BucketRequestPayerUpdate(s3conn *s3.S3, d *schema.ResourceData) error { - bucket := d.Get("bucket").(string) - payer := d.Get("request_payer").(string) - - i := &s3.PutBucketRequestPaymentInput{ - Bucket: aws.String(bucket), - RequestPaymentConfiguration: &s3.RequestPaymentConfiguration{ - Payer: aws.String(payer), - }, - } - log.Printf("[DEBUG] S3 put bucket request payer: %#v", i) - - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.PutBucketRequestPayment(i) - }) - if err != nil { - return fmt.Errorf("Error putting S3 request payer: %s", err) - } - - return nil -} - -func resourceAwsS3BucketServerSideEncryptionConfigurationUpdate(s3conn *s3.S3, d *schema.ResourceData) error { - bucket := d.Get("bucket").(string) - serverSideEncryptionConfiguration := d.Get("server_side_encryption_configuration").([]interface{}) - if len(serverSideEncryptionConfiguration) == 0 { - log.Printf("[DEBUG] Delete server side encryption configuration: %#v", serverSideEncryptionConfiguration) - i := &s3.DeleteBucketEncryptionInput{ - Bucket: aws.String(bucket), - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - if _, err := s3conn.DeleteBucketEncryption(i); err != nil { - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error removing S3 bucket server side encryption: %s", err) - } - return nil - } - - c := serverSideEncryptionConfiguration[0].(map[string]interface{}) - - rc := &s3.ServerSideEncryptionConfiguration{} - - rcRules := c["rule"].([]interface{}) - var rules []*s3.ServerSideEncryptionRule - for _, v := range rcRules { - rr := v.(map[string]interface{}) - rrDefault := rr["apply_server_side_encryption_by_default"].([]interface{}) - sseAlgorithm := rrDefault[0].(map[string]interface{})["sse_algorithm"].(string) - kmsMasterKeyId := rrDefault[0].(map[string]interface{})["kms_master_key_id"].(string) - rcDefaultRule := &s3.ServerSideEncryptionByDefault{ - SSEAlgorithm: aws.String(sseAlgorithm), - } - if kmsMasterKeyId != "" { - rcDefaultRule.KMSMasterKeyID = aws.String(kmsMasterKeyId) - } - rcRule := &s3.ServerSideEncryptionRule{ - ApplyServerSideEncryptionByDefault: rcDefaultRule, - } - - rules = append(rules, rcRule) - } - - rc.Rules = rules - i := &s3.PutBucketEncryptionInput{ - Bucket: aws.String(bucket), - ServerSideEncryptionConfiguration: rc, - } - log.Printf("[DEBUG] S3 put bucket replication configuration: %#v", i) - - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.PutBucketEncryption(i) - }) - if err != nil { - return fmt.Errorf("error putting S3 server side encryption configuration: %s", err) - } - - return nil -} - -func resourceAwsS3BucketObjectLockConfigurationUpdate(s3conn *s3.S3, d *schema.ResourceData) error { - // S3 Object Lock configuration cannot be deleted, only updated. - req := &s3.PutObjectLockConfigurationInput{ - Bucket: aws.String(d.Get("bucket").(string)), - ObjectLockConfiguration: expandS3ObjectLockConfiguration(d.Get("object_lock_configuration").([]interface{})), - } - - _, err := retryOnAwsCode(s3.ErrCodeNoSuchBucket, func() (interface{}, error) { - return s3conn.PutObjectLockConfiguration(req) - }) - if err != nil { - return fmt.Errorf("error putting S3 object lock configuration: %s", err) - } - - return nil -} - -func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema.ResourceData) error { - bucket := d.Get("bucket").(string) - replicationConfiguration := d.Get("replication_configuration").([]interface{}) - - if len(replicationConfiguration) == 0 { - i := &s3.DeleteBucketReplicationInput{ - Bucket: aws.String(bucket), - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - if _, err := s3conn.DeleteBucketReplication(i); err != nil { - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error removing S3 bucket replication: %s", err) - } - return nil - } - - hasVersioning := false - // Validate that bucket versioning is enabled - if versioning, ok := d.GetOk("versioning"); ok { - v := versioning.([]interface{}) - - if v[0].(map[string]interface{})["enabled"].(bool) { - hasVersioning = true - } - } - - if !hasVersioning { - return fmt.Errorf("versioning must be enabled to allow S3 bucket replication") - } - - c := replicationConfiguration[0].(map[string]interface{}) - - rc := &s3.ReplicationConfiguration{} - if val, ok := c["role"]; ok { - rc.Role = aws.String(val.(string)) - } - - rcRules := c["rules"].(*schema.Set).List() - rules := []*s3.ReplicationRule{} - for _, v := range rcRules { - rr := v.(map[string]interface{}) - rcRule := &s3.ReplicationRule{} - if status, ok := rr["status"]; ok && status != "" { - rcRule.Status = aws.String(status.(string)) - } else { - continue - } - - if rrid, ok := rr["id"]; ok && rrid != "" { - rcRule.ID = aws.String(rrid.(string)) - } - - ruleDestination := &s3.Destination{} - if dest, ok := rr["destination"].(*schema.Set); ok && dest.Len() > 0 { - bd := dest.List()[0].(map[string]interface{}) - ruleDestination.Bucket = aws.String(bd["bucket"].(string)) - - if storageClass, ok := bd["storage_class"]; ok && storageClass != "" { - ruleDestination.StorageClass = aws.String(storageClass.(string)) - } - - if replicaKmsKeyId, ok := bd["replica_kms_key_id"]; ok && replicaKmsKeyId != "" { - ruleDestination.EncryptionConfiguration = &s3.EncryptionConfiguration{ - ReplicaKmsKeyID: aws.String(replicaKmsKeyId.(string)), - } - } - - if account, ok := bd["account_id"]; ok && account != "" { - ruleDestination.Account = aws.String(account.(string)) - } - - if aclTranslation, ok := bd["access_control_translation"].([]interface{}); ok && len(aclTranslation) > 0 { - aclTranslationValues := aclTranslation[0].(map[string]interface{}) - ruleAclTranslation := &s3.AccessControlTranslation{} - ruleAclTranslation.Owner = aws.String(aclTranslationValues["owner"].(string)) - ruleDestination.AccessControlTranslation = ruleAclTranslation - } - - } - rcRule.Destination = ruleDestination - - if ssc, ok := rr["source_selection_criteria"].(*schema.Set); ok && ssc.Len() > 0 { - sscValues := ssc.List()[0].(map[string]interface{}) - ruleSsc := &s3.SourceSelectionCriteria{} - if sseKms, ok := sscValues["sse_kms_encrypted_objects"].(*schema.Set); ok && sseKms.Len() > 0 { - sseKmsValues := sseKms.List()[0].(map[string]interface{}) - sseKmsEncryptedObjects := &s3.SseKmsEncryptedObjects{} - if sseKmsValues["enabled"].(bool) { - sseKmsEncryptedObjects.Status = aws.String(s3.SseKmsEncryptedObjectsStatusEnabled) - } else { - sseKmsEncryptedObjects.Status = aws.String(s3.SseKmsEncryptedObjectsStatusDisabled) - } - ruleSsc.SseKmsEncryptedObjects = sseKmsEncryptedObjects - } - rcRule.SourceSelectionCriteria = ruleSsc - } - - if f, ok := rr["filter"].([]interface{}); ok && len(f) > 0 { - // XML schema V2. - rcRule.Priority = aws.Int64(int64(rr["priority"].(int))) - rcRule.Filter = &s3.ReplicationRuleFilter{} - filter := f[0].(map[string]interface{}) - tags := filter["tags"].(map[string]interface{}) - if len(tags) > 0 { - rcRule.Filter.And = &s3.ReplicationRuleAndOperator{ - Prefix: aws.String(filter["prefix"].(string)), - Tags: tagsFromMapS3(tags), - } - } else { - rcRule.Filter.Prefix = aws.String(filter["prefix"].(string)) - } - rcRule.DeleteMarkerReplication = &s3.DeleteMarkerReplication{ - Status: aws.String(s3.DeleteMarkerReplicationStatusDisabled), - } - } else { - // XML schema V1. - rcRule.Prefix = aws.String(rr["prefix"].(string)) - } - - rules = append(rules, rcRule) - } - - rc.Rules = rules - i := &s3.PutBucketReplicationInput{ - Bucket: aws.String(bucket), - ReplicationConfiguration: rc, - } - log.Printf("[DEBUG] S3 put bucket replication configuration: %#v", i) - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - if _, err := s3conn.PutBucketReplication(i); err != nil { - if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || - isAWSErr(err, "InvalidRequest", "Versioning must be 'Enabled' on the bucket") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error putting S3 replication configuration: %s", err) - } - - return nil -} - -func resourceAwsS3BucketLifecycleUpdate(s3conn *s3.S3, d *schema.ResourceData) error { - bucket := d.Get("bucket").(string) - - lifecycleRules := d.Get("lifecycle_rule").([]interface{}) - - if len(lifecycleRules) == 0 { - i := &s3.DeleteBucketLifecycleInput{ - Bucket: aws.String(bucket), - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - if _, err := s3conn.DeleteBucketLifecycle(i); err != nil { - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error removing S3 lifecycle: %s", err) - } - return nil - } - - rules := make([]*s3.LifecycleRule, 0, len(lifecycleRules)) - - for i, lifecycleRule := range lifecycleRules { - r := lifecycleRule.(map[string]interface{}) - - rule := &s3.LifecycleRule{} - - // Filter - tags := r["tags"].(map[string]interface{}) - filter := &s3.LifecycleRuleFilter{} - if len(tags) > 0 { - lifecycleRuleAndOp := &s3.LifecycleRuleAndOperator{} - lifecycleRuleAndOp.SetPrefix(r["prefix"].(string)) - lifecycleRuleAndOp.SetTags(tagsFromMapS3(tags)) - filter.SetAnd(lifecycleRuleAndOp) - } else { - filter.SetPrefix(r["prefix"].(string)) - } - rule.SetFilter(filter) - - // ID - if val, ok := r["id"].(string); ok && val != "" { - rule.ID = aws.String(val) - } else { - rule.ID = aws.String(resource.PrefixedUniqueId("tf-s3-lifecycle-")) - } - - // Enabled - if val, ok := r["enabled"].(bool); ok && val { - rule.Status = aws.String(s3.ExpirationStatusEnabled) - } else { - rule.Status = aws.String(s3.ExpirationStatusDisabled) - } - - // AbortIncompleteMultipartUpload - if val, ok := r["abort_incomplete_multipart_upload_days"].(int); ok && val > 0 { - rule.AbortIncompleteMultipartUpload = &s3.AbortIncompleteMultipartUpload{ - DaysAfterInitiation: aws.Int64(int64(val)), - } - } - - // Expiration - expiration := d.Get(fmt.Sprintf("lifecycle_rule.%d.expiration", i)).(*schema.Set).List() - if len(expiration) > 0 { - e := expiration[0].(map[string]interface{}) - i := &s3.LifecycleExpiration{} - - if val, ok := e["date"].(string); ok && val != "" { - t, err := time.Parse(time.RFC3339, fmt.Sprintf("%sT00:00:00Z", val)) - if err != nil { - return fmt.Errorf("Error Parsing AWS S3 Bucket Lifecycle Expiration Date: %s", err.Error()) - } - i.Date = aws.Time(t) - } else if val, ok := e["days"].(int); ok && val > 0 { - i.Days = aws.Int64(int64(val)) - } else if val, ok := e["expired_object_delete_marker"].(bool); ok { - i.ExpiredObjectDeleteMarker = aws.Bool(val) - } - rule.Expiration = i - } - - // NoncurrentVersionExpiration - nc_expiration := d.Get(fmt.Sprintf("lifecycle_rule.%d.noncurrent_version_expiration", i)).(*schema.Set).List() - if len(nc_expiration) > 0 { - e := nc_expiration[0].(map[string]interface{}) - - if val, ok := e["days"].(int); ok && val > 0 { - rule.NoncurrentVersionExpiration = &s3.NoncurrentVersionExpiration{ - NoncurrentDays: aws.Int64(int64(val)), - } - } - } - - // Transitions - transitions := d.Get(fmt.Sprintf("lifecycle_rule.%d.transition", i)).(*schema.Set).List() - if len(transitions) > 0 { - rule.Transitions = make([]*s3.Transition, 0, len(transitions)) - for _, transition := range transitions { - transition := transition.(map[string]interface{}) - i := &s3.Transition{} - if val, ok := transition["date"].(string); ok && val != "" { - t, err := time.Parse(time.RFC3339, fmt.Sprintf("%sT00:00:00Z", val)) - if err != nil { - return fmt.Errorf("Error Parsing AWS S3 Bucket Lifecycle Expiration Date: %s", err.Error()) - } - i.Date = aws.Time(t) - } else if val, ok := transition["days"].(int); ok && val >= 0 { - i.Days = aws.Int64(int64(val)) - } - if val, ok := transition["storage_class"].(string); ok && val != "" { - i.StorageClass = aws.String(val) - } - - rule.Transitions = append(rule.Transitions, i) - } - } - // NoncurrentVersionTransitions - nc_transitions := d.Get(fmt.Sprintf("lifecycle_rule.%d.noncurrent_version_transition", i)).(*schema.Set).List() - if len(nc_transitions) > 0 { - rule.NoncurrentVersionTransitions = make([]*s3.NoncurrentVersionTransition, 0, len(nc_transitions)) - for _, transition := range nc_transitions { - transition := transition.(map[string]interface{}) - i := &s3.NoncurrentVersionTransition{} - if val, ok := transition["days"].(int); ok && val >= 0 { - i.NoncurrentDays = aws.Int64(int64(val)) - } - if val, ok := transition["storage_class"].(string); ok && val != "" { - i.StorageClass = aws.String(val) - } - - rule.NoncurrentVersionTransitions = append(rule.NoncurrentVersionTransitions, i) - } - } - - rules = append(rules, rule) - } - - i := &s3.PutBucketLifecycleConfigurationInput{ - Bucket: aws.String(bucket), - LifecycleConfiguration: &s3.BucketLifecycleConfiguration{ - Rules: rules, - }, - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - if _, err := s3conn.PutBucketLifecycleConfiguration(i); err != nil { - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error putting S3 lifecycle: %s", err) - } - - return nil -} - -func flattenAwsS3ServerSideEncryptionConfiguration(c *s3.ServerSideEncryptionConfiguration) []map[string]interface{} { - var encryptionConfiguration []map[string]interface{} - rules := make([]interface{}, 0, len(c.Rules)) - for _, v := range c.Rules { - if v.ApplyServerSideEncryptionByDefault != nil { - r := make(map[string]interface{}) - d := make(map[string]interface{}) - d["kms_master_key_id"] = aws.StringValue(v.ApplyServerSideEncryptionByDefault.KMSMasterKeyID) - d["sse_algorithm"] = aws.StringValue(v.ApplyServerSideEncryptionByDefault.SSEAlgorithm) - r["apply_server_side_encryption_by_default"] = []map[string]interface{}{d} - rules = append(rules, r) - } - } - encryptionConfiguration = append(encryptionConfiguration, map[string]interface{}{ - "rule": rules, - }) - return encryptionConfiguration -} - -func flattenAwsS3BucketReplicationConfiguration(r *s3.ReplicationConfiguration) []map[string]interface{} { - replication_configuration := make([]map[string]interface{}, 0, 1) - - if r == nil { - return replication_configuration - } - - m := make(map[string]interface{}) - - if r.Role != nil && *r.Role != "" { - m["role"] = *r.Role - } - - rules := make([]interface{}, 0, len(r.Rules)) - for _, v := range r.Rules { - t := make(map[string]interface{}) - if v.Destination != nil { - rd := make(map[string]interface{}) - if v.Destination.Bucket != nil { - rd["bucket"] = *v.Destination.Bucket - } - if v.Destination.StorageClass != nil { - rd["storage_class"] = *v.Destination.StorageClass - } - if v.Destination.EncryptionConfiguration != nil { - if v.Destination.EncryptionConfiguration.ReplicaKmsKeyID != nil { - rd["replica_kms_key_id"] = *v.Destination.EncryptionConfiguration.ReplicaKmsKeyID - } - } - if v.Destination.Account != nil { - rd["account_id"] = *v.Destination.Account - } - if v.Destination.AccessControlTranslation != nil { - rdt := map[string]interface{}{ - "owner": aws.StringValue(v.Destination.AccessControlTranslation.Owner), - } - rd["access_control_translation"] = []interface{}{rdt} - } - t["destination"] = schema.NewSet(destinationHash, []interface{}{rd}) - } - - if v.ID != nil { - t["id"] = *v.ID - } - if v.Prefix != nil { - t["prefix"] = *v.Prefix - } - if v.Status != nil { - t["status"] = *v.Status - } - if vssc := v.SourceSelectionCriteria; vssc != nil { - tssc := make(map[string]interface{}) - if vssc.SseKmsEncryptedObjects != nil { - tSseKms := make(map[string]interface{}) - if *vssc.SseKmsEncryptedObjects.Status == s3.SseKmsEncryptedObjectsStatusEnabled { - tSseKms["enabled"] = true - } else if *vssc.SseKmsEncryptedObjects.Status == s3.SseKmsEncryptedObjectsStatusDisabled { - tSseKms["enabled"] = false - } - tssc["sse_kms_encrypted_objects"] = schema.NewSet(sourceSseKmsObjectsHash, []interface{}{tSseKms}) - } - t["source_selection_criteria"] = schema.NewSet(sourceSelectionCriteriaHash, []interface{}{tssc}) - } - - if v.Priority != nil { - t["priority"] = int(aws.Int64Value(v.Priority)) - } - - if f := v.Filter; f != nil { - m := map[string]interface{}{} - if f.Prefix != nil { - m["prefix"] = aws.StringValue(f.Prefix) - } - if t := f.Tag; t != nil { - m["tags"] = tagsMapToRaw(tagsToMapS3([]*s3.Tag{t})) - } - if a := f.And; a != nil { - m["prefix"] = aws.StringValue(a.Prefix) - m["tags"] = tagsMapToRaw(tagsToMapS3(a.Tags)) - } - t["filter"] = []interface{}{m} - } - - rules = append(rules, t) - } - m["rules"] = schema.NewSet(rulesHash, rules) - - replication_configuration = append(replication_configuration, m) - - return replication_configuration -} - -func normalizeRoutingRules(w []*s3.RoutingRule) (string, error) { - withNulls, err := json.Marshal(w) - if err != nil { - return "", err - } - - var rules []map[string]interface{} - if err := json.Unmarshal(withNulls, &rules); err != nil { - return "", err - } - - var cleanRules []map[string]interface{} - for _, rule := range rules { - cleanRules = append(cleanRules, removeNil(rule)) - } - - withoutNulls, err := json.Marshal(cleanRules) - if err != nil { - return "", err - } - - return string(withoutNulls), nil -} - -func removeNil(data map[string]interface{}) map[string]interface{} { - withoutNil := make(map[string]interface{}) - - for k, v := range data { - if v == nil { - continue - } - - switch v.(type) { - case map[string]interface{}: - withoutNil[k] = removeNil(v.(map[string]interface{})) - default: - withoutNil[k] = v - } - } - - return withoutNil -} - -func normalizeRegion(region string) string { - // Default to us-east-1 if the bucket doesn't have a region: - // http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html - if region == "" { - region = "us-east-1" - } - - return region -} - -// validateS3BucketName validates any S3 bucket name that is not inside the us-east-1 region. -// Buckets outside of this region have to be DNS-compliant. After the same restrictions are -// applied to buckets in the us-east-1 region, this function can be refactored as a SchemaValidateFunc -func validateS3BucketName(value string, region string) error { - if region != "us-east-1" { - if (len(value) < 3) || (len(value) > 63) { - return fmt.Errorf("%q must contain from 3 to 63 characters", value) - } - if !regexp.MustCompile(`^[0-9a-z-.]+$`).MatchString(value) { - return fmt.Errorf("only lowercase alphanumeric characters and hyphens allowed in %q", value) - } - if regexp.MustCompile(`^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$`).MatchString(value) { - return fmt.Errorf("%q must not be formatted as an IP address", value) - } - if strings.HasPrefix(value, `.`) { - return fmt.Errorf("%q cannot start with a period", value) - } - if strings.HasSuffix(value, `.`) { - return fmt.Errorf("%q cannot end with a period", value) - } - if strings.Contains(value, `..`) { - return fmt.Errorf("%q can be only one period between labels", value) - } - } else { - if len(value) > 255 { - return fmt.Errorf("%q must contain less than 256 characters", value) - } - if !regexp.MustCompile(`^[0-9a-zA-Z-._]+$`).MatchString(value) { - return fmt.Errorf("only alphanumeric characters, hyphens, periods, and underscores allowed in %q", value) - } - } - return nil -} - -func expirationHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - if v, ok := m["date"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["days"]; ok { - buf.WriteString(fmt.Sprintf("%d-", v.(int))) - } - if v, ok := m["expired_object_delete_marker"]; ok { - buf.WriteString(fmt.Sprintf("%t-", v.(bool))) - } - return hashcode.String(buf.String()) -} - -func transitionHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - if v, ok := m["date"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["days"]; ok { - buf.WriteString(fmt.Sprintf("%d-", v.(int))) - } - if v, ok := m["storage_class"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - return hashcode.String(buf.String()) -} - -func rulesHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - if v, ok := m["id"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["prefix"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["status"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["destination"].(*schema.Set); ok && v.Len() > 0 { - buf.WriteString(fmt.Sprintf("%d-", destinationHash(v.List()[0]))) - } - if v, ok := m["source_selection_criteria"].(*schema.Set); ok && v.Len() > 0 && v.List()[0] != nil { - buf.WriteString(fmt.Sprintf("%d-", sourceSelectionCriteriaHash(v.List()[0]))) - } - if v, ok := m["priority"]; ok { - buf.WriteString(fmt.Sprintf("%d-", v.(int))) - } - if v, ok := m["filter"].([]interface{}); ok && len(v) > 0 && v[0] != nil { - buf.WriteString(fmt.Sprintf("%d-", replicationRuleFilterHash(v[0]))) - } - return hashcode.String(buf.String()) -} - -func replicationRuleFilterHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - if v, ok := m["prefix"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["tags"]; ok { - buf.WriteString(fmt.Sprintf("%d-", tagsMapToHash(v.(map[string]interface{})))) - } - return hashcode.String(buf.String()) -} - -func destinationHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - if v, ok := m["bucket"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["storage_class"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["replica_kms_key_id"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["account"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["access_control_translation"].([]interface{}); ok && len(v) > 0 && v[0] != nil { - buf.WriteString(fmt.Sprintf("%d-", accessControlTranslationHash(v[0]))) - } - return hashcode.String(buf.String()) -} - -func accessControlTranslationHash(v interface{}) int { - // v is nil if empty access_control_translation is given. - if v == nil { - return 0 - } - var buf bytes.Buffer - m := v.(map[string]interface{}) - - if v, ok := m["owner"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - return hashcode.String(buf.String()) -} - -func sourceSelectionCriteriaHash(v interface{}) int { - // v is nil if empty source_selection_criteria is given. - if v == nil { - return 0 - } - var buf bytes.Buffer - m := v.(map[string]interface{}) - - if v, ok := m["sse_kms_encrypted_objects"].(*schema.Set); ok && v.Len() > 0 { - buf.WriteString(fmt.Sprintf("%d-", sourceSseKmsObjectsHash(v.List()[0]))) - } - return hashcode.String(buf.String()) -} - -func sourceSseKmsObjectsHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - if v, ok := m["enabled"]; ok { - buf.WriteString(fmt.Sprintf("%t-", v.(bool))) - } - return hashcode.String(buf.String()) -} - -type S3Website struct { - Endpoint, Domain string -} - -// -// S3 Object Lock functions. -// - -func readS3ObjectLockConfiguration(conn *s3.S3, bucket string) (interface{}, error) { - resp, err := retryOnAwsCode(s3.ErrCodeNoSuchBucket, func() (interface{}, error) { - return conn.GetObjectLockConfiguration(&s3.GetObjectLockConfigurationInput{ - Bucket: aws.String(bucket), - }) - }) - if err != nil { - if isAWSErr(err, "ObjectLockConfigurationNotFoundError", "") { - return nil, nil - } - return nil, err - } - - return flattenS3ObjectLockConfiguration(resp.(*s3.GetObjectLockConfigurationOutput).ObjectLockConfiguration), nil -} - -func expandS3ObjectLockConfiguration(vConf []interface{}) *s3.ObjectLockConfiguration { - if len(vConf) == 0 || vConf[0] == nil { - return nil - } - - mConf := vConf[0].(map[string]interface{}) - - conf := &s3.ObjectLockConfiguration{} - - if vObjectLockEnabled, ok := mConf["object_lock_enabled"].(string); ok && vObjectLockEnabled != "" { - conf.ObjectLockEnabled = aws.String(vObjectLockEnabled) - } - - if vRule, ok := mConf["rule"].([]interface{}); ok && len(vRule) > 0 { - mRule := vRule[0].(map[string]interface{}) - - if vDefaultRetention, ok := mRule["default_retention"].([]interface{}); ok && len(vDefaultRetention) > 0 && vDefaultRetention[0] != nil { - mDefaultRetention := vDefaultRetention[0].(map[string]interface{}) - - conf.Rule = &s3.ObjectLockRule{ - DefaultRetention: &s3.DefaultRetention{}, - } - - if vMode, ok := mDefaultRetention["mode"].(string); ok && vMode != "" { - conf.Rule.DefaultRetention.Mode = aws.String(vMode) - } - if vDays, ok := mDefaultRetention["days"].(int); ok && vDays > 0 { - conf.Rule.DefaultRetention.Days = aws.Int64(int64(vDays)) - } - if vYears, ok := mDefaultRetention["years"].(int); ok && vYears > 0 { - conf.Rule.DefaultRetention.Years = aws.Int64(int64(vYears)) - } - } - } - - return conf -} - -func flattenS3ObjectLockConfiguration(conf *s3.ObjectLockConfiguration) []interface{} { - if conf == nil { - return []interface{}{} - } - - mConf := map[string]interface{}{ - "object_lock_enabled": aws.StringValue(conf.ObjectLockEnabled), - } - - if conf.Rule != nil && conf.Rule.DefaultRetention != nil { - mRule := map[string]interface{}{ - "default_retention": []interface{}{ - map[string]interface{}{ - "mode": aws.StringValue(conf.Rule.DefaultRetention.Mode), - "days": int(aws.Int64Value(conf.Rule.DefaultRetention.Days)), - "years": int(aws.Int64Value(conf.Rule.DefaultRetention.Years)), - }, - }, - } - - mConf["rule"] = []interface{}{mRule} - } - - return []interface{}{mConf} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go deleted file mode 100644 index b00d23c0e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go +++ /dev/null @@ -1,467 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsS3BucketInventory() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsS3BucketInventoryPut, - Read: resourceAwsS3BucketInventoryRead, - Update: resourceAwsS3BucketInventoryPut, - Delete: resourceAwsS3BucketInventoryDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 64), - }, - "enabled": { - Type: schema.TypeBool, - Default: true, - Optional: true, - }, - "filter": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "prefix": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "destination": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - MinItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - MinItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "format": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - s3.InventoryFormatCsv, - s3.InventoryFormatOrc, - s3.InventoryFormatParquet, - }, false), - }, - "bucket_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "account_id": { - Type: schema.TypeString, - Optional: true, - }, - "prefix": { - Type: schema.TypeString, - Optional: true, - }, - "encryption": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "sse_kms": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{"destination.0.bucket.0.encryption.0.sse_s3"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key_id": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - }, - }, - }, - "sse_s3": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ConflictsWith: []string{"destination.0.bucket.0.encryption.0.sse_kms"}, - Elem: &schema.Resource{ - // No options currently; just existence of "sse_s3". - Schema: map[string]*schema.Schema{}, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - "schedule": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - MinItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "frequency": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - s3.InventoryFrequencyDaily, - s3.InventoryFrequencyWeekly, - }, false), - }, - }, - }, - }, - // TODO: Is there a sensible default for this? - "included_object_versions": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - s3.InventoryIncludedObjectVersionsCurrent, - s3.InventoryIncludedObjectVersionsAll, - }, false), - }, - "optional_fields": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - s3.InventoryOptionalFieldSize, - s3.InventoryOptionalFieldLastModifiedDate, - s3.InventoryOptionalFieldStorageClass, - s3.InventoryOptionalFieldEtag, - s3.InventoryOptionalFieldIsMultipartUploaded, - s3.InventoryOptionalFieldReplicationStatus, - s3.InventoryOptionalFieldEncryptionStatus, - }, false), - }, - Set: schema.HashString, - }, - }, - } -} - -func resourceAwsS3BucketInventoryPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).s3conn - bucket := d.Get("bucket").(string) - name := d.Get("name").(string) - - inventoryConfiguration := &s3.InventoryConfiguration{ - Id: aws.String(name), - IsEnabled: aws.Bool(d.Get("enabled").(bool)), - } - - if v, ok := d.GetOk("included_object_versions"); ok { - inventoryConfiguration.IncludedObjectVersions = aws.String(v.(string)) - } - - if v, ok := d.GetOk("optional_fields"); ok { - inventoryConfiguration.OptionalFields = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("schedule"); ok { - scheduleList := v.([]interface{}) - scheduleMap := scheduleList[0].(map[string]interface{}) - inventoryConfiguration.Schedule = &s3.InventorySchedule{ - Frequency: aws.String(scheduleMap["frequency"].(string)), - } - } - - if v, ok := d.GetOk("filter"); ok { - filterList := v.([]interface{}) - filterMap := filterList[0].(map[string]interface{}) - inventoryConfiguration.Filter = expandS3InventoryFilter(filterMap) - } - - if v, ok := d.GetOk("destination"); ok { - destinationList := v.([]interface{}) - destinationMap := destinationList[0].(map[string]interface{}) - bucketList := destinationMap["bucket"].([]interface{}) - bucketMap := bucketList[0].(map[string]interface{}) - - inventoryConfiguration.Destination = &s3.InventoryDestination{ - S3BucketDestination: expandS3InventoryS3BucketDestination(bucketMap), - } - } - - input := &s3.PutBucketInventoryConfigurationInput{ - Bucket: aws.String(bucket), - Id: aws.String(name), - InventoryConfiguration: inventoryConfiguration, - } - - log.Printf("[DEBUG] Putting S3 bucket inventory configuration: %s", input) - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.PutBucketInventoryConfiguration(input) - if err != nil { - if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error putting S3 bucket inventory configuration: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%s", bucket, name)) - - return resourceAwsS3BucketInventoryRead(d, meta) -} - -func resourceAwsS3BucketInventoryDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).s3conn - - bucket, name, err := resourceAwsS3BucketInventoryParseID(d.Id()) - if err != nil { - return err - } - - input := &s3.DeleteBucketInventoryConfigurationInput{ - Bucket: aws.String(bucket), - Id: aws.String(name), - } - - log.Printf("[DEBUG] Deleting S3 bucket inventory configuration: %s", input) - _, err = conn.DeleteBucketInventoryConfiguration(input) - if err != nil { - if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { - return nil - } - return fmt.Errorf("Error deleting S3 bucket inventory configuration: %s", err) - } - - return nil -} - -func resourceAwsS3BucketInventoryRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).s3conn - - bucket, name, err := resourceAwsS3BucketInventoryParseID(d.Id()) - if err != nil { - return err - } - - d.Set("bucket", bucket) - d.Set("name", name) - - input := &s3.GetBucketInventoryConfigurationInput{ - Bucket: aws.String(bucket), - Id: aws.String(name), - } - - log.Printf("[DEBUG] Reading S3 bucket inventory configuration: %s", input) - var output *s3.GetBucketInventoryConfigurationOutput - err = resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - output, err = conn.GetBucketInventoryConfiguration(input) - if err != nil { - if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { - if d.IsNewResource() { - return resource.RetryableError(err) - } - return nil - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error getting S3 Bucket Inventory (%s): %s", d.Id(), err) - } - - if output == nil || output.InventoryConfiguration == nil { - log.Printf("[WARN] %s S3 bucket inventory configuration not found, removing from state.", d.Id()) - d.SetId("") - return nil - } - - d.Set("enabled", aws.BoolValue(output.InventoryConfiguration.IsEnabled)) - d.Set("included_object_versions", aws.StringValue(output.InventoryConfiguration.IncludedObjectVersions)) - - if err := d.Set("optional_fields", flattenStringList(output.InventoryConfiguration.OptionalFields)); err != nil { - return fmt.Errorf("error setting optional_fields: %s", err) - } - - if err := d.Set("filter", flattenS3InventoryFilter(output.InventoryConfiguration.Filter)); err != nil { - return fmt.Errorf("error setting filter: %s", err) - } - - if err := d.Set("schedule", flattenS3InventorySchedule(output.InventoryConfiguration.Schedule)); err != nil { - return fmt.Errorf("error setting schedule: %s", err) - } - - if output.InventoryConfiguration.Destination != nil { - destination := map[string]interface{}{ - "bucket": flattenS3InventoryS3BucketDestination(output.InventoryConfiguration.Destination.S3BucketDestination), - } - - if err := d.Set("destination", []map[string]interface{}{destination}); err != nil { - return fmt.Errorf("error setting destination: %s", err) - } - } - - return nil -} - -func expandS3InventoryFilter(m map[string]interface{}) *s3.InventoryFilter { - v, ok := m["prefix"] - if !ok { - return nil - } - return &s3.InventoryFilter{ - Prefix: aws.String(v.(string)), - } -} - -func flattenS3InventoryFilter(filter *s3.InventoryFilter) []map[string]interface{} { - if filter == nil { - return nil - } - - result := make([]map[string]interface{}, 0, 1) - - m := make(map[string]interface{}) - if filter.Prefix != nil { - m["prefix"] = aws.StringValue(filter.Prefix) - } - - result = append(result, m) - - return result -} - -func flattenS3InventorySchedule(schedule *s3.InventorySchedule) []map[string]interface{} { - result := make([]map[string]interface{}, 0, 1) - - m := make(map[string]interface{}, 1) - m["frequency"] = aws.StringValue(schedule.Frequency) - - result = append(result, m) - - return result -} - -func expandS3InventoryS3BucketDestination(m map[string]interface{}) *s3.InventoryS3BucketDestination { - destination := &s3.InventoryS3BucketDestination{ - Format: aws.String(m["format"].(string)), - Bucket: aws.String(m["bucket_arn"].(string)), - } - - if v, ok := m["account_id"]; ok && v.(string) != "" { - destination.AccountId = aws.String(v.(string)) - } - - if v, ok := m["prefix"]; ok && v.(string) != "" { - destination.Prefix = aws.String(v.(string)) - } - - if v, ok := m["encryption"].([]interface{}); ok && len(v) > 0 { - encryptionMap := v[0].(map[string]interface{}) - - encryption := &s3.InventoryEncryption{} - - for k, v := range encryptionMap { - data := v.([]interface{}) - - if len(data) == 0 { - continue - } - - switch k { - case "sse_kms": - m := data[0].(map[string]interface{}) - encryption.SSEKMS = &s3.SSEKMS{ - KeyId: aws.String(m["key_id"].(string)), - } - case "sse_s3": - encryption.SSES3 = &s3.SSES3{} - } - } - - destination.Encryption = encryption - } - - return destination -} - -func flattenS3InventoryS3BucketDestination(destination *s3.InventoryS3BucketDestination) []map[string]interface{} { - result := make([]map[string]interface{}, 0, 1) - - m := map[string]interface{}{ - "format": aws.StringValue(destination.Format), - "bucket_arn": aws.StringValue(destination.Bucket), - } - - if destination.AccountId != nil { - m["account_id"] = aws.StringValue(destination.AccountId) - } - if destination.Prefix != nil { - m["prefix"] = aws.StringValue(destination.Prefix) - } - - if destination.Encryption != nil { - encryption := make(map[string]interface{}, 1) - if destination.Encryption.SSES3 != nil { - encryption["sse_s3"] = []map[string]interface{}{{}} - } else if destination.Encryption.SSEKMS != nil { - encryption["sse_kms"] = []map[string]interface{}{ - { - "key_id": aws.StringValue(destination.Encryption.SSEKMS.KeyId), - }, - } - } - m["encryption"] = []map[string]interface{}{encryption} - } - - result = append(result, m) - - return result -} - -func resourceAwsS3BucketInventoryParseID(id string) (string, string, error) { - idParts := strings.Split(id, ":") - if len(idParts) != 2 { - return "", "", fmt.Errorf("please make sure the ID is in the form BUCKET:NAME (i.e. my-bucket:EntireBucket") - } - bucket := idParts[0] - name := idParts[1] - return bucket, name, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_metric.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_metric.go deleted file mode 100644 index c67f56b74..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_metric.go +++ /dev/null @@ -1,215 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsS3BucketMetric() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsS3BucketMetricPut, - Read: resourceAwsS3BucketMetricRead, - Update: resourceAwsS3BucketMetricPut, - Delete: resourceAwsS3BucketMetricDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "filter": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "prefix": { - Type: schema.TypeString, - Optional: true, - }, - "tags": tagsSchema(), - }, - }, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsS3BucketMetricPut(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).s3conn - bucket := d.Get("bucket").(string) - name := d.Get("name").(string) - - metricsConfiguration := &s3.MetricsConfiguration{ - Id: aws.String(name), - } - - if v, ok := d.GetOk("filter"); ok { - filterList := v.([]interface{}) - filterMap := filterList[0].(map[string]interface{}) - metricsConfiguration.Filter = expandS3MetricsFilter(filterMap) - } - - input := &s3.PutBucketMetricsConfigurationInput{ - Bucket: aws.String(bucket), - Id: aws.String(name), - MetricsConfiguration: metricsConfiguration, - } - - log.Printf("[DEBUG] Putting metric configuration: %s", input) - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.PutBucketMetricsConfiguration(input) - if err != nil { - if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error putting S3 metric configuration: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%s", bucket, name)) - - return resourceAwsS3BucketMetricRead(d, meta) -} - -func resourceAwsS3BucketMetricDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).s3conn - - bucket, name, err := resourceAwsS3BucketMetricParseID(d.Id()) - if err != nil { - return err - } - - input := &s3.DeleteBucketMetricsConfigurationInput{ - Bucket: aws.String(bucket), - Id: aws.String(name), - } - - log.Printf("[DEBUG] Deleting S3 bucket metric configuration: %s", input) - _, err = conn.DeleteBucketMetricsConfiguration(input) - if err != nil { - if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { - return nil - } - return fmt.Errorf("Error deleting S3 metric configuration: %s", err) - } - - return nil -} - -func resourceAwsS3BucketMetricRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).s3conn - - bucket, name, err := resourceAwsS3BucketMetricParseID(d.Id()) - if err != nil { - return err - } - - d.Set("bucket", bucket) - d.Set("name", name) - - input := &s3.GetBucketMetricsConfigurationInput{ - Bucket: aws.String(bucket), - Id: aws.String(name), - } - - log.Printf("[DEBUG] Reading S3 bucket metrics configuration: %s", input) - output, err := conn.GetBucketMetricsConfiguration(input) - if err != nil { - if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { - log.Printf("[WARN] %s S3 bucket metrics configuration not found, removing from state.", d.Id()) - d.SetId("") - return nil - } - return err - } - - if output.MetricsConfiguration.Filter != nil { - if err := d.Set("filter", []interface{}{flattenS3MetricsFilter(output.MetricsConfiguration.Filter)}); err != nil { - return err - } - } - - return nil -} - -func expandS3MetricsFilter(m map[string]interface{}) *s3.MetricsFilter { - var prefix string - if v, ok := m["prefix"]; ok { - prefix = v.(string) - } - - var tags []*s3.Tag - if v, ok := m["tags"]; ok { - tags = tagsFromMapS3(v.(map[string]interface{})) - } - - metricsFilter := &s3.MetricsFilter{} - if prefix != "" && len(tags) > 0 { - metricsFilter.And = &s3.MetricsAndOperator{ - Prefix: aws.String(prefix), - Tags: tags, - } - } else if len(tags) > 1 { - metricsFilter.And = &s3.MetricsAndOperator{ - Tags: tags, - } - } else if len(tags) == 1 { - metricsFilter.Tag = tags[0] - } else { - metricsFilter.Prefix = aws.String(prefix) - } - return metricsFilter -} - -func flattenS3MetricsFilter(metricsFilter *s3.MetricsFilter) map[string]interface{} { - m := make(map[string]interface{}) - - if metricsFilter.And != nil { - and := *metricsFilter.And - if and.Prefix != nil { - m["prefix"] = *and.Prefix - } - if and.Tags != nil { - m["tags"] = tagsToMapS3(and.Tags) - } - } else if metricsFilter.Prefix != nil { - m["prefix"] = *metricsFilter.Prefix - } else if metricsFilter.Tag != nil { - tags := []*s3.Tag{ - metricsFilter.Tag, - } - m["tags"] = tagsToMapS3(tags) - } - return m -} - -func resourceAwsS3BucketMetricParseID(id string) (string, string, error) { - idParts := strings.Split(id, ":") - if len(idParts) != 2 { - return "", "", fmt.Errorf("please make sure the ID is in the form BUCKET:NAME (i.e. my-bucket:EntireBucket") - } - bucket := idParts[0] - name := idParts[1] - return bucket, name, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_notification.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_notification.go deleted file mode 100644 index 4e313b6e8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_notification.go +++ /dev/null @@ -1,468 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/s3" -) - -func resourceAwsS3BucketNotification() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsS3BucketNotificationPut, - Read: resourceAwsS3BucketNotificationRead, - Update: resourceAwsS3BucketNotificationPut, - Delete: resourceAwsS3BucketNotificationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "topic": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "filter_prefix": { - Type: schema.TypeString, - Optional: true, - }, - "filter_suffix": { - Type: schema.TypeString, - Optional: true, - }, - "topic_arn": { - Type: schema.TypeString, - Required: true, - }, - "events": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - }, - }, - - "queue": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "filter_prefix": { - Type: schema.TypeString, - Optional: true, - }, - "filter_suffix": { - Type: schema.TypeString, - Optional: true, - }, - "queue_arn": { - Type: schema.TypeString, - Required: true, - }, - "events": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - }, - }, - - "lambda_function": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "filter_prefix": { - Type: schema.TypeString, - Optional: true, - }, - "filter_suffix": { - Type: schema.TypeString, - Optional: true, - }, - "lambda_function_arn": { - Type: schema.TypeString, - Optional: true, - }, - "events": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - }, - }, - }, - } -} - -func resourceAwsS3BucketNotificationPut(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - bucket := d.Get("bucket").(string) - - // TopicNotifications - topicNotifications := d.Get("topic").([]interface{}) - topicConfigs := make([]*s3.TopicConfiguration, 0, len(topicNotifications)) - for i, c := range topicNotifications { - tc := &s3.TopicConfiguration{} - - c := c.(map[string]interface{}) - - // Id - if val, ok := c["id"].(string); ok && val != "" { - tc.Id = aws.String(val) - } else { - tc.Id = aws.String(resource.PrefixedUniqueId("tf-s3-topic-")) - } - - // TopicArn - if val, ok := c["topic_arn"].(string); ok { - tc.TopicArn = aws.String(val) - } - - // Events - events := d.Get(fmt.Sprintf("topic.%d.events", i)).(*schema.Set).List() - tc.Events = make([]*string, 0, len(events)) - for _, e := range events { - tc.Events = append(tc.Events, aws.String(e.(string))) - } - - // Filter - filterRules := make([]*s3.FilterRule, 0, 2) - if val, ok := c["filter_prefix"].(string); ok && val != "" { - filterRule := &s3.FilterRule{ - Name: aws.String("prefix"), - Value: aws.String(val), - } - filterRules = append(filterRules, filterRule) - } - if val, ok := c["filter_suffix"].(string); ok && val != "" { - filterRule := &s3.FilterRule{ - Name: aws.String("suffix"), - Value: aws.String(val), - } - filterRules = append(filterRules, filterRule) - } - if len(filterRules) > 0 { - tc.Filter = &s3.NotificationConfigurationFilter{ - Key: &s3.KeyFilter{ - FilterRules: filterRules, - }, - } - } - topicConfigs = append(topicConfigs, tc) - } - - // SQS - queueNotifications := d.Get("queue").([]interface{}) - queueConfigs := make([]*s3.QueueConfiguration, 0, len(queueNotifications)) - for i, c := range queueNotifications { - qc := &s3.QueueConfiguration{} - - c := c.(map[string]interface{}) - - // Id - if val, ok := c["id"].(string); ok && val != "" { - qc.Id = aws.String(val) - } else { - qc.Id = aws.String(resource.PrefixedUniqueId("tf-s3-queue-")) - } - - // QueueArn - if val, ok := c["queue_arn"].(string); ok { - qc.QueueArn = aws.String(val) - } - - // Events - events := d.Get(fmt.Sprintf("queue.%d.events", i)).(*schema.Set).List() - qc.Events = make([]*string, 0, len(events)) - for _, e := range events { - qc.Events = append(qc.Events, aws.String(e.(string))) - } - - // Filter - filterRules := make([]*s3.FilterRule, 0, 2) - if val, ok := c["filter_prefix"].(string); ok && val != "" { - filterRule := &s3.FilterRule{ - Name: aws.String("prefix"), - Value: aws.String(val), - } - filterRules = append(filterRules, filterRule) - } - if val, ok := c["filter_suffix"].(string); ok && val != "" { - filterRule := &s3.FilterRule{ - Name: aws.String("suffix"), - Value: aws.String(val), - } - filterRules = append(filterRules, filterRule) - } - if len(filterRules) > 0 { - qc.Filter = &s3.NotificationConfigurationFilter{ - Key: &s3.KeyFilter{ - FilterRules: filterRules, - }, - } - } - queueConfigs = append(queueConfigs, qc) - } - - // Lambda - lambdaFunctionNotifications := d.Get("lambda_function").([]interface{}) - lambdaConfigs := make([]*s3.LambdaFunctionConfiguration, 0, len(lambdaFunctionNotifications)) - for i, c := range lambdaFunctionNotifications { - lc := &s3.LambdaFunctionConfiguration{} - - c := c.(map[string]interface{}) - - // Id - if val, ok := c["id"].(string); ok && val != "" { - lc.Id = aws.String(val) - } else { - lc.Id = aws.String(resource.PrefixedUniqueId("tf-s3-lambda-")) - } - - // LambdaFunctionArn - if val, ok := c["lambda_function_arn"].(string); ok { - lc.LambdaFunctionArn = aws.String(val) - } - - // Events - events := d.Get(fmt.Sprintf("lambda_function.%d.events", i)).(*schema.Set).List() - lc.Events = make([]*string, 0, len(events)) - for _, e := range events { - lc.Events = append(lc.Events, aws.String(e.(string))) - } - - // Filter - filterRules := make([]*s3.FilterRule, 0, 2) - if val, ok := c["filter_prefix"].(string); ok && val != "" { - filterRule := &s3.FilterRule{ - Name: aws.String("prefix"), - Value: aws.String(val), - } - filterRules = append(filterRules, filterRule) - } - if val, ok := c["filter_suffix"].(string); ok && val != "" { - filterRule := &s3.FilterRule{ - Name: aws.String("suffix"), - Value: aws.String(val), - } - filterRules = append(filterRules, filterRule) - } - if len(filterRules) > 0 { - lc.Filter = &s3.NotificationConfigurationFilter{ - Key: &s3.KeyFilter{ - FilterRules: filterRules, - }, - } - } - lambdaConfigs = append(lambdaConfigs, lc) - } - - notificationConfiguration := &s3.NotificationConfiguration{} - if len(lambdaConfigs) > 0 { - notificationConfiguration.LambdaFunctionConfigurations = lambdaConfigs - } - if len(queueConfigs) > 0 { - notificationConfiguration.QueueConfigurations = queueConfigs - } - if len(topicConfigs) > 0 { - notificationConfiguration.TopicConfigurations = topicConfigs - } - i := &s3.PutBucketNotificationConfigurationInput{ - Bucket: aws.String(bucket), - NotificationConfiguration: notificationConfiguration, - } - - log.Printf("[DEBUG] S3 bucket: %s, Putting notification: %v", bucket, i) - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - if _, err := s3conn.PutBucketNotificationConfiguration(i); err != nil { - if awserr, ok := err.(awserr.Error); ok { - switch awserr.Message() { - case "Unable to validate the following destination configurations": - return resource.RetryableError(awserr) - } - } - // Didn't recognize the error, so shouldn't retry. - return resource.NonRetryableError(err) - } - // Successful put configuration - return nil - }) - if err != nil { - return fmt.Errorf("Error putting S3 notification configuration: %s", err) - } - - d.SetId(bucket) - - return resourceAwsS3BucketNotificationRead(d, meta) -} - -func resourceAwsS3BucketNotificationDelete(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - - i := &s3.PutBucketNotificationConfigurationInput{ - Bucket: aws.String(d.Id()), - NotificationConfiguration: &s3.NotificationConfiguration{}, - } - - log.Printf("[DEBUG] S3 bucket: %s, Deleting notification: %v", d.Id(), i) - _, err := s3conn.PutBucketNotificationConfiguration(i) - if err != nil { - return fmt.Errorf("Error deleting S3 notification configuration: %s", err) - } - - return nil -} - -func resourceAwsS3BucketNotificationRead(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - - var err error - _, err = s3conn.HeadBucket(&s3.HeadBucketInput{ - Bucket: aws.String(d.Id()), - }) - if err != nil { - if awsError, ok := err.(awserr.RequestFailure); ok && awsError.StatusCode() == 404 { - log.Printf("[WARN] S3 Bucket (%s) not found, error code (404)", d.Id()) - d.SetId("") - return nil - } else { - // some of the AWS SDK's errors can be empty strings, so let's add - // some additional context. - return fmt.Errorf("error reading S3 bucket \"%s\": %s", d.Id(), err) - } - } - - // Read the notification configuration - notificationConfigs, err := s3conn.GetBucketNotificationConfiguration(&s3.GetBucketNotificationConfigurationRequest{ - Bucket: aws.String(d.Id()), - }) - if err != nil { - return err - } - log.Printf("[DEBUG] S3 Bucket: %s, get notification: %v", d.Id(), notificationConfigs) - - d.Set("bucket", d.Id()) - - // Topic Notification - if err := d.Set("topic", flattenTopicConfigurations(notificationConfigs.TopicConfigurations)); err != nil { - return fmt.Errorf("error reading S3 bucket \"%s\" topic notification: %s", d.Id(), err) - } - - // SQS Notification - if err := d.Set("queue", flattenQueueConfigurations(notificationConfigs.QueueConfigurations)); err != nil { - return fmt.Errorf("error reading S3 bucket \"%s\" queue notification: %s", d.Id(), err) - } - - // Lambda Notification - if err := d.Set("lambda_function", flattenLambdaFunctionConfigurations(notificationConfigs.LambdaFunctionConfigurations)); err != nil { - return fmt.Errorf("error reading S3 bucket \"%s\" lambda function notification: %s", d.Id(), err) - } - - return nil -} - -func flattenNotificationConfigurationFilter(filter *s3.NotificationConfigurationFilter) map[string]interface{} { - filterRules := map[string]interface{}{} - for _, f := range filter.Key.FilterRules { - if strings.ToLower(*f.Name) == s3.FilterRuleNamePrefix { - filterRules["filter_prefix"] = *f.Value - } - if strings.ToLower(*f.Name) == s3.FilterRuleNameSuffix { - filterRules["filter_suffix"] = *f.Value - } - } - return filterRules -} - -func flattenTopicConfigurations(configs []*s3.TopicConfiguration) []map[string]interface{} { - topicNotifications := make([]map[string]interface{}, 0, len(configs)) - for _, notification := range configs { - var conf map[string]interface{} - if filter := notification.Filter; filter != nil { - conf = flattenNotificationConfigurationFilter(filter) - } else { - conf = map[string]interface{}{} - } - - conf["id"] = *notification.Id - conf["events"] = schema.NewSet(schema.HashString, flattenStringList(notification.Events)) - conf["topic_arn"] = *notification.TopicArn - topicNotifications = append(topicNotifications, conf) - } - - return topicNotifications -} - -func flattenQueueConfigurations(configs []*s3.QueueConfiguration) []map[string]interface{} { - queueNotifications := make([]map[string]interface{}, 0, len(configs)) - for _, notification := range configs { - var conf map[string]interface{} - if filter := notification.Filter; filter != nil { - conf = flattenNotificationConfigurationFilter(filter) - } else { - conf = map[string]interface{}{} - } - - conf["id"] = *notification.Id - conf["events"] = schema.NewSet(schema.HashString, flattenStringList(notification.Events)) - conf["queue_arn"] = *notification.QueueArn - queueNotifications = append(queueNotifications, conf) - } - - return queueNotifications -} - -func flattenLambdaFunctionConfigurations(configs []*s3.LambdaFunctionConfiguration) []map[string]interface{} { - lambdaFunctionNotifications := make([]map[string]interface{}, 0, len(configs)) - for _, notification := range configs { - var conf map[string]interface{} - if filter := notification.Filter; filter != nil { - conf = flattenNotificationConfigurationFilter(filter) - } else { - conf = map[string]interface{}{} - } - - conf["id"] = *notification.Id - conf["events"] = schema.NewSet(schema.HashString, flattenStringList(notification.Events)) - conf["lambda_function_arn"] = *notification.LambdaFunctionArn - lambdaFunctionNotifications = append(lambdaFunctionNotifications, conf) - } - - return lambdaFunctionNotifications -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go deleted file mode 100644 index 8bba0078f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go +++ /dev/null @@ -1,438 +0,0 @@ -package aws - -import ( - "bytes" - "encoding/base64" - "fmt" - "io" - "log" - "net/url" - "os" - "strings" - - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - "github.com/mitchellh/go-homedir" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/kms" - "github.com/aws/aws-sdk-go/service/s3" -) - -func resourceAwsS3BucketObject() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsS3BucketObjectCreate, - Read: resourceAwsS3BucketObjectRead, - Update: resourceAwsS3BucketObjectUpdate, - Delete: resourceAwsS3BucketObjectDelete, - - CustomizeDiff: resourceAwsS3BucketObjectCustomizeDiff, - - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "key": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "acl": { - Type: schema.TypeString, - Default: s3.ObjectCannedACLPrivate, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - s3.ObjectCannedACLPrivate, - s3.ObjectCannedACLPublicRead, - s3.ObjectCannedACLPublicReadWrite, - s3.ObjectCannedACLAuthenticatedRead, - s3.ObjectCannedACLAwsExecRead, - s3.ObjectCannedACLBucketOwnerRead, - s3.ObjectCannedACLBucketOwnerFullControl, - }, false), - }, - - "cache_control": { - Type: schema.TypeString, - Optional: true, - }, - - "content_disposition": { - Type: schema.TypeString, - Optional: true, - }, - - "content_encoding": { - Type: schema.TypeString, - Optional: true, - }, - - "content_language": { - Type: schema.TypeString, - Optional: true, - }, - - "content_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "source": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"content", "content_base64"}, - }, - - "content": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"source", "content_base64"}, - }, - - "content_base64": { - Type: schema.TypeString, - Optional: true, - ConflictsWith: []string{"source", "content"}, - }, - - "storage_class": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - s3.ObjectStorageClassStandard, - s3.ObjectStorageClassReducedRedundancy, - s3.ObjectStorageClassGlacier, - s3.ObjectStorageClassStandardIa, - s3.ObjectStorageClassOnezoneIa, - s3.ObjectStorageClassIntelligentTiering, - }, false), - }, - - "server_side_encryption": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - s3.ServerSideEncryptionAes256, - s3.ServerSideEncryptionAwsKms, - }, false), - Computed: true, - }, - - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - - "etag": { - Type: schema.TypeString, - // This will conflict with SSE-C and SSE-KMS encryption and multi-part upload - // if/when it's actually implemented. The Etag then won't match raw-file MD5. - // See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonResponseHeaders.html - Optional: true, - Computed: true, - ConflictsWith: []string{"kms_key_id", "server_side_encryption"}, - }, - - "version_id": { - Type: schema.TypeString, - Computed: true, - }, - - "tags": tagsSchema(), - - "website_redirect": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsS3BucketObjectPut(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - - restricted := meta.(*AWSClient).IsChinaCloud() - - var body io.ReadSeeker - - if v, ok := d.GetOk("source"); ok { - source := v.(string) - path, err := homedir.Expand(source) - if err != nil { - return fmt.Errorf("Error expanding homedir in source (%s): %s", source, err) - } - file, err := os.Open(path) - if err != nil { - return fmt.Errorf("Error opening S3 bucket object source (%s): %s", path, err) - } - - body = file - defer func() { - err := file.Close() - if err != nil { - log.Printf("[WARN] Error closing S3 bucket object source (%s): %s", path, err) - } - }() - } else if v, ok := d.GetOk("content"); ok { - content := v.(string) - body = bytes.NewReader([]byte(content)) - } else if v, ok := d.GetOk("content_base64"); ok { - content := v.(string) - // We can't do streaming decoding here (with base64.NewDecoder) because - // the AWS SDK requires an io.ReadSeeker but a base64 decoder can't seek. - contentRaw, err := base64.StdEncoding.DecodeString(content) - if err != nil { - return fmt.Errorf("error decoding content_base64: %s", err) - } - body = bytes.NewReader(contentRaw) - } else { - return fmt.Errorf("Must specify \"source\", \"content\", or \"content_base64\" field") - } - - bucket := d.Get("bucket").(string) - key := d.Get("key").(string) - - putInput := &s3.PutObjectInput{ - Bucket: aws.String(bucket), - Key: aws.String(key), - ACL: aws.String(d.Get("acl").(string)), - Body: body, - } - - if v, ok := d.GetOk("storage_class"); ok { - putInput.StorageClass = aws.String(v.(string)) - } - - if v, ok := d.GetOk("cache_control"); ok { - putInput.CacheControl = aws.String(v.(string)) - } - - if v, ok := d.GetOk("content_type"); ok { - putInput.ContentType = aws.String(v.(string)) - } - - if v, ok := d.GetOk("content_encoding"); ok { - putInput.ContentEncoding = aws.String(v.(string)) - } - - if v, ok := d.GetOk("content_language"); ok { - putInput.ContentLanguage = aws.String(v.(string)) - } - - if v, ok := d.GetOk("content_disposition"); ok { - putInput.ContentDisposition = aws.String(v.(string)) - } - - if v, ok := d.GetOk("server_side_encryption"); ok { - putInput.ServerSideEncryption = aws.String(v.(string)) - } - - if v, ok := d.GetOk("kms_key_id"); ok { - putInput.SSEKMSKeyId = aws.String(v.(string)) - putInput.ServerSideEncryption = aws.String(s3.ServerSideEncryptionAwsKms) - } - - if v, ok := d.GetOk("tags"); ok { - if restricted { - return fmt.Errorf("This region does not allow for tags on S3 objects") - } - - // The tag-set must be encoded as URL Query parameters. - values := url.Values{} - for k, v := range v.(map[string]interface{}) { - values.Add(k, v.(string)) - } - putInput.Tagging = aws.String(values.Encode()) - } - - if v, ok := d.GetOk("website_redirect"); ok { - putInput.WebsiteRedirectLocation = aws.String(v.(string)) - } - - if _, err := s3conn.PutObject(putInput); err != nil { - return fmt.Errorf("Error putting object in S3 bucket (%s): %s", bucket, err) - } - - d.SetId(key) - return resourceAwsS3BucketObjectRead(d, meta) -} - -func resourceAwsS3BucketObjectCreate(d *schema.ResourceData, meta interface{}) error { - return resourceAwsS3BucketObjectPut(d, meta) -} - -func resourceAwsS3BucketObjectRead(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - - restricted := meta.(*AWSClient).IsChinaCloud() - - bucket := d.Get("bucket").(string) - key := d.Get("key").(string) - - resp, err := s3conn.HeadObject( - &s3.HeadObjectInput{ - Bucket: aws.String(bucket), - Key: aws.String(key), - }) - - if err != nil { - // If S3 returns a 404 Request Failure, mark the object as destroyed - if awsErr, ok := err.(awserr.RequestFailure); ok && awsErr.StatusCode() == 404 { - d.SetId("") - log.Printf("[WARN] Error Reading Object (%s), object not found (HTTP status 404)", key) - return nil - } - return err - } - log.Printf("[DEBUG] Reading S3 Bucket Object meta: %s", resp) - - d.Set("cache_control", resp.CacheControl) - d.Set("content_disposition", resp.ContentDisposition) - d.Set("content_encoding", resp.ContentEncoding) - d.Set("content_language", resp.ContentLanguage) - d.Set("content_type", resp.ContentType) - d.Set("version_id", resp.VersionId) - d.Set("server_side_encryption", resp.ServerSideEncryption) - d.Set("website_redirect", resp.WebsiteRedirectLocation) - - // Only set non-default KMS key ID (one that doesn't match default) - if resp.SSEKMSKeyId != nil { - // retrieve S3 KMS Default Master Key - kmsconn := meta.(*AWSClient).kmsconn - kmsresp, err := kmsconn.DescribeKey(&kms.DescribeKeyInput{ - KeyId: aws.String("alias/aws/s3"), - }) - if err != nil { - return fmt.Errorf("Failed to describe default S3 KMS key (alias/aws/s3): %s", err) - } - - if *resp.SSEKMSKeyId != *kmsresp.KeyMetadata.Arn { - log.Printf("[DEBUG] S3 object is encrypted using a non-default KMS Key ID: %s", *resp.SSEKMSKeyId) - d.Set("kms_key_id", resp.SSEKMSKeyId) - } - } - // See https://forums.aws.amazon.com/thread.jspa?threadID=44003 - d.Set("etag", strings.Trim(aws.StringValue(resp.ETag), `"`)) - - // The "STANDARD" (which is also the default) storage - // class when set would not be included in the results. - d.Set("storage_class", s3.StorageClassStandard) - if resp.StorageClass != nil { - d.Set("storage_class", resp.StorageClass) - } - - if !restricted { - if err := getTagsS3Object(s3conn, d); err != nil { - return fmt.Errorf("error getting S3 object tags (bucket: %s, key: %s): %s", bucket, key, err) - } - } - - return nil -} - -func resourceAwsS3BucketObjectUpdate(d *schema.ResourceData, meta interface{}) error { - // Changes to any of these attributes requires creation of a new object version (if bucket is versioned): - for _, key := range []string{ - "cache_control", - "content_disposition", - "content_encoding", - "content_language", - "content_type", - "source", - "content", - "content_base64", - "storage_class", - "server_side_encryption", - "kms_key_id", - "etag", - "website_redirect", - } { - if d.HasChange(key) { - return resourceAwsS3BucketObjectPut(d, meta) - } - } - - conn := meta.(*AWSClient).s3conn - - if d.HasChange("acl") { - _, err := conn.PutObjectAcl(&s3.PutObjectAclInput{ - Bucket: aws.String(d.Get("bucket").(string)), - Key: aws.String(d.Get("key").(string)), - ACL: aws.String(d.Get("acl").(string)), - }) - if err != nil { - return fmt.Errorf("error putting S3 object ACL: %s", err) - } - } - - if err := setTagsS3Object(conn, d); err != nil { - return fmt.Errorf("error setting S3 object tags: %s", err) - } - - return resourceAwsS3BucketObjectRead(d, meta) -} - -func resourceAwsS3BucketObjectDelete(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - - bucket := d.Get("bucket").(string) - key := d.Get("key").(string) - // We are effectively ignoring any leading '/' in the key name as aws.Config.DisableRestProtocolURICleaning is false - // so we need to explicitly ignore any leading '/' in the s3.ListObjectVersions call. - if strings.HasPrefix(key, "/") { - key = key[1:] - } - - if _, ok := d.GetOk("version_id"); ok { - // Bucket is versioned, we need to delete all versions - vInput := s3.ListObjectVersionsInput{ - Bucket: aws.String(bucket), - Prefix: aws.String(key), - } - out, err := s3conn.ListObjectVersions(&vInput) - if err != nil { - return fmt.Errorf("Failed listing S3 object versions: %s", err) - } - - for _, v := range out.Versions { - input := s3.DeleteObjectInput{ - Bucket: aws.String(bucket), - Key: aws.String(key), - VersionId: v.VersionId, - } - _, err := s3conn.DeleteObject(&input) - if err != nil { - return fmt.Errorf("Error deleting S3 object version of %s:\n %s:\n %s", - key, v, err) - } - } - } else { - // Just delete the object - input := s3.DeleteObjectInput{ - Bucket: aws.String(bucket), - Key: aws.String(key), - } - _, err := s3conn.DeleteObject(&input) - if err != nil { - return fmt.Errorf("Error deleting S3 bucket object: %s Bucket: %q Object: %q", err, bucket, key) - } - } - - return nil -} - -func resourceAwsS3BucketObjectCustomizeDiff(d *schema.ResourceDiff, meta interface{}) error { - if d.HasChange("etag") { - d.SetNewComputed("version_id") - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_policy.go deleted file mode 100644 index ea41b6b7b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_policy.go +++ /dev/null @@ -1,117 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsS3BucketPolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsS3BucketPolicyPut, - Read: resourceAwsS3BucketPolicyRead, - Update: resourceAwsS3BucketPolicyPut, - Delete: resourceAwsS3BucketPolicyDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "policy": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - }, - } -} - -func resourceAwsS3BucketPolicyPut(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - - bucket := d.Get("bucket").(string) - policy := d.Get("policy").(string) - - log.Printf("[DEBUG] S3 bucket: %s, put policy: %s", bucket, policy) - - params := &s3.PutBucketPolicyInput{ - Bucket: aws.String(bucket), - Policy: aws.String(policy), - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - if _, err := s3conn.PutBucketPolicy(params); err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "MalformedPolicy" { - return resource.RetryableError(awserr) - } - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return fmt.Errorf("Error putting S3 policy: %s", err) - } - - d.SetId(bucket) - - return nil -} - -func resourceAwsS3BucketPolicyRead(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - - log.Printf("[DEBUG] S3 bucket policy, read for bucket: %s", d.Id()) - pol, err := s3conn.GetBucketPolicy(&s3.GetBucketPolicyInput{ - Bucket: aws.String(d.Id()), - }) - - v := "" - if err == nil && pol.Policy != nil { - v = *pol.Policy - } - if err := d.Set("policy", v); err != nil { - return err - } - if err := d.Set("bucket", d.Id()); err != nil { - return err - } - - return nil -} - -func resourceAwsS3BucketPolicyDelete(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - - bucket := d.Get("bucket").(string) - - log.Printf("[DEBUG] S3 bucket: %s, delete policy", bucket) - _, err := s3conn.DeleteBucketPolicy(&s3.DeleteBucketPolicyInput{ - Bucket: aws.String(bucket), - }) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoSuchBucket" { - return nil - } - return fmt.Errorf("Error deleting S3 policy: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_public_access_block.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_public_access_block.go deleted file mode 100644 index a103cc0b2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_public_access_block.go +++ /dev/null @@ -1,195 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/service/s3control" - "github.com/hashicorp/terraform/helper/resource" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsS3BucketPublicAccessBlock() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsS3BucketPublicAccessBlockCreate, - Read: resourceAwsS3BucketPublicAccessBlockRead, - Update: resourceAwsS3BucketPublicAccessBlockUpdate, - Delete: resourceAwsS3BucketPublicAccessBlockDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "block_public_acls": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "block_public_policy": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "ignore_public_acls": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "restrict_public_buckets": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - } -} - -func resourceAwsS3BucketPublicAccessBlockCreate(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - bucket := d.Get("bucket").(string) - - input := &s3.PutPublicAccessBlockInput{ - Bucket: aws.String(bucket), - PublicAccessBlockConfiguration: &s3.PublicAccessBlockConfiguration{ - BlockPublicAcls: aws.Bool(d.Get("block_public_acls").(bool)), - BlockPublicPolicy: aws.Bool(d.Get("block_public_policy").(bool)), - IgnorePublicAcls: aws.Bool(d.Get("ignore_public_acls").(bool)), - RestrictPublicBuckets: aws.Bool(d.Get("restrict_public_buckets").(bool)), - }, - } - - log.Printf("[DEBUG] S3 bucket: %s, public access block: %v", bucket, input.PublicAccessBlockConfiguration) - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := s3conn.PutPublicAccessBlock(input) - - if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - if err != nil { - return fmt.Errorf("error creating public access block policy for S3 bucket (%s): %s", bucket, err) - } - - d.SetId(bucket) - return resourceAwsS3BucketPublicAccessBlockRead(d, meta) -} - -func resourceAwsS3BucketPublicAccessBlockRead(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - - input := &s3.GetPublicAccessBlockInput{ - Bucket: aws.String(d.Id()), - } - - // Retry for eventual consistency on creation - var output *s3.GetPublicAccessBlockOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - output, err = s3conn.GetPublicAccessBlock(input) - - if d.IsNewResource() && (isAWSErr(err, s3control.ErrCodeNoSuchPublicAccessBlockConfiguration, "") || - isAWSErr(err, s3.ErrCodeNoSuchBucket, "")) { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - - if isAWSErr(err, s3control.ErrCodeNoSuchPublicAccessBlockConfiguration, "") { - log.Printf("[WARN] S3 Bucket Public Access Block (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading S3 bucket Public Access Block: %s", err) - } - - if output == nil || output.PublicAccessBlockConfiguration == nil { - return fmt.Errorf("error reading S3 Bucket Public Access Block (%s): missing public access block configuration", d.Id()) - } - - d.Set("bucket", d.Id()) - d.Set("block_public_acls", output.PublicAccessBlockConfiguration.BlockPublicAcls) - d.Set("block_public_policy", output.PublicAccessBlockConfiguration.BlockPublicPolicy) - d.Set("ignore_public_acls", output.PublicAccessBlockConfiguration.IgnorePublicAcls) - d.Set("restrict_public_buckets", output.PublicAccessBlockConfiguration.RestrictPublicBuckets) - - return nil -} - -func resourceAwsS3BucketPublicAccessBlockUpdate(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - - input := &s3.PutPublicAccessBlockInput{ - Bucket: aws.String(d.Id()), - PublicAccessBlockConfiguration: &s3.PublicAccessBlockConfiguration{ - BlockPublicAcls: aws.Bool(d.Get("block_public_acls").(bool)), - BlockPublicPolicy: aws.Bool(d.Get("block_public_policy").(bool)), - IgnorePublicAcls: aws.Bool(d.Get("ignore_public_acls").(bool)), - RestrictPublicBuckets: aws.Bool(d.Get("restrict_public_buckets").(bool)), - }, - } - - log.Printf("[DEBUG] Updating S3 bucket Public Access Block: %s", input) - _, err := s3conn.PutPublicAccessBlock(input) - if err != nil { - return fmt.Errorf("error updating S3 Bucket Public Access Block (%s): %s", d.Id(), err) - } - - // Workaround API eventual consistency issues. This type of logic should not normally be used. - // We cannot reliably determine when the Read after Update might be properly updated. - // Rather than introduce complicated retry logic, we presume that a lack of an update error - // means our update succeeded with our expected values. - d.Set("block_public_acls", input.PublicAccessBlockConfiguration.BlockPublicAcls) - d.Set("block_public_policy", input.PublicAccessBlockConfiguration.BlockPublicPolicy) - d.Set("ignore_public_acls", input.PublicAccessBlockConfiguration.IgnorePublicAcls) - d.Set("restrict_public_buckets", input.PublicAccessBlockConfiguration.RestrictPublicBuckets) - - // Skip normal Read after Update due to eventual consistency issues - return nil -} - -func resourceAwsS3BucketPublicAccessBlockDelete(d *schema.ResourceData, meta interface{}) error { - s3conn := meta.(*AWSClient).s3conn - - input := &s3.DeletePublicAccessBlockInput{ - Bucket: aws.String(d.Id()), - } - - log.Printf("[DEBUG] S3 bucket: %s, delete public access block", d.Id()) - _, err := s3conn.DeletePublicAccessBlock(input) - - if isAWSErr(err, s3control.ErrCodeNoSuchPublicAccessBlockConfiguration, "") { - return nil - } - - if err != nil { - return fmt.Errorf("error deleting S3 Bucket Public Access Block (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_model.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_model.go deleted file mode 100644 index 8da56ad3f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_model.go +++ /dev/null @@ -1,391 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/sagemaker" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSagemakerModel() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSagemakerModelCreate, - Read: resourceAwsSagemakerModelRead, - Update: resourceAwsSagemakerModelUpdate, - Delete: resourceAwsSagemakerModelDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateSagemakerName, - }, - - "primary_container": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "container_hostname": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateSagemakerName, - }, - - "image": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateSagemakerImage, - }, - - "model_data_url": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateSagemakerModelDataUrl, - }, - - "environment": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - ValidateFunc: validateSagemakerEnvironment, - }, - }, - }, - }, - - "vpc_config": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "subnets": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "security_group_ids": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - }, - }, - - "execution_role_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "enable_network_isolation": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - - "container": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "container_hostname": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateSagemakerName, - }, - - "image": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateSagemakerImage, - }, - - "model_data_url": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateSagemakerModelDataUrl, - }, - - "environment": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - ValidateFunc: validateSagemakerEnvironment, - }, - }, - }, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsSagemakerModelCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sagemakerconn - - var name string - if v, ok := d.GetOk("name"); ok { - name = v.(string) - } else { - name = resource.UniqueId() - } - - createOpts := &sagemaker.CreateModelInput{ - ModelName: aws.String(name), - } - - if v, ok := d.GetOk("primary_container"); ok { - m := v.([]interface{})[0].(map[string]interface{}) - createOpts.PrimaryContainer = expandContainer(m) - } - - if v, ok := d.GetOk("container"); ok { - containers := expandContainers(v.([]interface{})) - createOpts.SetContainers(containers) - } - - if v, ok := d.GetOk("execution_role_arn"); ok { - createOpts.SetExecutionRoleArn(v.(string)) - } - - if v, ok := d.GetOk("tags"); ok { - createOpts.SetTags(tagsFromMapSagemaker(v.(map[string]interface{}))) - } - - if v, ok := d.GetOk("vpc_config"); ok { - vpcConfig := expandSageMakerVpcConfigRequest(v.([]interface{})) - createOpts.SetVpcConfig(vpcConfig) - } - - if v, ok := d.GetOk("enable_network_isolation"); ok { - createOpts.SetEnableNetworkIsolation(v.(bool)) - } - - log.Printf("[DEBUG] Sagemaker model create config: %#v", *createOpts) - _, err := retryOnAwsCode("ValidationException", func() (interface{}, error) { - return conn.CreateModel(createOpts) - }) - - if err != nil { - return fmt.Errorf("error creating Sagemaker model: %s", err) - } - d.SetId(name) - - return resourceAwsSagemakerModelRead(d, meta) -} - -func expandSageMakerVpcConfigRequest(l []interface{}) *sagemaker.VpcConfig { - if len(l) == 0 { - return nil - } - - m := l[0].(map[string]interface{}) - - return &sagemaker.VpcConfig{ - SecurityGroupIds: expandStringSet(m["security_group_ids"].(*schema.Set)), - Subnets: expandStringSet(m["subnets"].(*schema.Set)), - } -} - -func resourceAwsSagemakerModelRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sagemakerconn - - request := &sagemaker.DescribeModelInput{ - ModelName: aws.String(d.Id()), - } - - model, err := conn.DescribeModel(request) - if err != nil { - if sagemakerErr, ok := err.(awserr.Error); ok && sagemakerErr.Code() == "ValidationException" { - log.Printf("[INFO] unable to find the sagemaker model resource and therefore it is removed from the state: %s", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Sagemaker model %s: %s", d.Id(), err) - } - - if err := d.Set("arn", model.ModelArn); err != nil { - return fmt.Errorf("unable to set arn for sagemaker model %q: %+v", d.Id(), err) - } - if err := d.Set("name", model.ModelName); err != nil { - return err - } - if err := d.Set("execution_role_arn", model.ExecutionRoleArn); err != nil { - return err - } - if err := d.Set("enable_network_isolation", model.EnableNetworkIsolation); err != nil { - return err - } - if err := d.Set("primary_container", flattenContainer(model.PrimaryContainer)); err != nil { - return err - } - if err := d.Set("container", flattenContainers(model.Containers)); err != nil { - return err - } - if err := d.Set("vpc_config", flattenSageMakerVpcConfigResponse(model.VpcConfig)); err != nil { - return fmt.Errorf("error setting vpc_config: %s", err) - } - - tagsOutput, err := conn.ListTags(&sagemaker.ListTagsInput{ - ResourceArn: model.ModelArn, - }) - if err != nil { - return fmt.Errorf("error listing tags of Sagemaker model %s: %s", d.Id(), err) - } - - if err := d.Set("tags", tagsToMapSagemaker(tagsOutput.Tags)); err != nil { - return err - } - return nil -} - -func flattenSageMakerVpcConfigResponse(vpcConfig *sagemaker.VpcConfig) []map[string]interface{} { - if vpcConfig == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "security_group_ids": schema.NewSet(schema.HashString, flattenStringList(vpcConfig.SecurityGroupIds)), - "subnets": schema.NewSet(schema.HashString, flattenStringList(vpcConfig.Subnets)), - } - - return []map[string]interface{}{m} -} - -func resourceAwsSagemakerModelUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sagemakerconn - - d.Partial(true) - - if err := setSagemakerTags(conn, d); err != nil { - return err - } else { - d.SetPartial("tags") - } - - d.Partial(false) - - return resourceAwsSagemakerModelRead(d, meta) -} - -func resourceAwsSagemakerModelDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sagemakerconn - - deleteOpts := &sagemaker.DeleteModelInput{ - ModelName: aws.String(d.Id()), - } - log.Printf("[INFO] Deleting Sagemaker model: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteModel(deleteOpts) - if err == nil { - return nil - } - - sagemakerErr, ok := err.(awserr.Error) - if !ok { - return resource.NonRetryableError(err) - } - - if sagemakerErr.Code() == "ResourceNotFound" { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(fmt.Errorf("error deleting Sagemaker model: %s", err)) - }) -} - -func expandContainer(m map[string]interface{}) *sagemaker.ContainerDefinition { - container := sagemaker.ContainerDefinition{ - Image: aws.String(m["image"].(string)), - } - - if v, ok := m["container_hostname"]; ok && v.(string) != "" { - container.ContainerHostname = aws.String(v.(string)) - } - if v, ok := m["model_data_url"]; ok && v.(string) != "" { - container.ModelDataUrl = aws.String(v.(string)) - } - if v, ok := m["environment"]; ok { - container.Environment = stringMapToPointers(v.(map[string]interface{})) - } - - return &container -} - -func expandContainers(a []interface{}) []*sagemaker.ContainerDefinition { - containers := make([]*sagemaker.ContainerDefinition, 0, len(a)) - - for _, m := range a { - containers = append(containers, expandContainer(m.(map[string]interface{}))) - } - - return containers -} - -func flattenContainer(container *sagemaker.ContainerDefinition) []interface{} { - if container == nil { - return []interface{}{} - } - - cfg := make(map[string]interface{}) - - cfg["image"] = *container.Image - - if container.ContainerHostname != nil { - cfg["container_hostname"] = *container.ContainerHostname - } - if container.ModelDataUrl != nil { - cfg["model_data_url"] = *container.ModelDataUrl - } - if container.Environment != nil { - cfg["environment"] = flattenEnvironment(container.Environment) - } - - return []interface{}{cfg} -} - -func flattenContainers(containers []*sagemaker.ContainerDefinition) []interface{} { - fContainers := make([]interface{}, 0, len(containers)) - for _, container := range containers { - fContainers = append(fContainers, flattenContainer(container)[0].(map[string]interface{})) - } - return fContainers -} - -func flattenEnvironment(env map[string]*string) map[string]string { - m := map[string]string{} - for k, v := range env { - m[k] = *v - } - return m -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_notebook_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_notebook_instance.go deleted file mode 100644 index 948b01c30..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_notebook_instance.go +++ /dev/null @@ -1,386 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/sagemaker" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSagemakerNotebookInstance() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSagemakerNotebookInstanceCreate, - Read: resourceAwsSagemakerNotebookInstanceRead, - Update: resourceAwsSagemakerNotebookInstanceUpdate, - Delete: resourceAwsSagemakerNotebookInstanceDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateSagemakerName, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - }, - - "instance_type": { - Type: schema.TypeString, - Required: true, - }, - - "subnet_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "security_groups": { - Type: schema.TypeSet, - MinItems: 1, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsSagemakerNotebookInstanceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sagemakerconn - - name := d.Get("name").(string) - - createOpts := &sagemaker.CreateNotebookInstanceInput{ - SecurityGroupIds: expandStringSet(d.Get("security_groups").(*schema.Set)), - NotebookInstanceName: aws.String(name), - RoleArn: aws.String(d.Get("role_arn").(string)), - InstanceType: aws.String(d.Get("instance_type").(string)), - } - - if s, ok := d.GetOk("subnet_id"); ok { - createOpts.SubnetId = aws.String(s.(string)) - } - - if k, ok := d.GetOk("kms_key_id"); ok { - createOpts.KmsKeyId = aws.String(k.(string)) - } - - if v, ok := d.GetOk("tags"); ok { - tagsIn := v.(map[string]interface{}) - createOpts.Tags = tagsFromMapSagemaker(tagsIn) - } - - log.Printf("[DEBUG] sagemaker notebook instance create config: %#v", *createOpts) - _, err := conn.CreateNotebookInstance(createOpts) - if err != nil { - return fmt.Errorf("Error creating Sagemaker Notebook Instance: %s", err) - } - - d.SetId(name) - log.Printf("[INFO] sagemaker notebook instance ID: %s", d.Id()) - - stateConf := &resource.StateChangeConf{ - Pending: []string{ - sagemaker.NotebookInstanceStatusUpdating, - sagemaker.NotebookInstanceStatusPending, - sagemaker.NotebookInstanceStatusStopped, - }, - Target: []string{sagemaker.NotebookInstanceStatusInService}, - Refresh: sagemakerNotebookInstanceStateRefreshFunc(conn, d.Id()), - Timeout: 10 * time.Minute, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for sagemaker notebook instance (%s) to create: %s", d.Id(), err) - } - - return resourceAwsSagemakerNotebookInstanceRead(d, meta) -} - -func resourceAwsSagemakerNotebookInstanceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sagemakerconn - - describeNotebookInput := &sagemaker.DescribeNotebookInstanceInput{ - NotebookInstanceName: aws.String(d.Id()), - } - notebookInstance, err := conn.DescribeNotebookInstance(describeNotebookInput) - if err != nil { - if isAWSErr(err, "ValidationException", "RecordNotFound") { - d.SetId("") - log.Printf("[WARN] Unable to find sageMaker notebook instance (%s); removing from state", d.Id()) - return nil - } - return fmt.Errorf("error finding sagemaker notebook instance (%s): %s", d.Id(), err) - - } - - if err := d.Set("security_groups", flattenStringList(notebookInstance.SecurityGroups)); err != nil { - return fmt.Errorf("error setting security groups for sagemaker notebook instance (%s): %s", d.Id(), err) - } - if err := d.Set("name", notebookInstance.NotebookInstanceName); err != nil { - return fmt.Errorf("error setting name for sagemaker notebook instance (%s): %s", d.Id(), err) - } - if err := d.Set("role_arn", notebookInstance.RoleArn); err != nil { - return fmt.Errorf("error setting role_arn for sagemaker notebook instance (%s): %s", d.Id(), err) - } - if err := d.Set("instance_type", notebookInstance.InstanceType); err != nil { - return fmt.Errorf("error setting instance_type for sagemaker notebook instance (%s): %s", d.Id(), err) - } - if err := d.Set("subnet_id", notebookInstance.SubnetId); err != nil { - return fmt.Errorf("error setting subnet_id for sagemaker notebook instance (%s): %s", d.Id(), err) - } - - if err := d.Set("kms_key_id", notebookInstance.KmsKeyId); err != nil { - return fmt.Errorf("error setting kms_key_id for sagemaker notebook instance (%s): %s", d.Id(), err) - } - - 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, - }) - if err != nil { - 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) - } - return nil -} - -func resourceAwsSagemakerNotebookInstanceUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sagemakerconn - - d.Partial(true) - - if err := setSagemakerTags(conn, d); err != nil { - return err - } - d.SetPartial("tags") - - hasChanged := false - // Update - updateOpts := &sagemaker.UpdateNotebookInstanceInput{ - NotebookInstanceName: aws.String(d.Get("name").(string)), - } - - if d.HasChange("role_arn") { - updateOpts.RoleArn = aws.String(d.Get("role_arn").(string)) - hasChanged = true - } - - if d.HasChange("instance_type") { - updateOpts.InstanceType = aws.String(d.Get("instance_type").(string)) - hasChanged = true - } - - if hasChanged { - - // Stop notebook - _, previousStatus, _ := sagemakerNotebookInstanceStateRefreshFunc(conn, d.Id())() - if previousStatus != sagemaker.NotebookInstanceStatusStopped { - if err := stopSagemakerNotebookInstance(conn, d.Id()); err != nil { - return fmt.Errorf("error stopping sagemaker notebook instance prior to updating: %s", err) - } - } - - if _, err := conn.UpdateNotebookInstance(updateOpts); err != nil { - return fmt.Errorf("error updating sagemaker notebook instance: %s", err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{ - sagemaker.NotebookInstanceStatusUpdating, - }, - Target: []string{sagemaker.NotebookInstanceStatusStopped}, - Refresh: sagemakerNotebookInstanceStateRefreshFunc(conn, d.Id()), - Timeout: 10 * time.Minute, - } - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for sagemaker notebook instance (%s) to update: %s", d.Id(), err) - } - - // Restart if needed - if previousStatus == sagemaker.NotebookInstanceStatusInService { - startOpts := &sagemaker.StartNotebookInstanceInput{ - NotebookInstanceName: aws.String(d.Id()), - } - - // StartNotebookInstance sometimes doesn't take so we'll check for a state change and if - // it doesn't change we'll send another request - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - if _, err := conn.StartNotebookInstance(startOpts); err != nil { - return resource.NonRetryableError(fmt.Errorf("error starting sagemaker notebook instance (%s): %s", d.Id(), err)) - } - stateConf := &resource.StateChangeConf{ - Pending: []string{ - sagemaker.NotebookInstanceStatusStopped, - }, - Target: []string{sagemaker.NotebookInstanceStatusInService, sagemaker.NotebookInstanceStatusPending}, - Refresh: sagemakerNotebookInstanceStateRefreshFunc(conn, d.Id()), - Timeout: 30 * time.Second, - } - _, err := stateConf.WaitForState() - if err != nil { - return resource.RetryableError(fmt.Errorf("error waiting for sagemaker notebook instance (%s) to start: %s", d.Id(), err)) - } - - return nil - }) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{ - sagemaker.NotebookInstanceStatusUpdating, - sagemaker.NotebookInstanceStatusPending, - sagemaker.NotebookInstanceStatusStopped, - }, - Target: []string{sagemaker.NotebookInstanceStatusInService}, - Refresh: sagemakerNotebookInstanceStateRefreshFunc(conn, d.Id()), - Timeout: 10 * time.Minute, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for sagemaker notebook instance (%s) to start after update: %s", d.Id(), err) - } - } - } - - d.Partial(false) - - return resourceAwsSagemakerNotebookInstanceRead(d, meta) -} - -func resourceAwsSagemakerNotebookInstanceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sagemakerconn - - describeNotebookInput := &sagemaker.DescribeNotebookInstanceInput{ - NotebookInstanceName: aws.String(d.Id()), - } - notebook, err := conn.DescribeNotebookInstance(describeNotebookInput) - if err != nil { - if isAWSErr(err, "ValidationException", "RecordNotFound") { - return nil - } - return fmt.Errorf("unable to find sagemaker notebook instance to delete (%s): %s", d.Id(), err) - } - if *notebook.NotebookInstanceStatus != sagemaker.NotebookInstanceStatusFailed && *notebook.NotebookInstanceStatus != sagemaker.NotebookInstanceStatusStopped { - if err := stopSagemakerNotebookInstance(conn, d.Id()); err != nil { - return err - } - } - - deleteOpts := &sagemaker.DeleteNotebookInstanceInput{ - NotebookInstanceName: aws.String(d.Id()), - } - - if _, err := conn.DeleteNotebookInstance(deleteOpts); err != nil { - return fmt.Errorf("error trying to delete sagemaker notebook instance (%s): %s", d.Id(), err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{ - sagemaker.NotebookInstanceStatusDeleting, - }, - Target: []string{""}, - Refresh: sagemakerNotebookInstanceStateRefreshFunc(conn, d.Id()), - Timeout: 10 * time.Minute, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for sagemaker notebook instance (%s) to delete: %s", d.Id(), err) - } - - return nil -} - -func stopSagemakerNotebookInstance(conn *sagemaker.SageMaker, id string) error { - describeNotebookInput := &sagemaker.DescribeNotebookInstanceInput{ - NotebookInstanceName: aws.String(id), - } - notebook, err := conn.DescribeNotebookInstance(describeNotebookInput) - if err != nil { - if isAWSErr(err, "ValidationException", "RecordNotFound") { - return nil - } - return fmt.Errorf("unable to find sagemaker notebook instance (%s): %s", id, err) - } - if *notebook.NotebookInstanceStatus == sagemaker.NotebookInstanceStatusStopped { - return nil - } - - stopOpts := &sagemaker.StopNotebookInstanceInput{ - NotebookInstanceName: aws.String(id), - } - - if _, err := conn.StopNotebookInstance(stopOpts); err != nil { - return fmt.Errorf("Error stopping sagemaker notebook instance: %s", err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{ - sagemaker.NotebookInstanceStatusStopping, - }, - Target: []string{sagemaker.NotebookInstanceStatusStopped}, - Refresh: sagemakerNotebookInstanceStateRefreshFunc(conn, id), - Timeout: 10 * time.Minute, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for sagemaker notebook instance (%s) to stop: %s", id, err) - } - - return nil -} - -func sagemakerNotebookInstanceStateRefreshFunc(conn *sagemaker.SageMaker, name string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - describeNotebookInput := &sagemaker.DescribeNotebookInstanceInput{ - NotebookInstanceName: aws.String(name), - } - notebook, err := conn.DescribeNotebookInstance(describeNotebookInput) - if err != nil { - if isAWSErr(err, "ValidationException", "RecordNotFound") { - return 1, "", nil - } - return nil, "", err - } - - if notebook == nil { - return nil, "", nil - } - - return notebook, *notebook.NotebookInstanceStatus, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go deleted file mode 100644 index b86d94d80..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go +++ /dev/null @@ -1,429 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/secretsmanager" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsSecretsManagerSecret() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSecretsManagerSecretCreate, - Read: resourceAwsSecretsManagerSecretRead, - Update: resourceAwsSecretsManagerSecretUpdate, - Delete: resourceAwsSecretsManagerSecretDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "kms_key_id": { - Type: schema.TypeString, - Optional: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateSecretManagerSecretName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validateSecretManagerSecretNamePrefix, - }, - "policy": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - "recovery_window_in_days": { - Type: schema.TypeInt, - Optional: true, - Default: 30, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(int) - if value == 0 { - return - } - if value >= 7 && value <= 30 { - return - } - errors = append(errors, fmt.Errorf("%q must be 0 or between 7 and 30", k)) - return - }, - }, - "rotation_enabled": { - Type: schema.TypeBool, - Computed: true, - }, - "rotation_lambda_arn": { - Type: schema.TypeString, - Optional: true, - }, - "rotation_rules": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "automatically_after_days": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsSecretsManagerSecretCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).secretsmanagerconn - - var secretName string - if v, ok := d.GetOk("name"); ok { - secretName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - secretName = resource.PrefixedUniqueId(v.(string)) - } else { - secretName = resource.UniqueId() - } - - input := &secretsmanager.CreateSecretInput{ - Description: aws.String(d.Get("description").(string)), - Name: aws.String(secretName), - } - - if v, ok := d.GetOk("kms_key_id"); ok && v.(string) != "" { - input.KmsKeyId = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating Secrets Manager Secret: %s", input) - - // Retry for secret recreation after deletion - var output *secretsmanager.CreateSecretOutput - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - var err error - output, err = conn.CreateSecret(input) - // InvalidRequestException: You can’t perform this operation on the secret because it was deleted. - if isAWSErr(err, secretsmanager.ErrCodeInvalidRequestException, "You can’t perform this operation on the secret because it was deleted") { - return resource.RetryableError(err) - } - if err != nil { - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error creating Secrets Manager Secret: %s", err) - } - - d.SetId(aws.StringValue(output.ARN)) - - if v, ok := d.GetOk("policy"); ok && v.(string) != "" { - input := &secretsmanager.PutResourcePolicyInput{ - ResourcePolicy: aws.String(v.(string)), - SecretId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Setting Secrets Manager Secret resource policy; %s", input) - _, err := conn.PutResourcePolicy(input) - if err != nil { - return fmt.Errorf("error setting Secrets Manager Secret %q policy: %s", d.Id(), err) - } - } - - if v, ok := d.GetOk("rotation_lambda_arn"); ok && v.(string) != "" { - input := &secretsmanager.RotateSecretInput{ - RotationLambdaARN: aws.String(v.(string)), - RotationRules: expandSecretsManagerRotationRules(d.Get("rotation_rules").([]interface{})), - SecretId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Enabling Secrets Manager Secret rotation: %s", input) - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.RotateSecret(input) - if err != nil { - // AccessDeniedException: Secrets Manager cannot invoke the specified Lambda function. - if isAWSErr(err, "AccessDeniedException", "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error enabling Secrets Manager Secret %q rotation: %s", d.Id(), err) - } - } - - if v, ok := d.GetOk("tags"); ok { - input := &secretsmanager.TagResourceInput{ - SecretId: aws.String(d.Id()), - Tags: tagsFromMapSecretsManager(v.(map[string]interface{})), - } - - log.Printf("[DEBUG] Tagging Secrets Manager Secret: %s", input) - _, err := conn.TagResource(input) - if err != nil { - return fmt.Errorf("error tagging Secrets Manager Secret %q: %s", d.Id(), input) - } - } - - return resourceAwsSecretsManagerSecretRead(d, meta) -} - -func resourceAwsSecretsManagerSecretRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).secretsmanagerconn - - input := &secretsmanager.DescribeSecretInput{ - SecretId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading Secrets Manager Secret: %s", input) - output, err := conn.DescribeSecret(input) - if err != nil { - if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Secrets Manager Secret %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Secrets Manager Secret: %s", err) - } - - d.Set("arn", output.ARN) - d.Set("description", output.Description) - d.Set("kms_key_id", output.KmsKeyId) - d.Set("name", output.Name) - - pIn := &secretsmanager.GetResourcePolicyInput{ - SecretId: aws.String(d.Id()), - } - log.Printf("[DEBUG] Reading Secrets Manager Secret policy: %s", pIn) - pOut, err := conn.GetResourcePolicy(pIn) - if err != nil { - return fmt.Errorf("error reading Secrets Manager Secret policy: %s", err) - } - - if pOut.ResourcePolicy != nil { - policy, err := structure.NormalizeJsonString(aws.StringValue(pOut.ResourcePolicy)) - if err != nil { - return fmt.Errorf("policy contains an invalid JSON: %s", err) - } - d.Set("policy", policy) - } - - d.Set("rotation_enabled", output.RotationEnabled) - - if aws.BoolValue(output.RotationEnabled) { - d.Set("rotation_lambda_arn", output.RotationLambdaARN) - if err := d.Set("rotation_rules", flattenSecretsManagerRotationRules(output.RotationRules)); err != nil { - return fmt.Errorf("error setting rotation_rules: %s", err) - } - } else { - d.Set("rotation_lambda_arn", "") - d.Set("rotation_rules", []interface{}{}) - } - - if err := d.Set("tags", tagsToMapSecretsManager(output.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func resourceAwsSecretsManagerSecretUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).secretsmanagerconn - - if d.HasChange("description") || d.HasChange("kms_key_id") { - input := &secretsmanager.UpdateSecretInput{ - Description: aws.String(d.Get("description").(string)), - SecretId: aws.String(d.Id()), - } - - if v, ok := d.GetOk("kms_key_id"); ok && v.(string) != "" { - input.KmsKeyId = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Updating Secrets Manager Secret: %s", input) - _, err := conn.UpdateSecret(input) - if err != nil { - return fmt.Errorf("error updating Secrets Manager Secret: %s", err) - } - } - - if d.HasChange("policy") { - if v, ok := d.GetOk("policy"); ok && v.(string) != "" { - policy, err := structure.NormalizeJsonString(v.(string)) - if err != nil { - return fmt.Errorf("policy contains an invalid JSON: %s", err) - } - input := &secretsmanager.PutResourcePolicyInput{ - ResourcePolicy: aws.String(policy), - SecretId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Setting Secrets Manager Secret resource policy; %s", input) - _, err = conn.PutResourcePolicy(input) - if err != nil { - return fmt.Errorf("error setting Secrets Manager Secret %q policy: %s", d.Id(), err) - } - } else { - input := &secretsmanager.DeleteResourcePolicyInput{ - SecretId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Removing Secrets Manager Secret policy: %s", input) - _, err := conn.DeleteResourcePolicy(input) - if err != nil { - return fmt.Errorf("error removing Secrets Manager Secret %q policy: %s", d.Id(), err) - } - } - } - - if d.HasChange("rotation_lambda_arn") || d.HasChange("rotation_rules") { - if v, ok := d.GetOk("rotation_lambda_arn"); ok && v.(string) != "" { - input := &secretsmanager.RotateSecretInput{ - RotationLambdaARN: aws.String(v.(string)), - RotationRules: expandSecretsManagerRotationRules(d.Get("rotation_rules").([]interface{})), - SecretId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Enabling Secrets Manager Secret rotation: %s", input) - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.RotateSecret(input) - if err != nil { - // AccessDeniedException: Secrets Manager cannot invoke the specified Lambda function. - if isAWSErr(err, "AccessDeniedException", "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error updating Secrets Manager Secret %q rotation: %s", d.Id(), err) - } - } else { - input := &secretsmanager.CancelRotateSecretInput{ - SecretId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Cancelling Secrets Manager Secret rotation: %s", input) - _, err := conn.CancelRotateSecret(input) - if err != nil { - return fmt.Errorf("error cancelling Secret Manager Secret %q rotation: %s", d.Id(), err) - } - } - } - - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsSecretsManager(tagsFromMapSecretsManager(o), tagsFromMapSecretsManager(n)) - - if len(remove) > 0 { - log.Printf("[DEBUG] Removing Secrets Manager Secret %q tags: %#v", d.Id(), remove) - k := make([]*string, len(remove)) - for i, t := range remove { - k[i] = t.Key - } - - _, err := conn.UntagResource(&secretsmanager.UntagResourceInput{ - SecretId: aws.String(d.Id()), - TagKeys: k, - }) - if err != nil { - return fmt.Errorf("error updating Secrets Manager Secrets %q tags: %s", d.Id(), err) - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating Secrets Manager Secret %q tags: %#v", d.Id(), create) - _, err := conn.TagResource(&secretsmanager.TagResourceInput{ - SecretId: aws.String(d.Id()), - Tags: create, - }) - if err != nil { - return fmt.Errorf("error updating Secrets Manager Secrets %q tags: %s", d.Id(), err) - } - } - } - - return resourceAwsSecretsManagerSecretRead(d, meta) -} - -func resourceAwsSecretsManagerSecretDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).secretsmanagerconn - - input := &secretsmanager.DeleteSecretInput{ - SecretId: aws.String(d.Id()), - } - - recoveryWindowInDays := d.Get("recovery_window_in_days").(int) - if recoveryWindowInDays == 0 { - input.ForceDeleteWithoutRecovery = aws.Bool(true) - } else { - input.RecoveryWindowInDays = aws.Int64(int64(recoveryWindowInDays)) - } - - log.Printf("[DEBUG] Deleting Secrets Manager Secret: %s", input) - _, err := conn.DeleteSecret(input) - if err != nil { - if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { - return nil - } - return fmt.Errorf("error deleting Secrets Manager Secret: %s", err) - } - - return nil -} - -func expandSecretsManagerRotationRules(l []interface{}) *secretsmanager.RotationRulesType { - if len(l) == 0 { - return nil - } - - m := l[0].(map[string]interface{}) - - rules := &secretsmanager.RotationRulesType{ - AutomaticallyAfterDays: aws.Int64(int64(m["automatically_after_days"].(int))), - } - - return rules -} - -func flattenSecretsManagerRotationRules(rules *secretsmanager.RotationRulesType) []interface{} { - if rules == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "automatically_after_days": int(aws.Int64Value(rules.AutomaticallyAfterDays)), - } - - return []interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret_version.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret_version.go deleted file mode 100644 index e90384f90..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret_version.go +++ /dev/null @@ -1,239 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "encoding/base64" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/secretsmanager" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSecretsManagerSecretVersion() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSecretsManagerSecretVersionCreate, - Read: resourceAwsSecretsManagerSecretVersionRead, - Update: resourceAwsSecretsManagerSecretVersionUpdate, - Delete: resourceAwsSecretsManagerSecretVersionDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "secret_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "secret_string": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Sensitive: true, - ConflictsWith: []string{"secret_binary"}, - }, - "secret_binary": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Sensitive: true, - ConflictsWith: []string{"secret_string"}, - }, - "version_id": { - Type: schema.TypeString, - Computed: true, - }, - "version_stages": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func resourceAwsSecretsManagerSecretVersionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).secretsmanagerconn - secretID := d.Get("secret_id").(string) - - input := &secretsmanager.PutSecretValueInput{ - SecretId: aws.String(secretID), - } - - if v, ok := d.GetOk("secret_string"); ok { - input.SecretString = aws.String(v.(string)) - } - - if v, ok := d.GetOk("secret_binary"); ok { - vs := []byte(v.(string)) - - if !isBase64Encoded(vs) { - return fmt.Errorf("expected base64 in secret_binary") - } - - var err error - input.SecretBinary, err = base64.StdEncoding.DecodeString(v.(string)) - - if err != nil { - return fmt.Errorf("error decoding secret binary value: %s", err) - } - } - - if v, ok := d.GetOk("version_stages"); ok { - input.VersionStages = expandStringList(v.(*schema.Set).List()) - } - - log.Printf("[DEBUG] Putting Secrets Manager Secret %q value", secretID) - output, err := conn.PutSecretValue(input) - if err != nil { - return fmt.Errorf("error putting Secrets Manager Secret value: %s", err) - } - - d.SetId(fmt.Sprintf("%s|%s", secretID, aws.StringValue(output.VersionId))) - - return resourceAwsSecretsManagerSecretVersionRead(d, meta) -} - -func resourceAwsSecretsManagerSecretVersionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).secretsmanagerconn - - secretID, versionID, err := decodeSecretsManagerSecretVersionID(d.Id()) - if err != nil { - return err - } - - input := &secretsmanager.GetSecretValueInput{ - SecretId: aws.String(secretID), - VersionId: aws.String(versionID), - } - - log.Printf("[DEBUG] Reading Secrets Manager Secret Version: %s", input) - output, err := conn.GetSecretValue(input) - if err != nil { - if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Secrets Manager Secret Version %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - if isAWSErr(err, secretsmanager.ErrCodeInvalidRequestException, "You can’t perform this operation on the secret because it was deleted") { - log.Printf("[WARN] Secrets Manager Secret Version %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Secrets Manager Secret Version: %s", err) - } - - d.Set("secret_id", secretID) - d.Set("secret_string", output.SecretString) - d.Set("secret_binary", base64Encode(output.SecretBinary)) - d.Set("version_id", output.VersionId) - d.Set("arn", output.ARN) - - if err := d.Set("version_stages", flattenStringList(output.VersionStages)); err != nil { - return fmt.Errorf("error setting version_stages: %s", err) - } - - return nil -} - -func resourceAwsSecretsManagerSecretVersionUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).secretsmanagerconn - - secretID, versionID, err := decodeSecretsManagerSecretVersionID(d.Id()) - if err != nil { - return err - } - - o, n := d.GetChange("version_stages") - os := o.(*schema.Set) - ns := n.(*schema.Set) - stagesToAdd := ns.Difference(os).List() - stagesToRemove := os.Difference(ns).List() - - for _, stage := range stagesToAdd { - input := &secretsmanager.UpdateSecretVersionStageInput{ - MoveToVersionId: aws.String(versionID), - SecretId: aws.String(secretID), - VersionStage: aws.String(stage.(string)), - } - - log.Printf("[DEBUG] Updating Secrets Manager Secret Version Stage: %s", input) - _, err := conn.UpdateSecretVersionStage(input) - if err != nil { - return fmt.Errorf("error updating Secrets Manager Secret %q Version Stage %q: %s", secretID, stage.(string), err) - } - } - - for _, stage := range stagesToRemove { - // InvalidParameterException: You can only move staging label AWSCURRENT to a different secret version. It can’t be completely removed. - if stage.(string) == "AWSCURRENT" { - log.Printf("[INFO] Skipping removal of AWSCURRENT staging label for secret %q version %q", secretID, versionID) - continue - } - input := &secretsmanager.UpdateSecretVersionStageInput{ - RemoveFromVersionId: aws.String(versionID), - SecretId: aws.String(secretID), - VersionStage: aws.String(stage.(string)), - } - log.Printf("[DEBUG] Updating Secrets Manager Secret Version Stage: %s", input) - _, err := conn.UpdateSecretVersionStage(input) - if err != nil { - return fmt.Errorf("error updating Secrets Manager Secret %q Version Stage %q: %s", secretID, stage.(string), err) - } - } - - return resourceAwsSecretsManagerSecretVersionRead(d, meta) -} - -func resourceAwsSecretsManagerSecretVersionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).secretsmanagerconn - - secretID, versionID, err := decodeSecretsManagerSecretVersionID(d.Id()) - if err != nil { - return err - } - - if v, ok := d.GetOk("version_stages"); ok { - for _, stage := range v.(*schema.Set).List() { - // InvalidParameterException: You can only move staging label AWSCURRENT to a different secret version. It can’t be completely removed. - if stage.(string) == "AWSCURRENT" { - log.Printf("[WARN] Cannot remove AWSCURRENT staging label, which may leave the secret %q version %q active", secretID, versionID) - continue - } - input := &secretsmanager.UpdateSecretVersionStageInput{ - RemoveFromVersionId: aws.String(versionID), - SecretId: aws.String(secretID), - VersionStage: aws.String(stage.(string)), - } - log.Printf("[DEBUG] Updating Secrets Manager Secret Version Stage: %s", input) - _, err := conn.UpdateSecretVersionStage(input) - if err != nil { - if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { - return nil - } - if isAWSErr(err, secretsmanager.ErrCodeInvalidRequestException, "You can’t perform this operation on the secret because it was deleted") { - return nil - } - return fmt.Errorf("error updating Secrets Manager Secret %q Version Stage %q: %s", secretID, stage.(string), err) - } - } - } - - return nil -} - -func decodeSecretsManagerSecretVersionID(id string) (string, string, error) { - idParts := strings.Split(id, "|") - if len(idParts) != 2 { - return "", "", fmt.Errorf("expected ID in format SecretID|VersionID, received: %s", id) - } - return idParts[0], idParts[1], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go deleted file mode 100644 index 0723e85c5..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go +++ /dev/null @@ -1,1517 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "sort" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsSecurityGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSecurityGroupCreate, - Read: resourceAwsSecurityGroupRead, - Update: resourceAwsSecurityGroupUpdate, - Delete: resourceAwsSecurityGroupDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsSecurityGroupImportState, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - - SchemaVersion: 1, - MigrateState: resourceAwsSecurityGroupMigrateState, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validation.StringLenBetween(0, 255), - }, - - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - ValidateFunc: validation.StringLenBetween(0, 100), - }, - - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "Managed by Terraform", - ValidateFunc: validation.StringLenBetween(0, 255), - }, - - "vpc_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - - "ingress": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "from_port": { - Type: schema.TypeInt, - Required: true, - }, - - "to_port": { - Type: schema.TypeInt, - Required: true, - }, - - "protocol": { - Type: schema.TypeString, - Required: true, - StateFunc: protocolStateFunc, - }, - - "cidr_blocks": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateCIDRNetworkAddress, - }, - }, - - "ipv6_cidr_blocks": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateCIDRNetworkAddress, - }, - }, - - "prefix_list_ids": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "security_groups": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "self": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateSecurityGroupRuleDescription, - }, - }, - }, - Set: resourceAwsSecurityGroupRuleHash, - }, - - "egress": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "from_port": { - Type: schema.TypeInt, - Required: true, - }, - - "to_port": { - Type: schema.TypeInt, - Required: true, - }, - - "protocol": { - Type: schema.TypeString, - Required: true, - StateFunc: protocolStateFunc, - }, - - "cidr_blocks": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateCIDRNetworkAddress, - }, - }, - - "ipv6_cidr_blocks": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateCIDRNetworkAddress, - }, - }, - - "prefix_list_ids": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "security_groups": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "self": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateSecurityGroupRuleDescription, - }, - }, - }, - Set: resourceAwsSecurityGroupRuleHash, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - - "tags": tagsSchema(), - - "revoke_rules_on_delete": { - Type: schema.TypeBool, - Default: false, - Optional: true, - }, - }, - } -} - -func resourceAwsSecurityGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - securityGroupOpts := &ec2.CreateSecurityGroupInput{} - - if v, ok := d.GetOk("vpc_id"); ok { - securityGroupOpts.VpcId = aws.String(v.(string)) - } - - if v := d.Get("description"); v != nil { - securityGroupOpts.Description = aws.String(v.(string)) - } - - var groupName string - if v, ok := d.GetOk("name"); ok { - groupName = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - groupName = resource.PrefixedUniqueId(v.(string)) - } else { - groupName = resource.UniqueId() - } - securityGroupOpts.GroupName = aws.String(groupName) - - var err error - log.Printf( - "[DEBUG] Security Group create configuration: %#v", securityGroupOpts) - createResp, err := conn.CreateSecurityGroup(securityGroupOpts) - if err != nil { - return fmt.Errorf("Error creating Security Group: %s", err) - } - - d.SetId(*createResp.GroupId) - - log.Printf("[INFO] Security Group ID: %s", d.Id()) - - // Wait for the security group to truly exist - resp, err := waitForSgToExist(conn, d.Id(), d.Timeout(schema.TimeoutCreate)) - if err != nil { - return fmt.Errorf( - "Error waiting for Security Group (%s) to become available: %s", - d.Id(), err) - } - - if err := setTags(conn, d); err != nil { - return err - } - - // AWS defaults all Security Groups to have an ALLOW ALL egress rule. Here we - // revoke that rule, so users don't unknowingly have/use it. - group := resp.(*ec2.SecurityGroup) - if group.VpcId != nil && *group.VpcId != "" { - log.Printf("[DEBUG] Revoking default egress rule for Security Group for %s", d.Id()) - - req := &ec2.RevokeSecurityGroupEgressInput{ - GroupId: createResp.GroupId, - IpPermissions: []*ec2.IpPermission{ - { - FromPort: aws.Int64(int64(0)), - ToPort: aws.Int64(int64(0)), - IpRanges: []*ec2.IpRange{ - { - CidrIp: aws.String("0.0.0.0/0"), - }, - }, - IpProtocol: aws.String("-1"), - }, - }, - } - - if _, err = conn.RevokeSecurityGroupEgress(req); err != nil { - return fmt.Errorf( - "Error revoking default egress rule for Security Group (%s): %s", - d.Id(), err) - } - - log.Printf("[DEBUG] Revoking default IPv6 egress rule for Security Group for %s", d.Id()) - req = &ec2.RevokeSecurityGroupEgressInput{ - GroupId: createResp.GroupId, - IpPermissions: []*ec2.IpPermission{ - { - FromPort: aws.Int64(int64(0)), - ToPort: aws.Int64(int64(0)), - Ipv6Ranges: []*ec2.Ipv6Range{ - { - CidrIpv6: aws.String("::/0"), - }, - }, - IpProtocol: aws.String("-1"), - }, - }, - } - - _, err = conn.RevokeSecurityGroupEgress(req) - if err != nil { - //If we have a NotFound or InvalidParameterValue, then we are trying to remove the default IPv6 egress of a non-IPv6 - //enabled SG - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() != "InvalidPermission.NotFound" && !isAWSErr(err, "InvalidParameterValue", "remote-ipv6-range") { - return fmt.Errorf( - "Error revoking default IPv6 egress rule for Security Group (%s): %s", - d.Id(), err) - } - } - - } - - return resourceAwsSecurityGroupUpdate(d, meta) -} - -func resourceAwsSecurityGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - var sgRaw interface{} - var err error - if d.IsNewResource() { - sgRaw, err = waitForSgToExist(conn, d.Id(), d.Timeout(schema.TimeoutRead)) - } else { - sgRaw, _, err = SGStateRefreshFunc(conn, d.Id())() - } - - if err != nil { - return err - } - - if sgRaw == nil { - log.Printf("[WARN] Security group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - sg := sgRaw.(*ec2.SecurityGroup) - - remoteIngressRules := resourceAwsSecurityGroupIPPermGather(d.Id(), sg.IpPermissions, sg.OwnerId) - remoteEgressRules := resourceAwsSecurityGroupIPPermGather(d.Id(), sg.IpPermissionsEgress, sg.OwnerId) - - localIngressRules := d.Get("ingress").(*schema.Set).List() - localEgressRules := d.Get("egress").(*schema.Set).List() - - // Loop through the local state of rules, doing a match against the remote - // ruleSet we built above. - ingressRules := matchRules("ingress", localIngressRules, remoteIngressRules) - egressRules := matchRules("egress", localEgressRules, remoteEgressRules) - - sgArn := arn.ARN{ - AccountID: aws.StringValue(sg.OwnerId), - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Resource: fmt.Sprintf("security-group/%s", aws.StringValue(sg.GroupId)), - Service: ec2.ServiceName, - } - - d.Set("arn", sgArn.String()) - d.Set("description", sg.Description) - d.Set("name", sg.GroupName) - d.Set("vpc_id", sg.VpcId) - d.Set("owner_id", sg.OwnerId) - - if err := d.Set("ingress", ingressRules); err != nil { - log.Printf("[WARN] Error setting Ingress rule set for (%s): %s", d.Id(), err) - } - - if err := d.Set("egress", egressRules); err != nil { - log.Printf("[WARN] Error setting Egress rule set for (%s): %s", d.Id(), err) - } - - d.Set("tags", tagsToMap(sg.Tags)) - return nil -} - -func resourceAwsSecurityGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - var sgRaw interface{} - var err error - if d.IsNewResource() { - sgRaw, err = waitForSgToExist(conn, d.Id(), d.Timeout(schema.TimeoutRead)) - } else { - sgRaw, _, err = SGStateRefreshFunc(conn, d.Id())() - } - - if err != nil { - return err - } - if sgRaw == nil { - log.Printf("[WARN] Security group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - group := sgRaw.(*ec2.SecurityGroup) - - err = resourceAwsSecurityGroupUpdateRules(d, "ingress", meta, group) - if err != nil { - return err - } - - if d.Get("vpc_id") != nil { - err = resourceAwsSecurityGroupUpdateRules(d, "egress", meta, group) - if err != nil { - return err - } - } - - if !d.IsNewResource() { - if err := setTags(conn, d); err != nil { - return err - } - d.SetPartial("tags") - } - - return resourceAwsSecurityGroupRead(d, meta) -} - -func resourceAwsSecurityGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[DEBUG] Security Group destroy: %v", d.Id()) - - if err := deleteLingeringLambdaENIs(conn, d, "group-id"); err != nil { - return fmt.Errorf("Failed to delete Lambda ENIs: %s", err) - } - - // conditionally revoke rules first before attempting to delete the group - if v := d.Get("revoke_rules_on_delete").(bool); v { - if err := forceRevokeSecurityGroupRules(conn, d); err != nil { - return err - } - } - - return resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { - _, err := conn.DeleteSecurityGroup(&ec2.DeleteSecurityGroupInput{ - GroupId: aws.String(d.Id()), - }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if !ok { - return resource.RetryableError(err) - } - - switch ec2err.Code() { - case "InvalidGroup.NotFound": - return nil - case "DependencyViolation": - // If it is a dependency violation, we want to retry - return resource.RetryableError(err) - default: - // Any other error, we want to quit the retry loop immediately - return resource.NonRetryableError(err) - } - } - - return nil - }) -} - -// Revoke all ingress/egress rules that a Security Group has -func forceRevokeSecurityGroupRules(conn *ec2.EC2, d *schema.ResourceData) error { - sgRaw, _, err := SGStateRefreshFunc(conn, d.Id())() - if err != nil { - return err - } - if sgRaw == nil { - return nil - } - - group := sgRaw.(*ec2.SecurityGroup) - if len(group.IpPermissions) > 0 { - req := &ec2.RevokeSecurityGroupIngressInput{ - GroupId: group.GroupId, - IpPermissions: group.IpPermissions, - } - if group.VpcId == nil || *group.VpcId == "" { - req.GroupId = nil - req.GroupName = group.GroupName - } - _, err = conn.RevokeSecurityGroupIngress(req) - - if err != nil { - return fmt.Errorf( - "Error revoking security group %s rules: %s", - *group.GroupId, err) - } - } - - if len(group.IpPermissionsEgress) > 0 { - req := &ec2.RevokeSecurityGroupEgressInput{ - GroupId: group.GroupId, - IpPermissions: group.IpPermissionsEgress, - } - _, err = conn.RevokeSecurityGroupEgress(req) - - if err != nil { - return fmt.Errorf( - "Error revoking security group %s rules: %s", - *group.GroupId, err) - } - } - - return nil -} - -func resourceAwsSecurityGroupRuleHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%d-", m["from_port"].(int))) - buf.WriteString(fmt.Sprintf("%d-", m["to_port"].(int))) - p := protocolForValue(m["protocol"].(string)) - buf.WriteString(fmt.Sprintf("%s-", p)) - buf.WriteString(fmt.Sprintf("%t-", m["self"].(bool))) - - // We need to make sure to sort the strings below so that we always - // generate the same hash code no matter what is in the set. - if v, ok := m["cidr_blocks"]; ok { - vs := v.([]interface{}) - s := make([]string, len(vs)) - for i, raw := range vs { - s[i] = raw.(string) - } - sort.Strings(s) - - for _, v := range s { - buf.WriteString(fmt.Sprintf("%s-", v)) - } - } - if v, ok := m["ipv6_cidr_blocks"]; ok { - vs := v.([]interface{}) - s := make([]string, len(vs)) - for i, raw := range vs { - s[i] = raw.(string) - } - sort.Strings(s) - - for _, v := range s { - buf.WriteString(fmt.Sprintf("%s-", v)) - } - } - if v, ok := m["prefix_list_ids"]; ok { - vs := v.([]interface{}) - s := make([]string, len(vs)) - for i, raw := range vs { - s[i] = raw.(string) - } - sort.Strings(s) - - for _, v := range s { - buf.WriteString(fmt.Sprintf("%s-", v)) - } - } - if v, ok := m["security_groups"]; ok { - vs := v.(*schema.Set).List() - s := make([]string, len(vs)) - for i, raw := range vs { - s[i] = raw.(string) - } - sort.Strings(s) - - for _, v := range s { - buf.WriteString(fmt.Sprintf("%s-", v)) - } - } - if m["description"].(string) != "" { - buf.WriteString(fmt.Sprintf("%s-", m["description"].(string))) - } - - return hashcode.String(buf.String()) -} - -func resourceAwsSecurityGroupIPPermGather(groupId string, permissions []*ec2.IpPermission, ownerId *string) []map[string]interface{} { - ruleMap := make(map[string]map[string]interface{}) - for _, perm := range permissions { - if len(perm.IpRanges) > 0 { - for _, ip := range perm.IpRanges { - desc := aws.StringValue(ip.Description) - - rule := initSecurityGroupRule(ruleMap, perm, desc) - - raw, ok := rule["cidr_blocks"] - if !ok { - raw = make([]string, 0) - } - list := raw.([]string) - - rule["cidr_blocks"] = append(list, *ip.CidrIp) - } - } - - if len(perm.Ipv6Ranges) > 0 { - for _, ip := range perm.Ipv6Ranges { - desc := aws.StringValue(ip.Description) - - rule := initSecurityGroupRule(ruleMap, perm, desc) - - raw, ok := rule["ipv6_cidr_blocks"] - if !ok { - raw = make([]string, 0) - } - list := raw.([]string) - - rule["ipv6_cidr_blocks"] = append(list, *ip.CidrIpv6) - } - } - - if len(perm.PrefixListIds) > 0 { - for _, pl := range perm.PrefixListIds { - desc := aws.StringValue(pl.Description) - - rule := initSecurityGroupRule(ruleMap, perm, desc) - - raw, ok := rule["prefix_list_ids"] - if !ok { - raw = make([]string, 0) - } - list := raw.([]string) - - rule["prefix_list_ids"] = append(list, *pl.PrefixListId) - } - } - - groups := flattenSecurityGroups(perm.UserIdGroupPairs, ownerId) - if len(groups) > 0 { - for _, g := range groups { - desc := aws.StringValue(g.Description) - - rule := initSecurityGroupRule(ruleMap, perm, desc) - - if *g.GroupId == groupId { - rule["self"] = true - continue - } - - raw, ok := rule["security_groups"] - if !ok { - raw = schema.NewSet(schema.HashString, nil) - } - list := raw.(*schema.Set) - - if g.GroupName != nil { - list.Add(*g.GroupName) - } else { - list.Add(*g.GroupId) - } - rule["security_groups"] = list - } - } - - } - - rules := make([]map[string]interface{}, 0, len(ruleMap)) - for _, m := range ruleMap { - rules = append(rules, m) - } - - return rules -} - -func resourceAwsSecurityGroupUpdateRules( - d *schema.ResourceData, ruleset string, - meta interface{}, group *ec2.SecurityGroup) error { - - if d.HasChange(ruleset) { - o, n := d.GetChange(ruleset) - if o == nil { - o = new(schema.Set) - } - if n == nil { - n = new(schema.Set) - } - - os := resourceAwsSecurityGroupExpandRules(o.(*schema.Set)) - ns := resourceAwsSecurityGroupExpandRules(n.(*schema.Set)) - - remove, err := expandIPPerms(group, resourceAwsSecurityGroupCollapseRules(ruleset, os.Difference(ns).List())) - if err != nil { - return err - } - add, err := expandIPPerms(group, resourceAwsSecurityGroupCollapseRules(ruleset, ns.Difference(os).List())) - if err != nil { - return err - } - - // TODO: We need to handle partial state better in the in-between - // in this update. - - // TODO: It'd be nicer to authorize before removing, but then we have - // to deal with complicated unrolling to get individual CIDR blocks - // to avoid authorizing already authorized sources. Removing before - // adding is easier here, and Terraform should be fast enough to - // not have service issues. - - if len(remove) > 0 || len(add) > 0 { - conn := meta.(*AWSClient).ec2conn - - var err error - if len(remove) > 0 { - log.Printf("[DEBUG] Revoking security group %#v %s rule: %#v", - group, ruleset, remove) - - if ruleset == "egress" { - req := &ec2.RevokeSecurityGroupEgressInput{ - GroupId: group.GroupId, - IpPermissions: remove, - } - _, err = conn.RevokeSecurityGroupEgress(req) - } else { - req := &ec2.RevokeSecurityGroupIngressInput{ - GroupId: group.GroupId, - IpPermissions: remove, - } - if group.VpcId == nil || *group.VpcId == "" { - req.GroupId = nil - req.GroupName = group.GroupName - } - _, err = conn.RevokeSecurityGroupIngress(req) - } - - if err != nil { - return fmt.Errorf( - "Error revoking security group %s rules: %s", - ruleset, err) - } - } - - if len(add) > 0 { - log.Printf("[DEBUG] Authorizing security group %#v %s rule: %#v", - group, ruleset, add) - // Authorize the new rules - if ruleset == "egress" { - req := &ec2.AuthorizeSecurityGroupEgressInput{ - GroupId: group.GroupId, - IpPermissions: add, - } - _, err = conn.AuthorizeSecurityGroupEgress(req) - } else { - req := &ec2.AuthorizeSecurityGroupIngressInput{ - GroupId: group.GroupId, - IpPermissions: add, - } - if group.VpcId == nil || *group.VpcId == "" { - req.GroupId = nil - req.GroupName = group.GroupName - } - - _, err = conn.AuthorizeSecurityGroupIngress(req) - } - - if err != nil { - return fmt.Errorf( - "Error authorizing security group %s rules: %s", - ruleset, err) - } - } - } - } - return nil -} - -// SGStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// a security group. -func SGStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - req := &ec2.DescribeSecurityGroupsInput{ - GroupIds: []*string{aws.String(id)}, - } - resp, err := conn.DescribeSecurityGroups(req) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - if ec2err.Code() == "InvalidSecurityGroupID.NotFound" || - ec2err.Code() == "InvalidGroup.NotFound" { - resp = nil - err = nil - } - } - - if err != nil { - log.Printf("Error on SGStateRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil { - return nil, "", nil - } - - group := resp.SecurityGroups[0] - return group, "exists", nil - } -} - -func waitForSgToExist(conn *ec2.EC2, id string, timeout time.Duration) (interface{}, error) { - log.Printf("[DEBUG] Waiting for Security Group (%s) to exist", id) - stateConf := &resource.StateChangeConf{ - Pending: []string{""}, - Target: []string{"exists"}, - Refresh: SGStateRefreshFunc(conn, id), - Timeout: timeout, - } - - return stateConf.WaitForState() -} - -// matchRules receives the group id, type of rules, and the local / remote maps -// of rules. We iterate through the local set of rules trying to find a matching -// remote rule, which may be structured differently because of how AWS -// aggregates the rules under the to, from, and type. -// -// -// Matching rules are written to state, with their elements removed from the -// remote set -// -// If no match is found, we'll write the remote rule to state and let the graph -// sort things out -func matchRules(rType string, local []interface{}, remote []map[string]interface{}) []map[string]interface{} { - // For each local ip or security_group, we need to match against the remote - // ruleSet until all ips or security_groups are found - - // saves represents the rules that have been identified to be saved to state, - // in the appropriate d.Set("{ingress,egress}") call. - var saves []map[string]interface{} - for _, raw := range local { - l := raw.(map[string]interface{}) - - var selfVal bool - if v, ok := l["self"]; ok { - selfVal = v.(bool) - } - - // matching against self is required to detect rules that only include self - // as the rule. resourceAwsSecurityGroupIPPermGather parses the group out - // and replaces it with self if it's ID is found - localHash := idHash(rType, l["protocol"].(string), int64(l["to_port"].(int)), int64(l["from_port"].(int)), selfVal) - - // loop remote rules, looking for a matching hash - for _, r := range remote { - var remoteSelfVal bool - if v, ok := r["self"]; ok { - remoteSelfVal = v.(bool) - } - - // hash this remote rule and compare it for a match consideration with the - // local rule we're examining - rHash := idHash(rType, r["protocol"].(string), r["to_port"].(int64), r["from_port"].(int64), remoteSelfVal) - if rHash == localHash { - var numExpectedCidrs, numExpectedIpv6Cidrs, numExpectedPrefixLists, numExpectedSGs, numRemoteCidrs, numRemoteIpv6Cidrs, numRemotePrefixLists, numRemoteSGs int - var matchingCidrs []string - var matchingIpv6Cidrs []string - var matchingSGs []string - var matchingPrefixLists []string - - // grab the local/remote cidr and sg groups, capturing the expected and - // actual counts - lcRaw, ok := l["cidr_blocks"] - if ok { - numExpectedCidrs = len(l["cidr_blocks"].([]interface{})) - } - liRaw, ok := l["ipv6_cidr_blocks"] - if ok { - numExpectedIpv6Cidrs = len(l["ipv6_cidr_blocks"].([]interface{})) - } - lpRaw, ok := l["prefix_list_ids"] - if ok { - numExpectedPrefixLists = len(l["prefix_list_ids"].([]interface{})) - } - lsRaw, ok := l["security_groups"] - if ok { - numExpectedSGs = len(l["security_groups"].(*schema.Set).List()) - } - - rcRaw, ok := r["cidr_blocks"] - if ok { - numRemoteCidrs = len(r["cidr_blocks"].([]string)) - } - riRaw, ok := r["ipv6_cidr_blocks"] - if ok { - numRemoteIpv6Cidrs = len(r["ipv6_cidr_blocks"].([]string)) - } - rpRaw, ok := r["prefix_list_ids"] - if ok { - numRemotePrefixLists = len(r["prefix_list_ids"].([]string)) - } - - rsRaw, ok := r["security_groups"] - if ok { - numRemoteSGs = len(r["security_groups"].(*schema.Set).List()) - } - - // check some early failures - if numExpectedCidrs > numRemoteCidrs { - log.Printf("[DEBUG] Local rule has more CIDR blocks, continuing (%d/%d)", numExpectedCidrs, numRemoteCidrs) - continue - } - if numExpectedIpv6Cidrs > numRemoteIpv6Cidrs { - log.Printf("[DEBUG] Local rule has more IPV6 CIDR blocks, continuing (%d/%d)", numExpectedIpv6Cidrs, numRemoteIpv6Cidrs) - continue - } - if numExpectedPrefixLists > numRemotePrefixLists { - log.Printf("[DEBUG] Local rule has more prefix lists, continuing (%d/%d)", numExpectedPrefixLists, numRemotePrefixLists) - continue - } - if numExpectedSGs > numRemoteSGs { - log.Printf("[DEBUG] Local rule has more Security Groups, continuing (%d/%d)", numExpectedSGs, numRemoteSGs) - continue - } - - // match CIDRs by converting both to sets, and using Set methods - var localCidrs []interface{} - if lcRaw != nil { - localCidrs = lcRaw.([]interface{}) - } - localCidrSet := schema.NewSet(schema.HashString, localCidrs) - - // remote cidrs are presented as a slice of strings, so we need to - // reformat them into a slice of interfaces to be used in creating the - // remote cidr set - var remoteCidrs []string - if rcRaw != nil { - remoteCidrs = rcRaw.([]string) - } - // convert remote cidrs to a set, for easy comparisons - var list []interface{} - for _, s := range remoteCidrs { - list = append(list, s) - } - remoteCidrSet := schema.NewSet(schema.HashString, list) - - // Build up a list of local cidrs that are found in the remote set - for _, s := range localCidrSet.List() { - if remoteCidrSet.Contains(s) { - matchingCidrs = append(matchingCidrs, s.(string)) - } - } - - //IPV6 CIDRs - var localIpv6Cidrs []interface{} - if liRaw != nil { - localIpv6Cidrs = liRaw.([]interface{}) - } - localIpv6CidrSet := schema.NewSet(schema.HashString, localIpv6Cidrs) - - var remoteIpv6Cidrs []string - if riRaw != nil { - remoteIpv6Cidrs = riRaw.([]string) - } - var listIpv6 []interface{} - for _, s := range remoteIpv6Cidrs { - listIpv6 = append(listIpv6, s) - } - remoteIpv6CidrSet := schema.NewSet(schema.HashString, listIpv6) - - for _, s := range localIpv6CidrSet.List() { - if remoteIpv6CidrSet.Contains(s) { - matchingIpv6Cidrs = append(matchingIpv6Cidrs, s.(string)) - } - } - - // match prefix lists by converting both to sets, and using Set methods - var localPrefixLists []interface{} - if lpRaw != nil { - localPrefixLists = lpRaw.([]interface{}) - } - localPrefixListsSet := schema.NewSet(schema.HashString, localPrefixLists) - - // remote prefix lists are presented as a slice of strings, so we need to - // reformat them into a slice of interfaces to be used in creating the - // remote prefix list set - var remotePrefixLists []string - if rpRaw != nil { - remotePrefixLists = rpRaw.([]string) - } - // convert remote prefix lists to a set, for easy comparison - list = nil - for _, s := range remotePrefixLists { - list = append(list, s) - } - remotePrefixListsSet := schema.NewSet(schema.HashString, list) - - // Build up a list of local prefix lists that are found in the remote set - for _, s := range localPrefixListsSet.List() { - if remotePrefixListsSet.Contains(s) { - matchingPrefixLists = append(matchingPrefixLists, s.(string)) - } - } - - // match SGs. Both local and remote are already sets - var localSGSet *schema.Set - if lsRaw == nil { - localSGSet = schema.NewSet(schema.HashString, nil) - } else { - localSGSet = lsRaw.(*schema.Set) - } - - var remoteSGSet *schema.Set - if rsRaw == nil { - remoteSGSet = schema.NewSet(schema.HashString, nil) - } else { - remoteSGSet = rsRaw.(*schema.Set) - } - - // Build up a list of local security groups that are found in the remote set - for _, s := range localSGSet.List() { - if remoteSGSet.Contains(s) { - matchingSGs = append(matchingSGs, s.(string)) - } - } - - // compare equalities for matches. - // If we found the number of cidrs and number of sgs, we declare a - // match, and then remove those elements from the remote rule, so that - // this remote rule can still be considered by other local rules - if numExpectedCidrs == len(matchingCidrs) { - if numExpectedIpv6Cidrs == len(matchingIpv6Cidrs) { - if numExpectedPrefixLists == len(matchingPrefixLists) { - if numExpectedSGs == len(matchingSGs) { - // confirm that self references match - var lSelf bool - var rSelf bool - if _, ok := l["self"]; ok { - lSelf = l["self"].(bool) - } - if _, ok := r["self"]; ok { - rSelf = r["self"].(bool) - } - if rSelf == lSelf { - delete(r, "self") - // pop local cidrs from remote - diffCidr := remoteCidrSet.Difference(localCidrSet) - var newCidr []string - for _, cRaw := range diffCidr.List() { - newCidr = append(newCidr, cRaw.(string)) - } - - // reassigning - if len(newCidr) > 0 { - r["cidr_blocks"] = newCidr - } else { - delete(r, "cidr_blocks") - } - - //// IPV6 - //// Comparison - diffIpv6Cidr := remoteIpv6CidrSet.Difference(localIpv6CidrSet) - var newIpv6Cidr []string - for _, cRaw := range diffIpv6Cidr.List() { - newIpv6Cidr = append(newIpv6Cidr, cRaw.(string)) - } - - // reassigning - if len(newIpv6Cidr) > 0 { - r["ipv6_cidr_blocks"] = newIpv6Cidr - } else { - delete(r, "ipv6_cidr_blocks") - } - - // pop local prefix lists from remote - diffPrefixLists := remotePrefixListsSet.Difference(localPrefixListsSet) - var newPrefixLists []string - for _, pRaw := range diffPrefixLists.List() { - newPrefixLists = append(newPrefixLists, pRaw.(string)) - } - - // reassigning - if len(newPrefixLists) > 0 { - r["prefix_list_ids"] = newPrefixLists - } else { - delete(r, "prefix_list_ids") - } - - // pop local sgs from remote - diffSGs := remoteSGSet.Difference(localSGSet) - if len(diffSGs.List()) > 0 { - r["security_groups"] = diffSGs - } else { - delete(r, "security_groups") - } - - // copy over any remote rule description - if _, ok := r["description"]; ok { - l["description"] = r["description"] - } - - saves = append(saves, l) - } - } - } - - } - } - } - } - } - // Here we catch any remote rules that have not been stripped of all self, - // cidrs, and security groups. We'll add remote rules here that have not been - // matched locally, and let the graph sort things out. This will happen when - // rules are added externally to Terraform - for _, r := range remote { - var lenCidr, lenIpv6Cidr, lenPrefixLists, lenSGs int - if rCidrs, ok := r["cidr_blocks"]; ok { - lenCidr = len(rCidrs.([]string)) - } - if rIpv6Cidrs, ok := r["ipv6_cidr_blocks"]; ok { - lenIpv6Cidr = len(rIpv6Cidrs.([]string)) - } - if rPrefixLists, ok := r["prefix_list_ids"]; ok { - lenPrefixLists = len(rPrefixLists.([]string)) - } - if rawSGs, ok := r["security_groups"]; ok { - lenSGs = len(rawSGs.(*schema.Set).List()) - } - - if _, ok := r["self"]; ok { - if r["self"].(bool) { - lenSGs++ - } - } - - if lenSGs+lenCidr+lenIpv6Cidr+lenPrefixLists > 0 { - log.Printf("[DEBUG] Found a remote Rule that wasn't empty: (%#v)", r) - saves = append(saves, r) - } - } - - return saves -} - -// Duplicate ingress/egress block structure and fill out all -// the required fields -func resourceAwsSecurityGroupCopyRule(src map[string]interface{}, self bool, k string, v interface{}) map[string]interface{} { - var keys_to_copy = []string{"description", "from_port", "to_port", "protocol"} - - dst := make(map[string]interface{}) - for _, key := range keys_to_copy { - if val, ok := src[key]; ok { - dst[key] = val - } - } - if k != "" { - dst[k] = v - } - if _, ok := src["self"]; ok { - dst["self"] = self - } - return dst -} - -// Given a set of SG rules (ingress/egress blocks), this function -// will group the rules by from_port/to_port/protocol/description -// tuples. This is inverse operation of -// resourceAwsSecurityGroupExpandRules() -// -// For more detail, see comments for -// resourceAwsSecurityGroupExpandRules() -func resourceAwsSecurityGroupCollapseRules(ruleset string, rules []interface{}) []interface{} { - - var keys_to_collapse = []string{"cidr_blocks", "ipv6_cidr_blocks", "prefix_list_ids", "security_groups"} - - collapsed := make(map[string]map[string]interface{}) - - for _, rule := range rules { - r := rule.(map[string]interface{}) - - ruleHash := idCollapseHash(ruleset, r["protocol"].(string), int64(r["to_port"].(int)), int64(r["from_port"].(int)), r["description"].(string)) - - if _, ok := collapsed[ruleHash]; ok { - if v, ok := r["self"]; ok && v.(bool) { - collapsed[ruleHash]["self"] = r["self"] - } - } else { - collapsed[ruleHash] = r - continue - } - - for _, key := range keys_to_collapse { - if _, ok := r[key]; ok { - if _, ok := collapsed[ruleHash][key]; ok { - if key == "security_groups" { - collapsed[ruleHash][key] = collapsed[ruleHash][key].(*schema.Set).Union(r[key].(*schema.Set)) - } else { - collapsed[ruleHash][key] = append(collapsed[ruleHash][key].([]interface{}), r[key].([]interface{})...) - } - } else { - collapsed[ruleHash][key] = r[key] - } - } - } - } - - values := make([]interface{}, 0, len(collapsed)) - for _, val := range collapsed { - values = append(values, val) - } - return values -} - -// resourceAwsSecurityGroupExpandRules works in pair with -// resourceAwsSecurityGroupCollapseRules and is used as a -// workaround for the problem explained in -// https://github.com/terraform-providers/terraform-provider-aws/pull/4726 -// -// This function converts every ingress/egress block that -// contains multiple rules to multiple blocks with only one -// rule. Doing a Difference operation on such a normalized -// set helps to avoid unnecessary removal of unchanged -// rules during the Apply step. -// -// For example, in terraform syntax, the following block: -// -// ingress { -// from_port = 80 -// to_port = 80 -// protocol = "tcp" -// cidr_blocks = [ -// "192.168.0.1/32", -// "192.168.0.2/32", -// ] -// } -// -// will be converted to the two blocks below: -// -// ingress { -// from_port = 80 -// to_port = 80 -// protocol = "tcp" -// cidr_blocks = [ "192.168.0.1/32" ] -// } -// -// ingress { -// from_port = 80 -// to_port = 80 -// protocol = "tcp" -// cidr_blocks = [ "192.168.0.2/32" ] -// } -// -// Then the Difference operation is executed on the new set -// to find which rules got modified, and the resulting set -// is then passed to resourceAwsSecurityGroupCollapseRules -// to convert the "diff" back to a more compact form for -// execution. Such compact form helps reduce the number of -// API calls. -// -func resourceAwsSecurityGroupExpandRules(rules *schema.Set) *schema.Set { - var keys_to_expand = []string{"cidr_blocks", "ipv6_cidr_blocks", "prefix_list_ids", "security_groups"} - - normalized := schema.NewSet(resourceAwsSecurityGroupRuleHash, nil) - - for _, rawRule := range rules.List() { - rule := rawRule.(map[string]interface{}) - - if v, ok := rule["self"]; ok && v.(bool) { - new_rule := resourceAwsSecurityGroupCopyRule(rule, true, "", nil) - normalized.Add(new_rule) - } - for _, key := range keys_to_expand { - item, exists := rule[key] - if exists { - var list []interface{} - if key == "security_groups" { - list = item.(*schema.Set).List() - } else { - list = item.([]interface{}) - } - for _, v := range list { - var new_rule map[string]interface{} - if key == "security_groups" { - new_v := schema.NewSet(schema.HashString, nil) - new_v.Add(v) - new_rule = resourceAwsSecurityGroupCopyRule(rule, false, key, new_v) - } else { - new_v := make([]interface{}, 0) - new_v = append(new_v, v) - new_rule = resourceAwsSecurityGroupCopyRule(rule, false, key, new_v) - } - normalized.Add(new_rule) - } - } - } - } - - return normalized -} - -// Convert type-to_port-from_port-protocol-description tuple -// to a hash to use as a key in Set. -func idCollapseHash(rType, protocol string, toPort, fromPort int64, description string) string { - var buf bytes.Buffer - buf.WriteString(fmt.Sprintf("%s-", rType)) - buf.WriteString(fmt.Sprintf("%d-", toPort)) - buf.WriteString(fmt.Sprintf("%d-", fromPort)) - buf.WriteString(fmt.Sprintf("%s-", strings.ToLower(protocol))) - buf.WriteString(fmt.Sprintf("%s-", description)) - - return fmt.Sprintf("rule-%d", hashcode.String(buf.String())) -} - -// Creates a unique hash for the type, ports, and protocol, used as a key in -// maps -func idHash(rType, protocol string, toPort, fromPort int64, self bool) string { - var buf bytes.Buffer - buf.WriteString(fmt.Sprintf("%s-", rType)) - buf.WriteString(fmt.Sprintf("%d-", toPort)) - buf.WriteString(fmt.Sprintf("%d-", fromPort)) - buf.WriteString(fmt.Sprintf("%s-", strings.ToLower(protocol))) - buf.WriteString(fmt.Sprintf("%t-", self)) - - return fmt.Sprintf("rule-%d", hashcode.String(buf.String())) -} - -// protocolStateFunc ensures we only store a string in any protocol field -func protocolStateFunc(v interface{}) string { - switch v.(type) { - case string: - p := protocolForValue(v.(string)) - return p - default: - log.Printf("[WARN] Non String value given for Protocol: %#v", v) - return "" - } -} - -// protocolForValue converts a valid Internet Protocol number into it's name -// representation. If a name is given, it validates that it's a proper protocol -// name. Names/numbers are as defined at -// https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml -func protocolForValue(v string) string { - // special case -1 - protocol := strings.ToLower(v) - if protocol == "-1" || protocol == "all" { - return "-1" - } - // if it's a name like tcp, return that - if _, ok := sgProtocolIntegers()[protocol]; ok { - return protocol - } - // convert to int, look for that value - p, err := strconv.Atoi(protocol) - if err != nil { - // we were unable to convert to int, suggesting a string name, but it wasn't - // found above - log.Printf("[WARN] Unable to determine valid protocol: %s", err) - return protocol - } - - for k, v := range sgProtocolIntegers() { - if p == v { - // guard against protocolIntegers sometime in the future not having lower - // case ids in the map - return strings.ToLower(k) - } - } - - // fall through - log.Printf("[WARN] Unable to determine valid protocol: no matching protocols found") - return protocol -} - -// a map of protocol names and their codes, defined at -// https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml, -// documented to be supported by AWS Security Groups -// http://docs.aws.amazon.com/fr_fr/AWSEC2/latest/APIReference/API_IpPermission.html -// Similar to protocolIntegers() used by Network ACLs, but explicitly only -// supports "tcp", "udp", "icmp", and "all" -func sgProtocolIntegers() map[string]int { - return map[string]int{ - "udp": 17, - "tcp": 6, - "icmp": 1, - "all": -1, - } -} - -// The AWS Lambda service creates ENIs behind the scenes and keeps these around for a while -// which would prevent SGs attached to such ENIs from being destroyed -func deleteLingeringLambdaENIs(conn *ec2.EC2, d *schema.ResourceData, filterName string) error { - // Here we carefully find the offenders - params := &ec2.DescribeNetworkInterfacesInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String(filterName), - Values: []*string{aws.String(d.Id())}, - }, - { - Name: aws.String("description"), - Values: []*string{aws.String("AWS Lambda VPC ENI: *")}, - }, - }, - } - networkInterfaceResp, err := conn.DescribeNetworkInterfaces(params) - - if isAWSErr(err, "InvalidNetworkInterfaceID.NotFound", "") { - return nil - } - - if err != nil { - return err - } - - // Then we detach and finally delete those - v := networkInterfaceResp.NetworkInterfaces - for _, eni := range v { - if eni.Attachment != nil { - detachNetworkInterfaceParams := &ec2.DetachNetworkInterfaceInput{ - AttachmentId: eni.Attachment.AttachmentId, - } - _, detachNetworkInterfaceErr := conn.DetachNetworkInterface(detachNetworkInterfaceParams) - - if isAWSErr(detachNetworkInterfaceErr, "InvalidNetworkInterfaceID.NotFound", "") { - return nil - } - - if detachNetworkInterfaceErr != nil { - return detachNetworkInterfaceErr - } - - log.Printf("[DEBUG] Waiting for ENI (%s) to become detached", *eni.NetworkInterfaceId) - stateConf := &resource.StateChangeConf{ - Pending: []string{"true"}, - Target: []string{"false"}, - Refresh: networkInterfaceAttachedRefreshFunc(conn, *eni.NetworkInterfaceId), - Timeout: d.Timeout(schema.TimeoutDelete), - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for ENI (%s) to become detached: %s", *eni.NetworkInterfaceId, err) - } - } - - deleteNetworkInterfaceParams := &ec2.DeleteNetworkInterfaceInput{ - NetworkInterfaceId: eni.NetworkInterfaceId, - } - _, deleteNetworkInterfaceErr := conn.DeleteNetworkInterface(deleteNetworkInterfaceParams) - - if isAWSErr(deleteNetworkInterfaceErr, "InvalidNetworkInterfaceID.NotFound", "") { - return nil - } - - if deleteNetworkInterfaceErr != nil { - return deleteNetworkInterfaceErr - } - } - - return nil -} - -func networkInterfaceAttachedRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - - describe_network_interfaces_request := &ec2.DescribeNetworkInterfacesInput{ - NetworkInterfaceIds: []*string{aws.String(id)}, - } - describeResp, err := conn.DescribeNetworkInterfaces(describe_network_interfaces_request) - - if isAWSErr(err, "InvalidNetworkInterfaceID.NotFound", "") { - return 42, "false", nil - } - - if err != nil { - return nil, "", err - } - - eni := describeResp.NetworkInterfaces[0] - hasAttachment := strconv.FormatBool(eni.Attachment != nil) - log.Printf("[DEBUG] ENI %s has attachment state %s", id, hasAttachment) - return eni, hasAttachment, nil - } -} - -func initSecurityGroupRule(ruleMap map[string]map[string]interface{}, perm *ec2.IpPermission, desc string) map[string]interface{} { - var fromPort, toPort int64 - if v := perm.FromPort; v != nil { - fromPort = *v - } - if v := perm.ToPort; v != nil { - toPort = *v - } - k := fmt.Sprintf("%s-%d-%d-%s", *perm.IpProtocol, fromPort, toPort, desc) - rule, ok := ruleMap[k] - if !ok { - rule = make(map[string]interface{}) - ruleMap[k] = rule - } - rule["protocol"] = *perm.IpProtocol - rule["from_port"] = fromPort - rule["to_port"] = toPort - if desc != "" { - rule["description"] = desc - } - - return rule -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_migrate.go deleted file mode 100644 index 88357447f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_migrate.go +++ /dev/null @@ -1,34 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsSecurityGroupMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS SecurityGroup State v0; migrating to v1") - return migrateAwsSecurityGroupStateV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateAwsSecurityGroupStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() || is.Attributes == nil { - log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") - return is, nil - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - - // set default for revoke_rules_on_delete - is.Attributes["revoke_rules_on_delete"] = "false" - - log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) - return is, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go deleted file mode 100644 index 025f364f6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go +++ /dev/null @@ -1,1003 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "sort" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsSecurityGroupRule() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSecurityGroupRuleCreate, - Read: resourceAwsSecurityGroupRuleRead, - Update: resourceAwsSecurityGroupRuleUpdate, - Delete: resourceAwsSecurityGroupRuleDelete, - Importer: &schema.ResourceImporter{ - State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - importParts, err := validateSecurityGroupRuleImportString(d.Id()) - if err != nil { - return nil, err - } - if err := populateSecurityGroupRuleFromImport(d, importParts); err != nil { - return nil, err - } - return []*schema.ResourceData{d}, nil - }, - }, - - SchemaVersion: 2, - MigrateState: resourceAwsSecurityGroupRuleMigrateState, - - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - Description: "Type of rule, ingress (inbound) or egress (outbound).", - ValidateFunc: validation.StringInSlice([]string{ - "ingress", - "egress", - }, false), - }, - - "from_port": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - // Support existing configurations that have non-zero from_port and to_port defined with all protocols - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - protocol := protocolForValue(d.Get("protocol").(string)) - if protocol == "-1" && old == "0" { - return true - } - return false - }, - }, - - "to_port": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - // Support existing configurations that have non-zero from_port and to_port defined with all protocols - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - protocol := protocolForValue(d.Get("protocol").(string)) - if protocol == "-1" && old == "0" { - return true - } - return false - }, - }, - - "protocol": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: protocolStateFunc, - }, - - "cidr_blocks": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateCIDRNetworkAddress, - }, - }, - - "ipv6_cidr_blocks": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateCIDRNetworkAddress, - }, - }, - - "prefix_list_ids": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "security_group_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "source_security_group_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - ConflictsWith: []string{"cidr_blocks", "self"}, - }, - - "self": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateSecurityGroupRuleDescription, - }, - }, - } -} - -func resourceAwsSecurityGroupRuleCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - sg_id := d.Get("security_group_id").(string) - - awsMutexKV.Lock(sg_id) - defer awsMutexKV.Unlock(sg_id) - - sg, err := findResourceSecurityGroup(conn, sg_id) - if err != nil { - return err - } - - perm, err := expandIPPerm(d, sg) - if err != nil { - return err - } - - // Verify that either 'cidr_blocks', 'self', or 'source_security_group_id' is set - // If they are not set the AWS API will silently fail. This causes TF to hit a timeout - // at 5-minutes waiting for the security group rule to appear, when it was never actually - // created. - if err := validateAwsSecurityGroupRule(d); err != nil { - return err - } - - ruleType := d.Get("type").(string) - isVPC := sg.VpcId != nil && *sg.VpcId != "" - - var autherr error - switch ruleType { - case "ingress": - log.Printf("[DEBUG] Authorizing security group %s %s rule: %s", - sg_id, "Ingress", perm) - - req := &ec2.AuthorizeSecurityGroupIngressInput{ - GroupId: sg.GroupId, - IpPermissions: []*ec2.IpPermission{perm}, - } - - if !isVPC { - req.GroupId = nil - req.GroupName = sg.GroupName - } - - _, autherr = conn.AuthorizeSecurityGroupIngress(req) - - case "egress": - log.Printf("[DEBUG] Authorizing security group %s %s rule: %#v", - sg_id, "Egress", perm) - - req := &ec2.AuthorizeSecurityGroupEgressInput{ - GroupId: sg.GroupId, - IpPermissions: []*ec2.IpPermission{perm}, - } - - _, autherr = conn.AuthorizeSecurityGroupEgress(req) - - default: - return fmt.Errorf("Security Group Rule must be type 'ingress' or type 'egress'") - } - - if autherr != nil { - if awsErr, ok := autherr.(awserr.Error); ok { - if awsErr.Code() == "InvalidPermission.Duplicate" { - return fmt.Errorf(`[WARN] A duplicate Security Group rule was found on (%s). This may be -a side effect of a now-fixed Terraform issue causing two security groups with -identical attributes but different source_security_group_ids to overwrite each -other in the state. See https://github.com/hashicorp/terraform/pull/2376 for more -information and instructions for recovery. Error message: %s`, sg_id, awsErr.Message()) - } - } - - return fmt.Errorf( - "Error authorizing security group rule type %s: %s", - ruleType, autherr) - } - - id := ipPermissionIDHash(sg_id, ruleType, perm) - log.Printf("[DEBUG] Computed group rule ID %s", id) - - retErr := resource.Retry(5*time.Minute, func() *resource.RetryError { - sg, err := findResourceSecurityGroup(conn, sg_id) - - if err != nil { - log.Printf("[DEBUG] Error finding Security Group (%s) for Rule (%s): %s", sg_id, id, err) - return resource.NonRetryableError(err) - } - - var rules []*ec2.IpPermission - switch ruleType { - case "ingress": - rules = sg.IpPermissions - default: - rules = sg.IpPermissionsEgress - } - - rule := findRuleMatch(perm, rules, isVPC) - - if rule == nil { - log.Printf("[DEBUG] Unable to find matching %s Security Group Rule (%s) for Group %s", - ruleType, id, sg_id) - return resource.RetryableError(fmt.Errorf("No match found")) - } - - log.Printf("[DEBUG] Found rule for Security Group Rule (%s): %s", id, rule) - return nil - }) - - if retErr != nil { - return fmt.Errorf("Error finding matching %s Security Group Rule (%s) for Group %s", - ruleType, id, sg_id) - } - - d.SetId(id) - return nil -} - -func resourceAwsSecurityGroupRuleRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - sg_id := d.Get("security_group_id").(string) - sg, err := findResourceSecurityGroup(conn, sg_id) - if _, notFound := err.(securityGroupNotFound); notFound { - // The security group containing this rule no longer exists. - d.SetId("") - return nil - } - if err != nil { - return fmt.Errorf("Error finding security group (%s) for rule (%s): %s", sg_id, d.Id(), err) - } - - isVPC := sg.VpcId != nil && *sg.VpcId != "" - - var rule *ec2.IpPermission - var rules []*ec2.IpPermission - ruleType := d.Get("type").(string) - switch ruleType { - case "ingress": - rules = sg.IpPermissions - default: - rules = sg.IpPermissionsEgress - } - log.Printf("[DEBUG] Rules %v", rules) - - p, err := expandIPPerm(d, sg) - if err != nil { - return err - } - - if len(rules) == 0 { - log.Printf("[WARN] No %s rules were found for Security Group (%s) looking for Security Group Rule (%s)", - ruleType, *sg.GroupName, d.Id()) - d.SetId("") - return nil - } - - rule = findRuleMatch(p, rules, isVPC) - - if rule == nil { - log.Printf("[DEBUG] Unable to find matching %s Security Group Rule (%s) for Group %s", - ruleType, d.Id(), sg_id) - d.SetId("") - return nil - } - - log.Printf("[DEBUG] Found rule for Security Group Rule (%s): %s", d.Id(), rule) - - d.Set("type", ruleType) - if err := setFromIPPerm(d, sg, p); err != nil { - return fmt.Errorf("Error setting IP Permission for Security Group Rule: %s", err) - } - - d.Set("description", descriptionFromIPPerm(d, rule)) - - if strings.Contains(d.Id(), "_") { - // import so fix the id - id := ipPermissionIDHash(sg_id, ruleType, p) - d.SetId(id) - } - - return nil -} - -func resourceAwsSecurityGroupRuleUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - if d.HasChange("description") { - if err := resourceSecurityGroupRuleDescriptionUpdate(conn, d); err != nil { - return err - } - } - - return resourceAwsSecurityGroupRuleRead(d, meta) -} - -func resourceAwsSecurityGroupRuleDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - sg_id := d.Get("security_group_id").(string) - - awsMutexKV.Lock(sg_id) - defer awsMutexKV.Unlock(sg_id) - - sg, err := findResourceSecurityGroup(conn, sg_id) - if err != nil { - return err - } - - perm, err := expandIPPerm(d, sg) - if err != nil { - return err - } - ruleType := d.Get("type").(string) - switch ruleType { - case "ingress": - log.Printf("[DEBUG] Revoking rule (%s) from security group %s:\n%s", - "ingress", sg_id, perm) - req := &ec2.RevokeSecurityGroupIngressInput{ - GroupId: sg.GroupId, - IpPermissions: []*ec2.IpPermission{perm}, - } - - _, err = conn.RevokeSecurityGroupIngress(req) - - if err != nil { - return fmt.Errorf( - "Error revoking security group %s rules: %s", - sg_id, err) - } - case "egress": - - log.Printf("[DEBUG] Revoking security group %#v %s rule: %#v", - sg_id, "egress", perm) - req := &ec2.RevokeSecurityGroupEgressInput{ - GroupId: sg.GroupId, - IpPermissions: []*ec2.IpPermission{perm}, - } - - _, err = conn.RevokeSecurityGroupEgress(req) - - if err != nil { - return fmt.Errorf( - "Error revoking security group %s rules: %s", - sg_id, err) - } - } - - return nil -} - -func findResourceSecurityGroup(conn *ec2.EC2, id string) (*ec2.SecurityGroup, error) { - req := &ec2.DescribeSecurityGroupsInput{ - GroupIds: []*string{aws.String(id)}, - } - resp, err := conn.DescribeSecurityGroups(req) - if err, ok := err.(awserr.Error); ok && err.Code() == "InvalidGroup.NotFound" { - return nil, securityGroupNotFound{id, nil} - } - if err != nil { - return nil, err - } - if resp == nil { - return nil, securityGroupNotFound{id, nil} - } - if len(resp.SecurityGroups) != 1 || resp.SecurityGroups[0] == nil { - return nil, securityGroupNotFound{id, resp.SecurityGroups} - } - - return resp.SecurityGroups[0], nil -} - -type securityGroupNotFound struct { - id string - securityGroups []*ec2.SecurityGroup -} - -func (err securityGroupNotFound) Error() string { - if err.securityGroups == nil { - return fmt.Sprintf("No security group with ID %q", err.id) - } - return fmt.Sprintf("Expected to find one security group with ID %q, got: %#v", - err.id, err.securityGroups) -} - -// ByGroupPair implements sort.Interface for []*ec2.UserIDGroupPairs based on -// GroupID or GroupName field (only one should be set). -type ByGroupPair []*ec2.UserIdGroupPair - -func (b ByGroupPair) Len() int { return len(b) } -func (b ByGroupPair) Swap(i, j int) { b[i], b[j] = b[j], b[i] } -func (b ByGroupPair) Less(i, j int) bool { - if b[i].GroupId != nil && b[j].GroupId != nil { - return *b[i].GroupId < *b[j].GroupId - } - if b[i].GroupName != nil && b[j].GroupName != nil { - return *b[i].GroupName < *b[j].GroupName - } - - panic("mismatched security group rules, may be a terraform bug") -} - -func findRuleMatch(p *ec2.IpPermission, rules []*ec2.IpPermission, isVPC bool) *ec2.IpPermission { - var rule *ec2.IpPermission - for _, r := range rules { - if p.ToPort != nil && r.ToPort != nil && *p.ToPort != *r.ToPort { - continue - } - - if p.FromPort != nil && r.FromPort != nil && *p.FromPort != *r.FromPort { - continue - } - - if p.IpProtocol != nil && r.IpProtocol != nil && *p.IpProtocol != *r.IpProtocol { - continue - } - - remaining := len(p.IpRanges) - for _, ip := range p.IpRanges { - for _, rip := range r.IpRanges { - if ip.CidrIp == nil || rip.CidrIp == nil { - continue - } - if *ip.CidrIp == *rip.CidrIp { - remaining-- - } - } - } - - if remaining > 0 { - continue - } - - remaining = len(p.Ipv6Ranges) - for _, ipv6 := range p.Ipv6Ranges { - for _, ipv6ip := range r.Ipv6Ranges { - if ipv6.CidrIpv6 == nil || ipv6ip.CidrIpv6 == nil { - continue - } - if *ipv6.CidrIpv6 == *ipv6ip.CidrIpv6 { - remaining-- - } - } - } - - if remaining > 0 { - continue - } - - remaining = len(p.PrefixListIds) - for _, pl := range p.PrefixListIds { - for _, rpl := range r.PrefixListIds { - if pl.PrefixListId == nil || rpl.PrefixListId == nil { - continue - } - if *pl.PrefixListId == *rpl.PrefixListId { - remaining-- - } - } - } - - if remaining > 0 { - continue - } - - remaining = len(p.UserIdGroupPairs) - for _, ip := range p.UserIdGroupPairs { - for _, rip := range r.UserIdGroupPairs { - if isVPC { - if ip.GroupId == nil || rip.GroupId == nil { - continue - } - if *ip.GroupId == *rip.GroupId { - remaining-- - } - } else { - if ip.GroupName == nil || rip.GroupName == nil { - continue - } - if *ip.GroupName == *rip.GroupName { - remaining-- - } - } - } - } - - if remaining > 0 { - continue - } - - rule = r - } - return rule -} - -func ipPermissionIDHash(sg_id, ruleType string, ip *ec2.IpPermission) string { - var buf bytes.Buffer - buf.WriteString(fmt.Sprintf("%s-", sg_id)) - if ip.FromPort != nil && *ip.FromPort > 0 { - buf.WriteString(fmt.Sprintf("%d-", *ip.FromPort)) - } - if ip.ToPort != nil && *ip.ToPort > 0 { - buf.WriteString(fmt.Sprintf("%d-", *ip.ToPort)) - } - buf.WriteString(fmt.Sprintf("%s-", *ip.IpProtocol)) - buf.WriteString(fmt.Sprintf("%s-", ruleType)) - - // We need to make sure to sort the strings below so that we always - // generate the same hash code no matter what is in the set. - if len(ip.IpRanges) > 0 { - s := make([]string, len(ip.IpRanges)) - for i, r := range ip.IpRanges { - s[i] = *r.CidrIp - } - sort.Strings(s) - - for _, v := range s { - buf.WriteString(fmt.Sprintf("%s-", v)) - } - } - - if len(ip.Ipv6Ranges) > 0 { - s := make([]string, len(ip.Ipv6Ranges)) - for i, r := range ip.Ipv6Ranges { - s[i] = *r.CidrIpv6 - } - sort.Strings(s) - - for _, v := range s { - buf.WriteString(fmt.Sprintf("%s-", v)) - } - } - - if len(ip.PrefixListIds) > 0 { - s := make([]string, len(ip.PrefixListIds)) - for i, pl := range ip.PrefixListIds { - s[i] = *pl.PrefixListId - } - sort.Strings(s) - - for _, v := range s { - buf.WriteString(fmt.Sprintf("%s-", v)) - } - } - - if len(ip.UserIdGroupPairs) > 0 { - sort.Sort(ByGroupPair(ip.UserIdGroupPairs)) - for _, pair := range ip.UserIdGroupPairs { - if pair.GroupId != nil { - buf.WriteString(fmt.Sprintf("%s-", *pair.GroupId)) - } else { - buf.WriteString("-") - } - if pair.GroupName != nil { - buf.WriteString(fmt.Sprintf("%s-", *pair.GroupName)) - } else { - buf.WriteString("-") - } - } - } - - return fmt.Sprintf("sgrule-%d", hashcode.String(buf.String())) -} - -func expandIPPerm(d *schema.ResourceData, sg *ec2.SecurityGroup) (*ec2.IpPermission, error) { - var perm ec2.IpPermission - - protocol := protocolForValue(d.Get("protocol").(string)) - perm.IpProtocol = aws.String(protocol) - - // InvalidParameterValue: When protocol is ALL, you cannot specify from-port. - if protocol != "-1" { - perm.FromPort = aws.Int64(int64(d.Get("from_port").(int))) - perm.ToPort = aws.Int64(int64(d.Get("to_port").(int))) - } - - // build a group map that behaves like a set - groups := make(map[string]bool) - if raw, ok := d.GetOk("source_security_group_id"); ok { - groups[raw.(string)] = true - } - - if v, ok := d.GetOk("self"); ok && v.(bool) { - if sg.VpcId != nil && *sg.VpcId != "" { - groups[*sg.GroupId] = true - } else { - groups[*sg.GroupName] = true - } - } - - description := d.Get("description").(string) - - if len(groups) > 0 { - perm.UserIdGroupPairs = make([]*ec2.UserIdGroupPair, len(groups)) - // build string list of group name/ids - var gl []string - for k := range groups { - gl = append(gl, k) - } - - for i, name := range gl { - ownerId, id := "", name - if items := strings.Split(id, "/"); len(items) > 1 { - ownerId, id = items[0], items[1] - } - - perm.UserIdGroupPairs[i] = &ec2.UserIdGroupPair{ - GroupId: aws.String(id), - UserId: aws.String(ownerId), - } - - if sg.VpcId == nil || *sg.VpcId == "" { - perm.UserIdGroupPairs[i].GroupId = nil - perm.UserIdGroupPairs[i].GroupName = aws.String(id) - perm.UserIdGroupPairs[i].UserId = nil - } - - if description != "" { - perm.UserIdGroupPairs[i].Description = aws.String(description) - } - } - } - - if raw, ok := d.GetOk("cidr_blocks"); ok { - list := raw.([]interface{}) - perm.IpRanges = make([]*ec2.IpRange, len(list)) - for i, v := range list { - cidrIP, ok := v.(string) - if !ok { - return nil, fmt.Errorf("empty element found in cidr_blocks - consider using the compact function") - } - perm.IpRanges[i] = &ec2.IpRange{CidrIp: aws.String(cidrIP)} - - if description != "" { - perm.IpRanges[i].Description = aws.String(description) - } - } - } - - if raw, ok := d.GetOk("ipv6_cidr_blocks"); ok { - list := raw.([]interface{}) - perm.Ipv6Ranges = make([]*ec2.Ipv6Range, len(list)) - for i, v := range list { - cidrIP, ok := v.(string) - if !ok { - return nil, fmt.Errorf("empty element found in ipv6_cidr_blocks - consider using the compact function") - } - perm.Ipv6Ranges[i] = &ec2.Ipv6Range{CidrIpv6: aws.String(cidrIP)} - - if description != "" { - perm.Ipv6Ranges[i].Description = aws.String(description) - } - } - } - - if raw, ok := d.GetOk("prefix_list_ids"); ok { - list := raw.([]interface{}) - perm.PrefixListIds = make([]*ec2.PrefixListId, len(list)) - for i, v := range list { - prefixListID, ok := v.(string) - if !ok { - return nil, fmt.Errorf("empty element found in prefix_list_ids - consider using the compact function") - } - perm.PrefixListIds[i] = &ec2.PrefixListId{PrefixListId: aws.String(prefixListID)} - - if description != "" { - perm.PrefixListIds[i].Description = aws.String(description) - } - } - } - - return &perm, nil -} - -func setFromIPPerm(d *schema.ResourceData, sg *ec2.SecurityGroup, rule *ec2.IpPermission) error { - isVPC := sg.VpcId != nil && *sg.VpcId != "" - - d.Set("from_port", rule.FromPort) - d.Set("to_port", rule.ToPort) - d.Set("protocol", rule.IpProtocol) - - var cb []string - for _, c := range rule.IpRanges { - cb = append(cb, *c.CidrIp) - } - d.Set("cidr_blocks", cb) - - var ipv6 []string - for _, ip := range rule.Ipv6Ranges { - ipv6 = append(ipv6, *ip.CidrIpv6) - } - d.Set("ipv6_cidr_blocks", ipv6) - - var pl []string - for _, p := range rule.PrefixListIds { - pl = append(pl, *p.PrefixListId) - } - d.Set("prefix_list_ids", pl) - - if len(rule.UserIdGroupPairs) > 0 { - s := rule.UserIdGroupPairs[0] - - if isVPC { - d.Set("source_security_group_id", *s.GroupId) - } else { - d.Set("source_security_group_id", *s.GroupName) - } - } - - return nil -} - -func descriptionFromIPPerm(d *schema.ResourceData, rule *ec2.IpPermission) string { - // probe IpRanges - cidrIps := make(map[string]bool) - if raw, ok := d.GetOk("cidr_blocks"); ok { - for _, v := range raw.([]interface{}) { - cidrIps[v.(string)] = true - } - } - - if len(cidrIps) > 0 { - for _, c := range rule.IpRanges { - if _, ok := cidrIps[*c.CidrIp]; !ok { - continue - } - - if desc := aws.StringValue(c.Description); desc != "" { - return desc - } - } - } - - // probe Ipv6Ranges - cidrIpv6s := make(map[string]bool) - if raw, ok := d.GetOk("ipv6_cidr_blocks"); ok { - for _, v := range raw.([]interface{}) { - cidrIpv6s[v.(string)] = true - } - } - - if len(cidrIpv6s) > 0 { - for _, ip := range rule.Ipv6Ranges { - if _, ok := cidrIpv6s[*ip.CidrIpv6]; !ok { - continue - } - - if desc := aws.StringValue(ip.Description); desc != "" { - return desc - } - } - } - - // probe PrefixListIds - listIds := make(map[string]bool) - if raw, ok := d.GetOk("prefix_list_ids"); ok { - for _, v := range raw.([]interface{}) { - listIds[v.(string)] = true - } - } - - if len(listIds) > 0 { - for _, p := range rule.PrefixListIds { - if _, ok := listIds[*p.PrefixListId]; !ok { - continue - } - - if desc := aws.StringValue(p.Description); desc != "" { - return desc - } - } - } - - // probe UserIdGroupPairs - groupIds := make(map[string]bool) - if raw, ok := d.GetOk("source_security_group_id"); ok { - groupIds[raw.(string)] = true - } - - if len(groupIds) > 0 { - for _, gp := range rule.UserIdGroupPairs { - if _, ok := groupIds[*gp.GroupId]; !ok { - continue - } - - if desc := aws.StringValue(gp.Description); desc != "" { - return desc - } - } - } - - return "" -} - -// Validates that either 'cidr_blocks', 'ipv6_cidr_blocks', 'self', or 'source_security_group_id' is set -func validateAwsSecurityGroupRule(d *schema.ResourceData) error { - blocks, blocksOk := d.GetOk("cidr_blocks") - self, selfOk := d.GetOk("self") - if blocksOk && self.(bool) { - return fmt.Errorf("'self': conflicts with 'cidr_blocks' (%#v)", blocks) - } - - _, ipv6Ok := d.GetOk("ipv6_cidr_blocks") - _, sourceOk := d.GetOk("source_security_group_id") - _, prefixOk := d.GetOk("prefix_list_ids") - if !blocksOk && !sourceOk && !selfOk && !prefixOk && !ipv6Ok { - return fmt.Errorf( - "One of ['cidr_blocks', 'ipv6_cidr_blocks', 'self', 'source_security_group_id', 'prefix_list_ids'] must be set to create an AWS Security Group Rule") - } - return nil -} - -func resourceSecurityGroupRuleDescriptionUpdate(conn *ec2.EC2, d *schema.ResourceData) error { - sg_id := d.Get("security_group_id").(string) - - awsMutexKV.Lock(sg_id) - defer awsMutexKV.Unlock(sg_id) - - sg, err := findResourceSecurityGroup(conn, sg_id) - if err != nil { - return err - } - - perm, err := expandIPPerm(d, sg) - if err != nil { - return err - } - ruleType := d.Get("type").(string) - switch ruleType { - case "ingress": - req := &ec2.UpdateSecurityGroupRuleDescriptionsIngressInput{ - GroupId: sg.GroupId, - IpPermissions: []*ec2.IpPermission{perm}, - } - - _, err = conn.UpdateSecurityGroupRuleDescriptionsIngress(req) - - if err != nil { - return fmt.Errorf( - "Error updating security group %s rule description: %s", - sg_id, err) - } - case "egress": - req := &ec2.UpdateSecurityGroupRuleDescriptionsEgressInput{ - GroupId: sg.GroupId, - IpPermissions: []*ec2.IpPermission{perm}, - } - - _, err = conn.UpdateSecurityGroupRuleDescriptionsEgress(req) - - if err != nil { - return fmt.Errorf( - "Error updating security group %s rule description: %s", - sg_id, err) - } - } - - return nil -} - -// validateSecurityGroupRuleImportString does minimal validation of import string without going to AWS -func validateSecurityGroupRuleImportString(importStr string) ([]string, error) { - // example: sg-09a093729ef9382a6_ingress_tcp_8000_8000_10.0.3.0/24 - // example: sg-09a093729ef9382a6_ingress_92_0_65536_10.0.3.0/24_10.0.4.0/24 - // example: sg-09a093729ef9382a6_egress_tcp_8000_8000_10.0.3.0/24 - // example: sg-09a093729ef9382a6_egress_tcp_8000_8000_pl-34800000 - // example: sg-09a093729ef9382a6_ingress_all_0_65536_sg-08123412342323 - // example: sg-09a093729ef9382a6_ingress_tcp_100_121_10.1.0.0/16_2001:db8::/48_10.2.0.0/16_2002:db8::/48 - - log.Printf("[DEBUG] Validating import string %s", importStr) - - importParts := strings.Split(strings.ToLower(importStr), "_") - errStr := "unexpected format of import string (%q), expected SECURITYGROUPID_TYPE_PROTOCOL_FROMPORT_TOPORT_SOURCE[_SOURCE]*: %s" - if len(importParts) < 6 { - return nil, fmt.Errorf(errStr, importStr, "too few parts") - } - - sgID := importParts[0] - ruleType := importParts[1] - protocol := importParts[2] - fromPort := importParts[3] - toPort := importParts[4] - sources := importParts[5:] - - if !strings.HasPrefix(sgID, "sg-") { - return nil, fmt.Errorf(errStr, importStr, "invalid security group ID") - } - - if ruleType != "ingress" && ruleType != "egress" { - return nil, fmt.Errorf(errStr, importStr, "expecting 'ingress' or 'egress'") - } - - if _, ok := sgProtocolIntegers()[protocol]; !ok { - if _, err := strconv.Atoi(protocol); err != nil { - return nil, fmt.Errorf(errStr, importStr, "protocol must be tcp/udp/icmp/all or a number") - } - } - - if p1, err := strconv.Atoi(fromPort); err != nil { - return nil, fmt.Errorf(errStr, importStr, "invalid port") - } else if p2, err := strconv.Atoi(toPort); err != nil || p2 < p1 { - return nil, fmt.Errorf(errStr, importStr, "invalid port") - } - - for _, source := range sources { - // will be properly validated later - if source != "self" && !strings.Contains(source, "sg-") && !strings.Contains(source, "pl-") && !strings.Contains(source, ":") && !strings.Contains(source, ".") { - return nil, fmt.Errorf(errStr, importStr, "source must be cidr, ipv6cidr, prefix list, 'self', or a sg ID") - } - } - - log.Printf("[DEBUG] Validated import string %s", importStr) - return importParts, nil -} - -func populateSecurityGroupRuleFromImport(d *schema.ResourceData, importParts []string) error { - log.Printf("[DEBUG] Populating resource data on import: %v", importParts) - - sgID := importParts[0] - ruleType := importParts[1] - protocol := importParts[2] - fromPort, _ := strconv.Atoi(importParts[3]) - toPort, _ := strconv.Atoi(importParts[4]) - sources := importParts[5:] - - d.Set("security_group_id", sgID) - - if ruleType == "ingress" { - d.Set("type", ruleType) - } else { - d.Set("type", "egress") - } - - d.Set("protocol", protocolForValue(protocol)) - d.Set("from_port", fromPort) - d.Set("to_port", toPort) - - d.Set("self", false) - var cidrs []string - var prefixList []string - var ipv6cidrs []string - for _, source := range sources { - if source == "self" { - d.Set("self", true) - } else if strings.Contains(source, "sg-") { - d.Set("source_security_group_id", source) - } else if strings.Contains(source, "pl-") { - prefixList = append(prefixList, source) - } else if strings.Contains(source, ":") { - ipv6cidrs = append(ipv6cidrs, source) - } else { - cidrs = append(cidrs, source) - } - } - d.Set("ipv6_cidr_blocks", ipv6cidrs) - d.Set("cidr_blocks", cidrs) - d.Set("prefix_list_ids", prefixList) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule_migrate.go deleted file mode 100644 index 1b2cb21f8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule_migrate.go +++ /dev/null @@ -1,105 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsSecurityGroupRuleMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS Security Group State v0; migrating to v1") - return migrateSGRuleStateV0toV1(is) - case 1: - log.Println("[INFO] Found AWS Security Group State v1; migrating to v2") - // migrating to version 2 of the schema is the same as 0->1, since the - // method signature has changed now and will use the security group id in - // the hash - return migrateSGRuleStateV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateSGRuleStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() { - log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") - return is, nil - } - - perm, err := migrateExpandIPPerm(is.Attributes) - - if err != nil { - return nil, fmt.Errorf("Error making new IP Permission in Security Group migration") - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - newID := ipPermissionIDHash(is.Attributes["security_group_id"], is.Attributes["type"], perm) - is.Attributes["id"] = newID - is.ID = newID - log.Printf("[DEBUG] Attributes after migration: %#v, new id: %s", is.Attributes, newID) - return is, nil -} - -func migrateExpandIPPerm(attrs map[string]string) (*ec2.IpPermission, error) { - var perm ec2.IpPermission - tp, err := strconv.Atoi(attrs["to_port"]) - if err != nil { - return nil, fmt.Errorf("Error converting to_port in Security Group migration") - } - - fp, err := strconv.Atoi(attrs["from_port"]) - if err != nil { - return nil, fmt.Errorf("Error converting from_port in Security Group migration") - } - - perm.ToPort = aws.Int64(int64(tp)) - perm.FromPort = aws.Int64(int64(fp)) - perm.IpProtocol = aws.String(attrs["protocol"]) - - groups := make(map[string]bool) - if attrs["self"] == "true" { - groups[attrs["security_group_id"]] = true - } - - if attrs["source_security_group_id"] != "" { - groups[attrs["source_security_group_id"]] = true - } - - if len(groups) > 0 { - perm.UserIdGroupPairs = make([]*ec2.UserIdGroupPair, len(groups)) - // build string list of group name/ids - var gl []string - for k := range groups { - gl = append(gl, k) - } - - for i, name := range gl { - perm.UserIdGroupPairs[i] = &ec2.UserIdGroupPair{ - GroupId: aws.String(name), - } - } - } - - var cb []string - for k, v := range attrs { - if k != "cidr_blocks.#" && strings.HasPrefix(k, "cidr_blocks") { - cb = append(cb, v) - } - } - if len(cb) > 0 { - perm.IpRanges = make([]*ec2.IpRange, len(cb)) - for i, v := range cb { - perm.IpRanges[i] = &ec2.IpRange{CidrIp: aws.String(v)} - } - } - - return &perm, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_account.go deleted file mode 100644 index d0d8d1caf..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_account.go +++ /dev/null @@ -1,68 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/service/securityhub" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSecurityHubAccount() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSecurityHubAccountCreate, - Read: resourceAwsSecurityHubAccountRead, - Delete: resourceAwsSecurityHubAccountDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{}, - } -} - -func resourceAwsSecurityHubAccountCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).securityhubconn - log.Print("[DEBUG] Enabling Security Hub for account") - - _, err := conn.EnableSecurityHub(&securityhub.EnableSecurityHubInput{}) - - if err != nil { - return fmt.Errorf("Error enabling Security Hub for account: %s", err) - } - - d.SetId(meta.(*AWSClient).accountid) - - return resourceAwsSecurityHubAccountRead(d, meta) -} - -func resourceAwsSecurityHubAccountRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).securityhubconn - - log.Printf("[DEBUG] Checking if Security Hub is enabled") - _, err := conn.GetEnabledStandards(&securityhub.GetEnabledStandardsInput{}) - - if err != nil { - // Can only read enabled standards if Security Hub is enabled - if isAWSErr(err, "InvalidAccessException", "not subscribed to AWS Security Hub") { - d.SetId("") - return nil - } - return fmt.Errorf("Error checking if Security Hub is enabled: %s", err) - } - - return nil -} - -func resourceAwsSecurityHubAccountDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).securityhubconn - log.Print("[DEBUG] Disabling Security Hub for account") - - _, err := conn.DisableSecurityHub(&securityhub.DisableSecurityHubInput{}) - - if err != nil { - return fmt.Errorf("Error disabling Security Hub for account: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_product_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_product_subscription.go deleted file mode 100644 index dece3fc8b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_product_subscription.go +++ /dev/null @@ -1,134 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/securityhub" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSecurityHubProductSubscription() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSecurityHubProductSubscriptionCreate, - Read: resourceAwsSecurityHubProductSubscriptionRead, - Delete: resourceAwsSecurityHubProductSubscriptionDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "product_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsSecurityHubProductSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).securityhubconn - productArn := d.Get("product_arn").(string) - - log.Printf("[DEBUG] Enabling Security Hub product subscription for product %s", productArn) - - resp, err := conn.EnableImportFindingsForProduct(&securityhub.EnableImportFindingsForProductInput{ - ProductArn: aws.String(productArn), - }) - - if err != nil { - return fmt.Errorf("Error enabling Security Hub product subscription for product %s: %s", productArn, err) - } - - d.SetId(fmt.Sprintf("%s,%s", productArn, *resp.ProductSubscriptionArn)) - - return resourceAwsSecurityHubProductSubscriptionRead(d, meta) -} - -func resourceAwsSecurityHubProductSubscriptionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).securityhubconn - - productArn, productSubscriptionArn, err := resourceAwsSecurityHubProductSubscriptionParseId(d.Id()) - - if err != nil { - return err - } - - log.Printf("[DEBUG] Reading Security Hub product subscriptions to find %s", d.Id()) - - exists, err := resourceAwsSecurityHubProductSubscriptionCheckExists(conn, productSubscriptionArn) - - if err != nil { - return fmt.Errorf("Error reading Security Hub product subscriptions to find %s: %s", d.Id(), err) - } - - if !exists { - log.Printf("[WARN] Security Hub product subscriptions (%s) not found, removing from state", d.Id()) - d.SetId("") - } - - d.Set("product_arn", productArn) - d.Set("arn", productSubscriptionArn) - - return nil -} - -func resourceAwsSecurityHubProductSubscriptionCheckExists(conn *securityhub.SecurityHub, productSubscriptionArn string) (bool, error) { - input := &securityhub.ListEnabledProductsForImportInput{} - exists := false - - err := conn.ListEnabledProductsForImportPages(input, func(page *securityhub.ListEnabledProductsForImportOutput, lastPage bool) bool { - for _, readProductSubscriptionArn := range page.ProductSubscriptions { - if aws.StringValue(readProductSubscriptionArn) == productSubscriptionArn { - exists = true - return false - } - } - return !lastPage - }) - - if err != nil { - return false, err - } - - return exists, nil -} - -func resourceAwsSecurityHubProductSubscriptionParseId(id string) (string, string, error) { - parts := strings.SplitN(id, ",", 2) - - if len(parts) != 2 { - return "", "", fmt.Errorf("Expected Security Hub product subscription ID in format , - received: %s", id) - } - - return parts[0], parts[1], nil -} - -func resourceAwsSecurityHubProductSubscriptionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).securityhubconn - log.Printf("[DEBUG] Disabling Security Hub product subscription %s", d.Id()) - - _, productSubscriptionArn, err := resourceAwsSecurityHubProductSubscriptionParseId(d.Id()) - - if err != nil { - return err - } - - _, err = conn.DisableImportFindingsForProduct(&securityhub.DisableImportFindingsForProductInput{ - ProductSubscriptionArn: aws.String(productSubscriptionArn), - }) - - if err != nil { - return fmt.Errorf("Error disabling Security Hub product subscription %s: %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_standards_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_standards_subscription.go deleted file mode 100644 index b40bf660a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_standards_subscription.go +++ /dev/null @@ -1,93 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/securityhub" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSecurityHubStandardsSubscription() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSecurityHubStandardsSubscriptionCreate, - Read: resourceAwsSecurityHubStandardsSubscriptionRead, - Delete: resourceAwsSecurityHubStandardsSubscriptionDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "standards_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - }, - } -} - -func resourceAwsSecurityHubStandardsSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).securityhubconn - log.Printf("[DEBUG] Enabling Security Hub standard %s", d.Get("standards_arn")) - - resp, err := conn.BatchEnableStandards(&securityhub.BatchEnableStandardsInput{ - StandardsSubscriptionRequests: []*securityhub.StandardsSubscriptionRequest{ - { - StandardsArn: aws.String(d.Get("standards_arn").(string)), - }, - }, - }) - - if err != nil { - return fmt.Errorf("Error enabling Security Hub standard: %s", err) - } - - standardsSubscription := resp.StandardsSubscriptions[0] - - d.SetId(*standardsSubscription.StandardsSubscriptionArn) - - return resourceAwsSecurityHubStandardsSubscriptionRead(d, meta) -} - -func resourceAwsSecurityHubStandardsSubscriptionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).securityhubconn - - log.Printf("[DEBUG] Reading Security Hub standard %s", d.Id()) - resp, err := conn.GetEnabledStandards(&securityhub.GetEnabledStandardsInput{ - StandardsSubscriptionArns: []*string{aws.String(d.Id())}, - }) - - if err != nil { - return fmt.Errorf("Error reading Security Hub standard %s: %s", d.Id(), err) - } - - if len(resp.StandardsSubscriptions) == 0 { - log.Printf("[WARN] Security Hub standard (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - standardsSubscription := resp.StandardsSubscriptions[0] - - d.Set("standards_arn", standardsSubscription.StandardsArn) - - return nil -} - -func resourceAwsSecurityHubStandardsSubscriptionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).securityhubconn - log.Printf("[DEBUG] Disabling Security Hub standard %s", d.Id()) - - _, err := conn.BatchDisableStandards(&securityhub.BatchDisableStandardsInput{ - StandardsSubscriptionArns: []*string{aws.String(d.Id())}, - }) - - if err != nil { - return fmt.Errorf("Error disabling Security Hub standard %s: %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_http_namespace.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_http_namespace.go deleted file mode 100644 index b6653809b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_http_namespace.go +++ /dev/null @@ -1,130 +0,0 @@ -package aws - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/servicediscovery" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsServiceDiscoveryHttpNamespace() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsServiceDiscoveryHttpNamespaceCreate, - Read: resourceAwsServiceDiscoveryHttpNamespaceRead, - Delete: resourceAwsServiceDiscoveryHttpNamespaceDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateServiceDiscoveryHttpNamespaceName, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsServiceDiscoveryHttpNamespaceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sdconn - - name := d.Get("name").(string) - - input := &servicediscovery.CreateHttpNamespaceInput{ - Name: aws.String(name), - CreatorRequestId: aws.String(resource.UniqueId()), - } - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - resp, err := conn.CreateHttpNamespace(input) - if err != nil { - return fmt.Errorf("error creating Service Discovery HTTP Namespace (%s): %s", name, err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, - Target: []string{servicediscovery.OperationStatusSuccess}, - Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), - Timeout: 5 * time.Minute, - } - - opresp, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for Service Discovery HTTP Namespace (%s) creation: %s", name, err) - } - - d.SetId(*opresp.(*servicediscovery.GetOperationOutput).Operation.Targets["NAMESPACE"]) - return resourceAwsServiceDiscoveryHttpNamespaceRead(d, meta) -} - -func resourceAwsServiceDiscoveryHttpNamespaceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sdconn - - input := &servicediscovery.GetNamespaceInput{ - Id: aws.String(d.Id()), - } - - resp, err := conn.GetNamespace(input) - if err != nil { - if isAWSErr(err, servicediscovery.ErrCodeNamespaceNotFound, "") { - d.SetId("") - return nil - } - return fmt.Errorf("error reading Service Discovery HTTP Namespace (%s): %s", d.Id(), err) - } - - d.Set("name", resp.Namespace.Name) - d.Set("description", resp.Namespace.Description) - d.Set("arn", resp.Namespace.Arn) - - return nil -} - -func resourceAwsServiceDiscoveryHttpNamespaceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sdconn - - input := &servicediscovery.DeleteNamespaceInput{ - Id: aws.String(d.Id()), - } - - resp, err := conn.DeleteNamespace(input) - if err != nil { - if isAWSErr(err, servicediscovery.ErrCodeNamespaceNotFound, "") { - d.SetId("") - return nil - } - return fmt.Errorf("error deleting Service Discovery HTTP Namespace (%s): %s", d.Id(), err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, - Target: []string{servicediscovery.OperationStatusSuccess}, - Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), - Timeout: 5 * time.Minute, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for Service Discovery HTTP Namespace (%s) deletion: %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_private_dns_namespace.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_private_dns_namespace.go deleted file mode 100644 index 24e899ec4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_private_dns_namespace.go +++ /dev/null @@ -1,134 +0,0 @@ -package aws - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/servicediscovery" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsServiceDiscoveryPrivateDnsNamespace() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsServiceDiscoveryPrivateDnsNamespaceCreate, - Read: resourceAwsServiceDiscoveryPrivateDnsNamespaceRead, - Delete: resourceAwsServiceDiscoveryPrivateDnsNamespaceDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "vpc": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "hosted_zone": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsServiceDiscoveryPrivateDnsNamespaceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sdconn - - name := d.Get("name").(string) - // The CreatorRequestId has a limit of 64 bytes - var requestId string - if len(name) > (64 - resource.UniqueIDSuffixLength) { - requestId = resource.PrefixedUniqueId(name[0:(64 - resource.UniqueIDSuffixLength - 1)]) - } else { - requestId = resource.PrefixedUniqueId(name) - } - - input := &servicediscovery.CreatePrivateDnsNamespaceInput{ - Name: aws.String(name), - Vpc: aws.String(d.Get("vpc").(string)), - CreatorRequestId: aws.String(requestId), - } - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - resp, err := conn.CreatePrivateDnsNamespace(input) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, - Target: []string{servicediscovery.OperationStatusSuccess}, - Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), - Timeout: 5 * time.Minute, - } - - opresp, err := stateConf.WaitForState() - if err != nil { - return err - } - - d.SetId(*opresp.(*servicediscovery.GetOperationOutput).Operation.Targets["NAMESPACE"]) - return resourceAwsServiceDiscoveryPrivateDnsNamespaceRead(d, meta) -} - -func resourceAwsServiceDiscoveryPrivateDnsNamespaceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sdconn - - input := &servicediscovery.GetNamespaceInput{ - Id: aws.String(d.Id()), - } - - resp, err := conn.GetNamespace(input) - if err != nil { - if isAWSErr(err, servicediscovery.ErrCodeNamespaceNotFound, "") { - d.SetId("") - return nil - } - return err - } - - d.Set("description", resp.Namespace.Description) - d.Set("arn", resp.Namespace.Arn) - if resp.Namespace.Properties != nil { - d.Set("hosted_zone", resp.Namespace.Properties.DnsProperties.HostedZoneId) - } - return nil -} - -func resourceAwsServiceDiscoveryPrivateDnsNamespaceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sdconn - - input := &servicediscovery.DeleteNamespaceInput{ - Id: aws.String(d.Id()), - } - - resp, err := conn.DeleteNamespace(input) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, - Target: []string{servicediscovery.OperationStatusSuccess}, - Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), - Timeout: 5 * time.Minute, - } - - _, err = stateConf.WaitForState() - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_public_dns_namespace.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_public_dns_namespace.go deleted file mode 100644 index 6020b071a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_public_dns_namespace.go +++ /dev/null @@ -1,158 +0,0 @@ -package aws - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/servicediscovery" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsServiceDiscoveryPublicDnsNamespace() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsServiceDiscoveryPublicDnsNamespaceCreate, - Read: resourceAwsServiceDiscoveryPublicDnsNamespaceRead, - Delete: resourceAwsServiceDiscoveryPublicDnsNamespaceDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "hosted_zone": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsServiceDiscoveryPublicDnsNamespaceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sdconn - - name := d.Get("name").(string) - // The CreatorRequestId has a limit of 64 bytes - var requestId string - if len(name) > (64 - resource.UniqueIDSuffixLength) { - requestId = resource.PrefixedUniqueId(name[0:(64 - resource.UniqueIDSuffixLength - 1)]) - } else { - requestId = resource.PrefixedUniqueId(name) - } - - input := &servicediscovery.CreatePublicDnsNamespaceInput{ - Name: aws.String(name), - CreatorRequestId: aws.String(requestId), - } - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - resp, err := conn.CreatePublicDnsNamespace(input) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, - Target: []string{servicediscovery.OperationStatusSuccess}, - Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), - Timeout: 5 * time.Minute, - } - - opresp, err := stateConf.WaitForState() - if err != nil { - return err - } - - d.SetId(*opresp.(*servicediscovery.GetOperationOutput).Operation.Targets["NAMESPACE"]) - return resourceAwsServiceDiscoveryPublicDnsNamespaceRead(d, meta) -} - -func resourceAwsServiceDiscoveryPublicDnsNamespaceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sdconn - - input := &servicediscovery.GetNamespaceInput{ - Id: aws.String(d.Id()), - } - - resp, err := conn.GetNamespace(input) - if err != nil { - if isAWSErr(err, servicediscovery.ErrCodeNamespaceNotFound, "") { - d.SetId("") - return nil - } - return err - } - - d.Set("name", resp.Namespace.Name) - d.Set("description", resp.Namespace.Description) - d.Set("arn", resp.Namespace.Arn) - if resp.Namespace.Properties != nil { - d.Set("hosted_zone", resp.Namespace.Properties.DnsProperties.HostedZoneId) - } - return nil -} - -func resourceAwsServiceDiscoveryPublicDnsNamespaceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sdconn - - input := &servicediscovery.DeleteNamespaceInput{ - Id: aws.String(d.Id()), - } - - resp, err := conn.DeleteNamespace(input) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, - Target: []string{servicediscovery.OperationStatusSuccess}, - Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), - Timeout: 5 * time.Minute, - } - - _, err = stateConf.WaitForState() - return err -} - -func servicediscoveryOperationRefreshStatusFunc(conn *servicediscovery.ServiceDiscovery, oid string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &servicediscovery.GetOperationInput{ - OperationId: aws.String(oid), - } - resp, err := conn.GetOperation(input) - - if err != nil { - return nil, servicediscovery.OperationStatusFail, err - } - - // Error messages can also be contained in the response with FAIL status - // "ErrorCode":"CANNOT_CREATE_HOSTED_ZONE", - // "ErrorMessage":"The VPC that you chose, vpc-xxx in region xxx, is already associated with another private hosted zone that has an overlapping name space, xxx.. (Service: AmazonRoute53; Status Code: 400; Error Code: ConflictingDomainExists; Request ID: xxx)" - // "Status":"FAIL", - - if aws.StringValue(resp.Operation.Status) == servicediscovery.OperationStatusFail { - return resp, servicediscovery.OperationStatusFail, fmt.Errorf("%s: %s", aws.StringValue(resp.Operation.ErrorCode), aws.StringValue(resp.Operation.ErrorMessage)) - } - - return resp, aws.StringValue(resp.Operation.Status), nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go deleted file mode 100644 index ea8bc23ba..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go +++ /dev/null @@ -1,372 +0,0 @@ -package aws - -import ( - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/servicediscovery" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsServiceDiscoveryService() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsServiceDiscoveryServiceCreate, - Read: resourceAwsServiceDiscoveryServiceRead, - Update: resourceAwsServiceDiscoveryServiceUpdate, - Delete: resourceAwsServiceDiscoveryServiceDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "dns_config": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "namespace_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "dns_records": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "ttl": { - Type: schema.TypeInt, - Required: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - servicediscovery.RecordTypeSrv, - servicediscovery.RecordTypeA, - servicediscovery.RecordTypeAaaa, - servicediscovery.RecordTypeCname, - }, false), - }, - }, - }, - }, - "routing_policy": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: servicediscovery.RoutingPolicyMultivalue, - ValidateFunc: validation.StringInSlice([]string{ - servicediscovery.RoutingPolicyMultivalue, - servicediscovery.RoutingPolicyWeighted, - }, false), - }, - }, - }, - }, - "health_check_config": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "failure_threshold": { - Type: schema.TypeInt, - Optional: true, - }, - "resource_path": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - servicediscovery.HealthCheckTypeHttp, - servicediscovery.HealthCheckTypeHttps, - servicediscovery.HealthCheckTypeTcp, - }, false), - }, - }, - }, - }, - "health_check_custom_config": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "failure_threshold": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - }, - }, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsServiceDiscoveryServiceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sdconn - - input := &servicediscovery.CreateServiceInput{ - Name: aws.String(d.Get("name").(string)), - DnsConfig: expandServiceDiscoveryDnsConfig(d.Get("dns_config").([]interface{})[0].(map[string]interface{})), - } - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - hcconfig := d.Get("health_check_config").([]interface{}) - if len(hcconfig) > 0 { - input.HealthCheckConfig = expandServiceDiscoveryHealthCheckConfig(hcconfig[0].(map[string]interface{})) - } - - healthCustomConfig := d.Get("health_check_custom_config").([]interface{}) - if len(healthCustomConfig) > 0 { - input.HealthCheckCustomConfig = expandServiceDiscoveryHealthCheckCustomConfig(healthCustomConfig[0].(map[string]interface{})) - } - - resp, err := conn.CreateService(input) - if err != nil { - return err - } - - d.SetId(*resp.Service.Id) - d.Set("arn", resp.Service.Arn) - return nil -} - -func resourceAwsServiceDiscoveryServiceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sdconn - - input := &servicediscovery.GetServiceInput{ - Id: aws.String(d.Id()), - } - - resp, err := conn.GetService(input) - if err != nil { - if isAWSErr(err, servicediscovery.ErrCodeServiceNotFound, "") { - log.Printf("[WARN] Service Discovery Service (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - service := resp.Service - d.Set("arn", service.Arn) - d.Set("name", service.Name) - d.Set("description", service.Description) - d.Set("dns_config", flattenServiceDiscoveryDnsConfig(service.DnsConfig)) - d.Set("health_check_config", flattenServiceDiscoveryHealthCheckConfig(service.HealthCheckConfig)) - d.Set("health_check_custom_config", flattenServiceDiscoveryHealthCheckCustomConfig(service.HealthCheckCustomConfig)) - return nil -} - -func resourceAwsServiceDiscoveryServiceUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sdconn - - input := &servicediscovery.UpdateServiceInput{ - Id: aws.String(d.Id()), - } - - sc := &servicediscovery.ServiceChange{ - DnsConfig: expandServiceDiscoveryDnsConfigChange(d.Get("dns_config").([]interface{})[0].(map[string]interface{})), - } - - if d.HasChange("description") { - sc.Description = aws.String(d.Get("description").(string)) - } - if d.HasChange("health_check_config") { - hcconfig := d.Get("health_check_config").([]interface{}) - sc.HealthCheckConfig = expandServiceDiscoveryHealthCheckConfig(hcconfig[0].(map[string]interface{})) - } - - input.Service = sc - - resp, err := conn.UpdateService(input) - if err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, - Target: []string{servicediscovery.OperationStatusSuccess}, - Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), - Timeout: 5 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsServiceDiscoveryServiceRead(d, meta) -} - -func resourceAwsServiceDiscoveryServiceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sdconn - - input := &servicediscovery.DeleteServiceInput{ - Id: aws.String(d.Id()), - } - - _, err := conn.DeleteService(input) - return err -} - -func expandServiceDiscoveryDnsConfig(configured map[string]interface{}) *servicediscovery.DnsConfig { - result := &servicediscovery.DnsConfig{} - - result.NamespaceId = aws.String(configured["namespace_id"].(string)) - dnsRecords := configured["dns_records"].([]interface{}) - drs := make([]*servicediscovery.DnsRecord, len(dnsRecords)) - for i := range drs { - raw := dnsRecords[i].(map[string]interface{}) - dr := &servicediscovery.DnsRecord{ - TTL: aws.Int64(int64(raw["ttl"].(int))), - Type: aws.String(raw["type"].(string)), - } - drs[i] = dr - } - result.DnsRecords = drs - if v, ok := configured["routing_policy"]; ok && v != "" { - result.RoutingPolicy = aws.String(v.(string)) - } - - return result -} - -func flattenServiceDiscoveryDnsConfig(config *servicediscovery.DnsConfig) []map[string]interface{} { - result := map[string]interface{}{} - - result["namespace_id"] = *config.NamespaceId - result["routing_policy"] = *config.RoutingPolicy - drs := make([]map[string]interface{}, 0) - for _, v := range config.DnsRecords { - dr := map[string]interface{}{} - dr["ttl"] = *v.TTL - dr["type"] = *v.Type - drs = append(drs, dr) - } - result["dns_records"] = drs - - return []map[string]interface{}{result} -} - -func expandServiceDiscoveryDnsConfigChange(configured map[string]interface{}) *servicediscovery.DnsConfigChange { - result := &servicediscovery.DnsConfigChange{} - - dnsRecords := configured["dns_records"].([]interface{}) - drs := make([]*servicediscovery.DnsRecord, len(dnsRecords)) - for i := range drs { - raw := dnsRecords[i].(map[string]interface{}) - dr := &servicediscovery.DnsRecord{ - TTL: aws.Int64(int64(raw["ttl"].(int))), - Type: aws.String(raw["type"].(string)), - } - drs[i] = dr - } - result.DnsRecords = drs - - return result -} - -func expandServiceDiscoveryHealthCheckConfig(configured map[string]interface{}) *servicediscovery.HealthCheckConfig { - if len(configured) < 1 { - return nil - } - result := &servicediscovery.HealthCheckConfig{} - - if v, ok := configured["failure_threshold"]; ok && v.(int) != 0 { - result.FailureThreshold = aws.Int64(int64(v.(int))) - } - if v, ok := configured["resource_path"]; ok && v.(string) != "" { - result.ResourcePath = aws.String(v.(string)) - } - if v, ok := configured["type"]; ok && v.(string) != "" { - result.Type = aws.String(v.(string)) - } - - return result -} - -func flattenServiceDiscoveryHealthCheckConfig(config *servicediscovery.HealthCheckConfig) []map[string]interface{} { - if config == nil { - return nil - } - result := map[string]interface{}{} - - if config.FailureThreshold != nil { - result["failure_threshold"] = *config.FailureThreshold - } - if config.ResourcePath != nil { - result["resource_path"] = *config.ResourcePath - } - if config.Type != nil { - result["type"] = *config.Type - } - - if len(result) < 1 { - return nil - } - - return []map[string]interface{}{result} -} - -func expandServiceDiscoveryHealthCheckCustomConfig(configured map[string]interface{}) *servicediscovery.HealthCheckCustomConfig { - if len(configured) < 1 { - return nil - } - result := &servicediscovery.HealthCheckCustomConfig{} - - if v, ok := configured["failure_threshold"]; ok && v.(int) != 0 { - result.FailureThreshold = aws.Int64(int64(v.(int))) - } - - return result -} - -func flattenServiceDiscoveryHealthCheckCustomConfig(config *servicediscovery.HealthCheckCustomConfig) []map[string]interface{} { - if config == nil { - return nil - } - result := map[string]interface{}{} - - if config.FailureThreshold != nil { - result["failure_threshold"] = *config.FailureThreshold - } - - if len(result) < 1 { - return nil - } - - return []map[string]interface{}{result} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_servicecatalog_portfolio.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_servicecatalog_portfolio.go deleted file mode 100644 index 1fe712972..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_servicecatalog_portfolio.go +++ /dev/null @@ -1,225 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/servicecatalog" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsServiceCatalogPortfolio() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsServiceCatalogPortfolioCreate, - Read: resourceAwsServiceCatalogPortfolioRead, - Update: resourceAwsServiceCatalogPortfolioUpdate, - Delete: resourceAwsServiceCatalogPortfolioDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(30 * time.Minute), - Update: schema.DefaultTimeout(30 * time.Minute), - Delete: schema.DefaultTimeout(30 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "created_time": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 20), - }, - "description": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringLenBetween(0, 2000), - }, - "provider_name": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(1, 20), - }, - "tags": tagsSchema(), - }, - } -} -func resourceAwsServiceCatalogPortfolioCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).scconn - input := servicecatalog.CreatePortfolioInput{ - AcceptLanguage: aws.String("en"), - } - name := d.Get("name").(string) - input.DisplayName = &name - now := time.Now() - input.IdempotencyToken = aws.String(fmt.Sprintf("%d", now.UnixNano())) - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("provider_name"); ok { - input.ProviderName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("tags"); ok { - tags := []*servicecatalog.Tag{} - t := v.(map[string]interface{}) - for k, v := range t { - tag := servicecatalog.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - tags = append(tags, &tag) - } - input.Tags = tags - } - - log.Printf("[DEBUG] Creating Service Catalog Portfolio: %#v", input) - resp, err := conn.CreatePortfolio(&input) - if err != nil { - return fmt.Errorf("Creating Service Catalog Portfolio failed: %s", err.Error()) - } - d.SetId(*resp.PortfolioDetail.Id) - - return resourceAwsServiceCatalogPortfolioRead(d, meta) -} - -func resourceAwsServiceCatalogPortfolioRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).scconn - input := servicecatalog.DescribePortfolioInput{ - AcceptLanguage: aws.String("en"), - } - input.Id = aws.String(d.Id()) - - log.Printf("[DEBUG] Reading Service Catalog Portfolio: %#v", input) - resp, err := conn.DescribePortfolio(&input) - if err != nil { - if scErr, ok := err.(awserr.Error); ok && scErr.Code() == "ResourceNotFoundException" { - log.Printf("[WARN] Service Catalog Portfolio %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Reading ServiceCatalog Portfolio '%s' failed: %s", *input.Id, err.Error()) - } - portfolioDetail := resp.PortfolioDetail - if err := d.Set("created_time", portfolioDetail.CreatedTime.Format(time.RFC3339)); err != nil { - log.Printf("[DEBUG] Error setting created_time: %s", err) - } - d.Set("arn", portfolioDetail.ARN) - d.Set("description", portfolioDetail.Description) - d.Set("name", portfolioDetail.DisplayName) - d.Set("provider_name", portfolioDetail.ProviderName) - tags := map[string]string{} - for _, tag := range resp.Tags { - tags[*tag.Key] = *tag.Value - } - d.Set("tags", tags) - return nil -} - -func resourceAwsServiceCatalogPortfolioUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).scconn - input := servicecatalog.UpdatePortfolioInput{ - AcceptLanguage: aws.String("en"), - Id: aws.String(d.Id()), - } - - if d.HasChange("name") { - v, _ := d.GetOk("name") - input.DisplayName = aws.String(v.(string)) - } - - if d.HasChange("accept_language") { - v, _ := d.GetOk("accept_language") - input.AcceptLanguage = aws.String(v.(string)) - } - - if d.HasChange("description") { - v, _ := d.GetOk("description") - input.Description = aws.String(v.(string)) - } - - if d.HasChange("provider_name") { - v, _ := d.GetOk("provider_name") - input.ProviderName = aws.String(v.(string)) - } - - if d.HasChange("tags") { - currentTags, requiredTags := d.GetChange("tags") - log.Printf("[DEBUG] Current Tags: %#v", currentTags) - log.Printf("[DEBUG] Required Tags: %#v", requiredTags) - - tagsToAdd, tagsToRemove := tagUpdates(requiredTags.(map[string]interface{}), currentTags.(map[string]interface{})) - log.Printf("[DEBUG] Tags To Add: %#v", tagsToAdd) - log.Printf("[DEBUG] Tags To Remove: %#v", tagsToRemove) - input.AddTags = tagsToAdd - input.RemoveTags = tagsToRemove - } - - log.Printf("[DEBUG] Update Service Catalog Portfolio: %#v", input) - _, err := conn.UpdatePortfolio(&input) - if err != nil { - return fmt.Errorf("Updating Service Catalog Portfolio '%s' failed: %s", *input.Id, err.Error()) - } - return resourceAwsServiceCatalogPortfolioRead(d, meta) -} - -func tagUpdates(requriedTags, currentTags map[string]interface{}) ([]*servicecatalog.Tag, []*string) { - var tagsToAdd []*servicecatalog.Tag - var tagsToRemove []*string - - for rk, rv := range requriedTags { - addTag := true - for ck, cv := range currentTags { - if (rk == ck) && (rv.(string) == cv.(string)) { - addTag = false - } - } - if addTag { - tag := &servicecatalog.Tag{Key: aws.String(rk), Value: aws.String(rv.(string))} - tagsToAdd = append(tagsToAdd, tag) - } - } - - for ck, cv := range currentTags { - removeTag := true - for rk, rv := range requriedTags { - if (rk == ck) && (rv.(string) == cv.(string)) { - removeTag = false - } - } - if removeTag { - tagsToRemove = append(tagsToRemove, aws.String(ck)) - } - } - - return tagsToAdd, tagsToRemove -} - -func resourceAwsServiceCatalogPortfolioDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).scconn - input := servicecatalog.DeletePortfolioInput{} - input.Id = aws.String(d.Id()) - - log.Printf("[DEBUG] Delete Service Catalog Portfolio: %#v", input) - _, err := conn.DeletePortfolio(&input) - if err != nil { - return fmt.Errorf("Deleting Service Catalog Portfolio '%s' failed: %s", *input.Id, err.Error()) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_active_receipt_rule_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_active_receipt_rule_set.go deleted file mode 100644 index 21534257b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_active_receipt_rule_set.go +++ /dev/null @@ -1,80 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSesActiveReceiptRuleSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSesActiveReceiptRuleSetUpdate, - Update: resourceAwsSesActiveReceiptRuleSetUpdate, - Read: resourceAwsSesActiveReceiptRuleSetRead, - Delete: resourceAwsSesActiveReceiptRuleSetDelete, - - Schema: map[string]*schema.Schema{ - "rule_set_name": { - Type: schema.TypeString, - Required: true, - }, - }, - } -} - -func resourceAwsSesActiveReceiptRuleSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - ruleSetName := d.Get("rule_set_name").(string) - - createOpts := &ses.SetActiveReceiptRuleSetInput{ - RuleSetName: aws.String(ruleSetName), - } - - _, err := conn.SetActiveReceiptRuleSet(createOpts) - if err != nil { - return fmt.Errorf("Error setting active SES rule set: %s", err) - } - - d.SetId(ruleSetName) - - return resourceAwsSesActiveReceiptRuleSetRead(d, meta) -} - -func resourceAwsSesActiveReceiptRuleSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - describeOpts := &ses.DescribeActiveReceiptRuleSetInput{} - - response, err := conn.DescribeActiveReceiptRuleSet(describeOpts) - if err != nil { - return err - } - - if response.Metadata != nil { - d.Set("rule_set_name", response.Metadata.Name) - } else { - log.Print("[WARN] No active Receipt Rule Set found") - d.SetId("") - } - - return nil -} - -func resourceAwsSesActiveReceiptRuleSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - deleteOpts := &ses.SetActiveReceiptRuleSetInput{ - RuleSetName: nil, - } - - _, err := conn.SetActiveReceiptRuleSet(deleteOpts) - if err != nil { - return fmt.Errorf("Error deleting active SES rule set: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_configuration_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_configuration_set.go deleted file mode 100644 index 04a637e78..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_configuration_set.go +++ /dev/null @@ -1,106 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSesConfigurationSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSesConfigurationSetCreate, - Read: resourceAwsSesConfigurationSetRead, - Delete: resourceAwsSesConfigurationSetDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsSesConfigurationSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - configurationSetName := d.Get("name").(string) - - createOpts := &ses.CreateConfigurationSetInput{ - ConfigurationSet: &ses.ConfigurationSet{ - Name: aws.String(configurationSetName), - }, - } - - _, err := conn.CreateConfigurationSet(createOpts) - if err != nil { - return fmt.Errorf("Error creating SES configuration set: %s", err) - } - - d.SetId(configurationSetName) - - return resourceAwsSesConfigurationSetRead(d, meta) -} - -func resourceAwsSesConfigurationSetRead(d *schema.ResourceData, meta interface{}) error { - configurationSetExists, err := findConfigurationSet(d.Id(), nil, meta) - - if !configurationSetExists { - log.Printf("[WARN] SES Configuration Set (%s) not found", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return err - } - - d.Set("name", d.Id()) - - return nil -} - -func resourceAwsSesConfigurationSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - log.Printf("[DEBUG] SES Delete Configuration Rule Set: %s", d.Id()) - _, err := conn.DeleteConfigurationSet(&ses.DeleteConfigurationSetInput{ - ConfigurationSetName: aws.String(d.Id()), - }) - - return err -} - -func findConfigurationSet(name string, token *string, meta interface{}) (bool, error) { - conn := meta.(*AWSClient).sesConn - - configurationSetExists := false - - listOpts := &ses.ListConfigurationSetsInput{ - NextToken: token, - } - - response, err := conn.ListConfigurationSets(listOpts) - for _, element := range response.ConfigurationSets { - if *element.Name == name { - configurationSetExists = true - } - } - - if err != nil && !configurationSetExists && response.NextToken != nil { - configurationSetExists, err = findConfigurationSet(name, response.NextToken, meta) - } - - if err != nil { - return false, err - } - - return configurationSetExists, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_dkim.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_dkim.go deleted file mode 100644 index abde46bf9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_dkim.go +++ /dev/null @@ -1,87 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSesDomainDkim() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSesDomainDkimCreate, - Read: resourceAwsSesDomainDkimRead, - Delete: resourceAwsSesDomainDkimDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "domain": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "dkim_tokens": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func resourceAwsSesDomainDkimCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - domainName := d.Get("domain").(string) - - createOpts := &ses.VerifyDomainDkimInput{ - Domain: aws.String(domainName), - } - - _, err := conn.VerifyDomainDkim(createOpts) - if err != nil { - return fmt.Errorf("Error requesting SES domain identity verification: %s", err) - } - - d.SetId(domainName) - - return resourceAwsSesDomainDkimRead(d, meta) -} - -func resourceAwsSesDomainDkimRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - domainName := d.Id() - d.Set("domain", domainName) - - readOpts := &ses.GetIdentityDkimAttributesInput{ - Identities: []*string{ - aws.String(domainName), - }, - } - - response, err := conn.GetIdentityDkimAttributes(readOpts) - if err != nil { - log.Printf("[WARN] Error fetching identity verification attributes for %s: %s", d.Id(), err) - return err - } - - verificationAttrs, ok := response.DkimAttributes[domainName] - if !ok { - log.Printf("[WARN] Domain not listed in response when fetching verification attributes for %s", d.Id()) - d.SetId("") - return nil - } - - d.Set("dkim_tokens", aws.StringValueSlice(verificationAttrs.DkimTokens)) - return nil -} - -func resourceAwsSesDomainDkimDelete(d *schema.ResourceData, meta interface{}) error { - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_identity.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_identity.go deleted file mode 100644 index 84579dd3a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_identity.go +++ /dev/null @@ -1,116 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSesDomainIdentity() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSesDomainIdentityCreate, - Read: resourceAwsSesDomainIdentityRead, - Delete: resourceAwsSesDomainIdentityDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "domain": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: func(v interface{}) string { - return strings.TrimSuffix(v.(string), ".") - }, - }, - "verification_token": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsSesDomainIdentityCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - domainName := d.Get("domain").(string) - domainName = strings.TrimSuffix(domainName, ".") - - createOpts := &ses.VerifyDomainIdentityInput{ - Domain: aws.String(domainName), - } - - _, err := conn.VerifyDomainIdentity(createOpts) - if err != nil { - return fmt.Errorf("Error requesting SES domain identity verification: %s", err) - } - - d.SetId(domainName) - - return resourceAwsSesDomainIdentityRead(d, meta) -} - -func resourceAwsSesDomainIdentityRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - domainName := d.Id() - d.Set("domain", domainName) - - readOpts := &ses.GetIdentityVerificationAttributesInput{ - Identities: []*string{ - aws.String(domainName), - }, - } - - response, err := conn.GetIdentityVerificationAttributes(readOpts) - if err != nil { - log.Printf("[WARN] Error fetching identity verification attributes for %s: %s", d.Id(), err) - return err - } - - verificationAttrs, ok := response.VerificationAttributes[domainName] - if !ok { - log.Printf("[WARN] Domain not listed in response when fetching verification attributes for %s", d.Id()) - d.SetId("") - return nil - } - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "ses", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("identity/%s", d.Id()), - }.String() - d.Set("arn", arn) - d.Set("verification_token", verificationAttrs.VerificationToken) - return nil -} - -func resourceAwsSesDomainIdentityDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - domainName := d.Get("domain").(string) - - deleteOpts := &ses.DeleteIdentityInput{ - Identity: aws.String(domainName), - } - - _, err := conn.DeleteIdentity(deleteOpts) - if err != nil { - return fmt.Errorf("Error deleting SES domain identity: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_identity_verification.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_identity_verification.go deleted file mode 100644 index c7b546723..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_identity_verification.go +++ /dev/null @@ -1,124 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSesDomainIdentityVerification() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSesDomainIdentityVerificationCreate, - Read: resourceAwsSesDomainIdentityVerificationRead, - Delete: resourceAwsSesDomainIdentityVerificationDelete, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "domain": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: func(v interface{}) string { - return strings.TrimSuffix(v.(string), ".") - }, - }, - }, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(45 * time.Minute), - }, - } -} - -func getAwsSesIdentityVerificationAttributes(conn *ses.SES, domainName string) (*ses.IdentityVerificationAttributes, error) { - input := &ses.GetIdentityVerificationAttributesInput{ - Identities: []*string{ - aws.String(domainName), - }, - } - - response, err := conn.GetIdentityVerificationAttributes(input) - if err != nil { - return nil, fmt.Errorf("Error getting identity verification attributes: %s", err) - } - - return response.VerificationAttributes[domainName], nil -} - -func resourceAwsSesDomainIdentityVerificationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - domainName := strings.TrimSuffix(d.Get("domain").(string), ".") - err := resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - att, err := getAwsSesIdentityVerificationAttributes(conn, domainName) - if err != nil { - return resource.NonRetryableError(fmt.Errorf("Error getting identity verification attributes: %s", err)) - } - - if att == nil { - return resource.NonRetryableError(fmt.Errorf("SES Domain Identity %s not found in AWS", domainName)) - } - - if aws.StringValue(att.VerificationStatus) != ses.VerificationStatusSuccess { - return resource.RetryableError(fmt.Errorf("Expected domain verification Success, but was in state %s", aws.StringValue(att.VerificationStatus))) - } - - return nil - }) - if err != nil { - return err - } - - log.Printf("[INFO] Domain verification successful for %s", domainName) - d.SetId(domainName) - return resourceAwsSesDomainIdentityVerificationRead(d, meta) -} - -func resourceAwsSesDomainIdentityVerificationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - domainName := d.Id() - d.Set("domain", domainName) - - att, err := getAwsSesIdentityVerificationAttributes(conn, domainName) - if err != nil { - log.Printf("[WARN] Error fetching identity verification attributes for %s: %s", d.Id(), err) - return err - } - - if att == nil { - log.Printf("[WARN] Domain not listed in response when fetching verification attributes for %s", d.Id()) - d.SetId("") - return nil - } - - if aws.StringValue(att.VerificationStatus) != ses.VerificationStatusSuccess { - log.Printf("[WARN] Expected domain verification Success, but was %s, tainting verification", aws.StringValue(att.VerificationStatus)) - d.SetId("") - return nil - } - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "ses", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("identity/%s", d.Id()), - }.String() - d.Set("arn", arn) - - return nil -} - -func resourceAwsSesDomainIdentityVerificationDelete(d *schema.ResourceData, meta interface{}) error { - // No need to do anything, domain identity will be deleted when aws_ses_domain_identity is deleted - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_mail_from.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_mail_from.go deleted file mode 100644 index c7361a607..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_mail_from.go +++ /dev/null @@ -1,110 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSesDomainMailFrom() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSesDomainMailFromSet, - Read: resourceAwsSesDomainMailFromRead, - Update: resourceAwsSesDomainMailFromSet, - Delete: resourceAwsSesDomainMailFromDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "domain": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "mail_from_domain": { - Type: schema.TypeString, - Required: true, - }, - "behavior_on_mx_failure": { - Type: schema.TypeString, - Optional: true, - Default: ses.BehaviorOnMXFailureUseDefaultValue, - }, - }, - } -} - -func resourceAwsSesDomainMailFromSet(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - behaviorOnMxFailure := d.Get("behavior_on_mx_failure").(string) - domainName := d.Get("domain").(string) - mailFromDomain := d.Get("mail_from_domain").(string) - - input := &ses.SetIdentityMailFromDomainInput{ - BehaviorOnMXFailure: aws.String(behaviorOnMxFailure), - Identity: aws.String(domainName), - MailFromDomain: aws.String(mailFromDomain), - } - - _, err := conn.SetIdentityMailFromDomain(input) - if err != nil { - return fmt.Errorf("Error setting MAIL FROM domain: %s", err) - } - - d.SetId(domainName) - - return resourceAwsSesDomainMailFromRead(d, meta) -} - -func resourceAwsSesDomainMailFromRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - domainName := d.Id() - - readOpts := &ses.GetIdentityMailFromDomainAttributesInput{ - Identities: []*string{ - aws.String(domainName), - }, - } - - out, err := conn.GetIdentityMailFromDomainAttributes(readOpts) - if err != nil { - log.Printf("error fetching MAIL FROM domain attributes for %s: %s", domainName, err) - return err - } - - d.Set("domain", domainName) - - if v, ok := out.MailFromDomainAttributes[domainName]; ok { - d.Set("behavior_on_mx_failure", v.BehaviorOnMXFailure) - d.Set("mail_from_domain", v.MailFromDomain) - } else { - d.Set("behavior_on_mx_failure", v.BehaviorOnMXFailure) - d.Set("mail_from_domain", "") - } - - return nil -} - -func resourceAwsSesDomainMailFromDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - domainName := d.Id() - - deleteOpts := &ses.SetIdentityMailFromDomainInput{ - Identity: aws.String(domainName), - MailFromDomain: nil, - } - - _, err := conn.SetIdentityMailFromDomain(deleteOpts) - if err != nil { - return fmt.Errorf("Error deleting SES domain identity: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go deleted file mode 100644 index d7ec34456..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go +++ /dev/null @@ -1,219 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsSesEventDestination() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSesEventDestinationCreate, - Read: resourceAwsSesEventDestinationRead, - Delete: resourceAwsSesEventDestinationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "configuration_set_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - }, - - "matching_types": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Set: schema.HashString, - Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - ses.EventTypeSend, - ses.EventTypeReject, - ses.EventTypeBounce, - ses.EventTypeComplaint, - ses.EventTypeDelivery, - ses.EventTypeOpen, - ses.EventTypeClick, - ses.EventTypeRenderingFailure, - }, false), - }, - }, - - "cloudwatch_destination": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"kinesis_destination", "sns_destination"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "default_value": { - Type: schema.TypeString, - Required: true, - }, - - "dimension_name": { - Type: schema.TypeString, - Required: true, - }, - - "value_source": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - ses.DimensionValueSourceMessageTag, - ses.DimensionValueSourceEmailHeader, - ses.DimensionValueSourceLinkTag, - }, false), - }, - }, - }, - }, - - "kinesis_destination": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - MaxItems: 1, - ConflictsWith: []string{"cloudwatch_destination", "sns_destination"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "stream_arn": { - Type: schema.TypeString, - Required: true, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - - "sns_destination": { - Type: schema.TypeSet, - MaxItems: 1, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"cloudwatch_destination", "kinesis_destination"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "topic_arn": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsSesEventDestinationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - configurationSetName := d.Get("configuration_set_name").(string) - eventDestinationName := d.Get("name").(string) - enabled := d.Get("enabled").(bool) - matchingEventTypes := d.Get("matching_types").(*schema.Set).List() - - createOpts := &ses.CreateConfigurationSetEventDestinationInput{ - ConfigurationSetName: aws.String(configurationSetName), - EventDestination: &ses.EventDestination{ - Name: aws.String(eventDestinationName), - Enabled: aws.Bool(enabled), - MatchingEventTypes: expandStringList(matchingEventTypes), - }, - } - - if v, ok := d.GetOk("cloudwatch_destination"); ok { - destination := v.(*schema.Set).List() - createOpts.EventDestination.CloudWatchDestination = &ses.CloudWatchDestination{ - DimensionConfigurations: generateCloudWatchDestination(destination), - } - log.Printf("[DEBUG] Creating cloudwatch destination: %#v", destination) - } - - if v, ok := d.GetOk("kinesis_destination"); ok { - destination := v.(*schema.Set).List() - - kinesis := destination[0].(map[string]interface{}) - createOpts.EventDestination.KinesisFirehoseDestination = &ses.KinesisFirehoseDestination{ - DeliveryStreamARN: aws.String(kinesis["stream_arn"].(string)), - IAMRoleARN: aws.String(kinesis["role_arn"].(string)), - } - log.Printf("[DEBUG] Creating kinesis destination: %#v", kinesis) - } - - if v, ok := d.GetOk("sns_destination"); ok { - destination := v.(*schema.Set).List() - sns := destination[0].(map[string]interface{}) - createOpts.EventDestination.SNSDestination = &ses.SNSDestination{ - TopicARN: aws.String(sns["topic_arn"].(string)), - } - log.Printf("[DEBUG] Creating sns destination: %#v", sns) - } - - _, err := conn.CreateConfigurationSetEventDestination(createOpts) - if err != nil { - return fmt.Errorf("Error creating SES configuration set event destination: %s", err) - } - - d.SetId(eventDestinationName) - - log.Printf("[WARN] SES DONE") - return resourceAwsSesEventDestinationRead(d, meta) -} - -func resourceAwsSesEventDestinationRead(d *schema.ResourceData, meta interface{}) error { - - return nil -} - -func resourceAwsSesEventDestinationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - log.Printf("[DEBUG] SES Delete Configuration Set Destination: %s", d.Id()) - _, err := conn.DeleteConfigurationSetEventDestination(&ses.DeleteConfigurationSetEventDestinationInput{ - ConfigurationSetName: aws.String(d.Get("configuration_set_name").(string)), - EventDestinationName: aws.String(d.Id()), - }) - - return err -} - -func generateCloudWatchDestination(v []interface{}) []*ses.CloudWatchDimensionConfiguration { - - b := make([]*ses.CloudWatchDimensionConfiguration, len(v)) - - for i, vI := range v { - cloudwatch := vI.(map[string]interface{}) - b[i] = &ses.CloudWatchDimensionConfiguration{ - DefaultDimensionValue: aws.String(cloudwatch["default_value"].(string)), - DimensionName: aws.String(cloudwatch["dimension_name"].(string)), - DimensionValueSource: aws.String(cloudwatch["value_source"].(string)), - } - } - - return b -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_identity_notification_topic.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_identity_notification_topic.go deleted file mode 100644 index 00adb0644..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_identity_notification_topic.go +++ /dev/null @@ -1,145 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsSesNotificationTopic() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSesNotificationTopicSet, - Read: resourceAwsSesNotificationTopicRead, - Update: resourceAwsSesNotificationTopicSet, - Delete: resourceAwsSesNotificationTopicDelete, - - Schema: map[string]*schema.Schema{ - "topic_arn": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - - "notification_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - ses.NotificationTypeBounce, - ses.NotificationTypeComplaint, - ses.NotificationTypeDelivery, - }, false), - }, - - "identity": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.NoZeroValues, - }, - }, - } -} - -func resourceAwsSesNotificationTopicSet(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - notification := d.Get("notification_type").(string) - identity := d.Get("identity").(string) - - setOpts := &ses.SetIdentityNotificationTopicInput{ - Identity: aws.String(identity), - NotificationType: aws.String(notification), - } - - if v, ok := d.GetOk("topic_arn"); ok && v.(string) != "" { - setOpts.SnsTopic = aws.String(v.(string)) - } - - d.SetId(fmt.Sprintf("%s|%s", identity, notification)) - - log.Printf("[DEBUG] Setting SES Identity Notification Topic: %#v", setOpts) - - if _, err := conn.SetIdentityNotificationTopic(setOpts); err != nil { - return fmt.Errorf("Error setting SES Identity Notification Topic: %s", err) - } - - return resourceAwsSesNotificationTopicRead(d, meta) -} - -func resourceAwsSesNotificationTopicRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - identity, notificationType, err := decodeSesIdentityNotificationTopicId(d.Id()) - if err != nil { - return err - } - - getOpts := &ses.GetIdentityNotificationAttributesInput{ - Identities: []*string{aws.String(identity)}, - } - - log.Printf("[DEBUG] Reading SES Identity Notification Topic Attributes: %#v", getOpts) - - response, err := conn.GetIdentityNotificationAttributes(getOpts) - - if err != nil { - return fmt.Errorf("Error reading SES Identity Notification Topic: %s", err) - } - - d.Set("topic_arn", "") - if response == nil { - return nil - } - - notificationAttributes, notificationAttributesOk := response.NotificationAttributes[identity] - if !notificationAttributesOk { - return nil - } - - switch notificationType { - case ses.NotificationTypeBounce: - d.Set("topic_arn", notificationAttributes.BounceTopic) - case ses.NotificationTypeComplaint: - d.Set("topic_arn", notificationAttributes.ComplaintTopic) - case ses.NotificationTypeDelivery: - d.Set("topic_arn", notificationAttributes.DeliveryTopic) - } - - return nil -} - -func resourceAwsSesNotificationTopicDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - identity, notificationType, err := decodeSesIdentityNotificationTopicId(d.Id()) - if err != nil { - return err - } - - setOpts := &ses.SetIdentityNotificationTopicInput{ - Identity: aws.String(identity), - NotificationType: aws.String(notificationType), - SnsTopic: nil, - } - - log.Printf("[DEBUG] Deleting SES Identity Notification Topic: %#v", setOpts) - - if _, err := conn.SetIdentityNotificationTopic(setOpts); err != nil { - return fmt.Errorf("Error deleting SES Identity Notification Topic: %s", err) - } - - return resourceAwsSesNotificationTopicRead(d, meta) -} - -func decodeSesIdentityNotificationTopicId(id string) (string, string, error) { - parts := strings.Split(id, "|") - if len(parts) != 2 { - return "", "", fmt.Errorf("Unexpected format of ID (%q), expected IDENTITY|TYPE", id) - } - return parts[0], parts[1], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_filter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_filter.go deleted file mode 100644 index ab87dd213..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_filter.go +++ /dev/null @@ -1,109 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSesReceiptFilter() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSesReceiptFilterCreate, - Read: resourceAwsSesReceiptFilterRead, - Delete: resourceAwsSesReceiptFilterDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "cidr": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "policy": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsSesReceiptFilterCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - name := d.Get("name").(string) - - createOpts := &ses.CreateReceiptFilterInput{ - Filter: &ses.ReceiptFilter{ - Name: aws.String(name), - IpFilter: &ses.ReceiptIpFilter{ - Cidr: aws.String(d.Get("cidr").(string)), - Policy: aws.String(d.Get("policy").(string)), - }, - }, - } - - _, err := conn.CreateReceiptFilter(createOpts) - if err != nil { - return fmt.Errorf("Error creating SES receipt filter: %s", err) - } - - d.SetId(name) - - return resourceAwsSesReceiptFilterRead(d, meta) -} - -func resourceAwsSesReceiptFilterRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - listOpts := &ses.ListReceiptFiltersInput{} - - response, err := conn.ListReceiptFilters(listOpts) - if err != nil { - return err - } - - found := false - for _, element := range response.Filters { - if *element.Name == d.Id() { - d.Set("cidr", element.IpFilter.Cidr) - d.Set("policy", element.IpFilter.Policy) - d.Set("name", element.Name) - found = true - } - } - - if !found { - log.Printf("[WARN] SES Receipt Filter (%s) not found", d.Id()) - d.SetId("") - } - - return nil -} - -func resourceAwsSesReceiptFilterDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - deleteOpts := &ses.DeleteReceiptFilterInput{ - FilterName: aws.String(d.Id()), - } - - _, err := conn.DeleteReceiptFilter(deleteOpts) - if err != nil { - return fmt.Errorf("Error deleting SES receipt filter: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go deleted file mode 100644 index fa98d8bce..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go +++ /dev/null @@ -1,789 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "sort" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsSesReceiptRule() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSesReceiptRuleCreate, - Update: resourceAwsSesReceiptRuleUpdate, - Read: resourceAwsSesReceiptRuleRead, - Delete: resourceAwsSesReceiptRuleDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsSesReceiptRuleImport, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "rule_set_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "after": { - Type: schema.TypeString, - Optional: true, - }, - - "enabled": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "recipients": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Set: schema.HashString, - }, - - "scan_enabled": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "tls_policy": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "add_header_action": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "header_name": { - Type: schema.TypeString, - Required: true, - }, - - "header_value": { - Type: schema.TypeString, - Required: true, - }, - - "position": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["header_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["header_value"].(string))) - buf.WriteString(fmt.Sprintf("%d-", m["position"].(int))) - - return hashcode.String(buf.String()) - }, - }, - - "bounce_action": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "message": { - Type: schema.TypeString, - Required: true, - }, - - "sender": { - Type: schema.TypeString, - Required: true, - }, - - "smtp_reply_code": { - Type: schema.TypeString, - Required: true, - }, - - "status_code": { - Type: schema.TypeString, - Optional: true, - }, - - "topic_arn": { - Type: schema.TypeString, - Optional: true, - }, - - "position": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["message"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["sender"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["smtp_reply_code"].(string))) - - if _, ok := m["status_code"]; ok { - buf.WriteString(fmt.Sprintf("%s-", m["status_code"].(string))) - } - - if _, ok := m["topic_arn"]; ok { - buf.WriteString(fmt.Sprintf("%s-", m["topic_arn"].(string))) - } - - buf.WriteString(fmt.Sprintf("%d-", m["position"].(int))) - - return hashcode.String(buf.String()) - }, - }, - - "lambda_action": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "function_arn": { - Type: schema.TypeString, - Required: true, - }, - - "invocation_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "topic_arn": { - Type: schema.TypeString, - Optional: true, - }, - - "position": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["function_arn"].(string))) - - if _, ok := m["invocation_type"]; ok { - buf.WriteString(fmt.Sprintf("%s-", m["invocation_type"].(string))) - } - - if _, ok := m["topic_arn"]; ok { - buf.WriteString(fmt.Sprintf("%s-", m["topic_arn"].(string))) - } - - buf.WriteString(fmt.Sprintf("%d-", m["position"].(int))) - - return hashcode.String(buf.String()) - }, - }, - - "s3_action": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket_name": { - Type: schema.TypeString, - Required: true, - }, - - "kms_key_arn": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - - "object_key_prefix": { - Type: schema.TypeString, - Optional: true, - }, - - "topic_arn": { - Type: schema.TypeString, - Optional: true, - }, - - "position": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntAtLeast(1), - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["bucket_name"].(string))) - - if _, ok := m["kms_key_arn"]; ok { - buf.WriteString(fmt.Sprintf("%s-", m["kms_key_arn"].(string))) - } - - if _, ok := m["object_key_prefix"]; ok { - buf.WriteString(fmt.Sprintf("%s-", m["object_key_prefix"].(string))) - } - - if _, ok := m["topic_arn"]; ok { - buf.WriteString(fmt.Sprintf("%s-", m["topic_arn"].(string))) - } - - buf.WriteString(fmt.Sprintf("%d-", m["position"].(int))) - - return hashcode.String(buf.String()) - }, - }, - - "sns_action": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "topic_arn": { - Type: schema.TypeString, - Required: true, - }, - - "position": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["topic_arn"].(string))) - buf.WriteString(fmt.Sprintf("%d-", m["position"].(int))) - - return hashcode.String(buf.String()) - }, - }, - - "stop_action": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "scope": { - Type: schema.TypeString, - Required: true, - }, - - "topic_arn": { - Type: schema.TypeString, - Optional: true, - }, - - "position": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["scope"].(string))) - - if _, ok := m["topic_arn"]; ok { - buf.WriteString(fmt.Sprintf("%s-", m["topic_arn"].(string))) - } - - buf.WriteString(fmt.Sprintf("%d-", m["position"].(int))) - - return hashcode.String(buf.String()) - }, - }, - - "workmail_action": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "organization_arn": { - Type: schema.TypeString, - Required: true, - }, - - "topic_arn": { - Type: schema.TypeString, - Optional: true, - }, - - "position": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["organization_arn"].(string))) - - if _, ok := m["topic_arn"]; ok { - buf.WriteString(fmt.Sprintf("%s-", m["topic_arn"].(string))) - } - - buf.WriteString(fmt.Sprintf("%d-", m["position"].(int))) - - return hashcode.String(buf.String()) - }, - }, - }, - } -} - -func resourceAwsSesReceiptRuleImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - idParts := strings.Split(d.Id(), ":") - if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { - return nil, fmt.Errorf("unexpected format of ID (%q), expected :", d.Id()) - } - - ruleSetName := idParts[0] - ruleName := idParts[1] - - d.Set("rule_set_name", ruleSetName) - d.Set("name", ruleName) - d.SetId(ruleName) - - return []*schema.ResourceData{d}, nil -} - -func resourceAwsSesReceiptRuleCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - createOpts := &ses.CreateReceiptRuleInput{ - Rule: buildReceiptRule(d), - RuleSetName: aws.String(d.Get("rule_set_name").(string)), - } - - if v, ok := d.GetOk("after"); ok { - createOpts.After = aws.String(v.(string)) - } - - _, err := conn.CreateReceiptRule(createOpts) - if err != nil { - return fmt.Errorf("Error creating SES rule: %s", err) - } - - d.SetId(d.Get("name").(string)) - - return resourceAwsSesReceiptRuleUpdate(d, meta) -} - -func resourceAwsSesReceiptRuleUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - updateOpts := &ses.UpdateReceiptRuleInput{ - Rule: buildReceiptRule(d), - RuleSetName: aws.String(d.Get("rule_set_name").(string)), - } - - _, err := conn.UpdateReceiptRule(updateOpts) - if err != nil { - return fmt.Errorf("Error updating SES rule: %s", err) - } - - if d.HasChange("after") { - changePosOpts := &ses.SetReceiptRulePositionInput{ - After: aws.String(d.Get("after").(string)), - RuleName: aws.String(d.Get("name").(string)), - RuleSetName: aws.String(d.Get("rule_set_name").(string)), - } - - _, err := conn.SetReceiptRulePosition(changePosOpts) - if err != nil { - return fmt.Errorf("Error updating SES rule: %s", err) - } - } - - return resourceAwsSesReceiptRuleRead(d, meta) -} - -func resourceAwsSesReceiptRuleRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - describeOpts := &ses.DescribeReceiptRuleInput{ - RuleName: aws.String(d.Id()), - RuleSetName: aws.String(d.Get("rule_set_name").(string)), - } - - response, err := conn.DescribeReceiptRule(describeOpts) - if err != nil { - _, ok := err.(awserr.Error) - if ok && err.(awserr.Error).Code() == "RuleDoesNotExist" { - log.Printf("[WARN] SES Receipt Rule (%s) not found", d.Id()) - d.SetId("") - return nil - } else { - return err - } - } - - d.Set("enabled", *response.Rule.Enabled) - d.Set("recipients", flattenStringList(response.Rule.Recipients)) - d.Set("scan_enabled", *response.Rule.ScanEnabled) - d.Set("tls_policy", *response.Rule.TlsPolicy) - - addHeaderActionList := []map[string]interface{}{} - bounceActionList := []map[string]interface{}{} - lambdaActionList := []map[string]interface{}{} - s3ActionList := []map[string]interface{}{} - snsActionList := []map[string]interface{}{} - stopActionList := []map[string]interface{}{} - workmailActionList := []map[string]interface{}{} - - for i, element := range response.Rule.Actions { - if element.AddHeaderAction != nil { - addHeaderAction := map[string]interface{}{ - "header_name": *element.AddHeaderAction.HeaderName, - "header_value": *element.AddHeaderAction.HeaderValue, - "position": i + 1, - } - addHeaderActionList = append(addHeaderActionList, addHeaderAction) - } - - if element.BounceAction != nil { - bounceAction := map[string]interface{}{ - "message": *element.BounceAction.Message, - "sender": *element.BounceAction.Sender, - "smtp_reply_code": *element.BounceAction.SmtpReplyCode, - "position": i + 1, - } - - if element.BounceAction.StatusCode != nil { - bounceAction["status_code"] = *element.BounceAction.StatusCode - } - - if element.BounceAction.TopicArn != nil { - bounceAction["topic_arn"] = *element.BounceAction.TopicArn - } - - bounceActionList = append(bounceActionList, bounceAction) - } - - if element.LambdaAction != nil { - lambdaAction := map[string]interface{}{ - "function_arn": *element.LambdaAction.FunctionArn, - "position": i + 1, - } - - if element.LambdaAction.InvocationType != nil { - lambdaAction["invocation_type"] = *element.LambdaAction.InvocationType - } - - if element.LambdaAction.TopicArn != nil { - lambdaAction["topic_arn"] = *element.LambdaAction.TopicArn - } - - lambdaActionList = append(lambdaActionList, lambdaAction) - } - - if element.S3Action != nil { - s3Action := map[string]interface{}{ - "bucket_name": *element.S3Action.BucketName, - "position": i + 1, - } - - if element.S3Action.KmsKeyArn != nil { - s3Action["kms_key_arn"] = *element.S3Action.KmsKeyArn - } - - if element.S3Action.ObjectKeyPrefix != nil { - s3Action["object_key_prefix"] = *element.S3Action.ObjectKeyPrefix - } - - if element.S3Action.TopicArn != nil { - s3Action["topic_arn"] = *element.S3Action.TopicArn - } - - s3ActionList = append(s3ActionList, s3Action) - } - - if element.SNSAction != nil { - snsAction := map[string]interface{}{ - "topic_arn": *element.SNSAction.TopicArn, - "position": i + 1, - } - - snsActionList = append(snsActionList, snsAction) - } - - if element.StopAction != nil { - stopAction := map[string]interface{}{ - "scope": *element.StopAction.Scope, - "position": i + 1, - } - - if element.StopAction.TopicArn != nil { - stopAction["topic_arn"] = *element.StopAction.TopicArn - } - - stopActionList = append(stopActionList, stopAction) - } - - if element.WorkmailAction != nil { - workmailAction := map[string]interface{}{ - "organization_arn": *element.WorkmailAction.OrganizationArn, - "position": i + 1, - } - - if element.WorkmailAction.TopicArn != nil { - workmailAction["topic_arn"] = *element.WorkmailAction.TopicArn - } - - workmailActionList = append(workmailActionList, workmailAction) - } - - } - - err = d.Set("add_header_action", addHeaderActionList) - if err != nil { - return err - } - - err = d.Set("bounce_action", bounceActionList) - if err != nil { - return err - } - - err = d.Set("lambda_action", lambdaActionList) - if err != nil { - return err - } - - err = d.Set("s3_action", s3ActionList) - if err != nil { - return err - } - - err = d.Set("sns_action", snsActionList) - if err != nil { - return err - } - - err = d.Set("stop_action", stopActionList) - if err != nil { - return err - } - - err = d.Set("workmail_action", workmailActionList) - return err -} - -func resourceAwsSesReceiptRuleDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - deleteOpts := &ses.DeleteReceiptRuleInput{ - RuleName: aws.String(d.Id()), - RuleSetName: aws.String(d.Get("rule_set_name").(string)), - } - - _, err := conn.DeleteReceiptRule(deleteOpts) - if err != nil { - return fmt.Errorf("Error deleting SES receipt rule: %s", err) - } - - return nil -} - -func buildReceiptRule(d *schema.ResourceData) *ses.ReceiptRule { - receiptRule := &ses.ReceiptRule{ - Name: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("enabled"); ok { - receiptRule.Enabled = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("recipients"); ok { - receiptRule.Recipients = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("scan_enabled"); ok { - receiptRule.ScanEnabled = aws.Bool(v.(bool)) - } - - if v, ok := d.GetOk("tls_policy"); ok { - receiptRule.TlsPolicy = aws.String(v.(string)) - } - - actions := make(map[int]*ses.ReceiptAction) - - if v, ok := d.GetOk("add_header_action"); ok { - for _, element := range v.(*schema.Set).List() { - elem := element.(map[string]interface{}) - - actions[elem["position"].(int)] = &ses.ReceiptAction{ - AddHeaderAction: &ses.AddHeaderAction{ - HeaderName: aws.String(elem["header_name"].(string)), - HeaderValue: aws.String(elem["header_value"].(string)), - }, - } - } - } - - if v, ok := d.GetOk("bounce_action"); ok { - for _, element := range v.(*schema.Set).List() { - elem := element.(map[string]interface{}) - - bounceAction := &ses.BounceAction{ - Message: aws.String(elem["message"].(string)), - Sender: aws.String(elem["sender"].(string)), - SmtpReplyCode: aws.String(elem["smtp_reply_code"].(string)), - } - - if elem["status_code"] != "" { - bounceAction.StatusCode = aws.String(elem["status_code"].(string)) - } - - if elem["topic_arn"] != "" { - bounceAction.TopicArn = aws.String(elem["topic_arn"].(string)) - } - - actions[elem["position"].(int)] = &ses.ReceiptAction{ - BounceAction: bounceAction, - } - } - } - - if v, ok := d.GetOk("lambda_action"); ok { - for _, element := range v.(*schema.Set).List() { - elem := element.(map[string]interface{}) - - lambdaAction := &ses.LambdaAction{ - FunctionArn: aws.String(elem["function_arn"].(string)), - } - - if elem["invocation_type"] != "" { - lambdaAction.InvocationType = aws.String(elem["invocation_type"].(string)) - } - - if elem["topic_arn"] != "" { - lambdaAction.TopicArn = aws.String(elem["topic_arn"].(string)) - } - - actions[elem["position"].(int)] = &ses.ReceiptAction{ - LambdaAction: lambdaAction, - } - } - } - - if v, ok := d.GetOk("s3_action"); ok { - for _, element := range v.(*schema.Set).List() { - elem := element.(map[string]interface{}) - - s3Action := &ses.S3Action{ - BucketName: aws.String(elem["bucket_name"].(string)), - } - - if elem["kms_key_arn"] != "" { - s3Action.KmsKeyArn = aws.String(elem["kms_key_arn"].(string)) - } - - if elem["object_key_prefix"] != "" { - s3Action.ObjectKeyPrefix = aws.String(elem["object_key_prefix"].(string)) - } - - if elem["topic_arn"] != "" { - s3Action.TopicArn = aws.String(elem["topic_arn"].(string)) - } - - actions[elem["position"].(int)] = &ses.ReceiptAction{ - S3Action: s3Action, - } - } - } - - if v, ok := d.GetOk("sns_action"); ok { - for _, element := range v.(*schema.Set).List() { - elem := element.(map[string]interface{}) - - snsAction := &ses.SNSAction{ - TopicArn: aws.String(elem["topic_arn"].(string)), - } - - actions[elem["position"].(int)] = &ses.ReceiptAction{ - SNSAction: snsAction, - } - } - } - - if v, ok := d.GetOk("stop_action"); ok { - for _, element := range v.(*schema.Set).List() { - elem := element.(map[string]interface{}) - - stopAction := &ses.StopAction{ - Scope: aws.String(elem["scope"].(string)), - } - - if elem["topic_arn"] != "" { - stopAction.TopicArn = aws.String(elem["topic_arn"].(string)) - } - - actions[elem["position"].(int)] = &ses.ReceiptAction{ - StopAction: stopAction, - } - } - } - - if v, ok := d.GetOk("workmail_action"); ok { - for _, element := range v.(*schema.Set).List() { - elem := element.(map[string]interface{}) - - workmailAction := &ses.WorkmailAction{ - OrganizationArn: aws.String(elem["organization_arn"].(string)), - } - - if elem["topic_arn"] != "" { - workmailAction.TopicArn = aws.String(elem["topic_arn"].(string)) - } - - actions[elem["position"].(int)] = &ses.ReceiptAction{ - WorkmailAction: workmailAction, - } - } - } - - var keys []int - for k := range actions { - keys = append(keys, k) - } - sort.Ints(keys) - - sortedActions := []*ses.ReceiptAction{} - for _, k := range keys { - sortedActions = append(sortedActions, actions[k]) - } - - receiptRule.Actions = sortedActions - - return receiptRule -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule_set.go deleted file mode 100644 index a2ae91917..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule_set.go +++ /dev/null @@ -1,104 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSesReceiptRuleSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSesReceiptRuleSetCreate, - Read: resourceAwsSesReceiptRuleSetRead, - Delete: resourceAwsSesReceiptRuleSetDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "rule_set_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsSesReceiptRuleSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - ruleSetName := d.Get("rule_set_name").(string) - - createOpts := &ses.CreateReceiptRuleSetInput{ - RuleSetName: aws.String(ruleSetName), - } - - _, err := conn.CreateReceiptRuleSet(createOpts) - if err != nil { - return fmt.Errorf("Error creating SES rule set: %s", err) - } - - d.SetId(ruleSetName) - - return resourceAwsSesReceiptRuleSetRead(d, meta) -} - -func resourceAwsSesReceiptRuleSetRead(d *schema.ResourceData, meta interface{}) error { - ruleSetExists, err := findRuleSet(d.Id(), nil, meta) - - if !ruleSetExists { - log.Printf("[WARN] SES Receipt Rule Set (%s) not found", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return err - } - - d.Set("rule_set_name", d.Id()) - - return nil -} - -func resourceAwsSesReceiptRuleSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - log.Printf("[DEBUG] SES Delete Receipt Rule Set: %s", d.Id()) - _, err := conn.DeleteReceiptRuleSet(&ses.DeleteReceiptRuleSetInput{ - RuleSetName: aws.String(d.Id()), - }) - - return err -} - -func findRuleSet(name string, token *string, meta interface{}) (bool, error) { - conn := meta.(*AWSClient).sesConn - - ruleSetExists := false - - listOpts := &ses.ListReceiptRuleSetsInput{ - NextToken: token, - } - - response, err := conn.ListReceiptRuleSets(listOpts) - for _, element := range response.RuleSets { - if *element.Name == name { - ruleSetExists = true - } - } - - if err != nil && !ruleSetExists && response.NextToken != nil { - ruleSetExists, err = findRuleSet(name, response.NextToken, meta) - } - - if err != nil { - return false, err - } - - return ruleSetExists, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_template.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_template.go deleted file mode 100644 index 326a6d0a3..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_template.go +++ /dev/null @@ -1,154 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ses" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsSesTemplate() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSesTemplateCreate, - Read: resourceAwsSesTemplateRead, - Update: resourceAwsSesTemplateUpdate, - Delete: resourceAwsSesTemplateDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 64), - }, - "html": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 512000), - }, - "subject": { - Type: schema.TypeString, - Optional: true, - }, - "text": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 512000), - }, - }, - } -} -func resourceAwsSesTemplateCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - templateName := d.Get("name").(string) - - template := ses.Template{ - TemplateName: aws.String(templateName), - } - - if v, ok := d.GetOk("html"); ok { - template.HtmlPart = aws.String(v.(string)) - } - - if v, ok := d.GetOk("subject"); ok { - template.SubjectPart = aws.String(v.(string)) - } - - if v, ok := d.GetOk("text"); ok { - template.TextPart = aws.String(v.(string)) - } - - input := ses.CreateTemplateInput{ - Template: &template, - } - - log.Printf("[DEBUG] Creating SES template: %#v", input) - _, err := conn.CreateTemplate(&input) - if err != nil { - return fmt.Errorf("Creating SES template failed: %s", err.Error()) - } - d.SetId(templateName) - - return resourceAwsSesTemplateRead(d, meta) -} - -func resourceAwsSesTemplateRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - input := ses.GetTemplateInput{ - TemplateName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading SES template: %#v", input) - gto, err := conn.GetTemplate(&input) - if err != nil { - if isAWSErr(err, "TemplateDoesNotExist", "") { - log.Printf("[WARN] SES template %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Reading SES template '%s' failed: %s", *input.TemplateName, err.Error()) - } - - d.Set("html", gto.Template.HtmlPart) - d.Set("name", gto.Template.TemplateName) - d.Set("subject", gto.Template.SubjectPart) - d.Set("text", gto.Template.TextPart) - - return nil -} - -func resourceAwsSesTemplateUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - - templateName := d.Id() - - template := ses.Template{ - TemplateName: aws.String(templateName), - } - - if v, ok := d.GetOk("html"); ok { - template.HtmlPart = aws.String(v.(string)) - } - - if v, ok := d.GetOk("subject"); ok { - template.SubjectPart = aws.String(v.(string)) - } - - if v, ok := d.GetOk("text"); ok { - template.TextPart = aws.String(v.(string)) - } - - input := ses.UpdateTemplateInput{ - Template: &template, - } - - log.Printf("[DEBUG] Update SES template: %#v", input) - _, err := conn.UpdateTemplate(&input) - if err != nil { - return fmt.Errorf("Updating SES template '%s' failed: %s", templateName, err.Error()) - } - - return resourceAwsSesTemplateRead(d, meta) -} - -func resourceAwsSesTemplateDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sesConn - input := ses.DeleteTemplateInput{ - TemplateName: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Delete SES template: %#v", input) - _, err := conn.DeleteTemplate(&input) - if err != nil { - return fmt.Errorf("Deleting SES template '%s' failed: %s", *input.TemplateName, err.Error()) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_activity.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_activity.go deleted file mode 100644 index 496b7a8bd..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_activity.go +++ /dev/null @@ -1,167 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/sfn" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsSfnActivity() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSfnActivityCreate, - Read: resourceAwsSfnActivityRead, - Update: resourceAwsSfnActivityUpdate, - Delete: resourceAwsSfnActivityDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(0, 80), - }, - - "creation_date": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsSfnActivityCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sfnconn - log.Print("[DEBUG] Creating Step Function Activity") - - params := &sfn.CreateActivityInput{ - Name: aws.String(d.Get("name").(string)), - } - - activity, err := conn.CreateActivity(params) - if err != nil { - return fmt.Errorf("Error creating Step Function Activity: %s", err) - } - - d.SetId(*activity.ActivityArn) - - if v, ok := d.GetOk("tags"); ok { - input := &sfn.TagResourceInput{ - ResourceArn: aws.String(d.Id()), - Tags: tagsFromMapSfn(v.(map[string]interface{})), - } - log.Printf("[DEBUG] Tagging SFN Activity: %s", input) - _, err := conn.TagResource(input) - if err != nil { - return fmt.Errorf("error tagging SFN Activity (%s): %s", d.Id(), input) - } - } - return resourceAwsSfnActivityRead(d, meta) -} - -func resourceAwsSfnActivityUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sfnconn - - if d.HasChange("tags") { - oldTagsRaw, newTagsRaw := d.GetChange("tags") - oldTagsMap := oldTagsRaw.(map[string]interface{}) - newTagsMap := newTagsRaw.(map[string]interface{}) - createTags, removeTags := diffTagsSfn(tagsFromMapSfn(oldTagsMap), tagsFromMapSfn(newTagsMap)) - - if len(removeTags) > 0 { - removeTagKeys := make([]*string, len(removeTags)) - for i, removeTag := range removeTags { - removeTagKeys[i] = removeTag.Key - } - - input := &sfn.UntagResourceInput{ - ResourceArn: aws.String(d.Id()), - TagKeys: removeTagKeys, - } - - log.Printf("[DEBUG] Untagging State Function Activity: %s", input) - if _, err := conn.UntagResource(input); err != nil { - return fmt.Errorf("error untagging State Function Activity (%s): %s", d.Id(), err) - } - } - - if len(createTags) > 0 { - input := &sfn.TagResourceInput{ - ResourceArn: aws.String(d.Id()), - Tags: createTags, - } - - log.Printf("[DEBUG] Tagging State Function Activity: %s", input) - if _, err := conn.TagResource(input); err != nil { - return fmt.Errorf("error tagging State Function Activity (%s): %s", d.Id(), err) - } - } - } - - return resourceAwsSfnActivityRead(d, meta) -} - -func resourceAwsSfnActivityRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sfnconn - log.Printf("[DEBUG] Reading Step Function Activity: %s", d.Id()) - - sm, err := conn.DescribeActivity(&sfn.DescribeActivityInput{ - ActivityArn: aws.String(d.Id()), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ActivityDoesNotExist" { - d.SetId("") - return nil - } - return err - } - - d.Set("name", sm.Name) - - if err := d.Set("creation_date", sm.CreationDate.Format(time.RFC3339)); err != nil { - log.Printf("[DEBUG] Error setting creation_date: %s", err) - } - - tagsResp, err := conn.ListTagsForResource( - &sfn.ListTagsForResourceInput{ - ResourceArn: aws.String(d.Id()), - }, - ) - - if err != nil { - return fmt.Errorf("error listing SFN Activity (%s) tags: %s", d.Id(), err) - } - - if err := d.Set("tags", tagsToMapSfn(tagsResp.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func resourceAwsSfnActivityDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sfnconn - log.Printf("[DEBUG] Deleting Step Functions Activity: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteActivity(&sfn.DeleteActivityInput{ - ActivityArn: aws.String(d.Id()), - }) - - if err == nil { - return nil - } - - return resource.NonRetryableError(err) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_state_machine.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_state_machine.go deleted file mode 100644 index c0d3148c4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_state_machine.go +++ /dev/null @@ -1,225 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/sfn" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsSfnStateMachine() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSfnStateMachineCreate, - Read: resourceAwsSfnStateMachineRead, - Update: resourceAwsSfnStateMachineUpdate, - Delete: resourceAwsSfnStateMachineDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "definition": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(0, 1024*1024), // 1048576 - }, - - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateSfnStateMachineName, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - - "creation_date": { - Type: schema.TypeString, - Computed: true, - }, - - "status": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsSfnStateMachineCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sfnconn - log.Print("[DEBUG] Creating Step Function State Machine") - - params := &sfn.CreateStateMachineInput{ - Definition: aws.String(d.Get("definition").(string)), - Name: aws.String(d.Get("name").(string)), - RoleArn: aws.String(d.Get("role_arn").(string)), - } - - var activity *sfn.CreateStateMachineOutput - - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - var err error - activity, err = conn.CreateStateMachine(params) - - if err != nil { - // Note: the instance may be in a deleting mode, hence the retry - // when creating the step function. This can happen when we are - // updating the resource (since there is no update API call). - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "StateMachineDeleting" { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - - return nil - }) - - if err != nil { - return fmt.Errorf("Error creating Step Function State Machine: %s", err) - } - - d.SetId(*activity.StateMachineArn) - - if v, ok := d.GetOk("tags"); ok { - input := &sfn.TagResourceInput{ - ResourceArn: aws.String(d.Id()), - Tags: tagsFromMapSfn(v.(map[string]interface{})), - } - log.Printf("[DEBUG] Tagging SFN State Machine: %s", input) - _, err := conn.TagResource(input) - if err != nil { - return fmt.Errorf("error tagging SFN State Machine (%s): %s", d.Id(), input) - } - } - return resourceAwsSfnStateMachineRead(d, meta) -} - -func resourceAwsSfnStateMachineRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sfnconn - log.Printf("[DEBUG] Reading Step Function State Machine: %s", d.Id()) - - sm, err := conn.DescribeStateMachine(&sfn.DescribeStateMachineInput{ - StateMachineArn: aws.String(d.Id()), - }) - if err != nil { - - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "NotFoundException" || awserr.Code() == "StateMachineDoesNotExist" { - d.SetId("") - return nil - } - } - return err - } - - d.Set("definition", sm.Definition) - d.Set("name", sm.Name) - d.Set("role_arn", sm.RoleArn) - d.Set("status", sm.Status) - - if err := d.Set("creation_date", sm.CreationDate.Format(time.RFC3339)); err != nil { - log.Printf("[DEBUG] Error setting creation_date: %s", err) - } - tagsResp, err := conn.ListTagsForResource( - &sfn.ListTagsForResourceInput{ - ResourceArn: aws.String(d.Id()), - }, - ) - if err != nil { - return fmt.Errorf("error listing SFN Activity (%s) tags: %s", d.Id(), err) - } - if err := d.Set("tags", tagsToMapSfn(tagsResp.Tags)); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - - return nil -} - -func resourceAwsSfnStateMachineUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sfnconn - - params := &sfn.UpdateStateMachineInput{ - StateMachineArn: aws.String(d.Id()), - Definition: aws.String(d.Get("definition").(string)), - RoleArn: aws.String(d.Get("role_arn").(string)), - } - - _, err := conn.UpdateStateMachine(params) - - log.Printf("[DEBUG] Updating Step Function State Machine: %#v", params) - - if err != nil { - if isAWSErr(err, "StateMachineDoesNotExist", "State Machine Does Not Exist") { - return fmt.Errorf("Error updating Step Function State Machine: %s", err) - } - return err - } - - if d.HasChange("tags") { - oldTagsRaw, newTagsRaw := d.GetChange("tags") - oldTagsMap := oldTagsRaw.(map[string]interface{}) - newTagsMap := newTagsRaw.(map[string]interface{}) - createTags, removeTags := diffTagsSfn(tagsFromMapSfn(oldTagsMap), tagsFromMapSfn(newTagsMap)) - - if len(removeTags) > 0 { - removeTagKeys := make([]*string, len(removeTags)) - for i, removeTag := range removeTags { - removeTagKeys[i] = removeTag.Key - } - - input := &sfn.UntagResourceInput{ - ResourceArn: aws.String(d.Id()), - TagKeys: removeTagKeys, - } - - log.Printf("[DEBUG] Untagging State Function: %s", input) - if _, err := conn.UntagResource(input); err != nil { - return fmt.Errorf("error untagging State Function (%s): %s", d.Id(), err) - } - } - - if len(createTags) > 0 { - input := &sfn.TagResourceInput{ - ResourceArn: aws.String(d.Id()), - Tags: createTags, - } - - log.Printf("[DEBUG] Tagging State Function: %s", input) - if _, err := conn.TagResource(input); err != nil { - return fmt.Errorf("error tagging State Function (%s): %s", d.Id(), err) - } - } - } - - return resourceAwsSfnStateMachineRead(d, meta) -} - -func resourceAwsSfnStateMachineDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sfnconn - log.Printf("[DEBUG] Deleting Step Function State Machine: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteStateMachine(&sfn.DeleteStateMachineInput{ - StateMachineArn: aws.String(d.Id()), - }) - - if err == nil { - return nil - } - - return resource.NonRetryableError(err) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_simpledb_domain.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_simpledb_domain.go deleted file mode 100644 index 53f302491..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_simpledb_domain.go +++ /dev/null @@ -1,83 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/helper/schema" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/simpledb" -) - -func resourceAwsSimpleDBDomain() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSimpleDBDomainCreate, - Read: resourceAwsSimpleDBDomainRead, - Delete: resourceAwsSimpleDBDomainDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsSimpleDBDomainCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).simpledbconn - - name := d.Get("name").(string) - input := &simpledb.CreateDomainInput{ - DomainName: aws.String(name), - } - _, err := conn.CreateDomain(input) - if err != nil { - return fmt.Errorf("Create SimpleDB Domain failed: %s", err) - } - - d.SetId(name) - return nil -} - -func resourceAwsSimpleDBDomainRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).simpledbconn - - input := &simpledb.DomainMetadataInput{ - DomainName: aws.String(d.Id()), - } - _, err := conn.DomainMetadata(input) - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NoSuchDomain" { - log.Printf("[WARN] Removing SimpleDB domain %q because it's gone.", d.Id()) - d.SetId("") - return nil - } - } - if err != nil { - return err - } - - d.Set("name", d.Id()) - return nil -} - -func resourceAwsSimpleDBDomainDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).simpledbconn - - input := &simpledb.DeleteDomainInput{ - DomainName: aws.String(d.Id()), - } - _, err := conn.DeleteDomain(input) - if err != nil { - return fmt.Errorf("Delete SimpleDB Domain failed: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_snapshot_create_volume_permission.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_snapshot_create_volume_permission.go deleted file mode 100644 index ed8e757c2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_snapshot_create_volume_permission.go +++ /dev/null @@ -1,152 +0,0 @@ -package aws - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSnapshotCreateVolumePermission() *schema.Resource { - return &schema.Resource{ - Exists: resourceAwsSnapshotCreateVolumePermissionExists, - Create: resourceAwsSnapshotCreateVolumePermissionCreate, - Read: resourceAwsSnapshotCreateVolumePermissionRead, - Delete: resourceAwsSnapshotCreateVolumePermissionDelete, - - Schema: map[string]*schema.Schema{ - "snapshot_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "account_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsSnapshotCreateVolumePermissionExists(d *schema.ResourceData, meta interface{}) (bool, error) { - conn := meta.(*AWSClient).ec2conn - - snapshot_id := d.Get("snapshot_id").(string) - account_id := d.Get("account_id").(string) - return hasCreateVolumePermission(conn, snapshot_id, account_id) -} - -func resourceAwsSnapshotCreateVolumePermissionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - snapshot_id := d.Get("snapshot_id").(string) - account_id := d.Get("account_id").(string) - - _, err := conn.ModifySnapshotAttribute(&ec2.ModifySnapshotAttributeInput{ - SnapshotId: aws.String(snapshot_id), - Attribute: aws.String("createVolumePermission"), - CreateVolumePermission: &ec2.CreateVolumePermissionModifications{ - Add: []*ec2.CreateVolumePermission{ - {UserId: aws.String(account_id)}, - }, - }, - }) - if err != nil { - return fmt.Errorf("Error adding snapshot createVolumePermission: %s", err) - } - - d.SetId(fmt.Sprintf("%s-%s", snapshot_id, account_id)) - - // Wait for the account to appear in the permission list - stateConf := &resource.StateChangeConf{ - Pending: []string{"denied"}, - Target: []string{"granted"}, - Refresh: resourceAwsSnapshotCreateVolumePermissionStateRefreshFunc(conn, snapshot_id, account_id), - Timeout: 20 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 10 * time.Second, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for snapshot createVolumePermission (%s) to be added: %s", - d.Id(), err) - } - - return nil -} - -func resourceAwsSnapshotCreateVolumePermissionRead(d *schema.ResourceData, meta interface{}) error { - return nil -} - -func resourceAwsSnapshotCreateVolumePermissionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - snapshot_id := d.Get("snapshot_id").(string) - account_id := d.Get("account_id").(string) - - _, err := conn.ModifySnapshotAttribute(&ec2.ModifySnapshotAttributeInput{ - SnapshotId: aws.String(snapshot_id), - Attribute: aws.String("createVolumePermission"), - CreateVolumePermission: &ec2.CreateVolumePermissionModifications{ - Remove: []*ec2.CreateVolumePermission{ - {UserId: aws.String(account_id)}, - }, - }, - }) - if err != nil { - return fmt.Errorf("Error removing snapshot createVolumePermission: %s", err) - } - - // Wait for the account to disappear from the permission list - stateConf := &resource.StateChangeConf{ - Pending: []string{"granted"}, - Target: []string{"denied"}, - Refresh: resourceAwsSnapshotCreateVolumePermissionStateRefreshFunc(conn, snapshot_id, account_id), - Timeout: 5 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 10 * time.Second, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for snapshot createVolumePermission (%s) to be removed: %s", - d.Id(), err) - } - - return nil -} - -func hasCreateVolumePermission(conn *ec2.EC2, snapshot_id string, account_id string) (bool, error) { - _, state, err := resourceAwsSnapshotCreateVolumePermissionStateRefreshFunc(conn, snapshot_id, account_id)() - if err != nil { - return false, err - } - if state == "granted" { - return true, nil - } else { - return false, nil - } -} - -func resourceAwsSnapshotCreateVolumePermissionStateRefreshFunc(conn *ec2.EC2, snapshot_id string, account_id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - attrs, err := conn.DescribeSnapshotAttribute(&ec2.DescribeSnapshotAttributeInput{ - SnapshotId: aws.String(snapshot_id), - Attribute: aws.String("createVolumePermission"), - }) - if err != nil { - return nil, "", fmt.Errorf("Error refreshing snapshot createVolumePermission state: %s", err) - } - - for _, vp := range attrs.CreateVolumePermissions { - if *vp.UserId == account_id { - return attrs, "granted", nil - } - } - return attrs, "denied", nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_platform_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_platform_application.go deleted file mode 100644 index b4afc8f99..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_platform_application.go +++ /dev/null @@ -1,288 +0,0 @@ -package aws - -import ( - "crypto/sha256" - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/sns" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -var snsPlatformRequiresPlatformPrincipal = map[string]bool{ - "APNS": true, - "APNS_SANDBOX": true, -} - -// Mutable attributes -// http://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html -var snsPlatformApplicationAttributeMap = map[string]string{ - "event_delivery_failure_topic_arn": "EventDeliveryFailure", - "event_endpoint_created_topic_arn": "EventEndpointCreated", - "event_endpoint_deleted_topic_arn": "EventEndpointDeleted", - "event_endpoint_updated_topic_arn": "EventEndpointUpdated", - "failure_feedback_role_arn": "FailureFeedbackRoleArn", - "platform_principal": "PlatformPrincipal", - "success_feedback_role_arn": "SuccessFeedbackRoleArn", - "success_feedback_sample_rate": "SuccessFeedbackSampleRate", -} - -func resourceAwsSnsPlatformApplication() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSnsPlatformApplicationCreate, - Read: resourceAwsSnsPlatformApplicationRead, - Update: resourceAwsSnsPlatformApplicationUpdate, - Delete: resourceAwsSnsPlatformApplicationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - CustomizeDiff: func(diff *schema.ResourceDiff, v interface{}) error { - return validateAwsSnsPlatformApplication(diff) - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "platform": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "platform_credential": { - Type: schema.TypeString, - Required: true, - StateFunc: hashSum, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "event_delivery_failure_topic_arn": { - Type: schema.TypeString, - Optional: true, - }, - "event_endpoint_created_topic_arn": { - Type: schema.TypeString, - Optional: true, - }, - "event_endpoint_deleted_topic_arn": { - Type: schema.TypeString, - Optional: true, - }, - "event_endpoint_updated_topic_arn": { - Type: schema.TypeString, - Optional: true, - }, - "failure_feedback_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - "platform_principal": { - Type: schema.TypeString, - Optional: true, - StateFunc: hashSum, - }, - "success_feedback_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - "success_feedback_sample_rate": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsSnsPlatformApplicationCreate(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - attributes := make(map[string]*string) - name := d.Get("name").(string) - platform := d.Get("platform").(string) - - attributes["PlatformCredential"] = aws.String(d.Get("platform_credential").(string)) - if v, ok := d.GetOk("platform_principal"); ok { - attributes["PlatformPrincipal"] = aws.String(v.(string)) - } - - req := &sns.CreatePlatformApplicationInput{ - Name: aws.String(name), - Platform: aws.String(platform), - Attributes: attributes, - } - - log.Printf("[DEBUG] SNS create application: %s", req) - - output, err := snsconn.CreatePlatformApplication(req) - if err != nil { - return fmt.Errorf("Error creating SNS platform application: %s", err) - } - - d.SetId(*output.PlatformApplicationArn) - - return resourceAwsSnsPlatformApplicationUpdate(d, meta) -} - -func resourceAwsSnsPlatformApplicationUpdate(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - attributes := make(map[string]*string) - - for k := range resourceAwsSnsPlatformApplication().Schema { - if attrKey, ok := snsPlatformApplicationAttributeMap[k]; ok { - if d.HasChange(k) { - log.Printf("[DEBUG] Updating %s", attrKey) - _, n := d.GetChange(k) - attributes[attrKey] = aws.String(n.(string)) - } - } - } - - if d.HasChange("platform_credential") { - attributes["PlatformCredential"] = aws.String(d.Get("platform_credential").(string)) - // If the platform requires a principal it must also be specified, even if it didn't change - // since credential is stored as a hash, the only way to update principal is to update both - // as they must be specified together in the request. - if v, ok := d.GetOk("platform_principal"); ok { - attributes["PlatformPrincipal"] = aws.String(v.(string)) - } - } - - // Make API call to update attributes - req := &sns.SetPlatformApplicationAttributesInput{ - PlatformApplicationArn: aws.String(d.Id()), - Attributes: attributes, - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := snsconn.SetPlatformApplicationAttributes(req) - if err != nil { - if isAWSErr(err, sns.ErrCodeInvalidParameterException, "is not a valid role to allow SNS to write to Cloudwatch Logs") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return fmt.Errorf("Error updating SNS platform application: %s", err) - } - - return resourceAwsSnsPlatformApplicationRead(d, meta) -} - -func resourceAwsSnsPlatformApplicationRead(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - // There is no SNS Describe/GetPlatformApplication to fetch attributes like name and platform - // We will use the ID, which should be a platform application ARN, to: - // * Validate its an appropriate ARN on import - // * Parse out the name and platform - arn, name, platform, err := decodeResourceAwsSnsPlatformApplicationID(d.Id()) - if err != nil { - return err - } - - d.Set("arn", arn) - d.Set("name", name) - d.Set("platform", platform) - - attributeOutput, err := snsconn.GetPlatformApplicationAttributes(&sns.GetPlatformApplicationAttributesInput{ - PlatformApplicationArn: aws.String(arn), - }) - - if err != nil { - if isAWSErr(err, sns.ErrCodeNotFoundException, "") { - log.Printf("[WARN] SNS Platform Application (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - if attributeOutput.Attributes != nil && len(attributeOutput.Attributes) > 0 { - attrmap := attributeOutput.Attributes - resource := *resourceAwsSnsPlatformApplication() - // iKey = internal struct key, oKey = AWS Attribute Map key - for iKey, oKey := range snsPlatformApplicationAttributeMap { - log.Printf("[DEBUG] Updating %s => %s", iKey, oKey) - - if attrmap[oKey] != nil { - // Some of the fetched attributes are stateful properties such as - // the number of subscriptions, the owner, etc. skip those - if resource.Schema[iKey] != nil { - value := *attrmap[oKey] - log.Printf("[DEBUG] Updating %s => %s -> %s", iKey, oKey, value) - d.Set(iKey, *attrmap[oKey]) - } - } - } - } - - return nil -} - -func resourceAwsSnsPlatformApplicationDelete(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - log.Printf("[DEBUG] SNS Delete Application: %s", d.Id()) - _, err := snsconn.DeletePlatformApplication(&sns.DeletePlatformApplicationInput{ - PlatformApplicationArn: aws.String(d.Id()), - }) - return err -} - -func decodeResourceAwsSnsPlatformApplicationID(input string) (arnS, name, platform string, err error) { - platformApplicationArn, err := arn.Parse(input) - if err != nil { - err = fmt.Errorf( - "SNS Platform Application ID must be of the form "+ - "arn:PARTITION:sns:REGION:ACCOUNTID:app/PLATFORM/NAME, "+ - "was provided %q and received error: %s", input, err) - return - } - - platformApplicationArnResourceParts := strings.Split(platformApplicationArn.Resource, "/") - if len(platformApplicationArnResourceParts) != 3 || platformApplicationArnResourceParts[0] != "app" { - err = fmt.Errorf( - "SNS Platform Application ID must be of the form "+ - "arn:PARTITION:sns:REGION:ACCOUNTID:app/PLATFORM/NAME, "+ - "was provided: %s", input) - return - } - - arnS = platformApplicationArn.String() - name = platformApplicationArnResourceParts[2] - platform = platformApplicationArnResourceParts[1] - return -} - -func hashSum(contents interface{}) string { - return fmt.Sprintf("%x", sha256.Sum256([]byte(contents.(string)))) -} - -func validateAwsSnsPlatformApplication(d *schema.ResourceDiff) error { - platform := d.Get("platform").(string) - if snsPlatformRequiresPlatformPrincipal[platform] { - if v, ok := d.GetOk("platform_principal"); ok { - value := v.(string) - if len(value) == 0 { - return fmt.Errorf("platform_principal must be non-empty when platform = %s", platform) - } - return nil - } - return fmt.Errorf("platform_principal is required when platform = %s", platform) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_sms_preferences.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_sms_preferences.go deleted file mode 100644 index 6892ec250..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_sms_preferences.go +++ /dev/null @@ -1,166 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/sns" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func validateMonthlySpend(v interface{}, k string) (ws []string, errors []error) { - vInt, _ := strconv.Atoi(v.(string)) - if vInt < 0 { - errors = append(errors, fmt.Errorf("Error setting SMS preferences: monthly spend limit value [%d] must be >= 0!", vInt)) - } - return -} - -func validateDeliverySamplingRate(v interface{}, k string) (ws []string, errors []error) { - vInt, _ := strconv.Atoi(v.(string)) - if vInt < 0 || vInt > 100 { - errors = append(errors, fmt.Errorf("Error setting SMS preferences: default percentage of success to sample value [%d] must be between 0 and 100!", vInt)) - } - return -} - -func resourceAwsSnsSmsPreferences() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSnsSmsPreferencesSet, - Read: resourceAwsSnsSmsPreferencesGet, - Update: resourceAwsSnsSmsPreferencesSet, - Delete: resourceAwsSnsSmsPreferencesDelete, - - Schema: map[string]*schema.Schema{ - "monthly_spend_limit": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateMonthlySpend, - }, - - "delivery_status_iam_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - - "delivery_status_success_sampling_rate": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateDeliverySamplingRate, - }, - - "default_sender_id": { - Type: schema.TypeString, - Optional: true, - }, - - "default_sms_type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{"Promotional", "Transactional"}, false), - }, - - "usage_report_s3_bucket": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -const resourceId = "aws_sns_sms_id" - -var smsAttributeMap = map[string]string{ - "monthly_spend_limit": "MonthlySpendLimit", - "delivery_status_iam_role_arn": "DeliveryStatusIAMRole", - "delivery_status_success_sampling_rate": "DeliveryStatusSuccessSamplingRate", - "default_sender_id": "DefaultSenderID", - "default_sms_type": "DefaultSMSType", - "usage_report_s3_bucket": "UsageReportS3Bucket", -} - -var smsAttributeDefaultValues = map[string]string{ - "monthly_spend_limit": "", - "delivery_status_iam_role_arn": "", - "delivery_status_success_sampling_rate": "", - "default_sender_id": "", - "default_sms_type": "", - "usage_report_s3_bucket": "", -} - -func resourceAwsSnsSmsPreferencesSet(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - log.Printf("[DEBUG] SNS Set SMS preferences") - - monthlySpendLimit := d.Get("monthly_spend_limit").(string) - deliveryStatusIamRoleArn := d.Get("delivery_status_iam_role_arn").(string) - deliveryStatusSuccessSamplingRate := d.Get("delivery_status_success_sampling_rate").(string) - defaultSenderId := d.Get("default_sender_id").(string) - defaultSmsType := d.Get("default_sms_type").(string) - usageReportS3Bucket := d.Get("usage_report_s3_bucket").(string) - - // Set preferences - params := &sns.SetSMSAttributesInput{ - Attributes: map[string]*string{ - "MonthlySpendLimit": aws.String(monthlySpendLimit), - "DeliveryStatusIAMRole": aws.String(deliveryStatusIamRoleArn), - "DeliveryStatusSuccessSamplingRate": aws.String(deliveryStatusSuccessSamplingRate), - "DefaultSenderID": aws.String(defaultSenderId), - "DefaultSMSType": aws.String(defaultSmsType), - "UsageReportS3Bucket": aws.String(usageReportS3Bucket), - }, - } - - if _, err := snsconn.SetSMSAttributes(params); err != nil { - return fmt.Errorf("Error setting SMS preferences: %s", err) - } - - d.SetId(resourceId) - return nil -} - -func resourceAwsSnsSmsPreferencesGet(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - // Fetch ALL attributes - attrs, err := snsconn.GetSMSAttributes(&sns.GetSMSAttributesInput{}) - if err != nil { - return err - } - - // Reset with default values first - for tfAttrName, defValue := range smsAttributeDefaultValues { - d.Set(tfAttrName, defValue) - } - - // Apply existing settings - if attrs.Attributes != nil && len(attrs.Attributes) > 0 { - attrmap := attrs.Attributes - for tfAttrName, snsAttrName := range smsAttributeMap { - d.Set(tfAttrName, attrmap[snsAttrName]) - } - } - - return nil -} - -func resourceAwsSnsSmsPreferencesDelete(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - // Reset the attributes to their default value - attrs := map[string]*string{} - for tfAttrName, defValue := range smsAttributeDefaultValues { - attrs[smsAttributeMap[tfAttrName]] = &defValue - } - - params := &sns.SetSMSAttributesInput{Attributes: attrs} - if _, err := snsconn.SetSMSAttributes(params); err != nil { - return fmt.Errorf("Error resetting SMS preferences: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go deleted file mode 100644 index df1006e5e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go +++ /dev/null @@ -1,270 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/sns" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -// Mutable attributes -var SNSAttributeMap = map[string]string{ - "application_failure_feedback_role_arn": "ApplicationFailureFeedbackRoleArn", - "application_success_feedback_role_arn": "ApplicationSuccessFeedbackRoleArn", - "application_success_feedback_sample_rate": "ApplicationSuccessFeedbackSampleRate", - "arn": "TopicArn", - "delivery_policy": "DeliveryPolicy", - "display_name": "DisplayName", - "http_failure_feedback_role_arn": "HTTPFailureFeedbackRoleArn", - "http_success_feedback_role_arn": "HTTPSuccessFeedbackRoleArn", - "http_success_feedback_sample_rate": "HTTPSuccessFeedbackSampleRate", - "kms_master_key_id": "KmsMasterKeyId", - "lambda_failure_feedback_role_arn": "LambdaFailureFeedbackRoleArn", - "lambda_success_feedback_role_arn": "LambdaSuccessFeedbackRoleArn", - "lambda_success_feedback_sample_rate": "LambdaSuccessFeedbackSampleRate", - "policy": "Policy", - "sqs_failure_feedback_role_arn": "SQSFailureFeedbackRoleArn", - "sqs_success_feedback_role_arn": "SQSSuccessFeedbackRoleArn", - "sqs_success_feedback_sample_rate": "SQSSuccessFeedbackSampleRate", -} - -func resourceAwsSnsTopic() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSnsTopicCreate, - Read: resourceAwsSnsTopicRead, - Update: resourceAwsSnsTopicUpdate, - Delete: resourceAwsSnsTopicDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - }, - "display_name": { - Type: schema.TypeString, - Optional: true, - }, - "policy": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - }, - "delivery_policy": { - Type: schema.TypeString, - Optional: true, - ForceNew: false, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentJsonDiffs, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - }, - "application_success_feedback_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - "application_success_feedback_sample_rate": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(0, 100), - }, - "application_failure_feedback_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - "http_success_feedback_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - "http_success_feedback_sample_rate": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(0, 100), - }, - "http_failure_feedback_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - "kms_master_key_id": { - Type: schema.TypeString, - Optional: true, - }, - "lambda_success_feedback_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - "lambda_success_feedback_sample_rate": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(0, 100), - }, - "lambda_failure_feedback_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - "sqs_success_feedback_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - "sqs_success_feedback_sample_rate": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntBetween(0, 100), - }, - "sqs_failure_feedback_role_arn": { - Type: schema.TypeString, - Optional: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsSnsTopicCreate(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - var name string - if v, ok := d.GetOk("name"); ok { - name = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - name = resource.PrefixedUniqueId(v.(string)) - } else { - name = resource.UniqueId() - } - - log.Printf("[DEBUG] SNS create topic: %s", name) - - req := &sns.CreateTopicInput{ - Name: aws.String(name), - } - - output, err := snsconn.CreateTopic(req) - if err != nil { - return fmt.Errorf("Error creating SNS topic: %s", err) - } - - d.SetId(*output.TopicArn) - - return resourceAwsSnsTopicUpdate(d, meta) -} - -func resourceAwsSnsTopicUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).snsconn - - for terraformAttrName, snsAttrName := range SNSAttributeMap { - if d.HasChange(terraformAttrName) { - _, terraformAttrValue := d.GetChange(terraformAttrName) - err := updateAwsSnsTopicAttribute(d.Id(), snsAttrName, terraformAttrValue, conn) - if err != nil { - return err - } - } - } - - return resourceAwsSnsTopicRead(d, meta) -} - -func resourceAwsSnsTopicRead(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - log.Printf("[DEBUG] Reading SNS Topic Attributes for %s", d.Id()) - attributeOutput, err := snsconn.GetTopicAttributes(&sns.GetTopicAttributesInput{ - TopicArn: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, sns.ErrCodeNotFoundException, "") { - log.Printf("[WARN] SNS Topic (%s) not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return err - } - - if attributeOutput.Attributes != nil && len(attributeOutput.Attributes) > 0 { - attrmap := attributeOutput.Attributes - for terraformAttrName, snsAttrName := range SNSAttributeMap { - d.Set(terraformAttrName, attrmap[snsAttrName]) - } - } else { - for terraformAttrName := range SNSAttributeMap { - d.Set(terraformAttrName, "") - } - } - - // If we have no name set (import) then determine it from the ARN. - // This is a bit of a heuristic for now since AWS provides no other - // way to get it. - if _, ok := d.GetOk("name"); !ok { - arn := d.Get("arn").(string) - idx := strings.LastIndex(arn, ":") - if idx > -1 { - d.Set("name", arn[idx+1:]) - } - } - - return nil -} - -func resourceAwsSnsTopicDelete(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - log.Printf("[DEBUG] SNS Delete Topic: %s", d.Id()) - _, err := snsconn.DeleteTopic(&sns.DeleteTopicInput{ - TopicArn: aws.String(d.Id()), - }) - - return err -} - -func updateAwsSnsTopicAttribute(topicArn, name string, value interface{}, conn *sns.SNS) error { - // Ignore an empty policy - if name == "Policy" && value == "" { - return nil - } - log.Printf("[DEBUG] Updating SNS Topic Attribute: %s", name) - - // Make API call to update attributes - req := sns.SetTopicAttributesInput{ - TopicArn: aws.String(topicArn), - AttributeName: aws.String(name), - AttributeValue: aws.String(fmt.Sprintf("%v", value)), - } - - // Retry the update in the event of an eventually consistent style of - // error, where say an IAM resource is successfully created but not - // actually available. See https://github.com/hashicorp/terraform/issues/3660 - _, err := retryOnAwsCode(sns.ErrCodeInvalidParameterException, func() (interface{}, error) { - return conn.SetTopicAttributes(&req) - }) - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_policy.go deleted file mode 100644 index f2c6ee54e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_policy.go +++ /dev/null @@ -1,166 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/sns" -) - -func resourceAwsSnsTopicPolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSnsTopicPolicyUpsert, - Read: resourceAwsSnsTopicPolicyRead, - Update: resourceAwsSnsTopicPolicyUpsert, - Delete: resourceAwsSnsTopicPolicyDelete, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "policy": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - }, - } -} - -func resourceAwsSnsTopicPolicyUpsert(d *schema.ResourceData, meta interface{}) error { - arn := d.Get("arn").(string) - req := sns.SetTopicAttributesInput{ - TopicArn: aws.String(arn), - AttributeName: aws.String("Policy"), - AttributeValue: aws.String(d.Get("policy").(string)), - } - - d.SetId(arn) - - // Retry the update in the event of an eventually consistent style of - // error, where say an IAM resource is successfully created but not - // actually available. See https://github.com/hashicorp/terraform/issues/3660 - conn := meta.(*AWSClient).snsconn - _, err := retryOnAwsCode("InvalidParameter", func() (interface{}, error) { - return conn.SetTopicAttributes(&req) - }) - if err != nil { - return err - } - - return resourceAwsSnsTopicPolicyRead(d, meta) -} - -func resourceAwsSnsTopicPolicyRead(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - attributeOutput, err := snsconn.GetTopicAttributes(&sns.GetTopicAttributesInput{ - TopicArn: aws.String(d.Id()), - }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFound" { - log.Printf("[WARN] SNS Topic (%s) not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return err - } - - if attributeOutput.Attributes == nil { - log.Printf("[WARN] SNS Topic (%q) attributes not found (nil)", d.Id()) - d.SetId("") - return nil - } - attrmap := attributeOutput.Attributes - - policy, ok := attrmap["Policy"] - if !ok { - log.Printf("[WARN] SNS Topic (%q) policy not found in attributes", d.Id()) - d.SetId("") - return nil - } - - d.Set("policy", policy) - - return nil -} - -func resourceAwsSnsTopicPolicyDelete(d *schema.ResourceData, meta interface{}) error { - accountId, err := getAccountIdFromSnsTopicArn(d.Id(), meta.(*AWSClient).partition) - if err != nil { - return err - } - - req := sns.SetTopicAttributesInput{ - TopicArn: aws.String(d.Id()), - AttributeName: aws.String("Policy"), - // It is impossible to delete a policy or set to empty - // (confirmed by AWS Support representative) - // so we instead set it back to the default one - AttributeValue: aws.String(buildDefaultSnsTopicPolicy(d.Id(), accountId)), - } - - // Retry the update in the event of an eventually consistent style of - // error, where say an IAM resource is successfully created but not - // actually available. See https://github.com/hashicorp/terraform/issues/3660 - log.Printf("[DEBUG] Resetting SNS Topic Policy to default: %s", req) - conn := meta.(*AWSClient).snsconn - _, err = retryOnAwsCode("InvalidParameter", func() (interface{}, error) { - return conn.SetTopicAttributes(&req) - }) - return err -} - -func getAccountIdFromSnsTopicArn(arn, partition string) (string, error) { - // arn:aws:sns:us-west-2:123456789012:test-new - // arn:aws-us-gov:sns:us-west-2:123456789012:test-new - re := regexp.MustCompile(fmt.Sprintf("^arn:%s:sns:[^:]+:([0-9]{12}):.+", partition)) - matches := re.FindStringSubmatch(arn) - if len(matches) != 2 { - return "", fmt.Errorf("Unable to get account ID from ARN (%q)", arn) - } - return matches[1], nil -} - -func buildDefaultSnsTopicPolicy(topicArn, accountId string) string { - return fmt.Sprintf(`{ - "Version": "2008-10-17", - "Id": "__default_policy_ID", - "Statement": [ - { - "Sid": "__default_statement_ID", - "Effect": "Allow", - "Principal": { - "AWS": "*" - }, - "Action": [ - "SNS:GetTopicAttributes", - "SNS:SetTopicAttributes", - "SNS:AddPermission", - "SNS:RemovePermission", - "SNS:DeleteTopic", - "SNS:Subscribe", - "SNS:ListSubscriptionsByTopic", - "SNS:Publish", - "SNS:Receive" - ], - "Resource": "%s", - "Condition": { - "StringEquals": { - "AWS:SourceOwner": "%s" - } - } - } - ] -}`, topicArn, accountId) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_subscription.go deleted file mode 100644 index 2a86ec2f0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_subscription.go +++ /dev/null @@ -1,426 +0,0 @@ -package aws - -import ( - "bytes" - "encoding/json" - "fmt" - "log" - "net/url" - "strings" - "time" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/service/sns" -) - -const awsSNSPendingConfirmationMessage = "pending confirmation" -const awsSNSPendingConfirmationMessageWithoutSpaces = "pendingconfirmation" -const awsSNSPasswordObfuscationPattern = "****" - -func resourceAwsSnsTopicSubscription() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSnsTopicSubscriptionCreate, - Read: resourceAwsSnsTopicSubscriptionRead, - Update: resourceAwsSnsTopicSubscriptionUpdate, - Delete: resourceAwsSnsTopicSubscriptionDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "protocol": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - // email and email-json not supported - "application", - "http", - "https", - "lambda", - "sms", - "sqs", - }, true), - }, - "endpoint": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "endpoint_auto_confirms": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "confirmation_timeout_in_minutes": { - Type: schema.TypeInt, - Optional: true, - Default: 1, - }, - "topic_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "delivery_policy": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentSnsTopicSubscriptionDeliveryPolicy, - }, - "raw_message_delivery": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "filter_policy": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentJsonDiffs, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - }, - }, - } -} - -func resourceAwsSnsTopicSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - output, err := subscribeToSNSTopic(d, snsconn) - - if err != nil { - return err - } - - if subscriptionHasPendingConfirmation(output.SubscriptionArn) { - log.Printf("[WARN] Invalid SNS Subscription, received a \"%s\" ARN", awsSNSPendingConfirmationMessage) - return nil - } - - log.Printf("New subscription ARN: %s", *output.SubscriptionArn) - d.SetId(*output.SubscriptionArn) - - // Write the ARN to the 'arn' field for export - d.Set("arn", output.SubscriptionArn) - - return resourceAwsSnsTopicSubscriptionUpdate(d, meta) -} - -func resourceAwsSnsTopicSubscriptionUpdate(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - if d.HasChange("raw_message_delivery") { - if err := snsSubscriptionAttributeUpdate(snsconn, d.Id(), "RawMessageDelivery", fmt.Sprintf("%t", d.Get("raw_message_delivery").(bool))); err != nil { - return err - } - } - - if d.HasChange("filter_policy") { - filterPolicy := d.Get("filter_policy").(string) - - // https://docs.aws.amazon.com/sns/latest/dg/message-filtering.html#message-filtering-policy-remove - if filterPolicy == "" { - filterPolicy = "{}" - } - - if err := snsSubscriptionAttributeUpdate(snsconn, d.Id(), "FilterPolicy", filterPolicy); err != nil { - return err - } - } - - if d.HasChange("delivery_policy") { - if err := snsSubscriptionAttributeUpdate(snsconn, d.Id(), "DeliveryPolicy", d.Get("delivery_policy").(string)); err != nil { - return err - } - } - - return resourceAwsSnsTopicSubscriptionRead(d, meta) -} - -func resourceAwsSnsTopicSubscriptionRead(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - log.Printf("[DEBUG] Loading subscription %s", d.Id()) - - attributeOutput, err := snsconn.GetSubscriptionAttributes(&sns.GetSubscriptionAttributesInput{ - SubscriptionArn: aws.String(d.Id()), - }) - - if isAWSErr(err, sns.ErrCodeNotFoundException, "") { - log.Printf("[WARN] SNS Topic Subscription (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error reading SNS Topic Subscription (%s) attributes: %s", d.Id(), err) - } - - if attributeOutput == nil || len(attributeOutput.Attributes) == 0 { - return fmt.Errorf("error reading SNS Topic Subscription (%s) attributes: no attributes found", d.Id()) - } - - d.Set("arn", attributeOutput.Attributes["SubscriptionArn"]) - d.Set("delivery_policy", attributeOutput.Attributes["DeliveryPolicy"]) - d.Set("endpoint", attributeOutput.Attributes["Endpoint"]) - d.Set("filter_policy", attributeOutput.Attributes["FilterPolicy"]) - d.Set("protocol", attributeOutput.Attributes["Protocol"]) - - d.Set("raw_message_delivery", false) - if v, ok := attributeOutput.Attributes["RawMessageDelivery"]; ok && aws.StringValue(v) == "true" { - d.Set("raw_message_delivery", true) - } - - d.Set("topic_arn", attributeOutput.Attributes["TopicArn"]) - - return nil -} - -func resourceAwsSnsTopicSubscriptionDelete(d *schema.ResourceData, meta interface{}) error { - snsconn := meta.(*AWSClient).snsconn - - log.Printf("[DEBUG] SNS delete topic subscription: %s", d.Id()) - _, err := snsconn.Unsubscribe(&sns.UnsubscribeInput{ - SubscriptionArn: aws.String(d.Id()), - }) - - return err -} - -func subscribeToSNSTopic(d *schema.ResourceData, snsconn *sns.SNS) (output *sns.SubscribeOutput, err error) { - protocol := d.Get("protocol").(string) - endpoint := d.Get("endpoint").(string) - topic_arn := d.Get("topic_arn").(string) - endpoint_auto_confirms := d.Get("endpoint_auto_confirms").(bool) - confirmation_timeout_in_minutes := d.Get("confirmation_timeout_in_minutes").(int) - - if strings.Contains(protocol, "http") && !endpoint_auto_confirms { - return nil, fmt.Errorf("Protocol http/https is only supported for endpoints which auto confirms!") - } - - log.Printf("[DEBUG] SNS create topic subscription: %s (%s) @ '%s'", endpoint, protocol, topic_arn) - - req := &sns.SubscribeInput{ - Protocol: aws.String(protocol), - Endpoint: aws.String(endpoint), - TopicArn: aws.String(topic_arn), - } - - output, err = snsconn.Subscribe(req) - if err != nil { - return nil, fmt.Errorf("Error creating SNS topic: %s", err) - } - - log.Printf("[DEBUG] Finished subscribing to topic %s with subscription arn %s", topic_arn, *output.SubscriptionArn) - - if strings.Contains(protocol, "http") && subscriptionHasPendingConfirmation(output.SubscriptionArn) { - - log.Printf("[DEBUG] SNS create topic subscription is pending so fetching the subscription list for topic : %s (%s) @ '%s'", endpoint, protocol, topic_arn) - - err = resource.Retry(time.Duration(confirmation_timeout_in_minutes)*time.Minute, func() *resource.RetryError { - - subscription, err := findSubscriptionByNonID(d, snsconn) - - if subscription != nil { - output.SubscriptionArn = subscription.SubscriptionArn - return nil - } - - if err != nil { - return resource.RetryableError( - fmt.Errorf("Error fetching subscriptions for SNS topic %s: %s", topic_arn, err)) - } - - return resource.RetryableError( - fmt.Errorf("Endpoint (%s) did not autoconfirm the subscription for topic %s", endpoint, topic_arn)) - }) - - if err != nil { - return nil, err - } - } - - log.Printf("[DEBUG] Created new subscription! %s", *output.SubscriptionArn) - return output, nil -} - -// finds a subscription using protocol, endpoint and topic_arn (which is a key in sns subscription) -func findSubscriptionByNonID(d *schema.ResourceData, snsconn *sns.SNS) (*sns.Subscription, error) { - protocol := d.Get("protocol").(string) - endpoint := d.Get("endpoint").(string) - topic_arn := d.Get("topic_arn").(string) - obfuscatedEndpoint := obfuscateEndpoint(endpoint) - - req := &sns.ListSubscriptionsByTopicInput{ - TopicArn: aws.String(topic_arn), - } - - for { - res, err := snsconn.ListSubscriptionsByTopic(req) - - if err != nil { - return nil, fmt.Errorf("Error fetching subscriptions for topic %s : %s", topic_arn, err) - } - - for _, subscription := range res.Subscriptions { - log.Printf("[DEBUG] check subscription with Subscription EndPoint %s (local: %s), Protocol %s, topicARN %s and SubscriptionARN %s", *subscription.Endpoint, obfuscatedEndpoint, *subscription.Protocol, *subscription.TopicArn, *subscription.SubscriptionArn) - if *subscription.Endpoint == obfuscatedEndpoint && *subscription.Protocol == protocol && *subscription.TopicArn == topic_arn && !subscriptionHasPendingConfirmation(subscription.SubscriptionArn) { - return subscription, nil - } - } - - // if there are more than 100 subscriptions then go to the next 100 otherwise return an error - if res.NextToken != nil { - req.NextToken = res.NextToken - } else { - return nil, fmt.Errorf("Error finding subscription for topic %s with endpoint %s and protocol %s", topic_arn, endpoint, protocol) - } - } -} - -// returns true if arn is nil or has both pending and confirmation words in the arn -func subscriptionHasPendingConfirmation(arn *string) bool { - if arn != nil && !strings.Contains(strings.Replace(strings.ToLower(*arn), " ", "", -1), awsSNSPendingConfirmationMessageWithoutSpaces) { - return false - } - - return true -} - -// returns the endpoint with obfuscated password, if any -func obfuscateEndpoint(endpoint string) string { - res, err := url.Parse(endpoint) - if err != nil { - fmt.Println(err) - } - - var obfuscatedEndpoint = res.String() - - // If the user is defined, we try to get the username and password, if defined. - // Then, we update the user with the obfuscated version. - if res.User != nil { - if password, ok := res.User.Password(); ok { - obfuscatedEndpoint = strings.Replace(obfuscatedEndpoint, password, awsSNSPasswordObfuscationPattern, 1) - } - } - return obfuscatedEndpoint -} - -func snsSubscriptionAttributeUpdate(snsconn *sns.SNS, subscriptionArn, attributeName, attributeValue string) error { - req := &sns.SetSubscriptionAttributesInput{ - SubscriptionArn: aws.String(subscriptionArn), - AttributeName: aws.String(attributeName), - AttributeValue: aws.String(attributeValue), - } - _, err := snsconn.SetSubscriptionAttributes(req) - - if err != nil { - return fmt.Errorf("error setting subscription (%s) attribute (%s): %s", subscriptionArn, attributeName, err) - } - return nil -} - -type snsTopicSubscriptionDeliveryPolicy struct { - Guaranteed bool `json:"guaranteed,omitempty"` - HealthyRetryPolicy *snsTopicSubscriptionDeliveryPolicyHealthyRetryPolicy `json:"healthyRetryPolicy,omitempty"` - SicklyRetryPolicy *snsTopicSubscriptionDeliveryPolicySicklyRetryPolicy `json:"sicklyRetryPolicy,omitempty"` - ThrottlePolicy *snsTopicSubscriptionDeliveryPolicyThrottlePolicy `json:"throttlePolicy,omitempty"` -} - -func (s snsTopicSubscriptionDeliveryPolicy) String() string { - return awsutil.Prettify(s) -} - -func (s snsTopicSubscriptionDeliveryPolicy) GoString() string { - return s.String() -} - -type snsTopicSubscriptionDeliveryPolicyHealthyRetryPolicy struct { - BackoffFunction string `json:"backoffFunction,omitempty"` - MaxDelayTarget int `json:"maxDelayTarget,omitempty"` - MinDelayTarget int `json:"minDelayTarget,omitempty"` - NumMaxDelayRetries int `json:"numMaxDelayRetries,omitempty"` - NumMinDelayRetries int `json:"numMinDelayRetries,omitempty"` - NumNoDelayRetries int `json:"numNoDelayRetries,omitempty"` - NumRetries int `json:"numRetries,omitempty"` -} - -func (s snsTopicSubscriptionDeliveryPolicyHealthyRetryPolicy) String() string { - return awsutil.Prettify(s) -} - -func (s snsTopicSubscriptionDeliveryPolicyHealthyRetryPolicy) GoString() string { - return s.String() -} - -type snsTopicSubscriptionDeliveryPolicySicklyRetryPolicy struct { - BackoffFunction string `json:"backoffFunction,omitempty"` - MaxDelayTarget int `json:"maxDelayTarget,omitempty"` - MinDelayTarget int `json:"minDelayTarget,omitempty"` - NumMaxDelayRetries int `json:"numMaxDelayRetries,omitempty"` - NumMinDelayRetries int `json:"numMinDelayRetries,omitempty"` - NumNoDelayRetries int `json:"numNoDelayRetries,omitempty"` - NumRetries int `json:"numRetries,omitempty"` -} - -func (s snsTopicSubscriptionDeliveryPolicySicklyRetryPolicy) String() string { - return awsutil.Prettify(s) -} - -func (s snsTopicSubscriptionDeliveryPolicySicklyRetryPolicy) GoString() string { - return s.String() -} - -type snsTopicSubscriptionDeliveryPolicyThrottlePolicy struct { - MaxReceivesPerSecond int `json:"maxReceivesPerSecond,omitempty"` -} - -func (s snsTopicSubscriptionDeliveryPolicyThrottlePolicy) String() string { - return awsutil.Prettify(s) -} - -func (s snsTopicSubscriptionDeliveryPolicyThrottlePolicy) GoString() string { - return s.String() -} - -func suppressEquivalentSnsTopicSubscriptionDeliveryPolicy(k, old, new string, d *schema.ResourceData) bool { - var deliveryPolicy snsTopicSubscriptionDeliveryPolicy - - if err := json.Unmarshal([]byte(old), &deliveryPolicy); err != nil { - log.Printf("[WARN] Unable to unmarshal SNS Topic Subscription delivery policy JSON: %s", err) - return false - } - - normalizedDeliveryPolicy, err := json.Marshal(deliveryPolicy) - - if err != nil { - log.Printf("[WARN] Unable to marshal SNS Topic Subscription delivery policy back to JSON: %s", err) - return false - } - - ob := bytes.NewBufferString("") - if err := json.Compact(ob, normalizedDeliveryPolicy); err != nil { - return false - } - - nb := bytes.NewBufferString("") - if err := json.Compact(nb, []byte(new)); err != nil { - return false - } - - return jsonBytesEqual(ob.Bytes(), nb.Bytes()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_datafeed_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_datafeed_subscription.go deleted file mode 100644 index 5051e1760..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_datafeed_subscription.go +++ /dev/null @@ -1,93 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSpotDataFeedSubscription() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSpotDataFeedSubscriptionCreate, - Read: resourceAwsSpotDataFeedSubscriptionRead, - Delete: resourceAwsSpotDataFeedSubscriptionDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsSpotDataFeedSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - params := &ec2.CreateSpotDatafeedSubscriptionInput{ - Bucket: aws.String(d.Get("bucket").(string)), - } - - if v, ok := d.GetOk("prefix"); ok { - params.Prefix = aws.String(v.(string)) - } - - log.Printf("[INFO] Creating Spot Datafeed Subscription") - _, err := conn.CreateSpotDatafeedSubscription(params) - if err != nil { - return fmt.Errorf("Error Creating Spot Datafeed Subscription: %s", err) - } - - d.SetId("spot-datafeed-subscription") - - return resourceAwsSpotDataFeedSubscriptionRead(d, meta) -} -func resourceAwsSpotDataFeedSubscriptionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - resp, err := conn.DescribeSpotDatafeedSubscription(&ec2.DescribeSpotDatafeedSubscriptionInput{}) - if err != nil { - cgw, ok := err.(awserr.Error) - if ok && cgw.Code() == "InvalidSpotDatafeed.NotFound" { - log.Printf("[WARNING] Spot Datafeed Subscription Not Found so refreshing from state") - d.SetId("") - return nil - } - return fmt.Errorf("Error Describing Spot Datafeed Subscription: %s", err) - } - - if resp == nil { - log.Printf("[WARNING] Spot Datafeed Subscription Not Found so refreshing from state") - d.SetId("") - return nil - } - - subscription := *resp.SpotDatafeedSubscription - d.Set("bucket", subscription.Bucket) - d.Set("prefix", subscription.Prefix) - - return nil -} -func resourceAwsSpotDataFeedSubscriptionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[INFO] Deleting Spot Datafeed Subscription") - _, err := conn.DeleteSpotDatafeedSubscription(&ec2.DeleteSpotDatafeedSubscriptionInput{}) - if err != nil { - return fmt.Errorf("Error deleting Spot Datafeed Subscription: %s", err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go deleted file mode 100644 index 52a454216..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go +++ /dev/null @@ -1,1248 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsSpotFleetRequest() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSpotFleetRequestCreate, - Read: resourceAwsSpotFleetRequestRead, - Delete: resourceAwsSpotFleetRequestDelete, - Update: resourceAwsSpotFleetRequestUpdate, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(5 * time.Minute), - }, - - SchemaVersion: 1, - MigrateState: resourceAwsSpotFleetRequestMigrateState, - - Schema: map[string]*schema.Schema{ - "iam_fleet_role": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "replace_unhealthy_instances": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Default: false, - }, - "wait_for_fulfillment": { - Type: schema.TypeBool, - Optional: true, - ForceNew: false, - Default: false, - }, - // http://docs.aws.amazon.com/sdk-for-go/api/service/ec2.html#type-SpotFleetLaunchSpecification - // http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetLaunchSpecification.html - "launch_specification": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "vpc_security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "associate_public_ip_address": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "ebs_block_device": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Optional: true, - Default: true, - ForceNew: true, - }, - "device_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "encrypted": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - ForceNew: true, - }, - "iops": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - "snapshot_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "volume_size": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - "volume_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - }, - }, - Set: hashEbsBlockDevice, - }, - "ephemeral_block_device": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "device_name": { - Type: schema.TypeString, - Required: true, - }, - "virtual_name": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - Set: hashEphemeralBlockDevice, - }, - "root_block_device": { - // TODO: This is a set because we don't support singleton - // sub-resources today. We'll enforce that the set only ever has - // length zero or one below. When TF gains support for - // sub-resources this can be converted. - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Resource{ - // "You can only modify the volume size, volume type, and Delete on - // Termination flag on the block device mapping entry for the root - // device volume." - bit.ly/ec2bdmap - Schema: map[string]*schema.Schema{ - "delete_on_termination": { - Type: schema.TypeBool, - Optional: true, - Default: true, - ForceNew: true, - }, - "iops": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - "volume_size": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - }, - "volume_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - }, - }, - Set: hashRootBlockDevice, - }, - "ebs_optimized": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "iam_instance_profile": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - }, - "iam_instance_profile_arn": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - }, - "ami": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "instance_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "key_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - ValidateFunc: validation.NoZeroValues, - }, - "monitoring": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "placement_group": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "placement_tenancy": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "spot_price": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "user_data": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - StateFunc: func(v interface{}) string { - switch v.(type) { - case string: - return userDataHashSum(v.(string)) - default: - return "" - } - }, - }, - "weighted_capacity": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "subnet_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "availability_zone": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "tags": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - }, - }, - }, - Set: hashLaunchSpecification, - }, - // Everything on a spot fleet is ForceNew except target_capacity - "target_capacity": { - Type: schema.TypeInt, - Required: true, - ForceNew: false, - }, - "allocation_strategy": { - Type: schema.TypeString, - Optional: true, - Default: "lowestPrice", - ForceNew: true, - }, - "instance_pools_to_use_count": { - Type: schema.TypeInt, - Optional: true, - Default: 1, - ForceNew: true, - }, - "excess_capacity_termination_policy": { - Type: schema.TypeString, - Optional: true, - Default: "Default", - ForceNew: false, - }, - "instance_interruption_behaviour": { - Type: schema.TypeString, - Optional: true, - Default: "terminate", - ForceNew: true, - }, - "spot_price": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "terminate_instances_with_expiration": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - "valid_from": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.ValidateRFC3339TimeString, - }, - "valid_until": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.ValidateRFC3339TimeString, - }, - "fleet_type": { - Type: schema.TypeString, - Optional: true, - Default: ec2.FleetTypeMaintain, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - ec2.FleetTypeMaintain, - ec2.FleetTypeRequest, - }, false), - }, - "spot_request_state": { - Type: schema.TypeString, - Computed: true, - }, - "client_token": { - Type: schema.TypeString, - Computed: true, - }, - "load_balancers": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "target_group_arns": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - } -} - -func buildSpotFleetLaunchSpecification(d map[string]interface{}, meta interface{}) (*ec2.SpotFleetLaunchSpecification, error) { - conn := meta.(*AWSClient).ec2conn - - opts := &ec2.SpotFleetLaunchSpecification{ - ImageId: aws.String(d["ami"].(string)), - InstanceType: aws.String(d["instance_type"].(string)), - SpotPrice: aws.String(d["spot_price"].(string)), - } - - placement := new(ec2.SpotPlacement) - if v, ok := d["availability_zone"]; ok { - placement.AvailabilityZone = aws.String(v.(string)) - opts.Placement = placement - } - - if v, ok := d["placement_tenancy"]; ok { - placement.Tenancy = aws.String(v.(string)) - opts.Placement = placement - } - - if v, ok := d["ebs_optimized"]; ok { - opts.EbsOptimized = aws.Bool(v.(bool)) - } - - if v, ok := d["monitoring"]; ok { - opts.Monitoring = &ec2.SpotFleetMonitoring{ - Enabled: aws.Bool(v.(bool)), - } - } - - if v, ok := d["iam_instance_profile"]; ok { - opts.IamInstanceProfile = &ec2.IamInstanceProfileSpecification{ - Name: aws.String(v.(string)), - } - } - - if v, ok := d["iam_instance_profile_arn"]; ok && v.(string) != "" { - opts.IamInstanceProfile = &ec2.IamInstanceProfileSpecification{ - Arn: aws.String(v.(string)), - } - } - - if v, ok := d["user_data"]; ok { - opts.UserData = aws.String(base64Encode([]byte(v.(string)))) - } - - if v, ok := d["key_name"]; ok && v != "" { - opts.KeyName = aws.String(v.(string)) - } - - if v, ok := d["weighted_capacity"]; ok && v != "" { - wc, err := strconv.ParseFloat(v.(string), 64) - if err != nil { - return nil, err - } - opts.WeightedCapacity = aws.Float64(wc) - } - - var securityGroupIds []*string - if v, ok := d["vpc_security_group_ids"]; ok { - if s := v.(*schema.Set); s.Len() > 0 { - for _, v := range s.List() { - securityGroupIds = append(securityGroupIds, aws.String(v.(string))) - } - } - } - - if m, ok := d["tags"].(map[string]interface{}); ok && len(m) > 0 { - tagsSpec := make([]*ec2.SpotFleetTagSpecification, 0) - - tags := tagsFromMap(m) - - spec := &ec2.SpotFleetTagSpecification{ - ResourceType: aws.String("instance"), - Tags: tags, - } - - tagsSpec = append(tagsSpec, spec) - - opts.TagSpecifications = tagsSpec - } - - subnetId, hasSubnetId := d["subnet_id"] - if hasSubnetId { - opts.SubnetId = aws.String(subnetId.(string)) - } - - associatePublicIpAddress, hasPublicIpAddress := d["associate_public_ip_address"] - if hasPublicIpAddress && associatePublicIpAddress.(bool) && hasSubnetId { - - // If we have a non-default VPC / Subnet specified, we can flag - // AssociatePublicIpAddress to get a Public IP assigned. By default these are not provided. - // You cannot specify both SubnetId and the NetworkInterface.0.* parameters though, otherwise - // you get: Network interfaces and an instance-level subnet ID may not be specified on the same request - // You also need to attach Security Groups to the NetworkInterface instead of the instance, - // to avoid: Network interfaces and an instance-level security groups may not be specified on - // the same request - ni := &ec2.InstanceNetworkInterfaceSpecification{ - AssociatePublicIpAddress: aws.Bool(true), - DeleteOnTermination: aws.Bool(true), - DeviceIndex: aws.Int64(int64(0)), - SubnetId: aws.String(subnetId.(string)), - Groups: securityGroupIds, - } - - opts.NetworkInterfaces = []*ec2.InstanceNetworkInterfaceSpecification{ni} - opts.SubnetId = aws.String("") - } else { - for _, id := range securityGroupIds { - opts.SecurityGroups = append(opts.SecurityGroups, &ec2.GroupIdentifier{GroupId: id}) - } - } - - blockDevices, err := readSpotFleetBlockDeviceMappingsFromConfig(d, conn) - if err != nil { - return nil, err - } - if len(blockDevices) > 0 { - opts.BlockDeviceMappings = blockDevices - } - - return opts, nil -} - -func readSpotFleetBlockDeviceMappingsFromConfig( - d map[string]interface{}, conn *ec2.EC2) ([]*ec2.BlockDeviceMapping, error) { - blockDevices := make([]*ec2.BlockDeviceMapping, 0) - - if v, ok := d["ebs_block_device"]; ok { - vL := v.(*schema.Set).List() - for _, v := range vL { - bd := v.(map[string]interface{}) - ebs := &ec2.EbsBlockDevice{ - DeleteOnTermination: aws.Bool(bd["delete_on_termination"].(bool)), - } - - if v, ok := bd["snapshot_id"].(string); ok && v != "" { - ebs.SnapshotId = aws.String(v) - } - - if v, ok := bd["encrypted"].(bool); ok && v { - ebs.Encrypted = aws.Bool(v) - } - - if v, ok := bd["volume_size"].(int); ok && v != 0 { - ebs.VolumeSize = aws.Int64(int64(v)) - } - - if v, ok := bd["volume_type"].(string); ok && v != "" { - ebs.VolumeType = aws.String(v) - } - - if v, ok := bd["iops"].(int); ok && v > 0 { - ebs.Iops = aws.Int64(int64(v)) - } - - blockDevices = append(blockDevices, &ec2.BlockDeviceMapping{ - DeviceName: aws.String(bd["device_name"].(string)), - Ebs: ebs, - }) - } - } - - if v, ok := d["ephemeral_block_device"]; ok { - vL := v.(*schema.Set).List() - for _, v := range vL { - bd := v.(map[string]interface{}) - blockDevices = append(blockDevices, &ec2.BlockDeviceMapping{ - DeviceName: aws.String(bd["device_name"].(string)), - VirtualName: aws.String(bd["virtual_name"].(string)), - }) - } - } - - if v, ok := d["root_block_device"]; ok { - vL := v.(*schema.Set).List() - if len(vL) > 1 { - return nil, fmt.Errorf("Cannot specify more than one root_block_device.") - } - for _, v := range vL { - bd := v.(map[string]interface{}) - ebs := &ec2.EbsBlockDevice{ - DeleteOnTermination: aws.Bool(bd["delete_on_termination"].(bool)), - } - - if v, ok := bd["volume_size"].(int); ok && v != 0 { - ebs.VolumeSize = aws.Int64(int64(v)) - } - - if v, ok := bd["volume_type"].(string); ok && v != "" { - ebs.VolumeType = aws.String(v) - } - - if v, ok := bd["iops"].(int); ok && v > 0 { - ebs.Iops = aws.Int64(int64(v)) - } - - if dn, err := fetchRootDeviceName(d["ami"].(string), conn); err == nil { - if dn == nil { - return nil, fmt.Errorf( - "Expected 1 AMI for ID: %s, got none", - d["ami"].(string)) - } - - blockDevices = append(blockDevices, &ec2.BlockDeviceMapping{ - DeviceName: dn, - Ebs: ebs, - }) - } else { - return nil, err - } - } - } - - return blockDevices, nil -} - -func buildAwsSpotFleetLaunchSpecifications( - d *schema.ResourceData, meta interface{}) ([]*ec2.SpotFleetLaunchSpecification, error) { - - user_specs := d.Get("launch_specification").(*schema.Set).List() - specs := make([]*ec2.SpotFleetLaunchSpecification, len(user_specs)) - for i, user_spec := range user_specs { - user_spec_map := user_spec.(map[string]interface{}) - // panic: interface conversion: interface {} is map[string]interface {}, not *schema.ResourceData - opts, err := buildSpotFleetLaunchSpecification(user_spec_map, meta) - if err != nil { - return nil, err - } - specs[i] = opts - } - - return specs, nil -} - -func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) error { - // http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html - conn := meta.(*AWSClient).ec2conn - - launch_specs, err := buildAwsSpotFleetLaunchSpecifications(d, meta) - if err != nil { - return err - } - - // http://docs.aws.amazon.com/sdk-for-go/api/service/ec2.html#type-SpotFleetRequestConfigData - spotFleetConfig := &ec2.SpotFleetRequestConfigData{ - IamFleetRole: aws.String(d.Get("iam_fleet_role").(string)), - LaunchSpecifications: launch_specs, - TargetCapacity: aws.Int64(int64(d.Get("target_capacity").(int))), - ClientToken: aws.String(resource.UniqueId()), - TerminateInstancesWithExpiration: aws.Bool(d.Get("terminate_instances_with_expiration").(bool)), - ReplaceUnhealthyInstances: aws.Bool(d.Get("replace_unhealthy_instances").(bool)), - InstanceInterruptionBehavior: aws.String(d.Get("instance_interruption_behaviour").(string)), - Type: aws.String(d.Get("fleet_type").(string)), - } - - if v, ok := d.GetOk("excess_capacity_termination_policy"); ok { - spotFleetConfig.ExcessCapacityTerminationPolicy = aws.String(v.(string)) - } - - if v, ok := d.GetOk("allocation_strategy"); ok { - spotFleetConfig.AllocationStrategy = aws.String(v.(string)) - } else { - spotFleetConfig.AllocationStrategy = aws.String("lowestPrice") - } - - if v, ok := d.GetOk("instance_pools_to_use_count"); ok && v.(int) != 1 { - spotFleetConfig.InstancePoolsToUseCount = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("spot_price"); ok && v.(string) != "" { - spotFleetConfig.SpotPrice = aws.String(v.(string)) - } - - if v, ok := d.GetOk("valid_from"); ok { - valid_from, err := time.Parse(time.RFC3339, v.(string)) - if err != nil { - return err - } - spotFleetConfig.ValidFrom = aws.Time(valid_from) - } - - if v, ok := d.GetOk("valid_until"); ok { - valid_until, err := time.Parse(time.RFC3339, v.(string)) - if err != nil { - return err - } - spotFleetConfig.ValidUntil = aws.Time(valid_until) - } else { - valid_until := time.Now().Add(24 * time.Hour) - spotFleetConfig.ValidUntil = aws.Time(valid_until) - } - - if v, ok := d.GetOk("load_balancers"); ok && v.(*schema.Set).Len() > 0 { - var elbNames []*ec2.ClassicLoadBalancer - for _, v := range v.(*schema.Set).List() { - elbNames = append(elbNames, &ec2.ClassicLoadBalancer{ - Name: aws.String(v.(string)), - }) - } - if spotFleetConfig.LoadBalancersConfig == nil { - spotFleetConfig.LoadBalancersConfig = &ec2.LoadBalancersConfig{} - } - spotFleetConfig.LoadBalancersConfig.ClassicLoadBalancersConfig = &ec2.ClassicLoadBalancersConfig{ - ClassicLoadBalancers: elbNames, - } - } - - if v, ok := d.GetOk("target_group_arns"); ok && v.(*schema.Set).Len() > 0 { - var targetGroups []*ec2.TargetGroup - for _, v := range v.(*schema.Set).List() { - targetGroups = append(targetGroups, &ec2.TargetGroup{ - Arn: aws.String(v.(string)), - }) - } - if spotFleetConfig.LoadBalancersConfig == nil { - spotFleetConfig.LoadBalancersConfig = &ec2.LoadBalancersConfig{} - } - spotFleetConfig.LoadBalancersConfig.TargetGroupsConfig = &ec2.TargetGroupsConfig{ - TargetGroups: targetGroups, - } - } - - // http://docs.aws.amazon.com/sdk-for-go/api/service/ec2.html#type-RequestSpotFleetInput - spotFleetOpts := &ec2.RequestSpotFleetInput{ - SpotFleetRequestConfig: spotFleetConfig, - DryRun: aws.Bool(false), - } - - log.Printf("[DEBUG] Requesting spot fleet with these opts: %+v", spotFleetOpts) - - // Since IAM is eventually consistent, we retry creation as a newly created role may not - // take effect immediately, resulting in an InvalidSpotFleetRequestConfig error - var resp *ec2.RequestSpotFleetOutput - err = resource.Retry(10*time.Minute, func() *resource.RetryError { - var err error - resp, err = conn.RequestSpotFleet(spotFleetOpts) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // IAM is eventually consistent :/ - if awsErr.Code() == "InvalidSpotFleetRequestConfig" { - return resource.RetryableError( - fmt.Errorf("Error creating Spot fleet request, retrying: %s", err)) - } - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return fmt.Errorf("Error requesting spot fleet: %s", err) - } - - d.SetId(*resp.SpotFleetRequestId) - - log.Printf("[INFO] Spot Fleet Request ID: %s", d.Id()) - log.Println("[INFO] Waiting for Spot Fleet Request to be active") - stateConf := &resource.StateChangeConf{ - Pending: []string{"submitted"}, - Target: []string{"active"}, - Refresh: resourceAwsSpotFleetRequestStateRefreshFunc(d, meta), - Timeout: 10 * time.Minute, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - if d.Get("wait_for_fulfillment").(bool) { - log.Println("[INFO] Waiting for Spot Fleet Request to be fulfilled") - spotStateConf := &resource.StateChangeConf{ - Pending: []string{"pending_fulfillment"}, - Target: []string{"fulfilled"}, - Refresh: resourceAwsSpotFleetRequestFulfillmentRefreshFunc(d.Id(), meta.(*AWSClient).ec2conn), - Timeout: d.Timeout(schema.TimeoutCreate), - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = spotStateConf.WaitForState() - - if err != nil { - return err - } - } - - return resourceAwsSpotFleetRequestRead(d, meta) -} - -func resourceAwsSpotFleetRequestStateRefreshFunc(d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - conn := meta.(*AWSClient).ec2conn - req := &ec2.DescribeSpotFleetRequestsInput{ - SpotFleetRequestIds: []*string{aws.String(d.Id())}, - } - resp, err := conn.DescribeSpotFleetRequests(req) - - if err != nil { - log.Printf("Error on retrieving Spot Fleet Request when waiting: %s", err) - return nil, "", nil - } - - if resp == nil { - return nil, "", nil - } - - if len(resp.SpotFleetRequestConfigs) == 0 { - return nil, "", nil - } - - spotFleetRequest := resp.SpotFleetRequestConfigs[0] - - return spotFleetRequest, *spotFleetRequest.SpotFleetRequestState, nil - } -} - -func resourceAwsSpotFleetRequestFulfillmentRefreshFunc(id string, conn *ec2.EC2) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - req := &ec2.DescribeSpotFleetRequestsInput{ - SpotFleetRequestIds: []*string{aws.String(id)}, - } - resp, err := conn.DescribeSpotFleetRequests(req) - - if err != nil { - log.Printf("Error on retrieving Spot Fleet Request when waiting: %s", err) - return nil, "", nil - } - - if resp == nil { - return nil, "", nil - } - - if len(resp.SpotFleetRequestConfigs) == 0 { - return nil, "", nil - } - - cfg := resp.SpotFleetRequestConfigs[0] - status := *cfg.ActivityStatus - - var fleetError error - if status == ec2.ActivityStatusError { - var events []*ec2.HistoryRecord - - // Query "information" events (e.g. launchSpecUnusable b/c low bid price) - out, err := conn.DescribeSpotFleetRequestHistory(&ec2.DescribeSpotFleetRequestHistoryInput{ - EventType: aws.String("information"), - SpotFleetRequestId: aws.String(id), - StartTime: cfg.CreateTime, - }) - if err != nil { - log.Printf("[ERROR] Failed to get the reason of 'error' state: %s", err) - } - if len(out.HistoryRecords) > 0 { - events = out.HistoryRecords - } - - out, err = conn.DescribeSpotFleetRequestHistory(&ec2.DescribeSpotFleetRequestHistoryInput{ - EventType: aws.String(ec2.EventTypeError), - SpotFleetRequestId: aws.String(id), - StartTime: cfg.CreateTime, - }) - if err != nil { - log.Printf("[ERROR] Failed to get the reason of 'error' state: %s", err) - } - if len(out.HistoryRecords) > 0 { - events = append(events, out.HistoryRecords...) - } - - if len(events) > 0 { - fleetError = fmt.Errorf("Last events: %v", events) - } - } - - return cfg, status, fleetError - } -} - -func resourceAwsSpotFleetRequestRead(d *schema.ResourceData, meta interface{}) error { - // http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSpotFleetRequests.html - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeSpotFleetRequestsInput{ - SpotFleetRequestIds: []*string{aws.String(d.Id())}, - } - resp, err := conn.DescribeSpotFleetRequests(req) - - if err != nil { - // If the spot request was not found, return nil so that we can show - // that it is gone. - ec2err, ok := err.(awserr.Error) - if ok && ec2err.Code() == "InvalidSpotFleetRequestId.NotFound" { - d.SetId("") - return nil - } - - // Some other error, report it - return err - } - - sfr := resp.SpotFleetRequestConfigs[0] - - // if the request is cancelled, then it is gone - cancelledStates := map[string]bool{ - "cancelled": true, - "cancelled_running": true, - "cancelled_terminating": true, - } - if _, ok := cancelledStates[*sfr.SpotFleetRequestState]; ok { - d.SetId("") - return nil - } - - d.SetId(*sfr.SpotFleetRequestId) - d.Set("spot_request_state", aws.StringValue(sfr.SpotFleetRequestState)) - - config := sfr.SpotFleetRequestConfig - - if config.AllocationStrategy != nil { - d.Set("allocation_strategy", aws.StringValue(config.AllocationStrategy)) - } - - if config.InstancePoolsToUseCount != nil { - d.Set("instance_pools_to_use_count", aws.Int64Value(config.InstancePoolsToUseCount)) - } - - if config.ClientToken != nil { - d.Set("client_token", aws.StringValue(config.ClientToken)) - } - - if config.ExcessCapacityTerminationPolicy != nil { - d.Set("excess_capacity_termination_policy", - aws.StringValue(config.ExcessCapacityTerminationPolicy)) - } - - if config.IamFleetRole != nil { - d.Set("iam_fleet_role", aws.StringValue(config.IamFleetRole)) - } - - if config.SpotPrice != nil { - d.Set("spot_price", aws.StringValue(config.SpotPrice)) - } - - if config.TargetCapacity != nil { - d.Set("target_capacity", aws.Int64Value(config.TargetCapacity)) - } - - if config.TerminateInstancesWithExpiration != nil { - d.Set("terminate_instances_with_expiration", - aws.BoolValue(config.TerminateInstancesWithExpiration)) - } - - if config.ValidFrom != nil { - d.Set("valid_from", - aws.TimeValue(config.ValidFrom).Format(time.RFC3339)) - } - - if config.ValidUntil != nil { - d.Set("valid_until", - aws.TimeValue(config.ValidUntil).Format(time.RFC3339)) - } - - d.Set("replace_unhealthy_instances", config.ReplaceUnhealthyInstances) - d.Set("instance_interruption_behaviour", config.InstanceInterruptionBehavior) - d.Set("fleet_type", config.Type) - d.Set("launch_specification", launchSpecsToSet(config.LaunchSpecifications, conn)) - - return nil -} - -func launchSpecsToSet(launchSpecs []*ec2.SpotFleetLaunchSpecification, conn *ec2.EC2) *schema.Set { - specSet := &schema.Set{F: hashLaunchSpecification} - for _, spec := range launchSpecs { - rootDeviceName, err := fetchRootDeviceName(aws.StringValue(spec.ImageId), conn) - if err != nil { - log.Panic(err) - } - - specSet.Add(launchSpecToMap(spec, rootDeviceName)) - } - return specSet -} - -func launchSpecToMap(l *ec2.SpotFleetLaunchSpecification, rootDevName *string) map[string]interface{} { - m := make(map[string]interface{}) - - m["root_block_device"] = rootBlockDeviceToSet(l.BlockDeviceMappings, rootDevName) - m["ebs_block_device"] = ebsBlockDevicesToSet(l.BlockDeviceMappings, rootDevName) - m["ephemeral_block_device"] = ephemeralBlockDevicesToSet(l.BlockDeviceMappings) - - if l.ImageId != nil { - m["ami"] = aws.StringValue(l.ImageId) - } - - if l.InstanceType != nil { - m["instance_type"] = aws.StringValue(l.InstanceType) - } - - if l.SpotPrice != nil { - m["spot_price"] = aws.StringValue(l.SpotPrice) - } - - if l.EbsOptimized != nil { - m["ebs_optimized"] = aws.BoolValue(l.EbsOptimized) - } - - if l.Monitoring != nil && l.Monitoring.Enabled != nil { - m["monitoring"] = aws.BoolValue(l.Monitoring.Enabled) - } - - if l.IamInstanceProfile != nil && l.IamInstanceProfile.Name != nil { - m["iam_instance_profile"] = aws.StringValue(l.IamInstanceProfile.Name) - } - - if l.IamInstanceProfile != nil && l.IamInstanceProfile.Arn != nil { - m["iam_instance_profile_arn"] = aws.StringValue(l.IamInstanceProfile.Arn) - } - - if l.UserData != nil { - m["user_data"] = userDataHashSum(aws.StringValue(l.UserData)) - } - - if l.KeyName != nil { - m["key_name"] = aws.StringValue(l.KeyName) - } - - if l.Placement != nil { - m["availability_zone"] = aws.StringValue(l.Placement.AvailabilityZone) - } - - if l.SubnetId != nil { - m["subnet_id"] = aws.StringValue(l.SubnetId) - } - - securityGroupIds := &schema.Set{F: schema.HashString} - if len(l.NetworkInterfaces) > 0 { - m["associate_public_ip_address"] = aws.BoolValue(l.NetworkInterfaces[0].AssociatePublicIpAddress) - m["subnet_id"] = aws.StringValue(l.NetworkInterfaces[0].SubnetId) - - for _, group := range l.NetworkInterfaces[0].Groups { - securityGroupIds.Add(aws.StringValue(group)) - } - } else { - for _, group := range l.SecurityGroups { - securityGroupIds.Add(aws.StringValue(group.GroupId)) - } - } - m["vpc_security_group_ids"] = securityGroupIds - - if l.WeightedCapacity != nil { - m["weighted_capacity"] = strconv.FormatFloat(*l.WeightedCapacity, 'f', 0, 64) - } - - if l.TagSpecifications != nil { - for _, tagSpecs := range l.TagSpecifications { - // only "instance" tags are currently supported: http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetTagSpecification.html - if *(tagSpecs.ResourceType) == "instance" { - m["tags"] = tagsToMap(tagSpecs.Tags) - } - } - } - - return m -} - -func ebsBlockDevicesToSet(bdm []*ec2.BlockDeviceMapping, rootDevName *string) *schema.Set { - set := &schema.Set{F: hashEbsBlockDevice} - - for _, val := range bdm { - if val.Ebs != nil { - m := make(map[string]interface{}) - - ebs := val.Ebs - - if val.DeviceName != nil { - if aws.StringValue(rootDevName) == aws.StringValue(val.DeviceName) { - continue - } - - m["device_name"] = aws.StringValue(val.DeviceName) - } - - if ebs.DeleteOnTermination != nil { - m["delete_on_termination"] = aws.BoolValue(ebs.DeleteOnTermination) - } - - if ebs.SnapshotId != nil { - m["snapshot_id"] = aws.StringValue(ebs.SnapshotId) - } - - if ebs.Encrypted != nil { - m["encrypted"] = aws.BoolValue(ebs.Encrypted) - } - - if ebs.VolumeSize != nil { - m["volume_size"] = aws.Int64Value(ebs.VolumeSize) - } - - if ebs.VolumeType != nil { - m["volume_type"] = aws.StringValue(ebs.VolumeType) - } - - if ebs.Iops != nil { - m["iops"] = aws.Int64Value(ebs.Iops) - } - - set.Add(m) - } - } - - return set -} - -func ephemeralBlockDevicesToSet(bdm []*ec2.BlockDeviceMapping) *schema.Set { - set := &schema.Set{F: hashEphemeralBlockDevice} - - for _, val := range bdm { - if val.VirtualName != nil { - m := make(map[string]interface{}) - m["virtual_name"] = aws.StringValue(val.VirtualName) - - if val.DeviceName != nil { - m["device_name"] = aws.StringValue(val.DeviceName) - } - - set.Add(m) - } - } - - return set -} - -func rootBlockDeviceToSet( - bdm []*ec2.BlockDeviceMapping, - rootDevName *string, -) *schema.Set { - set := &schema.Set{F: hashRootBlockDevice} - - if rootDevName != nil { - for _, val := range bdm { - if aws.StringValue(val.DeviceName) == aws.StringValue(rootDevName) { - m := make(map[string]interface{}) - if val.Ebs.DeleteOnTermination != nil { - m["delete_on_termination"] = aws.BoolValue(val.Ebs.DeleteOnTermination) - } - - if val.Ebs.VolumeSize != nil { - m["volume_size"] = aws.Int64Value(val.Ebs.VolumeSize) - } - - if val.Ebs.VolumeType != nil { - m["volume_type"] = aws.StringValue(val.Ebs.VolumeType) - } - - if val.Ebs.Iops != nil { - m["iops"] = aws.Int64Value(val.Ebs.Iops) - } - - set.Add(m) - } - } - } - - return set -} - -func resourceAwsSpotFleetRequestUpdate(d *schema.ResourceData, meta interface{}) error { - // http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifySpotFleetRequest.html - conn := meta.(*AWSClient).ec2conn - - d.Partial(true) - - req := &ec2.ModifySpotFleetRequestInput{ - SpotFleetRequestId: aws.String(d.Id()), - } - - if val, ok := d.GetOk("target_capacity"); ok { - req.TargetCapacity = aws.Int64(int64(val.(int))) - } - - if val, ok := d.GetOk("excess_capacity_termination_policy"); ok { - req.ExcessCapacityTerminationPolicy = aws.String(val.(string)) - } - - resp, err := conn.ModifySpotFleetRequest(req) - if err == nil && aws.BoolValue(resp.Return) { - // TODO: rollback to old values? - } - - return nil -} - -func resourceAwsSpotFleetRequestDelete(d *schema.ResourceData, meta interface{}) error { - // http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CancelSpotFleetRequests.html - conn := meta.(*AWSClient).ec2conn - terminateInstances := d.Get("terminate_instances_with_expiration").(bool) - - log.Printf("[INFO] Cancelling spot fleet request: %s", d.Id()) - err := deleteSpotFleetRequest(d.Id(), terminateInstances, d.Timeout(schema.TimeoutDelete), conn) - if err != nil { - return fmt.Errorf("error deleting spot request (%s): %s", d.Id(), err) - } - - return nil -} - -func deleteSpotFleetRequest(spotFleetRequestID string, terminateInstances bool, timeout time.Duration, conn *ec2.EC2) error { - _, err := conn.CancelSpotFleetRequests(&ec2.CancelSpotFleetRequestsInput{ - SpotFleetRequestIds: []*string{aws.String(spotFleetRequestID)}, - TerminateInstances: aws.Bool(terminateInstances), - }) - if err != nil { - return err - } - - // Only wait for instance termination if requested - if !terminateInstances { - return nil - } - - return resource.Retry(timeout, func() *resource.RetryError { - resp, err := conn.DescribeSpotFleetInstances(&ec2.DescribeSpotFleetInstancesInput{ - SpotFleetRequestId: aws.String(spotFleetRequestID), - }) - if err != nil { - return resource.NonRetryableError(err) - } - - if len(resp.ActiveInstances) == 0 { - log.Printf("[DEBUG] Active instance count is 0 for Spot Fleet Request (%s), removing", spotFleetRequestID) - return nil - } - - log.Printf("[DEBUG] Active instance count in Spot Fleet Request (%s): %d", spotFleetRequestID, len(resp.ActiveInstances)) - - return resource.RetryableError( - fmt.Errorf("fleet still has (%d) running instances", len(resp.ActiveInstances))) - }) -} - -func hashEphemeralBlockDevice(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["device_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["virtual_name"].(string))) - return hashcode.String(buf.String()) -} - -func hashRootBlockDevice(v interface{}) int { - // there can be only one root device; no need to hash anything - return 0 -} - -func hashLaunchSpecification(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["ami"].(string))) - if m["availability_zone"] != "" { - buf.WriteString(fmt.Sprintf("%s-", m["availability_zone"].(string))) - } - if m["subnet_id"] != "" { - buf.WriteString(fmt.Sprintf("%s-", m["subnet_id"].(string))) - } - buf.WriteString(fmt.Sprintf("%s-", m["instance_type"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["spot_price"].(string))) - return hashcode.String(buf.String()) -} - -func hashEbsBlockDevice(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - if name, ok := m["device_name"]; ok { - buf.WriteString(fmt.Sprintf("%s-", name.(string))) - } - if id, ok := m["snapshot_id"]; ok { - buf.WriteString(fmt.Sprintf("%s-", id.(string))) - } - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request_migrate.go deleted file mode 100644 index dea0a32e8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request_migrate.go +++ /dev/null @@ -1,33 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsSpotFleetRequestMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS Spot Fleet Request State v0; migrating to v1") - return migrateSpotFleetRequestV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateSpotFleetRequestV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() { - log.Println("[DEBUG] Empty Spot Fleet Request State; nothing to migrate.") - return is, nil - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - - is.Attributes["associate_public_ip_address"] = "false" - - log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) - return is, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go deleted file mode 100644 index 5ac18f65c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go +++ /dev/null @@ -1,436 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsSpotInstanceRequest() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSpotInstanceRequestCreate, - Read: resourceAwsSpotInstanceRequestRead, - Delete: resourceAwsSpotInstanceRequestDelete, - Update: resourceAwsSpotInstanceRequestUpdate, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(20 * time.Minute), - }, - - Schema: func() map[string]*schema.Schema { - // The Spot Instance Request Schema is based on the AWS Instance schema. - s := resourceAwsInstance().Schema - - // Everything on a spot instance is ForceNew except tags - for k, v := range s { - if k == "tags" { - continue - } - v.ForceNew = true - } - - s["volume_tags"] = &schema.Schema{ - Type: schema.TypeMap, - Optional: true, - } - - s["spot_price"] = &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, - } - s["spot_type"] = &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Default: "persistent", - } - s["wait_for_fulfillment"] = &schema.Schema{ - Type: schema.TypeBool, - Optional: true, - Default: false, - } - s["launch_group"] = &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, - } - s["spot_bid_status"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - s["spot_request_state"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - s["spot_instance_id"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - s["block_duration_minutes"] = &schema.Schema{ - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - } - s["instance_interruption_behaviour"] = &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Default: ec2.InstanceInterruptionBehaviorTerminate, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - ec2.InstanceInterruptionBehaviorTerminate, - ec2.InstanceInterruptionBehaviorStop, - ec2.InstanceInterruptionBehaviorHibernate, - }, false), - } - s["valid_from"] = &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.ValidateRFC3339TimeString, - Computed: true, - } - s["valid_until"] = &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.ValidateRFC3339TimeString, - Computed: true, - } - return s - }(), - } -} - -func resourceAwsSpotInstanceRequestCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - instanceOpts, err := buildAwsInstanceOpts(d, meta) - if err != nil { - return err - } - - spotOpts := &ec2.RequestSpotInstancesInput{ - SpotPrice: aws.String(d.Get("spot_price").(string)), - Type: aws.String(d.Get("spot_type").(string)), - InstanceInterruptionBehavior: aws.String(d.Get("instance_interruption_behaviour").(string)), - - // Though the AWS API supports creating spot instance requests for multiple - // instances, for TF purposes we fix this to one instance per request. - // Users can get equivalent behavior out of TF's "count" meta-parameter. - InstanceCount: aws.Int64(1), - - LaunchSpecification: &ec2.RequestSpotLaunchSpecification{ - BlockDeviceMappings: instanceOpts.BlockDeviceMappings, - EbsOptimized: instanceOpts.EBSOptimized, - Monitoring: instanceOpts.Monitoring, - IamInstanceProfile: instanceOpts.IAMInstanceProfile, - ImageId: instanceOpts.ImageID, - InstanceType: instanceOpts.InstanceType, - KeyName: instanceOpts.KeyName, - SecurityGroupIds: instanceOpts.SecurityGroupIDs, - SecurityGroups: instanceOpts.SecurityGroups, - SubnetId: instanceOpts.SubnetID, - UserData: instanceOpts.UserData64, - NetworkInterfaces: instanceOpts.NetworkInterfaces, - }, - } - - if v, ok := d.GetOk("block_duration_minutes"); ok { - spotOpts.BlockDurationMinutes = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("launch_group"); ok { - spotOpts.LaunchGroup = aws.String(v.(string)) - } - - if v, ok := d.GetOk("valid_from"); ok { - valid_from, err := time.Parse(time.RFC3339, v.(string)) - if err != nil { - return err - } - spotOpts.ValidFrom = aws.Time(valid_from) - } - - if v, ok := d.GetOk("valid_until"); ok { - valid_until, err := time.Parse(time.RFC3339, v.(string)) - if err != nil { - return err - } - spotOpts.ValidUntil = aws.Time(valid_until) - } - - // Placement GroupName can only be specified when instanceInterruptionBehavior is not set or set to 'terminate' - if v, exists := d.GetOkExists("instance_interruption_behaviour"); v.(string) == ec2.InstanceInterruptionBehaviorTerminate || !exists { - spotOpts.LaunchSpecification.Placement = instanceOpts.SpotPlacement - } - - // Make the spot instance request - log.Printf("[DEBUG] Requesting spot bid opts: %s", spotOpts) - - var resp *ec2.RequestSpotInstancesOutput - err = resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - resp, err = conn.RequestSpotInstances(spotOpts) - // IAM instance profiles can take ~10 seconds to propagate in AWS: - // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console - if isAWSErr(err, "InvalidParameterValue", "Invalid IAM Instance Profile") { - log.Printf("[DEBUG] Invalid IAM Instance Profile referenced, retrying...") - return resource.RetryableError(err) - } - // IAM roles can also take time to propagate in AWS: - if isAWSErr(err, "InvalidParameterValue", " has no associated IAM Roles") { - log.Printf("[DEBUG] IAM Instance Profile appears to have no IAM roles, retrying...") - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - }) - - if err != nil { - return fmt.Errorf("Error requesting spot instances: %s", err) - } - if len(resp.SpotInstanceRequests) != 1 { - return fmt.Errorf( - "Expected response with length 1, got: %s", resp) - } - - sir := *resp.SpotInstanceRequests[0] - d.SetId(*sir.SpotInstanceRequestId) - - if d.Get("wait_for_fulfillment").(bool) { - spotStateConf := &resource.StateChangeConf{ - // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html - Pending: []string{"start", "pending-evaluation", "pending-fulfillment"}, - Target: []string{"fulfilled"}, - Refresh: SpotInstanceStateRefreshFunc(conn, sir), - Timeout: d.Timeout(schema.TimeoutCreate), - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - log.Printf("[DEBUG] waiting for spot bid to resolve... this may take several minutes.") - _, err = spotStateConf.WaitForState() - - if err != nil { - return fmt.Errorf("Error while waiting for spot request (%s) to resolve: %s", sir, err) - } - } - - return resourceAwsSpotInstanceRequestUpdate(d, meta) -} - -// Update spot state, etc -func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DescribeSpotInstanceRequestsInput{ - SpotInstanceRequestIds: []*string{aws.String(d.Id())}, - } - resp, err := conn.DescribeSpotInstanceRequests(req) - - if err != nil { - // If the spot request was not found, return nil so that we can show - // that it is gone. - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidSpotInstanceRequestID.NotFound" { - d.SetId("") - return nil - } - - // Some other error, report it - return err - } - - // If nothing was found, then return no state - if len(resp.SpotInstanceRequests) == 0 { - d.SetId("") - return nil - } - - request := resp.SpotInstanceRequests[0] - - // if the request is cancelled or closed, then it is gone - if *request.State == "cancelled" || *request.State == "closed" { - d.SetId("") - return nil - } - - d.Set("spot_bid_status", *request.Status.Code) - // Instance ID is not set if the request is still pending - if request.InstanceId != nil { - d.Set("spot_instance_id", *request.InstanceId) - // Read the instance data, setting up connection information - if err := readInstance(d, meta); err != nil { - return fmt.Errorf("Error reading Spot Instance Data: %s", err) - } - } - - d.Set("spot_request_state", request.State) - d.Set("launch_group", request.LaunchGroup) - d.Set("block_duration_minutes", request.BlockDurationMinutes) - d.Set("tags", tagsToMap(request.Tags)) - d.Set("instance_interruption_behaviour", request.InstanceInterruptionBehavior) - d.Set("valid_from", aws.TimeValue(request.ValidFrom).Format(time.RFC3339)) - d.Set("valid_until", aws.TimeValue(request.ValidUntil).Format(time.RFC3339)) - - return nil -} - -func readInstance(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - resp, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{ - InstanceIds: []*string{aws.String(d.Get("spot_instance_id").(string))}, - }) - if err != nil { - // If the instance was not found, return nil so that we can show - // that the instance is gone. - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidInstanceID.NotFound" { - return fmt.Errorf("no instance found") - } - - // Some other error, report it - return err - } - - // If nothing was found, then return no state - if len(resp.Reservations) == 0 { - return fmt.Errorf("no instances found") - } - - instance := resp.Reservations[0].Instances[0] - - // Set these fields for connection information - if instance != nil { - d.Set("public_dns", instance.PublicDnsName) - d.Set("public_ip", instance.PublicIpAddress) - d.Set("private_dns", instance.PrivateDnsName) - d.Set("private_ip", instance.PrivateIpAddress) - - // set connection information - if instance.PublicIpAddress != nil { - d.SetConnInfo(map[string]string{ - "type": "ssh", - "host": *instance.PublicIpAddress, - }) - } else if instance.PrivateIpAddress != nil { - d.SetConnInfo(map[string]string{ - "type": "ssh", - "host": *instance.PrivateIpAddress, - }) - } - if err := readBlockDevices(d, instance, conn); err != nil { - return err - } - - var ipv6Addresses []string - if len(instance.NetworkInterfaces) > 0 { - for _, ni := range instance.NetworkInterfaces { - if *ni.Attachment.DeviceIndex == 0 { - d.Set("subnet_id", ni.SubnetId) - d.Set("network_interface_id", ni.NetworkInterfaceId) - d.Set("associate_public_ip_address", ni.Association != nil) - d.Set("ipv6_address_count", len(ni.Ipv6Addresses)) - - for _, address := range ni.Ipv6Addresses { - ipv6Addresses = append(ipv6Addresses, *address.Ipv6Address) - } - } - } - } else { - d.Set("subnet_id", instance.SubnetId) - d.Set("network_interface_id", "") - } - - if err := d.Set("ipv6_addresses", ipv6Addresses); err != nil { - log.Printf("[WARN] Error setting ipv6_addresses for AWS Spot Instance (%s): %s", d.Id(), err) - } - - if d.Get("get_password_data").(bool) { - passwordData, err := getAwsEc2InstancePasswordData(*instance.InstanceId, conn) - if err != nil { - return err - } - d.Set("password_data", passwordData) - } else { - d.Set("get_password_data", false) - d.Set("password_data", nil) - } - } - - return nil -} - -func resourceAwsSpotInstanceRequestUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - d.Partial(true) - if err := setTags(conn, d); err != nil { - return err - } else { - d.SetPartial("tags") - } - - d.Partial(false) - - return resourceAwsSpotInstanceRequestRead(d, meta) -} - -func resourceAwsSpotInstanceRequestDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[INFO] Cancelling spot request: %s", d.Id()) - _, err := conn.CancelSpotInstanceRequests(&ec2.CancelSpotInstanceRequestsInput{ - SpotInstanceRequestIds: []*string{aws.String(d.Id())}, - }) - - if err != nil { - return fmt.Errorf("Error cancelling spot request (%s): %s", d.Id(), err) - } - - if instanceId := d.Get("spot_instance_id").(string); instanceId != "" { - log.Printf("[INFO] Terminating instance: %s", instanceId) - if err := awsTerminateInstance(conn, instanceId, d.Timeout(schema.TimeoutDelete)); err != nil { - return fmt.Errorf("Error terminating spot instance: %s", err) - } - } - - return nil -} - -// SpotInstanceStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// an EC2 spot instance request -func SpotInstanceStateRefreshFunc( - conn *ec2.EC2, sir ec2.SpotInstanceRequest) resource.StateRefreshFunc { - - return func() (interface{}, string, error) { - resp, err := conn.DescribeSpotInstanceRequests(&ec2.DescribeSpotInstanceRequestsInput{ - SpotInstanceRequestIds: []*string{sir.SpotInstanceRequestId}, - }) - - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidSpotInstanceRequestID.NotFound" { - // Set this to nil as if we didn't find anything. - resp = nil - } else { - log.Printf("Error on StateRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil || len(resp.SpotInstanceRequests) == 0 { - // Sometimes AWS just has consistency issues and doesn't see - // our request yet. Return an empty state. - return nil, "", nil - } - - req := resp.SpotInstanceRequests[0] - return req, *req.Status.Code, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go deleted file mode 100644 index a36806a5c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go +++ /dev/null @@ -1,398 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "net/url" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/sqs" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -var sqsQueueAttributeMap = map[string]string{ - "delay_seconds": sqs.QueueAttributeNameDelaySeconds, - "max_message_size": sqs.QueueAttributeNameMaximumMessageSize, - "message_retention_seconds": sqs.QueueAttributeNameMessageRetentionPeriod, - "receive_wait_time_seconds": sqs.QueueAttributeNameReceiveMessageWaitTimeSeconds, - "visibility_timeout_seconds": sqs.QueueAttributeNameVisibilityTimeout, - "policy": sqs.QueueAttributeNamePolicy, - "redrive_policy": sqs.QueueAttributeNameRedrivePolicy, - "arn": sqs.QueueAttributeNameQueueArn, - "fifo_queue": sqs.QueueAttributeNameFifoQueue, - "content_based_deduplication": sqs.QueueAttributeNameContentBasedDeduplication, - "kms_master_key_id": sqs.QueueAttributeNameKmsMasterKeyId, - "kms_data_key_reuse_period_seconds": sqs.QueueAttributeNameKmsDataKeyReusePeriodSeconds, -} - -// A number of these are marked as computed because if you don't -// provide a value, SQS will provide you with defaults (which are the -// default values specified below) -func resourceAwsSqsQueue() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSqsQueueCreate, - Read: resourceAwsSqsQueueRead, - Update: resourceAwsSqsQueueUpdate, - Delete: resourceAwsSqsQueueDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateSQSQueueName, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - }, - "delay_seconds": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - "max_message_size": { - Type: schema.TypeInt, - Optional: true, - Default: 262144, - }, - "message_retention_seconds": { - Type: schema.TypeInt, - Optional: true, - Default: 345600, - }, - "receive_wait_time_seconds": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - "visibility_timeout_seconds": { - Type: schema.TypeInt, - Optional: true, - Default: 30, - }, - "policy": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - "redrive_policy": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.ValidateJsonString, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "fifo_queue": { - Type: schema.TypeBool, - Default: false, - ForceNew: true, - Optional: true, - }, - "content_based_deduplication": { - Type: schema.TypeBool, - Default: false, - Optional: true, - }, - "kms_master_key_id": { - Type: schema.TypeString, - Optional: true, - }, - "kms_data_key_reuse_period_seconds": { - Type: schema.TypeInt, - Computed: true, - Optional: true, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsSqsQueueCreate(d *schema.ResourceData, meta interface{}) error { - sqsconn := meta.(*AWSClient).sqsconn - - var name string - - fq := d.Get("fifo_queue").(bool) - - if v, ok := d.GetOk("name"); ok { - name = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - name = resource.PrefixedUniqueId(v.(string)) - if fq { - name += ".fifo" - } - } else { - name = resource.UniqueId() - } - - cbd := d.Get("content_based_deduplication").(bool) - - if fq { - if errors := validateSQSFifoQueueName(name); len(errors) > 0 { - return fmt.Errorf("Error validating the FIFO queue name: %v", errors) - } - } else { - if errors := validateSQSNonFifoQueueName(name); len(errors) > 0 { - return fmt.Errorf("Error validating SQS queue name: %v", errors) - } - } - - if !fq && cbd { - return fmt.Errorf("Content based deduplication can only be set with FIFO queues") - } - - log.Printf("[DEBUG] SQS queue create: %s", name) - - req := &sqs.CreateQueueInput{ - QueueName: aws.String(name), - } - - attributes := make(map[string]*string) - - queueResource := *resourceAwsSqsQueue() - - for k, s := range queueResource.Schema { - if attrKey, ok := sqsQueueAttributeMap[k]; ok { - if value, ok := d.GetOk(k); ok { - switch s.Type { - case schema.TypeInt: - attributes[attrKey] = aws.String(strconv.Itoa(value.(int))) - case schema.TypeBool: - attributes[attrKey] = aws.String(strconv.FormatBool(value.(bool))) - default: - attributes[attrKey] = aws.String(value.(string)) - } - } - - } - } - - if len(attributes) > 0 { - req.Attributes = attributes - } - - var output *sqs.CreateQueueOutput - err := resource.Retry(70*time.Second, func() *resource.RetryError { - var err error - output, err = sqsconn.CreateQueue(req) - if err != nil { - if isAWSErr(err, sqs.ErrCodeQueueDeletedRecently, "You must wait 60 seconds after deleting a queue before you can create another with the same name.") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("Error creating SQS queue: %s", err) - } - - d.SetId(aws.StringValue(output.QueueUrl)) - - return resourceAwsSqsQueueUpdate(d, meta) -} - -func resourceAwsSqsQueueUpdate(d *schema.ResourceData, meta interface{}) error { - sqsconn := meta.(*AWSClient).sqsconn - - if err := setTagsSQS(sqsconn, d); err != nil { - return err - } - - attributes := make(map[string]*string) - - resource := *resourceAwsSqsQueue() - - for k, s := range resource.Schema { - if attrKey, ok := sqsQueueAttributeMap[k]; ok { - if d.HasChange(k) { - log.Printf("[DEBUG] Updating %s", attrKey) - _, n := d.GetChange(k) - switch s.Type { - case schema.TypeInt: - attributes[attrKey] = aws.String(strconv.Itoa(n.(int))) - case schema.TypeBool: - attributes[attrKey] = aws.String(strconv.FormatBool(n.(bool))) - default: - attributes[attrKey] = aws.String(n.(string)) - } - } - } - } - - if len(attributes) > 0 { - req := &sqs.SetQueueAttributesInput{ - QueueUrl: aws.String(d.Id()), - Attributes: attributes, - } - if _, err := sqsconn.SetQueueAttributes(req); err != nil { - return fmt.Errorf("Error updating SQS attributes: %s", err) - } - } - - return resourceAwsSqsQueueRead(d, meta) -} - -func resourceAwsSqsQueueRead(d *schema.ResourceData, meta interface{}) error { - sqsconn := meta.(*AWSClient).sqsconn - - attributeOutput, err := sqsconn.GetQueueAttributes(&sqs.GetQueueAttributesInput{ - QueueUrl: aws.String(d.Id()), - AttributeNames: []*string{aws.String("All")}, - }) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - log.Printf("ERROR Found %s", awsErr.Code()) - if awsErr.Code() == "AWS.SimpleQueueService.NonExistentQueue" { - d.SetId("") - log.Printf("[DEBUG] SQS Queue (%s) not found", d.Get("name").(string)) - return nil - } - } - return err - } - - name, err := extractNameFromSqsQueueUrl(d.Id()) - if err != nil { - return err - } - d.Set("name", name) - - if attributeOutput.Attributes != nil && len(attributeOutput.Attributes) > 0 { - attrmap := attributeOutput.Attributes - resource := *resourceAwsSqsQueue() - // iKey = internal struct key, oKey = AWS Attribute Map key - for iKey, oKey := range sqsQueueAttributeMap { - if attrmap[oKey] != nil { - switch resource.Schema[iKey].Type { - case schema.TypeInt: - value, err := strconv.Atoi(*attrmap[oKey]) - if err != nil { - return err - } - d.Set(iKey, value) - log.Printf("[DEBUG] Reading %s => %s -> %d", iKey, oKey, value) - case schema.TypeBool: - value, err := strconv.ParseBool(*attrmap[oKey]) - if err != nil { - return err - } - d.Set(iKey, value) - log.Printf("[DEBUG] Reading %s => %s -> %t", iKey, oKey, value) - default: - log.Printf("[DEBUG] Reading %s => %s -> %s", iKey, oKey, *attrmap[oKey]) - d.Set(iKey, *attrmap[oKey]) - } - } - } - } - - // Since AWS does not send the FifoQueue attribute back when the queue - // is a standard one (even to false), this enforces the queue to be set - // to the correct value. - d.Set("fifo_queue", d.Get("fifo_queue").(bool)) - d.Set("content_based_deduplication", d.Get("content_based_deduplication").(bool)) - - tags := make(map[string]string) - listTagsOutput, err := sqsconn.ListQueueTags(&sqs.ListQueueTagsInput{ - QueueUrl: aws.String(d.Id()), - }) - if err != nil { - // Non-standard partitions (e.g. US Gov) and some local development - // solutions do not yet support this API call. Depending on the - // implementation it may return InvalidAction or AWS.SimpleQueueService.UnsupportedOperation - if !isAWSErr(err, "InvalidAction", "") && !isAWSErr(err, sqs.ErrCodeUnsupportedOperation, "") { - return err - } - } else { - tags = tagsToMapGeneric(listTagsOutput.Tags) - } - d.Set("tags", tags) - - return nil -} - -func resourceAwsSqsQueueDelete(d *schema.ResourceData, meta interface{}) error { - sqsconn := meta.(*AWSClient).sqsconn - - log.Printf("[DEBUG] SQS Delete Queue: %s", d.Id()) - _, err := sqsconn.DeleteQueue(&sqs.DeleteQueueInput{ - QueueUrl: aws.String(d.Id()), - }) - return err -} - -func extractNameFromSqsQueueUrl(queue string) (string, error) { - //http://sqs.us-west-2.amazonaws.com/123456789012/queueName - u, err := url.Parse(queue) - if err != nil { - return "", err - } - segments := strings.Split(u.Path, "/") - if len(segments) != 3 { - return "", fmt.Errorf("SQS Url not parsed correctly") - } - - return segments[2], nil - -} - -func setTagsSQS(conn *sqs.SQS, d *schema.ResourceData) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - create, remove := diffTagsGeneric(oraw.(map[string]interface{}), nraw.(map[string]interface{})) - - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %#v", remove) - keys := make([]*string, 0, len(remove)) - for k := range remove { - keys = append(keys, aws.String(k)) - } - - _, err := conn.UntagQueue(&sqs.UntagQueueInput{ - QueueUrl: aws.String(d.Id()), - TagKeys: keys, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - - _, err := conn.TagQueue(&sqs.TagQueueInput{ - QueueUrl: aws.String(d.Id()), - Tags: create, - }) - if err != nil { - return err - } - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue_policy.go deleted file mode 100644 index 0459e7c20..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue_policy.go +++ /dev/null @@ -1,145 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/sqs" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - "github.com/jen20/awspolicyequivalence" -) - -func resourceAwsSqsQueuePolicy() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSqsQueuePolicyUpsert, - Read: resourceAwsSqsQueuePolicyRead, - Update: resourceAwsSqsQueuePolicyUpsert, - Delete: resourceAwsSqsQueuePolicyDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - MigrateState: resourceAwsSqsQueuePolicyMigrateState, - SchemaVersion: 1, - - Schema: map[string]*schema.Schema{ - "queue_url": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "policy": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.ValidateJsonString, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - }, - } -} - -func resourceAwsSqsQueuePolicyUpsert(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sqsconn - policy := d.Get("policy").(string) - url := d.Get("queue_url").(string) - - sqaInput := &sqs.SetQueueAttributesInput{ - QueueUrl: aws.String(url), - Attributes: aws.StringMap(map[string]string{ - sqs.QueueAttributeNamePolicy: policy, - }), - } - log.Printf("[DEBUG] Updating SQS attributes: %s", sqaInput) - _, err := conn.SetQueueAttributes(sqaInput) - if err != nil { - return fmt.Errorf("Error updating SQS attributes: %s", err) - } - - // https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SetQueueAttributes.html - // When you change a queue's attributes, the change can take up to 60 seconds - // for most of the attributes to propagate throughout the Amazon SQS system. - gqaInput := &sqs.GetQueueAttributesInput{ - QueueUrl: aws.String(url), - AttributeNames: []*string{aws.String(sqs.QueueAttributeNamePolicy)}, - } - notUpdatedError := fmt.Errorf("SQS attribute %s not updated", sqs.QueueAttributeNamePolicy) - err = resource.Retry(1*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Reading SQS attributes: %s", gqaInput) - out, err := conn.GetQueueAttributes(gqaInput) - if err != nil { - return resource.NonRetryableError(err) - } - queuePolicy, ok := out.Attributes[sqs.QueueAttributeNamePolicy] - if !ok { - log.Printf("[DEBUG] SQS attribute %s not found - retrying", sqs.QueueAttributeNamePolicy) - return resource.RetryableError(notUpdatedError) - } - equivalent, err := awspolicy.PoliciesAreEquivalent(*queuePolicy, policy) - if err != nil { - return resource.NonRetryableError(err) - } - if !equivalent { - log.Printf("[DEBUG] SQS attribute %s not updated - retrying", sqs.QueueAttributeNamePolicy) - return resource.RetryableError(notUpdatedError) - } - return nil - }) - if err != nil { - return err - } - - d.SetId(url) - - return resourceAwsSqsQueuePolicyRead(d, meta) -} - -func resourceAwsSqsQueuePolicyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sqsconn - - out, err := conn.GetQueueAttributes(&sqs.GetQueueAttributesInput{ - QueueUrl: aws.String(d.Id()), - AttributeNames: []*string{aws.String(sqs.QueueAttributeNamePolicy)}, - }) - if err != nil { - if isAWSErr(err, "AWS.SimpleQueueService.NonExistentQueue", "") { - log.Printf("[WARN] SQS Queue (%s) not found", d.Id()) - d.SetId("") - return nil - } - return err - } - if out == nil { - return fmt.Errorf("Received empty response for SQS queue %s", d.Id()) - } - - policy, ok := out.Attributes[sqs.QueueAttributeNamePolicy] - if ok { - d.Set("policy", policy) - } else { - d.Set("policy", "") - } - - d.Set("queue_url", d.Id()) - - return nil -} - -func resourceAwsSqsQueuePolicyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).sqsconn - - log.Printf("[DEBUG] Deleting SQS Queue Policy of %s", d.Id()) - _, err := conn.SetQueueAttributes(&sqs.SetQueueAttributesInput{ - QueueUrl: aws.String(d.Id()), - Attributes: aws.StringMap(map[string]string{ - sqs.QueueAttributeNamePolicy: "", - }), - }) - if err != nil { - return fmt.Errorf("Error deleting SQS Queue policy: %s", err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue_policy_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue_policy_migrate.go deleted file mode 100644 index 2906c1719..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue_policy_migrate.go +++ /dev/null @@ -1,38 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsSqsQueuePolicyMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS SQS Query Policy State v0; migrating to v1") - return migrateSqsQueuePolicyStateV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateSqsQueuePolicyStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - - if is.Empty() { - log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") - - return is, nil - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - - is.Attributes["id"] = is.Attributes["queue_url"] - is.ID = is.Attributes["queue_url"] - - log.Printf("[DEBUG] Attributes after migration: %#v, new id: %s", is.Attributes, is.Attributes["queue_url"]) - - return is, nil - -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_activation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_activation.go deleted file mode 100644 index 95ed6d41f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_activation.go +++ /dev/null @@ -1,175 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsSsmActivation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSsmActivationCreate, - Read: resourceAwsSsmActivationRead, - Delete: resourceAwsSsmActivationDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "expired": { - Type: schema.TypeString, - Computed: true, - }, - "expiration_date": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.ValidateRFC3339TimeString, - }, - "iam_role": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "registration_limit": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - "registration_count": { - Type: schema.TypeInt, - Computed: true, - }, - "activation_code": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsSsmActivationCreate(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[DEBUG] SSM activation create: %s", d.Id()) - - activationInput := &ssm.CreateActivationInput{ - IamRole: aws.String(d.Get("name").(string)), - } - - if _, ok := d.GetOk("name"); ok { - activationInput.DefaultInstanceName = aws.String(d.Get("name").(string)) - } - - if _, ok := d.GetOk("description"); ok { - activationInput.Description = aws.String(d.Get("description").(string)) - } - - if v, ok := d.GetOk("expiration_date"); ok { - t, _ := time.Parse(time.RFC3339, v.(string)) - activationInput.ExpirationDate = aws.Time(t) - } - - if _, ok := d.GetOk("iam_role"); ok { - activationInput.IamRole = aws.String(d.Get("iam_role").(string)) - } - - if _, ok := d.GetOk("registration_limit"); ok { - activationInput.RegistrationLimit = aws.Int64(int64(d.Get("registration_limit").(int))) - } - - // Retry to allow iam_role to be created and policy attachment to take place - var resp *ssm.CreateActivationOutput - err := resource.Retry(30*time.Second, func() *resource.RetryError { - var err error - - resp, err = ssmconn.CreateActivation(activationInput) - - if err != nil { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - }) - - if err != nil { - return fmt.Errorf("Error creating SSM activation: %s", err) - } - - if resp.ActivationId == nil { - return fmt.Errorf("ActivationId was nil") - } - d.SetId(*resp.ActivationId) - d.Set("activation_code", resp.ActivationCode) - - return resourceAwsSsmActivationRead(d, meta) -} - -func resourceAwsSsmActivationRead(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[DEBUG] Reading SSM Activation: %s", d.Id()) - - params := &ssm.DescribeActivationsInput{ - Filters: []*ssm.DescribeActivationsFilter{ - { - FilterKey: aws.String("ActivationIds"), - FilterValues: []*string{ - aws.String(d.Id()), - }, - }, - }, - MaxResults: aws.Int64(1), - } - - resp, err := ssmconn.DescribeActivations(params) - - if err != nil { - return fmt.Errorf("Error reading SSM activation: %s", err) - } - if resp.ActivationList == nil || len(resp.ActivationList) == 0 { - return fmt.Errorf("ActivationList was nil or empty") - } - - activation := resp.ActivationList[0] // Only 1 result as MaxResults is 1 above - d.Set("name", activation.DefaultInstanceName) - d.Set("description", activation.Description) - d.Set("expiration_date", activation.ExpirationDate) - d.Set("expired", activation.Expired) - d.Set("iam_role", activation.IamRole) - d.Set("registration_limit", activation.RegistrationLimit) - d.Set("registration_count", activation.RegistrationsCount) - - return nil -} - -func resourceAwsSsmActivationDelete(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[DEBUG] Deleting SSM Activation: %s", d.Id()) - - params := &ssm.DeleteActivationInput{ - ActivationId: aws.String(d.Id()), - } - - _, err := ssmconn.DeleteActivation(params) - - if err != nil { - return fmt.Errorf("Error deleting SSM activation: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go deleted file mode 100644 index 7a93f96a8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go +++ /dev/null @@ -1,298 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSsmAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSsmAssociationCreate, - Read: resourceAwsSsmAssociationRead, - Update: resourceAwsSsmAssociationUpdate, - Delete: resourceAwsSsmAssociationDelete, - - MigrateState: resourceAwsSsmAssociationMigrateState, - SchemaVersion: 1, - - Schema: map[string]*schema.Schema{ - "association_name": { - Type: schema.TypeString, - Optional: true, - }, - "association_id": { - Type: schema.TypeString, - Computed: true, - }, - "instance_id": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, - }, - "document_version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - }, - "parameters": { - Type: schema.TypeMap, - Optional: true, - Computed: true, - }, - "schedule_expression": { - Type: schema.TypeString, - Optional: true, - }, - "output_location": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "s3_bucket_name": { - Type: schema.TypeString, - Required: true, - }, - "s3_key_prefix": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "targets": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 5, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key": { - Type: schema.TypeString, - Required: true, - }, - "values": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - }, - } -} - -func resourceAwsSsmAssociationCreate(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[DEBUG] SSM association create: %s", d.Id()) - - associationInput := &ssm.CreateAssociationInput{ - Name: aws.String(d.Get("name").(string)), - } - - if v, ok := d.GetOk("association_name"); ok { - associationInput.AssociationName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("instance_id"); ok { - associationInput.InstanceId = aws.String(v.(string)) - } - - if v, ok := d.GetOk("document_version"); ok { - associationInput.DocumentVersion = aws.String(v.(string)) - } - - if v, ok := d.GetOk("schedule_expression"); ok { - associationInput.ScheduleExpression = aws.String(v.(string)) - } - - if v, ok := d.GetOk("parameters"); ok { - associationInput.Parameters = expandSSMDocumentParameters(v.(map[string]interface{})) - } - - if _, ok := d.GetOk("targets"); ok { - associationInput.Targets = expandAwsSsmTargets(d.Get("targets").([]interface{})) - } - - if v, ok := d.GetOk("output_location"); ok { - associationInput.OutputLocation = expandSSMAssociationOutputLocation(v.([]interface{})) - } - - resp, err := ssmconn.CreateAssociation(associationInput) - if err != nil { - return fmt.Errorf("Error creating SSM association: %s", err) - } - - if resp.AssociationDescription == nil { - return fmt.Errorf("AssociationDescription was nil") - } - - d.SetId(*resp.AssociationDescription.AssociationId) - d.Set("association_id", resp.AssociationDescription.AssociationId) - - return resourceAwsSsmAssociationRead(d, meta) -} - -func resourceAwsSsmAssociationRead(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[DEBUG] Reading SSM Association: %s", d.Id()) - - params := &ssm.DescribeAssociationInput{ - AssociationId: aws.String(d.Id()), - } - - resp, err := ssmconn.DescribeAssociation(params) - - if err != nil { - if isAWSErr(err, ssm.ErrCodeAssociationDoesNotExist, "") { - d.SetId("") - return nil - } - return fmt.Errorf("Error reading SSM association: %s", err) - } - if resp.AssociationDescription == nil { - return fmt.Errorf("AssociationDescription was nil") - } - - association := resp.AssociationDescription - d.Set("association_name", association.AssociationName) - d.Set("instance_id", association.InstanceId) - d.Set("name", association.Name) - d.Set("parameters", association.Parameters) - d.Set("association_id", association.AssociationId) - d.Set("schedule_expression", association.ScheduleExpression) - d.Set("document_version", association.DocumentVersion) - - if err := d.Set("targets", flattenAwsSsmTargets(association.Targets)); err != nil { - return fmt.Errorf("Error setting targets error: %#v", err) - } - - if err := d.Set("output_location", flattenAwsSsmAssociationOutoutLocation(association.OutputLocation)); err != nil { - return fmt.Errorf("Error setting output_location error: %#v", err) - } - - return nil -} - -func resourceAwsSsmAssociationUpdate(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[DEBUG] SSM Association update: %s", d.Id()) - - associationInput := &ssm.UpdateAssociationInput{ - AssociationId: aws.String(d.Get("association_id").(string)), - } - - // AWS creates a new version every time the association is updated, so everything should be passed in the update. - if v, ok := d.GetOk("association_name"); ok { - associationInput.AssociationName = aws.String(v.(string)) - } - - if v, ok := d.GetOk("document_version"); ok { - associationInput.DocumentVersion = aws.String(v.(string)) - } - - if v, ok := d.GetOk("schedule_expression"); ok { - associationInput.ScheduleExpression = aws.String(v.(string)) - } - - if v, ok := d.GetOk("parameters"); ok { - associationInput.Parameters = expandSSMDocumentParameters(v.(map[string]interface{})) - } - - if _, ok := d.GetOk("targets"); ok { - associationInput.Targets = expandAwsSsmTargets(d.Get("targets").([]interface{})) - } - - if v, ok := d.GetOk("output_location"); ok { - associationInput.OutputLocation = expandSSMAssociationOutputLocation(v.([]interface{})) - } - - _, err := ssmconn.UpdateAssociation(associationInput) - if err != nil { - return fmt.Errorf("Error updating SSM association: %s", err) - } - - return resourceAwsSsmAssociationRead(d, meta) -} - -func resourceAwsSsmAssociationDelete(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[DEBUG] Deleting SSM Association: %s", d.Id()) - - params := &ssm.DeleteAssociationInput{ - AssociationId: aws.String(d.Get("association_id").(string)), - } - - _, err := ssmconn.DeleteAssociation(params) - - if err != nil { - return fmt.Errorf("Error deleting SSM association: %s", err) - } - - return nil -} - -func expandSSMDocumentParameters(params map[string]interface{}) map[string][]*string { - var docParams = make(map[string][]*string) - for k, v := range params { - values := make([]*string, 1) - values[0] = aws.String(v.(string)) - docParams[k] = values - } - - return docParams -} - -func expandSSMAssociationOutputLocation(config []interface{}) *ssm.InstanceAssociationOutputLocation { - if config == nil { - return nil - } - - //We only allow 1 Item so we can grab the first in the list only - locationConfig := config[0].(map[string]interface{}) - - S3OutputLocation := &ssm.S3OutputLocation{ - OutputS3BucketName: aws.String(locationConfig["s3_bucket_name"].(string)), - } - - if v, ok := locationConfig["s3_key_prefix"]; ok { - S3OutputLocation.OutputS3KeyPrefix = aws.String(v.(string)) - } - - return &ssm.InstanceAssociationOutputLocation{ - S3Location: S3OutputLocation, - } -} - -func flattenAwsSsmAssociationOutoutLocation(location *ssm.InstanceAssociationOutputLocation) []map[string]interface{} { - if location == nil { - return nil - } - - result := make([]map[string]interface{}, 0) - item := make(map[string]interface{}) - - item["s3_bucket_name"] = *location.S3Location.OutputS3BucketName - - if location.S3Location.OutputS3KeyPrefix != nil { - item["s3_key_prefix"] = *location.S3Location.OutputS3KeyPrefix - } - - result = append(result, item) - - return result -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association_migrate.go deleted file mode 100644 index 17821ad22..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association_migrate.go +++ /dev/null @@ -1,38 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsSsmAssociationMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS SSM Association State v0; migrating to v1") - return migrateSsmAssociationStateV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateSsmAssociationStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - - if is.Empty() { - log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") - - return is, nil - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - - is.Attributes["id"] = is.Attributes["association_id"] - is.ID = is.Attributes["association_id"] - - log.Printf("[DEBUG] Attributes after migration: %#v, new id: %s", is.Attributes, is.Attributes["association_id"]) - - return is, nil - -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go deleted file mode 100644 index 62f835baf..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go +++ /dev/null @@ -1,591 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -const ( - MINIMUM_VERSIONED_SCHEMA = 2.0 - SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT = 20 -) - -func resourceAwsSsmDocument() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSsmDocumentCreate, - Read: resourceAwsSsmDocumentRead, - Update: resourceAwsSsmDocumentUpdate, - Delete: resourceAwsSsmDocumentDelete, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateAwsSSMName, - }, - "content": { - Type: schema.TypeString, - Required: true, - }, - "document_format": { - Type: schema.TypeString, - Optional: true, - Default: ssm.DocumentFormatJson, - ValidateFunc: validation.StringInSlice([]string{ - ssm.DocumentFormatJson, - ssm.DocumentFormatYaml, - }, false), - }, - "document_type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - ssm.DocumentTypeCommand, - ssm.DocumentTypePolicy, - ssm.DocumentTypeAutomation, - ssm.DocumentTypeSession, - }, false), - }, - "schema_version": { - Type: schema.TypeString, - Computed: true, - }, - "created_date": { - Type: schema.TypeString, - Computed: true, - }, - "default_version": { - Type: schema.TypeString, - Computed: true, - }, - "description": { - Type: schema.TypeString, - Computed: true, - }, - "hash": { - Type: schema.TypeString, - Computed: true, - }, - "hash_type": { - Type: schema.TypeString, - Computed: true, - }, - "latest_version": { - Type: schema.TypeString, - Computed: true, - }, - "owner": { - Type: schema.TypeString, - Computed: true, - }, - "status": { - Type: schema.TypeString, - Computed: true, - }, - "platform_types": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "parameter": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - }, - "default_value": { - Type: schema.TypeString, - Optional: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "permissions": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - "account_ids": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsSsmDocumentCreate(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[INFO] Creating SSM Document: %s", d.Get("name").(string)) - - docInput := &ssm.CreateDocumentInput{ - Name: aws.String(d.Get("name").(string)), - Content: aws.String(d.Get("content").(string)), - DocumentFormat: aws.String(d.Get("document_format").(string)), - DocumentType: aws.String(d.Get("document_type").(string)), - } - - log.Printf("[DEBUG] Waiting for SSM Document %q to be created", d.Get("name").(string)) - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - resp, err := ssmconn.CreateDocument(docInput) - - if err != nil { - return resource.NonRetryableError(err) - } - - d.SetId(*resp.DocumentDescription.Name) - return nil - }) - - if err != nil { - return fmt.Errorf("Error creating SSM document: %s", err) - } - - if v, ok := d.GetOk("permissions"); ok && v != nil { - if err := setDocumentPermissions(d, meta); err != nil { - return err - } - } else { - log.Printf("[DEBUG] Not setting permissions for %q", d.Id()) - } - - if err := setTagsSSM(ssmconn, d, d.Id(), ssm.ResourceTypeForTaggingDocument); err != nil { - return fmt.Errorf("error setting SSM Document tags: %s", err) - } - - return resourceAwsSsmDocumentRead(d, meta) -} - -func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[DEBUG] Reading SSM Document: %s", d.Id()) - - docInput := &ssm.DescribeDocumentInput{ - Name: aws.String(d.Get("name").(string)), - } - - resp, err := ssmconn.DescribeDocument(docInput) - if err != nil { - if ssmErr, ok := err.(awserr.Error); ok && ssmErr.Code() == "InvalidDocument" { - log.Printf("[WARN] SSM Document not found so removing from state") - d.SetId("") - return nil - } - return fmt.Errorf("Error describing SSM document: %s", err) - } - - doc := resp.Document - d.Set("created_date", doc.CreatedDate) - d.Set("default_version", doc.DefaultVersion) - d.Set("description", doc.Description) - d.Set("schema_version", doc.SchemaVersion) - - if _, ok := d.GetOk("document_type"); ok { - d.Set("document_type", doc.DocumentType) - } - - d.Set("document_format", doc.DocumentFormat) - d.Set("document_version", doc.DocumentVersion) - d.Set("hash", doc.Hash) - d.Set("hash_type", doc.HashType) - d.Set("latest_version", doc.LatestVersion) - d.Set("name", doc.Name) - d.Set("owner", doc.Owner) - d.Set("platform_types", flattenStringList(doc.PlatformTypes)) - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "ssm", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("document/%s", *doc.Name), - }.String() - if err := d.Set("arn", arn); err != nil { - return fmt.Errorf("Error setting arn error: %#v", err) - } - - d.Set("status", doc.Status) - - gp, err := getDocumentPermissions(d, meta) - - if err != nil { - return fmt.Errorf("Error reading SSM document permissions: %s", err) - } - - d.Set("permissions", gp) - - params := make([]map[string]interface{}, 0) - for i := 0; i < len(doc.Parameters); i++ { - - dp := doc.Parameters[i] - param := make(map[string]interface{}) - - if dp.DefaultValue != nil { - param["default_value"] = *dp.DefaultValue - } - if dp.Description != nil { - param["description"] = *dp.Description - } - if dp.Name != nil { - param["name"] = *dp.Name - } - if dp.Type != nil { - param["type"] = *dp.Type - } - params = append(params, param) - } - - if len(params) == 0 { - params = make([]map[string]interface{}, 1) - } - - if err := d.Set("parameter", params); err != nil { - return err - } - - tagList, err := ssmconn.ListTagsForResource(&ssm.ListTagsForResourceInput{ - ResourceId: aws.String(d.Id()), - ResourceType: aws.String(ssm.ResourceTypeForTaggingDocument), - }) - if err != nil { - return fmt.Errorf("error listing SSM Document tags for %s: %s", d.Id(), err) - } - d.Set("tags", tagsToMapSSM(tagList.TagList)) - - return nil -} - -func resourceAwsSsmDocumentUpdate(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - if d.HasChange("tags") { - if err := setTagsSSM(ssmconn, d, d.Id(), ssm.ResourceTypeForTaggingDocument); err != nil { - return fmt.Errorf("error setting SSM Document tags: %s", err) - } - } - - if d.HasChange("permissions") { - if err := setDocumentPermissions(d, meta); err != nil { - return err - } - } else { - log.Printf("[DEBUG] Not setting document permissions on %q", d.Id()) - } - - if !d.HasChange("content") { - return nil - } - - if schemaVersion, ok := d.GetOk("schemaVersion"); ok { - schemaNumber, _ := strconv.ParseFloat(schemaVersion.(string), 64) - - if schemaNumber < MINIMUM_VERSIONED_SCHEMA { - log.Printf("[DEBUG] Skipping document update because document version is not 2.0 %q", d.Id()) - return nil - } - } - - if err := updateAwsSSMDocument(d, meta); err != nil { - return err - } - - return resourceAwsSsmDocumentRead(d, meta) -} - -func resourceAwsSsmDocumentDelete(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - if err := deleteDocumentPermissions(d, meta); err != nil { - return err - } - - log.Printf("[INFO] Deleting SSM Document: %s", d.Id()) - - params := &ssm.DeleteDocumentInput{ - Name: aws.String(d.Get("name").(string)), - } - - _, err := ssmconn.DeleteDocument(params) - if err != nil { - return err - } - - log.Printf("[DEBUG] Waiting for SSM Document %q to be deleted", d.Get("name").(string)) - err = resource.Retry(10*time.Minute, func() *resource.RetryError { - _, err := ssmconn.DescribeDocument(&ssm.DescribeDocumentInput{ - Name: aws.String(d.Get("name").(string)), - }) - - if err != nil { - awsErr, ok := err.(awserr.Error) - if !ok { - return resource.NonRetryableError(err) - } - - if awsErr.Code() == "InvalidDocument" { - return nil - } - - return resource.NonRetryableError(err) - } - - return resource.RetryableError(fmt.Errorf("SSM Document (%s) still exists", d.Id())) - }) - if err != nil { - return fmt.Errorf("error waiting for SSM Document (%s) deletion: %s", d.Id(), err) - } - - return nil -} - -func setDocumentPermissions(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[INFO] Setting permissions for document: %s", d.Id()) - - if d.HasChange("permissions") { - o, n := d.GetChange("permissions") - oldPermissions := o.(map[string]interface{}) - newPermissions := n.(map[string]interface{}) - oldPermissionsAccountIds := make([]interface{}, 0) - if v, ok := oldPermissions["account_ids"]; ok && v.(string) != "" { - parts := strings.Split(v.(string), ",") - oldPermissionsAccountIds = make([]interface{}, len(parts)) - for i, v := range parts { - oldPermissionsAccountIds[i] = v - } - } - newPermissionsAccountIds := make([]interface{}, 0) - if v, ok := newPermissions["account_ids"]; ok && v.(string) != "" { - parts := strings.Split(v.(string), ",") - newPermissionsAccountIds = make([]interface{}, len(parts)) - for i, v := range parts { - newPermissionsAccountIds[i] = v - } - } - - // Since AccountIdsToRemove has higher priority than AccountIdsToAdd, - // we filter out accounts from both lists - accountIdsToRemove := make([]interface{}, 0) - for _, oldPermissionsAccountId := range oldPermissionsAccountIds { - if _, contains := sliceContainsString(newPermissionsAccountIds, oldPermissionsAccountId.(string)); !contains { - accountIdsToRemove = append(accountIdsToRemove, oldPermissionsAccountId.(string)) - } - } - accountIdsToAdd := make([]interface{}, 0) - for _, newPermissionsAccountId := range newPermissionsAccountIds { - if _, contains := sliceContainsString(oldPermissionsAccountIds, newPermissionsAccountId.(string)); !contains { - accountIdsToAdd = append(accountIdsToAdd, newPermissionsAccountId.(string)) - } - } - - if err := modifyDocumentPermissions(ssmconn, d.Get("name").(string), accountIdsToAdd, accountIdsToRemove); err != nil { - return fmt.Errorf("error modifying SSM document permissions: %s", err) - } - - } - - return nil -} - -func getDocumentPermissions(d *schema.ResourceData, meta interface{}) (map[string]interface{}, error) { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[INFO] Getting permissions for document: %s", d.Id()) - - //How to get from nested scheme resource? - permissionType := "Share" - - permInput := &ssm.DescribeDocumentPermissionInput{ - Name: aws.String(d.Get("name").(string)), - PermissionType: aws.String(permissionType), - } - - resp, err := ssmconn.DescribeDocumentPermission(permInput) - - if err != nil { - return nil, fmt.Errorf("Error setting permissions for SSM document: %s", err) - } - - var account_ids = make([]string, len(resp.AccountIds)) - for i := 0; i < len(resp.AccountIds); i++ { - account_ids[i] = *resp.AccountIds[i] - } - - ids := "" - if len(account_ids) == 1 { - ids = account_ids[0] - } else if len(account_ids) > 1 { - ids = strings.Join(account_ids, ",") - } - - if ids == "" { - return nil, nil - } - - perms := make(map[string]interface{}) - perms["type"] = permissionType - perms["account_ids"] = ids - - return perms, nil -} - -func deleteDocumentPermissions(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[INFO] Removing permissions from document: %s", d.Id()) - - permission := d.Get("permissions").(map[string]interface{}) - - accountIdsToRemove := make([]interface{}, 0) - - if permission["account_ids"] != nil { - - if v, ok := permission["account_ids"]; ok && v.(string) != "" { - parts := strings.Split(v.(string), ",") - accountIdsToRemove = make([]interface{}, len(parts)) - for i, v := range parts { - accountIdsToRemove[i] = v - } - } - - if err := modifyDocumentPermissions(ssmconn, d.Get("name").(string), nil, accountIdsToRemove); err != nil { - return fmt.Errorf("error removing SSM document permissions: %s", err) - } - - } - - return nil -} - -func modifyDocumentPermissions(conn *ssm.SSM, name string, accountIdsToAdd []interface{}, accountIdstoRemove []interface{}) error { - - if accountIdsToAdd != nil { - - accountIdsToAddBatch := make([]string, 0, SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT) - accountIdsToAddBatches := make([][]string, 0, len(accountIdsToAdd)/SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT+1) - for _, accountId := range accountIdsToAdd { - if len(accountIdsToAddBatch) == SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT { - accountIdsToAddBatches = append(accountIdsToAddBatches, accountIdsToAddBatch) - accountIdsToAddBatch = make([]string, 0, SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT) - } - accountIdsToAddBatch = append(accountIdsToAddBatch, accountId.(string)) - } - accountIdsToAddBatches = append(accountIdsToAddBatches, accountIdsToAddBatch) - - for _, accountIdsToAdd := range accountIdsToAddBatches { - _, err := conn.ModifyDocumentPermission(&ssm.ModifyDocumentPermissionInput{ - Name: aws.String(name), - PermissionType: aws.String("Share"), - AccountIdsToAdd: aws.StringSlice(accountIdsToAdd), - }) - if err != nil { - return err - } - } - } - - if accountIdstoRemove != nil { - - accountIdsToRemoveBatch := make([]string, 0, SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT) - accountIdsToRemoveBatches := make([][]string, 0, len(accountIdstoRemove)/SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT+1) - for _, accountId := range accountIdstoRemove { - if len(accountIdsToRemoveBatch) == SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT { - accountIdsToRemoveBatches = append(accountIdsToRemoveBatches, accountIdsToRemoveBatch) - accountIdsToRemoveBatch = make([]string, 0, SSM_DOCUMENT_PERMISSIONS_BATCH_LIMIT) - } - accountIdsToRemoveBatch = append(accountIdsToRemoveBatch, accountId.(string)) - } - accountIdsToRemoveBatches = append(accountIdsToRemoveBatches, accountIdsToRemoveBatch) - - for _, accountIdsToRemove := range accountIdsToRemoveBatches { - _, err := conn.ModifyDocumentPermission(&ssm.ModifyDocumentPermissionInput{ - Name: aws.String(name), - PermissionType: aws.String("Share"), - AccountIdsToRemove: aws.StringSlice(accountIdsToRemove), - }) - if err != nil { - return err - } - } - - } - - return nil -} - -func updateAwsSSMDocument(d *schema.ResourceData, meta interface{}) error { - log.Printf("[INFO] Updating SSM Document: %s", d.Id()) - - name := d.Get("name").(string) - - updateDocInput := &ssm.UpdateDocumentInput{ - Name: aws.String(name), - Content: aws.String(d.Get("content").(string)), - DocumentFormat: aws.String(d.Get("document_format").(string)), - DocumentVersion: aws.String(d.Get("default_version").(string)), - } - - newDefaultVersion := d.Get("default_version").(string) - - ssmconn := meta.(*AWSClient).ssmconn - updated, err := ssmconn.UpdateDocument(updateDocInput) - - if isAWSErr(err, "DuplicateDocumentContent", "") { - log.Printf("[DEBUG] Content is a duplicate of the latest version so update is not necessary: %s", d.Id()) - log.Printf("[INFO] Updating the default version to the latest version %s: %s", newDefaultVersion, d.Id()) - - newDefaultVersion = d.Get("latest_version").(string) - } else if err != nil { - return fmt.Errorf("Error updating SSM document: %s", err) - } else { - log.Printf("[INFO] Updating the default version to the new version %s: %s", newDefaultVersion, d.Id()) - newDefaultVersion = *updated.DocumentDescription.DocumentVersion - } - - updateDefaultInput := &ssm.UpdateDocumentDefaultVersionInput{ - Name: aws.String(name), - DocumentVersion: aws.String(newDefaultVersion), - } - - _, err = ssmconn.UpdateDocumentDefaultVersion(updateDefaultInput) - - if err != nil { - return fmt.Errorf("Error updating the default document version to that of the updated document: %s", err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window.go deleted file mode 100644 index 4004b546b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window.go +++ /dev/null @@ -1,204 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSsmMaintenanceWindow() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSsmMaintenanceWindowCreate, - Read: resourceAwsSsmMaintenanceWindowRead, - Update: resourceAwsSsmMaintenanceWindowUpdate, - Delete: resourceAwsSsmMaintenanceWindowDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - - "schedule": { - Type: schema.TypeString, - Required: true, - }, - - "duration": { - Type: schema.TypeInt, - Required: true, - }, - - "cutoff": { - Type: schema.TypeInt, - Required: true, - }, - - "allow_unassociated_targets": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "end_date": { - Type: schema.TypeString, - Optional: true, - }, - - "schedule_timezone": { - Type: schema.TypeString, - Optional: true, - }, - - "start_date": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsSsmMaintenanceWindowCreate(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - params := &ssm.CreateMaintenanceWindowInput{ - AllowUnassociatedTargets: aws.Bool(d.Get("allow_unassociated_targets").(bool)), - Cutoff: aws.Int64(int64(d.Get("cutoff").(int))), - Duration: aws.Int64(int64(d.Get("duration").(int))), - Name: aws.String(d.Get("name").(string)), - Schedule: aws.String(d.Get("schedule").(string)), - } - - if v, ok := d.GetOk("end_date"); ok { - params.EndDate = aws.String(v.(string)) - } - - if v, ok := d.GetOk("schedule_timezone"); ok { - params.ScheduleTimezone = aws.String(v.(string)) - } - - if v, ok := d.GetOk("start_date"); ok { - params.StartDate = aws.String(v.(string)) - } - - resp, err := ssmconn.CreateMaintenanceWindow(params) - if err != nil { - return fmt.Errorf("error creating SSM Maintenance Window: %s", err) - } - - d.SetId(*resp.WindowId) - - if !d.Get("enabled").(bool) { - input := &ssm.UpdateMaintenanceWindowInput{ - Enabled: aws.Bool(false), - WindowId: aws.String(d.Id()), - } - - _, err := ssmconn.UpdateMaintenanceWindow(input) - if err != nil { - return fmt.Errorf("error disabling SSM Maintenance Window (%s): %s", d.Id(), err) - } - } - - return resourceAwsSsmMaintenanceWindowRead(d, meta) -} - -func resourceAwsSsmMaintenanceWindowUpdate(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - // Replace must be set otherwise its not possible to remove optional attributes, e.g. - // ValidationException: 1 validation error detected: Value '' at 'startDate' failed to satisfy constraint: Member must have length greater than or equal to 1 - params := &ssm.UpdateMaintenanceWindowInput{ - AllowUnassociatedTargets: aws.Bool(d.Get("allow_unassociated_targets").(bool)), - Cutoff: aws.Int64(int64(d.Get("cutoff").(int))), - Duration: aws.Int64(int64(d.Get("duration").(int))), - Enabled: aws.Bool(d.Get("enabled").(bool)), - Name: aws.String(d.Get("name").(string)), - Replace: aws.Bool(true), - Schedule: aws.String(d.Get("schedule").(string)), - WindowId: aws.String(d.Id()), - } - - if v, ok := d.GetOk("end_date"); ok { - params.EndDate = aws.String(v.(string)) - } - - if v, ok := d.GetOk("schedule_timezone"); ok { - params.ScheduleTimezone = aws.String(v.(string)) - } - - if v, ok := d.GetOk("start_date"); ok { - params.StartDate = aws.String(v.(string)) - } - - _, err := ssmconn.UpdateMaintenanceWindow(params) - if err != nil { - if isAWSErr(err, ssm.ErrCodeDoesNotExistException, "") { - log.Printf("[WARN] Maintenance Window %s not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error updating SSM Maintenance Window (%s): %s", d.Id(), err) - } - - return resourceAwsSsmMaintenanceWindowRead(d, meta) -} - -func resourceAwsSsmMaintenanceWindowRead(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - params := &ssm.GetMaintenanceWindowInput{ - WindowId: aws.String(d.Id()), - } - - resp, err := ssmconn.GetMaintenanceWindow(params) - if err != nil { - if isAWSErr(err, ssm.ErrCodeDoesNotExistException, "") { - log.Printf("[WARN] Maintenance Window %s not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading SSM Maintenance Window (%s): %s", d.Id(), err) - } - - d.Set("allow_unassociated_targets", resp.AllowUnassociatedTargets) - d.Set("cutoff", resp.Cutoff) - d.Set("duration", resp.Duration) - d.Set("enabled", resp.Enabled) - d.Set("end_date", resp.EndDate) - d.Set("name", resp.Name) - d.Set("schedule_timezone", resp.ScheduleTimezone) - d.Set("schedule", resp.Schedule) - d.Set("start_date", resp.StartDate) - - return nil -} - -func resourceAwsSsmMaintenanceWindowDelete(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[INFO] Deleting SSM Maintenance Window: %s", d.Id()) - - params := &ssm.DeleteMaintenanceWindowInput{ - WindowId: aws.String(d.Id()), - } - - _, err := ssmconn.DeleteMaintenanceWindow(params) - if err != nil { - return fmt.Errorf("error deleting SSM Maintenance Window (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_target.go deleted file mode 100644 index e4f1a0c7b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_target.go +++ /dev/null @@ -1,165 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSsmMaintenanceWindowTarget() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSsmMaintenanceWindowTargetCreate, - Read: resourceAwsSsmMaintenanceWindowTargetRead, - Update: resourceAwsSsmMaintenanceWindowTargetUpdate, - Delete: resourceAwsSsmMaintenanceWindowTargetDelete, - - Schema: map[string]*schema.Schema{ - "window_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "resource_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "targets": { - Type: schema.TypeList, - Required: true, - MaxItems: 5, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key": { - Type: schema.TypeString, - Required: true, - }, - "values": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - - "owner_information": { - Type: schema.TypeString, - Optional: true, - }, - }, - } -} - -func resourceAwsSsmMaintenanceWindowTargetCreate(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[INFO] Registering SSM Maintenance Window Target") - - params := &ssm.RegisterTargetWithMaintenanceWindowInput{ - WindowId: aws.String(d.Get("window_id").(string)), - ResourceType: aws.String(d.Get("resource_type").(string)), - Targets: expandAwsSsmTargets(d.Get("targets").([]interface{})), - } - - if v, ok := d.GetOk("owner_information"); ok { - params.OwnerInformation = aws.String(v.(string)) - } - - resp, err := ssmconn.RegisterTargetWithMaintenanceWindow(params) - if err != nil { - return err - } - - d.SetId(*resp.WindowTargetId) - - return resourceAwsSsmMaintenanceWindowTargetRead(d, meta) -} - -func resourceAwsSsmMaintenanceWindowTargetRead(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - params := &ssm.DescribeMaintenanceWindowTargetsInput{ - WindowId: aws.String(d.Get("window_id").(string)), - Filters: []*ssm.MaintenanceWindowFilter{ - { - Key: aws.String("WindowTargetId"), - Values: []*string{aws.String(d.Id())}, - }, - }, - } - - resp, err := ssmconn.DescribeMaintenanceWindowTargets(params) - if err != nil { - return err - } - - found := false - for _, t := range resp.Targets { - if *t.WindowTargetId == d.Id() { - found = true - - d.Set("owner_information", t.OwnerInformation) - d.Set("window_id", t.WindowId) - d.Set("resource_type", t.ResourceType) - - if err := d.Set("targets", flattenAwsSsmTargets(t.Targets)); err != nil { - return fmt.Errorf("Error setting targets error: %#v", err) - } - } - } - - if !found { - log.Printf("[INFO] Maintenance Window Target not found. Removing from state") - d.SetId("") - return nil - } - - return nil -} - -func resourceAwsSsmMaintenanceWindowTargetUpdate(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[INFO] Updating SSM Maintenance Window Target: %s", d.Id()) - - params := &ssm.UpdateMaintenanceWindowTargetInput{ - Targets: expandAwsSsmTargets(d.Get("targets").([]interface{})), - WindowId: aws.String(d.Get("window_id").(string)), - WindowTargetId: aws.String(d.Id()), - } - - if d.HasChange("owner_information") { - params.OwnerInformation = aws.String(d.Get("owner_information").(string)) - } - - _, err := ssmconn.UpdateMaintenanceWindowTarget(params) - if err != nil { - return fmt.Errorf("error updating SSM Maintenance Window Target (%s): %s", d.Id(), err) - } - - return nil -} - -func resourceAwsSsmMaintenanceWindowTargetDelete(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[INFO] Deregistering SSM Maintenance Window Target: %s", d.Id()) - - params := &ssm.DeregisterTargetFromMaintenanceWindowInput{ - WindowId: aws.String(d.Get("window_id").(string)), - WindowTargetId: aws.String(d.Id()), - } - - _, err := ssmconn.DeregisterTargetFromMaintenanceWindow(params) - if err != nil { - return fmt.Errorf("error deregistering SSM Maintenance Window Target (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go deleted file mode 100644 index 414f7099f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go +++ /dev/null @@ -1,307 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSsmMaintenanceWindowTask() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSsmMaintenanceWindowTaskCreate, - Read: resourceAwsSsmMaintenanceWindowTaskRead, - Delete: resourceAwsSsmMaintenanceWindowTaskDelete, - - Schema: map[string]*schema.Schema{ - "window_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "max_concurrency": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "max_errors": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "task_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "task_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "service_role_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "targets": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "values": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - - "name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateAwsSSMMaintenanceWindowTaskName, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(3, 128), - }, - - "priority": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - - "logging_info": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "s3_bucket_name": { - Type: schema.TypeString, - Required: true, - }, - "s3_region": { - Type: schema.TypeString, - Required: true, - }, - "s3_bucket_prefix": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - - "task_parameters": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "values": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - }, - } -} - -func expandAwsSsmMaintenanceWindowLoggingInfo(config []interface{}) *ssm.LoggingInfo { - - loggingConfig := config[0].(map[string]interface{}) - - loggingInfo := &ssm.LoggingInfo{ - S3BucketName: aws.String(loggingConfig["s3_bucket_name"].(string)), - S3Region: aws.String(loggingConfig["s3_region"].(string)), - } - - if s := loggingConfig["s3_bucket_prefix"].(string); s != "" { - loggingInfo.S3KeyPrefix = aws.String(s) - } - - return loggingInfo -} - -func flattenAwsSsmMaintenanceWindowLoggingInfo(loggingInfo *ssm.LoggingInfo) []interface{} { - - result := make(map[string]interface{}) - result["s3_bucket_name"] = *loggingInfo.S3BucketName - result["s3_region"] = *loggingInfo.S3Region - - if loggingInfo.S3KeyPrefix != nil { - result["s3_bucket_prefix"] = *loggingInfo.S3KeyPrefix - } - - return []interface{}{result} -} - -func expandAwsSsmTaskParameters(config []interface{}) map[string]*ssm.MaintenanceWindowTaskParameterValueExpression { - params := make(map[string]*ssm.MaintenanceWindowTaskParameterValueExpression) - for _, v := range config { - paramConfig := v.(map[string]interface{}) - params[paramConfig["name"].(string)] = &ssm.MaintenanceWindowTaskParameterValueExpression{ - Values: expandStringList(paramConfig["values"].([]interface{})), - } - } - return params -} - -func flattenAwsSsmTaskParameters(taskParameters map[string]*ssm.MaintenanceWindowTaskParameterValueExpression) []interface{} { - result := make([]interface{}, 0, len(taskParameters)) - for k, v := range taskParameters { - taskParam := map[string]interface{}{ - "name": k, - "values": flattenStringList(v.Values), - } - result = append(result, taskParam) - } - - return result -} - -func resourceAwsSsmMaintenanceWindowTaskCreate(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[INFO] Registering SSM Maintenance Window Task") - - params := &ssm.RegisterTaskWithMaintenanceWindowInput{ - WindowId: aws.String(d.Get("window_id").(string)), - MaxConcurrency: aws.String(d.Get("max_concurrency").(string)), - MaxErrors: aws.String(d.Get("max_errors").(string)), - TaskType: aws.String(d.Get("task_type").(string)), - ServiceRoleArn: aws.String(d.Get("service_role_arn").(string)), - TaskArn: aws.String(d.Get("task_arn").(string)), - Name: aws.String(d.Get("name").(string)), - Description: aws.String(d.Get("description").(string)), - Targets: expandAwsSsmTargets(d.Get("targets").([]interface{})), - } - - if v, ok := d.GetOk("priority"); ok { - params.Priority = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("logging_info"); ok { - params.LoggingInfo = expandAwsSsmMaintenanceWindowLoggingInfo(v.([]interface{})) - } - - if v, ok := d.GetOk("task_parameters"); ok { - params.TaskParameters = expandAwsSsmTaskParameters(v.([]interface{})) - } - - resp, err := ssmconn.RegisterTaskWithMaintenanceWindow(params) - if err != nil { - return err - } - - d.SetId(*resp.WindowTaskId) - - return resourceAwsSsmMaintenanceWindowTaskRead(d, meta) -} - -func resourceAwsSsmMaintenanceWindowTaskRead(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - params := &ssm.DescribeMaintenanceWindowTasksInput{ - WindowId: aws.String(d.Get("window_id").(string)), - } - - resp, err := ssmconn.DescribeMaintenanceWindowTasks(params) - if err != nil { - return err - } - - found := false - for _, t := range resp.Tasks { - if *t.WindowTaskId == d.Id() { - found = true - - d.Set("window_id", t.WindowId) - d.Set("max_concurrency", t.MaxConcurrency) - d.Set("max_errors", t.MaxErrors) - d.Set("task_type", t.Type) - d.Set("service_role_arn", t.ServiceRoleArn) - d.Set("task_arn", t.TaskArn) - d.Set("priority", t.Priority) - d.Set("name", t.Name) - d.Set("description", t.Description) - - if t.LoggingInfo != nil { - if err := d.Set("logging_info", flattenAwsSsmMaintenanceWindowLoggingInfo(t.LoggingInfo)); err != nil { - return fmt.Errorf("Error setting logging_info error: %#v", err) - } - } - - if t.TaskParameters != nil { - if err := d.Set("task_parameters", flattenAwsSsmTaskParameters(t.TaskParameters)); err != nil { - return fmt.Errorf("Error setting task_parameters error: %#v", err) - } - } - - if err := d.Set("targets", flattenAwsSsmTargets(t.Targets)); err != nil { - return fmt.Errorf("Error setting targets error: %#v", err) - } - } - } - - if !found { - log.Printf("[INFO] Maintenance Window Target not found. Removing from state") - d.SetId("") - return nil - } - - return nil -} - -func resourceAwsSsmMaintenanceWindowTaskDelete(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[INFO] Deregistering SSM Maintenance Window Task: %s", d.Id()) - - params := &ssm.DeregisterTaskFromMaintenanceWindowInput{ - WindowId: aws.String(d.Get("window_id").(string)), - WindowTaskId: aws.String(d.Id()), - } - - _, err := ssmconn.DeregisterTaskFromMaintenanceWindow(params) - if err != nil { - return fmt.Errorf("error deregistering SSM Maintenance Window Task (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go deleted file mode 100644 index d2094a8b2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go +++ /dev/null @@ -1,214 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsSsmParameter() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSsmParameterPut, - Read: resourceAwsSsmParameterRead, - Update: resourceAwsSsmParameterPut, - Delete: resourceAwsSsmParameterDelete, - Exists: resourceAwsSmmParameterExists, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - ssm.ParameterTypeString, - ssm.ParameterTypeStringList, - ssm.ParameterTypeSecureString, - }, false), - }, - "value": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - }, - "arn": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "key_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "overwrite": { - Type: schema.TypeBool, - Optional: true, - }, - "allowed_pattern": { - Type: schema.TypeString, - Optional: true, - }, - "tags": tagsSchema(), - }, - } -} - -func resourceAwsSmmParameterExists(d *schema.ResourceData, meta interface{}) (bool, error) { - ssmconn := meta.(*AWSClient).ssmconn - _, err := ssmconn.GetParameter(&ssm.GetParameterInput{ - Name: aws.String(d.Id()), - WithDecryption: aws.Bool(false), - }) - if err != nil { - if isAWSErr(err, ssm.ErrCodeParameterNotFound, "") { - return false, nil - } - return false, err - } - - return true, nil -} - -func resourceAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[DEBUG] Reading SSM Parameter: %s", d.Id()) - - resp, err := ssmconn.GetParameter(&ssm.GetParameterInput{ - Name: aws.String(d.Id()), - WithDecryption: aws.Bool(true), - }) - if err != nil { - return fmt.Errorf("error getting SSM parameter: %s", err) - } - - param := resp.Parameter - d.Set("name", param.Name) - d.Set("type", param.Type) - d.Set("value", param.Value) - - describeParamsInput := &ssm.DescribeParametersInput{ - ParameterFilters: []*ssm.ParameterStringFilter{ - { - Key: aws.String("Name"), - Option: aws.String("Equals"), - Values: []*string{aws.String(d.Get("name").(string))}, - }, - }, - } - describeResp, err := ssmconn.DescribeParameters(describeParamsInput) - if err != nil { - return fmt.Errorf("error describing SSM parameter: %s", err) - } - - if describeResp == nil || len(describeResp.Parameters) == 0 || describeResp.Parameters[0] == nil { - log.Printf("[WARN] SSM Parameter %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - detail := describeResp.Parameters[0] - d.Set("key_id", detail.KeyId) - d.Set("description", detail.Description) - d.Set("allowed_pattern", detail.AllowedPattern) - - if tagList, err := ssmconn.ListTagsForResource(&ssm.ListTagsForResourceInput{ - ResourceId: aws.String(d.Get("name").(string)), - ResourceType: aws.String("Parameter"), - }); err != nil { - return fmt.Errorf("Failed to get SSM parameter tags for %s: %s", d.Get("name"), err) - } else { - d.Set("tags", tagsToMapSSM(tagList.TagList)) - } - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "ssm", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("parameter/%s", strings.TrimPrefix(d.Id(), "/")), - } - d.Set("arn", arn.String()) - - return nil -} - -func resourceAwsSsmParameterDelete(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[INFO] Deleting SSM Parameter: %s", d.Id()) - - _, err := ssmconn.DeleteParameter(&ssm.DeleteParameterInput{ - Name: aws.String(d.Get("name").(string)), - }) - if err != nil { - return fmt.Errorf("error deleting SSM Parameter (%s): %s", d.Id(), err) - } - - return nil -} - -func resourceAwsSsmParameterPut(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[INFO] Creating SSM Parameter: %s", d.Get("name").(string)) - - paramInput := &ssm.PutParameterInput{ - Name: aws.String(d.Get("name").(string)), - Type: aws.String(d.Get("type").(string)), - Value: aws.String(d.Get("value").(string)), - Overwrite: aws.Bool(shouldUpdateSsmParameter(d)), - AllowedPattern: aws.String(d.Get("allowed_pattern").(string)), - } - - if d.HasChange("description") { - _, n := d.GetChange("description") - paramInput.Description = aws.String(n.(string)) - } - - if keyID, ok := d.GetOk("key_id"); ok { - log.Printf("[DEBUG] Setting key_id for SSM Parameter %v: %s", d.Get("name"), keyID) - paramInput.SetKeyId(keyID.(string)) - } - - log.Printf("[DEBUG] Waiting for SSM Parameter %v to be updated", d.Get("name")) - if _, err := ssmconn.PutParameter(paramInput); err != nil { - return fmt.Errorf("error creating SSM parameter: %s", err) - } - - if err := setTagsSSM(ssmconn, d, d.Get("name").(string), "Parameter"); err != nil { - return fmt.Errorf("error creating SSM parameter tags: %s", err) - } - - d.SetId(d.Get("name").(string)) - - return resourceAwsSsmParameterRead(d, meta) -} - -func shouldUpdateSsmParameter(d *schema.ResourceData) bool { - // If the user has specified a preference, return their preference - if value, ok := d.GetOkExists("overwrite"); ok { - return value.(bool) - } - - // Since the user has not specified a preference, obey lifecycle rules - // if it is not a new resource, otherwise overwrite should be set to false. - return !d.IsNewResource() -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go deleted file mode 100644 index 8311437e5..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go +++ /dev/null @@ -1,380 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -var ssmPatchComplianceLevels = []string{ - ssm.PatchComplianceLevelCritical, - ssm.PatchComplianceLevelHigh, - ssm.PatchComplianceLevelMedium, - ssm.PatchComplianceLevelLow, - ssm.PatchComplianceLevelInformational, - ssm.PatchComplianceLevelUnspecified, -} - -var ssmPatchOSs = []string{ - ssm.OperatingSystemWindows, - ssm.OperatingSystemAmazonLinux, - ssm.OperatingSystemUbuntu, - ssm.OperatingSystemRedhatEnterpriseLinux, - ssm.OperatingSystemCentos, - ssm.OperatingSystemAmazonLinux2, - ssm.OperatingSystemSuse, -} - -func resourceAwsSsmPatchBaseline() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSsmPatchBaselineCreate, - Read: resourceAwsSsmPatchBaselineRead, - Update: resourceAwsSsmPatchBaselineUpdate, - Delete: resourceAwsSsmPatchBaselineDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - - "description": { - Type: schema.TypeString, - Optional: true, - }, - - "global_filter": { - Type: schema.TypeList, - Optional: true, - MaxItems: 4, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key": { - Type: schema.TypeString, - Required: true, - }, - "values": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - - "approval_rule": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "approve_after_days": { - Type: schema.TypeInt, - Required: true, - }, - - "compliance_level": { - Type: schema.TypeString, - Optional: true, - Default: ssm.PatchComplianceLevelUnspecified, - ValidateFunc: validation.StringInSlice(ssmPatchComplianceLevels, false), - }, - - "enable_non_security": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "patch_filter": { - Type: schema.TypeList, - Required: true, - MaxItems: 10, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key": { - Type: schema.TypeString, - Required: true, - }, - "values": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - }, - }, - }, - - "approved_patches": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "rejected_patches": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - - "operating_system": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: ssm.OperatingSystemWindows, - ValidateFunc: validation.StringInSlice(ssmPatchOSs, false), - }, - - "approved_patches_compliance_level": { - Type: schema.TypeString, - Optional: true, - Default: ssm.PatchComplianceLevelUnspecified, - ValidateFunc: validation.StringInSlice(ssmPatchComplianceLevels, false), - }, - }, - } -} - -func resourceAwsSsmPatchBaselineCreate(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - params := &ssm.CreatePatchBaselineInput{ - Name: aws.String(d.Get("name").(string)), - ApprovedPatchesComplianceLevel: aws.String(d.Get("approved_patches_compliance_level").(string)), - OperatingSystem: aws.String(d.Get("operating_system").(string)), - } - - if v, ok := d.GetOk("description"); ok { - params.Description = aws.String(v.(string)) - } - - if v, ok := d.GetOk("approved_patches"); ok && v.(*schema.Set).Len() > 0 { - params.ApprovedPatches = expandStringList(v.(*schema.Set).List()) - } - - if v, ok := d.GetOk("rejected_patches"); ok && v.(*schema.Set).Len() > 0 { - params.RejectedPatches = expandStringList(v.(*schema.Set).List()) - } - - if _, ok := d.GetOk("global_filter"); ok { - params.GlobalFilters = expandAwsSsmPatchFilterGroup(d) - } - - if _, ok := d.GetOk("approval_rule"); ok { - params.ApprovalRules = expandAwsSsmPatchRuleGroup(d) - } - - resp, err := ssmconn.CreatePatchBaseline(params) - if err != nil { - return err - } - - d.SetId(*resp.BaselineId) - return resourceAwsSsmPatchBaselineRead(d, meta) -} - -func resourceAwsSsmPatchBaselineUpdate(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - params := &ssm.UpdatePatchBaselineInput{ - BaselineId: aws.String(d.Id()), - } - - if d.HasChange("name") { - params.Name = aws.String(d.Get("name").(string)) - } - - if d.HasChange("description") { - params.Description = aws.String(d.Get("description").(string)) - } - - if d.HasChange("approved_patches") { - params.ApprovedPatches = expandStringList(d.Get("approved_patches").(*schema.Set).List()) - } - - if d.HasChange("rejected_patches") { - params.RejectedPatches = expandStringList(d.Get("rejected_patches").(*schema.Set).List()) - } - - if d.HasChange("approved_patches_compliance_level") { - params.ApprovedPatchesComplianceLevel = aws.String(d.Get("approved_patches_compliance_level").(string)) - } - - if d.HasChange("approval_rule") { - params.ApprovalRules = expandAwsSsmPatchRuleGroup(d) - } - - if d.HasChange("global_filter") { - params.GlobalFilters = expandAwsSsmPatchFilterGroup(d) - } - - _, err := ssmconn.UpdatePatchBaseline(params) - if err != nil { - if isAWSErr(err, ssm.ErrCodeDoesNotExistException, "") { - log.Printf("[WARN] Patch Baseline %s not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - return resourceAwsSsmPatchBaselineRead(d, meta) -} -func resourceAwsSsmPatchBaselineRead(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - params := &ssm.GetPatchBaselineInput{ - BaselineId: aws.String(d.Id()), - } - - resp, err := ssmconn.GetPatchBaseline(params) - if err != nil { - if isAWSErr(err, ssm.ErrCodeDoesNotExistException, "") { - log.Printf("[WARN] Patch Baseline %s not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("name", resp.Name) - d.Set("description", resp.Description) - d.Set("operating_system", resp.OperatingSystem) - d.Set("approved_patches_compliance_level", resp.ApprovedPatchesComplianceLevel) - d.Set("approved_patches", flattenStringList(resp.ApprovedPatches)) - d.Set("rejected_patches", flattenStringList(resp.RejectedPatches)) - - if err := d.Set("global_filter", flattenAwsSsmPatchFilterGroup(resp.GlobalFilters)); err != nil { - return fmt.Errorf("Error setting global filters error: %#v", err) - } - - if err := d.Set("approval_rule", flattenAwsSsmPatchRuleGroup(resp.ApprovalRules)); err != nil { - return fmt.Errorf("Error setting approval rules error: %#v", err) - } - - return nil -} - -func resourceAwsSsmPatchBaselineDelete(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[INFO] Deleting SSM Patch Baseline: %s", d.Id()) - - params := &ssm.DeletePatchBaselineInput{ - BaselineId: aws.String(d.Id()), - } - - _, err := ssmconn.DeletePatchBaseline(params) - if err != nil { - return fmt.Errorf("error deleting SSM Patch Baseline (%s): %s", d.Id(), err) - } - - return nil -} - -func expandAwsSsmPatchFilterGroup(d *schema.ResourceData) *ssm.PatchFilterGroup { - var filters []*ssm.PatchFilter - - filterConfig := d.Get("global_filter").([]interface{}) - - for _, fConfig := range filterConfig { - config := fConfig.(map[string]interface{}) - - filter := &ssm.PatchFilter{ - Key: aws.String(config["key"].(string)), - Values: expandStringList(config["values"].([]interface{})), - } - - filters = append(filters, filter) - } - - return &ssm.PatchFilterGroup{ - PatchFilters: filters, - } -} - -func flattenAwsSsmPatchFilterGroup(group *ssm.PatchFilterGroup) []map[string]interface{} { - if len(group.PatchFilters) == 0 { - return nil - } - - result := make([]map[string]interface{}, 0, len(group.PatchFilters)) - - for _, filter := range group.PatchFilters { - f := make(map[string]interface{}) - f["key"] = *filter.Key - f["values"] = flattenStringList(filter.Values) - - result = append(result, f) - } - - return result -} - -func expandAwsSsmPatchRuleGroup(d *schema.ResourceData) *ssm.PatchRuleGroup { - var rules []*ssm.PatchRule - - ruleConfig := d.Get("approval_rule").([]interface{}) - - for _, rConfig := range ruleConfig { - rCfg := rConfig.(map[string]interface{}) - - var filters []*ssm.PatchFilter - filterConfig := rCfg["patch_filter"].([]interface{}) - - for _, fConfig := range filterConfig { - fCfg := fConfig.(map[string]interface{}) - - filter := &ssm.PatchFilter{ - Key: aws.String(fCfg["key"].(string)), - Values: expandStringList(fCfg["values"].([]interface{})), - } - - filters = append(filters, filter) - } - - filterGroup := &ssm.PatchFilterGroup{ - PatchFilters: filters, - } - - rule := &ssm.PatchRule{ - ApproveAfterDays: aws.Int64(int64(rCfg["approve_after_days"].(int))), - PatchFilterGroup: filterGroup, - ComplianceLevel: aws.String(rCfg["compliance_level"].(string)), - EnableNonSecurity: aws.Bool(rCfg["enable_non_security"].(bool)), - } - - rules = append(rules, rule) - } - - return &ssm.PatchRuleGroup{ - PatchRules: rules, - } -} - -func flattenAwsSsmPatchRuleGroup(group *ssm.PatchRuleGroup) []map[string]interface{} { - if len(group.PatchRules) == 0 { - return nil - } - - result := make([]map[string]interface{}, 0, len(group.PatchRules)) - - for _, rule := range group.PatchRules { - r := make(map[string]interface{}) - r["approve_after_days"] = *rule.ApproveAfterDays - r["compliance_level"] = *rule.ComplianceLevel - r["enable_non_security"] = *rule.EnableNonSecurity - r["patch_filter"] = flattenAwsSsmPatchFilterGroup(rule.PatchFilterGroup) - result = append(result, r) - } - - return result -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_group.go deleted file mode 100644 index 3489a3c2b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_group.go +++ /dev/null @@ -1,96 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSsmPatchGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSsmPatchGroupCreate, - Read: resourceAwsSsmPatchGroupRead, - Delete: resourceAwsSsmPatchGroupDelete, - - Schema: map[string]*schema.Schema{ - "baseline_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "patch_group": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsSsmPatchGroupCreate(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - params := &ssm.RegisterPatchBaselineForPatchGroupInput{ - BaselineId: aws.String(d.Get("baseline_id").(string)), - PatchGroup: aws.String(d.Get("patch_group").(string)), - } - - resp, err := ssmconn.RegisterPatchBaselineForPatchGroup(params) - if err != nil { - return err - } - - d.SetId(*resp.PatchGroup) - return resourceAwsSsmPatchGroupRead(d, meta) -} - -func resourceAwsSsmPatchGroupRead(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - params := &ssm.DescribePatchGroupsInput{} - - resp, err := ssmconn.DescribePatchGroups(params) - if err != nil { - return err - } - - found := false - for _, t := range resp.Mappings { - if *t.PatchGroup == d.Id() { - found = true - - d.Set("patch_group", t.PatchGroup) - d.Set("baseline_id", t.BaselineIdentity.BaselineId) - } - } - - if !found { - log.Printf("[INFO] Patch Group not found. Removing from state") - d.SetId("") - return nil - } - - return nil - -} - -func resourceAwsSsmPatchGroupDelete(d *schema.ResourceData, meta interface{}) error { - ssmconn := meta.(*AWSClient).ssmconn - - log.Printf("[INFO] Deleting SSM Patch Group: %s", d.Id()) - - params := &ssm.DeregisterPatchBaselineForPatchGroupInput{ - BaselineId: aws.String(d.Get("baseline_id").(string)), - PatchGroup: aws.String(d.Get("patch_group").(string)), - } - - _, err := ssmconn.DeregisterPatchBaselineForPatchGroup(params) - if err != nil { - return fmt.Errorf("error deregistering SSM Patch Group (%s): %s", d.Id(), err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_resource_data_sync.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_resource_data_sync.go deleted file mode 100644 index ef4ebbdda..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_resource_data_sync.go +++ /dev/null @@ -1,174 +0,0 @@ -package aws - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSsmResourceDataSync() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSsmResourceDataSyncCreate, - Read: resourceAwsSsmResourceDataSyncRead, - Delete: resourceAwsSsmResourceDataSyncDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "s3_destination": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "kms_key_arn": { - Type: schema.TypeString, - Optional: true, - }, - "bucket_name": { - Type: schema.TypeString, - Required: true, - }, - "prefix": { - Type: schema.TypeString, - Optional: true, - }, - "region": { - Type: schema.TypeString, - Required: true, - }, - "sync_format": { - Type: schema.TypeString, - Optional: true, - Default: ssm.ResourceDataSyncS3FormatJsonSerDe, - }, - }, - }, - }, - }, - } -} - -func resourceAwsSsmResourceDataSyncCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ssmconn - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - input := &ssm.CreateResourceDataSyncInput{ - S3Destination: expandSsmResourceDataSyncS3Destination(d), - SyncName: aws.String(d.Get("name").(string)), - } - _, err := conn.CreateResourceDataSync(input) - if err != nil { - if isAWSErr(err, ssm.ErrCodeResourceDataSyncInvalidConfigurationException, "S3 write failed for bucket") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return err - } - - d.SetId(d.Get("name").(string)) - return resourceAwsSsmResourceDataSyncRead(d, meta) -} - -func resourceAwsSsmResourceDataSyncRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ssmconn - - syncItem, err := findResourceDataSyncItem(conn, d.Id()) - if err != nil { - return err - } - if syncItem == nil { - d.SetId("") - return nil - } - d.Set("name", syncItem.SyncName) - d.Set("s3_destination", flattenSsmResourceDataSyncS3Destination(syncItem.S3Destination)) - return nil -} - -func resourceAwsSsmResourceDataSyncDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ssmconn - - input := &ssm.DeleteResourceDataSyncInput{ - SyncName: aws.String(d.Get("name").(string)), - } - - _, err := conn.DeleteResourceDataSync(input) - if err != nil { - if isAWSErr(err, ssm.ErrCodeResourceDataSyncNotFoundException, "") { - return nil - } - return err - } - return nil -} - -func findResourceDataSyncItem(conn *ssm.SSM, name string) (*ssm.ResourceDataSyncItem, error) { - nextToken := "" - for { - input := &ssm.ListResourceDataSyncInput{} - if nextToken != "" { - input.NextToken = aws.String(nextToken) - } - resp, err := conn.ListResourceDataSync(input) - if err != nil { - return nil, err - } - for _, v := range resp.ResourceDataSyncItems { - if *v.SyncName == name { - return v, nil - } - } - if resp.NextToken == nil { - break - } - nextToken = *resp.NextToken - } - return nil, nil -} - -func flattenSsmResourceDataSyncS3Destination(dest *ssm.ResourceDataSyncS3Destination) []interface{} { - result := make(map[string]interface{}) - result["bucket_name"] = *dest.BucketName - result["region"] = *dest.Region - result["sync_format"] = *dest.SyncFormat - if dest.AWSKMSKeyARN != nil { - result["kms_key_arn"] = *dest.AWSKMSKeyARN - } - if dest.Prefix != nil { - result["prefix"] = *dest.Prefix - } - return []interface{}{result} -} - -func expandSsmResourceDataSyncS3Destination(d *schema.ResourceData) *ssm.ResourceDataSyncS3Destination { - raw := d.Get("s3_destination").([]interface{})[0].(map[string]interface{}) - s3dest := &ssm.ResourceDataSyncS3Destination{ - BucketName: aws.String(raw["bucket_name"].(string)), - Region: aws.String(raw["region"].(string)), - SyncFormat: aws.String(raw["sync_format"].(string)), - } - if v, ok := raw["kms_key_arn"].(string); ok && v != "" { - s3dest.AWSKMSKeyARN = aws.String(v) - } - if v, ok := raw["prefix"].(string); ok && v != "" { - s3dest.Prefix = aws.String(v) - } - return s3dest -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_cache.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_cache.go deleted file mode 100644 index 9ef088ece..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_cache.go +++ /dev/null @@ -1,159 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/storagegateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsStorageGatewayCache() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsStorageGatewayCacheCreate, - Read: resourceAwsStorageGatewayCacheRead, - Delete: schema.Noop, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "disk_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "gateway_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - }, - } -} - -func resourceAwsStorageGatewayCacheCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - diskID := d.Get("disk_id").(string) - gatewayARN := d.Get("gateway_arn").(string) - - input := &storagegateway.AddCacheInput{ - DiskIds: []*string{aws.String(diskID)}, - GatewayARN: aws.String(gatewayARN), - } - - log.Printf("[DEBUG] Adding Storage Gateway cache: %s", input) - _, err := conn.AddCache(input) - if err != nil { - return fmt.Errorf("error adding Storage Gateway cache: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%s", gatewayARN, diskID)) - - // Depending on the Storage Gateway software, it will sometimes relabel a local DiskId - // with a UUID if previously unlabeled, e.g. - // Before conn.AddCache(): "DiskId": "/dev/xvdb", - // After conn.AddCache(): "DiskId": "112764d7-7e83-42ce-9af3-d482985a31cc", - // This prevents us from successfully reading the disk after creation. - // Here we try to refresh the local disks to see if we can find a new DiskId. - - listLocalDisksInput := &storagegateway.ListLocalDisksInput{ - GatewayARN: aws.String(gatewayARN), - } - - log.Printf("[DEBUG] Reading Storage Gateway Local Disk: %s", listLocalDisksInput) - output, err := conn.ListLocalDisks(listLocalDisksInput) - if err != nil { - return fmt.Errorf("error reading Storage Gateway Local Disk: %s", err) - } - - if output != nil { - for _, disk := range output.Disks { - if aws.StringValue(disk.DiskId) == diskID || aws.StringValue(disk.DiskNode) == diskID || aws.StringValue(disk.DiskPath) == diskID { - diskID = aws.StringValue(disk.DiskId) - break - } - } - } - - d.SetId(fmt.Sprintf("%s:%s", gatewayARN, diskID)) - - return resourceAwsStorageGatewayCacheRead(d, meta) -} - -func resourceAwsStorageGatewayCacheRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - gatewayARN, diskID, err := decodeStorageGatewayCacheID(d.Id()) - if err != nil { - return err - } - - input := &storagegateway.DescribeCacheInput{ - GatewayARN: aws.String(gatewayARN), - } - - log.Printf("[DEBUG] Reading Storage Gateway cache: %s", input) - output, err := conn.DescribeCache(input) - if err != nil { - if isAWSErrStorageGatewayGatewayNotFound(err) { - log.Printf("[WARN] Storage Gateway cache %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Storage Gateway cache: %s", err) - } - - if output == nil || len(output.DiskIds) == 0 { - log.Printf("[WARN] Storage Gateway cache %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - found := false - for _, existingDiskID := range output.DiskIds { - if aws.StringValue(existingDiskID) == diskID { - found = true - break - } - } - - if !found { - log.Printf("[WARN] Storage Gateway cache %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("disk_id", diskID) - d.Set("gateway_arn", gatewayARN) - - return nil -} - -func decodeStorageGatewayCacheID(id string) (string, string, error) { - // id = arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0 - idFormatErr := fmt.Errorf("expected ID in form of GatewayARN:DiskId, received: %s", id) - gatewayARNAndDisk, err := arn.Parse(id) - if err != nil { - return "", "", idFormatErr - } - // gatewayARNAndDisk.Resource = gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0 - resourceParts := strings.SplitN(gatewayARNAndDisk.Resource, ":", 2) - if len(resourceParts) != 2 { - return "", "", idFormatErr - } - // resourceParts = ["gateway/sgw-12345678", "pci-0000:03:00.0-scsi-0:0:0:0"] - gatewayARN := &arn.ARN{ - AccountID: gatewayARNAndDisk.AccountID, - Partition: gatewayARNAndDisk.Partition, - Region: gatewayARNAndDisk.Region, - Service: gatewayARNAndDisk.Service, - Resource: resourceParts[0], - } - return gatewayARN.String(), resourceParts[1], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_cached_iscsi_volume.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_cached_iscsi_volume.go deleted file mode 100644 index ff6a18022..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_cached_iscsi_volume.go +++ /dev/null @@ -1,236 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/hashicorp/terraform/helper/resource" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/storagegateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsStorageGatewayCachedIscsiVolume() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsStorageGatewayCachedIscsiVolumeCreate, - Read: resourceAwsStorageGatewayCachedIscsiVolumeRead, - Delete: resourceAwsStorageGatewayCachedIscsiVolumeDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "chap_enabled": { - Type: schema.TypeBool, - Computed: true, - }, - "gateway_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "lun_number": { - Type: schema.TypeInt, - Computed: true, - }, - // Poor API naming: this accepts the IP address of the network interface - "network_interface_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "network_interface_port": { - Type: schema.TypeInt, - Computed: true, - }, - "snapshot_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "source_volume_arn": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "target_arn": { - Type: schema.TypeString, - Computed: true, - }, - "target_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "volume_arn": { - Type: schema.TypeString, - Computed: true, - }, - "volume_id": { - Type: schema.TypeString, - Computed: true, - }, - "volume_size_in_bytes": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsStorageGatewayCachedIscsiVolumeCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - input := &storagegateway.CreateCachediSCSIVolumeInput{ - ClientToken: aws.String(resource.UniqueId()), - GatewayARN: aws.String(d.Get("gateway_arn").(string)), - NetworkInterfaceId: aws.String(d.Get("network_interface_id").(string)), - TargetName: aws.String(d.Get("target_name").(string)), - VolumeSizeInBytes: aws.Int64(int64(d.Get("volume_size_in_bytes").(int))), - } - - if v, ok := d.GetOk("snapshot_id"); ok { - input.SnapshotId = aws.String(v.(string)) - } - - if v, ok := d.GetOk("source_volume_arn"); ok { - input.SourceVolumeARN = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating Storage Gateway cached iSCSI volume: %s", input) - output, err := conn.CreateCachediSCSIVolume(input) - if err != nil { - return fmt.Errorf("error creating Storage Gateway cached iSCSI volume: %s", err) - } - - d.SetId(aws.StringValue(output.VolumeARN)) - - return resourceAwsStorageGatewayCachedIscsiVolumeRead(d, meta) -} - -func resourceAwsStorageGatewayCachedIscsiVolumeRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - input := &storagegateway.DescribeCachediSCSIVolumesInput{ - VolumeARNs: []*string{aws.String(d.Id())}, - } - - log.Printf("[DEBUG] Reading Storage Gateway cached iSCSI volume: %s", input) - output, err := conn.DescribeCachediSCSIVolumes(input) - - if err != nil { - if isAWSErr(err, storagegateway.ErrorCodeVolumeNotFound, "") { - log.Printf("[WARN] Storage Gateway cached iSCSI volume %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Storage Gateway cached iSCSI volume %q: %s", d.Id(), err) - } - - if output == nil || len(output.CachediSCSIVolumes) == 0 || output.CachediSCSIVolumes[0] == nil || aws.StringValue(output.CachediSCSIVolumes[0].VolumeARN) != d.Id() { - log.Printf("[WARN] Storage Gateway cached iSCSI volume %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - volume := output.CachediSCSIVolumes[0] - - d.Set("arn", aws.StringValue(volume.VolumeARN)) - d.Set("snapshot_id", aws.StringValue(volume.SourceSnapshotId)) - d.Set("volume_arn", aws.StringValue(volume.VolumeARN)) - d.Set("volume_id", aws.StringValue(volume.VolumeId)) - d.Set("volume_size_in_bytes", int(aws.Int64Value(volume.VolumeSizeInBytes))) - - if volume.VolumeiSCSIAttributes != nil { - d.Set("chap_enabled", aws.BoolValue(volume.VolumeiSCSIAttributes.ChapEnabled)) - d.Set("lun_number", int(aws.Int64Value(volume.VolumeiSCSIAttributes.LunNumber))) - d.Set("network_interface_id", aws.StringValue(volume.VolumeiSCSIAttributes.NetworkInterfaceId)) - d.Set("network_interface_port", int(aws.Int64Value(volume.VolumeiSCSIAttributes.NetworkInterfacePort))) - - targetARN := aws.StringValue(volume.VolumeiSCSIAttributes.TargetARN) - d.Set("target_arn", targetARN) - - gatewayARN, targetName, err := parseStorageGatewayVolumeGatewayARNAndTargetNameFromARN(targetARN) - if err != nil { - return fmt.Errorf("error parsing Storage Gateway volume gateway ARN and target name from target ARN %q: %s", targetARN, err) - } - d.Set("gateway_arn", gatewayARN) - d.Set("target_name", targetName) - } - - return nil -} - -func resourceAwsStorageGatewayCachedIscsiVolumeDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - input := &storagegateway.DeleteVolumeInput{ - VolumeARN: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting Storage Gateway cached iSCSI volume: %s", input) - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteVolume(input) - if err != nil { - if isAWSErr(err, storagegateway.ErrorCodeVolumeNotFound, "") { - return nil - } - // InvalidGatewayRequestException: The specified gateway is not connected. - // Can occur during concurrent DeleteVolume operations - if isAWSErr(err, storagegateway.ErrCodeInvalidGatewayRequestException, "The specified gateway is not connected") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return fmt.Errorf("error deleting Storage Gateway cached iSCSI volume %q: %s", d.Id(), err) - } - - return nil -} - -func parseStorageGatewayVolumeGatewayARNAndTargetNameFromARN(inputARN string) (string, string, error) { - // inputARN = arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:TargetName - targetARN, err := arn.Parse(inputARN) - if err != nil { - return "", "", err - } - // We need to get: - // * The Gateway ARN portion of the target ARN resource (gateway/sgw-12A3456B) - // * The target name portion of the target ARN resource (TargetName) - // First, let's split up the resource of the target ARN - // targetARN.Resource = gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:TargetName - expectedFormatErr := fmt.Errorf("expected resource format gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:TargetName, received: %s", targetARN.Resource) - resourceParts := strings.SplitN(targetARN.Resource, "/", 4) - if len(resourceParts) != 4 { - return "", "", expectedFormatErr - } - gatewayARN := arn.ARN{ - AccountID: targetARN.AccountID, - Partition: targetARN.Partition, - Region: targetARN.Region, - Resource: fmt.Sprintf("%s/%s", resourceParts[0], resourceParts[1]), - Service: targetARN.Service, - }.String() - // Second, let's split off the target name from the initiator name - // resourceParts[3] = iqn.1997-05.com.amazon:TargetName - initiatorParts := strings.SplitN(resourceParts[3], ":", 2) - if len(initiatorParts) != 2 { - return "", "", expectedFormatErr - } - targetName := initiatorParts[1] - return gatewayARN, targetName, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_gateway.go deleted file mode 100644 index f16794685..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_gateway.go +++ /dev/null @@ -1,443 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "net" - "net/http" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/storagegateway" - "github.com/hashicorp/terraform/helper/customdiff" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsStorageGatewayGateway() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsStorageGatewayGatewayCreate, - Read: resourceAwsStorageGatewayGatewayRead, - Update: resourceAwsStorageGatewayGatewayUpdate, - Delete: resourceAwsStorageGatewayGatewayDelete, - CustomizeDiff: customdiff.Sequence( - customdiff.ForceNewIfChange("smb_active_directory_settings", func(old, new, meta interface{}) bool { - return len(old.([]interface{})) == 1 && len(new.([]interface{})) == 0 - }), - ), - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "activation_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"gateway_ip_address"}, - }, - "gateway_id": { - Type: schema.TypeString, - Computed: true, - }, - "gateway_ip_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"activation_key"}, - }, - "gateway_name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.NoZeroValues, - }, - "gateway_timezone": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.NoZeroValues, - }, - "gateway_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "STORED", - ValidateFunc: validation.StringInSlice([]string{ - "CACHED", - "FILE_S3", - "STORED", - "VTL", - }, false), - }, - "medium_changer_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - "AWS-Gateway-VTL", - "STK-L700", - }, false), - }, - "smb_active_directory_settings": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "domain_name": { - Type: schema.TypeString, - Required: true, - }, - "password": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - }, - "username": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "smb_guest_password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "tape_drive_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - "IBM-ULT3580-TD5", - }, false), - }, - }, - } -} - -func resourceAwsStorageGatewayGatewayCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - region := meta.(*AWSClient).region - - activationKey := d.Get("activation_key").(string) - gatewayIpAddress := d.Get("gateway_ip_address").(string) - - // Perform one time fetch of activation key from gateway IP address - if activationKey == "" { - if gatewayIpAddress == "" { - return fmt.Errorf("either activation_key or gateway_ip_address must be provided") - } - - client := &http.Client{ - CheckRedirect: func(req *http.Request, via []*http.Request) error { - return http.ErrUseLastResponse - }, - Timeout: time.Second * 10, - } - - requestURL := fmt.Sprintf("http://%s/?activationRegion=%s", gatewayIpAddress, region) - log.Printf("[DEBUG] Creating HTTP request: %s", requestURL) - request, err := http.NewRequest("GET", requestURL, nil) - if err != nil { - return fmt.Errorf("error creating HTTP request: %s", err) - } - - err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - log.Printf("[DEBUG] Making HTTP request: %s", request.URL.String()) - response, err := client.Do(request) - if err != nil { - if err, ok := err.(net.Error); ok { - errMessage := fmt.Errorf("error making HTTP request: %s", err) - log.Printf("[DEBUG] retryable %s", errMessage) - return resource.RetryableError(errMessage) - } - return resource.NonRetryableError(fmt.Errorf("error making HTTP request: %s", err)) - } - - log.Printf("[DEBUG] Received HTTP response: %#v", response) - if response.StatusCode != 302 { - return resource.NonRetryableError(fmt.Errorf("expected HTTP status code 302, received: %d", response.StatusCode)) - } - - redirectURL, err := response.Location() - if err != nil { - return resource.NonRetryableError(fmt.Errorf("error extracting HTTP Location header: %s", err)) - } - - activationKey = redirectURL.Query().Get("activationKey") - - return nil - }) - if err != nil { - return fmt.Errorf("error retrieving activation key from IP Address (%s): %s", gatewayIpAddress, err) - } - if activationKey == "" { - return fmt.Errorf("empty activationKey received from IP Address: %s", gatewayIpAddress) - } - } - - input := &storagegateway.ActivateGatewayInput{ - ActivationKey: aws.String(activationKey), - GatewayRegion: aws.String(region), - GatewayName: aws.String(d.Get("gateway_name").(string)), - GatewayTimezone: aws.String(d.Get("gateway_timezone").(string)), - GatewayType: aws.String(d.Get("gateway_type").(string)), - } - - if v, ok := d.GetOk("medium_changer_type"); ok { - input.MediumChangerType = aws.String(v.(string)) - } - - if v, ok := d.GetOk("tape_drive_type"); ok { - input.TapeDriveType = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Activating Storage Gateway Gateway: %s", input) - output, err := conn.ActivateGateway(input) - if err != nil { - return fmt.Errorf("error activating Storage Gateway Gateway: %s", err) - } - - d.SetId(aws.StringValue(output.GatewayARN)) - - // Gateway activations can take a few minutes - err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - _, err := conn.DescribeGatewayInformation(&storagegateway.DescribeGatewayInformationInput{ - GatewayARN: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, storagegateway.ErrorCodeGatewayNotConnected, "") { - return resource.RetryableError(err) - } - if isAWSErr(err, storagegateway.ErrCodeInvalidGatewayRequestException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - - return nil - }) - if err != nil { - return fmt.Errorf("error waiting for Storage Gateway Gateway activation: %s", err) - } - - if v, ok := d.GetOk("smb_active_directory_settings"); ok && len(v.([]interface{})) > 0 { - m := v.([]interface{})[0].(map[string]interface{}) - - input := &storagegateway.JoinDomainInput{ - DomainName: aws.String(m["domain_name"].(string)), - GatewayARN: aws.String(d.Id()), - Password: aws.String(m["password"].(string)), - UserName: aws.String(m["username"].(string)), - } - - log.Printf("[DEBUG] Storage Gateway Gateway %q joining Active Directory domain: %s", d.Id(), m["domain_name"].(string)) - _, err := conn.JoinDomain(input) - if err != nil { - return fmt.Errorf("error joining Active Directory domain: %s", err) - } - } - - if v, ok := d.GetOk("smb_guest_password"); ok && v.(string) != "" { - input := &storagegateway.SetSMBGuestPasswordInput{ - GatewayARN: aws.String(d.Id()), - Password: aws.String(v.(string)), - } - - log.Printf("[DEBUG] Storage Gateway Gateway %q setting SMB guest password", d.Id()) - _, err := conn.SetSMBGuestPassword(input) - if err != nil { - return fmt.Errorf("error setting SMB guest password: %s", err) - } - } - - return resourceAwsStorageGatewayGatewayRead(d, meta) -} - -func resourceAwsStorageGatewayGatewayRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - input := &storagegateway.DescribeGatewayInformationInput{ - GatewayARN: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading Storage Gateway Gateway: %s", input) - output, err := conn.DescribeGatewayInformation(input) - if err != nil { - if isAWSErrStorageGatewayGatewayNotFound(err) { - log.Printf("[WARN] Storage Gateway Gateway %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Storage Gateway Gateway: %s", err) - } - - smbSettingsInput := &storagegateway.DescribeSMBSettingsInput{ - GatewayARN: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Reading Storage Gateway SMB Settings: %s", smbSettingsInput) - smbSettingsOutput, err := conn.DescribeSMBSettings(smbSettingsInput) - if err != nil && !isAWSErr(err, storagegateway.ErrCodeInvalidGatewayRequestException, "This operation is not valid for the specified gateway") { - if isAWSErrStorageGatewayGatewayNotFound(err) { - log.Printf("[WARN] Storage Gateway Gateway %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Storage Gateway SMB Settings: %s", err) - } - - // The Storage Gateway API currently provides no way to read this value - // We allow Terraform to passthrough the configuration value into the state - d.Set("activation_key", d.Get("activation_key").(string)) - - d.Set("arn", output.GatewayARN) - d.Set("gateway_id", output.GatewayId) - - // The Storage Gateway API currently provides no way to read this value - // We allow Terraform to passthrough the configuration value into the state - d.Set("gateway_ip_address", d.Get("gateway_ip_address").(string)) - - d.Set("gateway_name", output.GatewayName) - d.Set("gateway_timezone", output.GatewayTimezone) - d.Set("gateway_type", output.GatewayType) - - // The Storage Gateway API currently provides no way to read this value - // We allow Terraform to passthrough the configuration value into the state - d.Set("medium_changer_type", d.Get("medium_changer_type").(string)) - - // Treat the entire nested argument as a whole, based on domain name - // to simplify schema and difference logic - if smbSettingsOutput == nil || aws.StringValue(smbSettingsOutput.DomainName) == "" { - if err := d.Set("smb_active_directory_settings", []interface{}{}); err != nil { - return fmt.Errorf("error setting smb_active_directory_settings: %s", err) - } - } else { - m := map[string]interface{}{ - "domain_name": aws.StringValue(smbSettingsOutput.DomainName), - // The Storage Gateway API currently provides no way to read these values - // "password": ..., - // "username": ..., - } - // We must assemble these into the map from configuration or Terraform will enter "" - // into state and constantly show a difference (also breaking downstream references) - // UPDATE: aws_storagegateway_gateway.test - // smb_active_directory_settings.0.password: "" => "" (attribute changed) - // smb_active_directory_settings.0.username: "" => "Administrator" - if v, ok := d.GetOk("smb_active_directory_settings"); ok && len(v.([]interface{})) > 0 { - configM := v.([]interface{})[0].(map[string]interface{}) - m["password"] = configM["password"] - m["username"] = configM["username"] - } - if err := d.Set("smb_active_directory_settings", []map[string]interface{}{m}); err != nil { - return fmt.Errorf("error setting smb_active_directory_settings: %s", err) - } - } - - // The Storage Gateway API currently provides no way to read this value - // We allow Terraform to _automatically_ passthrough the configuration value into the state here - // as the API does clue us in whether or not its actually set at all, - // which can be used to tell Terraform to show a difference in this case - // as well as ensuring there is some sort of attribute value (unlike the others) - if smbSettingsOutput == nil || !aws.BoolValue(smbSettingsOutput.SMBGuestPasswordSet) { - d.Set("smb_guest_password", "") - } - - // The Storage Gateway API currently provides no way to read this value - // We allow Terraform to passthrough the configuration value into the state - d.Set("tape_drive_type", d.Get("tape_drive_type").(string)) - - return nil -} - -func resourceAwsStorageGatewayGatewayUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - if d.HasChange("gateway_name") || d.HasChange("gateway_timezone") { - input := &storagegateway.UpdateGatewayInformationInput{ - GatewayARN: aws.String(d.Id()), - GatewayName: aws.String(d.Get("gateway_name").(string)), - GatewayTimezone: aws.String(d.Get("gateway_timezone").(string)), - } - - log.Printf("[DEBUG] Updating Storage Gateway Gateway: %s", input) - _, err := conn.UpdateGatewayInformation(input) - if err != nil { - return fmt.Errorf("error updating Storage Gateway Gateway: %s", err) - } - } - - if d.HasChange("smb_active_directory_settings") { - l := d.Get("smb_active_directory_settings").([]interface{}) - m := l[0].(map[string]interface{}) - - input := &storagegateway.JoinDomainInput{ - DomainName: aws.String(m["domain_name"].(string)), - GatewayARN: aws.String(d.Id()), - Password: aws.String(m["password"].(string)), - UserName: aws.String(m["username"].(string)), - } - - log.Printf("[DEBUG] Storage Gateway Gateway %q joining Active Directory domain: %s", d.Id(), m["domain_name"].(string)) - _, err := conn.JoinDomain(input) - if err != nil { - return fmt.Errorf("error joining Active Directory domain: %s", err) - } - } - - if d.HasChange("smb_guest_password") { - input := &storagegateway.SetSMBGuestPasswordInput{ - GatewayARN: aws.String(d.Id()), - Password: aws.String(d.Get("smb_guest_password").(string)), - } - - log.Printf("[DEBUG] Storage Gateway Gateway %q setting SMB guest password", d.Id()) - _, err := conn.SetSMBGuestPassword(input) - if err != nil { - return fmt.Errorf("error setting SMB guest password: %s", err) - } - } - - return resourceAwsStorageGatewayGatewayRead(d, meta) -} - -func resourceAwsStorageGatewayGatewayDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - input := &storagegateway.DeleteGatewayInput{ - GatewayARN: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting Storage Gateway Gateway: %s", input) - _, err := conn.DeleteGateway(input) - if err != nil { - if isAWSErrStorageGatewayGatewayNotFound(err) { - return nil - } - return fmt.Errorf("error deleting Storage Gateway Gateway: %s", err) - } - - return nil -} - -// The API returns multiple responses for a missing gateway -func isAWSErrStorageGatewayGatewayNotFound(err error) bool { - if isAWSErr(err, storagegateway.ErrCodeInvalidGatewayRequestException, "The specified gateway was not found.") { - return true - } - if isAWSErr(err, storagegateway.ErrorCodeGatewayNotFound, "") { - return true - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_nfs_file_share.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_nfs_file_share.go deleted file mode 100644 index 4e80b0045..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_nfs_file_share.go +++ /dev/null @@ -1,392 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/storagegateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsStorageGatewayNfsFileShare() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsStorageGatewayNfsFileShareCreate, - Read: resourceAwsStorageGatewayNfsFileShareRead, - Update: resourceAwsStorageGatewayNfsFileShareUpdate, - Delete: resourceAwsStorageGatewayNfsFileShareDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Update: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "client_list": { - Type: schema.TypeSet, - Required: true, - MinItems: 1, - MaxItems: 100, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "default_storage_class": { - Type: schema.TypeString, - Optional: true, - Default: "S3_STANDARD", - ValidateFunc: validation.StringInSlice([]string{ - "S3_ONEZONE_IA", - "S3_STANDARD_IA", - "S3_STANDARD", - }, false), - }, - "fileshare_id": { - Type: schema.TypeString, - Computed: true, - }, - "gateway_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "guess_mime_type_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "kms_encrypted": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "kms_key_arn": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "location_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "nfs_file_share_defaults": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "directory_mode": { - Type: schema.TypeString, - Optional: true, - Default: "0777", - }, - "file_mode": { - Type: schema.TypeString, - Optional: true, - Default: "0666", - }, - "group_id": { - Type: schema.TypeInt, - Optional: true, - Default: 65534, - ValidateFunc: validation.IntAtLeast(0), - }, - "owner_id": { - Type: schema.TypeInt, - Optional: true, - Default: 65534, - ValidateFunc: validation.IntAtLeast(0), - }, - }, - }, - }, - "object_acl": { - Type: schema.TypeString, - Optional: true, - Default: storagegateway.ObjectACLPrivate, - ValidateFunc: validation.StringInSlice([]string{ - storagegateway.ObjectACLAuthenticatedRead, - storagegateway.ObjectACLAwsExecRead, - storagegateway.ObjectACLBucketOwnerFullControl, - storagegateway.ObjectACLBucketOwnerRead, - storagegateway.ObjectACLPrivate, - storagegateway.ObjectACLPublicRead, - storagegateway.ObjectACLPublicReadWrite, - }, false), - }, - "read_only": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "requester_pays": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "squash": { - Type: schema.TypeString, - Optional: true, - Default: "RootSquash", - ValidateFunc: validation.StringInSlice([]string{ - "AllSquash", - "NoSquash", - "RootSquash", - }, false), - }, - }, - } -} - -func resourceAwsStorageGatewayNfsFileShareCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - input := &storagegateway.CreateNFSFileShareInput{ - ClientList: expandStringSet(d.Get("client_list").(*schema.Set)), - ClientToken: aws.String(resource.UniqueId()), - DefaultStorageClass: aws.String(d.Get("default_storage_class").(string)), - GatewayARN: aws.String(d.Get("gateway_arn").(string)), - GuessMIMETypeEnabled: aws.Bool(d.Get("guess_mime_type_enabled").(bool)), - KMSEncrypted: aws.Bool(d.Get("kms_encrypted").(bool)), - LocationARN: aws.String(d.Get("location_arn").(string)), - NFSFileShareDefaults: expandStorageGatewayNfsFileShareDefaults(d.Get("nfs_file_share_defaults").([]interface{})), - ObjectACL: aws.String(d.Get("object_acl").(string)), - ReadOnly: aws.Bool(d.Get("read_only").(bool)), - RequesterPays: aws.Bool(d.Get("requester_pays").(bool)), - Role: aws.String(d.Get("role_arn").(string)), - Squash: aws.String(d.Get("squash").(string)), - } - - if v, ok := d.GetOk("kms_key_arn"); ok && v.(string) != "" { - input.KMSKey = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating Storage Gateway NFS File Share: %s", input) - output, err := conn.CreateNFSFileShare(input) - if err != nil { - return fmt.Errorf("error creating Storage Gateway NFS File Share: %s", err) - } - - d.SetId(aws.StringValue(output.FileShareARN)) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"CREATING", "MISSING"}, - Target: []string{"AVAILABLE"}, - Refresh: storageGatewayNfsFileShareRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutCreate), - Delay: 5 * time.Second, - MinTimeout: 5 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for Storage Gateway NFS File Share creation: %s", err) - } - - return resourceAwsStorageGatewayNfsFileShareRead(d, meta) -} - -func resourceAwsStorageGatewayNfsFileShareRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - input := &storagegateway.DescribeNFSFileSharesInput{ - FileShareARNList: []*string{aws.String(d.Id())}, - } - - log.Printf("[DEBUG] Reading Storage Gateway NFS File Share: %s", input) - output, err := conn.DescribeNFSFileShares(input) - if err != nil { - if isAWSErr(err, storagegateway.ErrCodeInvalidGatewayRequestException, "The specified file share was not found.") { - log.Printf("[WARN] Storage Gateway NFS File Share %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Storage Gateway NFS File Share: %s", err) - } - - if output == nil || len(output.NFSFileShareInfoList) == 0 || output.NFSFileShareInfoList[0] == nil { - log.Printf("[WARN] Storage Gateway NFS File Share %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - fileshare := output.NFSFileShareInfoList[0] - - d.Set("arn", fileshare.FileShareARN) - - if err := d.Set("client_list", schema.NewSet(schema.HashString, flattenStringList(fileshare.ClientList))); err != nil { - return fmt.Errorf("error setting client_list: %s", err) - } - - d.Set("default_storage_class", fileshare.DefaultStorageClass) - d.Set("fileshare_id", fileshare.FileShareId) - d.Set("gateway_arn", fileshare.GatewayARN) - d.Set("guess_mime_type_enabled", fileshare.GuessMIMETypeEnabled) - d.Set("kms_encrypted", fileshare.KMSEncrypted) - d.Set("kms_key_arn", fileshare.KMSKey) - d.Set("location_arn", fileshare.LocationARN) - - if err := d.Set("nfs_file_share_defaults", flattenStorageGatewayNfsFileShareDefaults(fileshare.NFSFileShareDefaults)); err != nil { - return fmt.Errorf("error setting nfs_file_share_defaults: %s", err) - } - - d.Set("object_acl", fileshare.ObjectACL) - d.Set("path", fileshare.Path) - d.Set("read_only", fileshare.ReadOnly) - d.Set("requester_pays", fileshare.RequesterPays) - d.Set("role_arn", fileshare.Role) - d.Set("squash", fileshare.Squash) - - return nil -} - -func resourceAwsStorageGatewayNfsFileShareUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - input := &storagegateway.UpdateNFSFileShareInput{ - ClientList: expandStringSet(d.Get("client_list").(*schema.Set)), - DefaultStorageClass: aws.String(d.Get("default_storage_class").(string)), - FileShareARN: aws.String(d.Id()), - GuessMIMETypeEnabled: aws.Bool(d.Get("guess_mime_type_enabled").(bool)), - KMSEncrypted: aws.Bool(d.Get("kms_encrypted").(bool)), - NFSFileShareDefaults: expandStorageGatewayNfsFileShareDefaults(d.Get("nfs_file_share_defaults").([]interface{})), - ObjectACL: aws.String(d.Get("object_acl").(string)), - ReadOnly: aws.Bool(d.Get("read_only").(bool)), - RequesterPays: aws.Bool(d.Get("requester_pays").(bool)), - Squash: aws.String(d.Get("squash").(string)), - } - - if v, ok := d.GetOk("kms_key_arn"); ok && v.(string) != "" { - input.KMSKey = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Updating Storage Gateway NFS File Share: %s", input) - _, err := conn.UpdateNFSFileShare(input) - if err != nil { - return fmt.Errorf("error updating Storage Gateway NFS File Share: %s", err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"UPDATING"}, - Target: []string{"AVAILABLE"}, - Refresh: storageGatewayNfsFileShareRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutUpdate), - Delay: 5 * time.Second, - MinTimeout: 5 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for Storage Gateway NFS File Share update: %s", err) - } - - return resourceAwsStorageGatewayNfsFileShareRead(d, meta) -} - -func resourceAwsStorageGatewayNfsFileShareDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - input := &storagegateway.DeleteFileShareInput{ - FileShareARN: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting Storage Gateway NFS File Share: %s", input) - _, err := conn.DeleteFileShare(input) - if err != nil { - if isAWSErr(err, storagegateway.ErrCodeInvalidGatewayRequestException, "The specified file share was not found.") { - return nil - } - return fmt.Errorf("error deleting Storage Gateway NFS File Share: %s", err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"AVAILABLE", "DELETING", "FORCE_DELETING"}, - Target: []string{"MISSING"}, - Refresh: storageGatewayNfsFileShareRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutDelete), - Delay: 5 * time.Second, - MinTimeout: 5 * time.Second, - NotFoundChecks: 1, - } - _, err = stateConf.WaitForState() - if err != nil { - if isResourceNotFoundError(err) { - return nil - } - return fmt.Errorf("error waiting for Storage Gateway NFS File Share deletion: %s", err) - } - - return nil -} - -func storageGatewayNfsFileShareRefreshFunc(fileShareArn string, conn *storagegateway.StorageGateway) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &storagegateway.DescribeNFSFileSharesInput{ - FileShareARNList: []*string{aws.String(fileShareArn)}, - } - - log.Printf("[DEBUG] Reading Storage Gateway NFS File Share: %s", input) - output, err := conn.DescribeNFSFileShares(input) - if err != nil { - if isAWSErr(err, storagegateway.ErrCodeInvalidGatewayRequestException, "The specified file share was not found.") { - return nil, "MISSING", nil - } - return nil, "ERROR", fmt.Errorf("error reading Storage Gateway NFS File Share: %s", err) - } - - if output == nil || len(output.NFSFileShareInfoList) == 0 || output.NFSFileShareInfoList[0] == nil { - return nil, "MISSING", nil - } - - fileshare := output.NFSFileShareInfoList[0] - - return fileshare, aws.StringValue(fileshare.FileShareStatus), nil - } -} - -func expandStorageGatewayNfsFileShareDefaults(l []interface{}) *storagegateway.NFSFileShareDefaults { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - nfsFileShareDefaults := &storagegateway.NFSFileShareDefaults{ - DirectoryMode: aws.String(m["directory_mode"].(string)), - FileMode: aws.String(m["file_mode"].(string)), - GroupId: aws.Int64(int64(m["group_id"].(int))), - OwnerId: aws.Int64(int64(m["owner_id"].(int))), - } - - return nfsFileShareDefaults -} - -func flattenStorageGatewayNfsFileShareDefaults(nfsFileShareDefaults *storagegateway.NFSFileShareDefaults) []interface{} { - if nfsFileShareDefaults == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "directory_mode": aws.StringValue(nfsFileShareDefaults.DirectoryMode), - "file_mode": aws.StringValue(nfsFileShareDefaults.FileMode), - "group_id": int(aws.Int64Value(nfsFileShareDefaults.GroupId)), - "owner_id": int(aws.Int64Value(nfsFileShareDefaults.OwnerId)), - } - - return []interface{}{m} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_smb_file_share.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_smb_file_share.go deleted file mode 100644 index 1da867bbb..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_smb_file_share.go +++ /dev/null @@ -1,330 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/storagegateway" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsStorageGatewaySmbFileShare() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsStorageGatewaySmbFileShareCreate, - Read: resourceAwsStorageGatewaySmbFileShareRead, - Update: resourceAwsStorageGatewaySmbFileShareUpdate, - Delete: resourceAwsStorageGatewaySmbFileShareDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Update: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(15 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "authentication": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "ActiveDirectory", - ValidateFunc: validation.StringInSlice([]string{ - "ActiveDirectory", - "GuestAccess", - }, false), - }, - "default_storage_class": { - Type: schema.TypeString, - Optional: true, - Default: "S3_STANDARD", - ValidateFunc: validation.StringInSlice([]string{ - "S3_ONEZONE_IA", - "S3_STANDARD_IA", - "S3_STANDARD", - }, false), - }, - "fileshare_id": { - Type: schema.TypeString, - Computed: true, - }, - "gateway_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "guess_mime_type_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "invalid_user_list": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "kms_encrypted": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "kms_key_arn": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "location_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "object_acl": { - Type: schema.TypeString, - Optional: true, - Default: storagegateway.ObjectACLPrivate, - ValidateFunc: validation.StringInSlice([]string{ - storagegateway.ObjectACLAuthenticatedRead, - storagegateway.ObjectACLAwsExecRead, - storagegateway.ObjectACLBucketOwnerFullControl, - storagegateway.ObjectACLBucketOwnerRead, - storagegateway.ObjectACLPrivate, - storagegateway.ObjectACLPublicRead, - storagegateway.ObjectACLPublicReadWrite, - }, false), - }, - "read_only": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "requester_pays": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "role_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - "valid_user_list": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func resourceAwsStorageGatewaySmbFileShareCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - input := &storagegateway.CreateSMBFileShareInput{ - Authentication: aws.String(d.Get("authentication").(string)), - ClientToken: aws.String(resource.UniqueId()), - DefaultStorageClass: aws.String(d.Get("default_storage_class").(string)), - GatewayARN: aws.String(d.Get("gateway_arn").(string)), - GuessMIMETypeEnabled: aws.Bool(d.Get("guess_mime_type_enabled").(bool)), - InvalidUserList: expandStringSet(d.Get("invalid_user_list").(*schema.Set)), - KMSEncrypted: aws.Bool(d.Get("kms_encrypted").(bool)), - LocationARN: aws.String(d.Get("location_arn").(string)), - ObjectACL: aws.String(d.Get("object_acl").(string)), - ReadOnly: aws.Bool(d.Get("read_only").(bool)), - RequesterPays: aws.Bool(d.Get("requester_pays").(bool)), - Role: aws.String(d.Get("role_arn").(string)), - ValidUserList: expandStringSet(d.Get("valid_user_list").(*schema.Set)), - } - - if v, ok := d.GetOk("kms_key_arn"); ok && v.(string) != "" { - input.KMSKey = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Creating Storage Gateway SMB File Share: %s", input) - output, err := conn.CreateSMBFileShare(input) - if err != nil { - return fmt.Errorf("error creating Storage Gateway SMB File Share: %s", err) - } - - d.SetId(aws.StringValue(output.FileShareARN)) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"CREATING", "MISSING"}, - Target: []string{"AVAILABLE"}, - Refresh: storageGatewaySmbFileShareRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutCreate), - Delay: 5 * time.Second, - MinTimeout: 5 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for Storage Gateway SMB File Share creation: %s", err) - } - - return resourceAwsStorageGatewaySmbFileShareRead(d, meta) -} - -func resourceAwsStorageGatewaySmbFileShareRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - input := &storagegateway.DescribeSMBFileSharesInput{ - FileShareARNList: []*string{aws.String(d.Id())}, - } - - log.Printf("[DEBUG] Reading Storage Gateway SMB File Share: %s", input) - output, err := conn.DescribeSMBFileShares(input) - if err != nil { - if isAWSErr(err, storagegateway.ErrCodeInvalidGatewayRequestException, "The specified file share was not found.") { - log.Printf("[WARN] Storage Gateway SMB File Share %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Storage Gateway SMB File Share: %s", err) - } - - if output == nil || len(output.SMBFileShareInfoList) == 0 || output.SMBFileShareInfoList[0] == nil { - log.Printf("[WARN] Storage Gateway SMB File Share %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - fileshare := output.SMBFileShareInfoList[0] - - d.Set("arn", fileshare.FileShareARN) - d.Set("authentication", fileshare.Authentication) - d.Set("default_storage_class", fileshare.DefaultStorageClass) - d.Set("fileshare_id", fileshare.FileShareId) - d.Set("gateway_arn", fileshare.GatewayARN) - d.Set("guess_mime_type_enabled", fileshare.GuessMIMETypeEnabled) - - if err := d.Set("invalid_user_list", schema.NewSet(schema.HashString, flattenStringList(fileshare.InvalidUserList))); err != nil { - return fmt.Errorf("error setting invalid_user_list: %s", err) - } - - d.Set("kms_encrypted", fileshare.KMSEncrypted) - d.Set("kms_key_arn", fileshare.KMSKey) - d.Set("location_arn", fileshare.LocationARN) - d.Set("object_acl", fileshare.ObjectACL) - d.Set("path", fileshare.Path) - d.Set("read_only", fileshare.ReadOnly) - d.Set("requester_pays", fileshare.RequesterPays) - d.Set("role_arn", fileshare.Role) - - if err := d.Set("valid_user_list", schema.NewSet(schema.HashString, flattenStringList(fileshare.ValidUserList))); err != nil { - return fmt.Errorf("error setting valid_user_list: %s", err) - } - - return nil -} - -func resourceAwsStorageGatewaySmbFileShareUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - input := &storagegateway.UpdateSMBFileShareInput{ - DefaultStorageClass: aws.String(d.Get("default_storage_class").(string)), - FileShareARN: aws.String(d.Id()), - GuessMIMETypeEnabled: aws.Bool(d.Get("guess_mime_type_enabled").(bool)), - InvalidUserList: expandStringSet(d.Get("invalid_user_list").(*schema.Set)), - KMSEncrypted: aws.Bool(d.Get("kms_encrypted").(bool)), - ObjectACL: aws.String(d.Get("object_acl").(string)), - ReadOnly: aws.Bool(d.Get("read_only").(bool)), - RequesterPays: aws.Bool(d.Get("requester_pays").(bool)), - ValidUserList: expandStringSet(d.Get("valid_user_list").(*schema.Set)), - } - - if v, ok := d.GetOk("kms_key_arn"); ok && v.(string) != "" { - input.KMSKey = aws.String(v.(string)) - } - - log.Printf("[DEBUG] Updating Storage Gateway SMB File Share: %s", input) - _, err := conn.UpdateSMBFileShare(input) - if err != nil { - return fmt.Errorf("error updating Storage Gateway SMB File Share: %s", err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"UPDATING"}, - Target: []string{"AVAILABLE"}, - Refresh: storageGatewaySmbFileShareRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutUpdate), - Delay: 5 * time.Second, - MinTimeout: 5 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("error waiting for Storage Gateway SMB File Share update: %s", err) - } - - return resourceAwsStorageGatewaySmbFileShareRead(d, meta) -} - -func resourceAwsStorageGatewaySmbFileShareDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - input := &storagegateway.DeleteFileShareInput{ - FileShareARN: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Deleting Storage Gateway SMB File Share: %s", input) - _, err := conn.DeleteFileShare(input) - if err != nil { - if isAWSErr(err, storagegateway.ErrCodeInvalidGatewayRequestException, "The specified file share was not found.") { - return nil - } - return fmt.Errorf("error deleting Storage Gateway SMB File Share: %s", err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"AVAILABLE", "DELETING", "FORCE_DELETING"}, - Target: []string{"MISSING"}, - Refresh: storageGatewaySmbFileShareRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutDelete), - Delay: 5 * time.Second, - MinTimeout: 5 * time.Second, - NotFoundChecks: 1, - } - _, err = stateConf.WaitForState() - if err != nil { - if isResourceNotFoundError(err) { - return nil - } - return fmt.Errorf("error waiting for Storage Gateway SMB File Share deletion: %s", err) - } - - return nil -} - -func storageGatewaySmbFileShareRefreshFunc(fileShareArn string, conn *storagegateway.StorageGateway) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &storagegateway.DescribeSMBFileSharesInput{ - FileShareARNList: []*string{aws.String(fileShareArn)}, - } - - log.Printf("[DEBUG] Reading Storage Gateway SMB File Share: %s", input) - output, err := conn.DescribeSMBFileShares(input) - if err != nil { - if isAWSErr(err, storagegateway.ErrCodeInvalidGatewayRequestException, "The specified file share was not found.") { - return nil, "MISSING", nil - } - return nil, "ERROR", fmt.Errorf("error reading Storage Gateway SMB File Share: %s", err) - } - - if output == nil || len(output.SMBFileShareInfoList) == 0 || output.SMBFileShareInfoList[0] == nil { - return nil, "MISSING", nil - } - - fileshare := output.SMBFileShareInfoList[0] - - return fileshare, aws.StringValue(fileshare.FileShareStatus), nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_upload_buffer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_upload_buffer.go deleted file mode 100644 index 4864c3f65..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_upload_buffer.go +++ /dev/null @@ -1,131 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/storagegateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsStorageGatewayUploadBuffer() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsStorageGatewayUploadBufferCreate, - Read: resourceAwsStorageGatewayUploadBufferRead, - Delete: schema.Noop, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "disk_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "gateway_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - }, - } -} - -func resourceAwsStorageGatewayUploadBufferCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - diskID := d.Get("disk_id").(string) - gatewayARN := d.Get("gateway_arn").(string) - - input := &storagegateway.AddUploadBufferInput{ - DiskIds: []*string{aws.String(diskID)}, - GatewayARN: aws.String(gatewayARN), - } - - log.Printf("[DEBUG] Adding Storage Gateway upload buffer: %s", input) - _, err := conn.AddUploadBuffer(input) - if err != nil { - return fmt.Errorf("error adding Storage Gateway upload buffer: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%s", gatewayARN, diskID)) - - return resourceAwsStorageGatewayUploadBufferRead(d, meta) -} - -func resourceAwsStorageGatewayUploadBufferRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - gatewayARN, diskID, err := decodeStorageGatewayUploadBufferID(d.Id()) - if err != nil { - return err - } - - input := &storagegateway.DescribeUploadBufferInput{ - GatewayARN: aws.String(gatewayARN), - } - - log.Printf("[DEBUG] Reading Storage Gateway upload buffer: %s", input) - output, err := conn.DescribeUploadBuffer(input) - if err != nil { - if isAWSErrStorageGatewayGatewayNotFound(err) { - log.Printf("[WARN] Storage Gateway upload buffer %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Storage Gateway upload buffer: %s", err) - } - - if output == nil || len(output.DiskIds) == 0 { - log.Printf("[WARN] Storage Gateway upload buffer %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - found := false - for _, existingDiskID := range output.DiskIds { - if aws.StringValue(existingDiskID) == diskID { - found = true - break - } - } - - if !found { - log.Printf("[WARN] Storage Gateway upload buffer %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("disk_id", diskID) - d.Set("gateway_arn", gatewayARN) - - return nil -} - -func decodeStorageGatewayUploadBufferID(id string) (string, string, error) { - // id = arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0 - idFormatErr := fmt.Errorf("expected ID in form of GatewayARN:DiskId, received: %s", id) - gatewayARNAndDisk, err := arn.Parse(id) - if err != nil { - return "", "", idFormatErr - } - // gatewayARNAndDisk.Resource = gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0 - resourceParts := strings.SplitN(gatewayARNAndDisk.Resource, ":", 2) - if len(resourceParts) != 2 { - return "", "", idFormatErr - } - // resourceParts = ["gateway/sgw-12345678", "pci-0000:03:00.0-scsi-0:0:0:0"] - gatewayARN := &arn.ARN{ - AccountID: gatewayARNAndDisk.AccountID, - Partition: gatewayARNAndDisk.Partition, - Region: gatewayARNAndDisk.Region, - Service: gatewayARNAndDisk.Service, - Resource: resourceParts[0], - } - return gatewayARN.String(), resourceParts[1], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_working_storage.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_working_storage.go deleted file mode 100644 index 52c5787c3..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_working_storage.go +++ /dev/null @@ -1,131 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/storagegateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsStorageGatewayWorkingStorage() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsStorageGatewayWorkingStorageCreate, - Read: resourceAwsStorageGatewayWorkingStorageRead, - Delete: schema.Noop, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "disk_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "gateway_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateArn, - }, - }, - } -} - -func resourceAwsStorageGatewayWorkingStorageCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - diskID := d.Get("disk_id").(string) - gatewayARN := d.Get("gateway_arn").(string) - - input := &storagegateway.AddWorkingStorageInput{ - DiskIds: []*string{aws.String(diskID)}, - GatewayARN: aws.String(gatewayARN), - } - - log.Printf("[DEBUG] Adding Storage Gateway working storage: %s", input) - _, err := conn.AddWorkingStorage(input) - if err != nil { - return fmt.Errorf("error adding Storage Gateway working storage: %s", err) - } - - d.SetId(fmt.Sprintf("%s:%s", gatewayARN, diskID)) - - return resourceAwsStorageGatewayWorkingStorageRead(d, meta) -} - -func resourceAwsStorageGatewayWorkingStorageRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).storagegatewayconn - - gatewayARN, diskID, err := decodeStorageGatewayWorkingStorageID(d.Id()) - if err != nil { - return err - } - - input := &storagegateway.DescribeWorkingStorageInput{ - GatewayARN: aws.String(gatewayARN), - } - - log.Printf("[DEBUG] Reading Storage Gateway working storage: %s", input) - output, err := conn.DescribeWorkingStorage(input) - if err != nil { - if isAWSErrStorageGatewayGatewayNotFound(err) { - log.Printf("[WARN] Storage Gateway working storage %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Storage Gateway working storage: %s", err) - } - - if output == nil || len(output.DiskIds) == 0 { - log.Printf("[WARN] Storage Gateway working storage %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - found := false - for _, existingDiskID := range output.DiskIds { - if aws.StringValue(existingDiskID) == diskID { - found = true - break - } - } - - if !found { - log.Printf("[WARN] Storage Gateway working storage %q not found - removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("disk_id", diskID) - d.Set("gateway_arn", gatewayARN) - - return nil -} - -func decodeStorageGatewayWorkingStorageID(id string) (string, string, error) { - // id = arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0 - idFormatErr := fmt.Errorf("expected ID in form of GatewayARN:DiskId, received: %s", id) - gatewayARNAndDisk, err := arn.Parse(id) - if err != nil { - return "", "", idFormatErr - } - // gatewayARNAndDisk.Resource = gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0 - resourceParts := strings.SplitN(gatewayARNAndDisk.Resource, ":", 2) - if len(resourceParts) != 2 { - return "", "", idFormatErr - } - // resourceParts = ["gateway/sgw-12345678", "pci-0000:03:00.0-scsi-0:0:0:0"] - gatewayARN := &arn.ARN{ - AccountID: gatewayARNAndDisk.AccountID, - Partition: gatewayARNAndDisk.Partition, - Region: gatewayARNAndDisk.Region, - Service: gatewayARNAndDisk.Service, - Resource: resourceParts[0], - } - return gatewayARN.String(), resourceParts[1], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_subnet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_subnet.go deleted file mode 100644 index 9941b75eb..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_subnet.go +++ /dev/null @@ -1,423 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSubnet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSubnetCreate, - Read: resourceAwsSubnetRead, - Update: resourceAwsSubnetUpdate, - Delete: resourceAwsSubnetDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - - SchemaVersion: 1, - MigrateState: resourceAwsSubnetMigrateState, - - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "cidr_block": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "ipv6_cidr_block": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "availability_zone": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"availability_zone_id"}, - }, - - "availability_zone_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"availability_zone"}, - }, - - "map_public_ip_on_launch": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "assign_ipv6_address_on_creation": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "ipv6_cidr_block_association_id": { - Type: schema.TypeString, - Computed: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "tags": tagsSchema(), - - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsSubnetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - createOpts := &ec2.CreateSubnetInput{ - AvailabilityZone: aws.String(d.Get("availability_zone").(string)), - AvailabilityZoneId: aws.String(d.Get("availability_zone_id").(string)), - CidrBlock: aws.String(d.Get("cidr_block").(string)), - VpcId: aws.String(d.Get("vpc_id").(string)), - } - - if v, ok := d.GetOk("ipv6_cidr_block"); ok { - createOpts.Ipv6CidrBlock = aws.String(v.(string)) - } - - var err error - resp, err := conn.CreateSubnet(createOpts) - - if err != nil { - return fmt.Errorf("Error creating subnet: %s", err) - } - - // Get the ID and store it - subnet := resp.Subnet - d.SetId(*subnet.SubnetId) - log.Printf("[INFO] Subnet ID: %s", *subnet.SubnetId) - - // Wait for the Subnet to become available - log.Printf("[DEBUG] Waiting for subnet (%s) to become available", *subnet.SubnetId) - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"available"}, - Refresh: SubnetStateRefreshFunc(conn, *subnet.SubnetId), - Timeout: 10 * time.Minute, - } - - _, err = stateConf.WaitForState() - - if err != nil { - return fmt.Errorf( - "Error waiting for subnet (%s) to become ready: %s", - d.Id(), err) - } - - return resourceAwsSubnetUpdate(d, meta) -} - -func resourceAwsSubnetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - resp, err := conn.DescribeSubnets(&ec2.DescribeSubnetsInput{ - SubnetIds: []*string{aws.String(d.Id())}, - }) - - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidSubnetID.NotFound" { - // Update state to indicate the subnet no longer exists. - d.SetId("") - return nil - } - return err - } - if resp == nil { - return nil - } - - subnet := resp.Subnets[0] - - d.Set("vpc_id", subnet.VpcId) - d.Set("availability_zone", subnet.AvailabilityZone) - d.Set("availability_zone_id", subnet.AvailabilityZoneId) - d.Set("cidr_block", subnet.CidrBlock) - d.Set("map_public_ip_on_launch", subnet.MapPublicIpOnLaunch) - d.Set("assign_ipv6_address_on_creation", subnet.AssignIpv6AddressOnCreation) - - // Make sure those values are set, if an IPv6 block exists it'll be set in the loop - d.Set("ipv6_cidr_block_association_id", "") - d.Set("ipv6_cidr_block", "") - - for _, a := range subnet.Ipv6CidrBlockAssociationSet { - if *a.Ipv6CidrBlockState.State == "associated" { //we can only ever have 1 IPv6 block associated at once - d.Set("ipv6_cidr_block_association_id", a.AssociationId) - d.Set("ipv6_cidr_block", a.Ipv6CidrBlock) - break - } - } - - d.Set("arn", subnet.SubnetArn) - d.Set("tags", tagsToMap(subnet.Tags)) - d.Set("owner_id", subnet.OwnerId) - - return nil -} - -func resourceAwsSubnetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - d.Partial(true) - - if err := setTags(conn, d); err != nil { - return err - } else { - d.SetPartial("tags") - } - - if d.HasChange("map_public_ip_on_launch") { - modifyOpts := &ec2.ModifySubnetAttributeInput{ - SubnetId: aws.String(d.Id()), - MapPublicIpOnLaunch: &ec2.AttributeBooleanValue{ - Value: aws.Bool(d.Get("map_public_ip_on_launch").(bool)), - }, - } - - log.Printf("[DEBUG] Subnet modify attributes: %#v", modifyOpts) - - _, err := conn.ModifySubnetAttribute(modifyOpts) - - if err != nil { - return err - } else { - d.SetPartial("map_public_ip_on_launch") - } - } - - // We have to be careful here to not go through a change of association if this is a new resource - // A New resource here would denote that the Update func is called by the Create func - if d.HasChange("ipv6_cidr_block") && !d.IsNewResource() { - // We need to handle that we disassociate the IPv6 CIDR block before we try and associate the new one - // This could be an issue as, we could error out when we try and add the new one - // We may need to roll back the state and reattach the old one if this is the case - - _, new := d.GetChange("ipv6_cidr_block") - - if v, ok := d.GetOk("ipv6_cidr_block_association_id"); ok { - - //Firstly we have to disassociate the old IPv6 CIDR Block - disassociateOps := &ec2.DisassociateSubnetCidrBlockInput{ - AssociationId: aws.String(v.(string)), - } - - _, err := conn.DisassociateSubnetCidrBlock(disassociateOps) - if err != nil { - return err - } - - // Wait for the CIDR to become disassociated - log.Printf( - "[DEBUG] Waiting for IPv6 CIDR (%s) to become disassociated", - d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"disassociating", "associated"}, - Target: []string{"disassociated"}, - Refresh: SubnetIpv6CidrStateRefreshFunc(conn, d.Id(), d.Get("ipv6_cidr_block_association_id").(string)), - Timeout: 3 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for IPv6 CIDR (%s) to become disassociated: %s", - d.Id(), err) - } - } - - //Now we need to try and associate the new CIDR block - associatesOpts := &ec2.AssociateSubnetCidrBlockInput{ - SubnetId: aws.String(d.Id()), - Ipv6CidrBlock: aws.String(new.(string)), - } - - resp, err := conn.AssociateSubnetCidrBlock(associatesOpts) - if err != nil { - //The big question here is, do we want to try and reassociate the old one?? - //If we have a failure here, then we may be in a situation that we have nothing associated - return err - } - - // Wait for the CIDR to become associated - log.Printf( - "[DEBUG] Waiting for IPv6 CIDR (%s) to become associated", - d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"associating", "disassociated"}, - Target: []string{"associated"}, - Refresh: SubnetIpv6CidrStateRefreshFunc(conn, d.Id(), *resp.Ipv6CidrBlockAssociation.AssociationId), - Timeout: 3 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for IPv6 CIDR (%s) to become associated: %s", - d.Id(), err) - } - - d.SetPartial("ipv6_cidr_block") - } - - if d.HasChange("assign_ipv6_address_on_creation") { - modifyOpts := &ec2.ModifySubnetAttributeInput{ - SubnetId: aws.String(d.Id()), - AssignIpv6AddressOnCreation: &ec2.AttributeBooleanValue{ - Value: aws.Bool(d.Get("assign_ipv6_address_on_creation").(bool)), - }, - } - - log.Printf("[DEBUG] Subnet modify attributes: %#v", modifyOpts) - - _, err := conn.ModifySubnetAttribute(modifyOpts) - - if err != nil { - return err - } else { - d.SetPartial("assign_ipv6_address_on_creation") - } - } - - d.Partial(false) - - return resourceAwsSubnetRead(d, meta) -} - -func resourceAwsSubnetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[INFO] Deleting subnet: %s", d.Id()) - - if err := deleteLingeringLambdaENIs(conn, d, "subnet-id"); err != nil { - return fmt.Errorf("Failed to delete Lambda ENIs: %s", err) - } - - req := &ec2.DeleteSubnetInput{ - SubnetId: aws.String(d.Id()), - } - - wait := resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"destroyed"}, - Timeout: 10 * time.Minute, - MinTimeout: 1 * time.Second, - Refresh: func() (interface{}, string, error) { - _, err := conn.DeleteSubnet(req) - if err != nil { - if apiErr, ok := err.(awserr.Error); ok { - if apiErr.Code() == "DependencyViolation" { - // There is some pending operation, so just retry - // in a bit. - return 42, "pending", nil - } - - if apiErr.Code() == "InvalidSubnetID.NotFound" { - return 42, "destroyed", nil - } - } - - return 42, "failure", err - } - - return 42, "destroyed", nil - }, - } - - if _, err := wait.WaitForState(); err != nil { - return fmt.Errorf("Error deleting subnet: %s", err) - } - - return nil -} - -// SubnetStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch a Subnet. -func SubnetStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeSubnets(&ec2.DescribeSubnetsInput{ - SubnetIds: []*string{aws.String(id)}, - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidSubnetID.NotFound" { - resp = nil - } else { - log.Printf("Error on SubnetStateRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - subnet := resp.Subnets[0] - return subnet, *subnet.State, nil - } -} - -func SubnetIpv6CidrStateRefreshFunc(conn *ec2.EC2, id string, associationId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - opts := &ec2.DescribeSubnetsInput{ - SubnetIds: []*string{aws.String(id)}, - } - resp, err := conn.DescribeSubnets(opts) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidSubnetID.NotFound" { - resp = nil - } else { - log.Printf("Error on SubnetIpv6CidrStateRefreshFunc: %s", err) - return nil, "", err - } - } - - if resp == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - if resp.Subnets[0].Ipv6CidrBlockAssociationSet == nil { - return nil, "", nil - } - - for _, association := range resp.Subnets[0].Ipv6CidrBlockAssociationSet { - if *association.AssociationId == associationId { - return association, *association.Ipv6CidrBlockState.State, nil - } - } - - return nil, "", nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_subnet_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_subnet_migrate.go deleted file mode 100644 index 0e0f19cf6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_subnet_migrate.go +++ /dev/null @@ -1,33 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsSubnetMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS Subnet State v0; migrating to v1") - return migrateSubnetStateV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateSubnetStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() || is.Attributes == nil { - log.Println("[DEBUG] Empty Subnet State; nothing to migrate.") - return is, nil - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - - is.Attributes["assign_ipv6_address_on_creation"] = "false" - - log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) - return is, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_swf_domain.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_swf_domain.go deleted file mode 100644 index 8668ec108..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_swf_domain.go +++ /dev/null @@ -1,140 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/swf" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsSwfDomain() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsSwfDomainCreate, - Read: resourceAwsSwfDomainRead, - Delete: resourceAwsSwfDomainDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, - }, - "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, - }, - "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - "workflow_execution_retention_period_in_days": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { - value, err := strconv.Atoi(v.(string)) - if err != nil || value > 90 || value < 0 { - es = append(es, fmt.Errorf( - "%q must be between 0 and 90 days inclusive", k)) - } - return - }, - }, - }, - } -} - -func resourceAwsSwfDomainCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).swfconn - - var name string - - if v, ok := d.GetOk("name"); ok { - name = v.(string) - } else if v, ok := d.GetOk("name_prefix"); ok { - name = resource.PrefixedUniqueId(v.(string)) - } else { - name = resource.UniqueId() - } - - input := &swf.RegisterDomainInput{ - Name: aws.String(name), - WorkflowExecutionRetentionPeriodInDays: aws.String(d.Get("workflow_execution_retention_period_in_days").(string)), - } - - if v, ok := d.GetOk("description"); ok { - input.Description = aws.String(v.(string)) - } - - _, err := conn.RegisterDomain(input) - if err != nil { - return err - } - - d.SetId(name) - - return resourceAwsSwfDomainRead(d, meta) -} - -func resourceAwsSwfDomainRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).swfconn - - input := &swf.DescribeDomainInput{ - Name: aws.String(d.Id()), - } - - resp, err := conn.DescribeDomain(input) - if err != nil { - if isAWSErr(err, swf.ErrCodeUnknownResourceFault, "") { - log.Printf("[WARN] SWF Domain %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error reading SWF Domain: %s", err) - } - - if resp == nil || resp.Configuration == nil || resp.DomainInfo == nil { - log.Printf("[WARN] SWF Domain %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("name", resp.DomainInfo.Name) - d.Set("description", resp.DomainInfo.Description) - d.Set("workflow_execution_retention_period_in_days", resp.Configuration.WorkflowExecutionRetentionPeriodInDays) - - return nil -} - -func resourceAwsSwfDomainDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).swfconn - - input := &swf.DeprecateDomainInput{ - Name: aws.String(d.Get("name").(string)), - } - - _, err := conn.DeprecateDomain(input) - if err != nil { - if isAWSErr(err, swf.ErrCodeDomainDeprecatedFault, "") { - return nil - } - if isAWSErr(err, swf.ErrCodeUnknownResourceFault, "") { - return nil - } - return fmt.Errorf("error deleting SWF Domain: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_server.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_server.go deleted file mode 100644 index 9d53bac6c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_server.go +++ /dev/null @@ -1,287 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/transfer" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsTransferServer() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsTransferServerCreate, - Read: resourceAwsTransferServerRead, - Update: resourceAwsTransferServerUpdate, - Delete: resourceAwsTransferServerDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "endpoint": { - Type: schema.TypeString, - Computed: true, - }, - - "invocation_role": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - - "url": { - Type: schema.TypeString, - Optional: true, - }, - - "identity_provider_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: transfer.IdentityProviderTypeServiceManaged, - ValidateFunc: validation.StringInSlice([]string{ - transfer.IdentityProviderTypeServiceManaged, - transfer.IdentityProviderTypeApiGateway, - }, false), - }, - - "logging_role": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - - "force_destroy": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsTransferServerCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).transferconn - tags := tagsFromMapTransfer(d.Get("tags").(map[string]interface{})) - createOpts := &transfer.CreateServerInput{} - - if len(tags) != 0 { - createOpts.Tags = tags - } - - identityProviderDetails := &transfer.IdentityProviderDetails{} - if attr, ok := d.GetOk("invocation_role"); ok { - identityProviderDetails.InvocationRole = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("url"); ok { - identityProviderDetails.Url = aws.String(attr.(string)) - } - - if identityProviderDetails.Url != nil || identityProviderDetails.InvocationRole != nil { - createOpts.IdentityProviderDetails = identityProviderDetails - } - - if attr, ok := d.GetOk("identity_provider_type"); ok { - createOpts.IdentityProviderType = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("logging_role"); ok { - createOpts.LoggingRole = aws.String(attr.(string)) - } - - log.Printf("[DEBUG] Create Transfer Server Option: %#v", createOpts) - - resp, err := conn.CreateServer(createOpts) - if err != nil { - return fmt.Errorf("Error creating Transfer Server: %s", err) - } - - d.SetId(*resp.ServerId) - - return resourceAwsTransferServerRead(d, meta) -} - -func resourceAwsTransferServerRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).transferconn - - descOpts := &transfer.DescribeServerInput{ - ServerId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Describe Transfer Server Option: %#v", descOpts) - - resp, err := conn.DescribeServer(descOpts) - if err != nil { - if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Transfer Server (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - endpoint := fmt.Sprintf("%s.server.transfer.%s.amazonaws.com", d.Id(), meta.(*AWSClient).region) - - d.Set("arn", resp.Server.Arn) - d.Set("endpoint", endpoint) - d.Set("invocation_role", "") - d.Set("url", "") - if resp.Server.IdentityProviderDetails != nil { - d.Set("invocation_role", aws.StringValue(resp.Server.IdentityProviderDetails.InvocationRole)) - d.Set("url", aws.StringValue(resp.Server.IdentityProviderDetails.Url)) - } - d.Set("identity_provider_type", resp.Server.IdentityProviderType) - d.Set("logging_role", resp.Server.LoggingRole) - - if err := d.Set("tags", tagsToMapTransfer(resp.Server.Tags)); err != nil { - return fmt.Errorf("Error setting tags: %s", err) - } - return nil -} - -func resourceAwsTransferServerUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).transferconn - updateFlag := false - updateOpts := &transfer.UpdateServerInput{ - ServerId: aws.String(d.Id()), - } - - if d.HasChange("logging_role") { - updateFlag = true - updateOpts.LoggingRole = aws.String(d.Get("logging_role").(string)) - } - - if d.HasChange("invocation_role") || d.HasChange("url") { - identityProviderDetails := &transfer.IdentityProviderDetails{} - updateFlag = true - if attr, ok := d.GetOk("invocation_role"); ok { - identityProviderDetails.InvocationRole = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("url"); ok { - identityProviderDetails.Url = aws.String(attr.(string)) - } - updateOpts.IdentityProviderDetails = identityProviderDetails - } - - if updateFlag { - _, err := conn.UpdateServer(updateOpts) - if err != nil { - if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Transfer Server (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("error updating Transfer Server (%s): %s", d.Id(), err) - } - } - - if err := setTagsTransfer(conn, d); err != nil { - return fmt.Errorf("Error update tags: %s", err) - } - - return resourceAwsTransferServerRead(d, meta) -} - -func resourceAwsTransferServerDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).transferconn - - if d.Get("force_destroy").(bool) { - log.Printf("[DEBUG] Transfer Server (%s) attempting to forceDestroy", d.Id()) - if err := deleteTransferUsers(conn, d.Id(), nil); err != nil { - return err - } - } - - delOpts := &transfer.DeleteServerInput{ - ServerId: aws.String(d.Id()), - } - - log.Printf("[DEBUG] Delete Transfer Server Option: %#v", delOpts) - - _, err := conn.DeleteServer(delOpts) - if err != nil { - if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { - return nil - } - return fmt.Errorf("error deleting Transfer Server (%s): %s", d.Id(), err) - } - - if err := waitForTransferServerDeletion(conn, d.Id()); err != nil { - return fmt.Errorf("error waiting for Transfer Server (%s): %s", d.Id(), err) - } - - return nil -} - -func waitForTransferServerDeletion(conn *transfer.Transfer, serverID string) error { - params := &transfer.DescribeServerInput{ - ServerId: aws.String(serverID), - } - - return resource.Retry(10*time.Minute, func() *resource.RetryError { - _, err := conn.DescribeServer(params) - - if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { - return nil - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return resource.RetryableError(fmt.Errorf("Transfer Server (%s) still exists", serverID)) - }) -} - -func deleteTransferUsers(conn *transfer.Transfer, serverID string, nextToken *string) error { - listOpts := &transfer.ListUsersInput{ - ServerId: aws.String(serverID), - NextToken: nextToken, - } - - log.Printf("[DEBUG] List Transfer User Option: %#v", listOpts) - - resp, err := conn.ListUsers(listOpts) - if err != nil { - return err - } - - for _, user := range resp.Users { - - delOpts := &transfer.DeleteUserInput{ - ServerId: aws.String(serverID), - UserName: user.UserName, - } - - log.Printf("[DEBUG] Delete Transfer User Option: %#v", delOpts) - - _, err = conn.DeleteUser(delOpts) - if err != nil { - if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { - continue - } - return fmt.Errorf("error deleting Transfer User (%s) for Server(%s): %s", *user.UserName, serverID, err) - } - } - - if resp.NextToken != nil { - return deleteTransferUsers(conn, serverID, resp.NextToken) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_ssh_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_ssh_key.go deleted file mode 100644 index 332916c89..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_ssh_key.go +++ /dev/null @@ -1,150 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/transfer" - - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsTransferSshKey() *schema.Resource { - - return &schema.Resource{ - Create: resourceAwsTransferSshKeyCreate, - Read: resourceAwsTransferSshKeyRead, - Delete: resourceAwsTransferSshKeyDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Schema: map[string]*schema.Schema{ - "body": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - old = cleanSshKey(old) - new = cleanSshKey(new) - return strings.Trim(old, "\n") == strings.Trim(new, "\n") - }, - }, - - "server_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateTransferServerID, - }, - - "user_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateTransferUserName, - }, - }, - } -} - -func resourceAwsTransferSshKeyCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).transferconn - userName := d.Get("user_name").(string) - serverID := d.Get("server_id").(string) - - createOpts := &transfer.ImportSshPublicKeyInput{ - ServerId: aws.String(serverID), - UserName: aws.String(userName), - SshPublicKeyBody: aws.String(d.Get("body").(string)), - } - - log.Printf("[DEBUG] Create Transfer SSH Public Key Option: %#v", createOpts) - - resp, err := conn.ImportSshPublicKey(createOpts) - if err != nil { - return fmt.Errorf("Error importing ssh public key: %s", err) - } - - d.SetId(fmt.Sprintf("%s/%s/%s", serverID, userName, *resp.SshPublicKeyId)) - - return nil -} - -func resourceAwsTransferSshKeyRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).transferconn - serverID, userName, sshKeyID, err := decodeTransferSshKeyId(d.Id()) - if err != nil { - return fmt.Errorf("error parsing Transfer SSH Public Key ID: %s", err) - } - - descOpts := &transfer.DescribeUserInput{ - UserName: aws.String(userName), - ServerId: aws.String(serverID), - } - - log.Printf("[DEBUG] Describe Transfer User Option: %#v", descOpts) - - resp, err := conn.DescribeUser(descOpts) - if err != nil { - if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Transfer User (%s) for Server (%s) not found, removing ssh public key (%s) from state", userName, serverID, sshKeyID) - d.SetId("") - return nil - } - return err - } - - var body string - for _, s := range resp.User.SshPublicKeys { - if sshKeyID == *s.SshPublicKeyId { - body = *s.SshPublicKeyBody - } - } - - if body == "" { - log.Printf("[WARN] No such ssh public key found for User (%s) in Server (%s)", userName, serverID) - d.SetId("") - } - - d.Set("server_id", resp.ServerId) - d.Set("user_name", resp.User.UserName) - d.Set("body", body) - - return nil -} - -func resourceAwsTransferSshKeyDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).transferconn - serverID, userName, sshKeyID, err := decodeTransferSshKeyId(d.Id()) - if err != nil { - return fmt.Errorf("error parsing Transfer SSH Public Key ID: %s", err) - } - - delOpts := &transfer.DeleteSshPublicKeyInput{ - UserName: aws.String(userName), - ServerId: aws.String(serverID), - SshPublicKeyId: aws.String(sshKeyID), - } - - log.Printf("[DEBUG] Delete Transfer SSH Public Key Option: %#v", delOpts) - - _, err = conn.DeleteSshPublicKey(delOpts) - if err != nil { - if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { - return nil - } - return fmt.Errorf("error deleting Transfer User Ssh Key (%s): %s", d.Id(), err) - } - - return nil -} - -func decodeTransferSshKeyId(id string) (string, string, string, error) { - idParts := strings.SplitN(id, "/", 3) - if len(idParts) != 3 || idParts[0] == "" || idParts[1] == "" || idParts[2] == "" { - return "", "", "", fmt.Errorf("unexpected format of ID (%s), expected SERVERID/USERNAME/SSHKEYID", id) - } - return idParts[0], idParts[1], idParts[2], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_user.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_user.go deleted file mode 100644 index dddcb86d9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_user.go +++ /dev/null @@ -1,247 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/transfer" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsTransferUser() *schema.Resource { - - return &schema.Resource{ - Create: resourceAwsTransferUserCreate, - Read: resourceAwsTransferUserRead, - Update: resourceAwsTransferUserUpdate, - Delete: resourceAwsTransferUserDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - Schema: map[string]*schema.Schema{ - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "home_directory": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 1024), - }, - - "policy": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateIAMPolicyJson, - DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - }, - - "role": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - - "server_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateTransferServerID, - }, - - "tags": tagsSchema(), - - "user_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateTransferUserName, - }, - }, - } -} - -func resourceAwsTransferUserCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).transferconn - userName := d.Get("user_name").(string) - serverID := d.Get("server_id").(string) - - createOpts := &transfer.CreateUserInput{ - ServerId: aws.String(serverID), - UserName: aws.String(userName), - Role: aws.String(d.Get("role").(string)), - } - - if attr, ok := d.GetOk("home_directory"); ok { - createOpts.HomeDirectory = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("policy"); ok { - createOpts.Policy = aws.String(attr.(string)) - } - - if attr, ok := d.GetOk("tags"); ok { - createOpts.Tags = tagsFromMapTransfer(attr.(map[string]interface{})) - } - - log.Printf("[DEBUG] Create Transfer User Option: %#v", createOpts) - - _, err := conn.CreateUser(createOpts) - if err != nil { - return fmt.Errorf("error creating Transfer User: %s", err) - } - - d.SetId(fmt.Sprintf("%s/%s", serverID, userName)) - - return resourceAwsTransferUserRead(d, meta) -} - -func resourceAwsTransferUserRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).transferconn - serverID, userName, err := decodeTransferUserId(d.Id()) - if err != nil { - return fmt.Errorf("error parsing Transfer User ID: %s", err) - } - - descOpts := &transfer.DescribeUserInput{ - UserName: aws.String(userName), - ServerId: aws.String(serverID), - } - - log.Printf("[DEBUG] Describe Transfer User Option: %#v", descOpts) - - resp, err := conn.DescribeUser(descOpts) - if err != nil { - if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Transfer User (%s) for Server (%s) not found, removing from state", userName, serverID) - d.SetId("") - return nil - } - return fmt.Errorf("error reading Transfer User (%s): %s", d.Id(), err) - } - - d.Set("server_id", resp.ServerId) - d.Set("user_name", resp.User.UserName) - d.Set("arn", resp.User.Arn) - d.Set("home_directory", resp.User.HomeDirectory) - d.Set("policy", resp.User.Policy) - d.Set("role", resp.User.Role) - - if err := d.Set("tags", tagsToMapTransfer(resp.User.Tags)); err != nil { - return fmt.Errorf("Error setting tags: %s", err) - } - return nil -} - -func resourceAwsTransferUserUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).transferconn - updateFlag := false - serverID, userName, err := decodeTransferUserId(d.Id()) - if err != nil { - return fmt.Errorf("error parsing Transfer User ID: %s", err) - } - - updateOpts := &transfer.UpdateUserInput{ - UserName: aws.String(userName), - ServerId: aws.String(serverID), - } - - if d.HasChange("home_directory") { - updateOpts.HomeDirectory = aws.String(d.Get("home_directory").(string)) - updateFlag = true - } - - if d.HasChange("policy") { - updateOpts.Policy = aws.String(d.Get("policy").(string)) - updateFlag = true - } - - if d.HasChange("role") { - updateOpts.Role = aws.String(d.Get("role").(string)) - updateFlag = true - } - - if updateFlag { - _, err := conn.UpdateUser(updateOpts) - if err != nil { - if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Transfer User (%s) for Server (%s) not found, removing from state", userName, serverID) - d.SetId("") - return nil - } - return fmt.Errorf("error updating Transfer User (%s): %s", d.Id(), err) - } - } - - if err := setTagsTransfer(conn, d); err != nil { - return fmt.Errorf("Error update tags: %s", err) - } - - return resourceAwsTransferUserRead(d, meta) -} - -func resourceAwsTransferUserDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).transferconn - serverID, userName, err := decodeTransferUserId(d.Id()) - if err != nil { - return fmt.Errorf("error parsing Transfer User ID: %s", err) - } - - delOpts := &transfer.DeleteUserInput{ - UserName: aws.String(userName), - ServerId: aws.String(serverID), - } - - log.Printf("[DEBUG] Delete Transfer User Option: %#v", delOpts) - - _, err = conn.DeleteUser(delOpts) - if err != nil { - if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { - return nil - } - return fmt.Errorf("error deleting Transfer User (%s) for Server(%s): %s", userName, serverID, err) - } - - if err := waitForTransferUserDeletion(conn, serverID, userName); err != nil { - return fmt.Errorf("error waiting for Transfer User (%s) for Server (%s): %s", userName, serverID, err) - } - - return nil -} - -func decodeTransferUserId(id string) (string, string, error) { - idParts := strings.SplitN(id, "/", 2) - if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { - return "", "", fmt.Errorf("unexpected format of ID (%s), expected SERVERID/USERNAME", id) - } - return idParts[0], idParts[1], nil -} - -func waitForTransferUserDeletion(conn *transfer.Transfer, serverID, userName string) error { - params := &transfer.DescribeUserInput{ - ServerId: aws.String(serverID), - UserName: aws.String(userName), - } - - return resource.Retry(10*time.Minute, func() *resource.RetryError { - _, err := conn.DescribeUser(params) - - if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { - return nil - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return resource.RetryableError(fmt.Errorf("Transfer User (%s) for Server (%s) still exists", userName, serverID)) - }) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go deleted file mode 100644 index cd4ee44c1..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go +++ /dev/null @@ -1,262 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVolumeAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVolumeAttachmentCreate, - Read: resourceAwsVolumeAttachmentRead, - Update: resourceAwsVolumeAttachmentUpdate, - Delete: resourceAwsVolumeAttachmentDelete, - - Schema: map[string]*schema.Schema{ - "device_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "instance_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "volume_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "force_detach": { - Type: schema.TypeBool, - Optional: true, - }, - "skip_destroy": { - Type: schema.TypeBool, - Optional: true, - }, - }, - } -} - -func resourceAwsVolumeAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - name := d.Get("device_name").(string) - iID := d.Get("instance_id").(string) - vID := d.Get("volume_id").(string) - - // Find out if the volume is already attached to the instance, in which case - // we have nothing to do - request := &ec2.DescribeVolumesInput{ - VolumeIds: []*string{aws.String(vID)}, - Filters: []*ec2.Filter{ - { - Name: aws.String("attachment.instance-id"), - Values: []*string{aws.String(iID)}, - }, - { - Name: aws.String("attachment.device"), - Values: []*string{aws.String(name)}, - }, - }, - } - - vols, err := conn.DescribeVolumes(request) - if (err != nil) || (len(vols.Volumes) == 0) { - // This handles the situation where the instance is created by - // a spot request and whilst the request has been fulfilled the - // instance is not running yet - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending", "stopping"}, - Target: []string{"running", "stopped"}, - Refresh: InstanceStateRefreshFunc(conn, iID, []string{"terminated"}), - Timeout: 10 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for instance (%s) to become ready: %s", - iID, err) - } - - // not attached - opts := &ec2.AttachVolumeInput{ - Device: aws.String(name), - InstanceId: aws.String(iID), - VolumeId: aws.String(vID), - } - - log.Printf("[DEBUG] Attaching Volume (%s) to Instance (%s)", vID, iID) - _, err := conn.AttachVolume(opts) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - return fmt.Errorf("Error attaching volume (%s) to instance (%s), message: \"%s\", code: \"%s\"", - vID, iID, awsErr.Message(), awsErr.Code()) - } - return err - } - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"attaching"}, - Target: []string{"attached"}, - Refresh: volumeAttachmentStateRefreshFunc(conn, name, vID, iID), - Timeout: 5 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Volume (%s) to attach to Instance: %s, error: %s", - vID, iID, err) - } - - d.SetId(volumeAttachmentID(name, vID, iID)) - return resourceAwsVolumeAttachmentRead(d, meta) -} - -func volumeAttachmentStateRefreshFunc(conn *ec2.EC2, name, volumeID, instanceID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - request := &ec2.DescribeVolumesInput{ - VolumeIds: []*string{aws.String(volumeID)}, - Filters: []*ec2.Filter{ - { - Name: aws.String("attachment.device"), - Values: []*string{aws.String(name)}, - }, - { - Name: aws.String("attachment.instance-id"), - Values: []*string{aws.String(instanceID)}, - }, - }, - } - - resp, err := conn.DescribeVolumes(request) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - return nil, "failed", fmt.Errorf("code: %s, message: %s", awsErr.Code(), awsErr.Message()) - } - return nil, "failed", err - } - - if len(resp.Volumes) > 0 { - v := resp.Volumes[0] - for _, a := range v.Attachments { - if a.InstanceId != nil && *a.InstanceId == instanceID { - return a, *a.State, nil - } - } - } - // assume detached if volume count is 0 - return 42, "detached", nil - } -} - -func resourceAwsVolumeAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - request := &ec2.DescribeVolumesInput{ - VolumeIds: []*string{aws.String(d.Get("volume_id").(string))}, - Filters: []*ec2.Filter{ - { - Name: aws.String("attachment.device"), - Values: []*string{aws.String(d.Get("device_name").(string))}, - }, - { - Name: aws.String("attachment.instance-id"), - Values: []*string{aws.String(d.Get("instance_id").(string))}, - }, - }, - } - - vols, err := conn.DescribeVolumes(request) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVolume.NotFound" { - d.SetId("") - return nil - } - return fmt.Errorf("Error reading EC2 volume %s for instance: %s: %#v", d.Get("volume_id").(string), d.Get("instance_id").(string), err) - } - - if len(vols.Volumes) == 0 || *vols.Volumes[0].State == "available" { - log.Printf("[DEBUG] Volume Attachment (%s) not found, removing from state", d.Id()) - d.SetId("") - } - - return nil -} - -func resourceAwsVolumeAttachmentUpdate(d *schema.ResourceData, meta interface{}) error { - log.Printf("[DEBUG] Attaching Volume (%s) is updating which does nothing but updates a few params in state", d.Id()) - return nil -} - -func resourceAwsVolumeAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - if _, ok := d.GetOk("skip_destroy"); ok { - return nil - } - - name := d.Get("device_name").(string) - vID := d.Get("volume_id").(string) - iID := d.Get("instance_id").(string) - - opts := &ec2.DetachVolumeInput{ - Device: aws.String(name), - InstanceId: aws.String(iID), - VolumeId: aws.String(vID), - Force: aws.Bool(d.Get("force_detach").(bool)), - } - - _, err := conn.DetachVolume(opts) - if err != nil { - return fmt.Errorf("Failed to detach Volume (%s) from Instance (%s): %s", - vID, iID, err) - } - stateConf := &resource.StateChangeConf{ - Pending: []string{"detaching"}, - Target: []string{"detached"}, - Refresh: volumeAttachmentStateRefreshFunc(conn, name, vID, iID), - Timeout: 5 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - log.Printf("[DEBUG] Detaching Volume (%s) from Instance (%s)", vID, iID) - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Volume (%s) to detach from Instance: %s", - vID, iID) - } - - return nil -} - -func volumeAttachmentID(name, volumeID, instanceID string) string { - var buf bytes.Buffer - buf.WriteString(fmt.Sprintf("%s-", name)) - buf.WriteString(fmt.Sprintf("%s-", instanceID)) - buf.WriteString(fmt.Sprintf("%s-", volumeID)) - - return fmt.Sprintf("vai-%d", hashcode.String(buf.String())) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc.go deleted file mode 100644 index 83f8b6da4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc.go +++ /dev/null @@ -1,755 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsVpc() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpcCreate, - Read: resourceAwsVpcRead, - Update: resourceAwsVpcUpdate, - Delete: resourceAwsVpcDelete, - Importer: &schema.ResourceImporter{ - State: resourceAwsVpcInstanceImport, - }, - CustomizeDiff: resourceAwsVpcCustomizeDiff, - - SchemaVersion: 1, - MigrateState: resourceAwsVpcMigrateState, - - Schema: map[string]*schema.Schema{ - "cidr_block": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.CIDRNetwork(16, 28), - }, - - "instance_tenancy": { - Type: schema.TypeString, - Optional: true, - Default: ec2.TenancyDefault, - ValidateFunc: validation.StringInSlice([]string{ec2.TenancyDefault, ec2.TenancyDedicated}, false), - }, - - "enable_dns_hostnames": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "enable_dns_support": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - - "enable_classiclink": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "enable_classiclink_dns_support": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "assign_generated_ipv6_cidr_block": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - - "main_route_table_id": { - Type: schema.TypeString, - Computed: true, - }, - - "default_network_acl_id": { - Type: schema.TypeString, - Computed: true, - }, - - "dhcp_options_id": { - Type: schema.TypeString, - Computed: true, - }, - - "default_security_group_id": { - Type: schema.TypeString, - Computed: true, - }, - - "default_route_table_id": { - Type: schema.TypeString, - Computed: true, - }, - - "ipv6_association_id": { - Type: schema.TypeString, - Computed: true, - }, - - "ipv6_cidr_block": { - Type: schema.TypeString, - Computed: true, - }, - - "arn": { - Type: schema.TypeString, - Computed: true, - }, - - "tags": tagsSchema(), - - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsVpcCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Create the VPC - createOpts := &ec2.CreateVpcInput{ - CidrBlock: aws.String(d.Get("cidr_block").(string)), - InstanceTenancy: aws.String(d.Get("instance_tenancy").(string)), - AmazonProvidedIpv6CidrBlock: aws.Bool(d.Get("assign_generated_ipv6_cidr_block").(bool)), - } - - log.Printf("[DEBUG] VPC create config: %#v", *createOpts) - vpcResp, err := conn.CreateVpc(createOpts) - if err != nil { - return fmt.Errorf("Error creating VPC: %s", err) - } - - // Get the ID and store it - vpc := vpcResp.Vpc - d.SetId(*vpc.VpcId) - log.Printf("[INFO] VPC ID: %s", d.Id()) - - // Set partial mode and say that we setup the cidr block - d.Partial(true) - d.SetPartial("cidr_block") - - // Wait for the VPC to become available - log.Printf( - "[DEBUG] Waiting for VPC (%s) to become available", - d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"available"}, - Refresh: VPCStateRefreshFunc(conn, d.Id()), - Timeout: 10 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for VPC (%s) to become available: %s", - d.Id(), err) - } - - if len(vpc.Ipv6CidrBlockAssociationSet) > 0 && vpc.Ipv6CidrBlockAssociationSet[0] != nil { - log.Printf("[DEBUG] Waiting for EC2 VPC (%s) IPv6 CIDR to become associated", d.Id()) - if err := waitForEc2VpcIpv6CidrBlockAssociationCreate(conn, d.Id(), aws.StringValue(vpcResp.Vpc.Ipv6CidrBlockAssociationSet[0].AssociationId)); err != nil { - return fmt.Errorf("error waiting for EC2 VPC (%s) IPv6 CIDR to become associated: %s", d.Id(), err) - } - } - - // Update our attributes and return - return resourceAwsVpcUpdate(d, meta) -} - -func resourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Refresh the VPC state - vpcRaw, _, err := VPCStateRefreshFunc(conn, d.Id())() - if err != nil { - return err - } - if vpcRaw == nil { - d.SetId("") - return nil - } - - // VPC stuff - vpc := vpcRaw.(*ec2.Vpc) - vpcid := d.Id() - d.Set("cidr_block", vpc.CidrBlock) - d.Set("dhcp_options_id", vpc.DhcpOptionsId) - d.Set("instance_tenancy", vpc.InstanceTenancy) - - // ARN - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "ec2", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("vpc/%s", d.Id()), - }.String() - d.Set("arn", arn) - - // Tags - d.Set("tags", tagsToMap(vpc.Tags)) - - d.Set("owner_id", vpc.OwnerId) - - // Make sure those values are set, if an IPv6 block exists it'll be set in the loop - d.Set("assign_generated_ipv6_cidr_block", false) - d.Set("ipv6_association_id", "") - d.Set("ipv6_cidr_block", "") - - for _, a := range vpc.Ipv6CidrBlockAssociationSet { - if aws.StringValue(a.Ipv6CidrBlockState.State) == ec2.VpcCidrBlockStateCodeAssociated { //we can only ever have 1 IPv6 block associated at once - d.Set("assign_generated_ipv6_cidr_block", true) - d.Set("ipv6_association_id", a.AssociationId) - d.Set("ipv6_cidr_block", a.Ipv6CidrBlock) - } - } - - resp, err := awsVpcDescribeVpcAttribute("enableDnsSupport", vpcid, conn) - if err != nil { - return err - } - d.Set("enable_dns_support", resp.EnableDnsSupport.Value) - - resp, err = awsVpcDescribeVpcAttribute("enableDnsHostnames", vpcid, conn) - if err != nil { - return err - } - d.Set("enable_dns_hostnames", resp.EnableDnsHostnames.Value) - - describeClassiclinkOpts := &ec2.DescribeVpcClassicLinkInput{ - VpcIds: []*string{&vpcid}, - } - - // Classic Link is only available in regions that support EC2 Classic - respClassiclink, err := conn.DescribeVpcClassicLink(describeClassiclinkOpts) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "UnsupportedOperation" { - log.Printf("[WARN] VPC Classic Link is not supported in this region") - } else { - return err - } - } else { - classiclink_enabled := false - for _, v := range respClassiclink.Vpcs { - if *v.VpcId == vpcid { - if v.ClassicLinkEnabled != nil { - classiclink_enabled = *v.ClassicLinkEnabled - } - break - } - } - d.Set("enable_classiclink", classiclink_enabled) - } - - describeClassiclinkDnsOpts := &ec2.DescribeVpcClassicLinkDnsSupportInput{ - VpcIds: []*string{&vpcid}, - } - - respClassiclinkDnsSupport, err := conn.DescribeVpcClassicLinkDnsSupport(describeClassiclinkDnsOpts) - if err != nil { - if isAWSErr(err, "UnsupportedOperation", "The functionality you requested is not available in this region") || - isAWSErr(err, "AuthFailure", "This request has been administratively disabled") { - log.Printf("[WARN] VPC Classic Link DNS Support is not supported in this region") - } else { - return err - } - } else { - classiclinkdns_enabled := false - for _, v := range respClassiclinkDnsSupport.Vpcs { - if *v.VpcId == vpcid { - if v.ClassicLinkDnsSupported != nil { - classiclinkdns_enabled = *v.ClassicLinkDnsSupported - } - break - } - } - d.Set("enable_classiclink_dns_support", classiclinkdns_enabled) - } - - routeTableId, err := resourceAwsVpcSetMainRouteTable(conn, vpcid) - if err != nil { - log.Printf("[WARN] Unable to set Main Route Table: %s", err) - } - d.Set("main_route_table_id", routeTableId) - - if err := resourceAwsVpcSetDefaultNetworkAcl(conn, d); err != nil { - log.Printf("[WARN] Unable to set Default Network ACL: %s", err) - } - if err := resourceAwsVpcSetDefaultSecurityGroup(conn, d); err != nil { - log.Printf("[WARN] Unable to set Default Security Group: %s", err) - } - if err := resourceAwsVpcSetDefaultRouteTable(conn, d); err != nil { - log.Printf("[WARN] Unable to set Default Route Table: %s", err) - } - - return nil -} - -func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Turn on partial mode - d.Partial(true) - vpcid := d.Id() - if d.HasChange("enable_dns_hostnames") { - val := d.Get("enable_dns_hostnames").(bool) - modifyOpts := &ec2.ModifyVpcAttributeInput{ - VpcId: &vpcid, - EnableDnsHostnames: &ec2.AttributeBooleanValue{ - Value: &val, - }, - } - - log.Printf( - "[INFO] Modifying enable_dns_hostnames vpc attribute for %s: %s", - d.Id(), modifyOpts) - if _, err := conn.ModifyVpcAttribute(modifyOpts); err != nil { - return err - } - - d.SetPartial("enable_dns_hostnames") - } - - _, hasEnableDnsSupportOption := d.GetOk("enable_dns_support") - - if !hasEnableDnsSupportOption || d.HasChange("enable_dns_support") { - val := d.Get("enable_dns_support").(bool) - modifyOpts := &ec2.ModifyVpcAttributeInput{ - VpcId: &vpcid, - EnableDnsSupport: &ec2.AttributeBooleanValue{ - Value: &val, - }, - } - - log.Printf( - "[INFO] Modifying enable_dns_support vpc attribute for %s: %s", - d.Id(), modifyOpts) - if _, err := conn.ModifyVpcAttribute(modifyOpts); err != nil { - return err - } - - d.SetPartial("enable_dns_support") - } - - if d.HasChange("enable_classiclink") { - val := d.Get("enable_classiclink").(bool) - if val { - modifyOpts := &ec2.EnableVpcClassicLinkInput{ - VpcId: &vpcid, - } - log.Printf( - "[INFO] Modifying enable_classiclink vpc attribute for %s: %#v", - d.Id(), modifyOpts) - if _, err := conn.EnableVpcClassicLink(modifyOpts); err != nil { - return err - } - } else { - modifyOpts := &ec2.DisableVpcClassicLinkInput{ - VpcId: &vpcid, - } - log.Printf( - "[INFO] Modifying enable_classiclink vpc attribute for %s: %#v", - d.Id(), modifyOpts) - if _, err := conn.DisableVpcClassicLink(modifyOpts); err != nil { - return err - } - } - - d.SetPartial("enable_classiclink") - } - - if d.HasChange("enable_classiclink_dns_support") { - val := d.Get("enable_classiclink_dns_support").(bool) - if val { - modifyOpts := &ec2.EnableVpcClassicLinkDnsSupportInput{ - VpcId: &vpcid, - } - log.Printf( - "[INFO] Modifying enable_classiclink_dns_support vpc attribute for %s: %#v", - d.Id(), modifyOpts) - if _, err := conn.EnableVpcClassicLinkDnsSupport(modifyOpts); err != nil { - return err - } - } else { - modifyOpts := &ec2.DisableVpcClassicLinkDnsSupportInput{ - VpcId: &vpcid, - } - log.Printf( - "[INFO] Modifying enable_classiclink_dns_support vpc attribute for %s: %#v", - d.Id(), modifyOpts) - if _, err := conn.DisableVpcClassicLinkDnsSupport(modifyOpts); err != nil { - return err - } - } - - d.SetPartial("enable_classiclink_dns_support") - } - - if d.HasChange("assign_generated_ipv6_cidr_block") && !d.IsNewResource() { - toAssign := d.Get("assign_generated_ipv6_cidr_block").(bool) - - log.Printf("[INFO] Modifying assign_generated_ipv6_cidr_block to %#v", toAssign) - - if toAssign { - modifyOpts := &ec2.AssociateVpcCidrBlockInput{ - VpcId: &vpcid, - AmazonProvidedIpv6CidrBlock: aws.Bool(toAssign), - } - log.Printf("[INFO] Enabling assign_generated_ipv6_cidr_block vpc attribute for %s: %#v", - d.Id(), modifyOpts) - resp, err := conn.AssociateVpcCidrBlock(modifyOpts) - if err != nil { - return err - } - - log.Printf("[DEBUG] Waiting for EC2 VPC (%s) IPv6 CIDR to become associated", d.Id()) - if err := waitForEc2VpcIpv6CidrBlockAssociationCreate(conn, d.Id(), aws.StringValue(resp.Ipv6CidrBlockAssociation.AssociationId)); err != nil { - return fmt.Errorf("error waiting for EC2 VPC (%s) IPv6 CIDR to become associated: %s", d.Id(), err) - } - } else { - associationID := d.Get("ipv6_association_id").(string) - modifyOpts := &ec2.DisassociateVpcCidrBlockInput{ - AssociationId: aws.String(associationID), - } - log.Printf("[INFO] Disabling assign_generated_ipv6_cidr_block vpc attribute for %s: %#v", - d.Id(), modifyOpts) - if _, err := conn.DisassociateVpcCidrBlock(modifyOpts); err != nil { - return err - } - - log.Printf("[DEBUG] Waiting for EC2 VPC (%s) IPv6 CIDR to become disassociated", d.Id()) - if err := waitForEc2VpcIpv6CidrBlockAssociationDelete(conn, d.Id(), associationID); err != nil { - return fmt.Errorf("error waiting for EC2 VPC (%s) IPv6 CIDR to become disassociated: %s", d.Id(), err) - } - } - - d.SetPartial("assign_generated_ipv6_cidr_block") - } - - if d.HasChange("instance_tenancy") && !d.IsNewResource() { - modifyOpts := &ec2.ModifyVpcTenancyInput{ - VpcId: aws.String(vpcid), - InstanceTenancy: aws.String(d.Get("instance_tenancy").(string)), - } - log.Printf( - "[INFO] Modifying instance_tenancy vpc attribute for %s: %#v", - d.Id(), modifyOpts) - if _, err := conn.ModifyVpcTenancy(modifyOpts); err != nil { - return err - } - - d.SetPartial("instance_tenancy") - } - - if err := setTags(conn, d); err != nil { - return err - } else { - d.SetPartial("tags") - } - - d.Partial(false) - return resourceAwsVpcRead(d, meta) -} - -func resourceAwsVpcDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - vpcID := d.Id() - deleteVpcOpts := &ec2.DeleteVpcInput{ - VpcId: &vpcID, - } - log.Printf("[INFO] Deleting VPC: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteVpc(deleteVpcOpts) - if err == nil { - return nil - } - - ec2err, ok := err.(awserr.Error) - if !ok { - return resource.NonRetryableError(err) - } - - switch ec2err.Code() { - case "InvalidVpcID.NotFound": - return nil - case "DependencyViolation": - return resource.RetryableError(err) - } - - return resource.NonRetryableError(fmt.Errorf("Error deleting VPC: %s", err)) - }) -} - -func resourceAwsVpcCustomizeDiff(diff *schema.ResourceDiff, v interface{}) error { - if diff.HasChange("instance_tenancy") { - old, new := diff.GetChange("instance_tenancy") - if old.(string) != ec2.TenancyDedicated || new.(string) != ec2.TenancyDefault { - diff.ForceNew("instance_tenancy") - } - } - - return nil -} - -// VPCStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// a VPC. -func VPCStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - describeVpcOpts := &ec2.DescribeVpcsInput{ - VpcIds: []*string{aws.String(id)}, - } - resp, err := conn.DescribeVpcs(describeVpcOpts) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpcID.NotFound" { - resp = nil - } else { - log.Printf("Error on VPCStateRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - vpc := resp.Vpcs[0] - return vpc, *vpc.State, nil - } -} - -func Ipv6CidrStateRefreshFunc(conn *ec2.EC2, id string, associationId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - describeVpcOpts := &ec2.DescribeVpcsInput{ - VpcIds: []*string{aws.String(id)}, - } - resp, err := conn.DescribeVpcs(describeVpcOpts) - - if isAWSErr(err, "InvalidVpcID.NotFound", "") { - return nil, "", nil - } - - if err != nil { - return nil, "", err - } - - if resp == nil || len(resp.Vpcs) == 0 || resp.Vpcs[0] == nil || resp.Vpcs[0].Ipv6CidrBlockAssociationSet == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - for _, association := range resp.Vpcs[0].Ipv6CidrBlockAssociationSet { - if aws.StringValue(association.AssociationId) == associationId { - return association, aws.StringValue(association.Ipv6CidrBlockState.State), nil - } - } - - return nil, "", nil - } -} - -func resourceAwsVpcSetDefaultNetworkAcl(conn *ec2.EC2, d *schema.ResourceData) error { - filter1 := &ec2.Filter{ - Name: aws.String("default"), - Values: []*string{aws.String("true")}, - } - filter2 := &ec2.Filter{ - Name: aws.String("vpc-id"), - Values: []*string{aws.String(d.Id())}, - } - describeNetworkACLOpts := &ec2.DescribeNetworkAclsInput{ - Filters: []*ec2.Filter{filter1, filter2}, - } - networkAclResp, err := conn.DescribeNetworkAcls(describeNetworkACLOpts) - - if err != nil { - return err - } - if v := networkAclResp.NetworkAcls; len(v) > 0 { - d.Set("default_network_acl_id", v[0].NetworkAclId) - } - - return nil -} - -func resourceAwsVpcSetDefaultSecurityGroup(conn *ec2.EC2, d *schema.ResourceData) error { - filter1 := &ec2.Filter{ - Name: aws.String("group-name"), - Values: []*string{aws.String("default")}, - } - filter2 := &ec2.Filter{ - Name: aws.String("vpc-id"), - Values: []*string{aws.String(d.Id())}, - } - describeSgOpts := &ec2.DescribeSecurityGroupsInput{ - Filters: []*ec2.Filter{filter1, filter2}, - } - securityGroupResp, err := conn.DescribeSecurityGroups(describeSgOpts) - - if err != nil { - return err - } - if v := securityGroupResp.SecurityGroups; len(v) > 0 { - d.Set("default_security_group_id", v[0].GroupId) - } - - return nil -} - -func resourceAwsVpcSetDefaultRouteTable(conn *ec2.EC2, d *schema.ResourceData) error { - filter1 := &ec2.Filter{ - Name: aws.String("association.main"), - Values: []*string{aws.String("true")}, - } - filter2 := &ec2.Filter{ - Name: aws.String("vpc-id"), - Values: []*string{aws.String(d.Id())}, - } - - findOpts := &ec2.DescribeRouteTablesInput{ - Filters: []*ec2.Filter{filter1, filter2}, - } - - resp, err := conn.DescribeRouteTables(findOpts) - if err != nil { - return err - } - - if len(resp.RouteTables) < 1 || resp.RouteTables[0] == nil { - return fmt.Errorf("Default Route table not found") - } - - // There Can Be Only 1 ... Default Route Table - d.Set("default_route_table_id", resp.RouteTables[0].RouteTableId) - - return nil -} - -func resourceAwsVpcSetMainRouteTable(conn *ec2.EC2, vpcid string) (string, error) { - filter1 := &ec2.Filter{ - Name: aws.String("association.main"), - Values: []*string{aws.String("true")}, - } - filter2 := &ec2.Filter{ - Name: aws.String("vpc-id"), - Values: []*string{aws.String(vpcid)}, - } - - findOpts := &ec2.DescribeRouteTablesInput{ - Filters: []*ec2.Filter{filter1, filter2}, - } - - resp, err := conn.DescribeRouteTables(findOpts) - if err != nil { - return "", err - } - - if len(resp.RouteTables) < 1 || resp.RouteTables[0] == nil { - return "", fmt.Errorf("Main Route table not found") - } - - // There Can Be Only 1 Main Route Table for a VPC - return aws.StringValue(resp.RouteTables[0].RouteTableId), nil -} - -func resourceAwsVpcInstanceImport( - d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("assign_generated_ipv6_cidr_block", false) - return []*schema.ResourceData{d}, nil -} - -func awsVpcDescribeVpcAttribute(attribute string, vpcId string, conn *ec2.EC2) (*ec2.DescribeVpcAttributeOutput, error) { - describeAttrOpts := &ec2.DescribeVpcAttributeInput{ - Attribute: aws.String(attribute), - VpcId: aws.String(vpcId), - } - resp, err := conn.DescribeVpcAttribute(describeAttrOpts) - if err != nil { - return nil, err - } - - return resp, nil -} - -// vpcDescribe returns EC2 API information about the specified VPC. -// If the VPC doesn't exist, return nil. -func vpcDescribe(conn *ec2.EC2, vpcId string) (*ec2.Vpc, error) { - resp, err := conn.DescribeVpcs(&ec2.DescribeVpcsInput{ - VpcIds: aws.StringSlice([]string{vpcId}), - }) - if err != nil { - if !isAWSErr(err, "InvalidVpcID.NotFound", "") { - return nil, err - } - resp = nil - } - - if resp == nil { - return nil, nil - } - - n := len(resp.Vpcs) - switch n { - case 0: - return nil, nil - - case 1: - return resp.Vpcs[0], nil - - default: - return nil, fmt.Errorf("Found %d VPCs for %s, expected 1", n, vpcId) - } -} - -func waitForEc2VpcIpv6CidrBlockAssociationCreate(conn *ec2.EC2, vpcID, associationID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ - ec2.VpcCidrBlockStateCodeAssociating, - ec2.VpcCidrBlockStateCodeDisassociated, - }, - Target: []string{ec2.VpcCidrBlockStateCodeAssociated}, - Refresh: Ipv6CidrStateRefreshFunc(conn, vpcID, associationID), - Timeout: 1 * time.Minute, - } - _, err := stateConf.WaitForState() - - return err -} - -func waitForEc2VpcIpv6CidrBlockAssociationDelete(conn *ec2.EC2, vpcID, associationID string) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ - ec2.VpcCidrBlockStateCodeAssociated, - ec2.VpcCidrBlockStateCodeDisassociating, - }, - Target: []string{ec2.VpcCidrBlockStateCodeDisassociated}, - Refresh: Ipv6CidrStateRefreshFunc(conn, vpcID, associationID), - Timeout: 1 * time.Minute, - NotFoundChecks: 1, - } - _, err := stateConf.WaitForState() - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options.go deleted file mode 100644 index c4baa0406..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options.go +++ /dev/null @@ -1,298 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpcDhcpOptions() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpcDhcpOptionsCreate, - Read: resourceAwsVpcDhcpOptionsRead, - Update: resourceAwsVpcDhcpOptionsUpdate, - Delete: resourceAwsVpcDhcpOptionsDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "domain_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "domain_name_servers": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "ntp_servers": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "netbios_node_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "netbios_name_servers": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - - "tags": tagsSchema(), - - "owner_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsVpcDhcpOptionsCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - setDHCPOption := func(key string) *ec2.NewDhcpConfiguration { - log.Printf("[DEBUG] Setting DHCP option %s...", key) - tfKey := strings.Replace(key, "-", "_", -1) - - value, ok := d.GetOk(tfKey) - if !ok { - return nil - } - - if v, ok := value.(string); ok { - return &ec2.NewDhcpConfiguration{ - Key: aws.String(key), - Values: []*string{ - aws.String(v), - }, - } - } - - if v, ok := value.([]interface{}); ok { - var s []*string - for _, attr := range v { - s = append(s, aws.String(attr.(string))) - } - - return &ec2.NewDhcpConfiguration{ - Key: aws.String(key), - Values: s, - } - } - - return nil - } - - createOpts := &ec2.CreateDhcpOptionsInput{ - DhcpConfigurations: []*ec2.NewDhcpConfiguration{ - setDHCPOption("domain-name"), - setDHCPOption("domain-name-servers"), - setDHCPOption("ntp-servers"), - setDHCPOption("netbios-node-type"), - setDHCPOption("netbios-name-servers"), - }, - } - - resp, err := conn.CreateDhcpOptions(createOpts) - if err != nil { - return fmt.Errorf("Error creating DHCP Options Set: %s", err) - } - - dos := resp.DhcpOptions - d.SetId(aws.StringValue(dos.DhcpOptionsId)) - log.Printf("[INFO] DHCP Options Set ID: %s", d.Id()) - - // Wait for the DHCP Options to become available - log.Printf("[DEBUG] Waiting for DHCP Options (%s) to become available", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"created"}, - Refresh: resourceDHCPOptionsStateRefreshFunc(conn, d.Id()), - Timeout: 5 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for DHCP Options (%s) to become available: %s", - d.Id(), err) - } - - return resourceAwsVpcDhcpOptionsUpdate(d, meta) -} - -func resourceAwsVpcDhcpOptionsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - req := &ec2.DescribeDhcpOptionsInput{ - DhcpOptionsIds: []*string{ - aws.String(d.Id()), - }, - } - - resp, err := conn.DescribeDhcpOptions(req) - if err != nil { - if isNoSuchDhcpOptionIDErr(err) { - log.Printf("[WARN] DHCP Options (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error retrieving DHCP Options: %s", err.Error()) - } - - if len(resp.DhcpOptions) == 0 { - return nil - } - - opts := resp.DhcpOptions[0] - d.Set("tags", tagsToMap(opts.Tags)) - d.Set("owner_id", opts.OwnerId) - - for _, cfg := range opts.DhcpConfigurations { - tfKey := strings.Replace(*cfg.Key, "-", "_", -1) - - if _, ok := d.Get(tfKey).(string); ok { - d.Set(tfKey, cfg.Values[0].Value) - } else { - values := make([]string, 0, len(cfg.Values)) - for _, v := range cfg.Values { - values = append(values, *v.Value) - } - - d.Set(tfKey, values) - } - } - - return nil -} - -func resourceAwsVpcDhcpOptionsUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - if err := setTags(conn, d); err != nil { - return err - } - - return resourceAwsVpcDhcpOptionsRead(d, meta) -} - -func resourceAwsVpcDhcpOptionsDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - return resource.Retry(3*time.Minute, func() *resource.RetryError { - log.Printf("[INFO] Deleting DHCP Options ID %s...", d.Id()) - _, err := conn.DeleteDhcpOptions(&ec2.DeleteDhcpOptionsInput{ - DhcpOptionsId: aws.String(d.Id()), - }) - - if err == nil { - return nil - } - - log.Printf("[WARN] %s", err) - - ec2err, ok := err.(awserr.Error) - if !ok { - return resource.RetryableError(err) - } - - switch ec2err.Code() { - case "InvalidDhcpOptionsID.NotFound", "InvalidDhcpOptionID.NotFound": - return nil - case "DependencyViolation": - // If it is a dependency violation, we want to disassociate - // all VPCs using the given DHCP Options ID, and retry deleting. - vpcs, err2 := findVPCsByDHCPOptionsID(conn, d.Id()) - if err2 != nil { - log.Printf("[ERROR] %s", err2) - return resource.RetryableError(err2) - } - - for _, vpc := range vpcs { - log.Printf("[INFO] Disassociating DHCP Options Set %s from VPC %s...", d.Id(), *vpc.VpcId) - if _, err := conn.AssociateDhcpOptions(&ec2.AssociateDhcpOptionsInput{ - DhcpOptionsId: aws.String("default"), - VpcId: vpc.VpcId, - }); err != nil { - return resource.RetryableError(err) - } - } - return resource.RetryableError(err) - default: - return resource.NonRetryableError(err) - } - }) -} - -func findVPCsByDHCPOptionsID(conn *ec2.EC2, id string) ([]*ec2.Vpc, error) { - req := &ec2.DescribeVpcsInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("dhcp-options-id"), - Values: []*string{ - aws.String(id), - }, - }, - }, - } - - resp, err := conn.DescribeVpcs(req) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpcID.NotFound" { - return nil, nil - } - return nil, err - } - - return resp.Vpcs, nil -} - -func resourceDHCPOptionsStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - DescribeDhcpOpts := &ec2.DescribeDhcpOptionsInput{ - DhcpOptionsIds: []*string{ - aws.String(id), - }, - } - - resp, err := conn.DescribeDhcpOptions(DescribeDhcpOpts) - if err != nil { - if isNoSuchDhcpOptionIDErr(err) { - resp = nil - } else { - log.Printf("Error on DHCPOptionsStateRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - dos := resp.DhcpOptions[0] - return dos, "created", nil - } -} - -func isNoSuchDhcpOptionIDErr(err error) bool { - return isAWSErr(err, "InvalidDhcpOptionID.NotFound", "") || isAWSErr(err, "InvalidDhcpOptionsID.NotFound", "") -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options_association.go deleted file mode 100644 index 6970aa93f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options_association.go +++ /dev/null @@ -1,96 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpcDhcpOptionsAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpcDhcpOptionsAssociationCreate, - Read: resourceAwsVpcDhcpOptionsAssociationRead, - Update: resourceAwsVpcDhcpOptionsAssociationUpdate, - Delete: resourceAwsVpcDhcpOptionsAssociationDelete, - - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Required: true, - }, - - "dhcp_options_id": { - Type: schema.TypeString, - Required: true, - }, - }, - } -} - -func resourceAwsVpcDhcpOptionsAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf( - "[INFO] Creating DHCP Options association: %s => %s", - d.Get("vpc_id").(string), - d.Get("dhcp_options_id").(string)) - - optsID := aws.String(d.Get("dhcp_options_id").(string)) - vpcID := aws.String(d.Get("vpc_id").(string)) - - if _, err := conn.AssociateDhcpOptions(&ec2.AssociateDhcpOptionsInput{ - DhcpOptionsId: optsID, - VpcId: vpcID, - }); err != nil { - return err - } - - // Set the ID and return - d.SetId(*optsID + "-" + *vpcID) - log.Printf("[INFO] Association ID: %s", d.Id()) - - return nil -} - -func resourceAwsVpcDhcpOptionsAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - // Get the VPC that this association belongs to - vpcRaw, _, err := VPCStateRefreshFunc(conn, d.Get("vpc_id").(string))() - - if err != nil { - return err - } - - if vpcRaw == nil { - return nil - } - - vpc := vpcRaw.(*ec2.Vpc) - if *vpc.VpcId != d.Get("vpc_id") || *vpc.DhcpOptionsId != d.Get("dhcp_options_id") { - log.Printf("[INFO] It seems the DHCP Options association is gone. Deleting reference from Graph...") - d.SetId("") - } - - return nil -} - -// DHCP Options Asociations cannot be updated. -func resourceAwsVpcDhcpOptionsAssociationUpdate(d *schema.ResourceData, meta interface{}) error { - return resourceAwsVpcDhcpOptionsAssociationCreate(d, meta) -} - -// AWS does not provide an API to disassociate a DHCP Options set from a VPC. -// So, we do this by setting the VPC to the default DHCP Options Set. -func resourceAwsVpcDhcpOptionsAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[INFO] Disassociating DHCP Options Set %s from VPC %s...", d.Get("dhcp_options_id"), d.Get("vpc_id")) - _, err := conn.AssociateDhcpOptions(&ec2.AssociateDhcpOptionsInput{ - DhcpOptionsId: aws.String("default"), - VpcId: aws.String(d.Get("vpc_id").(string)), - }) - - return err -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go deleted file mode 100644 index e9b4bd296..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go +++ /dev/null @@ -1,460 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsVpcEndpoint() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpcEndpointCreate, - Read: resourceAwsVpcEndpointRead, - Update: resourceAwsVpcEndpointUpdate, - Delete: resourceAwsVpcEndpointDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vpc_endpoint_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: ec2.VpcEndpointTypeGateway, - ValidateFunc: validation.StringInSlice([]string{ - ec2.VpcEndpointTypeGateway, - ec2.VpcEndpointTypeInterface, - }, false), - }, - "service_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "policy": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.ValidateJsonString, - StateFunc: func(v interface{}) string { - json, _ := structure.NormalizeJsonString(v) - return json - }, - }, - "route_table_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "subnet_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "private_dns_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "state": { - Type: schema.TypeString, - Computed: true, - }, - "prefix_list_id": { - Type: schema.TypeString, - Computed: true, - }, - "cidr_blocks": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "network_interface_ids": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "dns_entry": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "dns_name": { - Type: schema.TypeString, - Computed: true, - }, - "hosted_zone_id": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "auto_accept": { - Type: schema.TypeBool, - Optional: true, - }, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Update: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - } -} - -func resourceAwsVpcEndpointCreate(d *schema.ResourceData, meta interface{}) error { - if d.Get("vpc_endpoint_type").(string) == ec2.VpcEndpointTypeInterface && - d.Get("security_group_ids").(*schema.Set).Len() == 0 { - return errors.New("An Interface VPC Endpoint must always have at least one Security Group") - } - - conn := meta.(*AWSClient).ec2conn - - req := &ec2.CreateVpcEndpointInput{ - VpcId: aws.String(d.Get("vpc_id").(string)), - VpcEndpointType: aws.String(d.Get("vpc_endpoint_type").(string)), - ServiceName: aws.String(d.Get("service_name").(string)), - PrivateDnsEnabled: aws.Bool(d.Get("private_dns_enabled").(bool)), - } - - if v, ok := d.GetOk("policy"); ok { - policy, err := structure.NormalizeJsonString(v) - if err != nil { - return fmt.Errorf("policy contains an invalid JSON: %s", err) - } - req.PolicyDocument = aws.String(policy) - } - - setVpcEndpointCreateList(d, "route_table_ids", &req.RouteTableIds) - setVpcEndpointCreateList(d, "subnet_ids", &req.SubnetIds) - setVpcEndpointCreateList(d, "security_group_ids", &req.SecurityGroupIds) - - log.Printf("[DEBUG] Creating VPC Endpoint: %#v", req) - resp, err := conn.CreateVpcEndpoint(req) - if err != nil { - return fmt.Errorf("Error creating VPC Endpoint: %s", err) - } - - vpce := resp.VpcEndpoint - d.SetId(aws.StringValue(vpce.VpcEndpointId)) - - if _, ok := d.GetOk("auto_accept"); ok && aws.StringValue(vpce.State) == "pendingAcceptance" { - if err := vpcEndpointAccept(conn, d.Id(), aws.StringValue(vpce.ServiceName)); err != nil { - return err - } - } - - if err := vpcEndpointWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { - return err - } - - return resourceAwsVpcEndpointRead(d, meta) -} - -func resourceAwsVpcEndpointRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - vpce, state, err := vpcEndpointStateRefresh(conn, d.Id())() - if err != nil && state != "failed" { - return fmt.Errorf("Error reading VPC Endpoint: %s", err) - } - - terminalStates := map[string]bool{ - "deleted": true, - "deleting": true, - "failed": true, - "expired": true, - "rejected": true, - } - if _, ok := terminalStates[state]; ok { - log.Printf("[WARN] VPC Endpoint (%s) in state (%s), removing from state", d.Id(), state) - d.SetId("") - return nil - } - - return vpcEndpointAttributes(d, vpce.(*ec2.VpcEndpoint), conn) -} - -func resourceAwsVpcEndpointUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - if _, ok := d.GetOk("auto_accept"); ok && d.Get("state").(string) == "pendingAcceptance" { - if err := vpcEndpointAccept(conn, d.Id(), d.Get("service_name").(string)); err != nil { - return err - } - } - - req := &ec2.ModifyVpcEndpointInput{ - VpcEndpointId: aws.String(d.Id()), - } - - if d.HasChange("policy") { - policy, err := structure.NormalizeJsonString(d.Get("policy")) - if err != nil { - return fmt.Errorf("policy contains an invalid JSON: %s", err) - } - - if policy == "" { - req.ResetPolicy = aws.Bool(true) - } else { - req.PolicyDocument = aws.String(policy) - } - } - - setVpcEndpointUpdateLists(d, "route_table_ids", &req.AddRouteTableIds, &req.RemoveRouteTableIds) - setVpcEndpointUpdateLists(d, "subnet_ids", &req.AddSubnetIds, &req.RemoveSubnetIds) - setVpcEndpointUpdateLists(d, "security_group_ids", &req.AddSecurityGroupIds, &req.RemoveSecurityGroupIds) - - if d.HasChange("private_dns_enabled") { - req.PrivateDnsEnabled = aws.Bool(d.Get("private_dns_enabled").(bool)) - } - - log.Printf("[DEBUG] Updating VPC Endpoint: %#v", req) - if _, err := conn.ModifyVpcEndpoint(req); err != nil { - return fmt.Errorf("Error updating VPC Endpoint: %s", err) - } - - if err := vpcEndpointWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)); err != nil { - return err - } - - return resourceAwsVpcEndpointRead(d, meta) -} - -func resourceAwsVpcEndpointDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[DEBUG] Deleting VPC Endpoint: %s", d.Id()) - _, err := conn.DeleteVpcEndpoints(&ec2.DeleteVpcEndpointsInput{ - VpcEndpointIds: aws.StringSlice([]string{d.Id()}), - }) - if err != nil { - if isAWSErr(err, "InvalidVpcEndpointId.NotFound", "") { - log.Printf("[DEBUG] VPC Endpoint %s is already gone", d.Id()) - } else { - return fmt.Errorf("Error deleting VPC Endpoint: %s", err) - } - } - - if err := vpcEndpointWaitUntilDeleted(conn, d.Id(), d.Timeout(schema.TimeoutDelete)); err != nil { - return fmt.Errorf("error waiting for VPC Endpoint (%s) to delete: %s", d.Id(), err) - } - - return nil -} - -func vpcEndpointAccept(conn *ec2.EC2, vpceId, svcName string) error { - describeSvcReq := &ec2.DescribeVpcEndpointServiceConfigurationsInput{} - describeSvcReq.Filters = buildEC2AttributeFilterList( - map[string]string{ - "service-name": svcName, - }, - ) - - describeSvcResp, err := conn.DescribeVpcEndpointServiceConfigurations(describeSvcReq) - if err != nil { - return fmt.Errorf("Error reading VPC Endpoint Service: %s", err) - } - if describeSvcResp == nil || len(describeSvcResp.ServiceConfigurations) == 0 { - return fmt.Errorf("No matching VPC Endpoint Service found") - } - - acceptEpReq := &ec2.AcceptVpcEndpointConnectionsInput{ - ServiceId: describeSvcResp.ServiceConfigurations[0].ServiceId, - VpcEndpointIds: aws.StringSlice([]string{vpceId}), - } - - log.Printf("[DEBUG] Accepting VPC Endpoint connection: %#v", acceptEpReq) - _, err = conn.AcceptVpcEndpointConnections(acceptEpReq) - if err != nil { - return fmt.Errorf("Error accepting VPC Endpoint connection: %s", err) - } - - return nil -} - -func vpcEndpointStateRefresh(conn *ec2.EC2, vpceId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - log.Printf("[DEBUG] Reading VPC Endpoint: %s", vpceId) - resp, err := conn.DescribeVpcEndpoints(&ec2.DescribeVpcEndpointsInput{ - VpcEndpointIds: aws.StringSlice([]string{vpceId}), - }) - if err != nil { - if isAWSErr(err, "InvalidVpcEndpointId.NotFound", "") { - return "", "deleted", nil - } - - return nil, "", err - } - - n := len(resp.VpcEndpoints) - switch n { - case 0: - return "", "deleted", nil - - case 1: - vpce := resp.VpcEndpoints[0] - state := aws.StringValue(vpce.State) - // No use in retrying if the endpoint is in a failed state. - if state == "failed" { - return nil, state, errors.New("VPC Endpoint is in a failed state") - } - return vpce, state, nil - - default: - return nil, "", fmt.Errorf("Found %d VPC Endpoints for %s, expected 1", n, vpceId) - } - } -} - -func vpcEndpointWaitUntilAvailable(conn *ec2.EC2, vpceId string, timeout time.Duration) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"available", "pendingAcceptance"}, - Refresh: vpcEndpointStateRefresh(conn, vpceId), - Timeout: timeout, - Delay: 5 * time.Second, - MinTimeout: 5 * time.Second, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for VPC Endpoint (%s) to become available: %s", vpceId, err) - } - - return nil -} - -func vpcEndpointWaitUntilDeleted(conn *ec2.EC2, vpceId string, timeout time.Duration) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{"available", "pending", "deleting"}, - Target: []string{"deleted"}, - Refresh: vpcEndpointStateRefresh(conn, vpceId), - Timeout: timeout, - Delay: 5 * time.Second, - MinTimeout: 5 * time.Second, - } - - _, err := stateConf.WaitForState() - - return err -} - -func vpcEndpointAttributes(d *schema.ResourceData, vpce *ec2.VpcEndpoint, conn *ec2.EC2) error { - d.Set("state", vpce.State) - d.Set("vpc_id", vpce.VpcId) - - serviceName := aws.StringValue(vpce.ServiceName) - d.Set("service_name", serviceName) - // VPC endpoints don't have types in GovCloud, so set type to default if empty - if aws.StringValue(vpce.VpcEndpointType) == "" { - d.Set("vpc_endpoint_type", ec2.VpcEndpointTypeGateway) - } else { - d.Set("vpc_endpoint_type", vpce.VpcEndpointType) - } - - policy, err := structure.NormalizeJsonString(aws.StringValue(vpce.PolicyDocument)) - if err != nil { - return fmt.Errorf("policy contains an invalid JSON: %s", err) - } - d.Set("policy", policy) - - d.Set("route_table_ids", flattenStringList(vpce.RouteTableIds)) - - req := &ec2.DescribePrefixListsInput{} - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "prefix-list-name": serviceName, - }, - ) - resp, err := conn.DescribePrefixLists(req) - if err != nil { - return err - } - if resp != nil && len(resp.PrefixLists) > 0 { - if len(resp.PrefixLists) > 1 { - return fmt.Errorf("multiple prefix lists associated with the service name '%s'. Unexpected", serviceName) - } - - pl := resp.PrefixLists[0] - d.Set("prefix_list_id", pl.PrefixListId) - d.Set("cidr_blocks", flattenStringList(pl.Cidrs)) - } else { - d.Set("cidr_blocks", make([]string, 0)) - } - - d.Set("subnet_ids", flattenStringList(vpce.SubnetIds)) - d.Set("network_interface_ids", flattenStringList(vpce.NetworkInterfaceIds)) - - sgIds := make([]interface{}, 0, len(vpce.Groups)) - for _, group := range vpce.Groups { - sgIds = append(sgIds, aws.StringValue(group.GroupId)) - } - d.Set("security_group_ids", sgIds) - - d.Set("private_dns_enabled", vpce.PrivateDnsEnabled) - - dnsEntries := make([]interface{}, len(vpce.DnsEntries)) - for i, entry := range vpce.DnsEntries { - m := make(map[string]interface{}) - m["dns_name"] = aws.StringValue(entry.DnsName) - m["hosted_zone_id"] = aws.StringValue(entry.HostedZoneId) - dnsEntries[i] = m - } - d.Set("dns_entry", dnsEntries) - - return nil -} - -func setVpcEndpointCreateList(d *schema.ResourceData, key string, c *[]*string) { - if v, ok := d.GetOk(key); ok { - list := v.(*schema.Set).List() - if len(list) > 0 { - *c = expandStringList(list) - } - } -} - -func setVpcEndpointUpdateLists(d *schema.ResourceData, key string, a, r *[]*string) { - if d.HasChange(key) { - o, n := d.GetChange(key) - os := o.(*schema.Set) - ns := n.(*schema.Set) - - add := expandStringList(ns.Difference(os).List()) - if len(add) > 0 { - *a = add - } - - remove := expandStringList(os.Difference(ns).List()) - if len(remove) > 0 { - *r = remove - } - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_connection_notification.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_connection_notification.go deleted file mode 100644 index be6f99035..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_connection_notification.go +++ /dev/null @@ -1,155 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpcEndpointConnectionNotification() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpcEndpointConnectionNotificationCreate, - Read: resourceAwsVpcEndpointConnectionNotificationRead, - Update: resourceAwsVpcEndpointConnectionNotificationUpdate, - Delete: resourceAwsVpcEndpointConnectionNotificationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "vpc_endpoint_service_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"vpc_endpoint_id"}, - }, - "vpc_endpoint_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"vpc_endpoint_service_id"}, - }, - "connection_notification_arn": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateArn, - }, - "connection_events": { - Type: schema.TypeSet, - Required: true, - MinItems: 1, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "state": { - Type: schema.TypeString, - Computed: true, - }, - "notification_type": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsVpcEndpointConnectionNotificationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.CreateVpcEndpointConnectionNotificationInput{ - ConnectionNotificationArn: aws.String(d.Get("connection_notification_arn").(string)), - ConnectionEvents: expandStringSet(d.Get("connection_events").(*schema.Set)), - } - if v, ok := d.GetOk("vpc_endpoint_service_id"); ok { - req.ServiceId = aws.String(v.(string)) - } else if v, ok := d.GetOk("vpc_endpoint_id"); ok { - req.VpcEndpointId = aws.String(v.(string)) - } else { - return fmt.Errorf( - "One of ['vpc_endpoint_service_id', 'vpc_endpoint_id'] must be set to create a VPC Endpoint connection notification") - } - - log.Printf("[DEBUG] Creating VPC Endpoint connection notification: %#v", req) - resp, err := conn.CreateVpcEndpointConnectionNotification(req) - if err != nil { - return fmt.Errorf("Error creating VPC Endpoint connection notification: %s", err.Error()) - } - - d.SetId(aws.StringValue(resp.ConnectionNotification.ConnectionNotificationId)) - - return resourceAwsVpcEndpointConnectionNotificationRead(d, meta) -} - -func resourceAwsVpcEndpointConnectionNotificationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - resp, err := conn.DescribeVpcEndpointConnectionNotifications(&ec2.DescribeVpcEndpointConnectionNotificationsInput{ - ConnectionNotificationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, "InvalidConnectionNotification", "") { - log.Printf("[WARN] VPC Endpoint connection notification (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return fmt.Errorf("Error reading VPC Endpoint connection notification: %s", err.Error()) - } - - return vpcEndpointConnectionNotificationAttributes(d, resp.ConnectionNotificationSet[0]) -} - -func resourceAwsVpcEndpointConnectionNotificationUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.ModifyVpcEndpointConnectionNotificationInput{ - ConnectionNotificationId: aws.String(d.Id()), - } - - if d.HasChange("connection_notification_arn") { - req.ConnectionNotificationArn = aws.String(d.Get("connection_notification_arn").(string)) - } - - if d.HasChange("connection_events") { - req.ConnectionEvents = expandStringSet(d.Get("connection_events").(*schema.Set)) - } - - log.Printf("[DEBUG] Updating VPC Endpoint connection notification: %#v", req) - if _, err := conn.ModifyVpcEndpointConnectionNotification(req); err != nil { - return fmt.Errorf("Error updating VPC Endpoint connection notification: %s", err.Error()) - } - - return resourceAwsVpcEndpointConnectionNotificationRead(d, meta) -} - -func resourceAwsVpcEndpointConnectionNotificationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[DEBUG] Deleting VPC Endpoint connection notification: %s", d.Id()) - _, err := conn.DeleteVpcEndpointConnectionNotifications(&ec2.DeleteVpcEndpointConnectionNotificationsInput{ - ConnectionNotificationIds: aws.StringSlice([]string{d.Id()}), - }) - if err != nil { - if isAWSErr(err, "InvalidConnectionNotification", "") { - log.Printf("[DEBUG] VPC Endpoint connection notification %s is already gone", d.Id()) - } else { - return fmt.Errorf("Error deleting VPC Endpoint connection notification: %s", err.Error()) - } - } - - return nil -} - -func vpcEndpointConnectionNotificationAttributes(d *schema.ResourceData, cn *ec2.ConnectionNotification) error { - d.Set("vpc_endpoint_service_id", cn.ServiceId) - d.Set("vpc_endpoint_id", cn.VpcEndpointId) - d.Set("connection_notification_arn", cn.ConnectionNotificationArn) - d.Set("connection_events", flattenStringList(cn.ConnectionEvents)) - d.Set("state", cn.ConnectionNotificationState) - d.Set("notification_type", cn.ConnectionNotificationType) - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_route_table_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_route_table_association.go deleted file mode 100644 index 60a80bf06..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_route_table_association.go +++ /dev/null @@ -1,143 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpcEndpointRouteTableAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpcEndpointRouteTableAssociationCreate, - Read: resourceAwsVpcEndpointRouteTableAssociationRead, - Delete: resourceAwsVpcEndpointRouteTableAssociationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "vpc_endpoint_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "route_table_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsVpcEndpointRouteTableAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - endpointId := d.Get("vpc_endpoint_id").(string) - rtId := d.Get("route_table_id").(string) - - _, err := findResourceVpcEndpoint(conn, endpointId) - if err != nil { - return err - } - - _, err = conn.ModifyVpcEndpoint(&ec2.ModifyVpcEndpointInput{ - VpcEndpointId: aws.String(endpointId), - AddRouteTableIds: aws.StringSlice([]string{rtId}), - }) - if err != nil { - return fmt.Errorf("Error creating VPC Endpoint/Route Table association: %s", err.Error()) - } - - d.SetId(vpcEndpointIdRouteTableIdHash(endpointId, rtId)) - - return resourceAwsVpcEndpointRouteTableAssociationRead(d, meta) -} - -func resourceAwsVpcEndpointRouteTableAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - endpointId := d.Get("vpc_endpoint_id").(string) - rtId := d.Get("route_table_id").(string) - - vpce, err := findResourceVpcEndpoint(conn, endpointId) - if err != nil { - if isAWSErr(err, "InvalidVpcEndpointId.NotFound", "") { - log.Printf("[WARN] VPC Endpoint (%s) not found, removing VPC Endpoint/Route Table association (%s) from state", endpointId, d.Id()) - d.SetId("") - return nil - } - - return err - } - - found := false - for _, id := range vpce.RouteTableIds { - if aws.StringValue(id) == rtId { - found = true - break - } - } - if !found { - log.Printf("[WARN] VPC Endpoint/Route Table association (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return nil -} - -func resourceAwsVpcEndpointRouteTableAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - endpointId := d.Get("vpc_endpoint_id").(string) - rtId := d.Get("route_table_id").(string) - - _, err := conn.ModifyVpcEndpoint(&ec2.ModifyVpcEndpointInput{ - VpcEndpointId: aws.String(endpointId), - RemoveRouteTableIds: aws.StringSlice([]string{rtId}), - }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if !ok { - return fmt.Errorf("Error deleting VPC Endpoint/Route Table association: %s", err.Error()) - } - - switch ec2err.Code() { - case "InvalidVpcEndpointId.NotFound": - fallthrough - case "InvalidRouteTableId.NotFound": - fallthrough - case "InvalidParameter": - log.Printf("[DEBUG] VPC Endpoint/Route Table association is already gone") - default: - return fmt.Errorf("Error deleting VPC Endpoint/Route Table association: %s", err.Error()) - } - } - - return nil -} - -func findResourceVpcEndpoint(conn *ec2.EC2, id string) (*ec2.VpcEndpoint, error) { - resp, err := conn.DescribeVpcEndpoints(&ec2.DescribeVpcEndpointsInput{ - VpcEndpointIds: aws.StringSlice([]string{id}), - }) - if err != nil { - return nil, err - } - - if resp.VpcEndpoints == nil || len(resp.VpcEndpoints) == 0 { - return nil, fmt.Errorf("No VPC Endpoints were found for %s", id) - } - - return resp.VpcEndpoints[0], nil -} - -func vpcEndpointIdRouteTableIdHash(endpointId, rtId string) string { - return fmt.Sprintf("a-%s%d", endpointId, hashcode.String(rtId)) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_service.go deleted file mode 100644 index 56775f6e5..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_service.go +++ /dev/null @@ -1,279 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpcEndpointService() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpcEndpointServiceCreate, - Read: resourceAwsVpcEndpointServiceRead, - Update: resourceAwsVpcEndpointServiceUpdate, - Delete: resourceAwsVpcEndpointServiceDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "acceptance_required": { - Type: schema.TypeBool, - Required: true, - }, - "network_load_balancer_arns": { - Type: schema.TypeSet, - Required: true, - MinItems: 1, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "allowed_principals": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "state": { - Type: schema.TypeString, - Computed: true, - }, - "service_name": { - Type: schema.TypeString, - Computed: true, - }, - "service_type": { - Type: schema.TypeString, - Computed: true, - }, - "availability_zones": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - Set: schema.HashString, - }, - "private_dns_name": { - Type: schema.TypeString, - Computed: true, - }, - "base_endpoint_dns_names": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, - Set: schema.HashString, - }, - }, - } -} - -func resourceAwsVpcEndpointServiceCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.CreateVpcEndpointServiceConfigurationInput{ - AcceptanceRequired: aws.Bool(d.Get("acceptance_required").(bool)), - NetworkLoadBalancerArns: expandStringSet(d.Get("network_load_balancer_arns").(*schema.Set)), - } - - log.Printf("[DEBUG] Creating VPC Endpoint Service configuration: %#v", req) - resp, err := conn.CreateVpcEndpointServiceConfiguration(req) - if err != nil { - return fmt.Errorf("Error creating VPC Endpoint Service configuration: %s", err.Error()) - } - - d.SetId(aws.StringValue(resp.ServiceConfiguration.ServiceId)) - - if err := vpcEndpointServiceWaitUntilAvailable(d, conn); err != nil { - return err - } - - return resourceAwsVpcEndpointServiceUpdate(d, meta) -} - -func resourceAwsVpcEndpointServiceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - svcCfg, state, err := vpcEndpointServiceStateRefresh(conn, d.Id())() - if err != nil && state != ec2.ServiceStateFailed { - return fmt.Errorf("Error reading VPC Endpoint Service: %s", err.Error()) - } - - terminalStates := map[string]bool{ - ec2.ServiceStateDeleted: true, - ec2.ServiceStateDeleting: true, - ec2.ServiceStateFailed: true, - } - if _, ok := terminalStates[state]; ok { - log.Printf("[WARN] VPC Endpoint Service (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return vpcEndpointServiceAttributes(d, svcCfg.(*ec2.ServiceConfiguration), conn) -} - -func resourceAwsVpcEndpointServiceUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - d.Partial(true) - svcId := d.Id() - - modifyCfgReq := &ec2.ModifyVpcEndpointServiceConfigurationInput{ - ServiceId: aws.String(svcId), - } - modifyCfg := false - if d.HasChange("acceptance_required") { - modifyCfgReq.AcceptanceRequired = aws.Bool(d.Get("acceptance_required").(bool)) - modifyCfg = true - } - if setVpcEndpointServiceUpdateLists(d, "network_load_balancer_arns", - &modifyCfgReq.AddNetworkLoadBalancerArns, &modifyCfgReq.RemoveNetworkLoadBalancerArns) { - modifyCfg = true - } - if modifyCfg { - log.Printf("[DEBUG] Modifying VPC Endpoint Service configuration: %#v", modifyCfgReq) - if _, err := conn.ModifyVpcEndpointServiceConfiguration(modifyCfgReq); err != nil { - return fmt.Errorf("Error modifying VPC Endpoint Service configuration: %s", err.Error()) - } - if err := vpcEndpointServiceWaitUntilAvailable(d, conn); err != nil { - return err - } - - d.SetPartial("network_load_balancer_arns") - } - - modifyPermReq := &ec2.ModifyVpcEndpointServicePermissionsInput{ - ServiceId: aws.String(svcId), - } - if setVpcEndpointServiceUpdateLists(d, "allowed_principals", - &modifyPermReq.AddAllowedPrincipals, &modifyPermReq.RemoveAllowedPrincipals) { - log.Printf("[DEBUG] Modifying VPC Endpoint Service permissions: %#v", modifyPermReq) - if _, err := conn.ModifyVpcEndpointServicePermissions(modifyPermReq); err != nil { - return fmt.Errorf("Error modifying VPC Endpoint Service permissions: %s", err.Error()) - } - - d.SetPartial("allowed_principals") - } - - d.Partial(false) - return resourceAwsVpcEndpointServiceRead(d, meta) -} - -func resourceAwsVpcEndpointServiceDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[DEBUG] Deleting VPC Endpoint Service: %s", d.Id()) - _, err := conn.DeleteVpcEndpointServiceConfigurations(&ec2.DeleteVpcEndpointServiceConfigurationsInput{ - ServiceIds: aws.StringSlice([]string{d.Id()}), - }) - if err != nil { - if isAWSErr(err, "InvalidVpcEndpointServiceId.NotFound", "") { - log.Printf("[DEBUG] VPC Endpoint Service %s is already gone", d.Id()) - } else { - return fmt.Errorf("Error deleting VPC Endpoint Service: %s", err.Error()) - } - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{ec2.ServiceStateAvailable, ec2.ServiceStateDeleting}, - Target: []string{ec2.ServiceStateDeleted}, - Refresh: vpcEndpointServiceStateRefresh(conn, d.Id()), - Timeout: 10 * time.Minute, - Delay: 5 * time.Second, - MinTimeout: 5 * time.Second, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for VPC Endpoint Service %s to delete: %s", d.Id(), err.Error()) - } - - return nil -} - -func vpcEndpointServiceStateRefresh(conn *ec2.EC2, svcId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - log.Printf("[DEBUG] Reading VPC Endpoint Service Configuration: %s", svcId) - resp, err := conn.DescribeVpcEndpointServiceConfigurations(&ec2.DescribeVpcEndpointServiceConfigurationsInput{ - ServiceIds: aws.StringSlice([]string{svcId}), - }) - if err != nil { - if isAWSErr(err, "InvalidVpcEndpointServiceId.NotFound", "") { - return false, ec2.ServiceStateDeleted, nil - } - - return nil, "", err - } - - svcCfg := resp.ServiceConfigurations[0] - state := aws.StringValue(svcCfg.ServiceState) - // No use in retrying if the endpoint service is in a failed state. - if state == ec2.ServiceStateFailed { - return nil, state, errors.New("VPC Endpoint Service is in a failed state") - } - return svcCfg, state, nil - } -} - -func vpcEndpointServiceWaitUntilAvailable(d *schema.ResourceData, conn *ec2.EC2) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{ec2.ServiceStatePending}, - Target: []string{ec2.ServiceStateAvailable}, - Refresh: vpcEndpointServiceStateRefresh(conn, d.Id()), - Timeout: 10 * time.Minute, - Delay: 5 * time.Second, - MinTimeout: 5 * time.Second, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for VPC Endpoint Service %s to become available: %s", d.Id(), err.Error()) - } - - return nil -} - -func vpcEndpointServiceAttributes(d *schema.ResourceData, svcCfg *ec2.ServiceConfiguration, conn *ec2.EC2) error { - d.Set("acceptance_required", svcCfg.AcceptanceRequired) - d.Set("network_load_balancer_arns", flattenStringList(svcCfg.NetworkLoadBalancerArns)) - d.Set("state", svcCfg.ServiceState) - d.Set("service_name", svcCfg.ServiceName) - d.Set("service_type", svcCfg.ServiceType[0].ServiceType) - d.Set("availability_zones", flattenStringList(svcCfg.AvailabilityZones)) - d.Set("private_dns_name", svcCfg.PrivateDnsName) - d.Set("base_endpoint_dns_names", flattenStringList(svcCfg.BaseEndpointDnsNames)) - - resp, err := conn.DescribeVpcEndpointServicePermissions(&ec2.DescribeVpcEndpointServicePermissionsInput{ - ServiceId: aws.String(d.Id()), - }) - if err != nil { - return err - } - d.Set("allowed_principals", flattenVpcEndpointServiceAllowedPrincipals(resp.AllowedPrincipals)) - - return nil -} - -func setVpcEndpointServiceUpdateLists(d *schema.ResourceData, key string, a, r *[]*string) bool { - if !d.HasChange(key) { - return false - } - - o, n := d.GetChange(key) - os := o.(*schema.Set) - ns := n.(*schema.Set) - - add := expandStringList(ns.Difference(os).List()) - if len(add) > 0 { - *a = add - } - - remove := expandStringList(os.Difference(ns).List()) - if len(remove) > 0 { - *r = remove - } - - return true -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_service_allowed_principal.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_service_allowed_principal.go deleted file mode 100644 index f34a054f8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_service_allowed_principal.go +++ /dev/null @@ -1,123 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpcEndpointServiceAllowedPrincipal() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpcEndpointServiceAllowedPrincipalCreate, - Read: resourceAwsVpcEndpointServiceAllowedPrincipalRead, - Delete: resourceAwsVpcEndpointServiceAllowedPrincipalDelete, - - Schema: map[string]*schema.Schema{ - "vpc_endpoint_service_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "principal_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsVpcEndpointServiceAllowedPrincipalCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - svcId := d.Get("vpc_endpoint_service_id").(string) - arn := d.Get("principal_arn").(string) - - _, err := findResourceVpcEndpointServiceAllowedPrincipals(conn, svcId) - if err != nil { - return err - } - - _, err = conn.ModifyVpcEndpointServicePermissions(&ec2.ModifyVpcEndpointServicePermissionsInput{ - ServiceId: aws.String(svcId), - AddAllowedPrincipals: aws.StringSlice([]string{arn}), - }) - if err != nil { - return fmt.Errorf("Error creating VPC Endpoint Service allowed principal: %s", err.Error()) - } - - d.SetId(vpcEndpointServiceIdPrincipalArnHash(svcId, arn)) - - return resourceAwsVpcEndpointServiceAllowedPrincipalRead(d, meta) -} - -func resourceAwsVpcEndpointServiceAllowedPrincipalRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - svcId := d.Get("vpc_endpoint_service_id").(string) - arn := d.Get("principal_arn").(string) - - principals, err := findResourceVpcEndpointServiceAllowedPrincipals(conn, svcId) - if err != nil { - if isAWSErr(err, "InvalidVpcEndpointServiceId.NotFound", "") { - log.Printf("[WARN]VPC Endpoint Service (%s) not found, removing VPC Endpoint Service allowed principal (%s) from state", svcId, d.Id()) - d.SetId("") - return nil - } - - return err - } - - found := false - for _, principal := range principals { - if aws.StringValue(principal.Principal) == arn { - found = true - break - } - } - if !found { - log.Printf("[WARN] VPC Endpoint Service allowed principal (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return nil -} - -func resourceAwsVpcEndpointServiceAllowedPrincipalDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - svcId := d.Get("vpc_endpoint_service_id").(string) - arn := d.Get("principal_arn").(string) - - _, err := conn.ModifyVpcEndpointServicePermissions(&ec2.ModifyVpcEndpointServicePermissionsInput{ - ServiceId: aws.String(svcId), - RemoveAllowedPrincipals: aws.StringSlice([]string{arn}), - }) - if err != nil { - if !isAWSErr(err, "InvalidVpcEndpointServiceId.NotFound", "") { - return fmt.Errorf("Error deleting VPC Endpoint Service allowed principal: %s", err.Error()) - } - } - - return nil -} - -func findResourceVpcEndpointServiceAllowedPrincipals(conn *ec2.EC2, id string) ([]*ec2.AllowedPrincipal, error) { - resp, err := conn.DescribeVpcEndpointServicePermissions(&ec2.DescribeVpcEndpointServicePermissionsInput{ - ServiceId: aws.String(id), - }) - if err != nil { - return nil, err - } - - return resp.AllowedPrincipals, nil -} - -func vpcEndpointServiceIdPrincipalArnHash(svcId, arn string) string { - return fmt.Sprintf("a-%s%d", svcId, hashcode.String(arn)) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_subnet_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_subnet_association.go deleted file mode 100644 index 0527eb143..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_subnet_association.go +++ /dev/null @@ -1,156 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpcEndpointSubnetAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpcEndpointSubnetAssociationCreate, - Read: resourceAwsVpcEndpointSubnetAssociationRead, - Delete: resourceAwsVpcEndpointSubnetAssociationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "vpc_endpoint_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "subnet_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - } -} - -func resourceAwsVpcEndpointSubnetAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - endpointId := d.Get("vpc_endpoint_id").(string) - snId := d.Get("subnet_id").(string) - - _, err := findResourceVpcEndpoint(conn, endpointId) - if err != nil { - return err - } - - // See https://github.com/terraform-providers/terraform-provider-aws/issues/3382. - // Prevent concurrent subnet association requests and delay between requests. - mk := "vpc_endpoint_subnet_association_" + endpointId - awsMutexKV.Lock(mk) - defer awsMutexKV.Unlock(mk) - - c := &resource.StateChangeConf{ - Delay: 1 * time.Minute, - Timeout: 3 * time.Minute, - Target: []string{"ok"}, - Refresh: func() (interface{}, string, error) { - res, err := conn.ModifyVpcEndpoint(&ec2.ModifyVpcEndpointInput{ - VpcEndpointId: aws.String(endpointId), - AddSubnetIds: aws.StringSlice([]string{snId}), - }) - return res, "ok", err - }, - } - _, err = c.WaitForState() - if err != nil { - return fmt.Errorf("Error creating Vpc Endpoint/Subnet association: %s", err) - } - - d.SetId(vpcEndpointSubnetAssociationId(endpointId, snId)) - - if err := vpcEndpointWaitUntilAvailable(conn, endpointId, d.Timeout(schema.TimeoutCreate)); err != nil { - return err - } - - return resourceAwsVpcEndpointSubnetAssociationRead(d, meta) -} - -func resourceAwsVpcEndpointSubnetAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - endpointId := d.Get("vpc_endpoint_id").(string) - snId := d.Get("subnet_id").(string) - - vpce, err := findResourceVpcEndpoint(conn, endpointId) - if err != nil { - if isAWSErr(err, "InvalidVpcEndpointId.NotFound", "") { - log.Printf("[WARN] Vpc Endpoint (%s) not found, removing Vpc Endpoint/Subnet association (%s) from state", endpointId, d.Id()) - d.SetId("") - return nil - } - - return err - } - - found := false - for _, id := range vpce.SubnetIds { - if aws.StringValue(id) == snId { - found = true - break - } - } - if !found { - log.Printf("[WARN] Vpc Endpoint/Subnet association (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return nil -} - -func resourceAwsVpcEndpointSubnetAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - endpointId := d.Get("vpc_endpoint_id").(string) - snId := d.Get("subnet_id").(string) - - _, err := conn.ModifyVpcEndpoint(&ec2.ModifyVpcEndpointInput{ - VpcEndpointId: aws.String(endpointId), - RemoveSubnetIds: aws.StringSlice([]string{snId}), - }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if !ok { - return fmt.Errorf("Error deleting Vpc Endpoint/Subnet association: %s", err) - } - - switch ec2err.Code() { - case "InvalidVpcEndpointId.NotFound": - fallthrough - case "InvalidParameter": - log.Printf("[DEBUG] Vpc Endpoint/Subnet association is already gone") - default: - return fmt.Errorf("Error deleting Vpc Endpoint/Subnet association: %s", err) - } - } - - if err := vpcEndpointWaitUntilAvailable(conn, endpointId, d.Timeout(schema.TimeoutDelete)); err != nil { - return err - } - - return nil -} - -func vpcEndpointSubnetAssociationId(endpointId, snId string) string { - return fmt.Sprintf("a-%s%d", endpointId, hashcode.String(snId)) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_ipv4_cidr_block_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_ipv4_cidr_block_association.go deleted file mode 100644 index 03708b2cf..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_ipv4_cidr_block_association.go +++ /dev/null @@ -1,173 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -const ( - VpcCidrBlockStateCodeDeleted = "deleted" -) - -func resourceAwsVpcIpv4CidrBlockAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpcIpv4CidrBlockAssociationCreate, - Read: resourceAwsVpcIpv4CidrBlockAssociationRead, - Delete: resourceAwsVpcIpv4CidrBlockAssociationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "cidr_block": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.CIDRNetwork(16, 28), // The allowed block size is between a /28 netmask and /16 netmask. - }, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - } -} - -func resourceAwsVpcIpv4CidrBlockAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.AssociateVpcCidrBlockInput{ - VpcId: aws.String(d.Get("vpc_id").(string)), - CidrBlock: aws.String(d.Get("cidr_block").(string)), - } - log.Printf("[DEBUG] Creating VPC IPv4 CIDR block association: %#v", req) - resp, err := conn.AssociateVpcCidrBlock(req) - if err != nil { - return fmt.Errorf("Error creating VPC IPv4 CIDR block association: %s", err) - } - - d.SetId(aws.StringValue(resp.CidrBlockAssociation.AssociationId)) - - stateConf := &resource.StateChangeConf{ - Pending: []string{ec2.VpcCidrBlockStateCodeAssociating}, - Target: []string{ec2.VpcCidrBlockStateCodeAssociated}, - Refresh: vpcIpv4CidrBlockAssociationStateRefresh(conn, d.Get("vpc_id").(string), d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), - Delay: 10 * time.Second, - MinTimeout: 5 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for IPv4 CIDR block association (%s) to become available: %s", d.Id(), err) - } - - return resourceAwsVpcIpv4CidrBlockAssociationRead(d, meta) -} - -func resourceAwsVpcIpv4CidrBlockAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - input := &ec2.DescribeVpcsInput{ - Filters: buildEC2AttributeFilterList( - map[string]string{ - "cidr-block-association.association-id": d.Id(), - }, - ), - } - - log.Printf("[DEBUG] Describing VPCs: %s", input) - output, err := conn.DescribeVpcs(input) - if err != nil { - return fmt.Errorf("error describing VPCs: %s", err) - } - - if output == nil || len(output.Vpcs) == 0 || output.Vpcs[0] == nil { - log.Printf("[WARN] IPv4 CIDR block association (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - vpc := output.Vpcs[0] - - var vpcCidrBlockAssociation *ec2.VpcCidrBlockAssociation - for _, cidrBlockAssociation := range vpc.CidrBlockAssociationSet { - if aws.StringValue(cidrBlockAssociation.AssociationId) == d.Id() { - vpcCidrBlockAssociation = cidrBlockAssociation - break - } - } - - if vpcCidrBlockAssociation == nil { - log.Printf("[WARN] IPv4 CIDR block association (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - d.Set("cidr_block", vpcCidrBlockAssociation.CidrBlock) - d.Set("vpc_id", vpc.VpcId) - - return nil -} - -func resourceAwsVpcIpv4CidrBlockAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - log.Printf("[DEBUG] Deleting VPC IPv4 CIDR block association: %s", d.Id()) - _, err := conn.DisassociateVpcCidrBlock(&ec2.DisassociateVpcCidrBlockInput{ - AssociationId: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, "InvalidVpcID.NotFound", "") { - return nil - } - return fmt.Errorf("Error deleting VPC IPv4 CIDR block association: %s", err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{ec2.VpcCidrBlockStateCodeDisassociating}, - Target: []string{ec2.VpcCidrBlockStateCodeDisassociated, VpcCidrBlockStateCodeDeleted}, - Refresh: vpcIpv4CidrBlockAssociationStateRefresh(conn, d.Get("vpc_id").(string), d.Id()), - Timeout: d.Timeout(schema.TimeoutDelete), - Delay: 10 * time.Second, - MinTimeout: 5 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for VPC IPv4 CIDR block association (%s) to be deleted: %s", d.Id(), err.Error()) - } - - return nil -} - -func vpcIpv4CidrBlockAssociationStateRefresh(conn *ec2.EC2, vpcId, assocId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - vpc, err := vpcDescribe(conn, vpcId) - if err != nil { - return nil, "", err - } - - if vpc != nil { - for _, cidrAssociation := range vpc.CidrBlockAssociationSet { - if aws.StringValue(cidrAssociation.AssociationId) == assocId { - return cidrAssociation, aws.StringValue(cidrAssociation.CidrBlockState.State), nil - } - } - } - - return "", VpcCidrBlockStateCodeDeleted, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_migrate.go deleted file mode 100644 index 90738d1f2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_migrate.go +++ /dev/null @@ -1,33 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsVpcMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS VPC State v0; migrating to v1") - return migrateVpcStateV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateVpcStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() || is.Attributes == nil { - log.Println("[DEBUG] Empty VPC State; nothing to migrate.") - return is, nil - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - - is.Attributes["assign_generated_ipv6_cidr_block"] = "false" - - log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) - return is, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go deleted file mode 100644 index 2d2c60c9e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go +++ /dev/null @@ -1,396 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpcPeeringConnection() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVPCPeeringCreate, - Read: resourceAwsVPCPeeringRead, - Update: resourceAwsVPCPeeringUpdate, - Delete: resourceAwsVPCPeeringDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(1 * time.Minute), - Update: schema.DefaultTimeout(1 * time.Minute), - Delete: schema.DefaultTimeout(1 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "peer_owner_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - "peer_vpc_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vpc_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "auto_accept": { - Type: schema.TypeBool, - Optional: true, - }, - "accept_status": { - Type: schema.TypeString, - Computed: true, - }, - "peer_region": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - }, - "accepter": vpcPeeringConnectionOptionsSchema(), - "requester": vpcPeeringConnectionOptionsSchema(), - "tags": tagsSchema(), - }, - } -} - -func resourceAwsVPCPeeringCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Create the vpc peering connection - createOpts := &ec2.CreateVpcPeeringConnectionInput{ - PeerVpcId: aws.String(d.Get("peer_vpc_id").(string)), - VpcId: aws.String(d.Get("vpc_id").(string)), - } - - if v, ok := d.GetOk("peer_owner_id"); ok { - createOpts.PeerOwnerId = aws.String(v.(string)) - } - - if v, ok := d.GetOk("peer_region"); ok { - if _, ok := d.GetOk("auto_accept"); ok { - return fmt.Errorf("peer_region cannot be set whilst auto_accept is true when creating a vpc peering connection") - } - createOpts.PeerRegion = aws.String(v.(string)) - } - - log.Printf("[DEBUG] VPC Peering Create options: %#v", createOpts) - - resp, err := conn.CreateVpcPeeringConnection(createOpts) - if err != nil { - return fmt.Errorf("Error creating VPC Peering Connection: %s", err) - } - - // Get the ID and store it - rt := resp.VpcPeeringConnection - d.SetId(*rt.VpcPeeringConnectionId) - log.Printf("[INFO] VPC Peering Connection ID: %s", d.Id()) - - err = vpcPeeringConnectionWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)) - if err != nil { - return fmt.Errorf("Error waiting for VPC Peering Connection to become available: %s", err) - } - - return resourceAwsVPCPeeringUpdate(d, meta) -} - -func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient) - - pcRaw, statusCode, err := vpcPeeringConnectionRefreshState(client.ec2conn, d.Id())() - // Allow a failed VPC Peering Connection to fallthrough, - // to allow rest of the logic below to do its work. - if err != nil && statusCode != ec2.VpcPeeringConnectionStateReasonCodeFailed { - return fmt.Errorf("Error reading VPC Peering Connection: %s", err) - } - - // The failed status is a status that we can assume just means the - // connection is gone. Destruction isn't allowed, and it eventually - // just "falls off" the console. See GH-2322 - status := map[string]bool{ - ec2.VpcPeeringConnectionStateReasonCodeDeleted: true, - ec2.VpcPeeringConnectionStateReasonCodeDeleting: true, - ec2.VpcPeeringConnectionStateReasonCodeExpired: true, - ec2.VpcPeeringConnectionStateReasonCodeFailed: true, - ec2.VpcPeeringConnectionStateReasonCodeRejected: true, - "": true, // AWS consistency issue, see vpcPeeringConnectionRefreshState - } - if _, ok := status[statusCode]; ok { - log.Printf("[WARN] VPC Peering Connection (%s) has status code %s, removing from state", d.Id(), statusCode) - d.SetId("") - return nil - } - - pc := pcRaw.(*ec2.VpcPeeringConnection) - log.Printf("[DEBUG] VPC Peering Connection response: %#v", pc) - - log.Printf("[DEBUG] Account ID %s, VPC PeerConn Requester %s, Accepter %s", - client.accountid, *pc.RequesterVpcInfo.OwnerId, *pc.AccepterVpcInfo.OwnerId) - - if (client.accountid == *pc.AccepterVpcInfo.OwnerId) && (client.accountid != *pc.RequesterVpcInfo.OwnerId) { - // We're the accepter - d.Set("peer_owner_id", pc.RequesterVpcInfo.OwnerId) - d.Set("peer_vpc_id", pc.RequesterVpcInfo.VpcId) - d.Set("vpc_id", pc.AccepterVpcInfo.VpcId) - } else { - // We're the requester - d.Set("peer_owner_id", pc.AccepterVpcInfo.OwnerId) - d.Set("peer_vpc_id", pc.AccepterVpcInfo.VpcId) - d.Set("vpc_id", pc.RequesterVpcInfo.VpcId) - } - - d.Set("peer_region", pc.AccepterVpcInfo.Region) - d.Set("accept_status", pc.Status.Code) - - // When the VPC Peering Connection is pending acceptance, - // the details about accepter and/or requester peering - // options would not be included in the response. - if pc.AccepterVpcInfo.PeeringOptions != nil { - err := d.Set("accepter", flattenVpcPeeringConnectionOptions(pc.AccepterVpcInfo.PeeringOptions)) - if err != nil { - return fmt.Errorf("Error setting VPC Peering Connection accepter information: %s", err) - } - } - - if pc.RequesterVpcInfo.PeeringOptions != nil { - err := d.Set("requester", flattenVpcPeeringConnectionOptions(pc.RequesterVpcInfo.PeeringOptions)) - if err != nil { - return fmt.Errorf("Error setting VPC Peering Connection requester information: %s", err) - } - } - - err = d.Set("tags", tagsToMap(pc.Tags)) - if err != nil { - return fmt.Errorf("Error setting VPC Peering Connection tags: %s", err) - } - - return nil -} - -func resourceVPCPeeringConnectionAccept(conn *ec2.EC2, id string) (string, error) { - log.Printf("[INFO] Accept VPC Peering Connection with ID: %s", id) - - req := &ec2.AcceptVpcPeeringConnectionInput{ - VpcPeeringConnectionId: aws.String(id), - } - - resp, err := conn.AcceptVpcPeeringConnection(req) - if err != nil { - return "", err - } - pc := resp.VpcPeeringConnection - - return *pc.Status.Code, nil -} - -func resourceAwsVpcPeeringConnectionModifyOptions(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.ModifyVpcPeeringConnectionOptionsInput{ - VpcPeeringConnectionId: aws.String(d.Id()), - } - - v := d.Get("accepter").(*schema.Set).List() - if len(v) > 0 { - req.AccepterPeeringConnectionOptions = expandVpcPeeringConnectionOptions(v[0].(map[string]interface{})) - } - - v = d.Get("requester").(*schema.Set).List() - if len(v) > 0 { - req.RequesterPeeringConnectionOptions = expandVpcPeeringConnectionOptions(v[0].(map[string]interface{})) - } - - log.Printf("[DEBUG] Modifying VPC Peering Connection options: %#v", req) - _, err := conn.ModifyVpcPeeringConnectionOptions(req) - - return err -} - -func resourceAwsVPCPeeringUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - if err := setTags(conn, d); err != nil { - return err - } else { - d.SetPartial("tags") - } - - pcRaw, _, err := vpcPeeringConnectionRefreshState(conn, d.Id())() - if err != nil { - return fmt.Errorf("Error reading VPC Peering Connection: %s", err) - } - - if pcRaw == nil { - log.Printf("[WARN] VPC Peering Connection (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - pc := pcRaw.(*ec2.VpcPeeringConnection) - - if _, ok := d.GetOk("auto_accept"); ok { - if pc.Status != nil && *pc.Status.Code == ec2.VpcPeeringConnectionStateReasonCodePendingAcceptance { - status, err := resourceVPCPeeringConnectionAccept(conn, d.Id()) - if err != nil { - return fmt.Errorf("Unable to accept VPC Peering Connection: %s", err) - } - log.Printf("[DEBUG] VPC Peering Connection accept status: %s", status) - } - } - - if d.HasChange("accepter") || d.HasChange("requester") { - _, ok := d.GetOk("auto_accept") - if !ok && pc.Status != nil && *pc.Status.Code != "active" { - return fmt.Errorf("Unable to modify peering options. The VPC Peering Connection "+ - "%q is not active. Please set `auto_accept` attribute to `true`, "+ - "or activate VPC Peering Connection manually.", d.Id()) - } - - if err := resourceAwsVpcPeeringConnectionModifyOptions(d, meta); err != nil { - return fmt.Errorf("Error modifying VPC Peering Connection options: %s", err) - } - } - - err = vpcPeeringConnectionWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) - if err != nil { - return fmt.Errorf("Error waiting for VPC Peering Connection to become available: %s", err) - } - - return resourceAwsVPCPeeringRead(d, meta) -} - -func resourceAwsVPCPeeringDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - req := &ec2.DeleteVpcPeeringConnectionInput{ - VpcPeeringConnectionId: aws.String(d.Id()), - } - log.Printf("[DEBUG] Deleting VPC Peering Connection: %s", req) - _, err := conn.DeleteVpcPeeringConnection(req) - if err != nil { - if isAWSErr(err, "InvalidVpcPeeringConnectionID.NotFound", "") { - return nil - } - return fmt.Errorf("Error deleting VPC Peering Connection (%s): %s", d.Id(), err) - } - - // Wait for the vpc peering connection to delete - log.Printf("[DEBUG] Waiting for VPC Peering Connection (%s) to delete.", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{ - ec2.VpcPeeringConnectionStateReasonCodeActive, - ec2.VpcPeeringConnectionStateReasonCodePendingAcceptance, - ec2.VpcPeeringConnectionStateReasonCodeDeleting, - }, - Target: []string{ - ec2.VpcPeeringConnectionStateReasonCodeRejected, - ec2.VpcPeeringConnectionStateReasonCodeDeleted, - }, - Refresh: vpcPeeringConnectionRefreshState(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutDelete), - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for VPC Peering Connection (%s) to be deleted: %s", d.Id(), err) - } - - return nil -} - -func vpcPeeringConnectionRefreshState(conn *ec2.EC2, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeVpcPeeringConnections(&ec2.DescribeVpcPeeringConnectionsInput{ - VpcPeeringConnectionIds: aws.StringSlice([]string{id}), - }) - if err != nil { - if isAWSErr(err, "InvalidVpcPeeringConnectionID.NotFound", "") { - return nil, ec2.VpcPeeringConnectionStateReasonCodeDeleted, nil - } - - return nil, "", err - } - - if resp == nil || resp.VpcPeeringConnections == nil || - len(resp.VpcPeeringConnections) == 0 || resp.VpcPeeringConnections[0] == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our peering connection yet. Return an empty state. - return nil, "", nil - } - pc := resp.VpcPeeringConnections[0] - if pc.Status == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our peering connection yet. Return an empty state. - return nil, "", nil - } - statusCode := aws.StringValue(pc.Status.Code) - - // A VPC Peering Connection can exist in a failed state due to - // incorrect VPC ID, account ID, or overlapping IP address range, - // thus we short circuit before the time out would occur. - if statusCode == ec2.VpcPeeringConnectionStateReasonCodeFailed { - return nil, statusCode, errors.New(aws.StringValue(pc.Status.Message)) - } - - return pc, statusCode, nil - } -} - -func vpcPeeringConnectionOptionsSchema() *schema.Schema { - return &schema.Schema{ - Type: schema.TypeSet, - Optional: true, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "allow_remote_vpc_dns_resolution": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "allow_classic_link_to_remote_vpc": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "allow_vpc_to_remote_classic_link": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - } -} - -func vpcPeeringConnectionWaitUntilAvailable(conn *ec2.EC2, id string, timeout time.Duration) error { - // Wait for the vpc peering connection to become available - log.Printf("[DEBUG] Waiting for VPC Peering Connection (%s) to become available.", id) - stateConf := &resource.StateChangeConf{ - Pending: []string{ - ec2.VpcPeeringConnectionStateReasonCodeInitiatingRequest, - ec2.VpcPeeringConnectionStateReasonCodeProvisioning, - }, - Target: []string{ - ec2.VpcPeeringConnectionStateReasonCodePendingAcceptance, - ec2.VpcPeeringConnectionStateReasonCodeActive, - }, - Refresh: vpcPeeringConnectionRefreshState(conn, id), - Timeout: timeout, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for VPC Peering Connection (%s) to become available: %s", id, err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_accepter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_accepter.go deleted file mode 100644 index 0dadffd68..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_accepter.go +++ /dev/null @@ -1,73 +0,0 @@ -package aws - -import ( - "log" - - "fmt" - - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpcPeeringConnectionAccepter() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVPCPeeringAccepterCreate, - Read: resourceAwsVPCPeeringRead, - Update: resourceAwsVPCPeeringUpdate, - Delete: resourceAwsVPCPeeringAccepterDelete, - - Schema: map[string]*schema.Schema{ - "vpc_peering_connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - Computed: false, - }, - "auto_accept": { - Type: schema.TypeBool, - Optional: true, - }, - "accept_status": { - Type: schema.TypeString, - Computed: true, - }, - "vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - "peer_vpc_id": { - Type: schema.TypeString, - Computed: true, - }, - "peer_owner_id": { - Type: schema.TypeString, - Computed: true, - }, - "peer_region": { - Type: schema.TypeString, - Computed: true, - }, - "accepter": vpcPeeringConnectionOptionsSchema(), - "requester": vpcPeeringConnectionOptionsSchema(), - "tags": tagsSchema(), - }, - } -} - -func resourceAwsVPCPeeringAccepterCreate(d *schema.ResourceData, meta interface{}) error { - id := d.Get("vpc_peering_connection_id").(string) - d.SetId(id) - - if err := resourceAwsVPCPeeringRead(d, meta); err != nil { - return err - } - if d.Id() == "" { - return fmt.Errorf("VPC Peering Connection %q not found", id) - } - - return resourceAwsVPCPeeringUpdate(d, meta) -} - -func resourceAwsVPCPeeringAccepterDelete(d *schema.ResourceData, meta interface{}) error { - log.Printf("[WARN] Will not delete VPC peering connection. Terraform will remove this resource from the state file, however resources may remain.") - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_options.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_options.go deleted file mode 100644 index aca9ca2ec..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_options.go +++ /dev/null @@ -1,84 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpcPeeringConnectionOptions() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpcPeeringConnectionOptionsCreate, - Read: resourceAwsVpcPeeringConnectionOptionsRead, - Update: resourceAwsVpcPeeringConnectionOptionsUpdate, - Delete: resourceAwsVpcPeeringConnectionOptionsDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "vpc_peering_connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "accepter": vpcPeeringConnectionOptionsSchema(), - "requester": vpcPeeringConnectionOptionsSchema(), - }, - } -} - -func resourceAwsVpcPeeringConnectionOptionsCreate(d *schema.ResourceData, meta interface{}) error { - d.SetId(d.Get("vpc_peering_connection_id").(string)) - return resourceAwsVpcPeeringConnectionOptionsUpdate(d, meta) -} - -func resourceAwsVpcPeeringConnectionOptionsRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - pcRaw, _, err := vpcPeeringConnectionRefreshState(conn, d.Id())() - if err != nil { - return fmt.Errorf("Error reading VPC Peering Connection: %s", err.Error()) - } - - if pcRaw == nil { - log.Printf("[WARN] VPC Peering Connection (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - pc := pcRaw.(*ec2.VpcPeeringConnection) - - d.Set("vpc_peering_connection_id", pc.VpcPeeringConnectionId) - - if pc != nil && pc.AccepterVpcInfo != nil && pc.AccepterVpcInfo.PeeringOptions != nil { - err := d.Set("accepter", flattenVpcPeeringConnectionOptions(pc.AccepterVpcInfo.PeeringOptions)) - if err != nil { - return fmt.Errorf("Error setting VPC Peering Connection Options accepter information: %s", err.Error()) - } - } - - if pc != nil && pc.RequesterVpcInfo != nil && pc.RequesterVpcInfo.PeeringOptions != nil { - err := d.Set("requester", flattenVpcPeeringConnectionOptions(pc.RequesterVpcInfo.PeeringOptions)) - if err != nil { - return fmt.Errorf("Error setting VPC Peering Connection Options requester information: %s", err.Error()) - } - } - - return nil -} - -func resourceAwsVpcPeeringConnectionOptionsUpdate(d *schema.ResourceData, meta interface{}) error { - if err := resourceAwsVpcPeeringConnectionModifyOptions(d, meta); err != nil { - return fmt.Errorf("Error modifying VPC Peering Connection Options: %s", err.Error()) - } - - return resourceAwsVpcPeeringConnectionOptionsRead(d, meta) -} - -func resourceAwsVpcPeeringConnectionOptionsDelete(d *schema.ResourceData, meta interface{}) error { - // Don't do anything with the underlying VPC peering connection. - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go deleted file mode 100644 index 8b82cb991..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go +++ /dev/null @@ -1,625 +0,0 @@ -package aws - -import ( - "bytes" - "encoding/xml" - "fmt" - "log" - "net" - "regexp" - "sort" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -type XmlVpnConnectionConfig struct { - Tunnels []XmlIpsecTunnel `xml:"ipsec_tunnel"` -} - -type XmlIpsecTunnel struct { - OutsideAddress string `xml:"vpn_gateway>tunnel_outside_address>ip_address"` - BGPASN string `xml:"vpn_gateway>bgp>asn"` - BGPHoldTime int `xml:"vpn_gateway>bgp>hold_time"` - PreSharedKey string `xml:"ike>pre_shared_key"` - CgwInsideAddress string `xml:"customer_gateway>tunnel_inside_address>ip_address"` - VgwInsideAddress string `xml:"vpn_gateway>tunnel_inside_address>ip_address"` -} - -type TunnelInfo struct { - Tunnel1Address string - Tunnel1CgwInsideAddress string - Tunnel1VgwInsideAddress string - Tunnel1PreSharedKey string - Tunnel1BGPASN string - Tunnel1BGPHoldTime int - Tunnel2Address string - Tunnel2CgwInsideAddress string - Tunnel2VgwInsideAddress string - Tunnel2PreSharedKey string - Tunnel2BGPASN string - Tunnel2BGPHoldTime int -} - -func (slice XmlVpnConnectionConfig) Len() int { - return len(slice.Tunnels) -} - -func (slice XmlVpnConnectionConfig) Less(i, j int) bool { - return slice.Tunnels[i].OutsideAddress < slice.Tunnels[j].OutsideAddress -} - -func (slice XmlVpnConnectionConfig) Swap(i, j int) { - slice.Tunnels[i], slice.Tunnels[j] = slice.Tunnels[j], slice.Tunnels[i] -} - -func resourceAwsVpnConnection() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpnConnectionCreate, - Read: resourceAwsVpnConnectionRead, - Update: resourceAwsVpnConnectionUpdate, - Delete: resourceAwsVpnConnectionDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "vpn_gateway_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"transit_gateway_id"}, - }, - - "customer_gateway_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "transit_gateway_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"vpn_gateway_id"}, - }, - - "type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "static_routes_only": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - ForceNew: true, - }, - - "tunnel1_inside_cidr": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateVpnConnectionTunnelInsideCIDR, - }, - - "tunnel1_preshared_key": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateVpnConnectionTunnelPreSharedKey, - }, - - "tunnel2_inside_cidr": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateVpnConnectionTunnelInsideCIDR, - }, - - "tunnel2_preshared_key": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateVpnConnectionTunnelPreSharedKey, - }, - - "tags": tagsSchema(), - - // Begin read only attributes - "customer_gateway_configuration": { - Type: schema.TypeString, - Computed: true, - Optional: true, - }, - - "tunnel1_address": { - Type: schema.TypeString, - Computed: true, - }, - "tunnel1_cgw_inside_address": { - Type: schema.TypeString, - Computed: true, - }, - "tunnel1_vgw_inside_address": { - Type: schema.TypeString, - Computed: true, - }, - "tunnel1_bgp_asn": { - Type: schema.TypeString, - Computed: true, - }, - "tunnel1_bgp_holdtime": { - Type: schema.TypeInt, - Computed: true, - }, - - "tunnel2_address": { - Type: schema.TypeString, - Computed: true, - }, - "tunnel2_cgw_inside_address": { - Type: schema.TypeString, - Computed: true, - }, - "tunnel2_vgw_inside_address": { - Type: schema.TypeString, - Computed: true, - }, - "tunnel2_bgp_asn": { - Type: schema.TypeString, - Computed: true, - }, - "tunnel2_bgp_holdtime": { - Type: schema.TypeInt, - Computed: true, - }, - - "routes": { - Type: schema.TypeSet, - Computed: true, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "destination_cidr_block": { - Type: schema.TypeString, - Computed: true, - Optional: true, - }, - - "source": { - Type: schema.TypeString, - Computed: true, - Optional: true, - }, - - "state": { - Type: schema.TypeString, - Computed: true, - Optional: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["destination_cidr_block"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["source"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["state"].(string))) - return hashcode.String(buf.String()) - }, - }, - - "vgw_telemetry": { - Type: schema.TypeSet, - Computed: true, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "accepted_route_count": { - Type: schema.TypeInt, - Computed: true, - Optional: true, - }, - - "last_status_change": { - Type: schema.TypeString, - Computed: true, - Optional: true, - }, - - "outside_ip_address": { - Type: schema.TypeString, - Computed: true, - Optional: true, - }, - - "status": { - Type: schema.TypeString, - Computed: true, - Optional: true, - }, - - "status_message": { - Type: schema.TypeString, - Computed: true, - Optional: true, - }, - }, - }, - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["outside_ip_address"].(string))) - return hashcode.String(buf.String()) - }, - }, - }, - } -} - -func resourceAwsVpnConnectionCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Fill the tunnel options for the EC2 API - options := []*ec2.VpnTunnelOptionsSpecification{ - {}, {}, - } - - if v, ok := d.GetOk("tunnel1_inside_cidr"); ok { - options[0].TunnelInsideCidr = aws.String(v.(string)) - } - - if v, ok := d.GetOk("tunnel2_inside_cidr"); ok { - options[1].TunnelInsideCidr = aws.String(v.(string)) - } - - if v, ok := d.GetOk("tunnel1_preshared_key"); ok { - options[0].PreSharedKey = aws.String(v.(string)) - } - - if v, ok := d.GetOk("tunnel2_preshared_key"); ok { - options[1].PreSharedKey = aws.String(v.(string)) - } - - connectOpts := &ec2.VpnConnectionOptionsSpecification{ - StaticRoutesOnly: aws.Bool(d.Get("static_routes_only").(bool)), - TunnelOptions: options, - } - - createOpts := &ec2.CreateVpnConnectionInput{ - CustomerGatewayId: aws.String(d.Get("customer_gateway_id").(string)), - Options: connectOpts, - Type: aws.String(d.Get("type").(string)), - } - - if v, ok := d.GetOk("transit_gateway_id"); ok { - createOpts.TransitGatewayId = aws.String(v.(string)) - } - - if v, ok := d.GetOk("vpn_gateway_id"); ok { - createOpts.VpnGatewayId = aws.String(v.(string)) - } - - // Create the VPN Connection - log.Printf("[DEBUG] Creating vpn connection") - resp, err := conn.CreateVpnConnection(createOpts) - if err != nil { - return fmt.Errorf("Error creating vpn connection: %s", err) - } - - // Store the ID - vpnConnection := resp.VpnConnection - d.SetId(*vpnConnection.VpnConnectionId) - log.Printf("[INFO] VPN connection ID: %s", *vpnConnection.VpnConnectionId) - - // Wait for the connection to become available. This has an obscenely - // high default timeout because AWS VPN connections are notoriously - // slow at coming up or going down. There's also no point in checking - // more frequently than every ten seconds. - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"available"}, - Refresh: vpnConnectionRefreshFunc(conn, *vpnConnection.VpnConnectionId), - Timeout: 40 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 10 * time.Second, - } - - _, stateErr := stateConf.WaitForState() - if stateErr != nil { - return fmt.Errorf( - "Error waiting for VPN connection (%s) to become ready: %s", - *vpnConnection.VpnConnectionId, stateErr) - } - - // Create tags. - if err := setTags(conn, d); err != nil { - return err - } - - // Read off the API to populate our RO fields. - return resourceAwsVpnConnectionRead(d, meta) -} - -func vpnConnectionRefreshFunc(conn *ec2.EC2, connectionId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeVpnConnections(&ec2.DescribeVpnConnectionsInput{ - VpnConnectionIds: []*string{aws.String(connectionId)}, - }) - - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpnConnectionID.NotFound" { - resp = nil - } else { - log.Printf("Error on VPNConnectionRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil || len(resp.VpnConnections) == 0 { - return nil, "", nil - } - - connection := resp.VpnConnections[0] - return connection, *connection.State, nil - } -} - -func resourceAwsVpnConnectionRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - resp, err := conn.DescribeVpnConnections(&ec2.DescribeVpnConnectionsInput{ - VpnConnectionIds: []*string{aws.String(d.Id())}, - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpnConnectionID.NotFound" { - d.SetId("") - return nil - } else { - log.Printf("[ERROR] Error finding VPN connection: %s", err) - return err - } - } - - if len(resp.VpnConnections) != 1 { - return fmt.Errorf("Error finding VPN connection: %s", d.Id()) - } - - vpnConnection := resp.VpnConnections[0] - if vpnConnection == nil || *vpnConnection.State == "deleted" { - // Seems we have lost our VPN Connection - d.SetId("") - return nil - } - - // Set attributes under the user's control. - d.Set("vpn_gateway_id", vpnConnection.VpnGatewayId) - d.Set("customer_gateway_id", vpnConnection.CustomerGatewayId) - d.Set("transit_gateway_id", vpnConnection.TransitGatewayId) - d.Set("type", vpnConnection.Type) - d.Set("tags", tagsToMap(vpnConnection.Tags)) - - if vpnConnection.Options != nil { - if err := d.Set("static_routes_only", vpnConnection.Options.StaticRoutesOnly); err != nil { - return err - } - } else { - //If there no Options on the connection then we do not support *static_routes* - d.Set("static_routes_only", false) - } - - // Set read only attributes. - d.Set("customer_gateway_configuration", vpnConnection.CustomerGatewayConfiguration) - - if vpnConnection.CustomerGatewayConfiguration != nil { - if tunnelInfo, err := xmlConfigToTunnelInfo(*vpnConnection.CustomerGatewayConfiguration); err != nil { - log.Printf("[ERR] Error unmarshaling XML configuration for (%s): %s", d.Id(), err) - } else { - d.Set("tunnel1_address", tunnelInfo.Tunnel1Address) - d.Set("tunnel1_cgw_inside_address", tunnelInfo.Tunnel1CgwInsideAddress) - d.Set("tunnel1_vgw_inside_address", tunnelInfo.Tunnel1VgwInsideAddress) - d.Set("tunnel1_preshared_key", tunnelInfo.Tunnel1PreSharedKey) - d.Set("tunnel1_bgp_asn", tunnelInfo.Tunnel1BGPASN) - d.Set("tunnel1_bgp_holdtime", tunnelInfo.Tunnel1BGPHoldTime) - d.Set("tunnel2_address", tunnelInfo.Tunnel2Address) - d.Set("tunnel2_preshared_key", tunnelInfo.Tunnel2PreSharedKey) - d.Set("tunnel2_cgw_inside_address", tunnelInfo.Tunnel2CgwInsideAddress) - d.Set("tunnel2_vgw_inside_address", tunnelInfo.Tunnel2VgwInsideAddress) - d.Set("tunnel2_bgp_asn", tunnelInfo.Tunnel2BGPASN) - d.Set("tunnel2_bgp_holdtime", tunnelInfo.Tunnel2BGPHoldTime) - } - } - - if err := d.Set("vgw_telemetry", telemetryToMapList(vpnConnection.VgwTelemetry)); err != nil { - return err - } - if err := d.Set("routes", routesToMapList(vpnConnection.Routes)); err != nil { - return err - } - - return nil -} - -func resourceAwsVpnConnectionUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Update tags if required. - if err := setTags(conn, d); err != nil { - return err - } - - d.SetPartial("tags") - - return resourceAwsVpnConnectionRead(d, meta) -} - -func resourceAwsVpnConnectionDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - _, err := conn.DeleteVpnConnection(&ec2.DeleteVpnConnectionInput{ - VpnConnectionId: aws.String(d.Id()), - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpnConnectionID.NotFound" { - return nil - } else { - log.Printf("[ERROR] Error deleting VPN connection: %s", err) - return err - } - } - - // These things can take quite a while to tear themselves down and any - // attempt to modify resources they reference (e.g. CustomerGateways or - // VPN Gateways) before deletion will result in an error. Furthermore, - // they don't just disappear. The go into "deleted" state. We need to - // wait to ensure any other modifications the user might make to their - // VPC stack can safely run. - stateConf := &resource.StateChangeConf{ - Pending: []string{"deleting"}, - Target: []string{"deleted"}, - Refresh: vpnConnectionRefreshFunc(conn, d.Id()), - Timeout: 30 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 10 * time.Second, - } - - _, stateErr := stateConf.WaitForState() - if stateErr != nil { - return fmt.Errorf( - "Error waiting for VPN connection (%s) to delete: %s", d.Id(), err) - } - - return nil -} - -// routesToMapList turns the list of routes into a list of maps. -func routesToMapList(routes []*ec2.VpnStaticRoute) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(routes)) - for _, r := range routes { - staticRoute := make(map[string]interface{}) - staticRoute["destination_cidr_block"] = *r.DestinationCidrBlock - staticRoute["state"] = *r.State - - if r.Source != nil { - staticRoute["source"] = *r.Source - } - - result = append(result, staticRoute) - } - - return result -} - -// telemetryToMapList turns the VGW telemetry into a list of maps. -func telemetryToMapList(telemetry []*ec2.VgwTelemetry) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(telemetry)) - for _, t := range telemetry { - vgw := make(map[string]interface{}) - vgw["accepted_route_count"] = *t.AcceptedRouteCount - vgw["outside_ip_address"] = *t.OutsideIpAddress - vgw["status"] = *t.Status - vgw["status_message"] = *t.StatusMessage - - // LastStatusChange is a time.Time(). Convert it into a string - // so it can be handled by schema's type system. - vgw["last_status_change"] = t.LastStatusChange.String() - result = append(result, vgw) - } - - return result -} - -func xmlConfigToTunnelInfo(xmlConfig string) (*TunnelInfo, error) { - var vpnConfig XmlVpnConnectionConfig - if err := xml.Unmarshal([]byte(xmlConfig), &vpnConfig); err != nil { - return nil, fmt.Errorf("Error Unmarshalling XML: %s", err) - } - - // don't expect consistent ordering from the XML - sort.Sort(vpnConfig) - - tunnelInfo := TunnelInfo{ - Tunnel1Address: vpnConfig.Tunnels[0].OutsideAddress, - Tunnel1PreSharedKey: vpnConfig.Tunnels[0].PreSharedKey, - Tunnel1CgwInsideAddress: vpnConfig.Tunnels[0].CgwInsideAddress, - Tunnel1VgwInsideAddress: vpnConfig.Tunnels[0].VgwInsideAddress, - Tunnel1BGPASN: vpnConfig.Tunnels[0].BGPASN, - Tunnel1BGPHoldTime: vpnConfig.Tunnels[0].BGPHoldTime, - Tunnel2Address: vpnConfig.Tunnels[1].OutsideAddress, - Tunnel2PreSharedKey: vpnConfig.Tunnels[1].PreSharedKey, - Tunnel2CgwInsideAddress: vpnConfig.Tunnels[1].CgwInsideAddress, - Tunnel2VgwInsideAddress: vpnConfig.Tunnels[1].VgwInsideAddress, - Tunnel2BGPASN: vpnConfig.Tunnels[1].BGPASN, - Tunnel2BGPHoldTime: vpnConfig.Tunnels[1].BGPHoldTime, - } - - return &tunnelInfo, nil -} - -func validateVpnConnectionTunnelPreSharedKey(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if (len(value) < 8) || (len(value) > 64) { - errors = append(errors, fmt.Errorf("%q must be between 8 and 64 characters in length", k)) - } - - if strings.HasPrefix(value, "0") { - errors = append(errors, fmt.Errorf("%q cannot start with zero character", k)) - } - - if !regexp.MustCompile(`^[0-9a-zA-Z_.]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q can only contain alphanumeric, period and underscore characters", k)) - } - - return -} - -// https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_VpnTunnelOptionsSpecification.html -func validateVpnConnectionTunnelInsideCIDR(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - _, ipnet, err := net.ParseCIDR(value) - - if err != nil { - errors = append(errors, fmt.Errorf("%q must contain a valid CIDR, got error parsing: %s", k, err)) - return - } - - if !strings.HasSuffix(ipnet.String(), "/30") { - errors = append(errors, fmt.Errorf("%q must be /30 CIDR", k)) - } - - if !strings.HasPrefix(ipnet.String(), "169.254.") { - errors = append(errors, fmt.Errorf("%q must be within 169.254.0.0/16", k)) - } else if ipnet.String() == "169.254.0.0/30" { - errors = append(errors, fmt.Errorf("%q cannot be 169.254.0.0/30", k)) - } else if ipnet.String() == "169.254.1.0/30" { - errors = append(errors, fmt.Errorf("%q cannot be 169.254.1.0/30", k)) - } else if ipnet.String() == "169.254.2.0/30" { - errors = append(errors, fmt.Errorf("%q cannot be 169.254.2.0/30", k)) - } else if ipnet.String() == "169.254.3.0/30" { - errors = append(errors, fmt.Errorf("%q cannot be 169.254.3.0/30", k)) - } else if ipnet.String() == "169.254.4.0/30" { - errors = append(errors, fmt.Errorf("%q cannot be 169.254.4.0/30", k)) - } else if ipnet.String() == "169.254.5.0/30" { - errors = append(errors, fmt.Errorf("%q cannot be 169.254.5.0/30", k)) - } else if ipnet.String() == "169.254.169.252/30" { - errors = append(errors, fmt.Errorf("%q cannot be 169.254.169.252/30", k)) - } - - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go deleted file mode 100644 index e5a0241a4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go +++ /dev/null @@ -1,169 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpnConnectionRoute() *schema.Resource { - return &schema.Resource{ - // You can't update a route. You can just delete one and make - // a new one. - Create: resourceAwsVpnConnectionRouteCreate, - Read: resourceAwsVpnConnectionRouteRead, - Delete: resourceAwsVpnConnectionRouteDelete, - - Schema: map[string]*schema.Schema{ - "destination_cidr_block": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "vpn_connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsVpnConnectionRouteCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - cidrBlock := d.Get("destination_cidr_block").(string) - vpnConnectionId := d.Get("vpn_connection_id").(string) - createOpts := &ec2.CreateVpnConnectionRouteInput{ - DestinationCidrBlock: aws.String(cidrBlock), - VpnConnectionId: aws.String(vpnConnectionId), - } - - // Create the route. - log.Printf("[DEBUG] Creating VPN connection route") - _, err := conn.CreateVpnConnectionRoute(createOpts) - if err != nil { - return fmt.Errorf("Error creating VPN connection route: %s", err) - } - - // Store the ID by the only two data we have available to us. - d.SetId(fmt.Sprintf("%s:%s", *createOpts.DestinationCidrBlock, *createOpts.VpnConnectionId)) - - stateConf := resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"available"}, - Timeout: 15 * time.Second, - Refresh: func() (interface{}, string, error) { - route, err := findConnectionRoute(conn, cidrBlock, vpnConnectionId) - if err != nil { - return 42, "", err - } - return route, *route.State, nil - }, - } - _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return resourceAwsVpnConnectionRouteRead(d, meta) -} - -func resourceAwsVpnConnectionRouteRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - cidrBlock, vpnConnectionId := resourceAwsVpnConnectionRouteParseId(d.Id()) - - route, err := findConnectionRoute(conn, cidrBlock, vpnConnectionId) - if err != nil { - return err - } - if route == nil { - // Something other than terraform eliminated the route. - d.SetId("") - } - - return nil -} - -func resourceAwsVpnConnectionRouteDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - cidrBlock := d.Get("destination_cidr_block").(string) - vpnConnectionId := d.Get("vpn_connection_id").(string) - _, err := conn.DeleteVpnConnectionRoute(&ec2.DeleteVpnConnectionRouteInput{ - DestinationCidrBlock: aws.String(cidrBlock), - VpnConnectionId: aws.String(vpnConnectionId), - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpnConnectionID.NotFound" { - return nil - } - log.Printf("[ERROR] Error deleting VPN connection route: %s", err) - return err - } - - stateConf := resource.StateChangeConf{ - Pending: []string{"pending", "available", "deleting"}, - Target: []string{"deleted"}, - Timeout: 15 * time.Second, - Refresh: func() (interface{}, string, error) { - route, err := findConnectionRoute(conn, cidrBlock, vpnConnectionId) - if err != nil { - return 42, "", err - } - if route == nil { - return 42, "deleted", nil - } - return route, *route.State, nil - }, - } - _, err = stateConf.WaitForState() - return err -} - -func findConnectionRoute(conn *ec2.EC2, cidrBlock, vpnConnectionId string) (*ec2.VpnStaticRoute, error) { - resp, err := conn.DescribeVpnConnections(&ec2.DescribeVpnConnectionsInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("route.destination-cidr-block"), - Values: []*string{aws.String(cidrBlock)}, - }, - { - Name: aws.String("vpn-connection-id"), - Values: []*string{aws.String(vpnConnectionId)}, - }, - }, - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpnConnectionID.NotFound" { - return nil, nil - } - return nil, err - } - if resp == nil || len(resp.VpnConnections) == 0 { - return nil, nil - } - vpnConnection := resp.VpnConnections[0] - - for _, r := range vpnConnection.Routes { - if *r.DestinationCidrBlock == cidrBlock && *r.State != "deleted" { - return r, nil - } - } - return nil, nil -} - -func resourceAwsVpnConnectionRouteParseId(id string) (string, string) { - parts := strings.SplitN(id, ":", 2) - return parts[0], parts[1] -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway.go deleted file mode 100644 index ae9a5bba6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway.go +++ /dev/null @@ -1,340 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strconv" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpnGateway() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpnGatewayCreate, - Read: resourceAwsVpnGatewayRead, - Update: resourceAwsVpnGatewayUpdate, - Delete: resourceAwsVpnGatewayDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "availability_zone": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "amazon_side_asn": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - ValidateFunc: validateAmazonSideAsn, - }, - - "vpc_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "tags": tagsSchema(), - }, - } -} - -func resourceAwsVpnGatewayCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - createOpts := &ec2.CreateVpnGatewayInput{ - AvailabilityZone: aws.String(d.Get("availability_zone").(string)), - Type: aws.String("ipsec.1"), - } - if asn, ok := d.GetOk("amazon_side_asn"); ok { - i, err := strconv.ParseInt(asn.(string), 10, 64) - if err != nil { - return err - } - createOpts.AmazonSideAsn = aws.Int64(i) - } - - // Create the VPN gateway - log.Printf("[DEBUG] Creating VPN gateway") - resp, err := conn.CreateVpnGateway(createOpts) - if err != nil { - return fmt.Errorf("Error creating VPN gateway: %s", err) - } - - // Get the ID and store it - vpnGateway := resp.VpnGateway - d.SetId(*vpnGateway.VpnGatewayId) - log.Printf("[INFO] VPN Gateway ID: %s", *vpnGateway.VpnGatewayId) - - // Attach the VPN gateway to the correct VPC - return resourceAwsVpnGatewayUpdate(d, meta) -} - -func resourceAwsVpnGatewayRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - resp, err := conn.DescribeVpnGateways(&ec2.DescribeVpnGatewaysInput{ - VpnGatewayIds: []*string{aws.String(d.Id())}, - }) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpnGatewayID.NotFound" { - d.SetId("") - return nil - } else { - log.Printf("[ERROR] Error finding VpnGateway: %s", err) - return err - } - } - - vpnGateway := resp.VpnGateways[0] - if vpnGateway == nil || *vpnGateway.State == "deleted" { - // Seems we have lost our VPN gateway - d.SetId("") - return nil - } - - vpnAttachment := vpnGatewayGetAttachment(vpnGateway) - if len(vpnGateway.VpcAttachments) == 0 || *vpnAttachment.State == "detached" { - // Gateway exists but not attached to the VPC - d.Set("vpc_id", "") - } else { - d.Set("vpc_id", *vpnAttachment.VpcId) - } - - if vpnGateway.AvailabilityZone != nil && *vpnGateway.AvailabilityZone != "" { - d.Set("availability_zone", vpnGateway.AvailabilityZone) - } - d.Set("amazon_side_asn", strconv.FormatInt(aws.Int64Value(vpnGateway.AmazonSideAsn), 10)) - d.Set("tags", tagsToMap(vpnGateway.Tags)) - - return nil -} - -func resourceAwsVpnGatewayUpdate(d *schema.ResourceData, meta interface{}) error { - if d.HasChange("vpc_id") { - // If we're already attached, detach it first - if err := resourceAwsVpnGatewayDetach(d, meta); err != nil { - return err - } - - // Attach the VPN gateway to the new vpc - if err := resourceAwsVpnGatewayAttach(d, meta); err != nil { - return err - } - } - - conn := meta.(*AWSClient).ec2conn - - if err := setTags(conn, d); err != nil { - return err - } - - d.SetPartial("tags") - - return resourceAwsVpnGatewayRead(d, meta) -} - -func resourceAwsVpnGatewayDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Detach if it is attached - if err := resourceAwsVpnGatewayDetach(d, meta); err != nil { - return err - } - - log.Printf("[INFO] Deleting VPN gateway: %s", d.Id()) - - return resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteVpnGateway(&ec2.DeleteVpnGatewayInput{ - VpnGatewayId: aws.String(d.Id()), - }) - if err == nil { - return nil - } - - ec2err, ok := err.(awserr.Error) - if !ok { - return resource.RetryableError(err) - } - - switch ec2err.Code() { - case "InvalidVpnGatewayID.NotFound": - return nil - case "IncorrectState": - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - }) -} - -func resourceAwsVpnGatewayAttach(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - if d.Get("vpc_id").(string) == "" { - log.Printf( - "[DEBUG] Not attaching VPN Gateway '%s' as no VPC ID is set", - d.Id()) - return nil - } - - log.Printf( - "[INFO] Attaching VPN Gateway '%s' to VPC '%s'", - d.Id(), - d.Get("vpc_id").(string)) - - req := &ec2.AttachVpnGatewayInput{ - VpnGatewayId: aws.String(d.Id()), - VpcId: aws.String(d.Get("vpc_id").(string)), - } - - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := conn.AttachVpnGateway(req) - if err != nil { - if isAWSErr(err, "InvalidVpnGatewayID.NotFound", "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - if err != nil { - return err - } - - // Wait for it to be fully attached before continuing - log.Printf("[DEBUG] Waiting for VPN gateway (%s) to attach", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"detached", "attaching"}, - Target: []string{"attached"}, - Refresh: vpnGatewayAttachStateRefreshFunc(conn, d.Id()), - Timeout: 10 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for VPN gateway (%s) to attach: %s", - d.Id(), err) - } - - return nil -} - -func resourceAwsVpnGatewayDetach(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - // Get the old VPC ID to detach from - vpcID, _ := d.GetChange("vpc_id") - - if vpcID.(string) == "" { - log.Printf( - "[DEBUG] Not detaching VPN Gateway '%s' as no VPC ID is set", - d.Id()) - return nil - } - - log.Printf( - "[INFO] Detaching VPN Gateway '%s' from VPC '%s'", - d.Id(), - vpcID.(string)) - - wait := true - _, err := conn.DetachVpnGateway(&ec2.DetachVpnGatewayInput{ - VpnGatewayId: aws.String(d.Id()), - VpcId: aws.String(vpcID.(string)), - }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if ok { - if ec2err.Code() == "InvalidVpnGatewayID.NotFound" { - err = nil - wait = false - } else if ec2err.Code() == "InvalidVpnGatewayAttachment.NotFound" { - err = nil - wait = false - } - } - - if err != nil { - return err - } - } - - if !wait { - return nil - } - - // Wait for it to be fully detached before continuing - log.Printf("[DEBUG] Waiting for VPN gateway (%s) to detach", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"attached", "detaching", "available"}, - Target: []string{"detached"}, - Refresh: vpnGatewayAttachStateRefreshFunc(conn, d.Id()), - Timeout: 10 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for vpn gateway (%s) to detach: %s", - d.Id(), err) - } - - return nil -} - -// vpnGatewayAttachStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// the state of a VPN gateway's attachment -func vpnGatewayAttachStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { - var start time.Time - return func() (interface{}, string, error) { - if start.IsZero() { - start = time.Now() - } - - resp, err := conn.DescribeVpnGateways(&ec2.DescribeVpnGatewaysInput{ - VpnGatewayIds: []*string{aws.String(id)}, - }) - - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpnGatewayID.NotFound" { - resp = nil - } else { - log.Printf("[ERROR] Error on VpnGatewayStateRefresh: %s", err) - return nil, "", err - } - } - - if resp == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - vpnGateway := resp.VpnGateways[0] - if len(vpnGateway.VpcAttachments) == 0 { - // No attachments, we're detached - return vpnGateway, "detached", nil - } - - vpnAttachment := vpnGatewayGetAttachment(vpnGateway) - return vpnGateway, *vpnAttachment.State, nil - } -} - -func vpnGatewayGetAttachment(vgw *ec2.VpnGateway) *ec2.VpcAttachment { - for _, v := range vgw.VpcAttachments { - if *v.State == "attached" { - return v - } - } - return &ec2.VpcAttachment{State: aws.String("detached")} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_attachment.go deleted file mode 100644 index fd081b81b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_attachment.go +++ /dev/null @@ -1,203 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpnGatewayAttachment() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpnGatewayAttachmentCreate, - Read: resourceAwsVpnGatewayAttachmentRead, - Delete: resourceAwsVpnGatewayAttachmentDelete, - - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vpn_gateway_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsVpnGatewayAttachmentCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - vpcId := d.Get("vpc_id").(string) - vgwId := d.Get("vpn_gateway_id").(string) - - createOpts := &ec2.AttachVpnGatewayInput{ - VpcId: aws.String(vpcId), - VpnGatewayId: aws.String(vgwId), - } - log.Printf("[DEBUG] VPN Gateway attachment options: %#v", *createOpts) - - _, err := conn.AttachVpnGateway(createOpts) - if err != nil { - return fmt.Errorf("Error attaching VPN Gateway %q to VPC %q: %s", - vgwId, vpcId, err) - } - - d.SetId(vpnGatewayAttachmentId(vpcId, vgwId)) - log.Printf("[INFO] VPN Gateway %q attachment ID: %s", vgwId, d.Id()) - - stateConf := &resource.StateChangeConf{ - Pending: []string{"detached", "attaching"}, - Target: []string{"attached"}, - Refresh: vpnGatewayAttachmentStateRefresh(conn, vpcId, vgwId), - Timeout: 15 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 5 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for VPN Gateway %q to attach to VPC %q: %s", - vgwId, vpcId, err) - } - log.Printf("[DEBUG] VPN Gateway %q attached to VPC %q.", vgwId, vpcId) - - return resourceAwsVpnGatewayAttachmentRead(d, meta) -} - -func resourceAwsVpnGatewayAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - vgwId := d.Get("vpn_gateway_id").(string) - - resp, err := conn.DescribeVpnGateways(&ec2.DescribeVpnGatewaysInput{ - VpnGatewayIds: []*string{aws.String(vgwId)}, - }) - - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "InvalidVpnGatewayID.NotFound" { - log.Printf("[WARN] VPN Gateway %q not found.", vgwId) - d.SetId("") - return nil - } - return err - } - - vgw := resp.VpnGateways[0] - if *vgw.State == "deleted" { - log.Printf("[INFO] VPN Gateway %q appears to have been deleted.", vgwId) - d.SetId("") - return nil - } - - vga := vpnGatewayGetAttachment(vgw) - if len(vgw.VpcAttachments) == 0 || *vga.State == "detached" { - d.Set("vpc_id", "") - return nil - } - - d.Set("vpc_id", *vga.VpcId) - return nil -} - -func resourceAwsVpnGatewayAttachmentDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - vpcId := d.Get("vpc_id").(string) - vgwId := d.Get("vpn_gateway_id").(string) - - if vpcId == "" { - log.Printf("[DEBUG] Not detaching VPN Gateway %q as no VPC ID is set.", vgwId) - return nil - } - - _, err := conn.DetachVpnGateway(&ec2.DetachVpnGatewayInput{ - VpcId: aws.String(vpcId), - VpnGatewayId: aws.String(vgwId), - }) - - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok { - switch awsErr.Code() { - case "InvalidVpnGatewayID.NotFound": - return nil - case "InvalidVpnGatewayAttachment.NotFound": - return nil - } - } - - return fmt.Errorf("Error detaching VPN Gateway %q from VPC %q: %s", - vgwId, vpcId, err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"attached", "detaching"}, - Target: []string{"detached"}, - Refresh: vpnGatewayAttachmentStateRefresh(conn, vpcId, vgwId), - Timeout: 15 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 5 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for VPN Gateway %q to detach from VPC %q: %s", - vgwId, vpcId, err) - } - log.Printf("[DEBUG] VPN Gateway %q detached from VPC %q.", vgwId, vpcId) - - return nil -} - -func vpnGatewayAttachmentStateRefresh(conn *ec2.EC2, vpcId, vgwId string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeVpnGateways(&ec2.DescribeVpnGatewaysInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("attachment.vpc-id"), - Values: []*string{aws.String(vpcId)}, - }, - }, - VpnGatewayIds: []*string{aws.String(vgwId)}, - }) - - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok { - switch awsErr.Code() { - case "InvalidVpnGatewayID.NotFound": - fallthrough - case "InvalidVpnGatewayAttachment.NotFound": - return nil, "", nil - } - } - - return nil, "", err - } - - vgw := resp.VpnGateways[0] - if len(vgw.VpcAttachments) == 0 { - return vgw, "detached", nil - } - - vga := vpnGatewayGetAttachment(vgw) - - log.Printf("[DEBUG] VPN Gateway %q attachment status: %s", vgwId, *vga.State) - return vgw, *vga.State, nil - } -} - -func vpnGatewayAttachmentId(vpcId, vgwId string) string { - return fmt.Sprintf("vpn-attachment-%x", hashcode.String(fmt.Sprintf("%s-%s", vpcId, vgwId))) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_route_propagation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_route_propagation.go deleted file mode 100644 index bed5f7e4d..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_route_propagation.go +++ /dev/null @@ -1,101 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpnGatewayRoutePropagation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpnGatewayRoutePropagationEnable, - Read: resourceAwsVpnGatewayRoutePropagationRead, - Delete: resourceAwsVpnGatewayRoutePropagationDisable, - - Schema: map[string]*schema.Schema{ - "vpn_gateway_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "route_table_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsVpnGatewayRoutePropagationEnable(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - gwID := d.Get("vpn_gateway_id").(string) - rtID := d.Get("route_table_id").(string) - - log.Printf("[INFO] Enabling VGW propagation from %s to %s", gwID, rtID) - _, err := conn.EnableVgwRoutePropagation(&ec2.EnableVgwRoutePropagationInput{ - GatewayId: aws.String(gwID), - RouteTableId: aws.String(rtID), - }) - if err != nil { - return fmt.Errorf("error enabling VGW propagation: %s", err) - } - - d.SetId(fmt.Sprintf("%s_%s", gwID, rtID)) - return nil -} - -func resourceAwsVpnGatewayRoutePropagationDisable(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - gwID := d.Get("vpn_gateway_id").(string) - rtID := d.Get("route_table_id").(string) - - log.Printf("[INFO] Disabling VGW propagation from %s to %s", gwID, rtID) - _, err := conn.DisableVgwRoutePropagation(&ec2.DisableVgwRoutePropagationInput{ - GatewayId: aws.String(gwID), - RouteTableId: aws.String(rtID), - }) - if err != nil { - return fmt.Errorf("error disabling VGW propagation: %s", err) - } - - return nil -} - -func resourceAwsVpnGatewayRoutePropagationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - gwID := d.Get("vpn_gateway_id").(string) - rtID := d.Get("route_table_id").(string) - - log.Printf("[INFO] Reading route table %s to check for VPN gateway %s", rtID, gwID) - rtRaw, _, err := resourceAwsRouteTableStateRefreshFunc(conn, rtID)() - if err != nil { - return err - } - if rtRaw == nil { - log.Printf("[INFO] Route table %q doesn't exist, so dropping %q route propagation from state", rtID, gwID) - d.SetId("") - return nil - } - - rt := rtRaw.(*ec2.RouteTable) - exists := false - for _, vgw := range rt.PropagatingVgws { - if *vgw.GatewayId == gwID { - exists = true - } - } - if !exists { - log.Printf("[INFO] %s is no longer propagating to %s, so dropping route propagation from state", rtID, gwID) - d.SetId("") - return nil - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_byte_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_byte_match_set.go deleted file mode 100644 index 9c62800d6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_byte_match_set.go +++ /dev/null @@ -1,230 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafByteMatchSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafByteMatchSetCreate, - Read: resourceAwsWafByteMatchSetRead, - Update: resourceAwsWafByteMatchSetUpdate, - Delete: resourceAwsWafByteMatchSetDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "byte_match_tuples": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "field_to_match": { - Type: schema.TypeSet, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "data": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "positional_constraint": { - Type: schema.TypeString, - Required: true, - }, - "target_string": { - Type: schema.TypeString, - Optional: true, - }, - "text_transformation": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafByteMatchSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - log.Printf("[INFO] Creating ByteMatchSet: %s", d.Get("name").(string)) - - wr := newWafRetryer(conn) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateByteMatchSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - return conn.CreateByteMatchSet(params) - }) - if err != nil { - return fmt.Errorf("Error creating ByteMatchSet: %s", err) - } - resp := out.(*waf.CreateByteMatchSetOutput) - - d.SetId(*resp.ByteMatchSet.ByteMatchSetId) - - return resourceAwsWafByteMatchSetUpdate(d, meta) -} - -func resourceAwsWafByteMatchSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - log.Printf("[INFO] Reading ByteMatchSet: %s", d.Get("name").(string)) - params := &waf.GetByteMatchSetInput{ - ByteMatchSetId: aws.String(d.Id()), - } - - resp, err := conn.GetByteMatchSet(params) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { - log.Printf("[WARN] WAF IPSet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("name", resp.ByteMatchSet.Name) - d.Set("byte_match_tuples", flattenWafByteMatchTuples(resp.ByteMatchSet.ByteMatchTuples)) - - return nil -} - -func resourceAwsWafByteMatchSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - log.Printf("[INFO] Updating ByteMatchSet: %s", d.Get("name").(string)) - - if d.HasChange("byte_match_tuples") { - o, n := d.GetChange("byte_match_tuples") - oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() - err := updateByteMatchSetResource(d.Id(), oldT, newT, conn) - if err != nil { - return fmt.Errorf("Error updating ByteMatchSet: %s", err) - } - } - - return resourceAwsWafByteMatchSetRead(d, meta) -} - -func resourceAwsWafByteMatchSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - oldTuples := d.Get("byte_match_tuples").(*schema.Set).List() - if len(oldTuples) > 0 { - noTuples := []interface{}{} - err := updateByteMatchSetResource(d.Id(), oldTuples, noTuples, conn) - if err != nil { - return fmt.Errorf("Error updating ByteMatchSet: %s", err) - } - } - - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteByteMatchSetInput{ - ChangeToken: token, - ByteMatchSetId: aws.String(d.Id()), - } - log.Printf("[INFO] Deleting WAF ByteMatchSet: %s", req) - return conn.DeleteByteMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Error deleting ByteMatchSet: %s", err) - } - - return nil -} - -func updateByteMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateByteMatchSetInput{ - ChangeToken: token, - ByteMatchSetId: aws.String(id), - Updates: diffWafByteMatchSetTuples(oldT, newT), - } - - return conn.UpdateByteMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Error updating ByteMatchSet: %s", err) - } - - return nil -} - -func flattenWafByteMatchTuples(bmt []*waf.ByteMatchTuple) []interface{} { - out := make([]interface{}, len(bmt)) - for i, t := range bmt { - m := make(map[string]interface{}) - - if t.FieldToMatch != nil { - m["field_to_match"] = flattenFieldToMatch(t.FieldToMatch) - } - m["positional_constraint"] = *t.PositionalConstraint - m["target_string"] = string(t.TargetString) - m["text_transformation"] = *t.TextTransformation - - out[i] = m - } - return out -} - -func diffWafByteMatchSetTuples(oldT, newT []interface{}) []*waf.ByteMatchSetUpdate { - updates := make([]*waf.ByteMatchSetUpdate, 0) - - for _, ot := range oldT { - tuple := ot.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newT, tuple); contains { - newT = append(newT[:idx], newT[idx+1:]...) - continue - } - - updates = append(updates, &waf.ByteMatchSetUpdate{ - Action: aws.String(waf.ChangeActionDelete), - ByteMatchTuple: &waf.ByteMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), - PositionalConstraint: aws.String(tuple["positional_constraint"].(string)), - TargetString: []byte(tuple["target_string"].(string)), - TextTransformation: aws.String(tuple["text_transformation"].(string)), - }, - }) - } - - for _, nt := range newT { - tuple := nt.(map[string]interface{}) - - updates = append(updates, &waf.ByteMatchSetUpdate{ - Action: aws.String(waf.ChangeActionInsert), - ByteMatchTuple: &waf.ByteMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), - PositionalConstraint: aws.String(tuple["positional_constraint"].(string)), - TargetString: []byte(tuple["target_string"].(string)), - TextTransformation: aws.String(tuple["text_transformation"].(string)), - }, - }) - } - return updates -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_geo_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_geo_match_set.go deleted file mode 100644 index dc5295b84..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_geo_match_set.go +++ /dev/null @@ -1,156 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafGeoMatchSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafGeoMatchSetCreate, - Read: resourceAwsWafGeoMatchSetRead, - Update: resourceAwsWafGeoMatchSetUpdate, - Delete: resourceAwsWafGeoMatchSetDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "geo_match_constraint": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafGeoMatchSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - log.Printf("[INFO] Creating GeoMatchSet: %s", d.Get("name").(string)) - - wr := newWafRetryer(conn) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateGeoMatchSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - - return conn.CreateGeoMatchSet(params) - }) - if err != nil { - return fmt.Errorf("Error creating GeoMatchSet: %s", err) - } - resp := out.(*waf.CreateGeoMatchSetOutput) - - d.SetId(*resp.GeoMatchSet.GeoMatchSetId) - - return resourceAwsWafGeoMatchSetUpdate(d, meta) -} - -func resourceAwsWafGeoMatchSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - log.Printf("[INFO] Reading GeoMatchSet: %s", d.Get("name").(string)) - params := &waf.GetGeoMatchSetInput{ - GeoMatchSetId: aws.String(d.Id()), - } - - resp, err := conn.GetGeoMatchSet(params) - if err != nil { - // TODO: Replace with constant once it's available - // See https://github.com/aws/aws-sdk-go/issues/1856 - if isAWSErr(err, "WAFNonexistentItemException", "") { - log.Printf("[WARN] WAF GeoMatchSet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("name", resp.GeoMatchSet.Name) - d.Set("geo_match_constraint", flattenWafGeoMatchConstraint(resp.GeoMatchSet.GeoMatchConstraints)) - - return nil -} - -func resourceAwsWafGeoMatchSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - if d.HasChange("geo_match_constraint") { - o, n := d.GetChange("geo_match_constraint") - oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateGeoMatchSetResource(d.Id(), oldT, newT, conn) - if err != nil { - return fmt.Errorf("Error updating GeoMatchSet: %s", err) - } - } - - return resourceAwsWafGeoMatchSetRead(d, meta) -} - -func resourceAwsWafGeoMatchSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - oldConstraints := d.Get("geo_match_constraint").(*schema.Set).List() - if len(oldConstraints) > 0 { - noConstraints := []interface{}{} - err := updateGeoMatchSetResource(d.Id(), oldConstraints, noConstraints, conn) - if err != nil { - return fmt.Errorf("Error updating GeoMatchConstraint: %s", err) - } - } - - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteGeoMatchSetInput{ - ChangeToken: token, - GeoMatchSetId: aws.String(d.Id()), - } - - return conn.DeleteGeoMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Error deleting GeoMatchSet: %s", err) - } - - return nil -} - -func updateGeoMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateGeoMatchSetInput{ - ChangeToken: token, - GeoMatchSetId: aws.String(id), - Updates: diffWafGeoMatchSetConstraints(oldT, newT), - } - - log.Printf("[INFO] Updating GeoMatchSet constraints: %s", req) - return conn.UpdateGeoMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Error updating GeoMatchSet: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_ipset.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_ipset.go deleted file mode 100644 index 9c4e1b477..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_ipset.go +++ /dev/null @@ -1,228 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/schema" -) - -// WAF requires UpdateIPSet operations be split into batches of 1000 Updates -const wafUpdateIPSetUpdatesLimit = 1000 - -func resourceAwsWafIPSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafIPSetCreate, - Read: resourceAwsWafIPSetRead, - Update: resourceAwsWafIPSetUpdate, - Delete: resourceAwsWafIPSetDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "ip_set_descriptors": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafIPSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - wr := newWafRetryer(conn) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateIPSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - return conn.CreateIPSet(params) - }) - if err != nil { - return err - } - resp := out.(*waf.CreateIPSetOutput) - d.SetId(*resp.IPSet.IPSetId) - return resourceAwsWafIPSetUpdate(d, meta) -} - -func resourceAwsWafIPSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - params := &waf.GetIPSetInput{ - IPSetId: aws.String(d.Id()), - } - - resp, err := conn.GetIPSet(params) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { - log.Printf("[WARN] WAF IPSet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - var descriptors []map[string]interface{} - - for _, descriptor := range resp.IPSet.IPSetDescriptors { - d := map[string]interface{}{ - "type": *descriptor.Type, - "value": *descriptor.Value, - } - descriptors = append(descriptors, d) - } - - d.Set("ip_set_descriptors", descriptors) - - d.Set("name", resp.IPSet.Name) - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "waf", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("ipset/%s", d.Id()), - } - d.Set("arn", arn.String()) - - return nil -} - -func resourceAwsWafIPSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - if d.HasChange("ip_set_descriptors") { - o, n := d.GetChange("ip_set_descriptors") - oldD, newD := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateWafIpSetDescriptors(d.Id(), oldD, newD, conn) - if err != nil { - return fmt.Errorf("Error Updating WAF IPSet: %s", err) - } - } - - return resourceAwsWafIPSetRead(d, meta) -} - -func resourceAwsWafIPSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - oldDescriptors := d.Get("ip_set_descriptors").(*schema.Set).List() - - if len(oldDescriptors) > 0 { - noDescriptors := []interface{}{} - err := updateWafIpSetDescriptors(d.Id(), oldDescriptors, noDescriptors, conn) - if err != nil { - return fmt.Errorf("Error Deleting IPSetDescriptors: %s", err) - } - } - - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteIPSetInput{ - ChangeToken: token, - IPSetId: aws.String(d.Id()), - } - log.Printf("[INFO] Deleting WAF IPSet") - return conn.DeleteIPSet(req) - }) - if err != nil { - return fmt.Errorf("Error Deleting WAF IPSet: %s", err) - } - - return nil -} - -func updateWafIpSetDescriptors(id string, oldD, newD []interface{}, conn *waf.WAF) error { - for _, ipSetUpdates := range diffWafIpSetDescriptors(oldD, newD) { - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateIPSetInput{ - ChangeToken: token, - IPSetId: aws.String(id), - Updates: ipSetUpdates, - } - log.Printf("[INFO] Updating IPSet descriptors: %s", req) - return conn.UpdateIPSet(req) - }) - if err != nil { - return fmt.Errorf("Error Updating WAF IPSet: %s", err) - } - } - - return nil -} - -func diffWafIpSetDescriptors(oldD, newD []interface{}) [][]*waf.IPSetUpdate { - updates := make([]*waf.IPSetUpdate, 0, wafUpdateIPSetUpdatesLimit) - updatesBatches := make([][]*waf.IPSetUpdate, 0) - - for _, od := range oldD { - descriptor := od.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newD, descriptor); contains { - newD = append(newD[:idx], newD[idx+1:]...) - continue - } - - if len(updates) == wafUpdateIPSetUpdatesLimit { - updatesBatches = append(updatesBatches, updates) - updates = make([]*waf.IPSetUpdate, 0, wafUpdateIPSetUpdatesLimit) - } - - updates = append(updates, &waf.IPSetUpdate{ - Action: aws.String(waf.ChangeActionDelete), - IPSetDescriptor: &waf.IPSetDescriptor{ - Type: aws.String(descriptor["type"].(string)), - Value: aws.String(descriptor["value"].(string)), - }, - }) - } - - for _, nd := range newD { - descriptor := nd.(map[string]interface{}) - - if len(updates) == wafUpdateIPSetUpdatesLimit { - updatesBatches = append(updatesBatches, updates) - updates = make([]*waf.IPSetUpdate, 0, wafUpdateIPSetUpdatesLimit) - } - - updates = append(updates, &waf.IPSetUpdate{ - Action: aws.String(waf.ChangeActionInsert), - IPSetDescriptor: &waf.IPSetDescriptor{ - Type: aws.String(descriptor["type"].(string)), - Value: aws.String(descriptor["value"].(string)), - }, - }) - } - updatesBatches = append(updatesBatches, updates) - return updatesBatches -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rate_based_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rate_based_rule.go deleted file mode 100644 index 2d3f5f5da..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rate_based_rule.go +++ /dev/null @@ -1,193 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsWafRateBasedRule() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRateBasedRuleCreate, - Read: resourceAwsWafRateBasedRuleRead, - Update: resourceAwsWafRateBasedRuleUpdate, - Delete: resourceAwsWafRateBasedRuleDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "metric_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateWafMetricName, - }, - "predicates": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "negated": { - Type: schema.TypeBool, - Required: true, - }, - "data_id": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(0, 128), - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateWafPredicatesType(), - }, - }, - }, - }, - "rate_key": { - Type: schema.TypeString, - Required: true, - }, - "rate_limit": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntAtLeast(2000), - }, - }, - } -} - -func resourceAwsWafRateBasedRuleCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - wr := newWafRetryer(conn) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateRateBasedRuleInput{ - ChangeToken: token, - MetricName: aws.String(d.Get("metric_name").(string)), - Name: aws.String(d.Get("name").(string)), - RateKey: aws.String(d.Get("rate_key").(string)), - RateLimit: aws.Int64(int64(d.Get("rate_limit").(int))), - } - - return conn.CreateRateBasedRule(params) - }) - if err != nil { - return err - } - resp := out.(*waf.CreateRateBasedRuleOutput) - d.SetId(*resp.Rule.RuleId) - return resourceAwsWafRateBasedRuleUpdate(d, meta) -} - -func resourceAwsWafRateBasedRuleRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - params := &waf.GetRateBasedRuleInput{ - RuleId: aws.String(d.Id()), - } - - resp, err := conn.GetRateBasedRule(params) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { - log.Printf("[WARN] WAF Rate Based Rule (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - var predicates []map[string]interface{} - - for _, predicateSet := range resp.Rule.MatchPredicates { - predicate := map[string]interface{}{ - "negated": *predicateSet.Negated, - "type": *predicateSet.Type, - "data_id": *predicateSet.DataId, - } - predicates = append(predicates, predicate) - } - - d.Set("predicates", predicates) - d.Set("name", resp.Rule.Name) - d.Set("metric_name", resp.Rule.MetricName) - d.Set("rate_key", resp.Rule.RateKey) - d.Set("rate_limit", resp.Rule.RateLimit) - - return nil -} - -func resourceAwsWafRateBasedRuleUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - if d.HasChange("predicates") { - o, n := d.GetChange("predicates") - oldP, newP := o.(*schema.Set).List(), n.(*schema.Set).List() - rateLimit := d.Get("rate_limit") - - err := updateWafRateBasedRuleResource(d.Id(), oldP, newP, rateLimit, conn) - if err != nil { - return fmt.Errorf("Error Updating WAF Rule: %s", err) - } - } - - return resourceAwsWafRateBasedRuleRead(d, meta) -} - -func resourceAwsWafRateBasedRuleDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - oldPredicates := d.Get("predicates").(*schema.Set).List() - if len(oldPredicates) > 0 { - noPredicates := []interface{}{} - rateLimit := d.Get("rate_limit") - - err := updateWafRateBasedRuleResource(d.Id(), oldPredicates, noPredicates, rateLimit, conn) - if err != nil { - return fmt.Errorf("Error updating WAF Rate Based Rule Predicates: %s", err) - } - } - - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteRateBasedRuleInput{ - ChangeToken: token, - RuleId: aws.String(d.Id()), - } - log.Printf("[INFO] Deleting WAF Rate Based Rule") - return conn.DeleteRateBasedRule(req) - }) - if err != nil { - return fmt.Errorf("Error deleting WAF Rate Based Rule: %s", err) - } - - return nil -} - -func updateWafRateBasedRuleResource(id string, oldP, newP []interface{}, rateLimit interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateRateBasedRuleInput{ - ChangeToken: token, - RuleId: aws.String(id), - Updates: diffWafRulePredicates(oldP, newP), - RateLimit: aws.Int64(int64(rateLimit.(int))), - } - - return conn.UpdateRateBasedRule(req) - }) - if err != nil { - return fmt.Errorf("Error Updating WAF Rate Based Rule: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_match_set.go deleted file mode 100644 index 9bfbee72b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_match_set.go +++ /dev/null @@ -1,175 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafRegexMatchSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegexMatchSetCreate, - Read: resourceAwsWafRegexMatchSetRead, - Update: resourceAwsWafRegexMatchSetUpdate, - Delete: resourceAwsWafRegexMatchSetDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "regex_match_tuple": { - Type: schema.TypeSet, - Optional: true, - Set: resourceAwsWafRegexMatchSetTupleHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "field_to_match": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "data": { - Type: schema.TypeString, - Optional: true, - StateFunc: func(v interface{}) string { - return strings.ToLower(v.(string)) - }, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "regex_pattern_set_id": { - Type: schema.TypeString, - Required: true, - }, - "text_transformation": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafRegexMatchSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - log.Printf("[INFO] Creating WAF Regex Match Set: %s", d.Get("name").(string)) - - wr := newWafRetryer(conn) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateRegexMatchSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - return conn.CreateRegexMatchSet(params) - }) - if err != nil { - return fmt.Errorf("Failed creating WAF Regex Match Set: %s", err) - } - resp := out.(*waf.CreateRegexMatchSetOutput) - - d.SetId(*resp.RegexMatchSet.RegexMatchSetId) - - return resourceAwsWafRegexMatchSetUpdate(d, meta) -} - -func resourceAwsWafRegexMatchSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - log.Printf("[INFO] Reading WAF Regex Match Set: %s", d.Get("name").(string)) - params := &waf.GetRegexMatchSetInput{ - RegexMatchSetId: aws.String(d.Id()), - } - - resp, err := conn.GetRegexMatchSet(params) - if err != nil { - if isAWSErr(err, "WAFNonexistentItemException", "") { - log.Printf("[WARN] WAF Regex Match Set (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("name", resp.RegexMatchSet.Name) - d.Set("regex_match_tuple", flattenWafRegexMatchTuples(resp.RegexMatchSet.RegexMatchTuples)) - - return nil -} - -func resourceAwsWafRegexMatchSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - log.Printf("[INFO] Updating WAF Regex Match Set: %s", d.Get("name").(string)) - - if d.HasChange("regex_match_tuple") { - o, n := d.GetChange("regex_match_tuple") - oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() - err := updateRegexMatchSetResource(d.Id(), oldT, newT, conn) - if err != nil { - return fmt.Errorf("Failed updating WAF Regex Match Set: %s", err) - } - } - - return resourceAwsWafRegexMatchSetRead(d, meta) -} - -func resourceAwsWafRegexMatchSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - oldTuples := d.Get("regex_match_tuple").(*schema.Set).List() - if len(oldTuples) > 0 { - noTuples := []interface{}{} - err := updateRegexMatchSetResource(d.Id(), oldTuples, noTuples, conn) - if err != nil { - return fmt.Errorf("Error updating WAF Regex Match Set: %s", err) - } - } - - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteRegexMatchSetInput{ - ChangeToken: token, - RegexMatchSetId: aws.String(d.Id()), - } - log.Printf("[INFO] Deleting WAF Regex Match Set: %s", req) - return conn.DeleteRegexMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Failed deleting WAF Regex Match Set: %s", err) - } - - return nil -} - -func updateRegexMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateRegexMatchSetInput{ - ChangeToken: token, - RegexMatchSetId: aws.String(id), - Updates: diffWafRegexMatchSetTuples(oldT, newT), - } - - return conn.UpdateRegexMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Failed updating WAF Regex Match Set: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_pattern_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_pattern_set.go deleted file mode 100644 index a09ba6ffc..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_pattern_set.go +++ /dev/null @@ -1,144 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafRegexPatternSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegexPatternSetCreate, - Read: resourceAwsWafRegexPatternSetRead, - Update: resourceAwsWafRegexPatternSetUpdate, - Delete: resourceAwsWafRegexPatternSetDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "regex_pattern_strings": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func resourceAwsWafRegexPatternSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - log.Printf("[INFO] Creating WAF Regex Pattern Set: %s", d.Get("name").(string)) - - wr := newWafRetryer(conn) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateRegexPatternSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - return conn.CreateRegexPatternSet(params) - }) - if err != nil { - return fmt.Errorf("Failed creating WAF Regex Pattern Set: %s", err) - } - resp := out.(*waf.CreateRegexPatternSetOutput) - - d.SetId(*resp.RegexPatternSet.RegexPatternSetId) - - return resourceAwsWafRegexPatternSetUpdate(d, meta) -} - -func resourceAwsWafRegexPatternSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - log.Printf("[INFO] Reading WAF Regex Pattern Set: %s", d.Get("name").(string)) - params := &waf.GetRegexPatternSetInput{ - RegexPatternSetId: aws.String(d.Id()), - } - - resp, err := conn.GetRegexPatternSet(params) - if err != nil { - // TODO: Replace with a constant once available - // See https://github.com/aws/aws-sdk-go/issues/1856 - if isAWSErr(err, "WAFNonexistentItemException", "") { - log.Printf("[WARN] WAF Regex Pattern Set (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("name", resp.RegexPatternSet.Name) - d.Set("regex_pattern_strings", aws.StringValueSlice(resp.RegexPatternSet.RegexPatternStrings)) - - return nil -} - -func resourceAwsWafRegexPatternSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - log.Printf("[INFO] Updating WAF Regex Pattern Set: %s", d.Get("name").(string)) - - if d.HasChange("regex_pattern_strings") { - o, n := d.GetChange("regex_pattern_strings") - oldPatterns, newPatterns := o.(*schema.Set).List(), n.(*schema.Set).List() - err := updateWafRegexPatternSetPatternStrings(d.Id(), oldPatterns, newPatterns, conn) - if err != nil { - return fmt.Errorf("Failed updating WAF Regex Pattern Set: %s", err) - } - } - - return resourceAwsWafRegexPatternSetRead(d, meta) -} - -func resourceAwsWafRegexPatternSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - oldPatterns := d.Get("regex_pattern_strings").(*schema.Set).List() - if len(oldPatterns) > 0 { - noPatterns := []interface{}{} - err := updateWafRegexPatternSetPatternStrings(d.Id(), oldPatterns, noPatterns, conn) - if err != nil { - return fmt.Errorf("Error updating WAF Regex Pattern Set: %s", err) - } - } - - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteRegexPatternSetInput{ - ChangeToken: token, - RegexPatternSetId: aws.String(d.Id()), - } - log.Printf("[INFO] Deleting WAF Regex Pattern Set: %s", req) - return conn.DeleteRegexPatternSet(req) - }) - if err != nil { - return fmt.Errorf("Failed deleting WAF Regex Pattern Set: %s", err) - } - - return nil -} - -func updateWafRegexPatternSetPatternStrings(id string, oldPatterns, newPatterns []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateRegexPatternSetInput{ - ChangeToken: token, - RegexPatternSetId: aws.String(id), - Updates: diffWafRegexPatternSetPatternStrings(oldPatterns, newPatterns), - } - - return conn.UpdateRegexPatternSet(req) - }) - if err != nil { - return fmt.Errorf("Failed updating WAF Regex Pattern Set: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule.go deleted file mode 100644 index fae17269a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule.go +++ /dev/null @@ -1,179 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsWafRule() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRuleCreate, - Read: resourceAwsWafRuleRead, - Update: resourceAwsWafRuleUpdate, - Delete: resourceAwsWafRuleDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "metric_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateWafMetricName, - }, - "predicates": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "negated": { - Type: schema.TypeBool, - Required: true, - }, - "data_id": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(0, 128), - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateWafPredicatesType(), - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafRuleCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - wr := newWafRetryer(conn) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateRuleInput{ - ChangeToken: token, - MetricName: aws.String(d.Get("metric_name").(string)), - Name: aws.String(d.Get("name").(string)), - } - - return conn.CreateRule(params) - }) - if err != nil { - return err - } - resp := out.(*waf.CreateRuleOutput) - d.SetId(*resp.Rule.RuleId) - return resourceAwsWafRuleUpdate(d, meta) -} - -func resourceAwsWafRuleRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - params := &waf.GetRuleInput{ - RuleId: aws.String(d.Id()), - } - - resp, err := conn.GetRule(params) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { - log.Printf("[WARN] WAF Rule (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - var predicates []map[string]interface{} - - for _, predicateSet := range resp.Rule.Predicates { - predicate := map[string]interface{}{ - "negated": *predicateSet.Negated, - "type": *predicateSet.Type, - "data_id": *predicateSet.DataId, - } - predicates = append(predicates, predicate) - } - - d.Set("predicates", predicates) - d.Set("name", resp.Rule.Name) - d.Set("metric_name", resp.Rule.MetricName) - - return nil -} - -func resourceAwsWafRuleUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - if d.HasChange("predicates") { - o, n := d.GetChange("predicates") - oldP, newP := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateWafRuleResource(d.Id(), oldP, newP, conn) - if err != nil { - return fmt.Errorf("Error Updating WAF Rule: %s", err) - } - } - - return resourceAwsWafRuleRead(d, meta) -} - -func resourceAwsWafRuleDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - oldPredicates := d.Get("predicates").(*schema.Set).List() - if len(oldPredicates) > 0 { - noPredicates := []interface{}{} - err := updateWafRuleResource(d.Id(), oldPredicates, noPredicates, conn) - if err != nil { - return fmt.Errorf("Error updating WAF Rule Predicates: %s", err) - } - } - - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteRuleInput{ - ChangeToken: token, - RuleId: aws.String(d.Id()), - } - log.Printf("[INFO] Deleting WAF Rule") - return conn.DeleteRule(req) - }) - if err != nil { - return fmt.Errorf("Error deleting WAF Rule: %s", err) - } - - return nil -} - -func updateWafRuleResource(id string, oldP, newP []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateRuleInput{ - ChangeToken: token, - RuleId: aws.String(id), - Updates: diffWafRulePredicates(oldP, newP), - } - - return conn.UpdateRule(req) - }) - if err != nil { - return fmt.Errorf("Error Updating WAF Rule: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule_group.go deleted file mode 100644 index 803d6ea07..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule_group.go +++ /dev/null @@ -1,187 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafRuleGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRuleGroupCreate, - Read: resourceAwsWafRuleGroupRead, - Update: resourceAwsWafRuleGroupUpdate, - Delete: resourceAwsWafRuleGroupDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "metric_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateWafMetricName, - }, - "activated_rule": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "action": { - Type: schema.TypeList, - MaxItems: 1, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "priority": { - Type: schema.TypeInt, - Required: true, - }, - "rule_id": { - Type: schema.TypeString, - Required: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - Default: waf.WafRuleTypeRegular, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafRuleGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - wr := newWafRetryer(conn) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateRuleGroupInput{ - ChangeToken: token, - MetricName: aws.String(d.Get("metric_name").(string)), - Name: aws.String(d.Get("name").(string)), - } - - return conn.CreateRuleGroup(params) - }) - if err != nil { - return err - } - resp := out.(*waf.CreateRuleGroupOutput) - d.SetId(*resp.RuleGroup.RuleGroupId) - return resourceAwsWafRuleGroupUpdate(d, meta) -} - -func resourceAwsWafRuleGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - params := &waf.GetRuleGroupInput{ - RuleGroupId: aws.String(d.Id()), - } - - resp, err := conn.GetRuleGroup(params) - if err != nil { - if isAWSErr(err, "WAFNonexistentItemException", "") { - log.Printf("[WARN] WAF Rule Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - rResp, err := conn.ListActivatedRulesInRuleGroup(&waf.ListActivatedRulesInRuleGroupInput{ - RuleGroupId: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("error listing activated rules in WAF Rule Group (%s): %s", d.Id(), err) - } - - d.Set("activated_rule", flattenWafActivatedRules(rResp.ActivatedRules)) - d.Set("name", resp.RuleGroup.Name) - d.Set("metric_name", resp.RuleGroup.MetricName) - - return nil -} - -func resourceAwsWafRuleGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - if d.HasChange("activated_rule") { - o, n := d.GetChange("activated_rule") - oldRules, newRules := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateWafRuleGroupResource(d.Id(), oldRules, newRules, conn) - if err != nil { - return fmt.Errorf("Error Updating WAF Rule Group: %s", err) - } - } - - return resourceAwsWafRuleGroupRead(d, meta) -} - -func resourceAwsWafRuleGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - oldRules := d.Get("activated_rule").(*schema.Set).List() - err := deleteWafRuleGroup(d.Id(), oldRules, conn) - - return err -} - -func deleteWafRuleGroup(id string, oldRules []interface{}, conn *waf.WAF) error { - if len(oldRules) > 0 { - noRules := []interface{}{} - err := updateWafRuleGroupResource(id, oldRules, noRules, conn) - if err != nil { - return fmt.Errorf("Error updating WAF Rule Group Predicates: %s", err) - } - } - - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteRuleGroupInput{ - ChangeToken: token, - RuleGroupId: aws.String(id), - } - log.Printf("[INFO] Deleting WAF Rule Group") - return conn.DeleteRuleGroup(req) - }) - if err != nil { - return fmt.Errorf("Error deleting WAF Rule Group: %s", err) - } - return nil -} - -func updateWafRuleGroupResource(id string, oldRules, newRules []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateRuleGroupInput{ - ChangeToken: token, - RuleGroupId: aws.String(id), - Updates: diffWafRuleGroupActivatedRules(oldRules, newRules), - } - - return conn.UpdateRuleGroup(req) - }) - if err != nil { - return fmt.Errorf("Error Updating WAF Rule Group: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_size_constraint_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_size_constraint_set.go deleted file mode 100644 index 875752473..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_size_constraint_set.go +++ /dev/null @@ -1,133 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafSizeConstraintSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafSizeConstraintSetCreate, - Read: resourceAwsWafSizeConstraintSetRead, - Update: resourceAwsWafSizeConstraintSetUpdate, - Delete: resourceAwsWafSizeConstraintSetDelete, - - Schema: wafSizeConstraintSetSchema(), - } -} - -func resourceAwsWafSizeConstraintSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - log.Printf("[INFO] Creating SizeConstraintSet: %s", d.Get("name").(string)) - - wr := newWafRetryer(conn) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateSizeConstraintSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - - return conn.CreateSizeConstraintSet(params) - }) - if err != nil { - return fmt.Errorf("Error creating SizeConstraintSet: %s", err) - } - resp := out.(*waf.CreateSizeConstraintSetOutput) - - d.SetId(*resp.SizeConstraintSet.SizeConstraintSetId) - - return resourceAwsWafSizeConstraintSetUpdate(d, meta) -} - -func resourceAwsWafSizeConstraintSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - log.Printf("[INFO] Reading SizeConstraintSet: %s", d.Get("name").(string)) - params := &waf.GetSizeConstraintSetInput{ - SizeConstraintSetId: aws.String(d.Id()), - } - - resp, err := conn.GetSizeConstraintSet(params) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { - log.Printf("[WARN] WAF SizeConstraintSet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("name", resp.SizeConstraintSet.Name) - d.Set("size_constraints", flattenWafSizeConstraints(resp.SizeConstraintSet.SizeConstraints)) - - return nil -} - -func resourceAwsWafSizeConstraintSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - if d.HasChange("size_constraints") { - o, n := d.GetChange("size_constraints") - oldConstraints, newConstraints := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateSizeConstraintSetResource(d.Id(), oldConstraints, newConstraints, conn) - if err != nil { - return fmt.Errorf("Error updating SizeConstraintSet: %s", err) - } - } - - return resourceAwsWafSizeConstraintSetRead(d, meta) -} - -func resourceAwsWafSizeConstraintSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - oldConstraints := d.Get("size_constraints").(*schema.Set).List() - - if len(oldConstraints) > 0 { - noConstraints := []interface{}{} - err := updateSizeConstraintSetResource(d.Id(), oldConstraints, noConstraints, conn) - if err != nil { - return fmt.Errorf("Error deleting SizeConstraintSet: %s", err) - } - } - - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteSizeConstraintSetInput{ - ChangeToken: token, - SizeConstraintSetId: aws.String(d.Id()), - } - return conn.DeleteSizeConstraintSet(req) - }) - if err != nil { - return fmt.Errorf("Error deleting SizeConstraintSet: %s", err) - } - - return nil -} - -func updateSizeConstraintSetResource(id string, oldS, newS []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateSizeConstraintSetInput{ - ChangeToken: token, - SizeConstraintSetId: aws.String(id), - Updates: diffWafSizeConstraints(oldS, newS), - } - - log.Printf("[INFO] Updating WAF Size Constraint constraints: %s", req) - return conn.UpdateSizeConstraintSet(req) - }) - if err != nil { - return fmt.Errorf("Error updating SizeConstraintSet: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_sql_injection_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_sql_injection_match_set.go deleted file mode 100644 index ff9bb4d6e..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_sql_injection_match_set.go +++ /dev/null @@ -1,214 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafSqlInjectionMatchSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafSqlInjectionMatchSetCreate, - Read: resourceAwsWafSqlInjectionMatchSetRead, - Update: resourceAwsWafSqlInjectionMatchSetUpdate, - Delete: resourceAwsWafSqlInjectionMatchSetDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "sql_injection_match_tuples": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "field_to_match": { - Type: schema.TypeSet, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "data": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "text_transformation": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafSqlInjectionMatchSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - log.Printf("[INFO] Creating SqlInjectionMatchSet: %s", d.Get("name").(string)) - - wr := newWafRetryer(conn) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateSqlInjectionMatchSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - - return conn.CreateSqlInjectionMatchSet(params) - }) - if err != nil { - return fmt.Errorf("Error creating SqlInjectionMatchSet: %s", err) - } - resp := out.(*waf.CreateSqlInjectionMatchSetOutput) - d.SetId(*resp.SqlInjectionMatchSet.SqlInjectionMatchSetId) - - return resourceAwsWafSqlInjectionMatchSetUpdate(d, meta) -} - -func resourceAwsWafSqlInjectionMatchSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - log.Printf("[INFO] Reading SqlInjectionMatchSet: %s", d.Get("name").(string)) - params := &waf.GetSqlInjectionMatchSetInput{ - SqlInjectionMatchSetId: aws.String(d.Id()), - } - - resp, err := conn.GetSqlInjectionMatchSet(params) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { - log.Printf("[WARN] WAF IPSet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("name", resp.SqlInjectionMatchSet.Name) - d.Set("sql_injection_match_tuples", resp.SqlInjectionMatchSet.SqlInjectionMatchTuples) - - return nil -} - -func resourceAwsWafSqlInjectionMatchSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - if d.HasChange("sql_injection_match_tuples") { - o, n := d.GetChange("sql_injection_match_tuples") - oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateSqlInjectionMatchSetResource(d.Id(), oldT, newT, conn) - if err != nil { - return fmt.Errorf("Error updating SqlInjectionMatchSet: %s", err) - } - } - - return resourceAwsWafSqlInjectionMatchSetRead(d, meta) -} - -func resourceAwsWafSqlInjectionMatchSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - oldTuples := d.Get("sql_injection_match_tuples").(*schema.Set).List() - - if len(oldTuples) > 0 { - noTuples := []interface{}{} - err := updateSqlInjectionMatchSetResource(d.Id(), oldTuples, noTuples, conn) - if err != nil { - return fmt.Errorf("Error deleting SqlInjectionMatchSet: %s", err) - } - } - - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteSqlInjectionMatchSetInput{ - ChangeToken: token, - SqlInjectionMatchSetId: aws.String(d.Id()), - } - - return conn.DeleteSqlInjectionMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Error deleting SqlInjectionMatchSet: %s", err) - } - - return nil -} - -func updateSqlInjectionMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateSqlInjectionMatchSetInput{ - ChangeToken: token, - SqlInjectionMatchSetId: aws.String(id), - Updates: diffWafSqlInjectionMatchTuples(oldT, newT), - } - - log.Printf("[INFO] Updating SqlInjectionMatchSet: %s", req) - return conn.UpdateSqlInjectionMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Error updating SqlInjectionMatchSet: %s", err) - } - - return nil -} - -func flattenWafSqlInjectionMatchTuples(ts []*waf.SqlInjectionMatchTuple) []interface{} { - out := make([]interface{}, len(ts)) - for i, t := range ts { - m := make(map[string]interface{}) - m["text_transformation"] = *t.TextTransformation - m["field_to_match"] = flattenFieldToMatch(t.FieldToMatch) - out[i] = m - } - - return out -} - -func diffWafSqlInjectionMatchTuples(oldT, newT []interface{}) []*waf.SqlInjectionMatchSetUpdate { - updates := make([]*waf.SqlInjectionMatchSetUpdate, 0) - - for _, od := range oldT { - tuple := od.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newT, tuple); contains { - newT = append(newT[:idx], newT[idx+1:]...) - continue - } - - updates = append(updates, &waf.SqlInjectionMatchSetUpdate{ - Action: aws.String(waf.ChangeActionDelete), - SqlInjectionMatchTuple: &waf.SqlInjectionMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), - TextTransformation: aws.String(tuple["text_transformation"].(string)), - }, - }) - } - - for _, nd := range newT { - tuple := nd.(map[string]interface{}) - - updates = append(updates, &waf.SqlInjectionMatchSetUpdate{ - Action: aws.String(waf.ChangeActionInsert), - SqlInjectionMatchTuple: &waf.SqlInjectionMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), - TextTransformation: aws.String(tuple["text_transformation"].(string)), - }, - }) - } - return updates -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go deleted file mode 100644 index 030162386..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go +++ /dev/null @@ -1,221 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsWafWebAcl() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafWebAclCreate, - Read: resourceAwsWafWebAclRead, - Update: resourceAwsWafWebAclUpdate, - Delete: resourceAwsWafWebAclDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "default_action": { - Type: schema.TypeSet, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "metric_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateWafMetricName, - }, - "rules": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "action": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "override_action": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "priority": { - Type: schema.TypeInt, - Required: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - Default: waf.WafRuleTypeRegular, - ValidateFunc: validation.StringInSlice([]string{ - waf.WafRuleTypeRegular, - waf.WafRuleTypeRateBased, - waf.WafRuleTypeGroup, - }, false), - }, - "rule_id": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafWebAclCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - wr := newWafRetryer(conn) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateWebACLInput{ - ChangeToken: token, - DefaultAction: expandWafAction(d.Get("default_action").(*schema.Set).List()), - MetricName: aws.String(d.Get("metric_name").(string)), - Name: aws.String(d.Get("name").(string)), - } - - return conn.CreateWebACL(params) - }) - if err != nil { - return err - } - resp := out.(*waf.CreateWebACLOutput) - d.SetId(*resp.WebACL.WebACLId) - return resourceAwsWafWebAclUpdate(d, meta) -} - -func resourceAwsWafWebAclRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - params := &waf.GetWebACLInput{ - WebACLId: aws.String(d.Id()), - } - - resp, err := conn.GetWebACL(params) - if err != nil { - if isAWSErr(err, waf.ErrCodeNonexistentItemException, "") { - log.Printf("[WARN] WAF ACL (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - if resp == nil || resp.WebACL == nil { - log.Printf("[WARN] WAF ACL (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err := d.Set("default_action", flattenWafAction(resp.WebACL.DefaultAction)); err != nil { - return fmt.Errorf("error setting default_action: %s", err) - } - d.Set("name", resp.WebACL.Name) - d.Set("metric_name", resp.WebACL.MetricName) - if err := d.Set("rules", flattenWafWebAclRules(resp.WebACL.Rules)); err != nil { - return fmt.Errorf("error setting rules: %s", err) - } - - return nil -} - -func resourceAwsWafWebAclUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - if d.HasChange("default_action") || d.HasChange("rules") { - o, n := d.GetChange("rules") - oldR, newR := o.(*schema.Set).List(), n.(*schema.Set).List() - - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateWebACLInput{ - ChangeToken: token, - DefaultAction: expandWafAction(d.Get("default_action").(*schema.Set).List()), - Updates: diffWafWebAclRules(oldR, newR), - WebACLId: aws.String(d.Id()), - } - return conn.UpdateWebACL(req) - }) - if err != nil { - return fmt.Errorf("Error Updating WAF ACL: %s", err) - } - } - - return resourceAwsWafWebAclRead(d, meta) -} - -func resourceAwsWafWebAclDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - // First, need to delete all rules - rules := d.Get("rules").(*schema.Set).List() - if len(rules) > 0 { - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateWebACLInput{ - ChangeToken: token, - DefaultAction: expandWafAction(d.Get("default_action").(*schema.Set).List()), - Updates: diffWafWebAclRules(rules, []interface{}{}), - WebACLId: aws.String(d.Id()), - } - return conn.UpdateWebACL(req) - }) - if err != nil { - return fmt.Errorf("Error Removing WAF Regional ACL Rules: %s", err) - } - } - - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteWebACLInput{ - ChangeToken: token, - WebACLId: aws.String(d.Id()), - } - - log.Printf("[INFO] Deleting WAF ACL") - return conn.DeleteWebACL(req) - }) - if err != nil { - return fmt.Errorf("Error Deleting WAF ACL: %s", err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_xss_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_xss_match_set.go deleted file mode 100644 index 56dff1191..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_xss_match_set.go +++ /dev/null @@ -1,213 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafXssMatchSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafXssMatchSetCreate, - Read: resourceAwsWafXssMatchSetRead, - Update: resourceAwsWafXssMatchSetUpdate, - Delete: resourceAwsWafXssMatchSetDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "xss_match_tuples": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "field_to_match": { - Type: schema.TypeSet, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "data": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "text_transformation": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafXssMatchSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - log.Printf("[INFO] Creating XssMatchSet: %s", d.Get("name").(string)) - - wr := newWafRetryer(conn) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateXssMatchSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - - return conn.CreateXssMatchSet(params) - }) - if err != nil { - return fmt.Errorf("Error creating XssMatchSet: %s", err) - } - resp := out.(*waf.CreateXssMatchSetOutput) - - d.SetId(*resp.XssMatchSet.XssMatchSetId) - - return resourceAwsWafXssMatchSetUpdate(d, meta) -} - -func resourceAwsWafXssMatchSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - log.Printf("[INFO] Reading XssMatchSet: %s", d.Get("name").(string)) - params := &waf.GetXssMatchSetInput{ - XssMatchSetId: aws.String(d.Id()), - } - - resp, err := conn.GetXssMatchSet(params) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { - log.Printf("[WARN] WAF IPSet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("name", resp.XssMatchSet.Name) - d.Set("xss_match_tuples", flattenWafXssMatchTuples(resp.XssMatchSet.XssMatchTuples)) - - return nil -} - -func resourceAwsWafXssMatchSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - if d.HasChange("xss_match_tuples") { - o, n := d.GetChange("xss_match_tuples") - oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateXssMatchSetResource(d.Id(), oldT, newT, conn) - if err != nil { - return fmt.Errorf("Error updating XssMatchSet: %s", err) - } - } - - return resourceAwsWafXssMatchSetRead(d, meta) -} - -func resourceAwsWafXssMatchSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafconn - - oldTuples := d.Get("xss_match_tuples").(*schema.Set).List() - if len(oldTuples) > 0 { - noTuples := []interface{}{} - err := updateXssMatchSetResource(d.Id(), oldTuples, noTuples, conn) - if err != nil { - return fmt.Errorf("Error updating IPSetDescriptors: %s", err) - } - } - - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteXssMatchSetInput{ - ChangeToken: token, - XssMatchSetId: aws.String(d.Id()), - } - - return conn.DeleteXssMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Error deleting XssMatchSet: %s", err) - } - - return nil -} - -func updateXssMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateXssMatchSetInput{ - ChangeToken: token, - XssMatchSetId: aws.String(id), - Updates: diffWafXssMatchSetTuples(oldT, newT), - } - - log.Printf("[INFO] Updating XssMatchSet tuples: %s", req) - return conn.UpdateXssMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Error updating XssMatchSet: %s", err) - } - - return nil -} - -func flattenWafXssMatchTuples(ts []*waf.XssMatchTuple) []interface{} { - out := make([]interface{}, len(ts)) - for i, t := range ts { - m := make(map[string]interface{}) - m["field_to_match"] = flattenFieldToMatch(t.FieldToMatch) - m["text_transformation"] = *t.TextTransformation - out[i] = m - } - return out -} - -func diffWafXssMatchSetTuples(oldT, newT []interface{}) []*waf.XssMatchSetUpdate { - updates := make([]*waf.XssMatchSetUpdate, 0) - - for _, od := range oldT { - tuple := od.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newT, tuple); contains { - newT = append(newT[:idx], newT[idx+1:]...) - continue - } - - updates = append(updates, &waf.XssMatchSetUpdate{ - Action: aws.String(waf.ChangeActionDelete), - XssMatchTuple: &waf.XssMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), - TextTransformation: aws.String(tuple["text_transformation"].(string)), - }, - }) - } - - for _, nd := range newT { - tuple := nd.(map[string]interface{}) - - updates = append(updates, &waf.XssMatchSetUpdate{ - Action: aws.String(waf.ChangeActionInsert), - XssMatchTuple: &waf.XssMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), - TextTransformation: aws.String(tuple["text_transformation"].(string)), - }, - }) - } - return updates -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_byte_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_byte_match_set.go deleted file mode 100644 index f2578764a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_byte_match_set.go +++ /dev/null @@ -1,309 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafRegionalByteMatchSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegionalByteMatchSetCreate, - Read: resourceAwsWafRegionalByteMatchSetRead, - Update: resourceAwsWafRegionalByteMatchSetUpdate, - Delete: resourceAwsWafRegionalByteMatchSetDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "byte_match_tuple": { - Type: schema.TypeSet, - Optional: true, - ConflictsWith: []string{"byte_match_tuples"}, - Deprecated: "use `byte_match_tuples` instead", - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "field_to_match": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "data": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "positional_constraint": { - Type: schema.TypeString, - Required: true, - }, - "target_string": { - Type: schema.TypeString, - Optional: true, - }, - "text_transformation": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "byte_match_tuples": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "field_to_match": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "data": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "positional_constraint": { - Type: schema.TypeString, - Required: true, - }, - "target_string": { - Type: schema.TypeString, - Optional: true, - }, - "text_transformation": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafRegionalByteMatchSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - log.Printf("[INFO] Creating ByteMatchSet: %s", d.Get("name").(string)) - - wr := newWafRegionalRetryer(conn, region) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateByteMatchSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - return conn.CreateByteMatchSet(params) - }) - - if err != nil { - return fmt.Errorf("Error creating ByteMatchSet: %s", err) - } - resp := out.(*waf.CreateByteMatchSetOutput) - - d.SetId(*resp.ByteMatchSet.ByteMatchSetId) - - return resourceAwsWafRegionalByteMatchSetUpdate(d, meta) -} - -func resourceAwsWafRegionalByteMatchSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - - log.Printf("[INFO] Reading ByteMatchSet: %s", d.Get("name").(string)) - - params := &waf.GetByteMatchSetInput{ - ByteMatchSetId: aws.String(d.Id()), - } - - resp, err := conn.GetByteMatchSet(params) - - if isAWSErr(err, waf.ErrCodeNonexistentItemException, "") { - log.Printf("[WARN] WAF Regional Byte Set Match (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err != nil { - return fmt.Errorf("error getting WAF Regional Byte Match Set (%s): %s", d.Id(), err) - } - - if resp == nil || resp.ByteMatchSet == nil { - log.Printf("[WARN] WAF Regional Byte Set Match (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if _, ok := d.GetOk("byte_match_tuple"); ok { - if err := d.Set("byte_match_tuple", flattenWafByteMatchTuplesWR(resp.ByteMatchSet.ByteMatchTuples)); err != nil { - return fmt.Errorf("error setting byte_match_tuple: %s", err) - } - } else { - if err := d.Set("byte_match_tuples", flattenWafByteMatchTuplesWR(resp.ByteMatchSet.ByteMatchTuples)); err != nil { - return fmt.Errorf("error setting byte_match_tuples: %s", err) - } - } - d.Set("name", resp.ByteMatchSet.Name) - - return nil -} - -func flattenWafByteMatchTuplesWR(in []*waf.ByteMatchTuple) []interface{} { - tuples := make([]interface{}, len(in)) - - for i, tuple := range in { - fieldToMatchMap := map[string]interface{}{ - "data": aws.StringValue(tuple.FieldToMatch.Data), - "type": aws.StringValue(tuple.FieldToMatch.Type), - } - - m := map[string]interface{}{ - "field_to_match": []map[string]interface{}{fieldToMatchMap}, - "positional_constraint": aws.StringValue(tuple.PositionalConstraint), - "target_string": string(tuple.TargetString), - "text_transformation": aws.StringValue(tuple.TextTransformation), - } - tuples[i] = m - } - - return tuples -} - -func resourceAwsWafRegionalByteMatchSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - log.Printf("[INFO] Updating ByteMatchSet: %s", d.Get("name").(string)) - - if d.HasChange("byte_match_tuple") { - o, n := d.GetChange("byte_match_tuple") - oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateByteMatchSetResourceWR(d, oldT, newT, conn, region) - if err != nil { - return fmt.Errorf("Error updating ByteMatchSet: %s", err) - } - } else if d.HasChange("byte_match_tuples") { - o, n := d.GetChange("byte_match_tuples") - oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateByteMatchSetResourceWR(d, oldT, newT, conn, region) - if err != nil { - return fmt.Errorf("Error updating ByteMatchSet: %s", err) - } - } - return resourceAwsWafRegionalByteMatchSetRead(d, meta) -} - -func resourceAwsWafRegionalByteMatchSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - log.Printf("[INFO] Deleting ByteMatchSet: %s", d.Get("name").(string)) - - var oldT []interface{} - if _, ok := d.GetOk("byte_match_tuple"); ok { - oldT = d.Get("byte_match_tuple").(*schema.Set).List() - } else { - oldT = d.Get("byte_match_tuples").(*schema.Set).List() - } - - if len(oldT) > 0 { - var newT []interface{} - - err := updateByteMatchSetResourceWR(d, oldT, newT, conn, region) - if err != nil { - return fmt.Errorf("Error deleting ByteMatchSet: %s", err) - } - } - - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteByteMatchSetInput{ - ChangeToken: token, - ByteMatchSetId: aws.String(d.Id()), - } - return conn.DeleteByteMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Error deleting ByteMatchSet: %s", err) - } - - return nil -} - -func updateByteMatchSetResourceWR(d *schema.ResourceData, oldT, newT []interface{}, conn *wafregional.WAFRegional, region string) error { - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateByteMatchSetInput{ - ChangeToken: token, - ByteMatchSetId: aws.String(d.Id()), - Updates: diffByteMatchSetTuple(oldT, newT), - } - - return conn.UpdateByteMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Error updating ByteMatchSet: %s", err) - } - - return nil -} - -func diffByteMatchSetTuple(oldT, newT []interface{}) []*waf.ByteMatchSetUpdate { - updates := make([]*waf.ByteMatchSetUpdate, 0) - - for _, ot := range oldT { - tuple := ot.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newT, tuple); contains { - newT = append(newT[:idx], newT[idx+1:]...) - continue - } - - updates = append(updates, &waf.ByteMatchSetUpdate{ - Action: aws.String(waf.ChangeActionDelete), - ByteMatchTuple: &waf.ByteMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].([]interface{})[0].(map[string]interface{})), - PositionalConstraint: aws.String(tuple["positional_constraint"].(string)), - TargetString: []byte(tuple["target_string"].(string)), - TextTransformation: aws.String(tuple["text_transformation"].(string)), - }, - }) - } - - for _, nt := range newT { - tuple := nt.(map[string]interface{}) - - updates = append(updates, &waf.ByteMatchSetUpdate{ - Action: aws.String(waf.ChangeActionInsert), - ByteMatchTuple: &waf.ByteMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].([]interface{})[0].(map[string]interface{})), - PositionalConstraint: aws.String(tuple["positional_constraint"].(string)), - TargetString: []byte(tuple["target_string"].(string)), - TextTransformation: aws.String(tuple["text_transformation"].(string)), - }, - }) - } - return updates -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_geo_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_geo_match_set.go deleted file mode 100644 index 107640171..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_geo_match_set.go +++ /dev/null @@ -1,160 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafRegionalGeoMatchSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegionalGeoMatchSetCreate, - Read: resourceAwsWafRegionalGeoMatchSetRead, - Update: resourceAwsWafRegionalGeoMatchSetUpdate, - Delete: resourceAwsWafRegionalGeoMatchSetDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "geo_match_constraint": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafRegionalGeoMatchSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - log.Printf("[INFO] Creating WAF Regional Geo Match Set: %s", d.Get("name").(string)) - - wr := newWafRegionalRetryer(conn, region) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateGeoMatchSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - - return conn.CreateGeoMatchSet(params) - }) - if err != nil { - return fmt.Errorf("Failed creating WAF Regional Geo Match Set: %s", err) - } - resp := out.(*waf.CreateGeoMatchSetOutput) - - d.SetId(*resp.GeoMatchSet.GeoMatchSetId) - - return resourceAwsWafRegionalGeoMatchSetUpdate(d, meta) -} - -func resourceAwsWafRegionalGeoMatchSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - log.Printf("[INFO] Reading WAF Regional Geo Match Set: %s", d.Get("name").(string)) - params := &waf.GetGeoMatchSetInput{ - GeoMatchSetId: aws.String(d.Id()), - } - - resp, err := conn.GetGeoMatchSet(params) - if err != nil { - // TODO: Replace with constant once it's available - // See https://github.com/aws/aws-sdk-go/issues/1856 - if isAWSErr(err, "WAFNonexistentItemException", "") { - log.Printf("[WARN] WAF WAF Regional Geo Match Set (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("name", resp.GeoMatchSet.Name) - d.Set("geo_match_constraint", flattenWafGeoMatchConstraint(resp.GeoMatchSet.GeoMatchConstraints)) - - return nil -} - -func resourceAwsWafRegionalGeoMatchSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - if d.HasChange("geo_match_constraint") { - o, n := d.GetChange("geo_match_constraint") - oldConstraints, newConstraints := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateGeoMatchSetResourceWR(d.Id(), oldConstraints, newConstraints, conn, region) - if err != nil { - return fmt.Errorf("Failed updating WAF Regional Geo Match Set: %s", err) - } - } - - return resourceAwsWafRegionalGeoMatchSetRead(d, meta) -} - -func resourceAwsWafRegionalGeoMatchSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - oldConstraints := d.Get("geo_match_constraint").(*schema.Set).List() - if len(oldConstraints) > 0 { - noConstraints := []interface{}{} - err := updateGeoMatchSetResourceWR(d.Id(), oldConstraints, noConstraints, conn, region) - if err != nil { - return fmt.Errorf("Error updating WAF Regional Geo Match Constraint: %s", err) - } - } - - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteGeoMatchSetInput{ - ChangeToken: token, - GeoMatchSetId: aws.String(d.Id()), - } - - return conn.DeleteGeoMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Failed deleting WAF Regional Geo Match Set: %s", err) - } - - return nil -} - -func updateGeoMatchSetResourceWR(id string, oldConstraints, newConstraints []interface{}, conn *wafregional.WAFRegional, region string) error { - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateGeoMatchSetInput{ - ChangeToken: token, - GeoMatchSetId: aws.String(id), - Updates: diffWafGeoMatchSetConstraints(oldConstraints, newConstraints), - } - - log.Printf("[INFO] Updating WAF Regional Geo Match Set constraints: %s", req) - return conn.UpdateGeoMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Failed updating WAF Regional Geo Match Set: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_ipset.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_ipset.go deleted file mode 100644 index b5cd3828f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_ipset.go +++ /dev/null @@ -1,185 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafRegionalIPSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegionalIPSetCreate, - Read: resourceAwsWafRegionalIPSetRead, - Update: resourceAwsWafRegionalIPSetUpdate, - Delete: resourceAwsWafRegionalIPSetDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "ip_set_descriptor": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafRegionalIPSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - wr := newWafRegionalRetryer(conn, region) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateIPSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - return conn.CreateIPSet(params) - }) - if err != nil { - return err - } - resp := out.(*waf.CreateIPSetOutput) - d.SetId(*resp.IPSet.IPSetId) - return resourceAwsWafRegionalIPSetUpdate(d, meta) -} - -func resourceAwsWafRegionalIPSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - - params := &waf.GetIPSetInput{ - IPSetId: aws.String(d.Id()), - } - - resp, err := conn.GetIPSet(params) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { - log.Printf("[WARN] WAF IPSet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("ip_set_descriptor", flattenWafIpSetDescriptorWR(resp.IPSet.IPSetDescriptors)) - d.Set("name", resp.IPSet.Name) - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "waf-regional", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("ipset/%s", d.Id()), - } - d.Set("arn", arn.String()) - - return nil -} - -func flattenWafIpSetDescriptorWR(in []*waf.IPSetDescriptor) []interface{} { - descriptors := make([]interface{}, len(in)) - - for i, descriptor := range in { - d := map[string]interface{}{ - "type": *descriptor.Type, - "value": *descriptor.Value, - } - descriptors[i] = d - } - - return descriptors -} - -func resourceAwsWafRegionalIPSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - if d.HasChange("ip_set_descriptor") { - o, n := d.GetChange("ip_set_descriptor") - oldD, newD := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateIPSetResourceWR(d.Id(), oldD, newD, conn, region) - if err != nil { - return fmt.Errorf("Error Updating WAF IPSet: %s", err) - } - } - return resourceAwsWafRegionalIPSetRead(d, meta) -} - -func resourceAwsWafRegionalIPSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - oldD := d.Get("ip_set_descriptor").(*schema.Set).List() - - if len(oldD) > 0 { - noD := []interface{}{} - err := updateIPSetResourceWR(d.Id(), oldD, noD, conn, region) - - if err != nil { - return fmt.Errorf("Error Deleting IPSetDescriptors: %s", err) - } - } - - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteIPSetInput{ - ChangeToken: token, - IPSetId: aws.String(d.Id()), - } - log.Printf("[INFO] Deleting WAF IPSet") - return conn.DeleteIPSet(req) - }) - if err != nil { - return fmt.Errorf("Error Deleting WAF IPSet: %s", err) - } - - return nil -} - -func updateIPSetResourceWR(id string, oldD, newD []interface{}, conn *wafregional.WAFRegional, region string) error { - for _, ipSetUpdates := range diffWafIpSetDescriptors(oldD, newD) { - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateIPSetInput{ - ChangeToken: token, - IPSetId: aws.String(id), - Updates: ipSetUpdates, - } - log.Printf("[INFO] Updating IPSet descriptor: %s", req) - - return conn.UpdateIPSet(req) - }) - if err != nil { - return fmt.Errorf("Error Updating WAF IPSet: %s", err) - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rate_based_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rate_based_rule.go deleted file mode 100644 index 5cfc40f11..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rate_based_rule.go +++ /dev/null @@ -1,195 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsWafRegionalRateBasedRule() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegionalRateBasedRuleCreate, - Read: resourceAwsWafRegionalRateBasedRuleRead, - Update: resourceAwsWafRegionalRateBasedRuleUpdate, - Delete: resourceAwsWafRegionalRateBasedRuleDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "metric_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateWafMetricName, - }, - "predicate": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "negated": { - Type: schema.TypeBool, - Required: true, - }, - "data_id": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(0, 128), - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateWafPredicatesType(), - }, - }, - }, - }, - "rate_key": { - Type: schema.TypeString, - Required: true, - }, - "rate_limit": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validation.IntAtLeast(2000), - }, - }, - } -} - -func resourceAwsWafRegionalRateBasedRuleCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - wr := newWafRegionalRetryer(conn, region) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateRateBasedRuleInput{ - ChangeToken: token, - MetricName: aws.String(d.Get("metric_name").(string)), - Name: aws.String(d.Get("name").(string)), - RateKey: aws.String(d.Get("rate_key").(string)), - RateLimit: aws.Int64(int64(d.Get("rate_limit").(int))), - } - - return conn.CreateRateBasedRule(params) - }) - if err != nil { - return err - } - resp := out.(*waf.CreateRateBasedRuleOutput) - d.SetId(*resp.Rule.RuleId) - return resourceAwsWafRegionalRateBasedRuleUpdate(d, meta) -} - -func resourceAwsWafRegionalRateBasedRuleRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - - params := &waf.GetRateBasedRuleInput{ - RuleId: aws.String(d.Id()), - } - - resp, err := conn.GetRateBasedRule(params) - if err != nil { - if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { - log.Printf("[WARN] WAF Regional Rate Based Rule (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - var predicates []map[string]interface{} - - for _, predicateSet := range resp.Rule.MatchPredicates { - predicates = append(predicates, map[string]interface{}{ - "negated": *predicateSet.Negated, - "type": *predicateSet.Type, - "data_id": *predicateSet.DataId, - }) - } - - d.Set("predicate", predicates) - d.Set("name", resp.Rule.Name) - d.Set("metric_name", resp.Rule.MetricName) - d.Set("rate_key", resp.Rule.RateKey) - d.Set("rate_limit", resp.Rule.RateLimit) - - return nil -} - -func resourceAwsWafRegionalRateBasedRuleUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - if d.HasChange("predicate") || d.HasChange("rate_limit") { - o, n := d.GetChange("predicate") - oldP, newP := o.(*schema.Set).List(), n.(*schema.Set).List() - rateLimit := d.Get("rate_limit") - - err := updateWafRateBasedRuleResourceWR(d.Id(), oldP, newP, rateLimit, conn, region) - if err != nil { - return fmt.Errorf("Error Updating WAF Rule: %s", err) - } - } - - return resourceAwsWafRegionalRateBasedRuleRead(d, meta) -} - -func resourceAwsWafRegionalRateBasedRuleDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - oldPredicates := d.Get("predicate").(*schema.Set).List() - if len(oldPredicates) > 0 { - noPredicates := []interface{}{} - rateLimit := d.Get("rate_limit") - - err := updateWafRateBasedRuleResourceWR(d.Id(), oldPredicates, noPredicates, rateLimit, conn, region) - if err != nil { - return fmt.Errorf("Error updating WAF Regional Rate Based Rule Predicates: %s", err) - } - } - - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteRateBasedRuleInput{ - ChangeToken: token, - RuleId: aws.String(d.Id()), - } - log.Printf("[INFO] Deleting WAF Regional Rate Based Rule") - return conn.DeleteRateBasedRule(req) - }) - if err != nil { - return fmt.Errorf("Error deleting WAF Regional Rate Based Rule: %s", err) - } - - return nil -} - -func updateWafRateBasedRuleResourceWR(id string, oldP, newP []interface{}, rateLimit interface{}, conn *wafregional.WAFRegional, region string) error { - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateRateBasedRuleInput{ - ChangeToken: token, - RuleId: aws.String(id), - Updates: diffWafRulePredicates(oldP, newP), - RateLimit: aws.Int64(int64(rateLimit.(int))), - } - - return conn.UpdateRateBasedRule(req) - }) - if err != nil { - return fmt.Errorf("Error Updating WAF Regional Rate Based Rule: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_regex_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_regex_match_set.go deleted file mode 100644 index b1c9d10d0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_regex_match_set.go +++ /dev/null @@ -1,179 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafRegionalRegexMatchSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegionalRegexMatchSetCreate, - Read: resourceAwsWafRegionalRegexMatchSetRead, - Update: resourceAwsWafRegionalRegexMatchSetUpdate, - Delete: resourceAwsWafRegionalRegexMatchSetDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "regex_match_tuple": { - Type: schema.TypeSet, - Optional: true, - Set: resourceAwsWafRegexMatchSetTupleHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "field_to_match": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "data": { - Type: schema.TypeString, - Optional: true, - StateFunc: func(v interface{}) string { - return strings.ToLower(v.(string)) - }, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "regex_pattern_set_id": { - Type: schema.TypeString, - Required: true, - }, - "text_transformation": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafRegionalRegexMatchSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - log.Printf("[INFO] Creating WAF Regional Regex Match Set: %s", d.Get("name").(string)) - - wr := newWafRegionalRetryer(conn, region) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateRegexMatchSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - return conn.CreateRegexMatchSet(params) - }) - if err != nil { - return fmt.Errorf("Failed creating WAF Regional Regex Match Set: %s", err) - } - resp := out.(*waf.CreateRegexMatchSetOutput) - - d.SetId(*resp.RegexMatchSet.RegexMatchSetId) - - return resourceAwsWafRegionalRegexMatchSetUpdate(d, meta) -} - -func resourceAwsWafRegionalRegexMatchSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - log.Printf("[INFO] Reading WAF Regional Regex Match Set: %s", d.Get("name").(string)) - params := &waf.GetRegexMatchSetInput{ - RegexMatchSetId: aws.String(d.Id()), - } - - resp, err := conn.GetRegexMatchSet(params) - if err != nil { - if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { - log.Printf("[WARN] WAF Regional Regex Match Set (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("name", resp.RegexMatchSet.Name) - d.Set("regex_match_tuple", flattenWafRegexMatchTuples(resp.RegexMatchSet.RegexMatchTuples)) - - return nil -} - -func resourceAwsWafRegionalRegexMatchSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - log.Printf("[INFO] Updating WAF Regional Regex Match Set: %s", d.Get("name").(string)) - - if d.HasChange("regex_match_tuple") { - o, n := d.GetChange("regex_match_tuple") - oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() - err := updateRegexMatchSetResourceWR(d.Id(), oldT, newT, conn, region) - if err != nil { - return fmt.Errorf("Failed updating WAF Regional Regex Match Set: %s", err) - } - } - - return resourceAwsWafRegionalRegexMatchSetRead(d, meta) -} - -func resourceAwsWafRegionalRegexMatchSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - oldTuples := d.Get("regex_match_tuple").(*schema.Set).List() - if len(oldTuples) > 0 { - noTuples := []interface{}{} - err := updateRegexMatchSetResourceWR(d.Id(), oldTuples, noTuples, conn, region) - if err != nil { - return fmt.Errorf("Error updating WAF Regional Regex Match Set: %s", err) - } - } - - wr := newWafRegionalRetryer(conn, "global") - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteRegexMatchSetInput{ - ChangeToken: token, - RegexMatchSetId: aws.String(d.Id()), - } - log.Printf("[INFO] Deleting WAF Regional Regex Match Set: %s", req) - return conn.DeleteRegexMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Failed deleting WAF Regional Regex Match Set: %s", err) - } - - return nil -} - -func updateRegexMatchSetResourceWR(id string, oldT, newT []interface{}, conn *wafregional.WAFRegional, region string) error { - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateRegexMatchSetInput{ - ChangeToken: token, - RegexMatchSetId: aws.String(id), - Updates: diffWafRegexMatchSetTuples(oldT, newT), - } - - return conn.UpdateRegexMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Failed updating WAF Regional Regex Match Set: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_regex_pattern_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_regex_pattern_set.go deleted file mode 100644 index 6f311b325..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_regex_pattern_set.go +++ /dev/null @@ -1,147 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafRegionalRegexPatternSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegionalRegexPatternSetCreate, - Read: resourceAwsWafRegionalRegexPatternSetRead, - Update: resourceAwsWafRegionalRegexPatternSetUpdate, - Delete: resourceAwsWafRegionalRegexPatternSetDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "regex_pattern_strings": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -} - -func resourceAwsWafRegionalRegexPatternSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - log.Printf("[INFO] Creating WAF Regional Regex Pattern Set: %s", d.Get("name").(string)) - - wr := newWafRegionalRetryer(conn, region) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateRegexPatternSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - return conn.CreateRegexPatternSet(params) - }) - if err != nil { - return fmt.Errorf("Failed creating WAF Regional Regex Pattern Set: %s", err) - } - resp := out.(*waf.CreateRegexPatternSetOutput) - - d.SetId(*resp.RegexPatternSet.RegexPatternSetId) - - return resourceAwsWafRegionalRegexPatternSetUpdate(d, meta) -} - -func resourceAwsWafRegionalRegexPatternSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - - log.Printf("[INFO] Reading WAF Regional Regex Pattern Set: %s", d.Get("name").(string)) - params := &waf.GetRegexPatternSetInput{ - RegexPatternSetId: aws.String(d.Id()), - } - - resp, err := conn.GetRegexPatternSet(params) - if err != nil { - if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { - log.Printf("[WARN] WAF Regional Regex Pattern Set (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("name", resp.RegexPatternSet.Name) - d.Set("regex_pattern_strings", aws.StringValueSlice(resp.RegexPatternSet.RegexPatternStrings)) - - return nil -} - -func resourceAwsWafRegionalRegexPatternSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - log.Printf("[INFO] Updating WAF Regional Regex Pattern Set: %s", d.Get("name").(string)) - - if d.HasChange("regex_pattern_strings") { - o, n := d.GetChange("regex_pattern_strings") - oldPatterns, newPatterns := o.(*schema.Set).List(), n.(*schema.Set).List() - err := updateWafRegionalRegexPatternSetPatternStringsWR(d.Id(), oldPatterns, newPatterns, conn, region) - if err != nil { - return fmt.Errorf("Failed updating WAF Regional Regex Pattern Set: %s", err) - } - } - - return resourceAwsWafRegionalRegexPatternSetRead(d, meta) -} - -func resourceAwsWafRegionalRegexPatternSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - oldPatterns := d.Get("regex_pattern_strings").(*schema.Set).List() - if len(oldPatterns) > 0 { - noPatterns := []interface{}{} - err := updateWafRegionalRegexPatternSetPatternStringsWR(d.Id(), oldPatterns, noPatterns, conn, region) - if err != nil { - return fmt.Errorf("Error updating WAF Regional Regex Pattern Set: %s", err) - } - } - - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteRegexPatternSetInput{ - ChangeToken: token, - RegexPatternSetId: aws.String(d.Id()), - } - log.Printf("[INFO] Deleting WAF Regional Regex Pattern Set: %s", req) - return conn.DeleteRegexPatternSet(req) - }) - if err != nil { - return fmt.Errorf("Failed deleting WAF Regional Regex Pattern Set: %s", err) - } - - return nil -} - -func updateWafRegionalRegexPatternSetPatternStringsWR(id string, oldPatterns, newPatterns []interface{}, conn *wafregional.WAFRegional, region string) error { - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateRegexPatternSetInput{ - ChangeToken: token, - RegexPatternSetId: aws.String(id), - Updates: diffWafRegexPatternSetPatternStrings(oldPatterns, newPatterns), - } - - return conn.UpdateRegexPatternSet(req) - }) - if err != nil { - return fmt.Errorf("Failed updating WAF Regional Regex Pattern Set: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule.go deleted file mode 100644 index 25cc935a8..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule.go +++ /dev/null @@ -1,180 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/service/wafregional" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsWafRegionalRule() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegionalRuleCreate, - Read: resourceAwsWafRegionalRuleRead, - Update: resourceAwsWafRegionalRuleUpdate, - Delete: resourceAwsWafRegionalRuleDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "metric_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "predicate": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "negated": { - Type: schema.TypeBool, - Required: true, - }, - "data_id": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 128), - }, - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateWafPredicatesType(), - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafRegionalRuleCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - wr := newWafRegionalRetryer(conn, region) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateRuleInput{ - ChangeToken: token, - MetricName: aws.String(d.Get("metric_name").(string)), - Name: aws.String(d.Get("name").(string)), - } - - return conn.CreateRule(params) - }) - if err != nil { - return err - } - resp := out.(*waf.CreateRuleOutput) - d.SetId(*resp.Rule.RuleId) - return resourceAwsWafRegionalRuleUpdate(d, meta) -} - -func resourceAwsWafRegionalRuleRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - - params := &waf.GetRuleInput{ - RuleId: aws.String(d.Id()), - } - - resp, err := conn.GetRule(params) - if err != nil { - if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { - log.Printf("[WARN] WAF Rule (%s) not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("predicate", flattenWafPredicates(resp.Rule.Predicates)) - d.Set("name", resp.Rule.Name) - d.Set("metric_name", resp.Rule.MetricName) - - return nil -} - -func resourceAwsWafRegionalRuleUpdate(d *schema.ResourceData, meta interface{}) error { - if d.HasChange("predicate") { - o, n := d.GetChange("predicate") - oldP, newP := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateWafRegionalRuleResource(d.Id(), oldP, newP, meta) - if err != nil { - return fmt.Errorf("Error Updating WAF Rule: %s", err) - } - } - return resourceAwsWafRegionalRuleRead(d, meta) -} - -func resourceAwsWafRegionalRuleDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - oldPredicates := d.Get("predicate").(*schema.Set).List() - if len(oldPredicates) > 0 { - noPredicates := []interface{}{} - err := updateWafRegionalRuleResource(d.Id(), oldPredicates, noPredicates, meta) - if err != nil { - return fmt.Errorf("Error Removing WAF Rule Predicates: %s", err) - } - } - - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteRuleInput{ - ChangeToken: token, - RuleId: aws.String(d.Id()), - } - log.Printf("[INFO] Deleting WAF Rule") - return conn.DeleteRule(req) - }) - if err != nil { - return fmt.Errorf("Error deleting WAF Rule: %s", err) - } - - return nil -} - -func updateWafRegionalRuleResource(id string, oldP, newP []interface{}, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateRuleInput{ - ChangeToken: token, - RuleId: aws.String(id), - Updates: diffWafRulePredicates(oldP, newP), - } - - return conn.UpdateRule(req) - }) - - if err != nil { - return fmt.Errorf("Error Updating WAF Rule: %s", err) - } - - return nil -} - -func flattenWafPredicates(ts []*waf.Predicate) []interface{} { - out := make([]interface{}, len(ts)) - for i, p := range ts { - m := make(map[string]interface{}) - m["negated"] = *p.Negated - m["type"] = *p.Type - m["data_id"] = *p.DataId - out[i] = m - } - return out -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule_group.go deleted file mode 100644 index e82e09798..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule_group.go +++ /dev/null @@ -1,191 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafRegionalRuleGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegionalRuleGroupCreate, - Read: resourceAwsWafRegionalRuleGroupRead, - Update: resourceAwsWafRegionalRuleGroupUpdate, - Delete: resourceAwsWafRegionalRuleGroupDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "metric_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateWafMetricName, - }, - "activated_rule": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "action": { - Type: schema.TypeList, - MaxItems: 1, - Required: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "priority": { - Type: schema.TypeInt, - Required: true, - }, - "rule_id": { - Type: schema.TypeString, - Required: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - Default: wafregional.WafRuleTypeRegular, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafRegionalRuleGroupCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - wr := newWafRegionalRetryer(conn, region) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateRuleGroupInput{ - ChangeToken: token, - MetricName: aws.String(d.Get("metric_name").(string)), - Name: aws.String(d.Get("name").(string)), - } - - return conn.CreateRuleGroup(params) - }) - if err != nil { - return err - } - resp := out.(*waf.CreateRuleGroupOutput) - d.SetId(*resp.RuleGroup.RuleGroupId) - return resourceAwsWafRegionalRuleGroupUpdate(d, meta) -} - -func resourceAwsWafRegionalRuleGroupRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - - params := &waf.GetRuleGroupInput{ - RuleGroupId: aws.String(d.Id()), - } - - resp, err := conn.GetRuleGroup(params) - if err != nil { - if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { - log.Printf("[WARN] WAF Regional Rule Group (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - rResp, err := conn.ListActivatedRulesInRuleGroup(&waf.ListActivatedRulesInRuleGroupInput{ - RuleGroupId: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("error listing activated rules in WAF Regional Rule Group (%s): %s", d.Id(), err) - } - - d.Set("activated_rule", flattenWafActivatedRules(rResp.ActivatedRules)) - d.Set("name", resp.RuleGroup.Name) - d.Set("metric_name", resp.RuleGroup.MetricName) - - return nil -} - -func resourceAwsWafRegionalRuleGroupUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - if d.HasChange("activated_rule") { - o, n := d.GetChange("activated_rule") - oldRules, newRules := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateWafRuleGroupResourceWR(d.Id(), oldRules, newRules, conn, region) - if err != nil { - return fmt.Errorf("Error Updating WAF Regional Rule Group: %s", err) - } - } - - return resourceAwsWafRegionalRuleGroupRead(d, meta) -} - -func resourceAwsWafRegionalRuleGroupDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - oldRules := d.Get("activated_rule").(*schema.Set).List() - err := deleteWafRegionalRuleGroup(d.Id(), oldRules, conn, region) - - return err -} - -func deleteWafRegionalRuleGroup(id string, oldRules []interface{}, conn *wafregional.WAFRegional, region string) error { - if len(oldRules) > 0 { - noRules := []interface{}{} - err := updateWafRuleGroupResourceWR(id, oldRules, noRules, conn, region) - if err != nil { - return fmt.Errorf("Error updating WAF Regional Rule Group Predicates: %s", err) - } - } - - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteRuleGroupInput{ - ChangeToken: token, - RuleGroupId: aws.String(id), - } - log.Printf("[INFO] Deleting WAF Regional Rule Group") - return conn.DeleteRuleGroup(req) - }) - if err != nil { - return fmt.Errorf("Error deleting WAF Regional Rule Group: %s", err) - } - return nil -} - -func updateWafRuleGroupResourceWR(id string, oldRules, newRules []interface{}, conn *wafregional.WAFRegional, region string) error { - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateRuleGroupInput{ - ChangeToken: token, - RuleGroupId: aws.String(id), - Updates: diffWafRuleGroupActivatedRules(oldRules, newRules), - } - - return conn.UpdateRuleGroup(req) - }) - if err != nil { - return fmt.Errorf("Error Updating WAF Regional Rule Group: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_size_constraint_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_size_constraint_set.go deleted file mode 100644 index 904547d18..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_size_constraint_set.go +++ /dev/null @@ -1,135 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafRegionalSizeConstraintSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegionalSizeConstraintSetCreate, - Read: resourceAwsWafRegionalSizeConstraintSetRead, - Update: resourceAwsWafRegionalSizeConstraintSetUpdate, - Delete: resourceAwsWafRegionalSizeConstraintSetDelete, - - Schema: wafSizeConstraintSetSchema(), - } -} - -func resourceAwsWafRegionalSizeConstraintSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - name := d.Get("name").(string) - - log.Printf("[INFO] Creating WAF Regional SizeConstraintSet: %s", name) - - wr := newWafRegionalRetryer(conn, region) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateSizeConstraintSetInput{ - ChangeToken: token, - Name: aws.String(name), - } - - return conn.CreateSizeConstraintSet(params) - }) - if err != nil { - return fmt.Errorf("Error creating WAF Regional SizeConstraintSet: %s", err) - } - resp := out.(*waf.CreateSizeConstraintSetOutput) - - d.SetId(*resp.SizeConstraintSet.SizeConstraintSetId) - - return resourceAwsWafRegionalSizeConstraintSetUpdate(d, meta) -} - -func resourceAwsWafRegionalSizeConstraintSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - - log.Printf("[INFO] Reading WAF Regional SizeConstraintSet: %s", d.Get("name").(string)) - params := &waf.GetSizeConstraintSetInput{ - SizeConstraintSetId: aws.String(d.Id()), - } - - resp, err := conn.GetSizeConstraintSet(params) - if err != nil { - if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { - log.Printf("[WARN] WAF Regional SizeConstraintSet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err - } - - d.Set("name", resp.SizeConstraintSet.Name) - d.Set("size_constraints", flattenWafSizeConstraints(resp.SizeConstraintSet.SizeConstraints)) - - return nil -} - -func resourceAwsWafRegionalSizeConstraintSetUpdate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*AWSClient) - - if d.HasChange("size_constraints") { - o, n := d.GetChange("size_constraints") - oldConstraints, newConstraints := o.(*schema.Set).List(), n.(*schema.Set).List() - - if err := updateRegionalSizeConstraintSetResource(d.Id(), oldConstraints, newConstraints, client.wafregionalconn, client.region); err != nil { - return fmt.Errorf("Error updating WAF Regional SizeConstraintSet: %s", err) - } - } - - return resourceAwsWafRegionalSizeConstraintSetRead(d, meta) -} - -func resourceAwsWafRegionalSizeConstraintSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - oldConstraints := d.Get("size_constraints").(*schema.Set).List() - - if len(oldConstraints) > 0 { - noConstraints := []interface{}{} - if err := updateRegionalSizeConstraintSetResource(d.Id(), oldConstraints, noConstraints, conn, region); err != nil { - return fmt.Errorf("Error deleting WAF Regional SizeConstraintSet: %s", err) - } - } - - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteSizeConstraintSetInput{ - ChangeToken: token, - SizeConstraintSetId: aws.String(d.Id()), - } - return conn.DeleteSizeConstraintSet(req) - }) - if err != nil { - return fmt.Errorf("Error deleting WAF Regional SizeConstraintSet: %s", err) - } - - return nil -} - -func updateRegionalSizeConstraintSetResource(id string, oldConstraints, newConstraints []interface{}, conn *wafregional.WAFRegional, region string) error { - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateSizeConstraintSetInput{ - ChangeToken: token, - SizeConstraintSetId: aws.String(id), - Updates: diffWafSizeConstraints(oldConstraints, newConstraints), - } - - log.Printf("[INFO] Updating WAF Regional SizeConstraintSet: %s", req) - return conn.UpdateSizeConstraintSet(req) - }) - if err != nil { - return fmt.Errorf("Error updating WAF Regional SizeConstraintSet: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_sql_injection_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_sql_injection_match_set.go deleted file mode 100644 index 43e4554e7..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_sql_injection_match_set.go +++ /dev/null @@ -1,233 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "log" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafRegionalSqlInjectionMatchSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegionalSqlInjectionMatchSetCreate, - Read: resourceAwsWafRegionalSqlInjectionMatchSetRead, - Update: resourceAwsWafRegionalSqlInjectionMatchSetUpdate, - Delete: resourceAwsWafRegionalSqlInjectionMatchSetDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "sql_injection_match_tuple": { - Type: schema.TypeSet, - Optional: true, - Set: resourceAwsWafRegionalSqlInjectionMatchSetTupleHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "field_to_match": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "data": { - Type: schema.TypeString, - Optional: true, - StateFunc: func(v interface{}) string { - value := v.(string) - return strings.ToLower(value) - }, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "text_transformation": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafRegionalSqlInjectionMatchSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - log.Printf("[INFO] Creating Regional WAF SQL Injection Match Set: %s", d.Get("name").(string)) - - wr := newWafRegionalRetryer(conn, region) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateSqlInjectionMatchSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - - return conn.CreateSqlInjectionMatchSet(params) - }) - if err != nil { - return fmt.Errorf("Failed creating Regional WAF SQL Injection Match Set: %s", err) - } - resp := out.(*waf.CreateSqlInjectionMatchSetOutput) - d.SetId(*resp.SqlInjectionMatchSet.SqlInjectionMatchSetId) - - return resourceAwsWafRegionalSqlInjectionMatchSetUpdate(d, meta) -} - -func resourceAwsWafRegionalSqlInjectionMatchSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - log.Printf("[INFO] Reading Regional WAF SQL Injection Match Set: %s", d.Get("name").(string)) - params := &waf.GetSqlInjectionMatchSetInput{ - SqlInjectionMatchSetId: aws.String(d.Id()), - } - - resp, err := conn.GetSqlInjectionMatchSet(params) - if err != nil { - if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { - log.Printf("[WARN] Regional WAF SQL Injection Match Set (%s) not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return err - } - - d.Set("name", resp.SqlInjectionMatchSet.Name) - d.Set("sql_injection_match_tuple", flattenWafSqlInjectionMatchTuples(resp.SqlInjectionMatchSet.SqlInjectionMatchTuples)) - - return nil -} - -func resourceAwsWafRegionalSqlInjectionMatchSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - if d.HasChange("sql_injection_match_tuple") { - o, n := d.GetChange("sql_injection_match_tuple") - oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateSqlInjectionMatchSetResourceWR(d.Id(), oldT, newT, conn, region) - if err != nil { - return fmt.Errorf("Error updating Regional WAF SQL Injection Match Set: %s", err) - } - } - - return resourceAwsWafRegionalSqlInjectionMatchSetRead(d, meta) -} - -func resourceAwsWafRegionalSqlInjectionMatchSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - oldTuples := d.Get("sql_injection_match_tuple").(*schema.Set).List() - - if len(oldTuples) > 0 { - noTuples := []interface{}{} - err := updateSqlInjectionMatchSetResourceWR(d.Id(), oldTuples, noTuples, conn, region) - if err != nil { - return fmt.Errorf("Error deleting Regional WAF SQL Injection Match Set: %s", err) - } - } - - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteSqlInjectionMatchSetInput{ - ChangeToken: token, - SqlInjectionMatchSetId: aws.String(d.Id()), - } - - return conn.DeleteSqlInjectionMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Failed deleting Regional WAF SQL Injection Match Set: %s", err) - } - - return nil -} - -func updateSqlInjectionMatchSetResourceWR(id string, oldT, newT []interface{}, conn *wafregional.WAFRegional, region string) error { - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateSqlInjectionMatchSetInput{ - ChangeToken: token, - SqlInjectionMatchSetId: aws.String(id), - Updates: diffWafSqlInjectionMatchTuplesWR(oldT, newT), - } - - log.Printf("[INFO] Updating Regional WAF SQL Injection Match Set: %s", req) - return conn.UpdateSqlInjectionMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Failed updating Regional WAF SQL Injection Match Set: %s", err) - } - - return nil -} - -func diffWafSqlInjectionMatchTuplesWR(oldT, newT []interface{}) []*waf.SqlInjectionMatchSetUpdate { - updates := make([]*waf.SqlInjectionMatchSetUpdate, 0) - - for _, od := range oldT { - tuple := od.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newT, tuple); contains { - newT = append(newT[:idx], newT[idx+1:]...) - continue - } - - ftm := tuple["field_to_match"].([]interface{}) - - updates = append(updates, &waf.SqlInjectionMatchSetUpdate{ - Action: aws.String(waf.ChangeActionDelete), - SqlInjectionMatchTuple: &waf.SqlInjectionMatchTuple{ - FieldToMatch: expandFieldToMatch(ftm[0].(map[string]interface{})), - TextTransformation: aws.String(tuple["text_transformation"].(string)), - }, - }) - } - - for _, nd := range newT { - tuple := nd.(map[string]interface{}) - ftm := tuple["field_to_match"].([]interface{}) - - updates = append(updates, &waf.SqlInjectionMatchSetUpdate{ - Action: aws.String(waf.ChangeActionInsert), - SqlInjectionMatchTuple: &waf.SqlInjectionMatchTuple{ - FieldToMatch: expandFieldToMatch(ftm[0].(map[string]interface{})), - TextTransformation: aws.String(tuple["text_transformation"].(string)), - }, - }) - } - return updates -} - -func resourceAwsWafRegionalSqlInjectionMatchSetTupleHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - if v, ok := m["field_to_match"]; ok { - ftms := v.([]interface{}) - ftm := ftms[0].(map[string]interface{}) - - if v, ok := ftm["data"]; ok { - buf.WriteString(fmt.Sprintf("%s-", strings.ToLower(v.(string)))) - } - buf.WriteString(fmt.Sprintf("%s-", ftm["type"].(string))) - } - buf.WriteString(fmt.Sprintf("%s-", m["text_transformation"].(string))) - - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl.go deleted file mode 100644 index 6389d84a5..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl.go +++ /dev/null @@ -1,220 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsWafRegionalWebAcl() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegionalWebAclCreate, - Read: resourceAwsWafRegionalWebAclRead, - Update: resourceAwsWafRegionalWebAclUpdate, - Delete: resourceAwsWafRegionalWebAclDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "default_action": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "metric_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "rule": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "action": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "override_action": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "priority": { - Type: schema.TypeInt, - Required: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - Default: waf.WafRuleTypeRegular, - ValidateFunc: validation.StringInSlice([]string{ - waf.WafRuleTypeRegular, - waf.WafRuleTypeRateBased, - waf.WafRuleTypeGroup, - }, false), - }, - "rule_id": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafRegionalWebAclCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - wr := newWafRegionalRetryer(conn, region) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateWebACLInput{ - ChangeToken: token, - DefaultAction: expandWafAction(d.Get("default_action").([]interface{})), - MetricName: aws.String(d.Get("metric_name").(string)), - Name: aws.String(d.Get("name").(string)), - } - - return conn.CreateWebACL(params) - }) - if err != nil { - return err - } - resp := out.(*waf.CreateWebACLOutput) - d.SetId(*resp.WebACL.WebACLId) - return resourceAwsWafRegionalWebAclUpdate(d, meta) -} - -func resourceAwsWafRegionalWebAclRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - params := &waf.GetWebACLInput{ - WebACLId: aws.String(d.Id()), - } - - resp, err := conn.GetWebACL(params) - if err != nil { - if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { - log.Printf("[WARN] WAF Regional ACL (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - return err - } - - if resp == nil || resp.WebACL == nil { - log.Printf("[WARN] WAF Regional ACL (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - - if err := d.Set("default_action", flattenWafAction(resp.WebACL.DefaultAction)); err != nil { - return fmt.Errorf("error setting default_action: %s", err) - } - d.Set("name", resp.WebACL.Name) - d.Set("metric_name", resp.WebACL.MetricName) - if err := d.Set("rule", flattenWafWebAclRules(resp.WebACL.Rules)); err != nil { - return fmt.Errorf("error setting rule: %s", err) - } - - return nil -} - -func resourceAwsWafRegionalWebAclUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - if d.HasChange("default_action") || d.HasChange("rule") { - o, n := d.GetChange("rule") - oldR, newR := o.(*schema.Set).List(), n.(*schema.Set).List() - - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateWebACLInput{ - ChangeToken: token, - DefaultAction: expandWafAction(d.Get("default_action").([]interface{})), - Updates: diffWafWebAclRules(oldR, newR), - WebACLId: aws.String(d.Id()), - } - return conn.UpdateWebACL(req) - }) - if err != nil { - return fmt.Errorf("Error Updating WAF Regional ACL: %s", err) - } - } - return resourceAwsWafRegionalWebAclRead(d, meta) -} - -func resourceAwsWafRegionalWebAclDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - // First, need to delete all rules - rules := d.Get("rule").(*schema.Set).List() - if len(rules) > 0 { - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateWebACLInput{ - ChangeToken: token, - DefaultAction: expandWafAction(d.Get("default_action").([]interface{})), - Updates: diffWafWebAclRules(rules, []interface{}{}), - WebACLId: aws.String(d.Id()), - } - return conn.UpdateWebACL(req) - }) - if err != nil { - return fmt.Errorf("Error Removing WAF Regional ACL Rules: %s", err) - } - } - - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteWebACLInput{ - ChangeToken: token, - WebACLId: aws.String(d.Id()), - } - - log.Printf("[INFO] Deleting WAF ACL") - return conn.DeleteWebACL(req) - }) - if err != nil { - return fmt.Errorf("Error Deleting WAF Regional ACL: %s", err) - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl_association.go deleted file mode 100644 index eb3a9128a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl_association.go +++ /dev/null @@ -1,124 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafRegionalWebAclAssociation() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegionalWebAclAssociationCreate, - Read: resourceAwsWafRegionalWebAclAssociationRead, - Delete: resourceAwsWafRegionalWebAclAssociationDelete, - - Schema: map[string]*schema.Schema{ - "web_acl_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "resource_arn": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - }, - } -} - -func resourceAwsWafRegionalWebAclAssociationCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - - log.Printf( - "[INFO] Creating WAF Regional Web ACL association: %s => %s", - d.Get("web_acl_id").(string), - d.Get("resource_arn").(string)) - - params := &wafregional.AssociateWebACLInput{ - WebACLId: aws.String(d.Get("web_acl_id").(string)), - ResourceArn: aws.String(d.Get("resource_arn").(string)), - } - - // create association and wait on retryable error - // no response body - var err error - err = resource.Retry(2*time.Minute, func() *resource.RetryError { - _, err = conn.AssociateWebACL(params) - if err != nil { - if isAWSErr(err, wafregional.ErrCodeWAFUnavailableEntityException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - - // Store association id - d.SetId(fmt.Sprintf("%s:%s", *params.WebACLId, *params.ResourceArn)) - - return nil -} - -func resourceAwsWafRegionalWebAclAssociationRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - - webAclId, resourceArn := resourceAwsWafRegionalWebAclAssociationParseId(d.Id()) - - // List all resources for Web ACL and see if we get a match - params := &wafregional.ListResourcesForWebACLInput{ - WebACLId: aws.String(webAclId), - } - - resp, err := conn.ListResourcesForWebACL(params) - if err != nil { - return err - } - - // Find match - found := false - for _, listResourceArn := range resp.ResourceArns { - if resourceArn == *listResourceArn { - found = true - break - } - } - if !found { - log.Printf("[WARN] WAF Regional Web ACL association (%s) not found, removing from state", d.Id()) - d.SetId("") - } - - return nil -} - -func resourceAwsWafRegionalWebAclAssociationDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - - _, resourceArn := resourceAwsWafRegionalWebAclAssociationParseId(d.Id()) - - log.Printf("[INFO] Deleting WAF Regional Web ACL association: %s", resourceArn) - - params := &wafregional.DisassociateWebACLInput{ - ResourceArn: aws.String(resourceArn), - } - - // If action successful HTTP 200 response with an empty body - _, err := conn.DisassociateWebACL(params) - return err -} - -func resourceAwsWafRegionalWebAclAssociationParseId(id string) (webAclId, resourceArn string) { - parts := strings.SplitN(id, ":", 2) - webAclId = parts[0] - resourceArn = parts[1] - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_xss_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_xss_match_set.go deleted file mode 100644 index dbbc8f942..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_xss_match_set.go +++ /dev/null @@ -1,175 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsWafRegionalXssMatchSet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWafRegionalXssMatchSetCreate, - Read: resourceAwsWafRegionalXssMatchSetRead, - Update: resourceAwsWafRegionalXssMatchSetUpdate, - Delete: resourceAwsWafRegionalXssMatchSetDelete, - - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "xss_match_tuple": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "field_to_match": { - Type: schema.TypeSet, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "data": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "text_transformation": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, - } -} - -func resourceAwsWafRegionalXssMatchSetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - log.Printf("[INFO] Creating regional WAF XSS Match Set: %s", d.Get("name").(string)) - - wr := newWafRegionalRetryer(conn, region) - out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - params := &waf.CreateXssMatchSetInput{ - ChangeToken: token, - Name: aws.String(d.Get("name").(string)), - } - - return conn.CreateXssMatchSet(params) - }) - if err != nil { - return fmt.Errorf("Failed creating regional WAF XSS Match Set: %s", err) - } - resp := out.(*waf.CreateXssMatchSetOutput) - - d.SetId(*resp.XssMatchSet.XssMatchSetId) - - return resourceAwsWafRegionalXssMatchSetUpdate(d, meta) -} - -func resourceAwsWafRegionalXssMatchSetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - log.Printf("[INFO] Reading regional WAF XSS Match Set: %s", d.Get("name").(string)) - params := &waf.GetXssMatchSetInput{ - XssMatchSetId: aws.String(d.Id()), - } - - resp, err := conn.GetXssMatchSet(params) - if err != nil { - if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { - log.Printf("[WARN] Regional WAF XSS Match Set (%s) not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - - return err - } - - set := resp.XssMatchSet - - d.Set("xss_match_tuple", flattenWafXssMatchTuples(set.XssMatchTuples)) - d.Set("name", set.Name) - - return nil -} - -func resourceAwsWafRegionalXssMatchSetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - if d.HasChange("xss_match_tuple") { - o, n := d.GetChange("xss_match_tuple") - oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() - - err := updateXssMatchSetResourceWR(d.Id(), oldT, newT, conn, region) - if err != nil { - return fmt.Errorf("Failed updating regional WAF XSS Match Set: %s", err) - } - } - - return resourceAwsWafRegionalXssMatchSetRead(d, meta) -} - -func resourceAwsWafRegionalXssMatchSetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wafregionalconn - region := meta.(*AWSClient).region - - if v, ok := d.GetOk("xss_match_tuple"); ok { - oldTuples := v.(*schema.Set).List() - if len(oldTuples) > 0 { - noTuples := []interface{}{} - err := updateXssMatchSetResourceWR(d.Id(), oldTuples, noTuples, conn, region) - if err != nil { - return fmt.Errorf("Error updating regional WAF XSS Match Set: %s", err) - } - } - } - - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.DeleteXssMatchSetInput{ - ChangeToken: token, - XssMatchSetId: aws.String(d.Id()), - } - - return conn.DeleteXssMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Failed deleting regional WAF XSS Match Set: %s", err) - } - - return nil -} - -func updateXssMatchSetResourceWR(id string, oldT, newT []interface{}, conn *wafregional.WAFRegional, region string) error { - wr := newWafRegionalRetryer(conn, region) - _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { - req := &waf.UpdateXssMatchSetInput{ - ChangeToken: token, - XssMatchSetId: aws.String(id), - Updates: diffWafXssMatchSetTuples(oldT, newT), - } - - log.Printf("[INFO] Updating XSS Match Set tuples: %s", req) - return conn.UpdateXssMatchSet(req) - }) - if err != nil { - return fmt.Errorf("Failed updating regional WAF XSS Match Set: %s", err) - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_worklink_fleet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_worklink_fleet.go deleted file mode 100644 index db6f7e5c7..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_worklink_fleet.go +++ /dev/null @@ -1,426 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/worklink" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceAwsWorkLinkFleet() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsWorkLinkFleetCreate, - Read: resourceAwsWorkLinkFleetRead, - Update: resourceAwsWorkLinkFleetUpdate, - Delete: resourceAwsWorkLinkFleetDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateWorklinkFleetName, - }, - "display_name": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringLenBetween(0, 100), - }, - "audit_stream_arn": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - "network": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "vpc_id": { - Type: schema.TypeString, - Required: true, - }, - "security_group_ids": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "subnet_ids": { - Type: schema.TypeSet, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - }, - }, - }, - "device_ca_certificate": { - Type: schema.TypeString, - Optional: true, - StateFunc: func(v interface{}) string { - s, ok := v.(string) - if !ok { - return "" - } - return strings.TrimSpace(s) - }, - }, - "identity_provider": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - }, - "saml_metadata": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringLenBetween(1, 204800), - }, - }, - }, - }, - "company_code": { - Type: schema.TypeString, - Computed: true, - }, - "created_time": { - Type: schema.TypeString, - Computed: true, - }, - "last_updated_time": { - Type: schema.TypeString, - Computed: true, - }, - "optimize_for_end_user_location": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - }, - } -} - -func resourceAwsWorkLinkFleetCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).worklinkconn - - input := &worklink.CreateFleetInput{ - FleetName: aws.String(d.Get("name").(string)), - OptimizeForEndUserLocation: aws.Bool(d.Get("optimize_for_end_user_location").(bool)), - } - - if v, ok := d.GetOk("display_name"); ok { - input.DisplayName = aws.String(v.(string)) - } - - resp, err := conn.CreateFleet(input) - if err != nil { - return fmt.Errorf("Error creating Worklink Fleet: %s", err) - } - - d.SetId(aws.StringValue(resp.FleetArn)) - - if err := updateAuditStreamConfiguration(conn, d); err != nil { - return err - } - - if err := updateCompanyNetworkConfiguration(conn, d); err != nil { - return err - } - - if err := updateDevicePolicyConfiguration(conn, d); err != nil { - return err - } - - if err := updateIdentityProviderConfiguration(conn, d); err != nil { - return err - } - - return resourceAwsWorkLinkFleetRead(d, meta) -} - -func resourceAwsWorkLinkFleetRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).worklinkconn - - resp, err := conn.DescribeFleetMetadata(&worklink.DescribeFleetMetadataInput{ - FleetArn: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Worklink Fleet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error describe worklink fleet: %s", err) - } - - d.Set("arn", d.Id()) - d.Set("name", aws.StringValue(resp.FleetName)) - d.Set("display_name", aws.StringValue(resp.DisplayName)) - d.Set("optimize_for_end_user_location", aws.BoolValue(resp.OptimizeForEndUserLocation)) - d.Set("company_code", aws.StringValue(resp.CompanyCode)) - d.Set("created_time", resp.CreatedTime.Format(time.RFC3339)) - if resp.LastUpdatedTime != nil { - d.Set("last_updated_time", resp.LastUpdatedTime.Format(time.RFC3339)) - } - auditStreamConfigurationResp, err := conn.DescribeAuditStreamConfiguration(&worklink.DescribeAuditStreamConfigurationInput{ - FleetArn: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error describe worklink audit stream configuration: %s", err) - } - d.Set("audit_stream_arn", auditStreamConfigurationResp.AuditStreamArn) - - companyNetworkConfigurationResp, err := conn.DescribeCompanyNetworkConfiguration(&worklink.DescribeCompanyNetworkConfigurationInput{ - FleetArn: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error describe worklink company network configuration: %s", err) - } - if err := d.Set("network", flattenWorkLinkNetworkConfigResponse(companyNetworkConfigurationResp)); err != nil { - return fmt.Errorf("Error setting network: %s", err) - } - - identityProviderConfigurationResp, err := conn.DescribeIdentityProviderConfiguration(&worklink.DescribeIdentityProviderConfigurationInput{ - FleetArn: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error describe worklink company network configuration: %s", err) - } - - if err := d.Set("identity_provider", flattenWorkLinkIdentityProviderConfigResponse(identityProviderConfigurationResp)); err != nil { - return fmt.Errorf("Error setting identity_provider: %s", err) - } - - devicePolicyConfigurationResp, err := conn.DescribeDevicePolicyConfiguration(&worklink.DescribeDevicePolicyConfigurationInput{ - FleetArn: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error describe worklink device policy configuration: %s", err) - } - d.Set("device_ca_certificate", strings.TrimSpace(aws.StringValue(devicePolicyConfigurationResp.DeviceCaCertificate))) - - return nil -} - -func resourceAwsWorkLinkFleetUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).worklinkconn - - input := &worklink.UpdateFleetMetadataInput{ - FleetArn: aws.String(d.Id()), - OptimizeForEndUserLocation: aws.Bool(d.Get("optimize_for_end_user_location").(bool)), - } - - if v, ok := d.GetOk("display_name"); ok { - input.DisplayName = aws.String(v.(string)) - } - - if d.HasChange("display_name") || d.HasChange("optimize_for_end_user_location") { - _, err := conn.UpdateFleetMetadata(input) - if err != nil { - if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Worklink Fleet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error updating worklink fleet: %s", err) - } - } - - if d.HasChange("audit_stream_arn") { - if err := updateAuditStreamConfiguration(conn, d); err != nil { - return err - } - } - - if d.HasChange("network") { - if err := updateCompanyNetworkConfiguration(conn, d); err != nil { - return err - } - } - - if d.HasChange("device_ca_certificate") { - if err := updateDevicePolicyConfiguration(conn, d); err != nil { - return err - } - } - - if d.HasChange("identity_provider") { - if err := updateIdentityProviderConfiguration(conn, d); err != nil { - return err - } - } - - return resourceAwsWorkLinkFleetRead(d, meta) -} - -func resourceAwsWorkLinkFleetDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).worklinkconn - - input := &worklink.DeleteFleetInput{ - FleetArn: aws.String(d.Id()), - } - - if _, err := conn.DeleteFleet(input); err != nil { - if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { - return nil - } - return fmt.Errorf("Error deleting Worklink Fleet resource share %s: %s", d.Id(), err) - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"DELETING"}, - Target: []string{"DELETED"}, - Refresh: worklinkFleetStateRefresh(conn, d.Id()), - Timeout: 15 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Worklink Fleet (%s) to become deleted: %s", - d.Id(), err) - } - - return nil -} - -func worklinkFleetStateRefresh(conn *worklink.WorkLink, arn string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - emptyResp := &worklink.DescribeFleetMetadataOutput{} - - resp, err := conn.DescribeFleetMetadata(&worklink.DescribeFleetMetadataInput{ - FleetArn: aws.String(arn), - }) - if err != nil { - if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { - return emptyResp, "DELETED", nil - } - } - - return resp, *resp.FleetStatus, nil - } -} - -func updateAuditStreamConfiguration(conn *worklink.WorkLink, d *schema.ResourceData) error { - input := &worklink.UpdateAuditStreamConfigurationInput{ - FleetArn: aws.String(d.Id()), - } - if v, ok := d.GetOk("audit_stream_arn"); ok { - input.AuditStreamArn = aws.String(v.(string)) - } else if d.IsNewResource() { - return nil - } - - log.Printf("[DEBUG] Update audit stream configuration option: %#v", input) - if _, err := conn.UpdateAuditStreamConfiguration(input); err != nil { - if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Worklink Fleet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error Updating Worklink Audit Stream Configuration: %s", err) - } - - return nil -} - -func updateCompanyNetworkConfiguration(conn *worklink.WorkLink, d *schema.ResourceData) error { - oldNetwork, newNetwork := d.GetChange("network") - if len(oldNetwork.([]interface{})) > 0 && len(newNetwork.([]interface{})) == 0 { - return fmt.Errorf("Company Network Configuration cannot be removed from WorkLink Fleet(%s),"+ - " use 'terraform taint' to recreate the resource if you wish.", d.Id()) - } - - if v, ok := d.GetOk("network"); ok && len(v.([]interface{})) > 0 { - config := v.([]interface{})[0].(map[string]interface{}) - input := &worklink.UpdateCompanyNetworkConfigurationInput{ - FleetArn: aws.String(d.Id()), - SecurityGroupIds: expandStringSet(config["security_group_ids"].(*schema.Set)), - SubnetIds: expandStringSet(config["subnet_ids"].(*schema.Set)), - VpcId: aws.String(config["vpc_id"].(string)), - } - log.Printf("[DEBUG] Update company network configuration option: %#v", input) - if _, err := conn.UpdateCompanyNetworkConfiguration(input); err != nil { - if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Worklink Fleet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error Updating Worklink Network Configuration: %s", err) - } - } - return nil -} - -func updateDevicePolicyConfiguration(conn *worklink.WorkLink, d *schema.ResourceData) error { - input := &worklink.UpdateDevicePolicyConfigurationInput{ - FleetArn: aws.String(d.Id()), - } - if v, ok := d.GetOk("device_ca_certificate"); ok { - input.DeviceCaCertificate = aws.String(v.(string)) - } else if d.IsNewResource() { - return nil - } - - log.Printf("[DEBUG] Update device policy configuration option: %#v", input) - if _, err := conn.UpdateDevicePolicyConfiguration(input); err != nil { - if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Worklink Fleet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error Updating Worklink Device Policy Configuration: %s", err) - } - return nil -} - -func updateIdentityProviderConfiguration(conn *worklink.WorkLink, d *schema.ResourceData) error { - oldIdentityProvider, newIdentityProvider := d.GetChange("identity_provider") - - if len(oldIdentityProvider.([]interface{})) > 0 && len(newIdentityProvider.([]interface{})) == 0 { - return fmt.Errorf("Identity Provider Configuration cannot be removed from WorkLink Fleet(%s),"+ - " use 'terraform taint' to recreate the resource if you wish.", d.Id()) - } - - if v, ok := d.GetOk("identity_provider"); ok && len(v.([]interface{})) > 0 { - config := v.([]interface{})[0].(map[string]interface{}) - input := &worklink.UpdateIdentityProviderConfigurationInput{ - FleetArn: aws.String(d.Id()), - IdentityProviderType: aws.String(config["type"].(string)), - IdentityProviderSamlMetadata: aws.String(config["saml_metadata"].(string)), - } - log.Printf("[DEBUG] Update identity provider configuration option: %#v", input) - if _, err := conn.UpdateIdentityProviderConfiguration(input); err != nil { - if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Worklink Fleet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return fmt.Errorf("Error Updating Identity Provider Configuration: %s", err) - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go deleted file mode 100644 index 42fc6b8c0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go +++ /dev/null @@ -1,189 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsS3(conn *s3.S3, 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 := diffTagsS3(tagsFromMapS3(o), tagsFromMapS3(n)) - - // Set tags - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %#v", remove) - _, err := RetryOnAwsCodes([]string{"NoSuchBucket", "OperationAborted"}, func() (interface{}, error) { - return conn.DeleteBucketTagging(&s3.DeleteBucketTaggingInput{ - Bucket: aws.String(d.Get("bucket").(string)), - }) - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - req := &s3.PutBucketTaggingInput{ - Bucket: aws.String(d.Get("bucket").(string)), - Tagging: &s3.Tagging{ - TagSet: create, - }, - } - - _, err := RetryOnAwsCodes([]string{"NoSuchBucket", "OperationAborted"}, func() (interface{}, error) { - return conn.PutBucketTagging(req) - }) - if err != nil { - return err - } - } - } - - return nil -} - -func getTagsS3Object(conn *s3.S3, d *schema.ResourceData) error { - resp, err := retryOnAwsCode(s3.ErrCodeNoSuchKey, func() (interface{}, error) { - return conn.GetObjectTagging(&s3.GetObjectTaggingInput{ - Bucket: aws.String(d.Get("bucket").(string)), - Key: aws.String(d.Get("key").(string)), - }) - }) - if err != nil { - return err - } - - if err := d.Set("tags", tagsToMapS3(resp.(*s3.GetObjectTaggingOutput).TagSet)); err != nil { - return err - } - - return nil -} - -func setTagsS3Object(conn *s3.S3, d *schema.ResourceData) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - - // Set tags - if len(o) > 0 { - _, err := conn.DeleteObjectTagging(&s3.DeleteObjectTaggingInput{ - Bucket: aws.String(d.Get("bucket").(string)), - Key: aws.String(d.Get("key").(string)), - }) - if err != nil { - return err - } - } - if len(n) > 0 { - _, err := conn.PutObjectTagging(&s3.PutObjectTaggingInput{ - Bucket: aws.String(d.Get("bucket").(string)), - Key: aws.String(d.Get("key").(string)), - Tagging: &s3.Tagging{ - TagSet: tagsFromMapS3(n), - }, - }) - 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 diffTagsS3(oldTags, newTags []*s3.Tag) ([]*s3.Tag, []*s3.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*s3.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapS3(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapS3(m map[string]interface{}) []*s3.Tag { - result := make([]*s3.Tag, 0, len(m)) - for k, v := range m { - t := &s3.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredS3(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapS3(ts []*s3.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredS3(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// return a slice of s3 tags associated with the given s3 bucket. Essentially -// s3.GetBucketTagging, except returns an empty slice instead of an error when -// there are no tags. -func getTagSetS3(s3conn *s3.S3, bucket string) ([]*s3.Tag, error) { - request := &s3.GetBucketTaggingInput{ - Bucket: aws.String(bucket), - } - - response, err := s3conn.GetBucketTagging(request) - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "NoSuchTagSet" { - // There is no tag set associated with the bucket. - return []*s3.Tag{}, nil - } else if err != nil { - return nil, err - } - - return response.TagSet, nil -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredS3(t *s3.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go deleted file mode 100644 index 3fa41fcf3..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go +++ /dev/null @@ -1,5075 +0,0 @@ -package aws - -import ( - "bytes" - "encoding/json" - "fmt" - "reflect" - "regexp" - "sort" - "strconv" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/aws/aws-sdk-go/service/appmesh" - "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/aws/aws-sdk-go/service/cloudformation" - "github.com/aws/aws-sdk-go/service/cloudwatchlogs" - "github.com/aws/aws-sdk-go/service/cognitoidentity" - "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" - "github.com/aws/aws-sdk-go/service/configservice" - "github.com/aws/aws-sdk-go/service/dax" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/aws/aws-sdk-go/service/directoryservice" - "github.com/aws/aws-sdk-go/service/docdb" - "github.com/aws/aws-sdk-go/service/dynamodb" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/aws/aws-sdk-go/service/ecs" - "github.com/aws/aws-sdk-go/service/elasticache" - "github.com/aws/aws-sdk-go/service/elasticbeanstalk" - elasticsearch "github.com/aws/aws-sdk-go/service/elasticsearchservice" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/aws/aws-sdk-go/service/iot" - "github.com/aws/aws-sdk-go/service/kinesis" - "github.com/aws/aws-sdk-go/service/lambda" - "github.com/aws/aws-sdk-go/service/macie" - "github.com/aws/aws-sdk-go/service/mq" - "github.com/aws/aws-sdk-go/service/neptune" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/aws/aws-sdk-go/service/redshift" - "github.com/aws/aws-sdk-go/service/route53" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/worklink" - "github.com/beevik/etree" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/mitchellh/copystructure" - "gopkg.in/yaml.v2" -) - -// Takes the result of flatmap.Expand for an array of listeners and -// returns ELB API compatible objects -func expandListeners(configured []interface{}) ([]*elb.Listener, error) { - listeners := make([]*elb.Listener, 0, len(configured)) - - // Loop over our configured listeners and create - // an array of aws-sdk-go compatible objects - for _, lRaw := range configured { - data := lRaw.(map[string]interface{}) - - ip := int64(data["instance_port"].(int)) - lp := int64(data["lb_port"].(int)) - l := &elb.Listener{ - InstancePort: &ip, - InstanceProtocol: aws.String(data["instance_protocol"].(string)), - LoadBalancerPort: &lp, - Protocol: aws.String(data["lb_protocol"].(string)), - } - - if v, ok := data["ssl_certificate_id"]; ok { - l.SSLCertificateId = aws.String(v.(string)) - } - - var valid bool - if l.SSLCertificateId != nil && *l.SSLCertificateId != "" { - // validate the protocol is correct - for _, p := range []string{"https", "ssl"} { - if (strings.ToLower(*l.InstanceProtocol) == p) || (strings.ToLower(*l.Protocol) == p) { - valid = true - } - } - } else { - valid = true - } - - if valid { - listeners = append(listeners, l) - } else { - return nil, fmt.Errorf("ELB Listener: ssl_certificate_id may be set only when protocol is 'https' or 'ssl'") - } - } - - return listeners, nil -} - -// Takes the result of flatmap. Expand for an array of listeners and -// returns ECS Volume compatible objects -func expandEcsVolumes(configured []interface{}) ([]*ecs.Volume, error) { - volumes := make([]*ecs.Volume, 0, len(configured)) - - // Loop over our configured volumes and create - // an array of aws-sdk-go compatible objects - for _, lRaw := range configured { - data := lRaw.(map[string]interface{}) - - l := &ecs.Volume{ - Name: aws.String(data["name"].(string)), - } - - hostPath := data["host_path"].(string) - if hostPath != "" { - l.Host = &ecs.HostVolumeProperties{ - SourcePath: aws.String(hostPath), - } - } - - configList, ok := data["docker_volume_configuration"].([]interface{}) - if ok && len(configList) > 0 { - config := configList[0].(map[string]interface{}) - l.DockerVolumeConfiguration = &ecs.DockerVolumeConfiguration{} - - if v, ok := config["scope"].(string); ok && v != "" { - l.DockerVolumeConfiguration.Scope = aws.String(v) - } - - if v, ok := config["autoprovision"]; ok && v != "" { - scope := l.DockerVolumeConfiguration.Scope - if scope == nil || *scope != ecs.ScopeTask || v.(bool) { - l.DockerVolumeConfiguration.Autoprovision = aws.Bool(v.(bool)) - } - } - - if v, ok := config["driver"].(string); ok && v != "" { - l.DockerVolumeConfiguration.Driver = aws.String(v) - } - - if v, ok := config["driver_opts"].(map[string]interface{}); ok && len(v) > 0 { - l.DockerVolumeConfiguration.DriverOpts = stringMapToPointers(v) - } - - if v, ok := config["labels"].(map[string]interface{}); ok && len(v) > 0 { - l.DockerVolumeConfiguration.Labels = stringMapToPointers(v) - } - } - - volumes = append(volumes, l) - } - - return volumes, nil -} - -// Takes JSON in a string. Decodes JSON into -// an array of ecs.ContainerDefinition compatible objects -func expandEcsContainerDefinitions(rawDefinitions string) ([]*ecs.ContainerDefinition, error) { - var definitions []*ecs.ContainerDefinition - - err := json.Unmarshal([]byte(rawDefinitions), &definitions) - if err != nil { - return nil, fmt.Errorf("Error decoding JSON: %s", err) - } - - return definitions, nil -} - -// Takes the result of flatmap. Expand for an array of load balancers and -// returns ecs.LoadBalancer compatible objects -func expandEcsLoadBalancers(configured []interface{}) []*ecs.LoadBalancer { - loadBalancers := make([]*ecs.LoadBalancer, 0, len(configured)) - - // Loop over our configured load balancers and create - // an array of aws-sdk-go compatible objects - for _, lRaw := range configured { - data := lRaw.(map[string]interface{}) - - l := &ecs.LoadBalancer{ - ContainerName: aws.String(data["container_name"].(string)), - ContainerPort: aws.Int64(int64(data["container_port"].(int))), - } - - if v, ok := data["elb_name"]; ok && v.(string) != "" { - l.LoadBalancerName = aws.String(v.(string)) - } - if v, ok := data["target_group_arn"]; ok && v.(string) != "" { - l.TargetGroupArn = aws.String(v.(string)) - } - - loadBalancers = append(loadBalancers, l) - } - - return loadBalancers -} - -// Takes the result of flatmap.Expand for an array of ingress/egress security -// group rules and returns EC2 API compatible objects. This function will error -// if it finds invalid permissions input, namely a protocol of "-1" with either -// to_port or from_port set to a non-zero value. -func expandIPPerms( - group *ec2.SecurityGroup, configured []interface{}) ([]*ec2.IpPermission, error) { - vpc := group.VpcId != nil && *group.VpcId != "" - - perms := make([]*ec2.IpPermission, len(configured)) - for i, mRaw := range configured { - var perm ec2.IpPermission - m := mRaw.(map[string]interface{}) - - perm.FromPort = aws.Int64(int64(m["from_port"].(int))) - perm.ToPort = aws.Int64(int64(m["to_port"].(int))) - perm.IpProtocol = aws.String(m["protocol"].(string)) - - // When protocol is "-1", AWS won't store any ports for the - // rule, but also won't error if the user specifies ports other - // than '0'. Force the user to make a deliberate '0' port - // choice when specifying a "-1" protocol, and tell them about - // AWS's behavior in the error message. - if *perm.IpProtocol == "-1" && (*perm.FromPort != 0 || *perm.ToPort != 0) { - return nil, fmt.Errorf( - "from_port (%d) and to_port (%d) must both be 0 to use the 'ALL' \"-1\" protocol!", - *perm.FromPort, *perm.ToPort) - } - - var groups []string - if raw, ok := m["security_groups"]; ok { - list := raw.(*schema.Set).List() - for _, v := range list { - groups = append(groups, v.(string)) - } - } - if v, ok := m["self"]; ok && v.(bool) { - if vpc { - groups = append(groups, *group.GroupId) - } else { - groups = append(groups, *group.GroupName) - } - } - - if len(groups) > 0 { - perm.UserIdGroupPairs = make([]*ec2.UserIdGroupPair, len(groups)) - for i, name := range groups { - ownerId, id := "", name - if items := strings.Split(id, "/"); len(items) > 1 { - ownerId, id = items[0], items[1] - } - - perm.UserIdGroupPairs[i] = &ec2.UserIdGroupPair{ - GroupId: aws.String(id), - } - - if ownerId != "" { - perm.UserIdGroupPairs[i].UserId = aws.String(ownerId) - } - - if !vpc { - perm.UserIdGroupPairs[i].GroupId = nil - perm.UserIdGroupPairs[i].GroupName = aws.String(id) - } - } - } - - if raw, ok := m["cidr_blocks"]; ok { - list := raw.([]interface{}) - for _, v := range list { - perm.IpRanges = append(perm.IpRanges, &ec2.IpRange{CidrIp: aws.String(v.(string))}) - } - } - if raw, ok := m["ipv6_cidr_blocks"]; ok { - list := raw.([]interface{}) - for _, v := range list { - perm.Ipv6Ranges = append(perm.Ipv6Ranges, &ec2.Ipv6Range{CidrIpv6: aws.String(v.(string))}) - } - } - - if raw, ok := m["prefix_list_ids"]; ok { - list := raw.([]interface{}) - for _, v := range list { - perm.PrefixListIds = append(perm.PrefixListIds, &ec2.PrefixListId{PrefixListId: aws.String(v.(string))}) - } - } - - if raw, ok := m["description"]; ok { - description := raw.(string) - if description != "" { - for _, v := range perm.IpRanges { - v.Description = aws.String(description) - } - for _, v := range perm.Ipv6Ranges { - v.Description = aws.String(description) - } - for _, v := range perm.PrefixListIds { - v.Description = aws.String(description) - } - for _, v := range perm.UserIdGroupPairs { - v.Description = aws.String(description) - } - } - } - - perms[i] = &perm - } - - return perms, nil -} - -// Takes the result of flatmap.Expand for an array of parameters and -// returns Parameter API compatible objects -func expandParameters(configured []interface{}) ([]*rds.Parameter, error) { - var parameters []*rds.Parameter - - // Loop over our configured parameters and create - // an array of aws-sdk-go compatible objects - for _, pRaw := range configured { - data := pRaw.(map[string]interface{}) - - if data["name"].(string) == "" { - continue - } - - p := &rds.Parameter{ - ApplyMethod: aws.String(data["apply_method"].(string)), - ParameterName: aws.String(data["name"].(string)), - ParameterValue: aws.String(data["value"].(string)), - } - - parameters = append(parameters, p) - } - - return parameters, nil -} - -func expandRedshiftParameters(configured []interface{}) ([]*redshift.Parameter, error) { - var parameters []*redshift.Parameter - - // Loop over our configured parameters and create - // an array of aws-sdk-go compatible objects - for _, pRaw := range configured { - data := pRaw.(map[string]interface{}) - - if data["name"].(string) == "" { - continue - } - - p := &redshift.Parameter{ - ParameterName: aws.String(data["name"].(string)), - ParameterValue: aws.String(data["value"].(string)), - } - - parameters = append(parameters, p) - } - - return parameters, nil -} - -// Takes the result of flatmap.Expand for an array of parameters and -// returns Parameter API compatible objects -func expandDocDBParameters(configured []interface{}) ([]*docdb.Parameter, error) { - parameters := make([]*docdb.Parameter, 0, len(configured)) - - // Loop over our configured parameters and create - // an array of aws-sdk-go compatible objects - for _, pRaw := range configured { - data := pRaw.(map[string]interface{}) - - p := &docdb.Parameter{ - ApplyMethod: aws.String(data["apply_method"].(string)), - ParameterName: aws.String(data["name"].(string)), - ParameterValue: aws.String(data["value"].(string)), - } - - parameters = append(parameters, p) - } - - return parameters, nil -} - -func expandOptionConfiguration(configured []interface{}) []*rds.OptionConfiguration { - var option []*rds.OptionConfiguration - - for _, pRaw := range configured { - data := pRaw.(map[string]interface{}) - - o := &rds.OptionConfiguration{ - OptionName: aws.String(data["option_name"].(string)), - } - - if raw, ok := data["port"]; ok { - port := raw.(int) - if port != 0 { - o.Port = aws.Int64(int64(port)) - } - } - - if raw, ok := data["db_security_group_memberships"]; ok { - memberships := expandStringList(raw.(*schema.Set).List()) - if len(memberships) > 0 { - o.DBSecurityGroupMemberships = memberships - } - } - - if raw, ok := data["vpc_security_group_memberships"]; ok { - memberships := expandStringList(raw.(*schema.Set).List()) - if len(memberships) > 0 { - o.VpcSecurityGroupMemberships = memberships - } - } - - if raw, ok := data["option_settings"]; ok { - o.OptionSettings = expandOptionSetting(raw.(*schema.Set).List()) - } - - if raw, ok := data["version"]; ok && raw.(string) != "" { - o.OptionVersion = aws.String(raw.(string)) - } - - option = append(option, o) - } - - return option -} - -func expandOptionSetting(list []interface{}) []*rds.OptionSetting { - options := make([]*rds.OptionSetting, 0, len(list)) - - for _, oRaw := range list { - data := oRaw.(map[string]interface{}) - - o := &rds.OptionSetting{ - Name: aws.String(data["name"].(string)), - Value: aws.String(data["value"].(string)), - } - - options = append(options, o) - } - - return options -} - -// Takes the result of flatmap.Expand for an array of parameters and -// returns Parameter API compatible objects -func expandElastiCacheParameters(configured []interface{}) ([]*elasticache.ParameterNameValue, error) { - parameters := make([]*elasticache.ParameterNameValue, 0, len(configured)) - - // Loop over our configured parameters and create - // an array of aws-sdk-go compatible objects - for _, pRaw := range configured { - data := pRaw.(map[string]interface{}) - - p := &elasticache.ParameterNameValue{ - ParameterName: aws.String(data["name"].(string)), - ParameterValue: aws.String(data["value"].(string)), - } - - parameters = append(parameters, p) - } - - return parameters, nil -} - -// Takes the result of flatmap.Expand for an array of parameters and -// returns Parameter API compatible objects -func expandNeptuneParameters(configured []interface{}) ([]*neptune.Parameter, error) { - parameters := make([]*neptune.Parameter, 0, len(configured)) - - // Loop over our configured parameters and create - // an array of aws-sdk-go compatible objects - for _, pRaw := range configured { - data := pRaw.(map[string]interface{}) - - p := &neptune.Parameter{ - ApplyMethod: aws.String(data["apply_method"].(string)), - ParameterName: aws.String(data["name"].(string)), - ParameterValue: aws.String(data["value"].(string)), - } - - parameters = append(parameters, p) - } - - return parameters, nil -} - -// Flattens an access log into something that flatmap.Flatten() can handle -func flattenAccessLog(l *elb.AccessLog) []map[string]interface{} { - result := make([]map[string]interface{}, 0, 1) - - if l == nil { - return nil - } - - r := make(map[string]interface{}) - if l.S3BucketName != nil { - r["bucket"] = *l.S3BucketName - } - - if l.S3BucketPrefix != nil { - r["bucket_prefix"] = *l.S3BucketPrefix - } - - if l.EmitInterval != nil { - r["interval"] = *l.EmitInterval - } - - if l.Enabled != nil { - r["enabled"] = *l.Enabled - } - - result = append(result, r) - - return result -} - -// Takes the result of flatmap.Expand for an array of step adjustments and -// returns a []*autoscaling.StepAdjustment. -func expandStepAdjustments(configured []interface{}) ([]*autoscaling.StepAdjustment, error) { - var adjustments []*autoscaling.StepAdjustment - - // Loop over our configured step adjustments and create an array - // of aws-sdk-go compatible objects. We're forced to convert strings - // to floats here because there's no way to detect whether or not - // an uninitialized, optional schema element is "0.0" deliberately. - // With strings, we can test for "", which is definitely an empty - // struct value. - for _, raw := range configured { - data := raw.(map[string]interface{}) - a := &autoscaling.StepAdjustment{ - ScalingAdjustment: aws.Int64(int64(data["scaling_adjustment"].(int))), - } - if data["metric_interval_lower_bound"] != "" { - bound := data["metric_interval_lower_bound"] - switch bound := bound.(type) { - case string: - f, err := strconv.ParseFloat(bound, 64) - if err != nil { - return nil, fmt.Errorf( - "metric_interval_lower_bound must be a float value represented as a string") - } - a.MetricIntervalLowerBound = aws.Float64(f) - default: - return nil, fmt.Errorf( - "metric_interval_lower_bound isn't a string. This is a bug. Please file an issue.") - } - } - if data["metric_interval_upper_bound"] != "" { - bound := data["metric_interval_upper_bound"] - switch bound := bound.(type) { - case string: - f, err := strconv.ParseFloat(bound, 64) - if err != nil { - return nil, fmt.Errorf( - "metric_interval_upper_bound must be a float value represented as a string") - } - a.MetricIntervalUpperBound = aws.Float64(f) - default: - return nil, fmt.Errorf( - "metric_interval_upper_bound isn't a string. This is a bug. Please file an issue.") - } - } - adjustments = append(adjustments, a) - } - - return adjustments, nil -} - -// Flattens a health check into something that flatmap.Flatten() -// can handle -func flattenHealthCheck(check *elb.HealthCheck) []map[string]interface{} { - result := make([]map[string]interface{}, 0, 1) - - chk := make(map[string]interface{}) - chk["unhealthy_threshold"] = *check.UnhealthyThreshold - chk["healthy_threshold"] = *check.HealthyThreshold - chk["target"] = *check.Target - chk["timeout"] = *check.Timeout - chk["interval"] = *check.Interval - - result = append(result, chk) - - return result -} - -// Flattens an array of UserSecurityGroups into a []*GroupIdentifier -func flattenSecurityGroups(list []*ec2.UserIdGroupPair, ownerId *string) []*GroupIdentifier { - result := make([]*GroupIdentifier, 0, len(list)) - for _, g := range list { - var userId *string - if g.UserId != nil && *g.UserId != "" && (ownerId == nil || *ownerId != *g.UserId) { - userId = g.UserId - } - // userid nil here for same vpc groups - - vpc := g.GroupName == nil || *g.GroupName == "" - var id *string - if vpc { - id = g.GroupId - } else { - id = g.GroupName - } - - // id is groupid for vpcs - // id is groupname for non vpc (classic) - - if userId != nil { - id = aws.String(*userId + "/" + *id) - } - - if vpc { - result = append(result, &GroupIdentifier{ - GroupId: id, - Description: g.Description, - }) - } else { - result = append(result, &GroupIdentifier{ - GroupId: g.GroupId, - GroupName: id, - Description: g.Description, - }) - } - } - return result -} - -// Flattens an array of Instances into a []string -func flattenInstances(list []*elb.Instance) []string { - result := make([]string, 0, len(list)) - for _, i := range list { - result = append(result, *i.InstanceId) - } - return result -} - -// Expands an array of String Instance IDs into a []Instances -func expandInstanceString(list []interface{}) []*elb.Instance { - result := make([]*elb.Instance, 0, len(list)) - for _, i := range list { - result = append(result, &elb.Instance{InstanceId: aws.String(i.(string))}) - } - return result -} - -// Flattens an array of Backend Descriptions into a a map of instance_port to policy names. -func flattenBackendPolicies(backends []*elb.BackendServerDescription) map[int64][]string { - policies := make(map[int64][]string) - for _, i := range backends { - for _, p := range i.PolicyNames { - policies[*i.InstancePort] = append(policies[*i.InstancePort], *p) - } - sort.Strings(policies[*i.InstancePort]) - } - return policies -} - -// Flattens an array of Listeners into a []map[string]interface{} -func flattenListeners(list []*elb.ListenerDescription) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(list)) - for _, i := range list { - l := map[string]interface{}{ - "instance_port": *i.Listener.InstancePort, - "instance_protocol": strings.ToLower(*i.Listener.InstanceProtocol), - "lb_port": *i.Listener.LoadBalancerPort, - "lb_protocol": strings.ToLower(*i.Listener.Protocol), - } - // SSLCertificateID is optional, and may be nil - if i.Listener.SSLCertificateId != nil { - l["ssl_certificate_id"] = *i.Listener.SSLCertificateId - } - result = append(result, l) - } - return result -} - -// Flattens an array of Volumes into a []map[string]interface{} -func flattenEcsVolumes(list []*ecs.Volume) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(list)) - for _, volume := range list { - l := map[string]interface{}{ - "name": *volume.Name, - } - - if volume.Host != nil && volume.Host.SourcePath != nil { - l["host_path"] = *volume.Host.SourcePath - } - - if volume.DockerVolumeConfiguration != nil { - l["docker_volume_configuration"] = flattenDockerVolumeConfiguration(volume.DockerVolumeConfiguration) - } - - result = append(result, l) - } - return result -} - -func flattenDockerVolumeConfiguration(config *ecs.DockerVolumeConfiguration) []interface{} { - var items []interface{} - m := make(map[string]interface{}) - - if config.Scope != nil { - m["scope"] = aws.StringValue(config.Scope) - } - - if config.Autoprovision != nil { - m["autoprovision"] = aws.BoolValue(config.Autoprovision) - } - - if config.Driver != nil { - m["driver"] = aws.StringValue(config.Driver) - } - - if config.DriverOpts != nil { - m["driver_opts"] = pointersMapToStringList(config.DriverOpts) - } - - if config.Labels != nil { - m["labels"] = pointersMapToStringList(config.Labels) - } - - items = append(items, m) - return items -} - -// Flattens an array of ECS LoadBalancers into a []map[string]interface{} -func flattenEcsLoadBalancers(list []*ecs.LoadBalancer) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(list)) - for _, loadBalancer := range list { - l := map[string]interface{}{ - "container_name": *loadBalancer.ContainerName, - "container_port": *loadBalancer.ContainerPort, - } - - if loadBalancer.LoadBalancerName != nil { - l["elb_name"] = *loadBalancer.LoadBalancerName - } - - if loadBalancer.TargetGroupArn != nil { - l["target_group_arn"] = *loadBalancer.TargetGroupArn - } - - result = append(result, l) - } - return result -} - -// Encodes an array of ecs.ContainerDefinitions into a JSON string -func flattenEcsContainerDefinitions(definitions []*ecs.ContainerDefinition) (string, error) { - b, err := jsonutil.BuildJSON(definitions) - if err != nil { - return "", err - } - - return string(b), nil -} - -// Flattens an array of Options into a []map[string]interface{} -func flattenOptions(apiOptions []*rds.Option, optionConfigurations []*rds.OptionConfiguration) []map[string]interface{} { - result := make([]map[string]interface{}, 0) - - for _, apiOption := range apiOptions { - if apiOption == nil || apiOption.OptionName == nil { - continue - } - - var configuredOption *rds.OptionConfiguration - - for _, optionConfiguration := range optionConfigurations { - if aws.StringValue(apiOption.OptionName) == aws.StringValue(optionConfiguration.OptionName) { - configuredOption = optionConfiguration - break - } - } - - dbSecurityGroupMemberships := make([]interface{}, 0) - for _, db := range apiOption.DBSecurityGroupMemberships { - if db != nil { - dbSecurityGroupMemberships = append(dbSecurityGroupMemberships, aws.StringValue(db.DBSecurityGroupName)) - } - } - - optionSettings := make([]interface{}, 0) - for _, apiOptionSetting := range apiOption.OptionSettings { - // The RDS API responds with all settings. Omit settings that match default value, - // but only if unconfigured. This is to prevent operators from continually needing - // to continually update their Terraform configurations to match new option settings - // when added by the API. - var configuredOptionSetting *rds.OptionSetting - - if configuredOption != nil { - for _, configuredOptionOptionSetting := range configuredOption.OptionSettings { - if aws.StringValue(apiOptionSetting.Name) == aws.StringValue(configuredOptionOptionSetting.Name) { - configuredOptionSetting = configuredOptionOptionSetting - break - } - } - } - - if configuredOptionSetting == nil && aws.StringValue(apiOptionSetting.Value) == aws.StringValue(apiOptionSetting.DefaultValue) { - continue - } - - optionSetting := map[string]interface{}{ - "name": aws.StringValue(apiOptionSetting.Name), - "value": aws.StringValue(apiOptionSetting.Value), - } - - // Some values, like passwords, are sent back from the API as ****. - // Set the response to match the configuration to prevent an unexpected difference - if configuredOptionSetting != nil && aws.StringValue(apiOptionSetting.Value) == "****" { - optionSetting["value"] = aws.StringValue(configuredOptionSetting.Value) - } - - optionSettings = append(optionSettings, optionSetting) - } - optionSettingsResource := &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "value": { - Type: schema.TypeString, - Required: true, - }, - }, - } - - vpcSecurityGroupMemberships := make([]interface{}, 0) - for _, vpc := range apiOption.VpcSecurityGroupMemberships { - if vpc != nil { - vpcSecurityGroupMemberships = append(vpcSecurityGroupMemberships, aws.StringValue(vpc.VpcSecurityGroupId)) - } - } - - r := map[string]interface{}{ - "db_security_group_memberships": schema.NewSet(schema.HashString, dbSecurityGroupMemberships), - "option_name": aws.StringValue(apiOption.OptionName), - "option_settings": schema.NewSet(schema.HashResource(optionSettingsResource), optionSettings), - "port": aws.Int64Value(apiOption.Port), - "version": aws.StringValue(apiOption.OptionVersion), - "vpc_security_group_memberships": schema.NewSet(schema.HashString, vpcSecurityGroupMemberships), - } - - result = append(result, r) - } - - return result -} - -// Flattens an array of Parameters into a []map[string]interface{} -func flattenParameters(list []*rds.Parameter) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(list)) - for _, i := range list { - if i.ParameterName != nil { - r := make(map[string]interface{}) - r["name"] = strings.ToLower(*i.ParameterName) - // Default empty string, guard against nil parameter values - r["value"] = "" - if i.ParameterValue != nil { - r["value"] = strings.ToLower(*i.ParameterValue) - } - if i.ApplyMethod != nil { - r["apply_method"] = strings.ToLower(*i.ApplyMethod) - } - - result = append(result, r) - } - } - return result -} - -// Flattens an array of Redshift Parameters into a []map[string]interface{} -func flattenRedshiftParameters(list []*redshift.Parameter) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(list)) - for _, i := range list { - result = append(result, map[string]interface{}{ - "name": strings.ToLower(*i.ParameterName), - "value": strings.ToLower(*i.ParameterValue), - }) - } - return result -} - -// Flattens an array of Parameters into a []map[string]interface{} -func flattenElastiCacheParameters(list []*elasticache.Parameter) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(list)) - for _, i := range list { - if i.ParameterValue != nil { - result = append(result, map[string]interface{}{ - "name": strings.ToLower(*i.ParameterName), - "value": *i.ParameterValue, - }) - } - } - return result -} - -// Flattens an array of Parameters into a []map[string]interface{} -func flattenNeptuneParameters(list []*neptune.Parameter) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(list)) - for _, i := range list { - if i.ParameterValue != nil { - result = append(result, map[string]interface{}{ - "apply_method": aws.StringValue(i.ApplyMethod), - "name": aws.StringValue(i.ParameterName), - "value": aws.StringValue(i.ParameterValue), - }) - } - } - return result -} - -// Flattens an array of Parameters into a []map[string]interface{} -func flattenDocDBParameters(list []*docdb.Parameter) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(list)) - for _, i := range list { - if i.ParameterValue != nil { - result = append(result, map[string]interface{}{ - "apply_method": aws.StringValue(i.ApplyMethod), - "name": aws.StringValue(i.ParameterName), - "value": aws.StringValue(i.ParameterValue), - }) - } - } - return result -} - -// Takes the result of flatmap.Expand for an array of strings -// and returns a []*string -func expandStringList(configured []interface{}) []*string { - vs := make([]*string, 0, len(configured)) - for _, v := range configured { - val, ok := v.(string) - if ok && val != "" { - vs = append(vs, aws.String(v.(string))) - } - } - return vs -} - -// Expands a map of string to interface to a map of string to *float -func expandFloat64Map(m map[string]interface{}) map[string]*float64 { - float64Map := make(map[string]*float64, len(m)) - for k, v := range m { - float64Map[k] = aws.Float64(v.(float64)) - } - return float64Map -} - -// Takes the result of schema.Set of strings and returns a []*string -func expandStringSet(configured *schema.Set) []*string { - return expandStringList(configured.List()) -} - -// Takes list of pointers to strings. Expand to an array -// of raw strings and returns a []interface{} -// to keep compatibility w/ schema.NewSetschema.NewSet -func flattenStringList(list []*string) []interface{} { - vs := make([]interface{}, 0, len(list)) - for _, v := range list { - vs = append(vs, *v) - } - return vs -} - -func flattenStringSet(list []*string) *schema.Set { - return schema.NewSet(schema.HashString, flattenStringList(list)) -} - -//Flattens an array of private ip addresses into a []string, where the elements returned are the IP strings e.g. "192.168.0.0" -func flattenNetworkInterfacesPrivateIPAddresses(dtos []*ec2.NetworkInterfacePrivateIpAddress) []string { - ips := make([]string, 0, len(dtos)) - for _, v := range dtos { - ip := *v.PrivateIpAddress - ips = append(ips, ip) - } - return ips -} - -//Flattens security group identifiers into a []string, where the elements returned are the GroupIDs -func flattenGroupIdentifiers(dtos []*ec2.GroupIdentifier) []string { - ids := make([]string, 0, len(dtos)) - for _, v := range dtos { - group_id := *v.GroupId - ids = append(ids, group_id) - } - return ids -} - -//Expands an array of IPs into a ec2 Private IP Address Spec -func expandPrivateIPAddresses(ips []interface{}) []*ec2.PrivateIpAddressSpecification { - dtos := make([]*ec2.PrivateIpAddressSpecification, 0, len(ips)) - for i, v := range ips { - new_private_ip := &ec2.PrivateIpAddressSpecification{ - PrivateIpAddress: aws.String(v.(string)), - } - - new_private_ip.Primary = aws.Bool(i == 0) - - dtos = append(dtos, new_private_ip) - } - return dtos -} - -//Flattens network interface attachment into a map[string]interface -func flattenAttachment(a *ec2.NetworkInterfaceAttachment) map[string]interface{} { - att := make(map[string]interface{}) - if a.InstanceId != nil { - att["instance"] = *a.InstanceId - } - att["device_index"] = *a.DeviceIndex - att["attachment_id"] = *a.AttachmentId - return att -} - -func flattenEc2AttributeValues(l []*ec2.AttributeValue) []string { - values := make([]string, 0, len(l)) - for _, v := range l { - values = append(values, aws.StringValue(v.Value)) - } - return values -} - -func flattenEc2NetworkInterfaceAssociation(a *ec2.NetworkInterfaceAssociation) []interface{} { - att := make(map[string]interface{}) - if a.AllocationId != nil { - att["allocation_id"] = *a.AllocationId - } - if a.AssociationId != nil { - att["association_id"] = *a.AssociationId - } - if a.IpOwnerId != nil { - att["ip_owner_id"] = *a.IpOwnerId - } - if a.PublicDnsName != nil { - att["public_dns_name"] = *a.PublicDnsName - } - if a.PublicIp != nil { - att["public_ip"] = *a.PublicIp - } - return []interface{}{att} -} - -func flattenEc2NetworkInterfaceIpv6Address(niia []*ec2.NetworkInterfaceIpv6Address) []string { - ips := make([]string, 0, len(niia)) - for _, v := range niia { - ips = append(ips, *v.Ipv6Address) - } - return ips -} - -func flattenElastiCacheSecurityGroupNames(securityGroups []*elasticache.CacheSecurityGroupMembership) []string { - result := make([]string, 0, len(securityGroups)) - for _, sg := range securityGroups { - if sg.CacheSecurityGroupName != nil { - result = append(result, *sg.CacheSecurityGroupName) - } - } - return result -} - -func flattenElastiCacheSecurityGroupIds(securityGroups []*elasticache.SecurityGroupMembership) []string { - result := make([]string, 0, len(securityGroups)) - for _, sg := range securityGroups { - if sg.SecurityGroupId != nil { - result = append(result, *sg.SecurityGroupId) - } - } - return result -} - -func flattenDaxSecurityGroupIds(securityGroups []*dax.SecurityGroupMembership) []string { - result := make([]string, 0, len(securityGroups)) - for _, sg := range securityGroups { - if sg.SecurityGroupIdentifier != nil { - result = append(result, *sg.SecurityGroupIdentifier) - } - } - return result -} - -// Flattens step adjustments into a list of map[string]interface. -func flattenStepAdjustments(adjustments []*autoscaling.StepAdjustment) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(adjustments)) - for _, raw := range adjustments { - a := map[string]interface{}{ - "scaling_adjustment": aws.Int64Value(raw.ScalingAdjustment), - } - if raw.MetricIntervalUpperBound != nil { - a["metric_interval_upper_bound"] = fmt.Sprintf("%g", aws.Float64Value(raw.MetricIntervalUpperBound)) - } - if raw.MetricIntervalLowerBound != nil { - a["metric_interval_lower_bound"] = fmt.Sprintf("%g", aws.Float64Value(raw.MetricIntervalLowerBound)) - } - result = append(result, a) - } - return result -} - -func flattenResourceRecords(recs []*route53.ResourceRecord, typeStr string) []string { - strs := make([]string, 0, len(recs)) - for _, r := range recs { - if r.Value != nil { - s := *r.Value - if typeStr == "TXT" || typeStr == "SPF" { - s = expandTxtEntry(s) - } - strs = append(strs, s) - } - } - return strs -} - -func expandResourceRecords(recs []interface{}, typeStr string) []*route53.ResourceRecord { - records := make([]*route53.ResourceRecord, 0, len(recs)) - for _, r := range recs { - s := r.(string) - if typeStr == "TXT" || typeStr == "SPF" { - s = flattenTxtEntry(s) - } - records = append(records, &route53.ResourceRecord{Value: aws.String(s)}) - } - return records -} - -// How 'flattenTxtEntry' and 'expandTxtEntry' work. -// -// In the Route 53, TXT entries are written using quoted strings, one per line. -// Example: -// "x=foo" -// "bar=12" -// -// In Terraform, there are two differences: -// - We use a list of strings instead of separating strings with newlines. -// - Within each string, we dont' include the surrounding quotes. -// Example: -// records = ["x=foo", "bar=12"] # Instead of ["\"x=foo\", \"bar=12\""] -// -// When we pull from Route 53, `expandTxtEntry` removes the surrounding quotes; -// when we push to Route 53, `flattenTxtEntry` adds them back. -// -// One complication is that a single TXT entry can have multiple quoted strings. -// For example, here are two TXT entries, one with two quoted strings and the -// other with three. -// "x=" "foo" -// "ba" "r" "=12" -// -// DNS clients are expected to merge the quoted strings before interpreting the -// value. Since `expandTxtEntry` only removes the quotes at the end we can still -// (hackily) represent the above configuration in Terraform: -// records = ["x=\" \"foo", "ba\" \"r\" \"=12"] -// -// The primary reason to use multiple strings for an entry is that DNS (and Route -// 53) doesn't allow a quoted string to be more than 255 characters long. If you -// want a longer TXT entry, you must use multiple quoted strings. -// -// It would be nice if this Terraform automatically split strings longer than 255 -// characters. For example, imagine "xxx..xxx" has 256 "x" characters. -// records = ["xxx..xxx"] -// When pushing to Route 53, this could be converted to: -// "xxx..xx" "x" -// -// This could also work when the user is already using multiple quoted strings: -// records = ["xxx.xxx\" \"yyy..yyy"] -// When pushing to Route 53, this could be converted to: -// "xxx..xx" "xyyy...y" "yy" -// -// If you want to add this feature, make sure to follow all the quoting rules in -// . If you make a mistake, people -// might end up relying on that mistake so fixing it would be a breaking change. - -func flattenTxtEntry(s string) string { - return fmt.Sprintf(`"%s"`, s) -} - -func expandTxtEntry(s string) string { - last := len(s) - 1 - if last != 0 && s[0] == '"' && s[last] == '"' { - s = s[1:last] - } - return s -} - -func expandESClusterConfig(m map[string]interface{}) *elasticsearch.ElasticsearchClusterConfig { - config := elasticsearch.ElasticsearchClusterConfig{} - - if v, ok := m["dedicated_master_enabled"]; ok { - isEnabled := v.(bool) - config.DedicatedMasterEnabled = aws.Bool(isEnabled) - - if isEnabled { - if v, ok := m["dedicated_master_count"]; ok && v.(int) > 0 { - config.DedicatedMasterCount = aws.Int64(int64(v.(int))) - } - if v, ok := m["dedicated_master_type"]; ok && v.(string) != "" { - config.DedicatedMasterType = aws.String(v.(string)) - } - } - } - - if v, ok := m["instance_count"]; ok { - config.InstanceCount = aws.Int64(int64(v.(int))) - } - if v, ok := m["instance_type"]; ok { - config.InstanceType = aws.String(v.(string)) - } - - if v, ok := m["zone_awareness_enabled"]; ok { - config.ZoneAwarenessEnabled = aws.Bool(v.(bool)) - } - - return &config -} - -func flattenESClusterConfig(c *elasticsearch.ElasticsearchClusterConfig) []map[string]interface{} { - m := map[string]interface{}{} - - if c.DedicatedMasterCount != nil { - m["dedicated_master_count"] = *c.DedicatedMasterCount - } - if c.DedicatedMasterEnabled != nil { - m["dedicated_master_enabled"] = *c.DedicatedMasterEnabled - } - if c.DedicatedMasterType != nil { - m["dedicated_master_type"] = *c.DedicatedMasterType - } - if c.InstanceCount != nil { - m["instance_count"] = *c.InstanceCount - } - if c.InstanceType != nil { - m["instance_type"] = *c.InstanceType - } - if c.ZoneAwarenessEnabled != nil { - m["zone_awareness_enabled"] = *c.ZoneAwarenessEnabled - } - - return []map[string]interface{}{m} -} - -func expandESCognitoOptions(c []interface{}) *elasticsearch.CognitoOptions { - options := &elasticsearch.CognitoOptions{ - Enabled: aws.Bool(false), - } - if len(c) < 1 { - return options - } - - m := c[0].(map[string]interface{}) - - if cognitoEnabled, ok := m["enabled"]; ok { - options.Enabled = aws.Bool(cognitoEnabled.(bool)) - - if cognitoEnabled.(bool) { - - if v, ok := m["user_pool_id"]; ok && v.(string) != "" { - options.UserPoolId = aws.String(v.(string)) - } - if v, ok := m["identity_pool_id"]; ok && v.(string) != "" { - options.IdentityPoolId = aws.String(v.(string)) - } - if v, ok := m["role_arn"]; ok && v.(string) != "" { - options.RoleArn = aws.String(v.(string)) - } - } - } - - return options -} - -func flattenESCognitoOptions(c *elasticsearch.CognitoOptions) []map[string]interface{} { - m := map[string]interface{}{} - - m["enabled"] = aws.BoolValue(c.Enabled) - - if aws.BoolValue(c.Enabled) { - m["identity_pool_id"] = aws.StringValue(c.IdentityPoolId) - m["user_pool_id"] = aws.StringValue(c.UserPoolId) - m["role_arn"] = aws.StringValue(c.RoleArn) - } - - return []map[string]interface{}{m} -} - -func flattenESSnapshotOptions(snapshotOptions *elasticsearch.SnapshotOptions) []map[string]interface{} { - if snapshotOptions == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{ - "automated_snapshot_start_hour": int(aws.Int64Value(snapshotOptions.AutomatedSnapshotStartHour)), - } - - return []map[string]interface{}{m} -} - -func flattenESEBSOptions(o *elasticsearch.EBSOptions) []map[string]interface{} { - m := map[string]interface{}{} - - if o.EBSEnabled != nil { - m["ebs_enabled"] = *o.EBSEnabled - } - - if aws.BoolValue(o.EBSEnabled) { - if o.Iops != nil { - m["iops"] = *o.Iops - } - if o.VolumeSize != nil { - m["volume_size"] = *o.VolumeSize - } - if o.VolumeType != nil { - m["volume_type"] = *o.VolumeType - } - } - - return []map[string]interface{}{m} -} - -func expandESEBSOptions(m map[string]interface{}) *elasticsearch.EBSOptions { - options := elasticsearch.EBSOptions{} - - if ebsEnabled, ok := m["ebs_enabled"]; ok { - options.EBSEnabled = aws.Bool(ebsEnabled.(bool)) - - if ebsEnabled.(bool) { - if v, ok := m["iops"]; ok && v.(int) > 0 { - options.Iops = aws.Int64(int64(v.(int))) - } - if v, ok := m["volume_size"]; ok && v.(int) > 0 { - options.VolumeSize = aws.Int64(int64(v.(int))) - } - if v, ok := m["volume_type"]; ok && v.(string) != "" { - options.VolumeType = aws.String(v.(string)) - } - } - } - - return &options -} - -func flattenESEncryptAtRestOptions(o *elasticsearch.EncryptionAtRestOptions) []map[string]interface{} { - if o == nil { - return []map[string]interface{}{} - } - - m := map[string]interface{}{} - - if o.Enabled != nil { - m["enabled"] = *o.Enabled - } - if o.KmsKeyId != nil { - m["kms_key_id"] = *o.KmsKeyId - } - - return []map[string]interface{}{m} -} - -func expandESEncryptAtRestOptions(m map[string]interface{}) *elasticsearch.EncryptionAtRestOptions { - options := elasticsearch.EncryptionAtRestOptions{} - - if v, ok := m["enabled"]; ok { - options.Enabled = aws.Bool(v.(bool)) - } - if v, ok := m["kms_key_id"]; ok && v.(string) != "" { - options.KmsKeyId = aws.String(v.(string)) - } - - return &options -} - -func flattenESVPCDerivedInfo(o *elasticsearch.VPCDerivedInfo) []map[string]interface{} { - m := map[string]interface{}{} - - if o.AvailabilityZones != nil { - m["availability_zones"] = schema.NewSet(schema.HashString, flattenStringList(o.AvailabilityZones)) - } - if o.SecurityGroupIds != nil { - m["security_group_ids"] = schema.NewSet(schema.HashString, flattenStringList(o.SecurityGroupIds)) - } - if o.SubnetIds != nil { - m["subnet_ids"] = schema.NewSet(schema.HashString, flattenStringList(o.SubnetIds)) - } - if o.VPCId != nil { - m["vpc_id"] = *o.VPCId - } - - return []map[string]interface{}{m} -} - -func expandESVPCOptions(m map[string]interface{}) *elasticsearch.VPCOptions { - options := elasticsearch.VPCOptions{} - - if v, ok := m["security_group_ids"]; ok { - options.SecurityGroupIds = expandStringList(v.(*schema.Set).List()) - } - if v, ok := m["subnet_ids"]; ok { - options.SubnetIds = expandStringList(v.(*schema.Set).List()) - } - - return &options -} - -func expandConfigRecordingGroup(configured []interface{}) *configservice.RecordingGroup { - recordingGroup := configservice.RecordingGroup{} - group := configured[0].(map[string]interface{}) - - if v, ok := group["all_supported"]; ok { - recordingGroup.AllSupported = aws.Bool(v.(bool)) - } - - if v, ok := group["include_global_resource_types"]; ok { - recordingGroup.IncludeGlobalResourceTypes = aws.Bool(v.(bool)) - } - - if v, ok := group["resource_types"]; ok { - recordingGroup.ResourceTypes = expandStringList(v.(*schema.Set).List()) - } - return &recordingGroup -} - -func flattenConfigRecordingGroup(g *configservice.RecordingGroup) []map[string]interface{} { - m := make(map[string]interface{}, 1) - - if g.AllSupported != nil { - m["all_supported"] = *g.AllSupported - } - - if g.IncludeGlobalResourceTypes != nil { - m["include_global_resource_types"] = *g.IncludeGlobalResourceTypes - } - - if g.ResourceTypes != nil && len(g.ResourceTypes) > 0 { - m["resource_types"] = schema.NewSet(schema.HashString, flattenStringList(g.ResourceTypes)) - } - - return []map[string]interface{}{m} -} - -func flattenConfigSnapshotDeliveryProperties(p *configservice.ConfigSnapshotDeliveryProperties) []map[string]interface{} { - m := make(map[string]interface{}) - - if p.DeliveryFrequency != nil { - m["delivery_frequency"] = *p.DeliveryFrequency - } - - return []map[string]interface{}{m} -} - -func pointersMapToStringList(pointers map[string]*string) map[string]interface{} { - list := make(map[string]interface{}, len(pointers)) - for i, v := range pointers { - list[i] = *v - } - return list -} - -func stringMapToPointers(m map[string]interface{}) map[string]*string { - list := make(map[string]*string, len(m)) - for i, v := range m { - list[i] = aws.String(v.(string)) - } - return list -} - -func flattenDSVpcSettings( - s *directoryservice.DirectoryVpcSettingsDescription) []map[string]interface{} { - settings := make(map[string]interface{}) - - if s == nil { - return nil - } - - settings["subnet_ids"] = schema.NewSet(schema.HashString, flattenStringList(s.SubnetIds)) - settings["vpc_id"] = *s.VpcId - - return []map[string]interface{}{settings} -} - -func flattenLambdaEnvironment(lambdaEnv *lambda.EnvironmentResponse) []interface{} { - envs := make(map[string]interface{}) - en := make(map[string]string) - - if lambdaEnv == nil { - return nil - } - - for k, v := range lambdaEnv.Variables { - en[k] = *v - } - if len(en) > 0 { - envs["variables"] = en - } - - return []interface{}{envs} -} - -func flattenLambdaLayers(layers []*lambda.Layer) []interface{} { - arns := make([]*string, len(layers)) - for i, layer := range layers { - arns[i] = layer.Arn - } - return flattenStringList(arns) -} - -func flattenLambdaVpcConfigResponse(s *lambda.VpcConfigResponse) []map[string]interface{} { - settings := make(map[string]interface{}) - - if s == nil { - return nil - } - - var emptyVpc bool - if s.VpcId == nil || *s.VpcId == "" { - emptyVpc = true - } - if len(s.SubnetIds) == 0 && len(s.SecurityGroupIds) == 0 && emptyVpc { - return nil - } - - settings["subnet_ids"] = schema.NewSet(schema.HashString, flattenStringList(s.SubnetIds)) - settings["security_group_ids"] = schema.NewSet(schema.HashString, flattenStringList(s.SecurityGroupIds)) - if s.VpcId != nil { - settings["vpc_id"] = *s.VpcId - } - - return []map[string]interface{}{settings} -} - -func flattenLambdaAliasRoutingConfiguration(arc *lambda.AliasRoutingConfiguration) []interface{} { - if arc == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "additional_version_weights": aws.Float64ValueMap(arc.AdditionalVersionWeights), - } - - return []interface{}{m} -} - -func flattenDSConnectSettings( - customerDnsIps []*string, - s *directoryservice.DirectoryConnectSettingsDescription) []map[string]interface{} { - if s == nil { - return nil - } - - settings := make(map[string]interface{}) - - settings["customer_dns_ips"] = schema.NewSet(schema.HashString, flattenStringList(customerDnsIps)) - settings["connect_ips"] = schema.NewSet(schema.HashString, flattenStringList(s.ConnectIps)) - settings["customer_username"] = *s.CustomerUserName - settings["subnet_ids"] = schema.NewSet(schema.HashString, flattenStringList(s.SubnetIds)) - settings["vpc_id"] = *s.VpcId - - return []map[string]interface{}{settings} -} - -func expandCloudFormationParameters(params map[string]interface{}) []*cloudformation.Parameter { - var cfParams []*cloudformation.Parameter - for k, v := range params { - cfParams = append(cfParams, &cloudformation.Parameter{ - ParameterKey: aws.String(k), - ParameterValue: aws.String(v.(string)), - }) - } - - return cfParams -} - -// flattenCloudFormationParameters is flattening list of -// *cloudformation.Parameters and only returning existing -// parameters to avoid clash with default values -func flattenCloudFormationParameters(cfParams []*cloudformation.Parameter, - originalParams map[string]interface{}) map[string]interface{} { - params := make(map[string]interface{}, len(cfParams)) - for _, p := range cfParams { - _, isConfigured := originalParams[*p.ParameterKey] - if isConfigured { - params[*p.ParameterKey] = *p.ParameterValue - } - } - return params -} - -func flattenAllCloudFormationParameters(cfParams []*cloudformation.Parameter) map[string]interface{} { - params := make(map[string]interface{}, len(cfParams)) - for _, p := range cfParams { - params[*p.ParameterKey] = *p.ParameterValue - } - return params -} - -func expandCloudFormationTags(tags map[string]interface{}) []*cloudformation.Tag { - var cfTags []*cloudformation.Tag - for k, v := range tags { - cfTags = append(cfTags, &cloudformation.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - }) - } - return cfTags -} - -func flattenCloudFormationTags(cfTags []*cloudformation.Tag) map[string]string { - tags := make(map[string]string, len(cfTags)) - for _, t := range cfTags { - tags[*t.Key] = *t.Value - } - return tags -} - -func flattenCloudFormationOutputs(cfOutputs []*cloudformation.Output) map[string]string { - outputs := make(map[string]string, len(cfOutputs)) - for _, o := range cfOutputs { - outputs[*o.OutputKey] = *o.OutputValue - } - return outputs -} - -func flattenAsgSuspendedProcesses(list []*autoscaling.SuspendedProcess) []string { - strs := make([]string, 0, len(list)) - for _, r := range list { - if r.ProcessName != nil { - strs = append(strs, *r.ProcessName) - } - } - return strs -} - -func flattenAsgEnabledMetrics(list []*autoscaling.EnabledMetric) []string { - strs := make([]string, 0, len(list)) - for _, r := range list { - if r.Metric != nil { - strs = append(strs, *r.Metric) - } - } - return strs -} - -func flattenKinesisShardLevelMetrics(list []*kinesis.EnhancedMetrics) []string { - if len(list) == 0 { - return []string{} - } - strs := make([]string, 0, len(list[0].ShardLevelMetrics)) - for _, s := range list[0].ShardLevelMetrics { - strs = append(strs, *s) - } - return strs -} - -func flattenApiGatewayStageKeys(keys []*string) []map[string]interface{} { - stageKeys := make([]map[string]interface{}, 0, len(keys)) - for _, o := range keys { - key := make(map[string]interface{}) - parts := strings.Split(*o, "/") - key["stage_name"] = parts[1] - key["rest_api_id"] = parts[0] - - stageKeys = append(stageKeys, key) - } - return stageKeys -} - -func expandApiGatewayStageKeys(d *schema.ResourceData) []*apigateway.StageKey { - var stageKeys []*apigateway.StageKey - - if stageKeyData, ok := d.GetOk("stage_key"); ok { - params := stageKeyData.(*schema.Set).List() - for k := range params { - data := params[k].(map[string]interface{}) - stageKeys = append(stageKeys, &apigateway.StageKey{ - RestApiId: aws.String(data["rest_api_id"].(string)), - StageName: aws.String(data["stage_name"].(string)), - }) - } - } - - return stageKeys -} - -func expandApiGatewayRequestResponseModelOperations(d *schema.ResourceData, key string, prefix string) []*apigateway.PatchOperation { - operations := make([]*apigateway.PatchOperation, 0) - - oldModels, newModels := d.GetChange(key) - oldModelMap := oldModels.(map[string]interface{}) - newModelMap := newModels.(map[string]interface{}) - - for k := range oldModelMap { - operation := apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, strings.Replace(k, "/", "~1", -1))), - } - - for nK, nV := range newModelMap { - if nK == k { - operation.Op = aws.String("replace") - operation.Value = aws.String(nV.(string)) - } - } - - operations = append(operations, &operation) - } - - for nK, nV := range newModelMap { - exists := false - for k := range oldModelMap { - if k == nK { - exists = true - } - } - if !exists { - operation := apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, strings.Replace(nK, "/", "~1", -1))), - Value: aws.String(nV.(string)), - } - operations = append(operations, &operation) - } - } - - return operations -} - -func deprecatedExpandApiGatewayMethodParametersJSONOperations(d *schema.ResourceData, key string, prefix string) ([]*apigateway.PatchOperation, error) { - operations := make([]*apigateway.PatchOperation, 0) - oldParameters, newParameters := d.GetChange(key) - oldParametersMap := make(map[string]interface{}) - newParametersMap := make(map[string]interface{}) - - if err := json.Unmarshal([]byte(oldParameters.(string)), &oldParametersMap); err != nil { - err := fmt.Errorf("Error unmarshaling old %s: %s", key, err) - return operations, err - } - - if err := json.Unmarshal([]byte(newParameters.(string)), &newParametersMap); err != nil { - err := fmt.Errorf("Error unmarshaling new %s: %s", key, err) - return operations, err - } - - for k := range oldParametersMap { - operation := apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, k)), - } - - for nK, nV := range newParametersMap { - if nK == k { - operation.Op = aws.String("replace") - operation.Value = aws.String(strconv.FormatBool(nV.(bool))) - } - } - - operations = append(operations, &operation) - } - - for nK, nV := range newParametersMap { - exists := false - for k := range oldParametersMap { - if k == nK { - exists = true - } - } - if !exists { - operation := apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, nK)), - Value: aws.String(strconv.FormatBool(nV.(bool))), - } - operations = append(operations, &operation) - } - } - - return operations, nil -} - -func expandApiGatewayMethodParametersOperations(d *schema.ResourceData, key string, prefix string) ([]*apigateway.PatchOperation, error) { - operations := make([]*apigateway.PatchOperation, 0) - - oldParameters, newParameters := d.GetChange(key) - oldParametersMap := oldParameters.(map[string]interface{}) - newParametersMap := newParameters.(map[string]interface{}) - - for k := range oldParametersMap { - operation := apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, k)), - } - - for nK, nV := range newParametersMap { - b, ok := nV.(bool) - if !ok { - value, _ := strconv.ParseBool(nV.(string)) - b = value - } - if nK == k { - operation.Op = aws.String("replace") - operation.Value = aws.String(strconv.FormatBool(b)) - } - } - - operations = append(operations, &operation) - } - - for nK, nV := range newParametersMap { - exists := false - for k := range oldParametersMap { - if k == nK { - exists = true - } - } - if !exists { - b, ok := nV.(bool) - if !ok { - value, _ := strconv.ParseBool(nV.(string)) - b = value - } - operation := apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, nK)), - Value: aws.String(strconv.FormatBool(b)), - } - operations = append(operations, &operation) - } - } - - return operations, nil -} - -func expandApiGatewayStageKeyOperations(d *schema.ResourceData) []*apigateway.PatchOperation { - operations := make([]*apigateway.PatchOperation, 0) - - prev, curr := d.GetChange("stage_key") - prevList := prev.(*schema.Set).List() - currList := curr.(*schema.Set).List() - - for i := range prevList { - p := prevList[i].(map[string]interface{}) - exists := false - - for j := range currList { - c := currList[j].(map[string]interface{}) - if c["rest_api_id"].(string) == p["rest_api_id"].(string) && c["stage_name"].(string) == p["stage_name"].(string) { - exists = true - } - } - - if !exists { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String("/stages"), - Value: aws.String(fmt.Sprintf("%s/%s", p["rest_api_id"].(string), p["stage_name"].(string))), - }) - } - } - - for i := range currList { - c := currList[i].(map[string]interface{}) - exists := false - - for j := range prevList { - p := prevList[j].(map[string]interface{}) - if c["rest_api_id"].(string) == p["rest_api_id"].(string) && c["stage_name"].(string) == p["stage_name"].(string) { - exists = true - } - } - - if !exists { - operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String("/stages"), - Value: aws.String(fmt.Sprintf("%s/%s", c["rest_api_id"].(string), c["stage_name"].(string))), - }) - } - } - - return operations -} - -func expandCloudWatchLogMetricTransformations(m map[string]interface{}) []*cloudwatchlogs.MetricTransformation { - transformation := cloudwatchlogs.MetricTransformation{ - MetricName: aws.String(m["name"].(string)), - MetricNamespace: aws.String(m["namespace"].(string)), - MetricValue: aws.String(m["value"].(string)), - } - - if m["default_value"].(string) != "" { - value, _ := strconv.ParseFloat(m["default_value"].(string), 64) - transformation.DefaultValue = aws.Float64(value) - } - - return []*cloudwatchlogs.MetricTransformation{&transformation} -} - -func flattenCloudWatchLogMetricTransformations(ts []*cloudwatchlogs.MetricTransformation) []interface{} { - mts := make([]interface{}, 0) - m := make(map[string]interface{}) - - m["name"] = *ts[0].MetricName - m["namespace"] = *ts[0].MetricNamespace - m["value"] = *ts[0].MetricValue - - if ts[0].DefaultValue == nil { - m["default_value"] = "" - } else { - m["default_value"] = *ts[0].DefaultValue - } - - mts = append(mts, m) - - return mts -} - -func flattenBeanstalkAsg(list []*elasticbeanstalk.AutoScalingGroup) []string { - strs := make([]string, 0, len(list)) - for _, r := range list { - if r.Name != nil { - strs = append(strs, *r.Name) - } - } - return strs -} - -func flattenBeanstalkInstances(list []*elasticbeanstalk.Instance) []string { - strs := make([]string, 0, len(list)) - for _, r := range list { - if r.Id != nil { - strs = append(strs, *r.Id) - } - } - return strs -} - -func flattenBeanstalkLc(list []*elasticbeanstalk.LaunchConfiguration) []string { - strs := make([]string, 0, len(list)) - for _, r := range list { - if r.Name != nil { - strs = append(strs, *r.Name) - } - } - return strs -} - -func flattenBeanstalkElb(list []*elasticbeanstalk.LoadBalancer) []string { - strs := make([]string, 0, len(list)) - for _, r := range list { - if r.Name != nil { - strs = append(strs, *r.Name) - } - } - return strs -} - -func flattenBeanstalkSqs(list []*elasticbeanstalk.Queue) []string { - strs := make([]string, 0, len(list)) - for _, r := range list { - if r.URL != nil { - strs = append(strs, *r.URL) - } - } - return strs -} - -func flattenBeanstalkTrigger(list []*elasticbeanstalk.Trigger) []string { - strs := make([]string, 0, len(list)) - for _, r := range list { - if r.Name != nil { - strs = append(strs, *r.Name) - } - } - return strs -} - -// There are several parts of the AWS API that will sort lists of strings, -// causing diffs between resources that use lists. This avoids a bit of -// code duplication for pre-sorts that can be used for things like hash -// functions, etc. -func sortInterfaceSlice(in []interface{}) []interface{} { - a := []string{} - b := []interface{}{} - for _, v := range in { - a = append(a, v.(string)) - } - - sort.Strings(a) - - for _, v := range a { - b = append(b, v) - } - - return b -} - -// This function sorts List A to look like a list found in the tf file. -func sortListBasedonTFFile(in []string, d *schema.ResourceData) ([]string, error) { - listName := "layer_ids" - if attributeCount, ok := d.Get(listName + ".#").(int); ok { - for i := 0; i < attributeCount; i++ { - currAttributeId := d.Get(listName + "." + strconv.Itoa(i)) - for j := 0; j < len(in); j++ { - if currAttributeId == in[j] { - in[i], in[j] = in[j], in[i] - } - } - } - return in, nil - } - return in, fmt.Errorf("Could not find list: %s", listName) -} - -func flattenApiGatewayThrottleSettings(settings *apigateway.ThrottleSettings) []map[string]interface{} { - result := make([]map[string]interface{}, 0, 1) - - if settings != nil { - r := make(map[string]interface{}) - if settings.BurstLimit != nil { - r["burst_limit"] = *settings.BurstLimit - } - - if settings.RateLimit != nil { - r["rate_limit"] = *settings.RateLimit - } - - result = append(result, r) - } - - return result -} - -// TODO: refactor some of these helper functions and types in the terraform/helper packages - -// getStringPtr returns a *string version of the value taken from m, where m -// can be a map[string]interface{} or a *schema.ResourceData. If the key isn't -// present or is empty, getNilString returns nil. -func getStringPtr(m interface{}, key string) *string { - switch m := m.(type) { - case map[string]interface{}: - v := m[key] - - if v == nil { - return nil - } - - s := v.(string) - if s == "" { - return nil - } - - return &s - - case *schema.ResourceData: - if v, ok := m.GetOk(key); ok { - if v == nil || v.(string) == "" { - return nil - } - s := v.(string) - return &s - } - - default: - panic("unknown type in getStringPtr") - } - - return nil -} - -// a convenience wrapper type for the schema.Set map[string]interface{} -// Set operations only alter the underlying map if the value is not nil -type setMap map[string]interface{} - -// SetString sets m[key] = *value only if `value != nil` -func (s setMap) SetString(key string, value *string) { - if value == nil { - return - } - - s[key] = *value -} - -// SetStringMap sets key to value as a map[string]interface{}, stripping any nil -// values. The value parameter can be a map[string]interface{}, a -// map[string]*string, or a map[string]string. -func (s setMap) SetStringMap(key string, value interface{}) { - // because these methods are meant to be chained without intermediate - // checks for nil, we are likely to get interfaces with dynamic types but - // a nil value. - if reflect.ValueOf(value).IsNil() { - return - } - - m := make(map[string]interface{}) - - switch value := value.(type) { - case map[string]string: - for k, v := range value { - m[k] = v - } - case map[string]*string: - for k, v := range value { - if v == nil { - continue - } - m[k] = *v - } - case map[string]interface{}: - for k, v := range value { - if v == nil { - continue - } - - switch v := v.(type) { - case string: - m[k] = v - case *string: - if v != nil { - m[k] = *v - } - default: - panic(fmt.Sprintf("unknown type for SetString: %T", v)) - } - } - } - - // catch the case where the interface wasn't nil, but we had no non-nil values - if len(m) > 0 { - s[key] = m - } -} - -// Set assigns value to s[key] if value isn't nil -func (s setMap) Set(key string, value interface{}) { - if reflect.ValueOf(value).IsNil() { - return - } - - s[key] = value -} - -// Map returns the raw map type for a shorter type conversion -func (s setMap) Map() map[string]interface{} { - return map[string]interface{}(s) -} - -// MapList returns the map[string]interface{} as a single element in a slice to -// match the schema.Set data type used for structs. -func (s setMap) MapList() []map[string]interface{} { - return []map[string]interface{}{s.Map()} -} - -// Takes the result of flatmap.Expand for an array of policy attributes and -// returns ELB API compatible objects -func expandPolicyAttributes(configured []interface{}) ([]*elb.PolicyAttribute, error) { - attributes := make([]*elb.PolicyAttribute, 0, len(configured)) - - // Loop over our configured attributes and create - // an array of aws-sdk-go compatible objects - for _, lRaw := range configured { - data := lRaw.(map[string]interface{}) - - a := &elb.PolicyAttribute{ - AttributeName: aws.String(data["name"].(string)), - AttributeValue: aws.String(data["value"].(string)), - } - - attributes = append(attributes, a) - - } - - return attributes, nil -} - -// Flattens an array of PolicyAttributes into a []interface{} -func flattenPolicyAttributes(list []*elb.PolicyAttributeDescription) []interface{} { - attributes := []interface{}{} - for _, attrdef := range list { - attribute := map[string]string{ - "name": *attrdef.AttributeName, - "value": *attrdef.AttributeValue, - } - - attributes = append(attributes, attribute) - - } - - return attributes -} - -func expandConfigAccountAggregationSources(configured []interface{}) []*configservice.AccountAggregationSource { - var results []*configservice.AccountAggregationSource - for _, item := range configured { - detail := item.(map[string]interface{}) - source := configservice.AccountAggregationSource{ - AllAwsRegions: aws.Bool(detail["all_regions"].(bool)), - } - - if v, ok := detail["account_ids"]; ok { - accountIDs := v.([]interface{}) - if len(accountIDs) > 0 { - source.AccountIds = expandStringList(accountIDs) - } - } - - if v, ok := detail["regions"]; ok { - regions := v.([]interface{}) - if len(regions) > 0 { - source.AwsRegions = expandStringList(regions) - } - } - - results = append(results, &source) - } - return results -} - -func expandConfigOrganizationAggregationSource(configured map[string]interface{}) *configservice.OrganizationAggregationSource { - source := configservice.OrganizationAggregationSource{ - AllAwsRegions: aws.Bool(configured["all_regions"].(bool)), - RoleArn: aws.String(configured["role_arn"].(string)), - } - - if v, ok := configured["regions"]; ok { - regions := v.([]interface{}) - if len(regions) > 0 { - source.AwsRegions = expandStringList(regions) - } - } - - return &source -} - -func flattenConfigAccountAggregationSources(sources []*configservice.AccountAggregationSource) []interface{} { - var result []interface{} - - if len(sources) == 0 { - return result - } - - source := sources[0] - m := make(map[string]interface{}) - m["account_ids"] = flattenStringList(source.AccountIds) - m["all_regions"] = aws.BoolValue(source.AllAwsRegions) - m["regions"] = flattenStringList(source.AwsRegions) - result = append(result, m) - return result -} - -func flattenConfigOrganizationAggregationSource(source *configservice.OrganizationAggregationSource) []interface{} { - var result []interface{} - - if source == nil { - return result - } - - m := make(map[string]interface{}) - m["all_regions"] = aws.BoolValue(source.AllAwsRegions) - m["regions"] = flattenStringList(source.AwsRegions) - m["role_arn"] = aws.StringValue(source.RoleArn) - result = append(result, m) - return result -} - -func flattenConfigRuleSource(source *configservice.Source) []interface{} { - var result []interface{} - m := make(map[string]interface{}) - m["owner"] = *source.Owner - m["source_identifier"] = *source.SourceIdentifier - if len(source.SourceDetails) > 0 { - m["source_detail"] = schema.NewSet(configRuleSourceDetailsHash, flattenConfigRuleSourceDetails(source.SourceDetails)) - } - result = append(result, m) - return result -} - -func flattenConfigRuleSourceDetails(details []*configservice.SourceDetail) []interface{} { - var items []interface{} - for _, d := range details { - m := make(map[string]interface{}) - if d.MessageType != nil { - m["message_type"] = *d.MessageType - } - if d.EventSource != nil { - m["event_source"] = *d.EventSource - } - if d.MaximumExecutionFrequency != nil { - m["maximum_execution_frequency"] = *d.MaximumExecutionFrequency - } - - items = append(items, m) - } - - return items -} - -func expandConfigRuleSource(configured []interface{}) *configservice.Source { - cfg := configured[0].(map[string]interface{}) - source := configservice.Source{ - Owner: aws.String(cfg["owner"].(string)), - SourceIdentifier: aws.String(cfg["source_identifier"].(string)), - } - if details, ok := cfg["source_detail"]; ok { - source.SourceDetails = expandConfigRuleSourceDetails(details.(*schema.Set)) - } - return &source -} - -func expandConfigRuleSourceDetails(configured *schema.Set) []*configservice.SourceDetail { - var results []*configservice.SourceDetail - - for _, item := range configured.List() { - detail := item.(map[string]interface{}) - src := configservice.SourceDetail{} - - if msgType, ok := detail["message_type"].(string); ok && msgType != "" { - src.MessageType = aws.String(msgType) - } - if eventSource, ok := detail["event_source"].(string); ok && eventSource != "" { - src.EventSource = aws.String(eventSource) - } - if maxExecFreq, ok := detail["maximum_execution_frequency"].(string); ok && maxExecFreq != "" { - src.MaximumExecutionFrequency = aws.String(maxExecFreq) - } - - results = append(results, &src) - } - - return results -} - -func flattenConfigRuleScope(scope *configservice.Scope) []interface{} { - var items []interface{} - - m := make(map[string]interface{}) - if scope.ComplianceResourceId != nil { - m["compliance_resource_id"] = *scope.ComplianceResourceId - } - if scope.ComplianceResourceTypes != nil { - m["compliance_resource_types"] = schema.NewSet(schema.HashString, flattenStringList(scope.ComplianceResourceTypes)) - } - if scope.TagKey != nil { - m["tag_key"] = *scope.TagKey - } - if scope.TagValue != nil { - m["tag_value"] = *scope.TagValue - } - - items = append(items, m) - return items -} - -func expandConfigRuleScope(l []interface{}) *configservice.Scope { - if len(l) == 0 || l[0] == nil { - return nil - } - configured := l[0].(map[string]interface{}) - scope := &configservice.Scope{} - - if v, ok := configured["compliance_resource_id"].(string); ok && v != "" { - scope.ComplianceResourceId = aws.String(v) - } - if v, ok := configured["compliance_resource_types"]; ok { - l := v.(*schema.Set) - if l.Len() > 0 { - scope.ComplianceResourceTypes = expandStringList(l.List()) - } - } - if v, ok := configured["tag_key"].(string); ok && v != "" { - scope.TagKey = aws.String(v) - } - if v, ok := configured["tag_value"].(string); ok && v != "" { - scope.TagValue = aws.String(v) - } - - return scope -} - -// Takes a value containing YAML string and passes it through -// the YAML parser. Returns either a parsing -// error or original YAML string. -func checkYamlString(yamlString interface{}) (string, error) { - var y interface{} - - if yamlString == nil || yamlString.(string) == "" { - return "", nil - } - - s := yamlString.(string) - - err := yaml.Unmarshal([]byte(s), &y) - - return s, err -} - -func normalizeCloudFormationTemplate(templateString interface{}) (string, error) { - if looksLikeJsonString(templateString) { - return structure.NormalizeJsonString(templateString.(string)) - } - - return checkYamlString(templateString) -} - -func flattenApiGatewayUsageApiStages(s []*apigateway.ApiStage) []map[string]interface{} { - stages := make([]map[string]interface{}, 0) - - for _, bd := range s { - if bd.ApiId != nil && bd.Stage != nil { - stage := make(map[string]interface{}) - stage["api_id"] = *bd.ApiId - stage["stage"] = *bd.Stage - - stages = append(stages, stage) - } - } - - if len(stages) > 0 { - return stages - } - - return nil -} - -func flattenApiGatewayUsagePlanThrottling(s *apigateway.ThrottleSettings) []map[string]interface{} { - settings := make(map[string]interface{}) - - if s == nil { - return nil - } - - if s.BurstLimit != nil { - settings["burst_limit"] = *s.BurstLimit - } - - if s.RateLimit != nil { - settings["rate_limit"] = *s.RateLimit - } - - return []map[string]interface{}{settings} -} - -func flattenApiGatewayUsagePlanQuota(s *apigateway.QuotaSettings) []map[string]interface{} { - settings := make(map[string]interface{}) - - if s == nil { - return nil - } - - if s.Limit != nil { - settings["limit"] = *s.Limit - } - - if s.Offset != nil { - settings["offset"] = *s.Offset - } - - if s.Period != nil { - settings["period"] = *s.Period - } - - return []map[string]interface{}{settings} -} - -func buildApiGatewayInvokeURL(restApiId, region, stageName string) string { - return fmt.Sprintf("https://%s.execute-api.%s.amazonaws.com/%s", - restApiId, region, stageName) -} - -func expandCognitoSupportedLoginProviders(config map[string]interface{}) map[string]*string { - m := map[string]*string{} - for k, v := range config { - s := v.(string) - m[k] = &s - } - return m -} - -func flattenCognitoSupportedLoginProviders(config map[string]*string) map[string]string { - m := map[string]string{} - for k, v := range config { - m[k] = *v - } - return m -} - -func expandCognitoIdentityProviders(s *schema.Set) []*cognitoidentity.Provider { - ips := make([]*cognitoidentity.Provider, 0) - - for _, v := range s.List() { - s := v.(map[string]interface{}) - - ip := &cognitoidentity.Provider{} - - if sv, ok := s["client_id"].(string); ok { - ip.ClientId = aws.String(sv) - } - - if sv, ok := s["provider_name"].(string); ok { - ip.ProviderName = aws.String(sv) - } - - if sv, ok := s["server_side_token_check"].(bool); ok { - ip.ServerSideTokenCheck = aws.Bool(sv) - } - - ips = append(ips, ip) - } - - return ips -} - -func flattenCognitoIdentityProviders(ips []*cognitoidentity.Provider) []map[string]interface{} { - values := make([]map[string]interface{}, 0) - - for _, v := range ips { - ip := make(map[string]interface{}) - - if v == nil { - return nil - } - - if v.ClientId != nil { - ip["client_id"] = *v.ClientId - } - - if v.ProviderName != nil { - ip["provider_name"] = *v.ProviderName - } - - if v.ServerSideTokenCheck != nil { - ip["server_side_token_check"] = *v.ServerSideTokenCheck - } - - values = append(values, ip) - } - - return values -} - -func flattenCognitoUserPoolEmailConfiguration(s *cognitoidentityprovider.EmailConfigurationType) []map[string]interface{} { - m := make(map[string]interface{}) - - if s == nil { - return nil - } - - if s.ReplyToEmailAddress != nil { - m["reply_to_email_address"] = *s.ReplyToEmailAddress - } - - if s.SourceArn != nil { - m["source_arn"] = *s.SourceArn - } - - if len(m) > 0 { - return []map[string]interface{}{m} - } - - return []map[string]interface{}{} -} - -func expandCognitoUserPoolAdminCreateUserConfig(config map[string]interface{}) *cognitoidentityprovider.AdminCreateUserConfigType { - configs := &cognitoidentityprovider.AdminCreateUserConfigType{} - - if v, ok := config["allow_admin_create_user_only"]; ok { - configs.AllowAdminCreateUserOnly = aws.Bool(v.(bool)) - } - - if v, ok := config["invite_message_template"]; ok { - data := v.([]interface{}) - - if len(data) > 0 { - m, ok := data[0].(map[string]interface{}) - - if ok { - imt := &cognitoidentityprovider.MessageTemplateType{} - - if v, ok := m["email_message"]; ok { - imt.EmailMessage = aws.String(v.(string)) - } - - if v, ok := m["email_subject"]; ok { - imt.EmailSubject = aws.String(v.(string)) - } - - if v, ok := m["sms_message"]; ok { - imt.SMSMessage = aws.String(v.(string)) - } - - configs.InviteMessageTemplate = imt - } - } - } - - configs.UnusedAccountValidityDays = aws.Int64(int64(config["unused_account_validity_days"].(int))) - - return configs -} - -func flattenCognitoUserPoolAdminCreateUserConfig(s *cognitoidentityprovider.AdminCreateUserConfigType) []map[string]interface{} { - config := map[string]interface{}{} - - if s == nil { - return nil - } - - if s.AllowAdminCreateUserOnly != nil { - config["allow_admin_create_user_only"] = *s.AllowAdminCreateUserOnly - } - - if s.InviteMessageTemplate != nil { - subconfig := map[string]interface{}{} - - if s.InviteMessageTemplate.EmailMessage != nil { - subconfig["email_message"] = *s.InviteMessageTemplate.EmailMessage - } - - if s.InviteMessageTemplate.EmailSubject != nil { - subconfig["email_subject"] = *s.InviteMessageTemplate.EmailSubject - } - - if s.InviteMessageTemplate.SMSMessage != nil { - subconfig["sms_message"] = *s.InviteMessageTemplate.SMSMessage - } - - if len(subconfig) > 0 { - config["invite_message_template"] = []map[string]interface{}{subconfig} - } - } - - config["unused_account_validity_days"] = *s.UnusedAccountValidityDays - - return []map[string]interface{}{config} -} - -func expandCognitoUserPoolDeviceConfiguration(config map[string]interface{}) *cognitoidentityprovider.DeviceConfigurationType { - configs := &cognitoidentityprovider.DeviceConfigurationType{} - - if v, ok := config["challenge_required_on_new_device"]; ok { - configs.ChallengeRequiredOnNewDevice = aws.Bool(v.(bool)) - } - - if v, ok := config["device_only_remembered_on_user_prompt"]; ok { - configs.DeviceOnlyRememberedOnUserPrompt = aws.Bool(v.(bool)) - } - - return configs -} - -func flattenCognitoUserPoolDeviceConfiguration(s *cognitoidentityprovider.DeviceConfigurationType) []map[string]interface{} { - config := map[string]interface{}{} - - if s == nil { - return nil - } - - if s.ChallengeRequiredOnNewDevice != nil { - config["challenge_required_on_new_device"] = *s.ChallengeRequiredOnNewDevice - } - - if s.DeviceOnlyRememberedOnUserPrompt != nil { - config["device_only_remembered_on_user_prompt"] = *s.DeviceOnlyRememberedOnUserPrompt - } - - return []map[string]interface{}{config} -} - -func expandCognitoUserPoolLambdaConfig(config map[string]interface{}) *cognitoidentityprovider.LambdaConfigType { - configs := &cognitoidentityprovider.LambdaConfigType{} - - if v, ok := config["create_auth_challenge"]; ok && v.(string) != "" { - configs.CreateAuthChallenge = aws.String(v.(string)) - } - - if v, ok := config["custom_message"]; ok && v.(string) != "" { - configs.CustomMessage = aws.String(v.(string)) - } - - if v, ok := config["define_auth_challenge"]; ok && v.(string) != "" { - configs.DefineAuthChallenge = aws.String(v.(string)) - } - - if v, ok := config["post_authentication"]; ok && v.(string) != "" { - configs.PostAuthentication = aws.String(v.(string)) - } - - if v, ok := config["post_confirmation"]; ok && v.(string) != "" { - configs.PostConfirmation = aws.String(v.(string)) - } - - if v, ok := config["pre_authentication"]; ok && v.(string) != "" { - configs.PreAuthentication = aws.String(v.(string)) - } - - if v, ok := config["pre_sign_up"]; ok && v.(string) != "" { - configs.PreSignUp = aws.String(v.(string)) - } - - if v, ok := config["pre_token_generation"]; ok && v.(string) != "" { - configs.PreTokenGeneration = aws.String(v.(string)) - } - - if v, ok := config["user_migration"]; ok && v.(string) != "" { - configs.UserMigration = aws.String(v.(string)) - } - - if v, ok := config["verify_auth_challenge_response"]; ok && v.(string) != "" { - configs.VerifyAuthChallengeResponse = aws.String(v.(string)) - } - - return configs -} - -func flattenCognitoUserPoolLambdaConfig(s *cognitoidentityprovider.LambdaConfigType) []map[string]interface{} { - m := map[string]interface{}{} - - if s == nil { - return nil - } - - if s.CreateAuthChallenge != nil { - m["create_auth_challenge"] = *s.CreateAuthChallenge - } - - if s.CustomMessage != nil { - m["custom_message"] = *s.CustomMessage - } - - if s.DefineAuthChallenge != nil { - m["define_auth_challenge"] = *s.DefineAuthChallenge - } - - if s.PostAuthentication != nil { - m["post_authentication"] = *s.PostAuthentication - } - - if s.PostConfirmation != nil { - m["post_confirmation"] = *s.PostConfirmation - } - - if s.PreAuthentication != nil { - m["pre_authentication"] = *s.PreAuthentication - } - - if s.PreSignUp != nil { - m["pre_sign_up"] = *s.PreSignUp - } - - if s.PreTokenGeneration != nil { - m["pre_token_generation"] = *s.PreTokenGeneration - } - - if s.UserMigration != nil { - m["user_migration"] = *s.UserMigration - } - - if s.VerifyAuthChallengeResponse != nil { - m["verify_auth_challenge_response"] = *s.VerifyAuthChallengeResponse - } - - if len(m) > 0 { - return []map[string]interface{}{m} - } - - return []map[string]interface{}{} -} - -func expandCognitoUserPoolPasswordPolicy(config map[string]interface{}) *cognitoidentityprovider.PasswordPolicyType { - configs := &cognitoidentityprovider.PasswordPolicyType{} - - if v, ok := config["minimum_length"]; ok { - configs.MinimumLength = aws.Int64(int64(v.(int))) - } - - if v, ok := config["require_lowercase"]; ok { - configs.RequireLowercase = aws.Bool(v.(bool)) - } - - if v, ok := config["require_numbers"]; ok { - configs.RequireNumbers = aws.Bool(v.(bool)) - } - - if v, ok := config["require_symbols"]; ok { - configs.RequireSymbols = aws.Bool(v.(bool)) - } - - if v, ok := config["require_uppercase"]; ok { - configs.RequireUppercase = aws.Bool(v.(bool)) - } - - return configs -} - -func flattenIoTRuleCloudWatchAlarmActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.CloudwatchAlarm - if v != nil { - result["alarm_name"] = *v.AlarmName - result["role_arn"] = *v.RoleArn - result["state_reason"] = *v.StateReason - result["state_value"] = *v.StateValue - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleCloudWatchMetricActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.CloudwatchMetric - if v != nil { - result["metric_name"] = *v.MetricName - result["role_arn"] = *v.RoleArn - result["metric_namespace"] = *v.MetricNamespace - result["metric_unit"] = *v.MetricUnit - result["metric_value"] = *v.MetricValue - - if v.MetricTimestamp != nil { - result["metric_timestamp"] = *v.MetricTimestamp - } - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleDynamoDbActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.DynamoDB - if v != nil { - result["hash_key_field"] = *v.HashKeyField - result["hash_key_value"] = *v.HashKeyValue - result["range_key_field"] = *v.RangeKeyField - result["range_key_value"] = *v.RangeKeyValue - result["role_arn"] = *v.RoleArn - result["table_name"] = *v.TableName - - if v.HashKeyType != nil { - result["hash_key_type"] = *v.HashKeyType - } - - if v.PayloadField != nil { - result["payload_field"] = *v.PayloadField - } - - if v.RangeKeyType != nil { - result["range_key_type"] = *v.RangeKeyType - } - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleElasticSearchActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.Elasticsearch - if v != nil { - result["role_arn"] = *v.RoleArn - result["endpoint"] = *v.Endpoint - result["id"] = *v.Id - result["index"] = *v.Index - result["type"] = *v.Type - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleFirehoseActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.Firehose - if v != nil { - result["role_arn"] = aws.StringValue(v.RoleArn) - result["delivery_stream_name"] = aws.StringValue(v.DeliveryStreamName) - result["separator"] = aws.StringValue(v.Separator) - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleKinesisActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.Kinesis - if v != nil { - result["role_arn"] = *v.RoleArn - result["stream_name"] = *v.StreamName - - if v.PartitionKey != nil { - result["partition_key"] = *v.PartitionKey - } - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleLambdaActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.Lambda - if v != nil { - result["function_arn"] = *v.FunctionArn - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleRepublishActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.Republish - if v != nil { - result["role_arn"] = *v.RoleArn - result["topic"] = *v.Topic - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleS3Actions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.S3 - if v != nil { - result["role_arn"] = *v.RoleArn - result["bucket_name"] = *v.BucketName - result["key"] = *v.Key - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleSnsActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.Sns - if v != nil { - result["message_format"] = *v.MessageFormat - result["role_arn"] = *v.RoleArn - result["target_arn"] = *v.TargetArn - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleSqsActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.Sqs - if v != nil { - result["role_arn"] = aws.StringValue(v.RoleArn) - result["use_base64"] = aws.BoolValue(v.UseBase64) - result["queue_url"] = aws.StringValue(v.QueueUrl) - - results = append(results, result) - } - } - - return results -} - -func flattenCognitoUserPoolPasswordPolicy(s *cognitoidentityprovider.PasswordPolicyType) []map[string]interface{} { - m := map[string]interface{}{} - - if s == nil { - return nil - } - - if s.MinimumLength != nil { - m["minimum_length"] = *s.MinimumLength - } - - if s.RequireLowercase != nil { - m["require_lowercase"] = *s.RequireLowercase - } - - if s.RequireNumbers != nil { - m["require_numbers"] = *s.RequireNumbers - } - - if s.RequireSymbols != nil { - m["require_symbols"] = *s.RequireSymbols - } - - if s.RequireUppercase != nil { - m["require_uppercase"] = *s.RequireUppercase - } - - if len(m) > 0 { - return []map[string]interface{}{m} - } - - return []map[string]interface{}{} -} - -func expandCognitoResourceServerScope(inputs []interface{}) []*cognitoidentityprovider.ResourceServerScopeType { - configs := make([]*cognitoidentityprovider.ResourceServerScopeType, len(inputs)) - for i, input := range inputs { - param := input.(map[string]interface{}) - config := &cognitoidentityprovider.ResourceServerScopeType{} - - if v, ok := param["scope_description"]; ok { - config.ScopeDescription = aws.String(v.(string)) - } - - if v, ok := param["scope_name"]; ok { - config.ScopeName = aws.String(v.(string)) - } - - configs[i] = config - } - - return configs -} - -func flattenCognitoResourceServerScope(inputs []*cognitoidentityprovider.ResourceServerScopeType) []map[string]interface{} { - values := make([]map[string]interface{}, 0) - - for _, input := range inputs { - if input == nil { - continue - } - var value = map[string]interface{}{ - "scope_name": aws.StringValue(input.ScopeName), - "scope_description": aws.StringValue(input.ScopeDescription), - } - values = append(values, value) - } - return values -} - -func expandCognitoUserPoolSchema(inputs []interface{}) []*cognitoidentityprovider.SchemaAttributeType { - configs := make([]*cognitoidentityprovider.SchemaAttributeType, len(inputs)) - - for i, input := range inputs { - param := input.(map[string]interface{}) - config := &cognitoidentityprovider.SchemaAttributeType{} - - if v, ok := param["attribute_data_type"]; ok { - config.AttributeDataType = aws.String(v.(string)) - } - - if v, ok := param["developer_only_attribute"]; ok { - config.DeveloperOnlyAttribute = aws.Bool(v.(bool)) - } - - if v, ok := param["mutable"]; ok { - config.Mutable = aws.Bool(v.(bool)) - } - - if v, ok := param["name"]; ok { - config.Name = aws.String(v.(string)) - } - - if v, ok := param["required"]; ok { - config.Required = aws.Bool(v.(bool)) - } - - if v, ok := param["number_attribute_constraints"]; ok { - data := v.([]interface{}) - - if len(data) > 0 { - m, ok := data[0].(map[string]interface{}) - if ok { - numberAttributeConstraintsType := &cognitoidentityprovider.NumberAttributeConstraintsType{} - - if v, ok := m["min_value"]; ok && v.(string) != "" { - numberAttributeConstraintsType.MinValue = aws.String(v.(string)) - } - - if v, ok := m["max_value"]; ok && v.(string) != "" { - numberAttributeConstraintsType.MaxValue = aws.String(v.(string)) - } - - config.NumberAttributeConstraints = numberAttributeConstraintsType - } - } - } - - if v, ok := param["string_attribute_constraints"]; ok { - data := v.([]interface{}) - - if len(data) > 0 { - m, _ := data[0].(map[string]interface{}) - if ok { - stringAttributeConstraintsType := &cognitoidentityprovider.StringAttributeConstraintsType{} - - if l, ok := m["min_length"]; ok && l.(string) != "" { - stringAttributeConstraintsType.MinLength = aws.String(l.(string)) - } - - if l, ok := m["max_length"]; ok && l.(string) != "" { - stringAttributeConstraintsType.MaxLength = aws.String(l.(string)) - } - - config.StringAttributeConstraints = stringAttributeConstraintsType - } - } - } - - configs[i] = config - } - - return configs -} - -func cognitoUserPoolSchemaAttributeMatchesStandardAttribute(input *cognitoidentityprovider.SchemaAttributeType) bool { - if input == nil { - return false - } - - // All standard attributes always returned by API - // https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#cognito-user-pools-standard-attributes - var standardAttributes = []cognitoidentityprovider.SchemaAttributeType{ - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("address"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("birthdate"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("10"), - MinLength: aws.String("10"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("email"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeBoolean), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("email_verified"), - Required: aws.Bool(false), - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("gender"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("given_name"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("family_name"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("locale"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("middle_name"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("name"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("nickname"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("phone_number"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeBoolean), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("phone_number_verified"), - Required: aws.Bool(false), - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("picture"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("preferred_username"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("profile"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(false), - Name: aws.String("sub"), - Required: aws.Bool(true), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("1"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeNumber), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("updated_at"), - NumberAttributeConstraints: &cognitoidentityprovider.NumberAttributeConstraintsType{ - MinValue: aws.String("0"), - }, - Required: aws.Bool(false), - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("website"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - { - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("zoneinfo"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ - MaxLength: aws.String("2048"), - MinLength: aws.String("0"), - }, - }, - } - for _, standardAttribute := range standardAttributes { - if reflect.DeepEqual(*input, standardAttribute) { - return true - } - } - return false -} - -func flattenCognitoUserPoolSchema(configuredAttributes, inputs []*cognitoidentityprovider.SchemaAttributeType) []map[string]interface{} { - values := make([]map[string]interface{}, 0) - - for _, input := range inputs { - if input == nil { - continue - } - - // The API returns all standard attributes - // https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#cognito-user-pools-standard-attributes - // Ignore setting them in state if they are unconfigured to prevent a huge and unexpected diff - configured := false - - for _, configuredAttribute := range configuredAttributes { - if reflect.DeepEqual(input, configuredAttribute) { - configured = true - } - } - - if !configured { - if cognitoUserPoolSchemaAttributeMatchesStandardAttribute(input) { - continue - } - // When adding a Cognito Identity Provider, the API will automatically add an "identities" attribute - identitiesAttribute := cognitoidentityprovider.SchemaAttributeType{ - AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), - DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(true), - Name: aws.String("identities"), - Required: aws.Bool(false), - StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{}, - } - if reflect.DeepEqual(*input, identitiesAttribute) { - continue - } - } - - var value = map[string]interface{}{ - "attribute_data_type": aws.StringValue(input.AttributeDataType), - "developer_only_attribute": aws.BoolValue(input.DeveloperOnlyAttribute), - "mutable": aws.BoolValue(input.Mutable), - "name": strings.TrimPrefix(strings.TrimPrefix(aws.StringValue(input.Name), "dev:"), "custom:"), - "required": aws.BoolValue(input.Required), - } - - if input.NumberAttributeConstraints != nil { - subvalue := make(map[string]interface{}) - - if input.NumberAttributeConstraints.MinValue != nil { - subvalue["min_value"] = aws.StringValue(input.NumberAttributeConstraints.MinValue) - } - - if input.NumberAttributeConstraints.MaxValue != nil { - subvalue["max_value"] = aws.StringValue(input.NumberAttributeConstraints.MaxValue) - } - - value["number_attribute_constraints"] = []map[string]interface{}{subvalue} - } - - if input.StringAttributeConstraints != nil { - subvalue := make(map[string]interface{}) - - if input.StringAttributeConstraints.MinLength != nil { - subvalue["min_length"] = aws.StringValue(input.StringAttributeConstraints.MinLength) - } - - if input.StringAttributeConstraints.MaxLength != nil { - subvalue["max_length"] = aws.StringValue(input.StringAttributeConstraints.MaxLength) - } - - value["string_attribute_constraints"] = []map[string]interface{}{subvalue} - } - - values = append(values, value) - } - - return values -} - -func expandCognitoUserPoolSmsConfiguration(config map[string]interface{}) *cognitoidentityprovider.SmsConfigurationType { - smsConfigurationType := &cognitoidentityprovider.SmsConfigurationType{ - SnsCallerArn: aws.String(config["sns_caller_arn"].(string)), - } - - if v, ok := config["external_id"]; ok && v.(string) != "" { - smsConfigurationType.ExternalId = aws.String(v.(string)) - } - - return smsConfigurationType -} - -func flattenCognitoUserPoolSmsConfiguration(s *cognitoidentityprovider.SmsConfigurationType) []map[string]interface{} { - m := map[string]interface{}{} - - if s == nil { - return nil - } - - if s.ExternalId != nil { - m["external_id"] = *s.ExternalId - } - m["sns_caller_arn"] = *s.SnsCallerArn - - return []map[string]interface{}{m} -} - -func expandCognitoUserPoolVerificationMessageTemplate(config map[string]interface{}) *cognitoidentityprovider.VerificationMessageTemplateType { - verificationMessageTemplateType := &cognitoidentityprovider.VerificationMessageTemplateType{} - - if v, ok := config["default_email_option"]; ok && v.(string) != "" { - verificationMessageTemplateType.DefaultEmailOption = aws.String(v.(string)) - } - - if v, ok := config["email_message"]; ok && v.(string) != "" { - verificationMessageTemplateType.EmailMessage = aws.String(v.(string)) - } - - if v, ok := config["email_message_by_link"]; ok && v.(string) != "" { - verificationMessageTemplateType.EmailMessageByLink = aws.String(v.(string)) - } - - if v, ok := config["email_subject"]; ok && v.(string) != "" { - verificationMessageTemplateType.EmailSubject = aws.String(v.(string)) - } - - if v, ok := config["email_subject_by_link"]; ok && v.(string) != "" { - verificationMessageTemplateType.EmailSubjectByLink = aws.String(v.(string)) - } - - if v, ok := config["sms_message"]; ok && v.(string) != "" { - verificationMessageTemplateType.SmsMessage = aws.String(v.(string)) - } - - return verificationMessageTemplateType -} - -func flattenCognitoUserPoolVerificationMessageTemplate(s *cognitoidentityprovider.VerificationMessageTemplateType) []map[string]interface{} { - m := map[string]interface{}{} - - if s == nil { - return nil - } - - if s.DefaultEmailOption != nil { - m["default_email_option"] = *s.DefaultEmailOption - } - - if s.EmailMessage != nil { - m["email_message"] = *s.EmailMessage - } - - if s.EmailMessageByLink != nil { - m["email_message_by_link"] = *s.EmailMessageByLink - } - - if s.EmailSubject != nil { - m["email_subject"] = *s.EmailSubject - } - - if s.EmailSubjectByLink != nil { - m["email_subject_by_link"] = *s.EmailSubjectByLink - } - - if s.SmsMessage != nil { - m["sms_message"] = *s.SmsMessage - } - - if len(m) > 0 { - return []map[string]interface{}{m} - } - - return []map[string]interface{}{} -} - -func sliceContainsMap(l []interface{}, m map[string]interface{}) (int, bool) { - for i, t := range l { - if reflect.DeepEqual(m, t.(map[string]interface{})) { - return i, true - } - } - - return -1, false -} - -func expandAwsSsmTargets(in []interface{}) []*ssm.Target { - targets := make([]*ssm.Target, 0) - - for _, tConfig := range in { - config := tConfig.(map[string]interface{}) - - target := &ssm.Target{ - Key: aws.String(config["key"].(string)), - Values: expandStringList(config["values"].([]interface{})), - } - - targets = append(targets, target) - } - - return targets -} - -func flattenAwsSsmTargets(targets []*ssm.Target) []map[string]interface{} { - if len(targets) == 0 { - return nil - } - - result := make([]map[string]interface{}, 0, len(targets)) - for _, target := range targets { - t := make(map[string]interface{}, 1) - t["key"] = *target.Key - t["values"] = flattenStringList(target.Values) - - result = append(result, t) - } - - return result -} - -func expandFieldToMatch(d map[string]interface{}) *waf.FieldToMatch { - ftm := &waf.FieldToMatch{ - Type: aws.String(d["type"].(string)), - } - if data, ok := d["data"].(string); ok && data != "" { - ftm.Data = aws.String(data) - } - return ftm -} - -func flattenFieldToMatch(fm *waf.FieldToMatch) []interface{} { - m := make(map[string]interface{}) - if fm.Data != nil { - m["data"] = *fm.Data - } - if fm.Type != nil { - m["type"] = *fm.Type - } - return []interface{}{m} -} - -func diffWafWebAclRules(oldR, newR []interface{}) []*waf.WebACLUpdate { - updates := make([]*waf.WebACLUpdate, 0) - - for _, or := range oldR { - aclRule := or.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newR, aclRule); contains { - newR = append(newR[:idx], newR[idx+1:]...) - continue - } - updates = append(updates, expandWafWebAclUpdate(waf.ChangeActionDelete, aclRule)) - } - - for _, nr := range newR { - aclRule := nr.(map[string]interface{}) - updates = append(updates, expandWafWebAclUpdate(waf.ChangeActionInsert, aclRule)) - } - return updates -} - -func expandWafWebAclUpdate(updateAction string, aclRule map[string]interface{}) *waf.WebACLUpdate { - var rule *waf.ActivatedRule - - switch aclRule["type"].(string) { - case waf.WafRuleTypeGroup: - rule = &waf.ActivatedRule{ - OverrideAction: expandWafOverrideAction(aclRule["override_action"].([]interface{})), - Priority: aws.Int64(int64(aclRule["priority"].(int))), - RuleId: aws.String(aclRule["rule_id"].(string)), - Type: aws.String(aclRule["type"].(string)), - } - default: - rule = &waf.ActivatedRule{ - Action: expandWafAction(aclRule["action"].([]interface{})), - Priority: aws.Int64(int64(aclRule["priority"].(int))), - RuleId: aws.String(aclRule["rule_id"].(string)), - Type: aws.String(aclRule["type"].(string)), - } - } - - update := &waf.WebACLUpdate{ - Action: aws.String(updateAction), - ActivatedRule: rule, - } - - return update -} - -func expandWafAction(l []interface{}) *waf.WafAction { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - return &waf.WafAction{ - Type: aws.String(m["type"].(string)), - } -} - -func expandWafOverrideAction(l []interface{}) *waf.WafOverrideAction { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - return &waf.WafOverrideAction{ - Type: aws.String(m["type"].(string)), - } -} - -func flattenWafAction(n *waf.WafAction) []map[string]interface{} { - if n == nil { - return nil - } - - m := setMap(make(map[string]interface{})) - - m.SetString("type", n.Type) - return m.MapList() -} - -func flattenWafWebAclRules(ts []*waf.ActivatedRule) []map[string]interface{} { - out := make([]map[string]interface{}, len(ts)) - for i, r := range ts { - m := make(map[string]interface{}) - - switch aws.StringValue(r.Type) { - case waf.WafRuleTypeGroup: - actionMap := map[string]interface{}{ - "type": aws.StringValue(r.OverrideAction.Type), - } - m["override_action"] = []map[string]interface{}{actionMap} - default: - actionMap := map[string]interface{}{ - "type": aws.StringValue(r.Action.Type), - } - m["action"] = []map[string]interface{}{actionMap} - } - - m["priority"] = int(aws.Int64Value(r.Priority)) - m["rule_id"] = aws.StringValue(r.RuleId) - m["type"] = aws.StringValue(r.Type) - out[i] = m - } - return out -} - -func flattenWorkLinkNetworkConfigResponse(c *worklink.DescribeCompanyNetworkConfigurationOutput) []map[string]interface{} { - config := make(map[string]interface{}) - - if c == nil { - return nil - } - - if len(c.SubnetIds) == 0 && len(c.SecurityGroupIds) == 0 && aws.StringValue(c.VpcId) == "" { - return nil - } - - config["subnet_ids"] = schema.NewSet(schema.HashString, flattenStringList(c.SubnetIds)) - config["security_group_ids"] = schema.NewSet(schema.HashString, flattenStringList(c.SecurityGroupIds)) - config["vpc_id"] = aws.StringValue(c.VpcId) - - return []map[string]interface{}{config} -} - -func flattenWorkLinkIdentityProviderConfigResponse(c *worklink.DescribeIdentityProviderConfigurationOutput) []map[string]interface{} { - config := make(map[string]interface{}) - - if c.IdentityProviderType == nil && c.IdentityProviderSamlMetadata == nil { - return nil - } - - if c.IdentityProviderType != nil { - config["type"] = aws.StringValue(c.IdentityProviderType) - } - if c.IdentityProviderSamlMetadata != nil { - config["saml_metadata"] = aws.StringValue(c.IdentityProviderSamlMetadata) - } - - return []map[string]interface{}{config} -} - -// escapeJsonPointer escapes string per RFC 6901 -// so it can be used as path in JSON patch operations -func escapeJsonPointer(path string) string { - path = strings.Replace(path, "~", "~0", -1) - path = strings.Replace(path, "/", "~1", -1) - return path -} - -// Like ec2.GroupIdentifier but with additional rule description. -type GroupIdentifier struct { - // The ID of the security group. - GroupId *string - - // The name of the security group. - GroupName *string - - Description *string -} - -func expandCognitoIdentityPoolRoles(config map[string]interface{}) map[string]*string { - m := map[string]*string{} - for k, v := range config { - s := v.(string) - m[k] = &s - } - return m -} - -func flattenCognitoIdentityPoolRoles(config map[string]*string) map[string]string { - m := map[string]string{} - for k, v := range config { - m[k] = *v - } - return m -} - -func expandCognitoIdentityPoolRoleMappingsAttachment(rms []interface{}) map[string]*cognitoidentity.RoleMapping { - values := make(map[string]*cognitoidentity.RoleMapping) - - if len(rms) == 0 { - return values - } - - for _, v := range rms { - rm := v.(map[string]interface{}) - key := rm["identity_provider"].(string) - - roleMapping := &cognitoidentity.RoleMapping{ - Type: aws.String(rm["type"].(string)), - } - - if sv, ok := rm["ambiguous_role_resolution"].(string); ok { - roleMapping.AmbiguousRoleResolution = aws.String(sv) - } - - if mr, ok := rm["mapping_rule"].([]interface{}); ok && len(mr) > 0 { - rct := &cognitoidentity.RulesConfigurationType{} - mappingRules := make([]*cognitoidentity.MappingRule, 0) - - for _, r := range mr { - rule := r.(map[string]interface{}) - mr := &cognitoidentity.MappingRule{ - Claim: aws.String(rule["claim"].(string)), - MatchType: aws.String(rule["match_type"].(string)), - RoleARN: aws.String(rule["role_arn"].(string)), - Value: aws.String(rule["value"].(string)), - } - - mappingRules = append(mappingRules, mr) - } - - rct.Rules = mappingRules - roleMapping.RulesConfiguration = rct - } - - values[key] = roleMapping - } - - return values -} - -func flattenCognitoIdentityPoolRoleMappingsAttachment(rms map[string]*cognitoidentity.RoleMapping) []map[string]interface{} { - roleMappings := make([]map[string]interface{}, 0) - - if rms == nil { - return roleMappings - } - - for k, v := range rms { - m := make(map[string]interface{}) - - if v == nil { - return nil - } - - if v.Type != nil { - m["type"] = *v.Type - } - - if v.AmbiguousRoleResolution != nil { - m["ambiguous_role_resolution"] = *v.AmbiguousRoleResolution - } - - if v.RulesConfiguration != nil && v.RulesConfiguration.Rules != nil { - m["mapping_rule"] = flattenCognitoIdentityPoolRolesAttachmentMappingRules(v.RulesConfiguration.Rules) - } - - m["identity_provider"] = k - roleMappings = append(roleMappings, m) - } - - return roleMappings -} - -func flattenCognitoIdentityPoolRolesAttachmentMappingRules(d []*cognitoidentity.MappingRule) []interface{} { - rules := make([]interface{}, 0) - - for _, rule := range d { - r := make(map[string]interface{}) - r["claim"] = *rule.Claim - r["match_type"] = *rule.MatchType - r["role_arn"] = *rule.RoleARN - r["value"] = *rule.Value - - rules = append(rules, r) - } - - return rules -} - -func flattenRedshiftLogging(ls *redshift.LoggingStatus) []interface{} { - if ls == nil { - return []interface{}{} - } - - cfg := make(map[string]interface{}) - cfg["enabled"] = *ls.LoggingEnabled - if ls.BucketName != nil { - cfg["bucket_name"] = *ls.BucketName - } - if ls.S3KeyPrefix != nil { - cfg["s3_key_prefix"] = *ls.S3KeyPrefix - } - return []interface{}{cfg} -} - -func flattenRedshiftSnapshotCopy(scs *redshift.ClusterSnapshotCopyStatus) []interface{} { - if scs == nil { - return []interface{}{} - } - - cfg := make(map[string]interface{}) - if scs.DestinationRegion != nil { - cfg["destination_region"] = *scs.DestinationRegion - } - if scs.RetentionPeriod != nil { - cfg["retention_period"] = *scs.RetentionPeriod - } - if scs.SnapshotCopyGrantName != nil { - cfg["grant_name"] = *scs.SnapshotCopyGrantName - } - - return []interface{}{cfg} -} - -// cannonicalXML reads XML in a string and re-writes it canonically, used for -// comparing XML for logical equivalency -func canonicalXML(s string) (string, error) { - doc := etree.NewDocument() - doc.WriteSettings.CanonicalEndTags = true - if err := doc.ReadFromString(s); err != nil { - return "", err - } - - rawString, err := doc.WriteToString() - if err != nil { - return "", err - } - - re := regexp.MustCompile(`\s`) - results := re.ReplaceAllString(rawString, "") - return results, nil -} - -func expandMqUsers(cfg []interface{}) []*mq.User { - users := make([]*mq.User, len(cfg)) - for i, m := range cfg { - u := m.(map[string]interface{}) - user := mq.User{ - Username: aws.String(u["username"].(string)), - Password: aws.String(u["password"].(string)), - } - if v, ok := u["console_access"]; ok { - user.ConsoleAccess = aws.Bool(v.(bool)) - } - if v, ok := u["groups"]; ok { - user.Groups = expandStringList(v.(*schema.Set).List()) - } - users[i] = &user - } - return users -} - -// We use cfgdUsers to get & set the password -func flattenMqUsers(users []*mq.User, cfgUsers []interface{}) *schema.Set { - existingPairs := make(map[string]string) - for _, u := range cfgUsers { - user := u.(map[string]interface{}) - username := user["username"].(string) - existingPairs[username] = user["password"].(string) - } - - out := make([]interface{}, 0) - for _, u := range users { - m := map[string]interface{}{ - "username": *u.Username, - } - password := "" - if p, ok := existingPairs[*u.Username]; ok { - password = p - } - if password != "" { - m["password"] = password - } - if u.ConsoleAccess != nil { - m["console_access"] = *u.ConsoleAccess - } - if len(u.Groups) > 0 { - m["groups"] = schema.NewSet(schema.HashString, flattenStringList(u.Groups)) - } - out = append(out, m) - } - return schema.NewSet(resourceAwsMqUserHash, out) -} - -func expandMqWeeklyStartTime(cfg []interface{}) *mq.WeeklyStartTime { - if len(cfg) < 1 { - return nil - } - - m := cfg[0].(map[string]interface{}) - return &mq.WeeklyStartTime{ - DayOfWeek: aws.String(m["day_of_week"].(string)), - TimeOfDay: aws.String(m["time_of_day"].(string)), - TimeZone: aws.String(m["time_zone"].(string)), - } -} - -func flattenMqWeeklyStartTime(wst *mq.WeeklyStartTime) []interface{} { - if wst == nil { - return []interface{}{} - } - m := make(map[string]interface{}) - if wst.DayOfWeek != nil { - m["day_of_week"] = *wst.DayOfWeek - } - if wst.TimeOfDay != nil { - m["time_of_day"] = *wst.TimeOfDay - } - if wst.TimeZone != nil { - m["time_zone"] = *wst.TimeZone - } - return []interface{}{m} -} - -func expandMqConfigurationId(cfg []interface{}) *mq.ConfigurationId { - if len(cfg) < 1 { - return nil - } - - m := cfg[0].(map[string]interface{}) - out := mq.ConfigurationId{ - Id: aws.String(m["id"].(string)), - } - if v, ok := m["revision"].(int); ok && v > 0 { - out.Revision = aws.Int64(int64(v)) - } - - return &out -} - -func flattenMqConfigurationId(cid *mq.ConfigurationId) []interface{} { - if cid == nil { - return []interface{}{} - } - m := make(map[string]interface{}) - if cid.Id != nil { - m["id"] = *cid.Id - } - if cid.Revision != nil { - m["revision"] = *cid.Revision - } - return []interface{}{m} -} - -func flattenMqBrokerInstances(instances []*mq.BrokerInstance) []interface{} { - if len(instances) == 0 { - return []interface{}{} - } - l := make([]interface{}, len(instances)) - for i, instance := range instances { - m := make(map[string]interface{}) - if instance.ConsoleURL != nil { - m["console_url"] = *instance.ConsoleURL - } - if len(instance.Endpoints) > 0 { - m["endpoints"] = aws.StringValueSlice(instance.Endpoints) - } - if instance.IpAddress != nil { - m["ip_address"] = *instance.IpAddress - } - l[i] = m - } - - return l -} - -func flattenMqLogs(logs *mq.LogsSummary) []interface{} { - if logs == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "general": aws.BoolValue(logs.General), - "audit": aws.BoolValue(logs.Audit), - } - - return []interface{}{m} -} - -func expandMqLogs(l []interface{}) *mq.Logs { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - logs := &mq.Logs{ - Audit: aws.Bool(m["audit"].(bool)), - General: aws.Bool(m["general"].(bool)), - } - - return logs -} - -func flattenResourceLifecycleConfig(rlc *elasticbeanstalk.ApplicationResourceLifecycleConfig) []map[string]interface{} { - result := make([]map[string]interface{}, 0, 1) - - anything_enabled := false - appversion_lifecycle := make(map[string]interface{}) - - if rlc.ServiceRole != nil { - appversion_lifecycle["service_role"] = *rlc.ServiceRole - } - - if vlc := rlc.VersionLifecycleConfig; vlc != nil { - if mar := vlc.MaxAgeRule; mar != nil && *mar.Enabled { - anything_enabled = true - appversion_lifecycle["max_age_in_days"] = *mar.MaxAgeInDays - appversion_lifecycle["delete_source_from_s3"] = *mar.DeleteSourceFromS3 - } - if mcr := vlc.MaxCountRule; mcr != nil && *mcr.Enabled { - anything_enabled = true - appversion_lifecycle["max_count"] = *mcr.MaxCount - appversion_lifecycle["delete_source_from_s3"] = *mcr.DeleteSourceFromS3 - } - } - - if anything_enabled { - result = append(result, appversion_lifecycle) - } - - return result -} - -func diffDynamoDbGSI(oldGsi, newGsi []interface{}, billingMode string) (ops []*dynamodb.GlobalSecondaryIndexUpdate, e error) { - // Transform slices into maps - oldGsis := make(map[string]interface{}) - for _, gsidata := range oldGsi { - m := gsidata.(map[string]interface{}) - oldGsis[m["name"].(string)] = m - } - newGsis := make(map[string]interface{}) - for _, gsidata := range newGsi { - m := gsidata.(map[string]interface{}) - // validate throughput input early, to avoid unnecessary processing - if e = validateDynamoDbProvisionedThroughput(m, billingMode); e != nil { - return - } - newGsis[m["name"].(string)] = m - } - - for _, data := range newGsi { - newMap := data.(map[string]interface{}) - newName := newMap["name"].(string) - - if _, exists := oldGsis[newName]; !exists { - m := data.(map[string]interface{}) - idxName := m["name"].(string) - - ops = append(ops, &dynamodb.GlobalSecondaryIndexUpdate{ - Create: &dynamodb.CreateGlobalSecondaryIndexAction{ - IndexName: aws.String(idxName), - KeySchema: expandDynamoDbKeySchema(m), - ProvisionedThroughput: expandDynamoDbProvisionedThroughput(m, billingMode), - Projection: expandDynamoDbProjection(m), - }, - }) - } - } - - for _, data := range oldGsi { - oldMap := data.(map[string]interface{}) - oldName := oldMap["name"].(string) - - newData, exists := newGsis[oldName] - if exists { - newMap := newData.(map[string]interface{}) - idxName := newMap["name"].(string) - - oldWriteCapacity, oldReadCapacity := oldMap["write_capacity"].(int), oldMap["read_capacity"].(int) - newWriteCapacity, newReadCapacity := newMap["write_capacity"].(int), newMap["read_capacity"].(int) - capacityChanged := (oldWriteCapacity != newWriteCapacity || oldReadCapacity != newReadCapacity) - - oldAttributes, err := stripCapacityAttributes(oldMap) - if err != nil { - e = err - return - } - newAttributes, err := stripCapacityAttributes(newMap) - if err != nil { - e = err - return - } - otherAttributesChanged := !reflect.DeepEqual(oldAttributes, newAttributes) - - if capacityChanged && !otherAttributesChanged { - update := &dynamodb.GlobalSecondaryIndexUpdate{ - Update: &dynamodb.UpdateGlobalSecondaryIndexAction{ - IndexName: aws.String(idxName), - ProvisionedThroughput: expandDynamoDbProvisionedThroughput(newMap, billingMode), - }, - } - ops = append(ops, update) - } else if otherAttributesChanged { - // Other attributes cannot be updated - ops = append(ops, &dynamodb.GlobalSecondaryIndexUpdate{ - Delete: &dynamodb.DeleteGlobalSecondaryIndexAction{ - IndexName: aws.String(idxName), - }, - }) - - ops = append(ops, &dynamodb.GlobalSecondaryIndexUpdate{ - Create: &dynamodb.CreateGlobalSecondaryIndexAction{ - IndexName: aws.String(idxName), - KeySchema: expandDynamoDbKeySchema(newMap), - ProvisionedThroughput: expandDynamoDbProvisionedThroughput(newMap, billingMode), - Projection: expandDynamoDbProjection(newMap), - }, - }) - } - } else { - idxName := oldName - ops = append(ops, &dynamodb.GlobalSecondaryIndexUpdate{ - Delete: &dynamodb.DeleteGlobalSecondaryIndexAction{ - IndexName: aws.String(idxName), - }, - }) - } - } - return -} - -func stripCapacityAttributes(in map[string]interface{}) (map[string]interface{}, error) { - mapCopy, err := copystructure.Copy(in) - if err != nil { - return nil, err - } - - m := mapCopy.(map[string]interface{}) - - delete(m, "write_capacity") - delete(m, "read_capacity") - - return m, nil -} - -// Expanders + flatteners - -func flattenDynamoDbTtl(ttlDesc *dynamodb.TimeToLiveDescription) []interface{} { - m := map[string]interface{}{} - if ttlDesc.AttributeName != nil { - m["attribute_name"] = *ttlDesc.AttributeName - if ttlDesc.TimeToLiveStatus != nil { - m["enabled"] = (*ttlDesc.TimeToLiveStatus == dynamodb.TimeToLiveStatusEnabled) - } - } - if len(m) > 0 { - return []interface{}{m} - } - - return []interface{}{} -} - -func flattenDynamoDbPitr(pitrDesc *dynamodb.DescribeContinuousBackupsOutput) []interface{} { - m := map[string]interface{}{ - "enabled": false, - } - - if pitrDesc == nil { - return []interface{}{m} - } - - if pitrDesc.ContinuousBackupsDescription != nil { - pitr := pitrDesc.ContinuousBackupsDescription.PointInTimeRecoveryDescription - if pitr != nil { - m["enabled"] = (*pitr.PointInTimeRecoveryStatus == dynamodb.PointInTimeRecoveryStatusEnabled) - } - } - - return []interface{}{m} -} - -func flattenAwsDynamoDbTableResource(d *schema.ResourceData, table *dynamodb.TableDescription) error { - d.Set("billing_mode", dynamodb.BillingModeProvisioned) - if table.BillingModeSummary != nil { - d.Set("billing_mode", table.BillingModeSummary.BillingMode) - } - - d.Set("write_capacity", table.ProvisionedThroughput.WriteCapacityUnits) - d.Set("read_capacity", table.ProvisionedThroughput.ReadCapacityUnits) - - attributes := []interface{}{} - for _, attrdef := range table.AttributeDefinitions { - attribute := map[string]string{ - "name": *attrdef.AttributeName, - "type": *attrdef.AttributeType, - } - attributes = append(attributes, attribute) - } - - d.Set("attribute", attributes) - d.Set("name", table.TableName) - - for _, attribute := range table.KeySchema { - if *attribute.KeyType == dynamodb.KeyTypeHash { - d.Set("hash_key", attribute.AttributeName) - } - - if *attribute.KeyType == dynamodb.KeyTypeRange { - d.Set("range_key", attribute.AttributeName) - } - } - - lsiList := make([]map[string]interface{}, 0, len(table.LocalSecondaryIndexes)) - for _, lsiObject := range table.LocalSecondaryIndexes { - lsi := map[string]interface{}{ - "name": *lsiObject.IndexName, - "projection_type": *lsiObject.Projection.ProjectionType, - } - - for _, attribute := range lsiObject.KeySchema { - - if *attribute.KeyType == dynamodb.KeyTypeRange { - lsi["range_key"] = *attribute.AttributeName - } - } - nkaList := make([]string, len(lsiObject.Projection.NonKeyAttributes)) - for _, nka := range lsiObject.Projection.NonKeyAttributes { - nkaList = append(nkaList, *nka) - } - lsi["non_key_attributes"] = nkaList - - lsiList = append(lsiList, lsi) - } - - err := d.Set("local_secondary_index", lsiList) - if err != nil { - return err - } - - gsiList := make([]map[string]interface{}, 0, len(table.GlobalSecondaryIndexes)) - for _, gsiObject := range table.GlobalSecondaryIndexes { - gsi := map[string]interface{}{ - "write_capacity": *gsiObject.ProvisionedThroughput.WriteCapacityUnits, - "read_capacity": *gsiObject.ProvisionedThroughput.ReadCapacityUnits, - "name": *gsiObject.IndexName, - } - - for _, attribute := range gsiObject.KeySchema { - if *attribute.KeyType == dynamodb.KeyTypeHash { - gsi["hash_key"] = *attribute.AttributeName - } - - if *attribute.KeyType == dynamodb.KeyTypeRange { - gsi["range_key"] = *attribute.AttributeName - } - } - - gsi["projection_type"] = *(gsiObject.Projection.ProjectionType) - - nonKeyAttrs := make([]string, 0, len(gsiObject.Projection.NonKeyAttributes)) - for _, nonKeyAttr := range gsiObject.Projection.NonKeyAttributes { - nonKeyAttrs = append(nonKeyAttrs, *nonKeyAttr) - } - gsi["non_key_attributes"] = nonKeyAttrs - - gsiList = append(gsiList, gsi) - } - - if table.StreamSpecification != nil { - d.Set("stream_view_type", table.StreamSpecification.StreamViewType) - d.Set("stream_enabled", table.StreamSpecification.StreamEnabled) - } else { - d.Set("stream_view_type", "") - d.Set("stream_enabled", false) - } - - d.Set("stream_arn", table.LatestStreamArn) - d.Set("stream_label", table.LatestStreamLabel) - - err = d.Set("global_secondary_index", gsiList) - if err != nil { - return err - } - - sseOptions := []map[string]interface{}{} - if table.SSEDescription != nil { - m := map[string]interface{}{} - m["enabled"] = aws.StringValue(table.SSEDescription.Status) == dynamodb.SSEStatusEnabled - sseOptions = []map[string]interface{}{m} - } - err = d.Set("server_side_encryption", sseOptions) - if err != nil { - return err - } - - d.Set("arn", table.TableArn) - - return nil -} - -func expandDynamoDbAttributes(cfg []interface{}) []*dynamodb.AttributeDefinition { - attributes := make([]*dynamodb.AttributeDefinition, len(cfg)) - for i, attribute := range cfg { - attr := attribute.(map[string]interface{}) - attributes[i] = &dynamodb.AttributeDefinition{ - AttributeName: aws.String(attr["name"].(string)), - AttributeType: aws.String(attr["type"].(string)), - } - } - return attributes -} - -// TODO: Get rid of keySchemaM - the user should just explicitly define -// this in the config, we shouldn't magically be setting it like this. -// Removal will however require config change, hence BC. :/ -func expandDynamoDbLocalSecondaryIndexes(cfg []interface{}, keySchemaM map[string]interface{}) []*dynamodb.LocalSecondaryIndex { - indexes := make([]*dynamodb.LocalSecondaryIndex, len(cfg)) - for i, lsi := range cfg { - m := lsi.(map[string]interface{}) - idxName := m["name"].(string) - - // TODO: See https://github.com/terraform-providers/terraform-provider-aws/issues/3176 - if _, ok := m["hash_key"]; !ok { - m["hash_key"] = keySchemaM["hash_key"] - } - - indexes[i] = &dynamodb.LocalSecondaryIndex{ - IndexName: aws.String(idxName), - KeySchema: expandDynamoDbKeySchema(m), - Projection: expandDynamoDbProjection(m), - } - } - return indexes -} - -func expandDynamoDbGlobalSecondaryIndex(data map[string]interface{}, billingMode string) *dynamodb.GlobalSecondaryIndex { - return &dynamodb.GlobalSecondaryIndex{ - IndexName: aws.String(data["name"].(string)), - KeySchema: expandDynamoDbKeySchema(data), - Projection: expandDynamoDbProjection(data), - ProvisionedThroughput: expandDynamoDbProvisionedThroughput(data, billingMode), - } -} - -func validateDynamoDbProvisionedThroughput(data map[string]interface{}, billingMode string) error { - // if billing mode is PAY_PER_REQUEST, don't need to validate the throughput settings - if billingMode == dynamodb.BillingModePayPerRequest { - return nil - } - - writeCapacity, writeCapacitySet := data["write_capacity"].(int) - readCapacity, readCapacitySet := data["read_capacity"].(int) - - if !writeCapacitySet || !readCapacitySet { - return fmt.Errorf("Read and Write capacity should be set when billing mode is %s", dynamodb.BillingModeProvisioned) - } - - if writeCapacity < 1 { - return fmt.Errorf("Write capacity must be > 0 when billing mode is %s", dynamodb.BillingModeProvisioned) - } - - if readCapacity < 1 { - return fmt.Errorf("Read capacity must be > 0 when billing mode is %s", dynamodb.BillingModeProvisioned) - } - - return nil -} - -func expandDynamoDbProvisionedThroughput(data map[string]interface{}, billingMode string) *dynamodb.ProvisionedThroughput { - - if billingMode == dynamodb.BillingModePayPerRequest { - return nil - } - - return &dynamodb.ProvisionedThroughput{ - WriteCapacityUnits: aws.Int64(int64(data["write_capacity"].(int))), - ReadCapacityUnits: aws.Int64(int64(data["read_capacity"].(int))), - } -} - -func expandDynamoDbProjection(data map[string]interface{}) *dynamodb.Projection { - projection := &dynamodb.Projection{ - ProjectionType: aws.String(data["projection_type"].(string)), - } - - if v, ok := data["non_key_attributes"].([]interface{}); ok && len(v) > 0 { - projection.NonKeyAttributes = expandStringList(v) - } - - return projection -} - -func expandDynamoDbKeySchema(data map[string]interface{}) []*dynamodb.KeySchemaElement { - keySchema := []*dynamodb.KeySchemaElement{} - - if v, ok := data["hash_key"]; ok && v != nil && v != "" { - keySchema = append(keySchema, &dynamodb.KeySchemaElement{ - AttributeName: aws.String(v.(string)), - KeyType: aws.String(dynamodb.KeyTypeHash), - }) - } - - if v, ok := data["range_key"]; ok && v != nil && v != "" { - keySchema = append(keySchema, &dynamodb.KeySchemaElement{ - AttributeName: aws.String(v.(string)), - KeyType: aws.String(dynamodb.KeyTypeRange), - }) - } - - return keySchema -} - -func expandDynamoDbEncryptAtRestOptions(m map[string]interface{}) *dynamodb.SSESpecification { - options := dynamodb.SSESpecification{} - - if v, ok := m["enabled"]; ok { - options.Enabled = aws.Bool(v.(bool)) - } - - return &options -} - -func flattenVpcEndpointServiceAllowedPrincipals(allowedPrincipals []*ec2.AllowedPrincipal) []string { - result := make([]string, 0, len(allowedPrincipals)) - for _, allowedPrincipal := range allowedPrincipals { - if allowedPrincipal.Principal != nil { - result = append(result, *allowedPrincipal.Principal) - } - } - return result -} - -func expandDynamoDbTableItemAttributes(input string) (map[string]*dynamodb.AttributeValue, error) { - var attributes map[string]*dynamodb.AttributeValue - - dec := json.NewDecoder(strings.NewReader(input)) - err := dec.Decode(&attributes) - if err != nil { - return nil, fmt.Errorf("Decoding failed: %s", err) - } - - return attributes, nil -} - -func flattenDynamoDbTableItemAttributes(attrs map[string]*dynamodb.AttributeValue) (string, error) { - buf := bytes.NewBufferString("") - encoder := json.NewEncoder(buf) - err := encoder.Encode(attrs) - if err != nil { - return "", fmt.Errorf("Encoding failed: %s", err) - } - - var rawData map[string]map[string]interface{} - - // Reserialize so we get rid of the nulls - decoder := json.NewDecoder(strings.NewReader(buf.String())) - err = decoder.Decode(&rawData) - if err != nil { - return "", fmt.Errorf("Decoding failed: %s", err) - } - - for _, value := range rawData { - for typeName, typeVal := range value { - if typeVal == nil { - delete(value, typeName) - } - } - } - - rawBuffer := bytes.NewBufferString("") - rawEncoder := json.NewEncoder(rawBuffer) - err = rawEncoder.Encode(rawData) - if err != nil { - return "", fmt.Errorf("Re-encoding failed: %s", err) - } - - return rawBuffer.String(), nil -} - -func expandIotThingTypeProperties(config map[string]interface{}) *iot.ThingTypeProperties { - properties := &iot.ThingTypeProperties{ - SearchableAttributes: expandStringList(config["searchable_attributes"].(*schema.Set).List()), - } - - if v, ok := config["description"]; ok && v.(string) != "" { - properties.ThingTypeDescription = aws.String(v.(string)) - } - - return properties -} - -func flattenIotThingTypeProperties(s *iot.ThingTypeProperties) []map[string]interface{} { - m := map[string]interface{}{} - - if s == nil { - return nil - } - - if s.ThingTypeDescription != nil { - m["description"] = *s.ThingTypeDescription - } - m["searchable_attributes"] = flattenStringList(s.SearchableAttributes) - - return []map[string]interface{}{m} -} - -func expandLaunchTemplateSpecification(specs []interface{}) (*autoscaling.LaunchTemplateSpecification, error) { - if len(specs) < 1 { - return nil, nil - } - - spec := specs[0].(map[string]interface{}) - - idValue, idOk := spec["id"] - nameValue, nameOk := spec["name"] - - if idValue == "" && nameValue == "" { - return nil, fmt.Errorf("One of `id` or `name` must be set for `launch_template`") - } - - result := &autoscaling.LaunchTemplateSpecification{} - - // DescribeAutoScalingGroups returns both name and id but LaunchTemplateSpecification - // allows only one of them to be set - if idOk && idValue != "" { - result.LaunchTemplateId = aws.String(idValue.(string)) - } else if nameOk && nameValue != "" { - result.LaunchTemplateName = aws.String(nameValue.(string)) - } - - if v, ok := spec["version"]; ok && v != "" { - result.Version = aws.String(v.(string)) - } - - return result, nil -} - -func flattenLaunchTemplateSpecification(lt *autoscaling.LaunchTemplateSpecification) []map[string]interface{} { - attrs := map[string]interface{}{} - result := make([]map[string]interface{}, 0) - - // id and name are always returned by DescribeAutoscalingGroups - attrs["id"] = *lt.LaunchTemplateId - attrs["name"] = *lt.LaunchTemplateName - - // version is returned only if it was previosly set - if lt.Version != nil { - attrs["version"] = *lt.Version - } else { - attrs["version"] = nil - } - - result = append(result, attrs) - - return result -} - -func flattenVpcPeeringConnectionOptions(options *ec2.VpcPeeringConnectionOptionsDescription) []map[string]interface{} { - m := map[string]interface{}{} - - if options.AllowDnsResolutionFromRemoteVpc != nil { - m["allow_remote_vpc_dns_resolution"] = *options.AllowDnsResolutionFromRemoteVpc - } - - if options.AllowEgressFromLocalClassicLinkToRemoteVpc != nil { - m["allow_classic_link_to_remote_vpc"] = *options.AllowEgressFromLocalClassicLinkToRemoteVpc - } - - if options.AllowEgressFromLocalVpcToRemoteClassicLink != nil { - m["allow_vpc_to_remote_classic_link"] = *options.AllowEgressFromLocalVpcToRemoteClassicLink - } - - return []map[string]interface{}{m} -} - -func expandVpcPeeringConnectionOptions(m map[string]interface{}) *ec2.PeeringConnectionOptionsRequest { - options := &ec2.PeeringConnectionOptionsRequest{} - - if v, ok := m["allow_remote_vpc_dns_resolution"]; ok { - options.AllowDnsResolutionFromRemoteVpc = aws.Bool(v.(bool)) - } - - if v, ok := m["allow_classic_link_to_remote_vpc"]; ok { - options.AllowEgressFromLocalClassicLinkToRemoteVpc = aws.Bool(v.(bool)) - } - - if v, ok := m["allow_vpc_to_remote_classic_link"]; ok { - options.AllowEgressFromLocalVpcToRemoteClassicLink = aws.Bool(v.(bool)) - } - - return options -} - -func expandDxRouteFilterPrefixes(cfg []interface{}) []*directconnect.RouteFilterPrefix { - prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg)) - for i, p := range cfg { - prefix := &directconnect.RouteFilterPrefix{ - Cidr: aws.String(p.(string)), - } - prefixes[i] = prefix - } - return prefixes -} - -func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) *schema.Set { - out := make([]interface{}, 0) - for _, prefix := range prefixes { - out = append(out, aws.StringValue(prefix.Cidr)) - } - return schema.NewSet(schema.HashString, out) -} - -func expandMacieClassificationType(d *schema.ResourceData) *macie.ClassificationType { - continuous := macie.S3ContinuousClassificationTypeFull - oneTime := macie.S3OneTimeClassificationTypeNone - if v := d.Get("classification_type").([]interface{}); len(v) > 0 { - m := v[0].(map[string]interface{}) - continuous = m["continuous"].(string) - oneTime = m["one_time"].(string) - } - - return &macie.ClassificationType{ - Continuous: aws.String(continuous), - OneTime: aws.String(oneTime), - } -} - -func expandMacieClassificationTypeUpdate(d *schema.ResourceData) *macie.ClassificationTypeUpdate { - continuous := macie.S3ContinuousClassificationTypeFull - oneTime := macie.S3OneTimeClassificationTypeNone - if v := d.Get("classification_type").([]interface{}); len(v) > 0 { - m := v[0].(map[string]interface{}) - continuous = m["continuous"].(string) - oneTime = m["one_time"].(string) - } - - return &macie.ClassificationTypeUpdate{ - Continuous: aws.String(continuous), - OneTime: aws.String(oneTime), - } -} - -func flattenMacieClassificationType(classificationType *macie.ClassificationType) []map[string]interface{} { - if classificationType == nil { - return []map[string]interface{}{} - } - m := map[string]interface{}{ - "continuous": aws.StringValue(classificationType.Continuous), - "one_time": aws.StringValue(classificationType.OneTime), - } - return []map[string]interface{}{m} -} - -func expandDaxParameterGroupParameterNameValue(config []interface{}) []*dax.ParameterNameValue { - if len(config) == 0 { - return nil - } - results := make([]*dax.ParameterNameValue, 0, len(config)) - for _, raw := range config { - m := raw.(map[string]interface{}) - pnv := &dax.ParameterNameValue{ - ParameterName: aws.String(m["name"].(string)), - ParameterValue: aws.String(m["value"].(string)), - } - results = append(results, pnv) - } - return results -} - -func flattenDaxParameterGroupParameters(params []*dax.Parameter) []map[string]interface{} { - if len(params) == 0 { - return nil - } - results := make([]map[string]interface{}, 0) - for _, p := range params { - m := map[string]interface{}{ - "name": aws.StringValue(p.ParameterName), - "value": aws.StringValue(p.ParameterValue), - } - results = append(results, m) - } - return results -} - -func expandDaxEncryptAtRestOptions(m map[string]interface{}) *dax.SSESpecification { - options := dax.SSESpecification{} - - if v, ok := m["enabled"]; ok { - options.Enabled = aws.Bool(v.(bool)) - } - - return &options -} - -func flattenDaxEncryptAtRestOptions(options *dax.SSEDescription) []map[string]interface{} { - m := map[string]interface{}{ - "enabled": false, - } - - if options == nil { - return []map[string]interface{}{m} - } - - m["enabled"] = (aws.StringValue(options.Status) == dax.SSEStatusEnabled) - - return []map[string]interface{}{m} -} - -func expandRdsScalingConfiguration(l []interface{}) *rds.ScalingConfiguration { - if len(l) == 0 || l[0] == nil { - return nil - } - - m := l[0].(map[string]interface{}) - - scalingConfiguration := &rds.ScalingConfiguration{ - AutoPause: aws.Bool(m["auto_pause"].(bool)), - MaxCapacity: aws.Int64(int64(m["max_capacity"].(int))), - MinCapacity: aws.Int64(int64(m["min_capacity"].(int))), - SecondsUntilAutoPause: aws.Int64(int64(m["seconds_until_auto_pause"].(int))), - } - - return scalingConfiguration -} - -func flattenRdsScalingConfigurationInfo(scalingConfigurationInfo *rds.ScalingConfigurationInfo) []interface{} { - if scalingConfigurationInfo == nil { - return []interface{}{} - } - - m := map[string]interface{}{ - "auto_pause": aws.BoolValue(scalingConfigurationInfo.AutoPause), - "max_capacity": aws.Int64Value(scalingConfigurationInfo.MaxCapacity), - "min_capacity": aws.Int64Value(scalingConfigurationInfo.MinCapacity), - "seconds_until_auto_pause": aws.Int64Value(scalingConfigurationInfo.SecondsUntilAutoPause), - } - - return []interface{}{m} -} - -func expandAppmeshVirtualRouterSpec(vSpec []interface{}) *appmesh.VirtualRouterSpec { - if len(vSpec) == 0 || vSpec[0] == nil { - return nil - } - mSpec := vSpec[0].(map[string]interface{}) - - spec := &appmesh.VirtualRouterSpec{} - - if vServiceNames, ok := mSpec["service_names"].(*schema.Set); ok && vServiceNames.Len() > 0 { - spec.ServiceNames = expandStringSet(vServiceNames) - } - - return spec -} - -func flattenAppmeshVirtualRouterSpec(spec *appmesh.VirtualRouterSpec) []interface{} { - if spec == nil { - return []interface{}{} - } - - mSpec := map[string]interface{}{ - "service_names": flattenStringSet(spec.ServiceNames), - } - - return []interface{}{mSpec} -} - -func expandAppmeshVirtualNodeSpec(vSpec []interface{}) *appmesh.VirtualNodeSpec { - spec := &appmesh.VirtualNodeSpec{} - - if len(vSpec) == 0 || vSpec[0] == nil { - // Empty Spec is allowed. - return spec - } - mSpec := vSpec[0].(map[string]interface{}) - - if vBackends, ok := mSpec["backends"].(*schema.Set); ok && vBackends.Len() > 0 { - spec.Backends = expandStringSet(vBackends) - } - - if vListeners, ok := mSpec["listener"].(*schema.Set); ok && vListeners.Len() > 0 { - listeners := []*appmesh.Listener{} - - for _, vListener := range vListeners.List() { - listener := &appmesh.Listener{} - - mListener := vListener.(map[string]interface{}) - - if vPortMapping, ok := mListener["port_mapping"].([]interface{}); ok && len(vPortMapping) > 0 && vPortMapping[0] != nil { - mPortMapping := vPortMapping[0].(map[string]interface{}) - - listener.PortMapping = &appmesh.PortMapping{} - - if vPort, ok := mPortMapping["port"].(int); ok && vPort > 0 { - listener.PortMapping.Port = aws.Int64(int64(vPort)) - } - if vProtocol, ok := mPortMapping["protocol"].(string); ok && vProtocol != "" { - listener.PortMapping.Protocol = aws.String(vProtocol) - } - } - - listeners = append(listeners, listener) - } - - spec.Listeners = listeners - } - - if vServiceDiscovery, ok := mSpec["service_discovery"].([]interface{}); ok && len(vServiceDiscovery) > 0 && vServiceDiscovery[0] != nil { - mServiceDiscovery := vServiceDiscovery[0].(map[string]interface{}) - - if vDns, ok := mServiceDiscovery["dns"].([]interface{}); ok && len(vDns) > 0 && vDns[0] != nil { - mDns := vDns[0].(map[string]interface{}) - - if vServiceName, ok := mDns["service_name"].(string); ok && vServiceName != "" { - spec.ServiceDiscovery = &appmesh.ServiceDiscovery{ - Dns: &appmesh.DnsServiceDiscovery{ - ServiceName: aws.String(vServiceName), - }, - } - } - } - } - - return spec -} - -func flattenAppmeshVirtualNodeSpec(spec *appmesh.VirtualNodeSpec) []interface{} { - if spec == nil { - return []interface{}{} - } - - mSpec := map[string]interface{}{} - - if spec.Backends != nil { - mSpec["backends"] = flattenStringSet(spec.Backends) - } - - if spec.Listeners != nil { - vListeners := []interface{}{} - - for _, listener := range spec.Listeners { - mListener := map[string]interface{}{} - - if listener.PortMapping != nil { - mPortMapping := map[string]interface{}{ - "port": int(aws.Int64Value(listener.PortMapping.Port)), - "protocol": aws.StringValue(listener.PortMapping.Protocol), - } - mListener["port_mapping"] = []interface{}{mPortMapping} - } - - vListeners = append(vListeners, mListener) - } - - mSpec["listener"] = schema.NewSet(appmeshVirtualNodeListenerHash, vListeners) - } - - if spec.ServiceDiscovery != nil && spec.ServiceDiscovery.Dns != nil { - mSpec["service_discovery"] = []interface{}{ - map[string]interface{}{ - "dns": []interface{}{ - map[string]interface{}{ - "service_name": aws.StringValue(spec.ServiceDiscovery.Dns.ServiceName), - }, - }, - }, - } - } - - return []interface{}{mSpec} -} - -func expandAppmeshRouteSpec(vSpec []interface{}) *appmesh.RouteSpec { - spec := &appmesh.RouteSpec{} - - if len(vSpec) == 0 || vSpec[0] == nil { - // Empty Spec is allowed. - return spec - } - mSpec := vSpec[0].(map[string]interface{}) - - vHttpRoute, ok := mSpec["http_route"].([]interface{}) - if !ok || len(vHttpRoute) == 0 || vHttpRoute[0] == nil { - return nil - } - mHttpRoute := vHttpRoute[0].(map[string]interface{}) - - spec.HttpRoute = &appmesh.HttpRoute{} - - if vHttpRouteAction, ok := mHttpRoute["action"].([]interface{}); ok && len(vHttpRouteAction) > 0 && vHttpRouteAction[0] != nil { - mHttpRouteAction := vHttpRouteAction[0].(map[string]interface{}) - - if vWeightedTargets, ok := mHttpRouteAction["weighted_target"].(*schema.Set); ok && vWeightedTargets.Len() > 0 { - weightedTargets := []*appmesh.WeightedTarget{} - - for _, vWeightedTarget := range vWeightedTargets.List() { - weightedTarget := &appmesh.WeightedTarget{} - - mWeightedTarget := vWeightedTarget.(map[string]interface{}) - - if vVirtualNode, ok := mWeightedTarget["virtual_node"].(string); ok && vVirtualNode != "" { - weightedTarget.VirtualNode = aws.String(vVirtualNode) - } - if vWeight, ok := mWeightedTarget["weight"].(int); ok { - weightedTarget.Weight = aws.Int64(int64(vWeight)) - } - - weightedTargets = append(weightedTargets, weightedTarget) - } - - spec.HttpRoute.Action = &appmesh.HttpRouteAction{ - WeightedTargets: weightedTargets, - } - } - } - - if vHttpRouteMatch, ok := mHttpRoute["match"].([]interface{}); ok && len(vHttpRouteMatch) > 0 && vHttpRouteMatch[0] != nil { - mHttpRouteMatch := vHttpRouteMatch[0].(map[string]interface{}) - - if vPrefix, ok := mHttpRouteMatch["prefix"].(string); ok && vPrefix != "" { - spec.HttpRoute.Match = &appmesh.HttpRouteMatch{ - Prefix: aws.String(vPrefix), - } - } - } - - return spec -} - -func flattenAppmeshRouteSpec(spec *appmesh.RouteSpec) []interface{} { - if spec == nil { - return []interface{}{} - } - - mSpec := map[string]interface{}{} - - if spec.HttpRoute != nil { - mHttpRoute := map[string]interface{}{} - - if spec.HttpRoute.Action != nil && spec.HttpRoute.Action.WeightedTargets != nil { - vWeightedTargets := []interface{}{} - - for _, weightedTarget := range spec.HttpRoute.Action.WeightedTargets { - mWeightedTarget := map[string]interface{}{ - "virtual_node": aws.StringValue(weightedTarget.VirtualNode), - "weight": int(aws.Int64Value(weightedTarget.Weight)), - } - - vWeightedTargets = append(vWeightedTargets, mWeightedTarget) - } - - mHttpRoute["action"] = []interface{}{ - map[string]interface{}{ - "weighted_target": schema.NewSet(appmeshRouteWeightedTargetHash, vWeightedTargets), - }, - } - } - - if spec.HttpRoute.Match != nil { - mHttpRoute["match"] = []interface{}{ - map[string]interface{}{ - "prefix": aws.StringValue(spec.HttpRoute.Match.Prefix), - }, - } - } - - mSpec["http_route"] = []interface{}{mHttpRoute} - } - - return []interface{}{mSpec} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags.go deleted file mode 100644 index 058511268..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags.go +++ /dev/null @@ -1,478 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - "strings" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/dynamodb" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/aws/aws-sdk-go/service/elbv2" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" -) - -// tagsSchema returns the schema to use for tags. -// -func tagsSchema() *schema.Schema { - return &schema.Schema{ - Type: schema.TypeMap, - Optional: true, - } -} - -func tagsSchemaComputed() *schema.Schema { - return &schema.Schema{ - Type: schema.TypeMap, - Optional: true, - Computed: true, - } -} - -func setElbV2Tags(conn *elbv2.ELBV2, 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 := diffElbV2Tags(tagsFromMapELBv2(o), tagsFromMapELBv2(n)) - - // Set tags - if len(remove) > 0 { - var tagKeys []*string - for _, tag := range remove { - tagKeys = append(tagKeys, tag.Key) - } - log.Printf("[DEBUG] Removing tags: %#v from %s", remove, d.Id()) - _, err := conn.RemoveTags(&elbv2.RemoveTagsInput{ - ResourceArns: []*string{aws.String(d.Id())}, - TagKeys: tagKeys, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %s for %s", create, d.Id()) - _, err := conn.AddTags(&elbv2.AddTagsInput{ - ResourceArns: []*string{aws.String(d.Id())}, - Tags: create, - }) - if err != nil { - return err - } - } - } - - return nil -} - -func setVolumeTags(conn *ec2.EC2, d *schema.ResourceData) error { - if d.HasChange("volume_tags") { - oraw, nraw := d.GetChange("volume_tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTags(tagsFromMap(o), tagsFromMap(n)) - - volumeIds, err := getAwsInstanceVolumeIds(conn, d) - if err != nil { - return err - } - - if len(remove) > 0 { - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Removing volume tags: %#v from %s", remove, d.Id()) - _, err := conn.DeleteTags(&ec2.DeleteTagsInput{ - Resources: volumeIds, - Tags: remove, - }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if ok && strings.Contains(ec2err.Code(), ".NotFound") { - return resource.RetryableError(err) // retry - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - // Retry without time bounds for EC2 throttling - if isResourceTimeoutError(err) { - log.Printf("[DEBUG] Removing volume tags: %#v from %s", remove, d.Id()) - _, err := conn.DeleteTags(&ec2.DeleteTagsInput{ - Resources: volumeIds, - Tags: remove, - }) - if err != nil { - return err - } - } else { - return err - } - } - } - if len(create) > 0 { - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Creating vol tags: %s for %s", create, d.Id()) - _, err := conn.CreateTags(&ec2.CreateTagsInput{ - Resources: volumeIds, - Tags: create, - }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if ok && strings.Contains(ec2err.Code(), ".NotFound") { - return resource.RetryableError(err) // retry - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - // Retry without time bounds for EC2 throttling - if isResourceTimeoutError(err) { - log.Printf("[DEBUG] Creating vol tags: %s for %s", create, d.Id()) - _, err := conn.CreateTags(&ec2.CreateTagsInput{ - Resources: volumeIds, - Tags: create, - }) - if err != nil { - return err - } - } else { - return err - } - } - } - } - - return nil -} - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTags(conn *ec2.EC2, 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 := diffTags(tagsFromMap(o), tagsFromMap(n)) - - // Set tags - if len(remove) > 0 { - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Removing tags: %#v from %s", remove, d.Id()) - _, err := conn.DeleteTags(&ec2.DeleteTagsInput{ - Resources: []*string{aws.String(d.Id())}, - Tags: remove, - }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if ok && strings.Contains(ec2err.Code(), ".NotFound") { - return resource.RetryableError(err) // retry - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - // Retry without time bounds for EC2 throttling - if isResourceTimeoutError(err) { - log.Printf("[DEBUG] Removing tags: %#v from %s", remove, d.Id()) - _, err := conn.DeleteTags(&ec2.DeleteTagsInput{ - Resources: []*string{aws.String(d.Id())}, - Tags: remove, - }) - if err != nil { - return err - } - } else { - return err - } - } - } - if len(create) > 0 { - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Creating tags: %s for %s", create, d.Id()) - _, err := conn.CreateTags(&ec2.CreateTagsInput{ - Resources: []*string{aws.String(d.Id())}, - Tags: create, - }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if ok && strings.Contains(ec2err.Code(), ".NotFound") { - return resource.RetryableError(err) // retry - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - // Retry without time bounds for EC2 throttling - if isResourceTimeoutError(err) { - log.Printf("[DEBUG] Creating tags: %s for %s", create, d.Id()) - _, err := conn.CreateTags(&ec2.CreateTagsInput{ - Resources: []*string{aws.String(d.Id())}, - Tags: create, - }) - if err != nil { - return err - } - } else { - 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 diffTags(oldTags, newTags []*ec2.Tag) ([]*ec2.Tag, []*ec2.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) - } - - // Build the list of what to remove - var remove []*ec2.Tag - for _, t := range oldTags { - old, ok := create[aws.StringValue(t.Key)] - if !ok || old != aws.StringValue(t.Value) { - remove = append(remove, t) - } else if ok { - // already present so remove from new - delete(create, aws.StringValue(t.Key)) - } - } - - return tagsFromMap(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMap(m map[string]interface{}) []*ec2.Tag { - result := make([]*ec2.Tag, 0, len(m)) - for k, v := range m { - t := &ec2.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnored(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMap(ts []*ec2.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnored(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -func diffElbV2Tags(oldTags, newTags []*elbv2.Tag) ([]*elbv2.Tag, []*elbv2.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*elbv2.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapELBv2(create), remove -} - -// tagsToMapELBv2 turns the list of tags into a map. -func tagsToMapELBv2(ts []*elbv2.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredELBv2(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// tagsFromMapELBv2 returns the tags for the given map of data. -func tagsFromMapELBv2(m map[string]interface{}) []*elbv2.Tag { - var result []*elbv2.Tag - for k, v := range m { - t := &elbv2.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredELBv2(t) { - result = append(result, t) - } - } - - return result -} - -// tagIgnored compares a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnored(t *ec2.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} - -// and for ELBv2 as well -func tagIgnoredELBv2(t *elbv2.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} - -// tagsToMapDynamoDb turns the list of tags into a map for dynamoDB -func tagsToMapDynamoDb(ts []*dynamodb.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - result[*t.Key] = *t.Value - } - return result -} - -// tagsFromMapDynamoDb returns the tags for a given map -func tagsFromMapDynamoDb(m map[string]interface{}) []*dynamodb.Tag { - result := make([]*dynamodb.Tag, 0, len(m)) - for k, v := range m { - t := &dynamodb.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - result = append(result, t) - } - return result -} - -// setTagsDynamoDb is a helper to set the tags for a dynamoDB resource -// This is needed because dynamodb requires a completely different set and delete -// method from the ec2 tag resource handling. Also the `UntagResource` method -// for dynamoDB only requires a list of tag keys, instead of the full map of keys. -func setTagsDynamoDb(conn *dynamodb.DynamoDB, d *schema.ResourceData) error { - arn := d.Get("arn").(string) - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsDynamoDb(tagsFromMapDynamoDb(o), tagsFromMapDynamoDb(n)) - - // Set tags - if len(remove) > 0 { - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Removing tags: %#v from %s", remove, d.Id()) - _, err := conn.UntagResource(&dynamodb.UntagResourceInput{ - ResourceArn: aws.String(arn), - TagKeys: remove, - }) - if err != nil { - if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - } - if len(create) > 0 { - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Creating tags: %s for %s", create, d.Id()) - _, err := conn.TagResource(&dynamodb.TagResourceInput{ - ResourceArn: aws.String(arn), - Tags: create, - }) - if err != nil { - if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - } - - return nil -} - -// diffTagsDynamoDb takes a local set of dynamodb tags and the ones found remotely -// and returns the set of tags that must be created as a map, and returns a list of tag keys -// that must be destroyed. -func diffTagsDynamoDb(oldTags, newTags []*dynamodb.Tag) ([]*dynamodb.Tag, []*string) { - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - var remove []*string - for _, t := range oldTags { - // Verify the old tag is not a tag we're currently attempting to create - old, ok := create[*t.Key] - if !ok || old != *t.Value { - remove = append(remove, t.Key) - } - } - return tagsFromMapDynamoDb(create), remove -} - -// tagsMapToHash returns a stable hash value for a raw tags map. -// The returned value map be negative (i.e. not suitable for a 'Set' function). -func tagsMapToHash(tags map[string]interface{}) int { - total := 0 - for k, v := range tags { - total = total ^ hashcode.String(fmt.Sprintf("%s-%s", k, v)) - } - return total -} - -// tagsMapToRaw converts a tags map to its "raw" type. -func tagsMapToRaw(m map[string]string) map[string]interface{} { - raw := make(map[string]interface{}) - for k, v := range m { - raw[k] = v - } - - return raw -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACM.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACM.go deleted file mode 100644 index 7f38ff3a4..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACM.go +++ /dev/null @@ -1,88 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/acm" - "github.com/hashicorp/terraform/helper/schema" -) - -func setTagsACM(conn *acm.ACM, 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 := diffTagsACM(tagsFromMapACM(o), tagsFromMapACM(n)) - - // Set tags - if len(remove) > 0 { - input := acm.RemoveTagsFromCertificateInput{ - CertificateArn: aws.String(d.Get("arn").(string)), - Tags: remove, - } - log.Printf("[DEBUG] Removing ACM tags: %s", input) - _, err := conn.RemoveTagsFromCertificate(&input) - if err != nil { - return err - } - } - if len(create) > 0 { - input := acm.AddTagsToCertificateInput{ - CertificateArn: aws.String(d.Get("arn").(string)), - Tags: create, - } - log.Printf("[DEBUG] Adding ACM tags: %s", input) - _, err := conn.AddTagsToCertificate(&input) - 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 diffTagsACM(oldTags, newTags []*acm.Tag) ([]*acm.Tag, []*acm.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*acm.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapACM(create), remove -} - -func tagsFromMapACM(m map[string]interface{}) []*acm.Tag { - result := []*acm.Tag{} - for k, v := range m { - result = append(result, &acm.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - }) - } - - return result -} - -func tagsToMapACM(ts []*acm.Tag) map[string]string { - result := map[string]string{} - for _, t := range ts { - result[*t.Key] = *t.Value - } - - return result -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACMPCA.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACMPCA.go deleted file mode 100644 index f497f3aee..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACMPCA.go +++ /dev/null @@ -1,50 +0,0 @@ -package aws - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/acmpca" -) - -// diffTags takes our tags locally and the ones remotely and returns -// the set of tags that must be created, and the set of tags that must -// be destroyed. -func diffTagsACMPCA(oldTags, newTags []*acmpca.Tag) ([]*acmpca.Tag, []*acmpca.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) - } - - // Build the list of what to remove - var remove []*acmpca.Tag - for _, t := range oldTags { - old, ok := create[aws.StringValue(t.Key)] - if !ok || old != aws.StringValue(t.Value) { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapACMPCA(create), remove -} - -func tagsFromMapACMPCA(m map[string]interface{}) []*acmpca.Tag { - result := []*acmpca.Tag{} - for k, v := range m { - result = append(result, &acmpca.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - }) - } - - return result -} - -func tagsToMapACMPCA(ts []*acmpca.Tag) map[string]string { - result := map[string]string{} - for _, t := range ts { - result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) - } - - return result -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsBeanstalk.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsBeanstalk.go deleted file mode 100644 index 57e26d3d9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsBeanstalk.go +++ /dev/null @@ -1,74 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elasticbeanstalk" -) - -// 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 diffTagsBeanstalk(oldTags, newTags []*elasticbeanstalk.Tag) ([]*elasticbeanstalk.Tag, []*string) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*string - for _, t := range oldTags { - if _, ok := create[*t.Key]; !ok { - // Delete it! - remove = append(remove, t.Key) - } - } - - return tagsFromMapBeanstalk(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapBeanstalk(m map[string]interface{}) []*elasticbeanstalk.Tag { - var result []*elasticbeanstalk.Tag - for k, v := range m { - t := &elasticbeanstalk.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredBeanstalk(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapBeanstalk(ts []*elasticbeanstalk.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredBeanstalk(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredBeanstalk(t *elasticbeanstalk.Tag) bool { - filter := []string{"^aws:", "^elasticbeanstalk:", "Name"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCloudFront.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCloudFront.go deleted file mode 100644 index d2b60c73c..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCloudFront.go +++ /dev/null @@ -1,98 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudfront" - "github.com/hashicorp/terraform/helper/schema" -) - -func setTagsCloudFront(conn *cloudfront.CloudFront, d *schema.ResourceData, arn string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsCloudFront(tagsFromMapCloudFront(o), tagsFromMapCloudFront(n)) - - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %s", remove) - k := make([]*string, 0, len(remove)) - for _, t := range remove { - k = append(k, t.Key) - } - - _, err := conn.UntagResource(&cloudfront.UntagResourceInput{ - Resource: aws.String(arn), - TagKeys: &cloudfront.TagKeys{ - Items: k, - }, - }) - if err != nil { - return err - } - } - - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %s", create) - _, err := conn.TagResource(&cloudfront.TagResourceInput{ - Resource: aws.String(arn), - Tags: &cloudfront.Tags{ - Items: create, - }, - }) - if err != nil { - return err - } - } - - } - - return nil -} -func diffTagsCloudFront(oldTags, newTags *cloudfront.Tags) ([]*cloudfront.Tag, []*cloudfront.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags.Items { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*cloudfront.Tag - for _, t := range oldTags.Items { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - createTags := tagsFromMapCloudFront(create) - return createTags.Items, remove -} - -func tagsFromMapCloudFront(m map[string]interface{}) *cloudfront.Tags { - result := make([]*cloudfront.Tag, 0, len(m)) - for k, v := range m { - result = append(result, &cloudfront.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - }) - } - - tags := &cloudfront.Tags{ - Items: result, - } - - return tags -} - -func tagsToMapCloudFront(ts *cloudfront.Tags) map[string]string { - result := make(map[string]string) - - for _, t := range ts.Items { - result[*t.Key] = *t.Value - } - - return result -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCloudtrail.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCloudtrail.go deleted file mode 100644 index c0d7657c9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCloudtrail.go +++ /dev/null @@ -1,113 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudtrail" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsCloudtrail(conn *cloudtrail.CloudTrail, 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 := diffTagsCloudtrail(tagsFromMapCloudtrail(o), tagsFromMapCloudtrail(n)) - - // Set tags - if len(remove) > 0 { - input := cloudtrail.RemoveTagsInput{ - ResourceId: aws.String(d.Get("arn").(string)), - TagsList: remove, - } - log.Printf("[DEBUG] Removing CloudTrail tags: %s", input) - _, err := conn.RemoveTags(&input) - if err != nil { - return err - } - } - if len(create) > 0 { - input := cloudtrail.AddTagsInput{ - ResourceId: aws.String(d.Get("arn").(string)), - TagsList: create, - } - log.Printf("[DEBUG] Adding CloudTrail tags: %s", input) - _, err := conn.AddTags(&input) - 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 diffTagsCloudtrail(oldTags, newTags []*cloudtrail.Tag) ([]*cloudtrail.Tag, []*cloudtrail.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*cloudtrail.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapCloudtrail(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapCloudtrail(m map[string]interface{}) []*cloudtrail.Tag { - var result []*cloudtrail.Tag - for k, v := range m { - t := &cloudtrail.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredCloudtrail(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapCloudtrail(ts []*cloudtrail.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredCloudtrail(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredCloudtrail(t *cloudtrail.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCodeBuild.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCodeBuild.go deleted file mode 100644 index 0a3006972..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCodeBuild.go +++ /dev/null @@ -1,27 +0,0 @@ -package aws - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/codebuild" -) - -func tagsFromMapCodeBuild(m map[string]interface{}) []*codebuild.Tag { - result := []*codebuild.Tag{} - for k, v := range m { - result = append(result, &codebuild.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - }) - } - - return result -} - -func tagsToMapCodeBuild(ts []*codebuild.Tag) map[string]string { - result := map[string]string{} - for _, t := range ts { - result[*t.Key] = *t.Value - } - - return result -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDAX.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDAX.go deleted file mode 100644 index ef044f9d1..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDAX.go +++ /dev/null @@ -1,116 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/dax" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsDax(conn *dax.DAX, d *schema.ResourceData, arn string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsDax(tagsFromMapDax(o), tagsFromMapDax(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(&dax.UntagResourceInput{ - ResourceName: aws.String(arn), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - _, err := conn.TagResource(&dax.TagResourceInput{ - ResourceName: aws.String(arn), - 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 diffTagsDax(oldTags, newTags []*dax.Tag) ([]*dax.Tag, []*dax.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*dax.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapDax(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapDax(m map[string]interface{}) []*dax.Tag { - result := make([]*dax.Tag, 0, len(m)) - for k, v := range m { - t := &dax.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredDax(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapDax(ts []*dax.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredDax(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredDax(t *dax.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDS.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDS.go deleted file mode 100644 index 0088d139d..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDS.go +++ /dev/null @@ -1,116 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/directoryservice" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsDS(conn *directoryservice.DirectoryService, d *schema.ResourceData, resourceId string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsDS(tagsFromMapDS(o), tagsFromMapDS(n)) - - // Set tags - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %s", remove) - k := make([]*string, len(remove)) - for i, t := range remove { - k[i] = t.Key - } - - _, err := conn.RemoveTagsFromResource(&directoryservice.RemoveTagsFromResourceInput{ - ResourceId: aws.String(resourceId), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %s", create) - _, err := conn.AddTagsToResource(&directoryservice.AddTagsToResourceInput{ - ResourceId: aws.String(resourceId), - 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 diffTagsDS(oldTags, newTags []*directoryservice.Tag) ([]*directoryservice.Tag, []*directoryservice.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*directoryservice.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapDS(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapDS(m map[string]interface{}) []*directoryservice.Tag { - result := make([]*directoryservice.Tag, 0, len(m)) - for k, v := range m { - t := &directoryservice.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredDS(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapDS(ts []*directoryservice.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredDS(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredDS(t *directoryservice.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDX.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDX.go deleted file mode 100644 index 593762f82..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDX.go +++ /dev/null @@ -1,138 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/directconnect" - "github.com/hashicorp/terraform/helper/schema" -) - -// getTags is a helper to get the tags for a resource. It expects the -// tags field to be named "tags" -func getTagsDX(conn *directconnect.DirectConnect, d *schema.ResourceData, arn string) error { - resp, err := conn.DescribeTags(&directconnect.DescribeTagsInput{ - ResourceArns: aws.StringSlice([]string{arn}), - }) - if err != nil { - return err - } - - var tags []*directconnect.Tag - if len(resp.ResourceTags) == 1 && aws.StringValue(resp.ResourceTags[0].ResourceArn) == arn { - tags = resp.ResourceTags[0].Tags - } - - if err := d.Set("tags", tagsToMapDX(tags)); err != nil { - return err - } - - return nil -} - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsDX(conn *directconnect.DirectConnect, d *schema.ResourceData, arn string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsDX(tagsFromMapDX(o), tagsFromMapDX(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(&directconnect.UntagResourceInput{ - ResourceArn: aws.String(arn), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - _, err := conn.TagResource(&directconnect.TagResourceInput{ - ResourceArn: aws.String(arn), - 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 diffTagsDX(oldTags, newTags []*directconnect.Tag) ([]*directconnect.Tag, []*directconnect.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 []*directconnect.Tag - for _, t := range oldTags { - old, ok := create[aws.StringValue(t.Key)] - if !ok || old != aws.StringValue(t.Value) { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapDX(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapDX(m map[string]interface{}) []*directconnect.Tag { - result := make([]*directconnect.Tag, 0, len(m)) - for k, v := range m { - t := &directconnect.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredDX(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapDX(ts []*directconnect.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredDX(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 tagIgnoredDX(t *directconnect.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDocDB.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDocDB.go deleted file mode 100644 index 7674225fd..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDocDB.go +++ /dev/null @@ -1,137 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/docdb" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsDocDB(conn *docdb.DocDB, 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 := diffTagsDocDB(tagsFromMapDocDB(o), tagsFromMapDocDB(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.RemoveTagsFromResource(&docdb.RemoveTagsFromResourceInput{ - ResourceName: 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.AddTagsToResource(&docdb.AddTagsToResourceInput{ - ResourceName: 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. -func diffTagsDocDB(oldTags, newTags []*docdb.Tag) ([]*docdb.Tag, []*docdb.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 []*docdb.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 tagsFromMapDocDB(create), remove -} - -func saveTagsDocDB(conn *docdb.DocDB, d *schema.ResourceData, arn string) error { - resp, err := conn.ListTagsForResource(&docdb.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - - if err != nil { - return fmt.Errorf("Error retreiving tags for ARN: %s", arn) - } - - var dt []*docdb.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - - return d.Set("tags", tagsToMapDocDB(dt)) -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapDocDB(m map[string]interface{}) []*docdb.Tag { - result := make([]*docdb.Tag, 0, len(m)) - for k, v := range m { - t := &docdb.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredDocDB(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapDocDB(ts []*docdb.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredDocDB(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 tagIgnoredDocDB(t *docdb.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) - r, _ := regexp.MatchString(v, aws.StringValue(t.Key)) - if 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/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEC.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEC.go deleted file mode 100644 index 2da2fc3df..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEC.go +++ /dev/null @@ -1,116 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elasticache" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsEC(conn *elasticache.ElastiCache, d *schema.ResourceData, arn string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsEC(tagsFromMapEC(o), tagsFromMapEC(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.RemoveTagsFromResource(&elasticache.RemoveTagsFromResourceInput{ - ResourceName: aws.String(arn), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - _, err := conn.AddTagsToResource(&elasticache.AddTagsToResourceInput{ - ResourceName: aws.String(arn), - 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 diffTagsEC(oldTags, newTags []*elasticache.Tag) ([]*elasticache.Tag, []*elasticache.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*elasticache.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapEC(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapEC(m map[string]interface{}) []*elasticache.Tag { - result := make([]*elasticache.Tag, 0, len(m)) - for k, v := range m { - t := &elasticache.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredEC(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapEC(ts []*elasticache.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredEC(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredEC(t *elasticache.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECR.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECR.go deleted file mode 100644 index 4bedcccb6..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECR.go +++ /dev/null @@ -1,135 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ecr" - "github.com/hashicorp/terraform/helper/schema" -) - -// getTags is a helper to get the tags for a resource. It expects the -// tags field to be named "tags" and the ARN field to be named "arn". -func getTagsECR(conn *ecr.ECR, d *schema.ResourceData) error { - resp, err := conn.ListTagsForResource(&ecr.ListTagsForResourceInput{ - ResourceArn: aws.String(d.Get("arn").(string)), - }) - if err != nil { - return err - } - - if err := d.Set("tags", tagsToMapECR(resp.Tags)); err != nil { - return err - } - - 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 setTagsECR(conn *ecr.ECR, 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 := diffTagsECR(tagsFromMapECR(o), tagsFromMapECR(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(&ecr.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(&ecr.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. -func diffTagsECR(oldTags, newTags []*ecr.Tag) ([]*ecr.Tag, []*ecr.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 []*ecr.Tag - for _, t := range oldTags { - old, ok := create[aws.StringValue(t.Key)] - if !ok || old != aws.StringValue(t.Value) { - remove = append(remove, t) - } else if ok { - // already present so remove from new - delete(create, aws.StringValue(t.Key)) - } - } - - return tagsFromMapECR(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapECR(m map[string]interface{}) []*ecr.Tag { - result := make([]*ecr.Tag, 0, len(m)) - for k, v := range m { - t := &ecr.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredECR(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapECR(ts []*ecr.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredECR(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 tagIgnoredECR(t *ecr.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECS.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECS.go deleted file mode 100644 index 67a924155..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECS.go +++ /dev/null @@ -1,78 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ecs" -) - -// 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 diffTagsECS(oldTags, newTags []*ecs.Tag) ([]*ecs.Tag, []*ecs.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 []*ecs.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 tagsFromMapECS(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapECS(tagMap map[string]interface{}) []*ecs.Tag { - tags := make([]*ecs.Tag, 0, len(tagMap)) - for tagKey, tagValueRaw := range tagMap { - tag := &ecs.Tag{ - Key: aws.String(tagKey), - Value: aws.String(tagValueRaw.(string)), - } - if !tagIgnoredECS(tag) { - tags = append(tags, tag) - } - } - - return tags -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapECS(tags []*ecs.Tag) map[string]string { - tagMap := make(map[string]string) - for _, tag := range tags { - if !tagIgnoredECS(tag) { - tagMap[aws.StringValue(tag.Key)] = aws.StringValue(tag.Value) - } - } - - return tagMap -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredECS(t *ecs.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) - r, _ := regexp.MatchString(v, aws.StringValue(t.Key)) - if 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/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEFS.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEFS.go deleted file mode 100644 index 281bd9f29..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEFS.go +++ /dev/null @@ -1,115 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/efs" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsEFS(conn *efs.EFS, 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 := diffTagsEFS(tagsFromMapEFS(o), tagsFromMapEFS(n)) - - // Set tags - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]*string, 0, len(remove)) - for _, t := range remove { - k = append(k, t.Key) - } - _, err := conn.DeleteTags(&efs.DeleteTagsInput{ - FileSystemId: aws.String(d.Id()), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - _, err := conn.CreateTags(&efs.CreateTagsInput{ - FileSystemId: 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 diffTagsEFS(oldTags, newTags []*efs.Tag) ([]*efs.Tag, []*efs.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*efs.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapEFS(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapEFS(m map[string]interface{}) []*efs.Tag { - var result []*efs.Tag - for k, v := range m { - t := &efs.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredEFS(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapEFS(ts []*efs.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredEFS(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredEFS(t *efs.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsELB.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsELB.go deleted file mode 100644 index b45c49a15..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsELB.go +++ /dev/null @@ -1,115 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elb" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsELB(conn *elb.ELB, 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 := diffTagsELB(tagsFromMapELB(o), tagsFromMapELB(n)) - - // Set tags - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]*elb.TagKeyOnly, 0, len(remove)) - for _, t := range remove { - k = append(k, &elb.TagKeyOnly{Key: t.Key}) - } - _, err := conn.RemoveTags(&elb.RemoveTagsInput{ - LoadBalancerNames: []*string{aws.String(d.Get("name").(string))}, - Tags: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - _, err := conn.AddTags(&elb.AddTagsInput{ - LoadBalancerNames: []*string{aws.String(d.Get("name").(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. -func diffTagsELB(oldTags, newTags []*elb.Tag) ([]*elb.Tag, []*elb.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*elb.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapELB(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapELB(m map[string]interface{}) []*elb.Tag { - var result []*elb.Tag - for k, v := range m { - t := &elb.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredELB(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapELB(ts []*elb.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredELB(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredELB(t *elb.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsGeneric.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsGeneric.go deleted file mode 100644 index 2deb9baba..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsGeneric.go +++ /dev/null @@ -1,70 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" -) - -// 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 diffTagsGeneric(oldTags, newTags map[string]interface{}) (map[string]*string, map[string]*string) { - // First, we're creating everything we have - create := make(map[string]*string) - for k, v := range newTags { - create[k] = aws.String(v.(string)) - } - - // Build the map of what to remove - remove := make(map[string]*string) - for k, v := range oldTags { - old, ok := create[k] - if !ok || old != aws.String(v.(string)) { - // Delete it! - remove[k] = aws.String(v.(string)) - } - } - - return create, remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapGeneric(m map[string]interface{}) map[string]*string { - result := make(map[string]*string) - for k, v := range m { - if !tagIgnoredGeneric(k) { - result[k] = aws.String(v.(string)) - } - } - - return result -} - -// tagsToMap turns the tags into a map. -func tagsToMapGeneric(ts map[string]*string) map[string]string { - result := make(map[string]string) - for k, v := range ts { - if !tagIgnoredGeneric(k) { - result[k] = aws.StringValue(v) - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredGeneric(k string) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, k) - r, _ := regexp.MatchString(v, k) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s, ignoring.\n", k) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsIAM.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsIAM.go deleted file mode 100644 index 6610ba8c5..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsIAM.go +++ /dev/null @@ -1,86 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" -) - -// 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 diffTagsIAM(oldTags, newTags []*iam.Tag) ([]*iam.Tag, []*iam.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 []*iam.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 { - delete(create, aws.StringValue(t.Key)) - } - } - - return tagsFromMapIAM(create), remove -} - -// tagsFromMapIAM returns the tags for the given map of data for IAM. -func tagsFromMapIAM(m map[string]interface{}) []*iam.Tag { - result := make([]*iam.Tag, 0, len(m)) - for k, v := range m { - t := &iam.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredIAM(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMapIAM turns the list of IAM tags into a map. -func tagsToMapIAM(ts []*iam.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredIAM(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 tagIgnoredIAM(t *iam.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} - -// tagKeysIam returns the keys for the list of IAM tags -func tagKeysIam(ts []*iam.Tag) []*string { - result := make([]*string, 0, len(ts)) - for _, t := range ts { - result = append(result, t.Key) - } - return result -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsInspector.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsInspector.go deleted file mode 100644 index 41e4336d7..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsInspector.go +++ /dev/null @@ -1,40 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/inspector" -) - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapInspector(m map[string]interface{}) []*inspector.ResourceGroupTag { - var result []*inspector.ResourceGroupTag - for k, v := range m { - t := &inspector.ResourceGroupTag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredInspector(t) { - result = append(result, t) - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredInspector(t *inspector.ResourceGroupTag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKMS.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKMS.go deleted file mode 100644 index d0a10d4a9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKMS.go +++ /dev/null @@ -1,116 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/kms" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsKMS(conn *kms.KMS, d *schema.ResourceData, keyId string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsKMS(tagsFromMapKMS(o), tagsFromMapKMS(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.TagKey - } - - _, err := conn.UntagResource(&kms.UntagResourceInput{ - KeyId: aws.String(keyId), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - _, err := conn.TagResource(&kms.TagResourceInput{ - KeyId: aws.String(keyId), - 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 diffTagsKMS(oldTags, newTags []*kms.Tag) ([]*kms.Tag, []*kms.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[aws.StringValue(t.TagKey)] = aws.StringValue(t.TagValue) - } - - // Build the list of what to remove - var remove []*kms.Tag - for _, t := range oldTags { - old, ok := create[aws.StringValue(t.TagKey)] - if !ok || old != aws.StringValue(t.TagValue) { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapKMS(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapKMS(m map[string]interface{}) []*kms.Tag { - result := make([]*kms.Tag, 0, len(m)) - for k, v := range m { - t := &kms.Tag{ - TagKey: aws.String(k), - TagValue: aws.String(v.(string)), - } - if !tagIgnoredKMS(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapKMS(ts []*kms.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredKMS(t) { - result[aws.StringValue(t.TagKey)] = aws.StringValue(t.TagValue) - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredKMS(t *kms.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.TagKey) - r, _ := regexp.MatchString(v, *t.TagKey) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.TagKey, *t.TagValue) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKinesisFirehose.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKinesisFirehose.go deleted file mode 100644 index 1af7e49a0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKinesisFirehose.go +++ /dev/null @@ -1,149 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/firehose" - "github.com/hashicorp/terraform/helper/schema" -) - -// getTags is a helper to get the tags for a resource. It expects the -// tags field to be named "tags" -func getTagsKinesisFirehose(conn *firehose.Firehose, d *schema.ResourceData, sn string) error { - tags := make([]*firehose.Tag, 0) - var exclusiveStartTagKey string - for { - req := &firehose.ListTagsForDeliveryStreamInput{ - DeliveryStreamName: aws.String(sn), - } - if exclusiveStartTagKey != "" { - req.ExclusiveStartTagKey = aws.String(exclusiveStartTagKey) - } - - resp, err := conn.ListTagsForDeliveryStream(req) - if err != nil { - return err - } - - tags = append(tags, resp.Tags...) - - // If HasMoreTags is true in the response, more tags are available. - // To list the remaining tags, set ExclusiveStartTagKey to the key - // of the last tag returned and call ListTagsForDeliveryStream again. - if !aws.BoolValue(resp.HasMoreTags) { - break - } - exclusiveStartTagKey = aws.StringValue(tags[len(tags)-1].Key) - } - - err := d.Set("tags", tagsToMapKinesisFirehose(tags)) - return err -} - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsKinesisFirehose(conn *firehose.Firehose, d *schema.ResourceData, sn string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsKinesisFirehose(tagsFromMapKinesisFirehose(o), tagsFromMapKinesisFirehose(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.UntagDeliveryStream(&firehose.UntagDeliveryStreamInput{ - DeliveryStreamName: aws.String(sn), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - _, err := conn.TagDeliveryStream(&firehose.TagDeliveryStreamInput{ - DeliveryStreamName: aws.String(sn), - 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 diffTagsKinesisFirehose(oldTags, newTags []*firehose.Tag) ([]*firehose.Tag, []*firehose.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 []*firehose.Tag - for _, t := range oldTags { - old, ok := create[aws.StringValue(t.Key)] - if !ok || old != aws.StringValue(t.Value) { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapKinesisFirehose(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapKinesisFirehose(m map[string]interface{}) []*firehose.Tag { - result := make([]*firehose.Tag, 0, len(m)) - for k, v := range m { - t := &firehose.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredKinesisFirehose(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapKinesisFirehose(ts []*firehose.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredKinesisFirehose(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 tagIgnoredKinesisFirehose(t *firehose.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsLambda.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsLambda.go deleted file mode 100644 index 28aa25121..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsLambda.go +++ /dev/null @@ -1,50 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/lambda" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsLambda(conn *lambda.Lambda, d *schema.ResourceData, arn string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsGeneric(o, n) - - // Set tags - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %#v", remove) - keys := make([]*string, 0, len(remove)) - for k := range remove { - keys = append(keys, aws.String(k)) - } - - _, err := conn.UntagResource(&lambda.UntagResourceInput{ - Resource: aws.String(arn), - TagKeys: keys, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - - _, err := conn.TagResource(&lambda.TagResourceInput{ - Resource: aws.String(arn), - Tags: create, - }) - if err != nil { - return err - } - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsLicenseManager.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsLicenseManager.go deleted file mode 100644 index 20f786cfd..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsLicenseManager.go +++ /dev/null @@ -1,115 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/licensemanager" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsLicenseManager(conn *licensemanager.LicenseManager, 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 := diffTagsLicenseManager(tagsFromMapLicenseManager(o), tagsFromMapLicenseManager(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(&licensemanager.UntagResourceInput{ - ResourceArn: aws.String(d.Id()), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - _, err := conn.TagResource(&licensemanager.TagResourceInput{ - ResourceArn: 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 diffTagsLicenseManager(oldTags, newTags []*licensemanager.Tag) ([]*licensemanager.Tag, []*licensemanager.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*licensemanager.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapLicenseManager(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapLicenseManager(m map[string]interface{}) []*licensemanager.Tag { - result := make([]*licensemanager.Tag, 0, len(m)) - for k, v := range m { - t := &licensemanager.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredLicenseManager(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapLicenseManager(ts []*licensemanager.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredLicenseManager(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredLicenseManager(t *licensemanager.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/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsMQ.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsMQ.go deleted file mode 100644 index 2ea270be7..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsMQ.go +++ /dev/null @@ -1,67 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/mq" - "github.com/hashicorp/terraform/helper/schema" -) - -// getTags is a helper to get the tags for a resource. It expects the -// tags field to be named "tags" -func getTagsMQ(conn *mq.MQ, d *schema.ResourceData, arn string) error { - resp, err := conn.ListTags(&mq.ListTagsInput{ - ResourceArn: aws.String(arn), - }) - if err != nil { - return err - } - - if err := d.Set("tags", tagsToMapGeneric(resp.Tags)); err != nil { - return err - } - - return nil -} - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsMQ(conn *mq.MQ, d *schema.ResourceData, arn string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsGeneric(o, n) - - // Set tags - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %#v", remove) - keys := make([]*string, 0, len(remove)) - for k := range remove { - keys = append(keys, aws.String(k)) - } - - _, err := conn.DeleteTags(&mq.DeleteTagsInput{ - ResourceArn: aws.String(arn), - TagKeys: keys, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - - _, err := conn.CreateTags(&mq.CreateTagsInput{ - ResourceArn: aws.String(arn), - Tags: create, - }) - if err != nil { - return err - } - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go deleted file mode 100644 index b5f0ba2a0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go +++ /dev/null @@ -1,134 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/neptune" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsNeptune(conn *neptune.Neptune, d *schema.ResourceData, arn string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsNeptune(tagsFromMapNeptune(o), tagsFromMapNeptune(n)) - - // Set tags - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %s", remove) - k := make([]*string, len(remove)) - for i, t := range remove { - k[i] = t.Key - } - - _, err := conn.RemoveTagsFromResource(&neptune.RemoveTagsFromResourceInput{ - ResourceName: aws.String(arn), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %s", create) - _, err := conn.AddTagsToResource(&neptune.AddTagsToResourceInput{ - ResourceName: aws.String(arn), - 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 diffTagsNeptune(oldTags, newTags []*neptune.Tag) ([]*neptune.Tag, []*neptune.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 []*neptune.Tag - for _, t := range oldTags { - old, ok := create[aws.StringValue(t.Key)] - if !ok || old != aws.StringValue(t.Value) { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapNeptune(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapNeptune(m map[string]interface{}) []*neptune.Tag { - result := make([]*neptune.Tag, 0, len(m)) - for k, v := range m { - t := &neptune.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredNeptune(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapNeptune(ts []*neptune.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredNeptune(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 tagIgnoredNeptune(t *neptune.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) - r, _ := regexp.MatchString(v, aws.StringValue(t.Key)) - if 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 -} - -func saveTagsNeptune(conn *neptune.Neptune, d *schema.ResourceData, arn string) error { - resp, err := conn.ListTagsForResource(&neptune.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - - if err != nil { - return fmt.Errorf("Error retreiving tags for ARN: %s", arn) - } - - var dt []*neptune.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - - return d.Set("tags", tagsToMapNeptune(dt)) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsOpsworks.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsOpsworks.go deleted file mode 100644 index 8972e02b9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsOpsworks.go +++ /dev/null @@ -1,50 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/opsworks" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsOpsworks(conn *opsworks.OpsWorks, d *schema.ResourceData, arn string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsGeneric(o, n) - - // Set tags - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %#v", remove) - keys := make([]*string, 0, len(remove)) - for k := range remove { - keys = append(keys, aws.String(k)) - } - - _, err := conn.UntagResource(&opsworks.UntagResourceInput{ - ResourceArn: aws.String(arn), - TagKeys: keys, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - - _, err := conn.TagResource(&opsworks.TagResourceInput{ - ResourceArn: aws.String(arn), - Tags: create, - }) - if err != nil { - return err - } - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRAM.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRAM.go deleted file mode 100644 index f9fb6bd90..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRAM.go +++ /dev/null @@ -1,85 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ram" -) - -// 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 diffTagsRAM(oldTags, newTags []*ram.Tag) ([]*ram.Tag, []*ram.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 []*ram.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 { - delete(create, aws.StringValue(t.Key)) - } - } - - return tagsFromMapRAM(create), remove -} - -// tagsFromMapRAM returns the tags for the given map of data for RAM. -func tagsFromMapRAM(m map[string]interface{}) []*ram.Tag { - result := make([]*ram.Tag, 0, len(m)) - for k, v := range m { - t := &ram.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredRAM(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMapRAM turns the list of RAM tags into a map. -func tagsToMapRAM(ts []*ram.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredRAM(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 tagIgnoredRAM(t *ram.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 -} - -// tagKeysRam returns the keys for the list of RAM tags -func tagKeysRam(ts []*ram.Tag) []*string { - result := make([]*string, 0, len(ts)) - for _, t := range ts { - result = append(result, t.Key) - } - return result -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRDS.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRDS.go deleted file mode 100644 index 78e4f923f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRDS.go +++ /dev/null @@ -1,134 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/rds" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsRDS(conn *rds.RDS, d *schema.ResourceData, arn string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsRDS(tagsFromMapRDS(o), tagsFromMapRDS(n)) - - // Set tags - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %s", remove) - k := make([]*string, len(remove)) - for i, t := range remove { - k[i] = t.Key - } - - _, err := conn.RemoveTagsFromResource(&rds.RemoveTagsFromResourceInput{ - ResourceName: aws.String(arn), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %s", create) - _, err := conn.AddTagsToResource(&rds.AddTagsToResourceInput{ - ResourceName: aws.String(arn), - 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 diffTagsRDS(oldTags, newTags []*rds.Tag) ([]*rds.Tag, []*rds.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*rds.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapRDS(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapRDS(m map[string]interface{}) []*rds.Tag { - result := make([]*rds.Tag, 0, len(m)) - for k, v := range m { - t := &rds.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredRDS(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapRDS(ts []*rds.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredRDS(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -func saveTagsRDS(conn *rds.RDS, d *schema.ResourceData, arn string) error { - resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - - if err != nil { - return fmt.Errorf("Error retreiving tags for ARN: %s", arn) - } - - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - - return d.Set("tags", tagsToMapRDS(dt)) -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredRDS(t *rds.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRedshift.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRedshift.go deleted file mode 100644 index 26af8e767..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRedshift.go +++ /dev/null @@ -1,109 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/redshift" - "github.com/hashicorp/terraform/helper/schema" -) - -func setTagsRedshift(conn *redshift.Redshift, d *schema.ResourceData, arn string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsRedshift(tagsFromMapRedshift(o), tagsFromMapRedshift(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.DeleteTags(&redshift.DeleteTagsInput{ - ResourceName: aws.String(arn), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - _, err := conn.CreateTags(&redshift.CreateTagsInput{ - ResourceName: aws.String(arn), - Tags: create, - }) - if err != nil { - return err - } - } - } - - return nil -} - -func diffTagsRedshift(oldTags, newTags []*redshift.Tag) ([]*redshift.Tag, []*redshift.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*redshift.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapRedshift(create), remove -} - -func tagsFromMapRedshift(m map[string]interface{}) []*redshift.Tag { - result := make([]*redshift.Tag, 0, len(m)) - for k, v := range m { - t := &redshift.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredRedshift(t) { - result = append(result, t) - } - } - - return result -} - -func tagsToMapRedshift(ts []*redshift.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredRedshift(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredRedshift(t *redshift.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSSM.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSSM.go deleted file mode 100644 index 9b765cb73..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSSM.go +++ /dev/null @@ -1,118 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsSSM(conn *ssm.SSM, d *schema.ResourceData, id, resourceType string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsSSM(tagsFromMapSSM(o), tagsFromMapSSM(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.RemoveTagsFromResource(&ssm.RemoveTagsFromResourceInput{ - ResourceId: aws.String(id), - ResourceType: aws.String(resourceType), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - _, err := conn.AddTagsToResource(&ssm.AddTagsToResourceInput{ - ResourceId: aws.String(id), - ResourceType: aws.String(resourceType), - 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 diffTagsSSM(oldTags, newTags []*ssm.Tag) ([]*ssm.Tag, []*ssm.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*ssm.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapSSM(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapSSM(m map[string]interface{}) []*ssm.Tag { - result := make([]*ssm.Tag, 0, len(m)) - for k, v := range m { - t := &ssm.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredSSM(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapSSM(ts []*ssm.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredSSM(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredSSM(t *ssm.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSecretsManager.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSecretsManager.go deleted file mode 100644 index e7547ad7f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSecretsManager.go +++ /dev/null @@ -1,75 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/secretsmanager" -) - -// diffTags takes our tags locally and the ones remotely and returns -// the set of tags that must be created, and the set of tags that must -// be destroyed. -func diffTagsSecretsManager(oldTags, newTags []*secretsmanager.Tag) ([]*secretsmanager.Tag, []*secretsmanager.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*secretsmanager.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapSecretsManager(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapSecretsManager(m map[string]interface{}) []*secretsmanager.Tag { - result := make([]*secretsmanager.Tag, 0, len(m)) - for k, v := range m { - t := &secretsmanager.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredSecretsManager(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapSecretsManager(ts []*secretsmanager.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredSecretsManager(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredSecretsManager(t *secretsmanager.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSfn.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSfn.go deleted file mode 100644 index 093fbc78f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSfn.go +++ /dev/null @@ -1,78 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/sfn" -) - -// 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 diffTagsSfn(oldTags, newTags []*sfn.Tag) ([]*sfn.Tag, []*sfn.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 []*sfn.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 tagsFromMapSfn(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapSfn(tagMap map[string]interface{}) []*sfn.Tag { - tags := make([]*sfn.Tag, 0, len(tagMap)) - for tagKey, tagValueRaw := range tagMap { - tag := &sfn.Tag{ - Key: aws.String(tagKey), - Value: aws.String(tagValueRaw.(string)), - } - if !tagIgnoredSfn(tag) { - tags = append(tags, tag) - } - } - - return tags -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapSfn(tags []*sfn.Tag) map[string]string { - tagMap := make(map[string]string) - for _, tag := range tags { - if !tagIgnoredSfn(tag) { - tagMap[aws.StringValue(tag.Key)] = aws.StringValue(tag.Value) - } - } - - return tagMap -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredSfn(t *sfn.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) - r, _ := regexp.MatchString(v, aws.StringValue(t.Key)) - if 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/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsTransfer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsTransfer.go deleted file mode 100644 index 17e41dd88..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsTransfer.go +++ /dev/null @@ -1,118 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/transfer" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsTransfer(conn *transfer.Transfer, 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 := diffTagsTransfer(tagsFromMapTransfer(o), tagsFromMapTransfer(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(&transfer.UntagResourceInput{ - Arn: 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(&transfer.TagResourceInput{ - Arn: 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. -func diffTagsTransfer(oldTags, newTags []*transfer.Tag) ([]*transfer.Tag, []*transfer.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 []*transfer.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 tagsFromMapTransfer(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapTransfer(m map[string]interface{}) []*transfer.Tag { - result := make([]*transfer.Tag, 0, len(m)) - for k, v := range m { - t := &transfer.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredTransfer(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapTransfer(ts []*transfer.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredTransfer(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 tagIgnoredTransfer(t *transfer.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/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_apigateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_apigateway.go deleted file mode 100644 index 9168d39e2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_apigateway.go +++ /dev/null @@ -1,44 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/schema" -) - -func setTagsAPIGatewayStage(conn *apigateway.APIGateway, d *schema.ResourceData, arn string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsGeneric(o, n) - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %#v", remove) - keys := make([]*string, 0, len(remove)) - for k := range remove { - keys = append(keys, aws.String(k)) - } - - _, err := conn.UntagResource(&apigateway.UntagResourceInput{ - ResourceArn: aws.String(arn), - TagKeys: keys, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - _, err := conn.TagResource(&apigateway.TagResourceInput{ - ResourceArn: aws.String(arn), - Tags: create, - }) - if err != nil { - return err - } - } - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_dms.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_dms.go deleted file mode 100644 index c88050059..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_dms.go +++ /dev/null @@ -1,91 +0,0 @@ -package aws - -import ( - "github.com/aws/aws-sdk-go/aws" - dms "github.com/aws/aws-sdk-go/service/databasemigrationservice" - "github.com/hashicorp/terraform/helper/schema" -) - -func dmsTagsToMap(tags []*dms.Tag) map[string]string { - result := make(map[string]string) - - for _, tag := range tags { - result[*tag.Key] = *tag.Value - } - - return result -} - -func dmsTagsFromMap(m map[string]interface{}) []*dms.Tag { - result := make([]*dms.Tag, 0, len(m)) - - for k, v := range m { - result = append(result, &dms.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - }) - } - - return result -} - -func dmsDiffTags(oldTags, newTags []*dms.Tag) ([]*dms.Tag, []*dms.Tag) { - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - remove := []*dms.Tag{} - for _, t := range oldTags { - v, ok := create[*t.Key] - if !ok || v != *t.Value { - remove = append(remove, t) - } - } - - return dmsTagsFromMap(create), remove -} - -func dmsGetTagKeys(tags []*dms.Tag) []*string { - keys := []*string{} - - for _, tag := range tags { - keys = append(keys, tag.Key) - } - - return keys -} - -func dmsSetTags(arn string, d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).dmsconn - - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - - add, remove := dmsDiffTags(dmsTagsFromMap(o), dmsTagsFromMap(n)) - - if len(remove) > 0 { - _, err := conn.RemoveTagsFromResource(&dms.RemoveTagsFromResourceInput{ - ResourceArn: aws.String(arn), - TagKeys: dmsGetTagKeys(remove), - }) - if err != nil { - return err - } - } - - if len(add) > 0 { - _, err := conn.AddTagsToResource(&dms.AddTagsToResourceInput{ - ResourceArn: aws.String(arn), - Tags: add, - }) - if err != nil { - return err - } - } - } - - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_elasticsearchservice.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_elasticsearchservice.go deleted file mode 100644 index 54019415b..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_elasticsearchservice.go +++ /dev/null @@ -1,115 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - elasticsearch "github.com/aws/aws-sdk-go/service/elasticsearchservice" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsElasticsearchService(conn *elasticsearch.ElasticsearchService, d *schema.ResourceData, arn string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsElasticsearchService(tagsFromMapElasticsearchService(o), tagsFromMapElasticsearchService(n)) - - // Set tags - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]*string, 0, len(remove)) - for _, t := range remove { - k = append(k, t.Key) - } - _, err := conn.RemoveTags(&elasticsearch.RemoveTagsInput{ - ARN: aws.String(arn), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - _, err := conn.AddTags(&elasticsearch.AddTagsInput{ - ARN: aws.String(arn), - TagList: 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 diffTagsElasticsearchService(oldTags, newTags []*elasticsearch.Tag) ([]*elasticsearch.Tag, []*elasticsearch.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*elasticsearch.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapElasticsearchService(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapElasticsearchService(m map[string]interface{}) []*elasticsearch.Tag { - var result []*elasticsearch.Tag - for k, v := range m { - t := &elasticsearch.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredElasticsearchService(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapElasticsearchService(ts []*elasticsearch.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredElasticsearchService(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredElasticsearchService(t *elasticsearch.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_kinesis.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_kinesis.go deleted file mode 100644 index de984a5d0..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_kinesis.go +++ /dev/null @@ -1,146 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/kinesis" - "github.com/hashicorp/terraform/helper/schema" -) - -// Kinesis requires tagging operations be split into 10 tag batches -const kinesisTagBatchLimit = 10 - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsKinesis(conn *kinesis.Kinesis, d *schema.ResourceData) error { - - sn := d.Get("name").(string) - - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsKinesis(tagsFromMapKinesis(o), tagsFromMapKinesis(n)) - - // Set tags - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %#v", remove) - - tagKeysBatch := make([]*string, 0, kinesisTagBatchLimit) - tagKeysBatches := make([][]*string, 0, len(remove)/kinesisTagBatchLimit+1) - for _, tag := range remove { - if len(tagKeysBatch) == kinesisTagBatchLimit { - tagKeysBatches = append(tagKeysBatches, tagKeysBatch) - tagKeysBatch = make([]*string, 0, kinesisTagBatchLimit) - } - tagKeysBatch = append(tagKeysBatch, tag.Key) - } - tagKeysBatches = append(tagKeysBatches, tagKeysBatch) - - for _, tagKeys := range tagKeysBatches { - _, err := conn.RemoveTagsFromStream(&kinesis.RemoveTagsFromStreamInput{ - StreamName: aws.String(sn), - TagKeys: tagKeys, - }) - if err != nil { - return err - } - } - } - - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - - tagsBatch := make(map[string]*string) - tagsBatches := make([]map[string]*string, 0, len(create)/kinesisTagBatchLimit+1) - for _, tag := range create { - if len(tagsBatch) == kinesisTagBatchLimit { - tagsBatches = append(tagsBatches, tagsBatch) - tagsBatch = make(map[string]*string) - } - tagsBatch[aws.StringValue(tag.Key)] = tag.Value - } - tagsBatches = append(tagsBatches, tagsBatch) - - for _, tags := range tagsBatches { - _, err := conn.AddTagsToStream(&kinesis.AddTagsToStreamInput{ - StreamName: aws.String(sn), - Tags: tags, - }) - 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 diffTagsKinesis(oldTags, newTags []*kinesis.Tag) ([]*kinesis.Tag, []*kinesis.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*kinesis.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapKinesis(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapKinesis(m map[string]interface{}) []*kinesis.Tag { - var result []*kinesis.Tag - for k, v := range m { - t := &kinesis.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredKinesis(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapKinesis(ts []*kinesis.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredKinesis(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredKinesis(t *kinesis.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_route53.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_route53.go deleted file mode 100644 index 2b9ef529f..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_route53.go +++ /dev/null @@ -1,112 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/route53" - "github.com/hashicorp/terraform/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsR53(conn *route53.Route53, d *schema.ResourceData, resourceType string) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsR53(tagsFromMapR53(o), tagsFromMapR53(n)) - - // Set tags - r := make([]*string, len(remove)) - for i, t := range remove { - r[i] = t.Key - } - log.Printf("[DEBUG] Changing tags: \n\tadding: %#v\n\tremoving:%#v", create, remove) - req := &route53.ChangeTagsForResourceInput{ - ResourceId: aws.String(d.Id()), - ResourceType: aws.String(resourceType), - } - - if len(create) > 0 { - req.AddTags = create - } - if len(r) > 0 { - req.RemoveTagKeys = r - } - - _, err := conn.ChangeTagsForResource(req) - 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 diffTagsR53(oldTags, newTags []*route53.Tag) ([]*route53.Tag, []*route53.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*route53.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapR53(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapR53(m map[string]interface{}) []*route53.Tag { - result := make([]*route53.Tag, 0, len(m)) - for k, v := range m { - t := &route53.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredRoute53(t) { - result = append(result, t) - } - } - - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapR53(ts []*route53.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredRoute53(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredRoute53(t *route53.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - r, _ := regexp.MatchString(v, *t.Key) - if r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_sagemaker.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_sagemaker.go deleted file mode 100644 index 52dcf865a..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_sagemaker.go +++ /dev/null @@ -1,120 +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/helper/resource" - "github.com/hashicorp/terraform/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 { - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Removing tags: %#v from %s", remove, d.Id()) - _, err := conn.DeleteTags(&sagemaker.DeleteTagsInput{ - ResourceArn: aws.String(d.Get("arn").(string)), - TagKeys: remove, - }) - if err != nil { - sagemakerErr, ok := err.(awserr.Error) - if ok && sagemakerErr.Code() == "ResourceNotFound" { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if err != nil { - return err - } - } - if len(create) > 0 { - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Creating tags: %s for %s", create, d.Id()) - _, err := conn.AddTags(&sagemaker.AddTagsInput{ - ResourceArn: aws.String(d.Get("arn").(string)), - Tags: create, - }) - if err != nil { - sagemakerErr, ok := err.(awserr.Error) - if ok && sagemakerErr.Code() == "ResourceNotFound" { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - 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/vendor/github.com/terraform-providers/terraform-provider-aws/aws/utils.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/utils.go deleted file mode 100644 index b701ddbea..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/utils.go +++ /dev/null @@ -1,54 +0,0 @@ -package aws - -import ( - "encoding/base64" - "encoding/json" - "reflect" - "regexp" - - "github.com/hashicorp/terraform/helper/resource" -) - -// Base64Encode encodes data if the input isn't already encoded using base64.StdEncoding.EncodeToString. -// If the input is already base64 encoded, return the original input unchanged. -func base64Encode(data []byte) string { - // Check whether the data is already Base64 encoded; don't double-encode - if isBase64Encoded(data) { - return string(data) - } - // data has not been encoded encode and return - return base64.StdEncoding.EncodeToString(data) -} - -func isBase64Encoded(data []byte) bool { - _, err := base64.StdEncoding.DecodeString(string(data)) - return err == nil -} - -func looksLikeJsonString(s interface{}) bool { - return regexp.MustCompile(`^\s*{`).MatchString(s.(string)) -} - -func jsonBytesEqual(b1, b2 []byte) bool { - var o1 interface{} - if err := json.Unmarshal(b1, &o1); err != nil { - return false - } - - var o2 interface{} - if err := json.Unmarshal(b2, &o2); err != nil { - return false - } - - return reflect.DeepEqual(o1, o2) -} - -func isResourceNotFoundError(err error) bool { - _, ok := err.(*resource.NotFoundError) - return ok -} - -func isResourceTimeoutError(err error) bool { - timeoutErr, ok := err.(*resource.TimeoutError) - return ok && timeoutErr.LastError == nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go deleted file mode 100644 index a58d5a823..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go +++ /dev/null @@ -1,2383 +0,0 @@ -package aws - -import ( - "errors" - "fmt" - "net" - "net/url" - "regexp" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/aws/aws-sdk-go/service/cognitoidentity" - "github.com/aws/aws-sdk-go/service/configservice" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/structure" - "github.com/hashicorp/terraform/helper/validation" -) - -// validateAny returns a SchemaValidateFunc which tests if the provided value -// passes any of the provided SchemaValidateFunc -// Temporarily added into AWS provider, but will be submitted upstream into provider SDK -func validateAny(validators ...schema.SchemaValidateFunc) schema.SchemaValidateFunc { - return func(i interface{}, k string) ([]string, []error) { - var allErrors []error - var allWarnings []string - for _, validator := range validators { - validatorWarnings, validatorErrors := validator(i, k) - if len(validatorWarnings) == 0 && len(validatorErrors) == 0 { - return []string{}, []error{} - } - allWarnings = append(allWarnings, validatorWarnings...) - allErrors = append(allErrors, validatorErrors...) - } - return allWarnings, allErrors - } -} - -// validateTypeStringNullableBoolean provides custom error messaging for TypeString booleans -// Some arguments require three values: true, false, and "" (unspecified). -// This ValidateFunc returns a custom message since the message with -// validation.StringInSlice([]string{"", "false", "true"}, false) is confusing: -// to be one of [ false true], got 1 -func validateTypeStringNullableBoolean(v interface{}, k string) (ws []string, es []error) { - value, ok := v.(string) - if !ok { - es = append(es, fmt.Errorf("expected type of %s to be string", k)) - return - } - - for _, str := range []string{"", "0", "1", "false", "true"} { - if value == str { - return - } - } - - es = append(es, fmt.Errorf("expected %s to be one of [\"\", false, true], got %s", k, value)) - return -} - -// validateTypeStringNullableFloat provides custom error messaging for TypeString floats -// Some arguments require a floating point value or an unspecified, empty field. -func validateTypeStringNullableFloat(v interface{}, k string) (ws []string, es []error) { - value, ok := v.(string) - if !ok { - es = append(es, fmt.Errorf("expected type of %s to be string", k)) - return - } - - if value == "" { - return - } - - if _, err := strconv.ParseFloat(value, 64); err != nil { - es = append(es, fmt.Errorf("%s: cannot parse '%s' as float: %s", k, value, err)) - } - - return -} - -func validateTransferServerID(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - // https://docs.aws.amazon.com/transfer/latest/userguide/API_CreateUser.html - pattern := `^s-([0-9a-f]{17})$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q isn't a valid transfer server id (only lowercase alphanumeric characters are allowed): %q", - k, value)) - } - - return -} - -func validateTransferUserName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - // https://docs.aws.amazon.com/transfer/latest/userguide/API_CreateUser.html - pattern := `^[a-z0-9]{3,32}$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q isn't a valid transfer user name (only lowercase alphanumeric characters are allowed): %q", - k, value)) - } - - return -} - -func validateRdsIdentifier(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) - } - return -} - -func validateNeptuneIdentifier(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) - } - return -} - -func validateRdsIdentifierPrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - return -} - -func validateNeptuneIdentifierPrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - return -} - -func validateRdsEngine() schema.SchemaValidateFunc { - return validation.StringInSlice([]string{ - "aurora", - "aurora-mysql", - "aurora-postgresql", - }, false) -} - -func validateNeptuneEngine() schema.SchemaValidateFunc { - return validation.StringInSlice([]string{ - "neptune", - }, false) -} - -func validateElastiCacheClusterId(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if (len(value) < 1) || (len(value) > 20) { - errors = append(errors, fmt.Errorf( - "%q (%q) must contain from 1 to 20 alphanumeric characters or hyphens", k, value)) - } - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q (%q)", k, value)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q (%q) must be a letter", k, value)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q (%q) cannot contain two consecutive hyphens", k, value)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q (%q) cannot end with a hyphen", k, value)) - } - return -} - -func validateASGScheduleTimestamp(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - _, err := time.Parse(awsAutoscalingScheduleTimeLayout, value) - if err != nil { - errors = append(errors, fmt.Errorf( - "%q cannot be parsed as iso8601 Timestamp Format", value)) - } - - return -} - -// validateTagFilters confirms the "value" component of a tag filter is one of -// AWS's three allowed types. -func validateTagFilters(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != "KEY_ONLY" && value != "VALUE_ONLY" && value != "KEY_AND_VALUE" { - errors = append(errors, fmt.Errorf( - "%q must be one of \"KEY_ONLY\", \"VALUE_ONLY\", or \"KEY_AND_VALUE\"", k)) - } - return -} - -func validateDbParamGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in parameter group %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of parameter group %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "parameter group %q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "parameter group %q cannot end with a hyphen", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "parameter group %q cannot be greater than 255 characters", k)) - } - return -} - -func validateDbParamGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in parameter group %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of parameter group %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "parameter group %q cannot contain two consecutive hyphens", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "parameter group %q cannot be greater than 226 characters", k)) - } - return -} - -func validateDocDBIdentifier(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) - } - return -} - -func validateDocDBIdentifierPrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - return -} - -func validateDocDBEngine() schema.SchemaValidateFunc { - return validation.StringInSlice([]string{ - "docdb", - }, false) -} - -func validateDocDBParamGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in parameter group %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of parameter group %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "parameter group %q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "parameter group %q cannot end with a hyphen", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "parameter group %q cannot be greater than 255 characters", k)) - } - return -} - -func validateDocDBParamGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in parameter group %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of parameter group %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "parameter group %q cannot contain two consecutive hyphens", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "parameter group %q cannot be greater than 226 characters", k)) - } - return -} - -func validateDocDBClusterIdentifier(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) - } - return -} - -func validateDocDBClusterSnapshotIdentifier(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) - } - return -} - -func validateElbName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) == 0 { - return // short-circuit - } - if len(value) > 32 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 32 characters: %q", k, value)) - } - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q: %q", - k, value)) - } - if regexp.MustCompile(`^-`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot begin with a hyphen: %q", k, value)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen: %q", k, value)) - } - return -} - -func validateElbNamePrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q: %q", - k, value)) - } - if len(value) > 6 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 6 characters: %q", k, value)) - } - if regexp.MustCompile(`^-`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot begin with a hyphen: %q", k, value)) - } - return -} - -func validateSagemakerName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q: %q", - k, value)) - } - if len(value) > 63 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 63 characters: %q", k, value)) - } - if regexp.MustCompile(`^-`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot begin with a hyphen: %q", k, value)) - } - return -} - -func validateSagemakerEnvironment(v interface{}, k string) (ws []string, errors []error) { - value := v.(map[string]interface{}) - for envK, envV := range value { - if !regexp.MustCompile(`^[0-9A-Za-z_]+$`).MatchString(envK) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and underscore allowed in %q: %q", - k, envK)) - } - if len(envK) > 1024 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 1024 characters: %q", k, envK)) - } - if len(envV.(string)) > 1024 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 1024 characters: %q", k, envV.(string))) - } - if regexp.MustCompile(`^[0-9]`).MatchString(envK) { - errors = append(errors, fmt.Errorf( - "%q cannot begin with a digit: %q", k, envK)) - } - } - return -} - -func validateSagemakerImage(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`[\S]+`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "no whitespace allowed in %q: %q", - k, value)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 255 characters: %q", k, value)) - } - return -} - -func validateSagemakerModelDataUrl(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^(https|s3)://([^/]+)/?(.*)$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must be a valid path: %q", - k, value)) - } - if len(value) > 1024 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 1024 characters: %q", k, value)) - } - if !regexp.MustCompile(`^(https|s3)://`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must be a path that starts with either s3 or https: %q", k, value)) - } - return -} - -func validateCloudWatchDashboardName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 255 characters: %q", k, value)) - } - - // http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutDashboard.html - pattern := `^[\-_A-Za-z0-9]+$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q doesn't comply with restrictions (%q): %q", - k, pattern, value)) - } - - return -} - -func validateCloudWatchEventRuleName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 64 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 64 characters: %q", k, value)) - } - - // http://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_PutRule.html - pattern := `^[\.\-_A-Za-z0-9]+$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q doesn't comply with restrictions (%q): %q", - k, pattern, value)) - } - - return -} - -func validateCloudWatchLogResourcePolicyDocument(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - // http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutResourcePolicy.html - if len(value) > 5120 || (len(value) == 0) { - errors = append(errors, fmt.Errorf("CloudWatch log resource policy document must be between 1 and 5120 characters.")) - } - if _, err := structure.NormalizeJsonString(v); err != nil { - errors = append(errors, fmt.Errorf("%q contains an invalid JSON: %s", k, err)) - } - return -} - -func validateIntegerInSlice(valid []int) schema.SchemaValidateFunc { - return func(i interface{}, k string) (s []string, es []error) { - v, ok := i.(int) - if !ok { - es = append(es, fmt.Errorf("expected type of %s to be int", k)) - return - } - for _, in := range valid { - if v == in { - return - } - } - es = append(es, fmt.Errorf("expected %s to be one of %v, got %d", k, valid, v)) - return - } -} - -func validateCloudWatchEventTargetId(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 64 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 64 characters: %q", k, value)) - } - - // http://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_Target.html - pattern := `^[\.\-_A-Za-z0-9]+$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q doesn't comply with restrictions (%q): %q", - k, pattern, value)) - } - - return -} - -func validateLambdaFunctionName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 140 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 140 characters: %q", k, value)) - } - // http://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html - pattern := `^(arn:[\w-]+:lambda:)?([a-z]{2}-(?:[a-z]+-){1,2}\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q doesn't comply with restrictions (%q): %q", - k, pattern, value)) - } - - return -} - -func validateLambdaQualifier(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 128 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 128 characters: %q", k, value)) - } - // http://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html - pattern := `^[a-zA-Z0-9$_-]+$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q doesn't comply with restrictions (%q): %q", - k, pattern, value)) - } - - return -} - -func validateLambdaPermissionAction(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - // http://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html - pattern := `^(lambda:[*]|lambda:[a-zA-Z]+|[*])$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q doesn't comply with restrictions (%q): %q", - k, pattern, value)) - } - - return -} - -func validateLambdaPermissionEventSourceToken(v interface{}, k string) (ws []string, errors []error) { - // https://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html - value := v.(string) - - if len(value) > 256 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 256 characters: %q", k, value)) - } - - pattern := `^[a-zA-Z0-9._\-]+$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q doesn't comply with restrictions (%q): %q", - k, pattern, value)) - } - - return -} - -func validateAwsAccountId(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - // http://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html - pattern := `^\d{12}$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q doesn't look like AWS Account ID (exactly 12 digits): %q", - k, value)) - } - - return -} - -func validateArn(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if value == "" { - return - } - - // http://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html - pattern := `^arn:[\w-]+:([a-zA-Z0-9\-])+:([a-z]{2}-(gov-)?[a-z]+-\d{1})?:(\d{12})?:(.*)$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q doesn't look like a valid ARN (%q): %q", - k, pattern, value)) - } - - return -} - -func validateEC2AutomateARN(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - // https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html - pattern := `^arn:[\w-]+:automate:[\w-]+:ec2:(reboot|recover|stop|terminate)$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q does not match EC2 automation ARN (%q): %q", - k, pattern, value)) - } - - return -} - -func validatePolicyStatementId(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if len(value) > 100 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 100 characters: %q", k, value)) - } - - // http://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html - pattern := `^[a-zA-Z0-9-_]+$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q doesn't look like a valid statement ID (%q): %q", - k, pattern, value)) - } - - return -} - -// validateCIDRNetworkAddress ensures that the string value is a valid CIDR that -// represents a network address - it adds an error otherwise -func validateCIDRNetworkAddress(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - _, ipnet, err := net.ParseCIDR(value) - if err != nil { - errors = append(errors, fmt.Errorf( - "%q must contain a valid CIDR, got error parsing: %s", k, err)) - return - } - - if ipnet == nil || value != ipnet.String() { - errors = append(errors, fmt.Errorf( - "%q must contain a valid network CIDR, got %q", k, value)) - } - - return -} - -func validateHTTPMethod() schema.SchemaValidateFunc { - return validation.StringInSlice([]string{ - "ANY", - "DELETE", - "GET", - "HEAD", - "OPTIONS", - "PATCH", - "POST", - "PUT", - }, false) -} - -func validateLogMetricFilterName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if len(value) > 512 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 512 characters: %q", k, value)) - } - - // http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutMetricFilter.html - pattern := `^[^:*]+$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q isn't a valid log metric name (must not contain colon nor asterisk): %q", - k, value)) - } - - return -} - -func validateLogMetricFilterTransformationName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 255 characters: %q", k, value)) - } - - // http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_MetricTransformation.html - pattern := `^[^:*$]*$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q isn't a valid log metric transformation name (must not contain"+ - " colon, asterisk nor dollar sign): %q", - k, value)) - } - - return -} - -func validateLogGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if len(value) > 512 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 512 characters: %q", k, value)) - } - - // http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateLogGroup.html - pattern := `^[\.\-_/#A-Za-z0-9]+$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q isn't a valid log group name (alphanumeric characters, underscores,"+ - " hyphens, slashes, hash signs and dots are allowed): %q", - k, value)) - } - - return -} - -func validateLogGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if len(value) > 483 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 483 characters: %q", k, value)) - } - - // http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateLogGroup.html - pattern := `^[\.\-_/#A-Za-z0-9]+$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q isn't a valid log group name (alphanumeric characters, underscores,"+ - " hyphens, slashes, hash signs and dots are allowed): %q", - k, value)) - } - - return -} - -func validateS3BucketLifecycleTimestamp(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - _, err := time.Parse(time.RFC3339, fmt.Sprintf("%sT00:00:00Z", value)) - if err != nil { - errors = append(errors, fmt.Errorf( - "%q cannot be parsed as RFC3339 Timestamp Format", value)) - } - - return -} - -func validateS3BucketLifecycleTransitionStorageClass() schema.SchemaValidateFunc { - return validation.StringInSlice([]string{ - s3.TransitionStorageClassGlacier, - s3.TransitionStorageClassStandardIa, - s3.TransitionStorageClassOnezoneIa, - s3.TransitionStorageClassIntelligentTiering, - }, false) -} - -func validateDbEventSubscriptionName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 255 characters", k)) - } - return -} - -func validateIAMPolicyJson(v interface{}, k string) (ws []string, errors []error) { - // IAM Policy documents need to be valid JSON, and pass legacy parsing - value := v.(string) - if len(value) < 1 { - errors = append(errors, fmt.Errorf("%q contains an invalid JSON policy", k)) - return - } - if value[:1] != "{" { - errors = append(errors, fmt.Errorf("%q contains an invalid JSON policy", k)) - return - } - if _, err := structure.NormalizeJsonString(v); err != nil { - errors = append(errors, fmt.Errorf("%q contains an invalid JSON: %s", k, err)) - } - return -} - -func validateCloudFormationTemplate(v interface{}, k string) (ws []string, errors []error) { - if looksLikeJsonString(v) { - if _, err := structure.NormalizeJsonString(v); err != nil { - errors = append(errors, fmt.Errorf("%q contains an invalid JSON: %s", k, err)) - } - } else { - if _, err := checkYamlString(v); err != nil { - errors = append(errors, fmt.Errorf("%q contains an invalid YAML: %s", k, err)) - } - } - return -} - -func validateApiGatewayIntegrationContentHandling() schema.SchemaValidateFunc { - return validation.StringInSlice([]string{ - apigateway.ContentHandlingStrategyConvertToBinary, - apigateway.ContentHandlingStrategyConvertToText, - }, false) -} - -func validateSQSQueueName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 80 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 80 characters", k)) - } - - if !regexp.MustCompile(`^[0-9A-Za-z-_]+(\.fifo)?$`).MatchString(value) { - errors = append(errors, fmt.Errorf("only alphanumeric characters and hyphens allowed in %q", k)) - } - return -} - -func validateSQSNonFifoQueueName(v interface{}) (errors []error) { - k := "name" - value := v.(string) - if len(value) > 80 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 80 characters", k)) - } - - if !regexp.MustCompile(`^[0-9A-Za-z-_]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf("only alphanumeric characters and hyphens allowed in %q", k)) - } - return -} - -func validateSQSFifoQueueName(v interface{}) (errors []error) { - k := "name" - value := v.(string) - - if len(value) > 80 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 80 characters", k)) - } - - if !regexp.MustCompile(`^[0-9A-Za-z-_.]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf("only alphanumeric characters and hyphens allowed in %q", k)) - } - - if regexp.MustCompile(`^[^a-zA-Z0-9-_]`).MatchString(value) { - errors = append(errors, fmt.Errorf("FIFO queue name must start with one of these characters [a-zA-Z0-9-_]: %v", value)) - } - - if !regexp.MustCompile(`\.fifo$`).MatchString(value) { - errors = append(errors, fmt.Errorf("FIFO queue name should end with \".fifo\": %v", value)) - } - - return -} - -func validateOnceAWeekWindowFormat(v interface{}, k string) (ws []string, errors []error) { - // valid time format is "ddd:hh24:mi" - validTimeFormat := "(sun|mon|tue|wed|thu|fri|sat):([0-1][0-9]|2[0-3]):([0-5][0-9])" - validTimeFormatConsolidated := "^(" + validTimeFormat + "-" + validTimeFormat + "|)$" - - value := strings.ToLower(v.(string)) - if !regexp.MustCompile(validTimeFormatConsolidated).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must satisfy the format of \"ddd:hh24:mi-ddd:hh24:mi\".", k)) - } - return -} - -func validateOnceADayWindowFormat(v interface{}, k string) (ws []string, errors []error) { - // valid time format is "hh24:mi" - validTimeFormat := "([0-1][0-9]|2[0-3]):([0-5][0-9])" - validTimeFormatConsolidated := "^(" + validTimeFormat + "-" + validTimeFormat + "|)$" - - value := v.(string) - if !regexp.MustCompile(validTimeFormatConsolidated).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must satisfy the format of \"hh24:mi-hh24:mi\".", k)) - } - return -} - -// Validates that ECS Placement Constraints are set correctly -// Takes type, and expression as strings -func validateAwsEcsPlacementConstraint(constType, constExpr string) error { - switch constType { - case "distinctInstance": - // Expression can be nil for distinctInstance - return nil - case "memberOf": - if constExpr == "" { - return fmt.Errorf("Expression cannot be nil for 'memberOf' type") - } - default: - return fmt.Errorf("Unknown type provided: %q", constType) - } - return nil -} - -// http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_CreateGlobalTable.html -func validateAwsDynamoDbGlobalTableName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if (len(value) > 255) || (len(value) < 3) { - errors = append(errors, fmt.Errorf("%s length must be between 3 and 255 characters: %q", k, value)) - } - pattern := `^[a-zA-Z0-9_.-]+$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf("%s must only include alphanumeric, underscore, period, or hyphen characters: %q", k, value)) - } - return -} - -// Validates that an Ecs placement strategy is set correctly -// Takes type, and field as strings -func validateAwsEcsPlacementStrategy(stratType, stratField string) error { - switch stratType { - case "random": - // random requires the field attribute to be unset. - if stratField != "" { - return fmt.Errorf("Random type requires the field attribute to be unset. Got: %s", - stratField) - } - case "spread": - // For the spread placement strategy, valid values are instanceId - // (or host, which has the same effect), or any platform or custom attribute - // that is applied to a container instance - // stratField is already cased to a string - return nil - case "binpack": - if stratField != "cpu" && stratField != "memory" { - return fmt.Errorf("Binpack type requires the field attribute to be either 'cpu' or 'memory'. Got: %s", - stratField) - } - default: - return fmt.Errorf("Unknown type %s. Must be one of 'random', 'spread', or 'binpack'.", stratType) - } - return nil -} - -func validateAwsEmrEbsVolumeType() schema.SchemaValidateFunc { - return validation.StringInSlice([]string{ - "gp2", - "io1", - "standard", - "st1", - }, false) -} - -func validateAwsEmrCustomAmiId(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 256 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 256 characters", k)) - } - - if !regexp.MustCompile(`^ami\-[a-z0-9]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must begin with 'ami-' and be comprised of only [a-z0-9]: %v", k, value)) - } - - return -} - -func validateSfnStateMachineName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 80 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 80 characters", k)) - } - - if !regexp.MustCompile(`^[a-zA-Z0-9-_]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must be composed with only these characters [a-zA-Z0-9-_]: %v", k, value)) - } - return -} - -func validateDmsCertificateId(v interface{}, k string) (ws []string, es []error) { - val := v.(string) - - if len(val) > 255 { - es = append(es, fmt.Errorf("%q must not be longer than 255 characters", k)) - } - if !regexp.MustCompile("^[a-zA-Z][a-zA-Z0-9-]+$").MatchString(val) { - es = append(es, fmt.Errorf("%q must start with a letter, only contain alphanumeric characters and hyphens", k)) - } - if strings.Contains(val, "--") { - es = append(es, fmt.Errorf("%q must not contain consecutive hyphens", k)) - } - if strings.HasSuffix(val, "-") { - es = append(es, fmt.Errorf("%q must not end in a hyphen", k)) - } - - return -} - -func validateDmsEndpointId(v interface{}, k string) (ws []string, es []error) { - val := v.(string) - - if len(val) > 255 { - es = append(es, fmt.Errorf("%q must not be longer than 255 characters", k)) - } - if !regexp.MustCompile("^[a-zA-Z][a-zA-Z0-9-]+$").MatchString(val) { - es = append(es, fmt.Errorf("%q must start with a letter, only contain alphanumeric characters and hyphens", k)) - } - if strings.Contains(val, "--") { - es = append(es, fmt.Errorf("%q must not contain consecutive hyphens", k)) - } - if strings.HasSuffix(val, "-") { - es = append(es, fmt.Errorf("%q must not end in a hyphen", k)) - } - - return -} - -func validateDmsReplicationInstanceId(v interface{}, k string) (ws []string, es []error) { - val := v.(string) - - if len(val) > 63 { - es = append(es, fmt.Errorf("%q must not be longer than 63 characters", k)) - } - if !regexp.MustCompile("^[a-zA-Z][a-zA-Z0-9-]+$").MatchString(val) { - es = append(es, fmt.Errorf("%q must start with a letter, only contain alphanumeric characters and hyphens", k)) - } - if strings.Contains(val, "--") { - es = append(es, fmt.Errorf("%q must not contain consecutive hyphens", k)) - } - if strings.HasSuffix(val, "-") { - es = append(es, fmt.Errorf("%q must not end in a hyphen", k)) - } - - return -} - -func validateDmsReplicationSubnetGroupId(v interface{}, k string) (ws []string, es []error) { - val := v.(string) - - if val == "default" { - es = append(es, fmt.Errorf("%q must not be default", k)) - } - if len(val) > 255 { - es = append(es, fmt.Errorf("%q must not be longer than 255 characters", k)) - } - if !regexp.MustCompile(`^[a-zA-Z0-9. _-]+$`).MatchString(val) { - es = append(es, fmt.Errorf("%q must only contain alphanumeric characters, periods, spaces, underscores and hyphens", k)) - } - - return -} - -func validateDmsReplicationTaskId(v interface{}, k string) (ws []string, es []error) { - val := v.(string) - - if len(val) > 255 { - es = append(es, fmt.Errorf("%q must not be longer than 255 characters", k)) - } - if !regexp.MustCompile("^[a-zA-Z][a-zA-Z0-9-]+$").MatchString(val) { - es = append(es, fmt.Errorf("%q must start with a letter, only contain alphanumeric characters and hyphens", k)) - } - if strings.Contains(val, "--") { - es = append(es, fmt.Errorf("%q must not contain consecutive hyphens", k)) - } - if strings.HasSuffix(val, "-") { - es = append(es, fmt.Errorf("%q must not end in a hyphen", k)) - } - - return -} - -func validateConfigExecutionFrequency() schema.SchemaValidateFunc { - return validation.StringInSlice([]string{ - configservice.MaximumExecutionFrequencyOneHour, - configservice.MaximumExecutionFrequencyThreeHours, - configservice.MaximumExecutionFrequencySixHours, - configservice.MaximumExecutionFrequencyTwelveHours, - configservice.MaximumExecutionFrequencyTwentyFourHours, - }, false) -} - -func validateAccountAlias(v interface{}, k string) (ws []string, es []error) { - val := v.(string) - - if (len(val) < 3) || (len(val) > 63) { - es = append(es, fmt.Errorf("%q must contain from 3 to 63 alphanumeric characters or hyphens", k)) - } - if !regexp.MustCompile("^[a-z0-9][a-z0-9-]+$").MatchString(val) { - es = append(es, fmt.Errorf("%q must start with an alphanumeric character and only contain lowercase alphanumeric characters and hyphens", k)) - } - if strings.Contains(val, "--") { - es = append(es, fmt.Errorf("%q must not contain consecutive hyphens", k)) - } - if strings.HasSuffix(val, "-") { - es = append(es, fmt.Errorf("%q must not end in a hyphen", k)) - } - return -} - -func validateIamRolePolicyName(v interface{}, k string) (ws []string, errors []error) { - // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8291-L8296 - value := v.(string) - if len(value) > 128 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 128 characters", k)) - } - if !regexp.MustCompile(`^[\w+=,.@-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf(`%q must match [\w+=,.@-]`, k)) - } - return -} - -func validateIamRolePolicyNamePrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 100 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 100 characters", k)) - } - if !regexp.MustCompile(`^[\w+=,.@-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf(`%q must match [\w+=,.@-]`, k)) - } - return -} - -func validateApiGatewayUsagePlanQuotaSettings(v map[string]interface{}) (errors []error) { - period := v["period"].(string) - offset := v["offset"].(int) - - if period == apigateway.QuotaPeriodTypeDay && offset != 0 { - errors = append(errors, fmt.Errorf("Usage Plan quota offset must be zero in the DAY period")) - } - - if period == apigateway.QuotaPeriodTypeWeek && (offset < 0 || offset > 6) { - errors = append(errors, fmt.Errorf("Usage Plan quota offset must be between 0 and 6 inclusive in the WEEK period")) - } - - if period == apigateway.QuotaPeriodTypeMonth && (offset < 0 || offset > 27) { - errors = append(errors, fmt.Errorf("Usage Plan quota offset must be between 0 and 27 inclusive in the MONTH period")) - } - - return -} - -func validateDbSubnetGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[ .0-9a-z-_]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters, hyphens, underscores, periods, and spaces allowed in %q", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 255 characters", k)) - } - if regexp.MustCompile(`(?i)^default$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q is not allowed as %q", "Default", k)) - } - return -} - -func validateDocDBSubnetGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[ .0-9a-z-_]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters, hyphens, underscores, periods, and spaces allowed in %q", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 255 characters", k)) - } - if value == "default" { - errors = append(errors, fmt.Errorf( - "%q is not allowed as %q", "Default", k)) - } - return -} - -func validateNeptuneSubnetGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[ .0-9a-z-_]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters, hyphens, underscores, periods, and spaces allowed in %q", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 255 characters", k)) - } - if value == "default" { - errors = append(errors, fmt.Errorf( - "%q is not allowed as %q", "Default", k)) - } - return -} - -func validateDbSubnetGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[ .0-9a-z-_]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters, hyphens, underscores, periods, and spaces allowed in %q", k)) - } - if len(value) > 229 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 229 characters", k)) - } - return -} - -func validateDocDBSubnetGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[ .0-9a-z-_]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters, hyphens, underscores, periods, and spaces allowed in %q", k)) - } - prefixMaxLength := 255 - resource.UniqueIDSuffixLength - if len(value) > prefixMaxLength { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than %d characters", k, prefixMaxLength)) - } - return -} - -func validateNeptuneSubnetGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[ .0-9a-z-_]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters, hyphens, underscores, periods, and spaces allowed in %q", k)) - } - prefixMaxLength := 255 - resource.UniqueIDSuffixLength - if len(value) > prefixMaxLength { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than %d characters", k, prefixMaxLength)) - } - return -} - -func validateDbOptionGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than 255 characters", k)) - } - return -} - -func validateDbOptionGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - if len(value) > 229 { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than 229 characters", k)) - } - return -} - -func validateOpenIdURL(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - u, err := url.Parse(value) - if err != nil { - errors = append(errors, fmt.Errorf("%q has to be a valid URL", k)) - return - } - if u.Scheme != "https" { - errors = append(errors, fmt.Errorf("%q has to use HTTPS scheme (i.e. begin with https://)", k)) - } - if len(u.Query()) > 0 { - errors = append(errors, fmt.Errorf("%q cannot contain query parameters per the OIDC standard", k)) - } - return -} - -func validateAwsKmsName(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if !regexp.MustCompile(`^(alias\/)[a-zA-Z0-9:/_-]+$`).MatchString(value) { - es = append(es, fmt.Errorf( - "%q must begin with 'alias/' and be comprised of only [a-zA-Z0-9:/_-]", k)) - } - return -} - -func validateAwsKmsGrantName(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - - if len(value) > 256 { - es = append(es, fmt.Errorf("%s can not be greater than 256 characters", k)) - } - - if !regexp.MustCompile(`^[a-zA-Z0-9:/_-]+$`).MatchString(value) { - es = append(es, fmt.Errorf("%s must only contain [a-zA-Z0-9:/_-]", k)) - } - - return -} - -func validateCognitoIdentityPoolName(v interface{}, k string) (ws []string, errors []error) { - val := v.(string) - if !regexp.MustCompile(`^[\w _]+$`).MatchString(val) { - errors = append(errors, fmt.Errorf("%q must contain only alphanumeric characters and spaces", k)) - } - - return -} - -func validateCognitoProviderDeveloperName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 100 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 100 characters", k)) - } - - if !regexp.MustCompile(`^[\w._-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q must contain only alphanumeric characters, dots, underscores and hyphens", k)) - } - - return -} - -func validateCognitoSupportedLoginProviders(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) < 1 { - errors = append(errors, fmt.Errorf("%q cannot be less than 1 character", k)) - } - - if len(value) > 128 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 128 characters", k)) - } - - if !regexp.MustCompile(`^[\w.;_/-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q must contain only alphanumeric characters, dots, semicolons, underscores, slashes and hyphens", k)) - } - - return -} - -func validateCognitoIdentityProvidersClientId(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) < 1 { - errors = append(errors, fmt.Errorf("%q cannot be less than 1 character", k)) - } - - if len(value) > 128 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 128 characters", k)) - } - - if !regexp.MustCompile(`^[\w_]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q must contain only alphanumeric characters and underscores", k)) - } - - return -} - -func validateCognitoIdentityProvidersProviderName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) < 1 { - errors = append(errors, fmt.Errorf("%q cannot be less than 1 character", k)) - } - - if len(value) > 128 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 128 characters", k)) - } - - if !regexp.MustCompile(`^[\w._:/-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q must contain only alphanumeric characters, dots, underscores, colons, slashes and hyphens", k)) - } - - return -} - -func validateCognitoUserGroupName(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if len(value) < 1 { - es = append(es, fmt.Errorf("%q cannot be less than 1 character", k)) - } - - if len(value) > 128 { - es = append(es, fmt.Errorf("%q cannot be longer than 128 character", k)) - } - - if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}]+`).MatchString(value) { - es = append(es, fmt.Errorf(`%q must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+`, k)) - } - return -} - -func validateCognitoUserPoolEmailVerificationMessage(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if len(value) < 6 { - es = append(es, fmt.Errorf("%q cannot be less than 6 characters", k)) - } - - if len(value) > 20000 { - es = append(es, fmt.Errorf("%q cannot be longer than 20000 characters", k)) - } - - if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*\{####\}[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*`).MatchString(value) { - es = append(es, fmt.Errorf("%q does not contain {####}", k)) - } - return -} - -func validateCognitoUserPoolEmailVerificationSubject(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if len(value) < 6 { - es = append(es, fmt.Errorf("%q cannot be less than 6 characters", k)) - } - - if len(value) > 140 { - es = append(es, fmt.Errorf("%q cannot be longer than 140 characters", k)) - } - - if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}\s]+`).MatchString(value) { - es = append(es, fmt.Errorf("%q can be composed of any kind of letter, symbols, numeric character, punctuation and whitespaces", k)) - } - return -} - -func validateCognitoUserPoolId(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if !regexp.MustCompile(`^[\w-]+_[0-9a-zA-Z]+$`).MatchString(value) { - es = append(es, fmt.Errorf("%q must be the region name followed by an underscore and then alphanumeric pattern", k)) - } - return -} - -func validateCognitoUserPoolSmsAuthenticationMessage(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if len(value) < 6 { - es = append(es, fmt.Errorf("%q cannot be less than 6 characters", k)) - } - - if len(value) > 140 { - es = append(es, fmt.Errorf("%q cannot be longer than 140 characters", k)) - } - - if !regexp.MustCompile(`.*\{####\}.*`).MatchString(value) { - es = append(es, fmt.Errorf("%q does not contain {####}", k)) - } - return -} - -func validateCognitoUserPoolSmsVerificationMessage(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if len(value) < 6 { - es = append(es, fmt.Errorf("%q cannot be less than 6 characters", k)) - } - - if len(value) > 140 { - es = append(es, fmt.Errorf("%q cannot be longer than 140 characters", k)) - } - - if !regexp.MustCompile(`.*\{####\}.*`).MatchString(value) { - es = append(es, fmt.Errorf("%q does not contain {####}", k)) - } - return -} - -func validateCognitoUserPoolTemplateEmailMessage(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if len(value) < 6 { - es = append(es, fmt.Errorf("%q cannot be less than 6 characters", k)) - } - - if len(value) > 20000 { - es = append(es, fmt.Errorf("%q cannot be longer than 20000 characters", k)) - } - - if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*\{####\}[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*`).MatchString(value) { - es = append(es, fmt.Errorf("%q does not contain {####}", k)) - } - return -} - -func validateCognitoUserPoolTemplateEmailMessageByLink(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if len(value) < 1 { - es = append(es, fmt.Errorf("%q cannot be less than 1 character", k)) - } - - if len(value) > 20000 { - es = append(es, fmt.Errorf("%q cannot be longer than 20000 characters", k)) - } - - if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*\{##[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*##\}[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*`).MatchString(value) { - es = append(es, fmt.Errorf(`%q must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*\{##[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*##\}[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*`, k)) - } - return -} - -func validateCognitoUserPoolTemplateEmailSubject(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if len(value) < 1 { - es = append(es, fmt.Errorf("%q cannot be less than 1 character", k)) - } - - if len(value) > 140 { - es = append(es, fmt.Errorf("%q cannot be longer than 140 characters", k)) - } - - if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}\s]+`).MatchString(value) { - es = append(es, fmt.Errorf(`%q must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}\s]+`, k)) - } - return -} - -func validateCognitoUserPoolTemplateEmailSubjectByLink(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if len(value) < 1 { - es = append(es, fmt.Errorf("%q cannot be less than 1 character", k)) - } - - if len(value) > 140 { - es = append(es, fmt.Errorf("%q cannot be longer than 140 characters", k)) - } - - if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}\s]+`).MatchString(value) { - es = append(es, fmt.Errorf(`%q must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}\s]+`, k)) - } - return -} - -func validateCognitoUserPoolTemplateSmsMessage(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if len(value) < 6 { - es = append(es, fmt.Errorf("%q cannot be less than 6 characters", k)) - } - - if len(value) > 140 { - es = append(es, fmt.Errorf("%q cannot be longer than 140 characters", k)) - } - - if !regexp.MustCompile(`.*\{####\}.*`).MatchString(value) { - es = append(es, fmt.Errorf("%q does not contain {####}", k)) - } - return -} - -func validateCognitoUserPoolInviteTemplateEmailMessage(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if len(value) < 6 { - es = append(es, fmt.Errorf("%q cannot be less than 6 characters", k)) - } - - if len(value) > 20000 { - es = append(es, fmt.Errorf("%q cannot be longer than 20000 characters", k)) - } - - if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*\{####\}[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*`).MatchString(value) { - es = append(es, fmt.Errorf("%q does not contain {####}", k)) - } - - if !regexp.MustCompile(`.*\{username\}.*`).MatchString(value) { - es = append(es, fmt.Errorf("%q does not contain {username}", k)) - } - return -} - -func validateCognitoUserPoolInviteTemplateSmsMessage(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if len(value) < 6 { - es = append(es, fmt.Errorf("%q cannot be less than 6 characters", k)) - } - - if len(value) > 140 { - es = append(es, fmt.Errorf("%q cannot be longer than 140 characters", k)) - } - - if !regexp.MustCompile(`.*\{####\}.*`).MatchString(value) { - es = append(es, fmt.Errorf("%q does not contain {####}", k)) - } - - if !regexp.MustCompile(`.*\{username\}.*`).MatchString(value) { - es = append(es, fmt.Errorf("%q does not contain {username}", k)) - } - return -} - -func validateCognitoUserPoolReplyEmailAddress(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}]+@[\p{L}\p{M}\p{S}\p{N}\p{P}]+`).MatchString(value) { - errors = append(errors, fmt.Errorf( - `%q must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+@[\p{L}\p{M}\p{S}\p{N}\p{P}]+`, k)) - } - return -} - -func validateCognitoUserPoolSchemaName(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if len(value) < 1 { - es = append(es, fmt.Errorf("%q cannot be less than 1 character", k)) - } - - if len(value) > 20 { - es = append(es, fmt.Errorf("%q cannot be longer than 20 character", k)) - } - - if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}]+`).MatchString(value) { - es = append(es, fmt.Errorf(`%q must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+`, k)) - } - return -} - -func validateCognitoUserPoolClientURL(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - if len(value) < 1 { - es = append(es, fmt.Errorf("%q cannot be less than 1 character", k)) - } - - if len(value) > 1024 { - es = append(es, fmt.Errorf("%q cannot be longer than 1024 character", k)) - } - - if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}]+`).MatchString(value) { - es = append(es, fmt.Errorf(`%q must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+`, k)) - } - return -} - -func validateCognitoResourceServerScopeName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if len(value) < 1 { - errors = append(errors, fmt.Errorf("%q cannot be less than 1 character", k)) - } - if len(value) > 256 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 256 character", k)) - } - if !regexp.MustCompile(`[\x21\x23-\x2E\x30-\x5B\x5D-\x7E]+`).MatchString(value) { - errors = append(errors, fmt.Errorf(`%q must satisfy regular expression pattern: [\x21\x23-\x2E\x30-\x5B\x5D-\x7E]+`, k)) - } - return -} - -func validateWafMetricName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "Only alphanumeric characters allowed in %q: %q", - k, value)) - } - return -} - -func validateWafPredicatesType() schema.SchemaValidateFunc { - return validation.StringInSlice([]string{ - waf.PredicateTypeByteMatch, - waf.PredicateTypeGeoMatch, - waf.PredicateTypeIpmatch, - waf.PredicateTypeRegexMatch, - waf.PredicateTypeSizeConstraint, - waf.PredicateTypeSqlInjectionMatch, - waf.PredicateTypeXssMatch, - }, false) -} - -func validateIamRoleDescription(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if len(value) > 1000 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 1000 characters", k)) - } - - if !regexp.MustCompile(`[\p{L}\p{M}\p{Z}\p{S}\p{N}\p{P}]*`).MatchString(value) { - errors = append(errors, fmt.Errorf( - `Only alphanumeric & accented characters allowed in %q: %q (Must satisfy regular expression pattern: [\p{L}\p{M}\p{Z}\p{S}\p{N}\p{P}]*)`, - k, value)) - } - return -} - -func validateAwsSSMName(v interface{}, k string) (ws []string, errors []error) { - // http://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateDocument.html#EC2-CreateDocument-request-Name - value := v.(string) - - if !regexp.MustCompile(`^[a-zA-Z0-9_\-.]{3,128}$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - `Only alphanumeric characters, hyphens, dots & underscores allowed in %q: %q (Must satisfy regular expression pattern: ^[a-zA-Z0-9_\-.]{3,128}$)`, - k, value)) - } - - return -} - -func validateAwsSSMMaintenanceWindowTaskName(v interface{}, k string) (ws []string, errors []error) { - // https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_RegisterTaskWithMaintenanceWindow.html#systemsmanager-RegisterTaskWithMaintenanceWindow-request-Name - value := v.(string) - - if !regexp.MustCompile(`^[a-zA-Z0-9_\-.]{3,128}$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "Only alphanumeric characters, hyphens, dots & underscores allowed in %q: %q (Must satisfy regular expression pattern: ^[a-zA-Z0-9_\\-.]{3,128}$)", - k, value)) - } - - return -} - -func validateBatchName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-zA-Z]{1}[0-9a-zA-Z_\-]{0,127}$`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q (%q) must be up to 128 letters (uppercase and lowercase), numbers, underscores and dashes, and must start with an alphanumeric.", k, v)) - } - return -} - -func validateSecurityGroupRuleDescription(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 255 characters: %q", k, value)) - } - - // https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IpRange.html. Note that - // "" is an allowable description value. - pattern := `^[A-Za-z0-9 \.\_\-\:\/\(\)\#\,\@\[\]\+\=\;\{\}\!\$\*]*$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q doesn't comply with restrictions (%q): %q", - k, pattern, value)) - } - return -} - -func validateIoTTopicRuleName(v interface{}, s string) ([]string, []error) { - name := v.(string) - if len(name) < 1 || len(name) > 128 { - return nil, []error{fmt.Errorf("Name must between 1 and 128 characters long")} - } - - matched, err := regexp.MatchReader("^[a-zA-Z0-9_]+$", strings.NewReader(name)) - - if err != nil { - return nil, []error{err} - } - - if !matched { - return nil, []error{fmt.Errorf("Name must match the pattern ^[a-zA-Z0-9_]+$")} - } - - return nil, nil -} - -func validateIoTTopicRuleCloudWatchAlarmStateValue(v interface{}, s string) ([]string, []error) { - switch v.(string) { - case - "OK", - "ALARM", - "INSUFFICIENT_DATA": - return nil, nil - } - - return nil, []error{fmt.Errorf("State must be one of OK, ALARM, or INSUFFICIENT_DATA")} -} - -func validateIoTTopicRuleCloudWatchMetricTimestamp(v interface{}, s string) ([]string, []error) { - dateString := v.(string) - - // https://docs.aws.amazon.com/iot/latest/apireference/API_CloudwatchMetricAction.html - if _, err := time.Parse(time.RFC3339, dateString); err != nil { - return nil, []error{err} - } - return nil, nil -} - -func validateIoTTopicRuleElasticSearchEndpoint(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - // https://docs.aws.amazon.com/iot/latest/apireference/API_ElasticsearchAction.html - if !regexp.MustCompile(`https?://.*`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q should be an URL: %q", - k, value)) - } - return -} - -func validateIoTTopicRuleFirehoseSeparator(v interface{}, s string) ([]string, []error) { - switch v.(string) { - case - ",", - "\t", - "\n", - "\r\n": - return nil, nil - } - - return nil, []error{fmt.Errorf(`Separator must be one of ',' (comma), '\t' (tab) '\n' (newline) or '\r\n' (Windows newline)`)} -} - -func validateCognitoRoleMappingsAmbiguousRoleResolutionAgainstType(v map[string]interface{}) (errors []error) { - t := v["type"].(string) - isRequired := t == cognitoidentity.RoleMappingTypeToken || t == cognitoidentity.RoleMappingTypeRules - - if value, ok := v["ambiguous_role_resolution"]; (!ok || value == "") && isRequired { - errors = append(errors, fmt.Errorf(`Ambiguous Role Resolution must be defined when "type" equals "Token" or "Rules"`)) - } - - return -} - -func validateCognitoRoleMappingsRulesConfiguration(v map[string]interface{}) (errors []error) { - t := v["type"].(string) - valLength := 0 - if value, ok := v["mapping_rule"]; ok { - valLength = len(value.([]interface{})) - } - - if (valLength == 0) && t == cognitoidentity.RoleMappingTypeRules { - errors = append(errors, fmt.Errorf("mapping_rule is required for Rules")) - } - - if (valLength > 0) && t == cognitoidentity.RoleMappingTypeToken { - errors = append(errors, fmt.Errorf("mapping_rule must not be set for Token based role mapping")) - } - - return -} - -func validateCognitoRoleMappingsRulesClaim(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if !regexp.MustCompile(`^[\p{L}\p{M}\p{S}\p{N}\p{P}]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q must contain only alphanumeric characters, dots, underscores, colons, slashes and hyphens", k)) - } - - return -} - -// Validates that either authenticated or unauthenticated is defined -func validateCognitoRoles(v map[string]interface{}) (errors []error) { - k := "roles" - _, hasAuthenticated := v["authenticated"].(string) - _, hasUnauthenticated := v["unauthenticated"].(string) - - if !hasAuthenticated && !hasUnauthenticated { - errors = append(errors, fmt.Errorf("%q: Either \"authenticated\" or \"unauthenticated\" must be defined", k)) - } - - return -} - -func validateDxConnectionBandWidth() schema.SchemaValidateFunc { - return validation.StringInSlice([]string{ - "1Gbps", - "10Gbps", - "50Mbps", - "100Mbps", - "200Mbps", - "300Mbps", - "400Mbps", - "500Mbps"}, false) -} - -func validateKmsKey(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - arnPrefixPattern := `arn:[^:]+:kms:[^:]+:[^:]+:` - keyIdPattern := "[A-Za-z0-9-]+" - keyArnPattern := arnPrefixPattern + "key/" + keyIdPattern - aliasNamePattern := "alias/[a-zA-Z0-9:/_-]+" - aliasArnPattern := arnPrefixPattern + aliasNamePattern - if !regexp.MustCompile(fmt.Sprintf("^%s$", keyIdPattern)).MatchString(value) && - !regexp.MustCompile(fmt.Sprintf("^%s$", keyArnPattern)).MatchString(value) && - !regexp.MustCompile(fmt.Sprintf("^%s$", aliasNamePattern)).MatchString(value) && - !regexp.MustCompile(fmt.Sprintf("^%s$", aliasArnPattern)).MatchString(value) { - errors = append(errors, fmt.Errorf("%q must be one of the following patterns: %s, %s, %s or %s", k, keyIdPattern, keyArnPattern, aliasNamePattern, aliasArnPattern)) - } - return -} - -func validateAwsElastiCacheReplicationGroupAuthToken(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if (len(value) < 16) || (len(value) > 128) { - errors = append(errors, fmt.Errorf( - "%q must contain from 16 to 128 alphanumeric characters or symbols (excluding @, \", and /)", k)) - } - if !regexp.MustCompile(`^[^@"\/]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters or symbols (excluding @, \", and /) allowed in %q", k)) - } - return -} - -func validateDynamoDbStreamSpec(d *schema.ResourceDiff) error { - enabled := d.Get("stream_enabled").(bool) - if enabled { - if v, ok := d.GetOk("stream_view_type"); ok { - value := v.(string) - if len(value) == 0 { - return errors.New("stream_view_type must be non-empty when stream_enabled = true") - } - return nil - } - return errors.New("stream_view_type is required when stream_enabled = true") - } - return nil -} - -func validateAmazonSideAsn(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - // http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVpnGateway.html - asn, err := strconv.ParseInt(value, 10, 64) - if err != nil { - errors = append(errors, fmt.Errorf("%q (%q) must be a 64-bit integer", k, v)) - return - } - - // https://github.com/terraform-providers/terraform-provider-aws/issues/5263 - isLegacyAsn := func(a int64) bool { - return a == 7224 || a == 9059 || a == 10124 || a == 17493 - } - - if !isLegacyAsn(asn) && ((asn < 64512) || (asn > 65534 && asn < 4200000000) || (asn > 4294967294)) { - errors = append(errors, fmt.Errorf("%q (%q) must be 7224, 9059, 10124 or 17493 or in the range 64512 to 65534 or 4200000000 to 4294967294", k, v)) - } - return -} - -func validateIotThingTypeName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`[a-zA-Z0-9:_-]+`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters, colons, underscores and hyphens allowed in %q", k)) - } - return -} - -func validateIotThingTypeDescription(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 2028 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 2028 characters", k)) - } - if !regexp.MustCompile(`[\\p{Graph}\\x20]*`).MatchString(value) { - errors = append(errors, fmt.Errorf( - `%q must match pattern [\p{Graph}\x20]*`, k)) - } - return -} - -func validateIotThingTypeSearchableAttribute(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 128 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 128 characters", k)) - } - if !regexp.MustCompile(`[a-zA-Z0-9_.,@/:#-]+`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters, underscores, dots, commas, arobases, slashes, colons, hashes and hyphens allowed in %q", k)) - } - return -} - -func validateDynamoDbTableAttributes(d *schema.ResourceDiff) error { - // Collect all indexed attributes - primaryHashKey := d.Get("hash_key").(string) - indexedAttributes := map[string]bool{ - primaryHashKey: true, - } - if v, ok := d.GetOk("range_key"); ok { - indexedAttributes[v.(string)] = true - } - if v, ok := d.GetOk("local_secondary_index"); ok { - indexes := v.(*schema.Set).List() - for _, idx := range indexes { - index := idx.(map[string]interface{}) - rangeKey := index["range_key"].(string) - indexedAttributes[rangeKey] = true - } - } - if v, ok := d.GetOk("global_secondary_index"); ok { - indexes := v.(*schema.Set).List() - for _, idx := range indexes { - index := idx.(map[string]interface{}) - - hashKey := index["hash_key"].(string) - indexedAttributes[hashKey] = true - - if rk, ok := index["range_key"]; ok { - indexedAttributes[rk.(string)] = true - } - } - } - - // Check if all indexed attributes have an attribute definition - attributes := d.Get("attribute").(*schema.Set).List() - missingAttrDefs := []string{} - for _, attr := range attributes { - attribute := attr.(map[string]interface{}) - attrName := attribute["name"].(string) - - if _, ok := indexedAttributes[attrName]; !ok { - missingAttrDefs = append(missingAttrDefs, attrName) - } - } - - if len(missingAttrDefs) > 0 { - return fmt.Errorf("All attributes must be indexed. Unused attributes: %q", missingAttrDefs) - } - - return nil -} - -func validateLaunchTemplateName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) < 3 { - errors = append(errors, fmt.Errorf("%q cannot be less than 3 characters", k)) - } else if strings.HasSuffix(k, "prefix") && len(value) > 99 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 99 characters, name is limited to 125", k)) - } else if !strings.HasSuffix(k, "prefix") && len(value) > 125 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 125 characters", k)) - } else if !regexp.MustCompile(`^[0-9a-zA-Z()./_\-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q can only alphanumeric characters and ()./_- symbols", k)) - } - return -} - -func validateLaunchTemplateId(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) < 1 { - errors = append(errors, fmt.Errorf("%q cannot be shorter than 1 character", k)) - } else if len(value) > 255 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 255 characters", k)) - } else if !regexp.MustCompile(`^lt\-[a-z0-9]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must begin with 'lt-' and be comprised of only alphanumeric characters: %v", k, value)) - } - return -} - -func validateNeptuneParamGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than 255 characters", k)) - } - return -} - -func validateNeptuneParamGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - prefixMaxLength := 255 - resource.UniqueIDSuffixLength - if len(value) > prefixMaxLength { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than %d characters", k, prefixMaxLength)) - } - return -} - -func validateNeptuneEventSubscriptionName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than 255 characters", k)) - } - return -} - -func validateNeptuneEventSubscriptionNamePrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) - } - prefixMaxLength := 255 - resource.UniqueIDSuffixLength - if len(value) > prefixMaxLength { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than %d characters", k, prefixMaxLength)) - } - return -} - -func validateCloudFrontPublicKeyName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z_-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters, underscores and hyphens allowed in %q", k)) - } - if len(value) > 128 { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than 128 characters", k)) - } - return -} - -func validateCloudFrontPublicKeyNamePrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z_-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters, underscores and hyphens allowed in %q", k)) - } - prefixMaxLength := 128 - resource.UniqueIDSuffixLength - if len(value) > prefixMaxLength { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than %d characters", k, prefixMaxLength)) - } - return -} - -func validateServiceDiscoveryHttpNamespaceName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z_-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters, underscores and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-zA-Z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if !regexp.MustCompile(`[a-zA-Z]$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "last character of %q must be a letter", k)) - } - if len(value) > 1024 { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than 1024 characters", k)) - } - return -} - -func validateLbTargetGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 32 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 32 characters", k)) - } - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) - } - if regexp.MustCompile(`^-`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot begin with a hyphen", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) - } - return -} - -func validateSecretManagerSecretName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z/_+=.@-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and /_+=.@- special characters are allowed in %q", k)) - } - if len(value) > 512 { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than 512 characters", k)) - } - return -} - -func validateLbTargetGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - prefixMaxLength := 32 - resource.UniqueIDSuffixLength - if len(value) > prefixMaxLength { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than %d characters", k, prefixMaxLength)) - } - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) - } - if regexp.MustCompile(`^-`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot begin with a hyphen", k)) - } - return -} - -func validateSecretManagerSecretNamePrefix(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z/_+=.@-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and /_+=.@- special characters are allowed in %q", k)) - } - prefixMaxLength := 512 - resource.UniqueIDSuffixLength - if len(value) > prefixMaxLength { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than %d characters", k, prefixMaxLength)) - } - return -} - -func validateWorklinkFleetName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[a-z0-9](?:[a-z0-9\-]{0,46}[a-z0-9])?$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters are allowed in %q", k)) - } - if len(value) < 1 { - errors = append(errors, fmt.Errorf("%q cannot be shorter than 1 character", k)) - } else if len(value) > 48 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 48 characters", k)) - } - - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_helpers.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_helpers.go deleted file mode 100644 index b9e6403ce..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_helpers.go +++ /dev/null @@ -1,364 +0,0 @@ -package aws - -import ( - "bytes" - "fmt" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/schema" -) - -func wafSizeConstraintSetSchema() map[string]*schema.Schema { - return map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "size_constraints": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "field_to_match": { - Type: schema.TypeSet, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "data": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "comparison_operator": { - Type: schema.TypeString, - Required: true, - }, - "size": { - Type: schema.TypeInt, - Required: true, - }, - "text_transformation": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - } -} - -func diffWafSizeConstraints(oldS, newS []interface{}) []*waf.SizeConstraintSetUpdate { - updates := make([]*waf.SizeConstraintSetUpdate, 0) - - for _, os := range oldS { - constraint := os.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newS, constraint); contains { - newS = append(newS[:idx], newS[idx+1:]...) - continue - } - - updates = append(updates, &waf.SizeConstraintSetUpdate{ - Action: aws.String(waf.ChangeActionDelete), - SizeConstraint: &waf.SizeConstraint{ - FieldToMatch: expandFieldToMatch(constraint["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), - ComparisonOperator: aws.String(constraint["comparison_operator"].(string)), - Size: aws.Int64(int64(constraint["size"].(int))), - TextTransformation: aws.String(constraint["text_transformation"].(string)), - }, - }) - } - - for _, ns := range newS { - constraint := ns.(map[string]interface{}) - - updates = append(updates, &waf.SizeConstraintSetUpdate{ - Action: aws.String(waf.ChangeActionInsert), - SizeConstraint: &waf.SizeConstraint{ - FieldToMatch: expandFieldToMatch(constraint["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), - ComparisonOperator: aws.String(constraint["comparison_operator"].(string)), - Size: aws.Int64(int64(constraint["size"].(int))), - TextTransformation: aws.String(constraint["text_transformation"].(string)), - }, - }) - } - return updates -} - -func flattenWafSizeConstraints(sc []*waf.SizeConstraint) []interface{} { - out := make([]interface{}, len(sc)) - for i, c := range sc { - m := make(map[string]interface{}) - m["comparison_operator"] = *c.ComparisonOperator - if c.FieldToMatch != nil { - m["field_to_match"] = flattenFieldToMatch(c.FieldToMatch) - } - m["size"] = *c.Size - m["text_transformation"] = *c.TextTransformation - out[i] = m - } - return out -} - -func flattenWafGeoMatchConstraint(ts []*waf.GeoMatchConstraint) []interface{} { - out := make([]interface{}, len(ts)) - for i, t := range ts { - m := make(map[string]interface{}) - m["type"] = *t.Type - m["value"] = *t.Value - out[i] = m - } - return out -} - -func diffWafGeoMatchSetConstraints(oldT, newT []interface{}) []*waf.GeoMatchSetUpdate { - updates := make([]*waf.GeoMatchSetUpdate, 0) - - for _, od := range oldT { - constraint := od.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newT, constraint); contains { - newT = append(newT[:idx], newT[idx+1:]...) - continue - } - - updates = append(updates, &waf.GeoMatchSetUpdate{ - Action: aws.String(waf.ChangeActionDelete), - GeoMatchConstraint: &waf.GeoMatchConstraint{ - Type: aws.String(constraint["type"].(string)), - Value: aws.String(constraint["value"].(string)), - }, - }) - } - - for _, nd := range newT { - constraint := nd.(map[string]interface{}) - - updates = append(updates, &waf.GeoMatchSetUpdate{ - Action: aws.String(waf.ChangeActionInsert), - GeoMatchConstraint: &waf.GeoMatchConstraint{ - Type: aws.String(constraint["type"].(string)), - Value: aws.String(constraint["value"].(string)), - }, - }) - } - return updates -} - -func diffWafRegexPatternSetPatternStrings(oldPatterns, newPatterns []interface{}) []*waf.RegexPatternSetUpdate { - updates := make([]*waf.RegexPatternSetUpdate, 0) - - for _, op := range oldPatterns { - if idx, contains := sliceContainsString(newPatterns, op.(string)); contains { - newPatterns = append(newPatterns[:idx], newPatterns[idx+1:]...) - continue - } - - updates = append(updates, &waf.RegexPatternSetUpdate{ - Action: aws.String(waf.ChangeActionDelete), - RegexPatternString: aws.String(op.(string)), - }) - } - - for _, np := range newPatterns { - updates = append(updates, &waf.RegexPatternSetUpdate{ - Action: aws.String(waf.ChangeActionInsert), - RegexPatternString: aws.String(np.(string)), - }) - } - return updates -} - -func diffWafRulePredicates(oldP, newP []interface{}) []*waf.RuleUpdate { - updates := make([]*waf.RuleUpdate, 0) - - for _, op := range oldP { - predicate := op.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newP, predicate); contains { - newP = append(newP[:idx], newP[idx+1:]...) - continue - } - - updates = append(updates, &waf.RuleUpdate{ - Action: aws.String(waf.ChangeActionDelete), - Predicate: &waf.Predicate{ - Negated: aws.Bool(predicate["negated"].(bool)), - Type: aws.String(predicate["type"].(string)), - DataId: aws.String(predicate["data_id"].(string)), - }, - }) - } - - for _, np := range newP { - predicate := np.(map[string]interface{}) - - updates = append(updates, &waf.RuleUpdate{ - Action: aws.String(waf.ChangeActionInsert), - Predicate: &waf.Predicate{ - Negated: aws.Bool(predicate["negated"].(bool)), - Type: aws.String(predicate["type"].(string)), - DataId: aws.String(predicate["data_id"].(string)), - }, - }) - } - return updates -} - -func sliceContainsString(slice []interface{}, s string) (int, bool) { - for idx, value := range slice { - v := value.(string) - if v == s { - return idx, true - } - } - return -1, false -} - -func diffWafRuleGroupActivatedRules(oldRules, newRules []interface{}) []*waf.RuleGroupUpdate { - updates := make([]*waf.RuleGroupUpdate, 0) - - for _, op := range oldRules { - rule := op.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newRules, rule); contains { - newRules = append(newRules[:idx], newRules[idx+1:]...) - continue - } - - updates = append(updates, &waf.RuleGroupUpdate{ - Action: aws.String(waf.ChangeActionDelete), - ActivatedRule: expandWafActivatedRule(rule), - }) - } - - for _, np := range newRules { - rule := np.(map[string]interface{}) - - updates = append(updates, &waf.RuleGroupUpdate{ - Action: aws.String(waf.ChangeActionInsert), - ActivatedRule: expandWafActivatedRule(rule), - }) - } - return updates -} - -func flattenWafActivatedRules(activatedRules []*waf.ActivatedRule) []interface{} { - out := make([]interface{}, len(activatedRules)) - for i, ar := range activatedRules { - rule := map[string]interface{}{ - "priority": int(*ar.Priority), - "rule_id": *ar.RuleId, - "type": *ar.Type, - } - if ar.Action != nil { - rule["action"] = []interface{}{ - map[string]interface{}{ - "type": *ar.Action.Type, - }, - } - } - out[i] = rule - } - return out -} - -func expandWafActivatedRule(rule map[string]interface{}) *waf.ActivatedRule { - r := &waf.ActivatedRule{ - Priority: aws.Int64(int64(rule["priority"].(int))), - RuleId: aws.String(rule["rule_id"].(string)), - Type: aws.String(rule["type"].(string)), - } - - if a, ok := rule["action"].([]interface{}); ok && len(a) > 0 { - m := a[0].(map[string]interface{}) - r.Action = &waf.WafAction{ - Type: aws.String(m["type"].(string)), - } - } - return r -} - -func flattenWafRegexMatchTuples(tuples []*waf.RegexMatchTuple) []interface{} { - out := make([]interface{}, len(tuples)) - for i, t := range tuples { - m := make(map[string]interface{}) - - if t.FieldToMatch != nil { - m["field_to_match"] = flattenFieldToMatch(t.FieldToMatch) - } - m["regex_pattern_set_id"] = *t.RegexPatternSetId - m["text_transformation"] = *t.TextTransformation - - out[i] = m - } - return out -} - -func diffWafRegexMatchSetTuples(oldT, newT []interface{}) []*waf.RegexMatchSetUpdate { - updates := make([]*waf.RegexMatchSetUpdate, 0) - - for _, ot := range oldT { - tuple := ot.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newT, tuple); contains { - newT = append(newT[:idx], newT[idx+1:]...) - continue - } - - ftm := tuple["field_to_match"].([]interface{}) - updates = append(updates, &waf.RegexMatchSetUpdate{ - Action: aws.String(waf.ChangeActionDelete), - RegexMatchTuple: &waf.RegexMatchTuple{ - FieldToMatch: expandFieldToMatch(ftm[0].(map[string]interface{})), - RegexPatternSetId: aws.String(tuple["regex_pattern_set_id"].(string)), - TextTransformation: aws.String(tuple["text_transformation"].(string)), - }, - }) - } - - for _, nt := range newT { - tuple := nt.(map[string]interface{}) - - ftm := tuple["field_to_match"].([]interface{}) - updates = append(updates, &waf.RegexMatchSetUpdate{ - Action: aws.String(waf.ChangeActionInsert), - RegexMatchTuple: &waf.RegexMatchTuple{ - FieldToMatch: expandFieldToMatch(ftm[0].(map[string]interface{})), - RegexPatternSetId: aws.String(tuple["regex_pattern_set_id"].(string)), - TextTransformation: aws.String(tuple["text_transformation"].(string)), - }, - }) - } - return updates -} - -func resourceAwsWafRegexMatchSetTupleHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - if v, ok := m["field_to_match"]; ok { - ftms := v.([]interface{}) - ftm := ftms[0].(map[string]interface{}) - - if v, ok := ftm["data"]; ok { - buf.WriteString(fmt.Sprintf("%s-", strings.ToLower(v.(string)))) - } - buf.WriteString(fmt.Sprintf("%s-", ftm["type"].(string))) - } - buf.WriteString(fmt.Sprintf("%s-", m["regex_pattern_set_id"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["text_transformation"].(string))) - - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_token_handlers.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_token_handlers.go deleted file mode 100644 index 3de972aa2..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_token_handlers.go +++ /dev/null @@ -1,48 +0,0 @@ -package aws - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/terraform/helper/resource" -) - -type WafRetryer struct { - Connection *waf.WAF -} - -type withTokenFunc func(token *string) (interface{}, error) - -func (t *WafRetryer) RetryWithToken(f withTokenFunc) (interface{}, error) { - awsMutexKV.Lock("WafRetryer") - defer awsMutexKV.Unlock("WafRetryer") - - var out interface{} - err := resource.Retry(15*time.Minute, func() *resource.RetryError { - var err error - var tokenOut *waf.GetChangeTokenOutput - - tokenOut, err = t.Connection.GetChangeToken(&waf.GetChangeTokenInput{}) - if err != nil { - return resource.NonRetryableError(fmt.Errorf("Failed to acquire change token: %s", err)) - } - - out, err = f(tokenOut.ChangeToken) - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "WAFStaleDataException" { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - return out, err -} - -func newWafRetryer(conn *waf.WAF) *WafRetryer { - return &WafRetryer{Connection: conn} -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/wafregionl_token_handlers.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/wafregionl_token_handlers.go deleted file mode 100644 index 17c69c0f9..000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/wafregionl_token_handlers.go +++ /dev/null @@ -1,50 +0,0 @@ -package aws - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/waf" - "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/terraform/helper/resource" -) - -type WafRegionalRetryer struct { - Connection *wafregional.WAFRegional - Region string -} - -type withRegionalTokenFunc func(token *string) (interface{}, error) - -func (t *WafRegionalRetryer) RetryWithToken(f withRegionalTokenFunc) (interface{}, error) { - awsMutexKV.Lock(t.Region) - defer awsMutexKV.Unlock(t.Region) - - var out interface{} - err := resource.Retry(15*time.Minute, func() *resource.RetryError { - var err error - var tokenOut *waf.GetChangeTokenOutput - - tokenOut, err = t.Connection.GetChangeToken(&waf.GetChangeTokenInput{}) - if err != nil { - return resource.NonRetryableError(fmt.Errorf("Failed to acquire change token: %s", err)) - } - - out, err = f(tokenOut.ChangeToken) - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "WAFStaleDataException" { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - - return out, err -} - -func newWafRegionalRetryer(conn *wafregional.WAFRegional, region string) *WafRegionalRetryer { - return &WafRegionalRetryer{Connection: conn, Region: region} -} diff --git a/vendor/golang.org/x/net/html/node.go b/vendor/golang.org/x/net/html/node.go index 2c1cade60..633ee15dc 100644 --- a/vendor/golang.org/x/net/html/node.go +++ b/vendor/golang.org/x/net/html/node.go @@ -177,7 +177,7 @@ func (s *nodeStack) index(n *Node) int { // contains returns whether a is within s. func (s *nodeStack) contains(a atom.Atom) bool { for _, n := range *s { - if n.DataAtom == a { + if n.DataAtom == a && n.Namespace == "" { return true } } diff --git a/vendor/golang.org/x/net/html/parse.go b/vendor/golang.org/x/net/html/parse.go index 64a579372..ca2cb5875 100644 --- a/vendor/golang.org/x/net/html/parse.go +++ b/vendor/golang.org/x/net/html/parse.go @@ -439,9 +439,6 @@ func (p *parser) resetInsertionMode() { case a.Select: if !last { for ancestor, first := n, p.oe[0]; ancestor != first; { - if ancestor == first { - break - } ancestor = p.oe[p.oe.index(ancestor)-1] switch ancestor.DataAtom { case a.Template: @@ -1719,8 +1716,12 @@ func inSelectIM(p *parser) bool { } p.addElement() case a.Select: - p.tok.Type = EndTagToken - return false + if p.popUntil(selectScope, a.Select) { + p.resetInsertionMode() + } else { + // Ignore the token. + return true + } case a.Input, a.Keygen, a.Textarea: if p.elementInScope(selectScope, a.Select) { p.parseImpliedToken(EndTagToken, a.Select, a.Select.String()) @@ -1750,6 +1751,9 @@ func inSelectIM(p *parser) bool { case a.Select: if p.popUntil(selectScope, a.Select) { p.resetInsertionMode() + } else { + // Ignore the token. + return true } case a.Template: return inHeadIM(p) @@ -1775,13 +1779,22 @@ func inSelectInTableIM(p *parser) bool { case StartTagToken, EndTagToken: switch p.tok.DataAtom { case a.Caption, a.Table, a.Tbody, a.Tfoot, a.Thead, a.Tr, a.Td, a.Th: - if p.tok.Type == StartTagToken || p.elementInScope(tableScope, p.tok.DataAtom) { - p.parseImpliedToken(EndTagToken, a.Select, a.Select.String()) - return false - } else { + if p.tok.Type == EndTagToken && !p.elementInScope(tableScope, p.tok.DataAtom) { // Ignore the token. return true } + // This is like p.popUntil(selectScope, a.Select), but it also + // matches , not just